diff --git a/README.md b/README.md index bad0224..71ffffb 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # dhtmlxScheduler # [![dhtmlx.com](https://img.shields.io/badge/made%20by-DHTMLX-blue)](https://dhtmlx.com/) -[![npm: v.7.1.2](https://img.shields.io/badge/npm-v.7.1.2-blue.svg)](https://www.npmjs.com/package/dhtmlx-scheduler) +[![npm: v.7.1.3](https://img.shields.io/badge/npm-v.7.1.3-blue.svg)](https://www.npmjs.com/package/dhtmlx-scheduler) [![License: GPL v2](https://img.shields.io/badge/license-GPL%20v2-blue.svg)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html) [DHTMLX Scheduler](https://dhtmlx.com/docs/products/dhtmlxScheduler) is a JavaScript library that allows you to add a Google-like scheduler to your web app or website. @@ -87,7 +87,7 @@ scheduler.parse([ ## License ## -dhtmlxScheduler v.7.1.2 Standard +dhtmlxScheduler v.7.1.3 Standard To use dhtmlxScheduler in non-GPL projects (and get Pro version of the product), please obtain Commercial/Enterprise or Ultimate license on our site https://dhtmlx.com/docs/products/dhtmlxScheduler/#licensing or contact us at sales@dhtmlx.com diff --git a/bower.json b/bower.json index 36bd35f..9a91b2b 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "scheduler", - "version": "7.1.2", + "version": "7.1.3", "homepage": "https://dhtmlx.com/docs/products/dhtmlxScheduler/", "description": "JavaScript event calendar. Allows to manage events and appointments in different views", "main": [ diff --git a/codebase/dhtmlxscheduler.css b/codebase/dhtmlxscheduler.css index 73319f1..d482810 100644 --- a/codebase/dhtmlxscheduler.css +++ b/codebase/dhtmlxscheduler.css @@ -1 +1 @@ -@font-face{font-family:Inter;font-style:normal;font-weight:300;font-display:swap;src:url(https://fonts.gstatic.com/s/inter/v18/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuOKfMZg.ttf) format("truetype")}@font-face{font-family:Inter;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/inter/v18/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuLyfMZg.ttf) format("truetype")}@font-face{font-family:Inter;font-style:normal;font-weight:500;font-display:swap;src:url(https://fonts.gstatic.com/s/inter/v18/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuI6fMZg.ttf) format("truetype")}@font-face{font-family:Inter;font-style:normal;font-weight:600;font-display:swap;src:url(https://fonts.gstatic.com/s/inter/v18/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuGKYMZg.ttf) format("truetype")}@font-face{font-family:Inter;font-style:normal;font-weight:700;font-display:swap;src:url(https://fonts.gstatic.com/s/inter/v18/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuFuYMZg.ttf) format("truetype")}:root{--dhx-scheduler-theme: terrace;--dhx-scheduler-font-family: Inter, Helvetica, Arial, sans-serif;--dhx-scheduler-font-size: 14px;--dhx-scheduler-heading-font-size: calc(var(--dhx-scheduler-font-size) + 2px);--dhx-scheduler-heading-font-weight: 600;--dhx-scheduler-important-font-size: var(--dhx-scheduler-font-size);--dhx-scheduler-important-line-height: 142%;--dhx-scheduler-important-font-weight: 500;--dhx-scheduler-regular-font-size: var(--dhx-scheduler-font-size);--dhx-scheduler-regular-font-weight: 400;--dhx-scheduler-regular-line-height: 142%;--dhx-scheduler-caption-font-size: calc(var(--dhx-scheduler-font-size) - 2px);--dhx-scheduler-caption-font-weight: 400;--dhx-scheduler-caption-line-height: 132%;--dhx-scheduler-base-colors-primary: #537CFA;--dhx-scheduler-base-colors-primary-hover: #4269E0;--dhx-scheduler-base-colors-primary-active: #3365fb;--dhx-scheduler-base-colors-primary-lighter: #537cfa33;--dhx-scheduler-base-colors-warning: #FAB936;--dhx-scheduler-base-colors-error: #E3334E;--dhx-scheduler-base-colors-error-hover: #D3233E;--dhx-scheduler-base-colors-error-active: #C3132E;--dhx-scheduler-base-colors-error-lighter: #E3334E33;--dhx-scheduler-base-colors-error-text: #FFFFFF;--dhx-scheduler-base-colors-success: #1BC297;--dhx-scheduler-base-colors-secondary: rgba(0, 0, 0, .04);--dhx-scheduler-base-colors-secondary-hover: rgba(0, 0, 0, .1);--dhx-scheduler-base-colors-white: #FFFFFF;--dhx-scheduler-base-colors-select: #EFF3FF;--dhx-scheduler-base-colors-hover-color: #e0e0e0;--dhx-scheduler-base-colors-border: #D0DBE3;--dhx-scheduler-base-colors-icons: #A1A4A6;--dhx-scheduler-base-colors-icons-active: #8b8e90;--dhx-scheduler-base-colors-icons-hover: #76787a;--dhx-scheduler-base-colors-disabled: #E9E9E9;--dhx-scheduler-base-colors-readonly: var(--dhx-scheduler-base-colors-icons);--dhx-scheduler-base-colors-text-light: #44494E;--dhx-scheduler-base-colors-text-base: #23272A;--dhx-scheduler-base-colors-background: #FFFFFF;--dhx-scheduler-container-background: var(--dhx-scheduler-base-colors-background);--dhx-scheduler-container-color: var(--dhx-scheduler-base-colors-text-base);--dhx-scheduler-container-background-alt: rgba(0, 0, 0, .4);--dhx-scheduler-base-transition: .2s ease;--dhx-scheduler-box-shadow-s: 0px 4px 24px 0px rgba(44, 47, 60, .08);--dhx-scheduler-box-shadow-m: 0px 4px 24px 0px rgba(44, 47, 60, .36);--dhx-scheduler-box-shadow-l: 0px 4px 24px 0px rgba(44, 47, 60, .56);--dhx-scheduler-base-module: 4px;--dhx-scheduler-base-padding: 4px;--dhx-scheduler-border-radius: var(--dhx-scheduler-base-module);--dhx-scheduler-event-colors-primary: #537CFA;--dhx-scheduler-event-text-primary: rgba(255, 255, 255, .9);--dhx-scheduler-toolbar-height: 40px;--dhx-scheduler-transition: all .3s;--dhx-scheduler-navline-font-color: var(--dhx-scheduler-base-colors-text-light);--dhx-scheduler-default-border: 1px solid var(--dhx-scheduler-base-colors-border);--dhx-scheduler-header-border: var(--dhx-scheduler-default-border);--dhx-scheduler-halfhour-border: 1px dotted var(--dhx-scheduler-base-colors-border);--dhx-scheduler-event-background-primary: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-event-blue: linear-gradient(180deg, #527CFF 0%, #9751FC 100%);--dhx-scheduler-event-green: linear-gradient(180deg, #12D979 0%, #1ECDEB 100%);--dhx-scheduler-event-violet: linear-gradient(180deg, #D071EF 0%, #EE71D5 100%);--dhx-scheduler-event-yellow: linear-gradient(180deg, #FFB725 0%, #FFBB25 31.25%, #FAEA27 100%);--dhx-scheduler-event-title-font-size: var(--dhx-scheduler-caption-font-size);--dhx-scheduler-event-title-line-height: var(--dhx-scheduler-caption-line-height);--dhx-scheduler-event-text-font-size: var(--dhx-scheduler-regular-font-size);--dhx-scheduler-event-text-line-height: var(--dhx-scheduler-regular-line-height);--dhx-scheduler-event-text-font-weight: var(--dhx-scheduler-regular-font-weight);--dhx-scheduler-event-bar-font-size: var(--dhx-scheduler-caption-font-size);--dhx-scheduler-event-bar-line-height: var(--dhx-scheduler-caption-line-height);--dhx-scheduler-event-menu-background: var(--dhx-scheduler-popup-background);--dhx-scheduler-event-menu-color: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-event-background: var(--dhx-scheduler-event-blue);--dhx-scheduler-event-border: none;--dhx-scheduler-event-color: var(--dhx-scheduler-event-text-primary);--dhx-scheduler-event-line-text: var(--dhx-scheduler-container-color);--dhx-scheduler-event-marker-color: var(--dhx-scheduler-event-background);--dhx-scheduler-popup-background: var(--dhx-scheduler-container-background);--dhx-scheduler-popup-color: var(--dhx-scheduler-container-color);--dhx-scheduler-popup-border: none;--dhx-scheduler-popup-border-radius: var(--dhx-scheduler-border-radius);--dhx-scheduler-control-height: 32px;--dhx-scheduler-checkbox-height: 20px;--dhx-scheduler-lightbox_font-family: var(--dhx-scheduler-font-family);--dhx-scheduler-lightbox-font-size: var(--dhx-scheduler-important-font-size);--dhx-scheduler-lightbox-font-weight: var(--dhx-scheduler-important-font-weight);--dhx-scheduler-lightbox-background: var(--dhx-scheduler-popup-background);--dhx-scheduler-lightbox-border: var(--dhx-scheduler-popup-border);--dhx-scheduler-lightbox-control-border: var(--dhx-scheduler-default-border);--dhx-scheduler-lightbox-color: var(--dhx-scheduler-popup-color);--dhx-scheduler-lightbox-title-background: var(--dhx-scheduler-base-colors-select);--dhx-scheduler-lightbox-title-color: var(--dhx-scheduler-lightbox-color);--dhx-scheduler-lightbox-title-font-size: var(--dhx-scheduler-heading-font-size);--dhx-scheduler-lightbox-max-width: 496px;--dhx-scheduler-lightbox-wide-max-width: 738px;--dhx-scheduler-lightbox-width: var(--dhx-scheduler-lightbox-max-width);--dhx-scheduler-scale-color: var(--dhx-scheduler-container-color);--dhx-scheduler-timescale-background: var(--dhx-scheduler-container-background);--dhx-scheduler-timescale-today-background: var(--dhx-scheduler-base-colors-select);--dhx-scheduler-hours-font-size: var(--dhx-scheduler-caption-font-size);--dhx-scheduler-hours-font-weight: var(--dhx-scheduler-caption-font-weight);--dhx-scheduler-inactive-month-color: var(--dhx-scheduler-base-colors-icons);--dhx-scheduler-month-header-color: var(--dhx-scheduler-container-color);--dhx-scheduler-month-day-header-padding: var(--dhx-scheduler-base-padding) calc(var(--dhx-scheduler-base-padding) * 2);--dhx-scheduler-month-event-marker-size: calc(var(--dhx-scheduler-base-module) * 2);--dhx-scheduler-list-line-height: 36px;--dhx-scheduler-agenda-date-column-width: 188px;--dhx-scheduler-grid-event-background: transparent;--dhx-scheduler-grid-event-text: initial;--dhx-scheduler-timeline-folder-background: var(--dhx-scheduler-base-colors-disabled);--dhx-scheduler-timeline-folder-color: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-blocked-time-background: var(--dhx-scheduler-base-colors-disabled);--dhx-scheduler-today-marker-color: var(--dhx-scheduler-base-colors-error);--dhx-scheduler-datepicker-width: 250px;--dhx-scheduler-datepicker-font-size: var(--dhx-scheduler-font-size);--dhx-scheduler-datepicker-family: var(--dhx-scheduler-font-family);--dhx-scheduler-datepicker-cell-size: 28px;--dhx-scheduler-datepicker-header-font-size: var(--dhx-scheduler-font-size);--dhx-scheduler-datepicker-header-font-weight: 500;--dhx-scheduler-datepicker-padding: 5px;--dhx-scheduler-datepicker-inactive-month-color: var(--dhx-scheduler-inactive-month-color);--dhx-scheduler-datepicker-cell-color: var(--dhx-scheduler-popup-color);--dhx-scheduler-datepicker-cell-background: var(--dhx-scheduler-popup-background);--dhx-scheduler-datepicker-today-color: var(--dhx-scheduler-base-colors-white);--dhx-scheduler-datepicker-today-background: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-datepicker-weekend-color: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-datepicker-weekend-background: var(--dhx-scheduler-popup-background);--dhx-scheduler-datepicker-disabled-color: var(--dhx-scheduler-base-colors-icons);--dhx-scheduler-datepicker-disabled-background: var(--dhx-scheduler-base-colors-disabled);--dhx-scheduler-datepicker-hover-color: var(--dhx-scheduler-base-colors-white);--dhx-scheduler-datepicker-hover-background: var(--dhx-scheduler-base-colors-primary-hover);--dhx-scheduler-datepicker-prevnext-color: var(--dhx-scheduler-inactive-month-color);--dhx-scheduler-datepicker-prevnext-background: var(--dhx-scheduler-popup-background);--dhx-scheduler-btn-background: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-btn-color: var(--dhx-scheduler-base-colors-white);--dhx-scheduler-btn-border-color: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-btn-color-hover: var(--dhx-scheduler-base-colors-white);--dhx-scheduler-btn-background-hover: var(--dhx-scheduler-base-colors-primary-hover);--dhx-scheduler-btn-border-hover: var(--dhx-scheduler-base-colors-primary-hover);--dhx-scheduler-btn-color-active: var(--dhx-scheduler-base-colors-white);--dhx-scheduler-btn-background-active: var(--dhx-scheduler-base-colors-primary-active);--dhx-scheduler-btn-border-active: var(--dhx-scheduler-base-colors-primary-active);--dhx-scheduler-btn-background-disabled: var(--dhx-scheduler-base-colors-disabled);--dhx-scheduler-btn-color-disabled: var(--dhx-scheduler-base-colors-icons);--dhx-scheduler-btn-border-color-disabled: var(--dhx-scheduler-base-colors-disabled);--dhx-scheduler-btn-outline-background: transparent;--dhx-scheduler-btn-outline-color: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-btn-outline-border-color: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-btn-outline-background-hover: var(--dhx-scheduler-base-colors-primary-lighter);--dhx-scheduler-btn-outline-color-hover: var(--dhx-scheduler-base-colors-primary-hover);--dhx-scheduler-btn-outline-border-hover: var(--dhx-scheduler-base-colors-primary-hover);--dhx-scheduler-btn-outline-background-active: var(--dhx-scheduler-base-colors-primary-active);--dhx-scheduler-btn-outline-color-active: var(--dhx-scheduler-base-colors-white);--dhx-scheduler-btn-outline-border-active: var(--dhx-scheduler-base-colors-primary-active);--dhx-scheduler-btn-outline-background-disabled: transparent;--dhx-scheduler-btn-outline-color-disabled: var(--dhx-scheduler-base-colors-icons);--dhx-scheduler-btn-outline-border-color-disabled: var(--dhx-scheduler-base-colors-icons);--dhx-scheduler-btn-text-transform: none;--dhx-scheduler-xy-scale_width: 50px;--dhx-scheduler-xy-bar_height: 24;--dhx-scheduler-xy-month_head_height: 26;--dhx-scheduler-xy-scale_height: 24px;--dhx-scheduler-xy-scroll_width: 18px;--dhx-scheduler-info-background: var(--dhx-scheduler-popup-background);--dhx-scheduler-info-color: var(--dhx-scheduler-popup-color);--dhx-scheduler-info-border: var(--dhx-scheduler-popup-border);--dhx-scheduler-info-shadow: var(--dhx-scheduler-box-shadow-m);--dhx-scheduler-modal-background: var(--dhx-scheduler-popup-background);--dhx-scheduler-modal-color: var(--dhx-scheduler-popup-color);--dhx-scheduler-modal-border: var(--dhx-scheduler-popup-border);--dhx-scheduler-modal-padding: 16px;--dhx-scheduler-modal-width: 320px;--dhx-scheduler-modal-border-radius: var(--dhx-scheduler-popup-border-radius);--dhx-scheduler-undo-delete-background: var(--dhx-scheduler-base-colors-text-base);--dhx-scheduler-undo-delete-color: var(--dhx-scheduler-event-color)}:root[data-scheduler-theme=dark]{--dhx-scheduler-theme: dark;--dhx-scheduler-base-colors-disabled: #3d3d3d;--dhx-scheduler-base-colors-text-light: #AAA;--dhx-scheduler-base-colors-text-base: rgba(255, 255, 255, .9);--dhx-scheduler-base-colors-background: #000000;--dhx-scheduler-base-colors-border: #4B4B4B;--dhx-scheduler-navline-font-color: var(--dhx-scheduler-base-colors-text-base);--dhx-scheduler-base-colors-primary: #3B72F8;--dhx-scheduler-base-colors-primary-hover: #1D5AEE;--dhx-scheduler-base-colors-primary-active: #0e50ea;--dhx-scheduler-base-colors-primary-lighter: #3B72F833;--dhx-scheduler-base-colors-error: #EB284F;--dhx-scheduler-base-colors-error-hover: #D9264A;--dhx-scheduler-base-colors-error-active: #ba0a24;--dhx-scheduler-base-colors-error-lighter: #EB284F33;--dhx-scheduler-base-colors-select: #2A2A2A;--dhx-scheduler-base-colors-hover-color: #2A2A2A;--dhx-scheduler-base-colors-icons: #AAAAAA;--dhx-scheduler-scale-color: var(--dhx-scheduler-base-colors-text-light);--dhx-scheduler-popup-background: #1B1B1C;--dhx-scheduler-popup-border: 1px solid #4B4B4B;--dhx-scheduler-btn-font-weight: 600;--dhx-scheduler-undo-delete-background: var(--dhx-scheduler-popup-background)}:root[data-scheduler-theme=flat]{--dhx-scheduler-theme: flat;--dhx-scheduler-font-family: Segoe UI,Arial,san-serif;--dhx-scheduler-base-colors-primary: #0288D1;--dhx-scheduler-base-colors-primary-hover: #007cbf;--dhx-scheduler-base-colors-primary-active: #00659b;--dhx-scheduler-base-colors-primary-lighter: #edf8ff;--dhx-scheduler-event-background: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-base-colors-border: #cecece;--dhx-scheduler-halfhour-border: 1px solid #e8e8e8;--dhx-scheduler-event-title-font-size: 12px;--dhx-scheduler-event-text-font-size: 14px;--dhx-scheduler-event-text-font-weight: 500;--dhx-scheduler-heading-font-size: 22px;--dhx-scheduler-heading-font-weight: 300;--dhx-scheduler-caption-font-size: 14px;--dhx-scheduler-caption-font-weight: 400;--dhx-scheduler-hours-font-size: 12px;--dhx-scheduler-scale-color: #767676;--dhx-scheduler-border-radius: 0;--dhx-scheduler-timeline-folder-background: #ebeced;--dhx-scheduler-box-shadow-s: 0 3px 5px 0 rgba(0, 0, 0, .1);--dhx-scheduler-box-shadow-m: 0px 4px 24px 0px rgba(44, 47, 60, .36);--dhx-scheduler-box-shadow-l: 0px 4px 24px 0px rgba(44, 47, 60, .56);--dhx-scheduler-config-form_wide: 1;--dhx-scheduler-xy-scale_height: 35px}:root[data-scheduler-theme=flat] .dhx_cal_navline{--dhx-scheduler-btn-outline-border-color: transparent;--dhx-scheduler-btn-outline-border-hover: transparent;--dhx-scheduler-btn-outline-border-color-disabled: transparent}:root[data-scheduler-theme=flat] .dhx_scale_hour{justify-content:center}:root[data-scheduler-theme=flat] .dhx_cal_tab{min-width:90px}:root[data-scheduler-theme=flat] .dhx_cal_navline>div{order:1}:root[data-scheduler-theme=flat] .dhx_cal_navline .dhx_cal_next_button{order:6}:root[data-scheduler-theme=flat] .dhx_cal_navline .dhx_cal_today_button{order:5;border-color:transparent}:root[data-scheduler-theme=flat] .dhx_cal_navline .dhx_cal_prev_button{order:4}:root[data-scheduler-theme=flat] .dhx_cal_navline .dhx_cal_date{order:3}:root[data-scheduler-theme=flat] .dhx_cal_navline .dhx_cal_date{margin-left:auto;margin-right:auto}:root[data-scheduler-theme=flat] .dhx_data_table.folder .dhx_matrix_cell{border-right:0}:root[data-scheduler-theme=flat] .dhx_timeline_scale_header{border-right:none}:root[data-scheduler-theme=flat] .dhx_cal_container_rtl .dhx_timeline_scale_header{border-left:unset}:root[data-scheduler-theme=flat] .dhx_scale_hour{display:flex;flex-direction:row}:root[data-scheduler-theme=flat] .dhx_scale_hour .dhx_scale_h{font-size:22px;line-height:44px;font-weight:lighter}:root[data-scheduler-theme=flat] .dhx_scale_hour .dhx_scale_m{font-size:11px;line-height:35px;align-self:end;font-weight:lighter;transform:translateY(-2px)}:root[data-scheduler-theme=material]{--dhx-scheduler-theme: material;--dhx-scheduler-font-family: Roboto, Helvetica, Arial, sans-serif;--dhx-scheduler-base-colors-primary: #0288D1;--dhx-scheduler-base-colors-primary-hover: #007cbf;--dhx-scheduler-base-colors-primary-active: #00659b;--dhx-scheduler-base-colors-primary-lighter: #edf8ff;--dhx-scheduler-event-background: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-base-colors-border: #e0e0e0;--dhx-scheduler-event-title-font-size: calc(var(--dhx-scheduler-font-size) - 2px);--dhx-scheduler-event-text-font-size: var(--dhx-scheduler-font-size);--dhx-scheduler-event-text-font-weight: 500;--dhx-scheduler-heading-font-size: 20px;--dhx-scheduler-caption-font-size: var(--dhx-scheduler-font-size);--dhx-scheduler-caption-font-weight: 500;--dhx-scheduler-btn-font-weight: 500;--dhx-scheduler-heading-font-weight: 500;--dhx-scheduler-hours-font-size: calc(var(--dhx-scheduler-font-size) - 2px);--dhx-scheduler-base-colors-text-base: rgba(0, 0, 0, .75);--dhx-scheduler-header-border: 1px solid transparent;--dhx-scheduler-scale-color: rgba(0, 0, 0, .54);--dhx-scheduler-border-radius: 0;--dhx-scheduler-btn-text-transform: uppercase;--dhx-scheduler-btn-padding: 1px 20px 0;--dhx-scheduler-halfhour-border: none;--dhx-scheduler-timeline-folder-background: #ebeced;--dhx-scheduler-box-shadow-s: 0 3px 5px 0 rgba(0, 0, 0, .1);--dhx-scheduler-box-shadow-m: 0px 4px 24px 0px rgba(44, 47, 60, .36);--dhx-scheduler-box-shadow-l: 0px 4px 24px 0px rgba(44, 47, 60, .56);--dhx-scheduler-lightbox-title-background: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-lightbox-title-color: #FFFFFF;--dhx-scheduler-lightbox-title-font-size: var(--dhx-scheduler-font-size);--dhx-scheduler-lightbox-wide-max-width: 540px;--dhx-scheduler-config-form_wide: 1}:root[data-scheduler-theme=material] .dhx_scale_hour{justify-content:center}:root[data-scheduler-theme=material] .dhx_cal_tab{min-width:90px}:root[data-scheduler-theme=material] .dhx_cal_navline>div{order:1}:root[data-scheduler-theme=material] .dhx_cal_navline .dhx_cal_next_button{order:6}:root[data-scheduler-theme=material] .dhx_cal_navline .dhx_cal_today_button{order:5;border-color:transparent}:root[data-scheduler-theme=material] .dhx_cal_navline .dhx_cal_prev_button{order:4}:root[data-scheduler-theme=material] .dhx_cal_navline .dhx_cal_date{order:3}:root[data-scheduler-theme=material] .dhx_cal_navline .dhx_cal_date{margin-left:auto;margin-right:auto}:root[data-scheduler-theme=material] .dhx_data_table.folder .dhx_matrix_cell{border-right:0}:root[data-scheduler-theme=material] .dhx_timeline_scale_header{border-right:none}:root[data-scheduler-theme=material] .dhx_cal_container_rtl .dhx_timeline_scale_header{border-left:unset}:root[data-scheduler-theme=material] .dhx_cal_scale_placeholder{position:absolute;z-index:2;box-shadow:0 3px 5px #0000001a;left:0;pointer-events:none}:root[data-scheduler-theme=material] .dhx_year_box .dhx_year_month{font-weight:500;color:var(--dhx-scheduler-base-colors-primary)}:root[data-scheduler-theme=material] .dhx_year_box .dhx_month_head.dhx_year_event:after{content:none}:root[data-scheduler-theme=material] .dhx_year_box .dhx_year_event{--dhx-scheduler-datepicker-cell-color: var(--dhx-scheduler-datepicker-hover-color);--dhx-scheduler-datepicker-cell-background: var(--dhx-scheduler-datepicker-hover-background)}:root[data-scheduler-theme=material] .dhx_cal_ltitle{font-weight:400;text-transform:uppercase}:root[data-scheduler-theme=material] .dhx_cal_ltitle_controls{--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-lightbox-title-color)}:root[data-scheduler-theme=material] .dhx_timeline_scale_header{font-size:var(--dhx-scheduler-caption-font-size);font-weight:var(--dhx-scheduler-caption-font-weight);color:var(--dhx-scheduler-scale-color);line-height:133%}:root[data-scheduler-theme=contrast-white]{--dhx-scheduler-theme: contrast-white;--dhx-scheduler-base-colors-disabled: #C2C2C2;--dhx-scheduler-base-colors-text-light: #303030;--dhx-scheduler-base-colors-text-base: #303030;--dhx-scheduler-base-colors-background: #FFFFFF;--dhx-scheduler-base-colors-border: #4D595B;--dhx-scheduler-base-colors-primary: #0A47CD;--dhx-scheduler-base-colors-primary-hover: #093fb3;--dhx-scheduler-base-colors-primary-active: #08379b;--dhx-scheduler-base-colors-primary-lighter: #0A47CD;--dhx-scheduler-event-background: #0A47CD;--dhx-scheduler-event-color: #FFF;--dhx-scheduler-event-border: 1px solid rgba(0, 0, 0, .1);--dhx-scheduler-base-colors-warning: #FCBA2E;--dhx-scheduler-base-colors-success: #77D257;--dhx-scheduler-base-colors-error: #FFA7A0;--dhx-scheduler-base-colors-error-hover: #d88d88;--dhx-scheduler-base-colors-error-active: #cd8984;--dhx-scheduler-base-colors-error-lighter: #FFA7A0;--dhx-scheduler-base-colors-error-text: #141414;--dhx-scheduler-btn-color: #FFFFFF;--dhx-scheduler-btn-color-hover: #FFFFFF;--dhx-scheduler-btn-color-active: #FFFFFF;--dhx-scheduler-base-colors-select: #E7E5E5;--dhx-scheduler-base-colors-hover-color: #E7E5E5;--dhx-scheduler-base-colors-icons: #303030;--dhx-scheduler-scale-color: var(--dhx-scheduler-base-colors-text-light);--dhx-scheduler-popup-background: #FFF;--dhx-scheduler-popup-border: 1px solid #4D595B;--dhx-scheduler-font-size: 16px;--dhx-scheduler-heading-font-size: 24px;--dhx-scheduler-important-font-size: 16px;--dhx-scheduler-regular-font-size: 16px;--dhx-scheduler-caption-font-size: 16px;--dhx-scheduler-btn-outline-color-hover: #FFFFFF;--dhx-scheduler-btn-outline-color-active: #FFFFFF}:root[data-scheduler-theme=contrast-black]{--dhx-scheduler-theme: contrast-black;--dhx-scheduler-base-colors-disabled: #3d3d3d;--dhx-scheduler-base-colors-text-light: #cfcfcf;--dhx-scheduler-base-colors-text-base: #FFFFFFCC;--dhx-scheduler-base-colors-background: #141414;--dhx-scheduler-base-colors-border: rgba(255, 255, 255, .8);--dhx-scheduler-base-colors-primary: #A395FF;--dhx-scheduler-base-colors-primary-hover: #C5BCFF;--dhx-scheduler-base-colors-primary-active: #C5BCFF;--dhx-scheduler-base-colors-primary-lighter: #C5BCFF;--dhx-scheduler-event-background: #A395FF;--dhx-scheduler-event-color: #141414;--dhx-scheduler-event-border: 1px solid rgba(0, 0, 0, .1);--dhx-scheduler-base-colors-warning: #694E02;--dhx-scheduler-base-colors-success: #115700;--dhx-scheduler-base-colors-error: #FFA7A0;--dhx-scheduler-base-colors-error-hover: #fb9891;--dhx-scheduler-base-colors-error-active: #fe8b83;--dhx-scheduler-base-colors-error-lighter: #ffa6a03e;--dhx-scheduler-base-colors-error-text: #141414;--dhx-scheduler-btn-color: #141414;--dhx-scheduler-btn-color-hover: #141414;--dhx-scheduler-btn-color-active: #141414;--dhx-scheduler-base-colors-select: #2A2A2A;--dhx-scheduler-base-colors-hover-color: #2A2A2A;--dhx-scheduler-base-colors-icons: #AAAAAA;--dhx-scheduler-scale-color: var(--dhx-scheduler-base-colors-text-light);--dhx-scheduler-popup-background: #1B1B1C;--dhx-scheduler-undo-delete-background: var(--dhx-scheduler-popup-background);--dhx-scheduler-undo-delete-color: var(--dhx-scheduler-base-colors-text-base);--dhx-scheduler-popup-border: 1px solid #4B4B4B;--dhx-scheduler-font-size: 16px;--dhx-scheduler-heading-font-size: 24px;--dhx-scheduler-important-font-size: 16px;--dhx-scheduler-regular-font-size: 16px;--dhx-scheduler-caption-font-size: 16px;--dhx-scheduler-btn-outline-color-hover: #141414;--dhx-scheduler-btn-outline-color-active: #141414}@font-face{font-family:dhx-scheduler-icons;src:url(data:font/woff;base64,d09GRgABAAAAAAh0AAsAAAAAEBwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPwAAAGA97Us7Y21hcAAAAYQAAADjAAADMPMkIBtnbHlmAAACaAAAA0IAAAaMK6vwRWhlYWQAAAWsAAAALAAAADZYpKBVaGhlYQAABdgAAAAbAAAAJAJpATlobXR4AAAF9AAAABQAAABsHbAAAGxvY2EAAAYIAAAAOAAAADgWjBgkbWF4cAAABkAAAAAfAAAAIAExAD1uYW1lAAAGYAAAAUEAAAKazYPp33Bvc3QAAAekAAAAzwA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P6N2KyyNuDDHj/kQk//+S07i/9Lj5WBSK6K6GsEnAuHxiuZOW9veJ3/aCUxNns1tuWkifMKFY5hDk/TbmFvao3Xrg2R86oSMSmEb4g6DqqNofNxtc92Rq4bjnRw0oBIuRcESRWEsDyj/x4swzmtgvkXSBQPyXzwt8WhrGzth3N/KRyTbylglzj7OmXLm6CvXJXfiVPsJpxHI0LJVnJP6qpz71AoOPX4gi5jYON7ctL1XrGuj6V/F4q2jU7l01AwcAhIKGgr3JP4uAREJHmZd3243y53u4P/XE7taZOrAjfK+fqnHgTep1WkBSijgap12YE4s2zszIAmwGpDxHh37cjPuXAIaHi0KHaRGXgWEsVBye4LZ3YUEWW9OKsluZ5eZuxTOODXq50D13SQZpMiYJDYkudHHo15uvY85s3EYv5OUGH/3sNXcuosGhlC4yjMg4LtFoAAA==) format("woff2")}.scheduler_icon:before,.dhx_menu_icon:before{font-family:dhx-scheduler-icons!important;font-style:normal;font-weight:400!important;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:flex;justify-content:center;align-items:center;color:var(--dhx-scheduler-base-colors-icons)}.scheduler_icon.alert:before,.dhx_menu_icon.icon_alert:before{content:""}.scheduler_icon.arrow_down:before,.dhx_menu_icon.icon_arrow_down:before{content:""}.scheduler_icon.arrow_left:before,.dhx_menu_icon.icon_arrow_left:before{content:"";font-size:24px}.scheduler_icon.arrow_right:before,.dhx_menu_icon.icon_arrow_right:before{content:"";font-size:24px}.scheduler_icon.arrow_up:before,.dhx_menu_icon.icon_arrow_up:before{content:""}.scheduler_icon.calendar:before,.dhx_menu_icon.icon_calendar:before{content:""}.scheduler_icon.cancel:before,.dhx_menu_icon.icon_cancel:before{content:""}.scheduler_icon.check:before,.dhx_menu_icon.icon_check:before{content:""}.scheduler_icon.chevron_down:before,.dhx_menu_icon.icon_chevron_down:before{content:"";font-size:24px}.scheduler_icon.chevron_left:before,.dhx_menu_icon.icon_chevron_left:before{content:"";font-size:24px}.scheduler_icon.chevron_right:before,.dhx_menu_icon.icon_chevron_right:before{content:"";font-size:24px}.scheduler_icon.chevron_up:before,.dhx_menu_icon.icon_chevron_up:before{content:"";font-size:24px}.scheduler_icon.clock:before,.dhx_menu_icon.icon_clock:before{content:""}.scheduler_icon.close:before,.dhx_menu_icon.icon_close:before{content:""}.scheduler_icon.delete:before,.dhx_menu_icon.icon_delete:before{content:"";font-size:18px}.scheduler_icon.details:before,.dhx_menu_icon.icon_details:before{content:""}.scheduler_icon.dots_h:before,.dhx_menu_icon.icon_dots_h:before{content:""}.scheduler_icon.dots_v:before,.dhx_menu_icon.icon_dots_v:before{content:""}.scheduler_icon.drag_horizontal:before,.dhx_menu_icon.icon_drag_horizontal:before{content:""}.scheduler_icon.drag_vertical:before,.dhx_menu_icon.icon_drag_vertical:before{content:""}.scheduler_icon.drag:before,.dhx_menu_icon.icon_drag:before{content:""}.scheduler_icon.edit:before,.dhx_menu_icon.icon_edit:before{content:""}.scheduler_icon.form:before,.dhx_menu_icon.icon_form:before{content:""}.scheduler_icon.iclose:before,.dhx_menu_icon.icon_iclose:before{content:""}.scheduler_icon.loading:before,.dhx_menu_icon.icon_loading:before{content:""}.scheduler_icon.menu:before,.dhx_menu_icon.icon_menu:before{content:""}.scheduler_icon.menu_down:before,.dhx_menu_icon.icon_menu_down:before{content:""}.scheduler_icon.menu_right:before,.dhx_menu_icon.icon_menu_right:before{content:""}.scheduler_icon.ok:before,.dhx_menu_icon.icon_ok:before{content:""}.scheduler_icon.plus:before,.dhx_menu_icon.icon_plus:before{content:""}.scheduler_icon.save:before,.dhx_menu_icon.icon_save:before{content:""}.scheduler_icon.sort_asc:before,.dhx_menu_icon.icon_sort_asc:before{content:""}.scheduler_icon.sort_desc:before,.dhx_menu_icon.icon_sort_desc:before{content:""}.button{background:var(--dhx-scheduler-btn-background);color:var(--dhx-scheduler-btn-color);border:1px solid var(--dhx-scheduler-btn-border-color);border-radius:var(--dhx-scheduler-border-radius);height:var(--dhx-scheduler-control-height);padding:var(--dhx-scheduler-btn-padding, 0 20px);display:flex;justify-content:center;align-items:center;box-sizing:border-box;gap:4px;flex-shrink:0;font-weight:500;font-size:var(--dhx-scheduler-font-size);font-family:var(--dhx-scheduler-font-family);font-weight:var(--dhx-scheduler-btn-font-weight, normal);line-height:142%;text-transform:var(--dhx-scheduler-btn-text-transform);cursor:pointer}.button:hover{background:var(--dhx-scheduler-btn-background-hover);color:var(--dhx-scheduler-btn-color-hover);border-color:var(--dhx-scheduler-btn-border-hover)}.button:active{background:var(--dhx-scheduler-btn-background-active);color:var(--dhx-scheduler-btn-color-active);border-color:var(--dhx-scheduler-btn-border-active)}.button:disabled{background:var(--dhx-scheduler-btn-background-disabled);color:var(--dhx-scheduler-btn-color-disabled);border-color:var(--dhx-scheduler-btn-border-disabled)}.button-outline{--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-btn-color);--dhx-scheduler-btn-background: var(--dhx-scheduler-btn-outline-background);--dhx-scheduler-btn-color: var(--dhx-scheduler-btn-outline-color);--dhx-scheduler-btn-border-color: var(--dhx-scheduler-btn-outline-border-color);--dhx-scheduler-btn-background-hover: var(--dhx-scheduler-btn-outline-background-hover);--dhx-scheduler-btn-color-hover: var(--dhx-scheduler-btn-outline-color-hover);--dhx-scheduler-btn-border-hover: var(--dhx-scheduler-btn-outline-border-hover);--dhx-scheduler-btn-background-active: var(--dhx-scheduler-btn-outline-background-active);--dhx-scheduler-btn-color-active: var(--dhx-scheduler-btn-outline-color-active);--dhx-scheduler-btn-border-active: var(--dhx-scheduler-btn-outline-border-active);--dhx-scheduler-btn-background-disabled: var(--dhx-scheduler-btn-outline-background-disabled);--dhx-scheduler-btn-color-disabled: var(--dhx-scheduler-btn-outline-color-disabled);--dhx-scheduler-btn-border-color-disabled: var(--dhx-scheduler-btn-outline-border-color-disabled)}.button-danger{--dhx-scheduler-btn-background: var(--dhx-scheduler-base-colors-error);--dhx-scheduler-btn-color: var(--dhx-scheduler-base-colors-error-text);--dhx-scheduler-btn-border-color: var(--dhx-scheduler-base-colors-error);--dhx-scheduler-btn-background-hover: var(--dhx-scheduler-base-colors-error-hover);--dhx-scheduler-btn-border-hover: var(--dhx-scheduler-base-colors-error-hover);--dhx-scheduler-btn-background-active: var(--dhx-scheduler-base-colors-error-active);--dhx-scheduler-btn-border-active: var(--dhx-scheduler-base-colors-error-active)}.button-danger-outline{--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-btn-color);--dhx-scheduler-btn-background: transparent;--dhx-scheduler-btn-color: var(--dhx-scheduler-base-colors-error);--dhx-scheduler-btn-border-color: var(--dhx-scheduler-base-colors-error);--dhx-scheduler-btn-background-hover: var(--dhx-scheduler-base-colors-error-lighter);--dhx-scheduler-btn-color-hover: var(--dhx-scheduler-base-colors-error-hover);--dhx-scheduler-btn-border-hover: var(--dhx-scheduler-base-colors-error-hover);--dhx-scheduler-btn-background-active: var(--dhx-scheduler-base-colors-error-active);--dhx-scheduler-btn-color-active: var(--dhx-scheduler-base-colors-error-active);--dhx-scheduler-btn-border-active: var(--dhx-scheduler-base-colors-error-active);--dhx-scheduler-btn-background-disabled: transparent;--dhx-scheduler-btn-color-disabled: var(--dhx-scheduler-base-colors-icons);--dhx-scheduler-btn-border-color-disabled: var(--dhx-scheduler-base-colors-icons)}.button-danger-link{padding:6px 0;--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-base-colors-error);--dhx-scheduler-btn-background: transparent;--dhx-scheduler-btn-color: var(--dhx-scheduler-base-colors-error);--dhx-scheduler-btn-border-color: transparent;--dhx-scheduler-btn-background-hover: transparent;--dhx-scheduler-btn-color-hover: var(--dhx-scheduler-base-colors-error-hover);--dhx-scheduler-btn-border-hover: transparent;--dhx-scheduler-btn-background-active: transparent;--dhx-scheduler-btn-color-active: var(--dhx-scheduler-base-colors-error-active);--dhx-scheduler-btn-border-active: transparent;--dhx-scheduler-btn-background-disabled: transparent;--dhx-scheduler-btn-color-disabled: var(--dhx-scheduler-base-colors-icons);--dhx-scheduler-btn-border-color-disabled: transparent}.button-link{padding:6px 0;--dhx-scheduler-btn-background: transparent;--dhx-scheduler-btn-color: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-btn-border-color: transparent;--dhx-scheduler-btn-background-hover: transparent;--dhx-scheduler-btn-color-hover: var(--dhx-scheduler-base-colors-primary-hover);--dhx-scheduler-btn-border-hover: transparent;--dhx-scheduler-btn-background-active: transparent;--dhx-scheduler-btn-color-active: var(--dhx-scheduler-base-colors-primary-active);--dhx-scheduler-btn-border-active: transparent;--dhx-scheduler-btn-background-disabled: transparent;--dhx-scheduler-btn-color-disabled: var(--dhx-scheduler-base-colors-icons);--dhx-scheduler-btn-border-color-disabled: transparent}.button-icon{min-width:32px;height:32px;border-radius:50%;padding:6px 0;--dhx-scheduler-btn-background: transparent;--dhx-scheduler-btn-color: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-btn-border-color: transparent;--dhx-scheduler-btn-background-hover: transparent;--dhx-scheduler-btn-color-hover: var(--dhx-scheduler-base-colors-primary-hover);--dhx-scheduler-btn-border-hover: transparent;--dhx-scheduler-btn-background-active: transparent;--dhx-scheduler-btn-color-active: var(--dhx-scheduler-base-colors-primary-active);--dhx-scheduler-btn-border-active: transparent;--dhx-scheduler-btn-background-disabled: transparent;--dhx-scheduler-btn-color-disabled: var(--dhx-scheduler-base-colors-icons);--dhx-scheduler-btn-border-color-disabled: transparent}.button-icon:hover{--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-base-colors-icons-hover)}.button-icon:active{--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-base-colors-icons-active)}.button-icon:disabled{--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-btn-color-disabled)}.dhx_cal_btn,.dhx_cal_btn_danger,.dhx_cal_btn_outline,.dhx_cal_btn_danger_outline,.dhx_cal_btn_danger_link,.dhx_btn_set,.dhx_cal_tab,.dhx_qi_big_icon,.dhx_cal_today_button,.dhx_cal_tab_standalone{background:var(--dhx-scheduler-btn-background);color:var(--dhx-scheduler-btn-color);border:1px solid var(--dhx-scheduler-btn-border-color);border-radius:var(--dhx-scheduler-border-radius);height:var(--dhx-scheduler-control-height);padding:var(--dhx-scheduler-btn-padding, 0 20px);display:flex;justify-content:center;align-items:center;box-sizing:border-box;gap:4px;flex-shrink:0;font-weight:500;font-size:var(--dhx-scheduler-font-size);font-family:var(--dhx-scheduler-font-family);font-weight:var(--dhx-scheduler-btn-font-weight, normal);line-height:142%;text-transform:var(--dhx-scheduler-btn-text-transform);cursor:pointer}.dhx_cal_btn:hover,.dhx_cal_btn_danger:hover,.dhx_cal_btn_outline:hover,.dhx_cal_btn_danger_outline:hover,.dhx_cal_btn_danger_link:hover,.dhx_btn_set:hover,.dhx_cal_tab:hover,.dhx_qi_big_icon:hover,.dhx_cal_today_button:hover,.dhx_cal_tab_standalone:hover{background:var(--dhx-scheduler-btn-background-hover);color:var(--dhx-scheduler-btn-color-hover);border-color:var(--dhx-scheduler-btn-border-hover)}.dhx_cal_btn:active,.dhx_cal_btn_danger:active,.dhx_cal_btn_outline:active,.dhx_cal_btn_danger_outline:active,.dhx_cal_btn_danger_link:active,.dhx_btn_set:active,.dhx_cal_tab:active,.dhx_qi_big_icon:active,.dhx_cal_today_button:active,.dhx_cal_tab_standalone:active{background:var(--dhx-scheduler-btn-background-active);color:var(--dhx-scheduler-btn-color-active);border-color:var(--dhx-scheduler-btn-border-active)}.dhx_cal_btn:disabled,.dhx_cal_btn_danger:disabled,.dhx_cal_btn_outline:disabled,.dhx_cal_btn_danger_outline:disabled,.dhx_cal_btn_danger_link:disabled,.dhx_btn_set:disabled,.dhx_cal_tab:disabled,.dhx_qi_big_icon:disabled,.dhx_cal_today_button:disabled,.dhx_cal_tab_standalone:disabled{background:var(--dhx-scheduler-btn-background-disabled);color:var(--dhx-scheduler-btn-color-disabled);border-color:var(--dhx-scheduler-btn-border-disabled)}.scheduler_popup_button{background:var(--dhx-scheduler-btn-background);color:var(--dhx-scheduler-btn-color);border:1px solid var(--dhx-scheduler-btn-border-color);border-radius:var(--dhx-scheduler-border-radius);height:var(--dhx-scheduler-control-height);padding:var(--dhx-scheduler-btn-padding, 0 20px);display:flex;justify-content:center;align-items:center;box-sizing:border-box;gap:4px;flex-shrink:0;font-weight:500;font-size:var(--dhx-scheduler-font-size);font-family:var(--dhx-scheduler-font-family);font-weight:var(--dhx-scheduler-btn-font-weight, normal);line-height:142%;text-transform:var(--dhx-scheduler-btn-text-transform);cursor:pointer}.scheduler_popup_button:hover{background:var(--dhx-scheduler-btn-background-hover);color:var(--dhx-scheduler-btn-color-hover);border-color:var(--dhx-scheduler-btn-border-hover)}.scheduler_popup_button:active{background:var(--dhx-scheduler-btn-background-active);color:var(--dhx-scheduler-btn-color-active);border-color:var(--dhx-scheduler-btn-border-active)}.scheduler_popup_button:disabled{background:var(--dhx-scheduler-btn-background-disabled);color:var(--dhx-scheduler-btn-color-disabled);border-color:var(--dhx-scheduler-btn-border-disabled)}.scheduler_popup_button:not(.scheduler_ok_button){--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-btn-color);--dhx-scheduler-btn-background: var(--dhx-scheduler-btn-outline-background);--dhx-scheduler-btn-color: var(--dhx-scheduler-btn-outline-color);--dhx-scheduler-btn-border-color: var(--dhx-scheduler-btn-outline-border-color);--dhx-scheduler-btn-background-hover: var(--dhx-scheduler-btn-outline-background-hover);--dhx-scheduler-btn-color-hover: var(--dhx-scheduler-btn-outline-color-hover);--dhx-scheduler-btn-border-hover: var(--dhx-scheduler-btn-outline-border-hover);--dhx-scheduler-btn-background-active: var(--dhx-scheduler-btn-outline-background-active);--dhx-scheduler-btn-color-active: var(--dhx-scheduler-btn-outline-color-active);--dhx-scheduler-btn-border-active: var(--dhx-scheduler-btn-outline-border-active);--dhx-scheduler-btn-background-disabled: var(--dhx-scheduler-btn-outline-background-disabled);--dhx-scheduler-btn-color-disabled: var(--dhx-scheduler-btn-outline-color-disabled);--dhx-scheduler-btn-border-color-disabled: var(--dhx-scheduler-btn-outline-border-color-disabled)}.scheduler_ok_button{--dhx-scheduler-btn-background: var(--dhx-scheduler-base-colors-error);--dhx-scheduler-btn-color: var(--dhx-scheduler-base-colors-error-text);--dhx-scheduler-btn-border-color: var(--dhx-scheduler-base-colors-error);--dhx-scheduler-btn-background-hover: var(--dhx-scheduler-base-colors-error-hover);--dhx-scheduler-btn-border-hover: var(--dhx-scheduler-base-colors-error-hover);--dhx-scheduler-btn-background-active: var(--dhx-scheduler-base-colors-error-active);--dhx-scheduler-btn-border-active: var(--dhx-scheduler-base-colors-error-active)}.dhx_cal_btn_outline,.dhx_cal_btn_danger_outline{--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-btn-color);--dhx-scheduler-btn-background: var(--dhx-scheduler-btn-outline-background);--dhx-scheduler-btn-color: var(--dhx-scheduler-btn-outline-color);--dhx-scheduler-btn-border-color: var(--dhx-scheduler-btn-outline-border-color);--dhx-scheduler-btn-background-hover: var(--dhx-scheduler-btn-outline-background-hover);--dhx-scheduler-btn-color-hover: var(--dhx-scheduler-btn-outline-color-hover);--dhx-scheduler-btn-border-hover: var(--dhx-scheduler-btn-outline-border-hover);--dhx-scheduler-btn-background-active: var(--dhx-scheduler-btn-outline-background-active);--dhx-scheduler-btn-color-active: var(--dhx-scheduler-btn-outline-color-active);--dhx-scheduler-btn-border-active: var(--dhx-scheduler-btn-outline-border-active);--dhx-scheduler-btn-background-disabled: var(--dhx-scheduler-btn-outline-background-disabled);--dhx-scheduler-btn-color-disabled: var(--dhx-scheduler-btn-outline-color-disabled);--dhx-scheduler-btn-border-color-disabled: var(--dhx-scheduler-btn-outline-border-color-disabled)}.dhx_cal_button_danger,.dhx_cal_button_danger_outline{--dhx-scheduler-btn-background: var(--dhx-scheduler-base-colors-error);--dhx-scheduler-btn-color: var(--dhx-scheduler-base-colors-error-text);--dhx-scheduler-btn-border-color: var(--dhx-scheduler-base-colors-error);--dhx-scheduler-btn-background-hover: var(--dhx-scheduler-base-colors-error-hover);--dhx-scheduler-btn-border-hover: var(--dhx-scheduler-base-colors-error-hover);--dhx-scheduler-btn-background-active: var(--dhx-scheduler-base-colors-error-active);--dhx-scheduler-btn-border-active: var(--dhx-scheduler-base-colors-error-active)}.dhx_cal_button_link,.dhx_qi_big_icon{padding:6px 0;--dhx-scheduler-btn-background: transparent;--dhx-scheduler-btn-color: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-btn-border-color: transparent;--dhx-scheduler-btn-background-hover: transparent;--dhx-scheduler-btn-color-hover: var(--dhx-scheduler-base-colors-primary-hover);--dhx-scheduler-btn-border-hover: transparent;--dhx-scheduler-btn-background-active: transparent;--dhx-scheduler-btn-color-active: var(--dhx-scheduler-base-colors-primary-active);--dhx-scheduler-btn-border-active: transparent;--dhx-scheduler-btn-background-disabled: transparent;--dhx-scheduler-btn-color-disabled: var(--dhx-scheduler-base-colors-icons);--dhx-scheduler-btn-border-color-disabled: transparent}.dhx_unselectable,.dhx_unselectable div{-webkit-user-select:none;user-select:none}.dhx_cal_container{position:relative;overflow:hidden;font-family:var(--dhx-scheduler-font-family);font-size:var(--dhx-scheduler-font-size);line-height:110%;display:flex;flex-direction:column;background-color:var(--dhx-scheduler-container-background);color:var(--dhx-scheduler-container-color);text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}.dhx_cal_container div[role=button]{cursor:pointer}.dhx_cal_container.dhx_cal_container_rtl{direction:rtl}.dhx_cal_container,.dhx_cal_container *{box-sizing:border-box}.dhx_cal_container div{-webkit-user-select:none;user-select:none}.dhx_cal_data,.dhx_cal_event,.dhx_cal_event_clear,.dhx_cal_event_line{touch-action:pan-y}.dhx_cal_navline{position:relative;display:flex;align-items:center;flex-wrap:wrap;row-gap:8px;justify-content:space-between;font-weight:var(--dhx-scheduler-important-font-weight);padding:12px;min-height:var(--dhx-scheduler-toolbar-height);color:var(--dhx-scheduler-navline-font-color)}.dhx_cal_navline_flex .dhx_cal_navbar_rows_container{display:flex;align-items:center;flex-direction:column;box-sizing:border-box;flex-grow:1;gap:12px;height:100%}.dhx_cal_navline_flex .dhx_cal_date{width:auto;margin-left:auto;margin-right:auto}.dhx_cal_navline_flex .dhx_cal_today_button{order:unset}.dhx_cal_navline_flex .dhx_cal_navbar_row{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;padding:0 1vw;box-sizing:border-box;height:100%;width:100%;flex-grow:1;flex-shrink:1}.dhx_cal_navline_flex .dhx_cal_line_spacer{display:block;width:auto;flex-grow:1}@media only screen and (max-width: 1023px){.dhx_cal_navline_flex .dhx_cal_next_button,.dhx_cal_navline_flex .dhx_cal_prev_button,.dhx_cal_navline_flex .dhx_cal_tab,.dhx_cal_navline_flex .dhx_cal_tab.active,.dhx_cal_navline_flex .dhx_cal_today_button{height:2.5vw;line-height:2.5vw}}@media only screen and (max-width: 840px){.dhx_cal_navline_flex{--dhx-scheduler-btn-padding: 0 12px}.dhx_cal_navline_flex .dhx_cal_next_button,.dhx_cal_navline_flex .dhx_cal_prev_button,.dhx_cal_navline_flex .dhx_cal_tab,.dhx_cal_navline_flex .dhx_cal_tab.active,.dhx_cal_navline_flex .dhx_cal_today_button{height:4vw;line-height:4vw}}@media only screen and (max-width: 480px){.dhx_cal_navline_flex{--dhx-scheduler-btn-padding: 0 4px}.dhx_cal_navline_flex .dhx_cal_next_button,.dhx_cal_navline_flex .dhx_cal_prev_button{width:2rem}}@media only screen and (max-width: 480px){.dhx_cal_navline_flex .dhx_cal_next_button,.dhx_cal_navline_flex .dhx_cal_prev_button,.dhx_cal_navline_flex .dhx_cal_tab,.dhx_cal_navline_flex .dhx_cal_tab.active,.dhx_cal_navline_flex .dhx_cal_today_button{height:6vw;line-height:6vw}}.dhx_cal_tab:not(.active),.dhx_cal_tab_standalone:not(.active),.dhx_cal_today_button:not(.active){--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-btn-color);--dhx-scheduler-btn-background: var(--dhx-scheduler-btn-outline-background);--dhx-scheduler-btn-color: var(--dhx-scheduler-btn-outline-color);--dhx-scheduler-btn-border-color: var(--dhx-scheduler-btn-outline-border-color);--dhx-scheduler-btn-background-hover: var(--dhx-scheduler-btn-outline-background-hover);--dhx-scheduler-btn-color-hover: var(--dhx-scheduler-btn-outline-color-hover);--dhx-scheduler-btn-border-hover: var(--dhx-scheduler-btn-outline-border-hover);--dhx-scheduler-btn-background-active: var(--dhx-scheduler-btn-outline-background-active);--dhx-scheduler-btn-color-active: var(--dhx-scheduler-btn-outline-color-active);--dhx-scheduler-btn-border-active: var(--dhx-scheduler-btn-outline-border-active);--dhx-scheduler-btn-background-disabled: var(--dhx-scheduler-btn-outline-background-disabled);--dhx-scheduler-btn-color-disabled: var(--dhx-scheduler-btn-outline-color-disabled);--dhx-scheduler-btn-border-color-disabled: var(--dhx-scheduler-btn-outline-border-color-disabled)}.dhx_cal_tab_segmented{border-left-style:none;border-radius:0}.dhx_cal_tab_segmented.dhx_cal_tab_first{border-left-style:solid;border-radius:var(--dhx-scheduler-border-radius) 0px 0px var(--dhx-scheduler-border-radius);margin-left:4px}.dhx_cal_tab_segmented.dhx_cal_tab_last{border-radius:0px var(--dhx-scheduler-border-radius) var(--dhx-scheduler-border-radius) 0px;margin-right:4px}.dhx_cal_container_rtl .dhx_cal_tab_segmented.dhx_cal_tab_first{border-left-style:none;border-radius:0px var(--dhx-scheduler-border-radius) var(--dhx-scheduler-border-radius) 0px;margin-right:4px;margin-left:unset}.dhx_cal_container_rtl .dhx_cal_tab_segmented.dhx_cal_tab_last{border-radius:var(--dhx-scheduler-border-radius) 0px 0px var(--dhx-scheduler-border-radius);border-left-style:solid;margin-right:unset;margin-left:4px}.dhx_cal_container_rtl .dhx_cal_date{margin-right:unset;margin-left:auto}.dhx_cal_container_rtl .dhx_cal_header{border-left:var(--dhx-scheduler-default-border);border-right:none}.dhx_cal_tab_standalone{border-radius:var(--dhx-scheduler-border-radius);margin:0 4px}.dhx_cal_header{height:21px;border-top:var(--dhx-scheduler-header-border);border-right:var(--dhx-scheduler-header-border);position:relative;overflow:hidden}.dhx_scale_bar{position:absolute}.dhx_cal_date{text-align:center;position:relative;margin-right:auto;font-size:var(--dhx-scheduler-heading-font-size);line-height:150%;font-weight:var(--dhx-scheduler-heading-font-weight);flex-shrink:0}.dhx_cal_data{position:relative;flex:1;overflow-y:auto;overflow-x:hidden;border-top:var(--dhx-scheduler-default-border)}.dhx_scale_holder{position:absolute}.dhx_cal_today_button{margin-right:5px;order:-1}.dhx_cal_prev_button,.dhx_cal_next_button{order:0;width:20px;height:20px;background:var(--dhx-scheduler-btn-background);color:var(--dhx-scheduler-btn-color);border:1px solid var(--dhx-scheduler-btn-border-color);border-radius:var(--dhx-scheduler-border-radius);height:var(--dhx-scheduler-control-height);padding:var(--dhx-scheduler-btn-padding, 0 20px);display:flex;justify-content:center;align-items:center;box-sizing:border-box;gap:4px;flex-shrink:0;font-weight:500;font-size:var(--dhx-scheduler-font-size);font-family:var(--dhx-scheduler-font-family);font-weight:var(--dhx-scheduler-btn-font-weight, normal);line-height:142%;text-transform:var(--dhx-scheduler-btn-text-transform);cursor:pointer;min-width:32px;height:32px;border-radius:50%;padding:6px 0;--dhx-scheduler-btn-background: transparent;--dhx-scheduler-btn-color: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-btn-border-color: transparent;--dhx-scheduler-btn-background-hover: transparent;--dhx-scheduler-btn-color-hover: var(--dhx-scheduler-base-colors-primary-hover);--dhx-scheduler-btn-border-hover: transparent;--dhx-scheduler-btn-background-active: transparent;--dhx-scheduler-btn-color-active: var(--dhx-scheduler-base-colors-primary-active);--dhx-scheduler-btn-border-active: transparent;--dhx-scheduler-btn-background-disabled: transparent;--dhx-scheduler-btn-color-disabled: var(--dhx-scheduler-base-colors-icons);--dhx-scheduler-btn-border-color-disabled: transparent;font-size:24px}.dhx_cal_prev_button:hover,.dhx_cal_next_button:hover{background:var(--dhx-scheduler-btn-background-hover);color:var(--dhx-scheduler-btn-color-hover);border-color:var(--dhx-scheduler-btn-border-hover)}.dhx_cal_prev_button:active,.dhx_cal_next_button:active{background:var(--dhx-scheduler-btn-background-active);color:var(--dhx-scheduler-btn-color-active);border-color:var(--dhx-scheduler-btn-border-active)}.dhx_cal_prev_button:disabled,.dhx_cal_next_button:disabled{background:var(--dhx-scheduler-btn-background-disabled);color:var(--dhx-scheduler-btn-color-disabled);border-color:var(--dhx-scheduler-btn-border-disabled)}.dhx_cal_prev_button:hover,.dhx_cal_next_button:hover{--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-base-colors-icons-hover)}.dhx_cal_prev_button:active,.dhx_cal_next_button:active{--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-base-colors-icons-active)}.dhx_cal_prev_button:disabled,.dhx_cal_next_button:disabled{--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-btn-color-disabled)}.dhx_cal_prev_button:before,.dhx_cal_next_button:before{font-family:dhx-scheduler-icons!important;font-style:normal;font-weight:400!important;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:flex;justify-content:center;align-items:center;color:var(--dhx-scheduler-base-colors-icons)}.dhx_cal_prev_button:before{content:"";font-size:24px}.dhx_cal_next_button:before{content:"";font-size:24px}.dhx_cal_container_rtl .dhx_cal_prev_button:before{content:"";font-size:24px}.dhx_cal_container_rtl .dhx_cal_next_button:before{content:"";font-size:24px}.scheduler_container_resize_watcher{background:transparent;width:100%;height:100%;position:absolute;top:0;left:0;z-index:-1;pointer-events:none;border:0;box-sizing:border-box;opacity:0}.dhx_title_datepicker_container{z-index:2;position:absolute}.dhx_expand_icon{position:absolute;top:0;right:2px;cursor:pointer;z-index:4}.dhx_marked_timespan{position:absolute;width:100%;margin-left:0;display:flex;justify-content:center;align-items:center}.dhx_time_block{position:absolute;width:100%;background:var(--dhx-scheduler-blocked-time-background);z-index:1;opacity:.6}.dhx_time_block_reset{opacity:1}.dhx_scheduler_month .dhx_marked_timespan,.dhx_mini_calendar .dhx_marked_timespan{display:none}.dhx_timeline_table_wrapper .dhx_marked_timespan{z-index:1}.dhx_timeline_table_wrapper .dhx_time_block{z-index:2}.dhx_timeline_table_wrapper .dhx_cal_event_line{z-index:1}.dhx_timeline_table_wrapper .dhx_timeline_scrollable_data{overflow-x:auto}.dhx_now_time{width:100%;height:2px;background:var(--dhx-scheduler-today-marker-color);opacity:.5;box-shadow:0 1px 0 1px var(--dhx-scheduler-today-marker-color)}.dhx_matrix_now_time{background:var(--dhx-scheduler-today-marker-color);opacity:.5}.dhx_minical_icon{background:var(--dhx-scheduler-btn-background);color:var(--dhx-scheduler-btn-color);border:1px solid var(--dhx-scheduler-btn-border-color);border-radius:var(--dhx-scheduler-border-radius);height:var(--dhx-scheduler-control-height);padding:var(--dhx-scheduler-btn-padding, 0 20px);display:flex;justify-content:center;align-items:center;box-sizing:border-box;gap:4px;flex-shrink:0;font-weight:500;font-size:var(--dhx-scheduler-font-size);font-family:var(--dhx-scheduler-font-family);font-weight:var(--dhx-scheduler-btn-font-weight, normal);line-height:142%;text-transform:var(--dhx-scheduler-btn-text-transform);min-width:32px;height:32px;border-radius:50%;padding:6px 0;--dhx-scheduler-btn-background: transparent;--dhx-scheduler-btn-color: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-btn-border-color: transparent;--dhx-scheduler-btn-background-hover: transparent;--dhx-scheduler-btn-color-hover: var(--dhx-scheduler-base-colors-primary-hover);--dhx-scheduler-btn-border-hover: transparent;--dhx-scheduler-btn-background-active: transparent;--dhx-scheduler-btn-color-active: var(--dhx-scheduler-base-colors-primary-active);--dhx-scheduler-btn-border-active: transparent;--dhx-scheduler-btn-background-disabled: transparent;--dhx-scheduler-btn-color-disabled: var(--dhx-scheduler-base-colors-icons);--dhx-scheduler-btn-border-color-disabled: transparent;cursor:pointer;font-size:24px}.dhx_minical_icon:hover{background:var(--dhx-scheduler-btn-background-hover);color:var(--dhx-scheduler-btn-color-hover);border-color:var(--dhx-scheduler-btn-border-hover)}.dhx_minical_icon:active{background:var(--dhx-scheduler-btn-background-active);color:var(--dhx-scheduler-btn-color-active);border-color:var(--dhx-scheduler-btn-border-active)}.dhx_minical_icon:disabled{background:var(--dhx-scheduler-btn-background-disabled);color:var(--dhx-scheduler-btn-color-disabled);border-color:var(--dhx-scheduler-btn-border-disabled)}.dhx_minical_icon:hover{--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-base-colors-icons-hover)}.dhx_minical_icon:active{--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-base-colors-icons-active)}.dhx_minical_icon:disabled{--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-btn-color-disabled)}.dhx_minical_icon:before{font-family:dhx-scheduler-icons!important;font-style:normal;font-weight:400!important;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:flex;justify-content:center;align-items:center;color:var(--dhx-scheduler-base-colors-icons)}.dhx_minical_icon:before{content:""}.dhx_scale_ignore{display:none!important}.dhx_drag_placeholder{font-family:var(--dhx-scheduler-font-family);font-size:var(--dhx-scheduler-font-size)}.dhx_hidden{display:none!important}.common_input{border-radius:2px;background-color:var(--dhx-scheduler-lightbox-background);color:var(--dhx-scheduler-lightbox-color);border:var(--dhx-scheduler-lightbox-control-border);font-size:var(--dhx-scheduler);padding:6px 8px;box-sizing:border-box;margin-top:0;margin-bottom:0}.common_input:focus,.common_input:focus-visible{border-color:var(--dhx-scheduler-base-colors-primary);outline:none}.common_input:disabled{background-color:var(--dhx-scheduler-base-colors-disabled);color:var(--dhx-scheduler-base-colors-icons)}.one_line_input{height:var(--dhx-scheduler-control-height)}.dhx_cal_cover,.dhx_cal_cover *{box-sizing:border-box}.dhx_cal_cover{width:100%;height:100%;position:fixed;z-index:14;top:0;left:0;background-color:#0006;display:flex;justify-content:center;align-items:center;overflow:auto}.dhx_cal_light{margin-top:auto;margin-bottom:auto;width:max-content;max-width:var(--dhx-scheduler-lightbox-width);height:auto;-webkit-tap-highlight-color:transparent;background-color:var(--dhx-scheduler-lightbox-background);color:var(--dhx-scheduler-lightbox-color);position:absolute;z-index:15;font-family:var(--dhx-scheduler-lightbox_font-family);font-size:var(--dhx-scheduler-lightbox-font-size);font-weight:var(--dhx-scheduler-lightbox-font-weight);line-height:142%;border:var(--dhx-scheduler-lightbox-border);border-radius:var(--dhx-scheduler-popup-border-radius)}.dhx_cal_light.dhx_cal_light_wide{--dhx-scheduler-lightbox-width: var(--dhx-scheduler-lightbox-wide-max-width)}.dhx_cal_light textarea,.dhx_cal_light input,.dhx_cal_light select{border-radius:2px;background-color:var(--dhx-scheduler-lightbox-background);color:var(--dhx-scheduler-lightbox-color);border:var(--dhx-scheduler-lightbox-control-border);font-size:var(--dhx-scheduler);padding:6px 8px;box-sizing:border-box;margin-top:0;margin-bottom:0}.dhx_cal_light textarea:focus,.dhx_cal_light input:focus,.dhx_cal_light select:focus,.dhx_cal_light textarea:focus-visible,.dhx_cal_light input:focus-visible,.dhx_cal_light select:focus-visible{border-color:var(--dhx-scheduler-base-colors-primary);outline:none}.dhx_cal_light textarea:disabled,.dhx_cal_light input:disabled,.dhx_cal_light select:disabled{background-color:var(--dhx-scheduler-base-colors-disabled);color:var(--dhx-scheduler-base-colors-icons)}.dhx_cal_light input,.dhx_cal_light select{height:var(--dhx-scheduler-control-height)}.dhx_cal_light input[type=select],.dhx_cal_light input[type=checkbox]{height:var(--dhx-scheduler-checkbox-height)}.dhx_cal_light .dhx_time{display:none}.dhx_cal_ltitle{font-size:var(--dhx-scheduler-lightbox-title-font-size);font-weight:var(--dhx-scheduler-heading-font-weight);line-height:142%;background:var(--dhx-scheduler-lightbox-title-background);color:var(--dhx-scheduler-lightbox-title-color);border-bottom:var(--dhx-scheduler-default-border);padding:calc(var(--dhx-scheduler-base-padding) * 3) calc(var(--dhx-scheduler-base-padding) * 3);overflow:hidden;white-space:nowrap;display:flex;flex-direction:row;justify-content:space-between;gap:calc(var(--dhx-scheduler-base-padding) * 2);border-top-right-radius:var(--dhx-scheduler-popup-border-radius);border-top-left-radius:var(--dhx-scheduler-popup-border-radius)}.dhx_cal_ltitle .dhx_mark{display:none}.dhx_cal_ltitle .dhx_cal_ltitle_descr{overflow:hidden;text-overflow:ellipsis}.dhx_cal_ltitle .dhx_cal_ltitle_controls{cursor:pointer}.dhx_cal_larea{border:none;padding:0 12px 4px;height:auto;gap:calc(var(--dhx-scheduler-base-padding) * 2)}.dhx_btn_inner.dhx_delete_btn{display:block!important}.dhx_btn_inner.dhx_delete_btn:before{font-family:dhx-scheduler-icons!important;font-style:normal;font-weight:400!important;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:flex;justify-content:center;align-items:center;color:var(--dhx-scheduler-base-colors-icons)}.dhx_btn_inner.dhx_delete_btn:before{content:"";font-size:18px}.dhx_cal_light_rtl{direction:rtl}.dhx_cal_light_wide.dhx_cal_light_rtl .dhx_custom_button{right:auto;left:calc(var(--dhx-scheduler-base-padding) * 2)}.dhx_lightbox_time_select{min-width:80px}.dhx_lightbox_day_select{min-width:60px}.dhx_lightbox_month_select{min-width:110px}.dhx_lightbox_year_select{min-width:77px}.dhx_cal_light_wide .dhx_cal_larea{display:flex;flex-direction:column;padding-top:12px;gap:12px}.dhx_cal_light_wide .dhx_wrap_section{display:flex;flex:0;position:relative}.dhx_cal_light_wide .dhx_cal_lsection{width:120px;justify-content:start;align-items:start;flex-shrink:0;margin-top:0;margin-bottom:0;padding:4px 8px}.dhx_cal_light_wide .dhx_custom_button{position:absolute;left:auto;right:calc(var(--dhx-scheduler-base-padding) * 2)}.dhx_cal_light_wide .dhx_cal_ltext{flex:1}.dhx_cal_light_wide .dhx_section_time{justify-content:start}.dhx_cal_light_wide .dhx_fullday{margin-left:unset}.dhx_cal_lcontrols{display:flex;flex-direction:row-reverse;gap:calc(var(--dhx-scheduler-base-padding)*2);padding:12px}.dhx_cal_lcontrols .dhx_btn_set{display:flex;flex-direction:row;gap:var(--dhx-scheduler-base-padding)}.dhx_cal_lcontrols .dhx_btn_set.dhx_delete_btn_set{padding:6px 0;--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-base-colors-error);--dhx-scheduler-btn-background: transparent;--dhx-scheduler-btn-color: var(--dhx-scheduler-base-colors-error);--dhx-scheduler-btn-border-color: transparent;--dhx-scheduler-btn-background-hover: transparent;--dhx-scheduler-btn-color-hover: var(--dhx-scheduler-base-colors-error-hover);--dhx-scheduler-btn-border-hover: transparent;--dhx-scheduler-btn-background-active: transparent;--dhx-scheduler-btn-color-active: var(--dhx-scheduler-base-colors-error-active);--dhx-scheduler-btn-border-active: transparent;--dhx-scheduler-btn-background-disabled: transparent;--dhx-scheduler-btn-color-disabled: var(--dhx-scheduler-base-colors-icons);--dhx-scheduler-btn-border-color-disabled: transparent}.dhx_cal_lcontrols .dhx_btn_set:not(.dhx_save_btn_set,.dhx_delete_btn_set){--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-btn-color);--dhx-scheduler-btn-background: var(--dhx-scheduler-btn-outline-background);--dhx-scheduler-btn-color: var(--dhx-scheduler-btn-outline-color);--dhx-scheduler-btn-border-color: var(--dhx-scheduler-btn-outline-border-color);--dhx-scheduler-btn-background-hover: var(--dhx-scheduler-btn-outline-background-hover);--dhx-scheduler-btn-color-hover: var(--dhx-scheduler-btn-outline-color-hover);--dhx-scheduler-btn-border-hover: var(--dhx-scheduler-btn-outline-border-hover);--dhx-scheduler-btn-background-active: var(--dhx-scheduler-btn-outline-background-active);--dhx-scheduler-btn-color-active: var(--dhx-scheduler-btn-outline-color-active);--dhx-scheduler-btn-border-active: var(--dhx-scheduler-btn-outline-border-active);--dhx-scheduler-btn-background-disabled: var(--dhx-scheduler-btn-outline-background-disabled);--dhx-scheduler-btn-color-disabled: var(--dhx-scheduler-btn-outline-color-disabled);--dhx-scheduler-btn-border-color-disabled: var(--dhx-scheduler-btn-outline-border-color-disabled)}.dhx_cal_lcontrols .dhx_btn_set .dhx_btn_inner{display:none}.dhx_cal_lcontrols .dhx_cal_lcontrols_push_right{margin-left:auto}.dhx_cal_ltext textarea{width:100%;height:100%;resize:none;font-family:var(--dhx-scheduler-lightbox_font-family);font-size:var(--dhx-scheduler-lightbox-font-size);font-weight:var(--dhx-scheduler-lightbox-font-weight);line-height:142%}.dhx_section_time_spacer,.dhx_lightbox_minical_spacer{visibility:hidden;flex-basis:100%;height:0}.dhx_section_time{--dhx-scheduler-lightbox-time-font-size: var(--dhx-scheduler-important-font-size);--dhx-scheduler-lightbox-time-font-weight: var(--dhx-scheduler-important-font-weight);font-size:var(--dhx-scheduler-lightbox-time-font-size);font-weight:var(--dhx-scheduler-lightbox-time-font-weight);line-height:142%;display:flex;flex-wrap:wrap;align-items:center;gap:calc(var(--dhx-scheduler-base-padding) * 2);row-gap:var(--dhx-scheduler-base-padding)}.dhx_section_time .dhx_section_time_icon{width:calc(var(--dhx-scheduler-base-module) * 2);height:calc(var(--dhx-scheduler-base-module) * 2);border-radius:2px;background:var(--dhx-scheduler-base-colors-primary)}.dhx_fullday{margin-left:auto}.dhx_cal_light_rtl .dhx_fullday{margin-left:unset;margin-right:auto}.dhx_cal_lsection label{font-weight:var(--dhx-scheduler-heading-font-weight);display:flex;align-items:center;gap:4px}.dhx_cal_lsection{display:flex;margin-top:12px;margin-bottom:4px}.dhx_cal_lsection .dhx_custom_button{background:var(--dhx-scheduler-btn-background);color:var(--dhx-scheduler-btn-color);border:1px solid var(--dhx-scheduler-btn-border-color);border-radius:var(--dhx-scheduler-border-radius);height:var(--dhx-scheduler-control-height);padding:var(--dhx-scheduler-btn-padding, 0 20px);display:flex;justify-content:center;align-items:center;box-sizing:border-box;gap:4px;flex-shrink:0;font-weight:500;font-size:var(--dhx-scheduler-font-size);font-family:var(--dhx-scheduler-font-family);font-weight:var(--dhx-scheduler-btn-font-weight, normal);line-height:142%;text-transform:var(--dhx-scheduler-btn-text-transform);cursor:pointer;--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-btn-color);--dhx-scheduler-btn-background: var(--dhx-scheduler-btn-outline-background);--dhx-scheduler-btn-color: var(--dhx-scheduler-btn-outline-color);--dhx-scheduler-btn-border-color: var(--dhx-scheduler-btn-outline-border-color);--dhx-scheduler-btn-background-hover: var(--dhx-scheduler-btn-outline-background-hover);--dhx-scheduler-btn-color-hover: var(--dhx-scheduler-btn-outline-color-hover);--dhx-scheduler-btn-border-hover: var(--dhx-scheduler-btn-outline-border-hover);--dhx-scheduler-btn-background-active: var(--dhx-scheduler-btn-outline-background-active);--dhx-scheduler-btn-color-active: var(--dhx-scheduler-btn-outline-color-active);--dhx-scheduler-btn-border-active: var(--dhx-scheduler-btn-outline-border-active);--dhx-scheduler-btn-background-disabled: var(--dhx-scheduler-btn-outline-background-disabled);--dhx-scheduler-btn-color-disabled: var(--dhx-scheduler-btn-outline-color-disabled);--dhx-scheduler-btn-border-color-disabled: var(--dhx-scheduler-btn-outline-border-color-disabled);order:1;margin-left:auto;margin-right:unset}.dhx_cal_lsection .dhx_custom_button:hover{background:var(--dhx-scheduler-btn-background-hover);color:var(--dhx-scheduler-btn-color-hover);border-color:var(--dhx-scheduler-btn-border-hover)}.dhx_cal_lsection .dhx_custom_button:active{background:var(--dhx-scheduler-btn-background-active);color:var(--dhx-scheduler-btn-color-active);border-color:var(--dhx-scheduler-btn-border-active)}.dhx_cal_lsection .dhx_custom_button:disabled{background:var(--dhx-scheduler-btn-background-disabled);color:var(--dhx-scheduler-btn-color-disabled);border-color:var(--dhx-scheduler-btn-border-disabled)}.dhx_cal_light_rtl .dhx_custom_button{margin-left:unset;margin-right:auto}.dhx_cal_checkbox{display:flex;gap:var(--dhx-scheduler-base-padding)}.dhx_cal_wide_checkbox{padding:4px 0}.dhx_cal_radio input{margin:var(--dhx-scheduler-base-padding)}.dhx_cal_radio_item{display:flex;gap:var(--dhx-scheduler-base-padding);align-items:center}.dhx_cal_radio{display:flex;gap:4px}.dhx_cal_radio_vertical{flex-direction:column;overflow:auto;--dhx-scheduler-control-height: 20px}.dhx_multi_select_control{display:flex;gap:4px}.dhx_multi_select_control_vertical{flex-direction:column}.dhx_multi_select_control label{display:flex;align-items:center;gap:4px}.dhx_cal_template{position:relative;padding-top:4px;padding-bottom:4px}.dhx_form_repeat{overflow:hidden;flex-grow:1}.dhx_form_repeat form{display:flex;flex-direction:column;gap:12px;padding:12px}.dhx_form_repeat input,.dhx_form_repeat select{border-radius:2px;background-color:var(--dhx-scheduler-lightbox-background);color:var(--dhx-scheduler-lightbox-color);border:var(--dhx-scheduler-lightbox-control-border);font-size:var(--dhx-scheduler);padding:6px 8px;box-sizing:border-box;margin:0 4px}.dhx_form_repeat input:focus,.dhx_form_repeat select:focus,.dhx_form_repeat input:focus-visible,.dhx_form_repeat select:focus-visible{border-color:var(--dhx-scheduler-base-colors-primary);outline:none}.dhx_form_repeat input:disabled,.dhx_form_repeat select:disabled{background-color:var(--dhx-scheduler-base-colors-disabled);color:var(--dhx-scheduler-base-colors-icons)}.dhx_form_repeat label{display:inline-flex;align-items:center;vertical-align:top;gap:4px}.dhx_form_repeat #dhx_repeat_year,.dhx_form_repeat #dhx_repeat_month,.dhx_form_repeat #dhx_repeat_week,.dhx_form_repeat #dhx_repeat_day,.dhx_form_repeat .dhx_repeat_right{display:flex;flex-direction:column;gap:4px}.dhx_form_repeat #dhx_repeat_month>div,.dhx_form_repeat #dhx_repeat_week>div{display:flex;gap:8px}.dhx_repeat_left{display:flex;flex-wrap:wrap;gap:12px}.dhx_repeat_divider{background:var(--dhx-scheduler-base-colors-border);height:1px}.dhx_repeat_text{width:28px;border-radius:2px;background-color:var(--dhx-scheduler-lightbox-background);color:var(--dhx-scheduler-lightbox-color);border:var(--dhx-scheduler-lightbox-control-border);font-size:var(--dhx-scheduler);padding:6px 8px;box-sizing:border-box;margin-top:0;margin-bottom:0}.dhx_repeat_text:focus,.dhx_repeat_text:focus-visible{border-color:var(--dhx-scheduler-base-colors-primary);outline:none}.dhx_repeat_text:disabled{background-color:var(--dhx-scheduler-base-colors-disabled);color:var(--dhx-scheduler-base-colors-icons)}.dhx_repeat_date,.dhx_form_repeat select{border-radius:2px;background-color:var(--dhx-scheduler-lightbox-background);color:var(--dhx-scheduler-lightbox-color);border:var(--dhx-scheduler-lightbox-control-border);font-size:var(--dhx-scheduler);padding:6px 8px;box-sizing:border-box;margin-top:0;margin-bottom:0}.dhx_repeat_date:focus,.dhx_form_repeat select:focus,.dhx_repeat_date:focus-visible,.dhx_form_repeat select:focus-visible{border-color:var(--dhx-scheduler-base-colors-primary);outline:none}.dhx_repeat_date:disabled,.dhx_form_repeat select:disabled{background-color:var(--dhx-scheduler-base-colors-disabled);color:var(--dhx-scheduler-base-colors-icons)}.dhx_cal_light .dhx_readonly{color:var(--dhx-scheduler-base-colors-readonly)}.dhx_lightbox_minical{display:flex;gap:8px;align-items:center}.dhx_lightbox_minical .dhx_lightbox_minical_spacer{display:flex;align-items:center;justify-content:center}.dhx_lightbox_minical .dhx_minical_input{max-width:165px}.dhx_lightbox_minical .dhx_lightbox_time_select{width:95px}.dhx_form_rrule,.dhx_form_rrule .dhx_form_repeat_custom,.dhx_form_rrule .dhx_form_repeat_ends,.dhx_form_rrule .dhx_form_repeat_ends_extra{display:flex;flex-direction:column;gap:8px}.dhx_form_rrule .dhx_form_repeat_ends_options{display:flex;gap:8px}.dhx_form_rrule label{display:inline-flex;align-items:center;vertical-align:top;gap:4px}.dhx_form_rrule input[type=number]{width:80px}.dhx_form_rrule .dhx_form_repeat_custom_week{display:flex;flex-wrap:wrap;gap:8px}.dhx_scale_text_styles{font-size:var(--dhx-scheduler-caption-font-size);font-weight:var(--dhx-scheduler-caption-font-weight);color:var(--dhx-scheduler-scale-color);line-height:133%}.dhx_scale_bar{font-size:var(--dhx-scheduler-caption-font-size);font-weight:var(--dhx-scheduler-caption-font-weight);color:var(--dhx-scheduler-scale-color);line-height:133%;display:flex;box-sizing:border-box;height:100%;justify-content:center;align-items:baseline;padding:var(--dhx-scheduler-base-padding);border-left:var(--dhx-scheduler-header-border);overflow:hidden}.dhx_scale_holder{border-right:var(--dhx-scheduler-default-border);background:var(--dhx-scheduler-timescale-background);box-sizing:border-box}.dhx_scale_holder_now{--dhx-scheduler-timescale-background: var(--dhx-scheduler-timescale-today-background);position:absolute}.dhx_cal_container_rtl .dhx_scale_bar{border-left:none;border-right:var(--dhx-scheduler-header-border)}.dhx_cal_container_rtl .dhx_scale_holder{border-right:none;border-left:var(--dhx-scheduler-default-border)}.dhx_scale_hour{font-size:var(--dhx-scheduler-caption-font-size);font-weight:var(--dhx-scheduler-caption-font-weight);color:var(--dhx-scheduler-scale-color);line-height:133%;font-size:var(--dhx-scheduler-hours-font-size);font-weight:var(--dhx-scheduler-hours-font-weight);border-bottom:var(--dhx-scheduler-default-border);display:flex;flex-direction:column;align-items:center;justify-content:start;padding:var(--dhx-scheduler-base-padding);box-sizing:border-box}.dhx_scale_time_slot{box-sizing:border-box;border-bottom:var(--dhx-scheduler-default-border)}.dhx_scale_time_slot.dhx_scale_time_slot_hour_start{border-bottom:var(--dhx-scheduler-halfhour-border)}.dhx_drag_marker{width:100%;opacity:.5;background-color:var(--dhx-scheduler-base-colors-border);position:absolute;box-sizing:border-box;border-top:var(--dhx-scheduler-default-border);border-bottom:var(--dhx-scheduler-default-border)}.dhx_multi_day{position:relative;border-top:var(--dhx-scheduler-default-border)}.dhx_multi_day_icon,.dhx_multi_day_icon_small{background-position:50%;font-size:32px;border-bottom:var(--dhx-scheduler-default-border);border-right:var(--dhx-scheduler-default-border);background-repeat:no-repeat;display:flex;justify-content:center;align-items:center}.dhx_multi_day_icon:before,.dhx_multi_day_icon_small:before{font-family:dhx-scheduler-icons!important;font-style:normal;font-weight:400!important;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:flex;justify-content:center;align-items:center;color:var(--dhx-scheduler-base-colors-icons)}.dhx_multi_day_icon:before,.dhx_multi_day_icon_small:before{content:""}.dhx_multi_day_icon_small{font-size:16px}.dhx_cal_container_rtl .dhx_multi_day_icon,.dhx_cal_container_rtl .dhx_multi_day_icon_small{border-right:none;border-left:var(--dhx-scheduler-default-border)}.dhx_scheduler_event_base{background:var(--dhx-scheduler-event-background);color:var(--dhx-scheduler-event-color);display:flex;padding:2px var(--dhx-scheduler-base-module);border:var(--dhx-scheduler-event-border);position:absolute;box-sizing:border-box;font-size:var(--dhx-scheduler-event-text-font-size);line-height:var(--dhx-scheduler-event-text-line-height);font-weight:var(--dhx-scheduler-event-text-font-weight);--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-event-color)}.dhx_title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dhx_cal_event{border-radius:var(--dhx-scheduler-border-radius);flex-direction:column;background:var(--dhx-scheduler-event-background);color:var(--dhx-scheduler-event-color);display:flex;padding:2px var(--dhx-scheduler-base-module);border:var(--dhx-scheduler-event-border);position:absolute;box-sizing:border-box;font-size:var(--dhx-scheduler-event-text-font-size);line-height:var(--dhx-scheduler-event-text-line-height);font-weight:var(--dhx-scheduler-event-text-font-weight);--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-event-color)}.dhx_cal_event .dhx_title{font-size:var(--dhx-scheduler-event-title-font-size);line-height:var(--dhx-scheduler-event-title-line-height);max-height:21px}.dhx_cal_event .dhx_body{font-size:var(--dhx-scheduler-event-text-font-size);line-height:var(--dhx-scheduler-event-text-line-height);flex:1;gap:4px;overflow:hidden;text-overflow:ellipsis}.dhx_cal_event .dhx_event_move.dhx_header{display:none}.dhx_cal_event .dhx_event_resize{cursor:ns-resize}.dhx_cal_event .dhx_resize_denied{display:none!important}.dhx_cal_event .dhx_footer{position:absolute;bottom:2px;opacity:0}.dhx_cal_event .dhx_menu_icon{--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-event-text)}.dhx_cal_event .dhx_menu_icon.icon_delete{margin-left:-2px}.dhx_cal_event.dhx_cal_select_menu{padding:8px 2px;box-shadow:var(--dhx-scheduler-box-shadow-s);--dhx-scheduler-event-background: var(--dhx-scheduler-event-menu-background);--dhx-scheduler-event-color: var(--dhx-scheduler-event-menu-color)}.dhx_cal_event.dhx_cal_select_menu .dhx_body{display:flex;flex-direction:column;gap:4px;align-items:center}.dhx_cal_event textarea.dhx_cal_editor{width:100%;height:100%;padding:0;margin:0;overflow:auto;font-family:var(--dhx-scheduler-font-family);font-size:var(--dhx-scheduler-font-size)}.dhx_cal_event_cascade{--dhx-scheduler-event-border: 1px solid rgba(0, 0, 0, .05)}.dhx_cal_editor{z-index:10}.dhx_cal_event .dhx_footer,.dhx_cal_event .dhx_select_menu_footer{height:calc(var(--dhx-scheduler-base-module) * 2);border-width:0;position:relative;margin-left:auto;margin-right:auto}.dhx_cal_event .dhx_footer:before,.dhx_cal_event .dhx_select_menu_footer:before{font-family:dhx-scheduler-icons!important;font-style:normal;font-weight:400!important;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:flex;justify-content:center;align-items:center;color:var(--dhx-scheduler-base-colors-icons)}.dhx_cal_event .dhx_footer:before,.dhx_cal_event .dhx_select_menu_footer:before{content:""}.dhx_cal_event.dhx_cal_event_drag .dhx_event_resize.dhx_footer,.dhx_cal_event.dhx_cal_event_selected .dhx_event_resize.dhx_footer,.dhx_cal_event:hover .dhx_event_resize.dhx_footer{opacity:1;background-color:transparent}.dhx_cal_event_line{background:var(--dhx-scheduler-event-background);color:var(--dhx-scheduler-event-color);display:flex;padding:2px var(--dhx-scheduler-base-module);border:var(--dhx-scheduler-event-border);position:absolute;box-sizing:border-box;font-size:var(--dhx-scheduler-event-text-font-size);line-height:var(--dhx-scheduler-event-text-line-height);font-weight:var(--dhx-scheduler-event-text-font-weight);--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-event-color);--dhx-scheduler-event-text-font-size: var(--dhx-scheduler-event-bar-font-size);--dhx-scheduler-event-text-line-height: var(--dhx-scheduler-event-bar-line-height);cursor:pointer;align-items:center;z-index:1;overflow:hidden;padding-left:12px;white-space:nowrap}.dhx_cal_event_line.dhx_cal_event_line_end{border-top-right-radius:var(--dhx-scheduler-border-radius);border-bottom-right-radius:var(--dhx-scheduler-border-radius)}.dhx_cal_event_line.dhx_cal_event_line_start{border-top-left-radius:var(--dhx-scheduler-border-radius);border-bottom-left-radius:var(--dhx-scheduler-border-radius)}.dhx_cal_event_line.dhx_cal_event--small{padding-left:8px}.dhx_cal_event_line.dhx_cal_event--xsmall{padding-left:4px}.dhx_cal_container_rtl .dhx_cal_event_line{border-top-right-radius:unset;border-bottom-right-radius:unset;border-top-left-radius:unset;border-bottom-left-radius:unset}.dhx_cal_container_rtl .dhx_cal_event_line.dhx_cal_event_line_end{border-top-left-radius:var(--dhx-scheduler-border-radius);border-bottom-left-radius:var(--dhx-scheduler-border-radius)}.dhx_cal_container_rtl .dhx_cal_event_line.dhx_cal_event_line_start{border-top-right-radius:var(--dhx-scheduler-border-radius);border-bottom-right-radius:var(--dhx-scheduler-border-radius)}.dhx_cal_event.dhx_cal_event--xsmall,.dhx_cal_event.dhx_cal_event--small{flex-direction:row-reverse;justify-content:space-between;--dhx-scheduler-event-title-font-size: var(--dhx-scheduler-event-bar-font-size);--dhx-scheduler-event-title-line-height: var(--dhx-scheduler-event-bar-line-height);--dhx-scheduler-event-text-font-size: var(--dhx-scheduler-event-bar-font-size);--dhx-scheduler-event-text-line-height: var(--dhx-scheduler-event-bar-line-height);gap:4px;padding-top:2px;padding-bottom:1px}.dhx_cal_event.dhx_cal_event--xsmall .dhx_title,.dhx_cal_event.dhx_cal_event--small .dhx_title{display:flex;justify-content:end}.dhx_cal_event.dhx_cal_event--xsmall .dhx_body,.dhx_cal_event.dhx_cal_event--small .dhx_body{flex-grow:2}.dhx_cal_event.dhx_cal_event--xsmall .dhx_footer,.dhx_cal_event.dhx_cal_event--small .dhx_footer,.dhx_cal_event.dhx_cal_event--xsmall .dhx_select_menu_footer,.dhx_cal_event.dhx_cal_event--small .dhx_select_menu_footer{position:absolute;bottom:0;left:4px;width:100%;transform:translateY(50%)}.dhx_cal_month_table{overflow:hidden}.dhx_cal_month_row{display:flex}.dhx_cal_month_cell{box-sizing:border-box;background:var(--dhx-scheduler-timescale-background);border-right:var(--dhx-scheduler-default-border);border-bottom:var(--dhx-scheduler-default-border);display:flex;flex-direction:column}.dhx_cal_month_cell.dhx_now{--dhx-scheduler-timescale-background: var(--dhx-scheduler-timescale-today-background)}.dhx_month_body_border,.dhx_month_head_border{border-left:var(--dhx-scheduler-default-border)}.dhx_cal_container_rtl .dhx_cal_month_cell{border-left:var(--dhx-scheduler-default-border);border-right:none}.dhx_cal_container_rtl .dhx_month_body_border,.dhx_cal_container_rtl .dhx_month_head_border{border-left:none;border-right:var(--dhx-scheduler-default-border)}.dhx_month_head{box-sizing:border-box;display:flex;flex-shrink:0;color:var(--dhx-scheduler-month-header-color);justify-content:end;align-items:flex-start;align-self:stretch;padding:var(--dhx-scheduler-month-day-header-padding)}.dhx_month_body{flex-grow:1;padding:var(--dhx-scheduler-base-padding) calc(var(--dhx-scheduler-base-padding) * 2);box-sizing:border-box;position:relative}.dhx_before,.dhx_after{--dhx-scheduler-month-header-color: var(--dhx-scheduler-inactive-month-color)}.dhx_month_link{position:absolute;text-align:right;cursor:pointer;padding-right:10px}.dhx_month_link a:hover{text-decoration:underline}.dhx_global_tip{font-family:var(--dhx-scheduler-font-family);line-height:110%;background-color:var(--dhx-scheduler-container-background);color:var(--dhx-scheduler-container-color);text-align:center;font-size:20px;position:fixed;top:60px;right:20px;z-index:14;padding:20px 30px;width:190px;background:var(--dhx-scheduler-popup-background);color:var(--dhx-scheduler-popup-color);border:var(--dhx-scheduler-popup-border);box-shadow:var(--dhx-scheduler-box-shadow-m)}@media (-moz-touch-enabled){.dhx_cal_container{-webkit-user-select:none;user-select:none;-moz-user-select:none}}.dhx_cal_event_clear{box-sizing:border-box;padding:var(--dhx-scheduler-base-padding) calc(var(--dhx-scheduler-base-padding) * 2);font-size:var(--dhx-scheduler-caption-font-size);font-weight:var(--dhx-scheduler-caption-font-weight);display:flex;justify-content:start;align-items:center;gap:var(--dhx-scheduler-base-padding);cursor:pointer;flex-wrap:nowrap;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dhx_cal_event_clear_date{font-weight:700}.dhx_cal_event_line_content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dhx_cal_event_marker{display:block;flex-shrink:0;border-radius:var(--dhx-scheduler-month-event-marker-size);width:var(--dhx-scheduler-month-event-marker-size);height:var(--dhx-scheduler-month-event-marker-size);background:var(--dhx-scheduler-event-background);margin-top:-1px}.dhx_cal_event_clear:before{content:"";display:block;flex-shrink:0;border-radius:var(--dhx-scheduler-month-event-marker-size);width:var(--dhx-scheduler-month-event-marker-size);height:var(--dhx-scheduler-month-event-marker-size);background:var(--dhx-scheduler-event-background);margin-top:-1px}.dhx_cal_event_line .dhx_event_resize{cursor:ew-resize;position:absolute;top:0;height:100%;display:none;justify-content:center;align-items:center}.dhx_cal_event_line .dhx_event_resize:before{font-family:dhx-scheduler-icons!important;font-style:normal;font-weight:400!important;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:flex;justify-content:center;align-items:center;color:var(--dhx-scheduler-base-colors-icons)}.dhx_cal_event_line .dhx_event_resize:before{content:""}.dhx_cal_event_line:hover .dhx_event_resize{display:flex}.dhx_event_resize_end{right:0}.dhx_event_resize_start{left:0}.dhx_cal_container_rtl .dhx_event_resize_start{left:auto;left:unset;right:0}.dhx_cal_container_rtl .dhx_event_resize_end{right:auto;right:unset;left:0}.dhx_cal_quick_info{--dhx-scheduler-quick-info-font-size: var(--dhx-regular-font-size);position:absolute;z-index:8;font-size:var(--dhx-scheduler-quick-info-font-size);background:var(--dhx-scheduler-popup-background);color:var(--dhx-scheduler-popup-color);border:var(--dhx-scheduler-popup-border);padding:calc(var(--dhx-scheduler-base-padding)*2) calc(var(--dhx-scheduler-base-padding)*3);border-radius:var(--dhx-scheduler-border-radius);width:300px;display:flex;flex-direction:column;box-shadow:var(--dhx-scheduler-box-shadow-s);transition:left .5s ease,right .5s ease}.dhx_cal_qi_tcontrols{display:flex;justify-content:end;height:8px}.dhx_cal_qi_tcontrols .dhx_cal_qi_close_btn{min-width:32px;height:32px;border-radius:50%;--dhx-scheduler-btn-background: transparent;--dhx-scheduler-btn-color: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-btn-border-color: transparent;--dhx-scheduler-btn-background-hover: transparent;--dhx-scheduler-btn-color-hover: var(--dhx-scheduler-base-colors-primary-hover);--dhx-scheduler-btn-border-hover: transparent;--dhx-scheduler-btn-background-active: transparent;--dhx-scheduler-btn-color-active: var(--dhx-scheduler-base-colors-primary-active);--dhx-scheduler-btn-border-active: transparent;--dhx-scheduler-btn-background-disabled: transparent;--dhx-scheduler-btn-color-disabled: var(--dhx-scheduler-base-colors-icons);--dhx-scheduler-btn-border-color-disabled: transparent;width:unset;min-width:unset;padding:2px;font-size:18px;cursor:pointer;height:20px;position:relative;z-index:1}.dhx_cal_qi_tcontrols .dhx_cal_qi_close_btn:hover{--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-base-colors-icons-hover)}.dhx_cal_qi_tcontrols .dhx_cal_qi_close_btn:active{--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-base-colors-icons-active)}.dhx_cal_qi_tcontrols .dhx_cal_qi_close_btn:disabled{--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-btn-color-disabled)}.dhx_cal_qi_title,.dhx_cal_qi_controls,.dhx_cal_qi_content{padding:0 calc(var(--dhx-scheduler-base-padding) * 3)}.dhx_cal_qi_title{display:flex;flex-direction:column;gap:12px;padding-right:14px}.dhx_cal_qi_tcontent{font-size:var(--dhx-scheduler-heading-font-size);font-weight:var(--dhx-scheduler-heading-font-weight);line-height:150%;position:relative;display:flex;flex-direction:row;justify-content:start;align-items:center;gap:8px;overflow:hidden;flex-grow:0;text-overflow:ellipsis;white-space:nowrap}.dhx_cal_qi_tcontent>span{text-overflow:ellipsis;overflow:hidden}.dhx_cal_qi_tcontent:before{display:var(--dhx-scheduler-quick-info-dot-display, block);content:"";flex-shrink:0;width:var(--dhx-scheduler-month-event-marker-size);height:var(--dhx-scheduler-month-event-marker-size);border-radius:2px;background:var(--dhx-scheduler-base-colors-primary)}.dhx_cal_qi_tdate{font-size:var(--dhx-scheduler-important-font-size);font-weight:var(--dhx-scheduler-important-font-weight);line-height:var(--dhx-scheduler-important-line-height)}.dhx_cal_qi_content{padding-top:16px;padding-bottom:8px}.dhx_cal_qi_controls{display:flex;flex-direction:row;justify-content:start;align-items:center;padding-top:8px;gap:12px;color:var(--dhx-scheduler-base-colors-primary)}.dhx_cal_qi_controls>div:first-child{margin-left:-3px}.dhx_menu_icon{width:20px;height:20px;display:flex;align-items:center;justify-content:center;--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-btn-color)}.dhx_scheduler_year .dhx_cal_header{display:none}.dhx_scheduler_year .dhx_cal_data{padding:40px}.dhx_year_wrapper{display:flex;gap:40px;padding:12px;justify-content:center;align-items:baseline;flex-wrap:wrap}.dhx_year_box{--dhx-scheduler-month-day-header-padding: 8px 12px}.dhx_year_box .dhx_scale_bar{position:relative;width:var(--dhx-scheduler-datepicker-cell-size)}.dhx_year_box .dhx_month_head{position:relative}.dhx_year_box .dhx_month_head.dhx_year_event:after{content:"";width:4px;height:4px;border-radius:50%;position:absolute;bottom:2px;left:50%;transform:translate(-50%);background:var(--dhx-scheduler-event-marker-color)}.dhx_year_box .dhx_month_body{display:none}.dhx_year_month{text-align:center;padding:12px 0}.dhx_year_week{display:flex}.dhx_year_tooltip{position:absolute;padding:12px;font-family:var(--dhx-scheduler-font-family);font-size:var(--dhx-scheduler-event-title-font-size);background:var(--dhx-scheduler-popup-background);border-radius:var(--dhx-scheduler-popup-border-radius);border:var(--dhx-scheduler-popup-border);color:var(--dhx-scheduler-popup-color);box-shadow:var(--dhx-scheduler-box-shadow-m);display:flex;flex-direction:column;width:300px;gap:4px}.dhx_tooltip_line{border-radius:var(--dhx-scheduler-border-radius);background:var(--dhx-scheduler-event-background);color:var(--dhx-scheduler-event-color);padding:4px;display:flex;cursor:pointer}.dhx_tooltip_rtl{direction:rtl}.dhx_timeline_scale_header{position:absolute;overflow:hidden;background-color:var(--dhx-scheduler-container-background);display:flex;justify-content:center;align-items:center;border-right:var(--dhx-scheduler-header-border);border-top:var(--dhx-scheduler-header-border)}.dhx_cal_container_rtl .dhx_timeline_scale_header{border-right:unset;border-left:var(--dhx-scheduler-header-border)}.dhx_timeline_label_wrapper{z-index:1}.dhx_timeline_label_col{position:relative}.dhx_timeline_label_row{position:absolute;left:0}.dhx_matrix_scell{overflow:hidden;text-align:center;border-bottom:var(--dhx-scheduler-default-border);border-right:var(--dhx-scheduler-default-border);color:var(--dhx-scheduler-scale-color)}.dhx_timeline_data_wrapper{position:absolute;z-index:0;left:0;top:0;width:100%}.dhx_matrix_cell,.dhx_matrix_scell{overflow:hidden;text-align:center;vertical-align:middle;border-bottom:var(--dhx-scheduler-default-border);border-right:var(--dhx-scheduler-default-border);font-weight:500}.dhx_cal_container_rtl .dhx_matrix_cell,.dhx_cal_container_rtl .dhx_matrix_scell{border-right:none;border-left:var(--dhx-scheduler-default-border)}.dhx_matrix_cell div,.dhx_matrix_scell div{overflow:hidden;text-align:center;height:auto}.dhx_timeline_data_cell{position:absolute;top:0;height:100%}.dhx_timeline_label_wrapper{position:absolute;overflow:hidden;background:var(--dhx-scheduler-container-background)}.dhx_matrix_scell.folder,.dhx_data_table.folder .dhx_matrix_cell{background-color:var(--dhx-scheduler-timeline-folder-background);cursor:pointer}.dhx_matrix_scell .dhx_scell_level0{padding-left:4px}.dhx_matrix_scell .dhx_scell_level1{padding-left:20px}.dhx_matrix_scell .dhx_scell_level2{padding-left:32px}.dhx_matrix_scell .dhx_scell_level3{padding-left:48px}.dhx_matrix_scell .dhx_scell_level4{padding-left:64px}.dhx_matrix_scell.folder{border-right-color:transparent;font-weight:700;text-align:left}.dhx_cal_container_rtl .dhx_matrix_scell.folder{border-right:var(--dhx-scheduler-default-border);border-left-color:transparent}.dhx_matrix_line{overflow:hidden}.dhx_matrix_scell.folder .dhx_scell_expand:before{font-family:dhx-scheduler-icons!important;font-style:normal;font-weight:400!important;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:flex;justify-content:center;align-items:center;color:var(--dhx-scheduler-base-colors-icons)}.dhx_matrix_scell.folder .dhx_scell_expand:before{content:"";font-size:24px}.dhx_matrix_scell.folder.closed .dhx_scell_expand{transform:rotate(-90deg)}.dhx_matrix_scell.folder,.dhx_timeline_label_row.dhx_row_folder{overflow:visible}.dhx_matrix_scell.folder>div{display:flex;align-items:center;height:inherit}.dhx_matrix_scell.folder .dhx_scell_expand{position:relative;flex-shrink:0}.dhx_matrix_scell.folder .dhx_scell_name{width:auto;color:var(--dhx-scheduler-timeline-folder-color);text-transform:uppercase;font-weight:500;max-height:100%}.dhx_matrix_scell.item .dhx_scell_name{padding-left:16px;text-align:left}.dhx_cal_container_rtl .dhx_matrix_scell .dhx_scell_level0{padding-left:0;padding-right:4px}.dhx_cal_container_rtl .dhx_matrix_scell .dhx_scell_level1{padding-left:0;padding-right:20px}.dhx_cal_container_rtl .dhx_matrix_scell .dhx_scell_level2{padding-left:0;padding-right:32px}.dhx_cal_container_rtl .dhx_matrix_scell .dhx_scell_level3{padding-left:0;padding-right:48px}.dhx_cal_container_rtl .dhx_matrix_scell .dhx_scell_level4{padding-left:0;padding-right:63px}.dhx_cal_container_rtl .dhx_matrix_scell.folder .dhx_scell_expand{padding-right:0;padding-left:4px}.dhx_cal_container_rtl .dhx_matrix_scell.item .dhx_scell_name{padding-left:0;padding-right:12px;text-align:right}.dhx_matrix_scell.dhx_matrix_scell_columns,.dhx_timeline_scale_header{display:flex;justify-content:center;align-items:center}.dhx_matrix_scell_columns.dhx_treetimeline .dhx_scell_name{display:flex}.dhx_matrix_scell_columns.dhx_treetimeline .dhx_scell_level{flex-shrink:0}.dhx_matrix_scell_columns.dhx_treetimeline .dhx_timeline_label_column_first{flex-shrink:1;border-left-color:transparent}.dhx_second_scale_bar{border-bottom:var(--dhx-scheduler-header-border)}div.dhx_timeline_label_column,div.dhx_timeline_label_column_header{display:flex;justify-content:center;align-items:center;box-sizing:border-box;flex-grow:0;flex-shrink:0;height:100%;white-space:nowrap}div.dhx_timeline_label_column .dhx_timeline_label_content_wrapper,div.dhx_timeline_label_column_header .dhx_timeline_label_content_wrapper{display:inline-block;text-align:left}.dhx_timeline_label_column{border-left:var(--dhx-scheduler-header-border)}.dhx_timeline_label_column_header{border-left-color:transparent}.dhx_timeline_label_column:first-child{border-left:0}.dhx_cal_container_rtl .dhx_timeline_label_column{border-left:none;border-right:var(--dhx-scheduler-header-border)}.dhx_cal_container_rtl .dhx_timeline_label_column_header{border-right-color:transparent}.dhx_cal_container_rtl .dhx_timeline_label_column:first-child{border-right:0}.dhx_scheduler_map .dhx_cal_header,.dhx_scheduler_agenda .dhx_cal_header{height:auto}.dhx_agenda_line_header{clear:both;overflow:hidden}.dhx_agenda_line,.dhx_map_line{height:var(--dhx-scheduler-list-line-height);line-height:var(--dhx-scheduler-list-line-height);overflow:hidden;display:flex}.dhx_agenda_line .dhx_agenda_event_time,.dhx_map_line .dhx_agenda_event_time,.dhx_agenda_line .dhx_map_event_time,.dhx_map_line .dhx_map_event_time{flex-shrink:0;width:188px;text-align:center;border-right:var(--dhx-scheduler-default-border)}.dhx_agenda_line .dhx_event_icon,.dhx_map_line .dhx_event_icon{height:33px;width:33px;display:flex;align-items:center;justify-content:center}.dhx_agenda_line .dhx_event_icon path,.dhx_map_line .dhx_event_icon path{fill:var(--dhx-scheduler-base-colors-primary)}.dhx_agenda_line>div:first-child,.dhx_map_line>div:first-child{width:var(--dhx-scheduler-agenda-date-column-width);text-align:center}.dhx_agenda_line:nth-child(2n),.dhx_map_line:nth-child(2n){background:var(--dhx-scheduler-base-colors-select)}.dhx_map_area{height:100%}.dhx_map_head{display:flex;height:100%}.dhx_map_head>div{display:flex;justify-content:center;align-items:center;padding:0 var(--dhx-scheduler-base-padding)}.dhx_v_border{position:absolute;height:100%;border-left:var(--dhx-scheduler-default-border);top:0}.dhx_week_agenda_wrapper{width:100%;height:100%;display:flex}.dhx_wa_column{flex:1;display:flex;flex-direction:column;border-right:var(--dhx-scheduler-default-border)}.dhx_wa_day_cont{flex-grow:0;flex-shrink:0;flex-basis:calc(100% / 3);display:flex;flex-direction:column;overflow-y:auto}.dhx_wa_column:last-child .dhx_wa_day_cont:nth-last-child(1),.dhx_wa_column:last-child .dhx_wa_day_cont:nth-last-child(2){flex-shrink:1}.dhx_wa_scale_bar{--dhx-scheduler-week-agenda-scale-height: 35px;--dhx-scheduler-week-agenda-scale-font-size: var(--dhx-scheduler-important-font-size);--dhx-scheduler-week-agenda-scale-font-weight: var(--dhx-scheduler-heading-font-weight);font-size:var(--dhx-scheduler-week-agenda-scale-font-size);font-weight:var(--dhx-scheduler-week-agenda-scale-font-weight);height:var(--dhx-scheduler-week-agenda-scale-height);line-height:var(--dhx-scheduler-week-agenda-scale-height);flex:0;background:var(--dhx-scheduler-base-colors-select);border-top:var(--dhx-scheduler-default-border);border-bottom:var(--dhx-scheduler-default-border);padding:4px;display:flex;align-items:center}.dhx_wa_day_data{flex:1;overflow:auto}.dhx_wa_ev_body{border-bottom:var(--dhx-scheduler-default-border);padding:4px}.dhx_wa_ev_body_rtl{direction:rtl}.dhx_wa_dnd{font-family:var(--dhx-scheduler-font-family);position:absolute;color:#000a;background-color:#faea27;border:1px solid #00000033;min-width:300px}.dhx_wa_ev_body.dhx_cal_event_selected{background-color:var(--dhx-scheduler-base-colors-select)}.dhx_grid_event{height:var(--dhx-scheduler-list-line-height);line-height:var(--dhx-scheduler-list-line-height);background:var(--dhx-scheduler-grid-event-background);color:var(--dhx-scheduler-grid-event-text)}.dhx_grid_event:nth-child(2n){--dhx-scheduler-grid-event-background: var(--dhx-scheduler-base-colors-select)}.dhx_grid_event.dhx_grid_event_selected{--dhx-scheduler-grid-event-background: var(--dhx-scheduler-base-colors-icons)}.dhx_grid_area td,.dhx_grid_line>div{padding-left:8px;padding-right:8px}.dhx_grid_line>div{text-align:center}.dhx_grid_area>table{border-collapse:collapse;width:100%;table-layout:fixed}.dhx_grid_area td{table-layout:fixed;text-align:center;height:var(--dhx-scheduler-list-line-height);line-height:var(--dhx-scheduler-list-line-height)}.dhx_cal_header>.dhx_grid_line{display:flex}.dhx_grid_v_border{position:absolute;border-right:var(--dhx-scheduler-default-border);width:1px;height:100%}.dhx_grid_view_sort{position:absolute;top:5px;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:10px solid var(--dhx-scheduler-base-colors-text-light)}.dhx_grid_sort_asc .dhx_grid_view_sort{border-top:none;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:10px solid var(--dhx-scheduler-base-colors-text-light)}.dhx_scheduler_agenda .dhx_cal_header{display:none}.dhx_cal_agenda_day{--dhx-scheduler-agenda-date-width: 110px;--dhx-scheduler-agenda-event-date-width: 120px;display:flex;flex-direction:row;flex-wrap:nowrap;border-bottom:var(--dhx-scheduler-default-border)}.dhx_cal_agenda_day_header{padding:8px 12px;display:flex;flex-direction:column;gap:8px;flex-grow:0;flex-shrink:0;width:var(--dhx-scheduler-agenda-date-width);border-right:var(--dhx-scheduler-default-border)}.dhx_cal_agenda_day_events{padding:8px 12px;flex:1}.dhx_agenda_day_date{font-weight:500}.dhx_cal_agenda_event_line{display:flex;align-items:center;justify-content:start;gap:16px;padding:calc(var(--dhx-scheduler-base-padding)*2)}.dhx_cal_agenda_event_line_selected{background-color:var(--dhx-scheduler-base-colors-select)}.dhx_cal_agenda_event_line_marker{display:block;flex-shrink:0;border-radius:var(--dhx-scheduler-month-event-marker-size);width:var(--dhx-scheduler-month-event-marker-size);height:var(--dhx-scheduler-month-event-marker-size);background:var(--dhx-scheduler-event-background);margin-top:-1px}.dhx_cal_agenda_event_line_time{font-weight:500;min-width:var(--dhx-scheduler-agenda-event-date-width);text-align:center}.dhx_cal_agenda_no_events{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.dhx_cal_datepicker{font-size:var(--dhx-scheduler-datepicker-font-size);font-family:var(--dhx-scheduler-datepicker-family);line-height:142%;font-weight:400;border:var(--dhx-scheduler-popup-border);background:var(--dhx-scheduler-popup-background);color:var(--dhx-scheduler-popup-color);box-shadow:var(--dhx-scheduler-box-shadow-s);border-radius:var(--dhx-scheduler-popup-border-radius);padding:16px}.dhx_cal_datepicker,.dhx_cal_datepicker *,.dhx_mini_calendar,.dhx_mini_calendar *{box-sizing:border-box}.dhx_cal_datepicker_arrow{border:none;background:none;cursor:pointer}.dhx_cal_datepicker_arrow:focus{outline:none}.dhx_cal_datepicker_data,.dhx_year_grid{display:flex;flex-direction:column;justify-content:space-between;height:100%;padding:var(--dhx-scheduler-datepicker-padding);gap:8px;color:var(--dhx-scheduler-month-header-color)}.dhx_cal_datepicker_done{display:flex;justify-content:center;align-items:center}.dhx_cal_datepicker_header{color:var(--dhx-scheduler-base-colors-primary);display:flex;justify-content:space-between;align-items:center;padding:var(--dhx-scheduler-datepicker-padding)}.dhx_cal_datepicker_title{font-weight:var(--dhx-scheduler-datepicker-header-font-size);font-size:var(--dhx-scheduler-datepicker-header-font-size);background:var(--dhx-scheduler-btn-background);color:var(--dhx-scheduler-btn-color);border:1px solid var(--dhx-scheduler-btn-border-color);border-radius:var(--dhx-scheduler-border-radius);height:var(--dhx-scheduler-control-height);padding:var(--dhx-scheduler-btn-padding, 0 20px);display:flex;justify-content:center;align-items:center;box-sizing:border-box;gap:4px;flex-shrink:0;font-weight:500;font-size:var(--dhx-scheduler-font-size);font-family:var(--dhx-scheduler-font-family);font-weight:var(--dhx-scheduler-btn-font-weight, normal);line-height:142%;text-transform:var(--dhx-scheduler-btn-text-transform);cursor:pointer;padding:6px 0;--dhx-scheduler-btn-background: transparent;--dhx-scheduler-btn-color: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-btn-border-color: transparent;--dhx-scheduler-btn-background-hover: transparent;--dhx-scheduler-btn-color-hover: var(--dhx-scheduler-base-colors-primary-hover);--dhx-scheduler-btn-border-hover: transparent;--dhx-scheduler-btn-background-active: transparent;--dhx-scheduler-btn-color-active: var(--dhx-scheduler-base-colors-primary-active);--dhx-scheduler-btn-border-active: transparent;--dhx-scheduler-btn-background-disabled: transparent;--dhx-scheduler-btn-color-disabled: var(--dhx-scheduler-base-colors-icons);--dhx-scheduler-btn-border-color-disabled: transparent}.dhx_cal_datepicker_title:hover{background:var(--dhx-scheduler-btn-background-hover);color:var(--dhx-scheduler-btn-color-hover);border-color:var(--dhx-scheduler-btn-border-hover)}.dhx_cal_datepicker_title:active{background:var(--dhx-scheduler-btn-background-active);color:var(--dhx-scheduler-btn-color-active);border-color:var(--dhx-scheduler-btn-border-active)}.dhx_cal_datepicker_title:disabled{background:var(--dhx-scheduler-btn-background-disabled);color:var(--dhx-scheduler-btn-color-disabled);border-color:var(--dhx-scheduler-btn-border-disabled)}.dhx_cal_datepicker_days{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}.dhx_cal_datepicker_dayname,.dhx_cal_datepicker_date{display:flex;align-items:center;justify-content:center;position:relative;transition:all .3s;margin-left:auto;margin-right:auto}.dhx_cal_datepicker_dayname{color:var(--dhx-scheduler-base-colors-icons)}.dhx_cal_datepicker_date{border-radius:50%;width:var(--dhx-scheduler-datepicker-cell-size);height:var(--dhx-scheduler-datepicker-cell-size);color:var(--dhx-scheduler-datepicker-cell-color);background:var(--dhx-scheduler-datepicker-cell-background)}.dhx_cal_datepicker_date.dhx_now{--dhx-scheduler-datepicker-cell-background: var(--dhx-scheduler-timescale-today-background)}.dhx_cal_datepicker_weekend{--dhx-scheduler-datepicker-cell-color: var(--dhx-scheduler-datepicker-weekend-color);--dhx-scheduler-datepicker-cell-background: var(--dhx-scheduler-datepicker-weekend-background)}.dhx_cal_datepicker_date.dhx_before,.dhx_cal_datepicker_date.dhx_after{--dhx-scheduler-datepicker-cell-color: var(--dhx-scheduler-datepicker-prevnext-color);--dhx-scheduler-datepicker-cell-background: var(--dhx-scheduler-datepicker-prevnext-background)}.dhx_cal_datepicker_current{--dhx-scheduler-datepicker-cell-color: var(--dhx-scheduler-datepicker-today-color);--dhx-scheduler-datepicker-cell-background: var(--dhx-scheduler-datepicker-today-background)}.dhx_cal_datepicker_date:not(.dhx_before,.dhx_after):hover,.dhx_cal_datepicker_month:hover,.dhx_cal_datepicker_year:hover{--dhx-scheduler-datepicker-cell-color: var(--dhx-scheduler-datepicker-hover-color);--dhx-scheduler-datepicker-cell-background: var(--dhx-scheduler-datepicker-hover-background)}.dhx_cal_datepicker_months,.dhx_cal_datepicker_years{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.dhx_cal_datepicker_months{column-gap:12px}.dhx_cal_datepicker_years{column-gap:4px}.dhx_cal_datepicker_month,.dhx_cal_datepicker_year{display:flex;align-items:center;justify-content:center;height:var(--dhx-scheduler-datepicker-cell-size);border-radius:10px;padding:4px 8px;transition:background .3s;position:relative;color:var(--dhx-scheduler-datepicker-cell-color);background:var(--dhx-scheduler-datepicker-cell-background)}.dhx_cal_datepicker_done_btn{background:var(--dhx-scheduler-btn-background);color:var(--dhx-scheduler-btn-color);border:1px solid var(--dhx-scheduler-btn-border-color);border-radius:var(--dhx-scheduler-border-radius);height:var(--dhx-scheduler-control-height);padding:var(--dhx-scheduler-btn-padding, 0 20px);display:flex;justify-content:center;align-items:center;box-sizing:border-box;gap:4px;flex-shrink:0;font-weight:500;font-size:var(--dhx-scheduler-font-size);font-family:var(--dhx-scheduler-font-family);font-weight:var(--dhx-scheduler-btn-font-weight, normal);line-height:142%;text-transform:var(--dhx-scheduler-btn-text-transform);cursor:pointer;padding:6px 0;--dhx-scheduler-btn-background: transparent;--dhx-scheduler-btn-color: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-btn-border-color: transparent;--dhx-scheduler-btn-background-hover: transparent;--dhx-scheduler-btn-color-hover: var(--dhx-scheduler-base-colors-primary-hover);--dhx-scheduler-btn-border-hover: transparent;--dhx-scheduler-btn-background-active: transparent;--dhx-scheduler-btn-color-active: var(--dhx-scheduler-base-colors-primary-active);--dhx-scheduler-btn-border-active: transparent;--dhx-scheduler-btn-background-disabled: transparent;--dhx-scheduler-btn-color-disabled: var(--dhx-scheduler-base-colors-icons);--dhx-scheduler-btn-border-color-disabled: transparent}.dhx_cal_datepicker_done_btn:hover{background:var(--dhx-scheduler-btn-background-hover);color:var(--dhx-scheduler-btn-color-hover);border-color:var(--dhx-scheduler-btn-border-hover)}.dhx_cal_datepicker_done_btn:active{background:var(--dhx-scheduler-btn-background-active);color:var(--dhx-scheduler-btn-color-active);border-color:var(--dhx-scheduler-btn-border-active)}.dhx_cal_datepicker_done_btn:disabled{background:var(--dhx-scheduler-btn-background-disabled);color:var(--dhx-scheduler-btn-color-disabled);border-color:var(--dhx-scheduler-btn-border-disabled)}.dhx_datepicker_date_wrapper{position:relative}.dhx_datepicker_date_wrapper:before{font-family:dhx-scheduler-icons!important;font-style:normal;font-weight:400!important;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:flex;justify-content:center;align-items:center;color:var(--dhx-scheduler-base-colors-icons)}.dhx_datepicker_date_wrapper:before{content:""}.dhx_datepicker_date_wrapper:before{position:absolute;right:4px;top:8px;font-size:20px}.dhx_cal_datepicker_event.dhx_cal_datepicker_current,.dhx_cal_datepicker_event:hover{--dhx-scheduler-event-marker-color: var(--dhx-scheduler-datepicker-hover-color)}.dhx_cal_datepicker_event:after{content:"";width:4px;height:4px;border-radius:50%;position:absolute;bottom:2px;left:50%;transform:translate(-50%);background:var(--dhx-scheduler-event-marker-color)}.dhx_minical_popup{position:absolute;z-index:15}.dhx_mini_calendar{font-size:var(--dhx-scheduler-datepicker-font-size);font-family:var(--dhx-scheduler-datepicker-family);line-height:142%;font-weight:400;border:var(--dhx-scheduler-popup-border);background:var(--dhx-scheduler-popup-background);color:var(--dhx-scheduler-popup-color);box-shadow:var(--dhx-scheduler-box-shadow-m);border-radius:var(--dhx-scheduler-popup-border-radius);--dhx-scheduler-datepicker-font-size: var(--dhx-scheduler-caption-font-size);--dhx-scheduler-header-border: none}.dhx_mini_calendar .dhx_cal_month_row{height:35px!important}.dhx_mini_calendar .dhx_year_week{border-bottom:var(--dhx-scheduler-default-border)}.dhx_mini_calendar .dhx_scale_bar{position:static}.dhx_mini_calendar .dhx_year_month{font-weight:500;font-size:var(--dhx-scheduler-font-size)}.dhx_mini_calendar .dhx_month_body{display:none}.dhx_mini_calendar .dhx_cal_month_cell{display:flex;justify-content:center;align-items:center;border-radius:50%;border:none;background:var(--dhx-scheduler-popup-background)}.dhx_mini_calendar .dhx_month_head{border-radius:50%;color:var(--dhx-scheduler-datepicker-cell-color);background:var(--dhx-scheduler-datepicker-cell-background);width:30px!important;height:30px!important;padding:4px;justify-content:center;align-items:center;cursor:pointer}.dhx_mini_calendar div.dhx_month_head.dhx_year_event{background-color:#0288d133;color:#0288d1;font-weight:500}.dhx_mini_calendar div.dhx_month_head.dhx_calendar_click{background-color:#e5e5e5;color:#000000bf;font-weight:500}.dhx_mini_calendar .dhx_now .dhx_month_head{background-color:#f7f7f7}.dhx_mini_calendar .dhx_after .dhx_month_head,.dhx_mini_calendar .dhx_before .dhx_month_head{--dhx-scheduler-datepicker-cell-color: var(--dhx-scheduler-inactive-month-color)}.dhx_minical_input_wrapper{position:relative}.dhx_minical_input_wrapper:before{font-family:dhx-scheduler-icons!important;font-style:normal;font-weight:400!important;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:flex;justify-content:center;align-items:center;color:var(--dhx-scheduler-base-colors-icons)}.dhx_minical_input_wrapper:before{content:""}.dhx_minical_input_wrapper:before{pointer-events:none;position:absolute;right:5px;top:7px;font-size:20px}.scheduler_message_area{position:fixed;right:5px;width:250px;z-index:11}.scheduler-info{min-width:120px;padding:12px;font-family:var(--dhx-scheduler-font-family);font-size:var(--dhx-scheduler-regular-font-size);font-weight:var(--dhx-scheduler-regular-font-weight);line-height:var(--dhx-scheduler-regular-line-height);z-index:14;overflow:hidden;margin:5px 5px 10px;transition:all .5s ease;background:var(--dhx-scheduler-info-background);color:var(--dhx-scheduler-info-color);border:var(--dhx-scheduler-info-border);box-shadow:var(--dhx-scheduler-info-shadow)}.scheduler-info.hidden{height:0px;padding:0;border-width:0px;margin:0;overflow:hidden}.scheduler_modal_box{overflow:hidden;position:fixed;min-width:300px;width:var(--dhx-scheduler-modal-width);background:var(--dhx-scheduler-modal-background);box-shadow:var(--dhx-scheduler-box-shadow-l);border:var(--dhx-scheduler-modal-border);z-index:18;border-radius:var(--dhx-scheduler-modal-border-radius);font-family:var(--dhx-scheduler-font-family);font-size:var(--dhx-scheduler-font-size);line-height:150%}.scheduler_popup_text{color:var(--dhx-scheduler-base-colors-text-base)}.scheduler_popup_title{border-top-left-radius:var(--dhx-scheduler-modal-border-radius);border-top-right-radius:var(--dhx-scheduler-modal-border-radius);text-transform:uppercase;font-weight:var(--dhx-scheduler-heading-font-weight);padding:calc(var(--dhx-scheduler-modal-padding)/2) var(--dhx-scheduler-modal-padding);display:flex;justify-content:center;align-items:center}.scheduler_popup_text{padding:var(--dhx-scheduler-modal-padding);display:flex;justify-content:center;align-items:center}.scheduler_popup_controls{display:flex;flex-direction:row-reverse;padding:calc(var(--dhx-scheduler-modal-padding)/2) var(--dhx-scheduler-modal-padding);align-items:center;gap:12px}.scheduler-info,.scheduler_popup_button,.scheduler_button{-webkit-user-select:none;user-select:none;cursor:pointer}.scheduler_popup_text{overflow:hidden}div.dhx_modal_cover{background:#44494E;opacity:.2;position:fixed;z-index:17;left:0;top:0;width:100%;height:100%;border:none}.scheduler_popup_controls{border-radius:var(--dhx-scheduler-border-radius)}.scheduler_message_area .scheduler-error{--dhx-scheduler-info-background: var(--dhx-scheduler-base-colors-error);--dhx-scheduler-info-color: var(--dhx-scheduler-base-colors-white)}.scheduler_message_area .scheduler-warning{--dhx-scheduler-info-background: var(--dhx-scheduler-base-colors-warning)}.scheduler_modal_box.scheduler-error .scheduler_popup_title{background:#d81b1b;border:1px solid #ff3c3c;color:#fff}.scheduler_modal_box.scheduler-error .scheduler_popup_title{background:#FFAB00;border:1px solid #FFAB00}.dhtmlXTooltip.tooltip{box-shadow:var(--dhx-scheduler-box-shadow-m);background-color:var(--dhx-scheduler-popup-background);color:var(--dhx-scheduler-popup-color);border:var(--dhx-scheduler-popup-border);cursor:default;padding:12px;position:fixed;z-index:9;opacity:1;font-family:var(--dhx-scheduler-font-family);font-size:var(--dhx-scheduler-regular-font-size);line-height:var(--dhx-scheduler-regular-line-height);font-weight:var(--dhx-scheduler-regular-font-weight)}.dhtmlXTooltip_rtl{direction:rtl}.dhx_focus_slot{background:var(--dhx-scheduler-base-colors-select);position:absolute;pointer-events:none;opacity:.5}.dhx_cal_container *:focus{outline-style:solid;outline-style:auto;outline-color:var(--dhx-scheduler-base-colors-select)}.dhx_no_select{-webkit-user-select:none;user-select:none}.dhx_drag_placeholder{z-index:10;opacity:.8}.dhx_drag_placeholder .dhx_cal_select_menu{display:none}.dhx_cal_light_readonly .dhx_section_time{display:block}.dhx_cal_light_readonly .dhx_section_time .dhx_section_time_spacer{visibility:visible}.dhx_cal_light_readonly .dhx_cal_lsection+div{padding-top:4px;padding-bottom:4px}.scheduler-info.scheduler-popup_after_delete{cursor:default;border-radius:var(--dhx-scheduler-border-radius);padding:0;width:225px;--dhx-scheduler-info-background: var(--dhx-scheduler-undo-delete-background);--dhx-scheduler-info-color: var(--dhx-scheduler-undo-delete-color)}.dhx_info_message{display:flex;justify-content:space-between;align-items:center;padding:8px 12px}.undo_popup_text{text-align:center}.undo_button{background:var(--dhx-scheduler-btn-background);color:var(--dhx-scheduler-btn-color);border:1px solid var(--dhx-scheduler-btn-border-color);border-radius:var(--dhx-scheduler-border-radius);height:var(--dhx-scheduler-control-height);padding:var(--dhx-scheduler-btn-padding, 0 20px);display:flex;justify-content:center;align-items:center;box-sizing:border-box;gap:4px;flex-shrink:0;font-weight:500;font-size:var(--dhx-scheduler-font-size);font-family:var(--dhx-scheduler-font-family);font-weight:var(--dhx-scheduler-btn-font-weight, normal);line-height:142%;text-transform:var(--dhx-scheduler-btn-text-transform);cursor:pointer;padding:6px 0;--dhx-scheduler-btn-background: transparent;--dhx-scheduler-btn-color: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-btn-border-color: transparent;--dhx-scheduler-btn-background-hover: transparent;--dhx-scheduler-btn-color-hover: var(--dhx-scheduler-base-colors-primary-hover);--dhx-scheduler-btn-border-hover: transparent;--dhx-scheduler-btn-background-active: transparent;--dhx-scheduler-btn-color-active: var(--dhx-scheduler-base-colors-primary-active);--dhx-scheduler-btn-border-active: transparent;--dhx-scheduler-btn-background-disabled: transparent;--dhx-scheduler-btn-color-disabled: var(--dhx-scheduler-base-colors-icons);--dhx-scheduler-btn-border-color-disabled: transparent}.undo_button:hover{background:var(--dhx-scheduler-btn-background-hover);color:var(--dhx-scheduler-btn-color-hover);border-color:var(--dhx-scheduler-btn-border-hover)}.undo_button:active{background:var(--dhx-scheduler-btn-background-active);color:var(--dhx-scheduler-btn-color-active);border-color:var(--dhx-scheduler-btn-border-active)}.undo_button:disabled{background:var(--dhx-scheduler-btn-background-disabled);color:var(--dhx-scheduler-btn-color-disabled);border-color:var(--dhx-scheduler-btn-border-disabled)}.dhx_scheduler_month .dhx_marked_timespan.dhx_scheduler_dnd_marker{display:block;margin-top:-4px}.dhx_marked_timespan.dhx_scheduler_dnd_marker{justify-content:flex-start;align-items:flex-start}.dhx_scheduler_dnd_marker{opacity:.5} +@font-face{font-family:Inter;font-style:normal;font-weight:300;font-display:swap;src:url(https://fonts.gstatic.com/s/inter/v18/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuOKfMZg.ttf) format("truetype")}@font-face{font-family:Inter;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/inter/v18/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuLyfMZg.ttf) format("truetype")}@font-face{font-family:Inter;font-style:normal;font-weight:500;font-display:swap;src:url(https://fonts.gstatic.com/s/inter/v18/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuI6fMZg.ttf) format("truetype")}@font-face{font-family:Inter;font-style:normal;font-weight:600;font-display:swap;src:url(https://fonts.gstatic.com/s/inter/v18/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuGKYMZg.ttf) format("truetype")}@font-face{font-family:Inter;font-style:normal;font-weight:700;font-display:swap;src:url(https://fonts.gstatic.com/s/inter/v18/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuFuYMZg.ttf) format("truetype")}:root{--dhx-scheduler-theme: terrace;--dhx-scheduler-font-family: Inter, Helvetica, Arial, sans-serif;--dhx-scheduler-font-size: 14px;--dhx-scheduler-heading-font-size: calc(var(--dhx-scheduler-font-size) + 2px);--dhx-scheduler-heading-font-weight: 600;--dhx-scheduler-important-font-size: var(--dhx-scheduler-font-size);--dhx-scheduler-important-line-height: 142%;--dhx-scheduler-important-font-weight: 500;--dhx-scheduler-regular-font-size: var(--dhx-scheduler-font-size);--dhx-scheduler-regular-font-weight: 400;--dhx-scheduler-regular-line-height: 142%;--dhx-scheduler-caption-font-size: calc(var(--dhx-scheduler-font-size) - 2px);--dhx-scheduler-caption-font-weight: 400;--dhx-scheduler-caption-line-height: 132%;--dhx-scheduler-base-colors-primary: #537CFA;--dhx-scheduler-base-colors-primary-hover: #4269E0;--dhx-scheduler-base-colors-primary-active: #3365fb;--dhx-scheduler-base-colors-primary-lighter: #537cfa33;--dhx-scheduler-base-colors-warning: #FAB936;--dhx-scheduler-base-colors-error: #E3334E;--dhx-scheduler-base-colors-error-hover: #D3233E;--dhx-scheduler-base-colors-error-active: #C3132E;--dhx-scheduler-base-colors-error-lighter: #E3334E33;--dhx-scheduler-base-colors-error-text: #FFFFFF;--dhx-scheduler-base-colors-success: #1BC297;--dhx-scheduler-base-colors-secondary: rgba(0, 0, 0, .04);--dhx-scheduler-base-colors-secondary-hover: rgba(0, 0, 0, .1);--dhx-scheduler-base-colors-white: #FFFFFF;--dhx-scheduler-base-colors-select: #EFF3FF;--dhx-scheduler-base-colors-hover-color: #e0e0e0;--dhx-scheduler-base-colors-border: #D0DBE3;--dhx-scheduler-base-colors-icons: #A1A4A6;--dhx-scheduler-base-colors-icons-active: #8b8e90;--dhx-scheduler-base-colors-icons-hover: #76787a;--dhx-scheduler-base-colors-disabled: #E9E9E9;--dhx-scheduler-base-colors-readonly: var(--dhx-scheduler-base-colors-icons);--dhx-scheduler-base-colors-text-light: #44494E;--dhx-scheduler-base-colors-text-base: #23272A;--dhx-scheduler-base-colors-background: #FFFFFF;--dhx-scheduler-container-background: var(--dhx-scheduler-base-colors-background);--dhx-scheduler-container-color: var(--dhx-scheduler-base-colors-text-base);--dhx-scheduler-container-background-alt: rgba(0, 0, 0, .4);--dhx-scheduler-base-transition: .2s ease;--dhx-scheduler-box-shadow-s: 0px 4px 24px 0px rgba(44, 47, 60, .08);--dhx-scheduler-box-shadow-m: 0px 4px 24px 0px rgba(44, 47, 60, .36);--dhx-scheduler-box-shadow-l: 0px 4px 24px 0px rgba(44, 47, 60, .56);--dhx-scheduler-base-module: 4px;--dhx-scheduler-base-padding: 4px;--dhx-scheduler-border-radius: var(--dhx-scheduler-base-module);--dhx-scheduler-event-colors-primary: #537CFA;--dhx-scheduler-event-text-primary: rgba(255, 255, 255, .9);--dhx-scheduler-toolbar-height: 40px;--dhx-scheduler-transition: all .3s;--dhx-scheduler-navline-font-color: var(--dhx-scheduler-base-colors-text-light);--dhx-scheduler-default-border: 1px solid var(--dhx-scheduler-base-colors-border);--dhx-scheduler-header-border: var(--dhx-scheduler-default-border);--dhx-scheduler-halfhour-border: 1px dotted var(--dhx-scheduler-base-colors-border);--dhx-scheduler-event-background-primary: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-event-blue: linear-gradient(180deg, #527CFF 0%, #9751FC 100%);--dhx-scheduler-event-green: linear-gradient(180deg, #12D979 0%, #1ECDEB 100%);--dhx-scheduler-event-violet: linear-gradient(180deg, #D071EF 0%, #EE71D5 100%);--dhx-scheduler-event-yellow: linear-gradient(180deg, #FFB725 0%, #FFBB25 31.25%, #FAEA27 100%);--dhx-scheduler-event-title-font-size: var(--dhx-scheduler-caption-font-size);--dhx-scheduler-event-title-line-height: var(--dhx-scheduler-caption-line-height);--dhx-scheduler-event-text-font-size: var(--dhx-scheduler-regular-font-size);--dhx-scheduler-event-text-line-height: var(--dhx-scheduler-regular-line-height);--dhx-scheduler-event-text-font-weight: var(--dhx-scheduler-regular-font-weight);--dhx-scheduler-event-bar-font-size: var(--dhx-scheduler-caption-font-size);--dhx-scheduler-event-bar-line-height: var(--dhx-scheduler-caption-line-height);--dhx-scheduler-event-menu-background: var(--dhx-scheduler-popup-background);--dhx-scheduler-event-menu-color: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-event-background: var(--dhx-scheduler-event-blue);--dhx-scheduler-event-border: none;--dhx-scheduler-event-color: var(--dhx-scheduler-event-text-primary);--dhx-scheduler-event-line-text: var(--dhx-scheduler-container-color);--dhx-scheduler-event-marker-color: var(--dhx-scheduler-event-background);--dhx-scheduler-popup-background: var(--dhx-scheduler-container-background);--dhx-scheduler-popup-color: var(--dhx-scheduler-container-color);--dhx-scheduler-popup-border: none;--dhx-scheduler-popup-border-radius: var(--dhx-scheduler-border-radius);--dhx-scheduler-control-height: 32px;--dhx-scheduler-checkbox-height: 20px;--dhx-scheduler-lightbox_font-family: var(--dhx-scheduler-font-family);--dhx-scheduler-lightbox-font-size: var(--dhx-scheduler-important-font-size);--dhx-scheduler-lightbox-font-weight: var(--dhx-scheduler-important-font-weight);--dhx-scheduler-lightbox-background: var(--dhx-scheduler-popup-background);--dhx-scheduler-lightbox-border: var(--dhx-scheduler-popup-border);--dhx-scheduler-lightbox-control-border: var(--dhx-scheduler-default-border);--dhx-scheduler-lightbox-color: var(--dhx-scheduler-popup-color);--dhx-scheduler-lightbox-title-background: var(--dhx-scheduler-base-colors-select);--dhx-scheduler-lightbox-title-color: var(--dhx-scheduler-lightbox-color);--dhx-scheduler-lightbox-title-font-size: var(--dhx-scheduler-heading-font-size);--dhx-scheduler-lightbox-max-width: 496px;--dhx-scheduler-lightbox-wide-max-width: 738px;--dhx-scheduler-lightbox-width: var(--dhx-scheduler-lightbox-max-width);--dhx-scheduler-scale-color: var(--dhx-scheduler-container-color);--dhx-scheduler-timescale-background: var(--dhx-scheduler-container-background);--dhx-scheduler-timescale-today-background: var(--dhx-scheduler-base-colors-select);--dhx-scheduler-hours-font-size: var(--dhx-scheduler-caption-font-size);--dhx-scheduler-hours-font-weight: var(--dhx-scheduler-caption-font-weight);--dhx-scheduler-inactive-month-color: var(--dhx-scheduler-base-colors-icons);--dhx-scheduler-month-header-color: var(--dhx-scheduler-container-color);--dhx-scheduler-month-day-header-padding: var(--dhx-scheduler-base-padding) calc(var(--dhx-scheduler-base-padding) * 2);--dhx-scheduler-month-event-marker-size: calc(var(--dhx-scheduler-base-module) * 2);--dhx-scheduler-list-line-height: 36px;--dhx-scheduler-agenda-date-column-width: 188px;--dhx-scheduler-grid-event-background: transparent;--dhx-scheduler-grid-event-text: initial;--dhx-scheduler-timeline-folder-background: var(--dhx-scheduler-base-colors-disabled);--dhx-scheduler-timeline-folder-color: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-blocked-time-background: var(--dhx-scheduler-base-colors-disabled);--dhx-scheduler-today-marker-color: var(--dhx-scheduler-base-colors-error);--dhx-scheduler-datepicker-width: 250px;--dhx-scheduler-datepicker-font-size: var(--dhx-scheduler-font-size);--dhx-scheduler-datepicker-family: var(--dhx-scheduler-font-family);--dhx-scheduler-datepicker-cell-size: 28px;--dhx-scheduler-datepicker-header-font-size: var(--dhx-scheduler-font-size);--dhx-scheduler-datepicker-header-font-weight: 500;--dhx-scheduler-datepicker-padding: 5px;--dhx-scheduler-datepicker-inactive-month-color: var(--dhx-scheduler-inactive-month-color);--dhx-scheduler-datepicker-cell-color: var(--dhx-scheduler-popup-color);--dhx-scheduler-datepicker-cell-background: var(--dhx-scheduler-popup-background);--dhx-scheduler-datepicker-today-color: var(--dhx-scheduler-base-colors-white);--dhx-scheduler-datepicker-today-background: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-datepicker-weekend-color: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-datepicker-weekend-background: var(--dhx-scheduler-popup-background);--dhx-scheduler-datepicker-disabled-color: var(--dhx-scheduler-base-colors-icons);--dhx-scheduler-datepicker-disabled-background: var(--dhx-scheduler-base-colors-disabled);--dhx-scheduler-datepicker-hover-color: var(--dhx-scheduler-base-colors-white);--dhx-scheduler-datepicker-hover-background: var(--dhx-scheduler-base-colors-primary-hover);--dhx-scheduler-datepicker-prevnext-color: var(--dhx-scheduler-inactive-month-color);--dhx-scheduler-datepicker-prevnext-background: var(--dhx-scheduler-popup-background);--dhx-scheduler-btn-background: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-btn-color: var(--dhx-scheduler-base-colors-white);--dhx-scheduler-btn-border-color: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-btn-color-hover: var(--dhx-scheduler-base-colors-white);--dhx-scheduler-btn-background-hover: var(--dhx-scheduler-base-colors-primary-hover);--dhx-scheduler-btn-border-hover: var(--dhx-scheduler-base-colors-primary-hover);--dhx-scheduler-btn-color-active: var(--dhx-scheduler-base-colors-white);--dhx-scheduler-btn-background-active: var(--dhx-scheduler-base-colors-primary-active);--dhx-scheduler-btn-border-active: var(--dhx-scheduler-base-colors-primary-active);--dhx-scheduler-btn-background-disabled: var(--dhx-scheduler-base-colors-disabled);--dhx-scheduler-btn-color-disabled: var(--dhx-scheduler-base-colors-icons);--dhx-scheduler-btn-border-color-disabled: var(--dhx-scheduler-base-colors-disabled);--dhx-scheduler-btn-outline-background: transparent;--dhx-scheduler-btn-outline-color: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-btn-outline-border-color: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-btn-outline-background-hover: var(--dhx-scheduler-base-colors-primary-lighter);--dhx-scheduler-btn-outline-color-hover: var(--dhx-scheduler-base-colors-primary-hover);--dhx-scheduler-btn-outline-border-hover: var(--dhx-scheduler-base-colors-primary-hover);--dhx-scheduler-btn-outline-background-active: var(--dhx-scheduler-base-colors-primary-active);--dhx-scheduler-btn-outline-color-active: var(--dhx-scheduler-base-colors-white);--dhx-scheduler-btn-outline-border-active: var(--dhx-scheduler-base-colors-primary-active);--dhx-scheduler-btn-outline-background-disabled: transparent;--dhx-scheduler-btn-outline-color-disabled: var(--dhx-scheduler-base-colors-icons);--dhx-scheduler-btn-outline-border-color-disabled: var(--dhx-scheduler-base-colors-icons);--dhx-scheduler-btn-text-transform: none;--dhx-scheduler-xy-scale_width: 50px;--dhx-scheduler-xy-bar_height: 24;--dhx-scheduler-xy-month_head_height: 26;--dhx-scheduler-xy-scale_height: 24px;--dhx-scheduler-xy-scroll_width: 18px;--dhx-scheduler-info-background: var(--dhx-scheduler-popup-background);--dhx-scheduler-info-color: var(--dhx-scheduler-popup-color);--dhx-scheduler-info-border: var(--dhx-scheduler-popup-border);--dhx-scheduler-info-shadow: var(--dhx-scheduler-box-shadow-m);--dhx-scheduler-modal-background: var(--dhx-scheduler-popup-background);--dhx-scheduler-modal-color: var(--dhx-scheduler-popup-color);--dhx-scheduler-modal-border: var(--dhx-scheduler-popup-border);--dhx-scheduler-modal-padding: 16px;--dhx-scheduler-modal-width: 320px;--dhx-scheduler-modal-border-radius: var(--dhx-scheduler-popup-border-radius);--dhx-scheduler-undo-delete-background: var(--dhx-scheduler-base-colors-text-base);--dhx-scheduler-undo-delete-color: var(--dhx-scheduler-event-color)}:root[data-scheduler-theme=dark]{--dhx-scheduler-theme: dark;--dhx-scheduler-base-colors-disabled: #3d3d3d;--dhx-scheduler-base-colors-text-light: #AAA;--dhx-scheduler-base-colors-text-base: rgba(255, 255, 255, .9);--dhx-scheduler-base-colors-background: #000000;--dhx-scheduler-base-colors-border: #4B4B4B;--dhx-scheduler-navline-font-color: var(--dhx-scheduler-base-colors-text-base);--dhx-scheduler-base-colors-primary: #3B72F8;--dhx-scheduler-base-colors-primary-hover: #1D5AEE;--dhx-scheduler-base-colors-primary-active: #0e50ea;--dhx-scheduler-base-colors-primary-lighter: #3B72F833;--dhx-scheduler-base-colors-error: #EB284F;--dhx-scheduler-base-colors-error-hover: #D9264A;--dhx-scheduler-base-colors-error-active: #ba0a24;--dhx-scheduler-base-colors-error-lighter: #EB284F33;--dhx-scheduler-base-colors-select: #2A2A2A;--dhx-scheduler-base-colors-hover-color: #2A2A2A;--dhx-scheduler-base-colors-icons: #AAAAAA;--dhx-scheduler-scale-color: var(--dhx-scheduler-base-colors-text-light);--dhx-scheduler-popup-background: #1B1B1C;--dhx-scheduler-popup-border: 1px solid #4B4B4B;--dhx-scheduler-btn-font-weight: 600;--dhx-scheduler-undo-delete-background: var(--dhx-scheduler-popup-background)}:root[data-scheduler-theme=flat]{--dhx-scheduler-theme: flat;--dhx-scheduler-font-family: Segoe UI,Arial,san-serif;--dhx-scheduler-base-colors-primary: #0288D1;--dhx-scheduler-base-colors-primary-hover: #007cbf;--dhx-scheduler-base-colors-primary-active: #00659b;--dhx-scheduler-base-colors-primary-lighter: #edf8ff;--dhx-scheduler-event-background: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-base-colors-border: #cecece;--dhx-scheduler-halfhour-border: 1px solid #e8e8e8;--dhx-scheduler-event-title-font-size: 12px;--dhx-scheduler-event-text-font-size: 14px;--dhx-scheduler-event-text-font-weight: 500;--dhx-scheduler-heading-font-size: 22px;--dhx-scheduler-heading-font-weight: 300;--dhx-scheduler-caption-font-size: 14px;--dhx-scheduler-caption-font-weight: 400;--dhx-scheduler-hours-font-size: 12px;--dhx-scheduler-scale-color: #767676;--dhx-scheduler-border-radius: 0;--dhx-scheduler-timeline-folder-background: #ebeced;--dhx-scheduler-box-shadow-s: 0 3px 5px 0 rgba(0, 0, 0, .1);--dhx-scheduler-box-shadow-m: 0px 4px 24px 0px rgba(44, 47, 60, .36);--dhx-scheduler-box-shadow-l: 0px 4px 24px 0px rgba(44, 47, 60, .56);--dhx-scheduler-config-form_wide: 1;--dhx-scheduler-xy-scale_height: 35px}:root[data-scheduler-theme=flat] .dhx_cal_navline{--dhx-scheduler-btn-outline-border-color: transparent;--dhx-scheduler-btn-outline-border-hover: transparent;--dhx-scheduler-btn-outline-border-color-disabled: transparent}:root[data-scheduler-theme=flat] .dhx_scale_hour{justify-content:center}:root[data-scheduler-theme=flat] .dhx_cal_tab{min-width:90px}:root[data-scheduler-theme=flat] .dhx_cal_navline>div{order:1}:root[data-scheduler-theme=flat] .dhx_cal_navline .dhx_cal_next_button{order:6}:root[data-scheduler-theme=flat] .dhx_cal_navline .dhx_cal_today_button{order:5;border-color:transparent}:root[data-scheduler-theme=flat] .dhx_cal_navline .dhx_cal_prev_button{order:4}:root[data-scheduler-theme=flat] .dhx_cal_navline .dhx_cal_date{order:3}:root[data-scheduler-theme=flat] .dhx_cal_navline .dhx_cal_date{margin-left:auto;margin-right:auto}:root[data-scheduler-theme=flat] .dhx_data_table.folder .dhx_matrix_cell{border-right:0}:root[data-scheduler-theme=flat] .dhx_timeline_scale_header{border-right:none}:root[data-scheduler-theme=flat] .dhx_cal_container_rtl .dhx_timeline_scale_header{border-left:unset}:root[data-scheduler-theme=flat] .dhx_scale_hour{display:flex;flex-direction:row}:root[data-scheduler-theme=flat] .dhx_scale_hour .dhx_scale_h{font-size:22px;line-height:44px;font-weight:lighter}:root[data-scheduler-theme=flat] .dhx_scale_hour .dhx_scale_m{font-size:11px;line-height:35px;align-self:end;font-weight:lighter;transform:translateY(-2px)}:root[data-scheduler-theme=material]{--dhx-scheduler-theme: material;--dhx-scheduler-font-family: Roboto, Helvetica, Arial, sans-serif;--dhx-scheduler-base-colors-primary: #0288D1;--dhx-scheduler-base-colors-primary-hover: #007cbf;--dhx-scheduler-base-colors-primary-active: #00659b;--dhx-scheduler-base-colors-primary-lighter: #edf8ff;--dhx-scheduler-event-background: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-base-colors-border: #e0e0e0;--dhx-scheduler-event-title-font-size: calc(var(--dhx-scheduler-font-size) - 2px);--dhx-scheduler-event-text-font-size: var(--dhx-scheduler-font-size);--dhx-scheduler-event-text-font-weight: 500;--dhx-scheduler-heading-font-size: 20px;--dhx-scheduler-caption-font-size: var(--dhx-scheduler-font-size);--dhx-scheduler-caption-font-weight: 500;--dhx-scheduler-btn-font-weight: 500;--dhx-scheduler-heading-font-weight: 500;--dhx-scheduler-hours-font-size: calc(var(--dhx-scheduler-font-size) - 2px);--dhx-scheduler-base-colors-text-base: rgba(0, 0, 0, .75);--dhx-scheduler-header-border: 1px solid transparent;--dhx-scheduler-scale-color: rgba(0, 0, 0, .54);--dhx-scheduler-border-radius: 0;--dhx-scheduler-btn-text-transform: uppercase;--dhx-scheduler-btn-padding: 1px 20px 0;--dhx-scheduler-halfhour-border: none;--dhx-scheduler-timeline-folder-background: #ebeced;--dhx-scheduler-box-shadow-s: 0 3px 5px 0 rgba(0, 0, 0, .1);--dhx-scheduler-box-shadow-m: 0px 4px 24px 0px rgba(44, 47, 60, .36);--dhx-scheduler-box-shadow-l: 0px 4px 24px 0px rgba(44, 47, 60, .56);--dhx-scheduler-lightbox-title-background: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-lightbox-title-color: #FFFFFF;--dhx-scheduler-lightbox-title-font-size: var(--dhx-scheduler-font-size);--dhx-scheduler-lightbox-wide-max-width: 540px;--dhx-scheduler-config-form_wide: 1}:root[data-scheduler-theme=material] .dhx_scale_hour{justify-content:center}:root[data-scheduler-theme=material] .dhx_cal_tab{min-width:90px}:root[data-scheduler-theme=material] .dhx_cal_navline>div{order:1}:root[data-scheduler-theme=material] .dhx_cal_navline .dhx_cal_next_button{order:6}:root[data-scheduler-theme=material] .dhx_cal_navline .dhx_cal_today_button{order:5;border-color:transparent}:root[data-scheduler-theme=material] .dhx_cal_navline .dhx_cal_prev_button{order:4}:root[data-scheduler-theme=material] .dhx_cal_navline .dhx_cal_date{order:3}:root[data-scheduler-theme=material] .dhx_cal_navline .dhx_cal_date{margin-left:auto;margin-right:auto}:root[data-scheduler-theme=material] .dhx_data_table.folder .dhx_matrix_cell{border-right:0}:root[data-scheduler-theme=material] .dhx_timeline_scale_header{border-right:none}:root[data-scheduler-theme=material] .dhx_cal_container_rtl .dhx_timeline_scale_header{border-left:unset}:root[data-scheduler-theme=material] .dhx_cal_scale_placeholder{position:absolute;z-index:2;box-shadow:0 3px 5px #0000001a;left:0;pointer-events:none}:root[data-scheduler-theme=material] .dhx_year_box .dhx_year_month{font-weight:500;color:var(--dhx-scheduler-base-colors-primary)}:root[data-scheduler-theme=material] .dhx_year_box .dhx_month_head.dhx_year_event:after{content:none}:root[data-scheduler-theme=material] .dhx_year_box .dhx_year_event{--dhx-scheduler-datepicker-cell-color: var(--dhx-scheduler-datepicker-hover-color);--dhx-scheduler-datepicker-cell-background: var(--dhx-scheduler-datepicker-hover-background)}:root[data-scheduler-theme=material] .dhx_cal_ltitle{font-weight:400;text-transform:uppercase}:root[data-scheduler-theme=material] .dhx_cal_ltitle_controls{--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-lightbox-title-color)}:root[data-scheduler-theme=material] .dhx_timeline_scale_header{font-size:var(--dhx-scheduler-caption-font-size);font-weight:var(--dhx-scheduler-caption-font-weight);color:var(--dhx-scheduler-scale-color);line-height:133%}:root[data-scheduler-theme=contrast-white]{--dhx-scheduler-theme: contrast-white;--dhx-scheduler-base-colors-disabled: #C2C2C2;--dhx-scheduler-base-colors-text-light: #303030;--dhx-scheduler-base-colors-text-base: #303030;--dhx-scheduler-base-colors-background: #FFFFFF;--dhx-scheduler-base-colors-border: #4D595B;--dhx-scheduler-base-colors-primary: #0A47CD;--dhx-scheduler-base-colors-primary-hover: #093fb3;--dhx-scheduler-base-colors-primary-active: #08379b;--dhx-scheduler-base-colors-primary-lighter: #0A47CD;--dhx-scheduler-event-background: #0A47CD;--dhx-scheduler-event-color: #FFF;--dhx-scheduler-event-border: 1px solid rgba(0, 0, 0, .1);--dhx-scheduler-base-colors-warning: #FCBA2E;--dhx-scheduler-base-colors-success: #77D257;--dhx-scheduler-base-colors-error: #FFA7A0;--dhx-scheduler-base-colors-error-hover: #d88d88;--dhx-scheduler-base-colors-error-active: #cd8984;--dhx-scheduler-base-colors-error-lighter: #FFA7A0;--dhx-scheduler-base-colors-error-text: #141414;--dhx-scheduler-btn-color: #FFFFFF;--dhx-scheduler-btn-color-hover: #FFFFFF;--dhx-scheduler-btn-color-active: #FFFFFF;--dhx-scheduler-base-colors-select: #E7E5E5;--dhx-scheduler-base-colors-hover-color: #E7E5E5;--dhx-scheduler-base-colors-icons: #303030;--dhx-scheduler-scale-color: var(--dhx-scheduler-base-colors-text-light);--dhx-scheduler-popup-background: #FFF;--dhx-scheduler-popup-border: 1px solid #4D595B;--dhx-scheduler-font-size: 16px;--dhx-scheduler-heading-font-size: 24px;--dhx-scheduler-important-font-size: 16px;--dhx-scheduler-regular-font-size: 16px;--dhx-scheduler-caption-font-size: 16px;--dhx-scheduler-btn-outline-color-hover: #FFFFFF;--dhx-scheduler-btn-outline-color-active: #FFFFFF}:root[data-scheduler-theme=contrast-black]{--dhx-scheduler-theme: contrast-black;--dhx-scheduler-base-colors-disabled: #3d3d3d;--dhx-scheduler-base-colors-text-light: #cfcfcf;--dhx-scheduler-base-colors-text-base: #FFFFFFCC;--dhx-scheduler-base-colors-background: #141414;--dhx-scheduler-base-colors-border: rgba(255, 255, 255, .8);--dhx-scheduler-base-colors-primary: #A395FF;--dhx-scheduler-base-colors-primary-hover: #C5BCFF;--dhx-scheduler-base-colors-primary-active: #C5BCFF;--dhx-scheduler-base-colors-primary-lighter: #C5BCFF;--dhx-scheduler-event-background: #A395FF;--dhx-scheduler-event-color: #141414;--dhx-scheduler-event-border: 1px solid rgba(0, 0, 0, .1);--dhx-scheduler-base-colors-warning: #694E02;--dhx-scheduler-base-colors-success: #115700;--dhx-scheduler-base-colors-error: #FFA7A0;--dhx-scheduler-base-colors-error-hover: #fb9891;--dhx-scheduler-base-colors-error-active: #fe8b83;--dhx-scheduler-base-colors-error-lighter: #ffa6a03e;--dhx-scheduler-base-colors-error-text: #141414;--dhx-scheduler-btn-color: #141414;--dhx-scheduler-btn-color-hover: #141414;--dhx-scheduler-btn-color-active: #141414;--dhx-scheduler-base-colors-select: #2A2A2A;--dhx-scheduler-base-colors-hover-color: #2A2A2A;--dhx-scheduler-base-colors-icons: #AAAAAA;--dhx-scheduler-scale-color: var(--dhx-scheduler-base-colors-text-light);--dhx-scheduler-popup-background: #1B1B1C;--dhx-scheduler-undo-delete-background: var(--dhx-scheduler-popup-background);--dhx-scheduler-undo-delete-color: var(--dhx-scheduler-base-colors-text-base);--dhx-scheduler-popup-border: 1px solid #4B4B4B;--dhx-scheduler-font-size: 16px;--dhx-scheduler-heading-font-size: 24px;--dhx-scheduler-important-font-size: 16px;--dhx-scheduler-regular-font-size: 16px;--dhx-scheduler-caption-font-size: 16px;--dhx-scheduler-btn-outline-color-hover: #141414;--dhx-scheduler-btn-outline-color-active: #141414}@font-face{font-family:dhx-scheduler-icons;src:url(data:font/woff;base64,d09GRgABAAAAAAh0AAsAAAAAEBwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPwAAAGA97Us7Y21hcAAAAYQAAADjAAADMPMkIBtnbHlmAAACaAAAA0IAAAaMK6vwRWhlYWQAAAWsAAAALAAAADZYpKBVaGhlYQAABdgAAAAbAAAAJAJpATlobXR4AAAF9AAAABQAAABsHbAAAGxvY2EAAAYIAAAAOAAAADgWjBgkbWF4cAAABkAAAAAfAAAAIAExAD1uYW1lAAAGYAAAAUEAAAKazYPp33Bvc3QAAAekAAAAzwAAATGzVblzeJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGGUZJzAwMrAwLCP4RKQ1ILSExj4GHwZGJgYWJkZsIKANNcUhg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mtgvkXSBQPyXzwt8WhrGzth3N/KRyTbylglzj7OmXLm6CvXJXfiVPsJpxHI0LJVnJP6qpz71AoOPX4gi5jYON7ctL1XrGuj6V/F4q2jU7l01AwcAhIKGgr3JP4uAREJHmZd3243y53u4P/XE7taZOrAjfK+fqnHgTep1WkBSijgap12YE4s2zszIAmwGpDxHh37cjPuXAIaHi0KHaRGXgWEsVBye4LZ3YUEWW9OKsluZ5eZuxTOODXq50D13SQZpMiYJDYkudHHo15uvY85s3EYv5OUGH/3sNXcuosGhlC4yjMg4LtFoAAA==) format("woff2")}.scheduler_icon:before,.dhx_menu_icon:before{font-family:dhx-scheduler-icons!important;font-style:normal;font-weight:400!important;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:flex;justify-content:center;align-items:center;color:var(--dhx-scheduler-base-colors-icons)}.scheduler_icon.alert:before,.dhx_menu_icon.icon_alert:before{content:""}.scheduler_icon.arrow_down:before,.dhx_menu_icon.icon_arrow_down:before{content:""}.scheduler_icon.arrow_left:before,.dhx_menu_icon.icon_arrow_left:before{content:"";font-size:24px}.scheduler_icon.arrow_right:before,.dhx_menu_icon.icon_arrow_right:before{content:"";font-size:24px}.scheduler_icon.arrow_up:before,.dhx_menu_icon.icon_arrow_up:before{content:""}.scheduler_icon.calendar:before,.dhx_menu_icon.icon_calendar:before{content:""}.scheduler_icon.cancel:before,.dhx_menu_icon.icon_cancel:before{content:""}.scheduler_icon.check:before,.dhx_menu_icon.icon_check:before{content:""}.scheduler_icon.chevron_down:before,.dhx_menu_icon.icon_chevron_down:before{content:"";font-size:24px}.scheduler_icon.chevron_left:before,.dhx_menu_icon.icon_chevron_left:before{content:"";font-size:24px}.scheduler_icon.chevron_right:before,.dhx_menu_icon.icon_chevron_right:before{content:"";font-size:24px}.scheduler_icon.chevron_up:before,.dhx_menu_icon.icon_chevron_up:before{content:"";font-size:24px}.scheduler_icon.clock:before,.dhx_menu_icon.icon_clock:before{content:""}.scheduler_icon.close:before,.dhx_menu_icon.icon_close:before{content:""}.scheduler_icon.delete:before,.dhx_menu_icon.icon_delete:before{content:"";font-size:18px}.scheduler_icon.details:before,.dhx_menu_icon.icon_details:before{content:""}.scheduler_icon.dots_h:before,.dhx_menu_icon.icon_dots_h:before{content:""}.scheduler_icon.dots_v:before,.dhx_menu_icon.icon_dots_v:before{content:""}.scheduler_icon.drag_horizontal:before,.dhx_menu_icon.icon_drag_horizontal:before{content:""}.scheduler_icon.drag_vertical:before,.dhx_menu_icon.icon_drag_vertical:before{content:""}.scheduler_icon.drag:before,.dhx_menu_icon.icon_drag:before{content:""}.scheduler_icon.edit:before,.dhx_menu_icon.icon_edit:before{content:""}.scheduler_icon.form:before,.dhx_menu_icon.icon_form:before{content:""}.scheduler_icon.iclose:before,.dhx_menu_icon.icon_iclose:before{content:""}.scheduler_icon.loading:before,.dhx_menu_icon.icon_loading:before{content:""}.scheduler_icon.menu:before,.dhx_menu_icon.icon_menu:before{content:""}.scheduler_icon.menu_down:before,.dhx_menu_icon.icon_menu_down:before{content:""}.scheduler_icon.menu_right:before,.dhx_menu_icon.icon_menu_right:before{content:""}.scheduler_icon.ok:before,.dhx_menu_icon.icon_ok:before{content:""}.scheduler_icon.plus:before,.dhx_menu_icon.icon_plus:before{content:""}.scheduler_icon.save:before,.dhx_menu_icon.icon_save:before{content:""}.scheduler_icon.sort_asc:before,.dhx_menu_icon.icon_sort_asc:before{content:""}.scheduler_icon.sort_desc:before,.dhx_menu_icon.icon_sort_desc:before{content:""}.button{background:var(--dhx-scheduler-btn-background);color:var(--dhx-scheduler-btn-color);border:1px solid var(--dhx-scheduler-btn-border-color);border-radius:var(--dhx-scheduler-border-radius);height:var(--dhx-scheduler-control-height);padding:var(--dhx-scheduler-btn-padding, 0 20px);display:flex;justify-content:center;align-items:center;box-sizing:border-box;gap:4px;flex-shrink:0;font-weight:500;font-size:var(--dhx-scheduler-font-size);font-family:var(--dhx-scheduler-font-family);font-weight:var(--dhx-scheduler-btn-font-weight, normal);line-height:142%;text-transform:var(--dhx-scheduler-btn-text-transform);cursor:pointer}.button:hover{background:var(--dhx-scheduler-btn-background-hover);color:var(--dhx-scheduler-btn-color-hover);border-color:var(--dhx-scheduler-btn-border-hover)}.button:active{background:var(--dhx-scheduler-btn-background-active);color:var(--dhx-scheduler-btn-color-active);border-color:var(--dhx-scheduler-btn-border-active)}.button:disabled{background:var(--dhx-scheduler-btn-background-disabled);color:var(--dhx-scheduler-btn-color-disabled);border-color:var(--dhx-scheduler-btn-border-disabled)}.button-outline{--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-btn-color);--dhx-scheduler-btn-background: var(--dhx-scheduler-btn-outline-background);--dhx-scheduler-btn-color: var(--dhx-scheduler-btn-outline-color);--dhx-scheduler-btn-border-color: var(--dhx-scheduler-btn-outline-border-color);--dhx-scheduler-btn-background-hover: var(--dhx-scheduler-btn-outline-background-hover);--dhx-scheduler-btn-color-hover: var(--dhx-scheduler-btn-outline-color-hover);--dhx-scheduler-btn-border-hover: var(--dhx-scheduler-btn-outline-border-hover);--dhx-scheduler-btn-background-active: var(--dhx-scheduler-btn-outline-background-active);--dhx-scheduler-btn-color-active: var(--dhx-scheduler-btn-outline-color-active);--dhx-scheduler-btn-border-active: var(--dhx-scheduler-btn-outline-border-active);--dhx-scheduler-btn-background-disabled: var(--dhx-scheduler-btn-outline-background-disabled);--dhx-scheduler-btn-color-disabled: var(--dhx-scheduler-btn-outline-color-disabled);--dhx-scheduler-btn-border-color-disabled: var(--dhx-scheduler-btn-outline-border-color-disabled)}.button-danger{--dhx-scheduler-btn-background: var(--dhx-scheduler-base-colors-error);--dhx-scheduler-btn-color: var(--dhx-scheduler-base-colors-error-text);--dhx-scheduler-btn-border-color: var(--dhx-scheduler-base-colors-error);--dhx-scheduler-btn-background-hover: var(--dhx-scheduler-base-colors-error-hover);--dhx-scheduler-btn-border-hover: var(--dhx-scheduler-base-colors-error-hover);--dhx-scheduler-btn-background-active: var(--dhx-scheduler-base-colors-error-active);--dhx-scheduler-btn-border-active: var(--dhx-scheduler-base-colors-error-active)}.button-danger-outline{--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-btn-color);--dhx-scheduler-btn-background: transparent;--dhx-scheduler-btn-color: var(--dhx-scheduler-base-colors-error);--dhx-scheduler-btn-border-color: var(--dhx-scheduler-base-colors-error);--dhx-scheduler-btn-background-hover: var(--dhx-scheduler-base-colors-error-lighter);--dhx-scheduler-btn-color-hover: var(--dhx-scheduler-base-colors-error-hover);--dhx-scheduler-btn-border-hover: var(--dhx-scheduler-base-colors-error-hover);--dhx-scheduler-btn-background-active: var(--dhx-scheduler-base-colors-error-active);--dhx-scheduler-btn-color-active: var(--dhx-scheduler-base-colors-error-active);--dhx-scheduler-btn-border-active: var(--dhx-scheduler-base-colors-error-active);--dhx-scheduler-btn-background-disabled: transparent;--dhx-scheduler-btn-color-disabled: var(--dhx-scheduler-base-colors-icons);--dhx-scheduler-btn-border-color-disabled: var(--dhx-scheduler-base-colors-icons)}.button-danger-link{padding:6px 0;--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-base-colors-error);--dhx-scheduler-btn-background: transparent;--dhx-scheduler-btn-color: var(--dhx-scheduler-base-colors-error);--dhx-scheduler-btn-border-color: transparent;--dhx-scheduler-btn-background-hover: transparent;--dhx-scheduler-btn-color-hover: var(--dhx-scheduler-base-colors-error-hover);--dhx-scheduler-btn-border-hover: transparent;--dhx-scheduler-btn-background-active: transparent;--dhx-scheduler-btn-color-active: var(--dhx-scheduler-base-colors-error-active);--dhx-scheduler-btn-border-active: transparent;--dhx-scheduler-btn-background-disabled: transparent;--dhx-scheduler-btn-color-disabled: var(--dhx-scheduler-base-colors-icons);--dhx-scheduler-btn-border-color-disabled: transparent}.button-link{padding:6px 0;--dhx-scheduler-btn-background: transparent;--dhx-scheduler-btn-color: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-btn-border-color: transparent;--dhx-scheduler-btn-background-hover: transparent;--dhx-scheduler-btn-color-hover: var(--dhx-scheduler-base-colors-primary-hover);--dhx-scheduler-btn-border-hover: transparent;--dhx-scheduler-btn-background-active: transparent;--dhx-scheduler-btn-color-active: var(--dhx-scheduler-base-colors-primary-active);--dhx-scheduler-btn-border-active: transparent;--dhx-scheduler-btn-background-disabled: transparent;--dhx-scheduler-btn-color-disabled: var(--dhx-scheduler-base-colors-icons);--dhx-scheduler-btn-border-color-disabled: transparent}.button-icon{min-width:32px;height:32px;border-radius:50%;padding:6px 0;--dhx-scheduler-btn-background: transparent;--dhx-scheduler-btn-color: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-btn-border-color: transparent;--dhx-scheduler-btn-background-hover: transparent;--dhx-scheduler-btn-color-hover: var(--dhx-scheduler-base-colors-primary-hover);--dhx-scheduler-btn-border-hover: transparent;--dhx-scheduler-btn-background-active: transparent;--dhx-scheduler-btn-color-active: var(--dhx-scheduler-base-colors-primary-active);--dhx-scheduler-btn-border-active: transparent;--dhx-scheduler-btn-background-disabled: transparent;--dhx-scheduler-btn-color-disabled: var(--dhx-scheduler-base-colors-icons);--dhx-scheduler-btn-border-color-disabled: transparent}.button-icon:hover{--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-base-colors-icons-hover)}.button-icon:active{--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-base-colors-icons-active)}.button-icon:disabled{--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-btn-color-disabled)}.dhx_cal_btn,.dhx_cal_btn_danger,.dhx_cal_btn_outline,.dhx_cal_btn_danger_outline,.dhx_cal_btn_danger_link,.dhx_btn_set,.dhx_cal_tab,.dhx_qi_big_icon,.dhx_cal_today_button,.dhx_cal_tab_standalone{background:var(--dhx-scheduler-btn-background);color:var(--dhx-scheduler-btn-color);border:1px solid var(--dhx-scheduler-btn-border-color);border-radius:var(--dhx-scheduler-border-radius);height:var(--dhx-scheduler-control-height);padding:var(--dhx-scheduler-btn-padding, 0 20px);display:flex;justify-content:center;align-items:center;box-sizing:border-box;gap:4px;flex-shrink:0;font-weight:500;font-size:var(--dhx-scheduler-font-size);font-family:var(--dhx-scheduler-font-family);font-weight:var(--dhx-scheduler-btn-font-weight, normal);line-height:142%;text-transform:var(--dhx-scheduler-btn-text-transform);cursor:pointer}.dhx_cal_btn:hover,.dhx_cal_btn_danger:hover,.dhx_cal_btn_outline:hover,.dhx_cal_btn_danger_outline:hover,.dhx_cal_btn_danger_link:hover,.dhx_btn_set:hover,.dhx_cal_tab:hover,.dhx_qi_big_icon:hover,.dhx_cal_today_button:hover,.dhx_cal_tab_standalone:hover{background:var(--dhx-scheduler-btn-background-hover);color:var(--dhx-scheduler-btn-color-hover);border-color:var(--dhx-scheduler-btn-border-hover)}.dhx_cal_btn:active,.dhx_cal_btn_danger:active,.dhx_cal_btn_outline:active,.dhx_cal_btn_danger_outline:active,.dhx_cal_btn_danger_link:active,.dhx_btn_set:active,.dhx_cal_tab:active,.dhx_qi_big_icon:active,.dhx_cal_today_button:active,.dhx_cal_tab_standalone:active{background:var(--dhx-scheduler-btn-background-active);color:var(--dhx-scheduler-btn-color-active);border-color:var(--dhx-scheduler-btn-border-active)}.dhx_cal_btn:disabled,.dhx_cal_btn_danger:disabled,.dhx_cal_btn_outline:disabled,.dhx_cal_btn_danger_outline:disabled,.dhx_cal_btn_danger_link:disabled,.dhx_btn_set:disabled,.dhx_cal_tab:disabled,.dhx_qi_big_icon:disabled,.dhx_cal_today_button:disabled,.dhx_cal_tab_standalone:disabled{background:var(--dhx-scheduler-btn-background-disabled);color:var(--dhx-scheduler-btn-color-disabled);border-color:var(--dhx-scheduler-btn-border-disabled)}.scheduler_popup_button{background:var(--dhx-scheduler-btn-background);color:var(--dhx-scheduler-btn-color);border:1px solid var(--dhx-scheduler-btn-border-color);border-radius:var(--dhx-scheduler-border-radius);height:var(--dhx-scheduler-control-height);padding:var(--dhx-scheduler-btn-padding, 0 20px);display:flex;justify-content:center;align-items:center;box-sizing:border-box;gap:4px;flex-shrink:0;font-weight:500;font-size:var(--dhx-scheduler-font-size);font-family:var(--dhx-scheduler-font-family);font-weight:var(--dhx-scheduler-btn-font-weight, normal);line-height:142%;text-transform:var(--dhx-scheduler-btn-text-transform);cursor:pointer}.scheduler_popup_button:hover{background:var(--dhx-scheduler-btn-background-hover);color:var(--dhx-scheduler-btn-color-hover);border-color:var(--dhx-scheduler-btn-border-hover)}.scheduler_popup_button:active{background:var(--dhx-scheduler-btn-background-active);color:var(--dhx-scheduler-btn-color-active);border-color:var(--dhx-scheduler-btn-border-active)}.scheduler_popup_button:disabled{background:var(--dhx-scheduler-btn-background-disabled);color:var(--dhx-scheduler-btn-color-disabled);border-color:var(--dhx-scheduler-btn-border-disabled)}.scheduler_popup_button:not(.scheduler_ok_button){--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-btn-color);--dhx-scheduler-btn-background: var(--dhx-scheduler-btn-outline-background);--dhx-scheduler-btn-color: var(--dhx-scheduler-btn-outline-color);--dhx-scheduler-btn-border-color: var(--dhx-scheduler-btn-outline-border-color);--dhx-scheduler-btn-background-hover: var(--dhx-scheduler-btn-outline-background-hover);--dhx-scheduler-btn-color-hover: var(--dhx-scheduler-btn-outline-color-hover);--dhx-scheduler-btn-border-hover: var(--dhx-scheduler-btn-outline-border-hover);--dhx-scheduler-btn-background-active: var(--dhx-scheduler-btn-outline-background-active);--dhx-scheduler-btn-color-active: var(--dhx-scheduler-btn-outline-color-active);--dhx-scheduler-btn-border-active: var(--dhx-scheduler-btn-outline-border-active);--dhx-scheduler-btn-background-disabled: var(--dhx-scheduler-btn-outline-background-disabled);--dhx-scheduler-btn-color-disabled: var(--dhx-scheduler-btn-outline-color-disabled);--dhx-scheduler-btn-border-color-disabled: var(--dhx-scheduler-btn-outline-border-color-disabled)}.scheduler_ok_button{--dhx-scheduler-btn-background: var(--dhx-scheduler-base-colors-error);--dhx-scheduler-btn-color: var(--dhx-scheduler-base-colors-error-text);--dhx-scheduler-btn-border-color: var(--dhx-scheduler-base-colors-error);--dhx-scheduler-btn-background-hover: var(--dhx-scheduler-base-colors-error-hover);--dhx-scheduler-btn-border-hover: var(--dhx-scheduler-base-colors-error-hover);--dhx-scheduler-btn-background-active: var(--dhx-scheduler-base-colors-error-active);--dhx-scheduler-btn-border-active: var(--dhx-scheduler-base-colors-error-active)}.dhx_cal_btn_outline,.dhx_cal_btn_danger_outline{--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-btn-color);--dhx-scheduler-btn-background: var(--dhx-scheduler-btn-outline-background);--dhx-scheduler-btn-color: var(--dhx-scheduler-btn-outline-color);--dhx-scheduler-btn-border-color: var(--dhx-scheduler-btn-outline-border-color);--dhx-scheduler-btn-background-hover: var(--dhx-scheduler-btn-outline-background-hover);--dhx-scheduler-btn-color-hover: var(--dhx-scheduler-btn-outline-color-hover);--dhx-scheduler-btn-border-hover: var(--dhx-scheduler-btn-outline-border-hover);--dhx-scheduler-btn-background-active: var(--dhx-scheduler-btn-outline-background-active);--dhx-scheduler-btn-color-active: var(--dhx-scheduler-btn-outline-color-active);--dhx-scheduler-btn-border-active: var(--dhx-scheduler-btn-outline-border-active);--dhx-scheduler-btn-background-disabled: var(--dhx-scheduler-btn-outline-background-disabled);--dhx-scheduler-btn-color-disabled: var(--dhx-scheduler-btn-outline-color-disabled);--dhx-scheduler-btn-border-color-disabled: var(--dhx-scheduler-btn-outline-border-color-disabled)}.dhx_cal_button_danger,.dhx_cal_button_danger_outline{--dhx-scheduler-btn-background: var(--dhx-scheduler-base-colors-error);--dhx-scheduler-btn-color: var(--dhx-scheduler-base-colors-error-text);--dhx-scheduler-btn-border-color: var(--dhx-scheduler-base-colors-error);--dhx-scheduler-btn-background-hover: var(--dhx-scheduler-base-colors-error-hover);--dhx-scheduler-btn-border-hover: var(--dhx-scheduler-base-colors-error-hover);--dhx-scheduler-btn-background-active: var(--dhx-scheduler-base-colors-error-active);--dhx-scheduler-btn-border-active: var(--dhx-scheduler-base-colors-error-active)}.dhx_cal_button_link,.dhx_qi_big_icon{padding:6px 0;--dhx-scheduler-btn-background: transparent;--dhx-scheduler-btn-color: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-btn-border-color: transparent;--dhx-scheduler-btn-background-hover: transparent;--dhx-scheduler-btn-color-hover: var(--dhx-scheduler-base-colors-primary-hover);--dhx-scheduler-btn-border-hover: transparent;--dhx-scheduler-btn-background-active: transparent;--dhx-scheduler-btn-color-active: var(--dhx-scheduler-base-colors-primary-active);--dhx-scheduler-btn-border-active: transparent;--dhx-scheduler-btn-background-disabled: transparent;--dhx-scheduler-btn-color-disabled: var(--dhx-scheduler-base-colors-icons);--dhx-scheduler-btn-border-color-disabled: transparent}.dhx_unselectable,.dhx_unselectable div{-webkit-user-select:none;user-select:none}.dhx_cal_container{position:relative;overflow:hidden;font-family:var(--dhx-scheduler-font-family);font-size:var(--dhx-scheduler-font-size);line-height:110%;display:flex;flex-direction:column;background-color:var(--dhx-scheduler-container-background);color:var(--dhx-scheduler-container-color);text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}.dhx_cal_container div[role=button]{cursor:pointer}.dhx_cal_container.dhx_cal_container_rtl{direction:rtl}.dhx_cal_container,.dhx_cal_container *{box-sizing:border-box}.dhx_cal_container div{-webkit-user-select:none;user-select:none}.dhx_cal_data,.dhx_cal_event,.dhx_cal_event_clear,.dhx_cal_event_line{touch-action:pan-y}.dhx_cal_navline{position:relative;display:flex;align-items:center;flex-wrap:wrap;row-gap:8px;justify-content:space-between;font-weight:var(--dhx-scheduler-important-font-weight);padding:12px;min-height:var(--dhx-scheduler-toolbar-height);color:var(--dhx-scheduler-navline-font-color)}.dhx_cal_navline_flex .dhx_cal_navbar_rows_container{display:flex;align-items:center;flex-direction:column;box-sizing:border-box;flex-grow:1;gap:12px;height:100%}.dhx_cal_navline_flex .dhx_cal_date{width:auto;margin-left:auto;margin-right:auto}.dhx_cal_navline_flex .dhx_cal_today_button{order:unset}.dhx_cal_navline_flex .dhx_cal_navbar_row{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;padding:0 1vw;box-sizing:border-box;height:100%;width:100%;flex-grow:1;flex-shrink:1}.dhx_cal_navline_flex .dhx_cal_line_spacer{display:block;width:auto;flex-grow:1}@media only screen and (max-width: 1023px){.dhx_cal_navline_flex .dhx_cal_next_button,.dhx_cal_navline_flex .dhx_cal_prev_button,.dhx_cal_navline_flex .dhx_cal_tab,.dhx_cal_navline_flex .dhx_cal_tab.active,.dhx_cal_navline_flex .dhx_cal_today_button{height:2.5vw;line-height:2.5vw}}@media only screen and (max-width: 840px){.dhx_cal_navline_flex{--dhx-scheduler-btn-padding: 0 12px}.dhx_cal_navline_flex .dhx_cal_next_button,.dhx_cal_navline_flex .dhx_cal_prev_button,.dhx_cal_navline_flex .dhx_cal_tab,.dhx_cal_navline_flex .dhx_cal_tab.active,.dhx_cal_navline_flex .dhx_cal_today_button{height:4vw;line-height:4vw}}@media only screen and (max-width: 480px){.dhx_cal_navline_flex{--dhx-scheduler-btn-padding: 0 4px}.dhx_cal_navline_flex .dhx_cal_next_button,.dhx_cal_navline_flex .dhx_cal_prev_button{width:2rem}}@media only screen and (max-width: 480px){.dhx_cal_navline_flex .dhx_cal_next_button,.dhx_cal_navline_flex .dhx_cal_prev_button,.dhx_cal_navline_flex .dhx_cal_tab,.dhx_cal_navline_flex .dhx_cal_tab.active,.dhx_cal_navline_flex .dhx_cal_today_button{height:6vw;line-height:6vw}}.dhx_cal_tab:not(.active),.dhx_cal_tab_standalone:not(.active),.dhx_cal_today_button:not(.active){--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-btn-color);--dhx-scheduler-btn-background: var(--dhx-scheduler-btn-outline-background);--dhx-scheduler-btn-color: var(--dhx-scheduler-btn-outline-color);--dhx-scheduler-btn-border-color: var(--dhx-scheduler-btn-outline-border-color);--dhx-scheduler-btn-background-hover: var(--dhx-scheduler-btn-outline-background-hover);--dhx-scheduler-btn-color-hover: var(--dhx-scheduler-btn-outline-color-hover);--dhx-scheduler-btn-border-hover: var(--dhx-scheduler-btn-outline-border-hover);--dhx-scheduler-btn-background-active: var(--dhx-scheduler-btn-outline-background-active);--dhx-scheduler-btn-color-active: var(--dhx-scheduler-btn-outline-color-active);--dhx-scheduler-btn-border-active: var(--dhx-scheduler-btn-outline-border-active);--dhx-scheduler-btn-background-disabled: var(--dhx-scheduler-btn-outline-background-disabled);--dhx-scheduler-btn-color-disabled: var(--dhx-scheduler-btn-outline-color-disabled);--dhx-scheduler-btn-border-color-disabled: var(--dhx-scheduler-btn-outline-border-color-disabled)}.dhx_cal_tab_segmented{border-left-style:none;border-radius:0}.dhx_cal_tab_segmented.dhx_cal_tab_first{border-left-style:solid;border-radius:var(--dhx-scheduler-border-radius) 0px 0px var(--dhx-scheduler-border-radius);margin-left:4px}.dhx_cal_tab_segmented.dhx_cal_tab_last{border-radius:0px var(--dhx-scheduler-border-radius) var(--dhx-scheduler-border-radius) 0px;margin-right:4px}.dhx_cal_container_rtl .dhx_cal_tab_segmented.dhx_cal_tab_first{border-left-style:none;border-radius:0px var(--dhx-scheduler-border-radius) var(--dhx-scheduler-border-radius) 0px;margin-right:4px;margin-left:unset}.dhx_cal_container_rtl .dhx_cal_tab_segmented.dhx_cal_tab_last{border-radius:var(--dhx-scheduler-border-radius) 0px 0px var(--dhx-scheduler-border-radius);border-left-style:solid;margin-right:unset;margin-left:4px}.dhx_cal_container_rtl .dhx_cal_date{margin-right:unset;margin-left:auto}.dhx_cal_container_rtl .dhx_cal_header{border-left:var(--dhx-scheduler-default-border);border-right:none}.dhx_cal_tab_standalone{border-radius:var(--dhx-scheduler-border-radius);margin:0 4px}.dhx_cal_header{height:21px;border-top:var(--dhx-scheduler-header-border);border-right:var(--dhx-scheduler-header-border);position:relative;overflow:hidden}.dhx_scale_bar{position:absolute}.dhx_cal_date{text-align:center;position:relative;margin-right:auto;font-size:var(--dhx-scheduler-heading-font-size);line-height:150%;font-weight:var(--dhx-scheduler-heading-font-weight);flex-shrink:0}.dhx_cal_data{position:relative;flex:1;overflow-y:auto;overflow-x:hidden;border-top:var(--dhx-scheduler-default-border)}.dhx_scale_holder{position:absolute}.dhx_cal_today_button{margin-right:5px;order:-1}.dhx_cal_prev_button,.dhx_cal_next_button{order:0;width:20px;height:20px;background:var(--dhx-scheduler-btn-background);color:var(--dhx-scheduler-btn-color);border:1px solid var(--dhx-scheduler-btn-border-color);border-radius:var(--dhx-scheduler-border-radius);height:var(--dhx-scheduler-control-height);padding:var(--dhx-scheduler-btn-padding, 0 20px);display:flex;justify-content:center;align-items:center;box-sizing:border-box;gap:4px;flex-shrink:0;font-weight:500;font-size:var(--dhx-scheduler-font-size);font-family:var(--dhx-scheduler-font-family);font-weight:var(--dhx-scheduler-btn-font-weight, normal);line-height:142%;text-transform:var(--dhx-scheduler-btn-text-transform);cursor:pointer;min-width:32px;height:32px;border-radius:50%;padding:6px 0;--dhx-scheduler-btn-background: transparent;--dhx-scheduler-btn-color: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-btn-border-color: transparent;--dhx-scheduler-btn-background-hover: transparent;--dhx-scheduler-btn-color-hover: var(--dhx-scheduler-base-colors-primary-hover);--dhx-scheduler-btn-border-hover: transparent;--dhx-scheduler-btn-background-active: transparent;--dhx-scheduler-btn-color-active: var(--dhx-scheduler-base-colors-primary-active);--dhx-scheduler-btn-border-active: transparent;--dhx-scheduler-btn-background-disabled: transparent;--dhx-scheduler-btn-color-disabled: var(--dhx-scheduler-base-colors-icons);--dhx-scheduler-btn-border-color-disabled: transparent;font-size:24px}.dhx_cal_prev_button:hover,.dhx_cal_next_button:hover{background:var(--dhx-scheduler-btn-background-hover);color:var(--dhx-scheduler-btn-color-hover);border-color:var(--dhx-scheduler-btn-border-hover)}.dhx_cal_prev_button:active,.dhx_cal_next_button:active{background:var(--dhx-scheduler-btn-background-active);color:var(--dhx-scheduler-btn-color-active);border-color:var(--dhx-scheduler-btn-border-active)}.dhx_cal_prev_button:disabled,.dhx_cal_next_button:disabled{background:var(--dhx-scheduler-btn-background-disabled);color:var(--dhx-scheduler-btn-color-disabled);border-color:var(--dhx-scheduler-btn-border-disabled)}.dhx_cal_prev_button:hover,.dhx_cal_next_button:hover{--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-base-colors-icons-hover)}.dhx_cal_prev_button:active,.dhx_cal_next_button:active{--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-base-colors-icons-active)}.dhx_cal_prev_button:disabled,.dhx_cal_next_button:disabled{--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-btn-color-disabled)}.dhx_cal_prev_button:before,.dhx_cal_next_button:before{font-family:dhx-scheduler-icons!important;font-style:normal;font-weight:400!important;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:flex;justify-content:center;align-items:center;color:var(--dhx-scheduler-base-colors-icons)}.dhx_cal_prev_button:before{content:"";font-size:24px}.dhx_cal_next_button:before{content:"";font-size:24px}.dhx_cal_container_rtl .dhx_cal_prev_button:before{content:"";font-size:24px}.dhx_cal_container_rtl .dhx_cal_next_button:before{content:"";font-size:24px}.scheduler_container_resize_watcher{background:transparent;width:100%;height:100%;position:absolute;top:0;left:0;z-index:-1;pointer-events:none;border:0;box-sizing:border-box;opacity:0}.dhx_title_datepicker_container{z-index:2;position:absolute}.dhx_expand_icon{position:absolute;top:0;right:2px;cursor:pointer;z-index:4}.dhx_marked_timespan{position:absolute;width:100%;margin-left:0;display:flex;justify-content:center;align-items:center}.dhx_time_block{position:absolute;width:100%;background:var(--dhx-scheduler-blocked-time-background);z-index:1;opacity:.6}.dhx_time_block_reset{opacity:1}.dhx_scheduler_month .dhx_marked_timespan,.dhx_mini_calendar .dhx_marked_timespan{display:none}.dhx_timeline_table_wrapper .dhx_marked_timespan{z-index:1}.dhx_timeline_table_wrapper .dhx_time_block{z-index:2}.dhx_timeline_table_wrapper .dhx_cal_event_line{z-index:1}.dhx_timeline_table_wrapper .dhx_timeline_scrollable_data{overflow-x:auto}.dhx_now_time{width:100%;height:2px;background:var(--dhx-scheduler-today-marker-color);opacity:.5;box-shadow:0 1px 0 1px var(--dhx-scheduler-today-marker-color)}.dhx_matrix_now_time{background:var(--dhx-scheduler-today-marker-color);opacity:.5}.dhx_minical_icon{background:var(--dhx-scheduler-btn-background);color:var(--dhx-scheduler-btn-color);border:1px solid var(--dhx-scheduler-btn-border-color);border-radius:var(--dhx-scheduler-border-radius);height:var(--dhx-scheduler-control-height);padding:var(--dhx-scheduler-btn-padding, 0 20px);display:flex;justify-content:center;align-items:center;box-sizing:border-box;gap:4px;flex-shrink:0;font-weight:500;font-size:var(--dhx-scheduler-font-size);font-family:var(--dhx-scheduler-font-family);font-weight:var(--dhx-scheduler-btn-font-weight, normal);line-height:142%;text-transform:var(--dhx-scheduler-btn-text-transform);min-width:32px;height:32px;border-radius:50%;padding:6px 0;--dhx-scheduler-btn-background: transparent;--dhx-scheduler-btn-color: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-btn-border-color: transparent;--dhx-scheduler-btn-background-hover: transparent;--dhx-scheduler-btn-color-hover: var(--dhx-scheduler-base-colors-primary-hover);--dhx-scheduler-btn-border-hover: transparent;--dhx-scheduler-btn-background-active: transparent;--dhx-scheduler-btn-color-active: var(--dhx-scheduler-base-colors-primary-active);--dhx-scheduler-btn-border-active: transparent;--dhx-scheduler-btn-background-disabled: transparent;--dhx-scheduler-btn-color-disabled: var(--dhx-scheduler-base-colors-icons);--dhx-scheduler-btn-border-color-disabled: transparent;cursor:pointer;font-size:24px}.dhx_minical_icon:hover{background:var(--dhx-scheduler-btn-background-hover);color:var(--dhx-scheduler-btn-color-hover);border-color:var(--dhx-scheduler-btn-border-hover)}.dhx_minical_icon:active{background:var(--dhx-scheduler-btn-background-active);color:var(--dhx-scheduler-btn-color-active);border-color:var(--dhx-scheduler-btn-border-active)}.dhx_minical_icon:disabled{background:var(--dhx-scheduler-btn-background-disabled);color:var(--dhx-scheduler-btn-color-disabled);border-color:var(--dhx-scheduler-btn-border-disabled)}.dhx_minical_icon:hover{--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-base-colors-icons-hover)}.dhx_minical_icon:active{--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-base-colors-icons-active)}.dhx_minical_icon:disabled{--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-btn-color-disabled)}.dhx_minical_icon:before{font-family:dhx-scheduler-icons!important;font-style:normal;font-weight:400!important;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:flex;justify-content:center;align-items:center;color:var(--dhx-scheduler-base-colors-icons)}.dhx_minical_icon:before{content:""}.dhx_scale_ignore{display:none!important}.dhx_drag_placeholder{font-family:var(--dhx-scheduler-font-family);font-size:var(--dhx-scheduler-font-size)}.dhx_hidden{display:none!important}.common_input{border-radius:2px;background-color:var(--dhx-scheduler-lightbox-background);color:var(--dhx-scheduler-lightbox-color);border:var(--dhx-scheduler-lightbox-control-border);font-size:var(--dhx-scheduler);padding:6px 8px;box-sizing:border-box;margin-top:0;margin-bottom:0}.common_input:focus,.common_input:focus-visible{border-color:var(--dhx-scheduler-base-colors-primary);outline:none}.common_input:disabled{background-color:var(--dhx-scheduler-base-colors-disabled);color:var(--dhx-scheduler-base-colors-icons)}.one_line_input{height:var(--dhx-scheduler-control-height)}.dhx_cal_cover,.dhx_cal_cover *{box-sizing:border-box}.dhx_cal_cover{width:100%;height:100%;position:fixed;z-index:14;top:0;left:0;background-color:#0006;display:flex;justify-content:center;align-items:center;overflow:auto}.dhx_cal_light{margin-top:auto;margin-bottom:auto;width:max-content;max-width:var(--dhx-scheduler-lightbox-width);height:auto;-webkit-tap-highlight-color:transparent;background-color:var(--dhx-scheduler-lightbox-background);color:var(--dhx-scheduler-lightbox-color);position:absolute;z-index:15;font-family:var(--dhx-scheduler-lightbox_font-family);font-size:var(--dhx-scheduler-lightbox-font-size);font-weight:var(--dhx-scheduler-lightbox-font-weight);line-height:142%;border:var(--dhx-scheduler-lightbox-border);border-radius:var(--dhx-scheduler-popup-border-radius)}.dhx_cal_light.dhx_cal_light_wide{--dhx-scheduler-lightbox-width: var(--dhx-scheduler-lightbox-wide-max-width)}.dhx_cal_light textarea,.dhx_cal_light input,.dhx_cal_light select{border-radius:2px;background-color:var(--dhx-scheduler-lightbox-background);color:var(--dhx-scheduler-lightbox-color);border:var(--dhx-scheduler-lightbox-control-border);font-size:var(--dhx-scheduler);padding:6px 8px;box-sizing:border-box;margin-top:0;margin-bottom:0}.dhx_cal_light textarea:focus,.dhx_cal_light input:focus,.dhx_cal_light select:focus,.dhx_cal_light textarea:focus-visible,.dhx_cal_light input:focus-visible,.dhx_cal_light select:focus-visible{border-color:var(--dhx-scheduler-base-colors-primary);outline:none}.dhx_cal_light textarea:disabled,.dhx_cal_light input:disabled,.dhx_cal_light select:disabled{background-color:var(--dhx-scheduler-base-colors-disabled);color:var(--dhx-scheduler-base-colors-icons)}.dhx_cal_light input,.dhx_cal_light select{height:var(--dhx-scheduler-control-height)}.dhx_cal_light input[type=select],.dhx_cal_light input[type=checkbox]{height:var(--dhx-scheduler-checkbox-height)}.dhx_cal_light .dhx_time{display:none}.dhx_cal_ltitle{font-size:var(--dhx-scheduler-lightbox-title-font-size);font-weight:var(--dhx-scheduler-heading-font-weight);line-height:142%;background:var(--dhx-scheduler-lightbox-title-background);color:var(--dhx-scheduler-lightbox-title-color);border-bottom:var(--dhx-scheduler-default-border);padding:calc(var(--dhx-scheduler-base-padding) * 3) calc(var(--dhx-scheduler-base-padding) * 3);overflow:hidden;white-space:nowrap;display:flex;flex-direction:row;justify-content:space-between;gap:calc(var(--dhx-scheduler-base-padding) * 2);border-top-right-radius:var(--dhx-scheduler-popup-border-radius);border-top-left-radius:var(--dhx-scheduler-popup-border-radius)}.dhx_cal_ltitle .dhx_mark{display:none}.dhx_cal_ltitle .dhx_cal_ltitle_descr{overflow:hidden;text-overflow:ellipsis}.dhx_cal_ltitle .dhx_cal_ltitle_controls{cursor:pointer}.dhx_cal_larea{border:none;padding:0 12px 4px;height:auto;gap:calc(var(--dhx-scheduler-base-padding) * 2)}.dhx_btn_inner.dhx_delete_btn{display:block!important}.dhx_btn_inner.dhx_delete_btn:before{font-family:dhx-scheduler-icons!important;font-style:normal;font-weight:400!important;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:flex;justify-content:center;align-items:center;color:var(--dhx-scheduler-base-colors-icons)}.dhx_btn_inner.dhx_delete_btn:before{content:"";font-size:18px}.dhx_cal_light_rtl{direction:rtl}.dhx_cal_light_wide.dhx_cal_light_rtl .dhx_custom_button{right:auto;left:calc(var(--dhx-scheduler-base-padding) * 2)}.dhx_lightbox_time_select{min-width:80px}.dhx_lightbox_day_select{min-width:60px}.dhx_lightbox_month_select{min-width:110px}.dhx_lightbox_year_select{min-width:77px}.dhx_cal_light_wide .dhx_cal_larea{display:flex;flex-direction:column;padding-top:12px;gap:12px}.dhx_cal_light_wide .dhx_wrap_section{display:flex;flex:0;position:relative}.dhx_cal_light_wide .dhx_cal_lsection{width:120px;justify-content:start;align-items:start;flex-shrink:0;margin-top:0;margin-bottom:0;padding:4px 8px}.dhx_cal_light_wide .dhx_custom_button{position:absolute;left:auto;right:calc(var(--dhx-scheduler-base-padding) * 2)}.dhx_cal_light_wide .dhx_cal_ltext{flex:1}.dhx_cal_light_wide .dhx_section_time{justify-content:start}.dhx_cal_light_wide .dhx_fullday{margin-left:unset}.dhx_cal_lcontrols{display:flex;flex-direction:row-reverse;gap:calc(var(--dhx-scheduler-base-padding)*2);padding:12px}.dhx_cal_lcontrols .dhx_btn_set{display:flex;flex-direction:row;gap:var(--dhx-scheduler-base-padding)}.dhx_cal_lcontrols .dhx_btn_set.dhx_delete_btn_set{padding:6px 0;--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-base-colors-error);--dhx-scheduler-btn-background: transparent;--dhx-scheduler-btn-color: var(--dhx-scheduler-base-colors-error);--dhx-scheduler-btn-border-color: transparent;--dhx-scheduler-btn-background-hover: transparent;--dhx-scheduler-btn-color-hover: var(--dhx-scheduler-base-colors-error-hover);--dhx-scheduler-btn-border-hover: transparent;--dhx-scheduler-btn-background-active: transparent;--dhx-scheduler-btn-color-active: var(--dhx-scheduler-base-colors-error-active);--dhx-scheduler-btn-border-active: transparent;--dhx-scheduler-btn-background-disabled: transparent;--dhx-scheduler-btn-color-disabled: var(--dhx-scheduler-base-colors-icons);--dhx-scheduler-btn-border-color-disabled: transparent}.dhx_cal_lcontrols .dhx_btn_set:not(.dhx_save_btn_set,.dhx_delete_btn_set){--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-btn-color);--dhx-scheduler-btn-background: var(--dhx-scheduler-btn-outline-background);--dhx-scheduler-btn-color: var(--dhx-scheduler-btn-outline-color);--dhx-scheduler-btn-border-color: var(--dhx-scheduler-btn-outline-border-color);--dhx-scheduler-btn-background-hover: var(--dhx-scheduler-btn-outline-background-hover);--dhx-scheduler-btn-color-hover: var(--dhx-scheduler-btn-outline-color-hover);--dhx-scheduler-btn-border-hover: var(--dhx-scheduler-btn-outline-border-hover);--dhx-scheduler-btn-background-active: var(--dhx-scheduler-btn-outline-background-active);--dhx-scheduler-btn-color-active: var(--dhx-scheduler-btn-outline-color-active);--dhx-scheduler-btn-border-active: var(--dhx-scheduler-btn-outline-border-active);--dhx-scheduler-btn-background-disabled: var(--dhx-scheduler-btn-outline-background-disabled);--dhx-scheduler-btn-color-disabled: var(--dhx-scheduler-btn-outline-color-disabled);--dhx-scheduler-btn-border-color-disabled: var(--dhx-scheduler-btn-outline-border-color-disabled)}.dhx_cal_lcontrols .dhx_btn_set .dhx_btn_inner{display:none}.dhx_cal_lcontrols .dhx_cal_lcontrols_push_right{margin-left:auto}.dhx_cal_ltext textarea{width:100%;height:100%;resize:none;font-family:var(--dhx-scheduler-lightbox_font-family);font-size:var(--dhx-scheduler-lightbox-font-size);font-weight:var(--dhx-scheduler-lightbox-font-weight);line-height:142%}.dhx_section_time_spacer,.dhx_lightbox_minical_spacer{visibility:hidden;flex-basis:100%;height:0}.dhx_section_time{--dhx-scheduler-lightbox-time-font-size: var(--dhx-scheduler-important-font-size);--dhx-scheduler-lightbox-time-font-weight: var(--dhx-scheduler-important-font-weight);font-size:var(--dhx-scheduler-lightbox-time-font-size);font-weight:var(--dhx-scheduler-lightbox-time-font-weight);line-height:142%;display:flex;flex-wrap:wrap;align-items:center;gap:calc(var(--dhx-scheduler-base-padding) * 2);row-gap:var(--dhx-scheduler-base-padding)}.dhx_section_time .dhx_section_time_icon{width:calc(var(--dhx-scheduler-base-module) * 2);height:calc(var(--dhx-scheduler-base-module) * 2);border-radius:2px;background:var(--dhx-scheduler-base-colors-primary)}.dhx_fullday{margin-left:auto}.dhx_cal_light_rtl .dhx_fullday{margin-left:unset;margin-right:auto}.dhx_cal_lsection label{font-weight:var(--dhx-scheduler-heading-font-weight);display:flex;align-items:center;gap:4px}.dhx_cal_lsection{display:flex;margin-top:12px;margin-bottom:4px}.dhx_cal_lsection .dhx_custom_button{background:var(--dhx-scheduler-btn-background);color:var(--dhx-scheduler-btn-color);border:1px solid var(--dhx-scheduler-btn-border-color);border-radius:var(--dhx-scheduler-border-radius);height:var(--dhx-scheduler-control-height);padding:var(--dhx-scheduler-btn-padding, 0 20px);display:flex;justify-content:center;align-items:center;box-sizing:border-box;gap:4px;flex-shrink:0;font-weight:500;font-size:var(--dhx-scheduler-font-size);font-family:var(--dhx-scheduler-font-family);font-weight:var(--dhx-scheduler-btn-font-weight, normal);line-height:142%;text-transform:var(--dhx-scheduler-btn-text-transform);cursor:pointer;--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-btn-color);--dhx-scheduler-btn-background: var(--dhx-scheduler-btn-outline-background);--dhx-scheduler-btn-color: var(--dhx-scheduler-btn-outline-color);--dhx-scheduler-btn-border-color: var(--dhx-scheduler-btn-outline-border-color);--dhx-scheduler-btn-background-hover: var(--dhx-scheduler-btn-outline-background-hover);--dhx-scheduler-btn-color-hover: var(--dhx-scheduler-btn-outline-color-hover);--dhx-scheduler-btn-border-hover: var(--dhx-scheduler-btn-outline-border-hover);--dhx-scheduler-btn-background-active: var(--dhx-scheduler-btn-outline-background-active);--dhx-scheduler-btn-color-active: var(--dhx-scheduler-btn-outline-color-active);--dhx-scheduler-btn-border-active: var(--dhx-scheduler-btn-outline-border-active);--dhx-scheduler-btn-background-disabled: var(--dhx-scheduler-btn-outline-background-disabled);--dhx-scheduler-btn-color-disabled: var(--dhx-scheduler-btn-outline-color-disabled);--dhx-scheduler-btn-border-color-disabled: var(--dhx-scheduler-btn-outline-border-color-disabled);order:1;margin-left:auto;margin-right:unset}.dhx_cal_lsection .dhx_custom_button:hover{background:var(--dhx-scheduler-btn-background-hover);color:var(--dhx-scheduler-btn-color-hover);border-color:var(--dhx-scheduler-btn-border-hover)}.dhx_cal_lsection .dhx_custom_button:active{background:var(--dhx-scheduler-btn-background-active);color:var(--dhx-scheduler-btn-color-active);border-color:var(--dhx-scheduler-btn-border-active)}.dhx_cal_lsection .dhx_custom_button:disabled{background:var(--dhx-scheduler-btn-background-disabled);color:var(--dhx-scheduler-btn-color-disabled);border-color:var(--dhx-scheduler-btn-border-disabled)}.dhx_cal_light_rtl .dhx_custom_button{margin-left:unset;margin-right:auto}.dhx_cal_checkbox{display:flex;gap:var(--dhx-scheduler-base-padding)}.dhx_cal_wide_checkbox{padding:4px 0}.dhx_cal_radio input{margin:var(--dhx-scheduler-base-padding)}.dhx_cal_radio_item{display:flex;gap:var(--dhx-scheduler-base-padding);align-items:center}.dhx_cal_radio{display:flex;gap:4px}.dhx_cal_radio_vertical{flex-direction:column;overflow:auto;--dhx-scheduler-control-height: 20px}.dhx_multi_select_control{display:flex;gap:4px}.dhx_multi_select_control_vertical{flex-direction:column}.dhx_multi_select_control label{display:flex;align-items:center;gap:4px}.dhx_cal_template{position:relative;padding-top:4px;padding-bottom:4px}.dhx_form_repeat{overflow:hidden;flex-grow:1}.dhx_form_repeat form{display:flex;flex-direction:column;gap:12px;padding:12px}.dhx_form_repeat input,.dhx_form_repeat select{border-radius:2px;background-color:var(--dhx-scheduler-lightbox-background);color:var(--dhx-scheduler-lightbox-color);border:var(--dhx-scheduler-lightbox-control-border);font-size:var(--dhx-scheduler);padding:6px 8px;box-sizing:border-box;margin:0 4px}.dhx_form_repeat input:focus,.dhx_form_repeat select:focus,.dhx_form_repeat input:focus-visible,.dhx_form_repeat select:focus-visible{border-color:var(--dhx-scheduler-base-colors-primary);outline:none}.dhx_form_repeat input:disabled,.dhx_form_repeat select:disabled{background-color:var(--dhx-scheduler-base-colors-disabled);color:var(--dhx-scheduler-base-colors-icons)}.dhx_form_repeat label{display:inline-flex;align-items:center;vertical-align:top;gap:4px}.dhx_form_repeat #dhx_repeat_year,.dhx_form_repeat #dhx_repeat_month,.dhx_form_repeat #dhx_repeat_week,.dhx_form_repeat #dhx_repeat_day,.dhx_form_repeat .dhx_repeat_right{display:flex;flex-direction:column;gap:4px}.dhx_form_repeat #dhx_repeat_month>div,.dhx_form_repeat #dhx_repeat_week>div{display:flex;gap:8px}.dhx_repeat_left{display:flex;flex-wrap:wrap;gap:12px}.dhx_repeat_divider{background:var(--dhx-scheduler-base-colors-border);height:1px}.dhx_repeat_text{width:28px;border-radius:2px;background-color:var(--dhx-scheduler-lightbox-background);color:var(--dhx-scheduler-lightbox-color);border:var(--dhx-scheduler-lightbox-control-border);font-size:var(--dhx-scheduler);padding:6px 8px;box-sizing:border-box;margin-top:0;margin-bottom:0}.dhx_repeat_text:focus,.dhx_repeat_text:focus-visible{border-color:var(--dhx-scheduler-base-colors-primary);outline:none}.dhx_repeat_text:disabled{background-color:var(--dhx-scheduler-base-colors-disabled);color:var(--dhx-scheduler-base-colors-icons)}.dhx_repeat_date,.dhx_form_repeat select{border-radius:2px;background-color:var(--dhx-scheduler-lightbox-background);color:var(--dhx-scheduler-lightbox-color);border:var(--dhx-scheduler-lightbox-control-border);font-size:var(--dhx-scheduler);padding:6px 8px;box-sizing:border-box;margin-top:0;margin-bottom:0}.dhx_repeat_date:focus,.dhx_form_repeat select:focus,.dhx_repeat_date:focus-visible,.dhx_form_repeat select:focus-visible{border-color:var(--dhx-scheduler-base-colors-primary);outline:none}.dhx_repeat_date:disabled,.dhx_form_repeat select:disabled{background-color:var(--dhx-scheduler-base-colors-disabled);color:var(--dhx-scheduler-base-colors-icons)}.dhx_cal_light .dhx_readonly{color:var(--dhx-scheduler-base-colors-readonly)}.dhx_lightbox_minical{display:flex;gap:8px;align-items:center}.dhx_lightbox_minical .dhx_lightbox_minical_spacer{display:flex;align-items:center;justify-content:center}.dhx_lightbox_minical .dhx_minical_input{max-width:165px}.dhx_lightbox_minical .dhx_lightbox_time_select{width:95px}.dhx_form_rrule,.dhx_form_rrule .dhx_form_repeat_custom,.dhx_form_rrule .dhx_form_repeat_ends,.dhx_form_rrule .dhx_form_repeat_ends_extra{display:flex;flex-direction:column;gap:8px}.dhx_form_rrule .dhx_form_repeat_ends_options{display:flex;gap:8px}.dhx_form_rrule label{display:inline-flex;align-items:center;vertical-align:top;gap:4px}.dhx_form_rrule input[type=number]{width:80px}.dhx_form_rrule .dhx_form_repeat_custom_week{display:flex;flex-wrap:wrap;gap:8px}.dhx_scale_text_styles{font-size:var(--dhx-scheduler-caption-font-size);font-weight:var(--dhx-scheduler-caption-font-weight);color:var(--dhx-scheduler-scale-color);line-height:133%}.dhx_scale_bar{font-size:var(--dhx-scheduler-caption-font-size);font-weight:var(--dhx-scheduler-caption-font-weight);color:var(--dhx-scheduler-scale-color);line-height:133%;display:flex;box-sizing:border-box;height:100%;justify-content:center;align-items:baseline;padding:var(--dhx-scheduler-base-padding);border-left:var(--dhx-scheduler-header-border);overflow:hidden}.dhx_scale_holder{border-right:var(--dhx-scheduler-default-border);background:var(--dhx-scheduler-timescale-background);box-sizing:border-box}.dhx_scale_holder_now{--dhx-scheduler-timescale-background: var(--dhx-scheduler-timescale-today-background);position:absolute}.dhx_cal_container_rtl .dhx_scale_bar{border-left:none;border-right:var(--dhx-scheduler-header-border)}.dhx_cal_container_rtl .dhx_scale_holder{border-right:none;border-left:var(--dhx-scheduler-default-border)}.dhx_scale_hour{font-size:var(--dhx-scheduler-caption-font-size);font-weight:var(--dhx-scheduler-caption-font-weight);color:var(--dhx-scheduler-scale-color);line-height:133%;font-size:var(--dhx-scheduler-hours-font-size);font-weight:var(--dhx-scheduler-hours-font-weight);border-bottom:var(--dhx-scheduler-default-border);display:flex;flex-direction:column;align-items:center;justify-content:start;padding:var(--dhx-scheduler-base-padding);box-sizing:border-box}.dhx_scale_time_slot{box-sizing:border-box;border-bottom:var(--dhx-scheduler-default-border)}.dhx_scale_time_slot.dhx_scale_time_slot_hour_start{border-bottom:var(--dhx-scheduler-halfhour-border)}.dhx_drag_marker{width:100%;opacity:.5;background-color:var(--dhx-scheduler-base-colors-border);position:absolute;box-sizing:border-box;border-top:var(--dhx-scheduler-default-border);border-bottom:var(--dhx-scheduler-default-border)}.dhx_multi_day{position:relative;border-top:var(--dhx-scheduler-default-border)}.dhx_multi_day_icon,.dhx_multi_day_icon_small{background-position:50%;font-size:32px;border-bottom:var(--dhx-scheduler-default-border);border-right:var(--dhx-scheduler-default-border);background-repeat:no-repeat;display:flex;justify-content:center;align-items:center}.dhx_multi_day_icon:before,.dhx_multi_day_icon_small:before{font-family:dhx-scheduler-icons!important;font-style:normal;font-weight:400!important;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:flex;justify-content:center;align-items:center;color:var(--dhx-scheduler-base-colors-icons)}.dhx_multi_day_icon:before,.dhx_multi_day_icon_small:before{content:""}.dhx_multi_day_icon_small{font-size:16px}.dhx_cal_container_rtl .dhx_multi_day_icon,.dhx_cal_container_rtl .dhx_multi_day_icon_small{border-right:none;border-left:var(--dhx-scheduler-default-border)}.dhx_scheduler_event_base{background:var(--dhx-scheduler-event-background);color:var(--dhx-scheduler-event-color);display:flex;padding:2px var(--dhx-scheduler-base-module);border:var(--dhx-scheduler-event-border);position:absolute;box-sizing:border-box;font-size:var(--dhx-scheduler-event-text-font-size);line-height:var(--dhx-scheduler-event-text-line-height);font-weight:var(--dhx-scheduler-event-text-font-weight);--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-event-color)}.dhx_title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dhx_cal_event{border-radius:var(--dhx-scheduler-border-radius);flex-direction:column;background:var(--dhx-scheduler-event-background);color:var(--dhx-scheduler-event-color);display:flex;padding:2px var(--dhx-scheduler-base-module);border:var(--dhx-scheduler-event-border);position:absolute;box-sizing:border-box;font-size:var(--dhx-scheduler-event-text-font-size);line-height:var(--dhx-scheduler-event-text-line-height);font-weight:var(--dhx-scheduler-event-text-font-weight);--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-event-color)}.dhx_cal_event .dhx_title{font-size:var(--dhx-scheduler-event-title-font-size);line-height:var(--dhx-scheduler-event-title-line-height);max-height:21px}.dhx_cal_event .dhx_body{font-size:var(--dhx-scheduler-event-text-font-size);line-height:var(--dhx-scheduler-event-text-line-height);flex:1;gap:4px;overflow:hidden;text-overflow:ellipsis}.dhx_cal_event .dhx_event_move.dhx_header{display:none}.dhx_cal_event .dhx_event_resize{cursor:ns-resize}.dhx_cal_event .dhx_resize_denied{display:none!important}.dhx_cal_event .dhx_footer{position:absolute;bottom:2px;opacity:0}.dhx_cal_event .dhx_menu_icon{--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-event-text)}.dhx_cal_event .dhx_menu_icon.icon_delete{margin-left:-2px}.dhx_cal_event.dhx_cal_select_menu{padding:8px 2px;box-shadow:var(--dhx-scheduler-box-shadow-s);--dhx-scheduler-event-background: var(--dhx-scheduler-event-menu-background);--dhx-scheduler-event-color: var(--dhx-scheduler-event-menu-color)}.dhx_cal_event.dhx_cal_select_menu .dhx_body{display:flex;flex-direction:column;gap:4px;align-items:center}.dhx_cal_event textarea.dhx_cal_editor{width:100%;height:100%;padding:0;margin:0;overflow:auto;font-family:var(--dhx-scheduler-font-family);font-size:var(--dhx-scheduler-font-size)}.dhx_cal_event_cascade{--dhx-scheduler-event-border: 1px solid rgba(0, 0, 0, .05)}.dhx_cal_editor{z-index:10}.dhx_cal_event .dhx_footer,.dhx_cal_event .dhx_select_menu_footer{height:calc(var(--dhx-scheduler-base-module) * 2);border-width:0;position:relative;margin-left:auto;margin-right:auto}.dhx_cal_event .dhx_footer:before,.dhx_cal_event .dhx_select_menu_footer:before{font-family:dhx-scheduler-icons!important;font-style:normal;font-weight:400!important;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:flex;justify-content:center;align-items:center;color:var(--dhx-scheduler-base-colors-icons)}.dhx_cal_event .dhx_footer:before,.dhx_cal_event .dhx_select_menu_footer:before{content:""}.dhx_cal_event.dhx_cal_event_drag .dhx_event_resize.dhx_footer,.dhx_cal_event.dhx_cal_event_selected .dhx_event_resize.dhx_footer,.dhx_cal_event:hover .dhx_event_resize.dhx_footer{opacity:1;background-color:transparent}.dhx_cal_event_line{background:var(--dhx-scheduler-event-background);color:var(--dhx-scheduler-event-color);display:flex;padding:2px var(--dhx-scheduler-base-module);border:var(--dhx-scheduler-event-border);position:absolute;box-sizing:border-box;font-size:var(--dhx-scheduler-event-text-font-size);line-height:var(--dhx-scheduler-event-text-line-height);font-weight:var(--dhx-scheduler-event-text-font-weight);--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-event-color);--dhx-scheduler-event-text-font-size: var(--dhx-scheduler-event-bar-font-size);--dhx-scheduler-event-text-line-height: var(--dhx-scheduler-event-bar-line-height);cursor:pointer;align-items:center;z-index:1;overflow:hidden;padding-left:12px;white-space:nowrap}.dhx_cal_event_line.dhx_cal_event_line_end{border-top-right-radius:var(--dhx-scheduler-border-radius);border-bottom-right-radius:var(--dhx-scheduler-border-radius)}.dhx_cal_event_line.dhx_cal_event_line_start{border-top-left-radius:var(--dhx-scheduler-border-radius);border-bottom-left-radius:var(--dhx-scheduler-border-radius)}.dhx_cal_event_line.dhx_cal_event--small{padding-left:8px}.dhx_cal_event_line.dhx_cal_event--xsmall{padding-left:4px}.dhx_cal_container_rtl .dhx_cal_event_line{border-top-right-radius:unset;border-bottom-right-radius:unset;border-top-left-radius:unset;border-bottom-left-radius:unset}.dhx_cal_container_rtl .dhx_cal_event_line.dhx_cal_event_line_end{border-top-left-radius:var(--dhx-scheduler-border-radius);border-bottom-left-radius:var(--dhx-scheduler-border-radius)}.dhx_cal_container_rtl .dhx_cal_event_line.dhx_cal_event_line_start{border-top-right-radius:var(--dhx-scheduler-border-radius);border-bottom-right-radius:var(--dhx-scheduler-border-radius)}.dhx_cal_event.dhx_cal_event--xsmall,.dhx_cal_event.dhx_cal_event--small{flex-direction:row-reverse;justify-content:space-between;--dhx-scheduler-event-title-font-size: var(--dhx-scheduler-event-bar-font-size);--dhx-scheduler-event-title-line-height: var(--dhx-scheduler-event-bar-line-height);--dhx-scheduler-event-text-font-size: var(--dhx-scheduler-event-bar-font-size);--dhx-scheduler-event-text-line-height: var(--dhx-scheduler-event-bar-line-height);gap:4px;padding-top:2px;padding-bottom:1px}.dhx_cal_event.dhx_cal_event--xsmall .dhx_title,.dhx_cal_event.dhx_cal_event--small .dhx_title{display:flex;justify-content:end}.dhx_cal_event.dhx_cal_event--xsmall .dhx_body,.dhx_cal_event.dhx_cal_event--small .dhx_body{flex-grow:2}.dhx_cal_event.dhx_cal_event--xsmall .dhx_footer,.dhx_cal_event.dhx_cal_event--small .dhx_footer,.dhx_cal_event.dhx_cal_event--xsmall .dhx_select_menu_footer,.dhx_cal_event.dhx_cal_event--small .dhx_select_menu_footer{position:absolute;bottom:0;left:4px;width:100%;transform:translateY(50%)}.dhx_cal_month_table{overflow:hidden}.dhx_cal_month_row{display:flex}.dhx_cal_month_cell{box-sizing:border-box;background:var(--dhx-scheduler-timescale-background);border-right:var(--dhx-scheduler-default-border);border-bottom:var(--dhx-scheduler-default-border);display:flex;flex-direction:column}.dhx_cal_month_cell.dhx_now{--dhx-scheduler-timescale-background: var(--dhx-scheduler-timescale-today-background)}.dhx_month_body_border,.dhx_month_head_border{border-left:var(--dhx-scheduler-default-border)}.dhx_cal_container_rtl .dhx_cal_month_cell{border-left:var(--dhx-scheduler-default-border);border-right:none}.dhx_cal_container_rtl .dhx_month_body_border,.dhx_cal_container_rtl .dhx_month_head_border{border-left:none;border-right:var(--dhx-scheduler-default-border)}.dhx_month_head{box-sizing:border-box;display:flex;flex-shrink:0;color:var(--dhx-scheduler-month-header-color);justify-content:end;align-items:flex-start;align-self:stretch;padding:var(--dhx-scheduler-month-day-header-padding)}.dhx_month_body{flex-grow:1;padding:var(--dhx-scheduler-base-padding) calc(var(--dhx-scheduler-base-padding) * 2);box-sizing:border-box;position:relative}.dhx_before,.dhx_after{--dhx-scheduler-month-header-color: var(--dhx-scheduler-inactive-month-color)}.dhx_month_link{position:absolute;text-align:right;cursor:pointer;padding-right:10px}.dhx_month_link a:hover{text-decoration:underline}.dhx_global_tip{font-family:var(--dhx-scheduler-font-family);line-height:110%;background-color:var(--dhx-scheduler-container-background);color:var(--dhx-scheduler-container-color);text-align:center;font-size:20px;position:fixed;top:60px;right:20px;z-index:14;padding:20px 30px;width:190px;background:var(--dhx-scheduler-popup-background);color:var(--dhx-scheduler-popup-color);border:var(--dhx-scheduler-popup-border);box-shadow:var(--dhx-scheduler-box-shadow-m)}@media (-moz-touch-enabled){.dhx_cal_container{-webkit-user-select:none;user-select:none;-moz-user-select:none}}.dhx_cal_event_clear{box-sizing:border-box;padding:var(--dhx-scheduler-base-padding) calc(var(--dhx-scheduler-base-padding) * 2);font-size:var(--dhx-scheduler-caption-font-size);font-weight:var(--dhx-scheduler-caption-font-weight);display:flex;justify-content:start;align-items:center;gap:var(--dhx-scheduler-base-padding);cursor:pointer;flex-wrap:nowrap;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dhx_cal_event_clear_date{font-weight:700}.dhx_cal_event_line_content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dhx_cal_event_marker{display:block;flex-shrink:0;border-radius:var(--dhx-scheduler-month-event-marker-size);width:var(--dhx-scheduler-month-event-marker-size);height:var(--dhx-scheduler-month-event-marker-size);background:var(--dhx-scheduler-event-background);margin-top:-1px}.dhx_cal_event_clear:before{content:"";display:block;flex-shrink:0;border-radius:var(--dhx-scheduler-month-event-marker-size);width:var(--dhx-scheduler-month-event-marker-size);height:var(--dhx-scheduler-month-event-marker-size);background:var(--dhx-scheduler-event-background);margin-top:-1px}.dhx_cal_event_line .dhx_event_resize{cursor:ew-resize;position:absolute;top:0;height:100%;display:none;justify-content:center;align-items:center}.dhx_cal_event_line .dhx_event_resize:before{font-family:dhx-scheduler-icons!important;font-style:normal;font-weight:400!important;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:flex;justify-content:center;align-items:center;color:var(--dhx-scheduler-base-colors-icons)}.dhx_cal_event_line .dhx_event_resize:before{content:""}.dhx_cal_event_line:hover .dhx_event_resize{display:flex}.dhx_event_resize_end{right:0}.dhx_event_resize_start{left:0}.dhx_cal_container_rtl .dhx_event_resize_start{left:auto;left:unset;right:0}.dhx_cal_container_rtl .dhx_event_resize_end{right:auto;right:unset;left:0}.dhx_cal_quick_info{--dhx-scheduler-quick-info-font-size: var(--dhx-regular-font-size);position:absolute;z-index:8;font-size:var(--dhx-scheduler-quick-info-font-size);background:var(--dhx-scheduler-popup-background);color:var(--dhx-scheduler-popup-color);border:var(--dhx-scheduler-popup-border);padding:calc(var(--dhx-scheduler-base-padding)*2) calc(var(--dhx-scheduler-base-padding)*3);border-radius:var(--dhx-scheduler-border-radius);width:300px;display:flex;flex-direction:column;box-shadow:var(--dhx-scheduler-box-shadow-s);transition:left .5s ease,right .5s ease}.dhx_cal_qi_tcontrols{display:flex;justify-content:end;height:8px}.dhx_cal_qi_tcontrols .dhx_cal_qi_close_btn{min-width:32px;height:32px;border-radius:50%;--dhx-scheduler-btn-background: transparent;--dhx-scheduler-btn-color: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-btn-border-color: transparent;--dhx-scheduler-btn-background-hover: transparent;--dhx-scheduler-btn-color-hover: var(--dhx-scheduler-base-colors-primary-hover);--dhx-scheduler-btn-border-hover: transparent;--dhx-scheduler-btn-background-active: transparent;--dhx-scheduler-btn-color-active: var(--dhx-scheduler-base-colors-primary-active);--dhx-scheduler-btn-border-active: transparent;--dhx-scheduler-btn-background-disabled: transparent;--dhx-scheduler-btn-color-disabled: var(--dhx-scheduler-base-colors-icons);--dhx-scheduler-btn-border-color-disabled: transparent;width:unset;min-width:unset;padding:2px;font-size:18px;cursor:pointer;height:20px;position:relative;z-index:1}.dhx_cal_qi_tcontrols .dhx_cal_qi_close_btn:hover{--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-base-colors-icons-hover)}.dhx_cal_qi_tcontrols .dhx_cal_qi_close_btn:active{--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-base-colors-icons-active)}.dhx_cal_qi_tcontrols .dhx_cal_qi_close_btn:disabled{--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-btn-color-disabled)}.dhx_cal_qi_title,.dhx_cal_qi_controls,.dhx_cal_qi_content{padding:0 calc(var(--dhx-scheduler-base-padding) * 3)}.dhx_cal_qi_title{display:flex;flex-direction:column;gap:12px;padding-right:14px}.dhx_cal_qi_tcontent{font-size:var(--dhx-scheduler-heading-font-size);font-weight:var(--dhx-scheduler-heading-font-weight);line-height:150%;position:relative;display:flex;flex-direction:row;justify-content:start;align-items:center;gap:8px;overflow:hidden;flex-grow:0;text-overflow:ellipsis;white-space:nowrap}.dhx_cal_qi_tcontent>span{text-overflow:ellipsis;overflow:hidden}.dhx_cal_qi_tcontent:before{display:var(--dhx-scheduler-quick-info-dot-display, block);content:"";flex-shrink:0;width:var(--dhx-scheduler-month-event-marker-size);height:var(--dhx-scheduler-month-event-marker-size);border-radius:2px;background:var(--dhx-scheduler-base-colors-primary)}.dhx_cal_qi_tdate{font-size:var(--dhx-scheduler-important-font-size);font-weight:var(--dhx-scheduler-important-font-weight);line-height:var(--dhx-scheduler-important-line-height)}.dhx_cal_qi_content{padding-top:16px;padding-bottom:8px}.dhx_cal_qi_controls{display:flex;flex-direction:row;justify-content:start;align-items:center;padding-top:8px;gap:12px;color:var(--dhx-scheduler-base-colors-primary)}.dhx_cal_qi_controls>div:first-child{margin-left:-3px}.dhx_menu_icon{width:20px;height:20px;display:flex;align-items:center;justify-content:center;--dhx-scheduler-base-colors-icons: var(--dhx-scheduler-btn-color)}.dhx_scheduler_year .dhx_cal_header{display:none}.dhx_scheduler_year .dhx_cal_data{padding:40px}.dhx_year_wrapper{display:flex;gap:40px;padding:12px;justify-content:center;align-items:baseline;flex-wrap:wrap}.dhx_year_box{--dhx-scheduler-month-day-header-padding: 8px 12px}.dhx_year_box .dhx_scale_bar{position:relative;width:var(--dhx-scheduler-datepicker-cell-size)}.dhx_year_box .dhx_month_head{position:relative}.dhx_year_box .dhx_month_head.dhx_year_event:after{content:"";width:4px;height:4px;border-radius:50%;position:absolute;bottom:2px;left:50%;transform:translate(-50%);background:var(--dhx-scheduler-event-marker-color)}.dhx_year_box .dhx_month_body{display:none}.dhx_year_month{text-align:center;padding:12px 0}.dhx_year_week{display:flex}.dhx_year_tooltip{position:absolute;padding:12px;font-family:var(--dhx-scheduler-font-family);font-size:var(--dhx-scheduler-event-title-font-size);background:var(--dhx-scheduler-popup-background);border-radius:var(--dhx-scheduler-popup-border-radius);border:var(--dhx-scheduler-popup-border);color:var(--dhx-scheduler-popup-color);box-shadow:var(--dhx-scheduler-box-shadow-m);display:flex;flex-direction:column;width:300px;gap:4px}.dhx_tooltip_line{border-radius:var(--dhx-scheduler-border-radius);background:var(--dhx-scheduler-event-background);color:var(--dhx-scheduler-event-color);padding:4px;display:flex;cursor:pointer}.dhx_tooltip_rtl{direction:rtl}.dhx_timeline_scale_header{position:absolute;overflow:hidden;background-color:var(--dhx-scheduler-container-background);display:flex;justify-content:center;align-items:center;border-right:var(--dhx-scheduler-header-border);border-top:var(--dhx-scheduler-header-border)}.dhx_cal_container_rtl .dhx_timeline_scale_header{border-right:unset;border-left:var(--dhx-scheduler-header-border)}.dhx_timeline_label_wrapper{z-index:1}.dhx_timeline_label_col{position:relative}.dhx_timeline_label_row{position:absolute;left:0}.dhx_matrix_scell{overflow:hidden;text-align:center;border-bottom:var(--dhx-scheduler-default-border);border-right:var(--dhx-scheduler-default-border);color:var(--dhx-scheduler-scale-color)}.dhx_timeline_data_wrapper{position:absolute;z-index:0;left:0;top:0;width:100%}.dhx_matrix_cell,.dhx_matrix_scell{overflow:hidden;text-align:center;vertical-align:middle;border-bottom:var(--dhx-scheduler-default-border);border-right:var(--dhx-scheduler-default-border);font-weight:500}.dhx_cal_container_rtl .dhx_matrix_cell,.dhx_cal_container_rtl .dhx_matrix_scell{border-right:none;border-left:var(--dhx-scheduler-default-border)}.dhx_matrix_cell div,.dhx_matrix_scell div{overflow:hidden;text-align:center;height:auto}.dhx_timeline_data_cell{position:absolute;top:0;height:100%}.dhx_timeline_label_wrapper{position:absolute;overflow:hidden;background:var(--dhx-scheduler-container-background)}.dhx_matrix_scell.folder,.dhx_data_table.folder .dhx_matrix_cell{background-color:var(--dhx-scheduler-timeline-folder-background);cursor:pointer}.dhx_matrix_scell .dhx_scell_level0{padding-left:4px}.dhx_matrix_scell .dhx_scell_level1{padding-left:20px}.dhx_matrix_scell .dhx_scell_level2{padding-left:32px}.dhx_matrix_scell .dhx_scell_level3{padding-left:48px}.dhx_matrix_scell .dhx_scell_level4{padding-left:64px}.dhx_matrix_scell.folder{border-right-color:transparent;font-weight:700;text-align:left}.dhx_cal_container_rtl .dhx_matrix_scell.folder{border-right:var(--dhx-scheduler-default-border);border-left-color:transparent}.dhx_matrix_line{overflow:hidden}.dhx_matrix_scell.folder .dhx_scell_expand:before{font-family:dhx-scheduler-icons!important;font-style:normal;font-weight:400!important;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:flex;justify-content:center;align-items:center;color:var(--dhx-scheduler-base-colors-icons)}.dhx_matrix_scell.folder .dhx_scell_expand:before{content:"";font-size:24px}.dhx_matrix_scell.folder.closed .dhx_scell_expand{transform:rotate(-90deg)}.dhx_matrix_scell.folder,.dhx_timeline_label_row.dhx_row_folder{overflow:visible}.dhx_matrix_scell.folder>div{display:flex;align-items:center;height:inherit}.dhx_matrix_scell.folder .dhx_scell_expand{position:relative;flex-shrink:0}.dhx_matrix_scell.folder .dhx_scell_name{width:auto;color:var(--dhx-scheduler-timeline-folder-color);text-transform:uppercase;font-weight:500;max-height:100%}.dhx_matrix_scell.item .dhx_scell_name{padding-left:16px;text-align:left}.dhx_cal_container_rtl .dhx_matrix_scell .dhx_scell_level0{padding-left:0;padding-right:4px}.dhx_cal_container_rtl .dhx_matrix_scell .dhx_scell_level1{padding-left:0;padding-right:20px}.dhx_cal_container_rtl .dhx_matrix_scell .dhx_scell_level2{padding-left:0;padding-right:32px}.dhx_cal_container_rtl .dhx_matrix_scell .dhx_scell_level3{padding-left:0;padding-right:48px}.dhx_cal_container_rtl .dhx_matrix_scell .dhx_scell_level4{padding-left:0;padding-right:63px}.dhx_cal_container_rtl .dhx_matrix_scell.folder .dhx_scell_expand{padding-right:0;padding-left:4px}.dhx_cal_container_rtl .dhx_matrix_scell.item .dhx_scell_name{padding-left:0;padding-right:12px;text-align:right}.dhx_matrix_scell.dhx_matrix_scell_columns,.dhx_timeline_scale_header{display:flex;justify-content:center;align-items:center}.dhx_matrix_scell_columns.dhx_treetimeline .dhx_scell_name{display:flex}.dhx_matrix_scell_columns.dhx_treetimeline .dhx_scell_level{flex-shrink:0}.dhx_matrix_scell_columns.dhx_treetimeline .dhx_timeline_label_column_first{flex-shrink:1;border-left-color:transparent}.dhx_second_scale_bar{border-bottom:var(--dhx-scheduler-header-border)}div.dhx_timeline_label_column,div.dhx_timeline_label_column_header{display:flex;justify-content:center;align-items:center;box-sizing:border-box;flex-grow:0;flex-shrink:0;height:100%;white-space:nowrap}div.dhx_timeline_label_column .dhx_timeline_label_content_wrapper,div.dhx_timeline_label_column_header .dhx_timeline_label_content_wrapper{display:inline-block;text-align:left}.dhx_timeline_label_column{border-left:var(--dhx-scheduler-header-border)}.dhx_timeline_label_column_header{border-left-color:transparent}.dhx_timeline_label_column:first-child{border-left:0}.dhx_cal_container_rtl .dhx_timeline_label_column{border-left:none;border-right:var(--dhx-scheduler-header-border)}.dhx_cal_container_rtl .dhx_timeline_label_column_header{border-right-color:transparent}.dhx_cal_container_rtl .dhx_timeline_label_column:first-child{border-right:0}.dhx_scheduler_map .dhx_cal_header,.dhx_scheduler_agenda .dhx_cal_header{height:auto}.dhx_agenda_line_header{clear:both;overflow:hidden}.dhx_agenda_line,.dhx_map_line{height:var(--dhx-scheduler-list-line-height);line-height:var(--dhx-scheduler-list-line-height);overflow:hidden;display:flex}.dhx_agenda_line .dhx_agenda_event_time,.dhx_map_line .dhx_agenda_event_time,.dhx_agenda_line .dhx_map_event_time,.dhx_map_line .dhx_map_event_time{flex-shrink:0;width:188px;text-align:center;border-right:var(--dhx-scheduler-default-border)}.dhx_agenda_line .dhx_event_icon,.dhx_map_line .dhx_event_icon{height:33px;width:33px;display:flex;align-items:center;justify-content:center}.dhx_agenda_line .dhx_event_icon path,.dhx_map_line .dhx_event_icon path{fill:var(--dhx-scheduler-base-colors-primary)}.dhx_agenda_line>div:first-child,.dhx_map_line>div:first-child{width:var(--dhx-scheduler-agenda-date-column-width);text-align:center}.dhx_agenda_line:nth-child(2n),.dhx_map_line:nth-child(2n){background:var(--dhx-scheduler-base-colors-select)}.dhx_map_area{height:100%}.dhx_map_head{display:flex;height:100%}.dhx_map_head>div{display:flex;justify-content:center;align-items:center;padding:0 var(--dhx-scheduler-base-padding)}.dhx_v_border{position:absolute;height:100%;border-left:var(--dhx-scheduler-default-border);top:0}.dhx_week_agenda_wrapper{width:100%;height:100%;display:flex}.dhx_wa_column{flex:1;display:flex;flex-direction:column;border-right:var(--dhx-scheduler-default-border)}.dhx_wa_day_cont{flex-grow:0;flex-shrink:0;flex-basis:calc(100% / 3);display:flex;flex-direction:column;overflow-y:auto}.dhx_wa_column:last-child .dhx_wa_day_cont:nth-last-child(1),.dhx_wa_column:last-child .dhx_wa_day_cont:nth-last-child(2){flex-shrink:1}.dhx_wa_scale_bar{--dhx-scheduler-week-agenda-scale-height: 35px;--dhx-scheduler-week-agenda-scale-font-size: var(--dhx-scheduler-important-font-size);--dhx-scheduler-week-agenda-scale-font-weight: var(--dhx-scheduler-heading-font-weight);font-size:var(--dhx-scheduler-week-agenda-scale-font-size);font-weight:var(--dhx-scheduler-week-agenda-scale-font-weight);height:var(--dhx-scheduler-week-agenda-scale-height);line-height:var(--dhx-scheduler-week-agenda-scale-height);flex:0;background:var(--dhx-scheduler-base-colors-select);border-top:var(--dhx-scheduler-default-border);border-bottom:var(--dhx-scheduler-default-border);padding:4px;display:flex;align-items:center}.dhx_wa_day_data{flex:1;overflow:auto}.dhx_wa_ev_body{border-bottom:var(--dhx-scheduler-default-border);padding:4px}.dhx_wa_ev_body_rtl{direction:rtl}.dhx_wa_dnd{font-family:var(--dhx-scheduler-font-family);position:absolute;color:#000a;background-color:#faea27;border:1px solid #00000033;min-width:300px}.dhx_wa_ev_body.dhx_cal_event_selected{background-color:var(--dhx-scheduler-base-colors-select)}.dhx_grid_event{height:var(--dhx-scheduler-list-line-height);line-height:var(--dhx-scheduler-list-line-height);background:var(--dhx-scheduler-grid-event-background);color:var(--dhx-scheduler-grid-event-text)}.dhx_grid_event:nth-child(2n){--dhx-scheduler-grid-event-background: var(--dhx-scheduler-base-colors-select)}.dhx_grid_event.dhx_grid_event_selected{--dhx-scheduler-grid-event-background: var(--dhx-scheduler-base-colors-icons)}.dhx_grid_area td,.dhx_grid_line>div{padding-left:8px;padding-right:8px}.dhx_grid_line>div{text-align:center}.dhx_grid_area>table{border-collapse:collapse;width:100%;table-layout:fixed}.dhx_grid_area td{table-layout:fixed;text-align:center;height:var(--dhx-scheduler-list-line-height);line-height:var(--dhx-scheduler-list-line-height)}.dhx_cal_header>.dhx_grid_line{display:flex}.dhx_grid_v_border{position:absolute;border-right:var(--dhx-scheduler-default-border);width:1px;height:100%}.dhx_grid_view_sort{position:absolute;top:5px;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:10px solid var(--dhx-scheduler-base-colors-text-light)}.dhx_grid_sort_asc .dhx_grid_view_sort{border-top:none;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:10px solid var(--dhx-scheduler-base-colors-text-light)}.dhx_scheduler_agenda .dhx_cal_header{display:none}.dhx_cal_agenda_day{--dhx-scheduler-agenda-date-width: 110px;--dhx-scheduler-agenda-event-date-width: 120px;display:flex;flex-direction:row;flex-wrap:nowrap;border-bottom:var(--dhx-scheduler-default-border)}.dhx_cal_agenda_day_header{padding:8px 12px;display:flex;flex-direction:column;gap:8px;flex-grow:0;flex-shrink:0;width:var(--dhx-scheduler-agenda-date-width);border-right:var(--dhx-scheduler-default-border)}.dhx_cal_agenda_day_events{padding:8px 12px;flex:1}.dhx_agenda_day_date{font-weight:500}.dhx_cal_agenda_event_line{display:flex;align-items:center;justify-content:start;gap:16px;padding:calc(var(--dhx-scheduler-base-padding)*2)}.dhx_cal_agenda_event_line_selected{background-color:var(--dhx-scheduler-base-colors-select)}.dhx_cal_agenda_event_line_marker{display:block;flex-shrink:0;border-radius:var(--dhx-scheduler-month-event-marker-size);width:var(--dhx-scheduler-month-event-marker-size);height:var(--dhx-scheduler-month-event-marker-size);background:var(--dhx-scheduler-event-background);margin-top:-1px}.dhx_cal_agenda_event_line_time{font-weight:500;min-width:var(--dhx-scheduler-agenda-event-date-width);text-align:center}.dhx_cal_agenda_no_events{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.dhx_cal_datepicker{font-size:var(--dhx-scheduler-datepicker-font-size);font-family:var(--dhx-scheduler-datepicker-family);line-height:142%;font-weight:400;border:var(--dhx-scheduler-popup-border);background:var(--dhx-scheduler-popup-background);color:var(--dhx-scheduler-popup-color);box-shadow:var(--dhx-scheduler-box-shadow-s);border-radius:var(--dhx-scheduler-popup-border-radius);padding:16px}.dhx_cal_datepicker,.dhx_cal_datepicker *,.dhx_mini_calendar,.dhx_mini_calendar *{box-sizing:border-box}.dhx_cal_datepicker_arrow{border:none;background:none;cursor:pointer}.dhx_cal_datepicker_arrow:focus{outline:none}.dhx_cal_datepicker_data,.dhx_year_grid{display:flex;flex-direction:column;justify-content:space-between;height:100%;padding:var(--dhx-scheduler-datepicker-padding);gap:8px;color:var(--dhx-scheduler-month-header-color)}.dhx_cal_datepicker_done{display:flex;justify-content:center;align-items:center}.dhx_cal_datepicker_header{color:var(--dhx-scheduler-base-colors-primary);display:flex;justify-content:space-between;align-items:center;padding:var(--dhx-scheduler-datepicker-padding)}.dhx_cal_datepicker_title{font-weight:var(--dhx-scheduler-datepicker-header-font-size);font-size:var(--dhx-scheduler-datepicker-header-font-size);background:var(--dhx-scheduler-btn-background);color:var(--dhx-scheduler-btn-color);border:1px solid var(--dhx-scheduler-btn-border-color);border-radius:var(--dhx-scheduler-border-radius);height:var(--dhx-scheduler-control-height);padding:var(--dhx-scheduler-btn-padding, 0 20px);display:flex;justify-content:center;align-items:center;box-sizing:border-box;gap:4px;flex-shrink:0;font-weight:500;font-size:var(--dhx-scheduler-font-size);font-family:var(--dhx-scheduler-font-family);font-weight:var(--dhx-scheduler-btn-font-weight, normal);line-height:142%;text-transform:var(--dhx-scheduler-btn-text-transform);cursor:pointer;padding:6px 0;--dhx-scheduler-btn-background: transparent;--dhx-scheduler-btn-color: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-btn-border-color: transparent;--dhx-scheduler-btn-background-hover: transparent;--dhx-scheduler-btn-color-hover: var(--dhx-scheduler-base-colors-primary-hover);--dhx-scheduler-btn-border-hover: transparent;--dhx-scheduler-btn-background-active: transparent;--dhx-scheduler-btn-color-active: var(--dhx-scheduler-base-colors-primary-active);--dhx-scheduler-btn-border-active: transparent;--dhx-scheduler-btn-background-disabled: transparent;--dhx-scheduler-btn-color-disabled: var(--dhx-scheduler-base-colors-icons);--dhx-scheduler-btn-border-color-disabled: transparent}.dhx_cal_datepicker_title:hover{background:var(--dhx-scheduler-btn-background-hover);color:var(--dhx-scheduler-btn-color-hover);border-color:var(--dhx-scheduler-btn-border-hover)}.dhx_cal_datepicker_title:active{background:var(--dhx-scheduler-btn-background-active);color:var(--dhx-scheduler-btn-color-active);border-color:var(--dhx-scheduler-btn-border-active)}.dhx_cal_datepicker_title:disabled{background:var(--dhx-scheduler-btn-background-disabled);color:var(--dhx-scheduler-btn-color-disabled);border-color:var(--dhx-scheduler-btn-border-disabled)}.dhx_cal_datepicker_days{display:grid;grid-template-columns:repeat(var(--dhx-scheduler-week-length, 7),1fr);gap:4px}.dhx_cal_datepicker_dayname,.dhx_cal_datepicker_date{display:flex;align-items:center;justify-content:center;position:relative;transition:all .3s;margin-left:auto;margin-right:auto}.dhx_cal_datepicker_dayname{color:var(--dhx-scheduler-base-colors-icons)}.dhx_cal_datepicker_date{border-radius:50%;width:var(--dhx-scheduler-datepicker-cell-size);height:var(--dhx-scheduler-datepicker-cell-size);color:var(--dhx-scheduler-datepicker-cell-color);background:var(--dhx-scheduler-datepicker-cell-background)}.dhx_cal_datepicker_date.dhx_now{--dhx-scheduler-datepicker-cell-background: var(--dhx-scheduler-timescale-today-background)}.dhx_cal_datepicker_weekend{--dhx-scheduler-datepicker-cell-color: var(--dhx-scheduler-datepicker-weekend-color);--dhx-scheduler-datepicker-cell-background: var(--dhx-scheduler-datepicker-weekend-background)}.dhx_cal_datepicker_date.dhx_before,.dhx_cal_datepicker_date.dhx_after{--dhx-scheduler-datepicker-cell-color: var(--dhx-scheduler-datepicker-prevnext-color);--dhx-scheduler-datepicker-cell-background: var(--dhx-scheduler-datepicker-prevnext-background)}.dhx_cal_datepicker_current{--dhx-scheduler-datepicker-cell-color: var(--dhx-scheduler-datepicker-today-color);--dhx-scheduler-datepicker-cell-background: var(--dhx-scheduler-datepicker-today-background)}.dhx_cal_datepicker_date:not(.dhx_before,.dhx_after):hover,.dhx_cal_datepicker_month:hover,.dhx_cal_datepicker_year:hover{--dhx-scheduler-datepicker-cell-color: var(--dhx-scheduler-datepicker-hover-color);--dhx-scheduler-datepicker-cell-background: var(--dhx-scheduler-datepicker-hover-background)}.dhx_cal_datepicker_months,.dhx_cal_datepicker_years{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.dhx_cal_datepicker_months{column-gap:12px}.dhx_cal_datepicker_years{column-gap:4px}.dhx_cal_datepicker_month,.dhx_cal_datepicker_year{display:flex;align-items:center;justify-content:center;height:var(--dhx-scheduler-datepicker-cell-size);border-radius:10px;padding:4px 8px;transition:background .3s;position:relative;color:var(--dhx-scheduler-datepicker-cell-color);background:var(--dhx-scheduler-datepicker-cell-background)}.dhx_cal_datepicker_done_btn{background:var(--dhx-scheduler-btn-background);color:var(--dhx-scheduler-btn-color);border:1px solid var(--dhx-scheduler-btn-border-color);border-radius:var(--dhx-scheduler-border-radius);height:var(--dhx-scheduler-control-height);padding:var(--dhx-scheduler-btn-padding, 0 20px);display:flex;justify-content:center;align-items:center;box-sizing:border-box;gap:4px;flex-shrink:0;font-weight:500;font-size:var(--dhx-scheduler-font-size);font-family:var(--dhx-scheduler-font-family);font-weight:var(--dhx-scheduler-btn-font-weight, normal);line-height:142%;text-transform:var(--dhx-scheduler-btn-text-transform);cursor:pointer;padding:6px 0;--dhx-scheduler-btn-background: transparent;--dhx-scheduler-btn-color: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-btn-border-color: transparent;--dhx-scheduler-btn-background-hover: transparent;--dhx-scheduler-btn-color-hover: var(--dhx-scheduler-base-colors-primary-hover);--dhx-scheduler-btn-border-hover: transparent;--dhx-scheduler-btn-background-active: transparent;--dhx-scheduler-btn-color-active: var(--dhx-scheduler-base-colors-primary-active);--dhx-scheduler-btn-border-active: transparent;--dhx-scheduler-btn-background-disabled: transparent;--dhx-scheduler-btn-color-disabled: var(--dhx-scheduler-base-colors-icons);--dhx-scheduler-btn-border-color-disabled: transparent}.dhx_cal_datepicker_done_btn:hover{background:var(--dhx-scheduler-btn-background-hover);color:var(--dhx-scheduler-btn-color-hover);border-color:var(--dhx-scheduler-btn-border-hover)}.dhx_cal_datepicker_done_btn:active{background:var(--dhx-scheduler-btn-background-active);color:var(--dhx-scheduler-btn-color-active);border-color:var(--dhx-scheduler-btn-border-active)}.dhx_cal_datepicker_done_btn:disabled{background:var(--dhx-scheduler-btn-background-disabled);color:var(--dhx-scheduler-btn-color-disabled);border-color:var(--dhx-scheduler-btn-border-disabled)}.dhx_datepicker_date_wrapper{position:relative}.dhx_datepicker_date_wrapper:before{font-family:dhx-scheduler-icons!important;font-style:normal;font-weight:400!important;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:flex;justify-content:center;align-items:center;color:var(--dhx-scheduler-base-colors-icons)}.dhx_datepicker_date_wrapper:before{content:""}.dhx_datepicker_date_wrapper:before{position:absolute;right:4px;top:8px;font-size:20px}.dhx_cal_datepicker_event.dhx_cal_datepicker_current,.dhx_cal_datepicker_event:hover{--dhx-scheduler-event-marker-color: var(--dhx-scheduler-datepicker-hover-color)}.dhx_cal_datepicker_event:after{content:"";width:4px;height:4px;border-radius:50%;position:absolute;bottom:2px;left:50%;transform:translate(-50%);background:var(--dhx-scheduler-event-marker-color)}.dhx_minical_popup{position:absolute;z-index:15}.dhx_mini_calendar{font-size:var(--dhx-scheduler-datepicker-font-size);font-family:var(--dhx-scheduler-datepicker-family);line-height:142%;font-weight:400;border:var(--dhx-scheduler-popup-border);background:var(--dhx-scheduler-popup-background);color:var(--dhx-scheduler-popup-color);box-shadow:var(--dhx-scheduler-box-shadow-m);border-radius:var(--dhx-scheduler-popup-border-radius);--dhx-scheduler-datepicker-font-size: var(--dhx-scheduler-caption-font-size);--dhx-scheduler-header-border: none}.dhx_mini_calendar .dhx_cal_month_row{height:35px!important}.dhx_mini_calendar .dhx_year_week{border-bottom:var(--dhx-scheduler-default-border)}.dhx_mini_calendar .dhx_scale_bar{position:static}.dhx_mini_calendar .dhx_year_month{font-weight:500;font-size:var(--dhx-scheduler-font-size)}.dhx_mini_calendar .dhx_month_body{display:none}.dhx_mini_calendar .dhx_cal_month_cell{display:flex;justify-content:center;align-items:center;border-radius:50%;border:none;background:var(--dhx-scheduler-popup-background)}.dhx_mini_calendar .dhx_month_head{border-radius:50%;color:var(--dhx-scheduler-datepicker-cell-color);background:var(--dhx-scheduler-datepicker-cell-background);width:30px!important;height:30px!important;padding:4px;justify-content:center;align-items:center;cursor:pointer}.dhx_mini_calendar div.dhx_month_head.dhx_year_event{background-color:#0288d133;color:#0288d1;font-weight:500}.dhx_mini_calendar div.dhx_month_head.dhx_calendar_click{background-color:#e5e5e5;color:#000000bf;font-weight:500}.dhx_mini_calendar .dhx_now .dhx_month_head{background-color:#f7f7f7}.dhx_mini_calendar .dhx_after .dhx_month_head,.dhx_mini_calendar .dhx_before .dhx_month_head{--dhx-scheduler-datepicker-cell-color: var(--dhx-scheduler-inactive-month-color)}.dhx_minical_input_wrapper{position:relative}.dhx_minical_input_wrapper:before{font-family:dhx-scheduler-icons!important;font-style:normal;font-weight:400!important;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:flex;justify-content:center;align-items:center;color:var(--dhx-scheduler-base-colors-icons)}.dhx_minical_input_wrapper:before{content:""}.dhx_minical_input_wrapper:before{pointer-events:none;position:absolute;right:5px;top:7px;font-size:20px}.scheduler_message_area{position:fixed;right:5px;width:250px;z-index:11}.scheduler-info{min-width:120px;padding:12px;font-family:var(--dhx-scheduler-font-family);font-size:var(--dhx-scheduler-regular-font-size);font-weight:var(--dhx-scheduler-regular-font-weight);line-height:var(--dhx-scheduler-regular-line-height);z-index:14;overflow:hidden;margin:5px 5px 10px;transition:all .5s ease;background:var(--dhx-scheduler-info-background);color:var(--dhx-scheduler-info-color);border:var(--dhx-scheduler-info-border);box-shadow:var(--dhx-scheduler-info-shadow)}.scheduler-info.hidden{height:0px;padding:0;border-width:0px;margin:0;overflow:hidden}.scheduler_modal_box{overflow:hidden;position:fixed;min-width:300px;width:var(--dhx-scheduler-modal-width);background:var(--dhx-scheduler-modal-background);box-shadow:var(--dhx-scheduler-box-shadow-l);border:var(--dhx-scheduler-modal-border);z-index:18;border-radius:var(--dhx-scheduler-modal-border-radius);font-family:var(--dhx-scheduler-font-family);font-size:var(--dhx-scheduler-font-size);line-height:150%}.scheduler_popup_text{color:var(--dhx-scheduler-base-colors-text-base)}.scheduler_popup_title{border-top-left-radius:var(--dhx-scheduler-modal-border-radius);border-top-right-radius:var(--dhx-scheduler-modal-border-radius);text-transform:uppercase;font-weight:var(--dhx-scheduler-heading-font-weight);padding:calc(var(--dhx-scheduler-modal-padding)/2) var(--dhx-scheduler-modal-padding);display:flex;justify-content:center;align-items:center}.scheduler_popup_text{padding:var(--dhx-scheduler-modal-padding);display:flex;justify-content:center;align-items:center}.scheduler_popup_controls{display:flex;flex-direction:row-reverse;padding:calc(var(--dhx-scheduler-modal-padding)/2) var(--dhx-scheduler-modal-padding);align-items:center;gap:12px}.scheduler-info,.scheduler_popup_button,.scheduler_button{-webkit-user-select:none;user-select:none;cursor:pointer}.scheduler_popup_text{overflow:hidden}div.dhx_modal_cover{background:#44494E;opacity:.2;position:fixed;z-index:17;left:0;top:0;width:100%;height:100%;border:none}.scheduler_popup_controls{border-radius:var(--dhx-scheduler-border-radius)}.scheduler_message_area .scheduler-error{--dhx-scheduler-info-background: var(--dhx-scheduler-base-colors-error);--dhx-scheduler-info-color: var(--dhx-scheduler-base-colors-white)}.scheduler_message_area .scheduler-warning{--dhx-scheduler-info-background: var(--dhx-scheduler-base-colors-warning)}.scheduler_modal_box.scheduler-error .scheduler_popup_title{background:#d81b1b;border:1px solid #ff3c3c;color:#fff}.scheduler_modal_box.scheduler-error .scheduler_popup_title{background:#FFAB00;border:1px solid #FFAB00}.dhtmlXTooltip.tooltip{box-shadow:var(--dhx-scheduler-box-shadow-m);background-color:var(--dhx-scheduler-popup-background);color:var(--dhx-scheduler-popup-color);border:var(--dhx-scheduler-popup-border);cursor:default;padding:12px;position:fixed;z-index:9;opacity:1;font-family:var(--dhx-scheduler-font-family);font-size:var(--dhx-scheduler-regular-font-size);line-height:var(--dhx-scheduler-regular-line-height);font-weight:var(--dhx-scheduler-regular-font-weight)}.dhtmlXTooltip_rtl{direction:rtl}.dhx_focus_slot{background:var(--dhx-scheduler-base-colors-select);position:absolute;pointer-events:none;opacity:.5}.dhx_cal_container *:focus{outline-style:solid;outline-style:auto;outline-color:var(--dhx-scheduler-base-colors-select)}.dhx_no_select{-webkit-user-select:none;user-select:none}.dhx_drag_placeholder{z-index:10;opacity:.8}.dhx_drag_placeholder .dhx_cal_select_menu{display:none}.dhx_cal_light_readonly .dhx_section_time{display:block}.dhx_cal_light_readonly .dhx_section_time .dhx_section_time_spacer{visibility:visible}.dhx_cal_light_readonly .dhx_cal_lsection+div{padding-top:4px;padding-bottom:4px}.scheduler-info.scheduler-popup_after_delete{cursor:default;border-radius:var(--dhx-scheduler-border-radius);padding:0;width:225px;--dhx-scheduler-info-background: var(--dhx-scheduler-undo-delete-background);--dhx-scheduler-info-color: var(--dhx-scheduler-undo-delete-color)}.dhx_info_message{display:flex;justify-content:space-between;align-items:center;padding:8px 12px}.undo_popup_text{text-align:center}.undo_button{background:var(--dhx-scheduler-btn-background);color:var(--dhx-scheduler-btn-color);border:1px solid var(--dhx-scheduler-btn-border-color);border-radius:var(--dhx-scheduler-border-radius);height:var(--dhx-scheduler-control-height);padding:var(--dhx-scheduler-btn-padding, 0 20px);display:flex;justify-content:center;align-items:center;box-sizing:border-box;gap:4px;flex-shrink:0;font-weight:500;font-size:var(--dhx-scheduler-font-size);font-family:var(--dhx-scheduler-font-family);font-weight:var(--dhx-scheduler-btn-font-weight, normal);line-height:142%;text-transform:var(--dhx-scheduler-btn-text-transform);cursor:pointer;padding:6px 0;--dhx-scheduler-btn-background: transparent;--dhx-scheduler-btn-color: var(--dhx-scheduler-base-colors-primary);--dhx-scheduler-btn-border-color: transparent;--dhx-scheduler-btn-background-hover: transparent;--dhx-scheduler-btn-color-hover: var(--dhx-scheduler-base-colors-primary-hover);--dhx-scheduler-btn-border-hover: transparent;--dhx-scheduler-btn-background-active: transparent;--dhx-scheduler-btn-color-active: var(--dhx-scheduler-base-colors-primary-active);--dhx-scheduler-btn-border-active: transparent;--dhx-scheduler-btn-background-disabled: transparent;--dhx-scheduler-btn-color-disabled: var(--dhx-scheduler-base-colors-icons);--dhx-scheduler-btn-border-color-disabled: transparent}.undo_button:hover{background:var(--dhx-scheduler-btn-background-hover);color:var(--dhx-scheduler-btn-color-hover);border-color:var(--dhx-scheduler-btn-border-hover)}.undo_button:active{background:var(--dhx-scheduler-btn-background-active);color:var(--dhx-scheduler-btn-color-active);border-color:var(--dhx-scheduler-btn-border-active)}.undo_button:disabled{background:var(--dhx-scheduler-btn-background-disabled);color:var(--dhx-scheduler-btn-color-disabled);border-color:var(--dhx-scheduler-btn-border-disabled)}.dhx_scheduler_month .dhx_marked_timespan.dhx_scheduler_dnd_marker{display:block;margin-top:-4px}.dhx_marked_timespan.dhx_scheduler_dnd_marker{justify-content:flex-start;align-items:flex-start}.dhx_scheduler_dnd_marker{opacity:.5} diff --git a/codebase/dhtmlxscheduler.es.js b/codebase/dhtmlxscheduler.es.js index 4d33cf5..3d80d6d 100644 --- a/codebase/dhtmlxscheduler.es.js +++ b/codebase/dhtmlxscheduler.es.js @@ -1,3 +1,12 @@ +/** @license + +dhtmlxScheduler v.7.1.3 Standard + +To use dhtmlxScheduler in non-GPL projects (and get Pro version of the product), please obtain Commercial/Enterprise or Ultimate license on our site https://dhtmlx.com/docs/products/dhtmlxScheduler/#licensing or contact us at sales@dhtmlx.com + +(c) XB Software Ltd. + +*/ const oe = typeof window < "u" ? window : global; function Nt(e) { let i = [], t = !1, r = null, d = null; @@ -9,79 +18,79 @@ function Nt(e) { return l ? l.layout : o; } function _(o) { - const { event: l, layout: h, viewName: v, sectionId: u, eventNode: f } = o; - (function(m, g) { + const { event: l, layout: h, viewName: m, sectionId: v, eventNode: u } = o; + (function(p, g) { switch (g) { case "month": - m.style.top = "", m.style.left = ""; + p.style.top = "", p.style.left = ""; break; case "timeline": - m.style.left = "", m.style.marginLeft = "1px"; + p.style.left = "", p.style.marginLeft = "1px"; break; default: - m.style.top = ""; + p.style.top = ""; } - })(f, h); + })(u, h); const c = {}; - let p = { start_date: l.start_date, end_date: l.end_date, css: "dhx_scheduler_dnd_marker", html: f }; - return h != "timeline" && h != "month" || (p = { ...p, end_date: e.date.add(l.start_date, 1, "minute") }), u && (c[v] = u, p.sections = c), p; + let f = { start_date: l.start_date, end_date: l.end_date, css: "dhx_scheduler_dnd_marker", html: u }; + return h != "timeline" && h != "month" || (f = { ...f, end_date: e.date.add(l.start_date, 1, "minute") }), v && (c[m] = v, f.sections = c), f; } function a(o) { const { layout: l } = o; let h; switch (l) { case "month": - h = function(v) { - let u = []; - const { event: f, layout: c, viewName: p, sectionId: m } = v, g = []; - let y = new Date(f.start_date); - for (; y.valueOf() < f.end_date.valueOf(); ) { + h = function(m) { + let v = []; + const { event: u, layout: c, viewName: f, sectionId: p } = m, g = []; + let y = new Date(u.start_date); + for (; y.valueOf() < u.end_date.valueOf(); ) { let b = { start_date: y }; g.push(b), y = e.date.week_start(e.date.add(y, 1, "week")); } - let x = e.$container.querySelectorAll(`[${e.config.event_attribute}='${f.id}']`); + let x = e.$container.querySelectorAll(`[${e.config.event_attribute}='${u.id}']`); for (let b = 0; b < x.length; b++) { - const k = { event: g[b], layout: c, viewName: p, sectionId: m, eventNode: x[b].cloneNode(!0) }; - u.push(_(k)); + const k = { event: g[b], layout: c, viewName: f, sectionId: p, eventNode: x[b].cloneNode(!0) }; + v.push(_(k)); } - return u; + return v; }(o); break; case "timeline": case "units": - h = function(v) { - let u = []; - const { event: f, layout: c, viewName: p, eventNode: m } = v; + h = function(m) { + let v = []; + const { event: u, layout: c, viewName: f, eventNode: p } = m; let g = function(y) { const x = e.getView(y); return x.y_property ? x.y_property : x.map_to ? x.map_to : void 0; - }(p); - if (e.config.multisection && g) { - const y = String(f[g]).split(e.config.section_delimiter).map((b) => String(b)), x = []; + }(f); + if (g) { + const y = String(u[g]).split(e.config.section_delimiter).map((b) => String(b)), x = []; for (let b = 0; b < y.length; b++) { - x[b] = m.cloneNode(!0); - const k = { event: f, layout: c, viewName: p, sectionId: y[b], eventNode: x[b] }; - u.push(_(k)); + x[b] = p.cloneNode(!0); + const k = { event: u, layout: c, viewName: f, sectionId: y[b], eventNode: x[b] }; + v.push(_(k)); } } - return u; + return v; }(o); break; default: - h = function(v) { - const { event: u, layout: f, viewName: c, sectionId: p } = v; - let m = [], g = e.$container.querySelectorAll(`[${e.config.event_attribute}='${u.id}']:not(.dhx_cal_select_menu):not(.dhx_drag_marker)`); + h = function(m) { + const { event: v, layout: u, viewName: c, sectionId: f } = m; + let p = [], g = e.$container.querySelectorAll(`[${e.config.event_attribute}='${v.id}']:not(.dhx_cal_select_menu):not(.dhx_drag_marker)`); if (g) for (let y = 0; y < g.length; y++) { let x = g[y].cloneNode(!0); - const b = { event: { start_date: /* @__PURE__ */ new Date(+x.getAttribute("data-bar-start")), end_date: /* @__PURE__ */ new Date(+x.getAttribute("data-bar-end")) }, layout: f, viewName: c, sectionId: p, eventNode: x }; - m.push(_(b)); + const b = { event: { start_date: /* @__PURE__ */ new Date(+x.getAttribute("data-bar-start")), end_date: /* @__PURE__ */ new Date(+x.getAttribute("data-bar-end")) }, layout: u, viewName: c, sectionId: f, eventNode: x }; + p.push(_(b)); } - return m; + return p; }(o); } - h.forEach((v) => { - i.push(e.markTimespan(v)); + h.forEach((m) => { + i.push(e.markTimespan(m)); }); } e.attachEvent("onBeforeDrag", function(o, l, h) { @@ -89,12 +98,12 @@ function Nt(e) { }), e.attachEvent("onEventDrag", function(o, l, h) { if (t && n()) { t = !1; - const v = e.getState().mode, u = s(v), f = e.getActionData(h).section; - d && a({ event: d, layout: u, viewName: v, sectionId: f, eventNode: r }); + const m = e.getState().mode, v = s(m), u = e.getActionData(h).section; + d && a({ event: d, layout: v, viewName: m, sectionId: u, eventNode: r }); } }), e.attachEvent("onDragEnd", function(o, l, h) { - for (let v = 0; v < i.length; v++) - e.unmarkTimespan(i[v]); + for (let m = 0; m < i.length; m++) + e.unmarkTimespan(i[m]); i = [], r = null, d = null; }); } @@ -107,13 +116,13 @@ function Mt(e) { }(a, n, s)), a; }; function d(n, s, _, a, o) { - var l = e, h = [], v = { _props: "map_to", matrix: "y_property" }; - for (var u in v) { - var f = v[u]; - if (l[u]) - for (var c in l[u]) { - var p = l[u][c][f]; - n[p] && (h = l._add_timespan_zones(h, e._get_blocked_zones(s[c], n[p], _, a, o))); + var l = e, h = [], m = { _props: "map_to", matrix: "y_property" }; + for (var v in m) { + var u = m[v]; + if (l[v]) + for (var c in l[v]) { + var f = l[v][c][u]; + n[f] && (h = l._add_timespan_zones(h, e._get_blocked_zones(s[c], n[f], _, a, o))); } } return h = l._add_timespan_zones(h, e._get_blocked_zones(s, "global", _, a, o)); @@ -127,11 +136,11 @@ function Mt(e) { }, e.checkInMarkedTimespan = function(n, s, _) { s = s || t; for (var a = !0, o = new Date(n.start_date.valueOf()), l = e.date.add(o, 1, "day"), h = e._marked_timespans; o < n.end_date; o = e.date.date_part(l), l = e.date.add(o, 1, "day")) { - var v = +e.date.date_part(new Date(o)), u = d(n, h, o.getDay(), v, s); - if (u) - for (var f = 0; f < u.length; f += 2) { - var c = e._get_zone_minutes(o), p = n.end_date > l || n.end_date.getDate() != o.getDate() ? 1440 : e._get_zone_minutes(n.end_date), m = u[f], g = u[f + 1]; - if (m < p && g > c && !(a = typeof _ == "function" && _(n, c, p, m, g))) + var m = +e.date.date_part(new Date(o)), v = d(n, h, o.getDay(), m, s); + if (v) + for (var u = 0; u < v.length; u += 2) { + var c = e._get_zone_minutes(o), f = n.end_date > l || n.end_date.getDate() != o.getDate() ? 1440 : e._get_zone_minutes(n.end_date), p = v[u], g = v[u + 1]; + if (p < f && g > c && !(a = typeof _ == "function" && _(n, c, f, p, g))) break; } } @@ -141,23 +150,23 @@ function Mt(e) { return !0; var s = e, _ = s.config, a = []; if (n.rec_type && n._end_date || n.rrule) { - const u = n._end_date || n.end_date; - return !_.limit_start || !_.limit_end || u.valueOf() >= _.limit_start.valueOf() && n.start_date.valueOf() <= _.limit_end.valueOf(); + const v = n._end_date || n.end_date; + return !_.limit_start || !_.limit_end || v.valueOf() >= _.limit_start.valueOf() && n.start_date.valueOf() <= _.limit_end.valueOf(); } a = [n]; for (var o = !0, l = 0; l < a.length; l++) { - var h = !0, v = a[l]; - v._timed = e.isOneDayEvent(v), (h = !_.limit_start || !_.limit_end || v.start_date.valueOf() >= _.limit_start.valueOf() && v.end_date.valueOf() <= _.limit_end.valueOf()) && (h = !e.checkInMarkedTimespan(v, i, function(u, f, c, p, m) { + var h = !0, m = a[l]; + m._timed = e.isOneDayEvent(m), (h = !_.limit_start || !_.limit_end || m.start_date.valueOf() >= _.limit_start.valueOf() && m.end_date.valueOf() <= _.limit_end.valueOf()) && (h = !e.checkInMarkedTimespan(m, i, function(v, u, c, f, p) { var g = !0; - return f <= m && f >= p && ((m == 1440 || c <= m) && (g = !1), u._timed && s._drag_id && s._drag_mode == "new-size" ? (u.start_date.setHours(0), u.start_date.setMinutes(m)) : g = !1), (c >= p && c <= m || f < p && c > m) && (u._timed && s._drag_id && s._drag_mode == "new-size" ? (u.end_date.setHours(0), u.end_date.setMinutes(p)) : g = !1), g; - })), h || (h = s.checkEvent("onLimitViolation") ? s.callEvent("onLimitViolation", [v.id, v]) : h), o = o && h; + return u <= p && u >= f && ((p == 1440 || c <= p) && (g = !1), v._timed && s._drag_id && s._drag_mode == "new-size" ? (v.start_date.setHours(0), v.start_date.setMinutes(p)) : g = !1), (c >= f && c <= p || u < f && c > p) && (v._timed && s._drag_id && s._drag_mode == "new-size" ? (v.end_date.setHours(0), v.end_date.setMinutes(f)) : g = !1), g; + })), h || (h = s.checkEvent("onLimitViolation") ? s.callEvent("onLimitViolation", [m.id, m]) : h), o = o && h; } return o || (s._drag_id = null, s._drag_mode = null), o; }, e._get_blocked_zones = function(n, s, _, a, o) { var l = []; if (n && n[s]) - for (var h = n[s], v = this._get_relevant_blocked_zones(_, a, h, o), u = 0; u < v.length; u++) - l = this._add_timespan_zones(l, v[u].zones); + for (var h = n[s], m = this._get_relevant_blocked_zones(_, a, h, o), v = 0; v < m.length; v++) + l = this._add_timespan_zones(l, m[v].zones); return l; }, e._get_relevant_blocked_zones = function(n, s, _, a) { var o; @@ -174,15 +183,15 @@ function Mt(e) { var _ = "dhx_now_time", a = e._get_zone_minutes(s), o = { zones: [a, a + 1], css: _, type: _ }; if (!this._table_view) { if (this._props && this._props[this._mode]) { - var l, h, v = this._props[this._mode], u = v.size || v.options.length; - v.days > 1 ? (v.size && v.options.length && (n = (v.position + n) / v.options.length * v.size), l = n, h = n + u) : h = (l = 0) + u; - for (var f = [], c = l; c < h; c++) { - var p = c; - o.days = p; - var m = e._render_marked_timespan(o, null, p)[0]; - f.push(m); + var l, h, m = this._props[this._mode], v = m.size || m.options.length; + m.days > 1 ? (m.size && m.options.length && (n = (m.position + n) / m.options.length * m.size), l = n, h = n + v) : h = (l = 0) + v; + for (var u = [], c = l; c < h; c++) { + var f = c; + o.days = f; + var p = e._render_marked_timespan(o, null, f)[0]; + u.push(p); } - return f; + return u; } return o.days = n, e._render_marked_timespan(o, null, n); } @@ -210,21 +219,21 @@ function Mt(e) { n.zones == "fullday" && (n.zones = [0, 1440]), n.zones && n.invert_zones && (n.zones = e.invertZones(n.zones)), n.id = e.uid(), n.css = n.css || "", n.type = n.type || t; var h = n.sections; if (h) { - for (var v in h) - if (h.hasOwnProperty(v)) { - var u = h[v]; - for (u instanceof Array || (u = [u]), o = 0; o < u.length; o++) - (x = e._lame_copy({}, n)).sections = {}, x.sections[v] = u[o], _.push(x); + for (var m in h) + if (h.hasOwnProperty(m)) { + var v = h[m]; + for (v instanceof Array || (v = [v]), o = 0; o < v.length; o++) + (x = e._lame_copy({}, n)).sections = {}, x.sections[m] = v[o], _.push(x); } } else _.push(n); - for (var f = 0; f < _.length; f++) { - var c = _[f], p = c.start_date, m = c.end_date; - if (p && m) - for (var g = e.date.date_part(new Date(p)), y = e.date.add(g, 1, "day"); g < m; ) { + for (var u = 0; u < _.length; u++) { + var c = _[u], f = c.start_date, p = c.end_date; + if (f && p) + for (var g = e.date.date_part(new Date(f)), y = e.date.add(g, 1, "day"); g < p; ) { var x; delete (x = e._lame_copy({}, c)).start_date, delete x.end_date, x.days = g.valueOf(); - var b = p > g ? e._get_zone_minutes(p) : 0, k = m > y || m.getDate() != g.getDate() ? 1440 : e._get_zone_minutes(m); + var b = f > g ? e._get_zone_minutes(f) : 0, k = p > y || p.getDate() != g.getDate() ? 1440 : e._get_zone_minutes(p); x.zones = [b, k], s.push(x), g = y, y = e.date.add(y, 1, "day"); } else @@ -244,40 +253,40 @@ function Mt(e) { var s = document.createElement("div"); return n.html && (typeof n.html == "string" ? s.innerHTML = n.html : s.appendChild(n.html)), s; }, e._render_marked_timespan = function(n, s, _) { - var a = [], o = e.config, l = this._min_date, h = this._max_date, v = !1; + var a = [], o = e.config, l = this._min_date, h = this._max_date, m = !1; if (!o.display_marked_timespans) return a; if (!_ && _ !== 0) { if (n.days < 7) _ = n.days; else { - var u = new Date(n.days); - if (v = +u, !(+h > +u && +l <= +u)) + var v = new Date(n.days); + if (m = +v, !(+h > +v && +l <= +v)) return a; - _ = u.getDay(); + _ = v.getDay(); } - var f = l.getDay(); - f > _ ? _ = 7 - (f - _) : _ -= f; + var u = l.getDay(); + u > _ ? _ = 7 - (u - _) : _ -= u; } - var c = n.zones, p = e._get_css_classes_by_config(n); + var c = n.zones, f = e._get_css_classes_by_config(n); if (e._table_view && e._mode == "month") { - var m = [], g = []; + var p = [], g = []; if (s) - m.push(s), g.push(_); + p.push(s), g.push(_); else { - g = v ? [v] : e._get_dates_by_index(_); + g = m ? [m] : e._get_dates_by_index(_); for (var y = 0; y < g.length; y++) - m.push(this._scales[g[y]]); + p.push(this._scales[g[y]]); } - for (y = 0; y < m.length; y++) { - s = m[y], _ = g[y]; + for (y = 0; y < p.length; y++) { + s = p[y], _ = g[y]; var x = this.locate_holder_day(_, !1) % this._cols.length; if (!this._ignores[x]) { var b = e._get_block_by_config(n); - b.className = p, b.style.top = "0px", b.style.height = "100%"; + b.className = f, b.style.top = "0px", b.style.height = "100%"; for (var k = 0; k < c.length; k += 2) { - var E = c[y]; - if ((N = c[y + 1]) <= E) + var w = c[y]; + if ((N = c[y + 1]) <= w) return []; (M = b.cloneNode(!0)).style.left = "0px", M.style.width = "100%", s.appendChild(M), a.push(M); } @@ -288,21 +297,21 @@ function Mt(e) { if (this._ignores[this.locate_holder_day(_, !1)]) return a; if (this._props && this._props[this._mode] && n.sections && n.sections[this._mode]) { - var w = this._props[this._mode]; - D = w.order[n.sections[this._mode]]; - var S = w.order[n.sections[this._mode]]; - w.days > 1 ? D = D * (w.size || w.options.length) + S : (D = S, w.size && D > w.position + w.size && (D = 0)); + var E = this._props[this._mode]; + D = E.order[n.sections[this._mode]]; + var S = E.order[n.sections[this._mode]]; + E.days > 1 ? D = D * (E.size || E.options.length) + S : (D = S, E.size && D > E.position + E.size && (D = 0)); } for (s = s || e.locate_holder(D), y = 0; y < c.length; y += 2) { var N, M; - if (E = Math.max(c[y], 60 * o.first_hour), (N = Math.min(c[y + 1], 60 * o.last_hour)) <= E) { + if (w = Math.max(c[y], 60 * o.first_hour), (N = Math.min(c[y + 1], 60 * o.last_hour)) <= w) { if (y + 2 < c.length) continue; return []; } - (M = e._get_block_by_config(n)).className = p; - var A = 24 * this.config.hour_size_px + 1, T = 36e5; - M.style.top = Math.round((60 * E * 1e3 - this.config.first_hour * T) * this.config.hour_size_px / T) % A + "px", M.style.height = Math.max(Math.round(60 * (N - E) * 1e3 * this.config.hour_size_px / T) % A, 1) + "px", s.appendChild(M), a.push(M); + (M = e._get_block_by_config(n)).className = f; + var T = 24 * this.config.hour_size_px + 1, A = 36e5; + M.style.top = Math.round((60 * w * 1e3 - this.config.first_hour * A) * this.config.hour_size_px / A) % T + "px", M.style.height = Math.max(Math.round(60 * (N - w) * 1e3 * this.config.hour_size_px / A) % T, 1) + "px", s.appendChild(M), a.push(M); } } return a; @@ -339,18 +348,18 @@ function Mt(e) { }, e._addMarkerTimespanConfig = function(n) { var s = "global", _ = e._marked_timespans, a = n.id, o = e._marked_timespans_ids; o[a] || (o[a] = []); - var l = n.days, h = n.sections, v = n.type; + var l = n.days, h = n.sections, m = n.type; if (n.id = a, h) { - for (var u in h) - if (h.hasOwnProperty(u)) { - _[u] || (_[u] = {}); - var f = h[u], c = _[u]; - c[f] || (c[f] = {}), c[f][l] || (c[f][l] = {}), c[f][l][v] || (c[f][l][v] = [], e._marked_timespans_types || (e._marked_timespans_types = {}), e._marked_timespans_types[v] || (e._marked_timespans_types[v] = !0)); - var p = c[f][l][v]; - n._array = p, p.push(n), o[a].push(n); + for (var v in h) + if (h.hasOwnProperty(v)) { + _[v] || (_[v] = {}); + var u = h[v], c = _[v]; + c[u] || (c[u] = {}), c[u][l] || (c[u][l] = {}), c[u][l][m] || (c[u][l][m] = [], e._marked_timespans_types || (e._marked_timespans_types = {}), e._marked_timespans_types[m] || (e._marked_timespans_types[m] = !0)); + var f = c[u][l][m]; + n._array = f, f.push(n), o[a].push(n); } } else - _[s][l] || (_[s][l] = {}), _[s][l][v] || (_[s][l][v] = []), e._marked_timespans_types || (e._marked_timespans_types = {}), e._marked_timespans_types[v] || (e._marked_timespans_types[v] = !0), p = _[s][l][v], n._array = p, p.push(n), o[a].push(n); + _[s][l] || (_[s][l] = {}), _[s][l][m] || (_[s][l][m] = []), e._marked_timespans_types || (e._marked_timespans_types = {}), e._marked_timespans_types[m] || (e._marked_timespans_types[m] = !0), f = _[s][l][m], n._array = f, f.push(n), o[a].push(n); }, e._marked_timespans_ids = {}, e.addMarkedTimespan = function(n) { var s = e._prepare_timespan_options(n); if (s.length) { @@ -363,27 +372,27 @@ function Mt(e) { if (s = s.slice(), !_.length) return s; for (var a = 0; a < _.length; a += 2) - for (var o = _[a], l = _[a + 1], h = a + 2 == _.length, v = 0; v < s.length; v += 2) { - var u = s[v], f = s[v + 1]; - if (f > l && u <= l || u < o && f >= o) - _[a] = Math.min(o, u), _[a + 1] = Math.max(l, f), a -= 2; + for (var o = _[a], l = _[a + 1], h = a + 2 == _.length, m = 0; m < s.length; m += 2) { + var v = s[m], u = s[m + 1]; + if (u > l && v <= l || v < o && u >= o) + _[a] = Math.min(o, v), _[a + 1] = Math.max(l, u), a -= 2; else { if (!h) continue; - var c = o > u ? 0 : 2; - _.splice(a + c, 0, u, f); + var c = o > v ? 0 : 2; + _.splice(a + c, 0, v, u); } - s.splice(v--, 2); + s.splice(m--, 2); break; } return _; }, e._subtract_timespan_zones = function(n, s) { for (var _ = n.slice(), a = 0; a < _.length; a += 2) for (var o = _[a], l = _[a + 1], h = 0; h < s.length; h += 2) { - var v = s[h], u = s[h + 1]; - if (u > o && v < l) { - var f = !1; - o >= v && l <= u && _.splice(a, 2), o < v && (_.splice(a, 2, o, v), f = !0), l > u && _.splice(f ? a + 2 : a, f ? 0 : 2, u, l), a -= 2; + var m = s[h], v = s[h + 1]; + if (v > o && m < l) { + var u = !1; + o >= m && l <= v && _.splice(a, 2), o < m && (_.splice(a, 2, o, m), u = !0), l > v && _.splice(u ? a + 2 : a, u ? 0 : 2, v, l), a -= 2; break; } } @@ -405,8 +414,8 @@ function Mt(e) { if (a) { for (var h in a) if (a.hasOwnProperty(h) && _[h]) { - var v = a[h]; - _[h][v] && (s = _[h][v]); + var m = a[h]; + _[h][m] && (s = _[h][m]); } } else s = _.global; @@ -414,10 +423,10 @@ function Mt(e) { if (o !== void 0) s[o] && s[o][l] && (e._addMarkerTimespanConfig(n), e._delete_marked_timespans_list(s[o][l], n)); else - for (var u in s) - if (s[u][l]) { - var f = e._lame_clone(n); - n.days = u, e._addMarkerTimespanConfig(f), e._delete_marked_timespans_list(s[u][l], n); + for (var v in s) + if (s[v][l]) { + var u = e._lame_clone(n); + n.days = v, e._addMarkerTimespanConfig(u), e._delete_marked_timespans_list(s[v][l], n); } } }, e._delete_marked_timespans_list = function(n, s) { @@ -447,8 +456,8 @@ function Mt(e) { s.push(_); for (var a = e._prepare_timespan_options(n), o = 0; o < a.length; o++) for (var l = a[o], h = 0; h < s.length; h++) { - var v = e._lame_clone(l); - v.type = s[h], e._delete_marked_timespan_by_config(v); + var m = e._lame_clone(l); + m.type = s[h], e._delete_marked_timespan_by_config(m); } } }, e._get_types_to_render = function(n, s) { @@ -463,12 +472,12 @@ function Mt(e) { return s; }, e._on_scale_add_marker = function(n, s) { if (!e._table_view || e._mode == "month") { - var _ = s.getDay(), a = s.valueOf(), o = this._mode, l = e._marked_timespans, h = [], v = []; + var _ = s.getDay(), a = s.valueOf(), o = this._mode, l = e._marked_timespans, h = [], m = []; if (this._props && this._props[o]) { - var u = this._props[o], f = u.options, c = f[e._get_unit_index(u, s)]; - if (u.days > 1) { - var p = Math.round((s - e._min_date) / 864e5), m = u.size || f.length; - s = e.date.add(e._min_date, Math.floor(p / m), "day"), s = e.date.date_part(s); + var v = this._props[o], u = v.options, c = u[e._get_unit_index(v, s)]; + if (v.days > 1) { + var f = Math.round((s - e._min_date) / 864e5), p = v.size || u.length; + s = e.date.add(e._min_date, Math.floor(f / p), "day"), s = e.date.date_part(s); } else s = e.date.date_part(new Date(this._date)); if (_ = s.getDay(), a = s.valueOf(), l[o] && l[o][c.key]) { @@ -483,8 +492,8 @@ function Mt(e) { } else x[a] && h.push.apply(h, e._get_configs_to_render(x[a])), x[_] && h.push.apply(h, e._get_configs_to_render(x[_])); for (var k = 0; k < h.length; k++) - v.push.apply(v, e._render_marked_timespan(h[k], n, s)); - return v; + m.push.apply(m, e._render_marked_timespan(h[k], n, s)); + return m; } }, e.attachEvent("onScaleAdd", function() { e._on_scale_add_marker.apply(e, arguments); @@ -523,25 +532,25 @@ function Tt(e) { return void _(a); var l, h = this._dp && this._dp.updateMode != "off"; h && (l = this._dp.updateMode, this._dp.setUpdateMode("off")); - const v = { setModeDate: { date: null, mode: null }, needRender: !1, needUpdateView: !1, repaintEvents: {} }, u = (c, p) => { - c && (v.setModeDate.date = c), p && (v.setModeDate.mode = p); + const m = { setModeDate: { date: null, mode: null }, needRender: !1, needUpdateView: !1, repaintEvents: {} }, v = (c, f) => { + c && (m.setModeDate.date = c), f && (m.setModeDate.mode = f); }; - var f = { render: (c, p) => { - v.needRender = !0, u(c, p); - }, setCurrentView: (c, p) => { - v.needRender = !0, u(c, p); - }, updateView: (c, p) => { - v.needUpdateView = !0, u(c, p); - }, render_data: () => v.needRender = !0, render_view_data: (c) => { - c && c.length ? c.forEach((p) => v.repaintEvents[p.id] = !0) : v.needRender = !0; + var u = { render: (c, f) => { + m.needRender = !0, v(c, f); + }, setCurrentView: (c, f) => { + m.needRender = !0, v(c, f); + }, updateView: (c, f) => { + m.needUpdateView = !0, v(c, f); + }, render_data: () => m.needRender = !0, render_view_data: (c) => { + c && c.length ? c.forEach((f) => m.repaintEvents[f.id] = !0) : m.needRender = !0; } }; - if (n.call(this, f), t = !0, this.callEvent("onBeforeBatchUpdate", []), _(a), this.callEvent("onAfterBatchUpdate", []), s.call(this), t = !1, !o) - if (v.needRender) - e.render(v.setModeDate.date, v.setModeDate.mode); - else if (v.needUpdateView) - e.updateView(v.setModeDate.date, v.setModeDate.mode); + if (n.call(this, u), t = !0, this.callEvent("onBeforeBatchUpdate", []), _(a), this.callEvent("onAfterBatchUpdate", []), s.call(this), t = !1, !o) + if (m.needRender) + e.render(m.setModeDate.date, m.setModeDate.mode); + else if (m.needUpdateView) + e.updateView(m.setModeDate.date, m.setModeDate.mode); else - for (const c in v.repaintEvents) + for (const c in m.repaintEvents) e.updateEvent(c); h && (this._dp.setUpdateMode(l), this._dp.sendData()); }; @@ -655,32 +664,32 @@ function Ot(e) { } }; function r(_) { var a = function(h) { - var v; + var m; if (h.view) switch (h.view) { case "today": case "next": case "prev": - v = t.builtInButton; + m = t.builtInButton; break; case "date": - v = t.date; + m = t.date; break; case "spacer": - v = t.spacer; + m = t.spacer; break; case "button": - v = t.button; + m = t.button; break; case "minicalendar": - v = t.minicalendarButton; + m = t.minicalendarButton; break; default: - v = t.view; + m = t.view; } else - h.rows ? v = t.rows_container : h.cols && (v = t.row); - return v; + h.rows ? m = t.rows_container : h.cols && (m = t.row); + return m; }(_); if (a) { var o = a(_); @@ -698,10 +707,10 @@ function Ot(e) { var a, o = document.createDocumentFragment(); a = Array.isArray(_) ? _ : [_]; for (var l = 0; l < a.length; l++) { - var h, v = d(a[l]); - v.view === "day" && a[l + 1] && ((h = d(a[l + 1])).view !== "week" && h.view !== "month" || (v.$firstTab = !0, v.$segmentedTab = !0)), v.view === "week" && a[l - 1] && ((h = d(a[l + 1])).view !== "week" && h.view !== "month" || (v.$segmentedTab = !0)), v.view === "month" && a[l - 1] && ((h = d(a[l - 1])).view !== "week" && h.view !== "day" || (v.$lastTab = !0, v.$segmentedTab = !0)); - var u = r(v); - o.appendChild(u), (v.cols || v.rows) && u.appendChild(n(v.cols || v.rows)); + var h, m = d(a[l]); + m.view === "day" && a[l + 1] && ((h = d(a[l + 1])).view !== "week" && h.view !== "month" || (m.$firstTab = !0, m.$segmentedTab = !0)), m.view === "week" && a[l - 1] && ((h = d(a[l + 1])).view !== "week" && h.view !== "month" || (m.$segmentedTab = !0)), m.view === "month" && a[l - 1] && ((h = d(a[l - 1])).view !== "week" && h.view !== "day" || (m.$lastTab = !0, m.$segmentedTab = !0)); + var v = r(m); + o.appendChild(v), (m.cols || m.rows) && v.appendChild(n(m.cols || m.rows)); } return o; } @@ -836,8 +845,8 @@ function zt(e) { }, detach: function(_, a, o, l) { d(_, a, o, l); for (var h = 0; h < n.length; h++) { - var v = n[h]; - v.element === _ && v.event === a && v.callback === o && v.capture === l && (n.splice(h, 1), h--); + var m = n[h]; + m.element === _ && m.event === a && m.callback === o && m.capture === l && (n.splice(h, 1), h--); } }, detachAll: function() { for (var _ = n.slice(), a = 0; a < _.length; a++) { @@ -964,8 +973,8 @@ const _e = { getAbsoluteLeft: function(e) { var t = document.documentElement, r = function(d) { var n = 0, s = 0, _ = 0, a = 0; if (d.getBoundingClientRect) { - var o = d.getBoundingClientRect(), l = document.body, h = document.documentElement || document.body.parentNode || document.body, v = window.pageYOffset || h.scrollTop || l.scrollTop, u = window.pageXOffset || h.scrollLeft || l.scrollLeft, f = h.clientTop || l.clientTop || 0, c = h.clientLeft || l.clientLeft || 0; - n = o.top + v - f, s = o.left + u - c, _ = document.body.offsetWidth - o.right, a = document.body.offsetHeight - o.bottom; + var o = d.getBoundingClientRect(), l = document.body, h = document.documentElement || document.body.parentNode || document.body, m = window.pageYOffset || h.scrollTop || l.scrollTop, v = window.pageXOffset || h.scrollLeft || l.scrollLeft, u = h.clientTop || l.clientTop || 0, c = h.clientLeft || l.clientLeft || 0; + n = o.top + m - u, s = o.left + v - c, _ = document.body.offsetWidth - o.right, a = document.body.offsetHeight - o.bottom; } else { for (; d; ) n += parseInt(d.offsetTop, 10), s += parseInt(d.offsetLeft, 10), d = d.offsetParent; @@ -1267,30 +1276,30 @@ function Ut(e) { } }), s && (n = n.replace(/date\.get/g, "date.getUTC")), new Function("date", 'return "' + n + '";').bind(e)); }, str_to_date: function(n, s, _) { - var a = d() ? t : i, o = a(n, s), l = /^[0-9]{4}(\-|\/)[0-9]{2}(\-|\/)[0-9]{2} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/, h = /^[0-9]{2}\/[0-9]{2}\/[0-9]{4} ?(([0-9]{1,2}:[0-9]{2})(:[0-9]{1,2})?)?$/, v = /^[0-9]{2}\-[0-9]{2}\-[0-9]{4} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/, u = /^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/, f = a("%Y-%m-%d %H:%i:%s", s), c = a("%m/%d/%Y %H:%i:%s", s), p = a("%d-%m-%Y %H:%i:%s", s); - return function(m) { + var a = d() ? t : i, o = a(n, s), l = /^[0-9]{4}(\-|\/)[0-9]{2}(\-|\/)[0-9]{2} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/, h = /^[0-9]{2}\/[0-9]{2}\/[0-9]{4} ?(([0-9]{1,2}:[0-9]{2})(:[0-9]{1,2})?)?$/, m = /^[0-9]{2}\-[0-9]{2}\-[0-9]{4} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/, v = /^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/, u = a("%Y-%m-%d %H:%i:%s", s), c = a("%m/%d/%Y %H:%i:%s", s), f = a("%d-%m-%Y %H:%i:%s", s); + return function(p) { if (!_ && !e.config.parse_exact_format) { - if (m && m.getISOWeek) - return new Date(m); - if (typeof m == "number") - return new Date(m); - if (g = m, l.test(String(g))) - return f(m); + if (p && p.getISOWeek) + return new Date(p); + if (typeof p == "number") + return new Date(p); + if (g = p, l.test(String(g))) + return u(p); if (function(y) { return h.test(String(y)); - }(m)) - return c(m); + }(p)) + return c(p); if (function(y) { - return v.test(String(y)); - }(m)) - return p(m); + return m.test(String(y)); + }(p)) + return f(p); if (function(y) { - return u.test(y); - }(m)) - return new Date(m); + return v.test(y); + }(p)) + return new Date(p); } var g; - return o.call(e, m); + return o.call(e, p); }; }, getISOWeek: function(n) { if (!n) @@ -1364,18 +1373,18 @@ function Vt(e) { var a = s[_].getAttribute("for"), o = t.serverList[a]; o || (t.serverList[a] = o = []), o.splice(0, o.length); for (var l = t.ajax.xpath(".//item", s[_]), h = 0; h < l.length; h++) { - for (var v = l[h].attributes, u = { key: l[h].getAttribute("value"), label: l[h].getAttribute("label") }, f = 0; f < v.length; f++) { - var c = v[f]; - c.nodeName != "value" && c.nodeName != "label" && (u[c.nodeName] = c.nodeValue); + for (var m = l[h].attributes, v = { key: l[h].getAttribute("value"), label: l[h].getAttribute("label") }, u = 0; u < m.length; u++) { + var c = m[u]; + c.nodeName != "value" && c.nodeName != "label" && (v[c.nodeName] = c.nodeValue); } - o.push(u); + o.push(v); } } s.length && t.callEvent("onOptionsLoad", []); - var p = t.ajax.xpath("//userdata", r.xmlDoc); - for (_ = 0; _ < p.length; _++) { - var m = t._xmlNodeToJSON(p[_]); - t._userdata[m.name] = m.text; + var f = t.ajax.xpath("//userdata", r.xmlDoc); + for (_ = 0; _ < f.length; _++) { + var p = t._xmlNodeToJSON(f[_]); + t._userdata[p.name] = p.text; } var g = []; for (d = t.ajax.xpath("//event", r.xmlDoc), _ = 0; _ < d.length; _++) { @@ -1406,22 +1415,22 @@ function Vt(e) { var a = n[_], o = t.serverList[_]; o || (t.serverList[_] = o = []), o.splice(0, o.length); for (var l = 0; l < a.length; l++) { - var h = a[l], v = { key: h.value, label: h.label }; - for (var u in h) - if (h.hasOwnProperty(u)) { - if (u == "value" || u == "label") + var h = a[l], m = { key: h.value, label: h.label }; + for (var v in h) + if (h.hasOwnProperty(v)) { + if (v == "value" || v == "label") continue; - v[u] = h[u]; + m[v] = h[v]; } - o.push(v); + o.push(m); } } s && t.callEvent("onOptionsLoad", []); - for (var f = [], c = 0; c < d.length; c++) { - var p = d[c]; - t._init_event(p), f.push(p); + for (var u = [], c = 0; c < d.length; c++) { + var f = d[c]; + t._init_event(f), u.push(f); } - return f; + return u; } }; }(e), function(t) { t.ical = t._parsers.ical = { canParse: function(r) { @@ -1551,48 +1560,48 @@ function Ft(e) { } }, e._touch_events = function(i, t, r) { var d, n, s, _, a, o, l = 0; - function h(u, f, c) { - e.event(u, f, function(p) { - return !!e._is_lightbox_open() || (r(p) ? void 0 : c(p)); + function h(v, u, c) { + e.event(v, u, function(f) { + return !!e._is_lightbox_open() || (r(f) ? void 0 : c(f)); }, { passive: !1 }); } - function v(u) { - r(u) || (e._hide_global_tip(), _ && (e._on_mouse_up(t(u)), e._temp_touch_block = !1), e._drag_id = null, e._drag_mode = null, e._drag_pos = null, e._pointerDragId = null, clearTimeout(s), _ = o = !1, a = !0); + function m(v) { + r(v) || (e._hide_global_tip(), _ && (e._on_mouse_up(t(v)), e._temp_touch_block = !1), e._drag_id = null, e._drag_mode = null, e._drag_pos = null, e._pointerDragId = null, clearTimeout(s), _ = o = !1, a = !0); } - h(document.body, i[0], function(u) { - if (!r(u)) { - var f = t(u); - if (f) { + h(document.body, i[0], function(v) { + if (!r(v)) { + var u = t(v); + if (u) { if (_) return function(c) { if (!r(c)) { - var p = e.getState().drag_mode, m = !!e.matrix && e.matrix[e._mode], g = e.render_view_data; - p == "create" && m && (e.render_view_data = function() { - for (var y = e.getState().drag_id, x = e.getEvent(y), b = m.y_property, k = e.getEvents(x.start_date, x.end_date), E = 0; E < k.length; E++) - k[E][b] != x[b] && (k.splice(E, 1), E--); + var f = e.getState().drag_mode, p = !!e.matrix && e.matrix[e._mode], g = e.render_view_data; + f == "create" && p && (e.render_view_data = function() { + for (var y = e.getState().drag_id, x = e.getEvent(y), b = p.y_property, k = e.getEvents(x.start_date, x.end_date), w = 0; w < k.length; w++) + k[w][b] != x[b] && (k.splice(w, 1), w--); x._sorder = k.length - 1, x._count = k.length, this.render_data([x], e.getState().mode); - }), e._on_mouse_move(c), p == "create" && m && (e.render_view_data = g), c.preventDefault && c.preventDefault(), c.cancelBubble = !0; + }), e._on_mouse_move(c), f == "create" && p && (e.render_view_data = g), c.preventDefault && c.preventDefault(), c.cancelBubble = !0; } - }(f), u.preventDefault && u.preventDefault(), u.cancelBubble = !0, e._update_global_tip(), !1; - n = t(u), o && (n ? (d.target != n.target || Math.abs(d.pageX - n.pageX) > 5 || Math.abs(d.pageY - n.pageY) > 5) && (a = !0, clearTimeout(s)) : a = !0); + }(u), v.preventDefault && v.preventDefault(), v.cancelBubble = !0, e._update_global_tip(), !1; + n = t(v), o && (n ? (d.target != n.target || Math.abs(d.pageX - n.pageX) > 5 || Math.abs(d.pageY - n.pageY) > 5) && (a = !0, clearTimeout(s)) : a = !0); } } - }), h(this._els.dhx_cal_data[0], "touchcancel", v), h(this._els.dhx_cal_data[0], "contextmenu", function(u) { - if (!r(u)) - return o ? (u && u.preventDefault && u.preventDefault(), u.cancelBubble = !0, !1) : void 0; - }), h(this._obj, i[1], function(u) { - var f; - if (document && document.body && document.body.classList.add("dhx_cal_touch_active"), !r(u)) - if (e._pointerDragId = u.pointerId, _ = a = !1, o = !0, f = n = t(u)) { + }), h(this._els.dhx_cal_data[0], "touchcancel", m), h(this._els.dhx_cal_data[0], "contextmenu", function(v) { + if (!r(v)) + return o ? (v && v.preventDefault && v.preventDefault(), v.cancelBubble = !0, !1) : void 0; + }), h(this._obj, i[1], function(v) { + var u; + if (document && document.body && document.body.classList.add("dhx_cal_touch_active"), !r(v)) + if (e._pointerDragId = v.pointerId, _ = a = !1, o = !0, u = n = t(v)) { var c = /* @__PURE__ */ new Date(); if (!a && !_ && c - l < 250) - return e._click.dhx_cal_data(f), window.setTimeout(function() { - e.$destroyed || e._on_dbl_click(f); - }, 50), u.preventDefault && u.preventDefault(), u.cancelBubble = !0, e._block_next_stop = !0, !1; + return e._click.dhx_cal_data(u), window.setTimeout(function() { + e.$destroyed || e._on_dbl_click(u); + }, 50), v.preventDefault && v.preventDefault(), v.cancelBubble = !0, e._block_next_stop = !0, !1; if (l = c, !a && !_ && e.config.touch_drag) { - var p = e._locate_event(document.activeElement), m = e._locate_event(f.target), g = d ? e._locate_event(d.target) : null; - if (p && m && p == m && p != g) - return u.preventDefault && u.preventDefault(), u.cancelBubble = !0, e._ignore_next_click = !1, e._click.dhx_cal_data(f), d = f, !1; + var f = e._locate_event(document.activeElement), p = e._locate_event(u.target), g = d ? e._locate_event(d.target) : null; + if (f && p && f == p && f != g) + return v.preventDefault && v.preventDefault(), v.cancelBubble = !0, e._ignore_next_click = !1, e._click.dhx_cal_data(u), d = u, !1; s = setTimeout(function() { if (!e.$destroyed) { _ = !0; @@ -1601,25 +1610,25 @@ function Ft(e) { b.style.display = "none", e._rendered.splice(k, 1); }), e.config.touch_tip && e._show_global_tip(), e.updateEvent(e._drag_id); } - }, e.config.touch_drag), d = f; + }, e.config.touch_drag), d = u; } } else a = !0; - }), h(this._els.dhx_cal_data[0], i[2], function(u) { - if (document && document.body && document.body.classList.remove("dhx_cal_touch_active"), !r(u)) - return e.config.touch_swipe_dates && !_ && function(f, c, p, m) { - if (!f || !c) + }), h(this._els.dhx_cal_data[0], i[2], function(v) { + if (document && document.body && document.body.classList.remove("dhx_cal_touch_active"), !r(v)) + return e.config.touch_swipe_dates && !_ && function(u, c, f, p) { + if (!u || !c) return !1; - for (var g = f.target; g && g != e._obj; ) + for (var g = u.target; g && g != e._obj; ) g = g.parentNode; if (g != e._obj || e.matrix && e.matrix[e.getState().mode] && e.matrix[e.getState().mode].scrollable) return !1; - var y = Math.abs(f.pageY - c.pageY), x = Math.abs(f.pageX - c.pageX); - return y < m && x > p && (!y || x / y > 3) && (f.pageX > c.pageX ? e._click.dhx_cal_next_button() : e._click.dhx_cal_prev_button(), !0); + var y = Math.abs(u.pageY - c.pageY), x = Math.abs(u.pageX - c.pageX); + return y < p && x > f && (!y || x / y > 3) && (u.pageX > c.pageX ? e._click.dhx_cal_next_button() : e._click.dhx_cal_prev_button(), !0); }(d, n, 200, 100) && (e._block_next_stop = !0), _ && (e._ignore_next_click = !0, setTimeout(function() { e._ignore_next_click = !1; - }, 100)), v(u), e._block_next_stop ? (e._block_next_stop = !1, u.preventDefault && u.preventDefault(), u.cancelBubble = !0, !1) : void 0; - }), e.event(document.body, i[2], v); + }, 100)), m(v), e._block_next_stop ? (e._block_next_stop = !1, v.preventDefault && v.preventDefault(), v.cancelBubble = !0, !1) : void 0; + }), e.event(document.body, i[2], m); }, e._show_global_tip = function() { e._hide_global_tip(); var i = e._global_tip = document.createElement("div"); @@ -1679,31 +1688,31 @@ function Bt(e) { }(); }, e._build_skin_info = function() { (function() { - const u = e.$container; - clearInterval(s), u && (s = setInterval(() => { - const f = getComputedStyle(u).getPropertyValue("--dhx-scheduler-theme"); - f && f !== e.skin && e.setSkin(f); + const v = e.$container; + clearInterval(s), v && (s = setInterval(() => { + const u = getComputedStyle(v).getPropertyValue("--dhx-scheduler-theme"); + u && u !== e.skin && e.setSkin(u); }, 100)); })(); const _ = getComputedStyle(this.$container), a = _.getPropertyValue("--dhx-scheduler-theme"); - let o, l = !!a, h = {}, v = !1; + let o, l = !!a, h = {}, m = !1; if (l) { o = a; - for (let u in e.xy) - h[u] = _.getPropertyValue(`--dhx-scheduler-xy-${u}`); + for (let v in e.xy) + h[v] = _.getPropertyValue(`--dhx-scheduler-xy-${v}`); h.hour_size_px = _.getPropertyValue("--dhx-scheduler-config-hour_size_px"), h.wide_form = _.getPropertyValue("--dhx-scheduler-config-form_wide"); } else o = function() { - for (var u = document.getElementsByTagName("link"), f = 0; f < u.length; f++) { - var c = u[f].href.match("dhtmlxscheduler_([a-z]+).css"); + for (var v = document.getElementsByTagName("link"), u = 0; u < v.length; u++) { + var c = v[u].href.match("dhtmlxscheduler_([a-z]+).css"); if (c) return c[1]; } - }(), v = e._is_material_skin(); - if (e._theme_info = { theme: o, cssVarTheme: l, oldMaterialTheme: v, values: h }, e._theme_info.cssVarTheme) { - const u = this._theme_info.values; - for (let f in e.xy) - isNaN(parseInt(u[f])) || (e.xy[f] = parseInt(u[f])); + }(), m = e._is_material_skin(); + if (e._theme_info = { theme: o, cssVarTheme: l, oldMaterialTheme: m, values: h }, e._theme_info.cssVarTheme) { + const v = this._theme_info.values; + for (let u in e.xy) + isNaN(parseInt(v[u])) || (e.xy[u] = parseInt(v[u])); } }, e.event(window, "DOMContentLoaded", d), e.event(window, "load", d), e._border_box_events = function() { return r(); @@ -1747,10 +1756,10 @@ function Bt(e) { }), function(o) { if (e.config.header) return; - const l = Array.from(o.querySelectorAll(".dhx_cal_tab")), h = ["day", "week", "month"].map((u) => l.find((f) => f.getAttribute("data-tab") === u)).filter((u) => u !== void 0); - let v = l.length > 0 ? l[0] : null; - h.reverse().forEach((u) => { - o.insertBefore(u, v), v = u; + const l = Array.from(o.querySelectorAll(".dhx_cal_tab")), h = ["day", "week", "month"].map((v) => l.find((u) => u.getAttribute("data-tab") === v)).filter((v) => v !== void 0); + let m = l.length > 0 ? l[0] : null; + h.reverse().forEach((v) => { + o.insertBefore(v, m), m = v; }); }(e._els.dhx_cal_navline[0])); }, { once: !0 }); @@ -1786,138 +1795,138 @@ function He(e) { } function Wt(e) { var i = "data-dhxbox", t = null; - function r(m, g) { - var y = m.callback; - f.hide(m.box), t = m.box = null, y && y(g); + function r(p, g) { + var y = p.callback; + u.hide(p.box), t = p.box = null, y && y(g); } - function d(m) { + function d(p) { if (t) { - var g = m.which || m.keyCode, y = !1; + var g = p.which || p.keyCode, y = !1; if (c.keyboard) { if (g == 13 || g == 32) { - var x = m.target || m.srcElement; + var x = p.target || p.srcElement; _e.getClassName(x).indexOf("scheduler_popup_button") > -1 && x.click ? x.click() : (r(t, !0), y = !0); } g == 27 && (r(t, !1), y = !0); } - return y ? (m.preventDefault && m.preventDefault(), !(m.cancelBubble = !0)) : void 0; + return y ? (p.preventDefault && p.preventDefault(), !(p.cancelBubble = !0)) : void 0; } } - function n(m) { - n.cover || (n.cover = document.createElement("div"), e.event(n.cover, "keydown", d), n.cover.className = "dhx_modal_cover", document.body.appendChild(n.cover)), n.cover.style.display = m ? "inline-block" : "none"; + function n(p) { + n.cover || (n.cover = document.createElement("div"), e.event(n.cover, "keydown", d), n.cover.className = "dhx_modal_cover", document.body.appendChild(n.cover)), n.cover.style.display = p ? "inline-block" : "none"; } - function s(m, g, y) { - var x = e._waiAria.messageButtonAttrString(m), b = (g || "").toLowerCase().replace(/ /g, "_"); - return `
${m}
`; + function s(p, g, y) { + var x = e._waiAria.messageButtonAttrString(p), b = (g || "").toLowerCase().replace(/ /g, "_"); + return `
${p}
`; } function _() { - for (var m = [].slice.apply(arguments, [0]), g = 0; g < m.length; g++) - if (m[g]) - return m[g]; + for (var p = [].slice.apply(arguments, [0]), g = 0; g < p.length; g++) + if (p[g]) + return p[g]; } - function a(m, g, y) { - var x = m.tagName ? m : function(E, D, w) { + function a(p, g, y) { + var x = p.tagName ? p : function(w, D, E) { var S = document.createElement("div"), N = ee.uid(); - e._waiAria.messageModalAttr(S, N), S.className = " scheduler_modal_box dhtmlx_modal_box scheduler-" + E.type + " dhtmlx-" + E.type, S.setAttribute(i, 1); + e._waiAria.messageModalAttr(S, N), S.className = " scheduler_modal_box dhtmlx_modal_box scheduler-" + w.type + " dhtmlx-" + w.type, S.setAttribute(i, 1); var M = ""; - if (E.width && (S.style.width = E.width), E.height && (S.style.height = E.height), E.title && (M += '
' + E.title + "
"), M += '
' + (E.content ? "" : E.text) + '
', D && (M += s(_(E.ok, e.locale.labels.message_ok, "OK"), "ok", !0)), w && (M += s(_(E.cancel, e.locale.labels.message_cancel, "Cancel"), "cancel", !1)), E.buttons) - for (var A = 0; A < E.buttons.length; A++) { - var T = E.buttons[A]; - M += typeof T == "object" ? s(T.label, T.css || "scheduler_" + T.label.toLowerCase() + "_button dhtmlx_" + T.label.toLowerCase() + "_button", T.value || A) : s(T, T, A); + if (w.width && (S.style.width = w.width), w.height && (S.style.height = w.height), w.title && (M += '
' + w.title + "
"), M += '
' + (w.content ? "" : w.text) + '
', D && (M += s(_(w.ok, e.locale.labels.message_ok, "OK"), "ok", !0)), E && (M += s(_(w.cancel, e.locale.labels.message_cancel, "Cancel"), "cancel", !1)), w.buttons) + for (var T = 0; T < w.buttons.length; T++) { + var A = w.buttons[T]; + M += typeof A == "object" ? s(A.label, A.css || "scheduler_" + A.label.toLowerCase() + "_button dhtmlx_" + A.label.toLowerCase() + "_button", A.value || T) : s(A, A, T); } - if (M += "
", S.innerHTML = M, E.content) { - var H = E.content; - typeof H == "string" && (H = document.getElementById(H)), H.style.display == "none" && (H.style.display = ""), S.childNodes[E.title ? 1 : 0].appendChild(H); + if (M += "
", S.innerHTML = M, w.content) { + var H = w.content; + typeof H == "string" && (H = document.getElementById(H)), H.style.display == "none" && (H.style.display = ""), S.childNodes[w.title ? 1 : 0].appendChild(H); } return e.event(S, "click", function($) { var j = $.target || $.srcElement; if (j.className || (j = j.parentNode), _e.closest(j, ".scheduler_popup_button")) { var z = j.getAttribute("data-result"); - r(E, z = z == "true" || z != "false" && z); + r(w, z = z == "true" || z != "false" && z); } - }), E.box = S, (D || w) && (t = E), S; - }(m, g, y); - m.hidden || n(!0), document.body.appendChild(x); + }), w.box = S, (D || E) && (t = w), S; + }(p, g, y); + p.hidden || n(!0), document.body.appendChild(x); var b = Math.abs(Math.floor(((window.innerWidth || document.documentElement.offsetWidth) - x.offsetWidth) / 2)), k = Math.abs(Math.floor(((window.innerHeight || document.documentElement.offsetHeight) - x.offsetHeight) / 2)); - return m.position == "top" ? x.style.top = "-3px" : x.style.top = k + "px", x.style.left = b + "px", e.event(x, "keydown", d), f.focus(x), m.hidden && f.hide(x), e.callEvent("onMessagePopup", [x]), x; + return p.position == "top" ? x.style.top = "-3px" : x.style.top = k + "px", x.style.left = b + "px", e.event(x, "keydown", d), u.focus(x), p.hidden && u.hide(x), e.callEvent("onMessagePopup", [x]), x; } - function o(m) { - return a(m, !0, !1); + function o(p) { + return a(p, !0, !1); } - function l(m) { - return a(m, !0, !0); + function l(p) { + return a(p, !0, !0); } - function h(m) { - return a(m); + function h(p) { + return a(p); } - function v(m, g, y) { - return typeof m != "object" && (typeof g == "function" && (y = g, g = ""), m = { text: m, type: g, callback: y }), m; + function m(p, g, y) { + return typeof p != "object" && (typeof g == "function" && (y = g, g = ""), p = { text: p, type: g, callback: y }), p; } - function u(m, g, y, x, b) { - return typeof m != "object" && (m = { text: m, type: g, expire: y, id: x, callback: b }), m.id = m.id || ee.uid(), m.expire = m.expire || c.expire, m; + function v(p, g, y, x, b) { + return typeof p != "object" && (p = { text: p, type: g, expire: y, id: x, callback: b }), p.id = p.id || ee.uid(), p.expire = p.expire || c.expire, p; } e.event(document, "keydown", d, !0); - var f = function() { - var m = v.apply(this, arguments); - return m.type = m.type || "alert", h(m); + var u = function() { + var p = m.apply(this, arguments); + return p.type = p.type || "alert", h(p); }; - f.hide = function(m) { - for (; m && m.getAttribute && !m.getAttribute(i); ) - m = m.parentNode; - m && (m.parentNode.removeChild(m), n(!1), e.callEvent("onAfterMessagePopup", [m])); - }, f.focus = function(m) { + u.hide = function(p) { + for (; p && p.getAttribute && !p.getAttribute(i); ) + p = p.parentNode; + p && (p.parentNode.removeChild(p), n(!1), e.callEvent("onAfterMessagePopup", [p])); + }, u.focus = function(p) { setTimeout(function() { - var g = _e.getFocusableNodes(m); + var g = _e.getFocusableNodes(p); g.length && g[0].focus && g[0].focus(); }, 1); }; - var c = function(m, g, y, x) { - switch ((m = u.apply(this, arguments)).type = m.type || "info", m.type.split("-")[0]) { + var c = function(p, g, y, x) { + switch ((p = v.apply(this, arguments)).type = p.type || "info", p.type.split("-")[0]) { case "alert": - return o(m); + return o(p); case "confirm": - return l(m); + return l(p); case "modalbox": - return h(m); + return h(p); default: return function(b) { c.area || (c.area = document.createElement("div"), c.area.className = "scheduler_message_area dhtmlx_message_area", c.area.style[c.position] = "5px", document.body.appendChild(c.area)), c.hide(b.id); var k = document.createElement("div"); - return k.innerHTML = "
" + b.text + "
", k.className = "scheduler-info dhtmlx-info scheduler-" + b.type + " dhtmlx-" + b.type, e.event(k, "click", function(E) { - b.callback && b.callback.call(this, E), c.hide(b.id), b = null; + return k.innerHTML = "
" + b.text + "
", k.className = "scheduler-info dhtmlx-info scheduler-" + b.type + " dhtmlx-" + b.type, e.event(k, "click", function(w) { + b.callback && b.callback.call(this, w), c.hide(b.id), b = null; }), e._waiAria.messageInfoAttr(k), c.position == "bottom" && c.area.firstChild ? c.area.insertBefore(k, c.area.firstChild) : c.area.appendChild(k), b.expire > 0 && (c.timers[b.id] = window.setTimeout(function() { c && c.hide(b.id); }, b.expire)), c.pull[b.id] = k, k = null, b.id; - }(m); + }(p); } }; c.seed = (/* @__PURE__ */ new Date()).valueOf(), c.uid = ee.uid, c.expire = 4e3, c.keyboard = !0, c.position = "top", c.pull = {}, c.timers = {}, c.hideAll = function() { - for (var m in c.pull) - c.hide(m); - }, c.hide = function(m) { - var g = c.pull[m]; + for (var p in c.pull) + c.hide(p); + }, c.hide = function(p) { + var g = c.pull[p]; g && g.parentNode && (window.setTimeout(function() { g.parentNode.removeChild(g), g = null; - }, 2e3), g.className += " hidden", c.timers[m] && window.clearTimeout(c.timers[m]), delete c.pull[m]); + }, 2e3), g.className += " hidden", c.timers[p] && window.clearTimeout(c.timers[p]), delete c.pull[p]); }; - var p = []; - return e.attachEvent("onMessagePopup", function(m) { - p.push(m); - }), e.attachEvent("onAfterMessagePopup", function(m) { - for (var g = 0; g < p.length; g++) - p[g] === m && (p.splice(g, 1), g--); + var f = []; + return e.attachEvent("onMessagePopup", function(p) { + f.push(p); + }), e.attachEvent("onAfterMessagePopup", function(p) { + for (var g = 0; g < f.length; g++) + f[g] === p && (f.splice(g, 1), g--); }), e.attachEvent("onDestroy", function() { n.cover && n.cover.parentNode && n.cover.parentNode.removeChild(n.cover); - for (var m = 0; m < p.length; m++) - p[m].parentNode && p[m].parentNode.removeChild(p[m]); - p = null, c.area && c.area.parentNode && c.area.parentNode.removeChild(c.area), c = null; + for (var p = 0; p < f.length; p++) + f[p].parentNode && f[p].parentNode.removeChild(f[p]); + f = null, c.area && c.area.parentNode && c.area.parentNode.removeChild(c.area), c = null; }), { alert: function() { - var m = v.apply(this, arguments); - return m.type = m.type || "confirm", o(m); + var p = m.apply(this, arguments); + return p.type = p.type || "confirm", o(p); }, confirm: function() { - var m = v.apply(this, arguments); - return m.type = m.type || "alert", l(m); - }, message: c, modalbox: f }; + var p = m.apply(this, arguments); + return p.type = p.type || "alert", l(p); + }, message: c, modalbox: u }; } He.prototype = { setTransactionMode: function(e, i) { typeof e == "object" ? (this._tMode = e.mode || this._tMode, e.headers !== void 0 && (this._headers = e.headers), e.payload !== void 0 && (this._payload = e.payload), this._tSend = !!i) : (this._tMode = e, this._tSend = i), this._tMode == "REST" && (this._tSend = !1, this._endnm = !0), this._tMode === "JSON" || this._tMode === "REST-JSON" ? (this._tSend = !1, this._endnm = !0, this._serializeAsJson = !0, this._headers = this._headers || {}, this._headers["Content-Type"] = "application/json") : this._headers && !this._headers["Content-Type"] && (this._headers["Content-Type"] = "application/x-www-form-urlencoded"), this._tMode === "CUSTOM" && (this._tSend = !1, this._endnm = !0, this._router = e.router); @@ -2004,14 +2013,14 @@ He.prototype = { setTransactionMode: function(e, i) { i && (this._in_progress[i] = (/* @__PURE__ */ new Date()).valueOf()); var t = this, r = this.$scheduler.ajax; if (this._tMode !== "CUSTOM") { - var d, n = { callback: function(f) { + var d, n = { callback: function(u) { var c = []; if (i) c.push(i); else if (e) - for (var p in e) - c.push(p); - return t.afterUpdate(t, f, c); + for (var f in e) + c.push(f); + return t.afterUpdate(t, u, c); }, headers: t._headers }, s = this.serverProcessor + (this._user ? r.urlSeparator(this.serverProcessor) + ["dhx_user=" + this._user, "dhx_version=" + this.$scheduler.getUserData(0, "version")].join("&") : ""), _ = this._applyPayload(s); switch (this._tMode) { case "GET": @@ -2044,42 +2053,42 @@ He.prototype = { setTransactionMode: function(e, i) { return this._waitMode++, r.query(n); } { - var l = this.getState(i), h = this.getActionByState(l), v = function(c) { - var p = l; + var l = this.getState(i), h = this.getActionByState(l), m = function(c) { + var f = l; if (c && c.responseText && c.setRequestHeader) { - c.status !== 200 && (p = "error"); + c.status !== 200 && (f = "error"); try { c = JSON.parse(c.responseText); } catch { } } - p = p || "updated"; - var m = i, g = i; - c && (p = c.action || p, m = c.sid || m, g = c.id || c.tid || g), t.afterUpdateCallback(m, g, p, c); + f = f || "updated"; + var p = i, g = i; + c && (f = c.action || f, p = c.sid || p, g = c.id || c.tid || g), t.afterUpdateCallback(p, g, f, c); }; - const f = "event"; - var u; + const u = "event"; + var v; if (this._router instanceof Function) - u = this._router(f, h, e, i); + v = this._router(u, h, e, i); else switch (l) { case "inserted": - u = this._router[f].create(e); + v = this._router[u].create(e); break; case "deleted": - u = this._router[f].delete(i); + v = this._router[u].delete(i); break; default: - u = this._router[f].update(e, i); + v = this._router[u].update(e, i); } - if (u) { - if (!u.then && u.id === void 0 && u.tid === void 0 && u.action === void 0) + if (v) { + if (!v.then && v.id === void 0 && v.tid === void 0 && v.action === void 0) throw new Error("Incorrect router return value. A Promise or a response object is expected"); - u.then ? u.then(v).catch(function(c) { - c && c.action ? v(c) : v({ action: "error", value: c }); - }) : v(u); + v.then ? v.then(m).catch(function(c) { + c && c.action ? m(c) : m({ action: "error", value: c }); + }) : m(v); } else - v(null); + m(null); } } }, sendAllData: function() { @@ -2324,7 +2333,7 @@ class ha { const ua = { date: { month_full: ["Januar", "Februar", "Mars", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Desember"], month_short: ["Jan", "Feb", "Mar", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Des"], day_full: ["Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag"], day_short: ["Søn", "Mon", "Tir", "Ons", "Tor", "Fre", "Lør"] }, labels: { dhx_cal_today_button: "I dag", day_tab: "Dag", week_tab: "Uke", month_tab: "Måned", new_event: "Ny hendelse", icon_save: "Lagre", icon_cancel: "Avbryt", icon_details: "Detaljer", icon_edit: "Rediger", icon_delete: "Slett", confirm_closing: "", confirm_deleting: "Hendelsen vil bli slettet permanent. Er du sikker?", section_description: "Beskrivelse", section_time: "Tidsperiode", confirm_recurring: "Vil du forandre hele dette settet av repeterende hendelser?", section_recurring: "Repeter hendelsen", button_recurring: "Av", button_recurring_open: "På", button_edit_series: "Rediger serien", button_edit_occurrence: "Redigere en kopi", agenda_tab: "Agenda", date: "Dato", description: "Beskrivelse", year_tab: "År", week_agenda_tab: "Agenda", grid_tab: "Grid", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "Daglig", repeat_radio_week: "Ukentlig", repeat_radio_month: "Månedlig", repeat_radio_year: "Årlig", repeat_radio_day_type: "Hver", repeat_text_day_count: "dag", repeat_radio_day_type2: "Alle hverdager", repeat_week: " Gjentas hver", repeat_text_week_count: "uke på:", repeat_radio_month_type: "På hver", repeat_radio_month_start: "På", repeat_text_month_day: "dag hver", repeat_text_month_count: "måned", repeat_text_month_count2_before: "hver", repeat_text_month_count2_after: "måned", repeat_year_label: "på", select_year_day2: "i", repeat_text_year_day: "dag i", select_year_month: "", repeat_radio_end: "Ingen sluttdato", repeat_text_occurences_count: "forekomst", repeat_radio_end3: "Stop den", repeat_radio_end2: "Etter", repeat_never: "Aldri", repeat_daily: "Hver dag", repeat_workdays: "Hver ukedag", repeat_weekly: "Hver uke", repeat_monthly: "Hver måned", repeat_yearly: "Hvert år", repeat_custom: "Tilpasset", repeat_freq_day: "Dag", repeat_freq_week: "Uke", repeat_freq_month: "Måned", repeat_freq_year: "År", repeat_on_date: "På dato", repeat_ends: "Slutter", month_for_recurring: ["Januar", "Februar", "Mars", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Desember"], day_for_recurring: ["Sondag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag"] } }, fa = { date: { month_full: ["Januari", "Februari", "Maart", "April", "Mei", "Juni", "Juli", "Augustus", "September", "Oktober", "November", "December"], month_short: ["Jan", "Feb", "mrt", "Apr", "Mei", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"], day_full: ["Zondag", "Maandag", "Dinsdag", "Woensdag", "Donderdag", "Vrijdag", "Zaterdag"], day_short: ["Zo", "Ma", "Di", "Wo", "Do", "Vr", "Za"] }, labels: { dhx_cal_today_button: "Vandaag", day_tab: "Dag", week_tab: "Week", month_tab: "Maand", new_event: "Nieuw item", icon_save: "Opslaan", icon_cancel: "Annuleren", icon_details: "Details", icon_edit: "Bewerken", icon_delete: "Verwijderen", confirm_closing: "", confirm_deleting: "Item zal permanent worden verwijderd, doorgaan?", section_description: "Beschrijving", section_time: "Tijd periode", full_day: "Hele dag", confirm_recurring: "Wilt u alle terugkerende items bijwerken?", section_recurring: "Item herhalen", button_recurring: "Uit", button_recurring_open: "Aan", button_edit_series: "Bewerk de serie", button_edit_occurrence: "Bewerk een kopie", agenda_tab: "Agenda", date: "Datum", description: "Omschrijving", year_tab: "Jaar", week_agenda_tab: "Agenda", grid_tab: "Tabel", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "Dagelijks", repeat_radio_week: "Wekelijks", repeat_radio_month: "Maandelijks", repeat_radio_year: "Jaarlijks", repeat_radio_day_type: "Elke", repeat_text_day_count: "dag(en)", repeat_radio_day_type2: "Elke werkdag", repeat_week: " Herhaal elke", repeat_text_week_count: "week op de volgende dagen:", repeat_radio_month_type: "Herhaal", repeat_radio_month_start: "Op", repeat_text_month_day: "dag iedere", repeat_text_month_count: "maanden", repeat_text_month_count2_before: "iedere", repeat_text_month_count2_after: "maanden", repeat_year_label: "Op", select_year_day2: "van", repeat_text_year_day: "dag", select_year_month: "maand", repeat_radio_end: "Geen eind datum", repeat_text_occurences_count: "keren", repeat_radio_end3: "Eindigd per", repeat_radio_end2: "Na", repeat_never: "Nooit", repeat_daily: "Elke dag", repeat_workdays: "Elke werkdag", repeat_weekly: "Elke week", repeat_monthly: "Elke maand", repeat_yearly: "Elk jaar", repeat_custom: "Aangepast", repeat_freq_day: "Dag", repeat_freq_week: "Week", repeat_freq_month: "Maand", repeat_freq_year: "Jaar", repeat_on_date: "Op datum", repeat_ends: "Eindigt", month_for_recurring: ["Januari", "Februari", "Maart", "April", "Mei", "Juni", "Juli", "Augustus", "September", "Oktober", "November", "December"], day_for_recurring: ["Zondag", "Maandag", "Dinsdag", "Woensdag", "Donderdag", "Vrijdag", "Zaterdag"] } }, pa = { date: { month_full: ["Januar", "Februar", "Mars", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Desember"], month_short: ["Jan", "Feb", "Mar", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Des"], day_full: ["Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag"], day_short: ["Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør"] }, labels: { dhx_cal_today_button: "Idag", day_tab: "Dag", week_tab: "Uke", month_tab: "Måned", new_event: "Ny", icon_save: "Lagre", icon_cancel: "Avbryt", icon_details: "Detaljer", icon_edit: "Endre", icon_delete: "Slett", confirm_closing: "Endringer blir ikke lagret, er du sikker?", confirm_deleting: "Oppføringen vil bli slettet, er du sikker?", section_description: "Beskrivelse", section_time: "Tidsperiode", full_day: "Full dag", confirm_recurring: "Vil du endre hele settet med repeterende oppføringer?", section_recurring: "Repeterende oppføring", button_recurring: "Ikke aktiv", button_recurring_open: "Aktiv", button_edit_series: "Rediger serien", button_edit_occurrence: "Redigere en kopi", agenda_tab: "Agenda", date: "Dato", description: "Beskrivelse", year_tab: "År", week_agenda_tab: "Agenda", grid_tab: "Grid", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "Daglig", repeat_radio_week: "Ukentlig", repeat_radio_month: "Månedlig", repeat_radio_year: "Årlig", repeat_radio_day_type: "Hver", repeat_text_day_count: "dag", repeat_radio_day_type2: "Hver arbeidsdag", repeat_week: " Gjenta hver", repeat_text_week_count: "uke neste dager:", repeat_radio_month_type: "Gjenta", repeat_radio_month_start: "På", repeat_text_month_day: "dag hver", repeat_text_month_count: "måned", repeat_text_month_count2_before: "hver", repeat_text_month_count2_after: "måned", repeat_year_label: "På", select_year_day2: "av", repeat_text_year_day: "dag", select_year_month: "måned", repeat_radio_end: "Ingen sluttdato", repeat_text_occurences_count: "forekomster", repeat_radio_end2: "Etter", repeat_radio_end3: "Slutt innen", repeat_never: "Aldri", repeat_daily: "Hver dag", repeat_workdays: "Hver ukedag", repeat_weekly: "Hver uke", repeat_monthly: "Hver måned", repeat_yearly: "Hvert år", repeat_custom: "Tilpasset", repeat_freq_day: "Dag", repeat_freq_week: "Uke", repeat_freq_month: "Måned", repeat_freq_year: "År", repeat_on_date: "På dato", repeat_ends: "Slutter", month_for_recurring: ["Januar", "Februar", "Mars", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Desember"], day_for_recurring: ["Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag"] } }, ma = { date: { month_full: ["Styczeń", "Luty", "Marzec", "Kwiecień", "Maj", "Czerwiec", "Lipiec", "Sierpień", "Wrzesień", "Październik", "Listopad", "Grudzień"], month_short: ["Sty", "Lut", "Mar", "Kwi", "Maj", "Cze", "Lip", "Sie", "Wrz", "Paź", "Lis", "Gru"], day_full: ["Niedziela", "Poniedziałek", "Wtorek", "Środa", "Czwartek", "Piątek", "Sobota"], day_short: ["Nie", "Pon", "Wto", "Śro", "Czw", "Pią", "Sob"] }, labels: { dhx_cal_today_button: "Dziś", day_tab: "Dzień", week_tab: "Tydzień", month_tab: "Miesiąc", new_event: "Nowe zdarzenie", icon_save: "Zapisz", icon_cancel: "Anuluj", icon_details: "Szczegóły", icon_edit: "Edytuj", icon_delete: "Usuń", confirm_closing: "", confirm_deleting: "Zdarzenie zostanie usunięte na zawsze, kontynuować?", section_description: "Opis", section_time: "Okres czasu", full_day: "Cały dzień", confirm_recurring: "Czy chcesz edytować cały zbiór powtarzających się zdarzeń?", section_recurring: "Powtórz zdarzenie", button_recurring: "Nieaktywne", button_recurring_open: "Aktywne", button_edit_series: "Edytuj serię", button_edit_occurrence: "Edytuj kopię", agenda_tab: "Agenda", date: "Data", description: "Opis", year_tab: "Rok", week_agenda_tab: "Agenda", grid_tab: "Tabela", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "Codziennie", repeat_radio_week: "Co tydzie", repeat_radio_month: "Co miesic", repeat_radio_year: "Co rok", repeat_radio_day_type: "Kadego", repeat_text_day_count: "dnia", repeat_radio_day_type2: "Kadego dnia roboczego", repeat_week: " Powtarzaj kadego", repeat_text_week_count: "tygodnia w dni:", repeat_radio_month_type: "Powtrz", repeat_radio_month_start: "W", repeat_text_month_day: "dnia kadego", repeat_text_month_count: "miesica", repeat_text_month_count2_before: "kadego", repeat_text_month_count2_after: "miesica", repeat_year_label: "W", select_year_day2: "miesica", repeat_text_year_day: "dnia miesica", select_year_month: "", repeat_radio_end: "Bez daty kocowej", repeat_text_occurences_count: "wystpieniu/ach", repeat_radio_end3: "Zakocz w", repeat_radio_end2: "Po", repeat_never: "Nigdy", repeat_daily: "Codziennie", repeat_workdays: "Każdy dzień roboczy", repeat_weekly: "Co tydzień", repeat_monthly: "Co miesiąc", repeat_yearly: "Co rok", repeat_custom: "Niestandardowy", repeat_freq_day: "Dzień", repeat_freq_week: "Tydzień", repeat_freq_month: "Miesiąc", repeat_freq_year: "Rok", repeat_on_date: "W dniu", repeat_ends: "Kończy się", month_for_recurring: ["Stycznia", "Lutego", "Marca", "Kwietnia", "Maja", "Czerwca", "Lipca", "Sierpnia", "Wrzenia", "Padziernka", "Listopada", "Grudnia"], day_for_recurring: ["Niedziela", "Poniedziaek", "Wtorek", "roda", "Czwartek", "Pitek", "Sobota"] } }, va = { date: { month_full: ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"], month_short: ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"], day_full: ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"], day_short: ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sab"] }, labels: { dhx_cal_today_button: "Hoje", day_tab: "Dia", week_tab: "Semana", month_tab: "Mês", new_event: "Novo evento", icon_save: "Salvar", icon_cancel: "Cancelar", icon_details: "Detalhes", icon_edit: "Editar", icon_delete: "Deletar", confirm_closing: "", confirm_deleting: "Tem certeza que deseja excluir?", section_description: "Descrição", section_time: "Período de tempo", full_day: "Dia inteiro", confirm_recurring: "Deseja editar todos esses eventos repetidos?", section_recurring: "Repetir evento", button_recurring: "Desabilitar", button_recurring_open: "Habilitar", button_edit_series: "Editar a série", button_edit_occurrence: "Editar uma cópia", agenda_tab: "Dia", date: "Data", description: "Descrição", year_tab: "Ano", week_agenda_tab: "Dia", grid_tab: "Grade", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "Diário", repeat_radio_week: "Semanal", repeat_radio_month: "Mensal", repeat_radio_year: "Anual", repeat_radio_day_type: "Cada", repeat_text_day_count: "dia(s)", repeat_radio_day_type2: "Cada trabalho diário", repeat_week: " Repita cada", repeat_text_week_count: "semana:", repeat_radio_month_type: "Repetir", repeat_radio_month_start: "Em", repeat_text_month_day: "todo dia", repeat_text_month_count: "mês", repeat_text_month_count2_before: "todo", repeat_text_month_count2_after: "mês", repeat_year_label: "Em", select_year_day2: "of", repeat_text_year_day: "dia", select_year_month: "mês", repeat_radio_end: "Sem data final", repeat_text_occurences_count: "ocorrências", repeat_radio_end3: "Fim", repeat_radio_end2: "Depois", repeat_never: "Nunca", repeat_daily: "Todos os dias", repeat_workdays: "Todos os dias úteis", repeat_weekly: "Toda semana", repeat_monthly: "Todo mês", repeat_yearly: "Todo ano", repeat_custom: "Personalizado", repeat_freq_day: "Dia", repeat_freq_week: "Semana", repeat_freq_month: "Mês", repeat_freq_year: "Ano", repeat_on_date: "Na data", repeat_ends: "Termina", month_for_recurring: ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"], day_for_recurring: ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"] } }, ga = { date: { month_full: ["Ianuarie", "Februarie", "Martie", "Aprilie", "Mai", "Iunie", "Iulie", "August", "Septembrie", "Octombrie", "November", "December"], month_short: ["Ian", "Feb", "Mar", "Apr", "Mai", "Iun", "Iul", "Aug", "Sep", "Oct", "Nov", "Dec"], day_full: ["Duminica", "Luni", "Marti", "Miercuri", "Joi", "Vineri", "Sambata"], day_short: ["Du", "Lu", "Ma", "Mi", "Jo", "Vi", "Sa"] }, labels: { dhx_cal_today_button: "Astazi", day_tab: "Zi", week_tab: "Saptamana", month_tab: "Luna", new_event: "Eveniment nou", icon_save: "Salveaza", icon_cancel: "Anuleaza", icon_details: "Detalii", icon_edit: "Editeaza", icon_delete: "Sterge", confirm_closing: "Schimbarile nu vor fi salvate, esti sigur?", confirm_deleting: "Evenimentul va fi sters permanent, esti sigur?", section_description: "Descriere", section_time: "Interval", full_day: "Toata ziua", confirm_recurring: "Vrei sa editezi toata seria de evenimente repetate?", section_recurring: "Repetare", button_recurring: "Dezactivata", button_recurring_open: "Activata", button_edit_series: "Editeaza serie", button_edit_occurrence: "Editeaza doar intrare", agenda_tab: "Agenda", date: "Data", description: "Descriere", year_tab: "An", week_agenda_tab: "Agenda", grid_tab: "Lista", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "Zilnic", repeat_radio_week: "Saptamanal", repeat_radio_month: "Lunar", repeat_radio_year: "Anual", repeat_radio_day_type: "La fiecare", repeat_text_day_count: "zi(le)", repeat_radio_day_type2: "Fiecare zi lucratoare", repeat_week: " Repeta la fiecare", repeat_text_week_count: "saptamana in urmatoarele zile:", repeat_radio_month_type: "Repeta in", repeat_radio_month_start: "In a", repeat_text_month_day: "zi la fiecare", repeat_text_month_count: "luni", repeat_text_month_count2_before: "la fiecare", repeat_text_month_count2_after: "luni", repeat_year_label: "In", select_year_day2: "a lunii", repeat_text_year_day: "zi a lunii", select_year_month: "", repeat_radio_end: "Fara data de sfarsit", repeat_text_occurences_count: "evenimente", repeat_radio_end3: "La data", repeat_radio_end2: "Dupa", repeat_never: "Niciodată", repeat_daily: "În fiecare zi", repeat_workdays: "În fiecare zi lucrătoare", repeat_weekly: "În fiecare săptămână", repeat_monthly: "În fiecare lună", repeat_yearly: "În fiecare an", repeat_custom: "Personalizat", repeat_freq_day: "Zi", repeat_freq_week: "Săptămână", repeat_freq_month: "Lună", repeat_freq_year: "An", repeat_on_date: "La data", repeat_ends: "Se termină", month_for_recurring: ["Ianuarie", "Februarie", "Martie", "Aprilie", "Mai", "Iunie", "Iulie", "August", "Septembrie", "Octombrie", "Noiembrie", "Decembrie"], day_for_recurring: ["Duminica", "Luni", "Marti", "Miercuri", "Joi", "Vineri", "Sambata"] } }, ya = { date: { month_full: ["Январь", "Февраль", "Март", "Апрель", "Maй", "Июнь", "Июль", "Август", "Сентябрь", "Oктябрь", "Ноябрь", "Декабрь"], month_short: ["Янв", "Фев", "Maр", "Aпр", "Maй", "Июн", "Июл", "Aвг", "Сен", "Окт", "Ноя", "Дек"], day_full: ["Воскресенье", "Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота"], day_short: ["Вс", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"] }, labels: { dhx_cal_today_button: "Сегодня", day_tab: "День", week_tab: "Неделя", month_tab: "Месяц", new_event: "Новое событие", icon_save: "Сохранить", icon_cancel: "Отменить", icon_details: "Детали", icon_edit: "Изменить", icon_delete: "Удалить", confirm_closing: "", confirm_deleting: "Событие будет удалено безвозвратно, продолжить?", section_description: "Описание", section_time: "Период времени", full_day: "Весь день", confirm_recurring: "Вы хотите изменить всю серию повторяющихся событий?", section_recurring: "Повторение", button_recurring: "Отключено", button_recurring_open: "Включено", button_edit_series: "Редактировать серию", button_edit_occurrence: "Редактировать экземпляр", agenda_tab: "Список", date: "Дата", description: "Описание", year_tab: "Год", week_agenda_tab: "Список", grid_tab: "Таблица", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "День", repeat_radio_week: "Неделя", repeat_radio_month: "Месяц", repeat_radio_year: "Год", repeat_radio_day_type: "Каждый", repeat_text_day_count: "день", repeat_radio_day_type2: "Каждый рабочий день", repeat_week: " Повторять каждую", repeat_text_week_count: "неделю , в:", repeat_radio_month_type: "Повторять", repeat_radio_month_start: "", repeat_text_month_day: " числа каждый ", repeat_text_month_count: "месяц", repeat_text_month_count2_before: "каждый ", repeat_text_month_count2_after: "месяц", repeat_year_label: "", select_year_day2: "", repeat_text_year_day: "день", select_year_month: "", repeat_radio_end: "Без даты окончания", repeat_text_occurences_count: "повторений", repeat_radio_end3: "До ", repeat_radio_end2: "", repeat_never: "Никогда", repeat_daily: "Каждый день", repeat_workdays: "Каждый будний день", repeat_weekly: "Каждую неделю", repeat_monthly: "Каждый месяц", repeat_yearly: "Каждый год", repeat_custom: "Настроить", repeat_freq_day: "День", repeat_freq_week: "Неделя", repeat_freq_month: "Месяц", repeat_freq_year: "Год", repeat_on_date: "В дату", repeat_ends: "Заканчивается", month_for_recurring: ["Января", "Февраля", "Марта", "Апреля", "Мая", "Июня", "Июля", "Августа", "Сентября", "Октября", "Ноября", "Декабря"], day_for_recurring: ["Воскресенье", "Понедельник", "Вторник", "Среду", "Четверг", "Пятницу", "Субботу"] } }, ba = { date: { month_full: ["Januar", "Februar", "Marec", "April", "Maj", "Junij", "Julij", "Avgust", "September", "Oktober", "November", "December"], month_short: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"], day_full: ["Nedelja", "Ponedeljek", "Torek", "Sreda", "Četrtek", "Petek", "Sobota"], day_short: ["Ned", "Pon", "Tor", "Sre", "Čet", "Pet", "Sob"] }, labels: { dhx_cal_today_button: "Danes", day_tab: "Dan", week_tab: "Teden", month_tab: "Mesec", new_event: "Nov dogodek", icon_save: "Shrani", icon_cancel: "Prekliči", icon_details: "Podrobnosti", icon_edit: "Uredi", icon_delete: "Izbriši", confirm_closing: "", confirm_deleting: "Dogodek bo izbrisan. Želite nadaljevati?", section_description: "Opis", section_time: "Časovni okvir", full_day: "Ves dan", confirm_recurring: "Želite urediti celoten set ponavljajočih dogodkov?", section_recurring: "Ponovi dogodek", button_recurring: "Onemogočeno", button_recurring_open: "Omogočeno", button_edit_series: "Edit series", button_edit_occurrence: "Edit occurrence", agenda_tab: "Zadeva", date: "Datum", description: "Opis", year_tab: "Leto", week_agenda_tab: "Zadeva", grid_tab: "Miza", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "Dnevno", repeat_radio_week: "Tedensko", repeat_radio_month: "Mesečno", repeat_radio_year: "Letno", repeat_radio_day_type: "Vsak", repeat_text_day_count: "dan", repeat_radio_day_type2: "Vsak delovni dan", repeat_week: " Ponavljaj vsak", repeat_text_week_count: "teden na naslednje dni:", repeat_radio_month_type: "Ponavljaj", repeat_radio_month_start: "Na", repeat_text_month_day: "dan vsak", repeat_text_month_count: "mesec", repeat_text_month_count2_before: "vsak", repeat_text_month_count2_after: "mesec", repeat_year_label: "Na", select_year_day2: "od", repeat_text_year_day: "dan", select_year_month: "mesec", repeat_radio_end: "Brez končnega datuma", repeat_text_occurences_count: "pojavitve", repeat_radio_end2: "Po", repeat_radio_end3: "Končaj do", repeat_never: "Nikoli", repeat_daily: "Vsak dan", repeat_workdays: "Vsak delovni dan", repeat_weekly: "Vsak teden", repeat_monthly: "Vsak mesec", repeat_yearly: "Vsako leto", repeat_custom: "Po meri", repeat_freq_day: "Dan", repeat_freq_week: "Teden", repeat_freq_month: "Mesec", repeat_freq_year: "Leto", repeat_on_date: "Na datum", repeat_ends: "Konča se", month_for_recurring: ["Januar", "Februar", "Marec", "April", "Maj", "Junij", "Julij", "Avgust", "September", "Oktober", "November", "December"], day_for_recurring: ["Nedelja", "Ponedeljek", "Torek", "Sreda", "Četrtek", "Petek", "Sobota"] } }, xa = { date: { month_full: ["Január", "Február", "Marec", "Apríl", "Máj", "Jún", "Júl", "August", "September", "Október", "November", "December"], month_short: ["Jan", "Feb", "Mar", "Apr", "Máj", "Jún", "Júl", "Aug", "Sept", "Okt", "Nov", "Dec"], day_full: ["Nedeľa", "Pondelok", "Utorok", "Streda", "Štvrtok", "Piatok", "Sobota"], day_short: ["Ne", "Po", "Ut", "St", "Št", "Pi", "So"] }, labels: { dhx_cal_today_button: "Dnes", day_tab: "Deň", week_tab: "Týždeň", month_tab: "Mesiac", new_event: "Nová udalosť", icon_save: "Uložiť", icon_cancel: "Späť", icon_details: "Detail", icon_edit: "Edituj", icon_delete: "Zmazať", confirm_closing: "Vaše zmeny nebudú uložené. Skutočne?", confirm_deleting: "Udalosť bude natrvalo vymazaná. Skutočne?", section_description: "Poznámky", section_time: "Doba platnosti", confirm_recurring: "Prajete si upraviť celú radu opakovaných udalostí?", section_recurring: "Opakovanie udalosti", button_recurring: "Vypnuté", button_recurring_open: "Zapnuté", button_edit_series: "Upraviť opakovania", button_edit_occurrence: "Upraviť inštancie", agenda_tab: "Program", date: "Dátum", description: "Poznámka", year_tab: "Rok", full_day: "Celý deň", week_agenda_tab: "Program", grid_tab: "Mriežka", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "Denne", repeat_radio_week: "Týždenne", repeat_radio_month: "Mesaène", repeat_radio_year: "Roène", repeat_radio_day_type: "Každý", repeat_text_day_count: "deò", repeat_radio_day_type2: "Každý prac. deò", repeat_week: "Opakova každý", repeat_text_week_count: "týždeò v dòoch:", repeat_radio_month_type: "Opakova", repeat_radio_month_start: "On", repeat_text_month_day: "deò každý", repeat_text_month_count: "mesiac", repeat_text_month_count2_before: "každý", repeat_text_month_count2_after: "mesiac", repeat_year_label: "On", select_year_day2: "poèas", repeat_text_year_day: "deò", select_year_month: "mesiac", repeat_radio_end: "Bez dátumu ukonèenia", repeat_text_occurences_count: "udalostiach", repeat_radio_end3: "Ukonèi", repeat_radio_end2: "Po", repeat_never: "Nikdy", repeat_daily: "Každý deň", repeat_workdays: "Každý pracovný deň", repeat_weekly: "Každý týždeň", repeat_monthly: "Každý mesiac", repeat_yearly: "Každý rok", repeat_custom: "Vlastné", repeat_freq_day: "Deň", repeat_freq_week: "Týždeň", repeat_freq_month: "Mesiac", repeat_freq_year: "Rok", repeat_on_date: "Na dátum", repeat_ends: "Koniec", month_for_recurring: ["Január", "Február", "Marec", "Apríl", "Máj", "Jún", "Júl", "August", "September", "Október", "November", "December"], day_for_recurring: ["Nede¾a", "Pondelok", "Utorok", "Streda", "Štvrtok", "Piatok", "Sobota"] } }, ka = { date: { month_full: ["Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September", "Oktober", "November", "December"], month_short: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"], day_full: ["Söndag", "Måndag", "Tisdag", "Onsdag", "Torsdag", "Fredag", "Lördag"], day_short: ["Sön", "Mån", "Tis", "Ons", "Tor", "Fre", "Lör"] }, labels: { dhx_cal_today_button: "Idag", day_tab: "Dag", week_tab: "Vecka", month_tab: "Månad", new_event: "Ny händelse", icon_save: "Spara", icon_cancel: "Ångra", icon_details: "Detaljer", icon_edit: "Ändra", icon_delete: "Ta bort", confirm_closing: "", confirm_deleting: "Är du säker på att du vill ta bort händelsen permanent?", section_description: "Beskrivning", section_time: "Tid", full_day: "Hela dagen", confirm_recurring: "Vill du redigera hela serien med repeterande händelser?", section_recurring: "Upprepa händelse", button_recurring: "Inaktiverat", button_recurring_open: "Aktiverat", button_edit_series: "Redigera serien", button_edit_occurrence: "Redigera en kopia", agenda_tab: "Dagordning", date: "Datum", description: "Beskrivning", year_tab: "År", week_agenda_tab: "Dagordning", grid_tab: "Galler", drag_to_create: "Dra för att skapa ny", drag_to_move: "Dra för att flytta", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "Dagligen", repeat_radio_week: "Veckovis", repeat_radio_month: "Månadsvis", repeat_radio_year: "Årligen", repeat_radio_day_type: "Var", repeat_text_day_count: "dag", repeat_radio_day_type2: "Varje arbetsdag", repeat_week: " Upprepa var", repeat_text_week_count: "vecka dessa dagar:", repeat_radio_month_type: "Upprepa", repeat_radio_month_start: "Den", repeat_text_month_day: "dagen var", repeat_text_month_count: "månad", repeat_text_month_count2_before: "var", repeat_text_month_count2_after: "månad", repeat_year_label: "Den", select_year_day2: "i", repeat_text_year_day: "dag i", select_year_month: "månad", repeat_radio_end: "Inget slutdatum", repeat_text_occurences_count: "upprepningar", repeat_radio_end3: "Sluta efter", repeat_radio_end2: "Efter", repeat_never: "Aldrig", repeat_daily: "Varje dag", repeat_workdays: "Varje vardag", repeat_weekly: "Varje vecka", repeat_monthly: "Varje månad", repeat_yearly: "Varje år", repeat_custom: "Anpassad", repeat_freq_day: "Dag", repeat_freq_week: "Vecka", repeat_freq_month: "Månad", repeat_freq_year: "År", repeat_on_date: "På datum", repeat_ends: "Slutar", month_for_recurring: ["Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September", "Oktober", "November", "December"], day_for_recurring: ["Söndag", "Måndag", "Tisdag", "Onsdag", "Torsdag", "Fredag", "Lördag"] } }, wa = { date: { month_full: ["Ocak", "Þubat", "Mart", "Nisan", "Mayýs", "Haziran", "Temmuz", "Aðustos", "Eylül", "Ekim", "Kasým", "Aralýk"], month_short: ["Oca", "Þub", "Mar", "Nis", "May", "Haz", "Tem", "Aðu", "Eyl", "Eki", "Kas", "Ara"], day_full: ["Pazar", "Pazartes,", "Salý", "Çarþamba", "Perþembe", "Cuma", "Cumartesi"], day_short: ["Paz", "Pts", "Sal", "Çar", "Per", "Cum", "Cts"] }, labels: { dhx_cal_today_button: "Bugün", day_tab: "Gün", week_tab: "Hafta", month_tab: "Ay", new_event: "Uygun", icon_save: "Kaydet", icon_cancel: "Ýptal", icon_details: "Detaylar", icon_edit: "Düzenle", icon_delete: "Sil", confirm_closing: "", confirm_deleting: "Etkinlik silinecek, devam?", section_description: "Açýklama", section_time: "Zaman aralýðý", full_day: "Tam gün", confirm_recurring: "Tüm tekrar eden etkinlikler silinecek, devam?", section_recurring: "Etkinliði tekrarla", button_recurring: "Pasif", button_recurring_open: "Aktif", button_edit_series: "Dizi düzenleme", button_edit_occurrence: "Bir kopyasını düzenleyin", agenda_tab: "Ajanda", date: "Tarih", description: "Açýklama", year_tab: "Yýl", week_agenda_tab: "Ajanda", grid_tab: "Izgara", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "Günlük", repeat_radio_week: "Haftalık", repeat_radio_month: "Aylık", repeat_radio_year: "Yıllık", repeat_radio_day_type: "Her", repeat_text_day_count: "gün", repeat_radio_day_type2: "Her iş günü", repeat_week: " Tekrar her", repeat_text_week_count: "hafta şu günlerde:", repeat_radio_month_type: "Tekrar et", repeat_radio_month_start: "Tarihinde", repeat_text_month_day: "gün her", repeat_text_month_count: "ay", repeat_text_month_count2_before: "her", repeat_text_month_count2_after: "ay", repeat_year_label: "Tarihinde", select_year_day2: "ayın", repeat_text_year_day: "günü", select_year_month: "ay", repeat_radio_end: "Bitiş tarihi yok", repeat_text_occurences_count: "olay", repeat_radio_end2: "Sonra", repeat_radio_end3: "Tarihinde bitir", repeat_never: "Asla", repeat_daily: "Her gün", repeat_workdays: "Her iş günü", repeat_weekly: "Her hafta", repeat_monthly: "Her ay", repeat_yearly: "Her yıl", repeat_custom: "Özel", repeat_freq_day: "Gün", repeat_freq_week: "Hafta", repeat_freq_month: "Ay", repeat_freq_year: "Yıl", repeat_on_date: "Tarihinde", repeat_ends: "Biter", month_for_recurring: ["Ocak", "Şubat", "Mart", "Nisan", "Mayıs", "Haziran", "Temmuz", "Ağustos", "Eylül", "Ekim", "Kasım", "Aralık"], day_for_recurring: ["Pazar", "Pazartesi", "Salı", "Çarşamba", "Perşembe", "Cuma", "Cumartesi"] } }, Ea = { date: { month_full: ["Січень", "Лютий", "Березень", "Квітень", "Травень", "Червень", "Липень", "Серпень", "Вересень", "Жовтень", "Листопад", "Грудень"], month_short: ["Січ", "Лют", "Бер", "Кві", "Тра", "Чер", "Лип", "Сер", "Вер", "Жов", "Лис", "Гру"], day_full: ["Неділя", "Понеділок", "Вівторок", "Середа", "Четвер", "П'ятниця", "Субота"], day_short: ["Нед", "Пон", "Вів", "Сер", "Чет", "Птн", "Суб"] }, labels: { dhx_cal_today_button: "Сьогодні", day_tab: "День", week_tab: "Тиждень", month_tab: "Місяць", new_event: "Нова подія", icon_save: "Зберегти", icon_cancel: "Відміна", icon_details: "Деталі", icon_edit: "Редагувати", icon_delete: "Вилучити", confirm_closing: "", confirm_deleting: "Подія вилучиться назавжди. Ви впевнені?", section_description: "Опис", section_time: "Часовий проміжок", full_day: "Весь день", confirm_recurring: "Хочете редагувати весь перелік повторюваних подій?", section_recurring: "Повторювана подія", button_recurring: "Відключено", button_recurring_open: "Включено", button_edit_series: "Редагувати серію", button_edit_occurrence: "Редагувати примірник", agenda_tab: "Перелік", date: "Дата", description: "Опис", year_tab: "Рік", week_agenda_tab: "Перелік", grid_tab: "Таблиця", drag_to_create: "Drag to create", drag_to_move: "Drag to move", message_ok: "OK", message_cancel: "Cancel", next: "Next", prev: "Previous", year: "Year", month: "Month", day: "Day", hour: "Hour", minute: "Minute", repeat_radio_day: "День", repeat_radio_week: "Тиждень", repeat_radio_month: "Місяць", repeat_radio_year: "Рік", repeat_radio_day_type: "Кожний", repeat_text_day_count: "день", repeat_radio_day_type2: "Кожний робочий день", repeat_week: " Повторювати кожен", repeat_text_week_count: "тиждень , по:", repeat_radio_month_type: "Повторювати", repeat_radio_month_start: "", repeat_text_month_day: " числа кожний ", repeat_text_month_count: "місяць", repeat_text_month_count2_before: "кожен ", repeat_text_month_count2_after: "місяць", repeat_year_label: "", select_year_day2: "", repeat_text_year_day: "день", select_year_month: "", repeat_radio_end: "Без дати закінчення", repeat_text_occurences_count: "повторень", repeat_radio_end3: "До ", repeat_radio_end2: "", repeat_never: "Ніколи", repeat_daily: "Щодня", repeat_workdays: "Щодня в робочі дні", repeat_weekly: "Щотижня", repeat_monthly: "Щомісяця", repeat_yearly: "Щороку", repeat_custom: "Налаштоване", repeat_freq_day: "День", repeat_freq_week: "Тиждень", repeat_freq_month: "Місяць", repeat_freq_year: "Рік", repeat_on_date: "На дату", repeat_ends: "Закінчується", month_for_recurring: ["січня", "лютого", "березня", "квітня", "травня", "червня", "липня", "серпня", "вересня", "жовтня", "листопада", "грудня"], day_for_recurring: ["Неділям", "Понеділкам", "Вівторкам", "Середам", "Четвергам", "П'ятницям", "Суботам"] } }; class Da { constructor(i, t, r = {}) { - this.state = { date: /* @__PURE__ */ new Date(), modes: ["days", "months", "years"], currentRange: [], eventDates: [], currentModeIndex: 0, ...r }, this.container = null, this.element = null, this.onStateChangeHandlers = [], this.scheduler = i, this._domEvents = i._createDomEventScope(), this.state = this.getState(), Ue(this), t && (this.container = t, this.render(this.container)), this.onStateChange((d, n) => { + this.state = { date: /* @__PURE__ */ new Date(), modes: ["days", "months", "years"], currentRange: [], eventDates: [], filterDays: null, currentModeIndex: 0, ...r }, this.container = null, this.element = null, this.onStateChangeHandlers = [], this.scheduler = i, this._domEvents = i._createDomEventScope(), this.state = this.getState(), Ue(this), t && (this.container = t, this.render(this.container)), this.onStateChange((d, n) => { this.callEvent("onStateChange", [n, d]); }); } @@ -2378,14 +2387,17 @@ class Da { r === "days" ? this._renderDayGrid(t) : r === "months" ? this._renderMonthGrid(t) : this._renderYearGrid(t); } _renderDayGridHeader(i) { - const { date: t } = this.getState(), r = this.scheduler; - let d = r.date.week_start(new Date(t)); - const n = r.date.add(r.date.week_start(new Date(t)), 1, "week"); + const { date: t, filterDays: r } = this.getState(), d = this.scheduler; + let n = d.date.week_start(new Date(t)); + const s = d.date.add(d.date.week_start(new Date(t)), 1, "week"); i.classList.add("dhx_cal_datepicker_days"); - const s = r.date.date_to_str("%D"); - for (; d.valueOf() < n.valueOf(); ) { - const _ = s(d), a = document.createElement("div"); - a.setAttribute("data-day", d.getDay()), a.classList.add("dhx_cal_datepicker_dayname"), a.innerText = _, i.appendChild(a), d = r.date.add(d, 1, "day"); + const _ = d.date.date_to_str("%D"); + for (; n.valueOf() < s.valueOf(); ) { + if (!r || !r(n)) { + const a = _(n), o = document.createElement("div"); + o.setAttribute("data-day", n.getDay()), o.classList.add("dhx_cal_datepicker_dayname"), o.innerText = a, i.appendChild(o); + } + n = d.date.add(n, 1, "day"); } } _weeksBetween(i, t) { @@ -2396,26 +2408,31 @@ class Da { return d; } _renderDayGrid(i) { - const { date: t, currentRange: r, eventDates: d, minWeeks: n } = this.getState(); - let s = r[0], _ = r[1]; - const a = d.reduce((y, x) => (y[this.scheduler.date.day_start(new Date(x)).valueOf()] = !0, y), {}), o = document.createElement("div"); - this._renderDayGridHeader(o), i.appendChild(o); - const l = this.scheduler, h = l.date.week_start(l.date.month_start(new Date(t))), v = l.date.month_start(new Date(t)), u = l.date.add(l.date.month_start(new Date(t)), 1, "month"); - let f = l.date.add(l.date.month_start(new Date(t)), 1, "month"); - const c = l.date.date_part(l._currentDate()); - f.getDay() !== 0 && (f = l.date.add(l.date.week_start(f), 1, "week")); - let p = this._weeksBetween(h, f); - n && p < n && (f = l.date.add(f, n - p, "week")); - let m = h; - const g = document.createElement("div"); - for (g.classList.add("dhx_cal_datepicker_days"), this._domEvents.attach(g, "click", (y) => { - const x = y.target.closest("[data-cell-date]"), b = new Date(x.getAttribute("data-cell-date")); - this.callEvent("onDateClick", [b, y]); - }); m.valueOf() < f.valueOf(); ) { - const y = document.createElement("div"); - y.setAttribute("data-cell-date", l.templates.format_date(m)), y.setAttribute("data-day", m.getDay()), y.innerHTML = m.getDate(), m.valueOf() < v.valueOf() ? y.classList.add("dhx_before") : m.valueOf() >= u.valueOf() && y.classList.add("dhx_after"), m.getDay() !== 0 && m.getDay() !== 6 || y.classList.add("dhx_cal_datepicker_weekend"), m.valueOf() == c.valueOf() && y.classList.add("dhx_now"), s && _ && m.valueOf() >= s.valueOf() && m.valueOf() < _.valueOf() && y.classList.add("dhx_cal_datepicker_current"), a[m.valueOf()] && y.classList.add("dhx_cal_datepicker_event"), y.classList.add("dhx_cal_datepicker_date"), g.appendChild(y), m = l.date.add(m, 1, "day"); - } - i.appendChild(g); + const { date: t, currentRange: r, eventDates: d, minWeeks: n, filterDays: s } = this.getState(); + let _ = r[0], a = r[1]; + const o = d.reduce((b, k) => (b[this.scheduler.date.day_start(new Date(k)).valueOf()] = !0, b), {}), l = document.createElement("div"); + this._renderDayGridHeader(l); + const h = l.children.length; + i.appendChild(l), h !== 7 && i.style.setProperty("--dhx-scheduler-week-length", h); + const m = this.scheduler, v = m.date.week_start(m.date.month_start(new Date(t))), u = m.date.month_start(new Date(t)), c = m.date.add(m.date.month_start(new Date(t)), 1, "month"); + let f = m.date.add(m.date.month_start(new Date(t)), 1, "month"); + const p = m.date.date_part(m._currentDate()); + f.getDay() !== 0 && (f = m.date.add(m.date.week_start(f), 1, "week")); + let g = this._weeksBetween(v, f); + n && g < n && (f = m.date.add(f, n - g, "week")); + let y = v; + const x = document.createElement("div"); + for (x.classList.add("dhx_cal_datepicker_days"), this._domEvents.attach(x, "click", (b) => { + const k = b.target.closest("[data-cell-date]"), w = new Date(k.getAttribute("data-cell-date")); + this.callEvent("onDateClick", [w, b]); + }); y.valueOf() < f.valueOf(); ) { + if (!s || !s(y)) { + const b = document.createElement("div"); + b.setAttribute("data-cell-date", m.templates.format_date(y)), b.setAttribute("data-day", y.getDay()), b.innerHTML = y.getDate(), y.valueOf() < u.valueOf() ? b.classList.add("dhx_before") : y.valueOf() >= c.valueOf() && b.classList.add("dhx_after"), y.getDay() !== 0 && y.getDay() !== 6 || b.classList.add("dhx_cal_datepicker_weekend"), y.valueOf() == p.valueOf() && b.classList.add("dhx_now"), _ && a && y.valueOf() >= _.valueOf() && y.valueOf() < a.valueOf() && b.classList.add("dhx_cal_datepicker_current"), o[y.valueOf()] && b.classList.add("dhx_cal_datepicker_event"), b.classList.add("dhx_cal_datepicker_date"), x.appendChild(b); + } + y = m.date.add(y, 1, "day"); + } + i.appendChild(x); } _renderMonthGrid(i) { const { date: t } = this.getState(), r = document.createElement("div"); @@ -2460,7 +2477,7 @@ class Da { } } function Sa(e) { - const i = { version: "7.1.2" }; + const i = { version: "7.1.3" }; i.$stateProvider = function() { const a = {}; return { getState: function(o) { @@ -2480,9 +2497,9 @@ function Sa(e) { }(), i.getState = i.$stateProvider.getState, function(a) { var o = { agenda: "https://docs.dhtmlx.com/scheduler/agenda_view.html", grid: "https://docs.dhtmlx.com/scheduler/grid_view.html", map: "https://docs.dhtmlx.com/scheduler/map_view.html", unit: "https://docs.dhtmlx.com/scheduler/units_view.html", timeline: "https://docs.dhtmlx.com/scheduler/timeline_view.html", week_agenda: "https://docs.dhtmlx.com/scheduler/weekagenda_view.html", year: "https://docs.dhtmlx.com/scheduler/year_view.html", anythingElse: "https://docs.dhtmlx.com/scheduler/views.html" }, l = { agenda: "ext/dhtmlxscheduler_agenda_view.js", grid: "ext/dhtmlxscheduler_grid_view.js", map: "ext/dhtmlxscheduler_map_view.js", unit: "ext/dhtmlxscheduler_units.js", timeline: "ext/dhtmlxscheduler_timeline.js, ext/dhtmlxscheduler_treetimeline.js, ext/dhtmlxscheduler_daytimeline.js", week_agenda: "ext/dhtmlxscheduler_week_agenda.js", year: "ext/dhtmlxscheduler_year_view.js", limit: "ext/dhtmlxscheduler_limit.js" }; a._commonErrorMessages = { unknownView: function(h) { - var v = l[h] ? "You're probably missing " + l[h] + "." : ""; + var m = l[h] ? "You're probably missing " + l[h] + "." : ""; return "`" + h + "` view is not defined. \nPlease check parameters you pass to `scheduler.init` or `scheduler.setCurrentView` in your code and ensure you've imported appropriate extensions. \nRelated docs: " + (o[h] || o.anythingElse) + ` -` + (v ? v + ` +` + (m ? m + ` ` : ""); }, collapsedContainer: function(h) { return `Scheduler container height is set to *100%* but the rendered height is zero and the scheduler is not visible. @@ -2512,8 +2529,8 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); `)); }; }(i), zt(i), function(a) { - Ue(a), Ot(a), a._detachDomEvent = function(c, p, m) { - c.removeEventListener ? c.removeEventListener(p, m, !1) : c.detachEvent && c.detachEvent("on" + p, m); + Ue(a), Ot(a), a._detachDomEvent = function(c, f, p) { + c.removeEventListener ? c.removeEventListener(f, p, !1) : c.detachEvent && c.detachEvent("on" + f, p); }, a._init_once = function() { Lt(a), a._init_once = function() { }; @@ -2521,18 +2538,18 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); const o = { render: function(c) { return a._init_nav_bar(c); } }, l = { render: function(c) { - const p = document.createElement("div"); - return p.className = "dhx_cal_header", p; + const f = document.createElement("div"); + return f.className = "dhx_cal_header", f; } }, h = { render: function(c) { - const p = document.createElement("div"); - return p.className = "dhx_cal_data", p; + const f = document.createElement("div"); + return f.className = "dhx_cal_data", f; } }; - function v(c) { + function m(c) { return !!(c.querySelector(".dhx_cal_header") && c.querySelector(".dhx_cal_data") && c.querySelector(".dhx_cal_navline")); } - a.init = function(c, p, m) { + a.init = function(c, f, p) { if (!this.$destroyed) { - if (p = p || a._currentDate(), m = m || "week", this._obj && this.unset_actions(), this._obj = typeof c == "string" ? document.getElementById(c) : c, this.$container = this._obj, this.$root = this._obj, !this.$container.offsetHeight && this.$container.offsetWidth && this.$container.style.height === "100%" && window.console.error(a._commonErrorMessages.collapsedContainer(), this.$container), this.config.wai_aria_attributes && this.config.wai_aria_application_role && this.$container.setAttribute("role", "application"), this.config.header || v(this.$container) || (this.config.header = function(g) { + if (f = f || a._currentDate(), p = p || "week", this._obj && this.unset_actions(), this._obj = typeof c == "string" ? document.getElementById(c) : c, this.$container = this._obj, this.$root = this._obj, !this.$container.offsetHeight && this.$container.offsetWidth && this.$container.style.height === "100%" && window.console.error(a._commonErrorMessages.collapsedContainer(), this.$container), this.config.wai_aria_attributes && this.config.wai_aria_application_role && this.$container.setAttribute("role", "application"), this.config.header || m(this.$container) || (this.config.header = function(g) { const y = ["day", "week", "month"]; if (g.matrix) for (const x in g.matrix) @@ -2549,62 +2566,62 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); }(this), window.console.log(["Required DOM elements are missing from the scheduler container and **scheduler.config.header** is not specified.", "Using a default header configuration: ", "scheduler.config.header = " + JSON.stringify(this.config.header, null, 2), "Check this article for the details: https://docs.dhtmlx.com/scheduler/initialization.html"].join(` `))), this.config.header) this.$container.innerHTML = "", this.$container.classList.add("dhx_cal_container"), this.config.header.height && (this.xy.nav_height = this.config.header.height), this.$container.appendChild(o.render(this.config.header)), this.$container.appendChild(l.render()), this.$container.appendChild(h.render()); - else if (!v(this.$container)) + else if (!m(this.$container)) throw new Error(["Required DOM elements are missing from the scheduler container.", "Be sure to either specify them manually in the markup: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviamarkup", "Or to use **scheduler.config.header** setting so they could be created automatically: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviaheaderconfig"].join(` `)); - this.config.rtl && (this.$container.className += " dhx_cal_container_rtl"), this._skin_init && a._skin_init(), a.date.init(), this._scroll = !0, this._els = [], this.get_elements(), this.init_templates(), this.set_actions(), this._init_once(), this._init_touch_events(), this.set_sizes(), a.callEvent("onSchedulerReady", []), a.$initialized = !0, this.setCurrentView(p, m); + this.config.rtl && (this.$container.className += " dhx_cal_container_rtl"), this._skin_init && a._skin_init(), a.date.init(), this._scroll = !0, this._els = [], this.get_elements(), this.init_templates(), this.set_actions(), this._init_once(), this._init_touch_events(), this.set_sizes(), a.callEvent("onSchedulerReady", []), a.$initialized = !0, this.setCurrentView(f, p); } - }, a.xy = { min_event_height: 20, bar_height: 24, scale_width: 50, scroll_width: 18, scale_height: 20, month_scale_height: 20, menu_width: 25, margin_top: 0, margin_left: 0, editor_width: 140, month_head_height: 22, event_header_height: 14 }, a.keys = { edit_save: 13, edit_cancel: 27 }, a.bind = function(c, p) { - return c.bind ? c.bind(p) : function() { - return c.apply(p, arguments); + }, a.xy = { min_event_height: 20, bar_height: 24, scale_width: 50, scroll_width: 18, scale_height: 20, month_scale_height: 20, menu_width: 25, margin_top: 0, margin_left: 0, editor_width: 140, month_head_height: 22, event_header_height: 14 }, a.keys = { edit_save: 13, edit_cancel: 27 }, a.bind = function(c, f) { + return c.bind ? c.bind(f) : function() { + return c.apply(f, arguments); }; }, a.set_sizes = function() { - var c = this._x = this._obj.clientWidth - this.xy.margin_left, p = this._table_view ? 0 : this.xy.scale_width + this.xy.scroll_width, m = this.$container.querySelector(".dhx_cal_scale_placeholder"); - a._is_material_skin() ? (m || ((m = document.createElement("div")).className = "dhx_cal_scale_placeholder", this.$container.insertBefore(m, this._els.dhx_cal_header[0])), m.style.display = "block", this.set_xy(m, c, this.xy.scale_height + 1, 0, this._els.dhx_cal_header[0].offsetTop)) : m && m.parentNode.removeChild(m), this._lightbox && (a.$container.offsetWidth < 1200 || this._setLbPosition(document.querySelector(".dhx_cal_light"))), this._data_width = c - p, this._els.dhx_cal_navline[0].style.width = c + "px"; + var c = this._x = this._obj.clientWidth - this.xy.margin_left, f = this._table_view ? 0 : this.xy.scale_width + this.xy.scroll_width, p = this.$container.querySelector(".dhx_cal_scale_placeholder"); + a._is_material_skin() ? (p || ((p = document.createElement("div")).className = "dhx_cal_scale_placeholder", this.$container.insertBefore(p, this._els.dhx_cal_header[0])), p.style.display = "block", this.set_xy(p, c, this.xy.scale_height + 1, 0, this._els.dhx_cal_header[0].offsetTop)) : p && p.parentNode.removeChild(p), this._lightbox && (a.$container.offsetWidth < 1200 || this._setLbPosition(document.querySelector(".dhx_cal_light"))), this._data_width = c - f, this._els.dhx_cal_navline[0].style.width = c + "px"; const g = this._els.dhx_cal_header[0]; this.set_xy(g, this._data_width, this.xy.scale_height), g.style.left = "", g.style.right = "", this._table_view ? this.config.rtl ? g.style.right = "-1px" : g.style.left = "-1px" : this.config.rtl ? g.style.right = `${this.xy.scale_width}px` : g.style.left = `${this.xy.scale_width}px`; - }, a.set_xy = function(c, p, m, g, y) { + }, a.set_xy = function(c, f, p, g, y) { function x(k) { - let E = k; - return isNaN(Number(E)) || (E = Math.max(0, E) + "px"), E; + let w = k; + return isNaN(Number(w)) || (w = Math.max(0, w) + "px"), w; } var b = "left"; - p !== void 0 && (c.style.width = x(p)), m !== void 0 && (c.style.height = x(m)), arguments.length > 3 && (g !== void 0 && (this.config.rtl && (b = "right"), c.style[b] = g + "px"), y !== void 0 && (c.style.top = y + "px")); + f !== void 0 && (c.style.width = x(f)), p !== void 0 && (c.style.height = x(p)), arguments.length > 3 && (g !== void 0 && (this.config.rtl && (b = "right"), c.style[b] = g + "px"), y !== void 0 && (c.style.top = y + "px")); }, a.get_elements = function() { const c = this._obj.getElementsByTagName("DIV"); - for (let p = 0; p < c.length; p++) { - let m = a._getClassName(c[p]); - const g = c[p].getAttribute("data-tab") || c[p].getAttribute("name") || ""; - m && (m = m.split(" ")[0]), this._els[m] || (this._els[m] = []), this._els[m].push(c[p]); - let y = a.locale.labels[g + "_tab"] || a.locale.labels[g || m]; - typeof y != "string" && g && !c[p].innerHTML && (y = g.split("_")[0]), y && (this._waiAria.labelAttr(c[p], y), c[p].innerHTML = y); + for (let f = 0; f < c.length; f++) { + let p = a._getClassName(c[f]); + const g = c[f].getAttribute("data-tab") || c[f].getAttribute("name") || ""; + p && (p = p.split(" ")[0]), this._els[p] || (this._els[p] = []), this._els[p].push(c[f]); + let y = a.locale.labels[g + "_tab"] || a.locale.labels[g || p]; + typeof y != "string" && g && !c[f].innerHTML && (y = g.split("_")[0]), y && (this._waiAria.labelAttr(c[f], y), c[f].innerHTML = y); } }; - const u = a._createDomEventScope(); - function f(c, p) { - const m = new Date(c), g = (new Date(p).getTime() - m.getTime()) / 864e5; + const v = a._createDomEventScope(); + function u(c, f) { + const p = new Date(c), g = (new Date(f).getTime() - p.getTime()) / 864e5; return Math.abs(g); } a.unset_actions = function() { - u.detachAll(); + v.detachAll(); }, a.set_actions = function() { for (const c in this._els) if (this._click[c]) - for (let p = 0; p < this._els[c].length; p++) { - const m = this._els[c][p], g = this._click[c].bind(m); - u.attach(m, "click", g); + for (let f = 0; f < this._els[c].length; f++) { + const p = this._els[c][f], g = this._click[c].bind(p); + v.attach(p, "click", g); } - u.attach(this._obj, "selectstart", function(c) { + v.attach(this._obj, "selectstart", function(c) { return c.preventDefault(), !1; - }), u.attach(this._obj, "mousemove", function(c) { + }), v.attach(this._obj, "mousemove", function(c) { a._temp_touch_block || a._on_mouse_move(c); - }), u.attach(this._obj, "mousedown", function(c) { + }), v.attach(this._obj, "mousedown", function(c) { a._ignore_next_click || a._on_mouse_down(c); - }), u.attach(this._obj, "mouseup", function(c) { + }), v.attach(this._obj, "mouseup", function(c) { a._ignore_next_click || a._on_mouse_up(c); - }), u.attach(this._obj, "dblclick", function(c) { + }), v.attach(this._obj, "dblclick", function(c) { a._on_dbl_click(c); - }), u.attach(this._obj, "contextmenu", function(c) { + }), v.attach(this._obj, "contextmenu", function(c) { return a.checkEvent("onContextMenu") && c.preventDefault(), a.callEvent("onContextMenu", [a._locate_event(c.target), c]); }); }, a.select = function(c) { @@ -2612,38 +2629,38 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); }, a.unselect = function(c) { if (c && c != this._select_id) return; - const p = this._select_id; - this._select_id = null, p && this.getEvent(p) && this.updateEvent(p), this.callEvent("onEventUnselected", [p]); + const f = this._select_id; + this._select_id = null, f && this.getEvent(f) && this.updateEvent(f), this.callEvent("onEventUnselected", [f]); }, a.$stateProvider.registerProvider("global", (function() { return { mode: this._mode, date: new Date(this._date), min_date: new Date(this._min_date), max_date: new Date(this._max_date), editor_id: this._edit_id, lightbox_id: this._lightbox_id, new_event: this._new_event, select_id: this._select_id, expanded: this.expanded, drag_id: this._drag_id, drag_mode: this._drag_mode }; }).bind(a)), a._click = { dhx_cal_data: function(c) { if (a._ignore_next_click) return c.preventDefault && c.preventDefault(), c.cancelBubble = !0, a._ignore_next_click = !1, !1; - const p = a._locate_event(c.target); - if (p) { - if (!a.callEvent("onClick", [p, c]) || a.config.readonly) + const f = a._locate_event(c.target); + if (f) { + if (!a.callEvent("onClick", [f, c]) || a.config.readonly) return; } else a.callEvent("onEmptyClick", [a.getActionData(c).date, c]); - if (p && a.config.select) { - a.select(p); - const m = c.target.closest(".dhx_menu_icon"), g = a._getClassName(m); - g.indexOf("_icon") != -1 && a._click.buttons[g.split(" ")[1].replace("icon_", "")](p); + if (f && a.config.select) { + a.select(f); + const p = c.target.closest(".dhx_menu_icon"), g = a._getClassName(p); + g.indexOf("_icon") != -1 && a._click.buttons[g.split(" ")[1].replace("icon_", "")](f); } else a._close_not_saved(), a.getState().select_id && (/* @__PURE__ */ new Date()).valueOf() - (a._new_event || 0) > 500 && a.unselect(); }, dhx_cal_prev_button: function() { a._click.dhx_cal_next_button(0, -1); - }, dhx_cal_next_button: function(c, p) { - let m = 1; - a.config.rtl && (p = -p, m = -m), a.setCurrentView(a.date.add(a.date[a._mode + "_start"](new Date(a._date)), p || m, a._mode)); + }, dhx_cal_next_button: function(c, f) { + let p = 1; + a.config.rtl && (f = -f, p = -p), a.setCurrentView(a.date.add(a.date[a._mode + "_start"](new Date(a._date)), f || p, a._mode)); }, dhx_cal_today_button: function() { a.callEvent("onBeforeTodayDisplayed", []) && a.setCurrentView(a._currentDate()); }, dhx_cal_tab: function() { - const c = this.getAttribute("data-tab"), p = this.getAttribute("name"), m = c || p.substring(0, p.search("_tab")); - a.setCurrentView(a._date, m); + const c = this.getAttribute("data-tab"), f = this.getAttribute("name"), p = c || f.substring(0, f.search("_tab")); + a.setCurrentView(a._date, p); }, buttons: { delete: function(c) { - const p = a.locale.labels.confirm_deleting; - a._dhtmlx_confirm({ message: p, title: a.locale.labels.title_confirm_deleting, callback: function() { + const f = a.locale.labels.confirm_deleting; + a._dhtmlx_confirm({ message: f, title: a.locale.labels.title_confirm_deleting, callback: function() { a.deleteEvent(c); }, config: { ok: a.locale.labels.icon_delete } }); }, edit: function(c) { @@ -2656,33 +2673,33 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); a.showLightbox(c); }, cancel: function(c) { a.editStop(!1); - } } }, a._dhtmlx_confirm = function({ message: c, title: p, callback: m, config: g }) { + } } }, a._dhtmlx_confirm = function({ message: c, title: f, callback: p, config: g }) { if (!c) - return m(); + return p(); g = g || {}; const y = { ...g, text: c }; - p && (y.title = p), m && (y.callback = function(x) { - x && m(); + f && (y.title = f), p && (y.callback = function(x) { + x && p(); }), a.confirm(y); - }, a.addEventNow = function(c, p, m) { + }, a.addEventNow = function(c, f, p) { let g = {}; a._isObject(c) && !a._isDate(c) && (g = c, c = null); const y = 6e4 * (this.config.event_duration || this.config.time_step); c || (c = g.start_date || Math.round(a._currentDate().valueOf() / y) * y); let x = new Date(c); - if (!p) { - let E = this.config.first_hour; - E > x.getHours() && (x.setHours(E), c = x.valueOf()), p = c.valueOf() + y; + if (!f) { + let w = this.config.first_hour; + w > x.getHours() && (x.setHours(w), c = x.valueOf()), f = c.valueOf() + y; } - let b = new Date(p); + let b = new Date(f); x.valueOf() == b.valueOf() && b.setTime(b.valueOf() + y), g.start_date = g.start_date || x, g.end_date = g.end_date || b, g.text = g.text || this.locale.labels.new_event, g.id = this._drag_id = g.id || this.uid(), this._drag_mode = "new-size", this._loading = !0; const k = this.addEvent(g); - return this.callEvent("onEventCreated", [this._drag_id, m]), this._loading = !1, this._drag_event = {}, this._on_mouse_up(m), k; - }, a._on_dbl_click = function(c, p) { - if (p = p || c.target, this.config.readonly) + return this.callEvent("onEventCreated", [this._drag_id, p]), this._loading = !1, this._drag_event = {}, this._on_mouse_up(p), k; + }, a._on_dbl_click = function(c, f) { + if (f = f || c.target, this.config.readonly) return; - const m = a._getClassName(p).split(" ")[0]; - switch (m) { + const p = a._getClassName(f).split(" ")[0]; + switch (p) { case "dhx_scale_holder": case "dhx_scale_holder_now": case "dhx_month_body": @@ -2698,7 +2715,7 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); case "dhx_grid_event": case "dhx_cal_event_line": case "dhx_cal_event_clear": { - const g = this._locate_event(p); + const g = this._locate_event(f); if (!this.callEvent("onDblClick", [g, c])) return; this.config.details_on_dblclick || this._table_view || !this.getEvent(g)._timed || !this.config.select ? this.showLightbox(g) : this.edit(g); @@ -2708,51 +2725,51 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); case "dhx_cal_container": return; default: { - const g = this["dblclick_" + m]; + const g = this["dblclick_" + p]; if (g) g.call(this, c); - else if (p.parentNode && p != this) - return a._on_dbl_click(c, p.parentNode); + else if (f.parentNode && f != this) + return a._on_dbl_click(c, f.parentNode); break; } } }, a._get_column_index = function(c) { - let p = 0; + let f = 0; if (this._cols) { - let m = 0, g = 0; - for (; m + this._cols[g] < c && g < this._cols.length; ) - m += this._cols[g], g++; - if (p = g + (this._cols[g] ? (c - m) / this._cols[g] : 0), this._ignores && p >= this._cols.length) - for (; p >= 1 && this._ignores[Math.floor(p)]; ) - p--; + let p = 0, g = 0; + for (; p + this._cols[g] < c && g < this._cols.length; ) + p += this._cols[g], g++; + if (f = g + (this._cols[g] ? (c - p) / this._cols[g] : 0), this._ignores && f >= this._cols.length) + for (; f >= 1 && this._ignores[Math.floor(f)]; ) + f--; } - return p; + return f; }, a._week_indexes_from_pos = function(c) { if (this._cols) { - const p = this._get_column_index(c.x); - return c.x = Math.min(this._cols.length - 1, Math.max(0, Math.ceil(p) - 1)), c.y = Math.max(0, Math.ceil(60 * c.y / (this.config.time_step * this.config.hour_size_px)) - 1) + this.config.first_hour * (60 / this.config.time_step), c; + const f = this._get_column_index(c.x); + return c.x = Math.min(this._cols.length - 1, Math.max(0, Math.ceil(f) - 1)), c.y = Math.max(0, Math.ceil(60 * c.y / (this.config.time_step * this.config.hour_size_px)) - 1) + this.config.first_hour * (60 / this.config.time_step), c; } return c; }, a._mouse_coords = function(c) { - let p; - const m = document.body, g = document.documentElement; - p = this.$env.isIE || !c.pageX && !c.pageY ? { x: c.clientX + (m.scrollLeft || g.scrollLeft || 0) - m.clientLeft, y: c.clientY + (m.scrollTop || g.scrollTop || 0) - m.clientTop } : { x: c.pageX, y: c.pageY }, this.config.rtl && this._colsS ? (p.x = this.$container.querySelector(".dhx_cal_data").offsetWidth - p.x, p.x += this.$domHelpers.getAbsoluteLeft(this._obj), this._mode !== "month" && (p.x -= this.xy.scale_width)) : p.x -= this.$domHelpers.getAbsoluteLeft(this._obj) + (this._table_view ? 0 : this.xy.scale_width); + let f; + const p = document.body, g = document.documentElement; + f = this.$env.isIE || !c.pageX && !c.pageY ? { x: c.clientX + (p.scrollLeft || g.scrollLeft || 0) - p.clientLeft, y: c.clientY + (p.scrollTop || g.scrollTop || 0) - p.clientTop } : { x: c.pageX, y: c.pageY }, this.config.rtl && this._colsS ? (f.x = this.$container.querySelector(".dhx_cal_data").offsetWidth - f.x, f.x += this.$domHelpers.getAbsoluteLeft(this._obj), this._mode !== "month" && (f.x -= this.xy.scale_width)) : f.x -= this.$domHelpers.getAbsoluteLeft(this._obj) + (this._table_view ? 0 : this.xy.scale_width); const y = this.$container.querySelector(".dhx_cal_data"); - p.y -= this.$domHelpers.getAbsoluteTop(y) - this._els.dhx_cal_data[0].scrollTop, p.ev = c; + f.y -= this.$domHelpers.getAbsoluteTop(y) - this._els.dhx_cal_data[0].scrollTop, f.ev = c; const x = this["mouse_" + this._mode]; if (x) - p = x.call(this, p); + f = x.call(this, f); else if (this._table_view) { - const b = this._get_column_index(p.x); + const b = this._get_column_index(f.x); if (!this._cols || !this._colsS) - return p; + return f; let k = 0; - for (k = 1; k < this._colsS.heights.length && !(this._colsS.heights[k] > p.y); k++) + for (k = 1; k < this._colsS.heights.length && !(this._colsS.heights[k] > f.y); k++) ; - p.y = Math.ceil(24 * (Math.max(0, b) + 7 * Math.max(0, k - 1)) * 60 / this.config.time_step), (a._drag_mode || this._mode == "month") && (p.y = 24 * (Math.max(0, Math.ceil(b) - 1) + 7 * Math.max(0, k - 1)) * 60 / this.config.time_step), this._drag_mode == "move" && a._ignores_detected && a.config.preserve_length && (p._ignores = !0, this._drag_event._event_length || (this._drag_event._event_length = this._get_real_event_length(this._drag_event.start_date, this._drag_event.end_date, { x_step: 1, x_unit: "day" }))), p.x = 0; + f.y = Math.ceil(24 * (Math.max(0, b) + 7 * Math.max(0, k - 1)) * 60 / this.config.time_step), (a._drag_mode || this._mode == "month") && (f.y = 24 * (Math.max(0, Math.ceil(b) - 1) + 7 * Math.max(0, k - 1)) * 60 / this.config.time_step), this._drag_mode == "move" && a._ignores_detected && a.config.preserve_length && (f._ignores = !0, this._drag_event._event_length || (this._drag_event._event_length = this._get_real_event_length(this._drag_event.start_date, this._drag_event.end_date, { x_step: 1, x_unit: "day" }))), f.x = 0; } else - p = this._week_indexes_from_pos(p); - return p.timestamp = +/* @__PURE__ */ new Date(), p; + f = this._week_indexes_from_pos(f); + return f.timestamp = +/* @__PURE__ */ new Date(), f; }, a._close_not_saved = function() { if ((/* @__PURE__ */ new Date()).valueOf() - (a._new_event || 0) > 500 && a._edit_id) { const c = a.locale.labels.confirm_closing; @@ -2760,80 +2777,80 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); a.editStop(a.config.positive_closing); } }), c && (this._drag_id = this._drag_pos = this._drag_mode = null); } - }, a._correct_shift = function(c, p) { - return c - 6e4 * (new Date(a._min_date).getTimezoneOffset() - new Date(c).getTimezoneOffset()) * (p ? -1 : 1); - }, a._is_pos_changed = function(c, p) { - function m(g, y, x) { + }, a._correct_shift = function(c, f) { + return c - 6e4 * (new Date(a._min_date).getTimezoneOffset() - new Date(c).getTimezoneOffset()) * (f ? -1 : 1); + }, a._is_pos_changed = function(c, f) { + function p(g, y, x) { return Math.abs(g - y) > x; } - return !c || !this._drag_pos || !!(this._drag_pos.has_moved || !this._drag_pos.timestamp || p.timestamp - this._drag_pos.timestamp > 100 || m(c.ev.clientX, p.ev.clientX, 5) || m(c.ev.clientY, p.ev.clientY, 5)); + return !c || !this._drag_pos || !!(this._drag_pos.has_moved || !this._drag_pos.timestamp || f.timestamp - this._drag_pos.timestamp > 100 || p(c.ev.clientX, f.ev.clientX, 5) || p(c.ev.clientY, f.ev.clientY, 5)); }, a._correct_drag_start_date = function(c) { + let f; + a.matrix && (f = a.matrix[a._mode]), f = f || { x_step: 1, x_unit: "day" }, c = new Date(c); + let p = 1; + return (f._start_correction || f._end_correction) && (p = 60 * (f.last_hour || 0) - (60 * c.getHours() + c.getMinutes()) || 1), 1 * c + (a._get_fictional_event_length(c, p, f) - p); + }, a._correct_drag_end_date = function(c, f) { let p; - a.matrix && (p = a.matrix[a._mode]), p = p || { x_step: 1, x_unit: "day" }, c = new Date(c); - let m = 1; - return (p._start_correction || p._end_correction) && (m = 60 * (p.last_hour || 0) - (60 * c.getHours() + c.getMinutes()) || 1), 1 * c + (a._get_fictional_event_length(c, m, p) - m); - }, a._correct_drag_end_date = function(c, p) { - let m; - a.matrix && (m = a.matrix[a._mode]), m = m || { x_step: 1, x_unit: "day" }; - const g = 1 * c + a._get_fictional_event_length(c, p, m); - return new Date(1 * g - (a._get_fictional_event_length(g, -1, m, -1) + 1)); + a.matrix && (p = a.matrix[a._mode]), p = p || { x_step: 1, x_unit: "day" }; + const g = 1 * c + a._get_fictional_event_length(c, f, p); + return new Date(1 * g - (a._get_fictional_event_length(g, -1, p, -1) + 1)); }, a._on_mouse_move = function(c) { if (this._drag_mode) { - var p = this._mouse_coords(c); - if (this._is_pos_changed(this._drag_pos, p)) { - var m, g; + var f = this._mouse_coords(c); + if (this._is_pos_changed(this._drag_pos, f)) { + var p, g; if (this._edit_id != this._drag_id && this._close_not_saved(), !this._drag_mode) return; var y = null; - if (this._drag_pos && !this._drag_pos.has_moved && ((y = this._drag_pos).has_moved = !0), this._drag_pos = p, this._drag_pos.has_moved = !0, this._drag_mode == "create") { - if (y && (p = y), this._close_not_saved(), this.unselect(this._select_id), this._loading = !0, m = this._get_date_from_pos(p).valueOf(), !this._drag_start) - return this.callEvent("onBeforeEventCreated", [c, this._drag_id]) ? (this._loading = !1, void (this._drag_start = m)) : void (this._loading = !1); - g = m, this._drag_start; + if (this._drag_pos && !this._drag_pos.has_moved && ((y = this._drag_pos).has_moved = !0), this._drag_pos = f, this._drag_pos.has_moved = !0, this._drag_mode == "create") { + if (y && (f = y), this._close_not_saved(), this.unselect(this._select_id), this._loading = !0, p = this._get_date_from_pos(f).valueOf(), !this._drag_start) + return this.callEvent("onBeforeEventCreated", [c, this._drag_id]) ? (this._loading = !1, void (this._drag_start = p)) : void (this._loading = !1); + g = p, this._drag_start; var x = new Date(this._drag_start), b = new Date(g); - this._mode != "day" && this._mode != "week" || x.getHours() != b.getHours() || x.getMinutes() != b.getMinutes() || (b = new Date(this._drag_start + 1e3)), this._drag_id = this.uid(), this.addEvent(x, b, this.locale.labels.new_event, this._drag_id, p.fields), this.callEvent("onEventCreated", [this._drag_id, c]), this._loading = !1, this._drag_mode = "new-size"; + this._mode != "day" && this._mode != "week" || x.getHours() != b.getHours() || x.getMinutes() != b.getMinutes() || (b = new Date(this._drag_start + 1e3)), this._drag_id = this.uid(), this.addEvent(x, b, this.locale.labels.new_event, this._drag_id, f.fields), this.callEvent("onEventCreated", [this._drag_id, c]), this._loading = !1, this._drag_mode = "new-size"; } - var k, E = this.config.time_step, D = this.getEvent(this._drag_id); + var k, w = this.config.time_step, D = this.getEvent(this._drag_id); if (a.matrix && (k = a.matrix[a._mode]), k = k || { x_step: 1, x_unit: "day" }, this._drag_mode == "move") - m = this._min_date.valueOf() + 6e4 * (p.y * this.config.time_step + 24 * p.x * 60), !p.custom && this._table_view && (m += 1e3 * this.date.time_part(D.start_date)), !this._table_view && this._dragEventBody && this._drag_event._move_event_shift === void 0 && (this._drag_event._move_event_shift = m - D.start_date), this._drag_event._move_event_shift && (m -= this._drag_event._move_event_shift), m = this._correct_shift(m), p._ignores && this.config.preserve_length && this._table_view && k ? (m = a._correct_drag_start_date(m), g = a._correct_drag_end_date(m, this._drag_event._event_length)) : g = D.end_date.valueOf() - (D.start_date.valueOf() - m); + p = this._min_date.valueOf() + 6e4 * (f.y * this.config.time_step + 24 * f.x * 60), !f.custom && this._table_view && (p += 1e3 * this.date.time_part(D.start_date)), !this._table_view && this._dragEventBody && this._drag_event._move_event_shift === void 0 && (this._drag_event._move_event_shift = p - D.start_date), this._drag_event._move_event_shift && (p -= this._drag_event._move_event_shift), p = this._correct_shift(p), f._ignores && this.config.preserve_length && this._table_view && k ? (p = a._correct_drag_start_date(p), g = a._correct_drag_end_date(p, this._drag_event._event_length)) : g = D.end_date.valueOf() - (D.start_date.valueOf() - p); else { - if (m = D.start_date.valueOf(), g = D.end_date.valueOf(), this._table_view) { - var w = this._min_date.valueOf() + p.y * this.config.time_step * 6e4 + (p.custom ? 0 : 864e5); + if (p = D.start_date.valueOf(), g = D.end_date.valueOf(), this._table_view) { + var E = this._min_date.valueOf() + f.y * this.config.time_step * 6e4 + (f.custom ? 0 : 864e5); if (this._mode == "month") - if (w = this._correct_shift(w, !1), this._drag_from_start) { + if (E = this._correct_shift(E, !1), this._drag_from_start) { var S = 864e5; - w <= a.date.date_part(new Date(g + S - 1)).valueOf() && (m = w - S); + E <= a.date.date_part(new Date(g + S - 1)).valueOf() && (p = E - S); } else - g = w; + g = E; else - this.config.preserve_length ? p.resize_from_start ? m = a._correct_drag_start_date(w) : g = a._correct_drag_end_date(w, 0) : p.resize_from_start ? m = w : g = w; + this.config.preserve_length ? f.resize_from_start ? p = a._correct_drag_start_date(E) : g = a._correct_drag_end_date(E, 0) : f.resize_from_start ? p = E : g = E; } else { - var N = this.date.date_part(new Date(D.end_date.valueOf() - 1)).valueOf(), M = new Date(N), A = this.config.first_hour, T = 60 / E * (this.config.last_hour - A); + var N = this.date.date_part(new Date(D.end_date.valueOf() - 1)).valueOf(), M = new Date(N), T = this.config.first_hour, A = 60 / w * (this.config.last_hour - T); this.config.time_step = 1; var H = this._mouse_coords(c); - this.config.time_step = E; - var $ = p.y * E * 6e4, j = Math.min(p.y + 1, T) * E * 6e4, z = 6e4 * H.y; + this.config.time_step = w; + var $ = f.y * w * 6e4, j = Math.min(f.y + 1, A) * w * 6e4, z = 6e4 * H.y; g = Math.abs($ - z) > Math.abs(j - z) ? N + j : N + $, g += 6e4 * (new Date(g).getTimezoneOffset() - M.getTimezoneOffset()), this._els.dhx_cal_data[0].style.cursor = "s-resize", this._mode != "week" && this._mode != "day" || (g = this._correct_shift(g)); } if (this._drag_mode == "new-size") if (g <= this._drag_start) { - var W = p.shift || (this._table_view && !p.custom ? 864e5 : 0); - m = g - (p.shift ? 0 : W), g = this._drag_start + (W || 6e4 * E); + var W = f.shift || (this._table_view && !f.custom ? 864e5 : 0); + p = g - (f.shift ? 0 : W), g = this._drag_start + (W || 6e4 * w); } else - m = this._drag_start; + p = this._drag_start; else - g <= m && (g = m + 6e4 * E); + g <= p && (g = p + 6e4 * w); } - var Y = new Date(g - 1), q = new Date(m); + var Y = new Date(g - 1), q = new Date(p); if (this._drag_mode == "move" && a.config.limit_drag_out && (+q < +a._min_date || +g > +a._max_date)) { if (+D.start_date < +a._min_date || +D.end_date > +a._max_date) q = new Date(D.start_date), g = new Date(D.end_date); else { var V = g - q; - +q < +a._min_date ? (q = new Date(a._min_date), p._ignores && this.config.preserve_length && this._table_view ? (q = new Date(a._correct_drag_start_date(q)), k._start_correction && (q = new Date(q.valueOf() + k._start_correction)), g = new Date(1 * q + this._get_fictional_event_length(q, this._drag_event._event_length, k))) : g = new Date(+q + V)) : (g = new Date(a._max_date), p._ignores && this.config.preserve_length && this._table_view ? (k._end_correction && (g = new Date(g.valueOf() - k._end_correction)), g = new Date(1 * g - this._get_fictional_event_length(g, 0, k, !0)), q = new Date(1 * g - this._get_fictional_event_length(g, this._drag_event._event_length, k, !0)), this._ignores_detected && (q = a.date.add(q, k.x_step, k.x_unit), g = new Date(1 * g - this._get_fictional_event_length(g, 0, k, !0)), g = a.date.add(g, k.x_step, k.x_unit))) : q = new Date(+g - V)); + +q < +a._min_date ? (q = new Date(a._min_date), f._ignores && this.config.preserve_length && this._table_view ? (q = new Date(a._correct_drag_start_date(q)), k._start_correction && (q = new Date(q.valueOf() + k._start_correction)), g = new Date(1 * q + this._get_fictional_event_length(q, this._drag_event._event_length, k))) : g = new Date(+q + V)) : (g = new Date(a._max_date), f._ignores && this.config.preserve_length && this._table_view ? (k._end_correction && (g = new Date(g.valueOf() - k._end_correction)), g = new Date(1 * g - this._get_fictional_event_length(g, 0, k, !0)), q = new Date(1 * g - this._get_fictional_event_length(g, this._drag_event._event_length, k, !0)), this._ignores_detected && (q = a.date.add(q, k.x_step, k.x_unit), g = new Date(1 * g - this._get_fictional_event_length(g, 0, k, !0)), g = a.date.add(g, k.x_step, k.x_unit))) : q = new Date(+g - V)); } Y = new Date(g - 1); } - if (!this._table_view && this._dragEventBody && !a.config.all_timed && (!a._get_section_view() && p.x != this._get_event_sday({ start_date: new Date(m), end_date: new Date(m) }) || new Date(m).getHours() < this.config.first_hour) && (V = g - q, this._drag_mode == "move" && (S = this._min_date.valueOf() + 24 * p.x * 60 * 6e4, (q = new Date(S)).setHours(this.config.first_hour), g = new Date(q.valueOf() + V), Y = new Date(g - 1))), this._table_view || a.config.all_timed || !(!a.getView() && p.x != this._get_event_sday({ start_date: new Date(g), end_date: new Date(g) }) || new Date(g).getHours() >= this.config.last_hour) || (V = g - q, S = this._min_date.valueOf() + 24 * p.x * 60 * 6e4, (g = a.date.date_part(new Date(S))).setHours(this.config.last_hour), Y = new Date(g - 1), this._drag_mode == "move" && (q = new Date(+g - V))), this._table_view || Y.getDate() == q.getDate() && Y.getHours() < this.config.last_hour || a._allow_dnd) + if (!this._table_view && this._dragEventBody && !a.config.all_timed && (!a._get_section_view() && f.x != this._get_event_sday({ start_date: new Date(p), end_date: new Date(p) }) || new Date(p).getHours() < this.config.first_hour) && (V = g - q, this._drag_mode == "move" && (S = this._min_date.valueOf() + 24 * f.x * 60 * 6e4, (q = new Date(S)).setHours(this.config.first_hour), g = new Date(q.valueOf() + V), Y = new Date(g - 1))), this._table_view || a.config.all_timed || !(!a.getView() && f.x != this._get_event_sday({ start_date: new Date(g), end_date: new Date(g) }) || new Date(g).getHours() >= this.config.last_hour) || (V = g - q, S = this._min_date.valueOf() + 24 * f.x * 60 * 6e4, (g = a.date.date_part(new Date(S))).setHours(this.config.last_hour), Y = new Date(g - 1), this._drag_mode == "move" && (q = new Date(+g - V))), this._table_view || Y.getDate() == q.getDate() && Y.getHours() < this.config.last_hour || a._allow_dnd) if (D.start_date = q, D.end_date = new Date(g), this.config.update_render) { var ve = a._els.dhx_cal_data[0].scrollTop; this.update_view(), a._els.dhx_cal_data[0].scrollTop = ve; @@ -2847,11 +2864,11 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); var Ne = this._locate_event(c.target || c.srcElement); this.callEvent("onMouseMove", [Ne, c]); } - }, a._on_mouse_down = function(c, p) { + }, a._on_mouse_down = function(c, f) { if (c.button != 2 && !this.config.readonly && !this._drag_mode) { - p = p || c.target || c.srcElement; - var m = a._getClassName(p).split(" ")[0]; - switch (this.config.drag_event_body && m == "dhx_body" && p.parentNode && p.parentNode.className.indexOf("dhx_cal_select_menu") === -1 && (m = "dhx_event_move", this._dragEventBody = !0), m) { + f = f || c.target || c.srcElement; + var p = a._getClassName(f).split(" ")[0]; + switch (this.config.drag_event_body && p == "dhx_body" && f.parentNode && f.parentNode.className.indexOf("dhx_cal_select_menu") === -1 && (p = "dhx_event_move", this._dragEventBody = !0), p) { case "dhx_cal_event_line": case "dhx_cal_event_clear": this._table_view && (this._drag_mode = "move"); @@ -2861,7 +2878,7 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); this._drag_mode = "move"; break; case "dhx_event_resize": - this._drag_mode = "resize", a._getClassName(p).indexOf("dhx_event_resize_end") < 0 ? a._drag_from_start = !0 : a._drag_from_start = !1; + this._drag_mode = "resize", a._getClassName(f).indexOf("dhx_event_resize_end") < 0 ? a._drag_from_start = !0 : a._drag_from_start = !1; break; case "dhx_scale_holder": case "dhx_scale_holder_now": @@ -2871,16 +2888,16 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); this._drag_mode = "create"; break; case "": - if (p.parentNode) - return a._on_mouse_down(c, p.parentNode); + if (f.parentNode) + return a._on_mouse_down(c, f.parentNode); break; default: - if ((!a.checkEvent("onMouseDown") || a.callEvent("onMouseDown", [m, c])) && p.parentNode && p != this && m != "dhx_body") - return a._on_mouse_down(c, p.parentNode); + if ((!a.checkEvent("onMouseDown") || a.callEvent("onMouseDown", [p, c])) && f.parentNode && f != this && p != "dhx_body") + return a._on_mouse_down(c, f.parentNode); this._drag_mode = null, this._drag_id = null; } if (this._drag_mode) { - var g = this._locate_event(p); + var g = this._locate_event(f); if (this.config["drag_" + this._drag_mode] && this.callEvent("onBeforeDrag", [g, this._drag_mode, c])) { if (this._drag_id = g, (this._edit_id != this._drag_id || this._edit_id && this._drag_mode == "create") && this._close_not_saved(), !this._drag_mode) return; @@ -2891,34 +2908,34 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); this._drag_start = null; } }, a._get_private_properties = function(c) { - var p = {}; - for (var m in c) - m.indexOf("_") === 0 && (p[m] = !0); - return p; - }, a._clear_temporary_properties = function(c, p) { - var m = this._get_private_properties(c), g = this._get_private_properties(p); + var f = {}; + for (var p in c) + p.indexOf("_") === 0 && (f[p] = !0); + return f; + }, a._clear_temporary_properties = function(c, f) { + var p = this._get_private_properties(c), g = this._get_private_properties(f); for (var y in g) - m[y] || delete p[y]; + p[y] || delete f[y]; }, a._on_mouse_up = function(c) { if (!c || c.button != 2 || !this._mobile) { if (this._drag_mode && this._drag_id) { this._els.dhx_cal_data[0].style.cursor = "default"; - var p = this._drag_id, m = this._drag_mode, g = !this._drag_pos || this._drag_pos.has_moved; + var f = this._drag_id, p = this._drag_mode, g = !this._drag_pos || this._drag_pos.has_moved; delete this._drag_event._move_event_shift; var y = this.getEvent(this._drag_id); if (g && (this._drag_event._dhx_changed || !this._drag_event.start_date || y.start_date.valueOf() != this._drag_event.start_date.valueOf() || y.end_date.valueOf() != this._drag_event.end_date.valueOf())) { var x = this._drag_mode == "new-size"; if (this.callEvent("onBeforeEventChanged", [y, c, x, this._drag_event])) if (this._drag_id = this._drag_mode = null, x && this.config.edit_on_create) { - if (this.unselect(), this._new_event = /* @__PURE__ */ new Date(), this._table_view || this.config.details_on_create || !this.config.select || !this.isOneDayEvent(this.getEvent(p))) - return a.callEvent("onDragEnd", [p, m, c]), this.showLightbox(p); - this._drag_pos = !0, this._select_id = this._edit_id = p; + if (this.unselect(), this._new_event = /* @__PURE__ */ new Date(), this._table_view || this.config.details_on_create || !this.config.select || !this.isOneDayEvent(this.getEvent(f))) + return a.callEvent("onDragEnd", [f, p, c]), this.showLightbox(f); + this._drag_pos = !0, this._select_id = this._edit_id = f; } else - this._new_event || this.callEvent(x ? "onEventAdded" : "onEventChanged", [p, this.getEvent(p)]); + this._new_event || this.callEvent(x ? "onEventAdded" : "onEventChanged", [f, this.getEvent(f)]); else x ? this.deleteEvent(y.id, !0) : (this._drag_event._dhx_changed = !1, this._clear_temporary_properties(y, this._drag_event), a._lame_copy(y, this._drag_event), this.updateEvent(y.id)); } - this._drag_pos && (this._drag_pos.has_moved || this._drag_pos === !0) && (this._drag_id = this._drag_mode = null, this.render_view_data()), a.callEvent("onDragEnd", [p, m, c]); + this._drag_pos && (this._drag_pos.has_moved || this._drag_pos === !0) && (this._drag_id = this._drag_mode = null, this.render_view_data()), a.callEvent("onDragEnd", [f, p, c]); } this._drag_id = null, this._drag_mode = null, this._drag_pos = null, this._drag_event = null, this._drag_from_start = null; } @@ -2933,116 +2950,116 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); }, a.isViewExists = function(c) { return !!(a[c + "_view"] || a.date[c + "_start"] && a.templates[c + "_date"] && a.templates[c + "_scale_date"]); }, a._set_aria_buttons_attrs = function() { - for (var c = ["dhx_cal_next_button", "dhx_cal_prev_button", "dhx_cal_tab", "dhx_cal_today_button"], p = 0; p < c.length; p++) - for (var m = this._els[c[p]], g = 0; m && g < m.length; g++) { - var y = m[g].getAttribute("data-tab") || m[g].getAttribute("name"), x = this.locale.labels[c[p]]; - y && (x = this.locale.labels[y + "_tab"] || this.locale.labels[y] || x), c[p] == "dhx_cal_next_button" ? x = this.locale.labels.next : c[p] == "dhx_cal_prev_button" && (x = this.locale.labels.prev), this._waiAria.headerButtonsAttributes(m[g], x || ""); + for (var c = ["dhx_cal_next_button", "dhx_cal_prev_button", "dhx_cal_tab", "dhx_cal_today_button"], f = 0; f < c.length; f++) + for (var p = this._els[c[f]], g = 0; p && g < p.length; g++) { + var y = p[g].getAttribute("data-tab") || p[g].getAttribute("name"), x = this.locale.labels[c[f]]; + y && (x = this.locale.labels[y + "_tab"] || this.locale.labels[y] || x), c[f] == "dhx_cal_next_button" ? x = this.locale.labels.next : c[f] == "dhx_cal_prev_button" && (x = this.locale.labels.prev), this._waiAria.headerButtonsAttributes(p[g], x || ""); } - }, a.updateView = function(c, p) { + }, a.updateView = function(c, f) { if (!this.$container) throw new Error(`The scheduler is not initialized. **scheduler.updateView** or **scheduler.setCurrentView** can be called only after **scheduler.init**`); - c = c || this._date, p = p || this._mode; - var m = "dhx_cal_data"; + c = c || this._date, f = f || this._mode; + var p = "dhx_cal_data"; this.locale.labels.icon_form || (this.locale.labels.icon_form = this.locale.labels.icon_edit); - var g = this._obj, y = "dhx_scheduler_" + this._mode, x = "dhx_scheduler_" + p; + var g = this._obj, y = "dhx_scheduler_" + this._mode, x = "dhx_scheduler_" + f; this._mode && g.className.indexOf(y) != -1 ? g.className = g.className.replace(y, x) : g.className += " " + x; - var b, k = "dhx_multi_day", E = !(this._mode != p || !this.config.preserve_scroll) && this._els[m][0].scrollTop; - this._els[k] && this._els[k][0] && (b = this._els[k][0].scrollTop), this[this._mode + "_view"] && p && this._mode != p && this[this._mode + "_view"](!1), this._close_not_saved(), this._els[k] && (this._els[k][0].parentNode.removeChild(this._els[k][0]), this._els[k] = null), this._mode = p, this._date = c, this._table_view = this._mode == "month", this._dy_shift = 0, this.update_view(), this._set_aria_buttons_attrs(); + var b, k = "dhx_multi_day", w = !(this._mode != f || !this.config.preserve_scroll) && this._els[p][0].scrollTop; + this._els[k] && this._els[k][0] && (b = this._els[k][0].scrollTop), this[this._mode + "_view"] && f && this._mode != f && this[this._mode + "_view"](!1), this._close_not_saved(), this._els[k] && (this._els[k][0].parentNode.removeChild(this._els[k][0]), this._els[k] = null), this._mode = f, this._date = c, this._table_view = this._mode == "month", this._dy_shift = 0, this.update_view(), this._set_aria_buttons_attrs(); var D = this._els.dhx_cal_tab; if (D) - for (var w = 0; w < D.length; w++) { - var S = D[w]; + for (var E = 0; E < D.length; E++) { + var S = D[E]; S.getAttribute("data-tab") == this._mode || S.getAttribute("name") == this._mode + "_tab" ? (S.classList.add("active"), this._waiAria.headerToggleState(S, !0)) : (S.classList.remove("active"), this._waiAria.headerToggleState(S, !1)); } - typeof E == "number" && (this._els[m][0].scrollTop = E), typeof b == "number" && this._els[k] && this._els[k][0] && (this._els[k][0].scrollTop = b); - }, a.setCurrentView = function(c, p) { - this.callEvent("onBeforeViewChange", [this._mode, this._date, p || this._mode, c || this._date]) && (this.updateView(c, p), this.callEvent("onViewChange", [this._mode, this._date])); - }, a.render = function(c, p) { - a.setCurrentView(c, p); - }, a._render_x_header = function(c, p, m, g, y) { + typeof w == "number" && (this._els[p][0].scrollTop = w), typeof b == "number" && this._els[k] && this._els[k][0] && (this._els[k][0].scrollTop = b); + }, a.setCurrentView = function(c, f) { + this.callEvent("onBeforeViewChange", [this._mode, this._date, f || this._mode, c || this._date]) && (this.updateView(c, f), this.callEvent("onViewChange", [this._mode, this._date])); + }, a.render = function(c, f) { + a.setCurrentView(c, f); + }, a._render_x_header = function(c, f, p, g, y) { y = y || 0; var x = document.createElement("div"); - x.className = "dhx_scale_bar", this.templates[this._mode + "_scalex_class"] && (x.className += " " + this.templates[this._mode + "_scalex_class"](m)); + x.className = "dhx_scale_bar", this.templates[this._mode + "_scalex_class"] && (x.className += " " + this.templates[this._mode + "_scalex_class"](p)); var b = this._cols[c]; - this._mode == "month" && c === 0 && this.config.left_border && (x.className += " dhx_scale_bar_border", p += 1), this.set_xy(x, b, this.xy.scale_height - 1, p, y); - var k = this.templates[this._mode + "_scale_date"](m, this._mode); + this._mode == "month" && c === 0 && this.config.left_border && (x.className += " dhx_scale_bar_border", f += 1), this.set_xy(x, b, this.xy.scale_height - 1, f, y); + var k = this.templates[this._mode + "_scale_date"](p, this._mode); x.innerHTML = k, this._waiAria.dayHeaderAttr(x, k), g.appendChild(x); - }, a._get_columns_num = function(c, p) { - var m = 7; + }, a._get_columns_num = function(c, f) { + var p = 7; if (!a._table_view) { var g = a.date["get_" + a._mode + "_end"]; - g && (p = g(c)), m = Math.round((p.valueOf() - c.valueOf()) / 864e5); + g && (f = g(c)), p = Math.round((f.valueOf() - c.valueOf()) / 864e5); } - return m; + return p; }, a._get_timeunit_start = function() { return this.date[this._mode + "_start"](new Date(this._date.valueOf())); }, a._get_view_end = function() { - var c = this._get_timeunit_start(), p = a.date.add(c, 1, this._mode); + var c = this._get_timeunit_start(), f = a.date.add(c, 1, this._mode); if (!a._table_view) { - var m = a.date["get_" + a._mode + "_end"]; - m && (p = m(c)); + var p = a.date["get_" + a._mode + "_end"]; + p && (f = p(c)); } - return p; - }, a._calc_scale_sizes = function(c, p, m) { - var g = this.config.rtl, y = c, x = this._get_columns_num(p, m); - this._process_ignores(p, x, "day", 1); + return f; + }, a._calc_scale_sizes = function(c, f, p) { + var g = this.config.rtl, y = c, x = this._get_columns_num(f, p); + this._process_ignores(f, x, "day", 1); for (var b = x - this._ignores_detected, k = 0; k < x; k++) this._ignores[k] ? (this._cols[k] = 0, b++) : this._cols[k] = Math.floor(y / (b - k)), y -= this._cols[k], this._colsS[k] = (this._cols[k - 1] || 0) + (this._colsS[k - 1] || (this._table_view ? 0 : g ? this.xy.scroll_width : this.xy.scale_width)); this._colsS.col_length = x, this._colsS[x] = this._cols[x - 1] + this._colsS[x - 1] || 0; - }, a._set_scale_col_size = function(c, p, m) { + }, a._set_scale_col_size = function(c, f, p) { var g = this.config; - this.set_xy(c, p, g.hour_size_px * (g.last_hour - g.first_hour), m + this.xy.scale_width + 1, 0); - }, a._render_scales = function(c, p) { - var m = new Date(a._min_date), g = new Date(a._max_date), y = this.date.date_part(a._currentDate()), x = parseInt(c.style.width, 10) - 1, b = new Date(this._min_date), k = this._get_columns_num(m, g); - this._calc_scale_sizes(x, m, g); - var E = 0; + this.set_xy(c, f, g.hour_size_px * (g.last_hour - g.first_hour), p + this.xy.scale_width + 1, 0); + }, a._render_scales = function(c, f) { + var p = new Date(a._min_date), g = new Date(a._max_date), y = this.date.date_part(a._currentDate()), x = parseInt(c.style.width, 10) - 1, b = new Date(this._min_date), k = this._get_columns_num(p, g); + this._calc_scale_sizes(x, p, g); + var w = 0; c.innerHTML = ""; for (var D = 0; D < k; D++) { - if (this._ignores[D] || this._render_x_header(D, E, b, c), !this._table_view) { - var w = document.createElement("div"), S = "dhx_scale_holder"; - b.valueOf() == y.valueOf() && (S += " dhx_scale_holder_now"), w.setAttribute("data-column-index", D), this._ignores_detected && this._ignores[D] && (S += " dhx_scale_ignore"); + if (this._ignores[D] || this._render_x_header(D, w, b, c), !this._table_view) { + var E = document.createElement("div"), S = "dhx_scale_holder"; + b.valueOf() == y.valueOf() && (S += " dhx_scale_holder_now"), E.setAttribute("data-column-index", D), this._ignores_detected && this._ignores[D] && (S += " dhx_scale_ignore"); for (let N = 1 * this.config.first_hour; N < this.config.last_hour; N++) { const M = document.createElement("div"); M.className = "dhx_scale_time_slot dhx_scale_time_slot_hour_start", M.style.height = this.config.hour_size_px / 2 + "px"; - let A = new Date(b.getFullYear(), b.getMonth(), b.getDate(), N, 0); - M.setAttribute("data-slot-date", this.templates.format_date(A)); - let T = this.templates.time_slot_text(A); - T && (M.innerHTML = T); - let H = this.templates.time_slot_class(A); - H && M.classList.add(H), w.appendChild(M); + let T = new Date(b.getFullYear(), b.getMonth(), b.getDate(), N, 0); + M.setAttribute("data-slot-date", this.templates.format_date(T)); + let A = this.templates.time_slot_text(T); + A && (M.innerHTML = A); + let H = this.templates.time_slot_class(T); + H && M.classList.add(H), E.appendChild(M); const $ = document.createElement("div"); - $.className = "dhx_scale_time_slot", A = new Date(b.getFullYear(), b.getMonth(), b.getDate(), N, 30), $.setAttribute("data-slot-date", this.templates.format_date(A)), $.style.height = this.config.hour_size_px / 2 + "px", T = this.templates.time_slot_text(A), T && ($.innerHTML = T), H = this.templates.time_slot_class(A), H && $.classList.add(H), w.appendChild($); + $.className = "dhx_scale_time_slot", T = new Date(b.getFullYear(), b.getMonth(), b.getDate(), N, 30), $.setAttribute("data-slot-date", this.templates.format_date(T)), $.style.height = this.config.hour_size_px / 2 + "px", A = this.templates.time_slot_text(T), A && ($.innerHTML = A), H = this.templates.time_slot_class(T), H && $.classList.add(H), E.appendChild($); } - w.className = S + " " + this.templates.week_date_class(b, y), this._waiAria.dayColumnAttr(w, b), this._set_scale_col_size(w, this._cols[D], E), p.appendChild(w), this.callEvent("onScaleAdd", [w, b]); + E.className = S + " " + this.templates.week_date_class(b, y), this._waiAria.dayColumnAttr(E, b), this._set_scale_col_size(E, this._cols[D], w), f.appendChild(E), this.callEvent("onScaleAdd", [E, b]); } - E += this._cols[D], b = this.date.add(b, 1, "day"), b = this.date.day_start(b); + w += this._cols[D], b = this.date.add(b, 1, "day"), b = this.date.day_start(b); } }, a._getNavDateElement = function() { return this.$container.querySelector(".dhx_cal_date"); }, a._reset_scale = function() { if (this.templates[this._mode + "_date"]) { - var c = this._els.dhx_cal_header[0], p = this._els.dhx_cal_data[0], m = this.config; - c.innerHTML = "", p.innerHTML = ""; - var g, y, x = (m.readonly || !m.drag_resize ? " dhx_resize_denied" : "") + (m.readonly || !m.drag_move ? " dhx_move_denied" : ""); - p.className = "dhx_cal_data" + x, this._scales = {}, this._cols = [], this._colsS = { height: 0 }, this._dy_shift = 0, this.set_sizes(); + var c = this._els.dhx_cal_header[0], f = this._els.dhx_cal_data[0], p = this.config; + c.innerHTML = "", f.innerHTML = ""; + var g, y, x = (p.readonly || !p.drag_resize ? " dhx_resize_denied" : "") + (p.readonly || !p.drag_move ? " dhx_move_denied" : ""); + f.className = "dhx_cal_data" + x, this._scales = {}, this._cols = [], this._colsS = { height: 0 }, this._dy_shift = 0, this.set_sizes(); var b = this._get_timeunit_start(), k = a._get_view_end(); g = y = this._table_view ? a.date.week_start(b) : b, this._min_date = g; - var E = this.templates[this._mode + "_date"](b, k, this._mode), D = this._getNavDateElement(); - if (D && (D.innerHTML = E, this._waiAria.navBarDateAttr(D, E)), this._max_date = k, a._render_scales(c, p), this._table_view) - this._reset_month_scale(p, b, y); - else if (this._reset_hours_scale(p, b, y), m.multi_day) { - var w = "dhx_multi_day"; - this._els[w] && (this._els[w][0].parentNode.removeChild(this._els[w][0]), this._els[w] = null); + var w = this.templates[this._mode + "_date"](b, k, this._mode), D = this._getNavDateElement(); + if (D && (D.innerHTML = w, this._waiAria.navBarDateAttr(D, w)), this._max_date = k, a._render_scales(c, f), this._table_view) + this._reset_month_scale(f, b, y); + else if (this._reset_hours_scale(f, b, y), p.multi_day) { + var E = "dhx_multi_day"; + this._els[E] && (this._els[E][0].parentNode.removeChild(this._els[E][0]), this._els[E] = null); var S = document.createElement("div"); - S.className = w, S.style.visibility = "hidden", S.style.display = "none"; - var N = this._colsS[this._colsS.col_length], M = m.rtl ? this.xy.scale_width : this.xy.scroll_width, A = Math.max(N + M, 0); - this.set_xy(S, A, 0, 0), p.parentNode.insertBefore(S, p); - var T = S.cloneNode(!0); - T.className = w + "_icon", T.style.visibility = "hidden", T.style.display = "none", this.set_xy(T, this.xy.scale_width + 1, 0, 0), S.appendChild(T), this._els[w] = [S, T], a.event(this._els[w][0], "click", this._click.dhx_cal_data); + S.className = E, S.style.visibility = "hidden", S.style.display = "none"; + var N = this._colsS[this._colsS.col_length], M = p.rtl ? this.xy.scale_width : this.xy.scroll_width, T = Math.max(N + M, 0); + this.set_xy(S, T, 0, 0), f.parentNode.insertBefore(S, f); + var A = S.cloneNode(!0); + A.className = E + "_icon", A.style.visibility = "hidden", A.style.display = "none", this.set_xy(A, this.xy.scale_width + 1, 0, 0), S.appendChild(A), this._els[E] = [S, A], a.event(this._els[E][0], "click", this._click.dhx_cal_data); } } - }, a._reset_hours_scale = function(c, p, m) { + }, a._reset_hours_scale = function(c, f, p) { var g = document.createElement("div"); g.className = "dhx_scale_holder"; for (var y = new Date(1980, 1, 1, this.config.first_hour, 0, 0), x = 1 * this.config.first_hour; x < this.config.last_hour; x++) { @@ -3050,101 +3067,101 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); b.className = "dhx_scale_hour", b.style.height = this.config.hour_size_px + "px"; var k = this.xy.scale_width; this.config.left_border && (b.className += " dhx_scale_hour_border"), b.style.width = k + "px"; - var E = a.templates.hour_scale(y); - b.innerHTML = E, this._waiAria.hourScaleAttr(b, E), g.appendChild(b), y = this.date.add(y, 1, "hour"); + var w = a.templates.hour_scale(y); + b.innerHTML = w, this._waiAria.hourScaleAttr(b, w), g.appendChild(b), y = this.date.add(y, 1, "hour"); } c.appendChild(g), this.config.scroll_hour && (c.scrollTop = this.config.hour_size_px * (this.config.scroll_hour - this.config.first_hour)); }, a._currentDate = function() { return a.config.now_date ? new Date(a.config.now_date) : /* @__PURE__ */ new Date(); }, a._reset_ignores = function() { this._ignores = {}, this._ignores_detected = 0; - }, a._process_ignores = function(c, p, m, g, y) { + }, a._process_ignores = function(c, f, p, g, y) { this._reset_ignores(); var x = a["ignore_" + this._mode]; if (x) - for (var b = new Date(c), k = 0; k < p; k++) - x(b) && (this._ignores_detected += 1, this._ignores[k] = !0, y && p++), b = a.date.add(b, g, m), a.date[m + "_start"] && (b = a.date[m + "_start"](b)); - }, a._render_month_scale = function(c, p, m, g) { - var y = a.date.add(p, 1, "month"), x = new Date(m), b = a._currentDate(); - this.date.date_part(b), this.date.date_part(m), g = g || Math.ceil(Math.round((y.valueOf() - m.valueOf()) / 864e5) / 7); - for (var k = [], E = 0; E <= 7; E++) { - var D = this._cols[E] || 0; - isNaN(Number(D)) || (D += "px"), k[E] = D; - } - function w(q) { + for (var b = new Date(c), k = 0; k < f; k++) + x(b) && (this._ignores_detected += 1, this._ignores[k] = !0, y && f++), b = a.date.add(b, g, p), a.date[p + "_start"] && (b = a.date[p + "_start"](b)); + }, a._render_month_scale = function(c, f, p, g) { + var y = a.date.add(f, 1, "month"), x = new Date(p), b = a._currentDate(); + this.date.date_part(b), this.date.date_part(p), g = g || Math.ceil(Math.round((y.valueOf() - p.valueOf()) / 864e5) / 7); + for (var k = [], w = 0; w <= 7; w++) { + var D = this._cols[w] || 0; + isNaN(Number(D)) || (D += "px"), k[w] = D; + } + function E(q) { var V = a._colsS.height; return a._colsS.heights[q + 1] !== void 0 && (V = a._colsS.heights[q + 1] - (a._colsS.heights[q] || 0)), V; } var S = 0; const N = document.createElement("div"); - for (N.classList.add("dhx_cal_month_table"), E = 0; E < g; E++) { + for (N.classList.add("dhx_cal_month_table"), w = 0; w < g; w++) { var M = document.createElement("div"); - M.classList.add("dhx_cal_month_row"), M.style.height = w(E) + "px", N.appendChild(M); - for (var A = 0; A < 7; A++) { - var T = document.createElement("div"); - M.appendChild(T); + M.classList.add("dhx_cal_month_row"), M.style.height = E(w) + "px", N.appendChild(M); + for (var T = 0; T < 7; T++) { + var A = document.createElement("div"); + M.appendChild(A); var H = "dhx_cal_month_cell"; - m < p ? H += " dhx_before" : m >= y ? H += " dhx_after" : m.valueOf() == b.valueOf() && (H += " dhx_now"), this._ignores_detected && this._ignores[A] && (H += " dhx_scale_ignore"), T.className = H + " " + this.templates.month_date_class(m, b), T.setAttribute("data-cell-date", a.templates.format_date(m)); + p < f ? H += " dhx_before" : p >= y ? H += " dhx_after" : p.valueOf() == b.valueOf() && (H += " dhx_now"), this._ignores_detected && this._ignores[T] && (H += " dhx_scale_ignore"), A.className = H + " " + this.templates.month_date_class(p, b), A.setAttribute("data-cell-date", a.templates.format_date(p)); var $ = "dhx_month_body", j = "dhx_month_head"; - if (A === 0 && this.config.left_border && ($ += " dhx_month_body_border", j += " dhx_month_head_border"), this._ignores_detected && this._ignores[A]) - T.appendChild(document.createElement("div")), T.appendChild(document.createElement("div")); + if (T === 0 && this.config.left_border && ($ += " dhx_month_body_border", j += " dhx_month_head_border"), this._ignores_detected && this._ignores[T]) + A.appendChild(document.createElement("div")), A.appendChild(document.createElement("div")); else { - T.style.width = k[A], this._waiAria.monthCellAttr(T, m); + A.style.width = k[T], this._waiAria.monthCellAttr(A, p); var z = document.createElement("div"); - z.style.height = a.xy.month_head_height + "px", z.className = j, z.innerHTML = this.templates.month_day(m), T.appendChild(z); + z.style.height = a.xy.month_head_height + "px", z.className = j, z.innerHTML = this.templates.month_day(p), A.appendChild(z); var W = document.createElement("div"); - W.className = $, T.appendChild(W); + W.className = $, A.appendChild(W); } - var Y = m.getDate(); - (m = this.date.add(m, 1, "day")).getDate() - Y > 1 && (m = new Date(m.getFullYear(), m.getMonth(), Y + 1, 12, 0)); + var Y = p.getDate(); + (p = this.date.add(p, 1, "day")).getDate() - Y > 1 && (p = new Date(p.getFullYear(), p.getMonth(), Y + 1, 12, 0)); } - a._colsS.heights[E] = S, S += w(E); + a._colsS.heights[w] = S, S += E(w); } - return this._min_date = x, this._max_date = m, c.innerHTML = "", c.appendChild(N), this._scales = {}, c.querySelectorAll("[data-cell-date]").forEach((q) => { + return this._min_date = x, this._max_date = p, c.innerHTML = "", c.appendChild(N), this._scales = {}, c.querySelectorAll("[data-cell-date]").forEach((q) => { const V = a.templates.parse_date(q.getAttribute("data-cell-date")), ve = q.querySelector(".dhx_month_body"); this._scales[+V] = ve, this.callEvent("onScaleAdd", [this._scales[+V], V]); }), this._max_date; - }, a._reset_month_scale = function(c, p, m, g) { - var y = a.date.add(p, 1, "month"), x = a._currentDate(); - this.date.date_part(x), this.date.date_part(m), g = g || Math.ceil(Math.round((y.valueOf() - m.valueOf()) / 864e5) / 7); + }, a._reset_month_scale = function(c, f, p, g) { + var y = a.date.add(f, 1, "month"), x = a._currentDate(); + this.date.date_part(x), this.date.date_part(p), g = g || Math.ceil(Math.round((y.valueOf() - p.valueOf()) / 864e5) / 7); var b = Math.floor(c.clientHeight / g) - this.xy.month_head_height; - return this._colsS.height = b + this.xy.month_head_height, this._colsS.heights = [], a._render_month_scale(c, p, m, g); + return this._colsS.height = b + this.xy.month_head_height, this._colsS.heights = [], a._render_month_scale(c, f, p, g); }, a.getView = function(c) { return c || (c = a.getState().mode), a.matrix && a.matrix[c] ? a.matrix[c] : a._props && a._props[c] ? a._props[c] : null; - }, a.getLabel = function(c, p) { - for (var m = this.config.lightbox.sections, g = 0; g < m.length; g++) - if (m[g].map_to == c) { - for (var y = m[g].options, x = 0; x < y.length; x++) - if (y[x].key == p) + }, a.getLabel = function(c, f) { + for (var p = this.config.lightbox.sections, g = 0; g < p.length; g++) + if (p[g].map_to == c) { + for (var y = p[g].options, x = 0; x < y.length; x++) + if (y[x].key == f) return y[x].label; } return ""; - }, a.updateCollection = function(c, p) { - var m = a.serverList(c); - return !!m && (m.splice(0, m.length), m.push.apply(m, p || []), a.callEvent("onOptionsLoad", []), a.resetLightbox(), a.hideCover(), !0); - }, a._lame_clone = function(c, p) { - var m, g, y; - for (p = p || [], m = 0; m < p.length; m += 2) - if (c === p[m]) - return p[m + 1]; + }, a.updateCollection = function(c, f) { + var p = a.serverList(c); + return !!p && (p.splice(0, p.length), p.push.apply(p, f || []), a.callEvent("onOptionsLoad", []), a.resetLightbox(), a.hideCover(), !0); + }, a._lame_clone = function(c, f) { + var p, g, y; + for (f = f || [], p = 0; p < f.length; p += 2) + if (c === f[p]) + return f[p + 1]; if (c && typeof c == "object") { - for (y = Object.create(c), g = [Array, Date, Number, String, Boolean], m = 0; m < g.length; m++) - c instanceof g[m] && (y = m ? new g[m](c) : new g[m]()); - for (m in p.push(c, y), c) - Object.prototype.hasOwnProperty.apply(c, [m]) && (y[m] = a._lame_clone(c[m], p)); + for (y = Object.create(c), g = [Array, Date, Number, String, Boolean], p = 0; p < g.length; p++) + c instanceof g[p] && (y = p ? new g[p](c) : new g[p]()); + for (p in f.push(c, y), c) + Object.prototype.hasOwnProperty.apply(c, [p]) && (y[p] = a._lame_clone(c[p], f)); } return y || c; - }, a._lame_copy = function(c, p) { - for (var m in p) - p.hasOwnProperty(m) && (c[m] = p[m]); + }, a._lame_copy = function(c, f) { + for (var p in f) + f.hasOwnProperty(p) && (c[p] = f[p]); return c; }, a._get_date_from_pos = function(c) { - var p = this._min_date.valueOf() + 6e4 * (c.y * this.config.time_step + 24 * (this._table_view ? 0 : c.x) * 60); - return new Date(this._correct_shift(p)); + var f = this._min_date.valueOf() + 6e4 * (c.y * this.config.time_step + 24 * (this._table_view ? 0 : c.x) * 60); + return new Date(this._correct_shift(f)); }, a.getActionData = function(c) { - var p = this._mouse_coords(c); - return { date: this._get_date_from_pos(p), section: p.section }; - }, a._focus = function(c, p) { + var f = this._mouse_coords(c); + return { date: this._get_date_from_pos(f), section: f.section }; + }, a._focus = function(c, f) { if (c && c.focus) if (this._mobile) window.setTimeout(function() { @@ -3152,38 +3169,38 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); }, 10); else try { - p && c.select && c.offsetWidth && c.select(), c.focus(); + f && c.select && c.offsetWidth && c.select(), c.focus(); } catch { } - }, a._get_real_event_length = function(c, p, m) { - var g, y = p - c, x = this["ignore_" + this._mode], b = 0; - m.render ? (b = this._get_date_index(m, c), g = this._get_date_index(m, p), c.valueOf() < a.getState().min_date.valueOf() && (b = -f(c, a.getState().min_date)), p.valueOf() > a.getState().max_date.valueOf() && (g += f(p, a.getState().max_date))) : g = Math.round(y / 60 / 60 / 1e3 / 24); + }, a._get_real_event_length = function(c, f, p) { + var g, y = f - c, x = this["ignore_" + this._mode], b = 0; + p.render ? (b = this._get_date_index(p, c), g = this._get_date_index(p, f), c.valueOf() < a.getState().min_date.valueOf() && (b = -u(c, a.getState().min_date)), f.valueOf() > a.getState().max_date.valueOf() && (g += u(f, a.getState().max_date))) : g = Math.round(y / 60 / 60 / 1e3 / 24); for (var k = !0; b < g; ) { - var E = a.date.add(p, -m.x_step, m.x_unit); - if (x && x(p) && (!k || k && x(E))) - y -= p - E; + var w = a.date.add(f, -p.x_step, p.x_unit); + if (x && x(f) && (!k || k && x(w))) + y -= f - w; else { let D = 0; - const w = new Date(Math.max(E.valueOf(), c.valueOf())), S = p, N = new Date(w.getFullYear(), w.getMonth(), w.getDate(), m.first_hour), M = new Date(w.getFullYear(), w.getMonth(), w.getDate(), m.last_hour || 24), A = new Date(p.getFullYear(), p.getMonth(), p.getDate(), m.first_hour), T = new Date(p.getFullYear(), p.getMonth(), p.getDate(), m.last_hour || 24); - S.valueOf() > T.valueOf() && (D += S - T), S.valueOf() > A.valueOf() ? D += m._start_correction : D += 60 * S.getHours() * 60 * 1e3 + 60 * S.getMinutes() * 1e3, w.valueOf() < M.valueOf() && (D += m._end_correction), w.valueOf() < N.valueOf() && (D += N.valueOf() - w.valueOf()), y -= D, k = !1; + const E = new Date(Math.max(w.valueOf(), c.valueOf())), S = f, N = new Date(E.getFullYear(), E.getMonth(), E.getDate(), p.first_hour), M = new Date(E.getFullYear(), E.getMonth(), E.getDate(), p.last_hour || 24), T = new Date(f.getFullYear(), f.getMonth(), f.getDate(), p.first_hour), A = new Date(f.getFullYear(), f.getMonth(), f.getDate(), p.last_hour || 24); + S.valueOf() > A.valueOf() && (D += S - A), S.valueOf() > T.valueOf() ? D += p._start_correction : D += 60 * S.getHours() * 60 * 1e3 + 60 * S.getMinutes() * 1e3, E.valueOf() <= M.valueOf() && (D += p._end_correction), E.valueOf() < N.valueOf() && (D += N.valueOf() - E.valueOf()), y -= D, k = !1; } - p = E, g--; + f = w, g--; } return y; - }, a._get_fictional_event_length = function(c, p, m, g) { + }, a._get_fictional_event_length = function(c, f, p, g) { var y = new Date(c), x = g ? -1 : 1; - if (m._start_correction || m._end_correction) { + if (p._start_correction || p._end_correction) { var b; - b = g ? 60 * y.getHours() + y.getMinutes() - 60 * (m.first_hour || 0) : 60 * (m.last_hour || 0) - (60 * y.getHours() + y.getMinutes()); - var k = 60 * (m.last_hour - m.first_hour), E = Math.ceil((p / 6e4 - b) / k); - E < 0 && (E = 0), p += E * (1440 - k) * 60 * 1e3; + b = g ? 60 * y.getHours() + y.getMinutes() - 60 * (p.first_hour || 0) : 60 * (p.last_hour || 0) - (60 * y.getHours() + y.getMinutes()); + var k = 60 * (p.last_hour - p.first_hour), w = Math.ceil((f / 6e4 - b) / k); + w < 0 && (w = 0), f += w * (1440 - k) * 60 * 1e3; } - var D, w = new Date(1 * c + p * x), S = this["ignore_" + this._mode], N = 0; - for (m.render ? (N = this._get_date_index(m, y), D = this._get_date_index(m, w)) : D = Math.round(p / 60 / 60 / 1e3 / 24); N * x <= D * x; ) { - var M = a.date.add(y, m.x_step * x, m.x_unit); - S && S(y) && (p += (M - y) * x, D += x), y = M, N += x; + var D, E = new Date(1 * c + f * x), S = this["ignore_" + this._mode], N = 0; + for (p.render ? (N = this._get_date_index(p, y), D = this._get_date_index(p, E)) : D = Math.round(f / 60 / 60 / 1e3 / 24); N * x <= D * x; ) { + var M = a.date.add(y, p.x_step * x, p.x_unit); + S && S(y) && (f += (M - y) * x, D += x), y = M, N += x; } - return p; + return f; }, a._get_section_view = function() { return this.getView(); }, a._get_section_property = function() { @@ -3202,53 +3219,53 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); function h(c) { return (c + "").replace(o, " ").replace(l, " "); } - var v = new RegExp("'", "gm"); - function u(c) { - return (c + "").replace(v, "'"); + var m = new RegExp("'", "gm"); + function v(c) { + return (c + "").replace(m, "'"); } - for (var f in a._waiAria = { getAttributeString: function(c) { - var p = [" "]; - for (var m in c) - if (typeof c[m] != "function" && typeof c[m] != "object") { - var g = u(h(c[m])); - p.push(m + "='" + g + "'"); + for (var u in a._waiAria = { getAttributeString: function(c) { + var f = [" "]; + for (var p in c) + if (typeof c[p] != "function" && typeof c[p] != "object") { + var g = v(h(c[p])); + f.push(p + "='" + g + "'"); } - return p.push(" "), p.join(" "); - }, setAttributes: function(c, p) { - for (var m in p) - c.setAttribute(m, h(p[m])); + return f.push(" "), f.join(" "); + }, setAttributes: function(c, f) { + for (var p in f) + c.setAttribute(p, h(f[p])); return c; - }, labelAttr: function(c, p) { - return this.setAttributes(c, { "aria-label": p }); + }, labelAttr: function(c, f) { + return this.setAttributes(c, { "aria-label": f }); }, label: function(c) { return a._waiAria.getAttributeString({ "aria-label": c }); - }, hourScaleAttr: function(c, p) { - this.labelAttr(c, p); - }, monthCellAttr: function(c, p) { - this.labelAttr(c, a.templates.day_date(p)); - }, navBarDateAttr: function(c, p) { - this.labelAttr(c, p); - }, dayHeaderAttr: function(c, p) { - this.labelAttr(c, p); - }, dayColumnAttr: function(c, p) { - this.dayHeaderAttr(c, a.templates.day_date(p)); - }, headerButtonsAttributes: function(c, p) { - return this.setAttributes(c, { role: "button", "aria-label": p }); - }, headerToggleState: function(c, p) { - return this.setAttributes(c, { "aria-pressed": p ? "true" : "false" }); + }, hourScaleAttr: function(c, f) { + this.labelAttr(c, f); + }, monthCellAttr: function(c, f) { + this.labelAttr(c, a.templates.day_date(f)); + }, navBarDateAttr: function(c, f) { + this.labelAttr(c, f); + }, dayHeaderAttr: function(c, f) { + this.labelAttr(c, f); + }, dayColumnAttr: function(c, f) { + this.dayHeaderAttr(c, a.templates.day_date(f)); + }, headerButtonsAttributes: function(c, f) { + return this.setAttributes(c, { role: "button", "aria-label": f }); + }, headerToggleState: function(c, f) { + return this.setAttributes(c, { "aria-pressed": f ? "true" : "false" }); }, getHeaderCellAttr: function(c) { return a._waiAria.getAttributeString({ "aria-label": c }); - }, eventAttr: function(c, p) { - this._eventCommonAttr(c, p); - }, _eventCommonAttr: function(c, p) { - p.setAttribute("aria-label", h(a.templates.event_text(c.start_date, c.end_date, c))), a.config.readonly && p.setAttribute("aria-readonly", !0), c.$dataprocessor_class && p.setAttribute("aria-busy", !0), p.setAttribute("aria-selected", a.getState().select_id == c.id ? "true" : "false"); - }, setEventBarAttr: function(c, p) { - this._eventCommonAttr(c, p); - }, _getAttributes: function(c, p) { - var m = { setAttribute: function(g, y) { + }, eventAttr: function(c, f) { + this._eventCommonAttr(c, f); + }, _eventCommonAttr: function(c, f) { + f.setAttribute("aria-label", h(a.templates.event_text(c.start_date, c.end_date, c))), a.config.readonly && f.setAttribute("aria-readonly", !0), c.$dataprocessor_class && f.setAttribute("aria-busy", !0), f.setAttribute("aria-selected", a.getState().select_id == c.id ? "true" : "false"); + }, setEventBarAttr: function(c, f) { + this._eventCommonAttr(c, f); + }, _getAttributes: function(c, f) { + var p = { setAttribute: function(g, y) { this[g] = y; } }; - return c.apply(this, [p, m]), m; + return c.apply(this, [f, p]), p; }, eventBarAttrString: function(c) { return this.getAttributeString(this._getAttributes(this.setEventBarAttr, c)); }, agendaHeadAttrString: function() { @@ -3260,48 +3277,48 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); }, agendaDataAttrString: function() { return this.getAttributeString({ role: "grid" }); }, agendaEventAttrString: function(c) { - var p = this._getAttributes(this._eventCommonAttr, c); - return p.role = "row", this.getAttributeString(p); + var f = this._getAttributes(this._eventCommonAttr, c); + return f.role = "row", this.getAttributeString(f); }, agendaDetailsBtnString: function() { return this.getAttributeString({ role: "button", "aria-label": a.locale.labels.icon_details }); }, gridAttrString: function() { return this.getAttributeString({ role: "grid" }); }, gridRowAttrString: function(c) { return this.agendaEventAttrString(c); - }, gridCellAttrString: function(c, p, m) { - return this.getAttributeString({ role: "gridcell", "aria-label": [p.label === void 0 ? p.id : p.label, ": ", m] }); + }, gridCellAttrString: function(c, f, p) { + return this.getAttributeString({ role: "gridcell", "aria-label": [f.label === void 0 ? f.id : f.label, ": ", p] }); }, mapAttrString: function() { return this.gridAttrString(); }, mapRowAttrString: function(c) { return this.gridRowAttrString(c); }, mapDetailsBtnString: function() { return this.agendaDetailsBtnString(); - }, minicalHeader: function(c, p) { - this.setAttributes(c, { id: p + "", "aria-live": "assertice", "aria-atomic": "true" }); - }, minicalGrid: function(c, p) { - this.setAttributes(c, { "aria-labelledby": p + "", role: "grid" }); + }, minicalHeader: function(c, f) { + this.setAttributes(c, { id: f + "", "aria-live": "assertice", "aria-atomic": "true" }); + }, minicalGrid: function(c, f) { + this.setAttributes(c, { "aria-labelledby": f + "", role: "grid" }); }, minicalRow: function(c) { this.setAttributes(c, { role: "row" }); - }, minicalDayCell: function(c, p) { - var m = p.valueOf() < a._max_date.valueOf() && p.valueOf() >= a._min_date.valueOf(); - this.setAttributes(c, { role: "gridcell", "aria-label": a.templates.day_date(p), "aria-selected": m ? "true" : "false" }); + }, minicalDayCell: function(c, f) { + var p = f.valueOf() < a._max_date.valueOf() && f.valueOf() >= a._min_date.valueOf(); + this.setAttributes(c, { role: "gridcell", "aria-label": a.templates.day_date(f), "aria-selected": p ? "true" : "false" }); }, minicalHeadCell: function(c) { this.setAttributes(c, { role: "columnheader" }); - }, weekAgendaDayCell: function(c, p) { - var m = c.querySelector(".dhx_wa_scale_bar"), g = c.querySelector(".dhx_wa_day_data"), y = a.uid() + ""; - this.setAttributes(m, { id: y }), this.setAttributes(g, { "aria-labelledby": y }); - }, weekAgendaEvent: function(c, p) { - this.eventAttr(p, c); + }, weekAgendaDayCell: function(c, f) { + var p = c.querySelector(".dhx_wa_scale_bar"), g = c.querySelector(".dhx_wa_day_data"), y = a.uid() + ""; + this.setAttributes(p, { id: y }), this.setAttributes(g, { "aria-labelledby": y }); + }, weekAgendaEvent: function(c, f) { + this.eventAttr(f, c); }, lightboxHiddenAttr: function(c) { c.setAttribute("aria-hidden", "true"); }, lightboxVisibleAttr: function(c) { c.setAttribute("aria-hidden", "false"); }, lightboxSectionButtonAttrString: function(c) { return this.getAttributeString({ role: "button", "aria-label": c, tabindex: "0" }); - }, yearHeader: function(c, p) { - this.setAttributes(c, { id: p + "" }); - }, yearGrid: function(c, p) { - this.minicalGrid(c, p); + }, yearHeader: function(c, f) { + this.setAttributes(c, { id: f + "" }); + }, yearGrid: function(c, f) { + this.minicalGrid(c, f); }, yearHeadCell: function(c) { return this.minicalHeadCell(c); }, yearRow: function(c) { @@ -3314,36 +3331,36 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); return this.getAttributeString({ role: "button", "aria-label": a.locale.labels[c], tabindex: "0" }); }, eventMenuAttrString: function(c) { return this.getAttributeString({ role: "button", "aria-label": a.locale.labels[c] }); - }, lightboxHeader: function(c, p) { - c.setAttribute("aria-label", p); + }, lightboxHeader: function(c, f) { + c.setAttribute("aria-label", f); }, lightboxSelectAttrString: function(c) { - var p = ""; + var f = ""; switch (c) { case "%Y": - p = a.locale.labels.year; + f = a.locale.labels.year; break; case "%m": - p = a.locale.labels.month; + f = a.locale.labels.month; break; case "%d": - p = a.locale.labels.day; + f = a.locale.labels.day; break; case "%H:%i": - p = a.locale.labels.hour + " " + a.locale.labels.minute; + f = a.locale.labels.hour + " " + a.locale.labels.minute; } - return a._waiAria.getAttributeString({ "aria-label": p }); + return a._waiAria.getAttributeString({ "aria-label": f }); }, messageButtonAttrString: function(c) { return "tabindex='0' role='button' aria-label='" + c + "'"; }, messageInfoAttr: function(c) { c.setAttribute("role", "alert"); - }, messageModalAttr: function(c, p) { - c.setAttribute("role", "dialog"), p && c.setAttribute("aria-labelledby", p); + }, messageModalAttr: function(c, f) { + c.setAttribute("role", "dialog"), f && c.setAttribute("aria-labelledby", f); }, quickInfoAttr: function(c) { c.setAttribute("role", "dialog"); }, quickInfoHeaderAttrString: function() { return " role='heading' "; - }, quickInfoHeader: function(c, p) { - c.setAttribute("aria-label", p); + }, quickInfoHeader: function(c, f) { + c.setAttribute("aria-label", f); }, quickInfoButtonAttrString: function(c) { return a._waiAria.getAttributeString({ role: "button", "aria-label": c, tabindex: "0" }); }, tooltipAttr: function(c) { @@ -3353,11 +3370,11 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); }, tooltipHiddenAttr: function(c) { c.setAttribute("aria-hidden", "true"); } }, a._waiAria) - a._waiAria[f] = function(c) { + a._waiAria[u] = function(c) { return function() { return a.config.wai_aria_attributes ? c.apply(this, arguments) : " "; }; - }(a._waiAria[f]); + }(a._waiAria[u]); })(); }(i), i.utils = ee, i.$domHelpers = _e, i.utils.dom = _e, i.uid = ee.uid, i.mixin = ee.mixin, i.defined = ee.defined, i.assert = function(a) { return function(o, l) { @@ -3376,77 +3393,77 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); }; }(i), function(a) { function o(l, h) { - var v = { method: l }; + var m = { method: l }; if (h.length === 0) throw new Error("Arguments list of query is wrong."); if (h.length === 1) - return typeof h[0] == "string" ? (v.url = h[0], v.async = !0) : (v.url = h[0].url, v.async = h[0].async || !0, v.callback = h[0].callback, v.headers = h[0].headers), h[0].data ? typeof h[0].data != "string" ? v.data = Te(h[0].data) : v.data = h[0].data : v.data = "", v; - switch (v.url = h[0], l) { + return typeof h[0] == "string" ? (m.url = h[0], m.async = !0) : (m.url = h[0].url, m.async = h[0].async || !0, m.callback = h[0].callback, m.headers = h[0].headers), h[0].data ? typeof h[0].data != "string" ? m.data = Te(h[0].data) : m.data = h[0].data : m.data = "", m; + switch (m.url = h[0], l) { case "GET": case "DELETE": - v.callback = h[1], v.headers = h[2]; + m.callback = h[1], m.headers = h[2]; break; case "POST": case "PUT": - h[1] ? typeof h[1] != "string" ? v.data = Te(h[1]) : v.data = h[1] : v.data = "", v.callback = h[2], v.headers = h[3]; + h[1] ? typeof h[1] != "string" ? m.data = Te(h[1]) : m.data = h[1] : m.data = "", m.callback = h[2], m.headers = h[3]; } - return v; + return m; } a.Promise = window.Promise, a.ajax = { cache: !0, method: "get", serializeRequestParams: Te, parse: function(l) { return typeof l != "string" ? l : (l = l.replace(/^[\s]+/, ""), typeof DOMParser > "u" || a.$env.isIE ? window.ActiveXObject !== void 0 && ((h = new window.ActiveXObject("Microsoft.XMLDOM")).async = "false", h.loadXML(l)) : h = new DOMParser().parseFromString(l, "text/xml"), h); var h; - }, xmltop: function(l, h, v) { + }, xmltop: function(l, h, m) { if (h.status === void 0 || h.status < 400) { - var u = h.responseXML ? h.responseXML || h : this.parse(h.responseText || h); - if (u && u.documentElement !== null && !u.getElementsByTagName("parsererror").length) - return u.getElementsByTagName(l)[0]; + var v = h.responseXML ? h.responseXML || h : this.parse(h.responseText || h); + if (v && v.documentElement !== null && !v.getElementsByTagName("parsererror").length) + return v.getElementsByTagName(l)[0]; } - return v !== -1 && a.callEvent("onLoadXMLError", ["Incorrect XML", arguments[1], v]), document.createElement("DIV"); + return m !== -1 && a.callEvent("onLoadXMLError", ["Incorrect XML", arguments[1], m]), document.createElement("DIV"); }, xpath: function(l, h) { if (h.nodeName || (h = h.responseXML || h), a.$env.isIE) return h.selectNodes(l) || []; - for (var v, u = [], f = (h.ownerDocument || h).evaluate(l, h, null, XPathResult.ANY_TYPE, null); v = f.iterateNext(); ) - u.push(v); - return u; + for (var m, v = [], u = (h.ownerDocument || h).evaluate(l, h, null, XPathResult.ANY_TYPE, null); m = u.iterateNext(); ) + v.push(m); + return v; }, query: function(l) { return this._call(l.method || "GET", l.url, l.data || "", l.async || !0, l.callback, l.headers); - }, get: function(l, h, v) { - var u = o("GET", arguments); - return this.query(u); - }, getSync: function(l, h) { + }, get: function(l, h, m) { var v = o("GET", arguments); - return v.async = !1, this.query(v); - }, put: function(l, h, v, u) { - var f = o("PUT", arguments); - return this.query(f); - }, del: function(l, h, v) { - var u = o("DELETE", arguments); + return this.query(v); + }, getSync: function(l, h) { + var m = o("GET", arguments); + return m.async = !1, this.query(m); + }, put: function(l, h, m, v) { + var u = o("PUT", arguments); return this.query(u); - }, post: function(l, h, v, u) { - arguments.length == 1 ? h = "" : arguments.length == 2 && typeof h == "function" && (v = h, h = ""); - var f = o("POST", arguments); - return this.query(f); - }, postSync: function(l, h, v) { - h = h === null ? "" : String(h); + }, del: function(l, h, m) { + var v = o("DELETE", arguments); + return this.query(v); + }, post: function(l, h, m, v) { + arguments.length == 1 ? h = "" : arguments.length == 2 && typeof h == "function" && (m = h, h = ""); var u = o("POST", arguments); - return u.async = !1, this.query(u); - }, _call: function(l, h, v, u, f, c) { - return new a.Promise((function(p, m) { + return this.query(u); + }, postSync: function(l, h, m) { + h = h === null ? "" : String(h); + var v = o("POST", arguments); + return v.async = !1, this.query(v); + }, _call: function(l, h, m, v, u, c) { + return new a.Promise((function(f, p) { var g = typeof XMLHttpRequest === void 0 || a.$env.isIE ? new window.ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest(), y = navigator.userAgent.match(/AppleWebKit/) !== null && navigator.userAgent.match(/Qt/) !== null && navigator.userAgent.match(/Safari/) !== null; - if (u && g.addEventListener("readystatechange", function() { + if (v && g.addEventListener("readystatechange", function() { if (g.readyState == 4 || y && g.readyState == 3) { if ((g.status != 200 || g.responseText === "") && !a.callEvent("onAjaxError", [g])) return; setTimeout(function() { - typeof f == "function" && f.apply(window, [{ xmlDoc: g, filePath: h }]), p(g), typeof f == "function" && (f = null, g = null); + typeof u == "function" && u.apply(window, [{ xmlDoc: g, filePath: h }]), f(g), typeof u == "function" && (u = null, g = null); }, 0); } - }), l != "GET" || this.cache || (h += (h.indexOf("?") >= 0 ? "&" : "?") + "dhxr" + (/* @__PURE__ */ new Date()).getTime() + "=1"), g.open(l, h, u), c) + }), l != "GET" || this.cache || (h += (h.indexOf("?") >= 0 ? "&" : "?") + "dhxr" + (/* @__PURE__ */ new Date()).getTime() + "=1"), g.open(l, h, v), c) for (var x in c) g.setRequestHeader(x, c[x]); else - l.toUpperCase() == "POST" || l == "PUT" || l == "DELETE" ? g.setRequestHeader("Content-Type", "application/x-www-form-urlencoded") : l == "GET" && (v = null); - if (g.setRequestHeader("X-Requested-With", "XMLHttpRequest"), g.send(v), !u) + l.toUpperCase() == "POST" || l == "PUT" || l == "DELETE" ? g.setRequestHeader("Content-Type", "application/x-www-form-urlencoded") : l == "GET" && (m = null); + if (g.setRequestHeader("X-Requested-With", "XMLHttpRequest"), g.send(m), !v) return { xmlDoc: g, filePath: h }; }).bind(this)); }, urlSeparator: function(l) { @@ -3459,51 +3476,51 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); return (a.templates.xml_format || a.templates.format_date)(o); } }, a.templates = {}, a.init_templates = function() { var o = a.date.date_to_str, l = a.config; - (function(h, v) { - for (var u in v) - h[u] || (h[u] = v[u]); - })(a.templates, { day_date: o(l.default_date), month_date: o(l.month_date), week_date: function(h, v) { - return l.rtl ? a.templates.day_date(a.date.add(v, -1, "day")) + " – " + a.templates.day_date(h) : a.templates.day_date(h) + " – " + a.templates.day_date(a.date.add(v, -1, "day")); + (function(h, m) { + for (var v in m) + h[v] || (h[v] = m[v]); + })(a.templates, { day_date: o(l.default_date), month_date: o(l.month_date), week_date: function(h, m) { + return l.rtl ? a.templates.day_date(a.date.add(m, -1, "day")) + " – " + a.templates.day_date(h) : a.templates.day_date(h) + " – " + a.templates.day_date(a.date.add(m, -1, "day")); }, day_scale_date: o(l.default_date), time_slot_text: function(h) { return ""; }, time_slot_class: function(h) { return ""; - }, month_scale_date: o(l.week_date), week_scale_date: o(l.day_date), hour_scale: o(l.hour_date), time_picker: o(l.hour_date), event_date: o(l.hour_date), month_day: o(l.month_day), load_format: o(l.load_date), format_date: o(l.date_format, l.server_utc), parse_date: a.date.str_to_date(l.date_format, l.server_utc), api_date: a.date.str_to_date(l.api_date, !1, !1), event_header: function(h, v, u) { - return u._mode === "small" || u._mode === "smallest" ? a.templates.event_date(h) : a.templates.event_date(h) + " - " + a.templates.event_date(v); - }, event_text: function(h, v, u) { - return u.text; - }, event_class: function(h, v, u) { + }, month_scale_date: o(l.week_date), week_scale_date: o(l.day_date), hour_scale: o(l.hour_date), time_picker: o(l.hour_date), event_date: o(l.hour_date), month_day: o(l.month_day), load_format: o(l.load_date), format_date: o(l.date_format, l.server_utc), parse_date: a.date.str_to_date(l.date_format, l.server_utc), api_date: a.date.str_to_date(l.api_date, !1, !1), event_header: function(h, m, v) { + return v._mode === "small" || v._mode === "smallest" ? a.templates.event_date(h) : a.templates.event_date(h) + " - " + a.templates.event_date(m); + }, event_text: function(h, m, v) { + return v.text; + }, event_class: function(h, m, v) { return ""; }, month_date_class: function(h) { return ""; }, week_date_class: function(h) { return ""; - }, event_bar_date: function(h, v, u) { + }, event_bar_date: function(h, m, v) { return a.templates.event_date(h); - }, event_bar_text: function(h, v, u) { - return u.text; - }, month_events_link: function(h, v) { - return "View more(" + v + " events)"; - }, drag_marker_class: function(h, v, u) { + }, event_bar_text: function(h, m, v) { + return v.text; + }, month_events_link: function(h, m) { + return "View more(" + m + " events)"; + }, drag_marker_class: function(h, m, v) { return ""; - }, drag_marker_content: function(h, v, u) { + }, drag_marker_content: function(h, m, v) { return ""; - }, tooltip_date_format: a.date.date_to_str("%Y-%m-%d %H:%i"), tooltip_text: function(h, v, u) { - return "Event: " + u.text + "
Start date: " + a.templates.tooltip_date_format(h) + "
End date: " + a.templates.tooltip_date_format(v); + }, tooltip_date_format: a.date.date_to_str("%Y-%m-%d %H:%i"), tooltip_text: function(h, m, v) { + return "Event: " + v.text + "
Start date: " + a.templates.tooltip_date_format(h) + "
End date: " + a.templates.tooltip_date_format(m); }, calendar_month: o("%F %Y"), calendar_scale_date: o("%D"), calendar_date: o("%d"), calendar_time: o("%d-%m-%Y") }), this.callEvent("onTemplatesReady", []); }; }(i), function(a) { a._events = {}, a.clearAll = function() { this._events = {}, this._loaded = {}, this._edit_id = null, this._select_id = null, this._drag_id = null, this._drag_mode = null, this._drag_pos = null, this._new_event = null, this.clear_view(), this.callEvent("onClearAll", []); - }, a.addEvent = function(o, l, h, v, u) { + }, a.addEvent = function(o, l, h, m, v) { if (!arguments.length) return this.addEventNow(); - var f = o; - arguments.length != 1 && ((f = u || {}).start_date = o, f.end_date = l, f.text = h, f.id = v), f.id = f.id || a.uid(), f.text = f.text || "", typeof f.start_date == "string" && (f.start_date = this.templates.api_date(f.start_date)), typeof f.end_date == "string" && (f.end_date = this.templates.api_date(f.end_date)); + var u = o; + arguments.length != 1 && ((u = v || {}).start_date = o, u.end_date = l, u.text = h, u.id = m), u.id = u.id || a.uid(), u.text = u.text || "", typeof u.start_date == "string" && (u.start_date = this.templates.api_date(u.start_date)), typeof u.end_date == "string" && (u.end_date = this.templates.api_date(u.end_date)); var c = 6e4 * (this.config.event_duration || this.config.time_step); - f.start_date.valueOf() == f.end_date.valueOf() && f.end_date.setTime(f.end_date.valueOf() + c), f.start_date.setMilliseconds(0), f.end_date.setMilliseconds(0), f._timed = this.isOneDayEvent(f); - var p = !this._events[f.id]; - return this._events[f.id] = f, this.event_updated(f), this._loading || this.callEvent(p ? "onEventAdded" : "onEventChanged", [f.id, f]), f.id; + u.start_date.valueOf() == u.end_date.valueOf() && u.end_date.setTime(u.end_date.valueOf() + c), u.start_date.setMilliseconds(0), u.end_date.setMilliseconds(0), u._timed = this.isOneDayEvent(u); + var f = !this._events[u.id]; + return this._events[u.id] = u, this.event_updated(u), this._loading || this.callEvent(f ? "onEventAdded" : "onEventChanged", [u.id, u]), u.id; }, a.deleteEvent = function(o, l) { var h = this._events[o]; (l || this.callEvent("onBeforeEventDelete", [o, h]) && this.callEvent("onConfirmedBeforeEventDelete", [o, h])) && (h && (a.getState().select_id == o && a.unselect(), delete this._events[o], this.event_updated(h), this._drag_id == h.id && (this._drag_id = null, this._drag_mode = null, this._drag_pos = null)), this.callEvent("onEventDeleted", [o, h])); @@ -3517,30 +3534,30 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); }, a.changeEventId = function(o, l) { if (o != l) { var h = this._events[o]; - h && (h.id = l, this._events[l] = h, delete this._events[o]), this.for_rendered(o, function(v) { - v.setAttribute("event_id", l), v.setAttribute(a.config.event_attribute, l); + h && (h.id = l, this._events[l] = h, delete this._events[o]), this.for_rendered(o, function(m) { + m.setAttribute("event_id", l), m.setAttribute(a.config.event_attribute, l); }), this._select_id == o && (this._select_id = l), this._edit_id == o && (this._edit_id = l), this.callEvent("onEventIdChange", [o, l]); } }, function() { - for (var o = ["text", "Text", "start_date", "StartDate", "end_date", "EndDate"], l = function(u) { - return function(f) { - return a.getEvent(f)[u]; + for (var o = ["text", "Text", "start_date", "StartDate", "end_date", "EndDate"], l = function(v) { + return function(u) { + return a.getEvent(u)[v]; }; - }, h = function(u) { - return function(f, c) { - var p = a.getEvent(f); - p[u] = c, p._changed = !0, p._timed = this.isOneDayEvent(p), a.event_updated(p, !0); + }, h = function(v) { + return function(u, c) { + var f = a.getEvent(u); + f[v] = c, f._changed = !0, f._timed = this.isOneDayEvent(f), a.event_updated(f, !0); }; - }, v = 0; v < o.length; v += 2) - a["getEvent" + o[v + 1]] = l(o[v]), a["setEvent" + o[v + 1]] = h(o[v]); + }, m = 0; m < o.length; m += 2) + a["getEvent" + o[m + 1]] = l(o[m]), a["setEvent" + o[m + 1]] = h(o[m]); }(), a.event_updated = function(o, l) { this.is_visible_events(o) ? this.render_view_data() : this.clear_event(o.id); }, a.is_visible_events = function(o) { if (!this._min_date || !this._max_date) return !1; if (o.start_date.valueOf() < this._max_date.valueOf() && this._min_date.valueOf() < o.end_date.valueOf()) { - var l = o.start_date.getHours(), h = o.end_date.getHours() + o.end_date.getMinutes() / 60, v = this.config.last_hour, u = this.config.first_hour; - return !(!this._table_view && (h > v || h <= u) && (l >= v || l < u) && !((o.end_date.valueOf() - o.start_date.valueOf()) / 36e5 > 24 - (this.config.last_hour - this.config.first_hour) || l < v && h > u)); + var l = o.start_date.getHours(), h = o.end_date.getHours() + o.end_date.getMinutes() / 60, m = this.config.last_hour, v = this.config.first_hour; + return !(!this._table_view && (h > m || h <= v) && (l >= m || l < v) && !((o.end_date.valueOf() - o.start_date.valueOf()) / 36e5 > 24 - (this.config.last_hour - this.config.first_hour) || l < m && h > v)); } return !1; }, a.isOneDayEvent = function(o) { @@ -3563,93 +3580,93 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); return void (this._render_wait = !0); this._render_wait = !1, this.clear_view(), o = this.get_visible_events(!(this._table_view || this.config.multi_day)); } - for (var v = 0, u = o.length; v < u; v++) - this._recalculate_timed(o[v]); + for (var m = 0, v = o.length; m < v; m++) + this._recalculate_timed(o[m]); if (this.config.multi_day && !this._table_view) { - var f = [], c = []; - for (v = 0; v < o.length; v++) - this._is_main_area_event(o[v]) ? f.push(o[v]) : c.push(o[v]); + var u = [], c = []; + for (m = 0; m < o.length; m++) + this._is_main_area_event(o[m]) ? u.push(o[m]) : c.push(o[m]); if (!this._els.dhx_multi_day) { - var p = a._commonErrorMessages.unknownView(this._mode); - throw new Error(p); + var f = a._commonErrorMessages.unknownView(this._mode); + throw new Error(f); } - this._rendered_location = this._els.dhx_multi_day[0], this._table_view = !0, this.render_data(c, l), this._table_view = !1, this._rendered_location = this._els.dhx_cal_data[0], this._table_view = !1, this.render_data(f, l); + this._rendered_location = this._els.dhx_multi_day[0], this._table_view = !0, this.render_data(c, l), this._table_view = !1, this._rendered_location = this._els.dhx_cal_data[0], this._table_view = !1, this.render_data(u, l); } else { - var m = document.createDocumentFragment(), g = this._els.dhx_cal_data[0]; - this._rendered_location = m, this.render_data(o, l), g.appendChild(m), this._rendered_location = g; + var p = document.createDocumentFragment(), g = this._els.dhx_cal_data[0]; + this._rendered_location = p, this.render_data(o, l), g.appendChild(p), this._rendered_location = g; } h && this.callEvent("onDataRender", []); }, a._view_month_day = function(o) { var l = a.getActionData(o).date; a.callEvent("onViewMoreClick", [l]) && a.setCurrentView(l, "day"); }, a._render_month_link = function(o) { - for (var l = this._rendered_location, h = this._lame_clone(o), v = o._sday; v < o._eday; v++) { - h._sday = v, h._eday = v + 1; - var u = a.date, f = a._min_date; - f = u.add(f, h._sweek, "week"), f = u.add(f, h._sday, "day"); - var c = a.getEvents(f, u.add(f, 1, "day")).length, p = this._get_event_bar_pos(h), m = p.x2 - p.x, g = document.createElement("div"); + for (var l = this._rendered_location, h = this._lame_clone(o), m = o._sday; m < o._eday; m++) { + h._sday = m, h._eday = m + 1; + var v = a.date, u = a._min_date; + u = v.add(u, h._sweek, "week"), u = v.add(u, h._sday, "day"); + var c = a.getEvents(u, v.add(u, 1, "day")).length, f = this._get_event_bar_pos(h), p = f.x2 - f.x, g = document.createElement("div"); a.event(g, "click", function(y) { a._view_month_day(y); - }), g.className = "dhx_month_link", g.style.top = p.y + "px", g.style.left = p.x + "px", g.style.width = m + "px", g.innerHTML = a.templates.month_events_link(f, c), this._rendered.push(g), l.appendChild(g); + }), g.className = "dhx_month_link", g.style.top = f.y + "px", g.style.left = f.x + "px", g.style.width = p + "px", g.innerHTML = a.templates.month_events_link(u, c), this._rendered.push(g), l.appendChild(g); } }, a._recalculate_timed = function(o) { var l; o && (l = typeof o != "object" ? this._events[o] : o) && (l._timed = a.isOneDayEvent(l)); }, a.attachEvent("onEventChanged", a._recalculate_timed), a.attachEvent("onEventAdded", a._recalculate_timed), a.render_data = function(o, l) { o = this._pre_render_events(o, l); - for (var h = {}, v = 0; v < o.length; v++) + for (var h = {}, m = 0; m < o.length; m++) if (this._table_view) if (a._mode != "month") - this.render_event_bar(o[v]); + this.render_event_bar(o[m]); else { - var u = a.config.max_month_events; - u !== 1 * u || o[v]._sorder < u ? this.render_event_bar(o[v]) : u !== void 0 && o[v]._sorder == u && a._render_month_link(o[v]); + var v = a.config.max_month_events; + v !== 1 * v || o[m]._sorder < v ? this.render_event_bar(o[m]) : v !== void 0 && o[m]._sorder == v && a._render_month_link(o[m]); } else { - var f = o[v], c = a.locate_holder(f._sday); + var u = o[m], c = a.locate_holder(u._sday); if (!c) continue; - h[f._sday] || (h[f._sday] = { real: c, buffer: document.createDocumentFragment(), width: c.clientWidth }); - var p = h[f._sday]; - this.render_event(f, p.buffer, p.width); + h[u._sday] || (h[u._sday] = { real: c, buffer: document.createDocumentFragment(), width: c.clientWidth }); + var f = h[u._sday]; + this.render_event(u, f.buffer, f.width); } - for (var v in h) - (p = h[v]).real && p.buffer && p.real.appendChild(p.buffer); + for (var m in h) + (f = h[m]).real && f.buffer && f.real.appendChild(f.buffer); }, a._get_first_visible_cell = function(o) { for (var l = 0; l < o.length; l++) if ((o[l].className || "").indexOf("dhx_scale_ignore") == -1) return o[l]; return o[0]; }, a._pre_render_events = function(o, l) { - var h = this.xy.bar_height, v = this._colsS.heights, u = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0], f = this._els.dhx_cal_data[0]; + var h = this.xy.bar_height, m = this._colsS.heights, v = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0], u = this._els.dhx_cal_data[0]; if (o = this._table_view ? this._pre_render_events_table(o, l) : this._pre_render_events_line(o, l), this._table_view) if (l) - this._colsS.heights = v; + this._colsS.heights = m; else { - var c = f.querySelectorAll(".dhx_cal_month_row"); + var c = u.querySelectorAll(".dhx_cal_month_row"); if (c.length) { - for (var p = 0; p < c.length; p++) { - u[p]++; - var m = c[p].querySelectorAll(".dhx_cal_month_cell"), g = this._colsS.height - this.xy.month_head_height; - if (u[p] * h > g) { + for (var f = 0; f < c.length; f++) { + v[f]++; + var p = c[f].querySelectorAll(".dhx_cal_month_cell"), g = this._colsS.height - this.xy.month_head_height; + if (v[f] * h > g) { var y = g; - 1 * this.config.max_month_events !== this.config.max_month_events || u[p] <= this.config.max_month_events ? y = u[p] * h : (this.config.max_month_events + 1) * h > g && (y = (this.config.max_month_events + 1) * h), c[p].style.height = y + this.xy.month_head_height + "px"; + 1 * this.config.max_month_events !== this.config.max_month_events || v[f] <= this.config.max_month_events ? y = v[f] * h : (this.config.max_month_events + 1) * h > g && (y = (this.config.max_month_events + 1) * h), c[f].style.height = y + this.xy.month_head_height + "px"; } - u[p] = (u[p - 1] || 0) + a._get_first_visible_cell(m).offsetHeight; + v[f] = (v[f - 1] || 0) + a._get_first_visible_cell(p).offsetHeight; } - u.unshift(0); + v.unshift(0); const M = this.$container.querySelector(".dhx_cal_data"); if (M.offsetHeight < M.scrollHeight && !a._colsS.scroll_fix && a.xy.scroll_width) { var x = a._colsS, b = x[x.col_length], k = x.heights.slice(); b -= a.xy.scroll_width || 0, this._calc_scale_sizes(b, this._min_date, this._max_date), a._colsS.heights = k, this.set_xy(this._els.dhx_cal_header[0], b), a._render_scales(this._els.dhx_cal_header[0]), a._render_month_scale(this._els.dhx_cal_data[0], this._get_timeunit_start(), this._min_date), x.scroll_fix = !0; } - } else if (o.length || this._els.dhx_multi_day[0].style.visibility != "visible" || (u[0] = -1), o.length || u[0] == -1) { - var E = (u[0] + 1) * h + 4, D = E, w = E + "px"; - this.config.multi_day_height_limit && (w = (D = Math.min(E, this.config.multi_day_height_limit)) + "px"); + } else if (o.length || this._els.dhx_multi_day[0].style.visibility != "visible" || (v[0] = -1), o.length || v[0] == -1) { + var w = (v[0] + 1) * h + 4, D = w, E = w + "px"; + this.config.multi_day_height_limit && (E = (D = Math.min(w, this.config.multi_day_height_limit)) + "px"); var S = this._els.dhx_multi_day[0]; - S.style.height = w, S.style.visibility = u[0] == -1 ? "hidden" : "visible", S.style.display = u[0] == -1 ? "none" : ""; + S.style.height = E, S.style.visibility = v[0] == -1 ? "hidden" : "visible", S.style.display = v[0] == -1 ? "none" : ""; var N = this._els.dhx_multi_day[1]; - N.style.height = w, N.style.visibility = u[0] == -1 ? "hidden" : "visible", N.style.display = u[0] == -1 ? "none" : "", N.className = u[0] ? "dhx_multi_day_icon" : "dhx_multi_day_icon_small", this._dy_shift = (u[0] + 1) * h, this.config.multi_day_height_limit && (this._dy_shift = Math.min(this.config.multi_day_height_limit, this._dy_shift)), u[0] = 0, D != E && (S.style.overflowY = "auto", N.style.position = "fixed", N.style.top = "", N.style.left = ""); + N.style.height = E, N.style.visibility = v[0] == -1 ? "hidden" : "visible", N.style.display = v[0] == -1 ? "none" : "", N.className = v[0] ? "dhx_multi_day_icon" : "dhx_multi_day_icon_small", this._dy_shift = (v[0] + 1) * h, this.config.multi_day_height_limit && (this._dy_shift = Math.min(this.config.multi_day_height_limit, this._dy_shift)), v[0] = 0, D != w && (S.style.overflowY = "auto", N.style.position = "fixed", N.style.top = "", N.style.left = ""); } } return o; @@ -3667,62 +3684,62 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); o.sort(function(N, M) { return N.start_date.valueOf() == M.start_date.valueOf() ? N.id > M.id ? 1 : -1 : N.start_date > M.start_date ? 1 : -1; }); - var h = [], v = []; + var h = [], m = []; this._min_mapped_duration = Math.floor(60 * this.xy.min_event_height / this.config.hour_size_px); - for (var u = 0; u < o.length; u++) { - var f = o[u], c = f.start_date, p = f.end_date, m = c.getHours(), g = p.getHours(); - if (f._sday = this._get_event_sday(f), this._ignores[f._sday]) - o.splice(u, 1), u--; + for (var v = 0; v < o.length; v++) { + var u = o[v], c = u.start_date, f = u.end_date, p = c.getHours(), g = f.getHours(); + if (u._sday = this._get_event_sday(u), this._ignores[u._sday]) + o.splice(v, 1), v--; else { - if (h[f._sday] || (h[f._sday] = []), !l) { - f._inner = !1; - for (var y = h[f._sday]; y.length; ) { + if (h[u._sday] || (h[u._sday] = []), !l) { + u._inner = !1; + for (var y = h[u._sday]; y.length; ) { var x = y[y.length - 1]; - if (!(this._get_event_mapped_end_date(x).valueOf() <= f.start_date.valueOf())) + if (!(this._get_event_mapped_end_date(x).valueOf() <= u.start_date.valueOf())) break; y.splice(y.length - 1, 1); } - for (var b = y.length, k = !1, E = 0; E < y.length; E++) - if (x = y[E], this._get_event_mapped_end_date(x).valueOf() <= f.start_date.valueOf()) { - k = !0, f._sorder = x._sorder, b = E, f._inner = !0; + for (var b = y.length, k = !1, w = 0; w < y.length; w++) + if (x = y[w], this._get_event_mapped_end_date(x).valueOf() <= u.start_date.valueOf()) { + k = !0, u._sorder = x._sorder, b = w, u._inner = !0; break; } if (y.length && (y[y.length - 1]._inner = !0), !k) if (y.length) if (y.length <= y[y.length - 1]._sorder) { if (y[y.length - 1]._sorder) - for (E = 0; E < y.length; E++) { - for (var D = !1, w = 0; w < y.length; w++) - if (y[w]._sorder == E) { + for (w = 0; w < y.length; w++) { + for (var D = !1, E = 0; E < y.length; E++) + if (y[E]._sorder == w) { D = !0; break; } if (!D) { - f._sorder = E; + u._sorder = w; break; } } else - f._sorder = 0; - f._inner = !0; + u._sorder = 0; + u._inner = !0; } else { var S = y[0]._sorder; - for (E = 1; E < y.length; E++) - y[E]._sorder > S && (S = y[E]._sorder); - f._sorder = S + 1, f._inner = !1; + for (w = 1; w < y.length; w++) + y[w]._sorder > S && (S = y[w]._sorder); + u._sorder = S + 1, u._inner = !1; } else - f._sorder = 0; - y.splice(b, b == y.length ? 0 : 1, f), y.length > (y.max_count || 0) ? (y.max_count = y.length, f._count = y.length) : f._count = f._count ? f._count : 1; + u._sorder = 0; + y.splice(b, b == y.length ? 0 : 1, u), y.length > (y.max_count || 0) ? (y.max_count = y.length, u._count = y.length) : u._count = u._count ? u._count : 1; } - (m < this.config.first_hour || g >= this.config.last_hour) && (v.push(f), o[u] = f = this._copy_event(f), m < this.config.first_hour && (f.start_date.setHours(this.config.first_hour), f.start_date.setMinutes(0)), g >= this.config.last_hour && (f.end_date.setMinutes(0), f.end_date.setHours(this.config.last_hour)), f.start_date > f.end_date || m == this.config.last_hour) && (o.splice(u, 1), u--); + (p < this.config.first_hour || g >= this.config.last_hour) && (m.push(u), o[v] = u = this._copy_event(u), p < this.config.first_hour && (u.start_date.setHours(this.config.first_hour), u.start_date.setMinutes(0)), g >= this.config.last_hour && (u.end_date.setMinutes(0), u.end_date.setHours(this.config.last_hour)), u.start_date > u.end_date || p == this.config.last_hour) && (o.splice(v, 1), v--); } } if (!l) { - for (u = 0; u < o.length; u++) - o[u]._count = h[o[u]._sday].max_count; - for (u = 0; u < v.length; u++) - v[u]._count = h[v[u]._sday].max_count; + for (v = 0; v < o.length; v++) + o[v]._count = h[o[v]._sday].max_count; + for (v = 0; v < m.length; v++) + m[v]._count = h[m[v]._sday].max_count; } return o; }, a._time_order = function(o) { @@ -3730,42 +3747,42 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); return l.start_date.valueOf() == h.start_date.valueOf() ? l._timed && !h._timed ? 1 : !l._timed && h._timed ? -1 : l.id > h.id ? 1 : -1 : l.start_date > h.start_date ? 1 : -1; }); }, a._is_any_multiday_cell_visible = function(o, l, h) { - var v = this._cols.length, u = !1, f = o, c = !0, p = new Date(l); - for (a.date.day_start(new Date(l)).valueOf() != l.valueOf() && (p = a.date.day_start(p), p = a.date.add(p, 1, "day")); f < p; ) { + var m = this._cols.length, v = !1, u = o, c = !0, f = new Date(l); + for (a.date.day_start(new Date(l)).valueOf() != l.valueOf() && (f = a.date.day_start(f), f = a.date.add(f, 1, "day")); u < f; ) { c = !1; - var m = this.locate_holder_day(f, !1, h) % v; - if (!this._ignores[m]) { - u = !0; + var p = this.locate_holder_day(u, !1, h) % m; + if (!this._ignores[p]) { + v = !0; break; } - f = a.date.add(f, 1, "day"); + u = a.date.add(u, 1, "day"); } - return c || u; + return c || v; }, a._pre_render_events_table = function(o, l) { this._time_order(o); - for (var h, v = [], u = [[], [], [], [], [], [], []], f = this._colsS.heights, c = this._cols.length, p = {}, m = 0; m < o.length; m++) { - var g = o[m], y = g.id; - p[y] || (p[y] = { first_chunk: !0, last_chunk: !0 }); - var x = p[y], b = h || g.start_date, k = g.end_date; + for (var h, m = [], v = [[], [], [], [], [], [], []], u = this._colsS.heights, c = this._cols.length, f = {}, p = 0; p < o.length; p++) { + var g = o[p], y = g.id; + f[y] || (f[y] = { first_chunk: !0, last_chunk: !0 }); + var x = f[y], b = h || g.start_date, k = g.end_date; b < this._min_date && (x.first_chunk = !1, b = this._min_date), k > this._max_date && (x.last_chunk = !1, k = this._max_date); - var E = this.locate_holder_day(b, !1, g); - if (g._sday = E % c, !this._ignores[g._sday] || !g._timed) { + var w = this.locate_holder_day(b, !1, g); + if (g._sday = w % c, !this._ignores[g._sday] || !g._timed) { var D = this.locate_holder_day(k, !0, g) || c; - if (g._eday = D % c || c, g._length = D - E, g._sweek = Math.floor((this._correct_shift(b.valueOf(), 1) - this._min_date.valueOf()) / (864e5 * c)), a._is_any_multiday_cell_visible(b, k, g)) { - var w, S = u[g._sweek]; - for (w = 0; w < S.length && !(S[w]._eday <= g._sday); w++) + if (g._eday = D % c || c, g._length = D - w, g._sweek = Math.floor((this._correct_shift(b.valueOf(), 1) - this._min_date.valueOf()) / (864e5 * c)), a._is_any_multiday_cell_visible(b, k, g)) { + var E, S = v[g._sweek]; + for (E = 0; E < S.length && !(S[E]._eday <= g._sday); E++) ; - if (g._sorder && l || (g._sorder = w), g._sday + g._length <= c) - h = null, v.push(g), S[w] = g, f[g._sweek] = S.length - 1, g._first_chunk = x.first_chunk, g._last_chunk = x.last_chunk; + if (g._sorder && l || (g._sorder = E), g._sday + g._length <= c) + h = null, m.push(g), S[E] = g, u[g._sweek] = S.length - 1, g._first_chunk = x.first_chunk, g._last_chunk = x.last_chunk; else { var N = this._copy_event(g); - N.id = g.id, N._length = c - g._sday, N._eday = c, N._sday = g._sday, N._sweek = g._sweek, N._sorder = g._sorder, N.end_date = this.date.add(b, N._length, "day"), N._first_chunk = x.first_chunk, x.first_chunk && (x.first_chunk = !1), v.push(N), S[w] = N, h = N.end_date, f[g._sweek] = S.length - 1, m--; + N.id = g.id, N._length = c - g._sday, N._eday = c, N._sday = g._sday, N._sweek = g._sweek, N._sorder = g._sorder, N.end_date = this.date.add(b, N._length, "day"), N._first_chunk = x.first_chunk, x.first_chunk && (x.first_chunk = !1), m.push(N), S[E] = N, h = N.end_date, u[g._sweek] = S.length - 1, p--; } } else h = null; } } - return v; + return m; }, a._copy_dummy = function() { var o = new Date(this.start_date), l = new Date(this.end_date); this.start_date = o, this.end_date = l; @@ -3789,31 +3806,31 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); return Math.round((60 * l * 1e3 - 60 * this.config.first_hour * 60 * 1e3) * this.config.hour_size_px / 36e5) % (24 * this.config.hour_size_px); }, a._calc_event_y = function(o, l) { l = l || 0; - var h = 60 * o.start_date.getHours() + o.start_date.getMinutes(), v = 60 * o.end_date.getHours() + o.end_date.getMinutes() || 60 * a.config.last_hour; - return { top: this._y_from_date(o.start_date), height: Math.max(l, (v - h) * this.config.hour_size_px / 60) }; + var h = 60 * o.start_date.getHours() + o.start_date.getMinutes(), m = 60 * o.end_date.getHours() + o.end_date.getMinutes() || 60 * a.config.last_hour; + return { top: this._y_from_date(o.start_date), height: Math.max(l, (m - h) * this.config.hour_size_px / 60) }; }, a.render_event = function(o, l, h) { - var v = a.xy.menu_width, u = this.config.use_select_menu_space ? 0 : v; + var m = a.xy.menu_width, v = this.config.use_select_menu_space ? 0 : m; if (!(o._sday < 0)) { - var f = a.locate_holder(o._sday); - if (f) { - l = l || f; - var c = this._calc_event_y(o, a.xy.min_event_height), p = c.top, m = c.height, g = o._count || 1, y = o._sorder || 0; - h = h || f.clientWidth, this.config.day_column_padding && (h -= this.config.day_column_padding); - var x = Math.floor((h - u) / g), b = y * x + 1; + var u = a.locate_holder(o._sday); + if (u) { + l = l || u; + var c = this._calc_event_y(o, a.xy.min_event_height), f = c.top, p = c.height, g = o._count || 1, y = o._sorder || 0; + h = h || u.clientWidth, this.config.day_column_padding && (h -= this.config.day_column_padding); + var x = Math.floor((h - v) / g), b = y * x + 1; if (o._inner || (x *= g - y), this.config.cascade_event_display) { - var k = this.config.cascade_event_count, E = this.config.cascade_event_margin; - b = y % k * E; - var D = o._inner ? (g - y - 1) % k * E / 2 : 0; - x = Math.floor(h - u - b - D); + var k = this.config.cascade_event_count, w = this.config.cascade_event_margin; + b = y % k * w; + var D = o._inner ? (g - y - 1) % k * w / 2 : 0; + x = Math.floor(h - v - b - D); } - o._mode = m < 30 ? "smallest" : m < 42 ? "small" : null; - var w = this._render_v_bar(o, u + b, p, x, m, o._text_style, a.templates.event_header(o.start_date, o.end_date, o), a.templates.event_text(o.start_date, o.end_date, o)); - if (o._mode === "smallest" ? w.classList.add("dhx_cal_event--xsmall") : o._mode === "small" && w.classList.add("dhx_cal_event--small"), this._waiAria.eventAttr(o, w), this._rendered.push(w), l.appendChild(w), b = b + parseInt(this.config.rtl ? f.style.right : f.style.left, 10) + u, this._edit_id == o.id) { - w.style.zIndex = 1, x = Math.max(x, a.xy.editor_width), (w = document.createElement("div")).setAttribute("event_id", o.id), w.setAttribute(this.config.event_attribute, o.id), this._waiAria.eventAttr(o, w), w.className = "dhx_cal_event dhx_cal_editor", this.config.rtl && b++, this.set_xy(w, x, m, b, p), o.color && w.style.setProperty("--dhx-scheduler-event-background", o.color); + o._mode = p < 30 ? "smallest" : p < 42 ? "small" : null; + var E = this._render_v_bar(o, v + b, f, x, p, o._text_style, a.templates.event_header(o.start_date, o.end_date, o), a.templates.event_text(o.start_date, o.end_date, o)); + if (o._mode === "smallest" ? E.classList.add("dhx_cal_event--xsmall") : o._mode === "small" && E.classList.add("dhx_cal_event--small"), this._waiAria.eventAttr(o, E), this._rendered.push(E), l.appendChild(E), b = b + parseInt(this.config.rtl ? u.style.right : u.style.left, 10) + v, this._edit_id == o.id) { + E.style.zIndex = 1, x = Math.max(x, a.xy.editor_width), (E = document.createElement("div")).setAttribute("event_id", o.id), E.setAttribute(this.config.event_attribute, o.id), this._waiAria.eventAttr(o, E), E.className = "dhx_cal_event dhx_cal_editor", this.config.rtl && b++, this.set_xy(E, x, p, b, f), o.color && E.style.setProperty("--dhx-scheduler-event-background", o.color); var S = a.templates.event_class(o.start_date, o.end_date, o); - S && (w.className += " " + S); + S && (E.className += " " + S); var N = document.createElement("div"); - N.style.cssText += "overflow:hidden;height:100%", w.appendChild(N), this._els.dhx_cal_data[0].appendChild(w), this._rendered.push(w), N.innerHTML = "", this._editor = N.querySelector("textarea"), a.event(this._editor, "keydown", function(j) { + N.style.cssText += "overflow:hidden;height:100%", E.appendChild(N), this._els.dhx_cal_data[0].appendChild(E), this._rendered.push(E), N.innerHTML = "", this._editor = N.querySelector("textarea"), a.event(this._editor, "keydown", function(j) { if (j.shiftKey) return !0; var z = j.keyCode; @@ -3823,35 +3840,35 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); }), a._focus(this._editor, !0), this._els.dhx_cal_data[0].scrollLeft = 0; } if (this.xy.menu_width !== 0 && this._select_id == o.id) { - this.config.cascade_event_display && this._drag_mode && (w.style.zIndex = 1); - for (var M, A = this.config["icons_" + (this._edit_id == o.id ? "edit" : "select")], T = "", H = 0; H < A.length; H++) { - const j = A[H]; - M = this._waiAria.eventMenuAttrString(j), T += `
`; + this.config.cascade_event_display && this._drag_mode && (E.style.zIndex = 1); + for (var M, T = this.config["icons_" + (this._edit_id == o.id ? "edit" : "select")], A = "", H = 0; H < T.length; H++) { + const j = T[H]; + M = this._waiAria.eventMenuAttrString(j), A += `
`; } - var $ = this._render_v_bar(o, b - v - 1, p, v, null, "", "
", T, !0); + var $ = this._render_v_bar(o, b - m - 1, f, m, null, "", "
", A, !0); o.color && $.style.setProperty("--dhx-scheduler-event-background", o.color), o.textColor && $.style.setProperty("--dhx-scheduler-event-color", o.textColor), this._els.dhx_cal_data[0].appendChild($), this._rendered.push($); } this.config.drag_highlight && this._drag_id == o.id && this.highlightEventPosition(o); } } - }, a._render_v_bar = function(o, l, h, v, u, f, c, p, m) { - var g = document.createElement("div"), y = o.id, x = m ? "dhx_cal_event dhx_cal_select_menu" : "dhx_cal_event", b = a.getState(); + }, a._render_v_bar = function(o, l, h, m, v, u, c, f, p) { + var g = document.createElement("div"), y = o.id, x = p ? "dhx_cal_event dhx_cal_select_menu" : "dhx_cal_event", b = a.getState(); b.drag_id == o.id && (x += " dhx_cal_event_drag"), b.select_id == o.id && (x += " dhx_cal_event_selected"); var k = a.templates.event_class(o.start_date, o.end_date, o); k && (x = x + " " + k), this.config.cascade_event_display && (x += " dhx_cal_event_cascade"); - var E = v - 1, D = `
`; g.innerHTML = D; - var w = g.cloneNode(!0).firstChild; - if (!m && a.renderEvent(w, o, v, u, c, p)) - return o.color && w.style.setProperty("--dhx-scheduler-event-background", o.color), o.textColor && w.style.setProperty("--dhx-scheduler-event-color", o.textColor), w; - w = g.firstChild, o.color && w.style.setProperty("--dhx-scheduler-event-background", o.color), o.textColor && w.style.setProperty("--dhx-scheduler-event-color", o.textColor); + var E = g.cloneNode(!0).firstChild; + if (!p && a.renderEvent(E, o, m, v, c, f)) + return o.color && E.style.setProperty("--dhx-scheduler-event-background", o.color), o.textColor && E.style.setProperty("--dhx-scheduler-event-color", o.textColor), E; + E = g.firstChild, o.color && E.style.setProperty("--dhx-scheduler-event-background", o.color), o.textColor && E.style.setProperty("--dhx-scheduler-event-color", o.textColor); var S = '
 
'; - S += '
' + c + "
", S += '
' + p + "
"; + S += '
' + c + "
", S += '
' + f + "
"; var N = "dhx_event_resize dhx_footer"; - return (m || o._drag_resize === !1) && (N = "dhx_resize_denied " + N), S += '
', w.innerHTML = S, w; + return (p || o._drag_resize === !1) && (N = "dhx_resize_denied " + N), S += '
', E.innerHTML = S, E; }, a.renderEvent = function() { return !1; }, a.locate_holder = function(o) { @@ -3863,28 +3880,28 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); if (!this._drag_event) return o; this._drag_event._orig_sorder ? o = this._drag_event._orig_sorder : this._drag_event._orig_sorder = o; - for (var v = l * o; v + l > h; ) - o--, v -= l; + for (var m = l * o; m + l > h; ) + o--, m -= l; return Math.max(o, 0); }, a._get_event_bar_pos = function(o) { - var l = this.config.rtl, h = this._colsS, v = h[o._sday], u = h[o._eday]; - l && (v = h[h.col_length] - h[o._eday] + h[0], u = h[h.col_length] - h[o._sday] + h[0]), u == v && (u = h[o._eday + 1]); - var f = this.xy.bar_height, c = o._sorder; + var l = this.config.rtl, h = this._colsS, m = h[o._sday], v = h[o._eday]; + l && (m = h[h.col_length] - h[o._eday] + h[0], v = h[h.col_length] - h[o._sday] + h[0]), v == m && (v = h[o._eday + 1]); + var u = this.xy.bar_height, c = o._sorder; if (o.id == this._drag_id) { - var p = h.heights[o._sweek + 1] - h.heights[o._sweek] - this.xy.month_head_height; - c = a._get_dnd_order(c, f, p); + var f = h.heights[o._sweek + 1] - h.heights[o._sweek] - this.xy.month_head_height; + c = a._get_dnd_order(c, u, f); } - var m = c * f; - return { x: v, x2: u, y: h.heights[o._sweek] + (h.height ? this.xy.month_scale_height + 2 : 2) + m }; + var p = c * u; + return { x: m, x2: v, y: h.heights[o._sweek] + (h.height ? this.xy.month_scale_height + 2 : 2) + p }; }, a.render_event_bar = function(o) { - var l = this._rendered_location, h = this._get_event_bar_pos(o), v = h.y, u = h.x, f = h.x2, c = ""; - if (f) { - var p = a.config.resize_month_events && this._mode == "month" && (!o._timed || a.config.resize_month_timed), m = document.createElement("div"), g = o.hasOwnProperty("_first_chunk") && o._first_chunk, y = o.hasOwnProperty("_last_chunk") && o._last_chunk, x = p && (o._timed || g), b = p && (o._timed || y), k = !0, E = "dhx_cal_event_clear"; - o._timed && !p || (k = !1, E = "dhx_cal_event_line"), g && (E += " dhx_cal_event_line_start"), y && (E += " dhx_cal_event_line_end"), x && (c += "
"), b && (c += "
"); + var l = this._rendered_location, h = this._get_event_bar_pos(o), m = h.y, v = h.x, u = h.x2, c = ""; + if (u) { + var f = a.config.resize_month_events && this._mode == "month" && (!o._timed || a.config.resize_month_timed), p = document.createElement("div"), g = o.hasOwnProperty("_first_chunk") && o._first_chunk, y = o.hasOwnProperty("_last_chunk") && o._last_chunk, x = f && (o._timed || g), b = f && (o._timed || y), k = !0, w = "dhx_cal_event_clear"; + o._timed && !f || (k = !1, w = "dhx_cal_event_line"), g && (w += " dhx_cal_event_line_start"), y && (w += " dhx_cal_event_line_end"), x && (c += "
"), b && (c += "
"); var D = a.templates.event_class(o.start_date, o.end_date, o); - D && (E += " " + D); - var w = o.color ? "--dhx-scheduler-event-background:" + o.color + ";" : "", S = o.textColor ? "--dhx-scheduler-event-color:" + o.textColor + ";" : "", N = ["position:absolute", "top:" + v + "px", "left:" + u + "px", "width:" + (f - u - (k ? 1 : 0)) + "px", "height:" + (this.xy.bar_height - 2) + "px", S, w, o._text_style || ""].join(";"), M = "
"; - p && (M += c), a.getState().mode == "month" && (o = a.getEvent(o.id)), o._timed && (M += `${a.templates.event_bar_date(o.start_date, o.end_date, o)}`), M += "
", M += a.templates.event_bar_text(o.start_date, o.end_date, o) + "
", M += "
", M += "", m.innerHTML = M, this._rendered.push(m.firstChild), l.appendChild(m.firstChild); + D && (w += " " + D); + var E = o.color ? "--dhx-scheduler-event-background:" + o.color + ";" : "", S = o.textColor ? "--dhx-scheduler-event-color:" + o.textColor + ";" : "", N = ["position:absolute", "top:" + m + "px", "left:" + v + "px", "width:" + (u - v - (k ? 1 : 0)) + "px", "height:" + (this.xy.bar_height - 2) + "px", S, E, o._text_style || ""].join(";"), M = "
"; + f && (M += c), a.getState().mode == "month" && (o = a.getEvent(o.id)), o._timed && (M += `${a.templates.event_bar_date(o.start_date, o.end_date, o)}`), M += "
", M += a.templates.event_bar_text(o.start_date, o.end_date, o) + "
", M += "
", M += "", p.innerHTML = M, this._rendered.push(p.firstChild), l.appendChild(p.firstChild); } }, a._locate_event = function(o) { for (var l = null; o && !l && o.getAttribute; ) @@ -3901,17 +3918,17 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); this._new_event ? (l ? this.callEvent("onEventAdded", [o.id, o]) : o && this.deleteEvent(o.id, !0), this._new_event = null) : l && this.callEvent("onEventChanged", [o.id, o]); }, a.getEvents = function(o, l) { var h = []; - for (var v in this._events) { - var u = this._events[v]; - u && (!o && !l || u.start_date < l && u.end_date > o) && h.push(u); + for (var m in this._events) { + var v = this._events[m]; + v && (!o && !l || v.start_date < l && v.end_date > o) && h.push(v); } return h; }, a.getRenderedEvent = function(o) { if (o) { for (var l = a._rendered, h = 0; h < l.length; h++) { - var v = l[h]; - if (v.getAttribute(a.config.event_attribute) == o) - return v; + var m = l[h]; + if (m.getAttribute(a.config.event_attribute) == o) + return m; } return null; } @@ -3919,31 +3936,31 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); o && typeof o == "object" && (l = o.mode, y = o.section, o = o.section); var h = typeof o == "number" || typeof o == "string" ? a.getEvent(o) : o; if (l = l || a._mode, h && (!this.checkEvent("onBeforeEventDisplay") || this.callEvent("onBeforeEventDisplay", [h, l]))) { - var v = a.config.scroll_hour; + var m = a.config.scroll_hour; a.config.scroll_hour = h.start_date.getHours(); - var u = a.config.preserve_scroll; + var v = a.config.preserve_scroll; a.config.preserve_scroll = !1; - var f = h.color, c = h.textColor; - if (a.config.highlight_displayed_event && (h.color = a.config.displayed_event_color, h.textColor = a.config.displayed_event_text_color), a.setCurrentView(new Date(h.start_date), l), a.config.scroll_hour = v, a.config.preserve_scroll = u, a.matrix && a.matrix[l]) { - var p = a.getView(), m = p.y_property, g = a.getEvent(h.id); + var u = h.color, c = h.textColor; + if (a.config.highlight_displayed_event && (h.color = a.config.displayed_event_color, h.textColor = a.config.displayed_event_text_color), a.setCurrentView(new Date(h.start_date), l), a.config.scroll_hour = m, a.config.preserve_scroll = v, a.matrix && a.matrix[l]) { + var f = a.getView(), p = f.y_property, g = a.getEvent(h.id); if (g) { if (!y) { - var y = g[m]; + var y = g[p]; Array.isArray(y) ? y = y[0] : typeof y == "string" && a.config.section_delimiter && y.indexOf(a.config.section_delimiter) > -1 && (y = y.split(a.config.section_delimiter)[0]); } - var x = p.getSectionTop(y), b = p.posFromDate(g.start_date), k = a.$container.querySelector(".dhx_timeline_data_wrapper"); - if (b -= (k.offsetWidth - p.dx) / 2, x = x - k.offsetHeight / 2 + p.dy / 2, p._smartRenderingEnabled()) - var E = p.attachEvent("onScroll", function() { - D(), p.detachEvent(E); + var x = f.getSectionTop(y), b = f.posFromDate(g.start_date), k = a.$container.querySelector(".dhx_timeline_data_wrapper"); + if (b -= (k.offsetWidth - f.dx) / 2, x = x - k.offsetHeight / 2 + f.dy / 2, f._smartRenderingEnabled()) + var w = f.attachEvent("onScroll", function() { + D(), f.detachEvent(w); }); - p.scrollTo({ left: b, top: x }), p._smartRenderingEnabled() || D(); + f.scrollTo({ left: b, top: x }), f._smartRenderingEnabled() || D(); } } else D(); a.callEvent("onAfterEventDisplay", [h, l]); } function D() { - h.color = f, h.textColor = c; + h.color = u, h.textColor = c; } }; }(i), function(a) { @@ -3958,8 +3975,8 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); }, a.highlightEventPosition = function(o) { var l = document.createElement("div"); l.setAttribute("event_id", o.id), l.setAttribute(this.config.event_attribute, o.id), this._rendered.push(l), this._update_marker_position(l, o); - var h = this.templates.drag_marker_class(o.start_date, o.end_date, o), v = this.templates.drag_marker_content(o.start_date, o.end_date, o); - l.className = "dhx_drag_marker", h && (l.className += " " + h), v && (l.innerHTML = v), this._append_drag_marker(l); + var h = this.templates.drag_marker_class(o.start_date, o.end_date, o), m = this.templates.drag_marker_content(o.start_date, o.end_date, o); + l.className = "dhx_drag_marker", h && (l.className += " " + h), m && (l.innerHTML = m), this._append_drag_marker(l); }; }(i), Vt(i), function(a) { function o() { @@ -3967,18 +3984,18 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); return l || h ? a.$root : document.body; } a._lightbox_controls = {}, a.formSection = function(l) { - for (var h = this.config.lightbox.sections, v = 0; v < h.length && h[v].name != l; v++) + for (var h = this.config.lightbox.sections, m = 0; m < h.length && h[m].name != l; m++) ; - if (v === h.length) + if (m === h.length) return null; - var u = h[v]; + var v = h[m]; a._lightbox || a.getLightbox(); - var f = a._lightbox.querySelector(`#${u.id}`), c = f.nextSibling, p = { section: u, header: f, node: c, getValue: function(g) { - return a.form_blocks[u.type].get_value(c, g || {}, u); + var u = a._lightbox.querySelector(`#${v.id}`), c = u.nextSibling, f = { section: v, header: u, node: c, getValue: function(g) { + return a.form_blocks[v.type].get_value(c, g || {}, v); }, setValue: function(g, y) { - return a.form_blocks[u.type].set_value(c, g, y || {}, u); - } }, m = a._lightbox_controls["get_" + u.type + "_control"]; - return m ? m(p) : p; + return a.form_blocks[v.type].set_value(c, g, y || {}, v); + } }, p = a._lightbox_controls["get_" + v.type + "_control"]; + return p ? p(f) : f; }, a._lightbox_controls.get_template_control = function(l) { return l.control = l.node, l; }, a._lightbox_controls.get_select_control = function(l) { @@ -3989,14 +4006,14 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); return l.control = l.node.getElementsByTagName("select"), l; }, a._lightbox_controls.defaults = { template: { height: 30 }, textarea: { height: 200 }, select: { height: 23 }, time: { height: 20 } }, a.form_blocks = { template: { render: function(l) { return "
"; - }, set_value: function(l, h, v, u) { + }, set_value: function(l, h, m, v) { l.innerHTML = h || ""; - }, get_value: function(l, h, v) { + }, get_value: function(l, h, m) { return l.innerHTML || ""; }, focus: function(l) { } }, textarea: { render: function(l) { return `
`; - }, set_value: function(l, h, v) { + }, set_value: function(l, h, m) { a.form_blocks.textarea._get_input(l).value = h || ""; }, get_value: function(l, h) { return a.form_blocks.textarea._get_input(l).value; @@ -4006,12 +4023,12 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); }, _get_input: function(l) { return l.getElementsByTagName("textarea")[0]; } }, select: { render: function(l) { - for (var h = "
", m = 0; m < l.options.length; m++) + h += ""; return h + "
"; - }, set_value: function(l, h, v, u) { - var f = l.firstChild; - !f._dhx_onchange && u.onchange && (a.event(f, "change", u.onchange), f._dhx_onchange = !0), h === void 0 && (h = (f.options[0] || {}).value), f.value = h || ""; + }, set_value: function(l, h, m, v) { + var u = l.firstChild; + !u._dhx_onchange && v.onchange && (a.event(u, "change", v.onchange), u._dhx_onchange = !0), h === void 0 && (h = (u.options[0] || {}).value), u.value = h || ""; }, get_value: function(l, h) { return l.firstChild.value; }, focus: function(l) { @@ -4019,78 +4036,78 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); a._focus(h, !0); } }, time: { render: function(l) { l.time_format || (l.time_format = ["%H:%i", "%d", "%m", "%Y"]), l._time_format_order = {}; - var h = l.time_format, v = a.config, u = a.date.date_part(a._currentDate()), f = 1440, c = 0; - a.config.limit_time_select && (f = 60 * v.last_hour + 1, c = 60 * v.first_hour, u.setHours(v.first_hour)); - for (var p = "", m = 0; m < h.length; m++) { - var g = h[m]; - m > 0 && (p += " "); + var h = l.time_format, m = a.config, v = a.date.date_part(a._currentDate()), u = 1440, c = 0; + a.config.limit_time_select && (u = 60 * m.last_hour + 1, c = 60 * m.first_hour, v.setHours(m.first_hour)); + for (var f = "", p = 0; p < h.length; p++) { + var g = h[p]; + p > 0 && (f += " "); var y = "", x = ""; switch (g) { case "%Y": - var b, k, E; - y = "dhx_lightbox_year_select", l._time_format_order[3] = m, l.year_range && (isNaN(l.year_range) ? l.year_range.push && (k = l.year_range[0], E = l.year_range[1]) : b = l.year_range), b = b || 10; + var b, k, w; + y = "dhx_lightbox_year_select", l._time_format_order[3] = p, l.year_range && (isNaN(l.year_range) ? l.year_range.push && (k = l.year_range[0], w = l.year_range[1]) : b = l.year_range), b = b || 10; var D = D || Math.floor(b / 2); - k = k || u.getFullYear() - D, E = E || k + b; - for (var w = k; w < E; w++) - x += ""; + k = k || v.getFullYear() - D, w = w || k + b; + for (var E = k; E < w; E++) + x += ""; break; case "%m": - for (y = "dhx_lightbox_month_select", l._time_format_order[2] = m, w = 0; w < 12; w++) - x += ""; + for (y = "dhx_lightbox_month_select", l._time_format_order[2] = p, E = 0; E < 12; E++) + x += ""; break; case "%d": - for (y = "dhx_lightbox_day_select", l._time_format_order[1] = m, w = 1; w < 32; w++) - x += ""; + for (y = "dhx_lightbox_day_select", l._time_format_order[1] = p, E = 1; E < 32; E++) + x += ""; break; case "%H:%i": - y = "dhx_lightbox_time_select", l._time_format_order[0] = m, w = c; - var S = u.getDate(); - for (l._time_values = []; w < f; ) - x += "", l._time_values.push(w), u.setTime(u.valueOf() + 60 * this.config.time_step * 1e3), w = 24 * (u.getDate() != S ? 1 : 0) * 60 + 60 * u.getHours() + u.getMinutes(); + y = "dhx_lightbox_time_select", l._time_format_order[0] = p, E = c; + var S = v.getDate(); + for (l._time_values = []; E < u; ) + x += "", l._time_values.push(E), v.setTime(v.valueOf() + 60 * this.config.time_step * 1e3), E = 24 * (v.getDate() != S ? 1 : 0) * 60 + 60 * v.getHours() + v.getMinutes(); } if (x) { var N = a._waiAria.lightboxSelectAttrString(g); - p += " "; + f += " "; } } - return "
" + p + "  –  " + p + "
"; - }, set_value: function(l, h, v, u) { - var f, c, p = a.config, m = l.getElementsByTagName("select"), g = u._time_format_order; - if (p.full_day) { + return "
" + f + "  –  " + f + "
"; + }, set_value: function(l, h, m, v) { + var u, c, f = a.config, p = l.getElementsByTagName("select"), g = v._time_format_order; + if (f.full_day) { if (!l._full_day) { var y = ""; a.config.wide_form || (y = l.previousSibling.innerHTML + y), l.previousSibling.innerHTML = y, l._full_day = !0; } var x = l.previousSibling.getElementsByTagName("input")[0]; - x.checked = a.date.time_part(v.start_date) === 0 && a.date.time_part(v.end_date) === 0, m[g[0]].disabled = x.checked, m[g[0] + m.length / 2].disabled = x.checked, x.$_eventAttached || (x.$_eventAttached = !0, a.event(x, "click", function() { + x.checked = a.date.time_part(m.start_date) === 0 && a.date.time_part(m.end_date) === 0, p[g[0]].disabled = x.checked, p[g[0] + p.length / 2].disabled = x.checked, x.$_eventAttached || (x.$_eventAttached = !0, a.event(x, "click", function() { if (x.checked) { var D = {}; - a.form_blocks.time.get_value(l, D, u), f = a.date.date_part(D.start_date), (+(c = a.date.date_part(D.end_date)) == +f || +c >= +f && (v.end_date.getHours() !== 0 || v.end_date.getMinutes() !== 0)) && (c = a.date.add(c, 1, "day")); + a.form_blocks.time.get_value(l, D, v), u = a.date.date_part(D.start_date), (+(c = a.date.date_part(D.end_date)) == +u || +c >= +u && (m.end_date.getHours() !== 0 || m.end_date.getMinutes() !== 0)) && (c = a.date.add(c, 1, "day")); } else - f = null, c = null; - m[g[0]].disabled = x.checked, m[g[0] + m.length / 2].disabled = x.checked, E(m, 0, f || v.start_date), E(m, 4, c || v.end_date); + u = null, c = null; + p[g[0]].disabled = x.checked, p[g[0] + p.length / 2].disabled = x.checked, w(p, 0, u || m.start_date), w(p, 4, c || m.end_date); })); } - if (p.auto_end_date && p.event_duration) + if (f.auto_end_date && f.event_duration) for (var b = function() { - p.auto_end_date && p.event_duration && (f = new Date(m[g[3]].value, m[g[2]].value, m[g[1]].value, 0, m[g[0]].value), c = new Date(f.getTime() + 60 * a.config.event_duration * 1e3), E(m, 4, c)); + f.auto_end_date && f.event_duration && (u = new Date(p[g[3]].value, p[g[2]].value, p[g[1]].value, 0, p[g[0]].value), c = new Date(u.getTime() + 60 * a.config.event_duration * 1e3), w(p, 4, c)); }, k = 0; k < 4; k++) - m[k].$_eventAttached || (m[k].$_eventAttached = !0, a.event(m[k], "change", b)); - function E(D, w, S) { - for (var N = u._time_values, M = 60 * S.getHours() + S.getMinutes(), A = M, T = !1, H = 0; H < N.length; H++) { + p[k].$_eventAttached || (p[k].$_eventAttached = !0, a.event(p[k], "change", b)); + function w(D, E, S) { + for (var N = v._time_values, M = 60 * S.getHours() + S.getMinutes(), T = M, A = !1, H = 0; H < N.length; H++) { var $ = N[H]; if ($ === M) { - T = !0; + A = !0; break; } - $ < M && (A = $); + $ < M && (T = $); } - D[w + g[0]].value = T ? M : A, T || A || (D[w + g[0]].selectedIndex = -1), D[w + g[1]].value = S.getDate(), D[w + g[2]].value = S.getMonth(), D[w + g[3]].value = S.getFullYear(); + D[E + g[0]].value = A ? M : T, A || T || (D[E + g[0]].selectedIndex = -1), D[E + g[1]].value = S.getDate(), D[E + g[2]].value = S.getMonth(), D[E + g[3]].value = S.getFullYear(); } - E(m, 0, v.start_date), E(m, 4, v.end_date); - }, get_value: function(l, h, v) { - var u = l.getElementsByTagName("select"), f = v._time_format_order; - if (h.start_date = new Date(u[f[3]].value, u[f[2]].value, u[f[1]].value, 0, u[f[0]].value), h.end_date = new Date(u[f[3] + 4].value, u[f[2] + 4].value, u[f[1] + 4].value, 0, u[f[0] + 4].value), !u[f[3]].value || !u[f[3] + 4].value) { + w(p, 0, m.start_date), w(p, 4, m.end_date); + }, get_value: function(l, h, m) { + var v = l.getElementsByTagName("select"), u = m._time_format_order; + if (h.start_date = new Date(v[u[3]].value, v[u[2]].value, v[u[1]].value, 0, v[u[0]].value), h.end_date = new Date(v[u[3] + 4].value, v[u[2] + 4].value, v[u[1] + 4].value, 0, v[u[0] + 4].value), !v[u[3]].value || !v[u[3] + 4].value) { var c = a.getEvent(a._lightbox_id); c && (h.start_date = c.start_date, h.end_date = c.end_date); } @@ -4110,34 +4127,34 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); } else this._new_event && (this._new_event = null); }, a._fill_lightbox = function(l, h) { - var v = this.getEvent(l), u = h.getElementsByTagName("span"), f = []; + var m = this.getEvent(l), v = h.getElementsByTagName("span"), u = []; if (a.templates.lightbox_header) { - f.push(""); - var c = a.templates.lightbox_header(v.start_date, v.end_date, v); - f.push(c), u[1].innerHTML = "", u[2].innerHTML = c; + u.push(""); + var c = a.templates.lightbox_header(m.start_date, m.end_date, m); + u.push(c), v[1].innerHTML = "", v[2].innerHTML = c; } else { - var p = this.templates.event_header(v.start_date, v.end_date, v), m = (this.templates.event_bar_text(v.start_date, v.end_date, v) || "").substr(0, 70); - f.push(p), f.push(m), u[1].innerHTML = p, u[2].innerHTML = m; + var f = this.templates.event_header(m.start_date, m.end_date, m), p = (this.templates.event_bar_text(m.start_date, m.end_date, m) || "").substr(0, 70); + u.push(f), u.push(p), v[1].innerHTML = f, v[2].innerHTML = p; } - this._waiAria.lightboxHeader(h, f.join(" ")); + this._waiAria.lightboxHeader(h, u.join(" ")); for (var g = this.config.lightbox.sections, y = 0; y < g.length; y++) { - var x = g[y], b = a._get_lightbox_section_node(x), k = this.form_blocks[x.type], E = v[x.map_to] !== void 0 ? v[x.map_to] : x.default_value; - k.set_value.call(this, b, E, v, x), g[y].focus && k.focus.call(this, b); + var x = g[y], b = a._get_lightbox_section_node(x), k = this.form_blocks[x.type], w = m[x.map_to] !== void 0 ? m[x.map_to] : x.default_value; + k.set_value.call(this, b, w, m, x), g[y].focus && k.focus.call(this, b); } a._lightbox_id = l; }, a._get_lightbox_section_node = function(l) { return a._lightbox.querySelector(`#${l.id}`).nextSibling; }, a._lightbox_out = function(l) { - for (var h = this.config.lightbox.sections, v = 0; v < h.length; v++) { - var u = a._lightbox.querySelector(`#${h[v].id}`); - u = u && u.nextSibling; - var f = this.form_blocks[h[v].type].get_value.call(this, u, l, h[v]); - h[v].map_to != "auto" && (l[h[v].map_to] = f); + for (var h = this.config.lightbox.sections, m = 0; m < h.length; m++) { + var v = a._lightbox.querySelector(`#${h[m].id}`); + v = v && v.nextSibling; + var u = this.form_blocks[h[m].type].get_value.call(this, v, l, h[m]); + h[m].map_to != "auto" && (l[h[m].map_to] = u); } return l; }, a._empty_lightbox = function(l) { - var h = a._lightbox_id, v = this.getEvent(h); - this._lame_copy(v, l), this.setEvent(v.id, v), this._edit_stop_event(v, !0), this.render_view_data(); + var h = a._lightbox_id, m = this.getEvent(h); + this._lame_copy(m, l), this.setEvent(m.id, m), this._edit_stop_event(m, !0), this.render_view_data(); }, a.hide_lightbox = function(l) { a.endLightbox(!1, this.getLightbox()); }, a.hideCover = function(l) { @@ -4153,8 +4170,8 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); this._lightbox_id = l, this._custom_lightbox = !0, this._temp_lightbox = this._lightbox, this._lightbox = h, this.showCover(h); }, a.endLightbox = function(l, h) { h = h || a.getLightbox(); - var v = a.getEvent(this._lightbox_id); - v && this._edit_stop_event(v, l), l && a.render_view_data(), this.hideCover(h), this._custom_lightbox && (this._lightbox = this._temp_lightbox, this._custom_lightbox = !1), this._temp_lightbox = this._lightbox_id = null, this._waiAria.lightboxHiddenAttr(h), this.resetLightbox(), this.callEvent("onAfterLightbox", []); + var m = a.getEvent(this._lightbox_id); + m && this._edit_stop_event(m, l), l && a.render_view_data(), this.hideCover(h), this._custom_lightbox && (this._lightbox = this._temp_lightbox, this._custom_lightbox = !1), this._temp_lightbox = this._lightbox_id = null, this._waiAria.lightboxHiddenAttr(h), this.resetLightbox(), this.callEvent("onAfterLightbox", []); }, a.resetLightbox = function() { a._lightbox && !a._custom_lightbox && a._lightbox.parentNode.removeChild(a._lightbox), a._lightbox = null; }, a.cancel_lightbox = function() { @@ -4165,17 +4182,17 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); const l = this.getLightbox(); l.$_eventAttached = !0, a.event(l, "click", function(h) { h.target.closest(".dhx_cal_ltitle_close_btn") && a.cancel_lightbox(); - const v = a.$domHelpers.closest(h.target, ".dhx_btn_set"); - if (!v) { + const m = a.$domHelpers.closest(h.target, ".dhx_btn_set"); + if (!m) { const c = a.$domHelpers.closest(h.target, ".dhx_custom_button[data-section-index]"); if (c) { - const p = Number(c.getAttribute("data-section-index")); - a.form_blocks[a.config.lightbox.sections[p].type].button_click(a.$domHelpers.closest(c, ".dhx_cal_lsection"), c, h); + const f = Number(c.getAttribute("data-section-index")); + a.form_blocks[a.config.lightbox.sections[f].type].button_click(a.$domHelpers.closest(c, ".dhx_cal_lsection"), c, h); } return; } - const u = v ? v.getAttribute("data-action") : null; - switch (u) { + const v = m ? m.getAttribute("data-action") : null; + switch (v) { case "dhx_save_btn": case "save": if (a.config.readonly_active) @@ -4186,8 +4203,8 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); case "delete": if (a.config.readonly_active) return; - var f = a.locale.labels.confirm_deleting; - a._dhtmlx_confirm({ message: f, title: a.locale.labels.title_confirm_deleting, callback: function() { + var u = a.locale.labels.confirm_deleting; + a._dhtmlx_confirm({ message: u, title: a.locale.labels.title_confirm_deleting, callback: function() { a.deleteEvent(a._lightbox_id), a._new_event = null, a.hide_lightbox(); }, config: { ok: a.locale.labels.icon_delete } }); break; @@ -4196,21 +4213,21 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); a.cancel_lightbox(); break; default: - a.callEvent("onLightboxButton", [u, v, h]); + a.callEvent("onLightboxButton", [v, m, h]); } }), a.event(l, "keydown", function(h) { - var v = h || window.event, u = h.target || h.srcElement, f = u.querySelector("[dhx_button]"); - switch (f || (f = u.parentNode.querySelector(".dhx_custom_button, .dhx_readonly")), (h || v).keyCode) { + var m = h || window.event, v = h.target || h.srcElement, u = v.querySelector("[dhx_button]"); + switch (u || (u = v.parentNode.querySelector(".dhx_custom_button, .dhx_readonly")), (h || m).keyCode) { case 32: - if ((h || v).shiftKey) + if ((h || m).shiftKey) return; - f && f.click && f.click(); + u && u.click && u.click(); break; case a.keys.edit_save: - if ((h || v).shiftKey) + if ((h || m).shiftKey) return; - if (f && f.click) - f.click(); + if (u && u.click) + u.click(); else { if (a.config.readonly_active) return; @@ -4228,8 +4245,8 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); }, a._move_while_dnd = function(l) { if (a._dnd_start_lb) { document.dhx_unselectable || (o().classList.add("dhx_unselectable"), document.dhx_unselectable = !0); - var h = a.getLightbox(), v = [l.pageX, l.pageY]; - h.style.top = a._lb_start[1] + v[1] - a._dnd_start_lb[1] + "px", h.style.left = a._lb_start[0] + v[0] - a._dnd_start_lb[0] + "px"; + var h = a.getLightbox(), m = [l.pageX, l.pageY]; + h.style.top = a._lb_start[1] + m[1] - a._dnd_start_lb[1] + "px", h.style.left = a._lb_start[0] + m[0] - a._dnd_start_lb[0] + "px"; } }, a._ready_to_dnd = function(l) { var h = a.getLightbox(); @@ -4240,31 +4257,31 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); if (!this._lightbox) { var l = document.createElement("div"); l.className = "dhx_cal_light", a.config.wide_form && (l.className += " dhx_cal_light_wide"), a.form_blocks.recurring && (l.className += " dhx_cal_light_rec"), a.config.rtl && (l.className += " dhx_cal_light_rtl"), a.config.responsive_lightbox && (l.className += " dhx_cal_light_responsive"), l.style.visibility = "hidden"; - var h = this._lightbox_template, v = this.config.buttons_left; + var h = this._lightbox_template, m = this.config.buttons_left; h += "
"; - for (var u = 0; u < v.length; u++) - h += "
" + a.locale.labels[v[u]] + "
"; - v = this.config.buttons_right; - var f = a.config.rtl; - for (u = 0; u < v.length; u++) - h += "
", h += "
" + a.locale.labels[v[u]] + "
"; + for (var v = 0; v < m.length; v++) + h += "
" + a.locale.labels[m[v]] + "
"; + m = this.config.buttons_right; + var u = a.config.rtl; + for (v = 0; v < m.length; v++) + h += "
", h += "
" + a.locale.labels[m[v]] + "
"; h += "
", h += "", l.innerHTML = h, a.config.drag_lightbox && (a.event(l.firstChild, "mousedown", a._ready_to_dnd), a.event(l.firstChild, "selectstart", function(b) { return b.preventDefault(), !1; }), l.firstChild.style.cursor = "move", a._init_dnd_events()), this._waiAria.lightboxAttr(l), this.show_cover(), this._cover.insertBefore(l, this._cover.firstChild), this._lightbox = l; var c = this.config.lightbox.sections; - for (h = "", u = 0; u < c.length; u++) { - var p = this.form_blocks[c[u].type]; - if (p) { - c[u].id = "area_" + this.uid(); - var m = ""; - c[u].button && (m = "
" + this.locale.labels["button_" + c[u].button] + "
"), this.config.wide_form && (h += "
"); - var g = this.locale.labels["section_" + c[u].name]; - typeof g != "string" && (g = c[u].name), h += "
" + m + "
" + p.render.call(this, c[u]), h += "
"; + for (h = "", v = 0; v < c.length; v++) { + var f = this.form_blocks[c[v].type]; + if (f) { + c[v].id = "area_" + this.uid(); + var p = ""; + c[v].button && (p = "
" + this.locale.labels["button_" + c[v].button] + "
"), this.config.wide_form && (h += "
"); + var g = this.locale.labels["section_" + c[v].name]; + typeof g != "string" && (g = c[v].name), h += "
" + p + "
" + f.render.call(this, c[v]), h += "
"; } } var y = l.getElementsByTagName("div"); - for (u = 0; u < y.length; u++) { - var x = y[u]; + for (v = 0; v < y.length; v++) { + var x = y[v]; if (a._getClassName(x) == "dhx_cal_larea") { x.innerHTML = h; break; @@ -4275,21 +4292,21 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); return this._lightbox; }, a._bindLightboxLabels = function(l) { for (var h = 0; h < l.length; h++) { - var v = l[h]; - if (v.id && a._lightbox.querySelector(`#${v.id}`)) { - for (var u = a._lightbox.querySelector(`#${v.id}`).querySelector("label"), f = a._get_lightbox_section_node(v); f && !f.querySelector; ) - f = f.nextSibling; + var m = l[h]; + if (m.id && a._lightbox.querySelector(`#${m.id}`)) { + for (var v = a._lightbox.querySelector(`#${m.id}`).querySelector("label"), u = a._get_lightbox_section_node(m); u && !u.querySelector; ) + u = u.nextSibling; var c = !0; - if (f) { - var p = f.querySelector("input, select, textarea"); - p && (v.inputId = p.id || "input_" + a.uid(), p.id || (p.id = v.inputId), u.setAttribute("for", v.inputId), c = !1); + if (u) { + var f = u.querySelector("input, select, textarea"); + f && (m.inputId = f.id || "input_" + a.uid(), f.id || (f.id = m.inputId), v.setAttribute("for", m.inputId), c = !1); } - c && a.form_blocks[v.type].focus && a.event(u, "click", function(m) { + c && a.form_blocks[m.type].focus && a.event(v, "click", function(p) { return function() { - var g = a.form_blocks[m.type], y = a._get_lightbox_section_node(m); + var g = a.form_blocks[p.type], y = a._get_lightbox_section_node(p); g && g.focus && g.focus.call(a, y); }; - }(v)); + }(m)); } } }, a.attachEvent("onEventIdChange", function(l, h) { @@ -4321,8 +4338,8 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); var l = "scheduler"; d && (l = "scheduler" + (d + 1), window[l] = Scheduler.getSchedulerInstance()); var h = window[l]; - for (var v in this.setAttribute("dhxscheduler", l), a) - v != "data" && (h.config[v] = a[v]); + for (var m in this.setAttribute("dhxscheduler", l), a) + m != "data" && (h.config[m] = a[m]); this.getElementsByTagName("div").length || (this.innerHTML = '
', this.className += " dhx_cal_container"), h.init(this, h.config.date, h.config.mode), a.data && h.parse(a.data), o.push(h), d++; } }), o.length === 1 ? o[0] : o; @@ -4332,43 +4349,43 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); r.error("Method " + a + " does not exist on jQuery.dhx_scheduler"); }), function(a) { (function() { - var o = a.setCurrentView, l = a.updateView, h = null, v = null, u = function(p, m) { + var o = a.setCurrentView, l = a.updateView, h = null, m = null, v = function(f, p) { var g = this; - oe.clearTimeout(v), oe.clearTimeout(h); + oe.clearTimeout(m), oe.clearTimeout(h); var y = g._date, x = g._mode; - c(this, p, m), v = setTimeout(function() { - a.$destroyed || (g.callEvent("onBeforeViewChange", [x, y, m || g._mode, p || g._date]) ? (l.call(g, p, m), g.callEvent("onViewChange", [g._mode, g._date]), oe.clearTimeout(h), v = 0) : c(g, y, x)); + c(this, f, p), m = setTimeout(function() { + a.$destroyed || (g.callEvent("onBeforeViewChange", [x, y, p || g._mode, f || g._date]) ? (l.call(g, f, p), g.callEvent("onViewChange", [g._mode, g._date]), oe.clearTimeout(h), m = 0) : c(g, y, x)); }, a.config.delay_render); - }, f = function(p, m) { + }, u = function(f, p) { var g = this, y = arguments; - c(this, p, m), oe.clearTimeout(h), h = setTimeout(function() { - a.$destroyed || v || l.apply(g, y); + c(this, f, p), oe.clearTimeout(h), h = setTimeout(function() { + a.$destroyed || m || l.apply(g, y); }, a.config.delay_render); }; - function c(p, m, g) { - m && (p._date = m), g && (p._mode = g); + function c(f, p, g) { + p && (f._date = p), g && (f._mode = g); } a.attachEvent("onSchedulerReady", function() { - a.config.delay_render ? (a.setCurrentView = u, a.updateView = f) : (a.setCurrentView = o, a.updateView = l); + a.config.delay_render ? (a.setCurrentView = v, a.updateView = u) : (a.setCurrentView = o, a.updateView = l); }); })(); }(i), function(a) { a.createDataProcessor = function(o) { var l, h; o instanceof Function ? l = o : o.hasOwnProperty("router") ? l = o.router : o.hasOwnProperty("event") && (l = o), h = l ? "CUSTOM" : o.mode || "REST-JSON"; - var v = new He(o.url); - return v.init(a), v.setTransactionMode({ mode: h, router: l }, o.batchUpdate), v; + var m = new He(o.url); + return m.init(a), m.setTransactionMode({ mode: h, router: l }, o.batchUpdate), m; }, a.DataProcessor = He; }(i), function(a) { a.attachEvent("onSchedulerReady", function() { typeof dhtmlxError < "u" && window.dhtmlxError.catchError("LoadXML", function(o, l, h) { - var v = h[0].responseText; + var m = h[0].responseText; switch (a.config.ajax_error) { case "alert": - oe.alert(v); + oe.alert(m); break; case "console": - oe.console.log(v); + oe.console.log(m); } }); }); @@ -4389,20 +4406,20 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`); }, getLocale: s.getLocale }, i.i18n.setLocale("en"), At(i), i.ext = {}; const _ = {}; return i.plugins = function(a) { - (function(l, h, v) { - const u = []; - for (const f in l) - if (l[f]) { - const c = f.toLowerCase(); - h[c] && h[c].forEach(function(p) { - const m = p.toLowerCase(); - l[m] || u.push(m); - }), u.push(c); + (function(l, h, m) { + const v = []; + for (const u in l) + if (l[u]) { + const c = u.toLowerCase(); + h[c] && h[c].forEach(function(f) { + const p = f.toLowerCase(); + l[p] || v.push(p); + }), v.push(c); } - return u.sort(function(f, c) { - const p = v[f] || 0, m = v[c] || 0; - return p > m ? 1 : p < m ? -1 : 0; - }), u; + return v.sort(function(u, c) { + const f = m[u] || 0, p = m[c] || 0; + return f > p ? 1 : f < p ? -1 : 0; + }), v; })(a, { treetimeline: ["timeline"], daytimeline: ["timeline"], outerdrag: ["legacy"] }, { legacy: 1, limit: 1, timeline: 2, daytimeline: 3, treetimeline: 3, outerdrag: 6 }).forEach(function(l) { if (!_[l]) { const h = e.getExtension(l); @@ -4513,8 +4530,8 @@ function Ta(e) { } }), e._make_pasted_event = function(s) { var _ = e.$keyboardNavigation._pasteDate, a = e.$keyboardNavigation._pasteSection, o = s.end_date - s.start_date, l = n(s); - if (function(v) { - delete v.rec_type, delete v.rec_pattern, delete v.event_pid, delete v.event_length; + if (function(m) { + delete m.rec_type, delete m.rec_pattern, delete m.event_pid, delete m.event_length; }(l), l.start_date = new Date(_), l.end_date = new Date(l.start_date.valueOf() + o), a) { var h = e._get_section_property(); e.config.multisection && s[h] && e.isMultisectionEvent && e.isMultisectionEvent(s) ? l[h] = s[h] : l[h] = a; @@ -4587,11 +4604,11 @@ function Aa(e) { else if (o && o.layout === "timeline") l = e.$keyboardNavigation.isChildOf(a.target || a.srcElement, e.$container.querySelector(".dhx_timeline_data_col")); else { - const u = e.$container.querySelectorAll(".dhx_scale_holder"); - l = Array.from(u).some((f) => f === a.target.parentNode); + const v = e.$container.querySelectorAll(".dhx_scale_holder"); + l = Array.from(v).some((u) => u === a.target.parentNode); } - var h, v = e.getActionData(a); - e._locate_event(a.target || a.srcElement) ? h = new e.$keyboardNavigation.Event(e._locate_event(a.target || a.srcElement)) : l && (h = new e.$keyboardNavigation.TimeSlot(), v.date && l && (h = h.nextSlot(new e.$keyboardNavigation.TimeSlot(v.date, null, v.section)))), h && (t.isEnabled() ? v.date && l && t.delay(function() { + var h, m = e.getActionData(a); + e._locate_event(a.target || a.srcElement) ? h = new e.$keyboardNavigation.Event(e._locate_event(a.target || a.srcElement)) : l && (h = new e.$keyboardNavigation.TimeSlot(), m.date && l && (h = h.nextSlot(new e.$keyboardNavigation.TimeSlot(m.date, null, m.section)))), h && (t.isEnabled() ? m.date && l && t.delay(function() { t.setActiveNode(h); }) : t.activeNode = h); } @@ -4606,14 +4623,14 @@ function Aa(e) { var l = new e.$keyboardNavigation.Event(a); e.getState().lightbox_id || function(h) { if (e.config.key_nav && t.isEnabled()) { - var v = h, u = new e.$keyboardNavigation.Event(v.eventId); - if (!u.isValid()) { - var f = u.start || v.start, c = u.end || v.end, p = u.section || v.section; - (u = new e.$keyboardNavigation.TimeSlot(f, c, p)).isValid() || (u = new e.$keyboardNavigation.TimeSlot()); + var m = h, v = new e.$keyboardNavigation.Event(m.eventId); + if (!v.isValid()) { + var u = v.start || m.start, c = v.end || m.end, f = v.section || m.section; + (v = new e.$keyboardNavigation.TimeSlot(u, c, f)).isValid() || (v = new e.$keyboardNavigation.TimeSlot()); } - t.setActiveNode(u); - var m = t.getActiveNode(); - m && m.getNode && document.activeElement != m.getNode() && t.focusNode(t.getActiveNode()); + t.setActiveNode(v); + var p = t.getActiveNode(); + p && p.getNode && document.activeElement != p.getNode() && t.focusNode(t.getActiveNode()); } }(l); } @@ -5208,19 +5225,19 @@ function wt(e, i) { for (; r.accept("comma"); ) { if (r.isDone()) throw new Error("Unexpected end"); - var v = _(); - if (!v) + var m = _(); + if (!m) throw new Error("Unexpected symbol " + r.symbol + ", expected weekday"); - t.byweekday.push(C[v]), r.nextSymbol(); + t.byweekday.push(C[m]), r.nextSymbol(); } n(), function() { r.accept("on"), r.accept("the"); - var f = a(); - if (f) - for (t.bymonthday = [f], r.nextSymbol(); r.accept("comma"); ) { - if (!(f = a())) + var u = a(); + if (u) + for (t.bymonthday = [u], r.nextSymbol(); r.accept("comma"); ) { + if (!(u = a())) throw new Error("Unexpected symbol " + r.symbol + "; expected monthday"); - t.bymonthday.push(f), r.nextSymbol(); + t.bymonthday.push(u), r.nextSymbol(); } }(), o(); break; @@ -5241,10 +5258,10 @@ function wt(e, i) { for (; r.accept("comma"); ) { if (r.isDone()) throw new Error("Unexpected end"); - var u = s(); - if (!u) + var v = s(); + if (!v) throw new Error("Unexpected symbol " + r.symbol + ", expected month"); - t.bymonth.push(u), r.nextSymbol(); + t.bymonth.push(v), r.nextSymbol(); } d(), o(); break; @@ -5256,11 +5273,11 @@ function wt(e, i) { var l = r.accept("on"), h = r.accept("the"); if (l || h) do { - var v = a(), u = _(), f = s(); - if (v) - u ? (r.nextSymbol(), t.byweekday || (t.byweekday = []), t.byweekday.push(C[u].nth(v))) : (t.bymonthday || (t.bymonthday = []), t.bymonthday.push(v), r.accept("day(s)")); - else if (u) - r.nextSymbol(), t.byweekday || (t.byweekday = []), t.byweekday.push(C[u]); + var m = a(), v = _(), u = s(); + if (m) + v ? (r.nextSymbol(), t.byweekday || (t.byweekday = []), t.byweekday.push(C[v].nth(m))) : (t.bymonthday || (t.bymonthday = []), t.bymonthday.push(m), r.accept("day(s)")); + else if (v) + r.nextSymbol(), t.byweekday || (t.byweekday = []), t.byweekday.push(C[v]); else if (r.symbol === "weekday(s)") r.nextSymbol(), t.byweekday || (t.byweekday = [C.MO, C.TU, C.WE, C.TH, C.FR]); else if (r.symbol === "week(s)") { @@ -5274,9 +5291,9 @@ function wt(e, i) { t.byweekno.push(parseInt(c[0], 10)); } } else { - if (!f) + if (!u) return; - r.nextSymbol(), t.bymonth || (t.bymonth = []), t.bymonth.push(f); + r.nextSymbol(), t.bymonth || (t.bymonth = []), t.bymonth.push(u); } } while (r.accept("comma") || r.accept("the") || r.accept("on")); } @@ -5595,11 +5612,11 @@ function at(e) { return l.map(function(h) { if (h.length === 2) return Q[h]; - var v = h.match(/^([+-]?\d{1,2})([A-Z]{2})$/); - if (!v || v.length < 3) + var m = h.match(/^([+-]?\d{1,2})([A-Z]{2})$/); + if (!m || m.length < 3) throw new SyntaxError("Invalid weekday string: ".concat(h)); - var u = Number(v[1]), f = v[2], c = Q[f].weekday; - return new K(c, u); + var v = Number(m[1]), u = m[2], c = Q[u].weekday; + return new K(c, v); }); }(n); break; @@ -5653,8 +5670,8 @@ function Pe(e) { o = te(a) ? new K(a).toString() : a.toString(); break; case "BYWEEKDAY": - _ = "BYDAY", o = (i = a, G(i) ? i : [i]).map(function(f) { - return f instanceof K ? f : G(f) ? new K(f[0], f[1]) : new K(f); + _ = "BYDAY", o = (i = a, G(i) ? i : [i]).map(function(u) { + return u instanceof K ? u : G(u) ? new K(u[0], u[1]) : new K(u); }).toString(); break; case "DTSTART": @@ -5674,12 +5691,12 @@ function Pe(e) { o && t.push([_, o]); } } - var v = t.map(function(f) { - var c = f[0], p = f[1]; - return "".concat(c, "=").concat(p.toString()); - }).join(";"), u = ""; - return v !== "" && (u = "RRULE:".concat(v)), [r, u].filter(function(f) { - return !!f; + var m = t.map(function(u) { + var c = u[0], f = u[1]; + return "".concat(c, "=").concat(f.toString()); + }).join(";"), v = ""; + return m !== "" && (v = "RRULE:".concat(m)), [r, v].filter(function(u) { + return !!u; }).join(` `); } @@ -5700,8 +5717,8 @@ var Wa = function() { }, e.prototype._cacheGet = function(i, t) { var r = !1, d = t ? Object.keys(t) : [], n = function(l) { for (var h = 0; h < d.length; h++) { - var v = d[h]; - if (!Ja(t[v], l[v])) + var m = d[h]; + if (!Ja(t[m], l[m])) return !0; } return !1; @@ -5730,8 +5747,8 @@ var Wa = function() { return e; }(); function dn(e, i) { - var t, r, d = he(e, 1, 1), n = ge(e) ? 366 : 365, s = ge(e + 1) ? 366 : 365, _ = ze(d), a = me(d), o = X(X({ yearlen: n, nextyearlen: s, yearordinal: _, yearweekday: a }, function(E) { - var D = ge(E) ? 366 : 365, w = he(E, 1, 1), S = me(w); + var t, r, d = he(e, 1, 1), n = ge(e) ? 366 : 365, s = ge(e + 1) ? 366 : 365, _ = ze(d), a = me(d), o = X(X({ yearlen: n, nextyearlen: s, yearordinal: _, yearweekday: a }, function(w) { + var D = ge(w) ? 366 : 365, E = he(w, 1, 1), S = me(E); return D === 365 ? { mmask: Ka, mdaymask: en, nmdaymask: rn, wdaymask: rt.slice(S), mrange: sn } : { mmask: Ga, mdaymask: Qa, nmdaymask: nn, wdaymask: rt.slice(S), mrange: on }; }(e)), { wnomask: null }); if (ae(i.byweekno)) @@ -5739,17 +5756,17 @@ function dn(e, i) { o.wnomask = I(0, n + 7); var l = t = Z(7 - a + i.wkst, 7); l >= 4 ? (l = 0, r = o.yearlen + Z(a - i.wkst, 7)) : r = n - l; - for (var h = Math.floor(r / 7), v = Z(r, 7), u = Math.floor(h + v / 4), f = 0; f < i.byweekno.length; f++) { - var c = i.byweekno[f]; - if (c < 0 && (c += u + 1), c > 0 && c <= u) { - var p = void 0; - c > 1 ? (p = l + 7 * (c - 1), l !== t && (p -= 7 - t)) : p = l; - for (var m = 0; m < 7 && (o.wnomask[p] = 1, p++, o.wdaymask[p] !== i.wkst); m++) + for (var h = Math.floor(r / 7), m = Z(r, 7), v = Math.floor(h + m / 4), u = 0; u < i.byweekno.length; u++) { + var c = i.byweekno[u]; + if (c < 0 && (c += v + 1), c > 0 && c <= v) { + var f = void 0; + c > 1 ? (f = l + 7 * (c - 1), l !== t && (f -= 7 - t)) : f = l; + for (var p = 0; p < 7 && (o.wnomask[f] = 1, f++, o.wdaymask[f] !== i.wkst); p++) ; } } - if (R(i.byweekno, 1) && (p = l + 7 * u, l !== t && (p -= 7 - t), p < n)) - for (f = 0; f < 7 && (o.wnomask[p] = 1, p += 1, o.wdaymask[p] !== i.wkst); f++) + if (R(i.byweekno, 1) && (f = l + 7 * v, l !== t && (f -= 7 - t), f < n)) + for (u = 0; u < 7 && (o.wnomask[f] = 1, f += 1, o.wdaymask[f] !== i.wkst); u++) ; if (l) { var g = void 0; @@ -5760,8 +5777,8 @@ function dn(e, i) { x >= 4 ? (x = 0, k = b + Z(y - i.wkst, 7)) : k = n - l, g = Math.floor(52 + Z(k, 7) / 4); } if (R(i.byweekno, g)) - for (p = 0; p < l; p++) - o.wnomask[p] = 1; + for (f = 0; f < l; f++) + o.wnomask[f] = 1; } return o; } @@ -5773,30 +5790,30 @@ var _n = function() { var r = this.options; if (i !== this.lastyear && (this.yearinfo = dn(i, r)), F(r.bynweekday) && (t !== this.lastmonth || i !== this.lastyear)) { var d = this.yearinfo, n = d.yearlen, s = d.mrange, _ = d.wdaymask; - this.monthinfo = function(a, o, l, h, v, u) { - var f = { lastyear: a, lastmonth: o, nwdaymask: [] }, c = []; - if (u.freq === C.YEARLY) - if (ae(u.bymonth)) + this.monthinfo = function(a, o, l, h, m, v) { + var u = { lastyear: a, lastmonth: o, nwdaymask: [] }, c = []; + if (v.freq === C.YEARLY) + if (ae(v.bymonth)) c = [[0, l]]; else - for (var p = 0; p < u.bymonth.length; p++) - o = u.bymonth[p], c.push(h.slice(o - 1, o + 1)); + for (var f = 0; f < v.bymonth.length; f++) + o = v.bymonth[f], c.push(h.slice(o - 1, o + 1)); else - u.freq === C.MONTHLY && (c = [h.slice(o - 1, o + 1)]); + v.freq === C.MONTHLY && (c = [h.slice(o - 1, o + 1)]); if (ae(c)) - return f; - for (f.nwdaymask = I(0, l), p = 0; p < c.length; p++) - for (var m = c[p], g = m[0], y = m[1] - 1, x = 0; x < u.bynweekday.length; x++) { - var b = void 0, k = u.bynweekday[x], E = k[0], D = k[1]; - D < 0 ? (b = y + 7 * (D + 1), b -= Z(v[b] - E, 7)) : (b = g + 7 * (D - 1), b += Z(7 - v[b] + E, 7)), g <= b && b <= y && (f.nwdaymask[b] = 1); + return u; + for (u.nwdaymask = I(0, l), f = 0; f < c.length; f++) + for (var p = c[f], g = p[0], y = p[1] - 1, x = 0; x < v.bynweekday.length; x++) { + var b = void 0, k = v.bynweekday[x], w = k[0], D = k[1]; + D < 0 ? (b = y + 7 * (D + 1), b -= Z(m[b] - w, 7)) : (b = g + 7 * (D - 1), b += Z(7 - m[b] + w, 7)), g <= b && b <= y && (u.nwdaymask[b] = 1); } - return f; + return u; }(i, t, n, s, _, r); } U(r.byeaster) && (this.eastermask = function(a, o) { o === void 0 && (o = 0); - var l = a % 19, h = Math.floor(a / 100), v = a % 100, u = Math.floor(h / 4), f = h % 4, c = Math.floor((h + 8) / 25), p = Math.floor((h - c + 1) / 3), m = Math.floor(19 * l + h - u - p + 15) % 30, g = Math.floor(v / 4), y = v % 4, x = Math.floor(32 + 2 * f + 2 * g - m - y) % 7, b = Math.floor((l + 11 * m + 22 * x) / 451), k = Math.floor((m + x - 7 * b + 114) / 31), E = (m + x - 7 * b + 114) % 31 + 1, D = Date.UTC(a, k - 1, E + o), w = Date.UTC(a, 0, 1); - return [Math.ceil((D - w) / 864e5)]; + var l = a % 19, h = Math.floor(a / 100), m = a % 100, v = Math.floor(h / 4), u = h % 4, c = Math.floor((h + 8) / 25), f = Math.floor((h - c + 1) / 3), p = Math.floor(19 * l + h - v - f + 15) % 30, g = Math.floor(m / 4), y = m % 4, x = Math.floor(32 + 2 * u + 2 * g - p - y) % 7, b = Math.floor((l + 11 * p + 22 * x) / 451), k = Math.floor((p + x - 7 * b + 114) / 31), w = (p + x - 7 * b + 114) % 31 + 1, D = Date.UTC(a, k - 1, w + o), E = Date.UTC(a, 0, 1); + return [Math.ceil((D - E) / 864e5)]; }(i, r.byeaster)); }, Object.defineProperty(e.prototype, "lastyear", { get: function() { return this.monthinfo ? this.monthinfo.lastyear : null; @@ -5874,14 +5891,14 @@ function ln(e, i, t, r, d, n) { for (var s = [], _ = 0; _ < e.length; _++) { var a = void 0, o = void 0, l = e[_]; l < 0 ? (a = Math.floor(l / i.length), o = Z(l, i.length)) : (a = Math.floor((l - 1) / i.length), o = Z(l - 1, i.length)); - for (var h = [], v = t; v < r; v++) { - var u = n[v]; - U(u) && h.push(u); + for (var h = [], m = t; m < r; m++) { + var v = n[m]; + U(v) && h.push(v); } - var f = void 0; - f = a < 0 ? h.slice(a)[0] : h[a]; - var c = i[o], p = xt(d.yearordinal + f), m = kt(p, c); - R(s, m) || s.push(m); + var u = void 0; + u = a < 0 ? h.slice(a)[0] : h[a]; + var c = i[o], f = xt(d.yearordinal + u), p = kt(f, c); + R(s, p) || s.push(p); } return be(s), s; } @@ -5891,8 +5908,8 @@ function Dt(e, i) { return re(e); var a = Ua.fromDate(t), o = new _n(i); o.rebuild(a.year, a.month); - for (var l = function(D, w, S) { - var N = S.freq, M = S.byhour, A = S.byminute, T = S.bysecond; + for (var l = function(D, E, S) { + var N = S.freq, M = S.byhour, T = S.byminute, A = S.bysecond; return Ce(N) ? function(H) { var $ = H.dtstart.getTime() % 1e3; if (!Ce(H.freq)) @@ -5905,12 +5922,12 @@ function Dt(e, i) { }); }); }), j; - }(S) : N >= C.HOURLY && F(M) && !R(M, w.hour) || N >= C.MINUTELY && F(A) && !R(A, w.minute) || N >= C.SECONDLY && F(T) && !R(T, w.second) ? [] : D.gettimeset(N)(w.hour, w.minute, w.second, w.millisecond); + }(S) : N >= C.HOURLY && F(M) && !R(M, E.hour) || N >= C.MINUTELY && F(T) && !R(T, E.minute) || N >= C.SECONDLY && F(A) && !R(A, E.second) ? [] : D.gettimeset(N)(E.hour, E.minute, E.second, E.millisecond); }(o, a, i); ; ) { - var h = o.getdayset(r)(a.year, a.month, a.day), v = h[0], u = h[1], f = h[2], c = hn(v, u, f, o, i); + var h = o.getdayset(r)(a.year, a.month, a.day), m = h[0], v = h[1], u = h[2], c = hn(m, v, u, o, i); if (F(s)) - for (var p = ln(s, l, u, f, o, v), m = 0; m < p.length; m++) { - var g = p[m]; + for (var f = ln(s, l, v, u, o, m), p = 0; p < f.length; p++) { + var g = f[p]; if (n && g > n) return re(e); if (g >= t) { @@ -5920,12 +5937,12 @@ function Dt(e, i) { } } else - for (m = u; m < f; m++) { - var x = v[m]; + for (p = v; p < u; p++) { + var x = m[p]; if (U(x)) for (var b = xt(o.yearordinal + x), k = 0; k < l.length; k++) { - var E = l[k]; - if (g = kt(b, E), n && g > n || g >= t && (y = it(g, i), !e.accept(y) || _ && !--_)) + var w = l[k]; + if (g = kt(b, w), n && g > n || g >= t && (y = it(g, i), !e.accept(y) || _ && !--_)) return re(e); } } @@ -6013,49 +6030,49 @@ function fn(e, i) { throw new Error("Invalid empty string"); if (!h) return l.split(/\s/); - for (var v = l.split(` -`), u = 0; u < v.length; ) { - var f = v[u] = v[u].replace(/\s+$/g, ""); - f ? u > 0 && f[0] === " " ? (v[u - 1] += f.slice(1), v.splice(u, 1)) : u += 1 : v.splice(u, 1); + for (var m = l.split(` +`), v = 0; v < m.length; ) { + var u = m[v] = m[v].replace(/\s+$/g, ""); + u ? v > 0 && u[0] === " " ? (m[v - 1] += u.slice(1), m.splice(v, 1)) : v += 1 : m.splice(v, 1); } - return v; + return m; }(e, i.unfold); return o.forEach(function(l) { var h; if (l) { - var v = function(m) { + var m = function(p) { var g = function(k) { if (k.indexOf(":") === -1) return { name: "RRULE", value: k }; - var E = Ha(k, ":", 1), D = E[0], w = E[1]; - return { name: D, value: w }; - }(m), y = g.name, x = g.value, b = y.split(";"); + var w = Ha(k, ":", 1), D = w[0], E = w[1]; + return { name: D, value: E }; + }(p), y = g.name, x = g.value, b = y.split(";"); if (!b) throw new Error("empty property name"); return { name: b[0].toUpperCase(), parms: b.slice(1), value: x }; - }(l), u = v.name, f = v.parms, c = v.value; - switch (u.toUpperCase()) { + }(l), v = m.name, u = m.parms, c = m.value; + switch (v.toUpperCase()) { case "RRULE": - if (f.length) - throw new Error("unsupported RRULE parm: ".concat(f.join(","))); + if (u.length) + throw new Error("unsupported RRULE parm: ".concat(u.join(","))); t.push(Ie(l)); break; case "RDATE": - var p = ((h = /RDATE(?:;TZID=([^:=]+))?/i.exec(l)) !== null && h !== void 0 ? h : [])[1]; - p && !a && (a = p), r = r.concat(st(c, f)); + var f = ((h = /RDATE(?:;TZID=([^:=]+))?/i.exec(l)) !== null && h !== void 0 ? h : [])[1]; + f && !a && (a = f), r = r.concat(st(c, u)); break; case "EXRULE": - if (f.length) - throw new Error("unsupported EXRULE parm: ".concat(f.join(","))); + if (u.length) + throw new Error("unsupported EXRULE parm: ".concat(u.join(","))); d.push(Ie(c)); break; case "EXDATE": - n = n.concat(st(c, f)); + n = n.concat(st(c, u)); break; case "DTSTART": break; default: - throw new Error("unsupported property: " + u); + throw new Error("unsupported property: " + v); } } }), { dtstart: _, tzid: a, rrulevals: t, rdatevals: r, exrulevals: d, exdatevals: n }; @@ -6064,19 +6081,19 @@ function Se(e, i) { return i === void 0 && (i = {}), function(t, r) { var d = fn(t, r), n = d.rrulevals, s = d.rdatevals, _ = d.exrulevals, a = d.exdatevals, o = d.dtstart, l = d.tzid, h = r.cache === !1; if (r.compatible && (r.forceset = !0, r.unfold = !0), r.forceset || n.length > 1 || s.length || _.length || a.length) { - var v = new pn(h); - return v.dtstart(o), v.tzid(l || void 0), n.forEach(function(f) { - v.rrule(new C(Oe(f, o, l), h)); - }), s.forEach(function(f) { - v.rdate(f); - }), _.forEach(function(f) { - v.exrule(new C(Oe(f, o, l), h)); - }), a.forEach(function(f) { - v.exdate(f); - }), r.compatible && r.dtstart && v.rdate(o), v; - } - var u = n[0] || {}; - return new C(Oe(u, u.dtstart || r.dtstart || o, u.tzid || r.tzid || l), h); + var m = new pn(h); + return m.dtstart(o), m.tzid(l || void 0), n.forEach(function(u) { + m.rrule(new C(Oe(u, o, l), h)); + }), s.forEach(function(u) { + m.rdate(u); + }), _.forEach(function(u) { + m.exrule(new C(Oe(u, o, l), h)); + }), a.forEach(function(u) { + m.exdate(u); + }), r.compatible && r.dtstart && m.rdate(o), m; + } + var v = n[0] || {}; + return new C(Oe(v, v.dtstart || r.dtstart || o, v.tzid || r.tzid || l), h); }(e, function(t) { var r = [], d = Object.keys(t), n = Object.keys(ot); if (d.forEach(function(s) { @@ -6120,40 +6137,40 @@ var pn = function(e) { return Be(i, e), i.prototype._iter = function(t) { return function(r, d, n, s, _, a) { var o = {}, l = r.accept; - function h(c, p) { - n.forEach(function(m) { - m.between(c, p, !0).forEach(function(g) { + function h(c, f) { + n.forEach(function(p) { + p.between(c, f, !0).forEach(function(g) { o[Number(g)] = !0; }); }); } _.forEach(function(c) { - var p = new De(c, a).rezonedDate(); - o[Number(p)] = !0; + var f = new De(c, a).rezonedDate(); + o[Number(f)] = !0; }), r.accept = function(c) { - var p = Number(c); - return isNaN(p) ? l.call(this, c) : !(!o[p] && (h(new Date(p - 1), new Date(p + 1)), !o[p])) || (o[p] = !0, l.call(this, c)); + var f = Number(c); + return isNaN(f) ? l.call(this, c) : !(!o[f] && (h(new Date(f - 1), new Date(f + 1)), !o[f])) || (o[f] = !0, l.call(this, c)); }, r.method === "between" && (h(r.args.after, r.args.before), r.accept = function(c) { - var p = Number(c); - return !!o[p] || (o[p] = !0, l.call(this, c)); + var f = Number(c); + return !!o[f] || (o[f] = !0, l.call(this, c)); }); - for (var v = 0; v < s.length; v++) { - var u = new De(s[v], a).rezonedDate(); - if (!r.accept(new Date(u.getTime()))) + for (var m = 0; m < s.length; m++) { + var v = new De(s[m], a).rezonedDate(); + if (!r.accept(new Date(v.getTime()))) break; } d.forEach(function(c) { Dt(r, c.options); }); - var f = r._result; - switch (be(f), r.method) { + var u = r._result; + switch (be(u), r.method) { case "all": case "between": - return f; + return u; case "before": - return f.length && f[f.length - 1] || null; + return u.length && u[u.length - 1] || null; default: - return f.length && f[0] || null; + return u.length && u[0] || null; } }(t, this._rrule, this._exrule, this._rdate, this._exdate, this.tzid()); }, i.prototype.rrule = function(t) { @@ -6260,8 +6277,8 @@ class mn { _calculateTooltipPosition(i) { const t = this._scheduler, r = t.$domHelpers, d = this._getViewPortSize(), n = this.getNode(), s = { top: 0, left: 0, width: n.offsetWidth, height: n.offsetHeight, bottom: 0, right: 0 }, _ = t.config.tooltip_offset_x, a = t.config.tooltip_offset_y, o = document.body, l = r.getRelativeEventPosition(i, o), h = r.getNodePosition(o); l.y += h.y, s.top = l.y, s.left = l.x, s.top += a, s.left += _, s.bottom = s.top + s.height, s.right = s.left + s.width; - const v = window.scrollY + o.scrollTop; - return s.top < d.top - v ? (s.top = d.top, s.bottom = s.top + s.height) : s.bottom > d.bottom && (s.bottom = d.bottom, s.top = s.bottom - s.height), s.left < d.left ? (s.left = d.left, s.right = d.left + s.width) : s.right > d.right && (s.right = d.right, s.left = s.right - s.width), l.x >= s.left && l.x <= s.right && (s.left = l.x - s.width - _, s.right = s.left + s.width), l.y >= s.top && l.y <= s.bottom && (s.top = l.y - s.height - a, s.bottom = s.top + s.height), s; + const m = window.scrollY + o.scrollTop; + return s.top < d.top - m ? (s.top = d.top, s.bottom = s.top + s.height) : s.bottom > d.bottom && (s.bottom = d.bottom, s.top = s.bottom - s.height), s.left < d.left ? (s.left = d.left, s.right = d.left + s.width) : s.right > d.right && (s.right = d.right, s.left = s.right - s.width), l.x >= s.left && l.x <= s.right && (s.left = l.x - s.width - _, s.right = s.left + s.width), l.y >= s.top && l.y <= s.bottom && (s.top = l.y - s.height - a, s.bottom = s.top + s.height), s; } _getViewPortSize() { const i = this._scheduler, t = i.$domHelpers, r = this._getViewPort(); @@ -6369,22 +6386,22 @@ const gn = { active_links: function(e) { var r = e.render_view_data; function d() { var n = e.get_visible_events(); - n.sort(function(m, g) { - return m.start_date > g.start_date ? 1 : -1; + n.sort(function(p, g) { + return p.start_date > g.start_date ? 1 : -1; }); for (var s, _ = "
", a = 0; a < n.length; a++) { - var o = n[a], l = o.color ? "--dhx-scheduler-event-background:" + o.color + ";" : "", h = o.textColor ? "--dhx-scheduler-event-color:" + o.textColor + ";" : "", v = e.templates.event_class(o.start_date, o.end_date, o); + var o = n[a], l = o.color ? "--dhx-scheduler-event-background:" + o.color + ";" : "", h = o.textColor ? "--dhx-scheduler-event-color:" + o.textColor + ";" : "", m = e.templates.event_class(o.start_date, o.end_date, o); s = e._waiAria.agendaEventAttrString(o); - var u = e._waiAria.agendaDetailsBtnString(); - _ += "
" + (e.config.rtl ? e.templates.agenda_time(o.end_date, o.start_date, o) : e.templates.agenda_time(o.start_date, o.end_date, o)) + "
", _ += `
+ var v = e._waiAria.agendaDetailsBtnString(); + _ += "
" + (e.config.rtl ? e.templates.agenda_time(o.end_date, o.start_date, o) : e.templates.agenda_time(o.start_date, o.end_date, o)) + "
", _ += `
`, _ += "" + e.templates.agenda_text(o.start_date, o.end_date, o) + "
"; } _ += "
", e._els.dhx_cal_data[0].innerHTML = _, e._els.dhx_cal_data[0].childNodes[0].scrollTop = e._agendaScrollTop || 0; - var f = e._els.dhx_cal_data[0].childNodes[0]; - f.childNodes[f.childNodes.length - 1].style.height = f.offsetHeight < e._els.dhx_cal_data[0].offsetHeight ? "100%" : f.offsetHeight + "px"; - var c = e._els.dhx_cal_data[0].firstChild.childNodes, p = e._getNavDateElement(); - for (p && (p.innerHTML = e.templates.agenda_date(e._min_date, e._max_date, e._mode)), e._rendered = [], a = 0; a < c.length - 1; a++) + var u = e._els.dhx_cal_data[0].childNodes[0]; + u.childNodes[u.childNodes.length - 1].style.height = u.offsetHeight < e._els.dhx_cal_data[0].offsetHeight ? "100%" : u.offsetHeight + "px"; + var c = e._els.dhx_cal_data[0].firstChild.childNodes, f = e._getNavDateElement(); + for (f && (f.innerHTML = e.templates.agenda_date(e._min_date, e._max_date, e._mode)), e._rendered = [], a = 0; a < c.length - 1; a++) e._rendered[a] = c[a]; } e.render_view_data = function() { @@ -6433,50 +6450,50 @@ const gn = { active_links: function(e) { var s = e.render_view_data; function _() { const o = e.get_visible_events(); - o.sort(function(p, m) { - return p.start_date > m.start_date ? 1 : -1; + o.sort(function(f, p) { + return f.start_date > p.start_date ? 1 : -1; }); const l = {}; let h = e.getState().min_date; - const v = e.getState().max_date; - for (; h.valueOf() < v.valueOf(); ) + const m = e.getState().max_date; + for (; h.valueOf() < m.valueOf(); ) l[h.valueOf()] = [], h = e.date.add(h, 1, "day"); - let u = !1; - if (o.forEach((p) => { - let m = e.date.day_start(new Date(p.start_date)); - for (; m.valueOf() < p.end_date.valueOf(); ) - l[m.valueOf()] && (l[m.valueOf()].push(p), u = !0), m = e.date.day_start(e.date.add(m, 1, "day")); - }), u) { - let p = ""; - for (let m in l) - p += a(new Date(1 * m), l[m]); - e._els.dhx_cal_data[0].innerHTML = p; + let v = !1; + if (o.forEach((f) => { + let p = e.date.day_start(new Date(f.start_date)); + for (; p.valueOf() < f.end_date.valueOf(); ) + l[p.valueOf()] && (l[p.valueOf()].push(f), v = !0), p = e.date.day_start(e.date.add(p, 1, "day")); + }), v) { + let f = ""; + for (let p in l) + e.ignore_agenda && e.ignore_agenda(new Date(1 * p)) || (f += a(new Date(1 * p), l[p])); + e._els.dhx_cal_data[0].innerHTML = f; } else e._els.dhx_cal_data[0].innerHTML = `
${e.locale.labels.agenda_tab}
`; e._els.dhx_cal_data[0].scrollTop = r; - let f = e._els.dhx_cal_data[0].querySelectorAll(".dhx_cal_agenda_event_line"); + let u = e._els.dhx_cal_data[0].querySelectorAll(".dhx_cal_agenda_event_line"); e._rendered = []; - for (var c = 0; c < f.length - 1; c++) - e._rendered[c] = f[c]; + for (var c = 0; c < u.length - 1; c++) + e._rendered[c] = u[c]; } function a(o, l) { if (!l.length) return ""; let h = ` -
+
${e.templates.agenda_day(o)}
`; - return l.forEach((v) => { - h += function(u, f) { - const c = e.templates.agenda_time(f.start_date, f.end_date, f), p = e.getState().select_id, m = e.templates.event_class(f.start_date, f.end_date, f), g = e.templates.agenda_text(f.start_date, f.end_date, f); + return l.forEach((m) => { + h += function(v, u) { + const c = e.templates.agenda_time(u.start_date, u.end_date, u), f = e.getState().select_id, p = e.templates.event_class(u.start_date, u.end_date, u), g = e.templates.agenda_text(u.start_date, u.end_date, u); let y = ""; - return (f.color || f.textColor) && (y = ` style="${f.color ? "--dhx-scheduler-event-background:" + f.color + ";" : ""}${f.textColor ? "--dhx-scheduler-event-color:" + f.textColor + ";" : ""}" `), `
+ return (u.color || u.textColor) && (y = ` style="${u.color ? "--dhx-scheduler-event-background:" + u.color + ";" : ""}${u.textColor ? "--dhx-scheduler-event-color:" + u.textColor + ";" : ""}" `), `
${c}
${g}
`; - }(0, v); + }(0, m); }), h += "
", h; } e.render_view_data = function() { @@ -6505,32 +6522,32 @@ const gn = { active_links: function(e) { if (!l._timed) if (this.config.all_timed != "short" || i(l)) { var h = this._safe_copy(l); - l._virtual ? h._first_chunk = !1 : h._first_chunk = !0, h._drag_resize = !1, h._virtual = !0, h.start_date = new Date(h.start_date), c(l) ? (h.end_date = p(h.start_date), this.config.last_hour != 24 && (h.end_date = m(h.start_date, this.config.last_hour))) : h.end_date = new Date(l.end_date); - var v = !1; - h.start_date < this._max_date && h.end_date > this._min_date && h.start_date < h.end_date && (_[o] = h, v = !0); - var u = this._safe_copy(l); - if (u._virtual = !0, u.end_date = new Date(u.end_date), u.start_date < this._min_date ? u.start_date = m(this._min_date, this.config.first_hour) : u.start_date = m(p(l.start_date), this.config.first_hour), u.start_date < this._max_date && u.start_date < u.end_date) { - if (!v) { - _[o--] = u; + l._virtual ? h._first_chunk = !1 : h._first_chunk = !0, h._drag_resize = !1, h._virtual = !0, h.start_date = new Date(h.start_date), c(l) ? (h.end_date = f(h.start_date), this.config.last_hour != 24 && (h.end_date = p(h.start_date, this.config.last_hour))) : h.end_date = new Date(l.end_date); + var m = !1; + h.start_date < this._max_date && h.end_date > this._min_date && h.start_date < h.end_date && (_[o] = h, m = !0); + var v = this._safe_copy(l); + if (v._virtual = !0, v.end_date = new Date(v.end_date), v.start_date < this._min_date ? v.start_date = p(this._min_date, this.config.first_hour) : v.start_date = p(f(l.start_date), this.config.first_hour), v.start_date < this._max_date && v.start_date < v.end_date) { + if (!m) { + _[o--] = v; continue; } - _.splice(o + 1, 0, u), u._last_chunk = !1; + _.splice(o + 1, 0, v), v._last_chunk = !1; } else h._last_chunk = !0, h._drag_resize = !0; } else this._mode != "month" && _.splice(o--, 1); } - var f = this._drag_mode != "move" && a; - return d.call(this, _, f); + var u = this._drag_mode != "move" && a; + return d.call(this, _, u); function c(g) { - var y = p(g.start_date); + var y = f(g.start_date); return +g.end_date > +y; } - function p(g) { + function f(g) { var y = e.date.add(g, 1, "day"); return y = e.date.date_part(y); } - function m(g, y) { + function p(g, y) { var x = e.date.date_part(new Date(g)); return x.setHours(y), x; } @@ -6590,28 +6607,28 @@ const gn = { active_links: function(e) { else { n = e.getEvents(d.start_date, d.end_date); for (var h = 0; h < n.length; h++) { - var v = n[h]; - if (v.id == d.id || v.event_length && [v.event_pid, v.event_length].join("#") == d.id) { + var m = n[h]; + if (m.id == d.id || m.event_length && [m.event_pid, m.event_length].join("#") == d.id) { n.splice(h, 1); break; } - if (v.recurring_event_id && [v.recurring_event_id, v._pid_time].join("#") == d.id) { + if (m.recurring_event_id && [m.recurring_event_id, m._pid_time].join("#") == d.id) { n.splice(h, 1); break; } } } - var u = e._get_section_view(), f = e._get_section_property(), c = !0; - if (u) { - var p = 0; + var v = e._get_section_view(), u = e._get_section_property(), c = !0; + if (v) { + var f = 0; for (h = 0; h < n.length; h++) - n[h].id != d.id && this._check_sections_collision(n[h], d) && p++; - p >= s && (c = !1); + n[h].id != d.id && this._check_sections_collision(n[h], d) && f++; + f >= s && (c = !1); } else n.length >= s && (c = !1); if (!c) { - var m = !e.callEvent("onEventCollision", [d, n]); - return m || (d[f] = i || d[f]), m; + var p = !e.callEvent("onEventCollision", [d, n]); + return p || (d[u] = i || d[u]), p; } return c; }; @@ -6621,32 +6638,32 @@ const gn = { active_links: function(e) { e._pre_render_events = function(l, h) { if (!e.config.container_autoresize || !t) return i.apply(this, arguments); - var v = this.xy.bar_height, u = this._colsS.heights, f = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0], c = this._els.dhx_cal_data[0]; + var m = this.xy.bar_height, v = this._colsS.heights, u = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0], c = this._els.dhx_cal_data[0]; if (l = this._table_view ? this._pre_render_events_table(l, h) : this._pre_render_events_line(l, h), this._table_view) if (h) - this._colsS.heights = u; + this._colsS.heights = v; else { - var p = c.firstChild; - const E = p.querySelectorAll(".dhx_cal_month_row"); - if (E && E.length) { - for (var m = 0; m < E.length; m++) { - if (f[m]++, f[m] * v > this._colsS.height - this.xy.month_head_height) { - var g = E[m].querySelectorAll(".dhx_cal_month_cell"), y = this._colsS.height - this.xy.month_head_height; - 1 * this.config.max_month_events !== this.config.max_month_events || f[m] <= this.config.max_month_events ? y = f[m] * v : (this.config.max_month_events + 1) * v > this._colsS.height - this.xy.month_head_height && (y = (this.config.max_month_events + 1) * v), E[m].style.height = y + this.xy.month_head_height + "px"; + var f = c.firstChild; + const w = f.querySelectorAll(".dhx_cal_month_row"); + if (w && w.length) { + for (var p = 0; p < w.length; p++) { + if (u[p]++, u[p] * m > this._colsS.height - this.xy.month_head_height) { + var g = w[p].querySelectorAll(".dhx_cal_month_cell"), y = this._colsS.height - this.xy.month_head_height; + 1 * this.config.max_month_events !== this.config.max_month_events || u[p] <= this.config.max_month_events ? y = u[p] * m : (this.config.max_month_events + 1) * m > this._colsS.height - this.xy.month_head_height && (y = (this.config.max_month_events + 1) * m), w[p].style.height = y + this.xy.month_head_height + "px"; for (var x = 0; x < g.length; x++) g[x].childNodes[1].style.height = y + "px"; - f[m] = (f[m - 1] || 0) + g[0].offsetHeight; + u[p] = (u[p - 1] || 0) + g[0].offsetHeight; } - f[m] = (f[m - 1] || 0) + E[m].querySelectorAll(".dhx_cal_month_cell")[0].offsetHeight; + u[p] = (u[p - 1] || 0) + w[p].querySelectorAll(".dhx_cal_month_cell")[0].offsetHeight; } - f.unshift(0), p.parentNode.offsetHeight < p.parentNode.scrollHeight && p._h_fix; - } else if (l.length || this._els.dhx_multi_day[0].style.visibility != "visible" || (f[0] = -1), l.length || f[0] == -1) { - var b = (f[0] + 1) * v + 1; + u.unshift(0), f.parentNode.offsetHeight < f.parentNode.scrollHeight && f._h_fix; + } else if (l.length || this._els.dhx_multi_day[0].style.visibility != "visible" || (u[0] = -1), l.length || u[0] == -1) { + var b = (u[0] + 1) * m + 1; d != b + 1 && (this._obj.style.height = r - d + b - 1 + "px"), b += "px"; - const D = this._els.dhx_cal_navline[0].offsetHeight, w = this._els.dhx_cal_header[0].offsetHeight; - c.style.height = this._obj.offsetHeight - D - w - (this.xy.margin_top || 0) + "px"; + const D = this._els.dhx_cal_navline[0].offsetHeight, E = this._els.dhx_cal_header[0].offsetHeight; + c.style.height = this._obj.offsetHeight - D - E - (this.xy.margin_top || 0) + "px"; var k = this._els.dhx_multi_day[0]; - k.style.height = b, k.style.visibility = f[0] == -1 ? "hidden" : "visible", k.style.display = f[0] == -1 ? "none" : "", (k = this._els.dhx_multi_day[1]).style.height = b, k.style.visibility = f[0] == -1 ? "hidden" : "visible", k.style.display = f[0] == -1 ? "none" : "", k.className = f[0] ? "dhx_multi_day_icon" : "dhx_multi_day_icon_small", this._dy_shift = (f[0] + 1) * v, f[0] = 0; + k.style.height = b, k.style.visibility = u[0] == -1 ? "hidden" : "visible", k.style.display = u[0] == -1 ? "none" : "", (k = this._els.dhx_multi_day[1]).style.height = b, k.style.visibility = u[0] == -1 ? "hidden" : "visible", k.style.display = u[0] == -1 ? "none" : "", k.className = u[0] ? "dhx_multi_day_icon" : "dhx_multi_day_icon_small", this._dy_shift = (u[0] + 1) * m, u[0] = 0; } } return l; @@ -6654,68 +6671,68 @@ const gn = { active_links: function(e) { var n = ["dhx_cal_navline", "dhx_cal_header", "dhx_multi_day", "dhx_cal_data"], s = function(l) { r = 0; for (var h = 0; h < n.length; h++) { - var v = n[h], u = e._els[v] ? e._els[v][0] : null, f = 0; - switch (v) { + var m = n[h], v = e._els[m] ? e._els[m][0] : null, u = 0; + switch (m) { case "dhx_cal_navline": case "dhx_cal_header": - f = u.offsetHeight; + u = v.offsetHeight; break; case "dhx_multi_day": - f = u ? u.offsetHeight - 1 : 0, d = f; + u = v ? v.offsetHeight - 1 : 0, d = u; break; case "dhx_cal_data": var c = e.getState().mode; - if (u.childNodes[1] && c != "month") { + if (v.childNodes[1] && c != "month") { let M = 0; - for (let A = 0; A < u.childNodes.length; A++) - u.childNodes[A].offsetHeight > M && (M = u.childNodes[A].offsetHeight); - f = M; + for (let T = 0; T < v.childNodes.length; T++) + v.childNodes[T].offsetHeight > M && (M = v.childNodes[T].offsetHeight); + u = M; } else - f = Math.max(u.offsetHeight - 1, u.scrollHeight); + u = Math.max(v.offsetHeight - 1, v.scrollHeight); if (c == "month") - e.config.month_day_min_height && !l && (f = u.querySelectorAll(".dhx_cal_month_row").length * e.config.month_day_min_height), l && (u.style.height = f + "px"); + e.config.month_day_min_height && !l && (u = v.querySelectorAll(".dhx_cal_month_row").length * e.config.month_day_min_height), l && (v.style.height = u + "px"); else if (c == "year") - f = 190 * e.config.year_y; + u = 190 * e.config.year_y; else if (c == "agenda") { - if (f = 0, u.childNodes && u.childNodes.length) - for (var p = 0; p < u.childNodes.length; p++) - f += u.childNodes[p].offsetHeight; - f + 2 < e.config.min_grid_size ? f = e.config.min_grid_size : f += 2; + if (u = 0, v.childNodes && v.childNodes.length) + for (var f = 0; f < v.childNodes.length; f++) + u += v.childNodes[f].offsetHeight; + u + 2 < e.config.min_grid_size ? u = e.config.min_grid_size : u += 2; } else if (c == "week_agenda") { - for (var m, g, y = e.xy.week_agenda_scale_height + e.config.min_grid_size, x = 0; x < u.childNodes.length; x++) - for (g = u.childNodes[x], p = 0; p < g.childNodes.length; p++) { - for (var b = 0, k = g.childNodes[p].childNodes[1], E = 0; E < k.childNodes.length; E++) - b += k.childNodes[E].offsetHeight; - m = b + e.xy.week_agenda_scale_height, (m = x != 1 || p != 2 && p != 3 ? m : 2 * m) > y && (y = m); + for (var p, g, y = e.xy.week_agenda_scale_height + e.config.min_grid_size, x = 0; x < v.childNodes.length; x++) + for (g = v.childNodes[x], f = 0; f < g.childNodes.length; f++) { + for (var b = 0, k = g.childNodes[f].childNodes[1], w = 0; w < k.childNodes.length; w++) + b += k.childNodes[w].offsetHeight; + p = b + e.xy.week_agenda_scale_height, (p = x != 1 || f != 2 && f != 3 ? p : 2 * p) > y && (y = p); } - f = 3 * y; + u = 3 * y; } else if (c == "map") { - f = 0; - var D = u.querySelectorAll(".dhx_map_line"); - for (p = 0; p < D.length; p++) - f += D[p].offsetHeight; - f + 2 < e.config.min_map_size ? f = e.config.min_map_size : f += 2; + u = 0; + var D = v.querySelectorAll(".dhx_map_line"); + for (f = 0; f < D.length; f++) + u += D[f].offsetHeight; + u + 2 < e.config.min_map_size ? u = e.config.min_map_size : u += 2; } else if (e._gridView) - if (f = 0, u.childNodes[1].childNodes[0].childNodes && u.childNodes[1].childNodes[0].childNodes.length) { - for (D = u.childNodes[1].childNodes[0].childNodes[0].childNodes, p = 0; p < D.length; p++) - f += D[p].offsetHeight; - (f += 2) < e.config.min_grid_size && (f = e.config.min_grid_size); + if (u = 0, v.childNodes[1].childNodes[0].childNodes && v.childNodes[1].childNodes[0].childNodes.length) { + for (D = v.childNodes[1].childNodes[0].childNodes[0].childNodes, f = 0; f < D.length; f++) + u += D[f].offsetHeight; + (u += 2) < e.config.min_grid_size && (u = e.config.min_grid_size); } else - f = e.config.min_grid_size; + u = e.config.min_grid_size; if (e.matrix && e.matrix[c]) { if (l) - f += 0, u.style.height = f + "px"; + u += 0, v.style.height = u + "px"; else { - f = 0; - for (var w = e.matrix[c], S = w.y_unit, N = 0; N < S.length; N++) - f += w.getSectionHeight(S[N].key); - e.$container.clientWidth != e.$container.scrollWidth && (f += o()); + u = 0; + for (var E = e.matrix[c], S = E.y_unit, N = 0; N < S.length; N++) + u += E.getSectionHeight(S[N].key); + e.$container.clientWidth != e.$container.scrollWidth && (u += o()); } - f -= 1; + u -= 1; } - (c == "day" || c == "week" || e._props && e._props[c]) && (f += 2); + (c == "day" || c == "week" || e._props && e._props[c]) && (u += 2); } - r += f += 1; + r += u += 1; } e._obj.style.height = r + "px", l || e.updateView(); }; @@ -6728,11 +6745,11 @@ const gn = { active_links: function(e) { var l = e.getState().mode; if (!l) return !0; - var h = window.requestAnimationFrame || window.setTimeout, v = document.documentElement.scrollTop; + var h = window.requestAnimationFrame || window.setTimeout, m = document.documentElement.scrollTop; h(function() { !e.$destroyed && e.$initialized && s(); }), e.matrix && e.matrix[l] || l == "month" ? h(function() { - !e.$destroyed && e.$initialized && (s(!0), document.documentElement.scrollTop = v, _()); + !e.$destroyed && e.$initialized && (s(!0), document.documentElement.scrollTop = m, _()); }, 1) : _(); }; function o() { @@ -6745,8 +6762,8 @@ const gn = { active_links: function(e) { var l = e.config.container_autoresize; if (e.xy.$original_scroll_width || (e.xy.$original_scroll_width = e.xy.scroll_width), e.xy.scroll_width = l ? 0 : e.xy.$original_scroll_width, e.matrix) for (var h in e.matrix) { - var v = e.matrix[h]; - v.$original_section_autoheight || (v.$original_section_autoheight = v.section_autoheight), v.section_autoheight = !l && v.$original_section_autoheight; + var m = e.matrix[h]; + m.$original_section_autoheight || (m.$original_section_autoheight = m.section_autoheight), m.section_autoheight = !l && m.$original_section_autoheight; } return !0; }), e.attachEvent("onViewChange", a), e.attachEvent("onXLE", a), e.attachEvent("onEventChanged", a), e.attachEvent("onEventCreated", a), e.attachEvent("onEventAdded", a), e.attachEvent("onEventDeleted", a), e.attachEvent("onAfterSchedulerResize", a), e.attachEvent("onClearAll", a), e.attachEvent("onBeforeExpand", function() { @@ -6767,14 +6784,14 @@ const gn = { active_links: function(e) { var o = i(e); if (t) { t = !1; - var l = function(v) { - var u = v + "="; + var l = function(m) { + var v = m + "="; if (document.cookie.length > 0) { - var f = document.cookie.indexOf(u); - if (f != -1) { - f += u.length; - var c = document.cookie.indexOf(";", f); - return c == -1 && (c = document.cookie.length), document.cookie.substring(f, c); + var u = document.cookie.indexOf(v); + if (u != -1) { + u += v.length; + var c = document.cookie.indexOf(";", u); + return c == -1 && (c = document.cookie.length), document.cookie.substring(u, c); } } return ""; @@ -6815,28 +6832,28 @@ const gn = { active_links: function(e) { return t += "
"; }, set_value: function(i, t, r, d) { (function() { - u(); - var v = e.attachEvent("onAfterLightbox", function() { - u(), e.detachEvent(v); + v(); + var m = e.attachEvent("onAfterLightbox", function() { + v(), e.detachEvent(m); }); - function u() { + function v() { if (i._combo && i._combo.DOMParent) { - var f = i._combo; - f.unload ? f.unload() : f.destructor && f.destructor(), f.DOMParent = f.DOMelem = null; + var u = i._combo; + u.unload ? u.unload() : u.destructor && u.destructor(), u.DOMParent = u.DOMelem = null; } } })(), window.dhx_globalImgPath = d.image_path || "/", i._combo = new dhtmlXCombo(i, d.name, i.offsetWidth - 8), d.onchange && i._combo.attachEvent("onChange", d.onchange), d.options_height && i._combo.setOptionHeight(d.options_height); var n = i._combo; if (n.enableFilteringMode(d.filtering, d.script_path || null, !!d.cache), d.script_path) { var s = r[d.map_to]; - s ? d.cached_options[s] ? (n.addOption(s, d.cached_options[s]), n.disable(1), n.selectOption(0), n.disable(0)) : e.ajax.get(d.script_path + "?id=" + s + "&uid=" + e.uid(), function(v) { - var u, f = v.xmlDoc.responseText; + s ? d.cached_options[s] ? (n.addOption(s, d.cached_options[s]), n.disable(1), n.selectOption(0), n.disable(0)) : e.ajax.get(d.script_path + "?id=" + s + "&uid=" + e.uid(), function(m) { + var v, u = m.xmlDoc.responseText; try { - u = JSON.parse(f).options[0].text; + v = JSON.parse(u).options[0].text; } catch { - u = e.ajax.xpath("//option", v.xmlDoc)[0].childNodes[0].nodeValue; + v = e.ajax.xpath("//option", m.xmlDoc)[0].childNodes[0].nodeValue; } - d.cached_options[s] = u, n.addOption(s, u), n.disable(1), n.selectOption(0), n.disable(0); + d.cached_options[s] = v, n.addOption(s, v), n.disable(1), n.selectOption(0), n.disable(0); }) : n.setComboValue(""); } else { for (var _ = [], a = 0; a < d.options.length; a++) { @@ -6999,23 +7016,23 @@ const gn = { active_links: function(e) { return this._hidden_export_form; }, r._get_export_size = function(n, s, _, a, o, l, h) { a = parseInt(a) / 25.4 || 4; - var v = { A5: { x: 148, y: 210 }, A4: { x: 210, y: 297 }, A3: { x: 297, y: 420 }, A2: { x: 420, y: 594 }, A1: { x: 594, y: 841 }, A0: { x: 841, y: 1189 } }, u = t("dhx_cal_data", this).x, f = { y: t("dhx_cal_data", this).y + t("dhx_cal_header", this).y + t("dhx_multi_day", this).y }; - return f.x = n === "full" ? u : Math.floor((s === "landscape" ? v[n].y : v[n].x) * a), h && (f.x *= parseFloat(h.x) || 1, f.y *= parseFloat(h.y) || 1), f; + var m = { A5: { x: 148, y: 210 }, A4: { x: 210, y: 297 }, A3: { x: 297, y: 420 }, A2: { x: 420, y: 594 }, A1: { x: 594, y: 841 }, A0: { x: 841, y: 1189 } }, v = t("dhx_cal_data", this).x, u = { y: t("dhx_cal_data", this).y + t("dhx_cal_header", this).y + t("dhx_multi_day", this).y }; + return u.x = n === "full" ? v : Math.floor((s === "landscape" ? m[n].y : m[n].x) * a), h && (u.x *= parseFloat(h.x) || 1, u.y *= parseFloat(h.y) || 1), u; }, r._export_html = function(n) { var s, _, a, o = (s = void 0, _ = void 0, (a = d()) && (_ = a.scrollable, s = a.smart_rendering), { nav_height: r.xy.nav_height, scroll_width: r.xy.scroll_width, style_width: r._obj.style.width, style_height: r._obj.style.height, timeline_scrollable: _, timeline_smart_rendering: s }), l = r._get_export_size(n.format, n.orientation, n.zoom, n.dpi, n.header, n.footer, n.scales), h = ""; try { - (function(v, u) { - r._obj.style.width = v.x + "px", r._obj.style.height = v.y + "px", r.xy.nav_height = 0, r.xy.scroll_width = 0; - var f = d(); - (u.timeline_scrollable || u.timeline_smart_rendering) && (f.scrollable = !1, f.smart_rendering = !1); + (function(m, v) { + r._obj.style.width = m.x + "px", r._obj.style.height = m.y + "px", r.xy.nav_height = 0, r.xy.scroll_width = 0; + var u = d(); + (v.timeline_scrollable || v.timeline_smart_rendering) && (u.scrollable = !1, u.smart_rendering = !1); })(l, o), r.setCurrentView(), h = r._obj.innerHTML; - } catch (v) { - console.error(v); + } catch (m) { + console.error(m); } finally { - (function(v) { - r.xy.scroll_width = v.scroll_width, r.xy.nav_height = v.nav_height, r._obj.style.width = v.style_width, r._obj.style.height = v.style_height; - var u = d(); - (v.timeline_scrollable || v.timeline_smart_rendering) && (u.scrollable = v.timeline_scrollable, u.smart_rendering = v.timeline_smart_rendering); + (function(m) { + r.xy.scroll_width = m.scroll_width, r.xy.nav_height = m.nav_height, r._obj.style.width = m.style_width, r._obj.style.height = m.style_height; + var v = d(); + (m.timeline_scrollable || m.timeline_smart_rendering) && (v.scrollable = m.timeline_scrollable, v.smart_rendering = m.timeline_smart_rendering); })(o), r.setCurrentView(); } return h; @@ -7184,11 +7201,11 @@ const gn = { active_links: function(e) { var _ = "", a = t.getState().mode, o = !1; if (_ += t.templates.day_date(d), t.date.day_start(new Date(d)).valueOf() != d.valueOf() && (_ += " " + t.templates.hour_scale(d), o = !0), t.date.day_start(new Date(d)).valueOf() != t.date.day_start(new Date(n)).valueOf() && (_ += " - " + t.templates.day_date(n), (o || t.date.day_start(new Date(n)).valueOf() != n.valueOf()) && (_ += " " + t.templates.hour_scale(n))), s) { if (t.matrix && t.matrix[a]) { - const h = t.matrix[a], v = h.y_unit[h.order[s]]; - _ += ", " + t.templates[a + "_scale_label"](v.key, v.label, v); + const h = t.matrix[a], m = h.y_unit[h.order[s]]; + _ += ", " + t.templates[a + "_scale_label"](m.key, m.label, m); } else if (t._props && t._props[a]) { - const h = t._props[a], v = h.options[h.order[s]]; - _ += ", " + t.templates[a + "_scale_text"](v.key, v.label, v); + const h = t._props[a], m = h.options[h.order[s]]; + _ += ", " + t.templates[a + "_scale_text"](m.key, m.label, m); } } for (var l = 0; l < r.length; l++) @@ -7218,26 +7235,26 @@ const gn = { active_links: function(e) { ; if (h == s._trace_x.length) return a; - var v = _[n]; + var m = _[n]; if (!(o < d && l > r)) return a; - var u = this.createElement(); - let f, c; - function p(b, k) { + var v = this.createElement(); + let u, c; + function f(b, k) { k.setDate(1), k.setFullYear(b.getFullYear()), k.setMonth(b.getMonth()), k.setDate(b.getDate()); } if (t.getView().days) { const b = new Date(r); - p(t._min_date, b); + f(t._min_date, b); const k = new Date(d); - p(t._min_date, k), f = t._timeline_getX({ start_date: b }, !1, s), c = t._timeline_getX({ start_date: k }, !1, s); + f(t._min_date, k), u = t._timeline_getX({ start_date: b }, !1, s), c = t._timeline_getX({ start_date: k }, !1, s); } else - f = t._timeline_getX({ start_date: r }, !1, s), c = t._timeline_getX({ start_date: d }, !1, s); - var m = s._section_height[n] - 1 || s.dy - 1, g = 0; - t._isRender("cell") && (g = v.offsetTop, f += s.dx, c += s.dx, v = t.$container.querySelector(".dhx_cal_data")); - var y = Math.max(1, c - f - 1); + u = t._timeline_getX({ start_date: r }, !1, s), c = t._timeline_getX({ start_date: d }, !1, s); + var p = s._section_height[n] - 1 || s.dy - 1, g = 0; + t._isRender("cell") && (g = m.offsetTop, u += s.dx, c += s.dx, m = t.$container.querySelector(".dhx_cal_data")); + var y = Math.max(1, c - u - 1); let x = "left"; - return t.config.rtl && (x = "right"), u.style.cssText = `height:${m}px; ${x}:${f}px; width:${y}px; top:${g}px;`, v && (v.appendChild(u), a.push(u)), a; + return t.config.rtl && (x = "right"), v.style.cssText = `height:${p}px; ${x}:${u}px; width:${y}px; top:${g}px;`, m && (m.appendChild(v), a.push(v)), a; }, renderMonthCell: function(r) { for (var d = t.$container.querySelectorAll(".dhx_month_head"), n = [], s = 0; s < d.length; s++) n.push(d[s].parentNode); @@ -7246,10 +7263,10 @@ const gn = { active_links: function(e) { l = t.date.add(l, 1, "day"); if (_ == -1) return []; - var v = t._colsS[o], u = t._colsS.heights[a], f = this.createElement(); - f.style.top = u + "px", f.style.left = v + "px", f.style.width = t._cols[o] + "px", f.style.height = (t._colsS.heights[a + 1] - u || t._colsS.height) + "px"; - var c = t.$container.querySelector(".dhx_cal_data"), p = c.querySelector(".dhx_cal_month_table"); - return p.nextSibling ? c.insertBefore(f, p.nextSibling) : c.appendChild(f), f; + var m = t._colsS[o], v = t._colsS.heights[a], u = this.createElement(); + u.style.top = v + "px", u.style.left = m + "px", u.style.width = t._cols[o] + "px", u.style.height = (t._colsS.heights[a + 1] - v || t._colsS.height) + "px"; + var c = t.$container.querySelector(".dhx_cal_data"), f = c.querySelector(".dhx_cal_month_table"); + return f.nextSibling ? c.insertBefore(u, f.nextSibling) : c.appendChild(u), u; }, renderMonthMarker: function(r, d) { for (var n = [], s = r; s.valueOf() < d.valueOf(); ) n.push(this.renderMonthCell(s)), s = t.date.add(s, 1, "day"); @@ -7266,11 +7283,11 @@ const gn = { active_links: function(e) { } if (!(a = t.locate_holder(s)) || a.querySelector(".dhx_scale_hour")) return document.createElement("div"); - var v = Math.max(60 * r.getHours() + r.getMinutes(), 60 * o.first_hour), u = Math.min(60 * d.getHours() + d.getMinutes(), 60 * o.last_hour); - if (!u && t.date.day_start(new Date(d)).valueOf() > t.date.day_start(new Date(r)).valueOf() && (u = 60 * o.last_hour), u <= v) + var m = Math.max(60 * r.getHours() + r.getMinutes(), 60 * o.first_hour), v = Math.min(60 * d.getHours() + d.getMinutes(), 60 * o.last_hour); + if (!v && t.date.day_start(new Date(d)).valueOf() > t.date.day_start(new Date(r)).valueOf() && (v = 60 * o.last_hour), v <= m) return []; - var f = this.createElement(), c = t.config.hour_size_px * o.last_hour + 1, p = 36e5; - return f.style.top = Math.round((60 * v * 1e3 - t.config.first_hour * p) * t.config.hour_size_px / p) % c + "px", f.style.lineHeight = f.style.height = Math.max(Math.round(60 * (u - v) * 1e3 * t.config.hour_size_px / p) % c, 1) + "px", f.style.width = "100%", a.appendChild(f), _.push(f), _[0]; + var u = this.createElement(), c = t.config.hour_size_px * o.last_hour + 1, f = 36e5; + return u.style.top = Math.round((60 * m * 1e3 - t.config.first_hour * f) * t.config.hour_size_px / f) % c + "px", u.style.lineHeight = u.style.height = Math.max(Math.round(60 * (v - m) * 1e3 * t.config.hour_size_px / f) % c, 1) + "px", u.style.width = "100%", a.appendChild(u), _.push(u), _[0]; } }; }(e), function(t) { t.$keyboardNavigation.SchedulerNode = function() { @@ -7618,8 +7635,8 @@ const gn = { active_links: function(e) { break; case "down": s = t.date.add(o, a, "minute"); - var v = n ? s : t.date.add(s, a, "minute"); - this.isInVisibleDayTime(v, !1) || n && !this.isInVisibleDayTime(l, !1) || (n ? (h = !0, t.date.date_part(new Date(l)).valueOf() == l.valueOf() && (h = !1), h && (s = this.findVisibleColumn(t.date.add(r.start_date, 1, "day"), 1)), s.setHours(t.config.first_hour), s.setMinutes(0), s = t.date.add(s, a, "minute")) : ((s = this.findVisibleColumn(t.date.add(r.start_date, 1, "day"), 1)).setHours(t.config.first_hour), s.setMinutes(0))), _ = t.date.add(s, a, "minute"); + var m = n ? s : t.date.add(s, a, "minute"); + this.isInVisibleDayTime(m, !1) || n && !this.isInVisibleDayTime(l, !1) || (n ? (h = !0, t.date.date_part(new Date(l)).valueOf() == l.valueOf() && (h = !1), h && (s = this.findVisibleColumn(t.date.add(r.start_date, 1, "day"), 1)), s.setHours(t.config.first_hour), s.setMinutes(0), s = t.date.add(s, a, "minute")) : ((s = this.findVisibleColumn(t.date.add(r.start_date, 1, "day"), 1)).setHours(t.config.first_hour), s.setMinutes(0))), _ = t.date.add(s, a, "minute"); break; case "left": s = this._moveDate(r.start_date, -1), _ = this._moveDate(r.end_date, -1); @@ -7937,61 +7954,61 @@ const gn = { active_links: function(e) { return a === o; }, _.$keyboardNavigation.patchMinicalendar = function() { var a = _.$keyboardNavigation.dispatcher; - function o(u) { - var f = u.target; - a.enable(), a.setActiveNode(new _.$keyboardNavigation.MinicalButton(f, 0)); + function o(v) { + var u = v.target; + a.enable(), a.setActiveNode(new _.$keyboardNavigation.MinicalButton(u, 0)); } - function l(u) { - var f = u.target || u.srcElement, c = _.utils.dom.locateCss(u, "dhx_cal_prev_button", !1), p = _.utils.dom.locateCss(u, "dhx_cal_next_button", !1), m = _.utils.dom.locateCss(u, "dhx_year_body", !1), g = 0, y = 0; - if (m) { - for (var x, b, k = f; k && k.tagName.toLowerCase() != "td"; ) + function l(v) { + var u = v.target || v.srcElement, c = _.utils.dom.locateCss(v, "dhx_cal_prev_button", !1), f = _.utils.dom.locateCss(v, "dhx_cal_next_button", !1), p = _.utils.dom.locateCss(v, "dhx_year_body", !1), g = 0, y = 0; + if (p) { + for (var x, b, k = u; k && k.tagName.toLowerCase() != "td"; ) k = k.parentNode; if (k && (x = (b = k).parentNode), x && b) { - for (var E = x.parentNode.querySelectorAll("tr"), D = 0; D < E.length; D++) - if (E[D] == x) { + for (var w = x.parentNode.querySelectorAll("tr"), D = 0; D < w.length; D++) + if (w[D] == x) { g = D; break; } - var w = x.querySelectorAll("td"); - for (D = 0; D < w.length; D++) - if (w[D] == b) { + var E = x.querySelectorAll("td"); + for (D = 0; D < E.length; D++) + if (E[D] == b) { y = D; break; } } } - var S = u.currentTarget; + var S = v.currentTarget; a.delay(function() { var N; - (c || p || m) && (c ? (N = new _.$keyboardNavigation.MinicalButton(S, 0), a.setActiveNode(new _.$keyboardNavigation.MinicalButton(S, 0))) : p ? N = new _.$keyboardNavigation.MinicalButton(S, 1) : m && (N = new _.$keyboardNavigation.MinicalCell(S, g, y)), N && (a.enable(), N.isValid() && (a.activeNode = null, a.setActiveNode(N)))); + (c || f || p) && (c ? (N = new _.$keyboardNavigation.MinicalButton(S, 0), a.setActiveNode(new _.$keyboardNavigation.MinicalButton(S, 0))) : f ? N = new _.$keyboardNavigation.MinicalButton(S, 1) : p && (N = new _.$keyboardNavigation.MinicalCell(S, g, y)), N && (a.enable(), N.isValid() && (a.activeNode = null, a.setActiveNode(N)))); }); } if (_.renderCalendar) { var h = _.renderCalendar; _.renderCalendar = function() { - var u = h.apply(this, arguments), f = _.$keyboardNavigation._minicalendars; - _.eventRemove(u, "click", l), _.event(u, "click", l), _.eventRemove(u, "focus", o), _.event(u, "focus", o); - for (var c = !1, p = 0; p < f.length; p++) - if (f[p] == u) { + var v = h.apply(this, arguments), u = _.$keyboardNavigation._minicalendars; + _.eventRemove(v, "click", l), _.event(v, "click", l), _.eventRemove(v, "focus", o), _.event(v, "focus", o); + for (var c = !1, f = 0; f < u.length; f++) + if (u[f] == v) { c = !0; break; } - if (c || f.push(u), a.isEnabled()) { - var m = a.getActiveNode(); - m && m.container == u ? a.focusNode(m) : u.setAttribute("tabindex", "0"); + if (c || u.push(v), a.isEnabled()) { + var p = a.getActiveNode(); + p && p.container == v ? a.focusNode(p) : v.setAttribute("tabindex", "0"); } else - u.setAttribute("tabindex", "0"); - return u; + v.setAttribute("tabindex", "0"); + return v; }; } if (_.destroyCalendar) { - var v = _.destroyCalendar; - _.destroyCalendar = function(u, f) { - u = u || (_._def_count ? _._def_count.firstChild : null); - var c = v.apply(this, arguments); - if (!u || !u.parentNode) - for (var p = _.$keyboardNavigation._minicalendars, m = 0; m < p.length; m++) - p[m] == u && (_.eventRemove(p[m], "focus", o), p.splice(m, 1), m--); + var m = _.destroyCalendar; + _.destroyCalendar = function(v, u) { + v = v || (_._def_count ? _._def_count.firstChild : null); + var c = m.apply(this, arguments); + if (!v || !v.parentNode) + for (var f = _.$keyboardNavigation._minicalendars, p = 0; p < f.length; p++) + f[p] == v && (_.eventRemove(f[p], "focus", o), f.splice(p, 1), p--); return c; }; } @@ -8145,10 +8162,10 @@ const gn = { active_links: function(e) { }, e._render_v_bar = function(t, r, d, n, s, _, a, o, l) { var h = t.id; a.indexOf("
'; - return k += '
 
', k += '
' + a + "
", k += '
' + o + "
", k += '
', v.innerHTML = k, v.style.zIndex = 100, v.firstChild; + var m = document.createElement("div"), v = "dhx_cal_event", u = e.templates["event_class_" + t.layer] ? e.templates["event_class_" + t.layer](t.start_date, t.end_date, t) : e.templates.event_class(t.start_date, t.end_date, t); + u && (v = v + " " + u); + var c = e._border_box_events(), f = n - 2, p = c ? f : n - 4, g = c ? f : n - 6, y = c ? f : n - 14, x = c ? f - 2 : n - 8, b = c ? s - this.xy.event_header_height : s - 30 + 1, k = '
'; + return k += '
 
', k += '
' + a + "
", k += '
' + o + "
", k += '
', m.innerHTML = k, m.style.zIndex = 100, m.firstChild; }, e.render_event_bar = function(t) { var r = this._els.dhx_cal_data[0], d = this._colsS[t._sday], n = this._colsS[t._eday]; n == d && (n = this._colsS[t._eday + 1]); @@ -8166,24 +8183,24 @@ const gn = { active_links: function(e) { var h = this._render_v_bar(t.id, r + l, _, o, a, t._text_style, e.templates.event_header(t.start_date, t.end_date, t), e.templates.event_text(t.start_date, t.end_date, t)); if (this._rendered.push(h), d.appendChild(h), l = l + parseInt(d.style.left, 10) + r, _ += this._dy_shift, h.style.zIndex = this._layers_zindex[t.layer], this._edit_id == t.id) { h.style.zIndex = parseInt(h.style.zIndex) + 1; - var v = h.style.zIndex; - o = Math.max(o - 4, e.xy.editor_width), (h = document.createElement("div")).setAttribute("event_id", t.id), h.setAttribute(this.config.event_attribute, t.id), this.set_xy(h, o, a - 20, l, _ + 14), h.className = "dhx_cal_editor", h.style.zIndex = v; - var u = document.createElement("div"); - this.set_xy(u, o - 6, a - 26), u.style.cssText += ";margin:2px 2px 2px 2px;overflow:hidden;", u.style.zIndex = v, h.appendChild(u), this._els.dhx_cal_data[0].appendChild(h), this._rendered.push(h), u.innerHTML = "", this._editor = u.firstChild, this._editor.addEventListener("keypress", function(g) { + var m = h.style.zIndex; + o = Math.max(o - 4, e.xy.editor_width), (h = document.createElement("div")).setAttribute("event_id", t.id), h.setAttribute(this.config.event_attribute, t.id), this.set_xy(h, o, a - 20, l, _ + 14), h.className = "dhx_cal_editor", h.style.zIndex = m; + var v = document.createElement("div"); + this.set_xy(v, o - 6, a - 26), v.style.cssText += ";margin:2px 2px 2px 2px;overflow:hidden;", v.style.zIndex = m, h.appendChild(v), this._els.dhx_cal_data[0].appendChild(h), this._rendered.push(h), v.innerHTML = "", this._editor = v.firstChild, this._editor.addEventListener("keypress", function(g) { if (g.shiftKey) return !0; var y = g.keyCode; y == e.keys.edit_save && e.editStop(!0), y == e.keys.edit_cancel && e.editStop(!1); }), this._editor.addEventListener("selectstart", function(g) { return g.cancelBubble = !0, !0; - }), u.firstChild.focus(), this._els.dhx_cal_data[0].scrollLeft = 0, u.firstChild.select(); + }), v.firstChild.focus(), this._els.dhx_cal_data[0].scrollLeft = 0, v.firstChild.select(); } if (this._select_id == t.id) { h.style.zIndex = parseInt(h.style.zIndex) + 1; - for (var f = this.config["icons_" + (this._edit_id == t.id ? "edit" : "select")], c = "", p = 0; p < f.length; p++) - c += "
"; - var m = this._render_v_bar(t.id, l - r + 1, _, r, 20 * f.length + 26, "", "
", c, !0); - m.style.left = l - r + 1, m.style.zIndex = h.style.zIndex, this._els.dhx_cal_data[0].appendChild(m), this._rendered.push(m); + for (var u = this.config["icons_" + (this._edit_id == t.id ? "edit" : "select")], c = "", f = 0; f < u.length; f++) + c += "
"; + var p = this._render_v_bar(t.id, l - r + 1, _, r, 20 * u.length + 26, "", "
", c, !0); + p.style.left = l - r + 1, p.style.zIndex = h.style.zIndex, this._els.dhx_cal_data[0].appendChild(p), this._rendered.push(p); } } } @@ -8269,14 +8286,14 @@ const gn = { active_links: function(e) { let l = e.getEvent(_); return l && l.event_location != a.event_location && (e._eventLocationChanged = !0), !0; }), e.attachEvent("onEventChanged", (_, a) => { - const { start_date: o, end_date: l } = a, { min_date: h, max_date: v } = e.getState(); - return o.valueOf() < v.valueOf() && l.valueOf() > h.valueOf() && i && (e.config.map_settings.resolve_event_location && a.event_location && !e._latLngUpdate ? n(a, i) : i.updateEventMarker(a)), e._latLngUpdate = !1, !0; + const { start_date: o, end_date: l } = a, { min_date: h, max_date: m } = e.getState(); + return o.valueOf() < m.valueOf() && l.valueOf() > h.valueOf() && i && (e.config.map_settings.resolve_event_location && a.event_location && !e._latLngUpdate ? n(a, i) : i.updateEventMarker(a)), e._latLngUpdate = !1, !0; }), e.attachEvent("onEventIdChange", function(_, a) { let o = e.getEvent(a); i == null || i.removeEventMarker(_), i == null || i.addEventMarker(o); }), e.attachEvent("onEventAdded", (_, a) => { - const { start_date: o, end_date: l } = a, { min_date: h, max_date: v } = e.getState(); - o.valueOf() < v.valueOf() && l.valueOf() > h.valueOf() && i && (e.config.map_settings.resolve_event_location && a.event_location && e._eventLocationChanged ? (n(a, i), e._eventLocationChanged = !1) : (i.addEventMarker(a), i.onEventClick(a))); + const { start_date: o, end_date: l } = a, { min_date: h, max_date: m } = e.getState(); + o.valueOf() < m.valueOf() && l.valueOf() > h.valueOf() && i && (e.config.map_settings.resolve_event_location && a.event_location && e._eventLocationChanged ? (n(a, i), e._eventLocationChanged = !1) : (i.addEventMarker(a), i.onEventClick(a))); }), e.attachEvent("onClick", function(_, a) { const o = e.getEvent(_); return i && o && i.onEventClick(o), !1; @@ -8320,51 +8337,51 @@ const gn = { active_links: function(e) { const _ = e.render_data; function a() { let l = e.get_visible_events(); - l.sort(function(f, c) { - return f.start_date.valueOf() == c.start_date.valueOf() ? f.id > c.id ? 1 : -1 : f.start_date > c.start_date ? 1 : -1; + l.sort(function(u, c) { + return u.start_date.valueOf() == c.start_date.valueOf() ? u.id > c.id ? 1 : -1 : u.start_date > c.start_date ? 1 : -1; }); let h = "
"; - for (let f = 0; f < l.length; f++) { - let c = l[f], p = c.id == e._selected_event_id ? "dhx_map_line highlight" : "dhx_map_line", m = c.color ? "--dhx-scheduler-event-background:" + c.color + ";" : "", g = c.textColor ? "--dhx-scheduler-event-color:" + c.textColor + ";" : "", y = e._waiAria.mapRowAttrString(c), x = e._waiAria.mapDetailsBtnString(); - h += "
" + e.templates.map_time(c.start_date, c.end_date, c) + "
", h += `
+ for (let u = 0; u < l.length; u++) { + let c = l[u], f = c.id == e._selected_event_id ? "dhx_map_line highlight" : "dhx_map_line", p = c.color ? "--dhx-scheduler-event-background:" + c.color + ";" : "", g = c.textColor ? "--dhx-scheduler-event-color:" + c.textColor + ";" : "", y = e._waiAria.mapRowAttrString(c), x = e._waiAria.mapDetailsBtnString(); + h += "
" + e.templates.map_time(c.start_date, c.end_date, c) + "
", h += `
`, h += "
" + e.templates.map_text(c.start_date, c.end_date, c) + "
"; } h += "
", e._els.dhx_cal_data[0].scrollTop = 0, e._els.dhx_cal_data[0].innerHTML = h; - let v = e._els.dhx_cal_data[0].firstChild.childNodes, u = e._getNavDateElement(); - u && (u.innerHTML = e.templates[e._mode + "_date"](e._min_date, e._max_date, e._mode)), e._rendered = []; - for (let f = 0; f < v.length - 2; f++) - e._rendered[f] = v[f]; + let m = e._els.dhx_cal_data[0].firstChild.childNodes, v = e._getNavDateElement(); + v && (v.innerHTML = e.templates[e._mode + "_date"](e._min_date, e._max_date, e._mode)), e._rendered = []; + for (let u = 0; u < m.length - 2; u++) + e._rendered[u] = m[u]; } e.render_data = function(l, h) { if (this._mode != "map") return _.apply(this, arguments); { a(); - let v = e.get_visible_events(); - i && (i.clearEventMarkers(), v.forEach((u) => i == null ? void 0 : i.addEventMarker(u))); + let m = e.get_visible_events(); + i && (i.clearEventMarkers(), m.forEach((v) => i == null ? void 0 : i.addEventMarker(v))); } }, e.map_view = function(l) { - e._els.dhx_cal_data[0].style.width = e.xy.map_date_width + e.xy.map_description_width + 1 + "px", e._min_date = e.config.map_start || e._currentDate(), e._max_date = e.config.map_end || e.date.add(e._currentDate(), 1, "year"), e._table_view = !0, function(f) { - if (f) { + e._els.dhx_cal_data[0].style.width = e.xy.map_date_width + e.xy.map_description_width + 1 + "px", e._min_date = e.config.map_start || e._currentDate(), e._max_date = e.config.map_end || e.date.add(e._currentDate(), 1, "year"), e._table_view = !0, function(u) { + if (u) { const c = e.locale.labels; e._els.dhx_cal_header[0].innerHTML = "
" + c.date + "
" + c.description + "
", e._table_view = !0, e.set_sizes(); } }(l); let h = document.getElementById("mapContainer"); - var v, u; - (function(f) { - let c = document.getElementById(f); + var m, v; + (function(u) { + let c = document.getElementById(u); if (c) { - const p = e.$container.querySelector(".dhx_cal_navline").offsetHeight; - let m = e.$container.querySelector(".dhx_cal_data").offsetHeight + e.$container.querySelector(".dhx_cal_header").offsetHeight; - m < 0 && (m = 0); + const f = e.$container.querySelector(".dhx_cal_navline").offsetHeight; + let p = e.$container.querySelector(".dhx_cal_data").offsetHeight + e.$container.querySelector(".dhx_cal_header").offsetHeight; + p < 0 && (p = 0); let g = e._x - e.xy.map_date_width - e.xy.map_description_width - 1; - g < 0 && (g = 0), c.style.height = m + "px", c.style.width = g + "px", c.style.position = "absolute", c.style.top = p + "px", e.config.rtl ? c.style.marginRight = e.xy.map_date_width + e.xy.map_description_width + 1 + "px" : c.style.marginLeft = e.xy.map_date_width + e.xy.map_description_width + 1 + "px", c.style.marginTop = e.xy.nav_height + 2 + "px"; + g < 0 && (g = 0), c.style.height = p + "px", c.style.width = g + "px", c.style.position = "absolute", c.style.top = f + "px", e.config.rtl ? c.style.marginRight = e.xy.map_date_width + e.xy.map_description_width + 1 + "px" : c.style.marginLeft = e.xy.map_date_width + e.xy.map_description_width + 1 + "px", c.style.marginTop = e.xy.nav_height + 2 + "px"; } - })("mapContainer"), l && h ? (s.style.display = "block", a(), e.config.map_view_provider == e.ext.mapView.currentAdapter ? (i == null || i.destroy(h), d(e), i == null || i.initialize(h, e.config.map_settings)) : (i == null || i.destroy(h), d(e), i == null || i.initialize(h, e.config.map_settings), e.ext.mapView.currentAdapter = e.config.map_view_provider), i && (v = e.config.map_settings, u = i, v.resolve_user_location ? navigator.geolocation && navigator.geolocation.getCurrentPosition(function(f) { - u.setView(f.coords.latitude, f.coords.longitude, v.zoom_after_resolve || v.initial_zoom); - }) : u.setView(v.initial_position.lat, v.initial_position.lng, v.initial_zoom))) : (s.style.display = "none", e._els.dhx_cal_data[0].style.width = "100%", i && h && (i.destroy(h), i = null, e.ext.mapView.currentAdapter = e.config.map_view_provider), t.forEach((f) => e.detachEvent(f)), t = []); + })("mapContainer"), l && h ? (s.style.display = "block", a(), e.config.map_view_provider == e.ext.mapView.currentAdapter ? (i == null || i.destroy(h), d(e), i == null || i.initialize(h, e.config.map_settings)) : (i == null || i.destroy(h), d(e), i == null || i.initialize(h, e.config.map_settings), e.ext.mapView.currentAdapter = e.config.map_view_provider), i && (m = e.config.map_settings, v = i, m.resolve_user_location ? navigator.geolocation && navigator.geolocation.getCurrentPosition(function(u) { + v.setView(u.coords.latitude, u.coords.longitude, m.zoom_after_resolve || m.initial_zoom); + }) : v.setView(m.initial_position.lat, m.initial_position.lng, m.initial_zoom))) : (s.style.display = "none", e._els.dhx_cal_data[0].style.width = "100%", i && h && (i.destroy(h), i = null, e.ext.mapView.currentAdapter = e.config.map_view_provider), t.forEach((u) => e.detachEvent(u)), t = []); }, e.attachEvent("onLocationError", function(l) { return alert("Location can't be found"), google.maps.LatLng(51.47784, -1492e-6); }); @@ -8375,13 +8392,13 @@ const gn = { active_links: function(e) { } }; e._event_resolve_delay = 1500, e.attachEvent("onEventLoading", function(l) { - return l.lat && l.lng && (l.lat = +l.lat, l.lng = +l.lng), e.config.map_settings.resolve_event_location && l.event_location && !l.lat && !l.lng && (e._event_resolve_delay += 1500, function(h, v, u, f) { + return l.lat && l.lng && (l.lat = +l.lat, l.lng = +l.lng), e.config.map_settings.resolve_event_location && l.event_location && !l.lat && !l.lng && (e._event_resolve_delay += 1500, function(h, m, v, u) { setTimeout(function() { if (e.$destroyed) return !0; - let c = h.apply(v, u); - return h = v = u = null, c; - }, f || 1); + let c = h.apply(m, v); + return h = m = v = null, c; + }, u || 1); }(o, this, [l], e._event_resolve_delay)), !0; }); }); @@ -8406,11 +8423,11 @@ const gn = { active_links: function(e) { }).bind(n))); } if (e.config.minicalendar.mark_events) - for (var l = e.date.month_start(s), h = e.date.add(l, 1, "month"), v = this.getEvents(l, h), u = this["filter_" + this._mode], f = {}, c = 0; c < v.length; c++) { - var p = v[c]; - if (!u || u(p.id, p)) { - var m = p.start_date; - for (m.valueOf() < l.valueOf() && (m = l), m = e.date.date_part(new Date(m.valueOf())); m < p.end_date && (f[+m] || (f[+m] = !0, this.markCalendar(n, m, "dhx_year_event")), !((m = this.date.add(m, 1, "day")).valueOf() >= h.valueOf())); ) + for (var l = e.date.month_start(s), h = e.date.add(l, 1, "month"), m = this.getEvents(l, h), v = this["filter_" + this._mode], u = {}, c = 0; c < m.length; c++) { + var f = m[c]; + if (!v || v(f.id, f)) { + var p = f.start_date; + for (p.valueOf() < l.valueOf() && (p = l), p = e.date.date_part(new Date(p.valueOf())); p < f.end_date && (u[+p] || (u[+p] = !0, this.markCalendar(n, p, "dhx_year_event")), !((p = this.date.add(p, 1, "day")).valueOf() >= h.valueOf())); ) ; } } @@ -8450,16 +8467,16 @@ const gn = { active_links: function(e) { this._mode = "calendar"; var o = this._colsS; this._colsS = { height: 0 }; - var l = new Date(this._min_date), h = new Date(this._max_date), v = new Date(e._date), u = s.month_day, f = this._ignores_detected; + var l = new Date(this._min_date), h = new Date(this._max_date), m = new Date(e._date), v = s.month_day, u = this._ignores_detected; this._ignores_detected = 0, s.month_day = s.calendar_date, r = this.date.month_start(r); - var c, p = this._week_template(t.offsetWidth - 1 - this.config.minicalendar.padding); - n ? c = n : (c = document.createElement("div")).className = "dhx_cal_container dhx_mini_calendar", c.setAttribute("date", this._helpers.formatDate(r)), c.innerHTML = "
" : "'>") + "
" + (p ? p.innerHTML : "") + "
"; - var m = c.querySelector(".dhx_year_month"), g = c.querySelector(".dhx_year_week"), y = c.querySelector(".dhx_year_body"); - if (m.innerHTML = this.templates.calendar_month(r), d.navigation) + var c, f = this._week_template(t.offsetWidth - 1 - this.config.minicalendar.padding); + n ? c = n : (c = document.createElement("div")).className = "dhx_cal_container dhx_mini_calendar", c.setAttribute("date", this._helpers.formatDate(r)), c.innerHTML = "
" : "'>") + "
" + (f ? f.innerHTML : "") + "
"; + var p = c.querySelector(".dhx_year_month"), g = c.querySelector(".dhx_year_week"), y = c.querySelector(".dhx_year_body"); + if (p.innerHTML = this.templates.calendar_month(r), d.navigation) for (var x = function(z, W) { var Y = e.date.add(z._date, W, "month"); e.updateCalendar(z, Y), e._date.getMonth() == z._date.getMonth() && e._date.getFullYear() == z._date.getFullYear() && e._markCalendarCurrentDate(z); - }, b = ["dhx_cal_prev_button", "dhx_cal_next_button"], k = ["left:1px;top:4px;position:absolute;", "left:auto; right:1px;top:4px;position:absolute;"], E = [-1, 1], D = function(z) { + }, b = ["dhx_cal_prev_button", "dhx_cal_next_button"], k = ["left:1px;top:4px;position:absolute;", "left:auto; right:1px;top:4px;position:absolute;"], w = [-1, 1], D = function(z) { return function() { if (d.sync) for (var W = e._synced_minicalendars, Y = 0; Y < W.length; Y++) @@ -8467,21 +8484,21 @@ const gn = { active_links: function(e) { else e.config.rtl && (z = -z), x(c, z); }; - }, w = [e.locale.labels.prev, e.locale.labels.next], S = 0; S < 2; S++) { + }, E = [e.locale.labels.prev, e.locale.labels.next], S = 0; S < 2; S++) { var N = document.createElement("div"); - N.className = b[S], e._waiAria.headerButtonsAttributes(N, w[S]), N.style.cssText = k[S], N.innerHTML = this._mini_cal_arrows[S], m.appendChild(N), i.attach(N, "click", D(E[S])); + N.className = b[S], e._waiAria.headerButtonsAttributes(N, E[S]), N.style.cssText = k[S], N.innerHTML = this._mini_cal_arrows[S], p.appendChild(N), i.attach(N, "click", D(w[S])); } c._date = new Date(r), c.week_start = (r.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7; var M = c._min_date = this.date.week_start(r); c._max_date = this.date.add(c._min_date, 6, "week"), this._reset_month_scale(y, r, M, 6), n || t.appendChild(c), g.style.height = g.childNodes[0].offsetHeight - 1 + "px"; - var A = e.uid(); - e._waiAria.minicalHeader(m, A), e._waiAria.minicalGrid(c.querySelector(".dhx_year_grid"), A), e._waiAria.minicalRow(g); - for (var T = g.querySelectorAll(".dhx_scale_bar"), H = 0; H < T.length; H++) - e._waiAria.minicalHeadCell(T[H]); + var T = e.uid(); + e._waiAria.minicalHeader(p, T), e._waiAria.minicalGrid(c.querySelector(".dhx_year_grid"), T), e._waiAria.minicalRow(g); + for (var A = g.querySelectorAll(".dhx_scale_bar"), H = 0; H < A.length; H++) + e._waiAria.minicalHeadCell(A[H]); var $ = y.querySelectorAll(".dhx_cal_month_cell"), j = new Date(M); for (H = 0; H < $.length; H++) e._waiAria.minicalDayCell($[H], new Date(j)), j = e.date.add(j, 1, "day"); - return e._waiAria.minicalHeader(m, A), this._cols = _, this._mode = a, this._colsS = o, this._min_date = l, this._max_date = h, e._date = v, s.month_day = u, this._ignores_detected = f, c; + return e._waiAria.minicalHeader(p, T), this._cols = _, this._mode = a, this._colsS = o, this._min_date = l, this._max_date = h, e._date = m, s.month_day = v, this._ignores_detected = u, c; }, e.destroyCalendar = function(t, r) { !t && this._def_count && this._def_count.firstChild && (r || (/* @__PURE__ */ new Date()).valueOf() - this._def_count._created.valueOf() > 500) && (t = this._def_count.firstChild), t && (i.detachAll(), t.innerHTML = "", t.parentNode && t.parentNode.removeChild(t), this._def_count && (this._def_count.style.top = "-1000px"), t.conf && t.conf._on_xle_handler && e.detachEvent(t.conf._on_xle_handler)); }, e.isCalendarVisible = function() { @@ -8497,10 +8514,10 @@ const gn = { active_links: function(e) { r += "", t._time_values.push(a), n = this.date.add(n, this.config.time_step, "minute"); return "
" + (r += "") + "  –  " + r + "
"; }, set_value: function(t, r, d, n) { - var s, _, a = t.getElementsByTagName("input"), o = t.getElementsByTagName("select"), l = function(m, g, y) { - e.event(m, "click", function() { - e.destroyCalendar(null, !0), e.renderCalendar({ position: m, date: new Date(this._date), navigation: !0, handler: function(x) { - m.value = e.templates.calendar_time(x), m._date = new Date(x), e.destroyCalendar(), e.config.event_duration && e.config.auto_end_date && y === 0 && f(); + var s, _, a = t.getElementsByTagName("input"), o = t.getElementsByTagName("select"), l = function(p, g, y) { + e.event(p, "click", function() { + e.destroyCalendar(null, !0), e.renderCalendar({ position: p, date: new Date(this._date), navigation: !0, handler: function(x) { + p.value = e.templates.calendar_time(x), p._date = new Date(x), e.destroyCalendar(), e.config.event_duration && e.config.auto_end_date && y === 0 && u(); } }); }); }; @@ -8509,38 +8526,39 @@ const gn = { active_links: function(e) { var h = ""; e.config.wide_form || (h = t.previousSibling.innerHTML + h), t.previousSibling.innerHTML = h, t._full_day = !0; } - var v = t.previousSibling.getElementsByTagName("input")[0], u = e.date.time_part(d.start_date) === 0 && e.date.time_part(d.end_date) === 0; - v.checked = u, o[0].disabled = v.checked, o[1].disabled = v.checked, v.$_eventAttached || (v.$_eventAttached = !0, e.event(v, "click", function() { - if (v.checked === !0) { - var m = {}; - e.form_blocks.calendar_time.get_value(t, m), s = e.date.date_part(m.start_date), (+(_ = e.date.date_part(m.end_date)) == +s || +_ >= +s && (d.end_date.getHours() !== 0 || d.end_date.getMinutes() !== 0)) && (_ = e.date.add(_, 1, "day")); - } + var m = t.previousSibling.getElementsByTagName("input")[0], v = e.date.time_part(d.start_date) === 0 && e.date.time_part(d.end_date) === 0; + m.checked = v, o[0].disabled = m.checked, o[1].disabled = m.checked, m.$_eventAttached || (m.$_eventAttached = !0, e.event(m, "click", function() { + if (m.checked === !0) { + var p = {}; + e.form_blocks.calendar_time.get_value(t, p), s = e.date.date_part(p.start_date), (+(_ = e.date.date_part(p.end_date)) == +s || +_ >= +s && (d.end_date.getHours() !== 0 || d.end_date.getMinutes() !== 0)) && (_ = e.date.add(_, 1, "day")); + } else + s = null, _ = null; var g = s || d.start_date, y = _ || d.end_date; - c(a[0], g), c(a[1], y), o[0].value = 60 * g.getHours() + g.getMinutes(), o[1].value = 60 * y.getHours() + y.getMinutes(), o[0].disabled = v.checked, o[1].disabled = v.checked; + c(a[0], g), c(a[1], y), o[0].value = 60 * g.getHours() + g.getMinutes(), o[1].value = 60 * y.getHours() + y.getMinutes(), o[0].disabled = m.checked, o[1].disabled = m.checked; })); } if (e.config.event_duration && e.config.auto_end_date) { - var f = function() { + var u = function() { e.config.auto_end_date && e.config.event_duration && (s = e.date.add(a[0]._date, o[0].value, "minute"), _ = new Date(s.getTime() + 60 * e.config.event_duration * 1e3), a[1].value = e.templates.calendar_time(_), a[1]._date = e.date.date_part(new Date(_)), o[1].value = 60 * _.getHours() + _.getMinutes()); }; - o[0].$_eventAttached || o[0].addEventListener("change", f); + o[0].$_eventAttached || o[0].addEventListener("change", u); } - function c(m, g, y) { - l(m, g, y), m.value = e.templates.calendar_time(g), m._date = e.date.date_part(new Date(g)); + function c(p, g, y) { + l(p, g, y), p.value = e.templates.calendar_time(g), p._date = e.date.date_part(new Date(g)); } - function p(m) { - for (var g = n._time_values, y = 60 * m.getHours() + m.getMinutes(), x = y, b = !1, k = 0; k < g.length; k++) { - var E = g[k]; - if (E === y) { + function f(p) { + for (var g = n._time_values, y = 60 * p.getHours() + p.getMinutes(), x = y, b = !1, k = 0; k < g.length; k++) { + var w = g[k]; + if (w === y) { b = !0; break; } - E < y && (x = E); + w < y && (x = w); } return b || x ? b ? y : x : -1; } c(a[0], d.start_date, 0), c(a[1], d.end_date, 1), l = function() { - }, o[0].value = p(d.start_date), o[1].value = p(d.end_date); + }, o[0].value = f(d.start_date), o[1].value = f(d.end_date); }, get_value: function(t, r) { var d = t.getElementsByTagName("input"), n = t.getElementsByTagName("select"); return r.start_date = e.date.add(d[0]._date, n[0].value, "minute"), r.end_date = e.date.add(d[1]._date, n[1].value, "minute"), r.end_date <= r.start_date && (r.end_date = e.date.add(r.start_date, e.config.time_step, "minute")), { start_date: new Date(r.start_date), end_date: new Date(r.end_date) }; @@ -8589,9 +8607,9 @@ const gn = { active_links: function(e) { }, set_value: function(i, t, r, d) { for (var n = i.getElementsByTagName("input"), s = 0; s < n.length; s++) n[s].checked = !1; - function _(v) { - for (var u = i.getElementsByTagName("input"), f = 0; f < u.length; f++) - u[f].checked = !!v[u[f].value]; + function _(m) { + for (var v = i.getElementsByTagName("input"), u = 0; u < v.length; u++) + v[u].checked = !!m[v[u].value]; } var a = {}; if (r[d.map_to]) { @@ -8605,23 +8623,23 @@ const gn = { active_links: function(e) { var l = document.createElement("div"); l.className = "dhx_loading", l.style.cssText = "position: absolute; top: 40%; left: 40%;", i.appendChild(l); var h = [d.script_url, d.script_url.indexOf("?") == -1 ? "?" : "&", "dhx_crosslink_" + d.map_to + "=" + r.id + "&uid=" + e.uid()].join(""); - e.ajax.get(h, function(v) { - var u = function(f, c) { + e.ajax.get(h, function(m) { + var v = function(u, c) { try { - for (var p = JSON.parse(f.xmlDoc.responseText), m = {}, g = 0; g < p.length; g++) { - var y = p[g]; - m[y.value || y.key || y.id] = !0; + for (var f = JSON.parse(u.xmlDoc.responseText), p = {}, g = 0; g < f.length; g++) { + var y = f[g]; + p[y.value || y.key || y.id] = !0; } - return m; + return p; } catch { return null; } - }(v); - u || (u = function(f, c) { - for (var p = e.ajax.xpath("//data/item", f.xmlDoc), m = {}, g = 0; g < p.length; g++) - m[p[g].getAttribute(c.map_to)] = !0; - return m; - }(v, d)), _(u), i.removeChild(l); + }(m); + v || (v = function(u, c) { + for (var f = e.ajax.xpath("//data/item", u.xmlDoc), p = {}, g = 0; g < f.length; g++) + p[f[g].getAttribute(c.map_to)] = !0; + return p; + }(m, d)), _(v), i.removeChild(l); }); } }, get_value: function(i, t, r) { @@ -8659,15 +8677,15 @@ const gn = { active_links: function(e) { } e.backbone = function(s, _) { _ && (t = _), s.bind("change", function(l, h) { - var v = n(l), u = e._events[v] = l.toJSON(); - u.id = v, e._init_event(u), clearTimeout(i), i = setTimeout(function() { + var m = n(l), v = e._events[m] = l.toJSON(); + v.id = m, e._init_event(v), clearTimeout(i), i = setTimeout(function() { if (e.$destroyed) return !0; e.updateView(); }, 1); }), s.bind("remove", function(l, h) { - var v = n(l); - e._events[v] && e.deleteEvent(v); + var m = n(l); + e._events[m] && e.deleteEvent(m); }); var a = []; function o() { @@ -8676,10 +8694,10 @@ const gn = { active_links: function(e) { a.length && (e.parse(a, "json"), a = []); } s.bind("add", function(l, h) { - var v = n(l); - if (!e._events[v]) { - var u = l.toJSON(); - u.id = v, e._init_event(u), a.push(u), a.length == 1 && setTimeout(o, 1); + var m = n(l); + if (!e._events[m]) { + var v = l.toJSON(); + v.id = m, e._init_event(v), a.push(v), a.length == 1 && setTimeout(o, 1); } }), s.bind("request", function(l) { var h; @@ -8693,13 +8711,13 @@ const gn = { active_links: function(e) { return e._events[l] = h.toJSON(), e._events[l].id = l, !0; }), e.attachEvent("onEventAdded", function(l) { if (!s.get(l)) { - var h = r(e.getEvent(l)), v = new s.model(h), u = n(v); - u != l && this.changeEventId(l, u), s.add(v), s.trigger("scheduler:add", v); + var h = r(e.getEvent(l)), m = new s.model(h), v = n(m); + v != l && this.changeEventId(l, v), s.add(m), s.trigger("scheduler:add", m); } return !0; }), e.attachEvent("onEventChanged", function(l) { - var h = s.get(l), v = r(e.getEvent(l)); - return h.set(v), s.trigger("scheduler:change", h), !0; + var h = s.get(l), m = r(e.getEvent(l)); + return h.set(m), s.trigger("scheduler:change", h), !0; }), e.attachEvent("onEventDeleted", function(l) { var h = s.get(l); return h && (s.trigger("scheduler:remove", h), s.remove(l)), !0; @@ -8710,14 +8728,14 @@ const gn = { active_links: function(e) { var i, t = new dhtmlDragAndDropObject(), r = t.stopDrag; function d(n, s, _, a) { if (!e.checkEvent("onBeforeExternalDragIn") || e.callEvent("onBeforeExternalDragIn", [n, s, _, a, i])) { - var o = e.attachEvent("onEventCreated", function(f) { - e.callEvent("onExternalDragIn", [f, n, i]) || (this._drag_mode = this._drag_id = null, this.deleteEvent(f)); + var o = e.attachEvent("onEventCreated", function(u) { + e.callEvent("onExternalDragIn", [u, n, i]) || (this._drag_mode = this._drag_id = null, this.deleteEvent(u)); }), l = e.getActionData(i), h = { start_date: new Date(l.date) }; if (e.matrix && e.matrix[e._mode]) { - var v = e.matrix[e._mode]; - h[v.y_property] = l.section; - var u = e._locate_cell_timeline(i); - h.start_date = v._trace_x[u.x], h.end_date = e.date.add(h.start_date, v.x_step, v.x_unit); + var m = e.matrix[e._mode]; + h[m.y_property] = l.section; + var v = e._locate_cell_timeline(i); + h.start_date = m._trace_x[v.x], h.end_date = e.date.add(h.start_date, m.x_step, m.x_unit); } e._props && e._props[e._mode] && (h[e._props[e._mode].map_to] = l.section), e.addEventNow(h), e.detachEvent(o); } @@ -8745,22 +8763,22 @@ const gn = { active_links: function(e) { } function s(b, k) { b = parseFloat(b), k = parseFloat(k), isNaN(k) || (b -= k); - var E = a(b); - return b = b - E.width + E.cols * i, isNaN(b) ? "auto" : 100 * b / i; + var w = a(b); + return b = b - w.width + w.cols * i, isNaN(b) ? "auto" : 100 * b / i; } - function _(b, k, E) { - b = parseFloat(b), k = parseFloat(k), !isNaN(k) && E && (b -= k); + function _(b, k, w) { + b = parseFloat(b), k = parseFloat(k), !isNaN(k) && w && (b -= k); var D = a(b); return b = b - D.width + D.cols * i, isNaN(b) ? "auto" : 100 * b / (i - (isNaN(k) ? 0 : k)); } function a(b) { - for (var k = 0, E = e._els.dhx_cal_header[0].childNodes, D = E[1] ? E[1].childNodes : E[0].childNodes, w = 0; w < D.length; w++) { - var S = D[w].style ? D[w] : D[w].parentNode, N = parseFloat(S.style.width); + for (var k = 0, w = e._els.dhx_cal_header[0].childNodes, D = w[1] ? w[1].childNodes : w[0].childNodes, E = 0; E < D.length; E++) { + var S = D[E].style ? D[E] : D[E].parentNode, N = parseFloat(S.style.width); if (!(b > N)) break; b -= N + 1, k += N + 1; } - return { width: k, cols: w }; + return { width: k, cols: E }; } function o(b) { return b = parseFloat(b), isNaN(b) ? "auto" : 100 * b / t; @@ -8769,161 +8787,161 @@ const gn = { active_links: function(e) { return (window.getComputedStyle ? window.getComputedStyle(b, null)[k] : b.currentStyle ? b.currentStyle[k] : null) || ""; } function h(b, k) { - for (var E = parseInt(b.style.left, 10), D = 0; D < e._cols.length; D++) - if ((E -= e._cols[D]) < 0) + for (var w = parseInt(b.style.left, 10), D = 0; D < e._cols.length; D++) + if ((w -= e._cols[D]) < 0) return D; return k; } - function v(b, k) { - for (var E = parseInt(b.style.top, 10), D = 0; D < e._colsS.heights.length; D++) - if (e._colsS.heights[D] > E) + function m(b, k) { + for (var w = parseInt(b.style.top, 10), D = 0; D < e._colsS.heights.length; D++) + if (e._colsS.heights[D] > w) return D; return k; } - function u(b) { + function v(b) { return b ? "" : ""; } - function f(b, k, E, D) { - var w = "<" + b + " profile='" + k + "'"; - return E && (w += " header='" + E + "'"), D && (w += " footer='" + D + "'"), w += ">"; + function u(b, k, w, D) { + var E = "<" + b + " profile='" + k + "'"; + return w && (E += " header='" + w + "'"), D && (E += " footer='" + D + "'"), E += ">"; } function c() { var b = "", k = e._mode; if (e.matrix && e.matrix[e._mode] && (k = e.matrix[e._mode].render == "cell" ? "matrix" : "timeline"), b += "", e._mode == "week_agenda") - for (var E = e._els.dhx_cal_data[0].getElementsByTagName("DIV"), D = 0; D < E.length; D++) - E[D].className == "dhx_wa_scale_bar" && (b += "" + n(E[D].innerHTML) + ""); + for (var w = e._els.dhx_cal_data[0].getElementsByTagName("DIV"), D = 0; D < w.length; D++) + w[D].className == "dhx_wa_scale_bar" && (b += "" + n(w[D].innerHTML) + ""); else if (e._mode == "agenda" || e._mode == "map") - b += "" + n((E = e._els.dhx_cal_header[0].childNodes[0].childNodes)[0].innerHTML) + "" + n(E[1].innerHTML) + ""; + b += "" + n((w = e._els.dhx_cal_header[0].childNodes[0].childNodes)[0].innerHTML) + "" + n(w[1].innerHTML) + ""; else if (e._mode == "year") - for (E = e._els.dhx_cal_data[0].childNodes, D = 0; D < E.length; D++) - b += "", b += m(E[D].querySelector(".dhx_year_week").childNodes), b += p(E[D].querySelector(".dhx_year_body")), b += ""; + for (w = e._els.dhx_cal_data[0].childNodes, D = 0; D < w.length; D++) + b += "", b += p(w[D].querySelector(".dhx_year_week").childNodes), b += f(w[D].querySelector(".dhx_year_body")), b += ""; else { - b += "", b += m(E = e._els.dhx_cal_header[0].childNodes), b += ""; - var w = e._els.dhx_cal_data[0]; + b += "", b += p(w = e._els.dhx_cal_header[0].childNodes), b += ""; + var E = e._els.dhx_cal_data[0]; if (e.matrix && e.matrix[e._mode]) { - for (b += "", D = 0; D < w.firstChild.rows.length; D++) - b += ""; - b += "", t = w.firstChild.rows[0].cells[0].offsetHeight; - } else if (w.firstChild.tagName == "TABLE") - b += p(w); + for (b += "", D = 0; D < E.firstChild.rows.length; D++) + b += ""; + b += "", t = E.firstChild.rows[0].cells[0].offsetHeight; + } else if (E.firstChild.tagName == "TABLE") + b += f(E); else { - for (w = w.childNodes[w.childNodes.length - 1]; w.className.indexOf("dhx_scale_holder") == -1; ) - w = w.previousSibling; - for (w = w.childNodes, b += "", D = 0; D < w.length; D++) + for (E = E.childNodes[E.childNodes.length - 1]; E.className.indexOf("dhx_scale_holder") == -1; ) + E = E.previousSibling; + for (E = E.childNodes, b += "", D = 0; D < E.length; D++) b += ` -"; - b += "", t = w[0].offsetHeight; +"; + b += "", t = E[0].offsetHeight; } } return b += ""; } - function p(b) { - for (var k = "", E = b.querySelectorAll("tr"), D = 0; D < E.length; D++) { - for (var w = [], S = E[D].querySelectorAll("td"), N = 0; N < S.length; N++) - w.push(S[N].querySelector(".dhx_month_head").innerHTML); + function f(b) { + for (var k = "", w = b.querySelectorAll("tr"), D = 0; D < w.length; D++) { + for (var E = [], S = w[D].querySelectorAll("td"), N = 0; N < S.length; N++) + E.push(S[N].querySelector(".dhx_month_head").innerHTML); k += ` -", t = S[0].offsetHeight; +", t = S[0].offsetHeight; } return k; } - function m(b) { - var k, E = ""; + function p(b) { + var k, w = ""; e.matrix && e.matrix[e._mode] && (e.matrix[e._mode].second_scale && (k = b[1].childNodes), b = b[0].childNodes); for (var D = 0; D < b.length; D++) - E += ` + w += ` "; if (i = b[0].offsetWidth, k) { - var w = 0, S = b[0].offsetWidth, N = 1; + var E = 0, S = b[0].offsetWidth, N = 1; for (D = 0; D < k.length; D++) - E += ` -", (w += k[D].offsetWidth) >= S && (S += b[N] ? b[N].offsetWidth : 0, N++), i = k[0].offsetWidth; + w += ` +", (E += k[D].offsetWidth) >= S && (S += b[N] ? b[N].offsetWidth : 0, N++), i = k[0].offsetWidth; } - return E; + return w; } function g(b) { - var k = "", E = e._rendered, D = e.matrix && e.matrix[e._mode]; + var k = "", w = e._rendered, D = e.matrix && e.matrix[e._mode]; if (e._mode == "agenda" || e._mode == "map") - for (var w = 0; w < E.length; w++) - k += ""; + for (var E = 0; E < w.length; E++) + k += ""; else if (e._mode == "week_agenda") - for (w = 0; w < E.length; w++) - k += "" + n(E[w].innerHTML) + ""; + for (E = 0; E < w.length; E++) + k += "" + n(w[E].innerHTML) + ""; else if (e._mode == "year") - for (E = e.get_visible_events(), w = 0; w < E.length; w++) { - var S = E[w].start_date; - for (S.valueOf() < e._min_date.valueOf() && (S = e._min_date); S < E[w].end_date; ) { - var N = S.getMonth() + 12 * (S.getFullYear() - e._min_date.getFullYear()) - e.week_starts._month, M = e.week_starts[N] + S.getDate() - 1, A = b ? l(e._get_year_cell(S), "color") : "", T = b ? l(e._get_year_cell(S), "backgroundColor") : ""; - if (k += "", (S = e.date.add(S, 1, "day")).valueOf() >= e._max_date.valueOf()) + for (w = e.get_visible_events(), E = 0; E < w.length; E++) { + var S = w[E].start_date; + for (S.valueOf() < e._min_date.valueOf() && (S = e._min_date); S < w[E].end_date; ) { + var N = S.getMonth() + 12 * (S.getFullYear() - e._min_date.getFullYear()) - e.week_starts._month, M = e.week_starts[N] + S.getDate() - 1, T = b ? l(e._get_year_cell(S), "color") : "", A = b ? l(e._get_year_cell(S), "backgroundColor") : ""; + if (k += "", (S = e.date.add(S, 1, "day")).valueOf() >= e._max_date.valueOf()) break; } } else if (D && D.render == "cell") - for (E = e._els.dhx_cal_data[0].getElementsByTagName("TD"), w = 0; w < E.length; w++) - A = b ? l(E[w], "color") : "", k += ` -"; + for (w = e._els.dhx_cal_data[0].getElementsByTagName("TD"), E = 0; E < w.length; E++) + T = b ? l(w[E], "color") : "", k += ` +"; else - for (w = 0; w < E.length; w++) { + for (E = 0; E < w.length; E++) { var H, $; if (e.matrix && e.matrix[e._mode]) - H = s(E[w].style.left), $ = s(E[w].offsetWidth) - 1; + H = s(w[E].style.left), $ = s(w[E].offsetWidth) - 1; else { var j = e.config.use_select_menu_space ? 0 : 26; - H = _(E[w].style.left, j, !0), $ = _(E[w].style.width, j) - 1; + H = _(w[E].style.left, j, !0), $ = _(w[E].style.width, j) - 1; } if (!isNaN(1 * $)) { - var z = o(E[w].style.top), W = o(E[w].style.height), Y = E[w].className.split(" ")[0].replace("dhx_cal_", ""); + var z = o(w[E].style.top), W = o(w[E].style.height), Y = w[E].className.split(" ")[0].replace("dhx_cal_", ""); if (Y !== "dhx_tooltip_line") { - var q = e.getEvent(E[w].getAttribute(e.config.event_attribute)); + var q = e.getEvent(w[E].getAttribute(e.config.event_attribute)); if (q) { M = q._sday; var V = q._sweek, ve = q._length || 0; if (e._mode == "month") - W = parseInt(E[w].offsetHeight, 10), z = parseInt(E[w].style.top, 10) - e.xy.month_head_height, M = h(E[w], M), V = v(E[w], V); + W = parseInt(w[E].offsetHeight, 10), z = parseInt(w[E].style.top, 10) - e.xy.month_head_height, M = h(w[E], M), V = m(w[E], V); else if (e.matrix && e.matrix[e._mode]) { - M = 0, V = E[w].parentNode.parentNode.parentNode.rowIndex; + M = 0, V = w[E].parentNode.parentNode.parentNode.rowIndex; var Ne = t; - t = E[w].parentNode.offsetHeight, z = o(E[w].style.top), z -= 0.2 * z, t = Ne; + t = w[E].parentNode.offsetHeight, z = o(w[E].style.top), z -= 0.2 * z, t = Ne; } else { - if (E[w].parentNode == e._els.dhx_cal_data[0]) + if (w[E].parentNode == e._els.dhx_cal_data[0]) continue; var xe = e._els.dhx_cal_data[0].childNodes[0], St = parseFloat(xe.className.indexOf("dhx_scale_holder") != -1 ? xe.style.left : 0); - H += s(E[w].parentNode.style.left, St); + H += s(w[E].parentNode.style.left, St); } k += ` -", Y == "event" ? (k += "
", A = b ? l(E[w].childNodes[2], "color") : "", k += "") : (A = b ? l(E[w], "color") : "", k += ""), k += "
"; +", Y == "event" ? (k += "
", T = b ? l(w[E].childNodes[2], "color") : "", k += "") : (T = b ? l(w[E], "color") : "", k += ""), k += "
"; } } } } return k; } - function y(b, k, E, D, w, S) { + function y(b, k, w, D, E, S) { var N = !1; D == "fullcolor" && (N = !0, D = "color"), D = D || "color"; - var M, A = ""; + var M, T = ""; if (b) { - var T = e._date, H = e._mode; - k = e.date[E + "_start"](k), k = e.date["get_" + E + "_end"] ? e.date["get_" + E + "_end"](k) : e.date.add(k, 1, E), A = f("pages", D, w, S); - for (var $ = new Date(b); +$ < +k; $ = this.date.add($, 1, E)) - this.setCurrentView($, E), A += ((M = "page") ? "<" + M + ">" : "") + c().replace("–", "-") + g(N) + u("page"); - A += u("pages"), this.setCurrentView(T, H); + var A = e._date, H = e._mode; + k = e.date[w + "_start"](k), k = e.date["get_" + w + "_end"] ? e.date["get_" + w + "_end"](k) : e.date.add(k, 1, w), T = u("pages", D, E, S); + for (var $ = new Date(b); +$ < +k; $ = this.date.add($, 1, w)) + this.setCurrentView($, w), T += ((M = "page") ? "<" + M + ">" : "") + c().replace("–", "-") + g(N) + v("page"); + T += v("pages"), this.setCurrentView(A, H); } else - A = f("data", D, w, S) + c().replace("–", "-") + g(N) + u("data"); - return A; - } - function x(b, k, E, D, w, S, N) { - (function(M, A) { - var T = e.uid(), H = document.createElement("div"); - H.style.display = "none", document.body.appendChild(H), H.innerHTML = '
', document.getElementById(T).firstChild.value = encodeURIComponent(M), document.getElementById(T).submit(), H.parentNode.removeChild(H); - })(typeof w == "object" ? function(M) { - for (var A = "", T = 0; T < M.length; T++) - A += M[T].source.getPDFData(M[T].start, M[T].end, M[T].view, M[T].mode, M[T].header, M[T].footer); - return A += "", A; - }(w) : y.apply(this, [b, k, E, w, S, N]), D); - } - e.getPDFData = y, e.toPDF = function(b, k, E, D) { - return x.apply(this, [null, null, null, b, k, E, D]); - }, e.toPDFRange = function(b, k, E, D, w, S, N) { + T = u("data", D, E, S) + c().replace("–", "-") + g(N) + v("data"); + return T; + } + function x(b, k, w, D, E, S, N) { + (function(M, T) { + var A = e.uid(), H = document.createElement("div"); + H.style.display = "none", document.body.appendChild(H), H.innerHTML = '
', document.getElementById(A).firstChild.value = encodeURIComponent(M), document.getElementById(A).submit(), H.parentNode.removeChild(H); + })(typeof E == "object" ? function(M) { + for (var T = "", A = 0; A < M.length; A++) + T += M[A].source.getPDFData(M[A].start, M[A].end, M[A].view, M[A].mode, M[A].header, M[A].footer); + return T += "", T; + }(E) : y.apply(this, [b, k, w, E, S, N]), D); + } + e.getPDFData = y, e.toPDF = function(b, k, w, D) { + return x.apply(this, [null, null, null, b, k, w, D]); + }, e.toPDFRange = function(b, k, w, D, E, S, N) { return typeof b == "string" && (b = e.templates.api_date(b), k = e.templates.api_date(k)), x.apply(this, arguments); }; }, quick_info: function(e) { @@ -9083,10 +9101,10 @@ const gn = { active_links: function(e) { e.form_blocks.recurring && (i = e.form_blocks.recurring.set_value); var t = e.config.buttons_left.slice(), r = e.config.buttons_right.slice(); function d(_, a, o, l) { - for (var h = a.getElementsByTagName(_), v = o.getElementsByTagName(_), u = v.length - 1; u >= 0; u--) - if (o = v[u], l) { - var f = document.createElement("span"); - f.className = "dhx_text_disabled", f.innerHTML = l(h[u]), o.parentNode.insertBefore(f, o), o.parentNode.removeChild(o); + for (var h = a.getElementsByTagName(_), m = o.getElementsByTagName(_), v = m.length - 1; v >= 0; v--) + if (o = m[v], l) { + var u = document.createElement("span"); + u.className = "dhx_text_disabled", u.innerHTML = l(h[v]), o.parentNode.insertBefore(u, o), o.parentNode.removeChild(o); } else o.disabled = !0, a.checked && (o.checked = !0); } @@ -9095,19 +9113,19 @@ const gn = { active_links: function(e) { var a = this.config.lightbox.sections; if (this.config.readonly_active) { for (var o = 0; o < a.length; o++) - a[o].type == "recurring" && this.config.readonly_active && e.form_blocks.recurring && (e.form_blocks.recurring.set_value = function(m, g, y) { - var x = e.$domHelpers.closest(m, ".dhx_wrap_section"), b = "none"; + a[o].type == "recurring" && this.config.readonly_active && e.form_blocks.recurring && (e.form_blocks.recurring.set_value = function(p, g, y) { + var x = e.$domHelpers.closest(p, ".dhx_wrap_section"), b = "none"; x.querySelector(".dhx_cal_lsection").display = b, x.querySelector(".dhx_form_repeat").display = b, x.style.display = b, e.setLightboxSize(); }); var l = ["dhx_delete_btn", "dhx_save_btn"], h = [e.config.buttons_left, e.config.buttons_right]; for (o = 0; o < l.length; o++) - for (var v = l[o], u = 0; u < h.length; u++) { - for (var f = h[u], c = -1, p = 0; p < f.length; p++) - if (f[p] == v) { - c = p; + for (var m = l[o], v = 0; v < h.length; v++) { + for (var u = h[v], c = -1, f = 0; f < u.length; f++) + if (u[f] == m) { + c = f; break; } - c != -1 && f.splice(c, 1); + c != -1 && u.splice(c, 1); } } return this.resetLightbox(), !0; @@ -9139,106 +9157,109 @@ const gn = { active_links: function(e) { function t(u) { return !!u.rrule && !u.recurring_event_id; } - var r; - function d() { + function r(u) { + return new Date(Date.UTC(u.getFullYear(), u.getMonth(), u.getDate(), u.getHours(), u.getMinutes(), u.getSeconds())); + } + var d; + function n() { const u = {}; - for (const f in e._events) { - const c = e._events[f]; - c.recurring_event_id && (u[c.recurring_event_id] || (u[c.recurring_event_id] = {}), u[c.recurring_event_id][c.original_start.valueOf()] = c); + for (const c in e._events) { + const f = e._events[c]; + f.recurring_event_id && (u[f.recurring_event_id] || (u[f.recurring_event_id] = {}), u[f.recurring_event_id][f.original_start.valueOf()] = f); } return u; } - e._rec_temp = [], e._rec_markers_pull = {}, e._rec_markers = {}, e._add_rec_marker = function(u, f) { - u._pid_time = f, this._rec_markers[u.id] = u, this._rec_markers_pull[u.event_pid] || (this._rec_markers_pull[u.event_pid] = {}), this._rec_markers_pull[u.event_pid][f] = u; - }, e._get_rec_marker = function(u, f) { - let c = this._rec_markers_pull[f]; - return c ? c[u] : null; + e._rec_temp = [], e._rec_markers_pull = {}, e._rec_markers = {}, e._add_rec_marker = function(u, c) { + u._pid_time = c, this._rec_markers[u.id] = u, this._rec_markers_pull[u.event_pid] || (this._rec_markers_pull[u.event_pid] = {}), this._rec_markers_pull[u.event_pid][c] = u; + }, e._get_rec_marker = function(u, c) { + let f = this._rec_markers_pull[c]; + return f ? f[u] : null; }, e._get_rec_markers = function(u) { return this._rec_markers_pull[u] || []; - }, r = e.addEvent, e.addEvent = function(u, f, c, p, m) { - var g = r.apply(this, arguments); - if (g && e.getEvent(g)) { - var y = e.getEvent(g); - y.start_date && (y.start_date = i(y.start_date)), y.end_date && (y.end_date = i(y.end_date)); + }, d = e.addEvent, e.addEvent = function(u, c, f, p, g) { + var y = d.apply(this, arguments); + if (y && e.getEvent(y)) { + var x = e.getEvent(y); + x.start_date && (x.start_date = i(x.start_date)), x.end_date && (x.end_date = i(x.end_date)); } - return g; + return y; }, e.attachEvent("onEventLoading", function(u) { return u.original_start && (u.original_start = e.templates.parse_date(u.original_start)), !0; - }), e.attachEvent("onEventIdChange", function(u, f) { + }), e.attachEvent("onEventIdChange", function(u, c) { if (!this._ignore_call) { - this._ignore_call = !0, e._rec_markers[u] && (e._rec_markers[f] = e._rec_markers[u], delete e._rec_markers[u]), e._rec_markers_pull[u] && (e._rec_markers_pull[f] = e._rec_markers_pull[u], delete e._rec_markers_pull[u]); - for (var c = 0; c < this._rec_temp.length; c++) - (p = this._rec_temp[c]).recurring_event_id == u && (p.recurring_event_id = f, this.changeEventId(p.id, f + "#" + p.id.split("#")[1])); - for (var c in this._rec_markers) { + this._ignore_call = !0, e._rec_markers[u] && (e._rec_markers[c] = e._rec_markers[u], delete e._rec_markers[u]), e._rec_markers_pull[u] && (e._rec_markers_pull[c] = e._rec_markers_pull[u], delete e._rec_markers_pull[u]); + for (var f = 0; f < this._rec_temp.length; f++) + (p = this._rec_temp[f]).recurring_event_id == u && (p.recurring_event_id = c, this.changeEventId(p.id, c + "#" + p.id.split("#")[1])); + for (var f in this._rec_markers) { var p; - (p = this._rec_markers[c]).recurring_event_id == u && (p.recurring_event_id = f, p._pid_changed = !0); + (p = this._rec_markers[f]).recurring_event_id == u && (p.recurring_event_id = c, p._pid_changed = !0); } - var m = e._rec_markers[f]; - m && m._pid_changed && (delete m._pid_changed, setTimeout(function() { + var g = e._rec_markers[c]; + g && g._pid_changed && (delete g._pid_changed, setTimeout(function() { if (e.$destroyed) return !0; - e.callEvent("onEventChanged", [f, e.getEvent(f)]); + e.callEvent("onEventChanged", [c, e.getEvent(c)]); }, 1)), delete this._ignore_call; } }), e.attachEvent("onConfirmedBeforeEventDelete", function(u) { - var f = this.getEvent(u); - if (this._is_virtual_event(u) || this._is_modified_occurence(f) && !function(m) { - return !!m.deleted; - }(f)) - (function(m, g) { - m = m.split("#"); - let y = e.uid(), x = m[1] ? m[1] : g._pid_time, b = e._copy_event(g); - b.id = y, b.recurring_event_id = g.recurring_event_id || m[0], b.original_start = new Date(Number(x)), b.deleted = !0, e.addEvent(b); - })(u, f); + var c = this.getEvent(u); + if (this._is_virtual_event(u) || this._is_modified_occurence(c) && !function(g) { + return !!g.deleted; + }(c)) + (function(g, y) { + g = g.split("#"); + let x = e.uid(), b = g[1] ? g[1] : y._pid_time, k = e._copy_event(y); + k.id = x, k.recurring_event_id = y.recurring_event_id || g[0], k.original_start = new Date(Number(b)), k.deleted = !0, e.addEvent(k); + })(u, c); else { - t(f) && this._lightbox_id && this._roll_back_dates(f); - var c = this._get_rec_markers(u); - for (var p in c) - c.hasOwnProperty(p) && (u = c[p].id, this.getEvent(u) && this.deleteEvent(u, !0)); + t(c) && this._lightbox_id && this._roll_back_dates(c); + var f = this._get_rec_markers(u); + for (var p in f) + f.hasOwnProperty(p) && (u = f[p].id, this.getEvent(u) && this.deleteEvent(u, !0)); } return !0; - }), e.attachEvent("onEventDeleted", function(u, f) { - !this._is_virtual_event(u) && this._is_modified_occurence(f) && (e._events[u] || (f.deleted = !0, this.setEvent(u, f))); - }), e.attachEvent("onEventChanged", function(u, f) { + }), e.attachEvent("onEventDeleted", function(u, c) { + !this._is_virtual_event(u) && this._is_modified_occurence(c) && (e._events[u] || (c.deleted = !0, this.setEvent(u, c))); + }), e.attachEvent("onEventChanged", function(u, c) { if (this._loading) return !0; - var c = this.getEvent(u); + var f = this.getEvent(u); if (this._is_virtual_event(u)) - (function(x) { - let b = x.id.split("#"), k = e.uid(); + (function(b) { + let k = b.id.split("#"), w = e.uid(); e._not_render = !0; - let E = e._copy_event(x); - E.id = k, E.recurring_event_id = b[0]; - let D = b[1]; - E.original_start = new Date(Number(D)), e._add_rec_marker(E, D), e.addEvent(E), e._not_render = !1; - })(c); + let D = e._copy_event(b); + D.id = w, D.recurring_event_id = k[0]; + let E = k[1]; + D.original_start = new Date(Number(E)), e._add_rec_marker(D, E), e.addEvent(D), e._not_render = !1; + })(f); else { - c.start_date && (c.start_date = i(c.start_date)), c.end_date && (c.end_date = i(c.end_date)), t(c) && this._lightbox_id && this._roll_back_dates(c); + f.start_date && (f.start_date = i(f.start_date)), f.end_date && (f.end_date = i(f.end_date)), t(f) && this._lightbox_id && this._roll_back_dates(f); var p = this._get_rec_markers(u); - for (var m in p) - p.hasOwnProperty(m) && (delete this._rec_markers[p[m].id], this.deleteEvent(p[m].id, !0)); + for (var g in p) + p.hasOwnProperty(g) && (delete this._rec_markers[p[g].id], this.deleteEvent(p[g].id, !0)); delete this._rec_markers_pull[u]; - for (var g = !1, y = 0; y < this._rendered.length; y++) - this._rendered[y].getAttribute(this.config.event_attribute) == u && (g = !0); - g || (this._select_id = null); + for (var y = !1, x = 0; x < this._rendered.length; x++) + this._rendered[x].getAttribute(this.config.event_attribute) == u && (y = !0); + y || (this._select_id = null); } return !0; }), e.attachEvent("onEventAdded", function(u) { if (!this._loading) { - var f = this.getEvent(u); - t(f) && this._roll_back_dates(f); + var c = this.getEvent(u); + t(c) && this._roll_back_dates(c); } return !0; - }), e.attachEvent("onEventSave", function(u, f, c) { + }), e.attachEvent("onEventSave", function(u, c, f) { return t(this.getEvent(u)) && (this._select_id = null), !0; }), e.attachEvent("onEventCreated", function(u) { - var f = this.getEvent(u); - return t(f) || function(c) { - c.rrule = "", c.original_start = null, c.recurring_event_id = null, c.duration = null, c.deleted = null; - }(f), !0; + var c = this.getEvent(u); + return t(c) || function(f) { + f.rrule = "", f.original_start = null, f.recurring_event_id = null, f.duration = null, f.deleted = null; + }(c), !0; }), e.attachEvent("onEventCancel", function(u) { - var f = this.getEvent(u); - t(f) && (this._roll_back_dates(f), this.render_view_data()); + var c = this.getEvent(u); + t(c) && (this._roll_back_dates(c), this.render_view_data()); }), e._roll_back_dates = function(u) { u.start_date && (u.start_date = i(u.start_date)), u.end_date && (u.end_date = i(u.end_date)), u.duration = Math.round((u.end_date.valueOf() - u.start_date.valueOf()) / 1e3), u.end_date = u._end_date, u._start_date && (u.start_date.setMonth(0), u.start_date.setDate(u._start_date.getDate()), u.start_date.setMonth(u._start_date.getMonth()), u.start_date.setFullYear(u._start_date.getFullYear())); }, e._is_virtual_event = function(u) { @@ -9246,131 +9267,132 @@ const gn = { active_links: function(e) { }, e._is_modified_occurence = function(u) { return u.recurring_event_id && u.recurring_event_id != "0"; }, e.showLightbox_rec = e.showLightbox, e.showLightbox = function(u) { - var f = this.locale, c = e.config.lightbox_recurring, p = this.getEvent(u), m = p.recurring_event_id, g = this._is_virtual_event(u); - g && (m = u.split("#")[0]); - var y = function(b) { - var k = e.getEvent(b); - return k._end_date = k.end_date, k.end_date = new Date(k.start_date.valueOf() + 1e3 * k.duration), e.showLightbox_rec(b); + var c = this.locale, f = e.config.lightbox_recurring, p = this.getEvent(u), g = p.recurring_event_id, y = this._is_virtual_event(u); + y && (g = u.split("#")[0]); + var x = function(k) { + var w = e.getEvent(k); + return w._end_date = w.end_date, w.end_date = new Date(w.start_date.valueOf() + 1e3 * w.duration), e.showLightbox_rec(k); }; - if ((m || 1 * m == 0) && t(p)) - return y(u); - if (!m || m === "0" || !f.labels.confirm_recurring || c == "instance" || c == "series" && !g) + if ((g || 1 * g == 0) && t(p)) + return x(u); + if (!g || g === "0" || !c.labels.confirm_recurring || f == "instance" || f == "series" && !y) return this.showLightbox_rec(u); - if (c == "ask") { - var x = this; - e.modalbox({ text: f.labels.confirm_recurring, title: f.labels.title_confirm_recurring, width: "500px", position: "middle", buttons: [f.labels.button_edit_series, f.labels.button_edit_occurrence, f.labels.icon_cancel], callback: function(b) { - switch (+b) { + if (f == "ask") { + var b = this; + e.modalbox({ text: c.labels.confirm_recurring, title: c.labels.title_confirm_recurring, width: "500px", position: "middle", buttons: [c.labels.button_edit_series, c.labels.button_edit_occurrence, c.labels.icon_cancel], callback: function(k) { + switch (+k) { case 0: - return y(m); + return x(g); case 1: - return x.showLightbox_rec(u); + return b.showLightbox_rec(u); case 2: return; } } }); } else - y(m); + x(g); }, e.get_visible_events_rec = e.get_visible_events, e.get_visible_events = function(u) { - for (var f = 0; f < this._rec_temp.length; f++) - delete this._events[this._rec_temp[f].id]; + for (var c = 0; c < this._rec_temp.length; c++) + delete this._events[this._rec_temp[c].id]; this._rec_temp = []; - const c = d(); - var p = this.get_visible_events_rec(u), m = []; - for (f = 0; f < p.length; f++) - p[f].deleted || p[f].recurring_event_id || (t(p[f]) ? this.repeat_date(p[f], m, void 0, void 0, void 0, void 0, c) : m.push(p[f])); - return m; + const f = n(); + var p = this.get_visible_events_rec(u), g = []; + for (c = 0; c < p.length; c++) + p[c].deleted || p[c].recurring_event_id || (t(p[c]) ? this.repeat_date(p[c], g, void 0, void 0, void 0, void 0, f) : g.push(p[c])); + return g; }, function() { var u = e.isOneDayEvent; - e.isOneDayEvent = function(c) { - return !!t(c) || u.call(this, c); + e.isOneDayEvent = function(f) { + return !!t(f) || u.call(this, f); }; - var f = e.updateEvent; - e.updateEvent = function(c) { - var p = e.getEvent(c); - p && t(p) && !this._is_virtual_event(c) ? e.update_view() : f.call(this, c); + var c = e.updateEvent; + e.updateEvent = function(f) { + var p = e.getEvent(f); + p && t(p) && !this._is_virtual_event(f) ? e.update_view() : c.call(this, f); }; }(); - const n = e.date.date_to_str("%Y%m%dT%H%i%s"); - function s(u) { - const f = u.getDay(), c = u.getDate(); - return { dayOfWeek: f, dayNumber: Math.ceil(c / 7) }; + const s = e.date.date_to_str("%Y%m%dT%H%i%s"); + function _(u) { + const c = u.getDay(), f = u.getDate(); + return { dayOfWeek: c, dayNumber: Math.ceil(f / 7) }; } - e.repeat_date = function(u, f, c, p, m, g, y) { + e.repeat_date = function(u, c, f, p, g, y, x) { if (!u.rrule) return; - let x = y ? y[u.id] : d()[u.id]; - x || (x = {}), p || (p = e._min_date), m || (m = e._max_date); - const b = new Date(Date.UTC(u.start_date.getFullYear(), u.start_date.getMonth(), u.start_date.getDate(), u.start_date.getHours(), u.start_date.getMinutes(), u.start_date.getSeconds())); - let k; - k = Se(g ? `RRULE:${u.rrule};UNTIL=${n(u.end_date)};COUNT=${g}` : `RRULE:${u.rrule};UNTIL=${n(u.end_date)}`, { dtstart: b }); - const E = new Date(Date.UTC(m.getFullYear(), m.getMonth(), m.getDate(), m.getHours(), m.getMinutes(), m.getSeconds())), D = k.between(p, E).map((N) => { - const M = new Date(N); + let b = x ? x[u.id] : n()[u.id]; + b || (b = {}), p = r(p || new Date(e._min_date.valueOf() - 1e3)), g = r(g || new Date(e._max_date.valueOf() - 1e3)); + const k = r(u.start_date); + let w; + w = Se(y ? `RRULE:${u.rrule};UNTIL=${s(u.end_date)};COUNT=${y}` : `RRULE:${u.rrule};UNTIL=${s(u.end_date)}`, { dtstart: k }); + const D = w.between(p, g, !0).map((N) => { + const M = (T = N, new Date(T.getUTCFullYear(), T.getUTCMonth(), T.getUTCDate(), T.getUTCHours(), T.getUTCMinutes(), T.getUTCSeconds())); + var T; return M.setHours(u.start_date.getHours()), M.setMinutes(u.start_date.getMinutes()), M.setSeconds(u.start_date.getSeconds()), M; }); - let w = 0; + let E = 0; const S = u.duration; - for (let N = 0; N < D.length && !(g && w >= g); N++) { + for (let N = 0; N < D.length && !(y && E >= y); N++) { const M = D[N]; - let A = x[M.valueOf()]; - if (A) { - if (A.deleted) + let T = b[M.valueOf()]; + if (T) { + if (T.deleted) continue; - w++, f.push(A); + E++, c.push(T); } else { - const T = e._copy_event(u); - if (T.text = u.text, T.start_date = M, T.id = u.id + "#" + Math.ceil(M.valueOf()), T.end_date = new Date(M.valueOf() + 1e3 * S), T.end_date = e._fix_daylight_saving_date(T.start_date, T.end_date, u, M, T.end_date), T._timed = e.isOneDayEvent(T), !T._timed && !e._table_view && !e.config.multi_day) + const A = e._copy_event(u); + if (A.text = u.text, A.start_date = M, A.id = u.id + "#" + Math.ceil(M.valueOf()), A.end_date = new Date(M.valueOf() + 1e3 * S), A.end_date = e._fix_daylight_saving_date(A.start_date, A.end_date, u, M, A.end_date), A._timed = e.isOneDayEvent(A), !A._timed && !e._table_view && !e.config.multi_day) continue; - f.push(T), c || (e._events[T.id] = T, e._rec_temp.push(T)), w++; + c.push(A), f || (e._events[A.id] = A, e._rec_temp.push(A)), E++; } } - if (x && D.length == 0) - for (let N in x) { - let M = x[N]; + if (b && D.length == 0) + for (let N in b) { + let M = b[N]; if (M) { if (M.deleted) continue; - p && m && M.start_date < m && M.end_date > p && f.push(M); + p && g && M.start_date < g && M.end_date > p && c.push(M); } } - }, e._fix_daylight_saving_date = function(u, f, c, p, m) { - var g = u.getTimezoneOffset() - f.getTimezoneOffset(); - return g ? g > 0 ? new Date(p.valueOf() + 1e3 * c.duration - 60 * g * 1e3) : new Date(f.valueOf() - 60 * g * 1e3) : new Date(m.valueOf()); - }, e.getRecDates = function(u, f) { - var c = typeof u == "object" ? u : e.getEvent(u), p = []; - if (f = f || 100, !t(c)) - return [{ start_date: c.start_date, end_date: c.end_date }]; - if (c.deleted) + }, e._fix_daylight_saving_date = function(u, c, f, p, g) { + var y = u.getTimezoneOffset() - c.getTimezoneOffset(); + return y ? y > 0 ? new Date(p.valueOf() + 1e3 * f.duration - 60 * y * 1e3) : new Date(c.valueOf() - 60 * y * 1e3) : new Date(g.valueOf()); + }, e.getRecDates = function(u, c) { + var f = typeof u == "object" ? u : e.getEvent(u), p = []; + if (c = c || 100, !t(f)) + return [{ start_date: f.start_date, end_date: f.end_date }]; + if (f.deleted) return []; - e.repeat_date(c, p, !0, c.start_date, c.end_date, f); - for (var m = [], g = 0; g < p.length; g++) - p[g].deleted || m.push({ start_date: p[g].start_date, end_date: p[g].end_date }); - return m; - }, e.getEvents = function(u, f) { - var c = []; - const p = d(); - for (var m in this._events) { - var g = this._events[m]; - if (!g.recurring_event_id) - if (u && f && g.start_date < f && g.end_date > u) - if (t(g)) { - var y = []; - this.repeat_date(g, y, !0, u, f, void 0, p), y.forEach(function(x) { - x.start_date < f && x.end_date > u && c.push(x); + e.repeat_date(f, p, !0, f.start_date, f.end_date, c); + for (var g = [], y = 0; y < p.length; y++) + p[y].deleted || g.push({ start_date: p[y].start_date, end_date: p[y].end_date }); + return g; + }, e.getEvents = function(u, c) { + var f = []; + const p = n(); + for (var g in this._events) { + var y = this._events[g]; + if (!y.recurring_event_id) + if (u && c && y.start_date < c && y.end_date > u) + if (t(y)) { + var x = []; + this.repeat_date(y, x, !0, u, c, void 0, p), x.forEach(function(b) { + b.start_date < c && b.end_date > u && f.push(b); }); } else - this._is_virtual_event(g.id) || c.push(g); + this._is_virtual_event(y.id) || f.push(y); else - u || f || this._is_virtual_event(g.id) || c.push(g); + u || c || this._is_virtual_event(y.id) || f.push(y); } - return c; + return f; }, e._copy_dummy = function(u) { - var f = new Date(this.start_date), c = new Date(this.end_date); - this.start_date = f, this.end_date = c, this.duration = this.rrule = null; + var c = new Date(this.start_date), f = new Date(this.end_date); + this.start_date = c, this.end_date = f, this.duration = this.rrule = null; }, e.config.include_end_by = !1, e.config.lightbox_recurring = "ask", e.config.recurring_workdays = [C.MO.weekday, C.TU.weekday, C.WE.weekday, C.TH.weekday, C.FR.weekday], e.config.repeat_date = "%m.%d.%Y", e.config.lightbox.sections = [{ name: "description", map_to: "text", type: "textarea", focus: !0 }, { name: "recurring", type: "recurring", map_to: "rec_type" }, { name: "time", height: 72, type: "time", map_to: "auto" }], e.attachEvent("onClearAll", function() { e._rec_markers = {}, e._rec_markers_pull = {}, e._rec_temp = []; }); - const _ = { 0: "SU", 1: "MO", 2: "TU", 3: "WE", 4: "TH", 5: "FR", 6: "SA" }, a = { 0: 1, 1: 2, 2: 3, 3: 4, 4: 5, 5: 6, 6: 0 }; - function o(u) { + const a = { 0: "SU", 1: "MO", 2: "TU", 3: "WE", 4: "TH", 5: "FR", 6: "SA" }, o = { 0: 1, 1: 2, 2: 3, 3: 4, 4: 5, 5: 6, 6: 0 }; + function l(u) { switch (u) { case 1: case 31: @@ -9383,41 +9405,41 @@ const gn = { active_links: function(e) { return `${u}th`; } } - e.templates.repeat_monthly_date = function(u, f) { - return `Every ${o(u.getDate())}`; - }, e.templates.repeat_monthly_weekday = function(u, f) { - const c = s(u); - return `Every ${o(c.dayNumber)} ${e.locale.date.day_full[c.dayOfWeek]}`; - }, e.templates.repeat_yearly_month_date = function(u, f) { - const c = u.getDate(), p = e.locale.date.month_full[u.getMonth()]; - return `Every ${o(c)} day of ${p}`; - }, e.templates.repeat_yearly_month_weekday = function(u, f) { - const c = s(u), p = e.locale.date.month_full[u.getMonth()]; - return `Every ${o(c.dayNumber)} ${e.locale.date.day_full[c.dayOfWeek]} of ${p}`; + e.templates.repeat_monthly_date = function(u, c) { + return `Every ${l(u.getDate())}`; + }, e.templates.repeat_monthly_weekday = function(u, c) { + const f = _(u); + return `Every ${l(f.dayNumber)} ${e.locale.date.day_full[f.dayOfWeek]}`; + }, e.templates.repeat_yearly_month_date = function(u, c) { + const f = u.getDate(), p = e.locale.date.month_full[u.getMonth()]; + return `Every ${l(f)} day of ${p}`; + }, e.templates.repeat_yearly_month_weekday = function(u, c) { + const f = _(u), p = e.locale.date.month_full[u.getMonth()]; + return `Every ${l(f.dayNumber)} ${e.locale.date.day_full[f.dayOfWeek]} of ${p}`; }; - const l = { MONTHLY: function(u) { + const h = { MONTHLY: function(u) { return { rrule: { freq: C.MONTHLY, interval: 1, bymonthday: u.start.getDate() }, until: new Date(9999, 1, 1) }; }, WEEKLY: function(u) { - let f = u.start.getDay() - 1; - return f == -1 && (f = 6), { rrule: { freq: C.WEEKLY, interval: 1, byweekday: [f] }, until: new Date(9999, 1, 1) }; + let c = u.start.getDay() - 1; + return c == -1 && (c = 6), { rrule: { freq: C.WEEKLY, interval: 1, byweekday: [c] }, until: new Date(9999, 1, 1) }; }, DAILY: function(u) { return { rrule: { freq: C.DAILY, interval: 1 }, until: new Date(9999, 1, 1) }; }, YEARLY: function(u) { return { rrule: { freq: C.YEARLY, bymonth: u.start.getMonth() + 1, interval: 1, bymonthday: u.start.getDate() }, until: new Date(9999, 1, 1) }; }, WORKDAYS: function(u) { return { rrule: { freq: C.WEEKLY, interval: 1, byweekday: e.config.recurring_workdays }, until: new Date(9999, 1, 1) }; - }, CUSTOM: function(u, f) { - const c = {}, p = f.querySelector('[name="repeat_interval_unit"]').value, m = Math.max(1, f.querySelector('[name="repeat_interval_value"]').value), g = f.querySelector('[name="dhx_custom_month_option"]').value, y = f.querySelector('[name="dhx_custom_year_option"]').value; - let x, b; - switch (c.interval = m, p) { + }, CUSTOM: function(u, c) { + const f = {}, p = c.querySelector('[name="repeat_interval_unit"]').value, g = Math.max(1, c.querySelector('[name="repeat_interval_value"]').value), y = c.querySelector('[name="dhx_custom_month_option"]').value, x = c.querySelector('[name="dhx_custom_year_option"]').value; + let b, k; + switch (f.interval = g, p) { case "DAILY": - c.freq = C.DAILY; + f.freq = C.DAILY; break; case "WEEKLY": - c.freq = C.WEEKLY, x = [], f.querySelectorAll('.dhx_form_repeat_custom_week [name="week_day"]').forEach((w) => { - w.checked && x.push(w.value); - }), c.byweekday = x.map((w) => { - switch (w) { + f.freq = C.WEEKLY, b = [], c.querySelectorAll('.dhx_form_repeat_custom_week [name="week_day"]').forEach((S) => { + S.checked && b.push(S.value); + }), f.byweekday = b.map((S) => { + switch (S) { case "MO": return C.MO.weekday; case "TU": @@ -9436,90 +9458,90 @@ const gn = { active_links: function(e) { }); break; case "MONTHLY": - c.freq = C.MONTHLY, g === "month_date" ? c.bymonthday = u.start.getDate() : (b = u.start.getDay() - 1, b == -1 && (b = 6), c.byweekday = [b], c.bysetpos = s(u.start).dayNumber); + f.freq = C.MONTHLY, y === "month_date" ? f.bymonthday = u.start.getDate() : (k = u.start.getDay() - 1, k == -1 && (k = 6), f.byweekday = [k], f.bysetpos = _(u.start).dayNumber); break; case "YEARLY": - c.freq = C.YEARLY, c.bymonth = u.start.getMonth() + 1, y == "month_date" ? c.bymonthday = u.start.getDate() : (b = u.start.getDay() - 1, b == -1 && (b = 6), c.byweekday = [b], c.bysetpos = s(u.start).dayNumber); + f.freq = C.YEARLY, f.bymonth = u.start.getMonth() + 1, x == "month_date" ? f.bymonthday = u.start.getDate() : (k = u.start.getDay() - 1, k == -1 && (k = 6), f.byweekday = [k], f.bysetpos = _(u.start).dayNumber); } - const k = e.date.str_to_date("%Y-%m-%d"); - let E = new Date(9999, 1, 1); - const D = f.querySelector('[name="dhx_custom_repeat_ends"]'); - return D.value === "ON" ? E = k(f.querySelector('[name="dhx_form_repeat_ends_ondate"]').value) : D.value === "AFTER" && (c.count = Math.max(1, f.querySelector('[name="dhx_form_repeat_ends_after"]').value)), { rrule: c, until: E }; + const w = e.date.str_to_date("%Y-%m-%d"); + let D = new Date(9999, 1, 1); + const E = c.querySelector('[name="dhx_custom_repeat_ends"]'); + return E.value === "ON" ? D = w(c.querySelector('[name="dhx_form_repeat_ends_ondate"]').value) : E.value === "AFTER" && (f.count = Math.max(1, c.querySelector('[name="dhx_form_repeat_ends_after"]').value)), { rrule: f, until: D }; }, NEVER: function() { } }; - function h(u, f, c) { - (function(p, m) { - p.querySelector("[name='repeat_interval_value']").value = (m ? m.interval : 1) || 1; - })(u, f), function(p, m, g) { - if (p.querySelector("[name='repeat_interval_value']").value = (m ? m.interval : 1) || 1, p.querySelectorAll(".dhx_form_repeat_custom_week input").forEach((y) => y.checked = !1), m && m.byweekday) - m.byweekday.forEach((y) => { - const x = a[y.weekday], b = _[x]; - p.querySelector(`.dhx_form_repeat_custom_week input[value="${b}"]`).checked = !0; + function m(u, c, f) { + (function(p, g) { + p.querySelector("[name='repeat_interval_value']").value = (g ? g.interval : 1) || 1; + })(u, c), function(p, g, y) { + if (p.querySelector("[name='repeat_interval_value']").value = (g ? g.interval : 1) || 1, p.querySelectorAll(".dhx_form_repeat_custom_week input").forEach((x) => x.checked = !1), g && g.byweekday) + g.byweekday.forEach((x) => { + const b = o[x.weekday], k = a[b]; + p.querySelector(`.dhx_form_repeat_custom_week input[value="${k}"]`).checked = !0; }); else { - const y = _[g.start_date.getDay()]; - p.querySelector(`.dhx_form_repeat_custom_week input[value="${y}"]`).checked = !0; - } - }(u, f, c), function(p, m, g) { - p.querySelector("[name='repeat_interval_value']").value = (m ? m.interval : 1) || 1; - const y = p.querySelector('.dhx_form_repeat_custom_month [value="month_date"]'), x = p.querySelector('.dhx_form_repeat_custom_month [value="month_nth_weekday"]'); - y.innerText = e.templates.repeat_monthly_date(g.start_date, g), x.innerText = e.templates.repeat_monthly_weekday(g.start_date, g), m && (!m.bysetpos || m.byweekday && m.byweekday.length) ? p.querySelector('[name="dhx_custom_month_option"]').value = "month_nth_weekday" : p.querySelector('[name="dhx_custom_month_option"]').value = "month_date"; - }(u, f, c), function(p, m, g) { - const y = p.querySelector('.dhx_form_repeat_custom_year [value="month_date"]'), x = p.querySelector('.dhx_form_repeat_custom_year [value="month_nth_weekday"]'); - y.innerText = e.templates.repeat_yearly_month_date(g.start_date, g), x.innerText = e.templates.repeat_yearly_month_weekday(g.start_date, g), m && (!m.bysetpos || m.byweekday && m.byweekday.length) ? p.querySelector('[name="dhx_custom_year_option"]').value = "month_nth_weekday" : p.querySelector('[name="dhx_custom_year_option"]').value = "month_date"; - }(u, f, c), function(p, m, g) { - const y = p.querySelector('.dhx_form_repeat_ends_extra [name="dhx_form_repeat_ends_after"]'), x = p.querySelector('.dhx_form_repeat_ends_extra [name="dhx_form_repeat_ends_ondate"]'), b = p.querySelector("[name='dhx_custom_repeat_ends']"); - y.value = 1; - let k = e.date.date_to_str("%Y-%m-%d"); - e.config.repeat_date_of_end || (e.config.repeat_date_of_end = k(e.date.add(e._currentDate(), 30, "day"))), x.value = e.config.repeat_date_of_end, m && m.count ? (b.value = "AFTER", y.value = m.count) : g._end_date && g._end_date.getFullYear() !== 9999 ? (b.value = "ON", x.value = k(g._end_date)) : b.value = "NEVER", b.dispatchEvent(new Event("change")); - }(u, f, c); + const x = a[y.start_date.getDay()]; + p.querySelector(`.dhx_form_repeat_custom_week input[value="${x}"]`).checked = !0; + } + }(u, c, f), function(p, g, y) { + p.querySelector("[name='repeat_interval_value']").value = (g ? g.interval : 1) || 1; + const x = p.querySelector('.dhx_form_repeat_custom_month [value="month_date"]'), b = p.querySelector('.dhx_form_repeat_custom_month [value="month_nth_weekday"]'); + x.innerText = e.templates.repeat_monthly_date(y.start_date, y), b.innerText = e.templates.repeat_monthly_weekday(y.start_date, y), g && (!g.bysetpos || g.byweekday && g.byweekday.length) ? p.querySelector('[name="dhx_custom_month_option"]').value = "month_nth_weekday" : p.querySelector('[name="dhx_custom_month_option"]').value = "month_date"; + }(u, c, f), function(p, g, y) { + const x = p.querySelector('.dhx_form_repeat_custom_year [value="month_date"]'), b = p.querySelector('.dhx_form_repeat_custom_year [value="month_nth_weekday"]'); + x.innerText = e.templates.repeat_yearly_month_date(y.start_date, y), b.innerText = e.templates.repeat_yearly_month_weekday(y.start_date, y), g && (!g.bysetpos || g.byweekday && g.byweekday.length) ? p.querySelector('[name="dhx_custom_year_option"]').value = "month_nth_weekday" : p.querySelector('[name="dhx_custom_year_option"]').value = "month_date"; + }(u, c, f), function(p, g, y) { + const x = p.querySelector('.dhx_form_repeat_ends_extra [name="dhx_form_repeat_ends_after"]'), b = p.querySelector('.dhx_form_repeat_ends_extra [name="dhx_form_repeat_ends_ondate"]'), k = p.querySelector("[name='dhx_custom_repeat_ends']"); + x.value = 1; + let w = e.date.date_to_str("%Y-%m-%d"); + e.config.repeat_date_of_end || (e.config.repeat_date_of_end = w(e.date.add(e._currentDate(), 30, "day"))), b.value = e.config.repeat_date_of_end, g && g.count ? (k.value = "AFTER", x.value = g.count) : y._end_date && y._end_date.getFullYear() !== 9999 ? (k.value = "ON", b.value = w(y._end_date)) : k.value = "NEVER", k.dispatchEvent(new Event("change")); + }(u, c, f); } function v(u) { - for (let f = 0; f < e.config.lightbox.sections.length; f++) { - let c = e.config.lightbox.sections[f]; - if (c.type === u) - return e.formSection(c.name); + for (let c = 0; c < e.config.lightbox.sections.length; c++) { + let f = e.config.lightbox.sections[c]; + if (f.type === u) + return e.formSection(f.name); } return null; } e.form_blocks.recurring = { render: function(u) { if (u.form) { - let c = e.form_blocks.recurring, p = c._get_node(u.form), m = c._outer_html(p); - return p.style.display = "none", m; + let f = e.form_blocks.recurring, p = f._get_node(u.form), g = f._outer_html(p); + return p.style.display = "none", g; } - let f = e.locale.labels; + let c = e.locale.labels; return `
- - - - - - - + + + + + + +
@@ -9538,16 +9560,16 @@ const gn = { active_links: function(e) {
-
${f.repeat_ends}
+
${c.repeat_ends}
- +
@@ -9558,98 +9580,98 @@ const gn = { active_links: function(e) {
`; - }, _init_set_value: function(u, f, c) { - function p(g) { - g.classList.add("dhx_hidden"); + }, _init_set_value: function(u, c, f) { + function p(y) { + y.classList.add("dhx_hidden"); } - function m(g) { - g.classList.remove("dhx_hidden"); + function g(y) { + y.classList.remove("dhx_hidden"); } - e.form_blocks.recurring._ds = { start: c.start_date, end: c.end_date }, u.querySelector(".dhx_form_repeat_pattern select").addEventListener("change", function() { - (function(g) { - const y = u.querySelector(".dhx_form_repeat_custom"); - g === "CUSTOM" ? m(y) : p(y); + e.form_blocks.recurring._ds = { start: f.start_date, end: f.end_date }, u.querySelector(".dhx_form_repeat_pattern select").addEventListener("change", function() { + (function(y) { + const x = u.querySelector(".dhx_form_repeat_custom"); + y === "CUSTOM" ? g(x) : p(x); })(this.value); }), u.querySelector(".dhx_form_repeat_custom_interval [name='repeat_interval_unit']").addEventListener("change", function() { - (function(g) { - const y = { weekly: u.querySelector(".dhx_form_repeat_custom_week"), monthly: u.querySelector(".dhx_form_repeat_custom_month"), yearly: u.querySelector(".dhx_form_repeat_custom_year") }; - switch (g) { + (function(y) { + const x = { weekly: u.querySelector(".dhx_form_repeat_custom_week"), monthly: u.querySelector(".dhx_form_repeat_custom_month"), yearly: u.querySelector(".dhx_form_repeat_custom_year") }; + switch (y) { case "DAILY": - p(y.weekly), p(y.monthly), p(y.yearly); + p(x.weekly), p(x.monthly), p(x.yearly); break; case "WEEKLY": - m(y.weekly), p(y.monthly), p(y.yearly); + g(x.weekly), p(x.monthly), p(x.yearly); break; case "MONTHLY": - p(y.weekly), m(y.monthly), p(y.yearly); + p(x.weekly), g(x.monthly), p(x.yearly); break; case "YEARLY": - p(y.weekly), p(y.monthly), m(y.yearly); + p(x.weekly), p(x.monthly), g(x.yearly); } })(this.value); }), u.querySelector(".dhx_form_repeat_ends [name='dhx_custom_repeat_ends']").addEventListener("change", function() { - (function(g) { - const y = { after: u.querySelector(".dhx_form_repeat_ends_extra .dhx_form_repeat_ends_after"), on: u.querySelector(".dhx_form_repeat_ends_extra .dhx_form_repeat_ends_on") }; - switch (g) { + (function(y) { + const x = { after: u.querySelector(".dhx_form_repeat_ends_extra .dhx_form_repeat_ends_after"), on: u.querySelector(".dhx_form_repeat_ends_extra .dhx_form_repeat_ends_on") }; + switch (y) { case "NEVER": - p(y.after), p(y.on); + p(x.after), p(x.on); break; case "AFTER": - m(y.after), p(y.on); + g(x.after), p(x.on); break; case "ON": - p(y.after), m(y.on); + p(x.after), g(x.on); } })(this.value); }), e._lightbox._rec_init_done = !0; }, button_click: function() { - }, set_value: function(u, f, c) { + }, set_value: function(u, c, f) { let p = e.form_blocks.recurring; - e._lightbox._rec_init_done || p._init_set_value(u, f, c), u.open = !c.rrule, u.blocked = this._is_modified_occurence(c); - let m = p._ds; - if (m.start = c.start_date, m.end = c._end_date, c.rrule) { - const g = Se(c.rrule); - h(u, g.origOptions, c); - const y = function(x, b) { - const k = x.options, E = k.until || b; - return k.count || E && E.getFullYear() !== 9999 ? "CUSTOM" : k.freq !== C.DAILY || k.interval !== 1 || k.byweekday ? k.freq !== C.WEEKLY || k.interval !== 1 || k.byweekday ? k.freq !== C.MONTHLY || k.interval !== 1 || k.bysetpos ? k.freq !== C.YEARLY || k.interval !== 1 || k.bysetpos ? k.freq === C.DAILY && k.byweekday && k.byweekday.length === e.config.recurring_workdays.length && k.byweekday.includes(C.MO) && k.byweekday.includes(C.TU) && k.byweekday.includes(C.WE) && k.byweekday.includes(C.TH) && k.byweekday.includes(C.FR) ? "WORKDAYS" : "CUSTOM" : "YEARLY" : "MONTHLY" : "WEEKLY" : "DAILY"; - }(g, c._end_date); - if (u.querySelector(".dhx_form_repeat_pattern select").value = y, y === "CUSTOM") { - let x; - switch (g.origOptions.freq) { + e._lightbox._rec_init_done || p._init_set_value(u, c, f), u.open = !f.rrule, u.blocked = this._is_modified_occurence(f); + let g = p._ds; + if (g.start = f.start_date, g.end = f._end_date, f.rrule) { + const y = Se(f.rrule); + m(u, y.origOptions, f); + const x = function(b, k) { + const w = b.options, D = w.until || k; + return w.count || D && D.getFullYear() !== 9999 ? "CUSTOM" : w.freq !== C.DAILY || w.interval !== 1 || w.byweekday ? w.freq !== C.WEEKLY || w.interval !== 1 || w.byweekday ? w.freq !== C.MONTHLY || w.interval !== 1 || w.bysetpos ? w.freq !== C.YEARLY || w.interval !== 1 || w.bysetpos ? w.freq === C.DAILY && w.byweekday && w.byweekday.length === e.config.recurring_workdays.length && w.byweekday.includes(C.MO) && w.byweekday.includes(C.TU) && w.byweekday.includes(C.WE) && w.byweekday.includes(C.TH) && w.byweekday.includes(C.FR) ? "WORKDAYS" : "CUSTOM" : "YEARLY" : "MONTHLY" : "WEEKLY" : "DAILY"; + }(y, f._end_date); + if (u.querySelector(".dhx_form_repeat_pattern select").value = x, x === "CUSTOM") { + let b; + switch (y.origOptions.freq) { case C.DAILY: - x = "DAILY"; + b = "DAILY"; break; case C.WEEKLY: - x = "WEEKLY"; + b = "WEEKLY"; break; case C.MONTHLY: - x = "MONTHLY"; + b = "MONTHLY"; break; case C.YEARLY: - x = "YEARLY"; + b = "YEARLY"; } - x && (u.querySelector('[name="repeat_interval_unit"]').value = x, u.querySelector('[name="repeat_interval_unit"]').dispatchEvent(new Event("change"))); + b && (u.querySelector('[name="repeat_interval_unit"]').value = b, u.querySelector('[name="repeat_interval_unit"]').dispatchEvent(new Event("change"))); } } else - h(u, null, c), u.querySelector(".dhx_form_repeat_pattern select").value = "NEVER"; + m(u, null, f), u.querySelector(".dhx_form_repeat_pattern select").value = "NEVER"; u.querySelector(".dhx_form_repeat_pattern select").dispatchEvent(new Event("change")); - }, get_value: function(u, f) { + }, get_value: function(u, c) { if (u.blocked || u.querySelector(".dhx_form_repeat_pattern select").value === "NEVER") - f.rrule = f.rrule = "", f._end_date = f.end_date; + c.rrule = c.rrule = "", c._end_date = c.end_date; else { - let c = e.form_blocks.recurring._ds, p = {}; + let f = e.form_blocks.recurring._ds, p = {}; (function() { - let y = e.formSection("time"); - if (y || (y = v("time")), y || (y = v("calendar_time")), !y) + let x = e.formSection("time"); + if (x || (x = v("time")), x || (x = v("calendar_time")), !x) throw new Error(["Can't calculate the recurring rule, the Recurring form block can't find the Time control. Make sure you have the time control in 'scheduler.config.lightbox.sections' config.", "You can use either the default time control https://docs.dhtmlx.com/scheduler/time.html, or the datepicker https://docs.dhtmlx.com/scheduler/minicalendar.html, or a custom control. ", 'In the latter case, make sure the control is named "time":', "", "scheduler.config.lightbox.sections = [", '{name:"time", height:72, type:"YOU CONTROL", map_to:"auto" }];'].join(` `)); - return y; - })().getValue(p), c.start = p.start_date; - const m = u.querySelector(".dhx_form_repeat_pattern select").value, g = l[m](c, u); - f.rrule = new C(g.rrule).toString().replace("RRULE:", ""), c.end = g.until, f.duration = Math.floor((p.end_date - p.start_date) / 1e3), c._start ? (f.start_date = new Date(c.start), f._start_date = new Date(c.start), c._start = !1) : f._start_date = null, f._end_date = c.end; + return x; + })().getValue(p), f.start = p.start_date; + const g = u.querySelector(".dhx_form_repeat_pattern select").value, y = h[g](f, u); + c.rrule = new C(y.rrule).toString().replace("RRULE:", ""), f.end = y.until, c.duration = Math.floor((p.end_date - p.start_date) / 1e3), f._start ? (c.start_date = new Date(f.start), c._start_date = new Date(f.start), f._start = !1) : c._start_date = null, c._end_date = f.end; } - return f.rrule; + return c.rrule; }, focus: function(u) { } }; }, recurring_legacy: function(e) { @@ -9728,41 +9750,41 @@ const gn = { active_links: function(e) { }, _init_set_value: function(n, s, _) { var a = e.form_blocks.recurring, o = a._get_node_value, l = a._set_node_value; e.form_blocks.recurring._ds = { start: _.start_date, end: _._end_date }; - var h = e.date.str_to_date(e.config.repeat_date, !1, !0), v = e.date.date_to_str(e.config.repeat_date), u = n.getElementsByTagName("FORM")[0], f = {}; + var h = e.date.str_to_date(e.config.repeat_date, !1, !0), m = e.date.date_to_str(e.config.repeat_date), v = n.getElementsByTagName("FORM")[0], u = {}; function c(D) { - for (var w = 0; w < D.length; w++) { - var S = D[w]; + for (var E = 0; E < D.length; E++) { + var S = D[E]; if (S.name) - if (f[S.name]) - if (f[S.name].nodeType) { - var N = f[S.name]; - f[S.name] = [N, S]; + if (u[S.name]) + if (u[S.name].nodeType) { + var N = u[S.name]; + u[S.name] = [N, S]; } else - f[S.name].push(S); + u[S.name].push(S); else - f[S.name] = S; + u[S.name] = S; } } - if (c(u.getElementsByTagName("INPUT")), c(u.getElementsByTagName("SELECT")), !e.config.repeat_date_of_end) { - var p = e.date.date_to_str(e.config.repeat_date); - e.config.repeat_date_of_end = p(e.date.add(e._currentDate(), 30, "day")); + if (c(v.getElementsByTagName("INPUT")), c(v.getElementsByTagName("SELECT")), !e.config.repeat_date_of_end) { + var f = e.date.date_to_str(e.config.repeat_date); + e.config.repeat_date_of_end = f(e.date.add(e._currentDate(), 30, "day")); } - l(f, "date_of_end", e.config.repeat_date_of_end); - var m = function(D) { + l(u, "date_of_end", e.config.repeat_date_of_end); + var p = function(D) { return e._lightbox.querySelector(`#${D}`) || { style: {} }; }; function g() { - m("dhx_repeat_day").style.display = "none", m("dhx_repeat_week").style.display = "none", m("dhx_repeat_month").style.display = "none", m("dhx_repeat_year").style.display = "none", m("dhx_repeat_" + this.value).style.display = "", e.setLightboxSize(); + p("dhx_repeat_day").style.display = "none", p("dhx_repeat_week").style.display = "none", p("dhx_repeat_month").style.display = "none", p("dhx_repeat_year").style.display = "none", p("dhx_repeat_" + this.value).style.display = "", e.setLightboxSize(); } - function y(D, w) { + function y(D, E) { var S = D.end; if (S.length) if (S[0].value && S[0].value != "on") for (var N = 0; N < S.length; N++) - S[N].value == w && (S[N].checked = !0); + S[N].value == E && (S[N].checked = !0); else { var M = 0; - switch (w) { + switch (E) { case "no": M = 0; break; @@ -9775,79 +9797,79 @@ const gn = { active_links: function(e) { S[M].checked = !0; } else - S.value = w; + S.value = E; } e.form_blocks.recurring._get_repeat_code = function(D) { - var w = [o(f, "repeat")]; - for (x[w[0]](w, D); w.length < 5; ) - w.push(""); + var E = [o(u, "repeat")]; + for (x[E[0]](E, D); E.length < 5; ) + E.push(""); var S = "", N = function(M) { - var A = M.end; - if (A.length) { - for (var T = 0; T < A.length; T++) - if (A[T].checked) - return A[T].value && A[T].value != "on" ? A[T].value : T ? T == 2 ? "date_of_end" : "occurences_count" : "no"; - } else if (A.value) - return A.value; + var T = M.end; + if (T.length) { + for (var A = 0; A < T.length; A++) + if (T[A].checked) + return T[A].value && T[A].value != "on" ? T[A].value : A ? A == 2 ? "date_of_end" : "occurences_count" : "no"; + } else if (T.value) + return T.value; return "no"; - }(f); + }(u); return N == "no" ? (D.end = new Date(9999, 1, 1), S = "no") : N == "date_of_end" ? D.end = function(M) { - var A = h(M); - return e.config.include_end_by && (A = e.date.add(A, 1, "day")), A; - }(o(f, "date_of_end")) : (e.transpose_type(w.join("_")), S = Math.max(1, o(f, "occurences_count")), D.end = e.date["add_" + w.join("_")](new Date(D.start), S + 0, { start_date: D.start }) || D.start), w.join("_") + "#" + S; + var T = h(M); + return e.config.include_end_by && (T = e.date.add(T, 1, "day")), T; + }(o(u, "date_of_end")) : (e.transpose_type(E.join("_")), S = Math.max(1, o(u, "occurences_count")), D.end = e.date["add_" + E.join("_")](new Date(D.start), S + 0, { start_date: D.start }) || D.start), E.join("_") + "#" + S; }; - var x = { month: function(D, w) { + var x = { month: function(D, E) { var S = e.form_blocks.recurring._get_node_value, N = e.form_blocks.recurring._get_node_numeric_value; - S(f, "month_type") == "d" ? (D.push(Math.max(1, N(f, "month_count"))), w.start.setDate(S(f, "month_day"))) : (D.push(Math.max(1, N(f, "month_count2"))), D.push(S(f, "month_day2")), D.push(Math.max(1, N(f, "month_week2"))), e.config.repeat_precise || w.start.setDate(1)), w._start = !0; - }, week: function(D, w) { + S(u, "month_type") == "d" ? (D.push(Math.max(1, N(u, "month_count"))), E.start.setDate(S(u, "month_day"))) : (D.push(Math.max(1, N(u, "month_count2"))), D.push(S(u, "month_day2")), D.push(Math.max(1, N(u, "month_week2"))), e.config.repeat_precise || E.start.setDate(1)), E._start = !0; + }, week: function(D, E) { var S = e.form_blocks.recurring._get_node_value, N = e.form_blocks.recurring._get_node_numeric_value; - D.push(Math.max(1, N(f, "week_count"))), D.push(""), D.push(""); - for (var M = [], A = S(f, "week_day", !0), T = w.start.getDay(), H = !1, $ = 0; $ < A.length; $++) - M.push(A[$]), H = H || A[$] == T; - M.length || (M.push(T), H = !0), M.sort(), e.config.repeat_precise ? H || (e.transpose_day_week(w.start, M, 1, 7), w._start = !0) : (w.start = e.date.week_start(w.start), w._start = !0), D.push(M.join(",")); + D.push(Math.max(1, N(u, "week_count"))), D.push(""), D.push(""); + for (var M = [], T = S(u, "week_day", !0), A = E.start.getDay(), H = !1, $ = 0; $ < T.length; $++) + M.push(T[$]), H = H || T[$] == A; + M.length || (M.push(A), H = !0), M.sort(), e.config.repeat_precise ? H || (e.transpose_day_week(E.start, M, 1, 7), E._start = !0) : (E.start = e.date.week_start(E.start), E._start = !0), D.push(M.join(",")); }, day: function(D) { - var w = e.form_blocks.recurring._get_node_value, S = e.form_blocks.recurring._get_node_numeric_value; - w(f, "day_type") == "d" ? D.push(Math.max(1, S(f, "day_count"))) : (D.push("week"), D.push(1), D.push(""), D.push(""), D.push(e.config.recurring_workdays.join(",")), D.splice(0, 1)); - }, year: function(D, w) { + var E = e.form_blocks.recurring._get_node_value, S = e.form_blocks.recurring._get_node_numeric_value; + E(u, "day_type") == "d" ? D.push(Math.max(1, S(u, "day_count"))) : (D.push("week"), D.push(1), D.push(""), D.push(""), D.push(e.config.recurring_workdays.join(",")), D.splice(0, 1)); + }, year: function(D, E) { var S = e.form_blocks.recurring._get_node_value; - S(f, "year_type") == "d" ? (D.push("1"), w.start.setMonth(0), w.start.setDate(S(f, "year_day")), w.start.setMonth(S(f, "year_month"))) : (D.push("1"), D.push(S(f, "year_day2")), D.push(S(f, "year_week2")), w.start.setDate(1), w.start.setMonth(S(f, "year_month2"))), w._start = !0; - } }, b = { week: function(D, w) { + S(u, "year_type") == "d" ? (D.push("1"), E.start.setMonth(0), E.start.setDate(S(u, "year_day")), E.start.setMonth(S(u, "year_month"))) : (D.push("1"), D.push(S(u, "year_day2")), D.push(S(u, "year_week2")), E.start.setDate(1), E.start.setMonth(S(u, "year_month2"))), E._start = !0; + } }, b = { week: function(D, E) { var S = e.form_blocks.recurring._set_node_value; - S(f, "week_count", D[1]); - for (var N = D[4].split(","), M = {}, A = 0; A < N.length; A++) - M[N[A]] = !0; - S(f, "week_day", M); - }, month: function(D, w) { + S(u, "week_count", D[1]); + for (var N = D[4].split(","), M = {}, T = 0; T < N.length; T++) + M[N[T]] = !0; + S(u, "week_day", M); + }, month: function(D, E) { var S = e.form_blocks.recurring._set_node_value; - D[2] === "" ? (S(f, "month_type", "d"), S(f, "month_count", D[1]), S(f, "month_day", w.start.getDate())) : (S(f, "month_type", "w"), S(f, "month_count2", D[1]), S(f, "month_week2", D[3]), S(f, "month_day2", D[2])); - }, day: function(D, w) { + D[2] === "" ? (S(u, "month_type", "d"), S(u, "month_count", D[1]), S(u, "month_day", E.start.getDate())) : (S(u, "month_type", "w"), S(u, "month_count2", D[1]), S(u, "month_week2", D[3]), S(u, "month_day2", D[2])); + }, day: function(D, E) { var S = e.form_blocks.recurring._set_node_value; - S(f, "day_type", "d"), S(f, "day_count", D[1]); - }, year: function(D, w) { + S(u, "day_type", "d"), S(u, "day_count", D[1]); + }, year: function(D, E) { var S = e.form_blocks.recurring._set_node_value; - D[2] === "" ? (S(f, "year_type", "d"), S(f, "year_day", w.start.getDate()), S(f, "year_month", w.start.getMonth())) : (S(f, "year_type", "w"), S(f, "year_week2", D[3]), S(f, "year_day2", D[2]), S(f, "year_month2", w.start.getMonth())); + D[2] === "" ? (S(u, "year_type", "d"), S(u, "year_day", E.start.getDate()), S(u, "year_month", E.start.getMonth())) : (S(u, "year_type", "w"), S(u, "year_week2", D[3]), S(u, "year_day2", D[2]), S(u, "year_month2", E.start.getMonth())); } }; - e.form_blocks.recurring._set_repeat_code = function(D, w) { + e.form_blocks.recurring._set_repeat_code = function(D, E) { var S = e.form_blocks.recurring._set_node_value, N = D.split("#"); - switch (D = N[0].split("_"), b[D[0]](D, w), N[1]) { + switch (D = N[0].split("_"), b[D[0]](D, E), N[1]) { case "no": - y(f, "no"); + y(u, "no"); break; case "": - y(f, "date_of_end"); - var M = w.end; - e.config.include_end_by && (M = e.date.add(M, -1, "day")), S(f, "date_of_end", v(M)); + y(u, "date_of_end"); + var M = E.end; + e.config.include_end_by && (M = e.date.add(M, -1, "day")), S(u, "date_of_end", m(M)); break; default: - y(f, "occurences_count"), S(f, "occurences_count", N[1]); + y(u, "occurences_count"), S(u, "occurences_count", N[1]); } - S(f, "repeat", D[0]); - var A = e.form_blocks.recurring._get_form_node(f, "repeat", D[0]); - A.nodeName == "SELECT" ? (A.dispatchEvent(new Event("change")), A.dispatchEvent(new MouseEvent("click"))) : A.dispatchEvent(new MouseEvent("click")); + S(u, "repeat", D[0]); + var T = e.form_blocks.recurring._get_form_node(u, "repeat", D[0]); + T.nodeName == "SELECT" ? (T.dispatchEvent(new Event("change")), T.dispatchEvent(new MouseEvent("click"))) : T.dispatchEvent(new MouseEvent("click")); }; - for (var k = 0; k < u.elements.length; k++) { - var E = u.elements[k]; - E.name === "repeat" && (E.nodeName != "SELECT" || E.$_eventAttached ? E.$_eventAttached || (E.$_eventAttached = !0, E.addEventListener("click", g)) : (E.$_eventAttached = !0, E.addEventListener("change", g))); + for (var k = 0; k < v.elements.length; k++) { + var w = v.elements[k]; + w.name === "repeat" && (w.nodeName != "SELECT" || w.$_eventAttached ? w.$_eventAttached || (w.$_eventAttached = !0, w.addEventListener("click", g)) : (w.$_eventAttached = !0, w.addEventListener("change", g))); } e._lightbox._rec_init_done = !0; }, set_value: function(n, s, _) { @@ -9925,8 +9947,8 @@ const gn = { active_links: function(e) { } else { s.rec_type && this._lightbox_id && this._roll_back_dates(s); var h = this._get_rec_markers(n); - for (var v in h) - h.hasOwnProperty(v) && (n = h[v].id, this.getEvent(n) && this.deleteEvent(n, !0)); + for (var m in h) + h.hasOwnProperty(m) && (n = h[m].id, this.getEvent(n) && this.deleteEvent(n, !0)); } return !0; }), e.attachEvent("onEventDeleted", function(n, s) { @@ -9946,12 +9968,12 @@ const gn = { active_links: function(e) { } else { _.start_date && (_.start_date = r(_.start_date)), _.end_date && (_.end_date = r(_.end_date)), _.rec_type && this._lightbox_id && this._roll_back_dates(_); var h = this._get_rec_markers(n); - for (var v in h) - h.hasOwnProperty(v) && (delete this._rec_markers[h[v].id], this.deleteEvent(h[v].id, !0)); + for (var m in h) + h.hasOwnProperty(m) && (delete this._rec_markers[h[m].id], this.deleteEvent(h[m].id, !0)); delete this._rec_markers_pull[n]; - for (var u = !1, f = 0; f < this._rendered.length; f++) - this._rendered[f].getAttribute(this.config.event_attribute) == n && (u = !0); - u || (this._select_id = null); + for (var v = !1, u = 0; u < this._rendered.length; u++) + this._rendered[u].getAttribute(this.config.event_attribute) == n && (v = !0); + v || (this._select_id = null); } return !0; }), e.attachEvent("onEventAdded", function(n) { @@ -9977,22 +9999,22 @@ const gn = { active_links: function(e) { }, e.showLightbox_rec = e.showLightbox, e.showLightbox = function(n) { var s = this.locale, _ = e.config.lightbox_recurring, a = this.getEvent(n), o = a.event_pid, l = this._is_virtual_event(n); l && (o = n.split("#")[0]); - var h = function(u) { - var f = e.getEvent(u); - return f._end_date = f.end_date, f.end_date = new Date(f.start_date.valueOf() + 1e3 * f.event_length), e.showLightbox_rec(u); + var h = function(v) { + var u = e.getEvent(v); + return u._end_date = u.end_date, u.end_date = new Date(u.start_date.valueOf() + 1e3 * u.event_length), e.showLightbox_rec(v); }; if ((o || 1 * o == 0) && a.rec_type) return h(n); if (!o || o === "0" || !s.labels.confirm_recurring || _ == "instance" || _ == "series" && !l) return this.showLightbox_rec(n); if (_ == "ask") { - var v = this; - e.modalbox({ text: s.labels.confirm_recurring, title: s.labels.title_confirm_recurring, width: "500px", position: "middle", buttons: [s.labels.button_edit_series, s.labels.button_edit_occurrence, s.labels.icon_cancel], callback: function(u) { - switch (+u) { + var m = this; + e.modalbox({ text: s.labels.confirm_recurring, title: s.labels.title_confirm_recurring, width: "500px", position: "middle", buttons: [s.labels.button_edit_series, s.labels.button_edit_occurrence, s.labels.icon_cancel], callback: function(v) { + switch (+v) { case 0: return h(o); case 1: - return v.showLightbox_rec(n); + return m.showLightbox_rec(n); case 2: return; } @@ -10039,50 +10061,50 @@ const gn = { active_links: function(e) { l[h] = 1 * l[h] || 7; l.sort(); } - this.date[s] = function(v, u) { - var f = Math.floor((u.valueOf() - v.valueOf()) / (864e5 * o)); - return f > 0 && v.setDate(v.getDate() + f * o), l && e.transpose_day_week(v, l, 1, o), v; - }, this.date[a] = function(v, u) { - var f = new Date(v.valueOf()); + this.date[s] = function(m, v) { + var u = Math.floor((v.valueOf() - m.valueOf()) / (864e5 * o)); + return u > 0 && m.setDate(m.getDate() + u * o), l && e.transpose_day_week(m, l, 1, o), m; + }, this.date[a] = function(m, v) { + var u = new Date(m.valueOf()); if (l) - for (var c = 0; c < u; c++) - e.transpose_day_week(f, l, 0, o); + for (var c = 0; c < v; c++) + e.transpose_day_week(u, l, 0, o); else - f.setDate(f.getDate() + u * o); - return f; + u.setDate(u.getDate() + v * o); + return u; }; } else - _[0] != "month" && _[0] != "year" || (this.date[s] = function(v, u, f) { - var c = Math.ceil((12 * u.getFullYear() + 1 * u.getMonth() + 1 - (12 * v.getFullYear() + 1 * v.getMonth() + 1)) / o - 1); - return c >= 0 && (v.setDate(1), v.setMonth(v.getMonth() + c * o)), e.date[a](v, 0, f); - }, this.date[a] = function(v, u, f, c) { + _[0] != "month" && _[0] != "year" || (this.date[s] = function(m, v, u) { + var c = Math.ceil((12 * v.getFullYear() + 1 * v.getMonth() + 1 - (12 * m.getFullYear() + 1 * m.getMonth() + 1)) / o - 1); + return c >= 0 && (m.setDate(1), m.setMonth(m.getMonth() + c * o)), e.date[a](m, 0, u); + }, this.date[a] = function(m, v, u, c) { if (c ? c++ : c = 1, c > 12) return null; - var p = new Date(v.valueOf()); - p.setDate(1), p.setMonth(p.getMonth() + u * o); - var m = p.getMonth(), g = p.getFullYear(); - p.setDate(f.start_date.getDate()), _[3] && e.date.day_week(p, _[2], _[3]); + var f = new Date(m.valueOf()); + f.setDate(1), f.setMonth(f.getMonth() + v * o); + var p = f.getMonth(), g = f.getFullYear(); + f.setDate(u.start_date.getDate()), _[3] && e.date.day_week(f, _[2], _[3]); var y = e.config.recurring_overflow_instances; - return p.getMonth() != m && y != "none" && (p = y === "lastDay" ? new Date(g, m + 1, 0, p.getHours(), p.getMinutes(), p.getSeconds(), p.getMilliseconds()) : e.date[a](new Date(g, m + 1, 0), u || 1, f, c)), p; + return f.getMonth() != p && y != "none" && (f = y === "lastDay" ? new Date(g, p + 1, 0, f.getHours(), f.getMinutes(), f.getSeconds(), f.getMilliseconds()) : e.date[a](new Date(g, p + 1, 0), v || 1, u, c)), f; }); } }, e.repeat_date = function(n, s, _, a, o, l) { a = a || this._min_date, o = o || this._max_date; - var h = l || -1, v = new Date(n.start_date.valueOf()), u = v.getHours(), f = 0; - for (!n.rec_pattern && n.rec_type && (n.rec_pattern = n.rec_type.split("#")[0]), this.transpose_type(n.rec_pattern), v = e.date["transpose_" + n.rec_pattern](v, a, n); v && (v < n.start_date || e._fix_daylight_saving_date(v, a, n, v, new Date(v.valueOf() + 1e3 * n.event_length)).valueOf() <= a.valueOf() || v.valueOf() + 1e3 * n.event_length <= a.valueOf()); ) - v = this.date["add_" + n.rec_pattern](v, 1, n); - for (; v && v < o && v < n.end_date && (h < 0 || f < h); ) { - v.setHours(u); - var c = e.config.occurrence_timestamp_in_utc ? Date.UTC(v.getFullYear(), v.getMonth(), v.getDate(), v.getHours(), v.getMinutes(), v.getSeconds()) : v.valueOf(), p = this._get_rec_marker(c, n.id); - if (p) - _ && (p.rec_type != "none" && f++, s.push(p)); + var h = l || -1, m = new Date(n.start_date.valueOf()), v = m.getHours(), u = 0; + for (!n.rec_pattern && n.rec_type && (n.rec_pattern = n.rec_type.split("#")[0]), this.transpose_type(n.rec_pattern), m = e.date["transpose_" + n.rec_pattern](m, a, n); m && (m < n.start_date || e._fix_daylight_saving_date(m, a, n, m, new Date(m.valueOf() + 1e3 * n.event_length)).valueOf() <= a.valueOf() || m.valueOf() + 1e3 * n.event_length <= a.valueOf()); ) + m = this.date["add_" + n.rec_pattern](m, 1, n); + for (; m && m < o && m < n.end_date && (h < 0 || u < h); ) { + m.setHours(v); + var c = e.config.occurrence_timestamp_in_utc ? Date.UTC(m.getFullYear(), m.getMonth(), m.getDate(), m.getHours(), m.getMinutes(), m.getSeconds()) : m.valueOf(), f = this._get_rec_marker(c, n.id); + if (f) + _ && (f.rec_type != "none" && u++, s.push(f)); else { - var m = new Date(v.valueOf() + 1e3 * n.event_length), g = this._copy_event(n); - if (g.text = n.text, g.start_date = v, g.event_pid = n.id, g.id = n.id + "#" + Math.round(c / 1e3), g.end_date = m, g.end_date = e._fix_daylight_saving_date(g.start_date, g.end_date, n, v, g.end_date), g._timed = this.isOneDayEvent(g), !g._timed && !this._table_view && !this.config.multi_day) + var p = new Date(m.valueOf() + 1e3 * n.event_length), g = this._copy_event(n); + if (g.text = n.text, g.start_date = m, g.event_pid = n.id, g.id = n.id + "#" + Math.round(c / 1e3), g.end_date = p, g.end_date = e._fix_daylight_saving_date(g.start_date, g.end_date, n, m, g.end_date), g._timed = this.isOneDayEvent(g), !g._timed && !this._table_view && !this.config.multi_day) return; - s.push(g), _ || (this._events[g.id] = g, this._rec_temp.push(g)), f++; + s.push(g), _ || (this._events[g.id] = g, this._rec_temp.push(g)), u++; } - v = this.date["add_" + n.rec_pattern](v, 1, n); + m = this.date["add_" + n.rec_pattern](m, 1, n); } }, e._fix_daylight_saving_date = function(n, s, _, a, o) { var l = n.getTimezoneOffset() - s.getTimezoneOffset(); @@ -10230,10 +10252,10 @@ END:VCALENDAR`; return !1; } } - var v = ["date=" + r(o || _), "mode=" + (a || s)]; - d && v.push("event=" + d); - var u = "#" + v.join(","); - return document.location.hash = u, !0; + var m = ["date=" + r(o || _), "mode=" + (a || s)]; + d && m.push("event=" + d); + var v = "#" + m.join(","); + return document.location.hash = v, !0; }); }); }, week_agenda: function(e) { @@ -10305,14 +10327,14 @@ END:VCALENDAR`; } }); } - for (var v = this.getEvents(_, this.date.add(_, 1, "day")), u = "", f = 0; f < v.length; f++) { - var c = v[f]; + for (var m = this.getEvents(_, this.date.add(_, 1, "day")), v = "", u = 0; u < m.length; u++) { + var c = m[u]; if (this.filter_event(c.id, c)) { - var p = c.color ? "--dhx-scheduler-event-background:" + c.color + ";" : "", m = c.textColor ? "--dhx-scheduler-event-color:" + c.textColor + ";" : ""; - u += "
", u += "
" + (v[f]._timed ? this.templates.event_date(v[f].start_date) : "") + "
", u += "
 
", u += this.templates.year_tooltip(v[f].start_date, v[f].end_date, v[f]) + "
"; + var f = c.color ? "--dhx-scheduler-event-background:" + c.color + ";" : "", p = c.textColor ? "--dhx-scheduler-event-color:" + c.textColor + ";" : ""; + v += "
", v += "
" + (m[u]._timed ? this.templates.event_date(m[u].start_date) : "") + "
", v += "
 
", v += this.templates.year_tooltip(m[u].start_date, m[u].end_date, m[u]) + "
"; } } - this._tooltip.style.display = "", this._tooltip.style.top = "0px", document.body.offsetWidth - a.left - this._tooltip.offsetWidth < 0 ? this._tooltip.style.left = a.left - this._tooltip.offsetWidth + "px" : this._tooltip.style.left = a.left + l.offsetWidth + "px", this._tooltip.date = _, this._tooltip.innerHTML = u, document.body.offsetHeight - a.top - this._tooltip.offsetHeight < 0 ? this._tooltip.style.top = a.top - this._tooltip.offsetHeight + l.offsetHeight + "px" : this._tooltip.style.top = a.top + "px"; + this._tooltip.style.display = "", this._tooltip.style.top = "0px", document.body.offsetWidth - a.left - this._tooltip.offsetWidth < 0 ? this._tooltip.style.left = a.left - this._tooltip.offsetWidth + "px" : this._tooltip.style.left = a.left + l.offsetWidth + "px", this._tooltip.date = _, this._tooltip.innerHTML = v, document.body.offsetHeight - a.top - this._tooltip.offsetHeight < 0 ? this._tooltip.style.top = a.top - this._tooltip.offsetHeight + l.offsetHeight + "px" : this._tooltip.style.top = a.top + "px"; }, e._year_view_tooltip_handler = function(_) { if (i()) { var a = _.target || _.srcElement; @@ -10353,26 +10375,26 @@ END:VCALENDAR`; a.scrollTop = 0, a.innerHTML = "", Math.floor((parseInt(a.style.height) - e.xy.year_top) / o.year_y); var l = document.createElement("div"), h = this.date.week_start(e._currentDate()); this._process_ignores(h, 7, "day", 1); - for (var v = 0; v < 7; v++) - this._ignores && this._ignores[v] || (this._cols[v] = "var(--dhx-scheduler-datepicker-cell-size)", this._render_x_header(v, 0, h, l)), h = this.date.add(h, 1, "day"); - for (l.lastChild.className += " dhx_scale_bar_last", v = 0; v < l.childNodes.length; v++) - this._waiAria.yearHeadCell(l.childNodes[v]); - var u = this.date[this._mode + "_start"](this.date.copy(this._date)), f = u, c = null; - const p = document.createElement("div"); - for (p.classList.add("dhx_year_wrapper"), v = 0; v < o.year_y; v++) - for (var m = 0; m < o.year_x; m++) { - (c = document.createElement("div")).className = "dhx_year_box", c.setAttribute("date", this._helpers.formatDate(u)), c.setAttribute("data-month-date", this._helpers.formatDate(u)), c.innerHTML = "
" + l.innerHTML + "
"; + for (var m = 0; m < 7; m++) + this._ignores && this._ignores[m] || (this._cols[m] = "var(--dhx-scheduler-datepicker-cell-size)", this._render_x_header(m, 0, h, l)), h = this.date.add(h, 1, "day"); + for (l.lastChild.className += " dhx_scale_bar_last", m = 0; m < l.childNodes.length; m++) + this._waiAria.yearHeadCell(l.childNodes[m]); + var v = this.date[this._mode + "_start"](this.date.copy(this._date)), u = v, c = null; + const f = document.createElement("div"); + for (f.classList.add("dhx_year_wrapper"), m = 0; m < o.year_y; m++) + for (var p = 0; p < o.year_x; p++) { + (c = document.createElement("div")).className = "dhx_year_box", c.setAttribute("date", this._helpers.formatDate(v)), c.setAttribute("data-month-date", this._helpers.formatDate(v)), c.innerHTML = "
" + l.innerHTML + "
"; var g = c.querySelector(".dhx_year_month"), y = c.querySelector(".dhx_year_grid"), x = c.querySelector(".dhx_year_body"), b = e.uid(); - this._waiAria.yearHeader(g, b), this._waiAria.yearGrid(y, b), g.innerHTML = this.templates.year_month(u); - var k = this.date.week_start(u); - this._reset_month_scale(x, u, k, 6); - for (var E = x.querySelectorAll("td"), D = 0; D < E.length; D++) - this._waiAria.yearDayCell(E[D]); - p.appendChild(c), _[v * o.year_x + m] = (u.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7, u = this.date.add(u, 1, "month"); - } - a.appendChild(p); - var w = this._getNavDateElement(); - w && (w.innerHTML = this.templates[this._mode + "_date"](f, u, this._mode)), this.week_starts = _, _._month = f.getMonth(), this._min_date = f, this._max_date = u; + this._waiAria.yearHeader(g, b), this._waiAria.yearGrid(y, b), g.innerHTML = this.templates.year_month(v); + var k = this.date.week_start(v); + this._reset_month_scale(x, v, k, 6); + for (var w = x.querySelectorAll("td"), D = 0; D < w.length; D++) + this._waiAria.yearDayCell(w[D]); + f.appendChild(c), _[m * o.year_x + p] = (v.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7, v = this.date.add(v, 1, "month"); + } + a.appendChild(f); + var E = this._getNavDateElement(); + E && (E.innerHTML = this.templates[this._mode + "_date"](u, v, this._mode)), this.week_starts = _, _._month = u.getMonth(), this._min_date = u, this._max_date = v; }, e._reset_year_scale = function() { var _ = this._els.dhx_cal_data[0]; _.scrollTop = 0, _.innerHTML = ""; @@ -10381,18 +10403,18 @@ END:VCALENDAR`; const o = document.createElement("div"); o.classList.add("dhx_year_wrapper"); let l = a; - for (let u = 0; u < 12; u++) { - let f = document.createElement("div"); - f.className = "dhx_year_box", f.setAttribute("date", this._helpers.formatDate(l)), f.setAttribute("data-month-date", this._helpers.formatDate(l)), f.innerHTML = `
${this.templates.year_month(l)}
+ for (let v = 0; v < 12; v++) { + let u = document.createElement("div"); + u.className = "dhx_year_box", u.setAttribute("date", this._helpers.formatDate(l)), u.setAttribute("data-month-date", this._helpers.formatDate(l)), u.innerHTML = `
${this.templates.year_month(l)}
`; - const c = f.querySelector(".dhx_year_grid"), p = e._createDatePicker(null, { date: l, minWeeks: 6 }); - p._renderDayGrid(c), p.destructor(), o.appendChild(f), l = this.date.add(l, 1, "month"); + const c = u.querySelector(".dhx_year_grid"), f = e._createDatePicker(null, { date: l, filterDays: e.ignore_year, minWeeks: 6 }); + f._renderDayGrid(c), f.destructor(), o.appendChild(u), l = this.date.add(l, 1, "month"); } _.appendChild(o); let h = this.date.add(a, 1, "year"); h.valueOf() != this.date.week_start(new Date(h)).valueOf() && (h = this.date.week_start(new Date(h)), h = this.date.add(h, 1, "week")), this._max_date = h; - var v = this._getNavDateElement(); - v && (v.innerHTML = this.templates[this._mode + "_date"](a, h, this._mode)); + var m = this._getNavDateElement(); + m && (m.innerHTML = this.templates[this._mode + "_date"](a, h, this._mode)); }; var n = e.getActionData; e.getActionData = function(_) { diff --git a/codebase/dhtmlxscheduler.es.js.map b/codebase/dhtmlxscheduler.es.js.map index 2e812a8..ae76ba8 100644 --- a/codebase/dhtmlxscheduler.es.js.map +++ b/codebase/dhtmlxscheduler.es.js.map @@ -1 +1 @@ -{"version":3,"file":"dhtmlxscheduler.es.js","sources":["../sources/global.js","../sources/plugins/drag_highlight_pos.js","../sources/plugins/limit.js","../sources/plugins/batch_update.js","../sources/plugins/index.js","../sources/plugins/undo_delete.js","../sources/core/utils/utils.js","../sources/core/nav_bar.js","../sources/core/scheduler_resize_listener.js","../sources/utils/eventable.js","../sources/core/utils/event.js","../sources/core/common.js","../sources/core/utils/scoped_event.js","../sources/core/utils/dom_helpers.js","../sources/utils/env.js","../sources/core/common/url_serialize.js","../sources/core/base.js","../sources/core/common/get_serializable_events.js","../sources/core/load.js","../sources/core/loaders/xml.js","../sources/core/loaders/json.js","../sources/core/loaders/ical.js","../sources/core/touch.js","../sources/core/skins.js","../sources/core/dataprocessor/dataprocessor_hooks.js","../sources/core/dataprocessor/dataprocessor.js","../sources/core/message.js","../sources/locale/locale_ar.js","../sources/locale/locale_be.js","../sources/locale/locale_ca.js","../sources/locale/locale_cn.js","../sources/locale/locale_cs.js","../sources/locale/locale_da.js","../sources/locale/locale_de.js","../sources/locale/locale_el.js","../sources/locale/locale_en.js","../sources/locale/locale_es.js","../sources/locale/locale_fi.js","../sources/locale/locale_fr.js","../sources/locale/locale_he.js","../sources/locale/locale_hu.js","../sources/locale/locale_id.js","../sources/locale/locale_it.js","../sources/locale/locale_jp.js","../sources/locale/locale_manager.js","../sources/locale/locale_nb.js","../sources/locale/locale_nl.js","../sources/locale/locale_no.js","../sources/locale/locale_pl.js","../sources/locale/locale_pt.js","../sources/locale/locale_ro.js","../sources/locale/locale_ru.js","../sources/locale/locale_si.js","../sources/locale/locale_sk.js","../sources/locale/locale_sv.js","../sources/locale/locale_tr.js","../sources/locale/locale_ua.js","../sources/core/datepicker.js","../sources/scheduler_factory_method.js","../sources/core/state.js","../sources/core/common_errors.js","../sources/core/scheduler.js","../sources/core/wai_aria.js","../sources/core/common/assert.js","../sources/core/jquery.js","../sources/core/destructor.js","../sources/core/utils/ajax.js","../sources/core/config.js","../sources/core/event.js","../sources/core/event_highlight.js","../sources/core/lightbox.js","../sources/core/dhtmlx/dhtmlx_suite_hooks.js","../sources/core/delay_render.js","../sources/core/connector.js","../sources/locale/index.js","../sources/ext/extension_manager.js","../sources/dhtmlx_hook.js","../sources/ext/restricted_extensions/not_implemented_extension.js","../sources/ext/keyboard_navigation/modals.js","../sources/ext/keyboard_navigation/key_nav_legacy.js","../sources/ext/keyboard_navigation/scheduler_handlers.js","../sources/ext/map_view/gMapAdapter.ts","../sources/ext/map_view/osmMapAdapter.ts","../sources/ext/map_view/mapboxAdapter.ts","../node_modules/rrule/dist/esm/weekday.js","../node_modules/rrule/dist/esm/helpers.js","../node_modules/rrule/dist/esm/dateutil.js","../node_modules/rrule/dist/esm/iterresult.js","../node_modules/rrule/node_modules/tslib/tslib.es6.mjs","../node_modules/rrule/dist/esm/callbackiterresult.js","../node_modules/rrule/dist/esm/types.js","../node_modules/rrule/dist/esm/nlp/i18n.js","../node_modules/rrule/dist/esm/nlp/totext.js","../node_modules/rrule/dist/esm/nlp/parsetext.js","../node_modules/rrule/dist/esm/nlp/index.js","../node_modules/rrule/dist/esm/datetime.js","../node_modules/rrule/dist/esm/parseoptions.js","../node_modules/rrule/dist/esm/parsestring.js","../node_modules/rrule/dist/esm/datewithzone.js","../node_modules/rrule/dist/esm/optionstostring.js","../node_modules/rrule/dist/esm/cache.js","../node_modules/rrule/dist/esm/masks.js","../node_modules/rrule/dist/esm/iterinfo/yearinfo.js","../node_modules/rrule/dist/esm/iterinfo/index.js","../node_modules/rrule/dist/esm/iterinfo/monthinfo.js","../node_modules/rrule/dist/esm/iterinfo/easter.js","../node_modules/rrule/dist/esm/iter/poslist.js","../node_modules/rrule/dist/esm/iter/index.js","../node_modules/rrule/dist/esm/rrule.js","../node_modules/rrule/dist/esm/rrulestr.js","../node_modules/rrule/dist/esm/rruleset.js","../node_modules/rrule/dist/esm/iterset.js","../sources/ext/tooltip/tooltip.ts","../sources/ext/tooltip/tooltipManager.ts","../sources/ext/extensions_gpl.js","../sources/ext/active_links.js","../sources/ext/agenda_legacy_view.js","../sources/ext/agenda.js","../sources/ext/all_timed.js","../sources/ext/collision.js","../sources/ext/container_autoresize.js","../sources/ext/cookie.js","../sources/ext/restricted_extensions/daytimeline.js","../sources/ext/restricted_extensions/drag_between.js","../sources/ext/editors.js","../sources/ext/expand.js","../sources/ext/export_api/index.js","../sources/ext/restricted_extensions/grid_view.js","../sources/ext/html_templates.js","../sources/ext/key_nav.js","../sources/ext/keyboard_navigation/common/keyboard_shortcuts.js","../sources/ext/keyboard_navigation/common/eventhandler.js","../sources/ext/keyboard_navigation/common/trap_modal_focus.js","../sources/ext/keyboard_navigation/marker.js","../sources/ext/keyboard_navigation/elements/scheduler_node.js","../sources/ext/keyboard_navigation/elements/nav_node.js","../sources/ext/keyboard_navigation/elements/header_cell.js","../sources/ext/keyboard_navigation/elements/event.js","../sources/ext/keyboard_navigation/elements/time_slot.js","../sources/ext/keyboard_navigation/elements/minical_button.js","../sources/ext/keyboard_navigation/elements/minical_cell.js","../sources/ext/keyboard_navigation/elements/data_area.js","../sources/ext/keyboard_navigation/core.js","../sources/ext/keyboard_navigation/minical_handlers.js","../sources/ext/layer.js","../sources/ext/limit.js","../sources/ext/map_view/index.ts","../sources/ext/minical.js","../sources/ext/monthheight.js","../sources/ext/restricted_extensions/multisection.js","../sources/ext/multiselect.js","../sources/ext/multisource.js","../sources/ext/mvc.js","../sources/ext/outerdrag.js","../sources/ext/pdf.js","../sources/ext/quick_info.js","../sources/ext/readonly.js","../sources/ext/recurring.js","../sources/ext/recurring_legacy.js","../sources/ext/serialize.js","../sources/ext/restricted_extensions/timeline.js","../sources/ext/tooltip/index.ts","../sources/ext/restricted_extensions/treetimeline.js","../sources/ext/restricted_extensions/units.js","../sources/ext/url.js","../sources/ext/restricted_extensions/week_agenda.js","../sources/ext/wp.js","../sources/ext/year_view.js","../sources/dhtmlxscheduler.gpl.js","../sources/scheduler_factory.js"],"sourcesContent":["\r\n/* eslint-disable no-restricted-globals */\r\nvar globalScope;\r\nif(typeof window !== \"undefined\"){\r\n\tglobalScope = window;\r\n}else{\r\n\tglobalScope = global;\r\n}\r\n/* eslint-enable no-restricted-globals */\r\n\r\nexport default globalScope;","export default function dragHighlightPos(scheduler){\r\n let dndMarkers = [];\r\n let dragStarted = false;\r\n let eventNode = null;\r\n let event = null;\r\n\r\n function isEnabled() { \r\n return scheduler.config.drag_highlight && scheduler.markTimespan;\r\n }\r\n\r\n function checkViewName(viewName){\r\n const viewObj = scheduler.getView(viewName);\r\n if(viewObj){\r\n return viewObj.layout;\r\n }\r\n return viewName;\r\n }\r\n\r\n function checkSectionPropertyName(viewName){\r\n const viewObj = scheduler.getView(viewName);\r\n if(viewObj.y_property){\r\n return viewObj.y_property;\r\n }\r\n if(viewObj.map_to){\r\n return viewObj.map_to;\r\n }\r\n }\r\n\r\n function setRequiredStylesToMarker(eventNode, layout){\r\n switch (layout) {\r\n case \"month\":\r\n eventNode.style.top = \"\";\r\n eventNode.style.left = \"\";\r\n break;\r\n case \"timeline\":\r\n eventNode.style.left = \"\";\r\n eventNode.style.marginLeft = \"1px\";\r\n break;\r\n default:\r\n eventNode.style.top = \"\";\r\n break;\r\n }\r\n }\r\n \r\n function createMarkerConfig(configSettings){\r\n const { event, layout, viewName, sectionId, eventNode } = configSettings;\r\n setRequiredStylesToMarker(eventNode, layout);\r\n const sections = {};\r\n let markerObject = {\r\n start_date: event.start_date,\r\n end_date: event.end_date,\r\n css: \"dhx_scheduler_dnd_marker\",\r\n html: eventNode\r\n };\r\n if (layout == \"timeline\" || layout == \"month\" ){\r\n // we need to set end date less than 24 hours of the views to avoid receiving multiple marktimespans\r\n markerObject = {...markerObject, end_date: scheduler.date.add(event.start_date, 1, 'minute')};\r\n }\r\n if (sectionId){\r\n sections[viewName] = sectionId;\r\n markerObject.sections = sections;\r\n }\r\n return markerObject;\r\n }\r\n\r\n function createViewMarker(settings){\r\n const { layout } = settings;\r\n let markerConfigs;\r\n switch (layout) {\r\n case \"month\": \r\n markerConfigs = getMonthViewMarkers(settings);\r\n break;\r\n case 'timeline':\r\n case 'units':\r\n markerConfigs = getTimelineAndUnitsViewMarkers(settings);\r\n break;\r\n default: \r\n markerConfigs = getColumnViewMarkers(settings);\r\n break;\r\n }\r\n markerConfigs.forEach((cfg) => {\r\n dndMarkers.push(scheduler.markTimespan(cfg));\r\n });\r\n }\r\n\r\n function getColumnViewMarkers(settings){\r\n const {event, layout, viewName, sectionId} = settings;\r\n let columnViewMarkersArray = [];\r\n let eventNodes = scheduler.$container.querySelectorAll(`[${scheduler.config.event_attribute}='${event.id}']:not(.dhx_cal_select_menu):not(.dhx_drag_marker)`);\r\n if(eventNodes){\r\n for (let i = 0; i < eventNodes.length; i++) {\r\n let eventNodeClone = eventNodes[i].cloneNode(true);\r\n let startDate = new Date(+eventNodeClone.getAttribute(\"data-bar-start\"));\r\n let endDate = new Date(+eventNodeClone.getAttribute(\"data-bar-end\"));\r\n let dates = {start_date: startDate, end_date: endDate};\r\n const configSettings = {\r\n event: dates, \r\n layout, \r\n viewName, \r\n sectionId, \r\n eventNode:eventNodeClone\r\n };\r\n columnViewMarkersArray.push(createMarkerConfig(configSettings));\r\n }\t\r\n }\r\n return columnViewMarkersArray;\r\n }\r\n\r\n function getMonthViewMarkers(settings){\r\n let monthViewMarkersArray = [];\r\n const {event, layout, viewName, sectionId} = settings;\r\n const weekDates = [];\r\n let currDate = new Date(event.start_date);\r\n while(currDate.valueOf() < event.end_date.valueOf()){\r\n let obj = {start_date: currDate};\r\n weekDates.push(obj);\r\n currDate = scheduler.date.week_start(scheduler.date.add(currDate, 1, \"week\"));\r\n }\r\n let cells = scheduler.$container.querySelectorAll(`[${scheduler.config.event_attribute}='${event.id}']`);\r\n for (let i = 0; i < cells.length; i++) {\r\n const configSettings = {\r\n event: weekDates[i], \r\n layout, \r\n viewName, \r\n sectionId, \r\n eventNode: cells[i].cloneNode(true)\r\n };\r\n monthViewMarkersArray.push(createMarkerConfig(configSettings));\r\n }\r\n return monthViewMarkersArray;\r\n }\r\n\r\n function getTimelineAndUnitsViewMarkers(settings){\r\n let unitMarkersArray = [];\r\n const {event, layout, viewName, eventNode} = settings;\r\n let sectionPropertyName = checkSectionPropertyName(viewName);\r\n if (scheduler.config.multisection && sectionPropertyName){\r\n const sections = String(event[sectionPropertyName]).split(scheduler.config.section_delimiter);\r\n const formatedSections = sections.map(element => String(element));\r\n const elems = [];\r\n for (let i = 0; i < formatedSections.length; i++) {\r\n elems[i] = eventNode.cloneNode(true);\r\n const configSettings = {\r\n event, \r\n layout, \r\n viewName, \r\n sectionId: formatedSections[i],\r\n eventNode: elems[i]\r\n };\r\n unitMarkersArray.push(createMarkerConfig(configSettings));\r\n }\r\n }\r\n return unitMarkersArray;\r\n }\r\n \r\n scheduler.attachEvent(\"onBeforeDrag\", function (id, mode, e){\r\n if (isEnabled()) {\r\n dragStarted = true;\r\n event = scheduler.getEvent(id);\r\n eventNode = e.target.closest(`[${scheduler.config.event_attribute}]`);\r\n const viewName = scheduler.getState().mode;\r\n const layout = checkViewName(viewName);\r\n // to avoid incorrect eventNode and marker creation when scheduler.config.cascade_event_display included\r\n if (layout == \"units\" && scheduler.config.cascade_event_display ) {\r\n scheduler.unselect(id);\r\n eventNode = e.target.closest(`[${scheduler.config.event_attribute}]`);\r\n }\r\n }\r\n return true;\r\n });\r\n\r\n scheduler.attachEvent(\"onEventDrag\", function (id, mode, e){\r\n if(dragStarted && isEnabled()){\r\n dragStarted = false;// insert element only once after dnd start\r\n const viewName = scheduler.getState().mode;\r\n const layout = checkViewName(viewName);\r\n const sectionId = scheduler.getActionData(e).section;\r\n if (event) {\r\n const settings = {\r\n event, \r\n layout, \r\n viewName, \r\n sectionId, \r\n eventNode\r\n };\r\n createViewMarker(settings);\r\n }\r\n }\r\n });\r\n\r\n scheduler.attachEvent(\"onDragEnd\", function(id, mode, e){\r\n for (let i = 0; i < dndMarkers.length; i++) {\r\n scheduler.unmarkTimespan(dndMarkers[i]);\r\n }\r\n dndMarkers = [];\r\n eventNode = null;\r\n event = null;\r\n });\r\n}","export default function limitPlugin(scheduler){\r\n\r\n\r\n\tscheduler.config.mark_now = true;\r\n\tscheduler.config.display_marked_timespans = true;\r\n\tscheduler.config.overwrite_marked_timespans = true;\r\n\r\n\r\n\tvar dhx_time_block = \"dhx_time_block\";\r\n\tvar default_timespan_type = \"default\";\r\n\tvar fix_options = function(options, days, zones) {\r\n\t\tif (days instanceof Date && zones instanceof Date) {\r\n\t\t\toptions.start_date = days;\r\n\t\t\toptions.end_date = zones;\r\n\t\t} else {\r\n\t\t\toptions.days = days;\r\n\t\t\toptions.zones = zones;\r\n\t\t}\r\n\t\treturn options;\r\n\t};\r\n\tvar get_resulting_options = function(days, zones, sections) {\r\n\t\tvar options = (typeof days == \"object\") ? days : { days: days };\r\n\t\toptions.type = dhx_time_block;\r\n\t\toptions.css = \"\";\r\n\t\tif (zones) {\r\n\t\t\tif (sections)\r\n\t\t\t\toptions.sections = sections;\r\n\t\t\toptions = fix_options(options, days, zones);\r\n\t\t}\r\n\t\treturn options;\r\n\t};\r\n\tscheduler.blockTime = function(days, zones, sections){\r\n\t\tvar options = get_resulting_options(days, zones, sections);\r\n\t\treturn scheduler.addMarkedTimespan(options);\r\n\t};\r\n\tscheduler.unblockTime = function(days, zones, sections) {\r\n\t\tzones = zones || \"fullday\";\r\n\t\tvar options = get_resulting_options(days, zones, sections);\r\n\t\treturn scheduler.deleteMarkedTimespan(options);\r\n\t};\r\n\r\n\tscheduler.checkInMarkedTimespan = function(ev, timespan_type, on_overlap){\r\n\t\ttimespan_type = timespan_type || default_timespan_type;\r\n\r\n\t\tvar res = true;\r\n\t\tvar temp_start_date = new Date(ev.start_date.valueOf());\r\n\t\tvar temp_end_date = scheduler.date.add(temp_start_date, 1, \"day\");\r\n\t\tvar timespans = scheduler._marked_timespans;\r\n\t\tfor (; temp_start_date < ev.end_date; temp_start_date = scheduler.date.date_part(temp_end_date), temp_end_date = scheduler.date.add(temp_start_date, 1, \"day\") ) {\r\n\t\t\tvar day_value = +scheduler.date.date_part( new Date(temp_start_date) ); // the first part of event not necessarily contains only date part\r\n\t\t\tvar day_index = temp_start_date.getDay();\r\n\r\n\t\t\tvar zones = getZones(ev, timespans, day_index, day_value, timespan_type);\r\n\t\t\tif (zones){\r\n\t\t\t\tfor (var i = 0; i < zones.length; i+=2) {\r\n\r\n\t\t\t\t\t// they may change for new event if it passes limit zone\r\n\t\t\t\t\tvar eventStart = scheduler._get_zone_minutes(temp_start_date);\r\n\t\t\t\t\tvar eventEnd = ( ev.end_date>temp_end_date || ev.end_date.getDate() != temp_start_date.getDate() ) ? 1440 : scheduler._get_zone_minutes(ev.end_date);\r\n\r\n\t\t\t\t\tvar markerStart = zones[i];\r\n\t\t\t\t\tvar markerEnd = zones[i+1];\r\n\t\t\t\t\tif (markerStarteventStart) {\r\n\t\t\t\t\t\tif(typeof on_overlap == \"function\"){\r\n\t\t\t\t\t\t\t//handler allows to cancel overlapping\r\n\t\t\t\t\t\t\t//actually needed only to keep default behavior of limits\r\n\t\t\t\t\t\t\tres = on_overlap(ev, eventStart, eventEnd, markerStart, markerEnd);//event object, event start/end minutes in 'zones' format, zone start/end minutes\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tres = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(!res)\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn !res;\r\n\t};\r\n\tscheduler.checkLimitViolation = function(event){\r\n\t\tif(!event)\r\n\t\t\treturn true;\r\n\t\tif (!scheduler.config.check_limits)\r\n\t\t\treturn true;\r\n\t\tvar s = scheduler;\r\n\t\tvar c = s.config;\r\n\t\tvar evs = [];\r\n\t\tif ((event.rec_type && event._end_date) || (event.rrule)) {\r\n\t\t\tconst seriesEnd = event._end_date || event.end_date;\r\n\t\t\t// GS-2482 need to take into account that a part of recurring events might be outside the limits\r\n\t\t\tif ((c.limit_start && c.limit_end)) {\r\n\t\t\t\tvar recEventInLimits = seriesEnd.valueOf() >= c.limit_start.valueOf() && event.start_date.valueOf() <= c.limit_end.valueOf();\r\n\t\t\t\treturn recEventInLimits;\r\n\t\t\t} else return true;\r\n\t\t} else {\r\n\t\t\tevs = [event];\r\n\t\t}\r\n\r\n\t\tvar complete_res = true;\r\n\t\tfor (var p=0; p= c.limit_start.valueOf() && ev.end_date.valueOf() <= c.limit_end.valueOf()) : true;\r\n\t\t\tif (res){\r\n\t\t\t\tres = !scheduler.checkInMarkedTimespan(ev, dhx_time_block, function(event, eventStart, eventEnd, markerStart, markerEnd){\r\n\t\t\t\t\t//try crop event to allow placing\r\n\t\t\t\t\tvar allow = true;\r\n\t\t\t\t\tif (eventStart<=markerEnd && eventStart >= markerStart){\r\n\t\t\t\t\t\tif (markerEnd == 24*60 || eventEnd <= markerEnd){\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(event._timed && s._drag_id && s._drag_mode == \"new-size\"){\r\n\t\t\t\t\t\t\tevent.start_date.setHours(0);\r\n\t\t\t\t\t\t\tevent.start_date.setMinutes(markerEnd);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ((eventEnd >= markerStart && eventEnd <= markerEnd) || (eventStart < markerStart && eventEnd > markerEnd)){\r\n\t\t\t\t\t\tif(event._timed && s._drag_id && s._drag_mode == \"new-size\"){\r\n\t\t\t\t\t\t\tevent.end_date.setHours(0);\r\n\t\t\t\t\t\t\tevent.end_date.setMinutes(markerStart);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn allow;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\tif (!res) {\r\n\t\t\t\tres = (s.checkEvent(\"onLimitViolation\")) ? s.callEvent(\"onLimitViolation\",[ev.id, ev]) : res;\r\n\t\t\t}\r\n\t\t\tcomplete_res = complete_res && res;\r\n\t\t}\r\n\t\tif(!complete_res){\r\n\t\t\ts._drag_id = null;\r\n\t\t\ts._drag_mode = null;\r\n\t\t}\r\n\t\treturn complete_res;\r\n\r\n\r\n\t};\r\n\tscheduler._get_blocked_zones = function(timespans, property, day_index, day_value, timespan_type){\r\n\t\tvar zones =[];\r\n\t\tif (timespans && timespans[property]) {\r\n\t\t\tvar timeline_zones = timespans[property];\r\n\t\t\tvar blocked_timeline_zones = this._get_relevant_blocked_zones(day_index, day_value, timeline_zones, timespan_type);\r\n\t\t\tfor (var i=0; i this._min_date && now.getHours() >= cfg.first_hour && now.getHours() 1) {\r\n\t\t\t\t\tif(view.size && view.options.length){\r\n\t\t\t\t\t\tday_index = ((view.position+ day_index) / view.options.length) * view.size;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstart_index = day_index;\r\n\t\t\t\t\tend_index = day_index + units_l;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tstart_index = 0;\r\n\t\t\t\t\tend_index = start_index + units_l;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar r_divs = [];\r\n\r\n\t\t\t\tfor (var i = start_index; i < end_index; i++) {\r\n\t\t\t\t\tvar t_day = i; // as each unit is actually considered +1 day\r\n\t\t\t\t\toptions.days = t_day;\r\n\t\t\t\t\tvar t_div = scheduler._render_marked_timespan(options, null, t_day)[0];\r\n\t\t\t\t\tr_divs.push(t_div);\r\n\t\t\t\t}\r\n\t\t\t\treturn r_divs;\r\n\t\t\t} else { // day/week views\r\n\t\t\t\toptions.days = day_index;\r\n\t\t\t\treturn scheduler._render_marked_timespan(options, null, day_index);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\toptions.days = +scheduler.date.date_part(now);\r\n\t\t\t\treturn scheduler._render_marked_timespan(options, null, null);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tscheduler._remove_mark_now = function() {\r\n\t\tvar dhx_now_time = 'dhx_now_time';\r\n\t\tvar els = this._els[dhx_now_time];\r\n\t\tfor (var i=0; i config.start_date) || (config.days !== undefined && config.zones)) && !config.type )\r\n\t\t\treturn r_configs; // incorrect config was provided\r\n\r\n\t\tvar min = 0;\r\n\t\tvar max = 24*60;\r\n\t\tif (config.zones == \"fullday\")\r\n\t\t\tconfig.zones = [min, max];\r\n\t\tif (config.zones && config.invert_zones) {\r\n\t\t\tconfig.zones = scheduler.invertZones(config.zones);\r\n\t\t}\r\n\r\n\t\tconfig.id = scheduler.uid();\r\n\t\tconfig.css = config.css||\"\";\r\n\t\tconfig.type = config.type||default_timespan_type;\r\n\r\n\t\tvar sections = config.sections;\r\n\t\tif (sections) {\r\n\t\t\tfor (var view_key in sections) {\r\n\t\t\t\tif (sections.hasOwnProperty(view_key)) {\r\n\t\t\t\t\tvar ids = sections[view_key];\r\n\t\t\t\t\tif (!(ids instanceof Array))\r\n\t\t\t\t\t\tids = [ids];\r\n\t\t\t\t\tfor (var i=0; i t_sd) ? scheduler._get_zone_minutes(start_date) : min;\r\n\t\t\t\t\tvar zone_end = ( end_date > t_ed || end_date.getDate() != t_sd.getDate() ) ? max : scheduler._get_zone_minutes(end_date);\r\n\t\t\t\t\tt_config.zones = [zone_start, zone_end];\r\n\t\t\t\t\tr_configs.push(t_config);\r\n\r\n\t\t\t\t\tt_sd = t_ed;\r\n\t\t\t\t\tt_ed = scheduler.date.add(t_ed, 1, \"day\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (c_config.days instanceof Date)\r\n\t\t\t\t\tc_config.days = (scheduler.date.date_part(c_config.days)).valueOf();\r\n\t\t\t\tc_config.zones = config.zones.slice();\r\n\t\t\t\tr_configs.push(c_config);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn r_configs;\r\n\t};\r\n\tscheduler._get_dates_by_index = function(index, start, end) {\r\n\t\tvar dates = [];\r\n\t\tstart = scheduler.date.date_part(new Date(start||scheduler._min_date));\r\n\t\tend = new Date(end||scheduler._max_date);\r\n\t\tvar start_day = start.getDay();\r\n\t\tvar delta = (index-start_day >= 0) ? (index-start_day) : (7-start.getDay()+index);\r\n\t\tvar t_date = scheduler.date.add(start, delta, \"day\");\r\n\t\tfor (; t_date < end; t_date = scheduler.date.add(t_date, 1, \"week\")) {\r\n\t\t\tdates.push(t_date);\r\n\t\t}\r\n\t\treturn dates;\r\n\t};\r\n\tscheduler._get_css_classes_by_config = function(config) {\r\n\t\tvar css_classes = [];\r\n\t\tif (config.type == dhx_time_block) {\r\n\t\t\tcss_classes.push(dhx_time_block);\r\n\t\t\tif (config.css)\r\n\t\t\t\tcss_classes.push(dhx_time_block+\"_reset\");\r\n\t\t}\r\n\t\tcss_classes.push(\"dhx_marked_timespan\", config.css);\r\n\t\treturn css_classes.join(\" \");\r\n\t};\r\n\tscheduler._get_block_by_config = function(config) {\r\n\t\tvar block = document.createElement(\"div\");\r\n\t\tif (config.html) {\r\n\t\t\tif (typeof config.html == \"string\")\r\n\t\t\t\tblock.innerHTML = config.html;\r\n\t\t\telse\r\n\t\t\t\tblock.appendChild(config.html);\r\n\t\t}\r\n\t\treturn block;\r\n\t};\r\n\tscheduler._render_marked_timespan = function(options, area, day) {\r\n\t\tvar blocks = []; // resulting block which will be rendered and returned\r\n\t\tvar c = scheduler.config;\r\n\t\tvar min_date = this._min_date;\r\n\t\tvar max_date = this._max_date;\r\n\t\tvar day_value = false; // if timespan for specific date should be displayed\r\n\r\n\t\tif (!c.display_marked_timespans)\r\n\t\t\treturn blocks;\r\n\r\n\t\t// in case of markTimespan\r\n\t\tif (!day && day !== 0) {\r\n\t\t\tif (options.days < 7)\r\n\t\t\t\tday = options.days;\r\n\t\t\telse {\r\n\t\t\t\tvar date_to_display = new Date(options.days);\r\n\t\t\t\tday_value = +date_to_display;\r\n\r\n\t\t\t\t// in case of markTimespan date could be not in the viewing range, need to return\r\n\t\t\t\tif ( !(+max_date > +date_to_display && +min_date <= +date_to_display) )\r\n\t\t\t\t\treturn blocks;\r\n\r\n\t\t\t\tday = date_to_display.getDay();\r\n\t\t\t}\r\n\r\n\t\t\t// convert day default index (Sun - 0, Sat - 6) to index of hourscales (depends on week_start and config.start_on_monday)\r\n\t\t\tvar min_day = min_date.getDay();\r\n\t\t\tif (min_day > day) {\r\n\t\t\t\tday = 7 - (min_day-day);\r\n\t\t\t} else {\r\n\t\t\t\tday = day - min_day;\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar zones = options.zones;\r\n\t\tvar css_classes = scheduler._get_css_classes_by_config(options);\r\n\r\n\t\tif (scheduler._table_view && scheduler._mode == \"month\") {\r\n\t\t\tvar areas = [];\r\n\t\t\tvar days = [];\r\n\r\n\r\n\t\t\tif (!area) {\r\n\t\t\t\tdays = (day_value) ? [day_value] : scheduler._get_dates_by_index(day);\r\n\t\t\t\tfor (var i=0; i < days.length; i++) {\r\n\t\t\t\t\tareas.push( this._scales[days[i]] );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tareas.push(area);\r\n\t\t\t\tdays.push(day);\r\n\t\t\t}\r\n\r\n\t\t\tfor (var i=0; i < areas.length; i++) {\r\n\t\t\t\tarea = areas[i];\r\n\t\t\t\tday = days[i];\r\n\r\n\t\t\t\tvar sday = this.locate_holder_day(day, false) % this._cols.length;\r\n\r\n\t\t\t\tif(this._ignores[sday]) continue;\r\n\r\n\t\t\t\tvar block_proto = scheduler._get_block_by_config(options);\r\n\t\t\t\tblock_proto.className = css_classes;\r\n\t\t\t\tblock_proto.style.top = \"0px\";\r\n\t\t\t\tblock_proto.style.height = \"100%\";\r\n\t\t\t\t\r\n\t\t\t\tfor (var k=0; k < zones.length; k+=2) {\r\n\t\t\t\t\tvar start = zones[i];\r\n\t\t\t\t\tvar end = zones[i+1];\r\n\t\t\t\t\tif (end <= start)\r\n\t\t\t\t\t\treturn [];\r\n\r\n\t\t\t\t\tvar block = block_proto.cloneNode(true);\r\n\r\n\t\t\t\t\tblock.style.left = \"0px\";\r\n\t\t\t\t\tblock.style.width = \"100%\";\r\n\r\n\t\t\t\t\tarea.appendChild(block);\r\n\t\t\t\t\tblocks.push(block);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvar index = day;\r\n\r\n\t\t\tif(this._ignores[this.locate_holder_day(day, false)]) return blocks;\r\n\r\n\t\t\tif (this._props && this._props[this._mode] && options.sections && options.sections[this._mode]) {\r\n\t\t\t\tvar view = this._props[this._mode];\r\n\t\t\t\tindex = view.order[options.sections[this._mode]];\r\n\r\n\t\t\t\tvar inner_index = view.order[options.sections[this._mode]];\r\n\t\t\t\tif(!(view.days > 1)){\r\n\t\t\t\t\tindex = inner_index;\r\n\t\t\t\t\tif (view.size && (index > view.position+view.size)) {\r\n\t\t\t\t\t\tindex = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar units_l = view.size || view.options.length;\r\n\t\t\t\t\tindex = index*units_l + inner_index;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tarea = area ? area : scheduler.locate_holder(index);\r\n\r\n\t\t\tfor (var i = 0; i < zones.length; i+=2){\r\n\t\t\t\tvar start = Math.max(zones[i], c.first_hour*60);\r\n\t\t\t\tvar end = Math.min(zones[i+1], c.last_hour*60);\r\n\t\t\t\tif (end <= start) {\r\n\t\t\t\t\tif (i+2 < zones.length)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\treturn [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar block = scheduler._get_block_by_config(options);\r\n\t\t\t\tblock.className = css_classes;\r\n\r\n\t\t\t\t// +1 for working with section which really takes up whole height (as % would be == 0)\r\n\t\t\t\tvar all_hours_height = this.config.hour_size_px*24 + 1;\r\n\t\t\t\tvar hour_ms = 60*60*1000;\r\n\t\t\t\tblock.style.top = (Math.round((start*60*1000-this.config.first_hour*hour_ms)*this.config.hour_size_px/hour_ms) % all_hours_height) + \"px\";\r\n\t\t\t\tblock.style.height = Math.max((Math.round(((end-start)*60*1000)*this.config.hour_size_px/hour_ms)) % all_hours_height, 1)+\"px\";\r\n\r\n\t\t\t\tarea.appendChild(block);\r\n\t\t\t\tblocks.push(block);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn blocks;\r\n\t};\r\n\r\n\tscheduler._mark_timespans = function(){\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\t\tvar divs = [];\r\n\t\tif (scheduler._table_view && scheduler._mode == \"month\"){\r\n\t\t\tfor (var day in this._scales) {\r\n\t\t\t\tvar date = new Date(+day);\r\n\t\t\t\tdivs.push.apply(divs, scheduler._on_scale_add_marker(this._scales[day],date));\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\t//manually trigger rendering of configs for each column\r\n\t\t\tvar date = new Date(scheduler._min_date);\r\n\t\t\tfor (var i = 0, len = data.childNodes.length; i < len; i++) {\r\n\t\t\t\tvar area = data.childNodes[i];\r\n\t\t\t\tif (area.firstChild && scheduler._getClassName(area.firstChild).indexOf(\"dhx_scale_hour\") > -1) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdivs.push.apply(divs, scheduler._on_scale_add_marker(area, date));\r\n\t\t\t\tdate = scheduler.date.add(date, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn divs;\r\n\t};\r\n\r\n\t// just marks timespan, will be cleaned after refresh\r\n\tscheduler.markTimespan = function(configuration) {\r\n\t\tif(!this._els){\r\n\t\t\tthrow new Error(\"`scheduler.markTimespan` can't be used before scheduler initialization. Place `scheduler.markTimespan` call after `scheduler.init`.\");\r\n\t\t}\r\n\r\n\r\n\t\tvar rebuild_els = false;\r\n\t\tif(!this._els[\"dhx_cal_data\"]){\r\n\t\t\tscheduler.get_elements();\r\n\t\t\trebuild_els = true;\r\n\t\t}\r\n\r\n\r\n\t\t// backup regular marked timespans\r\n\t\tvar timespans_ids = scheduler._marked_timespans_ids,\r\n\t\t\ttimespan_types = scheduler._marked_timespans_types,\r\n\t\t\ttimespans = scheduler._marked_timespans;\r\n\r\n\t\tscheduler.deleteMarkedTimespan();\r\n\r\n\t\t//add block to configs\r\n\t\tscheduler.addMarkedTimespan(configuration);\r\n\r\n\t\tvar divs = scheduler._mark_timespans();\r\n\r\n\t\tif(rebuild_els)\r\n\t\t\tscheduler._els = [];\r\n\r\n\t\t// restore timespan config\r\n\t\tscheduler._marked_timespans_ids = timespans_ids;\r\n\t\tscheduler._marked_timespans_types = timespan_types;\r\n\t\tscheduler._marked_timespans = timespans;\r\n\r\n\t\treturn divs;\r\n\t};\r\n\tscheduler.unmarkTimespan = function(divs) {\r\n\t\tif (!divs)\r\n\t\t\treturn;\r\n\t\tfor (var i=0; i c_zone_end && zone_start <= c_zone_end) || (zone_start < c_zone_start && zone_end >= c_zone_start)) {\r\n\t\t\t\t\tresulting_zones[i] = Math.min(c_zone_start, zone_start);\r\n\t\t\t\t\tresulting_zones[i+1] = Math.max(c_zone_end, zone_end);\r\n\t\t\t\t\ti -= 2;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!isLast) // do nothing, maybe next current zone will match or will be last\r\n\t\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\t\tvar offset = (c_zone_start > zone_start)?0:2;\r\n\t\t\t\t\tresulting_zones.splice(i+offset, 0, zone_start, zone_end); // last current zone, need to add another\r\n\t\t\t\t}\r\n\t\t\t\tzones.splice(k--,2); // zone was merged or added, need to exclude it\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn resulting_zones;\r\n\t};\r\n\tscheduler._subtract_timespan_zones = function(current_zones, zones) {\r\n\t\tvar resulting_zones = current_zones.slice();\r\n\t\tfor (var i=0; i c_zone_start && zone_start < c_zone_end) {\r\n\t\t\t\t\tvar is_modified = false;\r\n\t\t\t\t\tif (c_zone_start >= zone_start && c_zone_end <= zone_end) {\r\n\t\t\t\t\t\tresulting_zones.splice(i, 2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (c_zone_start < zone_start) {\r\n\t\t\t\t\t\tresulting_zones.splice(i, 2, c_zone_start, zone_start);\r\n\t\t\t\t\t\tis_modified = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (c_zone_end > zone_end) {\r\n\t\t\t\t\t\tresulting_zones.splice( (is_modified)?(i+2):i, (is_modified)?0:2, zone_end, c_zone_end);\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti -= 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn resulting_zones;\r\n\t};\r\n\tscheduler.invertZones = function(zones) {\r\n\t\treturn scheduler._subtract_timespan_zones([0, 1440], zones.slice());\r\n\t};\r\n\tscheduler._delete_marked_timespan_by_id = function(id) {\r\n\t\tvar configs = scheduler._marked_timespans_ids[id];\r\n\t\tif (configs) {\r\n\t\t\tfor (var i=0; i 1)){\r\n\t\t\t\tday = scheduler.date.date_part(new Date(this._date)); // for units view actually only 1 day is displayed yet the day variable will change, need to use this._date for all calls\r\n\t\t\t}else{\r\n\t\t\t\tvar dx = 24*60*60*1000;\r\n\t\t\t\tvar day_ind = Math.round((day - scheduler._min_date)/dx);\r\n\t\t\t\tvar unitsPerDay = view.size || units.length;\r\n\t\t\t\tday = scheduler.date.add(scheduler._min_date, Math.floor(day_ind/unitsPerDay), \"day\"); // to the \"same\" day for all sections\r\n\t\t\t\tday = scheduler.date.date_part(day);\r\n\t\t\t}\r\n\t\t\tday_index = day.getDay();\r\n\t\t\tday_value = day.valueOf();\r\n\r\n\t\t\tif (timespans[mode] && timespans[mode][unit.key]) {\r\n\t\t\t\tvar unit_zones = timespans[mode][unit.key];\r\n\t\t\t\tvar unit_types = scheduler._get_types_to_render(unit_zones[day_index], unit_zones[day_value]);\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(unit_types));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar global_data = timespans[\"global\"];\r\n\r\n\t\tif(scheduler.config.overwrite_marked_timespans){\r\n\t\t\tvar day_types = global_data[day_value]||global_data[day_index];\r\n\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(day_types));\r\n\t\t} else {\r\n\t\t\tif(global_data[day_value]){\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(global_data[day_value]));\r\n\t\t\t}\r\n\t\t\tif(global_data[day_index]){\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(global_data[day_index]));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (var i=0; i {\r\n\t\t\tif(date){\r\n\t\t\t\tcalls.setModeDate.date = date;\r\n\t\t\t}\r\n\t\t\tif(mode){\r\n\t\t\t\tcalls.setModeDate.mode = mode;\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tvar methods = {\r\n\t\t\trender:(date, mode) => {calls.needRender = true; rememberModeDate(date, mode);},\r\n\t\t\tsetCurrentView:(date, mode) => {calls.needRender = true; rememberModeDate(date, mode);},\r\n\t\t\tupdateView:(date, mode) => {calls.needUpdateView = true; rememberModeDate(date, mode);},\r\n\t\t\trender_data:() => calls.needRender = true,\r\n\t\t\trender_view_data:(evs) => { \r\n\t\t\t\tif(evs && evs.length){\r\n\t\t\t\t\tevs.forEach((e) => calls.repaintEvents[e.id] = true);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcalls.needRender = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tdisableMethods.call(this, methods);\r\n\r\n\t\tisActive = true;\r\n\t\tthis.callEvent(\"onBeforeBatchUpdate\", []);\r\n\r\n\t\tbatchUpdatePayload(callback);\r\n\r\n\t\tthis.callEvent(\"onAfterBatchUpdate\", []);\r\n\r\n\t\trestoreMethods.call(this);\r\n\r\n\t\tisActive = false;\r\n\t\tif(!noRedraw){\r\n\t\t\tif(calls.needRender){\r\n\t\t\t\tscheduler.render(calls.setModeDate.date, calls.setModeDate.mode);\r\n\t\t\t}else if(calls.needUpdateView){\r\n\t\t\t\tscheduler.updateView(calls.setModeDate.date, calls.setModeDate.mode);\r\n\t\t\t}else{\r\n\t\t\t\tfor(const i in calls.repaintEvents){\r\n\t\t\t\t\tscheduler.updateEvent(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (call_dp) {\r\n\t\t\tthis._dp.setUpdateMode(dp_mode);\r\n\t\t\tthis._dp.sendData();\r\n\t\t}\r\n\t};\r\n}\r\n\r\nexport default function(scheduler){\r\n\tscheduler.batchUpdate = createMethod(scheduler);\r\n}","import dragHighlightPos from \"./drag_highlight_pos\";\r\nimport undoDelete from \"./undo_delete\";\r\nimport limit from \"./limit\";\r\nimport batchUpdate from \"./batch_update\";\r\n\r\nexport default function initPlugins(scheduler){\r\n undoDelete(scheduler);\r\n dragHighlightPos(scheduler);\r\n limit(scheduler);\r\n batchUpdate(scheduler);\r\n}","export default function undoDelete(scheduler) {\r\n\tscheduler.attachEvent(\"onEventDeleted\", function (id, ev) {\r\n\t\tlet deletedEvent = scheduler.copy(ev);\r\n\t\tif (scheduler.config.undo_deleted && !scheduler.getState().new_event) {\r\n\t\t\tscheduler.message({\r\n\t\t\t\ttext: `
\r\n Event deleted\r\n \r\n
`,\r\n\t\t\t\texpire: 10000,\r\n\t\t\t\ttype: \"popup_after_delete\",\r\n\t\t\t\tcallback: function (e) {\r\n\t\t\t\t\tlet undoBtn = e.target.closest(\r\n\t\t\t\t\t\t`[data-deleted-event-id=\"${ev.id}\"]`\r\n\t\t\t\t\t);\r\n\t\t\t\t\tif (undoBtn) {\r\n\t\t\t\t\t\tscheduler.addEvent(deletedEvent);\r\n\t\t\t\t\t\tscheduler.render();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t});\r\n}\r\n","var uidSeed = Date.now();\r\nfunction uid () {\r\n\treturn uidSeed++;\r\n}\r\n\r\n// iframe-safe array type check instead of using instanceof\r\nfunction isArray(obj){\r\n\tif(Array.isArray){\r\n\t\treturn Array.isArray(obj);\r\n\t}else{\r\n\t\t// close enough\r\n\t\treturn (obj && obj.length !== undefined && obj.pop && obj.push);\r\n\t}\r\n}\r\n\r\n// non-primitive string object, e.g. new String(\"abc\")\r\nfunction isStringObject(obj){\r\n\treturn obj && typeof obj === \"object\" && \r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function String() { [native code] }\";\r\n}\r\n\r\n// non-primitive number object, e.g. new Number(5)\r\nfunction isNumberObject(obj){\r\n\treturn obj && typeof obj === \"object\" && \r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function Number() { [native code] }\";\r\n}\r\n\r\n// non-primitive number object, e.g. new Boolean(true)\r\nfunction isBooleanObject(obj){\r\n\treturn obj && typeof obj === \"object\" &&\r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function Boolean() { [native code] }\";\r\n}\r\n\r\nfunction isDate(obj) {\r\n\tif (obj && typeof obj === \"object\") {\r\n\t\treturn !!(obj.getFullYear && obj.getMonth && obj.getDate);\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\nfunction defined(obj) {\r\n\treturn typeof(obj) != \"undefined\";\r\n}\r\n\r\nfunction delay (callback, timeout){\r\n\tvar timer;\r\n\r\n\tvar result = function() {\r\n\t\tresult.$cancelTimeout();\r\n\t\tresult.$pending = true;\r\n\t\tvar args = Array.prototype.slice.call(arguments);\r\n\t\ttimer = setTimeout(function(){\r\n\t\t\tcallback.apply(this, args);\r\n\t\t\tresult.$pending = false;\r\n\t\t}, timeout);\r\n\t};\r\n\r\n\tresult.$pending = false;\r\n\tresult.$cancelTimeout = function(){\r\n\t\tclearTimeout(timer);\r\n\t\tresult.$pending = false;\r\n\t};\r\n\tresult.$execute = function(){\r\n\t\tvar args = Array.prototype.slice.call(arguments);\r\n\t\tcallback.apply(this, args);\r\n\t\tresult.$cancelTimeout();\r\n\t};\r\n\r\n\treturn result;\r\n}\r\n\r\nexport default {\r\n\tuid: uid,\r\n\tmixin: function mixin (target, source, force){\r\n\t\tfor (var f in source)\r\n\t\t\tif (((target[f] === undefined) || force)) target[f]=source[f];\r\n\t\treturn target;\r\n\t},\r\n\tcopy: function copy(object) {\r\n\t\tvar i, result; // iterator, types array, result\r\n\t\r\n\t\tif (object && typeof object == \"object\") {\r\n\t\r\n\t\t\tswitch (true){\r\n\t\t\t\tcase (isDate(object)):\r\n\t\t\t\t\tresult = new Date(object);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isArray(object)):\r\n\t\t\t\t\tresult = new Array(object.length);\r\n\t\t\t\t\tfor(i = 0; i < object.length; i++){\r\n\t\t\t\t\t\tresult[i] = copy(object[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isStringObject(object)):\r\n\t\t\t\t\tresult = new String(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isNumberObject(object)):\r\n\t\t\t\t\tresult = new Number(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isBooleanObject(object)):\r\n\t\t\t\t\tresult = new Boolean(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tresult = {};\r\n\t\t\t\t\tfor (i in object) {\r\n\t\t\t\t\t\tconst varType = typeof object[i];\r\n\r\n\t\t\t\t\t\tif (varType === \"string\" || varType === \"number\" || varType === \"boolean\" ) {\r\n\t\t\t\t\t\t\tresult[i] = object[i];\r\n\t\t\t\t\t\t} else if(isDate(object[i])){\r\n\t\t\t\t\t\t\tresult[i] = new Date(object[i]);\r\n\t\t\t\t\t\t}else if (Object.prototype.hasOwnProperty.apply(object, [i]))\r\n\t\t\t\t\t\t\tresult[i] = copy(object[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result || object;\r\n\t},\r\n\tdefined,\r\n\tisDate,\r\n\tdelay\r\n};\r\n","export default function extend(scheduler) {\r\n\r\nfunction div(className){\r\n\tvar element = document.createElement(\"div\");\r\n\tvar classes = (className || \"\").split(\" \");\r\n\tclasses.forEach(function(cssClass){\r\n\t\telement.classList.add(cssClass);\r\n\t});\r\n\treturn element;\r\n}\r\nvar itemTypes = {\r\n\trows_container: function(){\r\n\t\treturn div(\"dhx_cal_navbar_rows_container\");\r\n\t},\r\n\trow: function(){\r\n\t\treturn div(\"dhx_cal_navbar_row\");\r\n\t},\r\n\tview: function (config) {\r\n\t\tvar element = div(\"dhx_cal_tab\");\r\n\t\telement.setAttribute(\"name\", config.view + \"_tab\");\r\n\t\telement.setAttribute(\"data-tab\", config.view);\r\n\t\t// element.setAttribute(\"data-viewname\", config.view); // FIXME: need to remove? not used anywhere\r\n\t\tif(scheduler.config.fix_tab_position){\r\n\t\t\tif(config.$firstTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_first\");\r\n\t\t\t}else if(config.$lastTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_last\");\r\n\t\t\t} else if(config.view !== \"week\") {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_standalone\");\r\n\t\t\t}\r\n\r\n\t\t\tif(config.$segmentedTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn element;\r\n\t},\r\n\tdate: function () {\r\n\t\treturn div(\"dhx_cal_date\");\r\n\t},\r\n\tbutton: function (config) {\r\n\t\treturn div(\"dhx_cal_nav_button dhx_cal_nav_button_custom dhx_cal_tab\");\r\n\t},\r\n\tbuiltInButton: function (config){\r\n\t\treturn div(\"dhx_cal_\" + config.view + \"_button dhx_cal_nav_button\");\r\n\t},\r\n\tspacer: function () {\r\n\t\treturn div(\"dhx_cal_line_spacer\");\r\n\t},\r\n\tminicalendarButton: function(config){\r\n\t\tvar minicalendarDiv = div('dhx_minical_icon');\r\n\t\tif(!config.click && !minicalendarDiv.$_eventAttached){\r\n\t\t\t\r\n\t\t\tscheduler.event(minicalendarDiv, \"click\", function () {\r\n\t\t\t\tif (scheduler.isCalendarVisible()) {\r\n\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tscheduler.renderCalendar({\r\n\t\t\t\t\t\tposition: this,\r\n\t\t\t\t\t\tdate: scheduler.getState().date,\r\n\t\t\t\t\t\tnavigation: true,\r\n\t\t\t\t\t\thandler: function (date, calendar) {\r\n\t\t\t\t\t\t\tscheduler.setCurrentView(date);\r\n\t\t\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn minicalendarDiv;\r\n\t},\r\n\thtml_element: function (config) {\r\n\t\treturn div(\"dhx_cal_nav_content\");\r\n\t}\r\n};\r\n\r\nfunction findRenderer(config) {\r\n\tvar renderer;\r\n\tif (config.view) {\r\n\t\tswitch (config.view){\r\n\t\t\tcase \"today\":\r\n\t\t\tcase \"next\":\r\n\t\t\tcase \"prev\":\r\n\t\t\t\trenderer = itemTypes.builtInButton;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"date\":\r\n\t\t\t\trenderer = itemTypes.date;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"spacer\":\r\n\t\t\t\trenderer = itemTypes.spacer;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"button\":\r\n\t\t\t\trenderer = itemTypes.button;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"minicalendar\":\r\n\t\t\t\trenderer = itemTypes.minicalendarButton;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\trenderer = itemTypes.view;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t} else if(config.rows) {\r\n\t\trenderer = itemTypes.rows_container;\r\n\t} else if(config.cols) {\r\n\t\trenderer = itemTypes.row;\r\n\t}\r\n\treturn renderer;\r\n}\r\n\r\nfunction renderElement(config){\r\n\tvar renderer = findRenderer(config);\r\n\tif(!renderer){\r\n\t\treturn;\r\n\t}\r\n\tvar element = renderer(config);\r\n\tif(config.css){\r\n\t\telement.classList.add(config.css);\r\n\t}\r\n\tif(config.width){\r\n\t\tvar value = config.width;\r\n\t\tif(value === value * 1){\r\n\t\t\tvalue += \"px\";\r\n\t\t}\r\n\t\telement.style.width = value;\r\n\t}\r\n\tif(config.height){\r\n\t\tvar value = config.height;\r\n\t\tif(value === value * 1){\r\n\t\t\tvalue += \"px\";\r\n\t\t}\r\n\t\telement.style.height = value;\r\n\t}\r\n\tif (config.click) {\r\n\t\tscheduler.event(element, \"click\", config.click);\r\n\t}\r\n\tif (config.html) {\r\n\t\telement.innerHTML = config.html;\r\n\t}\r\n\r\n\tif (config.align) {\r\n\t\tvar value = \"\";\r\n\t\tif (config.align == \"right\") {\r\n\t\t\tvalue = \"flex-end\";\r\n\t\t} else if(config.align == \"left\") {\r\n\t\t\tvalue = \"flex-start\";\r\n\t\t}\r\n\t\telement.style.justifyContent = value;\r\n\t}\r\n\treturn element;\r\n}\r\n\r\nfunction prepareConfig(config) {\r\n\tif (typeof config === \"string\") {\r\n\t\tconfig = {\r\n\t\t\tview: config\r\n\t\t};\r\n\t}\r\n\tif (!config.view && !config.rows && !config.cols) {\r\n\t\tconfig.view = \"button\";\r\n\t}\r\n\treturn config;\r\n}\r\n\r\nfunction renderLayout(config) {\r\n\tvar fragment = document.createDocumentFragment();\r\n\tvar items;\r\n\tif(Array.isArray(config)){\r\n\t\titems = config;\r\n\t}else{\r\n\t\titems = [config];\r\n\t}\r\n\r\n\tfor (var i = 0; i < items.length; i++) {\r\n\t\tvar view = prepareConfig(items[i]);\r\n\r\n\t\tif(view.view === \"day\" && items[i + 1]){\r\n\t\t\tvar next = prepareConfig(items[i + 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"month\"){\r\n\t\t\t\tview.$firstTab = true;\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(view.view === \"week\" && items[i - 1]){\r\n\t\t\tvar next = prepareConfig(items[i + 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"month\"){\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(view.view === \"month\" && items[i - 1]){\r\n\t\t\tvar next = prepareConfig(items[i - 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"day\"){\r\n\t\t\t\tview.$lastTab = true;\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar element = renderElement(view);\r\n\r\n\t\tfragment.appendChild(element);\r\n\t\tif(view.cols || view.rows){\r\n\t\t\telement.appendChild(renderLayout(view.cols || view.rows));\r\n\t\t}\r\n\t}\r\n\treturn fragment;\r\n}\r\n\r\nscheduler._init_nav_bar = function (items) {\r\n\tvar navBar = this.$container.querySelector(\".dhx_cal_navline\");\r\n\tif (!navBar){\r\n\t\tnavBar = document.createElement(\"div\");\r\n\t\tnavBar.className = \"dhx_cal_navline dhx_cal_navline_flex\";\r\n\t\tscheduler._update_nav_bar(items, navBar);\r\n\t\treturn navBar;\r\n\t}\r\n\treturn navBar;\r\n};\r\n\r\nvar previousNavbar = null;\r\nvar previousHeight = null;\r\nscheduler._update_nav_bar = function (config, container) {\r\n\r\n\tif(!config){\r\n\t\treturn;\r\n\t}\r\n\tvar heightChanged = false;\r\n\tvar configChanged = false;\r\n\r\n\tvar newHeight = config.height || scheduler.xy.nav_height;\r\n\r\n\tif(previousHeight === null ||\r\n\t\t\t(previousHeight !== newHeight)){\r\n\t\theightChanged = true;\r\n\t}\r\n\tif(!previousNavbar || JSON.stringify(config) !== previousNavbar){\r\n\t\tconfigChanged = true;\r\n\t}\r\n\r\n\tif(heightChanged){\r\n\t\tscheduler.xy.nav_height = newHeight;\r\n\t}\r\n\tif(configChanged){\r\n\t\tcontainer.innerHTML = \"\";\r\n\t\tcontainer.appendChild(renderLayout(config));\r\n\t}\r\n\r\n\tif(heightChanged || configChanged){\r\n\t\tscheduler.unset_actions();\r\n\t\tscheduler._els = [];\r\n\t\tscheduler.get_elements();\r\n\t\tscheduler.set_actions();\r\n\t}\r\n\r\n\tif(newHeight === 0){\r\n\t\tcontainer.style.display = \"none\";\r\n\t}else{\r\n\t\tcontainer.style.display = \"\";\r\n\t}\r\n\r\n\tpreviousHeight = newHeight;\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\tfunction isAttachedNode(container){\r\n\t\tvar root = document.body;\r\n\t\r\n\t\twhile(container && container != root){\r\n\t\t\tcontainer = container.parentNode;\r\n\t\t}\r\n\t\r\n\t\treturn !!(root == container);\r\n\t}\r\n\t\r\n\tfunction getWindowSize(window){\r\n\t\treturn {\r\n\t\t\tw : window.innerWidth || document.documentElement.clientWidth,\r\n\t\t\th : window.innerHeight || document.documentElement.clientHeight\r\n\t\t};\r\n\t}\r\n\tfunction equals(a,b){\r\n\t\treturn a.w == b.w && a.h == b.h;\r\n\t}\r\n\t\r\n\tfunction listenWindowResize(scheduler, window){\r\n\t\tvar oldSize = getWindowSize(window);\r\n\t\tvar resizeDelay;\r\n\t\tscheduler.event(window, \"resize\", function(){\r\n\t\t\tclearTimeout(resizeDelay);\r\n\t\t\tresizeDelay = setTimeout(function(){\r\n\r\n\t\t\t\tif (!isAttachedNode(scheduler.$container) || scheduler.$destroyed){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tvar newSize = getWindowSize(window);\r\n\t\t\t\t// element may be resized by container-autoresize exteinsion\r\n\t\t\t\t// check if the size is actually changed in order to not to get endless loop\r\n\t\t\t\tif (!equals(oldSize, newSize)) {\r\n\t\t\t\t\toldSize = newSize;\r\n\t\t\t\t\ttriggerSchedulerResize(scheduler);\r\n\t\t\t\t}\r\n\t\t\t}, 150);\r\n\t\t});\r\n\t}\r\n\t\r\n\tfunction triggerSchedulerResize(scheduler){\r\n\t\tif(scheduler.$destroyed || !scheduler.$root || !isAttachedNode(scheduler.$root)){\r\n\t\t\treturn;\t\r\n\t\t}\r\n\t\tif (scheduler.callEvent(\"onSchedulerResize\", [])) {\r\n\t\t\tscheduler.updateView();\r\n\t\t\tscheduler.callEvent(\"onAfterSchedulerResize\", []);\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction watchNodeResize(scheduler){\r\n\t\tvar previousHeight = scheduler.$root.offsetHeight;\r\n\t\tvar previousWidth = scheduler.$root.offsetWidth;\r\n\t\t\r\n\t\tfunction lowlevelResizeWatcher(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(scheduler.$root){\r\n\t\t\t\tif (scheduler.$root.offsetHeight != previousHeight ||\r\n\t\t\t\t\tscheduler.$root.offsetWidth != previousWidth){\r\n\t\t\t\t\ttriggerSchedulerResize(scheduler);\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\tpreviousHeight = scheduler.$root.offsetHeight;\r\n\t\t\t\tpreviousWidth = scheduler.$root.offsetWidth;\r\n\t\t\t}\r\n\t\r\n\t\t\tsetTimeout(lowlevelResizeWatcher, 200);\r\n\t\t}\r\n\t\t\r\n\t\tlowlevelResizeWatcher();\r\n\t}\r\n\t\r\n\tfunction addResizeListener(scheduler){\r\n\t\tvar root = scheduler.$container;\r\n\t\tvar containerStyles = window.getComputedStyle(root);\r\n\t\tif(containerStyles.getPropertyValue(\"position\") == \"static\"){\r\n\t\t\troot.style.position = \"relative\";\r\n\t\t}\r\n\t\r\n\t\tvar resizeWatcher = document.createElement('iframe');\r\n\t\tresizeWatcher.className = \"scheduler_container_resize_watcher\";\r\n\t\tresizeWatcher.tabIndex = -1;\r\n\t\tif(scheduler.config.wai_aria_attributes){\r\n\t\t\tresizeWatcher.setAttribute(\"role\", \"none\");\r\n\t\t\tresizeWatcher.setAttribute(\"aria-hidden\", true);\r\n\t\t}\r\n\t\r\n\t\t// in some environments (namely, in SalesForce) iframe.contentWindow is not available\r\n\t\tvar salesforce_environment = !!window[\"Sfdc\"] || !!window[\"$A\"] || window[\"Aura\"];\r\n\t\tif(salesforce_environment){\r\n\t\t\twatchNodeResize(scheduler);\r\n\t\t} else {\r\n\t\t\troot.appendChild(resizeWatcher);\r\n\t\t\tif (resizeWatcher.contentWindow) {\r\n\t\t\t\tlistenWindowResize(scheduler, resizeWatcher.contentWindow);\r\n\t\t\t} else {\r\n\t\t\t\t// if so - ditch the iframe and fallback to listening the main window resize\r\n\t\t\t\troot.removeChild(resizeWatcher);\r\n\t\t\t\tlistenWindowResize(scheduler, window);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\taddResizeListener(scheduler);\r\n\r\n}","class EventHost {\r\n\tconstructor(){\r\n\t\tthis._silent_mode = false;\r\n\t\tthis.listeners = {};\r\n\t}\r\n\t_silentStart(){\r\n\t\tthis._silent_mode = true;\r\n\t}\r\n\t_silentEnd() {\r\n\t\tthis._silent_mode = false;\r\n\t}\r\n}\r\n\r\nconst createEventStorage = function(obj) {\r\n\tlet handlers = {};\r\n\tlet index = 0;\r\n\tconst eventStorage = function(){\r\n\t\tlet combinedResult = true;\r\n\t\tfor(const i in handlers){\r\n\t\t\tconst handlerResult = handlers[i].apply(obj, arguments);\r\n\t\t\tcombinedResult=combinedResult && handlerResult;\r\n\t\t}\r\n\t\treturn combinedResult;\r\n\t};\r\n\teventStorage.addEvent=function(handler, settings){\r\n\t\tif (typeof (handler) == \"function\"){\r\n\t\t\tlet handlerId;\r\n\t\t\tif(settings && settings.id){\r\n\t\t\t\thandlerId = settings.id;\r\n\t\t\t}else{\r\n\t\t\t\thandlerId = index;\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\r\n\t\t\tif(settings && settings.once){\r\n\t\t\t\tconst originalHandler = handler;\r\n\t\t\t\thandler = function(){\r\n\t\t\t\t\toriginalHandler();\r\n\t\t\t\t\teventStorage.removeEvent(handlerId);\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\thandlers[handlerId] = handler;\r\n\t\t\treturn handlerId;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\teventStorage.removeEvent=function(id){\r\n\t\tdelete handlers[id];\r\n\t};\r\n\r\n\teventStorage.clear = function(){\r\n\t\thandlers = {};\r\n\t};\r\n\r\n\treturn eventStorage;\r\n};\r\n\r\nfunction makeEventable(obj){\r\n\r\n\tconst eventHost = new EventHost();\r\n\tobj.attachEvent=function(eventName, handler, settings){\r\n\t\teventName = 'ev_'+eventName.toLowerCase();\r\n\t\tif (!eventHost.listeners[eventName]){\r\n\t\t\teventHost.listeners[eventName] = createEventStorage(this);\r\n\t\t}\r\n\r\n\t\tif(settings && settings.thisObject){\r\n\t\t\thandler = handler.bind(settings.thisObject);\r\n\t\t}\r\n\r\n\t\tconst innerId = eventHost.listeners[eventName].addEvent(handler, settings);\r\n\r\n\t\tlet handlerId = (eventName+':'+innerId); //return ID (ev_eventname:1)\r\n\t\tif(settings && settings.id){\r\n\t\t\thandlerId = settings.id;\r\n\t\t}\r\n\t\treturn handlerId;\r\n\t};\r\n\r\n\tobj.attachAll = function(callback){\r\n\t\tthis.attachEvent('listen_all', callback);\r\n\t};\r\n\r\n\tobj.callEvent=function(name, eventArguments){\r\n\t\tif (eventHost._silent_mode) return true;\r\n\r\n\t\tconst handlerName = 'ev_'+name.toLowerCase();\r\n\r\n\t\tconst listeners = eventHost.listeners;\r\n\t\tif (listeners['ev_listen_all']){\r\n\t\t\tlisteners['ev_listen_all'].apply(this, [name].concat(eventArguments));\r\n\t\t}\r\n\r\n\t\tif (listeners[handlerName])\r\n\t\t\treturn listeners[handlerName].apply(this, eventArguments);\r\n\t\treturn true;\r\n\t};\r\n\r\n\tobj.checkEvent=function(name){\r\n\t\tconst listeners = eventHost.listeners;\r\n\t\treturn (!!listeners['ev_'+name.toLowerCase()]);\r\n\t};\r\n\r\n\tobj.detachEvent=function(id){\r\n\t\tif (id){\r\n\t\t\tlet listeners = eventHost.listeners;\r\n\t\t\tfor(const i in listeners){\r\n\t\t\t\tlisteners[i].removeEvent(id); //remove event\r\n\t\t\t}\r\n\r\n\t\t\tconst list = id.split(':');//get EventName and ID\r\n\t\t\tlisteners = eventHost.listeners;\r\n\t\t\tif(list.length === 2){\r\n\t\t\t\tconst eventName = list[0];\r\n\t\t\t\tconst eventId = list[1];\r\n\t\t\t\tif(listeners[eventName]){\r\n\t\t\t\t\tlisteners[eventName].removeEvent(eventId); //remove event\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tobj.detachAllEvents = function(){\r\n\t\tfor (const name in eventHost.listeners) {\r\n\t\t\teventHost.listeners[name].clear();\r\n\t\t}\r\n\t};\r\n\r\n}\r\n\r\nexport default makeEventable;","export default {\r\n\tevent: function (el, event, handler){\r\n\t\tif (el.addEventListener)\r\n\t\t\tel.addEventListener(event, handler, false);\r\n\t\r\n\t\telse if (el.attachEvent)\r\n\t\t\tel.attachEvent(\"on\"+event, handler);\r\n\t},\r\n\teventRemove: function (el, event, handler){\r\n\t\tif (el.removeEventListener)\r\n\t\t\tel.removeEventListener(event, handler, false);\r\n\t\r\n\t\telse if (el.detachEvent)\r\n\t\t\tel.detachEvent(\"on\"+event, handler);\r\n\t}\r\n};","import createEventScope from './utils/scoped_event';\r\n\r\nexport default function extend(scheduler) {\r\n\r\n\r\nvar domEvents = createEventScope();\r\n\r\nscheduler.event = domEvents.attach;\r\nscheduler.eventRemove = domEvents.detach;\r\nscheduler._eventRemoveAll = domEvents.detachAll;\r\nscheduler._createDomEventScope = domEvents.extend;\r\n\r\n\r\nscheduler._trim = function(str){\r\n\tvar func = String.prototype.trim || function(){ return this.replace(/^\\s+|\\s+$/g, \"\"); };\r\n\treturn func.apply(str);\r\n};\r\n\r\nscheduler._isDate = function(obj){\r\n\tif (obj && typeof obj == \"object\") {\r\n\t\treturn !!(obj.getFullYear && obj.getMonth && obj.getDate);\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n};\r\n\r\nscheduler._isObject = function(obj){\r\n\treturn (obj && typeof obj == \"object\");\r\n};\r\n\r\n}","import defaultDomEvents from './event';\r\n\r\nexport default function(){\r\n\r\n\tvar domEvents = function (addEvent, removeEvent) {\r\n\t\taddEvent = addEvent || defaultDomEvents.event;\r\n\t\tremoveEvent = removeEvent || defaultDomEvents.eventRemove;\r\n\t\tvar handlers = [];\r\n\t\tvar eventScope = {\r\n\t\t\tattach: function(el, event, callback, capture){\r\n\t\t\t\thandlers.push({element: el, event:event, callback: callback, capture: capture});\r\n\t\t\t\taddEvent(el, event, callback, capture);\r\n\t\t\t},\r\n\t\t\tdetach: function(el, event, callback, capture){\r\n\t\t\t\tremoveEvent(el, event, callback, capture);\r\n\t\t\t\tfor(var i = 0; i < handlers.length; i++){\r\n\t\t\t\t\tvar handler = handlers[i];\r\n\t\t\t\t\tif (handler.element === el && handler.event === event && handler.callback === callback && handler.capture === capture) {\r\n\t\t\t\t\t\thandlers.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tdetachAll: function () {\r\n\t\t\t\tvar staticArray = handlers.slice();\r\n\t\t\t\t// original handlers array can be spliced on every iteration\r\n\t\t\t\tfor (var i = 0; i < staticArray.length; i++){\r\n\t\t\t\t\tvar handler = staticArray[i];\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, handler.capture);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, undefined);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, false);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, true);\r\n\t\t\t\t}\r\n\t\t\t\thandlers.splice(0, handlers.length);\r\n\t\t\t},\r\n\t\t\textend: function(){\r\n\t\t\t\treturn domEvents(this.event, this.eventRemove);\r\n\t\t\t}\r\n\t\t};\r\n\t\treturn eventScope;\r\n\t};\r\n\t\r\n\treturn domEvents();\r\n}","//returns position of html element on the page\r\nfunction elementPosition(elem) {\r\n\tvar top=0, left=0, right=0, bottom=0;\r\n\tif (elem.getBoundingClientRect) { //HTML5 method\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\t\tvar body = document.body;\r\n\t\tvar docElem = (document.documentElement ||\r\n\t\t\tdocument.body.parentNode ||\r\n\t\t\tdocument.body);\r\n\r\n\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\t\ttop = box.top + scrollTop - clientTop;\r\n\t\tleft = box.left + scrollLeft - clientLeft;\r\n\r\n\t\tright = document.body.offsetWidth - box.right;\r\n\t\tbottom = document.body.offsetHeight - box.bottom;\r\n\t} else { //fallback to naive approach\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop,10);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft,10);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\r\n\t\tright = document.body.offsetWidth - elem.offsetWidth - left;\r\n\t\tbottom = document.body.offsetHeight - elem.offsetHeight - top;\r\n\t}\r\n\treturn { y: Math.round(top), x: Math.round(left), width:elem.offsetWidth, height:elem.offsetHeight, right: Math.round(right), bottom: Math.round(bottom) };\r\n}\r\n\r\n/*\r\nevent position relatively to DOM element\r\n */\r\nfunction getRelativeEventPosition(ev, node){\r\n\tvar d = document.documentElement;\r\n\tvar box = elementPosition(node);\r\n\r\n\treturn {\r\n\t\tx: ev.clientX - d.clientLeft - box.x + node.scrollLeft,\r\n\t\ty: ev.clientY - d.clientTop - box.y + node.scrollTop\r\n\t};\r\n}\r\n\r\nfunction getNodePosition(elem) {\r\n\tvar top=0, left=0, right=0, bottom=0;\r\n\tif (elem.getBoundingClientRect) { //HTML5 method\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\t\tvar body = document.body;\r\n\t\tvar docElem = (document.documentElement ||\r\n\t\t\tdocument.body.parentNode ||\r\n\t\t\tdocument.body);\r\n\r\n\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\t\ttop = box.top + scrollTop - clientTop;\r\n\t\tleft = box.left + scrollLeft - clientLeft;\r\n\r\n\t\tright = document.body.offsetWidth - box.right;\r\n\t\tbottom = document.body.offsetHeight - box.bottom;\r\n\t} else { //fallback to naive approach\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop,10);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft,10);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\r\n\t\tright = document.body.offsetWidth - elem.offsetWidth - left;\r\n\t\tbottom = document.body.offsetHeight - elem.offsetHeight - top;\r\n\t}\r\n\treturn { y: Math.round(top), x: Math.round(left), width:elem.offsetWidth, height:elem.offsetHeight, right: Math.round(right), bottom: Math.round(bottom) };\r\n}\r\n\r\nfunction getClassName(node){\r\n\tif(!node) return \"\";\r\n\r\n\tvar className = node.className || \"\";\r\n\tif(className.baseVal)//'className' exist but not a string - IE svg element in DOM\r\n\t\tclassName = className.baseVal;\r\n\r\n\tif(!className.indexOf)\r\n\t\tclassName = '';\r\n\r\n\treturn className || \"\";\r\n}\r\n\r\nfunction getTargetNode(e) {\r\n\tvar trg;\r\n\tif (e.tagName)\r\n\t\ttrg = e;\r\n\telse {\r\n\t\te = e || window.event;\r\n\t\ttrg = e.target || e.srcElement;\r\n\t\tif (trg.shadowRoot && e.composedPath) {\r\n\t\t\ttrg = e.composedPath()[0];\r\n\t\t}\r\n\t}\r\n\treturn trg;\r\n}\r\n\r\nfunction locateCss(e, classname, strict){\r\n\tif(strict === undefined)\r\n\t\tstrict = true;\r\n\r\n\tvar trg = e.target || e.srcElement;\r\n\tvar css = '';\r\n\r\n\twhile (trg){\r\n\t\tcss = getClassName(trg);\r\n\r\n\t\tif(css){\r\n\t\t\tvar ind = css.indexOf(classname);\r\n\t\t\tif (ind >= 0){\r\n\t\t\t\tif (!strict)\r\n\t\t\t\t\treturn trg;\r\n\r\n\t\t\t\t//check that we have exact match\r\n\t\t\t\tvar left = (ind === 0) || (!((css.charAt(ind - 1)||\"\").trim()));\r\n\t\t\t\tvar right = ((ind + classname.length >= css.length)) || (!((css.charAt(ind + classname.length)).trim()));\r\n\r\n\t\t\t\tif (left && right)\r\n\t\t\t\t\treturn trg;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttrg=trg.parentNode;\r\n\t}\r\n\treturn null;\r\n}\r\n\r\n\r\n// get focusable nodes\r\nfunction isVisible(node){\r\n\tvar display = false,\r\n\t\tvisibility = false;\r\n\tif(window.getComputedStyle){\r\n\t\tvar style = window.getComputedStyle(node, null);\r\n\t\tdisplay = style[\"display\"];\r\n\t\tvisibility = style[\"visibility\"];\r\n\t}else if(node.currentStyle){\r\n\t\tdisplay = node.currentStyle[\"display\"];\r\n\t\tvisibility = node.currentStyle[\"visibility\"];\r\n\t}\r\n\r\n\tvar hiddenSection = false;\r\n\tvar recurringSection = locateCss({target:node}, \"dhx_form_repeat\", false);\r\n\tif(recurringSection){\r\n\t\thiddenSection = !!(recurringSection.style.height == \"0px\");\r\n\t}\r\n\thiddenSection = hiddenSection || !(node.offsetHeight);\r\n\r\n\treturn (display != \"none\" && visibility != \"hidden\" && !hiddenSection);\r\n}\r\n\r\nfunction hasNonNegativeTabIndex(node){\r\n\treturn !isNaN(node.getAttribute(\"tabindex\")) && (node.getAttribute(\"tabindex\")*1 >= 0);\r\n}\r\n\r\nfunction hasHref(node){\r\n\tvar canHaveHref = {\"a\": true, \"area\": true};\r\n\tif(canHaveHref[node.nodeName.loLowerCase()]){\r\n\t\treturn !!node.getAttribute(\"href\");\r\n\t}\r\n\treturn true;\r\n}\r\n\r\nfunction isEnabled(node){\r\n\tvar canDisable = {\"input\":true, \"select\":true, \"textarea\":true, \"button\":true, \"object\":true};\r\n\tif(canDisable[node.nodeName.toLowerCase()]){\r\n\t\treturn !node.hasAttribute(\"disabled\");\r\n\t}\r\n\r\n\treturn true;\r\n}\r\n\r\n\r\nfunction getFocusableNodes(root){\r\n\tvar nodes = root.querySelectorAll([\r\n\t\t\"a[href]\",\r\n\t\t\"area[href]\",\r\n\t\t\"input\",\r\n\t\t\"select\",\r\n\t\t\"textarea\",\r\n\t\t\"button\",\r\n\t\t\"iframe\",\r\n\t\t\"object\",\r\n\t\t\"embed\",\r\n\t\t\"[tabindex]\",\r\n\t\t\"[contenteditable]\"\r\n\t].join(\", \"));\r\n\r\n\tvar nodesArray = Array.prototype.slice.call(nodes, 0);\r\n\t\r\n\tfor(var i = 0; i < nodesArray.length; i++){\r\n\t\tnodesArray[i].$position = i;\r\n\t\t// we remember original nodes order, \r\n\t\t// so when we sort them by tabindex we ensure order of nodes with same tabindex is preserved, \r\n\t\t// since some browsers do unstable sort\r\n\t}\r\n\t\r\n\tnodesArray.sort(function(a, b) {\r\n\t\tif(a.tabIndex === 0 && b.tabIndex !== 0){\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\tif(a.tabIndex !== 0 && b.tabIndex === 0){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\t\r\n\t\tif (a.tabIndex === b.tabIndex){\r\n\t\t\t// ensure we do stable sort\r\n\t\t\treturn a.$position - b.$position;\r\n\t\t}\r\n\t\tif (a.tabIndex < b.tabIndex) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn 1;\r\n\t});\r\n\t\r\n\tfor(var i = 0; i < nodesArray.length; i++){\r\n\t\tvar node = nodesArray[i];\r\n\t\tvar isValid = (hasNonNegativeTabIndex(node) || isEnabled(node) || hasHref(node)) && isVisible(node);\r\n\t\tif(!isValid){\r\n\t\t\tnodesArray.splice(i, 1);\r\n\t\t\ti--;\r\n\t\t}\r\n\t}\r\n\treturn nodesArray;\r\n}\r\n\r\n\r\nfunction isShadowDomSupported() {\r\n\treturn document.head.createShadowRoot || document.head.attachShadow;\r\n}\r\n\r\n/**\r\n * Returns element that has the browser focus, or null if no element has focus.\r\n * Works with shadow DOM, so it's prefereed to use this function instead of document.activeElement directly.\r\n * @returns HTMLElement\r\n */\r\nfunction getActiveElement(){\r\n\tvar activeElement = document.activeElement;\r\n\tif (activeElement.shadowRoot) {\r\n\t\tactiveElement = activeElement.shadowRoot.activeElement;\r\n\t}\r\n\tif (activeElement === document.body && document.getSelection) {\r\n\t\tactiveElement = document.getSelection().focusNode || document.body;\r\n\t}\r\n\r\n\treturn activeElement;\r\n}\r\n\r\n/**\r\n * Returns document.body or the host node of the ShadowRoot, if the element is attached to ShadowDom\r\n * @param {HTMLElement} element \r\n * @returns HTMLElement\r\n */\r\nfunction getRootNode(element) {\r\n\tif (!element) {\r\n\t\treturn document.body;\r\n\t}\r\n\tif (!isShadowDomSupported()) {\r\n\t\treturn document.body;\r\n\t}\r\n\twhile (element.parentNode && (element = element.parentNode)) {\r\n\t\tif (element instanceof ShadowRoot) {\r\n\t\t\treturn element.host;\r\n\t\t}\r\n\t}\r\n\treturn document.body;\r\n}\r\n\r\nfunction hasShadowParent(element) {\r\n\treturn !!getRootNode(element);\r\n}\r\n\r\nexport default {\r\n\t/**\r\n\t * @desc: Calculate absolute position of html object\r\n\t * @type: private\r\n\t * @param: htmlObject - html object\r\n\t * @topic: 0\r\n\t */\r\n\tgetAbsoluteLeft: function getAbsoluteLeft(htmlObject){\r\n\t\treturn this.getOffset(htmlObject).left;\r\n\t},\r\n\t/**\r\n\t * @desc: Calculate absolute position of html object\r\n\t * @type: private\r\n\t * @param: htmlObject - html object\r\n\t * @topic: 0\r\n\t */\r\n\tgetAbsoluteTop: function getAbsoluteTop(htmlObject){\r\n\t\treturn this.getOffset(htmlObject).top;\r\n\t},\r\n\r\n\tgetOffsetSum: function getOffsetSum(elem) {\r\n\t\tvar top=0, left=0;\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\t\treturn {top: top, left: left};\r\n\t},\r\n\r\n\tgetOffsetRect: function getOffsetRect(elem) {\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\r\n\t\tvar top = 0,\r\n\t\t\tleft = 0;\r\n\r\n\t\t// https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#Mobile_Tablet_or_Desktop\r\n\t\tif (!/Mobi/.test(navigator.userAgent)) {\r\n\t\t\tvar body = document.body;\r\n\t\t\tvar docElem = document.documentElement;\r\n\t\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\r\n\t\t\ttop = box.top + scrollTop - clientTop;\r\n\t\t\tleft = box.left + scrollLeft - clientLeft;\r\n\t\t}else {\r\n\t\t\t// incorrect left coordinate on mobile zoom\r\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=489206\r\n\r\n\t\t\tvar dummy = document.createElement(\"div\");\r\n\t\t\tdummy.style.position=\"absolute\";\r\n\t\t\tdummy.style.left=\"0px\";\r\n\t\t\tdummy.style.top=\"0px\";\r\n\t\t\tdummy.style.width=\"1px\";\r\n\t\t\tdummy.style.height = \"1px\";\r\n\r\n\t\t\tdocument.body.appendChild(dummy);\r\n\t\t\tvar dummyBox = dummy.getBoundingClientRect();\r\n\t\t\ttop = box.top - dummyBox.top;\r\n\t\t\tleft = box.left - dummyBox.left;\r\n\r\n\t\t\tdummy.parentNode.removeChild(dummy);\r\n\t\t}\r\n\r\n\t\treturn { top: Math.round(top), left: Math.round(left) };\r\n\t},\r\n\r\n\tgetOffset: function getOffset(elem) {\r\n\t\tif (elem.getBoundingClientRect) {\r\n\t\t\treturn this.getOffsetRect(elem);\r\n\t\t} else {\r\n\t\t\treturn this.getOffsetSum(elem);\r\n\t\t}\r\n\t},\r\n\r\n\tclosest: function(element, selector){\r\n\t\tif(!element || !selector){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn closest(element, selector);\r\n\t},\r\n\tinsertAfter: function(newNode, referenceNode){\r\n\t\tif(referenceNode.nextSibling){\r\n\t\t\treferenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);\r\n\t\t}else{\r\n\t\t\treferenceNode.parentNode.appendChild(newNode);\r\n\t\t}\r\n\t},\r\n\tremove: function(node) {\r\n\t\tif (node && node.parentNode) {\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t}\r\n\t},\r\n\tisChildOf: function(child, parent) {\r\n\t\treturn parent.contains(child);\r\n\t},\r\n\tgetFocusableNodes,\r\n\tgetClassName,\r\n\tlocateCss,\r\n\tgetRootNode,\r\n\thasShadowParent,\r\n\tisShadowDomSupported,\r\n\tgetActiveElement,\r\n\tgetRelativeEventPosition,\r\n\tgetTargetNode,\r\n\tgetNodePosition\r\n};\r\n\r\nvar closest;\r\nif(Element.prototype.closest){\r\n\tclosest = function(element, selector){\r\n\t\treturn element.closest(selector);\r\n\t};\r\n}else{\r\n\tvar matches = Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\r\n\tclosest = function(element, selector) {\r\n\t\tvar el = element;\r\n\t\tdo {\r\n\t\t\tif (matches.call(el, selector)){\r\n\t\t\t\treturn el;\r\n\t\t\t}\r\n\t\t\tel = el.parentElement || el.parentNode;\r\n\t\t} while (el !== null && el.nodeType === 1);\r\n\t\treturn null;\r\n\t};\r\n}\r\n","/* eslint-disable no-restricted-globals */\r\nvar isWindowAwailable = typeof window !== \"undefined\";\r\n\r\n/* eslint-enable no-restricted-globals */\r\n\r\nexport default {\r\n\tisIE: isWindowAwailable && (navigator.userAgent.indexOf(\"MSIE\") >= 0 || navigator.userAgent.indexOf(\"Trident\") >= 0),\r\n\tisOpera: isWindowAwailable && (navigator.userAgent.indexOf(\"Opera\") >= 0),\r\n\tisChrome: isWindowAwailable && (navigator.userAgent.indexOf(\"Chrome\") >= 0),\r\n\tisKHTML: isWindowAwailable && (navigator.userAgent.indexOf(\"Safari\") >= 0 || navigator.userAgent.indexOf(\"Konqueror\") >= 0),\r\n\tisFF: isWindowAwailable && (navigator.userAgent.indexOf(\"Firefox\") >= 0),\r\n\tisIPad: isWindowAwailable && (navigator.userAgent.search(/iPad/gi) >= 0),\r\n\tisEdge: isWindowAwailable && (navigator.userAgent.indexOf(\"Edge\")!=-1),\r\n\tisNode: (!isWindowAwailable || typeof navigator == \"undefined\")\r\n};","export default function(data) {\r\n\tif (typeof data === \"string\" || typeof data === \"number\") {\r\n\t\treturn data;\r\n\t}\r\n\tvar result = \"\";\r\n\tfor (var key in data) {\r\n\t\tvar serialized = \"\";\r\n\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\tif (typeof data[key] === \"string\") {\r\n\t\t\t\tserialized = encodeURIComponent(data[key]);\r\n\t\t\t} else if (typeof data[key] === \"number\") {\r\n\t\t\t\tserialized = data[key];\r\n\t\t\t} else {\r\n\t\t\t\tserialized = encodeURIComponent(JSON.stringify(data[key]));\r\n\t\t\t}\r\n\t\t\tserialized = key + \"=\" + serialized;\r\n\r\n\t\t\tif (result.length) {\r\n\t\t\t\tserialized = \"&\" + serialized;\r\n\t\t\t}\r\n\t\t\tresult += serialized;\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n}","export default function extend(scheduler) {\r\n\r\nvar generateStringToDate = function (format, utc) {\r\n\tvar splt = \"var temp=date.match(/[a-zA-Z]+|[0-9]+/g);\";\r\n\tvar mask = format.match(/%[a-zA-Z]/g);\r\n\tfor (var i = 0; i < mask.length; i++) {\r\n\t\tswitch (mask[i]) {\r\n\t\t\tcase \"%j\":\r\n\t\t\tcase \"%d\": splt += \"set[2]=temp[\" + i + \"]||1;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%n\":\r\n\t\t\tcase \"%m\": splt += \"set[1]=(temp[\" + i + \"]||1)-1;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%y\": splt += \"set[0]=temp[\" + i + \"]*1+(temp[\" + i + \"]>50?1900:2000);\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%g\":\r\n\t\t\tcase \"%G\":\r\n\t\t\tcase \"%h\":\r\n\t\t\tcase \"%H\":\r\n\t\t\t\tsplt += \"set[3]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%i\":\r\n\t\t\t\tsplt += \"set[4]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%Y\": splt += \"set[0]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%a\":\r\n\t\t\tcase \"%A\": splt += \"set[3]=set[3]%12+((temp[\" + i + \"]||'').toLowerCase()=='am'?0:12);\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%s\": splt += \"set[5]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%M\": splt += \"set[1]=this.locale.date.month_short_hash[temp[\" + i + \"]]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%F\": splt += \"set[1]=this.locale.date.month_full_hash[temp[\" + i + \"]]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\tvar code = \"set[0],set[1],set[2],set[3],set[4],set[5]\";\r\n\tif (utc) code = \" Date.UTC(\" + code + \")\";\r\n\treturn new Function(\"date\", \"var set=[0,0,1,0,0,0]; \" + splt + \" return new Date(\" + code + \");\");\r\n};\r\nvar csp_date_to_str = function (format, utc) {\r\n\treturn function(date) {\r\n\t\treturn format.replace(/%[a-zA-Z]/g, function (a) {\r\n\t\t\tswitch (a) {\r\n\t\t\t\tcase \"%d\": return utc ? scheduler.date.to_fixed(date.getUTCDate()) : scheduler.date.to_fixed(date.getDate());\r\n\t\t\t\tcase \"%m\": return utc ? scheduler.date.to_fixed((date.getUTCMonth() + 1)) : scheduler.date.to_fixed((date.getMonth() + 1));\r\n\t\t\t\tcase \"%j\": return utc ? date.getUTCDate() : date.getDate();\r\n\t\t\t\tcase \"%n\": return utc ? (date.getUTCMonth() + 1) : (date.getMonth() + 1);\r\n\t\t\t\tcase \"%y\": return utc ? scheduler.date.to_fixed(date.getUTCFullYear() % 100) : scheduler.date.to_fixed(date.getFullYear() % 100);\r\n\t\t\t\tcase \"%Y\": return utc ? date.getUTCFullYear() : date.getFullYear();\r\n\t\t\t\tcase \"%D\": return utc ? scheduler.locale.date.day_short[date.getUTCDay()] : scheduler.locale.date.day_short[date.getDay()];\r\n\t\t\t\tcase \"%l\": return utc ? scheduler.locale.date.day_full[date.getUTCDay()] : scheduler.locale.date.day_full[date.getDay()];\r\n\t\t\t\tcase \"%M\": return utc ? scheduler.locale.date.month_short[date.getUTCMonth()] : scheduler.locale.date.month_short[date.getMonth()];\r\n\t\t\t\tcase \"%F\": return utc ? scheduler.locale.date.month_full[date.getUTCMonth()] : scheduler.locale.date.month_full[date.getMonth()];\r\n\t\t\t\tcase \"%h\": return utc ? scheduler.date.to_fixed((date.getUTCHours() + 11) % 12 + 1) : scheduler.date.to_fixed((date.getHours() + 11) % 12 + 1);\r\n\t\t\t\tcase \"%g\": return utc ? ((date.getUTCHours() + 11) % 12 + 1) : ((date.getHours() + 11) % 12 + 1);\r\n\t\t\t\tcase \"%G\": return utc ? date.getUTCHours() : date.getHours();\r\n\t\t\t\tcase \"%H\": return utc ? scheduler.date.to_fixed(date.getUTCHours()) : scheduler.date.to_fixed(date.getHours());\r\n\t\t\t\tcase \"%i\": return utc ? scheduler.date.to_fixed(date.getUTCMinutes()) : scheduler.date.to_fixed(date.getMinutes());\r\n\t\t\t\tcase \"%a\": return utc ? (date.getUTCHours() > 11 ? \"pm\" : \"am\") : (date.getHours() > 11 ? \"pm\" : \"am\");\r\n\t\t\t\tcase \"%A\": return utc ? (date.getUTCHours() > 11 ? \"PM\" : \"AM\") : (date.getHours() > 11 ? \"PM\" : \"AM\");\r\n\t\t\t\tcase \"%s\": return utc ? scheduler.date.to_fixed(date.getUTCSeconds()) : scheduler.date.to_fixed(date.getSeconds());\r\n\t\t\t\tcase \"%W\": return utc ? scheduler.date.to_fixed(scheduler.date.getUTCISOWeek(date)) : scheduler.date.to_fixed(scheduler.date.getISOWeek(date));\r\n\t\t\t\tdefault: return a;\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n};\r\nvar csp_str_to_date = function (format, utc) {\r\n\tconst mask = format.match(/%[a-zA-Z]/g);\r\n\treturn function (date){\r\n\t\tvar set = [0, 0, 1, 0, 0, 0];\r\n\t\tvar temp = date.match(/[a-zA-Z]+|[0-9]+/g);\r\n\r\n\t\tfor (var i = 0; i < mask.length; i++) {\r\n\t\t\tswitch (mask[i]) {\r\n\t\t\t\tcase \"%j\":\r\n\t\t\t\tcase \"%d\":\r\n\t\t\t\t\tset[2] = temp[i] || 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%n\":\r\n\t\t\t\tcase \"%m\":\r\n\t\t\t\t\tset[1] = (temp[i] || 1) - 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%y\":\r\n\t\t\t\t\tset[0] = temp[i] * 1 + (temp[i] > 50 ? 1900 : 2000);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%g\":\r\n\t\t\t\tcase \"%G\":\r\n\t\t\t\tcase \"%h\":\r\n\t\t\t\tcase \"%H\":\r\n\t\t\t\t\tset[3] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%i\":\r\n\t\t\t\t\tset[4] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\tset[0] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%a\":\r\n\t\t\t\tcase \"%A\":\r\n\t\t\t\t\tset[3] = set[3] % 12 + ((temp[i] || '').toLowerCase() == 'am' ? 0 : 12);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%s\":\r\n\t\t\t\t\tset[5] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%M\":\r\n\t\t\t\t\tset[1] = scheduler.locale.date.month_short_hash[temp[i]] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%F\":\r\n\t\t\t\t\tset[1] = scheduler.locale.date.month_full_hash[temp[i]] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (utc) {\r\n\t\t\treturn new Date(Date.UTC(set[0], set[1], set[2], set[3], set[4], set[5]));\r\n\t\t}\r\n\r\n\t\treturn new Date(set[0], set[1], set[2], set[3], set[4], set[5]);\r\n\t};\r\n};\r\n\r\nlet cspEnabled = undefined;\r\nfunction checkIfCSPEnabled(){\r\n\ttry {\r\n\t\tnew Function(\"cspEnabled = false;\");\r\n\t\tcspEnabled = false;\r\n\t} catch(e) {\r\n\t\tcspEnabled = true;\r\n\t}\r\n\treturn cspEnabled;\r\n}\r\n\r\nfunction useCsp() {\r\n\tvar result = false;\r\n\tif (scheduler.config.csp === \"auto\") {\r\n\t\tif(cspEnabled === undefined){\r\n\t\t\tcspEnabled = checkIfCSPEnabled();\r\n\t\t}\r\n\t\tresult = cspEnabled;\r\n\t} else {\r\n\t\tresult = scheduler.config.csp;\r\n\t}\r\n\treturn result;\r\n}\r\nscheduler.date = {\r\n\tinit:function(){\r\n\t\tvar s = scheduler.locale.date.month_short;\r\n\t\tvar t = scheduler.locale.date.month_short_hash = {};\r\n\t\tfor (var i = 0; i < s.length; i++)\r\n\t\t\tt[s[i]]=i;\r\n\r\n\t\tvar s = scheduler.locale.date.month_full;\r\n\t\tvar t = scheduler.locale.date.month_full_hash = {};\r\n\t\tfor (var i = 0; i < s.length; i++)\r\n\t\t\tt[s[i]]=i;\r\n\t},\r\n\tdate_part:function(date){\r\n\t\tvar old = new Date(date);\r\n\t\tdate.setHours(0);\r\n\t\tdate.setMinutes(0);\r\n\t\tdate.setSeconds(0);\r\n\t\tdate.setMilliseconds(0);\r\n\t\tif (date.getHours() && //shift to yesterday on dst\r\n\t\t\t(date.getDate() < old.getDate() || date.getMonth() < old.getMonth() || date.getFullYear() < old.getFullYear()) )\r\n\t\t\tdate.setTime(date.getTime() + 60 * 60 * 1000 * (24 - date.getHours()));\r\n\t\treturn date;\r\n\t},\r\n\ttime_part:function(date){\r\n\t\treturn (date.valueOf()/1000 - date.getTimezoneOffset()*60)%86400;\r\n\t},\r\n\tweek_start:function(date){\r\n\t\tvar shift=date.getDay();\r\n\t\tif (scheduler.config.start_on_monday){\r\n\t\t\tif (shift===0) shift=6;\r\n\t\t\telse shift--;\r\n\t\t}\r\n\t\treturn this.date_part(this.add(date,-1*shift,\"day\"));\r\n\t},\r\n\tmonth_start:function(date){\r\n\t\tdate.setDate(1);\r\n\t\treturn this.date_part(date);\r\n\t},\r\n\tyear_start:function(date){\r\n\t\tdate.setMonth(0);\r\n\t\treturn this.month_start(date);\r\n\t},\r\n\tday_start:function(date){\r\n\t\treturn this.date_part(date);\r\n\t},\r\n\t_add_days:function(date, inc){\r\n\t\tvar ndate = new Date(date.valueOf());\r\n\r\n\t\tndate.setDate(ndate.getDate() + inc);\r\n\r\n\t\t// Workaround for Safari/iOS timezone bug, ref:OKZ-149693\r\n\t\tif(inc == Math.round(inc) && inc > 0){\r\n\t\t\tvar datesDiff = +ndate - +date,\r\n\t\t\t\trest = datesDiff % (24*60*60*1000);\r\n\t\t\tif(rest && date.getTimezoneOffset() == ndate.getTimezoneOffset()){\r\n\t\t\t\tvar hours = rest / (60* 60 * 1000);\r\n\t\t\t\tndate.setTime(ndate.getTime() + (24 - hours) * 60 * 60 * 1000);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (inc >= 0 && (!date.getHours() && ndate.getHours()) &&//shift to yesterday on dst\r\n\t\t\t(ndate.getDate() < date.getDate() || ndate.getMonth() < date.getMonth() || ndate.getFullYear() < date.getFullYear()) )\r\n\t\t\tndate.setTime(ndate.getTime() + 60 * 60 * 1000 * (24 - ndate.getHours()));\r\n\t\treturn ndate;\r\n\t},\r\n\tadd:function(date,inc,mode){\r\n\t\tvar ndate=new Date(date.valueOf());\r\n\t\tswitch(mode){\r\n\t\t\tcase \"day\":\r\n\t\t\t\tndate = scheduler.date._add_days(ndate, inc);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"week\":\r\n\t\t\t\tndate = scheduler.date._add_days(ndate, inc * 7);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"month\": ndate.setMonth(ndate.getMonth()+inc); break;\r\n\t\t\tcase \"year\": ndate.setYear(ndate.getFullYear()+inc); break;\r\n\t\t\tcase \"hour\":\r\n\t\t\t\t/*\r\n\t\t\t\t setHour(getHour() + inc) and setMinutes gives weird result when is applied on a Daylight Saving time switch\r\n\t\t\t\t setTime seems working as expected\r\n\t\t\t\t*/\r\n\t\t\t\tndate.setTime(ndate.getTime() + inc * 60 * 60 * 1000);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"minute\":\r\n\t\t\t\tndate.setTime(ndate.getTime() + inc * 60 * 1000);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\treturn scheduler.date[\"add_\"+mode](date,inc,mode);\r\n\t\t}\r\n\t\treturn ndate;\r\n\t},\r\n\tto_fixed:function(num){\r\n\t\tif (num<10)\treturn \"0\"+num;\r\n\t\treturn num;\r\n\t},\r\n\tcopy:function(date){\r\n\t\treturn new Date(date.valueOf());\r\n\t},\r\n\tdate_to_str:function(format,utc){\r\n\t\tif (useCsp()) {\r\n\t\t\treturn csp_date_to_str(format,utc);\r\n\t\t}\r\n\r\n\t\tformat=format.replace(/%[a-zA-Z]/g,function(a){\r\n\t\t\tswitch(a){\r\n\t\t\t\tcase \"%d\": return \"\\\"+this.date.to_fixed(date.getDate())+\\\"\";\r\n\t\t\t\tcase \"%m\": return \"\\\"+this.date.to_fixed((date.getMonth()+1))+\\\"\";\r\n\t\t\t\tcase \"%j\": return \"\\\"+date.getDate()+\\\"\";\r\n\t\t\t\tcase \"%n\": return \"\\\"+(date.getMonth()+1)+\\\"\";\r\n\t\t\t\tcase \"%y\": return \"\\\"+this.date.to_fixed(date.getFullYear()%100)+\\\"\";\r\n\t\t\t\tcase \"%Y\": return \"\\\"+date.getFullYear()+\\\"\";\r\n\t\t\t\tcase \"%D\": return \"\\\"+this.locale.date.day_short[date.getDay()]+\\\"\";\r\n\t\t\t\tcase \"%l\": return \"\\\"+this.locale.date.day_full[date.getDay()]+\\\"\";\r\n\t\t\t\tcase \"%M\": return \"\\\"+this.locale.date.month_short[date.getMonth()]+\\\"\";\r\n\t\t\t\tcase \"%F\": return \"\\\"+this.locale.date.month_full[date.getMonth()]+\\\"\";\r\n\t\t\t\tcase \"%h\": return \"\\\"+this.date.to_fixed((date.getHours()+11)%12+1)+\\\"\";\r\n\t\t\t\tcase \"%g\": return \"\\\"+((date.getHours()+11)%12+1)+\\\"\";\r\n\t\t\t\tcase \"%G\": return \"\\\"+date.getHours()+\\\"\";\r\n\t\t\t\tcase \"%H\": return \"\\\"+this.date.to_fixed(date.getHours())+\\\"\";\r\n\t\t\t\tcase \"%i\": return \"\\\"+this.date.to_fixed(date.getMinutes())+\\\"\";\r\n\t\t\t\tcase \"%a\": return \"\\\"+(date.getHours()>11?\\\"pm\\\":\\\"am\\\")+\\\"\";\r\n\t\t\t\tcase \"%A\": return \"\\\"+(date.getHours()>11?\\\"PM\\\":\\\"AM\\\")+\\\"\";\r\n\t\t\t\tcase \"%s\": return \"\\\"+this.date.to_fixed(date.getSeconds())+\\\"\";\r\n\t\t\t\tcase \"%W\": return \"\\\"+this.date.to_fixed(this.date.getISOWeek(date))+\\\"\";\r\n\t\t\t\tdefault: return a;\r\n\t\t\t}\r\n\t\t});\r\n\t\tif (utc) format=format.replace(/date\\.get/g,\"date.getUTC\");\r\n\t\tvar func = new Function(\"date\",\"return \\\"\"+format+\"\\\";\");\r\n\r\n\t\treturn func.bind(scheduler);\r\n\t},\r\n\tstr_to_date:function(format, utc, exactFormat){\r\n\t\tvar stringToDateMethod = useCsp() ? csp_str_to_date : generateStringToDate;\r\n\t\tvar parseExactFormat = stringToDateMethod(format, utc);\r\n\t\t// eslint-disable-next-line\r\n\t\tvar yyyyMMddhhIIss = /^[0-9]{4}(\\-|\\/)[0-9]{2}(\\-|\\/)[0-9]{2} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/;\r\n\r\n\t\t// MM/dd/yyyy - default old format for xml-date\r\n\t\t// eslint-disable-next-line\r\n\t\tvar MMddyyyyhhIIss = /^[0-9]{2}\\/[0-9]{2}\\/[0-9]{4} ?(([0-9]{1,2}:[0-9]{2})(:[0-9]{1,2})?)?$/;\r\n\t\t// dd-MM-yyyy - default old format for api-date\r\n\t\t// eslint-disable-next-line\r\n\t\tvar ddMMyyyyhhIIss = /^[0-9]{2}\\-[0-9]{2}\\-[0-9]{4} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/;\r\n\t\t// eslint-disable-next-line\r\n\t\tvar ISO8601 = /^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$/;\r\n\r\n\t\tvar isYMDDate = function (datestr) {\r\n\t\t\treturn yyyyMMddhhIIss.test(String(datestr));\r\n\t\t};\r\n\r\n\t\tvar isMDYDate = function (datestr) {\r\n\t\t\treturn MMddyyyyhhIIss.test(String(datestr));\r\n\t\t};\r\n\t\tvar isDMYDate = function (datestr) {\r\n\t\t\treturn ddMMyyyyhhIIss.test(String(datestr));\r\n\t\t};\r\n\t\tvar isISO8601 = function (datestr) {\r\n\t\t\treturn ISO8601.test(datestr);\r\n\t\t};\r\n\r\n\t\tvar parseYMD = stringToDateMethod(\"%Y-%m-%d %H:%i:%s\", utc);\r\n\t\tvar parseMDY = stringToDateMethod(\"%m/%d/%Y %H:%i:%s\", utc);\r\n\t\tvar parseDMY = stringToDateMethod(\"%d-%m-%Y %H:%i:%s\", utc);\r\n\r\n\t\treturn function (dateString) {\r\n\r\n\t\t\tif (!exactFormat && !scheduler.config.parse_exact_format) {\r\n\t\t\t\tif (dateString && dateString.getISOWeek) {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t} else if (typeof dateString === \"number\") {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t} else if (isYMDDate(dateString)) {\r\n\t\t\t\t\treturn parseYMD(dateString);\r\n\t\t\t\t} else if (isMDYDate(dateString)) {\r\n\t\t\t\t\treturn parseMDY(dateString);\r\n\t\t\t\t} else if (isDMYDate(dateString)) {\r\n\t\t\t\t\treturn parseDMY(dateString);\r\n\t\t\t\t} else if (isISO8601(dateString)) {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn parseExactFormat.call(scheduler, dateString);\r\n\t\t};\r\n\t},\r\n\tgetISOWeek: function(ndate) {\r\n\t\tif(!ndate) return false;\r\n\t\tndate = this.date_part(new Date(ndate));\r\n\t\tvar nday = ndate.getDay();\r\n\t\tif (nday === 0) {\r\n\t\t\tnday = 7;\r\n\t\t}\r\n\t\tvar first_thursday = new Date(ndate.valueOf());\r\n\t\tfirst_thursday.setDate(ndate.getDate() + (4 - nday));\r\n\t\tvar year_number = first_thursday.getFullYear(); // year of the first Thursday\r\n\t\tvar ordinal_date = Math.round( (first_thursday.getTime() - new Date(year_number, 0, 1).getTime()) / 86400000); //ordinal date of the first Thursday - 1 (so not really ordinal date)\r\n\t\tvar week_number = 1 + Math.floor( ordinal_date / 7);\r\n\t\treturn week_number;\r\n\t},\r\n\tgetUTCISOWeek: function(ndate){\r\n\t\treturn this.getISOWeek(this.convert_to_utc(ndate));\r\n\t},\r\n\tconvert_to_utc: function(date) {\r\n\t\treturn new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds());\r\n\t}\r\n};\r\n\r\n}\r\n\r\n","export default function(scheduler){\r\n\treturn (function(){\r\n\t\tvar res = {};\r\n\t\tfor (var a in this._events){\r\n\t\t\tvar ev = this._events[a];\r\n\t\t\tif (ev.id.toString().indexOf(\"#\") == -1){\r\n\t\t\t\tres[ev.id] = ev;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t}).bind(scheduler);\r\n}","import xmlLoaded from \"./loaders/xml\";\r\nimport jsonLoader from \"./loaders/json\";\r\nimport iCalLoader from \"./loaders/ical\";\r\nimport createSerializator from \"../core/common/get_serializable_events\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler._loaded = {};\r\nscheduler._load = function(url, from) {\r\n\turl = url || this._load_url;\r\n\r\n\tif(!url){\r\n\t\t//if scheduler.setLoadMode is called before scheduler.init, initial rendering will invoke data loading while url is undefined\r\n\t\treturn;\r\n\t}\r\n\r\n\turl += (url.indexOf(\"?\") == -1 ? \"?\" : \"&\") + \"timeshift=\" + (new Date()).getTimezoneOffset();\r\n\tif (this.config.prevent_cache) url += \"&uid=\" + this.uid();\r\n\tvar to;\r\n\tfrom = from || this._date;\r\n\tfunction ajaxCallback(response) {\r\n\t\tscheduler.on_load(response);\r\n\t\tscheduler.callEvent(\"onLoadEnd\", []);\r\n\t}\r\n\tif (this._load_mode) {\r\n\t\tvar lf = this.templates.load_format;\r\n\r\n\t\tfrom = this.date[this._load_mode + \"_start\"](new Date(from.valueOf()));\r\n\t\twhile (from > this._min_date) from = this.date.add(from, -1, this._load_mode);\r\n\t\tto = from;\r\n\r\n\t\tvar cache_line = true;\r\n\t\twhile (to < this._max_date) {\r\n\t\t\tto = this.date.add(to, 1, this._load_mode);\r\n\t\t\tif (this._loaded[lf(from)] && cache_line)\r\n\t\t\t\tfrom = this.date.add(from, 1, this._load_mode); else cache_line = false;\r\n\t\t}\r\n\r\n\t\tvar temp_to = to;\r\n\t\tdo {\r\n\t\t\tto = temp_to;\r\n\t\t\ttemp_to = this.date.add(to, -1, this._load_mode);\r\n\t\t} while (temp_to > from && this._loaded[lf(temp_to)]);\r\n\r\n\t\tif (to <= from)\r\n\t\t\treturn false; //already loaded\r\n\r\n\t\tscheduler.ajax.get(url + \"&from=\" + lf(from) + \"&to=\" + lf(to), ajaxCallback);\r\n\r\n\t\twhile (from < to) {\r\n\t\t\tthis._loaded[lf(from)] = true;\r\n\t\t\tfrom = this.date.add(from, 1, this._load_mode);\r\n\t\t}\r\n\t} else {\r\n\t\tscheduler.ajax.get(url, ajaxCallback);\r\n\t}\r\n\r\n\t// TODO: remove onXLS\r\n\tthis.callEvent(\"onXLS\", []);\r\n\tthis.callEvent(\"onLoadStart\", []);\r\n\treturn true;\r\n};\r\n\r\nscheduler._parsers = {};\r\n\r\n\r\nxmlLoaded(scheduler);\r\njsonLoader(scheduler);\r\niCalLoader(scheduler);\r\n\r\nscheduler.on_load = function (loader) {\r\n\tthis.callEvent(\"onBeforeParse\", []);\r\n\r\n\tvar evs;\r\n\tvar error = false;\r\n\r\n\tvar foundParser = false;\r\n\tfor(var i in this._parsers){\r\n\t\tvar parser = this._parsers[i];\r\n\t\tif(parser.canParse(loader.xmlDoc.responseText, loader.xmlDoc)){\r\n\t\t\ttry{\r\n\t\t\t\tvar param = loader.xmlDoc.responseText;\r\n\t\t\t\tif(i === \"xml\"){\r\n\t\t\t\t\tparam = loader;\r\n\t\t\t\t}\r\n\t\t\t\tevs = parser.parse(param);\r\n\t\t\t\tif(!evs){\r\n\t\t\t\t\terror = true;\r\n\t\t\t\t}\r\n\t\t\t}catch(e){\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\t\t\tfoundParser = true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif(!foundParser){\r\n\t\tif(this._process && this[this._process]){\r\n\t\t\ttry{\r\n\t\t\t\tevs = this[this._process].parse(loader.xmlDoc.responseText);\r\n\t\t\t}catch (e){\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\terror = true;\r\n\t\t}\r\n\t}\r\n\r\n\tif(error || (loader.xmlDoc.status && loader.xmlDoc.status >= 400)){\r\n\t\tthis.callEvent(\"onLoadError\", [loader.xmlDoc]);\r\n\t\tevs = [];\r\n\t}\r\n\r\n\tthis._process_loading(evs);\r\n\r\n\t// TODO: remove onXLE\r\n\tthis.callEvent(\"onXLE\", []);\r\n\tthis.callEvent(\"onParse\", []);\r\n};\r\nscheduler._process_loading = function(evs) {\r\n\tthis._loading = true;\r\n\tthis._not_render = true;\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tif (!this.callEvent(\"onEventLoading\", [evs[i]])) continue;\r\n\t\tthis.addEvent(evs[i]);\r\n\t}\r\n\tthis._not_render = false;\r\n\tif (this._render_wait) this.render_view_data();\r\n\r\n\tthis._loading = false;\r\n\tif (this._after_call) this._after_call();\r\n\tthis._after_call = null;\r\n};\r\nscheduler._init_event = function(event) {\r\n\tevent.text = (event.text || event._tagvalue) || \"\";\r\n\tevent.start_date = scheduler._init_date(event.start_date);\r\n\tevent.end_date = scheduler._init_date(event.end_date);\r\n};\r\n\r\nscheduler._init_date = function(date){\r\n\tif(!date)\r\n\t\treturn null;\r\n\tif (typeof date == \"string\") {\r\n\t\treturn scheduler._helpers.parseDate(date);\r\n\t}\r\n\telse return new Date(date);\r\n};\r\n\r\nconst getSerializableData = createSerializator(scheduler);\r\nscheduler.serialize = function(){\r\n\tconst dataset = [];\r\n\tconst allEvents = getSerializableData();\r\n\tfor (var a in allEvents){\r\n\t\t\r\n\t\tconst exportedEvent = {};\r\n\t\tvar ev = allEvents[a];\r\n\r\n\t\tfor(var key in ev){\r\n\t\t\tif (key.charAt(0) == \"$\" || key.charAt(0) == \"_\"){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tlet exportValue;\r\n\t\t\tconst rawValue = ev[key];\r\n\t\t\tif(scheduler.utils.isDate(rawValue)){\r\n\t\t\t\texportValue = scheduler.defined(scheduler.templates.xml_format) ? scheduler.templates.xml_format(rawValue) : scheduler.templates.format_date(rawValue);\r\n\t\t\t}else{\r\n\t\t\t\texportValue = rawValue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\texportedEvent[key] = exportValue;\r\n\t\t}\r\n\r\n\t\tdataset.push(exportedEvent);\r\n\t}\r\n\treturn dataset;\r\n};\r\n\r\n/*\r\nscheduler.json = {};\r\nscheduler.json.parse = function(data) {\r\n\r\n\tvar events = [];\r\n\r\n\tif (typeof data == \"string\") {\r\n\t\tdata = JSON.parse(data);\r\n\t}\r\n\tif (Object.prototype.toString.call(data) === '[object Array]') {\r\n\t\tevents = data;\r\n\t} else {\r\n\t\tif(data){\r\n\t\t\tif(data.events){\r\n\t\t\t\tevents = data.events;\r\n\t\t\t}else if(data.data){\r\n\t\t\t\tevents = data.data;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tevents = events || [];\r\n\r\n\tif (data.dhx_security) {\r\n\t\tif (window.dhtmlx) {\r\n\t\t\twindow.dhtmlx.security_key = data.dhx_security;\r\n\t\t}\r\n\t\tscheduler.security_key = data.dhx_security;\r\n\t}\r\n\r\n\tvar collections = (data && data.collections) ? data.collections : {};\r\n\tvar collections_loaded = false;\r\n\tfor (var key in collections) {\r\n\t\tif (collections.hasOwnProperty(key)) {\r\n\t\t\tcollections_loaded = true;\r\n\t\t\tvar collection = collections[key];\r\n\t\t\tvar arr = scheduler.serverList[key];\r\n\t\t\tif (!arr) {\r\n\t\t\t\tscheduler.serverList[key] = arr = [];\r\n\t\t\t}\r\n\t\t\tarr.splice(0, arr.length); //clear old options\r\n\t\t\tfor (var j = 0; j < collection.length; j++) {\r\n\t\t\t\tvar option = collection[j];\r\n\t\t\t\tvar obj = { key: option.value, label: option.label }; // resulting option object\r\n\t\t\t\tfor (var option_key in option) {\r\n\t\t\t\t\tif (option.hasOwnProperty(option_key)) {\r\n\t\t\t\t\t\tif (option_key == \"value\" || option_key == \"label\")\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\tobj[option_key] = option[option_key]; // obj['value'] = option['value']\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tarr.push(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (collections_loaded)\r\n\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\r\n\tvar evs = [];\r\n\tfor (var i = 0; i < events.length; i++) {\r\n\t\tvar event = events[i];\r\n\t\tscheduler._init_event(event);\r\n\t\tevs.push(event);\r\n\t}\r\n\treturn evs;\r\n};*/\r\nscheduler.parse = function(data, type) {\r\n\tthis._process = type;\r\n\tthis.on_load({xmlDoc: {responseText: data}});\r\n};\r\nscheduler.load = function(url, call) {\r\n\tif (typeof call == \"string\") {\r\n\t\tthis._process = call;\r\n\t\tcall = arguments[2];\r\n\t}\r\n\r\n\tthis._load_url = url;\r\n\tthis._after_call = call;\r\n\tthis._load(url, this._date);\r\n};\r\n//possible values - day,week,month,year,all\r\nscheduler.setLoadMode = function(mode) {\r\n\tif (mode == \"all\") mode = \"\";\r\n\tthis._load_mode = mode;\r\n};\r\n\r\nscheduler.serverList = function(name, array) {\r\n\tif (array) {\r\n\t\tthis.serverList[name] = array.slice(0);\r\n\t\treturn this.serverList[name];\r\n\t}\r\n\tthis.serverList[name] = (this.serverList[name] || []);\r\n\treturn this.serverList[name];\r\n};\r\nscheduler._userdata = {};\r\n\r\nscheduler._xmlNodeToJSON = function(node) {\r\n\tvar t = {};\r\n\tfor (var i = 0; i < node.attributes.length; i++)\r\n\t\tt[node.attributes[i].name] = node.attributes[i].value;\r\n\r\n\tfor (var i = 0; i < node.childNodes.length; i++) {\r\n\t\tvar child = node.childNodes[i];\r\n\t\tif (child.nodeType == 1)\r\n\t\t\tt[child.tagName] = child.firstChild ? child.firstChild.nodeValue : \"\";\r\n\t}\r\n\r\n\tif (!t.text) t.text = node.firstChild ? node.firstChild.nodeValue : \"\";\r\n\r\n\treturn t;\r\n};\r\nscheduler.attachEvent(\"onXLS\", function() {\r\n\tif (this.config.show_loading === true) {\r\n\t\tvar t;\r\n\t\tt = this.config.show_loading = document.createElement(\"div\");\r\n\t\tt.className = 'dhx_loading';\r\n\t\tt.style.left = Math.round((this._x - 128) / 2) + \"px\";\r\n\t\tt.style.top = Math.round((this._y - 15) / 2) + \"px\";\r\n\t\tthis._obj.appendChild(t);\r\n\t}\r\n});\r\nscheduler.attachEvent(\"onXLE\", function() {\r\n\tvar t = this.config.show_loading;\r\n\tif (t && typeof t == \"object\") {\r\n\t\tif(t.parentNode) {\r\n\t\t\tt.parentNode.removeChild(t);\r\n\t\t}\r\n\t\tthis.config.show_loading = true;\r\n\t}\r\n});\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._parsers.xml = {\r\n\tcanParse: function(data, xhr){\r\n\t\t// IE returns non-empty responseXML type regardless of actual data type\r\n\t\tif(xhr.responseXML && xhr.responseXML.firstChild){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\ttry{\r\n\t\t\tvar xmlDoc = scheduler.ajax.parse(xhr.responseText);\r\n\t\t\tvar topElement = scheduler.ajax.xmltop(\"data\", xmlDoc);\r\n\t\t\tif(topElement && topElement.tagName === \"data\"){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}catch (e){\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\tparse: function(loader) {\r\n\t\tvar xml;\r\n\r\n\t\tif (!loader.xmlDoc.responseXML) { //from a string\r\n\t\t\tloader.xmlDoc.responseXML = scheduler.ajax.parse(loader.xmlDoc.responseText);\r\n\t\t}\r\n\t\r\n\t\txml = scheduler.ajax.xmltop(\"data\", loader.xmlDoc);\r\n\t\tif (xml.tagName != \"data\") return null;//not an xml\r\n\t\tvar csrfToken = xml.getAttribute(\"dhx_security\");\r\n\t\tif (csrfToken) {\r\n\t\t\tif (window.dhtmlx) {\r\n\t\t\t\twindow.dhtmlx.security_key = csrfToken;\r\n\t\t\t}\r\n\t\t\tscheduler.security_key = csrfToken;\r\n\t\t}\r\n\t\r\n\t\tvar opts = scheduler.ajax.xpath(\"//coll_options\", loader.xmlDoc);\r\n\t\tfor (var i = 0; i < opts.length; i++) {\r\n\t\t\tvar bind = opts[i].getAttribute(\"for\");\r\n\t\t\tvar arr = scheduler.serverList[bind];\r\n\t\t\tif (!arr) {\r\n\t\t\t\tscheduler.serverList[bind] = arr = [];\r\n\t\t\t}\r\n\t\t\tarr.splice(0, arr.length);\t//clear old options\r\n\t\t\tvar itms = scheduler.ajax.xpath(\".//item\", opts[i]);\r\n\t\t\tfor (var j = 0; j < itms.length; j++) {\r\n\t\t\t\tvar itm = itms[j];\r\n\t\t\t\tvar attrs = itm.attributes;\r\n\t\t\t\tvar obj = { key: itms[j].getAttribute(\"value\"), label: itms[j].getAttribute(\"label\")};\r\n\t\t\t\tfor (var k = 0; k < attrs.length; k++) {\r\n\t\t\t\t\tvar attr = attrs[k];\r\n\t\t\t\t\tif (attr.nodeName == \"value\" || attr.nodeName == \"label\")\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\tobj[attr.nodeName] = attr.nodeValue;\r\n\t\t\t\t}\r\n\t\t\t\tarr.push(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (opts.length)\r\n\t\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\t\r\n\t\tvar ud = scheduler.ajax.xpath(\"//userdata\", loader.xmlDoc);\r\n\t\tfor (var i = 0; i < ud.length; i++) {\r\n\t\t\tvar udx = scheduler._xmlNodeToJSON(ud[i]);\r\n\t\t\tscheduler._userdata[udx.name] = udx.text;\r\n\t\t}\r\n\t\r\n\t\tvar evs = [];\r\n\t\txml = scheduler.ajax.xpath(\"//event\", loader.xmlDoc);\r\n\t\r\n\t\tfor (var i = 0; i < xml.length; i++) {\r\n\t\t\tvar ev = evs[i] = scheduler._xmlNodeToJSON(xml[i]);\r\n\t\t\tscheduler._init_event(ev);\r\n\t\t}\r\n\t\treturn evs;\r\n\t}\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler.json = scheduler._parsers.json = {\r\n\tcanParse: function(data){\r\n\t\tif(data && typeof data === \"object\"){\r\n\t\t\treturn true;\r\n\t\t} else if(typeof data === \"string\"){\r\n\t\t\ttry {\r\n\t\t\t\tvar result = JSON.parse(data);\r\n\t\t\t\treturn Object.prototype.toString.call(result) === '[object Object]' || \r\n\t\t\t\t\t\tObject.prototype.toString.call(result) === '[object Array]';\r\n\t\t\t} catch (err) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\tparse: function(data) {\r\n\t\tvar events = [];\r\n\r\n\t\tif (typeof data == \"string\") {\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\t\tif (Object.prototype.toString.call(data) === '[object Array]') {\r\n\t\t\tevents = data;\r\n\t\t} else {\r\n\t\t\tif(data){\r\n\t\t\t\tif(data.events){\r\n\t\t\t\t\tevents = data.events;\r\n\t\t\t\t}else if(data.data){\r\n\t\t\t\t\tevents = data.data;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tevents = events || [];\r\n\r\n\t\tif (data.dhx_security) {\r\n\t\t\tif (window.dhtmlx) {\r\n\t\t\t\twindow.dhtmlx.security_key = data.dhx_security;\r\n\t\t\t}\r\n\t\t\tscheduler.security_key = data.dhx_security;\r\n\t\t}\r\n\r\n\t\tvar collections = (data && data.collections) ? data.collections : {};\r\n\t\tvar collections_loaded = false;\r\n\t\tfor (var key in collections) {\r\n\t\t\tif (collections.hasOwnProperty(key)) {\r\n\t\t\t\tcollections_loaded = true;\r\n\t\t\t\tvar collection = collections[key];\r\n\t\t\t\tvar arr = scheduler.serverList[key];\r\n\t\t\t\tif (!arr) {\r\n\t\t\t\t\tscheduler.serverList[key] = arr = [];\r\n\t\t\t\t}\r\n\t\t\t\tarr.splice(0, arr.length); //clear old options\r\n\t\t\t\tfor (var j = 0; j < collection.length; j++) {\r\n\t\t\t\t\tvar option = collection[j];\r\n\t\t\t\t\tvar obj = { key: option.value, label: option.label }; // resulting option object\r\n\t\t\t\t\tfor (var option_key in option) {\r\n\t\t\t\t\t\tif (option.hasOwnProperty(option_key)) {\r\n\t\t\t\t\t\t\tif (option_key == \"value\" || option_key == \"label\")\r\n\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\tobj[option_key] = option[option_key]; // obj['value'] = option['value']\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tarr.push(obj);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (collections_loaded)\r\n\t\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\r\n\t\tvar evs = [];\r\n\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\tvar event = events[i];\r\n\t\t\tscheduler._init_event(event);\r\n\t\t\tevs.push(event);\r\n\t\t}\r\n\t\treturn evs;\r\n\t}\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler.ical = scheduler._parsers.ical = {\r\n\tcanParse: function(data){\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\treturn new RegExp(\"^BEGIN:VCALENDAR\").test(data);\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n\tparse:function(str){\r\n\t\tvar data = str.match(RegExp(this.c_start+\"[^\\f]*\"+this.c_end,\"\"));\r\n\t\tif (!data.length) return;\r\n\r\n\t\t// mpl: handle bad unfolding\r\n\t\tdata[0]=data[0].replace(/[\\r\\n]+ /g,\"\");\r\n\r\n\t\t//unfolding \r\n\t\tdata[0]=data[0].replace(/[\\r\\n]+(?=[a-z \\t])/g,\" \");\r\n\t\t//drop property\r\n\t\tdata[0]=data[0].replace(/;[^:\\r\\n]*:/g,\":\");\r\n\t\t\r\n\t\t\r\n\t\tvar incoming=[];\r\n\t\tvar match;\r\n\t\tvar event_r = RegExp(\"(?:\"+this.e_start+\")([^\\f]*?)(?:\"+this.e_end+\")\",\"g\");\r\n\t\twhile ((match=event_r.exec(data)) !== null){\r\n\t\t\tvar e={};\r\n\t\t\tvar param;\r\n\t\t\tvar param_r = /[^\\r\\n]+[\\r\\n]+/g;\r\n\t\t\twhile ((param=param_r.exec(match[1])) !== null)\r\n\t\t\t\tthis.parse_param(param.toString(),e);\r\n\t\t\tif (e.uid && !e.id) e.id = e.uid; //fallback to UID, when ID is not defined\r\n\t\t\tincoming.push(e);\t\r\n\t\t}\r\n\t\treturn incoming;\r\n\t},\r\n\tparse_param:function(str,obj){\r\n\t\tvar d = str.indexOf(\":\"); \r\n\t\t\tif (d==-1) return;\r\n\t\t\r\n\t\tvar name = str.substr(0,d).toLowerCase();\r\n\t\tvar value = str.substr(d+1).replace(/\\\\,/g,\",\").replace(/[\\r\\n]+$/,\"\");\r\n\t\tif (name==\"summary\")\r\n\t\t\tname=\"text\";\r\n\t\telse if (name==\"dtstart\"){\r\n\t\t\tname = \"start_date\";\r\n\t\t\tvalue = this.parse_date(value,0,0);\r\n\t\t}\r\n\t\telse if (name==\"dtend\"){\r\n\t\t\tname = \"end_date\";\r\n\t\t\tvalue = this.parse_date(value,0,0);\r\n\t\t}\r\n\t\tobj[name]=value;\r\n\t},\r\n\tparse_date:function(value,dh,dm){\r\n\t\tvar t = value.split(\"T\");\r\n\r\n\t\tvar utcMark = false;\r\n\t\tif (t[1]){\r\n\t\t\tdh=t[1].substr(0,2);\r\n\t\t\tdm=t[1].substr(2,2);\r\n\t\t\tutcMark = !!(t[1][6] == \"Z\");\r\n\t\t}\r\n\t\tvar dy = t[0].substr(0,4);\r\n\t\tvar dn = parseInt(t[0].substr(4,2),10)-1;\r\n\t\tvar dd = t[0].substr(6,2);\r\n\r\n\t\tif(scheduler.config.server_utc || utcMark){\r\n\t\t\treturn new Date(Date.UTC(dy,dn,dd,dh,dm)) ;\r\n\t\t}else{\r\n\t\t\treturn new Date(dy,dn,dd,dh,dm);\r\n\t\t}\r\n\t},\r\n\tc_start:\"BEGIN:VCALENDAR\",\r\n\te_start:\"BEGIN:VEVENT\",\r\n\te_end:\"END:VEVENT\",\r\n\tc_end:\"END:VCALENDAR\"\t\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._init_touch_events = function(){\r\n\tvar mobile = this.config.touch &&\r\n\t\t( ((navigator.userAgent.indexOf(\"Mobile\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"iPad\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"Android\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"Touch\")!=-1)) && !window.MSStream) ||\r\n\t\t\t((navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1));\r\n\r\n\tif(mobile){\r\n\t\tthis.xy.scroll_width = 0;\r\n\t\tthis._mobile = true;\r\n\t}\r\n\r\n\tif(this.config.touch){\r\n\r\n\t\tvar touchEventsSupported = true;\r\n\t\ttry {\r\n\t\t\tdocument.createEvent(\"TouchEvent\");\r\n\t\t} catch (e) {\r\n\t\t\ttouchEventsSupported = false;\r\n\t\t}\r\n\r\n\t\tif (touchEventsSupported) {\r\n\t\t\tthis._touch_events([\"touchmove\", \"touchstart\", \"touchend\"], function (ev) {\r\n\t\t\t\tif (ev.touches && ev.touches.length > 1) return null;\r\n\t\t\t\tif (ev.touches[0])\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\ttarget: ev.target,\r\n\t\t\t\t\t\tpageX: ev.touches[0].pageX,\r\n\t\t\t\t\t\tpageY: ev.touches[0].pageY,\r\n\t\t\t\t\t\tclientX: ev.touches[0].clientX,\r\n\t\t\t\t\t\tclientY: ev.touches[0].clientY\r\n\t\t\t\t\t};\r\n\t\t\t\telse\r\n\t\t\t\t\treturn ev;\r\n\t\t\t}, function () {\r\n\t\t\t\treturn false;\r\n\t\t\t});\r\n\t\t} else if (window.PointerEvent || window.navigator.pointerEnabled) {\r\n\t\t\tthis._touch_events([\"pointermove\", \"pointerdown\", \"pointerup\"], function (ev) {\r\n\t\t\t\tif (ev.pointerType == \"mouse\") return null;\r\n\t\t\t\treturn ev;\r\n\t\t\t}, function (ev) {\r\n\t\t\t\treturn (!ev || (ev.pointerType == \"mouse\" ));\r\n\t\t\t});\r\n\t\t} else if (window.navigator.msPointerEnabled) {\r\n\t\t\tthis._touch_events([\"MSPointerMove\", \"MSPointerDown\", \"MSPointerUp\"], function (ev) {\r\n\t\t\t\tif (ev.pointerType == ev.MSPOINTER_TYPE_MOUSE) return null;\r\n\t\t\t\treturn ev;\r\n\t\t\t}, function (ev) {\r\n\t\t\t\treturn (!ev || ev.pointerType == ev.MSPOINTER_TYPE_MOUSE);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n};\r\n\r\nscheduler._touch_events = function(names, accessor, ignore){\r\n\t//webkit on android need to be handled separately\r\n\t//var a_webkit = (navigator.userAgent.indexOf(\"Android\")!=-1) && (navigator.userAgent.indexOf(\"WebKit\")!=-1);\r\n\tvar source, tracker, timer, drag_mode, scroll_mode, action_mode;\r\n\tvar dblclicktime = 0;\r\n\r\n\tfunction attachTouchEvent(element, name, callback){\r\n\t\t//touch gestures must be disabled when ligthbox is opened\r\n\t\tscheduler.event(element, name, function(e){\r\n\t\t\tif(scheduler._is_lightbox_open()){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tif (ignore(e)) return;\r\n\t\t\t\treturn callback(e);\r\n\t\t\t}\r\n\t\t}, { passive: false });\r\n\t}\r\n\r\n\tfunction check_direction_swipe(s_ev, e_ev, step, max_dy){\r\n\t\tif (!s_ev || !e_ev) return false;\r\n\r\n\t\tvar t = s_ev.target;\r\n\t\twhile(t && t != scheduler._obj){\r\n\t\t\tt = t.parentNode;\r\n\t\t}\r\n\t\tif(t != scheduler._obj){\r\n\t\t\t//swipe outside scheduler\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// ignore swipe in horizontal timeline\r\n\t\tif(scheduler.matrix && scheduler.matrix[scheduler.getState().mode]){\r\n\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\tif(timeline.scrollable){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar dy = Math.abs(s_ev.pageY - e_ev.pageY);\r\n\t\tvar dx = Math.abs(s_ev.pageX - e_ev.pageX);\r\n\t\tif (dy < max_dy && dx>step && (!dy || (dx/dy > 3))){\r\n\t\t\tif (s_ev.pageX > e_ev.pageX) {\r\n\t\t\t\tscheduler._click.dhx_cal_next_button();\r\n\t\t\t}else {\r\n\t\t\t\tscheduler._click.dhx_cal_prev_button();\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\tfunction doMouseMove(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tvar dnd = scheduler.getState().drag_mode,\r\n\t\t\ttimeline = scheduler.matrix ? scheduler.matrix[scheduler._mode] : false;\r\n\r\n\t\tvar original_render = scheduler.render_view_data;\r\n\t\tif(dnd == 'create' && timeline){\r\n\t\t\t//suppress full redraw of timeline on creating event\r\n\t\t\tscheduler.render_view_data = function() {\r\n\t\t\t\tvar id = scheduler.getState().drag_id;\r\n\t\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\t\tvar property = timeline.y_property;\r\n\r\n\t\t\t\tvar evs = scheduler.getEvents(ev.start_date, ev.end_date);\r\n\t\t\t\tfor(var i = 0; i < evs.length; i++){\r\n\t\t\t\t\tif(evs[i][property] != ev[property]){\r\n\t\t\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tev._sorder = evs.length - 1;\r\n\t\t\t\tev._count = evs.length;\r\n\r\n\t\t\t\tthis.render_data([ev], scheduler.getState().mode);\r\n\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\tscheduler._on_mouse_move(e);\r\n\r\n\t\tif(dnd == 'create' && timeline){\r\n\t\t\tscheduler.render_view_data = original_render;\r\n\t\t}\r\n\r\n\t\tif (e.preventDefault)\r\n\t\t\te.preventDefault();\r\n\t\te.cancelBubble = true;\r\n\t\treturn false;\r\n\t}\r\n\r\n\t// touchmove\r\n\tattachTouchEvent(document.body, names[0], function(e){\r\n\t\tif (ignore(e)) return;\r\n\r\n\t\tvar acc = accessor(e);\r\n\t\tif(!acc) return;\r\n\t\tif (drag_mode){\r\n\t\t\tdoMouseMove(acc);\r\n\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._update_global_tip();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//if (tracker && a_webkit){\r\n\t\t//\tcheck_direction_swipe(tracker, accessor(e), 0);\r\n\t\t//}\r\n\r\n\t\ttracker = accessor(e);\r\n\t\t//ignore common and scrolling moves\r\n\t\tif (!action_mode) return;\r\n\r\n\t\t//multitouch\r\n\t\tif (!tracker){\r\n\t\t\tscroll_mode = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//target changed - probably in scroll mode\r\n\r\n\t\tif (source.target != tracker.target || (Math.abs(source.pageX - tracker.pageX) > 5) || (Math.abs(source.pageY - tracker.pageY) > 5)){\r\n\t\t\tscroll_mode = true;\r\n\t\t\tclearTimeout(timer);\r\n\t\t}\r\n\r\n\t});\r\n\r\n\t//attachTouchEvent(this._els[\"dhx_cal_data\"][0], \"scroll\", drag_cancel);\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], \"touchcancel\", drag_cancel);\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], \"contextmenu\", function(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tif (action_mode){\r\n\t\t\tif (e && e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t});\r\n\r\n\t// touchstart\r\n\tattachTouchEvent(this._obj, names[1], function(e){\r\n\t\t// block pull-to-refresh\r\n\t\tif(document && document.body){\r\n\t\t\tdocument.body.classList.add(\"dhx_cal_touch_active\");\r\n\t\t}\r\n\r\n\t\tif (ignore(e)) return;\r\n\t\tscheduler._pointerDragId = e.pointerId;\r\n\r\n\t\tvar fake_event;\r\n\t\tdrag_mode = scroll_mode = false;\r\n\t\taction_mode = true;\r\n\t\tfake_event = tracker = accessor(e);\r\n\r\n\t\tif (!fake_event){\r\n\t\t\tscroll_mode = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//dbl click\r\n\t\tvar now = new Date();\r\n\r\n\t\tif (!scroll_mode && !drag_mode && now - dblclicktime < 250){\r\n\t\t\tscheduler._click.dhx_cal_data(fake_event);\r\n\t\t\twindow.setTimeout(function(){\r\n\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t//fake_event.type = \"dblclick\";\r\n\t\t\t\tscheduler._on_dbl_click(fake_event);\r\n\t\t\t}, 50);\r\n\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._block_next_stop = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tdblclicktime = now;\r\n\r\n\t\t//drag\r\n\r\n\t\tif (scroll_mode || drag_mode || !scheduler.config.touch_drag)\r\n\t\t\treturn;\r\n\r\n\t\tvar actTask = scheduler._locate_event(document.activeElement);\r\n\t\tvar fakeTask = scheduler._locate_event(fake_event.target);\r\n\t\tvar sourceTask = source? scheduler._locate_event(source.target) : null;\r\n\r\n\t\tif(actTask && fakeTask && actTask == fakeTask && actTask != sourceTask)\r\n\t\t{\r\n\t\t\tif(e.preventDefault) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\tscheduler._click.dhx_cal_data(fake_event);\r\n\t\t\tsource = fake_event;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//there is no target\r\n\t\ttimer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tdrag_mode = true;\r\n\t\t\tvar target = source.target;\r\n\t\t\tvar className = scheduler._getClassName(target);\r\n\t\t\tif (target && className.indexOf(\"dhx_body\") != -1)\r\n\t\t\t\ttarget = target.previousSibling;\r\n\r\n\t\t\tscheduler._on_mouse_down(source, target);\r\n\t\t\tif (scheduler._drag_mode && scheduler._drag_mode != \"create\"){\r\n\t\t\t\tscheduler.for_rendered(scheduler._drag_id, function(node, i) {\r\n\t\t\t\t\tnode.style.display='none';\r\n\t\t\t\t\tscheduler._rendered.splice(i, 1);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (scheduler.config.touch_tip) {\r\n\t\t\t\tscheduler._show_global_tip();\r\n\t\t\t}\r\n\t\t\tscheduler.updateEvent(scheduler._drag_id);\r\n\t\t},scheduler.config.touch_drag);\r\n\r\n\t\tsource = fake_event;\r\n\t});\r\n\tfunction drag_cancel(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tscheduler._hide_global_tip();\r\n\t\tif (drag_mode){\r\n\t\t\tscheduler._on_mouse_up( accessor(e) );\r\n\t\t\tscheduler._temp_touch_block = false;\r\n\t\t}\r\n\t\tscheduler._drag_id = null;\r\n\t\tscheduler._drag_mode=null;\r\n\t\tscheduler._drag_pos=null;\r\n\t\tscheduler._pointerDragId = null;\r\n\t\tclearTimeout(timer);\r\n\t\tdrag_mode = action_mode = false;\r\n\t\tscroll_mode = true;\r\n\t}\r\n\r\n\t// touch end\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], names[2], function(e){\r\n\t\tif(document && document.body){\r\n\t\t\tdocument.body.classList.remove(\"dhx_cal_touch_active\");\r\n\t\t}\r\n\r\n\t\tif (ignore(e)) return;\r\n\r\n\t\tif(scheduler.config.touch_swipe_dates){\r\n\t\t\tif (!drag_mode && check_direction_swipe(source, tracker, 200, 100)) {\r\n\t\t\t\tscheduler._block_next_stop = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (drag_mode) {\r\n\t\t\tscheduler._ignore_next_click = true;\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\t}, 100);\r\n\t\t}\r\n\r\n\t\tdrag_cancel(e);\r\n\t\tif (scheduler._block_next_stop){\r\n\t\t\tscheduler._block_next_stop = false;\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler.event(document.body, names[2], drag_cancel);\r\n};\r\n\r\nscheduler._show_global_tip = function(){\r\n\tscheduler._hide_global_tip();\r\n\r\n\tvar toptip = scheduler._global_tip = document.createElement(\"div\");\r\n\ttoptip.className='dhx_global_tip';\r\n\r\n\tscheduler._update_global_tip(1);\r\n\r\n\tdocument.body.appendChild(toptip);\r\n};\r\nscheduler._update_global_tip = function(init){\r\n\tvar toptip = scheduler._global_tip;\r\n\tif (toptip){\r\n\t\tvar time = \"\";\r\n\t\tif (scheduler._drag_id && !init){\r\n\t\t\tvar ev = scheduler.getEvent(scheduler._drag_id);\r\n\t\t\tif (ev)\r\n\t\t\t\ttime = \"
\" + (ev._timed ? scheduler.templates.event_header(ev.start_date, ev.end_date, ev):scheduler.templates.day_date(ev.start_date, ev.end_date, ev)) + \"
\";\r\n\t\t}\r\n\r\n\t\tif (scheduler._drag_mode == \"create\" || scheduler._drag_mode == \"new-size\")\r\n\t\t\ttoptip.innerHTML = (scheduler.locale.labels.drag_to_create || \"Drag to create\")+time;\r\n\t\telse\r\n\t\t\ttoptip.innerHTML = (scheduler.locale.labels.drag_to_move || \"Drag to move\")+time;\r\n\t}\r\n};\r\nscheduler._hide_global_tip = function(){\r\n\tvar toptip = scheduler._global_tip;\r\n\tif (toptip && toptip.parentNode){\r\n\t\ttoptip.parentNode.removeChild(toptip);\r\n\t\tscheduler._global_tip = 0;\r\n\t}\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._addThemeClass = function(){\r\n\tdocument.documentElement.setAttribute(\"data-scheduler-theme\", scheduler.skin);\r\n};\r\n\r\nscheduler._skin_settings = {\r\n\tfix_tab_position: [1,0],\r\n\tuse_select_menu_space: [1,0],\r\n\twide_form: [1,0],\r\n\r\n\thour_size_px: [44,42],\r\n\tdisplayed_event_color: [\"#ff4a4a\", \"ffc5ab\"],\r\n\tdisplayed_event_text_color: [\"#ffef80\", \"7e2727\"]\r\n};\r\n\r\nscheduler._skin_xy = {\r\n\tlightbox_additional_height: [90,50],\r\n\tnav_height: [59,22],\r\n\tbar_height: [24,20]\r\n};\r\n\r\n// material skin uses a different box sizing model than other skins, and also requires some post-processing.\r\n// In order to render events correctly, we need to know which box sizing model is used\r\n// We can detect it by styles applied, taking into account that styles may be loaded after scheduler is rendered\r\n\r\nscheduler._is_material_skin = function(){\r\n\tif(!scheduler.skin){\r\n\t\treturn checkIfMaterialSkin();\r\n\t}else{\r\n\t\treturn ((scheduler.skin + \"\").indexOf(\"material\") > -1);\r\n\t}\r\n};\r\n\r\nfunction themeNameFromFile(){\r\n\tvar links = document.getElementsByTagName(\"link\");\r\n\tfor (var i = 0; i < links.length; i++) {\r\n\t\tvar res = links[i].href.match(\"dhtmlxscheduler_([a-z]+).css\");\r\n\t\tif (res){\r\n\t\t\treturn res[1];\r\n\t\t}\r\n\t}\r\n}\r\n\r\nscheduler._build_skin_info = function() {\r\n\tmonitorThemeChange();\r\n\tconst styles = getComputedStyle(this.$container);\r\n\tconst themeVar = styles.getPropertyValue(\"--dhx-scheduler-theme\");\r\n\r\n\tlet isCssVarTheme = !!themeVar;\r\n\tlet themeName;\r\n\tlet cssValues = {};\r\n\tlet oldMaterialTheme = false;\r\n\r\n\tif(isCssVarTheme){\r\n\t\tthemeName = themeVar;\r\n\t\tfor(let i in scheduler.xy){\r\n\t\t\tcssValues[i] = styles.getPropertyValue(`--dhx-scheduler-xy-${i}`);\r\n\t\t}\r\n\r\n\t\tcssValues.hour_size_px = styles.getPropertyValue(`--dhx-scheduler-config-hour_size_px`);\r\n\t\tcssValues.wide_form = styles.getPropertyValue(`--dhx-scheduler-config-form_wide`);\r\n\r\n\t}else{\r\n\t\tthemeName = themeNameFromFile();\r\n\t\toldMaterialTheme = scheduler._is_material_skin();\r\n\t}\r\n\r\n\r\n\tscheduler._theme_info = {\r\n\t\ttheme: themeName,\r\n\t\tcssVarTheme: isCssVarTheme,\r\n\t\toldMaterialTheme: oldMaterialTheme,\r\n\t\tvalues: cssValues\r\n\t};\r\n\r\n\tif(scheduler._theme_info.cssVarTheme){\r\n\t\tconst themeVariables = this._theme_info.values;\r\n\t\tfor(let i in scheduler.xy){\r\n\t\t\tif(!isNaN(parseInt(themeVariables[i]))){\r\n\t\t\t\tscheduler.xy[i] = parseInt(themeVariables[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n\r\nvar calculatedMaterial;\r\nfunction checkIfMaterialSkin(){\r\n\tif(calculatedMaterial === undefined){\r\n\t\tvar probe = document.createElement(\"div\");\r\n\t\tprobe.style.position = \"absolute\";\r\n\t\tprobe.style.left = \"-9999px\";\r\n\t\tprobe.style.top = \"-9999px\";\r\n\t\tprobe.innerHTML = \"
\" +\r\n\t\t\t\"
\" +\r\n\t\t\t\"
\"+\r\n\t\t\"
\";\r\n\t\tdocument.body.appendChild(probe);\r\n\t\tvar styles = window.getComputedStyle(probe.querySelector(\".dhx_cal_scale_placeholder\"));\r\n\t\tvar position = styles.getPropertyValue('position');\r\n\t\tif(position === \"absolute\"){\r\n\t\t\t// page has skins for placeholder element from material skin\r\n\t\t\tcalculatedMaterial = true;\r\n\t\t}else{\r\n\t\t\tcalculatedMaterial = false;\r\n\t\t}\r\n\r\n\t\tsetTimeout(function(){\r\n\t\t\tcalculatedMaterial = null;\r\n\t\t\tif(probe && probe.parentNode){\r\n\t\t\t\tprobe.parentNode.removeChild(probe);\r\n\t\t\t}\r\n\t\t}, 500);\r\n\t}\r\n\treturn calculatedMaterial;\r\n}\r\n\r\nvar cachedBorderBoxValue;\r\nfunction checkIfBorderBoxStyling(){\r\n\tif(scheduler._is_material_skin()){\r\n\t\treturn true;\r\n\t}else{\r\n\t\tif(cachedBorderBoxValue === undefined){\r\n\t\t\tvar probe = document.createElement(\"div\");\r\n\t\t\tprobe.style.position = \"absolute\";\r\n\t\t\tprobe.style.left = \"-9999px\";\r\n\t\t\tprobe.style.top = \"-9999px\";\r\n\t\t\tprobe.innerHTML = \"
\" +\r\n\t\t\t\t\"
\" +\r\n\t\t\t\t\t\"
\"+\r\n\t\t\t\t\"
\"+\r\n\t\t\t\"
\";\r\n\r\n\t\t\tdocument.body.appendChild(probe);\r\n\t\t\tvar styles = window.getComputedStyle(probe.querySelector(\".dhx_body\"));\r\n\t\t\tvar boxSizing = styles.getPropertyValue('box-sizing');\r\n\t\t\tdocument.body.removeChild(probe);\r\n\t\t\tcachedBorderBoxValue = !!(boxSizing === \"border-box\");\r\n\r\n\t\t\tif(!cachedBorderBoxValue){\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tcachedBorderBoxValue = undefined;\r\n\t\t\t\t}, 1000);// recalculate in case scheduler initialized before skin is loaded\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn cachedBorderBoxValue;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction refreshAfterLoad(){\r\n\tif(scheduler._is_material_skin() || scheduler._border_box_events()){\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar oldStyling = cachedBorderBoxValue;\r\n\tcachedBorderBoxValue = undefined;\r\n\tcalculatedMaterial = undefined;\r\n\tvar newStyling = checkIfBorderBoxStyling();\r\n\r\n\t// if box styling model changed - means scheduler was rendered before stylesheet was loaded or parsed inline\r\n\t// repaint scheduler in order to apply new styles\r\n\tif(oldStyling !== newStyling && scheduler.$container && scheduler.getState().mode){\r\n\t\tscheduler.setCurrentView();\r\n\t}\r\n}\r\nscheduler.event(window, 'DOMContentLoaded', refreshAfterLoad);\r\nscheduler.event(window, 'load', refreshAfterLoad);\r\n\r\nscheduler._border_box_events = function(){\r\n\treturn checkIfBorderBoxStyling();\r\n};\r\n\r\nscheduler._configure = function(col, data, skin){\r\n\tfor (var key in data)\r\n\t\tif (typeof col[key] == \"undefined\")\r\n\t\t\tcol[key] = data[key][skin];\r\n};\r\n\r\nscheduler.setSkin = function(value){\r\n\tthis.skin = value;\r\n\tscheduler._addThemeClass();\r\n\tif(scheduler.$container){\r\n\t\tthis._skin_init();\r\n\t\tthis.render();\r\n\t}\r\n\t\r\n\t//\r\n};\r\n\r\nfunction flatSkinHourScale(date){\r\n\tvar min = date.getMinutes();\r\n\tmin = min < 10 ? \"0\"+min : min;\r\n\tvar html = \"\"+ date.getHours() +\"\"+\r\n\t\t\" \"+ min +\"\";\r\n\treturn html;\r\n}\r\n\r\nlet monitorIntervalId = null;\r\nfunction monitorThemeChange(){\r\n\tconst container = scheduler.$container;\r\n\t\r\n\tclearInterval(monitorIntervalId);\r\n\tif(container){\r\n\t\tmonitorIntervalId = setInterval(() => {\r\n\t\t\tconst csstheme = getComputedStyle(container).getPropertyValue('--dhx-scheduler-theme');\r\n\t\t\tif(csstheme && csstheme !== scheduler.skin){\r\n\t\t\t\tscheduler.setSkin(csstheme);\r\n\t\t\t}\r\n\r\n\t\t}, 100);\r\n\t}\r\n}\r\nscheduler.attachEvent(\"onDestroy\", function(){\r\n\tclearInterval(monitorIntervalId);\r\n});\r\n\r\nscheduler._skin_init = function(){\r\n\tthis._build_skin_info();\r\n\r\n\tif (!this.skin){\r\n\t\tthis.skin = this._theme_info.theme;\r\n\t}\r\n\tscheduler._addThemeClass();\r\n\tif (scheduler.skin === \"flat\"){\r\n\t\t// scheduler.xy.scale_height = 35;\r\n\t\tscheduler.templates.hour_scale = flatSkinHourScale;\r\n\t}else if (scheduler.templates.hour_scale === flatSkinHourScale){\r\n\t\tscheduler.templates.hour_scale = scheduler.date.date_to_str(scheduler.config.hour_date);\r\n\t}\r\n\r\n\r\n\r\n\t//scheduler._lightbox_template=\"
 
\";\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\r\n\t\tvar date_to_str = scheduler.date.date_to_str(\"%d\");\r\n\t\tif(!scheduler.templates._old_month_day){\r\n\t\t\tscheduler.templates._old_month_day = scheduler.templates.month_day;\r\n\t\t}\r\n\t\tvar old_month_day = scheduler.templates._old_month_day;\r\n\t\tscheduler.templates.month_day = function(date) {\r\n\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\tvar label = date_to_str(date);\r\n\t\t\t\tif (date.getDate() == 1) {\r\n\t\t\t\t\tlabel = scheduler.locale.date.month_full[date.getMonth()] + \" \" + label;\r\n\t\t\t\t}\r\n\t\t\t\tif (+date == +scheduler.date.date_part(this._currentDate())) {\r\n\t\t\t\t\tlabel = scheduler.locale.labels.dhx_cal_today_button + \" \" + label;\r\n\t\t\t\t}\r\n\t\t\t\treturn label;\r\n\t\t\t} else {\r\n\t\t\t\treturn old_month_day.call(this, date);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t// tab classes\r\n\t\tif(scheduler.config.fix_tab_position){\r\n\t\t\tconst tabs = scheduler._els[\"dhx_cal_navline\"][0].querySelectorAll('[data-tab]');\r\n\t\t\ttabs.forEach((tab) => {\r\n\t\t\t\tconst view = tab.getAttribute(\"data-tab\") || tab.getAttribute(\"name\");\r\n\r\n\t\t\t\tswitch (view) {\r\n\t\t\t\t\tcase \"day\":\r\n\t\t\t\t\tcase \"day_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_first\");\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"week\":\r\n\t\t\t\t\tcase \"week_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"month\":\r\n\t\t\t\t\tcase \"month_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_last\");\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_standalone\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\treorderTabs(scheduler._els[\"dhx_cal_navline\"][0]);\r\n\r\n\t\t}\r\n\t}, {once: true});\r\n\r\n\tfunction reorderTabs(container) {\r\n\t\t// segmented tabs should go first\r\n\r\n\t\tif(scheduler.config.header){\r\n\t\t\treturn;\r\n\t\t\t// don't reorder tabs if header is defined via config\r\n\t\t}\r\n\t\tconst tabs = Array.from(container.querySelectorAll('.dhx_cal_tab'));\r\n\t\r\n\t\t// segmented tabs\r\n\t\tconst order = ['day', 'week', 'month'];\r\n\t\r\n\t\tconst specialTabs = order.map(tabName => \r\n\t\t\ttabs.find(tab => tab.getAttribute('data-tab') === tabName)\r\n\t\t).filter(tab => tab !== undefined);\r\n\t\r\n\t\tlet firstTab = tabs.length > 0 ? tabs[0] : null;\r\n\r\n\t\tspecialTabs.reverse().forEach(tab => {\r\n\t\t\tcontainer.insertBefore(tab, firstTab);\r\n\t\t\tfirstTab = tab;\r\n\t\t});\r\n\t}\r\n\r\n\t// scheduler._skin_init = function(){\r\n\t// \tthis._build_skin_info();\r\n\t// \tthis.skin = this._theme_info.theme;\r\n\t// };\r\n};\r\n\r\n\r\n\r\n}","export default function DataProcessorEvents(scheduler, dp){\r\n\tthis.$scheduler = scheduler;\r\n\tthis.$dp = dp;\r\n\tthis._dataProcessorHandlers = [];\r\n\r\n\tthis.attach = function () {\r\n\t\tvar dp = this.$dp;\r\n\t\tvar scheduler = this.$scheduler;\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onEventAdded\", function(id) {\r\n\t\t\tif (!this._loading && this._validId(id))\r\n\t\t\tdp.setUpdated(id,true,\"inserted\");\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function(id) {\r\n\t\t\tif (!this._validId(id)) return;\r\n\t\t\tvar z=dp.getState(id);\r\n\r\n\t\t\tif (z==\"inserted\" || this._new_event) { dp.setUpdated(id,false); return true; }\r\n\t\t\tif (z==\"deleted\") return false;\r\n\t\t\tif (z==\"true_deleted\") return true;\r\n\r\n\t\t\tdp.setUpdated(id,true,\"deleted\");\r\n\t\t\treturn false;\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onEventChanged\", function(id) { \r\n\t\t\tif (!this._loading && this._validId(id))\r\n\t\t\tdp.setUpdated(id,true,\"updated\");\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onClearAll\", function() { \r\n\t\t\t// clear dataprocessor state when scheduler is reset\r\n\t\t\tdp._in_progress={};\r\n\t\t\tdp._invalid={};\r\n\t\t\tdp.updatedRows = [];\r\n\t\t\tdp._waitMode = 0;\r\n\t\t}));\r\n\r\n\t\tdp.attachEvent(\"insertCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"updateCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"deleteCallback\", function(upd, id) {\r\n\t\t\tif (scheduler.getEvent(id)){\r\n\t\t\t\tscheduler.setUserData(id, this.action_param, \"true_deleted\");\r\n\t\t\t\tscheduler.deleteEvent(id);\r\n\t\t\t} else if (scheduler._add_rec_marker)\r\n\t\t\t\tscheduler._update_callback(upd, id);\r\n\t\t});\r\n\t};\r\n\r\n\tthis.detach = function () {\r\n\t\tfor (var key in this._dataProcessorHandlers) {\r\n\t\t\tvar handler = this._dataProcessorHandlers[key];\r\n\t\t\tthis.$scheduler.detachEvent(handler);\r\n\t\t}\r\n\t\tthis._dataProcessorHandlers = [];\r\n\t};\r\n}\r\n\r\nexport function extendScheduler(scheduler, dp){\r\n\tscheduler._validId=function(id){\r\n\t\tif(this._is_virtual_event){\r\n\t\t\treturn !this._is_virtual_event(id);\r\n\t\t}\r\n\t\treturn true;\r\n\t};\r\n\tscheduler.setUserData=function(id,name,value){\r\n\t\tif (id){\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif(ev) ev[name]=value;\r\n\t\t}else{\r\n\t\t\tthis._userdata[name]=value;\r\n\t\t}\r\n\t};\r\n\tscheduler.getUserData=function(id,name){\r\n\t\tif (id){\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif(ev)\r\n\t\t\t\treturn ev[name];\r\n\t\t\telse\r\n\t\t\t\treturn null;\r\n\t\t}else{\r\n\t\t\treturn this._userdata[name];\r\n\t\t}\r\n\t};\r\n\tscheduler._set_event_text_style=function(id,style){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\t\tthis.for_rendered(id,function(r){\r\n\t\t\tr.style.cssText+=\";\"+style;\r\n\t\t});\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tev[\"_text_style\"]=style;\r\n\t\tthis.event_updated(ev);\r\n\t};\r\n\tscheduler._update_callback = function(upd,id){\r\n\t\tvar data = scheduler._xmlNodeToJSON(upd.firstChild);\r\n\t\t//fix for updates of recurring events\r\n\t\tif (data.rec_type == \"none\") data.rec_pattern = \"none\";\r\n\t\tdata.text = data.text||data._tagvalue;\r\n\t\tdata.start_date = scheduler._helpers.parseDate(data.start_date);\r\n\t\tdata.end_date = scheduler._helpers.parseDate(data.end_date);\r\n\t\tscheduler.addEvent(data);\r\n\t\tif (scheduler._add_rec_marker)\r\n\t\t\tscheduler.setCurrentView();\r\n\t};\r\n\tscheduler._dp_change_event_id = function(id, new_id){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\t\tscheduler.changeEventId(id, new_id);\r\n\t};\r\n\tscheduler._dp_hook_delete = function(id, new_id){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\r\n\t\tif(new_id && id != new_id){\r\n\t\t\tif(this.getUserData(id, dp.action_param) == \"true_deleted\")\r\n\t\t\t\tthis.setUserData(id, dp.action_param, \"updated\");\r\n\r\n\t\t\tthis.changeEventId(id, new_id);\r\n\t\t}\r\n\t\treturn this.deleteEvent(new_id, true);\r\n\t};\r\n\r\n\tscheduler.setDp = function() {\r\n\t\tthis._dp = dp;\r\n\t};\r\n\tscheduler.setDp();\r\n}","import DataProcessorEvents from \"./dataprocessor_hooks\";\r\nimport { extendScheduler } from \"./dataprocessor_hooks\";\r\nimport eventable from \"../../utils/eventable\";\r\nimport global from \"../../global\";\r\n\r\n/**\r\n *\t@desc: constructor, data processor object\r\n *\t@param: serverProcessorURL - url used for update\r\n *\t@type: public\r\n */\r\nexport function DataProcessor(serverProcessorURL){\r\n\tthis.serverProcessor = serverProcessorURL;\r\n\tthis.action_param = \"!nativeeditor_status\";\r\n\r\n\tthis.object = null;\r\n\tthis.updatedRows = []; // ids of updated rows\r\n\r\n\tthis.autoUpdate = true;\r\n\tthis.updateMode = \"cell\";\r\n\tthis._tMode = \"GET\";\r\n\tthis._headers = null;\r\n\tthis._payload = null;\r\n\tthis.post_delim = \"_\";\r\n\r\n\tthis._waitMode = 0;\r\n\tthis._in_progress = {};\r\n\tthis._invalid = {};\r\n\tthis.messages = [];\r\n\r\n\tthis.styles = {\r\n\t\tupdated: \"font-weight:bold;\",\r\n\t\tinserted: \"font-weight:bold;\",\r\n\t\tdeleted: \"text-decoration : line-through;\",\r\n\t\tinvalid: \"background-color:FFE0E0;\",\r\n\t\tinvalid_cell: \"border-bottom:2px solid red;\",\r\n\t\terror: \"color:red;\",\r\n\t\tclear: \"font-weight:normal;text-decoration:none;\"\r\n\t};\r\n\tthis.enableUTFencoding(true);\r\n\teventable(this); // TODO: need to update\r\n\r\n\treturn this;\r\n}\r\nDataProcessor.prototype = {\r\n\tsetTransactionMode: function (mode, total) {\r\n\t\tif (typeof mode == \"object\") {\r\n\t\t\tthis._tMode = mode.mode || this._tMode;\r\n\r\n\t\t\tif (mode.headers !== undefined) {\r\n\t\t\t\tthis._headers = mode.headers;\r\n\t\t\t}\r\n\r\n\t\t\tif (mode.payload !== undefined) {\r\n\t\t\t\tthis._payload = mode.payload;\r\n\t\t\t}\r\n\t\t\tthis._tSend = !!total;\r\n\t\t} else {\r\n\t\t\tthis._tMode = mode;\r\n\t\t\tthis._tSend = total;\r\n\t\t}\r\n\r\n\t\tif (this._tMode == \"REST\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t}\r\n\r\n\t\tif (this._tMode === \"JSON\" || this._tMode === \"REST-JSON\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t\tthis._serializeAsJson = true;\r\n\t\t\tthis._headers = this._headers || {};\r\n\t\t\tthis._headers[\"Content-Type\"] = \"application/json\";\r\n\t\t}else{\r\n\t\t\tif(this._headers && !this._headers[\"Content-Type\"]){\r\n\t\t\t\tthis._headers[\"Content-Type\"] = \"application/x-www-form-urlencoded\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (this._tMode === \"CUSTOM\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t\tthis._router = mode.router;\r\n\t\t}\r\n\t},\r\n\tescape: function (data) {\r\n\t\tif (this._utf)\r\n\t\t\treturn encodeURIComponent(data);\r\n\t\telse\r\n\t\t\treturn escape(data);\r\n\t},\r\n\t/**\r\n\t *\t@desc: allows to set escaping mode\r\n\t *\t@param: true - utf based escaping, simple - use current page encoding\r\n\t *\t@type: public\r\n\t */\r\n\tenableUTFencoding: function (mode) {\r\n\t\tthis._utf = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: allows to define, which column may trigger update\r\n\t *\t@param: val - array or list of true/false values\r\n\t *\t@type: public\r\n\t */\r\n\tsetDataColumns: function (val) {\r\n\t\tthis._columns = (typeof val == \"string\") ? val.split(\",\") : val;\r\n\t},\r\n\t/**\r\n\t *\t@desc: get state of updating\r\n\t *\t@returns: true - all in sync with server, false - some items not updated yet.\r\n\t *\t@type: public\r\n\t */\r\n\tgetSyncState: function () {\r\n\t\treturn !this.updatedRows.length;\r\n\t},\r\n\t/**\r\n\t *\t@desc: enable/disable named field for data syncing, will use column ids for grid\r\n\t *\t@param: mode - true/false\r\n\t *\t@type: public\r\n\t */\r\n\tenableDataNames: function (mode) {\r\n\t\tthis._endnm = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: enable/disable mode , when only changed fields and row id send to the server side, instead of all fields in default mode\r\n\t *\t@param: mode - true/false\r\n\t *\t@type: public\r\n\t */\r\n\tenablePartialDataSend: function (mode) {\r\n\t\tthis._changed = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: set if rows should be send to server automatically\r\n\t *\t@param: mode - \"row\" - based on row selection changed, \"cell\" - based on cell editing finished, \"off\" - manual data sending\r\n\t *\t@type: public\r\n\t */\r\n\tsetUpdateMode: function (mode, dnd) {\r\n\t\tthis.autoUpdate = (mode == \"cell\");\r\n\t\tthis.updateMode = mode;\r\n\t\tthis.dnd = dnd;\r\n\t},\r\n\tignore: function (code, master) {\r\n\t\tthis._silent_mode = true;\r\n\t\tcode.call(master || window);\r\n\t\tthis._silent_mode = false;\r\n\t},\r\n\t/**\r\n\t *\t@desc: mark row as updated/normal. check mandatory fields,initiate autoupdate (if turned on)\r\n\t *\t@param: rowId - id of row to set update-status for\r\n\t *\t@param: state - true for \"updated\", false for \"not updated\"\r\n\t *\t@param: mode - update mode name\r\n\t *\t@type: public\r\n\t */\r\n\tsetUpdated: function (rowId, state, mode) {\r\n\t\tif (this._silent_mode) return;\r\n\t\tvar ind = this.findRow(rowId);\r\n\r\n\t\tmode = mode || \"updated\";\r\n\t\tvar existing = this.$scheduler.getUserData(rowId, this.action_param);\r\n\t\tif (existing && mode == \"updated\") mode = existing;\r\n\t\tif (state) {\r\n\t\t\tthis.set_invalid(rowId, false); //clear previous error flag\r\n\t\t\tthis.updatedRows[ind] = rowId;\r\n\t\t\tthis.$scheduler.setUserData(rowId, this.action_param, mode);\r\n\t\t\tif (this._in_progress[rowId])\r\n\t\t\t\tthis._in_progress[rowId] = \"wait\";\r\n\t\t} else {\r\n\t\t\tif (!this.is_invalid(rowId)) {\r\n\t\t\t\tthis.updatedRows.splice(ind, 1);\r\n\t\t\t\tthis.$scheduler.setUserData(rowId, this.action_param, \"\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.markRow(rowId, state, mode);\r\n\t\tif (state && this.autoUpdate) this.sendData(rowId);\r\n\t},\r\n\r\n\tmarkRow: function (id, state, mode) {\r\n\t\tvar str = \"\";\r\n\t\tvar invalid = this.is_invalid(id);\r\n\t\tif (invalid) {\r\n\t\t\tstr = this.styles[invalid];\r\n\t\t\tstate = true;\r\n\t\t}\r\n\t\tif (this.callEvent(\"onRowMark\", [id, state, mode, invalid])) {\r\n\t\t\t//default logic\r\n\t\t\tstr = this.styles[state ? mode : \"clear\"] + str;\r\n\r\n\t\t\tthis.$scheduler[this._methods[0]](id, str);\r\n\r\n\t\t\tif (invalid && invalid.details) {\r\n\t\t\t\tstr += this.styles[invalid + \"_cell\"];\r\n\t\t\t\tfor (var i = 0; i < invalid.details.length; i++)\r\n\t\t\t\t\tif (invalid.details[i])\r\n\t\t\t\t\t\tthis.$scheduler[this._methods[1]](id, i, str);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tgetActionByState: function(state) {\r\n\t\tif (state === \"inserted\") {\r\n\t\t\treturn \"create\";\r\n\t\t}\r\n\t\tif (state === \"updated\") {\r\n\t\t\treturn \"update\";\r\n\t\t}\r\n\t\tif (state === \"deleted\") {\r\n\t\t\treturn \"delete\";\r\n\t\t}\r\n\t\treturn \"update\";\r\n\t},\r\n\r\n\tgetState: function (id) {\r\n\t\treturn this.$scheduler.getUserData(id, this.action_param);\r\n\t},\r\n\tis_invalid: function (id) {\r\n\t\treturn this._invalid[id];\r\n\t},\r\n\tset_invalid: function (id, mode, details) {\r\n\t\tif (details) mode = {\r\n\t\t\tvalue: mode, details: details, toString: function () {\r\n\t\t\t\treturn this.value.toString();\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis._invalid[id] = mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: check mandatory fields and varify values of cells, initiate update (if specified)\r\n\t *\t@param: rowId - id of row to set update-status for\r\n\t *\t@type: public\r\n\t */\r\n\tcheckBeforeUpdate: function (rowId) {\r\n\t\treturn true;\r\n\t},\r\n\t/**\r\n\t *\t@desc: send row(s) values to server\r\n\t *\t@param: rowId - id of row which data to send. If not specified, then all \"updated\" rows will be send\r\n\t *\t@type: public\r\n\t */\r\n\tsendData: function (rowId) {\r\n\t\tif (this.$scheduler.editStop) this.$scheduler.editStop();\r\n\r\n\t\tif (typeof rowId == \"undefined\" || this._tSend) return this.sendAllData();\r\n\t\tif (this._in_progress[rowId]) return false;\r\n\r\n\t\tthis.messages = [];\r\n\t\tif (!this.checkBeforeUpdate(rowId) && this.callEvent(\"onValidationError\", [rowId, this.messages])) return false;\r\n\t\tthis._beforeSendData(this._getRowData(rowId), rowId);\r\n\t},\r\n\t_beforeSendData: function (data, rowId) {\r\n\t\tif (!this.callEvent(\"onBeforeUpdate\", [rowId, this.getState(rowId), data])) return false;\r\n\t\tthis._sendData(data, rowId);\r\n\t},\r\n\tserialize: function (data, id) {\r\n\t\tif (this._serializeAsJson) {\r\n\t\t\treturn this._serializeAsJSON(data);\r\n\t\t}\r\n\r\n\t\tif (typeof data == \"string\")\r\n\t\t\treturn data;\r\n\t\tif (typeof id != \"undefined\")\r\n\t\t\treturn this.serialize_one(data, \"\");\r\n\t\telse {\r\n\t\t\tvar stack = [];\r\n\t\t\tvar keys = [];\r\n\t\t\tfor (var key in data)\r\n\t\t\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\t\t\tstack.push(this.serialize_one(data[key], key + this.post_delim));\r\n\t\t\t\t\tkeys.push(key);\r\n\t\t\t\t}\r\n\t\t\tstack.push(\"ids=\" + this.escape(keys.join(\",\")));\r\n\t\t\tif (this.$scheduler.security_key)\r\n\t\t\t\tstack.push(\"dhx_security=\" + (this.$scheduler.security_key));\r\n\t\t\treturn stack.join(\"&\");\r\n\t\t}\r\n\t},\r\n\tserialize_one: function (data, pref) {\r\n\t\tif (typeof data == \"string\")\r\n\t\t\treturn data;\r\n\t\tvar stack = [];\r\n\t\tvar serialized = \"\";\r\n\t\tfor (var key in data)\r\n\t\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\t\tif ((key == \"id\" || key == this.action_param) && this._tMode == \"REST\") continue;\r\n\t\t\t\tif (typeof data[key] === \"string\" || typeof data[key] === \"number\") {\r\n\t\t\t\t\tserialized = data[key];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tserialized = JSON.stringify(data[key]);\r\n\t\t\t\t}\r\n\t\t\t\tstack.push(this.escape((pref || \"\") + key) + \"=\" + this.escape(serialized));\r\n\t\t\t}\r\n\t\treturn stack.join(\"&\");\r\n\t},\r\n\t_applyPayload: function (url) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tif (this._payload)\r\n\t\t\tfor (var key in this._payload)\r\n\t\t\t\turl = url + ajax.urlSeparator(url) + this.escape(key) + \"=\" + this.escape(this._payload[key]);\r\n\t\treturn url;\r\n\t},\r\n\t_sendData: function (dataToSend, rowId) {\r\n\t\tif (!dataToSend) {\r\n\t\t\treturn; // nothing to send\r\n\t\t}\r\n\t\tif (!this.callEvent(\"onBeforeDataSending\", rowId ? [rowId, this.getState(rowId), dataToSend] : [null, null, dataToSend])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (rowId) {\r\n\t\t\tthis._in_progress[rowId] = (new Date()).valueOf();\r\n\t\t}\r\n\r\n\t\tvar self = this;\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\r\n\t\tif (this._tMode === \"CUSTOM\") {\r\n\t\t\tvar state = this.getState(rowId);\r\n\t\t\tvar action = this.getActionByState(state);\r\n\t\t\tvar _onResolvedCreateUpdate = function (tag) {\r\n\t\t\t\tvar resultState = state;\r\n\t\t\t\tif(tag && tag.responseText && tag.setRequestHeader){\r\n\t\t\t\t\tif(tag.status !== 200){\r\n\t\t\t\t\t\tresultState = \"error\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\ttag = JSON.parse(tag.responseText);\r\n\t\t\t\t\t} catch (e){}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tresultState = resultState || \"updated\";\r\n\t\t\t\tvar sid = rowId;\r\n\t\t\t\tvar tid = rowId;\r\n\r\n\t\t\t\tif (tag) {\r\n\t\t\t\t\tresultState = tag.action || resultState;\r\n\t\t\t\t\tsid = tag.sid || sid;\r\n\t\t\t\t\ttid = tag.id || tag.tid || tid;\r\n\t\t\t\t}\r\n\t\t\t\tself.afterUpdateCallback(sid, tid, resultState, tag);\r\n\t\t\t};\r\n\r\n\t\t\tconst routerMode = \"event\";\r\n\t\t\tvar actionPromise;\r\n\t\t\tif (this._router instanceof Function) {\r\n\t\t\t\tactionPromise = this._router(routerMode, action, dataToSend, rowId);\r\n\t\t\t} else {\r\n\t\t\t\tswitch (state) {\r\n\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].create(dataToSend);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].delete(rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].update(dataToSend, rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(actionPromise){\r\n\t\t\t\t// neither promise nor {tid: newId} response object\r\n\t\t\t\tif(!actionPromise.then &&\r\n\t\t\t\t\t(actionPromise.id === undefined && actionPromise.tid === undefined && actionPromise.action === undefined)){\r\n\t\t\t\t\tthrow new Error(\"Incorrect router return value. A Promise or a response object is expected\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(actionPromise.then){\r\n\t\t\t\t\tactionPromise.then(_onResolvedCreateUpdate).catch(function(error) {\r\n\t\t\t\t\t\tif(error && error.action){\r\n\t\t\t\t\t\t\t_onResolvedCreateUpdate(error);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t_onResolvedCreateUpdate({ action: \"error\", value: error});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// custom method may return a response object in case of sync action\r\n\t\t\t\t\t_onResolvedCreateUpdate(actionPromise);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t_onResolvedCreateUpdate(null);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar queryParams = {\r\n\t\t\tcallback: function(xml) {\r\n\t\t\t\tvar ids = [];\r\n\r\n\t\t\t\tif (rowId) {\r\n\t\t\t\t\tids.push(rowId);\r\n\t\t\t\t} else if (dataToSend) {\r\n\t\t\t\t\tfor (var key in dataToSend) {\r\n\t\t\t\t\t\tids.push(key);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.afterUpdate(self, xml, ids);\r\n\t\t\t},\r\n\t\t\theaders: self._headers\r\n\t\t};\r\n\r\n\t\tvar urlParams = this.serverProcessor + (this._user ? (ajax.urlSeparator(this.serverProcessor) + [\"dhx_user=\" + this._user, \"dhx_version=\" + this.$scheduler.getUserData(0, \"version\")].join(\"&\")) : \"\");\r\n\t\tvar url = this._applyPayload(urlParams);\r\n\t\tvar data;\r\n\r\n\t\tswitch (this._tMode) {\r\n\t\t\tcase \"GET\":\r\n\t\t\t\tdata = this._cleanupArgumentsBeforeSend(dataToSend);\r\n\t\t\t\tqueryParams.url = url + ajax.urlSeparator(url) + this.serialize(data, rowId);\r\n\t\t\t\tqueryParams.method = \"GET\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"POST\":\r\n\t\t\t\tdata = this._cleanupArgumentsBeforeSend(dataToSend);\r\n\t\t\t\tqueryParams.url = url;\r\n\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\tqueryParams.data = this.serialize(data, rowId);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"JSON\":\r\n\t\t\t\tdata = {};\r\n\t\t\t\tvar preprocessedData = this._cleanupItemBeforeSend(dataToSend);\r\n\t\t\t\tfor (var key in preprocessedData) {\r\n\t\t\t\t\tif (key === this.action_param || key === \"id\" || key === \"gr_id\") {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdata[key] = preprocessedData[key];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tqueryParams.url = url;\r\n\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\tqueryParams.data = JSON.stringify({\r\n\t\t\t\t\tid: rowId,\r\n\t\t\t\t\taction: dataToSend[this.action_param],\r\n\t\t\t\t\tdata: data\r\n\t\t\t\t});\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"REST\":\r\n\t\t\tcase \"REST-JSON\":\r\n\t\t\t\turl = urlParams.replace(/(&|\\?)editing=true/, \"\");\r\n\t\t\t\tdata = \"\";\r\n\r\n\t\t\t\tswitch (this.getState(rowId)) {\r\n\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\t\t\tqueryParams.data = this.serialize(dataToSend, rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\tqueryParams.method = \"DELETE\";\r\n\t\t\t\t\t\turl = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + rowId;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tqueryParams.method = \"PUT\";\r\n\t\t\t\t\t\tqueryParams.data = this.serialize(dataToSend, rowId);\r\n\t\t\t\t\t\turl = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + rowId;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tqueryParams.url = this._applyPayload(url);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tthis._waitMode++;\r\n\t\treturn ajax.query(queryParams);\r\n\t},\r\n\tsendAllData: function () {\r\n\t\tif (!this.updatedRows.length || this.updateMode === \"off\") { // FIXME: need to leave checking 'this.updateMode === \"off\"'?\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.messages = [];\r\n\t\tvar valid = true;\r\n\r\n\t\tthis._forEachUpdatedRow(function(rowId) {\r\n\t\t\tvalid = valid && this.checkBeforeUpdate(rowId);\r\n\t\t});\r\n\r\n\t\tif (!valid && !this.callEvent(\"onValidationError\", [\"\", this.messages])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (this._tSend) {\r\n\t\t\tthis._sendData(this._getAllData());\r\n\t\t} else {\r\n\t\t\tthis._forEachUpdatedRow(function(rowId) {\r\n\t\t\t\tif (!this._in_progress[rowId]) {\r\n\t\t\t\t\tif (this.is_invalid(rowId)) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis._beforeSendData(this._getRowData(rowId), rowId);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\t_getAllData: function (rowId) {\r\n\t\tvar out = {};\r\n\t\tvar has_one = false;\r\n\t\tthis._forEachUpdatedRow(function(id) {\r\n\t\t\tif (this._in_progress[id] || this.is_invalid(id)){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar row = this._getRowData(id);\r\n\t\t\tif (!this.callEvent(\"onBeforeUpdate\", [id, this.getState(id), row])) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tout[id] = row;\r\n\t\t\thas_one = true;\r\n\t\t\tthis._in_progress[id] = (new Date()).valueOf();\r\n\t\t});\r\n\t\treturn has_one ? out : null;\r\n\t},\r\n\r\n\tfindRow: function (pattern) {\r\n\t\tvar i = 0;\r\n\t\tfor (i = 0; i < this.updatedRows.length; i++)\r\n\t\t\tif (pattern == this.updatedRows[i]) break;\r\n\t\treturn i;\r\n\t},\r\n\r\n\t/**\r\n\t *\t@desc: define custom actions\r\n\t *\t@param: name - name of action, same as value of action attribute\r\n\t *\t@param: handler - custom function, which receives a XMl response content for action\r\n\t *\t@type: private\r\n\t */\r\n\tdefineAction: function (name, handler) {\r\n\t\tif (!this._uActions) this._uActions = {};\r\n\t\tthis._uActions[name] = handler;\r\n\t},\r\n\r\n\t/**\r\n\t *\t @desc: used in combination with setOnBeforeUpdateHandler to create custom client-server transport system\r\n\t *\t @param: sid - id of item before update\r\n\t *\t @param: tid - id of item after up0ate\r\n\t *\t @param: action - action name\r\n\t *\t @type: public\r\n\t *\t @topic: 0\r\n\t */\r\n\tafterUpdateCallback: function (sid, tid, action, btag) {\r\n\t\tif(!this.$scheduler){\r\n\t\t\t// destructor has been called before the callback\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar marker = sid;\r\n\t\tvar correct = (action !== \"error\" && action !== \"invalid\");\r\n\t\tif (!correct) {\r\n\t\t\tthis.set_invalid(sid, action);\r\n\t\t}\r\n\t\tif ((this._uActions) && (this._uActions[action]) && (!this._uActions[action](btag))) {\r\n\t\t\treturn (delete this._in_progress[marker]);\r\n\t\t}\r\n\r\n\t\tif (this._in_progress[marker] !== \"wait\") {\r\n\t\t\tthis.setUpdated(sid, false);\r\n\t\t}\r\n\r\n\t\tvar originalSid = sid;\r\n\r\n\t\tswitch (action) {\r\n\t\t\tcase \"inserted\":\r\n\t\t\tcase \"insert\":\r\n\t\t\t\tif (tid != sid) {\r\n\t\t\t\t\tthis.setUpdated(sid, false);\r\n\t\t\t\t\tthis.$scheduler[this._methods[2]](sid, tid);\r\n\t\t\t\t\tsid = tid;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"delete\":\r\n\t\t\tcase \"deleted\":\r\n\t\t\t\tthis.$scheduler.setUserData(sid, this.action_param, \"true_deleted\");\r\n\t\t\t\tthis.$scheduler[this._methods[3]](sid, tid);\r\n\t\t\t\tdelete this._in_progress[marker];\r\n\t\t\t\treturn this.callEvent(\"onAfterUpdate\", [sid, action, tid, btag]);\r\n\t\t}\r\n\r\n\t\tif (this._in_progress[marker] !== \"wait\") {\r\n\t\t\tif (correct) {\r\n\t\t\t\tthis.$scheduler.setUserData(sid, this.action_param, \"\");\r\n\t\t\t}\r\n\t\t\tdelete this._in_progress[marker];\r\n\t\t} else {\r\n\t\t\tdelete this._in_progress[marker];\r\n\t\t\tthis.setUpdated(tid, true, this.$scheduler.getUserData(sid, this.action_param));\r\n\t\t}\r\n\r\n\t\tthis.callEvent(\"onAfterUpdate\", [originalSid, action, tid, btag]);\r\n\t},\r\n\r\n\t_errorResponse: function (xml, id){\r\n\t\tif(this.$scheduler && this.$scheduler.callEvent){\r\n\t\t\tthis.$scheduler.callEvent(\"onSaveError\", [id, xml.xmlDoc]);\r\n\t\t}\r\n\t\treturn this.cleanUpdate(id);\r\n\t},\r\n\r\n\t_setDefaultTransactionMode: function () {\r\n\t\tif (this.serverProcessor) {\r\n\t\t\tthis.setTransactionMode(\"POST\", true);\r\n\t\t\tthis.serverProcessor += (this.serverProcessor.indexOf(\"?\") !== -1 ? \"&\" : \"?\") + \"editing=true\";\r\n\t\t\tthis._serverProcessor = this.serverProcessor;\r\n\t\t}\r\n\t},\r\n\t\r\n\t/**\r\n\t *\t@desc: response from server\r\n\t *\t@param: xml - XMLLoader object with response XML\r\n\t *\t@type: private\r\n\t */\r\n\tafterUpdate: function (that, xml, id) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\r\n\t\tif (xml.xmlDoc.status !== 200){\r\n\t\t\tthis._errorResponse(xml, id);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// try to use json first\r\n\t\tvar tag;\r\n\t\ttry {\r\n\t\t\ttag = JSON.parse(xml.xmlDoc.responseText);\r\n\t\t} catch (e) {\r\n\t\t\t// empty response also can be processed by json handler\r\n\t\t\tif (!xml.xmlDoc.responseText.length) {\r\n\t\t\t\ttag = {};\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (tag) {\r\n\t\t\tvar action = tag.action || this.getState(id) || \"updated\";\r\n\t\t\tvar sid = tag.sid || id[0];\r\n\t\t\tvar tid = tag.tid || id[0];\r\n\t\t\tthat.afterUpdateCallback(sid, tid, action, tag);\r\n\t\t\tthat.finalizeUpdate();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// xml response\r\n\t\tvar top = ajax.xmltop(\"data\", xml.xmlDoc); // fix incorrect content type in IE\r\n\t\tif (!top) {\r\n\t\t\treturn this._errorResponse(xml, id);\r\n\t\t}\r\n\t\tvar atag = ajax.xpath(\"//data/action\", top);\r\n\t\tif (!atag.length) {\r\n\t\t\treturn this._errorResponse(xml, id);\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < atag.length; i++) {\r\n\t\t\tvar btag = atag[i];\r\n\t\t\tvar action = btag.getAttribute(\"type\");\r\n\t\t\tvar sid = btag.getAttribute(\"sid\");\r\n\t\t\tvar tid = btag.getAttribute(\"tid\");\r\n\r\n\t\t\tthat.afterUpdateCallback(sid, tid, action, btag);\r\n\t\t}\r\n\t\tthat.finalizeUpdate();\r\n\t},\r\n\tcleanUpdate: function (id) {\r\n\t\tif (id)\r\n\t\t\tfor (var i = 0; i < id.length; i++)\r\n\t\t\t\tdelete this._in_progress[id[i]];\r\n\t},\r\n\tfinalizeUpdate: function () {\r\n\t\tif (this._waitMode) this._waitMode--;\r\n\r\n\t\tthis.callEvent(\"onAfterUpdateFinish\", []);\r\n\t\tif (!this.updatedRows.length)\r\n\t\t\tthis.callEvent(\"onFullSync\", []);\r\n\t},\r\n\r\n\t/**\r\n\t *\t@desc: initializes data-processor\r\n\t *\t@param: scheduler - dhtmlxScheduler object to attach this data-processor to\r\n\t *\t@type: public\r\n\t */\r\n\tinit: function (scheduler) {\r\n\t\tif (this._initialized) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.$scheduler = scheduler;\r\n\t\tif (this.$scheduler._dp_init) {\r\n\t\t\tthis.$scheduler._dp_init(this);\r\n\t\t}\r\n\r\n\t\tthis._setDefaultTransactionMode();\r\n\r\n\t\tthis._methods=this._methods||[\"_set_event_text_style\",\"\",\"_dp_change_event_id\",\"_dp_hook_delete\"];\r\n\t\textendScheduler(this.$scheduler, this);\r\n\t\tvar dataProcessorEvents = new DataProcessorEvents(this.$scheduler, this);\r\n\t\tdataProcessorEvents.attach();\r\n\t\tthis.attachEvent(\"onDestroy\", function() {\r\n\t\t\tdelete this._getRowData;\r\n\r\n\t\t\tdelete this.$scheduler._dp;\r\n\t\t\tdelete this.$scheduler._dataprocessor;\r\n\t\t\tdelete this.$scheduler._set_event_text_style;\r\n\t\t\tdelete this.$scheduler._dp_change_event_id;\r\n\t\t\tdelete this.$scheduler._dp_hook_delete;\r\n\t\t\tdelete this.$scheduler;\r\n\t\t\tdataProcessorEvents.detach();\r\n\t\t});\r\n\t\tthis.$scheduler.callEvent(\"onDataProcessorReady\", [this]);\r\n\t\tthis._initialized = true;\r\n\r\n\t\tscheduler._dataprocessor=this;\r\n\t},\r\n\r\n\tsetOnAfterUpdate: function (ev) {\r\n\t\tthis.attachEvent(\"onAfterUpdate\", ev);\r\n\t},\r\n\tsetOnBeforeUpdateHandler: function (func) {\r\n\t\tthis.attachEvent(\"onBeforeDataSending\", func);\r\n\t},\r\n\r\n\t/* starts autoupdate mode\r\n\t\t@param interval time interval for sending update requests\r\n\t*/\r\n\tsetAutoUpdate: function (interval, user) {\r\n\t\tinterval = interval || 2000;\r\n\r\n\t\tthis._user = user || (new Date()).valueOf();\r\n\t\tthis._need_update = false;\r\n\t\t//this._loader = null;\r\n\t\tthis._update_busy = false;\r\n\r\n\t\tthis.attachEvent(\"onAfterUpdate\", function (sid, action, tid, xml_node) {\r\n\t\t\tthis.afterAutoUpdate(sid, action, tid, xml_node);\r\n\t\t});\r\n\t\tthis.attachEvent(\"onFullSync\", function () {\r\n\t\t\tthis.fullSync();\r\n\t\t});\r\n\r\n\t\tvar self = this;\r\n\t\tlet intervalId = global.setInterval(function () {\r\n\t\t\tself.loadUpdate();\r\n\t\t}, interval);\r\n\t\tthis.attachEvent(\"onDestroy\", function(){\r\n\t\t\tclearInterval(intervalId);\r\n\t\t});\r\n\t},\r\n\r\n\t/* process updating request answer\r\n\t\tif status == collision version is deprecated\r\n\t\tset flag for autoupdating immediately\r\n\t*/\r\n\tafterAutoUpdate: function (sid, action, tid, xml_node) {\r\n\t\tif (action == 'collision') {\r\n\t\t\tthis._need_update = true;\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t},\r\n\r\n\t/* callback function for onFillSync event\r\n\t\tcall update function if it's need\r\n\t*/\r\n\tfullSync: function () {\r\n\t\tif (this._need_update) {\r\n\t\t\tthis._need_update = false;\r\n\t\t\tthis.loadUpdate();\r\n\t\t}\r\n\t\treturn true;\r\n\t},\r\n\r\n\t/* sends query to the server and call callback function\r\n\t*/\r\n\tgetUpdates: function (url, callback) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tif (this._update_busy)\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\tthis._update_busy = true;\r\n\r\n\t\tajax.get(url, callback);\r\n\t},\r\n\r\n\t/* returns xml node value\r\n\t\t@param node\r\n\t\t\txml node\r\n\t*/\r\n\t_getXmlNodeValue: function(node) {\r\n\t\tif (node.firstChild) {\r\n\t\t\treturn node.firstChild.nodeValue;\r\n\t\t}\r\n\t\treturn \"\";\r\n\t},\r\n\r\n\t/* loads updates and processes them\r\n\t*/\r\n\tloadUpdate: function () {\r\n\t\tvar self = this;\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tvar version = this.$scheduler.getUserData(0, \"version\");\r\n\t\tvar url = this.serverProcessor + ajax.urlSeparator(this.serverProcessor) + [\"dhx_user=\" + this._user, \"dhx_version=\" + version].join(\"&\");\r\n\t\turl = url.replace(\"editing=true&\", \"\");\r\n\t\tthis.getUpdates(url, function (xml) {\r\n\t\t\tvar vers = ajax.xpath(\"//userdata\", xml);\r\n\t\t\tself.$scheduler.setUserData(0, \"version\", self._getXmlNodeValue(vers[0]));\r\n\r\n\t\t\tvar updates = ajax.xpath(\"//update\", xml);\r\n\t\t\tif (updates.length) {\r\n\t\t\t\tself._silent_mode = true;\r\n\r\n\t\t\t\tfor (var i = 0; i < updates.length; i++) {\r\n\t\t\t\t\tvar status = updates[i].getAttribute(\"status\");\r\n\t\t\t\t\tvar id = updates[i].getAttribute(\"id\");\r\n\t\t\t\t\tvar parent = updates[i].getAttribute(\"parent\");\r\n\t\t\t\t\tswitch (status) {\r\n\t\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"insertCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"updated\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"updateCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"deleteCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tself._silent_mode = false;\r\n\t\t\t}\r\n\t\t\tself._update_busy = false;\r\n\t\t\tself = null;\r\n\t\t});\r\n\t},\r\n\r\n\tdestructor: function() {\r\n\t\tthis.callEvent(\"onDestroy\", []);\r\n\t\tthis.detachAllEvents();\r\n\r\n\t\tthis.updatedRows = [];\r\n\t\tthis._in_progress = {};\r\n\t\tthis._invalid = {};\r\n\t\tthis._headers = null;\r\n\t\tthis._payload = null;\r\n\t\tdelete this._initialized;\r\n\t},\r\n\r\n\turl: function(url) {\r\n\t\tthis.serverProcessor = this._serverProcessor = url;\r\n\t},\r\n\r\n\t_serializeAsJSON: function(data) {\r\n\t\tif (typeof data === \"string\") {\r\n\t\t\treturn data;\r\n\t\t}\r\n\r\n\t\tvar copy = this.$scheduler.utils.copy(data);\r\n\t\tif (this._tMode === \"REST-JSON\") {\r\n\t\t\tdelete copy.id;\r\n\t\t\tdelete copy[this.action_param];\r\n\t\t}\r\n\r\n\t\treturn JSON.stringify(copy);\r\n\t},\r\n\r\n\t// GET/POST/JSON modes of the dataProcessor didn't send the whole data items in 'delete' requests\r\n\t// clear extra info from the data in order not to change the request format\r\n\t_cleanupArgumentsBeforeSend: function(dataToSend) {\r\n\t\tvar processedData;\r\n\t\tif(dataToSend[this.action_param] === undefined){// hash of updated items, and not an individual item\r\n\t\t\tprocessedData = {};\r\n\t\t\tfor(var i in dataToSend) {\r\n\t\t\t\tprocessedData[i] = this._cleanupArgumentsBeforeSend(dataToSend[i]);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tprocessedData = this._cleanupItemBeforeSend(dataToSend);\r\n\t\t}\r\n\t\treturn processedData;\r\n\t},\r\n\t_cleanupItemBeforeSend: function(updatedItem) {\r\n\t\tvar output = null;\r\n\t\tif(updatedItem){\r\n\t\t\tif(updatedItem[this.action_param] === \"deleted\"){\r\n\t\t\t\toutput = {};\r\n\t\t\t\toutput.id = updatedItem.id;\r\n\t\t\t\toutput[this.action_param] = updatedItem[this.action_param];\r\n\t\t\t}else{\r\n\t\t\t\toutput = updatedItem;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn output;\r\n\t},\r\n\r\n\t_forEachUpdatedRow: function(code) {\r\n\t\tvar updatedRows = this.updatedRows.slice();\r\n\t\tfor (var i = 0; i < updatedRows.length; i++) {\r\n\t\t\tvar rowId = updatedRows[i];\r\n\t\t\tif (this.$scheduler.getUserData(rowId, this.action_param)) {\r\n\t\t\t\tcode.call(this, rowId);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\t_prepareItemForJson(item){\r\n\t\tconst processedItem = {};\r\n\t\tconst scheduler = this.$scheduler;\r\n\t\tconst copy = scheduler.utils.copy(item);\r\n\t\tfor (let i in copy) {\r\n\t\t\tlet prop = copy[i];\r\n\t\t\tif (i.indexOf(\"_\") === 0) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} else if (prop){\r\n\t\t\t\tif(prop.getUTCFullYear){\r\n\t\t\t\t\tprocessedItem[i] = scheduler._helpers.formatDate(prop);\r\n\t\t\t\t} else if(typeof prop == \"object\") {\r\n\t\t\t\t\tprocessedItem[i] = this._prepareItemForJson(prop);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprocessedItem[i] = prop; \r\n\t\t\t\t}\r\n\t\t\t} else if (prop !== undefined){\r\n\t\t\t\tprocessedItem[i] = prop; \r\n\t\t\t}\r\n\t\t}\r\n\t\tprocessedItem[this.action_param] = scheduler.getUserData(item.id, this.action_param);\r\n\t\treturn processedItem;\r\n\t},\r\n\t_prepareItemForForm(item){\r\n\t\tconst processedItem = {};\r\n\t\tconst scheduler = this.$scheduler;\r\n\t\tconst copy = scheduler.utils.copy(item);\r\n\t\tfor (var i in copy) {\r\n\t\t\tlet prop = copy[i];\r\n\t\t\tif (i.indexOf(\"_\") === 0) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} else if (prop) {\r\n\t\t\t\tif(prop.getUTCFullYear){\r\n\t\t\t\t\tprocessedItem[i] = scheduler._helpers.formatDate(prop);\r\n\t\t\t\t} else if(typeof prop == \"object\") {\r\n\t\t\t\t\tprocessedItem[i] = this._prepareItemForForm(prop);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprocessedItem[i] = prop;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tprocessedItem[i] = \"\"; // for all falthy values\r\n\t\t\t}\r\n\t\t}\r\n\t\tprocessedItem[this.action_param] = scheduler.getUserData(item.id, this.action_param);\r\n\t\treturn processedItem;\r\n\t},\r\n\t_prepareDataItem: function(item) {\r\n\t\tif(this._serializeAsJson){\r\n\t\t\treturn this._prepareItemForJson(item);\r\n\t\t}else {\r\n\t\t\treturn this._prepareItemForForm(item);\r\n\t\t}\r\n\t},\r\n\t_getRowData: function(id) {\r\n\t\tvar dataItem = this.$scheduler.getEvent(id);\r\n\t\tif (!dataItem) {\r\n\t\t\tdataItem = { id: id };\r\n\t\t}\r\n\t\treturn this._prepareDataItem(dataItem);\r\n\t}\r\n};\r\n\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler.createDataProcessor = function(config) {\r\n\tvar router;\r\n\tvar tMode;\r\n\tif (config instanceof Function) {\r\n\t\trouter = config;\r\n\t} else if (config.hasOwnProperty(\"router\")) {\r\n\t\trouter = config.router;\r\n\t} else if(config.hasOwnProperty(\"event\")){\r\n\t\trouter = config;\r\n\t}\r\n\r\n\tif (router) {\r\n\t\ttMode = \"CUSTOM\";\r\n\t} else {\r\n\t\ttMode = config.mode || \"REST-JSON\";\r\n\t}\r\n\r\n\tvar dp = new DataProcessor(config.url);\r\n\tdp.init(scheduler);\r\n\tdp.setTransactionMode({\r\n\t\tmode: tMode,\r\n\t\trouter: router\r\n\t}, config.batchUpdate); // FIXME: config.batchUpdate where it is explained?\r\n\treturn dp;\r\n};\r\n\r\nscheduler.DataProcessor = DataProcessor;\r\n\r\n}\r\n\r\n//var dataProcessor = global.dataProcessor = DataProcessor; // for old","import utils from \"./utils/utils\";\r\nimport domHelpers from \"./utils/dom_helpers\";\r\n\r\n\r\nexport default function(scheduler) {\r\n\r\n\tvar boxAttribute = \"data-dhxbox\";\r\n\r\n\tvar _dhx_msg_cfg = null;\r\n\r\n\tfunction callback(config, result) {\r\n\t\tvar usercall = config.callback;\r\n\t\tmodalBox.hide(config.box);\r\n\r\n\t\t_dhx_msg_cfg = config.box = null;\r\n\tif (usercall)\r\n\t\t\tusercall(result);\r\n\t}\r\n\r\n\tfunction modal_key(event) {\r\n\t\tif (_dhx_msg_cfg) {\r\n\r\n\t\t\tvar code = event.which || event.keyCode;\r\n\t\t\tvar preventDefault = false;\r\n\r\n\t\t\tif (messageBox.keyboard) {\r\n\t\t\t\tif (code == 13 || code == 32) {\r\n\t\t\t\t\t// default behavior is to confirm/submit popup on space/enter\r\n\t\t\t\t\t// if browser focus is set on button element - do button click instead of default behavior\r\n\t\t\t\t\tvar target = event.target || event.srcElement;\r\n\t\t\t\t\tif (domHelpers.getClassName(target).indexOf(\"scheduler_popup_button\") > -1 && target.click) {\r\n\t\t\t\t\t\ttarget.click();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcallback(_dhx_msg_cfg, true);\r\n\t\t\t\t\t\tpreventDefault = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (code == 27) {\r\n\t\t\t\t\tcallback(_dhx_msg_cfg, false);\r\n\t\t\t\t\tpreventDefault = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (preventDefault) {\r\n\t\t\t\tif (event.preventDefault){\r\n\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t}\r\n\t\t\t\treturn !(event.cancelBubble = true);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.event(document, \"keydown\", modal_key, true);\r\n\r\n\tfunction modality(mode) {\r\n\t\tif (!modality.cover) {\r\n\t\t\tmodality.cover = document.createElement(\"div\");\r\n\t\t\t//necessary for IE only\r\n\t\t\tscheduler.event(modality.cover, \"keydown\", modal_key);\r\n\t\t\tmodality.cover.className = \"dhx_modal_cover\";\r\n\t\t\tdocument.body.appendChild(modality.cover);\r\n\t\t}\r\n\r\n\t\tmodality.cover.style.display = mode ? \"inline-block\" : \"none\";\r\n\t}\r\n\r\n\tfunction button(text, classValue, result) {\r\n\t\tvar buttonAriaAttrs = scheduler._waiAria.messageButtonAttrString(text);\r\n\t\tvar name = (classValue || \"\").toLowerCase().replace(/ /g, \"_\");\r\n\t\tvar buttonCss = `scheduler_${name}_button dhtmlx_${name}_button`; \r\n\t\treturn `
${text}
`;\r\n\t}\r\n\r\n\tfunction info(text) {\r\n\t\tif (!messageBox.area) {\r\n\t\t\tmessageBox.area = document.createElement(\"div\");\r\n\t\t\tmessageBox.area.className = \"scheduler_message_area dhtmlx_message_area\";\r\n\t\t\tmessageBox.area.style[messageBox.position] = \"5px\";\r\n\t\t\tdocument.body.appendChild(messageBox.area);\r\n\t\t}\r\n\r\n\t\tmessageBox.hide(text.id);\r\n\t\tvar message = document.createElement(\"div\");\r\n\t\tmessage.innerHTML = \"
\" + text.text + \"
\";\r\n\t\tmessage.className = \"scheduler-info dhtmlx-info scheduler-\" + text.type + \" dhtmlx-\" + text.type;\r\n\t\tscheduler.event(message, \"click\",function (e) {\r\n if(text.callback) {\r\n text.callback.call(this, e);\r\n }\r\n\t\t\tmessageBox.hide(text.id);\r\n\t\t\ttext = null;\r\n\t\t});\r\n\r\n\t\tscheduler._waiAria.messageInfoAttr(message);\r\n\r\n\t\tif (messageBox.position == \"bottom\" && messageBox.area.firstChild)\r\n\t\t\tmessageBox.area.insertBefore(message, messageBox.area.firstChild);\r\n\t\telse\r\n\t\t\tmessageBox.area.appendChild(message);\r\n\r\n\t\tif (text.expire > 0)\r\n\t\t\tmessageBox.timers[text.id] = window.setTimeout(function () {\r\n\t\t\t\t// GS-1213: We need that when Scheduler is destroyed\r\n\t\t\t\tif (messageBox) messageBox.hide(text.id);\r\n\t\t\t}, text.expire);\r\n\r\n\t\tmessageBox.pull[text.id] = message;\r\n\t\tmessage = null;\r\n\r\n\t\treturn text.id;\r\n\t}\r\n\r\n\tfunction getFirstDefined() {\r\n\t\tvar values = [].slice.apply(arguments, [0]);\r\n\r\n\t\tfor (var i = 0; i < values.length; i++) {\r\n\t\t\tif (values[i]) {\r\n\t\t\t\treturn values[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tfunction _boxStructure(config, ok, cancel) {\r\n\t\tvar box = document.createElement(\"div\");\r\n\r\n\t\tvar contentId = utils.uid();\r\n\t\tscheduler._waiAria.messageModalAttr(box, contentId);\r\n\r\n\r\n\t\tbox.className = \" scheduler_modal_box dhtmlx_modal_box scheduler-\" + config.type + \" dhtmlx-\" + config.type;\r\n\t\tbox.setAttribute(boxAttribute, 1);\r\n\r\n\t\tvar inner = '';\r\n\r\n\t\tif (config.width)\r\n\t\t\tbox.style.width = config.width;\r\n\t\tif (config.height)\r\n\t\t\tbox.style.height = config.height;\r\n\t\tif (config.title)\r\n\t\t\tinner += '
' + config.title + '
';\r\n\t\tinner += '
' + (config.content ? '' : config.text) + '
';\r\n\t\tif (ok)\r\n\t\t\tinner += button(getFirstDefined(config.ok, scheduler.locale.labels.message_ok, \"OK\"), \"ok\", true);\r\n\t\tif (cancel)\r\n\t\t\tinner += button(getFirstDefined(config.cancel, scheduler.locale.labels.message_cancel, \"Cancel\"), \"cancel\", false);\r\n\r\n\t\tif (config.buttons) {\r\n\t\t\tfor (var i = 0; i < config.buttons.length; i++) {\r\n\t\t\t\tvar btn = config.buttons[i];\r\n\t\t\t\tif (typeof btn == \"object\") {\r\n\t\t\t\t\t// Support { label:\"Save\", css:\"main_button\", value:\"save\" }\r\n\t\t\t\t\tvar label = btn.label;\r\n\t\t\t\t\tvar css = btn.css || (\"scheduler_\" + btn.label.toLowerCase() + \"_button dhtmlx_\" + btn.label.toLowerCase() + \"_button\");\r\n\t\t\t\t\tvar value = btn.value || i;\r\n\t\t\t\t\tinner += button(label, css, value);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tinner += button(btn, btn, i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tinner += '
';\r\n\t\tbox.innerHTML = inner;\r\n\r\n\t\tif (config.content) {\r\n\t\t\tvar node = config.content;\r\n\t\t\tif (typeof node == \"string\")\r\n\t\t\t\tnode = document.getElementById(node);\r\n\t\t\tif (node.style.display == 'none')\r\n\t\t\t\tnode.style.display = \"\";\r\n\t\t\tbox.childNodes[config.title ? 1 : 0].appendChild(node);\r\n\t\t}\r\n\r\n\t\tscheduler.event(box, \"click\", function (event) {\r\n\t\t\tvar source = event.target || event.srcElement;\r\n\t\t\tif (!source.className) source = source.parentNode;\r\n\t\t\tif (domHelpers.closest(source, \".scheduler_popup_button\")) {\r\n\t\t\t\tvar result = source.getAttribute(\"data-result\");\r\n\t\t\t\tresult = (result == \"true\") || (result == \"false\" ? false : result);\r\n\t\t\t\tcallback(config, result);\r\n\t\t\t}\r\n\t\t});\r\n\t\tconfig.box = box;\r\n\t\tif (ok || cancel)\r\n\t\t\t_dhx_msg_cfg = config;\r\n\r\n\t\treturn box;\r\n\t}\r\n\r\n\tfunction _createBox(config, ok, cancel) {\r\n\t\tvar box = config.tagName ? config : _boxStructure(config, ok, cancel);\r\n\r\n\t\tif (!config.hidden)\r\n\t\t\tmodality(true);\r\n\t\tdocument.body.appendChild(box);\r\n\t\tvar x = Math.abs(Math.floor(((window.innerWidth || document.documentElement.offsetWidth) - box.offsetWidth) / 2));\r\n\t\tvar y = Math.abs(Math.floor(((window.innerHeight || document.documentElement.offsetHeight) - box.offsetHeight) / 2));\r\n\t\tif (config.position == \"top\")\r\n\t\t\tbox.style.top = \"-3px\";\r\n\t\telse\r\n\t\t\tbox.style.top = y + 'px';\r\n\t\tbox.style.left = x + 'px';\r\n\t\t//necessary for IE only\r\n\t\tscheduler.event(box, \"keydown\", modal_key);\r\n\r\n\t\tmodalBox.focus(box);\r\n\r\n\t\tif (config.hidden)\r\n\t\t\tmodalBox.hide(box);\r\n\r\n\t\tscheduler.callEvent(\"onMessagePopup\", [box]);\r\n\t\treturn box;\r\n\t}\r\n\r\n\tfunction alertPopup(config) {\r\n\t\treturn _createBox(config, true, false);\r\n\t}\r\n\r\n\tfunction confirmPopup(config) {\r\n\t\treturn _createBox(config, true, true);\r\n\t}\r\n\r\n\tfunction boxPopup(config) {\r\n\t\treturn _createBox(config);\r\n\t}\r\n\r\n\tfunction box_params(text, type, callback) {\r\n\t\tif (typeof text != \"object\") {\r\n\t\t\tif (typeof type == \"function\") {\r\n\t\t\t\tcallback = type;\r\n\t\t\t\ttype = \"\";\r\n\t\t\t}\r\n\t\t\ttext = {text: text, type: type, callback: callback};\r\n\t\t}\r\n\t\treturn text;\r\n\t}\r\n\r\n\tfunction params(text, type, expire, id, callback) {\r\n\t\tif (typeof text != \"object\")\r\n\t\t\ttext = {text: text, type: type, expire: expire, id: id, callback: callback};\r\n\t\ttext.id = text.id || utils.uid();\r\n\t\ttext.expire = text.expire || messageBox.expire;\r\n\t\treturn text;\r\n\t}\r\n\r\n\tvar alertBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"confirm\";\r\n\t\treturn alertPopup(text);\r\n\t};\r\n\tvar confirmBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"alert\";\r\n\t\treturn confirmPopup(text);\r\n\t};\r\n\tvar modalBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"alert\";\r\n\t\treturn boxPopup(text);\r\n\t};\r\n\tmodalBox.hide = function (node) {\r\n\t\twhile (node && node.getAttribute && !node.getAttribute(boxAttribute))\r\n\t\t\tnode = node.parentNode;\r\n\t\tif (node) {\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t\tmodality(false);\r\n\r\n\t\t\tscheduler.callEvent(\"onAfterMessagePopup\", [node]);\r\n\t\t}\r\n\t};\r\n\r\n\tmodalBox.focus = function (node) {\r\n\t\tsetTimeout(function () {\r\n\t\t\tvar focusable = domHelpers.getFocusableNodes(node);\r\n\t\t\tif (focusable.length) {\r\n\t\t\t\tif (focusable[0].focus) focusable[0].focus();\r\n\t\t\t}\r\n\t\t}, 1);\r\n\t};\r\n\r\n\tvar messageBox = function (text, type, expire, id) {\r\n\t\ttext = params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"info\";\r\n\r\n\t\tvar subtype = text.type.split(\"-\")[0];\r\n\t\tswitch (subtype) {\r\n\t\t\tcase \"alert\":\r\n\t\t\t\treturn alertPopup(text);\r\n\t\t\tcase \"confirm\":\r\n\t\t\t\treturn confirmPopup(text);\r\n\t\t\tcase \"modalbox\":\r\n\t\t\t\treturn boxPopup(text);\r\n\t\t\tdefault:\r\n\t\t\t\treturn info(text);\r\n\t\t}\r\n\t};\r\n\r\n\tmessageBox.seed = (new Date()).valueOf();\r\n\tmessageBox.uid = utils.uid;\r\n\tmessageBox.expire = 4000;\r\n\tmessageBox.keyboard = true;\r\n\tmessageBox.position = \"top\";\r\n\tmessageBox.pull = {};\r\n\tmessageBox.timers = {};\r\n\r\n\tmessageBox.hideAll = function () {\r\n\t\tfor (var key in messageBox.pull)\r\n\t\t\tmessageBox.hide(key);\r\n\t};\r\n\tmessageBox.hide = function (id) {\r\n\t\tvar obj = messageBox.pull[id];\r\n\t\tif (obj && obj.parentNode) {\r\n\t\t\twindow.setTimeout(function () {\r\n\t\t\t\tobj.parentNode.removeChild(obj);\r\n\t\t\t\tobj = null;\r\n\t\t\t}, 2000);\r\n\t\t\tobj.className += \" hidden\";\r\n\r\n\t\t\tif (messageBox.timers[id])\r\n\t\t\t\twindow.clearTimeout(messageBox.timers[id]);\r\n\t\t\tdelete messageBox.pull[id];\r\n\t\t}\r\n\t};\r\n\r\n\tvar popups = [];\r\n\tscheduler.attachEvent(\"onMessagePopup\", function(box){\r\n\t\tpopups.push(box);\r\n\t});\r\n\tscheduler.attachEvent(\"onAfterMessagePopup\", function(box){\r\n\t\tfor(var i = 0; i < popups.length; i++){\r\n\t\t\tif(popups[i] === box){\r\n\t\t\t\tpopups.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tif(modality.cover && modality.cover.parentNode){\r\n\t\t\tmodality.cover.parentNode.removeChild(modality.cover);\r\n\t\t}\r\n\r\n\t\tfor(var i = 0; i < popups.length; i++){\r\n\t\t\tif(popups[i].parentNode){\r\n\t\t\t\tpopups[i].parentNode.removeChild(popups[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tpopups = null;\r\n\r\n\t\tif(messageBox.area && messageBox.area.parentNode){\r\n\t\t\tmessageBox.area.parentNode.removeChild(messageBox.area);\r\n\t\t}\r\n\t\tmessageBox = null;\r\n\t});\r\n\r\n\treturn {\r\n\t\talert: alertBox,\r\n\t\tconfirm: confirmBox,\r\n\t\tmessage: messageBox,\r\n\t\tmodalbox: modalBox\r\n\t};\r\n}","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"كانون الثاني\", \"شباط\", \"آذار\", \"نيسان\", \"أيار\", \"حزيران\", \"تموز\", \"آب\", \"أيلول\", \"تشرين الأول\", \"تشرين الثاني\", \"كانون الأول\"],\r\n\t\tmonth_short: [\"يناير\", \"فبراير\", \"مارس\", \"أبريل\", \"مايو\", \"يونيو\", \"يوليو\", \"أغسطس\", \"سبتمبر\", \"أكتوبر\", \"نوفمبر\", \"ديسمبر\"],\r\n\t\tday_full: [\"الأحد\", \"الأثنين\", \"ألثلاثاء\", \"الأربعاء\", \"ألحميس\", \"ألجمعة\", \"السبت\"],\r\n\t\tday_short: [\"احد\", \"اثنين\", \"ثلاثاء\", \"اربعاء\", \"خميس\", \"جمعة\", \"سبت\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"اليوم\",\r\n\t\tday_tab: \"يوم\",\r\n\t\tweek_tab: \"أسبوع\",\r\n\t\tmonth_tab: \"شهر\",\r\n\t\tnew_event: \"حدث جديد\",\r\n\t\ticon_save: \"اخزن\",\r\n\t\ticon_cancel: \"الغاء\",\r\n\t\ticon_details: \"تفاصيل\",\r\n\t\ticon_edit: \"تحرير\",\r\n\t\ticon_delete: \"حذف\",\r\n\t\tconfirm_closing: \"التغييرات سوف تضيع, هل انت متأكد؟\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"الحدث سيتم حذفها نهائيا ، هل أنت متأكد؟\",\r\n\t\tsection_description: \"الوصف\",\r\n\t\tsection_time: \"الفترة الزمنية\",\r\n\t\tfull_day: \"طوال اليوم\",\r\n\r\n\t\tconfirm_recurring: \"هل تريد تحرير مجموعة كاملة من الأحداث المتكررة؟\",\r\n\t\tsection_recurring: \"تكرار الحدث\",\r\n\t\tbutton_recurring: \"تعطيل\",\r\n\t\tbutton_recurring_open: \"تمكين\",\r\n\t\tbutton_edit_series: \"تحرير سلسلة\",\r\n\t\tbutton_edit_occurrence: \"تعديل نسخة\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"جدول\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create: \"Drag to create\",\r\n\t\tdrag_to_move: \"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour: \"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"يومي\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"أسبوعي\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"شهري\",\r\n\t\trepeat_radio_year: \"سنوي\",\r\n\t\trepeat_radio_day_type: \"كل\",\r\n\t\trepeat_text_day_count: \"يوم\",\r\n\t\trepeat_radio_day_type2: \"كل يوم عمل\",\r\n\t\trepeat_week: \" تكرار كل\",\r\n\t\trepeat_text_week_count: \"أسبوع في الأيام التالية:\",\r\n\t\trepeat_radio_month_type: \"تكرار\",\r\n\t\trepeat_radio_month_start: \"في\",\r\n\t\trepeat_text_month_day: \"يوم كل\",\r\n\t\trepeat_text_month_count: \"شهر\",\r\n\t\trepeat_text_month_count2_before: \"كل\",\r\n\t\trepeat_text_month_count2_after: \"شهر\",\r\n\t\trepeat_year_label: \"في\",\r\n\t\tselect_year_day2: \"من\",\r\n\t\trepeat_text_year_day: \"يوم\",\r\n\t\tselect_year_month: \"شهر\",\r\n\t\trepeat_radio_end: \"بدون تاريخ انتهاء\",\r\n\t\trepeat_text_occurences_count: \"تكرارات\",\r\n\t\trepeat_radio_end2: \"بعد\",\r\n\t\trepeat_radio_end3: \"ينتهي في\",\r\n\r\n\t\trepeat_never: \"أبداً\",\r\n\t\trepeat_daily: \"كل يوم\",\r\n\t\trepeat_workdays: \"كل يوم عمل\",\r\n\t\trepeat_weekly: \"كل أسبوع\",\r\n\t\trepeat_monthly: \"كل شهر\",\r\n\t\trepeat_yearly: \"كل سنة\",\r\n\t\trepeat_custom: \"تخصيص\",\r\n\t\trepeat_freq_day: \"يوم\",\r\n\t\trepeat_freq_week: \"أسبوع\",\r\n\t\trepeat_freq_month: \"شهر\",\r\n\t\trepeat_freq_year: \"سنة\",\r\n\t\trepeat_on_date: \"في التاريخ\",\r\n\t\trepeat_ends: \"ينتهي\",\r\n\r\n\t\tmonth_for_recurring: [\"يناير\", \"فبراير\", \"مارس\", \"أبريل\", \"مايو\", \"يونيو\", \"يوليو\", \"أغسطس\", \"سبتمبر\", \"أكتوبر\", \"نوفمبر\", \"ديسمبر\"],\r\n\t\tday_for_recurring: [\"الأحد\", \"الإثنين\", \"الثلاثاء\", \"الأربعاء\", \"الخميس\", \"الجمعة\", \"السبت\"]\r\n\t}\r\n};\r\n\r\n\r\n","/*\r\n Translation by Sofya Morozova\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Студзень\", \"Люты\", \"Сакавік\", \"Красавік\", \"Maй\", \"Чэрвень\", \"Ліпень\", \"Жнівень\", \"Верасень\", \"Кастрычнік\", \"Лістапад\", \"Снежань\"],\r\n\t\tmonth_short: [\"Студз\", \"Лют\", \"Сак\", \"Крас\", \"Maй\", \"Чэр\", \"Ліп\", \"Жнів\", \"Вер\", \"Каст\", \"Ліст\", \"Снеж\"],\r\n\t\tday_full: [ \"Нядзеля\", \"Панядзелак\", \"Аўторак\", \"Серада\", \"Чацвер\", \"Пятніца\", \"Субота\"],\r\n\t\tday_short: [\"Нд\", \"Пн\", \"Аўт\", \"Ср\", \"Чцв\", \"Пт\", \"Сб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сёння\",\r\n\t\tday_tab: \"Дзень\",\r\n\t\tweek_tab: \"Тыдзень\",\r\n\t\tmonth_tab: \"Месяц\",\r\n\t\tnew_event: \"Новая падзея\",\r\n\t\ticon_save: \"Захаваць\",\r\n\t\ticon_cancel: \"Адмяніць\",\r\n\t\ticon_details: \"Дэталі\",\r\n\t\ticon_edit: \"Змяніць\",\r\n\t\ticon_delete: \"Выдаліць\",\r\n\t\tconfirm_closing: \"\", //Унесеныя змены будуць страчаны, працягнуць?\r\n\t\tconfirm_deleting: \"Падзея будзе выдалена незваротна, працягнуць?\",\r\n\t\tsection_description: \"Апісанне\",\r\n\t\tsection_time: \"Перыяд часу\",\r\n\t\tfull_day: \"Увесь дзень\",\r\n\r\n\t\tconfirm_recurring: \"Вы хочаце змяніць усю серыю паўтаральных падзей?\",\r\n\t\tsection_recurring: \"Паўтарэнне\",\r\n\t\tbutton_recurring: \"Адключана\",\r\n\t\tbutton_recurring_open: \"Уключана\",\r\n\t\tbutton_edit_series: \"Рэдагаваць серыю\",\r\n\t\tbutton_edit_occurrence: \"Рэдагаваць асобнік\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Спіс\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Апісанне\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Год\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Спіс\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Спic\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Дзень\",\r\n\t\trepeat_radio_week: \"Тыдзень\",\r\n\t\trepeat_radio_month: \"Месяц\",\r\n\t\trepeat_radio_year: \"Год\",\r\n\t\trepeat_radio_day_type: \"Кожны\",\r\n\t\trepeat_text_day_count: \"дзень\",\r\n\t\trepeat_radio_day_type2: \"Кожны працоўны дзень\",\r\n\t\trepeat_week: \" Паўтараць кожны\",\r\n\t\trepeat_text_week_count: \"тыдзень\",\r\n\t\trepeat_radio_month_type: \"Паўтараць\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" чысла кожнага\",\r\n\t\trepeat_text_month_count: \"месяцу\",\r\n\t\trepeat_text_month_count2_before: \"кожны \",\r\n\t\trepeat_text_month_count2_after: \"месяц\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"дзень\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без даты заканчэння\",\r\n\t\trepeat_text_occurences_count: \"паўтораў\",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\trepeat_radio_end3: \"Да \",\r\n\r\n\t\trepeat_never: \"Ніколі\",\r\n\t\trepeat_daily: \"Кожны дзень\",\r\n\t\trepeat_workdays: \"Кожны працоўны дзень\",\r\n\t\trepeat_weekly: \"Кожны тыдзень\",\r\n\t\trepeat_monthly: \"Кожны месяц\",\r\n\t\trepeat_yearly: \"Кожны год\",\r\n\t\trepeat_custom: \"Наладжвальны\",\r\n\t\trepeat_freq_day: \"Дзень\",\r\n\t\trepeat_freq_week: \"Тыдзень\",\r\n\t\trepeat_freq_month: \"Месяц\",\r\n\t\trepeat_freq_year: \"Год\",\r\n\t\trepeat_on_date: \"На дату\",\r\n\t\trepeat_ends: \"Заканчваецца\",\r\n\r\n\t\tmonth_for_recurring: [\"Студзеня\", \"Лютага\", \"Сакавіка\", \"Красавіка\", \"Мая\", \"Чэрвеня\", \"Ліпeня\", \"Жніўня\", \"Верасня\", \"Кастрычніка\", \"Лістапада\", \"Снежня\"],\r\n\t\tday_for_recurring: [\"Нядзелю\", \"Панядзелак\", \"Аўторак\", \"Сераду\", \"Чацвер\", \"Пятніцу\", \"Суботу\"]\r\n\t}\r\n};\r\n","/*\r\n @Traducido por Vicente Adria Bohigues - vicenteadria@hotmail.com\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Gener\", \"Febrer\", \"Març\", \"Abril\", \"Maig\", \"Juny\", \"Juliol\", \"Agost\", \"Setembre\", \"Octubre\", \"Novembre\", \"Desembre\"],\r\n\t\tmonth_short: [\"Gen\", \"Feb\", \"Mar\", \"Abr\", \"Mai\", \"Jun\", \"Jul\", \"Ago\", \"Set\", \"Oct\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Diumenge\", \"Dilluns\", \"Dimarts\", \"Dimecres\", \"Dijous\", \"Divendres\", \"Dissabte\"],\r\n\t\tday_short: [\"Dg\", \"Dl\", \"Dm\", \"Dc\", \"Dj\", \"Dv\", \"Ds\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hui\",\r\n\t\tday_tab: \"Dia\",\r\n\t\tweek_tab: \"Setmana\",\r\n\t\tmonth_tab: \"Mes\",\r\n\t\tnew_event: \"Nou esdeveniment\",\r\n\t\ticon_save: \"Guardar\",\r\n\t\ticon_cancel: \"Cancel·lar\",\r\n\t\ticon_details: \"Detalls\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Esborrar\",\r\n\t\tconfirm_closing: \"\", //\"Els seus canvis es perdràn, continuar ?\"\r\n\t\tconfirm_deleting: \"L'esdeveniment s'esborrarà definitivament, continuar ?\",\r\n\t\tsection_description: \"Descripció\",\r\n\t\tsection_time: \"Periode de temps\",\r\n\t\tfull_day: \"Tot el dia\",\r\n\r\n\t\tconfirm_recurring: \"¿Desitja modificar el conjunt d'esdeveniments repetits?\",\r\n\t\tsection_recurring: \"Repeteixca l'esdeveniment\",\r\n\t\tbutton_recurring: \"Impedit\",\r\n\t\tbutton_recurring_open: \"Permés\",\r\n\t\tbutton_edit_series: \"Edit sèrie\",\r\n\t\tbutton_edit_occurrence: \"Edita Instància\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descripció\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Any\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Taula\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create: \"Drag to create\",\r\n\t\tdrag_to_move: \"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour: \"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diari\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Setmanal\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Mensual\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia\",\r\n\t\trepeat_radio_day_type2: \"Cada dia laborable\",\r\n\t\trepeat_week: \" Repetir cada\",\r\n\t\trepeat_text_week_count: \"setmana els dies següents:\",\r\n\t\trepeat_radio_month_type: \"Repetir\",\r\n\t\trepeat_radio_month_start: \"El\",\r\n\t\trepeat_text_month_day: \"dia cada\",\r\n\t\trepeat_text_month_count: \"mes\",\r\n\t\trepeat_text_month_count2_before: \"cada\",\r\n\t\trepeat_text_month_count2_after: \"mes\",\r\n\t\trepeat_year_label: \"El\",\r\n\t\tselect_year_day2: \"de\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mes\",\r\n\t\trepeat_radio_end: \"Sense data de finalització\",\r\n\t\trepeat_text_occurences_count: \"ocurrències\",\r\n\t\trepeat_radio_end2: \"Després\",\r\n\t\trepeat_radio_end3: \"Finalitzar el\",\r\n\r\n\t\trepeat_never: \"Mai\",\r\n\t\trepeat_daily: \"Cada dia\",\r\n\t\trepeat_workdays: \"Cada dia laborable\",\r\n\t\trepeat_weekly: \"Cada setmana\",\r\n\t\trepeat_monthly: \"Cada mes\",\r\n\t\trepeat_yearly: \"Cada any\",\r\n\t\trepeat_custom: \"Personalitzat\",\r\n\t\trepeat_freq_day: \"Dia\",\r\n\t\trepeat_freq_week: \"Setmana\",\r\n\t\trepeat_freq_month: \"Mes\",\r\n\t\trepeat_freq_year: \"Any\",\r\n\t\trepeat_on_date: \"En la data\",\r\n\t\trepeat_ends: \"Finalitza\",\r\n\r\n\t\tmonth_for_recurring: [\"Gener\", \"Febrer\", \"Març\", \"Abril\", \"Maig\", \"Juny\", \"Juliol\", \"Agost\", \"Setembre\", \"Octubre\", \"Novembre\", \"Desembre\"],\r\n\t\tday_for_recurring: [\"Diumenge\", \"Dilluns\", \"Dimarts\", \"Dimecres\", \"Dijous\", \"Divendres\", \"Dissabte\"]\r\n\t}\r\n};","/*\r\nTranslation by FreezeSoul\r\n*/\r\n//scheduler.config.day_date=\"%M %d日 %D\";\r\n//scheduler.config.default_date=\"%Y年 %M %d日\";\r\n//scheduler.config.month_date=\"%Y年 %M\";\r\n\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"一月\", \"二月\", \"三月\", \"四月\", \"五月\", \"六月\", \"七月\", \"八月\", \"九月\", \"十月\", \"十一月\", \"十二月\"],\r\n\t\tmonth_short: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_full: [\"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\"],\r\n\t\tday_short: [\"日\", \"一\", \"二\", \"三\", \"四\", \"五\", \"六\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"今天\",\r\n\t\tday_tab: \"日\",\r\n\t\tweek_tab: \"周\",\r\n\t\tmonth_tab: \"月\",\r\n\t\tnew_event: \"新建日程\",\r\n\t\ticon_save: \"保存\",\r\n\t\ticon_cancel: \"关闭\",\r\n\t\ticon_details: \"详细\",\r\n\t\ticon_edit: \"编辑\",\r\n\t\ticon_delete: \"删除\",\r\n\t\tconfirm_closing: \"请确认是否撤销修改!\", //Your changes will be lost, are your sure?\r\n\t\tconfirm_deleting: \"是否删除日程?\",\r\n\t\tsection_description: \"描述\",\r\n\t\tsection_time: \"时间范围\",\r\n\t\tfull_day: \"整天\",\r\n\r\n\t\tconfirm_recurring:\"请确认是否将日程设为重复模式?\",\r\n\t\tsection_recurring:\"重复周期\",\r\n\t\tbutton_recurring:\"禁用\",\r\n\t\tbutton_recurring_open:\"启用\",\r\n\t\tbutton_edit_series: \"编辑系列\",\r\n\t\tbutton_edit_occurrence: \"编辑实例\",\r\n\t\t\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"议程\",\r\n\t\tdate:\"日期\",\r\n\t\tdescription:\"说明\",\r\n\t\t\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"今年\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"议程\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab:\"电网\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"按天\",\r\n\t\trepeat_radio_week: \"按周\",\r\n\t\trepeat_radio_month: \"按月\",\r\n\t\trepeat_radio_year: \"按年\",\r\n\t\trepeat_radio_day_type: \"每\",\r\n\t\trepeat_text_day_count: \"天\",\r\n\t\trepeat_radio_day_type2: \"每个工作日\",\r\n\t\trepeat_week: \" 重复 每\",\r\n\t\trepeat_text_week_count: \"星期的:\",\r\n\t\trepeat_radio_month_type: \"重复\",\r\n\t\trepeat_radio_month_start: \"在\",\r\n\t\trepeat_text_month_day: \"日 每\",\r\n\t\trepeat_text_month_count: \"月\",\r\n\t\trepeat_text_month_count2_before: \"每\",\r\n\t\trepeat_text_month_count2_after: \"月\",\r\n\t\trepeat_year_label: \"在\",\r\n\t\tselect_year_day2: \"的\",\r\n\t\trepeat_text_year_day: \"日\",\r\n\t\tselect_year_month: \"月\",\r\n\t\trepeat_radio_end: \"无结束日期\",\r\n\t\trepeat_text_occurences_count: \"次结束\",\r\n\t\trepeat_radio_end2: \"重复\",\r\n\t\trepeat_radio_end3: \"结束于\",\r\n\t\t\r\n\t\trepeat_never: \"从不\",\r\n\t\trepeat_daily: \"每天\",\r\n\t\trepeat_workdays: \"每个工作日\",\r\n\t\trepeat_weekly: \"每周\",\r\n\t\trepeat_monthly: \"每月\",\r\n\t\trepeat_yearly: \"每年\",\r\n\t\trepeat_custom: \"自定义\",\r\n\t\trepeat_freq_day: \"天\",\r\n\t\trepeat_freq_week: \"周\",\r\n\t\trepeat_freq_month: \"月\",\r\n\t\trepeat_freq_year: \"年\",\r\n\t\trepeat_on_date: \"在日期\",\r\n\t\trepeat_ends: \"结束\",\r\n\r\n\t\tmonth_for_recurring: [\"一月\", \"二月\", \"三月\", \"四月\", \"五月\", \"六月\", \"七月\", \"八月\", \"九月\", \"十月\", \"十一月\", \"十二月\"],\r\n\t\tday_for_recurring: [\"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Leden\", \"Únor\", \"Březen\", \"Duben\", \"Květen\", \"Červen\", \"Červenec\", \"Srpen\", \"Září\", \"Říjen\", \"Listopad\", \"Prosinec\"],\r\n\t\tmonth_short: [\"Led\", \"Ún\", \"Bře\", \"Dub\", \"Kvě\", \"Čer\", \"Čec\", \"Srp\", \"Září\", \"Říj\", \"List\", \"Pro\"],\r\n\t\tday_full: [\"Neděle\", \"Pondělí\", \"Úterý\", \"Středa\", \"Čtvrtek\", \"Pátek\", \"Sobota\"],\r\n\t\tday_short: [\"Ne\", \"Po\", \"Út\", \"St\", \"Čt\", \"Pá\", \"So\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dnes\",\r\n\t\tday_tab: \"Den\",\r\n\t\tweek_tab: \"Týden\",\r\n\t\tmonth_tab: \"Měsíc\",\r\n\t\tnew_event: \"Nová událost\",\r\n\t\ticon_save: \"Uložit\",\r\n\t\ticon_cancel: \"Zpět\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edituj\",\r\n\t\ticon_delete: \"Smazat\",\r\n\t\tconfirm_closing: \"\", //Vaše změny budou ztraceny, opravdu ?\r\n\t\tconfirm_deleting: \"Událost bude trvale smazána, opravdu?\",\r\n\t\tsection_description: \"Poznámky\",\r\n\t\tsection_time: \"Doba platnosti\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Přejete si upravit celou řadu opakovaných událostí?\",\r\n\t\tsection_recurring: \"Opakování události\",\r\n\t\tbutton_recurring: \"Vypnuto\",\r\n\t\tbutton_recurring_open: \"Zapnuto\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Upravit instance\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Program\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Poznámka\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\t\tfull_day: \"Full day\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Program\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Mřížka\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Denně\",\r\n\t\trepeat_radio_week: \"Týdně\",\r\n\t\trepeat_radio_month: \"Měsíčně\",\r\n\t\trepeat_radio_year: \"Ročně\",\r\n\t\trepeat_radio_day_type: \"každý\",\r\n\t\trepeat_text_day_count: \"Den\",\r\n\t\trepeat_radio_day_type2: \"pracovní dny\",\r\n\t\trepeat_week: \"Opakuje každých\",\r\n\t\trepeat_text_week_count: \"Týdnů na:\",\r\n\t\trepeat_radio_month_type: \"u každého\",\r\n\t\trepeat_radio_month_start: \"na\",\r\n\t\trepeat_text_month_day: \"Den každého\",\r\n\t\trepeat_text_month_count: \"Měsíc\",\r\n\t\trepeat_text_month_count2_before: \"každý\",\r\n\t\trepeat_text_month_count2_after: \"Měsíc\",\r\n\t\trepeat_year_label: \"na\",\r\n\t\tselect_year_day2: \"v\",\r\n\t\trepeat_text_year_day: \"Den v\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"bez data ukončení\",\r\n\t\trepeat_text_occurences_count: \"Události\",\r\n\t\trepeat_radio_end2: \"po\",\r\n\t\trepeat_radio_end3: \"Konec\",\r\n\r\n\t\trepeat_never: \"Nikdy\",\r\n\t\trepeat_daily: \"Každý den\",\r\n\t\trepeat_workdays: \"Každý pracovní den\",\r\n\t\trepeat_weekly: \"Každý týden\",\r\n\t\trepeat_monthly: \"Každý měsíc\",\r\n\t\trepeat_yearly: \"Každý rok\",\r\n\t\trepeat_custom: \"Vlastní\",\r\n\t\trepeat_freq_day: \"Den\",\r\n\t\trepeat_freq_week: \"Týden\",\r\n\t\trepeat_freq_month: \"Měsíc\",\r\n\t\trepeat_freq_year: \"Rok\",\r\n\t\trepeat_on_date: \"Na datum\",\r\n\t\trepeat_ends: \"Končí\",\r\n\r\n\t\tmonth_for_recurring: [\"Leden\", \"Únor\", \"Březen\", \"Duben\", \"Květen\", \"Červen\", \"Červenec\", \"Srpen\", \"Září\", \"Říjen\", \"Listopad\", \"Prosinec\"],\r\n\t\tday_for_recurring: [\"Neděle \", \"Pondělí\", \"Úterý\", \"Středa\", \"Čtvrtek\", \"Pátek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Marts\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Man\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uge\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny begivenhed\",\r\n\t\ticon_save: \"Gem\",\r\n\t\ticon_cancel: \"Fortryd\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Tilret\",\r\n\t\ticon_delete: \"Slet\",\r\n\t\tconfirm_closing: \"Dine rettelser vil gå tabt.. Er dy sikker?\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Bigivenheden vil blive slettet permanent. Er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du tilrette hele serien af gentagne begivenheder?\",\r\n\t\tsection_recurring: \"Gentag begivenhed\",\r\n\t\tbutton_recurring: \"Frakoblet\",\r\n\t\tbutton_recurring_open: \"Tilkoblet\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Rediger en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dagsorden\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dagsorden\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\",\r\n\t\trepeat_radio_week: \"Ugenlig\",\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"På hver arbejdsdag\",\r\n\t\trepeat_week: \" Gentager sig hver\",\r\n\t\trepeat_text_week_count: \"uge på følgende dage:\",\r\n\t\trepeat_radio_month_type: \"Hver den\",\r\n\t\trepeat_radio_month_start: \"Den\",\r\n\t\trepeat_text_month_day: \" i hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"Den\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Ingen slutdato\",\r\n\t\trepeat_text_occurences_count: \"gentagelse\",\r\n\t\trepeat_radio_end2: \"Efter\",\r\n\t\trepeat_radio_end3: \"Slut\",\r\n\r\n\t\trepeat_never: \"Aldrig\",\r\n\t\trepeat_daily: \"Hver dag\",\r\n\t\trepeat_workdays: \"Hver hverdag\",\r\n\t\trepeat_weekly: \"Hver uge\",\r\n\t\trepeat_monthly: \"Hver måned\",\r\n\t\trepeat_yearly: \"Hvert år\",\r\n\t\trepeat_custom: \"Brugerdefineret\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Uge\",\r\n\t\trepeat_freq_month: \"Måned\",\r\n\t\trepeat_freq_year: \"År\",\r\n\t\trepeat_on_date: \"På dato\",\r\n\t\trepeat_ends: \"Slutter\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"März\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Dezember\"],\r\n\t\tday_for_recurring: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\" Januar\", \" Februar\", \" März \", \" April\", \" Mai\", \" Juni\", \" Juli\", \" August\", \" September \", \" Oktober\", \" November \", \" Dezember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mär\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dez\"],\r\n\t\tday_full: [ \"Sonntag\", \"Montag\", \"Dienstag\", \" Mittwoch\", \" Donnerstag\", \"Freitag\", \"Samstag\"],\r\n\t\tday_short: [\"So\", \"Mo\", \"Di\", \"Mi\", \"Do\", \"Fr\", \"Sa\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Heute\",\r\n\t\tday_tab: \"Tag\",\r\n\t\tweek_tab: \"Woche\",\r\n\t\tmonth_tab: \"Monat\",\r\n\t\tnew_event: \"neuer Eintrag\",\r\n\t\ticon_save: \"Speichern\",\r\n\t\ticon_cancel: \"Abbrechen\",\r\n\t\ticon_details: \"Details\",\r\n\t\ticon_edit: \"Ändern\",\r\n\t\ticon_delete: \"Löschen\",\r\n\t\tconfirm_closing: \"\", //\"Ihre Veränderungen werden verloren sein, wollen Sie ergänzen? \"\r\n\t\tconfirm_deleting: \"Der Eintrag wird gelöscht\",\r\n\t\tsection_description: \"Beschreibung\",\r\n\t\tsection_time: \"Zeitspanne\",\r\n\t\tfull_day: \"Ganzer Tag\",\r\n\r\n\t\tconfirm_recurring: \"Wollen Sie alle Einträge bearbeiten oder nur diesen einzelnen Eintrag?\",\r\n\t\tsection_recurring: \"Wiederholung\",\r\n\t\tbutton_recurring: \"Aus\",\r\n\t\tbutton_recurring_open: \"An\",\r\n\t\tbutton_edit_series: \"Bearbeiten Sie die Serie\",\r\n\t\tbutton_edit_occurrence: \"Bearbeiten Sie eine Kopie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Beschreibung\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Jahre\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Täglich\",\r\n\t\trepeat_radio_week: \"Wöchentlich\",\r\n\t\trepeat_radio_month: \"Monatlich\",\r\n\t\trepeat_radio_year: \"Jährlich\",\r\n\t\trepeat_radio_day_type: \"jeden\",\r\n\t\trepeat_text_day_count: \"Tag\",\r\n\t\trepeat_radio_day_type2: \"an jedem Arbeitstag\",\r\n\t\trepeat_week: \" Wiederholt sich jede\",\r\n\t\trepeat_text_week_count: \"Woche am:\",\r\n\t\trepeat_radio_month_type: \"an jedem\",\r\n\t\trepeat_radio_month_start: \"am\",\r\n\t\trepeat_text_month_day: \"Tag eines jeden\",\r\n\t\trepeat_text_month_count: \"Monats\",\r\n\t\trepeat_text_month_count2_before: \"jeden\",\r\n\t\trepeat_text_month_count2_after: \"Monats\",\r\n\t\trepeat_year_label: \"am\",\r\n\t\tselect_year_day2: \"im\",\r\n\t\trepeat_text_year_day: \"Tag im\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"kein Enddatum\",\r\n\t\trepeat_text_occurences_count: \"Ereignissen\",\r\n\t\trepeat_radio_end3: \"Schluß\",\r\n\t\trepeat_radio_end2: \"nach\",\r\n\r\n\t\trepeat_never: \"Nie\",\r\n\t\trepeat_daily: \"Jeden Tag\",\r\n\t\trepeat_workdays: \"Jeden Werktag\",\r\n\t\trepeat_weekly: \"Jede Woche\",\r\n\t\trepeat_monthly: \"Jeden Monat\",\r\n\t\trepeat_yearly: \"Jedes Jahr\",\r\n\t\trepeat_custom: \"Benutzerdefiniert\",\r\n\t\trepeat_freq_day: \"Tag\",\r\n\t\trepeat_freq_week: \"Woche\",\r\n\t\trepeat_freq_month: \"Monat\",\r\n\t\trepeat_freq_year: \"Jahr\",\r\n\t\trepeat_on_date: \"Am Datum\",\r\n\t\trepeat_ends: \"Endet\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"März\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Dezember\"],\r\n\t\tday_for_recurring: [\"Sonntag\", \"Montag\", \"Dienstag\", \"Mittwoch\", \"Donnerstag\", \"Freitag\", \"Samstag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Ιανουάριος\", \"Φεβρουάριος\", \"Μάρτιος\", \"Απρίλιος\", \"Μάϊος\", \"Ιούνιος\", \"Ιούλιος\", \"Αύγουστος\", \"Σεπτέμβριος\", \"Οκτώβριος\", \"Νοέμβριος\", \"Δεκέμβριος\"],\r\n\t\tmonth_short: [\"ΙΑΝ\", \"ΦΕΒ\", \"ΜΑΡ\", \"ΑΠΡ\", \"ΜΑΙ\", \"ΙΟΥΝ\", \"ΙΟΥΛ\", \"ΑΥΓ\", \"ΣΕΠ\", \"ΟΚΤ\", \"ΝΟΕ\", \"ΔΕΚ\"],\r\n\t\tday_full: [\"Κυριακή\", \"Δευτέρα\", \"Τρίτη\", \"Τετάρτη\", \"Πέμπτη\", \"Παρασκευή\", \"Σάββατο\"],\r\n\t\tday_short: [\"ΚΥ\", \"ΔΕ\", \"ΤΡ\", \"ΤΕ\", \"ΠΕ\", \"ΠΑ\", \"ΣΑ\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Σήμερα\",\r\n\t\tday_tab: \"Ημέρα\",\r\n\t\tweek_tab: \"Εβδομάδα\",\r\n\t\tmonth_tab: \"Μήνας\",\r\n\t\tnew_event: \"Νέο έργο\",\r\n\t\ticon_save: \"Αποθήκευση\",\r\n\t\ticon_cancel: \"Άκυρο\",\r\n\t\ticon_details: \"Λεπτομέρειες\",\r\n\t\ticon_edit: \"Επεξεργασία\",\r\n\t\ticon_delete: \"Διαγραφή\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Το έργο θα διαγραφεί οριστικά. Θέλετε να συνεχίσετε;\",\r\n\t\tsection_description: \"Περιγραφή\",\r\n\t\tsection_time: \"Χρονική περίοδος\",\r\n\t\tfull_day: \"Πλήρης Ημέρα\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Θέλετε να επεξεργασθείτε ολόκληρη την ομάδα των επαναλαμβανόμενων έργων;\",\r\n\t\tsection_recurring: \"Επαναλαμβανόμενο έργο\",\r\n\t\tbutton_recurring: \"Ανενεργό\",\r\n\t\tbutton_recurring_open: \"Ενεργό\",\r\n\t\tbutton_edit_series: \"Επεξεργαστείτε τη σειρά\",\r\n\t\tbutton_edit_occurrence: \"Επεξεργασία ένα αντίγραφο\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Ημερήσια Διάταξη\",\r\n\t\tdate: \"Ημερομηνία\",\r\n\t\tdescription: \"Περιγραφή\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Έτος\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Ημερήσια Διάταξη\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Πλέγμα\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Ημερησίως\",\r\n\t\trepeat_radio_week: \"Εβδομαδιαίως\",\r\n\t\trepeat_radio_month: \"Μηνιαίως\",\r\n\t\trepeat_radio_year: \"Ετησίως\",\r\n\t\trepeat_radio_day_type: \"Κάθε\",\r\n\t\trepeat_text_day_count: \"ημέρα\",\r\n\t\trepeat_radio_day_type2: \"Κάθε εργάσιμη\",\r\n\t\trepeat_week: \" Επανάληψη κάθε\",\r\n\t\trepeat_text_week_count: \"εβδομάδα τις επόμενες ημέρες:\",\r\n\t\trepeat_radio_month_type: \"Επανάληψη\",\r\n\t\trepeat_radio_month_start: \"Την\",\r\n\t\trepeat_text_month_day: \"ημέρα κάθε\",\r\n\t\trepeat_text_month_count: \"μήνα\",\r\n\t\trepeat_text_month_count2_before: \"κάθε\",\r\n\t\trepeat_text_month_count2_after: \"μήνα\",\r\n\t\trepeat_year_label: \"Την\",\r\n\t\tselect_year_day2: \"του\",\r\n\t\trepeat_text_year_day: \"ημέρα\",\r\n\t\tselect_year_month: \"μήνα\",\r\n\t\trepeat_radio_end: \"Χωρίς ημερομηνία λήξεως\",\r\n\t\trepeat_text_occurences_count: \"επαναλήψεις\",\r\n\t\trepeat_radio_end3: \"Λήγει την\",\r\n\t\trepeat_radio_end2: \"Μετά από\",\r\n\r\n\t\trepeat_never: \"Ποτέ\",\r\n\t\trepeat_daily: \"Κάθε μέρα\",\r\n\t\trepeat_workdays: \"Κάθε εργάσιμη μέρα\",\r\n\t\trepeat_weekly: \"Κάθε εβδομάδα\",\r\n\t\trepeat_monthly: \"Κάθε μήνα\",\r\n\t\trepeat_yearly: \"Κάθε χρόνο\",\r\n\t\trepeat_custom: \"Προσαρμοσμένο\",\r\n\t\trepeat_freq_day: \"Ημέρα\",\r\n\t\trepeat_freq_week: \"Εβδομάδα\",\r\n\t\trepeat_freq_month: \"Μήνας\",\r\n\t\trepeat_freq_year: \"Χρόνος\",\r\n\t\trepeat_on_date: \"Σε ημερομηνία\",\r\n\t\trepeat_ends: \"Λήγει\",\r\n\r\n\t\tmonth_for_recurring: [\"Ιανουάριος\", \"Φεβρουάριος\", \"Μάρτιος\", \"Απρίλιος\", \"Μάϊος\", \"Ιούνιος\", \"Ιούλιος\", \"Αύγουστος\", \"Σεπτέμβριος\", \"Οκτώβριος\", \"Νοέμβριος\", \"Δεκέμβριος\"],\r\n\t\tday_for_recurring: [\"Κυριακή\", \"Δευτέρα\", \"Τρίτη\", \"Τετάρτη\", \"Πέμπτη\", \"Παρασκευή\", \"Σάββατο\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate:{\r\n\t\tmonth_full:[\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\r\n\t\tmonth_short:[\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n\t\tday_full:[\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\r\n\t\tday_short:[\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"]\r\n\t},\r\n\tlabels:{\r\n\t\tdhx_cal_today_button:\"Today\",\r\n\t\tday_tab:\"Day\",\r\n\t\tweek_tab:\"Week\",\r\n\t\tmonth_tab:\"Month\",\r\n\t\tnew_event:\"New event\",\r\n\t\ticon_save:\"Save\",\r\n\t\ticon_cancel:\"Cancel\",\r\n\t\ticon_details:\"Details\",\r\n\t\ticon_edit:\"Edit\",\r\n\t\ticon_delete:\"Delete\",\r\n\t\tconfirm_closing:\"\",//Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting:\"Event will be deleted permanently, are you sure?\",\r\n\t\tsection_description:\"Description\",\r\n\t\tsection_time:\"Time period\",\r\n\t\tfull_day:\"Full day\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring:\"Do you want to edit the whole set of repeated events?\",\r\n\t\tsection_recurring:\"Repeat event\",\r\n\t\tbutton_recurring:\"Disabled\",\r\n\t\tbutton_recurring_open:\"Enabled\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Edit occurrence\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"Agenda\",\r\n\t\tdate:\"Date\",\r\n\t\tdescription:\"Description\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"Year\",\r\n\r\n\t\t/* week agenda extension */\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daily\",//name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Weekly\",//name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Monthly\",\r\n\t\trepeat_radio_year: \"Yearly\",\r\n\t\trepeat_radio_day_type: \"Every\",\r\n\t\trepeat_text_day_count: \"day\",\r\n\t\trepeat_radio_day_type2: \"Every workday\",\r\n\t\trepeat_week: \" Repeat every\",\r\n\t\trepeat_text_week_count: \"week next days:\",\r\n\t\trepeat_radio_month_type: \"Repeat\",\r\n\t\trepeat_radio_month_start: \"On\",\r\n\t\trepeat_text_month_day: \"day every\",\r\n\t\trepeat_text_month_count: \"month\",\r\n\t\trepeat_text_month_count2_before: \"every\",\r\n\t\trepeat_text_month_count2_after: \"month\",\r\n\t\trepeat_year_label: \"On\",\r\n\t\tselect_year_day2: \"of\",\r\n\t\trepeat_text_year_day: \"day\",\r\n\t\tselect_year_month: \"month\",\r\n\t\trepeat_radio_end: \"No end date\",\r\n\t\trepeat_text_occurences_count: \"occurrences\",\r\n\t\trepeat_radio_end2: \"After\",\r\n\t\trepeat_radio_end3: \"End by\",\r\n\r\n\t\trepeat_never: \"Never\",\r\n\t\trepeat_daily: \"Every day\",\r\n\t\trepeat_workdays: \"Every weekday\",\r\n\t\trepeat_weekly: \"Every week\",\r\n\t\trepeat_monthly: \"Every month\",\r\n\t\trepeat_yearly: \"Every year\",\r\n\t\trepeat_custom: \"Custom\",\r\n\t\trepeat_freq_day: \"Day\",\r\n\t\trepeat_freq_week: \"Week\",\r\n\t\trepeat_freq_month: \"Month\",\r\n\t\trepeat_freq_year: \"Year\",\r\n\t\trepeat_on_date: \"On date\",\r\n\t\trepeat_ends: \"Ends\",\r\n\r\n\t\tmonth_for_recurring: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"]//\r\n\t}\r\n};\r\n\r\n","/*\r\n @Autor Manuel Fernandez Panzuela - www.mfernandez.es\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Enero\", \"Febrero\", \"Marzo\", \"Abril\", \"Mayo\", \"Junio\", \"Julio\", \"Agosto\", \"Septiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"],\r\n\t\tmonth_short: [\"Ene\", \"Feb\", \"Mar\", \"Abr\", \"May\", \"Jun\", \"Jul\", \"Ago\", \"Sep\", \"Oct\", \"Nov\", \"Dic\"],\r\n\t\tday_full: [\"Domingo\", \"Lunes\", \"Martes\", \"Miércoles\", \"Jueves\", \"Viernes\", \"Sábado\"],\r\n\t\tday_short: [\"Dom\", \"Lun\", \"Mar\", \"Mié\", \"Jue\", \"Vie\", \"Sáb\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hoy\",\r\n\t\tday_tab: \"Día\",\r\n\t\tweek_tab: \"Semana\",\r\n\t\tmonth_tab: \"Mes\",\r\n\t\tnew_event: \"Nuevo evento\",\r\n\t\ticon_save: \"Guardar\",\r\n\t\ticon_cancel: \"Cancelar\",\r\n\t\ticon_details: \"Detalles\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Eliminar\",\r\n\t\tconfirm_closing: \"\", //\"Sus cambios se perderán, continuar ?\"\r\n\t\tconfirm_deleting: \"El evento se borrará definitivamente, ¿continuar?\",\r\n\t\tsection_description: \"Descripción\",\r\n\t\tsection_time: \"Período\",\r\n\t\tfull_day: \"Todo el día\",\r\n\r\n\t\tconfirm_recurring: \"¿Desea modificar el conjunto de eventos repetidos?\",\r\n\t\tsection_recurring: \"Repita el evento\",\r\n\t\tbutton_recurring: \"Impedido\",\r\n\t\tbutton_recurring_open: \"Permitido\",\r\n\t\tbutton_edit_series: \"Editar la serie\",\r\n\t\tbutton_edit_occurrence: \"Editar este evento\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Día\",\r\n\t\tdate: \"Fecha\",\r\n\t\tdescription: \"Descripción\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Año\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Día\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Reja\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diariamente\",\r\n\t\trepeat_radio_week: \"Semanalmente\",\r\n\t\trepeat_radio_month: \"Mensualmente\",\r\n\t\trepeat_radio_year: \"Anualmente\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia\",\r\n\t\trepeat_radio_day_type2: \"Cada jornada de trabajo\",\r\n\t\trepeat_week: \" Repetir cada\",\r\n\t\trepeat_text_week_count: \"semana:\",\r\n\t\trepeat_radio_month_type: \"Repita\",\r\n\t\trepeat_radio_month_start: \"El\",\r\n\t\trepeat_text_month_day: \"dia cada \",\r\n\t\trepeat_text_month_count: \"mes\",\r\n\t\trepeat_text_month_count2_before: \"cada\",\r\n\t\trepeat_text_month_count2_after: \"mes\",\r\n\t\trepeat_year_label: \"El\",\r\n\t\tselect_year_day2: \"del\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mes\",\r\n\t\trepeat_radio_end: \"Sin fecha de finalización\",\r\n\t\trepeat_text_occurences_count: \"ocurrencias\",\r\n\t\trepeat_radio_end3: \"Fin\",\r\n\t\trepeat_radio_end2: \"Después de\",\r\n\r\n\t\trepeat_never: \"Nunca\",\r\n\t\trepeat_daily: \"Cada día\",\r\n\t\trepeat_workdays: \"Cada día laborable\",\r\n\t\trepeat_weekly: \"Cada semana\",\r\n\t\trepeat_monthly: \"Cada mes\",\r\n\t\trepeat_yearly: \"Cada año\",\r\n\t\trepeat_custom: \"Personalizado\",\r\n\t\trepeat_freq_day: \"Día\",\r\n\t\trepeat_freq_week: \"Semana\",\r\n\t\trepeat_freq_month: \"Mes\",\r\n\t\trepeat_freq_year: \"Año\",\r\n\t\trepeat_on_date: \"En la fecha\",\r\n\t\trepeat_ends: \"Termina\",\r\n\r\n\t\tmonth_for_recurring: [\"Enero\", \"Febrero\", \"Маrzo\", \"Аbril\", \"Mayo\", \"Junio\", \"Julio\", \"Аgosto\", \"Setiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"],\r\n\t\tday_for_recurring: [\"Domingo\", \"Lunes\", \"Martes\", \"Miércoles\", \"Jeuves\", \"Viernes\", \"Sabado\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Tammikuu\", \"Helmikuu\", \"Maaliskuu\", \"Huhtikuu\", \"Toukokuu\", \"Kesäkuu\", \"Heinäkuu\", \"Elokuu\", \"Syyskuu\", \"Lokakuu\", \"Marraskuu\", \"Joulukuu\"],\r\n\t\tmonth_short: [\"Tam\", \"Hel\", \"Maa\", \"Huh\", \"Tou\", \"Kes\", \"Hei\", \"Elo\", \"Syy\", \"Lok\", \"Mar\", \"Jou\"],\r\n\t\tday_full: [\"Sunnuntai\", \"Maanantai\", \"Tiistai\", \"Keskiviikko\", \"Torstai\", \"Perjantai\", \"Lauantai\"],\r\n\t\tday_short: [\"Su\", \"Ma\", \"Ti\", \"Ke\", \"To\", \"Pe\", \"La\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Tänään\",\r\n\t\tday_tab: \"Päivä\",\r\n\t\tweek_tab: \"Viikko\",\r\n\t\tmonth_tab: \"Kuukausi\",\r\n\t\tnew_event: \"Uusi tapahtuma\",\r\n\t\ticon_save: \"Tallenna\",\r\n\t\ticon_cancel: \"Peru\",\r\n\t\ticon_details: \"Tiedot\",\r\n\t\ticon_edit: \"Muokkaa\",\r\n\t\ticon_delete: \"Poista\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Haluatko varmasti poistaa tapahtuman?\",\r\n\t\tsection_description: \"Kuvaus\",\r\n\t\tsection_time: \"Aikajakso\",\r\n\t\tfull_day: \"Koko päivä\",\r\n\r\n\t\tconfirm_recurring: \"Haluatko varmasti muokata toistuvan tapahtuman kaikkia jaksoja?\",\r\n\t\tsection_recurring: \"Toista tapahtuma\",\r\n\t\tbutton_recurring: \"Ei käytössä\",\r\n\t\tbutton_recurring_open: \"Käytössä\",\r\n\t\tbutton_edit_series: \"Muokkaa sarja\",\r\n\t\tbutton_edit_occurrence: \"Muokkaa kopio\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Esityslista\",\r\n\t\tdate: \"Päivämäärä\",\r\n\t\tdescription: \"Kuvaus\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Vuoden\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Esityslista\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Ritilä\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Luo uusi vetämällä\",\r\n\t\tdrag_to_move:\"Siirrä vetämällä\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Päivittäin\",\r\n\t\trepeat_radio_week: \"Viikoittain\",\r\n\t\trepeat_radio_month: \"Kuukausittain\",\r\n\t\trepeat_radio_year: \"Vuosittain\",\r\n\t\trepeat_radio_day_type: \"Joka\",\r\n\t\trepeat_text_day_count: \"päivä\",\r\n\t\trepeat_radio_day_type2: \"Joka arkipäivä\",\r\n\t\trepeat_week: \"Toista joka\",\r\n\t\trepeat_text_week_count: \"viikko näinä päivinä:\",\r\n\t\trepeat_radio_month_type: \"Toista\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \"päivänä joka\",\r\n\t\trepeat_text_month_count: \"kuukausi\",\r\n\t\trepeat_text_month_count2_before: \"joka\",\r\n\t\trepeat_text_month_count2_after: \"kuukausi\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"päivä\",\r\n\t\tselect_year_month: \"kuukausi\",\r\n\t\trepeat_radio_end: \"Ei loppumisaikaa\",\r\n\t\trepeat_text_occurences_count: \"Toiston jälkeen\",\r\n\t\trepeat_radio_end3: \"Loppuu\",\r\n\t\trepeat_radio_end2: \"\",\r\n\r\n\t\trepeat_never: \"Ei koskaan\",\r\n\t\trepeat_daily: \"Joka päivä\",\r\n\t\trepeat_workdays: \"Joka arkipäivä\",\r\n\t\trepeat_weekly: \"Joka viikko\",\r\n\t\trepeat_monthly: \"Joka kuukausi\",\r\n\t\trepeat_yearly: \"Joka vuosi\",\r\n\t\trepeat_custom: \"Mukautettu\",\r\n\t\trepeat_freq_day: \"Päivä\",\r\n\t\trepeat_freq_week: \"Viikko\",\r\n\t\trepeat_freq_month: \"Kuukausi\",\r\n\t\trepeat_freq_year: \"Vuosi\",\r\n\t\trepeat_on_date: \"Tiettynä päivänä\",\r\n\t\trepeat_ends: \"Päättyy\",\r\n\r\n\t\tmonth_for_recurring: [\"Tammikuu\", \"Helmikuu\", \"Maaliskuu\", \"Huhtikuu\", \"Toukokuu\", \"Kesäkuu\", \"Heinäkuu\", \"Elokuu\", \"Syyskuu\", \"Lokakuu\", \"Marraskuu\", \"Joulukuu\"],\r\n\t\tday_for_recurring: [\"Sunnuntai\", \"Maanantai\", \"Tiistai\", \"Keskiviikko\", \"Torstai\", \"Perjantai\", \"Lauantai\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Janvier\", \"Février\", \"Mars\", \"Avril\", \"Mai\", \"Juin\", \"Juillet\", \"Août\", \"Septembre\", \"Octobre\", \"Novembre\", \"Décembre\"],\r\n\t\tmonth_short: [\"Jan\", \"Fév\", \"Mar\", \"Avr\", \"Mai\", \"Juin\", \"Juil\", \"Aoû\", \"Sep\", \"Oct\", \"Nov\", \"Déc\"],\r\n\t\tday_full: [\"Dimanche\", \"Lundi\", \"Mardi\", \"Mercredi\", \"Jeudi\", \"Vendredi\", \"Samedi\"],\r\n\t\tday_short: [\"Dim\", \"Lun\", \"Mar\", \"Mer\", \"Jeu\", \"Ven\", \"Sam\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Aujourd'hui\",\r\n\t\tday_tab: \"Jour\",\r\n\t\tweek_tab: \"Semaine\",\r\n\t\tmonth_tab: \"Mois\",\r\n\t\tnew_event: \"Nouvel événement\",\r\n\t\ticon_save: \"Enregistrer\",\r\n\t\ticon_cancel: \"Annuler\",\r\n\t\ticon_details: \"Détails\",\r\n\t\ticon_edit: \"Modifier\",\r\n\t\ticon_delete: \"Effacer\",\r\n\t\tconfirm_closing: \"\", //Vos modifications seront perdus, êtes-vous sûr ?\r\n\t\tconfirm_deleting: \"L'événement sera effacé sans appel, êtes-vous sûr ?\",\r\n\t\tsection_description: \"Description\",\r\n\t\tsection_time: \"Période\",\r\n\t\tfull_day: \"Journée complète\",\r\n\r\n\t\tconfirm_recurring: \"Voulez-vous éditer toute une série d'évènements répétés?\",\r\n\t\tsection_recurring: \"Périodicité\",\r\n\t\tbutton_recurring: \"Désactivé\",\r\n\t\tbutton_recurring_open: \"Activé\",\r\n\t\tbutton_edit_series: \"Modifier la série\",\r\n\t\tbutton_edit_occurrence: \"Modifier une copie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Jour\",\r\n\t\tdate: \"Date\",\r\n\t\tdescription: \"Description\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Année\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Jour\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grille\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Quotidienne\",\r\n\t\trepeat_radio_week: \"Hebdomadaire\",\r\n\t\trepeat_radio_month: \"Mensuelle\",\r\n\t\trepeat_radio_year: \"Annuelle\",\r\n\t\trepeat_radio_day_type: \"Chaque\",\r\n\t\trepeat_text_day_count: \"jour\",\r\n\t\trepeat_radio_day_type2: \"Chaque journée de travail\",\r\n\t\trepeat_week: \" Répéter toutes les\",\r\n\t\trepeat_text_week_count: \"semaine:\",\r\n\t\trepeat_radio_month_type: \"Répéter\",\r\n\t\trepeat_radio_month_start: \"Le\",\r\n\t\trepeat_text_month_day: \"jour chaque\",\r\n\t\trepeat_text_month_count: \"mois\",\r\n\t\trepeat_text_month_count2_before: \"chaque\",\r\n\t\trepeat_text_month_count2_after: \"mois\",\r\n\t\trepeat_year_label: \"Le\",\r\n\t\tselect_year_day2: \"du\",\r\n\t\trepeat_text_year_day: \"jour\",\r\n\t\tselect_year_month: \"mois\",\r\n\t\trepeat_radio_end: \"Pas de date d"achèvement\",\r\n\t\trepeat_text_occurences_count: \"occurrences\",\r\n\t\trepeat_radio_end3: \"Fin\",\r\n\t\trepeat_radio_end2: \"Après\",\r\n\r\n\t\trepeat_never: \"Jamais\",\r\n\t\trepeat_daily: \"Chaque jour\",\r\n\t\trepeat_workdays: \"Chaque jour ouvrable\",\r\n\t\trepeat_weekly: \"Chaque semaine\",\r\n\t\trepeat_monthly: \"Chaque mois\",\r\n\t\trepeat_yearly: \"Chaque année\",\r\n\t\trepeat_custom: \"Personnalisé\",\r\n\t\trepeat_freq_day: \"Jour\",\r\n\t\trepeat_freq_week: \"Semaine\",\r\n\t\trepeat_freq_month: \"Mois\",\r\n\t\trepeat_freq_year: \"Année\",\r\n\t\trepeat_on_date: \"À la date\",\r\n\t\trepeat_ends: \"Se termine\",\r\n\r\n\t\tmonth_for_recurring: [\"Janvier\", \"Février\", \"Mars\", \"Avril\", \"Mai\", \"Juin\", \"Juillet\", \"Août\", \"Septembre\", \"Octobre\", \"Novembre\", \"Décembre\"],\r\n\t\tday_for_recurring: [\"Dimanche\", \"Lundi\", \"Mardi\", \"Mercredi\", \"Jeudi\", \"Vendredi\", \"Samedi\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"ינואר\", \"פברואר\", \"מרץ\", \"אפריל\", \"מאי\", \"יוני\", \"יולי\", \"אוגוסט\", \"ספטמבר\", \"אוקטובר\", \"נובמבר\", \"דצמבר\"],\r\n\t\tmonth_short: [\"ינו\", \"פבר\", \"מרץ\", \"אפר\", \"מאי\", \"יונ\", \"יול\", \"אוג\", \"ספט\", \"אוק\", \"נוב\", \"דצמ\"],\r\n\t\tday_full: [\"ראשון\", \"שני\", \"שלישי\", \"רביעי\", \"חמישי\", \"שישי\", \"שבת\"],\r\n\t\tday_short: [\"א\", \"ב\", \"ג\", \"ד\", \"ה\", \"ו\", \"ש\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"היום\",\r\n\t\tday_tab: \"יום\",\r\n\t\tweek_tab: \"שבוע\",\r\n\t\tmonth_tab: \"חודש\",\r\n\t\tnew_event: \"ארוע חדש\",\r\n\t\ticon_save: \"שמור\",\r\n\t\ticon_cancel: \"בטל\",\r\n\t\ticon_details: \"פרטים\",\r\n\t\ticon_edit: \"ערוך\",\r\n\t\ticon_delete: \"מחק\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"ארוע ימחק סופית.להמשיך?\",\r\n\t\tsection_description: \"תיאור\",\r\n\t\tsection_time: \"תקופה\",\r\n\r\n\t\tconfirm_recurring: \"האם ברצונך לשנות כל סדרת ארועים מתמשכים?\",\r\n\t\tsection_recurring: \"להעתיק ארוע\",\r\n\t\tbutton_recurring: \"לא פעיל\",\r\n\t\tbutton_recurring_open: \"פעיל\",\r\n\t\tfull_day: \"יום שלם\",\r\n\t\tbutton_edit_series: \"ערוך את הסדרה\",\r\n\t\tbutton_edit_occurrence: \"עריכת עותק\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"סדר יום\",\r\n\t\tdate: \"תאריך\",\r\n\t\tdescription: \"תיאור\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"לשנה\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"סדר יום\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"סורג\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"גרור כדי להזיז\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"בטל\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"הבא\",\r\n\t\tprev: \"הקודם\",\r\n\t\tyear: \"שנה\",\r\n\t\tmonth: \"חודש\",\r\n\t\tday: \"יום\",\r\n\t\thour:\"שעה\",\r\n\t\tminute: \"דקה\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"יומי\",\r\n\t\trepeat_radio_week: \"שבועי\",\r\n\t\trepeat_radio_month: \"חודשי\",\r\n\t\trepeat_radio_year: \"שנתי\",\r\n\t\trepeat_radio_day_type: \"חזור כל\",\r\n\t\trepeat_text_day_count: \"ימים\",\r\n\t\trepeat_radio_day_type2: \"חזור כל יום עבודה\",\r\n\t\trepeat_week: \" חזור כל\",\r\n\t\trepeat_text_week_count: \"שבוע לפי ימים:\",\r\n\t\trepeat_radio_month_type: \"חזור כל\",\r\n\t\trepeat_radio_month_start: \"כל\",\r\n\t\trepeat_text_month_day: \"ימים כל\",\r\n\t\trepeat_text_month_count: \"חודשים\",\r\n\t\trepeat_text_month_count2_before: \"חזור כל\",\r\n\t\trepeat_text_month_count2_after: \"חודש\",\r\n\t\trepeat_year_label: \"כל\",\r\n\t\tselect_year_day2: \"בחודש\",\r\n\t\trepeat_text_year_day: \"ימים\",\r\n\t\tselect_year_month: \"חודש\",\r\n\t\trepeat_radio_end: \"לעולם לא מסתיים\",\r\n\t\trepeat_text_occurences_count: \"אירועים\",\r\n\t\trepeat_radio_end3: \"מסתיים ב\",\r\n\t\trepeat_radio_end2: \"אחרי\",\r\n\r\n\t\trepeat_never: \"אף פעם\",\r\n\t\trepeat_daily: \"כל יום\",\r\n\t\trepeat_workdays: \"כל יום עבודה\",\r\n\t\trepeat_weekly: \"כל שבוע\",\r\n\t\trepeat_monthly: \"כל חודש\",\r\n\t\trepeat_yearly: \"כל שנה\",\r\n\t\trepeat_custom: \"מותאם אישית\",\r\n\t\trepeat_freq_day: \"יום\",\r\n\t\trepeat_freq_week: \"שבוע\",\r\n\t\trepeat_freq_month: \"חודש\",\r\n\t\trepeat_freq_year: \"שנה\",\r\n\t\trepeat_on_date: \"בתאריך\",\r\n\t\trepeat_ends: \"מסתיים\",\r\n\r\n\t\tmonth_for_recurring: [\"ינואר\", \"פברואר\", \"מרץ\", \"אפריל\", \"מאי\", \"יוני\", \"יולי\", \"אוגוסט\", \"ספטמבר\", \"אוקטובר\", \"נובמבר\", \"דצמבר\"],\r\n\t\tday_for_recurring: [\"ראשון\", \"שני\", \"שלישי\", \"רביעי\", \"חמישי\", \"שישי\", \"שבת\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Január\", \"Február\", \"Március\", \"Április\", \"Május\", \"Június\", \"Július\", \"Augusztus\", \"Szeptember\", \"Október\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Már\", \"Ápr\", \"Máj\", \"Jún\", \"Júl\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Vasárnap\", \"Hétfõ\", \"Kedd\", \"Szerda\", \"Csütörtök\", \"Péntek\", \"szombat\"],\r\n\t\tday_short: [\"Va\", \"Hé\", \"Ke\", \"Sze\", \"Csü\", \"Pé\", \"Szo\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Ma\",\r\n\t\tday_tab: \"Nap\",\r\n\t\tweek_tab: \"Hét\",\r\n\t\tmonth_tab: \"Hónap\",\r\n\t\tnew_event: \"Új esemény\",\r\n\t\ticon_save: \"Mentés\",\r\n\t\ticon_cancel: \"Mégse\",\r\n\t\ticon_details: \"Részletek\",\r\n\t\ticon_edit: \"Szerkesztés\",\r\n\t\ticon_delete: \"Törlés\",\r\n\t\tconfirm_closing: \"\", //A változások elvesznek, biztosan folytatja? \"\r\n\t\tconfirm_deleting: \"Az esemény törölve lesz, biztosan folytatja?\",\r\n\t\tsection_description: \"Leírás\",\r\n\t\tsection_time: \"Idõszak\",\r\n\t\tfull_day: \"Egesz napos\",\r\n\r\n\t\t/*ismétlõdõ események*/\r\n\t\tconfirm_recurring: \"Biztosan szerkeszteni akarod az összes ismétlõdõ esemény beállítását?\",\r\n\t\tsection_recurring: \"Esemény ismétlése\",\r\n\t\tbutton_recurring: \"Tiltás\",\r\n\t\tbutton_recurring_open: \"Engedélyezés\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Szerkesztés bíróság\",\r\n\r\n\t\t/*napirendi nézet*/\r\n\t\tagenda_tab: \"Napirend\",\r\n\t\tdate: \"Dátum\",\r\n\t\tdescription: \"Leírás\",\r\n\r\n\t\t/*éves nézet*/\r\n\t\tyear_tab: \"Év\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Napi\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Heti\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Havi\",\r\n\t\trepeat_radio_year: \"Éves\",\r\n\t\trepeat_radio_day_type: \"Minden\",\r\n\t\trepeat_text_day_count: \"nap\",\r\n\t\trepeat_radio_day_type2: \"Minden munkanap\",\r\n\t\trepeat_week: \" Ismételje meg minden\",\r\n\t\trepeat_text_week_count: \"héten a következő napokon:\",\r\n\t\trepeat_radio_month_type: \"Ismétlés\",\r\n\t\trepeat_radio_month_start: \"Ekkor\",\r\n\t\trepeat_text_month_day: \"nap minden\",\r\n\t\trepeat_text_month_count: \"hónapban\",\r\n\t\trepeat_text_month_count2_before: \"minden\",\r\n\t\trepeat_text_month_count2_after: \"hónapban\",\r\n\t\trepeat_year_label: \"Ekkor\",\r\n\t\tselect_year_day2: \"-án/-én\",\r\n\t\trepeat_text_year_day: \"nap\",\r\n\t\tselect_year_month: \"hónap\",\r\n\t\trepeat_radio_end: \"Nincs befejezési dátum\",\r\n\t\trepeat_text_occurences_count: \"esemény\",\r\n\t\trepeat_radio_end2: \"Után\",\r\n\t\trepeat_radio_end3: \"Befejező dátum\",\r\n\r\n\t\trepeat_never: \"Soha\",\r\n\t\trepeat_daily: \"Minden nap\",\r\n\t\trepeat_workdays: \"Minden munkanap\",\r\n\t\trepeat_weekly: \"Minden héten\",\r\n\t\trepeat_monthly: \"Minden hónapban\",\r\n\t\trepeat_yearly: \"Minden évben\",\r\n\t\trepeat_custom: \"Egyedi\",\r\n\t\trepeat_freq_day: \"Nap\",\r\n\t\trepeat_freq_week: \"Hét\",\r\n\t\trepeat_freq_month: \"Hónap\",\r\n\t\trepeat_freq_year: \"Év\",\r\n\t\trepeat_on_date: \"Dátum szerint\",\r\n\t\trepeat_ends: \"Befejeződik\",\r\n\r\n\t\tmonth_for_recurring: [\"Január\", \"Február\", \"Március\", \"Április\", \"Május\", \"Június\", \"Július\", \"Augusztus\", \"Szeptember\", \"Október\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Vasárnap\", \"Hétfő\", \"Kedd\", \"Szerda\", \"Csütörtök\", \"Péntek\", \"Szombat\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Maret\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Agustus\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mei\", \"Jun\", \"Jul\", \"Ags\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Minggu\", \"Senin\", \"Selasa\", \"Rabu\", \"Kamis\", \"Jumat\", \"Sabtu\"],\r\n\t\tday_short: [\"Ming\", \"Sen\", \"Sel\", \"Rab\", \"Kam\", \"Jum\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hari Ini\",\r\n\t\tday_tab: \"Hari\",\r\n\t\tweek_tab: \"Minggu\",\r\n\t\tmonth_tab: \"Bulan\",\r\n\t\tnew_event: \"Acara Baru\",\r\n\t\ticon_save: \"Simpan\",\r\n\t\ticon_cancel: \"Batal\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edit\",\r\n\t\ticon_delete: \"Hapus\",\r\n\t\tconfirm_closing: \"\", /*Perubahan tidak akan disimpan ?*/\r\n\t\tconfirm_deleting: \"Acara akan dihapus\",\r\n\t\tsection_description: \"Keterangan\",\r\n\t\tsection_time: \"Periode\",\r\n\t\tfull_day: \"Hari penuh\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Apakah acara ini akan berulang?\",\r\n\t\tsection_recurring: \"Acara Rutin\",\r\n\t\tbutton_recurring: \"Tidak Difungsikan\",\r\n\t\tbutton_recurring_open: \"Difungsikan\",\r\n\t\tbutton_edit_series: \"Mengedit seri\",\r\n\t\tbutton_edit_occurrence: \"Mengedit salinan\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Tanggal\",\r\n\t\tdescription: \"Keterangan\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Tahun\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabel\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Harian\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Mingguan\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Bulanan\",\r\n\t\trepeat_radio_year: \"Tahunan\",\r\n\t\trepeat_radio_day_type: \"Setiap\",\r\n\t\trepeat_text_day_count: \"hari\",\r\n\t\trepeat_radio_day_type2: \"Setiap hari kerja\",\r\n\t\trepeat_week: \" Ulangi setiap\",\r\n\t\trepeat_text_week_count: \"minggu pada hari berikut:\",\r\n\t\trepeat_radio_month_type: \"Ulangi\",\r\n\t\trepeat_radio_month_start: \"Pada\",\r\n\t\trepeat_text_month_day: \"hari setiap\",\r\n\t\trepeat_text_month_count: \"bulan\",\r\n\t\trepeat_text_month_count2_before: \"setiap\",\r\n\t\trepeat_text_month_count2_after: \"bulan\",\r\n\t\trepeat_year_label: \"Pada\",\r\n\t\tselect_year_day2: \"dari\",\r\n\t\trepeat_text_year_day: \"hari\",\r\n\t\tselect_year_month: \"bulan\",\r\n\t\trepeat_radio_end: \"Tanpa tanggal akhir\",\r\n\t\trepeat_text_occurences_count: \"kejadian\",\r\n\t\trepeat_radio_end2: \"Setelah\",\r\n\t\trepeat_radio_end3: \"Berakhir pada\",\r\n\r\n\t\trepeat_never: \"Tidak pernah\",\r\n\t\trepeat_daily: \"Setiap hari\",\r\n\t\trepeat_workdays: \"Setiap hari kerja\",\r\n\t\trepeat_weekly: \"Setiap minggu\",\r\n\t\trepeat_monthly: \"Setiap bulan\",\r\n\t\trepeat_yearly: \"Setiap tahun\",\r\n\t\trepeat_custom: \"Kustom\",\r\n\t\trepeat_freq_day: \"Hari\",\r\n\t\trepeat_freq_week: \"Minggu\",\r\n\t\trepeat_freq_month: \"Bulan\",\r\n\t\trepeat_freq_year: \"Tahun\",\r\n\t\trepeat_on_date: \"Pada tanggal\",\r\n\t\trepeat_ends: \"Berakhir\",\r\n\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Maret\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Agustus\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tday_for_recurring: [\"Minggu\", \"Senin\", \"Selasa\", \"Rabu\", \"Kamis\", \"Jumat\", \"Sabtu\"]\r\n\t}\r\n};","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Gennaio\", \"Febbraio\", \"Marzo\", \"Aprile\", \"Maggio\", \"Giugno\", \"Luglio\", \"Agosto\", \"Settembre\", \"Ottobre\", \"Novembre\", \"Dicembre\"],\r\n\t\tmonth_short: [\"Gen\", \"Feb\", \"Mar\", \"Apr\", \"Mag\", \"Giu\", \"Lug\", \"Ago\", \"Set\", \"Ott\", \"Nov\", \"Dic\"],\r\n\t\tday_full: [\"Domenica\", \"Lunedì\", \"Martedì\", \"Mercoledì\", \"Giovedì\", \"Venerdì\", \"Sabato\"],\r\n\t\tday_short: [\"Dom\", \"Lun\", \"Mar\", \"Mer\", \"Gio\", \"Ven\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Oggi\",\r\n\t\tday_tab: \"Giorno\",\r\n\t\tweek_tab: \"Settimana\",\r\n\t\tmonth_tab: \"Mese\",\r\n\t\tnew_event: \"Nuovo evento\",\r\n\t\ticon_save: \"Salva\",\r\n\t\ticon_cancel: \"Chiudi\",\r\n\t\ticon_details: \"Dettagli\",\r\n\t\ticon_edit: \"Modifica\",\r\n\t\ticon_delete: \"Elimina\",\r\n\t\tconfirm_closing: \"\", //Le modifiche apportate saranno perse, siete sicuri?\r\n\t\tconfirm_deleting: \"L'evento sarà eliminato, siete sicuri?\",\r\n\t\tsection_description: \"Descrizione\",\r\n\t\tsection_time: \"Periodo di tempo\",\r\n\t\tfull_day: \"Intera giornata\",\r\n\r\n\t\tconfirm_recurring: \"Vuoi modificare l'intera serie di eventi?\",\r\n\t\tsection_recurring: \"Ripetere l'evento\",\r\n\t\tbutton_recurring: \"Disattivato\",\r\n\t\tbutton_recurring_open: \"Attivato\",\r\n\t\tbutton_edit_series: \"Modificare la serie\",\r\n\t\tbutton_edit_occurrence: \"Modificare una copia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descrizione\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Anno\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Griglia\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Quotidiano\",\r\n\t\trepeat_radio_week: \"Settimanale\",\r\n\t\trepeat_radio_month: \"Mensile\",\r\n\t\trepeat_radio_year: \"Annuale\",\r\n\t\trepeat_radio_day_type: \"Ogni\",\r\n\t\trepeat_text_day_count: \"giorno\",\r\n\t\trepeat_radio_day_type2: \"Ogni giornata lavorativa\",\r\n\t\trepeat_week: \" Ripetere ogni\",\r\n\t\trepeat_text_week_count: \"settimana:\",\r\n\t\trepeat_radio_month_type: \"Ripetere\",\r\n\t\trepeat_radio_month_start: \"Il\",\r\n\t\trepeat_text_month_day: \"giorno ogni\",\r\n\t\trepeat_text_month_count: \"mese\",\r\n\t\trepeat_text_month_count2_before: \"ogni\",\r\n\t\trepeat_text_month_count2_after: \"mese\",\r\n\t\trepeat_year_label: \"Il\",\r\n\t\tselect_year_day2: \"del\",\r\n\t\trepeat_text_year_day: \"giorno\",\r\n\t\tselect_year_month: \"mese\",\r\n\t\trepeat_radio_end: \"Senza data finale\",\r\n\t\trepeat_text_occurences_count: \"occorenze\",\r\n\t\trepeat_radio_end3: \"Fine\",\r\n\t\trepeat_radio_end2: \"Dopo\",\r\n\r\n\t\trepeat_never: \"Mai\",\r\n\t\trepeat_daily: \"Ogni giorno\",\r\n\t\trepeat_workdays: \"Ogni giorno feriale\",\r\n\t\trepeat_weekly: \"Ogni settimana\",\r\n\t\trepeat_monthly: \"Ogni mese\",\r\n\t\trepeat_yearly: \"Ogni anno\",\r\n\t\trepeat_custom: \"Personalizzato\",\r\n\t\trepeat_freq_day: \"Giorno\",\r\n\t\trepeat_freq_week: \"Settimana\",\r\n\t\trepeat_freq_month: \"Mese\",\r\n\t\trepeat_freq_year: \"Anno\",\r\n\t\trepeat_on_date: \"Alla data\",\r\n\t\trepeat_ends: \"Finisce\",\r\n\r\n\t\tmonth_for_recurring: [\"Gennaio\", \"Febbraio\", \"Marzo\", \"Aprile\", \"Maggio\", \"Jiugno\", \"Luglio\", \"Agosto\", \"Settembre\", \"Ottobre\", \"Novembre\", \"Dicembre\"],\r\n\t\tday_for_recurring: [\"Domenica\", \"Lunedì\", \"Martedì\", \"Mercoledì\", \"Jovedì\", \"Venerdì\", \"Sabato\"]\r\n\t}\r\n};\r\n","/*\r\n Translation by Genexus Japan Inc.\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tmonth_short: [ \"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_full: [\"日曜日\", \"月曜日\", \"火曜日\", \"水曜日\", \"木曜日\", \"金曜日\", \"土曜日\"],\r\n\t\tday_short: [\"日\", \"月\", \"火\", \"水\", \"木\", \"金\", \"土\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"今日\",\r\n\t\tday_tab: \"日\",\r\n\t\tweek_tab: \"週\",\r\n\t\tmonth_tab: \"月\",\r\n\t\tnew_event: \"新イベント\",\r\n\t\ticon_save: \"保存\",\r\n\t\ticon_cancel: \"キャンセル\",\r\n\t\ticon_details: \"詳細\",\r\n\t\ticon_edit: \"編集\",\r\n\t\ticon_delete: \"削除\",\r\n\t\tconfirm_closing: \"\", //変更が取り消されます、宜しいですか?\r\n\t\tconfirm_deleting: \"イベント完全に削除されます、宜しいですか?\",\r\n\t\tsection_description: \"デスクリプション\",\r\n\t\tsection_time: \"期間\",\r\n\t\tconfirm_recurring: \"繰り返されているイベントを全て編集しますか?\",\r\n\t\tsection_recurring: \"イベントを繰り返す\",\r\n\t\tbutton_recurring: \"無効\",\r\n\t\tbutton_recurring_open: \"有効\",\r\n\t\tfull_day: \"終日\",\r\n\t\tbutton_edit_series: \"シリーズを編集します\",\r\n\t\tbutton_edit_occurrence: \"コピーを編集\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"議題は\",\r\n\t\tdate: \"日付\",\r\n\t\tdescription: \"説明\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"今年\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"議題は\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"グリッド\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"毎日\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"毎週\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"毎月\",\r\n\t\trepeat_radio_year: \"毎年\",\r\n\t\trepeat_radio_day_type: \"毎\",\r\n\t\trepeat_text_day_count: \"日\",\r\n\t\trepeat_radio_day_type2: \"毎営業日\",\r\n\t\trepeat_week: \" 繰り返し毎\",\r\n\t\trepeat_text_week_count: \"週 次の日:\",\r\n\t\trepeat_radio_month_type: \"繰り返し\",\r\n\t\trepeat_radio_month_start: \"オン\",\r\n\t\trepeat_text_month_day: \"日毎\",\r\n\t\trepeat_text_month_count: \"月\",\r\n\t\trepeat_text_month_count2_before: \"毎\",\r\n\t\trepeat_text_month_count2_after: \"月\",\r\n\t\trepeat_year_label: \"オン\",\r\n\t\tselect_year_day2: \"の\",\r\n\t\trepeat_text_year_day: \"日\",\r\n\t\tselect_year_month: \"月\",\r\n\t\trepeat_radio_end: \"終了日なし\",\r\n\t\trepeat_text_occurences_count: \"回数\",\r\n\t\trepeat_radio_end2: \"後\",\r\n\t\trepeat_radio_end3: \"終了日まで\",\r\n\r\n\t\trepeat_never: \"決して\",\r\n\t\trepeat_daily: \"毎日\",\r\n\t\trepeat_workdays: \"毎営業日\",\r\n\t\trepeat_weekly: \"毎週\",\r\n\t\trepeat_monthly: \"毎月\",\r\n\t\trepeat_yearly: \"毎年\",\r\n\t\trepeat_custom: \"カスタム\",\r\n\t\trepeat_freq_day: \"日\",\r\n\t\trepeat_freq_week: \"週\",\r\n\t\trepeat_freq_month: \"月\",\r\n\t\trepeat_freq_year: \"年\",\r\n\t\trepeat_on_date: \"日にち\",\r\n\t\trepeat_ends: \"終了\",\r\n\r\n\t\tmonth_for_recurring: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_for_recurring: [\"日曜日\", \"月曜日\", \"火曜日\", \"水曜日\", \"木曜日\", \"金曜日\", \"土曜日\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default class LocaleManager{\r\n\tconstructor(config){\r\n\t\tthis._locales = {};\r\n\t\tfor(const i in config){\r\n\t\t\tthis._locales[i] = config[i];\r\n\t\t}\r\n\t}\r\n\r\n\taddLocale(name, locale) {\r\n\t\tthis._locales[name] = locale;\r\n\t}\r\n\r\n\tgetLocale(name) {\r\n\t\treturn this._locales[name];\r\n\t}\r\n}","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Mon\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"I dag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uke\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny hendelse\",\r\n\t\ticon_save: \"Lagre\",\r\n\t\ticon_cancel: \"Avbryt\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Rediger\",\r\n\t\ticon_delete: \"Slett\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Hendelsen vil bli slettet permanent. Er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du forandre hele dette settet av repeterende hendelser?\",\r\n\t\tsection_recurring: \"Repeter hendelsen\",\r\n\t\tbutton_recurring: \"Av\",\r\n\t\tbutton_recurring_open: \"På\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Redigere en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\",\r\n\t\trepeat_radio_week: \"Ukentlig\",\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Alle hverdager\",\r\n\t\trepeat_week: \" Gjentas hver\",\r\n\t\trepeat_text_week_count: \"uke på:\",\r\n\t\trepeat_radio_month_type: \"På hver\",\r\n\t\trepeat_radio_month_start: \"På\",\r\n\t\trepeat_text_month_day: \"dag hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"på\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Ingen sluttdato\",\r\n\t\trepeat_text_occurences_count: \"forekomst\",\r\n\t\trepeat_radio_end3: \"Stop den\",\r\n\t\trepeat_radio_end2: \"Etter\",\r\n\r\n\t\trepeat_never: \"Aldri\",\r\n\t\trepeat_daily: \"Hver dag\",\r\n\t\trepeat_workdays: \"Hver ukedag\",\r\n\t\trepeat_weekly: \"Hver uke\",\r\n\t\trepeat_monthly: \"Hver måned\",\r\n\t\trepeat_yearly: \"Hvert år\",\r\n\t\trepeat_custom: \"Tilpasset\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Uke\",\r\n\t\trepeat_freq_month: \"Måned\",\r\n\t\trepeat_freq_year: \"År\",\r\n\t\trepeat_on_date: \"På dato\",\r\n\t\trepeat_ends: \"Slutter\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tday_for_recurring: [\"Sondag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Maart\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Augustus\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"mrt\", \"Apr\", \"Mei\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Zondag\", \"Maandag\", \"Dinsdag\", \"Woensdag\", \"Donderdag\", \"Vrijdag\", \"Zaterdag\"],\r\n\t\tday_short: [\"Zo\", \"Ma\", \"Di\", \"Wo\", \"Do\", \"Vr\", \"Za\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Vandaag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Week\",\r\n\t\tmonth_tab: \"Maand\",\r\n\t\tnew_event: \"Nieuw item\",\r\n\t\ticon_save: \"Opslaan\",\r\n\t\ticon_cancel: \"Annuleren\",\r\n\t\ticon_details: \"Details\",\r\n\t\ticon_edit: \"Bewerken\",\r\n\t\ticon_delete: \"Verwijderen\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Item zal permanent worden verwijderd, doorgaan?\",\r\n\t\tsection_description: \"Beschrijving\",\r\n\t\tsection_time: \"Tijd periode\",\r\n\t\tfull_day: \"Hele dag\",\r\n\r\n\t\tconfirm_recurring: \"Wilt u alle terugkerende items bijwerken?\",\r\n\t\tsection_recurring: \"Item herhalen\",\r\n\t\tbutton_recurring: \"Uit\",\r\n\t\tbutton_recurring_open: \"Aan\",\r\n\t\tbutton_edit_series: \"Bewerk de serie\",\r\n\t\tbutton_edit_occurrence: \"Bewerk een kopie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Omschrijving\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Jaar\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabel\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dagelijks\",\r\n\t\trepeat_radio_week: \"Wekelijks\",\r\n\t\trepeat_radio_month: \"Maandelijks\",\r\n\t\trepeat_radio_year: \"Jaarlijks\",\r\n\t\trepeat_radio_day_type: \"Elke\",\r\n\t\trepeat_text_day_count: \"dag(en)\",\r\n\t\trepeat_radio_day_type2: \"Elke werkdag\",\r\n\t\trepeat_week: \" Herhaal elke\",\r\n\t\trepeat_text_week_count: \"week op de volgende dagen:\",\r\n\t\trepeat_radio_month_type: \"Herhaal\",\r\n\t\trepeat_radio_month_start: \"Op\",\r\n\t\trepeat_text_month_day: \"dag iedere\",\r\n\t\trepeat_text_month_count: \"maanden\",\r\n\t\trepeat_text_month_count2_before: \"iedere\",\r\n\t\trepeat_text_month_count2_after: \"maanden\",\r\n\t\trepeat_year_label: \"Op\",\r\n\t\tselect_year_day2: \"van\",\r\n\t\trepeat_text_year_day: \"dag\",\r\n\t\tselect_year_month: \"maand\",\r\n\t\trepeat_radio_end: \"Geen eind datum\",\r\n\t\trepeat_text_occurences_count: \"keren\",\r\n\t\trepeat_radio_end3: \"Eindigd per\",\r\n\t\trepeat_radio_end2: \"Na\",\r\n\r\n\t\trepeat_never: \"Nooit\",\r\n\t\trepeat_daily: \"Elke dag\",\r\n\t\trepeat_workdays: \"Elke werkdag\",\r\n\t\trepeat_weekly: \"Elke week\",\r\n\t\trepeat_monthly: \"Elke maand\",\r\n\t\trepeat_yearly: \"Elk jaar\",\r\n\t\trepeat_custom: \"Aangepast\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Week\",\r\n\t\trepeat_freq_month: \"Maand\",\r\n\t\trepeat_freq_year: \"Jaar\",\r\n\t\trepeat_on_date: \"Op datum\",\r\n\t\trepeat_ends: \"Eindigt\",\r\n\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Maart\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Augustus\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Zondag\", \"Maandag\", \"Dinsdag\", \"Woensdag\", \"Donderdag\", \"Vrijdag\", \"Zaterdag\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Man\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uke\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny\",\r\n\t\ticon_save: \"Lagre\",\r\n\t\ticon_cancel: \"Avbryt\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Endre\",\r\n\t\ticon_delete: \"Slett\",\r\n\t\tconfirm_closing: \"Endringer blir ikke lagret, er du sikker?\", //Endringer blir ikke lagret, er du sikker?\r\n\t\tconfirm_deleting: \"Oppføringen vil bli slettet, er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\t\tfull_day: \"Full dag\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du endre hele settet med repeterende oppføringer?\",\r\n\t\tsection_recurring: \"Repeterende oppføring\",\r\n\t\tbutton_recurring: \"Ikke aktiv\",\r\n\t\tbutton_recurring_open: \"Aktiv\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Redigere en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Ukentlig\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Hver arbeidsdag\",\r\n\t\trepeat_week: \" Gjenta hver\",\r\n\t\trepeat_text_week_count: \"uke neste dager:\",\r\n\t\trepeat_radio_month_type: \"Gjenta\",\r\n\t\trepeat_radio_month_start: \"På\",\r\n\t\trepeat_text_month_day: \"dag hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"På\",\r\n\t\tselect_year_day2: \"av\",\r\n\t\trepeat_text_year_day: \"dag\",\r\n\t\tselect_year_month: \"måned\",\r\n\t\trepeat_radio_end: \"Ingen sluttdato\",\r\n\t\trepeat_text_occurences_count: \"forekomster\",\r\n\t\trepeat_radio_end2: \"Etter\",\r\n\t\trepeat_radio_end3: \"Slutt innen\",\r\n\r\n\t\trepeat_never: \"Aldri\",\r\n\t\trepeat_daily: \"Hver dag\",\r\n\t\trepeat_workdays: \"Hver ukedag\",\r\n\t\trepeat_weekly: \"Hver uke\",\r\n\t\trepeat_monthly: \"Hver måned\",\r\n\t\trepeat_yearly: \"Hvert år\",\r\n\t\trepeat_custom: \"Tilpasset\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Uke\",\r\n\t\trepeat_freq_month: \"Måned\",\r\n\t\trepeat_freq_year: \"År\",\r\n\t\trepeat_on_date: \"På dato\",\r\n\t\trepeat_ends: \"Slutter\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tday_for_recurring: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Styczeń\", \"Luty\", \"Marzec\", \"Kwiecień\", \"Maj\", \"Czerwiec\", \"Lipiec\", \"Sierpień\", \"Wrzesień\", \"Październik\", \"Listopad\", \"Grudzień\"],\r\n\t\tmonth_short: [\"Sty\", \"Lut\", \"Mar\", \"Kwi\", \"Maj\", \"Cze\", \"Lip\", \"Sie\", \"Wrz\", \"Paź\", \"Lis\", \"Gru\"],\r\n\t\tday_full: [\"Niedziela\", \"Poniedziałek\", \"Wtorek\", \"Środa\", \"Czwartek\", \"Piątek\", \"Sobota\"],\r\n\t\tday_short: [\"Nie\", \"Pon\", \"Wto\", \"Śro\", \"Czw\", \"Pią\", \"Sob\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dziś\",\r\n\t\tday_tab: \"Dzień\",\r\n\t\tweek_tab: \"Tydzień\",\r\n\t\tmonth_tab: \"Miesiąc\",\r\n\t\tnew_event: \"Nowe zdarzenie\",\r\n\t\ticon_save: \"Zapisz\",\r\n\t\ticon_cancel: \"Anuluj\",\r\n\t\ticon_details: \"Szczegóły\",\r\n\t\ticon_edit: \"Edytuj\",\r\n\t\ticon_delete: \"Usuń\",\r\n\t\tconfirm_closing: \"\", //Zmiany zostaną usunięte, jesteś pewien?\r\n\t\tconfirm_deleting: \"Zdarzenie zostanie usunięte na zawsze, kontynuować?\",\r\n\t\tsection_description: \"Opis\",\r\n\t\tsection_time: \"Okres czasu\",\r\n\t\tfull_day: \"Cały dzień\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Czy chcesz edytować cały zbiór powtarzających się zdarzeń?\",\r\n\t\tsection_recurring: \"Powtórz zdarzenie\",\r\n\t\tbutton_recurring: \"Nieaktywne\",\r\n\t\tbutton_recurring_open: \"Aktywne\",\r\n\t\tbutton_edit_series: \"Edytuj serię\",\r\n\t\tbutton_edit_occurrence: \"Edytuj kopię\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Opis\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabela\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Codziennie\",\r\n\t\trepeat_radio_week: \"Co tydzie\",\r\n\t\trepeat_radio_month: \"Co miesic\",\r\n\t\trepeat_radio_year: \"Co rok\",\r\n\t\trepeat_radio_day_type: \"Kadego\",\r\n\t\trepeat_text_day_count: \"dnia\",\r\n\t\trepeat_radio_day_type2: \"Kadego dnia roboczego\",\r\n\t\trepeat_week: \" Powtarzaj kadego\",\r\n\t\trepeat_text_week_count: \"tygodnia w dni:\",\r\n\t\trepeat_radio_month_type: \"Powtrz\",\r\n\t\trepeat_radio_month_start: \"W\",\r\n\t\trepeat_text_month_day: \"dnia kadego\",\r\n\t\trepeat_text_month_count: \"miesica\",\r\n\t\trepeat_text_month_count2_before: \"kadego\",\r\n\t\trepeat_text_month_count2_after: \"miesica\",\r\n\t\trepeat_year_label: \"W\",\r\n\t\tselect_year_day2: \"miesica\",\r\n\t\trepeat_text_year_day: \"dnia miesica\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Bez daty kocowej\",\r\n\t\trepeat_text_occurences_count: \"wystpieniu/ach\",\r\n\t\trepeat_radio_end3: \"Zakocz w\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\r\n\t\trepeat_never: \"Nigdy\",\r\n\t\trepeat_daily: \"Codziennie\",\r\n\t\trepeat_workdays: \"Każdy dzień roboczy\",\r\n\t\trepeat_weekly: \"Co tydzień\",\r\n\t\trepeat_monthly: \"Co miesiąc\",\r\n\t\trepeat_yearly: \"Co rok\",\r\n\t\trepeat_custom: \"Niestandardowy\",\r\n\t\trepeat_freq_day: \"Dzień\",\r\n\t\trepeat_freq_week: \"Tydzień\",\r\n\t\trepeat_freq_month: \"Miesiąc\",\r\n\t\trepeat_freq_year: \"Rok\",\r\n\t\trepeat_on_date: \"W dniu\",\r\n\t\trepeat_ends: \"Kończy się\",\r\n\r\n\t\tmonth_for_recurring: [\"Stycznia\", \"Lutego\", \"Marca\", \"Kwietnia\", \"Maja\", \"Czerwca\", \"Lipca\", \"Sierpnia\", \"Wrzenia\", \"Padziernka\", \"Listopada\", \"Grudnia\"],\r\n\t\tday_for_recurring: [\"Niedziela\", \"Poniedziaek\", \"Wtorek\", \"roda\", \"Czwartek\", \"Pitek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","/*\r\n\r\n TRANSLATION BY MATTHEUS PIROVANI RORIZ GONЗALVES\r\n\r\n mattheusroriz@hotmail.com / mattheus.pirovani@gmail.com /\r\n\r\n www.atrixian.com.br\r\n\r\n */\r\n\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Janeiro\", \"Fevereiro\", \"Março\", \"Abril\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"],\r\n\t\tmonth_short: [\"Jan\", \"Fev\", \"Mar\", \"Abr\", \"Mai\", \"Jun\", \"Jul\", \"Ago\", \"Set\", \"Out\", \"Nov\", \"Dez\"],\r\n\t\tday_full: [\"Domingo\", \"Segunda\", \"Terça\", \"Quarta\", \"Quinta\", \"Sexta\", \"Sábado\"],\r\n\t\tday_short: [\"Dom\", \"Seg\", \"Ter\", \"Qua\", \"Qui\", \"Sex\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hoje\",\r\n\t\tday_tab: \"Dia\",\r\n\t\tweek_tab: \"Semana\",\r\n\t\tmonth_tab: \"Mês\",\r\n\t\tnew_event: \"Novo evento\",\r\n\t\ticon_save: \"Salvar\",\r\n\t\ticon_cancel: \"Cancelar\",\r\n\t\ticon_details: \"Detalhes\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Deletar\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Tem certeza que deseja excluir?\",\r\n\t\tsection_description: \"Descrição\",\r\n\t\tsection_time: \"Período de tempo\",\r\n\t\tfull_day: \"Dia inteiro\",\r\n\r\n\t\tconfirm_recurring: \"Deseja editar todos esses eventos repetidos?\",\r\n\t\tsection_recurring: \"Repetir evento\",\r\n\t\tbutton_recurring: \"Desabilitar\",\r\n\t\tbutton_recurring_open: \"Habilitar\",\r\n\t\tbutton_edit_series: \"Editar a série\",\r\n\t\tbutton_edit_occurrence: \"Editar uma cópia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dia\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descrição\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Ano\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dia\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grade\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diário\",\r\n\t\trepeat_radio_week: \"Semanal\",\r\n\t\trepeat_radio_month: \"Mensal\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia(s)\",\r\n\t\trepeat_radio_day_type2: \"Cada trabalho diário\",\r\n\t\trepeat_week: \" Repita cada\",\r\n\t\trepeat_text_week_count: \"semana:\",\r\n\t\trepeat_radio_month_type: \"Repetir\",\r\n\t\trepeat_radio_month_start: \"Em\",\r\n\t\trepeat_text_month_day: \"todo dia\",\r\n\t\trepeat_text_month_count: \"mês\",\r\n\t\trepeat_text_month_count2_before: \"todo\",\r\n\t\trepeat_text_month_count2_after: \"mês\",\r\n\t\trepeat_year_label: \"Em\",\r\n\t\tselect_year_day2: \"of\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mês\",\r\n\t\trepeat_radio_end: \"Sem data final\",\r\n\t\trepeat_text_occurences_count: \"ocorrências\",\r\n\t\trepeat_radio_end3: \"Fim\",\r\n\t\trepeat_radio_end2: \"Depois\",\r\n\r\n\t\trepeat_never: \"Nunca\",\r\n\t\trepeat_daily: \"Todos os dias\",\r\n\t\trepeat_workdays: \"Todos os dias úteis\",\r\n\t\trepeat_weekly: \"Toda semana\",\r\n\t\trepeat_monthly: \"Todo mês\",\r\n\t\trepeat_yearly: \"Todo ano\",\r\n\t\trepeat_custom: \"Personalizado\",\r\n\t\trepeat_freq_day: \"Dia\",\r\n\t\trepeat_freq_week: \"Semana\",\r\n\t\trepeat_freq_month: \"Mês\",\r\n\t\trepeat_freq_year: \"Ano\",\r\n\t\trepeat_on_date: \"Na data\",\r\n\t\trepeat_ends: \"Termina\",\r\n\r\n\t\tmonth_for_recurring: [\"Janeiro\", \"Fevereiro\", \"Março\", \"Abril\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"],\r\n\t\tday_for_recurring: [\"Domingo\", \"Segunda\", \"Terça\", \"Quarta\", \"Quinta\", \"Sexta\", \"Sábado\"]\r\n\t}\r\n};\r\n\r\n\r\n","/*\r\n\tTraducere de Ovidiu Lixandru: http://www.madball.ro\r\n */\r\n\r\nexport default {\r\n\tdate:{\r\n\t\tmonth_full:[\"Ianuarie\", \"Februarie\", \"Martie\", \"Aprilie\", \"Mai\", \"Iunie\", \"Iulie\", \"August\", \"Septembrie\", \"Octombrie\", \"November\", \"December\"],\r\n\t\tmonth_short:[\"Ian\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Iun\", \"Iul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n\t\tday_full:[\"Duminica\", \"Luni\", \"Marti\", \"Miercuri\", \"Joi\", \"Vineri\", \"Sambata\"],\r\n\t\tday_short:[\"Du\", \"Lu\", \"Ma\", \"Mi\", \"Jo\", \"Vi\", \"Sa\"]\r\n\t},\r\n\tlabels:{\r\n\t\tdhx_cal_today_button:\"Astazi\",\r\n\t\tday_tab:\"Zi\",\r\n\t\tweek_tab:\"Saptamana\",\r\n\t\tmonth_tab:\"Luna\",\r\n\t\tnew_event:\"Eveniment nou\",\r\n\t\ticon_save:\"Salveaza\",\r\n\t\ticon_cancel:\"Anuleaza\",\r\n\t\ticon_details:\"Detalii\",\r\n\t\ticon_edit:\"Editeaza\",\r\n\t\ticon_delete:\"Sterge\",\r\n\t\tconfirm_closing:\"Schimbarile nu vor fi salvate, esti sigur?\",//Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting:\"Evenimentul va fi sters permanent, esti sigur?\",\r\n\t\tsection_description:\"Descriere\",\r\n\t\tsection_time:\"Interval\",\r\n\t\tfull_day:\"Toata ziua\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring:\"Vrei sa editezi toata seria de evenimente repetate?\",\r\n\t\tsection_recurring:\"Repetare\",\r\n\t\tbutton_recurring:\"Dezactivata\",\r\n\t\tbutton_recurring_open:\"Activata\",\r\n\t\tbutton_edit_series: \"Editeaza serie\",\r\n\t\tbutton_edit_occurrence: \"Editeaza doar intrare\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"Agenda\",\r\n\t\tdate:\"Data\",\r\n\t\tdescription:\"Descriere\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"An\",\r\n\r\n\t\t/* week agenda extension */\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Lista\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Zilnic\",\r\n\t\trepeat_radio_week: \"Saptamanal\",\r\n\t\trepeat_radio_month: \"Lunar\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"La fiecare\",\r\n\t\trepeat_text_day_count: \"zi(le)\",\r\n\t\trepeat_radio_day_type2: \"Fiecare zi lucratoare\",\r\n\t\trepeat_week: \" Repeta la fiecare\",\r\n\t\trepeat_text_week_count: \"saptamana in urmatoarele zile:\",\r\n\t\trepeat_radio_month_type: \"Repeta in\",\r\n\t\trepeat_radio_month_start: \"In a\",\r\n\t\trepeat_text_month_day: \"zi la fiecare\",\r\n\t\trepeat_text_month_count: \"luni\",\r\n\t\trepeat_text_month_count2_before: \"la fiecare\",\r\n\t\trepeat_text_month_count2_after: \"luni\",\r\n\t\trepeat_year_label: \"In\",\r\n\t\tselect_year_day2: \"a lunii\",\r\n\t\trepeat_text_year_day: \"zi a lunii\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Fara data de sfarsit\",\r\n\t\trepeat_text_occurences_count: \"evenimente\",\r\n\t\trepeat_radio_end3: \"La data\",\r\n\t\trepeat_radio_end2: \"Dupa\",\r\n\r\n\t\trepeat_never: \"Niciodată\",\r\n\t\trepeat_daily: \"În fiecare zi\",\r\n\t\trepeat_workdays: \"În fiecare zi lucrătoare\",\r\n\t\trepeat_weekly: \"În fiecare săptămână\",\r\n\t\trepeat_monthly: \"În fiecare lună\",\r\n\t\trepeat_yearly: \"În fiecare an\",\r\n\t\trepeat_custom: \"Personalizat\",\r\n\t\trepeat_freq_day: \"Zi\",\r\n\t\trepeat_freq_week: \"Săptămână\",\r\n\t\trepeat_freq_month: \"Lună\",\r\n\t\trepeat_freq_year: \"An\",\r\n\t\trepeat_on_date: \"La data\",\r\n\t\trepeat_ends: \"Se termină\",\r\n\r\n\t\tmonth_for_recurring: [\"Ianuarie\", \"Februarie\", \"Martie\", \"Aprilie\", \"Mai\", \"Iunie\", \"Iulie\", \"August\", \"Septembrie\", \"Octombrie\", \"Noiembrie\", \"Decembrie\"],\r\n\t\tday_for_recurring: [\"Duminica\", \"Luni\", \"Marti\", \"Miercuri\", \"Joi\", \"Vineri\", \"Sambata\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Январь\", \"Февраль\", \"Март\", \"Апрель\", \"Maй\", \"Июнь\", \"Июль\", \"Август\", \"Сентябрь\", \"Oктябрь\", \"Ноябрь\", \"Декабрь\"],\r\n\t\tmonth_short: [\"Янв\", \"Фев\", \"Maр\", \"Aпр\", \"Maй\", \"Июн\", \"Июл\", \"Aвг\", \"Сен\", \"Окт\", \"Ноя\", \"Дек\"],\r\n\t\tday_full: [ \"Воскресенье\", \"Понедельник\", \"Вторник\", \"Среда\", \"Четверг\", \"Пятница\", \"Суббота\"],\r\n\t\tday_short: [\"Вс\", \"Пн\", \"Вт\", \"Ср\", \"Чт\", \"Пт\", \"Сб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сегодня\",\r\n\t\tday_tab: \"День\",\r\n\t\tweek_tab: \"Неделя\",\r\n\t\tmonth_tab: \"Месяц\",\r\n\t\tnew_event: \"Новое событие\",\r\n\t\ticon_save: \"Сохранить\",\r\n\t\ticon_cancel: \"Отменить\",\r\n\t\ticon_details: \"Детали\",\r\n\t\ticon_edit: \"Изменить\",\r\n\t\ticon_delete: \"Удалить\",\r\n\t\tconfirm_closing: \"\", //Ваши изменения будут потеряны, продолжить?\r\n\t\tconfirm_deleting: \"Событие будет удалено безвозвратно, продолжить?\",\r\n\t\tsection_description: \"Описание\",\r\n\t\tsection_time: \"Период времени\",\r\n\t\tfull_day: \"Весь день\",\r\n\r\n\t\tconfirm_recurring: \"Вы хотите изменить всю серию повторяющихся событий?\",\r\n\t\tsection_recurring: \"Повторение\",\r\n\t\tbutton_recurring: \"Отключено\",\r\n\t\tbutton_recurring_open: \"Включено\",\r\n\t\tbutton_edit_series: \"Редактировать серию\",\r\n\t\tbutton_edit_occurrence: \"Редактировать экземпляр\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Список\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Описание\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Год\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Список\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Таблица\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"День\",\r\n\t\trepeat_radio_week: \"Неделя\",\r\n\t\trepeat_radio_month: \"Месяц\",\r\n\t\trepeat_radio_year: \"Год\",\r\n\t\trepeat_radio_day_type: \"Каждый\",\r\n\t\trepeat_text_day_count: \"день\",\r\n\t\trepeat_radio_day_type2: \"Каждый рабочий день\",\r\n\t\trepeat_week: \" Повторять каждую\",\r\n\t\trepeat_text_week_count: \"неделю , в:\",\r\n\t\trepeat_radio_month_type: \"Повторять\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" числа каждый \",\r\n\t\trepeat_text_month_count: \"месяц\",\r\n\t\trepeat_text_month_count2_before: \"каждый \",\r\n\t\trepeat_text_month_count2_after: \"месяц\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"день\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без даты окончания\",\r\n\t\trepeat_text_occurences_count: \"повторений\",\r\n\t\trepeat_radio_end3: \"До \",\r\n\t\trepeat_radio_end2: \"\",\r\n\r\n\t\trepeat_never: \"Никогда\",\r\n\t\trepeat_daily: \"Каждый день\",\r\n\t\trepeat_workdays: \"Каждый будний день\",\r\n\t\trepeat_weekly: \"Каждую неделю\",\r\n\t\trepeat_monthly: \"Каждый месяц\",\r\n\t\trepeat_yearly: \"Каждый год\",\r\n\t\trepeat_custom: \"Настроить\",\r\n\t\trepeat_freq_day: \"День\",\r\n\t\trepeat_freq_week: \"Неделя\",\r\n\t\trepeat_freq_month: \"Месяц\",\r\n\t\trepeat_freq_year: \"Год\",\r\n\t\trepeat_on_date: \"В дату\",\r\n\t\trepeat_ends: \"Заканчивается\",\r\n\r\n\t\tmonth_for_recurring: [\"Января\", \"Февраля\", \"Марта\", \"Апреля\", \"Мая\", \"Июня\", \"Июля\", \"Августа\", \"Сентября\", \"Октября\", \"Ноября\", \"Декабря\"],\r\n\t\tday_for_recurring: [\"Воскресенье\", \"Понедельник\", \"Вторник\", \"Среду\", \"Четверг\", \"Пятницу\", \"Субботу\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Marec\", \"April\", \"Maj\", \"Junij\", \"Julij\", \"Avgust\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Nedelja\", \"Ponedeljek\", \"Torek\", \"Sreda\", \"Četrtek\", \"Petek\", \"Sobota\"],\r\n\t\tday_short: [\"Ned\", \"Pon\", \"Tor\", \"Sre\", \"Čet\", \"Pet\", \"Sob\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Danes\",\r\n\t\tday_tab: \"Dan\",\r\n\t\tweek_tab: \"Teden\",\r\n\t\tmonth_tab: \"Mesec\",\r\n\t\tnew_event: \"Nov dogodek\",\r\n\t\ticon_save: \"Shrani\",\r\n\t\ticon_cancel: \"Prekliči\",\r\n\t\ticon_details: \"Podrobnosti\",\r\n\t\ticon_edit: \"Uredi\",\r\n\t\ticon_delete: \"Izbriši\",\r\n\t\tconfirm_closing: \"\", //Spremembe ne bodo shranjene. Želite nadaljevati ?\r\n\t\tconfirm_deleting: \"Dogodek bo izbrisan. Želite nadaljevati?\",\r\n\t\tsection_description: \"Opis\",\r\n\t\tsection_time: \"Časovni okvir\",\r\n\t\tfull_day: \"Ves dan\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Želite urediti celoten set ponavljajočih dogodkov?\",\r\n\t\tsection_recurring: \"Ponovi dogodek\",\r\n\t\tbutton_recurring: \"Onemogočeno\",\r\n\t\tbutton_recurring_open: \"Omogočeno\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Edit occurrence\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Zadeva\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Opis\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Leto\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Zadeva\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Miza\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dnevno\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Tedensko\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Mesečno\",\r\n\t\trepeat_radio_year: \"Letno\",\r\n\t\trepeat_radio_day_type: \"Vsak\",\r\n\t\trepeat_text_day_count: \"dan\",\r\n\t\trepeat_radio_day_type2: \"Vsak delovni dan\",\r\n\t\trepeat_week: \" Ponavljaj vsak\",\r\n\t\trepeat_text_week_count: \"teden na naslednje dni:\",\r\n\t\trepeat_radio_month_type: \"Ponavljaj\",\r\n\t\trepeat_radio_month_start: \"Na\",\r\n\t\trepeat_text_month_day: \"dan vsak\",\r\n\t\trepeat_text_month_count: \"mesec\",\r\n\t\trepeat_text_month_count2_before: \"vsak\",\r\n\t\trepeat_text_month_count2_after: \"mesec\",\r\n\t\trepeat_year_label: \"Na\",\r\n\t\tselect_year_day2: \"od\",\r\n\t\trepeat_text_year_day: \"dan\",\r\n\t\tselect_year_month: \"mesec\",\r\n\t\trepeat_radio_end: \"Brez končnega datuma\",\r\n\t\trepeat_text_occurences_count: \"pojavitve\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\t\trepeat_radio_end3: \"Končaj do\",\r\n\r\n\t\trepeat_never: \"Nikoli\",\r\n\t\trepeat_daily: \"Vsak dan\",\r\n\t\trepeat_workdays: \"Vsak delovni dan\",\r\n\t\trepeat_weekly: \"Vsak teden\",\r\n\t\trepeat_monthly: \"Vsak mesec\",\r\n\t\trepeat_yearly: \"Vsako leto\",\r\n\t\trepeat_custom: \"Po meri\",\r\n\t\trepeat_freq_day: \"Dan\",\r\n\t\trepeat_freq_week: \"Teden\",\r\n\t\trepeat_freq_month: \"Mesec\",\r\n\t\trepeat_freq_year: \"Leto\",\r\n\t\trepeat_on_date: \"Na datum\",\r\n\t\trepeat_ends: \"Konča se\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"Marec\", \"April\", \"Maj\", \"Junij\", \"Julij\", \"Avgust\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Nedelja\", \"Ponedeljek\", \"Torek\", \"Sreda\", \"Četrtek\", \"Petek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Január\", \"Február\", \"Marec\", \"Apríl\", \"Máj\", \"Jún\", \"Júl\", \"August\", \"September\", \"Október\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Máj\", \"Jún\", \"Júl\", \"Aug\", \"Sept\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Nedeľa\", \"Pondelok\", \"Utorok\", \"Streda\", \"Štvrtok\", \"Piatok\", \"Sobota\"],\r\n\t\tday_short: [\"Ne\", \"Po\", \"Ut\", \"St\", \"Št\", \"Pi\", \"So\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dnes\",\r\n\t\tday_tab: \"Deň\",\r\n\t\tweek_tab: \"Týždeň\",\r\n\t\tmonth_tab: \"Mesiac\",\r\n\t\tnew_event: \"Nová udalosť\",\r\n\t\ticon_save: \"Uložiť\",\r\n\t\ticon_cancel: \"Späť\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edituj\",\r\n\t\ticon_delete: \"Zmazať\",\r\n\t\tconfirm_closing: \"Vaše zmeny nebudú uložené. Skutočne?\", //Vaše změny budou ztraceny, opravdu ?\r\n\t\tconfirm_deleting: \"Udalosť bude natrvalo vymazaná. Skutočne?\",\r\n\t\tsection_description: \"Poznámky\",\r\n\t\tsection_time: \"Doba platnosti\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Prajete si upraviť celú radu opakovaných udalostí?\",\r\n\t\tsection_recurring: \"Opakovanie udalosti\",\r\n\t\tbutton_recurring: \"Vypnuté\",\r\n\t\tbutton_recurring_open: \"Zapnuté\",\r\n\t\tbutton_edit_series: \"Upraviť opakovania\",\r\n\t\tbutton_edit_occurrence: \"Upraviť inštancie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Program\",\r\n\t\tdate: \"Dátum\",\r\n\t\tdescription: \"Poznámka\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\t\tfull_day: \"Celý deň\", // Full day\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Program\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Mriežka\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Denne\",\r\n\t\trepeat_radio_week: \"Týždenne\",\r\n\t\trepeat_radio_month: \"Mesaène\",\r\n\t\trepeat_radio_year: \"Roène\",\r\n\t\trepeat_radio_day_type: \"Každý\",\r\n\t\trepeat_text_day_count: \"deò\",\r\n\t\trepeat_radio_day_type2: \"Každý prac. deò\",\r\n\t\trepeat_week: \"Opakova každý\",\r\n\t\trepeat_text_week_count: \"týždeò v dòoch:\",\r\n\t\trepeat_radio_month_type: \"Opakova\",\r\n\t\trepeat_radio_month_start: \"On\",\r\n\t\trepeat_text_month_day: \"deò každý\",\r\n\t\trepeat_text_month_count: \"mesiac\",\r\n\t\trepeat_text_month_count2_before: \"každý\",\r\n\t\trepeat_text_month_count2_after: \"mesiac\",\r\n\t\trepeat_year_label: \"On\",\r\n\t\tselect_year_day2: \"poèas\",\r\n\t\trepeat_text_year_day: \"deò\",\r\n\t\tselect_year_month: \"mesiac\",\r\n\t\trepeat_radio_end: \"Bez dátumu ukonèenia\",\r\n\t\trepeat_text_occurences_count: \"udalostiach\",\r\n\t\trepeat_radio_end3: \"Ukonèi\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\r\n\t\trepeat_never: \"Nikdy\",\r\n\t\trepeat_daily: \"Každý deň\",\r\n\t\trepeat_workdays: \"Každý pracovný deň\",\r\n\t\trepeat_weekly: \"Každý týždeň\",\r\n\t\trepeat_monthly: \"Každý mesiac\",\r\n\t\trepeat_yearly: \"Každý rok\",\r\n\t\trepeat_custom: \"Vlastné\",\r\n\t\trepeat_freq_day: \"Deň\",\r\n\t\trepeat_freq_week: \"Týždeň\",\r\n\t\trepeat_freq_month: \"Mesiac\",\r\n\t\trepeat_freq_year: \"Rok\",\r\n\t\trepeat_on_date: \"Na dátum\",\r\n\t\trepeat_ends: \"Koniec\",\r\n\r\n\t\tmonth_for_recurring: [\"Január\", \"Február\", \"Marec\", \"Apríl\", \"Máj\", \"Jún\", \"Júl\", \"August\", \"September\", \"Október\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Nede¾a\", \"Pondelok\", \"Utorok\", \"Streda\", \"Štvrtok\", \"Piatok\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Mars\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"Augusti\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Söndag\", \"Måndag\", \"Tisdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lördag\"],\r\n\t\tday_short: [\"Sön\", \"Mån\", \"Tis\", \"Ons\", \"Tor\", \"Fre\", \"Lör\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Vecka\",\r\n\t\tmonth_tab: \"Månad\",\r\n\t\tnew_event: \"Ny händelse\",\r\n\t\ticon_save: \"Spara\",\r\n\t\ticon_cancel: \"Ångra\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Ändra\",\r\n\t\ticon_delete: \"Ta bort\",\r\n\t\tconfirm_closing: \"\", //Dina förändingar kommer gå förlorade, är du säker?\r\n\t\tconfirm_deleting: \"Är du säker på att du vill ta bort händelsen permanent?\",\r\n\t\tsection_description: \"Beskrivning\",\r\n\t\tsection_time: \"Tid\",\r\n\t\tfull_day: \"Hela dagen\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vill du redigera hela serien med repeterande händelser?\",\r\n\t\tsection_recurring: \"Upprepa händelse\",\r\n\t\tbutton_recurring: \"Inaktiverat\",\r\n\t\tbutton_recurring_open: \"Aktiverat\",\r\n\t\tbutton_edit_series: \"Redigera serien\",\r\n\t\tbutton_edit_occurrence: \"Redigera en kopia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dagordning\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Beskrivning\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dagordning\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Galler\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Dra för att skapa ny\",\r\n\t\tdrag_to_move:\"Dra för att flytta\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dagligen\",\r\n\t\trepeat_radio_week: \"Veckovis\",\r\n\t\trepeat_radio_month: \"Månadsvis\",\r\n\t\trepeat_radio_year: \"Årligen\",\r\n\t\trepeat_radio_day_type: \"Var\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Varje arbetsdag\",\r\n\t\trepeat_week: \" Upprepa var\",\r\n\t\trepeat_text_week_count: \"vecka dessa dagar:\",\r\n\t\trepeat_radio_month_type: \"Upprepa\",\r\n\t\trepeat_radio_month_start: \"Den\",\r\n\t\trepeat_text_month_day: \"dagen var\",\r\n\t\trepeat_text_month_count: \"månad\",\r\n\t\trepeat_text_month_count2_before: \"var\",\r\n\t\trepeat_text_month_count2_after: \"månad\",\r\n\t\trepeat_year_label: \"Den\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"månad\",\r\n\t\trepeat_radio_end: \"Inget slutdatum\",\r\n\t\trepeat_text_occurences_count: \"upprepningar\",\r\n\t\trepeat_radio_end3: \"Sluta efter\",\r\n\t\trepeat_radio_end2: \"Efter\",\r\n\r\n\t\trepeat_never: \"Aldrig\",\r\n\t\trepeat_daily: \"Varje dag\",\r\n\t\trepeat_workdays: \"Varje vardag\",\r\n\t\trepeat_weekly: \"Varje vecka\",\r\n\t\trepeat_monthly: \"Varje månad\",\r\n\t\trepeat_yearly: \"Varje år\",\r\n\t\trepeat_custom: \"Anpassad\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Vecka\",\r\n\t\trepeat_freq_month: \"Månad\",\r\n\t\trepeat_freq_year: \"År\",\r\n\t\trepeat_on_date: \"På datum\",\r\n\t\trepeat_ends: \"Slutar\",\r\n\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Mars\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"Augusti\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Söndag\", \"Måndag\", \"Tisdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lördag\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Ocak\", \"Þubat\", \"Mart\", \"Nisan\", \"Mayýs\", \"Haziran\", \"Temmuz\", \"Aðustos\", \"Eylül\", \"Ekim\", \"Kasým\", \"Aralýk\"],\r\n\t\tmonth_short: [\"Oca\", \"Þub\", \"Mar\", \"Nis\", \"May\", \"Haz\", \"Tem\", \"Aðu\", \"Eyl\", \"Eki\", \"Kas\", \"Ara\"],\r\n\t\tday_full: [\"Pazar\", \"Pazartes,\", \"Salý\", \"Çarþamba\", \"Perþembe\", \"Cuma\", \"Cumartesi\"],\r\n\t\tday_short: [\"Paz\", \"Pts\", \"Sal\", \"Çar\", \"Per\", \"Cum\", \"Cts\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Bugün\",\r\n\t\tday_tab: \"Gün\",\r\n\t\tweek_tab: \"Hafta\",\r\n\t\tmonth_tab: \"Ay\",\r\n\t\tnew_event: \"Uygun\",\r\n\t\ticon_save: \"Kaydet\",\r\n\t\ticon_cancel: \"Ýptal\",\r\n\t\ticon_details: \"Detaylar\",\r\n\t\ticon_edit: \"Düzenle\",\r\n\t\ticon_delete: \"Sil\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Etkinlik silinecek, devam?\",\r\n\t\tsection_description: \"Açýklama\",\r\n\t\tsection_time: \"Zaman aralýðý\",\r\n\t\tfull_day: \"Tam gün\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Tüm tekrar eden etkinlikler silinecek, devam?\",\r\n\t\tsection_recurring: \"Etkinliði tekrarla\",\r\n\t\tbutton_recurring: \"Pasif\",\r\n\t\tbutton_recurring_open: \"Aktif\",\r\n\t\tbutton_edit_series: \"Dizi düzenleme\",\r\n\t\tbutton_edit_occurrence: \"Bir kopyasını düzenleyin\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Ajanda\",\r\n\t\tdate: \"Tarih\",\r\n\t\tdescription: \"Açýklama\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Yýl\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Ajanda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Izgara\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Günlük\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Haftalık\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Aylık\",\r\n\t\trepeat_radio_year: \"Yıllık\",\r\n\t\trepeat_radio_day_type: \"Her\",\r\n\t\trepeat_text_day_count: \"gün\",\r\n\t\trepeat_radio_day_type2: \"Her iş günü\",\r\n\t\trepeat_week: \" Tekrar her\",\r\n\t\trepeat_text_week_count: \"hafta şu günlerde:\",\r\n\t\trepeat_radio_month_type: \"Tekrar et\",\r\n\t\trepeat_radio_month_start: \"Tarihinde\",\r\n\t\trepeat_text_month_day: \"gün her\",\r\n\t\trepeat_text_month_count: \"ay\",\r\n\t\trepeat_text_month_count2_before: \"her\",\r\n\t\trepeat_text_month_count2_after: \"ay\",\r\n\t\trepeat_year_label: \"Tarihinde\",\r\n\t\tselect_year_day2: \"ayın\",\r\n\t\trepeat_text_year_day: \"günü\",\r\n\t\tselect_year_month: \"ay\",\r\n\t\trepeat_radio_end: \"Bitiş tarihi yok\",\r\n\t\trepeat_text_occurences_count: \"olay\",\r\n\t\trepeat_radio_end2: \"Sonra\",\r\n\t\trepeat_radio_end3: \"Tarihinde bitir\",\r\n\r\n\t\trepeat_never: \"Asla\",\r\n\t\trepeat_daily: \"Her gün\",\r\n\t\trepeat_workdays: \"Her iş günü\",\r\n\t\trepeat_weekly: \"Her hafta\",\r\n\t\trepeat_monthly: \"Her ay\",\r\n\t\trepeat_yearly: \"Her yıl\",\r\n\t\trepeat_custom: \"Özel\",\r\n\t\trepeat_freq_day: \"Gün\",\r\n\t\trepeat_freq_week: \"Hafta\",\r\n\t\trepeat_freq_month: \"Ay\",\r\n\t\trepeat_freq_year: \"Yıl\",\r\n\t\trepeat_on_date: \"Tarihinde\",\r\n\t\trepeat_ends: \"Biter\",\r\n\r\n\t\tmonth_for_recurring: [\"Ocak\", \"Şubat\", \"Mart\", \"Nisan\", \"Mayıs\", \"Haziran\", \"Temmuz\", \"Ağustos\", \"Eylül\", \"Ekim\", \"Kasım\", \"Aralık\"],\r\n\t\tday_for_recurring: [\"Pazar\", \"Pazartesi\", \"Salı\", \"Çarşamba\", \"Perşembe\", \"Cuma\", \"Cumartesi\"]\r\n\t}\r\n};","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Січень\", \"Лютий\", \"Березень\", \"Квітень\", \"Травень\", \"Червень\", \"Липень\", \"Серпень\", \"Вересень\", \"Жовтень\", \"Листопад\", \"Грудень\"],\r\n\t\tmonth_short: [\"Січ\", \"Лют\", \"Бер\", \"Кві\", \"Тра\", \"Чер\", \"Лип\", \"Сер\", \"Вер\", \"Жов\", \"Лис\", \"Гру\"],\r\n\t\tday_full: [\"Неділя\", \"Понеділок\", \"Вівторок\", \"Середа\", \"Четвер\", \"П'ятниця\", \"Субота\"],\r\n\t\tday_short: [\"Нед\", \"Пон\", \"Вів\", \"Сер\", \"Чет\", \"Птн\", \"Суб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сьогодні\",\r\n\t\tday_tab: \"День\",\r\n\t\tweek_tab: \"Тиждень\",\r\n\t\tmonth_tab: \"Місяць\",\r\n\t\tnew_event: \"Нова подія\",\r\n\t\ticon_save: \"Зберегти\",\r\n\t\ticon_cancel: \"Відміна\",\r\n\t\ticon_details: \"Деталі\",\r\n\t\ticon_edit: \"Редагувати\",\r\n\t\ticon_delete: \"Вилучити\",\r\n\t\tconfirm_closing: \"\", //Ваші зміни втратяться. Ви впевнені ?\r\n\t\tconfirm_deleting: \"Подія вилучиться назавжди. Ви впевнені?\",\r\n\t\tsection_description: \"Опис\",\r\n\t\tsection_time: \"Часовий проміжок\",\r\n\t\tfull_day: \"Весь день\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Хочете редагувати весь перелік повторюваних подій?\",\r\n\t\tsection_recurring: \"Повторювана подія\",\r\n\t\tbutton_recurring: \"Відключено\",\r\n\t\tbutton_recurring_open: \"Включено\",\r\n\t\tbutton_edit_series: \"Редагувати серію\",\r\n\t\tbutton_edit_occurrence: \"Редагувати примірник\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Перелік\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Опис\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Рік\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Перелік\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Таблиця\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"День\",\r\n\t\trepeat_radio_week: \"Тиждень\",\r\n\t\trepeat_radio_month: \"Місяць\",\r\n\t\trepeat_radio_year: \"Рік\",\r\n\t\trepeat_radio_day_type: \"Кожний\",\r\n\t\trepeat_text_day_count: \"день\",\r\n\t\trepeat_radio_day_type2: \"Кожний робочий день\",\r\n\t\trepeat_week: \" Повторювати кожен\",\r\n\t\trepeat_text_week_count: \"тиждень , по:\",\r\n\t\trepeat_radio_month_type: \"Повторювати\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" числа кожний \",\r\n\t\trepeat_text_month_count: \"місяць\",\r\n\t\trepeat_text_month_count2_before: \"кожен \",\r\n\t\trepeat_text_month_count2_after: \"місяць\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"день\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без дати закінчення\",\r\n\t\trepeat_text_occurences_count: \"повторень\",\r\n\t\trepeat_radio_end3: \"До \",\r\n\t\trepeat_radio_end2: \"\",\r\n\r\n\t\trepeat_never: \"Ніколи\",\r\n\t\trepeat_daily: \"Щодня\",\r\n\t\trepeat_workdays: \"Щодня в робочі дні\",\r\n\t\trepeat_weekly: \"Щотижня\",\r\n\t\trepeat_monthly: \"Щомісяця\",\r\n\t\trepeat_yearly: \"Щороку\",\r\n\t\trepeat_custom: \"Налаштоване\",\r\n\t\trepeat_freq_day: \"День\",\r\n\t\trepeat_freq_week: \"Тиждень\",\r\n\t\trepeat_freq_month: \"Місяць\",\r\n\t\trepeat_freq_year: \"Рік\",\r\n\t\trepeat_on_date: \"На дату\",\r\n\t\trepeat_ends: \"Закінчується\",\r\n\r\n\t\tmonth_for_recurring: [\"січня\", \"лютого\", \"березня\", \"квітня\", \"травня\", \"червня\", \"липня\", \"серпня\", \"вересня\", \"жовтня\", \"листопада\", \"грудня\"],\r\n\t\tday_for_recurring: [\"Неділям\", \"Понеділкам\", \"Вівторкам\", \"Середам\", \"Четвергам\", \"П'ятницям\", \"Суботам\"]\r\n\t}\r\n};\r\n","import eventable from \"../utils/eventable\";\r\n\r\nexport class DatePicker {\r\n\tconstructor(scheduler, container, state = {}) {\r\n\t\tthis.state = {\r\n\t\t\tdate: new Date(),\r\n\t\t\tmodes: ['days', 'months', 'years'],\r\n\t\t\tcurrentRange: [],\r\n\t\t\teventDates: [],\r\n\t\t\tcurrentModeIndex: 0,\r\n\t\t\t...state\r\n\t\t};\r\n\t\tthis.container = null;\r\n\t\tthis.element = null;\r\n\t\tthis.onStateChangeHandlers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t\tthis._domEvents = scheduler._createDomEventScope();\r\n\t\tthis.state = this.getState();\r\n\t\teventable(this);\r\n\t\tif(container){\r\n\r\n\t\t\tthis.container = container;\r\n\t\t\tthis.render(this.container);\r\n\t\t}\r\n\r\n\t\tthis.onStateChange((oldState, newState) => {\r\n\t\t\tthis.callEvent(\"onStateChange\", [newState, oldState]);\r\n\t\t});\r\n\t}\r\n\r\n\tgetState() {\r\n\t\treturn { \r\n\t\t\t...this.state,\r\n\t\t\tmode: this.state.modes[this.state.currentModeIndex]\r\n\t\t};\r\n\t}\r\n\r\n\tsetState(newState) {\r\n\t\tconst oldState = { ...this.state };\r\n\t\tif(newState.mode){\r\n\t\t\tnewState.currentModeIndex = this.state.modes.indexOf(newState.mode);\r\n\t\t}\r\n\t\tthis.state = { ...this.state, ...newState };\r\n\r\n\t\tthis._notifyStateChange(oldState, this.state);\r\n\r\n\t\tif (this.container) {\r\n\t\t\tthis.render(this.container);\r\n\t\t}\r\n\t}\r\n\r\n\tonStateChange(handler) {\r\n\t\tthis.onStateChangeHandlers.push(handler);\r\n\r\n\t\t// function to remove the handler\r\n\t\treturn () => {\r\n\t\t\tconst index = this.onStateChangeHandlers.indexOf(handler);\r\n\t\t\tif (index !== -1) {\r\n\t\t\t\tthis.onStateChangeHandlers.splice(index, 1);\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\r\n\t_notifyStateChange(oldState, newState) {\r\n\t\tthis.onStateChangeHandlers.forEach(handler => handler(oldState, newState));\r\n\t}\r\n\r\n\t_adjustDate(direction) {\r\n\r\n\t\tconst {mode, date} = this.getState();\r\n\t\tconst newDate = new Date(date);\r\n\t\tif (mode === 'days') {\r\n\t\t\tnewDate.setMonth(date.getMonth() + direction);\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tnewDate.setFullYear(date.getFullYear() + direction);\r\n\t\t} else {\r\n\t\t\tnewDate.setFullYear(date.getFullYear() + direction * 10);\r\n\t\t}\r\n\t\tthis.setState({ date: newDate });\r\n\t}\r\n\r\n\t_toggleMode() {\r\n\t\tconst newIndex = (this.state.currentModeIndex + 1) % this.state.modes.length;\r\n\t\tthis.setState({ currentModeIndex: newIndex });\r\n\t}\r\n\r\n\t_renderCalendarHeader(container) {\r\n\t\tconst {mode, date} = this.getState();\r\n\r\n\t\tconst header = document.createElement('div');\r\n\t\theader.classList.add('dhx_cal_datepicker_header');\r\n\r\n\t\tconst backwardArrow = document.createElement('button');\r\n\r\n\t\tbackwardArrow.classList.add(\"dhx_cal_datepicker_arrow\", \"scheduler_icon\", \"arrow_left\");\r\n\t\theader.appendChild(backwardArrow);\r\n\r\n\t\tconst monthLabel = document.createElement('div');\r\n\t\tmonthLabel.classList.add('dhx_cal_datepicker_title');\r\n\r\n\t\tif (mode === 'days') {\r\n\t\t\tmonthLabel.innerText = date.toLocaleString('default', { month: 'long' }) + ' ' + date.getFullYear();\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tmonthLabel.innerText = date.getFullYear();\r\n\t\t} else {\r\n\t\t\tconst startYear = Math.floor(date.getFullYear() / 10) * 10;\r\n\t\t\tmonthLabel.innerText = `${startYear} - ${startYear + 9}`;\r\n\t\t}\r\n\r\n\t\tthis._domEvents.attach(monthLabel, \"click\", this._toggleMode.bind(this));\r\n\t\theader.appendChild(monthLabel);\r\n\r\n\t\tconst forwardArrow = document.createElement('button');\r\n\r\n\t\tforwardArrow.classList.add(\"dhx_cal_datepicker_arrow\", \"scheduler_icon\", \"arrow_right\");\r\n\t\theader.appendChild(forwardArrow);\r\n\r\n\t\tcontainer.appendChild(header);\r\n\r\n\t\tthis._domEvents.attach(backwardArrow, \"click\", this._adjustDate.bind(this, -1));\r\n\t\tthis._domEvents.attach(forwardArrow, \"click\", this._adjustDate.bind(this, 1));\r\n\t}\r\n\r\n\trender(container) {\r\n\t\tthis._domEvents.detachAll();\r\n\t\tthis.container = container || this.container; \r\n\t\tthis.container.innerHTML = '';\r\n\r\n\t\tif(!this.element){\r\n\t\t\tthis.element = document.createElement(\"div\");\r\n\t\t\tthis.element.classList.add(\"dhx_cal_datepicker\");\r\n\t\t}\r\n\t\tthis.element.innerHTML = '';\r\n\t\tthis.container.appendChild(this.element);\r\n\r\n\t\tthis._renderCalendarHeader(this.element);\r\n\t\tconst dataContainer = document.createElement(\"div\");\r\n\t\tdataContainer.classList.add(\"dhx_cal_datepicker_data\");\r\n\t\tthis.element.appendChild(dataContainer);\r\n\r\n\t\tconst {mode} = this.getState();\r\n\t\tif (mode === 'days') {\r\n\t\t\tthis._renderDayGrid(dataContainer);\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tthis._renderMonthGrid(dataContainer);\r\n\t\t} else {\r\n\t\t\tthis._renderYearGrid(dataContainer);\r\n\t\t}\r\n\t}\r\n\r\n\t_renderDayGridHeader(daysOfWeekContainer) {\r\n\t\tconst {date} = this.getState();\r\n\t\tconst scheduler = this.scheduler;\r\n\r\n\t\tlet currentDate = scheduler.date.week_start(new Date(date));\r\n\t\tconst maxDate = scheduler.date.add(scheduler.date.week_start(new Date(date)), 1, 'week');\r\n\r\n\t\tdaysOfWeekContainer.classList.add('dhx_cal_datepicker_days');\r\n\r\n\t\tconst labelFormat = scheduler.date.date_to_str(\"%D\");\r\n\r\n\t\twhile (currentDate.valueOf() < maxDate.valueOf()) {\r\n\t\t\tconst label = labelFormat(currentDate);\r\n\r\n\t\t\tconst dayElement = document.createElement('div');\r\n\t\t\tdayElement.setAttribute(\"data-day\", currentDate.getDay());\r\n\t\t\tdayElement.classList.add('dhx_cal_datepicker_dayname');\r\n\t\t\tdayElement.innerText = label;\r\n\t\t\tdaysOfWeekContainer.appendChild(dayElement);\r\n\r\n\t\t\tcurrentDate = scheduler.date.add(currentDate, 1, 'day');\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t_weeksBetween(min, max) {\r\n\t\tconst scheduler = this.scheduler;\r\n\t\tlet weeks = 0;\r\n\t\tlet currWeek = new Date(min);\r\n\t\twhile(currWeek.valueOf() < max.valueOf()){\r\n\t\t\tweeks += 1;\r\n\t\t\tcurrWeek = scheduler.date.week_start(scheduler.date.add(currWeek, 1, \"week\"));\r\n\t\t}\r\n\t\treturn weeks;\r\n\t}\r\n\r\n\t_renderDayGrid(container) {\r\n\t\tconst {date, currentRange, eventDates, minWeeks} = this.getState();\r\n\r\n\t\tlet minSchedulerDate = currentRange[0];\r\n\t\tlet maxSchedulerDate = currentRange[1];\r\n\r\n\t\tconst eventDaysTable = eventDates.reduce((acc, date) => {\r\n\t\t\tconst dayStart = this.scheduler.date.day_start(new Date(date));\r\n\t\t\tacc[dayStart.valueOf()] = true;\r\n\t\t\treturn acc;\r\n\t\t}, {});\r\n\r\n\r\n\t\t// Render Days of the Week\r\n\t\tconst daysOfWeekContainer = document.createElement('div');\r\n\t\tthis._renderDayGridHeader(daysOfWeekContainer);\r\n\t\tcontainer.appendChild(daysOfWeekContainer);\r\n\r\n\t\tconst scheduler = this.scheduler;\r\n\t\tconst firstDate = scheduler.date.week_start(scheduler.date.month_start(new Date(date)));\r\n\t\tconst monthStart = scheduler.date.month_start(new Date(date));\r\n\t\tconst monthEnd = scheduler.date.add(scheduler.date.month_start(new Date(date)), 1, 'month');\r\n\t\tlet lastDate = scheduler.date.add(scheduler.date.month_start(new Date(date)), 1, 'month');\r\n\t\tconst currentCalDate = scheduler.date.date_part(scheduler._currentDate());\r\n\t\tif(lastDate.getDay() !== 0){\r\n\t\t\tlastDate = scheduler.date.add(scheduler.date.week_start(lastDate), 1, \"week\");\r\n\t\t}\r\n\r\n\t\tlet weeks = this._weeksBetween(firstDate, lastDate);\r\n\t\tif(minWeeks && weeks < minWeeks){\r\n\t\t\tlastDate = scheduler.date.add(lastDate, (minWeeks - weeks), \"week\");\r\n\t\t}\r\n\r\n\t\tlet currDate = firstDate;\r\n\r\n\t\tconst dayGridContainer = document.createElement('div');\r\n\t\tdayGridContainer.classList.add('dhx_cal_datepicker_days');\r\n\r\n\t\tthis._domEvents.attach(dayGridContainer, \"click\", (event) => {\r\n\t\t\tconst dateCell = event.target.closest(\"[data-cell-date]\");\r\n\t\t\tconst date = new Date(dateCell.getAttribute(\"data-cell-date\"));\r\n\t\t\tthis.callEvent(\"onDateClick\", [date, event]);\r\n\t\t});\r\n\r\n\t\twhile(currDate.valueOf() < lastDate.valueOf()){\r\n\t\t\tconst dayElement = document.createElement('div');\r\n\t\t\tdayElement.setAttribute(\"data-cell-date\", scheduler.templates.format_date(currDate));\r\n\t\t\tdayElement.setAttribute(\"data-day\", currDate.getDay());\r\n\t\t\tdayElement.innerHTML = currDate.getDate();\r\n\r\n\t\t\tif(currDate.valueOf() < monthStart.valueOf()){\r\n\t\t\t\tdayElement.classList.add('dhx_before');\r\n\t\t\t}else if(currDate.valueOf() >= monthEnd.valueOf()){\t\r\n\t\t\t\tdayElement.classList.add('dhx_after');\r\n\t\t\t}\r\n\r\n\t\t\tif(currDate.getDay() === 0 || currDate.getDay() === 6){\r\n\t\t\t\tdayElement.classList.add(\"dhx_cal_datepicker_weekend\");\r\n\t\t\t}\r\n\r\n\t\t\tif(currDate.valueOf() == currentCalDate.valueOf()){\r\n\t\t\t\tdayElement.classList.add(\"dhx_now\");\r\n\t\t\t}\r\n\r\n\t\t\tif(minSchedulerDate && maxSchedulerDate){\r\n\t\t\t\tif(currDate.valueOf() >= minSchedulerDate.valueOf() && currDate.valueOf() < maxSchedulerDate.valueOf()){\r\n\t\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(eventDaysTable[currDate.valueOf()]){\r\n\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_event');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdayElement.classList.add('dhx_cal_datepicker_date');\r\n\r\n\t\t\tdayGridContainer.appendChild(dayElement);\r\n\t\t\tcurrDate = scheduler.date.add(currDate, 1, 'day');\r\n\t\t}\r\n\r\n\t\tcontainer.appendChild(dayGridContainer);\r\n\r\n\t}\r\n\r\n\t_renderMonthGrid(container) {\r\n\t\tconst {date} = this.getState();\r\n\r\n\t\tconst wrapper = document.createElement('div');\r\n\t\twrapper.classList.add(\"dhx_cal_datepicker_months\");\r\n\r\n\t\tconst months = [];\r\n\t\tfor(let i = 0; i < 12; i++){\r\n\t\t\tmonths.push(new Date(date.getFullYear(), i, 1));\r\n\t\t}\r\n\r\n\t\tconst formatLabel = this.scheduler.date.date_to_str(\"%M\");\r\n\t\tmonths.forEach(month => {\r\n\t\t\tconst monthElement = document.createElement('div');\r\n\t\t\tmonthElement.classList.add('dhx_cal_datepicker_month');\r\n\t\t\tif(date.getMonth() === month.getMonth()){\r\n\t\t\t\tmonthElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t}\r\n\t\t\tmonthElement.setAttribute(\"data-month\", month.getMonth());\r\n\t\t\tmonthElement.innerHTML = formatLabel(month);\r\n\t\t\tthis._domEvents.attach(monthElement, \"click\", () => {\r\n\t\t\t\tconst newDate = new Date(month);\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tdate: newDate,\r\n\t\t\t\t\tmode: 'days'\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\twrapper.appendChild(monthElement);\r\n\t\t});\r\n\t\tcontainer.appendChild(wrapper);\r\n\r\n\t\tconst doneArea = document.createElement(\"div\");\r\n\t\tdoneArea.classList.add(\"dhx_cal_datepicker_done\");\r\n\t\tconst doneBtn = document.createElement(\"button\");\r\n\t\tdoneBtn.innerText = \"Done\";\r\n\t\tdoneBtn.classList.add(\"dhx_cal_datepicker_done_btn\");\r\n\t\tthis._domEvents.attach(doneBtn, \"click\", () => {\r\n\t\t\tthis.setState({\r\n\t\t\t\tmode: 'days'\r\n\t\t\t});\r\n\t\t});\r\n\t\tdoneArea.appendChild(doneBtn);\r\n\t\tcontainer.appendChild(doneArea);\r\n\t}\r\n\r\n\t_renderYearGrid(container) {\r\n\t\tconst {date} = this.getState();\r\n\t\tconst startYear = Math.floor(date.getFullYear() / 10) * 10;\r\n\t\t\r\n\t\tconst wrapper = document.createElement('div');\r\n\t\twrapper.classList.add(\"dhx_cal_datepicker_years\");\r\n\t\tfor (let i = startYear - 1; i <= startYear + 10; i++) {\r\n\t\t\tconst yearElement = document.createElement('div');\r\n\t\t\tyearElement.innerText = i;\r\n\t\t\tyearElement.classList.add('dhx_cal_datepicker_year');\r\n\t\t\tyearElement.setAttribute(\"data-year\", i);\r\n\t\t\tif(date.getFullYear() === i){\r\n\t\t\t\tyearElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t}\r\n\t\t\tthis._domEvents.attach(yearElement, \"click\", () => {\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tdate: new Date(i, date.getMonth(), 1),\r\n\t\t\t\t\tmode: 'months'\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\twrapper.appendChild(yearElement);\r\n\t\t\t\r\n\t\t}\r\n\t\tcontainer.appendChild(wrapper);\r\n\r\n\t\tconst doneArea = document.createElement(\"div\");\r\n\t\tdoneArea.classList.add(\"dhx_cal_datepicker_done\");\r\n\t\tconst doneBtn = document.createElement(\"button\");\r\n\t\tdoneBtn.innerText = \"Done\";\r\n\t\tdoneBtn.classList.add(\"dhx_cal_datepicker_done_btn\");\r\n\t\tthis._domEvents.attach(doneBtn, \"click\", () => {\r\n\t\t\tthis.setState({\r\n\t\t\t\tmode: 'months'\r\n\t\t\t});\r\n\t\t});\r\n\t\tdoneArea.appendChild(doneBtn);\r\n\t\tcontainer.appendChild(doneArea);\r\n\t}\r\n\r\n\tdestructor(){\r\n\t\tthis.onStateChangeHandlers = [];\r\n\t\tif(this.element){\r\n\t\t\tthis.element.innerHTML = '';\r\n\t\t\tthis.element.remove();\r\n\t\t}\r\n\r\n\t\tthis._domEvents.detachAll();\r\n\t\tthis.callEvent(\"onDestroy\", []);\r\n\t\tthis.detachAllEvents();\r\n\r\n\t\tthis.scheduler = null;\r\n\t}\r\n}","// import \"./css/dhtmlxscheduler_terrace\";\r\n// import \"./css/dhtmlxscheduler_material\";\r\n// import \"./css/dhtmlxscheduler_material_nofont\";\r\n// import \"./css/dhtmlxscheduler_flat\";\r\n// import \"./css/dhtmlxscheduler_contrast_black\";\r\n// import \"./css/dhtmlxscheduler_contrast_white\";\r\n\r\nimport addPlugins from \"./plugins\";\r\nimport stateProvider from \"./core/state\";\r\nimport assert from \"./core/common/assert\";\r\nimport common_errors from \"./core/common_errors\";\r\nimport connector from \"./core/connector\";\r\nimport schedulerCore from \"./core/scheduler\";\r\nimport common from \"./core/common\";\r\nimport wai_aria from \"./core/wai_aria\";\r\nimport utils from \"./core/utils/utils\";\r\nimport dom_helpers from \"./core/utils/dom_helpers\";\r\nimport env from \"./utils/env\";\r\nimport destructor from \"./core/destructor\";\r\nimport ajax from \"./core/utils/ajax\";\r\nimport base from \"./core/base\";\r\nimport config from \"./core/config\";\r\nimport event from \"./core/event\";\r\nimport event_highlight from \"./core/event_highlight\";\r\nimport load from \"./core/load\";\r\nimport lightbox from \"./core/lightbox\";\r\nimport touch from \"./core/touch\";\r\nimport dhtmlx_suite_hooks from \"./core/dhtmlx/dhtmlx_suite_hooks\";\r\nimport skins from \"./core/skins\";\r\nimport jquery from \"./core/jquery\";\r\nimport delay_render from \"./core/delay_render\";\r\nimport dataProcessorExtend from \"./core/dataprocessor/dataprocessor\";\r\nimport message from \"./core/message\";\r\nimport i18nFactory from \"./locale\";\r\n\r\nimport voidFirst from \"./publish_helpers/void_script_first\";\r\nimport voidSecond from \"./publish_helpers/void_script_second\";\r\nimport voidThird from \"./publish_helpers/void_script_third\";\r\n\r\n//import datepickerHeader from \"./core/clickable_header\";\r\n\r\nimport { DatePicker } from \"./core/datepicker\";\r\n\r\nexport default function(extensionManager) {\r\n\r\n\tconst scheduler = { version: VERSION };\r\n\t\r\n\tscheduler.$stateProvider = stateProvider();\r\n\r\n\tscheduler.getState = scheduler.$stateProvider.getState;\r\n\tcommon_errors(scheduler);\r\n\tcommon(scheduler);\r\n\tschedulerCore(scheduler);\r\n\twai_aria(scheduler);\r\n\t//utils(scheduler);\r\n\r\n\tscheduler.utils = utils;\r\n\tscheduler.$domHelpers = dom_helpers;\r\n\tscheduler.utils.dom = dom_helpers;\r\n\tscheduler.uid = utils.uid;\r\n\tscheduler.mixin = utils.mixin;\r\n\tscheduler.defined = utils.defined;\r\n\tscheduler.assert = assert(scheduler);\r\n\tscheduler.copy = utils.copy;\r\n\r\n\tscheduler._createDatePicker = function(container, config){\r\n\t\treturn new DatePicker(scheduler, container, config);\r\n\t};\r\n\r\n\t//datepickerHeader(scheduler);\r\n\r\n\r\n\t//old api compatibility\r\n\tscheduler._getFocusableNodes = dom_helpers.getFocusableNodes;\r\n\tscheduler._getClassName = dom_helpers.getClassName;\r\n\tscheduler._locate_css = dom_helpers.locateCss;\r\n\r\n\tconst messageApi = message(scheduler);\r\n\tscheduler.utils.mixin(scheduler, messageApi);\r\n\r\n\tscheduler.env = scheduler.$env = env;\r\n\tscheduler.Promise = window.Promise;\r\n\tdestructor(scheduler);\r\n\tajax(scheduler);\r\n\tvoidFirst(scheduler);\r\n\tbase(scheduler);\r\n\tconfig(scheduler);\r\n\tevent(scheduler);\r\n\tevent_highlight(scheduler);\r\n\tload(scheduler);\r\n\tlightbox(scheduler);\r\n\ttouch(scheduler);\r\n\tdhtmlx_suite_hooks(scheduler);\r\n\tvoidSecond(scheduler);\r\n\tskins(scheduler);\r\n\tjquery(scheduler);\r\n\tdelay_render(scheduler);\r\n\tdataProcessorExtend(scheduler);\r\n\tvoidThird(scheduler);\r\n\tconnector(scheduler);\r\n\tconst i18n = i18nFactory();\r\n\tscheduler.i18n = {\r\n\t\taddLocale: i18n.addLocale,\r\n\t\tsetLocale: function(locale){\r\n\t\t\tif(typeof locale === \"string\"){\r\n\t\t\t\tvar localeObject = i18n.getLocale(locale);\r\n\t\t\t\tif(!localeObject){\r\n\t\t\t\t\tlocaleObject = i18n.getLocale(\"en\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler.locale = localeObject;\r\n\t\t\t}else if(locale){\r\n\t\t\t\tif(!scheduler.locale){\r\n\t\t\t\t\tscheduler.locale = locale;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfor(var i in locale){\r\n\t\t\t\t\t\tif(locale[i] && typeof locale[i] === \"object\"){\r\n\t\t\t\t\t\t\tif(!scheduler.locale[i]){\r\n\t\t\t\t\t\t\t\tscheduler.locale[i] = {};\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tscheduler.mixin(scheduler.locale[i], locale[i], true);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tscheduler.locale[i] = locale[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar labels = scheduler.locale.labels;\r\n\t\t\tlabels.dhx_save_btn \t= labels.icon_save;\r\n\t\t\tlabels.dhx_cancel_btn \t= labels.icon_cancel;\r\n\t\t\tlabels.dhx_delete_btn \t= labels.icon_delete;\r\n\r\n\t\t\tif(scheduler.$container){\r\n\t\t\t\tscheduler.get_elements();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t},\r\n\t\tgetLocale: i18n.getLocale\r\n\t};\r\n\tscheduler.i18n.setLocale(\"en\");\r\n\taddPlugins(scheduler);\r\n\tscheduler.ext = {};\r\n\r\n\tconst activePlugins = {};\r\n\tscheduler.plugins = function(config){\r\n\t\tconst extensionList = getExtensionList(config, {\r\n\t\t\t\ttreetimeline: [\"timeline\"],\r\n\t\t\t\tdaytimeline: [\"timeline\"],\r\n\t\t\t\touterdrag: [\"legacy\"]\r\n\t\t\t}, {\r\n\t\t\t\tlegacy: 1,\r\n\t\t\t\tlimit: 1,\r\n\t\t\t\ttimeline: 2,\r\n\t\t\t\tdaytimeline: 3,\r\n\t\t\t\ttreetimeline: 3,\r\n\t\t\t\touterdrag:6\r\n\t\t\t});\r\n\r\n\t\textensionList.forEach(function(name){\r\n\t\t\tif(!activePlugins[name]){\r\n\t\t\t\tconst plugin = extensionManager.getExtension(name);\r\n\t\t\t\tif(plugin){\r\n\t\t\t\t\tplugin(scheduler);\r\n\t\t\t\t\tactivePlugins[name] = true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthrow new Error(\"unknown plugin \" + name);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n\r\n\tfunction getExtensionList(config, dependencies, priorities){\r\n\t\tconst result = [];\r\n\r\n\t\tfor(const i in config){\r\n\t\t\tif(config[i]){\r\n\t\t\t\tconst extension = i.toLowerCase();\r\n\t\t\t\tif(dependencies[extension]){\r\n\t\t\t\t\tdependencies[extension].forEach(function(dep){\r\n\t\t\t\t\t\tconst dependencyName = dep.toLowerCase();\r\n\t\t\t\t\t\tif(!config[dependencyName]){\r\n\t\t\t\t\t\t\tresult.push(dependencyName);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\tresult.push(extension);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tresult.sort(function(a, b){\r\n\t\t\tconst orderA = priorities[a] || 0;\r\n\t\t\tconst orderB = priorities[b] || 0;\r\n\t\t\tif(orderA > orderB){\r\n\t\t\t\treturn 1;\r\n\t\t\t}else if(orderA < orderB){\r\n\t\t\t\treturn -1;\r\n\t\t\t}else{\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\treturn scheduler;\r\n\r\n}","import utils from \"./utils/utils\";\r\n\r\nconst StateService = (function(){\r\n\tconst stateProviders = {};\r\n\r\n\tfunction getState(name){\r\n\t\tconst provider = stateProviders[name];\r\n\t\tif(provider){\r\n\t\t\treturn stateProviders[name].method();\r\n\t\t}else{\r\n\t\t\tconst res = {};\r\n\t\t\tfor(const i in stateProviders){\r\n\t\t\t\tif(!stateProviders[i].internal)\r\n\t\t\t\t\tutils.mixin(res, stateProviders[i].method(), true);\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\t\t}\r\n\t}\r\n\r\n\tfunction registerProvider(name, provider, internal){\r\n\t\tstateProviders[name] = { method: provider, internal: internal};\r\n\t}\r\n\r\n\tfunction unregisterProvider(name){\r\n\t\tdelete stateProviders[name];\r\n\t}\r\n\r\n\treturn {\r\n\t\tgetState: getState,\r\n\t\tregisterProvider: registerProvider,\r\n\t\tunregisterProvider: unregisterProvider\r\n\t};\r\n});\r\n\r\nexport default StateService;\r\n\r\n","export default function extend(scheduler) {\r\n\r\nvar commonViews = {\r\n\tagenda: \"https://docs.dhtmlx.com/scheduler/agenda_view.html\",\r\n\tgrid: \"https://docs.dhtmlx.com/scheduler/grid_view.html\",\r\n\tmap: \"https://docs.dhtmlx.com/scheduler/map_view.html\",\r\n\tunit: \"https://docs.dhtmlx.com/scheduler/units_view.html\",\r\n\ttimeline: \"https://docs.dhtmlx.com/scheduler/timeline_view.html\",\r\n\tweek_agenda: \"https://docs.dhtmlx.com/scheduler/weekagenda_view.html\",\r\n\tyear: \"https://docs.dhtmlx.com/scheduler/year_view.html\",\r\n\tanythingElse: \"https://docs.dhtmlx.com/scheduler/views.html\"\r\n};\r\n\r\nvar requiredExtensions = {\r\n\tagenda: \"ext/dhtmlxscheduler_agenda_view.js\",\r\n\tgrid: \"ext/dhtmlxscheduler_grid_view.js\",\r\n\tmap: \"ext/dhtmlxscheduler_map_view.js\",\r\n\tunit: \"ext/dhtmlxscheduler_units.js\",\r\n\ttimeline: \"ext/dhtmlxscheduler_timeline.js, ext/dhtmlxscheduler_treetimeline.js, ext/dhtmlxscheduler_daytimeline.js\",\r\n\tweek_agenda: \"ext/dhtmlxscheduler_week_agenda.js\",\r\n\tyear: \"ext/dhtmlxscheduler_year_view.js\",\r\n\tlimit: \"ext/dhtmlxscheduler_limit.js\"\r\n};\r\n\r\nscheduler._commonErrorMessages = {\r\n\tunknownView: function(view){\r\n\t\tvar relatedDoc = \"Related docs: \" + (commonViews[view] || commonViews.anythingElse); \r\n\t\tvar relatedExtension = requiredExtensions[view] ? (\"You're probably missing \" + requiredExtensions[view] + \".\") : \"\";\r\n\t\treturn (\r\n\t\t\t\"`\"+view+\"` view is not defined. \\n\" +\r\n\t\t\t\"Please check parameters you pass to `scheduler.init` or `scheduler.setCurrentView` in your code and ensure you've imported appropriate extensions. \\n\" + \r\n\t\t\trelatedDoc + \"\\n\" + (relatedExtension ? (relatedExtension + \"\\n\") : \"\"));\r\n\t},\r\n\tcollapsedContainer: function(div){\r\n\t\treturn \"Scheduler container height is set to *100%* but the rendered height is zero and the scheduler is not visible. \\n\"+\r\n\t\t\"Make sure that the container has some initial height or use different units. For example:\\n\" +\r\n\t\t\"
\\n\";\r\n\t}\r\n};\r\n\r\nscheduler.createTimelineView = function() {\r\n\tthrow new Error(\"scheduler.createTimelineView is not implemented. Be sure to add the required extension: \" + requiredExtensions.timeline + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.timeline);\r\n};\r\n\r\nscheduler.createUnitsView = function() {\r\n\tthrow new Error(\"scheduler.createUnitsView is not implemented. Be sure to add the required extension: \" + requiredExtensions.unit + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.unit);\r\n};\r\n\r\nscheduler.createGridView = function() {\r\n\tthrow new Error(\"scheduler.createGridView is not implemented. Be sure to add the required extension: \" + requiredExtensions.grid + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.grid);\r\n};\r\n\r\nscheduler.addMarkedTimespan = function() {\r\n\tthrow new Error(\"scheduler.addMarkedTimespan is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_limit.js\" + \r\n\t\"\\n\" +\r\n\t\"Related docs: https://docs.dhtmlx.com/scheduler/limits.html\");\r\n};\r\n\r\nscheduler.renderCalendar = function() {\r\n\tthrow new Error(\"scheduler.renderCalendar is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_minical.js\" + \r\n\t\"\\n\" +\r\n\t\"https://docs.dhtmlx.com/scheduler/minicalendar.html\");\r\n};\r\n\r\nscheduler.exportToPNG = function() {\r\n\tthrow new Error([\r\n\t\t\"scheduler.exportToPNG is not implemented.\",\r\n\t\t\"This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/png.html\",\r\n\t\t\"Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml\"\r\n\t].join(\"\\n\"));\r\n};\r\n\r\nscheduler.exportToPDF = function() {\r\n\tthrow new Error([\r\n\t\t\"scheduler.exportToPDF is not implemented.\",\r\n\t\t\"This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/pdf.html\",\r\n\t\t\"Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml\"\r\n\t].join(\"\\n\"));\r\n};\r\n\r\n\r\n}","\r\nimport nav_bar from \"./nav_bar\";\r\nimport scheduler_resize_listener from \"./scheduler_resize_listener\";\r\nimport eventable from \"../utils/eventable\";\r\n\r\n\r\nexport default function extend(scheduler) {\r\n\r\neventable(scheduler);\r\n\r\nnav_bar(scheduler);\r\n\r\nscheduler._detachDomEvent = function(el, event, handler){\r\n\tif (el.removeEventListener){\r\n\t\tel.removeEventListener(event, handler, false);\r\n\r\n\t}else if (el.detachEvent){\r\n\t\tel.detachEvent(\"on\"+event, handler);\r\n\t}\r\n};\r\n\r\n\r\nscheduler._init_once = function(){\r\n\tscheduler_resize_listener(scheduler);\r\n\r\n\tscheduler._init_once = function(){};\r\n};\r\n\r\nconst layout = {\r\n\t\"navbar\": {\r\n\t\trender: function (config) {\r\n\t\t\treturn scheduler._init_nav_bar(config);\r\n\t\t}\r\n\t},\r\n\t\"header\": {\r\n\t\trender: function (config) {\r\n\t\t\tconst element = document.createElement(\"div\");\r\n\t\t\telement.className = \"dhx_cal_header\";\r\n\t\t\treturn element;\r\n\t\t}\r\n\t},\r\n\t\"dataArea\": {\r\n\t\trender: function (config) {\r\n\t\t\tconst element = document.createElement(\"div\");\r\n\t\t\telement.className = \"dhx_cal_data\";\r\n\t\t\treturn element;\r\n\t\t}\r\n\t},\r\n\t\"html_element\": {\r\n\t\trender: function (config) {\r\n\t\t\treturn config.html;\r\n\t\t}\r\n\t}\r\n};\r\n\r\nfunction hasSchedulerMarkup(element){\r\n\treturn !!(\r\n\t\telement.querySelector(\".dhx_cal_header\") &&\r\n\t\telement.querySelector(\".dhx_cal_data\") &&\r\n\t\telement.querySelector(\".dhx_cal_navline\")\r\n\t\t);\r\n}\r\n\r\nfunction createDefaultHeader(scheduler){\r\n\tconst views = [\r\n\t\t\"day\",\r\n\t\t\"week\",\r\n\t\t\"month\"\r\n\t];\r\n\tconst date = [\r\n\t\t\"date\"\r\n\t];\r\n\tconst nav = [\r\n\t\t\"prev\",\r\n\t\t\"today\",\r\n\t\t\"next\"\r\n\t];\r\n\r\n\tif(scheduler.matrix){\r\n\t\tfor(const i in scheduler.matrix){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\tif(scheduler._props){\r\n\t\tfor(const i in scheduler._props){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\r\n\tif(scheduler._grid && scheduler._grid.names){\r\n\t\tfor(const i in scheduler._grid.names){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\r\n\tconst optionalViews = [\r\n\t\t\"map\",\r\n\t\t\"agenda\",\r\n\t\t\"week_agenda\",\r\n\t\t\"year\"\r\n\t];\r\n\r\n\toptionalViews.forEach(function(viewName){\r\n\t\tif(scheduler[viewName + \"_view\"]){\r\n\t\t\tviews.push(viewName);\r\n\t\t}\r\n\t});\r\n\r\n\treturn views.concat(date).concat(nav);\r\n}\r\n\r\nscheduler.init=function(id,date,mode){\r\n\tif(this.$destroyed){\r\n\t\treturn; // not have errors when try to reinit destroyed scheduler\r\n\t}\r\n\tdate=date||(scheduler._currentDate());\r\n\tmode=mode||\"week\";\r\n\r\n\tif(this._obj){\r\n\t\tthis.unset_actions();\r\n\t}\r\n\r\n\tthis._obj=(typeof id == \"string\")?document.getElementById(id):id;\r\n\tthis.$container = this._obj;\r\n\tthis.$root = this._obj;\r\n\r\n\tif(!this.$container.offsetHeight && this.$container.offsetWidth && this.$container.style.height === \"100%\"){\r\n\t\t// scheduler container has zero height and non-zero width\r\n\t\twindow.console.error(scheduler._commonErrorMessages.collapsedContainer(), this.$container);\r\n\t}\r\n\r\n\tif(this.config.wai_aria_attributes && this.config.wai_aria_application_role){\r\n\t\tthis.$container.setAttribute(\"role\", \"application\");\r\n\t}\r\n\r\n\tif(!this.config.header && !hasSchedulerMarkup(this.$container)){\r\n\t\t// if no header config and no required markup - use the default header\r\n\t\t// so the scheduler could be initialized in an empty div\r\n\t\tthis.config.header = createDefaultHeader(this);\r\n\t\twindow.console.log([// jshint ignore:line\r\n\t\t\t\"Required DOM elements are missing from the scheduler container and **scheduler.config.header** is not specified.\",\r\n\t\t\t\"Using a default header configuration: \",\r\n\t\t\t\"scheduler.config.header = \" + JSON.stringify(this.config.header, null, 2),\r\n\t\t\t\"Check this article for the details: https://docs.dhtmlx.com/scheduler/initialization.html\"\r\n\t\t].join(\"\\n\"));// jshint ignore:line\r\n\t}\r\n\r\n\tif (this.config.header) {\r\n\t\tthis.$container.innerHTML = \"\";\r\n\t\tthis.$container.classList.add(\"dhx_cal_container\");\r\n\t\tif(this.config.header.height){\r\n\t\t\tthis.xy.nav_height = this.config.header.height;\r\n\t\t}\r\n\t\tthis.$container.appendChild(layout.navbar.render(this.config.header));\r\n\t\tthis.$container.appendChild(layout.header.render());\r\n\t\tthis.$container.appendChild(layout.dataArea.render());\r\n\t} else {\r\n\t\t// if no header config provided - make sure scheduler container has all necessary elements\r\n\t\tif(!hasSchedulerMarkup(this.$container)){\r\n\t\t\tthrow new Error([\r\n\t\t\t\t\"Required DOM elements are missing from the scheduler container.\",\r\n\t\t\t\t\"Be sure to either specify them manually in the markup: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviamarkup\",\r\n\t\t\t\t\"Or to use **scheduler.config.header** setting so they could be created automatically: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviaheaderconfig\"\r\n\t\t\t].join(\"\\n\"));\r\n\t\t}\r\n\t}\r\n\r\n\tif (this.config.rtl) this.$container.className += \" dhx_cal_container_rtl\";\r\n\r\n\t//hook for terrace skin\r\n\tif (this._skin_init)\r\n\t\tscheduler._skin_init();\r\n\r\n\tscheduler.date.init();\r\n\r\n\tthis._scroll=true;\r\n\r\n\tthis._els=[];\r\n\tthis.get_elements();\r\n\tthis.init_templates();\r\n\tthis.set_actions();\r\n\r\n\tthis._init_once();\r\n\tthis._init_touch_events();\r\n\r\n\tthis.set_sizes();\r\n\tscheduler.callEvent('onSchedulerReady', []);\r\n\tscheduler.$initialized = true;\r\n\tthis.setCurrentView(date,mode);\r\n\r\n};\r\n\r\nscheduler.xy={\r\n\tmin_event_height:20,\r\n\tbar_height: 24,\r\n\tscale_width:50,\r\n\tscroll_width:18,\r\n\tscale_height:20,\r\n\tmonth_scale_height:20,\r\n\tmenu_width:25,\r\n\tmargin_top:0,\r\n\tmargin_left:0,\r\n\teditor_width:140,\r\n\tmonth_head_height:22,\r\n\tevent_header_height: 14\r\n};\r\nscheduler.keys={\r\n\tedit_save:13,\r\n\tedit_cancel:27\r\n};\r\n\r\nscheduler.bind = function bind(functor, object){\r\n\tif(functor.bind)\r\n\t\treturn functor.bind(object);\r\n\telse\r\n\t\treturn function(){ return functor.apply(object,arguments); };\r\n};\r\n\r\nscheduler.set_sizes=function(){\r\n\r\n\tvar w = this._x = this._obj.clientWidth-this.xy.margin_left;\r\n\r\n\t//not-table mode always has scroll - need to be fixed in future\r\n\tvar scale_x=this._table_view?0:(this.xy.scale_width+this.xy.scroll_width);\r\n\r\n\tvar materialScalePlaceholder = this.$container.querySelector(\".dhx_cal_scale_placeholder\");\r\n\tif(scheduler._is_material_skin()){\r\n\t\tif(!materialScalePlaceholder) {\r\n\t\t\tmaterialScalePlaceholder = document.createElement(\"div\");\r\n\t\t\tmaterialScalePlaceholder.className = \"dhx_cal_scale_placeholder\";\r\n\t\t\tthis.$container.insertBefore(materialScalePlaceholder, this._els[\"dhx_cal_header\"][0]);\r\n\t\t}\r\n\t\tmaterialScalePlaceholder.style.display = \"block\";\r\n\r\n\t\tthis.set_xy(materialScalePlaceholder,w,this.xy.scale_height + 1,0, this._els[\"dhx_cal_header\"][0].offsetTop);\r\n\r\n\t}else{\r\n\t\tif(materialScalePlaceholder){\r\n\t\t\tmaterialScalePlaceholder.parentNode.removeChild(materialScalePlaceholder);\r\n\t\t}\r\n\t}\r\n\r\n\tif (this._lightbox) {\r\n\t\tif (scheduler.$container.offsetWidth < 1200) {\r\n\t\t} else {\r\n\t\t\tthis._setLbPosition(document.querySelector(\".dhx_cal_light\"));\r\n\t\t}\r\n\t}\r\n\r\n\tthis._data_width = w-scale_x;\r\n\r\n\tthis._els[\"dhx_cal_navline\"][0].style.width = w + \"px\";\r\n\tconst header = this._els[\"dhx_cal_header\"][0];\r\n\tthis.set_xy(header, this._data_width, this.xy.scale_height);\r\n\t// this._els[\"dhx_cal_header\"][0].style.marginLeft = `${scheduler.xy.scale_width}px`;\r\n\theader.style.left = ``;\r\n\theader.style.right = ``;\r\n\tif(!this._table_view){\r\n\t\tif(this.config.rtl){\r\n\t\t\theader.style.right = `${this.xy.scale_width}px`;\r\n\t\t}else{\r\n\t\t\theader.style.left = `${this.xy.scale_width}px`;\r\n\t\t}\r\n\t} else {\r\n\t\tif(!this.config.rtl){\r\n\t\t\theader.style.left = `-1px`;\r\n\t\t} else {\r\n\t\t\theader.style.right = `-1px`;\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.set_xy=function(node,w,h,x,y){\r\n\tfunction prepareValue(val){\r\n\t\tlet prepared = val;\r\n\t\tif(!isNaN(Number(prepared))){\r\n\t\t\tprepared = Math.max(0,prepared) + \"px\";\r\n\t\t}\r\n\t\treturn prepared;\r\n\t}\r\n\r\n\tvar direction = 'left';\r\n\r\n\tif(w !== undefined) {\r\n\t\tnode.style.width = prepareValue(w);\r\n\t}\r\n\r\n\tif(h !== undefined){\r\n\t\tnode.style.height = prepareValue(h);\r\n\t}\r\n\r\n\tif (arguments.length>3){\r\n\r\n\t\tif(x !== undefined){\r\n\t\t\tif (this.config.rtl) direction = 'right';\r\n\t\t\tnode.style[direction]=x+\"px\";\r\n\t\t}\r\n\t\tif(y !== undefined){\r\n\t\t\tnode.style.top=y+\"px\";\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.get_elements=function(){\r\n\t//get all child elements as named hash\r\n\tconst els=this._obj.getElementsByTagName(\"DIV\");\r\n\tfor (let i=0; i < els.length; i++){\r\n\t\tlet class_name= scheduler._getClassName(els[i]);\r\n\t\tconst attr_value = els[i].getAttribute(\"data-tab\") || els[i].getAttribute(\"name\") || \"\";\r\n\t\tif (class_name) class_name = class_name.split(\" \")[0];\r\n\t\tif (!this._els[class_name]) this._els[class_name]=[];\r\n\t\tthis._els[class_name].push(els[i]);\r\n\r\n\t\t//check if name need to be changed\r\n\t\t// scheduler.locale.labels[attr_value+\"_tab\"] - to fix getting labels for data-tab\r\n\t\tlet label = scheduler.locale.labels[attr_value+\"_tab\"] || scheduler.locale.labels[attr_value||class_name];\r\n\t\tif (typeof label !== \"string\" && attr_value && !els[i].innerHTML)\r\n\t\t\tlabel = attr_value.split(\"_\")[0];\r\n\t\tif (label) {\r\n\t\t\tthis._waiAria.labelAttr(els[i], label);\r\n\t\t\tels[i].innerHTML = label;\r\n\t\t}\r\n\t}\r\n};\r\n\r\n\r\nconst domEventsScope = scheduler._createDomEventScope();\r\n\r\nscheduler.unset_actions = function(){\r\n\tdomEventsScope.detachAll();\r\n};\r\n\r\nscheduler.set_actions=function(){\r\n\tfor (const a in this._els){\r\n\t\tif (this._click[a]){\r\n\t\t\tfor (let i=0; i < this._els[a].length; i++){\r\n\t\t\t\tconst element = this._els[a][i];\r\n\t\t\t\tconst handler = this._click[a].bind(element);\r\n\t\t\t\tdomEventsScope.attach(element, \"click\", handler);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tdomEventsScope.attach(this._obj, \"selectstart\", function(e){\r\n\t\te.preventDefault();\r\n\t\treturn false;\r\n\t});\r\n\t//this._obj.onselectstart=function(e){ return false; };\r\n\tdomEventsScope.attach(this._obj, \"mousemove\", function(e){\r\n\t\tif (!scheduler._temp_touch_block)\r\n\t\t\tscheduler._on_mouse_move(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"mousedown\", function(e){\r\n\t\tif (!scheduler._ignore_next_click)\r\n\t\t\tscheduler._on_mouse_down(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"mouseup\", function(e){\r\n\t\tif (!scheduler._ignore_next_click)\r\n\t\t\tscheduler._on_mouse_up(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"dblclick\", function(e){\r\n\t\tscheduler._on_dbl_click(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"contextmenu\", function(event) {\r\n\t\tif(scheduler.checkEvent(\"onContextMenu\")){\r\n\t\t\t// block the default browser context menu \r\n\t\t\tevent.preventDefault();\r\n\t\t}\r\n\r\n\t\tconst returnValue = scheduler.callEvent(\"onContextMenu\", [scheduler._locate_event(event.target), event]);\r\n\t\treturn returnValue;\r\n\t});\r\n};\r\nscheduler.select=function(id){\r\n\tif (this._select_id==id) return;\r\n\tscheduler._close_not_saved();\r\n\tthis.editStop(false);\r\n\tif(this._select_id){\r\n\t\tthis.unselect();\r\n\t}\r\n\tthis._select_id = id;\r\n\tthis.updateEvent(id);\r\n\tthis.callEvent(\"onEventSelected\", [id]);\r\n};\r\nscheduler.unselect=function(id){\r\n\tif (id && id!=this._select_id) {\r\n\t\treturn;\r\n\t}\r\n\tconst previousSelection = this._select_id;\r\n\tthis._select_id = null;\r\n\tif (previousSelection && this.getEvent(previousSelection)) {\r\n\t\tthis.updateEvent(previousSelection);\r\n\t}\r\n\tthis.callEvent(\"onEventUnselected\", [previousSelection]);\r\n};\r\nscheduler.$stateProvider.registerProvider(\"global\", (function(){\r\n\treturn {\r\n\t\tmode: this._mode,\r\n\t\tdate: new Date(this._date),\r\n\t\tmin_date: new Date(this._min_date),\r\n\t\tmax_date: new Date(this._max_date),\r\n\t\teditor_id: this._edit_id,\r\n\t\tlightbox_id: this._lightbox_id,\r\n\t\tnew_event: this._new_event,\r\n\t\tselect_id: this._select_id,\r\n\t\texpanded: this.expanded,\r\n\t\tdrag_id: this._drag_id,\r\n\t\tdrag_mode: this._drag_mode\r\n\t};\r\n}).bind(scheduler));\r\n\r\nscheduler._click={\r\n\tdhx_cal_data:function(e){\r\n\t\t//in case of touch disable click processing\r\n\t\tif (scheduler._ignore_next_click){\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\r\n\t\tconst id = scheduler._locate_event(e.target);\r\n\r\n\t\tif (!id) {\r\n\t\t\tscheduler.callEvent(\"onEmptyClick\",[scheduler.getActionData(e).date, e]);\r\n\t\t} else {\r\n\t\t\tif ( !scheduler.callEvent(\"onClick\",[id,e]) || scheduler.config.readonly ) return;\r\n\t\t}\r\n\r\n\t\tif (id && scheduler.config.select) {\r\n\r\n\t\t\tscheduler.select(id);\r\n\t\t\tconst icon = e.target.closest(\".dhx_menu_icon\");\r\n\r\n\t\t\tconst mask = scheduler._getClassName(icon);\r\n\t\t\tif (mask.indexOf(\"_icon\")!=-1)\r\n\t\t\t\tscheduler._click.buttons[mask.split(\" \")[1].replace(\"icon_\",\"\")](id);\r\n\t\t} else{\r\n\t\t\tscheduler._close_not_saved();\r\n\t\t\tif (scheduler.getState().select_id && new Date().valueOf()-(scheduler._new_event||0) > 500){\r\n\t\t\t\tscheduler.unselect();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tdhx_cal_prev_button:function(){\r\n\t\tscheduler._click.dhx_cal_next_button(0,-1);\r\n\t},\r\n\tdhx_cal_next_button:function(dummy,step){\r\n\t\tlet def_step = 1;\r\n\t\tif (scheduler.config.rtl){\r\n\t\t\tstep = -step;\r\n\t\t\tdef_step = -def_step;\r\n\t\t}\r\n\t\tscheduler.setCurrentView(scheduler.date.add( //next line changes scheduler._date , but seems it has not side-effects\r\n\t\t\tscheduler.date[scheduler._mode+\"_start\"](new Date(scheduler._date)),(step||def_step),scheduler._mode));\r\n\t},\r\n\tdhx_cal_today_button:function(){\r\n\t\tif (scheduler.callEvent(\"onBeforeTodayDisplayed\", [])) {\r\n\t\t\tscheduler.setCurrentView(scheduler._currentDate());\r\n\t\t}\r\n\t},\r\n\tdhx_cal_tab:function(){\r\n\t\tconst name = this.getAttribute(\"data-tab\");\r\n\t\tconst deprecated_name = this.getAttribute(\"name\");\r\n\t\tconst mode = name || deprecated_name.substring(0, deprecated_name.search(\"_tab\"));\r\n\t\tscheduler.setCurrentView(scheduler._date,mode);\r\n\t},\r\n\tbuttons:{\r\n\t\t\"delete\":function(id){\r\n\t\t\tconst c = scheduler.locale.labels.confirm_deleting;\r\n\t\t\tscheduler._dhtmlx_confirm({message: c, title: scheduler.locale.labels.title_confirm_deleting, callback:function(){ scheduler.deleteEvent(id); },\r\n\t\t\tconfig: {ok: scheduler.locale.labels.icon_delete}\r\n\t\t});\r\n\t\t},\r\n\t\tedit:function(id){ scheduler.edit(id); },\r\n\t\tsave:function(id){ scheduler.editStop(true); },\r\n\t\tdetails:function(id){ scheduler.showLightbox(id); },\r\n\t\tform:function(id){ scheduler.showLightbox(id); },\r\n\t\tcancel:function(id){ scheduler.editStop(false); }\r\n\t}\r\n};\r\nscheduler._dhtmlx_confirm = function({message, title, callback, config}) {\r\n\tif (!message)\r\n\t\treturn callback();\r\n\r\n\tconfig = config || {};\r\n\tconst opts = { ...config, text: message };\r\n\tif (title) {\r\n\t\topts.title = title;\r\n\t}\r\n\tif (callback) {\r\n\t\topts.callback = function(result) {\r\n\t\t\tif (result) {\r\n\t\t\t\tcallback();\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\tscheduler.confirm(opts);\r\n};\r\nscheduler.addEventNow=function(start,end,e){\r\n\tlet base = {};\r\n\tif (scheduler._isObject(start) && !scheduler._isDate(start)){\r\n\t\tbase = start;\r\n\t\tstart = null;\r\n\t}\r\n\r\n\tconst duration = (this.config.event_duration||this.config.time_step)*60000;\r\n\tif (!start) start = base.start_date||Math.round((scheduler._currentDate()).valueOf()/duration)*duration;\r\n\tlet start_date = new Date(start);\r\n\tif (!end){\r\n\t\tlet start_hour = this.config.first_hour;\r\n\t\tif (start_hour > start_date.getHours()){\r\n\t\t\tstart_date.setHours(start_hour);\r\n\t\t\tstart = start_date.valueOf();\r\n\t\t}\r\n\t\tend = start.valueOf()+duration;\r\n\t}\r\n\tlet end_date = new Date(end);\r\n\r\n\t// scheduler.addEventNow(new Date(), new Date()) + collision though get_visible events defect (such event was not retrieved)\r\n\tif(start_date.valueOf() == end_date.valueOf())\r\n\t\tend_date.setTime(end_date.valueOf()+duration);\r\n\tbase.start_date = base.start_date||start_date;\r\n\tbase.end_date = base.end_date||end_date;\r\n\tbase.text = base.text||this.locale.labels.new_event;\r\n\tbase.id = this._drag_id = base.id || this.uid();\r\n\tthis._drag_mode=\"new-size\";\r\n\tthis._loading=true;\r\n\tconst eventId = this.addEvent(base);\r\n\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\tthis._loading=false;\r\n\r\n\tthis._drag_event={}; //dummy , to trigger correct event updating logic\r\n\tthis._on_mouse_up(e);\r\n\treturn eventId;\r\n};\r\nscheduler._on_dbl_click=function(e,src){\r\n\tsrc = src || e.target;\r\n\tif (this.config.readonly) return;\r\n\tconst name = scheduler._getClassName(src).split(\" \")[0];\r\n\tswitch(name){\r\n\t\tcase \"dhx_scale_holder\":\r\n\t\tcase \"dhx_scale_holder_now\":\r\n\t\tcase \"dhx_month_body\":\r\n\t\tcase \"dhx_wa_day_data\":\r\n\t\t\tif (!scheduler.config.dblclick_create) break;\r\n\t\t\tthis.addEventNow(this.getActionData(e).date,null,e);\r\n\t\t\tbreak;\r\n\t\tcase \"dhx_cal_event\":\r\n\t\tcase \"dhx_wa_ev_body\":\r\n\t\tcase \"dhx_agenda_line\":\r\n\t\tcase \"dhx_cal_agenda_event_line\":\r\n\t\tcase \"dhx_grid_event\":\r\n\t\tcase \"dhx_cal_event_line\":\r\n\t\tcase \"dhx_cal_event_clear\": {\r\n\t\t\tconst id = this._locate_event(src);\r\n\t\t\tif (!this.callEvent(\"onDblClick\",[id,e])) return;\r\n\t\t\tif (this.config.details_on_dblclick || this._table_view || !this.getEvent(id)._timed || !this.config.select)\r\n\t\t\t\tthis.showLightbox(id);\r\n\t\t\telse\r\n\t\t\t\tthis.edit(id);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcase \"dhx_time_block\":\r\n\t\tcase \"dhx_cal_container\":\r\n\t\t\treturn;\r\n\t\tdefault: {\r\n\t\t\tconst viewHandler = this[\"dblclick_\"+name];\r\n\t\t\tif (viewHandler) {\r\n\t\t\t\tviewHandler.call(this,e);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif (src.parentNode && src != this)\r\n\t\t\t\t\treturn scheduler._on_dbl_click(e,src.parentNode);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n};\r\n//column index by mouse x-coordinate\r\nscheduler._get_column_index = function(x_pos){\r\n\tlet column = 0;\r\n\tif (this._cols){\r\n\t\tlet width = 0;\r\n\t\tlet i = 0;\r\n\t\twhile (width + this._cols[i] < x_pos && i < this._cols.length){\r\n\t\t\twidth += this._cols[i];\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tcolumn = i + (this._cols[i] ? ((x_pos - width)/ this._cols[i]) : 0);\r\n\r\n\t\tif (this._ignores){\r\n\t\t\tif(column >= this._cols.length){\r\n\t\t\t\twhile(column >= 1 && this._ignores[Math.floor(column)]){\r\n\t\t\t\t\tcolumn--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n\treturn column;\r\n};\r\n\r\n//transform mouse coordinates to day-time indexes of week based view\r\nscheduler._week_indexes_from_pos = function(pos){\r\n\t//\"get position\" can be invoked before columns are loaded into the units view(e.g. by onMouseMove handler in key_nav.js)\r\n\tif(!this._cols){\r\n\t\treturn pos;\r\n\t}else{\r\n\t\tconst column = this._get_column_index(pos.x);\r\n\r\n\t\tpos.x=Math.min(this._cols.length-1, Math.max(0,Math.ceil(column)-1));\r\n\t\tpos.y=Math.max(0,Math.ceil(pos.y*60/(this.config.time_step*this.config.hour_size_px))-1)+this.config.first_hour*(60/this.config.time_step);\r\n\t\treturn pos;\r\n\t}\r\n};\r\n\r\nscheduler._mouse_coords=function(ev){\r\n\tlet pos;\r\n\tconst body = document.body;\r\n\tconst documentElement = document.documentElement;\r\n\tif (!this.$env.isIE && (ev.pageX || ev.pageY))\r\n\t\tpos={x:ev.pageX, y:ev.pageY};\r\n\telse pos={\r\n\t\tx:ev.clientX + (body.scrollLeft||documentElement.scrollLeft||0) - body.clientLeft,\r\n\t\ty:ev.clientY + (body.scrollTop||documentElement.scrollTop||0) - body.clientTop\r\n\t};\r\n\t//apply layout\r\n\tif (this.config.rtl && this._colsS) {\r\n\t\tpos.x = this.$container.querySelector(\".dhx_cal_data\").offsetWidth - pos.x;\r\n\t\tpos.x += this.$domHelpers.getAbsoluteLeft(this._obj);\r\n\t\tif (this._mode !== \"month\") {\r\n\t\t\tpos.x -= this.xy.scale_width;\r\n\t\t}\r\n\t} else {\r\n\t\tpos.x-=this.$domHelpers.getAbsoluteLeft(this._obj)+(this._table_view?0:this.xy.scale_width);\r\n\t}\r\n\r\n\tconst dataArea = this.$container.querySelector(\".dhx_cal_data\");\r\n\t//pos.y-=this.$domHelpers.getAbsoluteTop(this._obj)+this.xy.nav_height+(this._dy_shift||0)+this.xy.scale_height-this._els[\"dhx_cal_data\"][0].scrollTop;\r\n\tpos.y-=this.$domHelpers.getAbsoluteTop(dataArea)-this._els[\"dhx_cal_data\"][0].scrollTop;\r\n\tpos.ev = ev;\r\n\tconst handler = this[\"mouse_\"+this._mode];\r\n\tif (handler){\r\n\t\tpos = handler.call(this,pos);\r\n\t}else{\r\n\t\t//transform to date\r\n\t\tif (!this._table_view) {\r\n\t\t\tpos = this._week_indexes_from_pos(pos);\r\n\t\t} else {\r\n\t\t\tconst column = this._get_column_index(pos.x);\r\n\t\t\tif (!this._cols || !this._colsS) // agenda/map views\r\n\t\t\t\treturn pos;\r\n\t\t\tlet dy=0;\r\n\t\t\tfor (dy=1; dy < this._colsS.heights.length; dy++)\r\n\t\t\t\tif (this._colsS.heights[dy]>pos.y) break;\r\n\r\n\t\t\tpos.y=Math.ceil( (Math.max(0, column)+Math.max(0,dy-1)*7)*24*60/this.config.time_step );\r\n\r\n\t\t\tif (scheduler._drag_mode || this._mode == \"month\")\r\n\t\t\t\tpos.y=(Math.max(0,Math.ceil(column)-1)+Math.max(0,dy-1)*7)*24*60/this.config.time_step;\r\n\r\n\t\t\t//we care about ignored days only during event moving in month view\r\n\t\t\tif (this._drag_mode == \"move\"){\r\n\t\t\t\tif (scheduler._ignores_detected && scheduler.config.preserve_length){\r\n\t\t\t\t\tpos._ignores = true;\r\n\t\t\t\t\t//get real lengtn of event\r\n\t\t\t\t\tif (!this._drag_event._event_length)\r\n\t\t\t\t\t\tthis._drag_event._event_length = this._get_real_event_length(this._drag_event.start_date, this._drag_event.end_date, { x_step:1, x_unit:\"day\"});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tpos.x=0;\r\n\t\t}\r\n\t}\r\n\tpos.timestamp = +new Date();\r\n\treturn pos;\r\n};\r\nscheduler._close_not_saved=function(){\r\n\tif (new Date().valueOf()-(scheduler._new_event||0) > 500 && scheduler._edit_id){\r\n\t\tconst confirmationText=scheduler.locale.labels.confirm_closing;\r\n\r\n\t\tscheduler._dhtmlx_confirm({\r\n\t\t\tmessage: confirmationText, \r\n\t\t\ttitle: scheduler.locale.labels.title_confirm_closing, \r\n\t\t\tcallback: function() { \r\n\t\t\t\tscheduler.editStop(scheduler.config.positive_closing);\r\n\t\t\t}\r\n\t\t});\r\n\t\tif(confirmationText){\r\n\t\t\tthis._drag_id = this._drag_pos = this._drag_mode = null;\r\n\t\t}\r\n\t}\r\n};\r\nscheduler._correct_shift=function(start, back){\r\n\treturn start-=((new Date(scheduler._min_date)).getTimezoneOffset()-(new Date(start)).getTimezoneOffset())*60000*(back?-1:1);\r\n};\r\n\r\nscheduler._is_pos_changed = function(old_pos, new_pos){\r\n\tfunction diff(old_val, new_val, acc){\r\n\t\treturn !!(Math.abs(old_val - new_val) > acc);\r\n\t}\r\n\r\n\tif(!(old_pos && this._drag_pos)){\r\n\t\treturn true;\r\n\t}\r\n\tconst delay = 100;\r\n\tconst d_pos = 5;\r\n\r\n\t// start drag only if passed some time since mouse down, or if mouse position changed sufficiently\r\n\treturn !!(this._drag_pos.has_moved || !this._drag_pos.timestamp || (new_pos.timestamp - this._drag_pos.timestamp > delay) || diff(old_pos.ev.clientX, new_pos.ev.clientX, d_pos) || diff(old_pos.ev.clientY, new_pos.ev.clientY, d_pos));\r\n};\r\n\r\nscheduler._correct_drag_start_date = function(start){\r\n\tlet obj;\r\n\tif (scheduler.matrix)\r\n\t\tobj = scheduler.matrix[scheduler._mode];\r\n\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\tstart = new Date(start);\r\n\tlet len = 1;\r\n\tif(obj._start_correction || obj._end_correction)\r\n\t\tlen = (obj.last_hour||0)*60 - (start.getHours()*60+start.getMinutes()) || 1;\r\n\r\n\treturn start*1 + (scheduler._get_fictional_event_length(start, len, obj) - len);\r\n};\r\nscheduler._correct_drag_end_date = function(start, duration){\r\n\tlet obj;\r\n\tif (scheduler.matrix) {\r\n\t\tobj = scheduler.matrix[scheduler._mode];\r\n\t}\r\n\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\tconst end = start*1 + scheduler._get_fictional_event_length(start, duration, obj);\r\n\treturn new Date(end*1 - (scheduler._get_fictional_event_length(end, -1, obj, -1) + 1));\r\n};\r\n\r\nscheduler._on_mouse_move=function(e){\r\n\tif (this._drag_mode){\r\n\t\tvar pos=this._mouse_coords(e);\r\n\t\tif (this._is_pos_changed(this._drag_pos, pos)){\r\n\t\t\tvar start, end;\r\n\t\t\tif (this._edit_id!=this._drag_id)\r\n\t\t\t\tthis._close_not_saved();\r\n\r\n\t\t\tif(!this._drag_mode)\r\n\t\t\t\treturn;\r\n\r\n\t\t\tvar mousedownPos = null;\r\n\t\t\tif(this._drag_pos && !this._drag_pos.has_moved){\r\n\t\t\t\tmousedownPos = this._drag_pos;\r\n\t\t\t\tmousedownPos.has_moved = true;\r\n\t\t\t}\r\n\r\n\t\t\tthis._drag_pos = pos;\r\n\r\n\t\t\tthis._drag_pos.has_moved = true;\r\n\r\n\t\t\tif (this._drag_mode==\"create\"){\r\n\r\n\t\t\t\t// use mouse down position as a starting point for drag-create\r\n\t\t\t\tif(mousedownPos){\r\n\t\t\t\t\tpos = mousedownPos;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._close_not_saved();\r\n\t\t\t\tthis.unselect(this._select_id);\r\n\t\t\t\tthis._loading=true; //will be ignored by dataprocessor\r\n\r\n\t\t\t\tstart = this._get_date_from_pos(pos).valueOf();\r\n\r\n\t\t\t\tif (!this._drag_start) {\r\n\t\t\t\t\tvar res = this.callEvent(\"onBeforeEventCreated\", [e, this._drag_id]);\r\n\t\t\t\t\tif (!res){\r\n\t\t\t\t\t\tthis._loading=false;\r\n\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis._loading=false;\r\n\t\t\t\t\tthis._drag_start=start;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tend = start;\r\n\t\t\t\tif (end == this._drag_start) {\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar start_date = new Date(this._drag_start);\r\n\t\t\t\tvar end_date = new Date(end);\r\n\t\t\t\tif ( (this._mode == \"day\" || this._mode == \"week\") &&\r\n\t\t\t\t\t(start_date.getHours() == end_date.getHours() &&\r\n\t\t\t\t\tstart_date.getMinutes() == end_date.getMinutes()) ) {\r\n\t\t\t\t\t\tend_date = new Date(this._drag_start+1000);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\tthis._drag_id=this.uid();\r\n\t\t\t\tthis.addEvent(start_date, end_date, this.locale.labels.new_event, this._drag_id, pos.fields);\r\n\r\n\t\t\t\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\t\t\t\tthis._loading=false;\r\n\t\t\t\tthis._drag_mode=\"new-size\";\r\n\r\n\t\t\t}\r\n\r\n\t\t\tvar timeStep = this.config.time_step;\r\n\t\t\tvar ev=this.getEvent(this._drag_id);\r\n\t\t\tvar obj;\r\n\t\t\tif (scheduler.matrix)\r\n\t\t\t\tobj = scheduler.matrix[scheduler._mode];\r\n\t\t\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\t\t\tif (this._drag_mode==\"move\"){\r\n\t\t\t\tstart = this._min_date.valueOf()+(pos.y*this.config.time_step+pos.x*24*60)*60000;\r\n\t\t\t\tif (!pos.custom && this._table_view) {\r\n\t\t\t\t\tstart += this.date.time_part(ev.start_date) * 1000;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!this._table_view && this._dragEventBody && this._drag_event._move_event_shift === undefined) {\r\n\t\t\t\t\tthis._drag_event._move_event_shift = start - ev.start_date;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (this._drag_event._move_event_shift) {\r\n\t\t\t\t\tstart -= this._drag_event._move_event_shift;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstart = this._correct_shift(start);\r\n\r\n\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view && obj){\r\n\r\n\t\t\t\t\tstart = scheduler._correct_drag_start_date(start);\r\n\t\t\t\t\tend = scheduler._correct_drag_end_date(start,this._drag_event._event_length);\r\n\r\n\t\t\t\t} else\r\n\t\t\t\t\tend = ev.end_date.valueOf()-(ev.start_date.valueOf()-start);\r\n\t\t\t} else { // resize\r\n\t\t\t\tstart = ev.start_date.valueOf();\r\n\t\t\t\tend = ev.end_date.valueOf();\r\n\t\t\t\tif (this._table_view) {\r\n\t\t\t\t\tvar resize_date = this._min_date.valueOf()+pos.y*this.config.time_step*60000 + (pos.custom?0:24*60*60000);\r\n\t\t\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\t\t\tresize_date = this._correct_shift(resize_date, false);\r\n\t\t\t\t\t\tif( this._drag_from_start ) {\r\n\t\t\t\t\t\t\tvar day = 24*60*60000;\r\n\t\t\t\t\t\t\tif( resize_date <= scheduler.date.date_part(new Date(end+day-1)).valueOf() ) // to get end time as 23:59:59 and then the day start\r\n\t\t\t\t\t\t\t\tstart = resize_date - day;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tend = resize_date;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif(this.config.preserve_length) {\r\n\t\t\t\t\t\t\tif (pos.resize_from_start) {\r\n\t\t\t\t\t\t\t\tstart = scheduler._correct_drag_start_date(resize_date);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tend = scheduler._correct_drag_end_date(resize_date, 0);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tif (pos.resize_from_start) {\r\n\t\t\t\t\t\t\t\tstart = resize_date;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tend = resize_date;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar end_day_start = this.date.date_part(new Date(ev.end_date.valueOf() - 1)).valueOf();\r\n\t\t\t\t\tvar end_day_date = new Date(end_day_start);\r\n\t\t\t\t\tvar firstHour = this.config.first_hour;\r\n\t\t\t\t\tvar lastHour = this.config.last_hour;\r\n\t\t\t\t\tvar maxY = (lastHour - firstHour) * (60/timeStep);\r\n\r\n\t\t\t\t\tthis.config.time_step = 1;\r\n\t\t\t\t\tvar precisePos = this._mouse_coords(e);\r\n\t\t\t\t\tthis.config.time_step = timeStep;\r\n\r\n\t\t\t\t\tvar minDate = pos.y*timeStep*60000;\r\n\t\t\t\t\tvar maxDate = Math.min(pos.y + 1, maxY)*timeStep*60000;\r\n\t\t\t\t\tvar preciseDate = precisePos.y*60000;\r\n\r\n\t\t\t\t\t// rounding end date to the closest time step\r\n\t\t\t\t\tif(Math.abs(minDate - preciseDate) > Math.abs(maxDate - preciseDate)){\r\n\t\t\t\t\t\tend = end_day_start + maxDate;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tend = end_day_start + minDate;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = end + ((new Date(end)).getTimezoneOffset() - end_day_date.getTimezoneOffset()) * 60000;\r\n\t\t\t\t\tthis._els[\"dhx_cal_data\"][0].style.cursor=\"s-resize\";\r\n\t\t\t\t\tif (this._mode == \"week\" || this._mode == \"day\")\r\n\t\t\t\t\t\tend = this._correct_shift(end);\r\n\t\t\t\t}\r\n\t\t\t\tif (this._drag_mode == \"new-size\") {\r\n\t\t\t\t\tif (end <= this._drag_start){\r\n\t\t\t\t\t\tvar shift = pos.shift||((this._table_view && !pos.custom)?24*60*60000:0);\r\n\t\t\t\t\t\tstart = end-(pos.shift?0:shift);\r\n\t\t\t\t\t\tend = this._drag_start+(shift||(timeStep*60000));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tstart = this._drag_start;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (end<=start)\r\n\t\t\t\t\t\tend=start+timeStep*60000;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar new_end = new Date(end-1);\r\n\t\t\tvar new_start = new Date(start);\r\n\t\t\t//deny drag out of visible scheduler scale in timeline view\r\n\t\t\tif(this._drag_mode==\"move\" && scheduler.config.limit_drag_out &&\r\n\t\t\t\t(+new_start < +scheduler._min_date || +end > +scheduler._max_date)){\r\n\r\n\t\t\t\tif(+ev.start_date < +scheduler._min_date || +ev.end_date > +scheduler._max_date){\r\n\t\t\t\t\t// not move event if it's already outside time scale\r\n\t\t\t\t\tnew_start = new Date(ev.start_date);\r\n\t\t\t\t\tend = new Date(ev.end_date);\r\n\t\t\t\t}else{\r\n\r\n\t\t\t\t\tvar duration = end - new_start;\r\n\r\n\t\t\t\t\tif(+new_start < +scheduler._min_date){\r\n\t\t\t\t\t\tnew_start = new Date(scheduler._min_date);\r\n\t\t\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view){\r\n\t\t\t\t\t\t\tnew_start = new Date(scheduler._correct_drag_start_date(new_start));\r\n\t\t\t\t\t\t\tif(obj._start_correction)\r\n\t\t\t\t\t\t\t\tnew_start = new Date(new_start.valueOf() + obj._start_correction);\r\n\t\t\t\t\t\t\tend = new Date(new_start*1 + this._get_fictional_event_length(new_start, this._drag_event._event_length, obj));\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tend = new Date(+new_start + duration);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tend = new Date(scheduler._max_date);\r\n\r\n\t\t\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view){\r\n\t\t\t\t\t\t\tif(obj._end_correction)\r\n\t\t\t\t\t\t\t\tend = new Date(end.valueOf() - obj._end_correction);\r\n\t\t\t\t\t\t\tend = new Date(end*1 - this._get_fictional_event_length(end, 0, obj, true));\r\n\t\t\t\t\t\t\tnew_start = new Date(end*1 - this._get_fictional_event_length(end, this._drag_event._event_length, obj, true));\r\n\t\t\t\t\t\t\tif(this._ignores_detected){\r\n\t\t\t\t\t\t\t\tnew_start = scheduler.date.add(new_start, obj.x_step, obj.x_unit);\r\n\t\t\t\t\t\t\t\tend = new Date(end*1 - this._get_fictional_event_length(end, 0, obj, true));\r\n\t\t\t\t\t\t\t\tend = scheduler.date.add(end, obj.x_step, obj.x_unit);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tnew_start = new Date(+end - duration);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\tvar new_end = new Date(end-1);\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\t// fix event dates when resized to bottom of the column (day/week views)\r\n\t\t\tif(!this._table_view && this._dragEventBody &&\r\n\t\t\t\t!scheduler.config.all_timed &&\r\n\t\t\t\t((!scheduler._get_section_view() && pos.x != this._get_event_sday({start_date: new Date(start), end_date:new Date(start)})) || new Date(start).getHours() < this.config.first_hour)){\r\n\t\t\t\tvar duration = end - new_start;\r\n\t\t\t\tif (this._drag_mode == \"move\") {\r\n\t\t\t\t\tvar day = this._min_date.valueOf() + (pos.x * 24 * 60) * 60000;\r\n\t\t\t\t\tnew_start = new Date(day);\r\n\t\t\t\t\tnew_start.setHours(this.config.first_hour);\r\n\t\t\t\t\tend = new Date(new_start.valueOf() + duration);\r\n\t\t\t\t\tnew_end = new Date(end-1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// fix event dates when resized to bottom of the column (day/week views)\r\n\t\t\tif(!this._table_view &&\r\n\t\t\t\t!scheduler.config.all_timed &&\r\n\t\t\t\t((!scheduler.getView() && pos.x != this._get_event_sday({start_date: new Date(end), end_date:new Date(end)})) || new Date(end).getHours() >= this.config.last_hour)){\r\n\t\t\t\tvar duration = end - new_start;\r\n\t\t\t\tvar day = this._min_date.valueOf()+(pos.x*24*60)*60000;\r\n\t\t\t\tend = scheduler.date.date_part(new Date(day));\r\n\t\t\t\tend.setHours(this.config.last_hour);\r\n\t\t\t\tnew_end = new Date(end-1);\r\n\t\t\t\tif(this._drag_mode == \"move\"){\r\n\t\t\t\t\tnew_start = new Date(+end - duration);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//prevent out-of-borders situation for day|week view\r\n\t\t\tif ( this._table_view || (new_end.getDate()==new_start.getDate() && new_end.getHours()=ed)\r\n\t\t\t\tcls += ' dhx_after';\r\n\t\t\telse if (sd.valueOf()==cd.valueOf())\r\n\t\t\t\tcls += ' dhx_now';\r\n\r\n\t\t\tif (this._ignores_detected && this._ignores[j]){\r\n\t\t\t\tcls += \" dhx_scale_ignore\";\r\n\t\t\t}\r\n\r\n\t\t\tcell.className = cls + \" \" + this.templates.month_date_class(sd, cd);\r\n\r\n\t\t\tcell.setAttribute(\"data-cell-date\", scheduler.templates.format_date(sd));\r\n\t\t\tvar body_class = \"dhx_month_body\";\r\n\t\t\tvar head_class = \"dhx_month_head\";\r\n\t\t\tif (j === 0 && this.config.left_border) {\r\n\t\t\t\tbody_class += \" dhx_month_body_border\";\r\n\t\t\t\thead_class += \" dhx_month_head_border\";\r\n\t\t\t}\r\n\t\t\tif (!this._ignores_detected || !this._ignores[j]){\r\n\t\t\t\tcell.style.width = tdwidths[j];\r\n\t\t\t\tthis._waiAria.monthCellAttr(cell, sd);\r\n\r\n\t\t\t\tvar cellHead = document.createElement(\"div\");\r\n\t\t\t\tcellHead.style.height = scheduler.xy.month_head_height + \"px\";\r\n\t\t\t\tcellHead.className = head_class;\r\n\t\t\t\tcellHead.innerHTML = this.templates.month_day(sd);\r\n\t\t\t\tcell.appendChild(cellHead);\r\n\r\n\t\t\t\tvar cellBody = document.createElement(\"div\");\r\n\t\t\t\tcellBody.className = body_class;\r\n\t\t\t\t// cellBody.style.height = row_height + \"px\";\r\n\t\t\t\t// cellBody.style.width = tdwidths[j];\r\n\t\t\t\tcell.appendChild(cellBody);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tcell.appendChild(document.createElement(\"div\"));\r\n\t\t\t\tcell.appendChild(document.createElement(\"div\"));\r\n\t\t\t}\r\n\t\t\trendered_dates.push(sd);\r\n\t\t\tvar bf1 = sd.getDate();\r\n\t\t\tsd=this.date.add(sd,1,\"day\");\r\n\t\t\tif (sd.getDate() - bf1 > 1)\r\n\t\t\t\tsd = new Date(sd.getFullYear(), sd.getMonth(), bf1 + 1, 12, 0);\r\n\t\t}\r\n\r\n\t\tscheduler._colsS.heights[i] = cellheight;\r\n\t\tcellheight += getCellHeight(i);\r\n\t}\r\n\r\n\tthis._min_date = view_start;\r\n\tthis._max_date = sd;\r\n\r\n\tdiv.innerHTML = \"\";\r\n\tdiv.appendChild(table);\r\n\r\n\tthis._scales = {};\r\n\tvar cells = div.querySelectorAll('[data-cell-date]');\r\n\tcells.forEach((cell) => {\r\n\t\tconst date = scheduler.templates.parse_date(cell.getAttribute(\"data-cell-date\"));\r\n\t\tconst body = cell.querySelector(\".dhx_month_body\");\r\n\t\tthis._scales[+date] = body;\r\n\t\tthis.callEvent(\"onScaleAdd\", [this._scales[+date], date]);\r\n\t});\r\n\r\n\treturn this._max_date;\r\n};\r\n\r\nscheduler._reset_month_scale=function(b,dd,sd,rows){\r\n\t//recalculates rows height and redraws month layout\r\n\tvar ed=scheduler.date.add(dd,1,\"month\");\r\n\r\n\t//trim time part for comparison reasons\r\n\tvar cd = scheduler._currentDate();\r\n\tthis.date.date_part(cd);\r\n\tthis.date.date_part(sd);\r\n\r\n\trows = rows || Math.ceil(Math.round((ed.valueOf()-sd.valueOf()) / (60*60*24*1000) ) / 7);\r\n\r\n\tvar height = (Math.floor(b.clientHeight/rows) - this.xy.month_head_height);\r\n\r\n\tthis._colsS.height = height + this.xy.month_head_height;\r\n\tthis._colsS.heights = [];\r\n\r\n\treturn scheduler._render_month_scale(b, dd, sd, rows);\r\n\r\n};\r\n\r\nscheduler.getView = function (viewName) {\r\n\tif (!viewName) {\r\n\t\tviewName = scheduler.getState().mode;\r\n\t}\r\n\tif (scheduler.matrix && scheduler.matrix[viewName]) {\r\n\t\treturn scheduler.matrix[viewName];\r\n\t}\r\n\r\n\tif (scheduler._props && scheduler._props[viewName]) {\r\n\t\treturn scheduler._props[viewName];\r\n\t}\r\n\r\n\treturn null;\r\n};\r\n\r\nscheduler.getLabel = function(property, key) {\r\n\tvar sections = this.config.lightbox.sections;\r\n\tfor (var i=0; i scheduler.getState().max_date.valueOf()){\r\n\t\t\tendColumnIndex += getDaysDifference(endDate, scheduler.getState().max_date);\r\n\t\t}\r\n\t} else{\r\n\t\tendColumnIndex = Math.round(eventLength/60/60/1000/24);\r\n\t}\r\n\r\n\tvar last_column = true;\r\n\twhile (startColumnIndex < endColumnIndex){\r\n\t\tvar check = scheduler.date.add(endDate, -config.x_step, config.x_unit);\r\n\t\tif (ignore && ignore(endDate) && (!last_column || (last_column && ignore(check) ))){\r\n\t\t\teventLength -= (endDate-check);\r\n\r\n\t\t}else{\r\n\t\t\tlet excludedDuration = 0;\r\n\t\t\tconst intervalStart = new Date(Math.max(check.valueOf(), startDate.valueOf()));\r\n\t\t\tconst intervalEnd = endDate;\r\n\t\t\tconst leftCellCutOffStart = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.first_hour);\r\n\t\t\tconst leftCellCutOffEnd = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.last_hour||24);\r\n\t\t\tconst rightCellCutOffStart = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.first_hour);\r\n\t\t\tconst rightCellCutOffEnd = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.last_hour||24);\r\n\r\n\t\t\tif(intervalEnd.valueOf() > rightCellCutOffEnd.valueOf()){\r\n\t\t\t\texcludedDuration += intervalEnd - rightCellCutOffEnd;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalEnd.valueOf() > rightCellCutOffStart.valueOf()){\r\n\t\t\t\texcludedDuration += config._start_correction;\r\n\t\t\t} else {\r\n\t\t\t\texcludedDuration += intervalEnd.getHours()*60*60*1000 + intervalEnd.getMinutes()*60*1000;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalStart.valueOf() < leftCellCutOffEnd.valueOf()){\r\n\t\t\t\texcludedDuration += config._end_correction;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalStart.valueOf() < leftCellCutOffStart.valueOf()){\r\n\t\t\t\texcludedDuration += (leftCellCutOffStart.valueOf() - intervalStart.valueOf());\r\n\t\t\t}\r\n\t\t\t\r\n\r\n\t\t\teventLength -= excludedDuration;\r\n\t\t\tlast_column = false;\r\n\t\t}\r\n\t\tendDate = check;\r\n\t\tendColumnIndex--;\r\n\t}\r\n\treturn eventLength;\r\n};\r\nscheduler._get_fictional_event_length=function(end_date, ev_length, obj, back){\r\n\tvar sd = new Date(end_date);\r\n\tvar dir = back ? -1 : 1;\r\n\r\n\t//get difference caused by first|last hour\r\n\tif (obj._start_correction || obj._end_correction){\r\n\t\tvar today;\r\n\t\tif (back)\r\n\t\t\ttoday = (sd.getHours()*60+sd.getMinutes()) - (obj.first_hour||0)*60;\r\n\t\telse\r\n\t\t\ttoday = (obj.last_hour||0)*60 - (sd.getHours()*60+sd.getMinutes());\r\n\t\tvar per_day = (obj.last_hour - obj.first_hour)*60;\r\n\t\tvar days = Math.ceil( (ev_length / (60*1000) - today ) / per_day);\r\n\t\tif(days < 0) days = 0;\r\n\t\tev_length += days * (24*60 - per_day) * 60 * 1000;\r\n\t}\r\n\r\n\tvar fd = new Date(end_date*1+ev_length*dir);\r\n\tvar ignore = this[\"ignore_\"+this._mode];\r\n\r\n\tvar start_slot = 0,\r\n\t\tend_slot;\r\n\tif (obj.render){\r\n\t\tstart_slot = this._get_date_index(obj, sd);\r\n\t\tend_slot = this._get_date_index(obj, fd);\r\n\t} else{\r\n\t\tend_slot = Math.round(ev_length/60/60/1000/24);\r\n\t}\r\n\r\n\twhile (start_slot*dir <= end_slot*dir){\r\n\t\tvar check = scheduler.date.add(sd, obj.x_step*dir, obj.x_unit);\r\n\t\tif (ignore && ignore(sd)){\r\n\t\t\tev_length += (check-sd)*dir;\r\n\t\t\tend_slot += dir;\r\n\t\t}\r\n\r\n\t\tsd = check;\r\n\t\tstart_slot+=dir;\r\n\t}\r\n\r\n\treturn ev_length;\r\n};\r\n\r\nscheduler._get_section_view = function(){\r\n\treturn this.getView();\r\n};\r\n\r\nscheduler._get_section_property = function(){\r\n\tif(this.matrix && this.matrix[this._mode]){\r\n\t\treturn this.matrix[this._mode].y_property;\r\n\t}else if(this._props && this._props[this._mode]){\r\n\t\treturn this._props[this._mode].map_to;\r\n\t}\r\n\treturn null;\r\n};\r\n\r\nscheduler._is_initialized = function(){\r\n\tvar state = this.getState();\r\n\treturn (this._obj && state.date && state.mode);\r\n};\r\nscheduler._is_lightbox_open = function(){\r\n\tvar state = this.getState();\r\n\treturn state.lightbox_id !== null && state.lightbox_id !== undefined;\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n(function(){\r\n\r\n\t// eslint-disable-next-line no-control-regex\r\n\tvar htmlTags = new RegExp(\"<(?:.|\\n)*?>\", \"gm\");\r\n\tvar extraSpaces = new RegExp(\" +\", \"gm\");\r\n\r\n\tfunction stripHTMLLite(htmlText){\r\n\t\treturn (htmlText + \"\")\r\n\t\t\t.replace(htmlTags, \" \").\r\n\t\t\treplace(extraSpaces, \" \");\r\n\t}\r\n\r\n\tvar singleQuotes = new RegExp(\"'\", \"gm\");\r\n\tfunction escapeQuotes(text){\r\n\t\treturn (text + \"\").replace(singleQuotes, \"'\");\r\n\t}\r\n\r\n\tscheduler._waiAria = {\r\n\t\tgetAttributeString: function(attr){\r\n\t\t\tvar attributes = [\" \"];\r\n\t\t\tfor(var i in attr){\r\n\t\t\t\tif(typeof attr[i] != \"function\" && typeof attr[i] != \"object\") {\r\n\t\t\t\t\tvar text = escapeQuotes(stripHTMLLite(attr[i]));\r\n\t\t\t\t\tattributes.push(i + \"='\" + text + \"'\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tattributes.push(\" \");\r\n\t\t\treturn attributes.join(\" \");\r\n\t\t},\r\n\t\tsetAttributes: function(div, values){\r\n\t\t\tfor(var i in values){\r\n\t\t\t\tdiv.setAttribute(i, stripHTMLLite(values[i]));\r\n\t\t\t}\r\n\t\t\treturn div;\r\n\t\t},\r\n\r\n\t\tlabelAttr: function(div, content){\r\n\t\t\treturn this.setAttributes(div, {\"aria-label\": content});\r\n\t\t},\r\n\t\tlabel: function(label){\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": label});\r\n\t\t},\r\n\r\n\t\t// day/week/units\r\n\r\n\t\thourScaleAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\r\n\t\t},\r\n\t\tmonthCellAttr: function(div, date){\r\n\t\t\tthis.labelAttr(div, scheduler.templates.day_date(date));\r\n\t\t},\r\n\r\n\t\tnavBarDateAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\t\t},\r\n\t\tdayHeaderAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\t\t},\r\n\r\n\t\tdayColumnAttr: function(div, date){\r\n\t\t\tthis.dayHeaderAttr(div, scheduler.templates.day_date(date));\r\n\t\t},\r\n\r\n\t\theaderButtonsAttributes: function(div, label){\r\n\t\t\treturn this.setAttributes(div, {\"role\":\"button\", \"aria-label\":label});\r\n\t\t},\r\n\r\n\t\theaderToggleState: function(div, isActive){\r\n\t\t\treturn this.setAttributes(div, {\"aria-pressed\": isActive ? \"true\" : \"false\"});\r\n\t\t},\r\n\r\n\r\n\t\tgetHeaderCellAttr:function(dateString){\r\n\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": dateString});\r\n\t\t},\r\n\r\n\r\n\t\teventAttr: function(event, div){\r\n\t\t\tthis._eventCommonAttr(event, div);\r\n\t\t},\r\n\r\n\r\n\t\t_eventCommonAttr: function(event, div){\r\n\t\t\tdiv.setAttribute(\"aria-label\", stripHTMLLite(scheduler.templates.event_text(event.start_date, event.end_date, event)));\r\n\r\n\t\t\tif(scheduler.config.readonly){\r\n\t\t\t\tdiv.setAttribute(\"aria-readonly\", true);\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif(event.$dataprocessor_class){\r\n\t\t\t\tdiv.setAttribute(\"aria-busy\", true);\r\n\t\t\t}\r\n\r\n\r\n\t\t\tdiv.setAttribute(\"aria-selected\",\r\n\t\t\t\t(scheduler.getState().select_id == event.id) ? \"true\" : \"false\");\r\n\t\t},\r\n\r\n\t\tsetEventBarAttr: function(event, div){\r\n\t\t\tthis._eventCommonAttr(event, div);\r\n\t\t},\r\n\r\n\t\t_getAttributes: function(attributeSetter, arg){\r\n\t\t\tvar result = {\r\n\t\t\t\tsetAttribute:function(name, value){\r\n\t\t\t\t\tthis[name] = value;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\tattributeSetter.apply(this, [arg, result]);\r\n\t\t\treturn result;\r\n\r\n\t\t},\r\n\r\n\t\teventBarAttrString: function(event){\r\n\t\t\treturn this.getAttributeString(this._getAttributes(this.setEventBarAttr, event));\r\n\t\t},\r\n\r\n\r\n\r\n\t\tagendaHeadAttrString :function(){\r\n\t\t\treturn this.getAttributeString({role: \"row\"});\r\n\t\t},\r\n\t\tagendaHeadDateString :function(label){\r\n\t\t\treturn this.getAttributeString({role: \"columnheader\", \"aria-label\": label});\r\n\t\t},\r\n\t\tagendaHeadDescriptionString :function(label){\r\n\t\t\treturn this.agendaHeadDateString(label);\r\n\t\t},\r\n\t\tagendaDataAttrString: function(){\r\n\t\t\treturn this.getAttributeString({role: \"grid\"});\r\n\t\t},\r\n\t\tagendaEventAttrString: function(event){\r\n\t\t\tvar attrs = this._getAttributes(this._eventCommonAttr, event);\r\n\r\n\t\t\tattrs[\"role\"] = \"row\";\r\n\r\n\t\t\treturn this.getAttributeString(attrs);\r\n\r\n\t\t},\r\n\t\tagendaDetailsBtnString: function(){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels.icon_details});\r\n\t\t},\r\n\r\n\r\n\t\tgridAttrString: function(){\r\n\t\t\treturn this.getAttributeString({role: \"grid\"});\r\n\t\t},\r\n\r\n\t\tgridRowAttrString: function(event){\r\n\t\t\treturn this.agendaEventAttrString(event);\r\n\t\t},\r\n\r\n\t\tgridCellAttrString: function(event, column, value){\r\n\t\t\treturn this.getAttributeString({\"role\":\"gridcell\", \"aria-label\": [\r\n\t\t\t\t(column.label === undefined ? column.id : column.label),\r\n\t\t\t\t\": \",\r\n\t\t\t\tvalue\r\n\t\t\t]});\r\n\t\t},\r\n\r\n\t\tmapAttrString: function(){\r\n\t\t\treturn this.gridAttrString();\r\n\t\t},\r\n\t\tmapRowAttrString: function(event){\r\n\t\t\treturn this.gridRowAttrString(event);\r\n\t\t},\r\n\t\tmapDetailsBtnString: function(){\r\n\t\t\treturn this.agendaDetailsBtnString();\r\n\t\t},\r\n\r\n\t\tminicalHeader: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"id\":headerId+\"\",\r\n\t\t\t\t\"aria-live\":\"assertice\",\r\n\t\t\t\t\"aria-atomic\":\"true\"\r\n\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalGrid: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"aria-labelledby\":headerId+\"\",\r\n\t\t\t\t\"role\":\"grid\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalRow: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"row\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalDayCell: function(div, date){\r\n\t\t\tvar selected = (date.valueOf() < scheduler._max_date.valueOf() && date.valueOf() >= scheduler._min_date.valueOf());\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"gridcell\",\r\n\t\t\t\t\"aria-label\": scheduler.templates.day_date(date),\r\n\t\t\t\t\"aria-selected\": selected ? \"true\" : \"false\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalHeadCell: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"columnheader\"\r\n\t\t\t});\r\n\t\t},\r\n\r\n\r\n\t\tweekAgendaDayCell: function(div, date){\r\n\t\t\tvar header = div.querySelector(\".dhx_wa_scale_bar\");\r\n\t\t\tvar content = div.querySelector(\".dhx_wa_day_data\");\r\n\t\t\tvar headerId = scheduler.uid() + \"\";\r\n\t\t\tthis.setAttributes(header, { \"id\": headerId});\r\n\t\t\tthis.setAttributes(content, { \"aria-labelledby\": headerId});\r\n\r\n\t\t},\r\n\t\tweekAgendaEvent: function(div, event){\r\n\t\t\tthis.eventAttr(event, div);\r\n\t\t},\r\n\r\n\t\tlightboxHiddenAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t},\r\n\r\n\t\tlightboxVisibleAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"false\");\r\n\t\t},\r\n\r\n\t\tlightboxSectionButtonAttrString: function(label){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":label, \"tabindex\":\"0\"});\r\n\t\t},\r\n\r\n\t\tyearHeader: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"id\":headerId+\"\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tyearGrid: function(div, headerId){\r\n\t\t\tthis.minicalGrid(div, headerId);\r\n\t\t},\r\n\t\tyearHeadCell: function(div){\r\n\t\t\treturn this.minicalHeadCell(div);\r\n\t\t},\r\n\t\tyearRow: function(div){\r\n\t\t\treturn this.minicalRow(div);\r\n\t\t},\r\n\t\tyearDayCell: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"gridcell\"\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\tlightboxAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t\tdiv.firstChild.setAttribute(\"role\", \"heading\");\r\n\t\t},\r\n\r\n\t\tlightboxButtonAttrString:function(buttonName){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels[buttonName], \"tabindex\":\"0\"});\r\n\t\t},\r\n\t\teventMenuAttrString: function(iconName){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels[iconName]});\r\n\t\t},\r\n\t\tlightboxHeader: function(div, headerText){\r\n\t\t\tdiv.setAttribute(\"aria-label\", headerText);\r\n\t\t},\r\n\r\n\t\tlightboxSelectAttrString: function(time_option){\r\n\t\t\tvar label = \"\";\r\n\r\n\t\t\tswitch (time_option) {\r\n\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.year;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%m\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.month;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%d\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.day;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%H:%i\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.hour + \" \" + scheduler.locale.labels.minute;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": label});\r\n\t\t},\r\n\r\n\r\n\t\tmessageButtonAttrString: function(buttonLabel){\r\n\t\t\treturn \"tabindex='0' role='button' aria-label='\"+buttonLabel+\"'\";\r\n\t\t},\r\n\r\n\t\tmessageInfoAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"alert\");\r\n\t\t\t//div.setAttribute(\"tabindex\", \"-1\");\r\n\t\t},\r\n\r\n\t\tmessageModalAttr: function(div, uid){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t\tif(uid){\r\n\t\t\t\tdiv.setAttribute(\"aria-labelledby\", uid);\r\n\t\t\t}\r\n\r\n\t\t\t//\tdiv.setAttribute(\"tabindex\", \"-1\");\r\n\t\t},\r\n\r\n\t\tquickInfoAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t},\r\n\r\n\t\tquickInfoHeaderAttrString: function(){\r\n\t\t\treturn \" role='heading' \";\r\n\t\t},\r\n\r\n\t\tquickInfoHeader: function(div, header){\r\n\t\t\tdiv.setAttribute(\"aria-label\", header);\r\n\t\t},\r\n\r\n\t\tquickInfoButtonAttrString: function(label){\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"role\":\"button\", \"aria-label\":label, \"tabindex\":\"0\"});\r\n\t\t},\r\n\r\n\t\ttooltipAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"tooltip\");\r\n\t\t},\r\n\r\n\t\ttooltipVisibleAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"false\");\r\n\t\t},\r\n\r\n\t\ttooltipHiddenAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t}\r\n\t};\r\n\r\n\tfunction isDisabled(){\r\n\t\treturn !scheduler.config.wai_aria_attributes;\r\n\t}\r\n\r\n\tfor(var i in scheduler._waiAria){\r\n\t\tscheduler._waiAria[i] = (function(payload){\r\n\t\t\treturn function(){\r\n\t\t\t\tif(isDisabled()){\r\n\t\t\t\t\treturn \" \";\r\n\t\t\t\t}\r\n\t\t\t\treturn payload.apply(this, arguments);\r\n\t\t\t};\r\n\t\t})(scheduler._waiAria[i]);\r\n\t}\r\n\r\n\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\treturn function assert(check, message){\r\n\t\tif (!check){\r\n\t\t\tif(scheduler.config.show_errors && scheduler.callEvent(\"onError\",[message]) !== false) {\r\n\t\t\t\tif (scheduler.message) {\r\n\t\t\t\t\tscheduler.message({type: \"error\", text: message, expire: -1});\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// eslint-disable-next-line\r\n\t\t\t\t\tconsole.log(message);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// eslint-disable-next-line no-debugger\r\n\t\t\t\tdebugger;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n}","export default function extend(scheduler) {\r\n\r\nif (window.jQuery){\r\n\r\n(function( $ ){\r\n\tvar counter = 0;\r\n\tvar methods = [];\r\n\t$.fn.dhx_scheduler = function(config){\r\n\t\tif (typeof(config) === 'string') {\r\n\t\t\tif (methods[config] ) {\r\n\t\t\t\treturn methods[config].apply(this, []);\r\n\t\t\t}else {\r\n\t\t\t\t$.error('Method ' + config + ' does not exist on jQuery.dhx_scheduler');\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvar views = [];\r\n\t\t\tthis.each(function() {\r\n\t\t\t\tif (this && this.getAttribute){\r\n\t\t\t\t\tif (!this.getAttribute(\"dhxscheduler\")){\r\n\t\t\t\t\t\tvar name = \"scheduler\";\r\n\t\t\t\t\t\tif (counter){\r\n\t\t\t\t\t\t\tname = \"scheduler\" + (counter+1);\r\n\t\t\t\t\t\t\twindow[name] = Scheduler.getSchedulerInstance();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tvar comp = window[name];\r\n\r\n\t\t\t\t\t\tthis.setAttribute(\"dhxscheduler\", name);\r\n\t\t\t\t\t\tfor (var key in config)\r\n\t\t\t\t\t\t\tif (key!=\"data\")\r\n\t\t\t\t\t\t\t\tcomp.config[key] = config[key];\r\n\r\n\t\t\t\t\t\tif (!this.getElementsByTagName(\"div\").length){\r\n\t\t\t\t\t\t\tthis.innerHTML = '
';\r\n\t\t\t\t\t\t\tthis.className += \" dhx_cal_container\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcomp.init(this, comp.config.date, comp.config.mode);\r\n\t\t\t\t\t\tif (config.data)\r\n\t\t\t\t\t\t\tcomp.parse(config.data);\r\n\r\n\t\t\t\t\t\tviews.push(comp);\r\n\t\t\t\t\t\tcounter++;\r\n\t\t\t\t\t} else\r\n\t\t\t\t\t\tviews.push(window[this.getAttribute(\"dhxscheduler\")]);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif (views.length === 1) return views[0];\r\n\t\t\treturn views;\r\n\t\t}\r\n\t};\r\n\r\n\r\n\r\n\r\n})(window.jQuery);\r\n\r\n}\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler.destructor = function(){\r\n\tscheduler.callEvent(\"onDestroy\", []);\r\n\tthis.clearAll();\r\n\r\n\tif(this.$container){\r\n\t\t// FIXME: clear container or remove container\r\n\t\tthis.$container.innerHTML = \"\";\r\n\t\t// scheduler.$domHelpers.remove(this.$container);\r\n\t}\r\n\r\n\tif(this._eventRemoveAll){\r\n\t\tthis._eventRemoveAll();\r\n\t}\r\n\r\n\tif(this.resetLightbox){\r\n\t\tthis.resetLightbox();\r\n\t}\r\n\r\n\tif(this._dp && this._dp.destructor){\r\n\t\tthis._dp.destructor();\r\n\t}\r\n\r\n\t// detachAllEvents should be called last, because in components may be attached events\r\n\tthis.detachAllEvents();\r\n\r\n\tfor(var i in this){\r\n\t\tif(i.indexOf(\"$\") === 0){\r\n\t\t\tdelete this[i];\r\n\t\t}\r\n\t}\r\n\tscheduler.$destroyed = true;\r\n};\r\n\r\n}","import serialize from \"../common/url_serialize.js\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler.Promise = window.Promise; \r\n\r\nfunction createConfig(method, args) {\r\n\tvar result = {\r\n\t\tmethod: method\r\n\t};\r\n\r\n\tif (args.length === 0) {\r\n\t\tthrow new Error(\"Arguments list of query is wrong.\");\r\n\t}\r\n\tif (args.length === 1) {\r\n\t\tif (typeof args[0] === \"string\") {\r\n\t\t\tresult.url = args[0];\r\n\t\t\tresult.async = true;\r\n\t\t} else {\r\n\t\t\tresult.url = args[0].url;\r\n\t\t\tresult.async = (args[0].async || true);\r\n\t\t\tresult.callback = args[0].callback;\r\n\t\t\tresult.headers = args[0].headers;\r\n\t\t}\r\n\t\tif (method === \"POST\" || \"PUT\") {\r\n\t\t\tif (args[0].data) {\r\n\t\t\t\tif (typeof args[0].data !== \"string\") {\r\n\t\t\t\t\tresult.data = serialize(args[0].data);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult.data = args[0].data;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tresult.data = \"\";\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n\tresult.url = args[0];\r\n\tswitch(method) {\r\n\t\tcase \"GET\":\r\n\t\tcase \"DELETE\":\r\n\t\t\tresult.callback = args[1];\r\n\t\t\tresult.headers = args[2];\r\n\t\tbreak;\r\n\t\tcase \"POST\":\r\n\t\tcase \"PUT\":\r\n\t\t\tif (args[1]) {\r\n\t\t\t\tif (typeof args[1] !== \"string\") {\r\n\t\t\t\t\tresult.data = serialize(args[1]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult.data = args[1];\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tresult.data = \"\";\r\n\t\t\t}\r\n\t\t\tresult.callback = args[2];\r\n\t\t\tresult.headers = args[3];\r\n\t\tbreak;\r\n\t}\r\n\treturn result;\r\n}\r\nscheduler.ajax = {\r\n\t// if false - dhxr param will added to prevent caching on client side (default),\r\n\t// if true - do not add extra params\r\n\tcache: true,\r\n\r\n\t// default method for load/loadStruct, post/get allowed\r\n\tmethod: \"get\",\r\n\r\n\tserializeRequestParams: serialize,\r\n\tparse: function(data) {\r\n\t\tif (typeof data !== \"string\") return data;\r\n\r\n\t\tvar obj;\r\n\t\tdata = data.replace(/^[\\s]+/,\"\");\r\n\t\tif (typeof DOMParser !== \"undefined\" && !scheduler.$env.isIE) { // ff,ie9\r\n\t\t\tobj = (new DOMParser()).parseFromString(data, \"text/xml\");\r\n\t\t} else if (typeof window.ActiveXObject !== \"undefined\") {\r\n\t\t\tobj = new window.ActiveXObject(\"Microsoft.XMLDOM\");\r\n\t\t\tobj.async = \"false\";\r\n\t\t\tobj.loadXML(data);\r\n\t\t}\r\n\t\treturn obj;\r\n\t},\r\n\txmltop: function(tagname, xhr, obj) {\r\n\t\tif (typeof xhr.status == \"undefined\" || xhr.status < 400) {\r\n\t\t\tvar xml = (!xhr.responseXML) ? this.parse(xhr.responseText || xhr) : (xhr.responseXML || xhr);\r\n\t\t\tif (xml && xml.documentElement !== null && !xml.getElementsByTagName(\"parsererror\").length) {\r\n\t\t\t\treturn xml.getElementsByTagName(tagname)[0];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (obj !== -1) scheduler.callEvent(\"onLoadXMLError\",[\"Incorrect XML\", arguments[1], obj]);\r\n\t\treturn document.createElement(\"DIV\");\r\n\t},\r\n\txpath: function(xpathExp, docObj) {\r\n\t\tif (!docObj.nodeName) docObj = docObj.responseXML || docObj;\r\n\t\tif (scheduler.$env.isIE) {\r\n\t\t\treturn docObj.selectNodes(xpathExp)||[];\r\n\t\t} else {\r\n\t\t\tvar rows = [];\r\n\t\t\tvar first;\r\n\t\t\tvar col = (docObj.ownerDocument||docObj).evaluate(xpathExp, docObj, null, XPathResult.ANY_TYPE, null);\r\n\r\n\t\t\twhile (true){\r\n\t\t\t\tfirst = col.iterateNext();\r\n\t\t\t\tif(first){\r\n\t\t\t\t\trows.push(first);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn rows;\r\n\t\t}\r\n\t},\r\n\tquery: function(config) {\r\n\t\treturn this._call(\r\n\t\t\t(config.method || \"GET\"),\r\n\t\t\tconfig.url,\r\n\t\t\tconfig.data || \"\",\r\n\t\t\t(config.async || true),\r\n\t\t\tconfig.callback,\r\n\t\t\tconfig.headers\r\n\t\t);\r\n\t},\r\n\tget: function(url, onLoad, headers) {\r\n\t\tvar config = createConfig(\"GET\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tgetSync: function(url, headers) {\r\n\t\tvar config = createConfig(\"GET\", arguments);\r\n\t\tconfig.async = false;\r\n\t\treturn this.query(config);\r\n\t},\r\n\tput: function(url, postData, onLoad, headers) {\r\n\t\tvar config = createConfig(\"PUT\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tdel: function(url, onLoad, headers) {\r\n\t\t/**\r\n\t\t * https://tools.ietf.org/html/rfc7231#section-4.3.5\r\n\t\t * A payload within a DELETE request message has no defined semantics;\r\n\t\t * sending a payload body on a DELETE request might cause some existing\r\n\t\t * implementations to reject the request.\r\n\t\t */\r\n\t\tvar config = createConfig(\"DELETE\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tpost: function(url, postData, onLoad, headers) {\r\n\t\tif (arguments.length == 1) {\r\n\t\t\tpostData = \"\";\r\n\t\t} else if (arguments.length == 2 && typeof(postData) == \"function\") {\r\n\t\t\tonLoad = postData;\r\n\t\t\tpostData = \"\";\r\n\t\t}\r\n\t\tvar config = createConfig(\"POST\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tpostSync: function(url, postData, headers) {\r\n\t\tpostData = (postData === null ? \"\" : String(postData));\r\n\r\n\t\tvar config = createConfig(\"POST\", arguments);\r\n\t\tconfig.async = false;\r\n\t\treturn this.query(config);\r\n\t},\r\n\t_call: function(method, url, postData, async, onLoad, headers) {\r\n\t\treturn new scheduler.Promise((function(resolve, reject) {\r\n\t\t\tvar t = (typeof XMLHttpRequest !== undefined && !scheduler.$env.isIE ? new XMLHttpRequest() : new window.ActiveXObject(\"Microsoft.XMLHTTP\"));\r\n\t\t\tvar isQt = (navigator.userAgent.match(/AppleWebKit/) !== null && navigator.userAgent.match(/Qt/) !== null && navigator.userAgent.match(/Safari/) !== null);\r\n\r\n\t\t\tif (!!async) {\r\n\t\t\t\tt.addEventListener(\"readystatechange\", function() {\r\n\t\t\t\t\tif ((t.readyState == 4) || (isQt && t.readyState == 3)) { // what for long response and status 404?\r\n\t\t\t\t\t\tif (t.status != 200 || t.responseText === \"\")\r\n\t\t\t\t\t\t\tif (!scheduler.callEvent(\"onAjaxError\", [t])) return;\r\n\r\n\t\t\t\t\t\tsetTimeout(function() {\r\n\t\t\t\t\t\t\tif (typeof(onLoad) == \"function\") {\r\n\t\t\t\t\t\t\t\tonLoad.apply(window, [{xmlDoc:t, filePath:url}]); // dhtmlx-compat, response.xmlDoc.responseXML/responseText\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tresolve(t);\r\n\t\t\t\t\t\t\tif (typeof(onLoad) == \"function\") {\r\n\t\t\t\t\t\t\t\tonLoad = null;\r\n\t\t\t\t\t\t\t\tt = null;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}, 0);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (method == \"GET\" && !this.cache) {\r\n\t\t\t\turl += (url.indexOf(\"?\")>=0?\"&\":\"?\")+\"dhxr\"+new Date().getTime()+\"=1\";\r\n\t\t\t}\r\n\r\n\t\t\tt.open(method, url, async);\r\n\r\n\t\t\tif (headers){\r\n\t\t\t\tfor (var key in headers)\r\n\t\t\t\t\tt.setRequestHeader(key, headers[key]);\r\n\t\t\t} else if (method.toUpperCase() == \"POST\" || method == \"PUT\" || method == \"DELETE\") {\r\n\t\t\t\tt.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\r\n\t\t\t} else if (method == \"GET\") {\r\n\t\t\t\tpostData = null;\r\n\t\t\t}\r\n\r\n\t\t\tt.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\r\n\r\n\t\t\tt.send(postData);\r\n\r\n\t\t\tif (!async) return {xmlDoc:t, filePath:url}; // dhtmlx-compat, response.xmlDoc.responseXML/responseText\r\n\t\t}.bind(this)));\r\n\t},\r\n\turlSeparator: function(str){\r\n\t\tif (str.indexOf(\"?\") != -1)\r\n\t\t\treturn \"&\";\r\n\t\telse\r\n\t\t\treturn \"?\";\r\n\t}\r\n};\r\n\r\nscheduler.$ajax = scheduler.ajax; // for old\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n/*\r\n%e\tDay of the month without leading zeros (01..31)\r\n%d\tDay of the month, 2 digits with leading zeros (01..31)\r\n%j\tDay of the year, 3 digits with leading zeros (001..366)\r\n%a\tA textual representation of a day, two letters\r\n%W\tA full textual representation of the day of the week\r\n\r\n%c\tNumeric representation of a month, without leading zeros (0..12)\r\n%m\tNumeric representation of a month, with leading zeros (00..12)\r\n%b\tA short textual representation of a month, three letters (Jan..Dec)\r\n%M\tA full textual representation of a month, such as January or March (January..December)\r\n\r\n%y\tA two digit representation of a year (93..03)\r\n%Y\tA full numeric representation of a year, 4 digits (1993..03)\r\n*/\r\n\r\nscheduler.config={\r\n\tdefault_date: \"%j %M %Y\",\r\n\tmonth_date: \"%F %Y\",\r\n\tload_date: \"%Y-%m-%d\",\r\n\tweek_date: \"%l\",\r\n\tday_date: \"%D %j\",\r\n\thour_date: \"%H:%i\",\r\n\tmonth_day: \"%d\",\r\n\t//xml_date: \"%m/%d/%Y %H:%i\",\r\n\tdate_format: \"%Y-%m-%d %H:%i\",\r\n\tapi_date: \"%d-%m-%Y %H:%i\",\r\n\tparse_exact_format: false,\r\n\tpreserve_length:true,\r\n\ttime_step: 5,\r\n\tdisplayed_event_color: \"#ff4a4a\",\r\n\tdisplayed_event_text_color: \"#ffef80\",\r\n\twide_form: 0,\r\n\tday_column_padding: 8,\r\n\tuse_select_menu_space: true,\r\n\tfix_tab_position: true,\r\n\tstart_on_monday: true,\r\n\tfirst_hour: 0,\r\n\tlast_hour: 24,\r\n\treadonly: false,\r\n\tdrag_resize: true,\r\n\tdrag_move: true,\r\n\tdrag_create: true,\r\n\tdrag_event_body: true,\r\n\tdblclick_create: true,\r\n\tdetails_on_dblclick: true,\r\n\tedit_on_create: true,\r\n\tdetails_on_create: true,\r\n\theader: null,\r\n\thour_size_px: 44,\r\n\tresize_month_events:false,\r\n\tresize_month_timed:false,\r\n\tresponsive_lightbox: false,\r\n\tseparate_short_events: true,\r\n\trtl:false,\r\n\r\n\tcascade_event_display: false,\r\n\tcascade_event_count: 4,\r\n\tcascade_event_margin: 30,\r\n\r\n\tmulti_day:true,\r\n\tmulti_day_height_limit: 200,\r\n\r\n\tdrag_lightbox: true,\r\n\tpreserve_scroll: true,\r\n\tselect: true,\r\n\tundo_deleted: true,\r\n\tserver_utc: false,\r\n\ttouch:true,\r\n\ttouch_tip:true,\r\n\ttouch_drag:500,\r\n\ttouch_swipe_dates: false,\r\n\tquick_info_detached:true,\r\n\r\n\tpositive_closing: false,\r\n\t//header_datepicker: true,\r\n\tdrag_highlight: true,\r\n\tlimit_drag_out: false,\r\n\ticons_edit: [\"icon_save\", \"icon_cancel\"],\r\n\ticons_select: [\"icon_details\", \"icon_edit\", \"icon_delete\"],\r\n\tbuttons_left: [\"dhx_save_btn\", \"dhx_cancel_btn\"],\r\n\tbuttons_right: [\"dhx_delete_btn\"],\r\n\tlightbox: {\r\n\t\tsections: [\r\n\t\t\t{name: \"description\", map_to: \"text\", type: \"textarea\", focus: true},\r\n\t\t\t{name: \"time\", height: 72, type: \"time\", map_to: \"auto\"}\r\n\t\t]\r\n\t},\r\n\thighlight_displayed_event: true,\r\n\tleft_border: false,\r\n\r\n\tajax_error: \"alert\",//\"ignore\"|\"console\"\r\n\tdelay_render: 0,\r\n\ttimeline_swap_resize: true,\r\n\twai_aria_attributes: true,\r\n\twai_aria_application_role: true,\r\n\r\n\tcsp: \"auto\",\r\n\tevent_attribute: \"data-event-id\",\r\n\tshow_errors: true\r\n};\r\n\r\nscheduler.config.buttons_left.$initial = scheduler.config.buttons_left.join();\r\nscheduler.config.buttons_right.$initial = scheduler.config.buttons_right.join();\r\n\r\nscheduler._helpers = {\r\n\tparseDate: function parseDate(date) {\r\n\t\tvar parse = scheduler.templates.xml_date || scheduler.templates.parse_date;\r\n\t\treturn parse(date);\r\n\t},\r\n\tformatDate: function formatDate(date) {\r\n\t\tvar format = scheduler.templates.xml_format || scheduler.templates.format_date;\r\n\t\treturn format(date);\r\n\t}\r\n};\r\n\r\nscheduler.templates={};\r\nscheduler.init_templates=function(){\r\n\r\n\r\n\r\n\tvar d=scheduler.date.date_to_str;\r\n\tvar c=scheduler.config;\r\n\tvar f = function(a,b){\r\n\t\tfor (var c in b)\r\n\t\t\tif (!a[c]) a[c]=b[c];\r\n\t};\r\n\tf(scheduler.templates,{\r\n\t\tday_date:d(c.default_date),\r\n\t\tmonth_date:d(c.month_date),\r\n\t\tweek_date:function(d1,d2){\r\n\t\t\tif(c.rtl) {\r\n\t\t\t\treturn scheduler.templates.day_date(scheduler.date.add(d2,-1,\"day\"))+\" – \"+scheduler.templates.day_date(d1);\r\n\t\t\t} \r\n\t\t\treturn scheduler.templates.day_date(d1)+\" – \"+scheduler.templates.day_date(scheduler.date.add(d2,-1,\"day\"));\r\n\t\t},\r\n\t\tday_scale_date:d(c.default_date),\r\n\t\ttime_slot_text: function(date){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\ttime_slot_class: function(date){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\r\n\t\tmonth_scale_date:d(c.week_date),\r\n\t\tweek_scale_date:d(c.day_date),\r\n\t\thour_scale:d(c.hour_date),\r\n\t\ttime_picker:d(c.hour_date),\r\n\t\tevent_date:d(c.hour_date),\r\n\t\tmonth_day:d(c.month_day),\r\n\r\n\t\tload_format: d(c.load_date),\r\n\t//\txml_date:scheduler.date.str_to_date(c.xml_date,c.server_utc),\r\n\t//\txml_format:d(c.date_format,c.server_utc),\r\n\t\tformat_date: d(c.date_format, c.server_utc),\r\n\t\tparse_date:scheduler.date.str_to_date(c.date_format,c.server_utc),\r\n\t\tapi_date:scheduler.date.str_to_date(c.api_date, false, false),\r\n\t\tevent_header:function(start,end,ev){\r\n\r\n\t\t\tif(ev._mode === \"small\" || ev._mode === \"smallest\"){\r\n\t\t\t\treturn scheduler.templates.event_date(start);\r\n\t\t\t}else{\r\n\t\t\t\treturn scheduler.templates.event_date(start)+\" - \"+scheduler.templates.event_date(end);\r\n\t\t\t}\r\n\t\t},\r\n\t\tevent_text:function(start,end,ev){\r\n\t\t\treturn ev.text;\r\n\t\t},\r\n\t\tevent_class:function(start,end,ev){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tmonth_date_class:function(d){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tweek_date_class:function(d){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tevent_bar_date:function(start,end,ev) {\r\n\t\t\treturn scheduler.templates.event_date(start);\r\n\t\t},\r\n\t\tevent_bar_text:function(start,end,ev){\r\n\t\t\treturn ev.text;\r\n\t\t},\r\n\t\tmonth_events_link : function(date, count){\r\n\t\t\treturn \"View more(\"+count+\" events)\";\r\n\t\t},\r\n\t\tdrag_marker_class : function(start, end, event){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tdrag_marker_content : function(start, end, event){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\t/* Could be redifined */\r\n\t\ttooltip_date_format: scheduler.date.date_to_str(\"%Y-%m-%d %H:%i\"),\r\n\t\ttooltip_text: function(start, end, event) {\r\n\t\t\treturn \"Event: \" + event.text + \"
Start date: \" + scheduler.templates.tooltip_date_format(start) + \"
End date: \" + scheduler.templates.tooltip_date_format(end);\r\n\t\t},\r\n\r\n\t\tcalendar_month: d(\"%F %Y\"),\r\n\t\tcalendar_scale_date: d(\"%D\"),\r\n\t\tcalendar_date: d(\"%d\"),\r\n\t\tcalendar_time: d(\"%d-%m-%Y\")\r\n\r\n\t});\r\n\tthis.callEvent(\"onTemplatesReady\",[]);\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler._events = {};\r\nscheduler.clearAll = function() {\r\n\tthis._events = {};\r\n\tthis._loaded = {};\r\n\r\n\tthis._edit_id = null;\r\n\tthis._select_id = null;\r\n\tthis._drag_id = null;\r\n\tthis._drag_mode = null;\r\n\tthis._drag_pos = null;\r\n\tthis._new_event = null;\r\n\r\n\tthis.clear_view();\r\n\tthis.callEvent(\"onClearAll\", []);\r\n};\r\nscheduler.addEvent = function(start_date, end_date, text, id, extra_data) {\r\n\tif (!arguments.length)\r\n\t\treturn this.addEventNow();\r\n\tvar ev = start_date;\r\n\tif (arguments.length != 1) {\r\n\t\tev = extra_data || {};\r\n\t\tev.start_date = start_date;\r\n\t\tev.end_date = end_date;\r\n\t\tev.text = text;\r\n\t\tev.id = id;\r\n\t}\r\n\tev.id = ev.id || scheduler.uid();\r\n\tev.text = ev.text || \"\";\r\n\r\n\tif (typeof ev.start_date == \"string\") ev.start_date = this.templates.api_date(ev.start_date);\r\n\tif (typeof ev.end_date == \"string\") ev.end_date = this.templates.api_date(ev.end_date);\r\n\tvar d = (this.config.event_duration || this.config.time_step) * 60000;\r\n\tif (ev.start_date.valueOf() == ev.end_date.valueOf())\r\n\t\tev.end_date.setTime(ev.end_date.valueOf() + d);\r\n\r\n\tev.start_date.setMilliseconds(0);\r\n\tev.end_date.setMilliseconds(0);\r\n\r\n\tev._timed = this.isOneDayEvent(ev);\r\n\r\n\tvar is_new = !this._events[ev.id];\r\n\tthis._events[ev.id] = ev;\r\n\tthis.event_updated(ev);\r\n\tif (!this._loading)\r\n\t\tthis.callEvent(is_new ? \"onEventAdded\" : \"onEventChanged\", [ev.id, ev]);\r\n\treturn ev.id;\r\n};\r\nscheduler.deleteEvent = function(id, silent) {\r\n\tvar ev = this._events[id];\r\n\tif (!silent && (!this.callEvent(\"onBeforeEventDelete\", [id, ev]) || !this.callEvent(\"onConfirmedBeforeEventDelete\", [id, ev])))\r\n\t\treturn;\r\n\tif (ev) {\r\n\t\tif(scheduler.getState().select_id == id){\r\n\t\t\tscheduler.unselect();\r\n\t\t}\r\n\t\tdelete this._events[id];\r\n\t\tthis.event_updated(ev);\r\n\r\n\t\tif(this._drag_id == ev.id){\r\n\t\t\tthis._drag_id = null;\r\n\t\t\tthis._drag_mode=null;\r\n\t\t\tthis._drag_pos=null;\r\n\t\t}\r\n\t}\r\n\r\n\tthis.callEvent(\"onEventDeleted\", [id, ev]);\r\n};\r\nscheduler.getEvent = function(id) {\r\n\treturn this._events[id];\r\n};\r\nscheduler.setEvent = function(id, hash) {\r\n\tif(!hash.id)\r\n\t\thash.id = id;\r\n\r\n\tthis._events[id] = hash;\r\n};\r\nscheduler.for_rendered = function(id, method) {\r\n\tfor (var i = this._rendered.length - 1; i >= 0; i--)\r\n\t\tif (this._rendered[i].getAttribute(this.config.event_attribute) == id)\r\n\t\t\tmethod(this._rendered[i], i);\r\n};\r\nscheduler.changeEventId = function(id, new_id) {\r\n\tif (id == new_id) return;\r\n\tvar ev = this._events[id];\r\n\tif (ev) {\r\n\t\tev.id = new_id;\r\n\t\tthis._events[new_id] = ev;\r\n\t\tdelete this._events[id];\r\n\t}\r\n\tthis.for_rendered(id, function(r) {\r\n\t\tr.setAttribute(\"event_id\", new_id); // for backward compatibility\r\n\t\tr.setAttribute(scheduler.config.event_attribute, new_id);\r\n\t});\r\n\tif (this._select_id == id) this._select_id = new_id;\r\n\tif (this._edit_id == id) this._edit_id = new_id;\r\n\t//if (this._drag_id==id) this._drag_id=new_id;\r\n\tthis.callEvent(\"onEventIdChange\", [id, new_id]);\r\n};\r\n\r\n(function() {\r\n\tvar attrs = [\"text\", \"Text\", \"start_date\", \"StartDate\", \"end_date\", \"EndDate\"];\r\n\tvar create_getter = function(name) {\r\n\t\treturn function(id) { return (scheduler.getEvent(id))[name]; };\r\n\t};\r\n\tvar create_setter = function(name) {\r\n\t\treturn function(id, value) {\r\n\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\tev[name] = value;\r\n\t\t\tev._changed = true;\r\n\t\t\tev._timed = this.isOneDayEvent(ev);\r\n\t\t\tscheduler.event_updated(ev, true);\r\n\t\t};\r\n\t};\r\n\tfor (var i = 0; i < attrs.length; i += 2) {\r\n\t\tscheduler[\"getEvent\" + attrs[i + 1]] = create_getter(attrs[i]);\r\n\t\tscheduler[\"setEvent\" + attrs[i + 1]] = create_setter(attrs[i]);\r\n\t}\r\n})();\r\n\r\nscheduler.event_updated = function(ev, force) {\r\n\tif (this.is_visible_events(ev))\r\n\t\tthis.render_view_data();\r\n\telse\r\n\t\tthis.clear_event(ev.id);\r\n};\r\nscheduler.is_visible_events = function(ev) {\r\n\tif(!this._min_date || !this._max_date){\r\n\t\treturn false;\r\n\t}\r\n\r\n\t//if in displayed dates\r\n\tvar in_visible_range = (ev.start_date.valueOf() < this._max_date.valueOf() && this._min_date.valueOf() < ev.end_date.valueOf());\r\n\r\n\tif(in_visible_range){\r\n\r\n\t\t//end dates are not between last/first hours\r\n\t\tvar evFirstHour = ev.start_date.getHours(),\r\n\t\t\tevLastHour = ev.end_date.getHours() + (ev.end_date.getMinutes()/60),\r\n\t\t\tlastHour = this.config.last_hour,\r\n\t\t\tfirstHour = this.config.first_hour;\r\n\r\n\t\tvar end_dates_visible = (this._table_view || !((evLastHour > lastHour || evLastHour <= firstHour) && (evFirstHour >= lastHour || evFirstHour < firstHour)));\r\n\r\n\t\tif(end_dates_visible){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\r\n\t\t\t//event is bigger than area hidden between last/first hours\r\n\t\t\tvar event_duration = (ev.end_date.valueOf() - ev.start_date.valueOf()) / (1000*60*60),//hours\r\n\t\t\t\thidden_duration = 24 - (this.config.last_hour - this.config.first_hour);\r\n\r\n\t\t\treturn !!((event_duration > hidden_duration) || (evFirstHour < lastHour && evLastHour > firstHour));\r\n\r\n\t\t}\r\n\t}else{\r\n\t\treturn false;\r\n\t}\r\n};\r\nscheduler.isOneDayEvent = function(ev) {\r\n\t// decrease by one ms so events that ends on midnight on the next day were still considered one day events\r\n\t// e.g. (09-02-2018 19:00 - 10-02-2018 00:00)\r\n\t// events >= 24h long are considered multiday\r\n\tvar checkEndDate = new Date(ev.end_date.valueOf() - 1);\r\n\treturn (\r\n\t\tev.start_date.getFullYear() === checkEndDate.getFullYear() &&\r\n\t\tev.start_date.getMonth() === checkEndDate.getMonth() &&\r\n\t\tev.start_date.getDate() === checkEndDate.getDate()\r\n\t) && ((ev.end_date.valueOf() - ev.start_date.valueOf()) < (1000 * 60 * 60 * 24));\r\n};\r\n\r\nscheduler.get_visible_events = function(only_timed) {\r\n\t//not the best strategy for sure\r\n\tvar stack = [];\r\n\r\n\tfor (var id in this._events)\r\n\t\tif (this.is_visible_events(this._events[id]))\r\n\t\t\tif (!only_timed || this._events[id]._timed)\r\n\t\t\t\tif (this.filter_event(id, this._events[id]))\r\n\t\t\t\t\tstack.push(this._events[id]);\r\n\r\n\treturn stack;\r\n};\r\nscheduler.filter_event = function(id, ev) {\r\n\tvar filter = this[\"filter_\" + this._mode];\r\n\treturn (filter) ? filter(id, ev) : true;\r\n};\r\nscheduler._is_main_area_event = function(ev){\r\n\treturn !!ev._timed;\r\n};\r\nscheduler.render_view_data = function(evs, hold) {\r\n\tvar full = false;\r\n\tif (!evs) {\r\n\t\tfull = true;\r\n\t\tif (this._not_render) {\r\n\t\t\tthis._render_wait = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._render_wait = false;\r\n\r\n\t\tthis.clear_view();\r\n\t\tevs = this.get_visible_events(!(this._table_view || this.config.multi_day));\r\n\t}\r\n\tfor(var i= 0, len = evs.length; i < len; i++){\r\n\t\tthis._recalculate_timed(evs[i]);\r\n\t}\r\n\r\n\tif (this.config.multi_day && !this._table_view) {\r\n\r\n\t\tvar tvs = [];\r\n\t\tvar tvd = [];\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tif (this._is_main_area_event(evs[i]))\r\n\t\t\t\ttvs.push(evs[i]);\r\n\t\t\telse\r\n\t\t\t\ttvd.push(evs[i]);\r\n\t\t}\r\n\r\n\t\tif(!this._els['dhx_multi_day']){\r\n\t\t\tvar message = scheduler._commonErrorMessages.unknownView(this._mode);\r\n\t\t\tthrow new Error(message);\r\n\t\t}\r\n\r\n\t\t// multiday events\r\n\t\tthis._rendered_location = this._els['dhx_multi_day'][0];\r\n\t\tthis._table_view = true;\r\n\t\tthis.render_data(tvd, hold);\r\n\t\tthis._table_view = false;\r\n\r\n\t\t// normal events\r\n\t\tthis._rendered_location = this._els['dhx_cal_data'][0];\r\n\t\tthis._table_view = false;\r\n\t\tthis.render_data(tvs, hold);\r\n\r\n\t} else {\r\n\t\tvar buffer = document.createDocumentFragment();\r\n\t\tvar renderedLocation = this._els['dhx_cal_data'][0];\r\n\t\tthis._rendered_location = buffer;\r\n\t\tthis.render_data(evs, hold);\r\n\t\trenderedLocation.appendChild(buffer);\r\n\t\tthis._rendered_location = renderedLocation;\r\n\r\n\t}\r\n\r\n\tif(full){\r\n\t\tthis.callEvent(\"onDataRender\", []);\r\n\t}\r\n};\r\n\r\n\r\nscheduler._view_month_day = function(e){\r\n\tvar date = scheduler.getActionData(e).date;\r\n\tif(!scheduler.callEvent(\"onViewMoreClick\", [date]))\r\n\t\treturn;\r\n\tscheduler.setCurrentView(date, \"day\");\r\n};\r\n\r\nscheduler._render_month_link = function(ev){\r\n\tvar parent = this._rendered_location;\r\n\tvar toRender = this._lame_clone(ev);\r\n\r\n\t//render links in each cell of multiday events\r\n\tfor(var d = ev._sday; d < ev._eday; d++){\r\n\r\n\t\ttoRender._sday = d;\r\n\t\ttoRender._eday = d+1;\r\n\r\n\t\tvar date = scheduler.date;\r\n\t\tvar curr = scheduler._min_date;\r\n\t\tcurr = date.add(curr, toRender._sweek, \"week\");\r\n\t\tcurr = date.add(curr, toRender._sday, \"day\");\r\n\t\tvar count = scheduler.getEvents(curr, date.add(curr, 1, \"day\")).length;\r\n\r\n\t\tvar pos = this._get_event_bar_pos(toRender);\r\n\t\tvar widt = (pos.x2 - pos.x);\r\n\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tscheduler.event(el, \"click\", function(e){scheduler._view_month_day(e);});\r\n\t\tel.className = \"dhx_month_link\";\r\n\t\tel.style.top = pos.y + \"px\";\r\n\t\tel.style.left = pos.x + \"px\";\r\n\t\tel.style.width = widt + \"px\";\r\n\t\tel.innerHTML = scheduler.templates.month_events_link(curr, count);\r\n\t\tthis._rendered.push(el);\r\n\r\n\t\tparent.appendChild(el);\r\n\t}\r\n};\r\n\r\nscheduler._recalculate_timed = function(id){\r\n\tif(!id) return;\r\n\tvar ev;\r\n\tif(typeof(id) != \"object\")\r\n\t\tev = this._events[id];\r\n\telse\r\n\t\tev = id;\r\n\tif(!ev) return;\r\n\tev._timed = scheduler.isOneDayEvent(ev);\r\n};\r\nscheduler.attachEvent(\"onEventChanged\", scheduler._recalculate_timed);\r\nscheduler.attachEvent(\"onEventAdded\", scheduler._recalculate_timed);\r\n\r\nscheduler.render_data = function(evs, hold) {\r\n\tevs = this._pre_render_events(evs, hold);\r\n\tvar containers = {};\r\n\tfor (var i = 0; i < evs.length; i++)\r\n\t\tif (this._table_view){\r\n\t\t\tif(scheduler._mode != 'month'){\r\n\t\t\t\tthis.render_event_bar(evs[i]);//may be multiday section on other views\r\n\t\t\t}else{\r\n\r\n\t\t\t\tvar max_evs = scheduler.config.max_month_events;\r\n\t\t\t\tif(max_evs !== max_evs*1 || evs[i]._sorder < max_evs){\r\n\t\t\t\t\t//of max number events per month cell is set and event can be rendered\r\n\t\t\t\t\tthis.render_event_bar(evs[i]);\r\n\t\t\t\t}else if(max_evs !== undefined && evs[i]._sorder == max_evs){\r\n\t\t\t\t\t//render 'view more' links\r\n\t\t\t\t\tscheduler._render_month_link(evs[i]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//do not render events with ordinal number > maximum events per cell\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t}else{\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tvar parent = scheduler.locate_holder(ev._sday);\r\n\t\t\tif (!parent) continue; //attempt to render non-visible event\r\n\r\n\t\t\tif(!containers[ev._sday]){\r\n\t\t\t\tcontainers[ev._sday] = {\r\n\t\t\t\t\treal: parent,\r\n\t\t\t\t\tbuffer: document.createDocumentFragment(),\r\n\t\t\t\t\twidth: parent.clientWidth\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\tvar container = containers[ev._sday];\r\n\t\t\tthis.render_event(ev, container.buffer, container.width);\r\n\t\t}\r\n\r\n\t\tfor(var i in containers){\r\n\t\t\tvar container = containers[i];\r\n\t\t\tif(container.real && container.buffer){\r\n\t\t\t\tcontainer.real.appendChild(container.buffer);\r\n\t\t\t}\r\n\t\t}\r\n};\r\n\r\nscheduler._get_first_visible_cell = function(cells) {\r\n\tfor (var i = 0; i < cells.length; i++) {\r\n\t\tif ((cells[i].className || \"\").indexOf(\"dhx_scale_ignore\") == -1) {\r\n\t\t\treturn cells[i];\r\n\t\t}\r\n\t}\r\n\t// if no visible cell found, return cells[0] to be more tolerant, since it's the original logic\r\n\treturn cells[0];\r\n};\r\n\r\nscheduler._pre_render_events = function(evs, hold) {\r\n\tvar hb = this.xy.bar_height;\r\n\tvar h_old = this._colsS.heights;\r\n\tvar h = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0];\r\n\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\r\n\tif (!this._table_view) {\r\n\t\tevs = this._pre_render_events_line(evs, hold); //ignore long events for now\r\n\t}\r\n\telse {\r\n\t\tevs = this._pre_render_events_table(evs, hold);\r\n\t}\r\n\tif (this._table_view) {\r\n\t\tif (hold)\r\n\t\t\tthis._colsS.heights = h_old;\r\n\t\telse {\r\n\t\t\tvar monthRows = data.querySelectorAll(\".dhx_cal_month_row\");\r\n\t\t\tif (monthRows.length) {\r\n\t\t\t\tfor (var i = 0; i < monthRows.length; i++) {\r\n\t\t\t\t\th[i]++;\r\n\t\t\t\t\tvar cells = monthRows[i].querySelectorAll(\".dhx_cal_month_cell\");\r\n\t\t\t\t\tvar cellHeight = this._colsS.height - this.xy.month_head_height;\r\n\t\t\t\t\tif ((h[i]) * hb > cellHeight) { // 22 - height of cell's header\r\n\t\t\t\t\t\t//we have overflow, update heights\r\n\r\n\t\t\t\t\t\tvar cHeight = cellHeight;\r\n\t\t\t\t\t\tif(this.config.max_month_events*1 !== this.config.max_month_events || h[i] <= this.config.max_month_events){\r\n\t\t\t\t\t\t\tcHeight = h[i] * hb;\r\n\t\t\t\t\t\t}else if( (this.config.max_month_events + 1) * hb > cellHeight){\r\n\t\t\t\t\t\t\tcHeight = (this.config.max_month_events + 1) * hb;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tmonthRows[i].style.height = (cHeight + this.xy.month_head_height) + \"px\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\th[i] = (h[i - 1] || 0) + scheduler._get_first_visible_cell(cells).offsetHeight;\r\n\t\t\t\t}\r\n\t\t\t\th.unshift(0);\r\n\t\t\t\tconst dataArea = this.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tif (dataArea.offsetHeight < dataArea.scrollHeight && !scheduler._colsS.scroll_fix && scheduler.xy.scroll_width) {\r\n\r\n\t\t\t\t\tvar scale_settings = scheduler._colsS,\r\n\t\t\t\t\t\tsum_width = scale_settings[scale_settings.col_length],\r\n\t\t\t\t\t\trow_heights = scale_settings.heights.slice();\r\n\r\n\t\t\t\t\tsum_width -= (scheduler.xy.scroll_width || 0);\r\n\t\t\t\t\tthis._calc_scale_sizes(sum_width, this._min_date, this._max_date);\r\n\t\t\t\t\tscheduler._colsS.heights = row_heights;\r\n\r\n\t\t\t\t\tthis.set_xy(this._els[\"dhx_cal_header\"][0], sum_width/*, this.xy.scale_height*/);\r\n\t\t\t\t\tscheduler._render_scales(this._els[\"dhx_cal_header\"][0]);\r\n\t\t\t\t\tscheduler._render_month_scale(this._els[\"dhx_cal_data\"][0], this._get_timeunit_start(), this._min_date);\r\n\r\n\t\t\t\t\tscale_settings.scroll_fix = true;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (!evs.length && this._els[\"dhx_multi_day\"][0].style.visibility == \"visible\")\r\n\t\t\t\t\th[0] = -1;\r\n\t\t\t\tif (evs.length || h[0] == -1) {\r\n\t\t\t\t\t//shift days to have space for multiday events\r\n\t\t\t\t\t//var childs = evl.parentNode.childNodes;\r\n\r\n\t\t\t\t\t// +1 so multiday events would have 2px from top and 2px from bottom by default\r\n\t\t\t\t\tvar full_multi_day_height = (h[0] + 1) * hb + 4;\r\n\r\n\t\t\t\t\tvar used_multi_day_height = full_multi_day_height;\r\n\t\t\t\t\tvar used_multi_day_height_css = full_multi_day_height + \"px\";\r\n\t\t\t\t\tif (this.config.multi_day_height_limit) {\r\n\t\t\t\t\t\tused_multi_day_height = Math.min(full_multi_day_height, this.config.multi_day_height_limit) ;\r\n\t\t\t\t\t\tused_multi_day_height_css = used_multi_day_height + \"px\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar multi_day_section = this._els[\"dhx_multi_day\"][0];\r\n\t\t\t\t\tmulti_day_section.style.height = used_multi_day_height_css;\r\n\t\t\t\t\tmulti_day_section.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\tmulti_day_section.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\r\n\t\t\t\t\t// icon\r\n\t\t\t\t\tvar multi_day_icon = this._els[\"dhx_multi_day\"][1];\r\n\t\t\t\t\tmulti_day_icon.style.height = used_multi_day_height_css;\r\n\t\t\t\t\tmulti_day_icon.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\tmulti_day_icon.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\t\t\t\t\tmulti_day_icon.className = h[0] ? \"dhx_multi_day_icon\" : \"dhx_multi_day_icon_small\";\r\n\t\t\t\t\tthis._dy_shift = (h[0] + 1) * hb;\r\n\t\t\t\t\tif(this.config.multi_day_height_limit){\r\n\t\t\t\t\t\tthis._dy_shift = Math.min(this.config.multi_day_height_limit, this._dy_shift);\r\n\t\t\t\t\t}\r\n\t\t\t\t\th[0] = 0;\r\n\r\n\t\t\t\t\tif (used_multi_day_height != full_multi_day_height) {\r\n\r\n\t\t\t\t\t\tmulti_day_section.style.overflowY = \"auto\";\r\n\t\t\t\t\t//\tmulti_day_section.style.width = (parseInt(this._els[\"dhx_cal_navline\"][0].style.width)) + \"px\";\r\n\r\n\t\t\t\t\t\tmulti_day_icon.style.position = \"fixed\";\r\n\t\t\t\t\t\tmulti_day_icon.style.top = \"\";\r\n\t\t\t\t\t\tmulti_day_icon.style.left = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn evs;\r\n};\r\nscheduler._get_event_sday = function(ev) {\r\n\t// get day in current view\r\n\t// use rounding for 23 or 25 hour days on DST\r\n\tvar datePart = this.date.day_start(new Date(ev.start_date));\r\n\treturn Math.round((datePart.valueOf() - this._min_date.valueOf()) / (24 * 60 * 60 * 1000));\r\n};\r\nscheduler._get_event_mapped_end_date = function(ev) {\r\n\tvar end_date = ev.end_date;\r\n\tif (this.config.separate_short_events) {\r\n\t\tvar ev_duration = (ev.end_date - ev.start_date) / 60000; // minutes\r\n\t\tif (ev_duration < this._min_mapped_duration) {\r\n\t\t\tend_date = this.date.add(end_date, this._min_mapped_duration - ev_duration, \"minute\");\r\n\t\t}\r\n\t}\r\n\treturn end_date;\r\n};\r\nscheduler._pre_render_events_line = function(evs, hold){\r\n\tevs.sort(function(a, b) {\r\n\t\tif (a.start_date.valueOf() == b.start_date.valueOf())\r\n\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\treturn a.start_date > b.start_date ? 1 : -1;\r\n\t});\r\n\tvar days = []; //events by weeks\r\n\tvar evs_originals = [];\r\n\r\n\tthis._min_mapped_duration = Math.floor(this.xy.min_event_height * 60 / this.config.hour_size_px); // values could change along the way\r\n\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tvar ev = evs[i];\r\n\r\n\t\t//check date overflow\r\n\t\tvar sd = ev.start_date;\r\n\t\tvar ed = ev.end_date;\r\n\t\t//check scale overflow\r\n\t\tvar sh = sd.getHours();\r\n\t\tvar eh = ed.getHours();\r\n\t\tev._sday = this._get_event_sday(ev); // sday based on event start_date\r\n\t\tif (this._ignores[ev._sday]){\r\n\t\t\t//ignore event\r\n\t\t\tevs.splice(i,1);\r\n\t\t\ti--;\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tif (!days[ev._sday]) days[ev._sday] = [];\r\n\r\n\t\tif (!hold) {\r\n\t\t\tev._inner = false;\r\n\r\n\t\t\tvar stack = days[ev._sday];\r\n\r\n\t\t\twhile (stack.length) {\r\n\t\t\t\tvar t_ev = stack[stack.length - 1];\r\n\t\t\t\tvar t_end_date = this._get_event_mapped_end_date(t_ev);\r\n\t\t\t\tif (t_end_date.valueOf() <= ev.start_date.valueOf()) {\r\n\t\t\t\t\tstack.splice(stack.length - 1, 1);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar slot_index = stack.length;\r\n\t\t\tvar sorderSet = false;\r\n\t\t\tfor (var j = 0; j < stack.length; j++) {\r\n\t\t\t\tvar t_ev = stack[j];\r\n\t\t\t\tvar t_end_date = this._get_event_mapped_end_date(t_ev);\r\n\t\t\t\tif (t_end_date.valueOf() <= ev.start_date.valueOf()) {\r\n\t\t\t\t\tsorderSet = true;\r\n\t\t\t\t\tev._sorder = t_ev._sorder;\r\n\t\t\t\t\tslot_index = j;\r\n\t\t\t\t\tev._inner = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (stack.length)\r\n\t\t\t\tstack[stack.length - 1]._inner = true;\r\n\r\n\t\t\tif (!sorderSet) {\r\n\t\t\t\tif (stack.length) {\r\n\t\t\t\t\tif (stack.length <= stack[stack.length - 1]._sorder) {\r\n\t\t\t\t\t\tif (!stack[stack.length - 1]._sorder)\r\n\t\t\t\t\t\t\tev._sorder = 0;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tfor (j = 0; j < stack.length; j++) {\r\n\t\t\t\t\t\t\t\tvar _is_sorder = false;\r\n\t\t\t\t\t\t\t\tfor (var k = 0; k < stack.length; k++) {\r\n\t\t\t\t\t\t\t\t\tif (stack[k]._sorder == j) {\r\n\t\t\t\t\t\t\t\t\t\t_is_sorder = true;\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (!_is_sorder) {\r\n\t\t\t\t\t\t\t\t\tev._sorder = j;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\tev._inner = true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvar _max_sorder = stack[0]._sorder;\r\n\t\t\t\t\t\tfor (j = 1; j < stack.length; j++) {\r\n\t\t\t\t\t\t\tif (stack[j]._sorder > _max_sorder)\r\n\t\t\t\t\t\t\t\t_max_sorder = stack[j]._sorder;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tev._sorder = _max_sorder + 1;\r\n\t\t\t\t\t\tev._inner = false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else\r\n\t\t\t\t\tev._sorder = 0;\r\n\t\t\t}\r\n\r\n\t\t\tstack.splice(slot_index, slot_index == stack.length ? 0 : 1, ev);\r\n\r\n\t\t\tif (stack.length > (stack.max_count || 0)) {\r\n\t\t\t\tstack.max_count = stack.length;\r\n\t\t\t\tev._count = stack.length;\r\n\t\t\t} else {\r\n\t\t\t\tev._count = (ev._count) ? ev._count : 1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (sh < this.config.first_hour || eh >= this.config.last_hour) {\r\n\t\t\t// Need to create copy of event as we will be changing it's start/end date\r\n\t\t\t// e.g. first_hour = 11 and event.start_date hours = 9. Need to preserve that info\r\n\t\t\tevs_originals.push(ev);\r\n\t\t\tevs[i] = ev = this._copy_event(ev);\r\n\r\n\t\t\tif (sh < this.config.first_hour) {\r\n\t\t\t\tev.start_date.setHours(this.config.first_hour);\r\n\t\t\t\tev.start_date.setMinutes(0);\r\n\t\t\t}\r\n\t\t\tif (eh >= this.config.last_hour) {\r\n\t\t\t\tev.end_date.setMinutes(0);\r\n\t\t\t\tev.end_date.setHours(this.config.last_hour);\r\n\t\t\t}\r\n\r\n\t\t\tif (ev.start_date > ev.end_date || sh == this.config.last_hour) {\r\n\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (!hold) {\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tevs[i]._count = days[evs[i]._sday].max_count;\r\n\t\t}\r\n\t\tfor (var i = 0; i < evs_originals.length; i++)\r\n\t\t\tevs_originals[i]._count = days[evs_originals[i]._sday].max_count;\r\n\t}\r\n\r\n\treturn evs;\r\n};\r\nscheduler._time_order = function(evs) {\r\n\tevs.sort(function(a, b) {\r\n\t\tif (a.start_date.valueOf() == b.start_date.valueOf()) {\r\n\t\t\tif (a._timed && !b._timed) return 1;\r\n\t\t\tif (!a._timed && b._timed) return -1;\r\n\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\t}\r\n\t\treturn a.start_date > b.start_date ? 1 : -1;\r\n\t});\r\n};\r\n\r\nscheduler._is_any_multiday_cell_visible = function(from, to, event){\r\n\tvar cols = this._cols.length;\r\n\tvar isAnyCellVisible = false;\r\n\tvar checkDate = from;\r\n\tvar noCells = true;\r\n\tvar lastDayEnd = new Date(to);\r\n\tif(scheduler.date.day_start(new Date(to)).valueOf() != to.valueOf()){\r\n\t\tlastDayEnd = scheduler.date.day_start(lastDayEnd);\r\n\t\tlastDayEnd = scheduler.date.add(lastDayEnd, 1, \"day\");\r\n\t}\r\n\twhile(checkDate < lastDayEnd){\r\n\t\tnoCells = false;\r\n\t\tvar cellIndex = this.locate_holder_day(checkDate, false, event);\r\n\t\tvar weekCellIndex = cellIndex % cols;\r\n\t\tif(!this._ignores[weekCellIndex]){\r\n\t\t\tisAnyCellVisible = true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcheckDate = scheduler.date.add(checkDate, 1, \"day\");\r\n\t}\r\n\treturn noCells || isAnyCellVisible;\r\n};\r\n\r\nscheduler._pre_render_events_table = function(evs, hold) { // max - max height of week slot\r\n\tthis._time_order(evs);\r\n\tvar out = [];\r\n\tvar weeks = [\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[]\r\n\t]; //events by weeks\r\n\tvar max = this._colsS.heights;\r\n\tvar start_date;\r\n\tvar cols = this._cols.length;\r\n\tvar chunks_info = {};\r\n\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tvar ev = evs[i];\r\n\t\tvar id = ev.id;\r\n\t\tif (!chunks_info[id]) {\r\n\t\t\tchunks_info[id] = {\r\n\t\t\t\tfirst_chunk: true,\r\n\t\t\t\tlast_chunk: true\r\n\t\t\t};\r\n\t\t}\r\n\t\tvar chunk_info = chunks_info[id];\r\n\t\tvar sd = (start_date || ev.start_date);\r\n\t\tvar ed = ev.end_date;\r\n\t\t//trim events which are crossing through current view\r\n\t\tif (sd < this._min_date) {\r\n\t\t\tchunk_info.first_chunk = false;\r\n\t\t\tsd = this._min_date;\r\n\t\t}\r\n\t\tif (ed > this._max_date) {\r\n\t\t\tchunk_info.last_chunk = false;\r\n\t\t\ted = this._max_date;\r\n\t\t}\r\n\r\n\t\tvar locate_s = this.locate_holder_day(sd, false, ev);\r\n\t\tev._sday = locate_s % cols;\r\n\t\t//skip single day events for ignored dates\r\n\t\tif (this._ignores[ev._sday] && ev._timed) continue;\r\n\r\n\t\tvar locate_e = this.locate_holder_day(ed, true, ev) || cols;\r\n\t\tev._eday = (locate_e % cols) || cols; //cols used to fill full week, when event end on monday\r\n\t\tev._length = locate_e - locate_s;\r\n\t\t//3600000 - compensate 1 hour during winter|summer time shift\r\n\t\tev._sweek = Math.floor((this._correct_shift(sd.valueOf(), 1) - this._min_date.valueOf()) / (60 * 60 * 1000 * 24 * cols));\r\n\r\n\t\tvar isAnyCellVisible = scheduler._is_any_multiday_cell_visible(sd, ed, ev);\r\n\r\n\t\tif(!isAnyCellVisible){\r\n\t\t\tstart_date = null;\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\t//current slot\r\n\t\tvar stack = weeks[ev._sweek];\r\n\t\t//check order position\r\n\t\tvar stack_line;\r\n\r\n\t\tfor (stack_line = 0; stack_line < stack.length; stack_line++)\r\n\t\t\tif (stack[stack_line]._eday <= ev._sday)\r\n\t\t\t\tbreak;\r\n\r\n\t\tif (!ev._sorder || !hold) {\r\n\t\t\tev._sorder = stack_line;\r\n\t\t}\r\n\r\n\t\tif (ev._sday + ev._length <= cols) {\r\n\t\t\tstart_date = null;\r\n\t\t\tout.push(ev);\r\n\t\t\tstack[stack_line] = ev;\r\n\t\t\t//get max height of slot\r\n\t\t\tmax[ev._sweek] = stack.length - 1;\r\n\t\t\tev._first_chunk = chunk_info.first_chunk;\r\n\t\t\tev._last_chunk = chunk_info.last_chunk;\r\n\t\t} else { // split long event in chunks\r\n\t\t\tvar copy = this._copy_event(ev);\r\n\t\t\tcopy.id = ev.id;\r\n\t\t\tcopy._length = cols - ev._sday;\r\n\t\t\tcopy._eday = cols;\r\n\t\t\tcopy._sday = ev._sday;\r\n\t\t\tcopy._sweek = ev._sweek;\r\n\t\t\tcopy._sorder = ev._sorder;\r\n\t\t\tcopy.end_date = this.date.add(sd, copy._length, \"day\");\r\n\t\t\tcopy._first_chunk = chunk_info.first_chunk;\r\n\t\t\tif (chunk_info.first_chunk) {\r\n\t\t\t\tchunk_info.first_chunk = false;\r\n\t\t\t}\r\n\r\n\t\t\tout.push(copy);\r\n\t\t\tstack[stack_line] = copy;\r\n\t\t\tstart_date = copy.end_date;\r\n\t\t\t//get max height of slot\r\n\t\t\tmax[ev._sweek] = stack.length - 1;\r\n\t\t\ti--;\r\n\t\t\tcontinue; //repeat same step\r\n\t\t}\r\n\t}\r\n\treturn out;\r\n};\r\nscheduler._copy_dummy = function() {\r\n\tvar a = new Date(this.start_date);\r\n\tvar b = new Date(this.end_date);\r\n\tthis.start_date = a;\r\n\tthis.end_date = b;\r\n};\r\nscheduler._copy_event = function(ev) {\r\n\tthis._copy_dummy.prototype = ev;\r\n\treturn new this._copy_dummy();\r\n\t//return {start_date:ev.start_date, end_date:ev.end_date, text:ev.text, id:ev.id}\r\n};\r\nscheduler._rendered = [];\r\nscheduler.clear_view = function() {\r\n\tfor (var i = 0; i < this._rendered.length; i++) {\r\n\t\tvar obj = this._rendered[i];\r\n\t\tif (obj.parentNode) obj.parentNode.removeChild(obj);\r\n\t}\r\n\tthis._rendered = [];\r\n};\r\nscheduler.updateEvent = function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tthis.clear_event(id);\r\n\r\n\tif (ev && this.is_visible_events(ev) && this.filter_event(id, ev) && (this._table_view || this.config.multi_day || ev._timed)) {\r\n\t\tif (this.config.update_render){\r\n\t\t\tthis.render_view_data();\r\n\t\t}else{\r\n\t\t\tif(this.getState().mode == \"month\" && !this.getState().drag_id && !this.isOneDayEvent(ev)){\r\n\t\t\t\tthis.render_view_data();\r\n\t\t\t}else{\r\n\t\t\t\tthis.render_view_data([ev], true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.clear_event = function(id) {\r\n\tthis.for_rendered(id, function(node, i) {\r\n\t\tif (node.parentNode)\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\tscheduler._rendered.splice(i, 1);\r\n\t});\r\n};\r\nscheduler._y_from_date = function(date){\r\n\tvar sm = date.getHours() * 60 + date.getMinutes();\r\n\treturn ((Math.round((sm * 60 * 1000 - this.config.first_hour * 60 * 60 * 1000) * this.config.hour_size_px / (60 * 60 * 1000))) % (this.config.hour_size_px * 24)); //42px/hour\r\n};\r\nscheduler._calc_event_y = function(ev, min_height){\r\n\tmin_height = min_height || 0;\r\n\tvar sm = ev.start_date.getHours() * 60 + ev.start_date.getMinutes();\r\n\tvar em = (ev.end_date.getHours() * 60 + ev.end_date.getMinutes()) || (scheduler.config.last_hour * 60);\r\n\tvar top = this._y_from_date(ev.start_date);\r\n\r\n\tvar height = Math.max(min_height, (em - sm) * this.config.hour_size_px / 60); //42px/hour\r\n\treturn {\r\n\t\ttop: top,\r\n\t\theight: height\r\n\t};\r\n};\r\nscheduler.render_event = function(ev, buffer, parentWidth) {\r\n\tvar menu = scheduler.xy.menu_width;\r\n\tvar menu_offset = (this.config.use_select_menu_space) ? 0 : menu;\r\n\tif (ev._sday < 0) return; //can occur in case of recurring event during time shift\r\n\r\n\tvar parent = scheduler.locate_holder(ev._sday);\r\n\tif (!parent) return; //attempt to render non-visible event\r\n\r\n\tbuffer = buffer || parent;\r\n\r\n\tvar pos_y = this._calc_event_y(ev, scheduler.xy.min_event_height);\r\n\tvar top = pos_y.top,\r\n\t\theight = pos_y.height;\r\n\r\n\tvar ev_count = ev._count || 1;\r\n\tvar ev_sorder = ev._sorder || 0;\r\n\r\n\tparentWidth = parentWidth || parent.clientWidth;\r\n\tif(this.config.day_column_padding){\r\n\t\tparentWidth -= this.config.day_column_padding;\r\n\t}\r\n\r\n\tvar width = Math.floor((parentWidth - menu_offset) / ev_count);\r\n\tvar left = ev_sorder * width + 1;\r\n\tif (!ev._inner) width = width * (ev_count - ev_sorder);\r\n\tif (this.config.cascade_event_display) {\r\n\t\tvar limit = this.config.cascade_event_count;\r\n\t\tvar margin = this.config.cascade_event_margin;\r\n\t\tleft = ev_sorder % limit * margin;\r\n\t\tvar right = (ev._inner) ? (ev_count - ev_sorder - 1) % limit * margin / 2 : 0;\r\n\t\twidth = Math.floor(parentWidth - menu_offset - left - right);\r\n\t}\r\n\r\n\tif(height < 30){\r\n\t\tev._mode = \"smallest\";\r\n\t}else if(height < 42){\r\n\t\tev._mode = \"small\";\r\n\t}else{\r\n\t\tev._mode = null;\r\n\t}\r\n\r\n\tvar d = this._render_v_bar(ev, menu_offset + left, top, width, height, ev._text_style, scheduler.templates.event_header(ev.start_date, ev.end_date, ev), scheduler.templates.event_text(ev.start_date, ev.end_date, ev));\r\n\t\r\n\tif(ev._mode === \"smallest\"){\r\n\t\td.classList.add(\"dhx_cal_event--xsmall\");\r\n\t}else if (ev._mode === \"small\"){\r\n\t\td.classList.add(\"dhx_cal_event--small\");\r\n\t}\r\n\r\n\tthis._waiAria.eventAttr(ev, d);\r\n\tthis._rendered.push(d);\r\n\tbuffer.appendChild(d);\r\n\r\n\tvar parentPosition = parseInt( this.config.rtl ? parent.style.right : parent.style.left, 10);\r\n\r\n\tleft = left + parentPosition + menu_offset;\r\n\r\n\tif (this._edit_id == ev.id) {\r\n\r\n\t\td.style.zIndex = 1; //fix overlapping issue\r\n\t\twidth = Math.max(width, scheduler.xy.editor_width);\r\n\t\td = document.createElement(\"div\");\r\n\t\td.setAttribute(\"event_id\", ev.id); // for backward compatibility\r\n\t\td.setAttribute(this.config.event_attribute, ev.id);\r\n\r\n\t\tthis._waiAria.eventAttr(ev, d);\r\n\r\n\t\td.className = \"dhx_cal_event dhx_cal_editor\";\r\n\t\tif (this.config.rtl) left++;\r\n\t\tthis.set_xy(d, width, height, left, top);\r\n\r\n\r\n\t\tif(ev.color){\r\n\t\t\td.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tvar tplClass = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\r\n\t\tif(tplClass){\r\n\t\t\td.className += \" \" + tplClass;\r\n\t\t}\r\n\t\tvar d2 = document.createElement(\"div\");\r\n\t\td2.style.cssText += \"overflow:hidden;height:100%\";\r\n\r\n\t\td.appendChild(d2);\r\n\t\tthis._els[\"dhx_cal_data\"][0].appendChild(d);\r\n\t\tthis._rendered.push(d);\r\n\r\n\t\td2.innerHTML = \"\";\r\n\t\tthis._editor = d2.querySelector(\"textarea\");\r\n\t\t\r\n\t\tscheduler.event(this._editor, \"keydown\", function(e) {\r\n\t\t\tif (e.shiftKey) return true;\r\n\t\t\tvar code = e.keyCode;\r\n\t\t\tif (code == scheduler.keys.edit_save) scheduler.editStop(true);\r\n\t\t\tif (code == scheduler.keys.edit_cancel) scheduler.editStop(false);\r\n\r\n\t\t\tif(code == scheduler.keys.edit_save || code == scheduler.keys.edit_cancel){\r\n\t\t\t\tif(e.preventDefault) e.preventDefault();\r\n\t\t\t}\r\n\t\t});\r\n\t\tscheduler.event(this._editor, \"selectstart\", function (e) {\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn true;\r\n\t\t});\r\n\t\tscheduler._focus(this._editor, true);\r\n\t\t//IE and opera can add x-scroll during focusing\r\n\t\tthis._els[\"dhx_cal_data\"][0].scrollLeft = 0;\r\n\t}\r\n\tif (this.xy.menu_width !== 0 && this._select_id == ev.id) {\r\n\r\n\t\tif (this.config.cascade_event_display && this._drag_mode)\r\n\t\t\td.style.zIndex = 1; //fix overlapping issue for cascade view in case of dnd of selected event\r\n\t\tvar icons = this.config[\"icons_\" + ((this._edit_id == ev.id) ? \"edit\" : \"select\")];\r\n\t\tvar icons_str = \"\";\r\n\r\n\t\tvar ariaAttr;\r\n\r\n\t\tfor (var i = 0; i < icons.length; i++) {\r\n\t\t\tconst currentIcon = icons[i];\r\n\t\t\tariaAttr = this._waiAria.eventMenuAttrString(currentIcon);\r\n\t\t\ticons_str += `
`;\r\n\t\t}\r\n\t\tvar obj = this._render_v_bar(ev, left - menu - 1, top, menu, null, \"\", \"
\", icons_str, true);\r\n\r\n\t\tif(ev.color){\r\n\t\t\tobj.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tobj.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\t//obj.style.left = left - menu + 1;\r\n\t\tthis._els[\"dhx_cal_data\"][0].appendChild(obj);\r\n\t\tthis._rendered.push(obj);\r\n\t}\r\n\tif(this.config.drag_highlight && this._drag_id == ev.id){\r\n\t\tthis.highlightEventPosition(ev);\r\n\t}\r\n};\r\nscheduler._render_v_bar = function (ev, x, y, w, h, style, contentA, contentB, bottom) {\r\n\tvar d = document.createElement(\"div\");\r\n\tvar id = ev.id;\r\n\tvar cs = (bottom) ? \"dhx_cal_event dhx_cal_select_menu\" : \"dhx_cal_event\";\r\n\r\n\tvar state = scheduler.getState();\r\n\tif(state.drag_id == ev.id){\r\n\t\tcs += \" dhx_cal_event_drag\";\r\n\t}\r\n\r\n\tif(state.select_id == ev.id){\r\n\t\tcs += \" dhx_cal_event_selected\";\r\n\t}\r\n\r\n\tvar cse = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\tif (cse) cs = cs + \" \" + cse;\r\n\r\n\tif(this.config.cascade_event_display) {\r\n\t\tcs += \" dhx_cal_event_cascade\";\r\n\t}\r\n\r\n\tvar boxWidth = w - 1;\r\n\tvar html = `
\r\n\t\t\t\t
`;\r\n\r\n\td.innerHTML = html;\r\n\r\n\tvar container = d.cloneNode(true).firstChild;\r\n\r\n\tif (!bottom && scheduler.renderEvent(container, ev, w, h, contentA, contentB)) {\r\n\t\tif(ev.color){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\treturn container;\r\n\t} else {\r\n\t\tcontainer = d.firstChild;\r\n\t\tif(ev.color){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\tvar inner_html = '
 
';\r\n\t\tinner_html += '
' + contentA + '
';\r\n\t\tinner_html += '
' + contentB + '
'; // +2 css specific, moved from render_event\r\n\r\n\t\tvar footer_class = \"dhx_event_resize dhx_footer\";\r\n\t\tif (bottom || ev._drag_resize === false)\r\n\t\t\tfooter_class = \"dhx_resize_denied \" + footer_class;\r\n\r\n\t\tinner_html += '
';\r\n\r\n\t\tcontainer.innerHTML = inner_html;\r\n\t}\r\n\r\n\treturn container;\r\n};\r\nscheduler.renderEvent = function(){\r\n\treturn false;\r\n};\r\nscheduler.locate_holder = function(day) {\r\n\tif (this._mode == \"day\") return this._els[\"dhx_cal_data\"][0].firstChild; //dirty\r\n\treturn this._els[\"dhx_cal_data\"][0].childNodes[day];\r\n};\r\nscheduler.locate_holder_day = function(date, past) {\r\n\tvar day = Math.floor((this._correct_shift(date, 1) - this._min_date) / (60 * 60 * 24 * 1000));\r\n\t//when locating end data of event , we need to use next day if time part was defined\r\n\tif (past && this.date.time_part(date)) day++;\r\n\treturn day;\r\n};\r\n\r\n\r\n\r\nscheduler._get_dnd_order = function(order, ev_height, max_height){\r\n\tif(!this._drag_event)\r\n\t\treturn order;\r\n\tif(!this._drag_event._orig_sorder)\r\n\t\tthis._drag_event._orig_sorder = order;\r\n\telse\r\n\t\torder = this._drag_event._orig_sorder;\r\n\r\n\tvar evTop = ev_height * order;\r\n\twhile((evTop + ev_height) > max_height){\r\n\t\torder--;\r\n\t\tevTop -= ev_height;\r\n\t}\r\n\torder = Math.max(order, 0);\r\n\treturn order;\r\n};\r\n//scheduler._get_event_bar_pos = function(sday, eday, week, drag){\r\nscheduler._get_event_bar_pos = function(ev){\r\n\tvar rtl = this.config.rtl;\r\n\tvar columns = this._colsS;\r\n\tvar x = columns[ev._sday];\r\n\tvar x2 = columns[ev._eday];\r\n\tif (rtl) {\r\n\t\tx = columns[columns.col_length] - columns[ev._eday] + columns[0];\r\n\t\tx2 = columns[columns.col_length] - columns[ev._sday] + columns[0];\r\n\t}\r\n\r\n\tif (x2 == x) x2 = columns[ev._eday + 1];\r\n\tvar hb = this.xy.bar_height;\r\n\r\n\tvar order = ev._sorder;\r\n\tif(ev.id == this._drag_id){\r\n\t\tvar cellHeight = columns.heights[ev._sweek + 1] - columns.heights[ev._sweek]- this.xy.month_head_height;//22 for month head height\r\n\t\torder = scheduler._get_dnd_order(order, hb, cellHeight);\r\n\t}\r\n\tvar y_event_offset = order * hb;\r\n\tvar y = columns.heights[ev._sweek] + (columns.height ? (this.xy.month_scale_height + 2) : 2 ) + y_event_offset;\r\n\treturn {x:x, x2:x2, y:y};\r\n};\r\n\r\nscheduler.render_event_bar = function (ev) {\r\n\tvar parent = this._rendered_location;\r\n\tvar pos = this._get_event_bar_pos(ev);\r\n\tvar y = pos.y;\r\n\tvar x = pos.x;\r\n\tvar x2 = pos.x2;\r\n\t// resize for month mutliday events\r\n\tvar resize_handle = \"\";\r\n\r\n\t//events in ignored dates\r\n\r\n\tif (!x2) return;\r\n\r\n\tvar resizable = scheduler.config.resize_month_events && this._mode == \"month\" &&\r\n\t\t(!ev._timed || scheduler.config.resize_month_timed);\r\n\r\n\tvar d = document.createElement(\"div\");\r\n\tvar left_chunk = (ev.hasOwnProperty(\"_first_chunk\") && ev._first_chunk),\r\n\t\tright_chunk = (ev.hasOwnProperty(\"_last_chunk\") && ev._last_chunk);\r\n\r\n\tvar resize_left = resizable && (ev._timed || left_chunk);\r\n\tvar resize_right = resizable && (ev._timed || right_chunk);\r\n\r\n\tvar timed = true;\r\n\tvar cs = \"dhx_cal_event_clear\";\r\n\tif (!ev._timed || resizable) {\r\n\t\ttimed = false;\r\n\t\tcs = \"dhx_cal_event_line\";\r\n\t}\r\n\tif(left_chunk){\r\n\t\tcs += \" dhx_cal_event_line_start\";\r\n\t}\r\n\tif(right_chunk){\r\n\t\tcs += \" dhx_cal_event_line_end\";\r\n\t}\r\n\tif(resize_left){\r\n\t\tresize_handle += \"
\";\r\n\t}\r\n\tif(resize_right){\r\n\t\tresize_handle += \"
\";\r\n\t}\r\n\r\n\tvar cse = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\tif (cse){\r\n\t\tcs += \" \" + cse;\r\n\t}\r\n\r\n\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\tvar style_text = [\r\n\t\t\"position:absolute\",\r\n\t\t\"top:\" + y + \"px\",\r\n\t\t\"left:\" + x + \"px\",\r\n\t\t\"width:\" + (x2 - x - (timed ? 1 : 0)) + \"px\",\r\n\t\t\"height:\" + (this.xy.bar_height - 2) + \"px\",\r\n\t\tcolor,\r\n\t\tbg_color,\r\n\t\t(ev._text_style || \"\")\r\n\t].join(\";\");\r\n\r\n\tvar html = \"
\";\r\n\tif (resizable) {\r\n\t\thtml += resize_handle;\r\n\t}\r\n\tif(scheduler.getState().mode == \"month\"){\r\n\t\tev = scheduler.getEvent(ev.id); // ev at this point could be a part (row in a month view) of a larger event\r\n\t}\r\n\r\n\tif (ev._timed){\r\n\t\thtml += `${scheduler.templates.event_bar_date(ev.start_date, ev.end_date, ev)}`;\r\n\t}\r\n\r\n\thtml += \"
\";\r\n\thtml += scheduler.templates.event_bar_text(ev.start_date, ev.end_date, ev) + '
';\r\n\thtml += \"
\";\r\n\thtml += '
';\r\n\r\n\td.innerHTML = html;\r\n\r\n\tthis._rendered.push(d.firstChild);\r\n\tparent.appendChild(d.firstChild);\r\n};\r\n\r\nscheduler._locate_event = function(node) {\r\n\tvar id = null;\r\n\twhile (node && !id && node.getAttribute) {\r\n\t\tid = node.getAttribute(this.config.event_attribute);\r\n\t\tnode = node.parentNode;\r\n\t}\r\n\treturn id;\r\n};\r\n\r\nscheduler.edit = function(id) {\r\n\tif (this._edit_id == id) return;\r\n\tthis.editStop(false, id);\r\n\tthis._edit_id = id;\r\n\tthis.updateEvent(id);\r\n};\r\nscheduler.editStop = function(mode, id) {\r\n\tif (id && this._edit_id == id) return;\r\n\tvar ev = this.getEvent(this._edit_id);\r\n\tif (ev) {\r\n\t\tif (mode) ev.text = this._editor.value;\r\n\t\tthis._edit_id = null;\r\n\t\tthis._editor = null;\r\n\t\tthis.updateEvent(ev.id);\r\n\t\tthis._edit_stop_event(ev, mode);\r\n\t}\r\n};\r\nscheduler._edit_stop_event = function(ev, mode) {\r\n\tif (this._new_event) {\r\n\t\tif (!mode) {\r\n\t\t\tif (ev) // in case of custom lightbox user can already delete event\r\n\t\t\t\tthis.deleteEvent(ev.id, true);\r\n\t\t} else {\r\n\t\t\tthis.callEvent(\"onEventAdded\", [ev.id, ev]);\r\n\t\t}\r\n\t\tthis._new_event = null;\r\n\t} else {\r\n\t\tif (mode){\r\n\t\t\tthis.callEvent(\"onEventChanged\", [ev.id, ev]);\r\n\t\t}\r\n\t}\r\n};\r\n\r\nscheduler.getEvents = function(from, to) {\r\n\tvar result = [];\r\n\tfor (var a in this._events) {\r\n\t\tvar ev = this._events[a];\r\n\t\tif (ev && ( (!from && !to) || (ev.start_date < to && ev.end_date > from) ))\r\n\t\t\tresult.push(ev);\r\n\t}\r\n\treturn result;\r\n};\r\nscheduler.getRenderedEvent = function(id) {\r\n\tif (!id)\r\n\t\treturn;\r\n\tvar rendered_events = scheduler._rendered;\r\n\tfor (var i=0; i -1){\r\n\t\t\t\t\tsection = section.split(scheduler.config.section_delimiter)[0];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar top = timeline.getSectionTop(section);\r\n\t\t\tvar left = timeline.posFromDate(event.start_date);\r\n\t\t\tvar container = scheduler.$container.querySelector(\".dhx_timeline_data_wrapper\");\r\n\t\t\tleft = left - (container.offsetWidth - timeline.dx) / 2;\r\n\t\t\ttop = top - container.offsetHeight / 2 + timeline.dy/2;\r\n\r\n\t\t\tif (timeline._smartRenderingEnabled()) {\r\n\t\t\t\tvar handlerId = timeline.attachEvent(\"onScroll\", function(){\r\n\t\t\t\t\trestoreOriginalColors();\r\n\t\t\t\t\ttimeline.detachEvent(handlerId);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\ttimeline.scrollTo({\r\n\t\t\t\tleft: left,\r\n\t\t\t\ttop: top\r\n\t\t\t});\r\n\t\t\tif (!timeline._smartRenderingEnabled()) {\r\n\t\t\t\trestoreOriginalColors();\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\trestoreOriginalColors();\r\n\t}\r\n\r\n\tscheduler.callEvent(\"onAfterEventDisplay\", [ev, mode]);\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._append_drag_marker = function(m){\r\n\tif(m.parentNode) return;\r\n\tvar zone = scheduler._els[\"dhx_cal_data\"][0];\r\n\r\n\tvar scale = zone.lastChild;\r\n\tvar className = scheduler._getClassName(scale);\r\n\tif(className.indexOf(\"dhx_scale_holder\") < 0 && scale.previousSibling){\r\n\t\tscale = scale.previousSibling;\r\n\t}\r\n\r\n\tclassName = scheduler._getClassName(scale);\r\n\tif (scale && className.indexOf(\"dhx_scale_holder\") === 0) {\r\n\t\tscale.appendChild(m);\r\n\t}\r\n};\r\n\r\nscheduler._update_marker_position = function(m, event){\r\n\tvar size = scheduler._calc_event_y(event, 0);\r\n\tm.style.top = size.top + \"px\";\r\n\tm.style.height = size.height + \"px\";\r\n};\r\n\r\nscheduler.highlightEventPosition = function(event){\r\n\tvar m = document.createElement(\"div\");\r\n\r\n\tm.setAttribute(\"event_id\", event.id); // for backward compatibility\r\n\tm.setAttribute(this.config.event_attribute, event.id);\r\n\tthis._rendered.push(m);\r\n\tthis._update_marker_position(m, event);\r\n\r\n\tvar css = this.templates.drag_marker_class(event.start_date, event.end_date, event);\r\n\tvar html = this.templates.drag_marker_content(event.start_date, event.end_date, event);\r\n\tm.className = \"dhx_drag_marker\";\r\n\tif(css)\r\n\t\tm.className += \" \" + css;\r\n\tif(html)\r\n\t\tm.innerHTML = html;\r\n\tthis._append_drag_marker(m);\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler._lightbox_controls = {};\r\nscheduler.formSection = function(name){\r\n\tvar config = this.config.lightbox.sections;\r\n\tvar i = 0;\r\n\tfor (i; i < config.length; i++) {\r\n\t\tif (config[i].name == name) {\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif (i === config.length) {\r\n\t\t// GS-1662 section not found, should exit here instead of throwing an error\r\n\t\treturn null;\r\n\t}\r\n\r\n\tvar section = config[i];\r\n\tif (!scheduler._lightbox) {\r\n\t\tscheduler.getLightbox();\r\n\t}\r\n\tvar header = scheduler._lightbox.querySelector(`#${section.id}`);\r\n\tvar node = header.nextSibling;\r\n\r\n\tvar result = {\r\n\t\tsection: section,\r\n\t\theader: header,\r\n\t\tnode: node,\r\n\t\tgetValue:function(ev){\r\n\t\t\treturn scheduler.form_blocks[section.type].get_value(node, (ev||{}), section);\r\n\t\t},\r\n\t\tsetValue:function(value, ev){\r\n\t\t\treturn scheduler.form_blocks[section.type].set_value(node, value, (ev||{}), section);\r\n\t\t}\r\n\t};\r\n\r\n\tvar handler = scheduler._lightbox_controls[\"get_\"+section.type+\"_control\"];\r\n\treturn handler?handler(result):result;\r\n};\r\nscheduler._lightbox_controls.get_template_control = function(result) {\r\n\tresult.control = result.node;\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_select_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('select')[0];\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_textarea_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('textarea')[0];\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_time_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('select'); // array\r\n\treturn result;\r\n};\r\n\r\nscheduler._lightbox_controls.defaults = {\r\n\ttemplate: {\r\n\t\theight:30\r\n\t},\r\n\ttextarea: {\r\n\t\theight: 200\r\n\t},\r\n\tselect: {\r\n\t\theight: 23\r\n\t},\r\n\ttime: {\r\n\t\theight: 20\r\n\t}\r\n};\r\n\r\n\r\nscheduler.form_blocks={\r\n\ttemplate:{\r\n\t\trender: function(sns){\r\n\t\t\treturn \"
\";\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,config){\r\n\t\t\tnode.innerHTML = value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev,config){\r\n\t\t\treturn node.innerHTML||\"\";\r\n\t\t},\r\n\t\tfocus: function(node){\r\n\t\t}\r\n\t},\r\n\ttextarea:{\r\n\t\trender:function(sns){\r\n\t\t\tconst placeholder = sns.placeholder ? `placeholder='${sns.placeholder}'` : \"\";\r\n\t\t\treturn `
`;\r\n\t\t},\r\n\t\tset_value:function(node,value,ev){\r\n\t\t\tscheduler.form_blocks.textarea._get_input(node).value=value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev){\r\n\t\t\treturn scheduler.form_blocks.textarea._get_input(node).value;\r\n\t\t},\r\n\t\tfocus:function(node){\r\n\t\t\tvar a = scheduler.form_blocks.textarea._get_input(node);\r\n\t\t\tscheduler._focus(a, true);\r\n\t\t},\r\n\t\t_get_input: function(node){\r\n\t\t\treturn node.getElementsByTagName(\"textarea\")[0];\r\n\t\t}\r\n\t},\r\n\tselect:{\r\n\t\trender:function(sns){\r\n\t\t\t//var defaults = scheduler._lightbox_controls.defaults.select;\r\n\t\t\tvar html=\"
\";\r\n\t\t\treturn html;\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,sns){\r\n\t\t\tvar select = node.firstChild;\r\n\t\t\tif (!select._dhx_onchange && sns.onchange) {\r\n\t\t\t\tscheduler.event(select, \"change\", sns.onchange);\r\n\t\t\t\tselect._dhx_onchange = true;\r\n\t\t\t}\r\n\t\t\tif (typeof value == \"undefined\")\r\n\t\t\t\tvalue = (select.options[0]||{}).value;\r\n\t\t\tselect.value=value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev){\r\n\t\t\treturn node.firstChild.value;\r\n\t\t},\r\n\t\tfocus:function(node){\r\n\t\t\tvar a=node.firstChild; scheduler._focus(a, true);\r\n\t\t}\r\n\t},\r\n\ttime:{\r\n\t\trender:function(sns) {\r\n\t\t\tif (!sns.time_format) {\r\n\t\t\t\t// default order\r\n\t\t\t\tsns.time_format = [\"%H:%i\", \"%d\", \"%m\", \"%Y\"];\r\n\t\t\t}\r\n\t\t\t// map: default order => real one\r\n\t\t\tsns._time_format_order = {};\r\n\t\t\tvar time_format = sns.time_format;\r\n\r\n\t\t\tvar cfg = scheduler.config;\r\n\t\t\tvar dt = scheduler.date.date_part(scheduler._currentDate());\r\n\t\t\tvar last = 24*60, first = 0;\r\n\t\t\tif(scheduler.config.limit_time_select){\r\n\t\t\t\tlast = 60*cfg.last_hour+1;\r\n\t\t\t\tfirst = 60*cfg.first_hour;\r\n\t\t\t\tdt.setHours(cfg.first_hour);\r\n\t\t\t}\r\n\t\t\tvar html = \"\";\r\n\r\n\t\t\tfor (var p = 0; p < time_format.length; p++) {\r\n\t\t\t\tvar time_option = time_format[p];\r\n\r\n\t\t\t\t// adding spaces between selects\r\n\t\t\t\tif (p > 0) {\r\n\t\t\t\t\thtml += \" \";\r\n\t\t\t\t}\r\n\t\t\t\tvar selectBoxClass = \"\";\r\n\t\t\t\tvar options = \"\";\r\n\t\t\t\tswitch (time_option) {\r\n\t\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_year_select\";\r\n\t\t\t\t\t\tsns._time_format_order[3] = p;\r\n\t\t\t\t\t\t//year\r\n\t\t\t\t\t\tvar range;\r\n\t\t\t\t\t\tvar start_year;\r\n\t\t\t\t\t\tvar end_year;\r\n\t\t\t\t\t\tif(sns.year_range){\r\n\t\t\t\t\t\t\tif (!isNaN(sns.year_range)) {\r\n\t\t\t\t\t\t\t\trange = sns.year_range;\r\n\t\t\t\t\t\t\t} else if (sns.year_range.push) {\r\n\t\t\t\t\t\t\t\t// if\r\n\t\t\t\t\t\t\t\tstart_year = sns.year_range[0];\r\n\t\t\t\t\t\t\t\tend_year = sns.year_range[1];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\trange = range || 10;\r\n\t\t\t\t\t\tvar offset = offset || Math.floor(range / 2);\r\n\t\t\t\t\t\tstart_year = start_year || dt.getFullYear() - offset;\r\n\t\t\t\t\t\tend_year = end_year || start_year + range;\r\n\r\n\t\t\t\t\t\tfor (var i = start_year; i < end_year; i++)\r\n\t\t\t\t\t\t\toptions += \"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%m\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_month_select\";\r\n\t\t\t\t\t\tsns._time_format_order[2] = p;\r\n\t\t\t\t\t\t//month\r\n\t\t\t\t\t\tfor (var i=0; i < 12; i++)\r\n\t\t\t\t\t\t\toptions+=\"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%d\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_day_select\";\r\n\t\t\t\t\t\tsns._time_format_order[1] = p;\r\n\t\t\t\t\t\t//days\r\n\t\t\t\t\t\tfor (var i=1; i < 32; i++)\r\n\t\t\t\t\t\t\toptions+=\"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%H:%i\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_time_select\";\r\n\t\t\t\t\t\tsns._time_format_order[0] = p;\r\n\t\t\t\t\t\t//hours\r\n\t\t\t\t\t\tvar i = first;\r\n\t\t\t\t\t\tvar tdate = dt.getDate();\r\n\t\t\t\t\t\tsns._time_values = [];\r\n\r\n\t\t\t\t\t\twhile(i\"+time+\"\";\r\n\t\t\t\t\t\t\tsns._time_values.push(i);\r\n\t\t\t\t\t\t\tdt.setTime(dt.valueOf()+this.config.time_step*60*1000);\r\n\t\t\t\t\t\t\tvar diff = (dt.getDate()!=tdate)?1:0; // moved or not to the next day\r\n\t\t\t\t\t\t\ti=diff*24*60+dt.getHours()*60+dt.getMinutes();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(options){\r\n\r\n\t\t\t\t\tvar ariaAttrs = scheduler._waiAria.lightboxSelectAttrString(time_option);\r\n\t\t\t\t\tvar readonly = sns.readonly ? \"disabled='disabled'\" : \"\";\r\n\t\t\t\t\thtml += \" \";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//var defaults = scheduler._lightbox_controls.defaults.select;\r\n\r\n\t\t\treturn \"
\"+html+\"  –  \"+html+\"
\";\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,config){\r\n\t\t\tvar cfg = scheduler.config;\r\n\t\t\tvar s=node.getElementsByTagName(\"select\");\r\n\t\t\tvar map = config._time_format_order;\r\n\t\t\tvar start_date, end_date;\r\n\r\n\t\t\tif(cfg.full_day) {\r\n\t\t\t\tif (!node._full_day){\r\n\t\t\t\t\tvar html = \"\";\r\n\t\t\t\t\tif (!scheduler.config.wide_form)\r\n\t\t\t\t\t\thtml = node.previousSibling.innerHTML+html;\r\n\t\t\t\t\tnode.previousSibling.innerHTML=html;\r\n\t\t\t\t\tnode._full_day=true;\r\n\t\t\t\t}\r\n\t\t\t\tvar input=node.previousSibling.getElementsByTagName(\"input\")[0];\r\n\t\t\t\tinput.checked = (scheduler.date.time_part(ev.start_date)===0 && scheduler.date.time_part(ev.end_date)===0);\r\n\r\n\t\t\t\ts[map[0]].disabled=input.checked;\r\n\t\t\t\ts[ map[0] + s.length/2 ].disabled=input.checked;\r\n\r\n\t\t\t\tif(!input.$_eventAttached){\r\n\t\t\t\t\tinput.$_eventAttached = true;\r\n\r\n\t\t\t\t\t\tscheduler.event(input, \"click\", function(){\r\n\t\t\t\t\t\tif(input.checked) {\r\n\t\t\t\t\t\t\tvar obj = {};\r\n\t\t\t\t\t\t\tscheduler.form_blocks.time.get_value(node,obj,config);\r\n\r\n\t\t\t\t\t\t\tstart_date = scheduler.date.date_part(obj.start_date);\r\n\t\t\t\t\t\t\tend_date = scheduler.date.date_part(obj.end_date);\r\n\r\n\t\t\t\t\t\t\tif (+end_date == +start_date || (+end_date >= +start_date && (ev.end_date.getHours() !== 0 || ev.end_date.getMinutes() !== 0)))\r\n\t\t\t\t\t\t\t\tend_date = scheduler.date.add(end_date, 1, \"day\");\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tstart_date = null;\r\n\t\t\t\t\t\t\tend_date = null;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\ts[map[0]].disabled=input.checked;\r\n\t\t\t\t\t\ts[ map[0] + s.length/2 ].disabled=input.checked;\r\n\r\n\t\t\t\t\t\t_fill_lightbox_select(s,0,start_date||ev.start_date);\r\n\t\t\t\t\t\t_fill_lightbox_select(s,4,end_date||ev.end_date);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(cfg.auto_end_date && cfg.event_duration) {\r\n\t\t\t\tvar _update_lightbox_select = function () {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (!(cfg.auto_end_date && cfg.event_duration)){\r\n\t\t\t\t\t\t// setting may be disabled after the handler is attached\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstart_date = new Date(s[map[3]].value,s[map[2]].value,s[map[1]].value,0,s[map[0]].value);\r\n\t\t\t\t\tend_date = new Date(start_date.getTime() + (scheduler.config.event_duration * 60 * 1000));\r\n\t\t\t\t\t_fill_lightbox_select(s, 4, end_date);\r\n\t\t\t\t};\r\n\t\t\t\tfor(var i=0; i<4; i++) {\r\n\t\t\t\t\tif(!s[i].$_eventAttached) {\r\n\t\t\t\t\t\ts[i].$_eventAttached = true;\r\n\t\t\t\t\t\tscheduler.event(s[i], \"change\", _update_lightbox_select);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction _fill_lightbox_select(s,i,d) {\r\n\t\t\t\tvar time_values = config._time_values;\r\n\t\t\t\tvar direct_value = d.getHours()*60+d.getMinutes();\r\n\t\t\t\tvar fixed_value = direct_value;\r\n\t\t\t\tvar value_found = false;\r\n\t\t\t\tfor (var k=0; k\";\r\n\t\tvar ariaAttr = \"\";\r\n\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\tariaAttr = this._waiAria.lightboxButtonAttrString(buttons[i]);\r\n\t\t\thtml += \"
\" + scheduler.locale.labels[buttons[i]] + \"
\";\r\n\t\t}\r\n\r\n\t\tbuttons = this.config.buttons_right;\r\n\t\tvar rtl = scheduler.config.rtl;\r\n\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\tariaAttr = this._waiAria.lightboxButtonAttrString(buttons[i]);\r\n\r\n\t\t\thtml += \"
\";\r\n\r\n\t\t\thtml += \"
\" + scheduler.locale.labels[buttons[i]] + \"
\";\r\n\t\t}\r\n\t\thtml += \"
\";\r\n\t\thtml+=\"
\";\r\n\t\td.innerHTML=html;\r\n\t\tif (scheduler.config.drag_lightbox){\r\n\t\t\tscheduler.event(d.firstChild, \"mousedown\", scheduler._ready_to_dnd);\r\n\t\t\tscheduler.event(d.firstChild, \"selectstart\", function(e){ \r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn false; \r\n\t\t\t});\r\n\t\t\td.firstChild.style.cursor = \"move\";\r\n\t\t\tscheduler._init_dnd_events();\r\n\r\n\t\t}\r\n\r\n\t\tthis._waiAria.lightboxAttr(d);\r\n\r\n\t\tthis.show_cover();\r\n\t\tthis._cover.insertBefore(d,this._cover.firstChild);\r\n\t\t\r\n\t\tthis._lightbox=d;\r\n\r\n\t\tvar sns=this.config.lightbox.sections;\r\n\t\thtml=\"\";\r\n\t\tfor (var i=0; i < sns.length; i++) {\r\n\t\t\tvar block=this.form_blocks[sns[i].type];\r\n\t\t\tif (!block) continue; //ignore incorrect blocks\r\n\t\t\tsns[i].id=\"area_\"+this.uid();\r\n\t\t\tvar button = \"\";\r\n\t\t\tif (sns[i].button){\r\n\t\t\t\tvar ariaAttr = scheduler._waiAria.lightboxSectionButtonAttrString(this.locale.labels[\"button_\"+sns[i].button]);\r\n\t\t\t\tbutton = \"
\"+this.locale.labels[\"button_\"+sns[i].button]+\"
\";\r\n\t\t\t}\r\n\r\n\t\t\tif (this.config.wide_form){\r\n\t\t\t\thtml+=\"
\";\r\n\t\t\t}\r\n\r\n\t\t\tvar label_name = this.locale.labels[\"section_\"+sns[i].name];\r\n\t\t\tif(typeof label_name !== \"string\"){\r\n\t\t\t\tlabel_name = sns[i].name;\r\n\t\t\t}\r\n\t\t\thtml+=\"
\"+button+ \"
\"+block.render.call(this,sns[i]);\r\n\t\t\thtml+=\"
\";\r\n\t\t}\r\n\r\n\t\tvar ds=d.getElementsByTagName(\"div\");\r\n\t\tfor (var i=0; i
 \r\n
\r\n
\r\n\r\n
`;\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler.getRootView = function() {\r\n\treturn {\r\n\t\tview: {\r\n\t\t\trender: function(){\r\n\t\t\t\treturn {\r\n\t\t\t\t\ttag: \"div\",\r\n\t\t\t\t\ttype: 1,\r\n\t\t\t\t\tattrs: {\r\n\t\t\t\t\t\tstyle: \"width:100%;height:100%;\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\thooks: {\r\n\t\t\t\t\t\t\"didInsert\": function(){\r\n\t\t\t\t\t\t\tscheduler.setCurrentView();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tbody: [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tel: this.el,\r\n\t\t\t\t\t\t\ttype: 1\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t};\r\n\t\t\t},\r\n\t\t\tinit: function(){\r\n\t\t\t\tvar container = document.createElement(\"DIV\");\r\n\t\t\t\tcontainer.id = \"scheduler_\"+ scheduler.uid();\r\n\t\t\t\tcontainer.style.width = \"100%\";\r\n\t\t\t\tcontainer.style.height = \"100%\";\r\n\t\t\t\tcontainer.classList.add(\"dhx_cal_container\");\r\n\t\t\t\tcontainer.cmp = \"grid\";\r\n\t\t\t\tcontainer.innerHTML = '
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
';\r\n\t\t\t\tscheduler.init(container);\r\n\r\n\t\t\t\tthis.el = container;\r\n\t\t\t}\r\n\t\t},\r\n\t\ttype: 4\r\n\t};\r\n};\r\n\r\n}","import global from \"../global\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\n(function(){\r\n\r\n\tvar setCurrentView = scheduler.setCurrentView,\r\n\t\tupdateView = scheduler.updateView;\r\n\tvar update_view_timer = null,\r\n\t\tcurr_view_timer = null;\r\n\r\n\tvar lazy_setCurrentView = function(date, mode){\r\n\t\tvar self = this;\r\n\t\tglobal.clearTimeout(curr_view_timer);\r\n\t\tglobal.clearTimeout(update_view_timer);\r\n\r\n\t\tvar oldDate = self._date,\r\n\t\t\toldMode = self._mode;\r\n\t\tupdateFlags(this, date, mode);\r\n\r\n\t\tcurr_view_timer = setTimeout(function(){\r\n\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif (!self.callEvent(\"onBeforeViewChange\", [oldMode, oldDate, mode || self._mode, date || self._date])){\r\n\t\t\t\tupdateFlags(self, oldDate, oldMode);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tupdateView.call(self, date, mode);\r\n\t\t\tself.callEvent(\"onViewChange\", [self._mode, self._date]);\r\n\r\n\t\t\tglobal.clearTimeout(update_view_timer);\r\n\t\t\tcurr_view_timer = 0;\r\n\t\t}, scheduler.config.delay_render);\r\n\t};\r\n\tvar lazy_updateView = function(date, mode){\r\n\t\tvar self = this,\r\n\t\t\tars = arguments;\r\n\r\n\t\tupdateFlags(this, date, mode);\r\n\r\n\t\tglobal.clearTimeout(update_view_timer);\r\n\t\tupdate_view_timer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif(curr_view_timer)\r\n\t\t\t\treturn;\r\n\r\n\t\t\tupdateView.apply(self, ars);\r\n\t\t}, scheduler.config.delay_render);\r\n\t};\r\n\tfunction updateFlags(scheduler, date, mode){\r\n\t\tif(date)\r\n\t\t\tscheduler._date = date;\r\n\t\tif(mode)\r\n\t\t\tscheduler._mode = mode;\r\n\r\n\t}\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\tif(scheduler.config.delay_render){\r\n\t\t\tscheduler.setCurrentView = lazy_setCurrentView;\r\n\t\t\tscheduler.updateView = lazy_updateView;\r\n\t\t}else{\r\n\t\t\tscheduler.setCurrentView = setCurrentView;\r\n\t\t\tscheduler.updateView = updateView;\r\n\t\t}\r\n\t});\r\n\r\n})();\r\n\r\n}","import global from \"../global\";\r\n\r\nexport default function extend(scheduler) {\r\n/*\r\nif (global.dataProcessor && !dataProcessor.prototype.init_original){\r\n\tdataProcessor.prototype.init_original=dataProcessor.prototype.init;\r\n\tdataProcessor.prototype.init=function(obj){\r\n\t\tthis.init_original(obj);\r\n\t\tobj._dataprocessor=this;\r\n\r\n\t\tthis.setTransactionMode(\"POST\",true);\r\n\t\tthis.serverProcessor+=(this.serverProcessor.indexOf(\"?\")!=-1?\"&\":\"?\")+\"editing=true\";\r\n\t};\r\n}*/\r\n\r\nscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\tif(typeof dhtmlxError !== \"undefined\") {\r\n\t\twindow.dhtmlxError.catchError(\"LoadXML\", function(a, b, c){\r\n\t\t\tvar message = c[0].responseText;\r\n\r\n\t\t\tswitch (scheduler.config.ajax_error){\r\n\t\t\t\tcase \"alert\":\r\n\t\t\t\t\tglobal.alert(message);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"console\":\r\n\t\t\t\t\tglobal.console.log(message);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n});\r\n\r\n\r\n}","import ar from \"./locale_ar\";\r\nimport be from \"./locale_be\";\r\nimport ca from \"./locale_ca\";\r\nimport cn from \"./locale_cn\";\r\nimport cs from \"./locale_cs\";\r\nimport da from \"./locale_da\";\r\nimport de from \"./locale_de\";\r\nimport el from \"./locale_el\";\r\nimport en from \"./locale_en\";\r\nimport es from \"./locale_es\";\r\nimport fi from \"./locale_fi\";\r\nimport fr from \"./locale_fr\";\r\nimport he from \"./locale_he\";\r\nimport hu from \"./locale_hu\";\r\nimport id from \"./locale_id\";\r\nimport it from \"./locale_it\";\r\nimport jp from \"./locale_jp\";\r\n\r\nimport LocaleManager from \"./locale_manager\";\r\n\r\nimport nb from \"./locale_nb\";\r\nimport nl from \"./locale_nl\";\r\nimport no from \"./locale_no\";\r\nimport pl from \"./locale_pl\";\r\nimport pt from \"./locale_pt\";\r\nimport ro from \"./locale_ro\";\r\nimport ru from \"./locale_ru\";\r\nimport si from \"./locale_si\";\r\nimport sk from \"./locale_sk\";\r\nimport sv from \"./locale_sv\";\r\nimport tr from \"./locale_tr\";\r\nimport ua from \"./locale_ua\";\r\n\r\nexport default function(){\r\n\treturn new LocaleManager({\r\n\t\ten,\r\n\t\tar,\r\n\t\tbe,\r\n\t\tca,\r\n\t\tcn,\r\n\t\tcs,\r\n\t\tda,\r\n\t\tde,\r\n\t\tel,\r\n\t\tes,\r\n\t\tfi,\r\n\t\tfr,\r\n\t\the,\r\n\t\thu,\r\n\t\tid,\r\n\t\tit,\r\n\t\tjp,\r\n\t\tnb,\r\n\t\tnl,\r\n\t\tno,\r\n\t\tpl,\r\n\t\tpt,\r\n\t\tro,\r\n\t\tru,\r\n\t\tsi,\r\n\t\tsk,\r\n\t\tsv,\r\n\t\ttr,\r\n\t\tua\r\n\t});\r\n}","export default class ExtensionsManager{\r\n\tconstructor(config){\r\n\t\tthis._extensions = {};\r\n\t\tfor(const i in config){\r\n\t\t\tthis._extensions[i] = config[i];\r\n\t\t}\r\n\t}\r\n\r\n\taddExtension(name, ext) {\r\n\t\tthis._extensions[name] = ext;\r\n\t}\r\n\r\n\tgetExtension(name) {\r\n\t\treturn this._extensions[name];\r\n\t}\r\n}","\r\nexport default function(){\r\n/* global dhtmlx */\r\nif (typeof dhtmlx != \"undefined\" && dhtmlx.attaches) {\r\n\tdhtmlx.attaches.attachScheduler = function (day, mode, tabs, scheduler) {\r\n\t\tvar tabs = tabs || '
';\r\n\t\tvar obj = document.createElement(\"DIV\");\r\n\t\tobj.id = \"dhxSchedObj_\" + this._genStr(12);\r\n\t\tobj.innerHTML = '
' + tabs + '
';\r\n\t\tdocument.body.appendChild(obj.firstChild);\r\n\r\n\t\tthis.attachObject(obj.id, false, true);\r\n\r\n\t\tthis.vs[this.av].sched = scheduler;\r\n\t\tthis.vs[this.av].schedId = obj.id;\r\n\t\tscheduler.setSizes = scheduler.updateView;\r\n\t\tscheduler.destructor = function () { };\r\n\t\tscheduler.init(obj.id, day, mode);\r\n\r\n\t\treturn this.vs[this._viewRestore()].sched;\r\n\t};\r\n}\r\n\r\n}","export default {\r\n\talert: (extension, assert) => {\r\n\t\tassert(false, `The ${extension} extension is not included in this version of dhtmlxScheduler.
\r\n\t\tYou may need a Professional version of the component.
\r\n\t\tContact us at https://dhtmlx.com/docs/contact.shtml if you have any questions.`);\r\n\t}\r\n};","export default function(scheduler){\r\n\r\n\r\n\r\n(function(){\r\n\tvar modalsStack = [];\r\n\r\n\tfunction isModal(){\r\n\t\treturn !!(modalsStack.length);\r\n\t}\r\n\r\n\tfunction isChildOf(child, parent){\r\n\t\twhile(child && child != parent){\r\n\t\t\tchild = child.parentNode;\r\n\t\t}\r\n\r\n\t\treturn !!(child == parent);\r\n\t}\r\n\r\n\tfunction afterPopup(box){\r\n\t\tsetTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif(!isModal() && !(isChildOf(document.activeElement, scheduler.$container))) {\r\n\t\t\t\tscheduler.focus();\r\n\t\t\t}\r\n\t\t}, 1);\r\n\t}\r\n\tfunction startModal(box){\r\n\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\tscheduler.event(box, \"keydown\", trapFocus);\r\n\t\tmodalsStack.push(box);\r\n\t\t//scheduler.$keyboardNavigation.dispatcher.disable();\r\n\t}\r\n\r\n\tfunction endModal(){\r\n\t\tvar box = modalsStack.pop();\r\n\t\tif(box) {\r\n\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t}\r\n\t\tafterPopup(box);\r\n\r\n\t}\r\n\r\n\tfunction isTopModal(box){\r\n\t//\tif(dhtmlx._modalsStack.length){\r\n\t//\t\treturn box == dhtmlx._modalsStack[dhtmlx._modalsStack.length - 1];\r\n\t//\t}else{\r\n\t\t\treturn box == modalsStack[modalsStack.length - 1];\r\n\t//\t}\r\n\r\n\t}\r\n\r\n\tfunction trapFocus(event){\r\n\t\tvar event = event || window.event;\r\n\t\tvar target = event.currentTarget;\r\n\t\tif(!isTopModal(target)) return;\r\n\r\n\t\tscheduler.$keyboardNavigation.trapFocus(target, event);\r\n\t}\r\n\r\n\tfunction traceLightbox(){\r\n\t\tstartModal(scheduler.getLightbox());\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onLightbox\", traceLightbox);\r\n\tscheduler.attachEvent(\"onAfterLightbox\", endModal);\r\n\r\n\tscheduler.attachEvent(\"onAfterQuickInfo\", function(){afterPopup();});\r\n\r\n\tif(!scheduler._keyNavMessagePopup) {\r\n\t\tscheduler._keyNavMessagePopup = true;\r\n\r\n\t\tvar focusElement = null;\r\n\t\tvar backupFocus = null;\r\n\t\tconst modalsStack = [];\r\n\t\tscheduler.attachEvent(\"onMessagePopup\", function(box){\r\n\t\t\tfocusElement = document.activeElement;\r\n\t\t\tbackupFocus = focusElement;\r\n\r\n\t\t\twhile(backupFocus && scheduler._getClassName(backupFocus).indexOf(\"dhx_cal_data\") < 0){\r\n\t\t\t\tbackupFocus = backupFocus.parentNode;\r\n\t\t\t}\r\n\t\t\tif(backupFocus){\r\n\t\t\t\tbackupFocus = backupFocus.parentNode;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t\tscheduler.event(box, \"keydown\", trapFocus);\r\n\t\t\tmodalsStack.push(box);\r\n\t\t});\r\n\r\n\r\n\t\tscheduler.attachEvent(\"onAfterMessagePopup\", function () {\r\n\t\t\tvar box = modalsStack.pop();\r\n\t\t\tif(box) {\r\n\t\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t\t}\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tvar currentTarget = document.activeElement;\r\n\t\t\t\twhile(currentTarget && scheduler._getClassName(currentTarget).indexOf(\"dhx_cal_light\") < 0){\r\n\t\t\t\t\tcurrentTarget = currentTarget.parentNode;\r\n\t\t\t\t}\r\n\t\t\t\tif(currentTarget)\r\n\t\t\t\t\treturn;\r\n\r\n\r\n\t\t\t\tif(focusElement && focusElement.parentNode){\r\n\t\t\t\t\tfocusElement.focus();\r\n\r\n\t\t\t\t}else if(backupFocus && backupFocus.parentNode){\r\n\t\t\t\t\tbackupFocus.focus();\r\n\t\t\t\t}\r\n\t\t\t\tfocusElement = null;\r\n\t\t\t\tbackupFocus = null;\r\n\r\n\t\t\t}, 1);\r\n\t\t});\r\n\t}\r\n\r\n\tscheduler.$keyboardNavigation.isModal = isModal;\r\n\r\n\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\r\n//Initial idea and implementation by Steve MC\r\nscheduler._temp_key_scope = function (){\r\n\r\n\tscheduler.config.key_nav = true;\r\n\r\n\tscheduler.$keyboardNavigation._pasteDate = null; // used for copy and paste operations\r\n\tscheduler.$keyboardNavigation._pasteSection = null; // used for copy and paste operations\r\n\tvar isCopy = null;\r\n\r\n\tvar pos = {};\r\n\r\n\tif(!document.body){\r\n\t\tscheduler.event(window, \"load\", function(){\r\n\t\t\tscheduler.event(document.body, \"mousemove\", trackMousePosition);\r\n\t\t});\r\n\t}else{\r\n\t\tscheduler.event(document.body, \"mousemove\", trackMousePosition);\r\n\t}\r\n\r\n\tfunction trackMousePosition(event){\r\n\t\tevent = event || window.event;\r\n\t\tpos.x = event.clientX;\r\n\t\tpos.y = event.clientY;\r\n\t}\r\n\tfunction currentTarget(){\r\n\r\n\t\tvar mousePointer = false;\r\n\t\tvar keyNavPointer = false;\r\n\r\n\t\tvar target = document.elementFromPoint(pos.x, pos.y);\r\n\t\twhile(target && target != scheduler._obj){\r\n\t\t\ttarget = target.parentNode;\r\n\t\t}\r\n\t\tmousePointer = !!(target == scheduler._obj);\r\n\r\n\t\tkeyNavPointer = scheduler.$keyboardNavigation.dispatcher.isEnabled();\r\n\r\n\t\treturn mousePointer || keyNavPointer;\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onMouseMove\", function(id,e){\r\n\t\tvar state = scheduler.getState();\r\n\r\n\t\t// make sure scheduler is fully initialized before calling scheduler.getActionData\r\n\t\tif(!(state.mode && state.min_date)){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar position = scheduler.getActionData(e);\r\n\t\tscheduler.$keyboardNavigation._pasteDate = position.date;\r\n\t\tscheduler.$keyboardNavigation._pasteSection = position.section;\r\n\t});\r\n\r\n\tfunction clear_event_after(ev){\r\n\t\tdelete ev.rec_type; delete ev.rec_pattern;\r\n\t\tdelete ev.event_pid; delete ev.event_length;\r\n\t}\r\n\r\n\tfunction copyEvent(ev){\r\n\t\treturn scheduler._lame_copy({}, ev);\r\n\t}\r\n\r\n\tscheduler._make_pasted_event = function(ev){\r\n\t\tvar date = scheduler.$keyboardNavigation._pasteDate;\r\n\t\tvar section = scheduler.$keyboardNavigation._pasteSection;\r\n\r\n\t\tvar event_duration = ev.end_date-ev.start_date;\r\n\r\n\t\tvar copy = copyEvent(ev);\r\n\t\tclear_event_after(copy);\r\n\t\tcopy.start_date = new Date(date);\r\n\t\tcopy.end_date = new Date(copy.start_date.valueOf() + event_duration);\r\n\r\n\t\tif(section){\r\n\t\t\tvar property = scheduler._get_section_property();\r\n\t\t\t// GS-2527: if the event has multiple sections, it will be inserted into the initial sections.\r\n\t\t\tif(scheduler.config.multisection && ev[property] && scheduler.isMultisectionEvent && scheduler.isMultisectionEvent(ev)) \r\n\t\t\t\tcopy[property] = ev[property]; // save initial set of resources for multisection view\r\n\t\t\telse\r\n\t\t\t\tcopy[property] = section;\r\n\t\t}\r\n\t\treturn copy;\r\n\t};\r\n\tscheduler._do_paste = function(is_copy, modified_ev, original_ev){\r\n\t\tif(scheduler.callEvent(\"onBeforeEventPasted\", [is_copy, modified_ev, original_ev]) === false){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tscheduler.addEvent(modified_ev);\r\n\t\tscheduler.callEvent(\"onEventPasted\", [is_copy, modified_ev, original_ev]);\r\n\t};\r\n\r\n\tscheduler._is_key_nav_active = function(){\r\n\t\tif(this._is_initialized() && !this._is_lightbox_open() && this.config.key_nav){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\r\n\tfunction getSelectedEvent(){\r\n\t\tvar node = scheduler.$keyboardNavigation.dispatcher.getActiveNode();\r\n\t\tif(node && node.eventId) return node.eventId;\r\n\t\treturn scheduler._select_id;\r\n\t}\r\n\r\n\tscheduler.event(document, \"keydown\", function(e){\r\n\t\t// compatibility fix - scheduler focus on ctrl+v on mouse hover\r\n\t\tif(((e.ctrlKey || e.metaKey) && e.keyCode == 86) && scheduler._buffer_event && !scheduler.$keyboardNavigation.dispatcher.isEnabled()) {\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.isActive = currentTarget();\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler._key_nav_copy_paste = function(e){\r\n\t\tif(!scheduler._is_key_nav_active()) return true;\r\n\r\n\t\tif (e.keyCode == 37 || e.keyCode == 39) { // Left, Right arrows\r\n\t\t\te.cancelBubble = true;\r\n\r\n\t\t\tvar next = scheduler.date.add(scheduler._date,(e.keyCode == 37 ? -1 : 1 ),scheduler._mode);\r\n\t\t\tscheduler.setCurrentView(next);\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tvar select_id = getSelectedEvent();\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 67) { // CTRL+C\r\n\t\t\tif (select_id) {\r\n\t\t\t\tscheduler._buffer_event = copyEvent(scheduler.getEvent(select_id));\r\n\t\t\t\tisCopy = true;\r\n\t\t\t\tscheduler.callEvent(\"onEventCopied\", [scheduler.getEvent(select_id)]);\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 88) { // CTRL+X\r\n\t\t\tif (select_id) {\r\n\t\t\t\tisCopy = false;\r\n\t\t\t\tvar ev = scheduler._buffer_event = copyEvent(scheduler.getEvent(select_id));\r\n\r\n\t\t\t\tscheduler.updateEvent(ev.id);\r\n\t\t\t\tscheduler.callEvent(\"onEventCut\", [ev]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 86 && currentTarget(e)) { // CTRL+V\r\n\t\t\tvar ev = scheduler._buffer_event ? scheduler.getEvent(scheduler._buffer_event.id) : scheduler._buffer_event;\r\n\t\t\tev = ev || scheduler._buffer_event;\r\n\r\n\t\t\tif (ev) {\r\n\t\t\t\tvar new_ev = scheduler._make_pasted_event(ev);\r\n\t\t\t\tif (isCopy) {\r\n\t\t\t\t\tnew_ev.id = scheduler.uid();\r\n\t\t\t\t\tscheduler._do_paste(isCopy, new_ev, ev);\r\n\t\t\t\t}\r\n\t\t\t\telse { // cut operation\r\n\t\t\t\t\tvar res = scheduler.callEvent(\"onBeforeEventChanged\",[new_ev, e, false, ev]);\r\n\t\t\t\t\tif (res) {\r\n\t\t\t\t\t\tscheduler._do_paste(isCopy, new_ev, ev);\r\n\t\t\t\t\t\tisCopy = true; // switch to copy after first paste operation\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t};\r\n};\r\nscheduler._temp_key_scope();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.attachSchedulerHandlers = function(){\r\n\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\tvar keyDownHandler = function(e){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\r\n\t\treturn dispatcher.keyDownHandler(e);\r\n\t};\r\n\r\n\tvar focusHandler = function () {\r\n\t\tdispatcher.keepScrollPosition(function () {\r\n\t\t\tdispatcher.focusGlobalNode();\r\n\t\t});\r\n\t};\r\n\r\n\tvar waitCall;\r\n\tscheduler.attachEvent(\"onDataRender\", function(){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\t\tif(!(dispatcher.isEnabled() && !scheduler.getState().editor_id)) return;\r\n\r\n\t\tclearTimeout(waitCall);\r\n\t\twaitCall = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif(!dispatcher.isEnabled())\r\n\t\t\t\tdispatcher.enable();\r\n\t\t\treFocusActiveNode();\r\n\t\t});\r\n\t});\r\n\r\n\tvar reFocusActiveNode = function(){\r\n\t\tif(!dispatcher.isEnabled())\r\n\t\t\treturn;\r\n\r\n\t\tvar activeNode = dispatcher.getActiveNode();\r\n\t\tif(!activeNode)\r\n\t\t\treturn;\r\n\r\n\t\tif(!activeNode.isValid()){\r\n\t\t\tactiveNode = activeNode.fallback();\r\n\t\t}\r\n\r\n\t\tif(!activeNode || activeNode instanceof scheduler.$keyboardNavigation.MinicalButton || activeNode instanceof scheduler.$keyboardNavigation.MinicalCell)\r\n\t\t\treturn;\r\n\r\n\t\tdispatcher.keepScrollPosition(function () {\r\n\t\t\tactiveNode.focus(true);\r\n\t\t});\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\tvar container = scheduler.$container;\r\n\t\tscheduler.eventRemove(document, \"keydown\", keyDownHandler);\r\n\t\tscheduler.eventRemove(container, \"mousedown\", mousedownHandler);\r\n\t\tscheduler.eventRemove(container, \"focus\", focusHandler);\r\n\r\n\r\n\t\tif(scheduler.config.key_nav){\r\n\r\n\t\t\tscheduler.event(document, \"keydown\", keyDownHandler);\r\n\t\t\tscheduler.event(container, \"mousedown\", mousedownHandler);\r\n\t\t\tscheduler.event(container, \"focus\", focusHandler);\r\n\r\n\t\t\tcontainer.setAttribute(\"tabindex\", \"0\");\r\n\r\n\t\t}else{\r\n\t\t\tcontainer.removeAttribute(\"tabindex\");\r\n\t\t}\r\n\t});\r\n\r\n\tfunction mousedownHandler(e){\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\r\n\t\tconst view = scheduler.getView();\r\n\t\tlet dataAreaClick = false;\r\n\t\tif (scheduler.getState().mode === \"month\") {\r\n\t\t\tdataAreaClick = scheduler.$keyboardNavigation.isChildOf(e.target || e.srcElement, scheduler.$container.querySelector(\".dhx_cal_month_table\"));\r\n\t\t} else if (view && view.layout === \"timeline\") {\r\n\t\t\tdataAreaClick = scheduler.$keyboardNavigation.isChildOf(e.target || e.srcElement, scheduler.$container.querySelector(\".dhx_timeline_data_col\"));\r\n\t\t} else {\r\n\t\t\tconst listOfScales = scheduler.$container.querySelectorAll(\".dhx_scale_holder\");\r\n\t\t\tconst arrOfScales = Array.from(listOfScales);\r\n\t\t\tdataAreaClick = arrOfScales.some(scale => scale === e.target.parentNode);\r\n\t\t}\r\n\r\n\t\tvar pos = scheduler.getActionData(e);\r\n\r\n\t\tvar focusNode;\r\n\t\tif(scheduler._locate_event(e.target || e.srcElement)){\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.Event(scheduler._locate_event(e.target || e.srcElement));\r\n\t\t}else if(dataAreaClick){\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(pos.date && dataAreaClick){\r\n\t\t\t\tfocusNode = focusNode.nextSlot(new scheduler.$keyboardNavigation.TimeSlot(pos.date, null, pos.section));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(focusNode) {\r\n\t\t\tif (!dispatcher.isEnabled()) {\r\n\t\t\t\tdispatcher.activeNode = focusNode;\r\n\r\n\t\t\t} else {\r\n\t\t\t\tif (pos.date && dataAreaClick) {\r\n\t\t\t\t\tdispatcher.delay(function () {\r\n\t\t\t\t\t\tdispatcher.setActiveNode(focusNode);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction focusEvent(evNode){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\t\tif(!dispatcher.isEnabled()) return;\r\n\r\n\r\n\t\tvar prevState = evNode;\r\n\t\tvar focusNode = new scheduler.$keyboardNavigation.Event(prevState.eventId);\r\n\t\tif(!focusNode.isValid()){\r\n\t\t\tvar lastStart = focusNode.start || prevState.start;\r\n\t\t\tvar lastEnd = focusNode.end || prevState.end;\r\n\t\t\tvar lastSection = focusNode.section || prevState.section;\r\n\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot(lastStart, lastEnd, lastSection);\r\n\t\t\tif(!focusNode.isValid()){\r\n\t\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdispatcher.setActiveNode(focusNode);\r\n\t\tvar node = dispatcher.getActiveNode();\r\n\t\tif(node && node.getNode && document.activeElement != node.getNode()){\r\n\t\t\tdispatcher.focusNode(dispatcher.getActiveNode());\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tvar updateEvent = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id){\r\n\t\tvar res = updateEvent.apply(this, arguments);\r\n\t\tif(scheduler.config.key_nav && dispatcher.isEnabled()){\r\n\t\t\tif(scheduler.getState().select_id == id){\r\n\t\t\t\tvar element = new scheduler.$keyboardNavigation.Event(id);\r\n\r\n\t\t\t\tif(!scheduler.getState().lightbox_id){\r\n\t\t\t\t\tfocusEvent(element);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onEventDeleted\", function(id) {\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\t\tif(dispatcher.isEnabled()){\r\n\t\t\tvar activeNode = dispatcher.getActiveNode();\r\n\t\t\tif(activeNode.eventId == id){\r\n\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onClearAll\", function(){\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\t\tif(dispatcher.isEnabled()){\r\n\t\t\tif(dispatcher.getActiveNode() instanceof scheduler.$keyboardNavigation.Event){\r\n\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n};\r\n\r\n}","import { IMapAdapter, ICalendarEvent, IMapSettings, IMapPosition} from \"./types\";\r\ndeclare let google: any;\r\n\r\nexport class GoogleMapAdapter implements IMapAdapter {\r\n\tprivate map: any;\r\n\tprivate scheduler: any;\r\n\tprivate settings: IMapSettings;\r\n\tprivate _markers: any[];\r\n\tprivate infoWindow: any;\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.map = null;\r\n\t\tthis._markers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t}\r\n\tonEventClick(event: ICalendarEvent): void {\r\n\t\tif (this._markers && this._markers.length > 0) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\t\tif (event.id == this._markers[i].event.id) {\r\n\t\t\t\t\tlet zoom = this.settings.zoom_after_resolve || this.settings.initial_zoom;\r\n\t\t\t\t\tif (event.lat && event.lng){\r\n\t\t\t\t\t\tthis.map.setCenter({\r\n\t\t\t\t\t\t\tlat: event.lat, \r\n\t\t\t\t\t\t\tlng: event.lng,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tthis.map.setZoom(zoom);\r\n\t\t\t\t\t} else {\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.map.setCenter({\r\n\t\t\t\t\t\t\tlat: this.settings.error_position.lat, \r\n\t\t\t\t\t\t\tlng: this.settings.error_position.lng,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tthis.map.setZoom(zoom);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tgoogle.maps.event.trigger(this._markers[i].marker, 'click');\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t} \r\n\t}\r\n\r\n\tinitialize(container: HTMLElement, options: IMapSettings): void {\r\n\t\tthis.settings = options;\r\n\t\tlet scheduler = this.scheduler;\r\n\t\tlet mapOptions = {\r\n\t\t\tcenter: { lat: options.initial_position.lat, lng: options.initial_position.lng },\r\n\t\t\tzoom: options.initial_zoom,\r\n\t\t\tmapId: container.id,\r\n\t\t\tscrollwheel: true,\r\n\t\t\tmapTypeId: options.type\r\n\t\t}\r\n\t\t// we need to reuse the google map to avoid leak memory\r\n\t\tif (this.map === null) {\r\n\t\t\tthis.map = new google.maps.Map(container, mapOptions);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tlet map = this.map;\r\n\t\t\tcontainer.appendChild(this.map.__gm.messageOverlay);\r\n\t\t\tcontainer.appendChild(this.map.__gm.outerContainer);\r\n\t\t\tsetTimeout(function() {\r\n\t\t\t\tmap.setOptions({container: container.id});\r\n\t\t\t}, 500);\r\n\t\t}\r\n\t\tgoogle.maps.event.addListener(this.map, \"dblclick\", function(event) {\r\n\t\t\tconst geocoder = new google.maps.Geocoder();\r\n\t\r\n\t\t\tif (!scheduler.config.readonly && scheduler.config.dblclick_create) {\r\n\t\t\t\tlet point = event.latLng;\r\n\t\t\t\tgeocoder.geocode(\r\n\t\t\t\t\t{ 'latLng': point },\r\n\t\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\t\tif (status == google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\t\tpoint = results[0].geometry.location;\r\n\t\t\t\t\t\t\tscheduler.addEventNow({\r\n\t\t\t\t\t\t\t\tlat: point.lat(),\r\n\t\t\t\t\t\t\t\tlng: point.lng(),\r\n\t\t\t\t\t\t\t\tevent_location: results[0].formatted_address,\r\n\t\t\t\t\t\t\t\tstart_date: scheduler.getState().date,\r\n\t\t\t\t\t\t\t\tend_date: scheduler.date.add(scheduler.getState().date, scheduler.config.time_step, \"minute\")\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tconsole.error('Geocode was not successful for the following reason: ' + status);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tdestroy(container: HTMLElement): void {\r\n\t\tgoogle.maps.event.clearInstanceListeners(window);\r\n\t\tgoogle.maps.event.clearInstanceListeners(document);\r\n\t\tgoogle.maps.event.clearInstanceListeners(container);\r\n\t\twhile (container.firstChild) {\r\n\t\t\tcontainer.firstChild.remove();\r\n\t\t}\r\n\t\tcontainer.innerHTML = \"\";\r\n\t}\r\n\r\n\tasync addEventMarker(event: ICalendarEvent): Promise {\r\n\t\tlet config = {\r\n\t\t\ttitle: event.text,\r\n\t\t\tposition: {},\r\n\t\t\tmap: {}\r\n\t\t}\r\n\t\t\r\n\t\tif (event.lat && event.lng) {\r\n\t\t\tconfig.position = { lat: event.lat, lng: event.lng };\r\n\t\t} else {\r\n\t\t\tconfig.position = { lat: this.settings.error_position.lat, lng: this.settings.error_position.lng }\r\n\t\t}\r\n\t\tconst { AdvancedMarkerElement } = await google.maps.importLibrary(\"marker\");\r\n\t\tlet marker;\r\n\t\tif (this.scheduler.ext.mapView.createMarker) {\r\n\t\t\tconfig.map = this.map;\r\n\t\t\tmarker = this.scheduler.ext.mapView.createMarker(config);\r\n\t\t} else {\r\n\t\t\tmarker = new AdvancedMarkerElement(config);\r\n\t\t\tmarker.map = this.map;\r\n\t\t}\r\n\t\tmarker.setMap(this.map);\r\n\t\t//case for markeks which were deleted with DataProcessor\r\n\t\tif (event[\"!nativeeditor_status\"] == \"true_deleted\"){\r\n\t\t\tmarker.setMap(null);\r\n\t\t}\r\n\t\tgoogle.maps.event.addListener(marker, \"click\", () => {\r\n\t\t\tif (this.infoWindow) {\r\n\t\t\t\tthis.infoWindow.close();\r\n\t\t\t}\r\n\t\t\tthis.infoWindow = new google.maps.InfoWindow({maxWidth: this.settings.info_window_max_width});\r\n\t\t\tthis.infoWindow.setContent(this.scheduler.templates.map_info_content(event));\r\n\t\t\tthis.infoWindow.open({\r\n\t\t\t\tanchor: marker,\r\n\t\t\t\tmap: this.map,\r\n\t\t\t});\r\n\t\t});\r\n\t\tlet markerInfo = {event, ...config, marker};\r\n\t\tthis._markers.push(markerInfo);\r\n\t}\r\n\r\n\tremoveEventMarker(eventId: string): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif (eventId == this._markers[i].event.id) {\r\n\t\t\t\tthis._markers[i].marker.setVisible(false);\r\n\t\t\t\tthis._markers[i].marker.setMap(null);\r\n\t\t\t\tthis._markers[i].marker.setPosition(null);\r\n\t\t\t\tthis._markers[i].marker = null;\r\n\t\t\t\tthis._markers.splice(i,1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tupdateEventMarker(event: ICalendarEvent): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif(this._markers[i].event.id == event.id) {\r\n\t\t\t\tthis._markers[i].event = event;\r\n\t\t\t\tthis._markers[i].position.lat = event.lat;\r\n\t\t\t\tthis._markers[i].position.lng = event.lng;\r\n\t\t\t\tthis._markers[i].text = event.text;\r\n\t\t\t\tlet latlng = new google.maps.LatLng(event.lat, event.lng);\r\n\t\t\t\tthis._markers[i].marker.setPosition(latlng);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tclearEventMarkers(): void {\r\n\t\tif (this._markers.length > 0) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\t\tthis._markers[i].marker.setMap(null);\r\n\t\t\t}\r\n\t\t\tthis._markers = [];\r\n\t\t}\r\n\t}\r\n\r\n\tsetView(latitude: number, longitude: number, zoom: number): void {\r\n\t\tthis.map.setCenter({\r\n\t\t\tlat: latitude, \r\n\t\t\tlng: longitude,\r\n\t\t});\r\n\t\tthis.map.setZoom(zoom);\r\n\t}\r\n\r\n\tasync resolveAddress(string: string): Promise {\r\n\t\tconst geocoder = new google.maps.Geocoder();\r\n\t\tlet position: any = await new Promise((resolve) => {\r\n\t\t\tgeocoder.geocode(\r\n\t\t\t\t{ 'address': string },\r\n\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\tif (status == google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\tresolve({\r\n\t\t\t\t\t\t lat: results[0].geometry.location.lat(),\r\n\t\t\t\t\t\t lng: results[0].geometry.location.lng()\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tconsole.error('Geocode was not successful for the following reason: ' + status);\r\n\t\t\t\t\t\tresolve({});\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t});\r\n\t\treturn position;\r\n\t}\r\n\t\r\n}","import { IMapAdapter, ICalendarEvent, IMapSettings, IMapPosition} from \"./types\";\r\n\r\ndeclare let L: any\r\n\r\nexport class OpenStreetMapAdapter implements IMapAdapter {\r\n\tprivate map: any;\r\n\tprivate scheduler: any;\r\n\tprivate _markers: any[];\r\n\tprivate settings: IMapSettings;\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.map = null;\r\n\t\tthis._markers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t}\r\n\tonEventClick(event: ICalendarEvent): void {\r\n\t\tif (this._markers && this._markers.length > 0) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\t\tif (event.id == this._markers[i].event.id) {\r\n\t\t\t\t\tthis._markers[i].marker.openPopup();\r\n\t\t\t\t\tthis._markers[i].marker.closeTooltip();\r\n\t\t\t\t\tif (event.lat && event.lng) {\r\n\t\t\t\t\t\tthis.setView(event.lat, event.lng, this.settings.zoom_after_resolve || this.settings.initial_zoom);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.setView(this.settings.error_position.lat, this.settings.error_position.lng, this.settings.zoom_after_resolve || this.settings.initial_zoom);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t} \r\n\t}\r\n\r\n\tinitialize(container: HTMLElement, options: IMapSettings): void {\r\n\t\tlet scheduler = this.scheduler;\r\n\t\tlet mapWrapper = document.createElement('div');\r\n\t\tmapWrapper.className = 'mapWrapper';\r\n\t\tmapWrapper.id = 'mapWrapper';\r\n\t\tmapWrapper.style.width = container.style.width;\r\n\t\tmapWrapper.style.height = container.style.height;\r\n\t\tcontainer.appendChild(mapWrapper);\r\n\r\n\t\tlet map = L.map(mapWrapper, {\r\n\t\t\tcenter: L.latLng(options.initial_position.lat, options.initial_position.lng),\r\n\t\t\tzoom: options.initial_zoom,\r\n\t\t\tkeyboard: false // need to set false, due to bug with moving window\r\n\t\t});\r\n\t\tL.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(map);\r\n\t\tmap.on(\"dblclick\", async function(e){\r\n\t\t\tconst settings = {\r\n\t\t\t\t\"method\": \"GET\",\r\n\t\t\t\theaders: {\r\n\t\t\t\t\t\"Accept-Language\": \"en\",\r\n\t\t\t\t},\r\n\t\t\t};\r\n\t\t\tlet response = await fetch(`https://nominatim.openstreetmap.org/reverse?lat=${e.latlng.lat}&lon=${e.latlng.lng}&format=json`, settings).then(response => response.json());\r\n\t\t\tif (response.address) {\r\n\t\t\t\tlet address = response.address.country;\r\n\t\t\t\tscheduler.addEventNow({\r\n\t\t\t\t\tlat: e.latlng.lat,\r\n\t\t\t\t\tlng: e.latlng.lng,\r\n\t\t\t\t\tevent_location: address,\r\n\t\t\t\t\tstart_date: scheduler.getState().date,\r\n\t\t\t\t\tend_date: scheduler.date.add(scheduler.getState().date, scheduler.config.time_step, \"minute\")\r\n\t\t\t\t});\r\n\t\t\t} else {\r\n\t\t\t\tconsole.error(\"unable recieve a position of the event\", response.error);\r\n\t\t\t}\r\n\t\t});\r\n\t\tthis.map = map;\r\n\t\tthis.settings = options;\r\n\t}\r\n\r\n\tdestroy(container: HTMLElement): void {\r\n\t\tthis.map.remove();\r\n\t\twhile (container.firstChild) {\r\n\t\t\tcontainer.firstChild.remove();\r\n\t\t}\r\n\t\tcontainer.innerHTML = \"\";\r\n\t}\r\n\r\n\taddEventMarker(event: ICalendarEvent): void {\r\n\t\tconst myIcon = L.icon({\r\n\t\t\ticonUrl: 'https://unpkg.com/leaflet@1.0.3/dist/images/marker-icon.png',\r\n\t\t\ticonSize: [25, 41],\r\n\t\t\tshadowSize: [30, 65],\r\n\t\t\ticonAnchor: [12, 41],\r\n\t\t\tshadowAnchor: [7, 65]\r\n\t\t});\r\n\t\tlet popupConfig = {\r\n\t\t\tminWidth: 180,\r\n\t\t\tmaxWidth: this.settings.info_window_max_width,\r\n\t\t}\r\n\t\tconst markerPopup = L.popup(popupConfig).setContent(this.scheduler.templates.map_info_content(event));\r\n\t\tconst tooltip = L.tooltip().setContent(event.text);\r\n\r\n\t\tlet markerConfig = [\r\n\t\t\tevent.lat,\r\n\t\t\tevent.lng\r\n\t\t]\r\n\t\t\r\n\t\tif (!event.lat || !event.lng) {\r\n\t\t\tmarkerConfig = [this.settings.error_position.lat, this.settings.error_position.lng];\r\n\t\t}\r\n\t\tconst marker = L.marker(markerConfig, {\r\n\t\t\ticon: myIcon\r\n\t\t}).bindPopup(markerPopup).bindTooltip(tooltip).addTo(this.map);\r\n\t\tconst markerInfo = {event, marker};\r\n\t\tthis._markers.push(markerInfo);\t\t\r\n\t}\r\n\r\n\tremoveEventMarker(eventId: string): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif (eventId == this._markers[i].event.id) {\r\n\t\t\t\tthis.map.removeLayer(this._markers[i].marker);\r\n\t\t\t\tthis._markers.splice(i,1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tupdateEventMarker(event: ICalendarEvent): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif(this._markers[i].event.id == event.id) {\r\n\t\t\t\tthis._markers[i].event = event;\r\n\t\t\t\tif (!event.lat || !event.lng){\r\n\t\t\t\t\tthis._markers[i].marker.setLatLng([this.settings.error_position.lat, this.settings.error_position.lng]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis._markers[i].marker.setLatLng([event.lat, event.lng]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tclearEventMarkers(): void {\r\n\t\tif(this._markers) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\t\tthis.map.removeLayer(this._markers[i].marker); \r\n\t\t\t}\r\n\t\t\tthis._markers = [];\r\n\t\t}\r\n\t}\r\n\r\n\tsetView(latitude: number, longitude: number, zoom: number): void {\r\n\t\tthis.map.setView([latitude, longitude], zoom);\r\n\t}\r\n\r\n\tasync resolveAddress(string: string): Promise {\r\n\t\tconst settings = {\r\n\t\t\t\"method\": \"GET\",\r\n\t\t\theaders: {\r\n\t\t\t\t\"Accept-Language\": \"en\",\r\n\t\t\t},\r\n\t\t};\r\n\t\tlet position:any = {};\r\n\t\tlet response = await fetch(`https://nominatim.openstreetmap.org/search?q=${string}&format=json`, settings).then(response => response.json());\r\n\t\tif (response && response.length) {\r\n\t\t\tposition.lat = +response[0].lat;\r\n\t\t\tposition.lng = +response[0].lon;\r\n\t\t} else {\r\n\t\t\tconsole.error(`Unable recieve a position of the event's location: ${string}`);\r\n\t\t}\r\n\t\treturn position;\r\n\t}\r\n}","import { IMapAdapter, ICalendarEvent, IMapSettings, IMapPosition} from \"./types\";\r\n\r\ndeclare let mapboxgl: any;\r\ndeclare let MapboxGeocoder: any;\r\n\r\nexport class MapboxAdapter implements IMapAdapter {\r\n\tprivate map: any;\r\n\tprivate scheduler: any;\r\n\tprivate settings: IMapSettings;\r\n\tprivate _markers: any[];\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.map = null;\r\n\t\tthis._markers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t}\r\n\tonEventClick(event: ICalendarEvent): void {\r\n\t\tif (this._markers && this._markers.length > 0) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n const popup = this._markers[i].marker.getPopup();\r\n if (popup.isOpen()){\r\n popup.remove();\r\n }\r\n\t\t\t\tif (event.id == this._markers[i].event.id) {\r\n\t\t\t\t\tthis._markers[i].marker.togglePopup();\r\n\t\t\t\t\tif (event.lat && event.lng) {\r\n\t\t\t\t\t\tthis.setView(event.lat, event.lng, this.settings.zoom_after_resolve || this.settings.initial_zoom);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.setView(this.settings.error_position.lat, this.settings.error_position.lng, this.settings.zoom_after_resolve || this.settings.initial_zoom);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t} \r\n\t}\r\n\r\n\tinitialize(container: HTMLElement, options: IMapSettings): void {\r\n let scheduler = this.scheduler;\r\n\r\n\t\tmapboxgl.accessToken = options.accessToken;\r\n const map = new mapboxgl.Map({\r\n container: container, \r\n center: [options.initial_position.lng, options.initial_position.lat], \r\n zoom: options.initial_zoom + 1, // problems with coordinates if zoom = 1\r\n });\r\n map.on(\"dblclick\",async function(e){\r\n\t\t\tlet response = await fetch(`https://api.mapbox.com/geocoding/v5/mapbox.places/${e.lngLat.lng},${ e.lngLat.lat}.json?access_token=${options.accessToken}`).then(response => response.json());\r\n\t\t\tif (response.features){\r\n\t\t\t\tlet address = response.features[0].place_name;\r\n\t\t\t\tscheduler.addEventNow({\r\n\t\t\t\t\tlat: e.lngLat.lat,\r\n\t\t\t\t\tlng: e.lngLat.lng,\r\n\t\t\t\t\tevent_location: address,\r\n\t\t\t\t\tstart_date: scheduler.getState().date,\r\n\t\t\t\t\tend_date: scheduler.date.add(scheduler.getState().date, scheduler.config.time_step, \"minute\")\r\n\t\t\t\t});\r\n\t\t\t} else {\r\n\t\t\t\tconsole.error(\"unable recieve a position of the event\");\r\n\t\t\t}\r\n\t\t});\r\n this.map = map;\r\n this.settings = options;\r\n\t}\r\n\r\n\tdestroy(container: HTMLElement): void {\r\n\t\tthis.map.remove();\r\n while (container.firstChild) {\r\n\t\t\tcontainer.firstChild.remove();\r\n\t\t}\r\n container.innerHTML = \"\";\r\n\t}\r\n\r\n\taddEventMarker(event: ICalendarEvent): void {\r\n let config = [\r\n\t\t\tevent.lng,\r\n\t\t\tevent.lat\r\n\t\t]\r\n\t\t\r\n\t\tif (!event.lat || !event.lng) {\r\n\t\t\tconfig = [this.settings.error_position.lng, this.settings.error_position.lat];\r\n\t\t} \r\n\r\n\t\tconst popup = new mapboxgl.Popup({ offset: 25, focusAfterOpen: false})\r\n .setMaxWidth(`${this.settings.info_window_max_width}px`) \r\n .setHTML(this.scheduler.templates.map_info_content(event));\r\n const marker = new mapboxgl.Marker()\r\n .setLngLat(config)\r\n .setPopup(popup)\r\n .addTo(this.map);\r\n const markerInfo = {event, marker}; \r\n this._markers.push(markerInfo);\r\n\t}\r\n\r\n\tremoveEventMarker(eventId: string): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif (eventId == this._markers[i].event.id) {\r\n\t\t\t\tthis._markers[i].marker.remove();\r\n this._markers.splice(i,1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tupdateEventMarker(event: ICalendarEvent): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif(this._markers[i].event.id == event.id) {\r\n\t\t\t\tthis._markers[i].event = event;\r\n\t\t\t\tif (!event.lat || !event.lng){\r\n\t\t\t\t\tthis._markers[i].marker.setLngLat([this.settings.error_position.lng, this.settings.error_position.lat]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis._markers[i].marker.setLngLat([event.lng, event.lat]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tclearEventMarkers(): void {\r\n\t\tfor (let i = 0; i {\r\n\t\tlet response = await fetch(`https://api.mapbox.com/geocoding/v5/mapbox.places/${string}.json?access_token=${this.settings.accessToken}`).then(response => response.json());\r\n\t\tlet position:any = {};\r\n\t\tif (response && response.features.length) {\r\n\t\t\tposition.lng = response.features[0].center[0];\r\n\t\t\tposition.lat = response.features[0].center[1];\r\n\t\t} else {\r\n\t\t\tconsole.error(`Unable recieve a position of the event's location: ${string}`);\r\n\t\t}\r\n\t\treturn position;\r\n\t}\r\n}","// =============================================================================\n// Weekday\n// =============================================================================\nexport var ALL_WEEKDAYS = [\n 'MO',\n 'TU',\n 'WE',\n 'TH',\n 'FR',\n 'SA',\n 'SU',\n];\nvar Weekday = /** @class */ (function () {\n function Weekday(weekday, n) {\n if (n === 0)\n throw new Error(\"Can't create weekday with n == 0\");\n this.weekday = weekday;\n this.n = n;\n }\n Weekday.fromStr = function (str) {\n return new Weekday(ALL_WEEKDAYS.indexOf(str));\n };\n // __call__ - Cannot call the object directly, do it through\n // e.g. RRule.TH.nth(-1) instead,\n Weekday.prototype.nth = function (n) {\n return this.n === n ? this : new Weekday(this.weekday, n);\n };\n // __eq__\n Weekday.prototype.equals = function (other) {\n return this.weekday === other.weekday && this.n === other.n;\n };\n // __repr__\n Weekday.prototype.toString = function () {\n var s = ALL_WEEKDAYS[this.weekday];\n if (this.n)\n s = (this.n > 0 ? '+' : '') + String(this.n) + s;\n return s;\n };\n Weekday.prototype.getJsWeekday = function () {\n return this.weekday === 6 ? 0 : this.weekday + 1;\n };\n return Weekday;\n}());\nexport { Weekday };\n//# sourceMappingURL=weekday.js.map","// =============================================================================\n// Helper functions\n// =============================================================================\nimport { ALL_WEEKDAYS } from './weekday';\nexport var isPresent = function (value) {\n return value !== null && value !== undefined;\n};\nexport var isNumber = function (value) {\n return typeof value === 'number';\n};\nexport var isWeekdayStr = function (value) {\n return typeof value === 'string' && ALL_WEEKDAYS.includes(value);\n};\nexport var isArray = Array.isArray;\n/**\n * Simplified version of python's range()\n */\nexport var range = function (start, end) {\n if (end === void 0) { end = start; }\n if (arguments.length === 1) {\n end = start;\n start = 0;\n }\n var rang = [];\n for (var i = start; i < end; i++)\n rang.push(i);\n return rang;\n};\nexport var clone = function (array) {\n return [].concat(array);\n};\nexport var repeat = function (value, times) {\n var i = 0;\n var array = [];\n if (isArray(value)) {\n for (; i < times; i++)\n array[i] = [].concat(value);\n }\n else {\n for (; i < times; i++)\n array[i] = value;\n }\n return array;\n};\nexport var toArray = function (item) {\n if (isArray(item)) {\n return item;\n }\n return [item];\n};\nexport function padStart(item, targetLength, padString) {\n if (padString === void 0) { padString = ' '; }\n var str = String(item);\n targetLength = targetLength >> 0;\n if (str.length > targetLength) {\n return String(str);\n }\n targetLength = targetLength - str.length;\n if (targetLength > padString.length) {\n padString += repeat(padString, targetLength / padString.length);\n }\n return padString.slice(0, targetLength) + String(str);\n}\n/**\n * Python like split\n */\nexport var split = function (str, sep, num) {\n var splits = str.split(sep);\n return num\n ? splits.slice(0, num).concat([splits.slice(num).join(sep)])\n : splits;\n};\n/**\n * closure/goog/math/math.js:modulo\n * Copyright 2006 The Closure Library Authors.\n * The % operator in JavaScript returns the remainder of a / b, but differs from\n * some other languages in that the result will have the same sign as the\n * dividend. For example, -1 % 8 == -1, whereas in some other languages\n * (such as Python) the result would be 7. This function emulates the more\n * correct modulo behavior, which is useful for certain applications such as\n * calculating an offset index in a circular list.\n *\n * @param {number} a The dividend.\n * @param {number} b The divisor.\n * @return {number} a % b where the result is between 0 and b (either 0 <= x < b\n * or b < x <= 0, depending on the sign of b).\n */\nexport var pymod = function (a, b) {\n var r = a % b;\n // If r and b differ in sign, add b to wrap the result to the correct sign.\n return r * b < 0 ? r + b : r;\n};\n/**\n * @see: \n */\nexport var divmod = function (a, b) {\n return { div: Math.floor(a / b), mod: pymod(a, b) };\n};\nexport var empty = function (obj) {\n return !isPresent(obj) || obj.length === 0;\n};\n/**\n * Python-like boolean\n *\n * @return {Boolean} value of an object/primitive, taking into account\n * the fact that in Python an empty list's/tuple's\n * boolean value is False, whereas in JS it's true\n */\nexport var notEmpty = function (obj) {\n return !empty(obj);\n};\n/**\n * Return true if a value is in an array\n */\nexport var includes = function (arr, val) {\n return notEmpty(arr) && arr.indexOf(val) !== -1;\n};\n//# sourceMappingURL=helpers.js.map","import { padStart } from './helpers';\nexport var datetime = function (y, m, d, h, i, s) {\n if (h === void 0) { h = 0; }\n if (i === void 0) { i = 0; }\n if (s === void 0) { s = 0; }\n return new Date(Date.UTC(y, m - 1, d, h, i, s));\n};\n/**\n * General date-related utilities.\n * Also handles several incompatibilities between JavaScript and Python\n *\n */\nexport var MONTH_DAYS = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n/**\n * Number of milliseconds of one day\n */\nexport var ONE_DAY = 1000 * 60 * 60 * 24;\n/**\n * @see: \n */\nexport var MAXYEAR = 9999;\n/**\n * Python uses 1-Jan-1 as the base for calculating ordinals but we don't\n * want to confuse the JS engine with milliseconds > Number.MAX_NUMBER,\n * therefore we use 1-Jan-1970 instead\n */\nexport var ORDINAL_BASE = datetime(1970, 1, 1);\n/**\n * Python: MO-SU: 0 - 6\n * JS: SU-SAT 0 - 6\n */\nexport var PY_WEEKDAYS = [6, 0, 1, 2, 3, 4, 5];\n/**\n * py_date.timetuple()[7]\n */\nexport var getYearDay = function (date) {\n var dateNoTime = new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate());\n return (Math.ceil((dateNoTime.valueOf() - new Date(date.getUTCFullYear(), 0, 1).valueOf()) /\n ONE_DAY) + 1);\n};\nexport var isLeapYear = function (year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n};\nexport var isDate = function (value) {\n return value instanceof Date;\n};\nexport var isValidDate = function (value) {\n return isDate(value) && !isNaN(value.getTime());\n};\n/**\n * @return {Number} the date's timezone offset in ms\n */\nexport var tzOffset = function (date) {\n return date.getTimezoneOffset() * 60 * 1000;\n};\n/**\n * @see: \n */\nexport var daysBetween = function (date1, date2) {\n // The number of milliseconds in one day\n // Convert both dates to milliseconds\n var date1ms = date1.getTime();\n var date2ms = date2.getTime();\n // Calculate the difference in milliseconds\n var differencems = date1ms - date2ms;\n // Convert back to days and return\n return Math.round(differencems / ONE_DAY);\n};\n/**\n * @see: \n */\nexport var toOrdinal = function (date) {\n return daysBetween(date, ORDINAL_BASE);\n};\n/**\n * @see - \n */\nexport var fromOrdinal = function (ordinal) {\n return new Date(ORDINAL_BASE.getTime() + ordinal * ONE_DAY);\n};\nexport var getMonthDays = function (date) {\n var month = date.getUTCMonth();\n return month === 1 && isLeapYear(date.getUTCFullYear())\n ? 29\n : MONTH_DAYS[month];\n};\n/**\n * @return {Number} python-like weekday\n */\nexport var getWeekday = function (date) {\n return PY_WEEKDAYS[date.getUTCDay()];\n};\n/**\n * @see: \n */\nexport var monthRange = function (year, month) {\n var date = datetime(year, month + 1, 1);\n return [getWeekday(date), getMonthDays(date)];\n};\n/**\n * @see: \n */\nexport var combine = function (date, time) {\n time = time || date;\n return new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), time.getHours(), time.getMinutes(), time.getSeconds(), time.getMilliseconds()));\n};\nexport var clone = function (date) {\n var dolly = new Date(date.getTime());\n return dolly;\n};\nexport var cloneDates = function (dates) {\n var clones = [];\n for (var i = 0; i < dates.length; i++) {\n clones.push(clone(dates[i]));\n }\n return clones;\n};\n/**\n * Sorts an array of Date or Time objects\n */\nexport var sort = function (dates) {\n dates.sort(function (a, b) {\n return a.getTime() - b.getTime();\n });\n};\nexport var timeToUntilString = function (time, utc) {\n if (utc === void 0) { utc = true; }\n var date = new Date(time);\n return [\n padStart(date.getUTCFullYear().toString(), 4, '0'),\n padStart(date.getUTCMonth() + 1, 2, '0'),\n padStart(date.getUTCDate(), 2, '0'),\n 'T',\n padStart(date.getUTCHours(), 2, '0'),\n padStart(date.getUTCMinutes(), 2, '0'),\n padStart(date.getUTCSeconds(), 2, '0'),\n utc ? 'Z' : '',\n ].join('');\n};\nexport var untilStringToDate = function (until) {\n var re = /^(\\d{4})(\\d{2})(\\d{2})(T(\\d{2})(\\d{2})(\\d{2})Z?)?$/;\n var bits = re.exec(until);\n if (!bits)\n throw new Error(\"Invalid UNTIL value: \".concat(until));\n return new Date(Date.UTC(parseInt(bits[1], 10), parseInt(bits[2], 10) - 1, parseInt(bits[3], 10), parseInt(bits[5], 10) || 0, parseInt(bits[6], 10) || 0, parseInt(bits[7], 10) || 0));\n};\nvar dateTZtoISO8601 = function (date, timeZone) {\n // date format for sv-SE is almost ISO8601\n var dateStr = date.toLocaleString('sv-SE', { timeZone: timeZone });\n // '2023-02-07 10:41:36'\n return dateStr.replace(' ', 'T') + 'Z';\n};\nexport var dateInTimeZone = function (date, timeZone) {\n var localTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;\n // Date constructor can only reliably parse dates in ISO8601 format\n var dateInLocalTZ = new Date(dateTZtoISO8601(date, localTimeZone));\n var dateInTargetTZ = new Date(dateTZtoISO8601(date, timeZone !== null && timeZone !== void 0 ? timeZone : 'UTC'));\n var tzOffset = dateInTargetTZ.getTime() - dateInLocalTZ.getTime();\n return new Date(date.getTime() - tzOffset);\n};\n//# sourceMappingURL=dateutil.js.map","/**\n * This class helps us to emulate python's generators, sorta.\n */\nvar IterResult = /** @class */ (function () {\n function IterResult(method, args) {\n this.minDate = null;\n this.maxDate = null;\n this._result = [];\n this.total = 0;\n this.method = method;\n this.args = args;\n if (method === 'between') {\n this.maxDate = args.inc\n ? args.before\n : new Date(args.before.getTime() - 1);\n this.minDate = args.inc ? args.after : new Date(args.after.getTime() + 1);\n }\n else if (method === 'before') {\n this.maxDate = args.inc ? args.dt : new Date(args.dt.getTime() - 1);\n }\n else if (method === 'after') {\n this.minDate = args.inc ? args.dt : new Date(args.dt.getTime() + 1);\n }\n }\n /**\n * Possibly adds a date into the result.\n *\n * @param {Date} date - the date isn't necessarly added to the result\n * list (if it is too late/too early)\n * @return {Boolean} true if it makes sense to continue the iteration\n * false if we're done.\n */\n IterResult.prototype.accept = function (date) {\n ++this.total;\n var tooEarly = this.minDate && date < this.minDate;\n var tooLate = this.maxDate && date > this.maxDate;\n if (this.method === 'between') {\n if (tooEarly)\n return true;\n if (tooLate)\n return false;\n }\n else if (this.method === 'before') {\n if (tooLate)\n return false;\n }\n else if (this.method === 'after') {\n if (tooEarly)\n return true;\n this.add(date);\n return false;\n }\n return this.add(date);\n };\n /**\n *\n * @param {Date} date that is part of the result.\n * @return {Boolean} whether we are interested in more values.\n */\n IterResult.prototype.add = function (date) {\n this._result.push(date);\n return true;\n };\n /**\n * 'before' and 'after' return only one date, whereas 'all'\n * and 'between' an array.\n *\n * @return {Date,Array?}\n */\n IterResult.prototype.getValue = function () {\n var res = this._result;\n switch (this.method) {\n case 'all':\n case 'between':\n return res;\n case 'before':\n case 'after':\n default:\n return (res.length ? res[res.length - 1] : null);\n }\n };\n IterResult.prototype.clone = function () {\n return new IterResult(this.method, this.args);\n };\n return IterResult;\n}());\nexport default IterResult;\n//# sourceMappingURL=iterresult.js.map","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol */\n\nvar 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 (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(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\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n function next() {\n while (env.stack.length) {\n var rec = env.stack.pop();\n try {\n var result = rec.dispose && rec.dispose.call(rec.value);\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n catch (e) {\n fail(e);\n }\n }\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n};\n","import { __extends } from \"tslib\";\nimport IterResult from './iterresult';\n/**\n * IterResult subclass that calls a callback function on each add,\n * and stops iterating when the callback returns false.\n */\nvar CallbackIterResult = /** @class */ (function (_super) {\n __extends(CallbackIterResult, _super);\n function CallbackIterResult(method, args, iterator) {\n var _this = _super.call(this, method, args) || this;\n _this.iterator = iterator;\n return _this;\n }\n CallbackIterResult.prototype.add = function (date) {\n if (this.iterator(date, this._result.length)) {\n this._result.push(date);\n return true;\n }\n return false;\n };\n return CallbackIterResult;\n}(IterResult));\nexport default CallbackIterResult;\n//# sourceMappingURL=callbackiterresult.js.map","export var Frequency;\n(function (Frequency) {\n Frequency[Frequency[\"YEARLY\"] = 0] = \"YEARLY\";\n Frequency[Frequency[\"MONTHLY\"] = 1] = \"MONTHLY\";\n Frequency[Frequency[\"WEEKLY\"] = 2] = \"WEEKLY\";\n Frequency[Frequency[\"DAILY\"] = 3] = \"DAILY\";\n Frequency[Frequency[\"HOURLY\"] = 4] = \"HOURLY\";\n Frequency[Frequency[\"MINUTELY\"] = 5] = \"MINUTELY\";\n Frequency[Frequency[\"SECONDLY\"] = 6] = \"SECONDLY\";\n})(Frequency || (Frequency = {}));\nexport function freqIsDailyOrGreater(freq) {\n return freq < Frequency.HOURLY;\n}\n//# sourceMappingURL=types.js.map","// =============================================================================\n// i18n\n// =============================================================================\nvar ENGLISH = {\n dayNames: [\n 'Sunday',\n 'Monday',\n 'Tuesday',\n 'Wednesday',\n 'Thursday',\n 'Friday',\n 'Saturday',\n ],\n monthNames: [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n ],\n tokens: {\n SKIP: /^[ \\r\\n\\t]+|^\\.$/,\n number: /^[1-9][0-9]*/,\n numberAsText: /^(one|two|three)/i,\n every: /^every/i,\n 'day(s)': /^days?/i,\n 'weekday(s)': /^weekdays?/i,\n 'week(s)': /^weeks?/i,\n 'hour(s)': /^hours?/i,\n 'minute(s)': /^minutes?/i,\n 'month(s)': /^months?/i,\n 'year(s)': /^years?/i,\n on: /^(on|in)/i,\n at: /^(at)/i,\n the: /^the/i,\n first: /^first/i,\n second: /^second/i,\n third: /^third/i,\n nth: /^([1-9][0-9]*)(\\.|th|nd|rd|st)/i,\n last: /^last/i,\n for: /^for/i,\n 'time(s)': /^times?/i,\n until: /^(un)?til/i,\n monday: /^mo(n(day)?)?/i,\n tuesday: /^tu(e(s(day)?)?)?/i,\n wednesday: /^we(d(n(esday)?)?)?/i,\n thursday: /^th(u(r(sday)?)?)?/i,\n friday: /^fr(i(day)?)?/i,\n saturday: /^sa(t(urday)?)?/i,\n sunday: /^su(n(day)?)?/i,\n january: /^jan(uary)?/i,\n february: /^feb(ruary)?/i,\n march: /^mar(ch)?/i,\n april: /^apr(il)?/i,\n may: /^may/i,\n june: /^june?/i,\n july: /^july?/i,\n august: /^aug(ust)?/i,\n september: /^sep(t(ember)?)?/i,\n october: /^oct(ober)?/i,\n november: /^nov(ember)?/i,\n december: /^dec(ember)?/i,\n comma: /^(,\\s*|(and|or)\\s*)+/i,\n },\n};\nexport default ENGLISH;\n//# sourceMappingURL=i18n.js.map","import ENGLISH from './i18n';\nimport { RRule } from '../rrule';\nimport { isArray, isNumber, isPresent } from '../helpers';\n// =============================================================================\n// Helper functions\n// =============================================================================\n/**\n * Return true if a value is in an array\n */\nvar contains = function (arr, val) {\n return arr.indexOf(val) !== -1;\n};\nvar defaultGetText = function (id) { return id.toString(); };\nvar defaultDateFormatter = function (year, month, day) { return \"\".concat(month, \" \").concat(day, \", \").concat(year); };\n/**\n *\n * @param {RRule} rrule\n * Optional:\n * @param {Function} gettext function\n * @param {Object} language definition\n * @constructor\n */\nvar ToText = /** @class */ (function () {\n function ToText(rrule, gettext, language, dateFormatter) {\n if (gettext === void 0) { gettext = defaultGetText; }\n if (language === void 0) { language = ENGLISH; }\n if (dateFormatter === void 0) { dateFormatter = defaultDateFormatter; }\n this.text = [];\n this.language = language || ENGLISH;\n this.gettext = gettext;\n this.dateFormatter = dateFormatter;\n this.rrule = rrule;\n this.options = rrule.options;\n this.origOptions = rrule.origOptions;\n if (this.origOptions.bymonthday) {\n var bymonthday = [].concat(this.options.bymonthday);\n var bynmonthday = [].concat(this.options.bynmonthday);\n bymonthday.sort(function (a, b) { return a - b; });\n bynmonthday.sort(function (a, b) { return b - a; });\n // 1, 2, 3, .., -5, -4, -3, ..\n this.bymonthday = bymonthday.concat(bynmonthday);\n if (!this.bymonthday.length)\n this.bymonthday = null;\n }\n if (isPresent(this.origOptions.byweekday)) {\n var byweekday = !isArray(this.origOptions.byweekday)\n ? [this.origOptions.byweekday]\n : this.origOptions.byweekday;\n var days = String(byweekday);\n this.byweekday = {\n allWeeks: byweekday.filter(function (weekday) {\n return !weekday.n;\n }),\n someWeeks: byweekday.filter(function (weekday) {\n return Boolean(weekday.n);\n }),\n isWeekdays: days.indexOf('MO') !== -1 &&\n days.indexOf('TU') !== -1 &&\n days.indexOf('WE') !== -1 &&\n days.indexOf('TH') !== -1 &&\n days.indexOf('FR') !== -1 &&\n days.indexOf('SA') === -1 &&\n days.indexOf('SU') === -1,\n isEveryDay: days.indexOf('MO') !== -1 &&\n days.indexOf('TU') !== -1 &&\n days.indexOf('WE') !== -1 &&\n days.indexOf('TH') !== -1 &&\n days.indexOf('FR') !== -1 &&\n days.indexOf('SA') !== -1 &&\n days.indexOf('SU') !== -1,\n };\n var sortWeekDays = function (a, b) {\n return a.weekday - b.weekday;\n };\n this.byweekday.allWeeks.sort(sortWeekDays);\n this.byweekday.someWeeks.sort(sortWeekDays);\n if (!this.byweekday.allWeeks.length)\n this.byweekday.allWeeks = null;\n if (!this.byweekday.someWeeks.length)\n this.byweekday.someWeeks = null;\n }\n else {\n this.byweekday = null;\n }\n }\n /**\n * Test whether the rrule can be fully converted to text.\n *\n * @param {RRule} rrule\n * @return {Boolean}\n */\n ToText.isFullyConvertible = function (rrule) {\n var canConvert = true;\n if (!(rrule.options.freq in ToText.IMPLEMENTED))\n return false;\n if (rrule.origOptions.until && rrule.origOptions.count)\n return false;\n for (var key in rrule.origOptions) {\n if (contains(['dtstart', 'tzid', 'wkst', 'freq'], key))\n return true;\n if (!contains(ToText.IMPLEMENTED[rrule.options.freq], key))\n return false;\n }\n return canConvert;\n };\n ToText.prototype.isFullyConvertible = function () {\n return ToText.isFullyConvertible(this.rrule);\n };\n /**\n * Perform the conversion. Only some of the frequencies are supported.\n * If some of the rrule's options aren't supported, they'll\n * be omitted from the output an \"(~ approximate)\" will be appended.\n *\n * @return {*}\n */\n ToText.prototype.toString = function () {\n var gettext = this.gettext;\n if (!(this.options.freq in ToText.IMPLEMENTED)) {\n return gettext('RRule error: Unable to fully convert this rrule to text');\n }\n this.text = [gettext('every')];\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this[RRule.FREQUENCIES[this.options.freq]]();\n if (this.options.until) {\n this.add(gettext('until'));\n var until = this.options.until;\n this.add(this.dateFormatter(until.getUTCFullYear(), this.language.monthNames[until.getUTCMonth()], until.getUTCDate()));\n }\n else if (this.options.count) {\n this.add(gettext('for'))\n .add(this.options.count.toString())\n .add(this.plural(this.options.count) ? gettext('times') : gettext('time'));\n }\n if (!this.isFullyConvertible())\n this.add(gettext('(~ approximate)'));\n return this.text.join('');\n };\n ToText.prototype.HOURLY = function () {\n var gettext = this.gettext;\n if (this.options.interval !== 1)\n this.add(this.options.interval.toString());\n this.add(this.plural(this.options.interval) ? gettext('hours') : gettext('hour'));\n };\n ToText.prototype.MINUTELY = function () {\n var gettext = this.gettext;\n if (this.options.interval !== 1)\n this.add(this.options.interval.toString());\n this.add(this.plural(this.options.interval)\n ? gettext('minutes')\n : gettext('minute'));\n };\n ToText.prototype.DAILY = function () {\n var gettext = this.gettext;\n if (this.options.interval !== 1)\n this.add(this.options.interval.toString());\n if (this.byweekday && this.byweekday.isWeekdays) {\n this.add(this.plural(this.options.interval)\n ? gettext('weekdays')\n : gettext('weekday'));\n }\n else {\n this.add(this.plural(this.options.interval) ? gettext('days') : gettext('day'));\n }\n if (this.origOptions.bymonth) {\n this.add(gettext('in'));\n this._bymonth();\n }\n if (this.bymonthday) {\n this._bymonthday();\n }\n else if (this.byweekday) {\n this._byweekday();\n }\n else if (this.origOptions.byhour) {\n this._byhour();\n }\n };\n ToText.prototype.WEEKLY = function () {\n var gettext = this.gettext;\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString()).add(this.plural(this.options.interval) ? gettext('weeks') : gettext('week'));\n }\n if (this.byweekday && this.byweekday.isWeekdays) {\n if (this.options.interval === 1) {\n this.add(this.plural(this.options.interval)\n ? gettext('weekdays')\n : gettext('weekday'));\n }\n else {\n this.add(gettext('on')).add(gettext('weekdays'));\n }\n }\n else if (this.byweekday && this.byweekday.isEveryDay) {\n this.add(this.plural(this.options.interval) ? gettext('days') : gettext('day'));\n }\n else {\n if (this.options.interval === 1)\n this.add(gettext('week'));\n if (this.origOptions.bymonth) {\n this.add(gettext('in'));\n this._bymonth();\n }\n if (this.bymonthday) {\n this._bymonthday();\n }\n else if (this.byweekday) {\n this._byweekday();\n }\n if (this.origOptions.byhour) {\n this._byhour();\n }\n }\n };\n ToText.prototype.MONTHLY = function () {\n var gettext = this.gettext;\n if (this.origOptions.bymonth) {\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString()).add(gettext('months'));\n if (this.plural(this.options.interval))\n this.add(gettext('in'));\n }\n else {\n // this.add(gettext('MONTH'))\n }\n this._bymonth();\n }\n else {\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString());\n }\n this.add(this.plural(this.options.interval)\n ? gettext('months')\n : gettext('month'));\n }\n if (this.bymonthday) {\n this._bymonthday();\n }\n else if (this.byweekday && this.byweekday.isWeekdays) {\n this.add(gettext('on')).add(gettext('weekdays'));\n }\n else if (this.byweekday) {\n this._byweekday();\n }\n };\n ToText.prototype.YEARLY = function () {\n var gettext = this.gettext;\n if (this.origOptions.bymonth) {\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString());\n this.add(gettext('years'));\n }\n else {\n // this.add(gettext('YEAR'))\n }\n this._bymonth();\n }\n else {\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString());\n }\n this.add(this.plural(this.options.interval) ? gettext('years') : gettext('year'));\n }\n if (this.bymonthday) {\n this._bymonthday();\n }\n else if (this.byweekday) {\n this._byweekday();\n }\n if (this.options.byyearday) {\n this.add(gettext('on the'))\n .add(this.list(this.options.byyearday, this.nth, gettext('and')))\n .add(gettext('day'));\n }\n if (this.options.byweekno) {\n this.add(gettext('in'))\n .add(this.plural(this.options.byweekno.length)\n ? gettext('weeks')\n : gettext('week'))\n .add(this.list(this.options.byweekno, undefined, gettext('and')));\n }\n };\n ToText.prototype._bymonthday = function () {\n var gettext = this.gettext;\n if (this.byweekday && this.byweekday.allWeeks) {\n this.add(gettext('on'))\n .add(this.list(this.byweekday.allWeeks, this.weekdaytext, gettext('or')))\n .add(gettext('the'))\n .add(this.list(this.bymonthday, this.nth, gettext('or')));\n }\n else {\n this.add(gettext('on the')).add(this.list(this.bymonthday, this.nth, gettext('and')));\n }\n // this.add(gettext('DAY'))\n };\n ToText.prototype._byweekday = function () {\n var gettext = this.gettext;\n if (this.byweekday.allWeeks && !this.byweekday.isWeekdays) {\n this.add(gettext('on')).add(this.list(this.byweekday.allWeeks, this.weekdaytext));\n }\n if (this.byweekday.someWeeks) {\n if (this.byweekday.allWeeks)\n this.add(gettext('and'));\n this.add(gettext('on the')).add(this.list(this.byweekday.someWeeks, this.weekdaytext, gettext('and')));\n }\n };\n ToText.prototype._byhour = function () {\n var gettext = this.gettext;\n this.add(gettext('at')).add(this.list(this.origOptions.byhour, undefined, gettext('and')));\n };\n ToText.prototype._bymonth = function () {\n this.add(this.list(this.options.bymonth, this.monthtext, this.gettext('and')));\n };\n ToText.prototype.nth = function (n) {\n n = parseInt(n.toString(), 10);\n var nth;\n var gettext = this.gettext;\n if (n === -1)\n return gettext('last');\n var npos = Math.abs(n);\n switch (npos) {\n case 1:\n case 21:\n case 31:\n nth = npos + gettext('st');\n break;\n case 2:\n case 22:\n nth = npos + gettext('nd');\n break;\n case 3:\n case 23:\n nth = npos + gettext('rd');\n break;\n default:\n nth = npos + gettext('th');\n }\n return n < 0 ? nth + ' ' + gettext('last') : nth;\n };\n ToText.prototype.monthtext = function (m) {\n return this.language.monthNames[m - 1];\n };\n ToText.prototype.weekdaytext = function (wday) {\n var weekday = isNumber(wday) ? (wday + 1) % 7 : wday.getJsWeekday();\n return ((wday.n ? this.nth(wday.n) + ' ' : '') +\n this.language.dayNames[weekday]);\n };\n ToText.prototype.plural = function (n) {\n return n % 100 !== 1;\n };\n ToText.prototype.add = function (s) {\n this.text.push(' ');\n this.text.push(s);\n return this;\n };\n ToText.prototype.list = function (arr, callback, finalDelim, delim) {\n var _this = this;\n if (delim === void 0) { delim = ','; }\n if (!isArray(arr)) {\n arr = [arr];\n }\n var delimJoin = function (array, delimiter, finalDelimiter) {\n var list = '';\n for (var i = 0; i < array.length; i++) {\n if (i !== 0) {\n if (i === array.length - 1) {\n list += ' ' + finalDelimiter + ' ';\n }\n else {\n list += delimiter + ' ';\n }\n }\n list += array[i];\n }\n return list;\n };\n callback =\n callback ||\n function (o) {\n return o.toString();\n };\n var realCallback = function (arg) {\n return callback && callback.call(_this, arg);\n };\n if (finalDelim) {\n return delimJoin(arr.map(realCallback), delim, finalDelim);\n }\n else {\n return arr.map(realCallback).join(delim + ' ');\n }\n };\n return ToText;\n}());\nexport default ToText;\n//# sourceMappingURL=totext.js.map","import ENGLISH from './i18n';\nimport { RRule } from '../rrule';\n// =============================================================================\n// Parser\n// =============================================================================\nvar Parser = /** @class */ (function () {\n function Parser(rules) {\n this.done = true;\n this.rules = rules;\n }\n Parser.prototype.start = function (text) {\n this.text = text;\n this.done = false;\n return this.nextSymbol();\n };\n Parser.prototype.isDone = function () {\n return this.done && this.symbol === null;\n };\n Parser.prototype.nextSymbol = function () {\n var best;\n var bestSymbol;\n this.symbol = null;\n this.value = null;\n do {\n if (this.done)\n return false;\n var rule = void 0;\n best = null;\n for (var name_1 in this.rules) {\n rule = this.rules[name_1];\n var match = rule.exec(this.text);\n if (match) {\n if (best === null || match[0].length > best[0].length) {\n best = match;\n bestSymbol = name_1;\n }\n }\n }\n if (best != null) {\n this.text = this.text.substr(best[0].length);\n if (this.text === '')\n this.done = true;\n }\n if (best == null) {\n this.done = true;\n this.symbol = null;\n this.value = null;\n return;\n }\n } while (bestSymbol === 'SKIP');\n this.symbol = bestSymbol;\n this.value = best;\n return true;\n };\n Parser.prototype.accept = function (name) {\n if (this.symbol === name) {\n if (this.value) {\n var v = this.value;\n this.nextSymbol();\n return v;\n }\n this.nextSymbol();\n return true;\n }\n return false;\n };\n Parser.prototype.acceptNumber = function () {\n return this.accept('number');\n };\n Parser.prototype.expect = function (name) {\n if (this.accept(name))\n return true;\n throw new Error('expected ' + name + ' but found ' + this.symbol);\n };\n return Parser;\n}());\nexport default function parseText(text, language) {\n if (language === void 0) { language = ENGLISH; }\n var options = {};\n var ttr = new Parser(language.tokens);\n if (!ttr.start(text))\n return null;\n S();\n return options;\n function S() {\n // every [n]\n ttr.expect('every');\n var n = ttr.acceptNumber();\n if (n)\n options.interval = parseInt(n[0], 10);\n if (ttr.isDone())\n throw new Error('Unexpected end');\n switch (ttr.symbol) {\n case 'day(s)':\n options.freq = RRule.DAILY;\n if (ttr.nextSymbol()) {\n AT();\n F();\n }\n break;\n // FIXME Note: every 2 weekdays != every two weeks on weekdays.\n // DAILY on weekdays is not a valid rule\n case 'weekday(s)':\n options.freq = RRule.WEEKLY;\n options.byweekday = [RRule.MO, RRule.TU, RRule.WE, RRule.TH, RRule.FR];\n ttr.nextSymbol();\n AT();\n F();\n break;\n case 'week(s)':\n options.freq = RRule.WEEKLY;\n if (ttr.nextSymbol()) {\n ON();\n AT();\n F();\n }\n break;\n case 'hour(s)':\n options.freq = RRule.HOURLY;\n if (ttr.nextSymbol()) {\n ON();\n F();\n }\n break;\n case 'minute(s)':\n options.freq = RRule.MINUTELY;\n if (ttr.nextSymbol()) {\n ON();\n F();\n }\n break;\n case 'month(s)':\n options.freq = RRule.MONTHLY;\n if (ttr.nextSymbol()) {\n ON();\n F();\n }\n break;\n case 'year(s)':\n options.freq = RRule.YEARLY;\n if (ttr.nextSymbol()) {\n ON();\n F();\n }\n break;\n case 'monday':\n case 'tuesday':\n case 'wednesday':\n case 'thursday':\n case 'friday':\n case 'saturday':\n case 'sunday':\n options.freq = RRule.WEEKLY;\n var key = ttr.symbol\n .substr(0, 2)\n .toUpperCase();\n options.byweekday = [RRule[key]];\n if (!ttr.nextSymbol())\n return;\n // TODO check for duplicates\n while (ttr.accept('comma')) {\n if (ttr.isDone())\n throw new Error('Unexpected end');\n var wkd = decodeWKD();\n if (!wkd) {\n throw new Error('Unexpected symbol ' + ttr.symbol + ', expected weekday');\n }\n options.byweekday.push(RRule[wkd]);\n ttr.nextSymbol();\n }\n AT();\n MDAYs();\n F();\n break;\n case 'january':\n case 'february':\n case 'march':\n case 'april':\n case 'may':\n case 'june':\n case 'july':\n case 'august':\n case 'september':\n case 'october':\n case 'november':\n case 'december':\n options.freq = RRule.YEARLY;\n options.bymonth = [decodeM()];\n if (!ttr.nextSymbol())\n return;\n // TODO check for duplicates\n while (ttr.accept('comma')) {\n if (ttr.isDone())\n throw new Error('Unexpected end');\n var m = decodeM();\n if (!m) {\n throw new Error('Unexpected symbol ' + ttr.symbol + ', expected month');\n }\n options.bymonth.push(m);\n ttr.nextSymbol();\n }\n ON();\n F();\n break;\n default:\n throw new Error('Unknown symbol');\n }\n }\n function ON() {\n var on = ttr.accept('on');\n var the = ttr.accept('the');\n if (!(on || the))\n return;\n do {\n var nth = decodeNTH();\n var wkd = decodeWKD();\n var m = decodeM();\n // nth | \n if (nth) {\n // ttr.nextSymbol()\n if (wkd) {\n ttr.nextSymbol();\n if (!options.byweekday)\n options.byweekday = [];\n options.byweekday.push(RRule[wkd].nth(nth));\n }\n else {\n if (!options.bymonthday)\n options.bymonthday = [];\n options.bymonthday.push(nth);\n ttr.accept('day(s)');\n }\n // \n }\n else if (wkd) {\n ttr.nextSymbol();\n if (!options.byweekday)\n options.byweekday = [];\n options.byweekday.push(RRule[wkd]);\n }\n else if (ttr.symbol === 'weekday(s)') {\n ttr.nextSymbol();\n if (!options.byweekday) {\n options.byweekday = [RRule.MO, RRule.TU, RRule.WE, RRule.TH, RRule.FR];\n }\n }\n else if (ttr.symbol === 'week(s)') {\n ttr.nextSymbol();\n var n = ttr.acceptNumber();\n if (!n) {\n throw new Error('Unexpected symbol ' + ttr.symbol + ', expected week number');\n }\n options.byweekno = [parseInt(n[0], 10)];\n while (ttr.accept('comma')) {\n n = ttr.acceptNumber();\n if (!n) {\n throw new Error('Unexpected symbol ' + ttr.symbol + '; expected monthday');\n }\n options.byweekno.push(parseInt(n[0], 10));\n }\n }\n else if (m) {\n ttr.nextSymbol();\n if (!options.bymonth)\n options.bymonth = [];\n options.bymonth.push(m);\n }\n else {\n return;\n }\n } while (ttr.accept('comma') || ttr.accept('the') || ttr.accept('on'));\n }\n function AT() {\n var at = ttr.accept('at');\n if (!at)\n return;\n do {\n var n = ttr.acceptNumber();\n if (!n) {\n throw new Error('Unexpected symbol ' + ttr.symbol + ', expected hour');\n }\n options.byhour = [parseInt(n[0], 10)];\n while (ttr.accept('comma')) {\n n = ttr.acceptNumber();\n if (!n) {\n throw new Error('Unexpected symbol ' + ttr.symbol + '; expected hour');\n }\n options.byhour.push(parseInt(n[0], 10));\n }\n } while (ttr.accept('comma') || ttr.accept('at'));\n }\n function decodeM() {\n switch (ttr.symbol) {\n case 'january':\n return 1;\n case 'february':\n return 2;\n case 'march':\n return 3;\n case 'april':\n return 4;\n case 'may':\n return 5;\n case 'june':\n return 6;\n case 'july':\n return 7;\n case 'august':\n return 8;\n case 'september':\n return 9;\n case 'october':\n return 10;\n case 'november':\n return 11;\n case 'december':\n return 12;\n default:\n return false;\n }\n }\n function decodeWKD() {\n switch (ttr.symbol) {\n case 'monday':\n case 'tuesday':\n case 'wednesday':\n case 'thursday':\n case 'friday':\n case 'saturday':\n case 'sunday':\n return ttr.symbol.substr(0, 2).toUpperCase();\n default:\n return false;\n }\n }\n function decodeNTH() {\n switch (ttr.symbol) {\n case 'last':\n ttr.nextSymbol();\n return -1;\n case 'first':\n ttr.nextSymbol();\n return 1;\n case 'second':\n ttr.nextSymbol();\n return ttr.accept('last') ? -2 : 2;\n case 'third':\n ttr.nextSymbol();\n return ttr.accept('last') ? -3 : 3;\n case 'nth':\n var v = parseInt(ttr.value[1], 10);\n if (v < -366 || v > 366)\n throw new Error('Nth out of range: ' + v);\n ttr.nextSymbol();\n return ttr.accept('last') ? -v : v;\n default:\n return false;\n }\n }\n function MDAYs() {\n ttr.accept('on');\n ttr.accept('the');\n var nth = decodeNTH();\n if (!nth)\n return;\n options.bymonthday = [nth];\n ttr.nextSymbol();\n while (ttr.accept('comma')) {\n nth = decodeNTH();\n if (!nth) {\n throw new Error('Unexpected symbol ' + ttr.symbol + '; expected monthday');\n }\n options.bymonthday.push(nth);\n ttr.nextSymbol();\n }\n }\n function F() {\n if (ttr.symbol === 'until') {\n var date = Date.parse(ttr.text);\n if (!date)\n throw new Error('Cannot parse until date:' + ttr.text);\n options.until = new Date(date);\n }\n else if (ttr.accept('for')) {\n options.count = parseInt(ttr.value[0], 10);\n ttr.expect('number');\n // ttr.expect('times')\n }\n }\n}\n//# sourceMappingURL=parsetext.js.map","import ToText from './totext';\nimport parseText from './parsetext';\nimport { RRule } from '../rrule';\nimport { Frequency } from '../types';\nimport ENGLISH from './i18n';\n/* !\n * rrule.js - Library for working with recurrence rules for calendar dates.\n * https://github.com/jakubroztocil/rrule\n *\n * Copyright 2010, Jakub Roztocil and Lars Schoning\n * Licenced under the BSD licence.\n * https://github.com/jakubroztocil/rrule/blob/master/LICENCE\n *\n */\n/**\n *\n * Implementation of RRule.fromText() and RRule::toText().\n *\n *\n * On the client side, this file needs to be included\n * when those functions are used.\n *\n */\n// =============================================================================\n// fromText\n// =============================================================================\n/**\n * Will be able to convert some of the below described rules from\n * text format to a rule object.\n *\n *\n * RULES\n *\n * Every ([n])\n * day(s)\n * | [weekday], ..., (and) [weekday]\n * | weekday(s)\n * | week(s)\n * | month(s)\n * | [month], ..., (and) [month]\n * | year(s)\n *\n *\n * Plus 0, 1, or multiple of these:\n *\n * on [weekday], ..., (or) [weekday] the [monthday], [monthday], ... (or) [monthday]\n *\n * on [weekday], ..., (and) [weekday]\n *\n * on the [monthday], [monthday], ... (and) [monthday] (day of the month)\n *\n * on the [nth-weekday], ..., (and) [nth-weekday] (of the month/year)\n *\n *\n * Plus 0 or 1 of these:\n *\n * for [n] time(s)\n *\n * until [date]\n *\n * Plus (.)\n *\n *\n * Definitely no supported for parsing:\n *\n * (for year):\n * in week(s) [n], ..., (and) [n]\n *\n * on the [yearday], ..., (and) [n] day of the year\n * on day [yearday], ..., (and) [n]\n *\n *\n * NON-TERMINALS\n *\n * [n]: 1, 2 ..., one, two, three ..\n * [month]: January, February, March, April, May, ... December\n * [weekday]: Monday, ... Sunday\n * [nth-weekday]: first [weekday], 2nd [weekday], ... last [weekday], ...\n * [monthday]: first, 1., 2., 1st, 2nd, second, ... 31st, last day, 2nd last day, ..\n * [date]:\n * - [month] (0-31(,) ([year])),\n * - (the) 0-31.(1-12.([year])),\n * - (the) 0-31/(1-12/([year])),\n * - [weekday]\n *\n * [year]: 0000, 0001, ... 01, 02, ..\n *\n * Definitely not supported for parsing:\n *\n * [yearday]: first, 1., 2., 1st, 2nd, second, ... 366th, last day, 2nd last day, ..\n *\n * @param {String} text\n * @return {Object, Boolean} the rule, or null.\n */\nvar fromText = function (text, language) {\n if (language === void 0) { language = ENGLISH; }\n return new RRule(parseText(text, language) || undefined);\n};\nvar common = [\n 'count',\n 'until',\n 'interval',\n 'byweekday',\n 'bymonthday',\n 'bymonth',\n];\nToText.IMPLEMENTED = [];\nToText.IMPLEMENTED[Frequency.HOURLY] = common;\nToText.IMPLEMENTED[Frequency.MINUTELY] = common;\nToText.IMPLEMENTED[Frequency.DAILY] = ['byhour'].concat(common);\nToText.IMPLEMENTED[Frequency.WEEKLY] = common;\nToText.IMPLEMENTED[Frequency.MONTHLY] = common;\nToText.IMPLEMENTED[Frequency.YEARLY] = ['byweekno', 'byyearday'].concat(common);\n// =============================================================================\n// Export\n// =============================================================================\nvar toText = function (rrule, gettext, language, dateFormatter) {\n return new ToText(rrule, gettext, language, dateFormatter).toString();\n};\nvar isFullyConvertible = ToText.isFullyConvertible;\nexport { fromText, parseText, isFullyConvertible, toText };\n//# sourceMappingURL=index.js.map","import { __extends } from \"tslib\";\nimport { Frequency } from './types';\nimport { pymod, divmod, empty, includes } from './helpers';\nimport { getWeekday, MAXYEAR, monthRange } from './dateutil';\nvar Time = /** @class */ (function () {\n function Time(hour, minute, second, millisecond) {\n this.hour = hour;\n this.minute = minute;\n this.second = second;\n this.millisecond = millisecond || 0;\n }\n Time.prototype.getHours = function () {\n return this.hour;\n };\n Time.prototype.getMinutes = function () {\n return this.minute;\n };\n Time.prototype.getSeconds = function () {\n return this.second;\n };\n Time.prototype.getMilliseconds = function () {\n return this.millisecond;\n };\n Time.prototype.getTime = function () {\n return ((this.hour * 60 * 60 + this.minute * 60 + this.second) * 1000 +\n this.millisecond);\n };\n return Time;\n}());\nexport { Time };\nvar DateTime = /** @class */ (function (_super) {\n __extends(DateTime, _super);\n function DateTime(year, month, day, hour, minute, second, millisecond) {\n var _this = _super.call(this, hour, minute, second, millisecond) || this;\n _this.year = year;\n _this.month = month;\n _this.day = day;\n return _this;\n }\n DateTime.fromDate = function (date) {\n return new this(date.getUTCFullYear(), date.getUTCMonth() + 1, date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), date.valueOf() % 1000);\n };\n DateTime.prototype.getWeekday = function () {\n return getWeekday(new Date(this.getTime()));\n };\n DateTime.prototype.getTime = function () {\n return new Date(Date.UTC(this.year, this.month - 1, this.day, this.hour, this.minute, this.second, this.millisecond)).getTime();\n };\n DateTime.prototype.getDay = function () {\n return this.day;\n };\n DateTime.prototype.getMonth = function () {\n return this.month;\n };\n DateTime.prototype.getYear = function () {\n return this.year;\n };\n DateTime.prototype.addYears = function (years) {\n this.year += years;\n };\n DateTime.prototype.addMonths = function (months) {\n this.month += months;\n if (this.month > 12) {\n var yearDiv = Math.floor(this.month / 12);\n var monthMod = pymod(this.month, 12);\n this.month = monthMod;\n this.year += yearDiv;\n if (this.month === 0) {\n this.month = 12;\n --this.year;\n }\n }\n };\n DateTime.prototype.addWeekly = function (days, wkst) {\n if (wkst > this.getWeekday()) {\n this.day += -(this.getWeekday() + 1 + (6 - wkst)) + days * 7;\n }\n else {\n this.day += -(this.getWeekday() - wkst) + days * 7;\n }\n this.fixDay();\n };\n DateTime.prototype.addDaily = function (days) {\n this.day += days;\n this.fixDay();\n };\n DateTime.prototype.addHours = function (hours, filtered, byhour) {\n if (filtered) {\n // Jump to one iteration before next day\n this.hour += Math.floor((23 - this.hour) / hours) * hours;\n }\n for (;;) {\n this.hour += hours;\n var _a = divmod(this.hour, 24), dayDiv = _a.div, hourMod = _a.mod;\n if (dayDiv) {\n this.hour = hourMod;\n this.addDaily(dayDiv);\n }\n if (empty(byhour) || includes(byhour, this.hour))\n break;\n }\n };\n DateTime.prototype.addMinutes = function (minutes, filtered, byhour, byminute) {\n if (filtered) {\n // Jump to one iteration before next day\n this.minute +=\n Math.floor((1439 - (this.hour * 60 + this.minute)) / minutes) * minutes;\n }\n for (;;) {\n this.minute += minutes;\n var _a = divmod(this.minute, 60), hourDiv = _a.div, minuteMod = _a.mod;\n if (hourDiv) {\n this.minute = minuteMod;\n this.addHours(hourDiv, false, byhour);\n }\n if ((empty(byhour) || includes(byhour, this.hour)) &&\n (empty(byminute) || includes(byminute, this.minute))) {\n break;\n }\n }\n };\n DateTime.prototype.addSeconds = function (seconds, filtered, byhour, byminute, bysecond) {\n if (filtered) {\n // Jump to one iteration before next day\n this.second +=\n Math.floor((86399 - (this.hour * 3600 + this.minute * 60 + this.second)) /\n seconds) * seconds;\n }\n for (;;) {\n this.second += seconds;\n var _a = divmod(this.second, 60), minuteDiv = _a.div, secondMod = _a.mod;\n if (minuteDiv) {\n this.second = secondMod;\n this.addMinutes(minuteDiv, false, byhour, byminute);\n }\n if ((empty(byhour) || includes(byhour, this.hour)) &&\n (empty(byminute) || includes(byminute, this.minute)) &&\n (empty(bysecond) || includes(bysecond, this.second))) {\n break;\n }\n }\n };\n DateTime.prototype.fixDay = function () {\n if (this.day <= 28) {\n return;\n }\n var daysinmonth = monthRange(this.year, this.month - 1)[1];\n if (this.day <= daysinmonth) {\n return;\n }\n while (this.day > daysinmonth) {\n this.day -= daysinmonth;\n ++this.month;\n if (this.month === 13) {\n this.month = 1;\n ++this.year;\n if (this.year > MAXYEAR) {\n return;\n }\n }\n daysinmonth = monthRange(this.year, this.month - 1)[1];\n }\n };\n DateTime.prototype.add = function (options, filtered) {\n var freq = options.freq, interval = options.interval, wkst = options.wkst, byhour = options.byhour, byminute = options.byminute, bysecond = options.bysecond;\n switch (freq) {\n case Frequency.YEARLY:\n return this.addYears(interval);\n case Frequency.MONTHLY:\n return this.addMonths(interval);\n case Frequency.WEEKLY:\n return this.addWeekly(interval, wkst);\n case Frequency.DAILY:\n return this.addDaily(interval);\n case Frequency.HOURLY:\n return this.addHours(interval, filtered, byhour);\n case Frequency.MINUTELY:\n return this.addMinutes(interval, filtered, byhour, byminute);\n case Frequency.SECONDLY:\n return this.addSeconds(interval, filtered, byhour, byminute, bysecond);\n }\n };\n return DateTime;\n}(Time));\nexport { DateTime };\n//# sourceMappingURL=datetime.js.map","import { __assign } from \"tslib\";\nimport { freqIsDailyOrGreater } from './types';\nimport { includes, notEmpty, isPresent, isNumber, isArray, isWeekdayStr, } from './helpers';\nimport { RRule, defaultKeys, DEFAULT_OPTIONS } from './rrule';\nimport { getWeekday, isDate, isValidDate } from './dateutil';\nimport { Weekday } from './weekday';\nimport { Time } from './datetime';\nexport function initializeOptions(options) {\n var invalid = [];\n var keys = Object.keys(options);\n // Shallow copy for options and origOptions and check for invalid\n for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {\n var key = keys_1[_i];\n if (!includes(defaultKeys, key))\n invalid.push(key);\n if (isDate(options[key]) && !isValidDate(options[key])) {\n invalid.push(key);\n }\n }\n if (invalid.length) {\n throw new Error('Invalid options: ' + invalid.join(', '));\n }\n return __assign({}, options);\n}\nexport function parseOptions(options) {\n var opts = __assign(__assign({}, DEFAULT_OPTIONS), initializeOptions(options));\n if (isPresent(opts.byeaster))\n opts.freq = RRule.YEARLY;\n if (!(isPresent(opts.freq) && RRule.FREQUENCIES[opts.freq])) {\n throw new Error(\"Invalid frequency: \".concat(opts.freq, \" \").concat(options.freq));\n }\n if (!opts.dtstart)\n opts.dtstart = new Date(new Date().setMilliseconds(0));\n if (!isPresent(opts.wkst)) {\n opts.wkst = RRule.MO.weekday;\n }\n else if (isNumber(opts.wkst)) {\n // cool, just keep it like that\n }\n else {\n opts.wkst = opts.wkst.weekday;\n }\n if (isPresent(opts.bysetpos)) {\n if (isNumber(opts.bysetpos))\n opts.bysetpos = [opts.bysetpos];\n for (var i = 0; i < opts.bysetpos.length; i++) {\n var v = opts.bysetpos[i];\n if (v === 0 || !(v >= -366 && v <= 366)) {\n throw new Error('bysetpos must be between 1 and 366,' + ' or between -366 and -1');\n }\n }\n }\n if (!(Boolean(opts.byweekno) ||\n notEmpty(opts.byweekno) ||\n notEmpty(opts.byyearday) ||\n Boolean(opts.bymonthday) ||\n notEmpty(opts.bymonthday) ||\n isPresent(opts.byweekday) ||\n isPresent(opts.byeaster))) {\n switch (opts.freq) {\n case RRule.YEARLY:\n if (!opts.bymonth)\n opts.bymonth = opts.dtstart.getUTCMonth() + 1;\n opts.bymonthday = opts.dtstart.getUTCDate();\n break;\n case RRule.MONTHLY:\n opts.bymonthday = opts.dtstart.getUTCDate();\n break;\n case RRule.WEEKLY:\n opts.byweekday = [getWeekday(opts.dtstart)];\n break;\n }\n }\n // bymonth\n if (isPresent(opts.bymonth) && !isArray(opts.bymonth)) {\n opts.bymonth = [opts.bymonth];\n }\n // byyearday\n if (isPresent(opts.byyearday) &&\n !isArray(opts.byyearday) &&\n isNumber(opts.byyearday)) {\n opts.byyearday = [opts.byyearday];\n }\n // bymonthday\n if (!isPresent(opts.bymonthday)) {\n opts.bymonthday = [];\n opts.bynmonthday = [];\n }\n else if (isArray(opts.bymonthday)) {\n var bymonthday = [];\n var bynmonthday = [];\n for (var i = 0; i < opts.bymonthday.length; i++) {\n var v = opts.bymonthday[i];\n if (v > 0) {\n bymonthday.push(v);\n }\n else if (v < 0) {\n bynmonthday.push(v);\n }\n }\n opts.bymonthday = bymonthday;\n opts.bynmonthday = bynmonthday;\n }\n else if (opts.bymonthday < 0) {\n opts.bynmonthday = [opts.bymonthday];\n opts.bymonthday = [];\n }\n else {\n opts.bynmonthday = [];\n opts.bymonthday = [opts.bymonthday];\n }\n // byweekno\n if (isPresent(opts.byweekno) && !isArray(opts.byweekno)) {\n opts.byweekno = [opts.byweekno];\n }\n // byweekday / bynweekday\n if (!isPresent(opts.byweekday)) {\n opts.bynweekday = null;\n }\n else if (isNumber(opts.byweekday)) {\n opts.byweekday = [opts.byweekday];\n opts.bynweekday = null;\n }\n else if (isWeekdayStr(opts.byweekday)) {\n opts.byweekday = [Weekday.fromStr(opts.byweekday).weekday];\n opts.bynweekday = null;\n }\n else if (opts.byweekday instanceof Weekday) {\n if (!opts.byweekday.n || opts.freq > RRule.MONTHLY) {\n opts.byweekday = [opts.byweekday.weekday];\n opts.bynweekday = null;\n }\n else {\n opts.bynweekday = [[opts.byweekday.weekday, opts.byweekday.n]];\n opts.byweekday = null;\n }\n }\n else {\n var byweekday = [];\n var bynweekday = [];\n for (var i = 0; i < opts.byweekday.length; i++) {\n var wday = opts.byweekday[i];\n if (isNumber(wday)) {\n byweekday.push(wday);\n continue;\n }\n else if (isWeekdayStr(wday)) {\n byweekday.push(Weekday.fromStr(wday).weekday);\n continue;\n }\n if (!wday.n || opts.freq > RRule.MONTHLY) {\n byweekday.push(wday.weekday);\n }\n else {\n bynweekday.push([wday.weekday, wday.n]);\n }\n }\n opts.byweekday = notEmpty(byweekday) ? byweekday : null;\n opts.bynweekday = notEmpty(bynweekday) ? bynweekday : null;\n }\n // byhour\n if (!isPresent(opts.byhour)) {\n opts.byhour = opts.freq < RRule.HOURLY ? [opts.dtstart.getUTCHours()] : null;\n }\n else if (isNumber(opts.byhour)) {\n opts.byhour = [opts.byhour];\n }\n // byminute\n if (!isPresent(opts.byminute)) {\n opts.byminute =\n opts.freq < RRule.MINUTELY ? [opts.dtstart.getUTCMinutes()] : null;\n }\n else if (isNumber(opts.byminute)) {\n opts.byminute = [opts.byminute];\n }\n // bysecond\n if (!isPresent(opts.bysecond)) {\n opts.bysecond =\n opts.freq < RRule.SECONDLY ? [opts.dtstart.getUTCSeconds()] : null;\n }\n else if (isNumber(opts.bysecond)) {\n opts.bysecond = [opts.bysecond];\n }\n return { parsedOptions: opts };\n}\nexport function buildTimeset(opts) {\n var millisecondModulo = opts.dtstart.getTime() % 1000;\n if (!freqIsDailyOrGreater(opts.freq)) {\n return [];\n }\n var timeset = [];\n opts.byhour.forEach(function (hour) {\n opts.byminute.forEach(function (minute) {\n opts.bysecond.forEach(function (second) {\n timeset.push(new Time(hour, minute, second, millisecondModulo));\n });\n });\n });\n return timeset;\n}\n//# sourceMappingURL=parseoptions.js.map","import { __assign } from \"tslib\";\nimport { Frequency } from './types';\nimport { Weekday } from './weekday';\nimport { untilStringToDate } from './dateutil';\nimport { Days } from './rrule';\nexport function parseString(rfcString) {\n var options = rfcString\n .split('\\n')\n .map(parseLine)\n .filter(function (x) { return x !== null; });\n return __assign(__assign({}, options[0]), options[1]);\n}\nexport function parseDtstart(line) {\n var options = {};\n var dtstartWithZone = /DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\\s]+)/i.exec(line);\n if (!dtstartWithZone) {\n return options;\n }\n var tzid = dtstartWithZone[1], dtstart = dtstartWithZone[2];\n if (tzid) {\n options.tzid = tzid;\n }\n options.dtstart = untilStringToDate(dtstart);\n return options;\n}\nfunction parseLine(rfcString) {\n rfcString = rfcString.replace(/^\\s+|\\s+$/, '');\n if (!rfcString.length)\n return null;\n var header = /^([A-Z]+?)[:;]/.exec(rfcString.toUpperCase());\n if (!header) {\n return parseRrule(rfcString);\n }\n var key = header[1];\n switch (key.toUpperCase()) {\n case 'RRULE':\n case 'EXRULE':\n return parseRrule(rfcString);\n case 'DTSTART':\n return parseDtstart(rfcString);\n default:\n throw new Error(\"Unsupported RFC prop \".concat(key, \" in \").concat(rfcString));\n }\n}\nfunction parseRrule(line) {\n var strippedLine = line.replace(/^RRULE:/i, '');\n var options = parseDtstart(strippedLine);\n var attrs = line.replace(/^(?:RRULE|EXRULE):/i, '').split(';');\n attrs.forEach(function (attr) {\n var _a = attr.split('='), key = _a[0], value = _a[1];\n switch (key.toUpperCase()) {\n case 'FREQ':\n options.freq = Frequency[value.toUpperCase()];\n break;\n case 'WKST':\n options.wkst = Days[value.toUpperCase()];\n break;\n case 'COUNT':\n case 'INTERVAL':\n case 'BYSETPOS':\n case 'BYMONTH':\n case 'BYMONTHDAY':\n case 'BYYEARDAY':\n case 'BYWEEKNO':\n case 'BYHOUR':\n case 'BYMINUTE':\n case 'BYSECOND':\n var num = parseNumber(value);\n var optionKey = key.toLowerCase();\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n options[optionKey] = num;\n break;\n case 'BYWEEKDAY':\n case 'BYDAY':\n options.byweekday = parseWeekday(value);\n break;\n case 'DTSTART':\n case 'TZID':\n // for backwards compatibility\n var dtstart = parseDtstart(line);\n options.tzid = dtstart.tzid;\n options.dtstart = dtstart.dtstart;\n break;\n case 'UNTIL':\n options.until = untilStringToDate(value);\n break;\n case 'BYEASTER':\n options.byeaster = Number(value);\n break;\n default:\n throw new Error(\"Unknown RRULE property '\" + key + \"'\");\n }\n });\n return options;\n}\nfunction parseNumber(value) {\n if (value.indexOf(',') !== -1) {\n var values = value.split(',');\n return values.map(parseIndividualNumber);\n }\n return parseIndividualNumber(value);\n}\nfunction parseIndividualNumber(value) {\n if (/^[+-]?\\d+$/.test(value)) {\n return Number(value);\n }\n return value;\n}\nfunction parseWeekday(value) {\n var days = value.split(',');\n return days.map(function (day) {\n if (day.length === 2) {\n // MO, TU, ...\n return Days[day]; // wday instanceof Weekday\n }\n // -1MO, +3FR, 1SO, 13TU ...\n var parts = day.match(/^([+-]?\\d{1,2})([A-Z]{2})$/);\n if (!parts || parts.length < 3) {\n throw new SyntaxError(\"Invalid weekday string: \".concat(day));\n }\n var n = Number(parts[1]);\n var wdaypart = parts[2];\n var wday = Days[wdaypart].weekday;\n return new Weekday(wday, n);\n });\n}\n//# sourceMappingURL=parsestring.js.map","import { dateInTimeZone, timeToUntilString } from './dateutil';\nvar DateWithZone = /** @class */ (function () {\n function DateWithZone(date, tzid) {\n if (isNaN(date.getTime())) {\n throw new RangeError('Invalid date passed to DateWithZone');\n }\n this.date = date;\n this.tzid = tzid;\n }\n Object.defineProperty(DateWithZone.prototype, \"isUTC\", {\n get: function () {\n return !this.tzid || this.tzid.toUpperCase() === 'UTC';\n },\n enumerable: false,\n configurable: true\n });\n DateWithZone.prototype.toString = function () {\n var datestr = timeToUntilString(this.date.getTime(), this.isUTC);\n if (!this.isUTC) {\n return \";TZID=\".concat(this.tzid, \":\").concat(datestr);\n }\n return \":\".concat(datestr);\n };\n DateWithZone.prototype.getTime = function () {\n return this.date.getTime();\n };\n DateWithZone.prototype.rezonedDate = function () {\n if (this.isUTC) {\n return this.date;\n }\n return dateInTimeZone(this.date, this.tzid);\n };\n return DateWithZone;\n}());\nexport { DateWithZone };\n//# sourceMappingURL=datewithzone.js.map","import { RRule, DEFAULT_OPTIONS } from './rrule';\nimport { includes, isPresent, isArray, isNumber, toArray } from './helpers';\nimport { Weekday } from './weekday';\nimport { timeToUntilString } from './dateutil';\nimport { DateWithZone } from './datewithzone';\nexport function optionsToString(options) {\n var rrule = [];\n var dtstart = '';\n var keys = Object.keys(options);\n var defaultKeys = Object.keys(DEFAULT_OPTIONS);\n for (var i = 0; i < keys.length; i++) {\n if (keys[i] === 'tzid')\n continue;\n if (!includes(defaultKeys, keys[i]))\n continue;\n var key = keys[i].toUpperCase();\n var value = options[keys[i]];\n var outValue = '';\n if (!isPresent(value) || (isArray(value) && !value.length))\n continue;\n switch (key) {\n case 'FREQ':\n outValue = RRule.FREQUENCIES[options.freq];\n break;\n case 'WKST':\n if (isNumber(value)) {\n outValue = new Weekday(value).toString();\n }\n else {\n outValue = value.toString();\n }\n break;\n case 'BYWEEKDAY':\n /*\n NOTE: BYWEEKDAY is a special case.\n RRule() deconstructs the rule.options.byweekday array\n into an array of Weekday arguments.\n On the other hand, rule.origOptions is an array of Weekdays.\n We need to handle both cases here.\n It might be worth change RRule to keep the Weekdays.\n \n Also, BYWEEKDAY (used by RRule) vs. BYDAY (RFC)\n \n */\n key = 'BYDAY';\n outValue = toArray(value)\n .map(function (wday) {\n if (wday instanceof Weekday) {\n return wday;\n }\n if (isArray(wday)) {\n return new Weekday(wday[0], wday[1]);\n }\n return new Weekday(wday);\n })\n .toString();\n break;\n case 'DTSTART':\n dtstart = buildDtstart(value, options.tzid);\n break;\n case 'UNTIL':\n outValue = timeToUntilString(value, !options.tzid);\n break;\n default:\n if (isArray(value)) {\n var strValues = [];\n for (var j = 0; j < value.length; j++) {\n strValues[j] = String(value[j]);\n }\n outValue = strValues.toString();\n }\n else {\n outValue = String(value);\n }\n }\n if (outValue) {\n rrule.push([key, outValue]);\n }\n }\n var rules = rrule\n .map(function (_a) {\n var key = _a[0], value = _a[1];\n return \"\".concat(key, \"=\").concat(value.toString());\n })\n .join(';');\n var ruleString = '';\n if (rules !== '') {\n ruleString = \"RRULE:\".concat(rules);\n }\n return [dtstart, ruleString].filter(function (x) { return !!x; }).join('\\n');\n}\nfunction buildDtstart(dtstart, tzid) {\n if (!dtstart) {\n return '';\n }\n return 'DTSTART' + new DateWithZone(new Date(dtstart), tzid).toString();\n}\n//# sourceMappingURL=optionstostring.js.map","import IterResult from './iterresult';\nimport { clone, cloneDates } from './dateutil';\nimport { isArray } from './helpers';\nfunction argsMatch(left, right) {\n if (Array.isArray(left)) {\n if (!Array.isArray(right))\n return false;\n if (left.length !== right.length)\n return false;\n return left.every(function (date, i) { return date.getTime() === right[i].getTime(); });\n }\n if (left instanceof Date) {\n return right instanceof Date && left.getTime() === right.getTime();\n }\n return left === right;\n}\nvar Cache = /** @class */ (function () {\n function Cache() {\n this.all = false;\n this.before = [];\n this.after = [];\n this.between = [];\n }\n /**\n * @param {String} what - all/before/after/between\n * @param {Array,Date} value - an array of dates, one date, or null\n * @param {Object?} args - _iter arguments\n */\n Cache.prototype._cacheAdd = function (what, value, args) {\n if (value) {\n value = value instanceof Date ? clone(value) : cloneDates(value);\n }\n if (what === 'all') {\n this.all = value;\n }\n else {\n args._value = value;\n this[what].push(args);\n }\n };\n /**\n * @return false - not in the cache\n * @return null - cached, but zero occurrences (before/after)\n * @return Date - cached (before/after)\n * @return [] - cached, but zero occurrences (all/between)\n * @return [Date1, DateN] - cached (all/between)\n */\n Cache.prototype._cacheGet = function (what, args) {\n var cached = false;\n var argsKeys = args ? Object.keys(args) : [];\n var findCacheDiff = function (item) {\n for (var i = 0; i < argsKeys.length; i++) {\n var key = argsKeys[i];\n if (!argsMatch(args[key], item[key])) {\n return true;\n }\n }\n return false;\n };\n var cachedObject = this[what];\n if (what === 'all') {\n cached = this.all;\n }\n else if (isArray(cachedObject)) {\n // Let's see whether we've already called the\n // 'what' method with the same 'args'\n for (var i = 0; i < cachedObject.length; i++) {\n var item = cachedObject[i];\n if (argsKeys.length && findCacheDiff(item))\n continue;\n cached = item._value;\n break;\n }\n }\n if (!cached && this.all) {\n // Not in the cache, but we already know all the occurrences,\n // so we can find the correct dates from the cached ones.\n var iterResult = new IterResult(what, args);\n for (var i = 0; i < this.all.length; i++) {\n if (!iterResult.accept(this.all[i]))\n break;\n }\n cached = iterResult.getValue();\n this._cacheAdd(what, cached, args);\n }\n return isArray(cached)\n ? cloneDates(cached)\n : cached instanceof Date\n ? clone(cached)\n : cached;\n };\n return Cache;\n}());\nexport { Cache };\n//# sourceMappingURL=cache.js.map","import { __spreadArray } from \"tslib\";\nimport { range, repeat } from './helpers';\n// =============================================================================\n// Date masks\n// =============================================================================\n// Every mask is 7 days longer to handle cross-year weekly periods.\nvar M365MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], repeat(1, 31), true), repeat(2, 28), true), repeat(3, 31), true), repeat(4, 30), true), repeat(5, 31), true), repeat(6, 30), true), repeat(7, 31), true), repeat(8, 31), true), repeat(9, 30), true), repeat(10, 31), true), repeat(11, 30), true), repeat(12, 31), true), repeat(1, 7), true);\nvar M366MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], repeat(1, 31), true), repeat(2, 29), true), repeat(3, 31), true), repeat(4, 30), true), repeat(5, 31), true), repeat(6, 30), true), repeat(7, 31), true), repeat(8, 31), true), repeat(9, 30), true), repeat(10, 31), true), repeat(11, 30), true), repeat(12, 31), true), repeat(1, 7), true);\nvar M28 = range(1, 29);\nvar M29 = range(1, 30);\nvar M30 = range(1, 31);\nvar M31 = range(1, 32);\nvar MDAY366MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], M31, true), M29, true), M31, true), M30, true), M31, true), M30, true), M31, true), M31, true), M30, true), M31, true), M30, true), M31, true), M31.slice(0, 7), true);\nvar MDAY365MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], M31, true), M28, true), M31, true), M30, true), M31, true), M30, true), M31, true), M31, true), M30, true), M31, true), M30, true), M31, true), M31.slice(0, 7), true);\nvar NM28 = range(-28, 0);\nvar NM29 = range(-29, 0);\nvar NM30 = range(-30, 0);\nvar NM31 = range(-31, 0);\nvar NMDAY366MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], NM31, true), NM29, true), NM31, true), NM30, true), NM31, true), NM30, true), NM31, true), NM31, true), NM30, true), NM31, true), NM30, true), NM31, true), NM31.slice(0, 7), true);\nvar NMDAY365MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], NM31, true), NM28, true), NM31, true), NM30, true), NM31, true), NM30, true), NM31, true), NM31, true), NM30, true), NM31, true), NM30, true), NM31, true), NM31.slice(0, 7), true);\nvar M366RANGE = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366];\nvar M365RANGE = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365];\nvar WDAYMASK = (function () {\n var wdaymask = [];\n for (var i = 0; i < 55; i++)\n wdaymask = wdaymask.concat(range(7));\n return wdaymask;\n})();\nexport { WDAYMASK, M365MASK, M365RANGE, M366MASK, M366RANGE, MDAY365MASK, MDAY366MASK, NMDAY365MASK, NMDAY366MASK, };\n//# sourceMappingURL=masks.js.map","import { __assign } from \"tslib\";\nimport { datetime, getWeekday, isLeapYear, toOrdinal } from '../dateutil';\nimport { empty, repeat, pymod, includes } from '../helpers';\nimport { M365MASK, MDAY365MASK, NMDAY365MASK, WDAYMASK, M365RANGE, M366MASK, MDAY366MASK, NMDAY366MASK, M366RANGE, } from '../masks';\nexport function rebuildYear(year, options) {\n var firstyday = datetime(year, 1, 1);\n var yearlen = isLeapYear(year) ? 366 : 365;\n var nextyearlen = isLeapYear(year + 1) ? 366 : 365;\n var yearordinal = toOrdinal(firstyday);\n var yearweekday = getWeekday(firstyday);\n var result = __assign(__assign({ yearlen: yearlen, nextyearlen: nextyearlen, yearordinal: yearordinal, yearweekday: yearweekday }, baseYearMasks(year)), { wnomask: null });\n if (empty(options.byweekno)) {\n return result;\n }\n result.wnomask = repeat(0, yearlen + 7);\n var firstwkst;\n var wyearlen;\n var no1wkst = (firstwkst = pymod(7 - yearweekday + options.wkst, 7));\n if (no1wkst >= 4) {\n no1wkst = 0;\n // Number of days in the year, plus the days we got\n // from last year.\n wyearlen = result.yearlen + pymod(yearweekday - options.wkst, 7);\n }\n else {\n // Number of days in the year, minus the days we\n // left in last year.\n wyearlen = yearlen - no1wkst;\n }\n var div = Math.floor(wyearlen / 7);\n var mod = pymod(wyearlen, 7);\n var numweeks = Math.floor(div + mod / 4);\n for (var j = 0; j < options.byweekno.length; j++) {\n var n = options.byweekno[j];\n if (n < 0) {\n n += numweeks + 1;\n }\n if (!(n > 0 && n <= numweeks)) {\n continue;\n }\n var i = void 0;\n if (n > 1) {\n i = no1wkst + (n - 1) * 7;\n if (no1wkst !== firstwkst) {\n i -= 7 - firstwkst;\n }\n }\n else {\n i = no1wkst;\n }\n for (var k = 0; k < 7; k++) {\n result.wnomask[i] = 1;\n i++;\n if (result.wdaymask[i] === options.wkst)\n break;\n }\n }\n if (includes(options.byweekno, 1)) {\n // Check week number 1 of next year as well\n // orig-TODO : Check -numweeks for next year.\n var i = no1wkst + numweeks * 7;\n if (no1wkst !== firstwkst)\n i -= 7 - firstwkst;\n if (i < yearlen) {\n // If week starts in next year, we\n // don't care about it.\n for (var j = 0; j < 7; j++) {\n result.wnomask[i] = 1;\n i += 1;\n if (result.wdaymask[i] === options.wkst)\n break;\n }\n }\n }\n if (no1wkst) {\n // Check last week number of last year as\n // well. If no1wkst is 0, either the year\n // started on week start, or week number 1\n // got days from last year, so there are no\n // days from last year's last week number in\n // this year.\n var lnumweeks = void 0;\n if (!includes(options.byweekno, -1)) {\n var lyearweekday = getWeekday(datetime(year - 1, 1, 1));\n var lno1wkst = pymod(7 - lyearweekday.valueOf() + options.wkst, 7);\n var lyearlen = isLeapYear(year - 1) ? 366 : 365;\n var weekst = void 0;\n if (lno1wkst >= 4) {\n lno1wkst = 0;\n weekst = lyearlen + pymod(lyearweekday - options.wkst, 7);\n }\n else {\n weekst = yearlen - no1wkst;\n }\n lnumweeks = Math.floor(52 + pymod(weekst, 7) / 4);\n }\n else {\n lnumweeks = -1;\n }\n if (includes(options.byweekno, lnumweeks)) {\n for (var i = 0; i < no1wkst; i++)\n result.wnomask[i] = 1;\n }\n }\n return result;\n}\nfunction baseYearMasks(year) {\n var yearlen = isLeapYear(year) ? 366 : 365;\n var firstyday = datetime(year, 1, 1);\n var wday = getWeekday(firstyday);\n if (yearlen === 365) {\n return {\n mmask: M365MASK,\n mdaymask: MDAY365MASK,\n nmdaymask: NMDAY365MASK,\n wdaymask: WDAYMASK.slice(wday),\n mrange: M365RANGE,\n };\n }\n return {\n mmask: M366MASK,\n mdaymask: MDAY366MASK,\n nmdaymask: NMDAY366MASK,\n wdaymask: WDAYMASK.slice(wday),\n mrange: M366RANGE,\n };\n}\n//# sourceMappingURL=yearinfo.js.map","import { notEmpty, repeat, range, isPresent } from '../helpers';\nimport { Frequency } from '../types';\nimport { rebuildYear } from './yearinfo';\nimport { rebuildMonth } from './monthinfo';\nimport { easter } from './easter';\nimport { Time } from '../datetime';\nimport { datetime, sort, toOrdinal } from '../dateutil';\n// =============================================================================\n// Iterinfo\n// =============================================================================\nvar Iterinfo = /** @class */ (function () {\n // eslint-disable-next-line no-empty-function\n function Iterinfo(options) {\n this.options = options;\n }\n Iterinfo.prototype.rebuild = function (year, month) {\n var options = this.options;\n if (year !== this.lastyear) {\n this.yearinfo = rebuildYear(year, options);\n }\n if (notEmpty(options.bynweekday) &&\n (month !== this.lastmonth || year !== this.lastyear)) {\n var _a = this.yearinfo, yearlen = _a.yearlen, mrange = _a.mrange, wdaymask = _a.wdaymask;\n this.monthinfo = rebuildMonth(year, month, yearlen, mrange, wdaymask, options);\n }\n if (isPresent(options.byeaster)) {\n this.eastermask = easter(year, options.byeaster);\n }\n };\n Object.defineProperty(Iterinfo.prototype, \"lastyear\", {\n get: function () {\n return this.monthinfo ? this.monthinfo.lastyear : null;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"lastmonth\", {\n get: function () {\n return this.monthinfo ? this.monthinfo.lastmonth : null;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"yearlen\", {\n get: function () {\n return this.yearinfo.yearlen;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"yearordinal\", {\n get: function () {\n return this.yearinfo.yearordinal;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"mrange\", {\n get: function () {\n return this.yearinfo.mrange;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"wdaymask\", {\n get: function () {\n return this.yearinfo.wdaymask;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"mmask\", {\n get: function () {\n return this.yearinfo.mmask;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"wnomask\", {\n get: function () {\n return this.yearinfo.wnomask;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"nwdaymask\", {\n get: function () {\n return this.monthinfo ? this.monthinfo.nwdaymask : [];\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"nextyearlen\", {\n get: function () {\n return this.yearinfo.nextyearlen;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"mdaymask\", {\n get: function () {\n return this.yearinfo.mdaymask;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"nmdaymask\", {\n get: function () {\n return this.yearinfo.nmdaymask;\n },\n enumerable: false,\n configurable: true\n });\n Iterinfo.prototype.ydayset = function () {\n return [range(this.yearlen), 0, this.yearlen];\n };\n Iterinfo.prototype.mdayset = function (_, month) {\n var start = this.mrange[month - 1];\n var end = this.mrange[month];\n var set = repeat(null, this.yearlen);\n for (var i = start; i < end; i++)\n set[i] = i;\n return [set, start, end];\n };\n Iterinfo.prototype.wdayset = function (year, month, day) {\n // We need to handle cross-year weeks here.\n var set = repeat(null, this.yearlen + 7);\n var i = toOrdinal(datetime(year, month, day)) - this.yearordinal;\n var start = i;\n for (var j = 0; j < 7; j++) {\n set[i] = i;\n ++i;\n if (this.wdaymask[i] === this.options.wkst)\n break;\n }\n return [set, start, i];\n };\n Iterinfo.prototype.ddayset = function (year, month, day) {\n var set = repeat(null, this.yearlen);\n var i = toOrdinal(datetime(year, month, day)) - this.yearordinal;\n set[i] = i;\n return [set, i, i + 1];\n };\n Iterinfo.prototype.htimeset = function (hour, _, second, millisecond) {\n var _this = this;\n var set = [];\n this.options.byminute.forEach(function (minute) {\n set = set.concat(_this.mtimeset(hour, minute, second, millisecond));\n });\n sort(set);\n return set;\n };\n Iterinfo.prototype.mtimeset = function (hour, minute, _, millisecond) {\n var set = this.options.bysecond.map(function (second) { return new Time(hour, minute, second, millisecond); });\n sort(set);\n return set;\n };\n Iterinfo.prototype.stimeset = function (hour, minute, second, millisecond) {\n return [new Time(hour, minute, second, millisecond)];\n };\n Iterinfo.prototype.getdayset = function (freq) {\n switch (freq) {\n case Frequency.YEARLY:\n return this.ydayset.bind(this);\n case Frequency.MONTHLY:\n return this.mdayset.bind(this);\n case Frequency.WEEKLY:\n return this.wdayset.bind(this);\n case Frequency.DAILY:\n return this.ddayset.bind(this);\n default:\n return this.ddayset.bind(this);\n }\n };\n Iterinfo.prototype.gettimeset = function (freq) {\n switch (freq) {\n case Frequency.HOURLY:\n return this.htimeset.bind(this);\n case Frequency.MINUTELY:\n return this.mtimeset.bind(this);\n case Frequency.SECONDLY:\n return this.stimeset.bind(this);\n }\n };\n return Iterinfo;\n}());\nexport default Iterinfo;\n//# sourceMappingURL=index.js.map","import { RRule } from '../rrule';\nimport { empty, repeat, pymod } from '../helpers';\nexport function rebuildMonth(year, month, yearlen, mrange, wdaymask, options) {\n var result = {\n lastyear: year,\n lastmonth: month,\n nwdaymask: [],\n };\n var ranges = [];\n if (options.freq === RRule.YEARLY) {\n if (empty(options.bymonth)) {\n ranges = [[0, yearlen]];\n }\n else {\n for (var j = 0; j < options.bymonth.length; j++) {\n month = options.bymonth[j];\n ranges.push(mrange.slice(month - 1, month + 1));\n }\n }\n }\n else if (options.freq === RRule.MONTHLY) {\n ranges = [mrange.slice(month - 1, month + 1)];\n }\n if (empty(ranges)) {\n return result;\n }\n // Weekly frequency won't get here, so we may not\n // care about cross-year weekly periods.\n result.nwdaymask = repeat(0, yearlen);\n for (var j = 0; j < ranges.length; j++) {\n var rang = ranges[j];\n var first = rang[0];\n var last = rang[1] - 1;\n for (var k = 0; k < options.bynweekday.length; k++) {\n var i = void 0;\n var _a = options.bynweekday[k], wday = _a[0], n = _a[1];\n if (n < 0) {\n i = last + (n + 1) * 7;\n i -= pymod(wdaymask[i] - wday, 7);\n }\n else {\n i = first + (n - 1) * 7;\n i += pymod(7 - wdaymask[i] + wday, 7);\n }\n if (first <= i && i <= last)\n result.nwdaymask[i] = 1;\n }\n }\n return result;\n}\n//# sourceMappingURL=monthinfo.js.map","export function easter(y, offset) {\n if (offset === void 0) { offset = 0; }\n var a = y % 19;\n var b = Math.floor(y / 100);\n var c = y % 100;\n var d = Math.floor(b / 4);\n var e = b % 4;\n var f = Math.floor((b + 8) / 25);\n var g = Math.floor((b - f + 1) / 3);\n var h = Math.floor(19 * a + b - d - g + 15) % 30;\n var i = Math.floor(c / 4);\n var k = c % 4;\n var l = Math.floor(32 + 2 * e + 2 * i - h - k) % 7;\n var m = Math.floor((a + 11 * h + 22 * l) / 451);\n var month = Math.floor((h + l - 7 * m + 114) / 31);\n var day = ((h + l - 7 * m + 114) % 31) + 1;\n var date = Date.UTC(y, month - 1, day + offset);\n var yearStart = Date.UTC(y, 0, 1);\n return [Math.ceil((date - yearStart) / (1000 * 60 * 60 * 24))];\n}\n//# sourceMappingURL=easter.js.map","import { combine, fromOrdinal, sort } from '../dateutil';\nimport { pymod, isPresent, includes } from '../helpers';\nexport function buildPoslist(bysetpos, timeset, start, end, ii, dayset) {\n var poslist = [];\n for (var j = 0; j < bysetpos.length; j++) {\n var daypos = void 0;\n var timepos = void 0;\n var pos = bysetpos[j];\n if (pos < 0) {\n daypos = Math.floor(pos / timeset.length);\n timepos = pymod(pos, timeset.length);\n }\n else {\n daypos = Math.floor((pos - 1) / timeset.length);\n timepos = pymod(pos - 1, timeset.length);\n }\n var tmp = [];\n for (var k = start; k < end; k++) {\n var val = dayset[k];\n if (!isPresent(val))\n continue;\n tmp.push(val);\n }\n var i = void 0;\n if (daypos < 0) {\n i = tmp.slice(daypos)[0];\n }\n else {\n i = tmp[daypos];\n }\n var time = timeset[timepos];\n var date = fromOrdinal(ii.yearordinal + i);\n var res = combine(date, time);\n // XXX: can this ever be in the array?\n // - compare the actual date instead?\n if (!includes(poslist, res))\n poslist.push(res);\n }\n sort(poslist);\n return poslist;\n}\n//# sourceMappingURL=poslist.js.map","import { freqIsDailyOrGreater } from '../types';\nimport { combine, fromOrdinal, MAXYEAR } from '../dateutil';\nimport Iterinfo from '../iterinfo/index';\nimport { RRule } from '../rrule';\nimport { buildTimeset } from '../parseoptions';\nimport { notEmpty, includes, isPresent } from '../helpers';\nimport { DateWithZone } from '../datewithzone';\nimport { buildPoslist } from './poslist';\nimport { DateTime } from '../datetime';\nexport function iter(iterResult, options) {\n var dtstart = options.dtstart, freq = options.freq, interval = options.interval, until = options.until, bysetpos = options.bysetpos;\n var count = options.count;\n if (count === 0 || interval === 0) {\n return emitResult(iterResult);\n }\n var counterDate = DateTime.fromDate(dtstart);\n var ii = new Iterinfo(options);\n ii.rebuild(counterDate.year, counterDate.month);\n var timeset = makeTimeset(ii, counterDate, options);\n for (;;) {\n var _a = ii.getdayset(freq)(counterDate.year, counterDate.month, counterDate.day), dayset = _a[0], start = _a[1], end = _a[2];\n var filtered = removeFilteredDays(dayset, start, end, ii, options);\n if (notEmpty(bysetpos)) {\n var poslist = buildPoslist(bysetpos, timeset, start, end, ii, dayset);\n for (var j = 0; j < poslist.length; j++) {\n var res = poslist[j];\n if (until && res > until) {\n return emitResult(iterResult);\n }\n if (res >= dtstart) {\n var rezonedDate = rezoneIfNeeded(res, options);\n if (!iterResult.accept(rezonedDate)) {\n return emitResult(iterResult);\n }\n if (count) {\n --count;\n if (!count) {\n return emitResult(iterResult);\n }\n }\n }\n }\n }\n else {\n for (var j = start; j < end; j++) {\n var currentDay = dayset[j];\n if (!isPresent(currentDay)) {\n continue;\n }\n var date = fromOrdinal(ii.yearordinal + currentDay);\n for (var k = 0; k < timeset.length; k++) {\n var time = timeset[k];\n var res = combine(date, time);\n if (until && res > until) {\n return emitResult(iterResult);\n }\n if (res >= dtstart) {\n var rezonedDate = rezoneIfNeeded(res, options);\n if (!iterResult.accept(rezonedDate)) {\n return emitResult(iterResult);\n }\n if (count) {\n --count;\n if (!count) {\n return emitResult(iterResult);\n }\n }\n }\n }\n }\n }\n if (options.interval === 0) {\n return emitResult(iterResult);\n }\n // Handle frequency and interval\n counterDate.add(options, filtered);\n if (counterDate.year > MAXYEAR) {\n return emitResult(iterResult);\n }\n if (!freqIsDailyOrGreater(freq)) {\n timeset = ii.gettimeset(freq)(counterDate.hour, counterDate.minute, counterDate.second, 0);\n }\n ii.rebuild(counterDate.year, counterDate.month);\n }\n}\nfunction isFiltered(ii, currentDay, options) {\n var bymonth = options.bymonth, byweekno = options.byweekno, byweekday = options.byweekday, byeaster = options.byeaster, bymonthday = options.bymonthday, bynmonthday = options.bynmonthday, byyearday = options.byyearday;\n return ((notEmpty(bymonth) && !includes(bymonth, ii.mmask[currentDay])) ||\n (notEmpty(byweekno) && !ii.wnomask[currentDay]) ||\n (notEmpty(byweekday) && !includes(byweekday, ii.wdaymask[currentDay])) ||\n (notEmpty(ii.nwdaymask) && !ii.nwdaymask[currentDay]) ||\n (byeaster !== null && !includes(ii.eastermask, currentDay)) ||\n ((notEmpty(bymonthday) || notEmpty(bynmonthday)) &&\n !includes(bymonthday, ii.mdaymask[currentDay]) &&\n !includes(bynmonthday, ii.nmdaymask[currentDay])) ||\n (notEmpty(byyearday) &&\n ((currentDay < ii.yearlen &&\n !includes(byyearday, currentDay + 1) &&\n !includes(byyearday, -ii.yearlen + currentDay)) ||\n (currentDay >= ii.yearlen &&\n !includes(byyearday, currentDay + 1 - ii.yearlen) &&\n !includes(byyearday, -ii.nextyearlen + currentDay - ii.yearlen)))));\n}\nfunction rezoneIfNeeded(date, options) {\n return new DateWithZone(date, options.tzid).rezonedDate();\n}\nfunction emitResult(iterResult) {\n return iterResult.getValue();\n}\nfunction removeFilteredDays(dayset, start, end, ii, options) {\n var filtered = false;\n for (var dayCounter = start; dayCounter < end; dayCounter++) {\n var currentDay = dayset[dayCounter];\n filtered = isFiltered(ii, currentDay, options);\n if (filtered)\n dayset[currentDay] = null;\n }\n return filtered;\n}\nfunction makeTimeset(ii, counterDate, options) {\n var freq = options.freq, byhour = options.byhour, byminute = options.byminute, bysecond = options.bysecond;\n if (freqIsDailyOrGreater(freq)) {\n return buildTimeset(options);\n }\n if ((freq >= RRule.HOURLY &&\n notEmpty(byhour) &&\n !includes(byhour, counterDate.hour)) ||\n (freq >= RRule.MINUTELY &&\n notEmpty(byminute) &&\n !includes(byminute, counterDate.minute)) ||\n (freq >= RRule.SECONDLY &&\n notEmpty(bysecond) &&\n !includes(bysecond, counterDate.second))) {\n return [];\n }\n return ii.gettimeset(freq)(counterDate.hour, counterDate.minute, counterDate.second, counterDate.millisecond);\n}\n//# sourceMappingURL=index.js.map","import { isValidDate } from './dateutil';\nimport IterResult from './iterresult';\nimport CallbackIterResult from './callbackiterresult';\nimport { fromText, parseText, toText, isFullyConvertible } from './nlp/index';\nimport { Frequency, } from './types';\nimport { parseOptions, initializeOptions } from './parseoptions';\nimport { parseString } from './parsestring';\nimport { optionsToString } from './optionstostring';\nimport { Cache } from './cache';\nimport { Weekday } from './weekday';\nimport { iter } from './iter/index';\n// =============================================================================\n// RRule\n// =============================================================================\nexport var Days = {\n MO: new Weekday(0),\n TU: new Weekday(1),\n WE: new Weekday(2),\n TH: new Weekday(3),\n FR: new Weekday(4),\n SA: new Weekday(5),\n SU: new Weekday(6),\n};\nexport var DEFAULT_OPTIONS = {\n freq: Frequency.YEARLY,\n dtstart: null,\n interval: 1,\n wkst: Days.MO,\n count: null,\n until: null,\n tzid: null,\n bysetpos: null,\n bymonth: null,\n bymonthday: null,\n bynmonthday: null,\n byyearday: null,\n byweekno: null,\n byweekday: null,\n bynweekday: null,\n byhour: null,\n byminute: null,\n bysecond: null,\n byeaster: null,\n};\nexport var defaultKeys = Object.keys(DEFAULT_OPTIONS);\n/**\n *\n * @param {Options?} options - see \n * - The only required option is `freq`, one of RRule.YEARLY, RRule.MONTHLY, ...\n * @constructor\n */\nvar RRule = /** @class */ (function () {\n function RRule(options, noCache) {\n if (options === void 0) { options = {}; }\n if (noCache === void 0) { noCache = false; }\n // RFC string\n this._cache = noCache ? null : new Cache();\n // used by toString()\n this.origOptions = initializeOptions(options);\n var parsedOptions = parseOptions(options).parsedOptions;\n this.options = parsedOptions;\n }\n RRule.parseText = function (text, language) {\n return parseText(text, language);\n };\n RRule.fromText = function (text, language) {\n return fromText(text, language);\n };\n RRule.fromString = function (str) {\n return new RRule(RRule.parseString(str) || undefined);\n };\n RRule.prototype._iter = function (iterResult) {\n return iter(iterResult, this.options);\n };\n RRule.prototype._cacheGet = function (what, args) {\n if (!this._cache)\n return false;\n return this._cache._cacheGet(what, args);\n };\n RRule.prototype._cacheAdd = function (what, value, args) {\n if (!this._cache)\n return;\n return this._cache._cacheAdd(what, value, args);\n };\n /**\n * @param {Function} iterator - optional function that will be called\n * on each date that is added. It can return false\n * to stop the iteration.\n * @return Array containing all recurrences.\n */\n RRule.prototype.all = function (iterator) {\n if (iterator) {\n return this._iter(new CallbackIterResult('all', {}, iterator));\n }\n var result = this._cacheGet('all');\n if (result === false) {\n result = this._iter(new IterResult('all', {}));\n this._cacheAdd('all', result);\n }\n return result;\n };\n /**\n * Returns all the occurrences of the rrule between after and before.\n * The inc keyword defines what happens if after and/or before are\n * themselves occurrences. With inc == True, they will be included in the\n * list, if they are found in the recurrence set.\n *\n * @return Array\n */\n RRule.prototype.between = function (after, before, inc, iterator) {\n if (inc === void 0) { inc = false; }\n if (!isValidDate(after) || !isValidDate(before)) {\n throw new Error('Invalid date passed in to RRule.between');\n }\n var args = {\n before: before,\n after: after,\n inc: inc,\n };\n if (iterator) {\n return this._iter(new CallbackIterResult('between', args, iterator));\n }\n var result = this._cacheGet('between', args);\n if (result === false) {\n result = this._iter(new IterResult('between', args));\n this._cacheAdd('between', result, args);\n }\n return result;\n };\n /**\n * Returns the last recurrence before the given datetime instance.\n * The inc keyword defines what happens if dt is an occurrence.\n * With inc == True, if dt itself is an occurrence, it will be returned.\n *\n * @return Date or null\n */\n RRule.prototype.before = function (dt, inc) {\n if (inc === void 0) { inc = false; }\n if (!isValidDate(dt)) {\n throw new Error('Invalid date passed in to RRule.before');\n }\n var args = { dt: dt, inc: inc };\n var result = this._cacheGet('before', args);\n if (result === false) {\n result = this._iter(new IterResult('before', args));\n this._cacheAdd('before', result, args);\n }\n return result;\n };\n /**\n * Returns the first recurrence after the given datetime instance.\n * The inc keyword defines what happens if dt is an occurrence.\n * With inc == True, if dt itself is an occurrence, it will be returned.\n *\n * @return Date or null\n */\n RRule.prototype.after = function (dt, inc) {\n if (inc === void 0) { inc = false; }\n if (!isValidDate(dt)) {\n throw new Error('Invalid date passed in to RRule.after');\n }\n var args = { dt: dt, inc: inc };\n var result = this._cacheGet('after', args);\n if (result === false) {\n result = this._iter(new IterResult('after', args));\n this._cacheAdd('after', result, args);\n }\n return result;\n };\n /**\n * Returns the number of recurrences in this set. It will have go trough\n * the whole recurrence, if this hasn't been done before.\n */\n RRule.prototype.count = function () {\n return this.all().length;\n };\n /**\n * Converts the rrule into its string representation\n *\n * @see \n * @return String\n */\n RRule.prototype.toString = function () {\n return optionsToString(this.origOptions);\n };\n /**\n * Will convert all rules described in nlp:ToText\n * to text.\n */\n RRule.prototype.toText = function (gettext, language, dateFormatter) {\n return toText(this, gettext, language, dateFormatter);\n };\n RRule.prototype.isFullyConvertibleToText = function () {\n return isFullyConvertible(this);\n };\n /**\n * @return a RRule instance with the same freq and options\n * as this one (cache is not cloned)\n */\n RRule.prototype.clone = function () {\n return new RRule(this.origOptions);\n };\n // RRule class 'constants'\n RRule.FREQUENCIES = [\n 'YEARLY',\n 'MONTHLY',\n 'WEEKLY',\n 'DAILY',\n 'HOURLY',\n 'MINUTELY',\n 'SECONDLY',\n ];\n RRule.YEARLY = Frequency.YEARLY;\n RRule.MONTHLY = Frequency.MONTHLY;\n RRule.WEEKLY = Frequency.WEEKLY;\n RRule.DAILY = Frequency.DAILY;\n RRule.HOURLY = Frequency.HOURLY;\n RRule.MINUTELY = Frequency.MINUTELY;\n RRule.SECONDLY = Frequency.SECONDLY;\n RRule.MO = Days.MO;\n RRule.TU = Days.TU;\n RRule.WE = Days.WE;\n RRule.TH = Days.TH;\n RRule.FR = Days.FR;\n RRule.SA = Days.SA;\n RRule.SU = Days.SU;\n RRule.parseString = parseString;\n RRule.optionsToString = optionsToString;\n return RRule;\n}());\nexport { RRule };\n//# sourceMappingURL=rrule.js.map","import { __assign } from \"tslib\";\nimport { RRule } from './rrule';\nimport { RRuleSet } from './rruleset';\nimport { untilStringToDate } from './dateutil';\nimport { includes, split } from './helpers';\nimport { parseString, parseDtstart } from './parsestring';\n/**\n * RRuleStr\n * To parse a set of rrule strings\n */\nvar DEFAULT_OPTIONS = {\n dtstart: null,\n cache: false,\n unfold: false,\n forceset: false,\n compatible: false,\n tzid: null,\n};\nexport function parseInput(s, options) {\n var rrulevals = [];\n var rdatevals = [];\n var exrulevals = [];\n var exdatevals = [];\n var parsedDtstart = parseDtstart(s);\n var dtstart = parsedDtstart.dtstart;\n var tzid = parsedDtstart.tzid;\n var lines = splitIntoLines(s, options.unfold);\n lines.forEach(function (line) {\n var _a;\n if (!line)\n return;\n var _b = breakDownLine(line), name = _b.name, parms = _b.parms, value = _b.value;\n switch (name.toUpperCase()) {\n case 'RRULE':\n if (parms.length) {\n throw new Error(\"unsupported RRULE parm: \".concat(parms.join(',')));\n }\n rrulevals.push(parseString(line));\n break;\n case 'RDATE':\n var _c = (_a = /RDATE(?:;TZID=([^:=]+))?/i.exec(line)) !== null && _a !== void 0 ? _a : [], rdateTzid = _c[1];\n if (rdateTzid && !tzid) {\n tzid = rdateTzid;\n }\n rdatevals = rdatevals.concat(parseRDate(value, parms));\n break;\n case 'EXRULE':\n if (parms.length) {\n throw new Error(\"unsupported EXRULE parm: \".concat(parms.join(',')));\n }\n exrulevals.push(parseString(value));\n break;\n case 'EXDATE':\n exdatevals = exdatevals.concat(parseRDate(value, parms));\n break;\n case 'DTSTART':\n break;\n default:\n throw new Error('unsupported property: ' + name);\n }\n });\n return {\n dtstart: dtstart,\n tzid: tzid,\n rrulevals: rrulevals,\n rdatevals: rdatevals,\n exrulevals: exrulevals,\n exdatevals: exdatevals,\n };\n}\nfunction buildRule(s, options) {\n var _a = parseInput(s, options), rrulevals = _a.rrulevals, rdatevals = _a.rdatevals, exrulevals = _a.exrulevals, exdatevals = _a.exdatevals, dtstart = _a.dtstart, tzid = _a.tzid;\n var noCache = options.cache === false;\n if (options.compatible) {\n options.forceset = true;\n options.unfold = true;\n }\n if (options.forceset ||\n rrulevals.length > 1 ||\n rdatevals.length ||\n exrulevals.length ||\n exdatevals.length) {\n var rset_1 = new RRuleSet(noCache);\n rset_1.dtstart(dtstart);\n rset_1.tzid(tzid || undefined);\n rrulevals.forEach(function (val) {\n rset_1.rrule(new RRule(groomRruleOptions(val, dtstart, tzid), noCache));\n });\n rdatevals.forEach(function (date) {\n rset_1.rdate(date);\n });\n exrulevals.forEach(function (val) {\n rset_1.exrule(new RRule(groomRruleOptions(val, dtstart, tzid), noCache));\n });\n exdatevals.forEach(function (date) {\n rset_1.exdate(date);\n });\n if (options.compatible && options.dtstart)\n rset_1.rdate(dtstart);\n return rset_1;\n }\n var val = rrulevals[0] || {};\n return new RRule(groomRruleOptions(val, val.dtstart || options.dtstart || dtstart, val.tzid || options.tzid || tzid), noCache);\n}\nexport function rrulestr(s, options) {\n if (options === void 0) { options = {}; }\n return buildRule(s, initializeOptions(options));\n}\nfunction groomRruleOptions(val, dtstart, tzid) {\n return __assign(__assign({}, val), { dtstart: dtstart, tzid: tzid });\n}\nfunction initializeOptions(options) {\n var invalid = [];\n var keys = Object.keys(options);\n var defaultKeys = Object.keys(DEFAULT_OPTIONS);\n keys.forEach(function (key) {\n if (!includes(defaultKeys, key))\n invalid.push(key);\n });\n if (invalid.length) {\n throw new Error('Invalid options: ' + invalid.join(', '));\n }\n return __assign(__assign({}, DEFAULT_OPTIONS), options);\n}\nfunction extractName(line) {\n if (line.indexOf(':') === -1) {\n return {\n name: 'RRULE',\n value: line,\n };\n }\n var _a = split(line, ':', 1), name = _a[0], value = _a[1];\n return {\n name: name,\n value: value,\n };\n}\nfunction breakDownLine(line) {\n var _a = extractName(line), name = _a.name, value = _a.value;\n var parms = name.split(';');\n if (!parms)\n throw new Error('empty property name');\n return {\n name: parms[0].toUpperCase(),\n parms: parms.slice(1),\n value: value,\n };\n}\nfunction splitIntoLines(s, unfold) {\n if (unfold === void 0) { unfold = false; }\n s = s && s.trim();\n if (!s)\n throw new Error('Invalid empty string');\n // More info about 'unfold' option\n // Go head to http://www.ietf.org/rfc/rfc2445.txt\n if (!unfold) {\n return s.split(/\\s/);\n }\n var lines = s.split('\\n');\n var i = 0;\n while (i < lines.length) {\n // TODO\n var line = (lines[i] = lines[i].replace(/\\s+$/g, ''));\n if (!line) {\n lines.splice(i, 1);\n }\n else if (i > 0 && line[0] === ' ') {\n lines[i - 1] += line.slice(1);\n lines.splice(i, 1);\n }\n else {\n i += 1;\n }\n }\n return lines;\n}\nfunction validateDateParm(parms) {\n parms.forEach(function (parm) {\n if (!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(parm)) {\n throw new Error('unsupported RDATE/EXDATE parm: ' + parm);\n }\n });\n}\nfunction parseRDate(rdateval, parms) {\n validateDateParm(parms);\n return rdateval.split(',').map(function (datestr) { return untilStringToDate(datestr); });\n}\n//# sourceMappingURL=rrulestr.js.map","import { __extends } from \"tslib\";\nimport { RRule } from './rrule';\nimport { sort, timeToUntilString } from './dateutil';\nimport { includes } from './helpers';\nimport { iterSet } from './iterset';\nimport { rrulestr } from './rrulestr';\nimport { optionsToString } from './optionstostring';\nfunction createGetterSetter(fieldName) {\n var _this = this;\n return function (field) {\n if (field !== undefined) {\n _this[\"_\".concat(fieldName)] = field;\n }\n if (_this[\"_\".concat(fieldName)] !== undefined) {\n return _this[\"_\".concat(fieldName)];\n }\n for (var i = 0; i < _this._rrule.length; i++) {\n var field_1 = _this._rrule[i].origOptions[fieldName];\n if (field_1) {\n return field_1;\n }\n }\n };\n}\nvar RRuleSet = /** @class */ (function (_super) {\n __extends(RRuleSet, _super);\n /**\n *\n * @param {Boolean?} noCache\n * The same stratagy as RRule on cache, default to false\n * @constructor\n */\n function RRuleSet(noCache) {\n if (noCache === void 0) { noCache = false; }\n var _this = _super.call(this, {}, noCache) || this;\n _this.dtstart = createGetterSetter.apply(_this, ['dtstart']);\n _this.tzid = createGetterSetter.apply(_this, ['tzid']);\n _this._rrule = [];\n _this._rdate = [];\n _this._exrule = [];\n _this._exdate = [];\n return _this;\n }\n RRuleSet.prototype._iter = function (iterResult) {\n return iterSet(iterResult, this._rrule, this._exrule, this._rdate, this._exdate, this.tzid());\n };\n /**\n * Adds an RRule to the set\n *\n * @param {RRule}\n */\n RRuleSet.prototype.rrule = function (rrule) {\n _addRule(rrule, this._rrule);\n };\n /**\n * Adds an EXRULE to the set\n *\n * @param {RRule}\n */\n RRuleSet.prototype.exrule = function (rrule) {\n _addRule(rrule, this._exrule);\n };\n /**\n * Adds an RDate to the set\n *\n * @param {Date}\n */\n RRuleSet.prototype.rdate = function (date) {\n _addDate(date, this._rdate);\n };\n /**\n * Adds an EXDATE to the set\n *\n * @param {Date}\n */\n RRuleSet.prototype.exdate = function (date) {\n _addDate(date, this._exdate);\n };\n /**\n * Get list of included rrules in this recurrence set.\n *\n * @return List of rrules\n */\n RRuleSet.prototype.rrules = function () {\n return this._rrule.map(function (e) { return rrulestr(e.toString()); });\n };\n /**\n * Get list of excluded rrules in this recurrence set.\n *\n * @return List of exrules\n */\n RRuleSet.prototype.exrules = function () {\n return this._exrule.map(function (e) { return rrulestr(e.toString()); });\n };\n /**\n * Get list of included datetimes in this recurrence set.\n *\n * @return List of rdates\n */\n RRuleSet.prototype.rdates = function () {\n return this._rdate.map(function (e) { return new Date(e.getTime()); });\n };\n /**\n * Get list of included datetimes in this recurrence set.\n *\n * @return List of exdates\n */\n RRuleSet.prototype.exdates = function () {\n return this._exdate.map(function (e) { return new Date(e.getTime()); });\n };\n RRuleSet.prototype.valueOf = function () {\n var result = [];\n if (!this._rrule.length && this._dtstart) {\n result = result.concat(optionsToString({ dtstart: this._dtstart }));\n }\n this._rrule.forEach(function (rrule) {\n result = result.concat(rrule.toString().split('\\n'));\n });\n this._exrule.forEach(function (exrule) {\n result = result.concat(exrule\n .toString()\n .split('\\n')\n .map(function (line) { return line.replace(/^RRULE:/, 'EXRULE:'); })\n .filter(function (line) { return !/^DTSTART/.test(line); }));\n });\n if (this._rdate.length) {\n result.push(rdatesToString('RDATE', this._rdate, this.tzid()));\n }\n if (this._exdate.length) {\n result.push(rdatesToString('EXDATE', this._exdate, this.tzid()));\n }\n return result;\n };\n /**\n * to generate recurrence field such as:\n * DTSTART:19970902T010000Z\n * RRULE:FREQ=YEARLY;COUNT=2;BYDAY=TU\n * RRULE:FREQ=YEARLY;COUNT=1;BYDAY=TH\n */\n RRuleSet.prototype.toString = function () {\n return this.valueOf().join('\\n');\n };\n /**\n * Create a new RRuleSet Object completely base on current instance\n */\n RRuleSet.prototype.clone = function () {\n var rrs = new RRuleSet(!!this._cache);\n this._rrule.forEach(function (rule) { return rrs.rrule(rule.clone()); });\n this._exrule.forEach(function (rule) { return rrs.exrule(rule.clone()); });\n this._rdate.forEach(function (date) { return rrs.rdate(new Date(date.getTime())); });\n this._exdate.forEach(function (date) { return rrs.exdate(new Date(date.getTime())); });\n return rrs;\n };\n return RRuleSet;\n}(RRule));\nexport { RRuleSet };\nfunction _addRule(rrule, collection) {\n if (!(rrule instanceof RRule)) {\n throw new TypeError(String(rrule) + ' is not RRule instance');\n }\n if (!includes(collection.map(String), String(rrule))) {\n collection.push(rrule);\n }\n}\nfunction _addDate(date, collection) {\n if (!(date instanceof Date)) {\n throw new TypeError(String(date) + ' is not Date instance');\n }\n if (!includes(collection.map(Number), Number(date))) {\n collection.push(date);\n sort(collection);\n }\n}\nfunction rdatesToString(param, rdates, tzid) {\n var isUTC = !tzid || tzid.toUpperCase() === 'UTC';\n var header = isUTC ? \"\".concat(param, \":\") : \"\".concat(param, \";TZID=\").concat(tzid, \":\");\n var dateString = rdates\n .map(function (rdate) { return timeToUntilString(rdate.valueOf(), isUTC); })\n .join(',');\n return \"\".concat(header).concat(dateString);\n}\n//# sourceMappingURL=rruleset.js.map","import { DateWithZone } from './datewithzone';\nimport { iter } from './iter';\nimport { sort } from './dateutil';\nexport function iterSet(iterResult, _rrule, _exrule, _rdate, _exdate, tzid) {\n var _exdateHash = {};\n var _accept = iterResult.accept;\n function evalExdate(after, before) {\n _exrule.forEach(function (rrule) {\n rrule.between(after, before, true).forEach(function (date) {\n _exdateHash[Number(date)] = true;\n });\n });\n }\n _exdate.forEach(function (date) {\n var zonedDate = new DateWithZone(date, tzid).rezonedDate();\n _exdateHash[Number(zonedDate)] = true;\n });\n iterResult.accept = function (date) {\n var dt = Number(date);\n if (isNaN(dt))\n return _accept.call(this, date);\n if (!_exdateHash[dt]) {\n evalExdate(new Date(dt - 1), new Date(dt + 1));\n if (!_exdateHash[dt]) {\n _exdateHash[dt] = true;\n return _accept.call(this, date);\n }\n }\n return true;\n };\n if (iterResult.method === 'between') {\n evalExdate(iterResult.args.after, iterResult.args.before);\n iterResult.accept = function (date) {\n var dt = Number(date);\n if (!_exdateHash[dt]) {\n _exdateHash[dt] = true;\n return _accept.call(this, date);\n }\n return true;\n };\n }\n for (var i = 0; i < _rdate.length; i++) {\n var zonedDate = new DateWithZone(_rdate[i], tzid).rezonedDate();\n if (!iterResult.accept(new Date(zonedDate.getTime())))\n break;\n }\n _rrule.forEach(function (rrule) {\n iter(iterResult, rrule.options);\n });\n var res = iterResult._result;\n sort(res);\n switch (iterResult.method) {\n case 'all':\n case 'between':\n return res;\n case 'before':\n return ((res.length && res[res.length - 1]) || null);\n case 'after':\n default:\n return ((res.length && res[0]) || null);\n }\n}\n//# sourceMappingURL=iterset.js.map","interface IViewPosition{\r\n\ttop: number;\r\n\tleft: number;\r\n}\r\n\r\ninterface IViewBox extends IViewPosition{\r\n\twidth: number;\r\n\theight: number;\r\n\tbottom: number;\r\n\tright: number;\r\n}\r\n\r\nexport class Tooltip {\r\n\tprivate _root: HTMLElement;\r\n\tprivate _tooltipNode: HTMLElement | null;\r\n\tprivate _scheduler: any;\r\n\r\n\tconstructor(scheduler: any){\r\n\t\tthis._scheduler = scheduler;\r\n\t}\r\n\r\n\tgetNode() : HTMLElement {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tif (!this._tooltipNode){\r\n\t\t\tthis._tooltipNode = document.createElement(\"div\");\r\n\t\t\tthis._tooltipNode.className = \"dhtmlXTooltip scheduler_tooltip tooltip\";\r\n\r\n\t\t\tscheduler._waiAria.tooltipAttr(this._tooltipNode);\r\n\t\t}\r\n\t\tif(scheduler.config.rtl){\r\n\t\t\tthis._tooltipNode.classList.add(\"dhtmlXTooltip_rtl\");\r\n\t\t} else{\r\n\t\t\tthis._tooltipNode.classList.remove(\"dhtmlXTooltip_rtl\");\r\n\t\t}\r\n\t\treturn this._tooltipNode;\r\n\t}\r\n\r\n\tsetViewport(node: HTMLElement):Tooltip{\r\n\t\tthis._root = node;\r\n\t\treturn this;\r\n\t}\r\n\r\n\tshow(left: number, top: number): Tooltip;\r\n\tshow(event: MouseEvent): Tooltip;\r\n\tshow(left: number | MouseEvent, top?: number): Tooltip {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tconst container = document.body;\r\n\t\tconst node = this.getNode();\r\n\r\n\t\tif(!domHelpers.isChildOf(node, container)){\r\n\t\t\tthis.hide();\r\n\t\t\tcontainer.appendChild(node);\r\n\t\t}\r\n\r\n\t\tif (this._isLikeMouseEvent(left)) {\r\n\t\t\tconst position = this._calculateTooltipPosition(left as MouseEvent);\r\n\t\t\ttop = position.top;\r\n\t\t\tleft = position.left;\r\n\t\t}\r\n\r\n\t\tnode.style.top = top + \"px\";\r\n\t\tnode.style.left = left + \"px\";\r\n\r\n\t\tscheduler._waiAria.tooltipVisibleAttr(node);\r\n\t\treturn this;\r\n\t}\r\n\thide() : Tooltip{\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst node = this.getNode();\r\n\t\tif(node && node.parentNode){\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t}\r\n\t\tscheduler._waiAria.tooltipHiddenAttr(node);\r\n\t\treturn this;\r\n\t}\r\n\r\n\tsetContent(html: string) : Tooltip{\r\n\t\tconst node = this.getNode();\r\n\t\tnode.innerHTML = html;\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// it is for salesforce, because it proxies event to it own events\r\n\tprivate _isLikeMouseEvent(event: any): boolean {\r\n\t\tif (!event || typeof event !== \"object\") {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn \"clientX\" in event && \"clientY\" in event;\r\n\t}\r\n\r\n\tprivate _getViewPort() : HTMLElement {\r\n\t\treturn this._root || document.body;\r\n\t}\r\n\r\n\r\n\tprivate _calculateTooltipPosition(event: MouseEvent): IViewPosition{\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\t// top/left coordinates inside the viewport by mouse position\r\n\t\tconst viewport = this._getViewPortSize();\r\n\t\tconst tooltipNode = this.getNode();\r\n\t\tconst tooltip: IViewBox = {\r\n\t\t\ttop:0,\r\n\t\t\tleft: 0,\r\n\t\t\twidth: tooltipNode.offsetWidth,\r\n\t\t\theight: tooltipNode.offsetHeight,\r\n\t\t\tbottom: 0,\r\n\t\t\tright: 0\r\n\t\t};\r\n\r\n\t\tconst offsetX = scheduler.config.tooltip_offset_x;\r\n\t\tconst offsetY = scheduler.config.tooltip_offset_y;\r\n\r\n\t\tconst container = document.body;\r\n\t\tconst mouse = domHelpers.getRelativeEventPosition(event, container);\r\n\t\tconst containerPos = domHelpers.getNodePosition(container);\r\n\t\tmouse.y += containerPos.y; // to fix margin collapsing\r\n\r\n\t\ttooltip.top = mouse.y;\r\n\t\ttooltip.left = mouse.x;\r\n\t\ttooltip.top += offsetY;\r\n\t\ttooltip.left += offsetX;\r\n\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\ttooltip.right = tooltip.left + tooltip.width;\r\n\r\n\t\tconst scrollTop = window.scrollY + container.scrollTop; // to fix margin collapsing\r\n\t\t// edge cases when the tooltip element can be partially hidden by edges of the viewport\r\n\t\tif(tooltip.top < viewport.top - scrollTop){\r\n\t\t\ttooltip.top = viewport.top;\r\n\t\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\t}else if(tooltip.bottom > viewport.bottom){\r\n\t\t\ttooltip.bottom = viewport.bottom;\r\n\t\t\ttooltip.top = tooltip.bottom - tooltip.height;\r\n\t\t}\r\n\r\n\t\tif(tooltip.left < viewport.left){\r\n\t\t\ttooltip.left = viewport.left;\r\n\t\t\ttooltip.right = viewport.left + tooltip.width;\r\n\t\t}else if(tooltip.right > viewport.right){\r\n\t\t\ttooltip.right = viewport.right;\r\n\t\t\ttooltip.left = tooltip.right - tooltip.width;\r\n\t\t}\r\n\r\n\t\tif(mouse.x >= tooltip.left && mouse.x <= tooltip.right) {\r\n\t\t\ttooltip.left = mouse.x - tooltip.width - offsetX;\r\n\t\t\ttooltip.right = tooltip.left + tooltip.width;\r\n\t\t}\r\n\r\n\t\tif(mouse.y >= tooltip.top && mouse.y <= tooltip.bottom) {\r\n\t\t\ttooltip.top = mouse.y - tooltip.height - offsetY;\r\n\t\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\t}\r\n\r\n\t\treturn tooltip;\r\n\t}\r\n\r\n\tprivate _getViewPortSize() : IViewBox {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tconst container = this._getViewPort();\r\n\t\tlet viewport = container;\r\n\t\tlet scrollTop = window.scrollY + document.body.scrollTop;\r\n\t\tlet scrollLeft = window.scrollX + document.body.scrollLeft;\r\n\t\tlet pos;\r\n\t\t// support for the initial tooltip mode where the tooltip element was attached to the data area of scheduler\r\n\t\tif(container === scheduler.$event_data){\r\n\t\t\tviewport = scheduler.$event;\r\n\t\t\tscrollTop = 0;\r\n\t\t\tscrollLeft = 0;\r\n\t\t\tpos = domHelpers.getNodePosition(scheduler.$event);\r\n\t\t}else{\r\n\t\t\tpos = domHelpers.getNodePosition(viewport);\r\n\t\t}\r\n\t\treturn {\r\n\t\t\tleft:pos.x + scrollLeft,\r\n\t\t\ttop: pos.y + scrollTop,\r\n\t\t\twidth: pos.width,\r\n\t\t\theight: pos.height,\r\n\t\t\tbottom: pos.y + pos.height + scrollTop,\r\n\t\t\tright: pos.x + pos.width + scrollLeft\r\n\t\t};\r\n\t}\r\n}\r\n","import * as utils from \"../../core/utils/utils\";\r\nimport { Tooltip } from \"./tooltip\";\r\n\r\ninterface ITrackerTarget {\r\n\tselector: string;\r\n\tonmouseenter: (event: MouseEvent, node: HTMLElement) => void;\r\n\tonmousemove: (event: MouseEvent, node: HTMLElement) => void;\r\n\tonmouseleave: (event: MouseEvent, node: HTMLElement) => void;\r\n\tglobal: boolean;\r\n}\r\n\r\ninterface ITooltipConfig {\r\n\tselector: string;\r\n\thtml: (event: MouseEvent, node: HTMLElement) => string;\r\n\tglobal: boolean;\r\n}\r\n\r\nexport class TooltipManager{\r\n\ttooltip: Tooltip;\r\n\tprotected _domEvents: any;\r\n\tprivate _listeners: object = {};\r\n\tprivate _scheduler: any;\r\n\tprivate delayShow: any;\r\n\tprivate delayHide: any;\r\n\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.tooltip = new Tooltip(scheduler);\r\n\t\tthis._scheduler = scheduler;\r\n\t\tthis._domEvents = scheduler._createDomEventScope();\r\n\t\tthis._initDelayedFunctions();\r\n\t}\r\n\r\n\tdestructor(): void{\r\n\t\tthis.tooltip.hide();\r\n\t\tthis._domEvents.detachAll();\r\n\t}\r\n\thideTooltip(): void{\r\n\t\tthis.delayHide();\r\n\t}\r\n\tattach(config: ITrackerTarget): void {\r\n\t\tlet root = document.body;\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tif(!config.global){\r\n\t\t\troot = scheduler.$root;\r\n\t\t}\r\n\r\n\t\tlet watchableTarget = null;\r\n\t\tconst handler = (event) => {\r\n\t\t\tconst eventTarget = domHelpers.getTargetNode(event);\r\n\t\t\tconst targetNode = domHelpers.closest(eventTarget, config.selector);\r\n\t\t\tif(domHelpers.isChildOf(eventTarget, this.tooltip.getNode())){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tconst doOnMouseEnter = () => {\r\n\t\t\t\twatchableTarget = targetNode;\r\n\t\t\t\tconfig.onmouseenter(event, targetNode);\r\n\t\t\t};\r\n\t\t\t// GS-2377: to show tooltip after touch and hide it when touch is outside the events\r\n\t\t\tif (scheduler._mobile && scheduler.config.touch_tooltip){\r\n\t\t\t\tif(targetNode){\r\n\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tconfig.onmouseleave(event, targetNode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(watchableTarget){\r\n\t\t\t\tif(targetNode && targetNode === watchableTarget){\r\n\t\t\t\t\tconfig.onmousemove(event, targetNode);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconfig.onmouseleave(event, watchableTarget);\r\n\t\t\t\t\twatchableTarget = null;\r\n\r\n\t\t\t\t\tif(targetNode && targetNode !== watchableTarget){\r\n\t\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(targetNode){\r\n\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.detach(config.selector);\r\n\t\tthis._domEvents.attach(root, \"mousemove\", handler);\r\n\t\tthis._listeners[config.selector] = {\r\n\t\t\tnode: root,\r\n\t\t\thandler\r\n\t\t};\r\n\t}\r\n\r\n\tdetach(selector: string): void {\r\n\t\tconst listener = this._listeners[selector];\r\n\t\tif(listener){\r\n\t\t\tthis._domEvents.detach(listener.node, \"mousemove\", listener.handler);\r\n\t\t}\r\n\t}\r\n\r\n\ttooltipFor(config: ITooltipConfig): void {\r\n\t\tconst cloneDomEvent = (event: MouseEvent) => {\r\n\t\t\tlet clone = event;\r\n\t\t\t// making events survive timeout in ie\r\n\t\t\t// tslint:disable-next-line no-string-literal\r\n\t\t\tif(document[\"createEventObject\"] && !document.createEvent){\r\n\t\t\t\t// tslint:disable-next-line no-string-literal\r\n\t\t\t\tclone = document[\"createEventObject\"](event);\r\n\t\t\t}\r\n\t\t\treturn clone;\r\n\t\t};\r\n\t\tthis._initDelayedFunctions();\r\n\t\tthis.attach({\r\n\t\t\tselector: config.selector,\r\n\t\t\tglobal: config.global,\r\n\t\t\tonmouseenter:(event: MouseEvent, node: HTMLElement) => {\r\n\t\t\t\tconst html = config.html(event, node);\r\n\t\t\t\tif(html){\r\n\t\t\t\t\tthis.delayShow(cloneDomEvent(event), html);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonmousemove:(event: MouseEvent, node: HTMLElement) => {\r\n\t\t\t\tconst html = config.html(event, node);\r\n\t\t\t\tif(html){\r\n\t\t\t\t\tthis.delayShow(cloneDomEvent(event), html);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\t\t\tthis.delayHide();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonmouseleave:() => {\r\n\t\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\t\tthis.delayHide();\r\n\t\t\t},\r\n\t\t});\r\n\t}\r\n\r\n\tprivate _initDelayedFunctions(){\r\n\t\tconst scheduler = this._scheduler;\r\n\t\t// reset delayed functions in order to apply current values of tooltip_timeout\r\n\t\tif(this.delayShow){\r\n\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t}\r\n\t\tif(this.delayHide){\r\n\t\t\tthis.delayHide.$cancelTimeout();\r\n\t\t}\r\n\t\tthis.tooltip.hide();\r\n\t\t\r\n\t\tthis.delayShow = (utils as any).default.delay((event: MouseEvent, html: string) => {\r\n\t\t\tif(scheduler.callEvent(\"onBeforeTooltip\", [event]) === false) {\r\n\t\t\t\tthis.tooltip.hide();\r\n\t\t\t} else {\r\n\t\t\t\tthis.tooltip.setContent(html);\r\n\t\t\t\tthis.tooltip.show(event);\r\n\t\t\t}\r\n\t\t}, scheduler.config.tooltip_timeout || 1);\r\n\r\n\t\tthis.delayHide = (utils as any).default.delay(() => {\r\n\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\tthis.tooltip.hide();\r\n\t\t}, scheduler.config.tooltip_hide_timeout || 1);\r\n\t}\r\n\r\n}","import active_links from \"./active_links\";\r\nimport agenda_legacy from \"./agenda_legacy_view\";\r\nimport agenda_view from \"./agenda\";\r\nimport all_timed from \"./all_timed\";\r\nimport collision from \"./collision\";\r\nimport container_autoresize from \"./container_autoresize\";\r\nimport cookie from \"./cookie\";\r\nimport daytimeline_restricted from \"./restricted_extensions/daytimeline\";\r\nimport drag_between_restricted from \"./restricted_extensions/drag_between\";\r\nimport editors from \"./editors\";\r\nimport expand from \"./expand\";\r\nimport grid_view from \"./restricted_extensions/grid_view\";\r\nimport html_templates from \"./html_templates\";\r\nimport key_nav from \"./key_nav\";\r\nimport layer from \"./layer\";\r\nimport limit from \"./limit\";\r\nimport map_view from \"./map_view\";\r\nimport minical from \"./minical\";\r\nimport monthheight from \"./monthheight\";\r\nimport multisection_restricted from \"./restricted_extensions/multisection\";\r\nimport multiselect from \"./multiselect\";\r\nimport multisource from \"./multisource\";\r\nimport mvc from \"./mvc\";\r\nimport outerdrag from \"./outerdrag\";\r\nimport pdf from \"./pdf\";\r\nimport quick_info from \"./quick_info\";\r\nimport readonly from \"./readonly\";\r\nimport recurring from \"./recurring\";\r\nimport recurring_legacy from \"./recurring_legacy\";\r\nimport serialize from \"./serialize\";\r\nimport timeline_restricted from \"./restricted_extensions/timeline\";\r\nimport tooltip from \"./tooltip\";\r\nimport treetimeline_restricted from \"./restricted_extensions/treetimeline\";\r\nimport units_restricted from \"./restricted_extensions/units\";\r\nimport url from \"./url\";\r\nimport week_agenda_restricted from \"./restricted_extensions/week_agenda\";\r\nimport wp from \"./wp\";\r\nimport year_view from \"./year_view\";\r\nimport export_api from \"./export_api\";\r\n\r\nexport default {\r\n\tactive_links,\r\n\tagenda_legacy,\r\n\tagenda_view,\r\n\tall_timed,\r\n\tcollision,\r\n\tcontainer_autoresize,\r\n\tcookie,\r\n\tdaytimeline: daytimeline_restricted,\r\n\tdrag_between: drag_between_restricted,\r\n\teditors,\r\n\texpand,\r\n\texport_api,\r\n\tgrid_view,\r\n\thtml_templates,\r\n\tkey_nav,\r\n\tlayer,\r\n\tlimit,\r\n\tmap_view,\r\n\tminical,\r\n\tmonthheight,\r\n\tmultisection: multisection_restricted,\r\n\tmultiselect,\r\n\tmultisource,\r\n\tmvc,\r\n\touterdrag,\r\n\tpdf,\r\n\tquick_info,\r\n\treadonly,\r\n\trecurring,\r\n\trecurring_legacy,\r\n\tserialize,\r\n\ttimeline: timeline_restricted,\r\n\ttooltip,\r\n\ttreetimeline: treetimeline_restricted,\r\n\tunits: units_restricted,\r\n\turl,\r\n\tweek_agenda: week_agenda_restricted,\r\n\twp,\r\n\tyear_view\r\n};","export default function(scheduler){\r\n\r\nscheduler.config.active_link_view = \"day\";\r\nscheduler._active_link_click = function(e){\r\n\tvar start = e.target;\r\n\tvar to = start.getAttribute(\"data-link-date\");\r\n\tvar s_d = scheduler.date.str_to_date(scheduler.config.api_date, false, true);\r\n\tif (to) {\r\n\t\tscheduler.setCurrentView(s_d(to), scheduler.config.active_link_view);\r\n\t\tif (e && e.preventDefault)\r\n\t\t\te.preventDefault();\r\n\t\treturn false;\r\n\t}\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar do_wrapper = function(key, fullname){\r\n\t\tfullname = fullname || (key+\"_scale_date\");\r\n\r\n\t\tif(!scheduler.templates['_active_links_old_'+ fullname]){\r\n\t\t\tscheduler.templates['_active_links_old_'+ fullname] = scheduler.templates[fullname];\r\n\t\t}\r\n\t\tvar week_x = scheduler.templates['_active_links_old_'+ fullname];\r\n\t\tvar d_s = scheduler.date.date_to_str(scheduler.config.api_date);\r\n\t\tscheduler.templates[fullname] = function(date) {\r\n\t\t\treturn \"\" + week_x(date) + \"\";\r\n\t\t};\r\n\t};\r\n\r\n\tdo_wrapper(\"week\");\r\n\tdo_wrapper(\"\", \"month_day\");\r\n\tif (this.matrix){\r\n\t\tfor (var key in this.matrix)\r\n\t\t\tdo_wrapper(key);\r\n\t}\r\n\r\n\tthis._detachDomEvent(this._obj, \"click\", scheduler._active_link_click);\r\n\tscheduler.event(this._obj, \"click\", scheduler._active_link_click);\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.date.add_agenda_legacy = function(date){\r\n\treturn scheduler.date.add(date, 1, \"year\");\r\n};\r\n\r\nscheduler.templates.agenda_legacy_time = function(start,end,ev){\r\n\tif (ev._timed)\r\n\t\treturn this.day_date(ev.start_date, ev.end_date, ev)+\" \"+this.event_date(start);\r\n\telse\r\n\t\treturn scheduler.templates.day_date(start)+\" – \"+scheduler.templates.day_date(end);\r\n};\r\nscheduler.templates.agenda_legacy_text = function(start,end,event){\r\n\treturn event.text;\r\n};\r\nscheduler.templates.agenda_legacy_date = function(){ return \"\"; };\r\n\r\nscheduler.date.agenda_legacy_start=function(){ return scheduler.date.date_part(scheduler._currentDate()); };\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function() {\r\n\tvar old_dblclick_dhx_cal_data = scheduler.dblclick_dhx_cal_data;\r\n\tscheduler.dblclick_dhx_cal_data = function() {\r\n\t\tif (this._mode == \"agenda_legacy\") {\r\n\t\t\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\t\t\tthis.addEventNow();\r\n\t\t} else {\r\n\t\t\tif (old_dblclick_dhx_cal_data)\r\n\t\t\t\treturn old_dblclick_dhx_cal_data.apply(this, arguments);\r\n\t\t}\r\n\t};\r\n\r\n\r\n\tvar old = scheduler.render_data;\r\n\tscheduler.render_data=function(evs){\r\n\t\tif (this._mode == \"agenda_legacy\")\r\n\t\t\tfill_agenda_tab();\r\n\t\telse\r\n\t\t\treturn old.apply(this,arguments);\r\n\t};\r\n\r\n\tvar old_render_view_data = scheduler.render_view_data;\r\n\tscheduler.render_view_data = function(){\r\n\t\tif(this._mode == \"agenda_legacy\") {\r\n\t\t\tscheduler._agendaScrollTop = scheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop;\r\n\t\t\tscheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop = 0;\r\n\t\t}\r\n\t\treturn old_render_view_data.apply(this,arguments);\r\n\t};\r\n\r\n\r\n\r\n\tfunction set_full_view(mode){\r\n\t\tif (mode){\r\n\t\t\tvar l = scheduler.locale.labels;\r\n\r\n\t\t\tvar rowAttr = scheduler._waiAria.agendaHeadAttrString();\r\n\t\t\tvar dateHeader = scheduler._waiAria.agendaHeadDateString(l.date);\r\n\t\t\tvar descriptionHeader = scheduler._waiAria.agendaHeadDescriptionString(l.description);\r\n\r\n\t\t\tscheduler._els[\"dhx_cal_header\"][0].innerHTML=\"
\" +\r\n\t\t\t\t\"
\"+l.date+\"
\" +\r\n\t\t\t\t\"\"+l.description+\"\" +\r\n\t\t\t\t\"
\";\r\n\t\t\tscheduler._table_view=true;\r\n\t\t\tscheduler.set_sizes();\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fill_agenda_tab(){\r\n\t\t//select events for which data need to be printed\r\n\r\n\t\tvar events = scheduler.get_visible_events();\r\n\t\tevents.sort(function(a,b){ return a.start_date>b.start_date?1:-1;});\r\n\r\n\t\tvar tableAttr = scheduler._waiAria.agendaDataAttrString();\r\n\t\tvar agendaEventAttrString;\r\n\t\t//generate html for the view\r\n\t\tvar html=\"
\";\r\n\t\tfor (var i=0; i
\"+\r\n\t\t\t\t\t(scheduler.config.rtl ? scheduler.templates.agenda_time(ev.end_date,ev.start_date, ev):scheduler.templates.agenda_time(ev.start_date, ev.end_date,ev))+\r\n\t\t\t\t\t\"
\";\r\n\t\t\thtml+=`
\r\n\t\t\t\r\n\t\t\t
`;\r\n\t\t\thtml+=\"\"+scheduler.templates.agenda_text(ev.start_date, ev.end_date, ev)+\"
\";\r\n\t\t}\r\n\t\thtml+=\"
\";\r\n\r\n\t\t//render html\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop = scheduler._agendaScrollTop||0;\r\n\r\n\t\t// setting up dhx_v_border size\r\n\t\tvar agenda_area = scheduler._els[\"dhx_cal_data\"][0].childNodes[0];\r\n\t\tvar v_border = agenda_area.childNodes[agenda_area.childNodes.length-1];\r\n\t\tv_border.style.height = (agenda_area.offsetHeight < scheduler._els[\"dhx_cal_data\"][0].offsetHeight) ? \"100%\" : (agenda_area.offsetHeight+\"px\");\r\n\r\n\t\tvar t=scheduler._els[\"dhx_cal_data\"][0].firstChild.childNodes;\r\n\r\n\t\tvar dateElement = scheduler._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML=scheduler.templates.agenda_date(scheduler._min_date, scheduler._max_date, scheduler._mode);\r\n\t\t}\r\n\r\n\t\tscheduler._rendered=[];\r\n\t\tfor (var i=0; i < t.length-1; i++)\r\n\t\t\tscheduler._rendered[i]=t[i];\r\n\r\n\t}\r\n\r\n\tscheduler.agenda_legacy_view=function(mode){\r\n\t\tscheduler._min_date = scheduler.config.agenda_start||scheduler.date.agenda_legacy_start(scheduler._date);\r\n\t\tscheduler._max_date = scheduler.config.agenda_end||scheduler.date.add_agenda_legacy(scheduler._min_date, 1);\r\n\r\n\t\tset_full_view(mode);\r\n\t\tif (mode){\r\n\t\t\tscheduler._cols = null;\r\n\t\t\tscheduler._colsS = null;\r\n\t\t\tscheduler._table_view = true;\r\n\t\t\t//agenda tab activated\r\n\t\t\tfill_agenda_tab();\r\n\t\t} else {\r\n\t\t\tscheduler._table_view = false;\r\n\t\t\t//agenda tab de-activated\r\n\t\t}\r\n\t};\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.date.add_agenda = function(date, inc){\r\n\t\treturn scheduler.date.add(date, 1*inc, \"month\");\r\n\t};\r\n\t\r\n\tscheduler.templates.agenda_time = function(start,end,ev){\r\n\t\tif (ev._timed){\r\n\t\t\treturn `${this.event_date(start)} - ${this.event_date(end)}`;\r\n\t\t}else{\r\n\t\t\treturn scheduler.locale.labels.full_day;\r\n\t\t}\r\n\t};\r\n\tscheduler.templates.agenda_text = function(start,end,ev){\r\n\t\treturn ev.text;\r\n\t};\r\n\r\n\tconst dayDateToStr = scheduler.date.date_to_str(\"%F %j\");\r\n\tconst dayDowToStr = scheduler.date.date_to_str(\"%l\");\r\n\r\n\tscheduler.templates.agenda_day = function(date){ \r\n\t\treturn `
${dayDateToStr(date)}
\r\n\t\t
${dayDowToStr(date)}
`;\r\n\t};\r\n\tscheduler.templates.agenda_date = function(start, end){ \r\n\t\treturn scheduler.templates.month_date(scheduler.getState().date); \r\n\t};\r\n\t\r\n\tscheduler.date.agenda_start=function(date){\r\n\t\treturn scheduler.date.month_start(new Date(date));\r\n\t};\r\n\r\n\tlet scrollTop = 0;\r\n\t\r\n\tscheduler.attachEvent(\"onTemplatesReady\",function() {\r\n\t\tvar old_dblclick_dhx_cal_data = scheduler.dblclick_dhx_cal_data;\r\n\t\tscheduler.dblclick_dhx_cal_data = function() {\r\n\t\t\tif (this._mode == \"agenda\") {\r\n\t\t\t\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\t\t\t\tthis.addEventNow();\r\n\t\t\t} else {\r\n\t\t\t\tif (old_dblclick_dhx_cal_data)\r\n\t\t\t\t\treturn old_dblclick_dhx_cal_data.apply(this, arguments);\r\n\t\t\t}\r\n\t\t};\r\n\t\r\n\t\r\n\t\tvar old = scheduler.render_data;\r\n\t\tscheduler.render_data=function(evs){\r\n\t\t\tif (this._mode == \"agenda\")\r\n\t\t\t\tfill_agenda_tab();\r\n\t\t\telse\r\n\t\t\t\treturn old.apply(this,arguments);\r\n\t\t};\r\n\t\r\n\t\tvar old_render_view_data = scheduler.render_view_data;\r\n\t\tscheduler.render_view_data = function(){\r\n\t\t\tif(this._mode == \"agenda\") {\r\n\t\t\t\tscrollTop = scheduler._els[\"dhx_cal_data\"][0].scrollTop;\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = 0;\r\n\t\t\t}\r\n\t\t\treturn old_render_view_data.apply(this,arguments);\r\n\t\t};\r\n\r\n\t\tfunction fill_agenda_tab(){\r\n\t\t\tconst events = scheduler.get_visible_events();\r\n\t\t\tevents.sort(function(a,b){ return a.start_date>b.start_date?1:-1;});\r\n\r\n\t\t\tconst eventsInDays = {};\r\n\t\t\tlet currDate = scheduler.getState().min_date;\r\n\t\t\tconst maxDate = scheduler.getState().max_date;\r\n\t\t\twhile(currDate.valueOf() < maxDate.valueOf()){\r\n\t\t\t\teventsInDays[currDate.valueOf()] = [];\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\r\n\t\t\tlet anyEvents = false;\r\n\r\n\t\t\tevents.forEach((ev) => {\r\n\t\t\t\tlet eventStart = scheduler.date.day_start(new Date(ev.start_date)); \r\n\t\t\t\twhile (eventStart.valueOf() < ev.end_date.valueOf()) {\r\n\t\t\t\t\tif (eventsInDays[eventStart.valueOf()]) {\r\n\t\t\t\t\t\teventsInDays[eventStart.valueOf()].push(ev);\r\n\t\t\t\t\t\tanyEvents = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\teventStart = scheduler.date.day_start(scheduler.date.add(eventStart, 1, \"day\"));\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(!anyEvents){\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = renderEmptyView();\r\n\t\t\t}else{\r\n\t\t\t\tlet html = \"\";\r\n\t\t\t\tfor(let day in eventsInDays){\r\n\t\t\t\t\thtml += renderDay(new Date(day*1), eventsInDays[day]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = scrollTop;\r\n\t\t\t\r\n\t\t\tlet t = scheduler._els[\"dhx_cal_data\"][0].querySelectorAll(\".dhx_cal_agenda_event_line\");\r\n\t\t\tscheduler._rendered = [];\r\n\t\t\tfor (var i = 0; i < t.length - 1; i++) {\r\n\t\t\t\tscheduler._rendered[i] = t[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\r\n\r\n\t\tfunction renderEmptyView(){\r\n\t\t\treturn `
${scheduler.locale.labels.agenda_tab}
`;\r\n\t\t}\r\n\r\n\t\tfunction renderDay(day, events) {\r\n\t\t\tif(!events.length){\r\n\t\t\t\treturn \"\";\r\n\t\t\t}\r\n\t\t\tlet html = `\r\n
\r\n\t
${scheduler.templates.agenda_day(day)}
\r\n\t
\r\n`;\r\n\r\n\t\t\tevents.forEach((calendarEvent) => {\r\n\t\t\t\thtml += renderOneEvent(day, calendarEvent);\r\n\t\t\t});\r\n\r\n\t\t\thtml += `
`;\r\n\t\t\treturn html;\r\n\t\t}\r\n\r\n\t\tfunction renderOneEvent(day, calendarEvent){\r\n\t\t\tconst dates = scheduler.templates.agenda_time(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\t\t\tconst selectedId = scheduler.getState().select_id;\r\n\t\t\tconst cls = scheduler.templates.event_class(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\t\t\tconst description = scheduler.templates.agenda_text(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\r\n\t\t\tlet style = \"\";\r\n\t\t\tif(calendarEvent.color || calendarEvent.textColor){\r\n\t\t\t\tconst bg = (calendarEvent.color ? (\"--dhx-scheduler-event-background:\" + calendarEvent.color + \";\") : \"\");\r\n\t\t\t\tconst color = (calendarEvent.textColor ? (\"--dhx-scheduler-event-color:\" + calendarEvent.textColor + \";\") : \"\");\r\n\t\t\t\tstyle = ` style=\"${bg}${color}\" `;\r\n\t\t\t}\r\n\r\n\t\t\treturn `
\r\n\t
\r\n\t
${dates}
\r\n\t
${description}
\r\n
`;\r\n\t\t}\r\n\t\r\n\t\tscheduler.agenda_view=function(mode){\r\n\t\t\tif (mode){\r\n\t\t\t\tscheduler._min_date = scheduler.config.agenda_start || scheduler.date.agenda_start(scheduler._date);\r\n\t\t\t\tscheduler._max_date = scheduler.config.agenda_end || scheduler.date.add_agenda(scheduler._min_date, 1);\r\n\t\t\t\tscheduler._cols = null;\r\n\t\t\t\tscheduler._colsS = null;\r\n\t\t\t\tscheduler._table_view = true;\r\n\r\n\t\t\t\tconst dateHeader = scheduler._getNavDateElement();\r\n\t\t\t\tdateHeader.innerHTML = scheduler.templates.agenda_date(scheduler._date);\r\n\t\t\t\t//agenda tab activated\r\n\t\t\t\tfill_agenda_tab();\r\n\t\t\t} else {\r\n\t\t\t\tscheduler._table_view = false;\r\n\t\t\t\t//agenda tab de-activated\r\n\t\t\t}\r\n\t\t};\r\n\t});\r\n\r\n\t// scheduler.attachEvent(\"onEventSelected\", function(id){\r\n\t// \tconst oldSelected = scheduler.$container.querySelectorAll(\".dhx_cal_agenda_event_line_selected\");\r\n\t// \toldSelected.forEach((el) => {\r\n\t// \t\tel.classList.remove(\"dhx_cal_agenda_event_line_selected\");\r\n\t// \t});\r\n\r\n\t// \tconst selected = scheduler.$container.querySelector(`[${scheduler.config.event_attribute}=\"${id}\"]`);\r\n\t// \tif(selected){\r\n\t// \t\tselected.classList.add(\"dhx_cal_agenda_event_line_selected\");\r\n\t// \t}\r\n\t// });\r\n\t\r\n\t\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.config.all_timed = \"short\";\r\n\tscheduler.config.all_timed_month = false;\r\n\r\n\tvar is_event_short = function (ev) {\r\n\t\tif(!((ev.end_date - ev.start_date)/(1000*60*60) >= 24)){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t// short event shouldn't disappear to multiday area during dnd-resize\r\n\t\tif(scheduler._drag_mode == \"resize\" && scheduler._drag_id == ev.id){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn \tfalse;\r\n\t};\r\n\r\n\t// copy of usual events and recurring instances;\r\n\t// regular copy causes problems with recurrings which have series event as a prototype\r\n\tscheduler._safe_copy = function(event){\r\n\t\tvar proto = null,\r\n\t\t\tcopy = scheduler._copy_event(event);\r\n\t\tif(event.event_pid){\r\n\t\t\tproto = scheduler.getEvent(event.event_pid);\r\n\t\t}\r\n\r\n\t\tif (proto && proto.isPrototypeOf(event)) {\r\n\t\t\tdelete copy.event_length;\r\n\t\t\tdelete copy.event_pid;\r\n\t\t\tdelete copy.rec_pattern;\r\n\t\t\tdelete copy.rec_type;\r\n\t\t}\r\n\r\n\t\treturn copy;\r\n\t};\r\n\r\n\tvar old_prerender_events_line = scheduler._pre_render_events_line;\r\n\tvar old_prerender_events_table = scheduler._pre_render_events_table;\r\n\r\n\tvar prerender_events = function (evs, hold) {\r\n\t\tif (!this._table_view) {\r\n\t\t\treturn old_prerender_events_line.call(this, evs, hold);\r\n\t\t}\r\n\r\n\t\treturn old_prerender_events_table.call(this, evs, hold);\r\n\t};\r\n\r\n\tscheduler._pre_render_events_line = scheduler._pre_render_events_table = function(evs, hold){\r\n\t\tif (!this.config.all_timed ||\r\n\t\t\t(this._table_view && this._mode != \"month\") ||\r\n\t\t\t(this._mode == \"month\" && !this.config.all_timed_month))\r\n\t\t\treturn prerender_events.call(this, evs, hold);\r\n\r\n\t\tfor (var i=0; i < evs.length; i++) {\r\n\t\t\tvar ev=evs[i];\r\n\r\n\t\t\tif (ev._timed)\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tif (this.config.all_timed == \"short\") {\r\n\t\t\t\tif (!is_event_short(ev)) {\r\n\t\t\t\t\tif (this._mode != \"month\") {\r\n\t\t\t\t\t\tevs.splice(i--, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar ce = this._safe_copy(ev); // current event (event for one specific day) is copy of original with modified dates\r\n\t\t\tif(!ev._virtual){\r\n\t\t\t\tce._first_chunk = true;\r\n\t\t\t}else{\r\n\t\t\t\tce._first_chunk = false;\r\n\t\t\t}\r\n\t\t\tce._drag_resize = false;\r\n\t\t\tce._virtual = true;\r\n\t\t\tce.start_date = new Date(ce.start_date); // as lame copy doesn't copy date objects\r\n\r\n\t\t\tif (!isOvernightEvent(ev)) {\r\n\t\t\t\tce.end_date = new Date(ev.end_date);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tce.end_date = getNextDay(ce.start_date);\r\n\t\t\t\tif (this.config.last_hour != 24) { // if specific last_hour was set (e.g. 20)\r\n\t\t\t\t\tce.end_date = setDateTime(ce.start_date, this.config.last_hour);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar event_changed = false;\r\n\t\t\tif (ce.start_date < this._max_date && ce.end_date > this._min_date && ce.start_date < ce.end_date) {\r\n\t\t\t\tevs[i] = ce; // adding another event in collection\r\n\t\t\t\tevent_changed = true;\r\n\t\t\t}\r\n\t\t//\tif (ce.start_date > ce.end_date) {\r\n\t\t//\t\tevs.splice(i--,1);\r\n\t\t//\t}\r\n\r\n\t\t\tvar re = this._safe_copy(ev); // remaining event, copy of original with modified start_date (making range more narrow)\r\n\t\t\tre._virtual = true;\r\n\t\t\tre.end_date = new Date(re.end_date);\r\n\t\t\tif (re.start_date < this._min_date)\r\n\t\t\t\tre.start_date = setDateTime(this._min_date, this.config.first_hour);// as we are starting only with whole hours\r\n\t\t\telse\r\n\t\t\t\tre.start_date = setDateTime(getNextDay(ev.start_date), this.config.first_hour);\r\n\r\n\t\t\tif (re.start_date < this._max_date && re.start_date < re.end_date) {\r\n\t\t\t\tif (event_changed){\r\n\t\t\t\t\tevs.splice(i+1,0,re);//insert part\r\n\t\t\t\t}else {\r\n\t\t\t\t\tevs[i--] = re;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tre._last_chunk = false;\r\n\t\t\t}else{\r\n\t\t\t\tce._last_chunk = true;\r\n\t\t\t\tce._drag_resize = true;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// in case of all_timed pre_render is not applied to the original event\r\n\t\t// so we need to force redraw in case of dnd\r\n\t\tvar redraw = (this._drag_mode == 'move')?false:hold;\r\n\t\treturn prerender_events.call(this, evs, redraw);\r\n\r\n\r\n\t\tfunction isOvernightEvent(ev){\r\n\t\t\tvar next_day = getNextDay(ev.start_date);\r\n\t\t\treturn (+ev.end_date > +next_day);\r\n\t\t}\r\n\t\tfunction getNextDay(date){\r\n\t\t\tvar next_day = scheduler.date.add(date, 1, \"day\");\r\n\t\t\tnext_day = scheduler.date.date_part(next_day);\r\n\t\t\treturn next_day;\r\n\t\t}\r\n\t\tfunction setDateTime(date, hours){\r\n\t\t\tvar val = scheduler.date.date_part(new Date(date));\r\n\t\t\tval.setHours(hours);\r\n\t\t\treturn val;\r\n\t\t}\r\n\t};\r\n\tvar old_get_visible_events = scheduler.get_visible_events;\r\n\tscheduler.get_visible_events = function(only_timed){\r\n\t\tif (!(this.config.all_timed && this.config.multi_day))\r\n\t\t\treturn old_get_visible_events.call(this, only_timed);\r\n\t\treturn old_get_visible_events.call(this, false); // only timed = false\r\n\t};\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function (old_mode, old_date, mode, date) {\r\n\t\tscheduler._allow_dnd = (mode == \"day\" || mode == \"week\" || scheduler.getView(mode));\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler._is_main_area_event = function(ev){\r\n\t\treturn !!(ev._timed || this.config.all_timed === true || (this.config.all_timed == \"short\" && is_event_short(ev)) );\r\n\t};\r\n\r\n\tvar oldUpdate = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id){\r\n\t\t// full redraw(update_render=true) messes events order while dnd.\r\n\t\t// individual redraw(update_render=false) of multiday event, which happens on select/unselect, expands event to full width of the cell and can be fixes only with full redraw.\r\n\t\t// so for now full redraw is always enabled for not-dnd updates\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tvar fullRedrawNeeded;\r\n\t\tvar initial;\r\n\t\tif(ev) {\r\n\t\t\tfullRedrawNeeded = (scheduler.config.all_timed && !(scheduler.isOneDayEvent(scheduler._events[id]) || scheduler.getState().drag_id));\r\n\t\t\tif (fullRedrawNeeded) {\r\n\t\t\t\tinitial = scheduler.config.update_render;\r\n\t\t\t\tscheduler.config.update_render = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\toldUpdate.apply(scheduler, arguments);\r\n\r\n\t\tif(ev) {\r\n\t\t\tif (fullRedrawNeeded) {\r\n\t\t\t\tscheduler.config.update_render = initial;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\r\nvar temp_section;\r\nvar before;\r\n\r\nscheduler.config.collision_limit = 1;\r\n\r\nfunction _setTempSection(event_id) { // for custom views (matrix, timeline, units)\r\n\tvar checked_mode = scheduler._get_section_view();\r\n\tif(checked_mode && event_id){\r\n\t\ttemp_section = scheduler.getEvent(event_id)[scheduler._get_section_property()];\r\n\t}\r\n}\r\n\r\nscheduler.attachEvent(\"onBeforeDrag\",function(id){\r\n\t_setTempSection(id);\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onBeforeLightbox\",function(id){\r\n\tvar ev = scheduler.getEvent(id);\r\n\tbefore = [ev.start_date, ev.end_date];\r\n\t_setTempSection(id);\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventChanged\",function(id){\r\n\tif (!id || !scheduler.getEvent(id)) return true;\r\n\tvar ev = scheduler.getEvent(id);\r\n\tif (!scheduler.checkCollision(ev)){\r\n\t\tif (!before) return false;\r\n\t\tev.start_date = before[0];\r\n\t\tev.end_date = before[1];\r\n\t\tev._timed=this.isOneDayEvent(ev);\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onBeforeEventChanged\",function(ev,e,is_new){\r\n\treturn scheduler.checkCollision(ev);\r\n});\r\nscheduler.attachEvent(\"onEventAdded\",function(id,ev) {\r\n\tvar result = scheduler.checkCollision(ev);\r\n\tif (!result)\r\n\t\tscheduler.deleteEvent(id);\r\n});\r\nscheduler.attachEvent(\"onEventSave\",function(id, edited_ev, is_new){\r\n\tedited_ev = scheduler._lame_clone(edited_ev);\r\n\tedited_ev.id = id;\r\n\r\n\t//lightbox may not have 'time' section\r\n\tif(!(edited_ev.start_date && edited_ev.end_date)){\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tedited_ev.start_date = new Date(ev.start_date);\r\n\t\tedited_ev.end_date = new Date(ev.end_date);\r\n\t}\r\n\r\n\tif((edited_ev.rrule && !edited_ev.recurring_event_id) || edited_ev.rec_type){\r\n\t\tscheduler._roll_back_dates(edited_ev);\r\n\t}\r\n\treturn scheduler.checkCollision(edited_ev); // in case user creates event on one date but then edited it another\r\n});\r\n\r\nscheduler._check_sections_collision = function(first, second){\r\n\tvar map_to = scheduler._get_section_property();\r\n\tif (first[map_to] == second[map_to] && first.id != second.id)\r\n\t\treturn true;\r\n\treturn false;\r\n};\r\n\r\nscheduler.checkCollision = function(ev) {\r\n\tvar evs = [];\r\n\tvar collision_limit = scheduler.config.collision_limit;\r\n\r\n\tif (ev.rrule || ev.rec_type) {\r\n\t\tvar evs_dates = scheduler.getRecDates(ev);\r\n\t\tfor(var k=0; k= collision_limit) {\r\n\r\n\t\t\tsingle = false;\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tif ( evs.length >= collision_limit )\r\n\t\t\tsingle = false;\r\n\t}\r\n\tif (!single) {\r\n\t\tvar res = !scheduler.callEvent(\"onEventCollision\",[ev,evs]);\r\n\t\tif (!res) {\r\n\t\t\tev[map_to] = temp_section||ev[map_to]; // from _setTempSection for custom views\r\n\t\t}\r\n\t\treturn res;\r\n\t}\r\n\treturn single;\r\n\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.config.container_autoresize = true;\r\n\tscheduler.config.month_day_min_height = 90;\r\n\tscheduler.config.min_grid_size = 25;\r\n\tscheduler.config.min_map_size = 400;\r\n\r\n\tvar old_pre_render_event = scheduler._pre_render_events;\r\n\r\n\t//need for temporary disabling without modifying public config\r\n\tvar active = true;\r\n\tvar total_height = 0;\r\n\tvar multiday_height = 0;\r\n\r\n\tscheduler._pre_render_events = function(evs, hold) {\r\n\t\tif (!(scheduler.config.container_autoresize && active)) {\r\n\t\t\treturn old_pre_render_event.apply(this, arguments);\r\n\t\t}\r\n\r\n\t\tvar hb = this.xy.bar_height;\r\n\t\tvar h_old = this._colsS.heights;\r\n\t\tvar h = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0];\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tif (!this._table_view)\r\n\t\t\tevs = this._pre_render_events_line(evs, hold); //ignore long events for now\r\n\t\telse\r\n\t\t\tevs = this._pre_render_events_table(evs, hold);\r\n\r\n\t\tif (this._table_view) {\r\n\t\t\tif (hold){\r\n\t\t\t\tthis._colsS.heights = h_old;\r\n\t\t\t} else {\r\n\t\t\t\tvar evl = data.firstChild;\r\n\t\t\t\tconst rows = evl.querySelectorAll(\".dhx_cal_month_row\");\r\n\t\t\t\tif (rows && rows.length) {\r\n\t\t\t\t\tfor (var i = 0; i < rows.length; i++) {\r\n\t\t\t\t\t\th[i]++;\r\n\r\n\t\t\t\t\t\tif ((h[i]) * hb > this._colsS.height - this.xy.month_head_height) { // 22 - height of cell's header\r\n\t\t\t\t\t\t\t//we have overflow, update heights\r\n\t\t\t\t\t\t\tvar cells = rows[i].querySelectorAll(\".dhx_cal_month_cell\");\r\n\r\n\t\t\t\t\t\t\tvar cHeight = this._colsS.height - this.xy.month_head_height;\r\n\t\t\t\t\t\t\tif(this.config.max_month_events*1 !== this.config.max_month_events || h[i] <= this.config.max_month_events){\r\n\t\t\t\t\t\t\t\tcHeight = h[i] * hb;\r\n\t\t\t\t\t\t\t}else if( (this.config.max_month_events + 1) * hb > this._colsS.height - this.xy.month_head_height){\r\n\t\t\t\t\t\t\t\tcHeight = (this.config.max_month_events + 1) * hb;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\trows[i].style.height = (cHeight + this.xy.month_head_height) + \"px\";\r\n\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\tfor (var j = 0; j < cells.length; j++) {\r\n\t\t\t\t\t\t\t\tcells[j].childNodes[1].style.height = cHeight + \"px\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\th[i] = (h[i - 1] || 0) + cells[0].offsetHeight;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\th[i] = (h[i - 1] || 0) + rows[i].querySelectorAll(\".dhx_cal_month_cell\")[0].offsetHeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t\th.unshift(0);\r\n\t\t\t\t\tif (evl.parentNode.offsetHeight < evl.parentNode.scrollHeight && !evl._h_fix) {\r\n\t\t\t\t\t\t//we have v-scroll, decrease last day cell\r\n\r\n\t\t\t\t\t\t// NO CHECK SHOULD BE MADE ON VERTICAL SCROLL\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!evs.length && this._els[\"dhx_multi_day\"][0].style.visibility == \"visible\")\r\n\t\t\t\t\t\th[0] = -1;\r\n\t\t\t\t\tif (evs.length || h[0] == -1) {\r\n\t\t\t\t\t\t//shift days to have space for multiday events\r\n\t\t\t\t\t\t//var childs = evl.parentNode.childNodes;\r\n\t\t\t\t\t\tvar dh = ((h[0] + 1) * hb + 1); // +1 so multiday events would have 2px from top and 2px from bottom by default\r\n\t\t\t\t\t\tif(multiday_height != dh + 1) {\r\n\t\t\t\t\t\t\tthis._obj.style.height = (total_height - multiday_height + dh - 1) + \"px\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tdh += \"px\";\r\n\t\t\t\t\t\tconst navHeight = this._els[\"dhx_cal_navline\"][0].offsetHeight;\r\n\t\t\t\t\t\tconst headerHeight = this._els[\"dhx_cal_header\"][0].offsetHeight;\r\n\t\t\t\t\t\tdata.style.height = (this._obj.offsetHeight - navHeight - headerHeight - (this.xy.margin_top || 0)) + 'px';\r\n\t\t\t\t\t\tvar last = this._els[\"dhx_multi_day\"][0];\r\n\t\t\t\t\t\tlast.style.height = dh;\r\n\t\t\t\t\t\tlast.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\t\tlast.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\t\t\t\t\t\tlast = this._els[\"dhx_multi_day\"][1];\r\n\t\t\t\t\t\tlast.style.height = dh;\r\n\t\t\t\t\t\tlast.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\t\tlast.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\r\n\t\t\t\t\t\tlast.className = h[0] ? \"dhx_multi_day_icon\" : \"dhx_multi_day_icon_small\";\r\n\t\t\t\t\t\tthis._dy_shift = (h[0] + 1) * hb;\r\n\t\t\t\t\t\th[0] = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn evs;\r\n\t};\r\n\r\n\tvar checked_divs = [\"dhx_cal_navline\", \"dhx_cal_header\", \"dhx_multi_day\", \"dhx_cal_data\"];\r\n\tvar updateContainterHeight = function(is_repaint) {\r\n\t\ttotal_height = 0;\r\n\t\tfor (var i = 0; i < checked_divs.length; i++) {\r\n\r\n\t\t\tvar className = checked_divs[i];\r\n\t\t\tvar checked_div = (scheduler._els[className]) ? scheduler._els[className][0] : null;\r\n\t\t\tvar height = 0;\r\n\t\t\tswitch (className) {\r\n\t\t\t\tcase \"dhx_cal_navline\":\r\n\t\t\t\tcase \"dhx_cal_header\":\r\n\t\t\t\t\theight = checked_div.offsetHeight;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"dhx_multi_day\":\r\n\t\t\t\t\theight = (checked_div) ? checked_div.offsetHeight - 1 : 0;\r\n\t\t\t\t\tmultiday_height = height;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"dhx_cal_data\":\r\n\t\t\t\t\tvar mode = scheduler.getState().mode;\r\n\r\n\t\t\t\t\tif(checked_div.childNodes[1] && mode != \"month\") {\r\n\t\t\t\t\t\tlet maxHeight = 0;\r\n\t\t\t\t\t\tfor(let i = 0; i < checked_div.childNodes.length; i++){\r\n\t\t\t\t\t\t\tif(checked_div.childNodes[i].offsetHeight > maxHeight){\r\n\t\t\t\t\t\t\t\tmaxHeight = checked_div.childNodes[i].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\theight = maxHeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\theight = Math.max(checked_div.offsetHeight - 1, checked_div.scrollHeight);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (mode == \"month\") {\r\n\t\t\t\t\t\tif (scheduler.config.month_day_min_height && !is_repaint) {\r\n\t\t\t\t\t\t\tvar rows_length = checked_div.querySelectorAll(\".dhx_cal_month_row\").length;\r\n\t\t\t\t\t\t\theight = rows_length * scheduler.config.month_day_min_height;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (is_repaint) {\r\n\t\t\t\t\t\t\tchecked_div.style.height = height + \"px\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (mode == \"year\"){\r\n\t\t\t\t\t\theight = 190 * scheduler.config.year_y;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(mode == \"agenda\"){\r\n\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\tif(checked_div.childNodes && checked_div.childNodes.length){\r\n\t\t\t\t\t\t\tfor(var j = 0; j < checked_div.childNodes.length; j++){\r\n\t\t\t\t\t\t\t\theight += checked_div.childNodes[j].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(height + 2 < scheduler.config.min_grid_size){\r\n\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (mode == \"week_agenda\"){\r\n\t\t\t\t\t\tvar min_height = scheduler.xy.week_agenda_scale_height + scheduler.config.min_grid_size,\r\n\t\t\t\t\t\t\tcur_height;\r\n\r\n\t\t\t\t\t\tvar column;\r\n\t\t\t\t\t\tfor(var k = 0; k < checked_div.childNodes.length; k++){\r\n\t\t\t\t\t\t\tcolumn = checked_div.childNodes[k];\r\n\t\t\t\t\t\t\tfor(var j = 0; j < column.childNodes.length; j++) {\r\n\t\t\t\t\t\t\t\tvar innerHeight = 0,\r\n\t\t\t\t\t\t\t\t\teventsContainer = column.childNodes[j].childNodes[1];\r\n\r\n\t\t\t\t\t\t\t\tfor(var g =0; g < eventsContainer.childNodes.length; g++){\r\n\t\t\t\t\t\t\t\t\tinnerHeight += eventsContainer.childNodes[g].offsetHeight;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tcur_height = innerHeight + scheduler.xy.week_agenda_scale_height;\r\n\t\t\t\t\t\t\t\tcur_height = (k == 1 && (j == 2 || j == 3)) ? cur_height * 2 : cur_height; // for last two cells;\r\n\r\n\t\t\t\t\t\t\t\tif (cur_height > min_height) {\r\n\t\t\t\t\t\t\t\t\tmin_height = cur_height;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\theight = min_height * 3;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(mode == \"map\") {\r\n\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\tvar evs = checked_div.querySelectorAll(\".dhx_map_line\");\r\n\r\n\t\t\t\t\t\tfor (var j = 0; j < evs.length; j++) {\r\n\t\t\t\t\t\t\theight += evs[j].offsetHeight;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (height + 2 < scheduler.config.min_map_size) {\r\n\t\t\t\t\t\t\theight = scheduler.config.min_map_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(scheduler._gridView) {\r\n\t\t\t\t\t\theight = 0;\r\n\r\n\t\t\t\t\t\tif (checked_div.childNodes[1].childNodes[0].childNodes && checked_div.childNodes[1].childNodes[0].childNodes.length) {\r\n\t\t\t\t\t\t\tvar evs = checked_div.childNodes[1].childNodes[0].childNodes[0].childNodes;\r\n\r\n\t\t\t\t\t\t\tfor (var j = 0; j < evs.length; j++) {\r\n\t\t\t\t\t\t\t\theight += evs[j].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\theight += 2;\r\n\r\n\t\t\t\t\t\t\tif(height < scheduler.config.min_grid_size){\r\n\t\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (scheduler.matrix && scheduler.matrix[mode]) {\r\n\t\t\t\t\t\tif (is_repaint) {\r\n\t\t\t\t\t\t\theight += 0;\r\n\t\t\t\t\t\t\tchecked_div.style.height = height + \"px\";\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\t\tvar cfg = scheduler.matrix[mode];\r\n\t\t\t\t\t\t\tvar rows = cfg.y_unit;\r\n\t\t\t\t\t\t\tfor(var r=0; r < rows.length; r++){\r\n\t\t\t\t\t\t\t\theight += cfg.getSectionHeight(rows[r].key);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// Check and add extra height to avoid events hiding by the horizontal scrollbar\r\n\t\t\t\t\t\t\tif(scheduler.$container.clientWidth != scheduler.$container.scrollWidth){\r\n\t\t\t\t\t\t\t\theight += getScrollSize();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\theight -= 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (mode == \"day\" || mode == \"week\" || (scheduler._props && scheduler._props[mode])) {\r\n\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\theight += 1;\r\n\t\t\ttotal_height += height;\r\n\t\t}\r\n\t\tscheduler._obj.style.height = (total_height) + \"px\";\r\n\r\n\t\tif (!is_repaint)\r\n\t\t\tscheduler.updateView();\r\n\t};\r\n\r\n\tfunction callUpdate(){\r\n\t\tactive = false;\r\n\t\tscheduler.callEvent(\"onAfterSchedulerResize\", []);\r\n\t\tactive = true;\r\n\t}\r\n\r\n\tvar conditionalUpdateContainerHeight = function() {\r\n\t\tif(!(scheduler.config.container_autoresize && active))\r\n\t\t\treturn true;\r\n\r\n\t\tvar mode = scheduler.getState().mode;\r\n\r\n\t\tif(!mode) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tvar asyncRepaint = window.requestAnimationFrame || window.setTimeout;\r\n\t\tvar scrollTop = document.documentElement.scrollTop;\r\n\r\n\t\tasyncRepaint(function() {\r\n\t\t\tif(scheduler.$destroyed || !scheduler.$initialized){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tupdateContainterHeight();\r\n\t\t});\r\n\r\n\t\tif ( (scheduler.matrix && scheduler.matrix[mode]) || mode == \"month\") {\r\n\t\t\tasyncRepaint(function() {\r\n\t\t\t\tif(scheduler.$destroyed || !scheduler.$initialized){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tupdateContainterHeight(true);\r\n\t\t\t\tdocument.documentElement.scrollTop = scrollTop;\r\n\t\t\t\tcallUpdate();\r\n\t\t\t}, 1);\r\n\t\t}else{\r\n\t\t\tcallUpdate();\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function(){\r\n\t\tvar autosizeEnabled = scheduler.config.container_autoresize;\r\n\t\tif(!scheduler.xy.$original_scroll_width){\r\n\t\t\tscheduler.xy.$original_scroll_width = scheduler.xy.scroll_width;\r\n\t\t}\r\n\r\n\t\tscheduler.xy.scroll_width = autosizeEnabled ? 0 : scheduler.xy.$original_scroll_width;\r\n\r\n\t\tif(scheduler.matrix){\r\n\t\t\tfor(var i in scheduler.matrix){\r\n\t\t\t\tvar timeline = scheduler.matrix[i];\r\n\t\t\t\tif(!timeline.$original_section_autoheight){\r\n\t\t\t\t\ttimeline.$original_section_autoheight = timeline.section_autoheight;\r\n\t\t\t\t}\r\n\t\t\t\tif(autosizeEnabled){\r\n\t\t\t\t\ttimeline.section_autoheight = false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\ttimeline.section_autoheight = timeline.$original_section_autoheight;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onXLE\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventChanged\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventCreated\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventAdded\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventDeleted\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onAfterSchedulerResize\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onClearAll\", conditionalUpdateContainerHeight);\r\n\r\n\t//disable container autoresize when expanded\r\n\tscheduler.attachEvent(\"onBeforeExpand\", function(){\r\n\t\tactive = false;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeCollapse\", function(){\r\n\t\tactive = true;\r\n\t\treturn true;\r\n\t});\r\n\t// helper function\r\n\tfunction getScrollSize() {\r\n\t\tvar div = document.createElement(\"div\");\r\n\t\tdiv.style.cssText = \"visibility:hidden;position:absolute;left:-1000px;width:100px;padding:0px;margin:0px;height:110px;min-height:100px;overflow-y:scroll;\";\r\n\r\n\t\tdocument.body.appendChild(div);\r\n\t\tvar size = div.offsetWidth - div.clientWidth;\r\n\t\tdocument.body.removeChild(div);\r\n\t\treturn size;\r\n\t}\r\n\r\n\r\n}","export default function(scheduler){\r\n\tfunction setCookie(name,cookie_param,value) {\r\n\t\tvar str = name + \"=\" + value + (cookie_param?(\"; \"+cookie_param):\"\");\r\n\t\tdocument.cookie = str;\r\n\t}\r\n\tfunction getCookie(name) {\r\n\t\tvar search = name + \"=\";\r\n\t\tif (document.cookie.length > 0) {\r\n\t\t\tvar offset = document.cookie.indexOf(search);\r\n\t\t\tif (offset != -1) {\r\n\t\t\t\toffset += search.length;\r\n\t\t\t\tvar end = document.cookie.indexOf(\";\", offset);\r\n\t\t\t\tif (end == -1)\r\n\t\t\t\t\tend = document.cookie.length;\r\n\t\t\t\treturn document.cookie.substring(offset, end);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}\r\n\r\n\tfunction getCookieName(scheduler) {\r\n\t\treturn (scheduler._obj.id || \"scheduler\") + \"_settings\";\r\n\t}\r\n\r\n\tvar first = true;\r\n\tscheduler.attachEvent(\"onBeforeViewChange\",function(oldMode,oldDate,mode,date){\r\n\t\t// if Url plugin is enabled - explicit url values should have more priority than cookies\r\n\t\tif (first && scheduler._get_url_nav){\r\n\t\t\tvar urlNavigationPlugin = scheduler._get_url_nav();\r\n\t\t\tif(urlNavigationPlugin.date || urlNavigationPlugin.mode || urlNavigationPlugin.event){\r\n\t\t\t\tfirst = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar cookie = getCookieName(scheduler);\r\n\r\n\t\tif (first){\r\n\t\t\tfirst = false;\r\n\t\t\tvar schedulerCookie = getCookie(cookie);\r\n\t\t\tif (schedulerCookie){\r\n\r\n\t\t\t\tif(!scheduler._min_date){\r\n\t\t\t\t\t//otherwise scheduler will have incorrect date until timeout\r\n\t\t\t\t\t//it can cause js error with 'onMouseMove' handler of key_nav.js\r\n\t\t\t\t\tscheduler._min_date = date;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tschedulerCookie = unescape(schedulerCookie).split(\"@\");\r\n\t\t\t\tschedulerCookie[0] = this._helpers.parseDate(schedulerCookie[0]);\r\n\t\t\t\tvar view = this.isViewExists(schedulerCookie[1]) ? schedulerCookie[1] : mode,\r\n\t\t\t\t\tdate = !isNaN(+schedulerCookie[0]) ? schedulerCookie[0] : date;\r\n\r\n\t\t\t\twindow.setTimeout(function(){\r\n\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tscheduler.setCurrentView(date,view);\r\n\t\t\t\t},1);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", function (newMode , newDate){\r\n\t\tvar cookie = getCookieName(scheduler);\r\n\t\tvar text = escape(this._helpers.formatDate(newDate)+\"@\"+(newMode));\r\n\t\tsetCookie(cookie,\"expires=Sun, 31 Jan 9999 22:00:00 GMT\",text);\r\n\t});\r\n\r\n\t// As we are blocking first render above there could be a problem in case of dynamic loading and rendering of visible data in general ('from'/'to' won't be defined)\r\n\tvar old_load = scheduler._load;\r\n\tscheduler._load = function() {\r\n\t\tvar args = arguments;\r\n\r\n\t\tif (!scheduler._date) {\r\n\t\t\tvar that = this;\r\n\t\t\twindow.setTimeout(function() {\r\n\t\t\t\told_load.apply(that, args);\r\n\t\t\t},1);\r\n\t\t} else {\r\n\t\t\told_load.apply(this, args);\r\n\t\t}\r\n\t};\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Day Timeline\", scheduler.assert);\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Drag Between\", scheduler.assert);\r\n}","export default function(scheduler){\r\n/* global dhtmlXCombo */\r\nscheduler.form_blocks['combo']={\r\n\trender:function(sns) {\r\n\t\tif (!sns.cached_options)\r\n\t\t\tsns.cached_options = {};\r\n\t\tvar res = '';\r\n\t\tres += \"
\";\r\n\t\treturn res;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\t(function(){\r\n\t\t\tresetCombo();\r\n\t\t\tvar id = scheduler.attachEvent(\"onAfterLightbox\",function(){\r\n\t\t\t\t// otherwise destructor will never be called after form reset(e.g. in readonly event mode)\r\n\t\t\t\tresetCombo();\r\n\t\t\t\tscheduler.detachEvent(id);\r\n\t\t\t});\r\n\t\t\tfunction resetCombo(){\r\n\t\t\t\tif(node._combo && node._combo.DOMParent) {\r\n\t\t\t\t\tvar combo = node._combo;\r\n\t\t\t\t\tif(combo.unload){\r\n\t\t\t\t\t\tcombo.unload();\r\n\t\t\t\t\t}else if(combo.destructor){\r\n\t\t\t\t\t\tcombo.destructor();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// dhtmlxCombo 4.1.0 bug\r\n\t\t\t\t\tcombo.DOMParent = combo.DOMelem = null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})();\r\n\t\twindow.dhx_globalImgPath = config.image_path||'/';\r\n\t\tnode._combo = new dhtmlXCombo(node, config.name, node.offsetWidth-8);\r\n\t\tif (config.onchange)\r\n\t\t\tnode._combo.attachEvent(\"onChange\", config.onchange);\r\n\r\n\t\tif (config.options_height)\r\n\t\t\tnode._combo.setOptionHeight(config.options_height);\r\n\t\tvar combo = node._combo;\r\n\t\tcombo.enableFilteringMode(config.filtering, config.script_path||null, !!config.cache);\r\n\r\n\t\tif (!config.script_path) { // script-side filtration is used\r\n\t\t\tvar all_options = [];\r\n\t\t\tfor (var i = 0; i < config.options.length; i++) {\r\n\t\t\t\tvar option = config.options[i];\r\n\t\t\t\tvar single_option = [\r\n\t\t\t\t\toption.key,\r\n\t\t\t\t\toption.label,\r\n\t\t\t\t\toption.css\r\n\t\t\t\t];\r\n\t\t\t\tall_options.push(single_option);\r\n\t\t\t}\r\n\t\t\tcombo.addOption(all_options);\r\n\t\t\tif (ev[config.map_to]) {\r\n\t\t\t\tvar index = combo.getIndexByValue(ev[config.map_to]);\r\n\t\t\t\tcombo.selectOption(index);\r\n\t\t\t}\r\n\t\t} else { // server-side filtration is used\r\n\t\t\tvar selected_id = ev[config.map_to];\r\n\t\t\tif (selected_id) {\r\n\t\t\t\tif (config.cached_options[selected_id]) {\r\n\t\t\t\t\tcombo.addOption(selected_id, config.cached_options[selected_id]);\r\n\t\t\t\t\tcombo.disable(1);\r\n\t\t\t\t\tcombo.selectOption(0);\r\n\t\t\t\t\tcombo.disable(0);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tscheduler.ajax.get(config.script_path+\"?id=\"+selected_id+\"&uid=\"+scheduler.uid(), function(result){\r\n\t\t\t\t\t\tvar responseText = result.xmlDoc.responseText;\r\n\t\t\t\t\t\tvar label;\r\n\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\tvar res = JSON.parse(responseText);\r\n\t\t\t\t\t\t\tlabel = res.options[0].text;\r\n\t\t\t\t\t\t}catch(e){\r\n\t\t\t\t\t\t\tvar option = scheduler.ajax.xpath(\"//option\", result.xmlDoc)[0];\r\n\t\t\t\t\t\t\tlabel = option.childNodes[0].nodeValue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tconfig.cached_options[selected_id] = label;\r\n\t\t\t\t\t\tcombo.addOption(selected_id, label);\r\n\t\t\t\t\t\tcombo.disable(1);\r\n\t\t\t\t\t\tcombo.selectOption(0);\r\n\t\t\t\t\t\tcombo.disable(0);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tcombo.setComboValue(\"\");\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config) {\r\n\t\tvar selected_id = node._combo.getSelectedValue(); // value = key\r\n\t\tif (config.script_path) {\r\n\t\t\tconfig.cached_options[selected_id] = node._combo.getSelectedText();\r\n\t\t}\r\n\t\treturn selected_id;\r\n\t},\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\nscheduler.form_blocks['radio']={\r\n\trender:function(sns) {\r\n\t\tvar res = '';\r\n\t\tres += `
`;\r\n\t\tfor (var i=0; i\"+\" \"+sns.options[i].label+\"\";\r\n\t\t}\r\n\t\tres += \"
\";\r\n\r\n\t\treturn res;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\tvar radiobuttons = node.getElementsByTagName('input');\r\n\t\tfor (var i = 0; i < radiobuttons.length; i++) {\r\n\t\t\tradiobuttons[i].checked = false;\r\n\t\t\tvar checked_value = ev[config.map_to]||value;\r\n\t\t\tif (radiobuttons[i].value == checked_value) {\r\n\t\t\t\tradiobuttons[i].checked = true;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tvar radiobuttons = node.getElementsByTagName('input');\r\n\t\tfor(var i=0; i
';\r\n\t\telse\r\n\t\t\treturn '';\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\tnode=scheduler._lightbox.querySelector(`#${config.id}`);\r\n\t\tvar id = scheduler.uid();\r\n\t\tvar isChecked = (typeof config.checked_value != \"undefined\") ? value == config.checked_value : !!value;\r\n\t\tnode.className += \" dhx_cal_checkbox\";\r\n\t\tvar check_html = \"\";\r\n\t\tvar label_html = \"\";\r\n\t\tif (scheduler.config.wide_form){\r\n\t\t\tnode.innerHTML = label_html;\r\n\t\t\tnode.nextSibling.innerHTML=check_html;\r\n\t\t} else\r\n\t\t\tnode.innerHTML=check_html+label_html;\r\n\r\n\t\tif (config.handler) {\r\n\t\t\tvar checkbox = node.getElementsByTagName('input')[0];\r\n\t\t\tif(checkbox.$_eventAttached){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tcheckbox.$_eventAttached = true;\r\n\t\t\tscheduler.event(checkbox, \"click\", config.handler);\r\n\t\t\t//checkbox.onclick = config.handler;\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tnode=scheduler._lightbox.querySelector(`#${config.id}`);\r\n\t\tvar checkbox = node.getElementsByTagName('input')[0]; // moved to the header\r\n\t\tif (!checkbox)\r\n\t\t\tcheckbox = node.nextSibling.getElementsByTagName('input')[0];\r\n\t\treturn (checkbox.checked)?(config.checked_value||true):(config.unchecked_value||false);\r\n\t},\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.ext.fullscreen = {\r\n\ttoggleIcon: null\r\n};\r\n\r\nscheduler.expand = function() {\r\n\tif(!scheduler.callEvent(\"onBeforeExpand\", []))\r\n\t\treturn;\r\n\tvar t = scheduler._obj;\r\n\tdo {\r\n\t\tt._position = t.style.position || \"\";\r\n\t\tt.style.position = \"static\";\r\n\t} while ((t = t.parentNode) && t.style);\r\n\tt = scheduler._obj;\r\n\tt.style.position = \"absolute\";\r\n\tt._width = t.style.width;\r\n\tt._height = t.style.height;\r\n\tt.style.width = t.style.height = \"100%\";\r\n\tt.style.top = t.style.left = \"0px\";\r\n\r\n\tvar top = document.body;\r\n\ttop.scrollTop = 0;\r\n\r\n\ttop = top.parentNode;\r\n\tif (top)\r\n\t\ttop.scrollTop = 0;\r\n\tdocument.body._overflow = document.body.style.overflow || \"\";\r\n\tdocument.body.style.overflow = \"hidden\";\r\n\tscheduler._maximize();\r\n\tscheduler.callEvent(\"onExpand\", []);\r\n};\r\nscheduler.collapse = function() {\r\n\tif(!scheduler.callEvent(\"onBeforeCollapse\", []))\r\n\t\treturn;\r\n\tvar t = scheduler._obj;\r\n\tdo {\r\n\t\tt.style.position = t._position;\r\n\t} while ((t = t.parentNode) && t.style);\r\n\tt = scheduler._obj;\r\n\tt.style.width = t._width;\r\n\tt.style.height = t._height;\r\n\tdocument.body.style.overflow = document.body._overflow;\r\n\tscheduler._maximize();\r\n\tscheduler.callEvent(\"onCollapse\", []);\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar t = document.createElement(\"div\");\r\n\tt.className = \"dhx_expand_icon\";\r\n\tscheduler.ext.fullscreen.toggleIcon = t;\r\n\tt.innerHTML = `\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t`;\r\n\tscheduler._obj.appendChild(t);\r\n\tscheduler.event(t, \"click\", function() {\r\n\t\tif (!scheduler.expanded)\r\n\t\t\tscheduler.expand(); else\r\n\t\t\tscheduler.collapse();\r\n\t});\r\n});\r\nscheduler._maximize = function() {\r\n\tthis.expanded = !this.expanded;\r\n\tif(this.expanded){\r\n\t\tthis.ext.fullscreen.toggleIcon.classList.add(\"dhx_expand_icon--expanded\");\r\n\t\t\r\n\t}else{\r\n\t\tthis.ext.fullscreen.toggleIcon.classList.remove(\"dhx_expand_icon--expanded\");\r\n\t}\r\n\t\r\n\t//scheduler.ext.fullscreen.toggleIcon.style.backgroundPosition = \"0 \" + (this.expanded ? \"0\" : \"18\") + \"px\";\r\n\r\n\tvar directions = ['left', 'top'];\r\n\tfor (var i = 0; i < directions.length; i++) {\r\n\t\t//var margin = scheduler.xy['margin_' + directions[i]];\r\n\t\tvar prev_margin = scheduler['_prev_margin_' + directions[i]];\r\n\t\tif (scheduler.xy['margin_' + directions[i]]) {\r\n\t\t\tscheduler['_prev_margin_' + directions[i]] = scheduler.xy['margin_' + directions[i]];\r\n\t\t\tscheduler.xy['margin_' + directions[i]] = 0;\r\n\t\t} else {\r\n\t\t\tif (prev_margin) {\r\n\t\t\t\tscheduler.xy['margin_' + directions[i]] = scheduler['_prev_margin_' + directions[i]];\r\n\t\t\t\tdelete scheduler['_prev_margin_' + directions[i]];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.setCurrentView();\r\n};\r\n\r\n\r\n}\r\n","export default function(scheduler){\r\n\r\n\r\n(function(){\r\n\r\nfunction defaults(obj, std){\r\n\tfor (var key in std)\r\n\t\tif (!obj[key])\r\n\t\t\tobj[key] = std[key];\r\n\treturn obj;\r\n}\r\n\r\nfunction getElementSizes(element, scheduler) {\r\n\tvar sizes = {};\r\n\telement = scheduler._els[element];\r\n\tif (element && element[0]) {\r\n\t\tsizes.x = element[0].scrollWidth;\r\n\t\tsizes.y = element[0].scrollHeight;\r\n\t} else {\r\n\t\tsizes.x = 0;\r\n\t\tsizes.y = 0;\r\n\t}\r\n\treturn sizes;\r\n}\r\n\r\n//compatibility for new versions of scheduler\r\nif(!window.dhtmlxAjax){\r\n\twindow.dhtmlxAjax = {\r\n\t\tpost: function(url, data, callback){\r\n\t\t\treturn window.dhx4.ajax.post(url, data, callback);\r\n\t\t},\r\n\t\tget: function(url, callback){\r\n\t\t\treturn window.ajax.get(url, callback);\r\n\t\t}\r\n\t};\r\n}\r\n\r\nfunction add_export_methods(scheduler){\r\n\r\n\tscheduler.exportToPDF = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.pdf\",\r\n\t\t\tformat:\"A4\",\r\n\t\t\torientation:\"landscape\",\r\n\t\t\tdpi:96,\r\n\t\t\tzoom:1,\r\n\t\t\trtl: scheduler.config.rtl\r\n\t\t});\r\n\t\tconfig.html = this._export_html(config);\r\n\t\tconfig.mode = this.getState().mode;\r\n\t\tthis._send_to_export(config, \"pdf\");\r\n\t};\r\n\r\n\tscheduler.exportToPNG = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.png\",\r\n\t\t\tformat:\"A4\",\r\n\t\t\torientation:\"landscape\",\r\n\t\t\tdpi:96,\r\n\t\t\tzoom:1,\r\n\t\t\trtl: scheduler.config.rtl\r\n\t\t});\r\n\t\tconfig.html = this._export_html(config);\r\n\t\tconfig.mode = this.getState().mode;\r\n\t\tthis._send_to_export(config, \"png\");\r\n\t};\r\n\r\n\tscheduler.exportToICal = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.ical\",\r\n\t\t\tdata:this._serialize_plain(null, config)\r\n\t\t});\r\n\t\tthis._send_to_export(config, \"ical\");\r\n\t};\r\n\r\n\tscheduler.exportToExcel = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.xlsx\",\r\n\t\t\ttitle:\"Events\",\r\n\t\t\tdata:this._serialize_plain( this.templates.xml_format, config),\r\n\t\t\tcolumns:this._serialize_columns()\r\n\t\t});\r\n\t\tthis._send_to_export(config, \"excel\");\r\n\t};\r\n\r\n\tscheduler._ajax_to_export = function(data, type, callback){\r\n\t\tdelete data.callback;\r\n\t\tvar url = data.server || \"https://export.dhtmlx.com/scheduler\";\r\n\r\n\t\twindow.dhtmlxAjax.post(url,\r\n\t\t\t\"type=\"+type+\"&store=1&data=\"+encodeURIComponent(JSON.stringify(data)),\r\n\t\t\tfunction(loader){\r\n\t\t\t\tvar fail = loader.xmlDoc.status > 400;\r\n\t\t\t\tvar info = null;\r\n\r\n\t\t\t\tif (!fail){\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\tinfo = JSON.parse(loader.xmlDoc.responseText);\r\n\t\t\t\t\t}catch(e){}\r\n\t\t\t\t}\r\n\t\t\t\tcallback(info);\r\n\t\t\t}\r\n\t\t);\r\n\t};\r\n\r\n\tscheduler._plain_export_copy = function(source, format){\r\n\t\tvar target = {};\r\n\t\tfor (var key in source)\r\n\t\t\ttarget[key] = source[key];\r\n\r\n\t\ttarget.start_date = format(target.start_date);\r\n\t\ttarget.end_date = format(target.end_date);\r\n\t\ttarget.$text = this.templates.event_text(source.start_date, source.end_date, source);\r\n\r\n\t\treturn target;\r\n\t};\r\n\r\n\tscheduler._serialize_plain = function(format, config){\r\n\t\tformat = format || scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\", true);\r\n\r\n\t\tvar events;\r\n\t\tif (config && config.start && config.end)\r\n\t\t\tevents = scheduler.getEvents(config.start, config.end);\r\n\t\telse\r\n\t\t\tevents = scheduler.getEvents();\r\n\r\n\t\tvar data = [];\r\n\t\tfor (var i = 0; i< events.length; i++)\r\n\t\t\tdata[i] = this._plain_export_copy(events[i], format);\r\n\r\n\t\treturn data;\r\n\t};\r\n\r\n\tscheduler._serialize_columns = function(){\r\n\t\treturn [\r\n\t\t\t{ id:\"start_date\", header:\"Start Date\", width:30 },\r\n\t\t\t{ id:\"end_date\", header:\"End Date\", width:30 },\r\n\t\t\t{ id:\"$text\", header:\"Text\", width:100 }\r\n\t\t];\r\n\t};\r\n\r\n\tscheduler._send_to_export = function(data, type){\r\n\t\tif(!data.version){\r\n\t\t\tdata.version = scheduler.version;\r\n\t\t}\r\n\r\n\t\tif(!data.skin){\r\n\t\t\tdata.skin = scheduler.skin;\r\n\t\t}\r\n\r\n\t\tif (data.callback)\r\n\t\t\t\treturn scheduler._ajax_to_export(data, type, data.callback);\r\n\r\n\t\tvar form = this._create_hidden_form();\r\n\r\n\t\tform.firstChild.action = data.server || \"https://export.dhtmlx.com/scheduler\";\r\n\t\tform.firstChild.childNodes[0].value = JSON.stringify(data);\r\n\t\tform.firstChild.childNodes[1].value = type;\r\n\t\tform.firstChild.submit();\r\n\t};\r\n\r\n\tscheduler._create_hidden_form = function(){\r\n\t\tif (!this._hidden_export_form){\r\n\t\t\tvar t = this._hidden_export_form = document.createElement(\"div\");\r\n\t\t\tt.style.display = \"none\";\r\n\t\t\tt.innerHTML = \"
\";\r\n\t\t\tdocument.body.appendChild(t);\r\n\t\t}\r\n\t\treturn this._hidden_export_form;\r\n\t};\r\n\r\n\tscheduler._get_export_size = function(format, orientation, zoom, dpi, header, footer, scales) {\r\n\r\n\t\tdpi = parseInt(dpi)/25.4 || 4;\r\n\r\n\t\tvar sizes = {\r\n\t\t\t\"A5\":{ x:148, y:210 },\r\n\t\t\t\"A4\":{ x:210, y:297 },\r\n\t\t\t\"A3\":{ x:297, y:420 },\r\n\t\t\t\"A2\":{ x:420, y:594 },\r\n\t\t\t\"A1\":{ x:594, y:841 },\r\n\t\t\t\"A0\":{ x:841, y:1189 }\r\n\t\t};\r\n\r\n\t\tvar dataX = getElementSizes(\"dhx_cal_data\", this).x;\r\n\t\tvar dataY = getElementSizes(\"dhx_cal_data\", this).y;\r\n\t\tvar headY = getElementSizes(\"dhx_cal_header\", this).y;\r\n\t\tvar multY = getElementSizes(\"dhx_multi_day\", this).y;\r\n\r\n\t\tvar cSize = {\r\n\t\t\ty: dataY + headY + multY\r\n\t\t};\r\n\r\n\t\tif (format === \"full\") {\r\n\t\t\tcSize.x = dataX;\r\n\t\t} else {\r\n\t\t\tcSize.x = Math.floor( (orientation === \"landscape\" ? sizes[format].y : sizes[format].x) * dpi );\r\n\t\t}\r\n\r\n\t\tif (scales) {\r\n\t\t\tcSize.x *= (parseFloat(scales.x) || 1);\r\n\t\t\tcSize.y *= (parseFloat(scales.y) || 1);\r\n\t\t}\r\n\r\n\t\treturn cSize;\r\n\t};\r\n\r\n\tfunction getTimeline() {\r\n\t\tvar mode = scheduler.getState().mode;\r\n\t\tif (scheduler.matrix && scheduler.matrix[mode]) {\r\n\t\t\treturn scheduler.matrix[mode];\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\r\n\tfunction getInitialSizes() {\r\n\t\tvar smartRendering = undefined,\r\n\t\t\tscrollable = undefined;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (timeline) {\r\n\t\t\tscrollable = timeline.scrollable;\r\n\t\t\tsmartRendering = timeline.smart_rendering;\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tnav_height: scheduler.xy.nav_height,\r\n\t\t\tscroll_width: scheduler.xy.scroll_width,\r\n\t\t\tstyle_width: scheduler._obj.style.width,\r\n\t\t\tstyle_height: scheduler._obj.style.height,\r\n\t\t\ttimeline_scrollable: scrollable,\r\n\t\t\ttimeline_smart_rendering: smartRendering\r\n\t\t};\r\n\t}\r\n\r\n\tfunction setExportSizes(size, initialSizes) {\r\n\t\tscheduler._obj.style.width = size.x + \"px\";\r\n\t\tscheduler._obj.style.height = size.y + \"px\";\r\n\r\n\t\tscheduler.xy.nav_height = 0;\r\n\t\tscheduler.xy.scroll_width = 0;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (initialSizes.timeline_scrollable || initialSizes.timeline_smart_rendering) {\r\n\r\n\t\t\ttimeline.scrollable = false;\r\n\t\t\ttimeline.smart_rendering = false;\r\n\t\t}\r\n\t}\r\n\r\n\tfunction setInitialSizes(initialSizes) {\r\n\t\tscheduler.xy.scroll_width = initialSizes.scroll_width;\r\n\t\tscheduler.xy.nav_height = initialSizes.nav_height;\r\n\t\tscheduler._obj.style.width = initialSizes.style_width;\r\n\t\tscheduler._obj.style.height = initialSizes.style_height;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (initialSizes.timeline_scrollable || initialSizes.timeline_smart_rendering) {\r\n\t\t\ttimeline.scrollable = initialSizes.timeline_scrollable;\r\n\t\t\ttimeline.smart_rendering = initialSizes.timeline_smart_rendering;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler._export_html = function (obj) {\r\n\t\tvar initialSizes = getInitialSizes();\r\n\t\tvar size = scheduler._get_export_size(obj.format, obj.orientation, obj.zoom, obj.dpi, obj.header, obj.footer, obj.scales);\r\n\r\n\t\tvar html = \"\";\r\n\t\ttry {\r\n\t\t\tsetExportSizes(size, initialSizes);\r\n\t\t\tscheduler.setCurrentView();\r\n\t\t\thtml = scheduler._obj.innerHTML;\r\n\t\t} catch (e) {\r\n\r\n\t\t\t// eslint-disable-next-line no-console\r\n\t\t\tconsole.error(e);\r\n\t\t} finally {\r\n\t\t\tsetInitialSizes(initialSizes);\r\n\t\t\tscheduler.setCurrentView();\r\n\t\t}\r\n\r\n\t\treturn html;\r\n\t};\r\n\r\n}\r\n\r\nadd_export_methods(scheduler);\r\n\r\n\r\n})();\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Grid\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\tvar els = document.body.getElementsByTagName(\"DIV\");\r\n\tfor (var i=0; i < els.length; i++) {\r\n\t\tvar cs = els[i].className||\"\";\r\n\t\tcs = cs.split(\":\");\r\n\t\tif (cs.length == 2 && cs[0] == \"template\"){\r\n\t\t\tvar code = \"return \\\"\"+(els[i].innerHTML||\"\").replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g,\"\\\\\\\"\").replace(/[\\n\\r]+/g,\"\")+\"\\\";\";\r\n\t\t\tcode = unescape(code).replace(/\\{event\\.([a-z]+)\\}/g,function(all,mask){\r\n\t\t\t\treturn '\"+ev.'+mask+'+\"';\r\n\t\t\t});\r\n\t\t\tscheduler.templates[cs[1]]=Function(\"start\",\"end\",\"ev\",code);\r\n\t\t\tels[i].style.display='none';\r\n\t\t}\r\n\t}\r\n});\r\n\r\n}","import keyboard_shortcuts from \"./keyboard_navigation/common/keyboard_shortcuts\";\r\nimport eventhandler from \"./keyboard_navigation/common/eventhandler\";\r\nimport trap_modal_focus from \"./keyboard_navigation/common/trap_modal_focus\";\r\nimport marker from \"./keyboard_navigation/marker\";\r\nimport scheduler_node from \"./keyboard_navigation/elements/scheduler_node\";\r\nimport nav_node from \"./keyboard_navigation/elements/nav_node\";\r\nimport header_cell from \"./keyboard_navigation/elements/header_cell\";\r\nimport event from \"./keyboard_navigation/elements/event\";\r\nimport time_slot from \"./keyboard_navigation/elements/time_slot\";\r\nimport minical_button from \"./keyboard_navigation/elements/minical_button\";\r\nimport minical_cell from \"./keyboard_navigation/elements/minical_cell\";\r\nimport data_area from \"./keyboard_navigation/elements/data_area\";\r\nimport modals from \"./keyboard_navigation/modals\";\r\nimport core from \"./keyboard_navigation/core\";\r\nimport key_nav_legacy from \"./keyboard_navigation/key_nav_legacy\";\r\n\r\n\r\nimport scheduler_handlers from \"./keyboard_navigation/scheduler_handlers\";\r\nimport minical_handlers from \"./keyboard_navigation/minical_handlers\";\r\n\r\nexport default function(scheduler){\r\n\t\tscheduler.config.key_nav = true;\r\n\t\tscheduler.config.key_nav_step = 30;\r\n\t\tscheduler.addShortcut = function(shortcut, handler, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tscopeObject.prototype.bind(shortcut, handler);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.getShortcutHandler = function(shortcut, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tvar commands = scheduler.$keyboardNavigation.shortcuts.parse(shortcut);\r\n\t\t\t\tif(commands.length){\r\n\t\t\t\t\treturn scopeObject.prototype.findHandler(commands[0]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.removeShortcut = function(shortcut, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tscopeObject.prototype.unbind(shortcut);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.focus = function(){\r\n\t\t\tif(!scheduler.config.key_nav){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar disp = scheduler.$keyboardNavigation.dispatcher;\r\n\t\t\tdisp.enable();\r\n\t\t\tvar activeNode = disp.getActiveNode();\r\n\t\t\tif(!activeNode || activeNode instanceof scheduler.$keyboardNavigation.MinicalButton || activeNode instanceof scheduler.$keyboardNavigation.MinicalCell){\r\n\t\t\t\tdisp.setDefaultNode();\r\n\t\t\t}else{\r\n\t\t\t\tdisp.focusNode(disp.getActiveNode());\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfunction getScope(mode){\r\n\t\t\tvar scopes = {\r\n\t\t\t\t\"minicalButton\":scheduler.$keyboardNavigation.MinicalButton,\r\n\t\t\t\t\"minicalDate\":scheduler.$keyboardNavigation.MinicalCell,\r\n\t\t\t\t\"scheduler\":scheduler.$keyboardNavigation.SchedulerNode,\r\n\t\t\t\t\"dataArea\": scheduler.$keyboardNavigation.DataArea,\r\n\t\t\t\t\"timeSlot\": scheduler.$keyboardNavigation.TimeSlot,\r\n\t\t\t\t\"event\": scheduler.$keyboardNavigation.Event\r\n\t\t\t};\r\n\r\n\t\t\tvar searchMap = {};\r\n\t\t\tfor(var i in scopes)\r\n\t\t\t\tsearchMap[i.toLowerCase()] = scopes[i];\r\n\r\n\t\t\tmode = (mode + \"\").toLowerCase();\r\n\r\n\t\t\treturn searchMap[mode] || scopes.scheduler;\r\n\t\t}\r\n\r\n\t\tscheduler.$keyboardNavigation = {};\r\n\r\n\t\tscheduler._compose = function(){\r\n\t\t\tvar parts = Array.prototype.slice.call(arguments, 0);\r\n\t\t\tvar res = {};\r\n\t\t\tfor(var i = 0; i < parts.length; i++){\r\n\t\t\t\tvar obj = parts[i];\r\n\t\t\t\tif(typeof obj == \"function\"){\r\n\t\t\t\t\tobj = new obj();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor(var p in obj){\r\n\t\t\t\t\tres[p] = obj[p];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\t\t};\r\n\r\n\t\tkeyboard_shortcuts(scheduler);\r\n\t\teventhandler(scheduler);\r\n\t\ttrap_modal_focus(scheduler);\r\n\t\tmarker(scheduler);\r\n\t\tscheduler_node(scheduler);\r\n\t\tnav_node(scheduler);\r\n\t\theader_cell(scheduler);\r\n\t\tevent(scheduler);\r\n\t\ttime_slot(scheduler);\r\n\t\tminical_button(scheduler);\r\n\t\tminical_cell(scheduler);\r\n\t\tdata_area(scheduler);\r\n\t\tmodals(scheduler);\r\n\t\tcore(scheduler);\r\n\t\tkey_nav_legacy(scheduler);\r\n\r\n\t\t(function(){\r\n\t\t\tscheduler_handlers(scheduler);\r\n\t\t\tminical_handlers(scheduler);\r\n\r\n\t\t\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\t\t\tscheduler.$keyboardNavigation.attachSchedulerHandlers();\r\n\r\n\t\t\tif(scheduler.renderCalendar){\r\n\t\t\t\t// if minical ext loaded before key nav ext - patch it now\r\n\t\t\t\tscheduler.$keyboardNavigation.patchMinicalendar();\r\n\t\t\t}else{\r\n\t\t\t\t// otherwise - wait until everything is loaded and try again\r\n\t\t\t\tvar attachOnce = scheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\t\t\t\tscheduler.detachEvent(attachOnce);\r\n\t\t\t\t\tscheduler.$keyboardNavigation.patchMinicalendar();\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\tfunction isSchedulerSelected(){\r\n\t\t\t\tif(!scheduler.config.key_nav) return;\r\n\r\n\t\t\t\tvar enable;\r\n\t\t\t\tvar focusElement = document.activeElement;\r\n\t\t\t\t// halt key nav when focus is outside scheduler or in quick info popup\r\n\t\t\t\tif(!focusElement || scheduler.utils.dom.locateCss(focusElement, \"dhx_cal_quick_info\", false)){\r\n\t\t\t\t\tenable = false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tenable = scheduler.$keyboardNavigation.isChildOf(focusElement, scheduler.$container) || scheduler.$keyboardNavigation.isMinical(focusElement);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn enable;\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\tfunction changeState(enable){\r\n\t\t\t\tif(enable && !dispatcher.isEnabled()){\r\n\t\t\t\t\tdispatcher.enable();\r\n\t\t\t\t}else if(!enable && dispatcher.isEnabled()){\r\n\t\t\t\t\tdispatcher.disable();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tconst intervalId = setInterval(function(){\r\n\t\t\t\tif(!scheduler.$container || !scheduler.$keyboardNavigation.isChildOf(scheduler.$container, document.body)){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar enable = isSchedulerSelected();\r\n\r\n\t\t\t\tif(enable){\r\n\t\t\t\t\tchangeState(enable);\r\n\t\t\t\t}else if(!enable && dispatcher.isEnabled()){\r\n\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// doublecheck in case checking is done in handler before focus element is repainted\r\n\t\t\t\t\t\tif(scheduler.config.key_nav){\r\n\t\t\t\t\t\t\tchangeState(isSchedulerSelected());\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tscheduler.$container.removeAttribute(\"tabindex\");\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}, 100);\r\n\t\t\t\t}\r\n\t\t\t}, 500);\r\n\t\t\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\t\t\tclearInterval(intervalId);\r\n\t\t\t});\r\n\t\t})();\r\n\t}\r\n\r\n\r\n","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.shortcuts = {\r\n\tcreateCommand: function(){\r\n\t\treturn {\r\n\t\t\tmodifiers:{\r\n\t\t\t\t\"shift\": false,\r\n\t\t\t\t\"alt\": false,\r\n\t\t\t\t\"ctrl\": false,\r\n\t\t\t\t\"meta\": false\r\n\t\t\t},\r\n\t\t\tkeyCode: null\r\n\t\t};\r\n\t},\r\n\tparse: function(shortcut){\r\n\t\tvar commands = [];\r\n\r\n\t\tvar expr = this.getExpressions(this.trim(shortcut));\r\n\t\tfor(var i = 0; i < expr.length; i++){\r\n\t\t\tvar words = this.getWords(expr[i]);\r\n\r\n\t\t\tvar command = this.createCommand();\r\n\r\n\t\t\tfor(var j = 0; j < words.length; j++){\r\n\t\t\t\tif(this.commandKeys[words[j]]){\r\n\t\t\t\t\tcommand.modifiers[words[j]] = true;\r\n\t\t\t\t}else if(this.specialKeys[words[j]]){\r\n\t\t\t\t\tcommand.keyCode = this.specialKeys[words[j]];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcommand.keyCode = words[j].charCodeAt(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tcommands.push(command);\r\n\t\t}\r\n\t\treturn commands;\r\n\t},\r\n\r\n\tgetCommandFromEvent: function(domEvent){\r\n\t\tvar command = this.createCommand();\r\n\t\tcommand.modifiers.shift = !!domEvent.shiftKey;\r\n\t\tcommand.modifiers.alt = !!domEvent.altKey;\r\n\t\tcommand.modifiers.ctrl = !!domEvent.ctrlKey;\r\n\t\tcommand.modifiers.meta = !!domEvent.metaKey;\r\n\t\tcommand.keyCode = domEvent.which || domEvent.keyCode;\r\n\r\n\t\tif(command.keyCode >= 96 && command.keyCode <= 105){\r\n\t\t\t// numpad keys 96-105 -> 48-57\r\n\t\t\tcommand.keyCode -= 48;//convert numpad number code to regular number code\r\n\t\t}\r\n\r\n\t\tvar printableKey = String.fromCharCode(command.keyCode );\r\n\t\tif(printableKey){\r\n\t\t\tcommand.keyCode = printableKey.toLowerCase().charCodeAt(0);\r\n\t\t}\r\n\t\treturn command;\r\n\t},\r\n\r\n\tgetHashFromEvent: function(domEvent){\r\n\t\treturn this.getHash(this.getCommandFromEvent(domEvent));\r\n\t},\r\n\r\n\tgetHash: function(command){\r\n\t\tvar parts = [];\r\n\t\tfor(var i in command.modifiers){\r\n\t\t\tif(command.modifiers[i]){\r\n\t\t\t\tparts.push(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tparts.push(command.keyCode);\r\n\r\n\t\treturn parts.join(this.junctionChar);\r\n\t},\r\n\r\n\tgetExpressions: function(shortcut){\r\n\t\treturn shortcut.split(this.junctionChar);\r\n\t},\r\n\tgetWords: function(term){\r\n\t\treturn term.split(this.combinationChar);\r\n\t},\r\n\ttrim: function(shortcut){\r\n\t\treturn shortcut.replace(/\\s/g, \"\");\r\n\t},\r\n\tjunctionChar:\",\",\r\n\tcombinationChar:\"+\",\r\n\tcommandKeys:{\r\n\t\t\"shift\": 16,\r\n\t\t\"alt\": 18,\r\n\t\t\"ctrl\": 17,\r\n\t\t\"meta\": true\r\n\t},\r\n\tspecialKeys:{\r\n\t\t\"backspace\": 8,\r\n\t\t\"tab\": 9,\r\n\t\t\"enter\": 13,\r\n\t\t\"esc\": 27,\r\n\t\t\"space\": 32,\r\n\t\t\"up\": 38,\r\n\t\t\"down\": 40,\r\n\t\t\"left\": 37,\r\n\t\t\"right\": 39,\r\n\t\t\"home\": 36,\r\n\t\t\"end\": 35,\r\n\t\t\"pageup\": 33,\r\n\t\t\"pagedown\": 34,\r\n\t\t\"delete\": 46,\r\n\t\t\"insert\": 45,\r\n\t\t\"plus\":107,\r\n\t\t\"f1\": 112,\r\n\t\t\"f2\": 113,\r\n\t\t\"f3\": 114,\r\n\t\t\"f4\": 115,\r\n\t\t\"f5\": 116,\r\n\t\t\"f6\": 117,\r\n\t\t\"f7\": 118,\r\n\t\t\"f8\": 119,\r\n\t\t\"f9\": 120,\r\n\t\t\"f10\": 121,\r\n\t\t\"f11\": 122,\r\n\t\t\"f12\": 123\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.EventHandler = {\r\n\t_handlers: null,\r\n\tfindHandler: function(command){\r\n\t\tif(!this._handlers) this._handlers = {};\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\t\tvar hash = shortcuts.getHash(command);\r\n\r\n\t\treturn this._handlers[hash];\r\n\t},\r\n\r\n\tdoAction: function(command, e){\r\n\t\tvar handler = this.findHandler(command);\r\n\t\tif(handler){\r\n\t\t\thandler.call(this, e);\r\n\r\n\t\t\tif (e.preventDefault) e.preventDefault();\r\n\t\t\telse e.returnValue = false;\r\n\r\n\t\t}\r\n\t},\r\n\tbind: function(shortcut, handler){\r\n\t\tif(!this._handlers) this._handlers = {};\r\n\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\r\n\t\tvar commands = shortcuts.parse(shortcut);\r\n\t\tfor(var i = 0; i < commands.length; i++){\r\n\t\t\tthis._handlers[shortcuts.getHash(commands[i])] = handler;\r\n\t\t}\r\n\t},\r\n\tunbind: function(shortcut){\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\r\n\t\tvar commands = shortcuts.parse(shortcut);\r\n\t\tfor(var i = 0; i < commands.length; i++){\r\n\t\t\tif(this._handlers[shortcuts.getHash(commands[i])]){\r\n\t\t\t\tdelete this._handlers[shortcuts.getHash(commands[i])];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tbindAll: function(map){\r\n\t\tfor(var i in map){\r\n\t\t\tthis.bind(i, map[i]);\r\n\t\t}\r\n\t},\r\n\tinitKeys: function(){\r\n\t\tif(!this._handlers)\r\n\t\t\tthis._handlers = {};\r\n\t\tif(this.keys){\r\n\t\t\tthis.bindAll(this.keys);\r\n\t\t}\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n(function(){\r\n\tscheduler.$keyboardNavigation.getFocusableNodes = scheduler._getFocusableNodes;\r\n\r\n\tscheduler.$keyboardNavigation.trapFocus = function trapFocus(root, e){\r\n\t\tif(e.keyCode != 9) return false;\r\n\r\n\t\tvar focusable = scheduler.$keyboardNavigation.getFocusableNodes(root);\r\n\t\tvar currentFocus = document.activeElement;\r\n\t\tvar currentIndex = -1;\r\n\t\tfor(var i = 0; i < focusable.length; i++){\r\n\t\t\tif(focusable[i] == currentFocus){\r\n\t\t\t\tcurrentIndex = i;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar nextIndex, nextItem;\r\n\t\tif(e.shiftKey){\r\n\r\n\t\t\t// back tab\r\n\t\t\t// go to the last element if we focused on the first\r\n\t\t\tnextIndex = (currentIndex <= 0) ? (focusable.length - 1) : (currentIndex - 1);\r\n\r\n\t\t\tnextItem = focusable[nextIndex];\r\n\t\t\tif(nextItem){\r\n\t\t\t\tnextItem.focus();\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\t// forward tab\r\n\t\t\t// forward tab from last element should go back to the first element\r\n\t\t\tnextIndex = (currentIndex >= focusable.length - 1) ? 0 : (currentIndex + 1);\r\n\t\t\tnextItem = focusable[nextIndex];\r\n\t\t\tif(nextItem){\r\n\t\t\t\tnextItem.focus();\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t};\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.marker = {\r\n\tclear: function(){\r\n\t\tvar divs = scheduler.$container.querySelectorAll(\".dhx_focus_slot\");\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tdivs[i].parentNode.removeChild(divs[i]);\r\n\t\t}\r\n\t},\r\n\tcreateElement: function(){\r\n\t\tvar element = document.createElement(\"div\");\r\n\t\telement.setAttribute(\"tabindex\", -1);\r\n\t\telement.className = \"dhx_focus_slot\";\r\n\t\treturn element;\r\n\t},\r\n\r\n\trenderMultiple: function(start, end, method){\r\n\t\tvar divs = [];\r\n\t\tvar currentStart = new Date(start);\r\n\t\tvar currentEnd = new Date(Math.min(end.valueOf(), scheduler.date.add(scheduler.date.day_start(new Date(start)), 1, \"day\").valueOf()));\r\n\t\twhile(currentStart.valueOf() < end.valueOf()){\r\n\r\n\t\t\tdivs = divs.concat(method.call(this, currentStart, new Date(Math.min(currentEnd.valueOf(), end.valueOf()))));\r\n\t\t\tcurrentStart = scheduler.date.day_start(scheduler.date.add(currentStart, 1, \"day\"));\r\n\r\n\t\t\tcurrentEnd = scheduler.date.day_start(scheduler.date.add(currentStart, 1, \"day\"));\r\n\t\t\tcurrentEnd = new Date(Math.min(currentEnd.valueOf(), end.valueOf()));\r\n\t\t}\r\n\r\n\t\treturn divs;\r\n\t},\r\n\r\n\r\n\trender: function(start, end, section){\r\n\t\tthis.clear();\r\n\t\tvar divs = [];\r\n\r\n\t\tvar modes = scheduler.$keyboardNavigation.TimeSlot.prototype._modes;\r\n\t\tvar view = scheduler.$keyboardNavigation.TimeSlot.prototype._getMode();\r\n\t\tswitch (view){\r\n\t\t\tcase modes.units:\r\n\t\t\t\tdivs = this.renderVerticalMarker(start, end, section);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.timeline:\r\n\t\t\t\tdivs = this.renderTimelineMarker(start, end, section);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.year:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderYearMarker));\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.month:\r\n\t\t\t\tdivs = this.renderMonthMarker(start, end);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.weekAgenda:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderWeekAgendaMarker));\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.list:\r\n\t\t\t\tdivs = this.renderAgendaMarker(start, end);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.dayColumns:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderVerticalMarker));\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tthis.addWaiAriaLabel(divs, start, end, section);\r\n\t\tthis.addDataAttributes(divs, start, end, section);\r\n\r\n\t\tfor(var i = divs.length - 1; i >= 0; i--){\r\n\t\t\tif(divs[i].offsetWidth){\r\n\t\t\t\treturn divs[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t},\r\n\r\n\taddDataAttributes: function(divs, start, end, section){\r\n\t\tvar dateToStr = scheduler.date.date_to_str(scheduler.config.api_date);\r\n\r\n\t\tvar from = dateToStr(start),\r\n\t\t\tto = dateToStr(end);\r\n\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tdivs[i].setAttribute(\"data-start-date\", from);\r\n\t\t\tdivs[i].setAttribute(\"data-end-date\", to);\r\n\t\t\tif(section){\r\n\t\t\t\tdivs[i].setAttribute(\"data-section\", section);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\taddWaiAriaLabel: function(divs, start, end, section){\r\n\t\tvar label = \"\";\r\n\t\tvar state = scheduler.getState();\r\n\t\tvar mode = state.mode;\r\n\r\n\t\tvar dateTimeLabel = false;\r\n\r\n\t\tlabel += scheduler.templates.day_date(start);\r\n\r\n\t\tif((scheduler.date.day_start(new Date(start)).valueOf() != start.valueOf())){\r\n\t\t\tlabel += \" \" + scheduler.templates.hour_scale(start);\r\n\t\t\tdateTimeLabel = true;\r\n\t\t}\r\n\r\n\t\tif((scheduler.date.day_start(new Date(start)).valueOf() != scheduler.date.day_start(new Date(end)).valueOf())){\r\n\r\n\t\t\tlabel += \" - \" + scheduler.templates.day_date(end);\r\n\t\t\tif(dateTimeLabel || (scheduler.date.day_start(new Date(end)).valueOf() != end.valueOf())){\r\n\t\t\t\tlabel += \" \" + scheduler.templates.hour_scale(end);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(section){\r\n\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\t\t\t\tconst timeline = scheduler.matrix[mode];\r\n\t\t\t\tconst sectionObject = timeline.y_unit[timeline.order[section]];\r\n\t\t\t\tlabel += \", \" + scheduler.templates[mode + \"_scale_label\"](sectionObject.key, sectionObject.label, sectionObject);\r\n\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\tconst units = scheduler._props[mode];\r\n\t\t\t\tconst sectionObject = units.options[units.order[section]];\r\n\r\n\t\t\t\tlabel += \", \" + scheduler.templates[mode + \"_scale_text\"](sectionObject.key, sectionObject.label, sectionObject);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tscheduler._waiAria.setAttributes(divs[i], {\r\n\t\t\t\t\"aria-label\": label,\r\n\t\t\t\t\"aria-live\": \"polite\"\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\trenderWeekAgendaMarker: function(start_date, end_date){\r\n\t\tvar divs = scheduler.$container.querySelectorAll(\".dhx_wa_day_cont .dhx_wa_scale_bar\");\r\n\r\n\t\tvar currDate = scheduler.date.week_start(new Date(scheduler.getState().min_date));\r\n\r\n\t\tvar index = -1;\r\n\t\tvar markerDate = scheduler.date.day_start(new Date(start_date));\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tindex++;\r\n\t\t\tif(scheduler.date.day_start(new Date(currDate)).valueOf() == markerDate.valueOf()){\r\n\t\t\t\tbreak;\r\n\t\t\t}else{\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(index != -1) return this._wrapDiv(divs[index]);\r\n\t\treturn [];\r\n\t},\r\n\r\n\t_wrapDiv: function(cell){\r\n\t\tvar marker = this.createElement();\r\n\t\tmarker.style.top = cell.offsetTop + \"px\";\r\n\t\tmarker.style.left = cell.offsetLeft + \"px\";\r\n\t\tmarker.style.width = cell.offsetWidth + \"px\";\r\n\t\tmarker.style.height = cell.offsetHeight + \"px\";\r\n\t\tcell.appendChild(marker);\r\n\t\treturn [marker];\r\n\t},\r\n\trenderYearMarker: function(start_date, end_date){\r\n\t\tvar cell = scheduler._get_year_cell(start_date);\r\n\t\tcell.style.position = \"relative\";\r\n\t\tvar marker = this.createElement();\r\n\t\tmarker.style.top = \"0px\";\r\n\t\tmarker.style.left = \"0px\";\r\n\t\tmarker.style.width = \"100%\";\r\n\t\tmarker.style.height = \"100%\";\r\n\t\tcell.appendChild(marker);\r\n\t\treturn [marker];\r\n\t},\r\n\r\n\trenderAgendaMarker: function(start_date, end_date){\r\n\t\tvar block = this.createElement();\r\n\t\tblock.style.height = \"1px\";\r\n\t\tblock.style.width = \"100%\";\r\n\t\tblock.style.opacity = 1;\r\n\t\tblock.style.top = \"0px\";\r\n\t\tblock.style.left = \"0px\";\r\n\t\tscheduler.$container.querySelector(\".dhx_cal_data\").appendChild(block);\r\n\t\treturn [block];\r\n\t},\r\n\r\n\trenderTimelineMarker: function(start_date, end_date, section){\r\n\t\tvar view_opts = scheduler._lame_copy({}, scheduler.matrix[scheduler._mode]);\r\n\t\tvar areas = view_opts._scales;\r\n\t\t//timespans must always use actual position, not rounded\r\n\t\tview_opts.round_position = false;\r\n\t\tvar blocks = [];\r\n\r\n\t\tvar min_date = start_date ? new Date(start_date) : scheduler._min_date;\r\n\t\tvar max_date = end_date ? new Date(end_date) : scheduler._max_date;\r\n\r\n\t\tif(min_date.valueOf() < scheduler._min_date.valueOf())\r\n\t\t\tmin_date = new Date(scheduler._min_date);\r\n\t\tif(max_date.valueOf() > scheduler._max_date.valueOf())\r\n\t\t\tmax_date = new Date(scheduler._max_date);\r\n\r\n\t\tif(!view_opts._trace_x) return blocks;\r\n\r\n\t\tfor(var i = 0; i < view_opts._trace_x.length; i++){\r\n\t\t\tif(scheduler._is_column_visible(view_opts._trace_x[i]))\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\tif(i == view_opts._trace_x.length)\r\n\t\t\treturn blocks;\r\n\r\n\t\tvar area = areas[section];\r\n\r\n\t\tif (!(min_date < end_date && max_date > start_date))\r\n\t\t\treturn blocks;\r\n\r\n\t\tvar block = this.createElement();\r\n\r\n\t\tlet start_pos;\r\n\t\tlet end_pos;\r\n\r\n\t\tfunction set_date_part(source, target) {\r\n\t\t\t// reset to start of the month in order to prevent month change when target is on 31th day, and source month has only 30 days\r\n\t\t\ttarget.setDate(1);\r\n\r\n\t\t\ttarget.setFullYear(source.getFullYear());\r\n\t\t\ttarget.setMonth(source.getMonth());\r\n\t\t\ttarget.setDate(source.getDate());\r\n\t\t}\r\n\r\n\t\tif(!scheduler.getView().days){\r\n\t\t\tstart_pos = scheduler._timeline_getX({start_date: start_date}, false, view_opts);\r\n\t\t\tend_pos = scheduler._timeline_getX({start_date: end_date}, false, view_opts);\r\n\t\t}else{\r\n\t\t\t// daytimeline\r\n\t\t\tconst tempStart = new Date(start_date);\r\n\t\t\tset_date_part(scheduler._min_date, tempStart);\r\n\t\t\tconst tempEnd = new Date(end_date);\r\n\t\t\tset_date_part(scheduler._min_date, tempEnd);\r\n\t\t\tstart_pos = scheduler._timeline_getX({start_date: tempStart}, false, view_opts);\r\n\t\t\tend_pos = scheduler._timeline_getX({start_date: tempEnd}, false, view_opts);\r\n\t\t}\r\n\r\n\t\tvar height = ((view_opts._section_height[section]-1) || (view_opts.dy - 1));\r\n\r\n\t\tvar top = 0;\r\n\t\tif (scheduler._isRender('cell')){\r\n\t\t\ttop = area.offsetTop;\r\n\t\t\tstart_pos += view_opts.dx;\r\n\t\t\tend_pos += view_opts.dx;\r\n\t\t\tarea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t}else{\r\n\r\n\t\t}\r\n\t\tvar width = Math.max(1, end_pos - start_pos - 1);\r\n\t\tlet direction = \"left\";\r\n\t\tif(scheduler.config.rtl){\r\n\t\t\tdirection = \"right\";\r\n\t\t}\r\n\t\tblock.style.cssText = `height:${height}px; ${direction}:${start_pos}px; width:${width}px; top:${top}px;`;\r\n\r\n\t\tif(area){\r\n\t\t\tarea.appendChild(block);\r\n\t\t\tblocks.push(block);\r\n\t\t}\r\n\r\n\t\treturn blocks;\r\n\t},\r\n\r\n\trenderMonthCell: function(date){\r\n\t\tvar cells = scheduler.$container.querySelectorAll(\".dhx_month_head\");\r\n\r\n\t\tvar divs = [];\r\n\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\tdivs.push(cells[i].parentNode);\r\n\t\t}\r\n\r\n\t\tvar firstDate = scheduler.date.week_start(new Date(scheduler.getState().min_date));\r\n\r\n\t\tvar index = -1;\r\n\t\tvar weekNumber = 0;\r\n\t\tvar dayIndex = -1;\r\n\t\tvar currDate = firstDate;\r\n\t\tvar markerDate = scheduler.date.day_start(new Date(date));\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tindex++;\r\n\r\n\t\t\tif(dayIndex == 6){\r\n\t\t\t\tweekNumber++;\r\n\t\t\t\tdayIndex = 0;\r\n\t\t\t}else{\r\n\t\t\t\tdayIndex++;\r\n\t\t\t}\r\n\r\n\t\t\tif(scheduler.date.day_start(new Date(currDate)).valueOf() == markerDate.valueOf()){\r\n\t\t\t\tbreak;\r\n\t\t\t}else{\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(index == -1){\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tvar left = scheduler._colsS[dayIndex];\r\n\t\tvar top = scheduler._colsS.heights[weekNumber];\r\n\r\n\t\tvar div = this.createElement();\r\n\t\tdiv.style.top = top + \"px\";\r\n\t\tdiv.style.left = left + \"px\";\r\n\t\tdiv.style.width = scheduler._cols[dayIndex] + \"px\";\r\n\t\tdiv.style.height = ((scheduler._colsS.heights[weekNumber + 1] - top) || scheduler._colsS.height) + \"px\" ;\r\n\r\n\r\n\t\tvar container = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\r\n\t\tvar datatable = container.querySelector(\".dhx_cal_month_table\");\r\n\t\tif(datatable.nextSibling){\r\n\t\t\tcontainer.insertBefore(div, datatable.nextSibling);\r\n\t\t}else{\r\n\t\t\tcontainer.appendChild(div);\r\n\t\t}\r\n\t\treturn div;\r\n\t},\r\n\trenderMonthMarker: function(start_date, end_date){\r\n\t\tvar res = [];\r\n\t\tvar currentDate = start_date;\r\n\t\twhile(currentDate.valueOf() < end_date.valueOf()){\r\n\t\t\tres.push(this.renderMonthCell(currentDate));\r\n\t\t\tcurrentDate = scheduler.date.add(currentDate, 1, \"day\");\r\n\t\t}\r\n\t\treturn res;\r\n\t},\r\n\r\n\trenderVerticalMarker: function(start_date, end_date, section){\r\n\t\tvar index = scheduler.locate_holder_day(start_date);\r\n\r\n\t\tvar divs = [];\r\n\t\tvar area = null;\r\n\r\n\t\tvar c = scheduler.config;\r\n\t\tif(scheduler._ignores[index]) return divs;\r\n\r\n\t\tif (scheduler._props && scheduler._props[scheduler._mode] && section) {\r\n\t\t\tvar view = scheduler._props[scheduler._mode];\r\n\t\t\tindex = view.order[section];\r\n\r\n\t\t\tvar inner_index = view.order[section];\r\n\t\t\tif(!(view.days > 1)){\r\n\t\t\t\tindex = inner_index;\r\n\t\t\t\tif (view.size && (index > view.position+view.size)) {\r\n\t\t\t\t\tindex = 0;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t//var units_l = view.size || view.options.length;\r\n\r\n\t\t\t\tindex = scheduler.locate_holder_day(start_date) + inner_index;\r\n\t\t\t\t//index = index*units_l + inner_index;\r\n\t\t\t}\r\n\t\t}\r\n\t\tarea = scheduler.locate_holder(index);\r\n\t\tif(!area || area.querySelector(\".dhx_scale_hour\")){\r\n\t\t\t// hour scale instead of date column\r\n\t\t\treturn document.createElement(\"div\");\r\n\t\t}\r\n\r\n\t\tvar start = Math.max((start_date.getHours()*60 + start_date.getMinutes()), c.first_hour*60);\r\n\r\n\r\n\t\tvar end = Math.min((end_date.getHours()*60 + end_date.getMinutes()), c.last_hour*60);\r\n\t\tif(!end && (scheduler.date.day_start(new Date(end_date)).valueOf() > scheduler.date.day_start(new Date(start_date)).valueOf())){\r\n\t\t\tend = c.last_hour*60;\r\n\t\t}\r\n\r\n\t\tif (end <= start) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tvar block = this.createElement();\r\n\r\n\t\t// +1 for working with section which really takes up whole height (as % would be == 0)\r\n\t\tvar all_hours_height = scheduler.config.hour_size_px*c.last_hour + 1;\r\n\t\tvar hour_ms = 60*60*1000;\r\n\t\tblock.style.top = (Math.round((start*60*1000-scheduler.config.first_hour*hour_ms)*scheduler.config.hour_size_px/hour_ms) % all_hours_height) + \"px\";\r\n\t\tblock.style.lineHeight = block.style.height = Math.max((Math.round(((end-start)*60*1000)*scheduler.config.hour_size_px/hour_ms)) % all_hours_height, 1)+\"px\";\r\n\t\tblock.style.width = \"100%\";\r\n\t\tarea.appendChild(block);\r\n\t\tdivs.push(block);\r\n\t\treturn divs[0];\r\n\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode = function(){};\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.EventHandler,\r\n\t{\r\n\t\tgetDefaultNode: function(){\r\n\t\t\tvar node = new scheduler.$keyboardNavigation.TimeSlot();\r\n\r\n\t\t\tif(!node.isValid()){\r\n\t\t\t\tnode = node.fallback();\r\n\t\t\t}\r\n\t\t\treturn node;\r\n\t\t},\r\n\r\n\t\t_modes:{\r\n\t\t\tmonth: \"month\",\r\n\t\t\tyear: \"year\",\r\n\t\t\tdayColumns: \"dayColumns\",\r\n\t\t\ttimeline:\"timeline\",\r\n\t\t\tunits:\"units\",\r\n\t\t\tweekAgenda: \"weekAgenda\",\r\n\t\t\tlist: \"list\"\r\n\t\t},\r\n\t\tgetMode: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tvar mode = state.mode;\r\n\t\t\tif((scheduler.matrix && scheduler.matrix[mode])){\r\n\t\t\t\treturn this._modes.timeline;\r\n\t\t\t} else if((scheduler._props && scheduler._props[mode])){\r\n\t\t\t\treturn this._modes.units;\r\n\t\t\t}else if(mode == \"month\"){\r\n\t\t\t\treturn this._modes.month;\r\n\t\t\t}else if(mode == \"year\"){\r\n\t\t\t\treturn this._modes.year;\r\n\t\t\t}else if(mode == \"week_agenda\"){\r\n\t\t\t\treturn this._modes.weekAgenda;\r\n\t\t\t}else if(mode == \"map\" || mode == \"agenda\" || (scheduler._grid && scheduler[\"grid_\" + mode])){\r\n\t\t\t\treturn this._modes.list;\r\n\t\t\t}else{\r\n\t\t\t\treturn this._modes.dayColumns;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.focus();\r\n\t\t},\r\n\r\n\t\tblur: function(){\r\n\r\n\t\t},\r\n\r\n\t\tdisable: function(){\r\n\t\t\tscheduler.$container.setAttribute(\"tabindex\", \"0\");\r\n\t\t},\r\n\t\tenable: function(){\r\n\t\t\tif(scheduler.$container)\r\n\t\t\t\tscheduler.$container.removeAttribute(\"tabindex\");\r\n\t\t},\r\n\t\tisEnabled: function(){\r\n\t\t\treturn scheduler.$container.hasAttribute(\"tabindex\");\r\n\t\t},\r\n\r\n\r\n\t\t_compareEvents: function(a, b){\r\n\t\t\tif (a.start_date.valueOf() == b.start_date.valueOf())\r\n\t\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\t\treturn a.start_date.valueOf() > b.start_date.valueOf() ? 1 : -1;\r\n\t\t},\r\n\r\n\t\t_pickEvent: function(from, to, startId, reverse){\r\n\t\t\tvar range = scheduler.getState();\r\n\t\t\tfrom = new Date(Math.max(range.min_date.valueOf(), from.valueOf()));\r\n\t\t\tto = new Date(Math.min(range.max_date.valueOf(), to.valueOf()));\r\n\r\n\t\t\tvar evs = scheduler.getEvents(from, to);\r\n\t\t\tevs.sort(this._compareEvents);\r\n\t\t\tif(reverse){\r\n\t\t\t\tevs = evs.reverse();\r\n\t\t\t}\r\n\r\n\t\t\tvar trim = !!startId;\r\n\t\t\tfor(var i =0; i < evs.length && trim; i++){\r\n\t\t\t\tif(evs[i].id == startId){\r\n\t\t\t\t\ttrim = false;\r\n\t\t\t\t}\r\n\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\r\n\t\t\tfor(var i = 0; i < evs.length; i++){\r\n\t\t\t\tvar eventElement = new scheduler.$keyboardNavigation.Event(evs[i].id);\r\n\t\t\t\tif(eventElement.getNode())\r\n\t\t\t\t\treturn evs[i];\r\n\t\t\t}\r\n\r\n\t\t\treturn null;\r\n\t\t},\r\n\r\n\t\tnextEventHandler: function(id){\r\n\t\t\tvar activeNode = scheduler.$keyboardNavigation.dispatcher.activeNode;\r\n\r\n\t\t\tvar startId = id || (activeNode && activeNode.eventId);\r\n\r\n\t\t\tvar nextEvent = null;\r\n\t\t\tif(startId && scheduler.getEvent(startId)){\r\n\t\t\t\tvar currEvent = scheduler.getEvent(startId);\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tcurrEvent.start_date,\r\n\t\t\t\t\tscheduler.date.add(currEvent.start_date, 1, \"year\"),\r\n\t\t\t\t\tcurrEvent.id,\r\n\t\t\t\t\tfalse\r\n\t\t\t\t);\r\n\r\n\t\t\t}\r\n\t\t\tif(!nextEvent && !id){\r\n\t\t\t\tvar visibleDates = scheduler.getState();\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tvisibleDates.min_date,\r\n\t\t\t\t\tscheduler.date.add(visibleDates.min_date, 1, \"year\"),\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\tfalse\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tif(nextEvent){\r\n\r\n\t\t\t\tvar nextEv = new scheduler.$keyboardNavigation.Event(nextEvent.id);\r\n\t\t\t\tif(!nextEv.isValid()){// not visible event\r\n\t\t\t\t\tthis.nextEventHandler(nextEvent.id);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(activeNode){activeNode.blur();}\r\n\t\t\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(nextEv);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tprevEventHandler: function(id){\r\n\t\t\tvar activeNode = scheduler.$keyboardNavigation.dispatcher.activeNode;\r\n\r\n\t\t\tvar startId = id || (activeNode && activeNode.eventId);\r\n\r\n\t\t\tvar nextEvent = null;\r\n\t\t\tif(startId && scheduler.getEvent(startId)){\r\n\t\t\t\tvar currEvent = scheduler.getEvent(startId);\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tscheduler.date.add(currEvent.end_date, -1, \"year\"),\r\n\t\t\t\t\tcurrEvent.end_date,\r\n\t\t\t\t\tcurrEvent.id,\r\n\t\t\t\t\ttrue\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\tif(!nextEvent && !id){\r\n\t\t\t\tvar visibleDates = scheduler.getState();\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tscheduler.date.add(visibleDates.max_date, -1, \"year\"),\r\n\t\t\t\t\tvisibleDates.max_date,\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\ttrue\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tif(nextEvent){\r\n\t\t\t\tvar nextEv = new scheduler.$keyboardNavigation.Event(nextEvent.id);\r\n\t\t\t\tif(!nextEv.isValid()){// not visible event\r\n\t\t\t\t\tthis.prevEventHandler(nextEvent.id);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(activeNode){activeNode.blur();}\r\n\t\t\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(nextEv);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\r\n\t\t\t\"alt+1, alt+2, alt+3, alt+4, alt+5, alt+6, alt+7, alt+8, alt+9\": function(e){\r\n\t\t\t\tvar tabs = scheduler.$keyboardNavigation.HeaderCell.prototype.getNodes(\".dhx_cal_navline .dhx_cal_tab\");\r\n\t\t\t\tvar key = e.key;\r\n\t\t\t\tif(key === undefined){\r\n\t\t\t\t\tkey = e.keyCode - 48;\r\n\t\t\t\t}\r\n\t\t\t\tif(tabs[key*1 - 1]){\r\n\t\t\t\t\ttabs[key*1 - 1].click();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+left,meta+left\": function(e){\r\n\t\t\t\tscheduler._click.dhx_cal_prev_button();\r\n\t\t\t},\r\n\t\t\t\"ctrl+right,meta+right\": function(e){\r\n\t\t\t\tscheduler._click.dhx_cal_next_button();\r\n\t\t\t},\r\n\t\t\t\"ctrl+up,meta+up\":function(e){\r\n\t\t\t\tvar dataArea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tdataArea.scrollTop -= 20;\r\n\t\t\t},\r\n\t\t\t\"ctrl+down,meta+down\": function(e){\r\n\t\t\t\tvar dataArea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tdataArea.scrollTop += 20;\r\n\t\t\t},\r\n\r\n\r\n\t\t\t\"e\": function(){\r\n\t\t\t\tthis.nextEventHandler();\r\n\t\t\t},\r\n\r\n\t\t\t\"home\": function(){\r\n\t\t\t\tscheduler.setCurrentView(new Date());\r\n\t\t\t},\r\n\r\n\t\t\t\"shift+e\": function(){\r\n\t\t\t\tthis.prevEventHandler();\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+enter,meta+enter\": function(){\r\n\t\t\t\tscheduler.addEventNow({start_date: new Date(scheduler.getState().date)});\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+c,meta+c\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t},\r\n\t\t\t\"ctrl+v,meta+v\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t},\r\n\t\t\t\"ctrl+x,meta+x\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode.prototype.bindAll(scheduler.$keyboardNavigation.SchedulerNode.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.KeyNavNode = function(){};\r\n\r\nscheduler.$keyboardNavigation.KeyNavNode.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.EventHandler,\r\n\t{\r\n\t\tisValid: function(){\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\treturn null;\r\n\t\t},\r\n\r\n\t\tmoveTo: function (element) {\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(element);\r\n\t\t},\r\n\r\n\t\tcompareTo: function(b){\r\n\t\t\t// good enough comparison of two random objects\r\n\t\t\tif(!b) return false;\r\n\t\t\tfor(var i in this){\r\n\t\t\t\tif(!!this[i] != !!b[i]) return false;\r\n\r\n\t\t\t\tvar canStringifyThis = !!(this[i] && this[i].toString);\r\n\t\t\t\tvar canStringifyThat = !!(b[i] && b[i].toString);\r\n\t\t\t\tif(canStringifyThat != canStringifyThis) return false;\r\n\t\t\t\tif(!(canStringifyThat && canStringifyThis)) {\r\n\t\t\t\t\tif(b[i] != this[i]) return false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(b[i].toString() != this[i].toString())\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\tgetNode: function(){},\r\n\t\tfocus: function(){\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif(node){\r\n\t\t\t\tnode.setAttribute(\"tabindex\", \"-1\");\r\n\t\t\t\t//node.className += \" scheduler_focused\";\r\n\t\t\t\tif(node.focus) node.focus();\r\n\t\t\t}\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif(node){\r\n\t\t\t\tnode.setAttribute(\"tabindex\", \"-1\");\r\n\t\t\t\t//node.className = (node.className || \"\").replace(/ ?scheduler_focused/g, \"\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.HeaderCell = function(index){\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.HeaderCell.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\tgetNode: function(index){\r\n\t\t\tindex = index || this.index || 0;\r\n\t\t\tvar nodes = this.getNodes();\r\n\t\t\tif(nodes[index]) return nodes[index];\r\n\t\t},\r\n\r\n\t\tgetNodes: function(selector){\r\n\t\t\tselector = selector || [\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_prev_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_next_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_today_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_tab\"\r\n\t\t\t\t].join(\", \");\r\n\r\n\t\t\tvar nodes = Array.prototype.slice.call(scheduler.$container.querySelectorAll(selector));\r\n\t\t\tnodes.sort(function(a, b){\r\n\t\t\t\treturn a.offsetLeft - b.offsetLeft;\r\n\t\t\t});\r\n\t\t\treturn nodes;\r\n\t\t},\r\n\r\n\t\t_handlers:null,\r\n\r\n\t\tisValid: function(){\r\n\t\t\treturn !!this.getNode(this.index);\r\n\t\t},\r\n\t\tfallback:function(){\r\n\t\t\tvar defaultCell = this.getNode(0);\r\n\t\t\tif(!defaultCell){\r\n\t\t\t\tdefaultCell = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}\r\n\t\t\treturn defaultCell;\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tvar newIndex = this.index - 1;\r\n\t\t\t\tif(newIndex < 0){\r\n\t\t\t\t\tnewIndex = this.getNodes().length - 1;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.HeaderCell(newIndex));\r\n\r\n\t\t\t},\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tvar newIndex = this.index + 1;\r\n\t\t\t\tif(newIndex >= this.getNodes().length){\r\n\t\t\t\t\tnewIndex = 0;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.HeaderCell(newIndex));\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t},\r\n\r\n\t\t\t\"enter\": function(){\r\n\t\t\t\tvar node = this.getNode();\r\n\t\t\t\tif(node){\r\n\t\t\t\t\tnode.click();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.HeaderCell.prototype.bindAll(scheduler.$keyboardNavigation.HeaderCell.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.Event = function(id){\r\n\tthis.eventId = null;\r\n\tif(scheduler.getEvent(id)){\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tthis.start = new Date(ev.start_date);\r\n\t\tthis.end = new Date(ev.end_date);\r\n\r\n\t\tthis.section = this._getSection(ev);\r\n\t\tthis.eventId = id;\r\n\t}\r\n};\r\n\r\nscheduler.$keyboardNavigation.Event.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\t_getNodes: function(){\r\n\t\t\treturn Array.prototype.slice.call(scheduler.$container.querySelectorAll(\"[\"+scheduler.config.event_attribute+\"]\"));\r\n\t\t},\r\n\r\n\t\t_modes: scheduler.$keyboardNavigation.SchedulerNode.prototype._modes,\r\n\r\n\t\tgetMode: scheduler.$keyboardNavigation.SchedulerNode.prototype.getMode,\r\n\r\n\t\t_handlers: null,\r\n\t\tisValid: function(){\r\n\t\t\treturn !!(scheduler.getEvent(this.eventId) && this.getNode());\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\tvar eventNode = this._getNodes()[0];\r\n\t\t\tvar defaultElement = null;\r\n\t\t\tif(!eventNode || !(scheduler._locate_event(eventNode))){\r\n\t\t\t\tdefaultElement = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}else{\r\n\t\t\t\tvar id = scheduler._locate_event(eventNode);\r\n\t\t\t\tdefaultElement = new scheduler.$keyboardNavigation.Event(id);\r\n\t\t\t}\r\n\r\n\t\t\treturn defaultElement;\r\n\t\t},\r\n\r\n\t\tisScrolledIntoView: function (el) {\r\n\t\t\tvar eventBox = el.getBoundingClientRect();\r\n\t\t\tvar viewPort = scheduler.$container.querySelector(\".dhx_cal_data\").getBoundingClientRect();\r\n\t\t\t\r\n\t\t\tif(eventBox.bottom < viewPort.top || eventBox.top > viewPort.bottom){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\tgetNode: function(){\r\n\r\n\t\t\tvar idSelector = \"[\"+scheduler.config.event_attribute+\"='\"+this.eventId+\"']\";\r\n\r\n\t\t\tvar inlineEditor = scheduler.$keyboardNavigation.dispatcher.getInlineEditor(this.eventId);\r\n\t\t\tif(inlineEditor){// is inline editor visible\r\n\t\t\t\treturn inlineEditor;\r\n\t\t\t}else{\r\n\t\t\t\tif(scheduler.isMultisectionEvent && scheduler.isMultisectionEvent(scheduler.getEvent(this.eventId))){\r\n\t\t\t\t\tvar nodes = scheduler.$container.querySelectorAll(idSelector);\r\n\t\t\t\t\tfor(var i = 0; i < nodes.length; i++){\r\n\t\t\t\t\t\tif(this.isScrolledIntoView(nodes[i])){\r\n\t\t\t\t\t\t\treturn nodes[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn nodes[0];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn scheduler.$container.querySelector(idSelector);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tvar event = scheduler.getEvent(this.eventId);\r\n\r\n\t\t\tvar calendar = scheduler.getState();\r\n\t\t\tif(event.start_date.valueOf() > calendar.max_date.valueOf() || event.end_date.valueOf() <= calendar.min_date.valueOf()){\r\n\t\t\t\tscheduler.setCurrentView(event.start_date);\r\n\t\t\t}\r\n\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif (this.isScrolledIntoView(node)) {\r\n\t\t\t\tscheduler.$keyboardNavigation.dispatcher.keepScrollPosition((function(){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\t\t}).bind(this));\r\n\t\t\t} else {\r\n\t\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\t}\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\r\n\r\n\t\t_getSection: function(ev){\r\n\t\t\tvar section = null;\r\n\t\t\tvar mode = scheduler.getState().mode;\r\n\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\t\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\t\tsection = ev[timeline.y_property];\r\n\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\tvar unit = scheduler._props[mode];\r\n\t\t\t\tsection = ev[unit.map_to];\r\n\t\t\t}\r\n\t\t\treturn section;\r\n\t\t},\r\n\t\t_moveToSlot: function(dir){\r\n\t\t\tvar ev = scheduler.getEvent(this.eventId);\r\n\t\t\tif(ev){\r\n\t\t\t\tvar section =this._getSection(ev);\r\n\t\t\t\tvar slot = new scheduler.$keyboardNavigation.TimeSlot(ev.start_date, null, section);\r\n\t\t\t\tthis.moveTo(slot.nextSlot(slot, dir));\r\n\t\t\t}else{\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tthis._moveToSlot(\"left\");\r\n\t\t\t},\r\n\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tthis._moveToSlot(\"right\");\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\t\t\t\tif(this.getMode() == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis._moveToSlot(\"down\");\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"space\": function(){\r\n\t\t\t\tvar node = this.getNode();\r\n\t\t\t\tif(node && node.click){\r\n\t\t\t\t\tnode.click();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"up\": function () {\r\n\t\t\t\tif(this.getMode() == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis._moveToSlot(\"up\");\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"delete\": function(){\r\n\t\t\t\tif(scheduler.getEvent(this.eventId)) {\r\n\t\t\t\t\tscheduler._click.buttons[\"delete\"](this.eventId);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t// open lightbox\r\n\t\t\t\"enter\": function () {\r\n\t\t\t\tif(scheduler.getEvent(this.eventId)) {\r\n\t\t\t\t\tscheduler.showLightbox(this.eventId);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\nscheduler.$keyboardNavigation.Event.prototype.bindAll(scheduler.$keyboardNavigation.Event.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.TimeSlot = function(from, to, section, movingDate){\r\n\tvar state = scheduler.getState();\r\n\tvar timeline = scheduler.matrix && scheduler.matrix[state.mode];\r\n\r\n\tif(!from){\r\n\t\tfrom = this.getDefaultDate();\r\n\t}\r\n\r\n\tif(!to){\r\n\r\n\t\tif(timeline){\r\n\t\t\tto = scheduler.date.add(from, timeline.x_step, timeline.x_unit);\r\n\t\t}else{\r\n\t\t\tto = scheduler.date.add(from, scheduler.config.key_nav_step, \"minute\");\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tthis.section = section || this._getDefaultSection();\r\n\tthis.start_date = new Date(from);\r\n\tthis.end_date = new Date(to);\r\n\tthis.movingDate = movingDate || null;\r\n};\r\n\r\nscheduler.$keyboardNavigation.TimeSlot.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\t_handlers:null,\r\n\r\n\t\tgetDefaultDate: function(){\r\n\t\t\tvar from;\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar visibleTime = new Date(state.date);\r\n\t\t\tvisibleTime.setSeconds(0);\r\n\t\t\tvisibleTime.setMilliseconds(0);\r\n\r\n\t\t\tvar nowTime = new Date();\r\n\t\t\tnowTime.setSeconds(0);\r\n\t\t\tnowTime.setMilliseconds(0);\r\n\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[state.mode];\r\n\t\t\tvar showNowTime = false;\r\n\t\t\tif(visibleTime.valueOf() === nowTime.valueOf()){\r\n\t\t\t\tshowNowTime = true;\r\n\t\t\t}\r\n\r\n\t\t\tif(timeline){\r\n\t\t\t\tif(showNowTime){\r\n\t\t\t\t\tif(timeline.x_unit === \"day\"){\r\n\t\t\t\t\t\tnowTime.setHours(0);\r\n\t\t\t\t\t\tnowTime.setMinutes(0);\r\n\t\t\t\t\t}else if(timeline.x_unit === \"hour\"){\r\n\t\t\t\t\t\tnowTime.setMinutes(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfrom = nowTime;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfrom = scheduler.date[timeline.name + \"_start\"](new Date(state.date));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfrom = this.findVisibleColumn(from);\r\n\t\t\t}else{\r\n\t\t\t\tfrom = new Date(scheduler.getState().min_date);\r\n\t\t\t\tif(showNowTime){\r\n\t\t\t\t\tfrom = nowTime;\r\n\t\t\t\t}\r\n\t\t\t\tfrom = this.findVisibleColumn(from);\r\n\t\t\t\tif(!showNowTime){\r\n\t\t\t\t\tfrom.setHours(scheduler.config.first_hour);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(!scheduler._table_view){\r\n\t\t\t\t\tvar dataContainer = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\t\tif(dataContainer.scrollTop){\r\n\t\t\t\t\t\tfrom.setHours(scheduler.config.first_hour + Math.ceil(dataContainer.scrollTop / scheduler.config.hour_size_px));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn from;\r\n\t\t},\r\n\r\n\t\tclone: function(timeslot){\r\n\t\t\treturn new scheduler.$keyboardNavigation.TimeSlot(timeslot.start_date, timeslot.end_date, timeslot.section, timeslot.movingDate);\r\n\t\t},\r\n\t\t_getMultisectionView: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view;\r\n\t\t\tif(scheduler._props && scheduler._props[state.mode]) {\r\n\t\t\t\tview = scheduler._props[state.mode];\r\n\t\t\t}else if(scheduler.matrix && scheduler.matrix[state.mode]){\r\n\t\t\t\tview = scheduler.matrix[state.mode];\r\n\t\t\t}\r\n\t\t\treturn view;\r\n\t\t},\r\n\r\n\t\t_getDefaultSection: function(){\r\n\t\t\tvar section = null;\r\n\t\t\tvar view = this._getMultisectionView();\r\n\t\t\tif(view && !section){\r\n\t\t\t\tsection = this._getNextSection();\r\n\t\t\t}\r\n\t\t\treturn section;\r\n\t\t},\r\n\r\n\t\t_getNextSection: function(sectionId, dir){\r\n\t\t\tvar view = this._getMultisectionView();\r\n\t\t\tvar currentIndex = view.order[sectionId];\r\n\t\t\tvar nextIndex = currentIndex;\r\n\t\t\tif(currentIndex !== undefined){\r\n\t\t\t\tnextIndex = currentIndex + dir;\r\n\t\t\t}else{\r\n\t\t\t\tnextIndex = (view.size && view.position) ? view.position : 0;\r\n\t\t\t}\r\n\r\n\t\t\tif(nextIndex < 0){\r\n\t\t\t\tnextIndex = 0;\r\n\t\t\t}\r\n\t\t\tvar options = view.options || view.y_unit;\r\n\r\n\t\t\tif(nextIndex >= options.length){\r\n\t\t\t\tnextIndex = options.length - 1;\r\n\t\t\t}\r\n\t\t\t//nextIndex = nextIndex < 0 ? nextIndex = (view.options || view.y_unit).length -1 : nextIndex;\r\n\r\n\t\t\tif(options[nextIndex]){\r\n\t\t\t\treturn options[nextIndex].key;\r\n\t\t\t}else{\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar isInRange = !(this.start_date.valueOf() < state.min_date.valueOf() || this.start_date.valueOf() >= state.max_date.valueOf());\r\n\r\n\t\t\tif(!isInRange) return false;\r\n\r\n\r\n\t\t\tif(!this.isVisible(this.start_date, this.end_date)) return false;\r\n\r\n\t\t\tvar view = this._getMultisectionView();\r\n\r\n\t\t\tif(view){\r\n\t\t\t\treturn (view.order[this.section] !== undefined);\r\n\t\t\t}else{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\tfallback:function(){\r\n\r\n\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(!defaultSlot.isValid()){\r\n\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t}else{\r\n\t\t\t\treturn defaultSlot;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tgetNodes: function(){\r\n\t\t\treturn Array.prototype.slice.call(scheduler.$container.querySelectorAll(\".dhx_focus_slot\"));\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\treturn this.getNodes()[0];\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tif(this.section && scheduler.getView() && scheduler.getView().smart_rendering && scheduler.getView().scrollTo && !scheduler.$container.querySelector(`[data-section-id=\"${this.section}\"]`)){\r\n\t\t\t\tscheduler.getView().scrollTo({section: this.section});\r\n\t\t\t}\r\n\t\t\tscheduler.$keyboardNavigation.marker.render(this.start_date, this.end_date, this.section);\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\tscheduler.$keyboardNavigation._pasteDate = this.start_date;\r\n\t\t\tscheduler.$keyboardNavigation._pasteSection = this.section;\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t\tscheduler.$keyboardNavigation.marker.clear();\r\n\t\t},\r\n\r\n\t\t_modes: scheduler.$keyboardNavigation.SchedulerNode.prototype._modes,\r\n\r\n\t\t_getMode: scheduler.$keyboardNavigation.SchedulerNode.prototype.getMode,\r\n\r\n\t\taddMonthDate: function(date, dir, extend){\r\n\t\t\tvar res;\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tres = scheduler.date.add(date, -1, \"week\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tres = scheduler.date.add(date, 1, \"week\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tres = scheduler.date.day_start(scheduler.date.add(date, -1, \"day\"));\r\n\t\t\t\t\tres = this.findVisibleColumn(res, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tres = scheduler.date.day_start(scheduler.date.add(date, 1, \"day\"));\r\n\t\t\t\t\tres = this.findVisibleColumn(res, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tres = scheduler.date.day_start(new Date(date));\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tif(date.valueOf() < state.min_date.valueOf() || (!extend && date.valueOf() >= state.max_date.valueOf())){\r\n\t\t\t\tres = new Date(state.min_date);\r\n\t\t\t}\r\n\r\n\t\t\treturn res;\r\n\t\t},\r\n\r\n\t\tnextMonthSlot: function(slot, dir, extend){\r\n\r\n\t\t\tvar start, end;\r\n\t\t\tstart = this.addMonthDate(slot.start_date, dir, extend);\r\n\r\n\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\tend = new Date(start);\r\n\t\t\tend.setHours(scheduler.config.last_hour);\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\r\n\t\t_alignTimeSlot: function(date, minDate, unit, step){\r\n\t\t\tvar currentDate = new Date(minDate);\r\n\t\t\twhile(currentDate.valueOf() < date.valueOf()){\r\n\t\t\t\tcurrentDate = scheduler.date.add(currentDate, step, unit);\r\n\t\t\t}\r\n\r\n\t\t\tif(currentDate.valueOf() > date.valueOf()){\r\n\t\t\t\tcurrentDate = scheduler.date.add(currentDate, -step, unit);\r\n\t\t\t}\r\n\r\n\t\t\treturn currentDate;\r\n\t\t},\r\n\r\n\t\tnextTimelineSlot: function(slot, dir, extend){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view = scheduler.matrix[state.mode];\r\n\r\n\t\t\tvar startDate = this._alignTimeSlot(slot.start_date, scheduler.date[view.name + \"_start\"](new Date(slot.start_date)), view.x_unit, view.x_step);\r\n\t\t\tvar endDate = this._alignTimeSlot(slot.end_date, scheduler.date[view.name + \"_start\"](new Date(slot.end_date)), view.x_unit, view.x_step);\r\n\r\n\t\t\tif(endDate.valueOf() <= startDate.valueOf()){\r\n\t\t\t\tendDate = scheduler.date.add(startDate, view.x_step, view.x_unit);\r\n\t\t\t}\r\n\t\t\tvar newPos = this.clone(slot);\r\n\t\t\tnewPos.start_date = startDate;\r\n\t\t\tnewPos.end_date = endDate;\r\n\t\t\tnewPos.section = slot.section || this._getNextSection();\r\n\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tnewPos.section = this._getNextSection(slot.section, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tnewPos.section = this._getNextSection(slot.section, +1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tnewPos.start_date = this.findVisibleColumn(scheduler.date.add(newPos.start_date, -view.x_step, view.x_unit), -1);\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tnewPos.start_date = this.findVisibleColumn(scheduler.date.add(newPos.start_date, view.x_step, view.x_unit), 1);\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(newPos.start_date.valueOf() < state.min_date.valueOf() || newPos.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tif(extend && newPos.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\t\tnewPos.start_date = new Date(state.max_date);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tnewPos.start_date = scheduler.date[state.mode + \"_start\"](scheduler.date.add(state.date, dir == \"left\" ? -1 : 1, state.mode));\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn newPos;\r\n\t\t},\r\n\r\n\t\tnextUnitsSlot: function(slot, dir, extend){\r\n\t\t\tvar newPos = this.clone(slot);\r\n\t\t\tnewPos.section = slot.section || this._getNextSection();\r\n\r\n\t\t\tvar section = slot.section || this._getNextSection();\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view = scheduler._props[state.mode];\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tsection = this._getNextSection(slot.section, -1);\r\n\t\t\t\t\tvar optionsCount = view.size ? (view.size - 1) : view.options.length;\r\n\r\n\t\t\t\t\tif(view.days > 1 && (view.order[section] == optionsCount - 1)){\r\n\t\t\t\t\t\tif(scheduler.date.add(slot.start_date, -1, \"day\").valueOf() >= state.min_date.valueOf()){\r\n\t\t\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tsection = this._getNextSection(slot.section, 1);\r\n\t\t\t\t\tif(view.days > 1 && !view.order[section]){\r\n\t\t\t\t\t\tif(scheduler.date.add(slot.start_date, 1, \"day\").valueOf() < state.max_date.valueOf()){\r\n\t\t\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\tsection = slot.section;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tnewPos.section = section;\r\n\t\t\treturn newPos;\r\n\t\t},\r\n\r\n\t\t_moveDate: function(oldDate, dir){\r\n\t\t\tvar newDate = this.findVisibleColumn(scheduler.date.add(oldDate, dir, \"day\"), dir);\r\n\t\t\tnewDate.setHours(oldDate.getHours());\r\n\t\t\tnewDate.setMinutes(oldDate.getMinutes());\r\n\t\t\treturn newDate;\r\n\t\t},\r\n\r\n\t\tisBeforeLastHour: function(date, isStartDate){\r\n\t\t\tvar minutes = date.getMinutes(),\r\n\t\t\t\thours = date.getHours(),\r\n\t\t\t\tlast_hour = scheduler.config.last_hour;\r\n\t\t\treturn (hours < last_hour || (!isStartDate && ((last_hour == 24 || hours == last_hour) && !minutes)));\r\n\t\t},\r\n\t\tisAfterFirstHour: function(date, isStartDate){\r\n\t\t\tvar minutes = date.getMinutes(),\r\n\t\t\t\thours = date.getHours(),\r\n\t\t\t\tfirst_hour = scheduler.config.first_hour,\r\n\t\t\t\tlast_hour = scheduler.config.last_hour;\r\n\t\t\treturn (hours >= first_hour || (!isStartDate && (!minutes && ((!hours && last_hour == 24) || (hours == last_hour)))));\r\n\t\t},\r\n\t\tisInVisibleDayTime: function(date, isStartDate){\r\n\t\t\treturn (this.isBeforeLastHour(date, isStartDate) && this.isAfterFirstHour(date, isStartDate));\r\n\t\t},\r\n\r\n\t\tnextDaySlot: function(slot, dir, extend){\r\n\t\t\tvar start, end;\r\n\r\n\t\t\tvar key_nav_step = scheduler.config.key_nav_step;\r\n\r\n\t\t\tvar date = this._alignTimeSlot(slot.start_date, scheduler.date.day_start(new Date(slot.start_date)), \"minute\", key_nav_step);\r\n\r\n\r\n\t\t\tvar oldStart = slot.start_date;\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tstart = scheduler.date.add(date, -key_nav_step, \"minute\");\r\n\r\n\t\t\t\t\tif(!this.isInVisibleDayTime(start, true)){\r\n\t\t\t\t\t\tif (!extend || this.isInVisibleDayTime(oldStart, true)) {\r\n\r\n\t\t\t\t\t\t\tvar toNextDay = true;\r\n\t\t\t\t\t\t\tif(extend && scheduler.date.date_part(new Date(start)).valueOf() != scheduler.date.date_part(new Date(oldStart)).valueOf())\r\n\t\t\t\t\t\t\t\ttoNextDay = false;\r\n\t\t\t\t\t\t\tif(toNextDay)\r\n\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, -1, \"day\"), -1);\r\n\r\n\t\t\t\t\t\t\tstart.setHours(scheduler.config.last_hour);\r\n\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\tstart = scheduler.date.add(start, -key_nav_step, \"minute\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tstart = scheduler.date.add(date, key_nav_step, \"minute\");\r\n\r\n\t\t\t\t\tvar testEnd = extend ? start : scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tif(!this.isInVisibleDayTime(testEnd, false)){\r\n\t\t\t\t\t\tif(!extend || this.isInVisibleDayTime(oldStart, false)) {\r\n\t\t\t\t\t\t\tif (!extend) {\r\n\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, 1, \"day\"), 1);\r\n\t\t\t\t\t\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tvar toNextDay = true;\r\n\t\t\t\t\t\t\t\tif (scheduler.date.date_part(new Date(oldStart)).valueOf() == oldStart.valueOf()) {\r\n\t\t\t\t\t\t\t\t\ttoNextDay = false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (toNextDay) {\r\n\t\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, 1, \"day\"), 1);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\t\tstart = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tstart = this._moveDate(slot.start_date, -1);\r\n\t\t\t\t\tend = this._moveDate(slot.end_date, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tstart = this._moveDate(slot.start_date, 1);\r\n\t\t\t\t\tend = this._moveDate(slot.end_date, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tstart = date;\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\t\tnextWeekAgendaSlot: function(slot, dir){\r\n\t\t\tvar start, end;\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tstart = scheduler.date.day_start(scheduler.date.add(slot.start_date, -1, \"day\"));\r\n\t\t\t\t\tstart = this.findVisibleColumn(start, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tstart = scheduler.date.day_start(scheduler.date.add(slot.start_date, 1, \"day\"));\r\n\t\t\t\t\tstart = this.findVisibleColumn(start, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tstart = scheduler.date.day_start(slot.start_date);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif(slot.start_date.valueOf() < state.min_date.valueOf() || slot.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tstart = new Date(state.min_date);\r\n\r\n\t\t\t}\r\n\t\t\tend = new Date(start);\r\n\t\t\tend.setHours(scheduler.config.last_hour);\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\t\tnextAgendaSlot: function(slot, dir){\r\n\t\t\treturn {start_date: slot.start_date, end_date: slot.end_date};\r\n\t\t},\r\n\r\n\r\n\t\tisDateVisible: function(date){\r\n\t\t\tif(!scheduler._ignores_detected)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[scheduler.getState().mode];\r\n\r\n\t\t\tvar index;\r\n\t\t\tif(timeline){\r\n\t\t\t\tindex = scheduler._get_date_index(timeline, date);\r\n\t\t\t}else{\r\n\t\t\t\tindex = scheduler.locate_holder_day(date);\r\n\t\t\t}\r\n\r\n\t\t\treturn !scheduler._ignores[index];\r\n\t\t},\r\n\r\n\t\tfindVisibleColumn: function(start, dir){\r\n\t\t\tvar date = start;\r\n\t\t\tdir = dir || 1;\r\n\t\t\tvar range = scheduler.getState();\r\n\r\n\t\t\twhile(!this.isDateVisible(date) && ((dir > 0 && date.valueOf() <= range.max_date.valueOf()) || (dir < 0 && date.valueOf() >= range.min_date.valueOf()))){\r\n\t\t\t\tdate = this.nextDateColumn(date, dir);\r\n\t\t\t}\r\n\r\n\t\t\treturn date;\r\n\t\t},\r\n\r\n\t\tnextDateColumn: function(start, dir){\r\n\t\t\tdir = dir || 1;\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[scheduler.getState().mode];\r\n\r\n\t\t\tvar date;\r\n\t\t\tif(timeline){\r\n\t\t\t\tdate = scheduler.date.add(start, dir * timeline.x_step, timeline.x_unit);\r\n\t\t\t}else{\r\n\t\t\t\tdate = scheduler.date.day_start(scheduler.date.add(start, dir, \"day\"));\r\n\t\t\t}\r\n\r\n\t\t\treturn date;\r\n\t\t},\r\n\r\n\t\tisVisible:function(from, to){\r\n\t\t\tif(!scheduler._ignores_detected)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tvar current = new Date(from);\r\n\r\n\t\t\twhile(current.valueOf() < to.valueOf()){\r\n\t\t\t\tif(this.isDateVisible(current)) return true;\r\n\t\t\t\tcurrent = this.nextDateColumn(current);\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t},\r\n\r\n\t\tnextSlot: function(slot, dir, view, extend){\r\n\t\t\tvar next;\r\n\t\t\tview = view || this._getMode();\r\n\r\n\t\t\tvar tempSlot = scheduler.$keyboardNavigation.TimeSlot.prototype.clone(slot);\r\n\r\n\t\t\tswitch (view){\r\n\t\t\t\tcase this._modes.units:\r\n\t\t\t\t\tnext = this.nextUnitsSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.timeline:\r\n\t\t\t\t\tnext = this.nextTimelineSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.year:\r\n\t\t\t\t\tnext = this.nextMonthSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.month:\r\n\t\t\t\t\tnext = this.nextMonthSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.weekAgenda:\r\n\t\t\t\t\tnext = this.nextWeekAgendaSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.list:\r\n\t\t\t\t\tnext = this.nextAgendaSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.dayColumns:\r\n\t\t\t\t\tnext = this.nextDaySlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(next.start_date.valueOf() >= next.end_date.valueOf()){\r\n\t\t\t\tnext = this.nextSlot(next, dir, view);\r\n\t\t\t}\r\n\r\n\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(next);\r\n\r\n\t\t},\r\n\r\n\t\textendSlot: function(slot, dir){\r\n\t\t\tvar view = this._getMode();\r\n\t\t\tvar next;\r\n\t\t\tswitch (view){\r\n\t\t\t\tcase this._modes.units:\r\n\t\t\t\t\tif(dir == \"left\" || dir == \"right\"){\r\n\t\t\t\t\t\tnext = this.nextUnitsSlot(slot, dir);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnext = this.extendUnitsSlot(slot, dir);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.timeline:\r\n\t\t\t\t\tif(dir == \"down\" || dir == \"up\"){\r\n\t\t\t\t\t\tnext = this.nextTimelineSlot(slot, dir);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnext = this.extendTimelineSlot(slot, dir);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.year:\r\n\t\t\t\t\tnext = this.extendMonthSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.month:\r\n\t\t\t\t\tnext = this.extendMonthSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.dayColumns:\r\n\t\t\t\t\tnext = this.extendDaySlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.weekAgenda:\r\n\t\t\t\t\tnext = this.extendWeekAgendaSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnext = slot;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tvar range = scheduler.getState();\r\n\t\t\tif(next.start_date.valueOf() < range.min_date.valueOf()){\r\n\t\t\t\tnext.start_date = this.findVisibleColumn(range.min_date);\r\n\t\t\t\tnext.start_date.setHours(scheduler.config.first_hour);\r\n\t\t\t}\r\n\r\n\t\t\tif(next.end_date.valueOf() > range.max_date.valueOf()){\r\n\t\t\t//\tnext.end_date = new Date(slot.end_date);\r\n\t\t\t\tnext.end_date = this.findVisibleColumn(range.max_date, -1);\r\n\t\t\t}\r\n\r\n\r\n\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(next);\r\n\t\t},\r\n\r\n\t\textendTimelineSlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"timeline\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\textendWeekAgendaSlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"weekAgenda\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\textendGenericSlot: function(allowedDirections, slot, direction, type){\r\n\t\t\tvar next;\r\n\t\t\tvar moveDate = slot.movingDate;\r\n\r\n\t\t\tif(!moveDate){\r\n\t\t\t\tmoveDate = allowedDirections[direction];\r\n\t\t\t}\r\n\r\n\t\t\tif(!moveDate || !allowedDirections[direction]){\r\n\t\t\t\treturn slot;\r\n\t\t\t}\r\n\r\n\t\t\tif(direction){\r\n\t\t\t\tnext = this.nextSlot({start_date: slot[moveDate], section: slot.section}, direction, type, true);\r\n\r\n\t\t\t\tif(next.start_date.valueOf() == slot.start_date.valueOf()){\r\n\t\t\t\t\tnext = this.nextSlot({start_date: next.start_date, section:next.section}, direction, type, true);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tnext.movingDate = moveDate;\r\n\t\t\t}else{\r\n\t\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(slot);\r\n\t\t\t}\r\n\r\n\t\t\tvar newDates = this.extendSlotDates(slot, next, next.movingDate);\r\n\r\n\t\t\tif(newDates.end_date.valueOf() <= newDates.start_date.valueOf()){\r\n\t\t\t\tnext.movingDate = next.movingDate == \"end_date\" ? \"start_date\" : \"end_date\";\r\n\t\t\t}\r\n\t\t\tnewDates = this.extendSlotDates(slot, next, next.movingDate);\r\n\r\n\t\t\tnext.start_date = newDates.start_date;\r\n\t\t\tnext.end_date = newDates.end_date;\r\n\t\t\treturn next;\r\n\t\t},\r\n\r\n\t\textendSlotDates: function(oldSlot, newSlot, dateDirection){\r\n\t\t\tvar res = {start_date:null, end_date:null};\r\n\r\n\t\t\tif(dateDirection == \"start_date\"){\r\n\t\t\t\tres.start_date = newSlot.start_date;\r\n\t\t\t\tres.end_date = oldSlot.end_date;\r\n\t\t\t}else{\r\n\t\t\t\tres.start_date = oldSlot.start_date;\r\n\t\t\t\tres.end_date = newSlot.start_date;\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\r\n\t\t},\r\n\r\n\t\textendMonthSlot: function(slot, direction){\r\n\t\t\tvar slot = this.extendGenericSlot({\r\n\t\t\t\t\t\"up\":\"start_date\",\r\n\t\t\t\t\t\"down\":\"end_date\",\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"month\"\r\n\t\t\t);\r\n\r\n\t\t\tslot.start_date.setHours(scheduler.config.first_hour);\r\n\t\t\tslot.end_date = scheduler.date.add(slot.end_date, -1, \"day\");\r\n\t\t\tslot.end_date.setHours(scheduler.config.last_hour);\r\n\t\t\treturn slot;\r\n\t\t},\r\n\r\n\t\textendUnitsSlot: function(slot, direction){\r\n\t\t\tvar next;\r\n\r\n\t\t\tswitch (direction){\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tnext = this.extendDaySlot(slot, direction);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnext = slot;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tnext.section = slot.section;\r\n\t\t\treturn next;\r\n\t\t},\r\n\t\textendDaySlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\t\"up\":\"start_date\",\r\n\t\t\t\t\t\"down\":\"end_date\",\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"dayColumns\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\tscrollSlot: function(dir){\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tvar slot = this.nextSlot(this, dir);\r\n\t\t\tif(slot.start_date.valueOf() < state.min_date.valueOf() || slot.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tscheduler.setCurrentView(new Date(slot.start_date));\r\n\t\t\t}\r\n\r\n\t\t\tthis.moveTo(slot);\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tthis.scrollSlot(\"left\");\r\n\t\t\t},\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tthis.scrollSlot(\"right\");\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\r\n\t\t\t\tvar mode = this._getMode();\r\n\t\t\t\tif(mode == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.scrollSlot(\"down\");\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"up\": function () {\r\n\t\t\t\tvar mode = this._getMode();\r\n\t\t\t\tif(mode == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.scrollSlot(\"up\");\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"shift+down\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"down\"));\r\n\t\t\t},\r\n\t\t\t\"shift+up\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"up\"));\r\n\t\t\t},\r\n\t\t\t\"shift+right\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"right\"));\r\n\t\t\t},\r\n\t\t\t\"shift+left\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"left\"));\r\n\t\t\t},\r\n\r\n\r\n\t\t\t\"enter\": function(){\r\n\t\t\t\tvar obj = {start_date: new Date(this.start_date), end_date: new Date(this.end_date)};\r\n\r\n\t\t\t\tvar mode = scheduler.getState().mode;\r\n\t\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\r\n\t\t\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\t\t\tobj[timeline.y_property] = this.section;\r\n\t\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\t\tvar unit = scheduler._props[mode];\r\n\t\t\t\t\tobj[unit.map_to] = this.section;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler.addEventNow(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.TimeSlot.prototype.bindAll(scheduler.$keyboardNavigation.TimeSlot.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.MinicalButton = function(div, index){\r\n\tthis.container = div;\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.MinicalButton.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar container = this.container;\r\n\t\t\treturn !!container.offsetWidth;// valid if container is visible\r\n\t\t},\r\n\r\n\t\tfallback: function(){\r\n\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(defaultSlot.isValid()){\r\n\t\t\t\treturn defaultSlot;\r\n\t\t\t}else{\r\n\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t}\r\n\t\t},\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.globalNode.disable();\r\n\t\t\tthis.container.removeAttribute(\"tabindex\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tthis.container.setAttribute(\"tabindex\", \"0\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\tif(!this.index){\r\n\t\t\t\treturn this.container.querySelector(\".dhx_cal_prev_button\");\r\n\t\t\t}else{\r\n\t\t\t\treturn this.container.querySelector(\".dhx_cal_next_button\");\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"right\": function(e){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, this.index ? 0 : 1));\r\n\t\t\t},\r\n\t\t\t\"left\": function(e){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, this.index ? 0 : 1));\r\n\t\t\t},\r\n\t\t\t\"down\": function(){\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, 0, 0);\r\n\t\t\t\tif(next && !next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"enter\": function(e){\r\n\t\t\t\tthis.getNode().click();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.MinicalButton.prototype.bindAll(scheduler.$keyboardNavigation.MinicalButton.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.MinicalCell = function(div, row, col){\r\n\tthis.container = div;\r\n\tthis.row = row || 0;\r\n\tthis.col = col || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.MinicalCell.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar grid = this._getGrid();\r\n\t\t\treturn !!(grid[this.row] && grid[this.row][this.col]);\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\tvar row = this.row;\r\n\t\t\tvar col = this.col;\r\n\t\t\tvar grid = this._getGrid();\r\n\t\t\tif(!grid[row]){\r\n\t\t\t\trow = 0;\r\n\t\t\t}\r\n\t\t\tvar dir = true;\r\n\t\t\tif(row > grid.length / 2){\r\n\t\t\t\tdir = false;\r\n\t\t\t}\r\n\r\n\t\t\tif(!grid[row]){\r\n\t\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t\tif(defaultSlot.isValid()){\r\n\t\t\t\t\treturn defaultSlot;\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(dir){\r\n\t\t\t\tfor(var c = col; grid[row] && c < grid[row].length; c++){\r\n\t\t\t\t\tif(!grid[row][c] && c == grid[row].length - 1){\r\n\t\t\t\t\t\trow++;\r\n\t\t\t\t\t\tcol = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(grid[row][c]){\r\n\t\t\t\t\t\treturn new scheduler.$keyboardNavigation.MinicalCell(this.container, row, c);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tfor(var c = col; grid[row] && c < grid[row].length; c--){\r\n\t\t\t\t\tif(!grid[row][c] && !c){\r\n\t\t\t\t\t\trow--;\r\n\t\t\t\t\t\tcol = grid[row].length - 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(grid[row][c]){\r\n\t\t\t\t\t\treturn new scheduler.$keyboardNavigation.MinicalCell(this.container, row, c);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn new scheduler.$keyboardNavigation.MinicalButton(this.container, 0);\r\n\t\t},\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.globalNode.disable();\r\n\r\n\t\t\tthis.container.removeAttribute(\"tabindex\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tthis.container.setAttribute(\"tabindex\", \"0\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\t\t_getNode: function(row, col){\r\n\t\t\treturn this.container.querySelector(\".dhx_year_body tr:nth-child(\"+(row + 1) + \") td:nth-child(\"+(col + 1)+\")\");\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\treturn this._getNode(this.row, this.col);\r\n\t\t},\r\n\r\n\t\t_getGrid: function(){\r\n\t\t\tvar rows = this.container.querySelectorAll(\".dhx_year_body tr\");\r\n\t\t\tvar grid = [];\r\n\t\t\tfor(var i = 0; i < rows.length; i++){\r\n\t\t\t\tgrid[i] = [];\r\n\t\t\t\tvar row = rows[i];\r\n\t\t\t\tvar cells = row.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var c = 0; c < cells.length; c++){\r\n\t\t\t\t\tvar cell = cells[c];\r\n\t\t\t\t\tvar enabled = true;\r\n\t\t\t\t\tvar css = scheduler._getClassName(cell);\r\n\t\t\t\t\tif(css.indexOf(\"dhx_after\") > -1 || css.indexOf(\"dhx_before\") > -1 || css.indexOf(\"dhx_scale_ignore\") > -1){\r\n\t\t\t\t\t\tenabled = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tgrid[i][c] = enabled;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn grid;\r\n\t\t},\r\n\r\n\r\n\t\tkeys: {\r\n\t\t\t\"right\": function(e){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row;\r\n\t\t\t\tvar newCol = this.col + 1;\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tif(grid[newRow + 1]){\r\n\t\t\t\t\t\tnewRow = newRow + 1;\r\n\t\t\t\t\t\tnewCol = 0;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnewCol = this.col;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"left\": function(e){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row;\r\n\t\t\t\tvar newCol = this.col - 1;\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tif(grid[newRow - 1]){\r\n\t\t\t\t\t\tnewRow = newRow - 1;\r\n\t\t\t\t\t\tnewCol = grid[newRow].length - 1;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnewCol = this.col;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"down\": function(){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row + 1;\r\n\t\t\t\tvar newCol = this.col;\r\n\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tnewRow = this.row;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"up\": function(){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row - 1;\r\n\t\t\t\tvar newCol = this.col;\r\n\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tvar index = 0;\r\n\t\t\t\t\tif(this.col > grid[this.row].length / 2){\r\n\t\t\t\t\t\tindex = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, index));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.moveTo(next);\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\t\t\t\"enter\": function(e){\r\n\t\t\t\tthis.getNode().querySelector(\".dhx_month_head\").click();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.MinicalCell.prototype.bindAll(scheduler.$keyboardNavigation.MinicalCell.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.DataArea = function(index){\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.DataArea.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\tgetNode: function(index){\r\n\t\t\treturn scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t},\r\n\r\n\t\t_handlers:null,\r\n\r\n\t\tisValid: function(){\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tfallback:function(){\r\n\t\t\treturn this;\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"up,down,right,left\":function(){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.DataArea.prototype.bindAll(scheduler.$keyboardNavigation.DataArea.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.dispatcher = {\r\n\tisActive: false,\r\n\tactiveNode: null,\r\n\tglobalNode: new scheduler.$keyboardNavigation.SchedulerNode(),\r\n\r\n\tkeepScrollPosition: function (callback) {\r\n\t\tvar top, left;\r\n\r\n\t\tvar scrollable = scheduler.$container.querySelector(\".dhx_timeline_scrollable_data\");\r\n\t\tif(!scrollable){\r\n\t\t\tscrollable = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t}\r\n\r\n\t\tif(scrollable){\r\n\t\t\ttop = scrollable.scrollTop;\r\n\t\t\tleft = scrollable.scrollLeft;\r\n\t\t}\r\n\r\n\t\tcallback();\r\n\r\n\t\tif(scrollable){\r\n\t\t\tscrollable.scrollTop = top;\r\n\t\t\tscrollable.scrollLeft = left;\r\n\t\t}\r\n\t},\r\n\tenable: function(){\r\n\t\tif(!scheduler.$container){\r\n\t\t\t// do nothing if not initialized\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.isActive = true;\r\n\t\tvar self = this;\r\n\t\tthis.keepScrollPosition(function () {\r\n\t\t\tself.globalNode.enable();\r\n\t\t\tself.setActiveNode(self.getActiveNode());\r\n\t\t});\r\n\t},\r\n\r\n\tdisable: function(){\r\n\t\tthis.isActive = false;\r\n\t\tthis.globalNode.disable();\r\n\t},\r\n\r\n\tisEnabled: function(){\r\n\t\treturn !!this.isActive;\r\n\t},\r\n\r\n\tgetDefaultNode: function(){\r\n\t\treturn this.globalNode.getDefaultNode();\r\n\t},\r\n\r\n\tsetDefaultNode: function() {\r\n\t\tthis.setActiveNode(this.getDefaultNode());\r\n\t},\r\n\r\n\tgetActiveNode: function(){\r\n\t\tvar node = this.activeNode;\r\n\t\tif(node && !node.isValid()){\r\n\t\t\tnode = node.fallback();\r\n\t\t}\r\n\t\treturn node;\r\n\t},\r\n\r\n\tfocusGlobalNode: function(){\r\n\t\tthis.blurNode(this.globalNode);\r\n\t\tthis.focusNode(this.globalNode);\r\n\t},\r\n\r\n\tsetActiveNode: function(el){\r\n\t\tif(!el || !el.isValid())\r\n\t\t\treturn;\r\n\r\n\t\tif(this.activeNode){\r\n\t\t\tif(this.activeNode.compareTo(el)){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(this.isEnabled()){\r\n\t\t\tthis.blurNode(this.activeNode);\r\n\t\t\tthis.activeNode = el;\r\n\t\t\tthis.focusNode(this.activeNode);\r\n\t\t}\r\n\t},\r\n\r\n\tfocusNode: function(el){\r\n\t\tif(el && el.focus){\r\n\t\t\tel.focus();\r\n\t\t\tif(el.getNode && document.activeElement != el.getNode()){\r\n\t\t\t\tthis.setActiveNode(new scheduler.$keyboardNavigation.DataArea());\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tblurNode: function(el){\r\n\t\tif(el && el.blur){\r\n\t\t\tel.blur();\r\n\t\t}\r\n\t},\r\n\r\n\tgetInlineEditor: function(id){\r\n\t\tvar editor = scheduler.$container.querySelector(\".dhx_cal_editor[\"+scheduler.config.event_attribute+\"='\"+id+\"'] textarea\");\r\n\t\tif(editor && editor.offsetWidth){\r\n\t\t\t// if exists and visible\r\n\t\t\treturn editor;\r\n\t\t}\r\n\t\treturn null;\r\n\t},\r\n\r\n\tkeyDownHandler: function (e) {\r\n\r\n\t\tif(e.defaultPrevented){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar activeElement = this.getActiveNode();\r\n\r\n\t\tif(scheduler.$keyboardNavigation.isModal() &&\r\n\t\t\t!(activeElement && activeElement.container && scheduler.utils.dom.locateCss({target:activeElement.container}, \"dhx_minical_popup\", false)))\r\n\t\t\treturn;\r\n\r\n\t\tif(scheduler.getState().editor_id && this.getInlineEditor(scheduler.getState().editor_id))\r\n\t\t\treturn;\r\n\r\n\t\tif (!this.isEnabled())\r\n\t\t\treturn;\r\n\r\n\t\te = e || window.event;\r\n\r\n\t\tvar schedulerNode = this.globalNode;\r\n\r\n\t\tvar command = scheduler.$keyboardNavigation.shortcuts.getCommandFromEvent(e);\r\n\r\n\t\tif(!activeElement){\r\n\t\t\tthis.setDefaultNode();\r\n\t\t}else if(activeElement.findHandler(command)){\r\n\t\t\tactiveElement.doAction(command, e);\r\n\t\t}else if(schedulerNode.findHandler(command)){\r\n\t\t\tschedulerNode.doAction(command, e);\r\n\t\t}\r\n\r\n\t},\r\n\r\n\t_timeout: null,\r\n\tdelay: function(callback, delay){\r\n\r\n\t\tclearTimeout(this._timeout);\r\n\t\tthis._timeout = setTimeout(callback, delay || 1);\r\n\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation._minicalendars = [];\r\n\r\nscheduler.$keyboardNavigation.isMinical = function(node){\r\n\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\tif(this.isChildOf(node, minicalendars[i]))\r\n\t\t\treturn true;\r\n\t}\r\n\treturn false;\r\n};\r\n\r\nscheduler.$keyboardNavigation.isChildOf = function(child, parent){\r\n\twhile(child && child !== parent){\r\n\t\tchild = child.parentNode;\r\n\t}\r\n\r\n\treturn !!(child === parent);\r\n};\r\n\r\nscheduler.$keyboardNavigation.patchMinicalendar = function(){\r\n\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\tfunction focusMinical(e){\r\n\t\tvar target = e.target;\r\n\r\n\t\tdispatcher.enable();\r\n\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.MinicalButton(target, 0));\r\n\t}\r\n\r\n\tfunction minicalClick(e){\r\n\t\tvar target = e.target || e.srcElement;\r\n\r\n\t\tvar prev = scheduler.utils.dom.locateCss(e, \"dhx_cal_prev_button\", false);\r\n\t\tvar next = scheduler.utils.dom.locateCss(e, \"dhx_cal_next_button\", false);\r\n\t\tvar cell = scheduler.utils.dom.locateCss(e, \"dhx_year_body\", false);\r\n\r\n\t\tvar rowIndex = 0;\r\n\t\tvar cellIndex = 0;\r\n\t\tif(cell){\r\n\t\t\tvar tr;\r\n\t\t\tvar td;\r\n\t\t\tvar current = target;\r\n\t\t\twhile(current && current.tagName.toLowerCase() != \"td\"){\r\n\t\t\t\tcurrent = current.parentNode;\r\n\t\t\t}\r\n\t\t\tif(current){\r\n\t\t\t\ttd = current;\r\n\t\t\t\ttr = td.parentNode;\r\n\t\t\t}\r\n\r\n\t\t\tif(tr && td){\r\n\t\t\t\tvar rows = tr.parentNode.querySelectorAll(\"tr\");\r\n\t\t\t\tfor(var i = 0; i < rows.length; i++){\r\n\t\t\t\t\tif(rows[i] == tr){\r\n\t\t\t\t\t\trowIndex = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tvar cells = tr.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\t\t\tif(cells[i] == td){\r\n\t\t\t\t\t\tcellIndex = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar root = e.currentTarget;\r\n\t\tdispatcher.delay(function(){\r\n\t\t\tif(prev || next || cell){\r\n\r\n\t\t\t\tvar element;\r\n\t\t\t\tif(prev){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalButton(root, 0);\r\n\t\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.MinicalButton(root, 0));\r\n\t\t\t\t}else if(next){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalButton(root, 1);\r\n\t\t\t\t}else if(cell){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalCell(root, rowIndex, cellIndex);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(element){\r\n\r\n\t\t\t\t\tdispatcher.enable();\r\n\t\t\t\t\tif(element.isValid()){\r\n\t\t\t\t\t\tdispatcher.activeNode = null;\r\n\t\t\t\t\t\tdispatcher.setActiveNode(element);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t}\r\n\r\n\tif(scheduler.renderCalendar){\r\n\t\tvar renderMinical = scheduler.renderCalendar;\r\n\t\tscheduler.renderCalendar = function(){\r\n\t\t\tvar cal = renderMinical.apply(this, arguments);\r\n\t\t\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\r\n\t\t\tscheduler.eventRemove(cal, \"click\", minicalClick);\r\n\t\t\tscheduler.event(cal, \"click\", minicalClick);\r\n\r\n\t\t\tscheduler.eventRemove(cal, \"focus\", focusMinical);\r\n\t\t\tscheduler.event(cal, \"focus\", focusMinical);\r\n\r\n\t\t\tvar added = false;\r\n\t\t\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\t\t\tif(minicalendars[i] == cal){\r\n\t\t\t\t\tadded = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(!added)\r\n\t\t\t\tminicalendars.push(cal);\r\n\r\n\t\t\tif(dispatcher.isEnabled()){\r\n\t\t\t\tvar node = dispatcher.getActiveNode();\r\n\t\t\t\tif(node && node.container == cal){\r\n\t\t\t\t\tdispatcher.focusNode(node);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcal.setAttribute(\"tabindex\", \"0\");\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tcal.setAttribute(\"tabindex\", \"0\");\r\n\t\t\t}\r\n\t\t\treturn cal;\r\n\t\t};\r\n\t}\r\n\r\n\tif(scheduler.destroyCalendar){\r\n\t\tvar destroyMinical = scheduler.destroyCalendar;\r\n\t\tscheduler.destroyCalendar = function(cal, force){\r\n\t\t\tcal = cal || (scheduler._def_count ? scheduler._def_count.firstChild : null);\r\n\t\t\tvar res = destroyMinical.apply(this, arguments);\r\n\r\n\t\t\tif(!cal || !cal.parentNode){\r\n\t\t\t\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\t\t\t\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\t\t\t\tif(minicalendars[i] == cal){\r\n\t\t\t\t\t\tscheduler.eventRemove(minicalendars[i], \"focus\", focusMinical);\r\n\t\t\t\t\t\tminicalendars.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn res;\r\n\t\t};\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\r\n\tthis.layers.sort(function(a, b){\r\n\t\treturn a.zIndex - b.zIndex;\r\n\t});\r\n\r\n\tscheduler._dp_init=function(dp){\r\n\t\tdp._methods=[\"_set_event_text_style\",\"\",\"changeEventId\",\"deleteEvent\"];\r\n\r\n\t\tthis.attachEvent(\"onEventAdded\",function(id){\r\n\t\t\tif (!this._loading && this.validId(id) && this.getEvent(id) && this.getEvent(id).layer == dp.layer)\r\n\t\t\t\tdp.setUpdated(id,true,\"inserted\");\r\n\t\t});\r\n\t\tthis.attachEvent(\"onBeforeEventDelete\",function(id){\r\n\t\t\tif(this.getEvent(id) && this.getEvent(id).layer == dp.layer) {\r\n\t\t\t\tif (!this.validId(id)) return;\r\n\t\t\t\tvar z=dp.getState(id);\r\n\r\n\t\t\t\tif (z==\"inserted\" || this._new_event) { dp.setUpdated(id,false);\t\treturn true; }\r\n\t\t\t\tif (z==\"deleted\") return false;\r\n\t\t\t\tif (z==\"true_deleted\") return true;\r\n\r\n\t\t\t\tdp.setUpdated(id,true,\"deleted\");\r\n\t\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\telse return true;\r\n\t\t});\r\n\t\tthis.attachEvent(\"onEventChanged\",function(id){\r\n\t\t\tif (!this._loading && this.validId(id) && this.getEvent(id) && this.getEvent(id).layer == dp.layer)\r\n\t\t\t\tdp.setUpdated(id,true,\"updated\");\r\n\t\t});\r\n\r\n\t\tdp._getRowData=function(id,pref){\r\n\t\t\tvar ev=this.obj.getEvent(id);\r\n\t\t\tvar data = {};\r\n\r\n\t\t\tfor (var a in ev){\r\n\t\t\t\tif (a.indexOf(\"_\")===0) continue;\r\n\t\t\t\tif (ev[a] && ev[a].getUTCFullYear) //not very good, but will work\r\n\t\t\t\t\tdata[a] = this.obj._helpers.formatDate(ev[a]);\r\n\t\t\t\telse\r\n\t\t\t\t\tdata[a] = ev[a];\r\n\t\t\t}\r\n\t\t\treturn data;\r\n\t\t};\r\n\t\tdp._clearUpdateFlag=function(){};\r\n\r\n\t\tdp.attachEvent(\"insertCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"updateCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"deleteCallback\", function(upd, id) {\r\n\t\t\tthis.obj.setUserData(id, this.action_param, \"true_deleted\");\r\n\t\t\tthis.obj.deleteEvent(id);\r\n\t\t});\r\n\t};\r\n\r\n\t(function() {\r\n var _cloneObj = function(obj){\r\n if(obj === null || typeof(obj) != 'object')\r\n return obj;\r\n var temp = new obj.constructor();\r\n for(var key in obj)\r\n temp[key] = _cloneObj(obj[key]);\r\n return temp;\r\n };\r\n\r\n\t\tscheduler._dataprocessors = [];\r\n\t\tscheduler._layers_zindex = {};\r\n\t\tfor(var i=0; i= scheduler.config.collision_limit);\r\n\t});\r\n\r\n\tscheduler.addEvent=function(start_date,end_date,text,id,extra_data){\r\n\t\tvar ev=start_date;\r\n\t\tif (arguments.length!=1){\r\n\t\t\tev=extra_data||{};\r\n\t\t\tev.start_date=start_date;\r\n\t\t\tev.end_date=end_date;\r\n\t\t\tev.text=text;\r\n\t\t\tev.id=id;\r\n\t\t\tev.layer = this.defaultLayer;\r\n\t\t}\r\n\t\tev.id = ev.id||scheduler.uid();\r\n\t\tev.text = ev.text||\"\";\r\n\r\n\r\n\t\tif (typeof ev.start_date == \"string\") ev.start_date=this.templates.api_date(ev.start_date);\r\n\t\tif (typeof ev.end_date == \"string\") ev.end_date=this.templates.api_date(ev.end_date);\r\n\t\tev._timed=this.isOneDayEvent(ev);\r\n\r\n\t\tvar is_new=!this._events[ev.id];\r\n\t\tthis._events[ev.id]=ev;\r\n\t\tthis.event_updated(ev);\r\n\t\tif (!this._loading)\r\n\t\t\tthis.callEvent(is_new?\"onEventAdded\":\"onEventChanged\",[ev.id,ev]);\r\n\t};\r\n\r\n\tthis._evs_layer = {};\r\n\tfor (var i = 0; i < this.layers.length; i++) { // array in object for each layer\r\n\t\tthis._evs_layer[this.layers[i].name] = [];\r\n\t}\r\n\r\n\tscheduler.addEventNow=function(start,end,e){\r\n\t\tvar base = {};\r\n\t\tif (typeof start == \"object\"){\r\n\t\t\tbase = start;\r\n\t\t\tstart = null;\r\n\t\t}\r\n\r\n\t\tvar d = (this.config.event_duration||this.config.time_step)*60000;\r\n\t\tif (!start) start = Math.round((scheduler._currentDate()).valueOf()/d)*d;\r\n\t\tvar start_date = new Date(start);\r\n\t\tif (!end){\r\n\t\t\tvar start_hour = this.config.first_hour;\r\n\t\t\tif (start_hour > start_date.getHours()){\r\n\t\t\t\tstart_date.setHours(start_hour);\r\n\t\t\t\tstart = start_date.valueOf();\r\n\t\t\t}\r\n\t\t\tend = start+d;\r\n\t\t}\r\n\r\n\r\n\t\tbase.start_date = base.start_date||start_date;\r\n\t\tbase.end_date = base.end_date||new Date(end);\r\n\t\tbase.text = base.text||this.locale.labels.new_event;\r\n\t\tbase.id = this._drag_id = this.uid();\r\n\t\tbase.layer = this.defaultLayer;\r\n\t\tthis._drag_mode=\"new-size\";\r\n\r\n\t\tthis._loading=true;\r\n\t\tthis.addEvent(base);\r\n\t\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\t\tthis._loading=false;\r\n\r\n\t\tthis._drag_event={}; //dummy , to trigger correct event updating logic\r\n\t\tthis._on_mouse_up(e);\r\n\t};\r\n\r\n\tscheduler._t_render_view_data = function(events) { // helper\r\n\t\tif (this.config.multi_day && !this._table_view) {\r\n\t\t\tvar tvs = [];\r\n\t\t\tvar tvd = [];\r\n\t\t\tfor (var k = 0; k < events.length; k++) {\r\n\t\t\t\tif (events[k]._timed)\r\n\t\t\t\t\ttvs.push(events[k]);\r\n\t\t\t\telse\r\n\t\t\t\t\ttvd.push(events[k]);\r\n\t\t\t}\r\n\t\t\tthis._table_view = true;\r\n\t\t\tthis.render_data(tvd);\r\n\t\t\tthis._table_view = false;\r\n\t\t\tthis.render_data(tvs);\r\n\t\t}\r\n\t\telse\r\n\t\t\tthis.render_data(events);\r\n\t};\r\n\r\n\tscheduler.render_view_data = function(){\r\n\t\tif (this._not_render) {\r\n\t\t\tthis._render_wait = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._render_wait = false;\r\n\r\n\t\tthis.clear_view();\r\n\r\n\t\tthis._evs_layer = {};\r\n\t\tfor (var i = 0; i < this.layers.length; i++) { // array in object for each layer\r\n\t\t\tthis._evs_layer[this.layers[i].name] = [];\r\n\t\t}\r\n\r\n\t\tvar evs = this.get_visible_events();\r\n\t\tfor (var i = 0; i < evs.length; i++) { // filling layer arrays with events\r\n\t\t\tif(this._evs_layer[evs[i].layer])\r\n\t\t\t\tthis._evs_layer[evs[i].layer].push(evs[i]);\r\n\t\t}\r\n\r\n\t\tif(this._mode == 'month') { // old logic is used\r\n\t\t\tvar tevs = [];\r\n\t\t\tfor (var i = 0; i < this.layers.length; i++) {\r\n\t\t\t\tif (this.layers[i].visible)\r\n\t\t\t\t\ttevs = tevs.concat(this._evs_layer[this.layers[i].name]);\r\n\t\t\t}\r\n\t\t\tthis._t_render_view_data(tevs);\r\n\t\t}\r\n\t\telse { // week, day; should use new logic\r\n\t\t\tfor (var i = 0; i < this.layers.length; i++) {\r\n\t\t\t\tif (this.layers[i].visible) {\r\n\t\t\t\t\tvar evs_layer = this._evs_layer[this.layers[i].name];\r\n\t\t\t\t\tthis._t_render_view_data(evs_layer);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._render_v_bar=function(ev,x,y,w,h,style,contentA,contentB,bottom){\r\n\t\tvar id = ev.id;\r\n\r\n\t\tif(contentA.indexOf('
';\r\n\t\thtml+='
 
';\r\n\t\thtml+='
'+contentA+'
';\r\n\t\thtml+='
'+contentB+'
';\r\n\t\thtml+='
';\r\n\r\n\t\td.innerHTML=html;\r\n\t\td.style.zIndex = 100;\r\n\t\treturn d.firstChild;\r\n\t};\r\n\r\n\tscheduler.render_event_bar=function(ev){\r\n\t\tvar parent=this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tvar x=this._colsS[ev._sday];\r\n\t\tvar x2=this._colsS[ev._eday];\r\n\t\tif (x2==x) x2=this._colsS[ev._eday+1];\r\n\t\tvar hb = this.xy.bar_height;\r\n\r\n\t\tvar y=this._colsS.heights[ev._sweek]+(this._colsS.height?(this.xy.month_scale_height+2):2)+ev._sorder*hb;\r\n\r\n\t\tvar d=document.createElement(\"div\");\r\n\t\tvar cs = ev._timed?\"dhx_cal_event_clear\":\"dhx_cal_event_line\";\r\n\t\tvar cse = (scheduler.templates['event_class_'+ev.layer])?scheduler.templates['event_class_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_class(ev.start_date,ev.end_date,ev);\r\n\t\tif (cse) cs=cs+\" \"+cse;\r\n\r\n\t\tvar html='
';\r\n\r\n\t\tif (ev._timed)\r\n\t\t\thtml+=(scheduler.templates['event_bar_date_'+ev.layer])?scheduler.templates['event_bar_date_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_bar_date(ev.start_date,ev.end_date,ev);\r\n\t\thtml+=( (scheduler.templates['event_bar_text_'+ev.layer])?scheduler.templates['event_bar_text_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_bar_text(ev.start_date,ev.end_date,ev) + '
)');\r\n\t\thtml+='
';\r\n\r\n\t\td.innerHTML=html;\r\n\r\n\t\tthis._rendered.push(d.firstChild);\r\n\t\tparent.appendChild(d.firstChild);\r\n\t};\r\n\r\n\tscheduler.render_event=function(ev){\r\n\t\tvar menu = scheduler.xy.menu_width;\r\n\t\tif(scheduler.getLayer(ev.layer).noMenu)\r\n\t\t\tmenu = 0;\r\n\r\n\t\tif (ev._sday<0) return; //can occur in case of recurring event during time shift\r\n\t\tvar parent=scheduler.locate_holder(ev._sday);\r\n\t\tif (!parent) return; //attempt to render non-visible event\r\n\t\tvar sm = ev.start_date.getHours()*60+ev.start_date.getMinutes();\r\n\t\tvar em = (ev.end_date.getHours()*60+ev.end_date.getMinutes())||(scheduler.config.last_hour*60);\r\n\r\n\t\tvar top = (Math.round((sm*60*1000-this.config.first_hour*60*60*1000)*this.config.hour_size_px/(60*60*1000)))%(this.config.hour_size_px*24)+1; //42px/hour\r\n\t\tvar height = Math.max(scheduler.xy.min_event_height,(em-sm)*this.config.hour_size_px/60)+1; //42px/hour\r\n\t\t\r\n\t\tvar width=Math.floor((parent.clientWidth-menu)/ev._count);\r\n\t\tvar left=ev._sorder*width+1;\r\n\t\tif (!ev._inner) width=width*(ev._count-ev._sorder);\r\n\r\n\r\n\r\n\t\tvar d=this._render_v_bar(ev.id,menu+left,top,width,height,ev._text_style,scheduler.templates.event_header(ev.start_date,ev.end_date,ev),scheduler.templates.event_text(ev.start_date,ev.end_date,ev));\r\n\r\n\t\tthis._rendered.push(d);\r\n\t\tparent.appendChild(d);\r\n\r\n\t\tleft=left+parseInt(parent.style.left,10)+menu;\r\n\r\n\t\ttop+=this._dy_shift; //corrupt top, to include possible multi-day shift\r\n\t\td.style.zIndex = this._layers_zindex[ev.layer];\r\n\r\n\t\tif (this._edit_id==ev.id){\r\n\t\t\td.style.zIndex = parseInt(d.style.zIndex)+1; //fix overlapping issue\r\n\t\t\tvar new_zIndex = d.style.zIndex;\r\n\t\t\twidth=Math.max(width-4,scheduler.xy.editor_width);\r\n\t\t\tvar d=document.createElement(\"div\");\r\n\t\t\td.setAttribute(\"event_id\",ev.id); // for backward compatibility\r\n\t\t\td.setAttribute(this.config.event_attribute,ev.id);\r\n\t\t\tthis.set_xy(d,width,height-20,left,top+14);\r\n\t\t\td.className=\"dhx_cal_editor\";\r\n\t\t\td.style.zIndex = new_zIndex;\r\n\t\t\tvar d2=document.createElement(\"div\");\r\n\t\t\tthis.set_xy(d2,width-6,height-26);\r\n\t\t\td2.style.cssText+=\";margin:2px 2px 2px 2px;overflow:hidden;\";\r\n\r\n\r\n\t\t\td2.style.zIndex = new_zIndex;\r\n\t\t\td.appendChild(d2);\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].appendChild(d);\r\n\t\t\tthis._rendered.push(d);\r\n\r\n\t\t\td2.innerHTML=\"\";\r\n\r\n\t\t\tthis._editor=d2.firstChild;\r\n\t\t\tthis._editor.addEventListener(\"keypress\", function(e){\r\n\t\t\t\tif (e.shiftKey) return true;\r\n\t\t\t\tvar code= e.keyCode;\r\n\t\t\t\tif (code==scheduler.keys.edit_save) scheduler.editStop(true);\r\n\t\t\t\tif (code==scheduler.keys.edit_cancel) scheduler.editStop(false);\r\n\t\t\t});\r\n\t\t\tthis._editor.addEventListener(\"selectstart\", function(e){ e.cancelBubble=true; return true; });\r\n\t\t\td2.firstChild.focus();\r\n\t\t\t//IE and opera can add x-scroll during focusing\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].scrollLeft=0;\r\n\t\t\td2.firstChild.select();\r\n\t\t}\r\n\t\tif (this._select_id==ev.id){\r\n\t\t\td.style.zIndex = parseInt(d.style.zIndex)+1; //fix overlapping issue\r\n\t\t\tvar icons=this.config[\"icons_\"+((this._edit_id==ev.id)?\"edit\":\"select\")];\r\n\t\t\tvar icons_str=\"\";\r\n\t\t\tfor (var i=0; i
\";\r\n\t\t\tvar obj = this._render_v_bar(ev.id,left-menu+1,top,menu,icons.length*20+26,\"\",\"
\",icons_str,true);\r\n\t\t\tobj.style.left=left-menu+1;\r\n\t\t\tobj.style.zIndex = d.style.zIndex;\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].appendChild(obj);\r\n\t\t\tthis._rendered.push(obj);\r\n\t\t}\r\n\r\n\t};\r\n\r\n scheduler.filter_agenda = function(id, event) {\r\n var layer = scheduler.getLayer(event.layer);\r\n return (layer && layer.visible);\r\n };\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.limit_start = null;\r\nscheduler.config.limit_end = null;\r\nscheduler.config.limit_view = false;\r\nscheduler.config.check_limits = true;\r\n\r\nscheduler._temp_limit_scope = function(){\r\n\tvar before = null;\r\n\tvar dhx_time_block = \"dhx_time_block\";\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\",function(om,od,nm,nd){\r\n\r\n\t\tfunction isBlocked(date, mode){\r\n\t\t\tvar limit_start = scheduler.config.limit_start,\r\n\t\t\t\tlimit_end = scheduler.config.limit_end,\r\n\t\t\t\tdate_end = scheduler.date.add(date,1,mode);\r\n\r\n\t\t\treturn (date.valueOf() > limit_end.valueOf() || date_end <= limit_start.valueOf());\r\n\t\t}\r\n\r\n\t\tif (scheduler.config.limit_view){\r\n\t\t\tnd = nd||od; nm = nm||om;\r\n\t\t\tif (isBlocked(nd, nm) && !(od.valueOf() == nd.valueOf())){\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar resetDate = !isBlocked(od, nm) ? od : scheduler.config.limit_start;\r\n\r\n\t\t\t\t\tscheduler.setCurrentView(!isBlocked(resetDate, nm) ? resetDate : null, nm);\r\n\t\t\t\t},1);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onMouseDown\", function(classname) {\r\n\t\treturn !(classname == dhx_time_block);\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeDrag\",function(id){\r\n\t\tif (!id) return true;\r\n\t\treturn scheduler.checkLimitViolation(scheduler.getEvent(id));\r\n\t});\r\n\tscheduler.attachEvent(\"onClick\", function (event_id, native_event_object){\r\n\t\treturn scheduler.checkLimitViolation(scheduler.getEvent(event_id));\r\n });\r\n\tscheduler.attachEvent(\"onBeforeLightbox\",function(id){\r\n\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tbefore = [ev.start_date, ev.end_date];\r\n\t\treturn scheduler.checkLimitViolation(ev);\r\n\t});\r\n\tscheduler.attachEvent(\"onEventSave\", function(id, data, is_new_event) {\r\n\r\n\t\t//lightbox may not have 'time' section\r\n\t\tif(!(data.start_date && data.end_date)){\r\n\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\tdata.start_date = new Date(ev.start_date);\r\n\t\t\tdata.end_date = new Date(ev.end_date);\r\n\t\t}\r\n\r\n\t\tif(data.rec_type){\r\n\t\t\t//_roll_back_dates modifies start_date of recurring event, need to check limits after modification\r\n\t\t\t// use a copy to keep original event unchanged\r\n\t\t\tvar data_copy = scheduler._lame_clone(data);\r\n\t\t\tscheduler._roll_back_dates(data_copy);\r\n\t\t\treturn scheduler.checkLimitViolation(data_copy);\r\n\t\t}\r\n\t\treturn scheduler.checkLimitViolation(data);\r\n\t});\r\n\tscheduler.attachEvent(\"onEventAdded\",function(id){\r\n\t\tif (!id) return true;\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif (!scheduler.checkLimitViolation(ev) && scheduler.config.limit_start && scheduler.config.limit_end) {\r\n\t\t\t//if newly created event is outside of limited time - crop it, leaving only allowed time\r\n\t\t\tif (ev.start_date < scheduler.config.limit_start) {\r\n\t\t\t\tev.start_date = new Date(scheduler.config.limit_start);\r\n\t\t\t}\r\n\t\t\tif (ev.start_date.valueOf() >= scheduler.config.limit_end.valueOf()) {\r\n\t\t\t\tev.start_date = this.date.add(scheduler.config.limit_end, -1, \"day\");\r\n\t\t\t}\r\n\t\t\tif (ev.end_date < scheduler.config.limit_start) {\r\n\t\t\t\tev.end_date = new Date(scheduler.config.limit_start);\r\n\t\t\t}\r\n\t\t\tif (ev.end_date.valueOf() >= scheduler.config.limit_end.valueOf()) {\r\n\t\t\t\tev.end_date = this.date.add(scheduler.config.limit_end, -1, \"day\");\r\n\t\t\t}\r\n\t\t\tif (ev.start_date.valueOf() >= ev.end_date.valueOf()) {\r\n\t\t\t\tev.end_date = this.date.add(ev.start_date, (this.config.event_duration||this.config.time_step), \"minute\");\r\n\t\t\t}\r\n\t\t\tev._timed=this.isOneDayEvent(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\",function(id){\r\n\t\tif (!id) return true;\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif (!scheduler.checkLimitViolation(ev)){\r\n\t\t\tif (!before) return false;\r\n\t\t\tev.start_date = before[0];\r\n\t\t\tev.end_date = before[1];\r\n\t\t\tev._timed=this.isOneDayEvent(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeEventChanged\",function(ev, native_object, is_new){\r\n\t\treturn scheduler.checkLimitViolation(ev);\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeEventCreated\", function(ev) { // native event\r\n\t\tvar start_date = scheduler.getActionData(ev).date;\r\n\t\tvar event = {\r\n\t\t\t_timed: true,\r\n\t\t\tstart_date: start_date,\r\n\t\t\tend_date: scheduler.date.add(start_date, scheduler.config.time_step, \"minute\")\r\n\t\t};\r\n\t\treturn scheduler.checkLimitViolation(event);\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", function(){\r\n\t\tscheduler._mark_now();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onAfterSchedulerResize\", function(){\r\n\t\twindow.setTimeout(function(){ \r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler._mark_now(); \r\n\t\t}, 1);\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\t\tscheduler._mark_now_timer = window.setInterval(function() {\r\n\t\t\tif(!scheduler._is_initialized())\r\n\t\t\t\treturn;\r\n\t\t\tscheduler._mark_now();\r\n\t\t}, 60000);\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tclearInterval(scheduler._mark_now_timer);\r\n\t});\r\n\r\n};\r\nscheduler._temp_limit_scope();\r\n\r\n\r\n}","import { GoogleMapAdapter } from \"./gMapAdapter\";\r\nimport { OpenStreetMapAdapter } from \"./osmMapAdapter\";\r\nimport { MapboxAdapter } from \"./mapboxAdapter\";\r\nimport { IMapAdapter, ICalendarEvent, IMapSettings } from \"./types\";\r\n\r\ndeclare let google: any;\r\n\r\nexport default function(scheduler: any){\r\n\t\r\nlet mapAdapter: IMapAdapter | null = null;\r\nlet eventHandlerIds: number[] = [];\r\nconst adapters: { [name:string]: IMapAdapter } = {\r\n\tgoogleMap: new GoogleMapAdapter(scheduler),\r\n\topenStreetMaps: new OpenStreetMapAdapter(scheduler),\r\n\tmapbox: new MapboxAdapter(scheduler)\r\n}\r\n\r\nif(!scheduler.ext){\r\n\tscheduler.ext = {};\r\n}\r\nscheduler.ext.mapView = {\r\n\tcreateAdapter: function():IMapAdapter{\r\n\t\treturn adapters[scheduler.config.map_view_provider];\r\n\t},\r\n\tcreateMarker: function(config){\r\n\t\treturn new google.maps.Marker(config);\r\n\t},\r\n\tcurrentAdapter: null,\r\n\tadapters\r\n};\r\nscheduler._latLngUpdate = false; // flag for updating events which don't have event.lat and event.lng\r\nscheduler._eventLocationChanged = false; // flag for checking if the location of the event is changed\r\nscheduler.config.map_view_provider = \"googleMap\";\r\nscheduler.config.map_settings = {\r\n\tinitial_position: {\r\n\t lat: 48.724,\r\n\t lng: 8.215\r\n\t},\r\n\terror_position: {\r\n\t lat: 15,\r\n\t lng: 15\r\n\t},\r\n\tinitial_zoom: 1,\r\n\tzoom_after_resolve: 15,\r\n\tinfo_window_max_width: 300,\r\n\tresolve_user_location: true,\r\n\tresolve_event_location: true,\r\n\tview_provider: \"googleMap\"\r\n}\r\nif (scheduler.config.map_initial_position) {\r\n\tscheduler.config.map_settings.initial_position = {\r\n\t\tlat: scheduler.config.map_initial_position.lat(),\r\n\t\tlng: scheduler.config.map_initial_position.lng(), \r\n\t};\r\n}\r\n\r\nif (scheduler.config.map_error_position) {\r\n\tscheduler.config.map_settings.error_position = {\r\n\t\tlat: scheduler.config.map_error_position.lat(),\r\n\t\tlng: scheduler.config.map_error_position.lng(), \r\n\t};\r\n}\r\n\r\nscheduler.xy.map_date_width = 188; // date column width\r\nscheduler.xy.map_icon_width = 25; // event details icon width\r\nscheduler.xy.map_description_width = 400; // description column width\r\nscheduler.date.add_map = function(date, inc, mode) {\r\n\treturn (new Date(date.valueOf()));\r\n};\r\nscheduler.templates.map_date = function(dd, ed, mode) {\r\n\treturn '';\r\n};\r\nscheduler.templates.map_time = function(start, end, ev) {\r\n\tif (scheduler.config.rtl && !ev._timed) {\r\n\t\treturn scheduler.templates.day_date(end) + \" – \" + scheduler.templates.day_date(start);\r\n\t} else if (ev._timed) {\r\n\t\treturn this.day_date(ev.start_date, ev.end_date, ev) + \" \" + this.event_date(start);\r\n\t} else {\r\n\t\treturn scheduler.templates.day_date(start) + \" – \" + scheduler.templates.day_date(end);\r\n\t}\r\n};\r\nscheduler.templates.map_text = function(start, end, ev) {\r\n\treturn ev.text;\r\n};\r\nscheduler.templates.map_info_content = function(event){\r\n return `
Event's text: ${event.text}\r\n\t\t\t\t
Location: ${event.event_location}
\r\n\t\t\t\t
Starts: ${scheduler.templates.tooltip_date_format(event.start_date)}
\r\n\t\t\t\t
Ends: ${scheduler.templates.tooltip_date_format(event.end_date)}
\r\n\t\t\t
`;\r\n};\r\nscheduler.date.map_start = function(d) {\r\n\treturn d;\r\n};\r\n\r\nfunction setupMapView(scheduler) {\r\n\t// Initialization logic, possibly including creation of a new mapAdapter\r\n\tmapAdapter = scheduler.ext.mapView.createAdapter();\r\n\tattachSchedulerEvents();\r\n}\r\nasync function addEventWithLocation(event: ICalendarEvent, mapAdapter: IMapAdapter){\r\n\tlet coordinates = await mapAdapter.resolveAddress(event.event_location);\r\n\tevent.lat = coordinates.lat;\r\n\tevent.lng = coordinates.lng;\r\n\tmapAdapter.removeEventMarker(String(event.id));\r\n\tmapAdapter.addEventMarker(event);\r\n\treturn event;\r\n}\r\nfunction setUserLocation(options: IMapSettings, adapter: IMapAdapter): void{\r\n\tif (options.resolve_user_location) {\r\n\t\tif (navigator.geolocation) {\r\n\t\t\tnavigator.geolocation.getCurrentPosition(function(position) {\r\n\t\t\t\tadapter.setView(position.coords.latitude, position.coords.longitude, options.zoom_after_resolve || options.initial_zoom);\r\n\t\t\t});\r\n\t\t}\r\n\t} else {\r\n\t\tadapter.setView(options.initial_position.lat, options.initial_position.lng, options.initial_zoom);\r\n\t}\r\n}\r\nscheduler.dblclick_dhx_map_area = function(e) {\r\n\tlet eventNode = e.target.closest(`[${scheduler.config.event_attribute}]`);\r\n\tif (eventNode){\r\n\t\tlet eventId = eventNode.getAttribute(`${scheduler.config.event_attribute}`);\r\n\t\tscheduler.showLightbox(eventId);\r\n\t}\r\n\tif (!this.config.readonly && this.config.dblclick_create && !eventNode) {\r\n\t\tthis.addEventNow({\r\n\t\t\tstart_date: scheduler.config.map_start,\r\n\t\t\tend_date: scheduler.date.add( scheduler.config.map_start, scheduler.config.time_step, \"minute\"),\r\n\t\t});\r\n\t}\t\r\n};\r\n\r\nfunction attachSchedulerEvents() { \r\n eventHandlerIds.push(\r\n\tscheduler.attachEvent(\"onEventSave\",function(id,ev,is_new){\r\n\t\tlet unmodifiedEvent = scheduler.getEvent(id);\r\n\t\tif (unmodifiedEvent && unmodifiedEvent.event_location != ev.event_location) {\r\n\t\t\tscheduler._eventLocationChanged = true;\r\n\t\t}\r\n\t\treturn true;\r\n\t}),\r\n scheduler.attachEvent(\"onEventChanged\", (id, event) => {\r\n\t\tconst {start_date, end_date} = event;\r\n\t\tconst {min_date, max_date} = scheduler.getState();\r\n\t\tif(start_date.valueOf() < max_date.valueOf() && end_date.valueOf() > min_date.valueOf()){\r\n\t\t\tif (mapAdapter) {\r\n\t\t\t\tif (scheduler.config.map_settings.resolve_event_location && event.event_location && !scheduler._latLngUpdate ) {\r\n\t\t\t\t \taddEventWithLocation(event, mapAdapter);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmapAdapter.updateEventMarker(event);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._latLngUpdate = false;\r\n\t\treturn true;\r\n }),\r\n\tscheduler.attachEvent(\"onEventIdChange\", function(old_id,new_id){\r\n\t\tlet newIdEvent = scheduler.getEvent(new_id);\r\n\t\tmapAdapter?.removeEventMarker(old_id);\r\n\t\tmapAdapter?.addEventMarker(newIdEvent);\r\n\t}),\r\n scheduler.attachEvent(\"onEventAdded\", (id, event) => {\r\n\t\tconst {start_date, end_date} = event;\r\n\t\tconst {min_date, max_date} = scheduler.getState();\r\n\t\tif(start_date.valueOf() < max_date.valueOf() && end_date.valueOf() > min_date.valueOf()){\r\n \t\tif (mapAdapter) {\r\n\t\t\t\tif (scheduler.config.map_settings.resolve_event_location && event.event_location && scheduler._eventLocationChanged) {\r\n\t\t\t\t\taddEventWithLocation(event, mapAdapter);\r\n\t\t\t\t\tscheduler._eventLocationChanged = false;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmapAdapter.addEventMarker(event);\r\n\t\t\t\t\tmapAdapter.onEventClick(event);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n }),\r\n scheduler.attachEvent(\"onClick\", function (id, e){\r\n\t\tconst event = scheduler.getEvent(id);\r\n\t\tif (mapAdapter && event) mapAdapter.onEventClick(event);\r\n\t\treturn false;\r\n }),\r\n scheduler.attachEvent(\"onBeforeEventDelete\", (id, event) => {\r\n\t\tif (mapAdapter) {\r\n\t\t\tmapAdapter.removeEventMarker(id);\r\n\t\t}\r\n\t\treturn true;\r\n })\r\n );\r\n}\r\nfunction detachSchedulerEvents() {\r\n\teventHandlerIds.forEach(id => scheduler.detachEvent(id));\r\n\teventHandlerIds = [];\r\n}\r\n\r\nscheduler.attachEvent(\"onSchedulerReady\", function() {\r\n\r\n\tif(scheduler.config.map_initial_zoom !== undefined){\r\n\t\tscheduler.config.map_settings.initial_zoom = scheduler.config.map_initial_zoom;\r\n\t}\r\n\tif(scheduler.config.map_zoom_after_resolve !== undefined){\r\n\t\tscheduler.config.map_settings.zoom_after_resolve = scheduler.config.map_zoom_after_resolve;\r\n\t}\r\n\tif(scheduler.config.map_infowindow_max_width !== undefined){\r\n\t\tscheduler.config.map_settings.info_window_max_width = scheduler.config.map_infowindow_max_width;\r\n\t}\r\n\tif(scheduler.config.map_resolve_user_location !== undefined){\r\n\t\tscheduler.config.map_settings.resolve_user_location = scheduler.config.map_resolve_user_location;\r\n\t}\r\n\tif(scheduler.config.map_view_provider !== undefined){\r\n\t\tscheduler.config.map_settings.view_provider = scheduler.config.map_view_provider;\r\n\t}\r\n\tif(scheduler.config.map_type !== undefined){\r\n\t\tscheduler.config.map_settings.type = scheduler.config.map_type;\r\n\t}\r\n\tif(scheduler.config.map_resolve_event_location !== undefined){\r\n\t\tscheduler.config.map_settings.resolve_event_location = scheduler.config.map_resolve_event_location;\r\n\t}\r\n\tscheduler.ext.mapView.currentAdapter = scheduler.config.map_view_provider;\r\n\r\n\tlet map = document.createElement('div');\r\n\tmap.className = 'mapContainer';\r\n\tmap.id = 'mapContainer';\r\n\tmap.style.display = \"none\";\r\n\tmap.style.zIndex = \"1\";\r\n\tscheduler._obj.appendChild(map);\r\n\r\n\tconst old = scheduler.render_data;\r\n\tscheduler.render_data = function(evs, hold) {\r\n\t\tif (this._mode == \"map\") {\r\n\t\t\tfill_map_tab();\r\n\t\t\tlet events = scheduler.get_visible_events();\r\n\t\t\tif (mapAdapter) {\r\n\t\t\t\tmapAdapter.clearEventMarkers();\r\n\t\t\t\tevents.forEach((event) => mapAdapter?.addEventMarker(event));\r\n\t\t\t}\r\n\t\t} else\r\n\t\t\treturn old.apply(this, arguments);\r\n\t};\r\n\r\n\tscheduler.map_view = function(mode) {\r\n\t\tscheduler._els.dhx_cal_data[0].style.width = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\tscheduler._min_date = scheduler.config.map_start || (scheduler._currentDate());\r\n\t\tscheduler._max_date = scheduler.config.map_end || scheduler.date.add(scheduler._currentDate(), 1, \"year\");\r\n\t\tscheduler._table_view = true;\r\n\t\tset_full_view(mode);\r\n\t\tlet mapContainer = document.getElementById('mapContainer');\r\n\t\t_setMapSize('mapContainer');\r\n\r\n\t\t// creating the new logic\r\n\t\tif (mode && mapContainer) {\r\n\t\t\tmap.style.display = 'block';\r\n\t\t\tfill_map_tab();\r\n\t\t\t// case to display several maps and has the opportunity to switch between them\r\n\t\t\tif (scheduler.config.map_view_provider == scheduler.ext.mapView.currentAdapter) {\r\n\t\t\t\tmapAdapter?.destroy(mapContainer);\r\n\t\t\t\tsetupMapView(scheduler);\r\n\t\t\t\tmapAdapter?.initialize(mapContainer, scheduler.config.map_settings);\r\n\t\t\t} else {\r\n\t\t\t\tmapAdapter?.destroy(mapContainer);\r\n\t\t\t\tsetupMapView(scheduler);\r\n\t\t\t\tmapAdapter?.initialize(mapContainer, scheduler.config.map_settings);\r\n\t\t\t \tscheduler.ext.mapView.currentAdapter = scheduler.config.map_view_provider;\r\n\t\t\t}\r\n\t\t\tif(mapAdapter) {\r\n\t\t\t\tsetUserLocation(scheduler.config.map_settings, mapAdapter);\r\n\t\t\t}\t\r\n\t\t} else {\r\n\t\t\tmap.style.display = 'none';\r\n\t\t\tscheduler._els.dhx_cal_data[0].style.width = \"100%\";\r\n\t\t \tif (mapAdapter && mapContainer ) {\r\n\t\t\t\tmapAdapter.destroy(mapContainer);\r\n\t\t\t\tmapAdapter = null;\r\n\t\t\t\tscheduler.ext.mapView.currentAdapter = scheduler.config.map_view_provider;\r\n\t\t }\r\n\t\t \tdetachSchedulerEvents();\r\n\t\t}\r\n\t};\r\n\r\n\tfunction _setMapSize(elem_id) { //input - map's div id\r\n\t\tlet map = document.getElementById(elem_id);\r\n\t\tif (map) {\r\n\t\t\tconst nav_height = scheduler.$container.querySelector(\".dhx_cal_navline\").offsetHeight;\r\n\t\t\tlet height = scheduler.$container.querySelector(\".dhx_cal_data\").offsetHeight + scheduler.$container.querySelector(\".dhx_cal_header\").offsetHeight;\r\n\t\t\tif (height < 0)\r\n\t\t\t\theight = 0;\r\n\t\t\tlet width = scheduler._x - scheduler.xy.map_date_width - scheduler.xy.map_description_width - 1;\r\n\t\t\tif (width < 0)\r\n\t\t\t\twidth = 0;\r\n\t\t\tmap.style.height = height + 'px';\r\n\t\t\tmap.style.width = width + 'px';\r\n\t\t\tmap.style.position = \"absolute\";\r\n\t\t\tmap.style.top = nav_height + \"px\";\r\n\t\t\tif (scheduler.config.rtl) {\r\n\t\t\t\tmap.style.marginRight = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\t\t} else {\r\n\t\t\t\tmap.style.marginLeft = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\t\t}\r\n\t\t\tmap.style.marginTop = (scheduler.xy.nav_height + 2) + 'px';\r\n\t\t}\r\n\t}\t\r\n\tfunction fill_map_tab() {\r\n\t\t//select events for which data need to be printed\r\n\t\tlet events = scheduler.get_visible_events();\r\n\t\tevents.sort(function(a, b) {\r\n\t\t\tif(a.start_date.valueOf()==b.start_date.valueOf())\r\n\t\t\t\treturn a.id>b.id?1:-1;\r\n\t\t\treturn a.start_date>b.start_date?1:-1;\r\n\t\t});\r\n\r\n\t\t//generate html for the view\r\n\t\tlet ariaAttr = scheduler._waiAria.mapAttrString();\r\n\r\n\t\tlet html = \"
\";\r\n\t\tfor (let i = 0; i < events.length; i++) {\r\n\t\t\tlet ev = events[i];\r\n\t\t\tlet event_class = (ev.id == scheduler._selected_event_id) ? 'dhx_map_line highlight' : 'dhx_map_line';\r\n\t\t\tlet bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\t\t\tlet color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\t\t\tlet ariaAttr = scheduler._waiAria.mapRowAttrString(ev);\r\n\t\t\tlet ariaButtonAttr = scheduler._waiAria.mapDetailsBtnString();\r\n\r\n\t\t\thtml += \"
\" + scheduler.templates.map_time(ev.start_date, ev.end_date, ev) + \"
\";\r\n\t\t\thtml += `
\r\n\t\t\t\r\n\t\t\t
`;\r\n\t\t\thtml += \"
\" + scheduler.templates.map_text(ev.start_date, ev.end_date, ev) + \"
\"; // -25 = icon size 20 and padding 5\r\n\t\t}\r\n\t\thtml += \"
\";\r\n\r\n\t\t//render html\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = 0; //fix flickering in FF\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t//\tscheduler._els[\"dhx_cal_data\"][0].style.width = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\r\n\t\tlet t = scheduler._els[\"dhx_cal_data\"][0].firstChild.childNodes;\r\n\r\n\t\tlet dateElement = scheduler._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML=scheduler.templates[scheduler._mode + \"_date\"](scheduler._min_date, scheduler._max_date, scheduler._mode);\r\n\t\t}\r\n\r\n\t\tscheduler._rendered = [];\r\n\t\tfor (let i = 0; i < t.length - 2; i++) {\r\n\t\t\tscheduler._rendered[i] = t[i];\r\n\t\t}\r\n\t}\r\n\tfunction set_full_view(mode) {\r\n\t\tif (mode) {\r\n\t\t\tconst l = scheduler.locale.labels;\r\n\t\t\tscheduler._els[\"dhx_cal_header\"][0].innerHTML = \"
\" + l.date + \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"
\" + l.description + \"
\";\r\n\t\t\tscheduler._table_view = true;\r\n\t\t\tscheduler.set_sizes();\r\n\t\t}\r\n\t}\r\n\t\r\n\tscheduler.attachEvent(\"onLocationError\", function (id){\r\n\t\talert(\"Location can't be found\");\r\n\t\treturn google.maps.LatLng(51.477840, -0.001492); \r\n\t\t//the coordinates of the Greenwich Royal Observatory\r\n\t})\r\n\tlet _updateEventLocation = async function(event) {\r\n\t\tif (mapAdapter){\r\n\t\t\tconst coordinates = await mapAdapter.resolveAddress(event.event_location);\r\n\t\t\tif (coordinates.lat && coordinates.lng) {\r\n\t\t\t\tevent.lat = +coordinates.lat;\r\n\t\t\t\tevent.lng = +coordinates.lng;\r\n\t\t\t} else {\r\n\t\t\t\tscheduler.callEvent(\"onLocationError\", [event.id]);\r\n\t\t\t\tevent.lng = scheduler.config.map_settings.error_position.lng;\r\n\t\t\t\tevent.lat = scheduler.config.map_settings.error_position.lat;\r\n\t\t\t}\r\n\t\t\tscheduler._latLngUpdate = true;\r\n\t\t\tscheduler.callEvent(\"onEventChanged\", [event.id, event]);\r\n\t\t}\r\n\t};\r\n\tlet _delay = function(method, object, params, delay) {\r\n\t\tsetTimeout(function() {\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tlet ret = method.apply(object, params);\r\n\t\t\tmethod = object = params = null;\r\n\t\t\treturn ret;\r\n\t\t}, delay || 1);\r\n\t};\r\n\tscheduler._event_resolve_delay = 1500;\r\n\tscheduler.attachEvent(\"onEventLoading\", function(event) {\r\n\t\tif (event.lat && event.lng) {\r\n\t\t\tevent.lat = +event.lat;\r\n\t\t\tevent.lng = +event.lng;\r\n\t\t}\r\n\t\tif (scheduler.config.map_settings.resolve_event_location && event.event_location && !event.lat && !event.lng) { // don't delete !event.lat && !event.lng as location could change\r\n\t\t\tscheduler._event_resolve_delay += 1500;\r\n\t\t\t_delay(_updateEventLocation, this, [event], scheduler._event_resolve_delay);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n})\r\n\r\n}","export default function(scheduler){\r\n\r\nconst minicalDomEvents = scheduler._createDomEventScope();\r\n\t\r\n\r\nscheduler.config.minicalendar = {\r\n\tmark_events: true\r\n};\r\nscheduler._synced_minicalendars = [];\r\nscheduler.renderCalendar = function(obj, _prev, is_refresh) {\r\n\tvar cal = null;\r\n\tvar date = obj.date || (scheduler._currentDate());\r\n\tif (typeof date == \"string\")\r\n\t\tdate = this.templates.api_date(date);\r\n\r\n\tif (!_prev) {\r\n\t\tvar cont = obj.container;\r\n\t\tvar pos = obj.position;\r\n\r\n\t\tif (typeof cont == \"string\")\r\n\t\t\tcont = document.getElementById(cont);\r\n\r\n\t\tif (typeof pos == \"string\")\r\n\t\t\tpos = document.getElementById(pos);\r\n\t\tif (pos && (typeof pos.left == \"undefined\" && typeof pos.right == \"undefined\")) {\r\n\t\t\tvar tpos = scheduler.$domHelpers.getOffset(pos);\r\n\t\t\tpos = {\r\n\t\t\t\ttop: tpos.top + pos.offsetHeight,\r\n\t\t\t\tleft: tpos.left\r\n\t\t\t};\r\n\t\t}\r\n\t\tif (!cont)\r\n\t\t\tcont = scheduler._get_def_cont(pos);\r\n\r\n\t\tcal = this._render_calendar(cont, date, obj);\r\n\t\r\n\t\tif (!cal.$_eventAttached) {\r\n\t\t\tcal.$_eventAttached = true;\r\n\t\t\tminicalDomEvents.attach(cal, \"click\", (function(e) {\r\n\t\t\t\tvar src = e.target || e.srcElement;\r\n\r\n\t\t\t\tvar $dom = scheduler.$domHelpers;\r\n\t\t\t\tif ($dom.closest(src, \".dhx_month_head\")) {\r\n\t\t\t\t\tif (!$dom.closest(src, \".dhx_after\") && !$dom.closest(src, \".dhx_before\")) {\r\n\r\n\t\t\t\t\t\tvar cellRoot = $dom.closest(src, \"[data-cell-date]\");\r\n\t\t\t\t\t\tvar dateAttribute = cellRoot.getAttribute(\"data-cell-date\");\r\n\t\t\t\t\t\tvar newDate = scheduler.templates.parse_date(dateAttribute);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tscheduler.unmarkCalendar(this);\r\n\t\t\t\t\t\tscheduler.markCalendar(this, newDate, \"dhx_calendar_click\");\r\n\t\t\t\t\t\tthis._last_date = newDate;\r\n\t\t\t\t\t\tif (this.conf.handler) this.conf.handler.call(scheduler, newDate, this);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}).bind(cal));\r\n\t\t}\r\n\t\r\n\t} else {\r\n\t\tcal = this._render_calendar(_prev.parentNode, date, obj, _prev);\r\n\t\tscheduler.unmarkCalendar(cal);\r\n\t}\r\n\r\n\tif (scheduler.config.minicalendar.mark_events) {\r\n\t\tvar start = scheduler.date.month_start(date);\r\n\t\tvar end = scheduler.date.add(start, 1, \"month\");\r\n\t\tvar evs = this.getEvents(start, end);\r\n\t\tvar filter = this[\"filter_\" + this._mode];\r\n\t\tvar markedDates = {};\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tif (filter && !filter(ev.id, ev))\r\n\t\t\t\tcontinue;\r\n\t\t\tvar d = ev.start_date;\r\n\t\t\tif (d.valueOf() < start.valueOf())\r\n\t\t\t\td = start;\r\n\t\t\td = scheduler.date.date_part(new Date(d.valueOf()));\r\n\t\t\twhile (d < ev.end_date) {\r\n\t\t\t\tif(!markedDates[+d]) {\r\n\t\t\t\t\tmarkedDates[+d] = true;\r\n\t\t\t\t\tthis.markCalendar(cal, d, \"dhx_year_event\");\r\n\t\t\t\t}\r\n\t\t\t\td = this.date.add(d, 1, \"day\");\r\n\t\t\t\tif (d.valueOf() >= end.valueOf())\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tthis._markCalendarCurrentDate(cal);\r\n\r\n\tcal.conf = obj;\r\n\tif (obj.sync && !is_refresh)\r\n\t\tthis._synced_minicalendars.push(cal);\r\n\r\n\tif(!cal.conf._on_xle_handler){\r\n\t\tcal.conf._on_xle_handler = scheduler.attachEvent(\"onXLE\", function refreshOnLoad(){\r\n\t\t\tscheduler.updateCalendar(cal, cal.conf.date);\r\n\t\t});\r\n\t}\r\n\r\n\tif(this.config.wai_aria_attributes && this.config.wai_aria_application_role){\r\n\t\tcal.setAttribute(\"role\", \"application\");\r\n\t}\r\n\r\n\treturn cal;\r\n};\r\nscheduler._get_def_cont = function(pos) {\r\n\tif (!this._def_count) {\r\n\t\tthis._def_count = document.createElement(\"div\");\r\n\t\tthis._def_count.className = \"dhx_minical_popup\";\r\n\t\tscheduler.event(this._def_count, \"click\", function(e) { e.cancelBubble = true; });\r\n\t\tdocument.body.appendChild(this._def_count);\r\n\t}\r\n\r\n\tif(pos.left){\r\n\t\tthis._def_count.style.left = pos.left + \"px\";\r\n\t}\r\n\tif(pos.right){\r\n\t\tthis._def_count.style.right = pos.right + \"px\";\r\n\t}\r\n\tif(pos.top){\r\n\t\tthis._def_count.style.top = pos.top + \"px\";\r\n\t}\r\n\tif(pos.bottom){\r\n\t\tthis._def_count.style.bottom = pos.bottom + \"px\";\r\n\t}\r\n\r\n\tthis._def_count._created = new Date();\r\n\r\n\treturn this._def_count;\r\n};\r\nscheduler._locateCalendar = function(cal, date) {\r\n\tif (typeof date == \"string\")\r\n\t\tdate = scheduler.templates.api_date(date);\r\n\r\n\tif(+date > +cal._max_date || +date < +cal._min_date)\r\n\t\treturn null;\r\n\r\n\tvar table = cal.querySelector(\".dhx_year_body\").childNodes[0];\r\n\r\n\tvar weekNum = 0;\r\n\tvar dat = new Date(cal._min_date);\r\n\twhile(+this.date.add(dat, 1, \"week\") <= +date){\r\n\t\tdat = this.date.add(dat, 1, \"week\");\r\n\t\tweekNum++;\r\n\t}\r\n\r\n\tvar sm = scheduler.config.start_on_monday;\r\n\tvar day = (date.getDay() || (sm ? 7 : 0)) - (sm ? 1 : 0);\r\n\r\n\tconst dayCell = table.querySelector(`.dhx_cal_month_row:nth-child(${weekNum + 1}) .dhx_cal_month_cell:nth-child(${day + 1})`);\r\n\tif(dayCell) {\r\n\t\treturn dayCell.firstChild;\r\n\t} else {\r\n\t\treturn null;\r\n\t}\r\n};\r\nscheduler.markCalendar = function(cal, date, css) {\r\n\tvar div = this._locateCalendar(cal, date);\r\n\tif(!div)\r\n\t\treturn;\r\n\r\n\tdiv.className += \" \" + css;\r\n};\r\nscheduler.unmarkCalendar = function(cal, date, css) {\r\n\tdate = date || cal._last_date;\r\n\tcss = css || \"dhx_calendar_click\";\r\n\tif (!date) return;\r\n\tvar el = this._locateCalendar(cal, date);\r\n\tif(!el)\r\n\t\treturn;\r\n\tel.className = (el.className || \"\").replace(RegExp(css, \"g\"));\r\n};\r\nscheduler._week_template = function(width) {\r\n\tvar summ = (width || 250);\r\n\tvar left = 0;\r\n\r\n\tvar week_template = document.createElement(\"div\");\r\n\tvar dummy_date = this.date.week_start(scheduler._currentDate());\r\n\tfor (var i = 0; i < 7; i++) {\r\n\t\tthis._cols[i] = Math.floor(summ / (7 - i));\r\n\t\tthis._render_x_header(i, left, dummy_date, week_template);\r\n\t\tdummy_date = this.date.add(dummy_date, 1, \"day\");\r\n\t\tsumm -= this._cols[i];\r\n\t\tleft += this._cols[i];\r\n\t}\r\n\tweek_template.lastChild.className += \" dhx_scale_bar_last\";\r\n\treturn week_template;\r\n};\r\nscheduler.updateCalendar = function(obj, sd) {\r\n\tobj.conf.date = sd;\r\n\tthis.renderCalendar(obj.conf, obj, true);\r\n};\r\nscheduler._mini_cal_arrows = [\" \", \" \"];\r\nscheduler._render_calendar = function(obj, sd, conf, previous) {\r\n\t/*store*/\r\n\tvar ts = scheduler.templates;\r\n\tvar temp = this._cols;\r\n\tthis._cols = [];\r\n\tvar temp2 = this._mode;\r\n\tthis._mode = \"calendar\";\r\n\tvar temp3 = this._colsS;\r\n\tthis._colsS = {height: 0};\r\n\tvar temp4 = new Date(this._min_date);\r\n\tvar temp5 = new Date(this._max_date);\r\n\tvar temp6 = new Date(scheduler._date);\r\n\tvar temp7 = ts.month_day;\r\n\tvar temp8 = this._ignores_detected; this._ignores_detected = 0;\r\n\tts.month_day = ts.calendar_date;\r\n\r\n\tsd = this.date.month_start(sd);\r\n\tvar week_template = this._week_template(obj.offsetWidth - 1 - this.config.minicalendar.padding );\r\n\r\n\tvar d;\r\n\tif (previous){\r\n\t\td = previous;\r\n\t} else {\r\n\t\td = document.createElement(\"div\");\r\n\t\td.className = \"dhx_cal_container dhx_mini_calendar\";\r\n\t}\r\n\td.setAttribute(\"date\", this._helpers.formatDate(sd));\r\n\td.innerHTML = \"
\" +\r\n\t\t\t\"
\" : \"'>\") +\r\n\t\t\t\"
\"+(week_template ? week_template.innerHTML : \"\")+\"
\" +\r\n\t\t\t\"
\" +\r\n\t\t\"
\";\r\n\tvar header = d.querySelector(\".dhx_year_month\");\r\n\tvar weekHeader = d.querySelector(\".dhx_year_week\");\r\n\tvar body = d.querySelector(\".dhx_year_body\");\r\n\r\n\theader.innerHTML = this.templates.calendar_month(sd);\r\n\tif (conf.navigation) {\r\n\t\tvar move_minicalendar_date = function(calendar, diff) {\r\n\t\t\tvar date = scheduler.date.add(calendar._date, diff, \"month\");\r\n\t\t\tscheduler.updateCalendar(calendar, date);\r\n\t\t\tif (scheduler._date.getMonth() == calendar._date.getMonth() && scheduler._date.getFullYear() == calendar._date.getFullYear()) {\r\n\t\t\t\tscheduler._markCalendarCurrentDate(calendar);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tvar css_classnames = [\"dhx_cal_prev_button\", \"dhx_cal_next_button\"];\r\n\t\tvar css_texts = [\"left:1px;top:4px;position:absolute;\", \"left:auto; right:1px;top:4px;position:absolute;\"];\r\n\t\tvar diffs = [-1, 1];\r\n\t\tvar handler = function(diff) {\r\n\t\t\treturn function() {\t\r\n\t\t\t\tif (conf.sync) {\r\n\t\t\t\t\tvar calendars = scheduler._synced_minicalendars;\r\n\t\t\t\t\tfor (var k = 0; k < calendars.length; k++) {\r\n\t\t\t\t\t\tmove_minicalendar_date(calendars[k], diff);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (scheduler.config.rtl) {\r\n\t\t\t\t\t\tdiff = -diff;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmove_minicalendar_date(d, diff);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t};\r\n\t\tvar labels = [scheduler.locale.labels.prev, scheduler.locale.labels.next];\r\n\t\tfor (var j = 0; j < 2; j++) {\r\n\t\t\tvar arrow = document.createElement(\"div\");\r\n\t\t\t//var diff = diffs[j];\r\n\t\t\tarrow.className = css_classnames[j];\r\n\r\n\t\t\tscheduler._waiAria.headerButtonsAttributes(arrow, labels[j]);\r\n\r\n\t\t\tarrow.style.cssText = css_texts[j];\r\n\t\t\tarrow.innerHTML = this._mini_cal_arrows[j];\r\n\t\t\theader.appendChild(arrow);\r\n\t\t\tminicalDomEvents.attach(arrow, \"click\", handler(diffs[j]));\r\n\t\t}\r\n\t}\r\n\td._date = new Date(sd);\r\n\r\n\td.week_start = (sd.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;\r\n\r\n\tvar dd = d._min_date = this.date.week_start(sd);\r\n\td._max_date = this.date.add(d._min_date, 6, \"week\");\r\n\r\n\tthis._reset_month_scale(body, sd, dd, 6);\r\n\r\n\tif (!previous)\r\n\t\tobj.appendChild(d);\r\n\r\n\tweekHeader.style.height = (weekHeader.childNodes[0].offsetHeight - 1) + \"px\"; // dhx_year_week should have height property so that day dates would get correct position. dhx_year_week height = height of it's child (with the day name)\r\n\r\n\tvar headerId = scheduler.uid();\r\n\tscheduler._waiAria.minicalHeader(header, headerId);\r\n\tscheduler._waiAria.minicalGrid(d.querySelector(\".dhx_year_grid\"), headerId);\r\n\tscheduler._waiAria.minicalRow(weekHeader);\r\n\r\n\tvar dayHeaders = weekHeader.querySelectorAll(\".dhx_scale_bar\");\r\n\tfor(var i = 0; i < dayHeaders.length; i++){\r\n\t\tscheduler._waiAria.minicalHeadCell(dayHeaders[i]);\r\n\t}\r\n\tvar dayCells = body.querySelectorAll(\".dhx_cal_month_cell\");\r\n\tvar firstDate = new Date(dd);\r\n\tfor(var i = 0; i < dayCells.length; i++){\r\n\r\n\t\tscheduler._waiAria.minicalDayCell(dayCells[i], new Date(firstDate));\r\n\t\tfirstDate = scheduler.date.add(firstDate, 1, \"day\");\r\n\t}\r\n\r\n\tscheduler._waiAria.minicalHeader(header, headerId);\r\n\r\n\t/*restore*/\r\n\tthis._cols = temp;\r\n\tthis._mode = temp2;\r\n\tthis._colsS = temp3;\r\n\tthis._min_date = temp4;\r\n\tthis._max_date = temp5;\r\n\tscheduler._date = temp6;\r\n\tts.month_day = temp7;\r\n\tthis._ignores_detected = temp8;\r\n\treturn d;\r\n};\r\nscheduler.destroyCalendar = function(cal, force) {\r\n\tif (!cal && this._def_count && this._def_count.firstChild) {\r\n\t\tif (force || (new Date()).valueOf() - this._def_count._created.valueOf() > 500)\r\n\t\t\tcal = this._def_count.firstChild;\r\n\t}\r\n\tif (!cal) return;\r\n\tminicalDomEvents.detachAll();\r\n\t//cal.onclick = null;\r\n\tcal.innerHTML = \"\";\r\n\tif (cal.parentNode)\r\n\t\tcal.parentNode.removeChild(cal);\r\n\tif (this._def_count)\r\n\t\tthis._def_count.style.top = \"-1000px\";\r\n\r\n\tif(cal.conf && cal.conf._on_xle_handler)\r\n\t\tscheduler.detachEvent(cal.conf._on_xle_handler);\r\n};\r\nscheduler.isCalendarVisible = function() {\r\n\tif (this._def_count && parseInt(this._def_count.style.top, 10) > 0)\r\n\t\treturn this._def_count;\r\n\treturn false;\r\n};\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tscheduler.event(document.body, \"click\", function() { scheduler.destroyCalendar(); });\r\n}, {once: true});\r\n\r\n\r\n\r\nscheduler.form_blocks.calendar_time = {\r\n\trender: function(sns) {\r\n\t\tvar html = \"\";\r\n\r\n\t\tvar cfg = scheduler.config;\r\n\t\tvar dt = this.date.date_part(scheduler._currentDate());\r\n\r\n\t\tvar last = 24 * 60, first = 0;\r\n\t\tif (cfg.limit_time_select) {\r\n\t\t\tfirst = 60 * cfg.first_hour;\r\n\t\t\tlast = 60 * cfg.last_hour + 1; // to include \"17:00\" option if time select is limited\r\n\t\t}\r\n\t\tdt.setHours(first / 60);\r\n\r\n\t\tsns._time_values = [];\r\n\t\thtml += \" \";\r\n\r\n\t\t//var full_day = scheduler.config.full_day;\r\n\r\n\t\treturn \"
\" + html + \"  –  \" + html + \"
\";\r\n\t},\r\n\tset_value: function(node, value, ev, config) {\r\n\r\n\t\tvar inputs = node.getElementsByTagName(\"input\");\r\n\t\tvar selects = node.getElementsByTagName(\"select\");\r\n\t\tvar start_date,\r\n\t\t\tend_date;\r\n\r\n\t\tvar _init_once = function(inp, date, number) {\r\n\t\t\tscheduler.event(inp, \"click\", function() {\r\n\t\t\t\tscheduler.destroyCalendar(null, true);\r\n\t\t\t\tscheduler.renderCalendar({\r\n\t\t\t\t\tposition: inp,\r\n\t\t\t\t\tdate: new Date(this._date),\r\n\t\t\t\t\tnavigation: true,\r\n\t\t\t\t\thandler: function(new_date) {\r\n\t\t\t\t\t\tinp.value = scheduler.templates.calendar_time(new_date);\r\n\t\t\t\t\t\tinp._date = new Date(new_date);\r\n\t\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t\t\tif (scheduler.config.event_duration && scheduler.config.auto_end_date && number === 0) { //first element = start date\r\n\t\t\t\t\t\t\t_update_minical_select();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t};\r\n\r\n\t\tif (scheduler.config.full_day) {\r\n\t\t\tif (!node._full_day) {\r\n\t\t\t\tvar html = \"\";\r\n\t\t\t\tif (!scheduler.config.wide_form)\r\n\t\t\t\t\thtml = node.previousSibling.innerHTML + html;\r\n\t\t\t\tnode.previousSibling.innerHTML = html;\r\n\t\t\t\tnode._full_day = true;\r\n\t\t\t}\r\n\t\t\tvar input = node.previousSibling.getElementsByTagName(\"input\")[0];\r\n\r\n\t\t\tvar isFulldayEvent = (scheduler.date.time_part(ev.start_date) === 0 && scheduler.date.time_part(ev.end_date) === 0);\r\n\t\t\tinput.checked = isFulldayEvent;\r\n\r\n\t\t\tselects[0].disabled = input.checked;\r\n\t\t\tselects[1].disabled = input.checked;\r\n\r\n\t\t\tif (!input.$_eventAttached) {\r\n\t\t\t\tinput.$_eventAttached = true;\r\n\t\t\t\tscheduler.event(input, \"click\", function() {\r\n\t\t\t\t\tif (input.checked === true) {\r\n\t\t\t\t\t\tvar obj = {};\r\n\t\t\t\t\t\tscheduler.form_blocks.calendar_time.get_value(node, obj);\r\n\r\n\t\t\t\t\t\tstart_date = scheduler.date.date_part(obj.start_date);\r\n\t\t\t\t\t\tend_date = scheduler.date.date_part(obj.end_date);\r\n\r\n\t\t\t\t\t\tif (+end_date == +start_date || (+end_date >= +start_date && (ev.end_date.getHours() !== 0 || ev.end_date.getMinutes() !== 0)))\r\n\t\t\t\t\t\t\tend_date = scheduler.date.add(end_date, 1, \"day\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar start = start_date || ev.start_date;\r\n\t\t\t\t\tvar end = end_date || ev.end_date;\r\n\t\t\t\t\t_attach_action(inputs[0], start);\r\n\t\t\t\t\t_attach_action(inputs[1], end);\r\n\t\t\t\t\tselects[0].value = start.getHours() * 60 + start.getMinutes();\r\n\t\t\t\t\tselects[1].value = end.getHours() * 60 + end.getMinutes();\r\n\r\n\t\t\t\t\tselects[0].disabled = input.checked;\r\n\t\t\t\t\tselects[1].disabled = input.checked;\r\n\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (scheduler.config.event_duration && scheduler.config.auto_end_date) {\r\n\r\n\t\t\tvar _update_minical_select = function () {\r\n\t\t\t\tif (!(scheduler.config.auto_end_date && scheduler.config.event_duration)){\r\n\t\t\t\t\t// setting may be disabled after the handler is attached\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tstart_date = scheduler.date.add(inputs[0]._date, selects[0].value, \"minute\");\r\n\t\t\t\tend_date = new Date(start_date.getTime() + (scheduler.config.event_duration * 60 * 1000));\r\n\r\n\t\t\t\tinputs[1].value = scheduler.templates.calendar_time(end_date);\r\n\t\t\t\tinputs[1]._date = scheduler.date.date_part(new Date(end_date));\r\n\r\n\t\t\t\tselects[1].value = end_date.getHours() * 60 + end_date.getMinutes();\r\n\t\t\t};\r\n\r\n\t\t\tif(!selects[0].$_eventAttached){\r\n\t\t\t\tselects[0].addEventListener(\"change\", _update_minical_select); // only update on first select should trigger update so user could define other end date if he wishes too\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction _attach_action(inp, date, number) {\r\n\t\t\t_init_once(inp, date, number);\r\n\t\t\tinp.value = scheduler.templates.calendar_time(date);\r\n\t\t\tinp._date = scheduler.date.date_part(new Date(date));\r\n\t\t}\r\n\r\n\t\t_attach_action(inputs[0], ev.start_date, 0);\r\n\t\t_attach_action(inputs[1], ev.end_date, 1);\r\n\t\t_init_once = function() {};\r\n\r\n\t\tfunction _round_minutes(date) {\r\n\t\t\tvar time_values = config._time_values;\r\n\t\t\tvar direct_value = date.getHours() * 60 + date.getMinutes();\r\n\t\t\tvar fixed_value = direct_value;\r\n\t\t\tvar value_found = false;\r\n\r\n\t\t\tfor (var k = 0; k < time_values.length; k++) {\r\n\t\t\t\tvar t_v = time_values[k];\r\n\t\t\t\tif (t_v === direct_value) {\r\n\t\t\t\t\tvalue_found = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif (t_v < direct_value)\r\n\t\t\t\t\tfixed_value = t_v;\r\n\t\t\t}\r\n\r\n\t\t\tif(!(value_found || fixed_value))\r\n\t\t\t\treturn -1;\r\n\r\n\t\t\treturn (value_found) ? direct_value : fixed_value;\r\n\t\t}\r\n\r\n\t\tselects[0].value = _round_minutes(ev.start_date);\r\n\t\tselects[1].value = _round_minutes(ev.end_date);\r\n\r\n\t},\r\n\tget_value: function(node, ev) {\r\n\t\tvar inputs = node.getElementsByTagName(\"input\");\r\n\t\tvar selects = node.getElementsByTagName(\"select\");\r\n\r\n\t\tev.start_date = scheduler.date.add(inputs[0]._date, selects[0].value, \"minute\");\r\n\t\tev.end_date = scheduler.date.add(inputs[1]._date, selects[1].value, \"minute\");\r\n\r\n\t\tif (ev.end_date <= ev.start_date)\r\n\t\t\tev.end_date = scheduler.date.add(ev.start_date, scheduler.config.time_step, \"minute\");\r\n\t\treturn {\r\n\t\t\tstart_date: new Date(ev.start_date),\r\n\t\t\tend_date: new Date(ev.end_date)\r\n\t\t};\r\n\t},\r\n\tfocus: function(node) {\r\n\t}\r\n};\r\nscheduler.linkCalendar = function(calendar, datediff) {\r\n\tvar action = function() {\r\n\t\tvar date = scheduler._date;\r\n\t\tvar dateNew = new Date(date.valueOf());\r\n\t\tif (datediff) dateNew = datediff(dateNew);\r\n\t\tdateNew.setDate(1);\r\n\t\tscheduler.updateCalendar(calendar, dateNew);\r\n\t\treturn true;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", action);\r\n\tscheduler.attachEvent(\"onXLE\", action);\r\n\tscheduler.attachEvent(\"onEventAdded\", action);\r\n\tscheduler.attachEvent(\"onEventChanged\", action);\r\n\tscheduler.attachEvent(\"onEventDeleted\", action);\r\n\taction();\r\n};\r\n\r\nscheduler._markCalendarCurrentDate = function(calendar) {\r\n\tvar state = scheduler.getState();\r\n\tvar from = state.min_date;\r\n\tvar to = state.max_date;\r\n\tvar mode = state.mode;\r\n\r\n\tvar month_start = scheduler.date.month_start(new Date(calendar._date));\r\n\tvar month_end = scheduler.date.add(month_start, 1, \"month\");\r\n\r\n\tvar noHighlight = {\r\n\t\t\"month\":true,\r\n\t\t\"year\":true,\r\n\t\t\"agenda\":true,\r\n\t\t\"grid\":true\r\n\t};\r\n\t// no need to highlight current dates for a large range views - agenda, year, etc.\r\n\tif(noHighlight[mode] || (from.valueOf() <= month_start.valueOf() && to.valueOf() >= month_end.valueOf())){\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar current = from;\r\n\twhile(current.valueOf() < to.valueOf()){\r\n\t\tif (month_start.valueOf() <= current.valueOf() && month_end > current) {\r\n\t\t\tscheduler.markCalendar(calendar, current, \"dhx_calendar_click\");\r\n\t\t}\r\n\t\tcurrent = scheduler.date.add(current, 1, \"day\");\r\n\t}\r\n};\r\n\r\nscheduler.attachEvent(\"onEventCancel\", function(){\r\n\tscheduler.destroyCalendar(null, true);\r\n});\r\n\r\nscheduler.attachEvent(\"onDestroy\", function(){\r\n\tscheduler.destroyCalendar();\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\tscheduler.xy.scroll_width = 0;\r\n\r\n\tvar old = scheduler.render_view_data;\r\n\tscheduler.render_view_data=function(){\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\t\tdata.firstChild._h_fix = true;\r\n\r\n\t\told.apply(scheduler,arguments);\r\n\r\n\r\n\r\n\t\tvar height = parseInt(data.style.height);\r\n\t\tdata.style.height=\"1px\";\r\n\t\tdata.style.height=data.scrollHeight+\"px\";\r\n\r\n\t\tthis._obj.style.height = this._obj.clientHeight + data.scrollHeight - height + \"px\";\r\n\t};\r\n\r\n\tvar old_s=scheduler._reset_month_scale;\r\n\tscheduler._reset_month_scale=function(a,b,c,d){\r\n\t\tvar dummy = {clientHeight:100};\r\n\t\told_s.apply(scheduler,[dummy,b,c,d]);\r\n\t\ta.innerHTML = dummy.innerHTML;\r\n\t};\r\n\r\n});\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Multisection\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\n\r\nfunction parseXMLOptions(loader, config){\r\n\tvar items = scheduler.ajax.xpath(\"//data/item\", loader.xmlDoc);\r\n\tvar ids = {};\r\n\tfor (var i = 0; i < items.length; i++) {\r\n\t\tids[items[i].getAttribute(config.map_to)] = true;\r\n\t}\r\n\treturn ids;\r\n}\r\n\r\nfunction parseJSONOptions(loader, config){\r\n\ttry{\r\n\t\tvar items = JSON.parse(loader.xmlDoc.responseText);\r\n\t\tvar ids = {};\r\n\t\tfor (var i = 0; i < items.length; i++) {\r\n\t\t\tvar option = items[i];\r\n\r\n\t\t\tids[option.value || option.key || option.id] = true;\r\n\t\t}\r\n\t\treturn ids;\r\n\t}catch(e){\r\n\t\treturn null;\r\n\t}\r\n}\r\n\r\nscheduler.form_blocks[\"multiselect\"]={\r\n\trender:function(sns) {\r\n\t\tvar css = \"dhx_multi_select_control dhx_multi_select_\"+sns.name;\r\n\t\tif(!!sns.vertical){\r\n\t\t\tcss += \" dhx_multi_select_control_vertical\";\r\n\t\t}\r\n\r\n\t\tvar _result = \"
\";\r\n\t\tfor (var i=0; i\"+sns.options[i].label+\"\";\r\n\t\t}\r\n\t\t_result += \"
\";\r\n\t\treturn _result;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\r\n\t\tvar _children = node.getElementsByTagName('input');\r\n\t\tfor(var i=0;i<_children.length;i++) {\r\n\t\t\t_children[i].checked = false; //unchecking all inputs on the form\r\n\t\t}\r\n\r\n\t\tfunction _mark_inputs(ids) { // ids = [ 0: undefined, 1: undefined, 2: true, 'custom_name': false ... ]\r\n\t\t\tvar _children = node.getElementsByTagName('input');\r\n\t\t\tfor(var i=0;i<_children.length; i++) {\r\n\t\t\t\t_children[i].checked = !! ids[_children[i].value];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar _ids = {};\r\n\t\tif (ev[config.map_to]) {\r\n\t\t\tvar results = (ev[config.map_to] + \"\").split(config.delimiter || scheduler.config.section_delimiter || \",\");\r\n\t\t\tfor (var i = 0; i < results.length; i++) {\r\n\t\t\t\t_ids[results[i]] = true;\r\n\t\t\t}\r\n\t\t\t_mark_inputs(_ids);\r\n\t\t} else {\r\n\t\t\tif (scheduler._new_event || !config.script_url)\r\n\t\t\t\treturn;\r\n\t\t\tvar divLoading = document.createElement('div');\r\n\t\t\tdivLoading.className = 'dhx_loading';\r\n\t\t\tdivLoading.style.cssText = \"position: absolute; top: 40%; left: 40%;\";\r\n\t\t\tnode.appendChild(divLoading);\r\n\r\n\t\t\tvar url = [\r\n\t\t\t\tconfig.script_url,\r\n\t\t\t\t(config.script_url.indexOf(\"?\") == -1 ? \"?\" : \"&\"),\r\n\t\t\t\t'dhx_crosslink_' + config.map_to + '=' + ev.id + '&uid=' + scheduler.uid()\r\n\t\t\t].join(\"\");\r\n\r\n\t\t\tscheduler.ajax.get(url, function(loader) {\r\n\t\t\t\tvar options = parseJSONOptions(loader, config);\r\n\t\t\t\tif(!options){\r\n\t\t\t\t\toptions = parseXMLOptions(loader, config);\r\n\t\t\t\t}\r\n\t\t\t\t_mark_inputs(options);\r\n\t\t\t\tnode.removeChild(divLoading);\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tvar _result = [];\r\n\t\tvar _children = node.getElementsByTagName(\"input\");\r\n\t\tfor(var i=0;i<_children.length;i++) {\r\n\t\t\tif(_children[i].checked)\r\n\t\t\t\t_result.push(_children[i].value);\r\n\t\t}\r\n\t\treturn _result.join(config.delimiter || scheduler.config.section_delimiter || \",\");\r\n\t},\r\n\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\r\n\tfunction backup(obj){\r\n\t\tvar t = function(){};\r\n\t\tt.prototype = obj;\r\n\t\treturn t;\r\n\t}\r\n\r\n\tvar old = scheduler._load;\r\n\tscheduler._load=function(url,from){\r\n\t\turl=url||this._load_url;\r\n\t\tif (typeof url == \"object\"){\r\n\t\t\tvar t = backup(this._loaded);\r\n\t\t\tfor (var i=0; i < url.length; i++) {\r\n\t\t\t\tthis._loaded=new t();\r\n\t\t\t\told.call(this,url[i],from);\r\n\t\t\t}\r\n\t\t} else\r\n\t\t\told.apply(this,arguments);\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\t/* global Backbone */\r\n\tvar cfg = {\r\n\t\tuse_id : false\r\n\t};\r\n\r\n\t//remove private properties\r\n\tfunction sanitize(ev){\r\n\t\tvar obj = {};\r\n\t\tfor (var key in ev)\r\n\t\t\tif (key.indexOf(\"_\") !== 0)\r\n\t\t\t\tobj[key] = ev[key];\r\n\r\n\t\tif (!cfg.use_id)\r\n\t\t\tdelete obj.id;\r\n\r\n\t\treturn obj;\r\n\t}\r\n\r\n\tvar update_timer;\r\n\tfunction update_view(){\r\n\t\tclearTimeout(update_timer);\r\n\t\tupdate_timer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler.updateView();\r\n\t\t},1);\r\n\t}\r\n\r\n\tfunction _start_ext_load(cal){\r\n\t\tcal._loading = true;\r\n\t\tcal._not_render = true;\r\n\r\n\t\tcal.callEvent(\"onXLS\", []);\r\n\t}\r\n\tfunction _finish_ext_load(cal){\r\n\t\tcal._not_render = false;\r\n\t\tif (cal._render_wait)\r\n\t\t\tcal.render_view_data();\r\n\t\tcal._loading = false;\r\n\r\n\t\tcal.callEvent(\"onXLE\", []);\r\n\t}\r\n\r\n\r\n\tfunction _get_id(model){\r\n\t\treturn cfg.use_id ? model.id : model.cid;\r\n\t}\r\n\r\nscheduler.backbone = function(events, config){\r\n\tif (config) cfg = config;\r\n\r\n\tevents.bind(\"change\", function(model, info){\r\n\t\tvar cid = _get_id(model);\r\n\t\tvar ev = scheduler._events[cid] = model.toJSON();\r\n\t\tev.id = cid;\r\n\r\n\t\tscheduler._init_event(ev);\r\n\t\tupdate_view();\r\n\t});\r\n\tevents.bind(\"remove\", function(model, changes){\r\n\t\tvar cid = _get_id(model);\r\n\t\tif (scheduler._events[cid])\r\n\t\t\tscheduler.deleteEvent(cid);\r\n\t});\r\n\r\n\tvar queue = [];\r\n\tfunction add_from_queue(){\r\n\t\tif(scheduler.$destroyed){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (queue.length){\r\n\t\t\tscheduler.parse(queue, \"json\");\r\n\t\t\tqueue = [];\r\n\t\t}\r\n\t}\r\n\r\n\tevents.bind(\"add\", function(model, changes){\r\n\t\tvar cid = _get_id(model);\r\n\t\tif (!scheduler._events[cid]){\r\n\t\t\tvar ev = model.toJSON();\r\n\t\t\tev.id = cid;\r\n\t\t\tscheduler._init_event(ev);\r\n\r\n\t\t\tqueue.push(ev);\r\n\t\t\tif (queue.length == 1)\r\n\t\t\t\tsetTimeout(add_from_queue,1);\r\n\t\t}\r\n\t});\r\n\r\n\tevents.bind(\"request\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_start_ext_load(scheduler);\r\n\t});\r\n\tevents.bind(\"sync\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_finish_ext_load(scheduler);\r\n\t});\r\n\tevents.bind(\"error\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_finish_ext_load(scheduler);\r\n\t});\r\n\r\n\r\n\tscheduler.attachEvent(\"onEventCreated\", function(id){\r\n\t\tvar ev = new events.model(scheduler.getEvent(id));\r\n\t\tscheduler._events[id] = ev.toJSON();\r\n\t\tscheduler._events[id].id = id;\r\n\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventAdded\", function(id){\r\n\t\tif (!events.get(id)){\r\n\t\t\tvar data = sanitize(scheduler.getEvent(id));\r\n\t\t\tvar model = new events.model(data);\r\n\r\n\t\t\tvar cid = _get_id(model);\r\n\t\t\tif (cid != id)\r\n\t\t\t\tthis.changeEventId(id, cid);\r\n\t\t\tevents.add(model);\r\n\t\t\tevents.trigger(\"scheduler:add\", model);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\", function(id){\r\n\t\tvar ev = events.get(id);\r\n\t\tvar upd = sanitize(scheduler.getEvent(id));\r\n\r\n\t\tev.set(upd);\r\n\t\tevents.trigger(\"scheduler:change\", ev);\r\n\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function(id){\r\n\t\tvar model = events.get(id);\r\n\t\tif (model){\r\n\t\t\tevents.trigger(\"scheduler:remove\", model);\r\n\t\t\tevents.remove(id);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\t/* global dhtmlDragAndDropObject, dhtmlx */\r\n// lame old code doesn't provide raw event object\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\t\tvar dragger = (new dhtmlDragAndDropObject());\r\n\t\tvar old = dragger.stopDrag;\r\n\t\tvar last_event;\r\n\t\tdragger.stopDrag = function(e) {\r\n\t\t\tlast_event = e;\r\n\t\t\treturn old.apply(this, arguments);\r\n\t\t};\r\n\r\n\t\tfunction on_drop(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml) {\r\n\r\n\t\t\tif (scheduler.checkEvent(\"onBeforeExternalDragIn\") && !scheduler.callEvent(\"onBeforeExternalDragIn\", [sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml, last_event]))\r\n\t\t\t\treturn;\r\n\r\n\t\t\tvar temp = scheduler.attachEvent(\"onEventCreated\", function (id) {\r\n\t\t\t\tif (!scheduler.callEvent(\"onExternalDragIn\", [id, sourceHtmlObject, last_event])) {\r\n\t\t\t\t\tthis._drag_mode = this._drag_id = null;\r\n\t\t\t\t\tthis.deleteEvent(id);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tvar action_data = scheduler.getActionData(last_event);\r\n\t\t\tvar event_data = {\r\n\t\t\t\tstart_date: new Date(action_data.date)\r\n\t\t\t};\r\n\r\n\t\t\t// custom views, need to assign section id, fix dates\r\n\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\tvar view_options = scheduler.matrix[scheduler._mode];\r\n\t\t\t\tevent_data[view_options.y_property] = action_data.section;\r\n\r\n\t\t\t\tvar pos = scheduler._locate_cell_timeline(last_event);\r\n\t\t\t\tevent_data.start_date = view_options._trace_x[pos.x];\r\n\t\t\t\tevent_data.end_date = scheduler.date.add(event_data.start_date, view_options.x_step, view_options.x_unit);\r\n\t\t\t}\r\n\t\t\tif (scheduler._props && scheduler._props[scheduler._mode]) {\r\n\t\t\t\tevent_data[scheduler._props[scheduler._mode].map_to] = action_data.section;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler.addEventNow(event_data);\r\n\r\n\t\t\tscheduler.detachEvent(temp);\r\n\t\t}\r\n\r\n\t\tdragger.addDragLanding(scheduler._els[\"dhx_cal_data\"][0], {\r\n\t\t\t_drag: function(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml) {\r\n\t\t\t\ton_drop(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml);\r\n\t\t\t},\r\n\t\t\t_dragIn: function(htmlObject, shtmlObject) {\r\n\t\t\t\treturn htmlObject;\r\n\t\t\t},\r\n\t\t\t_dragOut: function(htmlObject) {\r\n\t\t\t\treturn this;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(dhtmlx.DragControl) {\r\n\t\t\tdhtmlx.DragControl.addDrop(scheduler._els[\"dhx_cal_data\"][0], {\r\n\t\t\t\tonDrop: function (source, target, d, e) {\r\n\t\t\t\t\tvar sourceDhtmlx = dhtmlx.DragControl.getMaster(source);\r\n\t\t\t\t\tlast_event = e;\r\n\t\t\t\t\ton_drop(source, sourceDhtmlx, target, e.target || e.srcElement);\r\n\t\t\t\t},\r\n\r\n\t\t\t\tonDragIn: function (source, target, e) {\r\n\t\t\t\t\treturn target;\r\n\t\t\t\t}\r\n\t\t\t}, true);\r\n\t\t}\r\n\t});\r\n\r\n}","export default function(scheduler){\r\n\r\n\tvar dx, dy,\r\n\t\thtml_regexp = new RegExp(\"<[^>]*>\", \"g\"),\r\n\t\tnewline_regexp = new RegExp(\"]*>\", \"g\");\r\n\r\n\tfunction clean_html(val) {\r\n\t\treturn val.replace(newline_regexp, \"\\n\").replace(html_regexp, \"\");\r\n\t}\r\n\r\n\tfunction x_norm(x, offset) {\r\n\t\tx = parseFloat(x);\r\n\t\toffset = parseFloat(offset);\r\n\t\tif (!isNaN(offset)) x -= offset;\r\n\r\n\t\tvar w = colsWidth(x);\r\n\t\tx = x - w.width + w.cols*dx;\r\n\t\treturn isNaN(x)?\"auto\":(100*x/(dx));\r\n\t}\r\n\r\n\tfunction x_norm_event(x, offset, is_left) {\r\n\t\tx = parseFloat(x);\r\n\t\toffset = parseFloat(offset);\r\n\t\tif (!isNaN(offset) && is_left) x -= offset;\r\n\r\n\t\tvar w = colsWidth(x);\r\n\t\tx = x - w.width + w.cols*dx;\r\n\t\treturn isNaN(x)?\"auto\":(100*x/(dx-(!isNaN(offset)?offset:0)));\r\n\t}\r\n\tfunction colsWidth(width) {\r\n\t\tvar r = 0;\r\n\t\tvar header = scheduler._els.dhx_cal_header[0].childNodes;\r\n\t\tvar els = header[1] ? header[1].childNodes : header[0].childNodes;\r\n\t\tfor (var i = 0; i < els.length; i++) {\r\n\t\t\tvar el = els[i].style ? els[i] : els[i].parentNode;\r\n\t\t\tvar w = parseFloat(el.style.width);\r\n\t\t\tif (width > w){\r\n\t\t\t\twidth -= (w+1);\r\n\t\t\t\tr+=(w+1);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\treturn { width: r, cols: i };\r\n\t}\r\n\r\n\tfunction y_norm(y) {\r\n\t\ty = parseFloat(y);\r\n\t\tif (isNaN(y)) return \"auto\";\r\n\t\treturn 100 * y / dy;\r\n\t}\r\n\r\n\tfunction get_style(node, style){\r\n\t\treturn (window.getComputedStyle?(window.getComputedStyle(node, null)[style]):(node.currentStyle?node.currentStyle[style]:null))||\"\";\r\n\t}\r\n\r\n\tfunction de_day(node, n) {\r\n\t\tvar x = parseInt(node.style.left, 10);\r\n\r\n\t\tfor (var dx = 0; dx < scheduler._cols.length; dx++) {\r\n\t\t\tx -= scheduler._cols[dx];\r\n\t\t\tif (x < 0) return dx;\r\n\t\t}\r\n\t\treturn n;\r\n\t}\r\n\r\n\tfunction de_week(node, n) {\r\n\t\tvar y = parseInt(node.style.top, 10);\r\n\t\tfor (var dy = 0; dy < scheduler._colsS.heights.length; dy++)\r\n\t\t\tif (scheduler._colsS.heights[dy] > y) return dy;\r\n\t\treturn n;\r\n\t}\r\n\r\n\tfunction xml_start(tag) {\r\n\t\treturn tag ? \"<\"+tag+\">\" : \"\";\r\n\t}\r\n\tfunction xml_end(tag) {\r\n\t\treturn tag ? \"\" : \"\";\r\n\t}\r\n\r\n\tfunction xml_top(tag, profile, header, footer) {\r\n\t\tvar xml = \"<\"+tag+\" profile='\" + profile + \"'\";\r\n\t\tif (header)\r\n\t\t\txml += \" header='\" + header + \"'\";\r\n\t\tif (footer)\r\n\t\t\txml += \" footer='\" + footer + \"'\";\r\n\t\txml += \">\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_body_header() {\r\n\t\tvar xml = \"\";\r\n\t\t// detects if current mode is timeline\r\n\t\tvar mode = scheduler._mode;\r\n\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode])\r\n\t\t\tmode = (scheduler.matrix[scheduler._mode].render == \"cell\") ? \"matrix\" : \"timeline\";\r\n\t\txml += \"\";\r\n\r\n\t\tif (scheduler._mode == \"week_agenda\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_data[0].getElementsByTagName(\"DIV\");\r\n\t\t\tfor (var i = 0; i < xh.length; i++)\r\n\t\t\t\tif (xh[i].className == \"dhx_wa_scale_bar\")\r\n\t\t\t\t\txml += \"\" + clean_html(xh[i].innerHTML) + \"\";\r\n\t\t} else if (scheduler._mode == \"agenda\" || scheduler._mode == \"map\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_header[0].childNodes[0].childNodes;\r\n\r\n\t\t\txml += \"\" + clean_html(xh[0].innerHTML) + \"\" + clean_html(xh[1].innerHTML) + \"\";\r\n\t\t} else if (scheduler._mode == \"year\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_data[0].childNodes;\r\n\t\t\tfor (var i = 0; i < xh.length; i++) {\r\n\t\t\t\txml += \"\";\r\n\t\t\t\txml += xml_month_scale(xh[i].querySelector(\".dhx_year_week\").childNodes);\r\n\t\t\t\txml += xml_month(xh[i].querySelector(\".dhx_year_body\"));\r\n\t\t\t\txml += \"\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\txml += \"\";\r\n\t\t\tvar xh = scheduler._els.dhx_cal_header[0].childNodes;\r\n\t\t\txml += xml_month_scale(xh);\r\n\t\t\txml += \"\";\r\n\r\n\t\t\tvar yh = scheduler._els.dhx_cal_data[0];\r\n\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tfor (var i = 0; i < yh.firstChild.rows.length; i++) {\r\n\t\t\t\t\tvar el = yh.firstChild.rows[i];\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t}\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tdy = yh.firstChild.rows[0].cells[0].offsetHeight;\r\n\t\t\t} else if (yh.firstChild.tagName == \"TABLE\") {\r\n\t\t\t\txml += xml_month(yh);\r\n\t\t\t} else {\r\n\t\t\t\tyh = yh.childNodes[yh.childNodes.length - 1];\r\n\t\t\t\twhile (yh.className.indexOf(\"dhx_scale_holder\") == -1)\r\n\t\t\t\t\tyh = yh.previousSibling;\r\n\t\t\t\tyh = yh.childNodes;\r\n\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tfor (var i = 0; i < yh.length; i++)\r\n\t\t\t\t\txml += \"\\n\";\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tdy = yh[0].offsetHeight;\r\n\t\t\t}\r\n\t\t}\r\n\t\txml += \"\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_month(yh) {\r\n\t\tvar xml = \"\";\r\n\t\tvar r = yh.querySelectorAll(\"tr\");\r\n\t\tfor (var i = 0; i < r.length; i++) {\r\n\t\t\tvar days = [];\r\n\t\t\tvar cells = r[i].querySelectorAll(\"td\");\r\n\r\n\t\t\tfor (var j = 0; j < cells.length; j++)\r\n\t\t\t\tdays.push(cells[j].querySelector(\".dhx_month_head\").innerHTML);\r\n\r\n\t\t\txml += \"\\n\";\r\n\t\t\tdy = cells[0].offsetHeight;\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_month_scale(xh) {\r\n\t\tvar xhs,\r\n\t\t\txml = \"\";\r\n\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\tif (scheduler.matrix[scheduler._mode].second_scale)\r\n\t\t\t\txhs = xh[1].childNodes;\r\n\r\n\t\t\txh = xh[0].childNodes;\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < xh.length; i++)\r\n\t\t\txml += \"\\n\";\r\n\t\tdx = xh[0].offsetWidth;\r\n\r\n\t\tif (xhs) {\r\n\t\t\tvar width = 0;\r\n\t\t\tvar top_width = xh[0].offsetWidth;\r\n\t\t\tvar top_col = 1;\r\n\t\t\tfor (var i = 0; i < xhs.length; i++) {\r\n\t\t\t\txml += \"\\n\";\r\n\t\t\t\twidth += xhs[i].offsetWidth;\r\n\t\t\t\tif (width >= top_width) {\r\n\t\t\t\t\ttop_width += (xh[top_col] ? xh[top_col].offsetWidth : 0);\r\n\t\t\t\t\ttop_col++;\r\n\t\t\t\t}\r\n\t\t\t\tdx = xhs[0].offsetWidth;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_body(colors) {\r\n\t\tvar xml = \"\";\r\n\t\tvar evs = scheduler._rendered;\r\n\t\tvar matrix = scheduler.matrix && scheduler.matrix[scheduler._mode];\r\n\r\n\t\tif (scheduler._mode == \"agenda\" || scheduler._mode == \"map\") {\r\n\r\n\t\t\tfor (var i = 0; i < evs.length; i++)\r\n xml += \"\";\r\n\r\n\t\t} else if (scheduler._mode == \"week_agenda\") {\r\n\r\n\t\t\tfor (var i = 0; i < evs.length; i++)\r\n\t\t\t\txml += \"\" + clean_html(evs[i].innerHTML) + \"\";\r\n\r\n\t\t} else if (scheduler._mode == \"year\") {\r\n\r\n\t\t\tvar evs = scheduler.get_visible_events();\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar d = evs[i].start_date;\r\n\t\t\t\tif (d.valueOf() < scheduler._min_date.valueOf())\r\n\t\t\t\t\td = scheduler._min_date;\r\n\r\n\t\t\t\twhile (d < evs[i].end_date) {\r\n\t\t\t\t\tvar m = d.getMonth() + 12 * (d.getFullYear() - scheduler._min_date.getFullYear()) - scheduler.week_starts._month;\r\n\t\t\t\t\tvar day = scheduler.week_starts[m] + d.getDate() - 1;\r\n\t\t\t\t\tvar text_color = colors ? get_style(scheduler._get_year_cell(d), \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(scheduler._get_year_cell(d), \"backgroundColor\") : \"\";\r\n\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t\td = scheduler.date.add(d, 1, \"day\");\r\n\t\t\t\t\tif (d.valueOf() >= scheduler._max_date.valueOf())\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (matrix && matrix.render == \"cell\") {\r\n\t\t\tvar evs = scheduler._els.dhx_cal_data[0].getElementsByTagName(\"TD\");\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar text_color = colors ? get_style(evs[i], \"color\") : \"\";\r\n\t\t\t\tvar bg_color = colors ? get_style(evs[i], \"backgroundColor\") : \"\";\r\n\t\t\t\txml += \"\\n\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar zx, zdx;\r\n\t\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\t\t// logic for timeline view\r\n\t\t\t\t\tzx = x_norm(evs[i].style.left);\r\n\t\t\t\t\tzdx = x_norm(evs[i].offsetWidth)-1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// we should use specific logic for day/week/units view\r\n\t\t\t\t\tvar left_norm = scheduler.config.use_select_menu_space ? 0 : 26;\r\n\t\t\t\t\tzx = x_norm_event(evs[i].style.left, left_norm, true);\r\n\t\t\t\t\tzdx = x_norm_event(evs[i].style.width, left_norm)-1;\r\n\t\t\t\t}\r\n\t\t\t\tif (isNaN(zdx * 1)) continue;\r\n\t\t\t\tvar zy = y_norm(evs[i].style.top);\r\n\t\t\t\tvar zdy = y_norm(evs[i].style.height);\r\n\r\n\t\t\t\tvar e_type = evs[i].className.split(\" \")[0].replace(\"dhx_cal_\", \"\");\r\n\t\t\t\tif (e_type === 'dhx_tooltip_line') continue;\r\n\r\n\t\t\t\tvar dets = scheduler.getEvent(evs[i].getAttribute(scheduler.config.event_attribute));\r\n if (!dets) continue;\r\n\t\t\t\tvar day = dets._sday;\r\n\t\t\t\tvar week = dets._sweek;\r\n\t\t\t\tvar length = dets._length || 0;\r\n\r\n\t\t\t\tif (scheduler._mode == \"month\") {\r\n\t\t\t\t\tzdy = parseInt(evs[i].offsetHeight, 10);\r\n\t\t\t\t\tzy = parseInt(evs[i].style.top, 10) - scheduler.xy.month_head_height;\r\n\r\n\t\t\t\t\tday = de_day(evs[i], day);\r\n\t\t\t\t\tweek = de_week(evs[i], week);\r\n\t\t\t\t} else if (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\t\tday = 0;\r\n\t\t\t\t\tvar el = evs[i].parentNode.parentNode.parentNode;\r\n\t\t\t\t\tweek = el.rowIndex;\r\n\t\t\t\t\tvar dy_copy = dy;\r\n\t\t\t\t\tdy = evs[i].parentNode.offsetHeight;\r\n\t\t\t\t\tzy = y_norm(evs[i].style.top);\r\n\t\t\t\t\tzy -= zy * 0.2;\r\n\t\t\t\t\tdy = dy_copy;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (evs[i].parentNode == scheduler._els.dhx_cal_data[0]) continue;\r\n\t\t\t\t\tvar parent = scheduler._els[\"dhx_cal_data\"][0].childNodes[0];\r\n\t\t\t\t\tvar offset = parseFloat(parent.className.indexOf(\"dhx_scale_holder\") != -1 ? parent.style.left : 0);\r\n\t\t\t\t\tzx += x_norm(evs[i].parentNode.style.left, offset);\r\n\t\t\t\t}\r\n\r\n\t\t\t\txml += \"\\n\";\r\n\r\n\t\t\t\tif (e_type == \"event\") {\r\n\t\t\t\t\txml += \"
\";\r\n\t\t\t\t\tvar text_color = colors ? get_style(evs[i].childNodes[2], \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(evs[i].childNodes[2], \"backgroundColor\") : \"\";\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar text_color = colors ? get_style(evs[i], \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(evs[i], \"backgroundColor\") : \"\";\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t}\r\n\t\t\t\txml += \"
\";\r\n\t\t\t}\r\n\t\t\t}\r\n\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction toXML(start, end, view, mode, header, footer){\r\n\t\tvar colors = false;\r\n\t\tif (mode == \"fullcolor\") {\r\n\t\t\tcolors = true;\r\n\t\t\tmode = \"color\";\r\n\t\t}\r\n\r\n\t\tmode = mode || \"color\";\r\n\r\n\t\tvar xml = \"\";\r\n\t\tif (start) {\r\n\r\n\t\t\tvar original_date = scheduler._date;\r\n\t\t\tvar original_mode = scheduler._mode;\r\n\t\t\tend = scheduler.date[view+\"_start\"](end);\r\n\t\t\tend = scheduler.date[\"get_\"+view+\"_end\"] ? scheduler.date[\"get_\"+view+\"_end\"](end) : scheduler.date.add(end, 1, view);\r\n\r\n\t\t\txml = xml_top(\"pages\", mode, header, footer);\r\n\t\t\tfor (var temp_date = new Date(start); +temp_date < +end; temp_date = this.date.add(temp_date, 1, view)) {\r\n\t\t\t\tthis.setCurrentView(temp_date, view);\r\n\t\t\t\txml += xml_start(\"page\") + xml_body_header().replace(\"\\u2013\", \"-\") + xml_body(colors) + xml_end(\"page\");\r\n\t\t\t}\r\n\t\t\txml += xml_end(\"pages\");\r\n\r\n\t\t\tthis.setCurrentView(original_date, original_mode);\r\n\t\t} else {\r\n\t\t\txml = xml_top(\"data\", mode, header, footer) + xml_body_header().replace(\"\\u2013\", \"-\") + xml_body(colors) + xml_end(\"data\");\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\tscheduler.getPDFData = toXML;\r\n\tfunction send_xml(xml, url){\r\n\t\tvar uid = scheduler.uid();\r\n\t\tvar d = document.createElement(\"div\");\r\n\t\td.style.display = \"none\";\r\n\t\tdocument.body.appendChild(d);\r\n\r\n\t\td.innerHTML = '
';\r\n\t\tdocument.getElementById(uid).firstChild.value = encodeURIComponent(xml);\r\n\t\tdocument.getElementById(uid).submit();\r\n\t\td.parentNode.removeChild(d);\r\n\t}\r\n\r\n\tfunction to_pdf(start, end, view, url, mode, header, footer) {\r\n\t\tvar xml = \"\";\r\n\t\tif(typeof mode == \"object\"){\r\n\t\t\txml = schedulersToPdf(mode);\r\n\t\t}else{\r\n\t\t\txml = toXML.apply(this, [start, end, view, mode, header, footer]);\r\n\t\t}\r\n\r\n\t\tsend_xml(xml, url);\r\n\t}\r\n\r\n\tfunction schedulersToPdf(objects){\r\n\t\tvar xml = \"\";\r\n\t\tfor(var i=0; i < objects.length; i++){\r\n\t\t\txml += objects[i].source.getPDFData(objects[i].start, objects[i].end, objects[i].view, objects[i].mode, objects[i].header, objects[i].footer);\r\n\t\t}\r\n\t\txml += \"\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\t/*\r\n\t * scheduler.toPDF(url, mode, header, footer) - for a single scheduler\r\n\t * scheduler.toPDF(url, [scheduler1, scheduler2,...]) - for multiple schedulers\r\n\t * example:\r\n\t * scheduler.toPDF(\"generate.ashx\", [\r\n\t * { source: scheduler1, mode: \"color\" },\r\n\t * { source: scheduler2, mode: \"gray\", view:\"week\", start:new Date(2013, 06, 1), end:new Date(2013, 06, 28) },\r\n\t * { source: scheduler3 }\r\n\t * ]);\r\n\t *\r\n\t */\r\n\tscheduler.toPDF = function(url, mode, header, footer) {\r\n\t\treturn to_pdf.apply(this, [null, null, null, url, mode, header, footer]);\r\n\t};\r\n\tscheduler.toPDFRange = function(start, end, view, url, mode, header, footer) {\r\n\t\tif (typeof start == \"string\") {\r\n\t\t\tstart = scheduler.templates.api_date(start);\r\n\t\t\tend = scheduler.templates.api_date(end);\r\n\t\t}\r\n\r\n\t\treturn to_pdf.apply(this, arguments);\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.icons_select = [\"icon_form\", \"icon_delete\"];\r\nscheduler.config.details_on_create = true;\r\nscheduler.config.show_quick_info = true;\r\nscheduler.xy.menu_width = 0;\r\n\r\n\r\n\r\nlet clickedElementPosition = null;\r\nscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\tconst container = scheduler.$container;\r\n\tif(container._$quickInfoHandler){\r\n\t\treturn;\r\n\t}else{\r\n\t\tcontainer._$quickInfoHandler = true;\r\n\t\t// store coordinates of clicked segment of an event\r\n\t\t// in case multi section events or multi-line month events\r\n\t\tscheduler.event(container, \"mousedown\", function(e){\r\n\t\t\tconst eventElement = e.target.closest(`[${scheduler.config.event_attribute}]`);\r\n\t\t\tif (eventElement) {\r\n\t\t\t\tclickedElementPosition = {\r\n\t\t\t\t\tid: eventElement.getAttribute(scheduler.config.event_attribute),\r\n\t\t\t\t\tposition: getPositionInsideScheduler(eventElement)\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t});\r\n\t\tscheduler.attachEvent(\"onDestroy\", () => {\r\n\t\t\tdelete container._$quickInfoHandler;\r\n\t\t});\r\n\t}\r\n});\r\n\r\nscheduler.attachEvent(\"onClick\", function(id){\r\n\tif(!scheduler.config.show_quick_info){\r\n\t\treturn;\r\n\t}\r\n\tscheduler.showQuickInfo(id);\r\n\treturn true;\r\n});\r\n\r\n(function(){\r\n\t// pass `force` argument in order to hide quick info synchronously\r\n\t// so it won't affect showQuickInfo call that can follow\r\n\tvar events = [\"onEmptyClick\", \"onViewChange\", \"onLightbox\", \"onBeforeEventDelete\", \"onBeforeDrag\"];\r\n\tvar hiding_function = function(){\r\n\t\tscheduler.hideQuickInfo(true);\r\n\t\treturn true;\r\n\t};\r\n\tfor (var i=0; i window.innerWidth){\r\n\t\t\tleft = window.innerWidth - width;\r\n\t\t}\r\n\t\tleft = Math.max(0, left);\r\n\r\n\t\tqi.style.left = left + \"px\";\r\n\t\tqi.style.top = pos.top - (pos.dy?height:-pos.height) + \"px\";\r\n\t} else {\r\n\r\n\t\tconst dataPos = scheduler.$container.querySelector('.dhx_cal_data').offsetTop;\r\n\t\tqi.style.top = dataPos + 20 + \"px\";\r\n\t\tif (pos.dx == 1){\r\n\t\t\tqi.style.right = \"auto\";\r\n\t\t\tqi.style.left = -width + \"px\";\r\n\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tqi.style.left = \"-10px\";\r\n\t\t\t},1);\r\n\t\t} else {\r\n\t\t\tqi.style.left = \"auto\";\r\n\t\t\tqi.style.right = -width + \"px\";\r\n\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tqi.style.right = \"-10px\";\r\n\t\t\t},1);\r\n\t\t}\r\n\t\tqi.className = qi.className.replace(\" dhx_qi_left\",\"\").replace(\" dhx_qi_right\",\"\")+\" dhx_qi_\"+(pos.dx==1?\"left\":\"right\");\r\n\t}\r\n\r\n\tqi.ontransitionend = () => {\r\n\t\tfitQIInsideWindow(qi);\r\n\t\tqi.ontransitionend = null;\r\n\t};\r\n\tsetTimeout(() => {\r\n\t\tfitQIInsideWindow(qi);\r\n\t}, 1);\r\n};\r\n\r\nfunction fitQIInsideWindow(quickInfoPopup){\r\n\tconst popupRect = quickInfoPopup.getBoundingClientRect();\r\n\tconst containerRect = scheduler.$container.getBoundingClientRect();\r\n\r\n\t// calculate the bottom offset of the Quick Info relative to the scheduler container\r\n\tconst offsetBottom = containerRect.bottom - popupRect.bottom;\r\n\r\n\t// If the popup extends outside the scheduler container, adjust its top position\r\n\tif (offsetBottom < 0) {\r\n\t\tquickInfoPopup.style.top = `${parseFloat(quickInfoPopup.style.top) + offsetBottom}px`;\r\n\t}\r\n}\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function(){\r\n\tscheduler.hideQuickInfo();\r\n\tif(this._quick_info_box){\r\n\t\tvar box = this._quick_info_box;\r\n\t\tif(box.parentNode){\r\n\t\t\tbox.parentNode.removeChild(box);\r\n\t\t}\r\n\t\tthis._quick_info_box = null;\r\n\t}\r\n});\r\nscheduler._quick_info_onscroll_handler = function(e){\r\n\tscheduler.hideQuickInfo();\r\n};\r\nscheduler._init_quick_info = function(){\r\n\tif (!this._quick_info_box){\r\n\r\n\r\n\t\tvar qi = this._quick_info_box = document.createElement(\"div\");\r\n\r\n\t\tthis._waiAria.quickInfoAttr(qi);\r\n\r\n\t\tqi.className = \"dhx_cal_quick_info\";\r\n\t\tif (scheduler.$testmode)\r\n\t\t\tqi.className += \" dhx_no_animate\";\r\n\t\tif (scheduler.config.rtl) qi.className += \" dhx_quick_info_rtl\";\r\n\t//title\r\n\t\tvar ariaAttr = this._waiAria.quickInfoHeaderAttrString();\r\n\t\tvar html = `\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t\t
\r\n\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t\t
`;\r\n\r\n\t//buttons\r\n\t\thtml += \"
\";\r\n\t\tvar buttons = scheduler.config.icons_select;\r\n\t\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\t\tvar ariaAttr = this._waiAria.quickInfoButtonAttrString(this.locale.labels[buttons[i]]);\r\n\t\t\t\thtml += `
\r\n\t\t\t\t
${scheduler.locale.labels[buttons[i]]}
`;\r\n\t\t\t}\r\n\t\t// }\r\n\t\thtml += \"
\";\r\n\r\n\t\tqi.innerHTML = html;\r\n\t\tscheduler.event(qi, \"click\", function(ev){\r\n\t\t\tscheduler._qi_button_click(ev.target || ev.srcElement);\r\n\t\t});\r\n\t\tif (scheduler.config.quick_info_detached){\r\n\t\t\tscheduler._detachDomEvent(scheduler._els[\"dhx_cal_data\"][0], \"scroll\", scheduler._quick_info_onscroll_handler);\r\n\t\t\tscheduler.event(scheduler._els[\"dhx_cal_data\"][0], \"scroll\", scheduler._quick_info_onscroll_handler);\r\n\t\t}\r\n\t}\r\n\r\n\treturn this._quick_info_box;\r\n};\r\n\r\nscheduler._qi_button_click = function(node){\r\n\tvar box = scheduler._quick_info_box;\r\n\tif (!node || node == box) return;\r\n\r\n\tif(node.closest(\".dhx_cal_qi_close_btn\")){\r\n\t\tscheduler.hideQuickInfo();\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar mask = scheduler._getClassName(node);\r\n\tif (mask.indexOf(\"_icon\")!=-1){\r\n\t\tvar id = scheduler._quick_info_box_id;\r\n\t\tscheduler._click.buttons[mask.split(\" \")[1].replace(\"icon_\",\"\")](id);\r\n\t} else\r\n\t\tscheduler._qi_button_click(node.parentNode);\r\n};\r\n\r\nfunction getPositionInsideScheduler(element){\r\n\tlet left = 0;\r\n\tlet top = 0;\r\n\r\n\tlet node = element;\r\n\twhile (node && node != scheduler._obj){\r\n\t\tleft += node.offsetLeft;\r\n\t\ttop += node.offsetTop-node.scrollTop;\r\n\t\tnode = node.offsetParent;\r\n\t}\r\n\tif(node){\r\n\t\tlet dx = (left + element.offsetWidth/2) > (scheduler._x/2) ? 1 : 0;\r\n\t\tlet dy = (top + element.offsetHeight/2) > (scheduler._y/2) ? 1 : 0;\r\n\r\n\t\treturn { left:left, top:top, dx:dx, dy:dy,\r\n\t\t\twidth:element.offsetWidth, height:element.offsetHeight };\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\nscheduler._get_event_counter_part = function(id){\r\n\tvar domEv = scheduler.getRenderedEvent(id);\r\n\treturn getPositionInsideScheduler(domEv);\r\n};\r\n\r\nscheduler._fill_quick_data = function(id){\r\n\tvar ev = scheduler.getEvent(id);\r\n\tvar qi = scheduler._quick_info_box;\r\n\r\n\tscheduler._quick_info_box_id = id;\r\n\r\n//title content\r\n\r\n\tvar header = {\r\n\t\tcontent: scheduler.templates.quick_info_title(ev.start_date, ev.end_date, ev),\r\n\t\tdate: scheduler.templates.quick_info_date(ev.start_date, ev.end_date, ev)\r\n\t};\r\n\tvar titleContent = qi.querySelector(\".dhx_cal_qi_tcontent\");\r\n\ttitleContent.innerHTML = `${header.content}`;\r\n\tvar titleDate = qi.querySelector(\".dhx_cal_qi_tdate\");\r\n\ttitleDate.innerHTML = header.date;\r\n\r\n\tscheduler._waiAria.quickInfoHeader(qi, [header.content, header.date].join(\" \"));\r\n\r\n//main content\r\n\tvar main = qi.querySelector(\".dhx_cal_qi_content\");\r\n\tconst mainContent = scheduler.templates.quick_info_content(ev.start_date, ev.end_date, ev);\r\n\tif(mainContent){\r\n\t\tmain.classList.remove(\"dhx_hidden\");\r\n\t\tmain.innerHTML = mainContent;\r\n\t}else{\r\n\t\tmain.classList.add(\"dhx_hidden\");\r\n\t}\r\n};\r\n\r\n\r\n}","export default function(scheduler){\r\n\t\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar originalRecurringSetValue;\r\n\tif (scheduler.form_blocks.recurring) {\r\n\t\toriginalRecurringSetValue = scheduler.form_blocks.recurring.set_value;\r\n\t}\r\n\tvar original_left_buttons = scheduler.config.buttons_left.slice();\r\n\tvar original_right_buttons = scheduler.config.buttons_right.slice();\r\n\r\n\tscheduler.attachEvent(\"onBeforeLightbox\", function(id) {\r\n\t\tif (this.config.readonly_form || this.getEvent(id).readonly) {\r\n\t\t\tthis.config.readonly_active = true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.config.readonly_active = false;\r\n\t\t\tscheduler.config.buttons_left = original_left_buttons.slice();\r\n\t\t\tscheduler.config.buttons_right = original_right_buttons.slice();\r\n\t\r\n\t\t\t// initial value\r\n\t\t\tif(scheduler.form_blocks.recurring) {\r\n\t\t\t\tscheduler.form_blocks.recurring.set_value = originalRecurringSetValue;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar sns = this.config.lightbox.sections;\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\tfor (var i = 0; i < sns.length; i++) {\r\n\t\t\t\tif (sns[i].type == 'recurring') {\r\n\t\t\t\t\tif (this.config.readonly_active && scheduler.form_blocks.recurring) {\r\n\t\t\t\t\t\tscheduler.form_blocks.recurring.set_value = function(node, value, ev) {\r\n\t\t\t\t\t\t\tvar wrapper = scheduler.$domHelpers.closest(node, \".dhx_wrap_section\");\r\n\t\t\t\t\t\t\tvar style = \"none\";\r\n\t\t\t\t\t\t\twrapper.querySelector('.dhx_cal_lsection').display = style;\r\n\t\t\t\t\t\t\twrapper.querySelector('.dhx_form_repeat').display = style;\r\n\t\t\t\t\t\t\twrapper.style.display = style;\r\n\r\n\t\t\t\t\t\t\tscheduler.setLightboxSize();\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar forbidden_buttons = [\"dhx_delete_btn\", \"dhx_save_btn\"];\r\n\t\t\tvar button_arrays = [scheduler.config.buttons_left, scheduler.config.buttons_right];\r\n\t\t\tfor (var i = 0; i < forbidden_buttons.length; i++) {\r\n\t\t\t\tvar forbidden_button = forbidden_buttons[i];\r\n\t\t\t\tfor (var k = 0; k < button_arrays.length; k++) {\r\n\t\t\t\t\tvar button_array = button_arrays[k];\r\n\t\t\t\t\tvar index = -1;\r\n\t\t\t\t\tfor (var p = 0; p < button_array.length; p++) {\r\n\t\t\t\t\t\tif (button_array[p] == forbidden_button) {\r\n\t\t\t\t\t\t\tindex = p;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (index != -1) {\r\n\t\t\t\t\t\tbutton_array.splice(index, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.resetLightbox();\r\n\r\n\t\treturn true;\r\n\t});\r\n\r\n\tfunction txt_replace(tag, d, n, text) {\r\n\t\tvar txts = d.getElementsByTagName(tag);\r\n\t\tvar txtt = n.getElementsByTagName(tag);\r\n\t\tfor (var i = txtt.length - 1; i >= 0; i--) {\r\n\t\t\tvar n = txtt[i];\r\n\t\t\tif (!text){\r\n\t\t\t\tn.disabled = true;\r\n\t\t\t\t//radio and checkboxes loses state after .cloneNode in IE\r\n\t\t\t\tif(d.checked)\r\n\t\t\t\t\tn.checked = true;\r\n\t\t\t}else {\r\n\t\t\t\tvar t = document.createElement(\"span\");\r\n\t\t\t\tt.className = \"dhx_text_disabled\";\r\n\t\t\t\tt.innerHTML = text(txts[i]);\r\n\t\t\t\tn.parentNode.insertBefore(t, n);\r\n\t\t\t\tn.parentNode.removeChild(n);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tvar old = scheduler._fill_lightbox;\r\n\tscheduler._fill_lightbox = function() {\r\n\r\n\t\tvar lb = this.getLightbox();\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\tlb.style.visibility = 'hidden';\r\n\t\t\t// lightbox should have actual sizes before rendering controls\r\n\t\t\t// currently only matters for dhtmlxCombo\r\n\t\t\tlb.style.display = 'block';\r\n\t\t}\r\n\t\tvar res = old.apply(this, arguments);\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\t//reset visibility and display\r\n\t\t\tlb.style.visibility = '';\r\n\t\t\tlb.style.display = 'none';\r\n\t\t}\r\n\r\n\t\tif (this.config.readonly_active) {\r\n\r\n\t\t\tvar originalForm = this.getLightbox();\r\n\t\t\tvar readonlyForm = this._lightbox_r = originalForm.cloneNode(true);\r\n\t\t\treadonlyForm.id = scheduler.uid();\r\n\t\t\treadonlyForm.className += \" dhx_cal_light_readonly\";\r\n\t\t\ttxt_replace(\"textarea\", originalForm, readonlyForm, function(a) {\r\n\t\t\t\treturn a.value;\r\n\t\t\t});\r\n\t\t\ttxt_replace(\"input\", originalForm, readonlyForm, false);\r\n\t\t\ttxt_replace(\"select\", originalForm, readonlyForm, function(a) {\r\n\t\t\t\tif(!a.options.length) return \"\";\r\n\t\t\t\treturn a.options[Math.max((a.selectedIndex || 0), 0)].text;\r\n\t\t\t});\r\n\r\n\t\t\toriginalForm.parentNode.insertBefore(readonlyForm, originalForm);\r\n\r\n\t\t\tthis.showCover(readonlyForm);\r\n\t\t\tif (scheduler._lightbox)\r\n\t\t\t\tscheduler._lightbox.parentNode.removeChild(scheduler._lightbox);\r\n\t\t\tthis._lightbox = readonlyForm;\r\n\r\n\t\t\tif (scheduler.config.drag_lightbox)\r\n\t\t\t\tscheduler.event(readonlyForm.firstChild, \"mousedown\", scheduler._ready_to_dnd);\r\n\t\t\t\t\r\n\t\t\tscheduler._init_lightbox_events();\r\n\t\t\tthis.setLightboxSize();\r\n\t\t}\r\n\t\treturn res;\r\n\t};\r\n\r\n\tvar hold = scheduler.hide_lightbox;\r\n\tscheduler.hide_lightbox = function() {\r\n\t\tif (this._lightbox_r) {\r\n\t\t\tthis._lightbox_r.parentNode.removeChild(this._lightbox_r);\r\n\t\t\tthis._lightbox_r = this._lightbox = null;\r\n\t\t}\r\n\r\n\t\treturn hold.apply(this, arguments);\r\n\t};\r\n});\r\n\r\n\r\n}","import { RRule, rrulestr } from 'rrule';\r\n\r\nexport default function (scheduler) {\r\n\r\n\tfunction clearMilliseconds(date) {\r\n\t\treturn new Date(\r\n\t\t\tdate.getFullYear(),\r\n\t\t\tdate.getMonth(),\r\n\t\t\tdate.getDate(),\r\n\t\t\tdate.getHours(),\r\n\t\t\tdate.getMinutes(),\r\n\t\t\tdate.getSeconds(),\r\n\t\t\t0\r\n\t\t);\r\n\t}\r\n\r\n\tfunction isDeletedOccurrence(event) {\r\n\t\treturn !!event.deleted;\r\n\t}\r\n\r\n\tfunction isSeries(event) {\r\n\t\treturn !!event.rrule && !event.recurring_event_id;\r\n\t}\r\n\r\n\tfunction clearRecurringProperties(event) {\r\n\t\tevent.rrule = \"\";\r\n\t\tevent.original_start = null;\r\n\t\tevent.recurring_event_id = null;\r\n\t\tevent.duration = null;\r\n\t\tevent.deleted = null;\r\n\t}\r\n\r\n\tfunction createException(ev) {\r\n\t\tlet id = ev.id.split(\"#\");\r\n\r\n\t\tlet nid = scheduler.uid();\r\n\t\tscheduler._not_render = true;\r\n\t\tlet nev = scheduler._copy_event(ev);\r\n\t\tnev.id = nid;\r\n\t\tnev.recurring_event_id = id[0];\r\n\r\n\t\tlet timestamp = id[1];\r\n\r\n\t\tnev.original_start = new Date(Number(timestamp));\r\n\r\n\t\tscheduler._add_rec_marker(nev, timestamp);\r\n\t\tscheduler.addEvent(nev);\r\n\t\tscheduler._not_render = false;\r\n\t}\r\n\r\n\tscheduler._rec_temp = [];\r\n\tscheduler._rec_markers_pull = {};\r\n\tscheduler._rec_markers = {};\r\n\tscheduler._add_rec_marker = function (ev, time) {\r\n\t\tev._pid_time = time;\r\n\t\tthis._rec_markers[ev.id] = ev;\r\n\t\tif (!this._rec_markers_pull[ev.event_pid]) this._rec_markers_pull[ev.event_pid] = {};\r\n\t\tthis._rec_markers_pull[ev.event_pid][time] = ev;\r\n\t};\r\n\tscheduler._get_rec_marker = function (time, id) {\r\n\t\tlet ch = this._rec_markers_pull[id];\r\n\t\tif (ch) return ch[time];\r\n\t\treturn null;\r\n\t};\r\n\tscheduler._get_rec_markers = function (id) {\r\n\t\treturn (this._rec_markers_pull[id] || []);\r\n\t};\r\n\r\n\t(function () {\r\n\t\tvar old_add_event = scheduler.addEvent;\r\n\t\tscheduler.addEvent = function (start_date, end_date, text, id, extra_data) {\r\n\t\t\tvar ev_id = old_add_event.apply(this, arguments);\r\n\r\n\t\t\tif (ev_id && scheduler.getEvent(ev_id)) {\r\n\t\t\t\tvar ev = scheduler.getEvent(ev_id);\r\n\r\n\t\t\t\tif (ev.start_date) {\r\n\t\t\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t\t\t}\r\n\t\t\t\tif (ev.end_date) {\r\n\t\t\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn ev_id;\r\n\t\t};\r\n\t})();\r\n\r\n\tscheduler.attachEvent(\"onEventLoading\", function (event) {\r\n\r\n\t\tif (event.original_start) {\r\n\t\t\tevent.original_start = scheduler.templates.parse_date(event.original_start);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventIdChange\", function (id, new_id) {\r\n\t\tif (this._ignore_call) return;\r\n\t\tthis._ignore_call = true;\r\n\r\n\t\tif (scheduler._rec_markers[id]) {\r\n\t\t\t//important for for correct work of scheduler.getEvents(from, to) and collision detection\r\n\t\t\tscheduler._rec_markers[new_id] = scheduler._rec_markers[id];\r\n\t\t\tdelete scheduler._rec_markers[id];\r\n\t\t}\r\n\r\n\t\tif (scheduler._rec_markers_pull[id]) {\r\n\t\t\tscheduler._rec_markers_pull[new_id] = scheduler._rec_markers_pull[id];\r\n\t\t\tdelete scheduler._rec_markers_pull[id];\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < this._rec_temp.length; i++) {\r\n\t\t\tvar tev = this._rec_temp[i];\r\n\t\t\tif (tev.recurring_event_id == id) {\r\n\t\t\t\ttev.recurring_event_id = new_id;\r\n\t\t\t\tthis.changeEventId(tev.id, new_id + \"#\" + tev.id.split(\"#\")[1]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (var i in this._rec_markers) {\r\n\t\t\tvar tev = this._rec_markers[i];\r\n\t\t\tif (tev.recurring_event_id == id) {\r\n\t\t\t\ttev.recurring_event_id = new_id;\r\n\t\t\t\ttev._pid_changed = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar el = scheduler._rec_markers[new_id];\r\n\t\tif (el && el._pid_changed) {\r\n\t\t\tdelete el._pid_changed;\r\n\t\t\tsetTimeout(function () {\r\n\t\t\t\tif (scheduler.$destroyed) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tscheduler.callEvent(\"onEventChanged\", [new_id, scheduler.getEvent(new_id)]);\r\n\t\t\t}, 1);\r\n\t\t}\r\n\r\n\t\tdelete this._ignore_call;\r\n\t});\r\n\r\n\tfunction deleteEventFromSeries(idTimestamp, ev) {\r\n\t\tlet id = idTimestamp;\r\n\t\tidTimestamp = id.split(\"#\");\r\n\t\tlet nid = scheduler.uid();\r\n\t\tlet tid = (idTimestamp[1]) ? idTimestamp[1] : (ev._pid_time);\r\n\t\tlet nev = scheduler._copy_event(ev);\r\n\t\tnev.id = nid;\r\n\t\tnev.recurring_event_id = ev.recurring_event_id || idTimestamp[0];\r\n\t\tnev.original_start = new Date(Number(tid));\r\n\t\tnev.deleted = true;\r\n\t\tscheduler.addEvent(nev);\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function (id) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (this._is_virtual_event(id) || (this._is_modified_occurence(ev) && !isDeletedOccurrence(ev))) {\r\n\t\t\tdeleteEventFromSeries(id, ev);\r\n\t\t} else {\r\n\t\t\tif (isSeries(ev) && this._lightbox_id)\r\n\t\t\t\tthis._roll_back_dates(ev);\r\n\r\n\r\n\t\t\tvar sub = this._get_rec_markers(id);\r\n\t\t\tfor (var i in sub) {\r\n\t\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\t\tid = sub[i].id;\r\n\t\t\t\t\tif (this.getEvent(id))\r\n\t\t\t\t\t\tthis.deleteEvent(id, true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function (id, ev) {\r\n\t\tif (!this._is_virtual_event(id) && this._is_modified_occurence(ev)) {\r\n\t\t\tif (!scheduler._events[id]) {\r\n\t\t\t\tev.deleted = true;\r\n\t\t\t\tthis.setEvent(id, ev);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\", function (id, event) {\r\n\t\tif (this._loading) return true;\r\n\r\n\t\tvar ev = this.getEvent(id);\r\n\r\n\t\tif (this._is_virtual_event(id)) {\r\n\t\t\tcreateException(ev);\r\n\r\n\t\t} else {\r\n\t\t\tif (ev.start_date) {\r\n\t\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t\t}\r\n\t\t\tif (ev.end_date) {\r\n\t\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t\t}\r\n\r\n\t\t\tif (isSeries(ev) && this._lightbox_id) {\r\n\t\t\t\tthis._roll_back_dates(ev);\r\n\t\t\t\t//scheduler.recurrings.rollbackDates(ev);\r\n\t\t\t}\r\n\r\n\t\t\tvar sub = this._get_rec_markers(id);\r\n\t\t\tfor (var i in sub) {\r\n\t\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\t\tdelete this._rec_markers[sub[i].id];\r\n\t\t\t\t\tthis.deleteEvent(sub[i].id, true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tdelete this._rec_markers_pull[id];\r\n\r\n\t\t\t// it's possible that after editing event is no longer exists, in such case we need to remove _select_id flag\r\n\t\t\tvar isEventFound = false;\r\n\t\t\tfor (var k = 0; k < this._rendered.length; k++) {\r\n\t\t\t\tif (this._rendered[k].getAttribute(this.config.event_attribute) == id)\r\n\t\t\t\t\tisEventFound = true;\r\n\t\t\t}\r\n\t\t\tif (!isEventFound)\r\n\t\t\t\tthis._select_id = null;\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventAdded\", function (id) {\r\n\t\tif (!this._loading) {\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif (isSeries(ev)) {\r\n\t\t\t\tthis._roll_back_dates(ev);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventSave\", function (id, data, is_new_event) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (isSeries(ev))\r\n\t\t\tthis._select_id = null;\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventCreated\", function (id) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (!isSeries(ev)) {\r\n\t\t\tclearRecurringProperties(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventCancel\", function (id) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (isSeries(ev)) {\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t\t// a bit expensive, but we need to be sure that event re-rendered, because view can be corrupted by resize , during edit process\r\n\t\t\tthis.render_view_data();\r\n\t\t}\r\n\t});\r\n\tscheduler._roll_back_dates = function (ev) {\r\n\t\t//// !!!!! calc temp properties\r\n\t\tif (ev.start_date) {\r\n\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t}\r\n\t\tif (ev.end_date) {\r\n\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t}\r\n\r\n\t\tev.duration = Math.round((ev.end_date.valueOf() - ev.start_date.valueOf()) / 1000);\r\n\t\tev.end_date = ev._end_date;\r\n\t\tif (ev._start_date) {\r\n\t\t\tev.start_date.setMonth(0);\r\n\t\t\tev.start_date.setDate(ev._start_date.getDate());\r\n\t\t\tev.start_date.setMonth(ev._start_date.getMonth());\r\n\t\t\tev.start_date.setFullYear(ev._start_date.getFullYear());\r\n\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._is_virtual_event = function (id) {\r\n\t\treturn id.toString().indexOf(\"#\") != -1;\r\n\t};\r\n\tscheduler._is_modified_occurence = function (ev) {\r\n\t\treturn (ev.recurring_event_id && ev.recurring_event_id != \"0\");\r\n\t};\r\n\r\n\tscheduler.showLightbox_rec = scheduler.showLightbox;\r\n\tscheduler.showLightbox = function (id) {\r\n\t\tvar locale = this.locale;\r\n\t\tvar c = scheduler.config.lightbox_recurring;\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tvar pid = ev.recurring_event_id;\r\n\t\tvar isVirtual = this._is_virtual_event(id);\r\n\t\tif (isVirtual)\r\n\t\t\tpid = id.split(\"#\")[0];\r\n\r\n\t\t// show series\r\n\t\tvar showSeries = function (id) {\r\n\t\t\tvar event = scheduler.getEvent(id);\r\n\t\t\tevent._end_date = event.end_date;\r\n\t\t\tevent.end_date = new Date(event.start_date.valueOf() + event.duration * 1000);\r\n\t\t\treturn scheduler.showLightbox_rec(id); // editing series\r\n\t\t};\r\n\r\n\t\tif ((pid || pid * 1 === 0) && isSeries(ev)) {\r\n\t\t\t// direct API call on series id\r\n\t\t\treturn showSeries(id);\r\n\t\t}\r\n\t\tif (!pid || pid === '0' || ((!locale.labels.confirm_recurring || c == 'instance') || (c == 'series' && !isVirtual))) {\r\n\t\t\t// editing instance or non recurring event\r\n\t\t\treturn this.showLightbox_rec(id);\r\n\t\t}\r\n\t\tif (c == 'ask') {\r\n\t\t\tvar that = this;\r\n\t\t\tscheduler.modalbox({\r\n\t\t\t\ttext: locale.labels.confirm_recurring,\r\n\t\t\t\ttitle: locale.labels.title_confirm_recurring,\r\n\t\t\t\twidth: \"500px\",\r\n\t\t\t\tposition: \"middle\",\r\n\t\t\t\tbuttons: [locale.labels.button_edit_series, locale.labels.button_edit_occurrence, locale.labels.icon_cancel],\r\n\t\t\t\tcallback: function (index) {\r\n\t\t\t\t\tswitch (+index) {\r\n\t\t\t\t\t\tcase 0:\r\n\t\t\t\t\t\t\treturn showSeries(pid);\r\n\t\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\t\treturn that.showLightbox_rec(id);\r\n\t\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tshowSeries(pid);\r\n\t\t}\r\n\t};\r\n\r\n\tfunction groupExceptions() {\r\n\t\tconst exceptions = {};\r\n\t\tfor (const i in scheduler._events) {\r\n\t\t\tconst ev = scheduler._events[i];\r\n\t\t\tif (ev.recurring_event_id) {\r\n\t\t\t\tif (!exceptions[ev.recurring_event_id]) {\r\n\t\t\t\t\texceptions[ev.recurring_event_id] = {};\r\n\t\t\t\t}\r\n\t\t\t\texceptions[ev.recurring_event_id][ev.original_start.valueOf()] = ev;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn exceptions;\r\n\t}\r\n\r\n\tscheduler.get_visible_events_rec = scheduler.get_visible_events;\r\n\tscheduler.get_visible_events = function (only_timed) {\r\n\t\tfor (var i = 0; i < this._rec_temp.length; i++)\r\n\t\t\tdelete this._events[this._rec_temp[i].id];\r\n\t\tthis._rec_temp = [];\r\n\r\n\t\tconst exceptions = groupExceptions();\r\n\t\tvar stack = this.get_visible_events_rec(only_timed);\r\n\t\tvar out = [];\r\n\t\tfor (var i = 0; i < stack.length; i++) {\r\n\t\t\tif (stack[i].deleted || stack[i].recurring_event_id) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif (isSeries(stack[i])) {\r\n\t\t\t\tthis.repeat_date(stack[i], out, undefined, undefined, undefined, undefined, exceptions);\r\n\t\t\t} else {\r\n\t\t\t\tout.push(stack[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn out;\r\n\t};\r\n\r\n\t(function () {\r\n\t\tvar old = scheduler.isOneDayEvent;\r\n\t\tscheduler.isOneDayEvent = function (ev) {\r\n\t\t\tif (isSeries(ev)) return true;\r\n\t\t\treturn old.call(this, ev);\r\n\t\t};\r\n\t\tvar old_update_event = scheduler.updateEvent;\r\n\t\tscheduler.updateEvent = function (id) {\r\n\t\t\tvar ev = scheduler.getEvent(id);\r\n\r\n\t\t\tif (ev && isSeries(ev) && !this._is_virtual_event(id)) {\r\n\t\t\t\tscheduler.update_view();\r\n\t\t\t} else {\r\n\t\t\t\told_update_event.call(this, id);\r\n\t\t\t}\r\n\t\t};\r\n\t})();\r\n\r\n\tconst toIcalString = scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\");\r\n\r\n\tscheduler.repeat_date = function (ev, stack, non_render, from, to, maxCount, exceptions) {\r\n\t\tif (!ev.rrule) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tlet seriesExceptions = exceptions ? exceptions[ev.id] : groupExceptions()[ev.id];\r\n\t\tif (!seriesExceptions) {\r\n\t\t\tseriesExceptions = {};\r\n\t\t}\r\n\r\n\t\tif (!from) {\r\n\t\t\tfrom = scheduler._min_date;\r\n\t\t}\r\n\t\tif (!to) {\r\n\t\t\tto = scheduler._max_date;\r\n\t\t}\r\n\r\n\t\tconst utcStart = new Date(Date.UTC(ev.start_date.getFullYear(), ev.start_date.getMonth(), ev.start_date.getDate(), ev.start_date.getHours(), ev.start_date.getMinutes(), ev.start_date.getSeconds()));\r\n\t\tlet parsedRRule;\r\n\t\tif (maxCount){\r\n\t\t\t// for getRecDates() method\r\n\t\t\tparsedRRule = rrulestr(`RRULE:${ev.rrule};UNTIL=${toIcalString(ev.end_date)};COUNT=${maxCount}`, { dtstart: utcStart });\r\n\t\t} else {\r\n\t\t\tparsedRRule = rrulestr(`RRULE:${ev.rrule};UNTIL=${toIcalString(ev.end_date)}`, { dtstart: utcStart/*ev.start_date*/ });\r\n\t\t}\r\n\t\t// `from` is already in UTC from `dtstart: utcStart`\r\n\t\tconst utcTo = new Date(Date.UTC(to.getFullYear(), to.getMonth(), to.getDate(), to.getHours(), to.getMinutes(), to.getSeconds())); \r\n\t\tconst repeatedDates = parsedRRule.between(from, utcTo).map(date => {\r\n\t\t\tconst adjustedDate = new Date(date);\r\n\t\t\tadjustedDate.setHours(ev.start_date.getHours());\r\n\t\t\tadjustedDate.setMinutes(ev.start_date.getMinutes());\r\n\t\t\tadjustedDate.setSeconds(ev.start_date.getSeconds());\r\n\t\t\treturn adjustedDate;\r\n\t\t});\r\n\t\tlet visibleCount = 0;\r\n\r\n\t\tconst eventDuration = ev.duration;\r\n\r\n\t\tfor (let i = 0; i < repeatedDates.length; i++) {\r\n\t\t\tif (maxCount && visibleCount >= maxCount) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tconst date = repeatedDates[i];\r\n\r\n\t\t\tlet exception = seriesExceptions[date.valueOf()];\r\n\t\t\tif (exception) {\r\n\t\t\t\tif (exception.deleted) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvisibleCount++;\r\n\t\t\t\t\tstack.push(exception);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tconst copy = scheduler._copy_event(ev);\r\n\t\t\t\t//copy._timed = ev._timed;\r\n\t\t\t\tcopy.text = ev.text;\r\n\t\t\t\tcopy.start_date = date;\r\n\t\t\t\tcopy.id = ev.id + \"#\" + Math.ceil(date.valueOf());\r\n\t\t\t\tcopy.end_date = new Date(date.valueOf() + eventDuration * 1000);\r\n\t\t\t\tcopy.end_date = scheduler._fix_daylight_saving_date(copy.start_date, copy.end_date, ev, date, copy.end_date);\r\n\t\t\t\tcopy._timed = scheduler.isOneDayEvent(copy);\r\n\r\n\r\n\r\n\t\t\t\tif (!copy._timed && !scheduler._table_view && !scheduler.config.multi_day) continue;\r\n\t\t\t\tstack.push(copy);\r\n\r\n\t\t\t\tif (!non_render) {\r\n\t\t\t\t\tscheduler._events[copy.id] = copy;\r\n\t\t\t\t\tscheduler._rec_temp.push(copy);\r\n\t\t\t\t}\r\n\t\t\t\tvisibleCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//GS-2534: case when exceptions have different dates\r\n\t\tif (seriesExceptions && repeatedDates.length == 0 ){\r\n\t\t\tfor (let a in seriesExceptions){\r\n\t\t\t\tlet exception = seriesExceptions[a];\r\n\t\t\t\tif (exception) {\r\n\t\t\t\t\tif(exception.deleted){\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\telse if (from && to && exception.start_date < to && exception.end_date > from) {\r\n\t\t\t\t\t\tstack.push(exception);\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t} \r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._fix_daylight_saving_date = function (start_date, end_date, ev, counter, default_date) {\r\n\t\tvar shift = start_date.getTimezoneOffset() - end_date.getTimezoneOffset();\r\n\t\tif (shift) {\r\n\t\t\tif (shift > 0) {\r\n\t\t\t\t// e.g. 24h -> 23h\r\n\t\t\t\treturn new Date(counter.valueOf() + ev.duration * 1000 - shift * 60 * 1000);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t// e.g. 24h -> 25h\r\n\t\t\t\treturn new Date(end_date.valueOf() - shift * 60 * 1000);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new Date(default_date.valueOf());\r\n\t};\r\n\tscheduler.getRecDates = function (id, max) {\r\n\t\tvar ev = typeof id == \"object\" ? id : scheduler.getEvent(id);\r\n\t\tvar recurrings = [];\r\n\t\tmax = max || 100;\r\n\r\n\t\tif (!isSeries(ev)) {\r\n\t\t\treturn [\r\n\t\t\t\t{ start_date: ev.start_date, end_date: ev.end_date }\r\n\t\t\t];\r\n\t\t}\r\n\t\tif (ev.deleted) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tscheduler.repeat_date(ev, recurrings, true, ev.start_date, ev.end_date, max);\r\n\r\n\t\tvar result = [];\r\n\t\tfor (var i = 0; i < recurrings.length; i++) {\r\n\t\t\tif (!recurrings[i].deleted) {\r\n\t\t\t\tresult.push({ start_date: recurrings[i].start_date, end_date: recurrings[i].end_date });\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t};\r\n\tscheduler.getEvents = function (from, to) {\r\n\t\tvar result = [];\r\n\t\tconst exceptions = groupExceptions();\r\n\t\tfor (var a in this._events) {\r\n\t\t\tvar ev = this._events[a];\r\n\t\t\tif (ev.recurring_event_id) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif (from && to && ev.start_date < to && ev.end_date > from) {\r\n\t\t\t\tif (isSeries(ev)) {\r\n\t\t\t\t\tvar sev = [];\r\n\t\t\t\t\tthis.repeat_date(ev, sev, true, from, to, undefined, exceptions);\r\n\t\t\t\t\tsev.forEach(function(occurence){\r\n\t\t\t\t\t\tif (occurence.start_date < to && occurence.end_date > from) {\r\n\t\t\t\t\t\t\tresult.push(occurence);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t// if it's virtual event we can skip it\r\n\t\t\t\t} else if (!this._is_virtual_event(ev.id)) {\r\n\t\t\t\t\tresult.push(ev);\r\n\t\t\t\t}\r\n\t\t\t} else if (!from && !to && !this._is_virtual_event(ev.id)) {\r\n\t\t\t\tresult.push(ev);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t};\r\n\r\n\t//drop secondary attributes\r\n\tscheduler._copy_dummy = function (ev) {\r\n\t\tvar start_date = new Date(this.start_date);\r\n\t\tvar end_date = new Date(this.end_date);\r\n\t\tthis.start_date = start_date;\r\n\t\tthis.end_date = end_date;\r\n\t\tthis.duration = this.rrule = null;\r\n\t};\r\n\r\n\tscheduler.config.include_end_by = false;\r\n\tscheduler.config.lightbox_recurring = 'ask'; // series, instance\r\n\tscheduler.config.recurring_workdays = [RRule.MO.weekday,RRule.TU.weekday,RRule.WE.weekday,RRule.TH.weekday,RRule.FR.weekday];\r\n\tscheduler.config.repeat_date = \"%m.%d.%Y\";\r\n\tscheduler.config.lightbox.sections = [\r\n\t\t{ name: \"description\", map_to: \"text\", type: \"textarea\", focus: true },\r\n\t\t{ name: \"recurring\", type: \"recurring\", map_to: \"rec_type\" },\r\n\t\t{ name: \"time\", height: 72, type: \"time\", map_to: \"auto\" }\r\n\t];\r\n\r\n\tscheduler.attachEvent(\"onClearAll\", function () {\r\n\t\tscheduler._rec_markers = {}; //clear recurring events data\r\n\t\tscheduler._rec_markers_pull = {};\r\n\t\tscheduler._rec_temp = [];\r\n\t});\r\n\r\n\r\n\tfunction getTopLevelOption(rruleObj, untilDate) {\r\n\t\tconst options = rruleObj.options;\r\n\t\tconst until = options.until || untilDate;\r\n\r\n\t\tconst hasEndCondition = options.count || (until && until.getFullYear() !== 9999);\r\n\r\n\t\tif (hasEndCondition) {\r\n\t\t\treturn 'CUSTOM';\r\n\t\t}\r\n\r\n\t\tif (options.freq === RRule.DAILY && options.interval === 1 && !options.byweekday) {\r\n\t\t\treturn 'DAILY';\r\n\t\t} else if (options.freq === RRule.WEEKLY && options.interval === 1 && !options.byweekday) {\r\n\t\t\treturn 'WEEKLY';\r\n\t\t} else if (options.freq === RRule.MONTHLY && options.interval === 1 && !options.bysetpos) {\r\n\t\t\treturn 'MONTHLY';\r\n\t\t} else if (options.freq === RRule.YEARLY && options.interval === 1 && !options.bysetpos) {\r\n\t\t\treturn 'YEARLY';\r\n\t\t} else if (options.freq === RRule.DAILY && options.byweekday && options.byweekday.length === scheduler.config.recurring_workdays.length &&\r\n\t\t\toptions.byweekday.includes(RRule.MO) &&\r\n\t\t\toptions.byweekday.includes(RRule.TU) &&\r\n\t\t\toptions.byweekday.includes(RRule.WE) &&\r\n\t\t\toptions.byweekday.includes(RRule.TH) &&\r\n\t\t\toptions.byweekday.includes(RRule.FR)) {\r\n\t\t\treturn 'WORKDAYS';\r\n\t\t} else {\r\n\t\t\treturn 'CUSTOM';\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction getWeekdayOfMonth(date) {\r\n\t\tconst dayOfWeek = date.getDay();\r\n\t\tconst dayOfMonth = date.getDate();\r\n\t\tconst dayNumber = Math.ceil(dayOfMonth / 7);\r\n\t\treturn { dayOfWeek, dayNumber };\r\n\t}\r\n\r\n\r\n\tconst jsDaysToRRULEDays = {\r\n\t\t0: \"SU\",\r\n\t\t1: \"MO\",\r\n\t\t2: \"TU\",\r\n\t\t3: \"WE\",\r\n\t\t4: \"TH\",\r\n\t\t5: \"FR\",\r\n\t\t6: \"SA\"\r\n\t};\r\n\tconst RruleDayNumsToJs = {\r\n\t\t0: 1,\r\n\t\t1: 2,\r\n\t\t2: 3,\r\n\t\t3: 4,\r\n\t\t4: 5,\r\n\t\t5: 6,\r\n\t\t6: 0\r\n\t};\r\n\r\n\tfunction fillCustomDaily(node, rule) {\r\n\t\tnode.querySelector(\"[name='repeat_interval_value']\").value = (rule ? rule.interval : 1) || 1;\r\n\t}\r\n\r\n\tfunction fillCustomWeekly(node, rule, event) {\r\n\t\tnode.querySelector(\"[name='repeat_interval_value']\").value = (rule ? rule.interval : 1) || 1;\r\n\r\n\t\tconst dayCheckboxes = node.querySelectorAll(`.dhx_form_repeat_custom_week input`);\r\n\t\tdayCheckboxes.forEach((ch) => ch.checked = false);\r\n\t\tif (rule && rule.byweekday) {\r\n\t\t\trule.byweekday.forEach((day) => {\r\n\t\t\t\tconst dayNum = RruleDayNumsToJs[day.weekday];\r\n\t\t\t\tconst dayLabel = jsDaysToRRULEDays[dayNum];\r\n\t\t\t\tnode.querySelector(`.dhx_form_repeat_custom_week input[value=\"${dayLabel}\"]`).checked = true;\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tconst dayLabel = jsDaysToRRULEDays[event.start_date.getDay()];\r\n\t\t\tnode.querySelector(`.dhx_form_repeat_custom_week input[value=\"${dayLabel}\"]`).checked = true;\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tfunction fillCustomMonthly(node, rule, event) {\r\n\t\tnode.querySelector(\"[name='repeat_interval_value']\").value = (rule ? rule.interval : 1) || 1;\r\n\r\n\t\tconst dateOfMonth = node.querySelector(`.dhx_form_repeat_custom_month [value=\"month_date\"]`);\r\n\t\tconst nthWeekDayOfMonth = node.querySelector(`.dhx_form_repeat_custom_month [value=\"month_nth_weekday\"]`);\r\n\t\tdateOfMonth.innerText = scheduler.templates.repeat_monthly_date(event.start_date, event);\r\n\t\tnthWeekDayOfMonth.innerText = scheduler.templates.repeat_monthly_weekday(event.start_date, event);\r\n\r\n\t\tif (!rule || (rule.bysetpos && !(rule.byweekday && rule.byweekday.length))) {\r\n\t\t\tnode.querySelector(`[name=\"dhx_custom_month_option\"]`).value = \"month_date\";\r\n\t\t} else {\r\n\t\t\tnode.querySelector(`[name=\"dhx_custom_month_option\"]`).value = \"month_nth_weekday\";\r\n\t\t}\r\n\t}\r\n\r\n\tfunction formatDayNumber(date){\r\n\t\tswitch (date) {\r\n\t\t\tcase 1:\r\n\t\t\tcase 31:\r\n\t\t\t\treturn `${date}st`;\r\n\t\t\tcase 2:\r\n\t\t\t\treturn `${date}nd`;\r\n\t\t\tcase 3:\r\n\t\t\t\treturn `${date}rd`;\r\n\t\t\tdefault:\r\n\t\t\t\treturn `${date}th`;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.templates.repeat_monthly_date = function(startDate, event) {\r\n\t\tconst date = startDate.getDate();\r\n\t\treturn `Every ${formatDayNumber(date)}`;\r\n\t};\r\n\tscheduler.templates.repeat_monthly_weekday = function(startDate, event) {\r\n\t\tconst nthDayOfMonth = getWeekdayOfMonth(startDate);\r\n\t\treturn `Every ${formatDayNumber(nthDayOfMonth.dayNumber)} ${scheduler.locale.date.day_full[nthDayOfMonth.dayOfWeek]}`;\r\n\t};\r\n\t\r\n\tscheduler.templates.repeat_yearly_month_date = function(startDate, event) {\r\n\t\tconst date = startDate.getDate();\r\n\t\tconst monthLabel = scheduler.locale.date.month_full[startDate.getMonth()];\r\n\t\treturn `Every ${formatDayNumber(date)} day of ${monthLabel}`;\r\n\t};\r\n\tscheduler.templates.repeat_yearly_month_weekday = function(startDate, event) {\r\n\t\tconst nthDayOfMonth = getWeekdayOfMonth(startDate);\r\n\t\tconst monthLabel = scheduler.locale.date.month_full[startDate.getMonth()];\r\n\t\treturn `Every ${formatDayNumber(nthDayOfMonth.dayNumber)} ${scheduler.locale.date.day_full[nthDayOfMonth.dayOfWeek]} of ${monthLabel}`;\r\n\t};\r\n\r\n\tfunction fillCustomYearly(node, rule, event) {\r\n\t\tconst dateOfYear = node.querySelector(`.dhx_form_repeat_custom_year [value=\"month_date\"]`);\r\n\t\tconst nthWeekDayOfYear = node.querySelector(`.dhx_form_repeat_custom_year [value=\"month_nth_weekday\"]`);\r\n\t\tdateOfYear.innerText = scheduler.templates.repeat_yearly_month_date(event.start_date, event);\r\n\t\tnthWeekDayOfYear.innerText = scheduler.templates.repeat_yearly_month_weekday(event.start_date, event);\r\n\r\n\t\tif (!rule || (rule.bysetpos && !(rule.byweekday && rule.byweekday.length))) {\r\n\t\t\tnode.querySelector(`[name=\"dhx_custom_year_option\"]`).value = \"month_date\";\r\n\t\t} else {\r\n\t\t\tnode.querySelector(`[name=\"dhx_custom_year_option\"]`).value = \"month_nth_weekday\";\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fillEndRule(node, rule, event) {\r\n\t\tconst countInput = node.querySelector(`.dhx_form_repeat_ends_extra [name=\"dhx_form_repeat_ends_after\"]`);\r\n\t\tconst ondateInput = node.querySelector(`.dhx_form_repeat_ends_extra [name=\"dhx_form_repeat_ends_ondate\"]`);\r\n\t\tconst endOptionSelect = node.querySelector(`[name='dhx_custom_repeat_ends']`);\r\n\t\tcountInput.value = 1;\r\n\r\n\t\tlet formatter = scheduler.date.date_to_str(\"%Y-%m-%d\");\r\n\t\tif (!scheduler.config.repeat_date_of_end) {\r\n\t\t\tscheduler.config.repeat_date_of_end = formatter(scheduler.date.add(scheduler._currentDate(), 30, \"day\"));\r\n\t\t}\r\n\t\tondateInput.value = scheduler.config.repeat_date_of_end;\r\n\r\n\t\tif (rule && rule.count) {\r\n\t\t\tendOptionSelect.value = \"AFTER\";\r\n\t\t\tcountInput.value = rule.count;\r\n\t\t} else if (event._end_date && event._end_date.getFullYear() !== 9999) {\r\n\t\t\tendOptionSelect.value = \"ON\";\r\n\t\t\tondateInput.value = formatter(event._end_date);\r\n\t\t} else {\r\n\t\t\tendOptionSelect.value = \"NEVER\";\r\n\t\t}\r\n\t\tendOptionSelect.dispatchEvent(new Event(\"change\"));\r\n\t}\r\n\r\n\tconst getRecValue = {\r\n\t\tMONTHLY: function (dates) {\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.MONTHLY,\r\n\t\t\t\tinterval: 1,\r\n\t\t\t\tbymonthday: dates.start.getDate()\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tWEEKLY: function (dates) {\r\n\t\t\tlet day = dates.start.getDay() - 1;\r\n\t\t\tif (day == -1) day = 6;\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.WEEKLY,\r\n\t\t\t\tinterval: 1,\r\n\t\t\t\tbyweekday: [day]\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tDAILY: function (dates) {\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.DAILY,\r\n\t\t\t\tinterval: 1\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tYEARLY: function (dates) {\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.YEARLY,\r\n\t\t\t\tbymonth: dates.start.getMonth() + 1,\r\n\t\t\t\tinterval: 1,\r\n\t\t\t\tbymonthday: dates.start.getDate()\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tWORKDAYS: function (dates) {\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.WEEKLY,\r\n\t\t\t\tinterval: 1,\r\n\t\t\t\tbyweekday: scheduler.config.recurring_workdays\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tCUSTOM: function (dates, node) {\r\n\t\t\tconst rrule = {};\r\n\t\t\tconst freq = node.querySelector(`[name=\"repeat_interval_unit\"]`).value;\r\n\t\t\tconst interval = Math.max(1, node.querySelector(`[name=\"repeat_interval_value\"]`).value);\r\n\t\t\tconst monthRepeat = node.querySelector(`[name=\"dhx_custom_month_option\"]`).value;\r\n\t\t\tconst yearRepeat = node.querySelector(`[name=\"dhx_custom_year_option\"]`).value;\r\n\r\n\t\t\trrule.interval = interval;\r\n\t\t\tlet days;\r\n\t\t\tlet day;\r\n\r\n\t\t\tswitch (freq) {\r\n\t\t\t\tcase \"DAILY\":\r\n\t\t\t\t\trrule.freq = RRule.DAILY;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"WEEKLY\": \r\n\t\t\t\t\trrule.freq = RRule.WEEKLY;\r\n\t\t\t\t\tdays = [];\r\n\t\t\t\t\tnode.querySelectorAll(`.dhx_form_repeat_custom_week [name=\"week_day\"]`).forEach((ch) => {\r\n\t\t\t\t\t\tif(ch.checked){\r\n\t\t\t\t\t\t\tdays.push(ch.value);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\trrule.byweekday = days.map((day) => {\r\n\t\t\t\t\t\tswitch (day) {\r\n\t\t\t\t\t\t\tcase \"MO\":\r\n\t\t\t\t\t\t\t\treturn RRule.MO.weekday;\r\n\t\t\t\t\t\t\tcase \"TU\":\r\n\t\t\t\t\t\t\t\treturn RRule.TU.weekday;\r\n\t\t\t\t\t\t\tcase \"WE\":\r\n\t\t\t\t\t\t\t\treturn RRule.WE.weekday;\r\n\t\t\t\t\t\t\tcase \"TH\":\r\n\t\t\t\t\t\t\t\treturn RRule.TH.weekday;\r\n\t\t\t\t\t\t\tcase \"FR\":\r\n\t\t\t\t\t\t\t\treturn RRule.FR.weekday;\r\n\t\t\t\t\t\t\tcase \"SA\":\r\n\t\t\t\t\t\t\t\treturn RRule.SA.weekday;\r\n\t\t\t\t\t\t\tcase \"SU\":\r\n\t\t\t\t\t\t\t\treturn RRule.SU.weekday;\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"MONTHLY\":\r\n\t\t\t\t\trrule.freq = RRule.MONTHLY;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (monthRepeat === \"month_date\") {\r\n\t\t\t\t\t\trrule.bymonthday = dates.start.getDate();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tday = dates.start.getDay() - 1;\r\n\t\t\t\t\t\tif (day == -1) day = 6;\r\n\t\t\t\t\t\trrule.byweekday = [day];\r\n\t\t\t\t\t\trrule.bysetpos = getWeekdayOfMonth(dates.start).dayNumber;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"YEARLY\":\r\n\t\t\t\t\trrule.freq = RRule.YEARLY;\r\n\t\t\t\t\trrule.bymonth = dates.start.getMonth() + 1;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (yearRepeat == \"month_date\") {\r\n\t\t\t\t\t\trrule.bymonthday = dates.start.getDate();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tday = dates.start.getDay() - 1;\r\n\t\t\t\t\t\tif (day == -1) day = 6;\r\n\t\t\t\t\t\trrule.byweekday = [day];\r\n\t\t\t\t\t\trrule.bysetpos = getWeekdayOfMonth(dates.start).dayNumber;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tconst formatFunc = scheduler.date.str_to_date(\"%Y-%m-%d\");\r\n\t\t\tlet until = new Date(9999, 1, 1);\r\n\t\t\tconst endRule = node.querySelector(`[name=\"dhx_custom_repeat_ends\"]`);\r\n\t\t\tif(endRule.value === \"ON\"){\r\n\t\t\t\tuntil = formatFunc(node.querySelector(`[name=\"dhx_form_repeat_ends_ondate\"]`).value);\r\n\t\t\t} else if(endRule.value === \"AFTER\") {\r\n\t\t\t\trrule.count = Math.max(1, node.querySelector(`[name=\"dhx_form_repeat_ends_after\"]`).value);\r\n\t\t\t}\r\n\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tNEVER: function () {\r\n\t\t}\r\n\t};\r\n\r\n\tfunction fillInDefaults(node, rule, event) {\r\n\t\tfillCustomDaily(node, rule, event);\r\n\t\tfillCustomWeekly(node, rule, event);\r\n\t\tfillCustomMonthly(node, rule, event);\r\n\t\tfillCustomYearly(node, rule, event);\r\n\t\tfillEndRule(node, rule, event);\r\n\t}\r\n\tscheduler.form_blocks[\"recurring\"] = {\r\n\t\trender: function (sns) {\r\n\t\t\tif (sns.form) {\r\n\t\t\t\tlet rec = scheduler.form_blocks[\"recurring\"];\r\n\t\t\t\tlet form = rec._get_node(sns.form);\r\n\t\t\t\tlet html = rec._outer_html(form);\r\n\t\t\t\tform.style.display = 'none';\r\n\t\t\t\treturn html;\r\n\t\t\t}\r\n\t\t\tlet loc = scheduler.locale.labels;\r\n\r\n\t\t\treturn `
\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t
\r\n\r\n\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t
\r\n\r\n\t\t\t
\r\n\t\t\t\t
${loc.repeat_ends}
\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\r\n\t\t
\r\n\t
`;\r\n\t\t},\r\n\r\n\t\r\n\t\t_init_set_value: function (node, value, event) {\r\n\t\t\tscheduler.form_blocks[\"recurring\"]._ds = { start: event.start_date, end: event.end_date };\r\n\t\t\tfunction hide(node) {\r\n\t\t\t\tnode.classList.add(\"dhx_hidden\");\r\n\t\t\t}\r\n\t\t\tfunction show(node) {\r\n\t\t\t\tnode.classList.remove(\"dhx_hidden\");\r\n\t\t\t}\r\n\t\t\tfunction onRepeatOptionChange(value) {\r\n\t\t\t\tconst repeat = node.querySelector(\".dhx_form_repeat_custom\");\r\n\t\t\t\tif (value === \"CUSTOM\") {\r\n\t\t\t\t\tshow(repeat);\r\n\t\t\t\t} else {\r\n\t\t\t\t\thide(repeat);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction onCustomRepeatIntervalChange(value) {\r\n\t\t\t\tconst nodes = {\r\n\t\t\t\t\tweekly: node.querySelector(\".dhx_form_repeat_custom_week\"),\r\n\t\t\t\t\tmonthly: node.querySelector(\".dhx_form_repeat_custom_month\"),\r\n\t\t\t\t\tyearly: node.querySelector(\".dhx_form_repeat_custom_year\")\r\n\t\t\t\t};\r\n\t\t\t\tswitch (value) {\r\n\t\t\t\t\tcase \"DAILY\":\r\n\t\t\t\t\t\thide(nodes.weekly);\r\n\t\t\t\t\t\thide(nodes.monthly);\r\n\t\t\t\t\t\thide(nodes.yearly);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"WEEKLY\":\r\n\t\t\t\t\t\tshow(nodes.weekly);\r\n\t\t\t\t\t\thide(nodes.monthly);\r\n\t\t\t\t\t\thide(nodes.yearly);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"MONTHLY\":\r\n\t\t\t\t\t\thide(nodes.weekly);\r\n\t\t\t\t\t\tshow(nodes.monthly);\r\n\t\t\t\t\t\thide(nodes.yearly);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"YEARLY\":\r\n\t\t\t\t\t\thide(nodes.weekly);\r\n\t\t\t\t\t\thide(nodes.monthly);\r\n\t\t\t\t\t\tshow(nodes.yearly);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction onCustomRepeatEndRule(value) {\r\n\t\t\t\tconst nodes = {\r\n\t\t\t\t\tafter: node.querySelector(\".dhx_form_repeat_ends_extra .dhx_form_repeat_ends_after\"),\r\n\t\t\t\t\ton: node.querySelector(\".dhx_form_repeat_ends_extra .dhx_form_repeat_ends_on\")\r\n\t\t\t\t};\r\n\t\t\t\tswitch (value) {\r\n\t\t\t\t\tcase \"NEVER\":\r\n\t\t\t\t\t\thide(nodes.after);\r\n\t\t\t\t\t\thide(nodes.on);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"AFTER\":\r\n\t\t\t\t\t\tshow(nodes.after);\r\n\t\t\t\t\t\thide(nodes.on);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"ON\":\r\n\t\t\t\t\t\thide(nodes.after);\r\n\t\t\t\t\t\tshow(nodes.on);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// repeat section change\r\n\t\t\tnode.querySelector(\".dhx_form_repeat_pattern select\").addEventListener(\"change\", function () {\r\n\t\t\t\tonRepeatOptionChange(this.value);\r\n\t\t\t});\r\n\r\n\t\t\t// custom repeat interval change\r\n\t\t\tnode.querySelector(\".dhx_form_repeat_custom_interval [name='repeat_interval_unit']\").addEventListener(\"change\", function () {\r\n\t\t\t\tonCustomRepeatIntervalChange(this.value);\r\n\t\t\t});\r\n\r\n\t\t\t// custom repeat end rule\r\n\t\t\tnode.querySelector(\".dhx_form_repeat_ends [name='dhx_custom_repeat_ends']\").addEventListener(\"change\", function () {\r\n\t\t\t\tonCustomRepeatEndRule(this.value);\r\n\t\t\t});\r\n\r\n\t\t\tscheduler._lightbox._rec_init_done = true;\r\n\t\t},\r\n\t\tbutton_click: function(){},\r\n\t\tset_value: function (node, value, ev) {\r\n\t\t\tlet rf = scheduler.form_blocks[\"recurring\"];\r\n\t\t\tif (!scheduler._lightbox._rec_init_done)\r\n\t\t\t\trf._init_set_value(node, value, ev);\r\n\t\t\tnode.open = !ev.rrule;\r\n\r\n\t\t\tnode.blocked = this._is_modified_occurence(ev);\r\n\r\n\t\t\tlet ds = rf._ds;\r\n\t\t\tds.start = ev.start_date;\r\n\t\t\tds.end = ev._end_date;\r\n\r\n\t\t\tif (ev.rrule) {\r\n\t\t\t\tconst rruleset = rrulestr(ev.rrule);\r\n\t\t\t\tfillInDefaults(node, rruleset.origOptions, ev);\r\n\t\t\t\tconst topOption = getTopLevelOption(rruleset, ev._end_date);\r\n\t\t\t\tnode.querySelector(\".dhx_form_repeat_pattern select\").value = topOption;\r\n\t\t\t\tif(topOption === \"CUSTOM\"){\r\n\t\t\t\t\tlet customFreq;\r\n\t\t\t\t\tswitch (rruleset.origOptions.freq) {\r\n\t\t\t\t\t\tcase RRule.DAILY:\r\n\t\t\t\t\t\t\tcustomFreq = \"DAILY\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase RRule.WEEKLY:\r\n\t\t\t\t\t\t\tcustomFreq = \"WEEKLY\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase RRule.MONTHLY:\r\n\t\t\t\t\t\t\tcustomFreq = \"MONTHLY\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase RRule.YEARLY:\r\n\t\t\t\t\t\t\tcustomFreq = \"YEARLY\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(customFreq){\r\n\t\t\t\t\t\tnode.querySelector(`[name=\"repeat_interval_unit\"]`).value = customFreq;\r\n\t\t\t\t\t\tnode.querySelector(`[name=\"repeat_interval_unit\"]`).dispatchEvent(new Event(\"change\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t//\trepeat_interval_unit\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tfillInDefaults(node, null, ev);\r\n\t\t\t\tnode.querySelector(\".dhx_form_repeat_pattern select\").value = \"NEVER\";\r\n\t\t\t}\r\n\t\t\tnode.querySelector(\".dhx_form_repeat_pattern select\").dispatchEvent(new Event(\"change\"));\r\n\r\n\t\t},\r\n\t\tget_value: function (node, ev) {\r\n\t\t\t\r\n\t\t\tif(!node.blocked && node.querySelector(\".dhx_form_repeat_pattern select\").value !== \"NEVER\") {\r\n\t\t\t\tlet ds = scheduler.form_blocks[\"recurring\"]._ds;\r\n\t\t\t\tlet actual_dates = {};\r\n\r\n\t\t\t\tlet timeControl = getTimeSection();\r\n\r\n\t\t\t\ttimeControl.getValue(actual_dates);\r\n\t\t\t\tds.start = actual_dates.start_date;\r\n\t\t\t\tconst pattern = node.querySelector(\".dhx_form_repeat_pattern select\").value;\r\n\t\t\t\tconst recurrence = getRecValue[pattern](ds, node);\r\n\t\t\t\tev.rrule = new RRule(recurrence.rrule).toString().replace(\"RRULE:\", \"\");\r\n\t\t\t\tds.end = recurrence.until;\r\n\r\n\t\t\t\tev.duration = Math.floor((actual_dates.end_date - actual_dates.start_date) / 1000);\r\n\r\n\t\t\t\tif (ds._start) {\r\n\t\t\t\t\tev.start_date = new Date(ds.start);\r\n\t\t\t\t\tev._start_date = new Date(ds.start);\r\n\t\t\t\t\tds._start = false;\r\n\t\t\t\t} else\r\n\t\t\t\t\tev._start_date = null;\r\n\r\n\t\t\t\tev._end_date = ds.end;\r\n\t\t\t}else{\r\n\t\t\t\tev.rrule = ev.rrule = \"\";\r\n\t\t\t\tev._end_date = ev.end_date;\r\n\t\t\t}\r\n\r\n\t\t\treturn ev.rrule;\r\n\t\t},\r\n\r\n\t\tfocus: function (node) {\r\n\t\t}\r\n\t};\r\n\r\n\tfunction getTimeSection() {\r\n\t\tlet timeControl = scheduler.formSection('time');\r\n\t\tif (!timeControl) {\r\n\t\t\ttimeControl = getFirstSectionOfType('time');\r\n\t\t}\r\n\t\tif (!timeControl) {\r\n\t\t\ttimeControl = getFirstSectionOfType('calendar_time');\r\n\t\t}\r\n\r\n\r\n\t\tif (!timeControl) {\r\n\t\t\tthrow new Error([\"Can't calculate the recurring rule, the Recurring form block can't find the Time control. Make sure you have the time control in 'scheduler.config.lightbox.sections' config.\",\r\n\t\t\t\t\"You can use either the default time control https://docs.dhtmlx.com/scheduler/time.html, or the datepicker https://docs.dhtmlx.com/scheduler/minicalendar.html, or a custom control. \",\r\n\t\t\t\t\"In the latter case, make sure the control is named \\\"time\\\":\",\r\n\t\t\t\t\"\",\r\n\t\t\t\t\"scheduler.config.lightbox.sections = [\",\r\n\t\t\t\t\"{name:\\\"time\\\", height:72, type:\\\"YOU CONTROL\\\", map_to:\\\"auto\\\" }];\"]\r\n\t\t\t\t.join(\"\\n\"));\r\n\t\t}\r\n\r\n\t\treturn timeControl;\r\n\t}\r\n\r\n\tfunction getFirstSectionOfType(type) {\r\n\t\tfor (let i = 0; i < scheduler.config.lightbox.sections.length; i++) {\r\n\t\t\tlet section = scheduler.config.lightbox.sections[i];\r\n\t\t\tif (section.type === type) {\r\n\t\t\t\treturn scheduler.formSection(section.name);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.occurrence_timestamp_in_utc = false;\r\nscheduler.config.recurring_workdays = [1,2,3,4,5];\r\nscheduler.form_blocks[\"recurring\"] = {\r\n\t_get_node : function(node){\r\n\t\tif (typeof node == \"string\"){\r\n\t\t\tlet element = scheduler._lightbox.querySelector(`#${node}`);\r\n\t\t\tif(!element){\r\n\t\t\t\t// form is detached from lightbox \r\n\t\t\t\t// search globally, won't work in LWC\r\n\t\t\t\telement = document.getElementById(node);\r\n\t\t\t}\r\n\t\t\tnode = element;\r\n\t\t}\r\n\t\tif (node.style.display == 'none')\r\n\t\t\tnode.style.display = \"\";\r\n\t\treturn node;\r\n\t},\r\n\t_outer_html: function(node){\r\n\t\treturn node.outerHTML || getOuterHTML(node);\r\n\r\n\t\t//probably not needed, FF v10- only\r\n\t\tfunction getOuterHTML(n){\r\n\t\t\tvar div = document.createElement('div'), h;\r\n\t\t\tdiv.appendChild( n.cloneNode(true) );\r\n\t\t\th = div.innerHTML;\r\n\t\t\tdiv = null;\r\n\t\t\treturn h;\r\n\t\t}\r\n\t},\r\n\trender:function(sns) {\r\n\t\tif(sns.form){\r\n\t\t\tvar rec = scheduler.form_blocks[\"recurring\"];\r\n\t\t\tvar form = rec._get_node(sns.form);\r\n\t\t\tvar html = rec._outer_html(form);\r\n\t\t\tform.style.display = 'none';\r\n\t\t\treturn html;\r\n\t\t}\r\n\t\tvar loc = scheduler.locale.labels;\r\n\t\treturn '
'+\r\n\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t''+loc.repeat_text_week_count+'
'+\r\n\t\t\t\t\t\t\t\t' '+\r\n\t\t\t\t\t\t\t\t\t' '+\r\n\t\t\t\t\t\t\t\t\t\t' '+\r\n\t\t\t\t\t\t\t\t\t\t' '+\r\n\t\t\t\t\t\t\t\t\t\t' '+\r\n\t\t\t\t\t\t\t\t\t\t' '+\r\n\t\t\t\t\t\t\t\t\t' '+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t\t''+\r\n\t\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t\t''+\r\n\t\t\t\t\t\t\t\t\t''+\r\n\t\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t''+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t''+\r\n\t\t\t\t\t\t\t\t''+\r\n\t\t\t\t\t\t\t\tloc.select_year_day2+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t''+loc.repeat_text_occurences_count+'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t'
'+\r\n\t\t\t\t'
'+\r\n\t\t\t\t'
';\r\n\t},\r\n\t_ds: {},\r\n\t_get_form_node: function(els, name, value){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return null;\r\n\t\tif(col.nodeName) return col;\r\n\r\n\t\tif(col.length){\r\n\t\t\tfor(var i=0; i < col.length; i++){\r\n\t\t\t\tif(col[i].value == value)\r\n\t\t\t\t\treturn col[i];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\t_get_node_value: function(els, name, multiselect){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return \"\";\r\n\t\tif(col.length){\r\n\t\t\tif(multiselect){\r\n\t\t\t\tvar res = [];\r\n\t\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\t\tif (col[i].checked) res.push(col[i].value);\r\n\r\n\t\t\t\treturn res;\r\n\t\t\t}else{\r\n\t\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\t\tif (col[i].checked) return col[i].value;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(col.value)\r\n\t\t\treturn !multiselect ? col.value : [col.value];\r\n\t},\r\n\r\n\t_get_node_numeric_value: function(els, name){\r\n\t\tvar value = scheduler.form_blocks[\"recurring\"]._get_node_value(els, name);\r\n\t\treturn ((value * 1) || 0);\r\n\t},\r\n\r\n\t_set_node_value: function(els, name, value){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return;\r\n\r\n\t\tif(col.name == name){\r\n\t\t\tcol.value = value;\r\n\t\t}else if(col.length){\r\n\t\t\tvar hash_value = typeof value == \"object\";\r\n\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\tif (hash_value || col[i].value == value){\r\n\t\t\t\t\tcol[i].checked = hash_value ? !!value[col[i].value] : !!value;\r\n\t\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_init_set_value:function(node, value, ev) {\r\n\t\tvar block = scheduler.form_blocks[\"recurring\"];\r\n\t\tvar get_value = block._get_node_value;\r\n\t\tvar set_value = block._set_node_value;\r\n\t\tscheduler.form_blocks[\"recurring\"]._ds = {start:ev.start_date, end:ev._end_date};\r\n\r\n\t\tvar str_date_format = scheduler.date.str_to_date(scheduler.config.repeat_date, false, true);\r\n\t\tvar str_date = function(str_date) {\r\n\t\t\tvar date = str_date_format(str_date);\r\n\t\t\tif (scheduler.config.include_end_by)\r\n\t\t\t\tdate = scheduler.date.add(date, 1, 'day');\r\n\t\t\treturn date;\r\n\t\t};\r\n\r\n\t\tvar date_str = scheduler.date.date_to_str(scheduler.config.repeat_date);\r\n\r\n\t\tvar top = node.getElementsByTagName(\"FORM\")[0];\r\n\t\tvar els = {};\r\n\r\n\t\tfunction register_els(inps) {\r\n\t\t\tfor (var i = 0; i < inps.length; i++) {\r\n\t\t\t\tvar inp = inps[i];\r\n\r\n\t\t\t\tif(inp.name){\r\n\t\t\t\t\tif(!els[inp.name]){\r\n\t\t\t\t\t\tels[inp.name] = inp;\r\n\t\t\t\t\t}else if(els[inp.name].nodeType){\r\n\t\t\t\t\t\tvar node = els[inp.name];\r\n\t\t\t\t\t\tels[inp.name] = [node, inp];\r\n\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tels[inp.name].push(inp);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tregister_els(top.getElementsByTagName(\"INPUT\"));\r\n\t\tregister_els(top.getElementsByTagName(\"SELECT\"));\r\n\r\n\t\tif (!scheduler.config.repeat_date_of_end) {\r\n\t\t\tvar formatter = scheduler.date.date_to_str(scheduler.config.repeat_date);\r\n\t\t\tscheduler.config.repeat_date_of_end = formatter(scheduler.date.add(scheduler._currentDate(), 30, \"day\"));\r\n\t\t}\r\n\t\tset_value(els, \"date_of_end\", scheduler.config.repeat_date_of_end);\r\n\r\n\t\tvar $ = function(a) {\r\n\t\t\treturn scheduler._lightbox.querySelector(`#${a}`) || { style:{} };//return fake object if node not found\r\n\t\t};\r\n\r\n\t\tfunction change_current_view() {\r\n\t\t\t$(\"dhx_repeat_day\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_week\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_month\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_year\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_\" + this.value).style.display = \"\";\r\n\t\t\tscheduler.setLightboxSize();\r\n\t\t}\r\n\r\n\t\tfunction get_repeat_code(dates) {\r\n\t\t\tvar code = [get_value(els, \"repeat\")];\r\n\t\t\tget_rcode[code[0]](code, dates);\r\n\r\n\t\t\twhile (code.length < 5) code.push(\"\");\r\n\t\t\tvar repeat = \"\";\r\n\r\n\t\t\tvar end = get_end_rule(els);\r\n\r\n\t\t\tif (end == \"no\") {\r\n\t\t\t\tdates.end = new Date(9999, 1, 1);\r\n\t\t\t\trepeat = \"no\";\r\n\t\t\t}\r\n\t\t\telse if (end == \"date_of_end\") {\r\n\t\t\t\tdates.end = str_date(get_value(els, \"date_of_end\"));\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tscheduler.transpose_type(code.join(\"_\"));\r\n\t\t\t\trepeat = Math.max(1, get_value(els, \"occurences_count\"));\r\n\r\n\t\t\t\tvar transp = 0;\r\n\r\n\t\t\t\t//var transp = ((code[0] == \"week\" && code[4] && code[4].toString().indexOf(scheduler.config.start_on_monday ? 1 : 0) == -1) ? 1 : 0);\r\n\r\n\t\t\t\t// which is equal to following code, seems to produce extra instance, not clear why needed\r\n\r\n\t\t\t\t/*if(code[0] == \"week\"){\r\n\t\t\t\t\tvar days = code[4] || \"\";\r\n\t\t\t\t\tif(scheduler.config.start_on_monday){\r\n\t\t\t\t\t\tif(days.indexOf(1) == -1)\r\n\t\t\t\t\t\ttransp = 1;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(days.indexOf(0) == -1)\r\n\t\t\t\t\t\ttransp = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}*/\r\n\r\n\t\t\t//\tdates.end = scheduler.date.add(new Date(dates.start), repeat + transp, code.join(\"_\"));\r\n\r\n\t\t\t\tdates.end = scheduler.date[\"add_\" + code.join(\"_\")](new Date(dates.start), repeat + transp, {start_date: dates.start}) || dates.start;\r\n\t\t\t}\r\n\r\n\t\t\treturn code.join(\"_\") + \"#\" + repeat;\r\n\t\t}\r\n\t\tfunction get_end_rule(els){\r\n\t\t\tvar end = els[\"end\"];\r\n\t\t\tif(end.length){\r\n\t\t\t\tfor(var i =0; i < end.length; i++){\r\n\t\t\t\t\tif(end[i].checked){\r\n\t\t\t\t\t\tif(end[i].value && end[i].value != \"on\"){//seems to be default value:var input = document.createElement(\"input\"); input.type = \"radio\"; input.value\r\n\t\t\t\t\t\t\treturn end[i].value;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif(!i){\r\n\t\t\t\t\t\t\t\treturn \"no\";\r\n\t\t\t\t\t\t\t}else if(i == 2){\r\n\t\t\t\t\t\t\t\treturn \"date_of_end\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\treturn \"occurences_count\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(end.value)\r\n\t\t\t\t\treturn end.value;\r\n\t\t\t}\r\n\t\t\treturn \"no\";\r\n\t\t}\r\n\t\tfunction set_end_rule(els, value){\r\n\t\t\tvar end = els[\"end\"];\r\n\r\n\t\t\tif(end.length){\r\n\t\t\t\tvar has_values = !!end[0].value && end[0].value != \"on\";\r\n\t\t\t\tif(has_values){\r\n\t\t\t\t\tfor(var i =0; i < end.length; i++){\r\n\t\t\t\t\t\tif(end[i].value == value)\r\n\t\t\t\t\t\t\tend[i].checked = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar ind = 0;\r\n\t\t\t\t\tswitch(value){\r\n\t\t\t\t\t\tcase \"no\":\r\n\t\t\t\t\t\t\tind = 0;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"date_of_end\":\r\n\t\t\t\t\t\t\tind = 2;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tind = 1;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend[ind].checked = true;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tend.value = value;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tscheduler.form_blocks[\"recurring\"]._get_repeat_code = get_repeat_code;\r\n\t\tvar get_rcode = {\r\n\t\t\tmonth:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tif (get_value(els, \"month_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_count\")));\r\n\t\t\t\t\tdates.start.setDate(get_value(els, \"month_day\"));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_count2\")));\r\n\t\t\t\t\tcode.push( get_value(els, \"month_day2\"));\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_week2\")));\r\n\t\t\t\t\tif (!scheduler.config.repeat_precise){\r\n\t\t\t\t\t\tdates.start.setDate(1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tdates._start = true;\r\n\t\t\t},\r\n\t\t\tweek:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"week_count\")));\r\n\t\t\t\tcode.push(\"\");\r\n\t\t\t\tcode.push(\"\");\r\n\t\t\t\tvar t = [];\r\n\r\n\t\t\t\tvar col = get_value(els, \"week_day\", true);\r\n\t\t\t\t//var col = els[\"week_day\"];\r\n\t\t\t\tvar day = dates.start.getDay();\r\n\t\t\t\tvar start_exists = false;\r\n\r\n\t\t\t\tfor (var i = 0; i < col.length; i++){\r\n\t\t\t\t\tt.push(col[i]);\r\n\t\t\t\t\tstart_exists = start_exists || col[i] == day;\r\n\t\t\t\t}\r\n\t\t\t\tif (!t.length){\r\n\t\t\t\t\tt.push(day);\r\n\t\t\t\t\tstart_exists = true;\r\n\t\t\t\t}\r\n\t\t\t\tt.sort();\r\n\r\n\r\n\t\t\t\tif (!scheduler.config.repeat_precise){\r\n\t\t\t\t\tdates.start = scheduler.date.week_start(dates.start);\r\n\t\t\t\t\tdates._start = true;\r\n\t\t\t\t} else if (!start_exists){\r\n\t\t\t\t\tscheduler.transpose_day_week(dates.start, t, 1, 7);\r\n\t\t\t\t\tdates._start = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcode.push(t.join(\",\"));\r\n\t\t\t},\r\n\t\t\tday:function(code) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tif (get_value(els, \"day_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"day_count\")));\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcode.push(\"week\");\r\n\t\t\t\t\tcode.push(1);\r\n\t\t\t\t\tcode.push(\"\");\r\n\t\t\t\t\tcode.push(\"\");\r\n\t\t\t\t\tcode.push(scheduler.config.recurring_workdays.join(\",\"));\r\n\t\t\t\t\tcode.splice(0, 1);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tyear:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\r\n\t\t\t\tif (get_value(els, \"year_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(\"1\");\r\n\t\t\t\t\tdates.start.setMonth(0);\r\n\t\t\t\t\tdates.start.setDate(get_value(els, \"year_day\"));\r\n\t\t\t\t\tdates.start.setMonth(get_value(els, \"year_month\"));\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcode.push(\"1\");\r\n\t\t\t\t\tcode.push(get_value(els, \"year_day2\"));\r\n\t\t\t\t\tcode.push(get_value(els, \"year_week2\"));\r\n\t\t\t\t\tdates.start.setDate(1);\r\n\t\t\t\t\tdates.start.setMonth(get_value(els, \"year_month2\"));\r\n\t\t\t\t}\r\n\t\t\t\tdates._start = true;\r\n\t\t\t}\r\n\t\t};\r\n\t\tvar set_rcode = {\r\n\t\t\tweek:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\t\tset_value(els, \"week_count\", code[1]);\r\n\r\n\t\t\t\tvar t = code[4].split(\",\");\r\n\t\t\t\tvar d = {};\r\n\t\t\t\tfor (var i = 0; i < t.length; i++) d[t[i]] = true;\r\n\r\n\t\t\t\tset_value(els, \"week_day\", d);\r\n\r\n\t\t\t\t//for (var i = 0; i < col.length; i++)\r\n\t\t\t\t//\tcol[i].checked = (!!d[col[i].value]);\r\n\t\t\t},\r\n\t\t\tmonth:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\r\n\t\t\t\tif (code[2] === \"\") {\r\n\t\t\t\t\tset_value(els, \"month_type\", \"d\");\r\n\t\t\t\t\tset_value(els, \"month_count\", code[1]);\r\n\t\t\t\t\tset_value(els, \"month_day\", dates.start.getDate());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tset_value(els, \"month_type\", \"w\");\r\n\t\t\t\t\tset_value(els, \"month_count2\", code[1]);\r\n\t\t\t\t\tset_value(els, \"month_week2\", code[3]);\r\n\t\t\t\t\tset_value(els, \"month_day2\", code[2]);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tday:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\t\tset_value(els, \"day_type\", \"d\");\r\n\t\t\t\tset_value(els, \"day_count\", code[1]);\r\n\t\t\t},\r\n\t\t\tyear:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\r\n\t\t\t\tif (code[2] === \"\") {\r\n\t\t\t\t\tset_value(els, \"year_type\", \"d\");\r\n\t\t\t\t\tset_value(els, \"year_day\", dates.start.getDate());\r\n\t\t\t\t\tset_value(els, \"year_month\", dates.start.getMonth());\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tset_value(els, \"year_type\", \"w\");\r\n\t\t\t\t\tset_value(els, \"year_week2\", code[3]);\r\n\t\t\t\t\tset_value(els, \"year_day2\", code[2]);\r\n\t\t\t\t\tset_value(els, \"year_month2\", dates.start.getMonth());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfunction set_repeat_code(code, dates) {\r\n\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\tvar data = code.split(\"#\");\r\n\t\t\tcode = data[0].split(\"_\");\r\n\t\t\tset_rcode[code[0]](code, dates);\r\n\r\n\t\t\tswitch (data[1]) {\r\n\t\t\t\tcase \"no\":\r\n\t\t\t\t\tset_end_rule(els, \"no\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"\":\r\n\t\t\t\t\tset_end_rule(els, \"date_of_end\");\r\n\r\n\t\t\t\t\tvar end_date = dates.end;\r\n\t\t\t\t\tif (scheduler.config.include_end_by){\r\n\t\t\t\t\t\tend_date = scheduler.date.add(end_date, -1, 'day');\r\n\t\t\t\t\t}\r\n\t\t\t\t\tset_value(els, \"date_of_end\", date_str(end_date));\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tset_end_rule(els, \"occurences_count\");\r\n\t\t\t\t\tset_value(els, \"occurences_count\", data[1]);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tset_value(els, \"repeat\", code[0]);\r\n\t\t\t//e.checked = true;\r\n\r\n\t\t\tvar node = scheduler.form_blocks[\"recurring\"]._get_form_node(els, \"repeat\", code[0]);\r\n\t\t\tif(node.nodeName == \"SELECT\"/* && node.onchange*/){\r\n\t\t\t//\tnode.onchange();\r\n\t\t\t\tnode.dispatchEvent(new Event('change'));\r\n\t\t\t\tnode.dispatchEvent(new MouseEvent('click'));\r\n\t\t\t}else{\r\n\t\t\t\tnode.dispatchEvent(new MouseEvent('click'));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tscheduler.form_blocks[\"recurring\"]._set_repeat_code = set_repeat_code;\r\n\r\n\t\tfor (var i = 0; i < top.elements.length; i++) {\r\n\t\t\tvar el = top.elements[i];\r\n\t\t\tswitch (el.name) {\r\n\t\t\t\tcase \"repeat\":\r\n\t\t\t\t\tif (el.nodeName == \"SELECT\" && !el.$_eventAttached) {\r\n\t\t\t\t\t\tel.$_eventAttached = true;\r\n\t\t\t\t\t\tel.addEventListener(\"change\", change_current_view);\r\n\t\t\t\t\t} else if(!el.$_eventAttached){\r\n\t\t\t\t\t\tel.$_eventAttached = true;\r\n\t\t\t\t\t\tel.addEventListener(\"click\", change_current_view);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._lightbox._rec_init_done = true;\r\n\t},\r\n\tset_value:function(node, value, ev) {\r\n\t\tvar rf = scheduler.form_blocks[\"recurring\"];\r\n\t\tif (!scheduler._lightbox._rec_init_done)\r\n\t\t\trf._init_set_value(node, value, ev);\r\n\t\tnode.open = !ev.rec_type;\r\n\r\n\t\tnode.blocked = this._is_modified_occurence(ev);\r\n\r\n\t\tvar ds = rf._ds;\r\n\t\tds.start = ev.start_date;\r\n\t\tds.end = ev._end_date;\r\n\r\n\t\trf._toggle_block();\r\n\r\n\t\tif (value)\r\n\t\t\trf._set_repeat_code(value, ds);\r\n\t},\r\n\tget_value:function(node, ev) {\r\n\t\tif (node.open) {\r\n\t\t\tvar ds = scheduler.form_blocks[\"recurring\"]._ds;\r\n\t\t\tvar actual_dates = {};\r\n\r\n\t\t\tvar timeControl = getTimeSection();\r\n\r\n\t\t\ttimeControl.getValue(actual_dates);\r\n\t\t\tds.start = actual_dates.start_date;\r\n\t\t\tev.rec_type = scheduler.form_blocks[\"recurring\"]._get_repeat_code(ds);\r\n\t\t\tif (ds._start) {\r\n\t\t\t\tev.start_date = new Date(ds.start);\r\n\t\t\t\tev._start_date = new Date(ds.start);\r\n\t\t\t\tds._start = false;\r\n\t\t\t} else\r\n\t\t\t\tev._start_date = null;\r\n\r\n\t\t\tev._end_date = ds.end;\r\n\t\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\t\t} else {\r\n\t\t\tev.rec_type = ev.rec_pattern = \"\";\r\n\t\t\tev._end_date = ev.end_date;\r\n\t\t}\r\n\t\treturn ev.rec_type;\r\n\t},\r\n\t_get_button: function(){\r\n\t\tvar node = getRecurringSection().header;\r\n\t\treturn node.firstChild.firstChild;\r\n\t},\r\n\t_get_form: function(){\r\n\t\treturn getRecurringSection().node;\r\n\t},\r\n\topen:function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form();\r\n\t\tif(!cont.open)\r\n\t\t\tblock._toggle_block();\r\n\t},\r\n\tclose: function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form();\r\n\r\n\t\tif(cont.open)\r\n\t\t\tblock._toggle_block();\r\n\t},\r\n\t_toggle_block: function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form(),\r\n\t\t\tel = block._get_button();\r\n\t\tif (!cont.open && !cont.blocked) {\r\n\t\t\tcont.style.height = \"auto\";//reset to default value\r\n\t\t\tif(el){\r\n\t\t\t\tel.style.backgroundPosition = \"-5px 0px\";\r\n\t\t\t\tel.nextSibling.innerHTML = scheduler.locale.labels.button_recurring_open;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tcont.style.height = \"0px\";\r\n\t\t\tif(el){\r\n\t\t\t\tel.style.backgroundPosition = \"-5px 20px\";\r\n\t\t\t\tel.nextSibling.innerHTML = scheduler.locale.labels.button_recurring;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcont.open = !cont.open;\r\n\r\n\t\tscheduler.setLightboxSize();\r\n\t},\r\n\tfocus:function(node) {\r\n\t},\r\n\tbutton_click:function(node, button, event) {\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\t\tvar cont = block._get_form();\r\n\t\tif (!cont.blocked)\r\n\t\t\tscheduler.form_blocks.recurring._toggle_block();\r\n\t}\r\n};\r\n\r\nfunction getTimeSection(){\r\n\tvar timeControl = scheduler.formSection('time');\r\n\tif(!timeControl){\r\n\t\ttimeControl = getFirstSectionOfType('time');\r\n\t}\r\n\tif(!timeControl){\r\n\t\ttimeControl = getFirstSectionOfType('calendar_time');\r\n\t}\r\n\r\n\t\r\n\tif (!timeControl) {\r\n\t\tthrow new Error([\"Can't calculate the recurring rule, the Recurring form block can't find the Time control. Make sure you have the time control in 'scheduler.config.lightbox.sections' config.\",\r\n\"You can use either the default time control https://docs.dhtmlx.com/scheduler/time.html, or the datepicker https://docs.dhtmlx.com/scheduler/minicalendar.html, or a custom control. \",\r\n\"In the latter case, make sure the control is named \\\"time\\\":\",\r\n\"\",\r\n\"scheduler.config.lightbox.sections = [\",\r\n\"{name:\\\"time\\\", height:72, type:\\\"YOU CONTROL\\\", map_to:\\\"auto\\\" }];\"]\r\n.join(\"\\n\"));\r\n\t}\r\n\r\n\treturn timeControl;\r\n}\r\n\r\nfunction getRecurringSection(){\r\n\tvar recurringSection = scheduler.formSection('recurring');\r\n\tif(!recurringSection){\r\n\t\trecurringSection = getFirstSectionOfType('recurring');\r\n\t}\r\n\r\n\tif (!recurringSection) {\r\n\t\tthrow new Error([\"Can't locate the Recurring form section.\",\r\n\t\t\"Make sure that you have the recurring control on the lightbox configuration https://docs.dhtmlx.com/scheduler/recurring_events.html#recurringlightbox \",\r\n\t\t\"and that the recurring control has name \\\"recurring\\\":\",\r\n\"\",\r\n\"scheduler.config.lightbox.sections = [\",\r\n\"\t{name:\\\"recurring\\\", ... }\",\r\n\"];\"].join(\"\\n\"));\r\n\r\n\t}\r\n\r\n\treturn recurringSection;\r\n}\r\n\r\nfunction getFirstSectionOfType(type){\r\n\tfor(var i = 0; i < scheduler.config.lightbox.sections.length; i++){\r\n\t\tvar section = scheduler.config.lightbox.sections[i];\r\n\t\tif(section.type === type){\r\n\t\t\treturn scheduler.formSection(section.name);\r\n\t\t}\r\n\t}\r\n\treturn null;\r\n}\r\n\r\n//problem may occur if we will have two repeating events in the same moment of time\r\nscheduler._rec_markers = {};\r\nscheduler._rec_markers_pull = {};\r\nscheduler._add_rec_marker = function(ev, time) {\r\n\tev._pid_time = time;\r\n\tthis._rec_markers[ev.id] = ev;\r\n\tif (!this._rec_markers_pull[ev.event_pid]) this._rec_markers_pull[ev.event_pid] = {};\r\n\tthis._rec_markers_pull[ev.event_pid][time] = ev;\r\n};\r\nscheduler._get_rec_marker = function(time, id) {\r\n\tvar ch = this._rec_markers_pull[id];\r\n\tif (ch) return ch[time];\r\n\treturn null;\r\n};\r\nscheduler._get_rec_markers = function(id) {\r\n\treturn (this._rec_markers_pull[id] || []);\r\n};\r\n\r\nfunction clearMilliseconds(date){\r\n//\treturn date;\r\n\treturn new Date(\r\n\t\tdate.getFullYear(), \r\n\t\tdate.getMonth(), \r\n\t\tdate.getDate(), \r\n\t\tdate.getHours(), \r\n\t\tdate.getMinutes(),\r\n\t\tdate.getSeconds(),\r\n\t\t0\r\n\t);\r\n}\r\n\r\nscheduler._rec_temp = [];\r\n(function() {\r\n\tvar old_add_event = scheduler.addEvent;\r\n\tscheduler.addEvent = function(start_date, end_date, text, id, extra_data) {\r\n\t\tvar ev_id = old_add_event.apply(this, arguments);\r\n\r\n\t\tif (ev_id && scheduler.getEvent(ev_id)) {\r\n\t\t\tvar ev = scheduler.getEvent(ev_id);\r\n\t\t\t\r\n\t\t\tif(ev.start_date){\r\n\t\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t\t}\r\n\t\t\tif(ev.end_date){\r\n\t\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t\t}\r\n\t\t\tif (this._is_modified_occurence(ev))\r\n\t\t\t\tscheduler._add_rec_marker(ev, ev.event_length * 1000);\r\n\t\t\tif (ev.rec_type)\r\n\t\t\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\t\t}\r\n\t\treturn ev_id;\r\n\t};\r\n})();\r\n\r\nscheduler.attachEvent(\"onEventIdChange\", function(id, new_id) {\r\n\tif (this._ignore_call) return;\r\n\tthis._ignore_call = true;\r\n\r\n\tif(scheduler._rec_markers[id]){\r\n\t\t//important for for correct work of scheduler.getEvents(from, to) and collision detection\r\n\t\tscheduler._rec_markers[new_id] = scheduler._rec_markers[id];\r\n\t\tdelete scheduler._rec_markers[id];\r\n\t}\r\n\r\n\tif(scheduler._rec_markers_pull[id]){\r\n\t\tscheduler._rec_markers_pull[new_id] = scheduler._rec_markers_pull[id];\r\n\t\tdelete scheduler._rec_markers_pull[id];\r\n\t}\r\n\r\n\tfor (var i = 0; i < this._rec_temp.length; i++) {\r\n\t\tvar tev = this._rec_temp[i];\r\n\t\tif (tev.event_pid == id) {\r\n\t\t\ttev.event_pid = new_id;\r\n\t\t\tthis.changeEventId(tev.id, new_id + \"#\" + tev.id.split(\"#\")[1]);\r\n\t\t}\r\n\t}\r\n\r\n\tfor(var i in this._rec_markers){\r\n\t\tvar tev = this._rec_markers[i];\r\n\t\tif(tev.event_pid == id){\r\n\t\t\ttev.event_pid = new_id;\r\n\t\t\ttev._pid_changed = true;\r\n\t\t}\r\n\t}\r\n\r\n\tvar el = scheduler._rec_markers[new_id];\r\n\tif(el && el._pid_changed) {\r\n\t\tdelete el._pid_changed;\r\n\t\tsetTimeout(function() {\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler.callEvent(\"onEventChanged\", [new_id, scheduler.getEvent(new_id)]);\r\n\t\t}, 1);\r\n\t}\r\n\r\n\tdelete this._ignore_call;\r\n});\r\nscheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (this._is_virtual_event(id) || (this._is_modified_occurence(ev) && ev.rec_type && ev.rec_type != 'none')) {\r\n\t\tid = id.split(\"#\");\r\n\t\tvar nid = this.uid();\r\n\t\tvar tid = (id[1]) ? id[1] : Math.round(ev._pid_time / 1000);\r\n\r\n\t\tvar nev = this._copy_event(ev);\r\n\t\tnev.id = nid;\r\n\t\tnev.event_pid = ev.event_pid || id[0];\r\n\t\tvar timestamp = tid;\r\n\t\tnev.event_length = timestamp;\r\n\t\tnev.rec_type = nev.rec_pattern = \"none\";\r\n\t\tthis.addEvent(nev);\r\n\r\n\t\tthis._add_rec_marker(nev, timestamp * 1000);\r\n\t} else {\r\n\t\tif (ev.rec_type && this._lightbox_id)\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\tvar sub = this._get_rec_markers(id);\r\n\t\tfor (var i in sub) {\r\n\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\tid = sub[i].id;\r\n\t\t\t\tif (this.getEvent(id))\r\n\t\t\t\t\tthis.deleteEvent(id, true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventDeleted\", function(id, ev){\r\n\tif(!this._is_virtual_event(id) && this._is_modified_occurence(ev)){\r\n\t\tif(!scheduler._events[id]){\r\n\t\t\tev.rec_type = ev.rec_pattern = \"none\";\r\n\t\t\tthis.setEvent(id, ev);\r\n\t\t}\r\n\t}\r\n});\r\nscheduler.attachEvent(\"onEventChanged\", function(id, event) {\r\n\tif (this._loading) return true;\r\n\r\n\tvar ev = this.getEvent(id);\r\n\r\n\tif (this._is_virtual_event(id)) {\r\n\t\tvar id = id.split(\"#\");\r\n\t\tvar nid = this.uid();\r\n\t\tthis._not_render = true;\r\n\r\n\t\tvar nev = this._copy_event(event);\r\n\t\tnev.id = nid;\r\n\t\tnev.event_pid = id[0];\r\n\t\tvar timestamp = id[1];\r\n\t\tnev.event_length = timestamp;\r\n\t\tnev.rec_type = nev.rec_pattern = \"\";\r\n\r\n\t\tthis._add_rec_marker(nev, timestamp * 1000);\r\n\t\tthis.addEvent(nev);\r\n\r\n\t\tthis._not_render = false;\r\n\r\n\t} else {\r\n\t\tif(ev.start_date){\r\n\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t}\r\n\t\tif(ev.end_date){\r\n\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t}\r\n\r\n\t\tif (ev.rec_type && this._lightbox_id){\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t}\r\n\t\tvar sub = this._get_rec_markers(id);\r\n\t\tfor (var i in sub) {\r\n\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\tdelete this._rec_markers[sub[i].id];\r\n\t\t\t\tthis.deleteEvent(sub[i].id, true);\r\n\t\t\t}\r\n\t\t}\r\n\t\tdelete this._rec_markers_pull[id];\r\n\r\n\t\t// it's possible that after editing event is no longer exists, in such case we need to remove _select_id flag\r\n\t\tvar isEventFound = false;\r\n\t\tfor (var k = 0; k < this._rendered.length; k++) {\r\n\t\t\tif (this._rendered[k].getAttribute(this.config.event_attribute) == id)\r\n\t\t\t\tisEventFound = true;\r\n\t\t}\r\n\t\tif (!isEventFound)\r\n\t\t\tthis._select_id = null;\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventAdded\", function(id) {\r\n\tif (!this._loading) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (ev.rec_type && !ev.event_length){\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventSave\", function(id, data, is_new_event) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (!ev.rec_type && data.rec_type && !this._is_virtual_event(id))\r\n\t\tthis._select_id = null;\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventCreated\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (!ev.rec_type)\r\n\t\tev.rec_type = ev.rec_pattern = ev.event_length = ev.event_pid = \"\";\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventCancel\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (ev.rec_type) {\r\n\t\tthis._roll_back_dates(ev);\r\n\t\t// a bit expensive, but we need to be sure that event re-rendered, because view can be corrupted by resize , during edit process\r\n\t\tthis.render_view_data();\r\n\t}\r\n});\r\nscheduler._roll_back_dates = function(ev) {\r\n\tif(ev.start_date){\r\n\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t}\r\n\tif(ev.end_date){\r\n\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t}\r\n\tev.event_length = Math.round((ev.end_date.valueOf() - ev.start_date.valueOf()) / 1000);\r\n\tev.end_date = ev._end_date;\r\n\tif (ev._start_date) {\r\n\t\tev.start_date.setMonth(0);\r\n\t\tev.start_date.setDate(ev._start_date.getDate());\r\n\t\tev.start_date.setMonth(ev._start_date.getMonth());\r\n\t\tev.start_date.setFullYear(ev._start_date.getFullYear());\r\n\r\n\t}\r\n};\r\n\r\nscheduler._is_virtual_event = function(id){\r\n\treturn id.toString().indexOf(\"#\") != -1;\r\n};\r\nscheduler._is_modified_occurence = function(ev){\r\n\treturn (ev.event_pid && ev.event_pid != \"0\");\r\n};\r\n\r\nscheduler.showLightbox_rec = scheduler.showLightbox;\r\nscheduler.showLightbox = function(id) {\r\n\tvar locale = this.locale;\r\n\tvar c = scheduler.config.lightbox_recurring;\r\n\tvar ev = this.getEvent(id);\r\n\tvar pid = ev.event_pid;\r\n\tvar isVirtual = this._is_virtual_event(id);\r\n\tif (isVirtual)\r\n\t\tpid = id.split(\"#\")[0];\r\n\r\n\t// show series\r\n\tvar showSeries = function(id) {\r\n\t\tvar event = scheduler.getEvent(id);\r\n\t\tevent._end_date = event.end_date;\r\n\t\tevent.end_date = new Date(event.start_date.valueOf() + event.event_length * 1000);\r\n\t\treturn scheduler.showLightbox_rec(id); // editing series\r\n\t};\r\n\r\n\tif ( (pid || pid*1 === 0) && ev.rec_type) {\r\n\t\t// direct API call on series id\r\n\t\treturn showSeries(id);\r\n\t}\r\n\tif ( !pid || pid === '0' || ( (!locale.labels.confirm_recurring || c == 'instance') || (c == 'series' && !isVirtual)) ) {\r\n\t\t// editing instance or non recurring event\r\n\t\treturn this.showLightbox_rec(id);\r\n\t}\r\n\tif (c == 'ask') {\r\n\t\tvar that = this;\r\n\t\tscheduler.modalbox({\r\n\t\t\ttext: locale.labels.confirm_recurring,\r\n\t\t\ttitle: locale.labels.title_confirm_recurring,\r\n\t\t\twidth: \"500px\",\r\n\t\t\tposition: \"middle\",\r\n\t\t\tbuttons:[locale.labels.button_edit_series, locale.labels.button_edit_occurrence, locale.labels.icon_cancel],\r\n\t\t\tcallback: function(index) {\r\n\t\t\t\tswitch(+index) {\r\n\t\t\t\t\tcase 0:\r\n\t\t\t\t\t\treturn showSeries(pid);\r\n\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\treturn that.showLightbox_rec(id);\r\n\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\tshowSeries(pid);\r\n\t}\r\n};\r\n\r\n\r\nscheduler.get_visible_events_rec = scheduler.get_visible_events;\r\nscheduler.get_visible_events = function(only_timed) {\r\n\tfor (var i = 0; i < this._rec_temp.length; i++)\r\n\t\tdelete this._events[this._rec_temp[i].id];\r\n\tthis._rec_temp = [];\r\n\r\n\tvar stack = this.get_visible_events_rec(only_timed);\r\n\tvar out = [];\r\n\tfor (var i = 0; i < stack.length; i++) {\r\n\t\tif (stack[i].rec_type) {\r\n\t\t\t//deleted element of series\r\n\t\t\tif (stack[i].rec_pattern != \"none\")\r\n\t\t\t\tthis.repeat_date(stack[i], out);\r\n\t\t}\r\n\t\telse out.push(stack[i]);\r\n\t}\r\n\treturn out;\r\n};\r\n\r\n\r\n(function() {\r\n\tvar old = scheduler.isOneDayEvent;\r\n\tscheduler.isOneDayEvent = function(ev) {\r\n\t\tif (ev.rec_type) return true;\r\n\t\treturn old.call(this, ev);\r\n\t};\r\n\tvar old_update_event = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id) {\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif(ev && ev.rec_type){\r\n\t\t\t//rec_type can be changed without the lightbox,\r\n\t\t\t// make sure rec_pattern updated as well\r\n\t\t\tev.rec_pattern = (ev.rec_type || \"\").split(\"#\")[0];\r\n\t\t}\r\n\t\tif (ev && ev.rec_type && !this._is_virtual_event(id)) {\r\n\t\t\tscheduler.update_view();\r\n\t\t} else {\r\n\t\t\told_update_event.call(this, id);\r\n\t\t}\r\n\t};\r\n})();\r\n\r\nscheduler.transponse_size = {\r\n\tday:1, week:7, month:1, year:12\r\n};\r\nscheduler.date.day_week = function(sd, day, week) {\r\n\tsd.setDate(1);\r\n\tvar originalMonth = scheduler.date.month_start(new Date(sd));\r\n\tweek = (week - 1) * 7;\r\n\tvar cday = sd.getDay();\r\n\tvar nday = day * 1 + week - cday + 1;\r\n\tsd.setDate(nday <= week ? (nday + 7) : nday);\r\n\tvar newMonth = scheduler.date.month_start(new Date(sd));\r\n\tif(originalMonth.valueOf() !== newMonth.valueOf()){\r\n\t\treturn false;\r\n\t}\r\n\treturn true;\r\n};\r\nscheduler.transpose_day_week = function(sd, list, cor, size, cor2) {\r\n\tvar cday = (sd.getDay() || (scheduler.config.start_on_monday ? 7 : 0)) - cor;\r\n\tfor (var i = 0; i < list.length; i++) {\r\n\t\tif (list[i] > cday)\r\n\t\t\treturn sd.setDate(sd.getDate() + list[i] * 1 - cday - (size ? cor : cor2));\r\n\t}\r\n\tthis.transpose_day_week(sd, list, cor + size, null, cor);\r\n};\r\nscheduler.transpose_type = function(type) {\r\n\tvar transposeRecurring = \"transpose_\" + type;\r\n\tif (!this.date[transposeRecurring]) {\r\n\t\tvar recurringParts = type.split(\"_\");\r\n\t\tvar dayDurationMs = 60 * 60 * 24 * 1000;\r\n\t\tvar addRecurring = \"add_\" + type;\r\n\t\tvar recurringStepDays = this.transponse_size[recurringParts[0]] * recurringParts[1];\r\n\r\n\t\tif (recurringParts[0] == \"day\" || recurringParts[0] == \"week\") {\r\n\t\t\tvar weekDays = null;\r\n\t\t\tif (recurringParts[4]) {\r\n\t\t\t\tweekDays = recurringParts[4].split(\",\");\r\n\t\t\t\tif (scheduler.config.start_on_monday) {\r\n\t\t\t\t\tfor (var i = 0; i < weekDays.length; i++)\r\n\t\t\t\t\t\tweekDays[i] = (weekDays[i] * 1) || 7;\r\n\t\t\t\t\tweekDays.sort();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.date[transposeRecurring] = function(nd, td) {\r\n\t\t\t\tvar delta = Math.floor((td.valueOf() - nd.valueOf()) / (dayDurationMs * recurringStepDays));\r\n\t\t\t\tif (delta > 0)\r\n\t\t\t\t\tnd.setDate(nd.getDate() + delta * recurringStepDays);\r\n\t\t\t\tif (weekDays)\r\n\t\t\t\t\tscheduler.transpose_day_week(nd, weekDays, 1, recurringStepDays);\r\n\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t\tthis.date[addRecurring] = function(sd, inc) {\r\n\t\t\t\tvar nd = new Date(sd.valueOf());\r\n\t\t\t\tif (weekDays) {\r\n\t\t\t\t\tfor (var count = 0; count < inc; count++)\r\n\t\t\t\t\t\tscheduler.transpose_day_week(nd, weekDays, 0, recurringStepDays);\r\n\t\t\t\t} else\r\n\t\t\t\t\tnd.setDate(nd.getDate() + inc * recurringStepDays);\r\n\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t}\r\n\t\telse if (recurringParts[0] == \"month\" || recurringParts[0] == \"year\") {\r\n\t\t\tthis.date[transposeRecurring] = function(nd, td, seriesInstance) {\r\n\t\t\t\tvar delta = Math.ceil(((td.getFullYear() * 12 + td.getMonth() * 1 + 1) - (nd.getFullYear() * 12 + nd.getMonth() * 1 + 1)) / (recurringStepDays) - 1);\r\n\r\n\t\t\t\tif (delta >= 0){\r\n\t\t\t\t\tnd.setDate(1);\r\n\t\t\t\t\tnd.setMonth(nd.getMonth() + delta * recurringStepDays);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn scheduler.date[addRecurring](nd, 0, seriesInstance);\r\n\t\t\t\t//if (str[3]){\r\n\t\t\t\t//\tscheduler.date.day_week(nd, str[2], str[3]);\r\n\t\t\t\t//}\r\n\t\t\t};\r\n\t\t\tthis.date[addRecurring] = function(sd, inc, seriesInstance, currentCount) {\r\n\t\t\t\tif(!currentCount){\r\n\t\t\t\t\tcurrentCount = 1;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcurrentCount++;\r\n\t\t\t\t}\r\n\t\t\t\tvar maxCount = 12;\r\n\t\t\t\tif(currentCount > maxCount){\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar nd = new Date(sd.valueOf());\r\n\t\t\t\tnd.setDate(1);\r\n\r\n\r\n\t\t\t\tnd.setMonth(nd.getMonth() + inc * recurringStepDays);\r\n\t\t\t\tvar origMonth = nd.getMonth();\r\n\t\t\t\tvar origYear = nd.getFullYear();\r\n\t\t\t\tnd.setDate(seriesInstance.start_date.getDate());\r\n\t\t\t\tif (recurringParts[3]){\r\n\t\t\t\t\tscheduler.date.day_week(nd, recurringParts[2], recurringParts[3]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar correctOverflowInstances = scheduler.config.recurring_overflow_instances;\r\n\t\t\t\tif(nd.getMonth() != origMonth && correctOverflowInstances != \"none\"){\r\n\t\t\t\t\t// no such day in a month\r\n\t\t\t\t\tif(correctOverflowInstances === \"lastDay\"){\r\n\t\t\t\t\t\t// return either last day of the month\r\n\t\t\t\t\t\tnd = new Date(origYear, origMonth + 1, 0, nd.getHours(), nd.getMinutes(), nd.getSeconds(), nd.getMilliseconds());\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t// or go to the next instance\r\n\t\t\t\t\t\tnd = scheduler.date[addRecurring](new Date(origYear, origMonth + 1, 0), inc||1, seriesInstance, currentCount);\r\n\t\t\t\t\t\t// if next instance is not possible (e.g. 'repeat on 40th day of the month') null will be returned\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.repeat_date = function(ev, stack, non_render, from, to, maxCount) {\r\n\r\n\tfrom = from || this._min_date;\r\n\tto = to || this._max_date;\r\n\tvar max = maxCount || -1;\r\n\tvar td = new Date(ev.start_date.valueOf());\r\n\r\n\tvar startHour = td.getHours();\r\n\r\n\tvar visibleCount = 0;\r\n\r\n\tif (!ev.rec_pattern && ev.rec_type)\r\n\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\r\n\tthis.transpose_type(ev.rec_pattern);\r\n\ttd = scheduler.date[\"transpose_\" + ev.rec_pattern](td, from, ev);\r\n\twhile ( td && (\r\n\t\ttd < ev.start_date ||\r\n\t\tscheduler._fix_daylight_saving_date(td,from,ev,td,new Date(td.valueOf() + ev.event_length * 1000)).valueOf() <= from.valueOf() ||\r\n\t\ttd.valueOf() + ev.event_length * 1000 <= from.valueOf())){\r\n\t\t\ttd = this.date[\"add_\" + ev.rec_pattern](td, 1, ev);\r\n\r\n\t}\r\n\twhile (td && (td < to && td < ev.end_date && (max < 0 || visibleCount < max))) {\r\n\t\ttd.setHours(startHour);\r\n\r\n\t\tvar timestamp = (scheduler.config.occurrence_timestamp_in_utc) ? Date.UTC(td.getFullYear(), td.getMonth(), td.getDate(), td.getHours(), td.getMinutes(), td.getSeconds()) : td.valueOf();\r\n\t\tvar ch = this._get_rec_marker(timestamp, ev.id);\r\n\t\tif (!ch) { // unmodified element of series\r\n\t\t\tvar ted = new Date(td.valueOf() + ev.event_length * 1000);\r\n\t\t\tvar copy = this._copy_event(ev);\r\n\t\t\t//copy._timed = ev._timed;\r\n\t\t\tcopy.text = ev.text;\r\n\t\t\tcopy.start_date = td;\r\n\t\t\tcopy.event_pid = ev.id;\r\n\t\t\tcopy.id = ev.id + \"#\" + Math.round(timestamp / 1000);\r\n\t\t\tcopy.end_date = ted;\r\n\r\n\t\t\tcopy.end_date = scheduler._fix_daylight_saving_date(copy.start_date, copy.end_date, ev, td, copy.end_date);\r\n\r\n\t\t\tcopy._timed = this.isOneDayEvent(copy);\r\n\r\n\t\t\tif (!copy._timed && !this._table_view && !this.config.multi_day) return;\r\n\t\t\tstack.push(copy);\r\n\r\n\t\t\tif (!non_render) {\r\n\t\t\t\tthis._events[copy.id] = copy;\r\n\t\t\t\tthis._rec_temp.push(copy);\r\n\t\t\t}\r\n\r\n\t\t\tvisibleCount++;\r\n\r\n\t\t} else\r\n\t\tif (non_render){\r\n\t\t\tif(ch.rec_type != \"none\"){\r\n\t\t\t\tvisibleCount++;\r\n\t\t\t}\r\n\t\t\tstack.push(ch);\r\n\t\t}\r\n\r\n\t\ttd = this.date[\"add_\" + ev.rec_pattern](td, 1, ev);\r\n\t//\tif(!scheduler.date[\"validate_add_\" + ev.rec_pattern](td, 1, ev.rec_pattern)){\r\n\t///\t\talert(\"detect add\")\r\n\t//\t}\r\n\t}\r\n};\r\nscheduler._fix_daylight_saving_date = function(start_date, end_date, ev, counter, default_date) {\r\n\tvar shift = start_date.getTimezoneOffset() - end_date.getTimezoneOffset();\r\n\tif (shift) {\r\n\t\tif (shift > 0) {\r\n\t\t\t// e.g. 24h -> 23h\r\n\t\t\treturn new Date(counter.valueOf() + ev.event_length * 1000 - shift * 60 * 1000);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// e.g. 24h -> 25h\r\n\t\t\treturn new Date(end_date.valueOf() - shift * 60 * 1000);\r\n\t\t}\r\n\t}\r\n\treturn new Date(default_date.valueOf());\r\n};\r\nscheduler.getRecDates = function(id, max) {\r\n\tvar ev = typeof id == \"object\" ? id : scheduler.getEvent(id);\r\n\tvar recurrings = [];\r\n\tmax = max || 100;\r\n\r\n\tif (!ev.rec_type) {\r\n\t\treturn [\r\n\t\t\t{ start_date: ev.start_date, end_date: ev.end_date }\r\n\t\t];\r\n\t}\r\n\tif (ev.rec_type == \"none\") {\r\n\t\treturn [];\r\n\t}\r\n\r\n\tscheduler.repeat_date(ev, recurrings, true, ev.start_date, ev.end_date, max);\r\n\r\n\tvar result = [];\r\n\tfor(var i = 0; i < recurrings.length; i++){\r\n\t\tif(recurrings[i].rec_type != \"none\"){\r\n\t\t\tresult.push({start_date: recurrings[i].start_date, end_date: recurrings[i].end_date});\r\n\t\t}\r\n\t}\r\n\r\n\treturn result;\r\n};\r\nscheduler.getEvents = function(from, to) {\r\n\tvar result = [];\r\n\tfor (var a in this._events) {\r\n\t\tvar ev = this._events[a];\r\n\t\tif (ev && ev.start_date < to && ev.end_date > from) {\r\n\t\t\tif (ev.rec_pattern) {\r\n\t\t\t\tif (ev.rec_pattern == \"none\") continue;\r\n\t\t\t\tvar sev = [];\r\n\t\t\t\tthis.repeat_date(ev, sev, true, from, to);\r\n\t\t\t\tfor (var i = 0; i < sev.length; i++) {\r\n\t\t\t\t\t// if event is in rec_markers then it will be checked by himself, here need to skip it\r\n\t\t\t\t\tif (!sev[i].rec_pattern && sev[i].start_date < to && sev[i].end_date > from && !this._rec_markers[sev[i].id]) {\r\n\t\t\t\t\t\tresult.push(sev[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if (!this._is_virtual_event(ev.id)) { // if it's virtual event we can skip it\r\n\t\t\t\tresult.push(ev);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n};\r\n\r\nscheduler.config.repeat_date = \"%m.%d.%Y\";\r\nscheduler.config.lightbox.sections = [\r\n\t{name:\"description\", map_to:\"text\", type:\"textarea\" , focus:true},\r\n\t{name:\"recurring\", type:\"recurring\", map_to:\"rec_type\", button:\"recurring\"},\r\n\t{name:\"time\", height:72, type:\"time\", map_to:\"auto\"}\r\n];\r\n\r\n\r\n//drop secondary attributes\r\nscheduler._copy_dummy = function(ev) {\r\n\tvar start_date = new Date(this.start_date);\r\n\tvar end_date = new Date(this.end_date);\r\n\tthis.start_date = start_date;\r\n\tthis.end_date = end_date;\r\n\tthis.event_length = this.event_pid = this.rec_pattern = this.rec_type = null;\r\n};\r\n\r\nscheduler.config.include_end_by = false;\r\nscheduler.config.lightbox_recurring = 'ask'; // series, instance\r\n\r\nscheduler.attachEvent(\"onClearAll\", function(){\r\n\tscheduler._rec_markers = {}; //clear recurring events data\r\n\tscheduler._rec_markers_pull = {};\r\n\tscheduler._rec_temp = [];\r\n});\r\n\r\n}","import getSerializator from '../core/common/get_serializable_events';\r\nexport default function(scheduler){\r\n\r\n\t\r\nconst getSerializableData = getSerializator(scheduler);\r\n\r\n//redefine this method, if you want to provide a custom set of attributes for serialization\r\nscheduler.data_attributes=function(){\r\n\tvar attrs = [];\r\n\tvar format = scheduler._helpers.formatDate;\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\t\tfor (var name in ev)\r\n\t\t\tif (name.substr(0,1) !=\"_\")\r\n\t\t\t\tattrs.push([name,((name == \"start_date\" || name == \"end_date\")?format:null)]);\r\n\t\tbreak;\r\n\t}\r\n\treturn attrs;\r\n};\r\n\r\nscheduler.toXML = function(header){\r\n\tvar xml = [];\r\n\tvar attrs = this.data_attributes();\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\r\n\t\txml.push(\"\");\r\n\t\tfor (var i=0; i < attrs.length; i++)\r\n\t\t\txml.push(\"<\"+attrs[i][0]+\">\");\r\n\r\n\t\txml.push(\"\");\r\n\t}\r\n\treturn (header||\"\")+\"\"+xml.join(\"\\n\")+\"\";\r\n};\r\n\r\nscheduler._serialize_json_value = function(value){\r\n\tif(value === null || typeof value === \"boolean\"){\r\n\t\tvalue = \"\" + value;\r\n\t}else{\r\n\t\tif(!value && value !== 0){\r\n\t\t\tvalue = \"\";\r\n\t\t}\r\n\t\tvalue = '\"' + value.toString().\r\n\t\t\treplace(/\\n/g,\"\").\r\n\t\t\treplace(/\\\\/g,\"\\\\\\\\\").\r\n\t\t\treplace(/\"/g, '\\\\\"') + '\"';\r\n\t}\r\n\treturn value;\r\n};\r\n\r\n\r\n\r\nscheduler.toJSON = function(){\r\n\treturn JSON.stringify(this.serialize());\r\n};\r\n\r\n\r\nscheduler.toICal = function(header){\r\n\tvar start = \"BEGIN:VCALENDAR\\nVERSION:2.0\\nPRODID:-//dhtmlXScheduler//NONSGML v2.2//EN\\nDESCRIPTION:\";\r\n\tvar end = \"END:VCALENDAR\";\r\n\tvar format = scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\");\r\n\tvar full_day_format = scheduler.date.date_to_str(\"%Y%m%d\");\r\n\r\n\tvar ical = [];\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\r\n\r\n\t\tical.push(\"BEGIN:VEVENT\");\r\n\t\tif (!ev._timed || (!ev.start_date.getHours() && !ev.start_date.getMinutes()))\r\n\t\t\tical.push(\"DTSTART:\"+full_day_format(ev.start_date));\r\n\t\telse\r\n\t\t\tical.push(\"DTSTART:\"+format(ev.start_date));\r\n\t\tif (!ev._timed || (!ev.end_date.getHours() && !ev.end_date.getMinutes()))\r\n\t\t\tical.push(\"DTEND:\"+full_day_format(ev.end_date));\r\n\t\telse\r\n\t\t\tical.push(\"DTEND:\"+format(ev.end_date));\r\n\t\tical.push(\"SUMMARY:\"+ev.text);\r\n\t\tical.push(\"END:VEVENT\");\r\n\t}\r\n\treturn start+(header||\"\")+\"\\n\"+ical.join(\"\\n\")+\"\\n\"+end;\r\n};\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Timeline\", scheduler.assert);\r\n}","import { TooltipManager } from \"./tooltipManager\";\r\n\r\nexport default function (scheduler: any) {\r\n\r\n\tscheduler.config.tooltip_timeout = 30;\r\n\tscheduler.config.tooltip_offset_y = 20;\r\n\tscheduler.config.tooltip_offset_x = 10;\r\n\tscheduler.config.tooltip_hide_timeout = 30;\r\n\r\n\tconst tooltipManager = new TooltipManager(scheduler);\r\n\r\n\tscheduler.ext.tooltips = tooltipManager;\r\n\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function () {\r\n\r\n\t\ttooltipManager.tooltipFor({\r\n\t\t\tselector: \"[\" + scheduler.config.event_attribute + \"]\",\r\n\t\t\thtml: (event: MouseEvent) => {\r\n\t\t\t\tif (scheduler._mobile && !scheduler.config.touch_tooltip) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst targetEventId = scheduler._locate_event(event.target);\r\n\t\t\t\tif (scheduler.getEvent(targetEventId)) {\r\n\t\t\t\t\tconst event = scheduler.getEvent(targetEventId);\r\n\t\t\t\t\treturn scheduler.templates.tooltip_text(event.start_date, event.end_date, event);\r\n\t\t\t\t}\r\n\t\t\t\treturn null;\r\n\t\t\t},\r\n\t\t\tglobal: false\r\n\t\t});\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function () {\r\n\t\ttooltipManager.destructor();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onLightbox\", function () {\r\n\t\ttooltipManager.hideTooltip();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeDrag\", function() {\r\n\t\t// GS-2377: don't hide tooltip on mobile device when ontouchstart event occurs\r\n\t\tif (scheduler._mobile && scheduler.config.touch_tooltip) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\ttooltipManager.hideTooltip();\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function() {\r\n\t\ttooltipManager.hideTooltip();\r\n\t\treturn true;\r\n\t});\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Tree Timeline\", scheduler.assert);\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Units\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\nscheduler._get_url_nav = function(){\r\n\tvar p = {};\r\n\tvar data = (document.location.hash || \"\").replace(\"#\", \"\").split(\",\");\r\n\tfor (var i = 0; i < data.length; i++) {\r\n\t\tvar s = data[i].split(\"=\");\r\n\t\tif (s.length == 2)\r\n\t\t\tp[s[0]] = s[1];\r\n\t}\r\n\treturn p;\r\n};\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function () {\r\n\tvar first = true;\r\n\tvar s2d = scheduler.date.str_to_date(\"%Y-%m-%d\");\r\n\tvar d2s = scheduler.date.date_to_str(\"%Y-%m-%d\");\r\n\tvar select_event = scheduler._get_url_nav().event || null;\r\n\r\n\tscheduler.attachEvent(\"onAfterEventDisplay\", function(ev){\r\n\t\tselect_event = null;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function (om, od, m, d) {\r\n\t\tif (first) {\r\n\t\t\tfirst = false;\r\n\t\t\tvar p = scheduler._get_url_nav();\r\n\r\n\t\t\tif (p.event){\r\n\t\t\t\ttry{\r\n\t\t\t\t\tif(scheduler.getEvent(p.event)){\r\n\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\tshowEvent(p.event);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tvar handler = scheduler.attachEvent(\"onXLE\", function(){\r\n\t\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\t\tshowEvent(p.event);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\tscheduler.detachEvent(handler);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (e){}\r\n\t\t\t}\r\n\r\n\t\t\tif (p.date || p.mode) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthis.setCurrentView((p.date ? s2d(p.date) : null), (p.mode || null));\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\t//assuming that mode is not available anymore\r\n\t\t\t\t\tthis.setCurrentView((p.date ? s2d(p.date) : null), m);\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar values = [\r\n\t\t\t\"date=\" + d2s(d || od),\r\n\t\t\t\"mode=\" + (m || om)\r\n\t\t];\r\n\r\n\t\tif(select_event){\r\n\t\t\tvalues.push(\"event=\" + select_event);\r\n\t\t}\r\n\r\n\t\tvar text = \"#\" + values.join(\",\");\r\n\t\tdocument.location.hash = text;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tfunction showEvent(e){\r\n\t\tif(scheduler.$destroyed){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tselect_event = e;\r\n\t\tif(scheduler.getEvent(e)){\r\n\t\t\tscheduler.showEvent(e);\r\n\t\t}\r\n\t}\r\n});\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Week Agenda\", scheduler.assert);\r\n}","export default function(scheduler){\r\nscheduler.attachEvent(\"onLightBox\",function(){\r\n\tif (this._cover){\r\n\t\ttry{\r\n\t\t\tthis._cover.style.height = this.expanded ? \"100%\" : ((document.body.parentNode||document.body).scrollHeight+\"px\");\r\n\t\t} catch(e) {\r\n\r\n\t\t}\r\n\t}\r\n});\r\n\r\nscheduler.form_blocks.select.set_value=function(node,value,ev){\r\n\tif (typeof value == \"undefined\" || value === \"\")\r\n\t\tvalue = (node.firstChild.options[0]||{}).value;\r\n\tnode.firstChild.value=value||\"\";\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\t// scheduler.config.year_x = 4;\r\n\t// scheduler.config.year_y = 3;\r\n\t// scheduler.xy.year_top = 0;\r\n\r\n\tscheduler.templates.year_date = function(date) {\r\n\t\treturn scheduler.date.date_to_str(scheduler.locale.labels.year_tab + \" %Y\")(date);\r\n\t};\r\n\tscheduler.templates.year_month = scheduler.date.date_to_str(\"%F\");\r\n\tscheduler.templates.year_scale_date = scheduler.date.date_to_str(\"%D\");\r\n\tscheduler.templates.year_tooltip = function(s, e, ev) {\r\n\t\treturn ev.text;\r\n\t};\r\n\r\n\tconst isYearMode = function() {\r\n\t\treturn scheduler._mode == \"year\";\r\n\t};\r\n\t\r\n\tconst getCellDate = function(node){\r\n\t\tvar day = scheduler.$domHelpers.closest(node, \"[data-cell-date]\");\r\n\t\tif(!day || !day.hasAttribute(\"data-cell-date\")) return null;\r\n\t\treturn scheduler.templates.parse_date(day.getAttribute(\"data-cell-date\"));\r\n\t};\r\n\r\n\t// dbl click hook for scheduler._on_dbl_click\r\n\tscheduler.dblclick_dhx_year_grid= function(e) {\r\n\t\tif (isYearMode()) {\r\n\t\t\tconst target = e.target;\r\n\t\t\tif(scheduler.$domHelpers.closest(target, \".dhx_before\") || scheduler.$domHelpers.closest(target, \".dhx_after\")){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tconst date = getCellDate(target);\r\n\t\t\t\r\n\t\t\tif(date){\r\n\t\t\t\tconst start = date;\r\n\t\t\t\tconst end = this.date.add(start, 1, \"day\");\r\n\t\t\t\tif (!this.config.readonly && this.config.dblclick_create){\r\n\t\t\t\t\tthis.addEventNow(start.valueOf(), end.valueOf(), e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\t\r\n\tscheduler.attachEvent(\"onEventIdChange\", function(){\r\n\t\tif (isYearMode())\r\n\t\t\tthis.year_view(true);\r\n\t});\r\n\r\n\r\n\tvar old = scheduler.render_data;\r\n\tscheduler.render_data = function(evs) {\r\n\t\tif (!isYearMode()) return old.apply(this, arguments);\r\n\t\tfor (var i = 0; i < evs.length; i++)\r\n\t\t\tthis._year_render_event(evs[i]);\r\n\t};\r\n\r\n\tvar clear = scheduler.clear_view;\r\n\tscheduler.clear_view = function() {\r\n\t\tif (!isYearMode()) return clear.apply(this, arguments);\r\n\t\tvar dates = scheduler._year_marked_cells,\r\n\t\t\tdiv = null;\r\n\t\tfor (var date in dates) {\r\n\t\t\tif (dates.hasOwnProperty(date)) {\r\n\t\t\t\tdiv = dates[date];\r\n\t\t\t\tdiv.classList.remove(\"dhx_year_event\", \"dhx_cal_datepicker_event\");\r\n\t\t\t\t// div.className = \"dhx_month_head\";\r\n\t\t\t\t// div.removeAttribute(\"date\");\r\n\t\t\t\t// div.removeAttribute(\"data-year-date\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._year_marked_cells = {};\r\n\t};\r\n\r\n\tscheduler._hideToolTip = function() {\r\n\t\tif (this._tooltip) {\r\n\t\t\tthis._tooltip.style.display = \"none\";\r\n\t\t\tthis._tooltip.date = new Date(9999, 1, 1);\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._showToolTip = function(date, pos, e, src) {\r\n\t\tif (this._tooltip) {\r\n\t\t\tif (this._tooltip.date.valueOf() == date.valueOf()) return;\r\n\t\t\tthis._tooltip.innerHTML = \"\";\r\n\t\t} else {\r\n\t\t\tvar t = this._tooltip = document.createElement(\"div\");\r\n\t\t\tt.className = \"dhx_year_tooltip\";\r\n\t\t\tif (this.config.rtl) t.className += \" dhx_tooltip_rtl\";\r\n\t\t\tdocument.body.appendChild(t);\r\n\t\t\tt.addEventListener(\"click\", scheduler._click.dhx_cal_data);\r\n\t\t\tt.addEventListener(\"click\", function(e){\r\n\t\t\t\tif(e.target.closest(`[${scheduler.config.event_attribute}]`)){\r\n\t\t\t\t\tconst id = e.target.closest(`[${scheduler.config.event_attribute}]`).getAttribute(scheduler.config.event_attribute);\r\n\t\t\t\t\tscheduler.showLightbox(id);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\tvar evs = this.getEvents(date, this.date.add(date, 1, \"day\"));\r\n\t\tvar html = \"\";\r\n\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tif(!this.filter_event(ev.id, ev))\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\t\t\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\t\t\thtml += \"
\";\r\n\t\t\thtml += \"
\" + (evs[i]._timed ? this.templates.event_date(evs[i].start_date) : \"\") + \"
\";\r\n\t\t\thtml += \"
 
\";\r\n\t\t\thtml += this.templates.year_tooltip(evs[i].start_date, evs[i].end_date, evs[i]) + \"
\";\r\n\t\t}\r\n\r\n\t\tthis._tooltip.style.display = \"\";\r\n\t\tthis._tooltip.style.top = \"0px\";\r\n\r\n\r\n\t\tif (document.body.offsetWidth - pos.left - this._tooltip.offsetWidth < 0)\r\n\t\t\tthis._tooltip.style.left = pos.left - this._tooltip.offsetWidth + \"px\";\r\n\t\telse\r\n\t\t\tthis._tooltip.style.left = pos.left + src.offsetWidth + \"px\";\r\n\r\n\t\tthis._tooltip.date = date;\r\n\t\tthis._tooltip.innerHTML = html;\r\n\r\n\t\tif (document.body.offsetHeight - pos.top - this._tooltip.offsetHeight < 0)\r\n\t\t\tthis._tooltip.style.top = pos.top - this._tooltip.offsetHeight + src.offsetHeight + \"px\";\r\n\t\telse\r\n\t\t\tthis._tooltip.style.top = pos.top + \"px\";\r\n\t};\r\n\r\n\tscheduler._year_view_tooltip_handler = function(e){\r\n\t\tif (!isYearMode()) return;\r\n\r\n\t\tvar src = e.target || e.srcElement;\r\n\t\tif (src.tagName.toLowerCase() == 'a') // fix for active links extension (it adds links to the date in the cell)\r\n\t\t\tsrc = src.parentNode;\r\n\t\tif (scheduler._getClassName(src).indexOf(\"dhx_year_event\") != -1)\r\n\t\t\tscheduler._showToolTip(scheduler.templates.parse_date(src.getAttribute(\"data-year-date\")), scheduler.$domHelpers.getOffset(src), e, src);\r\n\t\telse\r\n\t\t\tscheduler._hideToolTip();\r\n\t};\r\n\tscheduler._init_year_tooltip = function() {\r\n\t\tscheduler._detachDomEvent(scheduler._els[\"dhx_cal_data\"][0], \"mouseover\", scheduler._year_view_tooltip_handler);\r\n\t\tscheduler.event(scheduler._els[\"dhx_cal_data\"][0], \"mouseover\", scheduler._year_view_tooltip_handler);\r\n\t};\r\n\r\n\tscheduler._get_year_cell = function(d) {\r\n\t\tvar dateString = scheduler.templates.format_date(d);\r\n\t\tvar cells = this.$root.querySelectorAll(`.dhx_cal_data .dhx_cal_datepicker_date[data-cell-date=\"${dateString}\"]`);\r\n\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\tif(!scheduler.$domHelpers.closest(cells[i], \".dhx_after, .dhx_before\")){\r\n\t\t\t\treturn cells[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t};\r\n\r\n\tscheduler._year_marked_cells = {};\r\n\tscheduler._mark_year_date = function(date, event) {\r\n\t\tvar dateString = scheduler.templates.format_date(date);\r\n\t\tvar cell = this._get_year_cell(date);\r\n\t\tif (!cell) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar ev_class = this.templates.event_class(event.start_date, event.end_date, event);\r\n\t\tif (!scheduler._year_marked_cells[dateString]) {\r\n\t\t\tcell.classList.add(\"dhx_year_event\", \"dhx_cal_datepicker_event\");// = \"dhx_month_head dhx_year_event\";\r\n\t\t\tcell.setAttribute(\"data-year-date\", dateString);\r\n\t\t\tcell.setAttribute(\"date\", dateString);\r\n\t\t\tscheduler._year_marked_cells[dateString] = cell;\r\n\t\t}\r\n\t\tif(ev_class){\r\n\t\t\tcell.classList.add(ev_class);\r\n\t\t}\r\n\t};\r\n\tscheduler._unmark_year_date = function(date) {\r\n\t\tvar cell = this._get_year_cell(date);\r\n\t\tif (!cell) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcell.classList.remove(\"dhx_year_event\", \"dhx_cal_datepicker_event\");\r\n//\t\tcell.className = \"dhx_month_head\";\r\n\t};\r\n\tscheduler._year_render_event = function(event) {\r\n\t\tvar date = event.start_date;\r\n\t\tif (date.valueOf() < this._min_date.valueOf()){\r\n\t\t\tdate = this._min_date;\r\n\t\t} else {\r\n\t\t\tdate = this.date.date_part(new Date(date));\r\n\t\t}\r\n\r\n\t\twhile (date < event.end_date) {\r\n\t\t\tthis._mark_year_date(date, event);\r\n\t\t\tdate = this.date.add(date, 1, \"day\");\r\n\t\t\tif (date.valueOf() >= this._max_date.valueOf())\r\n\t\t\t\treturn;\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.year_view = function(mode) {\r\n\r\n\t\tscheduler.set_sizes();\r\n\r\n\t\tscheduler._table_view = mode;\r\n\r\n\t\tif (this._load_mode && this._load()) return;\r\n\r\n\t\tif (mode) {\r\n\t\t\tscheduler._init_year_tooltip();\r\n\t\t\tscheduler._reset_year_scale();\r\n\t\t\tif (scheduler._load_mode && scheduler._load()){\r\n\t\t\t\tscheduler._render_wait = true;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tscheduler.render_view_data();\r\n\t\t} else {\r\n\t\t\tscheduler._hideToolTip();\r\n\t\t}\r\n\t};\r\n\tscheduler._reset_year_scale = function() {\r\n\t\tthis._cols = [];\r\n\t\tthis._colsS = {};\r\n\t\tvar week_starts = []; //start day of first week in each month\r\n\t\tvar dataArea = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tvar c = this.config;\r\n\t\tdataArea.scrollTop = 0; //fix flickering in FF\r\n\t\tdataArea.innerHTML = \"\";\r\n\r\n\t\tvar dy = Math.floor((parseInt(dataArea.style.height) - scheduler.xy.year_top) / c.year_y);\r\n\t\tif (dy < 190) {\r\n\t\t\tdy = 190;\r\n\t\t}\r\n\r\n\t\tvar week_template = document.createElement(\"div\");\r\n\t\tvar dummy_date = this.date.week_start(scheduler._currentDate());\r\n\r\n\t\tthis._process_ignores(dummy_date, 7, \"day\", 1);\r\n\r\n\t\tfor (var i = 0; i < 7; i++) {\r\n\t\t\tif(!(this._ignores && this._ignores[i])) {\r\n\t\t\t\tthis._cols[i] = 'var(--dhx-scheduler-datepicker-cell-size)';\r\n\t\t\t\tthis._render_x_header(i, 0, dummy_date, week_template);\r\n\r\n\t\t\t}\r\n\t\t\tdummy_date = this.date.add(dummy_date, 1, \"day\");\r\n\t\t}\r\n\t\tweek_template.lastChild.className += \" dhx_scale_bar_last\";\r\n\r\n\t\tfor(var i = 0; i < week_template.childNodes.length; i++){\r\n\t\t\tthis._waiAria.yearHeadCell(week_template.childNodes[i]);\r\n\t\t}\r\n\r\n\t\tvar sd = this.date[this._mode + \"_start\"](this.date.copy(this._date));\r\n\t\tvar ssd = sd;\r\n\t\tvar yearBox = null;\r\n\t\tconst wrapper = document.createElement(\"div\");\r\n\t\twrapper.classList.add(\"dhx_year_wrapper\");\r\n\t\tfor (var i = 0; i < c.year_y; i++){\r\n\t\t\tfor (var j = 0; j < c.year_x; j++) {\r\n\t\t\t\tyearBox = document.createElement(\"div\");\r\n\t\t\t\tyearBox.className = \"dhx_year_box\";\r\n\r\n\t\t\t\tyearBox.setAttribute(\"date\", this._helpers.formatDate(sd));\r\n\t\t\t\tyearBox.setAttribute(\"data-month-date\", this._helpers.formatDate(sd));\r\n\t\t\t\tyearBox.innerHTML = \"
\" + week_template.innerHTML + \"
\";\r\n\r\n\t\t\t\tvar header = yearBox.querySelector(\".dhx_year_month\");\r\n\t\t\t\tvar grid = yearBox.querySelector(\".dhx_year_grid\");\r\n\t\t\t\tvar body = yearBox.querySelector(\".dhx_year_body\");\r\n\r\n\t\t\t\tvar headerId = scheduler.uid();\r\n\t\t\t\tthis._waiAria.yearHeader(header, headerId);\r\n\t\t\t\tthis._waiAria.yearGrid(grid, headerId);\r\n\r\n\r\n\t\t\t\theader.innerHTML = this.templates.year_month(sd);\r\n\r\n\r\n\r\n\t\t\t\tvar dd = this.date.week_start(sd);\r\n\t\t\t\tthis._reset_month_scale(body, sd, dd, 6);\r\n\r\n\t\t\t\tvar days = body.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var day = 0; day < days.length; day++){\r\n\t\t\t\t\tthis._waiAria.yearDayCell(days[day]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\twrapper.appendChild(yearBox);\r\n\r\n\t\t\t\tweek_starts[i * c.year_x + j] = (sd.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;\r\n\t\t\t\tsd = this.date.add(sd, 1, \"month\");\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdataArea.appendChild(wrapper);\r\n\r\n\t\tvar dateElement = this._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML = this.templates[this._mode + \"_date\"](ssd, sd, this._mode);\r\n\t\t}\r\n\r\n\t\tthis.week_starts = week_starts;\r\n\t\tweek_starts._month = ssd.getMonth();\r\n\t\tthis._min_date = ssd;\r\n\t\tthis._max_date = sd;\r\n\t};\r\n\r\n\tscheduler._reset_year_scale = function(){\r\n\r\n\t\tvar dataArea = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tdataArea.scrollTop = 0; //fix flickering in FF\r\n\t\tdataArea.innerHTML = \"\";\r\n\r\n\t\tlet yearStart = this.date.year_start(new Date(this._date));\r\n\t\t\r\n\t\tthis._min_date = this.date.week_start(new Date(yearStart));\r\n\r\n\t\tconst wrapper = document.createElement(\"div\");\r\n\t\twrapper.classList.add(\"dhx_year_wrapper\");\r\n\r\n\t\tlet currentDate = yearStart;\r\n\t\tfor(let i = 0; i < 12; i++){\r\n\t\t\tlet yearBox = document.createElement(\"div\");\r\n\t\t\tyearBox.className = \"dhx_year_box\";\r\n\r\n\t\t\tyearBox.setAttribute(\"date\", this._helpers.formatDate(currentDate));\r\n\t\t\tyearBox.setAttribute(\"data-month-date\", this._helpers.formatDate(currentDate));\r\n\t\t\tyearBox.innerHTML = `
${this.templates.year_month(currentDate)}
\r\n\t\t\t
`;\r\n\r\n\t\t\tconst yearGrid = yearBox.querySelector(\".dhx_year_grid\");\r\n\t\t\tconst datepicker = scheduler._createDatePicker(null, {\r\n\t\t\t\tdate: currentDate,\r\n\t\t\t\tminWeeks: 6\r\n\t\t\t});\r\n\t\t\tdatepicker._renderDayGrid(yearGrid);\r\n\t\t\tdatepicker.destructor();\r\n\r\n\t\t\twrapper.appendChild(yearBox);\r\n\r\n\t\t\tcurrentDate = this.date.add(currentDate, 1, \"month\");\r\n\r\n\t\t}\r\n\t\tdataArea.appendChild(wrapper);\r\n\r\n\t\tlet lastDate = this.date.add(yearStart, 1, \"year\");\r\n\t\tif(lastDate.valueOf() != this.date.week_start(new Date(lastDate)).valueOf()){\r\n\t\t\tlastDate = this.date.week_start(new Date(lastDate));\r\n\t\t\tlastDate = this.date.add(lastDate, 1, \"week\");\r\n\t\t}\r\n\t\tthis._max_date = lastDate;\r\n\t\tvar dateElement = this._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML = this.templates[this._mode + \"_date\"](yearStart, lastDate, this._mode);\r\n\t\t}\r\n\t};\r\n\r\n\tvar getActionData = scheduler.getActionData;\r\n\tscheduler.getActionData = function(n_ev) {\r\n\t\tif(!isYearMode()){\r\n\t\t\treturn getActionData.apply(scheduler, arguments);\r\n\t\t}\r\n\t\t\r\n\t\tvar date = getCellDate(n_ev.target);\r\n\t\treturn {\r\n\t\t\tdate:date,\r\n\t\t\tsection:null\r\n\t\t};\r\n\t};\r\n\r\n\tvar locateEvent = scheduler._locate_event;\r\n\tscheduler._locate_event = function(node) {\r\n\t\tvar id = locateEvent.apply(scheduler, arguments);\r\n\t\tif(!id){\r\n\t\t\t\r\n\t\t\tvar date = getCellDate(node);\r\n\t\t\tif(!date) return null;\r\n\t\t\tvar evs = scheduler.getEvents(date, scheduler.date.add(date, 1, \"day\"));\r\n\t\t\tif(!evs.length) return null;\r\n\r\n\t\t\t//can be multiple events in the cell, return any single one\r\n\t\t\tid = evs[0].id;\r\n\t\t}\r\n\t\treturn id;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tscheduler._hideToolTip();\r\n\t});\r\n}","import SchedulerFactory from \"./scheduler_factory\";\r\nimport gplExtensions from \"./ext/extensions_gpl\";\r\n\r\nconst factory = new SchedulerFactory(gplExtensions);\r\n\r\nconst scheduler = factory.getSchedulerInstance();\r\nconst Scheduler = {\r\n\tplugin: scheduler.bind(factory.plugin, factory)\r\n};\r\n\r\nwindow.scheduler = scheduler;\r\nwindow.Scheduler = Scheduler;\r\n\r\nif(!window.$dhx) {\r\n\twindow.$dhx = {};\r\n}\r\n\r\nwindow.$dhx.scheduler = scheduler;\r\nwindow.$dhx.Scheduler = Scheduler;\r\n\r\nexport default scheduler;export { scheduler, Scheduler };","\r\n\r\nimport dhtmlxHook from \"./dhtmlx_hook\";\r\nimport \"./css/theme.less\";\r\ndhtmlxHook();\r\n\r\nimport global from \"./global\";\r\n\r\nimport factoryMethod from \"./scheduler_factory_method\";\r\nimport ExtensionsManager from \"./ext/extension_manager\";\r\n\r\nclass SchedulerFactory {\r\n\r\n\tconstructor (extensions) {\r\n\t\tthis._seed = 0;\r\n\t\tthis._schedulerPlugins = [];\r\n\t\tthis._bundledExtensions = extensions;\r\n\t\tthis._extensionsManager = new ExtensionsManager(extensions);\r\n\t}\r\n\r\n\tplugin(code) {\r\n\t\tthis._schedulerPlugins.push(code);\r\n\r\n\t\tif(global.scheduler){\r\n\t\t\tcode(global.scheduler);\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetSchedulerInstance(initConfig) {\r\n\t\tvar scheduler = factoryMethod(this._extensionsManager);\r\n\r\n\t\tfor (var i = 0; i < this._schedulerPlugins.length; i++) {\r\n\t\t\tthis._schedulerPlugins[i](scheduler);\r\n\t\t}\r\n\t\tscheduler._internal_id = this._seed++;\r\n\t\r\n\t\tif (this.$syncFactory){\r\n\t\t\tthis.$syncFactory(scheduler);\r\n\t\t}\r\n\r\n\t\tif(initConfig){\r\n\t\t\tthis._initFromConfig(scheduler, initConfig);\r\n\t\t}\r\n\r\n\t\treturn scheduler;\r\n\t}\r\n\r\n\t_initFromConfig(scheduler, initConfig){\r\n\t\tif(initConfig.plugins){\r\n\t\t\tscheduler.plugins(initConfig.plugins);\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.config){\r\n\t\t\tscheduler.mixin(scheduler.config, initConfig.config, true);\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.templates){\r\n\t\t\tscheduler.attachEvent(\"onTemplatesReady\", function(){\r\n\t\t\t\tscheduler.mixin(scheduler.templates, initConfig.templates, true);\r\n\t\t\t}, {once: true});\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.events){\r\n\t\t\tfor(const event in initConfig.events){\r\n\t\t\t\tscheduler.attachEvent(event, initConfig.events[event]);\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.locale){\r\n\t\t\tscheduler.i18n.setLocale(initConfig.locale);\r\n\t\t}\r\n\t\r\n\t\tif(Array.isArray(initConfig.calendars)){\r\n\t\t\tinitConfig.calendars.forEach(function(calendar){\r\n\t\t\t\tscheduler.addCalendar(calendar);\r\n\t\t\t});\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.container){\r\n\t\t\tscheduler.init(initConfig.container);\r\n\t\t} else {\r\n\t\t\tscheduler.init();\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.data){\r\n\t\t\tif(typeof initConfig.data === \"string\"){\r\n\t\t\t\tscheduler.load(initConfig.data);\r\n\t\t\t}else{\r\n\t\t\t\tscheduler.parse(initConfig.data);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\r\n}\r\n\r\nexport default SchedulerFactory;"],"names":["global$1","window","global","dragHighlightPos","scheduler","dndMarkers","dragStarted","eventNode","event","isEnabled","config","drag_highlight","markTimespan","checkViewName","viewName","viewObj","getView","layout","createMarkerConfig","configSettings","sectionId","style","top","left","marginLeft","sections","markerObject","start_date","end_date","css","html","date","add","createViewMarker","settings","markerConfigs","monthViewMarkersArray","weekDates","currDate","Date","valueOf","obj","push","week_start","cells","$container","querySelectorAll","event_attribute","id","i","length","cloneNode","unitMarkersArray","sectionPropertyName","y_property","map_to","multisection","formatedSections","String","split","section_delimiter","map","element","elems","columnViewMarkersArray","eventNodes","eventNodeClone","getAttribute","forEach","cfg","attachEvent","mode","e","getEvent","target","closest","getState","cascade_event_display","unselect","getActionData","section","unmarkTimespan","limitPlugin","mark_now","display_marked_timespans","overwrite_marked_timespans","dhx_time_block","default_timespan_type","get_resulting_options","days","zones","options","type","getZones","ev","timespans","day_index","day_value","timespan_type","s","containers","_props","matrix","container","property","view","linker","_add_timespan_zones","_get_blocked_zones","blockTime","addMarkedTimespan","unblockTime","deleteMarkedTimespan","checkInMarkedTimespan","on_overlap","res","temp_start_date","temp_end_date","_marked_timespans","date_part","getDay","eventStart","_get_zone_minutes","eventEnd","getDate","markerStart","markerEnd","checkLimitViolation","check_limits","c","evs","rec_type","_end_date","seriesEnd","limit_start","limit_end","complete_res","p","_timed","isOneDayEvent","allow","_drag_id","_drag_mode","setHours","setMinutes","checkEvent","callEvent","timeline_zones","blocked_timeline_zones","this","_get_relevant_blocked_zones","resultZones","concat","_mark_now","hide","dhx_now_time","_els","now","_currentDate","_remove_mark_now","_max_date","_min_date","getHours","first_hour","last_hour","locate_holder_day","_append_mark_now","zone_start","_table_view","_mode","start_index","end_index","units_l","size","position","r_divs","t_day","t_div","_render_marked_timespan","els","div","parent","parentNode","removeChild","getMinutes","_prepare_timespan_options","r_configs","temp_configs","Array","t_days","slice","cloned_config","_lame_clone","apply","invert_zones","invertZones","uid","view_key","hasOwnProperty","ids","t_config","_lame_copy","k","c_config","t_sd","t_ed","zone_end","_get_dates_by_index","index","start","end","dates","start_day","delta","t_date","_get_css_classes_by_config","css_classes","join","_get_block_by_config","block","document","createElement","innerHTML","appendChild","area","day","blocks","min_date","max_date","date_to_display","min_day","areas","d","_scales","sday","_cols","_ignores","block_proto","className","height","width","order","inner_index","locate_holder","Math","max","min","all_hours_height","hour_size_px","hour_ms","round","_mark_timespans","data","divs","_on_scale_add_marker","len","childNodes","firstChild","_getClassName","indexOf","configuration","Error","rebuild_els","get_elements","timespans_ids","_marked_timespans_ids","timespan_types","_marked_timespans_types","_addMarkerTimespanConfig","unit_id","timespans_view","day_configs","_array","configs","current_zones","resulting_zones","c_zone_start","c_zone_end","isLast","offset","splice","_subtract_timespan_zones","is_modified","_","_delete_marked_timespan_by_id","parent_array","_delete_marked_timespan_by_config","viewspans","_delete_marked_timespans_list","dayConfig","day_timespans","d_t","related_zones","arguments","undefined","types","t","typedConfig","_get_types_to_render","common","specific","types_to_render","_get_configs_to_render","units","unit","_get_unit_index","day_ind","unitsPerDay","floor","_date","key","unit_zones","unit_types","global_data","day_types","dblclick_dhx_marked_timespan","src","dblclick_create","addEventNow","createMethod","methods","isActive","disableMethod","methodName","dummyMethod","restoreMethod","disableMethods","methodsHash","call","restoreMethods","batchUpdatePayload","callback","console","error","$stateProvider","registerProvider","batch_update","noRedraw","dp_mode","call_dp","_dp","updateMode","setUpdateMode","calls","setModeDate","needRender","needUpdateView","repaintEvents","rememberModeDate","render","setCurrentView","updateView","render_data","render_view_data","updateEvent","sendData","initPlugins","deletedEvent","copy","undo_deleted","new_event","message","text","expire","addEvent","limit","batchUpdate","uidSeed","isDate","getFullYear","getMonth","utils","mixin","source","force","f","object","result","isArray","pop","Function","prototype","toString","constructor","Number","Boolean","varType","Object","defined","delay","timeout","timer","$cancelTimeout","$pending","args","setTimeout","clearTimeout","$execute","extend","cssClass","classList","itemTypes","rows_container","row","setAttribute","fix_tab_position","$firstTab","$lastTab","$segmentedTab","button","builtInButton","spacer","minicalendarButton","minicalendarDiv","click","$_eventAttached","isCalendarVisible","destroyCalendar","renderCalendar","navigation","handler","calendar","html_element","renderElement","renderer","rows","cols","value","align","justifyContent","prepareConfig","renderLayout","items","fragment","createDocumentFragment","next","_init_nav_bar","navBar","querySelector","_update_nav_bar","previousHeight","heightChanged","newHeight","xy","nav_height","unset_actions","set_actions","display","isAttachedNode","root","body","getWindowSize","w","innerWidth","documentElement","clientWidth","h","innerHeight","clientHeight","listenWindowResize","resizeDelay","oldSize","$destroyed","a","b","newSize","triggerSchedulerResize","$root","getComputedStyle","getPropertyValue","resizeWatcher","tabIndex","wai_aria_attributes","offsetHeight","previousWidth","offsetWidth","lowlevelResizeWatcher","contentWindow","EventHost","_silent_mode","listeners","_silentStart","createEventStorage","handlers","eventStorage","combinedResult","handlerResult","handlerId","once","originalHandler","removeEvent","clear","makeEventable","eventHost","eventName","toLowerCase","thisObject","bind","attachAll","name","eventArguments","handlerName","detachEvent","list","eventId","detachAllEvents","defaultDomEvents","el","addEventListener","eventRemove","removeEventListener","domEvents","eventScope","attach","capture","detach","detachAll","staticArray","_eventRemoveAll","_createDomEventScope","_trim","str","trim","replace","_isDate","_isObject","getClassName","node","baseVal","locateCss","classname","strict","trg","srcElement","ind","charAt","right","isVisible","visibility","currentStyle","hiddenSection","recurringSection","hasNonNegativeTabIndex","isNaN","hasHref","nodeName","loLowerCase","input","select","textarea","hasAttribute","isShadowDomSupported","head","createShadowRoot","attachShadow","getRootNode","ShadowRoot","host","dom_helpers","getAbsoluteLeft","htmlObject","getOffset","getAbsoluteTop","getOffsetSum","elem","parseInt","offsetTop","offsetLeft","offsetParent","getOffsetRect","box","getBoundingClientRect","test","navigator","userAgent","dummy","dummyBox","docElem","scrollTop","pageYOffset","scrollLeft","pageXOffset","clientTop","clientLeft","selector","insertAfter","newNode","referenceNode","nextSibling","insertBefore","remove","isChildOf","child","contains","getFocusableNodes","nodes","nodesArray","$position","sort","hasShadowParent","getActiveElement","activeElement","shadowRoot","getSelection","focusNode","getRelativeEventPosition","bottom","y","x","clientX","clientY","getTargetNode","tagName","composedPath","getNodePosition","Element","matches","msMatchesSelector","webkitMatchesSelector","parentElement","nodeType","isWindowAwailable","env","isIE","isOpera","isChrome","isKHTML","isFF","isIPad","search","isEdge","isNode","serialize$1","serialized","encodeURIComponent","JSON","stringify","generateStringToDate","format","utc","splt","mask","match","code","csp_str_to_date","set","temp","locale","month_short_hash","month_full_hash","UTC","cspEnabled","useCsp","csp","init","month_short","month_full","old","setSeconds","setMilliseconds","setTime","getTime","time_part","getTimezoneOffset","shift","start_on_monday","month_start","setDate","year_start","setMonth","day_start","_add_days","inc","ndate","rest","hours","setYear","to_fixed","num","date_to_str","getUTCDate","getUTCMonth","getUTCFullYear","day_short","getUTCDay","day_full","getUTCHours","getUTCMinutes","getUTCSeconds","getSeconds","getUTCISOWeek","getISOWeek","str_to_date","exactFormat","stringToDateMethod","parseExactFormat","yyyyMMddhhIIss","MMddyyyyhhIIss","ddMMyyyyhhIIss","ISO8601","parseYMD","parseMDY","parseDMY","dateString","parse_exact_format","datestr","nday","first_thursday","year_number","ordinal_date","convert_to_utc","getSerializator","_events","_loaded","_load","url","from","_load_url","to","prevent_cache","_load_mode","lf","templates","load_format","cache_line","temp_to","ajax","get","ajaxCallback","response","on_load","_parsers","xml","canParse","xhr","responseXML","xmlDoc","parse","responseText","topElement","xmltop","loader","csrfToken","dhtmlx","security_key","opts","xpath","arr","serverList","itms","j","attrs","attributes","label","attr","nodeValue","ud","udx","_xmlNodeToJSON","_userdata","_init_event","json","err","events","dhx_security","collections","collections_loaded","collection","option","option_key","ical","RegExp","c_start","c_end","incoming","event_r","e_start","e_end","exec","param","param_r","parse_param","substr","parse_date","dh","dm","utcMark","dy","dn","dd","server_utc","foundParser","parser","_process","status","_process_loading","_loading","_not_render","_render_wait","_after_call","_tagvalue","_init_date","_helpers","parseDate","getSerializableData","createSerializator","serialize","dataset","allEvents","exportedEvent","exportValue","rawValue","xml_format","format_date","load","setLoadMode","array","show_loading","_x","_y","_obj","_init_touch_events","touch","MSStream","platform","maxTouchPoints","scroll_width","_mobile","touchEventsSupported","createEvent","_touch_events","touches","pageX","pageY","PointerEvent","pointerEnabled","pointerType","msPointerEnabled","MSPOINTER_TYPE_MOUSE","names","accessor","ignore","tracker","drag_mode","scroll_mode","action_mode","dblclicktime","attachTouchEvent","_is_lightbox_open","passive","drag_cancel","_hide_global_tip","_on_mouse_up","_temp_touch_block","_drag_pos","_pointerDragId","acc","dnd","timeline","original_render","drag_id","getEvents","_sorder","_count","_on_mouse_move","preventDefault","cancelBubble","_update_global_tip","abs","fake_event","pointerId","_click","dhx_cal_data","_on_dbl_click","_block_next_stop","touch_drag","actTask","_locate_event","fakeTask","sourceTask","_ignore_next_click","previousSibling","_on_mouse_down","for_rendered","_rendered","touch_tip","_show_global_tip","touch_swipe_dates","s_ev","e_ev","step","max_dy","scrollable","dx","dhx_cal_next_button","dhx_cal_prev_button","toptip","_global_tip","time","event_header","day_date","labels","drag_to_create","drag_to_move","calculatedMaterial","cachedBorderBoxValue","checkIfBorderBoxStyling","_is_material_skin","probe","boxSizing","refreshAfterLoad","_border_box_events","oldStyling","flatSkinHourScale","_addThemeClass","skin","_skin_settings","use_select_menu_space","wide_form","displayed_event_color","displayed_event_text_color","_skin_xy","lightbox_additional_height","bar_height","_build_skin_info","clearInterval","monitorIntervalId","setInterval","csstheme","setSkin","monitorThemeChange","styles","themeVar","themeName","isCssVarTheme","cssValues","oldMaterialTheme","links","getElementsByTagName","href","_theme_info","theme","cssVarTheme","values","themeVariables","_configure","col","_skin_init","hour_scale","hour_date","_old_month_day","month_day","old_month_day","dhx_cal_today_button","tab","header","tabs","specialTabs","tabName","find","filter","firstTab","reverse","DataProcessorEvents","dp","$scheduler","$dp","_dataProcessorHandlers","_validId","setUpdated","z","_new_event","_in_progress","_invalid","updatedRows","_waitMode","_update_callback","upd","setUserData","action_param","deleteEvent","_add_rec_marker","DataProcessor","serverProcessorURL","serverProcessor","autoUpdate","_tMode","_headers","_payload","post_delim","messages","updated","inserted","deleted","invalid","invalid_cell","enableUTFencoding","eventable","boxAttribute","_dhx_msg_cfg","usercall","modalBox","modal_key","which","keyCode","messageBox","keyboard","domHelpers","modality","cover","classValue","buttonAriaAttrs","_waiAria","messageButtonAttrString","getFirstDefined","_createBox","ok","cancel","contentId","messageModalAttr","inner","title","content","message_ok","message_cancel","buttons","btn","getElementById","hidden","focus","alertPopup","confirmPopup","boxPopup","box_params","params","focusable","messageInfoAttr","timers","pull","seed","hideAll","popups","alert","confirm","modalbox","setTransactionMode","total","headers","payload","_tSend","_endnm","_serializeAsJson","_router","router","escape","_utf","setDataColumns","val","_columns","getSyncState","enableDataNames","enablePartialDataSend","_changed","master","rowId","state","findRow","existing","getUserData","set_invalid","is_invalid","markRow","_methods","details","getActionByState","checkBeforeUpdate","editStop","sendAllData","_beforeSendData","_getRowData","_sendData","_serializeAsJSON","serialize_one","stack","keys","pref","_applyPayload","urlSeparator","dataToSend","self","queryParams","afterUpdate","urlParams","_user","_cleanupArgumentsBeforeSend","method","preprocessedData","_cleanupItemBeforeSend","action","query","_onResolvedCreateUpdate","tag","resultState","setRequestHeader","sid","tid","afterUpdateCallback","routerMode","actionPromise","create","delete","update","then","catch","valid","_forEachUpdatedRow","_getAllData","out","has_one","pattern","defineAction","_uActions","btag","marker","correct","originalSid","_errorResponse","cleanUpdate","_setDefaultTransactionMode","_serverProcessor","that","finalizeUpdate","atag","_initialized","_dp_init","_is_virtual_event","_set_event_text_style","r","cssText","event_updated","rec_pattern","_dp_change_event_id","new_id","changeEventId","_dp_hook_delete","setDp","dataProcessorEvents","_dataprocessor","setOnAfterUpdate","setOnBeforeUpdateHandler","func","setAutoUpdate","interval","user","_need_update","_update_busy","xml_node","afterAutoUpdate","fullSync","intervalId","loadUpdate","getUpdates","_getXmlNodeValue","version","vers","updates","destructor","processedData","updatedItem","output","item","processedItem","prop","formatDate","_prepareItemForJson","_prepareItemForForm","_prepareDataItem","dataItem","ar","day_tab","week_tab","month_tab","icon_save","icon_cancel","icon_details","icon_edit","icon_delete","confirm_closing","confirm_deleting","section_description","section_time","full_day","confirm_recurring","section_recurring","button_recurring","button_recurring_open","button_edit_series","button_edit_occurrence","grid_tab","prev","year","month","hour","minute","repeat_radio_day","repeat_radio_week","repeat_radio_month","repeat_radio_year","repeat_radio_day_type","repeat_text_day_count","repeat_radio_day_type2","repeat_week","repeat_text_week_count","repeat_radio_month_type","repeat_radio_month_start","repeat_text_month_day","repeat_text_month_count","repeat_text_month_count2_before","repeat_text_month_count2_after","repeat_year_label","select_year_day2","repeat_text_year_day","select_year_month","repeat_radio_end","repeat_text_occurences_count","repeat_radio_end2","repeat_radio_end3","repeat_never","repeat_daily","repeat_workdays","repeat_weekly","repeat_monthly","repeat_yearly","repeat_custom","repeat_freq_day","repeat_freq_week","repeat_freq_month","repeat_freq_year","repeat_on_date","repeat_ends","month_for_recurring","day_for_recurring","be","agenda_tab","description","year_tab","week_agenda_tab","ca","cn","cs","da","de","en","es","fi","fr","he","hu","it","jp","LocaleManager","_locales","nb","nl","no","pl","pt","ro","ru","si","sk","sv","tr","ua","DatePicker","modes","currentRange","eventDates","currentModeIndex","onStateChangeHandlers","_domEvents","onStateChange","oldState","newState","_notifyStateChange","direction","newDate","setFullYear","setState","newIndex","backwardArrow","monthLabel","innerText","toLocaleString","startYear","_toggleMode","forwardArrow","_adjustDate","_renderCalendarHeader","dataContainer","_renderDayGrid","_renderMonthGrid","_renderYearGrid","daysOfWeekContainer","currentDate","maxDate","labelFormat","dayElement","weeks","currWeek","minWeeks","minSchedulerDate","maxSchedulerDate","eventDaysTable","reduce","_renderDayGridHeader","firstDate","monthStart","monthEnd","lastDate","currentCalDate","_weeksBetween","dayGridContainer","dateCell","wrapper","months","formatLabel","monthElement","doneArea","doneBtn","yearElement","factoryMethod","extensionManager","stateProviders","internal","provider","unregisterProvider","commonViews","agenda","grid","week_agenda","anythingElse","requiredExtensions","_commonErrorMessages","unknownView","relatedExtension","collapsedContainer","createTimelineView","createUnitsView","createGridView","exportToPNG","exportToPDF","nav_bar","_detachDomEvent","_init_once","scheduler_resize_listener","hasSchedulerMarkup","wai_aria_application_role","views","_grid","log","rtl","_scroll","init_templates","set_sizes","$initialized","min_event_height","scale_width","scale_height","month_scale_height","menu_width","margin_top","margin_left","editor_width","month_head_height","event_header_height","edit_save","edit_cancel","functor","scale_x","materialScalePlaceholder","set_xy","_lightbox","_setLbPosition","_data_width","prepareValue","prepared","class_name","attr_value","labelAttr","domEventsScope","getDaysDifference","startDate","endDate","differenceInDays","_select_id","_close_not_saved","previousSelection","editor_id","_edit_id","lightbox_id","_lightbox_id","select_id","expanded","readonly","icon","def_step","dhx_cal_tab","deprecated_name","substring","_dhtmlx_confirm","title_confirm_deleting","edit","save","showLightbox","form","base","duration","event_duration","time_step","start_hour","_drag_event","details_on_dblclick","viewHandler","_get_column_index","x_pos","column","_week_indexes_from_pos","pos","ceil","_mouse_coords","$env","_colsS","$domHelpers","dataArea","heights","_ignores_detected","preserve_length","_event_length","_get_real_event_length","x_step","x_unit","timestamp","confirmationText","title_confirm_closing","positive_closing","_correct_shift","back","_is_pos_changed","old_pos","new_pos","diff","old_val","new_val","has_moved","_correct_drag_start_date","_start_correction","_end_correction","_get_fictional_event_length","_correct_drag_end_date","mousedownPos","_get_date_from_pos","_drag_start","fields","timeStep","custom","_dragEventBody","_move_event_shift","resize_date","_drag_from_start","resize_from_start","end_day_start","end_day_date","firstHour","maxY","precisePos","minDate","preciseDate","cursor","new_end","new_start","limit_drag_out","all_timed","_get_section_view","_get_event_sday","_allow_dnd","update_render","sx","update_view","drag_event_body","_get_private_properties","_clear_temporary_properties","clean","flagged_event","initial","current_state","moved","_dhx_changed","is_new","edit_on_create","details_on_create","_trigger_dyn_loading","_reset_ignores","_reset_scale","isViewExists","_set_aria_buttons_attrs","buttonGroups","group","headerButtonsAttributes","icon_form","oldClass","newClass","multidayScroll","dhx_multi_day","prev_scroll","preserve_scroll","_dy_shift","headerToggleState","_render_x_header","offset_top","left_border","columnHeaderText","dayHeaderAttr","_get_columns_num","count","count_n","_get_timeunit_start","_get_view_end","ed","_calc_scale_sizes","summ","_process_ignores","realcount","_set_scale_col_size","_render_scales","data_area","sd","today","scales","cls","firstHalf","slotDate","htmlContent","time_slot_text","time_slot_class","secondHalf","week_date_class","dayColumnAttr","_getNavDateElement","drag_resize","drag_move","navBarDateStr","scaleElement","navBarDateAttr","_reset_month_scale","_reset_hours_scale","multi_day","c1","totalWidth","col_length","hiddenWidth","c2","cc","hourScaleAttr","scroll_hour","now_date","n","preserve","ign_date","_render_month_scale","view_start","cd","tdwidths","cell_width","getCellHeight","cellheight","table","cell","month_date_class","body_class","head_class","monthCellAttr","cellHead","cellBody","bf1","getLabel","lightbox","updateCollection","list_name","resetLightbox","hideCover","cache","n_ev","_focus","endColumnIndex","eventLength","startColumnIndex","_get_date_index","last_column","check","excludedDuration","intervalStart","intervalEnd","leftCellCutOffStart","leftCellCutOffEnd","rightCellCutOffStart","rightCellCutOffEnd","ev_length","dir","per_day","end_slot","fd","start_slot","_get_section_property","_is_initialized","htmlTags","extraSpaces","stripHTMLLite","htmlText","singleQuotes","escapeQuotes","getAttributeString","setAttributes","role","getHeaderCellAttr","eventAttr","_eventCommonAttr","event_text","$dataprocessor_class","setEventBarAttr","_getAttributes","attributeSetter","arg","eventBarAttrString","agendaHeadAttrString","agendaHeadDateString","agendaHeadDescriptionString","agendaDataAttrString","agendaEventAttrString","agendaDetailsBtnString","gridAttrString","gridRowAttrString","gridCellAttrString","mapAttrString","mapRowAttrString","mapDetailsBtnString","minicalHeader","headerId","minicalGrid","minicalRow","minicalDayCell","selected","minicalHeadCell","weekAgendaDayCell","weekAgendaEvent","lightboxHiddenAttr","lightboxVisibleAttr","lightboxSectionButtonAttrString","tabindex","yearHeader","yearGrid","yearHeadCell","yearRow","yearDayCell","lightboxAttr","lightboxButtonAttrString","buttonName","eventMenuAttrString","iconName","lightboxHeader","headerText","lightboxSelectAttrString","time_option","buttonLabel","quickInfoAttr","quickInfoHeaderAttrString","quickInfoHeader","quickInfoButtonAttrString","tooltipAttr","tooltipVisibleAttr","tooltipHiddenAttr","dom","assert","show_errors","_createDatePicker","_getFocusableNodes","_locate_css","messageApi","$","counter","Promise","clearAll","createConfig","async","serializeRequestParams","DOMParser","ActiveXObject","loadXML","parseFromString","tagname","xpathExp","docObj","selectNodes","first","ownerDocument","evaluate","XPathResult","ANY_TYPE","iterateNext","_call","onLoad","getSync","put","postData","del","post","postSync","resolve","reject","XMLHttpRequest","isQt","readyState","filePath","open","toUpperCase","send","$ajax","default_date","month_date","load_date","week_date","date_format","api_date","day_column_padding","drag_create","resize_month_events","resize_month_timed","responsive_lightbox","separate_short_events","cascade_event_count","cascade_event_margin","multi_day_height_limit","drag_lightbox","quick_info_detached","icons_edit","icons_select","buttons_left","buttons_right","highlight_displayed_event","ajax_error","delay_render","timeline_swap_resize","$initial","xml_date","d1","d2","day_scale_date","month_scale_date","week_scale_date","time_picker","event_date","event_class","event_bar_date","event_bar_text","month_events_link","drag_marker_class","drag_marker_content","tooltip_date_format","tooltip_text","calendar_month","calendar_scale_date","calendar_date","calendar_time","clear_view","extra_data","silent","setEvent","hash","create_getter","create_setter","is_visible_events","clear_event","evFirstHour","evLastHour","lastHour","checkEndDate","get_visible_events","only_timed","filter_event","_is_main_area_event","hold","full","_recalculate_timed","tvs","tvd","_rendered_location","buffer","renderedLocation","_view_month_day","_render_month_link","toRender","_sday","_eday","curr","_sweek","_get_event_bar_pos","widt","x2","_pre_render_events","render_event_bar","max_evs","max_month_events","real","render_event","_get_first_visible_cell","hb","h_old","_pre_render_events_table","_pre_render_events_line","monthRows","cellHeight","cHeight","unshift","scrollHeight","scroll_fix","scale_settings","sum_width","row_heights","full_multi_day_height","used_multi_day_height","used_multi_day_height_css","multi_day_section","multi_day_icon","overflowY","datePart","_get_event_mapped_end_date","ev_duration","_min_mapped_duration","evs_originals","sh","eh","_inner","t_ev","slot_index","sorderSet","_is_sorder","_max_sorder","max_count","_copy_event","_time_order","_is_any_multiday_cell_visible","isAnyCellVisible","checkDate","noCells","lastDayEnd","weekCellIndex","chunks_info","first_chunk","last_chunk","chunk_info","locate_s","locate_e","_length","stack_line","_first_chunk","_last_chunk","_copy_dummy","_y_from_date","sm","_calc_event_y","min_height","em","parentWidth","menu","menu_offset","pos_y","ev_count","ev_sorder","margin","_render_v_bar","_text_style","zIndex","color","setProperty","tplClass","_editor","shiftKey","ariaAttr","icons","icons_str","currentIcon","textColor","highlightEventPosition","contentA","contentB","cse","boxWidth","renderEvent","inner_html","footer_class","_drag_resize","past","_get_dnd_order","ev_height","max_height","_orig_sorder","evTop","columns","y_event_offset","resize_handle","resizable","left_chunk","right_chunk","resize_left","resize_right","timed","bg_color","style_text","_edit_stop_event","getRenderedEvent","rendered_events","rendered_event","showEvent","original_color","original_text_color","getSectionTop","posFromDate","_smartRenderingEnabled","restoreOriginalColors","scrollTo","_append_drag_marker","m","scale","lastChild","_update_marker_position","getLightboxRoot","cspEnvironment","salesforceEnvironment","_lightbox_controls","formSection","getLightbox","getValue","form_blocks","get_value","setValue","set_value","get_template_control","control","get_select_control","get_textarea_control","get_time_control","defaults","template","sns","placeholder","_get_input","_dhx_onchange","onchange","time_format","_time_format_order","dt","last","limit_time_select","selectBoxClass","range","start_year","end_year","year_range","tdate","_time_values","ariaAttrs","_full_day","checked","disabled","_fill_lightbox_select","auto_end_date","_update_lightbox_select","time_values","direct_value","fixed_value","value_found","t_v","selectedIndex","original","showCover","show_cover","_cover","_fill_lightbox","lightbox_header","headerContent","headerDate","headerTitle","current_sns","_get_lightbox_section_node","default_value","_lightbox_out","_empty_lightbox","hide_lightbox","endLightbox","hide_cover","_move_while_dnd","_finish_dnd","save_lightbox","startLightbox","_custom_lightbox","_temp_lightbox","cancel_lightbox","hideLightbox","_init_lightbox_events","buttonTarget","sectionButton","button_click","readonly_active","setLightboxSize","_init_dnd_events","_dnd_start_lb","dhx_unselectable","lb","_lb_start","_ready_to_dnd","recurring","_lightbox_template","label_name","ds","t_ds","_bindLightboxLabels","inputBlock","fallback","inputId","old_id","getRootView","hooks","didInsert","cmp","skins","jQuery","fn","dhx_scheduler","each","Scheduler","getSchedulerInstance","comp","update_view_timer","curr_view_timer","lazy_setCurrentView","oldDate","oldMode","updateFlags","lazy_updateView","ars","createDataProcessor","tMode","dhtmlxError","catchError","i18n","addLocale","setLocale","localeObject","getLocale","dhx_save_btn","dhx_cancel_btn","dhx_delete_btn","addPlugins","ext","activePlugins","plugins","extensionList","dependencies","priorities","extension","dep","dependencyName","orderA","orderB","treetimeline","daytimeline","outerdrag","legacy","plugin","getExtension","ExtensionsManager","_extensions","attaches","attachScheduler","_genStr","attachObject","vs","av","sched","schedId","setSizes","_viewRestore","notImplemented","modals","modalsStack","isModal","afterPopup","trapFocus","currentTarget","$keyboardNavigation","_keyNavMessagePopup","focusElement","backupFocus","key_nav_legacy","_temp_key_scope","key_nav","_pasteDate","_pasteSection","isCopy","trackMousePosition","mousePointer","keyNavPointer","elementFromPoint","dispatcher","copyEvent","_make_pasted_event","event_pid","event_length","isMultisectionEvent","_do_paste","is_copy","modified_ev","original_ev","_is_key_nav_active","ctrlKey","metaKey","_buffer_event","_key_nav_copy_paste","getActiveNode","new_ev","scheduler_handlers","attachSchedulerHandlers","waitCall","keyDownHandler","focusHandler","keepScrollPosition","focusGlobalNode","enable","reFocusActiveNode","activeNode","isValid","MinicalButton","MinicalCell","mousedownHandler","dataAreaClick","listOfScales","some","Event","TimeSlot","nextSlot","setActiveNode","removeAttribute","evNode","prevState","lastStart","lastEnd","lastSection","getNode","GoogleMapAdapter","_markers","zoom","zoom_after_resolve","initial_zoom","lat","lng","setCenter","setZoom","error_position","google","maps","trigger","mapOptions","center","initial_position","mapId","scrollwheel","mapTypeId","Map","__gm","messageOverlay","outerContainer","setOptions","addListener","geocoder","Geocoder","point","latLng","geocode","results","GeocoderStatus","OK","geometry","location","event_location","formatted_address","clearInstanceListeners","AdvancedMarkerElement","importLibrary","mapView","createMarker","setMap","infoWindow","close","InfoWindow","maxWidth","info_window_max_width","setContent","map_info_content","anchor","markerInfo","setVisible","setPosition","latlng","LatLng","latitude","longitude","string","address","OpenStreetMapAdapter","openPopup","closeTooltip","setView","mapWrapper","L","tileLayer","addTo","on","fetch","country","myIcon","iconUrl","iconSize","shadowSize","iconAnchor","shadowAnchor","popupConfig","minWidth","markerPopup","popup","tooltip","markerConfig","bindPopup","bindTooltip","removeLayer","setLatLng","lon","MapboxAdapter","getPopup","isOpen","togglePopup","mapboxgl","accessToken","lngLat","features","place_name","Popup","focusAfterOpen","setMaxWidth","setHTML","Marker","setLngLat","setPopup","ALL_WEEKDAYS","Weekday","weekday","fromStr","nth","equals","other","getJsWeekday","isPresent","isNumber","isWeekdayStr","includes","rang","repeat","times","padStart","targetLength","padString","sep","splits","pymod","divmod","mod","empty","notEmpty","datetime","MONTH_DAYS","ONE_DAY","MAXYEAR","ORDINAL_BASE","PY_WEEKDAYS","isLeapYear","isValidDate","toOrdinal","date2","differencems","fromOrdinal","ordinal","getMonthDays","getWeekday","monthRange","combine","getMilliseconds","clone","cloneDates","clones","timeToUntilString","untilStringToDate","until","bits","dateTZtoISO8601","timeZone","IterResult","_result","before","after","accept","tooEarly","tooLate","extendStatics","setPrototypeOf","__proto__","__extends","TypeError","__","__assign","assign","__spreadArray","pack","l","Frequency","CallbackIterResult","_super","iterator","_this","ENGLISH","dayNames","monthNames","tokens","SKIP","number","numberAsText","every","at","the","second","third","for","monday","tuesday","wednesday","thursday","friday","saturday","sunday","january","february","march","april","may","june","july","august","september","october","november","december","comma","defaultGetText","defaultDateFormatter","ToText","rrule","gettext","language","dateFormatter","origOptions","bymonthday","bynmonthday","byweekday","allWeeks","someWeeks","isWeekdays","isEveryDay","sortWeekDays","isFullyConvertible","freq","IMPLEMENTED","RRule","FREQUENCIES","plural","HOURLY","MINUTELY","DAILY","bymonth","_bymonth","_bymonthday","_byweekday","byhour","_byhour","WEEKLY","MONTHLY","YEARLY","byyearday","byweekno","weekdaytext","monthtext","npos","wday","finalDelim","delim","o","realCallback","delimiter","finalDelimiter","Parser","rules","done","nextSymbol","isDone","symbol","best","bestSymbol","name_1","v","acceptNumber","expect","parseText","ttr","AT","F","MO","TU","WE","TH","FR","ON","wkd","decodeWKD","decodeNTH","decodeM","freqIsDailyOrGreater","fromText","Time","millisecond","DateTime","fromDate","getYear","addYears","years","addMonths","yearDiv","monthMod","addWeekly","wkst","fixDay","addDaily","addHours","filtered","_a","dayDiv","hourMod","addMinutes","minutes","byminute","hourDiv","minuteMod","addSeconds","seconds","bysecond","minuteDiv","secondMod","daysinmonth","SECONDLY","initializeOptions","_i","keys_1","defaultKeys","parseOptions","DEFAULT_OPTIONS","byeaster","dtstart","bysetpos","bynweekday","parsedOptions","parseString","rfcString","parseLine","parseDtstart","line","dtstartWithZone","tzid","parseRrule","Days","parseIndividualNumber","optionKey","parts","SyntaxError","wdaypart","DateWithZone","RangeError","defineProperty","enumerable","configurable","isUTC","rezonedDate","localTimeZone","Intl","DateTimeFormat","resolvedOptions","dateInLocalTZ","tzOffset","optionsToString","outValue","buildDtstart","strValues","ruleString","argsMatch","Cache","all","between","_cacheAdd","what","_value","_cacheGet","cached","argsKeys","findCacheDiff","cachedObject","iterResult","M365MASK","M366MASK","M28","M29","M30","M31","MDAY366MASK","MDAY365MASK","NM28","NM29","NM30","NM31","NMDAY366MASK","NMDAY365MASK","M366RANGE","M365RANGE","WDAYMASK","wdaymask","rebuildYear","firstwkst","wyearlen","firstyday","yearlen","nextyearlen","yearordinal","yearweekday","mmask","mdaymask","nmdaymask","mrange","wnomask","no1wkst","numweeks","lnumweeks","lyearweekday","lno1wkst","lyearlen","weekst","Iterinfo","rebuild","lastyear","yearinfo","lastmonth","monthinfo","nwdaymask","ranges","eastermask","g","yearStart","ydayset","mdayset","wdayset","ddayset","htimeset","mtimeset","stimeset","getdayset","gettimeset","buildPoslist","timeset","ii","dayset","poslist","daypos","timepos","tmp","iter","emitResult","counterDate","millisecondModulo","removeFilteredDays","rezoneIfNeeded","currentDay","isFiltered","dayCounter","SA","SU","noCache","_cache","fromString","_iter","toText","isFullyConvertibleToText","unfold","forceset","compatible","parseInput","rrulevals","rdatevals","exrulevals","exdatevals","parsedDtstart","lines","_b","parms","rdateTzid","parseRDate","rrulestr","rset_1","RRuleSet","groomRruleOptions","rdate","exrule","exdate","rdateval","parm","createGetterSetter","fieldName","field","_rrule","field_1","_rdate","_exrule","_exdate","_exdateHash","_accept","evalExdate","zonedDate","_addRule","_addDate","rrules","exrules","rdates","exdates","_dtstart","rdatesToString","rrs","rule","Tooltip","_scheduler","_tooltipNode","_root","_isLikeMouseEvent","_calculateTooltipPosition","viewport","_getViewPortSize","tooltipNode","offsetX","tooltip_offset_x","offsetY","tooltip_offset_y","mouse","containerPos","scrollY","_getViewPort","scrollX","$event_data","$event","TooltipManager","_listeners","_initDelayedFunctions","delayHide","watchableTarget","eventTarget","targetNode","doOnMouseEnter","onmouseenter","touch_tooltip","onmouseleave","onmousemove","listener","cloneDomEvent","delayShow","utils.default","show","tooltip_timeout","tooltip_hide_timeout","gplExtensions","active_links","active_link_view","_active_link_click","s_d","do_wrapper","fullname","week_x","d_s","agenda_legacy","add_agenda_legacy","agenda_legacy_time","agenda_legacy_text","agenda_legacy_date","agenda_legacy_start","old_dblclick_dhx_cal_data","dblclick_dhx_cal_data","fill_agenda_tab","old_render_view_data","ev_class","agendaDetailsButtonAttr","agenda_time","agenda_text","_agendaScrollTop","agenda_area","dateElement","agenda_date","agenda_legacy_view","agenda_start","agenda_end","rowAttr","dateHeader","descriptionHeader","agenda_view","add_agenda","dayDateToStr","dayDowToStr","agenda_day","eventsInDays","anyEvents","renderDay","calendarEvent","selectedId","all_timed_month","is_event_short","_safe_copy","proto","isPrototypeOf","old_prerender_events_line","old_prerender_events_table","prerender_events","ce","_virtual","isOvernightEvent","getNextDay","setDateTime","event_changed","re","redraw","next_day","old_get_visible_events","old_mode","old_date","oldUpdate","fullRedrawNeeded","collision","temp_section","_setTempSection","event_id","collision_limit","checkCollision","edited_ev","recurring_event_id","_roll_back_dates","_check_sections_collision","evs_dates","getRecDates","tevs","concurrent","_pid_time","checked_mode","single","container_autoresize","month_day_min_height","min_grid_size","min_map_size","old_pre_render_event","active","total_height","multiday_height","evl","_h_fix","navHeight","headerHeight","checked_divs","updateContainterHeight","is_repaint","checked_div","maxHeight","year_y","cur_height","week_agenda_scale_height","eventsContainer","_gridView","y_unit","getSectionHeight","scrollWidth","getScrollSize","callUpdate","conditionalUpdateContainerHeight","asyncRepaint","requestAnimationFrame","autosizeEnabled","$original_scroll_width","$original_section_autoheight","section_autoheight","cookie","getCookieName","_get_url_nav","urlNavigationPlugin","schedulerCookie","unescape","newMode","cookie_param","old_load","drag_between","editors","cached_options","resetCombo","_combo","DOMParent","combo","unload","DOMelem","dhx_globalImgPath","image_path","dhtmlXCombo","options_height","setOptionHeight","enableFilteringMode","filtering","script_path","selected_id","addOption","disable","selectOption","setComboValue","all_options","single_option","getIndexByValue","getSelectedValue","getSelectedText","vertical","radiobuttons","checked_value","isChecked","check_html","label_html","checkbox","unchecked_value","expand","fullscreen","toggleIcon","_position","_width","_height","_overflow","overflow","_maximize","collapse","directions","prev_margin","export_api","std","getElementSizes","sizes","dhtmlxAjax","dhx4","getTimeline","orientation","dpi","_export_html","_send_to_export","exportToICal","_serialize_plain","exportToExcel","_serialize_columns","_ajax_to_export","server","info","_plain_export_copy","$text","_create_hidden_form","submit","_hidden_export_form","_get_export_size","footer","A5","A4","A3","A2","A1","A0","dataX","cSize","parseFloat","smartRendering","initialSizes","smart_rendering","style_width","style_height","timeline_scrollable","timeline_smart_rendering","grid_view","html_templates","getScope","scopes","minicalButton","minicalDate","SchedulerNode","DataArea","timeSlot","searchMap","key_nav_step","addShortcut","shortcut","scope","scopeObject","getShortcutHandler","commands","shortcuts","findHandler","removeShortcut","unbind","disp","setDefaultNode","_compose","createCommand","modifiers","alt","ctrl","meta","expr","getExpressions","words","getWords","command","commandKeys","specialKeys","charCodeAt","getCommandFromEvent","domEvent","altKey","printableKey","fromCharCode","getHashFromEvent","getHash","junctionChar","term","combinationChar","backspace","enter","esc","space","up","down","home","pageup","pagedown","insert","plus","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10","f11","f12","EventHandler","_handlers","doAction","returnValue","bindAll","initKeys","nextItem","currentFocus","currentIndex","renderMultiple","currentStart","currentEnd","_modes","_getMode","renderVerticalMarker","renderTimelineMarker","renderYearMarker","renderMonthMarker","weekAgenda","renderWeekAgendaMarker","renderAgendaMarker","dayColumns","addWaiAriaLabel","addDataAttributes","dateToStr","dateTimeLabel","sectionObject","markerDate","_wrapDiv","_get_year_cell","opacity","view_opts","round_position","_trace_x","_is_column_visible","start_pos","end_pos","set_date_part","tempStart","tempEnd","_timeline_getX","_section_height","_isRender","renderMonthCell","weekNumber","dayIndex","datatable","lineHeight","getDefaultNode","getMode","blur","_compareEvents","_pickEvent","startId","nextEventHandler","nextEvent","currEvent","visibleDates","nextEv","prevEventHandler","HeaderCell","getNodes","KeyNavNode","moveTo","compareTo","canStringifyThis","canStringifyThat","defaultCell","_getSection","_getNodes","defaultElement","isScrolledIntoView","eventBox","viewPort","idSelector","inlineEditor","getInlineEditor","_moveToSlot","slot","movingDate","getDefaultDate","_getDefaultSection","visibleTime","nowTime","showNowTime","findVisibleColumn","timeslot","_getMultisectionView","_getNextSection","nextIndex","defaultSlot","addMonthDate","nextMonthSlot","_alignTimeSlot","nextTimelineSlot","newPos","nextUnitsSlot","optionsCount","nextDaySlot","_moveDate","isBeforeLastHour","isStartDate","isAfterFirstHour","isInVisibleDayTime","oldStart","toNextDay","testEnd","nextWeekAgendaSlot","nextAgendaSlot","isDateVisible","nextDateColumn","current","tempSlot","extendSlot","extendUnitsSlot","extendTimelineSlot","extendMonthSlot","extendDaySlot","extendWeekAgendaSlot","extendGenericSlot","allowedDirections","moveDate","newDates","extendSlotDates","oldSlot","newSlot","dateDirection","scrollSlot","globalNode","_getGrid","_getNode","enabled","newRow","newCol","blurNode","editor","defaultPrevented","schedulerNode","_timeout","_minicalendars","isMinical","minicalendars","patchMinicalendar","focusMinical","minicalClick","rowIndex","cellIndex","td","renderMinical","cal","added","destroyMinical","_def_count","attachOnce","isSchedulerSelected","changeState","layer","layers","validId","_clearUpdateFlag","_cloneObj","_dataprocessors","_layers_zindex","initial_layer_zindex","isDefault","defaultLayer","showLayer","tlayer","toggleLayer","hideLayer","visible","getLayer","layer_name","native_event_object","noMenu","_evs_layer","_t_render_view_data","evs_layer","borderBox","borderBoxWidth","headerWidth","bodyWidth","footerWidth","bodyHeight","new_zIndex","filter_agenda","limit_view","_temp_limit_scope","om","od","nm","nd","isBlocked","date_end","resetDate","is_new_event","data_copy","native_object","_mark_now_timer","map_view","mapAdapter","eventHandlerIds","adapters","googleMap","openStreetMaps","mapbox","setupMapView","createAdapter","unmodifiedEvent","_eventLocationChanged","map_settings","resolve_event_location","_latLngUpdate","addEventWithLocation","updateEventMarker","newIdEvent","removeEventMarker","addEventMarker","onEventClick","coordinates","resolveAddress","map_view_provider","currentAdapter","resolve_user_location","view_provider","map_initial_position","map_error_position","map_date_width","map_icon_width","map_description_width","add_map","map_date","map_time","map_text","map_start","dblclick_dhx_map_area","map_initial_zoom","map_zoom_after_resolve","map_infowindow_max_width","map_resolve_user_location","map_type","map_resolve_event_location","fill_map_tab","_selected_event_id","ariaButtonAttr","clearEventMarkers","map_end","mapContainer","adapter","elem_id","marginRight","marginTop","destroy","initialize","geolocation","getCurrentPosition","coords","_updateEventLocation","_event_resolve_delay","ret","minical","minicalDomEvents","minicalendar","mark_events","_synced_minicalendars","_prev","is_refresh","_render_calendar","unmarkCalendar","cont","tpos","_get_def_cont","$dom","dateAttribute","markCalendar","_last_date","conf","markedDates","_markCalendarCurrentDate","sync","_on_xle_handler","updateCalendar","_created","_locateCalendar","weekNum","dat","dayCell","_week_template","week_template","dummy_date","_mini_cal_arrows","previous","ts","temp2","temp3","temp4","temp5","temp6","temp7","temp8","padding","weekHeader","move_minicalendar_date","css_classnames","css_texts","diffs","calendars","arrow","dayHeaders","dayCells","inputs","selects","inp","new_date","_update_minical_select","isFulldayEvent","_attach_action","_round_minutes","linkCalendar","datediff","dateNew","month_end","monthheight","old_s","multiselect","_children","_mark_inputs","_ids","script_url","divLoading","multisource","mvc","update_timer","use_id","sanitize","_finish_ext_load","_get_id","model","cid","backbone","toJSON","changes","queue","add_from_queue","Backbone","Collection","last_event","dragger","dhtmlDragAndDropObject","stopDrag","on_drop","sourceHtmlObject","dhtmlObject","targetHtmlObject","targetHtml","action_data","event_data","view_options","_locate_cell_timeline","addDragLanding","_drag","_dragIn","shtmlObject","_dragOut","DragControl","addDrop","onDrop","sourceDhtmlx","getMaster","onDragIn","pdf","html_regexp","newline_regexp","clean_html","x_norm","colsWidth","x_norm_event","is_left","dhx_cal_header","y_norm","get_style","de_day","de_week","xml_end","xml_top","profile","xml_body_header","dhx_cal_date","xh","xml_month_scale","xml_month","yh","xhs","second_scale","top_width","top_col","xml_body","colors","week_starts","_month","text_color","zx","zdx","left_norm","zy","zdy","e_type","dets","week","dy_copy","toXML","original_date","original_mode","temp_date","to_pdf","objects","getPDFData","toPDF","toPDFRange","quick_info","show_quick_info","clickedElementPosition","fitQIInsideWindow","quickInfoPopup","popupRect","offsetBottom","getPositionInsideScheduler","_$quickInfoHandler","eventElement","showQuickInfo","hiding_function","hideQuickInfo","quick_info_title","quick_info_content","quick_info_date","_quick_info_box_id","_get_event_counter_part","_quick_info_box","_init_quick_info","_fill_quick_data","_show_quick_info","cssTimeToMs","milliseconds","forced","qi","_x_scroll","dataPos","ontransitionend","_quick_info_onscroll_handler","$testmode","_qi_button_click","main","mainContent","originalRecurringSetValue","original_left_buttons","original_right_buttons","txt_replace","txts","txtt","readonly_form","forbidden_buttons","button_arrays","forbidden_button","button_array","originalForm","readonlyForm","_lightbox_r","clearMilliseconds","isSeries","old_add_event","groupExceptions","exceptions","original_start","_rec_temp","_rec_markers_pull","_rec_markers","_get_rec_marker","ch","_get_rec_markers","ev_id","_ignore_call","tev","_pid_changed","_is_modified_occurence","idTimestamp","nid","nev","sub","isEventFound","_start_date","showLightbox_rec","lightbox_recurring","pid","isVirtual","showSeries","title_confirm_recurring","get_visible_events_rec","repeat_date","old_update_event","toIcalString","getWeekdayOfMonth","dayOfWeek","dayOfMonth","dayNumber","non_render","maxCount","seriesExceptions","utcStart","parsedRRule","utcTo","repeatedDates","adjustedDate","visibleCount","eventDuration","exception","_fix_daylight_saving_date","recurrings","sev","occurence","include_end_by","recurring_workdays","jsDaysToRRULEDays","RruleDayNumsToJs","formatDayNumber","repeat_monthly_date","repeat_monthly_weekday","nthDayOfMonth","repeat_yearly_month_date","repeat_yearly_month_weekday","getRecValue","WORKDAYS","CUSTOM","monthRepeat","yearRepeat","formatFunc","endRule","NEVER","fillInDefaults","dayNum","dayLabel","dateOfMonth","nthWeekDayOfMonth","dateOfYear","nthWeekDayOfYear","countInput","ondateInput","endOptionSelect","formatter","repeat_date_of_end","dispatchEvent","getFirstSectionOfType","rec","_get_node","_outer_html","loc","_init_set_value","_ds","weekly","monthly","yearly","_rec_init_done","rf","blocked","rruleset","topOption","rruleObj","untilDate","customFreq","actual_dates","timeControl","getTimeSection","recurrence","_start","recurring_legacy","getRecurringSection","occurrence_timestamp_in_utc","outerHTML","_get_form_node","_get_node_value","_get_node_numeric_value","_set_node_value","hash_value","str_date_format","date_str","register_els","inps","change_current_view","set_end_rule","_get_repeat_code","get_rcode","str_date","transpose_type","get_numeric_value","repeat_precise","start_exists","transpose_day_week","set_rcode","_set_repeat_code","MouseEvent","elements","_toggle_block","_get_button","_get_form","backgroundPosition","transponse_size","day_week","originalMonth","newMonth","cor","cor2","cday","transposeRecurring","recurringParts","addRecurring","recurringStepDays","weekDays","seriesInstance","currentCount","origMonth","origYear","correctOverflowInstances","recurring_overflow_instances","startHour","ted","data_attributes","all_events","_serialize_json_value","toICal","full_day_format","tooltipManager","tooltips","tooltipFor","targetEventId","hideTooltip","s2d","d2s","select_event","wp","year_view","year_date","year_month","year_scale_date","year_tooltip","isYearMode","getCellDate","dblclick_dhx_year_grid","_year_render_event","_year_marked_cells","_hideToolTip","_tooltip","_showToolTip","_year_view_tooltip_handler","_init_year_tooltip","_mark_year_date","_unmark_year_date","_reset_year_scale","year_top","ssd","yearBox","year_x","datepicker","locateEvent","factory","extensions","_seed","_schedulerPlugins","_bundledExtensions","_extensionsManager","initConfig","_internal_id","$syncFactory","_initFromConfig","addCalendar","$dhx"],"mappings":"AAUA,MAAAA,KAPqB,OAAXC,SAAW,MACNA,SAEAC;ACNA,SAASC,GAAiBC,GACrC;AAAA,MAAI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AAWr0G,SACHq0G,OAAAA,EAAWr0G,QAAS,WAC7BxP,EAAU0yB,KAAKmxF,EAAWr0G,IAAAA,IAE1BxP,EAAU6tB,MAAMg2F,EAAWr0G,IAG7B;AAAA,EAAA;AAAA,EDxFmC84E,EAE/BtoF,GAAAA,KAAYujH,GAAQnkD,qBACpBD,GAAAA,KAAY,EACjBuC,QAAQ1hE,GAAU6e,KAAK0kG,GAAQ7hD,QAAQ6hD,EAAAA,EAAAA;AAGxC1jH,OAAOG,YAAYA,IACnBH,OAAOs/D,YAAYA,IAEft/D,OAAOqkH,SACVrkH,OAAOqkH,OAAO,KAGfrkH,OAAOqkH,KAAKlkH,YAAYA,IACxBH,OAAOqkH,KAAK/kD,YAAYA;","x_google_ignoreList":[84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111]} \ No newline at end of file +{"version":3,"file":"dhtmlxscheduler.es.js","sources":["../sources/global.js","../sources/plugins/drag_highlight_pos.js","../sources/plugins/limit.js","../sources/plugins/batch_update.js","../sources/plugins/index.js","../sources/plugins/undo_delete.js","../sources/core/utils/utils.js","../sources/core/nav_bar.js","../sources/core/scheduler_resize_listener.js","../sources/utils/eventable.js","../sources/core/utils/event.js","../sources/core/common.js","../sources/core/utils/scoped_event.js","../sources/core/utils/dom_helpers.js","../sources/utils/env.js","../sources/core/common/url_serialize.js","../sources/core/base.js","../sources/core/common/get_serializable_events.js","../sources/core/load.js","../sources/core/loaders/xml.js","../sources/core/loaders/json.js","../sources/core/loaders/ical.js","../sources/core/touch.js","../sources/core/skins.js","../sources/core/dataprocessor/dataprocessor_hooks.js","../sources/core/dataprocessor/dataprocessor.js","../sources/core/message.js","../sources/locale/locale_ar.js","../sources/locale/locale_be.js","../sources/locale/locale_ca.js","../sources/locale/locale_cn.js","../sources/locale/locale_cs.js","../sources/locale/locale_da.js","../sources/locale/locale_de.js","../sources/locale/locale_el.js","../sources/locale/locale_en.js","../sources/locale/locale_es.js","../sources/locale/locale_fi.js","../sources/locale/locale_fr.js","../sources/locale/locale_he.js","../sources/locale/locale_hu.js","../sources/locale/locale_id.js","../sources/locale/locale_it.js","../sources/locale/locale_jp.js","../sources/locale/locale_manager.js","../sources/locale/locale_nb.js","../sources/locale/locale_nl.js","../sources/locale/locale_no.js","../sources/locale/locale_pl.js","../sources/locale/locale_pt.js","../sources/locale/locale_ro.js","../sources/locale/locale_ru.js","../sources/locale/locale_si.js","../sources/locale/locale_sk.js","../sources/locale/locale_sv.js","../sources/locale/locale_tr.js","../sources/locale/locale_ua.js","../sources/core/datepicker.js","../sources/scheduler_factory_method.js","../sources/core/state.js","../sources/core/common_errors.js","../sources/core/scheduler.js","../sources/core/wai_aria.js","../sources/core/common/assert.js","../sources/core/jquery.js","../sources/core/destructor.js","../sources/core/utils/ajax.js","../sources/core/config.js","../sources/core/event.js","../sources/core/event_highlight.js","../sources/core/lightbox.js","../sources/core/dhtmlx/dhtmlx_suite_hooks.js","../sources/core/delay_render.js","../sources/core/connector.js","../sources/locale/index.js","../sources/ext/extension_manager.js","../sources/dhtmlx_hook.js","../sources/ext/restricted_extensions/not_implemented_extension.js","../sources/ext/keyboard_navigation/modals.js","../sources/ext/keyboard_navigation/key_nav_legacy.js","../sources/ext/keyboard_navigation/scheduler_handlers.js","../sources/ext/map_view/gMapAdapter.ts","../sources/ext/map_view/osmMapAdapter.ts","../sources/ext/map_view/mapboxAdapter.ts","../node_modules/rrule/dist/esm/weekday.js","../node_modules/rrule/dist/esm/helpers.js","../node_modules/rrule/dist/esm/dateutil.js","../node_modules/rrule/dist/esm/iterresult.js","../node_modules/rrule/node_modules/tslib/tslib.es6.mjs","../node_modules/rrule/dist/esm/callbackiterresult.js","../node_modules/rrule/dist/esm/types.js","../node_modules/rrule/dist/esm/nlp/i18n.js","../node_modules/rrule/dist/esm/nlp/totext.js","../node_modules/rrule/dist/esm/nlp/parsetext.js","../node_modules/rrule/dist/esm/nlp/index.js","../node_modules/rrule/dist/esm/datetime.js","../node_modules/rrule/dist/esm/parseoptions.js","../node_modules/rrule/dist/esm/parsestring.js","../node_modules/rrule/dist/esm/datewithzone.js","../node_modules/rrule/dist/esm/optionstostring.js","../node_modules/rrule/dist/esm/cache.js","../node_modules/rrule/dist/esm/masks.js","../node_modules/rrule/dist/esm/iterinfo/yearinfo.js","../node_modules/rrule/dist/esm/iterinfo/index.js","../node_modules/rrule/dist/esm/iterinfo/monthinfo.js","../node_modules/rrule/dist/esm/iterinfo/easter.js","../node_modules/rrule/dist/esm/iter/poslist.js","../node_modules/rrule/dist/esm/iter/index.js","../node_modules/rrule/dist/esm/rrule.js","../node_modules/rrule/dist/esm/rrulestr.js","../node_modules/rrule/dist/esm/rruleset.js","../node_modules/rrule/dist/esm/iterset.js","../sources/ext/tooltip/tooltip.ts","../sources/ext/tooltip/tooltipManager.ts","../sources/ext/extensions_gpl.js","../sources/ext/active_links.js","../sources/ext/agenda_legacy_view.js","../sources/ext/agenda.js","../sources/ext/all_timed.js","../sources/ext/collision.js","../sources/ext/container_autoresize.js","../sources/ext/cookie.js","../sources/ext/restricted_extensions/daytimeline.js","../sources/ext/restricted_extensions/drag_between.js","../sources/ext/editors.js","../sources/ext/expand.js","../sources/ext/export_api/index.js","../sources/ext/restricted_extensions/grid_view.js","../sources/ext/html_templates.js","../sources/ext/key_nav.js","../sources/ext/keyboard_navigation/common/keyboard_shortcuts.js","../sources/ext/keyboard_navigation/common/eventhandler.js","../sources/ext/keyboard_navigation/common/trap_modal_focus.js","../sources/ext/keyboard_navigation/marker.js","../sources/ext/keyboard_navigation/elements/scheduler_node.js","../sources/ext/keyboard_navigation/elements/nav_node.js","../sources/ext/keyboard_navigation/elements/header_cell.js","../sources/ext/keyboard_navigation/elements/event.js","../sources/ext/keyboard_navigation/elements/time_slot.js","../sources/ext/keyboard_navigation/elements/minical_button.js","../sources/ext/keyboard_navigation/elements/minical_cell.js","../sources/ext/keyboard_navigation/elements/data_area.js","../sources/ext/keyboard_navigation/core.js","../sources/ext/keyboard_navigation/minical_handlers.js","../sources/ext/layer.js","../sources/ext/limit.js","../sources/ext/map_view/index.ts","../sources/ext/minical.js","../sources/ext/monthheight.js","../sources/ext/restricted_extensions/multisection.js","../sources/ext/multiselect.js","../sources/ext/multisource.js","../sources/ext/mvc.js","../sources/ext/outerdrag.js","../sources/ext/pdf.js","../sources/ext/quick_info.js","../sources/ext/readonly.js","../sources/ext/recurring.js","../sources/ext/recurring_legacy.js","../sources/ext/serialize.js","../sources/ext/restricted_extensions/timeline.js","../sources/ext/tooltip/index.ts","../sources/ext/restricted_extensions/treetimeline.js","../sources/ext/restricted_extensions/units.js","../sources/ext/url.js","../sources/ext/restricted_extensions/week_agenda.js","../sources/ext/wp.js","../sources/ext/year_view.js","../sources/dhtmlxscheduler.gpl.js","../sources/scheduler_factory.js"],"sourcesContent":["\r\n/* eslint-disable no-restricted-globals */\r\nvar globalScope;\r\nif(typeof window !== \"undefined\"){\r\n\tglobalScope = window;\r\n}else{\r\n\tglobalScope = global;\r\n}\r\n/* eslint-enable no-restricted-globals */\r\n\r\nexport default globalScope;","export default function dragHighlightPos(scheduler){\r\n let dndMarkers = [];\r\n let dragStarted = false;\r\n let eventNode = null;\r\n let event = null;\r\n\r\n function isEnabled() { \r\n return scheduler.config.drag_highlight && scheduler.markTimespan;\r\n }\r\n\r\n function checkViewName(viewName){\r\n const viewObj = scheduler.getView(viewName);\r\n if(viewObj){\r\n return viewObj.layout;\r\n }\r\n return viewName;\r\n }\r\n\r\n function checkSectionPropertyName(viewName){\r\n const viewObj = scheduler.getView(viewName);\r\n if(viewObj.y_property){\r\n return viewObj.y_property;\r\n }\r\n if(viewObj.map_to){\r\n return viewObj.map_to;\r\n }\r\n }\r\n\r\n function setRequiredStylesToMarker(eventNode, layout){\r\n switch (layout) {\r\n case \"month\":\r\n eventNode.style.top = \"\";\r\n eventNode.style.left = \"\";\r\n break;\r\n case \"timeline\":\r\n eventNode.style.left = \"\";\r\n eventNode.style.marginLeft = \"1px\";\r\n break;\r\n default:\r\n eventNode.style.top = \"\";\r\n break;\r\n }\r\n }\r\n \r\n function createMarkerConfig(configSettings){\r\n const { event, layout, viewName, sectionId, eventNode } = configSettings;\r\n setRequiredStylesToMarker(eventNode, layout);\r\n const sections = {};\r\n let markerObject = {\r\n start_date: event.start_date,\r\n end_date: event.end_date,\r\n css: \"dhx_scheduler_dnd_marker\",\r\n html: eventNode\r\n };\r\n if (layout == \"timeline\" || layout == \"month\" ){\r\n // we need to set end date less than 24 hours of the views to avoid receiving multiple marktimespans\r\n markerObject = {...markerObject, end_date: scheduler.date.add(event.start_date, 1, 'minute')};\r\n }\r\n if (sectionId){\r\n sections[viewName] = sectionId;\r\n markerObject.sections = sections;\r\n }\r\n return markerObject;\r\n }\r\n\r\n function createViewMarker(settings){\r\n const { layout } = settings;\r\n let markerConfigs;\r\n switch (layout) {\r\n case \"month\": \r\n markerConfigs = getMonthViewMarkers(settings);\r\n break;\r\n case 'timeline':\r\n case 'units':\r\n markerConfigs = getTimelineAndUnitsViewMarkers(settings);\r\n break;\r\n default: \r\n markerConfigs = getColumnViewMarkers(settings);\r\n break;\r\n }\r\n markerConfigs.forEach((cfg) => {\r\n dndMarkers.push(scheduler.markTimespan(cfg));\r\n });\r\n }\r\n\r\n function getColumnViewMarkers(settings){\r\n const {event, layout, viewName, sectionId} = settings;\r\n let columnViewMarkersArray = [];\r\n let eventNodes = scheduler.$container.querySelectorAll(`[${scheduler.config.event_attribute}='${event.id}']:not(.dhx_cal_select_menu):not(.dhx_drag_marker)`);\r\n if(eventNodes){\r\n for (let i = 0; i < eventNodes.length; i++) {\r\n let eventNodeClone = eventNodes[i].cloneNode(true);\r\n let startDate = new Date(+eventNodeClone.getAttribute(\"data-bar-start\"));\r\n let endDate = new Date(+eventNodeClone.getAttribute(\"data-bar-end\"));\r\n let dates = {start_date: startDate, end_date: endDate};\r\n const configSettings = {\r\n event: dates, \r\n layout, \r\n viewName, \r\n sectionId, \r\n eventNode:eventNodeClone\r\n };\r\n columnViewMarkersArray.push(createMarkerConfig(configSettings));\r\n }\t\r\n }\r\n return columnViewMarkersArray;\r\n }\r\n\r\n function getMonthViewMarkers(settings){\r\n let monthViewMarkersArray = [];\r\n const {event, layout, viewName, sectionId} = settings;\r\n const weekDates = [];\r\n let currDate = new Date(event.start_date);\r\n while(currDate.valueOf() < event.end_date.valueOf()){\r\n let obj = {start_date: currDate};\r\n weekDates.push(obj);\r\n currDate = scheduler.date.week_start(scheduler.date.add(currDate, 1, \"week\"));\r\n }\r\n let cells = scheduler.$container.querySelectorAll(`[${scheduler.config.event_attribute}='${event.id}']`);\r\n for (let i = 0; i < cells.length; i++) {\r\n const configSettings = {\r\n event: weekDates[i], \r\n layout, \r\n viewName, \r\n sectionId, \r\n eventNode: cells[i].cloneNode(true)\r\n };\r\n monthViewMarkersArray.push(createMarkerConfig(configSettings));\r\n }\r\n return monthViewMarkersArray;\r\n }\r\n\r\n function getTimelineAndUnitsViewMarkers(settings){\r\n let unitMarkersArray = [];\r\n const {event, layout, viewName, eventNode} = settings;\r\n let sectionPropertyName = checkSectionPropertyName(viewName);\r\n if (sectionPropertyName){\r\n const sections = String(event[sectionPropertyName]).split(scheduler.config.section_delimiter);\r\n const formatedSections = sections.map(element => String(element));\r\n const elems = [];\r\n for (let i = 0; i < formatedSections.length; i++) {\r\n elems[i] = eventNode.cloneNode(true);\r\n const configSettings = {\r\n event, \r\n layout, \r\n viewName, \r\n sectionId: formatedSections[i],\r\n eventNode: elems[i]\r\n };\r\n unitMarkersArray.push(createMarkerConfig(configSettings));\r\n }\r\n }\r\n return unitMarkersArray;\r\n }\r\n \r\n scheduler.attachEvent(\"onBeforeDrag\", function (id, mode, e){\r\n if (isEnabled()) {\r\n dragStarted = true;\r\n event = scheduler.getEvent(id);\r\n eventNode = e.target.closest(`[${scheduler.config.event_attribute}]`);\r\n const viewName = scheduler.getState().mode;\r\n const layout = checkViewName(viewName);\r\n // to avoid incorrect eventNode and marker creation when scheduler.config.cascade_event_display included\r\n if (layout == \"units\" && scheduler.config.cascade_event_display ) {\r\n scheduler.unselect(id);\r\n eventNode = e.target.closest(`[${scheduler.config.event_attribute}]`);\r\n }\r\n }\r\n return true;\r\n });\r\n\r\n scheduler.attachEvent(\"onEventDrag\", function (id, mode, e){\r\n if(dragStarted && isEnabled()){\r\n dragStarted = false;// insert element only once after dnd start\r\n const viewName = scheduler.getState().mode;\r\n const layout = checkViewName(viewName);\r\n const sectionId = scheduler.getActionData(e).section;\r\n if (event) {\r\n const settings = {\r\n event, \r\n layout, \r\n viewName, \r\n sectionId, \r\n eventNode\r\n };\r\n createViewMarker(settings);\r\n }\r\n }\r\n });\r\n\r\n scheduler.attachEvent(\"onDragEnd\", function(id, mode, e){\r\n for (let i = 0; i < dndMarkers.length; i++) {\r\n scheduler.unmarkTimespan(dndMarkers[i]);\r\n }\r\n dndMarkers = [];\r\n eventNode = null;\r\n event = null;\r\n });\r\n}","export default function limitPlugin(scheduler){\r\n\r\n\r\n\tscheduler.config.mark_now = true;\r\n\tscheduler.config.display_marked_timespans = true;\r\n\tscheduler.config.overwrite_marked_timespans = true;\r\n\r\n\r\n\tvar dhx_time_block = \"dhx_time_block\";\r\n\tvar default_timespan_type = \"default\";\r\n\tvar fix_options = function(options, days, zones) {\r\n\t\tif (days instanceof Date && zones instanceof Date) {\r\n\t\t\toptions.start_date = days;\r\n\t\t\toptions.end_date = zones;\r\n\t\t} else {\r\n\t\t\toptions.days = days;\r\n\t\t\toptions.zones = zones;\r\n\t\t}\r\n\t\treturn options;\r\n\t};\r\n\tvar get_resulting_options = function(days, zones, sections) {\r\n\t\tvar options = (typeof days == \"object\") ? days : { days: days };\r\n\t\toptions.type = dhx_time_block;\r\n\t\toptions.css = \"\";\r\n\t\tif (zones) {\r\n\t\t\tif (sections)\r\n\t\t\t\toptions.sections = sections;\r\n\t\t\toptions = fix_options(options, days, zones);\r\n\t\t}\r\n\t\treturn options;\r\n\t};\r\n\tscheduler.blockTime = function(days, zones, sections){\r\n\t\tvar options = get_resulting_options(days, zones, sections);\r\n\t\treturn scheduler.addMarkedTimespan(options);\r\n\t};\r\n\tscheduler.unblockTime = function(days, zones, sections) {\r\n\t\tzones = zones || \"fullday\";\r\n\t\tvar options = get_resulting_options(days, zones, sections);\r\n\t\treturn scheduler.deleteMarkedTimespan(options);\r\n\t};\r\n\r\n\tscheduler.checkInMarkedTimespan = function(ev, timespan_type, on_overlap){\r\n\t\ttimespan_type = timespan_type || default_timespan_type;\r\n\r\n\t\tvar res = true;\r\n\t\tvar temp_start_date = new Date(ev.start_date.valueOf());\r\n\t\tvar temp_end_date = scheduler.date.add(temp_start_date, 1, \"day\");\r\n\t\tvar timespans = scheduler._marked_timespans;\r\n\t\tfor (; temp_start_date < ev.end_date; temp_start_date = scheduler.date.date_part(temp_end_date), temp_end_date = scheduler.date.add(temp_start_date, 1, \"day\") ) {\r\n\t\t\tvar day_value = +scheduler.date.date_part( new Date(temp_start_date) ); // the first part of event not necessarily contains only date part\r\n\t\t\tvar day_index = temp_start_date.getDay();\r\n\r\n\t\t\tvar zones = getZones(ev, timespans, day_index, day_value, timespan_type);\r\n\t\t\tif (zones){\r\n\t\t\t\tfor (var i = 0; i < zones.length; i+=2) {\r\n\r\n\t\t\t\t\t// they may change for new event if it passes limit zone\r\n\t\t\t\t\tvar eventStart = scheduler._get_zone_minutes(temp_start_date);\r\n\t\t\t\t\tvar eventEnd = ( ev.end_date>temp_end_date || ev.end_date.getDate() != temp_start_date.getDate() ) ? 1440 : scheduler._get_zone_minutes(ev.end_date);\r\n\r\n\t\t\t\t\tvar markerStart = zones[i];\r\n\t\t\t\t\tvar markerEnd = zones[i+1];\r\n\t\t\t\t\tif (markerStarteventStart) {\r\n\t\t\t\t\t\tif(typeof on_overlap == \"function\"){\r\n\t\t\t\t\t\t\t//handler allows to cancel overlapping\r\n\t\t\t\t\t\t\t//actually needed only to keep default behavior of limits\r\n\t\t\t\t\t\t\tres = on_overlap(ev, eventStart, eventEnd, markerStart, markerEnd);//event object, event start/end minutes in 'zones' format, zone start/end minutes\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tres = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(!res)\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn !res;\r\n\t};\r\n\tscheduler.checkLimitViolation = function(event){\r\n\t\tif(!event)\r\n\t\t\treturn true;\r\n\t\tif (!scheduler.config.check_limits)\r\n\t\t\treturn true;\r\n\t\tvar s = scheduler;\r\n\t\tvar c = s.config;\r\n\t\tvar evs = [];\r\n\t\tif ((event.rec_type && event._end_date) || (event.rrule)) {\r\n\t\t\tconst seriesEnd = event._end_date || event.end_date;\r\n\t\t\t// GS-2482 need to take into account that a part of recurring events might be outside the limits\r\n\t\t\tif ((c.limit_start && c.limit_end)) {\r\n\t\t\t\tvar recEventInLimits = seriesEnd.valueOf() >= c.limit_start.valueOf() && event.start_date.valueOf() <= c.limit_end.valueOf();\r\n\t\t\t\treturn recEventInLimits;\r\n\t\t\t} else return true;\r\n\t\t} else {\r\n\t\t\tevs = [event];\r\n\t\t}\r\n\r\n\t\tvar complete_res = true;\r\n\t\tfor (var p=0; p= c.limit_start.valueOf() && ev.end_date.valueOf() <= c.limit_end.valueOf()) : true;\r\n\t\t\tif (res){\r\n\t\t\t\tres = !scheduler.checkInMarkedTimespan(ev, dhx_time_block, function(event, eventStart, eventEnd, markerStart, markerEnd){\r\n\t\t\t\t\t//try crop event to allow placing\r\n\t\t\t\t\tvar allow = true;\r\n\t\t\t\t\tif (eventStart<=markerEnd && eventStart >= markerStart){\r\n\t\t\t\t\t\tif (markerEnd == 24*60 || eventEnd <= markerEnd){\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(event._timed && s._drag_id && s._drag_mode == \"new-size\"){\r\n\t\t\t\t\t\t\tevent.start_date.setHours(0);\r\n\t\t\t\t\t\t\tevent.start_date.setMinutes(markerEnd);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ((eventEnd >= markerStart && eventEnd <= markerEnd) || (eventStart < markerStart && eventEnd > markerEnd)){\r\n\t\t\t\t\t\tif(event._timed && s._drag_id && s._drag_mode == \"new-size\"){\r\n\t\t\t\t\t\t\tevent.end_date.setHours(0);\r\n\t\t\t\t\t\t\tevent.end_date.setMinutes(markerStart);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn allow;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\tif (!res) {\r\n\t\t\t\tres = (s.checkEvent(\"onLimitViolation\")) ? s.callEvent(\"onLimitViolation\",[ev.id, ev]) : res;\r\n\t\t\t}\r\n\t\t\tcomplete_res = complete_res && res;\r\n\t\t}\r\n\t\tif(!complete_res){\r\n\t\t\ts._drag_id = null;\r\n\t\t\ts._drag_mode = null;\r\n\t\t}\r\n\t\treturn complete_res;\r\n\r\n\r\n\t};\r\n\tscheduler._get_blocked_zones = function(timespans, property, day_index, day_value, timespan_type){\r\n\t\tvar zones =[];\r\n\t\tif (timespans && timespans[property]) {\r\n\t\t\tvar timeline_zones = timespans[property];\r\n\t\t\tvar blocked_timeline_zones = this._get_relevant_blocked_zones(day_index, day_value, timeline_zones, timespan_type);\r\n\t\t\tfor (var i=0; i this._min_date && now.getHours() >= cfg.first_hour && now.getHours() 1) {\r\n\t\t\t\t\tif(view.size && view.options.length){\r\n\t\t\t\t\t\tday_index = ((view.position+ day_index) / view.options.length) * view.size;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstart_index = day_index;\r\n\t\t\t\t\tend_index = day_index + units_l;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tstart_index = 0;\r\n\t\t\t\t\tend_index = start_index + units_l;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar r_divs = [];\r\n\r\n\t\t\t\tfor (var i = start_index; i < end_index; i++) {\r\n\t\t\t\t\tvar t_day = i; // as each unit is actually considered +1 day\r\n\t\t\t\t\toptions.days = t_day;\r\n\t\t\t\t\tvar t_div = scheduler._render_marked_timespan(options, null, t_day)[0];\r\n\t\t\t\t\tr_divs.push(t_div);\r\n\t\t\t\t}\r\n\t\t\t\treturn r_divs;\r\n\t\t\t} else { // day/week views\r\n\t\t\t\toptions.days = day_index;\r\n\t\t\t\treturn scheduler._render_marked_timespan(options, null, day_index);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\toptions.days = +scheduler.date.date_part(now);\r\n\t\t\t\treturn scheduler._render_marked_timespan(options, null, null);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tscheduler._remove_mark_now = function() {\r\n\t\tvar dhx_now_time = 'dhx_now_time';\r\n\t\tvar els = this._els[dhx_now_time];\r\n\t\tfor (var i=0; i config.start_date) || (config.days !== undefined && config.zones)) && !config.type )\r\n\t\t\treturn r_configs; // incorrect config was provided\r\n\r\n\t\tvar min = 0;\r\n\t\tvar max = 24*60;\r\n\t\tif (config.zones == \"fullday\")\r\n\t\t\tconfig.zones = [min, max];\r\n\t\tif (config.zones && config.invert_zones) {\r\n\t\t\tconfig.zones = scheduler.invertZones(config.zones);\r\n\t\t}\r\n\r\n\t\tconfig.id = scheduler.uid();\r\n\t\tconfig.css = config.css||\"\";\r\n\t\tconfig.type = config.type||default_timespan_type;\r\n\r\n\t\tvar sections = config.sections;\r\n\t\tif (sections) {\r\n\t\t\tfor (var view_key in sections) {\r\n\t\t\t\tif (sections.hasOwnProperty(view_key)) {\r\n\t\t\t\t\tvar ids = sections[view_key];\r\n\t\t\t\t\tif (!(ids instanceof Array))\r\n\t\t\t\t\t\tids = [ids];\r\n\t\t\t\t\tfor (var i=0; i t_sd) ? scheduler._get_zone_minutes(start_date) : min;\r\n\t\t\t\t\tvar zone_end = ( end_date > t_ed || end_date.getDate() != t_sd.getDate() ) ? max : scheduler._get_zone_minutes(end_date);\r\n\t\t\t\t\tt_config.zones = [zone_start, zone_end];\r\n\t\t\t\t\tr_configs.push(t_config);\r\n\r\n\t\t\t\t\tt_sd = t_ed;\r\n\t\t\t\t\tt_ed = scheduler.date.add(t_ed, 1, \"day\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (c_config.days instanceof Date)\r\n\t\t\t\t\tc_config.days = (scheduler.date.date_part(c_config.days)).valueOf();\r\n\t\t\t\tc_config.zones = config.zones.slice();\r\n\t\t\t\tr_configs.push(c_config);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn r_configs;\r\n\t};\r\n\tscheduler._get_dates_by_index = function(index, start, end) {\r\n\t\tvar dates = [];\r\n\t\tstart = scheduler.date.date_part(new Date(start||scheduler._min_date));\r\n\t\tend = new Date(end||scheduler._max_date);\r\n\t\tvar start_day = start.getDay();\r\n\t\tvar delta = (index-start_day >= 0) ? (index-start_day) : (7-start.getDay()+index);\r\n\t\tvar t_date = scheduler.date.add(start, delta, \"day\");\r\n\t\tfor (; t_date < end; t_date = scheduler.date.add(t_date, 1, \"week\")) {\r\n\t\t\tdates.push(t_date);\r\n\t\t}\r\n\t\treturn dates;\r\n\t};\r\n\tscheduler._get_css_classes_by_config = function(config) {\r\n\t\tvar css_classes = [];\r\n\t\tif (config.type == dhx_time_block) {\r\n\t\t\tcss_classes.push(dhx_time_block);\r\n\t\t\tif (config.css)\r\n\t\t\t\tcss_classes.push(dhx_time_block+\"_reset\");\r\n\t\t}\r\n\t\tcss_classes.push(\"dhx_marked_timespan\", config.css);\r\n\t\treturn css_classes.join(\" \");\r\n\t};\r\n\tscheduler._get_block_by_config = function(config) {\r\n\t\tvar block = document.createElement(\"div\");\r\n\t\tif (config.html) {\r\n\t\t\tif (typeof config.html == \"string\")\r\n\t\t\t\tblock.innerHTML = config.html;\r\n\t\t\telse\r\n\t\t\t\tblock.appendChild(config.html);\r\n\t\t}\r\n\t\treturn block;\r\n\t};\r\n\tscheduler._render_marked_timespan = function(options, area, day) {\r\n\t\tvar blocks = []; // resulting block which will be rendered and returned\r\n\t\tvar c = scheduler.config;\r\n\t\tvar min_date = this._min_date;\r\n\t\tvar max_date = this._max_date;\r\n\t\tvar day_value = false; // if timespan for specific date should be displayed\r\n\r\n\t\tif (!c.display_marked_timespans)\r\n\t\t\treturn blocks;\r\n\r\n\t\t// in case of markTimespan\r\n\t\tif (!day && day !== 0) {\r\n\t\t\tif (options.days < 7)\r\n\t\t\t\tday = options.days;\r\n\t\t\telse {\r\n\t\t\t\tvar date_to_display = new Date(options.days);\r\n\t\t\t\tday_value = +date_to_display;\r\n\r\n\t\t\t\t// in case of markTimespan date could be not in the viewing range, need to return\r\n\t\t\t\tif ( !(+max_date > +date_to_display && +min_date <= +date_to_display) )\r\n\t\t\t\t\treturn blocks;\r\n\r\n\t\t\t\tday = date_to_display.getDay();\r\n\t\t\t}\r\n\r\n\t\t\t// convert day default index (Sun - 0, Sat - 6) to index of hourscales (depends on week_start and config.start_on_monday)\r\n\t\t\tvar min_day = min_date.getDay();\r\n\t\t\tif (min_day > day) {\r\n\t\t\t\tday = 7 - (min_day-day);\r\n\t\t\t} else {\r\n\t\t\t\tday = day - min_day;\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar zones = options.zones;\r\n\t\tvar css_classes = scheduler._get_css_classes_by_config(options);\r\n\r\n\t\tif (scheduler._table_view && scheduler._mode == \"month\") {\r\n\t\t\tvar areas = [];\r\n\t\t\tvar days = [];\r\n\r\n\r\n\t\t\tif (!area) {\r\n\t\t\t\tdays = (day_value) ? [day_value] : scheduler._get_dates_by_index(day);\r\n\t\t\t\tfor (var i=0; i < days.length; i++) {\r\n\t\t\t\t\tareas.push( this._scales[days[i]] );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tareas.push(area);\r\n\t\t\t\tdays.push(day);\r\n\t\t\t}\r\n\r\n\t\t\tfor (var i=0; i < areas.length; i++) {\r\n\t\t\t\tarea = areas[i];\r\n\t\t\t\tday = days[i];\r\n\r\n\t\t\t\tvar sday = this.locate_holder_day(day, false) % this._cols.length;\r\n\r\n\t\t\t\tif(this._ignores[sday]) continue;\r\n\r\n\t\t\t\tvar block_proto = scheduler._get_block_by_config(options);\r\n\t\t\t\tblock_proto.className = css_classes;\r\n\t\t\t\tblock_proto.style.top = \"0px\";\r\n\t\t\t\tblock_proto.style.height = \"100%\";\r\n\t\t\t\t\r\n\t\t\t\tfor (var k=0; k < zones.length; k+=2) {\r\n\t\t\t\t\tvar start = zones[i];\r\n\t\t\t\t\tvar end = zones[i+1];\r\n\t\t\t\t\tif (end <= start)\r\n\t\t\t\t\t\treturn [];\r\n\r\n\t\t\t\t\tvar block = block_proto.cloneNode(true);\r\n\r\n\t\t\t\t\tblock.style.left = \"0px\";\r\n\t\t\t\t\tblock.style.width = \"100%\";\r\n\r\n\t\t\t\t\tarea.appendChild(block);\r\n\t\t\t\t\tblocks.push(block);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvar index = day;\r\n\r\n\t\t\tif(this._ignores[this.locate_holder_day(day, false)]) return blocks;\r\n\r\n\t\t\tif (this._props && this._props[this._mode] && options.sections && options.sections[this._mode]) {\r\n\t\t\t\tvar view = this._props[this._mode];\r\n\t\t\t\tindex = view.order[options.sections[this._mode]];\r\n\r\n\t\t\t\tvar inner_index = view.order[options.sections[this._mode]];\r\n\t\t\t\tif(!(view.days > 1)){\r\n\t\t\t\t\tindex = inner_index;\r\n\t\t\t\t\tif (view.size && (index > view.position+view.size)) {\r\n\t\t\t\t\t\tindex = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar units_l = view.size || view.options.length;\r\n\t\t\t\t\tindex = index*units_l + inner_index;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tarea = area ? area : scheduler.locate_holder(index);\r\n\r\n\t\t\tfor (var i = 0; i < zones.length; i+=2){\r\n\t\t\t\tvar start = Math.max(zones[i], c.first_hour*60);\r\n\t\t\t\tvar end = Math.min(zones[i+1], c.last_hour*60);\r\n\t\t\t\tif (end <= start) {\r\n\t\t\t\t\tif (i+2 < zones.length)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\treturn [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar block = scheduler._get_block_by_config(options);\r\n\t\t\t\tblock.className = css_classes;\r\n\r\n\t\t\t\t// +1 for working with section which really takes up whole height (as % would be == 0)\r\n\t\t\t\tvar all_hours_height = this.config.hour_size_px*24 + 1;\r\n\t\t\t\tvar hour_ms = 60*60*1000;\r\n\t\t\t\tblock.style.top = (Math.round((start*60*1000-this.config.first_hour*hour_ms)*this.config.hour_size_px/hour_ms) % all_hours_height) + \"px\";\r\n\t\t\t\tblock.style.height = Math.max((Math.round(((end-start)*60*1000)*this.config.hour_size_px/hour_ms)) % all_hours_height, 1)+\"px\";\r\n\r\n\t\t\t\tarea.appendChild(block);\r\n\t\t\t\tblocks.push(block);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn blocks;\r\n\t};\r\n\r\n\tscheduler._mark_timespans = function(){\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\t\tvar divs = [];\r\n\t\tif (scheduler._table_view && scheduler._mode == \"month\"){\r\n\t\t\tfor (var day in this._scales) {\r\n\t\t\t\tvar date = new Date(+day);\r\n\t\t\t\tdivs.push.apply(divs, scheduler._on_scale_add_marker(this._scales[day],date));\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\t//manually trigger rendering of configs for each column\r\n\t\t\tvar date = new Date(scheduler._min_date);\r\n\t\t\tfor (var i = 0, len = data.childNodes.length; i < len; i++) {\r\n\t\t\t\tvar area = data.childNodes[i];\r\n\t\t\t\tif (area.firstChild && scheduler._getClassName(area.firstChild).indexOf(\"dhx_scale_hour\") > -1) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdivs.push.apply(divs, scheduler._on_scale_add_marker(area, date));\r\n\t\t\t\tdate = scheduler.date.add(date, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn divs;\r\n\t};\r\n\r\n\t// just marks timespan, will be cleaned after refresh\r\n\tscheduler.markTimespan = function(configuration) {\r\n\t\tif(!this._els){\r\n\t\t\tthrow new Error(\"`scheduler.markTimespan` can't be used before scheduler initialization. Place `scheduler.markTimespan` call after `scheduler.init`.\");\r\n\t\t}\r\n\r\n\r\n\t\tvar rebuild_els = false;\r\n\t\tif(!this._els[\"dhx_cal_data\"]){\r\n\t\t\tscheduler.get_elements();\r\n\t\t\trebuild_els = true;\r\n\t\t}\r\n\r\n\r\n\t\t// backup regular marked timespans\r\n\t\tvar timespans_ids = scheduler._marked_timespans_ids,\r\n\t\t\ttimespan_types = scheduler._marked_timespans_types,\r\n\t\t\ttimespans = scheduler._marked_timespans;\r\n\r\n\t\tscheduler.deleteMarkedTimespan();\r\n\r\n\t\t//add block to configs\r\n\t\tscheduler.addMarkedTimespan(configuration);\r\n\r\n\t\tvar divs = scheduler._mark_timespans();\r\n\r\n\t\tif(rebuild_els)\r\n\t\t\tscheduler._els = [];\r\n\r\n\t\t// restore timespan config\r\n\t\tscheduler._marked_timespans_ids = timespans_ids;\r\n\t\tscheduler._marked_timespans_types = timespan_types;\r\n\t\tscheduler._marked_timespans = timespans;\r\n\r\n\t\treturn divs;\r\n\t};\r\n\tscheduler.unmarkTimespan = function(divs) {\r\n\t\tif (!divs)\r\n\t\t\treturn;\r\n\t\tfor (var i=0; i c_zone_end && zone_start <= c_zone_end) || (zone_start < c_zone_start && zone_end >= c_zone_start)) {\r\n\t\t\t\t\tresulting_zones[i] = Math.min(c_zone_start, zone_start);\r\n\t\t\t\t\tresulting_zones[i+1] = Math.max(c_zone_end, zone_end);\r\n\t\t\t\t\ti -= 2;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!isLast) // do nothing, maybe next current zone will match or will be last\r\n\t\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\t\tvar offset = (c_zone_start > zone_start)?0:2;\r\n\t\t\t\t\tresulting_zones.splice(i+offset, 0, zone_start, zone_end); // last current zone, need to add another\r\n\t\t\t\t}\r\n\t\t\t\tzones.splice(k--,2); // zone was merged or added, need to exclude it\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn resulting_zones;\r\n\t};\r\n\tscheduler._subtract_timespan_zones = function(current_zones, zones) {\r\n\t\tvar resulting_zones = current_zones.slice();\r\n\t\tfor (var i=0; i c_zone_start && zone_start < c_zone_end) {\r\n\t\t\t\t\tvar is_modified = false;\r\n\t\t\t\t\tif (c_zone_start >= zone_start && c_zone_end <= zone_end) {\r\n\t\t\t\t\t\tresulting_zones.splice(i, 2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (c_zone_start < zone_start) {\r\n\t\t\t\t\t\tresulting_zones.splice(i, 2, c_zone_start, zone_start);\r\n\t\t\t\t\t\tis_modified = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (c_zone_end > zone_end) {\r\n\t\t\t\t\t\tresulting_zones.splice( (is_modified)?(i+2):i, (is_modified)?0:2, zone_end, c_zone_end);\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti -= 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn resulting_zones;\r\n\t};\r\n\tscheduler.invertZones = function(zones) {\r\n\t\treturn scheduler._subtract_timespan_zones([0, 1440], zones.slice());\r\n\t};\r\n\tscheduler._delete_marked_timespan_by_id = function(id) {\r\n\t\tvar configs = scheduler._marked_timespans_ids[id];\r\n\t\tif (configs) {\r\n\t\t\tfor (var i=0; i 1)){\r\n\t\t\t\tday = scheduler.date.date_part(new Date(this._date)); // for units view actually only 1 day is displayed yet the day variable will change, need to use this._date for all calls\r\n\t\t\t}else{\r\n\t\t\t\tvar dx = 24*60*60*1000;\r\n\t\t\t\tvar day_ind = Math.round((day - scheduler._min_date)/dx);\r\n\t\t\t\tvar unitsPerDay = view.size || units.length;\r\n\t\t\t\tday = scheduler.date.add(scheduler._min_date, Math.floor(day_ind/unitsPerDay), \"day\"); // to the \"same\" day for all sections\r\n\t\t\t\tday = scheduler.date.date_part(day);\r\n\t\t\t}\r\n\t\t\tday_index = day.getDay();\r\n\t\t\tday_value = day.valueOf();\r\n\r\n\t\t\tif (timespans[mode] && timespans[mode][unit.key]) {\r\n\t\t\t\tvar unit_zones = timespans[mode][unit.key];\r\n\t\t\t\tvar unit_types = scheduler._get_types_to_render(unit_zones[day_index], unit_zones[day_value]);\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(unit_types));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar global_data = timespans[\"global\"];\r\n\r\n\t\tif(scheduler.config.overwrite_marked_timespans){\r\n\t\t\tvar day_types = global_data[day_value]||global_data[day_index];\r\n\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(day_types));\r\n\t\t} else {\r\n\t\t\tif(global_data[day_value]){\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(global_data[day_value]));\r\n\t\t\t}\r\n\t\t\tif(global_data[day_index]){\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(global_data[day_index]));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (var i=0; i {\r\n\t\t\tif(date){\r\n\t\t\t\tcalls.setModeDate.date = date;\r\n\t\t\t}\r\n\t\t\tif(mode){\r\n\t\t\t\tcalls.setModeDate.mode = mode;\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tvar methods = {\r\n\t\t\trender:(date, mode) => {calls.needRender = true; rememberModeDate(date, mode);},\r\n\t\t\tsetCurrentView:(date, mode) => {calls.needRender = true; rememberModeDate(date, mode);},\r\n\t\t\tupdateView:(date, mode) => {calls.needUpdateView = true; rememberModeDate(date, mode);},\r\n\t\t\trender_data:() => calls.needRender = true,\r\n\t\t\trender_view_data:(evs) => { \r\n\t\t\t\tif(evs && evs.length){\r\n\t\t\t\t\tevs.forEach((e) => calls.repaintEvents[e.id] = true);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcalls.needRender = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tdisableMethods.call(this, methods);\r\n\r\n\t\tisActive = true;\r\n\t\tthis.callEvent(\"onBeforeBatchUpdate\", []);\r\n\r\n\t\tbatchUpdatePayload(callback);\r\n\r\n\t\tthis.callEvent(\"onAfterBatchUpdate\", []);\r\n\r\n\t\trestoreMethods.call(this);\r\n\r\n\t\tisActive = false;\r\n\t\tif(!noRedraw){\r\n\t\t\tif(calls.needRender){\r\n\t\t\t\tscheduler.render(calls.setModeDate.date, calls.setModeDate.mode);\r\n\t\t\t}else if(calls.needUpdateView){\r\n\t\t\t\tscheduler.updateView(calls.setModeDate.date, calls.setModeDate.mode);\r\n\t\t\t}else{\r\n\t\t\t\tfor(const i in calls.repaintEvents){\r\n\t\t\t\t\tscheduler.updateEvent(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (call_dp) {\r\n\t\t\tthis._dp.setUpdateMode(dp_mode);\r\n\t\t\tthis._dp.sendData();\r\n\t\t}\r\n\t};\r\n}\r\n\r\nexport default function(scheduler){\r\n\tscheduler.batchUpdate = createMethod(scheduler);\r\n}","import dragHighlightPos from \"./drag_highlight_pos\";\r\nimport undoDelete from \"./undo_delete\";\r\nimport limit from \"./limit\";\r\nimport batchUpdate from \"./batch_update\";\r\n\r\nexport default function initPlugins(scheduler){\r\n undoDelete(scheduler);\r\n dragHighlightPos(scheduler);\r\n limit(scheduler);\r\n batchUpdate(scheduler);\r\n}","export default function undoDelete(scheduler) {\r\n\tscheduler.attachEvent(\"onEventDeleted\", function (id, ev) {\r\n\t\tlet deletedEvent = scheduler.copy(ev);\r\n\t\tif (scheduler.config.undo_deleted && !scheduler.getState().new_event) {\r\n\t\t\tscheduler.message({\r\n\t\t\t\ttext: `
\r\n Event deleted\r\n \r\n
`,\r\n\t\t\t\texpire: 10000,\r\n\t\t\t\ttype: \"popup_after_delete\",\r\n\t\t\t\tcallback: function (e) {\r\n\t\t\t\t\tlet undoBtn = e.target.closest(\r\n\t\t\t\t\t\t`[data-deleted-event-id=\"${ev.id}\"]`\r\n\t\t\t\t\t);\r\n\t\t\t\t\tif (undoBtn) {\r\n\t\t\t\t\t\tscheduler.addEvent(deletedEvent);\r\n\t\t\t\t\t\tscheduler.render();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t});\r\n}\r\n","var uidSeed = Date.now();\r\nfunction uid () {\r\n\treturn uidSeed++;\r\n}\r\n\r\n// iframe-safe array type check instead of using instanceof\r\nfunction isArray(obj){\r\n\tif(Array.isArray){\r\n\t\treturn Array.isArray(obj);\r\n\t}else{\r\n\t\t// close enough\r\n\t\treturn (obj && obj.length !== undefined && obj.pop && obj.push);\r\n\t}\r\n}\r\n\r\n// non-primitive string object, e.g. new String(\"abc\")\r\nfunction isStringObject(obj){\r\n\treturn obj && typeof obj === \"object\" && \r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function String() { [native code] }\";\r\n}\r\n\r\n// non-primitive number object, e.g. new Number(5)\r\nfunction isNumberObject(obj){\r\n\treturn obj && typeof obj === \"object\" && \r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function Number() { [native code] }\";\r\n}\r\n\r\n// non-primitive number object, e.g. new Boolean(true)\r\nfunction isBooleanObject(obj){\r\n\treturn obj && typeof obj === \"object\" &&\r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function Boolean() { [native code] }\";\r\n}\r\n\r\nfunction isDate(obj) {\r\n\tif (obj && typeof obj === \"object\") {\r\n\t\treturn !!(obj.getFullYear && obj.getMonth && obj.getDate);\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\nfunction defined(obj) {\r\n\treturn typeof(obj) != \"undefined\";\r\n}\r\n\r\nfunction delay (callback, timeout){\r\n\tvar timer;\r\n\r\n\tvar result = function() {\r\n\t\tresult.$cancelTimeout();\r\n\t\tresult.$pending = true;\r\n\t\tvar args = Array.prototype.slice.call(arguments);\r\n\t\ttimer = setTimeout(function(){\r\n\t\t\tcallback.apply(this, args);\r\n\t\t\tresult.$pending = false;\r\n\t\t}, timeout);\r\n\t};\r\n\r\n\tresult.$pending = false;\r\n\tresult.$cancelTimeout = function(){\r\n\t\tclearTimeout(timer);\r\n\t\tresult.$pending = false;\r\n\t};\r\n\tresult.$execute = function(){\r\n\t\tvar args = Array.prototype.slice.call(arguments);\r\n\t\tcallback.apply(this, args);\r\n\t\tresult.$cancelTimeout();\r\n\t};\r\n\r\n\treturn result;\r\n}\r\n\r\nexport default {\r\n\tuid: uid,\r\n\tmixin: function mixin (target, source, force){\r\n\t\tfor (var f in source)\r\n\t\t\tif (((target[f] === undefined) || force)) target[f]=source[f];\r\n\t\treturn target;\r\n\t},\r\n\tcopy: function copy(object) {\r\n\t\tvar i, result; // iterator, types array, result\r\n\t\r\n\t\tif (object && typeof object == \"object\") {\r\n\t\r\n\t\t\tswitch (true){\r\n\t\t\t\tcase (isDate(object)):\r\n\t\t\t\t\tresult = new Date(object);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isArray(object)):\r\n\t\t\t\t\tresult = new Array(object.length);\r\n\t\t\t\t\tfor(i = 0; i < object.length; i++){\r\n\t\t\t\t\t\tresult[i] = copy(object[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isStringObject(object)):\r\n\t\t\t\t\tresult = new String(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isNumberObject(object)):\r\n\t\t\t\t\tresult = new Number(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isBooleanObject(object)):\r\n\t\t\t\t\tresult = new Boolean(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tresult = {};\r\n\t\t\t\t\tfor (i in object) {\r\n\t\t\t\t\t\tconst varType = typeof object[i];\r\n\r\n\t\t\t\t\t\tif (varType === \"string\" || varType === \"number\" || varType === \"boolean\" ) {\r\n\t\t\t\t\t\t\tresult[i] = object[i];\r\n\t\t\t\t\t\t} else if(isDate(object[i])){\r\n\t\t\t\t\t\t\tresult[i] = new Date(object[i]);\r\n\t\t\t\t\t\t}else if (Object.prototype.hasOwnProperty.apply(object, [i]))\r\n\t\t\t\t\t\t\tresult[i] = copy(object[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result || object;\r\n\t},\r\n\tdefined,\r\n\tisDate,\r\n\tdelay\r\n};\r\n","export default function extend(scheduler) {\r\n\r\nfunction div(className){\r\n\tvar element = document.createElement(\"div\");\r\n\tvar classes = (className || \"\").split(\" \");\r\n\tclasses.forEach(function(cssClass){\r\n\t\telement.classList.add(cssClass);\r\n\t});\r\n\treturn element;\r\n}\r\nvar itemTypes = {\r\n\trows_container: function(){\r\n\t\treturn div(\"dhx_cal_navbar_rows_container\");\r\n\t},\r\n\trow: function(){\r\n\t\treturn div(\"dhx_cal_navbar_row\");\r\n\t},\r\n\tview: function (config) {\r\n\t\tvar element = div(\"dhx_cal_tab\");\r\n\t\telement.setAttribute(\"name\", config.view + \"_tab\");\r\n\t\telement.setAttribute(\"data-tab\", config.view);\r\n\t\t// element.setAttribute(\"data-viewname\", config.view); // FIXME: need to remove? not used anywhere\r\n\t\tif(scheduler.config.fix_tab_position){\r\n\t\t\tif(config.$firstTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_first\");\r\n\t\t\t}else if(config.$lastTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_last\");\r\n\t\t\t} else if(config.view !== \"week\") {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_standalone\");\r\n\t\t\t}\r\n\r\n\t\t\tif(config.$segmentedTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn element;\r\n\t},\r\n\tdate: function () {\r\n\t\treturn div(\"dhx_cal_date\");\r\n\t},\r\n\tbutton: function (config) {\r\n\t\treturn div(\"dhx_cal_nav_button dhx_cal_nav_button_custom dhx_cal_tab\");\r\n\t},\r\n\tbuiltInButton: function (config){\r\n\t\treturn div(\"dhx_cal_\" + config.view + \"_button dhx_cal_nav_button\");\r\n\t},\r\n\tspacer: function () {\r\n\t\treturn div(\"dhx_cal_line_spacer\");\r\n\t},\r\n\tminicalendarButton: function(config){\r\n\t\tvar minicalendarDiv = div('dhx_minical_icon');\r\n\t\tif(!config.click && !minicalendarDiv.$_eventAttached){\r\n\t\t\t\r\n\t\t\tscheduler.event(minicalendarDiv, \"click\", function () {\r\n\t\t\t\tif (scheduler.isCalendarVisible()) {\r\n\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tscheduler.renderCalendar({\r\n\t\t\t\t\t\tposition: this,\r\n\t\t\t\t\t\tdate: scheduler.getState().date,\r\n\t\t\t\t\t\tnavigation: true,\r\n\t\t\t\t\t\thandler: function (date, calendar) {\r\n\t\t\t\t\t\t\tscheduler.setCurrentView(date);\r\n\t\t\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn minicalendarDiv;\r\n\t},\r\n\thtml_element: function (config) {\r\n\t\treturn div(\"dhx_cal_nav_content\");\r\n\t}\r\n};\r\n\r\nfunction findRenderer(config) {\r\n\tvar renderer;\r\n\tif (config.view) {\r\n\t\tswitch (config.view){\r\n\t\t\tcase \"today\":\r\n\t\t\tcase \"next\":\r\n\t\t\tcase \"prev\":\r\n\t\t\t\trenderer = itemTypes.builtInButton;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"date\":\r\n\t\t\t\trenderer = itemTypes.date;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"spacer\":\r\n\t\t\t\trenderer = itemTypes.spacer;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"button\":\r\n\t\t\t\trenderer = itemTypes.button;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"minicalendar\":\r\n\t\t\t\trenderer = itemTypes.minicalendarButton;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\trenderer = itemTypes.view;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t} else if(config.rows) {\r\n\t\trenderer = itemTypes.rows_container;\r\n\t} else if(config.cols) {\r\n\t\trenderer = itemTypes.row;\r\n\t}\r\n\treturn renderer;\r\n}\r\n\r\nfunction renderElement(config){\r\n\tvar renderer = findRenderer(config);\r\n\tif(!renderer){\r\n\t\treturn;\r\n\t}\r\n\tvar element = renderer(config);\r\n\tif(config.css){\r\n\t\telement.classList.add(config.css);\r\n\t}\r\n\tif(config.width){\r\n\t\tvar value = config.width;\r\n\t\tif(value === value * 1){\r\n\t\t\tvalue += \"px\";\r\n\t\t}\r\n\t\telement.style.width = value;\r\n\t}\r\n\tif(config.height){\r\n\t\tvar value = config.height;\r\n\t\tif(value === value * 1){\r\n\t\t\tvalue += \"px\";\r\n\t\t}\r\n\t\telement.style.height = value;\r\n\t}\r\n\tif (config.click) {\r\n\t\tscheduler.event(element, \"click\", config.click);\r\n\t}\r\n\tif (config.html) {\r\n\t\telement.innerHTML = config.html;\r\n\t}\r\n\r\n\tif (config.align) {\r\n\t\tvar value = \"\";\r\n\t\tif (config.align == \"right\") {\r\n\t\t\tvalue = \"flex-end\";\r\n\t\t} else if(config.align == \"left\") {\r\n\t\t\tvalue = \"flex-start\";\r\n\t\t}\r\n\t\telement.style.justifyContent = value;\r\n\t}\r\n\treturn element;\r\n}\r\n\r\nfunction prepareConfig(config) {\r\n\tif (typeof config === \"string\") {\r\n\t\tconfig = {\r\n\t\t\tview: config\r\n\t\t};\r\n\t}\r\n\tif (!config.view && !config.rows && !config.cols) {\r\n\t\tconfig.view = \"button\";\r\n\t}\r\n\treturn config;\r\n}\r\n\r\nfunction renderLayout(config) {\r\n\tvar fragment = document.createDocumentFragment();\r\n\tvar items;\r\n\tif(Array.isArray(config)){\r\n\t\titems = config;\r\n\t}else{\r\n\t\titems = [config];\r\n\t}\r\n\r\n\tfor (var i = 0; i < items.length; i++) {\r\n\t\tvar view = prepareConfig(items[i]);\r\n\r\n\t\tif(view.view === \"day\" && items[i + 1]){\r\n\t\t\tvar next = prepareConfig(items[i + 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"month\"){\r\n\t\t\t\tview.$firstTab = true;\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(view.view === \"week\" && items[i - 1]){\r\n\t\t\tvar next = prepareConfig(items[i + 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"month\"){\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(view.view === \"month\" && items[i - 1]){\r\n\t\t\tvar next = prepareConfig(items[i - 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"day\"){\r\n\t\t\t\tview.$lastTab = true;\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar element = renderElement(view);\r\n\r\n\t\tfragment.appendChild(element);\r\n\t\tif(view.cols || view.rows){\r\n\t\t\telement.appendChild(renderLayout(view.cols || view.rows));\r\n\t\t}\r\n\t}\r\n\treturn fragment;\r\n}\r\n\r\nscheduler._init_nav_bar = function (items) {\r\n\tvar navBar = this.$container.querySelector(\".dhx_cal_navline\");\r\n\tif (!navBar){\r\n\t\tnavBar = document.createElement(\"div\");\r\n\t\tnavBar.className = \"dhx_cal_navline dhx_cal_navline_flex\";\r\n\t\tscheduler._update_nav_bar(items, navBar);\r\n\t\treturn navBar;\r\n\t}\r\n\treturn navBar;\r\n};\r\n\r\nvar previousNavbar = null;\r\nvar previousHeight = null;\r\nscheduler._update_nav_bar = function (config, container) {\r\n\r\n\tif(!config){\r\n\t\treturn;\r\n\t}\r\n\tvar heightChanged = false;\r\n\tvar configChanged = false;\r\n\r\n\tvar newHeight = config.height || scheduler.xy.nav_height;\r\n\r\n\tif(previousHeight === null ||\r\n\t\t\t(previousHeight !== newHeight)){\r\n\t\theightChanged = true;\r\n\t}\r\n\tif(!previousNavbar || JSON.stringify(config) !== previousNavbar){\r\n\t\tconfigChanged = true;\r\n\t}\r\n\r\n\tif(heightChanged){\r\n\t\tscheduler.xy.nav_height = newHeight;\r\n\t}\r\n\tif(configChanged){\r\n\t\tcontainer.innerHTML = \"\";\r\n\t\tcontainer.appendChild(renderLayout(config));\r\n\t}\r\n\r\n\tif(heightChanged || configChanged){\r\n\t\tscheduler.unset_actions();\r\n\t\tscheduler._els = [];\r\n\t\tscheduler.get_elements();\r\n\t\tscheduler.set_actions();\r\n\t}\r\n\r\n\tif(newHeight === 0){\r\n\t\tcontainer.style.display = \"none\";\r\n\t}else{\r\n\t\tcontainer.style.display = \"\";\r\n\t}\r\n\r\n\tpreviousHeight = newHeight;\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\tfunction isAttachedNode(container){\r\n\t\tvar root = document.body;\r\n\t\r\n\t\twhile(container && container != root){\r\n\t\t\tcontainer = container.parentNode;\r\n\t\t}\r\n\t\r\n\t\treturn !!(root == container);\r\n\t}\r\n\t\r\n\tfunction getWindowSize(window){\r\n\t\treturn {\r\n\t\t\tw : window.innerWidth || document.documentElement.clientWidth,\r\n\t\t\th : window.innerHeight || document.documentElement.clientHeight\r\n\t\t};\r\n\t}\r\n\tfunction equals(a,b){\r\n\t\treturn a.w == b.w && a.h == b.h;\r\n\t}\r\n\t\r\n\tfunction listenWindowResize(scheduler, window){\r\n\t\tvar oldSize = getWindowSize(window);\r\n\t\tvar resizeDelay;\r\n\t\tscheduler.event(window, \"resize\", function(){\r\n\t\t\tclearTimeout(resizeDelay);\r\n\t\t\tresizeDelay = setTimeout(function(){\r\n\r\n\t\t\t\tif (!isAttachedNode(scheduler.$container) || scheduler.$destroyed){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tvar newSize = getWindowSize(window);\r\n\t\t\t\t// element may be resized by container-autoresize exteinsion\r\n\t\t\t\t// check if the size is actually changed in order to not to get endless loop\r\n\t\t\t\tif (!equals(oldSize, newSize)) {\r\n\t\t\t\t\toldSize = newSize;\r\n\t\t\t\t\ttriggerSchedulerResize(scheduler);\r\n\t\t\t\t}\r\n\t\t\t}, 150);\r\n\t\t});\r\n\t}\r\n\t\r\n\tfunction triggerSchedulerResize(scheduler){\r\n\t\tif(scheduler.$destroyed || !scheduler.$root || !isAttachedNode(scheduler.$root)){\r\n\t\t\treturn;\t\r\n\t\t}\r\n\t\tif (scheduler.callEvent(\"onSchedulerResize\", [])) {\r\n\t\t\tscheduler.updateView();\r\n\t\t\tscheduler.callEvent(\"onAfterSchedulerResize\", []);\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction watchNodeResize(scheduler){\r\n\t\tvar previousHeight = scheduler.$root.offsetHeight;\r\n\t\tvar previousWidth = scheduler.$root.offsetWidth;\r\n\t\t\r\n\t\tfunction lowlevelResizeWatcher(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(scheduler.$root){\r\n\t\t\t\tif (scheduler.$root.offsetHeight != previousHeight ||\r\n\t\t\t\t\tscheduler.$root.offsetWidth != previousWidth){\r\n\t\t\t\t\ttriggerSchedulerResize(scheduler);\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\tpreviousHeight = scheduler.$root.offsetHeight;\r\n\t\t\t\tpreviousWidth = scheduler.$root.offsetWidth;\r\n\t\t\t}\r\n\t\r\n\t\t\tsetTimeout(lowlevelResizeWatcher, 200);\r\n\t\t}\r\n\t\t\r\n\t\tlowlevelResizeWatcher();\r\n\t}\r\n\t\r\n\tfunction addResizeListener(scheduler){\r\n\t\tvar root = scheduler.$container;\r\n\t\tvar containerStyles = window.getComputedStyle(root);\r\n\t\tif(containerStyles.getPropertyValue(\"position\") == \"static\"){\r\n\t\t\troot.style.position = \"relative\";\r\n\t\t}\r\n\t\r\n\t\tvar resizeWatcher = document.createElement('iframe');\r\n\t\tresizeWatcher.className = \"scheduler_container_resize_watcher\";\r\n\t\tresizeWatcher.tabIndex = -1;\r\n\t\tif(scheduler.config.wai_aria_attributes){\r\n\t\t\tresizeWatcher.setAttribute(\"role\", \"none\");\r\n\t\t\tresizeWatcher.setAttribute(\"aria-hidden\", true);\r\n\t\t}\r\n\t\r\n\t\t// in some environments (namely, in SalesForce) iframe.contentWindow is not available\r\n\t\tvar salesforce_environment = !!window[\"Sfdc\"] || !!window[\"$A\"] || window[\"Aura\"];\r\n\t\tif(salesforce_environment){\r\n\t\t\twatchNodeResize(scheduler);\r\n\t\t} else {\r\n\t\t\troot.appendChild(resizeWatcher);\r\n\t\t\tif (resizeWatcher.contentWindow) {\r\n\t\t\t\tlistenWindowResize(scheduler, resizeWatcher.contentWindow);\r\n\t\t\t} else {\r\n\t\t\t\t// if so - ditch the iframe and fallback to listening the main window resize\r\n\t\t\t\troot.removeChild(resizeWatcher);\r\n\t\t\t\tlistenWindowResize(scheduler, window);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\taddResizeListener(scheduler);\r\n\r\n}","class EventHost {\r\n\tconstructor(){\r\n\t\tthis._silent_mode = false;\r\n\t\tthis.listeners = {};\r\n\t}\r\n\t_silentStart(){\r\n\t\tthis._silent_mode = true;\r\n\t}\r\n\t_silentEnd() {\r\n\t\tthis._silent_mode = false;\r\n\t}\r\n}\r\n\r\nconst createEventStorage = function(obj) {\r\n\tlet handlers = {};\r\n\tlet index = 0;\r\n\tconst eventStorage = function(){\r\n\t\tlet combinedResult = true;\r\n\t\tfor(const i in handlers){\r\n\t\t\tconst handlerResult = handlers[i].apply(obj, arguments);\r\n\t\t\tcombinedResult=combinedResult && handlerResult;\r\n\t\t}\r\n\t\treturn combinedResult;\r\n\t};\r\n\teventStorage.addEvent=function(handler, settings){\r\n\t\tif (typeof (handler) == \"function\"){\r\n\t\t\tlet handlerId;\r\n\t\t\tif(settings && settings.id){\r\n\t\t\t\thandlerId = settings.id;\r\n\t\t\t}else{\r\n\t\t\t\thandlerId = index;\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\r\n\t\t\tif(settings && settings.once){\r\n\t\t\t\tconst originalHandler = handler;\r\n\t\t\t\thandler = function(){\r\n\t\t\t\t\toriginalHandler();\r\n\t\t\t\t\teventStorage.removeEvent(handlerId);\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\thandlers[handlerId] = handler;\r\n\t\t\treturn handlerId;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\teventStorage.removeEvent=function(id){\r\n\t\tdelete handlers[id];\r\n\t};\r\n\r\n\teventStorage.clear = function(){\r\n\t\thandlers = {};\r\n\t};\r\n\r\n\treturn eventStorage;\r\n};\r\n\r\nfunction makeEventable(obj){\r\n\r\n\tconst eventHost = new EventHost();\r\n\tobj.attachEvent=function(eventName, handler, settings){\r\n\t\teventName = 'ev_'+eventName.toLowerCase();\r\n\t\tif (!eventHost.listeners[eventName]){\r\n\t\t\teventHost.listeners[eventName] = createEventStorage(this);\r\n\t\t}\r\n\r\n\t\tif(settings && settings.thisObject){\r\n\t\t\thandler = handler.bind(settings.thisObject);\r\n\t\t}\r\n\r\n\t\tconst innerId = eventHost.listeners[eventName].addEvent(handler, settings);\r\n\r\n\t\tlet handlerId = (eventName+':'+innerId); //return ID (ev_eventname:1)\r\n\t\tif(settings && settings.id){\r\n\t\t\thandlerId = settings.id;\r\n\t\t}\r\n\t\treturn handlerId;\r\n\t};\r\n\r\n\tobj.attachAll = function(callback){\r\n\t\tthis.attachEvent('listen_all', callback);\r\n\t};\r\n\r\n\tobj.callEvent=function(name, eventArguments){\r\n\t\tif (eventHost._silent_mode) return true;\r\n\r\n\t\tconst handlerName = 'ev_'+name.toLowerCase();\r\n\r\n\t\tconst listeners = eventHost.listeners;\r\n\t\tif (listeners['ev_listen_all']){\r\n\t\t\tlisteners['ev_listen_all'].apply(this, [name].concat(eventArguments));\r\n\t\t}\r\n\r\n\t\tif (listeners[handlerName])\r\n\t\t\treturn listeners[handlerName].apply(this, eventArguments);\r\n\t\treturn true;\r\n\t};\r\n\r\n\tobj.checkEvent=function(name){\r\n\t\tconst listeners = eventHost.listeners;\r\n\t\treturn (!!listeners['ev_'+name.toLowerCase()]);\r\n\t};\r\n\r\n\tobj.detachEvent=function(id){\r\n\t\tif (id){\r\n\t\t\tlet listeners = eventHost.listeners;\r\n\t\t\tfor(const i in listeners){\r\n\t\t\t\tlisteners[i].removeEvent(id); //remove event\r\n\t\t\t}\r\n\r\n\t\t\tconst list = id.split(':');//get EventName and ID\r\n\t\t\tlisteners = eventHost.listeners;\r\n\t\t\tif(list.length === 2){\r\n\t\t\t\tconst eventName = list[0];\r\n\t\t\t\tconst eventId = list[1];\r\n\t\t\t\tif(listeners[eventName]){\r\n\t\t\t\t\tlisteners[eventName].removeEvent(eventId); //remove event\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tobj.detachAllEvents = function(){\r\n\t\tfor (const name in eventHost.listeners) {\r\n\t\t\teventHost.listeners[name].clear();\r\n\t\t}\r\n\t};\r\n\r\n}\r\n\r\nexport default makeEventable;","export default {\r\n\tevent: function (el, event, handler){\r\n\t\tif (el.addEventListener)\r\n\t\t\tel.addEventListener(event, handler, false);\r\n\t\r\n\t\telse if (el.attachEvent)\r\n\t\t\tel.attachEvent(\"on\"+event, handler);\r\n\t},\r\n\teventRemove: function (el, event, handler){\r\n\t\tif (el.removeEventListener)\r\n\t\t\tel.removeEventListener(event, handler, false);\r\n\t\r\n\t\telse if (el.detachEvent)\r\n\t\t\tel.detachEvent(\"on\"+event, handler);\r\n\t}\r\n};","import createEventScope from './utils/scoped_event';\r\n\r\nexport default function extend(scheduler) {\r\n\r\n\r\nvar domEvents = createEventScope();\r\n\r\nscheduler.event = domEvents.attach;\r\nscheduler.eventRemove = domEvents.detach;\r\nscheduler._eventRemoveAll = domEvents.detachAll;\r\nscheduler._createDomEventScope = domEvents.extend;\r\n\r\n\r\nscheduler._trim = function(str){\r\n\tvar func = String.prototype.trim || function(){ return this.replace(/^\\s+|\\s+$/g, \"\"); };\r\n\treturn func.apply(str);\r\n};\r\n\r\nscheduler._isDate = function(obj){\r\n\tif (obj && typeof obj == \"object\") {\r\n\t\treturn !!(obj.getFullYear && obj.getMonth && obj.getDate);\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n};\r\n\r\nscheduler._isObject = function(obj){\r\n\treturn (obj && typeof obj == \"object\");\r\n};\r\n\r\n}","import defaultDomEvents from './event';\r\n\r\nexport default function(){\r\n\r\n\tvar domEvents = function (addEvent, removeEvent) {\r\n\t\taddEvent = addEvent || defaultDomEvents.event;\r\n\t\tremoveEvent = removeEvent || defaultDomEvents.eventRemove;\r\n\t\tvar handlers = [];\r\n\t\tvar eventScope = {\r\n\t\t\tattach: function(el, event, callback, capture){\r\n\t\t\t\thandlers.push({element: el, event:event, callback: callback, capture: capture});\r\n\t\t\t\taddEvent(el, event, callback, capture);\r\n\t\t\t},\r\n\t\t\tdetach: function(el, event, callback, capture){\r\n\t\t\t\tremoveEvent(el, event, callback, capture);\r\n\t\t\t\tfor(var i = 0; i < handlers.length; i++){\r\n\t\t\t\t\tvar handler = handlers[i];\r\n\t\t\t\t\tif (handler.element === el && handler.event === event && handler.callback === callback && handler.capture === capture) {\r\n\t\t\t\t\t\thandlers.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tdetachAll: function () {\r\n\t\t\t\tvar staticArray = handlers.slice();\r\n\t\t\t\t// original handlers array can be spliced on every iteration\r\n\t\t\t\tfor (var i = 0; i < staticArray.length; i++){\r\n\t\t\t\t\tvar handler = staticArray[i];\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, handler.capture);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, undefined);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, false);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, true);\r\n\t\t\t\t}\r\n\t\t\t\thandlers.splice(0, handlers.length);\r\n\t\t\t},\r\n\t\t\textend: function(){\r\n\t\t\t\treturn domEvents(this.event, this.eventRemove);\r\n\t\t\t}\r\n\t\t};\r\n\t\treturn eventScope;\r\n\t};\r\n\t\r\n\treturn domEvents();\r\n}","//returns position of html element on the page\r\nfunction elementPosition(elem) {\r\n\tvar top=0, left=0, right=0, bottom=0;\r\n\tif (elem.getBoundingClientRect) { //HTML5 method\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\t\tvar body = document.body;\r\n\t\tvar docElem = (document.documentElement ||\r\n\t\t\tdocument.body.parentNode ||\r\n\t\t\tdocument.body);\r\n\r\n\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\t\ttop = box.top + scrollTop - clientTop;\r\n\t\tleft = box.left + scrollLeft - clientLeft;\r\n\r\n\t\tright = document.body.offsetWidth - box.right;\r\n\t\tbottom = document.body.offsetHeight - box.bottom;\r\n\t} else { //fallback to naive approach\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop,10);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft,10);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\r\n\t\tright = document.body.offsetWidth - elem.offsetWidth - left;\r\n\t\tbottom = document.body.offsetHeight - elem.offsetHeight - top;\r\n\t}\r\n\treturn { y: Math.round(top), x: Math.round(left), width:elem.offsetWidth, height:elem.offsetHeight, right: Math.round(right), bottom: Math.round(bottom) };\r\n}\r\n\r\n/*\r\nevent position relatively to DOM element\r\n */\r\nfunction getRelativeEventPosition(ev, node){\r\n\tvar d = document.documentElement;\r\n\tvar box = elementPosition(node);\r\n\r\n\treturn {\r\n\t\tx: ev.clientX - d.clientLeft - box.x + node.scrollLeft,\r\n\t\ty: ev.clientY - d.clientTop - box.y + node.scrollTop\r\n\t};\r\n}\r\n\r\nfunction getNodePosition(elem) {\r\n\tvar top=0, left=0, right=0, bottom=0;\r\n\tif (elem.getBoundingClientRect) { //HTML5 method\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\t\tvar body = document.body;\r\n\t\tvar docElem = (document.documentElement ||\r\n\t\t\tdocument.body.parentNode ||\r\n\t\t\tdocument.body);\r\n\r\n\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\t\ttop = box.top + scrollTop - clientTop;\r\n\t\tleft = box.left + scrollLeft - clientLeft;\r\n\r\n\t\tright = document.body.offsetWidth - box.right;\r\n\t\tbottom = document.body.offsetHeight - box.bottom;\r\n\t} else { //fallback to naive approach\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop,10);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft,10);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\r\n\t\tright = document.body.offsetWidth - elem.offsetWidth - left;\r\n\t\tbottom = document.body.offsetHeight - elem.offsetHeight - top;\r\n\t}\r\n\treturn { y: Math.round(top), x: Math.round(left), width:elem.offsetWidth, height:elem.offsetHeight, right: Math.round(right), bottom: Math.round(bottom) };\r\n}\r\n\r\nfunction getClassName(node){\r\n\tif(!node) return \"\";\r\n\r\n\tvar className = node.className || \"\";\r\n\tif(className.baseVal)//'className' exist but not a string - IE svg element in DOM\r\n\t\tclassName = className.baseVal;\r\n\r\n\tif(!className.indexOf)\r\n\t\tclassName = '';\r\n\r\n\treturn className || \"\";\r\n}\r\n\r\nfunction getTargetNode(e) {\r\n\tvar trg;\r\n\tif (e.tagName)\r\n\t\ttrg = e;\r\n\telse {\r\n\t\te = e || window.event;\r\n\t\ttrg = e.target || e.srcElement;\r\n\t\tif (trg.shadowRoot && e.composedPath) {\r\n\t\t\ttrg = e.composedPath()[0];\r\n\t\t}\r\n\t}\r\n\treturn trg;\r\n}\r\n\r\nfunction locateCss(e, classname, strict){\r\n\tif(strict === undefined)\r\n\t\tstrict = true;\r\n\r\n\tvar trg = e.target || e.srcElement;\r\n\tvar css = '';\r\n\r\n\twhile (trg){\r\n\t\tcss = getClassName(trg);\r\n\r\n\t\tif(css){\r\n\t\t\tvar ind = css.indexOf(classname);\r\n\t\t\tif (ind >= 0){\r\n\t\t\t\tif (!strict)\r\n\t\t\t\t\treturn trg;\r\n\r\n\t\t\t\t//check that we have exact match\r\n\t\t\t\tvar left = (ind === 0) || (!((css.charAt(ind - 1)||\"\").trim()));\r\n\t\t\t\tvar right = ((ind + classname.length >= css.length)) || (!((css.charAt(ind + classname.length)).trim()));\r\n\r\n\t\t\t\tif (left && right)\r\n\t\t\t\t\treturn trg;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttrg=trg.parentNode;\r\n\t}\r\n\treturn null;\r\n}\r\n\r\n\r\n// get focusable nodes\r\nfunction isVisible(node){\r\n\tvar display = false,\r\n\t\tvisibility = false;\r\n\tif(window.getComputedStyle){\r\n\t\tvar style = window.getComputedStyle(node, null);\r\n\t\tdisplay = style[\"display\"];\r\n\t\tvisibility = style[\"visibility\"];\r\n\t}else if(node.currentStyle){\r\n\t\tdisplay = node.currentStyle[\"display\"];\r\n\t\tvisibility = node.currentStyle[\"visibility\"];\r\n\t}\r\n\r\n\tvar hiddenSection = false;\r\n\tvar recurringSection = locateCss({target:node}, \"dhx_form_repeat\", false);\r\n\tif(recurringSection){\r\n\t\thiddenSection = !!(recurringSection.style.height == \"0px\");\r\n\t}\r\n\thiddenSection = hiddenSection || !(node.offsetHeight);\r\n\r\n\treturn (display != \"none\" && visibility != \"hidden\" && !hiddenSection);\r\n}\r\n\r\nfunction hasNonNegativeTabIndex(node){\r\n\treturn !isNaN(node.getAttribute(\"tabindex\")) && (node.getAttribute(\"tabindex\")*1 >= 0);\r\n}\r\n\r\nfunction hasHref(node){\r\n\tvar canHaveHref = {\"a\": true, \"area\": true};\r\n\tif(canHaveHref[node.nodeName.loLowerCase()]){\r\n\t\treturn !!node.getAttribute(\"href\");\r\n\t}\r\n\treturn true;\r\n}\r\n\r\nfunction isEnabled(node){\r\n\tvar canDisable = {\"input\":true, \"select\":true, \"textarea\":true, \"button\":true, \"object\":true};\r\n\tif(canDisable[node.nodeName.toLowerCase()]){\r\n\t\treturn !node.hasAttribute(\"disabled\");\r\n\t}\r\n\r\n\treturn true;\r\n}\r\n\r\n\r\nfunction getFocusableNodes(root){\r\n\tvar nodes = root.querySelectorAll([\r\n\t\t\"a[href]\",\r\n\t\t\"area[href]\",\r\n\t\t\"input\",\r\n\t\t\"select\",\r\n\t\t\"textarea\",\r\n\t\t\"button\",\r\n\t\t\"iframe\",\r\n\t\t\"object\",\r\n\t\t\"embed\",\r\n\t\t\"[tabindex]\",\r\n\t\t\"[contenteditable]\"\r\n\t].join(\", \"));\r\n\r\n\tvar nodesArray = Array.prototype.slice.call(nodes, 0);\r\n\t\r\n\tfor(var i = 0; i < nodesArray.length; i++){\r\n\t\tnodesArray[i].$position = i;\r\n\t\t// we remember original nodes order, \r\n\t\t// so when we sort them by tabindex we ensure order of nodes with same tabindex is preserved, \r\n\t\t// since some browsers do unstable sort\r\n\t}\r\n\t\r\n\tnodesArray.sort(function(a, b) {\r\n\t\tif(a.tabIndex === 0 && b.tabIndex !== 0){\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\tif(a.tabIndex !== 0 && b.tabIndex === 0){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\t\r\n\t\tif (a.tabIndex === b.tabIndex){\r\n\t\t\t// ensure we do stable sort\r\n\t\t\treturn a.$position - b.$position;\r\n\t\t}\r\n\t\tif (a.tabIndex < b.tabIndex) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn 1;\r\n\t});\r\n\t\r\n\tfor(var i = 0; i < nodesArray.length; i++){\r\n\t\tvar node = nodesArray[i];\r\n\t\tvar isValid = (hasNonNegativeTabIndex(node) || isEnabled(node) || hasHref(node)) && isVisible(node);\r\n\t\tif(!isValid){\r\n\t\t\tnodesArray.splice(i, 1);\r\n\t\t\ti--;\r\n\t\t}\r\n\t}\r\n\treturn nodesArray;\r\n}\r\n\r\n\r\nfunction isShadowDomSupported() {\r\n\treturn document.head.createShadowRoot || document.head.attachShadow;\r\n}\r\n\r\n/**\r\n * Returns element that has the browser focus, or null if no element has focus.\r\n * Works with shadow DOM, so it's prefereed to use this function instead of document.activeElement directly.\r\n * @returns HTMLElement\r\n */\r\nfunction getActiveElement(){\r\n\tvar activeElement = document.activeElement;\r\n\tif (activeElement.shadowRoot) {\r\n\t\tactiveElement = activeElement.shadowRoot.activeElement;\r\n\t}\r\n\tif (activeElement === document.body && document.getSelection) {\r\n\t\tactiveElement = document.getSelection().focusNode || document.body;\r\n\t}\r\n\r\n\treturn activeElement;\r\n}\r\n\r\n/**\r\n * Returns document.body or the host node of the ShadowRoot, if the element is attached to ShadowDom\r\n * @param {HTMLElement} element \r\n * @returns HTMLElement\r\n */\r\nfunction getRootNode(element) {\r\n\tif (!element) {\r\n\t\treturn document.body;\r\n\t}\r\n\tif (!isShadowDomSupported()) {\r\n\t\treturn document.body;\r\n\t}\r\n\twhile (element.parentNode && (element = element.parentNode)) {\r\n\t\tif (element instanceof ShadowRoot) {\r\n\t\t\treturn element.host;\r\n\t\t}\r\n\t}\r\n\treturn document.body;\r\n}\r\n\r\nfunction hasShadowParent(element) {\r\n\treturn !!getRootNode(element);\r\n}\r\n\r\nexport default {\r\n\t/**\r\n\t * @desc: Calculate absolute position of html object\r\n\t * @type: private\r\n\t * @param: htmlObject - html object\r\n\t * @topic: 0\r\n\t */\r\n\tgetAbsoluteLeft: function getAbsoluteLeft(htmlObject){\r\n\t\treturn this.getOffset(htmlObject).left;\r\n\t},\r\n\t/**\r\n\t * @desc: Calculate absolute position of html object\r\n\t * @type: private\r\n\t * @param: htmlObject - html object\r\n\t * @topic: 0\r\n\t */\r\n\tgetAbsoluteTop: function getAbsoluteTop(htmlObject){\r\n\t\treturn this.getOffset(htmlObject).top;\r\n\t},\r\n\r\n\tgetOffsetSum: function getOffsetSum(elem) {\r\n\t\tvar top=0, left=0;\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\t\treturn {top: top, left: left};\r\n\t},\r\n\r\n\tgetOffsetRect: function getOffsetRect(elem) {\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\r\n\t\tvar top = 0,\r\n\t\t\tleft = 0;\r\n\r\n\t\t// https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#Mobile_Tablet_or_Desktop\r\n\t\tif (!/Mobi/.test(navigator.userAgent)) {\r\n\t\t\tvar body = document.body;\r\n\t\t\tvar docElem = document.documentElement;\r\n\t\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\r\n\t\t\ttop = box.top + scrollTop - clientTop;\r\n\t\t\tleft = box.left + scrollLeft - clientLeft;\r\n\t\t}else {\r\n\t\t\t// incorrect left coordinate on mobile zoom\r\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=489206\r\n\r\n\t\t\tvar dummy = document.createElement(\"div\");\r\n\t\t\tdummy.style.position=\"absolute\";\r\n\t\t\tdummy.style.left=\"0px\";\r\n\t\t\tdummy.style.top=\"0px\";\r\n\t\t\tdummy.style.width=\"1px\";\r\n\t\t\tdummy.style.height = \"1px\";\r\n\r\n\t\t\tdocument.body.appendChild(dummy);\r\n\t\t\tvar dummyBox = dummy.getBoundingClientRect();\r\n\t\t\ttop = box.top - dummyBox.top;\r\n\t\t\tleft = box.left - dummyBox.left;\r\n\r\n\t\t\tdummy.parentNode.removeChild(dummy);\r\n\t\t}\r\n\r\n\t\treturn { top: Math.round(top), left: Math.round(left) };\r\n\t},\r\n\r\n\tgetOffset: function getOffset(elem) {\r\n\t\tif (elem.getBoundingClientRect) {\r\n\t\t\treturn this.getOffsetRect(elem);\r\n\t\t} else {\r\n\t\t\treturn this.getOffsetSum(elem);\r\n\t\t}\r\n\t},\r\n\r\n\tclosest: function(element, selector){\r\n\t\tif(!element || !selector){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn closest(element, selector);\r\n\t},\r\n\tinsertAfter: function(newNode, referenceNode){\r\n\t\tif(referenceNode.nextSibling){\r\n\t\t\treferenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);\r\n\t\t}else{\r\n\t\t\treferenceNode.parentNode.appendChild(newNode);\r\n\t\t}\r\n\t},\r\n\tremove: function(node) {\r\n\t\tif (node && node.parentNode) {\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t}\r\n\t},\r\n\tisChildOf: function(child, parent) {\r\n\t\treturn parent.contains(child);\r\n\t},\r\n\tgetFocusableNodes,\r\n\tgetClassName,\r\n\tlocateCss,\r\n\tgetRootNode,\r\n\thasShadowParent,\r\n\tisShadowDomSupported,\r\n\tgetActiveElement,\r\n\tgetRelativeEventPosition,\r\n\tgetTargetNode,\r\n\tgetNodePosition\r\n};\r\n\r\nvar closest;\r\nif(Element.prototype.closest){\r\n\tclosest = function(element, selector){\r\n\t\treturn element.closest(selector);\r\n\t};\r\n}else{\r\n\tvar matches = Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\r\n\tclosest = function(element, selector) {\r\n\t\tvar el = element;\r\n\t\tdo {\r\n\t\t\tif (matches.call(el, selector)){\r\n\t\t\t\treturn el;\r\n\t\t\t}\r\n\t\t\tel = el.parentElement || el.parentNode;\r\n\t\t} while (el !== null && el.nodeType === 1);\r\n\t\treturn null;\r\n\t};\r\n}\r\n","/* eslint-disable no-restricted-globals */\r\nvar isWindowAwailable = typeof window !== \"undefined\";\r\n\r\n/* eslint-enable no-restricted-globals */\r\n\r\nexport default {\r\n\tisIE: isWindowAwailable && (navigator.userAgent.indexOf(\"MSIE\") >= 0 || navigator.userAgent.indexOf(\"Trident\") >= 0),\r\n\tisOpera: isWindowAwailable && (navigator.userAgent.indexOf(\"Opera\") >= 0),\r\n\tisChrome: isWindowAwailable && (navigator.userAgent.indexOf(\"Chrome\") >= 0),\r\n\tisKHTML: isWindowAwailable && (navigator.userAgent.indexOf(\"Safari\") >= 0 || navigator.userAgent.indexOf(\"Konqueror\") >= 0),\r\n\tisFF: isWindowAwailable && (navigator.userAgent.indexOf(\"Firefox\") >= 0),\r\n\tisIPad: isWindowAwailable && (navigator.userAgent.search(/iPad/gi) >= 0),\r\n\tisEdge: isWindowAwailable && (navigator.userAgent.indexOf(\"Edge\")!=-1),\r\n\tisNode: (!isWindowAwailable || typeof navigator == \"undefined\")\r\n};","export default function(data) {\r\n\tif (typeof data === \"string\" || typeof data === \"number\") {\r\n\t\treturn data;\r\n\t}\r\n\tvar result = \"\";\r\n\tfor (var key in data) {\r\n\t\tvar serialized = \"\";\r\n\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\tif (typeof data[key] === \"string\") {\r\n\t\t\t\tserialized = encodeURIComponent(data[key]);\r\n\t\t\t} else if (typeof data[key] === \"number\") {\r\n\t\t\t\tserialized = data[key];\r\n\t\t\t} else {\r\n\t\t\t\tserialized = encodeURIComponent(JSON.stringify(data[key]));\r\n\t\t\t}\r\n\t\t\tserialized = key + \"=\" + serialized;\r\n\r\n\t\t\tif (result.length) {\r\n\t\t\t\tserialized = \"&\" + serialized;\r\n\t\t\t}\r\n\t\t\tresult += serialized;\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n}","export default function extend(scheduler) {\r\n\r\nvar generateStringToDate = function (format, utc) {\r\n\tvar splt = \"var temp=date.match(/[a-zA-Z]+|[0-9]+/g);\";\r\n\tvar mask = format.match(/%[a-zA-Z]/g);\r\n\tfor (var i = 0; i < mask.length; i++) {\r\n\t\tswitch (mask[i]) {\r\n\t\t\tcase \"%j\":\r\n\t\t\tcase \"%d\": splt += \"set[2]=temp[\" + i + \"]||1;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%n\":\r\n\t\t\tcase \"%m\": splt += \"set[1]=(temp[\" + i + \"]||1)-1;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%y\": splt += \"set[0]=temp[\" + i + \"]*1+(temp[\" + i + \"]>50?1900:2000);\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%g\":\r\n\t\t\tcase \"%G\":\r\n\t\t\tcase \"%h\":\r\n\t\t\tcase \"%H\":\r\n\t\t\t\tsplt += \"set[3]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%i\":\r\n\t\t\t\tsplt += \"set[4]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%Y\": splt += \"set[0]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%a\":\r\n\t\t\tcase \"%A\": splt += \"set[3]=set[3]%12+((temp[\" + i + \"]||'').toLowerCase()=='am'?0:12);\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%s\": splt += \"set[5]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%M\": splt += \"set[1]=this.locale.date.month_short_hash[temp[\" + i + \"]]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%F\": splt += \"set[1]=this.locale.date.month_full_hash[temp[\" + i + \"]]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\tvar code = \"set[0],set[1],set[2],set[3],set[4],set[5]\";\r\n\tif (utc) code = \" Date.UTC(\" + code + \")\";\r\n\treturn new Function(\"date\", \"var set=[0,0,1,0,0,0]; \" + splt + \" return new Date(\" + code + \");\");\r\n};\r\nvar csp_date_to_str = function (format, utc) {\r\n\treturn function(date) {\r\n\t\treturn format.replace(/%[a-zA-Z]/g, function (a) {\r\n\t\t\tswitch (a) {\r\n\t\t\t\tcase \"%d\": return utc ? scheduler.date.to_fixed(date.getUTCDate()) : scheduler.date.to_fixed(date.getDate());\r\n\t\t\t\tcase \"%m\": return utc ? scheduler.date.to_fixed((date.getUTCMonth() + 1)) : scheduler.date.to_fixed((date.getMonth() + 1));\r\n\t\t\t\tcase \"%j\": return utc ? date.getUTCDate() : date.getDate();\r\n\t\t\t\tcase \"%n\": return utc ? (date.getUTCMonth() + 1) : (date.getMonth() + 1);\r\n\t\t\t\tcase \"%y\": return utc ? scheduler.date.to_fixed(date.getUTCFullYear() % 100) : scheduler.date.to_fixed(date.getFullYear() % 100);\r\n\t\t\t\tcase \"%Y\": return utc ? date.getUTCFullYear() : date.getFullYear();\r\n\t\t\t\tcase \"%D\": return utc ? scheduler.locale.date.day_short[date.getUTCDay()] : scheduler.locale.date.day_short[date.getDay()];\r\n\t\t\t\tcase \"%l\": return utc ? scheduler.locale.date.day_full[date.getUTCDay()] : scheduler.locale.date.day_full[date.getDay()];\r\n\t\t\t\tcase \"%M\": return utc ? scheduler.locale.date.month_short[date.getUTCMonth()] : scheduler.locale.date.month_short[date.getMonth()];\r\n\t\t\t\tcase \"%F\": return utc ? scheduler.locale.date.month_full[date.getUTCMonth()] : scheduler.locale.date.month_full[date.getMonth()];\r\n\t\t\t\tcase \"%h\": return utc ? scheduler.date.to_fixed((date.getUTCHours() + 11) % 12 + 1) : scheduler.date.to_fixed((date.getHours() + 11) % 12 + 1);\r\n\t\t\t\tcase \"%g\": return utc ? ((date.getUTCHours() + 11) % 12 + 1) : ((date.getHours() + 11) % 12 + 1);\r\n\t\t\t\tcase \"%G\": return utc ? date.getUTCHours() : date.getHours();\r\n\t\t\t\tcase \"%H\": return utc ? scheduler.date.to_fixed(date.getUTCHours()) : scheduler.date.to_fixed(date.getHours());\r\n\t\t\t\tcase \"%i\": return utc ? scheduler.date.to_fixed(date.getUTCMinutes()) : scheduler.date.to_fixed(date.getMinutes());\r\n\t\t\t\tcase \"%a\": return utc ? (date.getUTCHours() > 11 ? \"pm\" : \"am\") : (date.getHours() > 11 ? \"pm\" : \"am\");\r\n\t\t\t\tcase \"%A\": return utc ? (date.getUTCHours() > 11 ? \"PM\" : \"AM\") : (date.getHours() > 11 ? \"PM\" : \"AM\");\r\n\t\t\t\tcase \"%s\": return utc ? scheduler.date.to_fixed(date.getUTCSeconds()) : scheduler.date.to_fixed(date.getSeconds());\r\n\t\t\t\tcase \"%W\": return utc ? scheduler.date.to_fixed(scheduler.date.getUTCISOWeek(date)) : scheduler.date.to_fixed(scheduler.date.getISOWeek(date));\r\n\t\t\t\tdefault: return a;\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n};\r\nvar csp_str_to_date = function (format, utc) {\r\n\tconst mask = format.match(/%[a-zA-Z]/g);\r\n\treturn function (date){\r\n\t\tvar set = [0, 0, 1, 0, 0, 0];\r\n\t\tvar temp = date.match(/[a-zA-Z]+|[0-9]+/g);\r\n\r\n\t\tfor (var i = 0; i < mask.length; i++) {\r\n\t\t\tswitch (mask[i]) {\r\n\t\t\t\tcase \"%j\":\r\n\t\t\t\tcase \"%d\":\r\n\t\t\t\t\tset[2] = temp[i] || 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%n\":\r\n\t\t\t\tcase \"%m\":\r\n\t\t\t\t\tset[1] = (temp[i] || 1) - 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%y\":\r\n\t\t\t\t\tset[0] = temp[i] * 1 + (temp[i] > 50 ? 1900 : 2000);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%g\":\r\n\t\t\t\tcase \"%G\":\r\n\t\t\t\tcase \"%h\":\r\n\t\t\t\tcase \"%H\":\r\n\t\t\t\t\tset[3] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%i\":\r\n\t\t\t\t\tset[4] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\tset[0] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%a\":\r\n\t\t\t\tcase \"%A\":\r\n\t\t\t\t\tset[3] = set[3] % 12 + ((temp[i] || '').toLowerCase() == 'am' ? 0 : 12);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%s\":\r\n\t\t\t\t\tset[5] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%M\":\r\n\t\t\t\t\tset[1] = scheduler.locale.date.month_short_hash[temp[i]] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%F\":\r\n\t\t\t\t\tset[1] = scheduler.locale.date.month_full_hash[temp[i]] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (utc) {\r\n\t\t\treturn new Date(Date.UTC(set[0], set[1], set[2], set[3], set[4], set[5]));\r\n\t\t}\r\n\r\n\t\treturn new Date(set[0], set[1], set[2], set[3], set[4], set[5]);\r\n\t};\r\n};\r\n\r\nlet cspEnabled = undefined;\r\nfunction checkIfCSPEnabled(){\r\n\ttry {\r\n\t\tnew Function(\"cspEnabled = false;\");\r\n\t\tcspEnabled = false;\r\n\t} catch(e) {\r\n\t\tcspEnabled = true;\r\n\t}\r\n\treturn cspEnabled;\r\n}\r\n\r\nfunction useCsp() {\r\n\tvar result = false;\r\n\tif (scheduler.config.csp === \"auto\") {\r\n\t\tif(cspEnabled === undefined){\r\n\t\t\tcspEnabled = checkIfCSPEnabled();\r\n\t\t}\r\n\t\tresult = cspEnabled;\r\n\t} else {\r\n\t\tresult = scheduler.config.csp;\r\n\t}\r\n\treturn result;\r\n}\r\nscheduler.date = {\r\n\tinit:function(){\r\n\t\tvar s = scheduler.locale.date.month_short;\r\n\t\tvar t = scheduler.locale.date.month_short_hash = {};\r\n\t\tfor (var i = 0; i < s.length; i++)\r\n\t\t\tt[s[i]]=i;\r\n\r\n\t\tvar s = scheduler.locale.date.month_full;\r\n\t\tvar t = scheduler.locale.date.month_full_hash = {};\r\n\t\tfor (var i = 0; i < s.length; i++)\r\n\t\t\tt[s[i]]=i;\r\n\t},\r\n\tdate_part:function(date){\r\n\t\tvar old = new Date(date);\r\n\t\tdate.setHours(0);\r\n\t\tdate.setMinutes(0);\r\n\t\tdate.setSeconds(0);\r\n\t\tdate.setMilliseconds(0);\r\n\t\tif (date.getHours() && //shift to yesterday on dst\r\n\t\t\t(date.getDate() < old.getDate() || date.getMonth() < old.getMonth() || date.getFullYear() < old.getFullYear()) )\r\n\t\t\tdate.setTime(date.getTime() + 60 * 60 * 1000 * (24 - date.getHours()));\r\n\t\treturn date;\r\n\t},\r\n\ttime_part:function(date){\r\n\t\treturn (date.valueOf()/1000 - date.getTimezoneOffset()*60)%86400;\r\n\t},\r\n\tweek_start:function(date){\r\n\t\tvar shift=date.getDay();\r\n\t\tif (scheduler.config.start_on_monday){\r\n\t\t\tif (shift===0) shift=6;\r\n\t\t\telse shift--;\r\n\t\t}\r\n\t\treturn this.date_part(this.add(date,-1*shift,\"day\"));\r\n\t},\r\n\tmonth_start:function(date){\r\n\t\tdate.setDate(1);\r\n\t\treturn this.date_part(date);\r\n\t},\r\n\tyear_start:function(date){\r\n\t\tdate.setMonth(0);\r\n\t\treturn this.month_start(date);\r\n\t},\r\n\tday_start:function(date){\r\n\t\treturn this.date_part(date);\r\n\t},\r\n\t_add_days:function(date, inc){\r\n\t\tvar ndate = new Date(date.valueOf());\r\n\r\n\t\tndate.setDate(ndate.getDate() + inc);\r\n\r\n\t\t// Workaround for Safari/iOS timezone bug, ref:OKZ-149693\r\n\t\tif(inc == Math.round(inc) && inc > 0){\r\n\t\t\tvar datesDiff = +ndate - +date,\r\n\t\t\t\trest = datesDiff % (24*60*60*1000);\r\n\t\t\tif(rest && date.getTimezoneOffset() == ndate.getTimezoneOffset()){\r\n\t\t\t\tvar hours = rest / (60* 60 * 1000);\r\n\t\t\t\tndate.setTime(ndate.getTime() + (24 - hours) * 60 * 60 * 1000);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (inc >= 0 && (!date.getHours() && ndate.getHours()) &&//shift to yesterday on dst\r\n\t\t\t(ndate.getDate() < date.getDate() || ndate.getMonth() < date.getMonth() || ndate.getFullYear() < date.getFullYear()) )\r\n\t\t\tndate.setTime(ndate.getTime() + 60 * 60 * 1000 * (24 - ndate.getHours()));\r\n\t\treturn ndate;\r\n\t},\r\n\tadd:function(date,inc,mode){\r\n\t\tvar ndate=new Date(date.valueOf());\r\n\t\tswitch(mode){\r\n\t\t\tcase \"day\":\r\n\t\t\t\tndate = scheduler.date._add_days(ndate, inc);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"week\":\r\n\t\t\t\tndate = scheduler.date._add_days(ndate, inc * 7);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"month\": ndate.setMonth(ndate.getMonth()+inc); break;\r\n\t\t\tcase \"year\": ndate.setYear(ndate.getFullYear()+inc); break;\r\n\t\t\tcase \"hour\":\r\n\t\t\t\t/*\r\n\t\t\t\t setHour(getHour() + inc) and setMinutes gives weird result when is applied on a Daylight Saving time switch\r\n\t\t\t\t setTime seems working as expected\r\n\t\t\t\t*/\r\n\t\t\t\tndate.setTime(ndate.getTime() + inc * 60 * 60 * 1000);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"minute\":\r\n\t\t\t\tndate.setTime(ndate.getTime() + inc * 60 * 1000);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\treturn scheduler.date[\"add_\"+mode](date,inc,mode);\r\n\t\t}\r\n\t\treturn ndate;\r\n\t},\r\n\tto_fixed:function(num){\r\n\t\tif (num<10)\treturn \"0\"+num;\r\n\t\treturn num;\r\n\t},\r\n\tcopy:function(date){\r\n\t\treturn new Date(date.valueOf());\r\n\t},\r\n\tdate_to_str:function(format,utc){\r\n\t\tif (useCsp()) {\r\n\t\t\treturn csp_date_to_str(format,utc);\r\n\t\t}\r\n\r\n\t\tformat=format.replace(/%[a-zA-Z]/g,function(a){\r\n\t\t\tswitch(a){\r\n\t\t\t\tcase \"%d\": return \"\\\"+this.date.to_fixed(date.getDate())+\\\"\";\r\n\t\t\t\tcase \"%m\": return \"\\\"+this.date.to_fixed((date.getMonth()+1))+\\\"\";\r\n\t\t\t\tcase \"%j\": return \"\\\"+date.getDate()+\\\"\";\r\n\t\t\t\tcase \"%n\": return \"\\\"+(date.getMonth()+1)+\\\"\";\r\n\t\t\t\tcase \"%y\": return \"\\\"+this.date.to_fixed(date.getFullYear()%100)+\\\"\";\r\n\t\t\t\tcase \"%Y\": return \"\\\"+date.getFullYear()+\\\"\";\r\n\t\t\t\tcase \"%D\": return \"\\\"+this.locale.date.day_short[date.getDay()]+\\\"\";\r\n\t\t\t\tcase \"%l\": return \"\\\"+this.locale.date.day_full[date.getDay()]+\\\"\";\r\n\t\t\t\tcase \"%M\": return \"\\\"+this.locale.date.month_short[date.getMonth()]+\\\"\";\r\n\t\t\t\tcase \"%F\": return \"\\\"+this.locale.date.month_full[date.getMonth()]+\\\"\";\r\n\t\t\t\tcase \"%h\": return \"\\\"+this.date.to_fixed((date.getHours()+11)%12+1)+\\\"\";\r\n\t\t\t\tcase \"%g\": return \"\\\"+((date.getHours()+11)%12+1)+\\\"\";\r\n\t\t\t\tcase \"%G\": return \"\\\"+date.getHours()+\\\"\";\r\n\t\t\t\tcase \"%H\": return \"\\\"+this.date.to_fixed(date.getHours())+\\\"\";\r\n\t\t\t\tcase \"%i\": return \"\\\"+this.date.to_fixed(date.getMinutes())+\\\"\";\r\n\t\t\t\tcase \"%a\": return \"\\\"+(date.getHours()>11?\\\"pm\\\":\\\"am\\\")+\\\"\";\r\n\t\t\t\tcase \"%A\": return \"\\\"+(date.getHours()>11?\\\"PM\\\":\\\"AM\\\")+\\\"\";\r\n\t\t\t\tcase \"%s\": return \"\\\"+this.date.to_fixed(date.getSeconds())+\\\"\";\r\n\t\t\t\tcase \"%W\": return \"\\\"+this.date.to_fixed(this.date.getISOWeek(date))+\\\"\";\r\n\t\t\t\tdefault: return a;\r\n\t\t\t}\r\n\t\t});\r\n\t\tif (utc) format=format.replace(/date\\.get/g,\"date.getUTC\");\r\n\t\tvar func = new Function(\"date\",\"return \\\"\"+format+\"\\\";\");\r\n\r\n\t\treturn func.bind(scheduler);\r\n\t},\r\n\tstr_to_date:function(format, utc, exactFormat){\r\n\t\tvar stringToDateMethod = useCsp() ? csp_str_to_date : generateStringToDate;\r\n\t\tvar parseExactFormat = stringToDateMethod(format, utc);\r\n\t\t// eslint-disable-next-line\r\n\t\tvar yyyyMMddhhIIss = /^[0-9]{4}(\\-|\\/)[0-9]{2}(\\-|\\/)[0-9]{2} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/;\r\n\r\n\t\t// MM/dd/yyyy - default old format for xml-date\r\n\t\t// eslint-disable-next-line\r\n\t\tvar MMddyyyyhhIIss = /^[0-9]{2}\\/[0-9]{2}\\/[0-9]{4} ?(([0-9]{1,2}:[0-9]{2})(:[0-9]{1,2})?)?$/;\r\n\t\t// dd-MM-yyyy - default old format for api-date\r\n\t\t// eslint-disable-next-line\r\n\t\tvar ddMMyyyyhhIIss = /^[0-9]{2}\\-[0-9]{2}\\-[0-9]{4} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/;\r\n\t\t// eslint-disable-next-line\r\n\t\tvar ISO8601 = /^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$/;\r\n\r\n\t\tvar isYMDDate = function (datestr) {\r\n\t\t\treturn yyyyMMddhhIIss.test(String(datestr));\r\n\t\t};\r\n\r\n\t\tvar isMDYDate = function (datestr) {\r\n\t\t\treturn MMddyyyyhhIIss.test(String(datestr));\r\n\t\t};\r\n\t\tvar isDMYDate = function (datestr) {\r\n\t\t\treturn ddMMyyyyhhIIss.test(String(datestr));\r\n\t\t};\r\n\t\tvar isISO8601 = function (datestr) {\r\n\t\t\treturn ISO8601.test(datestr);\r\n\t\t};\r\n\r\n\t\tvar parseYMD = stringToDateMethod(\"%Y-%m-%d %H:%i:%s\", utc);\r\n\t\tvar parseMDY = stringToDateMethod(\"%m/%d/%Y %H:%i:%s\", utc);\r\n\t\tvar parseDMY = stringToDateMethod(\"%d-%m-%Y %H:%i:%s\", utc);\r\n\r\n\t\treturn function (dateString) {\r\n\r\n\t\t\tif (!exactFormat && !scheduler.config.parse_exact_format) {\r\n\t\t\t\tif (dateString && dateString.getISOWeek) {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t} else if (typeof dateString === \"number\") {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t} else if (isYMDDate(dateString)) {\r\n\t\t\t\t\treturn parseYMD(dateString);\r\n\t\t\t\t} else if (isMDYDate(dateString)) {\r\n\t\t\t\t\treturn parseMDY(dateString);\r\n\t\t\t\t} else if (isDMYDate(dateString)) {\r\n\t\t\t\t\treturn parseDMY(dateString);\r\n\t\t\t\t} else if (isISO8601(dateString)) {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn parseExactFormat.call(scheduler, dateString);\r\n\t\t};\r\n\t},\r\n\tgetISOWeek: function(ndate) {\r\n\t\tif(!ndate) return false;\r\n\t\tndate = this.date_part(new Date(ndate));\r\n\t\tvar nday = ndate.getDay();\r\n\t\tif (nday === 0) {\r\n\t\t\tnday = 7;\r\n\t\t}\r\n\t\tvar first_thursday = new Date(ndate.valueOf());\r\n\t\tfirst_thursday.setDate(ndate.getDate() + (4 - nday));\r\n\t\tvar year_number = first_thursday.getFullYear(); // year of the first Thursday\r\n\t\tvar ordinal_date = Math.round( (first_thursday.getTime() - new Date(year_number, 0, 1).getTime()) / 86400000); //ordinal date of the first Thursday - 1 (so not really ordinal date)\r\n\t\tvar week_number = 1 + Math.floor( ordinal_date / 7);\r\n\t\treturn week_number;\r\n\t},\r\n\tgetUTCISOWeek: function(ndate){\r\n\t\treturn this.getISOWeek(this.convert_to_utc(ndate));\r\n\t},\r\n\tconvert_to_utc: function(date) {\r\n\t\treturn new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds());\r\n\t}\r\n};\r\n\r\n}\r\n\r\n","export default function(scheduler){\r\n\treturn (function(){\r\n\t\tvar res = {};\r\n\t\tfor (var a in this._events){\r\n\t\t\tvar ev = this._events[a];\r\n\t\t\tif (ev.id.toString().indexOf(\"#\") == -1){\r\n\t\t\t\tres[ev.id] = ev;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t}).bind(scheduler);\r\n}","import xmlLoaded from \"./loaders/xml\";\r\nimport jsonLoader from \"./loaders/json\";\r\nimport iCalLoader from \"./loaders/ical\";\r\nimport createSerializator from \"../core/common/get_serializable_events\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler._loaded = {};\r\nscheduler._load = function(url, from) {\r\n\turl = url || this._load_url;\r\n\r\n\tif(!url){\r\n\t\t//if scheduler.setLoadMode is called before scheduler.init, initial rendering will invoke data loading while url is undefined\r\n\t\treturn;\r\n\t}\r\n\r\n\turl += (url.indexOf(\"?\") == -1 ? \"?\" : \"&\") + \"timeshift=\" + (new Date()).getTimezoneOffset();\r\n\tif (this.config.prevent_cache) url += \"&uid=\" + this.uid();\r\n\tvar to;\r\n\tfrom = from || this._date;\r\n\tfunction ajaxCallback(response) {\r\n\t\tscheduler.on_load(response);\r\n\t\tscheduler.callEvent(\"onLoadEnd\", []);\r\n\t}\r\n\tif (this._load_mode) {\r\n\t\tvar lf = this.templates.load_format;\r\n\r\n\t\tfrom = this.date[this._load_mode + \"_start\"](new Date(from.valueOf()));\r\n\t\twhile (from > this._min_date) from = this.date.add(from, -1, this._load_mode);\r\n\t\tto = from;\r\n\r\n\t\tvar cache_line = true;\r\n\t\twhile (to < this._max_date) {\r\n\t\t\tto = this.date.add(to, 1, this._load_mode);\r\n\t\t\tif (this._loaded[lf(from)] && cache_line)\r\n\t\t\t\tfrom = this.date.add(from, 1, this._load_mode); else cache_line = false;\r\n\t\t}\r\n\r\n\t\tvar temp_to = to;\r\n\t\tdo {\r\n\t\t\tto = temp_to;\r\n\t\t\ttemp_to = this.date.add(to, -1, this._load_mode);\r\n\t\t} while (temp_to > from && this._loaded[lf(temp_to)]);\r\n\r\n\t\tif (to <= from)\r\n\t\t\treturn false; //already loaded\r\n\r\n\t\tscheduler.ajax.get(url + \"&from=\" + lf(from) + \"&to=\" + lf(to), ajaxCallback);\r\n\r\n\t\twhile (from < to) {\r\n\t\t\tthis._loaded[lf(from)] = true;\r\n\t\t\tfrom = this.date.add(from, 1, this._load_mode);\r\n\t\t}\r\n\t} else {\r\n\t\tscheduler.ajax.get(url, ajaxCallback);\r\n\t}\r\n\r\n\t// TODO: remove onXLS\r\n\tthis.callEvent(\"onXLS\", []);\r\n\tthis.callEvent(\"onLoadStart\", []);\r\n\treturn true;\r\n};\r\n\r\nscheduler._parsers = {};\r\n\r\n\r\nxmlLoaded(scheduler);\r\njsonLoader(scheduler);\r\niCalLoader(scheduler);\r\n\r\nscheduler.on_load = function (loader) {\r\n\tthis.callEvent(\"onBeforeParse\", []);\r\n\r\n\tvar evs;\r\n\tvar error = false;\r\n\r\n\tvar foundParser = false;\r\n\tfor(var i in this._parsers){\r\n\t\tvar parser = this._parsers[i];\r\n\t\tif(parser.canParse(loader.xmlDoc.responseText, loader.xmlDoc)){\r\n\t\t\ttry{\r\n\t\t\t\tvar param = loader.xmlDoc.responseText;\r\n\t\t\t\tif(i === \"xml\"){\r\n\t\t\t\t\tparam = loader;\r\n\t\t\t\t}\r\n\t\t\t\tevs = parser.parse(param);\r\n\t\t\t\tif(!evs){\r\n\t\t\t\t\terror = true;\r\n\t\t\t\t}\r\n\t\t\t}catch(e){\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\t\t\tfoundParser = true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif(!foundParser){\r\n\t\tif(this._process && this[this._process]){\r\n\t\t\ttry{\r\n\t\t\t\tevs = this[this._process].parse(loader.xmlDoc.responseText);\r\n\t\t\t}catch (e){\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\terror = true;\r\n\t\t}\r\n\t}\r\n\r\n\tif(error || (loader.xmlDoc.status && loader.xmlDoc.status >= 400)){\r\n\t\tthis.callEvent(\"onLoadError\", [loader.xmlDoc]);\r\n\t\tevs = [];\r\n\t}\r\n\r\n\tthis._process_loading(evs);\r\n\r\n\t// TODO: remove onXLE\r\n\tthis.callEvent(\"onXLE\", []);\r\n\tthis.callEvent(\"onParse\", []);\r\n};\r\nscheduler._process_loading = function(evs) {\r\n\tthis._loading = true;\r\n\tthis._not_render = true;\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tif (!this.callEvent(\"onEventLoading\", [evs[i]])) continue;\r\n\t\tthis.addEvent(evs[i]);\r\n\t}\r\n\tthis._not_render = false;\r\n\tif (this._render_wait) this.render_view_data();\r\n\r\n\tthis._loading = false;\r\n\tif (this._after_call) this._after_call();\r\n\tthis._after_call = null;\r\n};\r\nscheduler._init_event = function(event) {\r\n\tevent.text = (event.text || event._tagvalue) || \"\";\r\n\tevent.start_date = scheduler._init_date(event.start_date);\r\n\tevent.end_date = scheduler._init_date(event.end_date);\r\n};\r\n\r\nscheduler._init_date = function(date){\r\n\tif(!date)\r\n\t\treturn null;\r\n\tif (typeof date == \"string\") {\r\n\t\treturn scheduler._helpers.parseDate(date);\r\n\t}\r\n\telse return new Date(date);\r\n};\r\n\r\nconst getSerializableData = createSerializator(scheduler);\r\nscheduler.serialize = function(){\r\n\tconst dataset = [];\r\n\tconst allEvents = getSerializableData();\r\n\tfor (var a in allEvents){\r\n\t\t\r\n\t\tconst exportedEvent = {};\r\n\t\tvar ev = allEvents[a];\r\n\r\n\t\tfor(var key in ev){\r\n\t\t\tif (key.charAt(0) == \"$\" || key.charAt(0) == \"_\"){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tlet exportValue;\r\n\t\t\tconst rawValue = ev[key];\r\n\t\t\tif(scheduler.utils.isDate(rawValue)){\r\n\t\t\t\texportValue = scheduler.defined(scheduler.templates.xml_format) ? scheduler.templates.xml_format(rawValue) : scheduler.templates.format_date(rawValue);\r\n\t\t\t}else{\r\n\t\t\t\texportValue = rawValue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\texportedEvent[key] = exportValue;\r\n\t\t}\r\n\r\n\t\tdataset.push(exportedEvent);\r\n\t}\r\n\treturn dataset;\r\n};\r\n\r\n/*\r\nscheduler.json = {};\r\nscheduler.json.parse = function(data) {\r\n\r\n\tvar events = [];\r\n\r\n\tif (typeof data == \"string\") {\r\n\t\tdata = JSON.parse(data);\r\n\t}\r\n\tif (Object.prototype.toString.call(data) === '[object Array]') {\r\n\t\tevents = data;\r\n\t} else {\r\n\t\tif(data){\r\n\t\t\tif(data.events){\r\n\t\t\t\tevents = data.events;\r\n\t\t\t}else if(data.data){\r\n\t\t\t\tevents = data.data;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tevents = events || [];\r\n\r\n\tif (data.dhx_security) {\r\n\t\tif (window.dhtmlx) {\r\n\t\t\twindow.dhtmlx.security_key = data.dhx_security;\r\n\t\t}\r\n\t\tscheduler.security_key = data.dhx_security;\r\n\t}\r\n\r\n\tvar collections = (data && data.collections) ? data.collections : {};\r\n\tvar collections_loaded = false;\r\n\tfor (var key in collections) {\r\n\t\tif (collections.hasOwnProperty(key)) {\r\n\t\t\tcollections_loaded = true;\r\n\t\t\tvar collection = collections[key];\r\n\t\t\tvar arr = scheduler.serverList[key];\r\n\t\t\tif (!arr) {\r\n\t\t\t\tscheduler.serverList[key] = arr = [];\r\n\t\t\t}\r\n\t\t\tarr.splice(0, arr.length); //clear old options\r\n\t\t\tfor (var j = 0; j < collection.length; j++) {\r\n\t\t\t\tvar option = collection[j];\r\n\t\t\t\tvar obj = { key: option.value, label: option.label }; // resulting option object\r\n\t\t\t\tfor (var option_key in option) {\r\n\t\t\t\t\tif (option.hasOwnProperty(option_key)) {\r\n\t\t\t\t\t\tif (option_key == \"value\" || option_key == \"label\")\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\tobj[option_key] = option[option_key]; // obj['value'] = option['value']\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tarr.push(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (collections_loaded)\r\n\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\r\n\tvar evs = [];\r\n\tfor (var i = 0; i < events.length; i++) {\r\n\t\tvar event = events[i];\r\n\t\tscheduler._init_event(event);\r\n\t\tevs.push(event);\r\n\t}\r\n\treturn evs;\r\n};*/\r\nscheduler.parse = function(data, type) {\r\n\tthis._process = type;\r\n\tthis.on_load({xmlDoc: {responseText: data}});\r\n};\r\nscheduler.load = function(url, call) {\r\n\tif (typeof call == \"string\") {\r\n\t\tthis._process = call;\r\n\t\tcall = arguments[2];\r\n\t}\r\n\r\n\tthis._load_url = url;\r\n\tthis._after_call = call;\r\n\tthis._load(url, this._date);\r\n};\r\n//possible values - day,week,month,year,all\r\nscheduler.setLoadMode = function(mode) {\r\n\tif (mode == \"all\") mode = \"\";\r\n\tthis._load_mode = mode;\r\n};\r\n\r\nscheduler.serverList = function(name, array) {\r\n\tif (array) {\r\n\t\tthis.serverList[name] = array.slice(0);\r\n\t\treturn this.serverList[name];\r\n\t}\r\n\tthis.serverList[name] = (this.serverList[name] || []);\r\n\treturn this.serverList[name];\r\n};\r\nscheduler._userdata = {};\r\n\r\nscheduler._xmlNodeToJSON = function(node) {\r\n\tvar t = {};\r\n\tfor (var i = 0; i < node.attributes.length; i++)\r\n\t\tt[node.attributes[i].name] = node.attributes[i].value;\r\n\r\n\tfor (var i = 0; i < node.childNodes.length; i++) {\r\n\t\tvar child = node.childNodes[i];\r\n\t\tif (child.nodeType == 1)\r\n\t\t\tt[child.tagName] = child.firstChild ? child.firstChild.nodeValue : \"\";\r\n\t}\r\n\r\n\tif (!t.text) t.text = node.firstChild ? node.firstChild.nodeValue : \"\";\r\n\r\n\treturn t;\r\n};\r\nscheduler.attachEvent(\"onXLS\", function() {\r\n\tif (this.config.show_loading === true) {\r\n\t\tvar t;\r\n\t\tt = this.config.show_loading = document.createElement(\"div\");\r\n\t\tt.className = 'dhx_loading';\r\n\t\tt.style.left = Math.round((this._x - 128) / 2) + \"px\";\r\n\t\tt.style.top = Math.round((this._y - 15) / 2) + \"px\";\r\n\t\tthis._obj.appendChild(t);\r\n\t}\r\n});\r\nscheduler.attachEvent(\"onXLE\", function() {\r\n\tvar t = this.config.show_loading;\r\n\tif (t && typeof t == \"object\") {\r\n\t\tif(t.parentNode) {\r\n\t\t\tt.parentNode.removeChild(t);\r\n\t\t}\r\n\t\tthis.config.show_loading = true;\r\n\t}\r\n});\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._parsers.xml = {\r\n\tcanParse: function(data, xhr){\r\n\t\t// IE returns non-empty responseXML type regardless of actual data type\r\n\t\tif(xhr.responseXML && xhr.responseXML.firstChild){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\ttry{\r\n\t\t\tvar xmlDoc = scheduler.ajax.parse(xhr.responseText);\r\n\t\t\tvar topElement = scheduler.ajax.xmltop(\"data\", xmlDoc);\r\n\t\t\tif(topElement && topElement.tagName === \"data\"){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}catch (e){\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\tparse: function(loader) {\r\n\t\tvar xml;\r\n\r\n\t\tif (!loader.xmlDoc.responseXML) { //from a string\r\n\t\t\tloader.xmlDoc.responseXML = scheduler.ajax.parse(loader.xmlDoc.responseText);\r\n\t\t}\r\n\t\r\n\t\txml = scheduler.ajax.xmltop(\"data\", loader.xmlDoc);\r\n\t\tif (xml.tagName != \"data\") return null;//not an xml\r\n\t\tvar csrfToken = xml.getAttribute(\"dhx_security\");\r\n\t\tif (csrfToken) {\r\n\t\t\tif (window.dhtmlx) {\r\n\t\t\t\twindow.dhtmlx.security_key = csrfToken;\r\n\t\t\t}\r\n\t\t\tscheduler.security_key = csrfToken;\r\n\t\t}\r\n\t\r\n\t\tvar opts = scheduler.ajax.xpath(\"//coll_options\", loader.xmlDoc);\r\n\t\tfor (var i = 0; i < opts.length; i++) {\r\n\t\t\tvar bind = opts[i].getAttribute(\"for\");\r\n\t\t\tvar arr = scheduler.serverList[bind];\r\n\t\t\tif (!arr) {\r\n\t\t\t\tscheduler.serverList[bind] = arr = [];\r\n\t\t\t}\r\n\t\t\tarr.splice(0, arr.length);\t//clear old options\r\n\t\t\tvar itms = scheduler.ajax.xpath(\".//item\", opts[i]);\r\n\t\t\tfor (var j = 0; j < itms.length; j++) {\r\n\t\t\t\tvar itm = itms[j];\r\n\t\t\t\tvar attrs = itm.attributes;\r\n\t\t\t\tvar obj = { key: itms[j].getAttribute(\"value\"), label: itms[j].getAttribute(\"label\")};\r\n\t\t\t\tfor (var k = 0; k < attrs.length; k++) {\r\n\t\t\t\t\tvar attr = attrs[k];\r\n\t\t\t\t\tif (attr.nodeName == \"value\" || attr.nodeName == \"label\")\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\tobj[attr.nodeName] = attr.nodeValue;\r\n\t\t\t\t}\r\n\t\t\t\tarr.push(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (opts.length)\r\n\t\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\t\r\n\t\tvar ud = scheduler.ajax.xpath(\"//userdata\", loader.xmlDoc);\r\n\t\tfor (var i = 0; i < ud.length; i++) {\r\n\t\t\tvar udx = scheduler._xmlNodeToJSON(ud[i]);\r\n\t\t\tscheduler._userdata[udx.name] = udx.text;\r\n\t\t}\r\n\t\r\n\t\tvar evs = [];\r\n\t\txml = scheduler.ajax.xpath(\"//event\", loader.xmlDoc);\r\n\t\r\n\t\tfor (var i = 0; i < xml.length; i++) {\r\n\t\t\tvar ev = evs[i] = scheduler._xmlNodeToJSON(xml[i]);\r\n\t\t\tscheduler._init_event(ev);\r\n\t\t}\r\n\t\treturn evs;\r\n\t}\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler.json = scheduler._parsers.json = {\r\n\tcanParse: function(data){\r\n\t\tif(data && typeof data === \"object\"){\r\n\t\t\treturn true;\r\n\t\t} else if(typeof data === \"string\"){\r\n\t\t\ttry {\r\n\t\t\t\tvar result = JSON.parse(data);\r\n\t\t\t\treturn Object.prototype.toString.call(result) === '[object Object]' || \r\n\t\t\t\t\t\tObject.prototype.toString.call(result) === '[object Array]';\r\n\t\t\t} catch (err) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\tparse: function(data) {\r\n\t\tvar events = [];\r\n\r\n\t\tif (typeof data == \"string\") {\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\t\tif (Object.prototype.toString.call(data) === '[object Array]') {\r\n\t\t\tevents = data;\r\n\t\t} else {\r\n\t\t\tif(data){\r\n\t\t\t\tif(data.events){\r\n\t\t\t\t\tevents = data.events;\r\n\t\t\t\t}else if(data.data){\r\n\t\t\t\t\tevents = data.data;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tevents = events || [];\r\n\r\n\t\tif (data.dhx_security) {\r\n\t\t\tif (window.dhtmlx) {\r\n\t\t\t\twindow.dhtmlx.security_key = data.dhx_security;\r\n\t\t\t}\r\n\t\t\tscheduler.security_key = data.dhx_security;\r\n\t\t}\r\n\r\n\t\tvar collections = (data && data.collections) ? data.collections : {};\r\n\t\tvar collections_loaded = false;\r\n\t\tfor (var key in collections) {\r\n\t\t\tif (collections.hasOwnProperty(key)) {\r\n\t\t\t\tcollections_loaded = true;\r\n\t\t\t\tvar collection = collections[key];\r\n\t\t\t\tvar arr = scheduler.serverList[key];\r\n\t\t\t\tif (!arr) {\r\n\t\t\t\t\tscheduler.serverList[key] = arr = [];\r\n\t\t\t\t}\r\n\t\t\t\tarr.splice(0, arr.length); //clear old options\r\n\t\t\t\tfor (var j = 0; j < collection.length; j++) {\r\n\t\t\t\t\tvar option = collection[j];\r\n\t\t\t\t\tvar obj = { key: option.value, label: option.label }; // resulting option object\r\n\t\t\t\t\tfor (var option_key in option) {\r\n\t\t\t\t\t\tif (option.hasOwnProperty(option_key)) {\r\n\t\t\t\t\t\t\tif (option_key == \"value\" || option_key == \"label\")\r\n\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\tobj[option_key] = option[option_key]; // obj['value'] = option['value']\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tarr.push(obj);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (collections_loaded)\r\n\t\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\r\n\t\tvar evs = [];\r\n\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\tvar event = events[i];\r\n\t\t\tscheduler._init_event(event);\r\n\t\t\tevs.push(event);\r\n\t\t}\r\n\t\treturn evs;\r\n\t}\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler.ical = scheduler._parsers.ical = {\r\n\tcanParse: function(data){\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\treturn new RegExp(\"^BEGIN:VCALENDAR\").test(data);\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n\tparse:function(str){\r\n\t\tvar data = str.match(RegExp(this.c_start+\"[^\\f]*\"+this.c_end,\"\"));\r\n\t\tif (!data.length) return;\r\n\r\n\t\t// mpl: handle bad unfolding\r\n\t\tdata[0]=data[0].replace(/[\\r\\n]+ /g,\"\");\r\n\r\n\t\t//unfolding \r\n\t\tdata[0]=data[0].replace(/[\\r\\n]+(?=[a-z \\t])/g,\" \");\r\n\t\t//drop property\r\n\t\tdata[0]=data[0].replace(/;[^:\\r\\n]*:/g,\":\");\r\n\t\t\r\n\t\t\r\n\t\tvar incoming=[];\r\n\t\tvar match;\r\n\t\tvar event_r = RegExp(\"(?:\"+this.e_start+\")([^\\f]*?)(?:\"+this.e_end+\")\",\"g\");\r\n\t\twhile ((match=event_r.exec(data)) !== null){\r\n\t\t\tvar e={};\r\n\t\t\tvar param;\r\n\t\t\tvar param_r = /[^\\r\\n]+[\\r\\n]+/g;\r\n\t\t\twhile ((param=param_r.exec(match[1])) !== null)\r\n\t\t\t\tthis.parse_param(param.toString(),e);\r\n\t\t\tif (e.uid && !e.id) e.id = e.uid; //fallback to UID, when ID is not defined\r\n\t\t\tincoming.push(e);\t\r\n\t\t}\r\n\t\treturn incoming;\r\n\t},\r\n\tparse_param:function(str,obj){\r\n\t\tvar d = str.indexOf(\":\"); \r\n\t\t\tif (d==-1) return;\r\n\t\t\r\n\t\tvar name = str.substr(0,d).toLowerCase();\r\n\t\tvar value = str.substr(d+1).replace(/\\\\,/g,\",\").replace(/[\\r\\n]+$/,\"\");\r\n\t\tif (name==\"summary\")\r\n\t\t\tname=\"text\";\r\n\t\telse if (name==\"dtstart\"){\r\n\t\t\tname = \"start_date\";\r\n\t\t\tvalue = this.parse_date(value,0,0);\r\n\t\t}\r\n\t\telse if (name==\"dtend\"){\r\n\t\t\tname = \"end_date\";\r\n\t\t\tvalue = this.parse_date(value,0,0);\r\n\t\t}\r\n\t\tobj[name]=value;\r\n\t},\r\n\tparse_date:function(value,dh,dm){\r\n\t\tvar t = value.split(\"T\");\r\n\r\n\t\tvar utcMark = false;\r\n\t\tif (t[1]){\r\n\t\t\tdh=t[1].substr(0,2);\r\n\t\t\tdm=t[1].substr(2,2);\r\n\t\t\tutcMark = !!(t[1][6] == \"Z\");\r\n\t\t}\r\n\t\tvar dy = t[0].substr(0,4);\r\n\t\tvar dn = parseInt(t[0].substr(4,2),10)-1;\r\n\t\tvar dd = t[0].substr(6,2);\r\n\r\n\t\tif(scheduler.config.server_utc || utcMark){\r\n\t\t\treturn new Date(Date.UTC(dy,dn,dd,dh,dm)) ;\r\n\t\t}else{\r\n\t\t\treturn new Date(dy,dn,dd,dh,dm);\r\n\t\t}\r\n\t},\r\n\tc_start:\"BEGIN:VCALENDAR\",\r\n\te_start:\"BEGIN:VEVENT\",\r\n\te_end:\"END:VEVENT\",\r\n\tc_end:\"END:VCALENDAR\"\t\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._init_touch_events = function(){\r\n\tvar mobile = this.config.touch &&\r\n\t\t( ((navigator.userAgent.indexOf(\"Mobile\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"iPad\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"Android\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"Touch\")!=-1)) && !window.MSStream) ||\r\n\t\t\t((navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1));\r\n\r\n\tif(mobile){\r\n\t\tthis.xy.scroll_width = 0;\r\n\t\tthis._mobile = true;\r\n\t}\r\n\r\n\tif(this.config.touch){\r\n\r\n\t\tvar touchEventsSupported = true;\r\n\t\ttry {\r\n\t\t\tdocument.createEvent(\"TouchEvent\");\r\n\t\t} catch (e) {\r\n\t\t\ttouchEventsSupported = false;\r\n\t\t}\r\n\r\n\t\tif (touchEventsSupported) {\r\n\t\t\tthis._touch_events([\"touchmove\", \"touchstart\", \"touchend\"], function (ev) {\r\n\t\t\t\tif (ev.touches && ev.touches.length > 1) return null;\r\n\t\t\t\tif (ev.touches[0])\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\ttarget: ev.target,\r\n\t\t\t\t\t\tpageX: ev.touches[0].pageX,\r\n\t\t\t\t\t\tpageY: ev.touches[0].pageY,\r\n\t\t\t\t\t\tclientX: ev.touches[0].clientX,\r\n\t\t\t\t\t\tclientY: ev.touches[0].clientY\r\n\t\t\t\t\t};\r\n\t\t\t\telse\r\n\t\t\t\t\treturn ev;\r\n\t\t\t}, function () {\r\n\t\t\t\treturn false;\r\n\t\t\t});\r\n\t\t} else if (window.PointerEvent || window.navigator.pointerEnabled) {\r\n\t\t\tthis._touch_events([\"pointermove\", \"pointerdown\", \"pointerup\"], function (ev) {\r\n\t\t\t\tif (ev.pointerType == \"mouse\") return null;\r\n\t\t\t\treturn ev;\r\n\t\t\t}, function (ev) {\r\n\t\t\t\treturn (!ev || (ev.pointerType == \"mouse\" ));\r\n\t\t\t});\r\n\t\t} else if (window.navigator.msPointerEnabled) {\r\n\t\t\tthis._touch_events([\"MSPointerMove\", \"MSPointerDown\", \"MSPointerUp\"], function (ev) {\r\n\t\t\t\tif (ev.pointerType == ev.MSPOINTER_TYPE_MOUSE) return null;\r\n\t\t\t\treturn ev;\r\n\t\t\t}, function (ev) {\r\n\t\t\t\treturn (!ev || ev.pointerType == ev.MSPOINTER_TYPE_MOUSE);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n};\r\n\r\nscheduler._touch_events = function(names, accessor, ignore){\r\n\t//webkit on android need to be handled separately\r\n\t//var a_webkit = (navigator.userAgent.indexOf(\"Android\")!=-1) && (navigator.userAgent.indexOf(\"WebKit\")!=-1);\r\n\tvar source, tracker, timer, drag_mode, scroll_mode, action_mode;\r\n\tvar dblclicktime = 0;\r\n\r\n\tfunction attachTouchEvent(element, name, callback){\r\n\t\t//touch gestures must be disabled when ligthbox is opened\r\n\t\tscheduler.event(element, name, function(e){\r\n\t\t\tif(scheduler._is_lightbox_open()){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tif (ignore(e)) return;\r\n\t\t\t\treturn callback(e);\r\n\t\t\t}\r\n\t\t}, { passive: false });\r\n\t}\r\n\r\n\tfunction check_direction_swipe(s_ev, e_ev, step, max_dy){\r\n\t\tif (!s_ev || !e_ev) return false;\r\n\r\n\t\tvar t = s_ev.target;\r\n\t\twhile(t && t != scheduler._obj){\r\n\t\t\tt = t.parentNode;\r\n\t\t}\r\n\t\tif(t != scheduler._obj){\r\n\t\t\t//swipe outside scheduler\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// ignore swipe in horizontal timeline\r\n\t\tif(scheduler.matrix && scheduler.matrix[scheduler.getState().mode]){\r\n\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\tif(timeline.scrollable){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar dy = Math.abs(s_ev.pageY - e_ev.pageY);\r\n\t\tvar dx = Math.abs(s_ev.pageX - e_ev.pageX);\r\n\t\tif (dy < max_dy && dx>step && (!dy || (dx/dy > 3))){\r\n\t\t\tif (s_ev.pageX > e_ev.pageX) {\r\n\t\t\t\tscheduler._click.dhx_cal_next_button();\r\n\t\t\t}else {\r\n\t\t\t\tscheduler._click.dhx_cal_prev_button();\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\tfunction doMouseMove(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tvar dnd = scheduler.getState().drag_mode,\r\n\t\t\ttimeline = scheduler.matrix ? scheduler.matrix[scheduler._mode] : false;\r\n\r\n\t\tvar original_render = scheduler.render_view_data;\r\n\t\tif(dnd == 'create' && timeline){\r\n\t\t\t//suppress full redraw of timeline on creating event\r\n\t\t\tscheduler.render_view_data = function() {\r\n\t\t\t\tvar id = scheduler.getState().drag_id;\r\n\t\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\t\tvar property = timeline.y_property;\r\n\r\n\t\t\t\tvar evs = scheduler.getEvents(ev.start_date, ev.end_date);\r\n\t\t\t\tfor(var i = 0; i < evs.length; i++){\r\n\t\t\t\t\tif(evs[i][property] != ev[property]){\r\n\t\t\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tev._sorder = evs.length - 1;\r\n\t\t\t\tev._count = evs.length;\r\n\r\n\t\t\t\tthis.render_data([ev], scheduler.getState().mode);\r\n\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\tscheduler._on_mouse_move(e);\r\n\r\n\t\tif(dnd == 'create' && timeline){\r\n\t\t\tscheduler.render_view_data = original_render;\r\n\t\t}\r\n\r\n\t\tif (e.preventDefault)\r\n\t\t\te.preventDefault();\r\n\t\te.cancelBubble = true;\r\n\t\treturn false;\r\n\t}\r\n\r\n\t// touchmove\r\n\tattachTouchEvent(document.body, names[0], function(e){\r\n\t\tif (ignore(e)) return;\r\n\r\n\t\tvar acc = accessor(e);\r\n\t\tif(!acc) return;\r\n\t\tif (drag_mode){\r\n\t\t\tdoMouseMove(acc);\r\n\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._update_global_tip();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//if (tracker && a_webkit){\r\n\t\t//\tcheck_direction_swipe(tracker, accessor(e), 0);\r\n\t\t//}\r\n\r\n\t\ttracker = accessor(e);\r\n\t\t//ignore common and scrolling moves\r\n\t\tif (!action_mode) return;\r\n\r\n\t\t//multitouch\r\n\t\tif (!tracker){\r\n\t\t\tscroll_mode = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//target changed - probably in scroll mode\r\n\r\n\t\tif (source.target != tracker.target || (Math.abs(source.pageX - tracker.pageX) > 5) || (Math.abs(source.pageY - tracker.pageY) > 5)){\r\n\t\t\tscroll_mode = true;\r\n\t\t\tclearTimeout(timer);\r\n\t\t}\r\n\r\n\t});\r\n\r\n\t//attachTouchEvent(this._els[\"dhx_cal_data\"][0], \"scroll\", drag_cancel);\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], \"touchcancel\", drag_cancel);\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], \"contextmenu\", function(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tif (action_mode){\r\n\t\t\tif (e && e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t});\r\n\r\n\t// touchstart\r\n\tattachTouchEvent(this._obj, names[1], function(e){\r\n\t\t// block pull-to-refresh\r\n\t\tif(document && document.body){\r\n\t\t\tdocument.body.classList.add(\"dhx_cal_touch_active\");\r\n\t\t}\r\n\r\n\t\tif (ignore(e)) return;\r\n\t\tscheduler._pointerDragId = e.pointerId;\r\n\r\n\t\tvar fake_event;\r\n\t\tdrag_mode = scroll_mode = false;\r\n\t\taction_mode = true;\r\n\t\tfake_event = tracker = accessor(e);\r\n\r\n\t\tif (!fake_event){\r\n\t\t\tscroll_mode = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//dbl click\r\n\t\tvar now = new Date();\r\n\r\n\t\tif (!scroll_mode && !drag_mode && now - dblclicktime < 250){\r\n\t\t\tscheduler._click.dhx_cal_data(fake_event);\r\n\t\t\twindow.setTimeout(function(){\r\n\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t//fake_event.type = \"dblclick\";\r\n\t\t\t\tscheduler._on_dbl_click(fake_event);\r\n\t\t\t}, 50);\r\n\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._block_next_stop = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tdblclicktime = now;\r\n\r\n\t\t//drag\r\n\r\n\t\tif (scroll_mode || drag_mode || !scheduler.config.touch_drag)\r\n\t\t\treturn;\r\n\r\n\t\tvar actTask = scheduler._locate_event(document.activeElement);\r\n\t\tvar fakeTask = scheduler._locate_event(fake_event.target);\r\n\t\tvar sourceTask = source? scheduler._locate_event(source.target) : null;\r\n\r\n\t\tif(actTask && fakeTask && actTask == fakeTask && actTask != sourceTask)\r\n\t\t{\r\n\t\t\tif(e.preventDefault) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\tscheduler._click.dhx_cal_data(fake_event);\r\n\t\t\tsource = fake_event;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//there is no target\r\n\t\ttimer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tdrag_mode = true;\r\n\t\t\tvar target = source.target;\r\n\t\t\tvar className = scheduler._getClassName(target);\r\n\t\t\tif (target && className.indexOf(\"dhx_body\") != -1)\r\n\t\t\t\ttarget = target.previousSibling;\r\n\r\n\t\t\tscheduler._on_mouse_down(source, target);\r\n\t\t\tif (scheduler._drag_mode && scheduler._drag_mode != \"create\"){\r\n\t\t\t\tscheduler.for_rendered(scheduler._drag_id, function(node, i) {\r\n\t\t\t\t\tnode.style.display='none';\r\n\t\t\t\t\tscheduler._rendered.splice(i, 1);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (scheduler.config.touch_tip) {\r\n\t\t\t\tscheduler._show_global_tip();\r\n\t\t\t}\r\n\t\t\tscheduler.updateEvent(scheduler._drag_id);\r\n\t\t},scheduler.config.touch_drag);\r\n\r\n\t\tsource = fake_event;\r\n\t});\r\n\tfunction drag_cancel(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tscheduler._hide_global_tip();\r\n\t\tif (drag_mode){\r\n\t\t\tscheduler._on_mouse_up( accessor(e) );\r\n\t\t\tscheduler._temp_touch_block = false;\r\n\t\t}\r\n\t\tscheduler._drag_id = null;\r\n\t\tscheduler._drag_mode=null;\r\n\t\tscheduler._drag_pos=null;\r\n\t\tscheduler._pointerDragId = null;\r\n\t\tclearTimeout(timer);\r\n\t\tdrag_mode = action_mode = false;\r\n\t\tscroll_mode = true;\r\n\t}\r\n\r\n\t// touch end\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], names[2], function(e){\r\n\t\tif(document && document.body){\r\n\t\t\tdocument.body.classList.remove(\"dhx_cal_touch_active\");\r\n\t\t}\r\n\r\n\t\tif (ignore(e)) return;\r\n\r\n\t\tif(scheduler.config.touch_swipe_dates){\r\n\t\t\tif (!drag_mode && check_direction_swipe(source, tracker, 200, 100)) {\r\n\t\t\t\tscheduler._block_next_stop = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (drag_mode) {\r\n\t\t\tscheduler._ignore_next_click = true;\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\t}, 100);\r\n\t\t}\r\n\r\n\t\tdrag_cancel(e);\r\n\t\tif (scheduler._block_next_stop){\r\n\t\t\tscheduler._block_next_stop = false;\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler.event(document.body, names[2], drag_cancel);\r\n};\r\n\r\nscheduler._show_global_tip = function(){\r\n\tscheduler._hide_global_tip();\r\n\r\n\tvar toptip = scheduler._global_tip = document.createElement(\"div\");\r\n\ttoptip.className='dhx_global_tip';\r\n\r\n\tscheduler._update_global_tip(1);\r\n\r\n\tdocument.body.appendChild(toptip);\r\n};\r\nscheduler._update_global_tip = function(init){\r\n\tvar toptip = scheduler._global_tip;\r\n\tif (toptip){\r\n\t\tvar time = \"\";\r\n\t\tif (scheduler._drag_id && !init){\r\n\t\t\tvar ev = scheduler.getEvent(scheduler._drag_id);\r\n\t\t\tif (ev)\r\n\t\t\t\ttime = \"
\" + (ev._timed ? scheduler.templates.event_header(ev.start_date, ev.end_date, ev):scheduler.templates.day_date(ev.start_date, ev.end_date, ev)) + \"
\";\r\n\t\t}\r\n\r\n\t\tif (scheduler._drag_mode == \"create\" || scheduler._drag_mode == \"new-size\")\r\n\t\t\ttoptip.innerHTML = (scheduler.locale.labels.drag_to_create || \"Drag to create\")+time;\r\n\t\telse\r\n\t\t\ttoptip.innerHTML = (scheduler.locale.labels.drag_to_move || \"Drag to move\")+time;\r\n\t}\r\n};\r\nscheduler._hide_global_tip = function(){\r\n\tvar toptip = scheduler._global_tip;\r\n\tif (toptip && toptip.parentNode){\r\n\t\ttoptip.parentNode.removeChild(toptip);\r\n\t\tscheduler._global_tip = 0;\r\n\t}\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._addThemeClass = function(){\r\n\tdocument.documentElement.setAttribute(\"data-scheduler-theme\", scheduler.skin);\r\n};\r\n\r\nscheduler._skin_settings = {\r\n\tfix_tab_position: [1,0],\r\n\tuse_select_menu_space: [1,0],\r\n\twide_form: [1,0],\r\n\r\n\thour_size_px: [44,42],\r\n\tdisplayed_event_color: [\"#ff4a4a\", \"ffc5ab\"],\r\n\tdisplayed_event_text_color: [\"#ffef80\", \"7e2727\"]\r\n};\r\n\r\nscheduler._skin_xy = {\r\n\tlightbox_additional_height: [90,50],\r\n\tnav_height: [59,22],\r\n\tbar_height: [24,20]\r\n};\r\n\r\n// material skin uses a different box sizing model than other skins, and also requires some post-processing.\r\n// In order to render events correctly, we need to know which box sizing model is used\r\n// We can detect it by styles applied, taking into account that styles may be loaded after scheduler is rendered\r\n\r\nscheduler._is_material_skin = function(){\r\n\tif(!scheduler.skin){\r\n\t\treturn checkIfMaterialSkin();\r\n\t}else{\r\n\t\treturn ((scheduler.skin + \"\").indexOf(\"material\") > -1);\r\n\t}\r\n};\r\n\r\nfunction themeNameFromFile(){\r\n\tvar links = document.getElementsByTagName(\"link\");\r\n\tfor (var i = 0; i < links.length; i++) {\r\n\t\tvar res = links[i].href.match(\"dhtmlxscheduler_([a-z]+).css\");\r\n\t\tif (res){\r\n\t\t\treturn res[1];\r\n\t\t}\r\n\t}\r\n}\r\n\r\nscheduler._build_skin_info = function() {\r\n\tmonitorThemeChange();\r\n\tconst styles = getComputedStyle(this.$container);\r\n\tconst themeVar = styles.getPropertyValue(\"--dhx-scheduler-theme\");\r\n\r\n\tlet isCssVarTheme = !!themeVar;\r\n\tlet themeName;\r\n\tlet cssValues = {};\r\n\tlet oldMaterialTheme = false;\r\n\r\n\tif(isCssVarTheme){\r\n\t\tthemeName = themeVar;\r\n\t\tfor(let i in scheduler.xy){\r\n\t\t\tcssValues[i] = styles.getPropertyValue(`--dhx-scheduler-xy-${i}`);\r\n\t\t}\r\n\r\n\t\tcssValues.hour_size_px = styles.getPropertyValue(`--dhx-scheduler-config-hour_size_px`);\r\n\t\tcssValues.wide_form = styles.getPropertyValue(`--dhx-scheduler-config-form_wide`);\r\n\r\n\t}else{\r\n\t\tthemeName = themeNameFromFile();\r\n\t\toldMaterialTheme = scheduler._is_material_skin();\r\n\t}\r\n\r\n\r\n\tscheduler._theme_info = {\r\n\t\ttheme: themeName,\r\n\t\tcssVarTheme: isCssVarTheme,\r\n\t\toldMaterialTheme: oldMaterialTheme,\r\n\t\tvalues: cssValues\r\n\t};\r\n\r\n\tif(scheduler._theme_info.cssVarTheme){\r\n\t\tconst themeVariables = this._theme_info.values;\r\n\t\tfor(let i in scheduler.xy){\r\n\t\t\tif(!isNaN(parseInt(themeVariables[i]))){\r\n\t\t\t\tscheduler.xy[i] = parseInt(themeVariables[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n\r\nvar calculatedMaterial;\r\nfunction checkIfMaterialSkin(){\r\n\tif(calculatedMaterial === undefined){\r\n\t\tvar probe = document.createElement(\"div\");\r\n\t\tprobe.style.position = \"absolute\";\r\n\t\tprobe.style.left = \"-9999px\";\r\n\t\tprobe.style.top = \"-9999px\";\r\n\t\tprobe.innerHTML = \"
\" +\r\n\t\t\t\"
\" +\r\n\t\t\t\"
\"+\r\n\t\t\"
\";\r\n\t\tdocument.body.appendChild(probe);\r\n\t\tvar styles = window.getComputedStyle(probe.querySelector(\".dhx_cal_scale_placeholder\"));\r\n\t\tvar position = styles.getPropertyValue('position');\r\n\t\tif(position === \"absolute\"){\r\n\t\t\t// page has skins for placeholder element from material skin\r\n\t\t\tcalculatedMaterial = true;\r\n\t\t}else{\r\n\t\t\tcalculatedMaterial = false;\r\n\t\t}\r\n\r\n\t\tsetTimeout(function(){\r\n\t\t\tcalculatedMaterial = null;\r\n\t\t\tif(probe && probe.parentNode){\r\n\t\t\t\tprobe.parentNode.removeChild(probe);\r\n\t\t\t}\r\n\t\t}, 500);\r\n\t}\r\n\treturn calculatedMaterial;\r\n}\r\n\r\nvar cachedBorderBoxValue;\r\nfunction checkIfBorderBoxStyling(){\r\n\tif(scheduler._is_material_skin()){\r\n\t\treturn true;\r\n\t}else{\r\n\t\tif(cachedBorderBoxValue === undefined){\r\n\t\t\tvar probe = document.createElement(\"div\");\r\n\t\t\tprobe.style.position = \"absolute\";\r\n\t\t\tprobe.style.left = \"-9999px\";\r\n\t\t\tprobe.style.top = \"-9999px\";\r\n\t\t\tprobe.innerHTML = \"
\" +\r\n\t\t\t\t\"
\" +\r\n\t\t\t\t\t\"
\"+\r\n\t\t\t\t\"
\"+\r\n\t\t\t\"
\";\r\n\r\n\t\t\tdocument.body.appendChild(probe);\r\n\t\t\tvar styles = window.getComputedStyle(probe.querySelector(\".dhx_body\"));\r\n\t\t\tvar boxSizing = styles.getPropertyValue('box-sizing');\r\n\t\t\tdocument.body.removeChild(probe);\r\n\t\t\tcachedBorderBoxValue = !!(boxSizing === \"border-box\");\r\n\r\n\t\t\tif(!cachedBorderBoxValue){\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tcachedBorderBoxValue = undefined;\r\n\t\t\t\t}, 1000);// recalculate in case scheduler initialized before skin is loaded\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn cachedBorderBoxValue;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction refreshAfterLoad(){\r\n\tif(scheduler._is_material_skin() || scheduler._border_box_events()){\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar oldStyling = cachedBorderBoxValue;\r\n\tcachedBorderBoxValue = undefined;\r\n\tcalculatedMaterial = undefined;\r\n\tvar newStyling = checkIfBorderBoxStyling();\r\n\r\n\t// if box styling model changed - means scheduler was rendered before stylesheet was loaded or parsed inline\r\n\t// repaint scheduler in order to apply new styles\r\n\tif(oldStyling !== newStyling && scheduler.$container && scheduler.getState().mode){\r\n\t\tscheduler.setCurrentView();\r\n\t}\r\n}\r\nscheduler.event(window, 'DOMContentLoaded', refreshAfterLoad);\r\nscheduler.event(window, 'load', refreshAfterLoad);\r\n\r\nscheduler._border_box_events = function(){\r\n\treturn checkIfBorderBoxStyling();\r\n};\r\n\r\nscheduler._configure = function(col, data, skin){\r\n\tfor (var key in data)\r\n\t\tif (typeof col[key] == \"undefined\")\r\n\t\t\tcol[key] = data[key][skin];\r\n};\r\n\r\nscheduler.setSkin = function(value){\r\n\tthis.skin = value;\r\n\tscheduler._addThemeClass();\r\n\tif(scheduler.$container){\r\n\t\tthis._skin_init();\r\n\t\tthis.render();\r\n\t}\r\n\t\r\n\t//\r\n};\r\n\r\nfunction flatSkinHourScale(date){\r\n\tvar min = date.getMinutes();\r\n\tmin = min < 10 ? \"0\"+min : min;\r\n\tvar html = \"\"+ date.getHours() +\"\"+\r\n\t\t\" \"+ min +\"\";\r\n\treturn html;\r\n}\r\n\r\nlet monitorIntervalId = null;\r\nfunction monitorThemeChange(){\r\n\tconst container = scheduler.$container;\r\n\t\r\n\tclearInterval(monitorIntervalId);\r\n\tif(container){\r\n\t\tmonitorIntervalId = setInterval(() => {\r\n\t\t\tconst csstheme = getComputedStyle(container).getPropertyValue('--dhx-scheduler-theme');\r\n\t\t\tif(csstheme && csstheme !== scheduler.skin){\r\n\t\t\t\tscheduler.setSkin(csstheme);\r\n\t\t\t}\r\n\r\n\t\t}, 100);\r\n\t}\r\n}\r\nscheduler.attachEvent(\"onDestroy\", function(){\r\n\tclearInterval(monitorIntervalId);\r\n});\r\n\r\nscheduler._skin_init = function(){\r\n\tthis._build_skin_info();\r\n\r\n\tif (!this.skin){\r\n\t\tthis.skin = this._theme_info.theme;\r\n\t}\r\n\tscheduler._addThemeClass();\r\n\tif (scheduler.skin === \"flat\"){\r\n\t\t// scheduler.xy.scale_height = 35;\r\n\t\tscheduler.templates.hour_scale = flatSkinHourScale;\r\n\t}else if (scheduler.templates.hour_scale === flatSkinHourScale){\r\n\t\tscheduler.templates.hour_scale = scheduler.date.date_to_str(scheduler.config.hour_date);\r\n\t}\r\n\r\n\r\n\r\n\t//scheduler._lightbox_template=\"
 
\";\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\r\n\t\tvar date_to_str = scheduler.date.date_to_str(\"%d\");\r\n\t\tif(!scheduler.templates._old_month_day){\r\n\t\t\tscheduler.templates._old_month_day = scheduler.templates.month_day;\r\n\t\t}\r\n\t\tvar old_month_day = scheduler.templates._old_month_day;\r\n\t\tscheduler.templates.month_day = function(date) {\r\n\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\tvar label = date_to_str(date);\r\n\t\t\t\tif (date.getDate() == 1) {\r\n\t\t\t\t\tlabel = scheduler.locale.date.month_full[date.getMonth()] + \" \" + label;\r\n\t\t\t\t}\r\n\t\t\t\tif (+date == +scheduler.date.date_part(this._currentDate())) {\r\n\t\t\t\t\tlabel = scheduler.locale.labels.dhx_cal_today_button + \" \" + label;\r\n\t\t\t\t}\r\n\t\t\t\treturn label;\r\n\t\t\t} else {\r\n\t\t\t\treturn old_month_day.call(this, date);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t// tab classes\r\n\t\tif(scheduler.config.fix_tab_position){\r\n\t\t\tconst tabs = scheduler._els[\"dhx_cal_navline\"][0].querySelectorAll('[data-tab]');\r\n\t\t\ttabs.forEach((tab) => {\r\n\t\t\t\tconst view = tab.getAttribute(\"data-tab\") || tab.getAttribute(\"name\");\r\n\r\n\t\t\t\tswitch (view) {\r\n\t\t\t\t\tcase \"day\":\r\n\t\t\t\t\tcase \"day_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_first\");\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"week\":\r\n\t\t\t\t\tcase \"week_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"month\":\r\n\t\t\t\t\tcase \"month_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_last\");\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_standalone\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\treorderTabs(scheduler._els[\"dhx_cal_navline\"][0]);\r\n\r\n\t\t}\r\n\t}, {once: true});\r\n\r\n\tfunction reorderTabs(container) {\r\n\t\t// segmented tabs should go first\r\n\r\n\t\tif(scheduler.config.header){\r\n\t\t\treturn;\r\n\t\t\t// don't reorder tabs if header is defined via config\r\n\t\t}\r\n\t\tconst tabs = Array.from(container.querySelectorAll('.dhx_cal_tab'));\r\n\t\r\n\t\t// segmented tabs\r\n\t\tconst order = ['day', 'week', 'month'];\r\n\t\r\n\t\tconst specialTabs = order.map(tabName => \r\n\t\t\ttabs.find(tab => tab.getAttribute('data-tab') === tabName)\r\n\t\t).filter(tab => tab !== undefined);\r\n\t\r\n\t\tlet firstTab = tabs.length > 0 ? tabs[0] : null;\r\n\r\n\t\tspecialTabs.reverse().forEach(tab => {\r\n\t\t\tcontainer.insertBefore(tab, firstTab);\r\n\t\t\tfirstTab = tab;\r\n\t\t});\r\n\t}\r\n\r\n\t// scheduler._skin_init = function(){\r\n\t// \tthis._build_skin_info();\r\n\t// \tthis.skin = this._theme_info.theme;\r\n\t// };\r\n};\r\n\r\n\r\n\r\n}","export default function DataProcessorEvents(scheduler, dp){\r\n\tthis.$scheduler = scheduler;\r\n\tthis.$dp = dp;\r\n\tthis._dataProcessorHandlers = [];\r\n\r\n\tthis.attach = function () {\r\n\t\tvar dp = this.$dp;\r\n\t\tvar scheduler = this.$scheduler;\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onEventAdded\", function(id) {\r\n\t\t\tif (!this._loading && this._validId(id))\r\n\t\t\tdp.setUpdated(id,true,\"inserted\");\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function(id) {\r\n\t\t\tif (!this._validId(id)) return;\r\n\t\t\tvar z=dp.getState(id);\r\n\r\n\t\t\tif (z==\"inserted\" || this._new_event) { dp.setUpdated(id,false); return true; }\r\n\t\t\tif (z==\"deleted\") return false;\r\n\t\t\tif (z==\"true_deleted\") return true;\r\n\r\n\t\t\tdp.setUpdated(id,true,\"deleted\");\r\n\t\t\treturn false;\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onEventChanged\", function(id) { \r\n\t\t\tif (!this._loading && this._validId(id))\r\n\t\t\tdp.setUpdated(id,true,\"updated\");\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onClearAll\", function() { \r\n\t\t\t// clear dataprocessor state when scheduler is reset\r\n\t\t\tdp._in_progress={};\r\n\t\t\tdp._invalid={};\r\n\t\t\tdp.updatedRows = [];\r\n\t\t\tdp._waitMode = 0;\r\n\t\t}));\r\n\r\n\t\tdp.attachEvent(\"insertCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"updateCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"deleteCallback\", function(upd, id) {\r\n\t\t\tif (scheduler.getEvent(id)){\r\n\t\t\t\tscheduler.setUserData(id, this.action_param, \"true_deleted\");\r\n\t\t\t\tscheduler.deleteEvent(id);\r\n\t\t\t} else if (scheduler._add_rec_marker)\r\n\t\t\t\tscheduler._update_callback(upd, id);\r\n\t\t});\r\n\t};\r\n\r\n\tthis.detach = function () {\r\n\t\tfor (var key in this._dataProcessorHandlers) {\r\n\t\t\tvar handler = this._dataProcessorHandlers[key];\r\n\t\t\tthis.$scheduler.detachEvent(handler);\r\n\t\t}\r\n\t\tthis._dataProcessorHandlers = [];\r\n\t};\r\n}\r\n\r\nexport function extendScheduler(scheduler, dp){\r\n\tscheduler._validId=function(id){\r\n\t\tif(this._is_virtual_event){\r\n\t\t\treturn !this._is_virtual_event(id);\r\n\t\t}\r\n\t\treturn true;\r\n\t};\r\n\tscheduler.setUserData=function(id,name,value){\r\n\t\tif (id){\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif(ev) ev[name]=value;\r\n\t\t}else{\r\n\t\t\tthis._userdata[name]=value;\r\n\t\t}\r\n\t};\r\n\tscheduler.getUserData=function(id,name){\r\n\t\tif (id){\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif(ev)\r\n\t\t\t\treturn ev[name];\r\n\t\t\telse\r\n\t\t\t\treturn null;\r\n\t\t}else{\r\n\t\t\treturn this._userdata[name];\r\n\t\t}\r\n\t};\r\n\tscheduler._set_event_text_style=function(id,style){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\t\tthis.for_rendered(id,function(r){\r\n\t\t\tr.style.cssText+=\";\"+style;\r\n\t\t});\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tev[\"_text_style\"]=style;\r\n\t\tthis.event_updated(ev);\r\n\t};\r\n\tscheduler._update_callback = function(upd,id){\r\n\t\tvar data = scheduler._xmlNodeToJSON(upd.firstChild);\r\n\t\t//fix for updates of recurring events\r\n\t\tif (data.rec_type == \"none\") data.rec_pattern = \"none\";\r\n\t\tdata.text = data.text||data._tagvalue;\r\n\t\tdata.start_date = scheduler._helpers.parseDate(data.start_date);\r\n\t\tdata.end_date = scheduler._helpers.parseDate(data.end_date);\r\n\t\tscheduler.addEvent(data);\r\n\t\tif (scheduler._add_rec_marker)\r\n\t\t\tscheduler.setCurrentView();\r\n\t};\r\n\tscheduler._dp_change_event_id = function(id, new_id){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\t\tscheduler.changeEventId(id, new_id);\r\n\t};\r\n\tscheduler._dp_hook_delete = function(id, new_id){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\r\n\t\tif(new_id && id != new_id){\r\n\t\t\tif(this.getUserData(id, dp.action_param) == \"true_deleted\")\r\n\t\t\t\tthis.setUserData(id, dp.action_param, \"updated\");\r\n\r\n\t\t\tthis.changeEventId(id, new_id);\r\n\t\t}\r\n\t\treturn this.deleteEvent(new_id, true);\r\n\t};\r\n\r\n\tscheduler.setDp = function() {\r\n\t\tthis._dp = dp;\r\n\t};\r\n\tscheduler.setDp();\r\n}","import DataProcessorEvents from \"./dataprocessor_hooks\";\r\nimport { extendScheduler } from \"./dataprocessor_hooks\";\r\nimport eventable from \"../../utils/eventable\";\r\nimport global from \"../../global\";\r\n\r\n/**\r\n *\t@desc: constructor, data processor object\r\n *\t@param: serverProcessorURL - url used for update\r\n *\t@type: public\r\n */\r\nexport function DataProcessor(serverProcessorURL){\r\n\tthis.serverProcessor = serverProcessorURL;\r\n\tthis.action_param = \"!nativeeditor_status\";\r\n\r\n\tthis.object = null;\r\n\tthis.updatedRows = []; // ids of updated rows\r\n\r\n\tthis.autoUpdate = true;\r\n\tthis.updateMode = \"cell\";\r\n\tthis._tMode = \"GET\";\r\n\tthis._headers = null;\r\n\tthis._payload = null;\r\n\tthis.post_delim = \"_\";\r\n\r\n\tthis._waitMode = 0;\r\n\tthis._in_progress = {};\r\n\tthis._invalid = {};\r\n\tthis.messages = [];\r\n\r\n\tthis.styles = {\r\n\t\tupdated: \"font-weight:bold;\",\r\n\t\tinserted: \"font-weight:bold;\",\r\n\t\tdeleted: \"text-decoration : line-through;\",\r\n\t\tinvalid: \"background-color:FFE0E0;\",\r\n\t\tinvalid_cell: \"border-bottom:2px solid red;\",\r\n\t\terror: \"color:red;\",\r\n\t\tclear: \"font-weight:normal;text-decoration:none;\"\r\n\t};\r\n\tthis.enableUTFencoding(true);\r\n\teventable(this); // TODO: need to update\r\n\r\n\treturn this;\r\n}\r\nDataProcessor.prototype = {\r\n\tsetTransactionMode: function (mode, total) {\r\n\t\tif (typeof mode == \"object\") {\r\n\t\t\tthis._tMode = mode.mode || this._tMode;\r\n\r\n\t\t\tif (mode.headers !== undefined) {\r\n\t\t\t\tthis._headers = mode.headers;\r\n\t\t\t}\r\n\r\n\t\t\tif (mode.payload !== undefined) {\r\n\t\t\t\tthis._payload = mode.payload;\r\n\t\t\t}\r\n\t\t\tthis._tSend = !!total;\r\n\t\t} else {\r\n\t\t\tthis._tMode = mode;\r\n\t\t\tthis._tSend = total;\r\n\t\t}\r\n\r\n\t\tif (this._tMode == \"REST\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t}\r\n\r\n\t\tif (this._tMode === \"JSON\" || this._tMode === \"REST-JSON\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t\tthis._serializeAsJson = true;\r\n\t\t\tthis._headers = this._headers || {};\r\n\t\t\tthis._headers[\"Content-Type\"] = \"application/json\";\r\n\t\t}else{\r\n\t\t\tif(this._headers && !this._headers[\"Content-Type\"]){\r\n\t\t\t\tthis._headers[\"Content-Type\"] = \"application/x-www-form-urlencoded\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (this._tMode === \"CUSTOM\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t\tthis._router = mode.router;\r\n\t\t}\r\n\t},\r\n\tescape: function (data) {\r\n\t\tif (this._utf)\r\n\t\t\treturn encodeURIComponent(data);\r\n\t\telse\r\n\t\t\treturn escape(data);\r\n\t},\r\n\t/**\r\n\t *\t@desc: allows to set escaping mode\r\n\t *\t@param: true - utf based escaping, simple - use current page encoding\r\n\t *\t@type: public\r\n\t */\r\n\tenableUTFencoding: function (mode) {\r\n\t\tthis._utf = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: allows to define, which column may trigger update\r\n\t *\t@param: val - array or list of true/false values\r\n\t *\t@type: public\r\n\t */\r\n\tsetDataColumns: function (val) {\r\n\t\tthis._columns = (typeof val == \"string\") ? val.split(\",\") : val;\r\n\t},\r\n\t/**\r\n\t *\t@desc: get state of updating\r\n\t *\t@returns: true - all in sync with server, false - some items not updated yet.\r\n\t *\t@type: public\r\n\t */\r\n\tgetSyncState: function () {\r\n\t\treturn !this.updatedRows.length;\r\n\t},\r\n\t/**\r\n\t *\t@desc: enable/disable named field for data syncing, will use column ids for grid\r\n\t *\t@param: mode - true/false\r\n\t *\t@type: public\r\n\t */\r\n\tenableDataNames: function (mode) {\r\n\t\tthis._endnm = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: enable/disable mode , when only changed fields and row id send to the server side, instead of all fields in default mode\r\n\t *\t@param: mode - true/false\r\n\t *\t@type: public\r\n\t */\r\n\tenablePartialDataSend: function (mode) {\r\n\t\tthis._changed = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: set if rows should be send to server automatically\r\n\t *\t@param: mode - \"row\" - based on row selection changed, \"cell\" - based on cell editing finished, \"off\" - manual data sending\r\n\t *\t@type: public\r\n\t */\r\n\tsetUpdateMode: function (mode, dnd) {\r\n\t\tthis.autoUpdate = (mode == \"cell\");\r\n\t\tthis.updateMode = mode;\r\n\t\tthis.dnd = dnd;\r\n\t},\r\n\tignore: function (code, master) {\r\n\t\tthis._silent_mode = true;\r\n\t\tcode.call(master || window);\r\n\t\tthis._silent_mode = false;\r\n\t},\r\n\t/**\r\n\t *\t@desc: mark row as updated/normal. check mandatory fields,initiate autoupdate (if turned on)\r\n\t *\t@param: rowId - id of row to set update-status for\r\n\t *\t@param: state - true for \"updated\", false for \"not updated\"\r\n\t *\t@param: mode - update mode name\r\n\t *\t@type: public\r\n\t */\r\n\tsetUpdated: function (rowId, state, mode) {\r\n\t\tif (this._silent_mode) return;\r\n\t\tvar ind = this.findRow(rowId);\r\n\r\n\t\tmode = mode || \"updated\";\r\n\t\tvar existing = this.$scheduler.getUserData(rowId, this.action_param);\r\n\t\tif (existing && mode == \"updated\") mode = existing;\r\n\t\tif (state) {\r\n\t\t\tthis.set_invalid(rowId, false); //clear previous error flag\r\n\t\t\tthis.updatedRows[ind] = rowId;\r\n\t\t\tthis.$scheduler.setUserData(rowId, this.action_param, mode);\r\n\t\t\tif (this._in_progress[rowId])\r\n\t\t\t\tthis._in_progress[rowId] = \"wait\";\r\n\t\t} else {\r\n\t\t\tif (!this.is_invalid(rowId)) {\r\n\t\t\t\tthis.updatedRows.splice(ind, 1);\r\n\t\t\t\tthis.$scheduler.setUserData(rowId, this.action_param, \"\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.markRow(rowId, state, mode);\r\n\t\tif (state && this.autoUpdate) this.sendData(rowId);\r\n\t},\r\n\r\n\tmarkRow: function (id, state, mode) {\r\n\t\tvar str = \"\";\r\n\t\tvar invalid = this.is_invalid(id);\r\n\t\tif (invalid) {\r\n\t\t\tstr = this.styles[invalid];\r\n\t\t\tstate = true;\r\n\t\t}\r\n\t\tif (this.callEvent(\"onRowMark\", [id, state, mode, invalid])) {\r\n\t\t\t//default logic\r\n\t\t\tstr = this.styles[state ? mode : \"clear\"] + str;\r\n\r\n\t\t\tthis.$scheduler[this._methods[0]](id, str);\r\n\r\n\t\t\tif (invalid && invalid.details) {\r\n\t\t\t\tstr += this.styles[invalid + \"_cell\"];\r\n\t\t\t\tfor (var i = 0; i < invalid.details.length; i++)\r\n\t\t\t\t\tif (invalid.details[i])\r\n\t\t\t\t\t\tthis.$scheduler[this._methods[1]](id, i, str);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tgetActionByState: function(state) {\r\n\t\tif (state === \"inserted\") {\r\n\t\t\treturn \"create\";\r\n\t\t}\r\n\t\tif (state === \"updated\") {\r\n\t\t\treturn \"update\";\r\n\t\t}\r\n\t\tif (state === \"deleted\") {\r\n\t\t\treturn \"delete\";\r\n\t\t}\r\n\t\treturn \"update\";\r\n\t},\r\n\r\n\tgetState: function (id) {\r\n\t\treturn this.$scheduler.getUserData(id, this.action_param);\r\n\t},\r\n\tis_invalid: function (id) {\r\n\t\treturn this._invalid[id];\r\n\t},\r\n\tset_invalid: function (id, mode, details) {\r\n\t\tif (details) mode = {\r\n\t\t\tvalue: mode, details: details, toString: function () {\r\n\t\t\t\treturn this.value.toString();\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis._invalid[id] = mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: check mandatory fields and varify values of cells, initiate update (if specified)\r\n\t *\t@param: rowId - id of row to set update-status for\r\n\t *\t@type: public\r\n\t */\r\n\tcheckBeforeUpdate: function (rowId) {\r\n\t\treturn true;\r\n\t},\r\n\t/**\r\n\t *\t@desc: send row(s) values to server\r\n\t *\t@param: rowId - id of row which data to send. If not specified, then all \"updated\" rows will be send\r\n\t *\t@type: public\r\n\t */\r\n\tsendData: function (rowId) {\r\n\t\tif (this.$scheduler.editStop) this.$scheduler.editStop();\r\n\r\n\t\tif (typeof rowId == \"undefined\" || this._tSend) return this.sendAllData();\r\n\t\tif (this._in_progress[rowId]) return false;\r\n\r\n\t\tthis.messages = [];\r\n\t\tif (!this.checkBeforeUpdate(rowId) && this.callEvent(\"onValidationError\", [rowId, this.messages])) return false;\r\n\t\tthis._beforeSendData(this._getRowData(rowId), rowId);\r\n\t},\r\n\t_beforeSendData: function (data, rowId) {\r\n\t\tif (!this.callEvent(\"onBeforeUpdate\", [rowId, this.getState(rowId), data])) return false;\r\n\t\tthis._sendData(data, rowId);\r\n\t},\r\n\tserialize: function (data, id) {\r\n\t\tif (this._serializeAsJson) {\r\n\t\t\treturn this._serializeAsJSON(data);\r\n\t\t}\r\n\r\n\t\tif (typeof data == \"string\")\r\n\t\t\treturn data;\r\n\t\tif (typeof id != \"undefined\")\r\n\t\t\treturn this.serialize_one(data, \"\");\r\n\t\telse {\r\n\t\t\tvar stack = [];\r\n\t\t\tvar keys = [];\r\n\t\t\tfor (var key in data)\r\n\t\t\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\t\t\tstack.push(this.serialize_one(data[key], key + this.post_delim));\r\n\t\t\t\t\tkeys.push(key);\r\n\t\t\t\t}\r\n\t\t\tstack.push(\"ids=\" + this.escape(keys.join(\",\")));\r\n\t\t\tif (this.$scheduler.security_key)\r\n\t\t\t\tstack.push(\"dhx_security=\" + (this.$scheduler.security_key));\r\n\t\t\treturn stack.join(\"&\");\r\n\t\t}\r\n\t},\r\n\tserialize_one: function (data, pref) {\r\n\t\tif (typeof data == \"string\")\r\n\t\t\treturn data;\r\n\t\tvar stack = [];\r\n\t\tvar serialized = \"\";\r\n\t\tfor (var key in data)\r\n\t\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\t\tif ((key == \"id\" || key == this.action_param) && this._tMode == \"REST\") continue;\r\n\t\t\t\tif (typeof data[key] === \"string\" || typeof data[key] === \"number\") {\r\n\t\t\t\t\tserialized = data[key];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tserialized = JSON.stringify(data[key]);\r\n\t\t\t\t}\r\n\t\t\t\tstack.push(this.escape((pref || \"\") + key) + \"=\" + this.escape(serialized));\r\n\t\t\t}\r\n\t\treturn stack.join(\"&\");\r\n\t},\r\n\t_applyPayload: function (url) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tif (this._payload)\r\n\t\t\tfor (var key in this._payload)\r\n\t\t\t\turl = url + ajax.urlSeparator(url) + this.escape(key) + \"=\" + this.escape(this._payload[key]);\r\n\t\treturn url;\r\n\t},\r\n\t_sendData: function (dataToSend, rowId) {\r\n\t\tif (!dataToSend) {\r\n\t\t\treturn; // nothing to send\r\n\t\t}\r\n\t\tif (!this.callEvent(\"onBeforeDataSending\", rowId ? [rowId, this.getState(rowId), dataToSend] : [null, null, dataToSend])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (rowId) {\r\n\t\t\tthis._in_progress[rowId] = (new Date()).valueOf();\r\n\t\t}\r\n\r\n\t\tvar self = this;\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\r\n\t\tif (this._tMode === \"CUSTOM\") {\r\n\t\t\tvar state = this.getState(rowId);\r\n\t\t\tvar action = this.getActionByState(state);\r\n\t\t\tvar _onResolvedCreateUpdate = function (tag) {\r\n\t\t\t\tvar resultState = state;\r\n\t\t\t\tif(tag && tag.responseText && tag.setRequestHeader){\r\n\t\t\t\t\tif(tag.status !== 200){\r\n\t\t\t\t\t\tresultState = \"error\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\ttag = JSON.parse(tag.responseText);\r\n\t\t\t\t\t} catch (e){}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tresultState = resultState || \"updated\";\r\n\t\t\t\tvar sid = rowId;\r\n\t\t\t\tvar tid = rowId;\r\n\r\n\t\t\t\tif (tag) {\r\n\t\t\t\t\tresultState = tag.action || resultState;\r\n\t\t\t\t\tsid = tag.sid || sid;\r\n\t\t\t\t\ttid = tag.id || tag.tid || tid;\r\n\t\t\t\t}\r\n\t\t\t\tself.afterUpdateCallback(sid, tid, resultState, tag);\r\n\t\t\t};\r\n\r\n\t\t\tconst routerMode = \"event\";\r\n\t\t\tvar actionPromise;\r\n\t\t\tif (this._router instanceof Function) {\r\n\t\t\t\tactionPromise = this._router(routerMode, action, dataToSend, rowId);\r\n\t\t\t} else {\r\n\t\t\t\tswitch (state) {\r\n\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].create(dataToSend);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].delete(rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].update(dataToSend, rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(actionPromise){\r\n\t\t\t\t// neither promise nor {tid: newId} response object\r\n\t\t\t\tif(!actionPromise.then &&\r\n\t\t\t\t\t(actionPromise.id === undefined && actionPromise.tid === undefined && actionPromise.action === undefined)){\r\n\t\t\t\t\tthrow new Error(\"Incorrect router return value. A Promise or a response object is expected\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(actionPromise.then){\r\n\t\t\t\t\tactionPromise.then(_onResolvedCreateUpdate).catch(function(error) {\r\n\t\t\t\t\t\tif(error && error.action){\r\n\t\t\t\t\t\t\t_onResolvedCreateUpdate(error);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t_onResolvedCreateUpdate({ action: \"error\", value: error});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// custom method may return a response object in case of sync action\r\n\t\t\t\t\t_onResolvedCreateUpdate(actionPromise);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t_onResolvedCreateUpdate(null);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar queryParams = {\r\n\t\t\tcallback: function(xml) {\r\n\t\t\t\tvar ids = [];\r\n\r\n\t\t\t\tif (rowId) {\r\n\t\t\t\t\tids.push(rowId);\r\n\t\t\t\t} else if (dataToSend) {\r\n\t\t\t\t\tfor (var key in dataToSend) {\r\n\t\t\t\t\t\tids.push(key);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.afterUpdate(self, xml, ids);\r\n\t\t\t},\r\n\t\t\theaders: self._headers\r\n\t\t};\r\n\r\n\t\tvar urlParams = this.serverProcessor + (this._user ? (ajax.urlSeparator(this.serverProcessor) + [\"dhx_user=\" + this._user, \"dhx_version=\" + this.$scheduler.getUserData(0, \"version\")].join(\"&\")) : \"\");\r\n\t\tvar url = this._applyPayload(urlParams);\r\n\t\tvar data;\r\n\r\n\t\tswitch (this._tMode) {\r\n\t\t\tcase \"GET\":\r\n\t\t\t\tdata = this._cleanupArgumentsBeforeSend(dataToSend);\r\n\t\t\t\tqueryParams.url = url + ajax.urlSeparator(url) + this.serialize(data, rowId);\r\n\t\t\t\tqueryParams.method = \"GET\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"POST\":\r\n\t\t\t\tdata = this._cleanupArgumentsBeforeSend(dataToSend);\r\n\t\t\t\tqueryParams.url = url;\r\n\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\tqueryParams.data = this.serialize(data, rowId);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"JSON\":\r\n\t\t\t\tdata = {};\r\n\t\t\t\tvar preprocessedData = this._cleanupItemBeforeSend(dataToSend);\r\n\t\t\t\tfor (var key in preprocessedData) {\r\n\t\t\t\t\tif (key === this.action_param || key === \"id\" || key === \"gr_id\") {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdata[key] = preprocessedData[key];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tqueryParams.url = url;\r\n\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\tqueryParams.data = JSON.stringify({\r\n\t\t\t\t\tid: rowId,\r\n\t\t\t\t\taction: dataToSend[this.action_param],\r\n\t\t\t\t\tdata: data\r\n\t\t\t\t});\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"REST\":\r\n\t\t\tcase \"REST-JSON\":\r\n\t\t\t\turl = urlParams.replace(/(&|\\?)editing=true/, \"\");\r\n\t\t\t\tdata = \"\";\r\n\r\n\t\t\t\tswitch (this.getState(rowId)) {\r\n\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\t\t\tqueryParams.data = this.serialize(dataToSend, rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\tqueryParams.method = \"DELETE\";\r\n\t\t\t\t\t\turl = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + rowId;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tqueryParams.method = \"PUT\";\r\n\t\t\t\t\t\tqueryParams.data = this.serialize(dataToSend, rowId);\r\n\t\t\t\t\t\turl = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + rowId;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tqueryParams.url = this._applyPayload(url);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tthis._waitMode++;\r\n\t\treturn ajax.query(queryParams);\r\n\t},\r\n\tsendAllData: function () {\r\n\t\tif (!this.updatedRows.length || this.updateMode === \"off\") { // FIXME: need to leave checking 'this.updateMode === \"off\"'?\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.messages = [];\r\n\t\tvar valid = true;\r\n\r\n\t\tthis._forEachUpdatedRow(function(rowId) {\r\n\t\t\tvalid = valid && this.checkBeforeUpdate(rowId);\r\n\t\t});\r\n\r\n\t\tif (!valid && !this.callEvent(\"onValidationError\", [\"\", this.messages])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (this._tSend) {\r\n\t\t\tthis._sendData(this._getAllData());\r\n\t\t} else {\r\n\t\t\tthis._forEachUpdatedRow(function(rowId) {\r\n\t\t\t\tif (!this._in_progress[rowId]) {\r\n\t\t\t\t\tif (this.is_invalid(rowId)) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis._beforeSendData(this._getRowData(rowId), rowId);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\t_getAllData: function (rowId) {\r\n\t\tvar out = {};\r\n\t\tvar has_one = false;\r\n\t\tthis._forEachUpdatedRow(function(id) {\r\n\t\t\tif (this._in_progress[id] || this.is_invalid(id)){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar row = this._getRowData(id);\r\n\t\t\tif (!this.callEvent(\"onBeforeUpdate\", [id, this.getState(id), row])) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tout[id] = row;\r\n\t\t\thas_one = true;\r\n\t\t\tthis._in_progress[id] = (new Date()).valueOf();\r\n\t\t});\r\n\t\treturn has_one ? out : null;\r\n\t},\r\n\r\n\tfindRow: function (pattern) {\r\n\t\tvar i = 0;\r\n\t\tfor (i = 0; i < this.updatedRows.length; i++)\r\n\t\t\tif (pattern == this.updatedRows[i]) break;\r\n\t\treturn i;\r\n\t},\r\n\r\n\t/**\r\n\t *\t@desc: define custom actions\r\n\t *\t@param: name - name of action, same as value of action attribute\r\n\t *\t@param: handler - custom function, which receives a XMl response content for action\r\n\t *\t@type: private\r\n\t */\r\n\tdefineAction: function (name, handler) {\r\n\t\tif (!this._uActions) this._uActions = {};\r\n\t\tthis._uActions[name] = handler;\r\n\t},\r\n\r\n\t/**\r\n\t *\t @desc: used in combination with setOnBeforeUpdateHandler to create custom client-server transport system\r\n\t *\t @param: sid - id of item before update\r\n\t *\t @param: tid - id of item after up0ate\r\n\t *\t @param: action - action name\r\n\t *\t @type: public\r\n\t *\t @topic: 0\r\n\t */\r\n\tafterUpdateCallback: function (sid, tid, action, btag) {\r\n\t\tif(!this.$scheduler){\r\n\t\t\t// destructor has been called before the callback\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar marker = sid;\r\n\t\tvar correct = (action !== \"error\" && action !== \"invalid\");\r\n\t\tif (!correct) {\r\n\t\t\tthis.set_invalid(sid, action);\r\n\t\t}\r\n\t\tif ((this._uActions) && (this._uActions[action]) && (!this._uActions[action](btag))) {\r\n\t\t\treturn (delete this._in_progress[marker]);\r\n\t\t}\r\n\r\n\t\tif (this._in_progress[marker] !== \"wait\") {\r\n\t\t\tthis.setUpdated(sid, false);\r\n\t\t}\r\n\r\n\t\tvar originalSid = sid;\r\n\r\n\t\tswitch (action) {\r\n\t\t\tcase \"inserted\":\r\n\t\t\tcase \"insert\":\r\n\t\t\t\tif (tid != sid) {\r\n\t\t\t\t\tthis.setUpdated(sid, false);\r\n\t\t\t\t\tthis.$scheduler[this._methods[2]](sid, tid);\r\n\t\t\t\t\tsid = tid;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"delete\":\r\n\t\t\tcase \"deleted\":\r\n\t\t\t\tthis.$scheduler.setUserData(sid, this.action_param, \"true_deleted\");\r\n\t\t\t\tthis.$scheduler[this._methods[3]](sid, tid);\r\n\t\t\t\tdelete this._in_progress[marker];\r\n\t\t\t\treturn this.callEvent(\"onAfterUpdate\", [sid, action, tid, btag]);\r\n\t\t}\r\n\r\n\t\tif (this._in_progress[marker] !== \"wait\") {\r\n\t\t\tif (correct) {\r\n\t\t\t\tthis.$scheduler.setUserData(sid, this.action_param, \"\");\r\n\t\t\t}\r\n\t\t\tdelete this._in_progress[marker];\r\n\t\t} else {\r\n\t\t\tdelete this._in_progress[marker];\r\n\t\t\tthis.setUpdated(tid, true, this.$scheduler.getUserData(sid, this.action_param));\r\n\t\t}\r\n\r\n\t\tthis.callEvent(\"onAfterUpdate\", [originalSid, action, tid, btag]);\r\n\t},\r\n\r\n\t_errorResponse: function (xml, id){\r\n\t\tif(this.$scheduler && this.$scheduler.callEvent){\r\n\t\t\tthis.$scheduler.callEvent(\"onSaveError\", [id, xml.xmlDoc]);\r\n\t\t}\r\n\t\treturn this.cleanUpdate(id);\r\n\t},\r\n\r\n\t_setDefaultTransactionMode: function () {\r\n\t\tif (this.serverProcessor) {\r\n\t\t\tthis.setTransactionMode(\"POST\", true);\r\n\t\t\tthis.serverProcessor += (this.serverProcessor.indexOf(\"?\") !== -1 ? \"&\" : \"?\") + \"editing=true\";\r\n\t\t\tthis._serverProcessor = this.serverProcessor;\r\n\t\t}\r\n\t},\r\n\t\r\n\t/**\r\n\t *\t@desc: response from server\r\n\t *\t@param: xml - XMLLoader object with response XML\r\n\t *\t@type: private\r\n\t */\r\n\tafterUpdate: function (that, xml, id) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\r\n\t\tif (xml.xmlDoc.status !== 200){\r\n\t\t\tthis._errorResponse(xml, id);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// try to use json first\r\n\t\tvar tag;\r\n\t\ttry {\r\n\t\t\ttag = JSON.parse(xml.xmlDoc.responseText);\r\n\t\t} catch (e) {\r\n\t\t\t// empty response also can be processed by json handler\r\n\t\t\tif (!xml.xmlDoc.responseText.length) {\r\n\t\t\t\ttag = {};\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (tag) {\r\n\t\t\tvar action = tag.action || this.getState(id) || \"updated\";\r\n\t\t\tvar sid = tag.sid || id[0];\r\n\t\t\tvar tid = tag.tid || id[0];\r\n\t\t\tthat.afterUpdateCallback(sid, tid, action, tag);\r\n\t\t\tthat.finalizeUpdate();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// xml response\r\n\t\tvar top = ajax.xmltop(\"data\", xml.xmlDoc); // fix incorrect content type in IE\r\n\t\tif (!top) {\r\n\t\t\treturn this._errorResponse(xml, id);\r\n\t\t}\r\n\t\tvar atag = ajax.xpath(\"//data/action\", top);\r\n\t\tif (!atag.length) {\r\n\t\t\treturn this._errorResponse(xml, id);\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < atag.length; i++) {\r\n\t\t\tvar btag = atag[i];\r\n\t\t\tvar action = btag.getAttribute(\"type\");\r\n\t\t\tvar sid = btag.getAttribute(\"sid\");\r\n\t\t\tvar tid = btag.getAttribute(\"tid\");\r\n\r\n\t\t\tthat.afterUpdateCallback(sid, tid, action, btag);\r\n\t\t}\r\n\t\tthat.finalizeUpdate();\r\n\t},\r\n\tcleanUpdate: function (id) {\r\n\t\tif (id)\r\n\t\t\tfor (var i = 0; i < id.length; i++)\r\n\t\t\t\tdelete this._in_progress[id[i]];\r\n\t},\r\n\tfinalizeUpdate: function () {\r\n\t\tif (this._waitMode) this._waitMode--;\r\n\r\n\t\tthis.callEvent(\"onAfterUpdateFinish\", []);\r\n\t\tif (!this.updatedRows.length)\r\n\t\t\tthis.callEvent(\"onFullSync\", []);\r\n\t},\r\n\r\n\t/**\r\n\t *\t@desc: initializes data-processor\r\n\t *\t@param: scheduler - dhtmlxScheduler object to attach this data-processor to\r\n\t *\t@type: public\r\n\t */\r\n\tinit: function (scheduler) {\r\n\t\tif (this._initialized) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.$scheduler = scheduler;\r\n\t\tif (this.$scheduler._dp_init) {\r\n\t\t\tthis.$scheduler._dp_init(this);\r\n\t\t}\r\n\r\n\t\tthis._setDefaultTransactionMode();\r\n\r\n\t\tthis._methods=this._methods||[\"_set_event_text_style\",\"\",\"_dp_change_event_id\",\"_dp_hook_delete\"];\r\n\t\textendScheduler(this.$scheduler, this);\r\n\t\tvar dataProcessorEvents = new DataProcessorEvents(this.$scheduler, this);\r\n\t\tdataProcessorEvents.attach();\r\n\t\tthis.attachEvent(\"onDestroy\", function() {\r\n\t\t\tdelete this._getRowData;\r\n\r\n\t\t\tdelete this.$scheduler._dp;\r\n\t\t\tdelete this.$scheduler._dataprocessor;\r\n\t\t\tdelete this.$scheduler._set_event_text_style;\r\n\t\t\tdelete this.$scheduler._dp_change_event_id;\r\n\t\t\tdelete this.$scheduler._dp_hook_delete;\r\n\t\t\tdelete this.$scheduler;\r\n\t\t\tdataProcessorEvents.detach();\r\n\t\t});\r\n\t\tthis.$scheduler.callEvent(\"onDataProcessorReady\", [this]);\r\n\t\tthis._initialized = true;\r\n\r\n\t\tscheduler._dataprocessor=this;\r\n\t},\r\n\r\n\tsetOnAfterUpdate: function (ev) {\r\n\t\tthis.attachEvent(\"onAfterUpdate\", ev);\r\n\t},\r\n\tsetOnBeforeUpdateHandler: function (func) {\r\n\t\tthis.attachEvent(\"onBeforeDataSending\", func);\r\n\t},\r\n\r\n\t/* starts autoupdate mode\r\n\t\t@param interval time interval for sending update requests\r\n\t*/\r\n\tsetAutoUpdate: function (interval, user) {\r\n\t\tinterval = interval || 2000;\r\n\r\n\t\tthis._user = user || (new Date()).valueOf();\r\n\t\tthis._need_update = false;\r\n\t\t//this._loader = null;\r\n\t\tthis._update_busy = false;\r\n\r\n\t\tthis.attachEvent(\"onAfterUpdate\", function (sid, action, tid, xml_node) {\r\n\t\t\tthis.afterAutoUpdate(sid, action, tid, xml_node);\r\n\t\t});\r\n\t\tthis.attachEvent(\"onFullSync\", function () {\r\n\t\t\tthis.fullSync();\r\n\t\t});\r\n\r\n\t\tvar self = this;\r\n\t\tlet intervalId = global.setInterval(function () {\r\n\t\t\tself.loadUpdate();\r\n\t\t}, interval);\r\n\t\tthis.attachEvent(\"onDestroy\", function(){\r\n\t\t\tclearInterval(intervalId);\r\n\t\t});\r\n\t},\r\n\r\n\t/* process updating request answer\r\n\t\tif status == collision version is deprecated\r\n\t\tset flag for autoupdating immediately\r\n\t*/\r\n\tafterAutoUpdate: function (sid, action, tid, xml_node) {\r\n\t\tif (action == 'collision') {\r\n\t\t\tthis._need_update = true;\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t},\r\n\r\n\t/* callback function for onFillSync event\r\n\t\tcall update function if it's need\r\n\t*/\r\n\tfullSync: function () {\r\n\t\tif (this._need_update) {\r\n\t\t\tthis._need_update = false;\r\n\t\t\tthis.loadUpdate();\r\n\t\t}\r\n\t\treturn true;\r\n\t},\r\n\r\n\t/* sends query to the server and call callback function\r\n\t*/\r\n\tgetUpdates: function (url, callback) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tif (this._update_busy)\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\tthis._update_busy = true;\r\n\r\n\t\tajax.get(url, callback);\r\n\t},\r\n\r\n\t/* returns xml node value\r\n\t\t@param node\r\n\t\t\txml node\r\n\t*/\r\n\t_getXmlNodeValue: function(node) {\r\n\t\tif (node.firstChild) {\r\n\t\t\treturn node.firstChild.nodeValue;\r\n\t\t}\r\n\t\treturn \"\";\r\n\t},\r\n\r\n\t/* loads updates and processes them\r\n\t*/\r\n\tloadUpdate: function () {\r\n\t\tvar self = this;\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tvar version = this.$scheduler.getUserData(0, \"version\");\r\n\t\tvar url = this.serverProcessor + ajax.urlSeparator(this.serverProcessor) + [\"dhx_user=\" + this._user, \"dhx_version=\" + version].join(\"&\");\r\n\t\turl = url.replace(\"editing=true&\", \"\");\r\n\t\tthis.getUpdates(url, function (xml) {\r\n\t\t\tvar vers = ajax.xpath(\"//userdata\", xml);\r\n\t\t\tself.$scheduler.setUserData(0, \"version\", self._getXmlNodeValue(vers[0]));\r\n\r\n\t\t\tvar updates = ajax.xpath(\"//update\", xml);\r\n\t\t\tif (updates.length) {\r\n\t\t\t\tself._silent_mode = true;\r\n\r\n\t\t\t\tfor (var i = 0; i < updates.length; i++) {\r\n\t\t\t\t\tvar status = updates[i].getAttribute(\"status\");\r\n\t\t\t\t\tvar id = updates[i].getAttribute(\"id\");\r\n\t\t\t\t\tvar parent = updates[i].getAttribute(\"parent\");\r\n\t\t\t\t\tswitch (status) {\r\n\t\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"insertCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"updated\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"updateCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"deleteCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tself._silent_mode = false;\r\n\t\t\t}\r\n\t\t\tself._update_busy = false;\r\n\t\t\tself = null;\r\n\t\t});\r\n\t},\r\n\r\n\tdestructor: function() {\r\n\t\tthis.callEvent(\"onDestroy\", []);\r\n\t\tthis.detachAllEvents();\r\n\r\n\t\tthis.updatedRows = [];\r\n\t\tthis._in_progress = {};\r\n\t\tthis._invalid = {};\r\n\t\tthis._headers = null;\r\n\t\tthis._payload = null;\r\n\t\tdelete this._initialized;\r\n\t},\r\n\r\n\turl: function(url) {\r\n\t\tthis.serverProcessor = this._serverProcessor = url;\r\n\t},\r\n\r\n\t_serializeAsJSON: function(data) {\r\n\t\tif (typeof data === \"string\") {\r\n\t\t\treturn data;\r\n\t\t}\r\n\r\n\t\tvar copy = this.$scheduler.utils.copy(data);\r\n\t\tif (this._tMode === \"REST-JSON\") {\r\n\t\t\tdelete copy.id;\r\n\t\t\tdelete copy[this.action_param];\r\n\t\t}\r\n\r\n\t\treturn JSON.stringify(copy);\r\n\t},\r\n\r\n\t// GET/POST/JSON modes of the dataProcessor didn't send the whole data items in 'delete' requests\r\n\t// clear extra info from the data in order not to change the request format\r\n\t_cleanupArgumentsBeforeSend: function(dataToSend) {\r\n\t\tvar processedData;\r\n\t\tif(dataToSend[this.action_param] === undefined){// hash of updated items, and not an individual item\r\n\t\t\tprocessedData = {};\r\n\t\t\tfor(var i in dataToSend) {\r\n\t\t\t\tprocessedData[i] = this._cleanupArgumentsBeforeSend(dataToSend[i]);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tprocessedData = this._cleanupItemBeforeSend(dataToSend);\r\n\t\t}\r\n\t\treturn processedData;\r\n\t},\r\n\t_cleanupItemBeforeSend: function(updatedItem) {\r\n\t\tvar output = null;\r\n\t\tif(updatedItem){\r\n\t\t\tif(updatedItem[this.action_param] === \"deleted\"){\r\n\t\t\t\toutput = {};\r\n\t\t\t\toutput.id = updatedItem.id;\r\n\t\t\t\toutput[this.action_param] = updatedItem[this.action_param];\r\n\t\t\t}else{\r\n\t\t\t\toutput = updatedItem;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn output;\r\n\t},\r\n\r\n\t_forEachUpdatedRow: function(code) {\r\n\t\tvar updatedRows = this.updatedRows.slice();\r\n\t\tfor (var i = 0; i < updatedRows.length; i++) {\r\n\t\t\tvar rowId = updatedRows[i];\r\n\t\t\tif (this.$scheduler.getUserData(rowId, this.action_param)) {\r\n\t\t\t\tcode.call(this, rowId);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\t_prepareItemForJson(item){\r\n\t\tconst processedItem = {};\r\n\t\tconst scheduler = this.$scheduler;\r\n\t\tconst copy = scheduler.utils.copy(item);\r\n\t\tfor (let i in copy) {\r\n\t\t\tlet prop = copy[i];\r\n\t\t\tif (i.indexOf(\"_\") === 0) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} else if (prop){\r\n\t\t\t\tif(prop.getUTCFullYear){\r\n\t\t\t\t\tprocessedItem[i] = scheduler._helpers.formatDate(prop);\r\n\t\t\t\t} else if(typeof prop == \"object\") {\r\n\t\t\t\t\tprocessedItem[i] = this._prepareItemForJson(prop);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprocessedItem[i] = prop; \r\n\t\t\t\t}\r\n\t\t\t} else if (prop !== undefined){\r\n\t\t\t\tprocessedItem[i] = prop; \r\n\t\t\t}\r\n\t\t}\r\n\t\tprocessedItem[this.action_param] = scheduler.getUserData(item.id, this.action_param);\r\n\t\treturn processedItem;\r\n\t},\r\n\t_prepareItemForForm(item){\r\n\t\tconst processedItem = {};\r\n\t\tconst scheduler = this.$scheduler;\r\n\t\tconst copy = scheduler.utils.copy(item);\r\n\t\tfor (var i in copy) {\r\n\t\t\tlet prop = copy[i];\r\n\t\t\tif (i.indexOf(\"_\") === 0) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} else if (prop) {\r\n\t\t\t\tif(prop.getUTCFullYear){\r\n\t\t\t\t\tprocessedItem[i] = scheduler._helpers.formatDate(prop);\r\n\t\t\t\t} else if(typeof prop == \"object\") {\r\n\t\t\t\t\tprocessedItem[i] = this._prepareItemForForm(prop);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprocessedItem[i] = prop;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tprocessedItem[i] = \"\"; // for all falthy values\r\n\t\t\t}\r\n\t\t}\r\n\t\tprocessedItem[this.action_param] = scheduler.getUserData(item.id, this.action_param);\r\n\t\treturn processedItem;\r\n\t},\r\n\t_prepareDataItem: function(item) {\r\n\t\tif(this._serializeAsJson){\r\n\t\t\treturn this._prepareItemForJson(item);\r\n\t\t}else {\r\n\t\t\treturn this._prepareItemForForm(item);\r\n\t\t}\r\n\t},\r\n\t_getRowData: function(id) {\r\n\t\tvar dataItem = this.$scheduler.getEvent(id);\r\n\t\tif (!dataItem) {\r\n\t\t\tdataItem = { id: id };\r\n\t\t}\r\n\t\treturn this._prepareDataItem(dataItem);\r\n\t}\r\n};\r\n\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler.createDataProcessor = function(config) {\r\n\tvar router;\r\n\tvar tMode;\r\n\tif (config instanceof Function) {\r\n\t\trouter = config;\r\n\t} else if (config.hasOwnProperty(\"router\")) {\r\n\t\trouter = config.router;\r\n\t} else if(config.hasOwnProperty(\"event\")){\r\n\t\trouter = config;\r\n\t}\r\n\r\n\tif (router) {\r\n\t\ttMode = \"CUSTOM\";\r\n\t} else {\r\n\t\ttMode = config.mode || \"REST-JSON\";\r\n\t}\r\n\r\n\tvar dp = new DataProcessor(config.url);\r\n\tdp.init(scheduler);\r\n\tdp.setTransactionMode({\r\n\t\tmode: tMode,\r\n\t\trouter: router\r\n\t}, config.batchUpdate); // FIXME: config.batchUpdate where it is explained?\r\n\treturn dp;\r\n};\r\n\r\nscheduler.DataProcessor = DataProcessor;\r\n\r\n}\r\n\r\n//var dataProcessor = global.dataProcessor = DataProcessor; // for old","import utils from \"./utils/utils\";\r\nimport domHelpers from \"./utils/dom_helpers\";\r\n\r\n\r\nexport default function(scheduler) {\r\n\r\n\tvar boxAttribute = \"data-dhxbox\";\r\n\r\n\tvar _dhx_msg_cfg = null;\r\n\r\n\tfunction callback(config, result) {\r\n\t\tvar usercall = config.callback;\r\n\t\tmodalBox.hide(config.box);\r\n\r\n\t\t_dhx_msg_cfg = config.box = null;\r\n\tif (usercall)\r\n\t\t\tusercall(result);\r\n\t}\r\n\r\n\tfunction modal_key(event) {\r\n\t\tif (_dhx_msg_cfg) {\r\n\r\n\t\t\tvar code = event.which || event.keyCode;\r\n\t\t\tvar preventDefault = false;\r\n\r\n\t\t\tif (messageBox.keyboard) {\r\n\t\t\t\tif (code == 13 || code == 32) {\r\n\t\t\t\t\t// default behavior is to confirm/submit popup on space/enter\r\n\t\t\t\t\t// if browser focus is set on button element - do button click instead of default behavior\r\n\t\t\t\t\tvar target = event.target || event.srcElement;\r\n\t\t\t\t\tif (domHelpers.getClassName(target).indexOf(\"scheduler_popup_button\") > -1 && target.click) {\r\n\t\t\t\t\t\ttarget.click();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcallback(_dhx_msg_cfg, true);\r\n\t\t\t\t\t\tpreventDefault = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (code == 27) {\r\n\t\t\t\t\tcallback(_dhx_msg_cfg, false);\r\n\t\t\t\t\tpreventDefault = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (preventDefault) {\r\n\t\t\t\tif (event.preventDefault){\r\n\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t}\r\n\t\t\t\treturn !(event.cancelBubble = true);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.event(document, \"keydown\", modal_key, true);\r\n\r\n\tfunction modality(mode) {\r\n\t\tif (!modality.cover) {\r\n\t\t\tmodality.cover = document.createElement(\"div\");\r\n\t\t\t//necessary for IE only\r\n\t\t\tscheduler.event(modality.cover, \"keydown\", modal_key);\r\n\t\t\tmodality.cover.className = \"dhx_modal_cover\";\r\n\t\t\tdocument.body.appendChild(modality.cover);\r\n\t\t}\r\n\r\n\t\tmodality.cover.style.display = mode ? \"inline-block\" : \"none\";\r\n\t}\r\n\r\n\tfunction button(text, classValue, result) {\r\n\t\tvar buttonAriaAttrs = scheduler._waiAria.messageButtonAttrString(text);\r\n\t\tvar name = (classValue || \"\").toLowerCase().replace(/ /g, \"_\");\r\n\t\tvar buttonCss = `scheduler_${name}_button dhtmlx_${name}_button`; \r\n\t\treturn `
${text}
`;\r\n\t}\r\n\r\n\tfunction info(text) {\r\n\t\tif (!messageBox.area) {\r\n\t\t\tmessageBox.area = document.createElement(\"div\");\r\n\t\t\tmessageBox.area.className = \"scheduler_message_area dhtmlx_message_area\";\r\n\t\t\tmessageBox.area.style[messageBox.position] = \"5px\";\r\n\t\t\tdocument.body.appendChild(messageBox.area);\r\n\t\t}\r\n\r\n\t\tmessageBox.hide(text.id);\r\n\t\tvar message = document.createElement(\"div\");\r\n\t\tmessage.innerHTML = \"
\" + text.text + \"
\";\r\n\t\tmessage.className = \"scheduler-info dhtmlx-info scheduler-\" + text.type + \" dhtmlx-\" + text.type;\r\n\t\tscheduler.event(message, \"click\",function (e) {\r\n if(text.callback) {\r\n text.callback.call(this, e);\r\n }\r\n\t\t\tmessageBox.hide(text.id);\r\n\t\t\ttext = null;\r\n\t\t});\r\n\r\n\t\tscheduler._waiAria.messageInfoAttr(message);\r\n\r\n\t\tif (messageBox.position == \"bottom\" && messageBox.area.firstChild)\r\n\t\t\tmessageBox.area.insertBefore(message, messageBox.area.firstChild);\r\n\t\telse\r\n\t\t\tmessageBox.area.appendChild(message);\r\n\r\n\t\tif (text.expire > 0)\r\n\t\t\tmessageBox.timers[text.id] = window.setTimeout(function () {\r\n\t\t\t\t// GS-1213: We need that when Scheduler is destroyed\r\n\t\t\t\tif (messageBox) messageBox.hide(text.id);\r\n\t\t\t}, text.expire);\r\n\r\n\t\tmessageBox.pull[text.id] = message;\r\n\t\tmessage = null;\r\n\r\n\t\treturn text.id;\r\n\t}\r\n\r\n\tfunction getFirstDefined() {\r\n\t\tvar values = [].slice.apply(arguments, [0]);\r\n\r\n\t\tfor (var i = 0; i < values.length; i++) {\r\n\t\t\tif (values[i]) {\r\n\t\t\t\treturn values[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tfunction _boxStructure(config, ok, cancel) {\r\n\t\tvar box = document.createElement(\"div\");\r\n\r\n\t\tvar contentId = utils.uid();\r\n\t\tscheduler._waiAria.messageModalAttr(box, contentId);\r\n\r\n\r\n\t\tbox.className = \" scheduler_modal_box dhtmlx_modal_box scheduler-\" + config.type + \" dhtmlx-\" + config.type;\r\n\t\tbox.setAttribute(boxAttribute, 1);\r\n\r\n\t\tvar inner = '';\r\n\r\n\t\tif (config.width)\r\n\t\t\tbox.style.width = config.width;\r\n\t\tif (config.height)\r\n\t\t\tbox.style.height = config.height;\r\n\t\tif (config.title)\r\n\t\t\tinner += '
' + config.title + '
';\r\n\t\tinner += '
' + (config.content ? '' : config.text) + '
';\r\n\t\tif (ok)\r\n\t\t\tinner += button(getFirstDefined(config.ok, scheduler.locale.labels.message_ok, \"OK\"), \"ok\", true);\r\n\t\tif (cancel)\r\n\t\t\tinner += button(getFirstDefined(config.cancel, scheduler.locale.labels.message_cancel, \"Cancel\"), \"cancel\", false);\r\n\r\n\t\tif (config.buttons) {\r\n\t\t\tfor (var i = 0; i < config.buttons.length; i++) {\r\n\t\t\t\tvar btn = config.buttons[i];\r\n\t\t\t\tif (typeof btn == \"object\") {\r\n\t\t\t\t\t// Support { label:\"Save\", css:\"main_button\", value:\"save\" }\r\n\t\t\t\t\tvar label = btn.label;\r\n\t\t\t\t\tvar css = btn.css || (\"scheduler_\" + btn.label.toLowerCase() + \"_button dhtmlx_\" + btn.label.toLowerCase() + \"_button\");\r\n\t\t\t\t\tvar value = btn.value || i;\r\n\t\t\t\t\tinner += button(label, css, value);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tinner += button(btn, btn, i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tinner += '
';\r\n\t\tbox.innerHTML = inner;\r\n\r\n\t\tif (config.content) {\r\n\t\t\tvar node = config.content;\r\n\t\t\tif (typeof node == \"string\")\r\n\t\t\t\tnode = document.getElementById(node);\r\n\t\t\tif (node.style.display == 'none')\r\n\t\t\t\tnode.style.display = \"\";\r\n\t\t\tbox.childNodes[config.title ? 1 : 0].appendChild(node);\r\n\t\t}\r\n\r\n\t\tscheduler.event(box, \"click\", function (event) {\r\n\t\t\tvar source = event.target || event.srcElement;\r\n\t\t\tif (!source.className) source = source.parentNode;\r\n\t\t\tif (domHelpers.closest(source, \".scheduler_popup_button\")) {\r\n\t\t\t\tvar result = source.getAttribute(\"data-result\");\r\n\t\t\t\tresult = (result == \"true\") || (result == \"false\" ? false : result);\r\n\t\t\t\tcallback(config, result);\r\n\t\t\t}\r\n\t\t});\r\n\t\tconfig.box = box;\r\n\t\tif (ok || cancel)\r\n\t\t\t_dhx_msg_cfg = config;\r\n\r\n\t\treturn box;\r\n\t}\r\n\r\n\tfunction _createBox(config, ok, cancel) {\r\n\t\tvar box = config.tagName ? config : _boxStructure(config, ok, cancel);\r\n\r\n\t\tif (!config.hidden)\r\n\t\t\tmodality(true);\r\n\t\tdocument.body.appendChild(box);\r\n\t\tvar x = Math.abs(Math.floor(((window.innerWidth || document.documentElement.offsetWidth) - box.offsetWidth) / 2));\r\n\t\tvar y = Math.abs(Math.floor(((window.innerHeight || document.documentElement.offsetHeight) - box.offsetHeight) / 2));\r\n\t\tif (config.position == \"top\")\r\n\t\t\tbox.style.top = \"-3px\";\r\n\t\telse\r\n\t\t\tbox.style.top = y + 'px';\r\n\t\tbox.style.left = x + 'px';\r\n\t\t//necessary for IE only\r\n\t\tscheduler.event(box, \"keydown\", modal_key);\r\n\r\n\t\tmodalBox.focus(box);\r\n\r\n\t\tif (config.hidden)\r\n\t\t\tmodalBox.hide(box);\r\n\r\n\t\tscheduler.callEvent(\"onMessagePopup\", [box]);\r\n\t\treturn box;\r\n\t}\r\n\r\n\tfunction alertPopup(config) {\r\n\t\treturn _createBox(config, true, false);\r\n\t}\r\n\r\n\tfunction confirmPopup(config) {\r\n\t\treturn _createBox(config, true, true);\r\n\t}\r\n\r\n\tfunction boxPopup(config) {\r\n\t\treturn _createBox(config);\r\n\t}\r\n\r\n\tfunction box_params(text, type, callback) {\r\n\t\tif (typeof text != \"object\") {\r\n\t\t\tif (typeof type == \"function\") {\r\n\t\t\t\tcallback = type;\r\n\t\t\t\ttype = \"\";\r\n\t\t\t}\r\n\t\t\ttext = {text: text, type: type, callback: callback};\r\n\t\t}\r\n\t\treturn text;\r\n\t}\r\n\r\n\tfunction params(text, type, expire, id, callback) {\r\n\t\tif (typeof text != \"object\")\r\n\t\t\ttext = {text: text, type: type, expire: expire, id: id, callback: callback};\r\n\t\ttext.id = text.id || utils.uid();\r\n\t\ttext.expire = text.expire || messageBox.expire;\r\n\t\treturn text;\r\n\t}\r\n\r\n\tvar alertBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"confirm\";\r\n\t\treturn alertPopup(text);\r\n\t};\r\n\tvar confirmBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"alert\";\r\n\t\treturn confirmPopup(text);\r\n\t};\r\n\tvar modalBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"alert\";\r\n\t\treturn boxPopup(text);\r\n\t};\r\n\tmodalBox.hide = function (node) {\r\n\t\twhile (node && node.getAttribute && !node.getAttribute(boxAttribute))\r\n\t\t\tnode = node.parentNode;\r\n\t\tif (node) {\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t\tmodality(false);\r\n\r\n\t\t\tscheduler.callEvent(\"onAfterMessagePopup\", [node]);\r\n\t\t}\r\n\t};\r\n\r\n\tmodalBox.focus = function (node) {\r\n\t\tsetTimeout(function () {\r\n\t\t\tvar focusable = domHelpers.getFocusableNodes(node);\r\n\t\t\tif (focusable.length) {\r\n\t\t\t\tif (focusable[0].focus) focusable[0].focus();\r\n\t\t\t}\r\n\t\t}, 1);\r\n\t};\r\n\r\n\tvar messageBox = function (text, type, expire, id) {\r\n\t\ttext = params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"info\";\r\n\r\n\t\tvar subtype = text.type.split(\"-\")[0];\r\n\t\tswitch (subtype) {\r\n\t\t\tcase \"alert\":\r\n\t\t\t\treturn alertPopup(text);\r\n\t\t\tcase \"confirm\":\r\n\t\t\t\treturn confirmPopup(text);\r\n\t\t\tcase \"modalbox\":\r\n\t\t\t\treturn boxPopup(text);\r\n\t\t\tdefault:\r\n\t\t\t\treturn info(text);\r\n\t\t}\r\n\t};\r\n\r\n\tmessageBox.seed = (new Date()).valueOf();\r\n\tmessageBox.uid = utils.uid;\r\n\tmessageBox.expire = 4000;\r\n\tmessageBox.keyboard = true;\r\n\tmessageBox.position = \"top\";\r\n\tmessageBox.pull = {};\r\n\tmessageBox.timers = {};\r\n\r\n\tmessageBox.hideAll = function () {\r\n\t\tfor (var key in messageBox.pull)\r\n\t\t\tmessageBox.hide(key);\r\n\t};\r\n\tmessageBox.hide = function (id) {\r\n\t\tvar obj = messageBox.pull[id];\r\n\t\tif (obj && obj.parentNode) {\r\n\t\t\twindow.setTimeout(function () {\r\n\t\t\t\tobj.parentNode.removeChild(obj);\r\n\t\t\t\tobj = null;\r\n\t\t\t}, 2000);\r\n\t\t\tobj.className += \" hidden\";\r\n\r\n\t\t\tif (messageBox.timers[id])\r\n\t\t\t\twindow.clearTimeout(messageBox.timers[id]);\r\n\t\t\tdelete messageBox.pull[id];\r\n\t\t}\r\n\t};\r\n\r\n\tvar popups = [];\r\n\tscheduler.attachEvent(\"onMessagePopup\", function(box){\r\n\t\tpopups.push(box);\r\n\t});\r\n\tscheduler.attachEvent(\"onAfterMessagePopup\", function(box){\r\n\t\tfor(var i = 0; i < popups.length; i++){\r\n\t\t\tif(popups[i] === box){\r\n\t\t\t\tpopups.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tif(modality.cover && modality.cover.parentNode){\r\n\t\t\tmodality.cover.parentNode.removeChild(modality.cover);\r\n\t\t}\r\n\r\n\t\tfor(var i = 0; i < popups.length; i++){\r\n\t\t\tif(popups[i].parentNode){\r\n\t\t\t\tpopups[i].parentNode.removeChild(popups[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tpopups = null;\r\n\r\n\t\tif(messageBox.area && messageBox.area.parentNode){\r\n\t\t\tmessageBox.area.parentNode.removeChild(messageBox.area);\r\n\t\t}\r\n\t\tmessageBox = null;\r\n\t});\r\n\r\n\treturn {\r\n\t\talert: alertBox,\r\n\t\tconfirm: confirmBox,\r\n\t\tmessage: messageBox,\r\n\t\tmodalbox: modalBox\r\n\t};\r\n}","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"كانون الثاني\", \"شباط\", \"آذار\", \"نيسان\", \"أيار\", \"حزيران\", \"تموز\", \"آب\", \"أيلول\", \"تشرين الأول\", \"تشرين الثاني\", \"كانون الأول\"],\r\n\t\tmonth_short: [\"يناير\", \"فبراير\", \"مارس\", \"أبريل\", \"مايو\", \"يونيو\", \"يوليو\", \"أغسطس\", \"سبتمبر\", \"أكتوبر\", \"نوفمبر\", \"ديسمبر\"],\r\n\t\tday_full: [\"الأحد\", \"الأثنين\", \"ألثلاثاء\", \"الأربعاء\", \"ألحميس\", \"ألجمعة\", \"السبت\"],\r\n\t\tday_short: [\"احد\", \"اثنين\", \"ثلاثاء\", \"اربعاء\", \"خميس\", \"جمعة\", \"سبت\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"اليوم\",\r\n\t\tday_tab: \"يوم\",\r\n\t\tweek_tab: \"أسبوع\",\r\n\t\tmonth_tab: \"شهر\",\r\n\t\tnew_event: \"حدث جديد\",\r\n\t\ticon_save: \"اخزن\",\r\n\t\ticon_cancel: \"الغاء\",\r\n\t\ticon_details: \"تفاصيل\",\r\n\t\ticon_edit: \"تحرير\",\r\n\t\ticon_delete: \"حذف\",\r\n\t\tconfirm_closing: \"التغييرات سوف تضيع, هل انت متأكد؟\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"الحدث سيتم حذفها نهائيا ، هل أنت متأكد؟\",\r\n\t\tsection_description: \"الوصف\",\r\n\t\tsection_time: \"الفترة الزمنية\",\r\n\t\tfull_day: \"طوال اليوم\",\r\n\r\n\t\tconfirm_recurring: \"هل تريد تحرير مجموعة كاملة من الأحداث المتكررة؟\",\r\n\t\tsection_recurring: \"تكرار الحدث\",\r\n\t\tbutton_recurring: \"تعطيل\",\r\n\t\tbutton_recurring_open: \"تمكين\",\r\n\t\tbutton_edit_series: \"تحرير سلسلة\",\r\n\t\tbutton_edit_occurrence: \"تعديل نسخة\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"جدول\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create: \"Drag to create\",\r\n\t\tdrag_to_move: \"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour: \"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"يومي\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"أسبوعي\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"شهري\",\r\n\t\trepeat_radio_year: \"سنوي\",\r\n\t\trepeat_radio_day_type: \"كل\",\r\n\t\trepeat_text_day_count: \"يوم\",\r\n\t\trepeat_radio_day_type2: \"كل يوم عمل\",\r\n\t\trepeat_week: \" تكرار كل\",\r\n\t\trepeat_text_week_count: \"أسبوع في الأيام التالية:\",\r\n\t\trepeat_radio_month_type: \"تكرار\",\r\n\t\trepeat_radio_month_start: \"في\",\r\n\t\trepeat_text_month_day: \"يوم كل\",\r\n\t\trepeat_text_month_count: \"شهر\",\r\n\t\trepeat_text_month_count2_before: \"كل\",\r\n\t\trepeat_text_month_count2_after: \"شهر\",\r\n\t\trepeat_year_label: \"في\",\r\n\t\tselect_year_day2: \"من\",\r\n\t\trepeat_text_year_day: \"يوم\",\r\n\t\tselect_year_month: \"شهر\",\r\n\t\trepeat_radio_end: \"بدون تاريخ انتهاء\",\r\n\t\trepeat_text_occurences_count: \"تكرارات\",\r\n\t\trepeat_radio_end2: \"بعد\",\r\n\t\trepeat_radio_end3: \"ينتهي في\",\r\n\r\n\t\trepeat_never: \"أبداً\",\r\n\t\trepeat_daily: \"كل يوم\",\r\n\t\trepeat_workdays: \"كل يوم عمل\",\r\n\t\trepeat_weekly: \"كل أسبوع\",\r\n\t\trepeat_monthly: \"كل شهر\",\r\n\t\trepeat_yearly: \"كل سنة\",\r\n\t\trepeat_custom: \"تخصيص\",\r\n\t\trepeat_freq_day: \"يوم\",\r\n\t\trepeat_freq_week: \"أسبوع\",\r\n\t\trepeat_freq_month: \"شهر\",\r\n\t\trepeat_freq_year: \"سنة\",\r\n\t\trepeat_on_date: \"في التاريخ\",\r\n\t\trepeat_ends: \"ينتهي\",\r\n\r\n\t\tmonth_for_recurring: [\"يناير\", \"فبراير\", \"مارس\", \"أبريل\", \"مايو\", \"يونيو\", \"يوليو\", \"أغسطس\", \"سبتمبر\", \"أكتوبر\", \"نوفمبر\", \"ديسمبر\"],\r\n\t\tday_for_recurring: [\"الأحد\", \"الإثنين\", \"الثلاثاء\", \"الأربعاء\", \"الخميس\", \"الجمعة\", \"السبت\"]\r\n\t}\r\n};\r\n\r\n\r\n","/*\r\n Translation by Sofya Morozova\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Студзень\", \"Люты\", \"Сакавік\", \"Красавік\", \"Maй\", \"Чэрвень\", \"Ліпень\", \"Жнівень\", \"Верасень\", \"Кастрычнік\", \"Лістапад\", \"Снежань\"],\r\n\t\tmonth_short: [\"Студз\", \"Лют\", \"Сак\", \"Крас\", \"Maй\", \"Чэр\", \"Ліп\", \"Жнів\", \"Вер\", \"Каст\", \"Ліст\", \"Снеж\"],\r\n\t\tday_full: [ \"Нядзеля\", \"Панядзелак\", \"Аўторак\", \"Серада\", \"Чацвер\", \"Пятніца\", \"Субота\"],\r\n\t\tday_short: [\"Нд\", \"Пн\", \"Аўт\", \"Ср\", \"Чцв\", \"Пт\", \"Сб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сёння\",\r\n\t\tday_tab: \"Дзень\",\r\n\t\tweek_tab: \"Тыдзень\",\r\n\t\tmonth_tab: \"Месяц\",\r\n\t\tnew_event: \"Новая падзея\",\r\n\t\ticon_save: \"Захаваць\",\r\n\t\ticon_cancel: \"Адмяніць\",\r\n\t\ticon_details: \"Дэталі\",\r\n\t\ticon_edit: \"Змяніць\",\r\n\t\ticon_delete: \"Выдаліць\",\r\n\t\tconfirm_closing: \"\", //Унесеныя змены будуць страчаны, працягнуць?\r\n\t\tconfirm_deleting: \"Падзея будзе выдалена незваротна, працягнуць?\",\r\n\t\tsection_description: \"Апісанне\",\r\n\t\tsection_time: \"Перыяд часу\",\r\n\t\tfull_day: \"Увесь дзень\",\r\n\r\n\t\tconfirm_recurring: \"Вы хочаце змяніць усю серыю паўтаральных падзей?\",\r\n\t\tsection_recurring: \"Паўтарэнне\",\r\n\t\tbutton_recurring: \"Адключана\",\r\n\t\tbutton_recurring_open: \"Уключана\",\r\n\t\tbutton_edit_series: \"Рэдагаваць серыю\",\r\n\t\tbutton_edit_occurrence: \"Рэдагаваць асобнік\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Спіс\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Апісанне\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Год\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Спіс\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Спic\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Дзень\",\r\n\t\trepeat_radio_week: \"Тыдзень\",\r\n\t\trepeat_radio_month: \"Месяц\",\r\n\t\trepeat_radio_year: \"Год\",\r\n\t\trepeat_radio_day_type: \"Кожны\",\r\n\t\trepeat_text_day_count: \"дзень\",\r\n\t\trepeat_radio_day_type2: \"Кожны працоўны дзень\",\r\n\t\trepeat_week: \" Паўтараць кожны\",\r\n\t\trepeat_text_week_count: \"тыдзень\",\r\n\t\trepeat_radio_month_type: \"Паўтараць\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" чысла кожнага\",\r\n\t\trepeat_text_month_count: \"месяцу\",\r\n\t\trepeat_text_month_count2_before: \"кожны \",\r\n\t\trepeat_text_month_count2_after: \"месяц\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"дзень\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без даты заканчэння\",\r\n\t\trepeat_text_occurences_count: \"паўтораў\",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\trepeat_radio_end3: \"Да \",\r\n\r\n\t\trepeat_never: \"Ніколі\",\r\n\t\trepeat_daily: \"Кожны дзень\",\r\n\t\trepeat_workdays: \"Кожны працоўны дзень\",\r\n\t\trepeat_weekly: \"Кожны тыдзень\",\r\n\t\trepeat_monthly: \"Кожны месяц\",\r\n\t\trepeat_yearly: \"Кожны год\",\r\n\t\trepeat_custom: \"Наладжвальны\",\r\n\t\trepeat_freq_day: \"Дзень\",\r\n\t\trepeat_freq_week: \"Тыдзень\",\r\n\t\trepeat_freq_month: \"Месяц\",\r\n\t\trepeat_freq_year: \"Год\",\r\n\t\trepeat_on_date: \"На дату\",\r\n\t\trepeat_ends: \"Заканчваецца\",\r\n\r\n\t\tmonth_for_recurring: [\"Студзеня\", \"Лютага\", \"Сакавіка\", \"Красавіка\", \"Мая\", \"Чэрвеня\", \"Ліпeня\", \"Жніўня\", \"Верасня\", \"Кастрычніка\", \"Лістапада\", \"Снежня\"],\r\n\t\tday_for_recurring: [\"Нядзелю\", \"Панядзелак\", \"Аўторак\", \"Сераду\", \"Чацвер\", \"Пятніцу\", \"Суботу\"]\r\n\t}\r\n};\r\n","/*\r\n @Traducido por Vicente Adria Bohigues - vicenteadria@hotmail.com\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Gener\", \"Febrer\", \"Març\", \"Abril\", \"Maig\", \"Juny\", \"Juliol\", \"Agost\", \"Setembre\", \"Octubre\", \"Novembre\", \"Desembre\"],\r\n\t\tmonth_short: [\"Gen\", \"Feb\", \"Mar\", \"Abr\", \"Mai\", \"Jun\", \"Jul\", \"Ago\", \"Set\", \"Oct\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Diumenge\", \"Dilluns\", \"Dimarts\", \"Dimecres\", \"Dijous\", \"Divendres\", \"Dissabte\"],\r\n\t\tday_short: [\"Dg\", \"Dl\", \"Dm\", \"Dc\", \"Dj\", \"Dv\", \"Ds\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hui\",\r\n\t\tday_tab: \"Dia\",\r\n\t\tweek_tab: \"Setmana\",\r\n\t\tmonth_tab: \"Mes\",\r\n\t\tnew_event: \"Nou esdeveniment\",\r\n\t\ticon_save: \"Guardar\",\r\n\t\ticon_cancel: \"Cancel·lar\",\r\n\t\ticon_details: \"Detalls\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Esborrar\",\r\n\t\tconfirm_closing: \"\", //\"Els seus canvis es perdràn, continuar ?\"\r\n\t\tconfirm_deleting: \"L'esdeveniment s'esborrarà definitivament, continuar ?\",\r\n\t\tsection_description: \"Descripció\",\r\n\t\tsection_time: \"Periode de temps\",\r\n\t\tfull_day: \"Tot el dia\",\r\n\r\n\t\tconfirm_recurring: \"¿Desitja modificar el conjunt d'esdeveniments repetits?\",\r\n\t\tsection_recurring: \"Repeteixca l'esdeveniment\",\r\n\t\tbutton_recurring: \"Impedit\",\r\n\t\tbutton_recurring_open: \"Permés\",\r\n\t\tbutton_edit_series: \"Edit sèrie\",\r\n\t\tbutton_edit_occurrence: \"Edita Instància\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descripció\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Any\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Taula\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create: \"Drag to create\",\r\n\t\tdrag_to_move: \"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour: \"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diari\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Setmanal\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Mensual\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia\",\r\n\t\trepeat_radio_day_type2: \"Cada dia laborable\",\r\n\t\trepeat_week: \" Repetir cada\",\r\n\t\trepeat_text_week_count: \"setmana els dies següents:\",\r\n\t\trepeat_radio_month_type: \"Repetir\",\r\n\t\trepeat_radio_month_start: \"El\",\r\n\t\trepeat_text_month_day: \"dia cada\",\r\n\t\trepeat_text_month_count: \"mes\",\r\n\t\trepeat_text_month_count2_before: \"cada\",\r\n\t\trepeat_text_month_count2_after: \"mes\",\r\n\t\trepeat_year_label: \"El\",\r\n\t\tselect_year_day2: \"de\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mes\",\r\n\t\trepeat_radio_end: \"Sense data de finalització\",\r\n\t\trepeat_text_occurences_count: \"ocurrències\",\r\n\t\trepeat_radio_end2: \"Després\",\r\n\t\trepeat_radio_end3: \"Finalitzar el\",\r\n\r\n\t\trepeat_never: \"Mai\",\r\n\t\trepeat_daily: \"Cada dia\",\r\n\t\trepeat_workdays: \"Cada dia laborable\",\r\n\t\trepeat_weekly: \"Cada setmana\",\r\n\t\trepeat_monthly: \"Cada mes\",\r\n\t\trepeat_yearly: \"Cada any\",\r\n\t\trepeat_custom: \"Personalitzat\",\r\n\t\trepeat_freq_day: \"Dia\",\r\n\t\trepeat_freq_week: \"Setmana\",\r\n\t\trepeat_freq_month: \"Mes\",\r\n\t\trepeat_freq_year: \"Any\",\r\n\t\trepeat_on_date: \"En la data\",\r\n\t\trepeat_ends: \"Finalitza\",\r\n\r\n\t\tmonth_for_recurring: [\"Gener\", \"Febrer\", \"Març\", \"Abril\", \"Maig\", \"Juny\", \"Juliol\", \"Agost\", \"Setembre\", \"Octubre\", \"Novembre\", \"Desembre\"],\r\n\t\tday_for_recurring: [\"Diumenge\", \"Dilluns\", \"Dimarts\", \"Dimecres\", \"Dijous\", \"Divendres\", \"Dissabte\"]\r\n\t}\r\n};","/*\r\nTranslation by FreezeSoul\r\n*/\r\n//scheduler.config.day_date=\"%M %d日 %D\";\r\n//scheduler.config.default_date=\"%Y年 %M %d日\";\r\n//scheduler.config.month_date=\"%Y年 %M\";\r\n\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"一月\", \"二月\", \"三月\", \"四月\", \"五月\", \"六月\", \"七月\", \"八月\", \"九月\", \"十月\", \"十一月\", \"十二月\"],\r\n\t\tmonth_short: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_full: [\"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\"],\r\n\t\tday_short: [\"日\", \"一\", \"二\", \"三\", \"四\", \"五\", \"六\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"今天\",\r\n\t\tday_tab: \"日\",\r\n\t\tweek_tab: \"周\",\r\n\t\tmonth_tab: \"月\",\r\n\t\tnew_event: \"新建日程\",\r\n\t\ticon_save: \"保存\",\r\n\t\ticon_cancel: \"关闭\",\r\n\t\ticon_details: \"详细\",\r\n\t\ticon_edit: \"编辑\",\r\n\t\ticon_delete: \"删除\",\r\n\t\tconfirm_closing: \"请确认是否撤销修改!\", //Your changes will be lost, are your sure?\r\n\t\tconfirm_deleting: \"是否删除日程?\",\r\n\t\tsection_description: \"描述\",\r\n\t\tsection_time: \"时间范围\",\r\n\t\tfull_day: \"整天\",\r\n\r\n\t\tconfirm_recurring:\"请确认是否将日程设为重复模式?\",\r\n\t\tsection_recurring:\"重复周期\",\r\n\t\tbutton_recurring:\"禁用\",\r\n\t\tbutton_recurring_open:\"启用\",\r\n\t\tbutton_edit_series: \"编辑系列\",\r\n\t\tbutton_edit_occurrence: \"编辑实例\",\r\n\t\t\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"议程\",\r\n\t\tdate:\"日期\",\r\n\t\tdescription:\"说明\",\r\n\t\t\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"今年\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"议程\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab:\"电网\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"按天\",\r\n\t\trepeat_radio_week: \"按周\",\r\n\t\trepeat_radio_month: \"按月\",\r\n\t\trepeat_radio_year: \"按年\",\r\n\t\trepeat_radio_day_type: \"每\",\r\n\t\trepeat_text_day_count: \"天\",\r\n\t\trepeat_radio_day_type2: \"每个工作日\",\r\n\t\trepeat_week: \" 重复 每\",\r\n\t\trepeat_text_week_count: \"星期的:\",\r\n\t\trepeat_radio_month_type: \"重复\",\r\n\t\trepeat_radio_month_start: \"在\",\r\n\t\trepeat_text_month_day: \"日 每\",\r\n\t\trepeat_text_month_count: \"月\",\r\n\t\trepeat_text_month_count2_before: \"每\",\r\n\t\trepeat_text_month_count2_after: \"月\",\r\n\t\trepeat_year_label: \"在\",\r\n\t\tselect_year_day2: \"的\",\r\n\t\trepeat_text_year_day: \"日\",\r\n\t\tselect_year_month: \"月\",\r\n\t\trepeat_radio_end: \"无结束日期\",\r\n\t\trepeat_text_occurences_count: \"次结束\",\r\n\t\trepeat_radio_end2: \"重复\",\r\n\t\trepeat_radio_end3: \"结束于\",\r\n\t\t\r\n\t\trepeat_never: \"从不\",\r\n\t\trepeat_daily: \"每天\",\r\n\t\trepeat_workdays: \"每个工作日\",\r\n\t\trepeat_weekly: \"每周\",\r\n\t\trepeat_monthly: \"每月\",\r\n\t\trepeat_yearly: \"每年\",\r\n\t\trepeat_custom: \"自定义\",\r\n\t\trepeat_freq_day: \"天\",\r\n\t\trepeat_freq_week: \"周\",\r\n\t\trepeat_freq_month: \"月\",\r\n\t\trepeat_freq_year: \"年\",\r\n\t\trepeat_on_date: \"在日期\",\r\n\t\trepeat_ends: \"结束\",\r\n\r\n\t\tmonth_for_recurring: [\"一月\", \"二月\", \"三月\", \"四月\", \"五月\", \"六月\", \"七月\", \"八月\", \"九月\", \"十月\", \"十一月\", \"十二月\"],\r\n\t\tday_for_recurring: [\"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Leden\", \"Únor\", \"Březen\", \"Duben\", \"Květen\", \"Červen\", \"Červenec\", \"Srpen\", \"Září\", \"Říjen\", \"Listopad\", \"Prosinec\"],\r\n\t\tmonth_short: [\"Led\", \"Ún\", \"Bře\", \"Dub\", \"Kvě\", \"Čer\", \"Čec\", \"Srp\", \"Září\", \"Říj\", \"List\", \"Pro\"],\r\n\t\tday_full: [\"Neděle\", \"Pondělí\", \"Úterý\", \"Středa\", \"Čtvrtek\", \"Pátek\", \"Sobota\"],\r\n\t\tday_short: [\"Ne\", \"Po\", \"Út\", \"St\", \"Čt\", \"Pá\", \"So\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dnes\",\r\n\t\tday_tab: \"Den\",\r\n\t\tweek_tab: \"Týden\",\r\n\t\tmonth_tab: \"Měsíc\",\r\n\t\tnew_event: \"Nová událost\",\r\n\t\ticon_save: \"Uložit\",\r\n\t\ticon_cancel: \"Zpět\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edituj\",\r\n\t\ticon_delete: \"Smazat\",\r\n\t\tconfirm_closing: \"\", //Vaše změny budou ztraceny, opravdu ?\r\n\t\tconfirm_deleting: \"Událost bude trvale smazána, opravdu?\",\r\n\t\tsection_description: \"Poznámky\",\r\n\t\tsection_time: \"Doba platnosti\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Přejete si upravit celou řadu opakovaných událostí?\",\r\n\t\tsection_recurring: \"Opakování události\",\r\n\t\tbutton_recurring: \"Vypnuto\",\r\n\t\tbutton_recurring_open: \"Zapnuto\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Upravit instance\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Program\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Poznámka\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\t\tfull_day: \"Full day\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Program\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Mřížka\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Denně\",\r\n\t\trepeat_radio_week: \"Týdně\",\r\n\t\trepeat_radio_month: \"Měsíčně\",\r\n\t\trepeat_radio_year: \"Ročně\",\r\n\t\trepeat_radio_day_type: \"každý\",\r\n\t\trepeat_text_day_count: \"Den\",\r\n\t\trepeat_radio_day_type2: \"pracovní dny\",\r\n\t\trepeat_week: \"Opakuje každých\",\r\n\t\trepeat_text_week_count: \"Týdnů na:\",\r\n\t\trepeat_radio_month_type: \"u každého\",\r\n\t\trepeat_radio_month_start: \"na\",\r\n\t\trepeat_text_month_day: \"Den každého\",\r\n\t\trepeat_text_month_count: \"Měsíc\",\r\n\t\trepeat_text_month_count2_before: \"každý\",\r\n\t\trepeat_text_month_count2_after: \"Měsíc\",\r\n\t\trepeat_year_label: \"na\",\r\n\t\tselect_year_day2: \"v\",\r\n\t\trepeat_text_year_day: \"Den v\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"bez data ukončení\",\r\n\t\trepeat_text_occurences_count: \"Události\",\r\n\t\trepeat_radio_end2: \"po\",\r\n\t\trepeat_radio_end3: \"Konec\",\r\n\r\n\t\trepeat_never: \"Nikdy\",\r\n\t\trepeat_daily: \"Každý den\",\r\n\t\trepeat_workdays: \"Každý pracovní den\",\r\n\t\trepeat_weekly: \"Každý týden\",\r\n\t\trepeat_monthly: \"Každý měsíc\",\r\n\t\trepeat_yearly: \"Každý rok\",\r\n\t\trepeat_custom: \"Vlastní\",\r\n\t\trepeat_freq_day: \"Den\",\r\n\t\trepeat_freq_week: \"Týden\",\r\n\t\trepeat_freq_month: \"Měsíc\",\r\n\t\trepeat_freq_year: \"Rok\",\r\n\t\trepeat_on_date: \"Na datum\",\r\n\t\trepeat_ends: \"Končí\",\r\n\r\n\t\tmonth_for_recurring: [\"Leden\", \"Únor\", \"Březen\", \"Duben\", \"Květen\", \"Červen\", \"Červenec\", \"Srpen\", \"Září\", \"Říjen\", \"Listopad\", \"Prosinec\"],\r\n\t\tday_for_recurring: [\"Neděle \", \"Pondělí\", \"Úterý\", \"Středa\", \"Čtvrtek\", \"Pátek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Marts\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Man\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uge\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny begivenhed\",\r\n\t\ticon_save: \"Gem\",\r\n\t\ticon_cancel: \"Fortryd\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Tilret\",\r\n\t\ticon_delete: \"Slet\",\r\n\t\tconfirm_closing: \"Dine rettelser vil gå tabt.. Er dy sikker?\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Bigivenheden vil blive slettet permanent. Er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du tilrette hele serien af gentagne begivenheder?\",\r\n\t\tsection_recurring: \"Gentag begivenhed\",\r\n\t\tbutton_recurring: \"Frakoblet\",\r\n\t\tbutton_recurring_open: \"Tilkoblet\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Rediger en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dagsorden\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dagsorden\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\",\r\n\t\trepeat_radio_week: \"Ugenlig\",\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"På hver arbejdsdag\",\r\n\t\trepeat_week: \" Gentager sig hver\",\r\n\t\trepeat_text_week_count: \"uge på følgende dage:\",\r\n\t\trepeat_radio_month_type: \"Hver den\",\r\n\t\trepeat_radio_month_start: \"Den\",\r\n\t\trepeat_text_month_day: \" i hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"Den\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Ingen slutdato\",\r\n\t\trepeat_text_occurences_count: \"gentagelse\",\r\n\t\trepeat_radio_end2: \"Efter\",\r\n\t\trepeat_radio_end3: \"Slut\",\r\n\r\n\t\trepeat_never: \"Aldrig\",\r\n\t\trepeat_daily: \"Hver dag\",\r\n\t\trepeat_workdays: \"Hver hverdag\",\r\n\t\trepeat_weekly: \"Hver uge\",\r\n\t\trepeat_monthly: \"Hver måned\",\r\n\t\trepeat_yearly: \"Hvert år\",\r\n\t\trepeat_custom: \"Brugerdefineret\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Uge\",\r\n\t\trepeat_freq_month: \"Måned\",\r\n\t\trepeat_freq_year: \"År\",\r\n\t\trepeat_on_date: \"På dato\",\r\n\t\trepeat_ends: \"Slutter\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"März\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Dezember\"],\r\n\t\tday_for_recurring: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\" Januar\", \" Februar\", \" März \", \" April\", \" Mai\", \" Juni\", \" Juli\", \" August\", \" September \", \" Oktober\", \" November \", \" Dezember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mär\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dez\"],\r\n\t\tday_full: [ \"Sonntag\", \"Montag\", \"Dienstag\", \" Mittwoch\", \" Donnerstag\", \"Freitag\", \"Samstag\"],\r\n\t\tday_short: [\"So\", \"Mo\", \"Di\", \"Mi\", \"Do\", \"Fr\", \"Sa\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Heute\",\r\n\t\tday_tab: \"Tag\",\r\n\t\tweek_tab: \"Woche\",\r\n\t\tmonth_tab: \"Monat\",\r\n\t\tnew_event: \"neuer Eintrag\",\r\n\t\ticon_save: \"Speichern\",\r\n\t\ticon_cancel: \"Abbrechen\",\r\n\t\ticon_details: \"Details\",\r\n\t\ticon_edit: \"Ändern\",\r\n\t\ticon_delete: \"Löschen\",\r\n\t\tconfirm_closing: \"\", //\"Ihre Veränderungen werden verloren sein, wollen Sie ergänzen? \"\r\n\t\tconfirm_deleting: \"Der Eintrag wird gelöscht\",\r\n\t\tsection_description: \"Beschreibung\",\r\n\t\tsection_time: \"Zeitspanne\",\r\n\t\tfull_day: \"Ganzer Tag\",\r\n\r\n\t\tconfirm_recurring: \"Wollen Sie alle Einträge bearbeiten oder nur diesen einzelnen Eintrag?\",\r\n\t\tsection_recurring: \"Wiederholung\",\r\n\t\tbutton_recurring: \"Aus\",\r\n\t\tbutton_recurring_open: \"An\",\r\n\t\tbutton_edit_series: \"Bearbeiten Sie die Serie\",\r\n\t\tbutton_edit_occurrence: \"Bearbeiten Sie eine Kopie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Beschreibung\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Jahre\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Täglich\",\r\n\t\trepeat_radio_week: \"Wöchentlich\",\r\n\t\trepeat_radio_month: \"Monatlich\",\r\n\t\trepeat_radio_year: \"Jährlich\",\r\n\t\trepeat_radio_day_type: \"jeden\",\r\n\t\trepeat_text_day_count: \"Tag\",\r\n\t\trepeat_radio_day_type2: \"an jedem Arbeitstag\",\r\n\t\trepeat_week: \" Wiederholt sich jede\",\r\n\t\trepeat_text_week_count: \"Woche am:\",\r\n\t\trepeat_radio_month_type: \"an jedem\",\r\n\t\trepeat_radio_month_start: \"am\",\r\n\t\trepeat_text_month_day: \"Tag eines jeden\",\r\n\t\trepeat_text_month_count: \"Monats\",\r\n\t\trepeat_text_month_count2_before: \"jeden\",\r\n\t\trepeat_text_month_count2_after: \"Monats\",\r\n\t\trepeat_year_label: \"am\",\r\n\t\tselect_year_day2: \"im\",\r\n\t\trepeat_text_year_day: \"Tag im\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"kein Enddatum\",\r\n\t\trepeat_text_occurences_count: \"Ereignissen\",\r\n\t\trepeat_radio_end3: \"Schluß\",\r\n\t\trepeat_radio_end2: \"nach\",\r\n\r\n\t\trepeat_never: \"Nie\",\r\n\t\trepeat_daily: \"Jeden Tag\",\r\n\t\trepeat_workdays: \"Jeden Werktag\",\r\n\t\trepeat_weekly: \"Jede Woche\",\r\n\t\trepeat_monthly: \"Jeden Monat\",\r\n\t\trepeat_yearly: \"Jedes Jahr\",\r\n\t\trepeat_custom: \"Benutzerdefiniert\",\r\n\t\trepeat_freq_day: \"Tag\",\r\n\t\trepeat_freq_week: \"Woche\",\r\n\t\trepeat_freq_month: \"Monat\",\r\n\t\trepeat_freq_year: \"Jahr\",\r\n\t\trepeat_on_date: \"Am Datum\",\r\n\t\trepeat_ends: \"Endet\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"März\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Dezember\"],\r\n\t\tday_for_recurring: [\"Sonntag\", \"Montag\", \"Dienstag\", \"Mittwoch\", \"Donnerstag\", \"Freitag\", \"Samstag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Ιανουάριος\", \"Φεβρουάριος\", \"Μάρτιος\", \"Απρίλιος\", \"Μάϊος\", \"Ιούνιος\", \"Ιούλιος\", \"Αύγουστος\", \"Σεπτέμβριος\", \"Οκτώβριος\", \"Νοέμβριος\", \"Δεκέμβριος\"],\r\n\t\tmonth_short: [\"ΙΑΝ\", \"ΦΕΒ\", \"ΜΑΡ\", \"ΑΠΡ\", \"ΜΑΙ\", \"ΙΟΥΝ\", \"ΙΟΥΛ\", \"ΑΥΓ\", \"ΣΕΠ\", \"ΟΚΤ\", \"ΝΟΕ\", \"ΔΕΚ\"],\r\n\t\tday_full: [\"Κυριακή\", \"Δευτέρα\", \"Τρίτη\", \"Τετάρτη\", \"Πέμπτη\", \"Παρασκευή\", \"Σάββατο\"],\r\n\t\tday_short: [\"ΚΥ\", \"ΔΕ\", \"ΤΡ\", \"ΤΕ\", \"ΠΕ\", \"ΠΑ\", \"ΣΑ\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Σήμερα\",\r\n\t\tday_tab: \"Ημέρα\",\r\n\t\tweek_tab: \"Εβδομάδα\",\r\n\t\tmonth_tab: \"Μήνας\",\r\n\t\tnew_event: \"Νέο έργο\",\r\n\t\ticon_save: \"Αποθήκευση\",\r\n\t\ticon_cancel: \"Άκυρο\",\r\n\t\ticon_details: \"Λεπτομέρειες\",\r\n\t\ticon_edit: \"Επεξεργασία\",\r\n\t\ticon_delete: \"Διαγραφή\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Το έργο θα διαγραφεί οριστικά. Θέλετε να συνεχίσετε;\",\r\n\t\tsection_description: \"Περιγραφή\",\r\n\t\tsection_time: \"Χρονική περίοδος\",\r\n\t\tfull_day: \"Πλήρης Ημέρα\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Θέλετε να επεξεργασθείτε ολόκληρη την ομάδα των επαναλαμβανόμενων έργων;\",\r\n\t\tsection_recurring: \"Επαναλαμβανόμενο έργο\",\r\n\t\tbutton_recurring: \"Ανενεργό\",\r\n\t\tbutton_recurring_open: \"Ενεργό\",\r\n\t\tbutton_edit_series: \"Επεξεργαστείτε τη σειρά\",\r\n\t\tbutton_edit_occurrence: \"Επεξεργασία ένα αντίγραφο\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Ημερήσια Διάταξη\",\r\n\t\tdate: \"Ημερομηνία\",\r\n\t\tdescription: \"Περιγραφή\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Έτος\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Ημερήσια Διάταξη\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Πλέγμα\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Ημερησίως\",\r\n\t\trepeat_radio_week: \"Εβδομαδιαίως\",\r\n\t\trepeat_radio_month: \"Μηνιαίως\",\r\n\t\trepeat_radio_year: \"Ετησίως\",\r\n\t\trepeat_radio_day_type: \"Κάθε\",\r\n\t\trepeat_text_day_count: \"ημέρα\",\r\n\t\trepeat_radio_day_type2: \"Κάθε εργάσιμη\",\r\n\t\trepeat_week: \" Επανάληψη κάθε\",\r\n\t\trepeat_text_week_count: \"εβδομάδα τις επόμενες ημέρες:\",\r\n\t\trepeat_radio_month_type: \"Επανάληψη\",\r\n\t\trepeat_radio_month_start: \"Την\",\r\n\t\trepeat_text_month_day: \"ημέρα κάθε\",\r\n\t\trepeat_text_month_count: \"μήνα\",\r\n\t\trepeat_text_month_count2_before: \"κάθε\",\r\n\t\trepeat_text_month_count2_after: \"μήνα\",\r\n\t\trepeat_year_label: \"Την\",\r\n\t\tselect_year_day2: \"του\",\r\n\t\trepeat_text_year_day: \"ημέρα\",\r\n\t\tselect_year_month: \"μήνα\",\r\n\t\trepeat_radio_end: \"Χωρίς ημερομηνία λήξεως\",\r\n\t\trepeat_text_occurences_count: \"επαναλήψεις\",\r\n\t\trepeat_radio_end3: \"Λήγει την\",\r\n\t\trepeat_radio_end2: \"Μετά από\",\r\n\r\n\t\trepeat_never: \"Ποτέ\",\r\n\t\trepeat_daily: \"Κάθε μέρα\",\r\n\t\trepeat_workdays: \"Κάθε εργάσιμη μέρα\",\r\n\t\trepeat_weekly: \"Κάθε εβδομάδα\",\r\n\t\trepeat_monthly: \"Κάθε μήνα\",\r\n\t\trepeat_yearly: \"Κάθε χρόνο\",\r\n\t\trepeat_custom: \"Προσαρμοσμένο\",\r\n\t\trepeat_freq_day: \"Ημέρα\",\r\n\t\trepeat_freq_week: \"Εβδομάδα\",\r\n\t\trepeat_freq_month: \"Μήνας\",\r\n\t\trepeat_freq_year: \"Χρόνος\",\r\n\t\trepeat_on_date: \"Σε ημερομηνία\",\r\n\t\trepeat_ends: \"Λήγει\",\r\n\r\n\t\tmonth_for_recurring: [\"Ιανουάριος\", \"Φεβρουάριος\", \"Μάρτιος\", \"Απρίλιος\", \"Μάϊος\", \"Ιούνιος\", \"Ιούλιος\", \"Αύγουστος\", \"Σεπτέμβριος\", \"Οκτώβριος\", \"Νοέμβριος\", \"Δεκέμβριος\"],\r\n\t\tday_for_recurring: [\"Κυριακή\", \"Δευτέρα\", \"Τρίτη\", \"Τετάρτη\", \"Πέμπτη\", \"Παρασκευή\", \"Σάββατο\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate:{\r\n\t\tmonth_full:[\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\r\n\t\tmonth_short:[\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n\t\tday_full:[\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\r\n\t\tday_short:[\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"]\r\n\t},\r\n\tlabels:{\r\n\t\tdhx_cal_today_button:\"Today\",\r\n\t\tday_tab:\"Day\",\r\n\t\tweek_tab:\"Week\",\r\n\t\tmonth_tab:\"Month\",\r\n\t\tnew_event:\"New event\",\r\n\t\ticon_save:\"Save\",\r\n\t\ticon_cancel:\"Cancel\",\r\n\t\ticon_details:\"Details\",\r\n\t\ticon_edit:\"Edit\",\r\n\t\ticon_delete:\"Delete\",\r\n\t\tconfirm_closing:\"\",//Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting:\"Event will be deleted permanently, are you sure?\",\r\n\t\tsection_description:\"Description\",\r\n\t\tsection_time:\"Time period\",\r\n\t\tfull_day:\"Full day\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring:\"Do you want to edit the whole set of repeated events?\",\r\n\t\tsection_recurring:\"Repeat event\",\r\n\t\tbutton_recurring:\"Disabled\",\r\n\t\tbutton_recurring_open:\"Enabled\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Edit occurrence\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"Agenda\",\r\n\t\tdate:\"Date\",\r\n\t\tdescription:\"Description\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"Year\",\r\n\r\n\t\t/* week agenda extension */\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daily\",//name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Weekly\",//name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Monthly\",\r\n\t\trepeat_radio_year: \"Yearly\",\r\n\t\trepeat_radio_day_type: \"Every\",\r\n\t\trepeat_text_day_count: \"day\",\r\n\t\trepeat_radio_day_type2: \"Every workday\",\r\n\t\trepeat_week: \" Repeat every\",\r\n\t\trepeat_text_week_count: \"week next days:\",\r\n\t\trepeat_radio_month_type: \"Repeat\",\r\n\t\trepeat_radio_month_start: \"On\",\r\n\t\trepeat_text_month_day: \"day every\",\r\n\t\trepeat_text_month_count: \"month\",\r\n\t\trepeat_text_month_count2_before: \"every\",\r\n\t\trepeat_text_month_count2_after: \"month\",\r\n\t\trepeat_year_label: \"On\",\r\n\t\tselect_year_day2: \"of\",\r\n\t\trepeat_text_year_day: \"day\",\r\n\t\tselect_year_month: \"month\",\r\n\t\trepeat_radio_end: \"No end date\",\r\n\t\trepeat_text_occurences_count: \"occurrences\",\r\n\t\trepeat_radio_end2: \"After\",\r\n\t\trepeat_radio_end3: \"End by\",\r\n\r\n\t\trepeat_never: \"Never\",\r\n\t\trepeat_daily: \"Every day\",\r\n\t\trepeat_workdays: \"Every weekday\",\r\n\t\trepeat_weekly: \"Every week\",\r\n\t\trepeat_monthly: \"Every month\",\r\n\t\trepeat_yearly: \"Every year\",\r\n\t\trepeat_custom: \"Custom\",\r\n\t\trepeat_freq_day: \"Day\",\r\n\t\trepeat_freq_week: \"Week\",\r\n\t\trepeat_freq_month: \"Month\",\r\n\t\trepeat_freq_year: \"Year\",\r\n\t\trepeat_on_date: \"On date\",\r\n\t\trepeat_ends: \"Ends\",\r\n\r\n\t\tmonth_for_recurring: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"]//\r\n\t}\r\n};\r\n\r\n","/*\r\n @Autor Manuel Fernandez Panzuela - www.mfernandez.es\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Enero\", \"Febrero\", \"Marzo\", \"Abril\", \"Mayo\", \"Junio\", \"Julio\", \"Agosto\", \"Septiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"],\r\n\t\tmonth_short: [\"Ene\", \"Feb\", \"Mar\", \"Abr\", \"May\", \"Jun\", \"Jul\", \"Ago\", \"Sep\", \"Oct\", \"Nov\", \"Dic\"],\r\n\t\tday_full: [\"Domingo\", \"Lunes\", \"Martes\", \"Miércoles\", \"Jueves\", \"Viernes\", \"Sábado\"],\r\n\t\tday_short: [\"Dom\", \"Lun\", \"Mar\", \"Mié\", \"Jue\", \"Vie\", \"Sáb\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hoy\",\r\n\t\tday_tab: \"Día\",\r\n\t\tweek_tab: \"Semana\",\r\n\t\tmonth_tab: \"Mes\",\r\n\t\tnew_event: \"Nuevo evento\",\r\n\t\ticon_save: \"Guardar\",\r\n\t\ticon_cancel: \"Cancelar\",\r\n\t\ticon_details: \"Detalles\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Eliminar\",\r\n\t\tconfirm_closing: \"\", //\"Sus cambios se perderán, continuar ?\"\r\n\t\tconfirm_deleting: \"El evento se borrará definitivamente, ¿continuar?\",\r\n\t\tsection_description: \"Descripción\",\r\n\t\tsection_time: \"Período\",\r\n\t\tfull_day: \"Todo el día\",\r\n\r\n\t\tconfirm_recurring: \"¿Desea modificar el conjunto de eventos repetidos?\",\r\n\t\tsection_recurring: \"Repita el evento\",\r\n\t\tbutton_recurring: \"Impedido\",\r\n\t\tbutton_recurring_open: \"Permitido\",\r\n\t\tbutton_edit_series: \"Editar la serie\",\r\n\t\tbutton_edit_occurrence: \"Editar este evento\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Día\",\r\n\t\tdate: \"Fecha\",\r\n\t\tdescription: \"Descripción\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Año\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Día\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Reja\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diariamente\",\r\n\t\trepeat_radio_week: \"Semanalmente\",\r\n\t\trepeat_radio_month: \"Mensualmente\",\r\n\t\trepeat_radio_year: \"Anualmente\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia\",\r\n\t\trepeat_radio_day_type2: \"Cada jornada de trabajo\",\r\n\t\trepeat_week: \" Repetir cada\",\r\n\t\trepeat_text_week_count: \"semana:\",\r\n\t\trepeat_radio_month_type: \"Repita\",\r\n\t\trepeat_radio_month_start: \"El\",\r\n\t\trepeat_text_month_day: \"dia cada \",\r\n\t\trepeat_text_month_count: \"mes\",\r\n\t\trepeat_text_month_count2_before: \"cada\",\r\n\t\trepeat_text_month_count2_after: \"mes\",\r\n\t\trepeat_year_label: \"El\",\r\n\t\tselect_year_day2: \"del\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mes\",\r\n\t\trepeat_radio_end: \"Sin fecha de finalización\",\r\n\t\trepeat_text_occurences_count: \"ocurrencias\",\r\n\t\trepeat_radio_end3: \"Fin\",\r\n\t\trepeat_radio_end2: \"Después de\",\r\n\r\n\t\trepeat_never: \"Nunca\",\r\n\t\trepeat_daily: \"Cada día\",\r\n\t\trepeat_workdays: \"Cada día laborable\",\r\n\t\trepeat_weekly: \"Cada semana\",\r\n\t\trepeat_monthly: \"Cada mes\",\r\n\t\trepeat_yearly: \"Cada año\",\r\n\t\trepeat_custom: \"Personalizado\",\r\n\t\trepeat_freq_day: \"Día\",\r\n\t\trepeat_freq_week: \"Semana\",\r\n\t\trepeat_freq_month: \"Mes\",\r\n\t\trepeat_freq_year: \"Año\",\r\n\t\trepeat_on_date: \"En la fecha\",\r\n\t\trepeat_ends: \"Termina\",\r\n\r\n\t\tmonth_for_recurring: [\"Enero\", \"Febrero\", \"Маrzo\", \"Аbril\", \"Mayo\", \"Junio\", \"Julio\", \"Аgosto\", \"Setiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"],\r\n\t\tday_for_recurring: [\"Domingo\", \"Lunes\", \"Martes\", \"Miércoles\", \"Jeuves\", \"Viernes\", \"Sabado\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Tammikuu\", \"Helmikuu\", \"Maaliskuu\", \"Huhtikuu\", \"Toukokuu\", \"Kesäkuu\", \"Heinäkuu\", \"Elokuu\", \"Syyskuu\", \"Lokakuu\", \"Marraskuu\", \"Joulukuu\"],\r\n\t\tmonth_short: [\"Tam\", \"Hel\", \"Maa\", \"Huh\", \"Tou\", \"Kes\", \"Hei\", \"Elo\", \"Syy\", \"Lok\", \"Mar\", \"Jou\"],\r\n\t\tday_full: [\"Sunnuntai\", \"Maanantai\", \"Tiistai\", \"Keskiviikko\", \"Torstai\", \"Perjantai\", \"Lauantai\"],\r\n\t\tday_short: [\"Su\", \"Ma\", \"Ti\", \"Ke\", \"To\", \"Pe\", \"La\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Tänään\",\r\n\t\tday_tab: \"Päivä\",\r\n\t\tweek_tab: \"Viikko\",\r\n\t\tmonth_tab: \"Kuukausi\",\r\n\t\tnew_event: \"Uusi tapahtuma\",\r\n\t\ticon_save: \"Tallenna\",\r\n\t\ticon_cancel: \"Peru\",\r\n\t\ticon_details: \"Tiedot\",\r\n\t\ticon_edit: \"Muokkaa\",\r\n\t\ticon_delete: \"Poista\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Haluatko varmasti poistaa tapahtuman?\",\r\n\t\tsection_description: \"Kuvaus\",\r\n\t\tsection_time: \"Aikajakso\",\r\n\t\tfull_day: \"Koko päivä\",\r\n\r\n\t\tconfirm_recurring: \"Haluatko varmasti muokata toistuvan tapahtuman kaikkia jaksoja?\",\r\n\t\tsection_recurring: \"Toista tapahtuma\",\r\n\t\tbutton_recurring: \"Ei käytössä\",\r\n\t\tbutton_recurring_open: \"Käytössä\",\r\n\t\tbutton_edit_series: \"Muokkaa sarja\",\r\n\t\tbutton_edit_occurrence: \"Muokkaa kopio\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Esityslista\",\r\n\t\tdate: \"Päivämäärä\",\r\n\t\tdescription: \"Kuvaus\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Vuoden\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Esityslista\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Ritilä\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Luo uusi vetämällä\",\r\n\t\tdrag_to_move:\"Siirrä vetämällä\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Päivittäin\",\r\n\t\trepeat_radio_week: \"Viikoittain\",\r\n\t\trepeat_radio_month: \"Kuukausittain\",\r\n\t\trepeat_radio_year: \"Vuosittain\",\r\n\t\trepeat_radio_day_type: \"Joka\",\r\n\t\trepeat_text_day_count: \"päivä\",\r\n\t\trepeat_radio_day_type2: \"Joka arkipäivä\",\r\n\t\trepeat_week: \"Toista joka\",\r\n\t\trepeat_text_week_count: \"viikko näinä päivinä:\",\r\n\t\trepeat_radio_month_type: \"Toista\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \"päivänä joka\",\r\n\t\trepeat_text_month_count: \"kuukausi\",\r\n\t\trepeat_text_month_count2_before: \"joka\",\r\n\t\trepeat_text_month_count2_after: \"kuukausi\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"päivä\",\r\n\t\tselect_year_month: \"kuukausi\",\r\n\t\trepeat_radio_end: \"Ei loppumisaikaa\",\r\n\t\trepeat_text_occurences_count: \"Toiston jälkeen\",\r\n\t\trepeat_radio_end3: \"Loppuu\",\r\n\t\trepeat_radio_end2: \"\",\r\n\r\n\t\trepeat_never: \"Ei koskaan\",\r\n\t\trepeat_daily: \"Joka päivä\",\r\n\t\trepeat_workdays: \"Joka arkipäivä\",\r\n\t\trepeat_weekly: \"Joka viikko\",\r\n\t\trepeat_monthly: \"Joka kuukausi\",\r\n\t\trepeat_yearly: \"Joka vuosi\",\r\n\t\trepeat_custom: \"Mukautettu\",\r\n\t\trepeat_freq_day: \"Päivä\",\r\n\t\trepeat_freq_week: \"Viikko\",\r\n\t\trepeat_freq_month: \"Kuukausi\",\r\n\t\trepeat_freq_year: \"Vuosi\",\r\n\t\trepeat_on_date: \"Tiettynä päivänä\",\r\n\t\trepeat_ends: \"Päättyy\",\r\n\r\n\t\tmonth_for_recurring: [\"Tammikuu\", \"Helmikuu\", \"Maaliskuu\", \"Huhtikuu\", \"Toukokuu\", \"Kesäkuu\", \"Heinäkuu\", \"Elokuu\", \"Syyskuu\", \"Lokakuu\", \"Marraskuu\", \"Joulukuu\"],\r\n\t\tday_for_recurring: [\"Sunnuntai\", \"Maanantai\", \"Tiistai\", \"Keskiviikko\", \"Torstai\", \"Perjantai\", \"Lauantai\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Janvier\", \"Février\", \"Mars\", \"Avril\", \"Mai\", \"Juin\", \"Juillet\", \"Août\", \"Septembre\", \"Octobre\", \"Novembre\", \"Décembre\"],\r\n\t\tmonth_short: [\"Jan\", \"Fév\", \"Mar\", \"Avr\", \"Mai\", \"Juin\", \"Juil\", \"Aoû\", \"Sep\", \"Oct\", \"Nov\", \"Déc\"],\r\n\t\tday_full: [\"Dimanche\", \"Lundi\", \"Mardi\", \"Mercredi\", \"Jeudi\", \"Vendredi\", \"Samedi\"],\r\n\t\tday_short: [\"Dim\", \"Lun\", \"Mar\", \"Mer\", \"Jeu\", \"Ven\", \"Sam\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Aujourd'hui\",\r\n\t\tday_tab: \"Jour\",\r\n\t\tweek_tab: \"Semaine\",\r\n\t\tmonth_tab: \"Mois\",\r\n\t\tnew_event: \"Nouvel événement\",\r\n\t\ticon_save: \"Enregistrer\",\r\n\t\ticon_cancel: \"Annuler\",\r\n\t\ticon_details: \"Détails\",\r\n\t\ticon_edit: \"Modifier\",\r\n\t\ticon_delete: \"Effacer\",\r\n\t\tconfirm_closing: \"\", //Vos modifications seront perdus, êtes-vous sûr ?\r\n\t\tconfirm_deleting: \"L'événement sera effacé sans appel, êtes-vous sûr ?\",\r\n\t\tsection_description: \"Description\",\r\n\t\tsection_time: \"Période\",\r\n\t\tfull_day: \"Journée complète\",\r\n\r\n\t\tconfirm_recurring: \"Voulez-vous éditer toute une série d'évènements répétés?\",\r\n\t\tsection_recurring: \"Périodicité\",\r\n\t\tbutton_recurring: \"Désactivé\",\r\n\t\tbutton_recurring_open: \"Activé\",\r\n\t\tbutton_edit_series: \"Modifier la série\",\r\n\t\tbutton_edit_occurrence: \"Modifier une copie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Jour\",\r\n\t\tdate: \"Date\",\r\n\t\tdescription: \"Description\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Année\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Jour\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grille\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Quotidienne\",\r\n\t\trepeat_radio_week: \"Hebdomadaire\",\r\n\t\trepeat_radio_month: \"Mensuelle\",\r\n\t\trepeat_radio_year: \"Annuelle\",\r\n\t\trepeat_radio_day_type: \"Chaque\",\r\n\t\trepeat_text_day_count: \"jour\",\r\n\t\trepeat_radio_day_type2: \"Chaque journée de travail\",\r\n\t\trepeat_week: \" Répéter toutes les\",\r\n\t\trepeat_text_week_count: \"semaine:\",\r\n\t\trepeat_radio_month_type: \"Répéter\",\r\n\t\trepeat_radio_month_start: \"Le\",\r\n\t\trepeat_text_month_day: \"jour chaque\",\r\n\t\trepeat_text_month_count: \"mois\",\r\n\t\trepeat_text_month_count2_before: \"chaque\",\r\n\t\trepeat_text_month_count2_after: \"mois\",\r\n\t\trepeat_year_label: \"Le\",\r\n\t\tselect_year_day2: \"du\",\r\n\t\trepeat_text_year_day: \"jour\",\r\n\t\tselect_year_month: \"mois\",\r\n\t\trepeat_radio_end: \"Pas de date d"achèvement\",\r\n\t\trepeat_text_occurences_count: \"occurrences\",\r\n\t\trepeat_radio_end3: \"Fin\",\r\n\t\trepeat_radio_end2: \"Après\",\r\n\r\n\t\trepeat_never: \"Jamais\",\r\n\t\trepeat_daily: \"Chaque jour\",\r\n\t\trepeat_workdays: \"Chaque jour ouvrable\",\r\n\t\trepeat_weekly: \"Chaque semaine\",\r\n\t\trepeat_monthly: \"Chaque mois\",\r\n\t\trepeat_yearly: \"Chaque année\",\r\n\t\trepeat_custom: \"Personnalisé\",\r\n\t\trepeat_freq_day: \"Jour\",\r\n\t\trepeat_freq_week: \"Semaine\",\r\n\t\trepeat_freq_month: \"Mois\",\r\n\t\trepeat_freq_year: \"Année\",\r\n\t\trepeat_on_date: \"À la date\",\r\n\t\trepeat_ends: \"Se termine\",\r\n\r\n\t\tmonth_for_recurring: [\"Janvier\", \"Février\", \"Mars\", \"Avril\", \"Mai\", \"Juin\", \"Juillet\", \"Août\", \"Septembre\", \"Octobre\", \"Novembre\", \"Décembre\"],\r\n\t\tday_for_recurring: [\"Dimanche\", \"Lundi\", \"Mardi\", \"Mercredi\", \"Jeudi\", \"Vendredi\", \"Samedi\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"ינואר\", \"פברואר\", \"מרץ\", \"אפריל\", \"מאי\", \"יוני\", \"יולי\", \"אוגוסט\", \"ספטמבר\", \"אוקטובר\", \"נובמבר\", \"דצמבר\"],\r\n\t\tmonth_short: [\"ינו\", \"פבר\", \"מרץ\", \"אפר\", \"מאי\", \"יונ\", \"יול\", \"אוג\", \"ספט\", \"אוק\", \"נוב\", \"דצמ\"],\r\n\t\tday_full: [\"ראשון\", \"שני\", \"שלישי\", \"רביעי\", \"חמישי\", \"שישי\", \"שבת\"],\r\n\t\tday_short: [\"א\", \"ב\", \"ג\", \"ד\", \"ה\", \"ו\", \"ש\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"היום\",\r\n\t\tday_tab: \"יום\",\r\n\t\tweek_tab: \"שבוע\",\r\n\t\tmonth_tab: \"חודש\",\r\n\t\tnew_event: \"ארוע חדש\",\r\n\t\ticon_save: \"שמור\",\r\n\t\ticon_cancel: \"בטל\",\r\n\t\ticon_details: \"פרטים\",\r\n\t\ticon_edit: \"ערוך\",\r\n\t\ticon_delete: \"מחק\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"ארוע ימחק סופית.להמשיך?\",\r\n\t\tsection_description: \"תיאור\",\r\n\t\tsection_time: \"תקופה\",\r\n\r\n\t\tconfirm_recurring: \"האם ברצונך לשנות כל סדרת ארועים מתמשכים?\",\r\n\t\tsection_recurring: \"להעתיק ארוע\",\r\n\t\tbutton_recurring: \"לא פעיל\",\r\n\t\tbutton_recurring_open: \"פעיל\",\r\n\t\tfull_day: \"יום שלם\",\r\n\t\tbutton_edit_series: \"ערוך את הסדרה\",\r\n\t\tbutton_edit_occurrence: \"עריכת עותק\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"סדר יום\",\r\n\t\tdate: \"תאריך\",\r\n\t\tdescription: \"תיאור\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"לשנה\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"סדר יום\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"סורג\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"גרור כדי להזיז\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"בטל\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"הבא\",\r\n\t\tprev: \"הקודם\",\r\n\t\tyear: \"שנה\",\r\n\t\tmonth: \"חודש\",\r\n\t\tday: \"יום\",\r\n\t\thour:\"שעה\",\r\n\t\tminute: \"דקה\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"יומי\",\r\n\t\trepeat_radio_week: \"שבועי\",\r\n\t\trepeat_radio_month: \"חודשי\",\r\n\t\trepeat_radio_year: \"שנתי\",\r\n\t\trepeat_radio_day_type: \"חזור כל\",\r\n\t\trepeat_text_day_count: \"ימים\",\r\n\t\trepeat_radio_day_type2: \"חזור כל יום עבודה\",\r\n\t\trepeat_week: \" חזור כל\",\r\n\t\trepeat_text_week_count: \"שבוע לפי ימים:\",\r\n\t\trepeat_radio_month_type: \"חזור כל\",\r\n\t\trepeat_radio_month_start: \"כל\",\r\n\t\trepeat_text_month_day: \"ימים כל\",\r\n\t\trepeat_text_month_count: \"חודשים\",\r\n\t\trepeat_text_month_count2_before: \"חזור כל\",\r\n\t\trepeat_text_month_count2_after: \"חודש\",\r\n\t\trepeat_year_label: \"כל\",\r\n\t\tselect_year_day2: \"בחודש\",\r\n\t\trepeat_text_year_day: \"ימים\",\r\n\t\tselect_year_month: \"חודש\",\r\n\t\trepeat_radio_end: \"לעולם לא מסתיים\",\r\n\t\trepeat_text_occurences_count: \"אירועים\",\r\n\t\trepeat_radio_end3: \"מסתיים ב\",\r\n\t\trepeat_radio_end2: \"אחרי\",\r\n\r\n\t\trepeat_never: \"אף פעם\",\r\n\t\trepeat_daily: \"כל יום\",\r\n\t\trepeat_workdays: \"כל יום עבודה\",\r\n\t\trepeat_weekly: \"כל שבוע\",\r\n\t\trepeat_monthly: \"כל חודש\",\r\n\t\trepeat_yearly: \"כל שנה\",\r\n\t\trepeat_custom: \"מותאם אישית\",\r\n\t\trepeat_freq_day: \"יום\",\r\n\t\trepeat_freq_week: \"שבוע\",\r\n\t\trepeat_freq_month: \"חודש\",\r\n\t\trepeat_freq_year: \"שנה\",\r\n\t\trepeat_on_date: \"בתאריך\",\r\n\t\trepeat_ends: \"מסתיים\",\r\n\r\n\t\tmonth_for_recurring: [\"ינואר\", \"פברואר\", \"מרץ\", \"אפריל\", \"מאי\", \"יוני\", \"יולי\", \"אוגוסט\", \"ספטמבר\", \"אוקטובר\", \"נובמבר\", \"דצמבר\"],\r\n\t\tday_for_recurring: [\"ראשון\", \"שני\", \"שלישי\", \"רביעי\", \"חמישי\", \"שישי\", \"שבת\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Január\", \"Február\", \"Március\", \"Április\", \"Május\", \"Június\", \"Július\", \"Augusztus\", \"Szeptember\", \"Október\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Már\", \"Ápr\", \"Máj\", \"Jún\", \"Júl\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Vasárnap\", \"Hétfõ\", \"Kedd\", \"Szerda\", \"Csütörtök\", \"Péntek\", \"szombat\"],\r\n\t\tday_short: [\"Va\", \"Hé\", \"Ke\", \"Sze\", \"Csü\", \"Pé\", \"Szo\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Ma\",\r\n\t\tday_tab: \"Nap\",\r\n\t\tweek_tab: \"Hét\",\r\n\t\tmonth_tab: \"Hónap\",\r\n\t\tnew_event: \"Új esemény\",\r\n\t\ticon_save: \"Mentés\",\r\n\t\ticon_cancel: \"Mégse\",\r\n\t\ticon_details: \"Részletek\",\r\n\t\ticon_edit: \"Szerkesztés\",\r\n\t\ticon_delete: \"Törlés\",\r\n\t\tconfirm_closing: \"\", //A változások elvesznek, biztosan folytatja? \"\r\n\t\tconfirm_deleting: \"Az esemény törölve lesz, biztosan folytatja?\",\r\n\t\tsection_description: \"Leírás\",\r\n\t\tsection_time: \"Idõszak\",\r\n\t\tfull_day: \"Egesz napos\",\r\n\r\n\t\t/*ismétlõdõ események*/\r\n\t\tconfirm_recurring: \"Biztosan szerkeszteni akarod az összes ismétlõdõ esemény beállítását?\",\r\n\t\tsection_recurring: \"Esemény ismétlése\",\r\n\t\tbutton_recurring: \"Tiltás\",\r\n\t\tbutton_recurring_open: \"Engedélyezés\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Szerkesztés bíróság\",\r\n\r\n\t\t/*napirendi nézet*/\r\n\t\tagenda_tab: \"Napirend\",\r\n\t\tdate: \"Dátum\",\r\n\t\tdescription: \"Leírás\",\r\n\r\n\t\t/*éves nézet*/\r\n\t\tyear_tab: \"Év\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Napi\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Heti\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Havi\",\r\n\t\trepeat_radio_year: \"Éves\",\r\n\t\trepeat_radio_day_type: \"Minden\",\r\n\t\trepeat_text_day_count: \"nap\",\r\n\t\trepeat_radio_day_type2: \"Minden munkanap\",\r\n\t\trepeat_week: \" Ismételje meg minden\",\r\n\t\trepeat_text_week_count: \"héten a következő napokon:\",\r\n\t\trepeat_radio_month_type: \"Ismétlés\",\r\n\t\trepeat_radio_month_start: \"Ekkor\",\r\n\t\trepeat_text_month_day: \"nap minden\",\r\n\t\trepeat_text_month_count: \"hónapban\",\r\n\t\trepeat_text_month_count2_before: \"minden\",\r\n\t\trepeat_text_month_count2_after: \"hónapban\",\r\n\t\trepeat_year_label: \"Ekkor\",\r\n\t\tselect_year_day2: \"-án/-én\",\r\n\t\trepeat_text_year_day: \"nap\",\r\n\t\tselect_year_month: \"hónap\",\r\n\t\trepeat_radio_end: \"Nincs befejezési dátum\",\r\n\t\trepeat_text_occurences_count: \"esemény\",\r\n\t\trepeat_radio_end2: \"Után\",\r\n\t\trepeat_radio_end3: \"Befejező dátum\",\r\n\r\n\t\trepeat_never: \"Soha\",\r\n\t\trepeat_daily: \"Minden nap\",\r\n\t\trepeat_workdays: \"Minden munkanap\",\r\n\t\trepeat_weekly: \"Minden héten\",\r\n\t\trepeat_monthly: \"Minden hónapban\",\r\n\t\trepeat_yearly: \"Minden évben\",\r\n\t\trepeat_custom: \"Egyedi\",\r\n\t\trepeat_freq_day: \"Nap\",\r\n\t\trepeat_freq_week: \"Hét\",\r\n\t\trepeat_freq_month: \"Hónap\",\r\n\t\trepeat_freq_year: \"Év\",\r\n\t\trepeat_on_date: \"Dátum szerint\",\r\n\t\trepeat_ends: \"Befejeződik\",\r\n\r\n\t\tmonth_for_recurring: [\"Január\", \"Február\", \"Március\", \"Április\", \"Május\", \"Június\", \"Július\", \"Augusztus\", \"Szeptember\", \"Október\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Vasárnap\", \"Hétfő\", \"Kedd\", \"Szerda\", \"Csütörtök\", \"Péntek\", \"Szombat\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Maret\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Agustus\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mei\", \"Jun\", \"Jul\", \"Ags\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Minggu\", \"Senin\", \"Selasa\", \"Rabu\", \"Kamis\", \"Jumat\", \"Sabtu\"],\r\n\t\tday_short: [\"Ming\", \"Sen\", \"Sel\", \"Rab\", \"Kam\", \"Jum\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hari Ini\",\r\n\t\tday_tab: \"Hari\",\r\n\t\tweek_tab: \"Minggu\",\r\n\t\tmonth_tab: \"Bulan\",\r\n\t\tnew_event: \"Acara Baru\",\r\n\t\ticon_save: \"Simpan\",\r\n\t\ticon_cancel: \"Batal\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edit\",\r\n\t\ticon_delete: \"Hapus\",\r\n\t\tconfirm_closing: \"\", /*Perubahan tidak akan disimpan ?*/\r\n\t\tconfirm_deleting: \"Acara akan dihapus\",\r\n\t\tsection_description: \"Keterangan\",\r\n\t\tsection_time: \"Periode\",\r\n\t\tfull_day: \"Hari penuh\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Apakah acara ini akan berulang?\",\r\n\t\tsection_recurring: \"Acara Rutin\",\r\n\t\tbutton_recurring: \"Tidak Difungsikan\",\r\n\t\tbutton_recurring_open: \"Difungsikan\",\r\n\t\tbutton_edit_series: \"Mengedit seri\",\r\n\t\tbutton_edit_occurrence: \"Mengedit salinan\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Tanggal\",\r\n\t\tdescription: \"Keterangan\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Tahun\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabel\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Harian\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Mingguan\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Bulanan\",\r\n\t\trepeat_radio_year: \"Tahunan\",\r\n\t\trepeat_radio_day_type: \"Setiap\",\r\n\t\trepeat_text_day_count: \"hari\",\r\n\t\trepeat_radio_day_type2: \"Setiap hari kerja\",\r\n\t\trepeat_week: \" Ulangi setiap\",\r\n\t\trepeat_text_week_count: \"minggu pada hari berikut:\",\r\n\t\trepeat_radio_month_type: \"Ulangi\",\r\n\t\trepeat_radio_month_start: \"Pada\",\r\n\t\trepeat_text_month_day: \"hari setiap\",\r\n\t\trepeat_text_month_count: \"bulan\",\r\n\t\trepeat_text_month_count2_before: \"setiap\",\r\n\t\trepeat_text_month_count2_after: \"bulan\",\r\n\t\trepeat_year_label: \"Pada\",\r\n\t\tselect_year_day2: \"dari\",\r\n\t\trepeat_text_year_day: \"hari\",\r\n\t\tselect_year_month: \"bulan\",\r\n\t\trepeat_radio_end: \"Tanpa tanggal akhir\",\r\n\t\trepeat_text_occurences_count: \"kejadian\",\r\n\t\trepeat_radio_end2: \"Setelah\",\r\n\t\trepeat_radio_end3: \"Berakhir pada\",\r\n\r\n\t\trepeat_never: \"Tidak pernah\",\r\n\t\trepeat_daily: \"Setiap hari\",\r\n\t\trepeat_workdays: \"Setiap hari kerja\",\r\n\t\trepeat_weekly: \"Setiap minggu\",\r\n\t\trepeat_monthly: \"Setiap bulan\",\r\n\t\trepeat_yearly: \"Setiap tahun\",\r\n\t\trepeat_custom: \"Kustom\",\r\n\t\trepeat_freq_day: \"Hari\",\r\n\t\trepeat_freq_week: \"Minggu\",\r\n\t\trepeat_freq_month: \"Bulan\",\r\n\t\trepeat_freq_year: \"Tahun\",\r\n\t\trepeat_on_date: \"Pada tanggal\",\r\n\t\trepeat_ends: \"Berakhir\",\r\n\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Maret\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Agustus\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tday_for_recurring: [\"Minggu\", \"Senin\", \"Selasa\", \"Rabu\", \"Kamis\", \"Jumat\", \"Sabtu\"]\r\n\t}\r\n};","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Gennaio\", \"Febbraio\", \"Marzo\", \"Aprile\", \"Maggio\", \"Giugno\", \"Luglio\", \"Agosto\", \"Settembre\", \"Ottobre\", \"Novembre\", \"Dicembre\"],\r\n\t\tmonth_short: [\"Gen\", \"Feb\", \"Mar\", \"Apr\", \"Mag\", \"Giu\", \"Lug\", \"Ago\", \"Set\", \"Ott\", \"Nov\", \"Dic\"],\r\n\t\tday_full: [\"Domenica\", \"Lunedì\", \"Martedì\", \"Mercoledì\", \"Giovedì\", \"Venerdì\", \"Sabato\"],\r\n\t\tday_short: [\"Dom\", \"Lun\", \"Mar\", \"Mer\", \"Gio\", \"Ven\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Oggi\",\r\n\t\tday_tab: \"Giorno\",\r\n\t\tweek_tab: \"Settimana\",\r\n\t\tmonth_tab: \"Mese\",\r\n\t\tnew_event: \"Nuovo evento\",\r\n\t\ticon_save: \"Salva\",\r\n\t\ticon_cancel: \"Chiudi\",\r\n\t\ticon_details: \"Dettagli\",\r\n\t\ticon_edit: \"Modifica\",\r\n\t\ticon_delete: \"Elimina\",\r\n\t\tconfirm_closing: \"\", //Le modifiche apportate saranno perse, siete sicuri?\r\n\t\tconfirm_deleting: \"L'evento sarà eliminato, siete sicuri?\",\r\n\t\tsection_description: \"Descrizione\",\r\n\t\tsection_time: \"Periodo di tempo\",\r\n\t\tfull_day: \"Intera giornata\",\r\n\r\n\t\tconfirm_recurring: \"Vuoi modificare l'intera serie di eventi?\",\r\n\t\tsection_recurring: \"Ripetere l'evento\",\r\n\t\tbutton_recurring: \"Disattivato\",\r\n\t\tbutton_recurring_open: \"Attivato\",\r\n\t\tbutton_edit_series: \"Modificare la serie\",\r\n\t\tbutton_edit_occurrence: \"Modificare una copia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descrizione\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Anno\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Griglia\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Quotidiano\",\r\n\t\trepeat_radio_week: \"Settimanale\",\r\n\t\trepeat_radio_month: \"Mensile\",\r\n\t\trepeat_radio_year: \"Annuale\",\r\n\t\trepeat_radio_day_type: \"Ogni\",\r\n\t\trepeat_text_day_count: \"giorno\",\r\n\t\trepeat_radio_day_type2: \"Ogni giornata lavorativa\",\r\n\t\trepeat_week: \" Ripetere ogni\",\r\n\t\trepeat_text_week_count: \"settimana:\",\r\n\t\trepeat_radio_month_type: \"Ripetere\",\r\n\t\trepeat_radio_month_start: \"Il\",\r\n\t\trepeat_text_month_day: \"giorno ogni\",\r\n\t\trepeat_text_month_count: \"mese\",\r\n\t\trepeat_text_month_count2_before: \"ogni\",\r\n\t\trepeat_text_month_count2_after: \"mese\",\r\n\t\trepeat_year_label: \"Il\",\r\n\t\tselect_year_day2: \"del\",\r\n\t\trepeat_text_year_day: \"giorno\",\r\n\t\tselect_year_month: \"mese\",\r\n\t\trepeat_radio_end: \"Senza data finale\",\r\n\t\trepeat_text_occurences_count: \"occorenze\",\r\n\t\trepeat_radio_end3: \"Fine\",\r\n\t\trepeat_radio_end2: \"Dopo\",\r\n\r\n\t\trepeat_never: \"Mai\",\r\n\t\trepeat_daily: \"Ogni giorno\",\r\n\t\trepeat_workdays: \"Ogni giorno feriale\",\r\n\t\trepeat_weekly: \"Ogni settimana\",\r\n\t\trepeat_monthly: \"Ogni mese\",\r\n\t\trepeat_yearly: \"Ogni anno\",\r\n\t\trepeat_custom: \"Personalizzato\",\r\n\t\trepeat_freq_day: \"Giorno\",\r\n\t\trepeat_freq_week: \"Settimana\",\r\n\t\trepeat_freq_month: \"Mese\",\r\n\t\trepeat_freq_year: \"Anno\",\r\n\t\trepeat_on_date: \"Alla data\",\r\n\t\trepeat_ends: \"Finisce\",\r\n\r\n\t\tmonth_for_recurring: [\"Gennaio\", \"Febbraio\", \"Marzo\", \"Aprile\", \"Maggio\", \"Jiugno\", \"Luglio\", \"Agosto\", \"Settembre\", \"Ottobre\", \"Novembre\", \"Dicembre\"],\r\n\t\tday_for_recurring: [\"Domenica\", \"Lunedì\", \"Martedì\", \"Mercoledì\", \"Jovedì\", \"Venerdì\", \"Sabato\"]\r\n\t}\r\n};\r\n","/*\r\n Translation by Genexus Japan Inc.\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tmonth_short: [ \"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_full: [\"日曜日\", \"月曜日\", \"火曜日\", \"水曜日\", \"木曜日\", \"金曜日\", \"土曜日\"],\r\n\t\tday_short: [\"日\", \"月\", \"火\", \"水\", \"木\", \"金\", \"土\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"今日\",\r\n\t\tday_tab: \"日\",\r\n\t\tweek_tab: \"週\",\r\n\t\tmonth_tab: \"月\",\r\n\t\tnew_event: \"新イベント\",\r\n\t\ticon_save: \"保存\",\r\n\t\ticon_cancel: \"キャンセル\",\r\n\t\ticon_details: \"詳細\",\r\n\t\ticon_edit: \"編集\",\r\n\t\ticon_delete: \"削除\",\r\n\t\tconfirm_closing: \"\", //変更が取り消されます、宜しいですか?\r\n\t\tconfirm_deleting: \"イベント完全に削除されます、宜しいですか?\",\r\n\t\tsection_description: \"デスクリプション\",\r\n\t\tsection_time: \"期間\",\r\n\t\tconfirm_recurring: \"繰り返されているイベントを全て編集しますか?\",\r\n\t\tsection_recurring: \"イベントを繰り返す\",\r\n\t\tbutton_recurring: \"無効\",\r\n\t\tbutton_recurring_open: \"有効\",\r\n\t\tfull_day: \"終日\",\r\n\t\tbutton_edit_series: \"シリーズを編集します\",\r\n\t\tbutton_edit_occurrence: \"コピーを編集\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"議題は\",\r\n\t\tdate: \"日付\",\r\n\t\tdescription: \"説明\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"今年\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"議題は\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"グリッド\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"毎日\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"毎週\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"毎月\",\r\n\t\trepeat_radio_year: \"毎年\",\r\n\t\trepeat_radio_day_type: \"毎\",\r\n\t\trepeat_text_day_count: \"日\",\r\n\t\trepeat_radio_day_type2: \"毎営業日\",\r\n\t\trepeat_week: \" 繰り返し毎\",\r\n\t\trepeat_text_week_count: \"週 次の日:\",\r\n\t\trepeat_radio_month_type: \"繰り返し\",\r\n\t\trepeat_radio_month_start: \"オン\",\r\n\t\trepeat_text_month_day: \"日毎\",\r\n\t\trepeat_text_month_count: \"月\",\r\n\t\trepeat_text_month_count2_before: \"毎\",\r\n\t\trepeat_text_month_count2_after: \"月\",\r\n\t\trepeat_year_label: \"オン\",\r\n\t\tselect_year_day2: \"の\",\r\n\t\trepeat_text_year_day: \"日\",\r\n\t\tselect_year_month: \"月\",\r\n\t\trepeat_radio_end: \"終了日なし\",\r\n\t\trepeat_text_occurences_count: \"回数\",\r\n\t\trepeat_radio_end2: \"後\",\r\n\t\trepeat_radio_end3: \"終了日まで\",\r\n\r\n\t\trepeat_never: \"決して\",\r\n\t\trepeat_daily: \"毎日\",\r\n\t\trepeat_workdays: \"毎営業日\",\r\n\t\trepeat_weekly: \"毎週\",\r\n\t\trepeat_monthly: \"毎月\",\r\n\t\trepeat_yearly: \"毎年\",\r\n\t\trepeat_custom: \"カスタム\",\r\n\t\trepeat_freq_day: \"日\",\r\n\t\trepeat_freq_week: \"週\",\r\n\t\trepeat_freq_month: \"月\",\r\n\t\trepeat_freq_year: \"年\",\r\n\t\trepeat_on_date: \"日にち\",\r\n\t\trepeat_ends: \"終了\",\r\n\r\n\t\tmonth_for_recurring: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_for_recurring: [\"日曜日\", \"月曜日\", \"火曜日\", \"水曜日\", \"木曜日\", \"金曜日\", \"土曜日\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default class LocaleManager{\r\n\tconstructor(config){\r\n\t\tthis._locales = {};\r\n\t\tfor(const i in config){\r\n\t\t\tthis._locales[i] = config[i];\r\n\t\t}\r\n\t}\r\n\r\n\taddLocale(name, locale) {\r\n\t\tthis._locales[name] = locale;\r\n\t}\r\n\r\n\tgetLocale(name) {\r\n\t\treturn this._locales[name];\r\n\t}\r\n}","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Mon\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"I dag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uke\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny hendelse\",\r\n\t\ticon_save: \"Lagre\",\r\n\t\ticon_cancel: \"Avbryt\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Rediger\",\r\n\t\ticon_delete: \"Slett\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Hendelsen vil bli slettet permanent. Er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du forandre hele dette settet av repeterende hendelser?\",\r\n\t\tsection_recurring: \"Repeter hendelsen\",\r\n\t\tbutton_recurring: \"Av\",\r\n\t\tbutton_recurring_open: \"På\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Redigere en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\",\r\n\t\trepeat_radio_week: \"Ukentlig\",\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Alle hverdager\",\r\n\t\trepeat_week: \" Gjentas hver\",\r\n\t\trepeat_text_week_count: \"uke på:\",\r\n\t\trepeat_radio_month_type: \"På hver\",\r\n\t\trepeat_radio_month_start: \"På\",\r\n\t\trepeat_text_month_day: \"dag hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"på\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Ingen sluttdato\",\r\n\t\trepeat_text_occurences_count: \"forekomst\",\r\n\t\trepeat_radio_end3: \"Stop den\",\r\n\t\trepeat_radio_end2: \"Etter\",\r\n\r\n\t\trepeat_never: \"Aldri\",\r\n\t\trepeat_daily: \"Hver dag\",\r\n\t\trepeat_workdays: \"Hver ukedag\",\r\n\t\trepeat_weekly: \"Hver uke\",\r\n\t\trepeat_monthly: \"Hver måned\",\r\n\t\trepeat_yearly: \"Hvert år\",\r\n\t\trepeat_custom: \"Tilpasset\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Uke\",\r\n\t\trepeat_freq_month: \"Måned\",\r\n\t\trepeat_freq_year: \"År\",\r\n\t\trepeat_on_date: \"På dato\",\r\n\t\trepeat_ends: \"Slutter\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tday_for_recurring: [\"Sondag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Maart\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Augustus\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"mrt\", \"Apr\", \"Mei\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Zondag\", \"Maandag\", \"Dinsdag\", \"Woensdag\", \"Donderdag\", \"Vrijdag\", \"Zaterdag\"],\r\n\t\tday_short: [\"Zo\", \"Ma\", \"Di\", \"Wo\", \"Do\", \"Vr\", \"Za\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Vandaag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Week\",\r\n\t\tmonth_tab: \"Maand\",\r\n\t\tnew_event: \"Nieuw item\",\r\n\t\ticon_save: \"Opslaan\",\r\n\t\ticon_cancel: \"Annuleren\",\r\n\t\ticon_details: \"Details\",\r\n\t\ticon_edit: \"Bewerken\",\r\n\t\ticon_delete: \"Verwijderen\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Item zal permanent worden verwijderd, doorgaan?\",\r\n\t\tsection_description: \"Beschrijving\",\r\n\t\tsection_time: \"Tijd periode\",\r\n\t\tfull_day: \"Hele dag\",\r\n\r\n\t\tconfirm_recurring: \"Wilt u alle terugkerende items bijwerken?\",\r\n\t\tsection_recurring: \"Item herhalen\",\r\n\t\tbutton_recurring: \"Uit\",\r\n\t\tbutton_recurring_open: \"Aan\",\r\n\t\tbutton_edit_series: \"Bewerk de serie\",\r\n\t\tbutton_edit_occurrence: \"Bewerk een kopie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Omschrijving\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Jaar\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabel\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dagelijks\",\r\n\t\trepeat_radio_week: \"Wekelijks\",\r\n\t\trepeat_radio_month: \"Maandelijks\",\r\n\t\trepeat_radio_year: \"Jaarlijks\",\r\n\t\trepeat_radio_day_type: \"Elke\",\r\n\t\trepeat_text_day_count: \"dag(en)\",\r\n\t\trepeat_radio_day_type2: \"Elke werkdag\",\r\n\t\trepeat_week: \" Herhaal elke\",\r\n\t\trepeat_text_week_count: \"week op de volgende dagen:\",\r\n\t\trepeat_radio_month_type: \"Herhaal\",\r\n\t\trepeat_radio_month_start: \"Op\",\r\n\t\trepeat_text_month_day: \"dag iedere\",\r\n\t\trepeat_text_month_count: \"maanden\",\r\n\t\trepeat_text_month_count2_before: \"iedere\",\r\n\t\trepeat_text_month_count2_after: \"maanden\",\r\n\t\trepeat_year_label: \"Op\",\r\n\t\tselect_year_day2: \"van\",\r\n\t\trepeat_text_year_day: \"dag\",\r\n\t\tselect_year_month: \"maand\",\r\n\t\trepeat_radio_end: \"Geen eind datum\",\r\n\t\trepeat_text_occurences_count: \"keren\",\r\n\t\trepeat_radio_end3: \"Eindigd per\",\r\n\t\trepeat_radio_end2: \"Na\",\r\n\r\n\t\trepeat_never: \"Nooit\",\r\n\t\trepeat_daily: \"Elke dag\",\r\n\t\trepeat_workdays: \"Elke werkdag\",\r\n\t\trepeat_weekly: \"Elke week\",\r\n\t\trepeat_monthly: \"Elke maand\",\r\n\t\trepeat_yearly: \"Elk jaar\",\r\n\t\trepeat_custom: \"Aangepast\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Week\",\r\n\t\trepeat_freq_month: \"Maand\",\r\n\t\trepeat_freq_year: \"Jaar\",\r\n\t\trepeat_on_date: \"Op datum\",\r\n\t\trepeat_ends: \"Eindigt\",\r\n\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Maart\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Augustus\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Zondag\", \"Maandag\", \"Dinsdag\", \"Woensdag\", \"Donderdag\", \"Vrijdag\", \"Zaterdag\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Man\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uke\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny\",\r\n\t\ticon_save: \"Lagre\",\r\n\t\ticon_cancel: \"Avbryt\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Endre\",\r\n\t\ticon_delete: \"Slett\",\r\n\t\tconfirm_closing: \"Endringer blir ikke lagret, er du sikker?\", //Endringer blir ikke lagret, er du sikker?\r\n\t\tconfirm_deleting: \"Oppføringen vil bli slettet, er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\t\tfull_day: \"Full dag\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du endre hele settet med repeterende oppføringer?\",\r\n\t\tsection_recurring: \"Repeterende oppføring\",\r\n\t\tbutton_recurring: \"Ikke aktiv\",\r\n\t\tbutton_recurring_open: \"Aktiv\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Redigere en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Ukentlig\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Hver arbeidsdag\",\r\n\t\trepeat_week: \" Gjenta hver\",\r\n\t\trepeat_text_week_count: \"uke neste dager:\",\r\n\t\trepeat_radio_month_type: \"Gjenta\",\r\n\t\trepeat_radio_month_start: \"På\",\r\n\t\trepeat_text_month_day: \"dag hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"På\",\r\n\t\tselect_year_day2: \"av\",\r\n\t\trepeat_text_year_day: \"dag\",\r\n\t\tselect_year_month: \"måned\",\r\n\t\trepeat_radio_end: \"Ingen sluttdato\",\r\n\t\trepeat_text_occurences_count: \"forekomster\",\r\n\t\trepeat_radio_end2: \"Etter\",\r\n\t\trepeat_radio_end3: \"Slutt innen\",\r\n\r\n\t\trepeat_never: \"Aldri\",\r\n\t\trepeat_daily: \"Hver dag\",\r\n\t\trepeat_workdays: \"Hver ukedag\",\r\n\t\trepeat_weekly: \"Hver uke\",\r\n\t\trepeat_monthly: \"Hver måned\",\r\n\t\trepeat_yearly: \"Hvert år\",\r\n\t\trepeat_custom: \"Tilpasset\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Uke\",\r\n\t\trepeat_freq_month: \"Måned\",\r\n\t\trepeat_freq_year: \"År\",\r\n\t\trepeat_on_date: \"På dato\",\r\n\t\trepeat_ends: \"Slutter\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tday_for_recurring: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Styczeń\", \"Luty\", \"Marzec\", \"Kwiecień\", \"Maj\", \"Czerwiec\", \"Lipiec\", \"Sierpień\", \"Wrzesień\", \"Październik\", \"Listopad\", \"Grudzień\"],\r\n\t\tmonth_short: [\"Sty\", \"Lut\", \"Mar\", \"Kwi\", \"Maj\", \"Cze\", \"Lip\", \"Sie\", \"Wrz\", \"Paź\", \"Lis\", \"Gru\"],\r\n\t\tday_full: [\"Niedziela\", \"Poniedziałek\", \"Wtorek\", \"Środa\", \"Czwartek\", \"Piątek\", \"Sobota\"],\r\n\t\tday_short: [\"Nie\", \"Pon\", \"Wto\", \"Śro\", \"Czw\", \"Pią\", \"Sob\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dziś\",\r\n\t\tday_tab: \"Dzień\",\r\n\t\tweek_tab: \"Tydzień\",\r\n\t\tmonth_tab: \"Miesiąc\",\r\n\t\tnew_event: \"Nowe zdarzenie\",\r\n\t\ticon_save: \"Zapisz\",\r\n\t\ticon_cancel: \"Anuluj\",\r\n\t\ticon_details: \"Szczegóły\",\r\n\t\ticon_edit: \"Edytuj\",\r\n\t\ticon_delete: \"Usuń\",\r\n\t\tconfirm_closing: \"\", //Zmiany zostaną usunięte, jesteś pewien?\r\n\t\tconfirm_deleting: \"Zdarzenie zostanie usunięte na zawsze, kontynuować?\",\r\n\t\tsection_description: \"Opis\",\r\n\t\tsection_time: \"Okres czasu\",\r\n\t\tfull_day: \"Cały dzień\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Czy chcesz edytować cały zbiór powtarzających się zdarzeń?\",\r\n\t\tsection_recurring: \"Powtórz zdarzenie\",\r\n\t\tbutton_recurring: \"Nieaktywne\",\r\n\t\tbutton_recurring_open: \"Aktywne\",\r\n\t\tbutton_edit_series: \"Edytuj serię\",\r\n\t\tbutton_edit_occurrence: \"Edytuj kopię\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Opis\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabela\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Codziennie\",\r\n\t\trepeat_radio_week: \"Co tydzie\",\r\n\t\trepeat_radio_month: \"Co miesic\",\r\n\t\trepeat_radio_year: \"Co rok\",\r\n\t\trepeat_radio_day_type: \"Kadego\",\r\n\t\trepeat_text_day_count: \"dnia\",\r\n\t\trepeat_radio_day_type2: \"Kadego dnia roboczego\",\r\n\t\trepeat_week: \" Powtarzaj kadego\",\r\n\t\trepeat_text_week_count: \"tygodnia w dni:\",\r\n\t\trepeat_radio_month_type: \"Powtrz\",\r\n\t\trepeat_radio_month_start: \"W\",\r\n\t\trepeat_text_month_day: \"dnia kadego\",\r\n\t\trepeat_text_month_count: \"miesica\",\r\n\t\trepeat_text_month_count2_before: \"kadego\",\r\n\t\trepeat_text_month_count2_after: \"miesica\",\r\n\t\trepeat_year_label: \"W\",\r\n\t\tselect_year_day2: \"miesica\",\r\n\t\trepeat_text_year_day: \"dnia miesica\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Bez daty kocowej\",\r\n\t\trepeat_text_occurences_count: \"wystpieniu/ach\",\r\n\t\trepeat_radio_end3: \"Zakocz w\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\r\n\t\trepeat_never: \"Nigdy\",\r\n\t\trepeat_daily: \"Codziennie\",\r\n\t\trepeat_workdays: \"Każdy dzień roboczy\",\r\n\t\trepeat_weekly: \"Co tydzień\",\r\n\t\trepeat_monthly: \"Co miesiąc\",\r\n\t\trepeat_yearly: \"Co rok\",\r\n\t\trepeat_custom: \"Niestandardowy\",\r\n\t\trepeat_freq_day: \"Dzień\",\r\n\t\trepeat_freq_week: \"Tydzień\",\r\n\t\trepeat_freq_month: \"Miesiąc\",\r\n\t\trepeat_freq_year: \"Rok\",\r\n\t\trepeat_on_date: \"W dniu\",\r\n\t\trepeat_ends: \"Kończy się\",\r\n\r\n\t\tmonth_for_recurring: [\"Stycznia\", \"Lutego\", \"Marca\", \"Kwietnia\", \"Maja\", \"Czerwca\", \"Lipca\", \"Sierpnia\", \"Wrzenia\", \"Padziernka\", \"Listopada\", \"Grudnia\"],\r\n\t\tday_for_recurring: [\"Niedziela\", \"Poniedziaek\", \"Wtorek\", \"roda\", \"Czwartek\", \"Pitek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","/*\r\n\r\n TRANSLATION BY MATTHEUS PIROVANI RORIZ GONЗALVES\r\n\r\n mattheusroriz@hotmail.com / mattheus.pirovani@gmail.com /\r\n\r\n www.atrixian.com.br\r\n\r\n */\r\n\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Janeiro\", \"Fevereiro\", \"Março\", \"Abril\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"],\r\n\t\tmonth_short: [\"Jan\", \"Fev\", \"Mar\", \"Abr\", \"Mai\", \"Jun\", \"Jul\", \"Ago\", \"Set\", \"Out\", \"Nov\", \"Dez\"],\r\n\t\tday_full: [\"Domingo\", \"Segunda\", \"Terça\", \"Quarta\", \"Quinta\", \"Sexta\", \"Sábado\"],\r\n\t\tday_short: [\"Dom\", \"Seg\", \"Ter\", \"Qua\", \"Qui\", \"Sex\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hoje\",\r\n\t\tday_tab: \"Dia\",\r\n\t\tweek_tab: \"Semana\",\r\n\t\tmonth_tab: \"Mês\",\r\n\t\tnew_event: \"Novo evento\",\r\n\t\ticon_save: \"Salvar\",\r\n\t\ticon_cancel: \"Cancelar\",\r\n\t\ticon_details: \"Detalhes\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Deletar\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Tem certeza que deseja excluir?\",\r\n\t\tsection_description: \"Descrição\",\r\n\t\tsection_time: \"Período de tempo\",\r\n\t\tfull_day: \"Dia inteiro\",\r\n\r\n\t\tconfirm_recurring: \"Deseja editar todos esses eventos repetidos?\",\r\n\t\tsection_recurring: \"Repetir evento\",\r\n\t\tbutton_recurring: \"Desabilitar\",\r\n\t\tbutton_recurring_open: \"Habilitar\",\r\n\t\tbutton_edit_series: \"Editar a série\",\r\n\t\tbutton_edit_occurrence: \"Editar uma cópia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dia\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descrição\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Ano\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dia\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grade\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diário\",\r\n\t\trepeat_radio_week: \"Semanal\",\r\n\t\trepeat_radio_month: \"Mensal\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia(s)\",\r\n\t\trepeat_radio_day_type2: \"Cada trabalho diário\",\r\n\t\trepeat_week: \" Repita cada\",\r\n\t\trepeat_text_week_count: \"semana:\",\r\n\t\trepeat_radio_month_type: \"Repetir\",\r\n\t\trepeat_radio_month_start: \"Em\",\r\n\t\trepeat_text_month_day: \"todo dia\",\r\n\t\trepeat_text_month_count: \"mês\",\r\n\t\trepeat_text_month_count2_before: \"todo\",\r\n\t\trepeat_text_month_count2_after: \"mês\",\r\n\t\trepeat_year_label: \"Em\",\r\n\t\tselect_year_day2: \"of\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mês\",\r\n\t\trepeat_radio_end: \"Sem data final\",\r\n\t\trepeat_text_occurences_count: \"ocorrências\",\r\n\t\trepeat_radio_end3: \"Fim\",\r\n\t\trepeat_radio_end2: \"Depois\",\r\n\r\n\t\trepeat_never: \"Nunca\",\r\n\t\trepeat_daily: \"Todos os dias\",\r\n\t\trepeat_workdays: \"Todos os dias úteis\",\r\n\t\trepeat_weekly: \"Toda semana\",\r\n\t\trepeat_monthly: \"Todo mês\",\r\n\t\trepeat_yearly: \"Todo ano\",\r\n\t\trepeat_custom: \"Personalizado\",\r\n\t\trepeat_freq_day: \"Dia\",\r\n\t\trepeat_freq_week: \"Semana\",\r\n\t\trepeat_freq_month: \"Mês\",\r\n\t\trepeat_freq_year: \"Ano\",\r\n\t\trepeat_on_date: \"Na data\",\r\n\t\trepeat_ends: \"Termina\",\r\n\r\n\t\tmonth_for_recurring: [\"Janeiro\", \"Fevereiro\", \"Março\", \"Abril\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"],\r\n\t\tday_for_recurring: [\"Domingo\", \"Segunda\", \"Terça\", \"Quarta\", \"Quinta\", \"Sexta\", \"Sábado\"]\r\n\t}\r\n};\r\n\r\n\r\n","/*\r\n\tTraducere de Ovidiu Lixandru: http://www.madball.ro\r\n */\r\n\r\nexport default {\r\n\tdate:{\r\n\t\tmonth_full:[\"Ianuarie\", \"Februarie\", \"Martie\", \"Aprilie\", \"Mai\", \"Iunie\", \"Iulie\", \"August\", \"Septembrie\", \"Octombrie\", \"November\", \"December\"],\r\n\t\tmonth_short:[\"Ian\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Iun\", \"Iul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n\t\tday_full:[\"Duminica\", \"Luni\", \"Marti\", \"Miercuri\", \"Joi\", \"Vineri\", \"Sambata\"],\r\n\t\tday_short:[\"Du\", \"Lu\", \"Ma\", \"Mi\", \"Jo\", \"Vi\", \"Sa\"]\r\n\t},\r\n\tlabels:{\r\n\t\tdhx_cal_today_button:\"Astazi\",\r\n\t\tday_tab:\"Zi\",\r\n\t\tweek_tab:\"Saptamana\",\r\n\t\tmonth_tab:\"Luna\",\r\n\t\tnew_event:\"Eveniment nou\",\r\n\t\ticon_save:\"Salveaza\",\r\n\t\ticon_cancel:\"Anuleaza\",\r\n\t\ticon_details:\"Detalii\",\r\n\t\ticon_edit:\"Editeaza\",\r\n\t\ticon_delete:\"Sterge\",\r\n\t\tconfirm_closing:\"Schimbarile nu vor fi salvate, esti sigur?\",//Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting:\"Evenimentul va fi sters permanent, esti sigur?\",\r\n\t\tsection_description:\"Descriere\",\r\n\t\tsection_time:\"Interval\",\r\n\t\tfull_day:\"Toata ziua\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring:\"Vrei sa editezi toata seria de evenimente repetate?\",\r\n\t\tsection_recurring:\"Repetare\",\r\n\t\tbutton_recurring:\"Dezactivata\",\r\n\t\tbutton_recurring_open:\"Activata\",\r\n\t\tbutton_edit_series: \"Editeaza serie\",\r\n\t\tbutton_edit_occurrence: \"Editeaza doar intrare\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"Agenda\",\r\n\t\tdate:\"Data\",\r\n\t\tdescription:\"Descriere\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"An\",\r\n\r\n\t\t/* week agenda extension */\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Lista\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Zilnic\",\r\n\t\trepeat_radio_week: \"Saptamanal\",\r\n\t\trepeat_radio_month: \"Lunar\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"La fiecare\",\r\n\t\trepeat_text_day_count: \"zi(le)\",\r\n\t\trepeat_radio_day_type2: \"Fiecare zi lucratoare\",\r\n\t\trepeat_week: \" Repeta la fiecare\",\r\n\t\trepeat_text_week_count: \"saptamana in urmatoarele zile:\",\r\n\t\trepeat_radio_month_type: \"Repeta in\",\r\n\t\trepeat_radio_month_start: \"In a\",\r\n\t\trepeat_text_month_day: \"zi la fiecare\",\r\n\t\trepeat_text_month_count: \"luni\",\r\n\t\trepeat_text_month_count2_before: \"la fiecare\",\r\n\t\trepeat_text_month_count2_after: \"luni\",\r\n\t\trepeat_year_label: \"In\",\r\n\t\tselect_year_day2: \"a lunii\",\r\n\t\trepeat_text_year_day: \"zi a lunii\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Fara data de sfarsit\",\r\n\t\trepeat_text_occurences_count: \"evenimente\",\r\n\t\trepeat_radio_end3: \"La data\",\r\n\t\trepeat_radio_end2: \"Dupa\",\r\n\r\n\t\trepeat_never: \"Niciodată\",\r\n\t\trepeat_daily: \"În fiecare zi\",\r\n\t\trepeat_workdays: \"În fiecare zi lucrătoare\",\r\n\t\trepeat_weekly: \"În fiecare săptămână\",\r\n\t\trepeat_monthly: \"În fiecare lună\",\r\n\t\trepeat_yearly: \"În fiecare an\",\r\n\t\trepeat_custom: \"Personalizat\",\r\n\t\trepeat_freq_day: \"Zi\",\r\n\t\trepeat_freq_week: \"Săptămână\",\r\n\t\trepeat_freq_month: \"Lună\",\r\n\t\trepeat_freq_year: \"An\",\r\n\t\trepeat_on_date: \"La data\",\r\n\t\trepeat_ends: \"Se termină\",\r\n\r\n\t\tmonth_for_recurring: [\"Ianuarie\", \"Februarie\", \"Martie\", \"Aprilie\", \"Mai\", \"Iunie\", \"Iulie\", \"August\", \"Septembrie\", \"Octombrie\", \"Noiembrie\", \"Decembrie\"],\r\n\t\tday_for_recurring: [\"Duminica\", \"Luni\", \"Marti\", \"Miercuri\", \"Joi\", \"Vineri\", \"Sambata\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Январь\", \"Февраль\", \"Март\", \"Апрель\", \"Maй\", \"Июнь\", \"Июль\", \"Август\", \"Сентябрь\", \"Oктябрь\", \"Ноябрь\", \"Декабрь\"],\r\n\t\tmonth_short: [\"Янв\", \"Фев\", \"Maр\", \"Aпр\", \"Maй\", \"Июн\", \"Июл\", \"Aвг\", \"Сен\", \"Окт\", \"Ноя\", \"Дек\"],\r\n\t\tday_full: [ \"Воскресенье\", \"Понедельник\", \"Вторник\", \"Среда\", \"Четверг\", \"Пятница\", \"Суббота\"],\r\n\t\tday_short: [\"Вс\", \"Пн\", \"Вт\", \"Ср\", \"Чт\", \"Пт\", \"Сб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сегодня\",\r\n\t\tday_tab: \"День\",\r\n\t\tweek_tab: \"Неделя\",\r\n\t\tmonth_tab: \"Месяц\",\r\n\t\tnew_event: \"Новое событие\",\r\n\t\ticon_save: \"Сохранить\",\r\n\t\ticon_cancel: \"Отменить\",\r\n\t\ticon_details: \"Детали\",\r\n\t\ticon_edit: \"Изменить\",\r\n\t\ticon_delete: \"Удалить\",\r\n\t\tconfirm_closing: \"\", //Ваши изменения будут потеряны, продолжить?\r\n\t\tconfirm_deleting: \"Событие будет удалено безвозвратно, продолжить?\",\r\n\t\tsection_description: \"Описание\",\r\n\t\tsection_time: \"Период времени\",\r\n\t\tfull_day: \"Весь день\",\r\n\r\n\t\tconfirm_recurring: \"Вы хотите изменить всю серию повторяющихся событий?\",\r\n\t\tsection_recurring: \"Повторение\",\r\n\t\tbutton_recurring: \"Отключено\",\r\n\t\tbutton_recurring_open: \"Включено\",\r\n\t\tbutton_edit_series: \"Редактировать серию\",\r\n\t\tbutton_edit_occurrence: \"Редактировать экземпляр\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Список\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Описание\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Год\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Список\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Таблица\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"День\",\r\n\t\trepeat_radio_week: \"Неделя\",\r\n\t\trepeat_radio_month: \"Месяц\",\r\n\t\trepeat_radio_year: \"Год\",\r\n\t\trepeat_radio_day_type: \"Каждый\",\r\n\t\trepeat_text_day_count: \"день\",\r\n\t\trepeat_radio_day_type2: \"Каждый рабочий день\",\r\n\t\trepeat_week: \" Повторять каждую\",\r\n\t\trepeat_text_week_count: \"неделю , в:\",\r\n\t\trepeat_radio_month_type: \"Повторять\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" числа каждый \",\r\n\t\trepeat_text_month_count: \"месяц\",\r\n\t\trepeat_text_month_count2_before: \"каждый \",\r\n\t\trepeat_text_month_count2_after: \"месяц\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"день\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без даты окончания\",\r\n\t\trepeat_text_occurences_count: \"повторений\",\r\n\t\trepeat_radio_end3: \"До \",\r\n\t\trepeat_radio_end2: \"\",\r\n\r\n\t\trepeat_never: \"Никогда\",\r\n\t\trepeat_daily: \"Каждый день\",\r\n\t\trepeat_workdays: \"Каждый будний день\",\r\n\t\trepeat_weekly: \"Каждую неделю\",\r\n\t\trepeat_monthly: \"Каждый месяц\",\r\n\t\trepeat_yearly: \"Каждый год\",\r\n\t\trepeat_custom: \"Настроить\",\r\n\t\trepeat_freq_day: \"День\",\r\n\t\trepeat_freq_week: \"Неделя\",\r\n\t\trepeat_freq_month: \"Месяц\",\r\n\t\trepeat_freq_year: \"Год\",\r\n\t\trepeat_on_date: \"В дату\",\r\n\t\trepeat_ends: \"Заканчивается\",\r\n\r\n\t\tmonth_for_recurring: [\"Января\", \"Февраля\", \"Марта\", \"Апреля\", \"Мая\", \"Июня\", \"Июля\", \"Августа\", \"Сентября\", \"Октября\", \"Ноября\", \"Декабря\"],\r\n\t\tday_for_recurring: [\"Воскресенье\", \"Понедельник\", \"Вторник\", \"Среду\", \"Четверг\", \"Пятницу\", \"Субботу\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Marec\", \"April\", \"Maj\", \"Junij\", \"Julij\", \"Avgust\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Nedelja\", \"Ponedeljek\", \"Torek\", \"Sreda\", \"Četrtek\", \"Petek\", \"Sobota\"],\r\n\t\tday_short: [\"Ned\", \"Pon\", \"Tor\", \"Sre\", \"Čet\", \"Pet\", \"Sob\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Danes\",\r\n\t\tday_tab: \"Dan\",\r\n\t\tweek_tab: \"Teden\",\r\n\t\tmonth_tab: \"Mesec\",\r\n\t\tnew_event: \"Nov dogodek\",\r\n\t\ticon_save: \"Shrani\",\r\n\t\ticon_cancel: \"Prekliči\",\r\n\t\ticon_details: \"Podrobnosti\",\r\n\t\ticon_edit: \"Uredi\",\r\n\t\ticon_delete: \"Izbriši\",\r\n\t\tconfirm_closing: \"\", //Spremembe ne bodo shranjene. Želite nadaljevati ?\r\n\t\tconfirm_deleting: \"Dogodek bo izbrisan. Želite nadaljevati?\",\r\n\t\tsection_description: \"Opis\",\r\n\t\tsection_time: \"Časovni okvir\",\r\n\t\tfull_day: \"Ves dan\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Želite urediti celoten set ponavljajočih dogodkov?\",\r\n\t\tsection_recurring: \"Ponovi dogodek\",\r\n\t\tbutton_recurring: \"Onemogočeno\",\r\n\t\tbutton_recurring_open: \"Omogočeno\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Edit occurrence\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Zadeva\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Opis\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Leto\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Zadeva\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Miza\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dnevno\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Tedensko\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Mesečno\",\r\n\t\trepeat_radio_year: \"Letno\",\r\n\t\trepeat_radio_day_type: \"Vsak\",\r\n\t\trepeat_text_day_count: \"dan\",\r\n\t\trepeat_radio_day_type2: \"Vsak delovni dan\",\r\n\t\trepeat_week: \" Ponavljaj vsak\",\r\n\t\trepeat_text_week_count: \"teden na naslednje dni:\",\r\n\t\trepeat_radio_month_type: \"Ponavljaj\",\r\n\t\trepeat_radio_month_start: \"Na\",\r\n\t\trepeat_text_month_day: \"dan vsak\",\r\n\t\trepeat_text_month_count: \"mesec\",\r\n\t\trepeat_text_month_count2_before: \"vsak\",\r\n\t\trepeat_text_month_count2_after: \"mesec\",\r\n\t\trepeat_year_label: \"Na\",\r\n\t\tselect_year_day2: \"od\",\r\n\t\trepeat_text_year_day: \"dan\",\r\n\t\tselect_year_month: \"mesec\",\r\n\t\trepeat_radio_end: \"Brez končnega datuma\",\r\n\t\trepeat_text_occurences_count: \"pojavitve\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\t\trepeat_radio_end3: \"Končaj do\",\r\n\r\n\t\trepeat_never: \"Nikoli\",\r\n\t\trepeat_daily: \"Vsak dan\",\r\n\t\trepeat_workdays: \"Vsak delovni dan\",\r\n\t\trepeat_weekly: \"Vsak teden\",\r\n\t\trepeat_monthly: \"Vsak mesec\",\r\n\t\trepeat_yearly: \"Vsako leto\",\r\n\t\trepeat_custom: \"Po meri\",\r\n\t\trepeat_freq_day: \"Dan\",\r\n\t\trepeat_freq_week: \"Teden\",\r\n\t\trepeat_freq_month: \"Mesec\",\r\n\t\trepeat_freq_year: \"Leto\",\r\n\t\trepeat_on_date: \"Na datum\",\r\n\t\trepeat_ends: \"Konča se\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"Marec\", \"April\", \"Maj\", \"Junij\", \"Julij\", \"Avgust\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Nedelja\", \"Ponedeljek\", \"Torek\", \"Sreda\", \"Četrtek\", \"Petek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Január\", \"Február\", \"Marec\", \"Apríl\", \"Máj\", \"Jún\", \"Júl\", \"August\", \"September\", \"Október\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Máj\", \"Jún\", \"Júl\", \"Aug\", \"Sept\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Nedeľa\", \"Pondelok\", \"Utorok\", \"Streda\", \"Štvrtok\", \"Piatok\", \"Sobota\"],\r\n\t\tday_short: [\"Ne\", \"Po\", \"Ut\", \"St\", \"Št\", \"Pi\", \"So\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dnes\",\r\n\t\tday_tab: \"Deň\",\r\n\t\tweek_tab: \"Týždeň\",\r\n\t\tmonth_tab: \"Mesiac\",\r\n\t\tnew_event: \"Nová udalosť\",\r\n\t\ticon_save: \"Uložiť\",\r\n\t\ticon_cancel: \"Späť\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edituj\",\r\n\t\ticon_delete: \"Zmazať\",\r\n\t\tconfirm_closing: \"Vaše zmeny nebudú uložené. Skutočne?\", //Vaše změny budou ztraceny, opravdu ?\r\n\t\tconfirm_deleting: \"Udalosť bude natrvalo vymazaná. Skutočne?\",\r\n\t\tsection_description: \"Poznámky\",\r\n\t\tsection_time: \"Doba platnosti\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Prajete si upraviť celú radu opakovaných udalostí?\",\r\n\t\tsection_recurring: \"Opakovanie udalosti\",\r\n\t\tbutton_recurring: \"Vypnuté\",\r\n\t\tbutton_recurring_open: \"Zapnuté\",\r\n\t\tbutton_edit_series: \"Upraviť opakovania\",\r\n\t\tbutton_edit_occurrence: \"Upraviť inštancie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Program\",\r\n\t\tdate: \"Dátum\",\r\n\t\tdescription: \"Poznámka\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\t\tfull_day: \"Celý deň\", // Full day\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Program\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Mriežka\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Denne\",\r\n\t\trepeat_radio_week: \"Týždenne\",\r\n\t\trepeat_radio_month: \"Mesaène\",\r\n\t\trepeat_radio_year: \"Roène\",\r\n\t\trepeat_radio_day_type: \"Každý\",\r\n\t\trepeat_text_day_count: \"deò\",\r\n\t\trepeat_radio_day_type2: \"Každý prac. deò\",\r\n\t\trepeat_week: \"Opakova každý\",\r\n\t\trepeat_text_week_count: \"týždeò v dòoch:\",\r\n\t\trepeat_radio_month_type: \"Opakova\",\r\n\t\trepeat_radio_month_start: \"On\",\r\n\t\trepeat_text_month_day: \"deò každý\",\r\n\t\trepeat_text_month_count: \"mesiac\",\r\n\t\trepeat_text_month_count2_before: \"každý\",\r\n\t\trepeat_text_month_count2_after: \"mesiac\",\r\n\t\trepeat_year_label: \"On\",\r\n\t\tselect_year_day2: \"poèas\",\r\n\t\trepeat_text_year_day: \"deò\",\r\n\t\tselect_year_month: \"mesiac\",\r\n\t\trepeat_radio_end: \"Bez dátumu ukonèenia\",\r\n\t\trepeat_text_occurences_count: \"udalostiach\",\r\n\t\trepeat_radio_end3: \"Ukonèi\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\r\n\t\trepeat_never: \"Nikdy\",\r\n\t\trepeat_daily: \"Každý deň\",\r\n\t\trepeat_workdays: \"Každý pracovný deň\",\r\n\t\trepeat_weekly: \"Každý týždeň\",\r\n\t\trepeat_monthly: \"Každý mesiac\",\r\n\t\trepeat_yearly: \"Každý rok\",\r\n\t\trepeat_custom: \"Vlastné\",\r\n\t\trepeat_freq_day: \"Deň\",\r\n\t\trepeat_freq_week: \"Týždeň\",\r\n\t\trepeat_freq_month: \"Mesiac\",\r\n\t\trepeat_freq_year: \"Rok\",\r\n\t\trepeat_on_date: \"Na dátum\",\r\n\t\trepeat_ends: \"Koniec\",\r\n\r\n\t\tmonth_for_recurring: [\"Január\", \"Február\", \"Marec\", \"Apríl\", \"Máj\", \"Jún\", \"Júl\", \"August\", \"September\", \"Október\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Nede¾a\", \"Pondelok\", \"Utorok\", \"Streda\", \"Štvrtok\", \"Piatok\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Mars\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"Augusti\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Söndag\", \"Måndag\", \"Tisdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lördag\"],\r\n\t\tday_short: [\"Sön\", \"Mån\", \"Tis\", \"Ons\", \"Tor\", \"Fre\", \"Lör\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Vecka\",\r\n\t\tmonth_tab: \"Månad\",\r\n\t\tnew_event: \"Ny händelse\",\r\n\t\ticon_save: \"Spara\",\r\n\t\ticon_cancel: \"Ångra\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Ändra\",\r\n\t\ticon_delete: \"Ta bort\",\r\n\t\tconfirm_closing: \"\", //Dina förändingar kommer gå förlorade, är du säker?\r\n\t\tconfirm_deleting: \"Är du säker på att du vill ta bort händelsen permanent?\",\r\n\t\tsection_description: \"Beskrivning\",\r\n\t\tsection_time: \"Tid\",\r\n\t\tfull_day: \"Hela dagen\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vill du redigera hela serien med repeterande händelser?\",\r\n\t\tsection_recurring: \"Upprepa händelse\",\r\n\t\tbutton_recurring: \"Inaktiverat\",\r\n\t\tbutton_recurring_open: \"Aktiverat\",\r\n\t\tbutton_edit_series: \"Redigera serien\",\r\n\t\tbutton_edit_occurrence: \"Redigera en kopia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dagordning\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Beskrivning\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dagordning\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Galler\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Dra för att skapa ny\",\r\n\t\tdrag_to_move:\"Dra för att flytta\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dagligen\",\r\n\t\trepeat_radio_week: \"Veckovis\",\r\n\t\trepeat_radio_month: \"Månadsvis\",\r\n\t\trepeat_radio_year: \"Årligen\",\r\n\t\trepeat_radio_day_type: \"Var\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Varje arbetsdag\",\r\n\t\trepeat_week: \" Upprepa var\",\r\n\t\trepeat_text_week_count: \"vecka dessa dagar:\",\r\n\t\trepeat_radio_month_type: \"Upprepa\",\r\n\t\trepeat_radio_month_start: \"Den\",\r\n\t\trepeat_text_month_day: \"dagen var\",\r\n\t\trepeat_text_month_count: \"månad\",\r\n\t\trepeat_text_month_count2_before: \"var\",\r\n\t\trepeat_text_month_count2_after: \"månad\",\r\n\t\trepeat_year_label: \"Den\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"månad\",\r\n\t\trepeat_radio_end: \"Inget slutdatum\",\r\n\t\trepeat_text_occurences_count: \"upprepningar\",\r\n\t\trepeat_radio_end3: \"Sluta efter\",\r\n\t\trepeat_radio_end2: \"Efter\",\r\n\r\n\t\trepeat_never: \"Aldrig\",\r\n\t\trepeat_daily: \"Varje dag\",\r\n\t\trepeat_workdays: \"Varje vardag\",\r\n\t\trepeat_weekly: \"Varje vecka\",\r\n\t\trepeat_monthly: \"Varje månad\",\r\n\t\trepeat_yearly: \"Varje år\",\r\n\t\trepeat_custom: \"Anpassad\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Vecka\",\r\n\t\trepeat_freq_month: \"Månad\",\r\n\t\trepeat_freq_year: \"År\",\r\n\t\trepeat_on_date: \"På datum\",\r\n\t\trepeat_ends: \"Slutar\",\r\n\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Mars\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"Augusti\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Söndag\", \"Måndag\", \"Tisdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lördag\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Ocak\", \"Þubat\", \"Mart\", \"Nisan\", \"Mayýs\", \"Haziran\", \"Temmuz\", \"Aðustos\", \"Eylül\", \"Ekim\", \"Kasým\", \"Aralýk\"],\r\n\t\tmonth_short: [\"Oca\", \"Þub\", \"Mar\", \"Nis\", \"May\", \"Haz\", \"Tem\", \"Aðu\", \"Eyl\", \"Eki\", \"Kas\", \"Ara\"],\r\n\t\tday_full: [\"Pazar\", \"Pazartes,\", \"Salý\", \"Çarþamba\", \"Perþembe\", \"Cuma\", \"Cumartesi\"],\r\n\t\tday_short: [\"Paz\", \"Pts\", \"Sal\", \"Çar\", \"Per\", \"Cum\", \"Cts\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Bugün\",\r\n\t\tday_tab: \"Gün\",\r\n\t\tweek_tab: \"Hafta\",\r\n\t\tmonth_tab: \"Ay\",\r\n\t\tnew_event: \"Uygun\",\r\n\t\ticon_save: \"Kaydet\",\r\n\t\ticon_cancel: \"Ýptal\",\r\n\t\ticon_details: \"Detaylar\",\r\n\t\ticon_edit: \"Düzenle\",\r\n\t\ticon_delete: \"Sil\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Etkinlik silinecek, devam?\",\r\n\t\tsection_description: \"Açýklama\",\r\n\t\tsection_time: \"Zaman aralýðý\",\r\n\t\tfull_day: \"Tam gün\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Tüm tekrar eden etkinlikler silinecek, devam?\",\r\n\t\tsection_recurring: \"Etkinliði tekrarla\",\r\n\t\tbutton_recurring: \"Pasif\",\r\n\t\tbutton_recurring_open: \"Aktif\",\r\n\t\tbutton_edit_series: \"Dizi düzenleme\",\r\n\t\tbutton_edit_occurrence: \"Bir kopyasını düzenleyin\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Ajanda\",\r\n\t\tdate: \"Tarih\",\r\n\t\tdescription: \"Açýklama\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Yýl\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Ajanda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Izgara\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Günlük\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Haftalık\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Aylık\",\r\n\t\trepeat_radio_year: \"Yıllık\",\r\n\t\trepeat_radio_day_type: \"Her\",\r\n\t\trepeat_text_day_count: \"gün\",\r\n\t\trepeat_radio_day_type2: \"Her iş günü\",\r\n\t\trepeat_week: \" Tekrar her\",\r\n\t\trepeat_text_week_count: \"hafta şu günlerde:\",\r\n\t\trepeat_radio_month_type: \"Tekrar et\",\r\n\t\trepeat_radio_month_start: \"Tarihinde\",\r\n\t\trepeat_text_month_day: \"gün her\",\r\n\t\trepeat_text_month_count: \"ay\",\r\n\t\trepeat_text_month_count2_before: \"her\",\r\n\t\trepeat_text_month_count2_after: \"ay\",\r\n\t\trepeat_year_label: \"Tarihinde\",\r\n\t\tselect_year_day2: \"ayın\",\r\n\t\trepeat_text_year_day: \"günü\",\r\n\t\tselect_year_month: \"ay\",\r\n\t\trepeat_radio_end: \"Bitiş tarihi yok\",\r\n\t\trepeat_text_occurences_count: \"olay\",\r\n\t\trepeat_radio_end2: \"Sonra\",\r\n\t\trepeat_radio_end3: \"Tarihinde bitir\",\r\n\r\n\t\trepeat_never: \"Asla\",\r\n\t\trepeat_daily: \"Her gün\",\r\n\t\trepeat_workdays: \"Her iş günü\",\r\n\t\trepeat_weekly: \"Her hafta\",\r\n\t\trepeat_monthly: \"Her ay\",\r\n\t\trepeat_yearly: \"Her yıl\",\r\n\t\trepeat_custom: \"Özel\",\r\n\t\trepeat_freq_day: \"Gün\",\r\n\t\trepeat_freq_week: \"Hafta\",\r\n\t\trepeat_freq_month: \"Ay\",\r\n\t\trepeat_freq_year: \"Yıl\",\r\n\t\trepeat_on_date: \"Tarihinde\",\r\n\t\trepeat_ends: \"Biter\",\r\n\r\n\t\tmonth_for_recurring: [\"Ocak\", \"Şubat\", \"Mart\", \"Nisan\", \"Mayıs\", \"Haziran\", \"Temmuz\", \"Ağustos\", \"Eylül\", \"Ekim\", \"Kasım\", \"Aralık\"],\r\n\t\tday_for_recurring: [\"Pazar\", \"Pazartesi\", \"Salı\", \"Çarşamba\", \"Perşembe\", \"Cuma\", \"Cumartesi\"]\r\n\t}\r\n};","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Січень\", \"Лютий\", \"Березень\", \"Квітень\", \"Травень\", \"Червень\", \"Липень\", \"Серпень\", \"Вересень\", \"Жовтень\", \"Листопад\", \"Грудень\"],\r\n\t\tmonth_short: [\"Січ\", \"Лют\", \"Бер\", \"Кві\", \"Тра\", \"Чер\", \"Лип\", \"Сер\", \"Вер\", \"Жов\", \"Лис\", \"Гру\"],\r\n\t\tday_full: [\"Неділя\", \"Понеділок\", \"Вівторок\", \"Середа\", \"Четвер\", \"П'ятниця\", \"Субота\"],\r\n\t\tday_short: [\"Нед\", \"Пон\", \"Вів\", \"Сер\", \"Чет\", \"Птн\", \"Суб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сьогодні\",\r\n\t\tday_tab: \"День\",\r\n\t\tweek_tab: \"Тиждень\",\r\n\t\tmonth_tab: \"Місяць\",\r\n\t\tnew_event: \"Нова подія\",\r\n\t\ticon_save: \"Зберегти\",\r\n\t\ticon_cancel: \"Відміна\",\r\n\t\ticon_details: \"Деталі\",\r\n\t\ticon_edit: \"Редагувати\",\r\n\t\ticon_delete: \"Вилучити\",\r\n\t\tconfirm_closing: \"\", //Ваші зміни втратяться. Ви впевнені ?\r\n\t\tconfirm_deleting: \"Подія вилучиться назавжди. Ви впевнені?\",\r\n\t\tsection_description: \"Опис\",\r\n\t\tsection_time: \"Часовий проміжок\",\r\n\t\tfull_day: \"Весь день\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Хочете редагувати весь перелік повторюваних подій?\",\r\n\t\tsection_recurring: \"Повторювана подія\",\r\n\t\tbutton_recurring: \"Відключено\",\r\n\t\tbutton_recurring_open: \"Включено\",\r\n\t\tbutton_edit_series: \"Редагувати серію\",\r\n\t\tbutton_edit_occurrence: \"Редагувати примірник\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Перелік\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Опис\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Рік\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Перелік\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Таблиця\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"День\",\r\n\t\trepeat_radio_week: \"Тиждень\",\r\n\t\trepeat_radio_month: \"Місяць\",\r\n\t\trepeat_radio_year: \"Рік\",\r\n\t\trepeat_radio_day_type: \"Кожний\",\r\n\t\trepeat_text_day_count: \"день\",\r\n\t\trepeat_radio_day_type2: \"Кожний робочий день\",\r\n\t\trepeat_week: \" Повторювати кожен\",\r\n\t\trepeat_text_week_count: \"тиждень , по:\",\r\n\t\trepeat_radio_month_type: \"Повторювати\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" числа кожний \",\r\n\t\trepeat_text_month_count: \"місяць\",\r\n\t\trepeat_text_month_count2_before: \"кожен \",\r\n\t\trepeat_text_month_count2_after: \"місяць\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"день\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без дати закінчення\",\r\n\t\trepeat_text_occurences_count: \"повторень\",\r\n\t\trepeat_radio_end3: \"До \",\r\n\t\trepeat_radio_end2: \"\",\r\n\r\n\t\trepeat_never: \"Ніколи\",\r\n\t\trepeat_daily: \"Щодня\",\r\n\t\trepeat_workdays: \"Щодня в робочі дні\",\r\n\t\trepeat_weekly: \"Щотижня\",\r\n\t\trepeat_monthly: \"Щомісяця\",\r\n\t\trepeat_yearly: \"Щороку\",\r\n\t\trepeat_custom: \"Налаштоване\",\r\n\t\trepeat_freq_day: \"День\",\r\n\t\trepeat_freq_week: \"Тиждень\",\r\n\t\trepeat_freq_month: \"Місяць\",\r\n\t\trepeat_freq_year: \"Рік\",\r\n\t\trepeat_on_date: \"На дату\",\r\n\t\trepeat_ends: \"Закінчується\",\r\n\r\n\t\tmonth_for_recurring: [\"січня\", \"лютого\", \"березня\", \"квітня\", \"травня\", \"червня\", \"липня\", \"серпня\", \"вересня\", \"жовтня\", \"листопада\", \"грудня\"],\r\n\t\tday_for_recurring: [\"Неділям\", \"Понеділкам\", \"Вівторкам\", \"Середам\", \"Четвергам\", \"П'ятницям\", \"Суботам\"]\r\n\t}\r\n};\r\n","import eventable from \"../utils/eventable\";\r\n\r\nexport class DatePicker {\r\n\tconstructor(scheduler, container, state = {}) {\r\n\t\tthis.state = {\r\n\t\t\tdate: new Date(),\r\n\t\t\tmodes: ['days', 'months', 'years'],\r\n\t\t\tcurrentRange: [],\r\n\t\t\teventDates: [],\r\n\t\t\tfilterDays: null,\r\n\t\t\tcurrentModeIndex: 0,\r\n\t\t\t...state\r\n\t\t};\r\n\t\tthis.container = null;\r\n\t\tthis.element = null;\r\n\t\tthis.onStateChangeHandlers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t\tthis._domEvents = scheduler._createDomEventScope();\r\n\t\tthis.state = this.getState();\r\n\t\teventable(this);\r\n\t\tif(container){\r\n\r\n\t\t\tthis.container = container;\r\n\t\t\tthis.render(this.container);\r\n\t\t}\r\n\r\n\t\tthis.onStateChange((oldState, newState) => {\r\n\t\t\tthis.callEvent(\"onStateChange\", [newState, oldState]);\r\n\t\t});\r\n\t}\r\n\r\n\tgetState() {\r\n\t\treturn { \r\n\t\t\t...this.state,\r\n\t\t\tmode: this.state.modes[this.state.currentModeIndex]\r\n\t\t};\r\n\t}\r\n\r\n\tsetState(newState) {\r\n\t\tconst oldState = { ...this.state };\r\n\t\tif(newState.mode){\r\n\t\t\tnewState.currentModeIndex = this.state.modes.indexOf(newState.mode);\r\n\t\t}\r\n\t\tthis.state = { ...this.state, ...newState };\r\n\r\n\t\tthis._notifyStateChange(oldState, this.state);\r\n\r\n\t\tif (this.container) {\r\n\t\t\tthis.render(this.container);\r\n\t\t}\r\n\t}\r\n\r\n\tonStateChange(handler) {\r\n\t\tthis.onStateChangeHandlers.push(handler);\r\n\r\n\t\t// function to remove the handler\r\n\t\treturn () => {\r\n\t\t\tconst index = this.onStateChangeHandlers.indexOf(handler);\r\n\t\t\tif (index !== -1) {\r\n\t\t\t\tthis.onStateChangeHandlers.splice(index, 1);\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\r\n\t_notifyStateChange(oldState, newState) {\r\n\t\tthis.onStateChangeHandlers.forEach(handler => handler(oldState, newState));\r\n\t}\r\n\r\n\t_adjustDate(direction) {\r\n\r\n\t\tconst {mode, date} = this.getState();\r\n\t\tconst newDate = new Date(date);\r\n\t\tif (mode === 'days') {\r\n\t\t\tnewDate.setMonth(date.getMonth() + direction);\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tnewDate.setFullYear(date.getFullYear() + direction);\r\n\t\t} else {\r\n\t\t\tnewDate.setFullYear(date.getFullYear() + direction * 10);\r\n\t\t}\r\n\t\tthis.setState({ date: newDate });\r\n\t}\r\n\r\n\t_toggleMode() {\r\n\t\tconst newIndex = (this.state.currentModeIndex + 1) % this.state.modes.length;\r\n\t\tthis.setState({ currentModeIndex: newIndex });\r\n\t}\r\n\r\n\t_renderCalendarHeader(container) {\r\n\t\tconst {mode, date} = this.getState();\r\n\r\n\t\tconst header = document.createElement('div');\r\n\t\theader.classList.add('dhx_cal_datepicker_header');\r\n\r\n\t\tconst backwardArrow = document.createElement('button');\r\n\r\n\t\tbackwardArrow.classList.add(\"dhx_cal_datepicker_arrow\", \"scheduler_icon\", \"arrow_left\");\r\n\t\theader.appendChild(backwardArrow);\r\n\r\n\t\tconst monthLabel = document.createElement('div');\r\n\t\tmonthLabel.classList.add('dhx_cal_datepicker_title');\r\n\r\n\t\tif (mode === 'days') {\r\n\t\t\tmonthLabel.innerText = date.toLocaleString('default', { month: 'long' }) + ' ' + date.getFullYear();\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tmonthLabel.innerText = date.getFullYear();\r\n\t\t} else {\r\n\t\t\tconst startYear = Math.floor(date.getFullYear() / 10) * 10;\r\n\t\t\tmonthLabel.innerText = `${startYear} - ${startYear + 9}`;\r\n\t\t}\r\n\r\n\t\tthis._domEvents.attach(monthLabel, \"click\", this._toggleMode.bind(this));\r\n\t\theader.appendChild(monthLabel);\r\n\r\n\t\tconst forwardArrow = document.createElement('button');\r\n\r\n\t\tforwardArrow.classList.add(\"dhx_cal_datepicker_arrow\", \"scheduler_icon\", \"arrow_right\");\r\n\t\theader.appendChild(forwardArrow);\r\n\r\n\t\tcontainer.appendChild(header);\r\n\r\n\t\tthis._domEvents.attach(backwardArrow, \"click\", this._adjustDate.bind(this, -1));\r\n\t\tthis._domEvents.attach(forwardArrow, \"click\", this._adjustDate.bind(this, 1));\r\n\t}\r\n\r\n\trender(container) {\r\n\t\tthis._domEvents.detachAll();\r\n\t\tthis.container = container || this.container; \r\n\t\tthis.container.innerHTML = '';\r\n\r\n\t\tif(!this.element){\r\n\t\t\tthis.element = document.createElement(\"div\");\r\n\t\t\tthis.element.classList.add(\"dhx_cal_datepicker\");\r\n\t\t}\r\n\t\tthis.element.innerHTML = '';\r\n\t\tthis.container.appendChild(this.element);\r\n\r\n\t\tthis._renderCalendarHeader(this.element);\r\n\t\tconst dataContainer = document.createElement(\"div\");\r\n\t\tdataContainer.classList.add(\"dhx_cal_datepicker_data\");\r\n\t\tthis.element.appendChild(dataContainer);\r\n\r\n\t\tconst {mode} = this.getState();\r\n\t\tif (mode === 'days') {\r\n\t\t\tthis._renderDayGrid(dataContainer);\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tthis._renderMonthGrid(dataContainer);\r\n\t\t} else {\r\n\t\t\tthis._renderYearGrid(dataContainer);\r\n\t\t}\r\n\t}\r\n\r\n\t_renderDayGridHeader(daysOfWeekContainer) {\r\n\t\tconst {date, filterDays} = this.getState();\r\n\t\tconst scheduler = this.scheduler;\r\n\r\n\t\tlet currentDate = scheduler.date.week_start(new Date(date));\r\n\t\tconst maxDate = scheduler.date.add(scheduler.date.week_start(new Date(date)), 1, 'week');\r\n\r\n\t\tdaysOfWeekContainer.classList.add('dhx_cal_datepicker_days');\r\n\r\n\t\tconst labelFormat = scheduler.date.date_to_str(\"%D\");\r\n\r\n\t\twhile (currentDate.valueOf() < maxDate.valueOf()) {\r\n\t\t\tif(!(filterDays && filterDays(currentDate))){\r\n\t\t\t\tconst label = labelFormat(currentDate);\r\n\r\n\t\t\t\tconst dayElement = document.createElement('div');\r\n\t\t\t\tdayElement.setAttribute(\"data-day\", currentDate.getDay());\r\n\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_dayname');\r\n\t\t\t\tdayElement.innerText = label;\r\n\t\t\t\tdaysOfWeekContainer.appendChild(dayElement);\r\n\t\t\t}\r\n\r\n\t\t\tcurrentDate = scheduler.date.add(currentDate, 1, 'day');\r\n\t\t}\r\n\t}\r\n\r\n\t_weeksBetween(min, max) {\r\n\t\tconst scheduler = this.scheduler;\r\n\t\tlet weeks = 0;\r\n\t\tlet currWeek = new Date(min);\r\n\t\twhile(currWeek.valueOf() < max.valueOf()){\r\n\t\t\tweeks += 1;\r\n\t\t\tcurrWeek = scheduler.date.week_start(scheduler.date.add(currWeek, 1, \"week\"));\r\n\t\t}\r\n\t\treturn weeks;\r\n\t}\r\n\r\n\t_renderDayGrid(container) {\r\n\t\tconst {date, currentRange, eventDates, minWeeks, filterDays} = this.getState();\r\n\r\n\t\tlet minSchedulerDate = currentRange[0];\r\n\t\tlet maxSchedulerDate = currentRange[1];\r\n\r\n\t\tconst eventDaysTable = eventDates.reduce((acc, date) => {\r\n\t\t\tconst dayStart = this.scheduler.date.day_start(new Date(date));\r\n\t\t\tacc[dayStart.valueOf()] = true;\r\n\t\t\treturn acc;\r\n\t\t}, {});\r\n\r\n\r\n\t\t// Render Days of the Week\r\n\t\tconst daysOfWeekContainer = document.createElement('div');\r\n\t\tthis._renderDayGridHeader(daysOfWeekContainer);\r\n\t\tconst weekLength = daysOfWeekContainer.children.length;\r\n\t\tcontainer.appendChild(daysOfWeekContainer);\r\n\t\tif(weekLength !== 7){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-week-length\", weekLength);\r\n\t\t}\r\n\r\n\t\tconst scheduler = this.scheduler;\r\n\t\tconst firstDate = scheduler.date.week_start(scheduler.date.month_start(new Date(date)));\r\n\t\tconst monthStart = scheduler.date.month_start(new Date(date));\r\n\t\tconst monthEnd = scheduler.date.add(scheduler.date.month_start(new Date(date)), 1, 'month');\r\n\t\tlet lastDate = scheduler.date.add(scheduler.date.month_start(new Date(date)), 1, 'month');\r\n\t\tconst currentCalDate = scheduler.date.date_part(scheduler._currentDate());\r\n\t\tif(lastDate.getDay() !== 0){\r\n\t\t\tlastDate = scheduler.date.add(scheduler.date.week_start(lastDate), 1, \"week\");\r\n\t\t}\r\n\r\n\t\tlet weeks = this._weeksBetween(firstDate, lastDate);\r\n\t\tif(minWeeks && weeks < minWeeks){\r\n\t\t\tlastDate = scheduler.date.add(lastDate, (minWeeks - weeks), \"week\");\r\n\t\t}\r\n\r\n\t\tlet currDate = firstDate;\r\n\r\n\t\tconst dayGridContainer = document.createElement('div');\r\n\t\tdayGridContainer.classList.add('dhx_cal_datepicker_days');\r\n\r\n\t\tthis._domEvents.attach(dayGridContainer, \"click\", (event) => {\r\n\t\t\tconst dateCell = event.target.closest(\"[data-cell-date]\");\r\n\t\t\tconst date = new Date(dateCell.getAttribute(\"data-cell-date\"));\r\n\t\t\tthis.callEvent(\"onDateClick\", [date, event]);\r\n\t\t});\r\n\r\n\t\twhile(currDate.valueOf() < lastDate.valueOf()){\r\n\t\t\tif(!(filterDays && filterDays(currDate))){\r\n\r\n\t\t\t\tconst dayElement = document.createElement('div');\r\n\t\t\t\tdayElement.setAttribute(\"data-cell-date\", scheduler.templates.format_date(currDate));\r\n\t\t\t\tdayElement.setAttribute(\"data-day\", currDate.getDay());\r\n\t\t\t\tdayElement.innerHTML = currDate.getDate();\r\n\r\n\t\t\t\tif(currDate.valueOf() < monthStart.valueOf()){\r\n\t\t\t\t\tdayElement.classList.add('dhx_before');\r\n\t\t\t\t}else if(currDate.valueOf() >= monthEnd.valueOf()){\t\r\n\t\t\t\t\tdayElement.classList.add('dhx_after');\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(currDate.getDay() === 0 || currDate.getDay() === 6){\r\n\t\t\t\t\tdayElement.classList.add(\"dhx_cal_datepicker_weekend\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(currDate.valueOf() == currentCalDate.valueOf()){\r\n\t\t\t\t\tdayElement.classList.add(\"dhx_now\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(minSchedulerDate && maxSchedulerDate){\r\n\t\t\t\t\tif(currDate.valueOf() >= minSchedulerDate.valueOf() && currDate.valueOf() < maxSchedulerDate.valueOf()){\r\n\t\t\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(eventDaysTable[currDate.valueOf()]){\r\n\t\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_event');\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_date');\r\n\r\n\t\t\t\tdayGridContainer.appendChild(dayElement);\r\n\t\t\t}\r\n\t\t\tcurrDate = scheduler.date.add(currDate, 1, 'day');\r\n\t\t}\r\n\r\n\t\tcontainer.appendChild(dayGridContainer);\r\n\r\n\t}\r\n\r\n\t_renderMonthGrid(container) {\r\n\t\tconst {date} = this.getState();\r\n\r\n\t\tconst wrapper = document.createElement('div');\r\n\t\twrapper.classList.add(\"dhx_cal_datepicker_months\");\r\n\r\n\t\tconst months = [];\r\n\t\tfor(let i = 0; i < 12; i++){\r\n\t\t\tmonths.push(new Date(date.getFullYear(), i, 1));\r\n\t\t}\r\n\r\n\t\tconst formatLabel = this.scheduler.date.date_to_str(\"%M\");\r\n\t\tmonths.forEach(month => {\r\n\t\t\tconst monthElement = document.createElement('div');\r\n\t\t\tmonthElement.classList.add('dhx_cal_datepicker_month');\r\n\t\t\tif(date.getMonth() === month.getMonth()){\r\n\t\t\t\tmonthElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t}\r\n\t\t\tmonthElement.setAttribute(\"data-month\", month.getMonth());\r\n\t\t\tmonthElement.innerHTML = formatLabel(month);\r\n\t\t\tthis._domEvents.attach(monthElement, \"click\", () => {\r\n\t\t\t\tconst newDate = new Date(month);\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tdate: newDate,\r\n\t\t\t\t\tmode: 'days'\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\twrapper.appendChild(monthElement);\r\n\t\t});\r\n\t\tcontainer.appendChild(wrapper);\r\n\r\n\t\tconst doneArea = document.createElement(\"div\");\r\n\t\tdoneArea.classList.add(\"dhx_cal_datepicker_done\");\r\n\t\tconst doneBtn = document.createElement(\"button\");\r\n\t\tdoneBtn.innerText = \"Done\";\r\n\t\tdoneBtn.classList.add(\"dhx_cal_datepicker_done_btn\");\r\n\t\tthis._domEvents.attach(doneBtn, \"click\", () => {\r\n\t\t\tthis.setState({\r\n\t\t\t\tmode: 'days'\r\n\t\t\t});\r\n\t\t});\r\n\t\tdoneArea.appendChild(doneBtn);\r\n\t\tcontainer.appendChild(doneArea);\r\n\t}\r\n\r\n\t_renderYearGrid(container) {\r\n\t\tconst {date} = this.getState();\r\n\t\tconst startYear = Math.floor(date.getFullYear() / 10) * 10;\r\n\t\t\r\n\t\tconst wrapper = document.createElement('div');\r\n\t\twrapper.classList.add(\"dhx_cal_datepicker_years\");\r\n\t\tfor (let i = startYear - 1; i <= startYear + 10; i++) {\r\n\t\t\tconst yearElement = document.createElement('div');\r\n\t\t\tyearElement.innerText = i;\r\n\t\t\tyearElement.classList.add('dhx_cal_datepicker_year');\r\n\t\t\tyearElement.setAttribute(\"data-year\", i);\r\n\t\t\tif(date.getFullYear() === i){\r\n\t\t\t\tyearElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t}\r\n\t\t\tthis._domEvents.attach(yearElement, \"click\", () => {\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tdate: new Date(i, date.getMonth(), 1),\r\n\t\t\t\t\tmode: 'months'\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\twrapper.appendChild(yearElement);\r\n\t\t\t\r\n\t\t}\r\n\t\tcontainer.appendChild(wrapper);\r\n\r\n\t\tconst doneArea = document.createElement(\"div\");\r\n\t\tdoneArea.classList.add(\"dhx_cal_datepicker_done\");\r\n\t\tconst doneBtn = document.createElement(\"button\");\r\n\t\tdoneBtn.innerText = \"Done\";\r\n\t\tdoneBtn.classList.add(\"dhx_cal_datepicker_done_btn\");\r\n\t\tthis._domEvents.attach(doneBtn, \"click\", () => {\r\n\t\t\tthis.setState({\r\n\t\t\t\tmode: 'months'\r\n\t\t\t});\r\n\t\t});\r\n\t\tdoneArea.appendChild(doneBtn);\r\n\t\tcontainer.appendChild(doneArea);\r\n\t}\r\n\r\n\tdestructor(){\r\n\t\tthis.onStateChangeHandlers = [];\r\n\t\tif(this.element){\r\n\t\t\tthis.element.innerHTML = '';\r\n\t\t\tthis.element.remove();\r\n\t\t}\r\n\r\n\t\tthis._domEvents.detachAll();\r\n\t\tthis.callEvent(\"onDestroy\", []);\r\n\t\tthis.detachAllEvents();\r\n\r\n\t\tthis.scheduler = null;\r\n\t}\r\n}","// import \"./css/dhtmlxscheduler_terrace\";\r\n// import \"./css/dhtmlxscheduler_material\";\r\n// import \"./css/dhtmlxscheduler_material_nofont\";\r\n// import \"./css/dhtmlxscheduler_flat\";\r\n// import \"./css/dhtmlxscheduler_contrast_black\";\r\n// import \"./css/dhtmlxscheduler_contrast_white\";\r\n\r\nimport addPlugins from \"./plugins\";\r\nimport stateProvider from \"./core/state\";\r\nimport assert from \"./core/common/assert\";\r\nimport common_errors from \"./core/common_errors\";\r\nimport connector from \"./core/connector\";\r\nimport schedulerCore from \"./core/scheduler\";\r\nimport common from \"./core/common\";\r\nimport wai_aria from \"./core/wai_aria\";\r\nimport utils from \"./core/utils/utils\";\r\nimport dom_helpers from \"./core/utils/dom_helpers\";\r\nimport env from \"./utils/env\";\r\nimport destructor from \"./core/destructor\";\r\nimport ajax from \"./core/utils/ajax\";\r\nimport base from \"./core/base\";\r\nimport config from \"./core/config\";\r\nimport event from \"./core/event\";\r\nimport event_highlight from \"./core/event_highlight\";\r\nimport load from \"./core/load\";\r\nimport lightbox from \"./core/lightbox\";\r\nimport touch from \"./core/touch\";\r\nimport dhtmlx_suite_hooks from \"./core/dhtmlx/dhtmlx_suite_hooks\";\r\nimport skins from \"./core/skins\";\r\nimport jquery from \"./core/jquery\";\r\nimport delay_render from \"./core/delay_render\";\r\nimport dataProcessorExtend from \"./core/dataprocessor/dataprocessor\";\r\nimport message from \"./core/message\";\r\nimport i18nFactory from \"./locale\";\r\n\r\nimport voidFirst from \"./publish_helpers/void_script_first\";\r\nimport voidSecond from \"./publish_helpers/void_script_second\";\r\nimport voidThird from \"./publish_helpers/void_script_third\";\r\n\r\n//import datepickerHeader from \"./core/clickable_header\";\r\n\r\nimport { DatePicker } from \"./core/datepicker\";\r\n\r\nexport default function(extensionManager) {\r\n\r\n\tconst scheduler = { version: VERSION };\r\n\t\r\n\tscheduler.$stateProvider = stateProvider();\r\n\r\n\tscheduler.getState = scheduler.$stateProvider.getState;\r\n\tcommon_errors(scheduler);\r\n\tcommon(scheduler);\r\n\tschedulerCore(scheduler);\r\n\twai_aria(scheduler);\r\n\t//utils(scheduler);\r\n\r\n\tscheduler.utils = utils;\r\n\tscheduler.$domHelpers = dom_helpers;\r\n\tscheduler.utils.dom = dom_helpers;\r\n\tscheduler.uid = utils.uid;\r\n\tscheduler.mixin = utils.mixin;\r\n\tscheduler.defined = utils.defined;\r\n\tscheduler.assert = assert(scheduler);\r\n\tscheduler.copy = utils.copy;\r\n\r\n\tscheduler._createDatePicker = function(container, config){\r\n\t\treturn new DatePicker(scheduler, container, config);\r\n\t};\r\n\r\n\t//datepickerHeader(scheduler);\r\n\r\n\r\n\t//old api compatibility\r\n\tscheduler._getFocusableNodes = dom_helpers.getFocusableNodes;\r\n\tscheduler._getClassName = dom_helpers.getClassName;\r\n\tscheduler._locate_css = dom_helpers.locateCss;\r\n\r\n\tconst messageApi = message(scheduler);\r\n\tscheduler.utils.mixin(scheduler, messageApi);\r\n\r\n\tscheduler.env = scheduler.$env = env;\r\n\tscheduler.Promise = window.Promise;\r\n\tdestructor(scheduler);\r\n\tajax(scheduler);\r\n\tvoidFirst(scheduler);\r\n\tbase(scheduler);\r\n\tconfig(scheduler);\r\n\tevent(scheduler);\r\n\tevent_highlight(scheduler);\r\n\tload(scheduler);\r\n\tlightbox(scheduler);\r\n\ttouch(scheduler);\r\n\tdhtmlx_suite_hooks(scheduler);\r\n\tvoidSecond(scheduler);\r\n\tskins(scheduler);\r\n\tjquery(scheduler);\r\n\tdelay_render(scheduler);\r\n\tdataProcessorExtend(scheduler);\r\n\tvoidThird(scheduler);\r\n\tconnector(scheduler);\r\n\tconst i18n = i18nFactory();\r\n\tscheduler.i18n = {\r\n\t\taddLocale: i18n.addLocale,\r\n\t\tsetLocale: function(locale){\r\n\t\t\tif(typeof locale === \"string\"){\r\n\t\t\t\tvar localeObject = i18n.getLocale(locale);\r\n\t\t\t\tif(!localeObject){\r\n\t\t\t\t\tlocaleObject = i18n.getLocale(\"en\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler.locale = localeObject;\r\n\t\t\t}else if(locale){\r\n\t\t\t\tif(!scheduler.locale){\r\n\t\t\t\t\tscheduler.locale = locale;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfor(var i in locale){\r\n\t\t\t\t\t\tif(locale[i] && typeof locale[i] === \"object\"){\r\n\t\t\t\t\t\t\tif(!scheduler.locale[i]){\r\n\t\t\t\t\t\t\t\tscheduler.locale[i] = {};\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tscheduler.mixin(scheduler.locale[i], locale[i], true);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tscheduler.locale[i] = locale[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar labels = scheduler.locale.labels;\r\n\t\t\tlabels.dhx_save_btn \t= labels.icon_save;\r\n\t\t\tlabels.dhx_cancel_btn \t= labels.icon_cancel;\r\n\t\t\tlabels.dhx_delete_btn \t= labels.icon_delete;\r\n\r\n\t\t\tif(scheduler.$container){\r\n\t\t\t\tscheduler.get_elements();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t},\r\n\t\tgetLocale: i18n.getLocale\r\n\t};\r\n\tscheduler.i18n.setLocale(\"en\");\r\n\taddPlugins(scheduler);\r\n\tscheduler.ext = {};\r\n\r\n\tconst activePlugins = {};\r\n\tscheduler.plugins = function(config){\r\n\t\tconst extensionList = getExtensionList(config, {\r\n\t\t\t\ttreetimeline: [\"timeline\"],\r\n\t\t\t\tdaytimeline: [\"timeline\"],\r\n\t\t\t\touterdrag: [\"legacy\"]\r\n\t\t\t}, {\r\n\t\t\t\tlegacy: 1,\r\n\t\t\t\tlimit: 1,\r\n\t\t\t\ttimeline: 2,\r\n\t\t\t\tdaytimeline: 3,\r\n\t\t\t\ttreetimeline: 3,\r\n\t\t\t\touterdrag:6\r\n\t\t\t});\r\n\r\n\t\textensionList.forEach(function(name){\r\n\t\t\tif(!activePlugins[name]){\r\n\t\t\t\tconst plugin = extensionManager.getExtension(name);\r\n\t\t\t\tif(plugin){\r\n\t\t\t\t\tplugin(scheduler);\r\n\t\t\t\t\tactivePlugins[name] = true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthrow new Error(\"unknown plugin \" + name);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n\r\n\tfunction getExtensionList(config, dependencies, priorities){\r\n\t\tconst result = [];\r\n\r\n\t\tfor(const i in config){\r\n\t\t\tif(config[i]){\r\n\t\t\t\tconst extension = i.toLowerCase();\r\n\t\t\t\tif(dependencies[extension]){\r\n\t\t\t\t\tdependencies[extension].forEach(function(dep){\r\n\t\t\t\t\t\tconst dependencyName = dep.toLowerCase();\r\n\t\t\t\t\t\tif(!config[dependencyName]){\r\n\t\t\t\t\t\t\tresult.push(dependencyName);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\tresult.push(extension);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tresult.sort(function(a, b){\r\n\t\t\tconst orderA = priorities[a] || 0;\r\n\t\t\tconst orderB = priorities[b] || 0;\r\n\t\t\tif(orderA > orderB){\r\n\t\t\t\treturn 1;\r\n\t\t\t}else if(orderA < orderB){\r\n\t\t\t\treturn -1;\r\n\t\t\t}else{\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\treturn scheduler;\r\n\r\n}","import utils from \"./utils/utils\";\r\n\r\nconst StateService = (function(){\r\n\tconst stateProviders = {};\r\n\r\n\tfunction getState(name){\r\n\t\tconst provider = stateProviders[name];\r\n\t\tif(provider){\r\n\t\t\treturn stateProviders[name].method();\r\n\t\t}else{\r\n\t\t\tconst res = {};\r\n\t\t\tfor(const i in stateProviders){\r\n\t\t\t\tif(!stateProviders[i].internal)\r\n\t\t\t\t\tutils.mixin(res, stateProviders[i].method(), true);\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\t\t}\r\n\t}\r\n\r\n\tfunction registerProvider(name, provider, internal){\r\n\t\tstateProviders[name] = { method: provider, internal: internal};\r\n\t}\r\n\r\n\tfunction unregisterProvider(name){\r\n\t\tdelete stateProviders[name];\r\n\t}\r\n\r\n\treturn {\r\n\t\tgetState: getState,\r\n\t\tregisterProvider: registerProvider,\r\n\t\tunregisterProvider: unregisterProvider\r\n\t};\r\n});\r\n\r\nexport default StateService;\r\n\r\n","export default function extend(scheduler) {\r\n\r\nvar commonViews = {\r\n\tagenda: \"https://docs.dhtmlx.com/scheduler/agenda_view.html\",\r\n\tgrid: \"https://docs.dhtmlx.com/scheduler/grid_view.html\",\r\n\tmap: \"https://docs.dhtmlx.com/scheduler/map_view.html\",\r\n\tunit: \"https://docs.dhtmlx.com/scheduler/units_view.html\",\r\n\ttimeline: \"https://docs.dhtmlx.com/scheduler/timeline_view.html\",\r\n\tweek_agenda: \"https://docs.dhtmlx.com/scheduler/weekagenda_view.html\",\r\n\tyear: \"https://docs.dhtmlx.com/scheduler/year_view.html\",\r\n\tanythingElse: \"https://docs.dhtmlx.com/scheduler/views.html\"\r\n};\r\n\r\nvar requiredExtensions = {\r\n\tagenda: \"ext/dhtmlxscheduler_agenda_view.js\",\r\n\tgrid: \"ext/dhtmlxscheduler_grid_view.js\",\r\n\tmap: \"ext/dhtmlxscheduler_map_view.js\",\r\n\tunit: \"ext/dhtmlxscheduler_units.js\",\r\n\ttimeline: \"ext/dhtmlxscheduler_timeline.js, ext/dhtmlxscheduler_treetimeline.js, ext/dhtmlxscheduler_daytimeline.js\",\r\n\tweek_agenda: \"ext/dhtmlxscheduler_week_agenda.js\",\r\n\tyear: \"ext/dhtmlxscheduler_year_view.js\",\r\n\tlimit: \"ext/dhtmlxscheduler_limit.js\"\r\n};\r\n\r\nscheduler._commonErrorMessages = {\r\n\tunknownView: function(view){\r\n\t\tvar relatedDoc = \"Related docs: \" + (commonViews[view] || commonViews.anythingElse); \r\n\t\tvar relatedExtension = requiredExtensions[view] ? (\"You're probably missing \" + requiredExtensions[view] + \".\") : \"\";\r\n\t\treturn (\r\n\t\t\t\"`\"+view+\"` view is not defined. \\n\" +\r\n\t\t\t\"Please check parameters you pass to `scheduler.init` or `scheduler.setCurrentView` in your code and ensure you've imported appropriate extensions. \\n\" + \r\n\t\t\trelatedDoc + \"\\n\" + (relatedExtension ? (relatedExtension + \"\\n\") : \"\"));\r\n\t},\r\n\tcollapsedContainer: function(div){\r\n\t\treturn \"Scheduler container height is set to *100%* but the rendered height is zero and the scheduler is not visible. \\n\"+\r\n\t\t\"Make sure that the container has some initial height or use different units. For example:\\n\" +\r\n\t\t\"
\\n\";\r\n\t}\r\n};\r\n\r\nscheduler.createTimelineView = function() {\r\n\tthrow new Error(\"scheduler.createTimelineView is not implemented. Be sure to add the required extension: \" + requiredExtensions.timeline + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.timeline);\r\n};\r\n\r\nscheduler.createUnitsView = function() {\r\n\tthrow new Error(\"scheduler.createUnitsView is not implemented. Be sure to add the required extension: \" + requiredExtensions.unit + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.unit);\r\n};\r\n\r\nscheduler.createGridView = function() {\r\n\tthrow new Error(\"scheduler.createGridView is not implemented. Be sure to add the required extension: \" + requiredExtensions.grid + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.grid);\r\n};\r\n\r\nscheduler.addMarkedTimespan = function() {\r\n\tthrow new Error(\"scheduler.addMarkedTimespan is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_limit.js\" + \r\n\t\"\\n\" +\r\n\t\"Related docs: https://docs.dhtmlx.com/scheduler/limits.html\");\r\n};\r\n\r\nscheduler.renderCalendar = function() {\r\n\tthrow new Error(\"scheduler.renderCalendar is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_minical.js\" + \r\n\t\"\\n\" +\r\n\t\"https://docs.dhtmlx.com/scheduler/minicalendar.html\");\r\n};\r\n\r\nscheduler.exportToPNG = function() {\r\n\tthrow new Error([\r\n\t\t\"scheduler.exportToPNG is not implemented.\",\r\n\t\t\"This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/png.html\",\r\n\t\t\"Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml\"\r\n\t].join(\"\\n\"));\r\n};\r\n\r\nscheduler.exportToPDF = function() {\r\n\tthrow new Error([\r\n\t\t\"scheduler.exportToPDF is not implemented.\",\r\n\t\t\"This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/pdf.html\",\r\n\t\t\"Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml\"\r\n\t].join(\"\\n\"));\r\n};\r\n\r\n\r\n}","\r\nimport nav_bar from \"./nav_bar\";\r\nimport scheduler_resize_listener from \"./scheduler_resize_listener\";\r\nimport eventable from \"../utils/eventable\";\r\n\r\n\r\nexport default function extend(scheduler) {\r\n\r\neventable(scheduler);\r\n\r\nnav_bar(scheduler);\r\n\r\nscheduler._detachDomEvent = function(el, event, handler){\r\n\tif (el.removeEventListener){\r\n\t\tel.removeEventListener(event, handler, false);\r\n\r\n\t}else if (el.detachEvent){\r\n\t\tel.detachEvent(\"on\"+event, handler);\r\n\t}\r\n};\r\n\r\n\r\nscheduler._init_once = function(){\r\n\tscheduler_resize_listener(scheduler);\r\n\r\n\tscheduler._init_once = function(){};\r\n};\r\n\r\nconst layout = {\r\n\t\"navbar\": {\r\n\t\trender: function (config) {\r\n\t\t\treturn scheduler._init_nav_bar(config);\r\n\t\t}\r\n\t},\r\n\t\"header\": {\r\n\t\trender: function (config) {\r\n\t\t\tconst element = document.createElement(\"div\");\r\n\t\t\telement.className = \"dhx_cal_header\";\r\n\t\t\treturn element;\r\n\t\t}\r\n\t},\r\n\t\"dataArea\": {\r\n\t\trender: function (config) {\r\n\t\t\tconst element = document.createElement(\"div\");\r\n\t\t\telement.className = \"dhx_cal_data\";\r\n\t\t\treturn element;\r\n\t\t}\r\n\t},\r\n\t\"html_element\": {\r\n\t\trender: function (config) {\r\n\t\t\treturn config.html;\r\n\t\t}\r\n\t}\r\n};\r\n\r\nfunction hasSchedulerMarkup(element){\r\n\treturn !!(\r\n\t\telement.querySelector(\".dhx_cal_header\") &&\r\n\t\telement.querySelector(\".dhx_cal_data\") &&\r\n\t\telement.querySelector(\".dhx_cal_navline\")\r\n\t\t);\r\n}\r\n\r\nfunction createDefaultHeader(scheduler){\r\n\tconst views = [\r\n\t\t\"day\",\r\n\t\t\"week\",\r\n\t\t\"month\"\r\n\t];\r\n\tconst date = [\r\n\t\t\"date\"\r\n\t];\r\n\tconst nav = [\r\n\t\t\"prev\",\r\n\t\t\"today\",\r\n\t\t\"next\"\r\n\t];\r\n\r\n\tif(scheduler.matrix){\r\n\t\tfor(const i in scheduler.matrix){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\tif(scheduler._props){\r\n\t\tfor(const i in scheduler._props){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\r\n\tif(scheduler._grid && scheduler._grid.names){\r\n\t\tfor(const i in scheduler._grid.names){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\r\n\tconst optionalViews = [\r\n\t\t\"map\",\r\n\t\t\"agenda\",\r\n\t\t\"week_agenda\",\r\n\t\t\"year\"\r\n\t];\r\n\r\n\toptionalViews.forEach(function(viewName){\r\n\t\tif(scheduler[viewName + \"_view\"]){\r\n\t\t\tviews.push(viewName);\r\n\t\t}\r\n\t});\r\n\r\n\treturn views.concat(date).concat(nav);\r\n}\r\n\r\nscheduler.init=function(id,date,mode){\r\n\tif(this.$destroyed){\r\n\t\treturn; // not have errors when try to reinit destroyed scheduler\r\n\t}\r\n\tdate=date||(scheduler._currentDate());\r\n\tmode=mode||\"week\";\r\n\r\n\tif(this._obj){\r\n\t\tthis.unset_actions();\r\n\t}\r\n\r\n\tthis._obj=(typeof id == \"string\")?document.getElementById(id):id;\r\n\tthis.$container = this._obj;\r\n\tthis.$root = this._obj;\r\n\r\n\tif(!this.$container.offsetHeight && this.$container.offsetWidth && this.$container.style.height === \"100%\"){\r\n\t\t// scheduler container has zero height and non-zero width\r\n\t\twindow.console.error(scheduler._commonErrorMessages.collapsedContainer(), this.$container);\r\n\t}\r\n\r\n\tif(this.config.wai_aria_attributes && this.config.wai_aria_application_role){\r\n\t\tthis.$container.setAttribute(\"role\", \"application\");\r\n\t}\r\n\r\n\tif(!this.config.header && !hasSchedulerMarkup(this.$container)){\r\n\t\t// if no header config and no required markup - use the default header\r\n\t\t// so the scheduler could be initialized in an empty div\r\n\t\tthis.config.header = createDefaultHeader(this);\r\n\t\twindow.console.log([// jshint ignore:line\r\n\t\t\t\"Required DOM elements are missing from the scheduler container and **scheduler.config.header** is not specified.\",\r\n\t\t\t\"Using a default header configuration: \",\r\n\t\t\t\"scheduler.config.header = \" + JSON.stringify(this.config.header, null, 2),\r\n\t\t\t\"Check this article for the details: https://docs.dhtmlx.com/scheduler/initialization.html\"\r\n\t\t].join(\"\\n\"));// jshint ignore:line\r\n\t}\r\n\r\n\tif (this.config.header) {\r\n\t\tthis.$container.innerHTML = \"\";\r\n\t\tthis.$container.classList.add(\"dhx_cal_container\");\r\n\t\tif(this.config.header.height){\r\n\t\t\tthis.xy.nav_height = this.config.header.height;\r\n\t\t}\r\n\t\tthis.$container.appendChild(layout.navbar.render(this.config.header));\r\n\t\tthis.$container.appendChild(layout.header.render());\r\n\t\tthis.$container.appendChild(layout.dataArea.render());\r\n\t} else {\r\n\t\t// if no header config provided - make sure scheduler container has all necessary elements\r\n\t\tif(!hasSchedulerMarkup(this.$container)){\r\n\t\t\tthrow new Error([\r\n\t\t\t\t\"Required DOM elements are missing from the scheduler container.\",\r\n\t\t\t\t\"Be sure to either specify them manually in the markup: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviamarkup\",\r\n\t\t\t\t\"Or to use **scheduler.config.header** setting so they could be created automatically: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviaheaderconfig\"\r\n\t\t\t].join(\"\\n\"));\r\n\t\t}\r\n\t}\r\n\r\n\tif (this.config.rtl) this.$container.className += \" dhx_cal_container_rtl\";\r\n\r\n\t//hook for terrace skin\r\n\tif (this._skin_init)\r\n\t\tscheduler._skin_init();\r\n\r\n\tscheduler.date.init();\r\n\r\n\tthis._scroll=true;\r\n\r\n\tthis._els=[];\r\n\tthis.get_elements();\r\n\tthis.init_templates();\r\n\tthis.set_actions();\r\n\r\n\tthis._init_once();\r\n\tthis._init_touch_events();\r\n\r\n\tthis.set_sizes();\r\n\tscheduler.callEvent('onSchedulerReady', []);\r\n\tscheduler.$initialized = true;\r\n\tthis.setCurrentView(date,mode);\r\n\r\n};\r\n\r\nscheduler.xy={\r\n\tmin_event_height:20,\r\n\tbar_height: 24,\r\n\tscale_width:50,\r\n\tscroll_width:18,\r\n\tscale_height:20,\r\n\tmonth_scale_height:20,\r\n\tmenu_width:25,\r\n\tmargin_top:0,\r\n\tmargin_left:0,\r\n\teditor_width:140,\r\n\tmonth_head_height:22,\r\n\tevent_header_height: 14\r\n};\r\nscheduler.keys={\r\n\tedit_save:13,\r\n\tedit_cancel:27\r\n};\r\n\r\nscheduler.bind = function bind(functor, object){\r\n\tif(functor.bind)\r\n\t\treturn functor.bind(object);\r\n\telse\r\n\t\treturn function(){ return functor.apply(object,arguments); };\r\n};\r\n\r\nscheduler.set_sizes=function(){\r\n\r\n\tvar w = this._x = this._obj.clientWidth-this.xy.margin_left;\r\n\r\n\t//not-table mode always has scroll - need to be fixed in future\r\n\tvar scale_x=this._table_view?0:(this.xy.scale_width+this.xy.scroll_width);\r\n\r\n\tvar materialScalePlaceholder = this.$container.querySelector(\".dhx_cal_scale_placeholder\");\r\n\tif(scheduler._is_material_skin()){\r\n\t\tif(!materialScalePlaceholder) {\r\n\t\t\tmaterialScalePlaceholder = document.createElement(\"div\");\r\n\t\t\tmaterialScalePlaceholder.className = \"dhx_cal_scale_placeholder\";\r\n\t\t\tthis.$container.insertBefore(materialScalePlaceholder, this._els[\"dhx_cal_header\"][0]);\r\n\t\t}\r\n\t\tmaterialScalePlaceholder.style.display = \"block\";\r\n\r\n\t\tthis.set_xy(materialScalePlaceholder,w,this.xy.scale_height + 1,0, this._els[\"dhx_cal_header\"][0].offsetTop);\r\n\r\n\t}else{\r\n\t\tif(materialScalePlaceholder){\r\n\t\t\tmaterialScalePlaceholder.parentNode.removeChild(materialScalePlaceholder);\r\n\t\t}\r\n\t}\r\n\r\n\tif (this._lightbox) {\r\n\t\tif (scheduler.$container.offsetWidth < 1200) {\r\n\t\t} else {\r\n\t\t\tthis._setLbPosition(document.querySelector(\".dhx_cal_light\"));\r\n\t\t}\r\n\t}\r\n\r\n\tthis._data_width = w-scale_x;\r\n\r\n\tthis._els[\"dhx_cal_navline\"][0].style.width = w + \"px\";\r\n\tconst header = this._els[\"dhx_cal_header\"][0];\r\n\tthis.set_xy(header, this._data_width, this.xy.scale_height);\r\n\t// this._els[\"dhx_cal_header\"][0].style.marginLeft = `${scheduler.xy.scale_width}px`;\r\n\theader.style.left = ``;\r\n\theader.style.right = ``;\r\n\tif(!this._table_view){\r\n\t\tif(this.config.rtl){\r\n\t\t\theader.style.right = `${this.xy.scale_width}px`;\r\n\t\t}else{\r\n\t\t\theader.style.left = `${this.xy.scale_width}px`;\r\n\t\t}\r\n\t} else {\r\n\t\tif(!this.config.rtl){\r\n\t\t\theader.style.left = `-1px`;\r\n\t\t} else {\r\n\t\t\theader.style.right = `-1px`;\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.set_xy=function(node,w,h,x,y){\r\n\tfunction prepareValue(val){\r\n\t\tlet prepared = val;\r\n\t\tif(!isNaN(Number(prepared))){\r\n\t\t\tprepared = Math.max(0,prepared) + \"px\";\r\n\t\t}\r\n\t\treturn prepared;\r\n\t}\r\n\r\n\tvar direction = 'left';\r\n\r\n\tif(w !== undefined) {\r\n\t\tnode.style.width = prepareValue(w);\r\n\t}\r\n\r\n\tif(h !== undefined){\r\n\t\tnode.style.height = prepareValue(h);\r\n\t}\r\n\r\n\tif (arguments.length>3){\r\n\r\n\t\tif(x !== undefined){\r\n\t\t\tif (this.config.rtl) direction = 'right';\r\n\t\t\tnode.style[direction]=x+\"px\";\r\n\t\t}\r\n\t\tif(y !== undefined){\r\n\t\t\tnode.style.top=y+\"px\";\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.get_elements=function(){\r\n\t//get all child elements as named hash\r\n\tconst els=this._obj.getElementsByTagName(\"DIV\");\r\n\tfor (let i=0; i < els.length; i++){\r\n\t\tlet class_name= scheduler._getClassName(els[i]);\r\n\t\tconst attr_value = els[i].getAttribute(\"data-tab\") || els[i].getAttribute(\"name\") || \"\";\r\n\t\tif (class_name) class_name = class_name.split(\" \")[0];\r\n\t\tif (!this._els[class_name]) this._els[class_name]=[];\r\n\t\tthis._els[class_name].push(els[i]);\r\n\r\n\t\t//check if name need to be changed\r\n\t\t// scheduler.locale.labels[attr_value+\"_tab\"] - to fix getting labels for data-tab\r\n\t\tlet label = scheduler.locale.labels[attr_value+\"_tab\"] || scheduler.locale.labels[attr_value||class_name];\r\n\t\tif (typeof label !== \"string\" && attr_value && !els[i].innerHTML)\r\n\t\t\tlabel = attr_value.split(\"_\")[0];\r\n\t\tif (label) {\r\n\t\t\tthis._waiAria.labelAttr(els[i], label);\r\n\t\t\tels[i].innerHTML = label;\r\n\t\t}\r\n\t}\r\n};\r\n\r\n\r\nconst domEventsScope = scheduler._createDomEventScope();\r\n\r\nscheduler.unset_actions = function(){\r\n\tdomEventsScope.detachAll();\r\n};\r\n\r\nscheduler.set_actions=function(){\r\n\tfor (const a in this._els){\r\n\t\tif (this._click[a]){\r\n\t\t\tfor (let i=0; i < this._els[a].length; i++){\r\n\t\t\t\tconst element = this._els[a][i];\r\n\t\t\t\tconst handler = this._click[a].bind(element);\r\n\t\t\t\tdomEventsScope.attach(element, \"click\", handler);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tdomEventsScope.attach(this._obj, \"selectstart\", function(e){\r\n\t\te.preventDefault();\r\n\t\treturn false;\r\n\t});\r\n\t//this._obj.onselectstart=function(e){ return false; };\r\n\tdomEventsScope.attach(this._obj, \"mousemove\", function(e){\r\n\t\tif (!scheduler._temp_touch_block)\r\n\t\t\tscheduler._on_mouse_move(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"mousedown\", function(e){\r\n\t\tif (!scheduler._ignore_next_click)\r\n\t\t\tscheduler._on_mouse_down(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"mouseup\", function(e){\r\n\t\tif (!scheduler._ignore_next_click)\r\n\t\t\tscheduler._on_mouse_up(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"dblclick\", function(e){\r\n\t\tscheduler._on_dbl_click(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"contextmenu\", function(event) {\r\n\t\tif(scheduler.checkEvent(\"onContextMenu\")){\r\n\t\t\t// block the default browser context menu \r\n\t\t\tevent.preventDefault();\r\n\t\t}\r\n\r\n\t\tconst returnValue = scheduler.callEvent(\"onContextMenu\", [scheduler._locate_event(event.target), event]);\r\n\t\treturn returnValue;\r\n\t});\r\n};\r\nscheduler.select=function(id){\r\n\tif (this._select_id==id) return;\r\n\tscheduler._close_not_saved();\r\n\tthis.editStop(false);\r\n\tif(this._select_id){\r\n\t\tthis.unselect();\r\n\t}\r\n\tthis._select_id = id;\r\n\tthis.updateEvent(id);\r\n\tthis.callEvent(\"onEventSelected\", [id]);\r\n};\r\nscheduler.unselect=function(id){\r\n\tif (id && id!=this._select_id) {\r\n\t\treturn;\r\n\t}\r\n\tconst previousSelection = this._select_id;\r\n\tthis._select_id = null;\r\n\tif (previousSelection && this.getEvent(previousSelection)) {\r\n\t\tthis.updateEvent(previousSelection);\r\n\t}\r\n\tthis.callEvent(\"onEventUnselected\", [previousSelection]);\r\n};\r\nscheduler.$stateProvider.registerProvider(\"global\", (function(){\r\n\treturn {\r\n\t\tmode: this._mode,\r\n\t\tdate: new Date(this._date),\r\n\t\tmin_date: new Date(this._min_date),\r\n\t\tmax_date: new Date(this._max_date),\r\n\t\teditor_id: this._edit_id,\r\n\t\tlightbox_id: this._lightbox_id,\r\n\t\tnew_event: this._new_event,\r\n\t\tselect_id: this._select_id,\r\n\t\texpanded: this.expanded,\r\n\t\tdrag_id: this._drag_id,\r\n\t\tdrag_mode: this._drag_mode\r\n\t};\r\n}).bind(scheduler));\r\n\r\nscheduler._click={\r\n\tdhx_cal_data:function(e){\r\n\t\t//in case of touch disable click processing\r\n\t\tif (scheduler._ignore_next_click){\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\r\n\t\tconst id = scheduler._locate_event(e.target);\r\n\r\n\t\tif (!id) {\r\n\t\t\tscheduler.callEvent(\"onEmptyClick\",[scheduler.getActionData(e).date, e]);\r\n\t\t} else {\r\n\t\t\tif ( !scheduler.callEvent(\"onClick\",[id,e]) || scheduler.config.readonly ) return;\r\n\t\t}\r\n\r\n\t\tif (id && scheduler.config.select) {\r\n\r\n\t\t\tscheduler.select(id);\r\n\t\t\tconst icon = e.target.closest(\".dhx_menu_icon\");\r\n\r\n\t\t\tconst mask = scheduler._getClassName(icon);\r\n\t\t\tif (mask.indexOf(\"_icon\")!=-1)\r\n\t\t\t\tscheduler._click.buttons[mask.split(\" \")[1].replace(\"icon_\",\"\")](id);\r\n\t\t} else{\r\n\t\t\tscheduler._close_not_saved();\r\n\t\t\tif (scheduler.getState().select_id && new Date().valueOf()-(scheduler._new_event||0) > 500){\r\n\t\t\t\tscheduler.unselect();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tdhx_cal_prev_button:function(){\r\n\t\tscheduler._click.dhx_cal_next_button(0,-1);\r\n\t},\r\n\tdhx_cal_next_button:function(dummy,step){\r\n\t\tlet def_step = 1;\r\n\t\tif (scheduler.config.rtl){\r\n\t\t\tstep = -step;\r\n\t\t\tdef_step = -def_step;\r\n\t\t}\r\n\t\tscheduler.setCurrentView(scheduler.date.add( //next line changes scheduler._date , but seems it has not side-effects\r\n\t\t\tscheduler.date[scheduler._mode+\"_start\"](new Date(scheduler._date)),(step||def_step),scheduler._mode));\r\n\t},\r\n\tdhx_cal_today_button:function(){\r\n\t\tif (scheduler.callEvent(\"onBeforeTodayDisplayed\", [])) {\r\n\t\t\tscheduler.setCurrentView(scheduler._currentDate());\r\n\t\t}\r\n\t},\r\n\tdhx_cal_tab:function(){\r\n\t\tconst name = this.getAttribute(\"data-tab\");\r\n\t\tconst deprecated_name = this.getAttribute(\"name\");\r\n\t\tconst mode = name || deprecated_name.substring(0, deprecated_name.search(\"_tab\"));\r\n\t\tscheduler.setCurrentView(scheduler._date,mode);\r\n\t},\r\n\tbuttons:{\r\n\t\t\"delete\":function(id){\r\n\t\t\tconst c = scheduler.locale.labels.confirm_deleting;\r\n\t\t\tscheduler._dhtmlx_confirm({message: c, title: scheduler.locale.labels.title_confirm_deleting, callback:function(){ scheduler.deleteEvent(id); },\r\n\t\t\tconfig: {ok: scheduler.locale.labels.icon_delete}\r\n\t\t});\r\n\t\t},\r\n\t\tedit:function(id){ scheduler.edit(id); },\r\n\t\tsave:function(id){ scheduler.editStop(true); },\r\n\t\tdetails:function(id){ scheduler.showLightbox(id); },\r\n\t\tform:function(id){ scheduler.showLightbox(id); },\r\n\t\tcancel:function(id){ scheduler.editStop(false); }\r\n\t}\r\n};\r\nscheduler._dhtmlx_confirm = function({message, title, callback, config}) {\r\n\tif (!message)\r\n\t\treturn callback();\r\n\r\n\tconfig = config || {};\r\n\tconst opts = { ...config, text: message };\r\n\tif (title) {\r\n\t\topts.title = title;\r\n\t}\r\n\tif (callback) {\r\n\t\topts.callback = function(result) {\r\n\t\t\tif (result) {\r\n\t\t\t\tcallback();\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\tscheduler.confirm(opts);\r\n};\r\nscheduler.addEventNow=function(start,end,e){\r\n\tlet base = {};\r\n\tif (scheduler._isObject(start) && !scheduler._isDate(start)){\r\n\t\tbase = start;\r\n\t\tstart = null;\r\n\t}\r\n\r\n\tconst duration = (this.config.event_duration||this.config.time_step)*60000;\r\n\tif (!start) start = base.start_date||Math.round((scheduler._currentDate()).valueOf()/duration)*duration;\r\n\tlet start_date = new Date(start);\r\n\tif (!end){\r\n\t\tlet start_hour = this.config.first_hour;\r\n\t\tif (start_hour > start_date.getHours()){\r\n\t\t\tstart_date.setHours(start_hour);\r\n\t\t\tstart = start_date.valueOf();\r\n\t\t}\r\n\t\tend = start.valueOf()+duration;\r\n\t}\r\n\tlet end_date = new Date(end);\r\n\r\n\t// scheduler.addEventNow(new Date(), new Date()) + collision though get_visible events defect (such event was not retrieved)\r\n\tif(start_date.valueOf() == end_date.valueOf())\r\n\t\tend_date.setTime(end_date.valueOf()+duration);\r\n\tbase.start_date = base.start_date||start_date;\r\n\tbase.end_date = base.end_date||end_date;\r\n\tbase.text = base.text||this.locale.labels.new_event;\r\n\tbase.id = this._drag_id = base.id || this.uid();\r\n\tthis._drag_mode=\"new-size\";\r\n\tthis._loading=true;\r\n\tconst eventId = this.addEvent(base);\r\n\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\tthis._loading=false;\r\n\r\n\tthis._drag_event={}; //dummy , to trigger correct event updating logic\r\n\tthis._on_mouse_up(e);\r\n\treturn eventId;\r\n};\r\nscheduler._on_dbl_click=function(e,src){\r\n\tsrc = src || e.target;\r\n\tif (this.config.readonly) return;\r\n\tconst name = scheduler._getClassName(src).split(\" \")[0];\r\n\tswitch(name){\r\n\t\tcase \"dhx_scale_holder\":\r\n\t\tcase \"dhx_scale_holder_now\":\r\n\t\tcase \"dhx_month_body\":\r\n\t\tcase \"dhx_wa_day_data\":\r\n\t\t\tif (!scheduler.config.dblclick_create) break;\r\n\t\t\tthis.addEventNow(this.getActionData(e).date,null,e);\r\n\t\t\tbreak;\r\n\t\tcase \"dhx_cal_event\":\r\n\t\tcase \"dhx_wa_ev_body\":\r\n\t\tcase \"dhx_agenda_line\":\r\n\t\tcase \"dhx_cal_agenda_event_line\":\r\n\t\tcase \"dhx_grid_event\":\r\n\t\tcase \"dhx_cal_event_line\":\r\n\t\tcase \"dhx_cal_event_clear\": {\r\n\t\t\tconst id = this._locate_event(src);\r\n\t\t\tif (!this.callEvent(\"onDblClick\",[id,e])) return;\r\n\t\t\tif (this.config.details_on_dblclick || this._table_view || !this.getEvent(id)._timed || !this.config.select)\r\n\t\t\t\tthis.showLightbox(id);\r\n\t\t\telse\r\n\t\t\t\tthis.edit(id);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcase \"dhx_time_block\":\r\n\t\tcase \"dhx_cal_container\":\r\n\t\t\treturn;\r\n\t\tdefault: {\r\n\t\t\tconst viewHandler = this[\"dblclick_\"+name];\r\n\t\t\tif (viewHandler) {\r\n\t\t\t\tviewHandler.call(this,e);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif (src.parentNode && src != this)\r\n\t\t\t\t\treturn scheduler._on_dbl_click(e,src.parentNode);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n};\r\n//column index by mouse x-coordinate\r\nscheduler._get_column_index = function(x_pos){\r\n\tlet column = 0;\r\n\tif (this._cols){\r\n\t\tlet width = 0;\r\n\t\tlet i = 0;\r\n\t\twhile (width + this._cols[i] < x_pos && i < this._cols.length){\r\n\t\t\twidth += this._cols[i];\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tcolumn = i + (this._cols[i] ? ((x_pos - width)/ this._cols[i]) : 0);\r\n\r\n\t\tif (this._ignores){\r\n\t\t\tif(column >= this._cols.length){\r\n\t\t\t\twhile(column >= 1 && this._ignores[Math.floor(column)]){\r\n\t\t\t\t\tcolumn--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n\treturn column;\r\n};\r\n\r\n//transform mouse coordinates to day-time indexes of week based view\r\nscheduler._week_indexes_from_pos = function(pos){\r\n\t//\"get position\" can be invoked before columns are loaded into the units view(e.g. by onMouseMove handler in key_nav.js)\r\n\tif(!this._cols){\r\n\t\treturn pos;\r\n\t}else{\r\n\t\tconst column = this._get_column_index(pos.x);\r\n\r\n\t\tpos.x=Math.min(this._cols.length-1, Math.max(0,Math.ceil(column)-1));\r\n\t\tpos.y=Math.max(0,Math.ceil(pos.y*60/(this.config.time_step*this.config.hour_size_px))-1)+this.config.first_hour*(60/this.config.time_step);\r\n\t\treturn pos;\r\n\t}\r\n};\r\n\r\nscheduler._mouse_coords=function(ev){\r\n\tlet pos;\r\n\tconst body = document.body;\r\n\tconst documentElement = document.documentElement;\r\n\tif (!this.$env.isIE && (ev.pageX || ev.pageY))\r\n\t\tpos={x:ev.pageX, y:ev.pageY};\r\n\telse pos={\r\n\t\tx:ev.clientX + (body.scrollLeft||documentElement.scrollLeft||0) - body.clientLeft,\r\n\t\ty:ev.clientY + (body.scrollTop||documentElement.scrollTop||0) - body.clientTop\r\n\t};\r\n\t//apply layout\r\n\tif (this.config.rtl && this._colsS) {\r\n\t\tpos.x = this.$container.querySelector(\".dhx_cal_data\").offsetWidth - pos.x;\r\n\t\tpos.x += this.$domHelpers.getAbsoluteLeft(this._obj);\r\n\t\tif (this._mode !== \"month\") {\r\n\t\t\tpos.x -= this.xy.scale_width;\r\n\t\t}\r\n\t} else {\r\n\t\tpos.x-=this.$domHelpers.getAbsoluteLeft(this._obj)+(this._table_view?0:this.xy.scale_width);\r\n\t}\r\n\r\n\tconst dataArea = this.$container.querySelector(\".dhx_cal_data\");\r\n\t//pos.y-=this.$domHelpers.getAbsoluteTop(this._obj)+this.xy.nav_height+(this._dy_shift||0)+this.xy.scale_height-this._els[\"dhx_cal_data\"][0].scrollTop;\r\n\tpos.y-=this.$domHelpers.getAbsoluteTop(dataArea)-this._els[\"dhx_cal_data\"][0].scrollTop;\r\n\tpos.ev = ev;\r\n\tconst handler = this[\"mouse_\"+this._mode];\r\n\tif (handler){\r\n\t\tpos = handler.call(this,pos);\r\n\t}else{\r\n\t\t//transform to date\r\n\t\tif (!this._table_view) {\r\n\t\t\tpos = this._week_indexes_from_pos(pos);\r\n\t\t} else {\r\n\t\t\tconst column = this._get_column_index(pos.x);\r\n\t\t\tif (!this._cols || !this._colsS) // agenda/map views\r\n\t\t\t\treturn pos;\r\n\t\t\tlet dy=0;\r\n\t\t\tfor (dy=1; dy < this._colsS.heights.length; dy++)\r\n\t\t\t\tif (this._colsS.heights[dy]>pos.y) break;\r\n\r\n\t\t\tpos.y=Math.ceil( (Math.max(0, column)+Math.max(0,dy-1)*7)*24*60/this.config.time_step );\r\n\r\n\t\t\tif (scheduler._drag_mode || this._mode == \"month\")\r\n\t\t\t\tpos.y=(Math.max(0,Math.ceil(column)-1)+Math.max(0,dy-1)*7)*24*60/this.config.time_step;\r\n\r\n\t\t\t//we care about ignored days only during event moving in month view\r\n\t\t\tif (this._drag_mode == \"move\"){\r\n\t\t\t\tif (scheduler._ignores_detected && scheduler.config.preserve_length){\r\n\t\t\t\t\tpos._ignores = true;\r\n\t\t\t\t\t//get real lengtn of event\r\n\t\t\t\t\tif (!this._drag_event._event_length)\r\n\t\t\t\t\t\tthis._drag_event._event_length = this._get_real_event_length(this._drag_event.start_date, this._drag_event.end_date, { x_step:1, x_unit:\"day\"});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tpos.x=0;\r\n\t\t}\r\n\t}\r\n\tpos.timestamp = +new Date();\r\n\treturn pos;\r\n};\r\nscheduler._close_not_saved=function(){\r\n\tif (new Date().valueOf()-(scheduler._new_event||0) > 500 && scheduler._edit_id){\r\n\t\tconst confirmationText=scheduler.locale.labels.confirm_closing;\r\n\r\n\t\tscheduler._dhtmlx_confirm({\r\n\t\t\tmessage: confirmationText, \r\n\t\t\ttitle: scheduler.locale.labels.title_confirm_closing, \r\n\t\t\tcallback: function() { \r\n\t\t\t\tscheduler.editStop(scheduler.config.positive_closing);\r\n\t\t\t}\r\n\t\t});\r\n\t\tif(confirmationText){\r\n\t\t\tthis._drag_id = this._drag_pos = this._drag_mode = null;\r\n\t\t}\r\n\t}\r\n};\r\nscheduler._correct_shift=function(start, back){\r\n\treturn start-=((new Date(scheduler._min_date)).getTimezoneOffset()-(new Date(start)).getTimezoneOffset())*60000*(back?-1:1);\r\n};\r\n\r\nscheduler._is_pos_changed = function(old_pos, new_pos){\r\n\tfunction diff(old_val, new_val, acc){\r\n\t\treturn !!(Math.abs(old_val - new_val) > acc);\r\n\t}\r\n\r\n\tif(!(old_pos && this._drag_pos)){\r\n\t\treturn true;\r\n\t}\r\n\tconst delay = 100;\r\n\tconst d_pos = 5;\r\n\r\n\t// start drag only if passed some time since mouse down, or if mouse position changed sufficiently\r\n\treturn !!(this._drag_pos.has_moved || !this._drag_pos.timestamp || (new_pos.timestamp - this._drag_pos.timestamp > delay) || diff(old_pos.ev.clientX, new_pos.ev.clientX, d_pos) || diff(old_pos.ev.clientY, new_pos.ev.clientY, d_pos));\r\n};\r\n\r\nscheduler._correct_drag_start_date = function(start){\r\n\tlet obj;\r\n\tif (scheduler.matrix)\r\n\t\tobj = scheduler.matrix[scheduler._mode];\r\n\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\tstart = new Date(start);\r\n\tlet len = 1;\r\n\tif(obj._start_correction || obj._end_correction)\r\n\t\tlen = (obj.last_hour||0)*60 - (start.getHours()*60+start.getMinutes()) || 1;\r\n\r\n\treturn start*1 + (scheduler._get_fictional_event_length(start, len, obj) - len);\r\n};\r\nscheduler._correct_drag_end_date = function(start, duration){\r\n\tlet obj;\r\n\tif (scheduler.matrix) {\r\n\t\tobj = scheduler.matrix[scheduler._mode];\r\n\t}\r\n\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\tconst end = start*1 + scheduler._get_fictional_event_length(start, duration, obj);\r\n\treturn new Date(end*1 - (scheduler._get_fictional_event_length(end, -1, obj, -1) + 1));\r\n};\r\n\r\nscheduler._on_mouse_move=function(e){\r\n\tif (this._drag_mode){\r\n\t\tvar pos=this._mouse_coords(e);\r\n\t\tif (this._is_pos_changed(this._drag_pos, pos)){\r\n\t\t\tvar start, end;\r\n\t\t\tif (this._edit_id!=this._drag_id)\r\n\t\t\t\tthis._close_not_saved();\r\n\r\n\t\t\tif(!this._drag_mode)\r\n\t\t\t\treturn;\r\n\r\n\t\t\tvar mousedownPos = null;\r\n\t\t\tif(this._drag_pos && !this._drag_pos.has_moved){\r\n\t\t\t\tmousedownPos = this._drag_pos;\r\n\t\t\t\tmousedownPos.has_moved = true;\r\n\t\t\t}\r\n\r\n\t\t\tthis._drag_pos = pos;\r\n\r\n\t\t\tthis._drag_pos.has_moved = true;\r\n\r\n\t\t\tif (this._drag_mode==\"create\"){\r\n\r\n\t\t\t\t// use mouse down position as a starting point for drag-create\r\n\t\t\t\tif(mousedownPos){\r\n\t\t\t\t\tpos = mousedownPos;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._close_not_saved();\r\n\t\t\t\tthis.unselect(this._select_id);\r\n\t\t\t\tthis._loading=true; //will be ignored by dataprocessor\r\n\r\n\t\t\t\tstart = this._get_date_from_pos(pos).valueOf();\r\n\r\n\t\t\t\tif (!this._drag_start) {\r\n\t\t\t\t\tvar res = this.callEvent(\"onBeforeEventCreated\", [e, this._drag_id]);\r\n\t\t\t\t\tif (!res){\r\n\t\t\t\t\t\tthis._loading=false;\r\n\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis._loading=false;\r\n\t\t\t\t\tthis._drag_start=start;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tend = start;\r\n\t\t\t\tif (end == this._drag_start) {\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar start_date = new Date(this._drag_start);\r\n\t\t\t\tvar end_date = new Date(end);\r\n\t\t\t\tif ( (this._mode == \"day\" || this._mode == \"week\") &&\r\n\t\t\t\t\t(start_date.getHours() == end_date.getHours() &&\r\n\t\t\t\t\tstart_date.getMinutes() == end_date.getMinutes()) ) {\r\n\t\t\t\t\t\tend_date = new Date(this._drag_start+1000);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\tthis._drag_id=this.uid();\r\n\t\t\t\tthis.addEvent(start_date, end_date, this.locale.labels.new_event, this._drag_id, pos.fields);\r\n\r\n\t\t\t\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\t\t\t\tthis._loading=false;\r\n\t\t\t\tthis._drag_mode=\"new-size\";\r\n\r\n\t\t\t}\r\n\r\n\t\t\tvar timeStep = this.config.time_step;\r\n\t\t\tvar ev=this.getEvent(this._drag_id);\r\n\t\t\tvar obj;\r\n\t\t\tif (scheduler.matrix)\r\n\t\t\t\tobj = scheduler.matrix[scheduler._mode];\r\n\t\t\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\t\t\tif (this._drag_mode==\"move\"){\r\n\t\t\t\tstart = this._min_date.valueOf()+(pos.y*this.config.time_step+pos.x*24*60)*60000;\r\n\t\t\t\tif (!pos.custom && this._table_view) {\r\n\t\t\t\t\tstart += this.date.time_part(ev.start_date) * 1000;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!this._table_view && this._dragEventBody && this._drag_event._move_event_shift === undefined) {\r\n\t\t\t\t\tthis._drag_event._move_event_shift = start - ev.start_date;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (this._drag_event._move_event_shift) {\r\n\t\t\t\t\tstart -= this._drag_event._move_event_shift;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstart = this._correct_shift(start);\r\n\r\n\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view && obj){\r\n\r\n\t\t\t\t\tstart = scheduler._correct_drag_start_date(start);\r\n\t\t\t\t\tend = scheduler._correct_drag_end_date(start,this._drag_event._event_length);\r\n\r\n\t\t\t\t} else\r\n\t\t\t\t\tend = ev.end_date.valueOf()-(ev.start_date.valueOf()-start);\r\n\t\t\t} else { // resize\r\n\t\t\t\tstart = ev.start_date.valueOf();\r\n\t\t\t\tend = ev.end_date.valueOf();\r\n\t\t\t\tif (this._table_view) {\r\n\t\t\t\t\tvar resize_date = this._min_date.valueOf()+pos.y*this.config.time_step*60000 + (pos.custom?0:24*60*60000);\r\n\t\t\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\t\t\tresize_date = this._correct_shift(resize_date, false);\r\n\t\t\t\t\t\tif( this._drag_from_start ) {\r\n\t\t\t\t\t\t\tvar day = 24*60*60000;\r\n\t\t\t\t\t\t\tif( resize_date <= scheduler.date.date_part(new Date(end+day-1)).valueOf() ) // to get end time as 23:59:59 and then the day start\r\n\t\t\t\t\t\t\t\tstart = resize_date - day;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tend = resize_date;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif(this.config.preserve_length) {\r\n\t\t\t\t\t\t\tif (pos.resize_from_start) {\r\n\t\t\t\t\t\t\t\tstart = scheduler._correct_drag_start_date(resize_date);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tend = scheduler._correct_drag_end_date(resize_date, 0);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tif (pos.resize_from_start) {\r\n\t\t\t\t\t\t\t\tstart = resize_date;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tend = resize_date;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar end_day_start = this.date.date_part(new Date(ev.end_date.valueOf() - 1)).valueOf();\r\n\t\t\t\t\tvar end_day_date = new Date(end_day_start);\r\n\t\t\t\t\tvar firstHour = this.config.first_hour;\r\n\t\t\t\t\tvar lastHour = this.config.last_hour;\r\n\t\t\t\t\tvar maxY = (lastHour - firstHour) * (60/timeStep);\r\n\r\n\t\t\t\t\tthis.config.time_step = 1;\r\n\t\t\t\t\tvar precisePos = this._mouse_coords(e);\r\n\t\t\t\t\tthis.config.time_step = timeStep;\r\n\r\n\t\t\t\t\tvar minDate = pos.y*timeStep*60000;\r\n\t\t\t\t\tvar maxDate = Math.min(pos.y + 1, maxY)*timeStep*60000;\r\n\t\t\t\t\tvar preciseDate = precisePos.y*60000;\r\n\r\n\t\t\t\t\t// rounding end date to the closest time step\r\n\t\t\t\t\tif(Math.abs(minDate - preciseDate) > Math.abs(maxDate - preciseDate)){\r\n\t\t\t\t\t\tend = end_day_start + maxDate;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tend = end_day_start + minDate;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = end + ((new Date(end)).getTimezoneOffset() - end_day_date.getTimezoneOffset()) * 60000;\r\n\t\t\t\t\tthis._els[\"dhx_cal_data\"][0].style.cursor=\"s-resize\";\r\n\t\t\t\t\tif (this._mode == \"week\" || this._mode == \"day\")\r\n\t\t\t\t\t\tend = this._correct_shift(end);\r\n\t\t\t\t}\r\n\t\t\t\tif (this._drag_mode == \"new-size\") {\r\n\t\t\t\t\tif (end <= this._drag_start){\r\n\t\t\t\t\t\tvar shift = pos.shift||((this._table_view && !pos.custom)?24*60*60000:0);\r\n\t\t\t\t\t\tstart = end-(pos.shift?0:shift);\r\n\t\t\t\t\t\tend = this._drag_start+(shift||(timeStep*60000));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tstart = this._drag_start;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (end<=start)\r\n\t\t\t\t\t\tend=start+timeStep*60000;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar new_end = new Date(end-1);\r\n\t\t\tvar new_start = new Date(start);\r\n\t\t\t//deny drag out of visible scheduler scale in timeline view\r\n\t\t\tif(this._drag_mode==\"move\" && scheduler.config.limit_drag_out &&\r\n\t\t\t\t(+new_start < +scheduler._min_date || +end > +scheduler._max_date)){\r\n\r\n\t\t\t\tif(+ev.start_date < +scheduler._min_date || +ev.end_date > +scheduler._max_date){\r\n\t\t\t\t\t// not move event if it's already outside time scale\r\n\t\t\t\t\tnew_start = new Date(ev.start_date);\r\n\t\t\t\t\tend = new Date(ev.end_date);\r\n\t\t\t\t}else{\r\n\r\n\t\t\t\t\tvar duration = end - new_start;\r\n\r\n\t\t\t\t\tif(+new_start < +scheduler._min_date){\r\n\t\t\t\t\t\tnew_start = new Date(scheduler._min_date);\r\n\t\t\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view){\r\n\t\t\t\t\t\t\tnew_start = new Date(scheduler._correct_drag_start_date(new_start));\r\n\t\t\t\t\t\t\tif(obj._start_correction)\r\n\t\t\t\t\t\t\t\tnew_start = new Date(new_start.valueOf() + obj._start_correction);\r\n\t\t\t\t\t\t\tend = new Date(new_start*1 + this._get_fictional_event_length(new_start, this._drag_event._event_length, obj));\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tend = new Date(+new_start + duration);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tend = new Date(scheduler._max_date);\r\n\r\n\t\t\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view){\r\n\t\t\t\t\t\t\tif(obj._end_correction)\r\n\t\t\t\t\t\t\t\tend = new Date(end.valueOf() - obj._end_correction);\r\n\t\t\t\t\t\t\tend = new Date(end*1 - this._get_fictional_event_length(end, 0, obj, true));\r\n\t\t\t\t\t\t\tnew_start = new Date(end*1 - this._get_fictional_event_length(end, this._drag_event._event_length, obj, true));\r\n\t\t\t\t\t\t\tif(this._ignores_detected){\r\n\t\t\t\t\t\t\t\tnew_start = scheduler.date.add(new_start, obj.x_step, obj.x_unit);\r\n\t\t\t\t\t\t\t\tend = new Date(end*1 - this._get_fictional_event_length(end, 0, obj, true));\r\n\t\t\t\t\t\t\t\tend = scheduler.date.add(end, obj.x_step, obj.x_unit);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tnew_start = new Date(+end - duration);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\tvar new_end = new Date(end-1);\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\t// fix event dates when resized to bottom of the column (day/week views)\r\n\t\t\tif(!this._table_view && this._dragEventBody &&\r\n\t\t\t\t!scheduler.config.all_timed &&\r\n\t\t\t\t((!scheduler._get_section_view() && pos.x != this._get_event_sday({start_date: new Date(start), end_date:new Date(start)})) || new Date(start).getHours() < this.config.first_hour)){\r\n\t\t\t\tvar duration = end - new_start;\r\n\t\t\t\tif (this._drag_mode == \"move\") {\r\n\t\t\t\t\tvar day = this._min_date.valueOf() + (pos.x * 24 * 60) * 60000;\r\n\t\t\t\t\tnew_start = new Date(day);\r\n\t\t\t\t\tnew_start.setHours(this.config.first_hour);\r\n\t\t\t\t\tend = new Date(new_start.valueOf() + duration);\r\n\t\t\t\t\tnew_end = new Date(end-1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// fix event dates when resized to bottom of the column (day/week views)\r\n\t\t\tif(!this._table_view &&\r\n\t\t\t\t!scheduler.config.all_timed &&\r\n\t\t\t\t((!scheduler.getView() && pos.x != this._get_event_sday({start_date: new Date(end), end_date:new Date(end)})) || new Date(end).getHours() >= this.config.last_hour)){\r\n\t\t\t\tvar duration = end - new_start;\r\n\t\t\t\tvar day = this._min_date.valueOf()+(pos.x*24*60)*60000;\r\n\t\t\t\tend = scheduler.date.date_part(new Date(day));\r\n\t\t\t\tend.setHours(this.config.last_hour);\r\n\t\t\t\tnew_end = new Date(end-1);\r\n\t\t\t\tif(this._drag_mode == \"move\"){\r\n\t\t\t\t\tnew_start = new Date(+end - duration);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//prevent out-of-borders situation for day|week view\r\n\t\t\tif ( this._table_view || (new_end.getDate()==new_start.getDate() && new_end.getHours()=ed)\r\n\t\t\t\tcls += ' dhx_after';\r\n\t\t\telse if (sd.valueOf()==cd.valueOf())\r\n\t\t\t\tcls += ' dhx_now';\r\n\r\n\t\t\tif (this._ignores_detected && this._ignores[j]){\r\n\t\t\t\tcls += \" dhx_scale_ignore\";\r\n\t\t\t}\r\n\r\n\t\t\tcell.className = cls + \" \" + this.templates.month_date_class(sd, cd);\r\n\r\n\t\t\tcell.setAttribute(\"data-cell-date\", scheduler.templates.format_date(sd));\r\n\t\t\tvar body_class = \"dhx_month_body\";\r\n\t\t\tvar head_class = \"dhx_month_head\";\r\n\t\t\tif (j === 0 && this.config.left_border) {\r\n\t\t\t\tbody_class += \" dhx_month_body_border\";\r\n\t\t\t\thead_class += \" dhx_month_head_border\";\r\n\t\t\t}\r\n\t\t\tif (!this._ignores_detected || !this._ignores[j]){\r\n\t\t\t\tcell.style.width = tdwidths[j];\r\n\t\t\t\tthis._waiAria.monthCellAttr(cell, sd);\r\n\r\n\t\t\t\tvar cellHead = document.createElement(\"div\");\r\n\t\t\t\tcellHead.style.height = scheduler.xy.month_head_height + \"px\";\r\n\t\t\t\tcellHead.className = head_class;\r\n\t\t\t\tcellHead.innerHTML = this.templates.month_day(sd);\r\n\t\t\t\tcell.appendChild(cellHead);\r\n\r\n\t\t\t\tvar cellBody = document.createElement(\"div\");\r\n\t\t\t\tcellBody.className = body_class;\r\n\t\t\t\t// cellBody.style.height = row_height + \"px\";\r\n\t\t\t\t// cellBody.style.width = tdwidths[j];\r\n\t\t\t\tcell.appendChild(cellBody);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tcell.appendChild(document.createElement(\"div\"));\r\n\t\t\t\tcell.appendChild(document.createElement(\"div\"));\r\n\t\t\t}\r\n\t\t\trendered_dates.push(sd);\r\n\t\t\tvar bf1 = sd.getDate();\r\n\t\t\tsd=this.date.add(sd,1,\"day\");\r\n\t\t\tif (sd.getDate() - bf1 > 1)\r\n\t\t\t\tsd = new Date(sd.getFullYear(), sd.getMonth(), bf1 + 1, 12, 0);\r\n\t\t}\r\n\r\n\t\tscheduler._colsS.heights[i] = cellheight;\r\n\t\tcellheight += getCellHeight(i);\r\n\t}\r\n\r\n\tthis._min_date = view_start;\r\n\tthis._max_date = sd;\r\n\r\n\tdiv.innerHTML = \"\";\r\n\tdiv.appendChild(table);\r\n\r\n\tthis._scales = {};\r\n\tvar cells = div.querySelectorAll('[data-cell-date]');\r\n\tcells.forEach((cell) => {\r\n\t\tconst date = scheduler.templates.parse_date(cell.getAttribute(\"data-cell-date\"));\r\n\t\tconst body = cell.querySelector(\".dhx_month_body\");\r\n\t\tthis._scales[+date] = body;\r\n\t\tthis.callEvent(\"onScaleAdd\", [this._scales[+date], date]);\r\n\t});\r\n\r\n\treturn this._max_date;\r\n};\r\n\r\nscheduler._reset_month_scale=function(b,dd,sd,rows){\r\n\t//recalculates rows height and redraws month layout\r\n\tvar ed=scheduler.date.add(dd,1,\"month\");\r\n\r\n\t//trim time part for comparison reasons\r\n\tvar cd = scheduler._currentDate();\r\n\tthis.date.date_part(cd);\r\n\tthis.date.date_part(sd);\r\n\r\n\trows = rows || Math.ceil(Math.round((ed.valueOf()-sd.valueOf()) / (60*60*24*1000) ) / 7);\r\n\r\n\tvar height = (Math.floor(b.clientHeight/rows) - this.xy.month_head_height);\r\n\r\n\tthis._colsS.height = height + this.xy.month_head_height;\r\n\tthis._colsS.heights = [];\r\n\r\n\treturn scheduler._render_month_scale(b, dd, sd, rows);\r\n\r\n};\r\n\r\nscheduler.getView = function (viewName) {\r\n\tif (!viewName) {\r\n\t\tviewName = scheduler.getState().mode;\r\n\t}\r\n\tif (scheduler.matrix && scheduler.matrix[viewName]) {\r\n\t\treturn scheduler.matrix[viewName];\r\n\t}\r\n\r\n\tif (scheduler._props && scheduler._props[viewName]) {\r\n\t\treturn scheduler._props[viewName];\r\n\t}\r\n\r\n\treturn null;\r\n};\r\n\r\nscheduler.getLabel = function(property, key) {\r\n\tvar sections = this.config.lightbox.sections;\r\n\tfor (var i=0; i scheduler.getState().max_date.valueOf()){\r\n\t\t\tendColumnIndex += getDaysDifference(endDate, scheduler.getState().max_date);\r\n\t\t}\r\n\t} else{\r\n\t\tendColumnIndex = Math.round(eventLength/60/60/1000/24);\r\n\t}\r\n\r\n\tvar last_column = true;\r\n\twhile (startColumnIndex < endColumnIndex){\r\n\t\tvar check = scheduler.date.add(endDate, -config.x_step, config.x_unit);\r\n\t\tif (ignore && ignore(endDate) && (!last_column || (last_column && ignore(check) ))){\r\n\t\t\teventLength -= (endDate-check);\r\n\r\n\t\t}else{\r\n\t\t\tlet excludedDuration = 0;\r\n\t\t\tconst intervalStart = new Date(Math.max(check.valueOf(), startDate.valueOf()));\r\n\t\t\tconst intervalEnd = endDate;\r\n\t\t\tconst leftCellCutOffStart = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.first_hour);\r\n\t\t\tconst leftCellCutOffEnd = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.last_hour||24);\r\n\t\t\tconst rightCellCutOffStart = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.first_hour);\r\n\t\t\tconst rightCellCutOffEnd = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.last_hour||24);\r\n\r\n\t\t\tif(intervalEnd.valueOf() > rightCellCutOffEnd.valueOf()){\r\n\t\t\t\texcludedDuration += intervalEnd - rightCellCutOffEnd;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalEnd.valueOf() > rightCellCutOffStart.valueOf()){\r\n\t\t\t\texcludedDuration += config._start_correction;\r\n\t\t\t} else {\r\n\t\t\t\texcludedDuration += intervalEnd.getHours()*60*60*1000 + intervalEnd.getMinutes()*60*1000;\r\n\t\t\t}\r\n\t\t\t// GS-2580: if the end date of the events is quals to the last_hour config, need to include that date\r\n\t\t\tif(intervalStart.valueOf() <= leftCellCutOffEnd.valueOf()){\r\n\t\t\t\texcludedDuration += config._end_correction;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalStart.valueOf() < leftCellCutOffStart.valueOf()){\r\n\t\t\t\texcludedDuration += (leftCellCutOffStart.valueOf() - intervalStart.valueOf());\r\n\t\t\t}\r\n\t\t\t\r\n\r\n\t\t\teventLength -= excludedDuration;\r\n\t\t\tlast_column = false;\r\n\t\t}\r\n\t\tendDate = check;\r\n\t\tendColumnIndex--;\r\n\t}\r\n\treturn eventLength;\r\n};\r\nscheduler._get_fictional_event_length=function(end_date, ev_length, obj, back){\r\n\tvar sd = new Date(end_date);\r\n\tvar dir = back ? -1 : 1;\r\n\r\n\t//get difference caused by first|last hour\r\n\tif (obj._start_correction || obj._end_correction){\r\n\t\tvar today;\r\n\t\tif (back)\r\n\t\t\ttoday = (sd.getHours()*60+sd.getMinutes()) - (obj.first_hour||0)*60;\r\n\t\telse\r\n\t\t\ttoday = (obj.last_hour||0)*60 - (sd.getHours()*60+sd.getMinutes());\r\n\t\tvar per_day = (obj.last_hour - obj.first_hour)*60;\r\n\t\tvar days = Math.ceil( (ev_length / (60*1000) - today ) / per_day);\r\n\t\tif(days < 0) days = 0;\r\n\t\tev_length += days * (24*60 - per_day) * 60 * 1000;\r\n\t}\r\n\r\n\tvar fd = new Date(end_date*1+ev_length*dir);\r\n\tvar ignore = this[\"ignore_\"+this._mode];\r\n\r\n\tvar start_slot = 0,\r\n\t\tend_slot;\r\n\tif (obj.render){\r\n\t\tstart_slot = this._get_date_index(obj, sd);\r\n\t\tend_slot = this._get_date_index(obj, fd);\r\n\t} else{\r\n\t\tend_slot = Math.round(ev_length/60/60/1000/24);\r\n\t}\r\n\r\n\twhile (start_slot*dir <= end_slot*dir){\r\n\t\tvar check = scheduler.date.add(sd, obj.x_step*dir, obj.x_unit);\r\n\t\tif (ignore && ignore(sd)){\r\n\t\t\tev_length += (check-sd)*dir;\r\n\t\t\tend_slot += dir;\r\n\t\t}\r\n\r\n\t\tsd = check;\r\n\t\tstart_slot+=dir;\r\n\t}\r\n\r\n\treturn ev_length;\r\n};\r\n\r\nscheduler._get_section_view = function(){\r\n\treturn this.getView();\r\n};\r\n\r\nscheduler._get_section_property = function(){\r\n\tif(this.matrix && this.matrix[this._mode]){\r\n\t\treturn this.matrix[this._mode].y_property;\r\n\t}else if(this._props && this._props[this._mode]){\r\n\t\treturn this._props[this._mode].map_to;\r\n\t}\r\n\treturn null;\r\n};\r\n\r\nscheduler._is_initialized = function(){\r\n\tvar state = this.getState();\r\n\treturn (this._obj && state.date && state.mode);\r\n};\r\nscheduler._is_lightbox_open = function(){\r\n\tvar state = this.getState();\r\n\treturn state.lightbox_id !== null && state.lightbox_id !== undefined;\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n(function(){\r\n\r\n\t// eslint-disable-next-line no-control-regex\r\n\tvar htmlTags = new RegExp(\"<(?:.|\\n)*?>\", \"gm\");\r\n\tvar extraSpaces = new RegExp(\" +\", \"gm\");\r\n\r\n\tfunction stripHTMLLite(htmlText){\r\n\t\treturn (htmlText + \"\")\r\n\t\t\t.replace(htmlTags, \" \").\r\n\t\t\treplace(extraSpaces, \" \");\r\n\t}\r\n\r\n\tvar singleQuotes = new RegExp(\"'\", \"gm\");\r\n\tfunction escapeQuotes(text){\r\n\t\treturn (text + \"\").replace(singleQuotes, \"'\");\r\n\t}\r\n\r\n\tscheduler._waiAria = {\r\n\t\tgetAttributeString: function(attr){\r\n\t\t\tvar attributes = [\" \"];\r\n\t\t\tfor(var i in attr){\r\n\t\t\t\tif(typeof attr[i] != \"function\" && typeof attr[i] != \"object\") {\r\n\t\t\t\t\tvar text = escapeQuotes(stripHTMLLite(attr[i]));\r\n\t\t\t\t\tattributes.push(i + \"='\" + text + \"'\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tattributes.push(\" \");\r\n\t\t\treturn attributes.join(\" \");\r\n\t\t},\r\n\t\tsetAttributes: function(div, values){\r\n\t\t\tfor(var i in values){\r\n\t\t\t\tdiv.setAttribute(i, stripHTMLLite(values[i]));\r\n\t\t\t}\r\n\t\t\treturn div;\r\n\t\t},\r\n\r\n\t\tlabelAttr: function(div, content){\r\n\t\t\treturn this.setAttributes(div, {\"aria-label\": content});\r\n\t\t},\r\n\t\tlabel: function(label){\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": label});\r\n\t\t},\r\n\r\n\t\t// day/week/units\r\n\r\n\t\thourScaleAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\r\n\t\t},\r\n\t\tmonthCellAttr: function(div, date){\r\n\t\t\tthis.labelAttr(div, scheduler.templates.day_date(date));\r\n\t\t},\r\n\r\n\t\tnavBarDateAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\t\t},\r\n\t\tdayHeaderAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\t\t},\r\n\r\n\t\tdayColumnAttr: function(div, date){\r\n\t\t\tthis.dayHeaderAttr(div, scheduler.templates.day_date(date));\r\n\t\t},\r\n\r\n\t\theaderButtonsAttributes: function(div, label){\r\n\t\t\treturn this.setAttributes(div, {\"role\":\"button\", \"aria-label\":label});\r\n\t\t},\r\n\r\n\t\theaderToggleState: function(div, isActive){\r\n\t\t\treturn this.setAttributes(div, {\"aria-pressed\": isActive ? \"true\" : \"false\"});\r\n\t\t},\r\n\r\n\r\n\t\tgetHeaderCellAttr:function(dateString){\r\n\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": dateString});\r\n\t\t},\r\n\r\n\r\n\t\teventAttr: function(event, div){\r\n\t\t\tthis._eventCommonAttr(event, div);\r\n\t\t},\r\n\r\n\r\n\t\t_eventCommonAttr: function(event, div){\r\n\t\t\tdiv.setAttribute(\"aria-label\", stripHTMLLite(scheduler.templates.event_text(event.start_date, event.end_date, event)));\r\n\r\n\t\t\tif(scheduler.config.readonly){\r\n\t\t\t\tdiv.setAttribute(\"aria-readonly\", true);\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif(event.$dataprocessor_class){\r\n\t\t\t\tdiv.setAttribute(\"aria-busy\", true);\r\n\t\t\t}\r\n\r\n\r\n\t\t\tdiv.setAttribute(\"aria-selected\",\r\n\t\t\t\t(scheduler.getState().select_id == event.id) ? \"true\" : \"false\");\r\n\t\t},\r\n\r\n\t\tsetEventBarAttr: function(event, div){\r\n\t\t\tthis._eventCommonAttr(event, div);\r\n\t\t},\r\n\r\n\t\t_getAttributes: function(attributeSetter, arg){\r\n\t\t\tvar result = {\r\n\t\t\t\tsetAttribute:function(name, value){\r\n\t\t\t\t\tthis[name] = value;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\tattributeSetter.apply(this, [arg, result]);\r\n\t\t\treturn result;\r\n\r\n\t\t},\r\n\r\n\t\teventBarAttrString: function(event){\r\n\t\t\treturn this.getAttributeString(this._getAttributes(this.setEventBarAttr, event));\r\n\t\t},\r\n\r\n\r\n\r\n\t\tagendaHeadAttrString :function(){\r\n\t\t\treturn this.getAttributeString({role: \"row\"});\r\n\t\t},\r\n\t\tagendaHeadDateString :function(label){\r\n\t\t\treturn this.getAttributeString({role: \"columnheader\", \"aria-label\": label});\r\n\t\t},\r\n\t\tagendaHeadDescriptionString :function(label){\r\n\t\t\treturn this.agendaHeadDateString(label);\r\n\t\t},\r\n\t\tagendaDataAttrString: function(){\r\n\t\t\treturn this.getAttributeString({role: \"grid\"});\r\n\t\t},\r\n\t\tagendaEventAttrString: function(event){\r\n\t\t\tvar attrs = this._getAttributes(this._eventCommonAttr, event);\r\n\r\n\t\t\tattrs[\"role\"] = \"row\";\r\n\r\n\t\t\treturn this.getAttributeString(attrs);\r\n\r\n\t\t},\r\n\t\tagendaDetailsBtnString: function(){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels.icon_details});\r\n\t\t},\r\n\r\n\r\n\t\tgridAttrString: function(){\r\n\t\t\treturn this.getAttributeString({role: \"grid\"});\r\n\t\t},\r\n\r\n\t\tgridRowAttrString: function(event){\r\n\t\t\treturn this.agendaEventAttrString(event);\r\n\t\t},\r\n\r\n\t\tgridCellAttrString: function(event, column, value){\r\n\t\t\treturn this.getAttributeString({\"role\":\"gridcell\", \"aria-label\": [\r\n\t\t\t\t(column.label === undefined ? column.id : column.label),\r\n\t\t\t\t\": \",\r\n\t\t\t\tvalue\r\n\t\t\t]});\r\n\t\t},\r\n\r\n\t\tmapAttrString: function(){\r\n\t\t\treturn this.gridAttrString();\r\n\t\t},\r\n\t\tmapRowAttrString: function(event){\r\n\t\t\treturn this.gridRowAttrString(event);\r\n\t\t},\r\n\t\tmapDetailsBtnString: function(){\r\n\t\t\treturn this.agendaDetailsBtnString();\r\n\t\t},\r\n\r\n\t\tminicalHeader: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"id\":headerId+\"\",\r\n\t\t\t\t\"aria-live\":\"assertice\",\r\n\t\t\t\t\"aria-atomic\":\"true\"\r\n\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalGrid: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"aria-labelledby\":headerId+\"\",\r\n\t\t\t\t\"role\":\"grid\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalRow: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"row\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalDayCell: function(div, date){\r\n\t\t\tvar selected = (date.valueOf() < scheduler._max_date.valueOf() && date.valueOf() >= scheduler._min_date.valueOf());\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"gridcell\",\r\n\t\t\t\t\"aria-label\": scheduler.templates.day_date(date),\r\n\t\t\t\t\"aria-selected\": selected ? \"true\" : \"false\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalHeadCell: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"columnheader\"\r\n\t\t\t});\r\n\t\t},\r\n\r\n\r\n\t\tweekAgendaDayCell: function(div, date){\r\n\t\t\tvar header = div.querySelector(\".dhx_wa_scale_bar\");\r\n\t\t\tvar content = div.querySelector(\".dhx_wa_day_data\");\r\n\t\t\tvar headerId = scheduler.uid() + \"\";\r\n\t\t\tthis.setAttributes(header, { \"id\": headerId});\r\n\t\t\tthis.setAttributes(content, { \"aria-labelledby\": headerId});\r\n\r\n\t\t},\r\n\t\tweekAgendaEvent: function(div, event){\r\n\t\t\tthis.eventAttr(event, div);\r\n\t\t},\r\n\r\n\t\tlightboxHiddenAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t},\r\n\r\n\t\tlightboxVisibleAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"false\");\r\n\t\t},\r\n\r\n\t\tlightboxSectionButtonAttrString: function(label){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":label, \"tabindex\":\"0\"});\r\n\t\t},\r\n\r\n\t\tyearHeader: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"id\":headerId+\"\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tyearGrid: function(div, headerId){\r\n\t\t\tthis.minicalGrid(div, headerId);\r\n\t\t},\r\n\t\tyearHeadCell: function(div){\r\n\t\t\treturn this.minicalHeadCell(div);\r\n\t\t},\r\n\t\tyearRow: function(div){\r\n\t\t\treturn this.minicalRow(div);\r\n\t\t},\r\n\t\tyearDayCell: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"gridcell\"\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\tlightboxAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t\tdiv.firstChild.setAttribute(\"role\", \"heading\");\r\n\t\t},\r\n\r\n\t\tlightboxButtonAttrString:function(buttonName){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels[buttonName], \"tabindex\":\"0\"});\r\n\t\t},\r\n\t\teventMenuAttrString: function(iconName){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels[iconName]});\r\n\t\t},\r\n\t\tlightboxHeader: function(div, headerText){\r\n\t\t\tdiv.setAttribute(\"aria-label\", headerText);\r\n\t\t},\r\n\r\n\t\tlightboxSelectAttrString: function(time_option){\r\n\t\t\tvar label = \"\";\r\n\r\n\t\t\tswitch (time_option) {\r\n\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.year;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%m\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.month;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%d\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.day;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%H:%i\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.hour + \" \" + scheduler.locale.labels.minute;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": label});\r\n\t\t},\r\n\r\n\r\n\t\tmessageButtonAttrString: function(buttonLabel){\r\n\t\t\treturn \"tabindex='0' role='button' aria-label='\"+buttonLabel+\"'\";\r\n\t\t},\r\n\r\n\t\tmessageInfoAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"alert\");\r\n\t\t\t//div.setAttribute(\"tabindex\", \"-1\");\r\n\t\t},\r\n\r\n\t\tmessageModalAttr: function(div, uid){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t\tif(uid){\r\n\t\t\t\tdiv.setAttribute(\"aria-labelledby\", uid);\r\n\t\t\t}\r\n\r\n\t\t\t//\tdiv.setAttribute(\"tabindex\", \"-1\");\r\n\t\t},\r\n\r\n\t\tquickInfoAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t},\r\n\r\n\t\tquickInfoHeaderAttrString: function(){\r\n\t\t\treturn \" role='heading' \";\r\n\t\t},\r\n\r\n\t\tquickInfoHeader: function(div, header){\r\n\t\t\tdiv.setAttribute(\"aria-label\", header);\r\n\t\t},\r\n\r\n\t\tquickInfoButtonAttrString: function(label){\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"role\":\"button\", \"aria-label\":label, \"tabindex\":\"0\"});\r\n\t\t},\r\n\r\n\t\ttooltipAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"tooltip\");\r\n\t\t},\r\n\r\n\t\ttooltipVisibleAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"false\");\r\n\t\t},\r\n\r\n\t\ttooltipHiddenAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t}\r\n\t};\r\n\r\n\tfunction isDisabled(){\r\n\t\treturn !scheduler.config.wai_aria_attributes;\r\n\t}\r\n\r\n\tfor(var i in scheduler._waiAria){\r\n\t\tscheduler._waiAria[i] = (function(payload){\r\n\t\t\treturn function(){\r\n\t\t\t\tif(isDisabled()){\r\n\t\t\t\t\treturn \" \";\r\n\t\t\t\t}\r\n\t\t\t\treturn payload.apply(this, arguments);\r\n\t\t\t};\r\n\t\t})(scheduler._waiAria[i]);\r\n\t}\r\n\r\n\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\treturn function assert(check, message){\r\n\t\tif (!check){\r\n\t\t\tif(scheduler.config.show_errors && scheduler.callEvent(\"onError\",[message]) !== false) {\r\n\t\t\t\tif (scheduler.message) {\r\n\t\t\t\t\tscheduler.message({type: \"error\", text: message, expire: -1});\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// eslint-disable-next-line\r\n\t\t\t\t\tconsole.log(message);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// eslint-disable-next-line no-debugger\r\n\t\t\t\tdebugger;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n}","export default function extend(scheduler) {\r\n\r\nif (window.jQuery){\r\n\r\n(function( $ ){\r\n\tvar counter = 0;\r\n\tvar methods = [];\r\n\t$.fn.dhx_scheduler = function(config){\r\n\t\tif (typeof(config) === 'string') {\r\n\t\t\tif (methods[config] ) {\r\n\t\t\t\treturn methods[config].apply(this, []);\r\n\t\t\t}else {\r\n\t\t\t\t$.error('Method ' + config + ' does not exist on jQuery.dhx_scheduler');\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvar views = [];\r\n\t\t\tthis.each(function() {\r\n\t\t\t\tif (this && this.getAttribute){\r\n\t\t\t\t\tif (!this.getAttribute(\"dhxscheduler\")){\r\n\t\t\t\t\t\tvar name = \"scheduler\";\r\n\t\t\t\t\t\tif (counter){\r\n\t\t\t\t\t\t\tname = \"scheduler\" + (counter+1);\r\n\t\t\t\t\t\t\twindow[name] = Scheduler.getSchedulerInstance();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tvar comp = window[name];\r\n\r\n\t\t\t\t\t\tthis.setAttribute(\"dhxscheduler\", name);\r\n\t\t\t\t\t\tfor (var key in config)\r\n\t\t\t\t\t\t\tif (key!=\"data\")\r\n\t\t\t\t\t\t\t\tcomp.config[key] = config[key];\r\n\r\n\t\t\t\t\t\tif (!this.getElementsByTagName(\"div\").length){\r\n\t\t\t\t\t\t\tthis.innerHTML = '
';\r\n\t\t\t\t\t\t\tthis.className += \" dhx_cal_container\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcomp.init(this, comp.config.date, comp.config.mode);\r\n\t\t\t\t\t\tif (config.data)\r\n\t\t\t\t\t\t\tcomp.parse(config.data);\r\n\r\n\t\t\t\t\t\tviews.push(comp);\r\n\t\t\t\t\t\tcounter++;\r\n\t\t\t\t\t} else\r\n\t\t\t\t\t\tviews.push(window[this.getAttribute(\"dhxscheduler\")]);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif (views.length === 1) return views[0];\r\n\t\t\treturn views;\r\n\t\t}\r\n\t};\r\n\r\n\r\n\r\n\r\n})(window.jQuery);\r\n\r\n}\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler.destructor = function(){\r\n\tscheduler.callEvent(\"onDestroy\", []);\r\n\tthis.clearAll();\r\n\r\n\tif(this.$container){\r\n\t\t// FIXME: clear container or remove container\r\n\t\tthis.$container.innerHTML = \"\";\r\n\t\t// scheduler.$domHelpers.remove(this.$container);\r\n\t}\r\n\r\n\tif(this._eventRemoveAll){\r\n\t\tthis._eventRemoveAll();\r\n\t}\r\n\r\n\tif(this.resetLightbox){\r\n\t\tthis.resetLightbox();\r\n\t}\r\n\r\n\tif(this._dp && this._dp.destructor){\r\n\t\tthis._dp.destructor();\r\n\t}\r\n\r\n\t// detachAllEvents should be called last, because in components may be attached events\r\n\tthis.detachAllEvents();\r\n\r\n\tfor(var i in this){\r\n\t\tif(i.indexOf(\"$\") === 0){\r\n\t\t\tdelete this[i];\r\n\t\t}\r\n\t}\r\n\tscheduler.$destroyed = true;\r\n};\r\n\r\n}","import serialize from \"../common/url_serialize.js\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler.Promise = window.Promise; \r\n\r\nfunction createConfig(method, args) {\r\n\tvar result = {\r\n\t\tmethod: method\r\n\t};\r\n\r\n\tif (args.length === 0) {\r\n\t\tthrow new Error(\"Arguments list of query is wrong.\");\r\n\t}\r\n\tif (args.length === 1) {\r\n\t\tif (typeof args[0] === \"string\") {\r\n\t\t\tresult.url = args[0];\r\n\t\t\tresult.async = true;\r\n\t\t} else {\r\n\t\t\tresult.url = args[0].url;\r\n\t\t\tresult.async = (args[0].async || true);\r\n\t\t\tresult.callback = args[0].callback;\r\n\t\t\tresult.headers = args[0].headers;\r\n\t\t}\r\n\t\tif (method === \"POST\" || \"PUT\") {\r\n\t\t\tif (args[0].data) {\r\n\t\t\t\tif (typeof args[0].data !== \"string\") {\r\n\t\t\t\t\tresult.data = serialize(args[0].data);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult.data = args[0].data;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tresult.data = \"\";\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n\tresult.url = args[0];\r\n\tswitch(method) {\r\n\t\tcase \"GET\":\r\n\t\tcase \"DELETE\":\r\n\t\t\tresult.callback = args[1];\r\n\t\t\tresult.headers = args[2];\r\n\t\tbreak;\r\n\t\tcase \"POST\":\r\n\t\tcase \"PUT\":\r\n\t\t\tif (args[1]) {\r\n\t\t\t\tif (typeof args[1] !== \"string\") {\r\n\t\t\t\t\tresult.data = serialize(args[1]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult.data = args[1];\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tresult.data = \"\";\r\n\t\t\t}\r\n\t\t\tresult.callback = args[2];\r\n\t\t\tresult.headers = args[3];\r\n\t\tbreak;\r\n\t}\r\n\treturn result;\r\n}\r\nscheduler.ajax = {\r\n\t// if false - dhxr param will added to prevent caching on client side (default),\r\n\t// if true - do not add extra params\r\n\tcache: true,\r\n\r\n\t// default method for load/loadStruct, post/get allowed\r\n\tmethod: \"get\",\r\n\r\n\tserializeRequestParams: serialize,\r\n\tparse: function(data) {\r\n\t\tif (typeof data !== \"string\") return data;\r\n\r\n\t\tvar obj;\r\n\t\tdata = data.replace(/^[\\s]+/,\"\");\r\n\t\tif (typeof DOMParser !== \"undefined\" && !scheduler.$env.isIE) { // ff,ie9\r\n\t\t\tobj = (new DOMParser()).parseFromString(data, \"text/xml\");\r\n\t\t} else if (typeof window.ActiveXObject !== \"undefined\") {\r\n\t\t\tobj = new window.ActiveXObject(\"Microsoft.XMLDOM\");\r\n\t\t\tobj.async = \"false\";\r\n\t\t\tobj.loadXML(data);\r\n\t\t}\r\n\t\treturn obj;\r\n\t},\r\n\txmltop: function(tagname, xhr, obj) {\r\n\t\tif (typeof xhr.status == \"undefined\" || xhr.status < 400) {\r\n\t\t\tvar xml = (!xhr.responseXML) ? this.parse(xhr.responseText || xhr) : (xhr.responseXML || xhr);\r\n\t\t\tif (xml && xml.documentElement !== null && !xml.getElementsByTagName(\"parsererror\").length) {\r\n\t\t\t\treturn xml.getElementsByTagName(tagname)[0];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (obj !== -1) scheduler.callEvent(\"onLoadXMLError\",[\"Incorrect XML\", arguments[1], obj]);\r\n\t\treturn document.createElement(\"DIV\");\r\n\t},\r\n\txpath: function(xpathExp, docObj) {\r\n\t\tif (!docObj.nodeName) docObj = docObj.responseXML || docObj;\r\n\t\tif (scheduler.$env.isIE) {\r\n\t\t\treturn docObj.selectNodes(xpathExp)||[];\r\n\t\t} else {\r\n\t\t\tvar rows = [];\r\n\t\t\tvar first;\r\n\t\t\tvar col = (docObj.ownerDocument||docObj).evaluate(xpathExp, docObj, null, XPathResult.ANY_TYPE, null);\r\n\r\n\t\t\twhile (true){\r\n\t\t\t\tfirst = col.iterateNext();\r\n\t\t\t\tif(first){\r\n\t\t\t\t\trows.push(first);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn rows;\r\n\t\t}\r\n\t},\r\n\tquery: function(config) {\r\n\t\treturn this._call(\r\n\t\t\t(config.method || \"GET\"),\r\n\t\t\tconfig.url,\r\n\t\t\tconfig.data || \"\",\r\n\t\t\t(config.async || true),\r\n\t\t\tconfig.callback,\r\n\t\t\tconfig.headers\r\n\t\t);\r\n\t},\r\n\tget: function(url, onLoad, headers) {\r\n\t\tvar config = createConfig(\"GET\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tgetSync: function(url, headers) {\r\n\t\tvar config = createConfig(\"GET\", arguments);\r\n\t\tconfig.async = false;\r\n\t\treturn this.query(config);\r\n\t},\r\n\tput: function(url, postData, onLoad, headers) {\r\n\t\tvar config = createConfig(\"PUT\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tdel: function(url, onLoad, headers) {\r\n\t\t/**\r\n\t\t * https://tools.ietf.org/html/rfc7231#section-4.3.5\r\n\t\t * A payload within a DELETE request message has no defined semantics;\r\n\t\t * sending a payload body on a DELETE request might cause some existing\r\n\t\t * implementations to reject the request.\r\n\t\t */\r\n\t\tvar config = createConfig(\"DELETE\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tpost: function(url, postData, onLoad, headers) {\r\n\t\tif (arguments.length == 1) {\r\n\t\t\tpostData = \"\";\r\n\t\t} else if (arguments.length == 2 && typeof(postData) == \"function\") {\r\n\t\t\tonLoad = postData;\r\n\t\t\tpostData = \"\";\r\n\t\t}\r\n\t\tvar config = createConfig(\"POST\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tpostSync: function(url, postData, headers) {\r\n\t\tpostData = (postData === null ? \"\" : String(postData));\r\n\r\n\t\tvar config = createConfig(\"POST\", arguments);\r\n\t\tconfig.async = false;\r\n\t\treturn this.query(config);\r\n\t},\r\n\t_call: function(method, url, postData, async, onLoad, headers) {\r\n\t\treturn new scheduler.Promise((function(resolve, reject) {\r\n\t\t\tvar t = (typeof XMLHttpRequest !== undefined && !scheduler.$env.isIE ? new XMLHttpRequest() : new window.ActiveXObject(\"Microsoft.XMLHTTP\"));\r\n\t\t\tvar isQt = (navigator.userAgent.match(/AppleWebKit/) !== null && navigator.userAgent.match(/Qt/) !== null && navigator.userAgent.match(/Safari/) !== null);\r\n\r\n\t\t\tif (!!async) {\r\n\t\t\t\tt.addEventListener(\"readystatechange\", function() {\r\n\t\t\t\t\tif ((t.readyState == 4) || (isQt && t.readyState == 3)) { // what for long response and status 404?\r\n\t\t\t\t\t\tif (t.status != 200 || t.responseText === \"\")\r\n\t\t\t\t\t\t\tif (!scheduler.callEvent(\"onAjaxError\", [t])) return;\r\n\r\n\t\t\t\t\t\tsetTimeout(function() {\r\n\t\t\t\t\t\t\tif (typeof(onLoad) == \"function\") {\r\n\t\t\t\t\t\t\t\tonLoad.apply(window, [{xmlDoc:t, filePath:url}]); // dhtmlx-compat, response.xmlDoc.responseXML/responseText\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tresolve(t);\r\n\t\t\t\t\t\t\tif (typeof(onLoad) == \"function\") {\r\n\t\t\t\t\t\t\t\tonLoad = null;\r\n\t\t\t\t\t\t\t\tt = null;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}, 0);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (method == \"GET\" && !this.cache) {\r\n\t\t\t\turl += (url.indexOf(\"?\")>=0?\"&\":\"?\")+\"dhxr\"+new Date().getTime()+\"=1\";\r\n\t\t\t}\r\n\r\n\t\t\tt.open(method, url, async);\r\n\r\n\t\t\tif (headers){\r\n\t\t\t\tfor (var key in headers)\r\n\t\t\t\t\tt.setRequestHeader(key, headers[key]);\r\n\t\t\t} else if (method.toUpperCase() == \"POST\" || method == \"PUT\" || method == \"DELETE\") {\r\n\t\t\t\tt.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\r\n\t\t\t} else if (method == \"GET\") {\r\n\t\t\t\tpostData = null;\r\n\t\t\t}\r\n\r\n\t\t\tt.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\r\n\r\n\t\t\tt.send(postData);\r\n\r\n\t\t\tif (!async) return {xmlDoc:t, filePath:url}; // dhtmlx-compat, response.xmlDoc.responseXML/responseText\r\n\t\t}.bind(this)));\r\n\t},\r\n\turlSeparator: function(str){\r\n\t\tif (str.indexOf(\"?\") != -1)\r\n\t\t\treturn \"&\";\r\n\t\telse\r\n\t\t\treturn \"?\";\r\n\t}\r\n};\r\n\r\nscheduler.$ajax = scheduler.ajax; // for old\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n/*\r\n%e\tDay of the month without leading zeros (01..31)\r\n%d\tDay of the month, 2 digits with leading zeros (01..31)\r\n%j\tDay of the year, 3 digits with leading zeros (001..366)\r\n%a\tA textual representation of a day, two letters\r\n%W\tA full textual representation of the day of the week\r\n\r\n%c\tNumeric representation of a month, without leading zeros (0..12)\r\n%m\tNumeric representation of a month, with leading zeros (00..12)\r\n%b\tA short textual representation of a month, three letters (Jan..Dec)\r\n%M\tA full textual representation of a month, such as January or March (January..December)\r\n\r\n%y\tA two digit representation of a year (93..03)\r\n%Y\tA full numeric representation of a year, 4 digits (1993..03)\r\n*/\r\n\r\nscheduler.config={\r\n\tdefault_date: \"%j %M %Y\",\r\n\tmonth_date: \"%F %Y\",\r\n\tload_date: \"%Y-%m-%d\",\r\n\tweek_date: \"%l\",\r\n\tday_date: \"%D %j\",\r\n\thour_date: \"%H:%i\",\r\n\tmonth_day: \"%d\",\r\n\t//xml_date: \"%m/%d/%Y %H:%i\",\r\n\tdate_format: \"%Y-%m-%d %H:%i\",\r\n\tapi_date: \"%d-%m-%Y %H:%i\",\r\n\tparse_exact_format: false,\r\n\tpreserve_length:true,\r\n\ttime_step: 5,\r\n\tdisplayed_event_color: \"#ff4a4a\",\r\n\tdisplayed_event_text_color: \"#ffef80\",\r\n\twide_form: 0,\r\n\tday_column_padding: 8,\r\n\tuse_select_menu_space: true,\r\n\tfix_tab_position: true,\r\n\tstart_on_monday: true,\r\n\tfirst_hour: 0,\r\n\tlast_hour: 24,\r\n\treadonly: false,\r\n\tdrag_resize: true,\r\n\tdrag_move: true,\r\n\tdrag_create: true,\r\n\tdrag_event_body: true,\r\n\tdblclick_create: true,\r\n\tdetails_on_dblclick: true,\r\n\tedit_on_create: true,\r\n\tdetails_on_create: true,\r\n\theader: null,\r\n\thour_size_px: 44,\r\n\tresize_month_events:false,\r\n\tresize_month_timed:false,\r\n\tresponsive_lightbox: false,\r\n\tseparate_short_events: true,\r\n\trtl:false,\r\n\r\n\tcascade_event_display: false,\r\n\tcascade_event_count: 4,\r\n\tcascade_event_margin: 30,\r\n\r\n\tmulti_day:true,\r\n\tmulti_day_height_limit: 200,\r\n\r\n\tdrag_lightbox: true,\r\n\tpreserve_scroll: true,\r\n\tselect: true,\r\n\tundo_deleted: true,\r\n\tserver_utc: false,\r\n\ttouch:true,\r\n\ttouch_tip:true,\r\n\ttouch_drag:500,\r\n\ttouch_swipe_dates: false,\r\n\tquick_info_detached:true,\r\n\r\n\tpositive_closing: false,\r\n\t//header_datepicker: true,\r\n\tdrag_highlight: true,\r\n\tlimit_drag_out: false,\r\n\ticons_edit: [\"icon_save\", \"icon_cancel\"],\r\n\ticons_select: [\"icon_details\", \"icon_edit\", \"icon_delete\"],\r\n\tbuttons_left: [\"dhx_save_btn\", \"dhx_cancel_btn\"],\r\n\tbuttons_right: [\"dhx_delete_btn\"],\r\n\tlightbox: {\r\n\t\tsections: [\r\n\t\t\t{name: \"description\", map_to: \"text\", type: \"textarea\", focus: true},\r\n\t\t\t{name: \"time\", height: 72, type: \"time\", map_to: \"auto\"}\r\n\t\t]\r\n\t},\r\n\thighlight_displayed_event: true,\r\n\tleft_border: false,\r\n\r\n\tajax_error: \"alert\",//\"ignore\"|\"console\"\r\n\tdelay_render: 0,\r\n\ttimeline_swap_resize: true,\r\n\twai_aria_attributes: true,\r\n\twai_aria_application_role: true,\r\n\r\n\tcsp: \"auto\",\r\n\tevent_attribute: \"data-event-id\",\r\n\tshow_errors: true\r\n};\r\n\r\nscheduler.config.buttons_left.$initial = scheduler.config.buttons_left.join();\r\nscheduler.config.buttons_right.$initial = scheduler.config.buttons_right.join();\r\n\r\nscheduler._helpers = {\r\n\tparseDate: function parseDate(date) {\r\n\t\tvar parse = scheduler.templates.xml_date || scheduler.templates.parse_date;\r\n\t\treturn parse(date);\r\n\t},\r\n\tformatDate: function formatDate(date) {\r\n\t\tvar format = scheduler.templates.xml_format || scheduler.templates.format_date;\r\n\t\treturn format(date);\r\n\t}\r\n};\r\n\r\nscheduler.templates={};\r\nscheduler.init_templates=function(){\r\n\r\n\r\n\r\n\tvar d=scheduler.date.date_to_str;\r\n\tvar c=scheduler.config;\r\n\tvar f = function(a,b){\r\n\t\tfor (var c in b)\r\n\t\t\tif (!a[c]) a[c]=b[c];\r\n\t};\r\n\tf(scheduler.templates,{\r\n\t\tday_date:d(c.default_date),\r\n\t\tmonth_date:d(c.month_date),\r\n\t\tweek_date:function(d1,d2){\r\n\t\t\tif(c.rtl) {\r\n\t\t\t\treturn scheduler.templates.day_date(scheduler.date.add(d2,-1,\"day\"))+\" – \"+scheduler.templates.day_date(d1);\r\n\t\t\t} \r\n\t\t\treturn scheduler.templates.day_date(d1)+\" – \"+scheduler.templates.day_date(scheduler.date.add(d2,-1,\"day\"));\r\n\t\t},\r\n\t\tday_scale_date:d(c.default_date),\r\n\t\ttime_slot_text: function(date){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\ttime_slot_class: function(date){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\r\n\t\tmonth_scale_date:d(c.week_date),\r\n\t\tweek_scale_date:d(c.day_date),\r\n\t\thour_scale:d(c.hour_date),\r\n\t\ttime_picker:d(c.hour_date),\r\n\t\tevent_date:d(c.hour_date),\r\n\t\tmonth_day:d(c.month_day),\r\n\r\n\t\tload_format: d(c.load_date),\r\n\t//\txml_date:scheduler.date.str_to_date(c.xml_date,c.server_utc),\r\n\t//\txml_format:d(c.date_format,c.server_utc),\r\n\t\tformat_date: d(c.date_format, c.server_utc),\r\n\t\tparse_date:scheduler.date.str_to_date(c.date_format,c.server_utc),\r\n\t\tapi_date:scheduler.date.str_to_date(c.api_date, false, false),\r\n\t\tevent_header:function(start,end,ev){\r\n\r\n\t\t\tif(ev._mode === \"small\" || ev._mode === \"smallest\"){\r\n\t\t\t\treturn scheduler.templates.event_date(start);\r\n\t\t\t}else{\r\n\t\t\t\treturn scheduler.templates.event_date(start)+\" - \"+scheduler.templates.event_date(end);\r\n\t\t\t}\r\n\t\t},\r\n\t\tevent_text:function(start,end,ev){\r\n\t\t\treturn ev.text;\r\n\t\t},\r\n\t\tevent_class:function(start,end,ev){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tmonth_date_class:function(d){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tweek_date_class:function(d){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tevent_bar_date:function(start,end,ev) {\r\n\t\t\treturn scheduler.templates.event_date(start);\r\n\t\t},\r\n\t\tevent_bar_text:function(start,end,ev){\r\n\t\t\treturn ev.text;\r\n\t\t},\r\n\t\tmonth_events_link : function(date, count){\r\n\t\t\treturn \"View more(\"+count+\" events)\";\r\n\t\t},\r\n\t\tdrag_marker_class : function(start, end, event){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tdrag_marker_content : function(start, end, event){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\t/* Could be redifined */\r\n\t\ttooltip_date_format: scheduler.date.date_to_str(\"%Y-%m-%d %H:%i\"),\r\n\t\ttooltip_text: function(start, end, event) {\r\n\t\t\treturn \"Event: \" + event.text + \"
Start date: \" + scheduler.templates.tooltip_date_format(start) + \"
End date: \" + scheduler.templates.tooltip_date_format(end);\r\n\t\t},\r\n\r\n\t\tcalendar_month: d(\"%F %Y\"),\r\n\t\tcalendar_scale_date: d(\"%D\"),\r\n\t\tcalendar_date: d(\"%d\"),\r\n\t\tcalendar_time: d(\"%d-%m-%Y\")\r\n\r\n\t});\r\n\tthis.callEvent(\"onTemplatesReady\",[]);\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler._events = {};\r\nscheduler.clearAll = function() {\r\n\tthis._events = {};\r\n\tthis._loaded = {};\r\n\r\n\tthis._edit_id = null;\r\n\tthis._select_id = null;\r\n\tthis._drag_id = null;\r\n\tthis._drag_mode = null;\r\n\tthis._drag_pos = null;\r\n\tthis._new_event = null;\r\n\r\n\tthis.clear_view();\r\n\tthis.callEvent(\"onClearAll\", []);\r\n};\r\nscheduler.addEvent = function(start_date, end_date, text, id, extra_data) {\r\n\tif (!arguments.length)\r\n\t\treturn this.addEventNow();\r\n\tvar ev = start_date;\r\n\tif (arguments.length != 1) {\r\n\t\tev = extra_data || {};\r\n\t\tev.start_date = start_date;\r\n\t\tev.end_date = end_date;\r\n\t\tev.text = text;\r\n\t\tev.id = id;\r\n\t}\r\n\tev.id = ev.id || scheduler.uid();\r\n\tev.text = ev.text || \"\";\r\n\r\n\tif (typeof ev.start_date == \"string\") ev.start_date = this.templates.api_date(ev.start_date);\r\n\tif (typeof ev.end_date == \"string\") ev.end_date = this.templates.api_date(ev.end_date);\r\n\tvar d = (this.config.event_duration || this.config.time_step) * 60000;\r\n\tif (ev.start_date.valueOf() == ev.end_date.valueOf())\r\n\t\tev.end_date.setTime(ev.end_date.valueOf() + d);\r\n\r\n\tev.start_date.setMilliseconds(0);\r\n\tev.end_date.setMilliseconds(0);\r\n\r\n\tev._timed = this.isOneDayEvent(ev);\r\n\r\n\tvar is_new = !this._events[ev.id];\r\n\tthis._events[ev.id] = ev;\r\n\tthis.event_updated(ev);\r\n\tif (!this._loading)\r\n\t\tthis.callEvent(is_new ? \"onEventAdded\" : \"onEventChanged\", [ev.id, ev]);\r\n\treturn ev.id;\r\n};\r\nscheduler.deleteEvent = function(id, silent) {\r\n\tvar ev = this._events[id];\r\n\tif (!silent && (!this.callEvent(\"onBeforeEventDelete\", [id, ev]) || !this.callEvent(\"onConfirmedBeforeEventDelete\", [id, ev])))\r\n\t\treturn;\r\n\tif (ev) {\r\n\t\tif(scheduler.getState().select_id == id){\r\n\t\t\tscheduler.unselect();\r\n\t\t}\r\n\t\tdelete this._events[id];\r\n\t\tthis.event_updated(ev);\r\n\r\n\t\tif(this._drag_id == ev.id){\r\n\t\t\tthis._drag_id = null;\r\n\t\t\tthis._drag_mode=null;\r\n\t\t\tthis._drag_pos=null;\r\n\t\t}\r\n\t}\r\n\r\n\tthis.callEvent(\"onEventDeleted\", [id, ev]);\r\n};\r\nscheduler.getEvent = function(id) {\r\n\treturn this._events[id];\r\n};\r\nscheduler.setEvent = function(id, hash) {\r\n\tif(!hash.id)\r\n\t\thash.id = id;\r\n\r\n\tthis._events[id] = hash;\r\n};\r\nscheduler.for_rendered = function(id, method) {\r\n\tfor (var i = this._rendered.length - 1; i >= 0; i--)\r\n\t\tif (this._rendered[i].getAttribute(this.config.event_attribute) == id)\r\n\t\t\tmethod(this._rendered[i], i);\r\n};\r\nscheduler.changeEventId = function(id, new_id) {\r\n\tif (id == new_id) return;\r\n\tvar ev = this._events[id];\r\n\tif (ev) {\r\n\t\tev.id = new_id;\r\n\t\tthis._events[new_id] = ev;\r\n\t\tdelete this._events[id];\r\n\t}\r\n\tthis.for_rendered(id, function(r) {\r\n\t\tr.setAttribute(\"event_id\", new_id); // for backward compatibility\r\n\t\tr.setAttribute(scheduler.config.event_attribute, new_id);\r\n\t});\r\n\tif (this._select_id == id) this._select_id = new_id;\r\n\tif (this._edit_id == id) this._edit_id = new_id;\r\n\t//if (this._drag_id==id) this._drag_id=new_id;\r\n\tthis.callEvent(\"onEventIdChange\", [id, new_id]);\r\n};\r\n\r\n(function() {\r\n\tvar attrs = [\"text\", \"Text\", \"start_date\", \"StartDate\", \"end_date\", \"EndDate\"];\r\n\tvar create_getter = function(name) {\r\n\t\treturn function(id) { return (scheduler.getEvent(id))[name]; };\r\n\t};\r\n\tvar create_setter = function(name) {\r\n\t\treturn function(id, value) {\r\n\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\tev[name] = value;\r\n\t\t\tev._changed = true;\r\n\t\t\tev._timed = this.isOneDayEvent(ev);\r\n\t\t\tscheduler.event_updated(ev, true);\r\n\t\t};\r\n\t};\r\n\tfor (var i = 0; i < attrs.length; i += 2) {\r\n\t\tscheduler[\"getEvent\" + attrs[i + 1]] = create_getter(attrs[i]);\r\n\t\tscheduler[\"setEvent\" + attrs[i + 1]] = create_setter(attrs[i]);\r\n\t}\r\n})();\r\n\r\nscheduler.event_updated = function(ev, force) {\r\n\tif (this.is_visible_events(ev))\r\n\t\tthis.render_view_data();\r\n\telse\r\n\t\tthis.clear_event(ev.id);\r\n};\r\nscheduler.is_visible_events = function(ev) {\r\n\tif(!this._min_date || !this._max_date){\r\n\t\treturn false;\r\n\t}\r\n\r\n\t//if in displayed dates\r\n\tvar in_visible_range = (ev.start_date.valueOf() < this._max_date.valueOf() && this._min_date.valueOf() < ev.end_date.valueOf());\r\n\r\n\tif(in_visible_range){\r\n\r\n\t\t//end dates are not between last/first hours\r\n\t\tvar evFirstHour = ev.start_date.getHours(),\r\n\t\t\tevLastHour = ev.end_date.getHours() + (ev.end_date.getMinutes()/60),\r\n\t\t\tlastHour = this.config.last_hour,\r\n\t\t\tfirstHour = this.config.first_hour;\r\n\r\n\t\tvar end_dates_visible = (this._table_view || !((evLastHour > lastHour || evLastHour <= firstHour) && (evFirstHour >= lastHour || evFirstHour < firstHour)));\r\n\r\n\t\tif(end_dates_visible){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\r\n\t\t\t//event is bigger than area hidden between last/first hours\r\n\t\t\tvar event_duration = (ev.end_date.valueOf() - ev.start_date.valueOf()) / (1000*60*60),//hours\r\n\t\t\t\thidden_duration = 24 - (this.config.last_hour - this.config.first_hour);\r\n\r\n\t\t\treturn !!((event_duration > hidden_duration) || (evFirstHour < lastHour && evLastHour > firstHour));\r\n\r\n\t\t}\r\n\t}else{\r\n\t\treturn false;\r\n\t}\r\n};\r\nscheduler.isOneDayEvent = function(ev) {\r\n\t// decrease by one ms so events that ends on midnight on the next day were still considered one day events\r\n\t// e.g. (09-02-2018 19:00 - 10-02-2018 00:00)\r\n\t// events >= 24h long are considered multiday\r\n\tvar checkEndDate = new Date(ev.end_date.valueOf() - 1);\r\n\treturn (\r\n\t\tev.start_date.getFullYear() === checkEndDate.getFullYear() &&\r\n\t\tev.start_date.getMonth() === checkEndDate.getMonth() &&\r\n\t\tev.start_date.getDate() === checkEndDate.getDate()\r\n\t) && ((ev.end_date.valueOf() - ev.start_date.valueOf()) < (1000 * 60 * 60 * 24));\r\n};\r\n\r\nscheduler.get_visible_events = function(only_timed) {\r\n\t//not the best strategy for sure\r\n\tvar stack = [];\r\n\r\n\tfor (var id in this._events)\r\n\t\tif (this.is_visible_events(this._events[id]))\r\n\t\t\tif (!only_timed || this._events[id]._timed)\r\n\t\t\t\tif (this.filter_event(id, this._events[id]))\r\n\t\t\t\t\tstack.push(this._events[id]);\r\n\r\n\treturn stack;\r\n};\r\nscheduler.filter_event = function(id, ev) {\r\n\tvar filter = this[\"filter_\" + this._mode];\r\n\treturn (filter) ? filter(id, ev) : true;\r\n};\r\nscheduler._is_main_area_event = function(ev){\r\n\treturn !!ev._timed;\r\n};\r\nscheduler.render_view_data = function(evs, hold) {\r\n\tvar full = false;\r\n\tif (!evs) {\r\n\t\tfull = true;\r\n\t\tif (this._not_render) {\r\n\t\t\tthis._render_wait = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._render_wait = false;\r\n\r\n\t\tthis.clear_view();\r\n\t\tevs = this.get_visible_events(!(this._table_view || this.config.multi_day));\r\n\t}\r\n\tfor(var i= 0, len = evs.length; i < len; i++){\r\n\t\tthis._recalculate_timed(evs[i]);\r\n\t}\r\n\r\n\tif (this.config.multi_day && !this._table_view) {\r\n\r\n\t\tvar tvs = [];\r\n\t\tvar tvd = [];\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tif (this._is_main_area_event(evs[i]))\r\n\t\t\t\ttvs.push(evs[i]);\r\n\t\t\telse\r\n\t\t\t\ttvd.push(evs[i]);\r\n\t\t}\r\n\r\n\t\tif(!this._els['dhx_multi_day']){\r\n\t\t\tvar message = scheduler._commonErrorMessages.unknownView(this._mode);\r\n\t\t\tthrow new Error(message);\r\n\t\t}\r\n\r\n\t\t// multiday events\r\n\t\tthis._rendered_location = this._els['dhx_multi_day'][0];\r\n\t\tthis._table_view = true;\r\n\t\tthis.render_data(tvd, hold);\r\n\t\tthis._table_view = false;\r\n\r\n\t\t// normal events\r\n\t\tthis._rendered_location = this._els['dhx_cal_data'][0];\r\n\t\tthis._table_view = false;\r\n\t\tthis.render_data(tvs, hold);\r\n\r\n\t} else {\r\n\t\tvar buffer = document.createDocumentFragment();\r\n\t\tvar renderedLocation = this._els['dhx_cal_data'][0];\r\n\t\tthis._rendered_location = buffer;\r\n\t\tthis.render_data(evs, hold);\r\n\t\trenderedLocation.appendChild(buffer);\r\n\t\tthis._rendered_location = renderedLocation;\r\n\r\n\t}\r\n\r\n\tif(full){\r\n\t\tthis.callEvent(\"onDataRender\", []);\r\n\t}\r\n};\r\n\r\n\r\nscheduler._view_month_day = function(e){\r\n\tvar date = scheduler.getActionData(e).date;\r\n\tif(!scheduler.callEvent(\"onViewMoreClick\", [date]))\r\n\t\treturn;\r\n\tscheduler.setCurrentView(date, \"day\");\r\n};\r\n\r\nscheduler._render_month_link = function(ev){\r\n\tvar parent = this._rendered_location;\r\n\tvar toRender = this._lame_clone(ev);\r\n\r\n\t//render links in each cell of multiday events\r\n\tfor(var d = ev._sday; d < ev._eday; d++){\r\n\r\n\t\ttoRender._sday = d;\r\n\t\ttoRender._eday = d+1;\r\n\r\n\t\tvar date = scheduler.date;\r\n\t\tvar curr = scheduler._min_date;\r\n\t\tcurr = date.add(curr, toRender._sweek, \"week\");\r\n\t\tcurr = date.add(curr, toRender._sday, \"day\");\r\n\t\tvar count = scheduler.getEvents(curr, date.add(curr, 1, \"day\")).length;\r\n\r\n\t\tvar pos = this._get_event_bar_pos(toRender);\r\n\t\tvar widt = (pos.x2 - pos.x);\r\n\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tscheduler.event(el, \"click\", function(e){scheduler._view_month_day(e);});\r\n\t\tel.className = \"dhx_month_link\";\r\n\t\tel.style.top = pos.y + \"px\";\r\n\t\tel.style.left = pos.x + \"px\";\r\n\t\tel.style.width = widt + \"px\";\r\n\t\tel.innerHTML = scheduler.templates.month_events_link(curr, count);\r\n\t\tthis._rendered.push(el);\r\n\r\n\t\tparent.appendChild(el);\r\n\t}\r\n};\r\n\r\nscheduler._recalculate_timed = function(id){\r\n\tif(!id) return;\r\n\tvar ev;\r\n\tif(typeof(id) != \"object\")\r\n\t\tev = this._events[id];\r\n\telse\r\n\t\tev = id;\r\n\tif(!ev) return;\r\n\tev._timed = scheduler.isOneDayEvent(ev);\r\n};\r\nscheduler.attachEvent(\"onEventChanged\", scheduler._recalculate_timed);\r\nscheduler.attachEvent(\"onEventAdded\", scheduler._recalculate_timed);\r\n\r\nscheduler.render_data = function(evs, hold) {\r\n\tevs = this._pre_render_events(evs, hold);\r\n\tvar containers = {};\r\n\tfor (var i = 0; i < evs.length; i++)\r\n\t\tif (this._table_view){\r\n\t\t\tif(scheduler._mode != 'month'){\r\n\t\t\t\tthis.render_event_bar(evs[i]);//may be multiday section on other views\r\n\t\t\t}else{\r\n\r\n\t\t\t\tvar max_evs = scheduler.config.max_month_events;\r\n\t\t\t\tif(max_evs !== max_evs*1 || evs[i]._sorder < max_evs){\r\n\t\t\t\t\t//of max number events per month cell is set and event can be rendered\r\n\t\t\t\t\tthis.render_event_bar(evs[i]);\r\n\t\t\t\t}else if(max_evs !== undefined && evs[i]._sorder == max_evs){\r\n\t\t\t\t\t//render 'view more' links\r\n\t\t\t\t\tscheduler._render_month_link(evs[i]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//do not render events with ordinal number > maximum events per cell\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t}else{\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tvar parent = scheduler.locate_holder(ev._sday);\r\n\t\t\tif (!parent) continue; //attempt to render non-visible event\r\n\r\n\t\t\tif(!containers[ev._sday]){\r\n\t\t\t\tcontainers[ev._sday] = {\r\n\t\t\t\t\treal: parent,\r\n\t\t\t\t\tbuffer: document.createDocumentFragment(),\r\n\t\t\t\t\twidth: parent.clientWidth\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\tvar container = containers[ev._sday];\r\n\t\t\tthis.render_event(ev, container.buffer, container.width);\r\n\t\t}\r\n\r\n\t\tfor(var i in containers){\r\n\t\t\tvar container = containers[i];\r\n\t\t\tif(container.real && container.buffer){\r\n\t\t\t\tcontainer.real.appendChild(container.buffer);\r\n\t\t\t}\r\n\t\t}\r\n};\r\n\r\nscheduler._get_first_visible_cell = function(cells) {\r\n\tfor (var i = 0; i < cells.length; i++) {\r\n\t\tif ((cells[i].className || \"\").indexOf(\"dhx_scale_ignore\") == -1) {\r\n\t\t\treturn cells[i];\r\n\t\t}\r\n\t}\r\n\t// if no visible cell found, return cells[0] to be more tolerant, since it's the original logic\r\n\treturn cells[0];\r\n};\r\n\r\nscheduler._pre_render_events = function(evs, hold) {\r\n\tvar hb = this.xy.bar_height;\r\n\tvar h_old = this._colsS.heights;\r\n\tvar h = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0];\r\n\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\r\n\tif (!this._table_view) {\r\n\t\tevs = this._pre_render_events_line(evs, hold); //ignore long events for now\r\n\t}\r\n\telse {\r\n\t\tevs = this._pre_render_events_table(evs, hold);\r\n\t}\r\n\tif (this._table_view) {\r\n\t\tif (hold)\r\n\t\t\tthis._colsS.heights = h_old;\r\n\t\telse {\r\n\t\t\tvar monthRows = data.querySelectorAll(\".dhx_cal_month_row\");\r\n\t\t\tif (monthRows.length) {\r\n\t\t\t\tfor (var i = 0; i < monthRows.length; i++) {\r\n\t\t\t\t\th[i]++;\r\n\t\t\t\t\tvar cells = monthRows[i].querySelectorAll(\".dhx_cal_month_cell\");\r\n\t\t\t\t\tvar cellHeight = this._colsS.height - this.xy.month_head_height;\r\n\t\t\t\t\tif ((h[i]) * hb > cellHeight) { // 22 - height of cell's header\r\n\t\t\t\t\t\t//we have overflow, update heights\r\n\r\n\t\t\t\t\t\tvar cHeight = cellHeight;\r\n\t\t\t\t\t\tif(this.config.max_month_events*1 !== this.config.max_month_events || h[i] <= this.config.max_month_events){\r\n\t\t\t\t\t\t\tcHeight = h[i] * hb;\r\n\t\t\t\t\t\t}else if( (this.config.max_month_events + 1) * hb > cellHeight){\r\n\t\t\t\t\t\t\tcHeight = (this.config.max_month_events + 1) * hb;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tmonthRows[i].style.height = (cHeight + this.xy.month_head_height) + \"px\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\th[i] = (h[i - 1] || 0) + scheduler._get_first_visible_cell(cells).offsetHeight;\r\n\t\t\t\t}\r\n\t\t\t\th.unshift(0);\r\n\t\t\t\tconst dataArea = this.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tif (dataArea.offsetHeight < dataArea.scrollHeight && !scheduler._colsS.scroll_fix && scheduler.xy.scroll_width) {\r\n\r\n\t\t\t\t\tvar scale_settings = scheduler._colsS,\r\n\t\t\t\t\t\tsum_width = scale_settings[scale_settings.col_length],\r\n\t\t\t\t\t\trow_heights = scale_settings.heights.slice();\r\n\r\n\t\t\t\t\tsum_width -= (scheduler.xy.scroll_width || 0);\r\n\t\t\t\t\tthis._calc_scale_sizes(sum_width, this._min_date, this._max_date);\r\n\t\t\t\t\tscheduler._colsS.heights = row_heights;\r\n\r\n\t\t\t\t\tthis.set_xy(this._els[\"dhx_cal_header\"][0], sum_width/*, this.xy.scale_height*/);\r\n\t\t\t\t\tscheduler._render_scales(this._els[\"dhx_cal_header\"][0]);\r\n\t\t\t\t\tscheduler._render_month_scale(this._els[\"dhx_cal_data\"][0], this._get_timeunit_start(), this._min_date);\r\n\r\n\t\t\t\t\tscale_settings.scroll_fix = true;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (!evs.length && this._els[\"dhx_multi_day\"][0].style.visibility == \"visible\")\r\n\t\t\t\t\th[0] = -1;\r\n\t\t\t\tif (evs.length || h[0] == -1) {\r\n\t\t\t\t\t//shift days to have space for multiday events\r\n\t\t\t\t\t//var childs = evl.parentNode.childNodes;\r\n\r\n\t\t\t\t\t// +1 so multiday events would have 2px from top and 2px from bottom by default\r\n\t\t\t\t\tvar full_multi_day_height = (h[0] + 1) * hb + 4;\r\n\r\n\t\t\t\t\tvar used_multi_day_height = full_multi_day_height;\r\n\t\t\t\t\tvar used_multi_day_height_css = full_multi_day_height + \"px\";\r\n\t\t\t\t\tif (this.config.multi_day_height_limit) {\r\n\t\t\t\t\t\tused_multi_day_height = Math.min(full_multi_day_height, this.config.multi_day_height_limit) ;\r\n\t\t\t\t\t\tused_multi_day_height_css = used_multi_day_height + \"px\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar multi_day_section = this._els[\"dhx_multi_day\"][0];\r\n\t\t\t\t\tmulti_day_section.style.height = used_multi_day_height_css;\r\n\t\t\t\t\tmulti_day_section.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\tmulti_day_section.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\r\n\t\t\t\t\t// icon\r\n\t\t\t\t\tvar multi_day_icon = this._els[\"dhx_multi_day\"][1];\r\n\t\t\t\t\tmulti_day_icon.style.height = used_multi_day_height_css;\r\n\t\t\t\t\tmulti_day_icon.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\tmulti_day_icon.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\t\t\t\t\tmulti_day_icon.className = h[0] ? \"dhx_multi_day_icon\" : \"dhx_multi_day_icon_small\";\r\n\t\t\t\t\tthis._dy_shift = (h[0] + 1) * hb;\r\n\t\t\t\t\tif(this.config.multi_day_height_limit){\r\n\t\t\t\t\t\tthis._dy_shift = Math.min(this.config.multi_day_height_limit, this._dy_shift);\r\n\t\t\t\t\t}\r\n\t\t\t\t\th[0] = 0;\r\n\r\n\t\t\t\t\tif (used_multi_day_height != full_multi_day_height) {\r\n\r\n\t\t\t\t\t\tmulti_day_section.style.overflowY = \"auto\";\r\n\t\t\t\t\t//\tmulti_day_section.style.width = (parseInt(this._els[\"dhx_cal_navline\"][0].style.width)) + \"px\";\r\n\r\n\t\t\t\t\t\tmulti_day_icon.style.position = \"fixed\";\r\n\t\t\t\t\t\tmulti_day_icon.style.top = \"\";\r\n\t\t\t\t\t\tmulti_day_icon.style.left = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn evs;\r\n};\r\nscheduler._get_event_sday = function(ev) {\r\n\t// get day in current view\r\n\t// use rounding for 23 or 25 hour days on DST\r\n\tvar datePart = this.date.day_start(new Date(ev.start_date));\r\n\treturn Math.round((datePart.valueOf() - this._min_date.valueOf()) / (24 * 60 * 60 * 1000));\r\n};\r\nscheduler._get_event_mapped_end_date = function(ev) {\r\n\tvar end_date = ev.end_date;\r\n\tif (this.config.separate_short_events) {\r\n\t\tvar ev_duration = (ev.end_date - ev.start_date) / 60000; // minutes\r\n\t\tif (ev_duration < this._min_mapped_duration) {\r\n\t\t\tend_date = this.date.add(end_date, this._min_mapped_duration - ev_duration, \"minute\");\r\n\t\t}\r\n\t}\r\n\treturn end_date;\r\n};\r\nscheduler._pre_render_events_line = function(evs, hold){\r\n\tevs.sort(function(a, b) {\r\n\t\tif (a.start_date.valueOf() == b.start_date.valueOf())\r\n\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\treturn a.start_date > b.start_date ? 1 : -1;\r\n\t});\r\n\tvar days = []; //events by weeks\r\n\tvar evs_originals = [];\r\n\r\n\tthis._min_mapped_duration = Math.floor(this.xy.min_event_height * 60 / this.config.hour_size_px); // values could change along the way\r\n\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tvar ev = evs[i];\r\n\r\n\t\t//check date overflow\r\n\t\tvar sd = ev.start_date;\r\n\t\tvar ed = ev.end_date;\r\n\t\t//check scale overflow\r\n\t\tvar sh = sd.getHours();\r\n\t\tvar eh = ed.getHours();\r\n\t\tev._sday = this._get_event_sday(ev); // sday based on event start_date\r\n\t\tif (this._ignores[ev._sday]){\r\n\t\t\t//ignore event\r\n\t\t\tevs.splice(i,1);\r\n\t\t\ti--;\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tif (!days[ev._sday]) days[ev._sday] = [];\r\n\r\n\t\tif (!hold) {\r\n\t\t\tev._inner = false;\r\n\r\n\t\t\tvar stack = days[ev._sday];\r\n\r\n\t\t\twhile (stack.length) {\r\n\t\t\t\tvar t_ev = stack[stack.length - 1];\r\n\t\t\t\tvar t_end_date = this._get_event_mapped_end_date(t_ev);\r\n\t\t\t\tif (t_end_date.valueOf() <= ev.start_date.valueOf()) {\r\n\t\t\t\t\tstack.splice(stack.length - 1, 1);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar slot_index = stack.length;\r\n\t\t\tvar sorderSet = false;\r\n\t\t\tfor (var j = 0; j < stack.length; j++) {\r\n\t\t\t\tvar t_ev = stack[j];\r\n\t\t\t\tvar t_end_date = this._get_event_mapped_end_date(t_ev);\r\n\t\t\t\tif (t_end_date.valueOf() <= ev.start_date.valueOf()) {\r\n\t\t\t\t\tsorderSet = true;\r\n\t\t\t\t\tev._sorder = t_ev._sorder;\r\n\t\t\t\t\tslot_index = j;\r\n\t\t\t\t\tev._inner = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (stack.length)\r\n\t\t\t\tstack[stack.length - 1]._inner = true;\r\n\r\n\t\t\tif (!sorderSet) {\r\n\t\t\t\tif (stack.length) {\r\n\t\t\t\t\tif (stack.length <= stack[stack.length - 1]._sorder) {\r\n\t\t\t\t\t\tif (!stack[stack.length - 1]._sorder)\r\n\t\t\t\t\t\t\tev._sorder = 0;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tfor (j = 0; j < stack.length; j++) {\r\n\t\t\t\t\t\t\t\tvar _is_sorder = false;\r\n\t\t\t\t\t\t\t\tfor (var k = 0; k < stack.length; k++) {\r\n\t\t\t\t\t\t\t\t\tif (stack[k]._sorder == j) {\r\n\t\t\t\t\t\t\t\t\t\t_is_sorder = true;\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (!_is_sorder) {\r\n\t\t\t\t\t\t\t\t\tev._sorder = j;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\tev._inner = true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvar _max_sorder = stack[0]._sorder;\r\n\t\t\t\t\t\tfor (j = 1; j < stack.length; j++) {\r\n\t\t\t\t\t\t\tif (stack[j]._sorder > _max_sorder)\r\n\t\t\t\t\t\t\t\t_max_sorder = stack[j]._sorder;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tev._sorder = _max_sorder + 1;\r\n\t\t\t\t\t\tev._inner = false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else\r\n\t\t\t\t\tev._sorder = 0;\r\n\t\t\t}\r\n\r\n\t\t\tstack.splice(slot_index, slot_index == stack.length ? 0 : 1, ev);\r\n\r\n\t\t\tif (stack.length > (stack.max_count || 0)) {\r\n\t\t\t\tstack.max_count = stack.length;\r\n\t\t\t\tev._count = stack.length;\r\n\t\t\t} else {\r\n\t\t\t\tev._count = (ev._count) ? ev._count : 1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (sh < this.config.first_hour || eh >= this.config.last_hour) {\r\n\t\t\t// Need to create copy of event as we will be changing it's start/end date\r\n\t\t\t// e.g. first_hour = 11 and event.start_date hours = 9. Need to preserve that info\r\n\t\t\tevs_originals.push(ev);\r\n\t\t\tevs[i] = ev = this._copy_event(ev);\r\n\r\n\t\t\tif (sh < this.config.first_hour) {\r\n\t\t\t\tev.start_date.setHours(this.config.first_hour);\r\n\t\t\t\tev.start_date.setMinutes(0);\r\n\t\t\t}\r\n\t\t\tif (eh >= this.config.last_hour) {\r\n\t\t\t\tev.end_date.setMinutes(0);\r\n\t\t\t\tev.end_date.setHours(this.config.last_hour);\r\n\t\t\t}\r\n\r\n\t\t\tif (ev.start_date > ev.end_date || sh == this.config.last_hour) {\r\n\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (!hold) {\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tevs[i]._count = days[evs[i]._sday].max_count;\r\n\t\t}\r\n\t\tfor (var i = 0; i < evs_originals.length; i++)\r\n\t\t\tevs_originals[i]._count = days[evs_originals[i]._sday].max_count;\r\n\t}\r\n\r\n\treturn evs;\r\n};\r\nscheduler._time_order = function(evs) {\r\n\tevs.sort(function(a, b) {\r\n\t\tif (a.start_date.valueOf() == b.start_date.valueOf()) {\r\n\t\t\tif (a._timed && !b._timed) return 1;\r\n\t\t\tif (!a._timed && b._timed) return -1;\r\n\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\t}\r\n\t\treturn a.start_date > b.start_date ? 1 : -1;\r\n\t});\r\n};\r\n\r\nscheduler._is_any_multiday_cell_visible = function(from, to, event){\r\n\tvar cols = this._cols.length;\r\n\tvar isAnyCellVisible = false;\r\n\tvar checkDate = from;\r\n\tvar noCells = true;\r\n\tvar lastDayEnd = new Date(to);\r\n\tif(scheduler.date.day_start(new Date(to)).valueOf() != to.valueOf()){\r\n\t\tlastDayEnd = scheduler.date.day_start(lastDayEnd);\r\n\t\tlastDayEnd = scheduler.date.add(lastDayEnd, 1, \"day\");\r\n\t}\r\n\twhile(checkDate < lastDayEnd){\r\n\t\tnoCells = false;\r\n\t\tvar cellIndex = this.locate_holder_day(checkDate, false, event);\r\n\t\tvar weekCellIndex = cellIndex % cols;\r\n\t\tif(!this._ignores[weekCellIndex]){\r\n\t\t\tisAnyCellVisible = true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcheckDate = scheduler.date.add(checkDate, 1, \"day\");\r\n\t}\r\n\treturn noCells || isAnyCellVisible;\r\n};\r\n\r\nscheduler._pre_render_events_table = function(evs, hold) { // max - max height of week slot\r\n\tthis._time_order(evs);\r\n\tvar out = [];\r\n\tvar weeks = [\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[]\r\n\t]; //events by weeks\r\n\tvar max = this._colsS.heights;\r\n\tvar start_date;\r\n\tvar cols = this._cols.length;\r\n\tvar chunks_info = {};\r\n\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tvar ev = evs[i];\r\n\t\tvar id = ev.id;\r\n\t\tif (!chunks_info[id]) {\r\n\t\t\tchunks_info[id] = {\r\n\t\t\t\tfirst_chunk: true,\r\n\t\t\t\tlast_chunk: true\r\n\t\t\t};\r\n\t\t}\r\n\t\tvar chunk_info = chunks_info[id];\r\n\t\tvar sd = (start_date || ev.start_date);\r\n\t\tvar ed = ev.end_date;\r\n\t\t//trim events which are crossing through current view\r\n\t\tif (sd < this._min_date) {\r\n\t\t\tchunk_info.first_chunk = false;\r\n\t\t\tsd = this._min_date;\r\n\t\t}\r\n\t\tif (ed > this._max_date) {\r\n\t\t\tchunk_info.last_chunk = false;\r\n\t\t\ted = this._max_date;\r\n\t\t}\r\n\r\n\t\tvar locate_s = this.locate_holder_day(sd, false, ev);\r\n\t\tev._sday = locate_s % cols;\r\n\t\t//skip single day events for ignored dates\r\n\t\tif (this._ignores[ev._sday] && ev._timed) continue;\r\n\r\n\t\tvar locate_e = this.locate_holder_day(ed, true, ev) || cols;\r\n\t\tev._eday = (locate_e % cols) || cols; //cols used to fill full week, when event end on monday\r\n\t\tev._length = locate_e - locate_s;\r\n\t\t//3600000 - compensate 1 hour during winter|summer time shift\r\n\t\tev._sweek = Math.floor((this._correct_shift(sd.valueOf(), 1) - this._min_date.valueOf()) / (60 * 60 * 1000 * 24 * cols));\r\n\r\n\t\tvar isAnyCellVisible = scheduler._is_any_multiday_cell_visible(sd, ed, ev);\r\n\r\n\t\tif(!isAnyCellVisible){\r\n\t\t\tstart_date = null;\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\t//current slot\r\n\t\tvar stack = weeks[ev._sweek];\r\n\t\t//check order position\r\n\t\tvar stack_line;\r\n\r\n\t\tfor (stack_line = 0; stack_line < stack.length; stack_line++)\r\n\t\t\tif (stack[stack_line]._eday <= ev._sday)\r\n\t\t\t\tbreak;\r\n\r\n\t\tif (!ev._sorder || !hold) {\r\n\t\t\tev._sorder = stack_line;\r\n\t\t}\r\n\r\n\t\tif (ev._sday + ev._length <= cols) {\r\n\t\t\tstart_date = null;\r\n\t\t\tout.push(ev);\r\n\t\t\tstack[stack_line] = ev;\r\n\t\t\t//get max height of slot\r\n\t\t\tmax[ev._sweek] = stack.length - 1;\r\n\t\t\tev._first_chunk = chunk_info.first_chunk;\r\n\t\t\tev._last_chunk = chunk_info.last_chunk;\r\n\t\t} else { // split long event in chunks\r\n\t\t\tvar copy = this._copy_event(ev);\r\n\t\t\tcopy.id = ev.id;\r\n\t\t\tcopy._length = cols - ev._sday;\r\n\t\t\tcopy._eday = cols;\r\n\t\t\tcopy._sday = ev._sday;\r\n\t\t\tcopy._sweek = ev._sweek;\r\n\t\t\tcopy._sorder = ev._sorder;\r\n\t\t\tcopy.end_date = this.date.add(sd, copy._length, \"day\");\r\n\t\t\tcopy._first_chunk = chunk_info.first_chunk;\r\n\t\t\tif (chunk_info.first_chunk) {\r\n\t\t\t\tchunk_info.first_chunk = false;\r\n\t\t\t}\r\n\r\n\t\t\tout.push(copy);\r\n\t\t\tstack[stack_line] = copy;\r\n\t\t\tstart_date = copy.end_date;\r\n\t\t\t//get max height of slot\r\n\t\t\tmax[ev._sweek] = stack.length - 1;\r\n\t\t\ti--;\r\n\t\t\tcontinue; //repeat same step\r\n\t\t}\r\n\t}\r\n\treturn out;\r\n};\r\nscheduler._copy_dummy = function() {\r\n\tvar a = new Date(this.start_date);\r\n\tvar b = new Date(this.end_date);\r\n\tthis.start_date = a;\r\n\tthis.end_date = b;\r\n};\r\nscheduler._copy_event = function(ev) {\r\n\tthis._copy_dummy.prototype = ev;\r\n\treturn new this._copy_dummy();\r\n\t//return {start_date:ev.start_date, end_date:ev.end_date, text:ev.text, id:ev.id}\r\n};\r\nscheduler._rendered = [];\r\nscheduler.clear_view = function() {\r\n\tfor (var i = 0; i < this._rendered.length; i++) {\r\n\t\tvar obj = this._rendered[i];\r\n\t\tif (obj.parentNode) obj.parentNode.removeChild(obj);\r\n\t}\r\n\tthis._rendered = [];\r\n};\r\nscheduler.updateEvent = function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tthis.clear_event(id);\r\n\r\n\tif (ev && this.is_visible_events(ev) && this.filter_event(id, ev) && (this._table_view || this.config.multi_day || ev._timed)) {\r\n\t\tif (this.config.update_render){\r\n\t\t\tthis.render_view_data();\r\n\t\t}else{\r\n\t\t\tif(this.getState().mode == \"month\" && !this.getState().drag_id && !this.isOneDayEvent(ev)){\r\n\t\t\t\tthis.render_view_data();\r\n\t\t\t}else{\r\n\t\t\t\tthis.render_view_data([ev], true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.clear_event = function(id) {\r\n\tthis.for_rendered(id, function(node, i) {\r\n\t\tif (node.parentNode)\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\tscheduler._rendered.splice(i, 1);\r\n\t});\r\n};\r\nscheduler._y_from_date = function(date){\r\n\tvar sm = date.getHours() * 60 + date.getMinutes();\r\n\treturn ((Math.round((sm * 60 * 1000 - this.config.first_hour * 60 * 60 * 1000) * this.config.hour_size_px / (60 * 60 * 1000))) % (this.config.hour_size_px * 24)); //42px/hour\r\n};\r\nscheduler._calc_event_y = function(ev, min_height){\r\n\tmin_height = min_height || 0;\r\n\tvar sm = ev.start_date.getHours() * 60 + ev.start_date.getMinutes();\r\n\tvar em = (ev.end_date.getHours() * 60 + ev.end_date.getMinutes()) || (scheduler.config.last_hour * 60);\r\n\tvar top = this._y_from_date(ev.start_date);\r\n\r\n\tvar height = Math.max(min_height, (em - sm) * this.config.hour_size_px / 60); //42px/hour\r\n\treturn {\r\n\t\ttop: top,\r\n\t\theight: height\r\n\t};\r\n};\r\nscheduler.render_event = function(ev, buffer, parentWidth) {\r\n\tvar menu = scheduler.xy.menu_width;\r\n\tvar menu_offset = (this.config.use_select_menu_space) ? 0 : menu;\r\n\tif (ev._sday < 0) return; //can occur in case of recurring event during time shift\r\n\r\n\tvar parent = scheduler.locate_holder(ev._sday);\r\n\tif (!parent) return; //attempt to render non-visible event\r\n\r\n\tbuffer = buffer || parent;\r\n\r\n\tvar pos_y = this._calc_event_y(ev, scheduler.xy.min_event_height);\r\n\tvar top = pos_y.top,\r\n\t\theight = pos_y.height;\r\n\r\n\tvar ev_count = ev._count || 1;\r\n\tvar ev_sorder = ev._sorder || 0;\r\n\r\n\tparentWidth = parentWidth || parent.clientWidth;\r\n\tif(this.config.day_column_padding){\r\n\t\tparentWidth -= this.config.day_column_padding;\r\n\t}\r\n\r\n\tvar width = Math.floor((parentWidth - menu_offset) / ev_count);\r\n\tvar left = ev_sorder * width + 1;\r\n\tif (!ev._inner) width = width * (ev_count - ev_sorder);\r\n\tif (this.config.cascade_event_display) {\r\n\t\tvar limit = this.config.cascade_event_count;\r\n\t\tvar margin = this.config.cascade_event_margin;\r\n\t\tleft = ev_sorder % limit * margin;\r\n\t\tvar right = (ev._inner) ? (ev_count - ev_sorder - 1) % limit * margin / 2 : 0;\r\n\t\twidth = Math.floor(parentWidth - menu_offset - left - right);\r\n\t}\r\n\r\n\tif(height < 30){\r\n\t\tev._mode = \"smallest\";\r\n\t}else if(height < 42){\r\n\t\tev._mode = \"small\";\r\n\t}else{\r\n\t\tev._mode = null;\r\n\t}\r\n\r\n\tvar d = this._render_v_bar(ev, menu_offset + left, top, width, height, ev._text_style, scheduler.templates.event_header(ev.start_date, ev.end_date, ev), scheduler.templates.event_text(ev.start_date, ev.end_date, ev));\r\n\t\r\n\tif(ev._mode === \"smallest\"){\r\n\t\td.classList.add(\"dhx_cal_event--xsmall\");\r\n\t}else if (ev._mode === \"small\"){\r\n\t\td.classList.add(\"dhx_cal_event--small\");\r\n\t}\r\n\r\n\tthis._waiAria.eventAttr(ev, d);\r\n\tthis._rendered.push(d);\r\n\tbuffer.appendChild(d);\r\n\r\n\tvar parentPosition = parseInt( this.config.rtl ? parent.style.right : parent.style.left, 10);\r\n\r\n\tleft = left + parentPosition + menu_offset;\r\n\r\n\tif (this._edit_id == ev.id) {\r\n\r\n\t\td.style.zIndex = 1; //fix overlapping issue\r\n\t\twidth = Math.max(width, scheduler.xy.editor_width);\r\n\t\td = document.createElement(\"div\");\r\n\t\td.setAttribute(\"event_id\", ev.id); // for backward compatibility\r\n\t\td.setAttribute(this.config.event_attribute, ev.id);\r\n\r\n\t\tthis._waiAria.eventAttr(ev, d);\r\n\r\n\t\td.className = \"dhx_cal_event dhx_cal_editor\";\r\n\t\tif (this.config.rtl) left++;\r\n\t\tthis.set_xy(d, width, height, left, top);\r\n\r\n\r\n\t\tif(ev.color){\r\n\t\t\td.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tvar tplClass = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\r\n\t\tif(tplClass){\r\n\t\t\td.className += \" \" + tplClass;\r\n\t\t}\r\n\t\tvar d2 = document.createElement(\"div\");\r\n\t\td2.style.cssText += \"overflow:hidden;height:100%\";\r\n\r\n\t\td.appendChild(d2);\r\n\t\tthis._els[\"dhx_cal_data\"][0].appendChild(d);\r\n\t\tthis._rendered.push(d);\r\n\r\n\t\td2.innerHTML = \"\";\r\n\t\tthis._editor = d2.querySelector(\"textarea\");\r\n\t\t\r\n\t\tscheduler.event(this._editor, \"keydown\", function(e) {\r\n\t\t\tif (e.shiftKey) return true;\r\n\t\t\tvar code = e.keyCode;\r\n\t\t\tif (code == scheduler.keys.edit_save) scheduler.editStop(true);\r\n\t\t\tif (code == scheduler.keys.edit_cancel) scheduler.editStop(false);\r\n\r\n\t\t\tif(code == scheduler.keys.edit_save || code == scheduler.keys.edit_cancel){\r\n\t\t\t\tif(e.preventDefault) e.preventDefault();\r\n\t\t\t}\r\n\t\t});\r\n\t\tscheduler.event(this._editor, \"selectstart\", function (e) {\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn true;\r\n\t\t});\r\n\t\tscheduler._focus(this._editor, true);\r\n\t\t//IE and opera can add x-scroll during focusing\r\n\t\tthis._els[\"dhx_cal_data\"][0].scrollLeft = 0;\r\n\t}\r\n\tif (this.xy.menu_width !== 0 && this._select_id == ev.id) {\r\n\r\n\t\tif (this.config.cascade_event_display && this._drag_mode)\r\n\t\t\td.style.zIndex = 1; //fix overlapping issue for cascade view in case of dnd of selected event\r\n\t\tvar icons = this.config[\"icons_\" + ((this._edit_id == ev.id) ? \"edit\" : \"select\")];\r\n\t\tvar icons_str = \"\";\r\n\r\n\t\tvar ariaAttr;\r\n\r\n\t\tfor (var i = 0; i < icons.length; i++) {\r\n\t\t\tconst currentIcon = icons[i];\r\n\t\t\tariaAttr = this._waiAria.eventMenuAttrString(currentIcon);\r\n\t\t\ticons_str += `
`;\r\n\t\t}\r\n\t\tvar obj = this._render_v_bar(ev, left - menu - 1, top, menu, null, \"\", \"
\", icons_str, true);\r\n\r\n\t\tif(ev.color){\r\n\t\t\tobj.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tobj.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\t//obj.style.left = left - menu + 1;\r\n\t\tthis._els[\"dhx_cal_data\"][0].appendChild(obj);\r\n\t\tthis._rendered.push(obj);\r\n\t}\r\n\tif(this.config.drag_highlight && this._drag_id == ev.id){\r\n\t\tthis.highlightEventPosition(ev);\r\n\t}\r\n};\r\nscheduler._render_v_bar = function (ev, x, y, w, h, style, contentA, contentB, bottom) {\r\n\tvar d = document.createElement(\"div\");\r\n\tvar id = ev.id;\r\n\tvar cs = (bottom) ? \"dhx_cal_event dhx_cal_select_menu\" : \"dhx_cal_event\";\r\n\r\n\tvar state = scheduler.getState();\r\n\tif(state.drag_id == ev.id){\r\n\t\tcs += \" dhx_cal_event_drag\";\r\n\t}\r\n\r\n\tif(state.select_id == ev.id){\r\n\t\tcs += \" dhx_cal_event_selected\";\r\n\t}\r\n\r\n\tvar cse = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\tif (cse) cs = cs + \" \" + cse;\r\n\r\n\tif(this.config.cascade_event_display) {\r\n\t\tcs += \" dhx_cal_event_cascade\";\r\n\t}\r\n\r\n\tvar boxWidth = w - 1;\r\n\tvar html = `
\r\n\t\t\t\t
`;\r\n\r\n\td.innerHTML = html;\r\n\r\n\tvar container = d.cloneNode(true).firstChild;\r\n\r\n\tif (!bottom && scheduler.renderEvent(container, ev, w, h, contentA, contentB)) {\r\n\t\tif(ev.color){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\treturn container;\r\n\t} else {\r\n\t\tcontainer = d.firstChild;\r\n\t\tif(ev.color){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\tvar inner_html = '
 
';\r\n\t\tinner_html += '
' + contentA + '
';\r\n\t\tinner_html += '
' + contentB + '
'; // +2 css specific, moved from render_event\r\n\r\n\t\tvar footer_class = \"dhx_event_resize dhx_footer\";\r\n\t\tif (bottom || ev._drag_resize === false)\r\n\t\t\tfooter_class = \"dhx_resize_denied \" + footer_class;\r\n\r\n\t\tinner_html += '
';\r\n\r\n\t\tcontainer.innerHTML = inner_html;\r\n\t}\r\n\r\n\treturn container;\r\n};\r\nscheduler.renderEvent = function(){\r\n\treturn false;\r\n};\r\nscheduler.locate_holder = function(day) {\r\n\tif (this._mode == \"day\") return this._els[\"dhx_cal_data\"][0].firstChild; //dirty\r\n\treturn this._els[\"dhx_cal_data\"][0].childNodes[day];\r\n};\r\nscheduler.locate_holder_day = function(date, past) {\r\n\tvar day = Math.floor((this._correct_shift(date, 1) - this._min_date) / (60 * 60 * 24 * 1000));\r\n\t//when locating end data of event , we need to use next day if time part was defined\r\n\tif (past && this.date.time_part(date)) day++;\r\n\treturn day;\r\n};\r\n\r\n\r\n\r\nscheduler._get_dnd_order = function(order, ev_height, max_height){\r\n\tif(!this._drag_event)\r\n\t\treturn order;\r\n\tif(!this._drag_event._orig_sorder)\r\n\t\tthis._drag_event._orig_sorder = order;\r\n\telse\r\n\t\torder = this._drag_event._orig_sorder;\r\n\r\n\tvar evTop = ev_height * order;\r\n\twhile((evTop + ev_height) > max_height){\r\n\t\torder--;\r\n\t\tevTop -= ev_height;\r\n\t}\r\n\torder = Math.max(order, 0);\r\n\treturn order;\r\n};\r\n//scheduler._get_event_bar_pos = function(sday, eday, week, drag){\r\nscheduler._get_event_bar_pos = function(ev){\r\n\tvar rtl = this.config.rtl;\r\n\tvar columns = this._colsS;\r\n\tvar x = columns[ev._sday];\r\n\tvar x2 = columns[ev._eday];\r\n\tif (rtl) {\r\n\t\tx = columns[columns.col_length] - columns[ev._eday] + columns[0];\r\n\t\tx2 = columns[columns.col_length] - columns[ev._sday] + columns[0];\r\n\t}\r\n\r\n\tif (x2 == x) x2 = columns[ev._eday + 1];\r\n\tvar hb = this.xy.bar_height;\r\n\r\n\tvar order = ev._sorder;\r\n\tif(ev.id == this._drag_id){\r\n\t\tvar cellHeight = columns.heights[ev._sweek + 1] - columns.heights[ev._sweek]- this.xy.month_head_height;//22 for month head height\r\n\t\torder = scheduler._get_dnd_order(order, hb, cellHeight);\r\n\t}\r\n\tvar y_event_offset = order * hb;\r\n\tvar y = columns.heights[ev._sweek] + (columns.height ? (this.xy.month_scale_height + 2) : 2 ) + y_event_offset;\r\n\treturn {x:x, x2:x2, y:y};\r\n};\r\n\r\nscheduler.render_event_bar = function (ev) {\r\n\tvar parent = this._rendered_location;\r\n\tvar pos = this._get_event_bar_pos(ev);\r\n\tvar y = pos.y;\r\n\tvar x = pos.x;\r\n\tvar x2 = pos.x2;\r\n\t// resize for month mutliday events\r\n\tvar resize_handle = \"\";\r\n\r\n\t//events in ignored dates\r\n\r\n\tif (!x2) return;\r\n\r\n\tvar resizable = scheduler.config.resize_month_events && this._mode == \"month\" &&\r\n\t\t(!ev._timed || scheduler.config.resize_month_timed);\r\n\r\n\tvar d = document.createElement(\"div\");\r\n\tvar left_chunk = (ev.hasOwnProperty(\"_first_chunk\") && ev._first_chunk),\r\n\t\tright_chunk = (ev.hasOwnProperty(\"_last_chunk\") && ev._last_chunk);\r\n\r\n\tvar resize_left = resizable && (ev._timed || left_chunk);\r\n\tvar resize_right = resizable && (ev._timed || right_chunk);\r\n\r\n\tvar timed = true;\r\n\tvar cs = \"dhx_cal_event_clear\";\r\n\tif (!ev._timed || resizable) {\r\n\t\ttimed = false;\r\n\t\tcs = \"dhx_cal_event_line\";\r\n\t}\r\n\tif(left_chunk){\r\n\t\tcs += \" dhx_cal_event_line_start\";\r\n\t}\r\n\tif(right_chunk){\r\n\t\tcs += \" dhx_cal_event_line_end\";\r\n\t}\r\n\tif(resize_left){\r\n\t\tresize_handle += \"
\";\r\n\t}\r\n\tif(resize_right){\r\n\t\tresize_handle += \"
\";\r\n\t}\r\n\r\n\tvar cse = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\tif (cse){\r\n\t\tcs += \" \" + cse;\r\n\t}\r\n\r\n\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\tvar style_text = [\r\n\t\t\"position:absolute\",\r\n\t\t\"top:\" + y + \"px\",\r\n\t\t\"left:\" + x + \"px\",\r\n\t\t\"width:\" + (x2 - x - (timed ? 1 : 0)) + \"px\",\r\n\t\t\"height:\" + (this.xy.bar_height - 2) + \"px\",\r\n\t\tcolor,\r\n\t\tbg_color,\r\n\t\t(ev._text_style || \"\")\r\n\t].join(\";\");\r\n\r\n\tvar html = \"
\";\r\n\tif (resizable) {\r\n\t\thtml += resize_handle;\r\n\t}\r\n\tif(scheduler.getState().mode == \"month\"){\r\n\t\tev = scheduler.getEvent(ev.id); // ev at this point could be a part (row in a month view) of a larger event\r\n\t}\r\n\r\n\tif (ev._timed){\r\n\t\thtml += `${scheduler.templates.event_bar_date(ev.start_date, ev.end_date, ev)}`;\r\n\t}\r\n\r\n\thtml += \"
\";\r\n\thtml += scheduler.templates.event_bar_text(ev.start_date, ev.end_date, ev) + '
';\r\n\thtml += \"
\";\r\n\thtml += '
';\r\n\r\n\td.innerHTML = html;\r\n\r\n\tthis._rendered.push(d.firstChild);\r\n\tparent.appendChild(d.firstChild);\r\n};\r\n\r\nscheduler._locate_event = function(node) {\r\n\tvar id = null;\r\n\twhile (node && !id && node.getAttribute) {\r\n\t\tid = node.getAttribute(this.config.event_attribute);\r\n\t\tnode = node.parentNode;\r\n\t}\r\n\treturn id;\r\n};\r\n\r\nscheduler.edit = function(id) {\r\n\tif (this._edit_id == id) return;\r\n\tthis.editStop(false, id);\r\n\tthis._edit_id = id;\r\n\tthis.updateEvent(id);\r\n};\r\nscheduler.editStop = function(mode, id) {\r\n\tif (id && this._edit_id == id) return;\r\n\tvar ev = this.getEvent(this._edit_id);\r\n\tif (ev) {\r\n\t\tif (mode) ev.text = this._editor.value;\r\n\t\tthis._edit_id = null;\r\n\t\tthis._editor = null;\r\n\t\tthis.updateEvent(ev.id);\r\n\t\tthis._edit_stop_event(ev, mode);\r\n\t}\r\n};\r\nscheduler._edit_stop_event = function(ev, mode) {\r\n\tif (this._new_event) {\r\n\t\tif (!mode) {\r\n\t\t\tif (ev) // in case of custom lightbox user can already delete event\r\n\t\t\t\tthis.deleteEvent(ev.id, true);\r\n\t\t} else {\r\n\t\t\tthis.callEvent(\"onEventAdded\", [ev.id, ev]);\r\n\t\t}\r\n\t\tthis._new_event = null;\r\n\t} else {\r\n\t\tif (mode){\r\n\t\t\tthis.callEvent(\"onEventChanged\", [ev.id, ev]);\r\n\t\t}\r\n\t}\r\n};\r\n\r\nscheduler.getEvents = function(from, to) {\r\n\tvar result = [];\r\n\tfor (var a in this._events) {\r\n\t\tvar ev = this._events[a];\r\n\t\tif (ev && ( (!from && !to) || (ev.start_date < to && ev.end_date > from) ))\r\n\t\t\tresult.push(ev);\r\n\t}\r\n\treturn result;\r\n};\r\nscheduler.getRenderedEvent = function(id) {\r\n\tif (!id)\r\n\t\treturn;\r\n\tvar rendered_events = scheduler._rendered;\r\n\tfor (var i=0; i -1){\r\n\t\t\t\t\tsection = section.split(scheduler.config.section_delimiter)[0];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar top = timeline.getSectionTop(section);\r\n\t\t\tvar left = timeline.posFromDate(event.start_date);\r\n\t\t\tvar container = scheduler.$container.querySelector(\".dhx_timeline_data_wrapper\");\r\n\t\t\tleft = left - (container.offsetWidth - timeline.dx) / 2;\r\n\t\t\ttop = top - container.offsetHeight / 2 + timeline.dy/2;\r\n\r\n\t\t\tif (timeline._smartRenderingEnabled()) {\r\n\t\t\t\tvar handlerId = timeline.attachEvent(\"onScroll\", function(){\r\n\t\t\t\t\trestoreOriginalColors();\r\n\t\t\t\t\ttimeline.detachEvent(handlerId);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\ttimeline.scrollTo({\r\n\t\t\t\tleft: left,\r\n\t\t\t\ttop: top\r\n\t\t\t});\r\n\t\t\tif (!timeline._smartRenderingEnabled()) {\r\n\t\t\t\trestoreOriginalColors();\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\trestoreOriginalColors();\r\n\t}\r\n\r\n\tscheduler.callEvent(\"onAfterEventDisplay\", [ev, mode]);\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._append_drag_marker = function(m){\r\n\tif(m.parentNode) return;\r\n\tvar zone = scheduler._els[\"dhx_cal_data\"][0];\r\n\r\n\tvar scale = zone.lastChild;\r\n\tvar className = scheduler._getClassName(scale);\r\n\tif(className.indexOf(\"dhx_scale_holder\") < 0 && scale.previousSibling){\r\n\t\tscale = scale.previousSibling;\r\n\t}\r\n\r\n\tclassName = scheduler._getClassName(scale);\r\n\tif (scale && className.indexOf(\"dhx_scale_holder\") === 0) {\r\n\t\tscale.appendChild(m);\r\n\t}\r\n};\r\n\r\nscheduler._update_marker_position = function(m, event){\r\n\tvar size = scheduler._calc_event_y(event, 0);\r\n\tm.style.top = size.top + \"px\";\r\n\tm.style.height = size.height + \"px\";\r\n};\r\n\r\nscheduler.highlightEventPosition = function(event){\r\n\tvar m = document.createElement(\"div\");\r\n\r\n\tm.setAttribute(\"event_id\", event.id); // for backward compatibility\r\n\tm.setAttribute(this.config.event_attribute, event.id);\r\n\tthis._rendered.push(m);\r\n\tthis._update_marker_position(m, event);\r\n\r\n\tvar css = this.templates.drag_marker_class(event.start_date, event.end_date, event);\r\n\tvar html = this.templates.drag_marker_content(event.start_date, event.end_date, event);\r\n\tm.className = \"dhx_drag_marker\";\r\n\tif(css)\r\n\t\tm.className += \" \" + css;\r\n\tif(html)\r\n\t\tm.innerHTML = html;\r\n\tthis._append_drag_marker(m);\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler._lightbox_controls = {};\r\nscheduler.formSection = function(name){\r\n\tvar config = this.config.lightbox.sections;\r\n\tvar i = 0;\r\n\tfor (i; i < config.length; i++) {\r\n\t\tif (config[i].name == name) {\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif (i === config.length) {\r\n\t\t// GS-1662 section not found, should exit here instead of throwing an error\r\n\t\treturn null;\r\n\t}\r\n\r\n\tvar section = config[i];\r\n\tif (!scheduler._lightbox) {\r\n\t\tscheduler.getLightbox();\r\n\t}\r\n\tvar header = scheduler._lightbox.querySelector(`#${section.id}`);\r\n\tvar node = header.nextSibling;\r\n\r\n\tvar result = {\r\n\t\tsection: section,\r\n\t\theader: header,\r\n\t\tnode: node,\r\n\t\tgetValue:function(ev){\r\n\t\t\treturn scheduler.form_blocks[section.type].get_value(node, (ev||{}), section);\r\n\t\t},\r\n\t\tsetValue:function(value, ev){\r\n\t\t\treturn scheduler.form_blocks[section.type].set_value(node, value, (ev||{}), section);\r\n\t\t}\r\n\t};\r\n\r\n\tvar handler = scheduler._lightbox_controls[\"get_\"+section.type+\"_control\"];\r\n\treturn handler?handler(result):result;\r\n};\r\nscheduler._lightbox_controls.get_template_control = function(result) {\r\n\tresult.control = result.node;\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_select_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('select')[0];\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_textarea_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('textarea')[0];\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_time_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('select'); // array\r\n\treturn result;\r\n};\r\n\r\nscheduler._lightbox_controls.defaults = {\r\n\ttemplate: {\r\n\t\theight:30\r\n\t},\r\n\ttextarea: {\r\n\t\theight: 200\r\n\t},\r\n\tselect: {\r\n\t\theight: 23\r\n\t},\r\n\ttime: {\r\n\t\theight: 20\r\n\t}\r\n};\r\n\r\n\r\nscheduler.form_blocks={\r\n\ttemplate:{\r\n\t\trender: function(sns){\r\n\t\t\treturn \"
\";\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,config){\r\n\t\t\tnode.innerHTML = value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev,config){\r\n\t\t\treturn node.innerHTML||\"\";\r\n\t\t},\r\n\t\tfocus: function(node){\r\n\t\t}\r\n\t},\r\n\ttextarea:{\r\n\t\trender:function(sns){\r\n\t\t\tconst placeholder = sns.placeholder ? `placeholder='${sns.placeholder}'` : \"\";\r\n\t\t\treturn `
`;\r\n\t\t},\r\n\t\tset_value:function(node,value,ev){\r\n\t\t\tscheduler.form_blocks.textarea._get_input(node).value=value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev){\r\n\t\t\treturn scheduler.form_blocks.textarea._get_input(node).value;\r\n\t\t},\r\n\t\tfocus:function(node){\r\n\t\t\tvar a = scheduler.form_blocks.textarea._get_input(node);\r\n\t\t\tscheduler._focus(a, true);\r\n\t\t},\r\n\t\t_get_input: function(node){\r\n\t\t\treturn node.getElementsByTagName(\"textarea\")[0];\r\n\t\t}\r\n\t},\r\n\tselect:{\r\n\t\trender:function(sns){\r\n\t\t\t//var defaults = scheduler._lightbox_controls.defaults.select;\r\n\t\t\tvar html=\"
\";\r\n\t\t\treturn html;\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,sns){\r\n\t\t\tvar select = node.firstChild;\r\n\t\t\tif (!select._dhx_onchange && sns.onchange) {\r\n\t\t\t\tscheduler.event(select, \"change\", sns.onchange);\r\n\t\t\t\tselect._dhx_onchange = true;\r\n\t\t\t}\r\n\t\t\tif (typeof value == \"undefined\")\r\n\t\t\t\tvalue = (select.options[0]||{}).value;\r\n\t\t\tselect.value=value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev){\r\n\t\t\treturn node.firstChild.value;\r\n\t\t},\r\n\t\tfocus:function(node){\r\n\t\t\tvar a=node.firstChild; scheduler._focus(a, true);\r\n\t\t}\r\n\t},\r\n\ttime:{\r\n\t\trender:function(sns) {\r\n\t\t\tif (!sns.time_format) {\r\n\t\t\t\t// default order\r\n\t\t\t\tsns.time_format = [\"%H:%i\", \"%d\", \"%m\", \"%Y\"];\r\n\t\t\t}\r\n\t\t\t// map: default order => real one\r\n\t\t\tsns._time_format_order = {};\r\n\t\t\tvar time_format = sns.time_format;\r\n\r\n\t\t\tvar cfg = scheduler.config;\r\n\t\t\tvar dt = scheduler.date.date_part(scheduler._currentDate());\r\n\t\t\tvar last = 24*60, first = 0;\r\n\t\t\tif(scheduler.config.limit_time_select){\r\n\t\t\t\tlast = 60*cfg.last_hour+1;\r\n\t\t\t\tfirst = 60*cfg.first_hour;\r\n\t\t\t\tdt.setHours(cfg.first_hour);\r\n\t\t\t}\r\n\t\t\tvar html = \"\";\r\n\r\n\t\t\tfor (var p = 0; p < time_format.length; p++) {\r\n\t\t\t\tvar time_option = time_format[p];\r\n\r\n\t\t\t\t// adding spaces between selects\r\n\t\t\t\tif (p > 0) {\r\n\t\t\t\t\thtml += \" \";\r\n\t\t\t\t}\r\n\t\t\t\tvar selectBoxClass = \"\";\r\n\t\t\t\tvar options = \"\";\r\n\t\t\t\tswitch (time_option) {\r\n\t\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_year_select\";\r\n\t\t\t\t\t\tsns._time_format_order[3] = p;\r\n\t\t\t\t\t\t//year\r\n\t\t\t\t\t\tvar range;\r\n\t\t\t\t\t\tvar start_year;\r\n\t\t\t\t\t\tvar end_year;\r\n\t\t\t\t\t\tif(sns.year_range){\r\n\t\t\t\t\t\t\tif (!isNaN(sns.year_range)) {\r\n\t\t\t\t\t\t\t\trange = sns.year_range;\r\n\t\t\t\t\t\t\t} else if (sns.year_range.push) {\r\n\t\t\t\t\t\t\t\t// if\r\n\t\t\t\t\t\t\t\tstart_year = sns.year_range[0];\r\n\t\t\t\t\t\t\t\tend_year = sns.year_range[1];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\trange = range || 10;\r\n\t\t\t\t\t\tvar offset = offset || Math.floor(range / 2);\r\n\t\t\t\t\t\tstart_year = start_year || dt.getFullYear() - offset;\r\n\t\t\t\t\t\tend_year = end_year || start_year + range;\r\n\r\n\t\t\t\t\t\tfor (var i = start_year; i < end_year; i++)\r\n\t\t\t\t\t\t\toptions += \"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%m\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_month_select\";\r\n\t\t\t\t\t\tsns._time_format_order[2] = p;\r\n\t\t\t\t\t\t//month\r\n\t\t\t\t\t\tfor (var i=0; i < 12; i++)\r\n\t\t\t\t\t\t\toptions+=\"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%d\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_day_select\";\r\n\t\t\t\t\t\tsns._time_format_order[1] = p;\r\n\t\t\t\t\t\t//days\r\n\t\t\t\t\t\tfor (var i=1; i < 32; i++)\r\n\t\t\t\t\t\t\toptions+=\"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%H:%i\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_time_select\";\r\n\t\t\t\t\t\tsns._time_format_order[0] = p;\r\n\t\t\t\t\t\t//hours\r\n\t\t\t\t\t\tvar i = first;\r\n\t\t\t\t\t\tvar tdate = dt.getDate();\r\n\t\t\t\t\t\tsns._time_values = [];\r\n\r\n\t\t\t\t\t\twhile(i\"+time+\"\";\r\n\t\t\t\t\t\t\tsns._time_values.push(i);\r\n\t\t\t\t\t\t\tdt.setTime(dt.valueOf()+this.config.time_step*60*1000);\r\n\t\t\t\t\t\t\tvar diff = (dt.getDate()!=tdate)?1:0; // moved or not to the next day\r\n\t\t\t\t\t\t\ti=diff*24*60+dt.getHours()*60+dt.getMinutes();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(options){\r\n\r\n\t\t\t\t\tvar ariaAttrs = scheduler._waiAria.lightboxSelectAttrString(time_option);\r\n\t\t\t\t\tvar readonly = sns.readonly ? \"disabled='disabled'\" : \"\";\r\n\t\t\t\t\thtml += \" \";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//var defaults = scheduler._lightbox_controls.defaults.select;\r\n\r\n\t\t\treturn \"
\"+html+\"  –  \"+html+\"
\";\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,config){\r\n\t\t\tvar cfg = scheduler.config;\r\n\t\t\tvar s=node.getElementsByTagName(\"select\");\r\n\t\t\tvar map = config._time_format_order;\r\n\t\t\tvar start_date, end_date;\r\n\r\n\t\t\tif(cfg.full_day) {\r\n\t\t\t\tif (!node._full_day){\r\n\t\t\t\t\tvar html = \"\";\r\n\t\t\t\t\tif (!scheduler.config.wide_form)\r\n\t\t\t\t\t\thtml = node.previousSibling.innerHTML+html;\r\n\t\t\t\t\tnode.previousSibling.innerHTML=html;\r\n\t\t\t\t\tnode._full_day=true;\r\n\t\t\t\t}\r\n\t\t\t\tvar input=node.previousSibling.getElementsByTagName(\"input\")[0];\r\n\t\t\t\tinput.checked = (scheduler.date.time_part(ev.start_date)===0 && scheduler.date.time_part(ev.end_date)===0);\r\n\r\n\t\t\t\ts[map[0]].disabled=input.checked;\r\n\t\t\t\ts[ map[0] + s.length/2 ].disabled=input.checked;\r\n\r\n\t\t\t\tif(!input.$_eventAttached){\r\n\t\t\t\t\tinput.$_eventAttached = true;\r\n\r\n\t\t\t\t\t\tscheduler.event(input, \"click\", function(){\r\n\t\t\t\t\t\tif(input.checked) {\r\n\t\t\t\t\t\t\tvar obj = {};\r\n\t\t\t\t\t\t\tscheduler.form_blocks.time.get_value(node,obj,config);\r\n\r\n\t\t\t\t\t\t\tstart_date = scheduler.date.date_part(obj.start_date);\r\n\t\t\t\t\t\t\tend_date = scheduler.date.date_part(obj.end_date);\r\n\r\n\t\t\t\t\t\t\tif (+end_date == +start_date || (+end_date >= +start_date && (ev.end_date.getHours() !== 0 || ev.end_date.getMinutes() !== 0)))\r\n\t\t\t\t\t\t\t\tend_date = scheduler.date.add(end_date, 1, \"day\");\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tstart_date = null;\r\n\t\t\t\t\t\t\tend_date = null;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\ts[map[0]].disabled=input.checked;\r\n\t\t\t\t\t\ts[ map[0] + s.length/2 ].disabled=input.checked;\r\n\r\n\t\t\t\t\t\t_fill_lightbox_select(s,0,start_date||ev.start_date);\r\n\t\t\t\t\t\t_fill_lightbox_select(s,4,end_date||ev.end_date);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(cfg.auto_end_date && cfg.event_duration) {\r\n\t\t\t\tvar _update_lightbox_select = function () {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (!(cfg.auto_end_date && cfg.event_duration)){\r\n\t\t\t\t\t\t// setting may be disabled after the handler is attached\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstart_date = new Date(s[map[3]].value,s[map[2]].value,s[map[1]].value,0,s[map[0]].value);\r\n\t\t\t\t\tend_date = new Date(start_date.getTime() + (scheduler.config.event_duration * 60 * 1000));\r\n\t\t\t\t\t_fill_lightbox_select(s, 4, end_date);\r\n\t\t\t\t};\r\n\t\t\t\tfor(var i=0; i<4; i++) {\r\n\t\t\t\t\tif(!s[i].$_eventAttached) {\r\n\t\t\t\t\t\ts[i].$_eventAttached = true;\r\n\t\t\t\t\t\tscheduler.event(s[i], \"change\", _update_lightbox_select);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction _fill_lightbox_select(s,i,d) {\r\n\t\t\t\tvar time_values = config._time_values;\r\n\t\t\t\tvar direct_value = d.getHours()*60+d.getMinutes();\r\n\t\t\t\tvar fixed_value = direct_value;\r\n\t\t\t\tvar value_found = false;\r\n\t\t\t\tfor (var k=0; k\";\r\n\t\tvar ariaAttr = \"\";\r\n\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\tariaAttr = this._waiAria.lightboxButtonAttrString(buttons[i]);\r\n\t\t\thtml += \"
\" + scheduler.locale.labels[buttons[i]] + \"
\";\r\n\t\t}\r\n\r\n\t\tbuttons = this.config.buttons_right;\r\n\t\tvar rtl = scheduler.config.rtl;\r\n\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\tariaAttr = this._waiAria.lightboxButtonAttrString(buttons[i]);\r\n\r\n\t\t\thtml += \"
\";\r\n\r\n\t\t\thtml += \"
\" + scheduler.locale.labels[buttons[i]] + \"
\";\r\n\t\t}\r\n\t\thtml += \"
\";\r\n\t\thtml+=\"
\";\r\n\t\td.innerHTML=html;\r\n\t\tif (scheduler.config.drag_lightbox){\r\n\t\t\tscheduler.event(d.firstChild, \"mousedown\", scheduler._ready_to_dnd);\r\n\t\t\tscheduler.event(d.firstChild, \"selectstart\", function(e){ \r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn false; \r\n\t\t\t});\r\n\t\t\td.firstChild.style.cursor = \"move\";\r\n\t\t\tscheduler._init_dnd_events();\r\n\r\n\t\t}\r\n\r\n\t\tthis._waiAria.lightboxAttr(d);\r\n\r\n\t\tthis.show_cover();\r\n\t\tthis._cover.insertBefore(d,this._cover.firstChild);\r\n\t\t\r\n\t\tthis._lightbox=d;\r\n\r\n\t\tvar sns=this.config.lightbox.sections;\r\n\t\thtml=\"\";\r\n\t\tfor (var i=0; i < sns.length; i++) {\r\n\t\t\tvar block=this.form_blocks[sns[i].type];\r\n\t\t\tif (!block) continue; //ignore incorrect blocks\r\n\t\t\tsns[i].id=\"area_\"+this.uid();\r\n\t\t\tvar button = \"\";\r\n\t\t\tif (sns[i].button){\r\n\t\t\t\tvar ariaAttr = scheduler._waiAria.lightboxSectionButtonAttrString(this.locale.labels[\"button_\"+sns[i].button]);\r\n\t\t\t\tbutton = \"
\"+this.locale.labels[\"button_\"+sns[i].button]+\"
\";\r\n\t\t\t}\r\n\r\n\t\t\tif (this.config.wide_form){\r\n\t\t\t\thtml+=\"
\";\r\n\t\t\t}\r\n\r\n\t\t\tvar label_name = this.locale.labels[\"section_\"+sns[i].name];\r\n\t\t\tif(typeof label_name !== \"string\"){\r\n\t\t\t\tlabel_name = sns[i].name;\r\n\t\t\t}\r\n\t\t\thtml+=\"
\"+button+ \"
\"+block.render.call(this,sns[i]);\r\n\t\t\thtml+=\"
\";\r\n\t\t}\r\n\r\n\t\tvar ds=d.getElementsByTagName(\"div\");\r\n\t\tfor (var i=0; i
 \r\n
\r\n
\r\n\r\n
`;\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler.getRootView = function() {\r\n\treturn {\r\n\t\tview: {\r\n\t\t\trender: function(){\r\n\t\t\t\treturn {\r\n\t\t\t\t\ttag: \"div\",\r\n\t\t\t\t\ttype: 1,\r\n\t\t\t\t\tattrs: {\r\n\t\t\t\t\t\tstyle: \"width:100%;height:100%;\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\thooks: {\r\n\t\t\t\t\t\t\"didInsert\": function(){\r\n\t\t\t\t\t\t\tscheduler.setCurrentView();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tbody: [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tel: this.el,\r\n\t\t\t\t\t\t\ttype: 1\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t};\r\n\t\t\t},\r\n\t\t\tinit: function(){\r\n\t\t\t\tvar container = document.createElement(\"DIV\");\r\n\t\t\t\tcontainer.id = \"scheduler_\"+ scheduler.uid();\r\n\t\t\t\tcontainer.style.width = \"100%\";\r\n\t\t\t\tcontainer.style.height = \"100%\";\r\n\t\t\t\tcontainer.classList.add(\"dhx_cal_container\");\r\n\t\t\t\tcontainer.cmp = \"grid\";\r\n\t\t\t\tcontainer.innerHTML = '
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
';\r\n\t\t\t\tscheduler.init(container);\r\n\r\n\t\t\t\tthis.el = container;\r\n\t\t\t}\r\n\t\t},\r\n\t\ttype: 4\r\n\t};\r\n};\r\n\r\n}","import global from \"../global\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\n(function(){\r\n\r\n\tvar setCurrentView = scheduler.setCurrentView,\r\n\t\tupdateView = scheduler.updateView;\r\n\tvar update_view_timer = null,\r\n\t\tcurr_view_timer = null;\r\n\r\n\tvar lazy_setCurrentView = function(date, mode){\r\n\t\tvar self = this;\r\n\t\tglobal.clearTimeout(curr_view_timer);\r\n\t\tglobal.clearTimeout(update_view_timer);\r\n\r\n\t\tvar oldDate = self._date,\r\n\t\t\toldMode = self._mode;\r\n\t\tupdateFlags(this, date, mode);\r\n\r\n\t\tcurr_view_timer = setTimeout(function(){\r\n\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif (!self.callEvent(\"onBeforeViewChange\", [oldMode, oldDate, mode || self._mode, date || self._date])){\r\n\t\t\t\tupdateFlags(self, oldDate, oldMode);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tupdateView.call(self, date, mode);\r\n\t\t\tself.callEvent(\"onViewChange\", [self._mode, self._date]);\r\n\r\n\t\t\tglobal.clearTimeout(update_view_timer);\r\n\t\t\tcurr_view_timer = 0;\r\n\t\t}, scheduler.config.delay_render);\r\n\t};\r\n\tvar lazy_updateView = function(date, mode){\r\n\t\tvar self = this,\r\n\t\t\tars = arguments;\r\n\r\n\t\tupdateFlags(this, date, mode);\r\n\r\n\t\tglobal.clearTimeout(update_view_timer);\r\n\t\tupdate_view_timer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif(curr_view_timer)\r\n\t\t\t\treturn;\r\n\r\n\t\t\tupdateView.apply(self, ars);\r\n\t\t}, scheduler.config.delay_render);\r\n\t};\r\n\tfunction updateFlags(scheduler, date, mode){\r\n\t\tif(date)\r\n\t\t\tscheduler._date = date;\r\n\t\tif(mode)\r\n\t\t\tscheduler._mode = mode;\r\n\r\n\t}\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\tif(scheduler.config.delay_render){\r\n\t\t\tscheduler.setCurrentView = lazy_setCurrentView;\r\n\t\t\tscheduler.updateView = lazy_updateView;\r\n\t\t}else{\r\n\t\t\tscheduler.setCurrentView = setCurrentView;\r\n\t\t\tscheduler.updateView = updateView;\r\n\t\t}\r\n\t});\r\n\r\n})();\r\n\r\n}","import global from \"../global\";\r\n\r\nexport default function extend(scheduler) {\r\n/*\r\nif (global.dataProcessor && !dataProcessor.prototype.init_original){\r\n\tdataProcessor.prototype.init_original=dataProcessor.prototype.init;\r\n\tdataProcessor.prototype.init=function(obj){\r\n\t\tthis.init_original(obj);\r\n\t\tobj._dataprocessor=this;\r\n\r\n\t\tthis.setTransactionMode(\"POST\",true);\r\n\t\tthis.serverProcessor+=(this.serverProcessor.indexOf(\"?\")!=-1?\"&\":\"?\")+\"editing=true\";\r\n\t};\r\n}*/\r\n\r\nscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\tif(typeof dhtmlxError !== \"undefined\") {\r\n\t\twindow.dhtmlxError.catchError(\"LoadXML\", function(a, b, c){\r\n\t\t\tvar message = c[0].responseText;\r\n\r\n\t\t\tswitch (scheduler.config.ajax_error){\r\n\t\t\t\tcase \"alert\":\r\n\t\t\t\t\tglobal.alert(message);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"console\":\r\n\t\t\t\t\tglobal.console.log(message);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n});\r\n\r\n\r\n}","import ar from \"./locale_ar\";\r\nimport be from \"./locale_be\";\r\nimport ca from \"./locale_ca\";\r\nimport cn from \"./locale_cn\";\r\nimport cs from \"./locale_cs\";\r\nimport da from \"./locale_da\";\r\nimport de from \"./locale_de\";\r\nimport el from \"./locale_el\";\r\nimport en from \"./locale_en\";\r\nimport es from \"./locale_es\";\r\nimport fi from \"./locale_fi\";\r\nimport fr from \"./locale_fr\";\r\nimport he from \"./locale_he\";\r\nimport hu from \"./locale_hu\";\r\nimport id from \"./locale_id\";\r\nimport it from \"./locale_it\";\r\nimport jp from \"./locale_jp\";\r\n\r\nimport LocaleManager from \"./locale_manager\";\r\n\r\nimport nb from \"./locale_nb\";\r\nimport nl from \"./locale_nl\";\r\nimport no from \"./locale_no\";\r\nimport pl from \"./locale_pl\";\r\nimport pt from \"./locale_pt\";\r\nimport ro from \"./locale_ro\";\r\nimport ru from \"./locale_ru\";\r\nimport si from \"./locale_si\";\r\nimport sk from \"./locale_sk\";\r\nimport sv from \"./locale_sv\";\r\nimport tr from \"./locale_tr\";\r\nimport ua from \"./locale_ua\";\r\n\r\nexport default function(){\r\n\treturn new LocaleManager({\r\n\t\ten,\r\n\t\tar,\r\n\t\tbe,\r\n\t\tca,\r\n\t\tcn,\r\n\t\tcs,\r\n\t\tda,\r\n\t\tde,\r\n\t\tel,\r\n\t\tes,\r\n\t\tfi,\r\n\t\tfr,\r\n\t\the,\r\n\t\thu,\r\n\t\tid,\r\n\t\tit,\r\n\t\tjp,\r\n\t\tnb,\r\n\t\tnl,\r\n\t\tno,\r\n\t\tpl,\r\n\t\tpt,\r\n\t\tro,\r\n\t\tru,\r\n\t\tsi,\r\n\t\tsk,\r\n\t\tsv,\r\n\t\ttr,\r\n\t\tua\r\n\t});\r\n}","export default class ExtensionsManager{\r\n\tconstructor(config){\r\n\t\tthis._extensions = {};\r\n\t\tfor(const i in config){\r\n\t\t\tthis._extensions[i] = config[i];\r\n\t\t}\r\n\t}\r\n\r\n\taddExtension(name, ext) {\r\n\t\tthis._extensions[name] = ext;\r\n\t}\r\n\r\n\tgetExtension(name) {\r\n\t\treturn this._extensions[name];\r\n\t}\r\n}","\r\nexport default function(){\r\n/* global dhtmlx */\r\nif (typeof dhtmlx != \"undefined\" && dhtmlx.attaches) {\r\n\tdhtmlx.attaches.attachScheduler = function (day, mode, tabs, scheduler) {\r\n\t\tvar tabs = tabs || '
';\r\n\t\tvar obj = document.createElement(\"DIV\");\r\n\t\tobj.id = \"dhxSchedObj_\" + this._genStr(12);\r\n\t\tobj.innerHTML = '
' + tabs + '
';\r\n\t\tdocument.body.appendChild(obj.firstChild);\r\n\r\n\t\tthis.attachObject(obj.id, false, true);\r\n\r\n\t\tthis.vs[this.av].sched = scheduler;\r\n\t\tthis.vs[this.av].schedId = obj.id;\r\n\t\tscheduler.setSizes = scheduler.updateView;\r\n\t\tscheduler.destructor = function () { };\r\n\t\tscheduler.init(obj.id, day, mode);\r\n\r\n\t\treturn this.vs[this._viewRestore()].sched;\r\n\t};\r\n}\r\n\r\n}","export default {\r\n\talert: (extension, assert) => {\r\n\t\tassert(false, `The ${extension} extension is not included in this version of dhtmlxScheduler.
\r\n\t\tYou may need a Professional version of the component.
\r\n\t\tContact us at https://dhtmlx.com/docs/contact.shtml if you have any questions.`);\r\n\t}\r\n};","export default function(scheduler){\r\n\r\n\r\n\r\n(function(){\r\n\tvar modalsStack = [];\r\n\r\n\tfunction isModal(){\r\n\t\treturn !!(modalsStack.length);\r\n\t}\r\n\r\n\tfunction isChildOf(child, parent){\r\n\t\twhile(child && child != parent){\r\n\t\t\tchild = child.parentNode;\r\n\t\t}\r\n\r\n\t\treturn !!(child == parent);\r\n\t}\r\n\r\n\tfunction afterPopup(box){\r\n\t\tsetTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif(!isModal() && !(isChildOf(document.activeElement, scheduler.$container))) {\r\n\t\t\t\tscheduler.focus();\r\n\t\t\t}\r\n\t\t}, 1);\r\n\t}\r\n\tfunction startModal(box){\r\n\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\tscheduler.event(box, \"keydown\", trapFocus);\r\n\t\tmodalsStack.push(box);\r\n\t\t//scheduler.$keyboardNavigation.dispatcher.disable();\r\n\t}\r\n\r\n\tfunction endModal(){\r\n\t\tvar box = modalsStack.pop();\r\n\t\tif(box) {\r\n\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t}\r\n\t\tafterPopup(box);\r\n\r\n\t}\r\n\r\n\tfunction isTopModal(box){\r\n\t//\tif(dhtmlx._modalsStack.length){\r\n\t//\t\treturn box == dhtmlx._modalsStack[dhtmlx._modalsStack.length - 1];\r\n\t//\t}else{\r\n\t\t\treturn box == modalsStack[modalsStack.length - 1];\r\n\t//\t}\r\n\r\n\t}\r\n\r\n\tfunction trapFocus(event){\r\n\t\tvar event = event || window.event;\r\n\t\tvar target = event.currentTarget;\r\n\t\tif(!isTopModal(target)) return;\r\n\r\n\t\tscheduler.$keyboardNavigation.trapFocus(target, event);\r\n\t}\r\n\r\n\tfunction traceLightbox(){\r\n\t\tstartModal(scheduler.getLightbox());\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onLightbox\", traceLightbox);\r\n\tscheduler.attachEvent(\"onAfterLightbox\", endModal);\r\n\r\n\tscheduler.attachEvent(\"onAfterQuickInfo\", function(){afterPopup();});\r\n\r\n\tif(!scheduler._keyNavMessagePopup) {\r\n\t\tscheduler._keyNavMessagePopup = true;\r\n\r\n\t\tvar focusElement = null;\r\n\t\tvar backupFocus = null;\r\n\t\tconst modalsStack = [];\r\n\t\tscheduler.attachEvent(\"onMessagePopup\", function(box){\r\n\t\t\tfocusElement = document.activeElement;\r\n\t\t\tbackupFocus = focusElement;\r\n\r\n\t\t\twhile(backupFocus && scheduler._getClassName(backupFocus).indexOf(\"dhx_cal_data\") < 0){\r\n\t\t\t\tbackupFocus = backupFocus.parentNode;\r\n\t\t\t}\r\n\t\t\tif(backupFocus){\r\n\t\t\t\tbackupFocus = backupFocus.parentNode;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t\tscheduler.event(box, \"keydown\", trapFocus);\r\n\t\t\tmodalsStack.push(box);\r\n\t\t});\r\n\r\n\r\n\t\tscheduler.attachEvent(\"onAfterMessagePopup\", function () {\r\n\t\t\tvar box = modalsStack.pop();\r\n\t\t\tif(box) {\r\n\t\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t\t}\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tvar currentTarget = document.activeElement;\r\n\t\t\t\twhile(currentTarget && scheduler._getClassName(currentTarget).indexOf(\"dhx_cal_light\") < 0){\r\n\t\t\t\t\tcurrentTarget = currentTarget.parentNode;\r\n\t\t\t\t}\r\n\t\t\t\tif(currentTarget)\r\n\t\t\t\t\treturn;\r\n\r\n\r\n\t\t\t\tif(focusElement && focusElement.parentNode){\r\n\t\t\t\t\tfocusElement.focus();\r\n\r\n\t\t\t\t}else if(backupFocus && backupFocus.parentNode){\r\n\t\t\t\t\tbackupFocus.focus();\r\n\t\t\t\t}\r\n\t\t\t\tfocusElement = null;\r\n\t\t\t\tbackupFocus = null;\r\n\r\n\t\t\t}, 1);\r\n\t\t});\r\n\t}\r\n\r\n\tscheduler.$keyboardNavigation.isModal = isModal;\r\n\r\n\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\r\n//Initial idea and implementation by Steve MC\r\nscheduler._temp_key_scope = function (){\r\n\r\n\tscheduler.config.key_nav = true;\r\n\r\n\tscheduler.$keyboardNavigation._pasteDate = null; // used for copy and paste operations\r\n\tscheduler.$keyboardNavigation._pasteSection = null; // used for copy and paste operations\r\n\tvar isCopy = null;\r\n\r\n\tvar pos = {};\r\n\r\n\tif(!document.body){\r\n\t\tscheduler.event(window, \"load\", function(){\r\n\t\t\tscheduler.event(document.body, \"mousemove\", trackMousePosition);\r\n\t\t});\r\n\t}else{\r\n\t\tscheduler.event(document.body, \"mousemove\", trackMousePosition);\r\n\t}\r\n\r\n\tfunction trackMousePosition(event){\r\n\t\tevent = event || window.event;\r\n\t\tpos.x = event.clientX;\r\n\t\tpos.y = event.clientY;\r\n\t}\r\n\tfunction currentTarget(){\r\n\r\n\t\tvar mousePointer = false;\r\n\t\tvar keyNavPointer = false;\r\n\r\n\t\tvar target = document.elementFromPoint(pos.x, pos.y);\r\n\t\twhile(target && target != scheduler._obj){\r\n\t\t\ttarget = target.parentNode;\r\n\t\t}\r\n\t\tmousePointer = !!(target == scheduler._obj);\r\n\r\n\t\tkeyNavPointer = scheduler.$keyboardNavigation.dispatcher.isEnabled();\r\n\r\n\t\treturn mousePointer || keyNavPointer;\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onMouseMove\", function(id,e){\r\n\t\tvar state = scheduler.getState();\r\n\r\n\t\t// make sure scheduler is fully initialized before calling scheduler.getActionData\r\n\t\tif(!(state.mode && state.min_date)){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar position = scheduler.getActionData(e);\r\n\t\tscheduler.$keyboardNavigation._pasteDate = position.date;\r\n\t\tscheduler.$keyboardNavigation._pasteSection = position.section;\r\n\t});\r\n\r\n\tfunction clear_event_after(ev){\r\n\t\tdelete ev.rec_type; delete ev.rec_pattern;\r\n\t\tdelete ev.event_pid; delete ev.event_length;\r\n\t}\r\n\r\n\tfunction copyEvent(ev){\r\n\t\treturn scheduler._lame_copy({}, ev);\r\n\t}\r\n\r\n\tscheduler._make_pasted_event = function(ev){\r\n\t\tvar date = scheduler.$keyboardNavigation._pasteDate;\r\n\t\tvar section = scheduler.$keyboardNavigation._pasteSection;\r\n\r\n\t\tvar event_duration = ev.end_date-ev.start_date;\r\n\r\n\t\tvar copy = copyEvent(ev);\r\n\t\tclear_event_after(copy);\r\n\t\tcopy.start_date = new Date(date);\r\n\t\tcopy.end_date = new Date(copy.start_date.valueOf() + event_duration);\r\n\r\n\t\tif(section){\r\n\t\t\tvar property = scheduler._get_section_property();\r\n\t\t\t// GS-2527: if the event has multiple sections, it will be inserted into the initial sections.\r\n\t\t\tif(scheduler.config.multisection && ev[property] && scheduler.isMultisectionEvent && scheduler.isMultisectionEvent(ev)) \r\n\t\t\t\tcopy[property] = ev[property]; // save initial set of resources for multisection view\r\n\t\t\telse\r\n\t\t\t\tcopy[property] = section;\r\n\t\t}\r\n\t\treturn copy;\r\n\t};\r\n\tscheduler._do_paste = function(is_copy, modified_ev, original_ev){\r\n\t\tif(scheduler.callEvent(\"onBeforeEventPasted\", [is_copy, modified_ev, original_ev]) === false){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tscheduler.addEvent(modified_ev);\r\n\t\tscheduler.callEvent(\"onEventPasted\", [is_copy, modified_ev, original_ev]);\r\n\t};\r\n\r\n\tscheduler._is_key_nav_active = function(){\r\n\t\tif(this._is_initialized() && !this._is_lightbox_open() && this.config.key_nav){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\r\n\tfunction getSelectedEvent(){\r\n\t\tvar node = scheduler.$keyboardNavigation.dispatcher.getActiveNode();\r\n\t\tif(node && node.eventId) return node.eventId;\r\n\t\treturn scheduler._select_id;\r\n\t}\r\n\r\n\tscheduler.event(document, \"keydown\", function(e){\r\n\t\t// compatibility fix - scheduler focus on ctrl+v on mouse hover\r\n\t\tif(((e.ctrlKey || e.metaKey) && e.keyCode == 86) && scheduler._buffer_event && !scheduler.$keyboardNavigation.dispatcher.isEnabled()) {\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.isActive = currentTarget();\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler._key_nav_copy_paste = function(e){\r\n\t\tif(!scheduler._is_key_nav_active()) return true;\r\n\r\n\t\tif (e.keyCode == 37 || e.keyCode == 39) { // Left, Right arrows\r\n\t\t\te.cancelBubble = true;\r\n\r\n\t\t\tvar next = scheduler.date.add(scheduler._date,(e.keyCode == 37 ? -1 : 1 ),scheduler._mode);\r\n\t\t\tscheduler.setCurrentView(next);\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tvar select_id = getSelectedEvent();\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 67) { // CTRL+C\r\n\t\t\tif (select_id) {\r\n\t\t\t\tscheduler._buffer_event = copyEvent(scheduler.getEvent(select_id));\r\n\t\t\t\tisCopy = true;\r\n\t\t\t\tscheduler.callEvent(\"onEventCopied\", [scheduler.getEvent(select_id)]);\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 88) { // CTRL+X\r\n\t\t\tif (select_id) {\r\n\t\t\t\tisCopy = false;\r\n\t\t\t\tvar ev = scheduler._buffer_event = copyEvent(scheduler.getEvent(select_id));\r\n\r\n\t\t\t\tscheduler.updateEvent(ev.id);\r\n\t\t\t\tscheduler.callEvent(\"onEventCut\", [ev]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 86 && currentTarget(e)) { // CTRL+V\r\n\t\t\tvar ev = scheduler._buffer_event ? scheduler.getEvent(scheduler._buffer_event.id) : scheduler._buffer_event;\r\n\t\t\tev = ev || scheduler._buffer_event;\r\n\r\n\t\t\tif (ev) {\r\n\t\t\t\tvar new_ev = scheduler._make_pasted_event(ev);\r\n\t\t\t\tif (isCopy) {\r\n\t\t\t\t\tnew_ev.id = scheduler.uid();\r\n\t\t\t\t\tscheduler._do_paste(isCopy, new_ev, ev);\r\n\t\t\t\t}\r\n\t\t\t\telse { // cut operation\r\n\t\t\t\t\tvar res = scheduler.callEvent(\"onBeforeEventChanged\",[new_ev, e, false, ev]);\r\n\t\t\t\t\tif (res) {\r\n\t\t\t\t\t\tscheduler._do_paste(isCopy, new_ev, ev);\r\n\t\t\t\t\t\tisCopy = true; // switch to copy after first paste operation\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t};\r\n};\r\nscheduler._temp_key_scope();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.attachSchedulerHandlers = function(){\r\n\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\tvar keyDownHandler = function(e){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\r\n\t\treturn dispatcher.keyDownHandler(e);\r\n\t};\r\n\r\n\tvar focusHandler = function () {\r\n\t\tdispatcher.keepScrollPosition(function () {\r\n\t\t\tdispatcher.focusGlobalNode();\r\n\t\t});\r\n\t};\r\n\r\n\tvar waitCall;\r\n\tscheduler.attachEvent(\"onDataRender\", function(){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\t\tif(!(dispatcher.isEnabled() && !scheduler.getState().editor_id)) return;\r\n\r\n\t\tclearTimeout(waitCall);\r\n\t\twaitCall = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif(!dispatcher.isEnabled())\r\n\t\t\t\tdispatcher.enable();\r\n\t\t\treFocusActiveNode();\r\n\t\t});\r\n\t});\r\n\r\n\tvar reFocusActiveNode = function(){\r\n\t\tif(!dispatcher.isEnabled())\r\n\t\t\treturn;\r\n\r\n\t\tvar activeNode = dispatcher.getActiveNode();\r\n\t\tif(!activeNode)\r\n\t\t\treturn;\r\n\r\n\t\tif(!activeNode.isValid()){\r\n\t\t\tactiveNode = activeNode.fallback();\r\n\t\t}\r\n\r\n\t\tif(!activeNode || activeNode instanceof scheduler.$keyboardNavigation.MinicalButton || activeNode instanceof scheduler.$keyboardNavigation.MinicalCell)\r\n\t\t\treturn;\r\n\r\n\t\tdispatcher.keepScrollPosition(function () {\r\n\t\t\tactiveNode.focus(true);\r\n\t\t});\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\tvar container = scheduler.$container;\r\n\t\tscheduler.eventRemove(document, \"keydown\", keyDownHandler);\r\n\t\tscheduler.eventRemove(container, \"mousedown\", mousedownHandler);\r\n\t\tscheduler.eventRemove(container, \"focus\", focusHandler);\r\n\r\n\r\n\t\tif(scheduler.config.key_nav){\r\n\r\n\t\t\tscheduler.event(document, \"keydown\", keyDownHandler);\r\n\t\t\tscheduler.event(container, \"mousedown\", mousedownHandler);\r\n\t\t\tscheduler.event(container, \"focus\", focusHandler);\r\n\r\n\t\t\tcontainer.setAttribute(\"tabindex\", \"0\");\r\n\r\n\t\t}else{\r\n\t\t\tcontainer.removeAttribute(\"tabindex\");\r\n\t\t}\r\n\t});\r\n\r\n\tfunction mousedownHandler(e){\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\r\n\t\tconst view = scheduler.getView();\r\n\t\tlet dataAreaClick = false;\r\n\t\tif (scheduler.getState().mode === \"month\") {\r\n\t\t\tdataAreaClick = scheduler.$keyboardNavigation.isChildOf(e.target || e.srcElement, scheduler.$container.querySelector(\".dhx_cal_month_table\"));\r\n\t\t} else if (view && view.layout === \"timeline\") {\r\n\t\t\tdataAreaClick = scheduler.$keyboardNavigation.isChildOf(e.target || e.srcElement, scheduler.$container.querySelector(\".dhx_timeline_data_col\"));\r\n\t\t} else {\r\n\t\t\tconst listOfScales = scheduler.$container.querySelectorAll(\".dhx_scale_holder\");\r\n\t\t\tconst arrOfScales = Array.from(listOfScales);\r\n\t\t\tdataAreaClick = arrOfScales.some(scale => scale === e.target.parentNode);\r\n\t\t}\r\n\r\n\t\tvar pos = scheduler.getActionData(e);\r\n\r\n\t\tvar focusNode;\r\n\t\tif(scheduler._locate_event(e.target || e.srcElement)){\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.Event(scheduler._locate_event(e.target || e.srcElement));\r\n\t\t}else if(dataAreaClick){\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(pos.date && dataAreaClick){\r\n\t\t\t\tfocusNode = focusNode.nextSlot(new scheduler.$keyboardNavigation.TimeSlot(pos.date, null, pos.section));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(focusNode) {\r\n\t\t\tif (!dispatcher.isEnabled()) {\r\n\t\t\t\tdispatcher.activeNode = focusNode;\r\n\r\n\t\t\t} else {\r\n\t\t\t\tif (pos.date && dataAreaClick) {\r\n\t\t\t\t\tdispatcher.delay(function () {\r\n\t\t\t\t\t\tdispatcher.setActiveNode(focusNode);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction focusEvent(evNode){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\t\tif(!dispatcher.isEnabled()) return;\r\n\r\n\r\n\t\tvar prevState = evNode;\r\n\t\tvar focusNode = new scheduler.$keyboardNavigation.Event(prevState.eventId);\r\n\t\tif(!focusNode.isValid()){\r\n\t\t\tvar lastStart = focusNode.start || prevState.start;\r\n\t\t\tvar lastEnd = focusNode.end || prevState.end;\r\n\t\t\tvar lastSection = focusNode.section || prevState.section;\r\n\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot(lastStart, lastEnd, lastSection);\r\n\t\t\tif(!focusNode.isValid()){\r\n\t\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdispatcher.setActiveNode(focusNode);\r\n\t\tvar node = dispatcher.getActiveNode();\r\n\t\tif(node && node.getNode && document.activeElement != node.getNode()){\r\n\t\t\tdispatcher.focusNode(dispatcher.getActiveNode());\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tvar updateEvent = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id){\r\n\t\tvar res = updateEvent.apply(this, arguments);\r\n\t\tif(scheduler.config.key_nav && dispatcher.isEnabled()){\r\n\t\t\tif(scheduler.getState().select_id == id){\r\n\t\t\t\tvar element = new scheduler.$keyboardNavigation.Event(id);\r\n\r\n\t\t\t\tif(!scheduler.getState().lightbox_id){\r\n\t\t\t\t\tfocusEvent(element);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onEventDeleted\", function(id) {\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\t\tif(dispatcher.isEnabled()){\r\n\t\t\tvar activeNode = dispatcher.getActiveNode();\r\n\t\t\tif(activeNode.eventId == id){\r\n\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onClearAll\", function(){\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\t\tif(dispatcher.isEnabled()){\r\n\t\t\tif(dispatcher.getActiveNode() instanceof scheduler.$keyboardNavigation.Event){\r\n\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n};\r\n\r\n}","import { IMapAdapter, ICalendarEvent, IMapSettings, IMapPosition} from \"./types\";\r\ndeclare let google: any;\r\n\r\nexport class GoogleMapAdapter implements IMapAdapter {\r\n\tprivate map: any;\r\n\tprivate scheduler: any;\r\n\tprivate settings: IMapSettings;\r\n\tprivate _markers: any[];\r\n\tprivate infoWindow: any;\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.map = null;\r\n\t\tthis._markers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t}\r\n\tonEventClick(event: ICalendarEvent): void {\r\n\t\tif (this._markers && this._markers.length > 0) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\t\tif (event.id == this._markers[i].event.id) {\r\n\t\t\t\t\tlet zoom = this.settings.zoom_after_resolve || this.settings.initial_zoom;\r\n\t\t\t\t\tif (event.lat && event.lng){\r\n\t\t\t\t\t\tthis.map.setCenter({\r\n\t\t\t\t\t\t\tlat: event.lat, \r\n\t\t\t\t\t\t\tlng: event.lng,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tthis.map.setZoom(zoom);\r\n\t\t\t\t\t} else {\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.map.setCenter({\r\n\t\t\t\t\t\t\tlat: this.settings.error_position.lat, \r\n\t\t\t\t\t\t\tlng: this.settings.error_position.lng,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tthis.map.setZoom(zoom);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tgoogle.maps.event.trigger(this._markers[i].marker, 'click');\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t} \r\n\t}\r\n\r\n\tinitialize(container: HTMLElement, options: IMapSettings): void {\r\n\t\tthis.settings = options;\r\n\t\tlet scheduler = this.scheduler;\r\n\t\tlet mapOptions = {\r\n\t\t\tcenter: { lat: options.initial_position.lat, lng: options.initial_position.lng },\r\n\t\t\tzoom: options.initial_zoom,\r\n\t\t\tmapId: container.id,\r\n\t\t\tscrollwheel: true,\r\n\t\t\tmapTypeId: options.type\r\n\t\t}\r\n\t\t// we need to reuse the google map to avoid leak memory\r\n\t\tif (this.map === null) {\r\n\t\t\tthis.map = new google.maps.Map(container, mapOptions);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tlet map = this.map;\r\n\t\t\tcontainer.appendChild(this.map.__gm.messageOverlay);\r\n\t\t\tcontainer.appendChild(this.map.__gm.outerContainer);\r\n\t\t\tsetTimeout(function() {\r\n\t\t\t\tmap.setOptions({container: container.id});\r\n\t\t\t}, 500);\r\n\t\t}\r\n\t\tgoogle.maps.event.addListener(this.map, \"dblclick\", function(event) {\r\n\t\t\tconst geocoder = new google.maps.Geocoder();\r\n\t\r\n\t\t\tif (!scheduler.config.readonly && scheduler.config.dblclick_create) {\r\n\t\t\t\tlet point = event.latLng;\r\n\t\t\t\tgeocoder.geocode(\r\n\t\t\t\t\t{ 'latLng': point },\r\n\t\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\t\tif (status == google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\t\tpoint = results[0].geometry.location;\r\n\t\t\t\t\t\t\tscheduler.addEventNow({\r\n\t\t\t\t\t\t\t\tlat: point.lat(),\r\n\t\t\t\t\t\t\t\tlng: point.lng(),\r\n\t\t\t\t\t\t\t\tevent_location: results[0].formatted_address,\r\n\t\t\t\t\t\t\t\tstart_date: scheduler.getState().date,\r\n\t\t\t\t\t\t\t\tend_date: scheduler.date.add(scheduler.getState().date, scheduler.config.time_step, \"minute\")\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tconsole.error('Geocode was not successful for the following reason: ' + status);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tdestroy(container: HTMLElement): void {\r\n\t\tgoogle.maps.event.clearInstanceListeners(window);\r\n\t\tgoogle.maps.event.clearInstanceListeners(document);\r\n\t\tgoogle.maps.event.clearInstanceListeners(container);\r\n\t\twhile (container.firstChild) {\r\n\t\t\tcontainer.firstChild.remove();\r\n\t\t}\r\n\t\tcontainer.innerHTML = \"\";\r\n\t}\r\n\r\n\tasync addEventMarker(event: ICalendarEvent): Promise {\r\n\t\tlet config = {\r\n\t\t\ttitle: event.text,\r\n\t\t\tposition: {},\r\n\t\t\tmap: {}\r\n\t\t}\r\n\t\t\r\n\t\tif (event.lat && event.lng) {\r\n\t\t\tconfig.position = { lat: event.lat, lng: event.lng };\r\n\t\t} else {\r\n\t\t\tconfig.position = { lat: this.settings.error_position.lat, lng: this.settings.error_position.lng }\r\n\t\t}\r\n\t\tconst { AdvancedMarkerElement } = await google.maps.importLibrary(\"marker\");\r\n\t\tlet marker;\r\n\t\tif (this.scheduler.ext.mapView.createMarker) {\r\n\t\t\tconfig.map = this.map;\r\n\t\t\tmarker = this.scheduler.ext.mapView.createMarker(config);\r\n\t\t} else {\r\n\t\t\tmarker = new AdvancedMarkerElement(config);\r\n\t\t\tmarker.map = this.map;\r\n\t\t}\r\n\t\tmarker.setMap(this.map);\r\n\t\t//case for markeks which were deleted with DataProcessor\r\n\t\tif (event[\"!nativeeditor_status\"] == \"true_deleted\"){\r\n\t\t\tmarker.setMap(null);\r\n\t\t}\r\n\t\tgoogle.maps.event.addListener(marker, \"click\", () => {\r\n\t\t\tif (this.infoWindow) {\r\n\t\t\t\tthis.infoWindow.close();\r\n\t\t\t}\r\n\t\t\tthis.infoWindow = new google.maps.InfoWindow({maxWidth: this.settings.info_window_max_width});\r\n\t\t\tthis.infoWindow.setContent(this.scheduler.templates.map_info_content(event));\r\n\t\t\tthis.infoWindow.open({\r\n\t\t\t\tanchor: marker,\r\n\t\t\t\tmap: this.map,\r\n\t\t\t});\r\n\t\t});\r\n\t\tlet markerInfo = {event, ...config, marker};\r\n\t\tthis._markers.push(markerInfo);\r\n\t}\r\n\r\n\tremoveEventMarker(eventId: string): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif (eventId == this._markers[i].event.id) {\r\n\t\t\t\tthis._markers[i].marker.setVisible(false);\r\n\t\t\t\tthis._markers[i].marker.setMap(null);\r\n\t\t\t\tthis._markers[i].marker.setPosition(null);\r\n\t\t\t\tthis._markers[i].marker = null;\r\n\t\t\t\tthis._markers.splice(i,1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tupdateEventMarker(event: ICalendarEvent): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif(this._markers[i].event.id == event.id) {\r\n\t\t\t\tthis._markers[i].event = event;\r\n\t\t\t\tthis._markers[i].position.lat = event.lat;\r\n\t\t\t\tthis._markers[i].position.lng = event.lng;\r\n\t\t\t\tthis._markers[i].text = event.text;\r\n\t\t\t\tlet latlng = new google.maps.LatLng(event.lat, event.lng);\r\n\t\t\t\tthis._markers[i].marker.setPosition(latlng);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tclearEventMarkers(): void {\r\n\t\tif (this._markers.length > 0) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\t\tthis._markers[i].marker.setMap(null);\r\n\t\t\t}\r\n\t\t\tthis._markers = [];\r\n\t\t}\r\n\t}\r\n\r\n\tsetView(latitude: number, longitude: number, zoom: number): void {\r\n\t\tthis.map.setCenter({\r\n\t\t\tlat: latitude, \r\n\t\t\tlng: longitude,\r\n\t\t});\r\n\t\tthis.map.setZoom(zoom);\r\n\t}\r\n\r\n\tasync resolveAddress(string: string): Promise {\r\n\t\tconst geocoder = new google.maps.Geocoder();\r\n\t\tlet position: any = await new Promise((resolve) => {\r\n\t\t\tgeocoder.geocode(\r\n\t\t\t\t{ 'address': string },\r\n\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\tif (status == google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\tresolve({\r\n\t\t\t\t\t\t lat: results[0].geometry.location.lat(),\r\n\t\t\t\t\t\t lng: results[0].geometry.location.lng()\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tconsole.error('Geocode was not successful for the following reason: ' + status);\r\n\t\t\t\t\t\tresolve({});\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t});\r\n\t\treturn position;\r\n\t}\r\n\t\r\n}","import { IMapAdapter, ICalendarEvent, IMapSettings, IMapPosition} from \"./types\";\r\n\r\ndeclare let L: any\r\n\r\nexport class OpenStreetMapAdapter implements IMapAdapter {\r\n\tprivate map: any;\r\n\tprivate scheduler: any;\r\n\tprivate _markers: any[];\r\n\tprivate settings: IMapSettings;\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.map = null;\r\n\t\tthis._markers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t}\r\n\tonEventClick(event: ICalendarEvent): void {\r\n\t\tif (this._markers && this._markers.length > 0) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\t\tif (event.id == this._markers[i].event.id) {\r\n\t\t\t\t\tthis._markers[i].marker.openPopup();\r\n\t\t\t\t\tthis._markers[i].marker.closeTooltip();\r\n\t\t\t\t\tif (event.lat && event.lng) {\r\n\t\t\t\t\t\tthis.setView(event.lat, event.lng, this.settings.zoom_after_resolve || this.settings.initial_zoom);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.setView(this.settings.error_position.lat, this.settings.error_position.lng, this.settings.zoom_after_resolve || this.settings.initial_zoom);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t} \r\n\t}\r\n\r\n\tinitialize(container: HTMLElement, options: IMapSettings): void {\r\n\t\tlet scheduler = this.scheduler;\r\n\t\tlet mapWrapper = document.createElement('div');\r\n\t\tmapWrapper.className = 'mapWrapper';\r\n\t\tmapWrapper.id = 'mapWrapper';\r\n\t\tmapWrapper.style.width = container.style.width;\r\n\t\tmapWrapper.style.height = container.style.height;\r\n\t\tcontainer.appendChild(mapWrapper);\r\n\r\n\t\tlet map = L.map(mapWrapper, {\r\n\t\t\tcenter: L.latLng(options.initial_position.lat, options.initial_position.lng),\r\n\t\t\tzoom: options.initial_zoom,\r\n\t\t\tkeyboard: false // need to set false, due to bug with moving window\r\n\t\t});\r\n\t\tL.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(map);\r\n\t\tmap.on(\"dblclick\", async function(e){\r\n\t\t\tconst settings = {\r\n\t\t\t\t\"method\": \"GET\",\r\n\t\t\t\theaders: {\r\n\t\t\t\t\t\"Accept-Language\": \"en\",\r\n\t\t\t\t},\r\n\t\t\t};\r\n\t\t\tlet response = await fetch(`https://nominatim.openstreetmap.org/reverse?lat=${e.latlng.lat}&lon=${e.latlng.lng}&format=json`, settings).then(response => response.json());\r\n\t\t\tif (response.address) {\r\n\t\t\t\tlet address = response.address.country;\r\n\t\t\t\tscheduler.addEventNow({\r\n\t\t\t\t\tlat: e.latlng.lat,\r\n\t\t\t\t\tlng: e.latlng.lng,\r\n\t\t\t\t\tevent_location: address,\r\n\t\t\t\t\tstart_date: scheduler.getState().date,\r\n\t\t\t\t\tend_date: scheduler.date.add(scheduler.getState().date, scheduler.config.time_step, \"minute\")\r\n\t\t\t\t});\r\n\t\t\t} else {\r\n\t\t\t\tconsole.error(\"unable recieve a position of the event\", response.error);\r\n\t\t\t}\r\n\t\t});\r\n\t\tthis.map = map;\r\n\t\tthis.settings = options;\r\n\t}\r\n\r\n\tdestroy(container: HTMLElement): void {\r\n\t\tthis.map.remove();\r\n\t\twhile (container.firstChild) {\r\n\t\t\tcontainer.firstChild.remove();\r\n\t\t}\r\n\t\tcontainer.innerHTML = \"\";\r\n\t}\r\n\r\n\taddEventMarker(event: ICalendarEvent): void {\r\n\t\tconst myIcon = L.icon({\r\n\t\t\ticonUrl: 'https://unpkg.com/leaflet@1.0.3/dist/images/marker-icon.png',\r\n\t\t\ticonSize: [25, 41],\r\n\t\t\tshadowSize: [30, 65],\r\n\t\t\ticonAnchor: [12, 41],\r\n\t\t\tshadowAnchor: [7, 65]\r\n\t\t});\r\n\t\tlet popupConfig = {\r\n\t\t\tminWidth: 180,\r\n\t\t\tmaxWidth: this.settings.info_window_max_width,\r\n\t\t}\r\n\t\tconst markerPopup = L.popup(popupConfig).setContent(this.scheduler.templates.map_info_content(event));\r\n\t\tconst tooltip = L.tooltip().setContent(event.text);\r\n\r\n\t\tlet markerConfig = [\r\n\t\t\tevent.lat,\r\n\t\t\tevent.lng\r\n\t\t]\r\n\t\t\r\n\t\tif (!event.lat || !event.lng) {\r\n\t\t\tmarkerConfig = [this.settings.error_position.lat, this.settings.error_position.lng];\r\n\t\t}\r\n\t\tconst marker = L.marker(markerConfig, {\r\n\t\t\ticon: myIcon\r\n\t\t}).bindPopup(markerPopup).bindTooltip(tooltip).addTo(this.map);\r\n\t\tconst markerInfo = {event, marker};\r\n\t\tthis._markers.push(markerInfo);\t\t\r\n\t}\r\n\r\n\tremoveEventMarker(eventId: string): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif (eventId == this._markers[i].event.id) {\r\n\t\t\t\tthis.map.removeLayer(this._markers[i].marker);\r\n\t\t\t\tthis._markers.splice(i,1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tupdateEventMarker(event: ICalendarEvent): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif(this._markers[i].event.id == event.id) {\r\n\t\t\t\tthis._markers[i].event = event;\r\n\t\t\t\tif (!event.lat || !event.lng){\r\n\t\t\t\t\tthis._markers[i].marker.setLatLng([this.settings.error_position.lat, this.settings.error_position.lng]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis._markers[i].marker.setLatLng([event.lat, event.lng]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tclearEventMarkers(): void {\r\n\t\tif(this._markers) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\t\tthis.map.removeLayer(this._markers[i].marker); \r\n\t\t\t}\r\n\t\t\tthis._markers = [];\r\n\t\t}\r\n\t}\r\n\r\n\tsetView(latitude: number, longitude: number, zoom: number): void {\r\n\t\tthis.map.setView([latitude, longitude], zoom);\r\n\t}\r\n\r\n\tasync resolveAddress(string: string): Promise {\r\n\t\tconst settings = {\r\n\t\t\t\"method\": \"GET\",\r\n\t\t\theaders: {\r\n\t\t\t\t\"Accept-Language\": \"en\",\r\n\t\t\t},\r\n\t\t};\r\n\t\tlet position:any = {};\r\n\t\tlet response = await fetch(`https://nominatim.openstreetmap.org/search?q=${string}&format=json`, settings).then(response => response.json());\r\n\t\tif (response && response.length) {\r\n\t\t\tposition.lat = +response[0].lat;\r\n\t\t\tposition.lng = +response[0].lon;\r\n\t\t} else {\r\n\t\t\tconsole.error(`Unable recieve a position of the event's location: ${string}`);\r\n\t\t}\r\n\t\treturn position;\r\n\t}\r\n}","import { IMapAdapter, ICalendarEvent, IMapSettings, IMapPosition} from \"./types\";\r\n\r\ndeclare let mapboxgl: any;\r\ndeclare let MapboxGeocoder: any;\r\n\r\nexport class MapboxAdapter implements IMapAdapter {\r\n\tprivate map: any;\r\n\tprivate scheduler: any;\r\n\tprivate settings: IMapSettings;\r\n\tprivate _markers: any[];\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.map = null;\r\n\t\tthis._markers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t}\r\n\tonEventClick(event: ICalendarEvent): void {\r\n\t\tif (this._markers && this._markers.length > 0) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n const popup = this._markers[i].marker.getPopup();\r\n if (popup.isOpen()){\r\n popup.remove();\r\n }\r\n\t\t\t\tif (event.id == this._markers[i].event.id) {\r\n\t\t\t\t\tthis._markers[i].marker.togglePopup();\r\n\t\t\t\t\tif (event.lat && event.lng) {\r\n\t\t\t\t\t\tthis.setView(event.lat, event.lng, this.settings.zoom_after_resolve || this.settings.initial_zoom);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.setView(this.settings.error_position.lat, this.settings.error_position.lng, this.settings.zoom_after_resolve || this.settings.initial_zoom);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t} \r\n\t}\r\n\r\n\tinitialize(container: HTMLElement, options: IMapSettings): void {\r\n let scheduler = this.scheduler;\r\n\r\n\t\tmapboxgl.accessToken = options.accessToken;\r\n const map = new mapboxgl.Map({\r\n container: container, \r\n center: [options.initial_position.lng, options.initial_position.lat], \r\n zoom: options.initial_zoom + 1, // problems with coordinates if zoom = 1\r\n });\r\n map.on(\"dblclick\",async function(e){\r\n\t\t\tlet response = await fetch(`https://api.mapbox.com/geocoding/v5/mapbox.places/${e.lngLat.lng},${ e.lngLat.lat}.json?access_token=${options.accessToken}`).then(response => response.json());\r\n\t\t\tif (response.features){\r\n\t\t\t\tlet address = response.features[0].place_name;\r\n\t\t\t\tscheduler.addEventNow({\r\n\t\t\t\t\tlat: e.lngLat.lat,\r\n\t\t\t\t\tlng: e.lngLat.lng,\r\n\t\t\t\t\tevent_location: address,\r\n\t\t\t\t\tstart_date: scheduler.getState().date,\r\n\t\t\t\t\tend_date: scheduler.date.add(scheduler.getState().date, scheduler.config.time_step, \"minute\")\r\n\t\t\t\t});\r\n\t\t\t} else {\r\n\t\t\t\tconsole.error(\"unable recieve a position of the event\");\r\n\t\t\t}\r\n\t\t});\r\n this.map = map;\r\n this.settings = options;\r\n\t}\r\n\r\n\tdestroy(container: HTMLElement): void {\r\n\t\tthis.map.remove();\r\n while (container.firstChild) {\r\n\t\t\tcontainer.firstChild.remove();\r\n\t\t}\r\n container.innerHTML = \"\";\r\n\t}\r\n\r\n\taddEventMarker(event: ICalendarEvent): void {\r\n let config = [\r\n\t\t\tevent.lng,\r\n\t\t\tevent.lat\r\n\t\t]\r\n\t\t\r\n\t\tif (!event.lat || !event.lng) {\r\n\t\t\tconfig = [this.settings.error_position.lng, this.settings.error_position.lat];\r\n\t\t} \r\n\r\n\t\tconst popup = new mapboxgl.Popup({ offset: 25, focusAfterOpen: false})\r\n .setMaxWidth(`${this.settings.info_window_max_width}px`) \r\n .setHTML(this.scheduler.templates.map_info_content(event));\r\n const marker = new mapboxgl.Marker()\r\n .setLngLat(config)\r\n .setPopup(popup)\r\n .addTo(this.map);\r\n const markerInfo = {event, marker}; \r\n this._markers.push(markerInfo);\r\n\t}\r\n\r\n\tremoveEventMarker(eventId: string): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif (eventId == this._markers[i].event.id) {\r\n\t\t\t\tthis._markers[i].marker.remove();\r\n this._markers.splice(i,1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tupdateEventMarker(event: ICalendarEvent): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif(this._markers[i].event.id == event.id) {\r\n\t\t\t\tthis._markers[i].event = event;\r\n\t\t\t\tif (!event.lat || !event.lng){\r\n\t\t\t\t\tthis._markers[i].marker.setLngLat([this.settings.error_position.lng, this.settings.error_position.lat]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis._markers[i].marker.setLngLat([event.lng, event.lat]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tclearEventMarkers(): void {\r\n\t\tfor (let i = 0; i {\r\n\t\tlet response = await fetch(`https://api.mapbox.com/geocoding/v5/mapbox.places/${string}.json?access_token=${this.settings.accessToken}`).then(response => response.json());\r\n\t\tlet position:any = {};\r\n\t\tif (response && response.features.length) {\r\n\t\t\tposition.lng = response.features[0].center[0];\r\n\t\t\tposition.lat = response.features[0].center[1];\r\n\t\t} else {\r\n\t\t\tconsole.error(`Unable recieve a position of the event's location: ${string}`);\r\n\t\t}\r\n\t\treturn position;\r\n\t}\r\n}","// =============================================================================\n// Weekday\n// =============================================================================\nexport var ALL_WEEKDAYS = [\n 'MO',\n 'TU',\n 'WE',\n 'TH',\n 'FR',\n 'SA',\n 'SU',\n];\nvar Weekday = /** @class */ (function () {\n function Weekday(weekday, n) {\n if (n === 0)\n throw new Error(\"Can't create weekday with n == 0\");\n this.weekday = weekday;\n this.n = n;\n }\n Weekday.fromStr = function (str) {\n return new Weekday(ALL_WEEKDAYS.indexOf(str));\n };\n // __call__ - Cannot call the object directly, do it through\n // e.g. RRule.TH.nth(-1) instead,\n Weekday.prototype.nth = function (n) {\n return this.n === n ? this : new Weekday(this.weekday, n);\n };\n // __eq__\n Weekday.prototype.equals = function (other) {\n return this.weekday === other.weekday && this.n === other.n;\n };\n // __repr__\n Weekday.prototype.toString = function () {\n var s = ALL_WEEKDAYS[this.weekday];\n if (this.n)\n s = (this.n > 0 ? '+' : '') + String(this.n) + s;\n return s;\n };\n Weekday.prototype.getJsWeekday = function () {\n return this.weekday === 6 ? 0 : this.weekday + 1;\n };\n return Weekday;\n}());\nexport { Weekday };\n//# sourceMappingURL=weekday.js.map","// =============================================================================\n// Helper functions\n// =============================================================================\nimport { ALL_WEEKDAYS } from './weekday';\nexport var isPresent = function (value) {\n return value !== null && value !== undefined;\n};\nexport var isNumber = function (value) {\n return typeof value === 'number';\n};\nexport var isWeekdayStr = function (value) {\n return typeof value === 'string' && ALL_WEEKDAYS.includes(value);\n};\nexport var isArray = Array.isArray;\n/**\n * Simplified version of python's range()\n */\nexport var range = function (start, end) {\n if (end === void 0) { end = start; }\n if (arguments.length === 1) {\n end = start;\n start = 0;\n }\n var rang = [];\n for (var i = start; i < end; i++)\n rang.push(i);\n return rang;\n};\nexport var clone = function (array) {\n return [].concat(array);\n};\nexport var repeat = function (value, times) {\n var i = 0;\n var array = [];\n if (isArray(value)) {\n for (; i < times; i++)\n array[i] = [].concat(value);\n }\n else {\n for (; i < times; i++)\n array[i] = value;\n }\n return array;\n};\nexport var toArray = function (item) {\n if (isArray(item)) {\n return item;\n }\n return [item];\n};\nexport function padStart(item, targetLength, padString) {\n if (padString === void 0) { padString = ' '; }\n var str = String(item);\n targetLength = targetLength >> 0;\n if (str.length > targetLength) {\n return String(str);\n }\n targetLength = targetLength - str.length;\n if (targetLength > padString.length) {\n padString += repeat(padString, targetLength / padString.length);\n }\n return padString.slice(0, targetLength) + String(str);\n}\n/**\n * Python like split\n */\nexport var split = function (str, sep, num) {\n var splits = str.split(sep);\n return num\n ? splits.slice(0, num).concat([splits.slice(num).join(sep)])\n : splits;\n};\n/**\n * closure/goog/math/math.js:modulo\n * Copyright 2006 The Closure Library Authors.\n * The % operator in JavaScript returns the remainder of a / b, but differs from\n * some other languages in that the result will have the same sign as the\n * dividend. For example, -1 % 8 == -1, whereas in some other languages\n * (such as Python) the result would be 7. This function emulates the more\n * correct modulo behavior, which is useful for certain applications such as\n * calculating an offset index in a circular list.\n *\n * @param {number} a The dividend.\n * @param {number} b The divisor.\n * @return {number} a % b where the result is between 0 and b (either 0 <= x < b\n * or b < x <= 0, depending on the sign of b).\n */\nexport var pymod = function (a, b) {\n var r = a % b;\n // If r and b differ in sign, add b to wrap the result to the correct sign.\n return r * b < 0 ? r + b : r;\n};\n/**\n * @see: \n */\nexport var divmod = function (a, b) {\n return { div: Math.floor(a / b), mod: pymod(a, b) };\n};\nexport var empty = function (obj) {\n return !isPresent(obj) || obj.length === 0;\n};\n/**\n * Python-like boolean\n *\n * @return {Boolean} value of an object/primitive, taking into account\n * the fact that in Python an empty list's/tuple's\n * boolean value is False, whereas in JS it's true\n */\nexport var notEmpty = function (obj) {\n return !empty(obj);\n};\n/**\n * Return true if a value is in an array\n */\nexport var includes = function (arr, val) {\n return notEmpty(arr) && arr.indexOf(val) !== -1;\n};\n//# sourceMappingURL=helpers.js.map","import { padStart } from './helpers';\nexport var datetime = function (y, m, d, h, i, s) {\n if (h === void 0) { h = 0; }\n if (i === void 0) { i = 0; }\n if (s === void 0) { s = 0; }\n return new Date(Date.UTC(y, m - 1, d, h, i, s));\n};\n/**\n * General date-related utilities.\n * Also handles several incompatibilities between JavaScript and Python\n *\n */\nexport var MONTH_DAYS = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n/**\n * Number of milliseconds of one day\n */\nexport var ONE_DAY = 1000 * 60 * 60 * 24;\n/**\n * @see: \n */\nexport var MAXYEAR = 9999;\n/**\n * Python uses 1-Jan-1 as the base for calculating ordinals but we don't\n * want to confuse the JS engine with milliseconds > Number.MAX_NUMBER,\n * therefore we use 1-Jan-1970 instead\n */\nexport var ORDINAL_BASE = datetime(1970, 1, 1);\n/**\n * Python: MO-SU: 0 - 6\n * JS: SU-SAT 0 - 6\n */\nexport var PY_WEEKDAYS = [6, 0, 1, 2, 3, 4, 5];\n/**\n * py_date.timetuple()[7]\n */\nexport var getYearDay = function (date) {\n var dateNoTime = new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate());\n return (Math.ceil((dateNoTime.valueOf() - new Date(date.getUTCFullYear(), 0, 1).valueOf()) /\n ONE_DAY) + 1);\n};\nexport var isLeapYear = function (year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n};\nexport var isDate = function (value) {\n return value instanceof Date;\n};\nexport var isValidDate = function (value) {\n return isDate(value) && !isNaN(value.getTime());\n};\n/**\n * @return {Number} the date's timezone offset in ms\n */\nexport var tzOffset = function (date) {\n return date.getTimezoneOffset() * 60 * 1000;\n};\n/**\n * @see: \n */\nexport var daysBetween = function (date1, date2) {\n // The number of milliseconds in one day\n // Convert both dates to milliseconds\n var date1ms = date1.getTime();\n var date2ms = date2.getTime();\n // Calculate the difference in milliseconds\n var differencems = date1ms - date2ms;\n // Convert back to days and return\n return Math.round(differencems / ONE_DAY);\n};\n/**\n * @see: \n */\nexport var toOrdinal = function (date) {\n return daysBetween(date, ORDINAL_BASE);\n};\n/**\n * @see - \n */\nexport var fromOrdinal = function (ordinal) {\n return new Date(ORDINAL_BASE.getTime() + ordinal * ONE_DAY);\n};\nexport var getMonthDays = function (date) {\n var month = date.getUTCMonth();\n return month === 1 && isLeapYear(date.getUTCFullYear())\n ? 29\n : MONTH_DAYS[month];\n};\n/**\n * @return {Number} python-like weekday\n */\nexport var getWeekday = function (date) {\n return PY_WEEKDAYS[date.getUTCDay()];\n};\n/**\n * @see: \n */\nexport var monthRange = function (year, month) {\n var date = datetime(year, month + 1, 1);\n return [getWeekday(date), getMonthDays(date)];\n};\n/**\n * @see: \n */\nexport var combine = function (date, time) {\n time = time || date;\n return new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), time.getHours(), time.getMinutes(), time.getSeconds(), time.getMilliseconds()));\n};\nexport var clone = function (date) {\n var dolly = new Date(date.getTime());\n return dolly;\n};\nexport var cloneDates = function (dates) {\n var clones = [];\n for (var i = 0; i < dates.length; i++) {\n clones.push(clone(dates[i]));\n }\n return clones;\n};\n/**\n * Sorts an array of Date or Time objects\n */\nexport var sort = function (dates) {\n dates.sort(function (a, b) {\n return a.getTime() - b.getTime();\n });\n};\nexport var timeToUntilString = function (time, utc) {\n if (utc === void 0) { utc = true; }\n var date = new Date(time);\n return [\n padStart(date.getUTCFullYear().toString(), 4, '0'),\n padStart(date.getUTCMonth() + 1, 2, '0'),\n padStart(date.getUTCDate(), 2, '0'),\n 'T',\n padStart(date.getUTCHours(), 2, '0'),\n padStart(date.getUTCMinutes(), 2, '0'),\n padStart(date.getUTCSeconds(), 2, '0'),\n utc ? 'Z' : '',\n ].join('');\n};\nexport var untilStringToDate = function (until) {\n var re = /^(\\d{4})(\\d{2})(\\d{2})(T(\\d{2})(\\d{2})(\\d{2})Z?)?$/;\n var bits = re.exec(until);\n if (!bits)\n throw new Error(\"Invalid UNTIL value: \".concat(until));\n return new Date(Date.UTC(parseInt(bits[1], 10), parseInt(bits[2], 10) - 1, parseInt(bits[3], 10), parseInt(bits[5], 10) || 0, parseInt(bits[6], 10) || 0, parseInt(bits[7], 10) || 0));\n};\nvar dateTZtoISO8601 = function (date, timeZone) {\n // date format for sv-SE is almost ISO8601\n var dateStr = date.toLocaleString('sv-SE', { timeZone: timeZone });\n // '2023-02-07 10:41:36'\n return dateStr.replace(' ', 'T') + 'Z';\n};\nexport var dateInTimeZone = function (date, timeZone) {\n var localTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;\n // Date constructor can only reliably parse dates in ISO8601 format\n var dateInLocalTZ = new Date(dateTZtoISO8601(date, localTimeZone));\n var dateInTargetTZ = new Date(dateTZtoISO8601(date, timeZone !== null && timeZone !== void 0 ? timeZone : 'UTC'));\n var tzOffset = dateInTargetTZ.getTime() - dateInLocalTZ.getTime();\n return new Date(date.getTime() - tzOffset);\n};\n//# sourceMappingURL=dateutil.js.map","/**\n * This class helps us to emulate python's generators, sorta.\n */\nvar IterResult = /** @class */ (function () {\n function IterResult(method, args) {\n this.minDate = null;\n this.maxDate = null;\n this._result = [];\n this.total = 0;\n this.method = method;\n this.args = args;\n if (method === 'between') {\n this.maxDate = args.inc\n ? args.before\n : new Date(args.before.getTime() - 1);\n this.minDate = args.inc ? args.after : new Date(args.after.getTime() + 1);\n }\n else if (method === 'before') {\n this.maxDate = args.inc ? args.dt : new Date(args.dt.getTime() - 1);\n }\n else if (method === 'after') {\n this.minDate = args.inc ? args.dt : new Date(args.dt.getTime() + 1);\n }\n }\n /**\n * Possibly adds a date into the result.\n *\n * @param {Date} date - the date isn't necessarly added to the result\n * list (if it is too late/too early)\n * @return {Boolean} true if it makes sense to continue the iteration\n * false if we're done.\n */\n IterResult.prototype.accept = function (date) {\n ++this.total;\n var tooEarly = this.minDate && date < this.minDate;\n var tooLate = this.maxDate && date > this.maxDate;\n if (this.method === 'between') {\n if (tooEarly)\n return true;\n if (tooLate)\n return false;\n }\n else if (this.method === 'before') {\n if (tooLate)\n return false;\n }\n else if (this.method === 'after') {\n if (tooEarly)\n return true;\n this.add(date);\n return false;\n }\n return this.add(date);\n };\n /**\n *\n * @param {Date} date that is part of the result.\n * @return {Boolean} whether we are interested in more values.\n */\n IterResult.prototype.add = function (date) {\n this._result.push(date);\n return true;\n };\n /**\n * 'before' and 'after' return only one date, whereas 'all'\n * and 'between' an array.\n *\n * @return {Date,Array?}\n */\n IterResult.prototype.getValue = function () {\n var res = this._result;\n switch (this.method) {\n case 'all':\n case 'between':\n return res;\n case 'before':\n case 'after':\n default:\n return (res.length ? res[res.length - 1] : null);\n }\n };\n IterResult.prototype.clone = function () {\n return new IterResult(this.method, this.args);\n };\n return IterResult;\n}());\nexport default IterResult;\n//# sourceMappingURL=iterresult.js.map","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol */\n\nvar 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 (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(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\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n function next() {\n while (env.stack.length) {\n var rec = env.stack.pop();\n try {\n var result = rec.dispose && rec.dispose.call(rec.value);\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n catch (e) {\n fail(e);\n }\n }\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n};\n","import { __extends } from \"tslib\";\nimport IterResult from './iterresult';\n/**\n * IterResult subclass that calls a callback function on each add,\n * and stops iterating when the callback returns false.\n */\nvar CallbackIterResult = /** @class */ (function (_super) {\n __extends(CallbackIterResult, _super);\n function CallbackIterResult(method, args, iterator) {\n var _this = _super.call(this, method, args) || this;\n _this.iterator = iterator;\n return _this;\n }\n CallbackIterResult.prototype.add = function (date) {\n if (this.iterator(date, this._result.length)) {\n this._result.push(date);\n return true;\n }\n return false;\n };\n return CallbackIterResult;\n}(IterResult));\nexport default CallbackIterResult;\n//# sourceMappingURL=callbackiterresult.js.map","export var Frequency;\n(function (Frequency) {\n Frequency[Frequency[\"YEARLY\"] = 0] = \"YEARLY\";\n Frequency[Frequency[\"MONTHLY\"] = 1] = \"MONTHLY\";\n Frequency[Frequency[\"WEEKLY\"] = 2] = \"WEEKLY\";\n Frequency[Frequency[\"DAILY\"] = 3] = \"DAILY\";\n Frequency[Frequency[\"HOURLY\"] = 4] = \"HOURLY\";\n Frequency[Frequency[\"MINUTELY\"] = 5] = \"MINUTELY\";\n Frequency[Frequency[\"SECONDLY\"] = 6] = \"SECONDLY\";\n})(Frequency || (Frequency = {}));\nexport function freqIsDailyOrGreater(freq) {\n return freq < Frequency.HOURLY;\n}\n//# sourceMappingURL=types.js.map","// =============================================================================\n// i18n\n// =============================================================================\nvar ENGLISH = {\n dayNames: [\n 'Sunday',\n 'Monday',\n 'Tuesday',\n 'Wednesday',\n 'Thursday',\n 'Friday',\n 'Saturday',\n ],\n monthNames: [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n ],\n tokens: {\n SKIP: /^[ \\r\\n\\t]+|^\\.$/,\n number: /^[1-9][0-9]*/,\n numberAsText: /^(one|two|three)/i,\n every: /^every/i,\n 'day(s)': /^days?/i,\n 'weekday(s)': /^weekdays?/i,\n 'week(s)': /^weeks?/i,\n 'hour(s)': /^hours?/i,\n 'minute(s)': /^minutes?/i,\n 'month(s)': /^months?/i,\n 'year(s)': /^years?/i,\n on: /^(on|in)/i,\n at: /^(at)/i,\n the: /^the/i,\n first: /^first/i,\n second: /^second/i,\n third: /^third/i,\n nth: /^([1-9][0-9]*)(\\.|th|nd|rd|st)/i,\n last: /^last/i,\n for: /^for/i,\n 'time(s)': /^times?/i,\n until: /^(un)?til/i,\n monday: /^mo(n(day)?)?/i,\n tuesday: /^tu(e(s(day)?)?)?/i,\n wednesday: /^we(d(n(esday)?)?)?/i,\n thursday: /^th(u(r(sday)?)?)?/i,\n friday: /^fr(i(day)?)?/i,\n saturday: /^sa(t(urday)?)?/i,\n sunday: /^su(n(day)?)?/i,\n january: /^jan(uary)?/i,\n february: /^feb(ruary)?/i,\n march: /^mar(ch)?/i,\n april: /^apr(il)?/i,\n may: /^may/i,\n june: /^june?/i,\n july: /^july?/i,\n august: /^aug(ust)?/i,\n september: /^sep(t(ember)?)?/i,\n october: /^oct(ober)?/i,\n november: /^nov(ember)?/i,\n december: /^dec(ember)?/i,\n comma: /^(,\\s*|(and|or)\\s*)+/i,\n },\n};\nexport default ENGLISH;\n//# sourceMappingURL=i18n.js.map","import ENGLISH from './i18n';\nimport { RRule } from '../rrule';\nimport { isArray, isNumber, isPresent } from '../helpers';\n// =============================================================================\n// Helper functions\n// =============================================================================\n/**\n * Return true if a value is in an array\n */\nvar contains = function (arr, val) {\n return arr.indexOf(val) !== -1;\n};\nvar defaultGetText = function (id) { return id.toString(); };\nvar defaultDateFormatter = function (year, month, day) { return \"\".concat(month, \" \").concat(day, \", \").concat(year); };\n/**\n *\n * @param {RRule} rrule\n * Optional:\n * @param {Function} gettext function\n * @param {Object} language definition\n * @constructor\n */\nvar ToText = /** @class */ (function () {\n function ToText(rrule, gettext, language, dateFormatter) {\n if (gettext === void 0) { gettext = defaultGetText; }\n if (language === void 0) { language = ENGLISH; }\n if (dateFormatter === void 0) { dateFormatter = defaultDateFormatter; }\n this.text = [];\n this.language = language || ENGLISH;\n this.gettext = gettext;\n this.dateFormatter = dateFormatter;\n this.rrule = rrule;\n this.options = rrule.options;\n this.origOptions = rrule.origOptions;\n if (this.origOptions.bymonthday) {\n var bymonthday = [].concat(this.options.bymonthday);\n var bynmonthday = [].concat(this.options.bynmonthday);\n bymonthday.sort(function (a, b) { return a - b; });\n bynmonthday.sort(function (a, b) { return b - a; });\n // 1, 2, 3, .., -5, -4, -3, ..\n this.bymonthday = bymonthday.concat(bynmonthday);\n if (!this.bymonthday.length)\n this.bymonthday = null;\n }\n if (isPresent(this.origOptions.byweekday)) {\n var byweekday = !isArray(this.origOptions.byweekday)\n ? [this.origOptions.byweekday]\n : this.origOptions.byweekday;\n var days = String(byweekday);\n this.byweekday = {\n allWeeks: byweekday.filter(function (weekday) {\n return !weekday.n;\n }),\n someWeeks: byweekday.filter(function (weekday) {\n return Boolean(weekday.n);\n }),\n isWeekdays: days.indexOf('MO') !== -1 &&\n days.indexOf('TU') !== -1 &&\n days.indexOf('WE') !== -1 &&\n days.indexOf('TH') !== -1 &&\n days.indexOf('FR') !== -1 &&\n days.indexOf('SA') === -1 &&\n days.indexOf('SU') === -1,\n isEveryDay: days.indexOf('MO') !== -1 &&\n days.indexOf('TU') !== -1 &&\n days.indexOf('WE') !== -1 &&\n days.indexOf('TH') !== -1 &&\n days.indexOf('FR') !== -1 &&\n days.indexOf('SA') !== -1 &&\n days.indexOf('SU') !== -1,\n };\n var sortWeekDays = function (a, b) {\n return a.weekday - b.weekday;\n };\n this.byweekday.allWeeks.sort(sortWeekDays);\n this.byweekday.someWeeks.sort(sortWeekDays);\n if (!this.byweekday.allWeeks.length)\n this.byweekday.allWeeks = null;\n if (!this.byweekday.someWeeks.length)\n this.byweekday.someWeeks = null;\n }\n else {\n this.byweekday = null;\n }\n }\n /**\n * Test whether the rrule can be fully converted to text.\n *\n * @param {RRule} rrule\n * @return {Boolean}\n */\n ToText.isFullyConvertible = function (rrule) {\n var canConvert = true;\n if (!(rrule.options.freq in ToText.IMPLEMENTED))\n return false;\n if (rrule.origOptions.until && rrule.origOptions.count)\n return false;\n for (var key in rrule.origOptions) {\n if (contains(['dtstart', 'tzid', 'wkst', 'freq'], key))\n return true;\n if (!contains(ToText.IMPLEMENTED[rrule.options.freq], key))\n return false;\n }\n return canConvert;\n };\n ToText.prototype.isFullyConvertible = function () {\n return ToText.isFullyConvertible(this.rrule);\n };\n /**\n * Perform the conversion. Only some of the frequencies are supported.\n * If some of the rrule's options aren't supported, they'll\n * be omitted from the output an \"(~ approximate)\" will be appended.\n *\n * @return {*}\n */\n ToText.prototype.toString = function () {\n var gettext = this.gettext;\n if (!(this.options.freq in ToText.IMPLEMENTED)) {\n return gettext('RRule error: Unable to fully convert this rrule to text');\n }\n this.text = [gettext('every')];\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this[RRule.FREQUENCIES[this.options.freq]]();\n if (this.options.until) {\n this.add(gettext('until'));\n var until = this.options.until;\n this.add(this.dateFormatter(until.getUTCFullYear(), this.language.monthNames[until.getUTCMonth()], until.getUTCDate()));\n }\n else if (this.options.count) {\n this.add(gettext('for'))\n .add(this.options.count.toString())\n .add(this.plural(this.options.count) ? gettext('times') : gettext('time'));\n }\n if (!this.isFullyConvertible())\n this.add(gettext('(~ approximate)'));\n return this.text.join('');\n };\n ToText.prototype.HOURLY = function () {\n var gettext = this.gettext;\n if (this.options.interval !== 1)\n this.add(this.options.interval.toString());\n this.add(this.plural(this.options.interval) ? gettext('hours') : gettext('hour'));\n };\n ToText.prototype.MINUTELY = function () {\n var gettext = this.gettext;\n if (this.options.interval !== 1)\n this.add(this.options.interval.toString());\n this.add(this.plural(this.options.interval)\n ? gettext('minutes')\n : gettext('minute'));\n };\n ToText.prototype.DAILY = function () {\n var gettext = this.gettext;\n if (this.options.interval !== 1)\n this.add(this.options.interval.toString());\n if (this.byweekday && this.byweekday.isWeekdays) {\n this.add(this.plural(this.options.interval)\n ? gettext('weekdays')\n : gettext('weekday'));\n }\n else {\n this.add(this.plural(this.options.interval) ? gettext('days') : gettext('day'));\n }\n if (this.origOptions.bymonth) {\n this.add(gettext('in'));\n this._bymonth();\n }\n if (this.bymonthday) {\n this._bymonthday();\n }\n else if (this.byweekday) {\n this._byweekday();\n }\n else if (this.origOptions.byhour) {\n this._byhour();\n }\n };\n ToText.prototype.WEEKLY = function () {\n var gettext = this.gettext;\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString()).add(this.plural(this.options.interval) ? gettext('weeks') : gettext('week'));\n }\n if (this.byweekday && this.byweekday.isWeekdays) {\n if (this.options.interval === 1) {\n this.add(this.plural(this.options.interval)\n ? gettext('weekdays')\n : gettext('weekday'));\n }\n else {\n this.add(gettext('on')).add(gettext('weekdays'));\n }\n }\n else if (this.byweekday && this.byweekday.isEveryDay) {\n this.add(this.plural(this.options.interval) ? gettext('days') : gettext('day'));\n }\n else {\n if (this.options.interval === 1)\n this.add(gettext('week'));\n if (this.origOptions.bymonth) {\n this.add(gettext('in'));\n this._bymonth();\n }\n if (this.bymonthday) {\n this._bymonthday();\n }\n else if (this.byweekday) {\n this._byweekday();\n }\n if (this.origOptions.byhour) {\n this._byhour();\n }\n }\n };\n ToText.prototype.MONTHLY = function () {\n var gettext = this.gettext;\n if (this.origOptions.bymonth) {\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString()).add(gettext('months'));\n if (this.plural(this.options.interval))\n this.add(gettext('in'));\n }\n else {\n // this.add(gettext('MONTH'))\n }\n this._bymonth();\n }\n else {\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString());\n }\n this.add(this.plural(this.options.interval)\n ? gettext('months')\n : gettext('month'));\n }\n if (this.bymonthday) {\n this._bymonthday();\n }\n else if (this.byweekday && this.byweekday.isWeekdays) {\n this.add(gettext('on')).add(gettext('weekdays'));\n }\n else if (this.byweekday) {\n this._byweekday();\n }\n };\n ToText.prototype.YEARLY = function () {\n var gettext = this.gettext;\n if (this.origOptions.bymonth) {\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString());\n this.add(gettext('years'));\n }\n else {\n // this.add(gettext('YEAR'))\n }\n this._bymonth();\n }\n else {\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString());\n }\n this.add(this.plural(this.options.interval) ? gettext('years') : gettext('year'));\n }\n if (this.bymonthday) {\n this._bymonthday();\n }\n else if (this.byweekday) {\n this._byweekday();\n }\n if (this.options.byyearday) {\n this.add(gettext('on the'))\n .add(this.list(this.options.byyearday, this.nth, gettext('and')))\n .add(gettext('day'));\n }\n if (this.options.byweekno) {\n this.add(gettext('in'))\n .add(this.plural(this.options.byweekno.length)\n ? gettext('weeks')\n : gettext('week'))\n .add(this.list(this.options.byweekno, undefined, gettext('and')));\n }\n };\n ToText.prototype._bymonthday = function () {\n var gettext = this.gettext;\n if (this.byweekday && this.byweekday.allWeeks) {\n this.add(gettext('on'))\n .add(this.list(this.byweekday.allWeeks, this.weekdaytext, gettext('or')))\n .add(gettext('the'))\n .add(this.list(this.bymonthday, this.nth, gettext('or')));\n }\n else {\n this.add(gettext('on the')).add(this.list(this.bymonthday, this.nth, gettext('and')));\n }\n // this.add(gettext('DAY'))\n };\n ToText.prototype._byweekday = function () {\n var gettext = this.gettext;\n if (this.byweekday.allWeeks && !this.byweekday.isWeekdays) {\n this.add(gettext('on')).add(this.list(this.byweekday.allWeeks, this.weekdaytext));\n }\n if (this.byweekday.someWeeks) {\n if (this.byweekday.allWeeks)\n this.add(gettext('and'));\n this.add(gettext('on the')).add(this.list(this.byweekday.someWeeks, this.weekdaytext, gettext('and')));\n }\n };\n ToText.prototype._byhour = function () {\n var gettext = this.gettext;\n this.add(gettext('at')).add(this.list(this.origOptions.byhour, undefined, gettext('and')));\n };\n ToText.prototype._bymonth = function () {\n this.add(this.list(this.options.bymonth, this.monthtext, this.gettext('and')));\n };\n ToText.prototype.nth = function (n) {\n n = parseInt(n.toString(), 10);\n var nth;\n var gettext = this.gettext;\n if (n === -1)\n return gettext('last');\n var npos = Math.abs(n);\n switch (npos) {\n case 1:\n case 21:\n case 31:\n nth = npos + gettext('st');\n break;\n case 2:\n case 22:\n nth = npos + gettext('nd');\n break;\n case 3:\n case 23:\n nth = npos + gettext('rd');\n break;\n default:\n nth = npos + gettext('th');\n }\n return n < 0 ? nth + ' ' + gettext('last') : nth;\n };\n ToText.prototype.monthtext = function (m) {\n return this.language.monthNames[m - 1];\n };\n ToText.prototype.weekdaytext = function (wday) {\n var weekday = isNumber(wday) ? (wday + 1) % 7 : wday.getJsWeekday();\n return ((wday.n ? this.nth(wday.n) + ' ' : '') +\n this.language.dayNames[weekday]);\n };\n ToText.prototype.plural = function (n) {\n return n % 100 !== 1;\n };\n ToText.prototype.add = function (s) {\n this.text.push(' ');\n this.text.push(s);\n return this;\n };\n ToText.prototype.list = function (arr, callback, finalDelim, delim) {\n var _this = this;\n if (delim === void 0) { delim = ','; }\n if (!isArray(arr)) {\n arr = [arr];\n }\n var delimJoin = function (array, delimiter, finalDelimiter) {\n var list = '';\n for (var i = 0; i < array.length; i++) {\n if (i !== 0) {\n if (i === array.length - 1) {\n list += ' ' + finalDelimiter + ' ';\n }\n else {\n list += delimiter + ' ';\n }\n }\n list += array[i];\n }\n return list;\n };\n callback =\n callback ||\n function (o) {\n return o.toString();\n };\n var realCallback = function (arg) {\n return callback && callback.call(_this, arg);\n };\n if (finalDelim) {\n return delimJoin(arr.map(realCallback), delim, finalDelim);\n }\n else {\n return arr.map(realCallback).join(delim + ' ');\n }\n };\n return ToText;\n}());\nexport default ToText;\n//# sourceMappingURL=totext.js.map","import ENGLISH from './i18n';\nimport { RRule } from '../rrule';\n// =============================================================================\n// Parser\n// =============================================================================\nvar Parser = /** @class */ (function () {\n function Parser(rules) {\n this.done = true;\n this.rules = rules;\n }\n Parser.prototype.start = function (text) {\n this.text = text;\n this.done = false;\n return this.nextSymbol();\n };\n Parser.prototype.isDone = function () {\n return this.done && this.symbol === null;\n };\n Parser.prototype.nextSymbol = function () {\n var best;\n var bestSymbol;\n this.symbol = null;\n this.value = null;\n do {\n if (this.done)\n return false;\n var rule = void 0;\n best = null;\n for (var name_1 in this.rules) {\n rule = this.rules[name_1];\n var match = rule.exec(this.text);\n if (match) {\n if (best === null || match[0].length > best[0].length) {\n best = match;\n bestSymbol = name_1;\n }\n }\n }\n if (best != null) {\n this.text = this.text.substr(best[0].length);\n if (this.text === '')\n this.done = true;\n }\n if (best == null) {\n this.done = true;\n this.symbol = null;\n this.value = null;\n return;\n }\n } while (bestSymbol === 'SKIP');\n this.symbol = bestSymbol;\n this.value = best;\n return true;\n };\n Parser.prototype.accept = function (name) {\n if (this.symbol === name) {\n if (this.value) {\n var v = this.value;\n this.nextSymbol();\n return v;\n }\n this.nextSymbol();\n return true;\n }\n return false;\n };\n Parser.prototype.acceptNumber = function () {\n return this.accept('number');\n };\n Parser.prototype.expect = function (name) {\n if (this.accept(name))\n return true;\n throw new Error('expected ' + name + ' but found ' + this.symbol);\n };\n return Parser;\n}());\nexport default function parseText(text, language) {\n if (language === void 0) { language = ENGLISH; }\n var options = {};\n var ttr = new Parser(language.tokens);\n if (!ttr.start(text))\n return null;\n S();\n return options;\n function S() {\n // every [n]\n ttr.expect('every');\n var n = ttr.acceptNumber();\n if (n)\n options.interval = parseInt(n[0], 10);\n if (ttr.isDone())\n throw new Error('Unexpected end');\n switch (ttr.symbol) {\n case 'day(s)':\n options.freq = RRule.DAILY;\n if (ttr.nextSymbol()) {\n AT();\n F();\n }\n break;\n // FIXME Note: every 2 weekdays != every two weeks on weekdays.\n // DAILY on weekdays is not a valid rule\n case 'weekday(s)':\n options.freq = RRule.WEEKLY;\n options.byweekday = [RRule.MO, RRule.TU, RRule.WE, RRule.TH, RRule.FR];\n ttr.nextSymbol();\n AT();\n F();\n break;\n case 'week(s)':\n options.freq = RRule.WEEKLY;\n if (ttr.nextSymbol()) {\n ON();\n AT();\n F();\n }\n break;\n case 'hour(s)':\n options.freq = RRule.HOURLY;\n if (ttr.nextSymbol()) {\n ON();\n F();\n }\n break;\n case 'minute(s)':\n options.freq = RRule.MINUTELY;\n if (ttr.nextSymbol()) {\n ON();\n F();\n }\n break;\n case 'month(s)':\n options.freq = RRule.MONTHLY;\n if (ttr.nextSymbol()) {\n ON();\n F();\n }\n break;\n case 'year(s)':\n options.freq = RRule.YEARLY;\n if (ttr.nextSymbol()) {\n ON();\n F();\n }\n break;\n case 'monday':\n case 'tuesday':\n case 'wednesday':\n case 'thursday':\n case 'friday':\n case 'saturday':\n case 'sunday':\n options.freq = RRule.WEEKLY;\n var key = ttr.symbol\n .substr(0, 2)\n .toUpperCase();\n options.byweekday = [RRule[key]];\n if (!ttr.nextSymbol())\n return;\n // TODO check for duplicates\n while (ttr.accept('comma')) {\n if (ttr.isDone())\n throw new Error('Unexpected end');\n var wkd = decodeWKD();\n if (!wkd) {\n throw new Error('Unexpected symbol ' + ttr.symbol + ', expected weekday');\n }\n options.byweekday.push(RRule[wkd]);\n ttr.nextSymbol();\n }\n AT();\n MDAYs();\n F();\n break;\n case 'january':\n case 'february':\n case 'march':\n case 'april':\n case 'may':\n case 'june':\n case 'july':\n case 'august':\n case 'september':\n case 'october':\n case 'november':\n case 'december':\n options.freq = RRule.YEARLY;\n options.bymonth = [decodeM()];\n if (!ttr.nextSymbol())\n return;\n // TODO check for duplicates\n while (ttr.accept('comma')) {\n if (ttr.isDone())\n throw new Error('Unexpected end');\n var m = decodeM();\n if (!m) {\n throw new Error('Unexpected symbol ' + ttr.symbol + ', expected month');\n }\n options.bymonth.push(m);\n ttr.nextSymbol();\n }\n ON();\n F();\n break;\n default:\n throw new Error('Unknown symbol');\n }\n }\n function ON() {\n var on = ttr.accept('on');\n var the = ttr.accept('the');\n if (!(on || the))\n return;\n do {\n var nth = decodeNTH();\n var wkd = decodeWKD();\n var m = decodeM();\n // nth | \n if (nth) {\n // ttr.nextSymbol()\n if (wkd) {\n ttr.nextSymbol();\n if (!options.byweekday)\n options.byweekday = [];\n options.byweekday.push(RRule[wkd].nth(nth));\n }\n else {\n if (!options.bymonthday)\n options.bymonthday = [];\n options.bymonthday.push(nth);\n ttr.accept('day(s)');\n }\n // \n }\n else if (wkd) {\n ttr.nextSymbol();\n if (!options.byweekday)\n options.byweekday = [];\n options.byweekday.push(RRule[wkd]);\n }\n else if (ttr.symbol === 'weekday(s)') {\n ttr.nextSymbol();\n if (!options.byweekday) {\n options.byweekday = [RRule.MO, RRule.TU, RRule.WE, RRule.TH, RRule.FR];\n }\n }\n else if (ttr.symbol === 'week(s)') {\n ttr.nextSymbol();\n var n = ttr.acceptNumber();\n if (!n) {\n throw new Error('Unexpected symbol ' + ttr.symbol + ', expected week number');\n }\n options.byweekno = [parseInt(n[0], 10)];\n while (ttr.accept('comma')) {\n n = ttr.acceptNumber();\n if (!n) {\n throw new Error('Unexpected symbol ' + ttr.symbol + '; expected monthday');\n }\n options.byweekno.push(parseInt(n[0], 10));\n }\n }\n else if (m) {\n ttr.nextSymbol();\n if (!options.bymonth)\n options.bymonth = [];\n options.bymonth.push(m);\n }\n else {\n return;\n }\n } while (ttr.accept('comma') || ttr.accept('the') || ttr.accept('on'));\n }\n function AT() {\n var at = ttr.accept('at');\n if (!at)\n return;\n do {\n var n = ttr.acceptNumber();\n if (!n) {\n throw new Error('Unexpected symbol ' + ttr.symbol + ', expected hour');\n }\n options.byhour = [parseInt(n[0], 10)];\n while (ttr.accept('comma')) {\n n = ttr.acceptNumber();\n if (!n) {\n throw new Error('Unexpected symbol ' + ttr.symbol + '; expected hour');\n }\n options.byhour.push(parseInt(n[0], 10));\n }\n } while (ttr.accept('comma') || ttr.accept('at'));\n }\n function decodeM() {\n switch (ttr.symbol) {\n case 'january':\n return 1;\n case 'february':\n return 2;\n case 'march':\n return 3;\n case 'april':\n return 4;\n case 'may':\n return 5;\n case 'june':\n return 6;\n case 'july':\n return 7;\n case 'august':\n return 8;\n case 'september':\n return 9;\n case 'october':\n return 10;\n case 'november':\n return 11;\n case 'december':\n return 12;\n default:\n return false;\n }\n }\n function decodeWKD() {\n switch (ttr.symbol) {\n case 'monday':\n case 'tuesday':\n case 'wednesday':\n case 'thursday':\n case 'friday':\n case 'saturday':\n case 'sunday':\n return ttr.symbol.substr(0, 2).toUpperCase();\n default:\n return false;\n }\n }\n function decodeNTH() {\n switch (ttr.symbol) {\n case 'last':\n ttr.nextSymbol();\n return -1;\n case 'first':\n ttr.nextSymbol();\n return 1;\n case 'second':\n ttr.nextSymbol();\n return ttr.accept('last') ? -2 : 2;\n case 'third':\n ttr.nextSymbol();\n return ttr.accept('last') ? -3 : 3;\n case 'nth':\n var v = parseInt(ttr.value[1], 10);\n if (v < -366 || v > 366)\n throw new Error('Nth out of range: ' + v);\n ttr.nextSymbol();\n return ttr.accept('last') ? -v : v;\n default:\n return false;\n }\n }\n function MDAYs() {\n ttr.accept('on');\n ttr.accept('the');\n var nth = decodeNTH();\n if (!nth)\n return;\n options.bymonthday = [nth];\n ttr.nextSymbol();\n while (ttr.accept('comma')) {\n nth = decodeNTH();\n if (!nth) {\n throw new Error('Unexpected symbol ' + ttr.symbol + '; expected monthday');\n }\n options.bymonthday.push(nth);\n ttr.nextSymbol();\n }\n }\n function F() {\n if (ttr.symbol === 'until') {\n var date = Date.parse(ttr.text);\n if (!date)\n throw new Error('Cannot parse until date:' + ttr.text);\n options.until = new Date(date);\n }\n else if (ttr.accept('for')) {\n options.count = parseInt(ttr.value[0], 10);\n ttr.expect('number');\n // ttr.expect('times')\n }\n }\n}\n//# sourceMappingURL=parsetext.js.map","import ToText from './totext';\nimport parseText from './parsetext';\nimport { RRule } from '../rrule';\nimport { Frequency } from '../types';\nimport ENGLISH from './i18n';\n/* !\n * rrule.js - Library for working with recurrence rules for calendar dates.\n * https://github.com/jakubroztocil/rrule\n *\n * Copyright 2010, Jakub Roztocil and Lars Schoning\n * Licenced under the BSD licence.\n * https://github.com/jakubroztocil/rrule/blob/master/LICENCE\n *\n */\n/**\n *\n * Implementation of RRule.fromText() and RRule::toText().\n *\n *\n * On the client side, this file needs to be included\n * when those functions are used.\n *\n */\n// =============================================================================\n// fromText\n// =============================================================================\n/**\n * Will be able to convert some of the below described rules from\n * text format to a rule object.\n *\n *\n * RULES\n *\n * Every ([n])\n * day(s)\n * | [weekday], ..., (and) [weekday]\n * | weekday(s)\n * | week(s)\n * | month(s)\n * | [month], ..., (and) [month]\n * | year(s)\n *\n *\n * Plus 0, 1, or multiple of these:\n *\n * on [weekday], ..., (or) [weekday] the [monthday], [monthday], ... (or) [monthday]\n *\n * on [weekday], ..., (and) [weekday]\n *\n * on the [monthday], [monthday], ... (and) [monthday] (day of the month)\n *\n * on the [nth-weekday], ..., (and) [nth-weekday] (of the month/year)\n *\n *\n * Plus 0 or 1 of these:\n *\n * for [n] time(s)\n *\n * until [date]\n *\n * Plus (.)\n *\n *\n * Definitely no supported for parsing:\n *\n * (for year):\n * in week(s) [n], ..., (and) [n]\n *\n * on the [yearday], ..., (and) [n] day of the year\n * on day [yearday], ..., (and) [n]\n *\n *\n * NON-TERMINALS\n *\n * [n]: 1, 2 ..., one, two, three ..\n * [month]: January, February, March, April, May, ... December\n * [weekday]: Monday, ... Sunday\n * [nth-weekday]: first [weekday], 2nd [weekday], ... last [weekday], ...\n * [monthday]: first, 1., 2., 1st, 2nd, second, ... 31st, last day, 2nd last day, ..\n * [date]:\n * - [month] (0-31(,) ([year])),\n * - (the) 0-31.(1-12.([year])),\n * - (the) 0-31/(1-12/([year])),\n * - [weekday]\n *\n * [year]: 0000, 0001, ... 01, 02, ..\n *\n * Definitely not supported for parsing:\n *\n * [yearday]: first, 1., 2., 1st, 2nd, second, ... 366th, last day, 2nd last day, ..\n *\n * @param {String} text\n * @return {Object, Boolean} the rule, or null.\n */\nvar fromText = function (text, language) {\n if (language === void 0) { language = ENGLISH; }\n return new RRule(parseText(text, language) || undefined);\n};\nvar common = [\n 'count',\n 'until',\n 'interval',\n 'byweekday',\n 'bymonthday',\n 'bymonth',\n];\nToText.IMPLEMENTED = [];\nToText.IMPLEMENTED[Frequency.HOURLY] = common;\nToText.IMPLEMENTED[Frequency.MINUTELY] = common;\nToText.IMPLEMENTED[Frequency.DAILY] = ['byhour'].concat(common);\nToText.IMPLEMENTED[Frequency.WEEKLY] = common;\nToText.IMPLEMENTED[Frequency.MONTHLY] = common;\nToText.IMPLEMENTED[Frequency.YEARLY] = ['byweekno', 'byyearday'].concat(common);\n// =============================================================================\n// Export\n// =============================================================================\nvar toText = function (rrule, gettext, language, dateFormatter) {\n return new ToText(rrule, gettext, language, dateFormatter).toString();\n};\nvar isFullyConvertible = ToText.isFullyConvertible;\nexport { fromText, parseText, isFullyConvertible, toText };\n//# sourceMappingURL=index.js.map","import { __extends } from \"tslib\";\nimport { Frequency } from './types';\nimport { pymod, divmod, empty, includes } from './helpers';\nimport { getWeekday, MAXYEAR, monthRange } from './dateutil';\nvar Time = /** @class */ (function () {\n function Time(hour, minute, second, millisecond) {\n this.hour = hour;\n this.minute = minute;\n this.second = second;\n this.millisecond = millisecond || 0;\n }\n Time.prototype.getHours = function () {\n return this.hour;\n };\n Time.prototype.getMinutes = function () {\n return this.minute;\n };\n Time.prototype.getSeconds = function () {\n return this.second;\n };\n Time.prototype.getMilliseconds = function () {\n return this.millisecond;\n };\n Time.prototype.getTime = function () {\n return ((this.hour * 60 * 60 + this.minute * 60 + this.second) * 1000 +\n this.millisecond);\n };\n return Time;\n}());\nexport { Time };\nvar DateTime = /** @class */ (function (_super) {\n __extends(DateTime, _super);\n function DateTime(year, month, day, hour, minute, second, millisecond) {\n var _this = _super.call(this, hour, minute, second, millisecond) || this;\n _this.year = year;\n _this.month = month;\n _this.day = day;\n return _this;\n }\n DateTime.fromDate = function (date) {\n return new this(date.getUTCFullYear(), date.getUTCMonth() + 1, date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), date.valueOf() % 1000);\n };\n DateTime.prototype.getWeekday = function () {\n return getWeekday(new Date(this.getTime()));\n };\n DateTime.prototype.getTime = function () {\n return new Date(Date.UTC(this.year, this.month - 1, this.day, this.hour, this.minute, this.second, this.millisecond)).getTime();\n };\n DateTime.prototype.getDay = function () {\n return this.day;\n };\n DateTime.prototype.getMonth = function () {\n return this.month;\n };\n DateTime.prototype.getYear = function () {\n return this.year;\n };\n DateTime.prototype.addYears = function (years) {\n this.year += years;\n };\n DateTime.prototype.addMonths = function (months) {\n this.month += months;\n if (this.month > 12) {\n var yearDiv = Math.floor(this.month / 12);\n var monthMod = pymod(this.month, 12);\n this.month = monthMod;\n this.year += yearDiv;\n if (this.month === 0) {\n this.month = 12;\n --this.year;\n }\n }\n };\n DateTime.prototype.addWeekly = function (days, wkst) {\n if (wkst > this.getWeekday()) {\n this.day += -(this.getWeekday() + 1 + (6 - wkst)) + days * 7;\n }\n else {\n this.day += -(this.getWeekday() - wkst) + days * 7;\n }\n this.fixDay();\n };\n DateTime.prototype.addDaily = function (days) {\n this.day += days;\n this.fixDay();\n };\n DateTime.prototype.addHours = function (hours, filtered, byhour) {\n if (filtered) {\n // Jump to one iteration before next day\n this.hour += Math.floor((23 - this.hour) / hours) * hours;\n }\n for (;;) {\n this.hour += hours;\n var _a = divmod(this.hour, 24), dayDiv = _a.div, hourMod = _a.mod;\n if (dayDiv) {\n this.hour = hourMod;\n this.addDaily(dayDiv);\n }\n if (empty(byhour) || includes(byhour, this.hour))\n break;\n }\n };\n DateTime.prototype.addMinutes = function (minutes, filtered, byhour, byminute) {\n if (filtered) {\n // Jump to one iteration before next day\n this.minute +=\n Math.floor((1439 - (this.hour * 60 + this.minute)) / minutes) * minutes;\n }\n for (;;) {\n this.minute += minutes;\n var _a = divmod(this.minute, 60), hourDiv = _a.div, minuteMod = _a.mod;\n if (hourDiv) {\n this.minute = minuteMod;\n this.addHours(hourDiv, false, byhour);\n }\n if ((empty(byhour) || includes(byhour, this.hour)) &&\n (empty(byminute) || includes(byminute, this.minute))) {\n break;\n }\n }\n };\n DateTime.prototype.addSeconds = function (seconds, filtered, byhour, byminute, bysecond) {\n if (filtered) {\n // Jump to one iteration before next day\n this.second +=\n Math.floor((86399 - (this.hour * 3600 + this.minute * 60 + this.second)) /\n seconds) * seconds;\n }\n for (;;) {\n this.second += seconds;\n var _a = divmod(this.second, 60), minuteDiv = _a.div, secondMod = _a.mod;\n if (minuteDiv) {\n this.second = secondMod;\n this.addMinutes(minuteDiv, false, byhour, byminute);\n }\n if ((empty(byhour) || includes(byhour, this.hour)) &&\n (empty(byminute) || includes(byminute, this.minute)) &&\n (empty(bysecond) || includes(bysecond, this.second))) {\n break;\n }\n }\n };\n DateTime.prototype.fixDay = function () {\n if (this.day <= 28) {\n return;\n }\n var daysinmonth = monthRange(this.year, this.month - 1)[1];\n if (this.day <= daysinmonth) {\n return;\n }\n while (this.day > daysinmonth) {\n this.day -= daysinmonth;\n ++this.month;\n if (this.month === 13) {\n this.month = 1;\n ++this.year;\n if (this.year > MAXYEAR) {\n return;\n }\n }\n daysinmonth = monthRange(this.year, this.month - 1)[1];\n }\n };\n DateTime.prototype.add = function (options, filtered) {\n var freq = options.freq, interval = options.interval, wkst = options.wkst, byhour = options.byhour, byminute = options.byminute, bysecond = options.bysecond;\n switch (freq) {\n case Frequency.YEARLY:\n return this.addYears(interval);\n case Frequency.MONTHLY:\n return this.addMonths(interval);\n case Frequency.WEEKLY:\n return this.addWeekly(interval, wkst);\n case Frequency.DAILY:\n return this.addDaily(interval);\n case Frequency.HOURLY:\n return this.addHours(interval, filtered, byhour);\n case Frequency.MINUTELY:\n return this.addMinutes(interval, filtered, byhour, byminute);\n case Frequency.SECONDLY:\n return this.addSeconds(interval, filtered, byhour, byminute, bysecond);\n }\n };\n return DateTime;\n}(Time));\nexport { DateTime };\n//# sourceMappingURL=datetime.js.map","import { __assign } from \"tslib\";\nimport { freqIsDailyOrGreater } from './types';\nimport { includes, notEmpty, isPresent, isNumber, isArray, isWeekdayStr, } from './helpers';\nimport { RRule, defaultKeys, DEFAULT_OPTIONS } from './rrule';\nimport { getWeekday, isDate, isValidDate } from './dateutil';\nimport { Weekday } from './weekday';\nimport { Time } from './datetime';\nexport function initializeOptions(options) {\n var invalid = [];\n var keys = Object.keys(options);\n // Shallow copy for options and origOptions and check for invalid\n for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {\n var key = keys_1[_i];\n if (!includes(defaultKeys, key))\n invalid.push(key);\n if (isDate(options[key]) && !isValidDate(options[key])) {\n invalid.push(key);\n }\n }\n if (invalid.length) {\n throw new Error('Invalid options: ' + invalid.join(', '));\n }\n return __assign({}, options);\n}\nexport function parseOptions(options) {\n var opts = __assign(__assign({}, DEFAULT_OPTIONS), initializeOptions(options));\n if (isPresent(opts.byeaster))\n opts.freq = RRule.YEARLY;\n if (!(isPresent(opts.freq) && RRule.FREQUENCIES[opts.freq])) {\n throw new Error(\"Invalid frequency: \".concat(opts.freq, \" \").concat(options.freq));\n }\n if (!opts.dtstart)\n opts.dtstart = new Date(new Date().setMilliseconds(0));\n if (!isPresent(opts.wkst)) {\n opts.wkst = RRule.MO.weekday;\n }\n else if (isNumber(opts.wkst)) {\n // cool, just keep it like that\n }\n else {\n opts.wkst = opts.wkst.weekday;\n }\n if (isPresent(opts.bysetpos)) {\n if (isNumber(opts.bysetpos))\n opts.bysetpos = [opts.bysetpos];\n for (var i = 0; i < opts.bysetpos.length; i++) {\n var v = opts.bysetpos[i];\n if (v === 0 || !(v >= -366 && v <= 366)) {\n throw new Error('bysetpos must be between 1 and 366,' + ' or between -366 and -1');\n }\n }\n }\n if (!(Boolean(opts.byweekno) ||\n notEmpty(opts.byweekno) ||\n notEmpty(opts.byyearday) ||\n Boolean(opts.bymonthday) ||\n notEmpty(opts.bymonthday) ||\n isPresent(opts.byweekday) ||\n isPresent(opts.byeaster))) {\n switch (opts.freq) {\n case RRule.YEARLY:\n if (!opts.bymonth)\n opts.bymonth = opts.dtstart.getUTCMonth() + 1;\n opts.bymonthday = opts.dtstart.getUTCDate();\n break;\n case RRule.MONTHLY:\n opts.bymonthday = opts.dtstart.getUTCDate();\n break;\n case RRule.WEEKLY:\n opts.byweekday = [getWeekday(opts.dtstart)];\n break;\n }\n }\n // bymonth\n if (isPresent(opts.bymonth) && !isArray(opts.bymonth)) {\n opts.bymonth = [opts.bymonth];\n }\n // byyearday\n if (isPresent(opts.byyearday) &&\n !isArray(opts.byyearday) &&\n isNumber(opts.byyearday)) {\n opts.byyearday = [opts.byyearday];\n }\n // bymonthday\n if (!isPresent(opts.bymonthday)) {\n opts.bymonthday = [];\n opts.bynmonthday = [];\n }\n else if (isArray(opts.bymonthday)) {\n var bymonthday = [];\n var bynmonthday = [];\n for (var i = 0; i < opts.bymonthday.length; i++) {\n var v = opts.bymonthday[i];\n if (v > 0) {\n bymonthday.push(v);\n }\n else if (v < 0) {\n bynmonthday.push(v);\n }\n }\n opts.bymonthday = bymonthday;\n opts.bynmonthday = bynmonthday;\n }\n else if (opts.bymonthday < 0) {\n opts.bynmonthday = [opts.bymonthday];\n opts.bymonthday = [];\n }\n else {\n opts.bynmonthday = [];\n opts.bymonthday = [opts.bymonthday];\n }\n // byweekno\n if (isPresent(opts.byweekno) && !isArray(opts.byweekno)) {\n opts.byweekno = [opts.byweekno];\n }\n // byweekday / bynweekday\n if (!isPresent(opts.byweekday)) {\n opts.bynweekday = null;\n }\n else if (isNumber(opts.byweekday)) {\n opts.byweekday = [opts.byweekday];\n opts.bynweekday = null;\n }\n else if (isWeekdayStr(opts.byweekday)) {\n opts.byweekday = [Weekday.fromStr(opts.byweekday).weekday];\n opts.bynweekday = null;\n }\n else if (opts.byweekday instanceof Weekday) {\n if (!opts.byweekday.n || opts.freq > RRule.MONTHLY) {\n opts.byweekday = [opts.byweekday.weekday];\n opts.bynweekday = null;\n }\n else {\n opts.bynweekday = [[opts.byweekday.weekday, opts.byweekday.n]];\n opts.byweekday = null;\n }\n }\n else {\n var byweekday = [];\n var bynweekday = [];\n for (var i = 0; i < opts.byweekday.length; i++) {\n var wday = opts.byweekday[i];\n if (isNumber(wday)) {\n byweekday.push(wday);\n continue;\n }\n else if (isWeekdayStr(wday)) {\n byweekday.push(Weekday.fromStr(wday).weekday);\n continue;\n }\n if (!wday.n || opts.freq > RRule.MONTHLY) {\n byweekday.push(wday.weekday);\n }\n else {\n bynweekday.push([wday.weekday, wday.n]);\n }\n }\n opts.byweekday = notEmpty(byweekday) ? byweekday : null;\n opts.bynweekday = notEmpty(bynweekday) ? bynweekday : null;\n }\n // byhour\n if (!isPresent(opts.byhour)) {\n opts.byhour = opts.freq < RRule.HOURLY ? [opts.dtstart.getUTCHours()] : null;\n }\n else if (isNumber(opts.byhour)) {\n opts.byhour = [opts.byhour];\n }\n // byminute\n if (!isPresent(opts.byminute)) {\n opts.byminute =\n opts.freq < RRule.MINUTELY ? [opts.dtstart.getUTCMinutes()] : null;\n }\n else if (isNumber(opts.byminute)) {\n opts.byminute = [opts.byminute];\n }\n // bysecond\n if (!isPresent(opts.bysecond)) {\n opts.bysecond =\n opts.freq < RRule.SECONDLY ? [opts.dtstart.getUTCSeconds()] : null;\n }\n else if (isNumber(opts.bysecond)) {\n opts.bysecond = [opts.bysecond];\n }\n return { parsedOptions: opts };\n}\nexport function buildTimeset(opts) {\n var millisecondModulo = opts.dtstart.getTime() % 1000;\n if (!freqIsDailyOrGreater(opts.freq)) {\n return [];\n }\n var timeset = [];\n opts.byhour.forEach(function (hour) {\n opts.byminute.forEach(function (minute) {\n opts.bysecond.forEach(function (second) {\n timeset.push(new Time(hour, minute, second, millisecondModulo));\n });\n });\n });\n return timeset;\n}\n//# sourceMappingURL=parseoptions.js.map","import { __assign } from \"tslib\";\nimport { Frequency } from './types';\nimport { Weekday } from './weekday';\nimport { untilStringToDate } from './dateutil';\nimport { Days } from './rrule';\nexport function parseString(rfcString) {\n var options = rfcString\n .split('\\n')\n .map(parseLine)\n .filter(function (x) { return x !== null; });\n return __assign(__assign({}, options[0]), options[1]);\n}\nexport function parseDtstart(line) {\n var options = {};\n var dtstartWithZone = /DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\\s]+)/i.exec(line);\n if (!dtstartWithZone) {\n return options;\n }\n var tzid = dtstartWithZone[1], dtstart = dtstartWithZone[2];\n if (tzid) {\n options.tzid = tzid;\n }\n options.dtstart = untilStringToDate(dtstart);\n return options;\n}\nfunction parseLine(rfcString) {\n rfcString = rfcString.replace(/^\\s+|\\s+$/, '');\n if (!rfcString.length)\n return null;\n var header = /^([A-Z]+?)[:;]/.exec(rfcString.toUpperCase());\n if (!header) {\n return parseRrule(rfcString);\n }\n var key = header[1];\n switch (key.toUpperCase()) {\n case 'RRULE':\n case 'EXRULE':\n return parseRrule(rfcString);\n case 'DTSTART':\n return parseDtstart(rfcString);\n default:\n throw new Error(\"Unsupported RFC prop \".concat(key, \" in \").concat(rfcString));\n }\n}\nfunction parseRrule(line) {\n var strippedLine = line.replace(/^RRULE:/i, '');\n var options = parseDtstart(strippedLine);\n var attrs = line.replace(/^(?:RRULE|EXRULE):/i, '').split(';');\n attrs.forEach(function (attr) {\n var _a = attr.split('='), key = _a[0], value = _a[1];\n switch (key.toUpperCase()) {\n case 'FREQ':\n options.freq = Frequency[value.toUpperCase()];\n break;\n case 'WKST':\n options.wkst = Days[value.toUpperCase()];\n break;\n case 'COUNT':\n case 'INTERVAL':\n case 'BYSETPOS':\n case 'BYMONTH':\n case 'BYMONTHDAY':\n case 'BYYEARDAY':\n case 'BYWEEKNO':\n case 'BYHOUR':\n case 'BYMINUTE':\n case 'BYSECOND':\n var num = parseNumber(value);\n var optionKey = key.toLowerCase();\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n options[optionKey] = num;\n break;\n case 'BYWEEKDAY':\n case 'BYDAY':\n options.byweekday = parseWeekday(value);\n break;\n case 'DTSTART':\n case 'TZID':\n // for backwards compatibility\n var dtstart = parseDtstart(line);\n options.tzid = dtstart.tzid;\n options.dtstart = dtstart.dtstart;\n break;\n case 'UNTIL':\n options.until = untilStringToDate(value);\n break;\n case 'BYEASTER':\n options.byeaster = Number(value);\n break;\n default:\n throw new Error(\"Unknown RRULE property '\" + key + \"'\");\n }\n });\n return options;\n}\nfunction parseNumber(value) {\n if (value.indexOf(',') !== -1) {\n var values = value.split(',');\n return values.map(parseIndividualNumber);\n }\n return parseIndividualNumber(value);\n}\nfunction parseIndividualNumber(value) {\n if (/^[+-]?\\d+$/.test(value)) {\n return Number(value);\n }\n return value;\n}\nfunction parseWeekday(value) {\n var days = value.split(',');\n return days.map(function (day) {\n if (day.length === 2) {\n // MO, TU, ...\n return Days[day]; // wday instanceof Weekday\n }\n // -1MO, +3FR, 1SO, 13TU ...\n var parts = day.match(/^([+-]?\\d{1,2})([A-Z]{2})$/);\n if (!parts || parts.length < 3) {\n throw new SyntaxError(\"Invalid weekday string: \".concat(day));\n }\n var n = Number(parts[1]);\n var wdaypart = parts[2];\n var wday = Days[wdaypart].weekday;\n return new Weekday(wday, n);\n });\n}\n//# sourceMappingURL=parsestring.js.map","import { dateInTimeZone, timeToUntilString } from './dateutil';\nvar DateWithZone = /** @class */ (function () {\n function DateWithZone(date, tzid) {\n if (isNaN(date.getTime())) {\n throw new RangeError('Invalid date passed to DateWithZone');\n }\n this.date = date;\n this.tzid = tzid;\n }\n Object.defineProperty(DateWithZone.prototype, \"isUTC\", {\n get: function () {\n return !this.tzid || this.tzid.toUpperCase() === 'UTC';\n },\n enumerable: false,\n configurable: true\n });\n DateWithZone.prototype.toString = function () {\n var datestr = timeToUntilString(this.date.getTime(), this.isUTC);\n if (!this.isUTC) {\n return \";TZID=\".concat(this.tzid, \":\").concat(datestr);\n }\n return \":\".concat(datestr);\n };\n DateWithZone.prototype.getTime = function () {\n return this.date.getTime();\n };\n DateWithZone.prototype.rezonedDate = function () {\n if (this.isUTC) {\n return this.date;\n }\n return dateInTimeZone(this.date, this.tzid);\n };\n return DateWithZone;\n}());\nexport { DateWithZone };\n//# sourceMappingURL=datewithzone.js.map","import { RRule, DEFAULT_OPTIONS } from './rrule';\nimport { includes, isPresent, isArray, isNumber, toArray } from './helpers';\nimport { Weekday } from './weekday';\nimport { timeToUntilString } from './dateutil';\nimport { DateWithZone } from './datewithzone';\nexport function optionsToString(options) {\n var rrule = [];\n var dtstart = '';\n var keys = Object.keys(options);\n var defaultKeys = Object.keys(DEFAULT_OPTIONS);\n for (var i = 0; i < keys.length; i++) {\n if (keys[i] === 'tzid')\n continue;\n if (!includes(defaultKeys, keys[i]))\n continue;\n var key = keys[i].toUpperCase();\n var value = options[keys[i]];\n var outValue = '';\n if (!isPresent(value) || (isArray(value) && !value.length))\n continue;\n switch (key) {\n case 'FREQ':\n outValue = RRule.FREQUENCIES[options.freq];\n break;\n case 'WKST':\n if (isNumber(value)) {\n outValue = new Weekday(value).toString();\n }\n else {\n outValue = value.toString();\n }\n break;\n case 'BYWEEKDAY':\n /*\n NOTE: BYWEEKDAY is a special case.\n RRule() deconstructs the rule.options.byweekday array\n into an array of Weekday arguments.\n On the other hand, rule.origOptions is an array of Weekdays.\n We need to handle both cases here.\n It might be worth change RRule to keep the Weekdays.\n \n Also, BYWEEKDAY (used by RRule) vs. BYDAY (RFC)\n \n */\n key = 'BYDAY';\n outValue = toArray(value)\n .map(function (wday) {\n if (wday instanceof Weekday) {\n return wday;\n }\n if (isArray(wday)) {\n return new Weekday(wday[0], wday[1]);\n }\n return new Weekday(wday);\n })\n .toString();\n break;\n case 'DTSTART':\n dtstart = buildDtstart(value, options.tzid);\n break;\n case 'UNTIL':\n outValue = timeToUntilString(value, !options.tzid);\n break;\n default:\n if (isArray(value)) {\n var strValues = [];\n for (var j = 0; j < value.length; j++) {\n strValues[j] = String(value[j]);\n }\n outValue = strValues.toString();\n }\n else {\n outValue = String(value);\n }\n }\n if (outValue) {\n rrule.push([key, outValue]);\n }\n }\n var rules = rrule\n .map(function (_a) {\n var key = _a[0], value = _a[1];\n return \"\".concat(key, \"=\").concat(value.toString());\n })\n .join(';');\n var ruleString = '';\n if (rules !== '') {\n ruleString = \"RRULE:\".concat(rules);\n }\n return [dtstart, ruleString].filter(function (x) { return !!x; }).join('\\n');\n}\nfunction buildDtstart(dtstart, tzid) {\n if (!dtstart) {\n return '';\n }\n return 'DTSTART' + new DateWithZone(new Date(dtstart), tzid).toString();\n}\n//# sourceMappingURL=optionstostring.js.map","import IterResult from './iterresult';\nimport { clone, cloneDates } from './dateutil';\nimport { isArray } from './helpers';\nfunction argsMatch(left, right) {\n if (Array.isArray(left)) {\n if (!Array.isArray(right))\n return false;\n if (left.length !== right.length)\n return false;\n return left.every(function (date, i) { return date.getTime() === right[i].getTime(); });\n }\n if (left instanceof Date) {\n return right instanceof Date && left.getTime() === right.getTime();\n }\n return left === right;\n}\nvar Cache = /** @class */ (function () {\n function Cache() {\n this.all = false;\n this.before = [];\n this.after = [];\n this.between = [];\n }\n /**\n * @param {String} what - all/before/after/between\n * @param {Array,Date} value - an array of dates, one date, or null\n * @param {Object?} args - _iter arguments\n */\n Cache.prototype._cacheAdd = function (what, value, args) {\n if (value) {\n value = value instanceof Date ? clone(value) : cloneDates(value);\n }\n if (what === 'all') {\n this.all = value;\n }\n else {\n args._value = value;\n this[what].push(args);\n }\n };\n /**\n * @return false - not in the cache\n * @return null - cached, but zero occurrences (before/after)\n * @return Date - cached (before/after)\n * @return [] - cached, but zero occurrences (all/between)\n * @return [Date1, DateN] - cached (all/between)\n */\n Cache.prototype._cacheGet = function (what, args) {\n var cached = false;\n var argsKeys = args ? Object.keys(args) : [];\n var findCacheDiff = function (item) {\n for (var i = 0; i < argsKeys.length; i++) {\n var key = argsKeys[i];\n if (!argsMatch(args[key], item[key])) {\n return true;\n }\n }\n return false;\n };\n var cachedObject = this[what];\n if (what === 'all') {\n cached = this.all;\n }\n else if (isArray(cachedObject)) {\n // Let's see whether we've already called the\n // 'what' method with the same 'args'\n for (var i = 0; i < cachedObject.length; i++) {\n var item = cachedObject[i];\n if (argsKeys.length && findCacheDiff(item))\n continue;\n cached = item._value;\n break;\n }\n }\n if (!cached && this.all) {\n // Not in the cache, but we already know all the occurrences,\n // so we can find the correct dates from the cached ones.\n var iterResult = new IterResult(what, args);\n for (var i = 0; i < this.all.length; i++) {\n if (!iterResult.accept(this.all[i]))\n break;\n }\n cached = iterResult.getValue();\n this._cacheAdd(what, cached, args);\n }\n return isArray(cached)\n ? cloneDates(cached)\n : cached instanceof Date\n ? clone(cached)\n : cached;\n };\n return Cache;\n}());\nexport { Cache };\n//# sourceMappingURL=cache.js.map","import { __spreadArray } from \"tslib\";\nimport { range, repeat } from './helpers';\n// =============================================================================\n// Date masks\n// =============================================================================\n// Every mask is 7 days longer to handle cross-year weekly periods.\nvar M365MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], repeat(1, 31), true), repeat(2, 28), true), repeat(3, 31), true), repeat(4, 30), true), repeat(5, 31), true), repeat(6, 30), true), repeat(7, 31), true), repeat(8, 31), true), repeat(9, 30), true), repeat(10, 31), true), repeat(11, 30), true), repeat(12, 31), true), repeat(1, 7), true);\nvar M366MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], repeat(1, 31), true), repeat(2, 29), true), repeat(3, 31), true), repeat(4, 30), true), repeat(5, 31), true), repeat(6, 30), true), repeat(7, 31), true), repeat(8, 31), true), repeat(9, 30), true), repeat(10, 31), true), repeat(11, 30), true), repeat(12, 31), true), repeat(1, 7), true);\nvar M28 = range(1, 29);\nvar M29 = range(1, 30);\nvar M30 = range(1, 31);\nvar M31 = range(1, 32);\nvar MDAY366MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], M31, true), M29, true), M31, true), M30, true), M31, true), M30, true), M31, true), M31, true), M30, true), M31, true), M30, true), M31, true), M31.slice(0, 7), true);\nvar MDAY365MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], M31, true), M28, true), M31, true), M30, true), M31, true), M30, true), M31, true), M31, true), M30, true), M31, true), M30, true), M31, true), M31.slice(0, 7), true);\nvar NM28 = range(-28, 0);\nvar NM29 = range(-29, 0);\nvar NM30 = range(-30, 0);\nvar NM31 = range(-31, 0);\nvar NMDAY366MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], NM31, true), NM29, true), NM31, true), NM30, true), NM31, true), NM30, true), NM31, true), NM31, true), NM30, true), NM31, true), NM30, true), NM31, true), NM31.slice(0, 7), true);\nvar NMDAY365MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], NM31, true), NM28, true), NM31, true), NM30, true), NM31, true), NM30, true), NM31, true), NM31, true), NM30, true), NM31, true), NM30, true), NM31, true), NM31.slice(0, 7), true);\nvar M366RANGE = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366];\nvar M365RANGE = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365];\nvar WDAYMASK = (function () {\n var wdaymask = [];\n for (var i = 0; i < 55; i++)\n wdaymask = wdaymask.concat(range(7));\n return wdaymask;\n})();\nexport { WDAYMASK, M365MASK, M365RANGE, M366MASK, M366RANGE, MDAY365MASK, MDAY366MASK, NMDAY365MASK, NMDAY366MASK, };\n//# sourceMappingURL=masks.js.map","import { __assign } from \"tslib\";\nimport { datetime, getWeekday, isLeapYear, toOrdinal } from '../dateutil';\nimport { empty, repeat, pymod, includes } from '../helpers';\nimport { M365MASK, MDAY365MASK, NMDAY365MASK, WDAYMASK, M365RANGE, M366MASK, MDAY366MASK, NMDAY366MASK, M366RANGE, } from '../masks';\nexport function rebuildYear(year, options) {\n var firstyday = datetime(year, 1, 1);\n var yearlen = isLeapYear(year) ? 366 : 365;\n var nextyearlen = isLeapYear(year + 1) ? 366 : 365;\n var yearordinal = toOrdinal(firstyday);\n var yearweekday = getWeekday(firstyday);\n var result = __assign(__assign({ yearlen: yearlen, nextyearlen: nextyearlen, yearordinal: yearordinal, yearweekday: yearweekday }, baseYearMasks(year)), { wnomask: null });\n if (empty(options.byweekno)) {\n return result;\n }\n result.wnomask = repeat(0, yearlen + 7);\n var firstwkst;\n var wyearlen;\n var no1wkst = (firstwkst = pymod(7 - yearweekday + options.wkst, 7));\n if (no1wkst >= 4) {\n no1wkst = 0;\n // Number of days in the year, plus the days we got\n // from last year.\n wyearlen = result.yearlen + pymod(yearweekday - options.wkst, 7);\n }\n else {\n // Number of days in the year, minus the days we\n // left in last year.\n wyearlen = yearlen - no1wkst;\n }\n var div = Math.floor(wyearlen / 7);\n var mod = pymod(wyearlen, 7);\n var numweeks = Math.floor(div + mod / 4);\n for (var j = 0; j < options.byweekno.length; j++) {\n var n = options.byweekno[j];\n if (n < 0) {\n n += numweeks + 1;\n }\n if (!(n > 0 && n <= numweeks)) {\n continue;\n }\n var i = void 0;\n if (n > 1) {\n i = no1wkst + (n - 1) * 7;\n if (no1wkst !== firstwkst) {\n i -= 7 - firstwkst;\n }\n }\n else {\n i = no1wkst;\n }\n for (var k = 0; k < 7; k++) {\n result.wnomask[i] = 1;\n i++;\n if (result.wdaymask[i] === options.wkst)\n break;\n }\n }\n if (includes(options.byweekno, 1)) {\n // Check week number 1 of next year as well\n // orig-TODO : Check -numweeks for next year.\n var i = no1wkst + numweeks * 7;\n if (no1wkst !== firstwkst)\n i -= 7 - firstwkst;\n if (i < yearlen) {\n // If week starts in next year, we\n // don't care about it.\n for (var j = 0; j < 7; j++) {\n result.wnomask[i] = 1;\n i += 1;\n if (result.wdaymask[i] === options.wkst)\n break;\n }\n }\n }\n if (no1wkst) {\n // Check last week number of last year as\n // well. If no1wkst is 0, either the year\n // started on week start, or week number 1\n // got days from last year, so there are no\n // days from last year's last week number in\n // this year.\n var lnumweeks = void 0;\n if (!includes(options.byweekno, -1)) {\n var lyearweekday = getWeekday(datetime(year - 1, 1, 1));\n var lno1wkst = pymod(7 - lyearweekday.valueOf() + options.wkst, 7);\n var lyearlen = isLeapYear(year - 1) ? 366 : 365;\n var weekst = void 0;\n if (lno1wkst >= 4) {\n lno1wkst = 0;\n weekst = lyearlen + pymod(lyearweekday - options.wkst, 7);\n }\n else {\n weekst = yearlen - no1wkst;\n }\n lnumweeks = Math.floor(52 + pymod(weekst, 7) / 4);\n }\n else {\n lnumweeks = -1;\n }\n if (includes(options.byweekno, lnumweeks)) {\n for (var i = 0; i < no1wkst; i++)\n result.wnomask[i] = 1;\n }\n }\n return result;\n}\nfunction baseYearMasks(year) {\n var yearlen = isLeapYear(year) ? 366 : 365;\n var firstyday = datetime(year, 1, 1);\n var wday = getWeekday(firstyday);\n if (yearlen === 365) {\n return {\n mmask: M365MASK,\n mdaymask: MDAY365MASK,\n nmdaymask: NMDAY365MASK,\n wdaymask: WDAYMASK.slice(wday),\n mrange: M365RANGE,\n };\n }\n return {\n mmask: M366MASK,\n mdaymask: MDAY366MASK,\n nmdaymask: NMDAY366MASK,\n wdaymask: WDAYMASK.slice(wday),\n mrange: M366RANGE,\n };\n}\n//# sourceMappingURL=yearinfo.js.map","import { notEmpty, repeat, range, isPresent } from '../helpers';\nimport { Frequency } from '../types';\nimport { rebuildYear } from './yearinfo';\nimport { rebuildMonth } from './monthinfo';\nimport { easter } from './easter';\nimport { Time } from '../datetime';\nimport { datetime, sort, toOrdinal } from '../dateutil';\n// =============================================================================\n// Iterinfo\n// =============================================================================\nvar Iterinfo = /** @class */ (function () {\n // eslint-disable-next-line no-empty-function\n function Iterinfo(options) {\n this.options = options;\n }\n Iterinfo.prototype.rebuild = function (year, month) {\n var options = this.options;\n if (year !== this.lastyear) {\n this.yearinfo = rebuildYear(year, options);\n }\n if (notEmpty(options.bynweekday) &&\n (month !== this.lastmonth || year !== this.lastyear)) {\n var _a = this.yearinfo, yearlen = _a.yearlen, mrange = _a.mrange, wdaymask = _a.wdaymask;\n this.monthinfo = rebuildMonth(year, month, yearlen, mrange, wdaymask, options);\n }\n if (isPresent(options.byeaster)) {\n this.eastermask = easter(year, options.byeaster);\n }\n };\n Object.defineProperty(Iterinfo.prototype, \"lastyear\", {\n get: function () {\n return this.monthinfo ? this.monthinfo.lastyear : null;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"lastmonth\", {\n get: function () {\n return this.monthinfo ? this.monthinfo.lastmonth : null;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"yearlen\", {\n get: function () {\n return this.yearinfo.yearlen;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"yearordinal\", {\n get: function () {\n return this.yearinfo.yearordinal;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"mrange\", {\n get: function () {\n return this.yearinfo.mrange;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"wdaymask\", {\n get: function () {\n return this.yearinfo.wdaymask;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"mmask\", {\n get: function () {\n return this.yearinfo.mmask;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"wnomask\", {\n get: function () {\n return this.yearinfo.wnomask;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"nwdaymask\", {\n get: function () {\n return this.monthinfo ? this.monthinfo.nwdaymask : [];\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"nextyearlen\", {\n get: function () {\n return this.yearinfo.nextyearlen;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"mdaymask\", {\n get: function () {\n return this.yearinfo.mdaymask;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"nmdaymask\", {\n get: function () {\n return this.yearinfo.nmdaymask;\n },\n enumerable: false,\n configurable: true\n });\n Iterinfo.prototype.ydayset = function () {\n return [range(this.yearlen), 0, this.yearlen];\n };\n Iterinfo.prototype.mdayset = function (_, month) {\n var start = this.mrange[month - 1];\n var end = this.mrange[month];\n var set = repeat(null, this.yearlen);\n for (var i = start; i < end; i++)\n set[i] = i;\n return [set, start, end];\n };\n Iterinfo.prototype.wdayset = function (year, month, day) {\n // We need to handle cross-year weeks here.\n var set = repeat(null, this.yearlen + 7);\n var i = toOrdinal(datetime(year, month, day)) - this.yearordinal;\n var start = i;\n for (var j = 0; j < 7; j++) {\n set[i] = i;\n ++i;\n if (this.wdaymask[i] === this.options.wkst)\n break;\n }\n return [set, start, i];\n };\n Iterinfo.prototype.ddayset = function (year, month, day) {\n var set = repeat(null, this.yearlen);\n var i = toOrdinal(datetime(year, month, day)) - this.yearordinal;\n set[i] = i;\n return [set, i, i + 1];\n };\n Iterinfo.prototype.htimeset = function (hour, _, second, millisecond) {\n var _this = this;\n var set = [];\n this.options.byminute.forEach(function (minute) {\n set = set.concat(_this.mtimeset(hour, minute, second, millisecond));\n });\n sort(set);\n return set;\n };\n Iterinfo.prototype.mtimeset = function (hour, minute, _, millisecond) {\n var set = this.options.bysecond.map(function (second) { return new Time(hour, minute, second, millisecond); });\n sort(set);\n return set;\n };\n Iterinfo.prototype.stimeset = function (hour, minute, second, millisecond) {\n return [new Time(hour, minute, second, millisecond)];\n };\n Iterinfo.prototype.getdayset = function (freq) {\n switch (freq) {\n case Frequency.YEARLY:\n return this.ydayset.bind(this);\n case Frequency.MONTHLY:\n return this.mdayset.bind(this);\n case Frequency.WEEKLY:\n return this.wdayset.bind(this);\n case Frequency.DAILY:\n return this.ddayset.bind(this);\n default:\n return this.ddayset.bind(this);\n }\n };\n Iterinfo.prototype.gettimeset = function (freq) {\n switch (freq) {\n case Frequency.HOURLY:\n return this.htimeset.bind(this);\n case Frequency.MINUTELY:\n return this.mtimeset.bind(this);\n case Frequency.SECONDLY:\n return this.stimeset.bind(this);\n }\n };\n return Iterinfo;\n}());\nexport default Iterinfo;\n//# sourceMappingURL=index.js.map","import { RRule } from '../rrule';\nimport { empty, repeat, pymod } from '../helpers';\nexport function rebuildMonth(year, month, yearlen, mrange, wdaymask, options) {\n var result = {\n lastyear: year,\n lastmonth: month,\n nwdaymask: [],\n };\n var ranges = [];\n if (options.freq === RRule.YEARLY) {\n if (empty(options.bymonth)) {\n ranges = [[0, yearlen]];\n }\n else {\n for (var j = 0; j < options.bymonth.length; j++) {\n month = options.bymonth[j];\n ranges.push(mrange.slice(month - 1, month + 1));\n }\n }\n }\n else if (options.freq === RRule.MONTHLY) {\n ranges = [mrange.slice(month - 1, month + 1)];\n }\n if (empty(ranges)) {\n return result;\n }\n // Weekly frequency won't get here, so we may not\n // care about cross-year weekly periods.\n result.nwdaymask = repeat(0, yearlen);\n for (var j = 0; j < ranges.length; j++) {\n var rang = ranges[j];\n var first = rang[0];\n var last = rang[1] - 1;\n for (var k = 0; k < options.bynweekday.length; k++) {\n var i = void 0;\n var _a = options.bynweekday[k], wday = _a[0], n = _a[1];\n if (n < 0) {\n i = last + (n + 1) * 7;\n i -= pymod(wdaymask[i] - wday, 7);\n }\n else {\n i = first + (n - 1) * 7;\n i += pymod(7 - wdaymask[i] + wday, 7);\n }\n if (first <= i && i <= last)\n result.nwdaymask[i] = 1;\n }\n }\n return result;\n}\n//# sourceMappingURL=monthinfo.js.map","export function easter(y, offset) {\n if (offset === void 0) { offset = 0; }\n var a = y % 19;\n var b = Math.floor(y / 100);\n var c = y % 100;\n var d = Math.floor(b / 4);\n var e = b % 4;\n var f = Math.floor((b + 8) / 25);\n var g = Math.floor((b - f + 1) / 3);\n var h = Math.floor(19 * a + b - d - g + 15) % 30;\n var i = Math.floor(c / 4);\n var k = c % 4;\n var l = Math.floor(32 + 2 * e + 2 * i - h - k) % 7;\n var m = Math.floor((a + 11 * h + 22 * l) / 451);\n var month = Math.floor((h + l - 7 * m + 114) / 31);\n var day = ((h + l - 7 * m + 114) % 31) + 1;\n var date = Date.UTC(y, month - 1, day + offset);\n var yearStart = Date.UTC(y, 0, 1);\n return [Math.ceil((date - yearStart) / (1000 * 60 * 60 * 24))];\n}\n//# sourceMappingURL=easter.js.map","import { combine, fromOrdinal, sort } from '../dateutil';\nimport { pymod, isPresent, includes } from '../helpers';\nexport function buildPoslist(bysetpos, timeset, start, end, ii, dayset) {\n var poslist = [];\n for (var j = 0; j < bysetpos.length; j++) {\n var daypos = void 0;\n var timepos = void 0;\n var pos = bysetpos[j];\n if (pos < 0) {\n daypos = Math.floor(pos / timeset.length);\n timepos = pymod(pos, timeset.length);\n }\n else {\n daypos = Math.floor((pos - 1) / timeset.length);\n timepos = pymod(pos - 1, timeset.length);\n }\n var tmp = [];\n for (var k = start; k < end; k++) {\n var val = dayset[k];\n if (!isPresent(val))\n continue;\n tmp.push(val);\n }\n var i = void 0;\n if (daypos < 0) {\n i = tmp.slice(daypos)[0];\n }\n else {\n i = tmp[daypos];\n }\n var time = timeset[timepos];\n var date = fromOrdinal(ii.yearordinal + i);\n var res = combine(date, time);\n // XXX: can this ever be in the array?\n // - compare the actual date instead?\n if (!includes(poslist, res))\n poslist.push(res);\n }\n sort(poslist);\n return poslist;\n}\n//# sourceMappingURL=poslist.js.map","import { freqIsDailyOrGreater } from '../types';\nimport { combine, fromOrdinal, MAXYEAR } from '../dateutil';\nimport Iterinfo from '../iterinfo/index';\nimport { RRule } from '../rrule';\nimport { buildTimeset } from '../parseoptions';\nimport { notEmpty, includes, isPresent } from '../helpers';\nimport { DateWithZone } from '../datewithzone';\nimport { buildPoslist } from './poslist';\nimport { DateTime } from '../datetime';\nexport function iter(iterResult, options) {\n var dtstart = options.dtstart, freq = options.freq, interval = options.interval, until = options.until, bysetpos = options.bysetpos;\n var count = options.count;\n if (count === 0 || interval === 0) {\n return emitResult(iterResult);\n }\n var counterDate = DateTime.fromDate(dtstart);\n var ii = new Iterinfo(options);\n ii.rebuild(counterDate.year, counterDate.month);\n var timeset = makeTimeset(ii, counterDate, options);\n for (;;) {\n var _a = ii.getdayset(freq)(counterDate.year, counterDate.month, counterDate.day), dayset = _a[0], start = _a[1], end = _a[2];\n var filtered = removeFilteredDays(dayset, start, end, ii, options);\n if (notEmpty(bysetpos)) {\n var poslist = buildPoslist(bysetpos, timeset, start, end, ii, dayset);\n for (var j = 0; j < poslist.length; j++) {\n var res = poslist[j];\n if (until && res > until) {\n return emitResult(iterResult);\n }\n if (res >= dtstart) {\n var rezonedDate = rezoneIfNeeded(res, options);\n if (!iterResult.accept(rezonedDate)) {\n return emitResult(iterResult);\n }\n if (count) {\n --count;\n if (!count) {\n return emitResult(iterResult);\n }\n }\n }\n }\n }\n else {\n for (var j = start; j < end; j++) {\n var currentDay = dayset[j];\n if (!isPresent(currentDay)) {\n continue;\n }\n var date = fromOrdinal(ii.yearordinal + currentDay);\n for (var k = 0; k < timeset.length; k++) {\n var time = timeset[k];\n var res = combine(date, time);\n if (until && res > until) {\n return emitResult(iterResult);\n }\n if (res >= dtstart) {\n var rezonedDate = rezoneIfNeeded(res, options);\n if (!iterResult.accept(rezonedDate)) {\n return emitResult(iterResult);\n }\n if (count) {\n --count;\n if (!count) {\n return emitResult(iterResult);\n }\n }\n }\n }\n }\n }\n if (options.interval === 0) {\n return emitResult(iterResult);\n }\n // Handle frequency and interval\n counterDate.add(options, filtered);\n if (counterDate.year > MAXYEAR) {\n return emitResult(iterResult);\n }\n if (!freqIsDailyOrGreater(freq)) {\n timeset = ii.gettimeset(freq)(counterDate.hour, counterDate.minute, counterDate.second, 0);\n }\n ii.rebuild(counterDate.year, counterDate.month);\n }\n}\nfunction isFiltered(ii, currentDay, options) {\n var bymonth = options.bymonth, byweekno = options.byweekno, byweekday = options.byweekday, byeaster = options.byeaster, bymonthday = options.bymonthday, bynmonthday = options.bynmonthday, byyearday = options.byyearday;\n return ((notEmpty(bymonth) && !includes(bymonth, ii.mmask[currentDay])) ||\n (notEmpty(byweekno) && !ii.wnomask[currentDay]) ||\n (notEmpty(byweekday) && !includes(byweekday, ii.wdaymask[currentDay])) ||\n (notEmpty(ii.nwdaymask) && !ii.nwdaymask[currentDay]) ||\n (byeaster !== null && !includes(ii.eastermask, currentDay)) ||\n ((notEmpty(bymonthday) || notEmpty(bynmonthday)) &&\n !includes(bymonthday, ii.mdaymask[currentDay]) &&\n !includes(bynmonthday, ii.nmdaymask[currentDay])) ||\n (notEmpty(byyearday) &&\n ((currentDay < ii.yearlen &&\n !includes(byyearday, currentDay + 1) &&\n !includes(byyearday, -ii.yearlen + currentDay)) ||\n (currentDay >= ii.yearlen &&\n !includes(byyearday, currentDay + 1 - ii.yearlen) &&\n !includes(byyearday, -ii.nextyearlen + currentDay - ii.yearlen)))));\n}\nfunction rezoneIfNeeded(date, options) {\n return new DateWithZone(date, options.tzid).rezonedDate();\n}\nfunction emitResult(iterResult) {\n return iterResult.getValue();\n}\nfunction removeFilteredDays(dayset, start, end, ii, options) {\n var filtered = false;\n for (var dayCounter = start; dayCounter < end; dayCounter++) {\n var currentDay = dayset[dayCounter];\n filtered = isFiltered(ii, currentDay, options);\n if (filtered)\n dayset[currentDay] = null;\n }\n return filtered;\n}\nfunction makeTimeset(ii, counterDate, options) {\n var freq = options.freq, byhour = options.byhour, byminute = options.byminute, bysecond = options.bysecond;\n if (freqIsDailyOrGreater(freq)) {\n return buildTimeset(options);\n }\n if ((freq >= RRule.HOURLY &&\n notEmpty(byhour) &&\n !includes(byhour, counterDate.hour)) ||\n (freq >= RRule.MINUTELY &&\n notEmpty(byminute) &&\n !includes(byminute, counterDate.minute)) ||\n (freq >= RRule.SECONDLY &&\n notEmpty(bysecond) &&\n !includes(bysecond, counterDate.second))) {\n return [];\n }\n return ii.gettimeset(freq)(counterDate.hour, counterDate.minute, counterDate.second, counterDate.millisecond);\n}\n//# sourceMappingURL=index.js.map","import { isValidDate } from './dateutil';\nimport IterResult from './iterresult';\nimport CallbackIterResult from './callbackiterresult';\nimport { fromText, parseText, toText, isFullyConvertible } from './nlp/index';\nimport { Frequency, } from './types';\nimport { parseOptions, initializeOptions } from './parseoptions';\nimport { parseString } from './parsestring';\nimport { optionsToString } from './optionstostring';\nimport { Cache } from './cache';\nimport { Weekday } from './weekday';\nimport { iter } from './iter/index';\n// =============================================================================\n// RRule\n// =============================================================================\nexport var Days = {\n MO: new Weekday(0),\n TU: new Weekday(1),\n WE: new Weekday(2),\n TH: new Weekday(3),\n FR: new Weekday(4),\n SA: new Weekday(5),\n SU: new Weekday(6),\n};\nexport var DEFAULT_OPTIONS = {\n freq: Frequency.YEARLY,\n dtstart: null,\n interval: 1,\n wkst: Days.MO,\n count: null,\n until: null,\n tzid: null,\n bysetpos: null,\n bymonth: null,\n bymonthday: null,\n bynmonthday: null,\n byyearday: null,\n byweekno: null,\n byweekday: null,\n bynweekday: null,\n byhour: null,\n byminute: null,\n bysecond: null,\n byeaster: null,\n};\nexport var defaultKeys = Object.keys(DEFAULT_OPTIONS);\n/**\n *\n * @param {Options?} options - see \n * - The only required option is `freq`, one of RRule.YEARLY, RRule.MONTHLY, ...\n * @constructor\n */\nvar RRule = /** @class */ (function () {\n function RRule(options, noCache) {\n if (options === void 0) { options = {}; }\n if (noCache === void 0) { noCache = false; }\n // RFC string\n this._cache = noCache ? null : new Cache();\n // used by toString()\n this.origOptions = initializeOptions(options);\n var parsedOptions = parseOptions(options).parsedOptions;\n this.options = parsedOptions;\n }\n RRule.parseText = function (text, language) {\n return parseText(text, language);\n };\n RRule.fromText = function (text, language) {\n return fromText(text, language);\n };\n RRule.fromString = function (str) {\n return new RRule(RRule.parseString(str) || undefined);\n };\n RRule.prototype._iter = function (iterResult) {\n return iter(iterResult, this.options);\n };\n RRule.prototype._cacheGet = function (what, args) {\n if (!this._cache)\n return false;\n return this._cache._cacheGet(what, args);\n };\n RRule.prototype._cacheAdd = function (what, value, args) {\n if (!this._cache)\n return;\n return this._cache._cacheAdd(what, value, args);\n };\n /**\n * @param {Function} iterator - optional function that will be called\n * on each date that is added. It can return false\n * to stop the iteration.\n * @return Array containing all recurrences.\n */\n RRule.prototype.all = function (iterator) {\n if (iterator) {\n return this._iter(new CallbackIterResult('all', {}, iterator));\n }\n var result = this._cacheGet('all');\n if (result === false) {\n result = this._iter(new IterResult('all', {}));\n this._cacheAdd('all', result);\n }\n return result;\n };\n /**\n * Returns all the occurrences of the rrule between after and before.\n * The inc keyword defines what happens if after and/or before are\n * themselves occurrences. With inc == True, they will be included in the\n * list, if they are found in the recurrence set.\n *\n * @return Array\n */\n RRule.prototype.between = function (after, before, inc, iterator) {\n if (inc === void 0) { inc = false; }\n if (!isValidDate(after) || !isValidDate(before)) {\n throw new Error('Invalid date passed in to RRule.between');\n }\n var args = {\n before: before,\n after: after,\n inc: inc,\n };\n if (iterator) {\n return this._iter(new CallbackIterResult('between', args, iterator));\n }\n var result = this._cacheGet('between', args);\n if (result === false) {\n result = this._iter(new IterResult('between', args));\n this._cacheAdd('between', result, args);\n }\n return result;\n };\n /**\n * Returns the last recurrence before the given datetime instance.\n * The inc keyword defines what happens if dt is an occurrence.\n * With inc == True, if dt itself is an occurrence, it will be returned.\n *\n * @return Date or null\n */\n RRule.prototype.before = function (dt, inc) {\n if (inc === void 0) { inc = false; }\n if (!isValidDate(dt)) {\n throw new Error('Invalid date passed in to RRule.before');\n }\n var args = { dt: dt, inc: inc };\n var result = this._cacheGet('before', args);\n if (result === false) {\n result = this._iter(new IterResult('before', args));\n this._cacheAdd('before', result, args);\n }\n return result;\n };\n /**\n * Returns the first recurrence after the given datetime instance.\n * The inc keyword defines what happens if dt is an occurrence.\n * With inc == True, if dt itself is an occurrence, it will be returned.\n *\n * @return Date or null\n */\n RRule.prototype.after = function (dt, inc) {\n if (inc === void 0) { inc = false; }\n if (!isValidDate(dt)) {\n throw new Error('Invalid date passed in to RRule.after');\n }\n var args = { dt: dt, inc: inc };\n var result = this._cacheGet('after', args);\n if (result === false) {\n result = this._iter(new IterResult('after', args));\n this._cacheAdd('after', result, args);\n }\n return result;\n };\n /**\n * Returns the number of recurrences in this set. It will have go trough\n * the whole recurrence, if this hasn't been done before.\n */\n RRule.prototype.count = function () {\n return this.all().length;\n };\n /**\n * Converts the rrule into its string representation\n *\n * @see \n * @return String\n */\n RRule.prototype.toString = function () {\n return optionsToString(this.origOptions);\n };\n /**\n * Will convert all rules described in nlp:ToText\n * to text.\n */\n RRule.prototype.toText = function (gettext, language, dateFormatter) {\n return toText(this, gettext, language, dateFormatter);\n };\n RRule.prototype.isFullyConvertibleToText = function () {\n return isFullyConvertible(this);\n };\n /**\n * @return a RRule instance with the same freq and options\n * as this one (cache is not cloned)\n */\n RRule.prototype.clone = function () {\n return new RRule(this.origOptions);\n };\n // RRule class 'constants'\n RRule.FREQUENCIES = [\n 'YEARLY',\n 'MONTHLY',\n 'WEEKLY',\n 'DAILY',\n 'HOURLY',\n 'MINUTELY',\n 'SECONDLY',\n ];\n RRule.YEARLY = Frequency.YEARLY;\n RRule.MONTHLY = Frequency.MONTHLY;\n RRule.WEEKLY = Frequency.WEEKLY;\n RRule.DAILY = Frequency.DAILY;\n RRule.HOURLY = Frequency.HOURLY;\n RRule.MINUTELY = Frequency.MINUTELY;\n RRule.SECONDLY = Frequency.SECONDLY;\n RRule.MO = Days.MO;\n RRule.TU = Days.TU;\n RRule.WE = Days.WE;\n RRule.TH = Days.TH;\n RRule.FR = Days.FR;\n RRule.SA = Days.SA;\n RRule.SU = Days.SU;\n RRule.parseString = parseString;\n RRule.optionsToString = optionsToString;\n return RRule;\n}());\nexport { RRule };\n//# sourceMappingURL=rrule.js.map","import { __assign } from \"tslib\";\nimport { RRule } from './rrule';\nimport { RRuleSet } from './rruleset';\nimport { untilStringToDate } from './dateutil';\nimport { includes, split } from './helpers';\nimport { parseString, parseDtstart } from './parsestring';\n/**\n * RRuleStr\n * To parse a set of rrule strings\n */\nvar DEFAULT_OPTIONS = {\n dtstart: null,\n cache: false,\n unfold: false,\n forceset: false,\n compatible: false,\n tzid: null,\n};\nexport function parseInput(s, options) {\n var rrulevals = [];\n var rdatevals = [];\n var exrulevals = [];\n var exdatevals = [];\n var parsedDtstart = parseDtstart(s);\n var dtstart = parsedDtstart.dtstart;\n var tzid = parsedDtstart.tzid;\n var lines = splitIntoLines(s, options.unfold);\n lines.forEach(function (line) {\n var _a;\n if (!line)\n return;\n var _b = breakDownLine(line), name = _b.name, parms = _b.parms, value = _b.value;\n switch (name.toUpperCase()) {\n case 'RRULE':\n if (parms.length) {\n throw new Error(\"unsupported RRULE parm: \".concat(parms.join(',')));\n }\n rrulevals.push(parseString(line));\n break;\n case 'RDATE':\n var _c = (_a = /RDATE(?:;TZID=([^:=]+))?/i.exec(line)) !== null && _a !== void 0 ? _a : [], rdateTzid = _c[1];\n if (rdateTzid && !tzid) {\n tzid = rdateTzid;\n }\n rdatevals = rdatevals.concat(parseRDate(value, parms));\n break;\n case 'EXRULE':\n if (parms.length) {\n throw new Error(\"unsupported EXRULE parm: \".concat(parms.join(',')));\n }\n exrulevals.push(parseString(value));\n break;\n case 'EXDATE':\n exdatevals = exdatevals.concat(parseRDate(value, parms));\n break;\n case 'DTSTART':\n break;\n default:\n throw new Error('unsupported property: ' + name);\n }\n });\n return {\n dtstart: dtstart,\n tzid: tzid,\n rrulevals: rrulevals,\n rdatevals: rdatevals,\n exrulevals: exrulevals,\n exdatevals: exdatevals,\n };\n}\nfunction buildRule(s, options) {\n var _a = parseInput(s, options), rrulevals = _a.rrulevals, rdatevals = _a.rdatevals, exrulevals = _a.exrulevals, exdatevals = _a.exdatevals, dtstart = _a.dtstart, tzid = _a.tzid;\n var noCache = options.cache === false;\n if (options.compatible) {\n options.forceset = true;\n options.unfold = true;\n }\n if (options.forceset ||\n rrulevals.length > 1 ||\n rdatevals.length ||\n exrulevals.length ||\n exdatevals.length) {\n var rset_1 = new RRuleSet(noCache);\n rset_1.dtstart(dtstart);\n rset_1.tzid(tzid || undefined);\n rrulevals.forEach(function (val) {\n rset_1.rrule(new RRule(groomRruleOptions(val, dtstart, tzid), noCache));\n });\n rdatevals.forEach(function (date) {\n rset_1.rdate(date);\n });\n exrulevals.forEach(function (val) {\n rset_1.exrule(new RRule(groomRruleOptions(val, dtstart, tzid), noCache));\n });\n exdatevals.forEach(function (date) {\n rset_1.exdate(date);\n });\n if (options.compatible && options.dtstart)\n rset_1.rdate(dtstart);\n return rset_1;\n }\n var val = rrulevals[0] || {};\n return new RRule(groomRruleOptions(val, val.dtstart || options.dtstart || dtstart, val.tzid || options.tzid || tzid), noCache);\n}\nexport function rrulestr(s, options) {\n if (options === void 0) { options = {}; }\n return buildRule(s, initializeOptions(options));\n}\nfunction groomRruleOptions(val, dtstart, tzid) {\n return __assign(__assign({}, val), { dtstart: dtstart, tzid: tzid });\n}\nfunction initializeOptions(options) {\n var invalid = [];\n var keys = Object.keys(options);\n var defaultKeys = Object.keys(DEFAULT_OPTIONS);\n keys.forEach(function (key) {\n if (!includes(defaultKeys, key))\n invalid.push(key);\n });\n if (invalid.length) {\n throw new Error('Invalid options: ' + invalid.join(', '));\n }\n return __assign(__assign({}, DEFAULT_OPTIONS), options);\n}\nfunction extractName(line) {\n if (line.indexOf(':') === -1) {\n return {\n name: 'RRULE',\n value: line,\n };\n }\n var _a = split(line, ':', 1), name = _a[0], value = _a[1];\n return {\n name: name,\n value: value,\n };\n}\nfunction breakDownLine(line) {\n var _a = extractName(line), name = _a.name, value = _a.value;\n var parms = name.split(';');\n if (!parms)\n throw new Error('empty property name');\n return {\n name: parms[0].toUpperCase(),\n parms: parms.slice(1),\n value: value,\n };\n}\nfunction splitIntoLines(s, unfold) {\n if (unfold === void 0) { unfold = false; }\n s = s && s.trim();\n if (!s)\n throw new Error('Invalid empty string');\n // More info about 'unfold' option\n // Go head to http://www.ietf.org/rfc/rfc2445.txt\n if (!unfold) {\n return s.split(/\\s/);\n }\n var lines = s.split('\\n');\n var i = 0;\n while (i < lines.length) {\n // TODO\n var line = (lines[i] = lines[i].replace(/\\s+$/g, ''));\n if (!line) {\n lines.splice(i, 1);\n }\n else if (i > 0 && line[0] === ' ') {\n lines[i - 1] += line.slice(1);\n lines.splice(i, 1);\n }\n else {\n i += 1;\n }\n }\n return lines;\n}\nfunction validateDateParm(parms) {\n parms.forEach(function (parm) {\n if (!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(parm)) {\n throw new Error('unsupported RDATE/EXDATE parm: ' + parm);\n }\n });\n}\nfunction parseRDate(rdateval, parms) {\n validateDateParm(parms);\n return rdateval.split(',').map(function (datestr) { return untilStringToDate(datestr); });\n}\n//# sourceMappingURL=rrulestr.js.map","import { __extends } from \"tslib\";\nimport { RRule } from './rrule';\nimport { sort, timeToUntilString } from './dateutil';\nimport { includes } from './helpers';\nimport { iterSet } from './iterset';\nimport { rrulestr } from './rrulestr';\nimport { optionsToString } from './optionstostring';\nfunction createGetterSetter(fieldName) {\n var _this = this;\n return function (field) {\n if (field !== undefined) {\n _this[\"_\".concat(fieldName)] = field;\n }\n if (_this[\"_\".concat(fieldName)] !== undefined) {\n return _this[\"_\".concat(fieldName)];\n }\n for (var i = 0; i < _this._rrule.length; i++) {\n var field_1 = _this._rrule[i].origOptions[fieldName];\n if (field_1) {\n return field_1;\n }\n }\n };\n}\nvar RRuleSet = /** @class */ (function (_super) {\n __extends(RRuleSet, _super);\n /**\n *\n * @param {Boolean?} noCache\n * The same stratagy as RRule on cache, default to false\n * @constructor\n */\n function RRuleSet(noCache) {\n if (noCache === void 0) { noCache = false; }\n var _this = _super.call(this, {}, noCache) || this;\n _this.dtstart = createGetterSetter.apply(_this, ['dtstart']);\n _this.tzid = createGetterSetter.apply(_this, ['tzid']);\n _this._rrule = [];\n _this._rdate = [];\n _this._exrule = [];\n _this._exdate = [];\n return _this;\n }\n RRuleSet.prototype._iter = function (iterResult) {\n return iterSet(iterResult, this._rrule, this._exrule, this._rdate, this._exdate, this.tzid());\n };\n /**\n * Adds an RRule to the set\n *\n * @param {RRule}\n */\n RRuleSet.prototype.rrule = function (rrule) {\n _addRule(rrule, this._rrule);\n };\n /**\n * Adds an EXRULE to the set\n *\n * @param {RRule}\n */\n RRuleSet.prototype.exrule = function (rrule) {\n _addRule(rrule, this._exrule);\n };\n /**\n * Adds an RDate to the set\n *\n * @param {Date}\n */\n RRuleSet.prototype.rdate = function (date) {\n _addDate(date, this._rdate);\n };\n /**\n * Adds an EXDATE to the set\n *\n * @param {Date}\n */\n RRuleSet.prototype.exdate = function (date) {\n _addDate(date, this._exdate);\n };\n /**\n * Get list of included rrules in this recurrence set.\n *\n * @return List of rrules\n */\n RRuleSet.prototype.rrules = function () {\n return this._rrule.map(function (e) { return rrulestr(e.toString()); });\n };\n /**\n * Get list of excluded rrules in this recurrence set.\n *\n * @return List of exrules\n */\n RRuleSet.prototype.exrules = function () {\n return this._exrule.map(function (e) { return rrulestr(e.toString()); });\n };\n /**\n * Get list of included datetimes in this recurrence set.\n *\n * @return List of rdates\n */\n RRuleSet.prototype.rdates = function () {\n return this._rdate.map(function (e) { return new Date(e.getTime()); });\n };\n /**\n * Get list of included datetimes in this recurrence set.\n *\n * @return List of exdates\n */\n RRuleSet.prototype.exdates = function () {\n return this._exdate.map(function (e) { return new Date(e.getTime()); });\n };\n RRuleSet.prototype.valueOf = function () {\n var result = [];\n if (!this._rrule.length && this._dtstart) {\n result = result.concat(optionsToString({ dtstart: this._dtstart }));\n }\n this._rrule.forEach(function (rrule) {\n result = result.concat(rrule.toString().split('\\n'));\n });\n this._exrule.forEach(function (exrule) {\n result = result.concat(exrule\n .toString()\n .split('\\n')\n .map(function (line) { return line.replace(/^RRULE:/, 'EXRULE:'); })\n .filter(function (line) { return !/^DTSTART/.test(line); }));\n });\n if (this._rdate.length) {\n result.push(rdatesToString('RDATE', this._rdate, this.tzid()));\n }\n if (this._exdate.length) {\n result.push(rdatesToString('EXDATE', this._exdate, this.tzid()));\n }\n return result;\n };\n /**\n * to generate recurrence field such as:\n * DTSTART:19970902T010000Z\n * RRULE:FREQ=YEARLY;COUNT=2;BYDAY=TU\n * RRULE:FREQ=YEARLY;COUNT=1;BYDAY=TH\n */\n RRuleSet.prototype.toString = function () {\n return this.valueOf().join('\\n');\n };\n /**\n * Create a new RRuleSet Object completely base on current instance\n */\n RRuleSet.prototype.clone = function () {\n var rrs = new RRuleSet(!!this._cache);\n this._rrule.forEach(function (rule) { return rrs.rrule(rule.clone()); });\n this._exrule.forEach(function (rule) { return rrs.exrule(rule.clone()); });\n this._rdate.forEach(function (date) { return rrs.rdate(new Date(date.getTime())); });\n this._exdate.forEach(function (date) { return rrs.exdate(new Date(date.getTime())); });\n return rrs;\n };\n return RRuleSet;\n}(RRule));\nexport { RRuleSet };\nfunction _addRule(rrule, collection) {\n if (!(rrule instanceof RRule)) {\n throw new TypeError(String(rrule) + ' is not RRule instance');\n }\n if (!includes(collection.map(String), String(rrule))) {\n collection.push(rrule);\n }\n}\nfunction _addDate(date, collection) {\n if (!(date instanceof Date)) {\n throw new TypeError(String(date) + ' is not Date instance');\n }\n if (!includes(collection.map(Number), Number(date))) {\n collection.push(date);\n sort(collection);\n }\n}\nfunction rdatesToString(param, rdates, tzid) {\n var isUTC = !tzid || tzid.toUpperCase() === 'UTC';\n var header = isUTC ? \"\".concat(param, \":\") : \"\".concat(param, \";TZID=\").concat(tzid, \":\");\n var dateString = rdates\n .map(function (rdate) { return timeToUntilString(rdate.valueOf(), isUTC); })\n .join(',');\n return \"\".concat(header).concat(dateString);\n}\n//# sourceMappingURL=rruleset.js.map","import { DateWithZone } from './datewithzone';\nimport { iter } from './iter';\nimport { sort } from './dateutil';\nexport function iterSet(iterResult, _rrule, _exrule, _rdate, _exdate, tzid) {\n var _exdateHash = {};\n var _accept = iterResult.accept;\n function evalExdate(after, before) {\n _exrule.forEach(function (rrule) {\n rrule.between(after, before, true).forEach(function (date) {\n _exdateHash[Number(date)] = true;\n });\n });\n }\n _exdate.forEach(function (date) {\n var zonedDate = new DateWithZone(date, tzid).rezonedDate();\n _exdateHash[Number(zonedDate)] = true;\n });\n iterResult.accept = function (date) {\n var dt = Number(date);\n if (isNaN(dt))\n return _accept.call(this, date);\n if (!_exdateHash[dt]) {\n evalExdate(new Date(dt - 1), new Date(dt + 1));\n if (!_exdateHash[dt]) {\n _exdateHash[dt] = true;\n return _accept.call(this, date);\n }\n }\n return true;\n };\n if (iterResult.method === 'between') {\n evalExdate(iterResult.args.after, iterResult.args.before);\n iterResult.accept = function (date) {\n var dt = Number(date);\n if (!_exdateHash[dt]) {\n _exdateHash[dt] = true;\n return _accept.call(this, date);\n }\n return true;\n };\n }\n for (var i = 0; i < _rdate.length; i++) {\n var zonedDate = new DateWithZone(_rdate[i], tzid).rezonedDate();\n if (!iterResult.accept(new Date(zonedDate.getTime())))\n break;\n }\n _rrule.forEach(function (rrule) {\n iter(iterResult, rrule.options);\n });\n var res = iterResult._result;\n sort(res);\n switch (iterResult.method) {\n case 'all':\n case 'between':\n return res;\n case 'before':\n return ((res.length && res[res.length - 1]) || null);\n case 'after':\n default:\n return ((res.length && res[0]) || null);\n }\n}\n//# sourceMappingURL=iterset.js.map","interface IViewPosition{\r\n\ttop: number;\r\n\tleft: number;\r\n}\r\n\r\ninterface IViewBox extends IViewPosition{\r\n\twidth: number;\r\n\theight: number;\r\n\tbottom: number;\r\n\tright: number;\r\n}\r\n\r\nexport class Tooltip {\r\n\tprivate _root: HTMLElement;\r\n\tprivate _tooltipNode: HTMLElement | null;\r\n\tprivate _scheduler: any;\r\n\r\n\tconstructor(scheduler: any){\r\n\t\tthis._scheduler = scheduler;\r\n\t}\r\n\r\n\tgetNode() : HTMLElement {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tif (!this._tooltipNode){\r\n\t\t\tthis._tooltipNode = document.createElement(\"div\");\r\n\t\t\tthis._tooltipNode.className = \"dhtmlXTooltip scheduler_tooltip tooltip\";\r\n\r\n\t\t\tscheduler._waiAria.tooltipAttr(this._tooltipNode);\r\n\t\t}\r\n\t\tif(scheduler.config.rtl){\r\n\t\t\tthis._tooltipNode.classList.add(\"dhtmlXTooltip_rtl\");\r\n\t\t} else{\r\n\t\t\tthis._tooltipNode.classList.remove(\"dhtmlXTooltip_rtl\");\r\n\t\t}\r\n\t\treturn this._tooltipNode;\r\n\t}\r\n\r\n\tsetViewport(node: HTMLElement):Tooltip{\r\n\t\tthis._root = node;\r\n\t\treturn this;\r\n\t}\r\n\r\n\tshow(left: number, top: number): Tooltip;\r\n\tshow(event: MouseEvent): Tooltip;\r\n\tshow(left: number | MouseEvent, top?: number): Tooltip {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tconst container = document.body;\r\n\t\tconst node = this.getNode();\r\n\r\n\t\tif(!domHelpers.isChildOf(node, container)){\r\n\t\t\tthis.hide();\r\n\t\t\tcontainer.appendChild(node);\r\n\t\t}\r\n\r\n\t\tif (this._isLikeMouseEvent(left)) {\r\n\t\t\tconst position = this._calculateTooltipPosition(left as MouseEvent);\r\n\t\t\ttop = position.top;\r\n\t\t\tleft = position.left;\r\n\t\t}\r\n\r\n\t\tnode.style.top = top + \"px\";\r\n\t\tnode.style.left = left + \"px\";\r\n\r\n\t\tscheduler._waiAria.tooltipVisibleAttr(node);\r\n\t\treturn this;\r\n\t}\r\n\thide() : Tooltip{\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst node = this.getNode();\r\n\t\tif(node && node.parentNode){\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t}\r\n\t\tscheduler._waiAria.tooltipHiddenAttr(node);\r\n\t\treturn this;\r\n\t}\r\n\r\n\tsetContent(html: string) : Tooltip{\r\n\t\tconst node = this.getNode();\r\n\t\tnode.innerHTML = html;\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// it is for salesforce, because it proxies event to it own events\r\n\tprivate _isLikeMouseEvent(event: any): boolean {\r\n\t\tif (!event || typeof event !== \"object\") {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn \"clientX\" in event && \"clientY\" in event;\r\n\t}\r\n\r\n\tprivate _getViewPort() : HTMLElement {\r\n\t\treturn this._root || document.body;\r\n\t}\r\n\r\n\r\n\tprivate _calculateTooltipPosition(event: MouseEvent): IViewPosition{\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\t// top/left coordinates inside the viewport by mouse position\r\n\t\tconst viewport = this._getViewPortSize();\r\n\t\tconst tooltipNode = this.getNode();\r\n\t\tconst tooltip: IViewBox = {\r\n\t\t\ttop:0,\r\n\t\t\tleft: 0,\r\n\t\t\twidth: tooltipNode.offsetWidth,\r\n\t\t\theight: tooltipNode.offsetHeight,\r\n\t\t\tbottom: 0,\r\n\t\t\tright: 0\r\n\t\t};\r\n\r\n\t\tconst offsetX = scheduler.config.tooltip_offset_x;\r\n\t\tconst offsetY = scheduler.config.tooltip_offset_y;\r\n\r\n\t\tconst container = document.body;\r\n\t\tconst mouse = domHelpers.getRelativeEventPosition(event, container);\r\n\t\tconst containerPos = domHelpers.getNodePosition(container);\r\n\t\tmouse.y += containerPos.y; // to fix margin collapsing\r\n\r\n\t\ttooltip.top = mouse.y;\r\n\t\ttooltip.left = mouse.x;\r\n\t\ttooltip.top += offsetY;\r\n\t\ttooltip.left += offsetX;\r\n\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\ttooltip.right = tooltip.left + tooltip.width;\r\n\r\n\t\tconst scrollTop = window.scrollY + container.scrollTop; // to fix margin collapsing\r\n\t\t// edge cases when the tooltip element can be partially hidden by edges of the viewport\r\n\t\tif(tooltip.top < viewport.top - scrollTop){\r\n\t\t\ttooltip.top = viewport.top;\r\n\t\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\t}else if(tooltip.bottom > viewport.bottom){\r\n\t\t\ttooltip.bottom = viewport.bottom;\r\n\t\t\ttooltip.top = tooltip.bottom - tooltip.height;\r\n\t\t}\r\n\r\n\t\tif(tooltip.left < viewport.left){\r\n\t\t\ttooltip.left = viewport.left;\r\n\t\t\ttooltip.right = viewport.left + tooltip.width;\r\n\t\t}else if(tooltip.right > viewport.right){\r\n\t\t\ttooltip.right = viewport.right;\r\n\t\t\ttooltip.left = tooltip.right - tooltip.width;\r\n\t\t}\r\n\r\n\t\tif(mouse.x >= tooltip.left && mouse.x <= tooltip.right) {\r\n\t\t\ttooltip.left = mouse.x - tooltip.width - offsetX;\r\n\t\t\ttooltip.right = tooltip.left + tooltip.width;\r\n\t\t}\r\n\r\n\t\tif(mouse.y >= tooltip.top && mouse.y <= tooltip.bottom) {\r\n\t\t\ttooltip.top = mouse.y - tooltip.height - offsetY;\r\n\t\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\t}\r\n\r\n\t\treturn tooltip;\r\n\t}\r\n\r\n\tprivate _getViewPortSize() : IViewBox {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tconst container = this._getViewPort();\r\n\t\tlet viewport = container;\r\n\t\tlet scrollTop = window.scrollY + document.body.scrollTop;\r\n\t\tlet scrollLeft = window.scrollX + document.body.scrollLeft;\r\n\t\tlet pos;\r\n\t\t// support for the initial tooltip mode where the tooltip element was attached to the data area of scheduler\r\n\t\tif(container === scheduler.$event_data){\r\n\t\t\tviewport = scheduler.$event;\r\n\t\t\tscrollTop = 0;\r\n\t\t\tscrollLeft = 0;\r\n\t\t\tpos = domHelpers.getNodePosition(scheduler.$event);\r\n\t\t}else{\r\n\t\t\tpos = domHelpers.getNodePosition(viewport);\r\n\t\t}\r\n\t\treturn {\r\n\t\t\tleft:pos.x + scrollLeft,\r\n\t\t\ttop: pos.y + scrollTop,\r\n\t\t\twidth: pos.width,\r\n\t\t\theight: pos.height,\r\n\t\t\tbottom: pos.y + pos.height + scrollTop,\r\n\t\t\tright: pos.x + pos.width + scrollLeft\r\n\t\t};\r\n\t}\r\n}\r\n","import * as utils from \"../../core/utils/utils\";\r\nimport { Tooltip } from \"./tooltip\";\r\n\r\ninterface ITrackerTarget {\r\n\tselector: string;\r\n\tonmouseenter: (event: MouseEvent, node: HTMLElement) => void;\r\n\tonmousemove: (event: MouseEvent, node: HTMLElement) => void;\r\n\tonmouseleave: (event: MouseEvent, node: HTMLElement) => void;\r\n\tglobal: boolean;\r\n}\r\n\r\ninterface ITooltipConfig {\r\n\tselector: string;\r\n\thtml: (event: MouseEvent, node: HTMLElement) => string;\r\n\tglobal: boolean;\r\n}\r\n\r\nexport class TooltipManager{\r\n\ttooltip: Tooltip;\r\n\tprotected _domEvents: any;\r\n\tprivate _listeners: object = {};\r\n\tprivate _scheduler: any;\r\n\tprivate delayShow: any;\r\n\tprivate delayHide: any;\r\n\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.tooltip = new Tooltip(scheduler);\r\n\t\tthis._scheduler = scheduler;\r\n\t\tthis._domEvents = scheduler._createDomEventScope();\r\n\t\tthis._initDelayedFunctions();\r\n\t}\r\n\r\n\tdestructor(): void{\r\n\t\tthis.tooltip.hide();\r\n\t\tthis._domEvents.detachAll();\r\n\t}\r\n\thideTooltip(): void{\r\n\t\tthis.delayHide();\r\n\t}\r\n\tattach(config: ITrackerTarget): void {\r\n\t\tlet root = document.body;\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tif(!config.global){\r\n\t\t\troot = scheduler.$root;\r\n\t\t}\r\n\r\n\t\tlet watchableTarget = null;\r\n\t\tconst handler = (event) => {\r\n\t\t\tconst eventTarget = domHelpers.getTargetNode(event);\r\n\t\t\tconst targetNode = domHelpers.closest(eventTarget, config.selector);\r\n\t\t\tif(domHelpers.isChildOf(eventTarget, this.tooltip.getNode())){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tconst doOnMouseEnter = () => {\r\n\t\t\t\twatchableTarget = targetNode;\r\n\t\t\t\tconfig.onmouseenter(event, targetNode);\r\n\t\t\t};\r\n\t\t\t// GS-2377: to show tooltip after touch and hide it when touch is outside the events\r\n\t\t\tif (scheduler._mobile && scheduler.config.touch_tooltip){\r\n\t\t\t\tif(targetNode){\r\n\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tconfig.onmouseleave(event, targetNode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(watchableTarget){\r\n\t\t\t\tif(targetNode && targetNode === watchableTarget){\r\n\t\t\t\t\tconfig.onmousemove(event, targetNode);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconfig.onmouseleave(event, watchableTarget);\r\n\t\t\t\t\twatchableTarget = null;\r\n\r\n\t\t\t\t\tif(targetNode && targetNode !== watchableTarget){\r\n\t\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(targetNode){\r\n\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.detach(config.selector);\r\n\t\tthis._domEvents.attach(root, \"mousemove\", handler);\r\n\t\tthis._listeners[config.selector] = {\r\n\t\t\tnode: root,\r\n\t\t\thandler\r\n\t\t};\r\n\t}\r\n\r\n\tdetach(selector: string): void {\r\n\t\tconst listener = this._listeners[selector];\r\n\t\tif(listener){\r\n\t\t\tthis._domEvents.detach(listener.node, \"mousemove\", listener.handler);\r\n\t\t}\r\n\t}\r\n\r\n\ttooltipFor(config: ITooltipConfig): void {\r\n\t\tconst cloneDomEvent = (event: MouseEvent) => {\r\n\t\t\tlet clone = event;\r\n\t\t\t// making events survive timeout in ie\r\n\t\t\t// tslint:disable-next-line no-string-literal\r\n\t\t\tif(document[\"createEventObject\"] && !document.createEvent){\r\n\t\t\t\t// tslint:disable-next-line no-string-literal\r\n\t\t\t\tclone = document[\"createEventObject\"](event);\r\n\t\t\t}\r\n\t\t\treturn clone;\r\n\t\t};\r\n\t\tthis._initDelayedFunctions();\r\n\t\tthis.attach({\r\n\t\t\tselector: config.selector,\r\n\t\t\tglobal: config.global,\r\n\t\t\tonmouseenter:(event: MouseEvent, node: HTMLElement) => {\r\n\t\t\t\tconst html = config.html(event, node);\r\n\t\t\t\tif(html){\r\n\t\t\t\t\tthis.delayShow(cloneDomEvent(event), html);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonmousemove:(event: MouseEvent, node: HTMLElement) => {\r\n\t\t\t\tconst html = config.html(event, node);\r\n\t\t\t\tif(html){\r\n\t\t\t\t\tthis.delayShow(cloneDomEvent(event), html);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\t\t\tthis.delayHide();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonmouseleave:() => {\r\n\t\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\t\tthis.delayHide();\r\n\t\t\t},\r\n\t\t});\r\n\t}\r\n\r\n\tprivate _initDelayedFunctions(){\r\n\t\tconst scheduler = this._scheduler;\r\n\t\t// reset delayed functions in order to apply current values of tooltip_timeout\r\n\t\tif(this.delayShow){\r\n\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t}\r\n\t\tif(this.delayHide){\r\n\t\t\tthis.delayHide.$cancelTimeout();\r\n\t\t}\r\n\t\tthis.tooltip.hide();\r\n\t\t\r\n\t\tthis.delayShow = (utils as any).default.delay((event: MouseEvent, html: string) => {\r\n\t\t\tif(scheduler.callEvent(\"onBeforeTooltip\", [event]) === false) {\r\n\t\t\t\tthis.tooltip.hide();\r\n\t\t\t} else {\r\n\t\t\t\tthis.tooltip.setContent(html);\r\n\t\t\t\tthis.tooltip.show(event);\r\n\t\t\t}\r\n\t\t}, scheduler.config.tooltip_timeout || 1);\r\n\r\n\t\tthis.delayHide = (utils as any).default.delay(() => {\r\n\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\tthis.tooltip.hide();\r\n\t\t}, scheduler.config.tooltip_hide_timeout || 1);\r\n\t}\r\n\r\n}","import active_links from \"./active_links\";\r\nimport agenda_legacy from \"./agenda_legacy_view\";\r\nimport agenda_view from \"./agenda\";\r\nimport all_timed from \"./all_timed\";\r\nimport collision from \"./collision\";\r\nimport container_autoresize from \"./container_autoresize\";\r\nimport cookie from \"./cookie\";\r\nimport daytimeline_restricted from \"./restricted_extensions/daytimeline\";\r\nimport drag_between_restricted from \"./restricted_extensions/drag_between\";\r\nimport editors from \"./editors\";\r\nimport expand from \"./expand\";\r\nimport grid_view from \"./restricted_extensions/grid_view\";\r\nimport html_templates from \"./html_templates\";\r\nimport key_nav from \"./key_nav\";\r\nimport layer from \"./layer\";\r\nimport limit from \"./limit\";\r\nimport map_view from \"./map_view\";\r\nimport minical from \"./minical\";\r\nimport monthheight from \"./monthheight\";\r\nimport multisection_restricted from \"./restricted_extensions/multisection\";\r\nimport multiselect from \"./multiselect\";\r\nimport multisource from \"./multisource\";\r\nimport mvc from \"./mvc\";\r\nimport outerdrag from \"./outerdrag\";\r\nimport pdf from \"./pdf\";\r\nimport quick_info from \"./quick_info\";\r\nimport readonly from \"./readonly\";\r\nimport recurring from \"./recurring\";\r\nimport recurring_legacy from \"./recurring_legacy\";\r\nimport serialize from \"./serialize\";\r\nimport timeline_restricted from \"./restricted_extensions/timeline\";\r\nimport tooltip from \"./tooltip\";\r\nimport treetimeline_restricted from \"./restricted_extensions/treetimeline\";\r\nimport units_restricted from \"./restricted_extensions/units\";\r\nimport url from \"./url\";\r\nimport week_agenda_restricted from \"./restricted_extensions/week_agenda\";\r\nimport wp from \"./wp\";\r\nimport year_view from \"./year_view\";\r\nimport export_api from \"./export_api\";\r\n\r\nexport default {\r\n\tactive_links,\r\n\tagenda_legacy,\r\n\tagenda_view,\r\n\tall_timed,\r\n\tcollision,\r\n\tcontainer_autoresize,\r\n\tcookie,\r\n\tdaytimeline: daytimeline_restricted,\r\n\tdrag_between: drag_between_restricted,\r\n\teditors,\r\n\texpand,\r\n\texport_api,\r\n\tgrid_view,\r\n\thtml_templates,\r\n\tkey_nav,\r\n\tlayer,\r\n\tlimit,\r\n\tmap_view,\r\n\tminical,\r\n\tmonthheight,\r\n\tmultisection: multisection_restricted,\r\n\tmultiselect,\r\n\tmultisource,\r\n\tmvc,\r\n\touterdrag,\r\n\tpdf,\r\n\tquick_info,\r\n\treadonly,\r\n\trecurring,\r\n\trecurring_legacy,\r\n\tserialize,\r\n\ttimeline: timeline_restricted,\r\n\ttooltip,\r\n\ttreetimeline: treetimeline_restricted,\r\n\tunits: units_restricted,\r\n\turl,\r\n\tweek_agenda: week_agenda_restricted,\r\n\twp,\r\n\tyear_view\r\n};","export default function(scheduler){\r\n\r\nscheduler.config.active_link_view = \"day\";\r\nscheduler._active_link_click = function(e){\r\n\tvar start = e.target;\r\n\tvar to = start.getAttribute(\"data-link-date\");\r\n\tvar s_d = scheduler.date.str_to_date(scheduler.config.api_date, false, true);\r\n\tif (to) {\r\n\t\tscheduler.setCurrentView(s_d(to), scheduler.config.active_link_view);\r\n\t\tif (e && e.preventDefault)\r\n\t\t\te.preventDefault();\r\n\t\treturn false;\r\n\t}\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar do_wrapper = function(key, fullname){\r\n\t\tfullname = fullname || (key+\"_scale_date\");\r\n\r\n\t\tif(!scheduler.templates['_active_links_old_'+ fullname]){\r\n\t\t\tscheduler.templates['_active_links_old_'+ fullname] = scheduler.templates[fullname];\r\n\t\t}\r\n\t\tvar week_x = scheduler.templates['_active_links_old_'+ fullname];\r\n\t\tvar d_s = scheduler.date.date_to_str(scheduler.config.api_date);\r\n\t\tscheduler.templates[fullname] = function(date) {\r\n\t\t\treturn \"\" + week_x(date) + \"\";\r\n\t\t};\r\n\t};\r\n\r\n\tdo_wrapper(\"week\");\r\n\tdo_wrapper(\"\", \"month_day\");\r\n\tif (this.matrix){\r\n\t\tfor (var key in this.matrix)\r\n\t\t\tdo_wrapper(key);\r\n\t}\r\n\r\n\tthis._detachDomEvent(this._obj, \"click\", scheduler._active_link_click);\r\n\tscheduler.event(this._obj, \"click\", scheduler._active_link_click);\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.date.add_agenda_legacy = function(date){\r\n\treturn scheduler.date.add(date, 1, \"year\");\r\n};\r\n\r\nscheduler.templates.agenda_legacy_time = function(start,end,ev){\r\n\tif (ev._timed)\r\n\t\treturn this.day_date(ev.start_date, ev.end_date, ev)+\" \"+this.event_date(start);\r\n\telse\r\n\t\treturn scheduler.templates.day_date(start)+\" – \"+scheduler.templates.day_date(end);\r\n};\r\nscheduler.templates.agenda_legacy_text = function(start,end,event){\r\n\treturn event.text;\r\n};\r\nscheduler.templates.agenda_legacy_date = function(){ return \"\"; };\r\n\r\nscheduler.date.agenda_legacy_start=function(){ return scheduler.date.date_part(scheduler._currentDate()); };\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function() {\r\n\tvar old_dblclick_dhx_cal_data = scheduler.dblclick_dhx_cal_data;\r\n\tscheduler.dblclick_dhx_cal_data = function() {\r\n\t\tif (this._mode == \"agenda_legacy\") {\r\n\t\t\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\t\t\tthis.addEventNow();\r\n\t\t} else {\r\n\t\t\tif (old_dblclick_dhx_cal_data)\r\n\t\t\t\treturn old_dblclick_dhx_cal_data.apply(this, arguments);\r\n\t\t}\r\n\t};\r\n\r\n\r\n\tvar old = scheduler.render_data;\r\n\tscheduler.render_data=function(evs){\r\n\t\tif (this._mode == \"agenda_legacy\")\r\n\t\t\tfill_agenda_tab();\r\n\t\telse\r\n\t\t\treturn old.apply(this,arguments);\r\n\t};\r\n\r\n\tvar old_render_view_data = scheduler.render_view_data;\r\n\tscheduler.render_view_data = function(){\r\n\t\tif(this._mode == \"agenda_legacy\") {\r\n\t\t\tscheduler._agendaScrollTop = scheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop;\r\n\t\t\tscheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop = 0;\r\n\t\t}\r\n\t\treturn old_render_view_data.apply(this,arguments);\r\n\t};\r\n\r\n\r\n\r\n\tfunction set_full_view(mode){\r\n\t\tif (mode){\r\n\t\t\tvar l = scheduler.locale.labels;\r\n\r\n\t\t\tvar rowAttr = scheduler._waiAria.agendaHeadAttrString();\r\n\t\t\tvar dateHeader = scheduler._waiAria.agendaHeadDateString(l.date);\r\n\t\t\tvar descriptionHeader = scheduler._waiAria.agendaHeadDescriptionString(l.description);\r\n\r\n\t\t\tscheduler._els[\"dhx_cal_header\"][0].innerHTML=\"
\" +\r\n\t\t\t\t\"
\"+l.date+\"
\" +\r\n\t\t\t\t\"\"+l.description+\"\" +\r\n\t\t\t\t\"
\";\r\n\t\t\tscheduler._table_view=true;\r\n\t\t\tscheduler.set_sizes();\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fill_agenda_tab(){\r\n\t\t//select events for which data need to be printed\r\n\r\n\t\tvar events = scheduler.get_visible_events();\r\n\t\tevents.sort(function(a,b){ return a.start_date>b.start_date?1:-1;});\r\n\r\n\t\tvar tableAttr = scheduler._waiAria.agendaDataAttrString();\r\n\t\tvar agendaEventAttrString;\r\n\t\t//generate html for the view\r\n\t\tvar html=\"
\";\r\n\t\tfor (var i=0; i
\"+\r\n\t\t\t\t\t(scheduler.config.rtl ? scheduler.templates.agenda_time(ev.end_date,ev.start_date, ev):scheduler.templates.agenda_time(ev.start_date, ev.end_date,ev))+\r\n\t\t\t\t\t\"
\";\r\n\t\t\thtml+=`
\r\n\t\t\t\r\n\t\t\t
`;\r\n\t\t\thtml+=\"\"+scheduler.templates.agenda_text(ev.start_date, ev.end_date, ev)+\"
\";\r\n\t\t}\r\n\t\thtml+=\"
\";\r\n\r\n\t\t//render html\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop = scheduler._agendaScrollTop||0;\r\n\r\n\t\t// setting up dhx_v_border size\r\n\t\tvar agenda_area = scheduler._els[\"dhx_cal_data\"][0].childNodes[0];\r\n\t\tvar v_border = agenda_area.childNodes[agenda_area.childNodes.length-1];\r\n\t\tv_border.style.height = (agenda_area.offsetHeight < scheduler._els[\"dhx_cal_data\"][0].offsetHeight) ? \"100%\" : (agenda_area.offsetHeight+\"px\");\r\n\r\n\t\tvar t=scheduler._els[\"dhx_cal_data\"][0].firstChild.childNodes;\r\n\r\n\t\tvar dateElement = scheduler._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML=scheduler.templates.agenda_date(scheduler._min_date, scheduler._max_date, scheduler._mode);\r\n\t\t}\r\n\r\n\t\tscheduler._rendered=[];\r\n\t\tfor (var i=0; i < t.length-1; i++)\r\n\t\t\tscheduler._rendered[i]=t[i];\r\n\r\n\t}\r\n\r\n\tscheduler.agenda_legacy_view=function(mode){\r\n\t\tscheduler._min_date = scheduler.config.agenda_start||scheduler.date.agenda_legacy_start(scheduler._date);\r\n\t\tscheduler._max_date = scheduler.config.agenda_end||scheduler.date.add_agenda_legacy(scheduler._min_date, 1);\r\n\r\n\t\tset_full_view(mode);\r\n\t\tif (mode){\r\n\t\t\tscheduler._cols = null;\r\n\t\t\tscheduler._colsS = null;\r\n\t\t\tscheduler._table_view = true;\r\n\t\t\t//agenda tab activated\r\n\t\t\tfill_agenda_tab();\r\n\t\t} else {\r\n\t\t\tscheduler._table_view = false;\r\n\t\t\t//agenda tab de-activated\r\n\t\t}\r\n\t};\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.date.add_agenda = function(date, inc){\r\n\t\treturn scheduler.date.add(date, 1*inc, \"month\");\r\n\t};\r\n\t\r\n\tscheduler.templates.agenda_time = function(start,end,ev){\r\n\t\tif (ev._timed){\r\n\t\t\treturn `${this.event_date(start)} - ${this.event_date(end)}`;\r\n\t\t}else{\r\n\t\t\treturn scheduler.locale.labels.full_day;\r\n\t\t}\r\n\t};\r\n\tscheduler.templates.agenda_text = function(start,end,ev){\r\n\t\treturn ev.text;\r\n\t};\r\n\r\n\tconst dayDateToStr = scheduler.date.date_to_str(\"%F %j\");\r\n\tconst dayDowToStr = scheduler.date.date_to_str(\"%l\");\r\n\r\n\tscheduler.templates.agenda_day = function(date){ \r\n\t\treturn `
${dayDateToStr(date)}
\r\n\t\t
${dayDowToStr(date)}
`;\r\n\t};\r\n\tscheduler.templates.agenda_date = function(start, end){ \r\n\t\treturn scheduler.templates.month_date(scheduler.getState().date); \r\n\t};\r\n\t\r\n\tscheduler.date.agenda_start=function(date){\r\n\t\treturn scheduler.date.month_start(new Date(date));\r\n\t};\r\n\r\n\tlet scrollTop = 0;\r\n\t\r\n\tscheduler.attachEvent(\"onTemplatesReady\",function() {\r\n\t\tvar old_dblclick_dhx_cal_data = scheduler.dblclick_dhx_cal_data;\r\n\t\tscheduler.dblclick_dhx_cal_data = function() {\r\n\t\t\tif (this._mode == \"agenda\") {\r\n\t\t\t\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\t\t\t\tthis.addEventNow();\r\n\t\t\t} else {\r\n\t\t\t\tif (old_dblclick_dhx_cal_data)\r\n\t\t\t\t\treturn old_dblclick_dhx_cal_data.apply(this, arguments);\r\n\t\t\t}\r\n\t\t};\r\n\t\r\n\t\r\n\t\tvar old = scheduler.render_data;\r\n\t\tscheduler.render_data=function(evs){\r\n\t\t\tif (this._mode == \"agenda\")\r\n\t\t\t\tfill_agenda_tab();\r\n\t\t\telse\r\n\t\t\t\treturn old.apply(this,arguments);\r\n\t\t};\r\n\t\r\n\t\tvar old_render_view_data = scheduler.render_view_data;\r\n\t\tscheduler.render_view_data = function(){\r\n\t\t\tif(this._mode == \"agenda\") {\r\n\t\t\t\tscrollTop = scheduler._els[\"dhx_cal_data\"][0].scrollTop;\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = 0;\r\n\t\t\t}\r\n\t\t\treturn old_render_view_data.apply(this,arguments);\r\n\t\t};\r\n\r\n\t\tfunction fill_agenda_tab(){\r\n\t\t\tconst events = scheduler.get_visible_events();\r\n\t\t\tevents.sort(function(a,b){ return a.start_date>b.start_date?1:-1;});\r\n\r\n\t\t\tconst eventsInDays = {};\r\n\t\t\tlet currDate = scheduler.getState().min_date;\r\n\t\t\tconst maxDate = scheduler.getState().max_date;\r\n\t\t\twhile(currDate.valueOf() < maxDate.valueOf()){\r\n\t\t\t\teventsInDays[currDate.valueOf()] = [];\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\r\n\t\t\tlet anyEvents = false;\r\n\r\n\t\t\tevents.forEach((ev) => {\r\n\t\t\t\tlet eventStart = scheduler.date.day_start(new Date(ev.start_date)); \r\n\t\t\t\twhile (eventStart.valueOf() < ev.end_date.valueOf()) {\r\n\t\t\t\t\tif (eventsInDays[eventStart.valueOf()]) {\r\n\t\t\t\t\t\teventsInDays[eventStart.valueOf()].push(ev);\r\n\t\t\t\t\t\tanyEvents = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\teventStart = scheduler.date.day_start(scheduler.date.add(eventStart, 1, \"day\"));\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(!anyEvents){\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = renderEmptyView();\r\n\t\t\t}else{\r\n\t\t\t\tlet html = \"\";\r\n\t\t\t\tfor(let day in eventsInDays){\r\n\t\t\t\t\tif(scheduler.ignore_agenda && scheduler.ignore_agenda(new Date(day*1))){\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\thtml += renderDay(new Date(day*1), eventsInDays[day]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = scrollTop;\r\n\t\t\t\r\n\t\t\tlet t = scheduler._els[\"dhx_cal_data\"][0].querySelectorAll(\".dhx_cal_agenda_event_line\");\r\n\t\t\tscheduler._rendered = [];\r\n\t\t\tfor (var i = 0; i < t.length - 1; i++) {\r\n\t\t\t\tscheduler._rendered[i] = t[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\r\n\r\n\t\tfunction renderEmptyView(){\r\n\t\t\treturn `
${scheduler.locale.labels.agenda_tab}
`;\r\n\t\t}\r\n\r\n\t\tfunction renderDay(day, events) {\r\n\t\t\tif(!events.length){\r\n\t\t\t\treturn \"\";\r\n\t\t\t}\r\n\t\t\tlet html = `\r\n
\r\n\t
${scheduler.templates.agenda_day(day)}
\r\n\t
\r\n`;\r\n\r\n\t\t\tevents.forEach((calendarEvent) => {\r\n\t\t\t\thtml += renderOneEvent(day, calendarEvent);\r\n\t\t\t});\r\n\r\n\t\t\thtml += `
`;\r\n\t\t\treturn html;\r\n\t\t}\r\n\r\n\t\tfunction renderOneEvent(day, calendarEvent){\r\n\t\t\tconst dates = scheduler.templates.agenda_time(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\t\t\tconst selectedId = scheduler.getState().select_id;\r\n\t\t\tconst cls = scheduler.templates.event_class(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\t\t\tconst description = scheduler.templates.agenda_text(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\r\n\t\t\tlet style = \"\";\r\n\t\t\tif(calendarEvent.color || calendarEvent.textColor){\r\n\t\t\t\tconst bg = (calendarEvent.color ? (\"--dhx-scheduler-event-background:\" + calendarEvent.color + \";\") : \"\");\r\n\t\t\t\tconst color = (calendarEvent.textColor ? (\"--dhx-scheduler-event-color:\" + calendarEvent.textColor + \";\") : \"\");\r\n\t\t\t\tstyle = ` style=\"${bg}${color}\" `;\r\n\t\t\t}\r\n\r\n\t\t\treturn `
\r\n\t
\r\n\t
${dates}
\r\n\t
${description}
\r\n
`;\r\n\t\t}\r\n\t\r\n\t\tscheduler.agenda_view=function(mode){\r\n\t\t\tif (mode){\r\n\t\t\t\tscheduler._min_date = scheduler.config.agenda_start || scheduler.date.agenda_start(scheduler._date);\r\n\t\t\t\tscheduler._max_date = scheduler.config.agenda_end || scheduler.date.add_agenda(scheduler._min_date, 1);\r\n\t\t\t\tscheduler._cols = null;\r\n\t\t\t\tscheduler._colsS = null;\r\n\t\t\t\tscheduler._table_view = true;\r\n\r\n\t\t\t\tconst dateHeader = scheduler._getNavDateElement();\r\n\t\t\t\tdateHeader.innerHTML = scheduler.templates.agenda_date(scheduler._date);\r\n\t\t\t\t//agenda tab activated\r\n\t\t\t\tfill_agenda_tab();\r\n\t\t\t} else {\r\n\t\t\t\tscheduler._table_view = false;\r\n\t\t\t\t//agenda tab de-activated\r\n\t\t\t}\r\n\t\t};\r\n\t});\r\n\r\n\t// scheduler.attachEvent(\"onEventSelected\", function(id){\r\n\t// \tconst oldSelected = scheduler.$container.querySelectorAll(\".dhx_cal_agenda_event_line_selected\");\r\n\t// \toldSelected.forEach((el) => {\r\n\t// \t\tel.classList.remove(\"dhx_cal_agenda_event_line_selected\");\r\n\t// \t});\r\n\r\n\t// \tconst selected = scheduler.$container.querySelector(`[${scheduler.config.event_attribute}=\"${id}\"]`);\r\n\t// \tif(selected){\r\n\t// \t\tselected.classList.add(\"dhx_cal_agenda_event_line_selected\");\r\n\t// \t}\r\n\t// });\r\n\t\r\n\t\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.config.all_timed = \"short\";\r\n\tscheduler.config.all_timed_month = false;\r\n\r\n\tvar is_event_short = function (ev) {\r\n\t\tif(!((ev.end_date - ev.start_date)/(1000*60*60) >= 24)){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t// short event shouldn't disappear to multiday area during dnd-resize\r\n\t\tif(scheduler._drag_mode == \"resize\" && scheduler._drag_id == ev.id){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn \tfalse;\r\n\t};\r\n\r\n\t// copy of usual events and recurring instances;\r\n\t// regular copy causes problems with recurrings which have series event as a prototype\r\n\tscheduler._safe_copy = function(event){\r\n\t\tvar proto = null,\r\n\t\t\tcopy = scheduler._copy_event(event);\r\n\t\tif(event.event_pid){\r\n\t\t\tproto = scheduler.getEvent(event.event_pid);\r\n\t\t}\r\n\r\n\t\tif (proto && proto.isPrototypeOf(event)) {\r\n\t\t\tdelete copy.event_length;\r\n\t\t\tdelete copy.event_pid;\r\n\t\t\tdelete copy.rec_pattern;\r\n\t\t\tdelete copy.rec_type;\r\n\t\t}\r\n\r\n\t\treturn copy;\r\n\t};\r\n\r\n\tvar old_prerender_events_line = scheduler._pre_render_events_line;\r\n\tvar old_prerender_events_table = scheduler._pre_render_events_table;\r\n\r\n\tvar prerender_events = function (evs, hold) {\r\n\t\tif (!this._table_view) {\r\n\t\t\treturn old_prerender_events_line.call(this, evs, hold);\r\n\t\t}\r\n\r\n\t\treturn old_prerender_events_table.call(this, evs, hold);\r\n\t};\r\n\r\n\tscheduler._pre_render_events_line = scheduler._pre_render_events_table = function(evs, hold){\r\n\t\tif (!this.config.all_timed ||\r\n\t\t\t(this._table_view && this._mode != \"month\") ||\r\n\t\t\t(this._mode == \"month\" && !this.config.all_timed_month))\r\n\t\t\treturn prerender_events.call(this, evs, hold);\r\n\r\n\t\tfor (var i=0; i < evs.length; i++) {\r\n\t\t\tvar ev=evs[i];\r\n\r\n\t\t\tif (ev._timed)\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tif (this.config.all_timed == \"short\") {\r\n\t\t\t\tif (!is_event_short(ev)) {\r\n\t\t\t\t\tif (this._mode != \"month\") {\r\n\t\t\t\t\t\tevs.splice(i--, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar ce = this._safe_copy(ev); // current event (event for one specific day) is copy of original with modified dates\r\n\t\t\tif(!ev._virtual){\r\n\t\t\t\tce._first_chunk = true;\r\n\t\t\t}else{\r\n\t\t\t\tce._first_chunk = false;\r\n\t\t\t}\r\n\t\t\tce._drag_resize = false;\r\n\t\t\tce._virtual = true;\r\n\t\t\tce.start_date = new Date(ce.start_date); // as lame copy doesn't copy date objects\r\n\r\n\t\t\tif (!isOvernightEvent(ev)) {\r\n\t\t\t\tce.end_date = new Date(ev.end_date);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tce.end_date = getNextDay(ce.start_date);\r\n\t\t\t\tif (this.config.last_hour != 24) { // if specific last_hour was set (e.g. 20)\r\n\t\t\t\t\tce.end_date = setDateTime(ce.start_date, this.config.last_hour);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar event_changed = false;\r\n\t\t\tif (ce.start_date < this._max_date && ce.end_date > this._min_date && ce.start_date < ce.end_date) {\r\n\t\t\t\tevs[i] = ce; // adding another event in collection\r\n\t\t\t\tevent_changed = true;\r\n\t\t\t}\r\n\t\t//\tif (ce.start_date > ce.end_date) {\r\n\t\t//\t\tevs.splice(i--,1);\r\n\t\t//\t}\r\n\r\n\t\t\tvar re = this._safe_copy(ev); // remaining event, copy of original with modified start_date (making range more narrow)\r\n\t\t\tre._virtual = true;\r\n\t\t\tre.end_date = new Date(re.end_date);\r\n\t\t\tif (re.start_date < this._min_date)\r\n\t\t\t\tre.start_date = setDateTime(this._min_date, this.config.first_hour);// as we are starting only with whole hours\r\n\t\t\telse\r\n\t\t\t\tre.start_date = setDateTime(getNextDay(ev.start_date), this.config.first_hour);\r\n\r\n\t\t\tif (re.start_date < this._max_date && re.start_date < re.end_date) {\r\n\t\t\t\tif (event_changed){\r\n\t\t\t\t\tevs.splice(i+1,0,re);//insert part\r\n\t\t\t\t}else {\r\n\t\t\t\t\tevs[i--] = re;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tre._last_chunk = false;\r\n\t\t\t}else{\r\n\t\t\t\tce._last_chunk = true;\r\n\t\t\t\tce._drag_resize = true;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// in case of all_timed pre_render is not applied to the original event\r\n\t\t// so we need to force redraw in case of dnd\r\n\t\tvar redraw = (this._drag_mode == 'move')?false:hold;\r\n\t\treturn prerender_events.call(this, evs, redraw);\r\n\r\n\r\n\t\tfunction isOvernightEvent(ev){\r\n\t\t\tvar next_day = getNextDay(ev.start_date);\r\n\t\t\treturn (+ev.end_date > +next_day);\r\n\t\t}\r\n\t\tfunction getNextDay(date){\r\n\t\t\tvar next_day = scheduler.date.add(date, 1, \"day\");\r\n\t\t\tnext_day = scheduler.date.date_part(next_day);\r\n\t\t\treturn next_day;\r\n\t\t}\r\n\t\tfunction setDateTime(date, hours){\r\n\t\t\tvar val = scheduler.date.date_part(new Date(date));\r\n\t\t\tval.setHours(hours);\r\n\t\t\treturn val;\r\n\t\t}\r\n\t};\r\n\tvar old_get_visible_events = scheduler.get_visible_events;\r\n\tscheduler.get_visible_events = function(only_timed){\r\n\t\tif (!(this.config.all_timed && this.config.multi_day))\r\n\t\t\treturn old_get_visible_events.call(this, only_timed);\r\n\t\treturn old_get_visible_events.call(this, false); // only timed = false\r\n\t};\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function (old_mode, old_date, mode, date) {\r\n\t\tscheduler._allow_dnd = (mode == \"day\" || mode == \"week\" || scheduler.getView(mode));\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler._is_main_area_event = function(ev){\r\n\t\treturn !!(ev._timed || this.config.all_timed === true || (this.config.all_timed == \"short\" && is_event_short(ev)) );\r\n\t};\r\n\r\n\tvar oldUpdate = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id){\r\n\t\t// full redraw(update_render=true) messes events order while dnd.\r\n\t\t// individual redraw(update_render=false) of multiday event, which happens on select/unselect, expands event to full width of the cell and can be fixes only with full redraw.\r\n\t\t// so for now full redraw is always enabled for not-dnd updates\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tvar fullRedrawNeeded;\r\n\t\tvar initial;\r\n\t\tif(ev) {\r\n\t\t\tfullRedrawNeeded = (scheduler.config.all_timed && !(scheduler.isOneDayEvent(scheduler._events[id]) || scheduler.getState().drag_id));\r\n\t\t\tif (fullRedrawNeeded) {\r\n\t\t\t\tinitial = scheduler.config.update_render;\r\n\t\t\t\tscheduler.config.update_render = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\toldUpdate.apply(scheduler, arguments);\r\n\r\n\t\tif(ev) {\r\n\t\t\tif (fullRedrawNeeded) {\r\n\t\t\t\tscheduler.config.update_render = initial;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\r\nvar temp_section;\r\nvar before;\r\n\r\nscheduler.config.collision_limit = 1;\r\n\r\nfunction _setTempSection(event_id) { // for custom views (matrix, timeline, units)\r\n\tvar checked_mode = scheduler._get_section_view();\r\n\tif(checked_mode && event_id){\r\n\t\ttemp_section = scheduler.getEvent(event_id)[scheduler._get_section_property()];\r\n\t}\r\n}\r\n\r\nscheduler.attachEvent(\"onBeforeDrag\",function(id){\r\n\t_setTempSection(id);\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onBeforeLightbox\",function(id){\r\n\tvar ev = scheduler.getEvent(id);\r\n\tbefore = [ev.start_date, ev.end_date];\r\n\t_setTempSection(id);\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventChanged\",function(id){\r\n\tif (!id || !scheduler.getEvent(id)) return true;\r\n\tvar ev = scheduler.getEvent(id);\r\n\tif (!scheduler.checkCollision(ev)){\r\n\t\tif (!before) return false;\r\n\t\tev.start_date = before[0];\r\n\t\tev.end_date = before[1];\r\n\t\tev._timed=this.isOneDayEvent(ev);\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onBeforeEventChanged\",function(ev,e,is_new){\r\n\treturn scheduler.checkCollision(ev);\r\n});\r\nscheduler.attachEvent(\"onEventAdded\",function(id,ev) {\r\n\tvar result = scheduler.checkCollision(ev);\r\n\tif (!result)\r\n\t\tscheduler.deleteEvent(id);\r\n});\r\nscheduler.attachEvent(\"onEventSave\",function(id, edited_ev, is_new){\r\n\tedited_ev = scheduler._lame_clone(edited_ev);\r\n\tedited_ev.id = id;\r\n\r\n\t//lightbox may not have 'time' section\r\n\tif(!(edited_ev.start_date && edited_ev.end_date)){\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tedited_ev.start_date = new Date(ev.start_date);\r\n\t\tedited_ev.end_date = new Date(ev.end_date);\r\n\t}\r\n\r\n\tif((edited_ev.rrule && !edited_ev.recurring_event_id) || edited_ev.rec_type){\r\n\t\tscheduler._roll_back_dates(edited_ev);\r\n\t}\r\n\treturn scheduler.checkCollision(edited_ev); // in case user creates event on one date but then edited it another\r\n});\r\n\r\nscheduler._check_sections_collision = function(first, second){\r\n\tvar map_to = scheduler._get_section_property();\r\n\tif (first[map_to] == second[map_to] && first.id != second.id)\r\n\t\treturn true;\r\n\treturn false;\r\n};\r\n\r\nscheduler.checkCollision = function(ev) {\r\n\tvar evs = [];\r\n\tvar collision_limit = scheduler.config.collision_limit;\r\n\r\n\tif (ev.rrule || ev.rec_type) {\r\n\t\tvar evs_dates = scheduler.getRecDates(ev);\r\n\t\tfor(var k=0; k= collision_limit) {\r\n\r\n\t\t\tsingle = false;\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tif ( evs.length >= collision_limit )\r\n\t\t\tsingle = false;\r\n\t}\r\n\tif (!single) {\r\n\t\tvar res = !scheduler.callEvent(\"onEventCollision\",[ev,evs]);\r\n\t\tif (!res) {\r\n\t\t\tev[map_to] = temp_section||ev[map_to]; // from _setTempSection for custom views\r\n\t\t}\r\n\t\treturn res;\r\n\t}\r\n\treturn single;\r\n\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.config.container_autoresize = true;\r\n\tscheduler.config.month_day_min_height = 90;\r\n\tscheduler.config.min_grid_size = 25;\r\n\tscheduler.config.min_map_size = 400;\r\n\r\n\tvar old_pre_render_event = scheduler._pre_render_events;\r\n\r\n\t//need for temporary disabling without modifying public config\r\n\tvar active = true;\r\n\tvar total_height = 0;\r\n\tvar multiday_height = 0;\r\n\r\n\tscheduler._pre_render_events = function(evs, hold) {\r\n\t\tif (!(scheduler.config.container_autoresize && active)) {\r\n\t\t\treturn old_pre_render_event.apply(this, arguments);\r\n\t\t}\r\n\r\n\t\tvar hb = this.xy.bar_height;\r\n\t\tvar h_old = this._colsS.heights;\r\n\t\tvar h = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0];\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tif (!this._table_view)\r\n\t\t\tevs = this._pre_render_events_line(evs, hold); //ignore long events for now\r\n\t\telse\r\n\t\t\tevs = this._pre_render_events_table(evs, hold);\r\n\r\n\t\tif (this._table_view) {\r\n\t\t\tif (hold){\r\n\t\t\t\tthis._colsS.heights = h_old;\r\n\t\t\t} else {\r\n\t\t\t\tvar evl = data.firstChild;\r\n\t\t\t\tconst rows = evl.querySelectorAll(\".dhx_cal_month_row\");\r\n\t\t\t\tif (rows && rows.length) {\r\n\t\t\t\t\tfor (var i = 0; i < rows.length; i++) {\r\n\t\t\t\t\t\th[i]++;\r\n\r\n\t\t\t\t\t\tif ((h[i]) * hb > this._colsS.height - this.xy.month_head_height) { // 22 - height of cell's header\r\n\t\t\t\t\t\t\t//we have overflow, update heights\r\n\t\t\t\t\t\t\tvar cells = rows[i].querySelectorAll(\".dhx_cal_month_cell\");\r\n\r\n\t\t\t\t\t\t\tvar cHeight = this._colsS.height - this.xy.month_head_height;\r\n\t\t\t\t\t\t\tif(this.config.max_month_events*1 !== this.config.max_month_events || h[i] <= this.config.max_month_events){\r\n\t\t\t\t\t\t\t\tcHeight = h[i] * hb;\r\n\t\t\t\t\t\t\t}else if( (this.config.max_month_events + 1) * hb > this._colsS.height - this.xy.month_head_height){\r\n\t\t\t\t\t\t\t\tcHeight = (this.config.max_month_events + 1) * hb;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\trows[i].style.height = (cHeight + this.xy.month_head_height) + \"px\";\r\n\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\tfor (var j = 0; j < cells.length; j++) {\r\n\t\t\t\t\t\t\t\tcells[j].childNodes[1].style.height = cHeight + \"px\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\th[i] = (h[i - 1] || 0) + cells[0].offsetHeight;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\th[i] = (h[i - 1] || 0) + rows[i].querySelectorAll(\".dhx_cal_month_cell\")[0].offsetHeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t\th.unshift(0);\r\n\t\t\t\t\tif (evl.parentNode.offsetHeight < evl.parentNode.scrollHeight && !evl._h_fix) {\r\n\t\t\t\t\t\t//we have v-scroll, decrease last day cell\r\n\r\n\t\t\t\t\t\t// NO CHECK SHOULD BE MADE ON VERTICAL SCROLL\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!evs.length && this._els[\"dhx_multi_day\"][0].style.visibility == \"visible\")\r\n\t\t\t\t\t\th[0] = -1;\r\n\t\t\t\t\tif (evs.length || h[0] == -1) {\r\n\t\t\t\t\t\t//shift days to have space for multiday events\r\n\t\t\t\t\t\t//var childs = evl.parentNode.childNodes;\r\n\t\t\t\t\t\tvar dh = ((h[0] + 1) * hb + 1); // +1 so multiday events would have 2px from top and 2px from bottom by default\r\n\t\t\t\t\t\tif(multiday_height != dh + 1) {\r\n\t\t\t\t\t\t\tthis._obj.style.height = (total_height - multiday_height + dh - 1) + \"px\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tdh += \"px\";\r\n\t\t\t\t\t\tconst navHeight = this._els[\"dhx_cal_navline\"][0].offsetHeight;\r\n\t\t\t\t\t\tconst headerHeight = this._els[\"dhx_cal_header\"][0].offsetHeight;\r\n\t\t\t\t\t\tdata.style.height = (this._obj.offsetHeight - navHeight - headerHeight - (this.xy.margin_top || 0)) + 'px';\r\n\t\t\t\t\t\tvar last = this._els[\"dhx_multi_day\"][0];\r\n\t\t\t\t\t\tlast.style.height = dh;\r\n\t\t\t\t\t\tlast.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\t\tlast.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\t\t\t\t\t\tlast = this._els[\"dhx_multi_day\"][1];\r\n\t\t\t\t\t\tlast.style.height = dh;\r\n\t\t\t\t\t\tlast.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\t\tlast.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\r\n\t\t\t\t\t\tlast.className = h[0] ? \"dhx_multi_day_icon\" : \"dhx_multi_day_icon_small\";\r\n\t\t\t\t\t\tthis._dy_shift = (h[0] + 1) * hb;\r\n\t\t\t\t\t\th[0] = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn evs;\r\n\t};\r\n\r\n\tvar checked_divs = [\"dhx_cal_navline\", \"dhx_cal_header\", \"dhx_multi_day\", \"dhx_cal_data\"];\r\n\tvar updateContainterHeight = function(is_repaint) {\r\n\t\ttotal_height = 0;\r\n\t\tfor (var i = 0; i < checked_divs.length; i++) {\r\n\r\n\t\t\tvar className = checked_divs[i];\r\n\t\t\tvar checked_div = (scheduler._els[className]) ? scheduler._els[className][0] : null;\r\n\t\t\tvar height = 0;\r\n\t\t\tswitch (className) {\r\n\t\t\t\tcase \"dhx_cal_navline\":\r\n\t\t\t\tcase \"dhx_cal_header\":\r\n\t\t\t\t\theight = checked_div.offsetHeight;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"dhx_multi_day\":\r\n\t\t\t\t\theight = (checked_div) ? checked_div.offsetHeight - 1 : 0;\r\n\t\t\t\t\tmultiday_height = height;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"dhx_cal_data\":\r\n\t\t\t\t\tvar mode = scheduler.getState().mode;\r\n\r\n\t\t\t\t\tif(checked_div.childNodes[1] && mode != \"month\") {\r\n\t\t\t\t\t\tlet maxHeight = 0;\r\n\t\t\t\t\t\tfor(let i = 0; i < checked_div.childNodes.length; i++){\r\n\t\t\t\t\t\t\tif(checked_div.childNodes[i].offsetHeight > maxHeight){\r\n\t\t\t\t\t\t\t\tmaxHeight = checked_div.childNodes[i].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\theight = maxHeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\theight = Math.max(checked_div.offsetHeight - 1, checked_div.scrollHeight);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (mode == \"month\") {\r\n\t\t\t\t\t\tif (scheduler.config.month_day_min_height && !is_repaint) {\r\n\t\t\t\t\t\t\tvar rows_length = checked_div.querySelectorAll(\".dhx_cal_month_row\").length;\r\n\t\t\t\t\t\t\theight = rows_length * scheduler.config.month_day_min_height;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (is_repaint) {\r\n\t\t\t\t\t\t\tchecked_div.style.height = height + \"px\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (mode == \"year\"){\r\n\t\t\t\t\t\theight = 190 * scheduler.config.year_y;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(mode == \"agenda\"){\r\n\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\tif(checked_div.childNodes && checked_div.childNodes.length){\r\n\t\t\t\t\t\t\tfor(var j = 0; j < checked_div.childNodes.length; j++){\r\n\t\t\t\t\t\t\t\theight += checked_div.childNodes[j].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(height + 2 < scheduler.config.min_grid_size){\r\n\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (mode == \"week_agenda\"){\r\n\t\t\t\t\t\tvar min_height = scheduler.xy.week_agenda_scale_height + scheduler.config.min_grid_size,\r\n\t\t\t\t\t\t\tcur_height;\r\n\r\n\t\t\t\t\t\tvar column;\r\n\t\t\t\t\t\tfor(var k = 0; k < checked_div.childNodes.length; k++){\r\n\t\t\t\t\t\t\tcolumn = checked_div.childNodes[k];\r\n\t\t\t\t\t\t\tfor(var j = 0; j < column.childNodes.length; j++) {\r\n\t\t\t\t\t\t\t\tvar innerHeight = 0,\r\n\t\t\t\t\t\t\t\t\teventsContainer = column.childNodes[j].childNodes[1];\r\n\r\n\t\t\t\t\t\t\t\tfor(var g =0; g < eventsContainer.childNodes.length; g++){\r\n\t\t\t\t\t\t\t\t\tinnerHeight += eventsContainer.childNodes[g].offsetHeight;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tcur_height = innerHeight + scheduler.xy.week_agenda_scale_height;\r\n\t\t\t\t\t\t\t\tcur_height = (k == 1 && (j == 2 || j == 3)) ? cur_height * 2 : cur_height; // for last two cells;\r\n\r\n\t\t\t\t\t\t\t\tif (cur_height > min_height) {\r\n\t\t\t\t\t\t\t\t\tmin_height = cur_height;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\theight = min_height * 3;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(mode == \"map\") {\r\n\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\tvar evs = checked_div.querySelectorAll(\".dhx_map_line\");\r\n\r\n\t\t\t\t\t\tfor (var j = 0; j < evs.length; j++) {\r\n\t\t\t\t\t\t\theight += evs[j].offsetHeight;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (height + 2 < scheduler.config.min_map_size) {\r\n\t\t\t\t\t\t\theight = scheduler.config.min_map_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(scheduler._gridView) {\r\n\t\t\t\t\t\theight = 0;\r\n\r\n\t\t\t\t\t\tif (checked_div.childNodes[1].childNodes[0].childNodes && checked_div.childNodes[1].childNodes[0].childNodes.length) {\r\n\t\t\t\t\t\t\tvar evs = checked_div.childNodes[1].childNodes[0].childNodes[0].childNodes;\r\n\r\n\t\t\t\t\t\t\tfor (var j = 0; j < evs.length; j++) {\r\n\t\t\t\t\t\t\t\theight += evs[j].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\theight += 2;\r\n\r\n\t\t\t\t\t\t\tif(height < scheduler.config.min_grid_size){\r\n\t\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (scheduler.matrix && scheduler.matrix[mode]) {\r\n\t\t\t\t\t\tif (is_repaint) {\r\n\t\t\t\t\t\t\theight += 0;\r\n\t\t\t\t\t\t\tchecked_div.style.height = height + \"px\";\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\t\tvar cfg = scheduler.matrix[mode];\r\n\t\t\t\t\t\t\tvar rows = cfg.y_unit;\r\n\t\t\t\t\t\t\tfor(var r=0; r < rows.length; r++){\r\n\t\t\t\t\t\t\t\theight += cfg.getSectionHeight(rows[r].key);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// Check and add extra height to avoid events hiding by the horizontal scrollbar\r\n\t\t\t\t\t\t\tif(scheduler.$container.clientWidth != scheduler.$container.scrollWidth){\r\n\t\t\t\t\t\t\t\theight += getScrollSize();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\theight -= 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (mode == \"day\" || mode == \"week\" || (scheduler._props && scheduler._props[mode])) {\r\n\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\theight += 1;\r\n\t\t\ttotal_height += height;\r\n\t\t}\r\n\t\tscheduler._obj.style.height = (total_height) + \"px\";\r\n\r\n\t\tif (!is_repaint)\r\n\t\t\tscheduler.updateView();\r\n\t};\r\n\r\n\tfunction callUpdate(){\r\n\t\tactive = false;\r\n\t\tscheduler.callEvent(\"onAfterSchedulerResize\", []);\r\n\t\tactive = true;\r\n\t}\r\n\r\n\tvar conditionalUpdateContainerHeight = function() {\r\n\t\tif(!(scheduler.config.container_autoresize && active))\r\n\t\t\treturn true;\r\n\r\n\t\tvar mode = scheduler.getState().mode;\r\n\r\n\t\tif(!mode) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tvar asyncRepaint = window.requestAnimationFrame || window.setTimeout;\r\n\t\tvar scrollTop = document.documentElement.scrollTop;\r\n\r\n\t\tasyncRepaint(function() {\r\n\t\t\tif(scheduler.$destroyed || !scheduler.$initialized){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tupdateContainterHeight();\r\n\t\t});\r\n\r\n\t\tif ( (scheduler.matrix && scheduler.matrix[mode]) || mode == \"month\") {\r\n\t\t\tasyncRepaint(function() {\r\n\t\t\t\tif(scheduler.$destroyed || !scheduler.$initialized){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tupdateContainterHeight(true);\r\n\t\t\t\tdocument.documentElement.scrollTop = scrollTop;\r\n\t\t\t\tcallUpdate();\r\n\t\t\t}, 1);\r\n\t\t}else{\r\n\t\t\tcallUpdate();\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function(){\r\n\t\tvar autosizeEnabled = scheduler.config.container_autoresize;\r\n\t\tif(!scheduler.xy.$original_scroll_width){\r\n\t\t\tscheduler.xy.$original_scroll_width = scheduler.xy.scroll_width;\r\n\t\t}\r\n\r\n\t\tscheduler.xy.scroll_width = autosizeEnabled ? 0 : scheduler.xy.$original_scroll_width;\r\n\r\n\t\tif(scheduler.matrix){\r\n\t\t\tfor(var i in scheduler.matrix){\r\n\t\t\t\tvar timeline = scheduler.matrix[i];\r\n\t\t\t\tif(!timeline.$original_section_autoheight){\r\n\t\t\t\t\ttimeline.$original_section_autoheight = timeline.section_autoheight;\r\n\t\t\t\t}\r\n\t\t\t\tif(autosizeEnabled){\r\n\t\t\t\t\ttimeline.section_autoheight = false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\ttimeline.section_autoheight = timeline.$original_section_autoheight;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onXLE\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventChanged\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventCreated\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventAdded\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventDeleted\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onAfterSchedulerResize\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onClearAll\", conditionalUpdateContainerHeight);\r\n\r\n\t//disable container autoresize when expanded\r\n\tscheduler.attachEvent(\"onBeforeExpand\", function(){\r\n\t\tactive = false;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeCollapse\", function(){\r\n\t\tactive = true;\r\n\t\treturn true;\r\n\t});\r\n\t// helper function\r\n\tfunction getScrollSize() {\r\n\t\tvar div = document.createElement(\"div\");\r\n\t\tdiv.style.cssText = \"visibility:hidden;position:absolute;left:-1000px;width:100px;padding:0px;margin:0px;height:110px;min-height:100px;overflow-y:scroll;\";\r\n\r\n\t\tdocument.body.appendChild(div);\r\n\t\tvar size = div.offsetWidth - div.clientWidth;\r\n\t\tdocument.body.removeChild(div);\r\n\t\treturn size;\r\n\t}\r\n\r\n\r\n}","export default function(scheduler){\r\n\tfunction setCookie(name,cookie_param,value) {\r\n\t\tvar str = name + \"=\" + value + (cookie_param?(\"; \"+cookie_param):\"\");\r\n\t\tdocument.cookie = str;\r\n\t}\r\n\tfunction getCookie(name) {\r\n\t\tvar search = name + \"=\";\r\n\t\tif (document.cookie.length > 0) {\r\n\t\t\tvar offset = document.cookie.indexOf(search);\r\n\t\t\tif (offset != -1) {\r\n\t\t\t\toffset += search.length;\r\n\t\t\t\tvar end = document.cookie.indexOf(\";\", offset);\r\n\t\t\t\tif (end == -1)\r\n\t\t\t\t\tend = document.cookie.length;\r\n\t\t\t\treturn document.cookie.substring(offset, end);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}\r\n\r\n\tfunction getCookieName(scheduler) {\r\n\t\treturn (scheduler._obj.id || \"scheduler\") + \"_settings\";\r\n\t}\r\n\r\n\tvar first = true;\r\n\tscheduler.attachEvent(\"onBeforeViewChange\",function(oldMode,oldDate,mode,date){\r\n\t\t// if Url plugin is enabled - explicit url values should have more priority than cookies\r\n\t\tif (first && scheduler._get_url_nav){\r\n\t\t\tvar urlNavigationPlugin = scheduler._get_url_nav();\r\n\t\t\tif(urlNavigationPlugin.date || urlNavigationPlugin.mode || urlNavigationPlugin.event){\r\n\t\t\t\tfirst = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar cookie = getCookieName(scheduler);\r\n\r\n\t\tif (first){\r\n\t\t\tfirst = false;\r\n\t\t\tvar schedulerCookie = getCookie(cookie);\r\n\t\t\tif (schedulerCookie){\r\n\r\n\t\t\t\tif(!scheduler._min_date){\r\n\t\t\t\t\t//otherwise scheduler will have incorrect date until timeout\r\n\t\t\t\t\t//it can cause js error with 'onMouseMove' handler of key_nav.js\r\n\t\t\t\t\tscheduler._min_date = date;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tschedulerCookie = unescape(schedulerCookie).split(\"@\");\r\n\t\t\t\tschedulerCookie[0] = this._helpers.parseDate(schedulerCookie[0]);\r\n\t\t\t\tvar view = this.isViewExists(schedulerCookie[1]) ? schedulerCookie[1] : mode,\r\n\t\t\t\t\tdate = !isNaN(+schedulerCookie[0]) ? schedulerCookie[0] : date;\r\n\r\n\t\t\t\twindow.setTimeout(function(){\r\n\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tscheduler.setCurrentView(date,view);\r\n\t\t\t\t},1);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", function (newMode , newDate){\r\n\t\tvar cookie = getCookieName(scheduler);\r\n\t\tvar text = escape(this._helpers.formatDate(newDate)+\"@\"+(newMode));\r\n\t\tsetCookie(cookie,\"expires=Sun, 31 Jan 9999 22:00:00 GMT\",text);\r\n\t});\r\n\r\n\t// As we are blocking first render above there could be a problem in case of dynamic loading and rendering of visible data in general ('from'/'to' won't be defined)\r\n\tvar old_load = scheduler._load;\r\n\tscheduler._load = function() {\r\n\t\tvar args = arguments;\r\n\r\n\t\tif (!scheduler._date) {\r\n\t\t\tvar that = this;\r\n\t\t\twindow.setTimeout(function() {\r\n\t\t\t\told_load.apply(that, args);\r\n\t\t\t},1);\r\n\t\t} else {\r\n\t\t\told_load.apply(this, args);\r\n\t\t}\r\n\t};\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Day Timeline\", scheduler.assert);\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Drag Between\", scheduler.assert);\r\n}","export default function(scheduler){\r\n/* global dhtmlXCombo */\r\nscheduler.form_blocks['combo']={\r\n\trender:function(sns) {\r\n\t\tif (!sns.cached_options)\r\n\t\t\tsns.cached_options = {};\r\n\t\tvar res = '';\r\n\t\tres += \"
\";\r\n\t\treturn res;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\t(function(){\r\n\t\t\tresetCombo();\r\n\t\t\tvar id = scheduler.attachEvent(\"onAfterLightbox\",function(){\r\n\t\t\t\t// otherwise destructor will never be called after form reset(e.g. in readonly event mode)\r\n\t\t\t\tresetCombo();\r\n\t\t\t\tscheduler.detachEvent(id);\r\n\t\t\t});\r\n\t\t\tfunction resetCombo(){\r\n\t\t\t\tif(node._combo && node._combo.DOMParent) {\r\n\t\t\t\t\tvar combo = node._combo;\r\n\t\t\t\t\tif(combo.unload){\r\n\t\t\t\t\t\tcombo.unload();\r\n\t\t\t\t\t}else if(combo.destructor){\r\n\t\t\t\t\t\tcombo.destructor();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// dhtmlxCombo 4.1.0 bug\r\n\t\t\t\t\tcombo.DOMParent = combo.DOMelem = null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})();\r\n\t\twindow.dhx_globalImgPath = config.image_path||'/';\r\n\t\tnode._combo = new dhtmlXCombo(node, config.name, node.offsetWidth-8);\r\n\t\tif (config.onchange)\r\n\t\t\tnode._combo.attachEvent(\"onChange\", config.onchange);\r\n\r\n\t\tif (config.options_height)\r\n\t\t\tnode._combo.setOptionHeight(config.options_height);\r\n\t\tvar combo = node._combo;\r\n\t\tcombo.enableFilteringMode(config.filtering, config.script_path||null, !!config.cache);\r\n\r\n\t\tif (!config.script_path) { // script-side filtration is used\r\n\t\t\tvar all_options = [];\r\n\t\t\tfor (var i = 0; i < config.options.length; i++) {\r\n\t\t\t\tvar option = config.options[i];\r\n\t\t\t\tvar single_option = [\r\n\t\t\t\t\toption.key,\r\n\t\t\t\t\toption.label,\r\n\t\t\t\t\toption.css\r\n\t\t\t\t];\r\n\t\t\t\tall_options.push(single_option);\r\n\t\t\t}\r\n\t\t\tcombo.addOption(all_options);\r\n\t\t\tif (ev[config.map_to]) {\r\n\t\t\t\tvar index = combo.getIndexByValue(ev[config.map_to]);\r\n\t\t\t\tcombo.selectOption(index);\r\n\t\t\t}\r\n\t\t} else { // server-side filtration is used\r\n\t\t\tvar selected_id = ev[config.map_to];\r\n\t\t\tif (selected_id) {\r\n\t\t\t\tif (config.cached_options[selected_id]) {\r\n\t\t\t\t\tcombo.addOption(selected_id, config.cached_options[selected_id]);\r\n\t\t\t\t\tcombo.disable(1);\r\n\t\t\t\t\tcombo.selectOption(0);\r\n\t\t\t\t\tcombo.disable(0);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tscheduler.ajax.get(config.script_path+\"?id=\"+selected_id+\"&uid=\"+scheduler.uid(), function(result){\r\n\t\t\t\t\t\tvar responseText = result.xmlDoc.responseText;\r\n\t\t\t\t\t\tvar label;\r\n\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\tvar res = JSON.parse(responseText);\r\n\t\t\t\t\t\t\tlabel = res.options[0].text;\r\n\t\t\t\t\t\t}catch(e){\r\n\t\t\t\t\t\t\tvar option = scheduler.ajax.xpath(\"//option\", result.xmlDoc)[0];\r\n\t\t\t\t\t\t\tlabel = option.childNodes[0].nodeValue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tconfig.cached_options[selected_id] = label;\r\n\t\t\t\t\t\tcombo.addOption(selected_id, label);\r\n\t\t\t\t\t\tcombo.disable(1);\r\n\t\t\t\t\t\tcombo.selectOption(0);\r\n\t\t\t\t\t\tcombo.disable(0);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tcombo.setComboValue(\"\");\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config) {\r\n\t\tvar selected_id = node._combo.getSelectedValue(); // value = key\r\n\t\tif (config.script_path) {\r\n\t\t\tconfig.cached_options[selected_id] = node._combo.getSelectedText();\r\n\t\t}\r\n\t\treturn selected_id;\r\n\t},\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\nscheduler.form_blocks['radio']={\r\n\trender:function(sns) {\r\n\t\tvar res = '';\r\n\t\tres += `
`;\r\n\t\tfor (var i=0; i\"+\" \"+sns.options[i].label+\"\";\r\n\t\t}\r\n\t\tres += \"
\";\r\n\r\n\t\treturn res;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\tvar radiobuttons = node.getElementsByTagName('input');\r\n\t\tfor (var i = 0; i < radiobuttons.length; i++) {\r\n\t\t\tradiobuttons[i].checked = false;\r\n\t\t\tvar checked_value = ev[config.map_to]||value;\r\n\t\t\tif (radiobuttons[i].value == checked_value) {\r\n\t\t\t\tradiobuttons[i].checked = true;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tvar radiobuttons = node.getElementsByTagName('input');\r\n\t\tfor(var i=0; i
';\r\n\t\telse\r\n\t\t\treturn '';\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\tnode=scheduler._lightbox.querySelector(`#${config.id}`);\r\n\t\tvar id = scheduler.uid();\r\n\t\tvar isChecked = (typeof config.checked_value != \"undefined\") ? value == config.checked_value : !!value;\r\n\t\tnode.className += \" dhx_cal_checkbox\";\r\n\t\tvar check_html = \"\";\r\n\t\tvar label_html = \"\";\r\n\t\tif (scheduler.config.wide_form){\r\n\t\t\tnode.innerHTML = label_html;\r\n\t\t\tnode.nextSibling.innerHTML=check_html;\r\n\t\t} else\r\n\t\t\tnode.innerHTML=check_html+label_html;\r\n\r\n\t\tif (config.handler) {\r\n\t\t\tvar checkbox = node.getElementsByTagName('input')[0];\r\n\t\t\tif(checkbox.$_eventAttached){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tcheckbox.$_eventAttached = true;\r\n\t\t\tscheduler.event(checkbox, \"click\", config.handler);\r\n\t\t\t//checkbox.onclick = config.handler;\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tnode=scheduler._lightbox.querySelector(`#${config.id}`);\r\n\t\tvar checkbox = node.getElementsByTagName('input')[0]; // moved to the header\r\n\t\tif (!checkbox)\r\n\t\t\tcheckbox = node.nextSibling.getElementsByTagName('input')[0];\r\n\t\treturn (checkbox.checked)?(config.checked_value||true):(config.unchecked_value||false);\r\n\t},\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.ext.fullscreen = {\r\n\ttoggleIcon: null\r\n};\r\n\r\nscheduler.expand = function() {\r\n\tif(!scheduler.callEvent(\"onBeforeExpand\", []))\r\n\t\treturn;\r\n\tvar t = scheduler._obj;\r\n\tdo {\r\n\t\tt._position = t.style.position || \"\";\r\n\t\tt.style.position = \"static\";\r\n\t} while ((t = t.parentNode) && t.style);\r\n\tt = scheduler._obj;\r\n\tt.style.position = \"absolute\";\r\n\tt._width = t.style.width;\r\n\tt._height = t.style.height;\r\n\tt.style.width = t.style.height = \"100%\";\r\n\tt.style.top = t.style.left = \"0px\";\r\n\r\n\tvar top = document.body;\r\n\ttop.scrollTop = 0;\r\n\r\n\ttop = top.parentNode;\r\n\tif (top)\r\n\t\ttop.scrollTop = 0;\r\n\tdocument.body._overflow = document.body.style.overflow || \"\";\r\n\tdocument.body.style.overflow = \"hidden\";\r\n\tscheduler._maximize();\r\n\tscheduler.callEvent(\"onExpand\", []);\r\n};\r\nscheduler.collapse = function() {\r\n\tif(!scheduler.callEvent(\"onBeforeCollapse\", []))\r\n\t\treturn;\r\n\tvar t = scheduler._obj;\r\n\tdo {\r\n\t\tt.style.position = t._position;\r\n\t} while ((t = t.parentNode) && t.style);\r\n\tt = scheduler._obj;\r\n\tt.style.width = t._width;\r\n\tt.style.height = t._height;\r\n\tdocument.body.style.overflow = document.body._overflow;\r\n\tscheduler._maximize();\r\n\tscheduler.callEvent(\"onCollapse\", []);\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar t = document.createElement(\"div\");\r\n\tt.className = \"dhx_expand_icon\";\r\n\tscheduler.ext.fullscreen.toggleIcon = t;\r\n\tt.innerHTML = `\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t`;\r\n\tscheduler._obj.appendChild(t);\r\n\tscheduler.event(t, \"click\", function() {\r\n\t\tif (!scheduler.expanded)\r\n\t\t\tscheduler.expand(); else\r\n\t\t\tscheduler.collapse();\r\n\t});\r\n});\r\nscheduler._maximize = function() {\r\n\tthis.expanded = !this.expanded;\r\n\tif(this.expanded){\r\n\t\tthis.ext.fullscreen.toggleIcon.classList.add(\"dhx_expand_icon--expanded\");\r\n\t\t\r\n\t}else{\r\n\t\tthis.ext.fullscreen.toggleIcon.classList.remove(\"dhx_expand_icon--expanded\");\r\n\t}\r\n\t\r\n\t//scheduler.ext.fullscreen.toggleIcon.style.backgroundPosition = \"0 \" + (this.expanded ? \"0\" : \"18\") + \"px\";\r\n\r\n\tvar directions = ['left', 'top'];\r\n\tfor (var i = 0; i < directions.length; i++) {\r\n\t\t//var margin = scheduler.xy['margin_' + directions[i]];\r\n\t\tvar prev_margin = scheduler['_prev_margin_' + directions[i]];\r\n\t\tif (scheduler.xy['margin_' + directions[i]]) {\r\n\t\t\tscheduler['_prev_margin_' + directions[i]] = scheduler.xy['margin_' + directions[i]];\r\n\t\t\tscheduler.xy['margin_' + directions[i]] = 0;\r\n\t\t} else {\r\n\t\t\tif (prev_margin) {\r\n\t\t\t\tscheduler.xy['margin_' + directions[i]] = scheduler['_prev_margin_' + directions[i]];\r\n\t\t\t\tdelete scheduler['_prev_margin_' + directions[i]];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.setCurrentView();\r\n};\r\n\r\n\r\n}\r\n","export default function(scheduler){\r\n\r\n\r\n(function(){\r\n\r\nfunction defaults(obj, std){\r\n\tfor (var key in std)\r\n\t\tif (!obj[key])\r\n\t\t\tobj[key] = std[key];\r\n\treturn obj;\r\n}\r\n\r\nfunction getElementSizes(element, scheduler) {\r\n\tvar sizes = {};\r\n\telement = scheduler._els[element];\r\n\tif (element && element[0]) {\r\n\t\tsizes.x = element[0].scrollWidth;\r\n\t\tsizes.y = element[0].scrollHeight;\r\n\t} else {\r\n\t\tsizes.x = 0;\r\n\t\tsizes.y = 0;\r\n\t}\r\n\treturn sizes;\r\n}\r\n\r\n//compatibility for new versions of scheduler\r\nif(!window.dhtmlxAjax){\r\n\twindow.dhtmlxAjax = {\r\n\t\tpost: function(url, data, callback){\r\n\t\t\treturn window.dhx4.ajax.post(url, data, callback);\r\n\t\t},\r\n\t\tget: function(url, callback){\r\n\t\t\treturn window.ajax.get(url, callback);\r\n\t\t}\r\n\t};\r\n}\r\n\r\nfunction add_export_methods(scheduler){\r\n\r\n\tscheduler.exportToPDF = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.pdf\",\r\n\t\t\tformat:\"A4\",\r\n\t\t\torientation:\"landscape\",\r\n\t\t\tdpi:96,\r\n\t\t\tzoom:1,\r\n\t\t\trtl: scheduler.config.rtl\r\n\t\t});\r\n\t\tconfig.html = this._export_html(config);\r\n\t\tconfig.mode = this.getState().mode;\r\n\t\tthis._send_to_export(config, \"pdf\");\r\n\t};\r\n\r\n\tscheduler.exportToPNG = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.png\",\r\n\t\t\tformat:\"A4\",\r\n\t\t\torientation:\"landscape\",\r\n\t\t\tdpi:96,\r\n\t\t\tzoom:1,\r\n\t\t\trtl: scheduler.config.rtl\r\n\t\t});\r\n\t\tconfig.html = this._export_html(config);\r\n\t\tconfig.mode = this.getState().mode;\r\n\t\tthis._send_to_export(config, \"png\");\r\n\t};\r\n\r\n\tscheduler.exportToICal = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.ical\",\r\n\t\t\tdata:this._serialize_plain(null, config)\r\n\t\t});\r\n\t\tthis._send_to_export(config, \"ical\");\r\n\t};\r\n\r\n\tscheduler.exportToExcel = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.xlsx\",\r\n\t\t\ttitle:\"Events\",\r\n\t\t\tdata:this._serialize_plain( this.templates.xml_format, config),\r\n\t\t\tcolumns:this._serialize_columns()\r\n\t\t});\r\n\t\tthis._send_to_export(config, \"excel\");\r\n\t};\r\n\r\n\tscheduler._ajax_to_export = function(data, type, callback){\r\n\t\tdelete data.callback;\r\n\t\tvar url = data.server || \"https://export.dhtmlx.com/scheduler\";\r\n\r\n\t\twindow.dhtmlxAjax.post(url,\r\n\t\t\t\"type=\"+type+\"&store=1&data=\"+encodeURIComponent(JSON.stringify(data)),\r\n\t\t\tfunction(loader){\r\n\t\t\t\tvar fail = loader.xmlDoc.status > 400;\r\n\t\t\t\tvar info = null;\r\n\r\n\t\t\t\tif (!fail){\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\tinfo = JSON.parse(loader.xmlDoc.responseText);\r\n\t\t\t\t\t}catch(e){}\r\n\t\t\t\t}\r\n\t\t\t\tcallback(info);\r\n\t\t\t}\r\n\t\t);\r\n\t};\r\n\r\n\tscheduler._plain_export_copy = function(source, format){\r\n\t\tvar target = {};\r\n\t\tfor (var key in source)\r\n\t\t\ttarget[key] = source[key];\r\n\r\n\t\ttarget.start_date = format(target.start_date);\r\n\t\ttarget.end_date = format(target.end_date);\r\n\t\ttarget.$text = this.templates.event_text(source.start_date, source.end_date, source);\r\n\r\n\t\treturn target;\r\n\t};\r\n\r\n\tscheduler._serialize_plain = function(format, config){\r\n\t\tformat = format || scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\", true);\r\n\r\n\t\tvar events;\r\n\t\tif (config && config.start && config.end)\r\n\t\t\tevents = scheduler.getEvents(config.start, config.end);\r\n\t\telse\r\n\t\t\tevents = scheduler.getEvents();\r\n\r\n\t\tvar data = [];\r\n\t\tfor (var i = 0; i< events.length; i++)\r\n\t\t\tdata[i] = this._plain_export_copy(events[i], format);\r\n\r\n\t\treturn data;\r\n\t};\r\n\r\n\tscheduler._serialize_columns = function(){\r\n\t\treturn [\r\n\t\t\t{ id:\"start_date\", header:\"Start Date\", width:30 },\r\n\t\t\t{ id:\"end_date\", header:\"End Date\", width:30 },\r\n\t\t\t{ id:\"$text\", header:\"Text\", width:100 }\r\n\t\t];\r\n\t};\r\n\r\n\tscheduler._send_to_export = function(data, type){\r\n\t\tif(!data.version){\r\n\t\t\tdata.version = scheduler.version;\r\n\t\t}\r\n\r\n\t\tif(!data.skin){\r\n\t\t\tdata.skin = scheduler.skin;\r\n\t\t}\r\n\r\n\t\tif (data.callback)\r\n\t\t\t\treturn scheduler._ajax_to_export(data, type, data.callback);\r\n\r\n\t\tvar form = this._create_hidden_form();\r\n\r\n\t\tform.firstChild.action = data.server || \"https://export.dhtmlx.com/scheduler\";\r\n\t\tform.firstChild.childNodes[0].value = JSON.stringify(data);\r\n\t\tform.firstChild.childNodes[1].value = type;\r\n\t\tform.firstChild.submit();\r\n\t};\r\n\r\n\tscheduler._create_hidden_form = function(){\r\n\t\tif (!this._hidden_export_form){\r\n\t\t\tvar t = this._hidden_export_form = document.createElement(\"div\");\r\n\t\t\tt.style.display = \"none\";\r\n\t\t\tt.innerHTML = \"
\";\r\n\t\t\tdocument.body.appendChild(t);\r\n\t\t}\r\n\t\treturn this._hidden_export_form;\r\n\t};\r\n\r\n\tscheduler._get_export_size = function(format, orientation, zoom, dpi, header, footer, scales) {\r\n\r\n\t\tdpi = parseInt(dpi)/25.4 || 4;\r\n\r\n\t\tvar sizes = {\r\n\t\t\t\"A5\":{ x:148, y:210 },\r\n\t\t\t\"A4\":{ x:210, y:297 },\r\n\t\t\t\"A3\":{ x:297, y:420 },\r\n\t\t\t\"A2\":{ x:420, y:594 },\r\n\t\t\t\"A1\":{ x:594, y:841 },\r\n\t\t\t\"A0\":{ x:841, y:1189 }\r\n\t\t};\r\n\r\n\t\tvar dataX = getElementSizes(\"dhx_cal_data\", this).x;\r\n\t\tvar dataY = getElementSizes(\"dhx_cal_data\", this).y;\r\n\t\tvar headY = getElementSizes(\"dhx_cal_header\", this).y;\r\n\t\tvar multY = getElementSizes(\"dhx_multi_day\", this).y;\r\n\r\n\t\tvar cSize = {\r\n\t\t\ty: dataY + headY + multY\r\n\t\t};\r\n\r\n\t\tif (format === \"full\") {\r\n\t\t\tcSize.x = dataX;\r\n\t\t} else {\r\n\t\t\tcSize.x = Math.floor( (orientation === \"landscape\" ? sizes[format].y : sizes[format].x) * dpi );\r\n\t\t}\r\n\r\n\t\tif (scales) {\r\n\t\t\tcSize.x *= (parseFloat(scales.x) || 1);\r\n\t\t\tcSize.y *= (parseFloat(scales.y) || 1);\r\n\t\t}\r\n\r\n\t\treturn cSize;\r\n\t};\r\n\r\n\tfunction getTimeline() {\r\n\t\tvar mode = scheduler.getState().mode;\r\n\t\tif (scheduler.matrix && scheduler.matrix[mode]) {\r\n\t\t\treturn scheduler.matrix[mode];\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\r\n\tfunction getInitialSizes() {\r\n\t\tvar smartRendering = undefined,\r\n\t\t\tscrollable = undefined;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (timeline) {\r\n\t\t\tscrollable = timeline.scrollable;\r\n\t\t\tsmartRendering = timeline.smart_rendering;\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tnav_height: scheduler.xy.nav_height,\r\n\t\t\tscroll_width: scheduler.xy.scroll_width,\r\n\t\t\tstyle_width: scheduler._obj.style.width,\r\n\t\t\tstyle_height: scheduler._obj.style.height,\r\n\t\t\ttimeline_scrollable: scrollable,\r\n\t\t\ttimeline_smart_rendering: smartRendering\r\n\t\t};\r\n\t}\r\n\r\n\tfunction setExportSizes(size, initialSizes) {\r\n\t\tscheduler._obj.style.width = size.x + \"px\";\r\n\t\tscheduler._obj.style.height = size.y + \"px\";\r\n\r\n\t\tscheduler.xy.nav_height = 0;\r\n\t\tscheduler.xy.scroll_width = 0;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (initialSizes.timeline_scrollable || initialSizes.timeline_smart_rendering) {\r\n\r\n\t\t\ttimeline.scrollable = false;\r\n\t\t\ttimeline.smart_rendering = false;\r\n\t\t}\r\n\t}\r\n\r\n\tfunction setInitialSizes(initialSizes) {\r\n\t\tscheduler.xy.scroll_width = initialSizes.scroll_width;\r\n\t\tscheduler.xy.nav_height = initialSizes.nav_height;\r\n\t\tscheduler._obj.style.width = initialSizes.style_width;\r\n\t\tscheduler._obj.style.height = initialSizes.style_height;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (initialSizes.timeline_scrollable || initialSizes.timeline_smart_rendering) {\r\n\t\t\ttimeline.scrollable = initialSizes.timeline_scrollable;\r\n\t\t\ttimeline.smart_rendering = initialSizes.timeline_smart_rendering;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler._export_html = function (obj) {\r\n\t\tvar initialSizes = getInitialSizes();\r\n\t\tvar size = scheduler._get_export_size(obj.format, obj.orientation, obj.zoom, obj.dpi, obj.header, obj.footer, obj.scales);\r\n\r\n\t\tvar html = \"\";\r\n\t\ttry {\r\n\t\t\tsetExportSizes(size, initialSizes);\r\n\t\t\tscheduler.setCurrentView();\r\n\t\t\thtml = scheduler._obj.innerHTML;\r\n\t\t} catch (e) {\r\n\r\n\t\t\t// eslint-disable-next-line no-console\r\n\t\t\tconsole.error(e);\r\n\t\t} finally {\r\n\t\t\tsetInitialSizes(initialSizes);\r\n\t\t\tscheduler.setCurrentView();\r\n\t\t}\r\n\r\n\t\treturn html;\r\n\t};\r\n\r\n}\r\n\r\nadd_export_methods(scheduler);\r\n\r\n\r\n})();\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Grid\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\tvar els = document.body.getElementsByTagName(\"DIV\");\r\n\tfor (var i=0; i < els.length; i++) {\r\n\t\tvar cs = els[i].className||\"\";\r\n\t\tcs = cs.split(\":\");\r\n\t\tif (cs.length == 2 && cs[0] == \"template\"){\r\n\t\t\tvar code = \"return \\\"\"+(els[i].innerHTML||\"\").replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g,\"\\\\\\\"\").replace(/[\\n\\r]+/g,\"\")+\"\\\";\";\r\n\t\t\tcode = unescape(code).replace(/\\{event\\.([a-z]+)\\}/g,function(all,mask){\r\n\t\t\t\treturn '\"+ev.'+mask+'+\"';\r\n\t\t\t});\r\n\t\t\tscheduler.templates[cs[1]]=Function(\"start\",\"end\",\"ev\",code);\r\n\t\t\tels[i].style.display='none';\r\n\t\t}\r\n\t}\r\n});\r\n\r\n}","import keyboard_shortcuts from \"./keyboard_navigation/common/keyboard_shortcuts\";\r\nimport eventhandler from \"./keyboard_navigation/common/eventhandler\";\r\nimport trap_modal_focus from \"./keyboard_navigation/common/trap_modal_focus\";\r\nimport marker from \"./keyboard_navigation/marker\";\r\nimport scheduler_node from \"./keyboard_navigation/elements/scheduler_node\";\r\nimport nav_node from \"./keyboard_navigation/elements/nav_node\";\r\nimport header_cell from \"./keyboard_navigation/elements/header_cell\";\r\nimport event from \"./keyboard_navigation/elements/event\";\r\nimport time_slot from \"./keyboard_navigation/elements/time_slot\";\r\nimport minical_button from \"./keyboard_navigation/elements/minical_button\";\r\nimport minical_cell from \"./keyboard_navigation/elements/minical_cell\";\r\nimport data_area from \"./keyboard_navigation/elements/data_area\";\r\nimport modals from \"./keyboard_navigation/modals\";\r\nimport core from \"./keyboard_navigation/core\";\r\nimport key_nav_legacy from \"./keyboard_navigation/key_nav_legacy\";\r\n\r\n\r\nimport scheduler_handlers from \"./keyboard_navigation/scheduler_handlers\";\r\nimport minical_handlers from \"./keyboard_navigation/minical_handlers\";\r\n\r\nexport default function(scheduler){\r\n\t\tscheduler.config.key_nav = true;\r\n\t\tscheduler.config.key_nav_step = 30;\r\n\t\tscheduler.addShortcut = function(shortcut, handler, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tscopeObject.prototype.bind(shortcut, handler);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.getShortcutHandler = function(shortcut, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tvar commands = scheduler.$keyboardNavigation.shortcuts.parse(shortcut);\r\n\t\t\t\tif(commands.length){\r\n\t\t\t\t\treturn scopeObject.prototype.findHandler(commands[0]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.removeShortcut = function(shortcut, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tscopeObject.prototype.unbind(shortcut);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.focus = function(){\r\n\t\t\tif(!scheduler.config.key_nav){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar disp = scheduler.$keyboardNavigation.dispatcher;\r\n\t\t\tdisp.enable();\r\n\t\t\tvar activeNode = disp.getActiveNode();\r\n\t\t\tif(!activeNode || activeNode instanceof scheduler.$keyboardNavigation.MinicalButton || activeNode instanceof scheduler.$keyboardNavigation.MinicalCell){\r\n\t\t\t\tdisp.setDefaultNode();\r\n\t\t\t}else{\r\n\t\t\t\tdisp.focusNode(disp.getActiveNode());\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfunction getScope(mode){\r\n\t\t\tvar scopes = {\r\n\t\t\t\t\"minicalButton\":scheduler.$keyboardNavigation.MinicalButton,\r\n\t\t\t\t\"minicalDate\":scheduler.$keyboardNavigation.MinicalCell,\r\n\t\t\t\t\"scheduler\":scheduler.$keyboardNavigation.SchedulerNode,\r\n\t\t\t\t\"dataArea\": scheduler.$keyboardNavigation.DataArea,\r\n\t\t\t\t\"timeSlot\": scheduler.$keyboardNavigation.TimeSlot,\r\n\t\t\t\t\"event\": scheduler.$keyboardNavigation.Event\r\n\t\t\t};\r\n\r\n\t\t\tvar searchMap = {};\r\n\t\t\tfor(var i in scopes)\r\n\t\t\t\tsearchMap[i.toLowerCase()] = scopes[i];\r\n\r\n\t\t\tmode = (mode + \"\").toLowerCase();\r\n\r\n\t\t\treturn searchMap[mode] || scopes.scheduler;\r\n\t\t}\r\n\r\n\t\tscheduler.$keyboardNavigation = {};\r\n\r\n\t\tscheduler._compose = function(){\r\n\t\t\tvar parts = Array.prototype.slice.call(arguments, 0);\r\n\t\t\tvar res = {};\r\n\t\t\tfor(var i = 0; i < parts.length; i++){\r\n\t\t\t\tvar obj = parts[i];\r\n\t\t\t\tif(typeof obj == \"function\"){\r\n\t\t\t\t\tobj = new obj();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor(var p in obj){\r\n\t\t\t\t\tres[p] = obj[p];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\t\t};\r\n\r\n\t\tkeyboard_shortcuts(scheduler);\r\n\t\teventhandler(scheduler);\r\n\t\ttrap_modal_focus(scheduler);\r\n\t\tmarker(scheduler);\r\n\t\tscheduler_node(scheduler);\r\n\t\tnav_node(scheduler);\r\n\t\theader_cell(scheduler);\r\n\t\tevent(scheduler);\r\n\t\ttime_slot(scheduler);\r\n\t\tminical_button(scheduler);\r\n\t\tminical_cell(scheduler);\r\n\t\tdata_area(scheduler);\r\n\t\tmodals(scheduler);\r\n\t\tcore(scheduler);\r\n\t\tkey_nav_legacy(scheduler);\r\n\r\n\t\t(function(){\r\n\t\t\tscheduler_handlers(scheduler);\r\n\t\t\tminical_handlers(scheduler);\r\n\r\n\t\t\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\t\t\tscheduler.$keyboardNavigation.attachSchedulerHandlers();\r\n\r\n\t\t\tif(scheduler.renderCalendar){\r\n\t\t\t\t// if minical ext loaded before key nav ext - patch it now\r\n\t\t\t\tscheduler.$keyboardNavigation.patchMinicalendar();\r\n\t\t\t}else{\r\n\t\t\t\t// otherwise - wait until everything is loaded and try again\r\n\t\t\t\tvar attachOnce = scheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\t\t\t\tscheduler.detachEvent(attachOnce);\r\n\t\t\t\t\tscheduler.$keyboardNavigation.patchMinicalendar();\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\tfunction isSchedulerSelected(){\r\n\t\t\t\tif(!scheduler.config.key_nav) return;\r\n\r\n\t\t\t\tvar enable;\r\n\t\t\t\tvar focusElement = document.activeElement;\r\n\t\t\t\t// halt key nav when focus is outside scheduler or in quick info popup\r\n\t\t\t\tif(!focusElement || scheduler.utils.dom.locateCss(focusElement, \"dhx_cal_quick_info\", false)){\r\n\t\t\t\t\tenable = false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tenable = scheduler.$keyboardNavigation.isChildOf(focusElement, scheduler.$container) || scheduler.$keyboardNavigation.isMinical(focusElement);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn enable;\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\tfunction changeState(enable){\r\n\t\t\t\tif(enable && !dispatcher.isEnabled()){\r\n\t\t\t\t\tdispatcher.enable();\r\n\t\t\t\t}else if(!enable && dispatcher.isEnabled()){\r\n\t\t\t\t\tdispatcher.disable();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tconst intervalId = setInterval(function(){\r\n\t\t\t\tif(!scheduler.$container || !scheduler.$keyboardNavigation.isChildOf(scheduler.$container, document.body)){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar enable = isSchedulerSelected();\r\n\r\n\t\t\t\tif(enable){\r\n\t\t\t\t\tchangeState(enable);\r\n\t\t\t\t}else if(!enable && dispatcher.isEnabled()){\r\n\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// doublecheck in case checking is done in handler before focus element is repainted\r\n\t\t\t\t\t\tif(scheduler.config.key_nav){\r\n\t\t\t\t\t\t\tchangeState(isSchedulerSelected());\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tscheduler.$container.removeAttribute(\"tabindex\");\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}, 100);\r\n\t\t\t\t}\r\n\t\t\t}, 500);\r\n\t\t\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\t\t\tclearInterval(intervalId);\r\n\t\t\t});\r\n\t\t})();\r\n\t}\r\n\r\n\r\n","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.shortcuts = {\r\n\tcreateCommand: function(){\r\n\t\treturn {\r\n\t\t\tmodifiers:{\r\n\t\t\t\t\"shift\": false,\r\n\t\t\t\t\"alt\": false,\r\n\t\t\t\t\"ctrl\": false,\r\n\t\t\t\t\"meta\": false\r\n\t\t\t},\r\n\t\t\tkeyCode: null\r\n\t\t};\r\n\t},\r\n\tparse: function(shortcut){\r\n\t\tvar commands = [];\r\n\r\n\t\tvar expr = this.getExpressions(this.trim(shortcut));\r\n\t\tfor(var i = 0; i < expr.length; i++){\r\n\t\t\tvar words = this.getWords(expr[i]);\r\n\r\n\t\t\tvar command = this.createCommand();\r\n\r\n\t\t\tfor(var j = 0; j < words.length; j++){\r\n\t\t\t\tif(this.commandKeys[words[j]]){\r\n\t\t\t\t\tcommand.modifiers[words[j]] = true;\r\n\t\t\t\t}else if(this.specialKeys[words[j]]){\r\n\t\t\t\t\tcommand.keyCode = this.specialKeys[words[j]];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcommand.keyCode = words[j].charCodeAt(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tcommands.push(command);\r\n\t\t}\r\n\t\treturn commands;\r\n\t},\r\n\r\n\tgetCommandFromEvent: function(domEvent){\r\n\t\tvar command = this.createCommand();\r\n\t\tcommand.modifiers.shift = !!domEvent.shiftKey;\r\n\t\tcommand.modifiers.alt = !!domEvent.altKey;\r\n\t\tcommand.modifiers.ctrl = !!domEvent.ctrlKey;\r\n\t\tcommand.modifiers.meta = !!domEvent.metaKey;\r\n\t\tcommand.keyCode = domEvent.which || domEvent.keyCode;\r\n\r\n\t\tif(command.keyCode >= 96 && command.keyCode <= 105){\r\n\t\t\t// numpad keys 96-105 -> 48-57\r\n\t\t\tcommand.keyCode -= 48;//convert numpad number code to regular number code\r\n\t\t}\r\n\r\n\t\tvar printableKey = String.fromCharCode(command.keyCode );\r\n\t\tif(printableKey){\r\n\t\t\tcommand.keyCode = printableKey.toLowerCase().charCodeAt(0);\r\n\t\t}\r\n\t\treturn command;\r\n\t},\r\n\r\n\tgetHashFromEvent: function(domEvent){\r\n\t\treturn this.getHash(this.getCommandFromEvent(domEvent));\r\n\t},\r\n\r\n\tgetHash: function(command){\r\n\t\tvar parts = [];\r\n\t\tfor(var i in command.modifiers){\r\n\t\t\tif(command.modifiers[i]){\r\n\t\t\t\tparts.push(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tparts.push(command.keyCode);\r\n\r\n\t\treturn parts.join(this.junctionChar);\r\n\t},\r\n\r\n\tgetExpressions: function(shortcut){\r\n\t\treturn shortcut.split(this.junctionChar);\r\n\t},\r\n\tgetWords: function(term){\r\n\t\treturn term.split(this.combinationChar);\r\n\t},\r\n\ttrim: function(shortcut){\r\n\t\treturn shortcut.replace(/\\s/g, \"\");\r\n\t},\r\n\tjunctionChar:\",\",\r\n\tcombinationChar:\"+\",\r\n\tcommandKeys:{\r\n\t\t\"shift\": 16,\r\n\t\t\"alt\": 18,\r\n\t\t\"ctrl\": 17,\r\n\t\t\"meta\": true\r\n\t},\r\n\tspecialKeys:{\r\n\t\t\"backspace\": 8,\r\n\t\t\"tab\": 9,\r\n\t\t\"enter\": 13,\r\n\t\t\"esc\": 27,\r\n\t\t\"space\": 32,\r\n\t\t\"up\": 38,\r\n\t\t\"down\": 40,\r\n\t\t\"left\": 37,\r\n\t\t\"right\": 39,\r\n\t\t\"home\": 36,\r\n\t\t\"end\": 35,\r\n\t\t\"pageup\": 33,\r\n\t\t\"pagedown\": 34,\r\n\t\t\"delete\": 46,\r\n\t\t\"insert\": 45,\r\n\t\t\"plus\":107,\r\n\t\t\"f1\": 112,\r\n\t\t\"f2\": 113,\r\n\t\t\"f3\": 114,\r\n\t\t\"f4\": 115,\r\n\t\t\"f5\": 116,\r\n\t\t\"f6\": 117,\r\n\t\t\"f7\": 118,\r\n\t\t\"f8\": 119,\r\n\t\t\"f9\": 120,\r\n\t\t\"f10\": 121,\r\n\t\t\"f11\": 122,\r\n\t\t\"f12\": 123\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.EventHandler = {\r\n\t_handlers: null,\r\n\tfindHandler: function(command){\r\n\t\tif(!this._handlers) this._handlers = {};\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\t\tvar hash = shortcuts.getHash(command);\r\n\r\n\t\treturn this._handlers[hash];\r\n\t},\r\n\r\n\tdoAction: function(command, e){\r\n\t\tvar handler = this.findHandler(command);\r\n\t\tif(handler){\r\n\t\t\thandler.call(this, e);\r\n\r\n\t\t\tif (e.preventDefault) e.preventDefault();\r\n\t\t\telse e.returnValue = false;\r\n\r\n\t\t}\r\n\t},\r\n\tbind: function(shortcut, handler){\r\n\t\tif(!this._handlers) this._handlers = {};\r\n\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\r\n\t\tvar commands = shortcuts.parse(shortcut);\r\n\t\tfor(var i = 0; i < commands.length; i++){\r\n\t\t\tthis._handlers[shortcuts.getHash(commands[i])] = handler;\r\n\t\t}\r\n\t},\r\n\tunbind: function(shortcut){\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\r\n\t\tvar commands = shortcuts.parse(shortcut);\r\n\t\tfor(var i = 0; i < commands.length; i++){\r\n\t\t\tif(this._handlers[shortcuts.getHash(commands[i])]){\r\n\t\t\t\tdelete this._handlers[shortcuts.getHash(commands[i])];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tbindAll: function(map){\r\n\t\tfor(var i in map){\r\n\t\t\tthis.bind(i, map[i]);\r\n\t\t}\r\n\t},\r\n\tinitKeys: function(){\r\n\t\tif(!this._handlers)\r\n\t\t\tthis._handlers = {};\r\n\t\tif(this.keys){\r\n\t\t\tthis.bindAll(this.keys);\r\n\t\t}\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n(function(){\r\n\tscheduler.$keyboardNavigation.getFocusableNodes = scheduler._getFocusableNodes;\r\n\r\n\tscheduler.$keyboardNavigation.trapFocus = function trapFocus(root, e){\r\n\t\tif(e.keyCode != 9) return false;\r\n\r\n\t\tvar focusable = scheduler.$keyboardNavigation.getFocusableNodes(root);\r\n\t\tvar currentFocus = document.activeElement;\r\n\t\tvar currentIndex = -1;\r\n\t\tfor(var i = 0; i < focusable.length; i++){\r\n\t\t\tif(focusable[i] == currentFocus){\r\n\t\t\t\tcurrentIndex = i;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar nextIndex, nextItem;\r\n\t\tif(e.shiftKey){\r\n\r\n\t\t\t// back tab\r\n\t\t\t// go to the last element if we focused on the first\r\n\t\t\tnextIndex = (currentIndex <= 0) ? (focusable.length - 1) : (currentIndex - 1);\r\n\r\n\t\t\tnextItem = focusable[nextIndex];\r\n\t\t\tif(nextItem){\r\n\t\t\t\tnextItem.focus();\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\t// forward tab\r\n\t\t\t// forward tab from last element should go back to the first element\r\n\t\t\tnextIndex = (currentIndex >= focusable.length - 1) ? 0 : (currentIndex + 1);\r\n\t\t\tnextItem = focusable[nextIndex];\r\n\t\t\tif(nextItem){\r\n\t\t\t\tnextItem.focus();\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t};\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.marker = {\r\n\tclear: function(){\r\n\t\tvar divs = scheduler.$container.querySelectorAll(\".dhx_focus_slot\");\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tdivs[i].parentNode.removeChild(divs[i]);\r\n\t\t}\r\n\t},\r\n\tcreateElement: function(){\r\n\t\tvar element = document.createElement(\"div\");\r\n\t\telement.setAttribute(\"tabindex\", -1);\r\n\t\telement.className = \"dhx_focus_slot\";\r\n\t\treturn element;\r\n\t},\r\n\r\n\trenderMultiple: function(start, end, method){\r\n\t\tvar divs = [];\r\n\t\tvar currentStart = new Date(start);\r\n\t\tvar currentEnd = new Date(Math.min(end.valueOf(), scheduler.date.add(scheduler.date.day_start(new Date(start)), 1, \"day\").valueOf()));\r\n\t\twhile(currentStart.valueOf() < end.valueOf()){\r\n\r\n\t\t\tdivs = divs.concat(method.call(this, currentStart, new Date(Math.min(currentEnd.valueOf(), end.valueOf()))));\r\n\t\t\tcurrentStart = scheduler.date.day_start(scheduler.date.add(currentStart, 1, \"day\"));\r\n\r\n\t\t\tcurrentEnd = scheduler.date.day_start(scheduler.date.add(currentStart, 1, \"day\"));\r\n\t\t\tcurrentEnd = new Date(Math.min(currentEnd.valueOf(), end.valueOf()));\r\n\t\t}\r\n\r\n\t\treturn divs;\r\n\t},\r\n\r\n\r\n\trender: function(start, end, section){\r\n\t\tthis.clear();\r\n\t\tvar divs = [];\r\n\r\n\t\tvar modes = scheduler.$keyboardNavigation.TimeSlot.prototype._modes;\r\n\t\tvar view = scheduler.$keyboardNavigation.TimeSlot.prototype._getMode();\r\n\t\tswitch (view){\r\n\t\t\tcase modes.units:\r\n\t\t\t\tdivs = this.renderVerticalMarker(start, end, section);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.timeline:\r\n\t\t\t\tdivs = this.renderTimelineMarker(start, end, section);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.year:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderYearMarker));\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.month:\r\n\t\t\t\tdivs = this.renderMonthMarker(start, end);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.weekAgenda:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderWeekAgendaMarker));\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.list:\r\n\t\t\t\tdivs = this.renderAgendaMarker(start, end);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.dayColumns:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderVerticalMarker));\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tthis.addWaiAriaLabel(divs, start, end, section);\r\n\t\tthis.addDataAttributes(divs, start, end, section);\r\n\r\n\t\tfor(var i = divs.length - 1; i >= 0; i--){\r\n\t\t\tif(divs[i].offsetWidth){\r\n\t\t\t\treturn divs[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t},\r\n\r\n\taddDataAttributes: function(divs, start, end, section){\r\n\t\tvar dateToStr = scheduler.date.date_to_str(scheduler.config.api_date);\r\n\r\n\t\tvar from = dateToStr(start),\r\n\t\t\tto = dateToStr(end);\r\n\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tdivs[i].setAttribute(\"data-start-date\", from);\r\n\t\t\tdivs[i].setAttribute(\"data-end-date\", to);\r\n\t\t\tif(section){\r\n\t\t\t\tdivs[i].setAttribute(\"data-section\", section);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\taddWaiAriaLabel: function(divs, start, end, section){\r\n\t\tvar label = \"\";\r\n\t\tvar state = scheduler.getState();\r\n\t\tvar mode = state.mode;\r\n\r\n\t\tvar dateTimeLabel = false;\r\n\r\n\t\tlabel += scheduler.templates.day_date(start);\r\n\r\n\t\tif((scheduler.date.day_start(new Date(start)).valueOf() != start.valueOf())){\r\n\t\t\tlabel += \" \" + scheduler.templates.hour_scale(start);\r\n\t\t\tdateTimeLabel = true;\r\n\t\t}\r\n\r\n\t\tif((scheduler.date.day_start(new Date(start)).valueOf() != scheduler.date.day_start(new Date(end)).valueOf())){\r\n\r\n\t\t\tlabel += \" - \" + scheduler.templates.day_date(end);\r\n\t\t\tif(dateTimeLabel || (scheduler.date.day_start(new Date(end)).valueOf() != end.valueOf())){\r\n\t\t\t\tlabel += \" \" + scheduler.templates.hour_scale(end);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(section){\r\n\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\t\t\t\tconst timeline = scheduler.matrix[mode];\r\n\t\t\t\tconst sectionObject = timeline.y_unit[timeline.order[section]];\r\n\t\t\t\tlabel += \", \" + scheduler.templates[mode + \"_scale_label\"](sectionObject.key, sectionObject.label, sectionObject);\r\n\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\tconst units = scheduler._props[mode];\r\n\t\t\t\tconst sectionObject = units.options[units.order[section]];\r\n\r\n\t\t\t\tlabel += \", \" + scheduler.templates[mode + \"_scale_text\"](sectionObject.key, sectionObject.label, sectionObject);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tscheduler._waiAria.setAttributes(divs[i], {\r\n\t\t\t\t\"aria-label\": label,\r\n\t\t\t\t\"aria-live\": \"polite\"\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\trenderWeekAgendaMarker: function(start_date, end_date){\r\n\t\tvar divs = scheduler.$container.querySelectorAll(\".dhx_wa_day_cont .dhx_wa_scale_bar\");\r\n\r\n\t\tvar currDate = scheduler.date.week_start(new Date(scheduler.getState().min_date));\r\n\r\n\t\tvar index = -1;\r\n\t\tvar markerDate = scheduler.date.day_start(new Date(start_date));\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tindex++;\r\n\t\t\tif(scheduler.date.day_start(new Date(currDate)).valueOf() == markerDate.valueOf()){\r\n\t\t\t\tbreak;\r\n\t\t\t}else{\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(index != -1) return this._wrapDiv(divs[index]);\r\n\t\treturn [];\r\n\t},\r\n\r\n\t_wrapDiv: function(cell){\r\n\t\tvar marker = this.createElement();\r\n\t\tmarker.style.top = cell.offsetTop + \"px\";\r\n\t\tmarker.style.left = cell.offsetLeft + \"px\";\r\n\t\tmarker.style.width = cell.offsetWidth + \"px\";\r\n\t\tmarker.style.height = cell.offsetHeight + \"px\";\r\n\t\tcell.appendChild(marker);\r\n\t\treturn [marker];\r\n\t},\r\n\trenderYearMarker: function(start_date, end_date){\r\n\t\tvar cell = scheduler._get_year_cell(start_date);\r\n\t\tcell.style.position = \"relative\";\r\n\t\tvar marker = this.createElement();\r\n\t\tmarker.style.top = \"0px\";\r\n\t\tmarker.style.left = \"0px\";\r\n\t\tmarker.style.width = \"100%\";\r\n\t\tmarker.style.height = \"100%\";\r\n\t\tcell.appendChild(marker);\r\n\t\treturn [marker];\r\n\t},\r\n\r\n\trenderAgendaMarker: function(start_date, end_date){\r\n\t\tvar block = this.createElement();\r\n\t\tblock.style.height = \"1px\";\r\n\t\tblock.style.width = \"100%\";\r\n\t\tblock.style.opacity = 1;\r\n\t\tblock.style.top = \"0px\";\r\n\t\tblock.style.left = \"0px\";\r\n\t\tscheduler.$container.querySelector(\".dhx_cal_data\").appendChild(block);\r\n\t\treturn [block];\r\n\t},\r\n\r\n\trenderTimelineMarker: function(start_date, end_date, section){\r\n\t\tvar view_opts = scheduler._lame_copy({}, scheduler.matrix[scheduler._mode]);\r\n\t\tvar areas = view_opts._scales;\r\n\t\t//timespans must always use actual position, not rounded\r\n\t\tview_opts.round_position = false;\r\n\t\tvar blocks = [];\r\n\r\n\t\tvar min_date = start_date ? new Date(start_date) : scheduler._min_date;\r\n\t\tvar max_date = end_date ? new Date(end_date) : scheduler._max_date;\r\n\r\n\t\tif(min_date.valueOf() < scheduler._min_date.valueOf())\r\n\t\t\tmin_date = new Date(scheduler._min_date);\r\n\t\tif(max_date.valueOf() > scheduler._max_date.valueOf())\r\n\t\t\tmax_date = new Date(scheduler._max_date);\r\n\r\n\t\tif(!view_opts._trace_x) return blocks;\r\n\r\n\t\tfor(var i = 0; i < view_opts._trace_x.length; i++){\r\n\t\t\tif(scheduler._is_column_visible(view_opts._trace_x[i]))\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\tif(i == view_opts._trace_x.length)\r\n\t\t\treturn blocks;\r\n\r\n\t\tvar area = areas[section];\r\n\r\n\t\tif (!(min_date < end_date && max_date > start_date))\r\n\t\t\treturn blocks;\r\n\r\n\t\tvar block = this.createElement();\r\n\r\n\t\tlet start_pos;\r\n\t\tlet end_pos;\r\n\r\n\t\tfunction set_date_part(source, target) {\r\n\t\t\t// reset to start of the month in order to prevent month change when target is on 31th day, and source month has only 30 days\r\n\t\t\ttarget.setDate(1);\r\n\r\n\t\t\ttarget.setFullYear(source.getFullYear());\r\n\t\t\ttarget.setMonth(source.getMonth());\r\n\t\t\ttarget.setDate(source.getDate());\r\n\t\t}\r\n\r\n\t\tif(!scheduler.getView().days){\r\n\t\t\tstart_pos = scheduler._timeline_getX({start_date: start_date}, false, view_opts);\r\n\t\t\tend_pos = scheduler._timeline_getX({start_date: end_date}, false, view_opts);\r\n\t\t}else{\r\n\t\t\t// daytimeline\r\n\t\t\tconst tempStart = new Date(start_date);\r\n\t\t\tset_date_part(scheduler._min_date, tempStart);\r\n\t\t\tconst tempEnd = new Date(end_date);\r\n\t\t\tset_date_part(scheduler._min_date, tempEnd);\r\n\t\t\tstart_pos = scheduler._timeline_getX({start_date: tempStart}, false, view_opts);\r\n\t\t\tend_pos = scheduler._timeline_getX({start_date: tempEnd}, false, view_opts);\r\n\t\t}\r\n\r\n\t\tvar height = ((view_opts._section_height[section]-1) || (view_opts.dy - 1));\r\n\r\n\t\tvar top = 0;\r\n\t\tif (scheduler._isRender('cell')){\r\n\t\t\ttop = area.offsetTop;\r\n\t\t\tstart_pos += view_opts.dx;\r\n\t\t\tend_pos += view_opts.dx;\r\n\t\t\tarea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t}else{\r\n\r\n\t\t}\r\n\t\tvar width = Math.max(1, end_pos - start_pos - 1);\r\n\t\tlet direction = \"left\";\r\n\t\tif(scheduler.config.rtl){\r\n\t\t\tdirection = \"right\";\r\n\t\t}\r\n\t\tblock.style.cssText = `height:${height}px; ${direction}:${start_pos}px; width:${width}px; top:${top}px;`;\r\n\r\n\t\tif(area){\r\n\t\t\tarea.appendChild(block);\r\n\t\t\tblocks.push(block);\r\n\t\t}\r\n\r\n\t\treturn blocks;\r\n\t},\r\n\r\n\trenderMonthCell: function(date){\r\n\t\tvar cells = scheduler.$container.querySelectorAll(\".dhx_month_head\");\r\n\r\n\t\tvar divs = [];\r\n\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\tdivs.push(cells[i].parentNode);\r\n\t\t}\r\n\r\n\t\tvar firstDate = scheduler.date.week_start(new Date(scheduler.getState().min_date));\r\n\r\n\t\tvar index = -1;\r\n\t\tvar weekNumber = 0;\r\n\t\tvar dayIndex = -1;\r\n\t\tvar currDate = firstDate;\r\n\t\tvar markerDate = scheduler.date.day_start(new Date(date));\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tindex++;\r\n\r\n\t\t\tif(dayIndex == 6){\r\n\t\t\t\tweekNumber++;\r\n\t\t\t\tdayIndex = 0;\r\n\t\t\t}else{\r\n\t\t\t\tdayIndex++;\r\n\t\t\t}\r\n\r\n\t\t\tif(scheduler.date.day_start(new Date(currDate)).valueOf() == markerDate.valueOf()){\r\n\t\t\t\tbreak;\r\n\t\t\t}else{\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(index == -1){\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tvar left = scheduler._colsS[dayIndex];\r\n\t\tvar top = scheduler._colsS.heights[weekNumber];\r\n\r\n\t\tvar div = this.createElement();\r\n\t\tdiv.style.top = top + \"px\";\r\n\t\tdiv.style.left = left + \"px\";\r\n\t\tdiv.style.width = scheduler._cols[dayIndex] + \"px\";\r\n\t\tdiv.style.height = ((scheduler._colsS.heights[weekNumber + 1] - top) || scheduler._colsS.height) + \"px\" ;\r\n\r\n\r\n\t\tvar container = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\r\n\t\tvar datatable = container.querySelector(\".dhx_cal_month_table\");\r\n\t\tif(datatable.nextSibling){\r\n\t\t\tcontainer.insertBefore(div, datatable.nextSibling);\r\n\t\t}else{\r\n\t\t\tcontainer.appendChild(div);\r\n\t\t}\r\n\t\treturn div;\r\n\t},\r\n\trenderMonthMarker: function(start_date, end_date){\r\n\t\tvar res = [];\r\n\t\tvar currentDate = start_date;\r\n\t\twhile(currentDate.valueOf() < end_date.valueOf()){\r\n\t\t\tres.push(this.renderMonthCell(currentDate));\r\n\t\t\tcurrentDate = scheduler.date.add(currentDate, 1, \"day\");\r\n\t\t}\r\n\t\treturn res;\r\n\t},\r\n\r\n\trenderVerticalMarker: function(start_date, end_date, section){\r\n\t\tvar index = scheduler.locate_holder_day(start_date);\r\n\r\n\t\tvar divs = [];\r\n\t\tvar area = null;\r\n\r\n\t\tvar c = scheduler.config;\r\n\t\tif(scheduler._ignores[index]) return divs;\r\n\r\n\t\tif (scheduler._props && scheduler._props[scheduler._mode] && section) {\r\n\t\t\tvar view = scheduler._props[scheduler._mode];\r\n\t\t\tindex = view.order[section];\r\n\r\n\t\t\tvar inner_index = view.order[section];\r\n\t\t\tif(!(view.days > 1)){\r\n\t\t\t\tindex = inner_index;\r\n\t\t\t\tif (view.size && (index > view.position+view.size)) {\r\n\t\t\t\t\tindex = 0;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t//var units_l = view.size || view.options.length;\r\n\r\n\t\t\t\tindex = scheduler.locate_holder_day(start_date) + inner_index;\r\n\t\t\t\t//index = index*units_l + inner_index;\r\n\t\t\t}\r\n\t\t}\r\n\t\tarea = scheduler.locate_holder(index);\r\n\t\tif(!area || area.querySelector(\".dhx_scale_hour\")){\r\n\t\t\t// hour scale instead of date column\r\n\t\t\treturn document.createElement(\"div\");\r\n\t\t}\r\n\r\n\t\tvar start = Math.max((start_date.getHours()*60 + start_date.getMinutes()), c.first_hour*60);\r\n\r\n\r\n\t\tvar end = Math.min((end_date.getHours()*60 + end_date.getMinutes()), c.last_hour*60);\r\n\t\tif(!end && (scheduler.date.day_start(new Date(end_date)).valueOf() > scheduler.date.day_start(new Date(start_date)).valueOf())){\r\n\t\t\tend = c.last_hour*60;\r\n\t\t}\r\n\r\n\t\tif (end <= start) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tvar block = this.createElement();\r\n\r\n\t\t// +1 for working with section which really takes up whole height (as % would be == 0)\r\n\t\tvar all_hours_height = scheduler.config.hour_size_px*c.last_hour + 1;\r\n\t\tvar hour_ms = 60*60*1000;\r\n\t\tblock.style.top = (Math.round((start*60*1000-scheduler.config.first_hour*hour_ms)*scheduler.config.hour_size_px/hour_ms) % all_hours_height) + \"px\";\r\n\t\tblock.style.lineHeight = block.style.height = Math.max((Math.round(((end-start)*60*1000)*scheduler.config.hour_size_px/hour_ms)) % all_hours_height, 1)+\"px\";\r\n\t\tblock.style.width = \"100%\";\r\n\t\tarea.appendChild(block);\r\n\t\tdivs.push(block);\r\n\t\treturn divs[0];\r\n\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode = function(){};\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.EventHandler,\r\n\t{\r\n\t\tgetDefaultNode: function(){\r\n\t\t\tvar node = new scheduler.$keyboardNavigation.TimeSlot();\r\n\r\n\t\t\tif(!node.isValid()){\r\n\t\t\t\tnode = node.fallback();\r\n\t\t\t}\r\n\t\t\treturn node;\r\n\t\t},\r\n\r\n\t\t_modes:{\r\n\t\t\tmonth: \"month\",\r\n\t\t\tyear: \"year\",\r\n\t\t\tdayColumns: \"dayColumns\",\r\n\t\t\ttimeline:\"timeline\",\r\n\t\t\tunits:\"units\",\r\n\t\t\tweekAgenda: \"weekAgenda\",\r\n\t\t\tlist: \"list\"\r\n\t\t},\r\n\t\tgetMode: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tvar mode = state.mode;\r\n\t\t\tif((scheduler.matrix && scheduler.matrix[mode])){\r\n\t\t\t\treturn this._modes.timeline;\r\n\t\t\t} else if((scheduler._props && scheduler._props[mode])){\r\n\t\t\t\treturn this._modes.units;\r\n\t\t\t}else if(mode == \"month\"){\r\n\t\t\t\treturn this._modes.month;\r\n\t\t\t}else if(mode == \"year\"){\r\n\t\t\t\treturn this._modes.year;\r\n\t\t\t}else if(mode == \"week_agenda\"){\r\n\t\t\t\treturn this._modes.weekAgenda;\r\n\t\t\t}else if(mode == \"map\" || mode == \"agenda\" || (scheduler._grid && scheduler[\"grid_\" + mode])){\r\n\t\t\t\treturn this._modes.list;\r\n\t\t\t}else{\r\n\t\t\t\treturn this._modes.dayColumns;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.focus();\r\n\t\t},\r\n\r\n\t\tblur: function(){\r\n\r\n\t\t},\r\n\r\n\t\tdisable: function(){\r\n\t\t\tscheduler.$container.setAttribute(\"tabindex\", \"0\");\r\n\t\t},\r\n\t\tenable: function(){\r\n\t\t\tif(scheduler.$container)\r\n\t\t\t\tscheduler.$container.removeAttribute(\"tabindex\");\r\n\t\t},\r\n\t\tisEnabled: function(){\r\n\t\t\treturn scheduler.$container.hasAttribute(\"tabindex\");\r\n\t\t},\r\n\r\n\r\n\t\t_compareEvents: function(a, b){\r\n\t\t\tif (a.start_date.valueOf() == b.start_date.valueOf())\r\n\t\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\t\treturn a.start_date.valueOf() > b.start_date.valueOf() ? 1 : -1;\r\n\t\t},\r\n\r\n\t\t_pickEvent: function(from, to, startId, reverse){\r\n\t\t\tvar range = scheduler.getState();\r\n\t\t\tfrom = new Date(Math.max(range.min_date.valueOf(), from.valueOf()));\r\n\t\t\tto = new Date(Math.min(range.max_date.valueOf(), to.valueOf()));\r\n\r\n\t\t\tvar evs = scheduler.getEvents(from, to);\r\n\t\t\tevs.sort(this._compareEvents);\r\n\t\t\tif(reverse){\r\n\t\t\t\tevs = evs.reverse();\r\n\t\t\t}\r\n\r\n\t\t\tvar trim = !!startId;\r\n\t\t\tfor(var i =0; i < evs.length && trim; i++){\r\n\t\t\t\tif(evs[i].id == startId){\r\n\t\t\t\t\ttrim = false;\r\n\t\t\t\t}\r\n\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\r\n\t\t\tfor(var i = 0; i < evs.length; i++){\r\n\t\t\t\tvar eventElement = new scheduler.$keyboardNavigation.Event(evs[i].id);\r\n\t\t\t\tif(eventElement.getNode())\r\n\t\t\t\t\treturn evs[i];\r\n\t\t\t}\r\n\r\n\t\t\treturn null;\r\n\t\t},\r\n\r\n\t\tnextEventHandler: function(id){\r\n\t\t\tvar activeNode = scheduler.$keyboardNavigation.dispatcher.activeNode;\r\n\r\n\t\t\tvar startId = id || (activeNode && activeNode.eventId);\r\n\r\n\t\t\tvar nextEvent = null;\r\n\t\t\tif(startId && scheduler.getEvent(startId)){\r\n\t\t\t\tvar currEvent = scheduler.getEvent(startId);\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tcurrEvent.start_date,\r\n\t\t\t\t\tscheduler.date.add(currEvent.start_date, 1, \"year\"),\r\n\t\t\t\t\tcurrEvent.id,\r\n\t\t\t\t\tfalse\r\n\t\t\t\t);\r\n\r\n\t\t\t}\r\n\t\t\tif(!nextEvent && !id){\r\n\t\t\t\tvar visibleDates = scheduler.getState();\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tvisibleDates.min_date,\r\n\t\t\t\t\tscheduler.date.add(visibleDates.min_date, 1, \"year\"),\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\tfalse\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tif(nextEvent){\r\n\r\n\t\t\t\tvar nextEv = new scheduler.$keyboardNavigation.Event(nextEvent.id);\r\n\t\t\t\tif(!nextEv.isValid()){// not visible event\r\n\t\t\t\t\tthis.nextEventHandler(nextEvent.id);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(activeNode){activeNode.blur();}\r\n\t\t\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(nextEv);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tprevEventHandler: function(id){\r\n\t\t\tvar activeNode = scheduler.$keyboardNavigation.dispatcher.activeNode;\r\n\r\n\t\t\tvar startId = id || (activeNode && activeNode.eventId);\r\n\r\n\t\t\tvar nextEvent = null;\r\n\t\t\tif(startId && scheduler.getEvent(startId)){\r\n\t\t\t\tvar currEvent = scheduler.getEvent(startId);\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tscheduler.date.add(currEvent.end_date, -1, \"year\"),\r\n\t\t\t\t\tcurrEvent.end_date,\r\n\t\t\t\t\tcurrEvent.id,\r\n\t\t\t\t\ttrue\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\tif(!nextEvent && !id){\r\n\t\t\t\tvar visibleDates = scheduler.getState();\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tscheduler.date.add(visibleDates.max_date, -1, \"year\"),\r\n\t\t\t\t\tvisibleDates.max_date,\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\ttrue\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tif(nextEvent){\r\n\t\t\t\tvar nextEv = new scheduler.$keyboardNavigation.Event(nextEvent.id);\r\n\t\t\t\tif(!nextEv.isValid()){// not visible event\r\n\t\t\t\t\tthis.prevEventHandler(nextEvent.id);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(activeNode){activeNode.blur();}\r\n\t\t\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(nextEv);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\r\n\t\t\t\"alt+1, alt+2, alt+3, alt+4, alt+5, alt+6, alt+7, alt+8, alt+9\": function(e){\r\n\t\t\t\tvar tabs = scheduler.$keyboardNavigation.HeaderCell.prototype.getNodes(\".dhx_cal_navline .dhx_cal_tab\");\r\n\t\t\t\tvar key = e.key;\r\n\t\t\t\tif(key === undefined){\r\n\t\t\t\t\tkey = e.keyCode - 48;\r\n\t\t\t\t}\r\n\t\t\t\tif(tabs[key*1 - 1]){\r\n\t\t\t\t\ttabs[key*1 - 1].click();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+left,meta+left\": function(e){\r\n\t\t\t\tscheduler._click.dhx_cal_prev_button();\r\n\t\t\t},\r\n\t\t\t\"ctrl+right,meta+right\": function(e){\r\n\t\t\t\tscheduler._click.dhx_cal_next_button();\r\n\t\t\t},\r\n\t\t\t\"ctrl+up,meta+up\":function(e){\r\n\t\t\t\tvar dataArea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tdataArea.scrollTop -= 20;\r\n\t\t\t},\r\n\t\t\t\"ctrl+down,meta+down\": function(e){\r\n\t\t\t\tvar dataArea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tdataArea.scrollTop += 20;\r\n\t\t\t},\r\n\r\n\r\n\t\t\t\"e\": function(){\r\n\t\t\t\tthis.nextEventHandler();\r\n\t\t\t},\r\n\r\n\t\t\t\"home\": function(){\r\n\t\t\t\tscheduler.setCurrentView(new Date());\r\n\t\t\t},\r\n\r\n\t\t\t\"shift+e\": function(){\r\n\t\t\t\tthis.prevEventHandler();\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+enter,meta+enter\": function(){\r\n\t\t\t\tscheduler.addEventNow({start_date: new Date(scheduler.getState().date)});\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+c,meta+c\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t},\r\n\t\t\t\"ctrl+v,meta+v\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t},\r\n\t\t\t\"ctrl+x,meta+x\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode.prototype.bindAll(scheduler.$keyboardNavigation.SchedulerNode.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.KeyNavNode = function(){};\r\n\r\nscheduler.$keyboardNavigation.KeyNavNode.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.EventHandler,\r\n\t{\r\n\t\tisValid: function(){\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\treturn null;\r\n\t\t},\r\n\r\n\t\tmoveTo: function (element) {\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(element);\r\n\t\t},\r\n\r\n\t\tcompareTo: function(b){\r\n\t\t\t// good enough comparison of two random objects\r\n\t\t\tif(!b) return false;\r\n\t\t\tfor(var i in this){\r\n\t\t\t\tif(!!this[i] != !!b[i]) return false;\r\n\r\n\t\t\t\tvar canStringifyThis = !!(this[i] && this[i].toString);\r\n\t\t\t\tvar canStringifyThat = !!(b[i] && b[i].toString);\r\n\t\t\t\tif(canStringifyThat != canStringifyThis) return false;\r\n\t\t\t\tif(!(canStringifyThat && canStringifyThis)) {\r\n\t\t\t\t\tif(b[i] != this[i]) return false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(b[i].toString() != this[i].toString())\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\tgetNode: function(){},\r\n\t\tfocus: function(){\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif(node){\r\n\t\t\t\tnode.setAttribute(\"tabindex\", \"-1\");\r\n\t\t\t\t//node.className += \" scheduler_focused\";\r\n\t\t\t\tif(node.focus) node.focus();\r\n\t\t\t}\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif(node){\r\n\t\t\t\tnode.setAttribute(\"tabindex\", \"-1\");\r\n\t\t\t\t//node.className = (node.className || \"\").replace(/ ?scheduler_focused/g, \"\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.HeaderCell = function(index){\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.HeaderCell.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\tgetNode: function(index){\r\n\t\t\tindex = index || this.index || 0;\r\n\t\t\tvar nodes = this.getNodes();\r\n\t\t\tif(nodes[index]) return nodes[index];\r\n\t\t},\r\n\r\n\t\tgetNodes: function(selector){\r\n\t\t\tselector = selector || [\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_prev_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_next_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_today_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_tab\"\r\n\t\t\t\t].join(\", \");\r\n\r\n\t\t\tvar nodes = Array.prototype.slice.call(scheduler.$container.querySelectorAll(selector));\r\n\t\t\tnodes.sort(function(a, b){\r\n\t\t\t\treturn a.offsetLeft - b.offsetLeft;\r\n\t\t\t});\r\n\t\t\treturn nodes;\r\n\t\t},\r\n\r\n\t\t_handlers:null,\r\n\r\n\t\tisValid: function(){\r\n\t\t\treturn !!this.getNode(this.index);\r\n\t\t},\r\n\t\tfallback:function(){\r\n\t\t\tvar defaultCell = this.getNode(0);\r\n\t\t\tif(!defaultCell){\r\n\t\t\t\tdefaultCell = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}\r\n\t\t\treturn defaultCell;\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tvar newIndex = this.index - 1;\r\n\t\t\t\tif(newIndex < 0){\r\n\t\t\t\t\tnewIndex = this.getNodes().length - 1;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.HeaderCell(newIndex));\r\n\r\n\t\t\t},\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tvar newIndex = this.index + 1;\r\n\t\t\t\tif(newIndex >= this.getNodes().length){\r\n\t\t\t\t\tnewIndex = 0;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.HeaderCell(newIndex));\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t},\r\n\r\n\t\t\t\"enter\": function(){\r\n\t\t\t\tvar node = this.getNode();\r\n\t\t\t\tif(node){\r\n\t\t\t\t\tnode.click();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.HeaderCell.prototype.bindAll(scheduler.$keyboardNavigation.HeaderCell.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.Event = function(id){\r\n\tthis.eventId = null;\r\n\tif(scheduler.getEvent(id)){\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tthis.start = new Date(ev.start_date);\r\n\t\tthis.end = new Date(ev.end_date);\r\n\r\n\t\tthis.section = this._getSection(ev);\r\n\t\tthis.eventId = id;\r\n\t}\r\n};\r\n\r\nscheduler.$keyboardNavigation.Event.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\t_getNodes: function(){\r\n\t\t\treturn Array.prototype.slice.call(scheduler.$container.querySelectorAll(\"[\"+scheduler.config.event_attribute+\"]\"));\r\n\t\t},\r\n\r\n\t\t_modes: scheduler.$keyboardNavigation.SchedulerNode.prototype._modes,\r\n\r\n\t\tgetMode: scheduler.$keyboardNavigation.SchedulerNode.prototype.getMode,\r\n\r\n\t\t_handlers: null,\r\n\t\tisValid: function(){\r\n\t\t\treturn !!(scheduler.getEvent(this.eventId) && this.getNode());\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\tvar eventNode = this._getNodes()[0];\r\n\t\t\tvar defaultElement = null;\r\n\t\t\tif(!eventNode || !(scheduler._locate_event(eventNode))){\r\n\t\t\t\tdefaultElement = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}else{\r\n\t\t\t\tvar id = scheduler._locate_event(eventNode);\r\n\t\t\t\tdefaultElement = new scheduler.$keyboardNavigation.Event(id);\r\n\t\t\t}\r\n\r\n\t\t\treturn defaultElement;\r\n\t\t},\r\n\r\n\t\tisScrolledIntoView: function (el) {\r\n\t\t\tvar eventBox = el.getBoundingClientRect();\r\n\t\t\tvar viewPort = scheduler.$container.querySelector(\".dhx_cal_data\").getBoundingClientRect();\r\n\t\t\t\r\n\t\t\tif(eventBox.bottom < viewPort.top || eventBox.top > viewPort.bottom){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\tgetNode: function(){\r\n\r\n\t\t\tvar idSelector = \"[\"+scheduler.config.event_attribute+\"='\"+this.eventId+\"']\";\r\n\r\n\t\t\tvar inlineEditor = scheduler.$keyboardNavigation.dispatcher.getInlineEditor(this.eventId);\r\n\t\t\tif(inlineEditor){// is inline editor visible\r\n\t\t\t\treturn inlineEditor;\r\n\t\t\t}else{\r\n\t\t\t\tif(scheduler.isMultisectionEvent && scheduler.isMultisectionEvent(scheduler.getEvent(this.eventId))){\r\n\t\t\t\t\tvar nodes = scheduler.$container.querySelectorAll(idSelector);\r\n\t\t\t\t\tfor(var i = 0; i < nodes.length; i++){\r\n\t\t\t\t\t\tif(this.isScrolledIntoView(nodes[i])){\r\n\t\t\t\t\t\t\treturn nodes[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn nodes[0];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn scheduler.$container.querySelector(idSelector);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tvar event = scheduler.getEvent(this.eventId);\r\n\r\n\t\t\tvar calendar = scheduler.getState();\r\n\t\t\tif(event.start_date.valueOf() > calendar.max_date.valueOf() || event.end_date.valueOf() <= calendar.min_date.valueOf()){\r\n\t\t\t\tscheduler.setCurrentView(event.start_date);\r\n\t\t\t}\r\n\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif (this.isScrolledIntoView(node)) {\r\n\t\t\t\tscheduler.$keyboardNavigation.dispatcher.keepScrollPosition((function(){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\t\t}).bind(this));\r\n\t\t\t} else {\r\n\t\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\t}\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\r\n\r\n\t\t_getSection: function(ev){\r\n\t\t\tvar section = null;\r\n\t\t\tvar mode = scheduler.getState().mode;\r\n\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\t\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\t\tsection = ev[timeline.y_property];\r\n\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\tvar unit = scheduler._props[mode];\r\n\t\t\t\tsection = ev[unit.map_to];\r\n\t\t\t}\r\n\t\t\treturn section;\r\n\t\t},\r\n\t\t_moveToSlot: function(dir){\r\n\t\t\tvar ev = scheduler.getEvent(this.eventId);\r\n\t\t\tif(ev){\r\n\t\t\t\tvar section =this._getSection(ev);\r\n\t\t\t\tvar slot = new scheduler.$keyboardNavigation.TimeSlot(ev.start_date, null, section);\r\n\t\t\t\tthis.moveTo(slot.nextSlot(slot, dir));\r\n\t\t\t}else{\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tthis._moveToSlot(\"left\");\r\n\t\t\t},\r\n\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tthis._moveToSlot(\"right\");\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\t\t\t\tif(this.getMode() == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis._moveToSlot(\"down\");\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"space\": function(){\r\n\t\t\t\tvar node = this.getNode();\r\n\t\t\t\tif(node && node.click){\r\n\t\t\t\t\tnode.click();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"up\": function () {\r\n\t\t\t\tif(this.getMode() == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis._moveToSlot(\"up\");\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"delete\": function(){\r\n\t\t\t\tif(scheduler.getEvent(this.eventId)) {\r\n\t\t\t\t\tscheduler._click.buttons[\"delete\"](this.eventId);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t// open lightbox\r\n\t\t\t\"enter\": function () {\r\n\t\t\t\tif(scheduler.getEvent(this.eventId)) {\r\n\t\t\t\t\tscheduler.showLightbox(this.eventId);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\nscheduler.$keyboardNavigation.Event.prototype.bindAll(scheduler.$keyboardNavigation.Event.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.TimeSlot = function(from, to, section, movingDate){\r\n\tvar state = scheduler.getState();\r\n\tvar timeline = scheduler.matrix && scheduler.matrix[state.mode];\r\n\r\n\tif(!from){\r\n\t\tfrom = this.getDefaultDate();\r\n\t}\r\n\r\n\tif(!to){\r\n\r\n\t\tif(timeline){\r\n\t\t\tto = scheduler.date.add(from, timeline.x_step, timeline.x_unit);\r\n\t\t}else{\r\n\t\t\tto = scheduler.date.add(from, scheduler.config.key_nav_step, \"minute\");\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tthis.section = section || this._getDefaultSection();\r\n\tthis.start_date = new Date(from);\r\n\tthis.end_date = new Date(to);\r\n\tthis.movingDate = movingDate || null;\r\n};\r\n\r\nscheduler.$keyboardNavigation.TimeSlot.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\t_handlers:null,\r\n\r\n\t\tgetDefaultDate: function(){\r\n\t\t\tvar from;\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar visibleTime = new Date(state.date);\r\n\t\t\tvisibleTime.setSeconds(0);\r\n\t\t\tvisibleTime.setMilliseconds(0);\r\n\r\n\t\t\tvar nowTime = new Date();\r\n\t\t\tnowTime.setSeconds(0);\r\n\t\t\tnowTime.setMilliseconds(0);\r\n\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[state.mode];\r\n\t\t\tvar showNowTime = false;\r\n\t\t\tif(visibleTime.valueOf() === nowTime.valueOf()){\r\n\t\t\t\tshowNowTime = true;\r\n\t\t\t}\r\n\r\n\t\t\tif(timeline){\r\n\t\t\t\tif(showNowTime){\r\n\t\t\t\t\tif(timeline.x_unit === \"day\"){\r\n\t\t\t\t\t\tnowTime.setHours(0);\r\n\t\t\t\t\t\tnowTime.setMinutes(0);\r\n\t\t\t\t\t}else if(timeline.x_unit === \"hour\"){\r\n\t\t\t\t\t\tnowTime.setMinutes(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfrom = nowTime;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfrom = scheduler.date[timeline.name + \"_start\"](new Date(state.date));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfrom = this.findVisibleColumn(from);\r\n\t\t\t}else{\r\n\t\t\t\tfrom = new Date(scheduler.getState().min_date);\r\n\t\t\t\tif(showNowTime){\r\n\t\t\t\t\tfrom = nowTime;\r\n\t\t\t\t}\r\n\t\t\t\tfrom = this.findVisibleColumn(from);\r\n\t\t\t\tif(!showNowTime){\r\n\t\t\t\t\tfrom.setHours(scheduler.config.first_hour);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(!scheduler._table_view){\r\n\t\t\t\t\tvar dataContainer = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\t\tif(dataContainer.scrollTop){\r\n\t\t\t\t\t\tfrom.setHours(scheduler.config.first_hour + Math.ceil(dataContainer.scrollTop / scheduler.config.hour_size_px));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn from;\r\n\t\t},\r\n\r\n\t\tclone: function(timeslot){\r\n\t\t\treturn new scheduler.$keyboardNavigation.TimeSlot(timeslot.start_date, timeslot.end_date, timeslot.section, timeslot.movingDate);\r\n\t\t},\r\n\t\t_getMultisectionView: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view;\r\n\t\t\tif(scheduler._props && scheduler._props[state.mode]) {\r\n\t\t\t\tview = scheduler._props[state.mode];\r\n\t\t\t}else if(scheduler.matrix && scheduler.matrix[state.mode]){\r\n\t\t\t\tview = scheduler.matrix[state.mode];\r\n\t\t\t}\r\n\t\t\treturn view;\r\n\t\t},\r\n\r\n\t\t_getDefaultSection: function(){\r\n\t\t\tvar section = null;\r\n\t\t\tvar view = this._getMultisectionView();\r\n\t\t\tif(view && !section){\r\n\t\t\t\tsection = this._getNextSection();\r\n\t\t\t}\r\n\t\t\treturn section;\r\n\t\t},\r\n\r\n\t\t_getNextSection: function(sectionId, dir){\r\n\t\t\tvar view = this._getMultisectionView();\r\n\t\t\tvar currentIndex = view.order[sectionId];\r\n\t\t\tvar nextIndex = currentIndex;\r\n\t\t\tif(currentIndex !== undefined){\r\n\t\t\t\tnextIndex = currentIndex + dir;\r\n\t\t\t}else{\r\n\t\t\t\tnextIndex = (view.size && view.position) ? view.position : 0;\r\n\t\t\t}\r\n\r\n\t\t\tif(nextIndex < 0){\r\n\t\t\t\tnextIndex = 0;\r\n\t\t\t}\r\n\t\t\tvar options = view.options || view.y_unit;\r\n\r\n\t\t\tif(nextIndex >= options.length){\r\n\t\t\t\tnextIndex = options.length - 1;\r\n\t\t\t}\r\n\t\t\t//nextIndex = nextIndex < 0 ? nextIndex = (view.options || view.y_unit).length -1 : nextIndex;\r\n\r\n\t\t\tif(options[nextIndex]){\r\n\t\t\t\treturn options[nextIndex].key;\r\n\t\t\t}else{\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar isInRange = !(this.start_date.valueOf() < state.min_date.valueOf() || this.start_date.valueOf() >= state.max_date.valueOf());\r\n\r\n\t\t\tif(!isInRange) return false;\r\n\r\n\r\n\t\t\tif(!this.isVisible(this.start_date, this.end_date)) return false;\r\n\r\n\t\t\tvar view = this._getMultisectionView();\r\n\r\n\t\t\tif(view){\r\n\t\t\t\treturn (view.order[this.section] !== undefined);\r\n\t\t\t}else{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\tfallback:function(){\r\n\r\n\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(!defaultSlot.isValid()){\r\n\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t}else{\r\n\t\t\t\treturn defaultSlot;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tgetNodes: function(){\r\n\t\t\treturn Array.prototype.slice.call(scheduler.$container.querySelectorAll(\".dhx_focus_slot\"));\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\treturn this.getNodes()[0];\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tif(this.section && scheduler.getView() && scheduler.getView().smart_rendering && scheduler.getView().scrollTo && !scheduler.$container.querySelector(`[data-section-id=\"${this.section}\"]`)){\r\n\t\t\t\tscheduler.getView().scrollTo({section: this.section});\r\n\t\t\t}\r\n\t\t\tscheduler.$keyboardNavigation.marker.render(this.start_date, this.end_date, this.section);\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\tscheduler.$keyboardNavigation._pasteDate = this.start_date;\r\n\t\t\tscheduler.$keyboardNavigation._pasteSection = this.section;\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t\tscheduler.$keyboardNavigation.marker.clear();\r\n\t\t},\r\n\r\n\t\t_modes: scheduler.$keyboardNavigation.SchedulerNode.prototype._modes,\r\n\r\n\t\t_getMode: scheduler.$keyboardNavigation.SchedulerNode.prototype.getMode,\r\n\r\n\t\taddMonthDate: function(date, dir, extend){\r\n\t\t\tvar res;\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tres = scheduler.date.add(date, -1, \"week\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tres = scheduler.date.add(date, 1, \"week\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tres = scheduler.date.day_start(scheduler.date.add(date, -1, \"day\"));\r\n\t\t\t\t\tres = this.findVisibleColumn(res, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tres = scheduler.date.day_start(scheduler.date.add(date, 1, \"day\"));\r\n\t\t\t\t\tres = this.findVisibleColumn(res, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tres = scheduler.date.day_start(new Date(date));\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tif(date.valueOf() < state.min_date.valueOf() || (!extend && date.valueOf() >= state.max_date.valueOf())){\r\n\t\t\t\tres = new Date(state.min_date);\r\n\t\t\t}\r\n\r\n\t\t\treturn res;\r\n\t\t},\r\n\r\n\t\tnextMonthSlot: function(slot, dir, extend){\r\n\r\n\t\t\tvar start, end;\r\n\t\t\tstart = this.addMonthDate(slot.start_date, dir, extend);\r\n\r\n\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\tend = new Date(start);\r\n\t\t\tend.setHours(scheduler.config.last_hour);\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\r\n\t\t_alignTimeSlot: function(date, minDate, unit, step){\r\n\t\t\tvar currentDate = new Date(minDate);\r\n\t\t\twhile(currentDate.valueOf() < date.valueOf()){\r\n\t\t\t\tcurrentDate = scheduler.date.add(currentDate, step, unit);\r\n\t\t\t}\r\n\r\n\t\t\tif(currentDate.valueOf() > date.valueOf()){\r\n\t\t\t\tcurrentDate = scheduler.date.add(currentDate, -step, unit);\r\n\t\t\t}\r\n\r\n\t\t\treturn currentDate;\r\n\t\t},\r\n\r\n\t\tnextTimelineSlot: function(slot, dir, extend){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view = scheduler.matrix[state.mode];\r\n\r\n\t\t\tvar startDate = this._alignTimeSlot(slot.start_date, scheduler.date[view.name + \"_start\"](new Date(slot.start_date)), view.x_unit, view.x_step);\r\n\t\t\tvar endDate = this._alignTimeSlot(slot.end_date, scheduler.date[view.name + \"_start\"](new Date(slot.end_date)), view.x_unit, view.x_step);\r\n\r\n\t\t\tif(endDate.valueOf() <= startDate.valueOf()){\r\n\t\t\t\tendDate = scheduler.date.add(startDate, view.x_step, view.x_unit);\r\n\t\t\t}\r\n\t\t\tvar newPos = this.clone(slot);\r\n\t\t\tnewPos.start_date = startDate;\r\n\t\t\tnewPos.end_date = endDate;\r\n\t\t\tnewPos.section = slot.section || this._getNextSection();\r\n\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tnewPos.section = this._getNextSection(slot.section, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tnewPos.section = this._getNextSection(slot.section, +1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tnewPos.start_date = this.findVisibleColumn(scheduler.date.add(newPos.start_date, -view.x_step, view.x_unit), -1);\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tnewPos.start_date = this.findVisibleColumn(scheduler.date.add(newPos.start_date, view.x_step, view.x_unit), 1);\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(newPos.start_date.valueOf() < state.min_date.valueOf() || newPos.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tif(extend && newPos.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\t\tnewPos.start_date = new Date(state.max_date);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tnewPos.start_date = scheduler.date[state.mode + \"_start\"](scheduler.date.add(state.date, dir == \"left\" ? -1 : 1, state.mode));\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn newPos;\r\n\t\t},\r\n\r\n\t\tnextUnitsSlot: function(slot, dir, extend){\r\n\t\t\tvar newPos = this.clone(slot);\r\n\t\t\tnewPos.section = slot.section || this._getNextSection();\r\n\r\n\t\t\tvar section = slot.section || this._getNextSection();\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view = scheduler._props[state.mode];\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tsection = this._getNextSection(slot.section, -1);\r\n\t\t\t\t\tvar optionsCount = view.size ? (view.size - 1) : view.options.length;\r\n\r\n\t\t\t\t\tif(view.days > 1 && (view.order[section] == optionsCount - 1)){\r\n\t\t\t\t\t\tif(scheduler.date.add(slot.start_date, -1, \"day\").valueOf() >= state.min_date.valueOf()){\r\n\t\t\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tsection = this._getNextSection(slot.section, 1);\r\n\t\t\t\t\tif(view.days > 1 && !view.order[section]){\r\n\t\t\t\t\t\tif(scheduler.date.add(slot.start_date, 1, \"day\").valueOf() < state.max_date.valueOf()){\r\n\t\t\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\tsection = slot.section;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tnewPos.section = section;\r\n\t\t\treturn newPos;\r\n\t\t},\r\n\r\n\t\t_moveDate: function(oldDate, dir){\r\n\t\t\tvar newDate = this.findVisibleColumn(scheduler.date.add(oldDate, dir, \"day\"), dir);\r\n\t\t\tnewDate.setHours(oldDate.getHours());\r\n\t\t\tnewDate.setMinutes(oldDate.getMinutes());\r\n\t\t\treturn newDate;\r\n\t\t},\r\n\r\n\t\tisBeforeLastHour: function(date, isStartDate){\r\n\t\t\tvar minutes = date.getMinutes(),\r\n\t\t\t\thours = date.getHours(),\r\n\t\t\t\tlast_hour = scheduler.config.last_hour;\r\n\t\t\treturn (hours < last_hour || (!isStartDate && ((last_hour == 24 || hours == last_hour) && !minutes)));\r\n\t\t},\r\n\t\tisAfterFirstHour: function(date, isStartDate){\r\n\t\t\tvar minutes = date.getMinutes(),\r\n\t\t\t\thours = date.getHours(),\r\n\t\t\t\tfirst_hour = scheduler.config.first_hour,\r\n\t\t\t\tlast_hour = scheduler.config.last_hour;\r\n\t\t\treturn (hours >= first_hour || (!isStartDate && (!minutes && ((!hours && last_hour == 24) || (hours == last_hour)))));\r\n\t\t},\r\n\t\tisInVisibleDayTime: function(date, isStartDate){\r\n\t\t\treturn (this.isBeforeLastHour(date, isStartDate) && this.isAfterFirstHour(date, isStartDate));\r\n\t\t},\r\n\r\n\t\tnextDaySlot: function(slot, dir, extend){\r\n\t\t\tvar start, end;\r\n\r\n\t\t\tvar key_nav_step = scheduler.config.key_nav_step;\r\n\r\n\t\t\tvar date = this._alignTimeSlot(slot.start_date, scheduler.date.day_start(new Date(slot.start_date)), \"minute\", key_nav_step);\r\n\r\n\r\n\t\t\tvar oldStart = slot.start_date;\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tstart = scheduler.date.add(date, -key_nav_step, \"minute\");\r\n\r\n\t\t\t\t\tif(!this.isInVisibleDayTime(start, true)){\r\n\t\t\t\t\t\tif (!extend || this.isInVisibleDayTime(oldStart, true)) {\r\n\r\n\t\t\t\t\t\t\tvar toNextDay = true;\r\n\t\t\t\t\t\t\tif(extend && scheduler.date.date_part(new Date(start)).valueOf() != scheduler.date.date_part(new Date(oldStart)).valueOf())\r\n\t\t\t\t\t\t\t\ttoNextDay = false;\r\n\t\t\t\t\t\t\tif(toNextDay)\r\n\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, -1, \"day\"), -1);\r\n\r\n\t\t\t\t\t\t\tstart.setHours(scheduler.config.last_hour);\r\n\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\tstart = scheduler.date.add(start, -key_nav_step, \"minute\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tstart = scheduler.date.add(date, key_nav_step, \"minute\");\r\n\r\n\t\t\t\t\tvar testEnd = extend ? start : scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tif(!this.isInVisibleDayTime(testEnd, false)){\r\n\t\t\t\t\t\tif(!extend || this.isInVisibleDayTime(oldStart, false)) {\r\n\t\t\t\t\t\t\tif (!extend) {\r\n\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, 1, \"day\"), 1);\r\n\t\t\t\t\t\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tvar toNextDay = true;\r\n\t\t\t\t\t\t\t\tif (scheduler.date.date_part(new Date(oldStart)).valueOf() == oldStart.valueOf()) {\r\n\t\t\t\t\t\t\t\t\ttoNextDay = false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (toNextDay) {\r\n\t\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, 1, \"day\"), 1);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\t\tstart = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tstart = this._moveDate(slot.start_date, -1);\r\n\t\t\t\t\tend = this._moveDate(slot.end_date, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tstart = this._moveDate(slot.start_date, 1);\r\n\t\t\t\t\tend = this._moveDate(slot.end_date, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tstart = date;\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\t\tnextWeekAgendaSlot: function(slot, dir){\r\n\t\t\tvar start, end;\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tstart = scheduler.date.day_start(scheduler.date.add(slot.start_date, -1, \"day\"));\r\n\t\t\t\t\tstart = this.findVisibleColumn(start, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tstart = scheduler.date.day_start(scheduler.date.add(slot.start_date, 1, \"day\"));\r\n\t\t\t\t\tstart = this.findVisibleColumn(start, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tstart = scheduler.date.day_start(slot.start_date);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif(slot.start_date.valueOf() < state.min_date.valueOf() || slot.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tstart = new Date(state.min_date);\r\n\r\n\t\t\t}\r\n\t\t\tend = new Date(start);\r\n\t\t\tend.setHours(scheduler.config.last_hour);\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\t\tnextAgendaSlot: function(slot, dir){\r\n\t\t\treturn {start_date: slot.start_date, end_date: slot.end_date};\r\n\t\t},\r\n\r\n\r\n\t\tisDateVisible: function(date){\r\n\t\t\tif(!scheduler._ignores_detected)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[scheduler.getState().mode];\r\n\r\n\t\t\tvar index;\r\n\t\t\tif(timeline){\r\n\t\t\t\tindex = scheduler._get_date_index(timeline, date);\r\n\t\t\t}else{\r\n\t\t\t\tindex = scheduler.locate_holder_day(date);\r\n\t\t\t}\r\n\r\n\t\t\treturn !scheduler._ignores[index];\r\n\t\t},\r\n\r\n\t\tfindVisibleColumn: function(start, dir){\r\n\t\t\tvar date = start;\r\n\t\t\tdir = dir || 1;\r\n\t\t\tvar range = scheduler.getState();\r\n\r\n\t\t\twhile(!this.isDateVisible(date) && ((dir > 0 && date.valueOf() <= range.max_date.valueOf()) || (dir < 0 && date.valueOf() >= range.min_date.valueOf()))){\r\n\t\t\t\tdate = this.nextDateColumn(date, dir);\r\n\t\t\t}\r\n\r\n\t\t\treturn date;\r\n\t\t},\r\n\r\n\t\tnextDateColumn: function(start, dir){\r\n\t\t\tdir = dir || 1;\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[scheduler.getState().mode];\r\n\r\n\t\t\tvar date;\r\n\t\t\tif(timeline){\r\n\t\t\t\tdate = scheduler.date.add(start, dir * timeline.x_step, timeline.x_unit);\r\n\t\t\t}else{\r\n\t\t\t\tdate = scheduler.date.day_start(scheduler.date.add(start, dir, \"day\"));\r\n\t\t\t}\r\n\r\n\t\t\treturn date;\r\n\t\t},\r\n\r\n\t\tisVisible:function(from, to){\r\n\t\t\tif(!scheduler._ignores_detected)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tvar current = new Date(from);\r\n\r\n\t\t\twhile(current.valueOf() < to.valueOf()){\r\n\t\t\t\tif(this.isDateVisible(current)) return true;\r\n\t\t\t\tcurrent = this.nextDateColumn(current);\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t},\r\n\r\n\t\tnextSlot: function(slot, dir, view, extend){\r\n\t\t\tvar next;\r\n\t\t\tview = view || this._getMode();\r\n\r\n\t\t\tvar tempSlot = scheduler.$keyboardNavigation.TimeSlot.prototype.clone(slot);\r\n\r\n\t\t\tswitch (view){\r\n\t\t\t\tcase this._modes.units:\r\n\t\t\t\t\tnext = this.nextUnitsSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.timeline:\r\n\t\t\t\t\tnext = this.nextTimelineSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.year:\r\n\t\t\t\t\tnext = this.nextMonthSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.month:\r\n\t\t\t\t\tnext = this.nextMonthSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.weekAgenda:\r\n\t\t\t\t\tnext = this.nextWeekAgendaSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.list:\r\n\t\t\t\t\tnext = this.nextAgendaSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.dayColumns:\r\n\t\t\t\t\tnext = this.nextDaySlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(next.start_date.valueOf() >= next.end_date.valueOf()){\r\n\t\t\t\tnext = this.nextSlot(next, dir, view);\r\n\t\t\t}\r\n\r\n\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(next);\r\n\r\n\t\t},\r\n\r\n\t\textendSlot: function(slot, dir){\r\n\t\t\tvar view = this._getMode();\r\n\t\t\tvar next;\r\n\t\t\tswitch (view){\r\n\t\t\t\tcase this._modes.units:\r\n\t\t\t\t\tif(dir == \"left\" || dir == \"right\"){\r\n\t\t\t\t\t\tnext = this.nextUnitsSlot(slot, dir);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnext = this.extendUnitsSlot(slot, dir);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.timeline:\r\n\t\t\t\t\tif(dir == \"down\" || dir == \"up\"){\r\n\t\t\t\t\t\tnext = this.nextTimelineSlot(slot, dir);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnext = this.extendTimelineSlot(slot, dir);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.year:\r\n\t\t\t\t\tnext = this.extendMonthSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.month:\r\n\t\t\t\t\tnext = this.extendMonthSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.dayColumns:\r\n\t\t\t\t\tnext = this.extendDaySlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.weekAgenda:\r\n\t\t\t\t\tnext = this.extendWeekAgendaSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnext = slot;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tvar range = scheduler.getState();\r\n\t\t\tif(next.start_date.valueOf() < range.min_date.valueOf()){\r\n\t\t\t\tnext.start_date = this.findVisibleColumn(range.min_date);\r\n\t\t\t\tnext.start_date.setHours(scheduler.config.first_hour);\r\n\t\t\t}\r\n\r\n\t\t\tif(next.end_date.valueOf() > range.max_date.valueOf()){\r\n\t\t\t//\tnext.end_date = new Date(slot.end_date);\r\n\t\t\t\tnext.end_date = this.findVisibleColumn(range.max_date, -1);\r\n\t\t\t}\r\n\r\n\r\n\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(next);\r\n\t\t},\r\n\r\n\t\textendTimelineSlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"timeline\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\textendWeekAgendaSlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"weekAgenda\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\textendGenericSlot: function(allowedDirections, slot, direction, type){\r\n\t\t\tvar next;\r\n\t\t\tvar moveDate = slot.movingDate;\r\n\r\n\t\t\tif(!moveDate){\r\n\t\t\t\tmoveDate = allowedDirections[direction];\r\n\t\t\t}\r\n\r\n\t\t\tif(!moveDate || !allowedDirections[direction]){\r\n\t\t\t\treturn slot;\r\n\t\t\t}\r\n\r\n\t\t\tif(direction){\r\n\t\t\t\tnext = this.nextSlot({start_date: slot[moveDate], section: slot.section}, direction, type, true);\r\n\r\n\t\t\t\tif(next.start_date.valueOf() == slot.start_date.valueOf()){\r\n\t\t\t\t\tnext = this.nextSlot({start_date: next.start_date, section:next.section}, direction, type, true);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tnext.movingDate = moveDate;\r\n\t\t\t}else{\r\n\t\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(slot);\r\n\t\t\t}\r\n\r\n\t\t\tvar newDates = this.extendSlotDates(slot, next, next.movingDate);\r\n\r\n\t\t\tif(newDates.end_date.valueOf() <= newDates.start_date.valueOf()){\r\n\t\t\t\tnext.movingDate = next.movingDate == \"end_date\" ? \"start_date\" : \"end_date\";\r\n\t\t\t}\r\n\t\t\tnewDates = this.extendSlotDates(slot, next, next.movingDate);\r\n\r\n\t\t\tnext.start_date = newDates.start_date;\r\n\t\t\tnext.end_date = newDates.end_date;\r\n\t\t\treturn next;\r\n\t\t},\r\n\r\n\t\textendSlotDates: function(oldSlot, newSlot, dateDirection){\r\n\t\t\tvar res = {start_date:null, end_date:null};\r\n\r\n\t\t\tif(dateDirection == \"start_date\"){\r\n\t\t\t\tres.start_date = newSlot.start_date;\r\n\t\t\t\tres.end_date = oldSlot.end_date;\r\n\t\t\t}else{\r\n\t\t\t\tres.start_date = oldSlot.start_date;\r\n\t\t\t\tres.end_date = newSlot.start_date;\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\r\n\t\t},\r\n\r\n\t\textendMonthSlot: function(slot, direction){\r\n\t\t\tvar slot = this.extendGenericSlot({\r\n\t\t\t\t\t\"up\":\"start_date\",\r\n\t\t\t\t\t\"down\":\"end_date\",\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"month\"\r\n\t\t\t);\r\n\r\n\t\t\tslot.start_date.setHours(scheduler.config.first_hour);\r\n\t\t\tslot.end_date = scheduler.date.add(slot.end_date, -1, \"day\");\r\n\t\t\tslot.end_date.setHours(scheduler.config.last_hour);\r\n\t\t\treturn slot;\r\n\t\t},\r\n\r\n\t\textendUnitsSlot: function(slot, direction){\r\n\t\t\tvar next;\r\n\r\n\t\t\tswitch (direction){\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tnext = this.extendDaySlot(slot, direction);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnext = slot;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tnext.section = slot.section;\r\n\t\t\treturn next;\r\n\t\t},\r\n\t\textendDaySlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\t\"up\":\"start_date\",\r\n\t\t\t\t\t\"down\":\"end_date\",\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"dayColumns\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\tscrollSlot: function(dir){\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tvar slot = this.nextSlot(this, dir);\r\n\t\t\tif(slot.start_date.valueOf() < state.min_date.valueOf() || slot.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tscheduler.setCurrentView(new Date(slot.start_date));\r\n\t\t\t}\r\n\r\n\t\t\tthis.moveTo(slot);\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tthis.scrollSlot(\"left\");\r\n\t\t\t},\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tthis.scrollSlot(\"right\");\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\r\n\t\t\t\tvar mode = this._getMode();\r\n\t\t\t\tif(mode == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.scrollSlot(\"down\");\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"up\": function () {\r\n\t\t\t\tvar mode = this._getMode();\r\n\t\t\t\tif(mode == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.scrollSlot(\"up\");\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"shift+down\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"down\"));\r\n\t\t\t},\r\n\t\t\t\"shift+up\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"up\"));\r\n\t\t\t},\r\n\t\t\t\"shift+right\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"right\"));\r\n\t\t\t},\r\n\t\t\t\"shift+left\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"left\"));\r\n\t\t\t},\r\n\r\n\r\n\t\t\t\"enter\": function(){\r\n\t\t\t\tvar obj = {start_date: new Date(this.start_date), end_date: new Date(this.end_date)};\r\n\r\n\t\t\t\tvar mode = scheduler.getState().mode;\r\n\t\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\r\n\t\t\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\t\t\tobj[timeline.y_property] = this.section;\r\n\t\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\t\tvar unit = scheduler._props[mode];\r\n\t\t\t\t\tobj[unit.map_to] = this.section;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler.addEventNow(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.TimeSlot.prototype.bindAll(scheduler.$keyboardNavigation.TimeSlot.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.MinicalButton = function(div, index){\r\n\tthis.container = div;\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.MinicalButton.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar container = this.container;\r\n\t\t\treturn !!container.offsetWidth;// valid if container is visible\r\n\t\t},\r\n\r\n\t\tfallback: function(){\r\n\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(defaultSlot.isValid()){\r\n\t\t\t\treturn defaultSlot;\r\n\t\t\t}else{\r\n\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t}\r\n\t\t},\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.globalNode.disable();\r\n\t\t\tthis.container.removeAttribute(\"tabindex\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tthis.container.setAttribute(\"tabindex\", \"0\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\tif(!this.index){\r\n\t\t\t\treturn this.container.querySelector(\".dhx_cal_prev_button\");\r\n\t\t\t}else{\r\n\t\t\t\treturn this.container.querySelector(\".dhx_cal_next_button\");\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"right\": function(e){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, this.index ? 0 : 1));\r\n\t\t\t},\r\n\t\t\t\"left\": function(e){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, this.index ? 0 : 1));\r\n\t\t\t},\r\n\t\t\t\"down\": function(){\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, 0, 0);\r\n\t\t\t\tif(next && !next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"enter\": function(e){\r\n\t\t\t\tthis.getNode().click();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.MinicalButton.prototype.bindAll(scheduler.$keyboardNavigation.MinicalButton.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.MinicalCell = function(div, row, col){\r\n\tthis.container = div;\r\n\tthis.row = row || 0;\r\n\tthis.col = col || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.MinicalCell.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar grid = this._getGrid();\r\n\t\t\treturn !!(grid[this.row] && grid[this.row][this.col]);\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\tvar row = this.row;\r\n\t\t\tvar col = this.col;\r\n\t\t\tvar grid = this._getGrid();\r\n\t\t\tif(!grid[row]){\r\n\t\t\t\trow = 0;\r\n\t\t\t}\r\n\t\t\tvar dir = true;\r\n\t\t\tif(row > grid.length / 2){\r\n\t\t\t\tdir = false;\r\n\t\t\t}\r\n\r\n\t\t\tif(!grid[row]){\r\n\t\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t\tif(defaultSlot.isValid()){\r\n\t\t\t\t\treturn defaultSlot;\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(dir){\r\n\t\t\t\tfor(var c = col; grid[row] && c < grid[row].length; c++){\r\n\t\t\t\t\tif(!grid[row][c] && c == grid[row].length - 1){\r\n\t\t\t\t\t\trow++;\r\n\t\t\t\t\t\tcol = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(grid[row][c]){\r\n\t\t\t\t\t\treturn new scheduler.$keyboardNavigation.MinicalCell(this.container, row, c);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tfor(var c = col; grid[row] && c < grid[row].length; c--){\r\n\t\t\t\t\tif(!grid[row][c] && !c){\r\n\t\t\t\t\t\trow--;\r\n\t\t\t\t\t\tcol = grid[row].length - 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(grid[row][c]){\r\n\t\t\t\t\t\treturn new scheduler.$keyboardNavigation.MinicalCell(this.container, row, c);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn new scheduler.$keyboardNavigation.MinicalButton(this.container, 0);\r\n\t\t},\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.globalNode.disable();\r\n\r\n\t\t\tthis.container.removeAttribute(\"tabindex\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tthis.container.setAttribute(\"tabindex\", \"0\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\t\t_getNode: function(row, col){\r\n\t\t\treturn this.container.querySelector(\".dhx_year_body tr:nth-child(\"+(row + 1) + \") td:nth-child(\"+(col + 1)+\")\");\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\treturn this._getNode(this.row, this.col);\r\n\t\t},\r\n\r\n\t\t_getGrid: function(){\r\n\t\t\tvar rows = this.container.querySelectorAll(\".dhx_year_body tr\");\r\n\t\t\tvar grid = [];\r\n\t\t\tfor(var i = 0; i < rows.length; i++){\r\n\t\t\t\tgrid[i] = [];\r\n\t\t\t\tvar row = rows[i];\r\n\t\t\t\tvar cells = row.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var c = 0; c < cells.length; c++){\r\n\t\t\t\t\tvar cell = cells[c];\r\n\t\t\t\t\tvar enabled = true;\r\n\t\t\t\t\tvar css = scheduler._getClassName(cell);\r\n\t\t\t\t\tif(css.indexOf(\"dhx_after\") > -1 || css.indexOf(\"dhx_before\") > -1 || css.indexOf(\"dhx_scale_ignore\") > -1){\r\n\t\t\t\t\t\tenabled = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tgrid[i][c] = enabled;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn grid;\r\n\t\t},\r\n\r\n\r\n\t\tkeys: {\r\n\t\t\t\"right\": function(e){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row;\r\n\t\t\t\tvar newCol = this.col + 1;\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tif(grid[newRow + 1]){\r\n\t\t\t\t\t\tnewRow = newRow + 1;\r\n\t\t\t\t\t\tnewCol = 0;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnewCol = this.col;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"left\": function(e){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row;\r\n\t\t\t\tvar newCol = this.col - 1;\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tif(grid[newRow - 1]){\r\n\t\t\t\t\t\tnewRow = newRow - 1;\r\n\t\t\t\t\t\tnewCol = grid[newRow].length - 1;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnewCol = this.col;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"down\": function(){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row + 1;\r\n\t\t\t\tvar newCol = this.col;\r\n\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tnewRow = this.row;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"up\": function(){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row - 1;\r\n\t\t\t\tvar newCol = this.col;\r\n\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tvar index = 0;\r\n\t\t\t\t\tif(this.col > grid[this.row].length / 2){\r\n\t\t\t\t\t\tindex = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, index));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.moveTo(next);\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\t\t\t\"enter\": function(e){\r\n\t\t\t\tthis.getNode().querySelector(\".dhx_month_head\").click();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.MinicalCell.prototype.bindAll(scheduler.$keyboardNavigation.MinicalCell.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.DataArea = function(index){\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.DataArea.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\tgetNode: function(index){\r\n\t\t\treturn scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t},\r\n\r\n\t\t_handlers:null,\r\n\r\n\t\tisValid: function(){\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tfallback:function(){\r\n\t\t\treturn this;\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"up,down,right,left\":function(){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.DataArea.prototype.bindAll(scheduler.$keyboardNavigation.DataArea.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.dispatcher = {\r\n\tisActive: false,\r\n\tactiveNode: null,\r\n\tglobalNode: new scheduler.$keyboardNavigation.SchedulerNode(),\r\n\r\n\tkeepScrollPosition: function (callback) {\r\n\t\tvar top, left;\r\n\r\n\t\tvar scrollable = scheduler.$container.querySelector(\".dhx_timeline_scrollable_data\");\r\n\t\tif(!scrollable){\r\n\t\t\tscrollable = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t}\r\n\r\n\t\tif(scrollable){\r\n\t\t\ttop = scrollable.scrollTop;\r\n\t\t\tleft = scrollable.scrollLeft;\r\n\t\t}\r\n\r\n\t\tcallback();\r\n\r\n\t\tif(scrollable){\r\n\t\t\tscrollable.scrollTop = top;\r\n\t\t\tscrollable.scrollLeft = left;\r\n\t\t}\r\n\t},\r\n\tenable: function(){\r\n\t\tif(!scheduler.$container){\r\n\t\t\t// do nothing if not initialized\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.isActive = true;\r\n\t\tvar self = this;\r\n\t\tthis.keepScrollPosition(function () {\r\n\t\t\tself.globalNode.enable();\r\n\t\t\tself.setActiveNode(self.getActiveNode());\r\n\t\t});\r\n\t},\r\n\r\n\tdisable: function(){\r\n\t\tthis.isActive = false;\r\n\t\tthis.globalNode.disable();\r\n\t},\r\n\r\n\tisEnabled: function(){\r\n\t\treturn !!this.isActive;\r\n\t},\r\n\r\n\tgetDefaultNode: function(){\r\n\t\treturn this.globalNode.getDefaultNode();\r\n\t},\r\n\r\n\tsetDefaultNode: function() {\r\n\t\tthis.setActiveNode(this.getDefaultNode());\r\n\t},\r\n\r\n\tgetActiveNode: function(){\r\n\t\tvar node = this.activeNode;\r\n\t\tif(node && !node.isValid()){\r\n\t\t\tnode = node.fallback();\r\n\t\t}\r\n\t\treturn node;\r\n\t},\r\n\r\n\tfocusGlobalNode: function(){\r\n\t\tthis.blurNode(this.globalNode);\r\n\t\tthis.focusNode(this.globalNode);\r\n\t},\r\n\r\n\tsetActiveNode: function(el){\r\n\t\tif(!el || !el.isValid())\r\n\t\t\treturn;\r\n\r\n\t\tif(this.activeNode){\r\n\t\t\tif(this.activeNode.compareTo(el)){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(this.isEnabled()){\r\n\t\t\tthis.blurNode(this.activeNode);\r\n\t\t\tthis.activeNode = el;\r\n\t\t\tthis.focusNode(this.activeNode);\r\n\t\t}\r\n\t},\r\n\r\n\tfocusNode: function(el){\r\n\t\tif(el && el.focus){\r\n\t\t\tel.focus();\r\n\t\t\tif(el.getNode && document.activeElement != el.getNode()){\r\n\t\t\t\tthis.setActiveNode(new scheduler.$keyboardNavigation.DataArea());\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tblurNode: function(el){\r\n\t\tif(el && el.blur){\r\n\t\t\tel.blur();\r\n\t\t}\r\n\t},\r\n\r\n\tgetInlineEditor: function(id){\r\n\t\tvar editor = scheduler.$container.querySelector(\".dhx_cal_editor[\"+scheduler.config.event_attribute+\"='\"+id+\"'] textarea\");\r\n\t\tif(editor && editor.offsetWidth){\r\n\t\t\t// if exists and visible\r\n\t\t\treturn editor;\r\n\t\t}\r\n\t\treturn null;\r\n\t},\r\n\r\n\tkeyDownHandler: function (e) {\r\n\r\n\t\tif(e.defaultPrevented){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar activeElement = this.getActiveNode();\r\n\r\n\t\tif(scheduler.$keyboardNavigation.isModal() &&\r\n\t\t\t!(activeElement && activeElement.container && scheduler.utils.dom.locateCss({target:activeElement.container}, \"dhx_minical_popup\", false)))\r\n\t\t\treturn;\r\n\r\n\t\tif(scheduler.getState().editor_id && this.getInlineEditor(scheduler.getState().editor_id))\r\n\t\t\treturn;\r\n\r\n\t\tif (!this.isEnabled())\r\n\t\t\treturn;\r\n\r\n\t\te = e || window.event;\r\n\r\n\t\tvar schedulerNode = this.globalNode;\r\n\r\n\t\tvar command = scheduler.$keyboardNavigation.shortcuts.getCommandFromEvent(e);\r\n\r\n\t\tif(!activeElement){\r\n\t\t\tthis.setDefaultNode();\r\n\t\t}else if(activeElement.findHandler(command)){\r\n\t\t\tactiveElement.doAction(command, e);\r\n\t\t}else if(schedulerNode.findHandler(command)){\r\n\t\t\tschedulerNode.doAction(command, e);\r\n\t\t}\r\n\r\n\t},\r\n\r\n\t_timeout: null,\r\n\tdelay: function(callback, delay){\r\n\r\n\t\tclearTimeout(this._timeout);\r\n\t\tthis._timeout = setTimeout(callback, delay || 1);\r\n\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation._minicalendars = [];\r\n\r\nscheduler.$keyboardNavigation.isMinical = function(node){\r\n\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\tif(this.isChildOf(node, minicalendars[i]))\r\n\t\t\treturn true;\r\n\t}\r\n\treturn false;\r\n};\r\n\r\nscheduler.$keyboardNavigation.isChildOf = function(child, parent){\r\n\twhile(child && child !== parent){\r\n\t\tchild = child.parentNode;\r\n\t}\r\n\r\n\treturn !!(child === parent);\r\n};\r\n\r\nscheduler.$keyboardNavigation.patchMinicalendar = function(){\r\n\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\tfunction focusMinical(e){\r\n\t\tvar target = e.target;\r\n\r\n\t\tdispatcher.enable();\r\n\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.MinicalButton(target, 0));\r\n\t}\r\n\r\n\tfunction minicalClick(e){\r\n\t\tvar target = e.target || e.srcElement;\r\n\r\n\t\tvar prev = scheduler.utils.dom.locateCss(e, \"dhx_cal_prev_button\", false);\r\n\t\tvar next = scheduler.utils.dom.locateCss(e, \"dhx_cal_next_button\", false);\r\n\t\tvar cell = scheduler.utils.dom.locateCss(e, \"dhx_year_body\", false);\r\n\r\n\t\tvar rowIndex = 0;\r\n\t\tvar cellIndex = 0;\r\n\t\tif(cell){\r\n\t\t\tvar tr;\r\n\t\t\tvar td;\r\n\t\t\tvar current = target;\r\n\t\t\twhile(current && current.tagName.toLowerCase() != \"td\"){\r\n\t\t\t\tcurrent = current.parentNode;\r\n\t\t\t}\r\n\t\t\tif(current){\r\n\t\t\t\ttd = current;\r\n\t\t\t\ttr = td.parentNode;\r\n\t\t\t}\r\n\r\n\t\t\tif(tr && td){\r\n\t\t\t\tvar rows = tr.parentNode.querySelectorAll(\"tr\");\r\n\t\t\t\tfor(var i = 0; i < rows.length; i++){\r\n\t\t\t\t\tif(rows[i] == tr){\r\n\t\t\t\t\t\trowIndex = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tvar cells = tr.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\t\t\tif(cells[i] == td){\r\n\t\t\t\t\t\tcellIndex = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar root = e.currentTarget;\r\n\t\tdispatcher.delay(function(){\r\n\t\t\tif(prev || next || cell){\r\n\r\n\t\t\t\tvar element;\r\n\t\t\t\tif(prev){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalButton(root, 0);\r\n\t\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.MinicalButton(root, 0));\r\n\t\t\t\t}else if(next){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalButton(root, 1);\r\n\t\t\t\t}else if(cell){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalCell(root, rowIndex, cellIndex);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(element){\r\n\r\n\t\t\t\t\tdispatcher.enable();\r\n\t\t\t\t\tif(element.isValid()){\r\n\t\t\t\t\t\tdispatcher.activeNode = null;\r\n\t\t\t\t\t\tdispatcher.setActiveNode(element);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t}\r\n\r\n\tif(scheduler.renderCalendar){\r\n\t\tvar renderMinical = scheduler.renderCalendar;\r\n\t\tscheduler.renderCalendar = function(){\r\n\t\t\tvar cal = renderMinical.apply(this, arguments);\r\n\t\t\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\r\n\t\t\tscheduler.eventRemove(cal, \"click\", minicalClick);\r\n\t\t\tscheduler.event(cal, \"click\", minicalClick);\r\n\r\n\t\t\tscheduler.eventRemove(cal, \"focus\", focusMinical);\r\n\t\t\tscheduler.event(cal, \"focus\", focusMinical);\r\n\r\n\t\t\tvar added = false;\r\n\t\t\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\t\t\tif(minicalendars[i] == cal){\r\n\t\t\t\t\tadded = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(!added)\r\n\t\t\t\tminicalendars.push(cal);\r\n\r\n\t\t\tif(dispatcher.isEnabled()){\r\n\t\t\t\tvar node = dispatcher.getActiveNode();\r\n\t\t\t\tif(node && node.container == cal){\r\n\t\t\t\t\tdispatcher.focusNode(node);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcal.setAttribute(\"tabindex\", \"0\");\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tcal.setAttribute(\"tabindex\", \"0\");\r\n\t\t\t}\r\n\t\t\treturn cal;\r\n\t\t};\r\n\t}\r\n\r\n\tif(scheduler.destroyCalendar){\r\n\t\tvar destroyMinical = scheduler.destroyCalendar;\r\n\t\tscheduler.destroyCalendar = function(cal, force){\r\n\t\t\tcal = cal || (scheduler._def_count ? scheduler._def_count.firstChild : null);\r\n\t\t\tvar res = destroyMinical.apply(this, arguments);\r\n\r\n\t\t\tif(!cal || !cal.parentNode){\r\n\t\t\t\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\t\t\t\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\t\t\t\tif(minicalendars[i] == cal){\r\n\t\t\t\t\t\tscheduler.eventRemove(minicalendars[i], \"focus\", focusMinical);\r\n\t\t\t\t\t\tminicalendars.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn res;\r\n\t\t};\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\r\n\tthis.layers.sort(function(a, b){\r\n\t\treturn a.zIndex - b.zIndex;\r\n\t});\r\n\r\n\tscheduler._dp_init=function(dp){\r\n\t\tdp._methods=[\"_set_event_text_style\",\"\",\"changeEventId\",\"deleteEvent\"];\r\n\r\n\t\tthis.attachEvent(\"onEventAdded\",function(id){\r\n\t\t\tif (!this._loading && this.validId(id) && this.getEvent(id) && this.getEvent(id).layer == dp.layer)\r\n\t\t\t\tdp.setUpdated(id,true,\"inserted\");\r\n\t\t});\r\n\t\tthis.attachEvent(\"onBeforeEventDelete\",function(id){\r\n\t\t\tif(this.getEvent(id) && this.getEvent(id).layer == dp.layer) {\r\n\t\t\t\tif (!this.validId(id)) return;\r\n\t\t\t\tvar z=dp.getState(id);\r\n\r\n\t\t\t\tif (z==\"inserted\" || this._new_event) { dp.setUpdated(id,false);\t\treturn true; }\r\n\t\t\t\tif (z==\"deleted\") return false;\r\n\t\t\t\tif (z==\"true_deleted\") return true;\r\n\r\n\t\t\t\tdp.setUpdated(id,true,\"deleted\");\r\n\t\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\telse return true;\r\n\t\t});\r\n\t\tthis.attachEvent(\"onEventChanged\",function(id){\r\n\t\t\tif (!this._loading && this.validId(id) && this.getEvent(id) && this.getEvent(id).layer == dp.layer)\r\n\t\t\t\tdp.setUpdated(id,true,\"updated\");\r\n\t\t});\r\n\r\n\t\tdp._getRowData=function(id,pref){\r\n\t\t\tvar ev=this.obj.getEvent(id);\r\n\t\t\tvar data = {};\r\n\r\n\t\t\tfor (var a in ev){\r\n\t\t\t\tif (a.indexOf(\"_\")===0) continue;\r\n\t\t\t\tif (ev[a] && ev[a].getUTCFullYear) //not very good, but will work\r\n\t\t\t\t\tdata[a] = this.obj._helpers.formatDate(ev[a]);\r\n\t\t\t\telse\r\n\t\t\t\t\tdata[a] = ev[a];\r\n\t\t\t}\r\n\t\t\treturn data;\r\n\t\t};\r\n\t\tdp._clearUpdateFlag=function(){};\r\n\r\n\t\tdp.attachEvent(\"insertCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"updateCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"deleteCallback\", function(upd, id) {\r\n\t\t\tthis.obj.setUserData(id, this.action_param, \"true_deleted\");\r\n\t\t\tthis.obj.deleteEvent(id);\r\n\t\t});\r\n\t};\r\n\r\n\t(function() {\r\n var _cloneObj = function(obj){\r\n if(obj === null || typeof(obj) != 'object')\r\n return obj;\r\n var temp = new obj.constructor();\r\n for(var key in obj)\r\n temp[key] = _cloneObj(obj[key]);\r\n return temp;\r\n };\r\n\r\n\t\tscheduler._dataprocessors = [];\r\n\t\tscheduler._layers_zindex = {};\r\n\t\tfor(var i=0; i= scheduler.config.collision_limit);\r\n\t});\r\n\r\n\tscheduler.addEvent=function(start_date,end_date,text,id,extra_data){\r\n\t\tvar ev=start_date;\r\n\t\tif (arguments.length!=1){\r\n\t\t\tev=extra_data||{};\r\n\t\t\tev.start_date=start_date;\r\n\t\t\tev.end_date=end_date;\r\n\t\t\tev.text=text;\r\n\t\t\tev.id=id;\r\n\t\t\tev.layer = this.defaultLayer;\r\n\t\t}\r\n\t\tev.id = ev.id||scheduler.uid();\r\n\t\tev.text = ev.text||\"\";\r\n\r\n\r\n\t\tif (typeof ev.start_date == \"string\") ev.start_date=this.templates.api_date(ev.start_date);\r\n\t\tif (typeof ev.end_date == \"string\") ev.end_date=this.templates.api_date(ev.end_date);\r\n\t\tev._timed=this.isOneDayEvent(ev);\r\n\r\n\t\tvar is_new=!this._events[ev.id];\r\n\t\tthis._events[ev.id]=ev;\r\n\t\tthis.event_updated(ev);\r\n\t\tif (!this._loading)\r\n\t\t\tthis.callEvent(is_new?\"onEventAdded\":\"onEventChanged\",[ev.id,ev]);\r\n\t};\r\n\r\n\tthis._evs_layer = {};\r\n\tfor (var i = 0; i < this.layers.length; i++) { // array in object for each layer\r\n\t\tthis._evs_layer[this.layers[i].name] = [];\r\n\t}\r\n\r\n\tscheduler.addEventNow=function(start,end,e){\r\n\t\tvar base = {};\r\n\t\tif (typeof start == \"object\"){\r\n\t\t\tbase = start;\r\n\t\t\tstart = null;\r\n\t\t}\r\n\r\n\t\tvar d = (this.config.event_duration||this.config.time_step)*60000;\r\n\t\tif (!start) start = Math.round((scheduler._currentDate()).valueOf()/d)*d;\r\n\t\tvar start_date = new Date(start);\r\n\t\tif (!end){\r\n\t\t\tvar start_hour = this.config.first_hour;\r\n\t\t\tif (start_hour > start_date.getHours()){\r\n\t\t\t\tstart_date.setHours(start_hour);\r\n\t\t\t\tstart = start_date.valueOf();\r\n\t\t\t}\r\n\t\t\tend = start+d;\r\n\t\t}\r\n\r\n\r\n\t\tbase.start_date = base.start_date||start_date;\r\n\t\tbase.end_date = base.end_date||new Date(end);\r\n\t\tbase.text = base.text||this.locale.labels.new_event;\r\n\t\tbase.id = this._drag_id = this.uid();\r\n\t\tbase.layer = this.defaultLayer;\r\n\t\tthis._drag_mode=\"new-size\";\r\n\r\n\t\tthis._loading=true;\r\n\t\tthis.addEvent(base);\r\n\t\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\t\tthis._loading=false;\r\n\r\n\t\tthis._drag_event={}; //dummy , to trigger correct event updating logic\r\n\t\tthis._on_mouse_up(e);\r\n\t};\r\n\r\n\tscheduler._t_render_view_data = function(events) { // helper\r\n\t\tif (this.config.multi_day && !this._table_view) {\r\n\t\t\tvar tvs = [];\r\n\t\t\tvar tvd = [];\r\n\t\t\tfor (var k = 0; k < events.length; k++) {\r\n\t\t\t\tif (events[k]._timed)\r\n\t\t\t\t\ttvs.push(events[k]);\r\n\t\t\t\telse\r\n\t\t\t\t\ttvd.push(events[k]);\r\n\t\t\t}\r\n\t\t\tthis._table_view = true;\r\n\t\t\tthis.render_data(tvd);\r\n\t\t\tthis._table_view = false;\r\n\t\t\tthis.render_data(tvs);\r\n\t\t}\r\n\t\telse\r\n\t\t\tthis.render_data(events);\r\n\t};\r\n\r\n\tscheduler.render_view_data = function(){\r\n\t\tif (this._not_render) {\r\n\t\t\tthis._render_wait = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._render_wait = false;\r\n\r\n\t\tthis.clear_view();\r\n\r\n\t\tthis._evs_layer = {};\r\n\t\tfor (var i = 0; i < this.layers.length; i++) { // array in object for each layer\r\n\t\t\tthis._evs_layer[this.layers[i].name] = [];\r\n\t\t}\r\n\r\n\t\tvar evs = this.get_visible_events();\r\n\t\tfor (var i = 0; i < evs.length; i++) { // filling layer arrays with events\r\n\t\t\tif(this._evs_layer[evs[i].layer])\r\n\t\t\t\tthis._evs_layer[evs[i].layer].push(evs[i]);\r\n\t\t}\r\n\r\n\t\tif(this._mode == 'month') { // old logic is used\r\n\t\t\tvar tevs = [];\r\n\t\t\tfor (var i = 0; i < this.layers.length; i++) {\r\n\t\t\t\tif (this.layers[i].visible)\r\n\t\t\t\t\ttevs = tevs.concat(this._evs_layer[this.layers[i].name]);\r\n\t\t\t}\r\n\t\t\tthis._t_render_view_data(tevs);\r\n\t\t}\r\n\t\telse { // week, day; should use new logic\r\n\t\t\tfor (var i = 0; i < this.layers.length; i++) {\r\n\t\t\t\tif (this.layers[i].visible) {\r\n\t\t\t\t\tvar evs_layer = this._evs_layer[this.layers[i].name];\r\n\t\t\t\t\tthis._t_render_view_data(evs_layer);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._render_v_bar=function(ev,x,y,w,h,style,contentA,contentB,bottom){\r\n\t\tvar id = ev.id;\r\n\r\n\t\tif(contentA.indexOf('
';\r\n\t\thtml+='
 
';\r\n\t\thtml+='
'+contentA+'
';\r\n\t\thtml+='
'+contentB+'
';\r\n\t\thtml+='
';\r\n\r\n\t\td.innerHTML=html;\r\n\t\td.style.zIndex = 100;\r\n\t\treturn d.firstChild;\r\n\t};\r\n\r\n\tscheduler.render_event_bar=function(ev){\r\n\t\tvar parent=this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tvar x=this._colsS[ev._sday];\r\n\t\tvar x2=this._colsS[ev._eday];\r\n\t\tif (x2==x) x2=this._colsS[ev._eday+1];\r\n\t\tvar hb = this.xy.bar_height;\r\n\r\n\t\tvar y=this._colsS.heights[ev._sweek]+(this._colsS.height?(this.xy.month_scale_height+2):2)+ev._sorder*hb;\r\n\r\n\t\tvar d=document.createElement(\"div\");\r\n\t\tvar cs = ev._timed?\"dhx_cal_event_clear\":\"dhx_cal_event_line\";\r\n\t\tvar cse = (scheduler.templates['event_class_'+ev.layer])?scheduler.templates['event_class_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_class(ev.start_date,ev.end_date,ev);\r\n\t\tif (cse) cs=cs+\" \"+cse;\r\n\r\n\t\tvar html='
';\r\n\r\n\t\tif (ev._timed)\r\n\t\t\thtml+=(scheduler.templates['event_bar_date_'+ev.layer])?scheduler.templates['event_bar_date_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_bar_date(ev.start_date,ev.end_date,ev);\r\n\t\thtml+=( (scheduler.templates['event_bar_text_'+ev.layer])?scheduler.templates['event_bar_text_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_bar_text(ev.start_date,ev.end_date,ev) + '
)');\r\n\t\thtml+='
';\r\n\r\n\t\td.innerHTML=html;\r\n\r\n\t\tthis._rendered.push(d.firstChild);\r\n\t\tparent.appendChild(d.firstChild);\r\n\t};\r\n\r\n\tscheduler.render_event=function(ev){\r\n\t\tvar menu = scheduler.xy.menu_width;\r\n\t\tif(scheduler.getLayer(ev.layer).noMenu)\r\n\t\t\tmenu = 0;\r\n\r\n\t\tif (ev._sday<0) return; //can occur in case of recurring event during time shift\r\n\t\tvar parent=scheduler.locate_holder(ev._sday);\r\n\t\tif (!parent) return; //attempt to render non-visible event\r\n\t\tvar sm = ev.start_date.getHours()*60+ev.start_date.getMinutes();\r\n\t\tvar em = (ev.end_date.getHours()*60+ev.end_date.getMinutes())||(scheduler.config.last_hour*60);\r\n\r\n\t\tvar top = (Math.round((sm*60*1000-this.config.first_hour*60*60*1000)*this.config.hour_size_px/(60*60*1000)))%(this.config.hour_size_px*24)+1; //42px/hour\r\n\t\tvar height = Math.max(scheduler.xy.min_event_height,(em-sm)*this.config.hour_size_px/60)+1; //42px/hour\r\n\t\t\r\n\t\tvar width=Math.floor((parent.clientWidth-menu)/ev._count);\r\n\t\tvar left=ev._sorder*width+1;\r\n\t\tif (!ev._inner) width=width*(ev._count-ev._sorder);\r\n\r\n\r\n\r\n\t\tvar d=this._render_v_bar(ev.id,menu+left,top,width,height,ev._text_style,scheduler.templates.event_header(ev.start_date,ev.end_date,ev),scheduler.templates.event_text(ev.start_date,ev.end_date,ev));\r\n\r\n\t\tthis._rendered.push(d);\r\n\t\tparent.appendChild(d);\r\n\r\n\t\tleft=left+parseInt(parent.style.left,10)+menu;\r\n\r\n\t\ttop+=this._dy_shift; //corrupt top, to include possible multi-day shift\r\n\t\td.style.zIndex = this._layers_zindex[ev.layer];\r\n\r\n\t\tif (this._edit_id==ev.id){\r\n\t\t\td.style.zIndex = parseInt(d.style.zIndex)+1; //fix overlapping issue\r\n\t\t\tvar new_zIndex = d.style.zIndex;\r\n\t\t\twidth=Math.max(width-4,scheduler.xy.editor_width);\r\n\t\t\tvar d=document.createElement(\"div\");\r\n\t\t\td.setAttribute(\"event_id\",ev.id); // for backward compatibility\r\n\t\t\td.setAttribute(this.config.event_attribute,ev.id);\r\n\t\t\tthis.set_xy(d,width,height-20,left,top+14);\r\n\t\t\td.className=\"dhx_cal_editor\";\r\n\t\t\td.style.zIndex = new_zIndex;\r\n\t\t\tvar d2=document.createElement(\"div\");\r\n\t\t\tthis.set_xy(d2,width-6,height-26);\r\n\t\t\td2.style.cssText+=\";margin:2px 2px 2px 2px;overflow:hidden;\";\r\n\r\n\r\n\t\t\td2.style.zIndex = new_zIndex;\r\n\t\t\td.appendChild(d2);\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].appendChild(d);\r\n\t\t\tthis._rendered.push(d);\r\n\r\n\t\t\td2.innerHTML=\"\";\r\n\r\n\t\t\tthis._editor=d2.firstChild;\r\n\t\t\tthis._editor.addEventListener(\"keypress\", function(e){\r\n\t\t\t\tif (e.shiftKey) return true;\r\n\t\t\t\tvar code= e.keyCode;\r\n\t\t\t\tif (code==scheduler.keys.edit_save) scheduler.editStop(true);\r\n\t\t\t\tif (code==scheduler.keys.edit_cancel) scheduler.editStop(false);\r\n\t\t\t});\r\n\t\t\tthis._editor.addEventListener(\"selectstart\", function(e){ e.cancelBubble=true; return true; });\r\n\t\t\td2.firstChild.focus();\r\n\t\t\t//IE and opera can add x-scroll during focusing\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].scrollLeft=0;\r\n\t\t\td2.firstChild.select();\r\n\t\t}\r\n\t\tif (this._select_id==ev.id){\r\n\t\t\td.style.zIndex = parseInt(d.style.zIndex)+1; //fix overlapping issue\r\n\t\t\tvar icons=this.config[\"icons_\"+((this._edit_id==ev.id)?\"edit\":\"select\")];\r\n\t\t\tvar icons_str=\"\";\r\n\t\t\tfor (var i=0; i
\";\r\n\t\t\tvar obj = this._render_v_bar(ev.id,left-menu+1,top,menu,icons.length*20+26,\"\",\"
\",icons_str,true);\r\n\t\t\tobj.style.left=left-menu+1;\r\n\t\t\tobj.style.zIndex = d.style.zIndex;\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].appendChild(obj);\r\n\t\t\tthis._rendered.push(obj);\r\n\t\t}\r\n\r\n\t};\r\n\r\n scheduler.filter_agenda = function(id, event) {\r\n var layer = scheduler.getLayer(event.layer);\r\n return (layer && layer.visible);\r\n };\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.limit_start = null;\r\nscheduler.config.limit_end = null;\r\nscheduler.config.limit_view = false;\r\nscheduler.config.check_limits = true;\r\n\r\nscheduler._temp_limit_scope = function(){\r\n\tvar before = null;\r\n\tvar dhx_time_block = \"dhx_time_block\";\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\",function(om,od,nm,nd){\r\n\r\n\t\tfunction isBlocked(date, mode){\r\n\t\t\tvar limit_start = scheduler.config.limit_start,\r\n\t\t\t\tlimit_end = scheduler.config.limit_end,\r\n\t\t\t\tdate_end = scheduler.date.add(date,1,mode);\r\n\r\n\t\t\treturn (date.valueOf() > limit_end.valueOf() || date_end <= limit_start.valueOf());\r\n\t\t}\r\n\r\n\t\tif (scheduler.config.limit_view){\r\n\t\t\tnd = nd||od; nm = nm||om;\r\n\t\t\tif (isBlocked(nd, nm) && !(od.valueOf() == nd.valueOf())){\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar resetDate = !isBlocked(od, nm) ? od : scheduler.config.limit_start;\r\n\r\n\t\t\t\t\tscheduler.setCurrentView(!isBlocked(resetDate, nm) ? resetDate : null, nm);\r\n\t\t\t\t},1);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onMouseDown\", function(classname) {\r\n\t\treturn !(classname == dhx_time_block);\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeDrag\",function(id){\r\n\t\tif (!id) return true;\r\n\t\treturn scheduler.checkLimitViolation(scheduler.getEvent(id));\r\n\t});\r\n\tscheduler.attachEvent(\"onClick\", function (event_id, native_event_object){\r\n\t\treturn scheduler.checkLimitViolation(scheduler.getEvent(event_id));\r\n });\r\n\tscheduler.attachEvent(\"onBeforeLightbox\",function(id){\r\n\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tbefore = [ev.start_date, ev.end_date];\r\n\t\treturn scheduler.checkLimitViolation(ev);\r\n\t});\r\n\tscheduler.attachEvent(\"onEventSave\", function(id, data, is_new_event) {\r\n\r\n\t\t//lightbox may not have 'time' section\r\n\t\tif(!(data.start_date && data.end_date)){\r\n\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\tdata.start_date = new Date(ev.start_date);\r\n\t\t\tdata.end_date = new Date(ev.end_date);\r\n\t\t}\r\n\r\n\t\tif(data.rec_type){\r\n\t\t\t//_roll_back_dates modifies start_date of recurring event, need to check limits after modification\r\n\t\t\t// use a copy to keep original event unchanged\r\n\t\t\tvar data_copy = scheduler._lame_clone(data);\r\n\t\t\tscheduler._roll_back_dates(data_copy);\r\n\t\t\treturn scheduler.checkLimitViolation(data_copy);\r\n\t\t}\r\n\t\treturn scheduler.checkLimitViolation(data);\r\n\t});\r\n\tscheduler.attachEvent(\"onEventAdded\",function(id){\r\n\t\tif (!id) return true;\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif (!scheduler.checkLimitViolation(ev) && scheduler.config.limit_start && scheduler.config.limit_end) {\r\n\t\t\t//if newly created event is outside of limited time - crop it, leaving only allowed time\r\n\t\t\tif (ev.start_date < scheduler.config.limit_start) {\r\n\t\t\t\tev.start_date = new Date(scheduler.config.limit_start);\r\n\t\t\t}\r\n\t\t\tif (ev.start_date.valueOf() >= scheduler.config.limit_end.valueOf()) {\r\n\t\t\t\tev.start_date = this.date.add(scheduler.config.limit_end, -1, \"day\");\r\n\t\t\t}\r\n\t\t\tif (ev.end_date < scheduler.config.limit_start) {\r\n\t\t\t\tev.end_date = new Date(scheduler.config.limit_start);\r\n\t\t\t}\r\n\t\t\tif (ev.end_date.valueOf() >= scheduler.config.limit_end.valueOf()) {\r\n\t\t\t\tev.end_date = this.date.add(scheduler.config.limit_end, -1, \"day\");\r\n\t\t\t}\r\n\t\t\tif (ev.start_date.valueOf() >= ev.end_date.valueOf()) {\r\n\t\t\t\tev.end_date = this.date.add(ev.start_date, (this.config.event_duration||this.config.time_step), \"minute\");\r\n\t\t\t}\r\n\t\t\tev._timed=this.isOneDayEvent(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\",function(id){\r\n\t\tif (!id) return true;\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif (!scheduler.checkLimitViolation(ev)){\r\n\t\t\tif (!before) return false;\r\n\t\t\tev.start_date = before[0];\r\n\t\t\tev.end_date = before[1];\r\n\t\t\tev._timed=this.isOneDayEvent(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeEventChanged\",function(ev, native_object, is_new){\r\n\t\treturn scheduler.checkLimitViolation(ev);\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeEventCreated\", function(ev) { // native event\r\n\t\tvar start_date = scheduler.getActionData(ev).date;\r\n\t\tvar event = {\r\n\t\t\t_timed: true,\r\n\t\t\tstart_date: start_date,\r\n\t\t\tend_date: scheduler.date.add(start_date, scheduler.config.time_step, \"minute\")\r\n\t\t};\r\n\t\treturn scheduler.checkLimitViolation(event);\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", function(){\r\n\t\tscheduler._mark_now();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onAfterSchedulerResize\", function(){\r\n\t\twindow.setTimeout(function(){ \r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler._mark_now(); \r\n\t\t}, 1);\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\t\tscheduler._mark_now_timer = window.setInterval(function() {\r\n\t\t\tif(!scheduler._is_initialized())\r\n\t\t\t\treturn;\r\n\t\t\tscheduler._mark_now();\r\n\t\t}, 60000);\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tclearInterval(scheduler._mark_now_timer);\r\n\t});\r\n\r\n};\r\nscheduler._temp_limit_scope();\r\n\r\n\r\n}","import { GoogleMapAdapter } from \"./gMapAdapter\";\r\nimport { OpenStreetMapAdapter } from \"./osmMapAdapter\";\r\nimport { MapboxAdapter } from \"./mapboxAdapter\";\r\nimport { IMapAdapter, ICalendarEvent, IMapSettings } from \"./types\";\r\n\r\ndeclare let google: any;\r\n\r\nexport default function(scheduler: any){\r\n\t\r\nlet mapAdapter: IMapAdapter | null = null;\r\nlet eventHandlerIds: number[] = [];\r\nconst adapters: { [name:string]: IMapAdapter } = {\r\n\tgoogleMap: new GoogleMapAdapter(scheduler),\r\n\topenStreetMaps: new OpenStreetMapAdapter(scheduler),\r\n\tmapbox: new MapboxAdapter(scheduler)\r\n}\r\n\r\nif(!scheduler.ext){\r\n\tscheduler.ext = {};\r\n}\r\nscheduler.ext.mapView = {\r\n\tcreateAdapter: function():IMapAdapter{\r\n\t\treturn adapters[scheduler.config.map_view_provider];\r\n\t},\r\n\tcreateMarker: function(config){\r\n\t\treturn new google.maps.Marker(config);\r\n\t},\r\n\tcurrentAdapter: null,\r\n\tadapters\r\n};\r\nscheduler._latLngUpdate = false; // flag for updating events which don't have event.lat and event.lng\r\nscheduler._eventLocationChanged = false; // flag for checking if the location of the event is changed\r\nscheduler.config.map_view_provider = \"googleMap\";\r\nscheduler.config.map_settings = {\r\n\tinitial_position: {\r\n\t lat: 48.724,\r\n\t lng: 8.215\r\n\t},\r\n\terror_position: {\r\n\t lat: 15,\r\n\t lng: 15\r\n\t},\r\n\tinitial_zoom: 1,\r\n\tzoom_after_resolve: 15,\r\n\tinfo_window_max_width: 300,\r\n\tresolve_user_location: true,\r\n\tresolve_event_location: true,\r\n\tview_provider: \"googleMap\"\r\n}\r\nif (scheduler.config.map_initial_position) {\r\n\tscheduler.config.map_settings.initial_position = {\r\n\t\tlat: scheduler.config.map_initial_position.lat(),\r\n\t\tlng: scheduler.config.map_initial_position.lng(), \r\n\t};\r\n}\r\n\r\nif (scheduler.config.map_error_position) {\r\n\tscheduler.config.map_settings.error_position = {\r\n\t\tlat: scheduler.config.map_error_position.lat(),\r\n\t\tlng: scheduler.config.map_error_position.lng(), \r\n\t};\r\n}\r\n\r\nscheduler.xy.map_date_width = 188; // date column width\r\nscheduler.xy.map_icon_width = 25; // event details icon width\r\nscheduler.xy.map_description_width = 400; // description column width\r\nscheduler.date.add_map = function(date, inc, mode) {\r\n\treturn (new Date(date.valueOf()));\r\n};\r\nscheduler.templates.map_date = function(dd, ed, mode) {\r\n\treturn '';\r\n};\r\nscheduler.templates.map_time = function(start, end, ev) {\r\n\tif (scheduler.config.rtl && !ev._timed) {\r\n\t\treturn scheduler.templates.day_date(end) + \" – \" + scheduler.templates.day_date(start);\r\n\t} else if (ev._timed) {\r\n\t\treturn this.day_date(ev.start_date, ev.end_date, ev) + \" \" + this.event_date(start);\r\n\t} else {\r\n\t\treturn scheduler.templates.day_date(start) + \" – \" + scheduler.templates.day_date(end);\r\n\t}\r\n};\r\nscheduler.templates.map_text = function(start, end, ev) {\r\n\treturn ev.text;\r\n};\r\nscheduler.templates.map_info_content = function(event){\r\n return `
Event's text: ${event.text}\r\n\t\t\t\t
Location: ${event.event_location}
\r\n\t\t\t\t
Starts: ${scheduler.templates.tooltip_date_format(event.start_date)}
\r\n\t\t\t\t
Ends: ${scheduler.templates.tooltip_date_format(event.end_date)}
\r\n\t\t\t
`;\r\n};\r\nscheduler.date.map_start = function(d) {\r\n\treturn d;\r\n};\r\n\r\nfunction setupMapView(scheduler) {\r\n\t// Initialization logic, possibly including creation of a new mapAdapter\r\n\tmapAdapter = scheduler.ext.mapView.createAdapter();\r\n\tattachSchedulerEvents();\r\n}\r\nasync function addEventWithLocation(event: ICalendarEvent, mapAdapter: IMapAdapter){\r\n\tlet coordinates = await mapAdapter.resolveAddress(event.event_location);\r\n\tevent.lat = coordinates.lat;\r\n\tevent.lng = coordinates.lng;\r\n\tmapAdapter.removeEventMarker(String(event.id));\r\n\tmapAdapter.addEventMarker(event);\r\n\treturn event;\r\n}\r\nfunction setUserLocation(options: IMapSettings, adapter: IMapAdapter): void{\r\n\tif (options.resolve_user_location) {\r\n\t\tif (navigator.geolocation) {\r\n\t\t\tnavigator.geolocation.getCurrentPosition(function(position) {\r\n\t\t\t\tadapter.setView(position.coords.latitude, position.coords.longitude, options.zoom_after_resolve || options.initial_zoom);\r\n\t\t\t});\r\n\t\t}\r\n\t} else {\r\n\t\tadapter.setView(options.initial_position.lat, options.initial_position.lng, options.initial_zoom);\r\n\t}\r\n}\r\nscheduler.dblclick_dhx_map_area = function(e) {\r\n\tlet eventNode = e.target.closest(`[${scheduler.config.event_attribute}]`);\r\n\tif (eventNode){\r\n\t\tlet eventId = eventNode.getAttribute(`${scheduler.config.event_attribute}`);\r\n\t\tscheduler.showLightbox(eventId);\r\n\t}\r\n\tif (!this.config.readonly && this.config.dblclick_create && !eventNode) {\r\n\t\tthis.addEventNow({\r\n\t\t\tstart_date: scheduler.config.map_start,\r\n\t\t\tend_date: scheduler.date.add( scheduler.config.map_start, scheduler.config.time_step, \"minute\"),\r\n\t\t});\r\n\t}\t\r\n};\r\n\r\nfunction attachSchedulerEvents() { \r\n eventHandlerIds.push(\r\n\tscheduler.attachEvent(\"onEventSave\",function(id,ev,is_new){\r\n\t\tlet unmodifiedEvent = scheduler.getEvent(id);\r\n\t\tif (unmodifiedEvent && unmodifiedEvent.event_location != ev.event_location) {\r\n\t\t\tscheduler._eventLocationChanged = true;\r\n\t\t}\r\n\t\treturn true;\r\n\t}),\r\n scheduler.attachEvent(\"onEventChanged\", (id, event) => {\r\n\t\tconst {start_date, end_date} = event;\r\n\t\tconst {min_date, max_date} = scheduler.getState();\r\n\t\tif(start_date.valueOf() < max_date.valueOf() && end_date.valueOf() > min_date.valueOf()){\r\n\t\t\tif (mapAdapter) {\r\n\t\t\t\tif (scheduler.config.map_settings.resolve_event_location && event.event_location && !scheduler._latLngUpdate ) {\r\n\t\t\t\t \taddEventWithLocation(event, mapAdapter);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmapAdapter.updateEventMarker(event);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._latLngUpdate = false;\r\n\t\treturn true;\r\n }),\r\n\tscheduler.attachEvent(\"onEventIdChange\", function(old_id,new_id){\r\n\t\tlet newIdEvent = scheduler.getEvent(new_id);\r\n\t\tmapAdapter?.removeEventMarker(old_id);\r\n\t\tmapAdapter?.addEventMarker(newIdEvent);\r\n\t}),\r\n scheduler.attachEvent(\"onEventAdded\", (id, event) => {\r\n\t\tconst {start_date, end_date} = event;\r\n\t\tconst {min_date, max_date} = scheduler.getState();\r\n\t\tif(start_date.valueOf() < max_date.valueOf() && end_date.valueOf() > min_date.valueOf()){\r\n \t\tif (mapAdapter) {\r\n\t\t\t\tif (scheduler.config.map_settings.resolve_event_location && event.event_location && scheduler._eventLocationChanged) {\r\n\t\t\t\t\taddEventWithLocation(event, mapAdapter);\r\n\t\t\t\t\tscheduler._eventLocationChanged = false;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmapAdapter.addEventMarker(event);\r\n\t\t\t\t\tmapAdapter.onEventClick(event);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n }),\r\n scheduler.attachEvent(\"onClick\", function (id, e){\r\n\t\tconst event = scheduler.getEvent(id);\r\n\t\tif (mapAdapter && event) mapAdapter.onEventClick(event);\r\n\t\treturn false;\r\n }),\r\n scheduler.attachEvent(\"onBeforeEventDelete\", (id, event) => {\r\n\t\tif (mapAdapter) {\r\n\t\t\tmapAdapter.removeEventMarker(id);\r\n\t\t}\r\n\t\treturn true;\r\n })\r\n );\r\n}\r\nfunction detachSchedulerEvents() {\r\n\teventHandlerIds.forEach(id => scheduler.detachEvent(id));\r\n\teventHandlerIds = [];\r\n}\r\n\r\nscheduler.attachEvent(\"onSchedulerReady\", function() {\r\n\r\n\tif(scheduler.config.map_initial_zoom !== undefined){\r\n\t\tscheduler.config.map_settings.initial_zoom = scheduler.config.map_initial_zoom;\r\n\t}\r\n\tif(scheduler.config.map_zoom_after_resolve !== undefined){\r\n\t\tscheduler.config.map_settings.zoom_after_resolve = scheduler.config.map_zoom_after_resolve;\r\n\t}\r\n\tif(scheduler.config.map_infowindow_max_width !== undefined){\r\n\t\tscheduler.config.map_settings.info_window_max_width = scheduler.config.map_infowindow_max_width;\r\n\t}\r\n\tif(scheduler.config.map_resolve_user_location !== undefined){\r\n\t\tscheduler.config.map_settings.resolve_user_location = scheduler.config.map_resolve_user_location;\r\n\t}\r\n\tif(scheduler.config.map_view_provider !== undefined){\r\n\t\tscheduler.config.map_settings.view_provider = scheduler.config.map_view_provider;\r\n\t}\r\n\tif(scheduler.config.map_type !== undefined){\r\n\t\tscheduler.config.map_settings.type = scheduler.config.map_type;\r\n\t}\r\n\tif(scheduler.config.map_resolve_event_location !== undefined){\r\n\t\tscheduler.config.map_settings.resolve_event_location = scheduler.config.map_resolve_event_location;\r\n\t}\r\n\tscheduler.ext.mapView.currentAdapter = scheduler.config.map_view_provider;\r\n\r\n\tlet map = document.createElement('div');\r\n\tmap.className = 'mapContainer';\r\n\tmap.id = 'mapContainer';\r\n\tmap.style.display = \"none\";\r\n\tmap.style.zIndex = \"1\";\r\n\tscheduler._obj.appendChild(map);\r\n\r\n\tconst old = scheduler.render_data;\r\n\tscheduler.render_data = function(evs, hold) {\r\n\t\tif (this._mode == \"map\") {\r\n\t\t\tfill_map_tab();\r\n\t\t\tlet events = scheduler.get_visible_events();\r\n\t\t\tif (mapAdapter) {\r\n\t\t\t\tmapAdapter.clearEventMarkers();\r\n\t\t\t\tevents.forEach((event) => mapAdapter?.addEventMarker(event));\r\n\t\t\t}\r\n\t\t} else\r\n\t\t\treturn old.apply(this, arguments);\r\n\t};\r\n\r\n\tscheduler.map_view = function(mode) {\r\n\t\tscheduler._els.dhx_cal_data[0].style.width = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\tscheduler._min_date = scheduler.config.map_start || (scheduler._currentDate());\r\n\t\tscheduler._max_date = scheduler.config.map_end || scheduler.date.add(scheduler._currentDate(), 1, \"year\");\r\n\t\tscheduler._table_view = true;\r\n\t\tset_full_view(mode);\r\n\t\tlet mapContainer = document.getElementById('mapContainer');\r\n\t\t_setMapSize('mapContainer');\r\n\r\n\t\t// creating the new logic\r\n\t\tif (mode && mapContainer) {\r\n\t\t\tmap.style.display = 'block';\r\n\t\t\tfill_map_tab();\r\n\t\t\t// case to display several maps and has the opportunity to switch between them\r\n\t\t\tif (scheduler.config.map_view_provider == scheduler.ext.mapView.currentAdapter) {\r\n\t\t\t\tmapAdapter?.destroy(mapContainer);\r\n\t\t\t\tsetupMapView(scheduler);\r\n\t\t\t\tmapAdapter?.initialize(mapContainer, scheduler.config.map_settings);\r\n\t\t\t} else {\r\n\t\t\t\tmapAdapter?.destroy(mapContainer);\r\n\t\t\t\tsetupMapView(scheduler);\r\n\t\t\t\tmapAdapter?.initialize(mapContainer, scheduler.config.map_settings);\r\n\t\t\t \tscheduler.ext.mapView.currentAdapter = scheduler.config.map_view_provider;\r\n\t\t\t}\r\n\t\t\tif(mapAdapter) {\r\n\t\t\t\tsetUserLocation(scheduler.config.map_settings, mapAdapter);\r\n\t\t\t}\t\r\n\t\t} else {\r\n\t\t\tmap.style.display = 'none';\r\n\t\t\tscheduler._els.dhx_cal_data[0].style.width = \"100%\";\r\n\t\t \tif (mapAdapter && mapContainer ) {\r\n\t\t\t\tmapAdapter.destroy(mapContainer);\r\n\t\t\t\tmapAdapter = null;\r\n\t\t\t\tscheduler.ext.mapView.currentAdapter = scheduler.config.map_view_provider;\r\n\t\t }\r\n\t\t \tdetachSchedulerEvents();\r\n\t\t}\r\n\t};\r\n\r\n\tfunction _setMapSize(elem_id) { //input - map's div id\r\n\t\tlet map = document.getElementById(elem_id);\r\n\t\tif (map) {\r\n\t\t\tconst nav_height = scheduler.$container.querySelector(\".dhx_cal_navline\").offsetHeight;\r\n\t\t\tlet height = scheduler.$container.querySelector(\".dhx_cal_data\").offsetHeight + scheduler.$container.querySelector(\".dhx_cal_header\").offsetHeight;\r\n\t\t\tif (height < 0)\r\n\t\t\t\theight = 0;\r\n\t\t\tlet width = scheduler._x - scheduler.xy.map_date_width - scheduler.xy.map_description_width - 1;\r\n\t\t\tif (width < 0)\r\n\t\t\t\twidth = 0;\r\n\t\t\tmap.style.height = height + 'px';\r\n\t\t\tmap.style.width = width + 'px';\r\n\t\t\tmap.style.position = \"absolute\";\r\n\t\t\tmap.style.top = nav_height + \"px\";\r\n\t\t\tif (scheduler.config.rtl) {\r\n\t\t\t\tmap.style.marginRight = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\t\t} else {\r\n\t\t\t\tmap.style.marginLeft = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\t\t}\r\n\t\t\tmap.style.marginTop = (scheduler.xy.nav_height + 2) + 'px';\r\n\t\t}\r\n\t}\t\r\n\tfunction fill_map_tab() {\r\n\t\t//select events for which data need to be printed\r\n\t\tlet events = scheduler.get_visible_events();\r\n\t\tevents.sort(function(a, b) {\r\n\t\t\tif(a.start_date.valueOf()==b.start_date.valueOf())\r\n\t\t\t\treturn a.id>b.id?1:-1;\r\n\t\t\treturn a.start_date>b.start_date?1:-1;\r\n\t\t});\r\n\r\n\t\t//generate html for the view\r\n\t\tlet ariaAttr = scheduler._waiAria.mapAttrString();\r\n\r\n\t\tlet html = \"
\";\r\n\t\tfor (let i = 0; i < events.length; i++) {\r\n\t\t\tlet ev = events[i];\r\n\t\t\tlet event_class = (ev.id == scheduler._selected_event_id) ? 'dhx_map_line highlight' : 'dhx_map_line';\r\n\t\t\tlet bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\t\t\tlet color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\t\t\tlet ariaAttr = scheduler._waiAria.mapRowAttrString(ev);\r\n\t\t\tlet ariaButtonAttr = scheduler._waiAria.mapDetailsBtnString();\r\n\r\n\t\t\thtml += \"
\" + scheduler.templates.map_time(ev.start_date, ev.end_date, ev) + \"
\";\r\n\t\t\thtml += `
\r\n\t\t\t\r\n\t\t\t
`;\r\n\t\t\thtml += \"
\" + scheduler.templates.map_text(ev.start_date, ev.end_date, ev) + \"
\"; // -25 = icon size 20 and padding 5\r\n\t\t}\r\n\t\thtml += \"
\";\r\n\r\n\t\t//render html\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = 0; //fix flickering in FF\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t//\tscheduler._els[\"dhx_cal_data\"][0].style.width = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\r\n\t\tlet t = scheduler._els[\"dhx_cal_data\"][0].firstChild.childNodes;\r\n\r\n\t\tlet dateElement = scheduler._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML=scheduler.templates[scheduler._mode + \"_date\"](scheduler._min_date, scheduler._max_date, scheduler._mode);\r\n\t\t}\r\n\r\n\t\tscheduler._rendered = [];\r\n\t\tfor (let i = 0; i < t.length - 2; i++) {\r\n\t\t\tscheduler._rendered[i] = t[i];\r\n\t\t}\r\n\t}\r\n\tfunction set_full_view(mode) {\r\n\t\tif (mode) {\r\n\t\t\tconst l = scheduler.locale.labels;\r\n\t\t\tscheduler._els[\"dhx_cal_header\"][0].innerHTML = \"
\" + l.date + \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"
\" + l.description + \"
\";\r\n\t\t\tscheduler._table_view = true;\r\n\t\t\tscheduler.set_sizes();\r\n\t\t}\r\n\t}\r\n\t\r\n\tscheduler.attachEvent(\"onLocationError\", function (id){\r\n\t\talert(\"Location can't be found\");\r\n\t\treturn google.maps.LatLng(51.477840, -0.001492); \r\n\t\t//the coordinates of the Greenwich Royal Observatory\r\n\t})\r\n\tlet _updateEventLocation = async function(event) {\r\n\t\tif (mapAdapter){\r\n\t\t\tconst coordinates = await mapAdapter.resolveAddress(event.event_location);\r\n\t\t\tif (coordinates.lat && coordinates.lng) {\r\n\t\t\t\tevent.lat = +coordinates.lat;\r\n\t\t\t\tevent.lng = +coordinates.lng;\r\n\t\t\t} else {\r\n\t\t\t\tscheduler.callEvent(\"onLocationError\", [event.id]);\r\n\t\t\t\tevent.lng = scheduler.config.map_settings.error_position.lng;\r\n\t\t\t\tevent.lat = scheduler.config.map_settings.error_position.lat;\r\n\t\t\t}\r\n\t\t\tscheduler._latLngUpdate = true;\r\n\t\t\tscheduler.callEvent(\"onEventChanged\", [event.id, event]);\r\n\t\t}\r\n\t};\r\n\tlet _delay = function(method, object, params, delay) {\r\n\t\tsetTimeout(function() {\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tlet ret = method.apply(object, params);\r\n\t\t\tmethod = object = params = null;\r\n\t\t\treturn ret;\r\n\t\t}, delay || 1);\r\n\t};\r\n\tscheduler._event_resolve_delay = 1500;\r\n\tscheduler.attachEvent(\"onEventLoading\", function(event) {\r\n\t\tif (event.lat && event.lng) {\r\n\t\t\tevent.lat = +event.lat;\r\n\t\t\tevent.lng = +event.lng;\r\n\t\t}\r\n\t\tif (scheduler.config.map_settings.resolve_event_location && event.event_location && !event.lat && !event.lng) { // don't delete !event.lat && !event.lng as location could change\r\n\t\t\tscheduler._event_resolve_delay += 1500;\r\n\t\t\t_delay(_updateEventLocation, this, [event], scheduler._event_resolve_delay);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n})\r\n\r\n}","export default function(scheduler){\r\n\r\nconst minicalDomEvents = scheduler._createDomEventScope();\r\n\t\r\n\r\nscheduler.config.minicalendar = {\r\n\tmark_events: true\r\n};\r\nscheduler._synced_minicalendars = [];\r\nscheduler.renderCalendar = function(obj, _prev, is_refresh) {\r\n\tvar cal = null;\r\n\tvar date = obj.date || (scheduler._currentDate());\r\n\tif (typeof date == \"string\")\r\n\t\tdate = this.templates.api_date(date);\r\n\r\n\tif (!_prev) {\r\n\t\tvar cont = obj.container;\r\n\t\tvar pos = obj.position;\r\n\r\n\t\tif (typeof cont == \"string\")\r\n\t\t\tcont = document.getElementById(cont);\r\n\r\n\t\tif (typeof pos == \"string\")\r\n\t\t\tpos = document.getElementById(pos);\r\n\t\tif (pos && (typeof pos.left == \"undefined\" && typeof pos.right == \"undefined\")) {\r\n\t\t\tvar tpos = scheduler.$domHelpers.getOffset(pos);\r\n\t\t\tpos = {\r\n\t\t\t\ttop: tpos.top + pos.offsetHeight,\r\n\t\t\t\tleft: tpos.left\r\n\t\t\t};\r\n\t\t}\r\n\t\tif (!cont)\r\n\t\t\tcont = scheduler._get_def_cont(pos);\r\n\r\n\t\tcal = this._render_calendar(cont, date, obj);\r\n\t\r\n\t\tif (!cal.$_eventAttached) {\r\n\t\t\tcal.$_eventAttached = true;\r\n\t\t\tminicalDomEvents.attach(cal, \"click\", (function(e) {\r\n\t\t\t\tvar src = e.target || e.srcElement;\r\n\r\n\t\t\t\tvar $dom = scheduler.$domHelpers;\r\n\t\t\t\tif ($dom.closest(src, \".dhx_month_head\")) {\r\n\t\t\t\t\tif (!$dom.closest(src, \".dhx_after\") && !$dom.closest(src, \".dhx_before\")) {\r\n\r\n\t\t\t\t\t\tvar cellRoot = $dom.closest(src, \"[data-cell-date]\");\r\n\t\t\t\t\t\tvar dateAttribute = cellRoot.getAttribute(\"data-cell-date\");\r\n\t\t\t\t\t\tvar newDate = scheduler.templates.parse_date(dateAttribute);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tscheduler.unmarkCalendar(this);\r\n\t\t\t\t\t\tscheduler.markCalendar(this, newDate, \"dhx_calendar_click\");\r\n\t\t\t\t\t\tthis._last_date = newDate;\r\n\t\t\t\t\t\tif (this.conf.handler) this.conf.handler.call(scheduler, newDate, this);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}).bind(cal));\r\n\t\t}\r\n\t\r\n\t} else {\r\n\t\tcal = this._render_calendar(_prev.parentNode, date, obj, _prev);\r\n\t\tscheduler.unmarkCalendar(cal);\r\n\t}\r\n\r\n\tif (scheduler.config.minicalendar.mark_events) {\r\n\t\tvar start = scheduler.date.month_start(date);\r\n\t\tvar end = scheduler.date.add(start, 1, \"month\");\r\n\t\tvar evs = this.getEvents(start, end);\r\n\t\tvar filter = this[\"filter_\" + this._mode];\r\n\t\tvar markedDates = {};\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tif (filter && !filter(ev.id, ev))\r\n\t\t\t\tcontinue;\r\n\t\t\tvar d = ev.start_date;\r\n\t\t\tif (d.valueOf() < start.valueOf())\r\n\t\t\t\td = start;\r\n\t\t\td = scheduler.date.date_part(new Date(d.valueOf()));\r\n\t\t\twhile (d < ev.end_date) {\r\n\t\t\t\tif(!markedDates[+d]) {\r\n\t\t\t\t\tmarkedDates[+d] = true;\r\n\t\t\t\t\tthis.markCalendar(cal, d, \"dhx_year_event\");\r\n\t\t\t\t}\r\n\t\t\t\td = this.date.add(d, 1, \"day\");\r\n\t\t\t\tif (d.valueOf() >= end.valueOf())\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tthis._markCalendarCurrentDate(cal);\r\n\r\n\tcal.conf = obj;\r\n\tif (obj.sync && !is_refresh)\r\n\t\tthis._synced_minicalendars.push(cal);\r\n\r\n\tif(!cal.conf._on_xle_handler){\r\n\t\tcal.conf._on_xle_handler = scheduler.attachEvent(\"onXLE\", function refreshOnLoad(){\r\n\t\t\tscheduler.updateCalendar(cal, cal.conf.date);\r\n\t\t});\r\n\t}\r\n\r\n\tif(this.config.wai_aria_attributes && this.config.wai_aria_application_role){\r\n\t\tcal.setAttribute(\"role\", \"application\");\r\n\t}\r\n\r\n\treturn cal;\r\n};\r\nscheduler._get_def_cont = function(pos) {\r\n\tif (!this._def_count) {\r\n\t\tthis._def_count = document.createElement(\"div\");\r\n\t\tthis._def_count.className = \"dhx_minical_popup\";\r\n\t\tscheduler.event(this._def_count, \"click\", function(e) { e.cancelBubble = true; });\r\n\t\tdocument.body.appendChild(this._def_count);\r\n\t}\r\n\r\n\tif(pos.left){\r\n\t\tthis._def_count.style.left = pos.left + \"px\";\r\n\t}\r\n\tif(pos.right){\r\n\t\tthis._def_count.style.right = pos.right + \"px\";\r\n\t}\r\n\tif(pos.top){\r\n\t\tthis._def_count.style.top = pos.top + \"px\";\r\n\t}\r\n\tif(pos.bottom){\r\n\t\tthis._def_count.style.bottom = pos.bottom + \"px\";\r\n\t}\r\n\r\n\tthis._def_count._created = new Date();\r\n\r\n\treturn this._def_count;\r\n};\r\nscheduler._locateCalendar = function(cal, date) {\r\n\tif (typeof date == \"string\")\r\n\t\tdate = scheduler.templates.api_date(date);\r\n\r\n\tif(+date > +cal._max_date || +date < +cal._min_date)\r\n\t\treturn null;\r\n\r\n\tvar table = cal.querySelector(\".dhx_year_body\").childNodes[0];\r\n\r\n\tvar weekNum = 0;\r\n\tvar dat = new Date(cal._min_date);\r\n\twhile(+this.date.add(dat, 1, \"week\") <= +date){\r\n\t\tdat = this.date.add(dat, 1, \"week\");\r\n\t\tweekNum++;\r\n\t}\r\n\r\n\tvar sm = scheduler.config.start_on_monday;\r\n\tvar day = (date.getDay() || (sm ? 7 : 0)) - (sm ? 1 : 0);\r\n\r\n\tconst dayCell = table.querySelector(`.dhx_cal_month_row:nth-child(${weekNum + 1}) .dhx_cal_month_cell:nth-child(${day + 1})`);\r\n\tif(dayCell) {\r\n\t\treturn dayCell.firstChild;\r\n\t} else {\r\n\t\treturn null;\r\n\t}\r\n};\r\nscheduler.markCalendar = function(cal, date, css) {\r\n\tvar div = this._locateCalendar(cal, date);\r\n\tif(!div)\r\n\t\treturn;\r\n\r\n\tdiv.className += \" \" + css;\r\n};\r\nscheduler.unmarkCalendar = function(cal, date, css) {\r\n\tdate = date || cal._last_date;\r\n\tcss = css || \"dhx_calendar_click\";\r\n\tif (!date) return;\r\n\tvar el = this._locateCalendar(cal, date);\r\n\tif(!el)\r\n\t\treturn;\r\n\tel.className = (el.className || \"\").replace(RegExp(css, \"g\"));\r\n};\r\nscheduler._week_template = function(width) {\r\n\tvar summ = (width || 250);\r\n\tvar left = 0;\r\n\r\n\tvar week_template = document.createElement(\"div\");\r\n\tvar dummy_date = this.date.week_start(scheduler._currentDate());\r\n\tfor (var i = 0; i < 7; i++) {\r\n\t\tthis._cols[i] = Math.floor(summ / (7 - i));\r\n\t\tthis._render_x_header(i, left, dummy_date, week_template);\r\n\t\tdummy_date = this.date.add(dummy_date, 1, \"day\");\r\n\t\tsumm -= this._cols[i];\r\n\t\tleft += this._cols[i];\r\n\t}\r\n\tweek_template.lastChild.className += \" dhx_scale_bar_last\";\r\n\treturn week_template;\r\n};\r\nscheduler.updateCalendar = function(obj, sd) {\r\n\tobj.conf.date = sd;\r\n\tthis.renderCalendar(obj.conf, obj, true);\r\n};\r\nscheduler._mini_cal_arrows = [\" \", \" \"];\r\nscheduler._render_calendar = function(obj, sd, conf, previous) {\r\n\t/*store*/\r\n\tvar ts = scheduler.templates;\r\n\tvar temp = this._cols;\r\n\tthis._cols = [];\r\n\tvar temp2 = this._mode;\r\n\tthis._mode = \"calendar\";\r\n\tvar temp3 = this._colsS;\r\n\tthis._colsS = {height: 0};\r\n\tvar temp4 = new Date(this._min_date);\r\n\tvar temp5 = new Date(this._max_date);\r\n\tvar temp6 = new Date(scheduler._date);\r\n\tvar temp7 = ts.month_day;\r\n\tvar temp8 = this._ignores_detected; this._ignores_detected = 0;\r\n\tts.month_day = ts.calendar_date;\r\n\r\n\tsd = this.date.month_start(sd);\r\n\tvar week_template = this._week_template(obj.offsetWidth - 1 - this.config.minicalendar.padding );\r\n\r\n\tvar d;\r\n\tif (previous){\r\n\t\td = previous;\r\n\t} else {\r\n\t\td = document.createElement(\"div\");\r\n\t\td.className = \"dhx_cal_container dhx_mini_calendar\";\r\n\t}\r\n\td.setAttribute(\"date\", this._helpers.formatDate(sd));\r\n\td.innerHTML = \"
\" +\r\n\t\t\t\"
\" : \"'>\") +\r\n\t\t\t\"
\"+(week_template ? week_template.innerHTML : \"\")+\"
\" +\r\n\t\t\t\"
\" +\r\n\t\t\"
\";\r\n\tvar header = d.querySelector(\".dhx_year_month\");\r\n\tvar weekHeader = d.querySelector(\".dhx_year_week\");\r\n\tvar body = d.querySelector(\".dhx_year_body\");\r\n\r\n\theader.innerHTML = this.templates.calendar_month(sd);\r\n\tif (conf.navigation) {\r\n\t\tvar move_minicalendar_date = function(calendar, diff) {\r\n\t\t\tvar date = scheduler.date.add(calendar._date, diff, \"month\");\r\n\t\t\tscheduler.updateCalendar(calendar, date);\r\n\t\t\tif (scheduler._date.getMonth() == calendar._date.getMonth() && scheduler._date.getFullYear() == calendar._date.getFullYear()) {\r\n\t\t\t\tscheduler._markCalendarCurrentDate(calendar);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tvar css_classnames = [\"dhx_cal_prev_button\", \"dhx_cal_next_button\"];\r\n\t\tvar css_texts = [\"left:1px;top:4px;position:absolute;\", \"left:auto; right:1px;top:4px;position:absolute;\"];\r\n\t\tvar diffs = [-1, 1];\r\n\t\tvar handler = function(diff) {\r\n\t\t\treturn function() {\t\r\n\t\t\t\tif (conf.sync) {\r\n\t\t\t\t\tvar calendars = scheduler._synced_minicalendars;\r\n\t\t\t\t\tfor (var k = 0; k < calendars.length; k++) {\r\n\t\t\t\t\t\tmove_minicalendar_date(calendars[k], diff);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (scheduler.config.rtl) {\r\n\t\t\t\t\t\tdiff = -diff;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmove_minicalendar_date(d, diff);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t};\r\n\t\tvar labels = [scheduler.locale.labels.prev, scheduler.locale.labels.next];\r\n\t\tfor (var j = 0; j < 2; j++) {\r\n\t\t\tvar arrow = document.createElement(\"div\");\r\n\t\t\t//var diff = diffs[j];\r\n\t\t\tarrow.className = css_classnames[j];\r\n\r\n\t\t\tscheduler._waiAria.headerButtonsAttributes(arrow, labels[j]);\r\n\r\n\t\t\tarrow.style.cssText = css_texts[j];\r\n\t\t\tarrow.innerHTML = this._mini_cal_arrows[j];\r\n\t\t\theader.appendChild(arrow);\r\n\t\t\tminicalDomEvents.attach(arrow, \"click\", handler(diffs[j]));\r\n\t\t}\r\n\t}\r\n\td._date = new Date(sd);\r\n\r\n\td.week_start = (sd.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;\r\n\r\n\tvar dd = d._min_date = this.date.week_start(sd);\r\n\td._max_date = this.date.add(d._min_date, 6, \"week\");\r\n\r\n\tthis._reset_month_scale(body, sd, dd, 6);\r\n\r\n\tif (!previous)\r\n\t\tobj.appendChild(d);\r\n\r\n\tweekHeader.style.height = (weekHeader.childNodes[0].offsetHeight - 1) + \"px\"; // dhx_year_week should have height property so that day dates would get correct position. dhx_year_week height = height of it's child (with the day name)\r\n\r\n\tvar headerId = scheduler.uid();\r\n\tscheduler._waiAria.minicalHeader(header, headerId);\r\n\tscheduler._waiAria.minicalGrid(d.querySelector(\".dhx_year_grid\"), headerId);\r\n\tscheduler._waiAria.minicalRow(weekHeader);\r\n\r\n\tvar dayHeaders = weekHeader.querySelectorAll(\".dhx_scale_bar\");\r\n\tfor(var i = 0; i < dayHeaders.length; i++){\r\n\t\tscheduler._waiAria.minicalHeadCell(dayHeaders[i]);\r\n\t}\r\n\tvar dayCells = body.querySelectorAll(\".dhx_cal_month_cell\");\r\n\tvar firstDate = new Date(dd);\r\n\tfor(var i = 0; i < dayCells.length; i++){\r\n\r\n\t\tscheduler._waiAria.minicalDayCell(dayCells[i], new Date(firstDate));\r\n\t\tfirstDate = scheduler.date.add(firstDate, 1, \"day\");\r\n\t}\r\n\r\n\tscheduler._waiAria.minicalHeader(header, headerId);\r\n\r\n\t/*restore*/\r\n\tthis._cols = temp;\r\n\tthis._mode = temp2;\r\n\tthis._colsS = temp3;\r\n\tthis._min_date = temp4;\r\n\tthis._max_date = temp5;\r\n\tscheduler._date = temp6;\r\n\tts.month_day = temp7;\r\n\tthis._ignores_detected = temp8;\r\n\treturn d;\r\n};\r\nscheduler.destroyCalendar = function(cal, force) {\r\n\tif (!cal && this._def_count && this._def_count.firstChild) {\r\n\t\tif (force || (new Date()).valueOf() - this._def_count._created.valueOf() > 500)\r\n\t\t\tcal = this._def_count.firstChild;\r\n\t}\r\n\tif (!cal) return;\r\n\tminicalDomEvents.detachAll();\r\n\t//cal.onclick = null;\r\n\tcal.innerHTML = \"\";\r\n\tif (cal.parentNode)\r\n\t\tcal.parentNode.removeChild(cal);\r\n\tif (this._def_count)\r\n\t\tthis._def_count.style.top = \"-1000px\";\r\n\r\n\tif(cal.conf && cal.conf._on_xle_handler)\r\n\t\tscheduler.detachEvent(cal.conf._on_xle_handler);\r\n};\r\nscheduler.isCalendarVisible = function() {\r\n\tif (this._def_count && parseInt(this._def_count.style.top, 10) > 0)\r\n\t\treturn this._def_count;\r\n\treturn false;\r\n};\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tscheduler.event(document.body, \"click\", function() { scheduler.destroyCalendar(); });\r\n}, {once: true});\r\n\r\n\r\n\r\nscheduler.form_blocks.calendar_time = {\r\n\trender: function(sns) {\r\n\t\tvar html = \"\";\r\n\r\n\t\tvar cfg = scheduler.config;\r\n\t\tvar dt = this.date.date_part(scheduler._currentDate());\r\n\r\n\t\tvar last = 24 * 60, first = 0;\r\n\t\tif (cfg.limit_time_select) {\r\n\t\t\tfirst = 60 * cfg.first_hour;\r\n\t\t\tlast = 60 * cfg.last_hour + 1; // to include \"17:00\" option if time select is limited\r\n\t\t}\r\n\t\tdt.setHours(first / 60);\r\n\r\n\t\tsns._time_values = [];\r\n\t\thtml += \" \";\r\n\r\n\t\t//var full_day = scheduler.config.full_day;\r\n\r\n\t\treturn \"
\" + html + \"  –  \" + html + \"
\";\r\n\t},\r\n\tset_value: function(node, value, ev, config) {\r\n\r\n\t\tvar inputs = node.getElementsByTagName(\"input\");\r\n\t\tvar selects = node.getElementsByTagName(\"select\");\r\n\t\tvar start_date,\r\n\t\t\tend_date;\r\n\r\n\t\tvar _init_once = function(inp, date, number) {\r\n\t\t\tscheduler.event(inp, \"click\", function() {\r\n\t\t\t\tscheduler.destroyCalendar(null, true);\r\n\t\t\t\tscheduler.renderCalendar({\r\n\t\t\t\t\tposition: inp,\r\n\t\t\t\t\tdate: new Date(this._date),\r\n\t\t\t\t\tnavigation: true,\r\n\t\t\t\t\thandler: function(new_date) {\r\n\t\t\t\t\t\tinp.value = scheduler.templates.calendar_time(new_date);\r\n\t\t\t\t\t\tinp._date = new Date(new_date);\r\n\t\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t\t\tif (scheduler.config.event_duration && scheduler.config.auto_end_date && number === 0) { //first element = start date\r\n\t\t\t\t\t\t\t_update_minical_select();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t};\r\n\r\n\t\tif (scheduler.config.full_day) {\r\n\t\t\tif (!node._full_day) {\r\n\t\t\t\tvar html = \"\";\r\n\t\t\t\tif (!scheduler.config.wide_form)\r\n\t\t\t\t\thtml = node.previousSibling.innerHTML + html;\r\n\t\t\t\tnode.previousSibling.innerHTML = html;\r\n\t\t\t\tnode._full_day = true;\r\n\t\t\t}\r\n\t\t\tvar input = node.previousSibling.getElementsByTagName(\"input\")[0];\r\n\r\n\t\t\tvar isFulldayEvent = (scheduler.date.time_part(ev.start_date) === 0 && scheduler.date.time_part(ev.end_date) === 0);\r\n\t\t\tinput.checked = isFulldayEvent;\r\n\r\n\t\t\tselects[0].disabled = input.checked;\r\n\t\t\tselects[1].disabled = input.checked;\r\n\r\n\t\t\tif (!input.$_eventAttached) {\r\n\t\t\t\tinput.$_eventAttached = true;\r\n\t\t\t\tscheduler.event(input, \"click\", function() {\r\n\t\t\t\t\tif (input.checked === true) {\r\n\t\t\t\t\t\tvar obj = {};\r\n\t\t\t\t\t\tscheduler.form_blocks.calendar_time.get_value(node, obj);\r\n\r\n\t\t\t\t\t\tstart_date = scheduler.date.date_part(obj.start_date);\r\n\t\t\t\t\t\tend_date = scheduler.date.date_part(obj.end_date);\r\n\r\n\t\t\t\t\t\tif (+end_date == +start_date || (+end_date >= +start_date && (ev.end_date.getHours() !== 0 || ev.end_date.getMinutes() !== 0)))\r\n\t\t\t\t\t\t\tend_date = scheduler.date.add(end_date, 1, \"day\");\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tstart_date = null;\r\n\t\t\t\t\t\tend_date = null;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar start = start_date || ev.start_date;\r\n\t\t\t\t\tvar end = end_date || ev.end_date;\r\n\t\t\t\t\t_attach_action(inputs[0], start);\r\n\t\t\t\t\t_attach_action(inputs[1], end);\r\n\t\t\t\t\tselects[0].value = start.getHours() * 60 + start.getMinutes();\r\n\t\t\t\t\tselects[1].value = end.getHours() * 60 + end.getMinutes();\r\n\r\n\t\t\t\t\tselects[0].disabled = input.checked;\r\n\t\t\t\t\tselects[1].disabled = input.checked;\r\n\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (scheduler.config.event_duration && scheduler.config.auto_end_date) {\r\n\r\n\t\t\tvar _update_minical_select = function () {\r\n\t\t\t\tif (!(scheduler.config.auto_end_date && scheduler.config.event_duration)){\r\n\t\t\t\t\t// setting may be disabled after the handler is attached\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tstart_date = scheduler.date.add(inputs[0]._date, selects[0].value, \"minute\");\r\n\t\t\t\tend_date = new Date(start_date.getTime() + (scheduler.config.event_duration * 60 * 1000));\r\n\r\n\t\t\t\tinputs[1].value = scheduler.templates.calendar_time(end_date);\r\n\t\t\t\tinputs[1]._date = scheduler.date.date_part(new Date(end_date));\r\n\r\n\t\t\t\tselects[1].value = end_date.getHours() * 60 + end_date.getMinutes();\r\n\t\t\t};\r\n\r\n\t\t\tif(!selects[0].$_eventAttached){\r\n\t\t\t\tselects[0].addEventListener(\"change\", _update_minical_select); // only update on first select should trigger update so user could define other end date if he wishes too\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction _attach_action(inp, date, number) {\r\n\t\t\t_init_once(inp, date, number);\r\n\t\t\tinp.value = scheduler.templates.calendar_time(date);\r\n\t\t\tinp._date = scheduler.date.date_part(new Date(date));\r\n\t\t}\r\n\r\n\t\t_attach_action(inputs[0], ev.start_date, 0);\r\n\t\t_attach_action(inputs[1], ev.end_date, 1);\r\n\t\t_init_once = function() {};\r\n\r\n\t\tfunction _round_minutes(date) {\r\n\t\t\tvar time_values = config._time_values;\r\n\t\t\tvar direct_value = date.getHours() * 60 + date.getMinutes();\r\n\t\t\tvar fixed_value = direct_value;\r\n\t\t\tvar value_found = false;\r\n\r\n\t\t\tfor (var k = 0; k < time_values.length; k++) {\r\n\t\t\t\tvar t_v = time_values[k];\r\n\t\t\t\tif (t_v === direct_value) {\r\n\t\t\t\t\tvalue_found = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif (t_v < direct_value)\r\n\t\t\t\t\tfixed_value = t_v;\r\n\t\t\t}\r\n\r\n\t\t\tif(!(value_found || fixed_value))\r\n\t\t\t\treturn -1;\r\n\r\n\t\t\treturn (value_found) ? direct_value : fixed_value;\r\n\t\t}\r\n\r\n\t\tselects[0].value = _round_minutes(ev.start_date);\r\n\t\tselects[1].value = _round_minutes(ev.end_date);\r\n\r\n\t},\r\n\tget_value: function(node, ev) {\r\n\t\tvar inputs = node.getElementsByTagName(\"input\");\r\n\t\tvar selects = node.getElementsByTagName(\"select\");\r\n\r\n\t\tev.start_date = scheduler.date.add(inputs[0]._date, selects[0].value, \"minute\");\r\n\t\tev.end_date = scheduler.date.add(inputs[1]._date, selects[1].value, \"minute\");\r\n\r\n\t\tif (ev.end_date <= ev.start_date)\r\n\t\t\tev.end_date = scheduler.date.add(ev.start_date, scheduler.config.time_step, \"minute\");\r\n\t\treturn {\r\n\t\t\tstart_date: new Date(ev.start_date),\r\n\t\t\tend_date: new Date(ev.end_date)\r\n\t\t};\r\n\t},\r\n\tfocus: function(node) {\r\n\t}\r\n};\r\nscheduler.linkCalendar = function(calendar, datediff) {\r\n\tvar action = function() {\r\n\t\tvar date = scheduler._date;\r\n\t\tvar dateNew = new Date(date.valueOf());\r\n\t\tif (datediff) dateNew = datediff(dateNew);\r\n\t\tdateNew.setDate(1);\r\n\t\tscheduler.updateCalendar(calendar, dateNew);\r\n\t\treturn true;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", action);\r\n\tscheduler.attachEvent(\"onXLE\", action);\r\n\tscheduler.attachEvent(\"onEventAdded\", action);\r\n\tscheduler.attachEvent(\"onEventChanged\", action);\r\n\tscheduler.attachEvent(\"onEventDeleted\", action);\r\n\taction();\r\n};\r\n\r\nscheduler._markCalendarCurrentDate = function(calendar) {\r\n\tvar state = scheduler.getState();\r\n\tvar from = state.min_date;\r\n\tvar to = state.max_date;\r\n\tvar mode = state.mode;\r\n\r\n\tvar month_start = scheduler.date.month_start(new Date(calendar._date));\r\n\tvar month_end = scheduler.date.add(month_start, 1, \"month\");\r\n\r\n\tvar noHighlight = {\r\n\t\t\"month\":true,\r\n\t\t\"year\":true,\r\n\t\t\"agenda\":true,\r\n\t\t\"grid\":true\r\n\t};\r\n\t// no need to highlight current dates for a large range views - agenda, year, etc.\r\n\tif(noHighlight[mode] || (from.valueOf() <= month_start.valueOf() && to.valueOf() >= month_end.valueOf())){\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar current = from;\r\n\twhile(current.valueOf() < to.valueOf()){\r\n\t\tif (month_start.valueOf() <= current.valueOf() && month_end > current) {\r\n\t\t\tscheduler.markCalendar(calendar, current, \"dhx_calendar_click\");\r\n\t\t}\r\n\t\tcurrent = scheduler.date.add(current, 1, \"day\");\r\n\t}\r\n};\r\n\r\nscheduler.attachEvent(\"onEventCancel\", function(){\r\n\tscheduler.destroyCalendar(null, true);\r\n});\r\n\r\nscheduler.attachEvent(\"onDestroy\", function(){\r\n\tscheduler.destroyCalendar();\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\tscheduler.xy.scroll_width = 0;\r\n\r\n\tvar old = scheduler.render_view_data;\r\n\tscheduler.render_view_data=function(){\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\t\tdata.firstChild._h_fix = true;\r\n\r\n\t\told.apply(scheduler,arguments);\r\n\r\n\r\n\r\n\t\tvar height = parseInt(data.style.height);\r\n\t\tdata.style.height=\"1px\";\r\n\t\tdata.style.height=data.scrollHeight+\"px\";\r\n\r\n\t\tthis._obj.style.height = this._obj.clientHeight + data.scrollHeight - height + \"px\";\r\n\t};\r\n\r\n\tvar old_s=scheduler._reset_month_scale;\r\n\tscheduler._reset_month_scale=function(a,b,c,d){\r\n\t\tvar dummy = {clientHeight:100};\r\n\t\told_s.apply(scheduler,[dummy,b,c,d]);\r\n\t\ta.innerHTML = dummy.innerHTML;\r\n\t};\r\n\r\n});\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Multisection\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\n\r\nfunction parseXMLOptions(loader, config){\r\n\tvar items = scheduler.ajax.xpath(\"//data/item\", loader.xmlDoc);\r\n\tvar ids = {};\r\n\tfor (var i = 0; i < items.length; i++) {\r\n\t\tids[items[i].getAttribute(config.map_to)] = true;\r\n\t}\r\n\treturn ids;\r\n}\r\n\r\nfunction parseJSONOptions(loader, config){\r\n\ttry{\r\n\t\tvar items = JSON.parse(loader.xmlDoc.responseText);\r\n\t\tvar ids = {};\r\n\t\tfor (var i = 0; i < items.length; i++) {\r\n\t\t\tvar option = items[i];\r\n\r\n\t\t\tids[option.value || option.key || option.id] = true;\r\n\t\t}\r\n\t\treturn ids;\r\n\t}catch(e){\r\n\t\treturn null;\r\n\t}\r\n}\r\n\r\nscheduler.form_blocks[\"multiselect\"]={\r\n\trender:function(sns) {\r\n\t\tvar css = \"dhx_multi_select_control dhx_multi_select_\"+sns.name;\r\n\t\tif(!!sns.vertical){\r\n\t\t\tcss += \" dhx_multi_select_control_vertical\";\r\n\t\t}\r\n\r\n\t\tvar _result = \"
\";\r\n\t\tfor (var i=0; i\"+sns.options[i].label+\"\";\r\n\t\t}\r\n\t\t_result += \"
\";\r\n\t\treturn _result;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\r\n\t\tvar _children = node.getElementsByTagName('input');\r\n\t\tfor(var i=0;i<_children.length;i++) {\r\n\t\t\t_children[i].checked = false; //unchecking all inputs on the form\r\n\t\t}\r\n\r\n\t\tfunction _mark_inputs(ids) { // ids = [ 0: undefined, 1: undefined, 2: true, 'custom_name': false ... ]\r\n\t\t\tvar _children = node.getElementsByTagName('input');\r\n\t\t\tfor(var i=0;i<_children.length; i++) {\r\n\t\t\t\t_children[i].checked = !! ids[_children[i].value];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar _ids = {};\r\n\t\tif (ev[config.map_to]) {\r\n\t\t\tvar results = (ev[config.map_to] + \"\").split(config.delimiter || scheduler.config.section_delimiter || \",\");\r\n\t\t\tfor (var i = 0; i < results.length; i++) {\r\n\t\t\t\t_ids[results[i]] = true;\r\n\t\t\t}\r\n\t\t\t_mark_inputs(_ids);\r\n\t\t} else {\r\n\t\t\tif (scheduler._new_event || !config.script_url)\r\n\t\t\t\treturn;\r\n\t\t\tvar divLoading = document.createElement('div');\r\n\t\t\tdivLoading.className = 'dhx_loading';\r\n\t\t\tdivLoading.style.cssText = \"position: absolute; top: 40%; left: 40%;\";\r\n\t\t\tnode.appendChild(divLoading);\r\n\r\n\t\t\tvar url = [\r\n\t\t\t\tconfig.script_url,\r\n\t\t\t\t(config.script_url.indexOf(\"?\") == -1 ? \"?\" : \"&\"),\r\n\t\t\t\t'dhx_crosslink_' + config.map_to + '=' + ev.id + '&uid=' + scheduler.uid()\r\n\t\t\t].join(\"\");\r\n\r\n\t\t\tscheduler.ajax.get(url, function(loader) {\r\n\t\t\t\tvar options = parseJSONOptions(loader, config);\r\n\t\t\t\tif(!options){\r\n\t\t\t\t\toptions = parseXMLOptions(loader, config);\r\n\t\t\t\t}\r\n\t\t\t\t_mark_inputs(options);\r\n\t\t\t\tnode.removeChild(divLoading);\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tvar _result = [];\r\n\t\tvar _children = node.getElementsByTagName(\"input\");\r\n\t\tfor(var i=0;i<_children.length;i++) {\r\n\t\t\tif(_children[i].checked)\r\n\t\t\t\t_result.push(_children[i].value);\r\n\t\t}\r\n\t\treturn _result.join(config.delimiter || scheduler.config.section_delimiter || \",\");\r\n\t},\r\n\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\r\n\tfunction backup(obj){\r\n\t\tvar t = function(){};\r\n\t\tt.prototype = obj;\r\n\t\treturn t;\r\n\t}\r\n\r\n\tvar old = scheduler._load;\r\n\tscheduler._load=function(url,from){\r\n\t\turl=url||this._load_url;\r\n\t\tif (typeof url == \"object\"){\r\n\t\t\tvar t = backup(this._loaded);\r\n\t\t\tfor (var i=0; i < url.length; i++) {\r\n\t\t\t\tthis._loaded=new t();\r\n\t\t\t\told.call(this,url[i],from);\r\n\t\t\t}\r\n\t\t} else\r\n\t\t\told.apply(this,arguments);\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\t/* global Backbone */\r\n\tvar cfg = {\r\n\t\tuse_id : false\r\n\t};\r\n\r\n\t//remove private properties\r\n\tfunction sanitize(ev){\r\n\t\tvar obj = {};\r\n\t\tfor (var key in ev)\r\n\t\t\tif (key.indexOf(\"_\") !== 0)\r\n\t\t\t\tobj[key] = ev[key];\r\n\r\n\t\tif (!cfg.use_id)\r\n\t\t\tdelete obj.id;\r\n\r\n\t\treturn obj;\r\n\t}\r\n\r\n\tvar update_timer;\r\n\tfunction update_view(){\r\n\t\tclearTimeout(update_timer);\r\n\t\tupdate_timer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler.updateView();\r\n\t\t},1);\r\n\t}\r\n\r\n\tfunction _start_ext_load(cal){\r\n\t\tcal._loading = true;\r\n\t\tcal._not_render = true;\r\n\r\n\t\tcal.callEvent(\"onXLS\", []);\r\n\t}\r\n\tfunction _finish_ext_load(cal){\r\n\t\tcal._not_render = false;\r\n\t\tif (cal._render_wait)\r\n\t\t\tcal.render_view_data();\r\n\t\tcal._loading = false;\r\n\r\n\t\tcal.callEvent(\"onXLE\", []);\r\n\t}\r\n\r\n\r\n\tfunction _get_id(model){\r\n\t\treturn cfg.use_id ? model.id : model.cid;\r\n\t}\r\n\r\nscheduler.backbone = function(events, config){\r\n\tif (config) cfg = config;\r\n\r\n\tevents.bind(\"change\", function(model, info){\r\n\t\tvar cid = _get_id(model);\r\n\t\tvar ev = scheduler._events[cid] = model.toJSON();\r\n\t\tev.id = cid;\r\n\r\n\t\tscheduler._init_event(ev);\r\n\t\tupdate_view();\r\n\t});\r\n\tevents.bind(\"remove\", function(model, changes){\r\n\t\tvar cid = _get_id(model);\r\n\t\tif (scheduler._events[cid])\r\n\t\t\tscheduler.deleteEvent(cid);\r\n\t});\r\n\r\n\tvar queue = [];\r\n\tfunction add_from_queue(){\r\n\t\tif(scheduler.$destroyed){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (queue.length){\r\n\t\t\tscheduler.parse(queue, \"json\");\r\n\t\t\tqueue = [];\r\n\t\t}\r\n\t}\r\n\r\n\tevents.bind(\"add\", function(model, changes){\r\n\t\tvar cid = _get_id(model);\r\n\t\tif (!scheduler._events[cid]){\r\n\t\t\tvar ev = model.toJSON();\r\n\t\t\tev.id = cid;\r\n\t\t\tscheduler._init_event(ev);\r\n\r\n\t\t\tqueue.push(ev);\r\n\t\t\tif (queue.length == 1)\r\n\t\t\t\tsetTimeout(add_from_queue,1);\r\n\t\t}\r\n\t});\r\n\r\n\tevents.bind(\"request\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_start_ext_load(scheduler);\r\n\t});\r\n\tevents.bind(\"sync\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_finish_ext_load(scheduler);\r\n\t});\r\n\tevents.bind(\"error\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_finish_ext_load(scheduler);\r\n\t});\r\n\r\n\r\n\tscheduler.attachEvent(\"onEventCreated\", function(id){\r\n\t\tvar ev = new events.model(scheduler.getEvent(id));\r\n\t\tscheduler._events[id] = ev.toJSON();\r\n\t\tscheduler._events[id].id = id;\r\n\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventAdded\", function(id){\r\n\t\tif (!events.get(id)){\r\n\t\t\tvar data = sanitize(scheduler.getEvent(id));\r\n\t\t\tvar model = new events.model(data);\r\n\r\n\t\t\tvar cid = _get_id(model);\r\n\t\t\tif (cid != id)\r\n\t\t\t\tthis.changeEventId(id, cid);\r\n\t\t\tevents.add(model);\r\n\t\t\tevents.trigger(\"scheduler:add\", model);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\", function(id){\r\n\t\tvar ev = events.get(id);\r\n\t\tvar upd = sanitize(scheduler.getEvent(id));\r\n\r\n\t\tev.set(upd);\r\n\t\tevents.trigger(\"scheduler:change\", ev);\r\n\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function(id){\r\n\t\tvar model = events.get(id);\r\n\t\tif (model){\r\n\t\t\tevents.trigger(\"scheduler:remove\", model);\r\n\t\t\tevents.remove(id);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\t/* global dhtmlDragAndDropObject, dhtmlx */\r\n// lame old code doesn't provide raw event object\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\t\tvar dragger = (new dhtmlDragAndDropObject());\r\n\t\tvar old = dragger.stopDrag;\r\n\t\tvar last_event;\r\n\t\tdragger.stopDrag = function(e) {\r\n\t\t\tlast_event = e;\r\n\t\t\treturn old.apply(this, arguments);\r\n\t\t};\r\n\r\n\t\tfunction on_drop(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml) {\r\n\r\n\t\t\tif (scheduler.checkEvent(\"onBeforeExternalDragIn\") && !scheduler.callEvent(\"onBeforeExternalDragIn\", [sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml, last_event]))\r\n\t\t\t\treturn;\r\n\r\n\t\t\tvar temp = scheduler.attachEvent(\"onEventCreated\", function (id) {\r\n\t\t\t\tif (!scheduler.callEvent(\"onExternalDragIn\", [id, sourceHtmlObject, last_event])) {\r\n\t\t\t\t\tthis._drag_mode = this._drag_id = null;\r\n\t\t\t\t\tthis.deleteEvent(id);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tvar action_data = scheduler.getActionData(last_event);\r\n\t\t\tvar event_data = {\r\n\t\t\t\tstart_date: new Date(action_data.date)\r\n\t\t\t};\r\n\r\n\t\t\t// custom views, need to assign section id, fix dates\r\n\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\tvar view_options = scheduler.matrix[scheduler._mode];\r\n\t\t\t\tevent_data[view_options.y_property] = action_data.section;\r\n\r\n\t\t\t\tvar pos = scheduler._locate_cell_timeline(last_event);\r\n\t\t\t\tevent_data.start_date = view_options._trace_x[pos.x];\r\n\t\t\t\tevent_data.end_date = scheduler.date.add(event_data.start_date, view_options.x_step, view_options.x_unit);\r\n\t\t\t}\r\n\t\t\tif (scheduler._props && scheduler._props[scheduler._mode]) {\r\n\t\t\t\tevent_data[scheduler._props[scheduler._mode].map_to] = action_data.section;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler.addEventNow(event_data);\r\n\r\n\t\t\tscheduler.detachEvent(temp);\r\n\t\t}\r\n\r\n\t\tdragger.addDragLanding(scheduler._els[\"dhx_cal_data\"][0], {\r\n\t\t\t_drag: function(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml) {\r\n\t\t\t\ton_drop(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml);\r\n\t\t\t},\r\n\t\t\t_dragIn: function(htmlObject, shtmlObject) {\r\n\t\t\t\treturn htmlObject;\r\n\t\t\t},\r\n\t\t\t_dragOut: function(htmlObject) {\r\n\t\t\t\treturn this;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(dhtmlx.DragControl) {\r\n\t\t\tdhtmlx.DragControl.addDrop(scheduler._els[\"dhx_cal_data\"][0], {\r\n\t\t\t\tonDrop: function (source, target, d, e) {\r\n\t\t\t\t\tvar sourceDhtmlx = dhtmlx.DragControl.getMaster(source);\r\n\t\t\t\t\tlast_event = e;\r\n\t\t\t\t\ton_drop(source, sourceDhtmlx, target, e.target || e.srcElement);\r\n\t\t\t\t},\r\n\r\n\t\t\t\tonDragIn: function (source, target, e) {\r\n\t\t\t\t\treturn target;\r\n\t\t\t\t}\r\n\t\t\t}, true);\r\n\t\t}\r\n\t});\r\n\r\n}","export default function(scheduler){\r\n\r\n\tvar dx, dy,\r\n\t\thtml_regexp = new RegExp(\"<[^>]*>\", \"g\"),\r\n\t\tnewline_regexp = new RegExp(\"]*>\", \"g\");\r\n\r\n\tfunction clean_html(val) {\r\n\t\treturn val.replace(newline_regexp, \"\\n\").replace(html_regexp, \"\");\r\n\t}\r\n\r\n\tfunction x_norm(x, offset) {\r\n\t\tx = parseFloat(x);\r\n\t\toffset = parseFloat(offset);\r\n\t\tif (!isNaN(offset)) x -= offset;\r\n\r\n\t\tvar w = colsWidth(x);\r\n\t\tx = x - w.width + w.cols*dx;\r\n\t\treturn isNaN(x)?\"auto\":(100*x/(dx));\r\n\t}\r\n\r\n\tfunction x_norm_event(x, offset, is_left) {\r\n\t\tx = parseFloat(x);\r\n\t\toffset = parseFloat(offset);\r\n\t\tif (!isNaN(offset) && is_left) x -= offset;\r\n\r\n\t\tvar w = colsWidth(x);\r\n\t\tx = x - w.width + w.cols*dx;\r\n\t\treturn isNaN(x)?\"auto\":(100*x/(dx-(!isNaN(offset)?offset:0)));\r\n\t}\r\n\tfunction colsWidth(width) {\r\n\t\tvar r = 0;\r\n\t\tvar header = scheduler._els.dhx_cal_header[0].childNodes;\r\n\t\tvar els = header[1] ? header[1].childNodes : header[0].childNodes;\r\n\t\tfor (var i = 0; i < els.length; i++) {\r\n\t\t\tvar el = els[i].style ? els[i] : els[i].parentNode;\r\n\t\t\tvar w = parseFloat(el.style.width);\r\n\t\t\tif (width > w){\r\n\t\t\t\twidth -= (w+1);\r\n\t\t\t\tr+=(w+1);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\treturn { width: r, cols: i };\r\n\t}\r\n\r\n\tfunction y_norm(y) {\r\n\t\ty = parseFloat(y);\r\n\t\tif (isNaN(y)) return \"auto\";\r\n\t\treturn 100 * y / dy;\r\n\t}\r\n\r\n\tfunction get_style(node, style){\r\n\t\treturn (window.getComputedStyle?(window.getComputedStyle(node, null)[style]):(node.currentStyle?node.currentStyle[style]:null))||\"\";\r\n\t}\r\n\r\n\tfunction de_day(node, n) {\r\n\t\tvar x = parseInt(node.style.left, 10);\r\n\r\n\t\tfor (var dx = 0; dx < scheduler._cols.length; dx++) {\r\n\t\t\tx -= scheduler._cols[dx];\r\n\t\t\tif (x < 0) return dx;\r\n\t\t}\r\n\t\treturn n;\r\n\t}\r\n\r\n\tfunction de_week(node, n) {\r\n\t\tvar y = parseInt(node.style.top, 10);\r\n\t\tfor (var dy = 0; dy < scheduler._colsS.heights.length; dy++)\r\n\t\t\tif (scheduler._colsS.heights[dy] > y) return dy;\r\n\t\treturn n;\r\n\t}\r\n\r\n\tfunction xml_start(tag) {\r\n\t\treturn tag ? \"<\"+tag+\">\" : \"\";\r\n\t}\r\n\tfunction xml_end(tag) {\r\n\t\treturn tag ? \"\" : \"\";\r\n\t}\r\n\r\n\tfunction xml_top(tag, profile, header, footer) {\r\n\t\tvar xml = \"<\"+tag+\" profile='\" + profile + \"'\";\r\n\t\tif (header)\r\n\t\t\txml += \" header='\" + header + \"'\";\r\n\t\tif (footer)\r\n\t\t\txml += \" footer='\" + footer + \"'\";\r\n\t\txml += \">\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_body_header() {\r\n\t\tvar xml = \"\";\r\n\t\t// detects if current mode is timeline\r\n\t\tvar mode = scheduler._mode;\r\n\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode])\r\n\t\t\tmode = (scheduler.matrix[scheduler._mode].render == \"cell\") ? \"matrix\" : \"timeline\";\r\n\t\txml += \"\";\r\n\r\n\t\tif (scheduler._mode == \"week_agenda\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_data[0].getElementsByTagName(\"DIV\");\r\n\t\t\tfor (var i = 0; i < xh.length; i++)\r\n\t\t\t\tif (xh[i].className == \"dhx_wa_scale_bar\")\r\n\t\t\t\t\txml += \"\" + clean_html(xh[i].innerHTML) + \"\";\r\n\t\t} else if (scheduler._mode == \"agenda\" || scheduler._mode == \"map\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_header[0].childNodes[0].childNodes;\r\n\r\n\t\t\txml += \"\" + clean_html(xh[0].innerHTML) + \"\" + clean_html(xh[1].innerHTML) + \"\";\r\n\t\t} else if (scheduler._mode == \"year\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_data[0].childNodes;\r\n\t\t\tfor (var i = 0; i < xh.length; i++) {\r\n\t\t\t\txml += \"\";\r\n\t\t\t\txml += xml_month_scale(xh[i].querySelector(\".dhx_year_week\").childNodes);\r\n\t\t\t\txml += xml_month(xh[i].querySelector(\".dhx_year_body\"));\r\n\t\t\t\txml += \"\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\txml += \"\";\r\n\t\t\tvar xh = scheduler._els.dhx_cal_header[0].childNodes;\r\n\t\t\txml += xml_month_scale(xh);\r\n\t\t\txml += \"\";\r\n\r\n\t\t\tvar yh = scheduler._els.dhx_cal_data[0];\r\n\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tfor (var i = 0; i < yh.firstChild.rows.length; i++) {\r\n\t\t\t\t\tvar el = yh.firstChild.rows[i];\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t}\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tdy = yh.firstChild.rows[0].cells[0].offsetHeight;\r\n\t\t\t} else if (yh.firstChild.tagName == \"TABLE\") {\r\n\t\t\t\txml += xml_month(yh);\r\n\t\t\t} else {\r\n\t\t\t\tyh = yh.childNodes[yh.childNodes.length - 1];\r\n\t\t\t\twhile (yh.className.indexOf(\"dhx_scale_holder\") == -1)\r\n\t\t\t\t\tyh = yh.previousSibling;\r\n\t\t\t\tyh = yh.childNodes;\r\n\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tfor (var i = 0; i < yh.length; i++)\r\n\t\t\t\t\txml += \"\\n\";\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tdy = yh[0].offsetHeight;\r\n\t\t\t}\r\n\t\t}\r\n\t\txml += \"\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_month(yh) {\r\n\t\tvar xml = \"\";\r\n\t\tvar r = yh.querySelectorAll(\"tr\");\r\n\t\tfor (var i = 0; i < r.length; i++) {\r\n\t\t\tvar days = [];\r\n\t\t\tvar cells = r[i].querySelectorAll(\"td\");\r\n\r\n\t\t\tfor (var j = 0; j < cells.length; j++)\r\n\t\t\t\tdays.push(cells[j].querySelector(\".dhx_month_head\").innerHTML);\r\n\r\n\t\t\txml += \"\\n\";\r\n\t\t\tdy = cells[0].offsetHeight;\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_month_scale(xh) {\r\n\t\tvar xhs,\r\n\t\t\txml = \"\";\r\n\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\tif (scheduler.matrix[scheduler._mode].second_scale)\r\n\t\t\t\txhs = xh[1].childNodes;\r\n\r\n\t\t\txh = xh[0].childNodes;\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < xh.length; i++)\r\n\t\t\txml += \"\\n\";\r\n\t\tdx = xh[0].offsetWidth;\r\n\r\n\t\tif (xhs) {\r\n\t\t\tvar width = 0;\r\n\t\t\tvar top_width = xh[0].offsetWidth;\r\n\t\t\tvar top_col = 1;\r\n\t\t\tfor (var i = 0; i < xhs.length; i++) {\r\n\t\t\t\txml += \"\\n\";\r\n\t\t\t\twidth += xhs[i].offsetWidth;\r\n\t\t\t\tif (width >= top_width) {\r\n\t\t\t\t\ttop_width += (xh[top_col] ? xh[top_col].offsetWidth : 0);\r\n\t\t\t\t\ttop_col++;\r\n\t\t\t\t}\r\n\t\t\t\tdx = xhs[0].offsetWidth;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_body(colors) {\r\n\t\tvar xml = \"\";\r\n\t\tvar evs = scheduler._rendered;\r\n\t\tvar matrix = scheduler.matrix && scheduler.matrix[scheduler._mode];\r\n\r\n\t\tif (scheduler._mode == \"agenda\" || scheduler._mode == \"map\") {\r\n\r\n\t\t\tfor (var i = 0; i < evs.length; i++)\r\n xml += \"\";\r\n\r\n\t\t} else if (scheduler._mode == \"week_agenda\") {\r\n\r\n\t\t\tfor (var i = 0; i < evs.length; i++)\r\n\t\t\t\txml += \"\" + clean_html(evs[i].innerHTML) + \"\";\r\n\r\n\t\t} else if (scheduler._mode == \"year\") {\r\n\r\n\t\t\tvar evs = scheduler.get_visible_events();\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar d = evs[i].start_date;\r\n\t\t\t\tif (d.valueOf() < scheduler._min_date.valueOf())\r\n\t\t\t\t\td = scheduler._min_date;\r\n\r\n\t\t\t\twhile (d < evs[i].end_date) {\r\n\t\t\t\t\tvar m = d.getMonth() + 12 * (d.getFullYear() - scheduler._min_date.getFullYear()) - scheduler.week_starts._month;\r\n\t\t\t\t\tvar day = scheduler.week_starts[m] + d.getDate() - 1;\r\n\t\t\t\t\tvar text_color = colors ? get_style(scheduler._get_year_cell(d), \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(scheduler._get_year_cell(d), \"backgroundColor\") : \"\";\r\n\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t\td = scheduler.date.add(d, 1, \"day\");\r\n\t\t\t\t\tif (d.valueOf() >= scheduler._max_date.valueOf())\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (matrix && matrix.render == \"cell\") {\r\n\t\t\tvar evs = scheduler._els.dhx_cal_data[0].getElementsByTagName(\"TD\");\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar text_color = colors ? get_style(evs[i], \"color\") : \"\";\r\n\t\t\t\tvar bg_color = colors ? get_style(evs[i], \"backgroundColor\") : \"\";\r\n\t\t\t\txml += \"\\n\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar zx, zdx;\r\n\t\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\t\t// logic for timeline view\r\n\t\t\t\t\tzx = x_norm(evs[i].style.left);\r\n\t\t\t\t\tzdx = x_norm(evs[i].offsetWidth)-1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// we should use specific logic for day/week/units view\r\n\t\t\t\t\tvar left_norm = scheduler.config.use_select_menu_space ? 0 : 26;\r\n\t\t\t\t\tzx = x_norm_event(evs[i].style.left, left_norm, true);\r\n\t\t\t\t\tzdx = x_norm_event(evs[i].style.width, left_norm)-1;\r\n\t\t\t\t}\r\n\t\t\t\tif (isNaN(zdx * 1)) continue;\r\n\t\t\t\tvar zy = y_norm(evs[i].style.top);\r\n\t\t\t\tvar zdy = y_norm(evs[i].style.height);\r\n\r\n\t\t\t\tvar e_type = evs[i].className.split(\" \")[0].replace(\"dhx_cal_\", \"\");\r\n\t\t\t\tif (e_type === 'dhx_tooltip_line') continue;\r\n\r\n\t\t\t\tvar dets = scheduler.getEvent(evs[i].getAttribute(scheduler.config.event_attribute));\r\n if (!dets) continue;\r\n\t\t\t\tvar day = dets._sday;\r\n\t\t\t\tvar week = dets._sweek;\r\n\t\t\t\tvar length = dets._length || 0;\r\n\r\n\t\t\t\tif (scheduler._mode == \"month\") {\r\n\t\t\t\t\tzdy = parseInt(evs[i].offsetHeight, 10);\r\n\t\t\t\t\tzy = parseInt(evs[i].style.top, 10) - scheduler.xy.month_head_height;\r\n\r\n\t\t\t\t\tday = de_day(evs[i], day);\r\n\t\t\t\t\tweek = de_week(evs[i], week);\r\n\t\t\t\t} else if (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\t\tday = 0;\r\n\t\t\t\t\tvar el = evs[i].parentNode.parentNode.parentNode;\r\n\t\t\t\t\tweek = el.rowIndex;\r\n\t\t\t\t\tvar dy_copy = dy;\r\n\t\t\t\t\tdy = evs[i].parentNode.offsetHeight;\r\n\t\t\t\t\tzy = y_norm(evs[i].style.top);\r\n\t\t\t\t\tzy -= zy * 0.2;\r\n\t\t\t\t\tdy = dy_copy;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (evs[i].parentNode == scheduler._els.dhx_cal_data[0]) continue;\r\n\t\t\t\t\tvar parent = scheduler._els[\"dhx_cal_data\"][0].childNodes[0];\r\n\t\t\t\t\tvar offset = parseFloat(parent.className.indexOf(\"dhx_scale_holder\") != -1 ? parent.style.left : 0);\r\n\t\t\t\t\tzx += x_norm(evs[i].parentNode.style.left, offset);\r\n\t\t\t\t}\r\n\r\n\t\t\t\txml += \"\\n\";\r\n\r\n\t\t\t\tif (e_type == \"event\") {\r\n\t\t\t\t\txml += \"
\";\r\n\t\t\t\t\tvar text_color = colors ? get_style(evs[i].childNodes[2], \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(evs[i].childNodes[2], \"backgroundColor\") : \"\";\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar text_color = colors ? get_style(evs[i], \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(evs[i], \"backgroundColor\") : \"\";\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t}\r\n\t\t\t\txml += \"
\";\r\n\t\t\t}\r\n\t\t\t}\r\n\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction toXML(start, end, view, mode, header, footer){\r\n\t\tvar colors = false;\r\n\t\tif (mode == \"fullcolor\") {\r\n\t\t\tcolors = true;\r\n\t\t\tmode = \"color\";\r\n\t\t}\r\n\r\n\t\tmode = mode || \"color\";\r\n\r\n\t\tvar xml = \"\";\r\n\t\tif (start) {\r\n\r\n\t\t\tvar original_date = scheduler._date;\r\n\t\t\tvar original_mode = scheduler._mode;\r\n\t\t\tend = scheduler.date[view+\"_start\"](end);\r\n\t\t\tend = scheduler.date[\"get_\"+view+\"_end\"] ? scheduler.date[\"get_\"+view+\"_end\"](end) : scheduler.date.add(end, 1, view);\r\n\r\n\t\t\txml = xml_top(\"pages\", mode, header, footer);\r\n\t\t\tfor (var temp_date = new Date(start); +temp_date < +end; temp_date = this.date.add(temp_date, 1, view)) {\r\n\t\t\t\tthis.setCurrentView(temp_date, view);\r\n\t\t\t\txml += xml_start(\"page\") + xml_body_header().replace(\"\\u2013\", \"-\") + xml_body(colors) + xml_end(\"page\");\r\n\t\t\t}\r\n\t\t\txml += xml_end(\"pages\");\r\n\r\n\t\t\tthis.setCurrentView(original_date, original_mode);\r\n\t\t} else {\r\n\t\t\txml = xml_top(\"data\", mode, header, footer) + xml_body_header().replace(\"\\u2013\", \"-\") + xml_body(colors) + xml_end(\"data\");\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\tscheduler.getPDFData = toXML;\r\n\tfunction send_xml(xml, url){\r\n\t\tvar uid = scheduler.uid();\r\n\t\tvar d = document.createElement(\"div\");\r\n\t\td.style.display = \"none\";\r\n\t\tdocument.body.appendChild(d);\r\n\r\n\t\td.innerHTML = '
';\r\n\t\tdocument.getElementById(uid).firstChild.value = encodeURIComponent(xml);\r\n\t\tdocument.getElementById(uid).submit();\r\n\t\td.parentNode.removeChild(d);\r\n\t}\r\n\r\n\tfunction to_pdf(start, end, view, url, mode, header, footer) {\r\n\t\tvar xml = \"\";\r\n\t\tif(typeof mode == \"object\"){\r\n\t\t\txml = schedulersToPdf(mode);\r\n\t\t}else{\r\n\t\t\txml = toXML.apply(this, [start, end, view, mode, header, footer]);\r\n\t\t}\r\n\r\n\t\tsend_xml(xml, url);\r\n\t}\r\n\r\n\tfunction schedulersToPdf(objects){\r\n\t\tvar xml = \"\";\r\n\t\tfor(var i=0; i < objects.length; i++){\r\n\t\t\txml += objects[i].source.getPDFData(objects[i].start, objects[i].end, objects[i].view, objects[i].mode, objects[i].header, objects[i].footer);\r\n\t\t}\r\n\t\txml += \"\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\t/*\r\n\t * scheduler.toPDF(url, mode, header, footer) - for a single scheduler\r\n\t * scheduler.toPDF(url, [scheduler1, scheduler2,...]) - for multiple schedulers\r\n\t * example:\r\n\t * scheduler.toPDF(\"generate.ashx\", [\r\n\t * { source: scheduler1, mode: \"color\" },\r\n\t * { source: scheduler2, mode: \"gray\", view:\"week\", start:new Date(2013, 06, 1), end:new Date(2013, 06, 28) },\r\n\t * { source: scheduler3 }\r\n\t * ]);\r\n\t *\r\n\t */\r\n\tscheduler.toPDF = function(url, mode, header, footer) {\r\n\t\treturn to_pdf.apply(this, [null, null, null, url, mode, header, footer]);\r\n\t};\r\n\tscheduler.toPDFRange = function(start, end, view, url, mode, header, footer) {\r\n\t\tif (typeof start == \"string\") {\r\n\t\t\tstart = scheduler.templates.api_date(start);\r\n\t\t\tend = scheduler.templates.api_date(end);\r\n\t\t}\r\n\r\n\t\treturn to_pdf.apply(this, arguments);\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.icons_select = [\"icon_form\", \"icon_delete\"];\r\nscheduler.config.details_on_create = true;\r\nscheduler.config.show_quick_info = true;\r\nscheduler.xy.menu_width = 0;\r\n\r\n\r\n\r\nlet clickedElementPosition = null;\r\nscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\tconst container = scheduler.$container;\r\n\tif(container._$quickInfoHandler){\r\n\t\treturn;\r\n\t}else{\r\n\t\tcontainer._$quickInfoHandler = true;\r\n\t\t// store coordinates of clicked segment of an event\r\n\t\t// in case multi section events or multi-line month events\r\n\t\tscheduler.event(container, \"mousedown\", function(e){\r\n\t\t\tconst eventElement = e.target.closest(`[${scheduler.config.event_attribute}]`);\r\n\t\t\tif (eventElement) {\r\n\t\t\t\tclickedElementPosition = {\r\n\t\t\t\t\tid: eventElement.getAttribute(scheduler.config.event_attribute),\r\n\t\t\t\t\tposition: getPositionInsideScheduler(eventElement)\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t});\r\n\t\tscheduler.attachEvent(\"onDestroy\", () => {\r\n\t\t\tdelete container._$quickInfoHandler;\r\n\t\t});\r\n\t}\r\n});\r\n\r\nscheduler.attachEvent(\"onClick\", function(id){\r\n\tif(!scheduler.config.show_quick_info){\r\n\t\treturn;\r\n\t}\r\n\tscheduler.showQuickInfo(id);\r\n\treturn true;\r\n});\r\n\r\n(function(){\r\n\t// pass `force` argument in order to hide quick info synchronously\r\n\t// so it won't affect showQuickInfo call that can follow\r\n\tvar events = [\"onEmptyClick\", \"onViewChange\", \"onLightbox\", \"onBeforeEventDelete\", \"onBeforeDrag\"];\r\n\tvar hiding_function = function(){\r\n\t\tscheduler.hideQuickInfo(true);\r\n\t\treturn true;\r\n\t};\r\n\tfor (var i=0; i window.innerWidth){\r\n\t\t\tleft = window.innerWidth - width;\r\n\t\t}\r\n\t\tleft = Math.max(0, left);\r\n\r\n\t\tqi.style.left = left + \"px\";\r\n\t\tqi.style.top = pos.top - (pos.dy?height:-pos.height) + \"px\";\r\n\t} else {\r\n\r\n\t\tconst dataPos = scheduler.$container.querySelector('.dhx_cal_data').offsetTop;\r\n\t\tqi.style.top = dataPos + 20 + \"px\";\r\n\t\tif (pos.dx == 1){\r\n\t\t\tqi.style.right = \"auto\";\r\n\t\t\tqi.style.left = -width + \"px\";\r\n\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tqi.style.left = \"-10px\";\r\n\t\t\t},1);\r\n\t\t} else {\r\n\t\t\tqi.style.left = \"auto\";\r\n\t\t\tqi.style.right = -width + \"px\";\r\n\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tqi.style.right = \"-10px\";\r\n\t\t\t},1);\r\n\t\t}\r\n\t\tqi.className = qi.className.replace(\" dhx_qi_left\",\"\").replace(\" dhx_qi_right\",\"\")+\" dhx_qi_\"+(pos.dx==1?\"left\":\"right\");\r\n\t}\r\n\r\n\tqi.ontransitionend = () => {\r\n\t\tfitQIInsideWindow(qi);\r\n\t\tqi.ontransitionend = null;\r\n\t};\r\n\tsetTimeout(() => {\r\n\t\tfitQIInsideWindow(qi);\r\n\t}, 1);\r\n};\r\n\r\nfunction fitQIInsideWindow(quickInfoPopup){\r\n\tconst popupRect = quickInfoPopup.getBoundingClientRect();\r\n\tconst containerRect = scheduler.$container.getBoundingClientRect();\r\n\r\n\t// calculate the bottom offset of the Quick Info relative to the scheduler container\r\n\tconst offsetBottom = containerRect.bottom - popupRect.bottom;\r\n\r\n\t// If the popup extends outside the scheduler container, adjust its top position\r\n\tif (offsetBottom < 0) {\r\n\t\tquickInfoPopup.style.top = `${parseFloat(quickInfoPopup.style.top) + offsetBottom}px`;\r\n\t}\r\n}\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function(){\r\n\tscheduler.hideQuickInfo();\r\n\tif(this._quick_info_box){\r\n\t\tvar box = this._quick_info_box;\r\n\t\tif(box.parentNode){\r\n\t\t\tbox.parentNode.removeChild(box);\r\n\t\t}\r\n\t\tthis._quick_info_box = null;\r\n\t}\r\n});\r\nscheduler._quick_info_onscroll_handler = function(e){\r\n\tscheduler.hideQuickInfo();\r\n};\r\nscheduler._init_quick_info = function(){\r\n\tif (!this._quick_info_box){\r\n\r\n\r\n\t\tvar qi = this._quick_info_box = document.createElement(\"div\");\r\n\r\n\t\tthis._waiAria.quickInfoAttr(qi);\r\n\r\n\t\tqi.className = \"dhx_cal_quick_info\";\r\n\t\tif (scheduler.$testmode)\r\n\t\t\tqi.className += \" dhx_no_animate\";\r\n\t\tif (scheduler.config.rtl) qi.className += \" dhx_quick_info_rtl\";\r\n\t//title\r\n\t\tvar ariaAttr = this._waiAria.quickInfoHeaderAttrString();\r\n\t\tvar html = `\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t\t
\r\n\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t\t
`;\r\n\r\n\t//buttons\r\n\t\thtml += \"
\";\r\n\t\tvar buttons = scheduler.config.icons_select;\r\n\t\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\t\tvar ariaAttr = this._waiAria.quickInfoButtonAttrString(this.locale.labels[buttons[i]]);\r\n\t\t\t\thtml += `
\r\n\t\t\t\t
${scheduler.locale.labels[buttons[i]]}
`;\r\n\t\t\t}\r\n\t\t// }\r\n\t\thtml += \"
\";\r\n\r\n\t\tqi.innerHTML = html;\r\n\t\tscheduler.event(qi, \"click\", function(ev){\r\n\t\t\tscheduler._qi_button_click(ev.target || ev.srcElement);\r\n\t\t});\r\n\t\tif (scheduler.config.quick_info_detached){\r\n\t\t\tscheduler._detachDomEvent(scheduler._els[\"dhx_cal_data\"][0], \"scroll\", scheduler._quick_info_onscroll_handler);\r\n\t\t\tscheduler.event(scheduler._els[\"dhx_cal_data\"][0], \"scroll\", scheduler._quick_info_onscroll_handler);\r\n\t\t}\r\n\t}\r\n\r\n\treturn this._quick_info_box;\r\n};\r\n\r\nscheduler._qi_button_click = function(node){\r\n\tvar box = scheduler._quick_info_box;\r\n\tif (!node || node == box) return;\r\n\r\n\tif(node.closest(\".dhx_cal_qi_close_btn\")){\r\n\t\tscheduler.hideQuickInfo();\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar mask = scheduler._getClassName(node);\r\n\tif (mask.indexOf(\"_icon\")!=-1){\r\n\t\tvar id = scheduler._quick_info_box_id;\r\n\t\tscheduler._click.buttons[mask.split(\" \")[1].replace(\"icon_\",\"\")](id);\r\n\t} else\r\n\t\tscheduler._qi_button_click(node.parentNode);\r\n};\r\n\r\nfunction getPositionInsideScheduler(element){\r\n\tlet left = 0;\r\n\tlet top = 0;\r\n\r\n\tlet node = element;\r\n\twhile (node && node != scheduler._obj){\r\n\t\tleft += node.offsetLeft;\r\n\t\ttop += node.offsetTop-node.scrollTop;\r\n\t\tnode = node.offsetParent;\r\n\t}\r\n\tif(node){\r\n\t\tlet dx = (left + element.offsetWidth/2) > (scheduler._x/2) ? 1 : 0;\r\n\t\tlet dy = (top + element.offsetHeight/2) > (scheduler._y/2) ? 1 : 0;\r\n\r\n\t\treturn { left:left, top:top, dx:dx, dy:dy,\r\n\t\t\twidth:element.offsetWidth, height:element.offsetHeight };\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\nscheduler._get_event_counter_part = function(id){\r\n\tvar domEv = scheduler.getRenderedEvent(id);\r\n\treturn getPositionInsideScheduler(domEv);\r\n};\r\n\r\nscheduler._fill_quick_data = function(id){\r\n\tvar ev = scheduler.getEvent(id);\r\n\tvar qi = scheduler._quick_info_box;\r\n\r\n\tscheduler._quick_info_box_id = id;\r\n\r\n//title content\r\n\r\n\tvar header = {\r\n\t\tcontent: scheduler.templates.quick_info_title(ev.start_date, ev.end_date, ev),\r\n\t\tdate: scheduler.templates.quick_info_date(ev.start_date, ev.end_date, ev)\r\n\t};\r\n\tvar titleContent = qi.querySelector(\".dhx_cal_qi_tcontent\");\r\n\ttitleContent.innerHTML = `${header.content}`;\r\n\tvar titleDate = qi.querySelector(\".dhx_cal_qi_tdate\");\r\n\ttitleDate.innerHTML = header.date;\r\n\r\n\tscheduler._waiAria.quickInfoHeader(qi, [header.content, header.date].join(\" \"));\r\n\r\n//main content\r\n\tvar main = qi.querySelector(\".dhx_cal_qi_content\");\r\n\tconst mainContent = scheduler.templates.quick_info_content(ev.start_date, ev.end_date, ev);\r\n\tif(mainContent){\r\n\t\tmain.classList.remove(\"dhx_hidden\");\r\n\t\tmain.innerHTML = mainContent;\r\n\t}else{\r\n\t\tmain.classList.add(\"dhx_hidden\");\r\n\t}\r\n};\r\n\r\n\r\n}","export default function(scheduler){\r\n\t\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar originalRecurringSetValue;\r\n\tif (scheduler.form_blocks.recurring) {\r\n\t\toriginalRecurringSetValue = scheduler.form_blocks.recurring.set_value;\r\n\t}\r\n\tvar original_left_buttons = scheduler.config.buttons_left.slice();\r\n\tvar original_right_buttons = scheduler.config.buttons_right.slice();\r\n\r\n\tscheduler.attachEvent(\"onBeforeLightbox\", function(id) {\r\n\t\tif (this.config.readonly_form || this.getEvent(id).readonly) {\r\n\t\t\tthis.config.readonly_active = true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.config.readonly_active = false;\r\n\t\t\tscheduler.config.buttons_left = original_left_buttons.slice();\r\n\t\t\tscheduler.config.buttons_right = original_right_buttons.slice();\r\n\t\r\n\t\t\t// initial value\r\n\t\t\tif(scheduler.form_blocks.recurring) {\r\n\t\t\t\tscheduler.form_blocks.recurring.set_value = originalRecurringSetValue;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar sns = this.config.lightbox.sections;\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\tfor (var i = 0; i < sns.length; i++) {\r\n\t\t\t\tif (sns[i].type == 'recurring') {\r\n\t\t\t\t\tif (this.config.readonly_active && scheduler.form_blocks.recurring) {\r\n\t\t\t\t\t\tscheduler.form_blocks.recurring.set_value = function(node, value, ev) {\r\n\t\t\t\t\t\t\tvar wrapper = scheduler.$domHelpers.closest(node, \".dhx_wrap_section\");\r\n\t\t\t\t\t\t\tvar style = \"none\";\r\n\t\t\t\t\t\t\twrapper.querySelector('.dhx_cal_lsection').display = style;\r\n\t\t\t\t\t\t\twrapper.querySelector('.dhx_form_repeat').display = style;\r\n\t\t\t\t\t\t\twrapper.style.display = style;\r\n\r\n\t\t\t\t\t\t\tscheduler.setLightboxSize();\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar forbidden_buttons = [\"dhx_delete_btn\", \"dhx_save_btn\"];\r\n\t\t\tvar button_arrays = [scheduler.config.buttons_left, scheduler.config.buttons_right];\r\n\t\t\tfor (var i = 0; i < forbidden_buttons.length; i++) {\r\n\t\t\t\tvar forbidden_button = forbidden_buttons[i];\r\n\t\t\t\tfor (var k = 0; k < button_arrays.length; k++) {\r\n\t\t\t\t\tvar button_array = button_arrays[k];\r\n\t\t\t\t\tvar index = -1;\r\n\t\t\t\t\tfor (var p = 0; p < button_array.length; p++) {\r\n\t\t\t\t\t\tif (button_array[p] == forbidden_button) {\r\n\t\t\t\t\t\t\tindex = p;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (index != -1) {\r\n\t\t\t\t\t\tbutton_array.splice(index, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.resetLightbox();\r\n\r\n\t\treturn true;\r\n\t});\r\n\r\n\tfunction txt_replace(tag, d, n, text) {\r\n\t\tvar txts = d.getElementsByTagName(tag);\r\n\t\tvar txtt = n.getElementsByTagName(tag);\r\n\t\tfor (var i = txtt.length - 1; i >= 0; i--) {\r\n\t\t\tvar n = txtt[i];\r\n\t\t\tif (!text){\r\n\t\t\t\tn.disabled = true;\r\n\t\t\t\t//radio and checkboxes loses state after .cloneNode in IE\r\n\t\t\t\tif(d.checked)\r\n\t\t\t\t\tn.checked = true;\r\n\t\t\t}else {\r\n\t\t\t\tvar t = document.createElement(\"span\");\r\n\t\t\t\tt.className = \"dhx_text_disabled\";\r\n\t\t\t\tt.innerHTML = text(txts[i]);\r\n\t\t\t\tn.parentNode.insertBefore(t, n);\r\n\t\t\t\tn.parentNode.removeChild(n);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tvar old = scheduler._fill_lightbox;\r\n\tscheduler._fill_lightbox = function() {\r\n\r\n\t\tvar lb = this.getLightbox();\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\tlb.style.visibility = 'hidden';\r\n\t\t\t// lightbox should have actual sizes before rendering controls\r\n\t\t\t// currently only matters for dhtmlxCombo\r\n\t\t\tlb.style.display = 'block';\r\n\t\t}\r\n\t\tvar res = old.apply(this, arguments);\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\t//reset visibility and display\r\n\t\t\tlb.style.visibility = '';\r\n\t\t\tlb.style.display = 'none';\r\n\t\t}\r\n\r\n\t\tif (this.config.readonly_active) {\r\n\r\n\t\t\tvar originalForm = this.getLightbox();\r\n\t\t\tvar readonlyForm = this._lightbox_r = originalForm.cloneNode(true);\r\n\t\t\treadonlyForm.id = scheduler.uid();\r\n\t\t\treadonlyForm.className += \" dhx_cal_light_readonly\";\r\n\t\t\ttxt_replace(\"textarea\", originalForm, readonlyForm, function(a) {\r\n\t\t\t\treturn a.value;\r\n\t\t\t});\r\n\t\t\ttxt_replace(\"input\", originalForm, readonlyForm, false);\r\n\t\t\ttxt_replace(\"select\", originalForm, readonlyForm, function(a) {\r\n\t\t\t\tif(!a.options.length) return \"\";\r\n\t\t\t\treturn a.options[Math.max((a.selectedIndex || 0), 0)].text;\r\n\t\t\t});\r\n\r\n\t\t\toriginalForm.parentNode.insertBefore(readonlyForm, originalForm);\r\n\r\n\t\t\tthis.showCover(readonlyForm);\r\n\t\t\tif (scheduler._lightbox)\r\n\t\t\t\tscheduler._lightbox.parentNode.removeChild(scheduler._lightbox);\r\n\t\t\tthis._lightbox = readonlyForm;\r\n\r\n\t\t\tif (scheduler.config.drag_lightbox)\r\n\t\t\t\tscheduler.event(readonlyForm.firstChild, \"mousedown\", scheduler._ready_to_dnd);\r\n\t\t\t\t\r\n\t\t\tscheduler._init_lightbox_events();\r\n\t\t\tthis.setLightboxSize();\r\n\t\t}\r\n\t\treturn res;\r\n\t};\r\n\r\n\tvar hold = scheduler.hide_lightbox;\r\n\tscheduler.hide_lightbox = function() {\r\n\t\tif (this._lightbox_r) {\r\n\t\t\tthis._lightbox_r.parentNode.removeChild(this._lightbox_r);\r\n\t\t\tthis._lightbox_r = this._lightbox = null;\r\n\t\t}\r\n\r\n\t\treturn hold.apply(this, arguments);\r\n\t};\r\n});\r\n\r\n\r\n}","import { RRule, rrulestr } from 'rrule';\r\n\r\nexport default function (scheduler) {\r\n\r\n\tfunction clearMilliseconds(date) {\r\n\t\treturn new Date(\r\n\t\t\tdate.getFullYear(),\r\n\t\t\tdate.getMonth(),\r\n\t\t\tdate.getDate(),\r\n\t\t\tdate.getHours(),\r\n\t\t\tdate.getMinutes(),\r\n\t\t\tdate.getSeconds(),\r\n\t\t\t0\r\n\t\t);\r\n\t}\r\n\r\n\tfunction isDeletedOccurrence(event) {\r\n\t\treturn !!event.deleted;\r\n\t}\r\n\r\n\tfunction isSeries(event) {\r\n\t\treturn !!event.rrule && !event.recurring_event_id;\r\n\t}\r\n\r\n\tfunction clearRecurringProperties(event) {\r\n\t\tevent.rrule = \"\";\r\n\t\tevent.original_start = null;\r\n\t\tevent.recurring_event_id = null;\r\n\t\tevent.duration = null;\r\n\t\tevent.deleted = null;\r\n\t}\r\n\r\n\tfunction createException(ev) {\r\n\t\tlet id = ev.id.split(\"#\");\r\n\r\n\t\tlet nid = scheduler.uid();\r\n\t\tscheduler._not_render = true;\r\n\t\tlet nev = scheduler._copy_event(ev);\r\n\t\tnev.id = nid;\r\n\t\tnev.recurring_event_id = id[0];\r\n\r\n\t\tlet timestamp = id[1];\r\n\r\n\t\tnev.original_start = new Date(Number(timestamp));\r\n\r\n\t\tscheduler._add_rec_marker(nev, timestamp);\r\n\t\tscheduler.addEvent(nev);\r\n\t\tscheduler._not_render = false;\r\n\t}\r\n\r\n\tfunction toUTCDate(date){\r\n\t\treturn new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(),date.getSeconds()));\r\n\t}\r\n\r\n\tfunction setUTCPartsToDate(d) {\r\n\t\treturn new Date(\r\n\t\t\td.getUTCFullYear(),\r\n\t\t\td.getUTCMonth(),\r\n\t\t\td.getUTCDate(),\r\n\t\t\td.getUTCHours(),\r\n\t\t\td.getUTCMinutes(),\r\n\t\t\td.getUTCSeconds()\r\n\t\t);\r\n\t}\r\n\r\n\tscheduler._rec_temp = [];\r\n\tscheduler._rec_markers_pull = {};\r\n\tscheduler._rec_markers = {};\r\n\tscheduler._add_rec_marker = function (ev, time) {\r\n\t\tev._pid_time = time;\r\n\t\tthis._rec_markers[ev.id] = ev;\r\n\t\tif (!this._rec_markers_pull[ev.event_pid]) this._rec_markers_pull[ev.event_pid] = {};\r\n\t\tthis._rec_markers_pull[ev.event_pid][time] = ev;\r\n\t};\r\n\tscheduler._get_rec_marker = function (time, id) {\r\n\t\tlet ch = this._rec_markers_pull[id];\r\n\t\tif (ch) return ch[time];\r\n\t\treturn null;\r\n\t};\r\n\tscheduler._get_rec_markers = function (id) {\r\n\t\treturn (this._rec_markers_pull[id] || []);\r\n\t};\r\n\r\n\t(function () {\r\n\t\tvar old_add_event = scheduler.addEvent;\r\n\t\tscheduler.addEvent = function (start_date, end_date, text, id, extra_data) {\r\n\t\t\tvar ev_id = old_add_event.apply(this, arguments);\r\n\r\n\t\t\tif (ev_id && scheduler.getEvent(ev_id)) {\r\n\t\t\t\tvar ev = scheduler.getEvent(ev_id);\r\n\r\n\t\t\t\tif (ev.start_date) {\r\n\t\t\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t\t\t}\r\n\t\t\t\tif (ev.end_date) {\r\n\t\t\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn ev_id;\r\n\t\t};\r\n\t})();\r\n\r\n\tscheduler.attachEvent(\"onEventLoading\", function (event) {\r\n\r\n\t\tif (event.original_start) {\r\n\t\t\tevent.original_start = scheduler.templates.parse_date(event.original_start);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventIdChange\", function (id, new_id) {\r\n\t\tif (this._ignore_call) return;\r\n\t\tthis._ignore_call = true;\r\n\r\n\t\tif (scheduler._rec_markers[id]) {\r\n\t\t\t//important for for correct work of scheduler.getEvents(from, to) and collision detection\r\n\t\t\tscheduler._rec_markers[new_id] = scheduler._rec_markers[id];\r\n\t\t\tdelete scheduler._rec_markers[id];\r\n\t\t}\r\n\r\n\t\tif (scheduler._rec_markers_pull[id]) {\r\n\t\t\tscheduler._rec_markers_pull[new_id] = scheduler._rec_markers_pull[id];\r\n\t\t\tdelete scheduler._rec_markers_pull[id];\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < this._rec_temp.length; i++) {\r\n\t\t\tvar tev = this._rec_temp[i];\r\n\t\t\tif (tev.recurring_event_id == id) {\r\n\t\t\t\ttev.recurring_event_id = new_id;\r\n\t\t\t\tthis.changeEventId(tev.id, new_id + \"#\" + tev.id.split(\"#\")[1]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (var i in this._rec_markers) {\r\n\t\t\tvar tev = this._rec_markers[i];\r\n\t\t\tif (tev.recurring_event_id == id) {\r\n\t\t\t\ttev.recurring_event_id = new_id;\r\n\t\t\t\ttev._pid_changed = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar el = scheduler._rec_markers[new_id];\r\n\t\tif (el && el._pid_changed) {\r\n\t\t\tdelete el._pid_changed;\r\n\t\t\tsetTimeout(function () {\r\n\t\t\t\tif (scheduler.$destroyed) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tscheduler.callEvent(\"onEventChanged\", [new_id, scheduler.getEvent(new_id)]);\r\n\t\t\t}, 1);\r\n\t\t}\r\n\r\n\t\tdelete this._ignore_call;\r\n\t});\r\n\r\n\tfunction deleteEventFromSeries(idTimestamp, ev) {\r\n\t\tlet id = idTimestamp;\r\n\t\tidTimestamp = id.split(\"#\");\r\n\t\tlet nid = scheduler.uid();\r\n\t\tlet tid = (idTimestamp[1]) ? idTimestamp[1] : (ev._pid_time);\r\n\t\tlet nev = scheduler._copy_event(ev);\r\n\t\tnev.id = nid;\r\n\t\tnev.recurring_event_id = ev.recurring_event_id || idTimestamp[0];\r\n\t\tnev.original_start = new Date(Number(tid));\r\n\t\tnev.deleted = true;\r\n\t\tscheduler.addEvent(nev);\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function (id) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (this._is_virtual_event(id) || (this._is_modified_occurence(ev) && !isDeletedOccurrence(ev))) {\r\n\t\t\tdeleteEventFromSeries(id, ev);\r\n\t\t} else {\r\n\t\t\tif (isSeries(ev) && this._lightbox_id)\r\n\t\t\t\tthis._roll_back_dates(ev);\r\n\r\n\r\n\t\t\tvar sub = this._get_rec_markers(id);\r\n\t\t\tfor (var i in sub) {\r\n\t\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\t\tid = sub[i].id;\r\n\t\t\t\t\tif (this.getEvent(id))\r\n\t\t\t\t\t\tthis.deleteEvent(id, true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function (id, ev) {\r\n\t\tif (!this._is_virtual_event(id) && this._is_modified_occurence(ev)) {\r\n\t\t\tif (!scheduler._events[id]) {\r\n\t\t\t\tev.deleted = true;\r\n\t\t\t\tthis.setEvent(id, ev);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\", function (id, event) {\r\n\t\tif (this._loading) return true;\r\n\r\n\t\tvar ev = this.getEvent(id);\r\n\r\n\t\tif (this._is_virtual_event(id)) {\r\n\t\t\tcreateException(ev);\r\n\r\n\t\t} else {\r\n\t\t\tif (ev.start_date) {\r\n\t\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t\t}\r\n\t\t\tif (ev.end_date) {\r\n\t\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t\t}\r\n\r\n\t\t\tif (isSeries(ev) && this._lightbox_id) {\r\n\t\t\t\tthis._roll_back_dates(ev);\r\n\t\t\t\t//scheduler.recurrings.rollbackDates(ev);\r\n\t\t\t}\r\n\r\n\t\t\tvar sub = this._get_rec_markers(id);\r\n\t\t\tfor (var i in sub) {\r\n\t\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\t\tdelete this._rec_markers[sub[i].id];\r\n\t\t\t\t\tthis.deleteEvent(sub[i].id, true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tdelete this._rec_markers_pull[id];\r\n\r\n\t\t\t// it's possible that after editing event is no longer exists, in such case we need to remove _select_id flag\r\n\t\t\tvar isEventFound = false;\r\n\t\t\tfor (var k = 0; k < this._rendered.length; k++) {\r\n\t\t\t\tif (this._rendered[k].getAttribute(this.config.event_attribute) == id)\r\n\t\t\t\t\tisEventFound = true;\r\n\t\t\t}\r\n\t\t\tif (!isEventFound)\r\n\t\t\t\tthis._select_id = null;\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventAdded\", function (id) {\r\n\t\tif (!this._loading) {\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif (isSeries(ev)) {\r\n\t\t\t\tthis._roll_back_dates(ev);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventSave\", function (id, data, is_new_event) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (isSeries(ev))\r\n\t\t\tthis._select_id = null;\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventCreated\", function (id) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (!isSeries(ev)) {\r\n\t\t\tclearRecurringProperties(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventCancel\", function (id) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (isSeries(ev)) {\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t\t// a bit expensive, but we need to be sure that event re-rendered, because view can be corrupted by resize , during edit process\r\n\t\t\tthis.render_view_data();\r\n\t\t}\r\n\t});\r\n\tscheduler._roll_back_dates = function (ev) {\r\n\t\t//// !!!!! calc temp properties\r\n\t\tif (ev.start_date) {\r\n\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t}\r\n\t\tif (ev.end_date) {\r\n\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t}\r\n\r\n\t\tev.duration = Math.round((ev.end_date.valueOf() - ev.start_date.valueOf()) / 1000);\r\n\t\tev.end_date = ev._end_date;\r\n\t\tif (ev._start_date) {\r\n\t\t\tev.start_date.setMonth(0);\r\n\t\t\tev.start_date.setDate(ev._start_date.getDate());\r\n\t\t\tev.start_date.setMonth(ev._start_date.getMonth());\r\n\t\t\tev.start_date.setFullYear(ev._start_date.getFullYear());\r\n\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._is_virtual_event = function (id) {\r\n\t\treturn id.toString().indexOf(\"#\") != -1;\r\n\t};\r\n\tscheduler._is_modified_occurence = function (ev) {\r\n\t\treturn (ev.recurring_event_id && ev.recurring_event_id != \"0\");\r\n\t};\r\n\r\n\tscheduler.showLightbox_rec = scheduler.showLightbox;\r\n\tscheduler.showLightbox = function (id) {\r\n\t\tvar locale = this.locale;\r\n\t\tvar c = scheduler.config.lightbox_recurring;\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tvar pid = ev.recurring_event_id;\r\n\t\tvar isVirtual = this._is_virtual_event(id);\r\n\t\tif (isVirtual)\r\n\t\t\tpid = id.split(\"#\")[0];\r\n\r\n\t\t// show series\r\n\t\tvar showSeries = function (id) {\r\n\t\t\tvar event = scheduler.getEvent(id);\r\n\t\t\tevent._end_date = event.end_date;\r\n\t\t\tevent.end_date = new Date(event.start_date.valueOf() + event.duration * 1000);\r\n\t\t\treturn scheduler.showLightbox_rec(id); // editing series\r\n\t\t};\r\n\r\n\t\tif ((pid || pid * 1 === 0) && isSeries(ev)) {\r\n\t\t\t// direct API call on series id\r\n\t\t\treturn showSeries(id);\r\n\t\t}\r\n\t\tif (!pid || pid === '0' || ((!locale.labels.confirm_recurring || c == 'instance') || (c == 'series' && !isVirtual))) {\r\n\t\t\t// editing instance or non recurring event\r\n\t\t\treturn this.showLightbox_rec(id);\r\n\t\t}\r\n\t\tif (c == 'ask') {\r\n\t\t\tvar that = this;\r\n\t\t\tscheduler.modalbox({\r\n\t\t\t\ttext: locale.labels.confirm_recurring,\r\n\t\t\t\ttitle: locale.labels.title_confirm_recurring,\r\n\t\t\t\twidth: \"500px\",\r\n\t\t\t\tposition: \"middle\",\r\n\t\t\t\tbuttons: [locale.labels.button_edit_series, locale.labels.button_edit_occurrence, locale.labels.icon_cancel],\r\n\t\t\t\tcallback: function (index) {\r\n\t\t\t\t\tswitch (+index) {\r\n\t\t\t\t\t\tcase 0:\r\n\t\t\t\t\t\t\treturn showSeries(pid);\r\n\t\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\t\treturn that.showLightbox_rec(id);\r\n\t\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tshowSeries(pid);\r\n\t\t}\r\n\t};\r\n\r\n\tfunction groupExceptions() {\r\n\t\tconst exceptions = {};\r\n\t\tfor (const i in scheduler._events) {\r\n\t\t\tconst ev = scheduler._events[i];\r\n\t\t\tif (ev.recurring_event_id) {\r\n\t\t\t\tif (!exceptions[ev.recurring_event_id]) {\r\n\t\t\t\t\texceptions[ev.recurring_event_id] = {};\r\n\t\t\t\t}\r\n\t\t\t\texceptions[ev.recurring_event_id][ev.original_start.valueOf()] = ev;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn exceptions;\r\n\t}\r\n\r\n\tscheduler.get_visible_events_rec = scheduler.get_visible_events;\r\n\tscheduler.get_visible_events = function (only_timed) {\r\n\t\tfor (var i = 0; i < this._rec_temp.length; i++)\r\n\t\t\tdelete this._events[this._rec_temp[i].id];\r\n\t\tthis._rec_temp = [];\r\n\r\n\t\tconst exceptions = groupExceptions();\r\n\t\tvar stack = this.get_visible_events_rec(only_timed);\r\n\t\tvar out = [];\r\n\t\tfor (var i = 0; i < stack.length; i++) {\r\n\t\t\tif (stack[i].deleted || stack[i].recurring_event_id) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif (isSeries(stack[i])) {\r\n\t\t\t\tthis.repeat_date(stack[i], out, undefined, undefined, undefined, undefined, exceptions);\r\n\t\t\t} else {\r\n\t\t\t\tout.push(stack[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn out;\r\n\t};\r\n\r\n\t(function () {\r\n\t\tvar old = scheduler.isOneDayEvent;\r\n\t\tscheduler.isOneDayEvent = function (ev) {\r\n\t\t\tif (isSeries(ev)) return true;\r\n\t\t\treturn old.call(this, ev);\r\n\t\t};\r\n\t\tvar old_update_event = scheduler.updateEvent;\r\n\t\tscheduler.updateEvent = function (id) {\r\n\t\t\tvar ev = scheduler.getEvent(id);\r\n\r\n\t\t\tif (ev && isSeries(ev) && !this._is_virtual_event(id)) {\r\n\t\t\t\tscheduler.update_view();\r\n\t\t\t} else {\r\n\t\t\t\told_update_event.call(this, id);\r\n\t\t\t}\r\n\t\t};\r\n\t})();\r\n\r\n\tconst toIcalString = scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\");\r\n\r\n\tscheduler.repeat_date = function (ev, stack, non_render, from, to, maxCount, exceptions) {\r\n\t\tif (!ev.rrule) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tlet seriesExceptions = exceptions ? exceptions[ev.id] : groupExceptions()[ev.id];\r\n\t\tif (!seriesExceptions) {\r\n\t\t\tseriesExceptions = {};\r\n\t\t}\r\n\r\n\t\t// GS-2596: from and to should be in UTC, \r\n\t\t// need to remove one sec to not be included in repeatedDates array\r\n\t\tfrom = toUTCDate(from || new Date(scheduler._min_date.valueOf() - 1000));\r\n\t\tto = toUTCDate(to || new Date(scheduler._max_date.valueOf() - 1000));\r\n\r\n\t\t\r\n\t\tconst utcStart = toUTCDate(ev.start_date);\r\n\t\tlet parsedRRule;\r\n\t\tif (maxCount){\r\n\t\t\t// for getRecDates() method\r\n\t\t\tparsedRRule = rrulestr(`RRULE:${ev.rrule};UNTIL=${toIcalString(ev.end_date)};COUNT=${maxCount}`, { dtstart: utcStart });\r\n\t\t} else {\r\n\t\t\tparsedRRule = rrulestr(`RRULE:${ev.rrule};UNTIL=${toIcalString(ev.end_date)}`, { dtstart: utcStart });\r\n\t\t}\r\n\t\t//GS-2596: third parameter, includes dates that match with arguments\r\n\t\tconst repeatedDates = parsedRRule.between(from, to, true).map(date => {\r\n\t\t\tconst adjustedDate = setUTCPartsToDate(date);\r\n\t\t\tadjustedDate.setHours(ev.start_date.getHours());\r\n\t\t\tadjustedDate.setMinutes(ev.start_date.getMinutes());\r\n\t\t\tadjustedDate.setSeconds(ev.start_date.getSeconds());\r\n\t\t\treturn adjustedDate;\r\n\t\t});\r\n\t\tlet visibleCount = 0;\r\n\r\n\t\tconst eventDuration = ev.duration;\r\n\r\n\t\tfor (let i = 0; i < repeatedDates.length; i++) {\r\n\t\t\tif (maxCount && visibleCount >= maxCount) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tconst date = repeatedDates[i];\r\n\r\n\t\t\tlet exception = seriesExceptions[date.valueOf()];\r\n\t\t\tif (exception) {\r\n\t\t\t\tif (exception.deleted) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvisibleCount++;\r\n\t\t\t\t\tstack.push(exception);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tconst copy = scheduler._copy_event(ev);\r\n\t\t\t\t//copy._timed = ev._timed;\r\n\t\t\t\tcopy.text = ev.text;\r\n\t\t\t\tcopy.start_date = date;\r\n\t\t\t\tcopy.id = ev.id + \"#\" + Math.ceil(date.valueOf());\r\n\t\t\t\tcopy.end_date = new Date(date.valueOf() + eventDuration * 1000);\r\n\t\t\t\tcopy.end_date = scheduler._fix_daylight_saving_date(copy.start_date, copy.end_date, ev, date, copy.end_date);\r\n\t\t\t\tcopy._timed = scheduler.isOneDayEvent(copy);\r\n\r\n\r\n\r\n\t\t\t\tif (!copy._timed && !scheduler._table_view && !scheduler.config.multi_day) continue;\r\n\t\t\t\tstack.push(copy);\r\n\r\n\t\t\t\tif (!non_render) {\r\n\t\t\t\t\tscheduler._events[copy.id] = copy;\r\n\t\t\t\t\tscheduler._rec_temp.push(copy);\r\n\t\t\t\t}\r\n\t\t\t\tvisibleCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//GS-2534: case when exceptions have different dates\r\n\t\tif (seriesExceptions && repeatedDates.length == 0 ){\r\n\t\t\tfor (let a in seriesExceptions){\r\n\t\t\t\tlet exception = seriesExceptions[a];\r\n\t\t\t\tif (exception) {\r\n\t\t\t\t\tif(exception.deleted){\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\telse if (from && to && exception.start_date < to && exception.end_date > from) {\r\n\t\t\t\t\t\tstack.push(exception);\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t} \r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._fix_daylight_saving_date = function (start_date, end_date, ev, counter, default_date) {\r\n\t\tvar shift = start_date.getTimezoneOffset() - end_date.getTimezoneOffset();\r\n\t\tif (shift) {\r\n\t\t\tif (shift > 0) {\r\n\t\t\t\t// e.g. 24h -> 23h\r\n\t\t\t\treturn new Date(counter.valueOf() + ev.duration * 1000 - shift * 60 * 1000);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t// e.g. 24h -> 25h\r\n\t\t\t\treturn new Date(end_date.valueOf() - shift * 60 * 1000);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new Date(default_date.valueOf());\r\n\t};\r\n\tscheduler.getRecDates = function (id, max) {\r\n\t\tvar ev = typeof id == \"object\" ? id : scheduler.getEvent(id);\r\n\t\tvar recurrings = [];\r\n\t\tmax = max || 100;\r\n\r\n\t\tif (!isSeries(ev)) {\r\n\t\t\treturn [\r\n\t\t\t\t{ start_date: ev.start_date, end_date: ev.end_date }\r\n\t\t\t];\r\n\t\t}\r\n\t\tif (ev.deleted) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tscheduler.repeat_date(ev, recurrings, true, ev.start_date, ev.end_date, max);\r\n\r\n\t\tvar result = [];\r\n\t\tfor (var i = 0; i < recurrings.length; i++) {\r\n\t\t\tif (!recurrings[i].deleted) {\r\n\t\t\t\tresult.push({ start_date: recurrings[i].start_date, end_date: recurrings[i].end_date });\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t};\r\n\tscheduler.getEvents = function (from, to) {\r\n\t\tvar result = [];\r\n\t\tconst exceptions = groupExceptions();\r\n\t\tfor (var a in this._events) {\r\n\t\t\tvar ev = this._events[a];\r\n\t\t\tif (ev.recurring_event_id) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif (from && to && ev.start_date < to && ev.end_date > from) {\r\n\t\t\t\tif (isSeries(ev)) {\r\n\t\t\t\t\tvar sev = [];\r\n\t\t\t\t\tthis.repeat_date(ev, sev, true, from, to, undefined, exceptions);\r\n\t\t\t\t\tsev.forEach(function(occurence){\r\n\t\t\t\t\t\tif (occurence.start_date < to && occurence.end_date > from) {\r\n\t\t\t\t\t\t\tresult.push(occurence);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t// if it's virtual event we can skip it\r\n\t\t\t\t} else if (!this._is_virtual_event(ev.id)) {\r\n\t\t\t\t\tresult.push(ev);\r\n\t\t\t\t}\r\n\t\t\t} else if (!from && !to && !this._is_virtual_event(ev.id)) {\r\n\t\t\t\tresult.push(ev);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t};\r\n\r\n\t//drop secondary attributes\r\n\tscheduler._copy_dummy = function (ev) {\r\n\t\tvar start_date = new Date(this.start_date);\r\n\t\tvar end_date = new Date(this.end_date);\r\n\t\tthis.start_date = start_date;\r\n\t\tthis.end_date = end_date;\r\n\t\tthis.duration = this.rrule = null;\r\n\t};\r\n\r\n\tscheduler.config.include_end_by = false;\r\n\tscheduler.config.lightbox_recurring = 'ask'; // series, instance\r\n\tscheduler.config.recurring_workdays = [RRule.MO.weekday,RRule.TU.weekday,RRule.WE.weekday,RRule.TH.weekday,RRule.FR.weekday];\r\n\tscheduler.config.repeat_date = \"%m.%d.%Y\";\r\n\tscheduler.config.lightbox.sections = [\r\n\t\t{ name: \"description\", map_to: \"text\", type: \"textarea\", focus: true },\r\n\t\t{ name: \"recurring\", type: \"recurring\", map_to: \"rec_type\" },\r\n\t\t{ name: \"time\", height: 72, type: \"time\", map_to: \"auto\" }\r\n\t];\r\n\r\n\tscheduler.attachEvent(\"onClearAll\", function () {\r\n\t\tscheduler._rec_markers = {}; //clear recurring events data\r\n\t\tscheduler._rec_markers_pull = {};\r\n\t\tscheduler._rec_temp = [];\r\n\t});\r\n\r\n\r\n\tfunction getTopLevelOption(rruleObj, untilDate) {\r\n\t\tconst options = rruleObj.options;\r\n\t\tconst until = options.until || untilDate;\r\n\r\n\t\tconst hasEndCondition = options.count || (until && until.getFullYear() !== 9999);\r\n\r\n\t\tif (hasEndCondition) {\r\n\t\t\treturn 'CUSTOM';\r\n\t\t}\r\n\r\n\t\tif (options.freq === RRule.DAILY && options.interval === 1 && !options.byweekday) {\r\n\t\t\treturn 'DAILY';\r\n\t\t} else if (options.freq === RRule.WEEKLY && options.interval === 1 && !options.byweekday) {\r\n\t\t\treturn 'WEEKLY';\r\n\t\t} else if (options.freq === RRule.MONTHLY && options.interval === 1 && !options.bysetpos) {\r\n\t\t\treturn 'MONTHLY';\r\n\t\t} else if (options.freq === RRule.YEARLY && options.interval === 1 && !options.bysetpos) {\r\n\t\t\treturn 'YEARLY';\r\n\t\t} else if (options.freq === RRule.DAILY && options.byweekday && options.byweekday.length === scheduler.config.recurring_workdays.length &&\r\n\t\t\toptions.byweekday.includes(RRule.MO) &&\r\n\t\t\toptions.byweekday.includes(RRule.TU) &&\r\n\t\t\toptions.byweekday.includes(RRule.WE) &&\r\n\t\t\toptions.byweekday.includes(RRule.TH) &&\r\n\t\t\toptions.byweekday.includes(RRule.FR)) {\r\n\t\t\treturn 'WORKDAYS';\r\n\t\t} else {\r\n\t\t\treturn 'CUSTOM';\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction getWeekdayOfMonth(date) {\r\n\t\tconst dayOfWeek = date.getDay();\r\n\t\tconst dayOfMonth = date.getDate();\r\n\t\tconst dayNumber = Math.ceil(dayOfMonth / 7);\r\n\t\treturn { dayOfWeek, dayNumber };\r\n\t}\r\n\r\n\r\n\tconst jsDaysToRRULEDays = {\r\n\t\t0: \"SU\",\r\n\t\t1: \"MO\",\r\n\t\t2: \"TU\",\r\n\t\t3: \"WE\",\r\n\t\t4: \"TH\",\r\n\t\t5: \"FR\",\r\n\t\t6: \"SA\"\r\n\t};\r\n\tconst RruleDayNumsToJs = {\r\n\t\t0: 1,\r\n\t\t1: 2,\r\n\t\t2: 3,\r\n\t\t3: 4,\r\n\t\t4: 5,\r\n\t\t5: 6,\r\n\t\t6: 0\r\n\t};\r\n\r\n\tfunction fillCustomDaily(node, rule) {\r\n\t\tnode.querySelector(\"[name='repeat_interval_value']\").value = (rule ? rule.interval : 1) || 1;\r\n\t}\r\n\r\n\tfunction fillCustomWeekly(node, rule, event) {\r\n\t\tnode.querySelector(\"[name='repeat_interval_value']\").value = (rule ? rule.interval : 1) || 1;\r\n\r\n\t\tconst dayCheckboxes = node.querySelectorAll(`.dhx_form_repeat_custom_week input`);\r\n\t\tdayCheckboxes.forEach((ch) => ch.checked = false);\r\n\t\tif (rule && rule.byweekday) {\r\n\t\t\trule.byweekday.forEach((day) => {\r\n\t\t\t\tconst dayNum = RruleDayNumsToJs[day.weekday];\r\n\t\t\t\tconst dayLabel = jsDaysToRRULEDays[dayNum];\r\n\t\t\t\tnode.querySelector(`.dhx_form_repeat_custom_week input[value=\"${dayLabel}\"]`).checked = true;\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tconst dayLabel = jsDaysToRRULEDays[event.start_date.getDay()];\r\n\t\t\tnode.querySelector(`.dhx_form_repeat_custom_week input[value=\"${dayLabel}\"]`).checked = true;\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tfunction fillCustomMonthly(node, rule, event) {\r\n\t\tnode.querySelector(\"[name='repeat_interval_value']\").value = (rule ? rule.interval : 1) || 1;\r\n\r\n\t\tconst dateOfMonth = node.querySelector(`.dhx_form_repeat_custom_month [value=\"month_date\"]`);\r\n\t\tconst nthWeekDayOfMonth = node.querySelector(`.dhx_form_repeat_custom_month [value=\"month_nth_weekday\"]`);\r\n\t\tdateOfMonth.innerText = scheduler.templates.repeat_monthly_date(event.start_date, event);\r\n\t\tnthWeekDayOfMonth.innerText = scheduler.templates.repeat_monthly_weekday(event.start_date, event);\r\n\r\n\t\tif (!rule || (rule.bysetpos && !(rule.byweekday && rule.byweekday.length))) {\r\n\t\t\tnode.querySelector(`[name=\"dhx_custom_month_option\"]`).value = \"month_date\";\r\n\t\t} else {\r\n\t\t\tnode.querySelector(`[name=\"dhx_custom_month_option\"]`).value = \"month_nth_weekday\";\r\n\t\t}\r\n\t}\r\n\r\n\tfunction formatDayNumber(date){\r\n\t\tswitch (date) {\r\n\t\t\tcase 1:\r\n\t\t\tcase 31:\r\n\t\t\t\treturn `${date}st`;\r\n\t\t\tcase 2:\r\n\t\t\t\treturn `${date}nd`;\r\n\t\t\tcase 3:\r\n\t\t\t\treturn `${date}rd`;\r\n\t\t\tdefault:\r\n\t\t\t\treturn `${date}th`;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.templates.repeat_monthly_date = function(startDate, event) {\r\n\t\tconst date = startDate.getDate();\r\n\t\treturn `Every ${formatDayNumber(date)}`;\r\n\t};\r\n\tscheduler.templates.repeat_monthly_weekday = function(startDate, event) {\r\n\t\tconst nthDayOfMonth = getWeekdayOfMonth(startDate);\r\n\t\treturn `Every ${formatDayNumber(nthDayOfMonth.dayNumber)} ${scheduler.locale.date.day_full[nthDayOfMonth.dayOfWeek]}`;\r\n\t};\r\n\t\r\n\tscheduler.templates.repeat_yearly_month_date = function(startDate, event) {\r\n\t\tconst date = startDate.getDate();\r\n\t\tconst monthLabel = scheduler.locale.date.month_full[startDate.getMonth()];\r\n\t\treturn `Every ${formatDayNumber(date)} day of ${monthLabel}`;\r\n\t};\r\n\tscheduler.templates.repeat_yearly_month_weekday = function(startDate, event) {\r\n\t\tconst nthDayOfMonth = getWeekdayOfMonth(startDate);\r\n\t\tconst monthLabel = scheduler.locale.date.month_full[startDate.getMonth()];\r\n\t\treturn `Every ${formatDayNumber(nthDayOfMonth.dayNumber)} ${scheduler.locale.date.day_full[nthDayOfMonth.dayOfWeek]} of ${monthLabel}`;\r\n\t};\r\n\r\n\tfunction fillCustomYearly(node, rule, event) {\r\n\t\tconst dateOfYear = node.querySelector(`.dhx_form_repeat_custom_year [value=\"month_date\"]`);\r\n\t\tconst nthWeekDayOfYear = node.querySelector(`.dhx_form_repeat_custom_year [value=\"month_nth_weekday\"]`);\r\n\t\tdateOfYear.innerText = scheduler.templates.repeat_yearly_month_date(event.start_date, event);\r\n\t\tnthWeekDayOfYear.innerText = scheduler.templates.repeat_yearly_month_weekday(event.start_date, event);\r\n\r\n\t\tif (!rule || (rule.bysetpos && !(rule.byweekday && rule.byweekday.length))) {\r\n\t\t\tnode.querySelector(`[name=\"dhx_custom_year_option\"]`).value = \"month_date\";\r\n\t\t} else {\r\n\t\t\tnode.querySelector(`[name=\"dhx_custom_year_option\"]`).value = \"month_nth_weekday\";\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fillEndRule(node, rule, event) {\r\n\t\tconst countInput = node.querySelector(`.dhx_form_repeat_ends_extra [name=\"dhx_form_repeat_ends_after\"]`);\r\n\t\tconst ondateInput = node.querySelector(`.dhx_form_repeat_ends_extra [name=\"dhx_form_repeat_ends_ondate\"]`);\r\n\t\tconst endOptionSelect = node.querySelector(`[name='dhx_custom_repeat_ends']`);\r\n\t\tcountInput.value = 1;\r\n\r\n\t\tlet formatter = scheduler.date.date_to_str(\"%Y-%m-%d\");\r\n\t\tif (!scheduler.config.repeat_date_of_end) {\r\n\t\t\tscheduler.config.repeat_date_of_end = formatter(scheduler.date.add(scheduler._currentDate(), 30, \"day\"));\r\n\t\t}\r\n\t\tondateInput.value = scheduler.config.repeat_date_of_end;\r\n\r\n\t\tif (rule && rule.count) {\r\n\t\t\tendOptionSelect.value = \"AFTER\";\r\n\t\t\tcountInput.value = rule.count;\r\n\t\t} else if (event._end_date && event._end_date.getFullYear() !== 9999) {\r\n\t\t\tendOptionSelect.value = \"ON\";\r\n\t\t\tondateInput.value = formatter(event._end_date);\r\n\t\t} else {\r\n\t\t\tendOptionSelect.value = \"NEVER\";\r\n\t\t}\r\n\t\tendOptionSelect.dispatchEvent(new Event(\"change\"));\r\n\t}\r\n\r\n\tconst getRecValue = {\r\n\t\tMONTHLY: function (dates) {\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.MONTHLY,\r\n\t\t\t\tinterval: 1,\r\n\t\t\t\tbymonthday: dates.start.getDate()\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tWEEKLY: function (dates) {\r\n\t\t\tlet day = dates.start.getDay() - 1;\r\n\t\t\tif (day == -1) day = 6;\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.WEEKLY,\r\n\t\t\t\tinterval: 1,\r\n\t\t\t\tbyweekday: [day]\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tDAILY: function (dates) {\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.DAILY,\r\n\t\t\t\tinterval: 1\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tYEARLY: function (dates) {\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.YEARLY,\r\n\t\t\t\tbymonth: dates.start.getMonth() + 1,\r\n\t\t\t\tinterval: 1,\r\n\t\t\t\tbymonthday: dates.start.getDate()\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tWORKDAYS: function (dates) {\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.WEEKLY,\r\n\t\t\t\tinterval: 1,\r\n\t\t\t\tbyweekday: scheduler.config.recurring_workdays\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tCUSTOM: function (dates, node) {\r\n\t\t\tconst rrule = {};\r\n\t\t\tconst freq = node.querySelector(`[name=\"repeat_interval_unit\"]`).value;\r\n\t\t\tconst interval = Math.max(1, node.querySelector(`[name=\"repeat_interval_value\"]`).value);\r\n\t\t\tconst monthRepeat = node.querySelector(`[name=\"dhx_custom_month_option\"]`).value;\r\n\t\t\tconst yearRepeat = node.querySelector(`[name=\"dhx_custom_year_option\"]`).value;\r\n\r\n\t\t\trrule.interval = interval;\r\n\t\t\tlet days;\r\n\t\t\tlet day;\r\n\r\n\t\t\tswitch (freq) {\r\n\t\t\t\tcase \"DAILY\":\r\n\t\t\t\t\trrule.freq = RRule.DAILY;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"WEEKLY\": \r\n\t\t\t\t\trrule.freq = RRule.WEEKLY;\r\n\t\t\t\t\tdays = [];\r\n\t\t\t\t\tnode.querySelectorAll(`.dhx_form_repeat_custom_week [name=\"week_day\"]`).forEach((ch) => {\r\n\t\t\t\t\t\tif(ch.checked){\r\n\t\t\t\t\t\t\tdays.push(ch.value);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\trrule.byweekday = days.map((day) => {\r\n\t\t\t\t\t\tswitch (day) {\r\n\t\t\t\t\t\t\tcase \"MO\":\r\n\t\t\t\t\t\t\t\treturn RRule.MO.weekday;\r\n\t\t\t\t\t\t\tcase \"TU\":\r\n\t\t\t\t\t\t\t\treturn RRule.TU.weekday;\r\n\t\t\t\t\t\t\tcase \"WE\":\r\n\t\t\t\t\t\t\t\treturn RRule.WE.weekday;\r\n\t\t\t\t\t\t\tcase \"TH\":\r\n\t\t\t\t\t\t\t\treturn RRule.TH.weekday;\r\n\t\t\t\t\t\t\tcase \"FR\":\r\n\t\t\t\t\t\t\t\treturn RRule.FR.weekday;\r\n\t\t\t\t\t\t\tcase \"SA\":\r\n\t\t\t\t\t\t\t\treturn RRule.SA.weekday;\r\n\t\t\t\t\t\t\tcase \"SU\":\r\n\t\t\t\t\t\t\t\treturn RRule.SU.weekday;\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"MONTHLY\":\r\n\t\t\t\t\trrule.freq = RRule.MONTHLY;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (monthRepeat === \"month_date\") {\r\n\t\t\t\t\t\trrule.bymonthday = dates.start.getDate();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tday = dates.start.getDay() - 1;\r\n\t\t\t\t\t\tif (day == -1) day = 6;\r\n\t\t\t\t\t\trrule.byweekday = [day];\r\n\t\t\t\t\t\trrule.bysetpos = getWeekdayOfMonth(dates.start).dayNumber;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"YEARLY\":\r\n\t\t\t\t\trrule.freq = RRule.YEARLY;\r\n\t\t\t\t\trrule.bymonth = dates.start.getMonth() + 1;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (yearRepeat == \"month_date\") {\r\n\t\t\t\t\t\trrule.bymonthday = dates.start.getDate();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tday = dates.start.getDay() - 1;\r\n\t\t\t\t\t\tif (day == -1) day = 6;\r\n\t\t\t\t\t\trrule.byweekday = [day];\r\n\t\t\t\t\t\trrule.bysetpos = getWeekdayOfMonth(dates.start).dayNumber;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tconst formatFunc = scheduler.date.str_to_date(\"%Y-%m-%d\");\r\n\t\t\tlet until = new Date(9999, 1, 1);\r\n\t\t\tconst endRule = node.querySelector(`[name=\"dhx_custom_repeat_ends\"]`);\r\n\t\t\tif(endRule.value === \"ON\"){\r\n\t\t\t\tuntil = formatFunc(node.querySelector(`[name=\"dhx_form_repeat_ends_ondate\"]`).value);\r\n\t\t\t} else if(endRule.value === \"AFTER\") {\r\n\t\t\t\trrule.count = Math.max(1, node.querySelector(`[name=\"dhx_form_repeat_ends_after\"]`).value);\r\n\t\t\t}\r\n\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tNEVER: function () {\r\n\t\t}\r\n\t};\r\n\r\n\tfunction fillInDefaults(node, rule, event) {\r\n\t\tfillCustomDaily(node, rule, event);\r\n\t\tfillCustomWeekly(node, rule, event);\r\n\t\tfillCustomMonthly(node, rule, event);\r\n\t\tfillCustomYearly(node, rule, event);\r\n\t\tfillEndRule(node, rule, event);\r\n\t}\r\n\tscheduler.form_blocks[\"recurring\"] = {\r\n\t\trender: function (sns) {\r\n\t\t\tif (sns.form) {\r\n\t\t\t\tlet rec = scheduler.form_blocks[\"recurring\"];\r\n\t\t\t\tlet form = rec._get_node(sns.form);\r\n\t\t\t\tlet html = rec._outer_html(form);\r\n\t\t\t\tform.style.display = 'none';\r\n\t\t\t\treturn html;\r\n\t\t\t}\r\n\t\t\tlet loc = scheduler.locale.labels;\r\n\r\n\t\t\treturn `
\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t
\r\n\r\n\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t
\r\n\r\n\t\t\t
\r\n\t\t\t\t
${loc.repeat_ends}
\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\r\n\t\t
\r\n\t
`;\r\n\t\t},\r\n\r\n\t\r\n\t\t_init_set_value: function (node, value, event) {\r\n\t\t\tscheduler.form_blocks[\"recurring\"]._ds = { start: event.start_date, end: event.end_date };\r\n\t\t\tfunction hide(node) {\r\n\t\t\t\tnode.classList.add(\"dhx_hidden\");\r\n\t\t\t}\r\n\t\t\tfunction show(node) {\r\n\t\t\t\tnode.classList.remove(\"dhx_hidden\");\r\n\t\t\t}\r\n\t\t\tfunction onRepeatOptionChange(value) {\r\n\t\t\t\tconst repeat = node.querySelector(\".dhx_form_repeat_custom\");\r\n\t\t\t\tif (value === \"CUSTOM\") {\r\n\t\t\t\t\tshow(repeat);\r\n\t\t\t\t} else {\r\n\t\t\t\t\thide(repeat);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction onCustomRepeatIntervalChange(value) {\r\n\t\t\t\tconst nodes = {\r\n\t\t\t\t\tweekly: node.querySelector(\".dhx_form_repeat_custom_week\"),\r\n\t\t\t\t\tmonthly: node.querySelector(\".dhx_form_repeat_custom_month\"),\r\n\t\t\t\t\tyearly: node.querySelector(\".dhx_form_repeat_custom_year\")\r\n\t\t\t\t};\r\n\t\t\t\tswitch (value) {\r\n\t\t\t\t\tcase \"DAILY\":\r\n\t\t\t\t\t\thide(nodes.weekly);\r\n\t\t\t\t\t\thide(nodes.monthly);\r\n\t\t\t\t\t\thide(nodes.yearly);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"WEEKLY\":\r\n\t\t\t\t\t\tshow(nodes.weekly);\r\n\t\t\t\t\t\thide(nodes.monthly);\r\n\t\t\t\t\t\thide(nodes.yearly);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"MONTHLY\":\r\n\t\t\t\t\t\thide(nodes.weekly);\r\n\t\t\t\t\t\tshow(nodes.monthly);\r\n\t\t\t\t\t\thide(nodes.yearly);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"YEARLY\":\r\n\t\t\t\t\t\thide(nodes.weekly);\r\n\t\t\t\t\t\thide(nodes.monthly);\r\n\t\t\t\t\t\tshow(nodes.yearly);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction onCustomRepeatEndRule(value) {\r\n\t\t\t\tconst nodes = {\r\n\t\t\t\t\tafter: node.querySelector(\".dhx_form_repeat_ends_extra .dhx_form_repeat_ends_after\"),\r\n\t\t\t\t\ton: node.querySelector(\".dhx_form_repeat_ends_extra .dhx_form_repeat_ends_on\")\r\n\t\t\t\t};\r\n\t\t\t\tswitch (value) {\r\n\t\t\t\t\tcase \"NEVER\":\r\n\t\t\t\t\t\thide(nodes.after);\r\n\t\t\t\t\t\thide(nodes.on);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"AFTER\":\r\n\t\t\t\t\t\tshow(nodes.after);\r\n\t\t\t\t\t\thide(nodes.on);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"ON\":\r\n\t\t\t\t\t\thide(nodes.after);\r\n\t\t\t\t\t\tshow(nodes.on);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// repeat section change\r\n\t\t\tnode.querySelector(\".dhx_form_repeat_pattern select\").addEventListener(\"change\", function () {\r\n\t\t\t\tonRepeatOptionChange(this.value);\r\n\t\t\t});\r\n\r\n\t\t\t// custom repeat interval change\r\n\t\t\tnode.querySelector(\".dhx_form_repeat_custom_interval [name='repeat_interval_unit']\").addEventListener(\"change\", function () {\r\n\t\t\t\tonCustomRepeatIntervalChange(this.value);\r\n\t\t\t});\r\n\r\n\t\t\t// custom repeat end rule\r\n\t\t\tnode.querySelector(\".dhx_form_repeat_ends [name='dhx_custom_repeat_ends']\").addEventListener(\"change\", function () {\r\n\t\t\t\tonCustomRepeatEndRule(this.value);\r\n\t\t\t});\r\n\r\n\t\t\tscheduler._lightbox._rec_init_done = true;\r\n\t\t},\r\n\t\tbutton_click: function(){},\r\n\t\tset_value: function (node, value, ev) {\r\n\t\t\tlet rf = scheduler.form_blocks[\"recurring\"];\r\n\t\t\tif (!scheduler._lightbox._rec_init_done)\r\n\t\t\t\trf._init_set_value(node, value, ev);\r\n\t\t\tnode.open = !ev.rrule;\r\n\r\n\t\t\tnode.blocked = this._is_modified_occurence(ev);\r\n\r\n\t\t\tlet ds = rf._ds;\r\n\t\t\tds.start = ev.start_date;\r\n\t\t\tds.end = ev._end_date;\r\n\r\n\t\t\tif (ev.rrule) {\r\n\t\t\t\tconst rruleset = rrulestr(ev.rrule);\r\n\t\t\t\tfillInDefaults(node, rruleset.origOptions, ev);\r\n\t\t\t\tconst topOption = getTopLevelOption(rruleset, ev._end_date);\r\n\t\t\t\tnode.querySelector(\".dhx_form_repeat_pattern select\").value = topOption;\r\n\t\t\t\tif(topOption === \"CUSTOM\"){\r\n\t\t\t\t\tlet customFreq;\r\n\t\t\t\t\tswitch (rruleset.origOptions.freq) {\r\n\t\t\t\t\t\tcase RRule.DAILY:\r\n\t\t\t\t\t\t\tcustomFreq = \"DAILY\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase RRule.WEEKLY:\r\n\t\t\t\t\t\t\tcustomFreq = \"WEEKLY\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase RRule.MONTHLY:\r\n\t\t\t\t\t\t\tcustomFreq = \"MONTHLY\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase RRule.YEARLY:\r\n\t\t\t\t\t\t\tcustomFreq = \"YEARLY\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(customFreq){\r\n\t\t\t\t\t\tnode.querySelector(`[name=\"repeat_interval_unit\"]`).value = customFreq;\r\n\t\t\t\t\t\tnode.querySelector(`[name=\"repeat_interval_unit\"]`).dispatchEvent(new Event(\"change\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t//\trepeat_interval_unit\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tfillInDefaults(node, null, ev);\r\n\t\t\t\tnode.querySelector(\".dhx_form_repeat_pattern select\").value = \"NEVER\";\r\n\t\t\t}\r\n\t\t\tnode.querySelector(\".dhx_form_repeat_pattern select\").dispatchEvent(new Event(\"change\"));\r\n\r\n\t\t},\r\n\t\tget_value: function (node, ev) {\r\n\t\t\t\r\n\t\t\tif(!node.blocked && node.querySelector(\".dhx_form_repeat_pattern select\").value !== \"NEVER\") {\r\n\t\t\t\tlet ds = scheduler.form_blocks[\"recurring\"]._ds;\r\n\t\t\t\tlet actual_dates = {};\r\n\r\n\t\t\t\tlet timeControl = getTimeSection();\r\n\r\n\t\t\t\ttimeControl.getValue(actual_dates);\r\n\t\t\t\tds.start = actual_dates.start_date;\r\n\t\t\t\tconst pattern = node.querySelector(\".dhx_form_repeat_pattern select\").value;\r\n\t\t\t\tconst recurrence = getRecValue[pattern](ds, node);\r\n\t\t\t\tev.rrule = new RRule(recurrence.rrule).toString().replace(\"RRULE:\", \"\");\r\n\t\t\t\tds.end = recurrence.until;\r\n\r\n\t\t\t\tev.duration = Math.floor((actual_dates.end_date - actual_dates.start_date) / 1000);\r\n\r\n\t\t\t\tif (ds._start) {\r\n\t\t\t\t\tev.start_date = new Date(ds.start);\r\n\t\t\t\t\tev._start_date = new Date(ds.start);\r\n\t\t\t\t\tds._start = false;\r\n\t\t\t\t} else\r\n\t\t\t\t\tev._start_date = null;\r\n\r\n\t\t\t\tev._end_date = ds.end;\r\n\t\t\t}else{\r\n\t\t\t\tev.rrule = ev.rrule = \"\";\r\n\t\t\t\tev._end_date = ev.end_date;\r\n\t\t\t}\r\n\r\n\t\t\treturn ev.rrule;\r\n\t\t},\r\n\r\n\t\tfocus: function (node) {\r\n\t\t}\r\n\t};\r\n\r\n\tfunction getTimeSection() {\r\n\t\tlet timeControl = scheduler.formSection('time');\r\n\t\tif (!timeControl) {\r\n\t\t\ttimeControl = getFirstSectionOfType('time');\r\n\t\t}\r\n\t\tif (!timeControl) {\r\n\t\t\ttimeControl = getFirstSectionOfType('calendar_time');\r\n\t\t}\r\n\r\n\r\n\t\tif (!timeControl) {\r\n\t\t\tthrow new Error([\"Can't calculate the recurring rule, the Recurring form block can't find the Time control. Make sure you have the time control in 'scheduler.config.lightbox.sections' config.\",\r\n\t\t\t\t\"You can use either the default time control https://docs.dhtmlx.com/scheduler/time.html, or the datepicker https://docs.dhtmlx.com/scheduler/minicalendar.html, or a custom control. \",\r\n\t\t\t\t\"In the latter case, make sure the control is named \\\"time\\\":\",\r\n\t\t\t\t\"\",\r\n\t\t\t\t\"scheduler.config.lightbox.sections = [\",\r\n\t\t\t\t\"{name:\\\"time\\\", height:72, type:\\\"YOU CONTROL\\\", map_to:\\\"auto\\\" }];\"]\r\n\t\t\t\t.join(\"\\n\"));\r\n\t\t}\r\n\r\n\t\treturn timeControl;\r\n\t}\r\n\r\n\tfunction getFirstSectionOfType(type) {\r\n\t\tfor (let i = 0; i < scheduler.config.lightbox.sections.length; i++) {\r\n\t\t\tlet section = scheduler.config.lightbox.sections[i];\r\n\t\t\tif (section.type === type) {\r\n\t\t\t\treturn scheduler.formSection(section.name);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.occurrence_timestamp_in_utc = false;\r\nscheduler.config.recurring_workdays = [1,2,3,4,5];\r\nscheduler.form_blocks[\"recurring\"] = {\r\n\t_get_node : function(node){\r\n\t\tif (typeof node == \"string\"){\r\n\t\t\tlet element = scheduler._lightbox.querySelector(`#${node}`);\r\n\t\t\tif(!element){\r\n\t\t\t\t// form is detached from lightbox \r\n\t\t\t\t// search globally, won't work in LWC\r\n\t\t\t\telement = document.getElementById(node);\r\n\t\t\t}\r\n\t\t\tnode = element;\r\n\t\t}\r\n\t\tif (node.style.display == 'none')\r\n\t\t\tnode.style.display = \"\";\r\n\t\treturn node;\r\n\t},\r\n\t_outer_html: function(node){\r\n\t\treturn node.outerHTML || getOuterHTML(node);\r\n\r\n\t\t//probably not needed, FF v10- only\r\n\t\tfunction getOuterHTML(n){\r\n\t\t\tvar div = document.createElement('div'), h;\r\n\t\t\tdiv.appendChild( n.cloneNode(true) );\r\n\t\t\th = div.innerHTML;\r\n\t\t\tdiv = null;\r\n\t\t\treturn h;\r\n\t\t}\r\n\t},\r\n\trender:function(sns) {\r\n\t\tif(sns.form){\r\n\t\t\tvar rec = scheduler.form_blocks[\"recurring\"];\r\n\t\t\tvar form = rec._get_node(sns.form);\r\n\t\t\tvar html = rec._outer_html(form);\r\n\t\t\tform.style.display = 'none';\r\n\t\t\treturn html;\r\n\t\t}\r\n\t\tvar loc = scheduler.locale.labels;\r\n\t\treturn '
'+\r\n\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'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+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t''+loc.repeat_text_occurences_count+'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t'
'+\r\n\t\t\t\t'
'+\r\n\t\t\t\t'
';\r\n\t},\r\n\t_ds: {},\r\n\t_get_form_node: function(els, name, value){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return null;\r\n\t\tif(col.nodeName) return col;\r\n\r\n\t\tif(col.length){\r\n\t\t\tfor(var i=0; i < col.length; i++){\r\n\t\t\t\tif(col[i].value == value)\r\n\t\t\t\t\treturn col[i];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\t_get_node_value: function(els, name, multiselect){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return \"\";\r\n\t\tif(col.length){\r\n\t\t\tif(multiselect){\r\n\t\t\t\tvar res = [];\r\n\t\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\t\tif (col[i].checked) res.push(col[i].value);\r\n\r\n\t\t\t\treturn res;\r\n\t\t\t}else{\r\n\t\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\t\tif (col[i].checked) return col[i].value;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(col.value)\r\n\t\t\treturn !multiselect ? col.value : [col.value];\r\n\t},\r\n\r\n\t_get_node_numeric_value: function(els, name){\r\n\t\tvar value = scheduler.form_blocks[\"recurring\"]._get_node_value(els, name);\r\n\t\treturn ((value * 1) || 0);\r\n\t},\r\n\r\n\t_set_node_value: function(els, name, value){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return;\r\n\r\n\t\tif(col.name == name){\r\n\t\t\tcol.value = value;\r\n\t\t}else if(col.length){\r\n\t\t\tvar hash_value = typeof value == \"object\";\r\n\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\tif (hash_value || col[i].value == value){\r\n\t\t\t\t\tcol[i].checked = hash_value ? !!value[col[i].value] : !!value;\r\n\t\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_init_set_value:function(node, value, ev) {\r\n\t\tvar block = scheduler.form_blocks[\"recurring\"];\r\n\t\tvar get_value = block._get_node_value;\r\n\t\tvar set_value = block._set_node_value;\r\n\t\tscheduler.form_blocks[\"recurring\"]._ds = {start:ev.start_date, end:ev._end_date};\r\n\r\n\t\tvar str_date_format = scheduler.date.str_to_date(scheduler.config.repeat_date, false, true);\r\n\t\tvar str_date = function(str_date) {\r\n\t\t\tvar date = str_date_format(str_date);\r\n\t\t\tif (scheduler.config.include_end_by)\r\n\t\t\t\tdate = scheduler.date.add(date, 1, 'day');\r\n\t\t\treturn date;\r\n\t\t};\r\n\r\n\t\tvar date_str = scheduler.date.date_to_str(scheduler.config.repeat_date);\r\n\r\n\t\tvar top = node.getElementsByTagName(\"FORM\")[0];\r\n\t\tvar els = {};\r\n\r\n\t\tfunction register_els(inps) {\r\n\t\t\tfor (var i = 0; i < inps.length; i++) {\r\n\t\t\t\tvar inp = inps[i];\r\n\r\n\t\t\t\tif(inp.name){\r\n\t\t\t\t\tif(!els[inp.name]){\r\n\t\t\t\t\t\tels[inp.name] = inp;\r\n\t\t\t\t\t}else if(els[inp.name].nodeType){\r\n\t\t\t\t\t\tvar node = els[inp.name];\r\n\t\t\t\t\t\tels[inp.name] = [node, inp];\r\n\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tels[inp.name].push(inp);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tregister_els(top.getElementsByTagName(\"INPUT\"));\r\n\t\tregister_els(top.getElementsByTagName(\"SELECT\"));\r\n\r\n\t\tif (!scheduler.config.repeat_date_of_end) {\r\n\t\t\tvar formatter = scheduler.date.date_to_str(scheduler.config.repeat_date);\r\n\t\t\tscheduler.config.repeat_date_of_end = formatter(scheduler.date.add(scheduler._currentDate(), 30, \"day\"));\r\n\t\t}\r\n\t\tset_value(els, \"date_of_end\", scheduler.config.repeat_date_of_end);\r\n\r\n\t\tvar $ = function(a) {\r\n\t\t\treturn scheduler._lightbox.querySelector(`#${a}`) || { style:{} };//return fake object if node not found\r\n\t\t};\r\n\r\n\t\tfunction change_current_view() {\r\n\t\t\t$(\"dhx_repeat_day\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_week\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_month\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_year\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_\" + this.value).style.display = \"\";\r\n\t\t\tscheduler.setLightboxSize();\r\n\t\t}\r\n\r\n\t\tfunction get_repeat_code(dates) {\r\n\t\t\tvar code = [get_value(els, \"repeat\")];\r\n\t\t\tget_rcode[code[0]](code, dates);\r\n\r\n\t\t\twhile (code.length < 5) code.push(\"\");\r\n\t\t\tvar repeat = \"\";\r\n\r\n\t\t\tvar end = get_end_rule(els);\r\n\r\n\t\t\tif (end == \"no\") {\r\n\t\t\t\tdates.end = new Date(9999, 1, 1);\r\n\t\t\t\trepeat = \"no\";\r\n\t\t\t}\r\n\t\t\telse if (end == \"date_of_end\") {\r\n\t\t\t\tdates.end = str_date(get_value(els, \"date_of_end\"));\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tscheduler.transpose_type(code.join(\"_\"));\r\n\t\t\t\trepeat = Math.max(1, get_value(els, \"occurences_count\"));\r\n\r\n\t\t\t\tvar transp = 0;\r\n\r\n\t\t\t\t//var transp = ((code[0] == \"week\" && code[4] && code[4].toString().indexOf(scheduler.config.start_on_monday ? 1 : 0) == -1) ? 1 : 0);\r\n\r\n\t\t\t\t// which is equal to following code, seems to produce extra instance, not clear why needed\r\n\r\n\t\t\t\t/*if(code[0] == \"week\"){\r\n\t\t\t\t\tvar days = code[4] || \"\";\r\n\t\t\t\t\tif(scheduler.config.start_on_monday){\r\n\t\t\t\t\t\tif(days.indexOf(1) == -1)\r\n\t\t\t\t\t\ttransp = 1;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(days.indexOf(0) == -1)\r\n\t\t\t\t\t\ttransp = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}*/\r\n\r\n\t\t\t//\tdates.end = scheduler.date.add(new Date(dates.start), repeat + transp, code.join(\"_\"));\r\n\r\n\t\t\t\tdates.end = scheduler.date[\"add_\" + code.join(\"_\")](new Date(dates.start), repeat + transp, {start_date: dates.start}) || dates.start;\r\n\t\t\t}\r\n\r\n\t\t\treturn code.join(\"_\") + \"#\" + repeat;\r\n\t\t}\r\n\t\tfunction get_end_rule(els){\r\n\t\t\tvar end = els[\"end\"];\r\n\t\t\tif(end.length){\r\n\t\t\t\tfor(var i =0; i < end.length; i++){\r\n\t\t\t\t\tif(end[i].checked){\r\n\t\t\t\t\t\tif(end[i].value && end[i].value != \"on\"){//seems to be default value:var input = document.createElement(\"input\"); input.type = \"radio\"; input.value\r\n\t\t\t\t\t\t\treturn end[i].value;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif(!i){\r\n\t\t\t\t\t\t\t\treturn \"no\";\r\n\t\t\t\t\t\t\t}else if(i == 2){\r\n\t\t\t\t\t\t\t\treturn \"date_of_end\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\treturn \"occurences_count\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(end.value)\r\n\t\t\t\t\treturn end.value;\r\n\t\t\t}\r\n\t\t\treturn \"no\";\r\n\t\t}\r\n\t\tfunction set_end_rule(els, value){\r\n\t\t\tvar end = els[\"end\"];\r\n\r\n\t\t\tif(end.length){\r\n\t\t\t\tvar has_values = !!end[0].value && end[0].value != \"on\";\r\n\t\t\t\tif(has_values){\r\n\t\t\t\t\tfor(var i =0; i < end.length; i++){\r\n\t\t\t\t\t\tif(end[i].value == value)\r\n\t\t\t\t\t\t\tend[i].checked = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar ind = 0;\r\n\t\t\t\t\tswitch(value){\r\n\t\t\t\t\t\tcase \"no\":\r\n\t\t\t\t\t\t\tind = 0;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"date_of_end\":\r\n\t\t\t\t\t\t\tind = 2;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tind = 1;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend[ind].checked = true;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tend.value = value;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tscheduler.form_blocks[\"recurring\"]._get_repeat_code = get_repeat_code;\r\n\t\tvar get_rcode = {\r\n\t\t\tmonth:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tif (get_value(els, \"month_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_count\")));\r\n\t\t\t\t\tdates.start.setDate(get_value(els, \"month_day\"));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_count2\")));\r\n\t\t\t\t\tcode.push( get_value(els, \"month_day2\"));\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_week2\")));\r\n\t\t\t\t\tif (!scheduler.config.repeat_precise){\r\n\t\t\t\t\t\tdates.start.setDate(1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tdates._start = true;\r\n\t\t\t},\r\n\t\t\tweek:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"week_count\")));\r\n\t\t\t\tcode.push(\"\");\r\n\t\t\t\tcode.push(\"\");\r\n\t\t\t\tvar t = [];\r\n\r\n\t\t\t\tvar col = get_value(els, \"week_day\", true);\r\n\t\t\t\t//var col = els[\"week_day\"];\r\n\t\t\t\tvar day = dates.start.getDay();\r\n\t\t\t\tvar start_exists = false;\r\n\r\n\t\t\t\tfor (var i = 0; i < col.length; i++){\r\n\t\t\t\t\tt.push(col[i]);\r\n\t\t\t\t\tstart_exists = start_exists || col[i] == day;\r\n\t\t\t\t}\r\n\t\t\t\tif (!t.length){\r\n\t\t\t\t\tt.push(day);\r\n\t\t\t\t\tstart_exists = true;\r\n\t\t\t\t}\r\n\t\t\t\tt.sort();\r\n\r\n\r\n\t\t\t\tif (!scheduler.config.repeat_precise){\r\n\t\t\t\t\tdates.start = scheduler.date.week_start(dates.start);\r\n\t\t\t\t\tdates._start = true;\r\n\t\t\t\t} else if (!start_exists){\r\n\t\t\t\t\tscheduler.transpose_day_week(dates.start, t, 1, 7);\r\n\t\t\t\t\tdates._start = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcode.push(t.join(\",\"));\r\n\t\t\t},\r\n\t\t\tday:function(code) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tif (get_value(els, \"day_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"day_count\")));\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcode.push(\"week\");\r\n\t\t\t\t\tcode.push(1);\r\n\t\t\t\t\tcode.push(\"\");\r\n\t\t\t\t\tcode.push(\"\");\r\n\t\t\t\t\tcode.push(scheduler.config.recurring_workdays.join(\",\"));\r\n\t\t\t\t\tcode.splice(0, 1);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tyear:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\r\n\t\t\t\tif (get_value(els, \"year_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(\"1\");\r\n\t\t\t\t\tdates.start.setMonth(0);\r\n\t\t\t\t\tdates.start.setDate(get_value(els, \"year_day\"));\r\n\t\t\t\t\tdates.start.setMonth(get_value(els, \"year_month\"));\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcode.push(\"1\");\r\n\t\t\t\t\tcode.push(get_value(els, \"year_day2\"));\r\n\t\t\t\t\tcode.push(get_value(els, \"year_week2\"));\r\n\t\t\t\t\tdates.start.setDate(1);\r\n\t\t\t\t\tdates.start.setMonth(get_value(els, \"year_month2\"));\r\n\t\t\t\t}\r\n\t\t\t\tdates._start = true;\r\n\t\t\t}\r\n\t\t};\r\n\t\tvar set_rcode = {\r\n\t\t\tweek:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\t\tset_value(els, \"week_count\", code[1]);\r\n\r\n\t\t\t\tvar t = code[4].split(\",\");\r\n\t\t\t\tvar d = {};\r\n\t\t\t\tfor (var i = 0; i < t.length; i++) d[t[i]] = true;\r\n\r\n\t\t\t\tset_value(els, \"week_day\", d);\r\n\r\n\t\t\t\t//for (var i = 0; i < col.length; i++)\r\n\t\t\t\t//\tcol[i].checked = (!!d[col[i].value]);\r\n\t\t\t},\r\n\t\t\tmonth:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\r\n\t\t\t\tif (code[2] === \"\") {\r\n\t\t\t\t\tset_value(els, \"month_type\", \"d\");\r\n\t\t\t\t\tset_value(els, \"month_count\", code[1]);\r\n\t\t\t\t\tset_value(els, \"month_day\", dates.start.getDate());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tset_value(els, \"month_type\", \"w\");\r\n\t\t\t\t\tset_value(els, \"month_count2\", code[1]);\r\n\t\t\t\t\tset_value(els, \"month_week2\", code[3]);\r\n\t\t\t\t\tset_value(els, \"month_day2\", code[2]);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tday:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\t\tset_value(els, \"day_type\", \"d\");\r\n\t\t\t\tset_value(els, \"day_count\", code[1]);\r\n\t\t\t},\r\n\t\t\tyear:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\r\n\t\t\t\tif (code[2] === \"\") {\r\n\t\t\t\t\tset_value(els, \"year_type\", \"d\");\r\n\t\t\t\t\tset_value(els, \"year_day\", dates.start.getDate());\r\n\t\t\t\t\tset_value(els, \"year_month\", dates.start.getMonth());\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tset_value(els, \"year_type\", \"w\");\r\n\t\t\t\t\tset_value(els, \"year_week2\", code[3]);\r\n\t\t\t\t\tset_value(els, \"year_day2\", code[2]);\r\n\t\t\t\t\tset_value(els, \"year_month2\", dates.start.getMonth());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfunction set_repeat_code(code, dates) {\r\n\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\tvar data = code.split(\"#\");\r\n\t\t\tcode = data[0].split(\"_\");\r\n\t\t\tset_rcode[code[0]](code, dates);\r\n\r\n\t\t\tswitch (data[1]) {\r\n\t\t\t\tcase \"no\":\r\n\t\t\t\t\tset_end_rule(els, \"no\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"\":\r\n\t\t\t\t\tset_end_rule(els, \"date_of_end\");\r\n\r\n\t\t\t\t\tvar end_date = dates.end;\r\n\t\t\t\t\tif (scheduler.config.include_end_by){\r\n\t\t\t\t\t\tend_date = scheduler.date.add(end_date, -1, 'day');\r\n\t\t\t\t\t}\r\n\t\t\t\t\tset_value(els, \"date_of_end\", date_str(end_date));\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tset_end_rule(els, \"occurences_count\");\r\n\t\t\t\t\tset_value(els, \"occurences_count\", data[1]);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tset_value(els, \"repeat\", code[0]);\r\n\t\t\t//e.checked = true;\r\n\r\n\t\t\tvar node = scheduler.form_blocks[\"recurring\"]._get_form_node(els, \"repeat\", code[0]);\r\n\t\t\tif(node.nodeName == \"SELECT\"/* && node.onchange*/){\r\n\t\t\t//\tnode.onchange();\r\n\t\t\t\tnode.dispatchEvent(new Event('change'));\r\n\t\t\t\tnode.dispatchEvent(new MouseEvent('click'));\r\n\t\t\t}else{\r\n\t\t\t\tnode.dispatchEvent(new MouseEvent('click'));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tscheduler.form_blocks[\"recurring\"]._set_repeat_code = set_repeat_code;\r\n\r\n\t\tfor (var i = 0; i < top.elements.length; i++) {\r\n\t\t\tvar el = top.elements[i];\r\n\t\t\tswitch (el.name) {\r\n\t\t\t\tcase \"repeat\":\r\n\t\t\t\t\tif (el.nodeName == \"SELECT\" && !el.$_eventAttached) {\r\n\t\t\t\t\t\tel.$_eventAttached = true;\r\n\t\t\t\t\t\tel.addEventListener(\"change\", change_current_view);\r\n\t\t\t\t\t} else if(!el.$_eventAttached){\r\n\t\t\t\t\t\tel.$_eventAttached = true;\r\n\t\t\t\t\t\tel.addEventListener(\"click\", change_current_view);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._lightbox._rec_init_done = true;\r\n\t},\r\n\tset_value:function(node, value, ev) {\r\n\t\tvar rf = scheduler.form_blocks[\"recurring\"];\r\n\t\tif (!scheduler._lightbox._rec_init_done)\r\n\t\t\trf._init_set_value(node, value, ev);\r\n\t\tnode.open = !ev.rec_type;\r\n\r\n\t\tnode.blocked = this._is_modified_occurence(ev);\r\n\r\n\t\tvar ds = rf._ds;\r\n\t\tds.start = ev.start_date;\r\n\t\tds.end = ev._end_date;\r\n\r\n\t\trf._toggle_block();\r\n\r\n\t\tif (value)\r\n\t\t\trf._set_repeat_code(value, ds);\r\n\t},\r\n\tget_value:function(node, ev) {\r\n\t\tif (node.open) {\r\n\t\t\tvar ds = scheduler.form_blocks[\"recurring\"]._ds;\r\n\t\t\tvar actual_dates = {};\r\n\r\n\t\t\tvar timeControl = getTimeSection();\r\n\r\n\t\t\ttimeControl.getValue(actual_dates);\r\n\t\t\tds.start = actual_dates.start_date;\r\n\t\t\tev.rec_type = scheduler.form_blocks[\"recurring\"]._get_repeat_code(ds);\r\n\t\t\tif (ds._start) {\r\n\t\t\t\tev.start_date = new Date(ds.start);\r\n\t\t\t\tev._start_date = new Date(ds.start);\r\n\t\t\t\tds._start = false;\r\n\t\t\t} else\r\n\t\t\t\tev._start_date = null;\r\n\r\n\t\t\tev._end_date = ds.end;\r\n\t\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\t\t} else {\r\n\t\t\tev.rec_type = ev.rec_pattern = \"\";\r\n\t\t\tev._end_date = ev.end_date;\r\n\t\t}\r\n\t\treturn ev.rec_type;\r\n\t},\r\n\t_get_button: function(){\r\n\t\tvar node = getRecurringSection().header;\r\n\t\treturn node.firstChild.firstChild;\r\n\t},\r\n\t_get_form: function(){\r\n\t\treturn getRecurringSection().node;\r\n\t},\r\n\topen:function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form();\r\n\t\tif(!cont.open)\r\n\t\t\tblock._toggle_block();\r\n\t},\r\n\tclose: function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form();\r\n\r\n\t\tif(cont.open)\r\n\t\t\tblock._toggle_block();\r\n\t},\r\n\t_toggle_block: function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form(),\r\n\t\t\tel = block._get_button();\r\n\t\tif (!cont.open && !cont.blocked) {\r\n\t\t\tcont.style.height = \"auto\";//reset to default value\r\n\t\t\tif(el){\r\n\t\t\t\tel.style.backgroundPosition = \"-5px 0px\";\r\n\t\t\t\tel.nextSibling.innerHTML = scheduler.locale.labels.button_recurring_open;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tcont.style.height = \"0px\";\r\n\t\t\tif(el){\r\n\t\t\t\tel.style.backgroundPosition = \"-5px 20px\";\r\n\t\t\t\tel.nextSibling.innerHTML = scheduler.locale.labels.button_recurring;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcont.open = !cont.open;\r\n\r\n\t\tscheduler.setLightboxSize();\r\n\t},\r\n\tfocus:function(node) {\r\n\t},\r\n\tbutton_click:function(node, button, event) {\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\t\tvar cont = block._get_form();\r\n\t\tif (!cont.blocked)\r\n\t\t\tscheduler.form_blocks.recurring._toggle_block();\r\n\t}\r\n};\r\n\r\nfunction getTimeSection(){\r\n\tvar timeControl = scheduler.formSection('time');\r\n\tif(!timeControl){\r\n\t\ttimeControl = getFirstSectionOfType('time');\r\n\t}\r\n\tif(!timeControl){\r\n\t\ttimeControl = getFirstSectionOfType('calendar_time');\r\n\t}\r\n\r\n\t\r\n\tif (!timeControl) {\r\n\t\tthrow new Error([\"Can't calculate the recurring rule, the Recurring form block can't find the Time control. Make sure you have the time control in 'scheduler.config.lightbox.sections' config.\",\r\n\"You can use either the default time control https://docs.dhtmlx.com/scheduler/time.html, or the datepicker https://docs.dhtmlx.com/scheduler/minicalendar.html, or a custom control. \",\r\n\"In the latter case, make sure the control is named \\\"time\\\":\",\r\n\"\",\r\n\"scheduler.config.lightbox.sections = [\",\r\n\"{name:\\\"time\\\", height:72, type:\\\"YOU CONTROL\\\", map_to:\\\"auto\\\" }];\"]\r\n.join(\"\\n\"));\r\n\t}\r\n\r\n\treturn timeControl;\r\n}\r\n\r\nfunction getRecurringSection(){\r\n\tvar recurringSection = scheduler.formSection('recurring');\r\n\tif(!recurringSection){\r\n\t\trecurringSection = getFirstSectionOfType('recurring');\r\n\t}\r\n\r\n\tif (!recurringSection) {\r\n\t\tthrow new Error([\"Can't locate the Recurring form section.\",\r\n\t\t\"Make sure that you have the recurring control on the lightbox configuration https://docs.dhtmlx.com/scheduler/recurring_events.html#recurringlightbox \",\r\n\t\t\"and that the recurring control has name \\\"recurring\\\":\",\r\n\"\",\r\n\"scheduler.config.lightbox.sections = [\",\r\n\"\t{name:\\\"recurring\\\", ... }\",\r\n\"];\"].join(\"\\n\"));\r\n\r\n\t}\r\n\r\n\treturn recurringSection;\r\n}\r\n\r\nfunction getFirstSectionOfType(type){\r\n\tfor(var i = 0; i < scheduler.config.lightbox.sections.length; i++){\r\n\t\tvar section = scheduler.config.lightbox.sections[i];\r\n\t\tif(section.type === type){\r\n\t\t\treturn scheduler.formSection(section.name);\r\n\t\t}\r\n\t}\r\n\treturn null;\r\n}\r\n\r\n//problem may occur if we will have two repeating events in the same moment of time\r\nscheduler._rec_markers = {};\r\nscheduler._rec_markers_pull = {};\r\nscheduler._add_rec_marker = function(ev, time) {\r\n\tev._pid_time = time;\r\n\tthis._rec_markers[ev.id] = ev;\r\n\tif (!this._rec_markers_pull[ev.event_pid]) this._rec_markers_pull[ev.event_pid] = {};\r\n\tthis._rec_markers_pull[ev.event_pid][time] = ev;\r\n};\r\nscheduler._get_rec_marker = function(time, id) {\r\n\tvar ch = this._rec_markers_pull[id];\r\n\tif (ch) return ch[time];\r\n\treturn null;\r\n};\r\nscheduler._get_rec_markers = function(id) {\r\n\treturn (this._rec_markers_pull[id] || []);\r\n};\r\n\r\nfunction clearMilliseconds(date){\r\n//\treturn date;\r\n\treturn new Date(\r\n\t\tdate.getFullYear(), \r\n\t\tdate.getMonth(), \r\n\t\tdate.getDate(), \r\n\t\tdate.getHours(), \r\n\t\tdate.getMinutes(),\r\n\t\tdate.getSeconds(),\r\n\t\t0\r\n\t);\r\n}\r\n\r\nscheduler._rec_temp = [];\r\n(function() {\r\n\tvar old_add_event = scheduler.addEvent;\r\n\tscheduler.addEvent = function(start_date, end_date, text, id, extra_data) {\r\n\t\tvar ev_id = old_add_event.apply(this, arguments);\r\n\r\n\t\tif (ev_id && scheduler.getEvent(ev_id)) {\r\n\t\t\tvar ev = scheduler.getEvent(ev_id);\r\n\t\t\t\r\n\t\t\tif(ev.start_date){\r\n\t\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t\t}\r\n\t\t\tif(ev.end_date){\r\n\t\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t\t}\r\n\t\t\tif (this._is_modified_occurence(ev))\r\n\t\t\t\tscheduler._add_rec_marker(ev, ev.event_length * 1000);\r\n\t\t\tif (ev.rec_type)\r\n\t\t\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\t\t}\r\n\t\treturn ev_id;\r\n\t};\r\n})();\r\n\r\nscheduler.attachEvent(\"onEventIdChange\", function(id, new_id) {\r\n\tif (this._ignore_call) return;\r\n\tthis._ignore_call = true;\r\n\r\n\tif(scheduler._rec_markers[id]){\r\n\t\t//important for for correct work of scheduler.getEvents(from, to) and collision detection\r\n\t\tscheduler._rec_markers[new_id] = scheduler._rec_markers[id];\r\n\t\tdelete scheduler._rec_markers[id];\r\n\t}\r\n\r\n\tif(scheduler._rec_markers_pull[id]){\r\n\t\tscheduler._rec_markers_pull[new_id] = scheduler._rec_markers_pull[id];\r\n\t\tdelete scheduler._rec_markers_pull[id];\r\n\t}\r\n\r\n\tfor (var i = 0; i < this._rec_temp.length; i++) {\r\n\t\tvar tev = this._rec_temp[i];\r\n\t\tif (tev.event_pid == id) {\r\n\t\t\ttev.event_pid = new_id;\r\n\t\t\tthis.changeEventId(tev.id, new_id + \"#\" + tev.id.split(\"#\")[1]);\r\n\t\t}\r\n\t}\r\n\r\n\tfor(var i in this._rec_markers){\r\n\t\tvar tev = this._rec_markers[i];\r\n\t\tif(tev.event_pid == id){\r\n\t\t\ttev.event_pid = new_id;\r\n\t\t\ttev._pid_changed = true;\r\n\t\t}\r\n\t}\r\n\r\n\tvar el = scheduler._rec_markers[new_id];\r\n\tif(el && el._pid_changed) {\r\n\t\tdelete el._pid_changed;\r\n\t\tsetTimeout(function() {\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler.callEvent(\"onEventChanged\", [new_id, scheduler.getEvent(new_id)]);\r\n\t\t}, 1);\r\n\t}\r\n\r\n\tdelete this._ignore_call;\r\n});\r\nscheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (this._is_virtual_event(id) || (this._is_modified_occurence(ev) && ev.rec_type && ev.rec_type != 'none')) {\r\n\t\tid = id.split(\"#\");\r\n\t\tvar nid = this.uid();\r\n\t\tvar tid = (id[1]) ? id[1] : Math.round(ev._pid_time / 1000);\r\n\r\n\t\tvar nev = this._copy_event(ev);\r\n\t\tnev.id = nid;\r\n\t\tnev.event_pid = ev.event_pid || id[0];\r\n\t\tvar timestamp = tid;\r\n\t\tnev.event_length = timestamp;\r\n\t\tnev.rec_type = nev.rec_pattern = \"none\";\r\n\t\tthis.addEvent(nev);\r\n\r\n\t\tthis._add_rec_marker(nev, timestamp * 1000);\r\n\t} else {\r\n\t\tif (ev.rec_type && this._lightbox_id)\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\tvar sub = this._get_rec_markers(id);\r\n\t\tfor (var i in sub) {\r\n\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\tid = sub[i].id;\r\n\t\t\t\tif (this.getEvent(id))\r\n\t\t\t\t\tthis.deleteEvent(id, true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventDeleted\", function(id, ev){\r\n\tif(!this._is_virtual_event(id) && this._is_modified_occurence(ev)){\r\n\t\tif(!scheduler._events[id]){\r\n\t\t\tev.rec_type = ev.rec_pattern = \"none\";\r\n\t\t\tthis.setEvent(id, ev);\r\n\t\t}\r\n\t}\r\n});\r\nscheduler.attachEvent(\"onEventChanged\", function(id, event) {\r\n\tif (this._loading) return true;\r\n\r\n\tvar ev = this.getEvent(id);\r\n\r\n\tif (this._is_virtual_event(id)) {\r\n\t\tvar id = id.split(\"#\");\r\n\t\tvar nid = this.uid();\r\n\t\tthis._not_render = true;\r\n\r\n\t\tvar nev = this._copy_event(event);\r\n\t\tnev.id = nid;\r\n\t\tnev.event_pid = id[0];\r\n\t\tvar timestamp = id[1];\r\n\t\tnev.event_length = timestamp;\r\n\t\tnev.rec_type = nev.rec_pattern = \"\";\r\n\r\n\t\tthis._add_rec_marker(nev, timestamp * 1000);\r\n\t\tthis.addEvent(nev);\r\n\r\n\t\tthis._not_render = false;\r\n\r\n\t} else {\r\n\t\tif(ev.start_date){\r\n\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t}\r\n\t\tif(ev.end_date){\r\n\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t}\r\n\r\n\t\tif (ev.rec_type && this._lightbox_id){\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t}\r\n\t\tvar sub = this._get_rec_markers(id);\r\n\t\tfor (var i in sub) {\r\n\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\tdelete this._rec_markers[sub[i].id];\r\n\t\t\t\tthis.deleteEvent(sub[i].id, true);\r\n\t\t\t}\r\n\t\t}\r\n\t\tdelete this._rec_markers_pull[id];\r\n\r\n\t\t// it's possible that after editing event is no longer exists, in such case we need to remove _select_id flag\r\n\t\tvar isEventFound = false;\r\n\t\tfor (var k = 0; k < this._rendered.length; k++) {\r\n\t\t\tif (this._rendered[k].getAttribute(this.config.event_attribute) == id)\r\n\t\t\t\tisEventFound = true;\r\n\t\t}\r\n\t\tif (!isEventFound)\r\n\t\t\tthis._select_id = null;\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventAdded\", function(id) {\r\n\tif (!this._loading) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (ev.rec_type && !ev.event_length){\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventSave\", function(id, data, is_new_event) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (!ev.rec_type && data.rec_type && !this._is_virtual_event(id))\r\n\t\tthis._select_id = null;\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventCreated\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (!ev.rec_type)\r\n\t\tev.rec_type = ev.rec_pattern = ev.event_length = ev.event_pid = \"\";\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventCancel\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (ev.rec_type) {\r\n\t\tthis._roll_back_dates(ev);\r\n\t\t// a bit expensive, but we need to be sure that event re-rendered, because view can be corrupted by resize , during edit process\r\n\t\tthis.render_view_data();\r\n\t}\r\n});\r\nscheduler._roll_back_dates = function(ev) {\r\n\tif(ev.start_date){\r\n\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t}\r\n\tif(ev.end_date){\r\n\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t}\r\n\tev.event_length = Math.round((ev.end_date.valueOf() - ev.start_date.valueOf()) / 1000);\r\n\tev.end_date = ev._end_date;\r\n\tif (ev._start_date) {\r\n\t\tev.start_date.setMonth(0);\r\n\t\tev.start_date.setDate(ev._start_date.getDate());\r\n\t\tev.start_date.setMonth(ev._start_date.getMonth());\r\n\t\tev.start_date.setFullYear(ev._start_date.getFullYear());\r\n\r\n\t}\r\n};\r\n\r\nscheduler._is_virtual_event = function(id){\r\n\treturn id.toString().indexOf(\"#\") != -1;\r\n};\r\nscheduler._is_modified_occurence = function(ev){\r\n\treturn (ev.event_pid && ev.event_pid != \"0\");\r\n};\r\n\r\nscheduler.showLightbox_rec = scheduler.showLightbox;\r\nscheduler.showLightbox = function(id) {\r\n\tvar locale = this.locale;\r\n\tvar c = scheduler.config.lightbox_recurring;\r\n\tvar ev = this.getEvent(id);\r\n\tvar pid = ev.event_pid;\r\n\tvar isVirtual = this._is_virtual_event(id);\r\n\tif (isVirtual)\r\n\t\tpid = id.split(\"#\")[0];\r\n\r\n\t// show series\r\n\tvar showSeries = function(id) {\r\n\t\tvar event = scheduler.getEvent(id);\r\n\t\tevent._end_date = event.end_date;\r\n\t\tevent.end_date = new Date(event.start_date.valueOf() + event.event_length * 1000);\r\n\t\treturn scheduler.showLightbox_rec(id); // editing series\r\n\t};\r\n\r\n\tif ( (pid || pid*1 === 0) && ev.rec_type) {\r\n\t\t// direct API call on series id\r\n\t\treturn showSeries(id);\r\n\t}\r\n\tif ( !pid || pid === '0' || ( (!locale.labels.confirm_recurring || c == 'instance') || (c == 'series' && !isVirtual)) ) {\r\n\t\t// editing instance or non recurring event\r\n\t\treturn this.showLightbox_rec(id);\r\n\t}\r\n\tif (c == 'ask') {\r\n\t\tvar that = this;\r\n\t\tscheduler.modalbox({\r\n\t\t\ttext: locale.labels.confirm_recurring,\r\n\t\t\ttitle: locale.labels.title_confirm_recurring,\r\n\t\t\twidth: \"500px\",\r\n\t\t\tposition: \"middle\",\r\n\t\t\tbuttons:[locale.labels.button_edit_series, locale.labels.button_edit_occurrence, locale.labels.icon_cancel],\r\n\t\t\tcallback: function(index) {\r\n\t\t\t\tswitch(+index) {\r\n\t\t\t\t\tcase 0:\r\n\t\t\t\t\t\treturn showSeries(pid);\r\n\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\treturn that.showLightbox_rec(id);\r\n\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\tshowSeries(pid);\r\n\t}\r\n};\r\n\r\n\r\nscheduler.get_visible_events_rec = scheduler.get_visible_events;\r\nscheduler.get_visible_events = function(only_timed) {\r\n\tfor (var i = 0; i < this._rec_temp.length; i++)\r\n\t\tdelete this._events[this._rec_temp[i].id];\r\n\tthis._rec_temp = [];\r\n\r\n\tvar stack = this.get_visible_events_rec(only_timed);\r\n\tvar out = [];\r\n\tfor (var i = 0; i < stack.length; i++) {\r\n\t\tif (stack[i].rec_type) {\r\n\t\t\t//deleted element of series\r\n\t\t\tif (stack[i].rec_pattern != \"none\")\r\n\t\t\t\tthis.repeat_date(stack[i], out);\r\n\t\t}\r\n\t\telse out.push(stack[i]);\r\n\t}\r\n\treturn out;\r\n};\r\n\r\n\r\n(function() {\r\n\tvar old = scheduler.isOneDayEvent;\r\n\tscheduler.isOneDayEvent = function(ev) {\r\n\t\tif (ev.rec_type) return true;\r\n\t\treturn old.call(this, ev);\r\n\t};\r\n\tvar old_update_event = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id) {\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif(ev && ev.rec_type){\r\n\t\t\t//rec_type can be changed without the lightbox,\r\n\t\t\t// make sure rec_pattern updated as well\r\n\t\t\tev.rec_pattern = (ev.rec_type || \"\").split(\"#\")[0];\r\n\t\t}\r\n\t\tif (ev && ev.rec_type && !this._is_virtual_event(id)) {\r\n\t\t\tscheduler.update_view();\r\n\t\t} else {\r\n\t\t\told_update_event.call(this, id);\r\n\t\t}\r\n\t};\r\n})();\r\n\r\nscheduler.transponse_size = {\r\n\tday:1, week:7, month:1, year:12\r\n};\r\nscheduler.date.day_week = function(sd, day, week) {\r\n\tsd.setDate(1);\r\n\tvar originalMonth = scheduler.date.month_start(new Date(sd));\r\n\tweek = (week - 1) * 7;\r\n\tvar cday = sd.getDay();\r\n\tvar nday = day * 1 + week - cday + 1;\r\n\tsd.setDate(nday <= week ? (nday + 7) : nday);\r\n\tvar newMonth = scheduler.date.month_start(new Date(sd));\r\n\tif(originalMonth.valueOf() !== newMonth.valueOf()){\r\n\t\treturn false;\r\n\t}\r\n\treturn true;\r\n};\r\nscheduler.transpose_day_week = function(sd, list, cor, size, cor2) {\r\n\tvar cday = (sd.getDay() || (scheduler.config.start_on_monday ? 7 : 0)) - cor;\r\n\tfor (var i = 0; i < list.length; i++) {\r\n\t\tif (list[i] > cday)\r\n\t\t\treturn sd.setDate(sd.getDate() + list[i] * 1 - cday - (size ? cor : cor2));\r\n\t}\r\n\tthis.transpose_day_week(sd, list, cor + size, null, cor);\r\n};\r\nscheduler.transpose_type = function(type) {\r\n\tvar transposeRecurring = \"transpose_\" + type;\r\n\tif (!this.date[transposeRecurring]) {\r\n\t\tvar recurringParts = type.split(\"_\");\r\n\t\tvar dayDurationMs = 60 * 60 * 24 * 1000;\r\n\t\tvar addRecurring = \"add_\" + type;\r\n\t\tvar recurringStepDays = this.transponse_size[recurringParts[0]] * recurringParts[1];\r\n\r\n\t\tif (recurringParts[0] == \"day\" || recurringParts[0] == \"week\") {\r\n\t\t\tvar weekDays = null;\r\n\t\t\tif (recurringParts[4]) {\r\n\t\t\t\tweekDays = recurringParts[4].split(\",\");\r\n\t\t\t\tif (scheduler.config.start_on_monday) {\r\n\t\t\t\t\tfor (var i = 0; i < weekDays.length; i++)\r\n\t\t\t\t\t\tweekDays[i] = (weekDays[i] * 1) || 7;\r\n\t\t\t\t\tweekDays.sort();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.date[transposeRecurring] = function(nd, td) {\r\n\t\t\t\tvar delta = Math.floor((td.valueOf() - nd.valueOf()) / (dayDurationMs * recurringStepDays));\r\n\t\t\t\tif (delta > 0)\r\n\t\t\t\t\tnd.setDate(nd.getDate() + delta * recurringStepDays);\r\n\t\t\t\tif (weekDays)\r\n\t\t\t\t\tscheduler.transpose_day_week(nd, weekDays, 1, recurringStepDays);\r\n\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t\tthis.date[addRecurring] = function(sd, inc) {\r\n\t\t\t\tvar nd = new Date(sd.valueOf());\r\n\t\t\t\tif (weekDays) {\r\n\t\t\t\t\tfor (var count = 0; count < inc; count++)\r\n\t\t\t\t\t\tscheduler.transpose_day_week(nd, weekDays, 0, recurringStepDays);\r\n\t\t\t\t} else\r\n\t\t\t\t\tnd.setDate(nd.getDate() + inc * recurringStepDays);\r\n\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t}\r\n\t\telse if (recurringParts[0] == \"month\" || recurringParts[0] == \"year\") {\r\n\t\t\tthis.date[transposeRecurring] = function(nd, td, seriesInstance) {\r\n\t\t\t\tvar delta = Math.ceil(((td.getFullYear() * 12 + td.getMonth() * 1 + 1) - (nd.getFullYear() * 12 + nd.getMonth() * 1 + 1)) / (recurringStepDays) - 1);\r\n\r\n\t\t\t\tif (delta >= 0){\r\n\t\t\t\t\tnd.setDate(1);\r\n\t\t\t\t\tnd.setMonth(nd.getMonth() + delta * recurringStepDays);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn scheduler.date[addRecurring](nd, 0, seriesInstance);\r\n\t\t\t\t//if (str[3]){\r\n\t\t\t\t//\tscheduler.date.day_week(nd, str[2], str[3]);\r\n\t\t\t\t//}\r\n\t\t\t};\r\n\t\t\tthis.date[addRecurring] = function(sd, inc, seriesInstance, currentCount) {\r\n\t\t\t\tif(!currentCount){\r\n\t\t\t\t\tcurrentCount = 1;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcurrentCount++;\r\n\t\t\t\t}\r\n\t\t\t\tvar maxCount = 12;\r\n\t\t\t\tif(currentCount > maxCount){\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar nd = new Date(sd.valueOf());\r\n\t\t\t\tnd.setDate(1);\r\n\r\n\r\n\t\t\t\tnd.setMonth(nd.getMonth() + inc * recurringStepDays);\r\n\t\t\t\tvar origMonth = nd.getMonth();\r\n\t\t\t\tvar origYear = nd.getFullYear();\r\n\t\t\t\tnd.setDate(seriesInstance.start_date.getDate());\r\n\t\t\t\tif (recurringParts[3]){\r\n\t\t\t\t\tscheduler.date.day_week(nd, recurringParts[2], recurringParts[3]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar correctOverflowInstances = scheduler.config.recurring_overflow_instances;\r\n\t\t\t\tif(nd.getMonth() != origMonth && correctOverflowInstances != \"none\"){\r\n\t\t\t\t\t// no such day in a month\r\n\t\t\t\t\tif(correctOverflowInstances === \"lastDay\"){\r\n\t\t\t\t\t\t// return either last day of the month\r\n\t\t\t\t\t\tnd = new Date(origYear, origMonth + 1, 0, nd.getHours(), nd.getMinutes(), nd.getSeconds(), nd.getMilliseconds());\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t// or go to the next instance\r\n\t\t\t\t\t\tnd = scheduler.date[addRecurring](new Date(origYear, origMonth + 1, 0), inc||1, seriesInstance, currentCount);\r\n\t\t\t\t\t\t// if next instance is not possible (e.g. 'repeat on 40th day of the month') null will be returned\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.repeat_date = function(ev, stack, non_render, from, to, maxCount) {\r\n\r\n\tfrom = from || this._min_date;\r\n\tto = to || this._max_date;\r\n\tvar max = maxCount || -1;\r\n\tvar td = new Date(ev.start_date.valueOf());\r\n\r\n\tvar startHour = td.getHours();\r\n\r\n\tvar visibleCount = 0;\r\n\r\n\tif (!ev.rec_pattern && ev.rec_type)\r\n\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\r\n\tthis.transpose_type(ev.rec_pattern);\r\n\ttd = scheduler.date[\"transpose_\" + ev.rec_pattern](td, from, ev);\r\n\twhile ( td && (\r\n\t\ttd < ev.start_date ||\r\n\t\tscheduler._fix_daylight_saving_date(td,from,ev,td,new Date(td.valueOf() + ev.event_length * 1000)).valueOf() <= from.valueOf() ||\r\n\t\ttd.valueOf() + ev.event_length * 1000 <= from.valueOf())){\r\n\t\t\ttd = this.date[\"add_\" + ev.rec_pattern](td, 1, ev);\r\n\r\n\t}\r\n\twhile (td && (td < to && td < ev.end_date && (max < 0 || visibleCount < max))) {\r\n\t\ttd.setHours(startHour);\r\n\r\n\t\tvar timestamp = (scheduler.config.occurrence_timestamp_in_utc) ? Date.UTC(td.getFullYear(), td.getMonth(), td.getDate(), td.getHours(), td.getMinutes(), td.getSeconds()) : td.valueOf();\r\n\t\tvar ch = this._get_rec_marker(timestamp, ev.id);\r\n\t\tif (!ch) { // unmodified element of series\r\n\t\t\tvar ted = new Date(td.valueOf() + ev.event_length * 1000);\r\n\t\t\tvar copy = this._copy_event(ev);\r\n\t\t\t//copy._timed = ev._timed;\r\n\t\t\tcopy.text = ev.text;\r\n\t\t\tcopy.start_date = td;\r\n\t\t\tcopy.event_pid = ev.id;\r\n\t\t\tcopy.id = ev.id + \"#\" + Math.round(timestamp / 1000);\r\n\t\t\tcopy.end_date = ted;\r\n\r\n\t\t\tcopy.end_date = scheduler._fix_daylight_saving_date(copy.start_date, copy.end_date, ev, td, copy.end_date);\r\n\r\n\t\t\tcopy._timed = this.isOneDayEvent(copy);\r\n\r\n\t\t\tif (!copy._timed && !this._table_view && !this.config.multi_day) return;\r\n\t\t\tstack.push(copy);\r\n\r\n\t\t\tif (!non_render) {\r\n\t\t\t\tthis._events[copy.id] = copy;\r\n\t\t\t\tthis._rec_temp.push(copy);\r\n\t\t\t}\r\n\r\n\t\t\tvisibleCount++;\r\n\r\n\t\t} else\r\n\t\tif (non_render){\r\n\t\t\tif(ch.rec_type != \"none\"){\r\n\t\t\t\tvisibleCount++;\r\n\t\t\t}\r\n\t\t\tstack.push(ch);\r\n\t\t}\r\n\r\n\t\ttd = this.date[\"add_\" + ev.rec_pattern](td, 1, ev);\r\n\t//\tif(!scheduler.date[\"validate_add_\" + ev.rec_pattern](td, 1, ev.rec_pattern)){\r\n\t///\t\talert(\"detect add\")\r\n\t//\t}\r\n\t}\r\n};\r\nscheduler._fix_daylight_saving_date = function(start_date, end_date, ev, counter, default_date) {\r\n\tvar shift = start_date.getTimezoneOffset() - end_date.getTimezoneOffset();\r\n\tif (shift) {\r\n\t\tif (shift > 0) {\r\n\t\t\t// e.g. 24h -> 23h\r\n\t\t\treturn new Date(counter.valueOf() + ev.event_length * 1000 - shift * 60 * 1000);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// e.g. 24h -> 25h\r\n\t\t\treturn new Date(end_date.valueOf() - shift * 60 * 1000);\r\n\t\t}\r\n\t}\r\n\treturn new Date(default_date.valueOf());\r\n};\r\nscheduler.getRecDates = function(id, max) {\r\n\tvar ev = typeof id == \"object\" ? id : scheduler.getEvent(id);\r\n\tvar recurrings = [];\r\n\tmax = max || 100;\r\n\r\n\tif (!ev.rec_type) {\r\n\t\treturn [\r\n\t\t\t{ start_date: ev.start_date, end_date: ev.end_date }\r\n\t\t];\r\n\t}\r\n\tif (ev.rec_type == \"none\") {\r\n\t\treturn [];\r\n\t}\r\n\r\n\tscheduler.repeat_date(ev, recurrings, true, ev.start_date, ev.end_date, max);\r\n\r\n\tvar result = [];\r\n\tfor(var i = 0; i < recurrings.length; i++){\r\n\t\tif(recurrings[i].rec_type != \"none\"){\r\n\t\t\tresult.push({start_date: recurrings[i].start_date, end_date: recurrings[i].end_date});\r\n\t\t}\r\n\t}\r\n\r\n\treturn result;\r\n};\r\nscheduler.getEvents = function(from, to) {\r\n\tvar result = [];\r\n\tfor (var a in this._events) {\r\n\t\tvar ev = this._events[a];\r\n\t\tif (ev && ev.start_date < to && ev.end_date > from) {\r\n\t\t\tif (ev.rec_pattern) {\r\n\t\t\t\tif (ev.rec_pattern == \"none\") continue;\r\n\t\t\t\tvar sev = [];\r\n\t\t\t\tthis.repeat_date(ev, sev, true, from, to);\r\n\t\t\t\tfor (var i = 0; i < sev.length; i++) {\r\n\t\t\t\t\t// if event is in rec_markers then it will be checked by himself, here need to skip it\r\n\t\t\t\t\tif (!sev[i].rec_pattern && sev[i].start_date < to && sev[i].end_date > from && !this._rec_markers[sev[i].id]) {\r\n\t\t\t\t\t\tresult.push(sev[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if (!this._is_virtual_event(ev.id)) { // if it's virtual event we can skip it\r\n\t\t\t\tresult.push(ev);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n};\r\n\r\nscheduler.config.repeat_date = \"%m.%d.%Y\";\r\nscheduler.config.lightbox.sections = [\r\n\t{name:\"description\", map_to:\"text\", type:\"textarea\" , focus:true},\r\n\t{name:\"recurring\", type:\"recurring\", map_to:\"rec_type\", button:\"recurring\"},\r\n\t{name:\"time\", height:72, type:\"time\", map_to:\"auto\"}\r\n];\r\n\r\n\r\n//drop secondary attributes\r\nscheduler._copy_dummy = function(ev) {\r\n\tvar start_date = new Date(this.start_date);\r\n\tvar end_date = new Date(this.end_date);\r\n\tthis.start_date = start_date;\r\n\tthis.end_date = end_date;\r\n\tthis.event_length = this.event_pid = this.rec_pattern = this.rec_type = null;\r\n};\r\n\r\nscheduler.config.include_end_by = false;\r\nscheduler.config.lightbox_recurring = 'ask'; // series, instance\r\n\r\nscheduler.attachEvent(\"onClearAll\", function(){\r\n\tscheduler._rec_markers = {}; //clear recurring events data\r\n\tscheduler._rec_markers_pull = {};\r\n\tscheduler._rec_temp = [];\r\n});\r\n\r\n}","import getSerializator from '../core/common/get_serializable_events';\r\nexport default function(scheduler){\r\n\r\n\t\r\nconst getSerializableData = getSerializator(scheduler);\r\n\r\n//redefine this method, if you want to provide a custom set of attributes for serialization\r\nscheduler.data_attributes=function(){\r\n\tvar attrs = [];\r\n\tvar format = scheduler._helpers.formatDate;\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\t\tfor (var name in ev)\r\n\t\t\tif (name.substr(0,1) !=\"_\")\r\n\t\t\t\tattrs.push([name,((name == \"start_date\" || name == \"end_date\")?format:null)]);\r\n\t\tbreak;\r\n\t}\r\n\treturn attrs;\r\n};\r\n\r\nscheduler.toXML = function(header){\r\n\tvar xml = [];\r\n\tvar attrs = this.data_attributes();\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\r\n\t\txml.push(\"\");\r\n\t\tfor (var i=0; i < attrs.length; i++)\r\n\t\t\txml.push(\"<\"+attrs[i][0]+\">\");\r\n\r\n\t\txml.push(\"\");\r\n\t}\r\n\treturn (header||\"\")+\"\"+xml.join(\"\\n\")+\"\";\r\n};\r\n\r\nscheduler._serialize_json_value = function(value){\r\n\tif(value === null || typeof value === \"boolean\"){\r\n\t\tvalue = \"\" + value;\r\n\t}else{\r\n\t\tif(!value && value !== 0){\r\n\t\t\tvalue = \"\";\r\n\t\t}\r\n\t\tvalue = '\"' + value.toString().\r\n\t\t\treplace(/\\n/g,\"\").\r\n\t\t\treplace(/\\\\/g,\"\\\\\\\\\").\r\n\t\t\treplace(/\"/g, '\\\\\"') + '\"';\r\n\t}\r\n\treturn value;\r\n};\r\n\r\n\r\n\r\nscheduler.toJSON = function(){\r\n\treturn JSON.stringify(this.serialize());\r\n};\r\n\r\n\r\nscheduler.toICal = function(header){\r\n\tvar start = \"BEGIN:VCALENDAR\\nVERSION:2.0\\nPRODID:-//dhtmlXScheduler//NONSGML v2.2//EN\\nDESCRIPTION:\";\r\n\tvar end = \"END:VCALENDAR\";\r\n\tvar format = scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\");\r\n\tvar full_day_format = scheduler.date.date_to_str(\"%Y%m%d\");\r\n\r\n\tvar ical = [];\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\r\n\r\n\t\tical.push(\"BEGIN:VEVENT\");\r\n\t\tif (!ev._timed || (!ev.start_date.getHours() && !ev.start_date.getMinutes()))\r\n\t\t\tical.push(\"DTSTART:\"+full_day_format(ev.start_date));\r\n\t\telse\r\n\t\t\tical.push(\"DTSTART:\"+format(ev.start_date));\r\n\t\tif (!ev._timed || (!ev.end_date.getHours() && !ev.end_date.getMinutes()))\r\n\t\t\tical.push(\"DTEND:\"+full_day_format(ev.end_date));\r\n\t\telse\r\n\t\t\tical.push(\"DTEND:\"+format(ev.end_date));\r\n\t\tical.push(\"SUMMARY:\"+ev.text);\r\n\t\tical.push(\"END:VEVENT\");\r\n\t}\r\n\treturn start+(header||\"\")+\"\\n\"+ical.join(\"\\n\")+\"\\n\"+end;\r\n};\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Timeline\", scheduler.assert);\r\n}","import { TooltipManager } from \"./tooltipManager\";\r\n\r\nexport default function (scheduler: any) {\r\n\r\n\tscheduler.config.tooltip_timeout = 30;\r\n\tscheduler.config.tooltip_offset_y = 20;\r\n\tscheduler.config.tooltip_offset_x = 10;\r\n\tscheduler.config.tooltip_hide_timeout = 30;\r\n\r\n\tconst tooltipManager = new TooltipManager(scheduler);\r\n\r\n\tscheduler.ext.tooltips = tooltipManager;\r\n\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function () {\r\n\r\n\t\ttooltipManager.tooltipFor({\r\n\t\t\tselector: \"[\" + scheduler.config.event_attribute + \"]\",\r\n\t\t\thtml: (event: MouseEvent) => {\r\n\t\t\t\tif (scheduler._mobile && !scheduler.config.touch_tooltip) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst targetEventId = scheduler._locate_event(event.target);\r\n\t\t\t\tif (scheduler.getEvent(targetEventId)) {\r\n\t\t\t\t\tconst event = scheduler.getEvent(targetEventId);\r\n\t\t\t\t\treturn scheduler.templates.tooltip_text(event.start_date, event.end_date, event);\r\n\t\t\t\t}\r\n\t\t\t\treturn null;\r\n\t\t\t},\r\n\t\t\tglobal: false\r\n\t\t});\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function () {\r\n\t\ttooltipManager.destructor();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onLightbox\", function () {\r\n\t\ttooltipManager.hideTooltip();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeDrag\", function() {\r\n\t\t// GS-2377: don't hide tooltip on mobile device when ontouchstart event occurs\r\n\t\tif (scheduler._mobile && scheduler.config.touch_tooltip) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\ttooltipManager.hideTooltip();\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function() {\r\n\t\ttooltipManager.hideTooltip();\r\n\t\treturn true;\r\n\t});\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Tree Timeline\", scheduler.assert);\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Units\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\nscheduler._get_url_nav = function(){\r\n\tvar p = {};\r\n\tvar data = (document.location.hash || \"\").replace(\"#\", \"\").split(\",\");\r\n\tfor (var i = 0; i < data.length; i++) {\r\n\t\tvar s = data[i].split(\"=\");\r\n\t\tif (s.length == 2)\r\n\t\t\tp[s[0]] = s[1];\r\n\t}\r\n\treturn p;\r\n};\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function () {\r\n\tvar first = true;\r\n\tvar s2d = scheduler.date.str_to_date(\"%Y-%m-%d\");\r\n\tvar d2s = scheduler.date.date_to_str(\"%Y-%m-%d\");\r\n\tvar select_event = scheduler._get_url_nav().event || null;\r\n\r\n\tscheduler.attachEvent(\"onAfterEventDisplay\", function(ev){\r\n\t\tselect_event = null;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function (om, od, m, d) {\r\n\t\tif (first) {\r\n\t\t\tfirst = false;\r\n\t\t\tvar p = scheduler._get_url_nav();\r\n\r\n\t\t\tif (p.event){\r\n\t\t\t\ttry{\r\n\t\t\t\t\tif(scheduler.getEvent(p.event)){\r\n\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\tshowEvent(p.event);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tvar handler = scheduler.attachEvent(\"onXLE\", function(){\r\n\t\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\t\tshowEvent(p.event);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\tscheduler.detachEvent(handler);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (e){}\r\n\t\t\t}\r\n\r\n\t\t\tif (p.date || p.mode) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthis.setCurrentView((p.date ? s2d(p.date) : null), (p.mode || null));\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\t//assuming that mode is not available anymore\r\n\t\t\t\t\tthis.setCurrentView((p.date ? s2d(p.date) : null), m);\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar values = [\r\n\t\t\t\"date=\" + d2s(d || od),\r\n\t\t\t\"mode=\" + (m || om)\r\n\t\t];\r\n\r\n\t\tif(select_event){\r\n\t\t\tvalues.push(\"event=\" + select_event);\r\n\t\t}\r\n\r\n\t\tvar text = \"#\" + values.join(\",\");\r\n\t\tdocument.location.hash = text;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tfunction showEvent(e){\r\n\t\tif(scheduler.$destroyed){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tselect_event = e;\r\n\t\tif(scheduler.getEvent(e)){\r\n\t\t\tscheduler.showEvent(e);\r\n\t\t}\r\n\t}\r\n});\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Week Agenda\", scheduler.assert);\r\n}","export default function(scheduler){\r\nscheduler.attachEvent(\"onLightBox\",function(){\r\n\tif (this._cover){\r\n\t\ttry{\r\n\t\t\tthis._cover.style.height = this.expanded ? \"100%\" : ((document.body.parentNode||document.body).scrollHeight+\"px\");\r\n\t\t} catch(e) {\r\n\r\n\t\t}\r\n\t}\r\n});\r\n\r\nscheduler.form_blocks.select.set_value=function(node,value,ev){\r\n\tif (typeof value == \"undefined\" || value === \"\")\r\n\t\tvalue = (node.firstChild.options[0]||{}).value;\r\n\tnode.firstChild.value=value||\"\";\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\t// scheduler.config.year_x = 4;\r\n\t// scheduler.config.year_y = 3;\r\n\t// scheduler.xy.year_top = 0;\r\n\r\n\tscheduler.templates.year_date = function(date) {\r\n\t\treturn scheduler.date.date_to_str(scheduler.locale.labels.year_tab + \" %Y\")(date);\r\n\t};\r\n\tscheduler.templates.year_month = scheduler.date.date_to_str(\"%F\");\r\n\tscheduler.templates.year_scale_date = scheduler.date.date_to_str(\"%D\");\r\n\tscheduler.templates.year_tooltip = function(s, e, ev) {\r\n\t\treturn ev.text;\r\n\t};\r\n\r\n\tconst isYearMode = function() {\r\n\t\treturn scheduler._mode == \"year\";\r\n\t};\r\n\t\r\n\tconst getCellDate = function(node){\r\n\t\tvar day = scheduler.$domHelpers.closest(node, \"[data-cell-date]\");\r\n\t\tif(!day || !day.hasAttribute(\"data-cell-date\")) return null;\r\n\t\treturn scheduler.templates.parse_date(day.getAttribute(\"data-cell-date\"));\r\n\t};\r\n\r\n\t// dbl click hook for scheduler._on_dbl_click\r\n\tscheduler.dblclick_dhx_year_grid= function(e) {\r\n\t\tif (isYearMode()) {\r\n\t\t\tconst target = e.target;\r\n\t\t\tif(scheduler.$domHelpers.closest(target, \".dhx_before\") || scheduler.$domHelpers.closest(target, \".dhx_after\")){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tconst date = getCellDate(target);\r\n\t\t\t\r\n\t\t\tif(date){\r\n\t\t\t\tconst start = date;\r\n\t\t\t\tconst end = this.date.add(start, 1, \"day\");\r\n\t\t\t\tif (!this.config.readonly && this.config.dblclick_create){\r\n\t\t\t\t\tthis.addEventNow(start.valueOf(), end.valueOf(), e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\t\r\n\tscheduler.attachEvent(\"onEventIdChange\", function(){\r\n\t\tif (isYearMode())\r\n\t\t\tthis.year_view(true);\r\n\t});\r\n\r\n\r\n\tvar old = scheduler.render_data;\r\n\tscheduler.render_data = function(evs) {\r\n\t\tif (!isYearMode()) return old.apply(this, arguments);\r\n\t\tfor (var i = 0; i < evs.length; i++)\r\n\t\t\tthis._year_render_event(evs[i]);\r\n\t};\r\n\r\n\tvar clear = scheduler.clear_view;\r\n\tscheduler.clear_view = function() {\r\n\t\tif (!isYearMode()) return clear.apply(this, arguments);\r\n\t\tvar dates = scheduler._year_marked_cells,\r\n\t\t\tdiv = null;\r\n\t\tfor (var date in dates) {\r\n\t\t\tif (dates.hasOwnProperty(date)) {\r\n\t\t\t\tdiv = dates[date];\r\n\t\t\t\tdiv.classList.remove(\"dhx_year_event\", \"dhx_cal_datepicker_event\");\r\n\t\t\t\t// div.className = \"dhx_month_head\";\r\n\t\t\t\t// div.removeAttribute(\"date\");\r\n\t\t\t\t// div.removeAttribute(\"data-year-date\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._year_marked_cells = {};\r\n\t};\r\n\r\n\tscheduler._hideToolTip = function() {\r\n\t\tif (this._tooltip) {\r\n\t\t\tthis._tooltip.style.display = \"none\";\r\n\t\t\tthis._tooltip.date = new Date(9999, 1, 1);\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._showToolTip = function(date, pos, e, src) {\r\n\t\tif (this._tooltip) {\r\n\t\t\tif (this._tooltip.date.valueOf() == date.valueOf()) return;\r\n\t\t\tthis._tooltip.innerHTML = \"\";\r\n\t\t} else {\r\n\t\t\tvar t = this._tooltip = document.createElement(\"div\");\r\n\t\t\tt.className = \"dhx_year_tooltip\";\r\n\t\t\tif (this.config.rtl) t.className += \" dhx_tooltip_rtl\";\r\n\t\t\tdocument.body.appendChild(t);\r\n\t\t\tt.addEventListener(\"click\", scheduler._click.dhx_cal_data);\r\n\t\t\tt.addEventListener(\"click\", function(e){\r\n\t\t\t\tif(e.target.closest(`[${scheduler.config.event_attribute}]`)){\r\n\t\t\t\t\tconst id = e.target.closest(`[${scheduler.config.event_attribute}]`).getAttribute(scheduler.config.event_attribute);\r\n\t\t\t\t\tscheduler.showLightbox(id);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\tvar evs = this.getEvents(date, this.date.add(date, 1, \"day\"));\r\n\t\tvar html = \"\";\r\n\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tif(!this.filter_event(ev.id, ev))\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\t\t\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\t\t\thtml += \"
\";\r\n\t\t\thtml += \"
\" + (evs[i]._timed ? this.templates.event_date(evs[i].start_date) : \"\") + \"
\";\r\n\t\t\thtml += \"
 
\";\r\n\t\t\thtml += this.templates.year_tooltip(evs[i].start_date, evs[i].end_date, evs[i]) + \"
\";\r\n\t\t}\r\n\r\n\t\tthis._tooltip.style.display = \"\";\r\n\t\tthis._tooltip.style.top = \"0px\";\r\n\r\n\r\n\t\tif (document.body.offsetWidth - pos.left - this._tooltip.offsetWidth < 0)\r\n\t\t\tthis._tooltip.style.left = pos.left - this._tooltip.offsetWidth + \"px\";\r\n\t\telse\r\n\t\t\tthis._tooltip.style.left = pos.left + src.offsetWidth + \"px\";\r\n\r\n\t\tthis._tooltip.date = date;\r\n\t\tthis._tooltip.innerHTML = html;\r\n\r\n\t\tif (document.body.offsetHeight - pos.top - this._tooltip.offsetHeight < 0)\r\n\t\t\tthis._tooltip.style.top = pos.top - this._tooltip.offsetHeight + src.offsetHeight + \"px\";\r\n\t\telse\r\n\t\t\tthis._tooltip.style.top = pos.top + \"px\";\r\n\t};\r\n\r\n\tscheduler._year_view_tooltip_handler = function(e){\r\n\t\tif (!isYearMode()) return;\r\n\r\n\t\tvar src = e.target || e.srcElement;\r\n\t\tif (src.tagName.toLowerCase() == 'a') // fix for active links extension (it adds links to the date in the cell)\r\n\t\t\tsrc = src.parentNode;\r\n\t\tif (scheduler._getClassName(src).indexOf(\"dhx_year_event\") != -1)\r\n\t\t\tscheduler._showToolTip(scheduler.templates.parse_date(src.getAttribute(\"data-year-date\")), scheduler.$domHelpers.getOffset(src), e, src);\r\n\t\telse\r\n\t\t\tscheduler._hideToolTip();\r\n\t};\r\n\tscheduler._init_year_tooltip = function() {\r\n\t\tscheduler._detachDomEvent(scheduler._els[\"dhx_cal_data\"][0], \"mouseover\", scheduler._year_view_tooltip_handler);\r\n\t\tscheduler.event(scheduler._els[\"dhx_cal_data\"][0], \"mouseover\", scheduler._year_view_tooltip_handler);\r\n\t};\r\n\r\n\tscheduler._get_year_cell = function(d) {\r\n\t\tvar dateString = scheduler.templates.format_date(d);\r\n\t\tvar cells = this.$root.querySelectorAll(`.dhx_cal_data .dhx_cal_datepicker_date[data-cell-date=\"${dateString}\"]`);\r\n\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\tif(!scheduler.$domHelpers.closest(cells[i], \".dhx_after, .dhx_before\")){\r\n\t\t\t\treturn cells[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t};\r\n\r\n\tscheduler._year_marked_cells = {};\r\n\tscheduler._mark_year_date = function(date, event) {\r\n\t\tvar dateString = scheduler.templates.format_date(date);\r\n\t\tvar cell = this._get_year_cell(date);\r\n\t\tif (!cell) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar ev_class = this.templates.event_class(event.start_date, event.end_date, event);\r\n\t\tif (!scheduler._year_marked_cells[dateString]) {\r\n\t\t\tcell.classList.add(\"dhx_year_event\", \"dhx_cal_datepicker_event\");// = \"dhx_month_head dhx_year_event\";\r\n\t\t\tcell.setAttribute(\"data-year-date\", dateString);\r\n\t\t\tcell.setAttribute(\"date\", dateString);\r\n\t\t\tscheduler._year_marked_cells[dateString] = cell;\r\n\t\t}\r\n\t\tif(ev_class){\r\n\t\t\tcell.classList.add(ev_class);\r\n\t\t}\r\n\t};\r\n\tscheduler._unmark_year_date = function(date) {\r\n\t\tvar cell = this._get_year_cell(date);\r\n\t\tif (!cell) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcell.classList.remove(\"dhx_year_event\", \"dhx_cal_datepicker_event\");\r\n//\t\tcell.className = \"dhx_month_head\";\r\n\t};\r\n\tscheduler._year_render_event = function(event) {\r\n\t\tvar date = event.start_date;\r\n\t\tif (date.valueOf() < this._min_date.valueOf()){\r\n\t\t\tdate = this._min_date;\r\n\t\t} else {\r\n\t\t\tdate = this.date.date_part(new Date(date));\r\n\t\t}\r\n\r\n\t\twhile (date < event.end_date) {\r\n\t\t\tthis._mark_year_date(date, event);\r\n\t\t\tdate = this.date.add(date, 1, \"day\");\r\n\t\t\tif (date.valueOf() >= this._max_date.valueOf())\r\n\t\t\t\treturn;\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.year_view = function(mode) {\r\n\r\n\t\tscheduler.set_sizes();\r\n\r\n\t\tscheduler._table_view = mode;\r\n\r\n\t\tif (this._load_mode && this._load()) return;\r\n\r\n\t\tif (mode) {\r\n\t\t\tscheduler._init_year_tooltip();\r\n\t\t\tscheduler._reset_year_scale();\r\n\t\t\tif (scheduler._load_mode && scheduler._load()){\r\n\t\t\t\tscheduler._render_wait = true;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tscheduler.render_view_data();\r\n\t\t} else {\r\n\t\t\tscheduler._hideToolTip();\r\n\t\t}\r\n\t};\r\n\tscheduler._reset_year_scale = function() {\r\n\t\tthis._cols = [];\r\n\t\tthis._colsS = {};\r\n\t\tvar week_starts = []; //start day of first week in each month\r\n\t\tvar dataArea = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tvar c = this.config;\r\n\t\tdataArea.scrollTop = 0; //fix flickering in FF\r\n\t\tdataArea.innerHTML = \"\";\r\n\r\n\t\tvar dy = Math.floor((parseInt(dataArea.style.height) - scheduler.xy.year_top) / c.year_y);\r\n\t\tif (dy < 190) {\r\n\t\t\tdy = 190;\r\n\t\t}\r\n\r\n\t\tvar week_template = document.createElement(\"div\");\r\n\t\tvar dummy_date = this.date.week_start(scheduler._currentDate());\r\n\r\n\t\tthis._process_ignores(dummy_date, 7, \"day\", 1);\r\n\r\n\t\tfor (var i = 0; i < 7; i++) {\r\n\t\t\tif(!(this._ignores && this._ignores[i])) {\r\n\t\t\t\tthis._cols[i] = 'var(--dhx-scheduler-datepicker-cell-size)';\r\n\t\t\t\tthis._render_x_header(i, 0, dummy_date, week_template);\r\n\r\n\t\t\t}\r\n\t\t\tdummy_date = this.date.add(dummy_date, 1, \"day\");\r\n\t\t}\r\n\t\tweek_template.lastChild.className += \" dhx_scale_bar_last\";\r\n\r\n\t\tfor(var i = 0; i < week_template.childNodes.length; i++){\r\n\t\t\tthis._waiAria.yearHeadCell(week_template.childNodes[i]);\r\n\t\t}\r\n\r\n\t\tvar sd = this.date[this._mode + \"_start\"](this.date.copy(this._date));\r\n\t\tvar ssd = sd;\r\n\t\tvar yearBox = null;\r\n\t\tconst wrapper = document.createElement(\"div\");\r\n\t\twrapper.classList.add(\"dhx_year_wrapper\");\r\n\t\tfor (var i = 0; i < c.year_y; i++){\r\n\t\t\tfor (var j = 0; j < c.year_x; j++) {\r\n\t\t\t\tyearBox = document.createElement(\"div\");\r\n\t\t\t\tyearBox.className = \"dhx_year_box\";\r\n\r\n\t\t\t\tyearBox.setAttribute(\"date\", this._helpers.formatDate(sd));\r\n\t\t\t\tyearBox.setAttribute(\"data-month-date\", this._helpers.formatDate(sd));\r\n\t\t\t\tyearBox.innerHTML = \"
\" + week_template.innerHTML + \"
\";\r\n\r\n\t\t\t\tvar header = yearBox.querySelector(\".dhx_year_month\");\r\n\t\t\t\tvar grid = yearBox.querySelector(\".dhx_year_grid\");\r\n\t\t\t\tvar body = yearBox.querySelector(\".dhx_year_body\");\r\n\r\n\t\t\t\tvar headerId = scheduler.uid();\r\n\t\t\t\tthis._waiAria.yearHeader(header, headerId);\r\n\t\t\t\tthis._waiAria.yearGrid(grid, headerId);\r\n\r\n\r\n\t\t\t\theader.innerHTML = this.templates.year_month(sd);\r\n\r\n\r\n\r\n\t\t\t\tvar dd = this.date.week_start(sd);\r\n\t\t\t\tthis._reset_month_scale(body, sd, dd, 6);\r\n\r\n\t\t\t\tvar days = body.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var day = 0; day < days.length; day++){\r\n\t\t\t\t\tthis._waiAria.yearDayCell(days[day]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\twrapper.appendChild(yearBox);\r\n\r\n\t\t\t\tweek_starts[i * c.year_x + j] = (sd.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;\r\n\t\t\t\tsd = this.date.add(sd, 1, \"month\");\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdataArea.appendChild(wrapper);\r\n\r\n\t\tvar dateElement = this._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML = this.templates[this._mode + \"_date\"](ssd, sd, this._mode);\r\n\t\t}\r\n\r\n\t\tthis.week_starts = week_starts;\r\n\t\tweek_starts._month = ssd.getMonth();\r\n\t\tthis._min_date = ssd;\r\n\t\tthis._max_date = sd;\r\n\t};\r\n\r\n\tscheduler._reset_year_scale = function(){\r\n\r\n\t\tvar dataArea = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tdataArea.scrollTop = 0; //fix flickering in FF\r\n\t\tdataArea.innerHTML = \"\";\r\n\r\n\t\tlet yearStart = this.date.year_start(new Date(this._date));\r\n\t\t\r\n\t\tthis._min_date = this.date.week_start(new Date(yearStart));\r\n\r\n\t\tconst wrapper = document.createElement(\"div\");\r\n\t\twrapper.classList.add(\"dhx_year_wrapper\");\r\n\r\n\t\tlet currentDate = yearStart;\r\n\t\tfor(let i = 0; i < 12; i++){\r\n\t\t\tlet yearBox = document.createElement(\"div\");\r\n\t\t\tyearBox.className = \"dhx_year_box\";\r\n\r\n\t\t\tyearBox.setAttribute(\"date\", this._helpers.formatDate(currentDate));\r\n\t\t\tyearBox.setAttribute(\"data-month-date\", this._helpers.formatDate(currentDate));\r\n\t\t\tyearBox.innerHTML = `
${this.templates.year_month(currentDate)}
\r\n\t\t\t
`;\r\n\r\n\t\t\tconst yearGrid = yearBox.querySelector(\".dhx_year_grid\");\r\n\t\t\tconst datepicker = scheduler._createDatePicker(null, {\r\n\t\t\t\tdate: currentDate,\r\n\t\t\t\tfilterDays: scheduler.ignore_year,\r\n\t\t\t\tminWeeks: 6\r\n\t\t\t});\r\n\t\t\tdatepicker._renderDayGrid(yearGrid);\r\n\t\t\tdatepicker.destructor();\r\n\r\n\t\t\twrapper.appendChild(yearBox);\r\n\r\n\t\t\tcurrentDate = this.date.add(currentDate, 1, \"month\");\r\n\r\n\t\t}\r\n\t\tdataArea.appendChild(wrapper);\r\n\r\n\t\tlet lastDate = this.date.add(yearStart, 1, \"year\");\r\n\t\tif(lastDate.valueOf() != this.date.week_start(new Date(lastDate)).valueOf()){\r\n\t\t\tlastDate = this.date.week_start(new Date(lastDate));\r\n\t\t\tlastDate = this.date.add(lastDate, 1, \"week\");\r\n\t\t}\r\n\t\tthis._max_date = lastDate;\r\n\t\tvar dateElement = this._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML = this.templates[this._mode + \"_date\"](yearStart, lastDate, this._mode);\r\n\t\t}\r\n\t};\r\n\r\n\tvar getActionData = scheduler.getActionData;\r\n\tscheduler.getActionData = function(n_ev) {\r\n\t\tif(!isYearMode()){\r\n\t\t\treturn getActionData.apply(scheduler, arguments);\r\n\t\t}\r\n\t\t\r\n\t\tvar date = getCellDate(n_ev.target);\r\n\t\treturn {\r\n\t\t\tdate:date,\r\n\t\t\tsection:null\r\n\t\t};\r\n\t};\r\n\r\n\tvar locateEvent = scheduler._locate_event;\r\n\tscheduler._locate_event = function(node) {\r\n\t\tvar id = locateEvent.apply(scheduler, arguments);\r\n\t\tif(!id){\r\n\t\t\t\r\n\t\t\tvar date = getCellDate(node);\r\n\t\t\tif(!date) return null;\r\n\t\t\tvar evs = scheduler.getEvents(date, scheduler.date.add(date, 1, \"day\"));\r\n\t\t\tif(!evs.length) return null;\r\n\r\n\t\t\t//can be multiple events in the cell, return any single one\r\n\t\t\tid = evs[0].id;\r\n\t\t}\r\n\t\treturn id;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tscheduler._hideToolTip();\r\n\t});\r\n}","import SchedulerFactory from \"./scheduler_factory\";\r\nimport gplExtensions from \"./ext/extensions_gpl\";\r\n\r\nconst factory = new SchedulerFactory(gplExtensions);\r\n\r\nconst scheduler = factory.getSchedulerInstance();\r\nconst Scheduler = {\r\n\tplugin: scheduler.bind(factory.plugin, factory)\r\n};\r\n\r\nwindow.scheduler = scheduler;\r\nwindow.Scheduler = Scheduler;\r\n\r\nif(!window.$dhx) {\r\n\twindow.$dhx = {};\r\n}\r\n\r\nwindow.$dhx.scheduler = scheduler;\r\nwindow.$dhx.Scheduler = Scheduler;\r\n\r\nexport default scheduler;export { scheduler, Scheduler };","\r\n\r\nimport dhtmlxHook from \"./dhtmlx_hook\";\r\nimport \"./css/theme.less\";\r\ndhtmlxHook();\r\n\r\nimport global from \"./global\";\r\n\r\nimport factoryMethod from \"./scheduler_factory_method\";\r\nimport ExtensionsManager from \"./ext/extension_manager\";\r\n\r\nclass SchedulerFactory {\r\n\r\n\tconstructor (extensions) {\r\n\t\tthis._seed = 0;\r\n\t\tthis._schedulerPlugins = [];\r\n\t\tthis._bundledExtensions = extensions;\r\n\t\tthis._extensionsManager = new ExtensionsManager(extensions);\r\n\t}\r\n\r\n\tplugin(code) {\r\n\t\tthis._schedulerPlugins.push(code);\r\n\r\n\t\tif(global.scheduler){\r\n\t\t\tcode(global.scheduler);\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetSchedulerInstance(initConfig) {\r\n\t\tvar scheduler = factoryMethod(this._extensionsManager);\r\n\r\n\t\tfor (var i = 0; i < this._schedulerPlugins.length; i++) {\r\n\t\t\tthis._schedulerPlugins[i](scheduler);\r\n\t\t}\r\n\t\tscheduler._internal_id = this._seed++;\r\n\t\r\n\t\tif (this.$syncFactory){\r\n\t\t\tthis.$syncFactory(scheduler);\r\n\t\t}\r\n\r\n\t\tif(initConfig){\r\n\t\t\tthis._initFromConfig(scheduler, initConfig);\r\n\t\t}\r\n\r\n\t\treturn scheduler;\r\n\t}\r\n\r\n\t_initFromConfig(scheduler, initConfig){\r\n\t\tif(initConfig.plugins){\r\n\t\t\tscheduler.plugins(initConfig.plugins);\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.config){\r\n\t\t\tscheduler.mixin(scheduler.config, initConfig.config, true);\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.templates){\r\n\t\t\tscheduler.attachEvent(\"onTemplatesReady\", function(){\r\n\t\t\t\tscheduler.mixin(scheduler.templates, initConfig.templates, true);\r\n\t\t\t}, {once: true});\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.events){\r\n\t\t\tfor(const event in initConfig.events){\r\n\t\t\t\tscheduler.attachEvent(event, initConfig.events[event]);\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.locale){\r\n\t\t\tscheduler.i18n.setLocale(initConfig.locale);\r\n\t\t}\r\n\t\r\n\t\tif(Array.isArray(initConfig.calendars)){\r\n\t\t\tinitConfig.calendars.forEach(function(calendar){\r\n\t\t\t\tscheduler.addCalendar(calendar);\r\n\t\t\t});\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.container){\r\n\t\t\tscheduler.init(initConfig.container);\r\n\t\t} else {\r\n\t\t\tscheduler.init();\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.data){\r\n\t\t\tif(typeof initConfig.data === \"string\"){\r\n\t\t\t\tscheduler.load(initConfig.data);\r\n\t\t\t}else{\r\n\t\t\t\tscheduler.parse(initConfig.data);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\r\n}\r\n\r\nexport default SchedulerFactory;"],"names":["global$1","window","global","dragHighlightPos","scheduler","dndMarkers","dragStarted","eventNode","event","isEnabled","config","drag_highlight","markTimespan","checkViewName","viewName","viewObj","getView","layout","createMarkerConfig","configSettings","sectionId","style","top","left","marginLeft","sections","markerObject","start_date","end_date","css","html","date","add","createViewMarker","settings","markerConfigs","monthViewMarkersArray","weekDates","currDate","Date","valueOf","obj","push","week_start","cells","$container","querySelectorAll","event_attribute","id","i","length","cloneNode","unitMarkersArray","sectionPropertyName","y_property","map_to","formatedSections","String","split","section_delimiter","map","element","elems","columnViewMarkersArray","eventNodes","eventNodeClone","getAttribute","forEach","cfg","attachEvent","mode","e","getEvent","target","closest","getState","cascade_event_display","unselect","getActionData","section","n","unmarkTimespan","limitPlugin","mark_now","display_marked_timespans","overwrite_marked_timespans","dhx_time_block","default_timespan_type","get_resulting_options","days","zones","options","type","getZones","ev","timespans","day_index","day_value","timespan_type","s","containers","_props","matrix","container","property","view","linker","_add_timespan_zones","_get_blocked_zones","blockTime","addMarkedTimespan","unblockTime","deleteMarkedTimespan","checkInMarkedTimespan","on_overlap","res","temp_start_date","temp_end_date","_marked_timespans","date_part","getDay","eventStart","_get_zone_minutes","eventEnd","getDate","markerStart","markerEnd","checkLimitViolation","check_limits","c","evs","rec_type","_end_date","seriesEnd","limit_start","limit_end","complete_res","p","_timed","isOneDayEvent","allow","_drag_id","_drag_mode","setHours","setMinutes","checkEvent","callEvent","timeline_zones","blocked_timeline_zones","this","_get_relevant_blocked_zones","resultZones","concat","_mark_now","hide","dhx_now_time","_els","now","_currentDate","_remove_mark_now","_max_date","_min_date","getHours","first_hour","last_hour","locate_holder_day","_append_mark_now","zone_start","_table_view","_mode","start_index","end_index","units_l","size","position","r_divs","t_day","t_div","_render_marked_timespan","els","div","parent","parentNode","removeChild","getMinutes","_prepare_timespan_options","r_configs","temp_configs","Array","t_days","slice","cloned_config","_lame_clone","apply","undefined","invert_zones","invertZones","uid","view_key","hasOwnProperty","ids","t_config","_lame_copy","k","c_config","t_sd","t_ed","zone_end","_get_dates_by_index","index","start","end","dates","start_day","delta","t_date","_get_css_classes_by_config","css_classes","join","_get_block_by_config","block","document","createElement","innerHTML","appendChild","area","day","blocks","min_date","max_date","date_to_display","min_day","areas","d","_scales","sday","_cols","_ignores","block_proto","className","height","width","order","inner_index","locate_holder","Math","max","min","all_hours_height","hour_size_px","hour_ms","round","_mark_timespans","data","divs","_on_scale_add_marker","len","childNodes","firstChild","_getClassName","indexOf","configuration","Error","rebuild_els","get_elements","timespans_ids","_marked_timespans_ids","timespan_types","_marked_timespans_types","_addMarkerTimespanConfig","unit_id","timespans_view","day_configs","_array","configs","current_zones","resulting_zones","c_zone_start","c_zone_end","isLast","offset","splice","_subtract_timespan_zones","is_modified","_","_delete_marked_timespan_by_id","parent_array","_delete_marked_timespan_by_config","viewspans","_delete_marked_timespans_list","dayConfig","day_timespans","d_t","related_zones","arguments","types","t","typedConfig","_get_types_to_render","common","specific","types_to_render","_get_configs_to_render","units","unit","_get_unit_index","day_ind","unitsPerDay","floor","_date","key","unit_zones","unit_types","global_data","day_types","dblclick_dhx_marked_timespan","src","dblclick_create","addEventNow","createMethod","methods","isActive","disableMethod","methodName","dummyMethod","restoreMethod","disableMethods","methodsHash","call","restoreMethods","batchUpdatePayload","callback","console","error","$stateProvider","registerProvider","batch_update","noRedraw","dp_mode","call_dp","_dp","updateMode","setUpdateMode","calls","setModeDate","needRender","needUpdateView","repaintEvents","rememberModeDate","render","setCurrentView","updateView","render_data","render_view_data","updateEvent","sendData","initPlugins","deletedEvent","copy","undo_deleted","new_event","message","text","expire","addEvent","limit","batchUpdate","uidSeed","isDate","getFullYear","getMonth","utils","mixin","source","force","f","object","result","isArray","pop","Function","prototype","toString","constructor","Number","Boolean","varType","Object","defined","delay","timeout","timer","$cancelTimeout","$pending","args","setTimeout","clearTimeout","$execute","extend","cssClass","classList","itemTypes","rows_container","row","setAttribute","fix_tab_position","$firstTab","$lastTab","$segmentedTab","button","builtInButton","spacer","minicalendarButton","minicalendarDiv","click","$_eventAttached","isCalendarVisible","destroyCalendar","renderCalendar","navigation","handler","calendar","html_element","renderElement","renderer","rows","cols","value","align","justifyContent","prepareConfig","renderLayout","items","fragment","createDocumentFragment","next","_init_nav_bar","navBar","querySelector","_update_nav_bar","previousHeight","heightChanged","newHeight","xy","nav_height","unset_actions","set_actions","display","isAttachedNode","root","body","getWindowSize","w","innerWidth","documentElement","clientWidth","h","innerHeight","clientHeight","listenWindowResize","resizeDelay","oldSize","$destroyed","a","b","newSize","triggerSchedulerResize","$root","getComputedStyle","getPropertyValue","resizeWatcher","tabIndex","wai_aria_attributes","offsetHeight","previousWidth","offsetWidth","lowlevelResizeWatcher","contentWindow","EventHost","_silent_mode","listeners","_silentStart","createEventStorage","handlers","eventStorage","combinedResult","handlerResult","handlerId","once","originalHandler","removeEvent","clear","makeEventable","eventHost","eventName","toLowerCase","thisObject","bind","attachAll","name","eventArguments","handlerName","detachEvent","list","eventId","detachAllEvents","defaultDomEvents","el","addEventListener","eventRemove","removeEventListener","domEvents","eventScope","attach","capture","detach","detachAll","staticArray","_eventRemoveAll","_createDomEventScope","_trim","str","trim","replace","_isDate","_isObject","getClassName","node","baseVal","locateCss","classname","strict","trg","srcElement","ind","charAt","right","isVisible","visibility","currentStyle","hiddenSection","recurringSection","hasNonNegativeTabIndex","isNaN","hasHref","nodeName","loLowerCase","input","select","textarea","hasAttribute","isShadowDomSupported","head","createShadowRoot","attachShadow","getRootNode","ShadowRoot","host","dom_helpers","getAbsoluteLeft","htmlObject","getOffset","getAbsoluteTop","getOffsetSum","elem","parseInt","offsetTop","offsetLeft","offsetParent","getOffsetRect","box","getBoundingClientRect","test","navigator","userAgent","dummy","dummyBox","docElem","scrollTop","pageYOffset","scrollLeft","pageXOffset","clientTop","clientLeft","selector","insertAfter","newNode","referenceNode","nextSibling","insertBefore","remove","isChildOf","child","contains","getFocusableNodes","nodes","nodesArray","$position","sort","hasShadowParent","getActiveElement","activeElement","shadowRoot","getSelection","focusNode","getRelativeEventPosition","bottom","y","x","clientX","clientY","getTargetNode","tagName","composedPath","getNodePosition","Element","matches","msMatchesSelector","webkitMatchesSelector","parentElement","nodeType","isWindowAwailable","env","isIE","isOpera","isChrome","isKHTML","isFF","isIPad","search","isEdge","isNode","serialize$1","serialized","encodeURIComponent","JSON","stringify","generateStringToDate","format","utc","splt","mask","match","code","csp_str_to_date","set","temp","locale","month_short_hash","month_full_hash","UTC","cspEnabled","useCsp","csp","init","month_short","month_full","old","setSeconds","setMilliseconds","setTime","getTime","time_part","getTimezoneOffset","shift","start_on_monday","month_start","setDate","year_start","setMonth","day_start","_add_days","inc","ndate","rest","hours","setYear","to_fixed","num","date_to_str","getUTCDate","getUTCMonth","getUTCFullYear","day_short","getUTCDay","day_full","getUTCHours","getUTCMinutes","getUTCSeconds","getSeconds","getUTCISOWeek","getISOWeek","str_to_date","exactFormat","stringToDateMethod","parseExactFormat","yyyyMMddhhIIss","MMddyyyyhhIIss","ddMMyyyyhhIIss","ISO8601","parseYMD","parseMDY","parseDMY","dateString","parse_exact_format","datestr","nday","first_thursday","year_number","ordinal_date","convert_to_utc","getSerializator","_events","_loaded","_load","url","from","_load_url","to","prevent_cache","_load_mode","lf","templates","load_format","cache_line","temp_to","ajax","get","ajaxCallback","response","on_load","_parsers","xml","canParse","xhr","responseXML","xmlDoc","parse","responseText","topElement","xmltop","loader","csrfToken","dhtmlx","security_key","opts","xpath","arr","serverList","itms","j","attrs","attributes","label","attr","nodeValue","ud","udx","_xmlNodeToJSON","_userdata","_init_event","json","events","dhx_security","collections","collections_loaded","collection","option","option_key","ical","RegExp","c_start","c_end","incoming","event_r","e_start","e_end","exec","param","param_r","parse_param","substr","parse_date","dh","dm","utcMark","dy","dn","dd","server_utc","foundParser","parser","_process","status","_process_loading","_loading","_not_render","_render_wait","_after_call","_tagvalue","_init_date","_helpers","parseDate","getSerializableData","createSerializator","serialize","dataset","allEvents","exportedEvent","exportValue","rawValue","xml_format","format_date","load","setLoadMode","array","show_loading","_x","_y","_obj","_init_touch_events","touch","MSStream","platform","maxTouchPoints","scroll_width","_mobile","touchEventsSupported","createEvent","_touch_events","touches","pageX","pageY","PointerEvent","pointerEnabled","pointerType","msPointerEnabled","MSPOINTER_TYPE_MOUSE","names","accessor","ignore","tracker","drag_mode","scroll_mode","action_mode","dblclicktime","attachTouchEvent","_is_lightbox_open","passive","drag_cancel","_hide_global_tip","_on_mouse_up","_temp_touch_block","_drag_pos","_pointerDragId","acc","dnd","timeline","original_render","drag_id","getEvents","_sorder","_count","_on_mouse_move","preventDefault","cancelBubble","_update_global_tip","abs","fake_event","pointerId","_click","dhx_cal_data","_on_dbl_click","_block_next_stop","touch_drag","actTask","_locate_event","fakeTask","sourceTask","_ignore_next_click","previousSibling","_on_mouse_down","for_rendered","_rendered","touch_tip","_show_global_tip","touch_swipe_dates","s_ev","e_ev","step","max_dy","scrollable","dx","dhx_cal_next_button","dhx_cal_prev_button","toptip","_global_tip","time","event_header","day_date","labels","drag_to_create","drag_to_move","calculatedMaterial","cachedBorderBoxValue","checkIfBorderBoxStyling","_is_material_skin","probe","boxSizing","refreshAfterLoad","_border_box_events","oldStyling","flatSkinHourScale","_addThemeClass","skin","_skin_settings","use_select_menu_space","wide_form","displayed_event_color","displayed_event_text_color","_skin_xy","lightbox_additional_height","bar_height","_build_skin_info","clearInterval","monitorIntervalId","setInterval","csstheme","setSkin","styles","themeVar","themeName","isCssVarTheme","cssValues","oldMaterialTheme","links","getElementsByTagName","href","_theme_info","theme","cssVarTheme","values","themeVariables","_configure","col","_skin_init","hour_scale","hour_date","_old_month_day","month_day","old_month_day","dhx_cal_today_button","tab","header","tabs","specialTabs","tabName","find","filter","firstTab","reverse","DataProcessorEvents","dp","$scheduler","$dp","_dataProcessorHandlers","_validId","setUpdated","z","_new_event","_in_progress","_invalid","updatedRows","_waitMode","_update_callback","upd","setUserData","action_param","deleteEvent","_add_rec_marker","DataProcessor","serverProcessorURL","serverProcessor","autoUpdate","_tMode","_headers","_payload","post_delim","messages","updated","inserted","deleted","invalid","invalid_cell","enableUTFencoding","eventable","boxAttribute","_dhx_msg_cfg","usercall","modalBox","modal_key","which","keyCode","messageBox","keyboard","domHelpers","modality","cover","classValue","buttonAriaAttrs","_waiAria","messageButtonAttrString","getFirstDefined","_createBox","ok","cancel","contentId","messageModalAttr","inner","title","content","message_ok","message_cancel","buttons","btn","getElementById","hidden","focus","alertPopup","confirmPopup","boxPopup","box_params","params","focusable","messageInfoAttr","timers","pull","seed","hideAll","popups","alert","confirm","modalbox","setTransactionMode","total","headers","payload","_tSend","_endnm","_serializeAsJson","_router","router","escape","_utf","setDataColumns","val","_columns","getSyncState","enableDataNames","enablePartialDataSend","_changed","master","rowId","state","findRow","existing","getUserData","set_invalid","is_invalid","markRow","_methods","details","getActionByState","checkBeforeUpdate","editStop","sendAllData","_beforeSendData","_getRowData","_sendData","_serializeAsJSON","serialize_one","stack","keys","pref","_applyPayload","urlSeparator","dataToSend","self","queryParams","afterUpdate","urlParams","_user","_cleanupArgumentsBeforeSend","method","preprocessedData","_cleanupItemBeforeSend","action","query","_onResolvedCreateUpdate","tag","resultState","setRequestHeader","sid","tid","afterUpdateCallback","routerMode","actionPromise","create","delete","update","then","catch","valid","_forEachUpdatedRow","_getAllData","out","has_one","pattern","defineAction","_uActions","btag","marker","correct","originalSid","_errorResponse","cleanUpdate","_setDefaultTransactionMode","_serverProcessor","that","finalizeUpdate","atag","_initialized","_dp_init","_is_virtual_event","_set_event_text_style","r","cssText","event_updated","rec_pattern","_dp_change_event_id","new_id","changeEventId","_dp_hook_delete","setDp","dataProcessorEvents","_dataprocessor","setOnAfterUpdate","setOnBeforeUpdateHandler","func","setAutoUpdate","interval","user","_need_update","_update_busy","xml_node","afterAutoUpdate","fullSync","intervalId","loadUpdate","getUpdates","_getXmlNodeValue","version","vers","updates","destructor","processedData","updatedItem","output","item","processedItem","prop","formatDate","_prepareItemForJson","_prepareItemForForm","_prepareDataItem","dataItem","ar","day_tab","week_tab","month_tab","icon_save","icon_cancel","icon_details","icon_edit","icon_delete","confirm_closing","confirm_deleting","section_description","section_time","full_day","confirm_recurring","section_recurring","button_recurring","button_recurring_open","button_edit_series","button_edit_occurrence","grid_tab","prev","year","month","hour","minute","repeat_radio_day","repeat_radio_week","repeat_radio_month","repeat_radio_year","repeat_radio_day_type","repeat_text_day_count","repeat_radio_day_type2","repeat_week","repeat_text_week_count","repeat_radio_month_type","repeat_radio_month_start","repeat_text_month_day","repeat_text_month_count","repeat_text_month_count2_before","repeat_text_month_count2_after","repeat_year_label","select_year_day2","repeat_text_year_day","select_year_month","repeat_radio_end","repeat_text_occurences_count","repeat_radio_end2","repeat_radio_end3","repeat_never","repeat_daily","repeat_workdays","repeat_weekly","repeat_monthly","repeat_yearly","repeat_custom","repeat_freq_day","repeat_freq_week","repeat_freq_month","repeat_freq_year","repeat_on_date","repeat_ends","month_for_recurring","day_for_recurring","be","agenda_tab","description","year_tab","week_agenda_tab","ca","cn","cs","da","de","en","es","fi","fr","he","hu","it","jp","LocaleManager","_locales","nb","nl","no","pl","pt","ro","ru","si","sk","sv","tr","ua","DatePicker","modes","currentRange","eventDates","filterDays","currentModeIndex","onStateChangeHandlers","_domEvents","onStateChange","oldState","newState","_notifyStateChange","direction","newDate","setFullYear","setState","_toggleMode","newIndex","backwardArrow","monthLabel","innerText","toLocaleString","startYear","forwardArrow","_adjustDate","_renderCalendarHeader","dataContainer","_renderDayGrid","_renderMonthGrid","_renderYearGrid","daysOfWeekContainer","currentDate","maxDate","labelFormat","dayElement","weeks","currWeek","minWeeks","minSchedulerDate","maxSchedulerDate","eventDaysTable","reduce","_renderDayGridHeader","weekLength","children","setProperty","firstDate","monthStart","monthEnd","lastDate","currentCalDate","_weeksBetween","dayGridContainer","dateCell","wrapper","months","formatLabel","monthElement","doneArea","doneBtn","yearElement","factoryMethod","extensionManager","stateProviders","internal","provider","unregisterProvider","commonViews","agenda","grid","week_agenda","anythingElse","requiredExtensions","_commonErrorMessages","unknownView","relatedExtension","collapsedContainer","createTimelineView","createUnitsView","createGridView","exportToPNG","exportToPDF","nav_bar","_detachDomEvent","_init_once","scheduler_resize_listener","hasSchedulerMarkup","wai_aria_application_role","views","_grid","log","rtl","_scroll","init_templates","set_sizes","$initialized","min_event_height","scale_width","scale_height","month_scale_height","menu_width","margin_top","margin_left","editor_width","month_head_height","event_header_height","edit_save","edit_cancel","functor","scale_x","materialScalePlaceholder","set_xy","_lightbox","_setLbPosition","_data_width","prepareValue","prepared","class_name","attr_value","labelAttr","domEventsScope","getDaysDifference","startDate","endDate","differenceInDays","_select_id","_close_not_saved","previousSelection","editor_id","_edit_id","lightbox_id","_lightbox_id","select_id","expanded","readonly","icon","def_step","dhx_cal_tab","deprecated_name","substring","_dhtmlx_confirm","title_confirm_deleting","edit","save","showLightbox","form","base","duration","event_duration","time_step","start_hour","_drag_event","details_on_dblclick","viewHandler","_get_column_index","x_pos","column","_week_indexes_from_pos","pos","ceil","_mouse_coords","$env","_colsS","$domHelpers","dataArea","heights","_ignores_detected","preserve_length","_event_length","_get_real_event_length","x_step","x_unit","timestamp","confirmationText","title_confirm_closing","positive_closing","_correct_shift","back","_is_pos_changed","old_pos","new_pos","diff","old_val","new_val","has_moved","_correct_drag_start_date","_start_correction","_end_correction","_get_fictional_event_length","_correct_drag_end_date","mousedownPos","_get_date_from_pos","_drag_start","fields","timeStep","custom","_dragEventBody","_move_event_shift","resize_date","_drag_from_start","resize_from_start","end_day_start","end_day_date","firstHour","maxY","precisePos","minDate","preciseDate","cursor","new_end","new_start","limit_drag_out","all_timed","_get_section_view","_get_event_sday","_allow_dnd","update_render","sx","update_view","drag_event_body","_get_private_properties","_clear_temporary_properties","clean","flagged_event","initial","current_state","moved","_dhx_changed","is_new","edit_on_create","details_on_create","_trigger_dyn_loading","_reset_ignores","_reset_scale","isViewExists","_set_aria_buttons_attrs","buttonGroups","group","headerButtonsAttributes","icon_form","oldClass","newClass","multidayScroll","dhx_multi_day","prev_scroll","preserve_scroll","_dy_shift","headerToggleState","_render_x_header","offset_top","left_border","columnHeaderText","dayHeaderAttr","_get_columns_num","count","count_n","_get_timeunit_start","_get_view_end","ed","_calc_scale_sizes","summ","_process_ignores","realcount","_set_scale_col_size","_render_scales","data_area","sd","today","scales","cls","firstHalf","slotDate","htmlContent","time_slot_text","time_slot_class","secondHalf","week_date_class","dayColumnAttr","_getNavDateElement","drag_resize","drag_move","navBarDateStr","scaleElement","navBarDateAttr","_reset_month_scale","_reset_hours_scale","multi_day","c1","totalWidth","col_length","hiddenWidth","c2","cc","hourScaleAttr","scroll_hour","now_date","preserve","ign_date","_render_month_scale","view_start","cd","tdwidths","cell_width","getCellHeight","cellheight","table","cell","month_date_class","body_class","head_class","monthCellAttr","cellHead","cellBody","bf1","getLabel","lightbox","updateCollection","list_name","resetLightbox","hideCover","cache","n_ev","_focus","endColumnIndex","eventLength","startColumnIndex","_get_date_index","last_column","check","excludedDuration","intervalStart","intervalEnd","leftCellCutOffStart","leftCellCutOffEnd","rightCellCutOffStart","rightCellCutOffEnd","ev_length","dir","per_day","end_slot","fd","start_slot","_get_section_property","_is_initialized","htmlTags","extraSpaces","stripHTMLLite","htmlText","singleQuotes","escapeQuotes","getAttributeString","setAttributes","role","getHeaderCellAttr","eventAttr","_eventCommonAttr","event_text","$dataprocessor_class","setEventBarAttr","_getAttributes","attributeSetter","arg","eventBarAttrString","agendaHeadAttrString","agendaHeadDateString","agendaHeadDescriptionString","agendaDataAttrString","agendaEventAttrString","agendaDetailsBtnString","gridAttrString","gridRowAttrString","gridCellAttrString","mapAttrString","mapRowAttrString","mapDetailsBtnString","minicalHeader","headerId","minicalGrid","minicalRow","minicalDayCell","selected","minicalHeadCell","weekAgendaDayCell","weekAgendaEvent","lightboxHiddenAttr","lightboxVisibleAttr","lightboxSectionButtonAttrString","tabindex","yearHeader","yearGrid","yearHeadCell","yearRow","yearDayCell","lightboxAttr","lightboxButtonAttrString","buttonName","eventMenuAttrString","iconName","lightboxHeader","headerText","lightboxSelectAttrString","time_option","buttonLabel","quickInfoAttr","quickInfoHeaderAttrString","quickInfoHeader","quickInfoButtonAttrString","tooltipAttr","tooltipVisibleAttr","tooltipHiddenAttr","dom","assert","show_errors","_createDatePicker","_getFocusableNodes","_locate_css","messageApi","$","counter","Promise","clearAll","createConfig","async","serializeRequestParams","DOMParser","ActiveXObject","loadXML","parseFromString","tagname","xpathExp","docObj","selectNodes","first","ownerDocument","evaluate","XPathResult","ANY_TYPE","iterateNext","_call","onLoad","getSync","put","postData","del","post","postSync","resolve","reject","XMLHttpRequest","isQt","readyState","filePath","open","toUpperCase","send","$ajax","default_date","month_date","load_date","week_date","date_format","api_date","day_column_padding","drag_create","resize_month_events","resize_month_timed","responsive_lightbox","separate_short_events","cascade_event_count","cascade_event_margin","multi_day_height_limit","drag_lightbox","quick_info_detached","icons_edit","icons_select","buttons_left","buttons_right","highlight_displayed_event","ajax_error","delay_render","timeline_swap_resize","$initial","xml_date","d1","d2","day_scale_date","month_scale_date","week_scale_date","time_picker","event_date","event_class","event_bar_date","event_bar_text","month_events_link","drag_marker_class","drag_marker_content","tooltip_date_format","tooltip_text","calendar_month","calendar_scale_date","calendar_date","calendar_time","clear_view","extra_data","silent","setEvent","hash","create_getter","create_setter","is_visible_events","clear_event","evFirstHour","evLastHour","lastHour","checkEndDate","get_visible_events","only_timed","filter_event","_is_main_area_event","hold","full","_recalculate_timed","tvs","tvd","_rendered_location","buffer","renderedLocation","_view_month_day","_render_month_link","toRender","_sday","_eday","curr","_sweek","_get_event_bar_pos","widt","x2","_pre_render_events","render_event_bar","max_evs","max_month_events","real","render_event","_get_first_visible_cell","hb","h_old","_pre_render_events_table","_pre_render_events_line","monthRows","cellHeight","cHeight","unshift","scrollHeight","scroll_fix","scale_settings","sum_width","row_heights","full_multi_day_height","used_multi_day_height","used_multi_day_height_css","multi_day_section","multi_day_icon","overflowY","datePart","_get_event_mapped_end_date","ev_duration","_min_mapped_duration","evs_originals","sh","eh","_inner","t_ev","slot_index","sorderSet","_is_sorder","_max_sorder","max_count","_copy_event","_time_order","_is_any_multiday_cell_visible","isAnyCellVisible","checkDate","noCells","lastDayEnd","weekCellIndex","chunks_info","first_chunk","last_chunk","chunk_info","locate_s","locate_e","_length","stack_line","_first_chunk","_last_chunk","_copy_dummy","_y_from_date","sm","_calc_event_y","min_height","em","parentWidth","menu","menu_offset","pos_y","ev_count","ev_sorder","margin","_render_v_bar","_text_style","zIndex","color","tplClass","_editor","shiftKey","ariaAttr","icons","icons_str","currentIcon","textColor","highlightEventPosition","contentA","contentB","cse","boxWidth","renderEvent","inner_html","footer_class","_drag_resize","past","_get_dnd_order","ev_height","max_height","_orig_sorder","evTop","columns","y_event_offset","resize_handle","resizable","left_chunk","right_chunk","resize_left","resize_right","timed","bg_color","style_text","_edit_stop_event","getRenderedEvent","rendered_events","rendered_event","showEvent","original_color","original_text_color","getSectionTop","posFromDate","_smartRenderingEnabled","restoreOriginalColors","scrollTo","_append_drag_marker","m","scale","lastChild","_update_marker_position","getLightboxRoot","cspEnvironment","salesforceEnvironment","_lightbox_controls","formSection","getLightbox","getValue","form_blocks","get_value","setValue","set_value","get_template_control","control","get_select_control","get_textarea_control","get_time_control","defaults","template","sns","placeholder","_get_input","_dhx_onchange","onchange","time_format","_time_format_order","dt","last","limit_time_select","selectBoxClass","range","start_year","end_year","year_range","tdate","_time_values","ariaAttrs","_full_day","checked","disabled","_fill_lightbox_select","auto_end_date","_update_lightbox_select","time_values","direct_value","fixed_value","value_found","t_v","selectedIndex","original","showCover","show_cover","_cover","_fill_lightbox","lightbox_header","headerContent","headerDate","headerTitle","current_sns","_get_lightbox_section_node","default_value","_lightbox_out","_empty_lightbox","hide_lightbox","endLightbox","hide_cover","_move_while_dnd","_finish_dnd","save_lightbox","startLightbox","_custom_lightbox","_temp_lightbox","cancel_lightbox","hideLightbox","_init_lightbox_events","buttonTarget","sectionButton","button_click","readonly_active","setLightboxSize","_init_dnd_events","_dnd_start_lb","dhx_unselectable","lb","_lb_start","_ready_to_dnd","recurring","_lightbox_template","label_name","ds","t_ds","_bindLightboxLabels","inputBlock","fallback","inputId","old_id","getRootView","hooks","didInsert","cmp","skins","jQuery","fn","dhx_scheduler","each","Scheduler","getSchedulerInstance","comp","update_view_timer","curr_view_timer","lazy_setCurrentView","oldDate","oldMode","updateFlags","lazy_updateView","ars","createDataProcessor","tMode","dhtmlxError","catchError","i18n","addLocale","setLocale","localeObject","getLocale","dhx_save_btn","dhx_cancel_btn","dhx_delete_btn","addPlugins","ext","activePlugins","plugins","extensionList","dependencies","priorities","extension","dep","dependencyName","orderA","orderB","treetimeline","daytimeline","outerdrag","legacy","plugin","getExtension","ExtensionsManager","_extensions","attaches","attachScheduler","_genStr","attachObject","vs","av","sched","schedId","setSizes","_viewRestore","notImplemented","modals","modalsStack","isModal","afterPopup","trapFocus","currentTarget","$keyboardNavigation","_keyNavMessagePopup","focusElement","backupFocus","key_nav_legacy","_temp_key_scope","key_nav","_pasteDate","_pasteSection","isCopy","trackMousePosition","mousePointer","keyNavPointer","elementFromPoint","dispatcher","copyEvent","_make_pasted_event","event_pid","event_length","multisection","isMultisectionEvent","_do_paste","is_copy","modified_ev","original_ev","_is_key_nav_active","ctrlKey","metaKey","_buffer_event","_key_nav_copy_paste","getActiveNode","new_ev","scheduler_handlers","attachSchedulerHandlers","waitCall","keyDownHandler","focusHandler","keepScrollPosition","focusGlobalNode","enable","reFocusActiveNode","activeNode","isValid","MinicalButton","MinicalCell","mousedownHandler","dataAreaClick","listOfScales","some","Event","TimeSlot","nextSlot","setActiveNode","removeAttribute","evNode","prevState","lastStart","lastEnd","lastSection","getNode","GoogleMapAdapter","_markers","zoom","zoom_after_resolve","initial_zoom","lat","lng","setCenter","setZoom","error_position","google","maps","trigger","mapOptions","center","initial_position","mapId","scrollwheel","mapTypeId","Map","__gm","messageOverlay","outerContainer","setOptions","addListener","geocoder","Geocoder","point","latLng","geocode","results","GeocoderStatus","OK","geometry","location","event_location","formatted_address","clearInstanceListeners","AdvancedMarkerElement","importLibrary","mapView","createMarker","setMap","infoWindow","close","InfoWindow","maxWidth","info_window_max_width","setContent","map_info_content","anchor","markerInfo","setVisible","setPosition","latlng","LatLng","latitude","longitude","resolveAddress","string","address","OpenStreetMapAdapter","openPopup","closeTooltip","setView","mapWrapper","L","tileLayer","addTo","on","fetch","country","myIcon","iconUrl","iconSize","shadowSize","iconAnchor","shadowAnchor","popupConfig","minWidth","markerPopup","popup","tooltip","markerConfig","bindPopup","bindTooltip","removeLayer","setLatLng","lon","MapboxAdapter","getPopup","isOpen","togglePopup","mapboxgl","accessToken","lngLat","features","place_name","Popup","focusAfterOpen","setMaxWidth","setHTML","Marker","setLngLat","setPopup","ALL_WEEKDAYS","Weekday","weekday","fromStr","nth","equals","other","getJsWeekday","isPresent","isNumber","isWeekdayStr","includes","rang","repeat","times","padStart","targetLength","padString","sep","splits","pymod","divmod","mod","empty","notEmpty","datetime","MONTH_DAYS","ONE_DAY","MAXYEAR","ORDINAL_BASE","PY_WEEKDAYS","isLeapYear","isValidDate","toOrdinal","date2","differencems","fromOrdinal","ordinal","getMonthDays","getWeekday","monthRange","combine","getMilliseconds","clone","cloneDates","clones","timeToUntilString","untilStringToDate","until","bits","dateTZtoISO8601","timeZone","IterResult","_result","before","after","accept","tooEarly","tooLate","extendStatics","setPrototypeOf","__proto__","__extends","TypeError","__","__assign","assign","__spreadArray","pack","l","Frequency","CallbackIterResult","_super","iterator","_this","ENGLISH","dayNames","monthNames","tokens","SKIP","number","numberAsText","every","at","the","second","third","for","monday","tuesday","wednesday","thursday","friday","saturday","sunday","january","february","march","april","may","june","july","august","september","october","november","december","comma","defaultGetText","defaultDateFormatter","ToText","rrule","gettext","language","dateFormatter","origOptions","bymonthday","bynmonthday","byweekday","allWeeks","someWeeks","isWeekdays","isEveryDay","sortWeekDays","isFullyConvertible","freq","IMPLEMENTED","RRule","FREQUENCIES","plural","HOURLY","MINUTELY","DAILY","bymonth","_bymonth","_bymonthday","_byweekday","byhour","_byhour","WEEKLY","MONTHLY","YEARLY","byyearday","byweekno","weekdaytext","monthtext","npos","wday","finalDelim","delim","o","realCallback","delimiter","finalDelimiter","Parser","rules","done","nextSymbol","isDone","symbol","best","bestSymbol","name_1","v","acceptNumber","expect","parseText","ttr","AT","F","MO","TU","WE","TH","FR","ON","wkd","decodeWKD","decodeNTH","MDAYs","decodeM","S","freqIsDailyOrGreater","fromText","Time","millisecond","DateTime","fromDate","getYear","addYears","years","addMonths","yearDiv","monthMod","addWeekly","wkst","fixDay","addDaily","addHours","filtered","_a","dayDiv","hourMod","addMinutes","minutes","byminute","hourDiv","minuteMod","addSeconds","seconds","bysecond","minuteDiv","secondMod","daysinmonth","SECONDLY","initializeOptions","_i","keys_1","defaultKeys","parseOptions","DEFAULT_OPTIONS","byeaster","dtstart","bysetpos","bynweekday","parsedOptions","parseString","rfcString","parseLine","parseDtstart","line","dtstartWithZone","tzid","parseRrule","Days","parseIndividualNumber","optionKey","parts","SyntaxError","wdaypart","DateWithZone","RangeError","defineProperty","enumerable","configurable","isUTC","rezonedDate","localTimeZone","Intl","DateTimeFormat","resolvedOptions","dateInLocalTZ","tzOffset","optionsToString","outValue","buildDtstart","strValues","ruleString","argsMatch","Cache","all","between","_cacheAdd","what","_value","_cacheGet","cached","argsKeys","findCacheDiff","cachedObject","iterResult","M365MASK","M366MASK","M28","M29","M30","M31","MDAY366MASK","MDAY365MASK","NM28","NM29","NM30","NM31","NMDAY366MASK","NMDAY365MASK","M366RANGE","M365RANGE","WDAYMASK","wdaymask","rebuildYear","firstwkst","wyearlen","firstyday","yearlen","nextyearlen","yearordinal","yearweekday","mmask","mdaymask","nmdaymask","mrange","wnomask","no1wkst","numweeks","lnumweeks","lyearweekday","lno1wkst","lyearlen","weekst","Iterinfo","rebuild","lastyear","yearinfo","lastmonth","monthinfo","nwdaymask","ranges","eastermask","g","yearStart","ydayset","mdayset","wdayset","ddayset","htimeset","mtimeset","stimeset","getdayset","gettimeset","buildPoslist","timeset","ii","dayset","poslist","daypos","timepos","tmp","iter","emitResult","counterDate","millisecondModulo","removeFilteredDays","rezoneIfNeeded","currentDay","isFiltered","dayCounter","SA","SU","noCache","_cache","fromString","_iter","toText","isFullyConvertibleToText","unfold","forceset","compatible","parseInput","rrulevals","rdatevals","exrulevals","exdatevals","parsedDtstart","lines","_b","parms","rdateTzid","parseRDate","rrulestr","rset_1","RRuleSet","groomRruleOptions","rdate","exrule","exdate","rdateval","parm","createGetterSetter","fieldName","field","_rrule","field_1","_rdate","_exrule","_exdate","_exdateHash","_accept","evalExdate","zonedDate","_addRule","_addDate","rrules","exrules","rdates","exdates","_dtstart","rdatesToString","rrs","rule","Tooltip","_scheduler","_tooltipNode","_root","_isLikeMouseEvent","_calculateTooltipPosition","_getViewPort","viewport","_getViewPortSize","tooltipNode","offsetX","tooltip_offset_x","offsetY","tooltip_offset_y","mouse","containerPos","scrollY","scrollX","$event_data","$event","TooltipManager","_listeners","_initDelayedFunctions","hideTooltip","delayHide","watchableTarget","eventTarget","targetNode","doOnMouseEnter","onmouseenter","touch_tooltip","onmouseleave","onmousemove","listener","cloneDomEvent","delayShow","utils.default","show","tooltip_timeout","tooltip_hide_timeout","gplExtensions","active_links","active_link_view","_active_link_click","s_d","do_wrapper","fullname","week_x","d_s","agenda_legacy","add_agenda_legacy","agenda_legacy_time","agenda_legacy_text","agenda_legacy_date","agenda_legacy_start","old_dblclick_dhx_cal_data","dblclick_dhx_cal_data","fill_agenda_tab","old_render_view_data","ev_class","agendaDetailsButtonAttr","agenda_time","agenda_text","_agendaScrollTop","agenda_area","dateElement","agenda_date","agenda_legacy_view","agenda_start","agenda_end","rowAttr","dateHeader","descriptionHeader","agenda_view","add_agenda","dayDateToStr","dayDowToStr","agenda_day","eventsInDays","anyEvents","ignore_agenda","renderDay","calendarEvent","selectedId","all_timed_month","is_event_short","_safe_copy","proto","isPrototypeOf","old_prerender_events_line","old_prerender_events_table","prerender_events","ce","_virtual","isOvernightEvent","getNextDay","setDateTime","event_changed","re","redraw","next_day","old_get_visible_events","old_mode","old_date","oldUpdate","fullRedrawNeeded","collision","temp_section","_setTempSection","event_id","collision_limit","checkCollision","edited_ev","recurring_event_id","_roll_back_dates","_check_sections_collision","evs_dates","getRecDates","tevs","concurrent","_pid_time","checked_mode","single","container_autoresize","month_day_min_height","min_grid_size","min_map_size","old_pre_render_event","active","total_height","multiday_height","evl","_h_fix","navHeight","headerHeight","checked_divs","updateContainterHeight","is_repaint","checked_div","maxHeight","year_y","cur_height","week_agenda_scale_height","eventsContainer","_gridView","y_unit","getSectionHeight","scrollWidth","getScrollSize","callUpdate","conditionalUpdateContainerHeight","asyncRepaint","requestAnimationFrame","autosizeEnabled","$original_scroll_width","$original_section_autoheight","section_autoheight","cookie","getCookieName","_get_url_nav","urlNavigationPlugin","schedulerCookie","unescape","newMode","cookie_param","old_load","drag_between","editors","cached_options","resetCombo","_combo","DOMParent","combo","unload","DOMelem","dhx_globalImgPath","image_path","dhtmlXCombo","options_height","setOptionHeight","enableFilteringMode","filtering","script_path","selected_id","addOption","disable","selectOption","setComboValue","all_options","single_option","getIndexByValue","getSelectedValue","getSelectedText","vertical","radiobuttons","checked_value","isChecked","check_html","label_html","checkbox","unchecked_value","expand","fullscreen","toggleIcon","_position","_width","_height","_overflow","overflow","_maximize","collapse","directions","prev_margin","export_api","std","getElementSizes","sizes","dhtmlxAjax","dhx4","getTimeline","orientation","dpi","_export_html","_send_to_export","exportToICal","_serialize_plain","exportToExcel","_serialize_columns","_ajax_to_export","server","info","_plain_export_copy","$text","_create_hidden_form","submit","_hidden_export_form","_get_export_size","footer","A5","A4","A3","A2","A1","A0","dataX","cSize","parseFloat","smartRendering","initialSizes","smart_rendering","style_width","style_height","timeline_scrollable","timeline_smart_rendering","grid_view","html_templates","getScope","scopes","minicalButton","minicalDate","SchedulerNode","DataArea","timeSlot","searchMap","key_nav_step","addShortcut","shortcut","scope","scopeObject","getShortcutHandler","commands","shortcuts","findHandler","removeShortcut","unbind","disp","setDefaultNode","_compose","createCommand","modifiers","alt","ctrl","meta","expr","getExpressions","words","getWords","command","commandKeys","specialKeys","charCodeAt","getCommandFromEvent","domEvent","altKey","printableKey","fromCharCode","getHashFromEvent","getHash","junctionChar","term","combinationChar","backspace","enter","esc","space","up","down","home","pageup","pagedown","insert","plus","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10","f11","f12","EventHandler","_handlers","doAction","returnValue","bindAll","initKeys","nextItem","currentFocus","currentIndex","renderMultiple","currentStart","currentEnd","_modes","_getMode","renderVerticalMarker","renderTimelineMarker","renderYearMarker","renderMonthMarker","weekAgenda","renderWeekAgendaMarker","renderAgendaMarker","dayColumns","addWaiAriaLabel","addDataAttributes","dateToStr","dateTimeLabel","sectionObject","markerDate","_wrapDiv","_get_year_cell","opacity","view_opts","round_position","_trace_x","_is_column_visible","start_pos","end_pos","set_date_part","tempStart","tempEnd","_timeline_getX","_section_height","_isRender","renderMonthCell","weekNumber","dayIndex","datatable","lineHeight","getDefaultNode","getMode","blur","_compareEvents","_pickEvent","startId","nextEventHandler","nextEvent","currEvent","visibleDates","nextEv","prevEventHandler","HeaderCell","getNodes","KeyNavNode","moveTo","compareTo","canStringifyThis","canStringifyThat","defaultCell","_getSection","_getNodes","defaultElement","isScrolledIntoView","eventBox","viewPort","idSelector","inlineEditor","getInlineEditor","_moveToSlot","slot","movingDate","getDefaultDate","_getDefaultSection","visibleTime","nowTime","showNowTime","findVisibleColumn","timeslot","_getMultisectionView","_getNextSection","nextIndex","defaultSlot","addMonthDate","nextMonthSlot","_alignTimeSlot","nextTimelineSlot","newPos","nextUnitsSlot","optionsCount","nextDaySlot","_moveDate","isBeforeLastHour","isStartDate","isAfterFirstHour","isInVisibleDayTime","oldStart","toNextDay","testEnd","nextWeekAgendaSlot","nextAgendaSlot","isDateVisible","nextDateColumn","current","tempSlot","extendSlot","extendUnitsSlot","extendTimelineSlot","extendMonthSlot","extendDaySlot","extendWeekAgendaSlot","extendGenericSlot","allowedDirections","moveDate","newDates","extendSlotDates","oldSlot","newSlot","dateDirection","scrollSlot","globalNode","_getGrid","_getNode","enabled","newRow","newCol","blurNode","editor","defaultPrevented","schedulerNode","_timeout","_minicalendars","isMinical","minicalendars","patchMinicalendar","focusMinical","minicalClick","rowIndex","cellIndex","td","renderMinical","cal","added","destroyMinical","_def_count","attachOnce","isSchedulerSelected","changeState","layer","layers","validId","_clearUpdateFlag","_cloneObj","_dataprocessors","_layers_zindex","initial_layer_zindex","isDefault","defaultLayer","showLayer","tlayer","toggleLayer","hideLayer","visible","getLayer","layer_name","native_event_object","noMenu","_evs_layer","_t_render_view_data","evs_layer","borderBox","borderBoxWidth","headerWidth","bodyWidth","footerWidth","bodyHeight","new_zIndex","filter_agenda","limit_view","_temp_limit_scope","om","od","nm","nd","isBlocked","date_end","resetDate","is_new_event","data_copy","native_object","_mark_now_timer","map_view","mapAdapter","eventHandlerIds","adapters","googleMap","openStreetMaps","mapbox","setupMapView","createAdapter","unmodifiedEvent","_eventLocationChanged","map_settings","resolve_event_location","_latLngUpdate","addEventWithLocation","updateEventMarker","newIdEvent","removeEventMarker","addEventMarker","onEventClick","coordinates","map_view_provider","currentAdapter","resolve_user_location","view_provider","map_initial_position","map_error_position","map_date_width","map_icon_width","map_description_width","add_map","map_date","map_time","map_text","map_start","dblclick_dhx_map_area","map_initial_zoom","map_zoom_after_resolve","map_infowindow_max_width","map_resolve_user_location","map_type","map_resolve_event_location","fill_map_tab","_selected_event_id","ariaButtonAttr","clearEventMarkers","map_end","mapContainer","adapter","elem_id","marginRight","marginTop","destroy","initialize","geolocation","getCurrentPosition","coords","_updateEventLocation","_event_resolve_delay","ret","minical","minicalDomEvents","minicalendar","mark_events","_synced_minicalendars","_prev","is_refresh","_render_calendar","unmarkCalendar","cont","tpos","_get_def_cont","$dom","dateAttribute","markCalendar","_last_date","conf","markedDates","_markCalendarCurrentDate","sync","_on_xle_handler","updateCalendar","_created","_locateCalendar","weekNum","dat","dayCell","_week_template","week_template","dummy_date","_mini_cal_arrows","previous","ts","temp2","temp3","temp4","temp5","temp6","temp7","temp8","padding","weekHeader","move_minicalendar_date","css_classnames","css_texts","diffs","calendars","arrow","dayHeaders","dayCells","inputs","selects","inp","new_date","_update_minical_select","isFulldayEvent","_attach_action","_round_minutes","linkCalendar","datediff","dateNew","month_end","monthheight","old_s","multiselect","_children","_mark_inputs","_ids","script_url","divLoading","multisource","mvc","update_timer","use_id","sanitize","_finish_ext_load","_get_id","model","cid","backbone","toJSON","changes","queue","add_from_queue","Backbone","Collection","last_event","dragger","dhtmlDragAndDropObject","stopDrag","on_drop","sourceHtmlObject","dhtmlObject","targetHtmlObject","targetHtml","action_data","event_data","view_options","_locate_cell_timeline","addDragLanding","_drag","_dragIn","shtmlObject","_dragOut","DragControl","addDrop","onDrop","sourceDhtmlx","getMaster","onDragIn","pdf","html_regexp","newline_regexp","clean_html","x_norm","colsWidth","x_norm_event","is_left","dhx_cal_header","y_norm","get_style","de_day","de_week","xml_end","xml_top","profile","xml_body_header","dhx_cal_date","xh","xml_month_scale","xml_month","yh","xhs","second_scale","top_width","top_col","xml_body","colors","week_starts","_month","text_color","zx","zdx","left_norm","zy","zdy","e_type","dets","week","dy_copy","toXML","original_date","original_mode","temp_date","to_pdf","objects","getPDFData","toPDF","toPDFRange","quick_info","show_quick_info","clickedElementPosition","fitQIInsideWindow","quickInfoPopup","popupRect","offsetBottom","getPositionInsideScheduler","_$quickInfoHandler","eventElement","showQuickInfo","hiding_function","hideQuickInfo","quick_info_title","quick_info_content","quick_info_date","_quick_info_box_id","_get_event_counter_part","_quick_info_box","_init_quick_info","_fill_quick_data","_show_quick_info","cssTimeToMs","milliseconds","forced","qi","_x_scroll","dataPos","ontransitionend","_quick_info_onscroll_handler","$testmode","_qi_button_click","main","mainContent","originalRecurringSetValue","original_left_buttons","original_right_buttons","txt_replace","txts","txtt","readonly_form","forbidden_buttons","button_arrays","forbidden_button","button_array","originalForm","readonlyForm","_lightbox_r","clearMilliseconds","isSeries","toUTCDate","old_add_event","groupExceptions","exceptions","original_start","_rec_temp","_rec_markers_pull","_rec_markers","_get_rec_marker","ch","_get_rec_markers","ev_id","_ignore_call","tev","_pid_changed","_is_modified_occurence","idTimestamp","nid","nev","sub","isEventFound","_start_date","showLightbox_rec","lightbox_recurring","pid","isVirtual","showSeries","title_confirm_recurring","get_visible_events_rec","repeat_date","old_update_event","toIcalString","getWeekdayOfMonth","dayOfWeek","dayOfMonth","dayNumber","non_render","maxCount","seriesExceptions","utcStart","parsedRRule","repeatedDates","adjustedDate","visibleCount","eventDuration","exception","_fix_daylight_saving_date","recurrings","sev","occurence","include_end_by","recurring_workdays","jsDaysToRRULEDays","RruleDayNumsToJs","formatDayNumber","repeat_monthly_date","repeat_monthly_weekday","nthDayOfMonth","repeat_yearly_month_date","repeat_yearly_month_weekday","getRecValue","WORKDAYS","CUSTOM","monthRepeat","yearRepeat","formatFunc","endRule","NEVER","fillInDefaults","dayNum","dayLabel","dateOfMonth","nthWeekDayOfMonth","dateOfYear","nthWeekDayOfYear","countInput","ondateInput","endOptionSelect","formatter","repeat_date_of_end","dispatchEvent","getFirstSectionOfType","rec","_get_node","_outer_html","loc","_init_set_value","_ds","weekly","monthly","yearly","_rec_init_done","rf","blocked","rruleset","topOption","rruleObj","untilDate","customFreq","actual_dates","timeControl","getTimeSection","recurrence","_start","recurring_legacy","getRecurringSection","occurrence_timestamp_in_utc","outerHTML","_get_form_node","_get_node_value","_get_node_numeric_value","_set_node_value","hash_value","str_date_format","date_str","register_els","inps","change_current_view","set_end_rule","_get_repeat_code","get_rcode","str_date","transpose_type","get_numeric_value","repeat_precise","start_exists","transpose_day_week","set_rcode","_set_repeat_code","MouseEvent","elements","_toggle_block","_get_button","_get_form","backgroundPosition","transponse_size","day_week","originalMonth","newMonth","cor","cor2","cday","transposeRecurring","recurringParts","addRecurring","recurringStepDays","weekDays","seriesInstance","currentCount","origMonth","origYear","correctOverflowInstances","recurring_overflow_instances","startHour","ted","data_attributes","all_events","_serialize_json_value","toICal","full_day_format","tooltipManager","tooltips","tooltipFor","targetEventId","s2d","d2s","select_event","wp","year_view","year_date","year_month","year_scale_date","year_tooltip","isYearMode","getCellDate","dblclick_dhx_year_grid","_year_render_event","_year_marked_cells","_hideToolTip","_tooltip","_showToolTip","_year_view_tooltip_handler","_init_year_tooltip","_mark_year_date","_unmark_year_date","_reset_year_scale","year_top","ssd","yearBox","year_x","datepicker","ignore_year","locateEvent","factory","extensions","_seed","_schedulerPlugins","_bundledExtensions","_extensionsManager","initConfig","_internal_id","$syncFactory","_initFromConfig","addCalendar","$dhx"],"mappings":";;;;;;;;;AAUA,MAAAA,KAPqB,OAAXC,SAAW,MACNA,SAEAC;ACNA,SAASC,GAAiBC,GACrC;AAAA,MAAIC,IAAa,CACbC,GAAAA,IAAAA,IACAC,IAAY,MACZC,IAAQ;AAEZ,WAASC,IAAAA;AACL,WAAOL,EAAUM,OAAOC,kBAAkBP,EAAUQ;AAAAA,EACvD;AAED,WAASC,EAAcC,GAAAA;AACnB,UAAMC,IAAUX,EAAUY,QAAQF,CAAAA;AAClC,WAAGC,IACQA,EAAQE,SAEZH;AAAAA,EACV;AA4BD,WAASI,EAAmBC,GACxB;AAAA,UAAA,EAAMX,OAA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AAY,EACjBuC,QAAQ1hE,GAAU6e,KAAK+kG,GAAQliD,QAAQkiD,EAAAA,EAAAA;AAGxC/jH,OAAOG,YAAYA,IACnBH,OAAOs/D,YAAYA,IAEft/D,OAAO0kH,SACV1kH,OAAO0kH,OAAO,KAGf1kH,OAAO0kH,KAAKvkH,YAAYA,IACxBH,OAAO0kH,KAAKplD,YAAYA;","x_google_ignoreList":[84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111]} \ No newline at end of file diff --git a/codebase/dhtmlxscheduler.js b/codebase/dhtmlxscheduler.js index 6dc2e08..461ea55 100644 --- a/codebase/dhtmlxscheduler.js +++ b/codebase/dhtmlxscheduler.js @@ -1,8 +1,16 @@ -(function(he,G){typeof exports=="object"&&typeof module<"u"?G(exports):typeof define=="function"&&define.amd?define(["exports"],G):G((he=typeof globalThis<"u"?globalThis:he||self).dhtmlxscheduler={})})(this,function(he){"use strict";const G=typeof window<"u"?window:global;function Mt(e){let i=[],t=!1,r=null,d=null;function n(){return e.config.drag_highlight&&e.markTimespan}function s(o){const l=e.getView(o);return l?l.layout:o}function _(o){const{event:l,layout:h,viewName:v,sectionId:u,eventNode:f}=o;(function(m,g){switch(g){case"month":m.style.top="",m.style.left="";break;case"timeline":m.style.left="",m.style.marginLeft="1px";break;default:m.style.top=""}})(f,h);const c={};let p={start_date:l.start_date,end_date:l.end_date,css:"dhx_scheduler_dnd_marker",html:f};return h!="timeline"&&h!="month"||(p={...p,end_date:e.date.add(l.start_date,1,"minute")}),u&&(c[v]=u,p.sections=c),p}function a(o){const{layout:l}=o;let h;switch(l){case"month":h=function(v){let u=[];const{event:f,layout:c,viewName:p,sectionId:m}=v,g=[];let y=new Date(f.start_date);for(;y.valueOf()String(b)),x=[];for(let b=0;b{i.push(e.markTimespan(v))})}e.attachEvent("onBeforeDrag",function(o,l,h){return n()&&(t=!0,d=e.getEvent(o),r=h.target.closest(`[${e.config.event_attribute}]`),s(e.getState().mode)=="units"&&e.config.cascade_event_display&&(e.unselect(o),r=h.target.closest(`[${e.config.event_attribute}]`))),!0}),e.attachEvent("onEventDrag",function(o,l,h){if(t&&n()){t=!1;const v=e.getState().mode,u=s(v),f=e.getActionData(h).section;d&&a({event:d,layout:u,viewName:v,sectionId:f,eventNode:r})}}),e.attachEvent("onDragEnd",function(o,l,h){for(let v=0;vl||n.end_date.getDate()!=o.getDate()?1440:e._get_zone_minutes(n.end_date),m=u[f],g=u[f+1];if(mc&&!(a=typeof _=="function"&&_(n,c,p,m,g)))break}}return!a},e.checkLimitViolation=function(n){if(!n||!e.config.check_limits)return!0;var s=e,_=s.config,a=[];if(n.rec_type&&n._end_date||n.rrule){const u=n._end_date||n.end_date;return!_.limit_start||!_.limit_end||u.valueOf()>=_.limit_start.valueOf()&&n.start_date.valueOf()<=_.limit_end.valueOf()}a=[n];for(var o=!0,l=0;l=_.limit_start.valueOf()&&v.end_date.valueOf()<=_.limit_end.valueOf())&&(h=!e.checkInMarkedTimespan(v,i,function(u,f,c,p,m){var g=!0;return f<=m&&f>=p&&((m==1440||c<=m)&&(g=!1),u._timed&&s._drag_id&&s._drag_mode=="new-size"?(u.start_date.setHours(0),u.start_date.setMinutes(m)):g=!1),(c>=p&&c<=m||fm)&&(u._timed&&s._drag_id&&s._drag_mode=="new-size"?(u.end_date.setHours(0),u.end_date.setMinutes(p)):g=!1),g})),h||(h=s.checkEvent("onLimitViolation")?s.callEvent("onLimitViolation",[v.id,v]):h),o=o&&h}return o||(s._drag_id=null,s._drag_mode=null),o},e._get_blocked_zones=function(n,s,_,a,o){var l=[];if(n&&n[s])for(var h=n[s],v=this._get_relevant_blocked_zones(_,a,h,o),u=0;uthis._min_date&&_.getHours()>=a.first_hour&&_.getHours()1?(v.size&&v.options.length&&(n=(v.position+n)/v.options.length*v.size),l=n,h=n+u):h=(l=0)+u;for(var f=[],c=l;cn.start_date||n.days!==void 0&&n.zones)&&!n.type)return s;n.zones=="fullday"&&(n.zones=[0,1440]),n.zones&&n.invert_zones&&(n.zones=e.invertZones(n.zones)),n.id=e.uid(),n.css=n.css||"",n.type=n.type||t;var h=n.sections;if(h){for(var v in h)if(h.hasOwnProperty(v)){var u=h[v];for(u instanceof Array||(u=[u]),o=0;og?e._get_zone_minutes(p):0,k=m>y||m.getDate()!=g.getDate()?1440:e._get_zone_minutes(m);x.zones=[b,k],s.push(x),g=y,y=e.date.add(y,1,"day")}else c.days instanceof Date&&(c.days=e.date.date_part(c.days).valueOf()),c.zones=n.zones.slice(),s.push(c)}return s},e._get_dates_by_index=function(n,s,_){var a=[];s=e.date.date_part(new Date(s||e._min_date)),_=new Date(_||e._max_date);for(var o=s.getDay(),l=n-o>=0?n-o:7-s.getDay()+n,h=e.date.add(s,l,"day");h<_;h=e.date.add(h,1,"week"))a.push(h);return a},e._get_css_classes_by_config=function(n){var s=[];return n.type==i&&(s.push(i),n.css&&s.push(i+"_reset")),s.push("dhx_marked_timespan",n.css),s.join(" ")},e._get_block_by_config=function(n){var s=document.createElement("div");return n.html&&(typeof n.html=="string"?s.innerHTML=n.html:s.appendChild(n.html)),s},e._render_marked_timespan=function(n,s,_){var a=[],o=e.config,l=this._min_date,h=this._max_date,v=!1;if(!o.display_marked_timespans)return a;if(!_&&_!==0){if(n.days<7)_=n.days;else{var u=new Date(n.days);if(v=+u,!(+h>+u&&+l<=+u))return a;_=u.getDay()}var f=l.getDay();f>_?_=7-(f-_):_-=f}var c=n.zones,p=e._get_css_classes_by_config(n);if(e._table_view&&e._mode=="month"){var m=[],g=[];if(s)m.push(s),g.push(_);else{g=v?[v]:e._get_dates_by_index(_);for(var y=0;y1?D=D*(w.size||w.options.length)+S:(D=S,w.size&&D>w.position+w.size&&(D=0))}for(s=s||e.locate_holder(D),y=0;y-1||(s.push.apply(s,e._on_scale_add_marker(h,a)),a=e.date.add(a,1,"day"))}}return s},e.markTimespan=function(n){if(!this._els)throw new Error("`scheduler.markTimespan` can't be used before scheduler initialization. Place `scheduler.markTimespan` call after `scheduler.init`.");var s=!1;this._els.dhx_cal_data||(e.get_elements(),s=!0);var _=e._marked_timespans_ids,a=e._marked_timespans_types,o=e._marked_timespans;e.deleteMarkedTimespan(),e.addMarkedTimespan(n);var l=e._mark_timespans();return s&&(e._els=[]),e._marked_timespans_ids=_,e._marked_timespans_types=a,e._marked_timespans=o,l},e.unmarkTimespan=function(n){if(n)for(var s=0;sl&&u<=l||u=o)_[a]=Math.min(o,u),_[a+1]=Math.max(l,f),a-=2;else{if(!h)continue;var c=o>u?0:2;_.splice(a+c,0,u,f)}s.splice(v--,2);break}return _},e._subtract_timespan_zones=function(n,s){for(var _=n.slice(),a=0;a<_.length;a+=2)for(var o=_[a],l=_[a+1],h=0;ho&&v=v&&l<=u&&_.splice(a,2),ou&&_.splice(f?a+2:a,f?0:2,u,l),a-=2;break}}return _},e.invertZones=function(n){return e._subtract_timespan_zones([0,1440],n.slice())},e._delete_marked_timespan_by_id=function(n){var s=e._marked_timespans_ids[n];if(s){for(var _=0;_1){var p=Math.round((s-e._min_date)/864e5),m=u.size||f.length;s=e.date.add(e._min_date,Math.floor(p/m),"day"),s=e.date.date_part(s)}else s=e.date.date_part(new Date(this._date));if(_=s.getDay(),a=s.valueOf(),l[o]&&l[o][c.key]){var g=l[o][c.key],y=e._get_types_to_render(g[_],g[a]);h.push.apply(h,e._get_configs_to_render(y))}}var x=l.global;if(e.config.overwrite_marked_timespans){var b=x[a]||x[_];h.push.apply(h,e._get_configs_to_render(b))}else x[a]&&h.push.apply(h,e._get_configs_to_render(x[a])),x[_]&&h.push.apply(h,e._get_configs_to_render(x[_]));for(var k=0;k{c&&(v.setModeDate.date=c),p&&(v.setModeDate.mode=p)};var f={render:(c,p)=>{v.needRender=!0,u(c,p)},setCurrentView:(c,p)=>{v.needRender=!0,u(c,p)},updateView:(c,p)=>{v.needUpdateView=!0,u(c,p)},render_data:()=>v.needRender=!0,render_view_data:c=>{c&&c.length?c.forEach(p=>v.repaintEvents[p.id]=!0):v.needRender=!0}};if(n.call(this,f),t=!0,this.callEvent("onBeforeBatchUpdate",[]),_(a),this.callEvent("onAfterBatchUpdate",[]),s.call(this),t=!1,!o)if(v.needRender)e.render(v.setModeDate.date,v.setModeDate.mode);else if(v.needUpdateView)e.updateView(v.setModeDate.date,v.setModeDate.mode);else for(const c in v.repaintEvents)e.updateEvent(c);h&&(this._dp.setUpdateMode(l),this._dp.sendData())}}function At(e){(function(i){i.attachEvent("onEventDeleted",function(t,r){let d=i.copy(r);i.config.undo_deleted&&!i.getState().new_event&&i.message({text:`
+(function(he,G){typeof exports=="object"&&typeof module<"u"?G(exports):typeof define=="function"&&define.amd?define(["exports"],G):G((he=typeof globalThis<"u"?globalThis:he||self).dhtmlxscheduler={})})(this,function(he){"use strict";/** @license + +dhtmlxScheduler v.7.1.3 Standard + +To use dhtmlxScheduler in non-GPL projects (and get Pro version of the product), please obtain Commercial/Enterprise or Ultimate license on our site https://dhtmlx.com/docs/products/dhtmlxScheduler/#licensing or contact us at sales@dhtmlx.com + +(c) XB Software Ltd. + +*/const G=typeof window<"u"?window:global;function Mt(e){let i=[],t=!1,r=null,d=null;function n(){return e.config.drag_highlight&&e.markTimespan}function s(o){const l=e.getView(o);return l?l.layout:o}function _(o){const{event:l,layout:h,viewName:m,sectionId:v,eventNode:u}=o;(function(p,g){switch(g){case"month":p.style.top="",p.style.left="";break;case"timeline":p.style.left="",p.style.marginLeft="1px";break;default:p.style.top=""}})(u,h);const c={};let f={start_date:l.start_date,end_date:l.end_date,css:"dhx_scheduler_dnd_marker",html:u};return h!="timeline"&&h!="month"||(f={...f,end_date:e.date.add(l.start_date,1,"minute")}),v&&(c[m]=v,f.sections=c),f}function a(o){const{layout:l}=o;let h;switch(l){case"month":h=function(m){let v=[];const{event:u,layout:c,viewName:f,sectionId:p}=m,g=[];let y=new Date(u.start_date);for(;y.valueOf()String(b)),x=[];for(let b=0;b{i.push(e.markTimespan(m))})}e.attachEvent("onBeforeDrag",function(o,l,h){return n()&&(t=!0,d=e.getEvent(o),r=h.target.closest(`[${e.config.event_attribute}]`),s(e.getState().mode)=="units"&&e.config.cascade_event_display&&(e.unselect(o),r=h.target.closest(`[${e.config.event_attribute}]`))),!0}),e.attachEvent("onEventDrag",function(o,l,h){if(t&&n()){t=!1;const m=e.getState().mode,v=s(m),u=e.getActionData(h).section;d&&a({event:d,layout:v,viewName:m,sectionId:u,eventNode:r})}}),e.attachEvent("onDragEnd",function(o,l,h){for(let m=0;ml||n.end_date.getDate()!=o.getDate()?1440:e._get_zone_minutes(n.end_date),p=v[u],g=v[u+1];if(pc&&!(a=typeof _=="function"&&_(n,c,f,p,g)))break}}return!a},e.checkLimitViolation=function(n){if(!n||!e.config.check_limits)return!0;var s=e,_=s.config,a=[];if(n.rec_type&&n._end_date||n.rrule){const v=n._end_date||n.end_date;return!_.limit_start||!_.limit_end||v.valueOf()>=_.limit_start.valueOf()&&n.start_date.valueOf()<=_.limit_end.valueOf()}a=[n];for(var o=!0,l=0;l=_.limit_start.valueOf()&&m.end_date.valueOf()<=_.limit_end.valueOf())&&(h=!e.checkInMarkedTimespan(m,i,function(v,u,c,f,p){var g=!0;return u<=p&&u>=f&&((p==1440||c<=p)&&(g=!1),v._timed&&s._drag_id&&s._drag_mode=="new-size"?(v.start_date.setHours(0),v.start_date.setMinutes(p)):g=!1),(c>=f&&c<=p||up)&&(v._timed&&s._drag_id&&s._drag_mode=="new-size"?(v.end_date.setHours(0),v.end_date.setMinutes(f)):g=!1),g})),h||(h=s.checkEvent("onLimitViolation")?s.callEvent("onLimitViolation",[m.id,m]):h),o=o&&h}return o||(s._drag_id=null,s._drag_mode=null),o},e._get_blocked_zones=function(n,s,_,a,o){var l=[];if(n&&n[s])for(var h=n[s],m=this._get_relevant_blocked_zones(_,a,h,o),v=0;vthis._min_date&&_.getHours()>=a.first_hour&&_.getHours()1?(m.size&&m.options.length&&(n=(m.position+n)/m.options.length*m.size),l=n,h=n+v):h=(l=0)+v;for(var u=[],c=l;cn.start_date||n.days!==void 0&&n.zones)&&!n.type)return s;n.zones=="fullday"&&(n.zones=[0,1440]),n.zones&&n.invert_zones&&(n.zones=e.invertZones(n.zones)),n.id=e.uid(),n.css=n.css||"",n.type=n.type||t;var h=n.sections;if(h){for(var m in h)if(h.hasOwnProperty(m)){var v=h[m];for(v instanceof Array||(v=[v]),o=0;og?e._get_zone_minutes(f):0,k=p>y||p.getDate()!=g.getDate()?1440:e._get_zone_minutes(p);x.zones=[b,k],s.push(x),g=y,y=e.date.add(y,1,"day")}else c.days instanceof Date&&(c.days=e.date.date_part(c.days).valueOf()),c.zones=n.zones.slice(),s.push(c)}return s},e._get_dates_by_index=function(n,s,_){var a=[];s=e.date.date_part(new Date(s||e._min_date)),_=new Date(_||e._max_date);for(var o=s.getDay(),l=n-o>=0?n-o:7-s.getDay()+n,h=e.date.add(s,l,"day");h<_;h=e.date.add(h,1,"week"))a.push(h);return a},e._get_css_classes_by_config=function(n){var s=[];return n.type==i&&(s.push(i),n.css&&s.push(i+"_reset")),s.push("dhx_marked_timespan",n.css),s.join(" ")},e._get_block_by_config=function(n){var s=document.createElement("div");return n.html&&(typeof n.html=="string"?s.innerHTML=n.html:s.appendChild(n.html)),s},e._render_marked_timespan=function(n,s,_){var a=[],o=e.config,l=this._min_date,h=this._max_date,m=!1;if(!o.display_marked_timespans)return a;if(!_&&_!==0){if(n.days<7)_=n.days;else{var v=new Date(n.days);if(m=+v,!(+h>+v&&+l<=+v))return a;_=v.getDay()}var u=l.getDay();u>_?_=7-(u-_):_-=u}var c=n.zones,f=e._get_css_classes_by_config(n);if(e._table_view&&e._mode=="month"){var p=[],g=[];if(s)p.push(s),g.push(_);else{g=m?[m]:e._get_dates_by_index(_);for(var y=0;y1?D=D*(E.size||E.options.length)+S:(D=S,E.size&&D>E.position+E.size&&(D=0))}for(s=s||e.locate_holder(D),y=0;y-1||(s.push.apply(s,e._on_scale_add_marker(h,a)),a=e.date.add(a,1,"day"))}}return s},e.markTimespan=function(n){if(!this._els)throw new Error("`scheduler.markTimespan` can't be used before scheduler initialization. Place `scheduler.markTimespan` call after `scheduler.init`.");var s=!1;this._els.dhx_cal_data||(e.get_elements(),s=!0);var _=e._marked_timespans_ids,a=e._marked_timespans_types,o=e._marked_timespans;e.deleteMarkedTimespan(),e.addMarkedTimespan(n);var l=e._mark_timespans();return s&&(e._els=[]),e._marked_timespans_ids=_,e._marked_timespans_types=a,e._marked_timespans=o,l},e.unmarkTimespan=function(n){if(n)for(var s=0;sl&&v<=l||v=o)_[a]=Math.min(o,v),_[a+1]=Math.max(l,u),a-=2;else{if(!h)continue;var c=o>v?0:2;_.splice(a+c,0,v,u)}s.splice(m--,2);break}return _},e._subtract_timespan_zones=function(n,s){for(var _=n.slice(),a=0;a<_.length;a+=2)for(var o=_[a],l=_[a+1],h=0;ho&&m=m&&l<=v&&_.splice(a,2),ov&&_.splice(u?a+2:a,u?0:2,v,l),a-=2;break}}return _},e.invertZones=function(n){return e._subtract_timespan_zones([0,1440],n.slice())},e._delete_marked_timespan_by_id=function(n){var s=e._marked_timespans_ids[n];if(s){for(var _=0;_1){var f=Math.round((s-e._min_date)/864e5),p=v.size||u.length;s=e.date.add(e._min_date,Math.floor(f/p),"day"),s=e.date.date_part(s)}else s=e.date.date_part(new Date(this._date));if(_=s.getDay(),a=s.valueOf(),l[o]&&l[o][c.key]){var g=l[o][c.key],y=e._get_types_to_render(g[_],g[a]);h.push.apply(h,e._get_configs_to_render(y))}}var x=l.global;if(e.config.overwrite_marked_timespans){var b=x[a]||x[_];h.push.apply(h,e._get_configs_to_render(b))}else x[a]&&h.push.apply(h,e._get_configs_to_render(x[a])),x[_]&&h.push.apply(h,e._get_configs_to_render(x[_]));for(var k=0;k{c&&(m.setModeDate.date=c),f&&(m.setModeDate.mode=f)};var u={render:(c,f)=>{m.needRender=!0,v(c,f)},setCurrentView:(c,f)=>{m.needRender=!0,v(c,f)},updateView:(c,f)=>{m.needUpdateView=!0,v(c,f)},render_data:()=>m.needRender=!0,render_view_data:c=>{c&&c.length?c.forEach(f=>m.repaintEvents[f.id]=!0):m.needRender=!0}};if(n.call(this,u),t=!0,this.callEvent("onBeforeBatchUpdate",[]),_(a),this.callEvent("onAfterBatchUpdate",[]),s.call(this),t=!1,!o)if(m.needRender)e.render(m.setModeDate.date,m.setModeDate.mode);else if(m.needUpdateView)e.updateView(m.setModeDate.date,m.setModeDate.mode);else for(const c in m.repaintEvents)e.updateEvent(c);h&&(this._dp.setUpdateMode(l),this._dp.sendData())}}function At(e){(function(i){i.attachEvent("onEventDeleted",function(t,r){let d=i.copy(r);i.config.undo_deleted&&!i.getState().new_event&&i.message({text:`
Event deleted -
`,expire:1e4,type:"popup_after_delete",callback:function(n){n.target.closest(`[data-deleted-event-id="${r.id}"]`)&&(i.addEvent(d),i.render())}})})})(e),Mt(e),Nt(e),function(i){i.batchUpdate=Tt(i)}(e)}var Ct=Date.now();function Te(e){return!(!e||typeof e!="object")&&!!(e.getFullYear&&e.getMonth&&e.getDate)}const ee={uid:function(){return Ct++},mixin:function(e,i,t){for(var r in i)(e[r]===void 0||t)&&(e[r]=i[r]);return e},copy:function e(i){var t,r,d;if(i&&typeof i=="object")switch(!0){case Te(i):r=new Date(i);break;case(d=i,Array.isArray?Array.isArray(d):d&&d.length!==void 0&&d.pop&&d.push):for(r=new Array(i.length),t=0;t=0){if(!t)return r;var s=n===0||!(d.charAt(n-1)||"").trim(),_=n+i.length>=d.length||!d.charAt(n+i.length).trim();if(s&&_)return r}}r=r.parentNode}return null}function qt(e){var i=!1,t=!1;if(window.getComputedStyle){var r=window.getComputedStyle(e,null);i=r.display,t=r.visibility}else e.currentStyle&&(i=e.currentStyle.display,t=e.currentStyle.visibility);var d=!1,n=Ze({target:e},"dhx_form_repeat",!1);return n&&(d=n.style.height=="0px"),d=d||!e.offsetHeight,i!="none"&&t!="hidden"&&!d}function jt(e){return!isNaN(e.getAttribute("tabindex"))&&1*e.getAttribute("tabindex")>=0}function It(e){return!{a:!0,area:!0}[e.nodeName.loLowerCase()]||!!e.getAttribute("href")}function Pt(e){return!{input:!0,select:!0,textarea:!0,button:!0,object:!0}[e.nodeName.toLowerCase()]||!e.hasAttribute("disabled")}function Qe(){return document.head.createShadowRoot||document.head.attachShadow}function et(e){if(!e||!Qe())return document.body;for(;e.parentNode&&(e=e.parentNode);)if(e instanceof ShadowRoot)return e.host;return document.body}const se={getAbsoluteLeft:function(e){return this.getOffset(e).left},getAbsoluteTop:function(e){return this.getOffset(e).top},getOffsetSum:function(e){for(var i=0,t=0;e;)i+=parseInt(e.offsetTop),t+=parseInt(e.offsetLeft),e=e.offsetParent;return{top:i,left:t}},getOffsetRect:function(e){var i=e.getBoundingClientRect(),t=0,r=0;if(/Mobi/.test(navigator.userAgent)){var d=document.createElement("div");d.style.position="absolute",d.style.left="0px",d.style.top="0px",d.style.width="1px",d.style.height="1px",document.body.appendChild(d);var n=d.getBoundingClientRect();t=i.top-n.top,r=i.left-n.left,d.parentNode.removeChild(d)}else{var s=document.body,_=document.documentElement,a=window.pageYOffset||_.scrollTop||s.scrollTop,o=window.pageXOffset||_.scrollLeft||s.scrollLeft,l=_.clientTop||s.clientTop||0,h=_.clientLeft||s.clientLeft||0;t=i.top+a-l,r=i.left+o-h}return{top:Math.round(t),left:Math.round(r)}},getOffset:function(e){return e.getBoundingClientRect?this.getOffsetRect(e):this.getOffsetSum(e)},closest:function(e,i){return e&&i?Ce(e,i):null},insertAfter:function(e,i){i.nextSibling?i.parentNode.insertBefore(e,i.nextSibling):i.parentNode.appendChild(e)},remove:function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},isChildOf:function(e,i){return i.contains(e)},getFocusableNodes:function(e){for(var i=e.querySelectorAll(["a[href]","area[href]","input","select","textarea","button","iframe","object","embed","[tabindex]","[contenteditable]"].join(", ")),t=Array.prototype.slice.call(i,0),r=0;r=0||navigator.userAgent.indexOf("Trident")>=0),isOpera:de&&navigator.userAgent.indexOf("Opera")>=0,isChrome:de&&navigator.userAgent.indexOf("Chrome")>=0,isKHTML:de&&(navigator.userAgent.indexOf("Safari")>=0||navigator.userAgent.indexOf("Konqueror")>=0),isFF:de&&navigator.userAgent.indexOf("Firefox")>=0,isIPad:de&&navigator.userAgent.search(/iPad/gi)>=0,isEdge:de&&navigator.userAgent.indexOf("Edge")!=-1,isNode:!de||typeof navigator>"u"};function Oe(e){if(typeof e=="string"||typeof e=="number")return e;var i="";for(var t in e){var r="";e.hasOwnProperty(t)&&(r=t+"="+(r=typeof e[t]=="string"?encodeURIComponent(e[t]):typeof e[t]=="number"?e[t]:encodeURIComponent(JSON.stringify(e[t]))),i.length&&(r="&"+r),i+=r)}return i}function Ut(e){var i=function(n,s){for(var _="var temp=date.match(/[a-zA-Z]+|[0-9]+/g);",a=n.match(/%[a-zA-Z]/g),o=0;o50?1900:2000);";break;case"%g":case"%G":case"%h":case"%H":_+="set[3]=temp["+o+"]||0;";break;case"%i":_+="set[4]=temp["+o+"]||0;";break;case"%Y":_+="set[0]=temp["+o+"]||0;";break;case"%a":case"%A":_+="set[3]=set[3]%12+((temp["+o+"]||'').toLowerCase()=='am'?0:12);";break;case"%s":_+="set[5]=temp["+o+"]||0;";break;case"%M":_+="set[1]=this.locale.date.month_short_hash[temp["+o+"]]||0;";break;case"%F":_+="set[1]=this.locale.date.month_full_hash[temp["+o+"]]||0;"}var l="set[0],set[1],set[2],set[3],set[4],set[5]";return s&&(l=" Date.UTC("+l+")"),new Function("date","var set=[0,0,1,0,0,0]; "+_+" return new Date("+l+");")},t=function(n,s){const _=n.match(/%[a-zA-Z]/g);return function(a){for(var o=[0,0,1,0,0,0],l=a.match(/[a-zA-Z]+|[0-9]+/g),h=0;h<_.length;h++)switch(_[h]){case"%j":case"%d":o[2]=l[h]||1;break;case"%n":case"%m":o[1]=(l[h]||1)-1;break;case"%y":o[0]=1*l[h]+(l[h]>50?1900:2e3);break;case"%g":case"%G":case"%h":case"%H":o[3]=l[h]||0;break;case"%i":o[4]=l[h]||0;break;case"%Y":o[0]=l[h]||0;break;case"%a":case"%A":o[3]=o[3]%12+((l[h]||"").toLowerCase()=="am"?0:12);break;case"%s":o[5]=l[h]||0;break;case"%M":o[1]=e.locale.date.month_short_hash[l[h]]||0;break;case"%F":o[1]=e.locale.date.month_full_hash[l[h]]||0}return s?new Date(Date.UTC(o[0],o[1],o[2],o[3],o[4],o[5])):new Date(o[0],o[1],o[2],o[3],o[4],o[5])}};let r;function d(){var n=!1;return e.config.csp==="auto"?(r===void 0&&(r=function(){try{new Function("cspEnabled = false;"),r=!1}catch{r=!0}return r}()),n=r):n=e.config.csp,n}e.date={init:function(){for(var n=e.locale.date.month_short,s=e.locale.date.month_short_hash={},_=0;_0){var a=(+_-+n)%864e5;if(a&&n.getTimezoneOffset()==_.getTimezoneOffset()){var o=a/36e5;_.setTime(_.getTime()+60*(24-o)*60*1e3)}}return s>=0&&!n.getHours()&&_.getHours()&&(_.getDate()11?"pm":"am":o.getHours()>11?"pm":"am";case"%A":return a?o.getUTCHours()>11?"PM":"AM":o.getHours()>11?"PM":"AM";case"%s":return a?e.date.to_fixed(o.getUTCSeconds()):e.date.to_fixed(o.getSeconds());case"%W":return a?e.date.to_fixed(e.date.getUTCISOWeek(o)):e.date.to_fixed(e.date.getISOWeek(o));default:return l}})}}(n,s):(n=n.replace(/%[a-zA-Z]/g,function(_){switch(_){case"%d":return'"+this.date.to_fixed(date.getDate())+"';case"%m":return'"+this.date.to_fixed((date.getMonth()+1))+"';case"%j":return'"+date.getDate()+"';case"%n":return'"+(date.getMonth()+1)+"';case"%y":return'"+this.date.to_fixed(date.getFullYear()%100)+"';case"%Y":return'"+date.getFullYear()+"';case"%D":return'"+this.locale.date.day_short[date.getDay()]+"';case"%l":return'"+this.locale.date.day_full[date.getDay()]+"';case"%M":return'"+this.locale.date.month_short[date.getMonth()]+"';case"%F":return'"+this.locale.date.month_full[date.getMonth()]+"';case"%h":return'"+this.date.to_fixed((date.getHours()+11)%12+1)+"';case"%g":return'"+((date.getHours()+11)%12+1)+"';case"%G":return'"+date.getHours()+"';case"%H":return'"+this.date.to_fixed(date.getHours())+"';case"%i":return'"+this.date.to_fixed(date.getMinutes())+"';case"%a":return'"+(date.getHours()>11?"pm":"am")+"';case"%A":return'"+(date.getHours()>11?"PM":"AM")+"';case"%s":return'"+this.date.to_fixed(date.getSeconds())+"';case"%W":return'"+this.date.to_fixed(this.date.getISOWeek(date))+"';default:return _}}),s&&(n=n.replace(/date\.get/g,"date.getUTC")),new Function("date",'return "'+n+'";').bind(e))},str_to_date:function(n,s,_){var a=d()?t:i,o=a(n,s),l=/^[0-9]{4}(\-|\/)[0-9]{2}(\-|\/)[0-9]{2} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/,h=/^[0-9]{2}\/[0-9]{2}\/[0-9]{4} ?(([0-9]{1,2}:[0-9]{2})(:[0-9]{1,2})?)?$/,v=/^[0-9]{2}\-[0-9]{2}\-[0-9]{4} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/,u=/^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/,f=a("%Y-%m-%d %H:%i:%s",s),c=a("%m/%d/%Y %H:%i:%s",s),p=a("%d-%m-%Y %H:%i:%s",s);return function(m){if(!_&&!e.config.parse_exact_format){if(m&&m.getISOWeek)return new Date(m);if(typeof m=="number")return new Date(m);if(g=m,l.test(String(g)))return f(m);if(function(y){return h.test(String(y))}(m))return c(m);if(function(y){return v.test(String(y))}(m))return p(m);if(function(y){return u.test(y)}(m))return new Date(m)}var g;return o.call(e,m)}},getISOWeek:function(n){if(!n)return!1;var s=(n=this.date_part(new Date(n))).getDay();s===0&&(s=7);var _=new Date(n.valueOf());_.setDate(n.getDate()+(4-s));var a=_.getFullYear(),o=Math.round((_.getTime()-new Date(a,0,1).getTime())/864e5);return 1+Math.floor(o/7)},getUTCISOWeek:function(n){return this.getISOWeek(this.convert_to_utc(n))},convert_to_utc:function(n){return new Date(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds())}}}function tt(e){return(function(){var i={};for(var t in this._events){var r=this._events[t];r.id.toString().indexOf("#")==-1&&(i[r.id]=r)}return i}).bind(e)}function Vt(e){e._loaded={},e._load=function(t,r){if(t=t||this._load_url){var d;if(t+=(t.indexOf("?")==-1?"?":"&")+"timeshift="+new Date().getTimezoneOffset(),this.config.prevent_cache&&(t+="&uid="+this.uid()),r=r||this._date,this._load_mode){var n=this.templates.load_format;for(r=this.date[this._load_mode+"_start"](new Date(r.valueOf()));r>this._min_date;)r=this.date.add(r,-1,this._load_mode);d=r;for(var s=!0;dr&&this._loaded[n(_)]);if(d<=r)return!1;for(e.ajax.get(t+"&from="+n(r)+"&to="+n(d),a);r=400)&&(this.callEvent("onLoadError",[t.xmlDoc]),r=[]),this._process_loading(r),this.callEvent("onXLE",[]),this.callEvent("onParse",[])},e._process_loading=function(t){this._loading=!0,this._not_render=!0;for(var r=0;r1)&&(this.xy.scroll_width=0,this._mobile=!0),this.config.touch){var i=!0;try{document.createEvent("TouchEvent")}catch{i=!1}i?this._touch_events(["touchmove","touchstart","touchend"],function(t){return t.touches&&t.touches.length>1?null:t.touches[0]?{target:t.target,pageX:t.touches[0].pageX,pageY:t.touches[0].pageY,clientX:t.touches[0].clientX,clientY:t.touches[0].clientY}:t},function(){return!1}):window.PointerEvent||window.navigator.pointerEnabled?this._touch_events(["pointermove","pointerdown","pointerup"],function(t){return t.pointerType=="mouse"?null:t},function(t){return!t||t.pointerType=="mouse"}):window.navigator.msPointerEnabled&&this._touch_events(["MSPointerMove","MSPointerDown","MSPointerUp"],function(t){return t.pointerType==t.MSPOINTER_TYPE_MOUSE?null:t},function(t){return!t||t.pointerType==t.MSPOINTER_TYPE_MOUSE})}},e._touch_events=function(i,t,r){var d,n,s,_,a,o,l=0;function h(u,f,c){e.event(u,f,function(p){return!!e._is_lightbox_open()||(r(p)?void 0:c(p))},{passive:!1})}function v(u){r(u)||(e._hide_global_tip(),_&&(e._on_mouse_up(t(u)),e._temp_touch_block=!1),e._drag_id=null,e._drag_mode=null,e._drag_pos=null,e._pointerDragId=null,clearTimeout(s),_=o=!1,a=!0)}h(document.body,i[0],function(u){if(!r(u)){var f=t(u);if(f){if(_)return function(c){if(!r(c)){var p=e.getState().drag_mode,m=!!e.matrix&&e.matrix[e._mode],g=e.render_view_data;p=="create"&&m&&(e.render_view_data=function(){for(var y=e.getState().drag_id,x=e.getEvent(y),b=m.y_property,k=e.getEvents(x.start_date,x.end_date),E=0;E5||Math.abs(d.pageY-n.pageY)>5)&&(a=!0,clearTimeout(s)):a=!0)}}}),h(this._els.dhx_cal_data[0],"touchcancel",v),h(this._els.dhx_cal_data[0],"contextmenu",function(u){if(!r(u))return o?(u&&u.preventDefault&&u.preventDefault(),u.cancelBubble=!0,!1):void 0}),h(this._obj,i[1],function(u){var f;if(document&&document.body&&document.body.classList.add("dhx_cal_touch_active"),!r(u))if(e._pointerDragId=u.pointerId,_=a=!1,o=!0,f=n=t(u)){var c=new Date;if(!a&&!_&&c-l<250)return e._click.dhx_cal_data(f),window.setTimeout(function(){e.$destroyed||e._on_dbl_click(f)},50),u.preventDefault&&u.preventDefault(),u.cancelBubble=!0,e._block_next_stop=!0,!1;if(l=c,!a&&!_&&e.config.touch_drag){var p=e._locate_event(document.activeElement),m=e._locate_event(f.target),g=d?e._locate_event(d.target):null;if(p&&m&&p==m&&p!=g)return u.preventDefault&&u.preventDefault(),u.cancelBubble=!0,e._ignore_next_click=!1,e._click.dhx_cal_data(f),d=f,!1;s=setTimeout(function(){if(!e.$destroyed){_=!0;var y=d.target,x=e._getClassName(y);y&&x.indexOf("dhx_body")!=-1&&(y=y.previousSibling),e._on_mouse_down(d,y),e._drag_mode&&e._drag_mode!="create"&&e.for_rendered(e._drag_id,function(b,k){b.style.display="none",e._rendered.splice(k,1)}),e.config.touch_tip&&e._show_global_tip(),e.updateEvent(e._drag_id)}},e.config.touch_drag),d=f}}else a=!0}),h(this._els.dhx_cal_data[0],i[2],function(u){if(document&&document.body&&document.body.classList.remove("dhx_cal_touch_active"),!r(u))return e.config.touch_swipe_dates&&!_&&function(f,c,p,m){if(!f||!c)return!1;for(var g=f.target;g&&g!=e._obj;)g=g.parentNode;if(g!=e._obj||e.matrix&&e.matrix[e.getState().mode]&&e.matrix[e.getState().mode].scrollable)return!1;var y=Math.abs(f.pageY-c.pageY),x=Math.abs(f.pageX-c.pageX);return yp&&(!y||x/y>3)&&(f.pageX>c.pageX?e._click.dhx_cal_next_button():e._click.dhx_cal_prev_button(),!0)}(d,n,200,100)&&(e._block_next_stop=!0),_&&(e._ignore_next_click=!0,setTimeout(function(){e._ignore_next_click=!1},100)),v(u),e._block_next_stop?(e._block_next_stop=!1,u.preventDefault&&u.preventDefault(),u.cancelBubble=!0,!1):void 0}),e.event(document.body,i[2],v)},e._show_global_tip=function(){e._hide_global_tip();var i=e._global_tip=document.createElement("div");i.className="dhx_global_tip",e._update_global_tip(1),document.body.appendChild(i)},e._update_global_tip=function(i){var t=e._global_tip;if(t){var r="";if(e._drag_id&&!i){var d=e.getEvent(e._drag_id);d&&(r="
"+(d._timed?e.templates.event_header(d.start_date,d.end_date,d):e.templates.day_date(d.start_date,d.end_date,d))+"
")}e._drag_mode=="create"||e._drag_mode=="new-size"?t.innerHTML=(e.locale.labels.drag_to_create||"Drag to create")+r:t.innerHTML=(e.locale.labels.drag_to_move||"Drag to move")+r}},e._hide_global_tip=function(){var i=e._global_tip;i&&i.parentNode&&(i.parentNode.removeChild(i),e._global_tip=0)}}function Bt(e){var i,t;function r(){if(e._is_material_skin())return!0;if(t!==void 0)return t;var _=document.createElement("div");_.style.position="absolute",_.style.left="-9999px",_.style.top="-9999px",_.innerHTML="
",document.body.appendChild(_);var a=window.getComputedStyle(_.querySelector(".dhx_body")).getPropertyValue("box-sizing");document.body.removeChild(_),(t=a==="border-box")||setTimeout(function(){t=void 0},1e3)}function d(){if(!e._is_material_skin()&&!e._border_box_events()){var _=t;t=void 0,i=void 0,_!==r()&&e.$container&&e.getState().mode&&e.setCurrentView()}}function n(_){var a=_.getMinutes();return a=a<10?"0"+a:a,""+_.getHours()+" "+a+""}e._addThemeClass=function(){document.documentElement.setAttribute("data-scheduler-theme",e.skin)},e._skin_settings={fix_tab_position:[1,0],use_select_menu_space:[1,0],wide_form:[1,0],hour_size_px:[44,42],displayed_event_color:["#ff4a4a","ffc5ab"],displayed_event_text_color:["#ffef80","7e2727"]},e._skin_xy={lightbox_additional_height:[90,50],nav_height:[59,22],bar_height:[24,20]},e._is_material_skin=function(){return e.skin?(e.skin+"").indexOf("material")>-1:function(){if(i===void 0){var _=document.createElement("div");_.style.position="absolute",_.style.left="-9999px",_.style.top="-9999px",_.innerHTML="
",document.body.appendChild(_);var a=window.getComputedStyle(_.querySelector(".dhx_cal_scale_placeholder")).getPropertyValue("position");i=a==="absolute",setTimeout(function(){i=null,_&&_.parentNode&&_.parentNode.removeChild(_)},500)}return i}()},e._build_skin_info=function(){(function(){const u=e.$container;clearInterval(s),u&&(s=setInterval(()=>{const f=getComputedStyle(u).getPropertyValue("--dhx-scheduler-theme");f&&f!==e.skin&&e.setSkin(f)},100))})();const _=getComputedStyle(this.$container),a=_.getPropertyValue("--dhx-scheduler-theme");let o,l=!!a,h={},v=!1;if(l){o=a;for(let u in e.xy)h[u]=_.getPropertyValue(`--dhx-scheduler-xy-${u}`);h.hour_size_px=_.getPropertyValue("--dhx-scheduler-config-hour_size_px"),h.wide_form=_.getPropertyValue("--dhx-scheduler-config-form_wide")}else o=function(){for(var u=document.getElementsByTagName("link"),f=0;f{switch(o.getAttribute("data-tab")||o.getAttribute("name")){case"day":case"day_tab":o.classList.add("dhx_cal_tab_first"),o.classList.add("dhx_cal_tab_segmented");break;case"week":case"week_tab":o.classList.add("dhx_cal_tab_segmented");break;case"month":case"month_tab":o.classList.add("dhx_cal_tab_last"),o.classList.add("dhx_cal_tab_segmented");break;default:o.classList.add("dhx_cal_tab_standalone")}}),function(o){if(e.config.header)return;const l=Array.from(o.querySelectorAll(".dhx_cal_tab")),h=["day","week","month"].map(u=>l.find(f=>f.getAttribute("data-tab")===u)).filter(u=>u!==void 0);let v=l.length>0?l[0]:null;h.reverse().forEach(u=>{o.insertBefore(u,v),v=u})}(e._els.dhx_cal_navline[0]))},{once:!0})}}function Jt(e,i){this.$scheduler=e,this.$dp=i,this._dataProcessorHandlers=[],this.attach=function(){var t=this.$dp,r=this.$scheduler;this._dataProcessorHandlers.push(r.attachEvent("onEventAdded",function(d){!this._loading&&this._validId(d)&&t.setUpdated(d,!0,"inserted")})),this._dataProcessorHandlers.push(r.attachEvent("onConfirmedBeforeEventDelete",function(d){if(this._validId(d)){var n=t.getState(d);return n=="inserted"||this._new_event?(t.setUpdated(d,!1),!0):n!="deleted"&&(n=="true_deleted"||(t.setUpdated(d,!0,"deleted"),!1))}})),this._dataProcessorHandlers.push(r.attachEvent("onEventChanged",function(d){!this._loading&&this._validId(d)&&t.setUpdated(d,!0,"updated")})),this._dataProcessorHandlers.push(r.attachEvent("onClearAll",function(){t._in_progress={},t._invalid={},t.updatedRows=[],t._waitMode=0})),t.attachEvent("insertCallback",r._update_callback),t.attachEvent("updateCallback",r._update_callback),t.attachEvent("deleteCallback",function(d,n){r.getEvent(n)?(r.setUserData(n,this.action_param,"true_deleted"),r.deleteEvent(n)):r._add_rec_marker&&r._update_callback(d,n)})},this.detach=function(){for(var t in this._dataProcessorHandlers){var r=this._dataProcessorHandlers[t];this.$scheduler.detachEvent(r)}this._dataProcessorHandlers=[]}}function Le(e){return this.serverProcessor=e,this.action_param="!nativeeditor_status",this.object=null,this.updatedRows=[],this.autoUpdate=!0,this.updateMode="cell",this._tMode="GET",this._headers=null,this._payload=null,this.post_delim="_",this._waitMode=0,this._in_progress={},this._invalid={},this.messages=[],this.styles={updated:"font-weight:bold;",inserted:"font-weight:bold;",deleted:"text-decoration : line-through;",invalid:"background-color:FFE0E0;",invalid_cell:"border-bottom:2px solid red;",error:"color:red;",clear:"font-weight:normal;text-decoration:none;"},this.enableUTFencoding(!0),Ae(this),this}function Wt(e){var i="data-dhxbox",t=null;function r(m,g){var y=m.callback;f.hide(m.box),t=m.box=null,y&&y(g)}function d(m){if(t){var g=m.which||m.keyCode,y=!1;if(c.keyboard){if(g==13||g==32){var x=m.target||m.srcElement;se.getClassName(x).indexOf("scheduler_popup_button")>-1&&x.click?x.click():(r(t,!0),y=!0)}g==27&&(r(t,!1),y=!0)}return y?(m.preventDefault&&m.preventDefault(),!(m.cancelBubble=!0)):void 0}}function n(m){n.cover||(n.cover=document.createElement("div"),e.event(n.cover,"keydown",d),n.cover.className="dhx_modal_cover",document.body.appendChild(n.cover)),n.cover.style.display=m?"inline-block":"none"}function s(m,g,y){var x=e._waiAria.messageButtonAttrString(m),b=(g||"").toLowerCase().replace(/ /g,"_");return`
${m}
`}function _(){for(var m=[].slice.apply(arguments,[0]),g=0;g'+E.title+"
"),N+='
'+(E.content?"":E.text)+'
',D&&(N+=s(_(E.ok,e.locale.labels.message_ok,"OK"),"ok",!0)),w&&(N+=s(_(E.cancel,e.locale.labels.message_cancel,"Cancel"),"cancel",!1)),E.buttons)for(var A=0;A",k.className="scheduler-info dhtmlx-info scheduler-"+b.type+" dhtmlx-"+b.type,e.event(k,"click",function(E){b.callback&&b.callback.call(this,E),c.hide(b.id),b=null}),e._waiAria.messageInfoAttr(k),c.position=="bottom"&&c.area.firstChild?c.area.insertBefore(k,c.area.firstChild):c.area.appendChild(k),b.expire>0&&(c.timers[b.id]=window.setTimeout(function(){c&&c.hide(b.id)},b.expire)),c.pull[b.id]=k,k=null,b.id}(m)}};c.seed=new Date().valueOf(),c.uid=ee.uid,c.expire=4e3,c.keyboard=!0,c.position="top",c.pull={},c.timers={},c.hideAll=function(){for(var m in c.pull)c.hide(m)},c.hide=function(m){var g=c.pull[m];g&&g.parentNode&&(window.setTimeout(function(){g.parentNode.removeChild(g),g=null},2e3),g.className+=" hidden",c.timers[m]&&window.clearTimeout(c.timers[m]),delete c.pull[m])};var p=[];return e.attachEvent("onMessagePopup",function(m){p.push(m)}),e.attachEvent("onAfterMessagePopup",function(m){for(var g=0;g{this.callEvent("onStateChange",[n,d])})}getState(){return{...this.state,mode:this.state.modes[this.state.currentModeIndex]}}setState(i){const t={...this.state};i.mode&&(i.currentModeIndex=this.state.modes.indexOf(i.mode)),this.state={...this.state,...i},this._notifyStateChange(t,this.state),this.container&&this.render(this.container)}onStateChange(i){return this.onStateChangeHandlers.push(i),()=>{const t=this.onStateChangeHandlers.indexOf(i);t!==-1&&this.onStateChangeHandlers.splice(t,1)}}_notifyStateChange(i,t){this.onStateChangeHandlers.forEach(r=>r(i,t))}_adjustDate(i){const{mode:t,date:r}=this.getState(),d=new Date(r);t==="days"?d.setMonth(r.getMonth()+i):t==="months"?d.setFullYear(r.getFullYear()+i):d.setFullYear(r.getFullYear()+10*i),this.setState({date:d})}_toggleMode(){const i=(this.state.currentModeIndex+1)%this.state.modes.length;this.setState({currentModeIndex:i})}_renderCalendarHeader(i){const{mode:t,date:r}=this.getState(),d=document.createElement("div");d.classList.add("dhx_cal_datepicker_header");const n=document.createElement("button");n.classList.add("dhx_cal_datepicker_arrow","scheduler_icon","arrow_left"),d.appendChild(n);const s=document.createElement("div");if(s.classList.add("dhx_cal_datepicker_title"),t==="days")s.innerText=r.toLocaleString("default",{month:"long"})+" "+r.getFullYear();else if(t==="months")s.innerText=r.getFullYear();else{const a=10*Math.floor(r.getFullYear()/10);s.innerText=`${a} - ${a+9}`}this._domEvents.attach(s,"click",this._toggleMode.bind(this)),d.appendChild(s);const _=document.createElement("button");_.classList.add("dhx_cal_datepicker_arrow","scheduler_icon","arrow_right"),d.appendChild(_),i.appendChild(d),this._domEvents.attach(n,"click",this._adjustDate.bind(this,-1)),this._domEvents.attach(_,"click",this._adjustDate.bind(this,1))}render(i){this._domEvents.detachAll(),this.container=i||this.container,this.container.innerHTML="",this.element||(this.element=document.createElement("div"),this.element.classList.add("dhx_cal_datepicker")),this.element.innerHTML="",this.container.appendChild(this.element),this._renderCalendarHeader(this.element);const t=document.createElement("div");t.classList.add("dhx_cal_datepicker_data"),this.element.appendChild(t);const{mode:r}=this.getState();r==="days"?this._renderDayGrid(t):r==="months"?this._renderMonthGrid(t):this._renderYearGrid(t)}_renderDayGridHeader(i){const{date:t}=this.getState(),r=this.scheduler;let d=r.date.week_start(new Date(t));const n=r.date.add(r.date.week_start(new Date(t)),1,"week");i.classList.add("dhx_cal_datepicker_days");const s=r.date.date_to_str("%D");for(;d.valueOf()(y[this.scheduler.date.day_start(new Date(x)).valueOf()]=!0,y),{}),o=document.createElement("div");this._renderDayGridHeader(o),i.appendChild(o);const l=this.scheduler,h=l.date.week_start(l.date.month_start(new Date(t))),v=l.date.month_start(new Date(t)),u=l.date.add(l.date.month_start(new Date(t)),1,"month");let f=l.date.add(l.date.month_start(new Date(t)),1,"month");const c=l.date.date_part(l._currentDate());f.getDay()!==0&&(f=l.date.add(l.date.week_start(f),1,"week"));let p=this._weeksBetween(h,f);n&&p{const x=y.target.closest("[data-cell-date]"),b=new Date(x.getAttribute("data-cell-date"));this.callEvent("onDateClick",[b,y])});m.valueOf()=u.valueOf()&&y.classList.add("dhx_after"),m.getDay()!==0&&m.getDay()!==6||y.classList.add("dhx_cal_datepicker_weekend"),m.valueOf()==c.valueOf()&&y.classList.add("dhx_now"),s&&_&&m.valueOf()>=s.valueOf()&&m.valueOf()<_.valueOf()&&y.classList.add("dhx_cal_datepicker_current"),a[m.valueOf()]&&y.classList.add("dhx_cal_datepicker_event"),y.classList.add("dhx_cal_datepicker_date"),g.appendChild(y),m=l.date.add(m,1,"day")}i.appendChild(g)}_renderMonthGrid(i){const{date:t}=this.getState(),r=document.createElement("div");r.classList.add("dhx_cal_datepicker_months");const d=[];for(let a=0;a<12;a++)d.push(new Date(t.getFullYear(),a,1));const n=this.scheduler.date.date_to_str("%M");d.forEach(a=>{const o=document.createElement("div");o.classList.add("dhx_cal_datepicker_month"),t.getMonth()===a.getMonth()&&o.classList.add("dhx_cal_datepicker_current"),o.setAttribute("data-month",a.getMonth()),o.innerHTML=n(a),this._domEvents.attach(o,"click",()=>{const l=new Date(a);this.setState({date:l,mode:"days"})}),r.appendChild(o)}),i.appendChild(r);const s=document.createElement("div");s.classList.add("dhx_cal_datepicker_done");const _=document.createElement("button");_.innerText="Done",_.classList.add("dhx_cal_datepicker_done_btn"),this._domEvents.attach(_,"click",()=>{this.setState({mode:"days"})}),s.appendChild(_),i.appendChild(s)}_renderYearGrid(i){const{date:t}=this.getState(),r=10*Math.floor(t.getFullYear()/10),d=document.createElement("div");d.classList.add("dhx_cal_datepicker_years");for(let _=r-1;_<=r+10;_++){const a=document.createElement("div");a.innerText=_,a.classList.add("dhx_cal_datepicker_year"),a.setAttribute("data-year",_),t.getFullYear()===_&&a.classList.add("dhx_cal_datepicker_current"),this._domEvents.attach(a,"click",()=>{this.setState({date:new Date(_,t.getMonth(),1),mode:"months"})}),d.appendChild(a)}i.appendChild(d);const n=document.createElement("div");n.classList.add("dhx_cal_datepicker_done");const s=document.createElement("button");s.innerText="Done",s.classList.add("dhx_cal_datepicker_done_btn"),this._domEvents.attach(s,"click",()=>{this.setState({mode:"months"})}),n.appendChild(s),i.appendChild(n)}destructor(){this.onStateChangeHandlers=[],this.element&&(this.element.innerHTML="",this.element.remove()),this._domEvents.detachAll(),this.callEvent("onDestroy",[]),this.detachAllEvents(),this.scheduler=null}}function Sa(e){const i={version:"7.1.2"};i.$stateProvider=function(){const a={};return{getState:function(o){if(a[o])return a[o].method();{const l={};for(const h in a)a[h].internal||ee.mixin(l,a[h].method(),!0);return l}},registerProvider:function(o,l,h){a[o]={method:l,internal:h}},unregisterProvider:function(o){delete a[o]}}}(),i.getState=i.$stateProvider.getState,function(a){var o={agenda:"https://docs.dhtmlx.com/scheduler/agenda_view.html",grid:"https://docs.dhtmlx.com/scheduler/grid_view.html",map:"https://docs.dhtmlx.com/scheduler/map_view.html",unit:"https://docs.dhtmlx.com/scheduler/units_view.html",timeline:"https://docs.dhtmlx.com/scheduler/timeline_view.html",week_agenda:"https://docs.dhtmlx.com/scheduler/weekagenda_view.html",year:"https://docs.dhtmlx.com/scheduler/year_view.html",anythingElse:"https://docs.dhtmlx.com/scheduler/views.html"},l={agenda:"ext/dhtmlxscheduler_agenda_view.js",grid:"ext/dhtmlxscheduler_grid_view.js",map:"ext/dhtmlxscheduler_map_view.js",unit:"ext/dhtmlxscheduler_units.js",timeline:"ext/dhtmlxscheduler_timeline.js, ext/dhtmlxscheduler_treetimeline.js, ext/dhtmlxscheduler_daytimeline.js",week_agenda:"ext/dhtmlxscheduler_week_agenda.js",year:"ext/dhtmlxscheduler_year_view.js",limit:"ext/dhtmlxscheduler_limit.js"};a._commonErrorMessages={unknownView:function(h){var v=l[h]?"You're probably missing "+l[h]+".":"";return"`"+h+"` view is not defined. \nPlease check parameters you pass to `scheduler.init` or `scheduler.setCurrentView` in your code and ensure you've imported appropriate extensions. \nRelated docs: "+(o[h]||o.anythingElse)+` -`+(v?v+` +
`,expire:1e4,type:"popup_after_delete",callback:function(n){n.target.closest(`[data-deleted-event-id="${r.id}"]`)&&(i.addEvent(d),i.render())}})})})(e),Mt(e),Nt(e),function(i){i.batchUpdate=Tt(i)}(e)}var Ct=Date.now();function Te(e){return!(!e||typeof e!="object")&&!!(e.getFullYear&&e.getMonth&&e.getDate)}const ee={uid:function(){return Ct++},mixin:function(e,i,t){for(var r in i)(e[r]===void 0||t)&&(e[r]=i[r]);return e},copy:function e(i){var t,r,d;if(i&&typeof i=="object")switch(!0){case Te(i):r=new Date(i);break;case(d=i,Array.isArray?Array.isArray(d):d&&d.length!==void 0&&d.pop&&d.push):for(r=new Array(i.length),t=0;t=0){if(!t)return r;var s=n===0||!(d.charAt(n-1)||"").trim(),_=n+i.length>=d.length||!d.charAt(n+i.length).trim();if(s&&_)return r}}r=r.parentNode}return null}function qt(e){var i=!1,t=!1;if(window.getComputedStyle){var r=window.getComputedStyle(e,null);i=r.display,t=r.visibility}else e.currentStyle&&(i=e.currentStyle.display,t=e.currentStyle.visibility);var d=!1,n=Ze({target:e},"dhx_form_repeat",!1);return n&&(d=n.style.height=="0px"),d=d||!e.offsetHeight,i!="none"&&t!="hidden"&&!d}function jt(e){return!isNaN(e.getAttribute("tabindex"))&&1*e.getAttribute("tabindex")>=0}function It(e){return!{a:!0,area:!0}[e.nodeName.loLowerCase()]||!!e.getAttribute("href")}function Pt(e){return!{input:!0,select:!0,textarea:!0,button:!0,object:!0}[e.nodeName.toLowerCase()]||!e.hasAttribute("disabled")}function Qe(){return document.head.createShadowRoot||document.head.attachShadow}function et(e){if(!e||!Qe())return document.body;for(;e.parentNode&&(e=e.parentNode);)if(e instanceof ShadowRoot)return e.host;return document.body}const se={getAbsoluteLeft:function(e){return this.getOffset(e).left},getAbsoluteTop:function(e){return this.getOffset(e).top},getOffsetSum:function(e){for(var i=0,t=0;e;)i+=parseInt(e.offsetTop),t+=parseInt(e.offsetLeft),e=e.offsetParent;return{top:i,left:t}},getOffsetRect:function(e){var i=e.getBoundingClientRect(),t=0,r=0;if(/Mobi/.test(navigator.userAgent)){var d=document.createElement("div");d.style.position="absolute",d.style.left="0px",d.style.top="0px",d.style.width="1px",d.style.height="1px",document.body.appendChild(d);var n=d.getBoundingClientRect();t=i.top-n.top,r=i.left-n.left,d.parentNode.removeChild(d)}else{var s=document.body,_=document.documentElement,a=window.pageYOffset||_.scrollTop||s.scrollTop,o=window.pageXOffset||_.scrollLeft||s.scrollLeft,l=_.clientTop||s.clientTop||0,h=_.clientLeft||s.clientLeft||0;t=i.top+a-l,r=i.left+o-h}return{top:Math.round(t),left:Math.round(r)}},getOffset:function(e){return e.getBoundingClientRect?this.getOffsetRect(e):this.getOffsetSum(e)},closest:function(e,i){return e&&i?Ce(e,i):null},insertAfter:function(e,i){i.nextSibling?i.parentNode.insertBefore(e,i.nextSibling):i.parentNode.appendChild(e)},remove:function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},isChildOf:function(e,i){return i.contains(e)},getFocusableNodes:function(e){for(var i=e.querySelectorAll(["a[href]","area[href]","input","select","textarea","button","iframe","object","embed","[tabindex]","[contenteditable]"].join(", ")),t=Array.prototype.slice.call(i,0),r=0;r=0||navigator.userAgent.indexOf("Trident")>=0),isOpera:de&&navigator.userAgent.indexOf("Opera")>=0,isChrome:de&&navigator.userAgent.indexOf("Chrome")>=0,isKHTML:de&&(navigator.userAgent.indexOf("Safari")>=0||navigator.userAgent.indexOf("Konqueror")>=0),isFF:de&&navigator.userAgent.indexOf("Firefox")>=0,isIPad:de&&navigator.userAgent.search(/iPad/gi)>=0,isEdge:de&&navigator.userAgent.indexOf("Edge")!=-1,isNode:!de||typeof navigator>"u"};function Oe(e){if(typeof e=="string"||typeof e=="number")return e;var i="";for(var t in e){var r="";e.hasOwnProperty(t)&&(r=t+"="+(r=typeof e[t]=="string"?encodeURIComponent(e[t]):typeof e[t]=="number"?e[t]:encodeURIComponent(JSON.stringify(e[t]))),i.length&&(r="&"+r),i+=r)}return i}function Ut(e){var i=function(n,s){for(var _="var temp=date.match(/[a-zA-Z]+|[0-9]+/g);",a=n.match(/%[a-zA-Z]/g),o=0;o50?1900:2000);";break;case"%g":case"%G":case"%h":case"%H":_+="set[3]=temp["+o+"]||0;";break;case"%i":_+="set[4]=temp["+o+"]||0;";break;case"%Y":_+="set[0]=temp["+o+"]||0;";break;case"%a":case"%A":_+="set[3]=set[3]%12+((temp["+o+"]||'').toLowerCase()=='am'?0:12);";break;case"%s":_+="set[5]=temp["+o+"]||0;";break;case"%M":_+="set[1]=this.locale.date.month_short_hash[temp["+o+"]]||0;";break;case"%F":_+="set[1]=this.locale.date.month_full_hash[temp["+o+"]]||0;"}var l="set[0],set[1],set[2],set[3],set[4],set[5]";return s&&(l=" Date.UTC("+l+")"),new Function("date","var set=[0,0,1,0,0,0]; "+_+" return new Date("+l+");")},t=function(n,s){const _=n.match(/%[a-zA-Z]/g);return function(a){for(var o=[0,0,1,0,0,0],l=a.match(/[a-zA-Z]+|[0-9]+/g),h=0;h<_.length;h++)switch(_[h]){case"%j":case"%d":o[2]=l[h]||1;break;case"%n":case"%m":o[1]=(l[h]||1)-1;break;case"%y":o[0]=1*l[h]+(l[h]>50?1900:2e3);break;case"%g":case"%G":case"%h":case"%H":o[3]=l[h]||0;break;case"%i":o[4]=l[h]||0;break;case"%Y":o[0]=l[h]||0;break;case"%a":case"%A":o[3]=o[3]%12+((l[h]||"").toLowerCase()=="am"?0:12);break;case"%s":o[5]=l[h]||0;break;case"%M":o[1]=e.locale.date.month_short_hash[l[h]]||0;break;case"%F":o[1]=e.locale.date.month_full_hash[l[h]]||0}return s?new Date(Date.UTC(o[0],o[1],o[2],o[3],o[4],o[5])):new Date(o[0],o[1],o[2],o[3],o[4],o[5])}};let r;function d(){var n=!1;return e.config.csp==="auto"?(r===void 0&&(r=function(){try{new Function("cspEnabled = false;"),r=!1}catch{r=!0}return r}()),n=r):n=e.config.csp,n}e.date={init:function(){for(var n=e.locale.date.month_short,s=e.locale.date.month_short_hash={},_=0;_0){var a=(+_-+n)%864e5;if(a&&n.getTimezoneOffset()==_.getTimezoneOffset()){var o=a/36e5;_.setTime(_.getTime()+60*(24-o)*60*1e3)}}return s>=0&&!n.getHours()&&_.getHours()&&(_.getDate()11?"pm":"am":o.getHours()>11?"pm":"am";case"%A":return a?o.getUTCHours()>11?"PM":"AM":o.getHours()>11?"PM":"AM";case"%s":return a?e.date.to_fixed(o.getUTCSeconds()):e.date.to_fixed(o.getSeconds());case"%W":return a?e.date.to_fixed(e.date.getUTCISOWeek(o)):e.date.to_fixed(e.date.getISOWeek(o));default:return l}})}}(n,s):(n=n.replace(/%[a-zA-Z]/g,function(_){switch(_){case"%d":return'"+this.date.to_fixed(date.getDate())+"';case"%m":return'"+this.date.to_fixed((date.getMonth()+1))+"';case"%j":return'"+date.getDate()+"';case"%n":return'"+(date.getMonth()+1)+"';case"%y":return'"+this.date.to_fixed(date.getFullYear()%100)+"';case"%Y":return'"+date.getFullYear()+"';case"%D":return'"+this.locale.date.day_short[date.getDay()]+"';case"%l":return'"+this.locale.date.day_full[date.getDay()]+"';case"%M":return'"+this.locale.date.month_short[date.getMonth()]+"';case"%F":return'"+this.locale.date.month_full[date.getMonth()]+"';case"%h":return'"+this.date.to_fixed((date.getHours()+11)%12+1)+"';case"%g":return'"+((date.getHours()+11)%12+1)+"';case"%G":return'"+date.getHours()+"';case"%H":return'"+this.date.to_fixed(date.getHours())+"';case"%i":return'"+this.date.to_fixed(date.getMinutes())+"';case"%a":return'"+(date.getHours()>11?"pm":"am")+"';case"%A":return'"+(date.getHours()>11?"PM":"AM")+"';case"%s":return'"+this.date.to_fixed(date.getSeconds())+"';case"%W":return'"+this.date.to_fixed(this.date.getISOWeek(date))+"';default:return _}}),s&&(n=n.replace(/date\.get/g,"date.getUTC")),new Function("date",'return "'+n+'";').bind(e))},str_to_date:function(n,s,_){var a=d()?t:i,o=a(n,s),l=/^[0-9]{4}(\-|\/)[0-9]{2}(\-|\/)[0-9]{2} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/,h=/^[0-9]{2}\/[0-9]{2}\/[0-9]{4} ?(([0-9]{1,2}:[0-9]{2})(:[0-9]{1,2})?)?$/,m=/^[0-9]{2}\-[0-9]{2}\-[0-9]{4} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/,v=/^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/,u=a("%Y-%m-%d %H:%i:%s",s),c=a("%m/%d/%Y %H:%i:%s",s),f=a("%d-%m-%Y %H:%i:%s",s);return function(p){if(!_&&!e.config.parse_exact_format){if(p&&p.getISOWeek)return new Date(p);if(typeof p=="number")return new Date(p);if(g=p,l.test(String(g)))return u(p);if(function(y){return h.test(String(y))}(p))return c(p);if(function(y){return m.test(String(y))}(p))return f(p);if(function(y){return v.test(y)}(p))return new Date(p)}var g;return o.call(e,p)}},getISOWeek:function(n){if(!n)return!1;var s=(n=this.date_part(new Date(n))).getDay();s===0&&(s=7);var _=new Date(n.valueOf());_.setDate(n.getDate()+(4-s));var a=_.getFullYear(),o=Math.round((_.getTime()-new Date(a,0,1).getTime())/864e5);return 1+Math.floor(o/7)},getUTCISOWeek:function(n){return this.getISOWeek(this.convert_to_utc(n))},convert_to_utc:function(n){return new Date(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds())}}}function tt(e){return(function(){var i={};for(var t in this._events){var r=this._events[t];r.id.toString().indexOf("#")==-1&&(i[r.id]=r)}return i}).bind(e)}function Vt(e){e._loaded={},e._load=function(t,r){if(t=t||this._load_url){var d;if(t+=(t.indexOf("?")==-1?"?":"&")+"timeshift="+new Date().getTimezoneOffset(),this.config.prevent_cache&&(t+="&uid="+this.uid()),r=r||this._date,this._load_mode){var n=this.templates.load_format;for(r=this.date[this._load_mode+"_start"](new Date(r.valueOf()));r>this._min_date;)r=this.date.add(r,-1,this._load_mode);d=r;for(var s=!0;dr&&this._loaded[n(_)]);if(d<=r)return!1;for(e.ajax.get(t+"&from="+n(r)+"&to="+n(d),a);r=400)&&(this.callEvent("onLoadError",[t.xmlDoc]),r=[]),this._process_loading(r),this.callEvent("onXLE",[]),this.callEvent("onParse",[])},e._process_loading=function(t){this._loading=!0,this._not_render=!0;for(var r=0;r1)&&(this.xy.scroll_width=0,this._mobile=!0),this.config.touch){var i=!0;try{document.createEvent("TouchEvent")}catch{i=!1}i?this._touch_events(["touchmove","touchstart","touchend"],function(t){return t.touches&&t.touches.length>1?null:t.touches[0]?{target:t.target,pageX:t.touches[0].pageX,pageY:t.touches[0].pageY,clientX:t.touches[0].clientX,clientY:t.touches[0].clientY}:t},function(){return!1}):window.PointerEvent||window.navigator.pointerEnabled?this._touch_events(["pointermove","pointerdown","pointerup"],function(t){return t.pointerType=="mouse"?null:t},function(t){return!t||t.pointerType=="mouse"}):window.navigator.msPointerEnabled&&this._touch_events(["MSPointerMove","MSPointerDown","MSPointerUp"],function(t){return t.pointerType==t.MSPOINTER_TYPE_MOUSE?null:t},function(t){return!t||t.pointerType==t.MSPOINTER_TYPE_MOUSE})}},e._touch_events=function(i,t,r){var d,n,s,_,a,o,l=0;function h(v,u,c){e.event(v,u,function(f){return!!e._is_lightbox_open()||(r(f)?void 0:c(f))},{passive:!1})}function m(v){r(v)||(e._hide_global_tip(),_&&(e._on_mouse_up(t(v)),e._temp_touch_block=!1),e._drag_id=null,e._drag_mode=null,e._drag_pos=null,e._pointerDragId=null,clearTimeout(s),_=o=!1,a=!0)}h(document.body,i[0],function(v){if(!r(v)){var u=t(v);if(u){if(_)return function(c){if(!r(c)){var f=e.getState().drag_mode,p=!!e.matrix&&e.matrix[e._mode],g=e.render_view_data;f=="create"&&p&&(e.render_view_data=function(){for(var y=e.getState().drag_id,x=e.getEvent(y),b=p.y_property,k=e.getEvents(x.start_date,x.end_date),w=0;w5||Math.abs(d.pageY-n.pageY)>5)&&(a=!0,clearTimeout(s)):a=!0)}}}),h(this._els.dhx_cal_data[0],"touchcancel",m),h(this._els.dhx_cal_data[0],"contextmenu",function(v){if(!r(v))return o?(v&&v.preventDefault&&v.preventDefault(),v.cancelBubble=!0,!1):void 0}),h(this._obj,i[1],function(v){var u;if(document&&document.body&&document.body.classList.add("dhx_cal_touch_active"),!r(v))if(e._pointerDragId=v.pointerId,_=a=!1,o=!0,u=n=t(v)){var c=new Date;if(!a&&!_&&c-l<250)return e._click.dhx_cal_data(u),window.setTimeout(function(){e.$destroyed||e._on_dbl_click(u)},50),v.preventDefault&&v.preventDefault(),v.cancelBubble=!0,e._block_next_stop=!0,!1;if(l=c,!a&&!_&&e.config.touch_drag){var f=e._locate_event(document.activeElement),p=e._locate_event(u.target),g=d?e._locate_event(d.target):null;if(f&&p&&f==p&&f!=g)return v.preventDefault&&v.preventDefault(),v.cancelBubble=!0,e._ignore_next_click=!1,e._click.dhx_cal_data(u),d=u,!1;s=setTimeout(function(){if(!e.$destroyed){_=!0;var y=d.target,x=e._getClassName(y);y&&x.indexOf("dhx_body")!=-1&&(y=y.previousSibling),e._on_mouse_down(d,y),e._drag_mode&&e._drag_mode!="create"&&e.for_rendered(e._drag_id,function(b,k){b.style.display="none",e._rendered.splice(k,1)}),e.config.touch_tip&&e._show_global_tip(),e.updateEvent(e._drag_id)}},e.config.touch_drag),d=u}}else a=!0}),h(this._els.dhx_cal_data[0],i[2],function(v){if(document&&document.body&&document.body.classList.remove("dhx_cal_touch_active"),!r(v))return e.config.touch_swipe_dates&&!_&&function(u,c,f,p){if(!u||!c)return!1;for(var g=u.target;g&&g!=e._obj;)g=g.parentNode;if(g!=e._obj||e.matrix&&e.matrix[e.getState().mode]&&e.matrix[e.getState().mode].scrollable)return!1;var y=Math.abs(u.pageY-c.pageY),x=Math.abs(u.pageX-c.pageX);return yf&&(!y||x/y>3)&&(u.pageX>c.pageX?e._click.dhx_cal_next_button():e._click.dhx_cal_prev_button(),!0)}(d,n,200,100)&&(e._block_next_stop=!0),_&&(e._ignore_next_click=!0,setTimeout(function(){e._ignore_next_click=!1},100)),m(v),e._block_next_stop?(e._block_next_stop=!1,v.preventDefault&&v.preventDefault(),v.cancelBubble=!0,!1):void 0}),e.event(document.body,i[2],m)},e._show_global_tip=function(){e._hide_global_tip();var i=e._global_tip=document.createElement("div");i.className="dhx_global_tip",e._update_global_tip(1),document.body.appendChild(i)},e._update_global_tip=function(i){var t=e._global_tip;if(t){var r="";if(e._drag_id&&!i){var d=e.getEvent(e._drag_id);d&&(r="
"+(d._timed?e.templates.event_header(d.start_date,d.end_date,d):e.templates.day_date(d.start_date,d.end_date,d))+"
")}e._drag_mode=="create"||e._drag_mode=="new-size"?t.innerHTML=(e.locale.labels.drag_to_create||"Drag to create")+r:t.innerHTML=(e.locale.labels.drag_to_move||"Drag to move")+r}},e._hide_global_tip=function(){var i=e._global_tip;i&&i.parentNode&&(i.parentNode.removeChild(i),e._global_tip=0)}}function Bt(e){var i,t;function r(){if(e._is_material_skin())return!0;if(t!==void 0)return t;var _=document.createElement("div");_.style.position="absolute",_.style.left="-9999px",_.style.top="-9999px",_.innerHTML="
",document.body.appendChild(_);var a=window.getComputedStyle(_.querySelector(".dhx_body")).getPropertyValue("box-sizing");document.body.removeChild(_),(t=a==="border-box")||setTimeout(function(){t=void 0},1e3)}function d(){if(!e._is_material_skin()&&!e._border_box_events()){var _=t;t=void 0,i=void 0,_!==r()&&e.$container&&e.getState().mode&&e.setCurrentView()}}function n(_){var a=_.getMinutes();return a=a<10?"0"+a:a,""+_.getHours()+" "+a+""}e._addThemeClass=function(){document.documentElement.setAttribute("data-scheduler-theme",e.skin)},e._skin_settings={fix_tab_position:[1,0],use_select_menu_space:[1,0],wide_form:[1,0],hour_size_px:[44,42],displayed_event_color:["#ff4a4a","ffc5ab"],displayed_event_text_color:["#ffef80","7e2727"]},e._skin_xy={lightbox_additional_height:[90,50],nav_height:[59,22],bar_height:[24,20]},e._is_material_skin=function(){return e.skin?(e.skin+"").indexOf("material")>-1:function(){if(i===void 0){var _=document.createElement("div");_.style.position="absolute",_.style.left="-9999px",_.style.top="-9999px",_.innerHTML="
",document.body.appendChild(_);var a=window.getComputedStyle(_.querySelector(".dhx_cal_scale_placeholder")).getPropertyValue("position");i=a==="absolute",setTimeout(function(){i=null,_&&_.parentNode&&_.parentNode.removeChild(_)},500)}return i}()},e._build_skin_info=function(){(function(){const v=e.$container;clearInterval(s),v&&(s=setInterval(()=>{const u=getComputedStyle(v).getPropertyValue("--dhx-scheduler-theme");u&&u!==e.skin&&e.setSkin(u)},100))})();const _=getComputedStyle(this.$container),a=_.getPropertyValue("--dhx-scheduler-theme");let o,l=!!a,h={},m=!1;if(l){o=a;for(let v in e.xy)h[v]=_.getPropertyValue(`--dhx-scheduler-xy-${v}`);h.hour_size_px=_.getPropertyValue("--dhx-scheduler-config-hour_size_px"),h.wide_form=_.getPropertyValue("--dhx-scheduler-config-form_wide")}else o=function(){for(var v=document.getElementsByTagName("link"),u=0;u{switch(o.getAttribute("data-tab")||o.getAttribute("name")){case"day":case"day_tab":o.classList.add("dhx_cal_tab_first"),o.classList.add("dhx_cal_tab_segmented");break;case"week":case"week_tab":o.classList.add("dhx_cal_tab_segmented");break;case"month":case"month_tab":o.classList.add("dhx_cal_tab_last"),o.classList.add("dhx_cal_tab_segmented");break;default:o.classList.add("dhx_cal_tab_standalone")}}),function(o){if(e.config.header)return;const l=Array.from(o.querySelectorAll(".dhx_cal_tab")),h=["day","week","month"].map(v=>l.find(u=>u.getAttribute("data-tab")===v)).filter(v=>v!==void 0);let m=l.length>0?l[0]:null;h.reverse().forEach(v=>{o.insertBefore(v,m),m=v})}(e._els.dhx_cal_navline[0]))},{once:!0})}}function Jt(e,i){this.$scheduler=e,this.$dp=i,this._dataProcessorHandlers=[],this.attach=function(){var t=this.$dp,r=this.$scheduler;this._dataProcessorHandlers.push(r.attachEvent("onEventAdded",function(d){!this._loading&&this._validId(d)&&t.setUpdated(d,!0,"inserted")})),this._dataProcessorHandlers.push(r.attachEvent("onConfirmedBeforeEventDelete",function(d){if(this._validId(d)){var n=t.getState(d);return n=="inserted"||this._new_event?(t.setUpdated(d,!1),!0):n!="deleted"&&(n=="true_deleted"||(t.setUpdated(d,!0,"deleted"),!1))}})),this._dataProcessorHandlers.push(r.attachEvent("onEventChanged",function(d){!this._loading&&this._validId(d)&&t.setUpdated(d,!0,"updated")})),this._dataProcessorHandlers.push(r.attachEvent("onClearAll",function(){t._in_progress={},t._invalid={},t.updatedRows=[],t._waitMode=0})),t.attachEvent("insertCallback",r._update_callback),t.attachEvent("updateCallback",r._update_callback),t.attachEvent("deleteCallback",function(d,n){r.getEvent(n)?(r.setUserData(n,this.action_param,"true_deleted"),r.deleteEvent(n)):r._add_rec_marker&&r._update_callback(d,n)})},this.detach=function(){for(var t in this._dataProcessorHandlers){var r=this._dataProcessorHandlers[t];this.$scheduler.detachEvent(r)}this._dataProcessorHandlers=[]}}function Le(e){return this.serverProcessor=e,this.action_param="!nativeeditor_status",this.object=null,this.updatedRows=[],this.autoUpdate=!0,this.updateMode="cell",this._tMode="GET",this._headers=null,this._payload=null,this.post_delim="_",this._waitMode=0,this._in_progress={},this._invalid={},this.messages=[],this.styles={updated:"font-weight:bold;",inserted:"font-weight:bold;",deleted:"text-decoration : line-through;",invalid:"background-color:FFE0E0;",invalid_cell:"border-bottom:2px solid red;",error:"color:red;",clear:"font-weight:normal;text-decoration:none;"},this.enableUTFencoding(!0),Ae(this),this}function Wt(e){var i="data-dhxbox",t=null;function r(p,g){var y=p.callback;u.hide(p.box),t=p.box=null,y&&y(g)}function d(p){if(t){var g=p.which||p.keyCode,y=!1;if(c.keyboard){if(g==13||g==32){var x=p.target||p.srcElement;se.getClassName(x).indexOf("scheduler_popup_button")>-1&&x.click?x.click():(r(t,!0),y=!0)}g==27&&(r(t,!1),y=!0)}return y?(p.preventDefault&&p.preventDefault(),!(p.cancelBubble=!0)):void 0}}function n(p){n.cover||(n.cover=document.createElement("div"),e.event(n.cover,"keydown",d),n.cover.className="dhx_modal_cover",document.body.appendChild(n.cover)),n.cover.style.display=p?"inline-block":"none"}function s(p,g,y){var x=e._waiAria.messageButtonAttrString(p),b=(g||"").toLowerCase().replace(/ /g,"_");return`
${p}
`}function _(){for(var p=[].slice.apply(arguments,[0]),g=0;g'+w.title+"
"),N+='
'+(w.content?"":w.text)+'
',D&&(N+=s(_(w.ok,e.locale.labels.message_ok,"OK"),"ok",!0)),E&&(N+=s(_(w.cancel,e.locale.labels.message_cancel,"Cancel"),"cancel",!1)),w.buttons)for(var T=0;T",k.className="scheduler-info dhtmlx-info scheduler-"+b.type+" dhtmlx-"+b.type,e.event(k,"click",function(w){b.callback&&b.callback.call(this,w),c.hide(b.id),b=null}),e._waiAria.messageInfoAttr(k),c.position=="bottom"&&c.area.firstChild?c.area.insertBefore(k,c.area.firstChild):c.area.appendChild(k),b.expire>0&&(c.timers[b.id]=window.setTimeout(function(){c&&c.hide(b.id)},b.expire)),c.pull[b.id]=k,k=null,b.id}(p)}};c.seed=new Date().valueOf(),c.uid=ee.uid,c.expire=4e3,c.keyboard=!0,c.position="top",c.pull={},c.timers={},c.hideAll=function(){for(var p in c.pull)c.hide(p)},c.hide=function(p){var g=c.pull[p];g&&g.parentNode&&(window.setTimeout(function(){g.parentNode.removeChild(g),g=null},2e3),g.className+=" hidden",c.timers[p]&&window.clearTimeout(c.timers[p]),delete c.pull[p])};var f=[];return e.attachEvent("onMessagePopup",function(p){f.push(p)}),e.attachEvent("onAfterMessagePopup",function(p){for(var g=0;g{this.callEvent("onStateChange",[n,d])})}getState(){return{...this.state,mode:this.state.modes[this.state.currentModeIndex]}}setState(i){const t={...this.state};i.mode&&(i.currentModeIndex=this.state.modes.indexOf(i.mode)),this.state={...this.state,...i},this._notifyStateChange(t,this.state),this.container&&this.render(this.container)}onStateChange(i){return this.onStateChangeHandlers.push(i),()=>{const t=this.onStateChangeHandlers.indexOf(i);t!==-1&&this.onStateChangeHandlers.splice(t,1)}}_notifyStateChange(i,t){this.onStateChangeHandlers.forEach(r=>r(i,t))}_adjustDate(i){const{mode:t,date:r}=this.getState(),d=new Date(r);t==="days"?d.setMonth(r.getMonth()+i):t==="months"?d.setFullYear(r.getFullYear()+i):d.setFullYear(r.getFullYear()+10*i),this.setState({date:d})}_toggleMode(){const i=(this.state.currentModeIndex+1)%this.state.modes.length;this.setState({currentModeIndex:i})}_renderCalendarHeader(i){const{mode:t,date:r}=this.getState(),d=document.createElement("div");d.classList.add("dhx_cal_datepicker_header");const n=document.createElement("button");n.classList.add("dhx_cal_datepicker_arrow","scheduler_icon","arrow_left"),d.appendChild(n);const s=document.createElement("div");if(s.classList.add("dhx_cal_datepicker_title"),t==="days")s.innerText=r.toLocaleString("default",{month:"long"})+" "+r.getFullYear();else if(t==="months")s.innerText=r.getFullYear();else{const a=10*Math.floor(r.getFullYear()/10);s.innerText=`${a} - ${a+9}`}this._domEvents.attach(s,"click",this._toggleMode.bind(this)),d.appendChild(s);const _=document.createElement("button");_.classList.add("dhx_cal_datepicker_arrow","scheduler_icon","arrow_right"),d.appendChild(_),i.appendChild(d),this._domEvents.attach(n,"click",this._adjustDate.bind(this,-1)),this._domEvents.attach(_,"click",this._adjustDate.bind(this,1))}render(i){this._domEvents.detachAll(),this.container=i||this.container,this.container.innerHTML="",this.element||(this.element=document.createElement("div"),this.element.classList.add("dhx_cal_datepicker")),this.element.innerHTML="",this.container.appendChild(this.element),this._renderCalendarHeader(this.element);const t=document.createElement("div");t.classList.add("dhx_cal_datepicker_data"),this.element.appendChild(t);const{mode:r}=this.getState();r==="days"?this._renderDayGrid(t):r==="months"?this._renderMonthGrid(t):this._renderYearGrid(t)}_renderDayGridHeader(i){const{date:t,filterDays:r}=this.getState(),d=this.scheduler;let n=d.date.week_start(new Date(t));const s=d.date.add(d.date.week_start(new Date(t)),1,"week");i.classList.add("dhx_cal_datepicker_days");const _=d.date.date_to_str("%D");for(;n.valueOf()(b[this.scheduler.date.day_start(new Date(k)).valueOf()]=!0,b),{}),l=document.createElement("div");this._renderDayGridHeader(l);const h=l.children.length;i.appendChild(l),h!==7&&i.style.setProperty("--dhx-scheduler-week-length",h);const m=this.scheduler,v=m.date.week_start(m.date.month_start(new Date(t))),u=m.date.month_start(new Date(t)),c=m.date.add(m.date.month_start(new Date(t)),1,"month");let f=m.date.add(m.date.month_start(new Date(t)),1,"month");const p=m.date.date_part(m._currentDate());f.getDay()!==0&&(f=m.date.add(m.date.week_start(f),1,"week"));let g=this._weeksBetween(v,f);n&&g{const k=b.target.closest("[data-cell-date]"),w=new Date(k.getAttribute("data-cell-date"));this.callEvent("onDateClick",[w,b])});y.valueOf()=c.valueOf()&&b.classList.add("dhx_after"),y.getDay()!==0&&y.getDay()!==6||b.classList.add("dhx_cal_datepicker_weekend"),y.valueOf()==p.valueOf()&&b.classList.add("dhx_now"),_&&a&&y.valueOf()>=_.valueOf()&&y.valueOf(){const o=document.createElement("div");o.classList.add("dhx_cal_datepicker_month"),t.getMonth()===a.getMonth()&&o.classList.add("dhx_cal_datepicker_current"),o.setAttribute("data-month",a.getMonth()),o.innerHTML=n(a),this._domEvents.attach(o,"click",()=>{const l=new Date(a);this.setState({date:l,mode:"days"})}),r.appendChild(o)}),i.appendChild(r);const s=document.createElement("div");s.classList.add("dhx_cal_datepicker_done");const _=document.createElement("button");_.innerText="Done",_.classList.add("dhx_cal_datepicker_done_btn"),this._domEvents.attach(_,"click",()=>{this.setState({mode:"days"})}),s.appendChild(_),i.appendChild(s)}_renderYearGrid(i){const{date:t}=this.getState(),r=10*Math.floor(t.getFullYear()/10),d=document.createElement("div");d.classList.add("dhx_cal_datepicker_years");for(let _=r-1;_<=r+10;_++){const a=document.createElement("div");a.innerText=_,a.classList.add("dhx_cal_datepicker_year"),a.setAttribute("data-year",_),t.getFullYear()===_&&a.classList.add("dhx_cal_datepicker_current"),this._domEvents.attach(a,"click",()=>{this.setState({date:new Date(_,t.getMonth(),1),mode:"months"})}),d.appendChild(a)}i.appendChild(d);const n=document.createElement("div");n.classList.add("dhx_cal_datepicker_done");const s=document.createElement("button");s.innerText="Done",s.classList.add("dhx_cal_datepicker_done_btn"),this._domEvents.attach(s,"click",()=>{this.setState({mode:"months"})}),n.appendChild(s),i.appendChild(n)}destructor(){this.onStateChangeHandlers=[],this.element&&(this.element.innerHTML="",this.element.remove()),this._domEvents.detachAll(),this.callEvent("onDestroy",[]),this.detachAllEvents(),this.scheduler=null}}function Sa(e){const i={version:"7.1.3"};i.$stateProvider=function(){const a={};return{getState:function(o){if(a[o])return a[o].method();{const l={};for(const h in a)a[h].internal||ee.mixin(l,a[h].method(),!0);return l}},registerProvider:function(o,l,h){a[o]={method:l,internal:h}},unregisterProvider:function(o){delete a[o]}}}(),i.getState=i.$stateProvider.getState,function(a){var o={agenda:"https://docs.dhtmlx.com/scheduler/agenda_view.html",grid:"https://docs.dhtmlx.com/scheduler/grid_view.html",map:"https://docs.dhtmlx.com/scheduler/map_view.html",unit:"https://docs.dhtmlx.com/scheduler/units_view.html",timeline:"https://docs.dhtmlx.com/scheduler/timeline_view.html",week_agenda:"https://docs.dhtmlx.com/scheduler/weekagenda_view.html",year:"https://docs.dhtmlx.com/scheduler/year_view.html",anythingElse:"https://docs.dhtmlx.com/scheduler/views.html"},l={agenda:"ext/dhtmlxscheduler_agenda_view.js",grid:"ext/dhtmlxscheduler_grid_view.js",map:"ext/dhtmlxscheduler_map_view.js",unit:"ext/dhtmlxscheduler_units.js",timeline:"ext/dhtmlxscheduler_timeline.js, ext/dhtmlxscheduler_treetimeline.js, ext/dhtmlxscheduler_daytimeline.js",week_agenda:"ext/dhtmlxscheduler_week_agenda.js",year:"ext/dhtmlxscheduler_year_view.js",limit:"ext/dhtmlxscheduler_limit.js"};a._commonErrorMessages={unknownView:function(h){var m=l[h]?"You're probably missing "+l[h]+".":"";return"`"+h+"` view is not defined. \nPlease check parameters you pass to `scheduler.init` or `scheduler.setCurrentView` in your code and ensure you've imported appropriate extensions. \nRelated docs: "+(o[h]||o.anythingElse)+` +`+(m?m+` `:"")},collapsedContainer:function(h){return`Scheduler container height is set to *100%* but the rendered height is zero and the scheduler is not visible. Make sure that the container has some initial height or use different units. For example:
@@ -13,37 +21,37 @@ Related docs: `+o.grid)},a.addMarkedTimespan=function(){throw new Error(`schedul Related docs: https://docs.dhtmlx.com/scheduler/limits.html`)},a.renderCalendar=function(){throw new Error(`scheduler.renderCalendar is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_minical.js https://docs.dhtmlx.com/scheduler/minicalendar.html`)},a.exportToPNG=function(){throw new Error(["scheduler.exportToPNG is not implemented.","This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/png.html","Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml"].join(` `))},a.exportToPDF=function(){throw new Error(["scheduler.exportToPDF is not implemented.","This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/pdf.html","Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml"].join(` -`))}}(i),zt(i),function(a){Ae(a),Ot(a),a._detachDomEvent=function(c,p,m){c.removeEventListener?c.removeEventListener(p,m,!1):c.detachEvent&&c.detachEvent("on"+p,m)},a._init_once=function(){Lt(a),a._init_once=function(){}};const o={render:function(c){return a._init_nav_bar(c)}},l={render:function(c){const p=document.createElement("div");return p.className="dhx_cal_header",p}},h={render:function(c){const p=document.createElement("div");return p.className="dhx_cal_data",p}};function v(c){return!!(c.querySelector(".dhx_cal_header")&&c.querySelector(".dhx_cal_data")&&c.querySelector(".dhx_cal_navline"))}a.init=function(c,p,m){if(!this.$destroyed){if(p=p||a._currentDate(),m=m||"week",this._obj&&this.unset_actions(),this._obj=typeof c=="string"?document.getElementById(c):c,this.$container=this._obj,this.$root=this._obj,!this.$container.offsetHeight&&this.$container.offsetWidth&&this.$container.style.height==="100%"&&window.console.error(a._commonErrorMessages.collapsedContainer(),this.$container),this.config.wai_aria_attributes&&this.config.wai_aria_application_role&&this.$container.setAttribute("role","application"),this.config.header||v(this.$container)||(this.config.header=function(g){const y=["day","week","month"];if(g.matrix)for(const x in g.matrix)y.push(x);if(g._props)for(const x in g._props)y.push(x);if(g._grid&&g._grid.names)for(const x in g._grid.names)y.push(x);return["map","agenda","week_agenda","year"].forEach(function(x){g[x+"_view"]&&y.push(x)}),y.concat(["date"]).concat(["prev","today","next"])}(this),window.console.log(["Required DOM elements are missing from the scheduler container and **scheduler.config.header** is not specified.","Using a default header configuration: ","scheduler.config.header = "+JSON.stringify(this.config.header,null,2),"Check this article for the details: https://docs.dhtmlx.com/scheduler/initialization.html"].join(` -`))),this.config.header)this.$container.innerHTML="",this.$container.classList.add("dhx_cal_container"),this.config.header.height&&(this.xy.nav_height=this.config.header.height),this.$container.appendChild(o.render(this.config.header)),this.$container.appendChild(l.render()),this.$container.appendChild(h.render());else if(!v(this.$container))throw new Error(["Required DOM elements are missing from the scheduler container.","Be sure to either specify them manually in the markup: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviamarkup","Or to use **scheduler.config.header** setting so they could be created automatically: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviaheaderconfig"].join(` -`));this.config.rtl&&(this.$container.className+=" dhx_cal_container_rtl"),this._skin_init&&a._skin_init(),a.date.init(),this._scroll=!0,this._els=[],this.get_elements(),this.init_templates(),this.set_actions(),this._init_once(),this._init_touch_events(),this.set_sizes(),a.callEvent("onSchedulerReady",[]),a.$initialized=!0,this.setCurrentView(p,m)}},a.xy={min_event_height:20,bar_height:24,scale_width:50,scroll_width:18,scale_height:20,month_scale_height:20,menu_width:25,margin_top:0,margin_left:0,editor_width:140,month_head_height:22,event_header_height:14},a.keys={edit_save:13,edit_cancel:27},a.bind=function(c,p){return c.bind?c.bind(p):function(){return c.apply(p,arguments)}},a.set_sizes=function(){var c=this._x=this._obj.clientWidth-this.xy.margin_left,p=this._table_view?0:this.xy.scale_width+this.xy.scroll_width,m=this.$container.querySelector(".dhx_cal_scale_placeholder");a._is_material_skin()?(m||((m=document.createElement("div")).className="dhx_cal_scale_placeholder",this.$container.insertBefore(m,this._els.dhx_cal_header[0])),m.style.display="block",this.set_xy(m,c,this.xy.scale_height+1,0,this._els.dhx_cal_header[0].offsetTop)):m&&m.parentNode.removeChild(m),this._lightbox&&(a.$container.offsetWidth<1200||this._setLbPosition(document.querySelector(".dhx_cal_light"))),this._data_width=c-p,this._els.dhx_cal_navline[0].style.width=c+"px";const g=this._els.dhx_cal_header[0];this.set_xy(g,this._data_width,this.xy.scale_height),g.style.left="",g.style.right="",this._table_view?this.config.rtl?g.style.right="-1px":g.style.left="-1px":this.config.rtl?g.style.right=`${this.xy.scale_width}px`:g.style.left=`${this.xy.scale_width}px`},a.set_xy=function(c,p,m,g,y){function x(k){let E=k;return isNaN(Number(E))||(E=Math.max(0,E)+"px"),E}var b="left";p!==void 0&&(c.style.width=x(p)),m!==void 0&&(c.style.height=x(m)),arguments.length>3&&(g!==void 0&&(this.config.rtl&&(b="right"),c.style[b]=g+"px"),y!==void 0&&(c.style.top=y+"px"))},a.get_elements=function(){const c=this._obj.getElementsByTagName("DIV");for(let p=0;p500&&a.unselect()},dhx_cal_prev_button:function(){a._click.dhx_cal_next_button(0,-1)},dhx_cal_next_button:function(c,p){let m=1;a.config.rtl&&(p=-p,m=-m),a.setCurrentView(a.date.add(a.date[a._mode+"_start"](new Date(a._date)),p||m,a._mode))},dhx_cal_today_button:function(){a.callEvent("onBeforeTodayDisplayed",[])&&a.setCurrentView(a._currentDate())},dhx_cal_tab:function(){const c=this.getAttribute("data-tab"),p=this.getAttribute("name"),m=c||p.substring(0,p.search("_tab"));a.setCurrentView(a._date,m)},buttons:{delete:function(c){const p=a.locale.labels.confirm_deleting;a._dhtmlx_confirm({message:p,title:a.locale.labels.title_confirm_deleting,callback:function(){a.deleteEvent(c)},config:{ok:a.locale.labels.icon_delete}})},edit:function(c){a.edit(c)},save:function(c){a.editStop(!0)},details:function(c){a.showLightbox(c)},form:function(c){a.showLightbox(c)},cancel:function(c){a.editStop(!1)}}},a._dhtmlx_confirm=function({message:c,title:p,callback:m,config:g}){if(!c)return m();g=g||{};const y={...g,text:c};p&&(y.title=p),m&&(y.callback=function(x){x&&m()}),a.confirm(y)},a.addEventNow=function(c,p,m){let g={};a._isObject(c)&&!a._isDate(c)&&(g=c,c=null);const y=6e4*(this.config.event_duration||this.config.time_step);c||(c=g.start_date||Math.round(a._currentDate().valueOf()/y)*y);let x=new Date(c);if(!p){let E=this.config.first_hour;E>x.getHours()&&(x.setHours(E),c=x.valueOf()),p=c.valueOf()+y}let b=new Date(p);x.valueOf()==b.valueOf()&&b.setTime(b.valueOf()+y),g.start_date=g.start_date||x,g.end_date=g.end_date||b,g.text=g.text||this.locale.labels.new_event,g.id=this._drag_id=g.id||this.uid(),this._drag_mode="new-size",this._loading=!0;const k=this.addEvent(g);return this.callEvent("onEventCreated",[this._drag_id,m]),this._loading=!1,this._drag_event={},this._on_mouse_up(m),k},a._on_dbl_click=function(c,p){if(p=p||c.target,this.config.readonly)return;const m=a._getClassName(p).split(" ")[0];switch(m){case"dhx_scale_holder":case"dhx_scale_holder_now":case"dhx_month_body":case"dhx_wa_day_data":if(!a.config.dblclick_create)break;this.addEventNow(this.getActionData(c).date,null,c);break;case"dhx_cal_event":case"dhx_wa_ev_body":case"dhx_agenda_line":case"dhx_cal_agenda_event_line":case"dhx_grid_event":case"dhx_cal_event_line":case"dhx_cal_event_clear":{const g=this._locate_event(p);if(!this.callEvent("onDblClick",[g,c]))return;this.config.details_on_dblclick||this._table_view||!this.getEvent(g)._timed||!this.config.select?this.showLightbox(g):this.edit(g);break}case"dhx_time_block":case"dhx_cal_container":return;default:{const g=this["dblclick_"+m];if(g)g.call(this,c);else if(p.parentNode&&p!=this)return a._on_dbl_click(c,p.parentNode);break}}},a._get_column_index=function(c){let p=0;if(this._cols){let m=0,g=0;for(;m+this._cols[g]=this._cols.length)for(;p>=1&&this._ignores[Math.floor(p)];)p--}return p},a._week_indexes_from_pos=function(c){if(this._cols){const p=this._get_column_index(c.x);return c.x=Math.min(this._cols.length-1,Math.max(0,Math.ceil(p)-1)),c.y=Math.max(0,Math.ceil(60*c.y/(this.config.time_step*this.config.hour_size_px))-1)+this.config.first_hour*(60/this.config.time_step),c}return c},a._mouse_coords=function(c){let p;const m=document.body,g=document.documentElement;p=this.$env.isIE||!c.pageX&&!c.pageY?{x:c.clientX+(m.scrollLeft||g.scrollLeft||0)-m.clientLeft,y:c.clientY+(m.scrollTop||g.scrollTop||0)-m.clientTop}:{x:c.pageX,y:c.pageY},this.config.rtl&&this._colsS?(p.x=this.$container.querySelector(".dhx_cal_data").offsetWidth-p.x,p.x+=this.$domHelpers.getAbsoluteLeft(this._obj),this._mode!=="month"&&(p.x-=this.xy.scale_width)):p.x-=this.$domHelpers.getAbsoluteLeft(this._obj)+(this._table_view?0:this.xy.scale_width);const y=this.$container.querySelector(".dhx_cal_data");p.y-=this.$domHelpers.getAbsoluteTop(y)-this._els.dhx_cal_data[0].scrollTop,p.ev=c;const x=this["mouse_"+this._mode];if(x)p=x.call(this,p);else if(this._table_view){const b=this._get_column_index(p.x);if(!this._cols||!this._colsS)return p;let k=0;for(k=1;kp.y);k++);p.y=Math.ceil(24*(Math.max(0,b)+7*Math.max(0,k-1))*60/this.config.time_step),(a._drag_mode||this._mode=="month")&&(p.y=24*(Math.max(0,Math.ceil(b)-1)+7*Math.max(0,k-1))*60/this.config.time_step),this._drag_mode=="move"&&a._ignores_detected&&a.config.preserve_length&&(p._ignores=!0,this._drag_event._event_length||(this._drag_event._event_length=this._get_real_event_length(this._drag_event.start_date,this._drag_event.end_date,{x_step:1,x_unit:"day"}))),p.x=0}else p=this._week_indexes_from_pos(p);return p.timestamp=+new Date,p},a._close_not_saved=function(){if(new Date().valueOf()-(a._new_event||0)>500&&a._edit_id){const c=a.locale.labels.confirm_closing;a._dhtmlx_confirm({message:c,title:a.locale.labels.title_confirm_closing,callback:function(){a.editStop(a.config.positive_closing)}}),c&&(this._drag_id=this._drag_pos=this._drag_mode=null)}},a._correct_shift=function(c,p){return c-6e4*(new Date(a._min_date).getTimezoneOffset()-new Date(c).getTimezoneOffset())*(p?-1:1)},a._is_pos_changed=function(c,p){function m(g,y,x){return Math.abs(g-y)>x}return!c||!this._drag_pos||!!(this._drag_pos.has_moved||!this._drag_pos.timestamp||p.timestamp-this._drag_pos.timestamp>100||m(c.ev.clientX,p.ev.clientX,5)||m(c.ev.clientY,p.ev.clientY,5))},a._correct_drag_start_date=function(c){let p;a.matrix&&(p=a.matrix[a._mode]),p=p||{x_step:1,x_unit:"day"},c=new Date(c);let m=1;return(p._start_correction||p._end_correction)&&(m=60*(p.last_hour||0)-(60*c.getHours()+c.getMinutes())||1),1*c+(a._get_fictional_event_length(c,m,p)-m)},a._correct_drag_end_date=function(c,p){let m;a.matrix&&(m=a.matrix[a._mode]),m=m||{x_step:1,x_unit:"day"};const g=1*c+a._get_fictional_event_length(c,p,m);return new Date(1*g-(a._get_fictional_event_length(g,-1,m,-1)+1))},a._on_mouse_move=function(c){if(this._drag_mode){var p=this._mouse_coords(c);if(this._is_pos_changed(this._drag_pos,p)){var m,g;if(this._edit_id!=this._drag_id&&this._close_not_saved(),!this._drag_mode)return;var y=null;if(this._drag_pos&&!this._drag_pos.has_moved&&((y=this._drag_pos).has_moved=!0),this._drag_pos=p,this._drag_pos.has_moved=!0,this._drag_mode=="create"){if(y&&(p=y),this._close_not_saved(),this.unselect(this._select_id),this._loading=!0,m=this._get_date_from_pos(p).valueOf(),!this._drag_start)return this.callEvent("onBeforeEventCreated",[c,this._drag_id])?(this._loading=!1,void(this._drag_start=m)):void(this._loading=!1);g=m,this._drag_start;var x=new Date(this._drag_start),b=new Date(g);this._mode!="day"&&this._mode!="week"||x.getHours()!=b.getHours()||x.getMinutes()!=b.getMinutes()||(b=new Date(this._drag_start+1e3)),this._drag_id=this.uid(),this.addEvent(x,b,this.locale.labels.new_event,this._drag_id,p.fields),this.callEvent("onEventCreated",[this._drag_id,c]),this._loading=!1,this._drag_mode="new-size"}var k,E=this.config.time_step,D=this.getEvent(this._drag_id);if(a.matrix&&(k=a.matrix[a._mode]),k=k||{x_step:1,x_unit:"day"},this._drag_mode=="move")m=this._min_date.valueOf()+6e4*(p.y*this.config.time_step+24*p.x*60),!p.custom&&this._table_view&&(m+=1e3*this.date.time_part(D.start_date)),!this._table_view&&this._dragEventBody&&this._drag_event._move_event_shift===void 0&&(this._drag_event._move_event_shift=m-D.start_date),this._drag_event._move_event_shift&&(m-=this._drag_event._move_event_shift),m=this._correct_shift(m),p._ignores&&this.config.preserve_length&&this._table_view&&k?(m=a._correct_drag_start_date(m),g=a._correct_drag_end_date(m,this._drag_event._event_length)):g=D.end_date.valueOf()-(D.start_date.valueOf()-m);else{if(m=D.start_date.valueOf(),g=D.end_date.valueOf(),this._table_view){var w=this._min_date.valueOf()+p.y*this.config.time_step*6e4+(p.custom?0:864e5);if(this._mode=="month")if(w=this._correct_shift(w,!1),this._drag_from_start){var S=864e5;w<=a.date.date_part(new Date(g+S-1)).valueOf()&&(m=w-S)}else g=w;else this.config.preserve_length?p.resize_from_start?m=a._correct_drag_start_date(w):g=a._correct_drag_end_date(w,0):p.resize_from_start?m=w:g=w}else{var M=this.date.date_part(new Date(D.end_date.valueOf()-1)).valueOf(),N=new Date(M),A=this.config.first_hour,T=60/E*(this.config.last_hour-A);this.config.time_step=1;var H=this._mouse_coords(c);this.config.time_step=E;var $=p.y*E*6e4,P=Math.min(p.y+1,T)*E*6e4,z=6e4*H.y;g=Math.abs($-z)>Math.abs(P-z)?M+P:M+$,g+=6e4*(new Date(g).getTimezoneOffset()-N.getTimezoneOffset()),this._els.dhx_cal_data[0].style.cursor="s-resize",this._mode!="week"&&this._mode!="day"||(g=this._correct_shift(g))}if(this._drag_mode=="new-size")if(g<=this._drag_start){var K=p.shift||(this._table_view&&!p.custom?864e5:0);m=g-(p.shift?0:K),g=this._drag_start+(K||6e4*E)}else m=this._drag_start;else g<=m&&(g=m+6e4*E)}var U=new Date(g-1),q=new Date(m);if(this._drag_mode=="move"&&a.config.limit_drag_out&&(+q<+a._min_date||+g>+a._max_date)){if(+D.start_date<+a._min_date||+D.end_date>+a._max_date)q=new Date(D.start_date),g=new Date(D.end_date);else{var F=g-q;+q<+a._min_date?(q=new Date(a._min_date),p._ignores&&this.config.preserve_length&&this._table_view?(q=new Date(a._correct_drag_start_date(q)),k._start_correction&&(q=new Date(q.valueOf()+k._start_correction)),g=new Date(1*q+this._get_fictional_event_length(q,this._drag_event._event_length,k))):g=new Date(+q+F)):(g=new Date(a._max_date),p._ignores&&this.config.preserve_length&&this._table_view?(k._end_correction&&(g=new Date(g.valueOf()-k._end_correction)),g=new Date(1*g-this._get_fictional_event_length(g,0,k,!0)),q=new Date(1*g-this._get_fictional_event_length(g,this._drag_event._event_length,k,!0)),this._ignores_detected&&(q=a.date.add(q,k.x_step,k.x_unit),g=new Date(1*g-this._get_fictional_event_length(g,0,k,!0)),g=a.date.add(g,k.x_step,k.x_unit))):q=new Date(+g-F))}U=new Date(g-1)}if(!this._table_view&&this._dragEventBody&&!a.config.all_timed&&(!a._get_section_view()&&p.x!=this._get_event_sday({start_date:new Date(m),end_date:new Date(m)})||new Date(m).getHours()=this.config.last_hour)||(F=g-q,S=this._min_date.valueOf()+24*p.x*60*6e4,(g=a.date.date_part(new Date(S))).setHours(this.config.last_hour),U=new Date(g-1),this._drag_mode=="move"&&(q=new Date(+g-F))),this._table_view||U.getDate()==q.getDate()&&U.getHours()=y?H+=" dhx_after":m.valueOf()==b.valueOf()&&(H+=" dhx_now"),this._ignores_detected&&this._ignores[A]&&(H+=" dhx_scale_ignore"),T.className=H+" "+this.templates.month_date_class(m,b),T.setAttribute("data-cell-date",a.templates.format_date(m));var $="dhx_month_body",P="dhx_month_head";if(A===0&&this.config.left_border&&($+=" dhx_month_body_border",P+=" dhx_month_head_border"),this._ignores_detected&&this._ignores[A])T.appendChild(document.createElement("div")),T.appendChild(document.createElement("div"));else{T.style.width=k[A],this._waiAria.monthCellAttr(T,m);var z=document.createElement("div");z.style.height=a.xy.month_head_height+"px",z.className=P,z.innerHTML=this.templates.month_day(m),T.appendChild(z);var K=document.createElement("div");K.className=$,T.appendChild(K)}var U=m.getDate();(m=this.date.add(m,1,"day")).getDate()-U>1&&(m=new Date(m.getFullYear(),m.getMonth(),U+1,12,0))}a._colsS.heights[E]=S,S+=w(E)}return this._min_date=x,this._max_date=m,c.innerHTML="",c.appendChild(M),this._scales={},c.querySelectorAll("[data-cell-date]").forEach(q=>{const F=a.templates.parse_date(q.getAttribute("data-cell-date")),ke=q.querySelector(".dhx_month_body");this._scales[+F]=ke,this.callEvent("onScaleAdd",[this._scales[+F],F])}),this._max_date},a._reset_month_scale=function(c,p,m,g){var y=a.date.add(p,1,"month"),x=a._currentDate();this.date.date_part(x),this.date.date_part(m),g=g||Math.ceil(Math.round((y.valueOf()-m.valueOf())/864e5)/7);var b=Math.floor(c.clientHeight/g)-this.xy.month_head_height;return this._colsS.height=b+this.xy.month_head_height,this._colsS.heights=[],a._render_month_scale(c,p,m,g)},a.getView=function(c){return c||(c=a.getState().mode),a.matrix&&a.matrix[c]?a.matrix[c]:a._props&&a._props[c]?a._props[c]:null},a.getLabel=function(c,p){for(var m=this.config.lightbox.sections,g=0;ga.getState().max_date.valueOf()&&(g+=f(p,a.getState().max_date))):g=Math.round(y/60/60/1e3/24);for(var k=!0;bT.valueOf()&&(D+=S-T),S.valueOf()>A.valueOf()?D+=m._start_correction:D+=60*S.getHours()*60*1e3+60*S.getMinutes()*1e3,w.valueOf()`,"gm"),l=new RegExp(" +","gm");function h(c){return(c+"").replace(o," ").replace(l," ")}var v=new RegExp("'","gm");function u(c){return(c+"").replace(v,"'")}for(var f in a._waiAria={getAttributeString:function(c){var p=[" "];for(var m in c)if(typeof c[m]!="function"&&typeof c[m]!="object"){var g=u(h(c[m]));p.push(m+"='"+g+"'")}return p.push(" "),p.join(" ")},setAttributes:function(c,p){for(var m in p)c.setAttribute(m,h(p[m]));return c},labelAttr:function(c,p){return this.setAttributes(c,{"aria-label":p})},label:function(c){return a._waiAria.getAttributeString({"aria-label":c})},hourScaleAttr:function(c,p){this.labelAttr(c,p)},monthCellAttr:function(c,p){this.labelAttr(c,a.templates.day_date(p))},navBarDateAttr:function(c,p){this.labelAttr(c,p)},dayHeaderAttr:function(c,p){this.labelAttr(c,p)},dayColumnAttr:function(c,p){this.dayHeaderAttr(c,a.templates.day_date(p))},headerButtonsAttributes:function(c,p){return this.setAttributes(c,{role:"button","aria-label":p})},headerToggleState:function(c,p){return this.setAttributes(c,{"aria-pressed":p?"true":"false"})},getHeaderCellAttr:function(c){return a._waiAria.getAttributeString({"aria-label":c})},eventAttr:function(c,p){this._eventCommonAttr(c,p)},_eventCommonAttr:function(c,p){p.setAttribute("aria-label",h(a.templates.event_text(c.start_date,c.end_date,c))),a.config.readonly&&p.setAttribute("aria-readonly",!0),c.$dataprocessor_class&&p.setAttribute("aria-busy",!0),p.setAttribute("aria-selected",a.getState().select_id==c.id?"true":"false")},setEventBarAttr:function(c,p){this._eventCommonAttr(c,p)},_getAttributes:function(c,p){var m={setAttribute:function(g,y){this[g]=y}};return c.apply(this,[p,m]),m},eventBarAttrString:function(c){return this.getAttributeString(this._getAttributes(this.setEventBarAttr,c))},agendaHeadAttrString:function(){return this.getAttributeString({role:"row"})},agendaHeadDateString:function(c){return this.getAttributeString({role:"columnheader","aria-label":c})},agendaHeadDescriptionString:function(c){return this.agendaHeadDateString(c)},agendaDataAttrString:function(){return this.getAttributeString({role:"grid"})},agendaEventAttrString:function(c){var p=this._getAttributes(this._eventCommonAttr,c);return p.role="row",this.getAttributeString(p)},agendaDetailsBtnString:function(){return this.getAttributeString({role:"button","aria-label":a.locale.labels.icon_details})},gridAttrString:function(){return this.getAttributeString({role:"grid"})},gridRowAttrString:function(c){return this.agendaEventAttrString(c)},gridCellAttrString:function(c,p,m){return this.getAttributeString({role:"gridcell","aria-label":[p.label===void 0?p.id:p.label,": ",m]})},mapAttrString:function(){return this.gridAttrString()},mapRowAttrString:function(c){return this.gridRowAttrString(c)},mapDetailsBtnString:function(){return this.agendaDetailsBtnString()},minicalHeader:function(c,p){this.setAttributes(c,{id:p+"","aria-live":"assertice","aria-atomic":"true"})},minicalGrid:function(c,p){this.setAttributes(c,{"aria-labelledby":p+"",role:"grid"})},minicalRow:function(c){this.setAttributes(c,{role:"row"})},minicalDayCell:function(c,p){var m=p.valueOf()=a._min_date.valueOf();this.setAttributes(c,{role:"gridcell","aria-label":a.templates.day_date(p),"aria-selected":m?"true":"false"})},minicalHeadCell:function(c){this.setAttributes(c,{role:"columnheader"})},weekAgendaDayCell:function(c,p){var m=c.querySelector(".dhx_wa_scale_bar"),g=c.querySelector(".dhx_wa_day_data"),y=a.uid()+"";this.setAttributes(m,{id:y}),this.setAttributes(g,{"aria-labelledby":y})},weekAgendaEvent:function(c,p){this.eventAttr(p,c)},lightboxHiddenAttr:function(c){c.setAttribute("aria-hidden","true")},lightboxVisibleAttr:function(c){c.setAttribute("aria-hidden","false")},lightboxSectionButtonAttrString:function(c){return this.getAttributeString({role:"button","aria-label":c,tabindex:"0"})},yearHeader:function(c,p){this.setAttributes(c,{id:p+""})},yearGrid:function(c,p){this.minicalGrid(c,p)},yearHeadCell:function(c){return this.minicalHeadCell(c)},yearRow:function(c){return this.minicalRow(c)},yearDayCell:function(c){this.setAttributes(c,{role:"gridcell"})},lightboxAttr:function(c){c.setAttribute("role","dialog"),c.setAttribute("aria-hidden","true"),c.firstChild.setAttribute("role","heading")},lightboxButtonAttrString:function(c){return this.getAttributeString({role:"button","aria-label":a.locale.labels[c],tabindex:"0"})},eventMenuAttrString:function(c){return this.getAttributeString({role:"button","aria-label":a.locale.labels[c]})},lightboxHeader:function(c,p){c.setAttribute("aria-label",p)},lightboxSelectAttrString:function(c){var p="";switch(c){case"%Y":p=a.locale.labels.year;break;case"%m":p=a.locale.labels.month;break;case"%d":p=a.locale.labels.day;break;case"%H:%i":p=a.locale.labels.hour+" "+a.locale.labels.minute}return a._waiAria.getAttributeString({"aria-label":p})},messageButtonAttrString:function(c){return"tabindex='0' role='button' aria-label='"+c+"'"},messageInfoAttr:function(c){c.setAttribute("role","alert")},messageModalAttr:function(c,p){c.setAttribute("role","dialog"),p&&c.setAttribute("aria-labelledby",p)},quickInfoAttr:function(c){c.setAttribute("role","dialog")},quickInfoHeaderAttrString:function(){return" role='heading' "},quickInfoHeader:function(c,p){c.setAttribute("aria-label",p)},quickInfoButtonAttrString:function(c){return a._waiAria.getAttributeString({role:"button","aria-label":c,tabindex:"0"})},tooltipAttr:function(c){c.setAttribute("role","tooltip")},tooltipVisibleAttr:function(c){c.setAttribute("aria-hidden","false")},tooltipHiddenAttr:function(c){c.setAttribute("aria-hidden","true")}},a._waiAria)a._waiAria[f]=function(c){return function(){return a.config.wai_aria_attributes?c.apply(this,arguments):" "}}(a._waiAria[f])})()}(i),i.utils=ee,i.$domHelpers=se,i.utils.dom=se,i.uid=ee.uid,i.mixin=ee.mixin,i.defined=ee.defined,i.assert=function(a){return function(o,l){o||a.config.show_errors&&a.callEvent("onError",[l])!==!1&&(a.message?a.message({type:"error",text:l,expire:-1}):console.log(l))}}(i),i.copy=ee.copy,i._createDatePicker=function(a,o){return new Da(i,a,o)},i._getFocusableNodes=se.getFocusableNodes,i._getClassName=se.getClassName,i._locate_css=se.locateCss;const t=Wt(i);var r,d,n;i.utils.mixin(i,t),i.env=i.$env=Yt,i.Promise=window.Promise,function(a){a.destructor=function(){for(var o in a.callEvent("onDestroy",[]),this.clearAll(),this.$container&&(this.$container.innerHTML=""),this._eventRemoveAll&&this._eventRemoveAll(),this.resetLightbox&&this.resetLightbox(),this._dp&&this._dp.destructor&&this._dp.destructor(),this.detachAllEvents(),this)o.indexOf("$")===0&&delete this[o];a.$destroyed=!0}}(i),function(a){function o(l,h){var v={method:l};if(h.length===0)throw new Error("Arguments list of query is wrong.");if(h.length===1)return typeof h[0]=="string"?(v.url=h[0],v.async=!0):(v.url=h[0].url,v.async=h[0].async||!0,v.callback=h[0].callback,v.headers=h[0].headers),h[0].data?typeof h[0].data!="string"?v.data=Oe(h[0].data):v.data=h[0].data:v.data="",v;switch(v.url=h[0],l){case"GET":case"DELETE":v.callback=h[1],v.headers=h[2];break;case"POST":case"PUT":h[1]?typeof h[1]!="string"?v.data=Oe(h[1]):v.data=h[1]:v.data="",v.callback=h[2],v.headers=h[3]}return v}a.Promise=window.Promise,a.ajax={cache:!0,method:"get",serializeRequestParams:Oe,parse:function(l){return typeof l!="string"?l:(l=l.replace(/^[\s]+/,""),typeof DOMParser>"u"||a.$env.isIE?window.ActiveXObject!==void 0&&((h=new window.ActiveXObject("Microsoft.XMLDOM")).async="false",h.loadXML(l)):h=new DOMParser().parseFromString(l,"text/xml"),h);var h},xmltop:function(l,h,v){if(h.status===void 0||h.status<400){var u=h.responseXML?h.responseXML||h:this.parse(h.responseText||h);if(u&&u.documentElement!==null&&!u.getElementsByTagName("parsererror").length)return u.getElementsByTagName(l)[0]}return v!==-1&&a.callEvent("onLoadXMLError",["Incorrect XML",arguments[1],v]),document.createElement("DIV")},xpath:function(l,h){if(h.nodeName||(h=h.responseXML||h),a.$env.isIE)return h.selectNodes(l)||[];for(var v,u=[],f=(h.ownerDocument||h).evaluate(l,h,null,XPathResult.ANY_TYPE,null);v=f.iterateNext();)u.push(v);return u},query:function(l){return this._call(l.method||"GET",l.url,l.data||"",l.async||!0,l.callback,l.headers)},get:function(l,h,v){var u=o("GET",arguments);return this.query(u)},getSync:function(l,h){var v=o("GET",arguments);return v.async=!1,this.query(v)},put:function(l,h,v,u){var f=o("PUT",arguments);return this.query(f)},del:function(l,h,v){var u=o("DELETE",arguments);return this.query(u)},post:function(l,h,v,u){arguments.length==1?h="":arguments.length==2&&typeof h=="function"&&(v=h,h="");var f=o("POST",arguments);return this.query(f)},postSync:function(l,h,v){h=h===null?"":String(h);var u=o("POST",arguments);return u.async=!1,this.query(u)},_call:function(l,h,v,u,f,c){return new a.Promise((function(p,m){var g=typeof XMLHttpRequest===void 0||a.$env.isIE?new window.ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest,y=navigator.userAgent.match(/AppleWebKit/)!==null&&navigator.userAgent.match(/Qt/)!==null&&navigator.userAgent.match(/Safari/)!==null;if(u&&g.addEventListener("readystatechange",function(){if(g.readyState==4||y&&g.readyState==3){if((g.status!=200||g.responseText==="")&&!a.callEvent("onAjaxError",[g]))return;setTimeout(function(){typeof f=="function"&&f.apply(window,[{xmlDoc:g,filePath:h}]),p(g),typeof f=="function"&&(f=null,g=null)},0)}}),l!="GET"||this.cache||(h+=(h.indexOf("?")>=0?"&":"?")+"dhxr"+new Date().getTime()+"=1"),g.open(l,h,u),c)for(var x in c)g.setRequestHeader(x,c[x]);else l.toUpperCase()=="POST"||l=="PUT"||l=="DELETE"?g.setRequestHeader("Content-Type","application/x-www-form-urlencoded"):l=="GET"&&(v=null);if(g.setRequestHeader("X-Requested-With","XMLHttpRequest"),g.send(v),!u)return{xmlDoc:g,filePath:h}}).bind(this))},urlSeparator:function(l){return l.indexOf("?")!=-1?"&":"?"}},a.$ajax=a.ajax}(i),Ut(i),function(a){a.config={default_date:"%j %M %Y",month_date:"%F %Y",load_date:"%Y-%m-%d",week_date:"%l",day_date:"%D %j",hour_date:"%H:%i",month_day:"%d",date_format:"%Y-%m-%d %H:%i",api_date:"%d-%m-%Y %H:%i",parse_exact_format:!1,preserve_length:!0,time_step:5,displayed_event_color:"#ff4a4a",displayed_event_text_color:"#ffef80",wide_form:0,day_column_padding:8,use_select_menu_space:!0,fix_tab_position:!0,start_on_monday:!0,first_hour:0,last_hour:24,readonly:!1,drag_resize:!0,drag_move:!0,drag_create:!0,drag_event_body:!0,dblclick_create:!0,details_on_dblclick:!0,edit_on_create:!0,details_on_create:!0,header:null,hour_size_px:44,resize_month_events:!1,resize_month_timed:!1,responsive_lightbox:!1,separate_short_events:!0,rtl:!1,cascade_event_display:!1,cascade_event_count:4,cascade_event_margin:30,multi_day:!0,multi_day_height_limit:200,drag_lightbox:!0,preserve_scroll:!0,select:!0,undo_deleted:!0,server_utc:!1,touch:!0,touch_tip:!0,touch_drag:500,touch_swipe_dates:!1,quick_info_detached:!0,positive_closing:!1,drag_highlight:!0,limit_drag_out:!1,icons_edit:["icon_save","icon_cancel"],icons_select:["icon_details","icon_edit","icon_delete"],buttons_left:["dhx_save_btn","dhx_cancel_btn"],buttons_right:["dhx_delete_btn"],lightbox:{sections:[{name:"description",map_to:"text",type:"textarea",focus:!0},{name:"time",height:72,type:"time",map_to:"auto"}]},highlight_displayed_event:!0,left_border:!1,ajax_error:"alert",delay_render:0,timeline_swap_resize:!0,wai_aria_attributes:!0,wai_aria_application_role:!0,csp:"auto",event_attribute:"data-event-id",show_errors:!0},a.config.buttons_left.$initial=a.config.buttons_left.join(),a.config.buttons_right.$initial=a.config.buttons_right.join(),a._helpers={parseDate:function(o){return(a.templates.xml_date||a.templates.parse_date)(o)},formatDate:function(o){return(a.templates.xml_format||a.templates.format_date)(o)}},a.templates={},a.init_templates=function(){var o=a.date.date_to_str,l=a.config;(function(h,v){for(var u in v)h[u]||(h[u]=v[u])})(a.templates,{day_date:o(l.default_date),month_date:o(l.month_date),week_date:function(h,v){return l.rtl?a.templates.day_date(a.date.add(v,-1,"day"))+" – "+a.templates.day_date(h):a.templates.day_date(h)+" – "+a.templates.day_date(a.date.add(v,-1,"day"))},day_scale_date:o(l.default_date),time_slot_text:function(h){return""},time_slot_class:function(h){return""},month_scale_date:o(l.week_date),week_scale_date:o(l.day_date),hour_scale:o(l.hour_date),time_picker:o(l.hour_date),event_date:o(l.hour_date),month_day:o(l.month_day),load_format:o(l.load_date),format_date:o(l.date_format,l.server_utc),parse_date:a.date.str_to_date(l.date_format,l.server_utc),api_date:a.date.str_to_date(l.api_date,!1,!1),event_header:function(h,v,u){return u._mode==="small"||u._mode==="smallest"?a.templates.event_date(h):a.templates.event_date(h)+" - "+a.templates.event_date(v)},event_text:function(h,v,u){return u.text},event_class:function(h,v,u){return""},month_date_class:function(h){return""},week_date_class:function(h){return""},event_bar_date:function(h,v,u){return a.templates.event_date(h)},event_bar_text:function(h,v,u){return u.text},month_events_link:function(h,v){return"View more("+v+" events)"},drag_marker_class:function(h,v,u){return""},drag_marker_content:function(h,v,u){return""},tooltip_date_format:a.date.date_to_str("%Y-%m-%d %H:%i"),tooltip_text:function(h,v,u){return"Event: "+u.text+"
Start date: "+a.templates.tooltip_date_format(h)+"
End date: "+a.templates.tooltip_date_format(v)},calendar_month:o("%F %Y"),calendar_scale_date:o("%D"),calendar_date:o("%d"),calendar_time:o("%d-%m-%Y")}),this.callEvent("onTemplatesReady",[])}}(i),function(a){a._events={},a.clearAll=function(){this._events={},this._loaded={},this._edit_id=null,this._select_id=null,this._drag_id=null,this._drag_mode=null,this._drag_pos=null,this._new_event=null,this.clear_view(),this.callEvent("onClearAll",[])},a.addEvent=function(o,l,h,v,u){if(!arguments.length)return this.addEventNow();var f=o;arguments.length!=1&&((f=u||{}).start_date=o,f.end_date=l,f.text=h,f.id=v),f.id=f.id||a.uid(),f.text=f.text||"",typeof f.start_date=="string"&&(f.start_date=this.templates.api_date(f.start_date)),typeof f.end_date=="string"&&(f.end_date=this.templates.api_date(f.end_date));var c=6e4*(this.config.event_duration||this.config.time_step);f.start_date.valueOf()==f.end_date.valueOf()&&f.end_date.setTime(f.end_date.valueOf()+c),f.start_date.setMilliseconds(0),f.end_date.setMilliseconds(0),f._timed=this.isOneDayEvent(f);var p=!this._events[f.id];return this._events[f.id]=f,this.event_updated(f),this._loading||this.callEvent(p?"onEventAdded":"onEventChanged",[f.id,f]),f.id},a.deleteEvent=function(o,l){var h=this._events[o];(l||this.callEvent("onBeforeEventDelete",[o,h])&&this.callEvent("onConfirmedBeforeEventDelete",[o,h]))&&(h&&(a.getState().select_id==o&&a.unselect(),delete this._events[o],this.event_updated(h),this._drag_id==h.id&&(this._drag_id=null,this._drag_mode=null,this._drag_pos=null)),this.callEvent("onEventDeleted",[o,h]))},a.getEvent=function(o){return this._events[o]},a.setEvent=function(o,l){l.id||(l.id=o),this._events[o]=l},a.for_rendered=function(o,l){for(var h=this._rendered.length-1;h>=0;h--)this._rendered[h].getAttribute(this.config.event_attribute)==o&&l(this._rendered[h],h)},a.changeEventId=function(o,l){if(o!=l){var h=this._events[o];h&&(h.id=l,this._events[l]=h,delete this._events[o]),this.for_rendered(o,function(v){v.setAttribute("event_id",l),v.setAttribute(a.config.event_attribute,l)}),this._select_id==o&&(this._select_id=l),this._edit_id==o&&(this._edit_id=l),this.callEvent("onEventIdChange",[o,l])}},function(){for(var o=["text","Text","start_date","StartDate","end_date","EndDate"],l=function(u){return function(f){return a.getEvent(f)[u]}},h=function(u){return function(f,c){var p=a.getEvent(f);p[u]=c,p._changed=!0,p._timed=this.isOneDayEvent(p),a.event_updated(p,!0)}},v=0;vv||h<=u)&&(l>=v||l24-(this.config.last_hour-this.config.first_hour)||lu))}return!1},a.isOneDayEvent=function(o){var l=new Date(o.end_date.valueOf()-1);return o.start_date.getFullYear()===l.getFullYear()&&o.start_date.getMonth()===l.getMonth()&&o.start_date.getDate()===l.getDate()&&o.end_date.valueOf()-o.start_date.valueOf()<864e5},a.get_visible_events=function(o){var l=[];for(var h in this._events)this.is_visible_events(this._events[h])&&(o&&!this._events[h]._timed||this.filter_event(h,this._events[h])&&l.push(this._events[h]));return l},a.filter_event=function(o,l){var h=this["filter_"+this._mode];return!h||h(o,l)},a._is_main_area_event=function(o){return!!o._timed},a.render_view_data=function(o,l){var h=!1;if(!o){if(h=!0,this._not_render)return void(this._render_wait=!0);this._render_wait=!1,this.clear_view(),o=this.get_visible_events(!(this._table_view||this.config.multi_day))}for(var v=0,u=o.length;vg){var y=g;1*this.config.max_month_events!==this.config.max_month_events||u[p]<=this.config.max_month_events?y=u[p]*h:(this.config.max_month_events+1)*h>g&&(y=(this.config.max_month_events+1)*h),c[p].style.height=y+this.xy.month_head_height+"px"}u[p]=(u[p-1]||0)+a._get_first_visible_cell(m).offsetHeight}u.unshift(0);const N=this.$container.querySelector(".dhx_cal_data");if(N.offsetHeightN.id?1:-1:M.start_date>N.start_date?1:-1});var h=[],v=[];this._min_mapped_duration=Math.floor(60*this.xy.min_event_height/this.config.hour_size_px);for(var u=0;uS&&(S=y[E]._sorder);f._sorder=S+1,f._inner=!1}else f._sorder=0;y.splice(b,b==y.length?0:1,f),y.length>(y.max_count||0)?(y.max_count=y.length,f._count=y.length):f._count=f._count?f._count:1}(m=this.config.last_hour)&&(v.push(f),o[u]=f=this._copy_event(f),m=this.config.last_hour&&(f.end_date.setMinutes(0),f.end_date.setHours(this.config.last_hour)),f.start_date>f.end_date||m==this.config.last_hour)&&(o.splice(u,1),u--)}}if(!l){for(u=0;uh.id?1:-1:l.start_date>h.start_date?1:-1})},a._is_any_multiday_cell_visible=function(o,l,h){var v=this._cols.length,u=!1,f=o,c=!0,p=new Date(l);for(a.date.day_start(new Date(l)).valueOf()!=l.valueOf()&&(p=a.date.day_start(p),p=a.date.add(p,1,"day"));fthis._max_date&&(x.last_chunk=!1,k=this._max_date);var E=this.locate_holder_day(b,!1,g);if(g._sday=E%c,!this._ignores[g._sday]||!g._timed){var D=this.locate_holder_day(k,!0,g)||c;if(g._eday=D%c||c,g._length=D-E,g._sweek=Math.floor((this._correct_shift(b.valueOf(),1)-this._min_date.valueOf())/(864e5*c)),a._is_any_multiday_cell_visible(b,k,g)){var w,S=u[g._sweek];for(w=0;w"+o.text+"",this._editor=M.querySelector("textarea"),a.event(this._editor,"keydown",function(P){if(P.shiftKey)return!0;var z=P.keyCode;z==a.keys.edit_save&&a.editStop(!0),z==a.keys.edit_cancel&&a.editStop(!1),z!=a.keys.edit_save&&z!=a.keys.edit_cancel||P.preventDefault&&P.preventDefault()}),a.event(this._editor,"selectstart",function(P){return P.cancelBubble=!0,!0}),a._focus(this._editor,!0),this._els.dhx_cal_data[0].scrollLeft=0}if(this.xy.menu_width!==0&&this._select_id==o.id){this.config.cascade_event_display&&this._drag_mode&&(w.style.zIndex=1);for(var N,A=this.config["icons_"+(this._edit_id==o.id?"edit":"select")],T="",H=0;H
`}var $=this._render_v_bar(o,b-v-1,p,v,null,"","
",T,!0);o.color&&$.style.setProperty("--dhx-scheduler-event-background",o.color),o.textColor&&$.style.setProperty("--dhx-scheduler-event-color",o.textColor),this._els.dhx_cal_data[0].appendChild($),this._rendered.push($)}this.config.drag_highlight&&this._drag_id==o.id&&this.highlightEventPosition(o)}}},a._render_v_bar=function(o,l,h,v,u,f,c,p,m){var g=document.createElement("div"),y=o.id,x=m?"dhx_cal_event dhx_cal_select_menu":"dhx_cal_event",b=a.getState();b.drag_id==o.id&&(x+=" dhx_cal_event_drag"),b.select_id==o.id&&(x+=" dhx_cal_event_selected");var k=a.templates.event_class(o.start_date,o.end_date,o);k&&(x=x+" "+k),this.config.cascade_event_display&&(x+=" dhx_cal_event_cascade");var E=v-1,D=`
3&&(g!==void 0&&(this.config.rtl&&(b="right"),c.style[b]=g+"px"),y!==void 0&&(c.style.top=y+"px"))},a.get_elements=function(){const c=this._obj.getElementsByTagName("DIV");for(let f=0;f500&&a.unselect()},dhx_cal_prev_button:function(){a._click.dhx_cal_next_button(0,-1)},dhx_cal_next_button:function(c,f){let p=1;a.config.rtl&&(f=-f,p=-p),a.setCurrentView(a.date.add(a.date[a._mode+"_start"](new Date(a._date)),f||p,a._mode))},dhx_cal_today_button:function(){a.callEvent("onBeforeTodayDisplayed",[])&&a.setCurrentView(a._currentDate())},dhx_cal_tab:function(){const c=this.getAttribute("data-tab"),f=this.getAttribute("name"),p=c||f.substring(0,f.search("_tab"));a.setCurrentView(a._date,p)},buttons:{delete:function(c){const f=a.locale.labels.confirm_deleting;a._dhtmlx_confirm({message:f,title:a.locale.labels.title_confirm_deleting,callback:function(){a.deleteEvent(c)},config:{ok:a.locale.labels.icon_delete}})},edit:function(c){a.edit(c)},save:function(c){a.editStop(!0)},details:function(c){a.showLightbox(c)},form:function(c){a.showLightbox(c)},cancel:function(c){a.editStop(!1)}}},a._dhtmlx_confirm=function({message:c,title:f,callback:p,config:g}){if(!c)return p();g=g||{};const y={...g,text:c};f&&(y.title=f),p&&(y.callback=function(x){x&&p()}),a.confirm(y)},a.addEventNow=function(c,f,p){let g={};a._isObject(c)&&!a._isDate(c)&&(g=c,c=null);const y=6e4*(this.config.event_duration||this.config.time_step);c||(c=g.start_date||Math.round(a._currentDate().valueOf()/y)*y);let x=new Date(c);if(!f){let w=this.config.first_hour;w>x.getHours()&&(x.setHours(w),c=x.valueOf()),f=c.valueOf()+y}let b=new Date(f);x.valueOf()==b.valueOf()&&b.setTime(b.valueOf()+y),g.start_date=g.start_date||x,g.end_date=g.end_date||b,g.text=g.text||this.locale.labels.new_event,g.id=this._drag_id=g.id||this.uid(),this._drag_mode="new-size",this._loading=!0;const k=this.addEvent(g);return this.callEvent("onEventCreated",[this._drag_id,p]),this._loading=!1,this._drag_event={},this._on_mouse_up(p),k},a._on_dbl_click=function(c,f){if(f=f||c.target,this.config.readonly)return;const p=a._getClassName(f).split(" ")[0];switch(p){case"dhx_scale_holder":case"dhx_scale_holder_now":case"dhx_month_body":case"dhx_wa_day_data":if(!a.config.dblclick_create)break;this.addEventNow(this.getActionData(c).date,null,c);break;case"dhx_cal_event":case"dhx_wa_ev_body":case"dhx_agenda_line":case"dhx_cal_agenda_event_line":case"dhx_grid_event":case"dhx_cal_event_line":case"dhx_cal_event_clear":{const g=this._locate_event(f);if(!this.callEvent("onDblClick",[g,c]))return;this.config.details_on_dblclick||this._table_view||!this.getEvent(g)._timed||!this.config.select?this.showLightbox(g):this.edit(g);break}case"dhx_time_block":case"dhx_cal_container":return;default:{const g=this["dblclick_"+p];if(g)g.call(this,c);else if(f.parentNode&&f!=this)return a._on_dbl_click(c,f.parentNode);break}}},a._get_column_index=function(c){let f=0;if(this._cols){let p=0,g=0;for(;p+this._cols[g]=this._cols.length)for(;f>=1&&this._ignores[Math.floor(f)];)f--}return f},a._week_indexes_from_pos=function(c){if(this._cols){const f=this._get_column_index(c.x);return c.x=Math.min(this._cols.length-1,Math.max(0,Math.ceil(f)-1)),c.y=Math.max(0,Math.ceil(60*c.y/(this.config.time_step*this.config.hour_size_px))-1)+this.config.first_hour*(60/this.config.time_step),c}return c},a._mouse_coords=function(c){let f;const p=document.body,g=document.documentElement;f=this.$env.isIE||!c.pageX&&!c.pageY?{x:c.clientX+(p.scrollLeft||g.scrollLeft||0)-p.clientLeft,y:c.clientY+(p.scrollTop||g.scrollTop||0)-p.clientTop}:{x:c.pageX,y:c.pageY},this.config.rtl&&this._colsS?(f.x=this.$container.querySelector(".dhx_cal_data").offsetWidth-f.x,f.x+=this.$domHelpers.getAbsoluteLeft(this._obj),this._mode!=="month"&&(f.x-=this.xy.scale_width)):f.x-=this.$domHelpers.getAbsoluteLeft(this._obj)+(this._table_view?0:this.xy.scale_width);const y=this.$container.querySelector(".dhx_cal_data");f.y-=this.$domHelpers.getAbsoluteTop(y)-this._els.dhx_cal_data[0].scrollTop,f.ev=c;const x=this["mouse_"+this._mode];if(x)f=x.call(this,f);else if(this._table_view){const b=this._get_column_index(f.x);if(!this._cols||!this._colsS)return f;let k=0;for(k=1;kf.y);k++);f.y=Math.ceil(24*(Math.max(0,b)+7*Math.max(0,k-1))*60/this.config.time_step),(a._drag_mode||this._mode=="month")&&(f.y=24*(Math.max(0,Math.ceil(b)-1)+7*Math.max(0,k-1))*60/this.config.time_step),this._drag_mode=="move"&&a._ignores_detected&&a.config.preserve_length&&(f._ignores=!0,this._drag_event._event_length||(this._drag_event._event_length=this._get_real_event_length(this._drag_event.start_date,this._drag_event.end_date,{x_step:1,x_unit:"day"}))),f.x=0}else f=this._week_indexes_from_pos(f);return f.timestamp=+new Date,f},a._close_not_saved=function(){if(new Date().valueOf()-(a._new_event||0)>500&&a._edit_id){const c=a.locale.labels.confirm_closing;a._dhtmlx_confirm({message:c,title:a.locale.labels.title_confirm_closing,callback:function(){a.editStop(a.config.positive_closing)}}),c&&(this._drag_id=this._drag_pos=this._drag_mode=null)}},a._correct_shift=function(c,f){return c-6e4*(new Date(a._min_date).getTimezoneOffset()-new Date(c).getTimezoneOffset())*(f?-1:1)},a._is_pos_changed=function(c,f){function p(g,y,x){return Math.abs(g-y)>x}return!c||!this._drag_pos||!!(this._drag_pos.has_moved||!this._drag_pos.timestamp||f.timestamp-this._drag_pos.timestamp>100||p(c.ev.clientX,f.ev.clientX,5)||p(c.ev.clientY,f.ev.clientY,5))},a._correct_drag_start_date=function(c){let f;a.matrix&&(f=a.matrix[a._mode]),f=f||{x_step:1,x_unit:"day"},c=new Date(c);let p=1;return(f._start_correction||f._end_correction)&&(p=60*(f.last_hour||0)-(60*c.getHours()+c.getMinutes())||1),1*c+(a._get_fictional_event_length(c,p,f)-p)},a._correct_drag_end_date=function(c,f){let p;a.matrix&&(p=a.matrix[a._mode]),p=p||{x_step:1,x_unit:"day"};const g=1*c+a._get_fictional_event_length(c,f,p);return new Date(1*g-(a._get_fictional_event_length(g,-1,p,-1)+1))},a._on_mouse_move=function(c){if(this._drag_mode){var f=this._mouse_coords(c);if(this._is_pos_changed(this._drag_pos,f)){var p,g;if(this._edit_id!=this._drag_id&&this._close_not_saved(),!this._drag_mode)return;var y=null;if(this._drag_pos&&!this._drag_pos.has_moved&&((y=this._drag_pos).has_moved=!0),this._drag_pos=f,this._drag_pos.has_moved=!0,this._drag_mode=="create"){if(y&&(f=y),this._close_not_saved(),this.unselect(this._select_id),this._loading=!0,p=this._get_date_from_pos(f).valueOf(),!this._drag_start)return this.callEvent("onBeforeEventCreated",[c,this._drag_id])?(this._loading=!1,void(this._drag_start=p)):void(this._loading=!1);g=p,this._drag_start;var x=new Date(this._drag_start),b=new Date(g);this._mode!="day"&&this._mode!="week"||x.getHours()!=b.getHours()||x.getMinutes()!=b.getMinutes()||(b=new Date(this._drag_start+1e3)),this._drag_id=this.uid(),this.addEvent(x,b,this.locale.labels.new_event,this._drag_id,f.fields),this.callEvent("onEventCreated",[this._drag_id,c]),this._loading=!1,this._drag_mode="new-size"}var k,w=this.config.time_step,D=this.getEvent(this._drag_id);if(a.matrix&&(k=a.matrix[a._mode]),k=k||{x_step:1,x_unit:"day"},this._drag_mode=="move")p=this._min_date.valueOf()+6e4*(f.y*this.config.time_step+24*f.x*60),!f.custom&&this._table_view&&(p+=1e3*this.date.time_part(D.start_date)),!this._table_view&&this._dragEventBody&&this._drag_event._move_event_shift===void 0&&(this._drag_event._move_event_shift=p-D.start_date),this._drag_event._move_event_shift&&(p-=this._drag_event._move_event_shift),p=this._correct_shift(p),f._ignores&&this.config.preserve_length&&this._table_view&&k?(p=a._correct_drag_start_date(p),g=a._correct_drag_end_date(p,this._drag_event._event_length)):g=D.end_date.valueOf()-(D.start_date.valueOf()-p);else{if(p=D.start_date.valueOf(),g=D.end_date.valueOf(),this._table_view){var E=this._min_date.valueOf()+f.y*this.config.time_step*6e4+(f.custom?0:864e5);if(this._mode=="month")if(E=this._correct_shift(E,!1),this._drag_from_start){var S=864e5;E<=a.date.date_part(new Date(g+S-1)).valueOf()&&(p=E-S)}else g=E;else this.config.preserve_length?f.resize_from_start?p=a._correct_drag_start_date(E):g=a._correct_drag_end_date(E,0):f.resize_from_start?p=E:g=E}else{var M=this.date.date_part(new Date(D.end_date.valueOf()-1)).valueOf(),N=new Date(M),T=this.config.first_hour,A=60/w*(this.config.last_hour-T);this.config.time_step=1;var H=this._mouse_coords(c);this.config.time_step=w;var $=f.y*w*6e4,P=Math.min(f.y+1,A)*w*6e4,z=6e4*H.y;g=Math.abs($-z)>Math.abs(P-z)?M+P:M+$,g+=6e4*(new Date(g).getTimezoneOffset()-N.getTimezoneOffset()),this._els.dhx_cal_data[0].style.cursor="s-resize",this._mode!="week"&&this._mode!="day"||(g=this._correct_shift(g))}if(this._drag_mode=="new-size")if(g<=this._drag_start){var K=f.shift||(this._table_view&&!f.custom?864e5:0);p=g-(f.shift?0:K),g=this._drag_start+(K||6e4*w)}else p=this._drag_start;else g<=p&&(g=p+6e4*w)}var U=new Date(g-1),q=new Date(p);if(this._drag_mode=="move"&&a.config.limit_drag_out&&(+q<+a._min_date||+g>+a._max_date)){if(+D.start_date<+a._min_date||+D.end_date>+a._max_date)q=new Date(D.start_date),g=new Date(D.end_date);else{var F=g-q;+q<+a._min_date?(q=new Date(a._min_date),f._ignores&&this.config.preserve_length&&this._table_view?(q=new Date(a._correct_drag_start_date(q)),k._start_correction&&(q=new Date(q.valueOf()+k._start_correction)),g=new Date(1*q+this._get_fictional_event_length(q,this._drag_event._event_length,k))):g=new Date(+q+F)):(g=new Date(a._max_date),f._ignores&&this.config.preserve_length&&this._table_view?(k._end_correction&&(g=new Date(g.valueOf()-k._end_correction)),g=new Date(1*g-this._get_fictional_event_length(g,0,k,!0)),q=new Date(1*g-this._get_fictional_event_length(g,this._drag_event._event_length,k,!0)),this._ignores_detected&&(q=a.date.add(q,k.x_step,k.x_unit),g=new Date(1*g-this._get_fictional_event_length(g,0,k,!0)),g=a.date.add(g,k.x_step,k.x_unit))):q=new Date(+g-F))}U=new Date(g-1)}if(!this._table_view&&this._dragEventBody&&!a.config.all_timed&&(!a._get_section_view()&&f.x!=this._get_event_sday({start_date:new Date(p),end_date:new Date(p)})||new Date(p).getHours()=this.config.last_hour)||(F=g-q,S=this._min_date.valueOf()+24*f.x*60*6e4,(g=a.date.date_part(new Date(S))).setHours(this.config.last_hour),U=new Date(g-1),this._drag_mode=="move"&&(q=new Date(+g-F))),this._table_view||U.getDate()==q.getDate()&&U.getHours()=y?H+=" dhx_after":p.valueOf()==b.valueOf()&&(H+=" dhx_now"),this._ignores_detected&&this._ignores[T]&&(H+=" dhx_scale_ignore"),A.className=H+" "+this.templates.month_date_class(p,b),A.setAttribute("data-cell-date",a.templates.format_date(p));var $="dhx_month_body",P="dhx_month_head";if(T===0&&this.config.left_border&&($+=" dhx_month_body_border",P+=" dhx_month_head_border"),this._ignores_detected&&this._ignores[T])A.appendChild(document.createElement("div")),A.appendChild(document.createElement("div"));else{A.style.width=k[T],this._waiAria.monthCellAttr(A,p);var z=document.createElement("div");z.style.height=a.xy.month_head_height+"px",z.className=P,z.innerHTML=this.templates.month_day(p),A.appendChild(z);var K=document.createElement("div");K.className=$,A.appendChild(K)}var U=p.getDate();(p=this.date.add(p,1,"day")).getDate()-U>1&&(p=new Date(p.getFullYear(),p.getMonth(),U+1,12,0))}a._colsS.heights[w]=S,S+=E(w)}return this._min_date=x,this._max_date=p,c.innerHTML="",c.appendChild(M),this._scales={},c.querySelectorAll("[data-cell-date]").forEach(q=>{const F=a.templates.parse_date(q.getAttribute("data-cell-date")),ke=q.querySelector(".dhx_month_body");this._scales[+F]=ke,this.callEvent("onScaleAdd",[this._scales[+F],F])}),this._max_date},a._reset_month_scale=function(c,f,p,g){var y=a.date.add(f,1,"month"),x=a._currentDate();this.date.date_part(x),this.date.date_part(p),g=g||Math.ceil(Math.round((y.valueOf()-p.valueOf())/864e5)/7);var b=Math.floor(c.clientHeight/g)-this.xy.month_head_height;return this._colsS.height=b+this.xy.month_head_height,this._colsS.heights=[],a._render_month_scale(c,f,p,g)},a.getView=function(c){return c||(c=a.getState().mode),a.matrix&&a.matrix[c]?a.matrix[c]:a._props&&a._props[c]?a._props[c]:null},a.getLabel=function(c,f){for(var p=this.config.lightbox.sections,g=0;ga.getState().max_date.valueOf()&&(g+=u(f,a.getState().max_date))):g=Math.round(y/60/60/1e3/24);for(var k=!0;bA.valueOf()&&(D+=S-A),S.valueOf()>T.valueOf()?D+=p._start_correction:D+=60*S.getHours()*60*1e3+60*S.getMinutes()*1e3,E.valueOf()<=N.valueOf()&&(D+=p._end_correction),E.valueOf()`,"gm"),l=new RegExp(" +","gm");function h(c){return(c+"").replace(o," ").replace(l," ")}var m=new RegExp("'","gm");function v(c){return(c+"").replace(m,"'")}for(var u in a._waiAria={getAttributeString:function(c){var f=[" "];for(var p in c)if(typeof c[p]!="function"&&typeof c[p]!="object"){var g=v(h(c[p]));f.push(p+"='"+g+"'")}return f.push(" "),f.join(" ")},setAttributes:function(c,f){for(var p in f)c.setAttribute(p,h(f[p]));return c},labelAttr:function(c,f){return this.setAttributes(c,{"aria-label":f})},label:function(c){return a._waiAria.getAttributeString({"aria-label":c})},hourScaleAttr:function(c,f){this.labelAttr(c,f)},monthCellAttr:function(c,f){this.labelAttr(c,a.templates.day_date(f))},navBarDateAttr:function(c,f){this.labelAttr(c,f)},dayHeaderAttr:function(c,f){this.labelAttr(c,f)},dayColumnAttr:function(c,f){this.dayHeaderAttr(c,a.templates.day_date(f))},headerButtonsAttributes:function(c,f){return this.setAttributes(c,{role:"button","aria-label":f})},headerToggleState:function(c,f){return this.setAttributes(c,{"aria-pressed":f?"true":"false"})},getHeaderCellAttr:function(c){return a._waiAria.getAttributeString({"aria-label":c})},eventAttr:function(c,f){this._eventCommonAttr(c,f)},_eventCommonAttr:function(c,f){f.setAttribute("aria-label",h(a.templates.event_text(c.start_date,c.end_date,c))),a.config.readonly&&f.setAttribute("aria-readonly",!0),c.$dataprocessor_class&&f.setAttribute("aria-busy",!0),f.setAttribute("aria-selected",a.getState().select_id==c.id?"true":"false")},setEventBarAttr:function(c,f){this._eventCommonAttr(c,f)},_getAttributes:function(c,f){var p={setAttribute:function(g,y){this[g]=y}};return c.apply(this,[f,p]),p},eventBarAttrString:function(c){return this.getAttributeString(this._getAttributes(this.setEventBarAttr,c))},agendaHeadAttrString:function(){return this.getAttributeString({role:"row"})},agendaHeadDateString:function(c){return this.getAttributeString({role:"columnheader","aria-label":c})},agendaHeadDescriptionString:function(c){return this.agendaHeadDateString(c)},agendaDataAttrString:function(){return this.getAttributeString({role:"grid"})},agendaEventAttrString:function(c){var f=this._getAttributes(this._eventCommonAttr,c);return f.role="row",this.getAttributeString(f)},agendaDetailsBtnString:function(){return this.getAttributeString({role:"button","aria-label":a.locale.labels.icon_details})},gridAttrString:function(){return this.getAttributeString({role:"grid"})},gridRowAttrString:function(c){return this.agendaEventAttrString(c)},gridCellAttrString:function(c,f,p){return this.getAttributeString({role:"gridcell","aria-label":[f.label===void 0?f.id:f.label,": ",p]})},mapAttrString:function(){return this.gridAttrString()},mapRowAttrString:function(c){return this.gridRowAttrString(c)},mapDetailsBtnString:function(){return this.agendaDetailsBtnString()},minicalHeader:function(c,f){this.setAttributes(c,{id:f+"","aria-live":"assertice","aria-atomic":"true"})},minicalGrid:function(c,f){this.setAttributes(c,{"aria-labelledby":f+"",role:"grid"})},minicalRow:function(c){this.setAttributes(c,{role:"row"})},minicalDayCell:function(c,f){var p=f.valueOf()=a._min_date.valueOf();this.setAttributes(c,{role:"gridcell","aria-label":a.templates.day_date(f),"aria-selected":p?"true":"false"})},minicalHeadCell:function(c){this.setAttributes(c,{role:"columnheader"})},weekAgendaDayCell:function(c,f){var p=c.querySelector(".dhx_wa_scale_bar"),g=c.querySelector(".dhx_wa_day_data"),y=a.uid()+"";this.setAttributes(p,{id:y}),this.setAttributes(g,{"aria-labelledby":y})},weekAgendaEvent:function(c,f){this.eventAttr(f,c)},lightboxHiddenAttr:function(c){c.setAttribute("aria-hidden","true")},lightboxVisibleAttr:function(c){c.setAttribute("aria-hidden","false")},lightboxSectionButtonAttrString:function(c){return this.getAttributeString({role:"button","aria-label":c,tabindex:"0"})},yearHeader:function(c,f){this.setAttributes(c,{id:f+""})},yearGrid:function(c,f){this.minicalGrid(c,f)},yearHeadCell:function(c){return this.minicalHeadCell(c)},yearRow:function(c){return this.minicalRow(c)},yearDayCell:function(c){this.setAttributes(c,{role:"gridcell"})},lightboxAttr:function(c){c.setAttribute("role","dialog"),c.setAttribute("aria-hidden","true"),c.firstChild.setAttribute("role","heading")},lightboxButtonAttrString:function(c){return this.getAttributeString({role:"button","aria-label":a.locale.labels[c],tabindex:"0"})},eventMenuAttrString:function(c){return this.getAttributeString({role:"button","aria-label":a.locale.labels[c]})},lightboxHeader:function(c,f){c.setAttribute("aria-label",f)},lightboxSelectAttrString:function(c){var f="";switch(c){case"%Y":f=a.locale.labels.year;break;case"%m":f=a.locale.labels.month;break;case"%d":f=a.locale.labels.day;break;case"%H:%i":f=a.locale.labels.hour+" "+a.locale.labels.minute}return a._waiAria.getAttributeString({"aria-label":f})},messageButtonAttrString:function(c){return"tabindex='0' role='button' aria-label='"+c+"'"},messageInfoAttr:function(c){c.setAttribute("role","alert")},messageModalAttr:function(c,f){c.setAttribute("role","dialog"),f&&c.setAttribute("aria-labelledby",f)},quickInfoAttr:function(c){c.setAttribute("role","dialog")},quickInfoHeaderAttrString:function(){return" role='heading' "},quickInfoHeader:function(c,f){c.setAttribute("aria-label",f)},quickInfoButtonAttrString:function(c){return a._waiAria.getAttributeString({role:"button","aria-label":c,tabindex:"0"})},tooltipAttr:function(c){c.setAttribute("role","tooltip")},tooltipVisibleAttr:function(c){c.setAttribute("aria-hidden","false")},tooltipHiddenAttr:function(c){c.setAttribute("aria-hidden","true")}},a._waiAria)a._waiAria[u]=function(c){return function(){return a.config.wai_aria_attributes?c.apply(this,arguments):" "}}(a._waiAria[u])})()}(i),i.utils=ee,i.$domHelpers=se,i.utils.dom=se,i.uid=ee.uid,i.mixin=ee.mixin,i.defined=ee.defined,i.assert=function(a){return function(o,l){o||a.config.show_errors&&a.callEvent("onError",[l])!==!1&&(a.message?a.message({type:"error",text:l,expire:-1}):console.log(l))}}(i),i.copy=ee.copy,i._createDatePicker=function(a,o){return new Da(i,a,o)},i._getFocusableNodes=se.getFocusableNodes,i._getClassName=se.getClassName,i._locate_css=se.locateCss;const t=Wt(i);var r,d,n;i.utils.mixin(i,t),i.env=i.$env=Yt,i.Promise=window.Promise,function(a){a.destructor=function(){for(var o in a.callEvent("onDestroy",[]),this.clearAll(),this.$container&&(this.$container.innerHTML=""),this._eventRemoveAll&&this._eventRemoveAll(),this.resetLightbox&&this.resetLightbox(),this._dp&&this._dp.destructor&&this._dp.destructor(),this.detachAllEvents(),this)o.indexOf("$")===0&&delete this[o];a.$destroyed=!0}}(i),function(a){function o(l,h){var m={method:l};if(h.length===0)throw new Error("Arguments list of query is wrong.");if(h.length===1)return typeof h[0]=="string"?(m.url=h[0],m.async=!0):(m.url=h[0].url,m.async=h[0].async||!0,m.callback=h[0].callback,m.headers=h[0].headers),h[0].data?typeof h[0].data!="string"?m.data=Oe(h[0].data):m.data=h[0].data:m.data="",m;switch(m.url=h[0],l){case"GET":case"DELETE":m.callback=h[1],m.headers=h[2];break;case"POST":case"PUT":h[1]?typeof h[1]!="string"?m.data=Oe(h[1]):m.data=h[1]:m.data="",m.callback=h[2],m.headers=h[3]}return m}a.Promise=window.Promise,a.ajax={cache:!0,method:"get",serializeRequestParams:Oe,parse:function(l){return typeof l!="string"?l:(l=l.replace(/^[\s]+/,""),typeof DOMParser>"u"||a.$env.isIE?window.ActiveXObject!==void 0&&((h=new window.ActiveXObject("Microsoft.XMLDOM")).async="false",h.loadXML(l)):h=new DOMParser().parseFromString(l,"text/xml"),h);var h},xmltop:function(l,h,m){if(h.status===void 0||h.status<400){var v=h.responseXML?h.responseXML||h:this.parse(h.responseText||h);if(v&&v.documentElement!==null&&!v.getElementsByTagName("parsererror").length)return v.getElementsByTagName(l)[0]}return m!==-1&&a.callEvent("onLoadXMLError",["Incorrect XML",arguments[1],m]),document.createElement("DIV")},xpath:function(l,h){if(h.nodeName||(h=h.responseXML||h),a.$env.isIE)return h.selectNodes(l)||[];for(var m,v=[],u=(h.ownerDocument||h).evaluate(l,h,null,XPathResult.ANY_TYPE,null);m=u.iterateNext();)v.push(m);return v},query:function(l){return this._call(l.method||"GET",l.url,l.data||"",l.async||!0,l.callback,l.headers)},get:function(l,h,m){var v=o("GET",arguments);return this.query(v)},getSync:function(l,h){var m=o("GET",arguments);return m.async=!1,this.query(m)},put:function(l,h,m,v){var u=o("PUT",arguments);return this.query(u)},del:function(l,h,m){var v=o("DELETE",arguments);return this.query(v)},post:function(l,h,m,v){arguments.length==1?h="":arguments.length==2&&typeof h=="function"&&(m=h,h="");var u=o("POST",arguments);return this.query(u)},postSync:function(l,h,m){h=h===null?"":String(h);var v=o("POST",arguments);return v.async=!1,this.query(v)},_call:function(l,h,m,v,u,c){return new a.Promise((function(f,p){var g=typeof XMLHttpRequest===void 0||a.$env.isIE?new window.ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest,y=navigator.userAgent.match(/AppleWebKit/)!==null&&navigator.userAgent.match(/Qt/)!==null&&navigator.userAgent.match(/Safari/)!==null;if(v&&g.addEventListener("readystatechange",function(){if(g.readyState==4||y&&g.readyState==3){if((g.status!=200||g.responseText==="")&&!a.callEvent("onAjaxError",[g]))return;setTimeout(function(){typeof u=="function"&&u.apply(window,[{xmlDoc:g,filePath:h}]),f(g),typeof u=="function"&&(u=null,g=null)},0)}}),l!="GET"||this.cache||(h+=(h.indexOf("?")>=0?"&":"?")+"dhxr"+new Date().getTime()+"=1"),g.open(l,h,v),c)for(var x in c)g.setRequestHeader(x,c[x]);else l.toUpperCase()=="POST"||l=="PUT"||l=="DELETE"?g.setRequestHeader("Content-Type","application/x-www-form-urlencoded"):l=="GET"&&(m=null);if(g.setRequestHeader("X-Requested-With","XMLHttpRequest"),g.send(m),!v)return{xmlDoc:g,filePath:h}}).bind(this))},urlSeparator:function(l){return l.indexOf("?")!=-1?"&":"?"}},a.$ajax=a.ajax}(i),Ut(i),function(a){a.config={default_date:"%j %M %Y",month_date:"%F %Y",load_date:"%Y-%m-%d",week_date:"%l",day_date:"%D %j",hour_date:"%H:%i",month_day:"%d",date_format:"%Y-%m-%d %H:%i",api_date:"%d-%m-%Y %H:%i",parse_exact_format:!1,preserve_length:!0,time_step:5,displayed_event_color:"#ff4a4a",displayed_event_text_color:"#ffef80",wide_form:0,day_column_padding:8,use_select_menu_space:!0,fix_tab_position:!0,start_on_monday:!0,first_hour:0,last_hour:24,readonly:!1,drag_resize:!0,drag_move:!0,drag_create:!0,drag_event_body:!0,dblclick_create:!0,details_on_dblclick:!0,edit_on_create:!0,details_on_create:!0,header:null,hour_size_px:44,resize_month_events:!1,resize_month_timed:!1,responsive_lightbox:!1,separate_short_events:!0,rtl:!1,cascade_event_display:!1,cascade_event_count:4,cascade_event_margin:30,multi_day:!0,multi_day_height_limit:200,drag_lightbox:!0,preserve_scroll:!0,select:!0,undo_deleted:!0,server_utc:!1,touch:!0,touch_tip:!0,touch_drag:500,touch_swipe_dates:!1,quick_info_detached:!0,positive_closing:!1,drag_highlight:!0,limit_drag_out:!1,icons_edit:["icon_save","icon_cancel"],icons_select:["icon_details","icon_edit","icon_delete"],buttons_left:["dhx_save_btn","dhx_cancel_btn"],buttons_right:["dhx_delete_btn"],lightbox:{sections:[{name:"description",map_to:"text",type:"textarea",focus:!0},{name:"time",height:72,type:"time",map_to:"auto"}]},highlight_displayed_event:!0,left_border:!1,ajax_error:"alert",delay_render:0,timeline_swap_resize:!0,wai_aria_attributes:!0,wai_aria_application_role:!0,csp:"auto",event_attribute:"data-event-id",show_errors:!0},a.config.buttons_left.$initial=a.config.buttons_left.join(),a.config.buttons_right.$initial=a.config.buttons_right.join(),a._helpers={parseDate:function(o){return(a.templates.xml_date||a.templates.parse_date)(o)},formatDate:function(o){return(a.templates.xml_format||a.templates.format_date)(o)}},a.templates={},a.init_templates=function(){var o=a.date.date_to_str,l=a.config;(function(h,m){for(var v in m)h[v]||(h[v]=m[v])})(a.templates,{day_date:o(l.default_date),month_date:o(l.month_date),week_date:function(h,m){return l.rtl?a.templates.day_date(a.date.add(m,-1,"day"))+" – "+a.templates.day_date(h):a.templates.day_date(h)+" – "+a.templates.day_date(a.date.add(m,-1,"day"))},day_scale_date:o(l.default_date),time_slot_text:function(h){return""},time_slot_class:function(h){return""},month_scale_date:o(l.week_date),week_scale_date:o(l.day_date),hour_scale:o(l.hour_date),time_picker:o(l.hour_date),event_date:o(l.hour_date),month_day:o(l.month_day),load_format:o(l.load_date),format_date:o(l.date_format,l.server_utc),parse_date:a.date.str_to_date(l.date_format,l.server_utc),api_date:a.date.str_to_date(l.api_date,!1,!1),event_header:function(h,m,v){return v._mode==="small"||v._mode==="smallest"?a.templates.event_date(h):a.templates.event_date(h)+" - "+a.templates.event_date(m)},event_text:function(h,m,v){return v.text},event_class:function(h,m,v){return""},month_date_class:function(h){return""},week_date_class:function(h){return""},event_bar_date:function(h,m,v){return a.templates.event_date(h)},event_bar_text:function(h,m,v){return v.text},month_events_link:function(h,m){return"View more("+m+" events)"},drag_marker_class:function(h,m,v){return""},drag_marker_content:function(h,m,v){return""},tooltip_date_format:a.date.date_to_str("%Y-%m-%d %H:%i"),tooltip_text:function(h,m,v){return"Event: "+v.text+"
Start date: "+a.templates.tooltip_date_format(h)+"
End date: "+a.templates.tooltip_date_format(m)},calendar_month:o("%F %Y"),calendar_scale_date:o("%D"),calendar_date:o("%d"),calendar_time:o("%d-%m-%Y")}),this.callEvent("onTemplatesReady",[])}}(i),function(a){a._events={},a.clearAll=function(){this._events={},this._loaded={},this._edit_id=null,this._select_id=null,this._drag_id=null,this._drag_mode=null,this._drag_pos=null,this._new_event=null,this.clear_view(),this.callEvent("onClearAll",[])},a.addEvent=function(o,l,h,m,v){if(!arguments.length)return this.addEventNow();var u=o;arguments.length!=1&&((u=v||{}).start_date=o,u.end_date=l,u.text=h,u.id=m),u.id=u.id||a.uid(),u.text=u.text||"",typeof u.start_date=="string"&&(u.start_date=this.templates.api_date(u.start_date)),typeof u.end_date=="string"&&(u.end_date=this.templates.api_date(u.end_date));var c=6e4*(this.config.event_duration||this.config.time_step);u.start_date.valueOf()==u.end_date.valueOf()&&u.end_date.setTime(u.end_date.valueOf()+c),u.start_date.setMilliseconds(0),u.end_date.setMilliseconds(0),u._timed=this.isOneDayEvent(u);var f=!this._events[u.id];return this._events[u.id]=u,this.event_updated(u),this._loading||this.callEvent(f?"onEventAdded":"onEventChanged",[u.id,u]),u.id},a.deleteEvent=function(o,l){var h=this._events[o];(l||this.callEvent("onBeforeEventDelete",[o,h])&&this.callEvent("onConfirmedBeforeEventDelete",[o,h]))&&(h&&(a.getState().select_id==o&&a.unselect(),delete this._events[o],this.event_updated(h),this._drag_id==h.id&&(this._drag_id=null,this._drag_mode=null,this._drag_pos=null)),this.callEvent("onEventDeleted",[o,h]))},a.getEvent=function(o){return this._events[o]},a.setEvent=function(o,l){l.id||(l.id=o),this._events[o]=l},a.for_rendered=function(o,l){for(var h=this._rendered.length-1;h>=0;h--)this._rendered[h].getAttribute(this.config.event_attribute)==o&&l(this._rendered[h],h)},a.changeEventId=function(o,l){if(o!=l){var h=this._events[o];h&&(h.id=l,this._events[l]=h,delete this._events[o]),this.for_rendered(o,function(m){m.setAttribute("event_id",l),m.setAttribute(a.config.event_attribute,l)}),this._select_id==o&&(this._select_id=l),this._edit_id==o&&(this._edit_id=l),this.callEvent("onEventIdChange",[o,l])}},function(){for(var o=["text","Text","start_date","StartDate","end_date","EndDate"],l=function(v){return function(u){return a.getEvent(u)[v]}},h=function(v){return function(u,c){var f=a.getEvent(u);f[v]=c,f._changed=!0,f._timed=this.isOneDayEvent(f),a.event_updated(f,!0)}},m=0;mm||h<=v)&&(l>=m||l24-(this.config.last_hour-this.config.first_hour)||lv))}return!1},a.isOneDayEvent=function(o){var l=new Date(o.end_date.valueOf()-1);return o.start_date.getFullYear()===l.getFullYear()&&o.start_date.getMonth()===l.getMonth()&&o.start_date.getDate()===l.getDate()&&o.end_date.valueOf()-o.start_date.valueOf()<864e5},a.get_visible_events=function(o){var l=[];for(var h in this._events)this.is_visible_events(this._events[h])&&(o&&!this._events[h]._timed||this.filter_event(h,this._events[h])&&l.push(this._events[h]));return l},a.filter_event=function(o,l){var h=this["filter_"+this._mode];return!h||h(o,l)},a._is_main_area_event=function(o){return!!o._timed},a.render_view_data=function(o,l){var h=!1;if(!o){if(h=!0,this._not_render)return void(this._render_wait=!0);this._render_wait=!1,this.clear_view(),o=this.get_visible_events(!(this._table_view||this.config.multi_day))}for(var m=0,v=o.length;mg){var y=g;1*this.config.max_month_events!==this.config.max_month_events||v[f]<=this.config.max_month_events?y=v[f]*h:(this.config.max_month_events+1)*h>g&&(y=(this.config.max_month_events+1)*h),c[f].style.height=y+this.xy.month_head_height+"px"}v[f]=(v[f-1]||0)+a._get_first_visible_cell(p).offsetHeight}v.unshift(0);const N=this.$container.querySelector(".dhx_cal_data");if(N.offsetHeightN.id?1:-1:M.start_date>N.start_date?1:-1});var h=[],m=[];this._min_mapped_duration=Math.floor(60*this.xy.min_event_height/this.config.hour_size_px);for(var v=0;vS&&(S=y[w]._sorder);u._sorder=S+1,u._inner=!1}else u._sorder=0;y.splice(b,b==y.length?0:1,u),y.length>(y.max_count||0)?(y.max_count=y.length,u._count=y.length):u._count=u._count?u._count:1}(p=this.config.last_hour)&&(m.push(u),o[v]=u=this._copy_event(u),p=this.config.last_hour&&(u.end_date.setMinutes(0),u.end_date.setHours(this.config.last_hour)),u.start_date>u.end_date||p==this.config.last_hour)&&(o.splice(v,1),v--)}}if(!l){for(v=0;vh.id?1:-1:l.start_date>h.start_date?1:-1})},a._is_any_multiday_cell_visible=function(o,l,h){var m=this._cols.length,v=!1,u=o,c=!0,f=new Date(l);for(a.date.day_start(new Date(l)).valueOf()!=l.valueOf()&&(f=a.date.day_start(f),f=a.date.add(f,1,"day"));uthis._max_date&&(x.last_chunk=!1,k=this._max_date);var w=this.locate_holder_day(b,!1,g);if(g._sday=w%c,!this._ignores[g._sday]||!g._timed){var D=this.locate_holder_day(k,!0,g)||c;if(g._eday=D%c||c,g._length=D-w,g._sweek=Math.floor((this._correct_shift(b.valueOf(),1)-this._min_date.valueOf())/(864e5*c)),a._is_any_multiday_cell_visible(b,k,g)){var E,S=v[g._sweek];for(E=0;E"+o.text+"",this._editor=M.querySelector("textarea"),a.event(this._editor,"keydown",function(P){if(P.shiftKey)return!0;var z=P.keyCode;z==a.keys.edit_save&&a.editStop(!0),z==a.keys.edit_cancel&&a.editStop(!1),z!=a.keys.edit_save&&z!=a.keys.edit_cancel||P.preventDefault&&P.preventDefault()}),a.event(this._editor,"selectstart",function(P){return P.cancelBubble=!0,!0}),a._focus(this._editor,!0),this._els.dhx_cal_data[0].scrollLeft=0}if(this.xy.menu_width!==0&&this._select_id==o.id){this.config.cascade_event_display&&this._drag_mode&&(E.style.zIndex=1);for(var N,T=this.config["icons_"+(this._edit_id==o.id?"edit":"select")],A="",H=0;H
`}var $=this._render_v_bar(o,b-m-1,f,m,null,"","
",A,!0);o.color&&$.style.setProperty("--dhx-scheduler-event-background",o.color),o.textColor&&$.style.setProperty("--dhx-scheduler-event-color",o.textColor),this._els.dhx_cal_data[0].appendChild($),this._rendered.push($)}this.config.drag_highlight&&this._drag_id==o.id&&this.highlightEventPosition(o)}}},a._render_v_bar=function(o,l,h,m,v,u,c,f,p){var g=document.createElement("div"),y=o.id,x=p?"dhx_cal_event dhx_cal_select_menu":"dhx_cal_event",b=a.getState();b.drag_id==o.id&&(x+=" dhx_cal_event_drag"),b.select_id==o.id&&(x+=" dhx_cal_event_selected");var k=a.templates.event_class(o.start_date,o.end_date,o);k&&(x=x+" "+k),this.config.cascade_event_display&&(x+=" dhx_cal_event_cascade");var w=m-1,D=`
-
`;g.innerHTML=D;var w=g.cloneNode(!0).firstChild;if(!m&&a.renderEvent(w,o,v,u,c,p))return o.color&&w.style.setProperty("--dhx-scheduler-event-background",o.color),o.textColor&&w.style.setProperty("--dhx-scheduler-event-color",o.textColor),w;w=g.firstChild,o.color&&w.style.setProperty("--dhx-scheduler-event-background",o.color),o.textColor&&w.style.setProperty("--dhx-scheduler-event-color",o.textColor);var S='
 
';S+='
'+c+"
",S+='
'+p+"
";var M="dhx_event_resize dhx_footer";return(m||o._drag_resize===!1)&&(M="dhx_resize_denied "+M),S+='
',w.innerHTML=S,w},a.renderEvent=function(){return!1},a.locate_holder=function(o){return this._mode=="day"?this._els.dhx_cal_data[0].firstChild:this._els.dhx_cal_data[0].childNodes[o]},a.locate_holder_day=function(o,l){var h=Math.floor((this._correct_shift(o,1)-this._min_date)/864e5);return l&&this.date.time_part(o)&&h++,h},a._get_dnd_order=function(o,l,h){if(!this._drag_event)return o;this._drag_event._orig_sorder?o=this._drag_event._orig_sorder:this._drag_event._orig_sorder=o;for(var v=l*o;v+l>h;)o--,v-=l;return Math.max(o,0)},a._get_event_bar_pos=function(o){var l=this.config.rtl,h=this._colsS,v=h[o._sday],u=h[o._eday];l&&(v=h[h.col_length]-h[o._eday]+h[0],u=h[h.col_length]-h[o._sday]+h[0]),u==v&&(u=h[o._eday+1]);var f=this.xy.bar_height,c=o._sorder;if(o.id==this._drag_id){var p=h.heights[o._sweek+1]-h.heights[o._sweek]-this.xy.month_head_height;c=a._get_dnd_order(c,f,p)}var m=c*f;return{x:v,x2:u,y:h.heights[o._sweek]+(h.height?this.xy.month_scale_height+2:2)+m}},a.render_event_bar=function(o){var l=this._rendered_location,h=this._get_event_bar_pos(o),v=h.y,u=h.x,f=h.x2,c="";if(f){var p=a.config.resize_month_events&&this._mode=="month"&&(!o._timed||a.config.resize_month_timed),m=document.createElement("div"),g=o.hasOwnProperty("_first_chunk")&&o._first_chunk,y=o.hasOwnProperty("_last_chunk")&&o._last_chunk,x=p&&(o._timed||g),b=p&&(o._timed||y),k=!0,E="dhx_cal_event_clear";o._timed&&!p||(k=!1,E="dhx_cal_event_line"),g&&(E+=" dhx_cal_event_line_start"),y&&(E+=" dhx_cal_event_line_end"),x&&(c+="
"),b&&(c+="
");var D=a.templates.event_class(o.start_date,o.end_date,o);D&&(E+=" "+D);var w=o.color?"--dhx-scheduler-event-background:"+o.color+";":"",S=o.textColor?"--dhx-scheduler-event-color:"+o.textColor+";":"",M=["position:absolute","top:"+v+"px","left:"+u+"px","width:"+(f-u-(k?1:0))+"px","height:"+(this.xy.bar_height-2)+"px",S,w,o._text_style||""].join(";"),N="
";p&&(N+=c),a.getState().mode=="month"&&(o=a.getEvent(o.id)),o._timed&&(N+=`${a.templates.event_bar_date(o.start_date,o.end_date,o)}`),N+="
",N+=a.templates.event_bar_text(o.start_date,o.end_date,o)+"
",N+="
",N+="
",m.innerHTML=N,this._rendered.push(m.firstChild),l.appendChild(m.firstChild)}},a._locate_event=function(o){for(var l=null;o&&!l&&o.getAttribute;)l=o.getAttribute(this.config.event_attribute),o=o.parentNode;return l},a.edit=function(o){this._edit_id!=o&&(this.editStop(!1,o),this._edit_id=o,this.updateEvent(o))},a.editStop=function(o,l){if(!l||this._edit_id!=l){var h=this.getEvent(this._edit_id);h&&(o&&(h.text=this._editor.value),this._edit_id=null,this._editor=null,this.updateEvent(h.id),this._edit_stop_event(h,o))}},a._edit_stop_event=function(o,l){this._new_event?(l?this.callEvent("onEventAdded",[o.id,o]):o&&this.deleteEvent(o.id,!0),this._new_event=null):l&&this.callEvent("onEventChanged",[o.id,o])},a.getEvents=function(o,l){var h=[];for(var v in this._events){var u=this._events[v];u&&(!o&&!l||u.start_dateo)&&h.push(u)}return h},a.getRenderedEvent=function(o){if(o){for(var l=a._rendered,h=0;h-1&&(y=y.split(a.config.section_delimiter)[0])}var x=p.getSectionTop(y),b=p.posFromDate(g.start_date),k=a.$container.querySelector(".dhx_timeline_data_wrapper");if(b-=(k.offsetWidth-p.dx)/2,x=x-k.offsetHeight/2+p.dy/2,p._smartRenderingEnabled())var E=p.attachEvent("onScroll",function(){D(),p.detachEvent(E)});p.scrollTo({left:b,top:x}),p._smartRenderingEnabled()||D()}}else D();a.callEvent("onAfterEventDisplay",[h,l])}function D(){h.color=f,h.textColor=c}}}(i),function(a){a._append_drag_marker=function(o){if(!o.parentNode){var l=a._els.dhx_cal_data[0].lastChild,h=a._getClassName(l);h.indexOf("dhx_scale_holder")<0&&l.previousSibling&&(l=l.previousSibling),h=a._getClassName(l),l&&h.indexOf("dhx_scale_holder")===0&&l.appendChild(o)}},a._update_marker_position=function(o,l){var h=a._calc_event_y(l,0);o.style.top=h.top+"px",o.style.height=h.height+"px"},a.highlightEventPosition=function(o){var l=document.createElement("div");l.setAttribute("event_id",o.id),l.setAttribute(this.config.event_attribute,o.id),this._rendered.push(l),this._update_marker_position(l,o);var h=this.templates.drag_marker_class(o.start_date,o.end_date,o),v=this.templates.drag_marker_content(o.start_date,o.end_date,o);l.className="dhx_drag_marker",h&&(l.className+=" "+h),v&&(l.innerHTML=v),this._append_drag_marker(l)}}(i),Vt(i),function(a){function o(){const l=a.config.csp===!0,h=!!window.Sfdc||!!window.$A||window.Aura||"$shadowResolver$"in document.body;return l||h?a.$root:document.body}a._lightbox_controls={},a.formSection=function(l){for(var h=this.config.lightbox.sections,v=0;v
"},set_value:function(l,h,v,u){l.innerHTML=h||""},get_value:function(l,h,v){return l.innerHTML||""},focus:function(l){}},textarea:{render:function(l){return`
`},set_value:function(l,h,v){a.form_blocks.textarea._get_input(l).value=h||""},get_value:function(l,h){return a.form_blocks.textarea._get_input(l).value},focus:function(l){var h=a.form_blocks.textarea._get_input(l);a._focus(h,!0)},_get_input:function(l){return l.getElementsByTagName("textarea")[0]}},select:{render:function(l){for(var h="
"},set_value:function(l,h,v,u){var f=l.firstChild;!f._dhx_onchange&&u.onchange&&(a.event(f,"change",u.onchange),f._dhx_onchange=!0),h===void 0&&(h=(f.options[0]||{}).value),f.value=h||""},get_value:function(l,h){return l.firstChild.value},focus:function(l){var h=l.firstChild;a._focus(h,!0)}},time:{render:function(l){l.time_format||(l.time_format=["%H:%i","%d","%m","%Y"]),l._time_format_order={};var h=l.time_format,v=a.config,u=a.date.date_part(a._currentDate()),f=1440,c=0;a.config.limit_time_select&&(f=60*v.last_hour+1,c=60*v.first_hour,u.setHours(v.first_hour));for(var p="",m=0;m0&&(p+=" ");var y="",x="";switch(g){case"%Y":var b,k,E;y="dhx_lightbox_year_select",l._time_format_order[3]=m,l.year_range&&(isNaN(l.year_range)?l.year_range.push&&(k=l.year_range[0],E=l.year_range[1]):b=l.year_range),b=b||10;var D=D||Math.floor(b/2);k=k||u.getFullYear()-D,E=E||k+b;for(var w=k;w"+w+"";break;case"%m":for(y="dhx_lightbox_month_select",l._time_format_order[2]=m,w=0;w<12;w++)x+="";break;case"%d":for(y="dhx_lightbox_day_select",l._time_format_order[1]=m,w=1;w<32;w++)x+="";break;case"%H:%i":y="dhx_lightbox_time_select",l._time_format_order[0]=m,w=c;var S=u.getDate();for(l._time_values=[];w"+this.templates.time_picker(u)+"",l._time_values.push(w),u.setTime(u.valueOf()+60*this.config.time_step*1e3),w=24*(u.getDate()!=S?1:0)*60+60*u.getHours()+u.getMinutes()}if(x){var M=a._waiAria.lightboxSelectAttrString(g);p+=" "}}return"
"+p+"  –  "+p+"
"},set_value:function(l,h,v,u){var f,c,p=a.config,m=l.getElementsByTagName("select"),g=u._time_format_order;if(p.full_day){if(!l._full_day){var y="";a.config.wide_form||(y=l.previousSibling.innerHTML+y),l.previousSibling.innerHTML=y,l._full_day=!0}var x=l.previousSibling.getElementsByTagName("input")[0];x.checked=a.date.time_part(v.start_date)===0&&a.date.time_part(v.end_date)===0,m[g[0]].disabled=x.checked,m[g[0]+m.length/2].disabled=x.checked,x.$_eventAttached||(x.$_eventAttached=!0,a.event(x,"click",function(){if(x.checked){var D={};a.form_blocks.time.get_value(l,D,u),f=a.date.date_part(D.start_date),(+(c=a.date.date_part(D.end_date))==+f||+c>=+f&&(v.end_date.getHours()!==0||v.end_date.getMinutes()!==0))&&(c=a.date.add(c,1,"day"))}else f=null,c=null;m[g[0]].disabled=x.checked,m[g[0]+m.length/2].disabled=x.checked,E(m,0,f||v.start_date),E(m,4,c||v.end_date)}))}if(p.auto_end_date&&p.event_duration)for(var b=function(){p.auto_end_date&&p.event_duration&&(f=new Date(m[g[3]].value,m[g[2]].value,m[g[1]].value,0,m[g[0]].value),c=new Date(f.getTime()+60*a.config.event_duration*1e3),E(m,4,c))},k=0;k<4;k++)m[k].$_eventAttached||(m[k].$_eventAttached=!0,a.event(m[k],"change",b));function E(D,w,S){for(var M=u._time_values,N=60*S.getHours()+S.getMinutes(),A=N,T=!1,H=0;H";for(var u=0;u
"+a.locale.labels[v[u]]+"
";v=this.config.buttons_right;var f=a.config.rtl;for(u=0;u
",h+="
"+a.locale.labels[v[u]]+"
";h+="
",h+="
",l.innerHTML=h,a.config.drag_lightbox&&(a.event(l.firstChild,"mousedown",a._ready_to_dnd),a.event(l.firstChild,"selectstart",function(b){return b.preventDefault(),!1}),l.firstChild.style.cursor="move",a._init_dnd_events()),this._waiAria.lightboxAttr(l),this.show_cover(),this._cover.insertBefore(l,this._cover.firstChild),this._lightbox=l;var c=this.config.lightbox.sections;for(h="",u=0;u
"+this.locale.labels["button_"+c[u].button]+"
"),this.config.wide_form&&(h+="
");var g=this.locale.labels["section_"+c[u].name];typeof g!="string"&&(g=c[u].name),h+="
"+m+"
"+p.render.call(this,c[u]),h+="
"}}var y=l.getElementsByTagName("div");for(u=0;u
  +
`;g.innerHTML=D;var E=g.cloneNode(!0).firstChild;if(!p&&a.renderEvent(E,o,m,v,c,f))return o.color&&E.style.setProperty("--dhx-scheduler-event-background",o.color),o.textColor&&E.style.setProperty("--dhx-scheduler-event-color",o.textColor),E;E=g.firstChild,o.color&&E.style.setProperty("--dhx-scheduler-event-background",o.color),o.textColor&&E.style.setProperty("--dhx-scheduler-event-color",o.textColor);var S='
 
';S+='
'+c+"
",S+='
'+f+"
";var M="dhx_event_resize dhx_footer";return(p||o._drag_resize===!1)&&(M="dhx_resize_denied "+M),S+='
',E.innerHTML=S,E},a.renderEvent=function(){return!1},a.locate_holder=function(o){return this._mode=="day"?this._els.dhx_cal_data[0].firstChild:this._els.dhx_cal_data[0].childNodes[o]},a.locate_holder_day=function(o,l){var h=Math.floor((this._correct_shift(o,1)-this._min_date)/864e5);return l&&this.date.time_part(o)&&h++,h},a._get_dnd_order=function(o,l,h){if(!this._drag_event)return o;this._drag_event._orig_sorder?o=this._drag_event._orig_sorder:this._drag_event._orig_sorder=o;for(var m=l*o;m+l>h;)o--,m-=l;return Math.max(o,0)},a._get_event_bar_pos=function(o){var l=this.config.rtl,h=this._colsS,m=h[o._sday],v=h[o._eday];l&&(m=h[h.col_length]-h[o._eday]+h[0],v=h[h.col_length]-h[o._sday]+h[0]),v==m&&(v=h[o._eday+1]);var u=this.xy.bar_height,c=o._sorder;if(o.id==this._drag_id){var f=h.heights[o._sweek+1]-h.heights[o._sweek]-this.xy.month_head_height;c=a._get_dnd_order(c,u,f)}var p=c*u;return{x:m,x2:v,y:h.heights[o._sweek]+(h.height?this.xy.month_scale_height+2:2)+p}},a.render_event_bar=function(o){var l=this._rendered_location,h=this._get_event_bar_pos(o),m=h.y,v=h.x,u=h.x2,c="";if(u){var f=a.config.resize_month_events&&this._mode=="month"&&(!o._timed||a.config.resize_month_timed),p=document.createElement("div"),g=o.hasOwnProperty("_first_chunk")&&o._first_chunk,y=o.hasOwnProperty("_last_chunk")&&o._last_chunk,x=f&&(o._timed||g),b=f&&(o._timed||y),k=!0,w="dhx_cal_event_clear";o._timed&&!f||(k=!1,w="dhx_cal_event_line"),g&&(w+=" dhx_cal_event_line_start"),y&&(w+=" dhx_cal_event_line_end"),x&&(c+="
"),b&&(c+="
");var D=a.templates.event_class(o.start_date,o.end_date,o);D&&(w+=" "+D);var E=o.color?"--dhx-scheduler-event-background:"+o.color+";":"",S=o.textColor?"--dhx-scheduler-event-color:"+o.textColor+";":"",M=["position:absolute","top:"+m+"px","left:"+v+"px","width:"+(u-v-(k?1:0))+"px","height:"+(this.xy.bar_height-2)+"px",S,E,o._text_style||""].join(";"),N="
";f&&(N+=c),a.getState().mode=="month"&&(o=a.getEvent(o.id)),o._timed&&(N+=`${a.templates.event_bar_date(o.start_date,o.end_date,o)}`),N+="
",N+=a.templates.event_bar_text(o.start_date,o.end_date,o)+"
",N+="
",N+="
",p.innerHTML=N,this._rendered.push(p.firstChild),l.appendChild(p.firstChild)}},a._locate_event=function(o){for(var l=null;o&&!l&&o.getAttribute;)l=o.getAttribute(this.config.event_attribute),o=o.parentNode;return l},a.edit=function(o){this._edit_id!=o&&(this.editStop(!1,o),this._edit_id=o,this.updateEvent(o))},a.editStop=function(o,l){if(!l||this._edit_id!=l){var h=this.getEvent(this._edit_id);h&&(o&&(h.text=this._editor.value),this._edit_id=null,this._editor=null,this.updateEvent(h.id),this._edit_stop_event(h,o))}},a._edit_stop_event=function(o,l){this._new_event?(l?this.callEvent("onEventAdded",[o.id,o]):o&&this.deleteEvent(o.id,!0),this._new_event=null):l&&this.callEvent("onEventChanged",[o.id,o])},a.getEvents=function(o,l){var h=[];for(var m in this._events){var v=this._events[m];v&&(!o&&!l||v.start_dateo)&&h.push(v)}return h},a.getRenderedEvent=function(o){if(o){for(var l=a._rendered,h=0;h-1&&(y=y.split(a.config.section_delimiter)[0])}var x=f.getSectionTop(y),b=f.posFromDate(g.start_date),k=a.$container.querySelector(".dhx_timeline_data_wrapper");if(b-=(k.offsetWidth-f.dx)/2,x=x-k.offsetHeight/2+f.dy/2,f._smartRenderingEnabled())var w=f.attachEvent("onScroll",function(){D(),f.detachEvent(w)});f.scrollTo({left:b,top:x}),f._smartRenderingEnabled()||D()}}else D();a.callEvent("onAfterEventDisplay",[h,l])}function D(){h.color=u,h.textColor=c}}}(i),function(a){a._append_drag_marker=function(o){if(!o.parentNode){var l=a._els.dhx_cal_data[0].lastChild,h=a._getClassName(l);h.indexOf("dhx_scale_holder")<0&&l.previousSibling&&(l=l.previousSibling),h=a._getClassName(l),l&&h.indexOf("dhx_scale_holder")===0&&l.appendChild(o)}},a._update_marker_position=function(o,l){var h=a._calc_event_y(l,0);o.style.top=h.top+"px",o.style.height=h.height+"px"},a.highlightEventPosition=function(o){var l=document.createElement("div");l.setAttribute("event_id",o.id),l.setAttribute(this.config.event_attribute,o.id),this._rendered.push(l),this._update_marker_position(l,o);var h=this.templates.drag_marker_class(o.start_date,o.end_date,o),m=this.templates.drag_marker_content(o.start_date,o.end_date,o);l.className="dhx_drag_marker",h&&(l.className+=" "+h),m&&(l.innerHTML=m),this._append_drag_marker(l)}}(i),Vt(i),function(a){function o(){const l=a.config.csp===!0,h=!!window.Sfdc||!!window.$A||window.Aura||"$shadowResolver$"in document.body;return l||h?a.$root:document.body}a._lightbox_controls={},a.formSection=function(l){for(var h=this.config.lightbox.sections,m=0;m
"},set_value:function(l,h,m,v){l.innerHTML=h||""},get_value:function(l,h,m){return l.innerHTML||""},focus:function(l){}},textarea:{render:function(l){return`
`},set_value:function(l,h,m){a.form_blocks.textarea._get_input(l).value=h||""},get_value:function(l,h){return a.form_blocks.textarea._get_input(l).value},focus:function(l){var h=a.form_blocks.textarea._get_input(l);a._focus(h,!0)},_get_input:function(l){return l.getElementsByTagName("textarea")[0]}},select:{render:function(l){for(var h="
"},set_value:function(l,h,m,v){var u=l.firstChild;!u._dhx_onchange&&v.onchange&&(a.event(u,"change",v.onchange),u._dhx_onchange=!0),h===void 0&&(h=(u.options[0]||{}).value),u.value=h||""},get_value:function(l,h){return l.firstChild.value},focus:function(l){var h=l.firstChild;a._focus(h,!0)}},time:{render:function(l){l.time_format||(l.time_format=["%H:%i","%d","%m","%Y"]),l._time_format_order={};var h=l.time_format,m=a.config,v=a.date.date_part(a._currentDate()),u=1440,c=0;a.config.limit_time_select&&(u=60*m.last_hour+1,c=60*m.first_hour,v.setHours(m.first_hour));for(var f="",p=0;p0&&(f+=" ");var y="",x="";switch(g){case"%Y":var b,k,w;y="dhx_lightbox_year_select",l._time_format_order[3]=p,l.year_range&&(isNaN(l.year_range)?l.year_range.push&&(k=l.year_range[0],w=l.year_range[1]):b=l.year_range),b=b||10;var D=D||Math.floor(b/2);k=k||v.getFullYear()-D,w=w||k+b;for(var E=k;E"+E+"";break;case"%m":for(y="dhx_lightbox_month_select",l._time_format_order[2]=p,E=0;E<12;E++)x+="";break;case"%d":for(y="dhx_lightbox_day_select",l._time_format_order[1]=p,E=1;E<32;E++)x+="";break;case"%H:%i":y="dhx_lightbox_time_select",l._time_format_order[0]=p,E=c;var S=v.getDate();for(l._time_values=[];E"+this.templates.time_picker(v)+"",l._time_values.push(E),v.setTime(v.valueOf()+60*this.config.time_step*1e3),E=24*(v.getDate()!=S?1:0)*60+60*v.getHours()+v.getMinutes()}if(x){var M=a._waiAria.lightboxSelectAttrString(g);f+=" "}}return"
"+f+"  –  "+f+"
"},set_value:function(l,h,m,v){var u,c,f=a.config,p=l.getElementsByTagName("select"),g=v._time_format_order;if(f.full_day){if(!l._full_day){var y="";a.config.wide_form||(y=l.previousSibling.innerHTML+y),l.previousSibling.innerHTML=y,l._full_day=!0}var x=l.previousSibling.getElementsByTagName("input")[0];x.checked=a.date.time_part(m.start_date)===0&&a.date.time_part(m.end_date)===0,p[g[0]].disabled=x.checked,p[g[0]+p.length/2].disabled=x.checked,x.$_eventAttached||(x.$_eventAttached=!0,a.event(x,"click",function(){if(x.checked){var D={};a.form_blocks.time.get_value(l,D,v),u=a.date.date_part(D.start_date),(+(c=a.date.date_part(D.end_date))==+u||+c>=+u&&(m.end_date.getHours()!==0||m.end_date.getMinutes()!==0))&&(c=a.date.add(c,1,"day"))}else u=null,c=null;p[g[0]].disabled=x.checked,p[g[0]+p.length/2].disabled=x.checked,w(p,0,u||m.start_date),w(p,4,c||m.end_date)}))}if(f.auto_end_date&&f.event_duration)for(var b=function(){f.auto_end_date&&f.event_duration&&(u=new Date(p[g[3]].value,p[g[2]].value,p[g[1]].value,0,p[g[0]].value),c=new Date(u.getTime()+60*a.config.event_duration*1e3),w(p,4,c))},k=0;k<4;k++)p[k].$_eventAttached||(p[k].$_eventAttached=!0,a.event(p[k],"change",b));function w(D,E,S){for(var M=v._time_values,N=60*S.getHours()+S.getMinutes(),T=N,A=!1,H=0;H";for(var v=0;v
"+a.locale.labels[m[v]]+"
";m=this.config.buttons_right;var u=a.config.rtl;for(v=0;v
",h+="
"+a.locale.labels[m[v]]+"
";h+="
",h+="
",l.innerHTML=h,a.config.drag_lightbox&&(a.event(l.firstChild,"mousedown",a._ready_to_dnd),a.event(l.firstChild,"selectstart",function(b){return b.preventDefault(),!1}),l.firstChild.style.cursor="move",a._init_dnd_events()),this._waiAria.lightboxAttr(l),this.show_cover(),this._cover.insertBefore(l,this._cover.firstChild),this._lightbox=l;var c=this.config.lightbox.sections;for(h="",v=0;v
"+this.locale.labels["button_"+c[v].button]+"
"),this.config.wide_form&&(h+="
");var g=this.locale.labels["section_"+c[v].name];typeof g!="string"&&(g=c[v].name),h+="
"+p+"
"+f.render.call(this,c[v]),h+="
"}}var y=l.getElementsByTagName("div");for(v=0;v
 
-
`}(i),Ft(i),function(a){a.getRootView=function(){return{view:{render:function(){return{tag:"div",type:1,attrs:{style:"width:100%;height:100%;"},hooks:{didInsert:function(){a.setCurrentView()}},body:[{el:this.el,type:1}]}},init:function(){var o=document.createElement("DIV");o.id="scheduler_"+a.uid(),o.style.width="100%",o.style.height="100%",o.classList.add("dhx_cal_container"),o.cmp="grid",o.innerHTML='
',a.init(o),this.el=o}},type:4}}}(i),Bt(i),window.jQuery&&(r=window.jQuery,d=0,n=[],r.fn.dhx_scheduler=function(a){if(typeof a!="string"){var o=[];return this.each(function(){if(this&&this.getAttribute)if(this.getAttribute("dhxscheduler"))o.push(window[this.getAttribute("dhxscheduler")]);else{var l="scheduler";d&&(l="scheduler"+(d+1),window[l]=Scheduler.getSchedulerInstance());var h=window[l];for(var v in this.setAttribute("dhxscheduler",l),a)v!="data"&&(h.config[v]=a[v]);this.getElementsByTagName("div").length||(this.innerHTML='
',this.className+=" dhx_cal_container"),h.init(this,h.config.date,h.config.mode),a.data&&h.parse(a.data),o.push(h),d++}}),o.length===1?o[0]:o}if(n[a])return n[a].apply(this,[]);r.error("Method "+a+" does not exist on jQuery.dhx_scheduler")}),function(a){(function(){var o=a.setCurrentView,l=a.updateView,h=null,v=null,u=function(p,m){var g=this;G.clearTimeout(v),G.clearTimeout(h);var y=g._date,x=g._mode;c(this,p,m),v=setTimeout(function(){a.$destroyed||(g.callEvent("onBeforeViewChange",[x,y,m||g._mode,p||g._date])?(l.call(g,p,m),g.callEvent("onViewChange",[g._mode,g._date]),G.clearTimeout(h),v=0):c(g,y,x))},a.config.delay_render)},f=function(p,m){var g=this,y=arguments;c(this,p,m),G.clearTimeout(h),h=setTimeout(function(){a.$destroyed||v||l.apply(g,y)},a.config.delay_render)};function c(p,m,g){m&&(p._date=m),g&&(p._mode=g)}a.attachEvent("onSchedulerReady",function(){a.config.delay_render?(a.setCurrentView=u,a.updateView=f):(a.setCurrentView=o,a.updateView=l)})})()}(i),function(a){a.createDataProcessor=function(o){var l,h;o instanceof Function?l=o:o.hasOwnProperty("router")?l=o.router:o.hasOwnProperty("event")&&(l=o),h=l?"CUSTOM":o.mode||"REST-JSON";var v=new Le(o.url);return v.init(a),v.setTransactionMode({mode:h,router:l},o.batchUpdate),v},a.DataProcessor=Le}(i),function(a){a.attachEvent("onSchedulerReady",function(){typeof dhtmlxError<"u"&&window.dhtmlxError.catchError("LoadXML",function(o,l,h){var v=h[0].responseText;switch(a.config.ajax_error){case"alert":G.alert(v);break;case"console":G.console.log(v)}})})}(i);const s=new ha({en:na,ar:Kt,be:Gt,ca:Xt,cn:Zt,cs:Qt,da:ea,de:ta,el:aa,es:ra,fi:ia,fr:oa,he:sa,hu:da,id:_a,it:la,jp:ca,nb:ua,nl:fa,no:pa,pl:ma,pt:va,ro:ga,ru:ya,si:ba,sk:xa,sv:ka,tr:wa,ua:Ea});i.i18n={addLocale:s.addLocale,setLocale:function(a){if(typeof a=="string"){var o=s.getLocale(a);o||(o=s.getLocale("en")),i.locale=o}else if(a)if(i.locale)for(var l in a)a[l]&&typeof a[l]=="object"?(i.locale[l]||(i.locale[l]={}),i.mixin(i.locale[l],a[l],!0)):i.locale[l]=a[l];else i.locale=a;var h=i.locale.labels;h.dhx_save_btn=h.icon_save,h.dhx_cancel_btn=h.icon_cancel,h.dhx_delete_btn=h.icon_delete,i.$container&&i.get_elements()},getLocale:s.getLocale},i.i18n.setLocale("en"),At(i),i.ext={};const _={};return i.plugins=function(a){(function(l,h,v){const u=[];for(const f in l)if(l[f]){const c=f.toLowerCase();h[c]&&h[c].forEach(function(p){const m=p.toLowerCase();l[m]||u.push(m)}),u.push(c)}return u.sort(function(f,c){const p=v[f]||0,m=v[c]||0;return p>m?1:p
';var d=document.createElement("DIV");return d.id="dhxSchedObj_"+this._genStr(12),d.innerHTML='
'+t+'
',document.body.appendChild(d.firstChild),this.attachObject(d.id,!1,!0),this.vs[this.av].sched=r,this.vs[this.av].schedId=d.id,r.setSizes=r.updateView,r.destructor=function(){},r.init(d.id,e,i),this.vs[this._viewRestore()].sched});const _e=(e,i)=>{i(!1,`The ${e} extension is not included in this version of dhtmlxScheduler.
+
`}(i),Ft(i),function(a){a.getRootView=function(){return{view:{render:function(){return{tag:"div",type:1,attrs:{style:"width:100%;height:100%;"},hooks:{didInsert:function(){a.setCurrentView()}},body:[{el:this.el,type:1}]}},init:function(){var o=document.createElement("DIV");o.id="scheduler_"+a.uid(),o.style.width="100%",o.style.height="100%",o.classList.add("dhx_cal_container"),o.cmp="grid",o.innerHTML='
',a.init(o),this.el=o}},type:4}}}(i),Bt(i),window.jQuery&&(r=window.jQuery,d=0,n=[],r.fn.dhx_scheduler=function(a){if(typeof a!="string"){var o=[];return this.each(function(){if(this&&this.getAttribute)if(this.getAttribute("dhxscheduler"))o.push(window[this.getAttribute("dhxscheduler")]);else{var l="scheduler";d&&(l="scheduler"+(d+1),window[l]=Scheduler.getSchedulerInstance());var h=window[l];for(var m in this.setAttribute("dhxscheduler",l),a)m!="data"&&(h.config[m]=a[m]);this.getElementsByTagName("div").length||(this.innerHTML='
',this.className+=" dhx_cal_container"),h.init(this,h.config.date,h.config.mode),a.data&&h.parse(a.data),o.push(h),d++}}),o.length===1?o[0]:o}if(n[a])return n[a].apply(this,[]);r.error("Method "+a+" does not exist on jQuery.dhx_scheduler")}),function(a){(function(){var o=a.setCurrentView,l=a.updateView,h=null,m=null,v=function(f,p){var g=this;G.clearTimeout(m),G.clearTimeout(h);var y=g._date,x=g._mode;c(this,f,p),m=setTimeout(function(){a.$destroyed||(g.callEvent("onBeforeViewChange",[x,y,p||g._mode,f||g._date])?(l.call(g,f,p),g.callEvent("onViewChange",[g._mode,g._date]),G.clearTimeout(h),m=0):c(g,y,x))},a.config.delay_render)},u=function(f,p){var g=this,y=arguments;c(this,f,p),G.clearTimeout(h),h=setTimeout(function(){a.$destroyed||m||l.apply(g,y)},a.config.delay_render)};function c(f,p,g){p&&(f._date=p),g&&(f._mode=g)}a.attachEvent("onSchedulerReady",function(){a.config.delay_render?(a.setCurrentView=v,a.updateView=u):(a.setCurrentView=o,a.updateView=l)})})()}(i),function(a){a.createDataProcessor=function(o){var l,h;o instanceof Function?l=o:o.hasOwnProperty("router")?l=o.router:o.hasOwnProperty("event")&&(l=o),h=l?"CUSTOM":o.mode||"REST-JSON";var m=new Le(o.url);return m.init(a),m.setTransactionMode({mode:h,router:l},o.batchUpdate),m},a.DataProcessor=Le}(i),function(a){a.attachEvent("onSchedulerReady",function(){typeof dhtmlxError<"u"&&window.dhtmlxError.catchError("LoadXML",function(o,l,h){var m=h[0].responseText;switch(a.config.ajax_error){case"alert":G.alert(m);break;case"console":G.console.log(m)}})})}(i);const s=new ha({en:na,ar:Kt,be:Gt,ca:Xt,cn:Zt,cs:Qt,da:ea,de:ta,el:aa,es:ra,fi:ia,fr:oa,he:sa,hu:da,id:_a,it:la,jp:ca,nb:ua,nl:fa,no:pa,pl:ma,pt:va,ro:ga,ru:ya,si:ba,sk:xa,sv:ka,tr:wa,ua:Ea});i.i18n={addLocale:s.addLocale,setLocale:function(a){if(typeof a=="string"){var o=s.getLocale(a);o||(o=s.getLocale("en")),i.locale=o}else if(a)if(i.locale)for(var l in a)a[l]&&typeof a[l]=="object"?(i.locale[l]||(i.locale[l]={}),i.mixin(i.locale[l],a[l],!0)):i.locale[l]=a[l];else i.locale=a;var h=i.locale.labels;h.dhx_save_btn=h.icon_save,h.dhx_cancel_btn=h.icon_cancel,h.dhx_delete_btn=h.icon_delete,i.$container&&i.get_elements()},getLocale:s.getLocale},i.i18n.setLocale("en"),At(i),i.ext={};const _={};return i.plugins=function(a){(function(l,h,m){const v=[];for(const u in l)if(l[u]){const c=u.toLowerCase();h[c]&&h[c].forEach(function(f){const p=f.toLowerCase();l[p]||v.push(p)}),v.push(c)}return v.sort(function(u,c){const f=m[u]||0,p=m[c]||0;return f>p?1:f
';var d=document.createElement("DIV");return d.id="dhxSchedObj_"+this._genStr(12),d.innerHTML='
'+t+'
',document.body.appendChild(d.firstChild),this.attachObject(d.id,!1,!0),this.vs[this.av].sched=r,this.vs[this.av].schedId=d.id,r.setSizes=r.updateView,r.destructor=function(){},r.init(d.id,e,i),this.vs[this._viewRestore()].sched});const _e=(e,i)=>{i(!1,`The ${e} extension is not included in this version of dhtmlxScheduler.
You may need a Professional version of the component.
- Contact us at https://dhtmlx.com/docs/contact.shtml if you have any questions.`)};function Na(e){(function(){var i=[];function t(){return!!i.length}function r(_){setTimeout(function(){if(e.$destroyed)return!0;t()||function(a,o){for(;a&&a!=o;)a=a.parentNode;return a==o}(document.activeElement,e.$container)||e.focus()},1)}function d(_){var a=(_=_||window.event).currentTarget;a==i[i.length-1]&&e.$keyboardNavigation.trapFocus(a,_)}if(e.attachEvent("onLightbox",function(){var _;_=e.getLightbox(),e.eventRemove(_,"keydown",d),e.event(_,"keydown",d),i.push(_)}),e.attachEvent("onAfterLightbox",function(){var _=i.pop();_&&e.eventRemove(_,"keydown",d),r()}),e.attachEvent("onAfterQuickInfo",function(){r()}),!e._keyNavMessagePopup){e._keyNavMessagePopup=!0;var n=null,s=null;const _=[];e.attachEvent("onMessagePopup",function(a){for(n=document.activeElement,s=n;s&&e._getClassName(s).indexOf("dhx_cal_data")<0;)s=s.parentNode;s&&(s=s.parentNode),e.eventRemove(a,"keydown",d),e.event(a,"keydown",d),_.push(a)}),e.attachEvent("onAfterMessagePopup",function(){var a=_.pop();a&&e.eventRemove(a,"keydown",d),setTimeout(function(){if(e.$destroyed)return!0;for(var o=document.activeElement;o&&e._getClassName(o).indexOf("dhx_cal_light")<0;)o=o.parentNode;o||(n&&n.parentNode?n.focus():s&&s.parentNode&&s.focus(),n=null,s=null)},1)})}e.$keyboardNavigation.isModal=t})()}function Ta(e){e._temp_key_scope=function(){e.config.key_nav=!0,e.$keyboardNavigation._pasteDate=null,e.$keyboardNavigation._pasteSection=null;var i=null,t={};function r(s){s=s||window.event,t.x=s.clientX,t.y=s.clientY}function d(){for(var s,_,a=document.elementFromPoint(t.x,t.y);a&&a!=e._obj;)a=a.parentNode;return s=a==e._obj,_=e.$keyboardNavigation.dispatcher.isEnabled(),s||_}function n(s){return e._lame_copy({},s)}document.body?e.event(document.body,"mousemove",r):e.event(window,"load",function(){e.event(document.body,"mousemove",r)}),e.attachEvent("onMouseMove",function(s,_){var a=e.getState();if(a.mode&&a.min_date){var o=e.getActionData(_);e.$keyboardNavigation._pasteDate=o.date,e.$keyboardNavigation._pasteSection=o.section}}),e._make_pasted_event=function(s){var _=e.$keyboardNavigation._pasteDate,a=e.$keyboardNavigation._pasteSection,o=s.end_date-s.start_date,l=n(s);if(function(v){delete v.rec_type,delete v.rec_pattern,delete v.event_pid,delete v.event_length}(l),l.start_date=new Date(_),l.end_date=new Date(l.start_date.valueOf()+o),a){var h=e._get_section_property();e.config.multisection&&s[h]&&e.isMultisectionEvent&&e.isMultisectionEvent(s)?l[h]=s[h]:l[h]=a}return l},e._do_paste=function(s,_,a){e.callEvent("onBeforeEventPasted",[s,_,a])!==!1&&(e.addEvent(_),e.callEvent("onEventPasted",[s,_,a]))},e._is_key_nav_active=function(){return!(!this._is_initialized()||this._is_lightbox_open()||!this.config.key_nav)},e.event(document,"keydown",function(s){(s.ctrlKey||s.metaKey)&&s.keyCode==86&&e._buffer_event&&!e.$keyboardNavigation.dispatcher.isEnabled()&&(e.$keyboardNavigation.dispatcher.isActive=d())}),e._key_nav_copy_paste=function(s){if(!e._is_key_nav_active())return!0;if(s.keyCode==37||s.keyCode==39){s.cancelBubble=!0;var _=e.date.add(e._date,s.keyCode==37?-1:1,e._mode);return e.setCurrentView(_),!0}var a,o=(a=e.$keyboardNavigation.dispatcher.getActiveNode())&&a.eventId?a.eventId:e._select_id;if((s.ctrlKey||s.metaKey)&&s.keyCode==67)return o&&(e._buffer_event=n(e.getEvent(o)),i=!0,e.callEvent("onEventCopied",[e.getEvent(o)])),!0;if((s.ctrlKey||s.metaKey)&&s.keyCode==88&&o){i=!1;var l=e._buffer_event=n(e.getEvent(o));e.updateEvent(l.id),e.callEvent("onEventCut",[l])}if((s.ctrlKey||s.metaKey)&&s.keyCode==86&&d()){if(l=(l=e._buffer_event?e.getEvent(e._buffer_event.id):e._buffer_event)||e._buffer_event){var h=e._make_pasted_event(l);i?(h.id=e.uid(),e._do_paste(i,h,l)):e.callEvent("onBeforeEventChanged",[h,s,!1,l])&&(e._do_paste(i,h,l),i=!0)}return!0}}},e._temp_key_scope()}function Aa(e){e.$keyboardNavigation.attachSchedulerHandlers=function(){var i,t=e.$keyboardNavigation.dispatcher,r=function(a){if(e.config.key_nav)return t.keyDownHandler(a)},d=function(){t.keepScrollPosition(function(){t.focusGlobalNode()})};e.attachEvent("onDataRender",function(){e.config.key_nav&&t.isEnabled()&&!e.getState().editor_id&&(clearTimeout(i),i=setTimeout(function(){if(e.$destroyed)return!0;t.isEnabled()||t.enable(),n()}))});var n=function(){if(t.isEnabled()){var a=t.getActiveNode();a&&(a.isValid()||(a=a.fallback()),!a||a instanceof e.$keyboardNavigation.MinicalButton||a instanceof e.$keyboardNavigation.MinicalCell||t.keepScrollPosition(function(){a.focus(!0)}))}};function s(a){if(!e.config.key_nav)return!0;const o=e.getView();let l=!1;if(e.getState().mode==="month")l=e.$keyboardNavigation.isChildOf(a.target||a.srcElement,e.$container.querySelector(".dhx_cal_month_table"));else if(o&&o.layout==="timeline")l=e.$keyboardNavigation.isChildOf(a.target||a.srcElement,e.$container.querySelector(".dhx_timeline_data_col"));else{const u=e.$container.querySelectorAll(".dhx_scale_holder");l=Array.from(u).some(f=>f===a.target.parentNode)}var h,v=e.getActionData(a);e._locate_event(a.target||a.srcElement)?h=new e.$keyboardNavigation.Event(e._locate_event(a.target||a.srcElement)):l&&(h=new e.$keyboardNavigation.TimeSlot,v.date&&l&&(h=h.nextSlot(new e.$keyboardNavigation.TimeSlot(v.date,null,v.section)))),h&&(t.isEnabled()?v.date&&l&&t.delay(function(){t.setActiveNode(h)}):t.activeNode=h)}e.attachEvent("onSchedulerReady",function(){var a=e.$container;e.eventRemove(document,"keydown",r),e.eventRemove(a,"mousedown",s),e.eventRemove(a,"focus",d),e.config.key_nav?(e.event(document,"keydown",r),e.event(a,"mousedown",s),e.event(a,"focus",d),a.setAttribute("tabindex","0")):a.removeAttribute("tabindex")});var _=e.updateEvent;e.updateEvent=function(a){var o=_.apply(this,arguments);if(e.config.key_nav&&t.isEnabled()&&e.getState().select_id==a){var l=new e.$keyboardNavigation.Event(a);e.getState().lightbox_id||function(h){if(e.config.key_nav&&t.isEnabled()){var v=h,u=new e.$keyboardNavigation.Event(v.eventId);if(!u.isValid()){var f=u.start||v.start,c=u.end||v.end,p=u.section||v.section;(u=new e.$keyboardNavigation.TimeSlot(f,c,p)).isValid()||(u=new e.$keyboardNavigation.TimeSlot)}t.setActiveNode(u);var m=t.getActiveNode();m&&m.getNode&&document.activeElement!=m.getNode()&&t.focusNode(t.getActiveNode())}}(l)}return o},e.attachEvent("onEventDeleted",function(a){return e.config.key_nav&&t.isEnabled()&&t.getActiveNode().eventId==a&&t.setActiveNode(new e.$keyboardNavigation.TimeSlot),!0}),e.attachEvent("onClearAll",function(){if(!e.config.key_nav)return!0;t.isEnabled()&&t.getActiveNode()instanceof e.$keyboardNavigation.Event&&t.setActiveNode(new e.$keyboardNavigation.TimeSlot)})}}class Ca{constructor(i){this.map=null,this._markers=[],this.scheduler=i}onEventClick(i){if(this._markers&&this._markers.length>0){for(let t=0;t{this.infoWindow&&this.infoWindow.close(),this.infoWindow=new google.maps.InfoWindow({maxWidth:this.settings.info_window_max_width}),this.infoWindow.setContent(this.scheduler.templates.map_info_content(i)),this.infoWindow.open({anchor:d,map:this.map})});let n={event:i,...t,marker:d};this._markers.push(n)}removeEventMarker(i){for(let t=0;t0){for(let i=0;i{t.geocode({address:i},function(d,n){n==google.maps.GeocoderStatus.OK?r({lat:d[0].geometry.location.lat(),lng:d[0].geometry.location.lng()}):(console.error("Geocode was not successful for the following reason: "+n),r({}))})})}}class Oa{constructor(i){this.map=null,this._markers=[],this.scheduler=i}onEventClick(i){if(this._markers&&this._markers.length>0)for(let t=0;ta.json());if(_.address){let a=_.address.country;r.addEventNow({lat:s.latlng.lat,lng:s.latlng.lng,event_location:a,start_date:r.getState().date,end_date:r.date.add(r.getState().date,r.config.time_step,"minute")})}else console.error("unable recieve a position of the event",_.error)}),this.map=n,this.settings=t}destroy(i){for(this.map.remove();i.firstChild;)i.firstChild.remove();i.innerHTML=""}addEventMarker(i){const t=L.icon({iconUrl:"https://unpkg.com/leaflet@1.0.3/dist/images/marker-icon.png",iconSize:[25,41],shadowSize:[30,65],iconAnchor:[12,41],shadowAnchor:[7,65]});let r={minWidth:180,maxWidth:this.settings.info_window_max_width};const d=L.popup(r).setContent(this.scheduler.templates.map_info_content(i)),n=L.tooltip().setContent(i.text);let s=[i.lat,i.lng];i.lat&&i.lng||(s=[this.settings.error_position.lat,this.settings.error_position.lng]);const _={event:i,marker:L.marker(s,{icon:t}).bindPopup(d).bindTooltip(n).addTo(this.map)};this._markers.push(_)}removeEventMarker(i){for(let t=0;td.json());return r&&r.length?(t.lat=+r[0].lat,t.lng=+r[0].lon):console.error(`Unable recieve a position of the event's location: ${i}`),t}}class La{constructor(i){this.map=null,this._markers=[],this.scheduler=i}onEventClick(i){if(this._markers&&this._markers.length>0)for(let t=0;t_.json());if(s.features){let _=s.features[0].place_name;r.addEventNow({lat:n.lngLat.lat,lng:n.lngLat.lng,event_location:_,start_date:r.getState().date,end_date:r.date.add(r.getState().date,r.config.time_step,"minute")})}else console.error("unable recieve a position of the event")}),this.map=d,this.settings=t}destroy(i){for(this.map.remove();i.firstChild;)i.firstChild.remove();i.innerHTML=""}addEventMarker(i){let t=[i.lng,i.lat];i.lat&&i.lng||(t=[this.settings.error_position.lng,this.settings.error_position.lat]);const r=new mapboxgl.Popup({offset:25,focusAfterOpen:!1}).setMaxWidth(`${this.settings.info_window_max_width}px`).setHTML(this.scheduler.templates.map_info_content(i)),d={event:i,marker:new mapboxgl.Marker().setLngLat(t).setPopup(r).addTo(this.map)};this._markers.push(d)}removeEventMarker(i){for(let t=0;td.json()),r={};return t&&t.features.length?(r.lng=t.features[0].center[0],r.lat=t.features[0].center[1]):console.error(`Unable recieve a position of the event's location: ${i}`),r}}var He=["MO","TU","WE","TH","FR","SA","SU"],W=function(){function e(i,t){if(t===0)throw new Error("Can't create weekday with n == 0");this.weekday=i,this.n=t}return e.fromStr=function(i){return new e(He.indexOf(i))},e.prototype.nth=function(i){return this.n===i?this:new e(this.weekday,i)},e.prototype.equals=function(i){return this.weekday===i.weekday&&this.n===i.n},e.prototype.toString=function(){var i=He[this.weekday];return this.n&&(i=(this.n>0?"+":"")+String(this.n)+i),i},e.prototype.getJsWeekday=function(){return this.weekday===6?0:this.weekday+1},e}(),Y=function(e){return e!=null},ae=function(e){return typeof e=="number"},at=function(e){return typeof e=="string"&&He.includes(e)},X=Array.isArray,ne=function(e,i){i===void 0&&(i=e),arguments.length===1&&(i=e,e=0);for(var t=[],r=e;r>=0,r.length>i?String(r):((i-=r.length)>t.length&&(t+=j(t,i/t.length)),t.slice(0,i)+String(r))}var Ha=function(e,i,t){var r=e.split(i);return t?r.slice(0,t).concat([r.slice(t).join(i)]):r},Q=function(e,i){var t=e%i;return t*i<0?t+i:t},$e=function(e,i){return{div:Math.floor(e/i),mod:Q(e,i)}},re=function(e){return!Y(e)||e.length===0},V=function(e){return!re(e)},R=function(e,i){return V(e)&&e.indexOf(i)!==-1},ue=function(e,i,t,r,d,n){return r===void 0&&(r=0),d===void 0&&(d=0),n===void 0&&(n=0),new Date(Date.UTC(e,i-1,t,r,d,n))},$a=[31,28,31,30,31,30,31,31,30,31,30,31],nt=864e5,rt=9999,it=ue(1970,1,1),za=[6,0,1,2,3,4,5],ge=function(e){return e%4==0&&e%100!=0||e%400==0},ot=function(e){return e instanceof Date},ye=function(e){return ot(e)&&!isNaN(e.getTime())},ze=function(e){return i=it,t=e.getTime()-i.getTime(),Math.round(t/nt);var i,t},st=function(e){return new Date(it.getTime()+e*nt)},qa=function(e){var i=e.getUTCMonth();return i===1&&ge(e.getUTCFullYear())?29:$a[i]},pe=function(e){return za[e.getUTCDay()]},dt=function(e,i){var t=ue(e,i+1,1);return[pe(t),qa(t)]},_t=function(e,i){return i=i||e,new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds()))},qe=function(e){return new Date(e.getTime())},lt=function(e){for(var i=[],t=0;tthis.maxDate;if(this.method==="between"){if(t)return!0;if(r)return!1}else if(this.method==="before"){if(r)return!1}else if(this.method==="after")return!!t||(this.add(i),!1);return this.add(i)},e.prototype.add=function(i){return this._result.push(i),!0},e.prototype.getValue=function(){var i=this._result;switch(this.method){case"all":case"between":return i;default:return i.length?i[i.length-1]:null}},e.prototype.clone=function(){return new e(this.method,this.args)},e}(),Pe=function(e,i){return Pe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var d in r)Object.prototype.hasOwnProperty.call(r,d)&&(t[d]=r[d])},Pe(e,i)};function Re(e,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function t(){this.constructor=e}Pe(e,i),e.prototype=i===null?Object.create(i):(t.prototype=i.prototype,new t)}var Z=function(){return Z=Object.assign||function(e){for(var i,t=1,r=arguments.length;ti[0].length)&&(i=d,t=r)}if(i!=null&&(this.text=this.text.substr(i[0].length),this.text===""&&(this.done=!0)),i==null)return this.done=!0,this.symbol=null,void(this.value=null)}while(t==="SKIP");return this.symbol=t,this.value=i,!0},e.prototype.accept=function(i){if(this.symbol===i){if(this.value){var t=this.value;return this.nextSymbol(),t}return this.nextSymbol(),!0}return!1},e.prototype.acceptNumber=function(){return this.accept("number")},e.prototype.expect=function(i){if(this.accept(i))return!0;throw new Error("expected "+i+" but found "+this.symbol)},e}();function ft(e,i){i===void 0&&(i=we);var t={},r=new Pa(i.tokens);return r.start(e)?(function(){r.expect("every");var l=r.acceptNumber();if(l&&(t.interval=parseInt(l[0],10)),r.isDone())throw new Error("Unexpected end");switch(r.symbol){case"day(s)":t.freq=C.DAILY,r.nextSymbol()&&(n(),o());break;case"weekday(s)":t.freq=C.WEEKLY,t.byweekday=[C.MO,C.TU,C.WE,C.TH,C.FR],r.nextSymbol(),n(),o();break;case"week(s)":t.freq=C.WEEKLY,r.nextSymbol()&&(d(),n(),o());break;case"hour(s)":t.freq=C.HOURLY,r.nextSymbol()&&(d(),o());break;case"minute(s)":t.freq=C.MINUTELY,r.nextSymbol()&&(d(),o());break;case"month(s)":t.freq=C.MONTHLY,r.nextSymbol()&&(d(),o());break;case"year(s)":t.freq=C.YEARLY,r.nextSymbol()&&(d(),o());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":t.freq=C.WEEKLY;var h=r.symbol.substr(0,2).toUpperCase();if(t.byweekday=[C[h]],!r.nextSymbol())return;for(;r.accept("comma");){if(r.isDone())throw new Error("Unexpected end");var v=_();if(!v)throw new Error("Unexpected symbol "+r.symbol+", expected weekday");t.byweekday.push(C[v]),r.nextSymbol()}n(),function(){r.accept("on"),r.accept("the");var f=a();if(f)for(t.bymonthday=[f],r.nextSymbol();r.accept("comma");){if(!(f=a()))throw new Error("Unexpected symbol "+r.symbol+"; expected monthday");t.bymonthday.push(f),r.nextSymbol()}}(),o();break;case"january":case"february":case"march":case"april":case"may":case"june":case"july":case"august":case"september":case"october":case"november":case"december":if(t.freq=C.YEARLY,t.bymonth=[s()],!r.nextSymbol())return;for(;r.accept("comma");){if(r.isDone())throw new Error("Unexpected end");var u=s();if(!u)throw new Error("Unexpected symbol "+r.symbol+", expected month");t.bymonth.push(u),r.nextSymbol()}d(),o();break;default:throw new Error("Unknown symbol")}}(),t):null;function d(){var l=r.accept("on"),h=r.accept("the");if(l||h)do{var v=a(),u=_(),f=s();if(v)u?(r.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(C[u].nth(v))):(t.bymonthday||(t.bymonthday=[]),t.bymonthday.push(v),r.accept("day(s)"));else if(u)r.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(C[u]);else if(r.symbol==="weekday(s)")r.nextSymbol(),t.byweekday||(t.byweekday=[C.MO,C.TU,C.WE,C.TH,C.FR]);else if(r.symbol==="week(s)"){r.nextSymbol();var c=r.acceptNumber();if(!c)throw new Error("Unexpected symbol "+r.symbol+", expected week number");for(t.byweekno=[parseInt(c[0],10)];r.accept("comma");){if(!(c=r.acceptNumber()))throw new Error("Unexpected symbol "+r.symbol+"; expected monthday");t.byweekno.push(parseInt(c[0],10))}}else{if(!f)return;r.nextSymbol(),t.bymonth||(t.bymonth=[]),t.bymonth.push(f)}}while(r.accept("comma")||r.accept("the")||r.accept("on"))}function n(){if(r.accept("at"))do{var l=r.acceptNumber();if(!l)throw new Error("Unexpected symbol "+r.symbol+", expected hour");for(t.byhour=[parseInt(l[0],10)];r.accept("comma");){if(!(l=r.acceptNumber()))throw new Error("Unexpected symbol "+r.symbol+"; expected hour");t.byhour.push(parseInt(l[0],10))}}while(r.accept("comma")||r.accept("at"))}function s(){switch(r.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function _(){switch(r.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return r.symbol.substr(0,2).toUpperCase();default:return!1}}function a(){switch(r.symbol){case"last":return r.nextSymbol(),-1;case"first":return r.nextSymbol(),1;case"second":return r.nextSymbol(),r.accept("last")?-2:2;case"third":return r.nextSymbol(),r.accept("last")?-3:3;case"nth":var l=parseInt(r.value[1],10);if(l<-366||l>366)throw new Error("Nth out of range: "+l);return r.nextSymbol(),r.accept("last")?-l:l;default:return!1}}function o(){if(r.symbol==="until"){var l=Date.parse(r.text);if(!l)throw new Error("Cannot parse until date:"+r.text);t.until=new Date(l)}else r.accept("for")&&(t.count=parseInt(r.value[0],10),r.expect("number"))}}function Ye(e){return e12){var r=Math.floor(this.month/12),d=Q(this.month,12);this.month=d,this.year+=r,this.month===0&&(this.month=12,--this.year)}},i.prototype.addWeekly=function(t,r){r>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-r))+7*t:this.day+=-(this.getWeekday()-r)+7*t,this.fixDay()},i.prototype.addDaily=function(t){this.day+=t,this.fixDay()},i.prototype.addHours=function(t,r,d){for(r&&(this.hour+=Math.floor((23-this.hour)/t)*t);;){this.hour+=t;var n=$e(this.hour,24),s=n.div,_=n.mod;if(s&&(this.hour=_,this.addDaily(s)),re(d)||R(d,this.hour))break}},i.prototype.addMinutes=function(t,r,d,n){for(r&&(this.minute+=Math.floor((1439-(60*this.hour+this.minute))/t)*t);;){this.minute+=t;var s=$e(this.minute,60),_=s.div,a=s.mod;if(_&&(this.minute=a,this.addHours(_,!1,d)),(re(d)||R(d,this.hour))&&(re(n)||R(n,this.minute)))break}},i.prototype.addSeconds=function(t,r,d,n,s){for(r&&(this.second+=Math.floor((86399-(3600*this.hour+60*this.minute+this.second))/t)*t);;){this.second+=t;var _=$e(this.second,60),a=_.div,o=_.mod;if(a&&(this.second=o,this.addMinutes(a,!1,d,n)),(re(d)||R(d,this.hour))&&(re(n)||R(n,this.minute))&&(re(s)||R(s,this.second)))break}},i.prototype.fixDay=function(){if(!(this.day<=28)){var t=dt(this.year,this.month-1)[1];if(!(this.day<=t))for(;this.day>t;){if(this.day-=t,++this.month,this.month===13&&(this.month=1,++this.year,this.year>rt))return;t=dt(this.year,this.month-1)[1]}}},i.prototype.add=function(t,r){var d=t.freq,n=t.interval,s=t.wkst,_=t.byhour,a=t.byminute,o=t.bysecond;switch(d){case I.YEARLY:return this.addYears(n);case I.MONTHLY:return this.addMonths(n);case I.WEEKLY:return this.addWeekly(n,s);case I.DAILY:return this.addDaily(n);case I.HOURLY:return this.addHours(n,r,_);case I.MINUTELY:return this.addMinutes(n,r,_,a);case I.SECONDLY:return this.addSeconds(n,r,_,a,o)}},i}(Ee);function pt(e){for(var i=[],t=0,r=Object.keys(e);t=-366&&n<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}if(!(i.byweekno||V(i.byweekno)||V(i.byyearday)||i.bymonthday||V(i.bymonthday)||Y(i.byweekday)||Y(i.byeaster)))switch(i.freq){case C.YEARLY:i.bymonth||(i.bymonth=i.dtstart.getUTCMonth()+1),i.bymonthday=i.dtstart.getUTCDate();break;case C.MONTHLY:i.bymonthday=i.dtstart.getUTCDate();break;case C.WEEKLY:i.byweekday=[pe(i.dtstart)]}if(Y(i.bymonth)&&!X(i.bymonth)&&(i.bymonth=[i.bymonth]),Y(i.byyearday)&&!X(i.byyearday)&&ae(i.byyearday)&&(i.byyearday=[i.byyearday]),Y(i.bymonthday))if(X(i.bymonthday)){var r=[],d=[];for(t=0;t0?r.push(n):n<0&&d.push(n)}i.bymonthday=r,i.bynmonthday=d}else i.bymonthday<0?(i.bynmonthday=[i.bymonthday],i.bymonthday=[]):(i.bynmonthday=[],i.bymonthday=[i.bymonthday]);else i.bymonthday=[],i.bynmonthday=[];if(Y(i.byweekno)&&!X(i.byweekno)&&(i.byweekno=[i.byweekno]),Y(i.byweekday))if(ae(i.byweekday))i.byweekday=[i.byweekday],i.bynweekday=null;else if(at(i.byweekday))i.byweekday=[W.fromStr(i.byweekday).weekday],i.bynweekday=null;else if(i.byweekday instanceof W)!i.byweekday.n||i.freq>C.MONTHLY?(i.byweekday=[i.byweekday.weekday],i.bynweekday=null):(i.bynweekday=[[i.byweekday.weekday,i.byweekday.n]],i.byweekday=null);else{var s=[],_=[];for(t=0;tC.MONTHLY?s.push(a.weekday):_.push([a.weekday,a.n])}i.byweekday=V(s)?s:null,i.bynweekday=V(_)?_:null}else i.bynweekday=null;return Y(i.byhour)?ae(i.byhour)&&(i.byhour=[i.byhour]):i.byhour=i.freq=4?(l=0,r=o.yearlen+Q(a-i.wkst,7)):r=n-l;for(var h=Math.floor(r/7),v=Q(r,7),u=Math.floor(h+v/4),f=0;f0&&c<=u){var p=void 0;c>1?(p=l+7*(c-1),l!==t&&(p-=7-t)):p=l;for(var m=0;m<7&&(o.wnomask[p]=1,p++,o.wdaymask[p]!==i.wkst);m++);}}if(R(i.byweekno,1)&&(p=l+7*u,l!==t&&(p-=7-t),p=4?(x=0,k=b+Q(y-i.wkst,7)):k=n-l,g=Math.floor(52+Q(k,7)/4)}if(R(i.byweekno,g))for(p=0;p=C.HOURLY&&V(N)&&!R(N,w.hour)||M>=C.MINUTELY&&V(A)&&!R(A,w.minute)||M>=C.SECONDLY&&V(T)&&!R(T,w.second)?[]:D.gettimeset(M)(w.hour,w.minute,w.second,w.millisecond)}(o,a,i);;){var h=o.getdayset(r)(a.year,a.month,a.day),v=h[0],u=h[1],f=h[2],c=hn(v,u,f,o,i);if(V(s))for(var p=ln(s,l,u,f,o,v),m=0;mn)return oe(e);if(g>=t){var y=bt(g,i);if(!e.accept(y)||_&&!--_)return oe(e)}}else for(m=u;mn||g>=t&&(y=bt(g,i),!e.accept(y)||_&&!--_))return oe(e)}}if(i.interval===0||(a.add(i,c),a.year>rt))return oe(e);Ye(r)||(l=o.gettimeset(r)(a.hour,a.minute,a.second,0)),o.rebuild(a.year,a.month)}}function cn(e,i,t){var r=t.bymonth,d=t.byweekno,n=t.byweekday,s=t.byeaster,_=t.bymonthday,a=t.bynmonthday,o=t.byyearday;return V(r)&&!R(r,e.mmask[i])||V(d)&&!e.wnomask[i]||V(n)&&!R(n,e.wdaymask[i])||V(e.nwdaymask)&&!e.nwdaymask[i]||s!==null&&!R(e.eastermask,i)||(V(_)||V(a))&&!R(_,e.mdaymask[i])&&!R(a,e.nmdaymask[i])||V(o)&&(i=e.yearlen&&!R(o,i+1-e.yearlen)&&!R(o,-e.nextyearlen+i-e.yearlen))}function bt(e,i){return new Se(e,i.tzid).rezonedDate()}function oe(e){return e.getValue()}function hn(e,i,t,r,d){for(var n=!1,s=i;s0&&f[0]===" "?(v[u-1]+=f.slice(1),v.splice(u,1)):u+=1:v.splice(u,1)}return v}(e,i.unfold);return o.forEach(function(l){var h;if(l){var v=function(m){var g=function(k){if(k.indexOf(":")===-1)return{name:"RRULE",value:k};var E=Ha(k,":",1),D=E[0],w=E[1];return{name:D,value:w}}(m),y=g.name,x=g.value,b=y.split(";");if(!b)throw new Error("empty property name");return{name:b[0].toUpperCase(),parms:b.slice(1),value:x}}(l),u=v.name,f=v.parms,c=v.value;switch(u.toUpperCase()){case"RRULE":if(f.length)throw new Error("unsupported RRULE parm: ".concat(f.join(",")));t.push(Ue(l));break;case"RDATE":var p=((h=/RDATE(?:;TZID=([^:=]+))?/i.exec(l))!==null&&h!==void 0?h:[])[1];p&&!a&&(a=p),r=r.concat(kt(c,f));break;case"EXRULE":if(f.length)throw new Error("unsupported EXRULE parm: ".concat(f.join(",")));d.push(Ue(c));break;case"EXDATE":n=n.concat(kt(c,f));break;case"DTSTART":break;default:throw new Error("unsupported property: "+u)}}}),{dtstart:_,tzid:a,rrulevals:t,rdatevals:r,exrulevals:d,exdatevals:n}}function Me(e,i){return i===void 0&&(i={}),function(t,r){var d=fn(t,r),n=d.rrulevals,s=d.rdatevals,_=d.exrulevals,a=d.exdatevals,o=d.dtstart,l=d.tzid,h=r.cache===!1;if(r.compatible&&(r.forceset=!0,r.unfold=!0),r.forceset||n.length>1||s.length||_.length||a.length){var v=new pn(h);return v.dtstart(o),v.tzid(l||void 0),n.forEach(function(f){v.rrule(new C(Be(f,o,l),h))}),s.forEach(function(f){v.rdate(f)}),_.forEach(function(f){v.exrule(new C(Be(f,o,l),h))}),a.forEach(function(f){v.exdate(f)}),r.compatible&&r.dtstart&&v.rdate(o),v}var u=n[0]||{};return new C(Be(u,u.dtstart||r.dtstart||o,u.tzid||r.tzid||l),h)}(e,function(t){var r=[],d=Object.keys(t),n=Object.keys(xt);if(d.forEach(function(s){R(n,s)||r.push(s)}),r.length)throw new Error("Invalid options: "+r.join(", "));return Z(Z({},xt),t)}(i))}function Be(e,i,t){return Z(Z({},e),{dtstart:i,tzid:t})}function kt(e,i){return function(t){t.forEach(function(r){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(r))throw new Error("unsupported RDATE/EXDATE parm: "+r)})}(i),e.split(",").map(function(t){return Ie(t)})}function wt(e){var i=this;return function(t){if(t!==void 0&&(i["_".concat(e)]=t),i["_".concat(e)]!==void 0)return i["_".concat(e)];for(var r=0;rhttps://dhtmlx.com/docs/contact.shtml if you have any questions.`)};function Na(e){(function(){var i=[];function t(){return!!i.length}function r(_){setTimeout(function(){if(e.$destroyed)return!0;t()||function(a,o){for(;a&&a!=o;)a=a.parentNode;return a==o}(document.activeElement,e.$container)||e.focus()},1)}function d(_){var a=(_=_||window.event).currentTarget;a==i[i.length-1]&&e.$keyboardNavigation.trapFocus(a,_)}if(e.attachEvent("onLightbox",function(){var _;_=e.getLightbox(),e.eventRemove(_,"keydown",d),e.event(_,"keydown",d),i.push(_)}),e.attachEvent("onAfterLightbox",function(){var _=i.pop();_&&e.eventRemove(_,"keydown",d),r()}),e.attachEvent("onAfterQuickInfo",function(){r()}),!e._keyNavMessagePopup){e._keyNavMessagePopup=!0;var n=null,s=null;const _=[];e.attachEvent("onMessagePopup",function(a){for(n=document.activeElement,s=n;s&&e._getClassName(s).indexOf("dhx_cal_data")<0;)s=s.parentNode;s&&(s=s.parentNode),e.eventRemove(a,"keydown",d),e.event(a,"keydown",d),_.push(a)}),e.attachEvent("onAfterMessagePopup",function(){var a=_.pop();a&&e.eventRemove(a,"keydown",d),setTimeout(function(){if(e.$destroyed)return!0;for(var o=document.activeElement;o&&e._getClassName(o).indexOf("dhx_cal_light")<0;)o=o.parentNode;o||(n&&n.parentNode?n.focus():s&&s.parentNode&&s.focus(),n=null,s=null)},1)})}e.$keyboardNavigation.isModal=t})()}function Ta(e){e._temp_key_scope=function(){e.config.key_nav=!0,e.$keyboardNavigation._pasteDate=null,e.$keyboardNavigation._pasteSection=null;var i=null,t={};function r(s){s=s||window.event,t.x=s.clientX,t.y=s.clientY}function d(){for(var s,_,a=document.elementFromPoint(t.x,t.y);a&&a!=e._obj;)a=a.parentNode;return s=a==e._obj,_=e.$keyboardNavigation.dispatcher.isEnabled(),s||_}function n(s){return e._lame_copy({},s)}document.body?e.event(document.body,"mousemove",r):e.event(window,"load",function(){e.event(document.body,"mousemove",r)}),e.attachEvent("onMouseMove",function(s,_){var a=e.getState();if(a.mode&&a.min_date){var o=e.getActionData(_);e.$keyboardNavigation._pasteDate=o.date,e.$keyboardNavigation._pasteSection=o.section}}),e._make_pasted_event=function(s){var _=e.$keyboardNavigation._pasteDate,a=e.$keyboardNavigation._pasteSection,o=s.end_date-s.start_date,l=n(s);if(function(m){delete m.rec_type,delete m.rec_pattern,delete m.event_pid,delete m.event_length}(l),l.start_date=new Date(_),l.end_date=new Date(l.start_date.valueOf()+o),a){var h=e._get_section_property();e.config.multisection&&s[h]&&e.isMultisectionEvent&&e.isMultisectionEvent(s)?l[h]=s[h]:l[h]=a}return l},e._do_paste=function(s,_,a){e.callEvent("onBeforeEventPasted",[s,_,a])!==!1&&(e.addEvent(_),e.callEvent("onEventPasted",[s,_,a]))},e._is_key_nav_active=function(){return!(!this._is_initialized()||this._is_lightbox_open()||!this.config.key_nav)},e.event(document,"keydown",function(s){(s.ctrlKey||s.metaKey)&&s.keyCode==86&&e._buffer_event&&!e.$keyboardNavigation.dispatcher.isEnabled()&&(e.$keyboardNavigation.dispatcher.isActive=d())}),e._key_nav_copy_paste=function(s){if(!e._is_key_nav_active())return!0;if(s.keyCode==37||s.keyCode==39){s.cancelBubble=!0;var _=e.date.add(e._date,s.keyCode==37?-1:1,e._mode);return e.setCurrentView(_),!0}var a,o=(a=e.$keyboardNavigation.dispatcher.getActiveNode())&&a.eventId?a.eventId:e._select_id;if((s.ctrlKey||s.metaKey)&&s.keyCode==67)return o&&(e._buffer_event=n(e.getEvent(o)),i=!0,e.callEvent("onEventCopied",[e.getEvent(o)])),!0;if((s.ctrlKey||s.metaKey)&&s.keyCode==88&&o){i=!1;var l=e._buffer_event=n(e.getEvent(o));e.updateEvent(l.id),e.callEvent("onEventCut",[l])}if((s.ctrlKey||s.metaKey)&&s.keyCode==86&&d()){if(l=(l=e._buffer_event?e.getEvent(e._buffer_event.id):e._buffer_event)||e._buffer_event){var h=e._make_pasted_event(l);i?(h.id=e.uid(),e._do_paste(i,h,l)):e.callEvent("onBeforeEventChanged",[h,s,!1,l])&&(e._do_paste(i,h,l),i=!0)}return!0}}},e._temp_key_scope()}function Aa(e){e.$keyboardNavigation.attachSchedulerHandlers=function(){var i,t=e.$keyboardNavigation.dispatcher,r=function(a){if(e.config.key_nav)return t.keyDownHandler(a)},d=function(){t.keepScrollPosition(function(){t.focusGlobalNode()})};e.attachEvent("onDataRender",function(){e.config.key_nav&&t.isEnabled()&&!e.getState().editor_id&&(clearTimeout(i),i=setTimeout(function(){if(e.$destroyed)return!0;t.isEnabled()||t.enable(),n()}))});var n=function(){if(t.isEnabled()){var a=t.getActiveNode();a&&(a.isValid()||(a=a.fallback()),!a||a instanceof e.$keyboardNavigation.MinicalButton||a instanceof e.$keyboardNavigation.MinicalCell||t.keepScrollPosition(function(){a.focus(!0)}))}};function s(a){if(!e.config.key_nav)return!0;const o=e.getView();let l=!1;if(e.getState().mode==="month")l=e.$keyboardNavigation.isChildOf(a.target||a.srcElement,e.$container.querySelector(".dhx_cal_month_table"));else if(o&&o.layout==="timeline")l=e.$keyboardNavigation.isChildOf(a.target||a.srcElement,e.$container.querySelector(".dhx_timeline_data_col"));else{const v=e.$container.querySelectorAll(".dhx_scale_holder");l=Array.from(v).some(u=>u===a.target.parentNode)}var h,m=e.getActionData(a);e._locate_event(a.target||a.srcElement)?h=new e.$keyboardNavigation.Event(e._locate_event(a.target||a.srcElement)):l&&(h=new e.$keyboardNavigation.TimeSlot,m.date&&l&&(h=h.nextSlot(new e.$keyboardNavigation.TimeSlot(m.date,null,m.section)))),h&&(t.isEnabled()?m.date&&l&&t.delay(function(){t.setActiveNode(h)}):t.activeNode=h)}e.attachEvent("onSchedulerReady",function(){var a=e.$container;e.eventRemove(document,"keydown",r),e.eventRemove(a,"mousedown",s),e.eventRemove(a,"focus",d),e.config.key_nav?(e.event(document,"keydown",r),e.event(a,"mousedown",s),e.event(a,"focus",d),a.setAttribute("tabindex","0")):a.removeAttribute("tabindex")});var _=e.updateEvent;e.updateEvent=function(a){var o=_.apply(this,arguments);if(e.config.key_nav&&t.isEnabled()&&e.getState().select_id==a){var l=new e.$keyboardNavigation.Event(a);e.getState().lightbox_id||function(h){if(e.config.key_nav&&t.isEnabled()){var m=h,v=new e.$keyboardNavigation.Event(m.eventId);if(!v.isValid()){var u=v.start||m.start,c=v.end||m.end,f=v.section||m.section;(v=new e.$keyboardNavigation.TimeSlot(u,c,f)).isValid()||(v=new e.$keyboardNavigation.TimeSlot)}t.setActiveNode(v);var p=t.getActiveNode();p&&p.getNode&&document.activeElement!=p.getNode()&&t.focusNode(t.getActiveNode())}}(l)}return o},e.attachEvent("onEventDeleted",function(a){return e.config.key_nav&&t.isEnabled()&&t.getActiveNode().eventId==a&&t.setActiveNode(new e.$keyboardNavigation.TimeSlot),!0}),e.attachEvent("onClearAll",function(){if(!e.config.key_nav)return!0;t.isEnabled()&&t.getActiveNode()instanceof e.$keyboardNavigation.Event&&t.setActiveNode(new e.$keyboardNavigation.TimeSlot)})}}class Ca{constructor(i){this.map=null,this._markers=[],this.scheduler=i}onEventClick(i){if(this._markers&&this._markers.length>0){for(let t=0;t{this.infoWindow&&this.infoWindow.close(),this.infoWindow=new google.maps.InfoWindow({maxWidth:this.settings.info_window_max_width}),this.infoWindow.setContent(this.scheduler.templates.map_info_content(i)),this.infoWindow.open({anchor:d,map:this.map})});let n={event:i,...t,marker:d};this._markers.push(n)}removeEventMarker(i){for(let t=0;t0){for(let i=0;i{t.geocode({address:i},function(d,n){n==google.maps.GeocoderStatus.OK?r({lat:d[0].geometry.location.lat(),lng:d[0].geometry.location.lng()}):(console.error("Geocode was not successful for the following reason: "+n),r({}))})})}}class Oa{constructor(i){this.map=null,this._markers=[],this.scheduler=i}onEventClick(i){if(this._markers&&this._markers.length>0)for(let t=0;ta.json());if(_.address){let a=_.address.country;r.addEventNow({lat:s.latlng.lat,lng:s.latlng.lng,event_location:a,start_date:r.getState().date,end_date:r.date.add(r.getState().date,r.config.time_step,"minute")})}else console.error("unable recieve a position of the event",_.error)}),this.map=n,this.settings=t}destroy(i){for(this.map.remove();i.firstChild;)i.firstChild.remove();i.innerHTML=""}addEventMarker(i){const t=L.icon({iconUrl:"https://unpkg.com/leaflet@1.0.3/dist/images/marker-icon.png",iconSize:[25,41],shadowSize:[30,65],iconAnchor:[12,41],shadowAnchor:[7,65]});let r={minWidth:180,maxWidth:this.settings.info_window_max_width};const d=L.popup(r).setContent(this.scheduler.templates.map_info_content(i)),n=L.tooltip().setContent(i.text);let s=[i.lat,i.lng];i.lat&&i.lng||(s=[this.settings.error_position.lat,this.settings.error_position.lng]);const _={event:i,marker:L.marker(s,{icon:t}).bindPopup(d).bindTooltip(n).addTo(this.map)};this._markers.push(_)}removeEventMarker(i){for(let t=0;td.json());return r&&r.length?(t.lat=+r[0].lat,t.lng=+r[0].lon):console.error(`Unable recieve a position of the event's location: ${i}`),t}}class La{constructor(i){this.map=null,this._markers=[],this.scheduler=i}onEventClick(i){if(this._markers&&this._markers.length>0)for(let t=0;t_.json());if(s.features){let _=s.features[0].place_name;r.addEventNow({lat:n.lngLat.lat,lng:n.lngLat.lng,event_location:_,start_date:r.getState().date,end_date:r.date.add(r.getState().date,r.config.time_step,"minute")})}else console.error("unable recieve a position of the event")}),this.map=d,this.settings=t}destroy(i){for(this.map.remove();i.firstChild;)i.firstChild.remove();i.innerHTML=""}addEventMarker(i){let t=[i.lng,i.lat];i.lat&&i.lng||(t=[this.settings.error_position.lng,this.settings.error_position.lat]);const r=new mapboxgl.Popup({offset:25,focusAfterOpen:!1}).setMaxWidth(`${this.settings.info_window_max_width}px`).setHTML(this.scheduler.templates.map_info_content(i)),d={event:i,marker:new mapboxgl.Marker().setLngLat(t).setPopup(r).addTo(this.map)};this._markers.push(d)}removeEventMarker(i){for(let t=0;td.json()),r={};return t&&t.features.length?(r.lng=t.features[0].center[0],r.lat=t.features[0].center[1]):console.error(`Unable recieve a position of the event's location: ${i}`),r}}var He=["MO","TU","WE","TH","FR","SA","SU"],W=function(){function e(i,t){if(t===0)throw new Error("Can't create weekday with n == 0");this.weekday=i,this.n=t}return e.fromStr=function(i){return new e(He.indexOf(i))},e.prototype.nth=function(i){return this.n===i?this:new e(this.weekday,i)},e.prototype.equals=function(i){return this.weekday===i.weekday&&this.n===i.n},e.prototype.toString=function(){var i=He[this.weekday];return this.n&&(i=(this.n>0?"+":"")+String(this.n)+i),i},e.prototype.getJsWeekday=function(){return this.weekday===6?0:this.weekday+1},e}(),Y=function(e){return e!=null},ae=function(e){return typeof e=="number"},at=function(e){return typeof e=="string"&&He.includes(e)},X=Array.isArray,ne=function(e,i){i===void 0&&(i=e),arguments.length===1&&(i=e,e=0);for(var t=[],r=e;r>=0,r.length>i?String(r):((i-=r.length)>t.length&&(t+=j(t,i/t.length)),t.slice(0,i)+String(r))}var Ha=function(e,i,t){var r=e.split(i);return t?r.slice(0,t).concat([r.slice(t).join(i)]):r},Q=function(e,i){var t=e%i;return t*i<0?t+i:t},$e=function(e,i){return{div:Math.floor(e/i),mod:Q(e,i)}},re=function(e){return!Y(e)||e.length===0},V=function(e){return!re(e)},R=function(e,i){return V(e)&&e.indexOf(i)!==-1},ue=function(e,i,t,r,d,n){return r===void 0&&(r=0),d===void 0&&(d=0),n===void 0&&(n=0),new Date(Date.UTC(e,i-1,t,r,d,n))},$a=[31,28,31,30,31,30,31,31,30,31,30,31],nt=864e5,rt=9999,it=ue(1970,1,1),za=[6,0,1,2,3,4,5],ge=function(e){return e%4==0&&e%100!=0||e%400==0},ot=function(e){return e instanceof Date},ye=function(e){return ot(e)&&!isNaN(e.getTime())},ze=function(e){return i=it,t=e.getTime()-i.getTime(),Math.round(t/nt);var i,t},st=function(e){return new Date(it.getTime()+e*nt)},qa=function(e){var i=e.getUTCMonth();return i===1&&ge(e.getUTCFullYear())?29:$a[i]},pe=function(e){return za[e.getUTCDay()]},dt=function(e,i){var t=ue(e,i+1,1);return[pe(t),qa(t)]},_t=function(e,i){return i=i||e,new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds()))},qe=function(e){return new Date(e.getTime())},lt=function(e){for(var i=[],t=0;tthis.maxDate;if(this.method==="between"){if(t)return!0;if(r)return!1}else if(this.method==="before"){if(r)return!1}else if(this.method==="after")return!!t||(this.add(i),!1);return this.add(i)},e.prototype.add=function(i){return this._result.push(i),!0},e.prototype.getValue=function(){var i=this._result;switch(this.method){case"all":case"between":return i;default:return i.length?i[i.length-1]:null}},e.prototype.clone=function(){return new e(this.method,this.args)},e}(),Pe=function(e,i){return Pe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var d in r)Object.prototype.hasOwnProperty.call(r,d)&&(t[d]=r[d])},Pe(e,i)};function Re(e,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function t(){this.constructor=e}Pe(e,i),e.prototype=i===null?Object.create(i):(t.prototype=i.prototype,new t)}var Z=function(){return Z=Object.assign||function(e){for(var i,t=1,r=arguments.length;ti[0].length)&&(i=d,t=r)}if(i!=null&&(this.text=this.text.substr(i[0].length),this.text===""&&(this.done=!0)),i==null)return this.done=!0,this.symbol=null,void(this.value=null)}while(t==="SKIP");return this.symbol=t,this.value=i,!0},e.prototype.accept=function(i){if(this.symbol===i){if(this.value){var t=this.value;return this.nextSymbol(),t}return this.nextSymbol(),!0}return!1},e.prototype.acceptNumber=function(){return this.accept("number")},e.prototype.expect=function(i){if(this.accept(i))return!0;throw new Error("expected "+i+" but found "+this.symbol)},e}();function ft(e,i){i===void 0&&(i=we);var t={},r=new Pa(i.tokens);return r.start(e)?(function(){r.expect("every");var l=r.acceptNumber();if(l&&(t.interval=parseInt(l[0],10)),r.isDone())throw new Error("Unexpected end");switch(r.symbol){case"day(s)":t.freq=C.DAILY,r.nextSymbol()&&(n(),o());break;case"weekday(s)":t.freq=C.WEEKLY,t.byweekday=[C.MO,C.TU,C.WE,C.TH,C.FR],r.nextSymbol(),n(),o();break;case"week(s)":t.freq=C.WEEKLY,r.nextSymbol()&&(d(),n(),o());break;case"hour(s)":t.freq=C.HOURLY,r.nextSymbol()&&(d(),o());break;case"minute(s)":t.freq=C.MINUTELY,r.nextSymbol()&&(d(),o());break;case"month(s)":t.freq=C.MONTHLY,r.nextSymbol()&&(d(),o());break;case"year(s)":t.freq=C.YEARLY,r.nextSymbol()&&(d(),o());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":t.freq=C.WEEKLY;var h=r.symbol.substr(0,2).toUpperCase();if(t.byweekday=[C[h]],!r.nextSymbol())return;for(;r.accept("comma");){if(r.isDone())throw new Error("Unexpected end");var m=_();if(!m)throw new Error("Unexpected symbol "+r.symbol+", expected weekday");t.byweekday.push(C[m]),r.nextSymbol()}n(),function(){r.accept("on"),r.accept("the");var u=a();if(u)for(t.bymonthday=[u],r.nextSymbol();r.accept("comma");){if(!(u=a()))throw new Error("Unexpected symbol "+r.symbol+"; expected monthday");t.bymonthday.push(u),r.nextSymbol()}}(),o();break;case"january":case"february":case"march":case"april":case"may":case"june":case"july":case"august":case"september":case"october":case"november":case"december":if(t.freq=C.YEARLY,t.bymonth=[s()],!r.nextSymbol())return;for(;r.accept("comma");){if(r.isDone())throw new Error("Unexpected end");var v=s();if(!v)throw new Error("Unexpected symbol "+r.symbol+", expected month");t.bymonth.push(v),r.nextSymbol()}d(),o();break;default:throw new Error("Unknown symbol")}}(),t):null;function d(){var l=r.accept("on"),h=r.accept("the");if(l||h)do{var m=a(),v=_(),u=s();if(m)v?(r.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(C[v].nth(m))):(t.bymonthday||(t.bymonthday=[]),t.bymonthday.push(m),r.accept("day(s)"));else if(v)r.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(C[v]);else if(r.symbol==="weekday(s)")r.nextSymbol(),t.byweekday||(t.byweekday=[C.MO,C.TU,C.WE,C.TH,C.FR]);else if(r.symbol==="week(s)"){r.nextSymbol();var c=r.acceptNumber();if(!c)throw new Error("Unexpected symbol "+r.symbol+", expected week number");for(t.byweekno=[parseInt(c[0],10)];r.accept("comma");){if(!(c=r.acceptNumber()))throw new Error("Unexpected symbol "+r.symbol+"; expected monthday");t.byweekno.push(parseInt(c[0],10))}}else{if(!u)return;r.nextSymbol(),t.bymonth||(t.bymonth=[]),t.bymonth.push(u)}}while(r.accept("comma")||r.accept("the")||r.accept("on"))}function n(){if(r.accept("at"))do{var l=r.acceptNumber();if(!l)throw new Error("Unexpected symbol "+r.symbol+", expected hour");for(t.byhour=[parseInt(l[0],10)];r.accept("comma");){if(!(l=r.acceptNumber()))throw new Error("Unexpected symbol "+r.symbol+"; expected hour");t.byhour.push(parseInt(l[0],10))}}while(r.accept("comma")||r.accept("at"))}function s(){switch(r.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function _(){switch(r.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return r.symbol.substr(0,2).toUpperCase();default:return!1}}function a(){switch(r.symbol){case"last":return r.nextSymbol(),-1;case"first":return r.nextSymbol(),1;case"second":return r.nextSymbol(),r.accept("last")?-2:2;case"third":return r.nextSymbol(),r.accept("last")?-3:3;case"nth":var l=parseInt(r.value[1],10);if(l<-366||l>366)throw new Error("Nth out of range: "+l);return r.nextSymbol(),r.accept("last")?-l:l;default:return!1}}function o(){if(r.symbol==="until"){var l=Date.parse(r.text);if(!l)throw new Error("Cannot parse until date:"+r.text);t.until=new Date(l)}else r.accept("for")&&(t.count=parseInt(r.value[0],10),r.expect("number"))}}function Ye(e){return e12){var r=Math.floor(this.month/12),d=Q(this.month,12);this.month=d,this.year+=r,this.month===0&&(this.month=12,--this.year)}},i.prototype.addWeekly=function(t,r){r>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-r))+7*t:this.day+=-(this.getWeekday()-r)+7*t,this.fixDay()},i.prototype.addDaily=function(t){this.day+=t,this.fixDay()},i.prototype.addHours=function(t,r,d){for(r&&(this.hour+=Math.floor((23-this.hour)/t)*t);;){this.hour+=t;var n=$e(this.hour,24),s=n.div,_=n.mod;if(s&&(this.hour=_,this.addDaily(s)),re(d)||R(d,this.hour))break}},i.prototype.addMinutes=function(t,r,d,n){for(r&&(this.minute+=Math.floor((1439-(60*this.hour+this.minute))/t)*t);;){this.minute+=t;var s=$e(this.minute,60),_=s.div,a=s.mod;if(_&&(this.minute=a,this.addHours(_,!1,d)),(re(d)||R(d,this.hour))&&(re(n)||R(n,this.minute)))break}},i.prototype.addSeconds=function(t,r,d,n,s){for(r&&(this.second+=Math.floor((86399-(3600*this.hour+60*this.minute+this.second))/t)*t);;){this.second+=t;var _=$e(this.second,60),a=_.div,o=_.mod;if(a&&(this.second=o,this.addMinutes(a,!1,d,n)),(re(d)||R(d,this.hour))&&(re(n)||R(n,this.minute))&&(re(s)||R(s,this.second)))break}},i.prototype.fixDay=function(){if(!(this.day<=28)){var t=dt(this.year,this.month-1)[1];if(!(this.day<=t))for(;this.day>t;){if(this.day-=t,++this.month,this.month===13&&(this.month=1,++this.year,this.year>rt))return;t=dt(this.year,this.month-1)[1]}}},i.prototype.add=function(t,r){var d=t.freq,n=t.interval,s=t.wkst,_=t.byhour,a=t.byminute,o=t.bysecond;switch(d){case I.YEARLY:return this.addYears(n);case I.MONTHLY:return this.addMonths(n);case I.WEEKLY:return this.addWeekly(n,s);case I.DAILY:return this.addDaily(n);case I.HOURLY:return this.addHours(n,r,_);case I.MINUTELY:return this.addMinutes(n,r,_,a);case I.SECONDLY:return this.addSeconds(n,r,_,a,o)}},i}(Ee);function pt(e){for(var i=[],t=0,r=Object.keys(e);t=-366&&n<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}if(!(i.byweekno||V(i.byweekno)||V(i.byyearday)||i.bymonthday||V(i.bymonthday)||Y(i.byweekday)||Y(i.byeaster)))switch(i.freq){case C.YEARLY:i.bymonth||(i.bymonth=i.dtstart.getUTCMonth()+1),i.bymonthday=i.dtstart.getUTCDate();break;case C.MONTHLY:i.bymonthday=i.dtstart.getUTCDate();break;case C.WEEKLY:i.byweekday=[pe(i.dtstart)]}if(Y(i.bymonth)&&!X(i.bymonth)&&(i.bymonth=[i.bymonth]),Y(i.byyearday)&&!X(i.byyearday)&&ae(i.byyearday)&&(i.byyearday=[i.byyearday]),Y(i.bymonthday))if(X(i.bymonthday)){var r=[],d=[];for(t=0;t0?r.push(n):n<0&&d.push(n)}i.bymonthday=r,i.bynmonthday=d}else i.bymonthday<0?(i.bynmonthday=[i.bymonthday],i.bymonthday=[]):(i.bynmonthday=[],i.bymonthday=[i.bymonthday]);else i.bymonthday=[],i.bynmonthday=[];if(Y(i.byweekno)&&!X(i.byweekno)&&(i.byweekno=[i.byweekno]),Y(i.byweekday))if(ae(i.byweekday))i.byweekday=[i.byweekday],i.bynweekday=null;else if(at(i.byweekday))i.byweekday=[W.fromStr(i.byweekday).weekday],i.bynweekday=null;else if(i.byweekday instanceof W)!i.byweekday.n||i.freq>C.MONTHLY?(i.byweekday=[i.byweekday.weekday],i.bynweekday=null):(i.bynweekday=[[i.byweekday.weekday,i.byweekday.n]],i.byweekday=null);else{var s=[],_=[];for(t=0;tC.MONTHLY?s.push(a.weekday):_.push([a.weekday,a.n])}i.byweekday=V(s)?s:null,i.bynweekday=V(_)?_:null}else i.bynweekday=null;return Y(i.byhour)?ae(i.byhour)&&(i.byhour=[i.byhour]):i.byhour=i.freq=4?(l=0,r=o.yearlen+Q(a-i.wkst,7)):r=n-l;for(var h=Math.floor(r/7),m=Q(r,7),v=Math.floor(h+m/4),u=0;u0&&c<=v){var f=void 0;c>1?(f=l+7*(c-1),l!==t&&(f-=7-t)):f=l;for(var p=0;p<7&&(o.wnomask[f]=1,f++,o.wdaymask[f]!==i.wkst);p++);}}if(R(i.byweekno,1)&&(f=l+7*v,l!==t&&(f-=7-t),f=4?(x=0,k=b+Q(y-i.wkst,7)):k=n-l,g=Math.floor(52+Q(k,7)/4)}if(R(i.byweekno,g))for(f=0;f=C.HOURLY&&V(N)&&!R(N,E.hour)||M>=C.MINUTELY&&V(T)&&!R(T,E.minute)||M>=C.SECONDLY&&V(A)&&!R(A,E.second)?[]:D.gettimeset(M)(E.hour,E.minute,E.second,E.millisecond)}(o,a,i);;){var h=o.getdayset(r)(a.year,a.month,a.day),m=h[0],v=h[1],u=h[2],c=hn(m,v,u,o,i);if(V(s))for(var f=ln(s,l,v,u,o,m),p=0;pn)return oe(e);if(g>=t){var y=bt(g,i);if(!e.accept(y)||_&&!--_)return oe(e)}}else for(p=v;pn||g>=t&&(y=bt(g,i),!e.accept(y)||_&&!--_))return oe(e)}}if(i.interval===0||(a.add(i,c),a.year>rt))return oe(e);Ye(r)||(l=o.gettimeset(r)(a.hour,a.minute,a.second,0)),o.rebuild(a.year,a.month)}}function cn(e,i,t){var r=t.bymonth,d=t.byweekno,n=t.byweekday,s=t.byeaster,_=t.bymonthday,a=t.bynmonthday,o=t.byyearday;return V(r)&&!R(r,e.mmask[i])||V(d)&&!e.wnomask[i]||V(n)&&!R(n,e.wdaymask[i])||V(e.nwdaymask)&&!e.nwdaymask[i]||s!==null&&!R(e.eastermask,i)||(V(_)||V(a))&&!R(_,e.mdaymask[i])&&!R(a,e.nmdaymask[i])||V(o)&&(i=e.yearlen&&!R(o,i+1-e.yearlen)&&!R(o,-e.nextyearlen+i-e.yearlen))}function bt(e,i){return new Se(e,i.tzid).rezonedDate()}function oe(e){return e.getValue()}function hn(e,i,t,r,d){for(var n=!1,s=i;s0&&u[0]===" "?(m[v-1]+=u.slice(1),m.splice(v,1)):v+=1:m.splice(v,1)}return m}(e,i.unfold);return o.forEach(function(l){var h;if(l){var m=function(p){var g=function(k){if(k.indexOf(":")===-1)return{name:"RRULE",value:k};var w=Ha(k,":",1),D=w[0],E=w[1];return{name:D,value:E}}(p),y=g.name,x=g.value,b=y.split(";");if(!b)throw new Error("empty property name");return{name:b[0].toUpperCase(),parms:b.slice(1),value:x}}(l),v=m.name,u=m.parms,c=m.value;switch(v.toUpperCase()){case"RRULE":if(u.length)throw new Error("unsupported RRULE parm: ".concat(u.join(",")));t.push(Ue(l));break;case"RDATE":var f=((h=/RDATE(?:;TZID=([^:=]+))?/i.exec(l))!==null&&h!==void 0?h:[])[1];f&&!a&&(a=f),r=r.concat(kt(c,u));break;case"EXRULE":if(u.length)throw new Error("unsupported EXRULE parm: ".concat(u.join(",")));d.push(Ue(c));break;case"EXDATE":n=n.concat(kt(c,u));break;case"DTSTART":break;default:throw new Error("unsupported property: "+v)}}}),{dtstart:_,tzid:a,rrulevals:t,rdatevals:r,exrulevals:d,exdatevals:n}}function Me(e,i){return i===void 0&&(i={}),function(t,r){var d=fn(t,r),n=d.rrulevals,s=d.rdatevals,_=d.exrulevals,a=d.exdatevals,o=d.dtstart,l=d.tzid,h=r.cache===!1;if(r.compatible&&(r.forceset=!0,r.unfold=!0),r.forceset||n.length>1||s.length||_.length||a.length){var m=new pn(h);return m.dtstart(o),m.tzid(l||void 0),n.forEach(function(u){m.rrule(new C(Be(u,o,l),h))}),s.forEach(function(u){m.rdate(u)}),_.forEach(function(u){m.exrule(new C(Be(u,o,l),h))}),a.forEach(function(u){m.exdate(u)}),r.compatible&&r.dtstart&&m.rdate(o),m}var v=n[0]||{};return new C(Be(v,v.dtstart||r.dtstart||o,v.tzid||r.tzid||l),h)}(e,function(t){var r=[],d=Object.keys(t),n=Object.keys(xt);if(d.forEach(function(s){R(n,s)||r.push(s)}),r.length)throw new Error("Invalid options: "+r.join(", "));return Z(Z({},xt),t)}(i))}function Be(e,i,t){return Z(Z({},e),{dtstart:i,tzid:t})}function kt(e,i){return function(t){t.forEach(function(r){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(r))throw new Error("unsupported RDATE/EXDATE parm: "+r)})}(i),e.split(",").map(function(t){return Ie(t)})}function wt(e){var i=this;return function(t){if(t!==void 0&&(i["_".concat(e)]=t),i["_".concat(e)]!==void 0)return i["_".concat(e)];for(var r=0;rd.bottom&&(s.bottom=d.bottom,s.top=s.bottom-s.height),s.leftd.right&&(s.right=d.right,s.left=s.right-s.width),l.x>=s.left&&l.x<=s.right&&(s.left=l.x-s.width-_,s.right=s.left+s.width),l.y>=s.top&&l.y<=s.bottom&&(s.top=l.y-s.height-a,s.bottom=s.top+s.height),s}_getViewPortSize(){const i=this._scheduler,t=i.$domHelpers,r=this._getViewPort();let d,n=r,s=window.scrollY+document.body.scrollTop,_=window.scrollX+document.body.scrollLeft;return r===i.$event_data?(n=i.$event,s=0,_=0,d=t.getNodePosition(i.$event)):d=t.getNodePosition(n),{left:d.x+_,top:d.y+s,width:d.width,height:d.height,bottom:d.y+d.height+s,right:d.x+d.width+_}}}class vn{constructor(i){this._listeners={},this.tooltip=new mn(i),this._scheduler=i,this._domEvents=i._createDomEventScope(),this._initDelayedFunctions()}destructor(){this.tooltip.hide(),this._domEvents.detachAll()}hideTooltip(){this.delayHide()}attach(i){let t=document.body;const r=this._scheduler,d=r.$domHelpers;i.global||(t=r.$root);let n=null;const s=_=>{const a=d.getTargetNode(_),o=d.closest(a,i.selector);if(d.isChildOf(a,this.tooltip.getNode()))return;const l=()=>{n=o,i.onmouseenter(_,o)};r._mobile&&r.config.touch_tooltip&&(o?l():i.onmouseleave(_,o)),n?o&&o===n?i.onmousemove(_,o):(i.onmouseleave(_,n),n=null,o&&o!==n&&l()):o&&l()};this.detach(i.selector),this._domEvents.attach(t,"mousemove",s),this._listeners[i.selector]={node:t,handler:s}}detach(i){const t=this._listeners[i];t&&this._domEvents.detach(t.node,"mousemove",t.handler)}tooltipFor(i){const t=r=>{let d=r;return document.createEventObject&&!document.createEvent&&(d=document.createEventObject(r)),d};this._initDelayedFunctions(),this.attach({selector:i.selector,global:i.global,onmouseenter:(r,d)=>{const n=i.html(r,d);n&&this.delayShow(t(r),n)},onmousemove:(r,d)=>{const n=i.html(r,d);n?this.delayShow(t(r),n):(this.delayShow.$cancelTimeout(),this.delayHide())},onmouseleave:()=>{this.delayShow.$cancelTimeout(),this.delayHide()}})}_initDelayedFunctions(){const i=this._scheduler;this.delayShow&&this.delayShow.$cancelTimeout(),this.delayHide&&this.delayHide.$cancelTimeout(),this.tooltip.hide(),this.delayShow=ee.delay((t,r)=>{i.callEvent("onBeforeTooltip",[t])===!1?this.tooltip.hide():(this.tooltip.setContent(r),this.tooltip.show(t))},i.config.tooltip_timeout||1),this.delayHide=ee.delay(()=>{this.delayShow.$cancelTimeout(),this.tooltip.hide()},i.config.tooltip_hide_timeout||1)}}const gn={active_links:function(e){e.config.active_link_view="day",e._active_link_click=function(i){var t=i.target.getAttribute("data-link-date"),r=e.date.str_to_date(e.config.api_date,!1,!0);if(t)return e.setCurrentView(r(t),e.config.active_link_view),i&&i.preventDefault&&i.preventDefault(),!1},e.attachEvent("onTemplatesReady",function(){var i=function(r,d){d=d||r+"_scale_date",e.templates["_active_links_old_"+d]||(e.templates["_active_links_old_"+d]=e.templates[d]);var n=e.templates["_active_links_old_"+d],s=e.date.date_to_str(e.config.api_date);e.templates[d]=function(_){return""+n(_)+""}};if(i("week"),i("","month_day"),this.matrix)for(var t in this.matrix)i(t);this._detachDomEvent(this._obj,"click",e._active_link_click),e.event(this._obj,"click",e._active_link_click)})},agenda_legacy:function(e){e.date.add_agenda_legacy=function(i){return e.date.add(i,1,"year")},e.templates.agenda_legacy_time=function(i,t,r){return r._timed?this.day_date(r.start_date,r.end_date,r)+" "+this.event_date(i):e.templates.day_date(i)+" – "+e.templates.day_date(t)},e.templates.agenda_legacy_text=function(i,t,r){return r.text},e.templates.agenda_legacy_date=function(){return""},e.date.agenda_legacy_start=function(){return e.date.date_part(e._currentDate())},e.attachEvent("onTemplatesReady",function(){var i=e.dblclick_dhx_cal_data;e.dblclick_dhx_cal_data=function(){if(this._mode=="agenda_legacy")!this.config.readonly&&this.config.dblclick_create&&this.addEventNow();else if(i)return i.apply(this,arguments)};var t=e.render_data;e.render_data=function(n){if(this._mode!="agenda_legacy")return t.apply(this,arguments);d()};var r=e.render_view_data;function d(){var n=e.get_visible_events();n.sort(function(m,g){return m.start_date>g.start_date?1:-1});for(var s,_="
",a=0;a
"+(e.config.rtl?e.templates.agenda_time(o.end_date,o.start_date,o):e.templates.agenda_time(o.start_date,o.end_date,o))+"
",_+=`
+`)},i.prototype.clone=function(){var t=new i(!!this._cache);return this._rrule.forEach(function(r){return t.rrule(r.clone())}),this._exrule.forEach(function(r){return t.exrule(r.clone())}),this._rdate.forEach(function(r){return t.rdate(new Date(r.getTime()))}),this._exdate.forEach(function(r){return t.exdate(new Date(r.getTime()))}),t},i}(C);function Et(e,i){if(!(e instanceof C))throw new TypeError(String(e)+" is not RRule instance");R(i.map(String),String(e))||i.push(e)}function Dt(e,i){if(!(e instanceof Date))throw new TypeError(String(e)+" is not Date instance");R(i.map(Number),Number(e))||(i.push(e),be(i))}function St(e,i,t){var r=!t||t.toUpperCase()==="UTC",d=r?"".concat(e,":"):"".concat(e,";TZID=").concat(t,":"),n=i.map(function(s){return je(s.valueOf(),r)}).join(",");return"".concat(d).concat(n)}class mn{constructor(i){this._scheduler=i}getNode(){const i=this._scheduler;return this._tooltipNode||(this._tooltipNode=document.createElement("div"),this._tooltipNode.className="dhtmlXTooltip scheduler_tooltip tooltip",i._waiAria.tooltipAttr(this._tooltipNode)),i.config.rtl?this._tooltipNode.classList.add("dhtmlXTooltip_rtl"):this._tooltipNode.classList.remove("dhtmlXTooltip_rtl"),this._tooltipNode}setViewport(i){return this._root=i,this}show(i,t){const r=this._scheduler,d=r.$domHelpers,n=document.body,s=this.getNode();if(d.isChildOf(s,n)||(this.hide(),n.appendChild(s)),this._isLikeMouseEvent(i)){const _=this._calculateTooltipPosition(i);t=_.top,i=_.left}return s.style.top=t+"px",s.style.left=i+"px",r._waiAria.tooltipVisibleAttr(s),this}hide(){const i=this._scheduler,t=this.getNode();return t&&t.parentNode&&t.parentNode.removeChild(t),i._waiAria.tooltipHiddenAttr(t),this}setContent(i){return this.getNode().innerHTML=i,this}_isLikeMouseEvent(i){return!(!i||typeof i!="object")&&"clientX"in i&&"clientY"in i}_getViewPort(){return this._root||document.body}_calculateTooltipPosition(i){const t=this._scheduler,r=t.$domHelpers,d=this._getViewPortSize(),n=this.getNode(),s={top:0,left:0,width:n.offsetWidth,height:n.offsetHeight,bottom:0,right:0},_=t.config.tooltip_offset_x,a=t.config.tooltip_offset_y,o=document.body,l=r.getRelativeEventPosition(i,o),h=r.getNodePosition(o);l.y+=h.y,s.top=l.y,s.left=l.x,s.top+=a,s.left+=_,s.bottom=s.top+s.height,s.right=s.left+s.width;const m=window.scrollY+o.scrollTop;return s.topd.bottom&&(s.bottom=d.bottom,s.top=s.bottom-s.height),s.leftd.right&&(s.right=d.right,s.left=s.right-s.width),l.x>=s.left&&l.x<=s.right&&(s.left=l.x-s.width-_,s.right=s.left+s.width),l.y>=s.top&&l.y<=s.bottom&&(s.top=l.y-s.height-a,s.bottom=s.top+s.height),s}_getViewPortSize(){const i=this._scheduler,t=i.$domHelpers,r=this._getViewPort();let d,n=r,s=window.scrollY+document.body.scrollTop,_=window.scrollX+document.body.scrollLeft;return r===i.$event_data?(n=i.$event,s=0,_=0,d=t.getNodePosition(i.$event)):d=t.getNodePosition(n),{left:d.x+_,top:d.y+s,width:d.width,height:d.height,bottom:d.y+d.height+s,right:d.x+d.width+_}}}class vn{constructor(i){this._listeners={},this.tooltip=new mn(i),this._scheduler=i,this._domEvents=i._createDomEventScope(),this._initDelayedFunctions()}destructor(){this.tooltip.hide(),this._domEvents.detachAll()}hideTooltip(){this.delayHide()}attach(i){let t=document.body;const r=this._scheduler,d=r.$domHelpers;i.global||(t=r.$root);let n=null;const s=_=>{const a=d.getTargetNode(_),o=d.closest(a,i.selector);if(d.isChildOf(a,this.tooltip.getNode()))return;const l=()=>{n=o,i.onmouseenter(_,o)};r._mobile&&r.config.touch_tooltip&&(o?l():i.onmouseleave(_,o)),n?o&&o===n?i.onmousemove(_,o):(i.onmouseleave(_,n),n=null,o&&o!==n&&l()):o&&l()};this.detach(i.selector),this._domEvents.attach(t,"mousemove",s),this._listeners[i.selector]={node:t,handler:s}}detach(i){const t=this._listeners[i];t&&this._domEvents.detach(t.node,"mousemove",t.handler)}tooltipFor(i){const t=r=>{let d=r;return document.createEventObject&&!document.createEvent&&(d=document.createEventObject(r)),d};this._initDelayedFunctions(),this.attach({selector:i.selector,global:i.global,onmouseenter:(r,d)=>{const n=i.html(r,d);n&&this.delayShow(t(r),n)},onmousemove:(r,d)=>{const n=i.html(r,d);n?this.delayShow(t(r),n):(this.delayShow.$cancelTimeout(),this.delayHide())},onmouseleave:()=>{this.delayShow.$cancelTimeout(),this.delayHide()}})}_initDelayedFunctions(){const i=this._scheduler;this.delayShow&&this.delayShow.$cancelTimeout(),this.delayHide&&this.delayHide.$cancelTimeout(),this.tooltip.hide(),this.delayShow=ee.delay((t,r)=>{i.callEvent("onBeforeTooltip",[t])===!1?this.tooltip.hide():(this.tooltip.setContent(r),this.tooltip.show(t))},i.config.tooltip_timeout||1),this.delayHide=ee.delay(()=>{this.delayShow.$cancelTimeout(),this.tooltip.hide()},i.config.tooltip_hide_timeout||1)}}const gn={active_links:function(e){e.config.active_link_view="day",e._active_link_click=function(i){var t=i.target.getAttribute("data-link-date"),r=e.date.str_to_date(e.config.api_date,!1,!0);if(t)return e.setCurrentView(r(t),e.config.active_link_view),i&&i.preventDefault&&i.preventDefault(),!1},e.attachEvent("onTemplatesReady",function(){var i=function(r,d){d=d||r+"_scale_date",e.templates["_active_links_old_"+d]||(e.templates["_active_links_old_"+d]=e.templates[d]);var n=e.templates["_active_links_old_"+d],s=e.date.date_to_str(e.config.api_date);e.templates[d]=function(_){return""+n(_)+""}};if(i("week"),i("","month_day"),this.matrix)for(var t in this.matrix)i(t);this._detachDomEvent(this._obj,"click",e._active_link_click),e.event(this._obj,"click",e._active_link_click)})},agenda_legacy:function(e){e.date.add_agenda_legacy=function(i){return e.date.add(i,1,"year")},e.templates.agenda_legacy_time=function(i,t,r){return r._timed?this.day_date(r.start_date,r.end_date,r)+" "+this.event_date(i):e.templates.day_date(i)+" – "+e.templates.day_date(t)},e.templates.agenda_legacy_text=function(i,t,r){return r.text},e.templates.agenda_legacy_date=function(){return""},e.date.agenda_legacy_start=function(){return e.date.date_part(e._currentDate())},e.attachEvent("onTemplatesReady",function(){var i=e.dblclick_dhx_cal_data;e.dblclick_dhx_cal_data=function(){if(this._mode=="agenda_legacy")!this.config.readonly&&this.config.dblclick_create&&this.addEventNow();else if(i)return i.apply(this,arguments)};var t=e.render_data;e.render_data=function(n){if(this._mode!="agenda_legacy")return t.apply(this,arguments);d()};var r=e.render_view_data;function d(){var n=e.get_visible_events();n.sort(function(p,g){return p.start_date>g.start_date?1:-1});for(var s,_="
",a=0;a
"+(e.config.rtl?e.templates.agenda_time(o.end_date,o.start_date,o):e.templates.agenda_time(o.start_date,o.end_date,o))+"
",_+=`
-
`,_+=""+e.templates.agenda_text(o.start_date,o.end_date,o)+"
"}_+="
",e._els.dhx_cal_data[0].innerHTML=_,e._els.dhx_cal_data[0].childNodes[0].scrollTop=e._agendaScrollTop||0;var f=e._els.dhx_cal_data[0].childNodes[0];f.childNodes[f.childNodes.length-1].style.height=f.offsetHeight
"+_.date+"
"+_.description+"
",e._table_view=!0,e.set_sizes()}}(n),n?(e._cols=null,e._colsS=null,e._table_view=!0,d()):e._table_view=!1}})},agenda_view:function(e){e.date.add_agenda=function(d,n){return e.date.add(d,1*n,"month")},e.templates.agenda_time=function(d,n,s){return s._timed?`${this.event_date(d)} - ${this.event_date(n)}`:e.locale.labels.full_day},e.templates.agenda_text=function(d,n,s){return s.text};const i=e.date.date_to_str("%F %j"),t=e.date.date_to_str("%l");e.templates.agenda_day=function(d){return`
${i(d)}
-
${t(d)}
`},e.templates.agenda_date=function(d,n){return e.templates.month_date(e.getState().date)},e.date.agenda_start=function(d){return e.date.month_start(new Date(d))};let r=0;e.attachEvent("onTemplatesReady",function(){var d=e.dblclick_dhx_cal_data;e.dblclick_dhx_cal_data=function(){if(this._mode=="agenda")!this.config.readonly&&this.config.dblclick_create&&this.addEventNow();else if(d)return d.apply(this,arguments)};var n=e.render_data;e.render_data=function(o){if(this._mode!="agenda")return n.apply(this,arguments);_()};var s=e.render_view_data;function _(){const o=e.get_visible_events();o.sort(function(p,m){return p.start_date>m.start_date?1:-1});const l={};let h=e.getState().min_date;const v=e.getState().max_date;for(;h.valueOf(){let m=e.date.day_start(new Date(p.start_date));for(;m.valueOf()${e.locale.labels.agenda_tab}`;e._els.dhx_cal_data[0].scrollTop=r;let f=e._els.dhx_cal_data[0].querySelectorAll(".dhx_cal_agenda_event_line");e._rendered=[];for(var c=0;c + `,_+=""+e.templates.agenda_text(o.start_date,o.end_date,o)+""}_+="
",e._els.dhx_cal_data[0].innerHTML=_,e._els.dhx_cal_data[0].childNodes[0].scrollTop=e._agendaScrollTop||0;var u=e._els.dhx_cal_data[0].childNodes[0];u.childNodes[u.childNodes.length-1].style.height=u.offsetHeight
"+_.date+"
"+_.description+"",e._table_view=!0,e.set_sizes()}}(n),n?(e._cols=null,e._colsS=null,e._table_view=!0,d()):e._table_view=!1}})},agenda_view:function(e){e.date.add_agenda=function(d,n){return e.date.add(d,1*n,"month")},e.templates.agenda_time=function(d,n,s){return s._timed?`${this.event_date(d)} - ${this.event_date(n)}`:e.locale.labels.full_day},e.templates.agenda_text=function(d,n,s){return s.text};const i=e.date.date_to_str("%F %j"),t=e.date.date_to_str("%l");e.templates.agenda_day=function(d){return`
${i(d)}
+
${t(d)}
`},e.templates.agenda_date=function(d,n){return e.templates.month_date(e.getState().date)},e.date.agenda_start=function(d){return e.date.month_start(new Date(d))};let r=0;e.attachEvent("onTemplatesReady",function(){var d=e.dblclick_dhx_cal_data;e.dblclick_dhx_cal_data=function(){if(this._mode=="agenda")!this.config.readonly&&this.config.dblclick_create&&this.addEventNow();else if(d)return d.apply(this,arguments)};var n=e.render_data;e.render_data=function(o){if(this._mode!="agenda")return n.apply(this,arguments);_()};var s=e.render_view_data;function _(){const o=e.get_visible_events();o.sort(function(f,p){return f.start_date>p.start_date?1:-1});const l={};let h=e.getState().min_date;const m=e.getState().max_date;for(;h.valueOf(){let p=e.date.day_start(new Date(f.start_date));for(;p.valueOf()${e.locale.labels.agenda_tab}`;e._els.dhx_cal_data[0].scrollTop=r;let u=e._els.dhx_cal_data[0].querySelectorAll(".dhx_cal_agenda_event_line");e._rendered=[];for(var c=0;c
${e.templates.agenda_day(o)}
-`;return l.forEach(v=>{h+=function(u,f){const c=e.templates.agenda_time(f.start_date,f.end_date,f),p=e.getState().select_id,m=e.templates.event_class(f.start_date,f.end_date,f),g=e.templates.agenda_text(f.start_date,f.end_date,f);let y="";return(f.color||f.textColor)&&(y=` style="${f.color?"--dhx-scheduler-event-background:"+f.color+";":""}${f.textColor?"--dhx-scheduler-event-color:"+f.textColor+";":""}" `),`
+`;return l.forEach(m=>{h+=function(v,u){const c=e.templates.agenda_time(u.start_date,u.end_date,u),f=e.getState().select_id,p=e.templates.event_class(u.start_date,u.end_date,u),g=e.templates.agenda_text(u.start_date,u.end_date,u);let y="";return(u.color||u.textColor)&&(y=` style="${u.color?"--dhx-scheduler-event-background:"+u.color+";":""}${u.textColor?"--dhx-scheduler-event-color:"+u.textColor+";":""}" `),`
${c}
${g}
-
`}(0,v)}),h+="
",h}e.render_view_data=function(){return this._mode=="agenda"&&(r=e._els.dhx_cal_data[0].scrollTop,e._els.dhx_cal_data[0].scrollTop=0),s.apply(this,arguments)},e.agenda_view=function(o){o?(e._min_date=e.config.agenda_start||e.date.agenda_start(e._date),e._max_date=e.config.agenda_end||e.date.add_agenda(e._min_date,1),e._cols=null,e._colsS=null,e._table_view=!0,e._getNavDateElement().innerHTML=e.templates.agenda_date(e._date),_()):e._table_view=!1}})},all_timed:function(e){e.config.all_timed="short",e.config.all_timed_month=!1;var i=function(_){return!((_.end_date-_.start_date)/36e5>=24)||e._drag_mode=="resize"&&e._drag_id==_.id};e._safe_copy=function(_){var a=null,o=e._copy_event(_);return _.event_pid&&(a=e.getEvent(_.event_pid)),a&&a.isPrototypeOf(_)&&(delete o.event_length,delete o.event_pid,delete o.rec_pattern,delete o.rec_type),o};var t=e._pre_render_events_line,r=e._pre_render_events_table,d=function(_,a){return this._table_view?r.call(this,_,a):t.call(this,_,a)};e._pre_render_events_line=e._pre_render_events_table=function(_,a){if(!this.config.all_timed||this._table_view&&this._mode!="month"||this._mode=="month"&&!this.config.all_timed_month)return d.call(this,_,a);for(var o=0;o<_.length;o++){var l=_[o];if(!l._timed)if(this.config.all_timed!="short"||i(l)){var h=this._safe_copy(l);l._virtual?h._first_chunk=!1:h._first_chunk=!0,h._drag_resize=!1,h._virtual=!0,h.start_date=new Date(h.start_date),c(l)?(h.end_date=p(h.start_date),this.config.last_hour!=24&&(h.end_date=m(h.start_date,this.config.last_hour))):h.end_date=new Date(l.end_date);var v=!1;h.start_datethis._min_date&&h.start_date+y}function p(g){var y=e.date.add(g,1,"day");return y=e.date.date_part(y)}function m(g,y){var x=e.date.date_part(new Date(g));return x.setHours(y),x}};var n=e.get_visible_events;e.get_visible_events=function(_){return this.config.all_timed&&this.config.multi_day?n.call(this,!1):n.call(this,_)},e.attachEvent("onBeforeViewChange",function(_,a,o,l){return e._allow_dnd=o=="day"||o=="week"||e.getView(o),!0}),e._is_main_area_event=function(_){return!!(_._timed||this.config.all_timed===!0||this.config.all_timed=="short"&&i(_))};var s=e.updateEvent;e.updateEvent=function(_){var a,o,l=e.getEvent(_);l&&(a=e.config.all_timed&&!(e.isOneDayEvent(e._events[_])||e.getState().drag_id))&&(o=e.config.update_render,e.config.update_render=!0),s.apply(e,arguments),l&&a&&(e.config.update_render=o)}},collision:function(e){var i,t;function r(d){e._get_section_view()&&d&&(i=e.getEvent(d)[e._get_section_property()])}e.config.collision_limit=1,e.attachEvent("onBeforeDrag",function(d){return r(d),!0}),e.attachEvent("onBeforeLightbox",function(d){var n=e.getEvent(d);return t=[n.start_date,n.end_date],r(d),!0}),e.attachEvent("onEventChanged",function(d){if(!d||!e.getEvent(d))return!0;var n=e.getEvent(d);if(!e.checkCollision(n)){if(!t)return!1;n.start_date=t[0],n.end_date=t[1],n._timed=this.isOneDayEvent(n)}return!0}),e.attachEvent("onBeforeEventChanged",function(d,n,s){return e.checkCollision(d)}),e.attachEvent("onEventAdded",function(d,n){e.checkCollision(n)||e.deleteEvent(d)}),e.attachEvent("onEventSave",function(d,n,s){if((n=e._lame_clone(n)).id=d,!n.start_date||!n.end_date){var _=e.getEvent(d);n.start_date=new Date(_.start_date),n.end_date=new Date(_.end_date)}return(n.rrule&&!n.recurring_event_id||n.rec_type)&&e._roll_back_dates(n),e.checkCollision(n)}),e._check_sections_collision=function(d,n){var s=e._get_section_property();return d[s]==n[s]&&d.id!=n.id},e.checkCollision=function(d){var n=[],s=e.config.collision_limit;if(d.rrule||d.rec_type)for(var _=e.getRecDates(d),a=0;a<_.length;a++)for(var o=e.getEvents(_[a].start_date,_[a].end_date),l=0;l=s&&(c=!1)}else n.length>=s&&(c=!1);if(!c){var m=!e.callEvent("onEventCollision",[d,n]);return m||(d[f]=i||d[f]),m}return c}},container_autoresize:function(e){e.config.container_autoresize=!0,e.config.month_day_min_height=90,e.config.min_grid_size=25,e.config.min_map_size=400;var i=e._pre_render_events,t=!0,r=0,d=0;e._pre_render_events=function(l,h){if(!e.config.container_autoresize||!t)return i.apply(this,arguments);var v=this.xy.bar_height,u=this._colsS.heights,f=this._colsS.heights=[0,0,0,0,0,0,0],c=this._els.dhx_cal_data[0];if(l=this._table_view?this._pre_render_events_table(l,h):this._pre_render_events_line(l,h),this._table_view)if(h)this._colsS.heights=u;else{var p=c.firstChild;const E=p.querySelectorAll(".dhx_cal_month_row");if(E&&E.length){for(var m=0;mthis._colsS.height-this.xy.month_head_height){var g=E[m].querySelectorAll(".dhx_cal_month_cell"),y=this._colsS.height-this.xy.month_head_height;1*this.config.max_month_events!==this.config.max_month_events||f[m]<=this.config.max_month_events?y=f[m]*v:(this.config.max_month_events+1)*v>this._colsS.height-this.xy.month_head_height&&(y=(this.config.max_month_events+1)*v),E[m].style.height=y+this.xy.month_head_height+"px";for(var x=0;xN&&(N=u.childNodes[A].offsetHeight);f=N}else f=Math.max(u.offsetHeight-1,u.scrollHeight);if(c=="month")e.config.month_day_min_height&&!l&&(f=u.querySelectorAll(".dhx_cal_month_row").length*e.config.month_day_min_height),l&&(u.style.height=f+"px");else if(c=="year")f=190*e.config.year_y;else if(c=="agenda"){if(f=0,u.childNodes&&u.childNodes.length)for(var p=0;py&&(y=m)}f=3*y}else if(c=="map"){f=0;var D=u.querySelectorAll(".dhx_map_line");for(p=0;p0){var f=document.cookie.indexOf(u);if(f!=-1){f+=u.length;var c=document.cookie.indexOf(";",f);return c==-1&&(c=document.cookie.length),document.cookie.substring(f,c)}}return""}(o);if(l){e._min_date||(e._min_date=_),(l=unescape(l).split("@"))[0]=this._helpers.parseDate(l[0]);var h=this.isViewExists(l[1])?l[1]:s;return _=isNaN(+l[0])?_:l[0],window.setTimeout(function(){e.$destroyed||e.setCurrentView(_,h)},1),!1}}return!0}),e.attachEvent("onViewChange",function(d,n){var s,_,a=i(e),o=escape(this._helpers.formatDate(n)+"@"+d);_=a+"="+o+((s="expires=Sun, 31 Jan 9999 22:00:00 GMT")?"; "+s:""),document.cookie=_});var r=e._load;e._load=function(){var d=arguments;if(e._date)r.apply(this,d);else{var n=this;window.setTimeout(function(){r.apply(n,d)},1)}}},daytimeline:function(e){_e("Day Timeline",e.assert)},drag_between:function(e){_e("Drag Between",e.assert)},editors:function(e){e.form_blocks.combo={render:function(i){i.cached_options||(i.cached_options={});var t="";return t+="
"},set_value:function(i,t,r,d){(function(){u();var v=e.attachEvent("onAfterLightbox",function(){u(),e.detachEvent(v)});function u(){if(i._combo&&i._combo.DOMParent){var f=i._combo;f.unload?f.unload():f.destructor&&f.destructor(),f.DOMParent=f.DOMelem=null}}})(),window.dhx_globalImgPath=d.image_path||"/",i._combo=new dhtmlXCombo(i,d.name,i.offsetWidth-8),d.onchange&&i._combo.attachEvent("onChange",d.onchange),d.options_height&&i._combo.setOptionHeight(d.options_height);var n=i._combo;if(n.enableFilteringMode(d.filtering,d.script_path||null,!!d.cache),d.script_path){var s=r[d.map_to];s?d.cached_options[s]?(n.addOption(s,d.cached_options[s]),n.disable(1),n.selectOption(0),n.disable(0)):e.ajax.get(d.script_path+"?id="+s+"&uid="+e.uid(),function(v){var u,f=v.xmlDoc.responseText;try{u=JSON.parse(f).options[0].text}catch{u=e.ajax.xpath("//option",v.xmlDoc)[0].childNodes[0].nodeValue}d.cached_options[s]=u,n.addOption(s,u),n.disable(1),n.selectOption(0),n.disable(0)}):n.setComboValue("")}else{for(var _=[],a=0;a`;for(var r=0;r "+i.options[r].label+""}return t+=""},set_value:function(i,t,r,d){for(var n=i.getElementsByTagName("input"),s=0;s':""},set_value:function(i,t,r,d){i=e._lightbox.querySelector(`#${d.id}`);var n=e.uid(),s=d.checked_value!==void 0?t==d.checked_value:!!t;i.className+=" dhx_cal_checkbox";var _="",a="";if(e.config.wide_form?(i.innerHTML=a,i.nextSibling.innerHTML=_):i.innerHTML=_+a,d.handler){var o=i.getElementsByTagName("input")[0];if(o.$_eventAttached)return;o.$_eventAttached=!0,e.event(o,"click",d.handler)}},get_value:function(i,t,r){var d=(i=e._lightbox.querySelector(`#${r.id}`)).getElementsByTagName("input")[0];return d||(d=i.nextSibling.getElementsByTagName("input")[0]),d.checked?r.checked_value||!0:r.unchecked_value||!1},focus:function(i){}}},expand:function(e){e.ext.fullscreen={toggleIcon:null},e.expand=function(){if(e.callEvent("onBeforeExpand",[])){var i=e._obj;do i._position=i.style.position||"",i.style.position="static";while((i=i.parentNode)&&i.style);(i=e._obj).style.position="absolute",i._width=i.style.width,i._height=i.style.height,i.style.width=i.style.height="100%",i.style.top=i.style.left="0px";var t=document.body;t.scrollTop=0,(t=t.parentNode)&&(t.scrollTop=0),document.body._overflow=document.body.style.overflow||"",document.body.style.overflow="hidden",e._maximize(),e.callEvent("onExpand",[])}},e.collapse=function(){if(e.callEvent("onBeforeCollapse",[])){var i=e._obj;do i.style.position=i._position;while((i=i.parentNode)&&i.style);(i=e._obj).style.width=i._width,i.style.height=i._height,document.body.style.overflow=document.body._overflow,e._maximize(),e.callEvent("onCollapse",[])}},e.attachEvent("onTemplatesReady",function(){var i=document.createElement("div");i.className="dhx_expand_icon",e.ext.fullscreen.toggleIcon=i,i.innerHTML=` +`}(0,m)}),h+="",h}e.render_view_data=function(){return this._mode=="agenda"&&(r=e._els.dhx_cal_data[0].scrollTop,e._els.dhx_cal_data[0].scrollTop=0),s.apply(this,arguments)},e.agenda_view=function(o){o?(e._min_date=e.config.agenda_start||e.date.agenda_start(e._date),e._max_date=e.config.agenda_end||e.date.add_agenda(e._min_date,1),e._cols=null,e._colsS=null,e._table_view=!0,e._getNavDateElement().innerHTML=e.templates.agenda_date(e._date),_()):e._table_view=!1}})},all_timed:function(e){e.config.all_timed="short",e.config.all_timed_month=!1;var i=function(_){return!((_.end_date-_.start_date)/36e5>=24)||e._drag_mode=="resize"&&e._drag_id==_.id};e._safe_copy=function(_){var a=null,o=e._copy_event(_);return _.event_pid&&(a=e.getEvent(_.event_pid)),a&&a.isPrototypeOf(_)&&(delete o.event_length,delete o.event_pid,delete o.rec_pattern,delete o.rec_type),o};var t=e._pre_render_events_line,r=e._pre_render_events_table,d=function(_,a){return this._table_view?r.call(this,_,a):t.call(this,_,a)};e._pre_render_events_line=e._pre_render_events_table=function(_,a){if(!this.config.all_timed||this._table_view&&this._mode!="month"||this._mode=="month"&&!this.config.all_timed_month)return d.call(this,_,a);for(var o=0;o<_.length;o++){var l=_[o];if(!l._timed)if(this.config.all_timed!="short"||i(l)){var h=this._safe_copy(l);l._virtual?h._first_chunk=!1:h._first_chunk=!0,h._drag_resize=!1,h._virtual=!0,h.start_date=new Date(h.start_date),c(l)?(h.end_date=f(h.start_date),this.config.last_hour!=24&&(h.end_date=p(h.start_date,this.config.last_hour))):h.end_date=new Date(l.end_date);var m=!1;h.start_datethis._min_date&&h.start_date+y}function f(g){var y=e.date.add(g,1,"day");return y=e.date.date_part(y)}function p(g,y){var x=e.date.date_part(new Date(g));return x.setHours(y),x}};var n=e.get_visible_events;e.get_visible_events=function(_){return this.config.all_timed&&this.config.multi_day?n.call(this,!1):n.call(this,_)},e.attachEvent("onBeforeViewChange",function(_,a,o,l){return e._allow_dnd=o=="day"||o=="week"||e.getView(o),!0}),e._is_main_area_event=function(_){return!!(_._timed||this.config.all_timed===!0||this.config.all_timed=="short"&&i(_))};var s=e.updateEvent;e.updateEvent=function(_){var a,o,l=e.getEvent(_);l&&(a=e.config.all_timed&&!(e.isOneDayEvent(e._events[_])||e.getState().drag_id))&&(o=e.config.update_render,e.config.update_render=!0),s.apply(e,arguments),l&&a&&(e.config.update_render=o)}},collision:function(e){var i,t;function r(d){e._get_section_view()&&d&&(i=e.getEvent(d)[e._get_section_property()])}e.config.collision_limit=1,e.attachEvent("onBeforeDrag",function(d){return r(d),!0}),e.attachEvent("onBeforeLightbox",function(d){var n=e.getEvent(d);return t=[n.start_date,n.end_date],r(d),!0}),e.attachEvent("onEventChanged",function(d){if(!d||!e.getEvent(d))return!0;var n=e.getEvent(d);if(!e.checkCollision(n)){if(!t)return!1;n.start_date=t[0],n.end_date=t[1],n._timed=this.isOneDayEvent(n)}return!0}),e.attachEvent("onBeforeEventChanged",function(d,n,s){return e.checkCollision(d)}),e.attachEvent("onEventAdded",function(d,n){e.checkCollision(n)||e.deleteEvent(d)}),e.attachEvent("onEventSave",function(d,n,s){if((n=e._lame_clone(n)).id=d,!n.start_date||!n.end_date){var _=e.getEvent(d);n.start_date=new Date(_.start_date),n.end_date=new Date(_.end_date)}return(n.rrule&&!n.recurring_event_id||n.rec_type)&&e._roll_back_dates(n),e.checkCollision(n)}),e._check_sections_collision=function(d,n){var s=e._get_section_property();return d[s]==n[s]&&d.id!=n.id},e.checkCollision=function(d){var n=[],s=e.config.collision_limit;if(d.rrule||d.rec_type)for(var _=e.getRecDates(d),a=0;a<_.length;a++)for(var o=e.getEvents(_[a].start_date,_[a].end_date),l=0;l=s&&(c=!1)}else n.length>=s&&(c=!1);if(!c){var p=!e.callEvent("onEventCollision",[d,n]);return p||(d[u]=i||d[u]),p}return c}},container_autoresize:function(e){e.config.container_autoresize=!0,e.config.month_day_min_height=90,e.config.min_grid_size=25,e.config.min_map_size=400;var i=e._pre_render_events,t=!0,r=0,d=0;e._pre_render_events=function(l,h){if(!e.config.container_autoresize||!t)return i.apply(this,arguments);var m=this.xy.bar_height,v=this._colsS.heights,u=this._colsS.heights=[0,0,0,0,0,0,0],c=this._els.dhx_cal_data[0];if(l=this._table_view?this._pre_render_events_table(l,h):this._pre_render_events_line(l,h),this._table_view)if(h)this._colsS.heights=v;else{var f=c.firstChild;const w=f.querySelectorAll(".dhx_cal_month_row");if(w&&w.length){for(var p=0;pthis._colsS.height-this.xy.month_head_height){var g=w[p].querySelectorAll(".dhx_cal_month_cell"),y=this._colsS.height-this.xy.month_head_height;1*this.config.max_month_events!==this.config.max_month_events||u[p]<=this.config.max_month_events?y=u[p]*m:(this.config.max_month_events+1)*m>this._colsS.height-this.xy.month_head_height&&(y=(this.config.max_month_events+1)*m),w[p].style.height=y+this.xy.month_head_height+"px";for(var x=0;xN&&(N=v.childNodes[T].offsetHeight);u=N}else u=Math.max(v.offsetHeight-1,v.scrollHeight);if(c=="month")e.config.month_day_min_height&&!l&&(u=v.querySelectorAll(".dhx_cal_month_row").length*e.config.month_day_min_height),l&&(v.style.height=u+"px");else if(c=="year")u=190*e.config.year_y;else if(c=="agenda"){if(u=0,v.childNodes&&v.childNodes.length)for(var f=0;fy&&(y=p)}u=3*y}else if(c=="map"){u=0;var D=v.querySelectorAll(".dhx_map_line");for(f=0;f0){var u=document.cookie.indexOf(v);if(u!=-1){u+=v.length;var c=document.cookie.indexOf(";",u);return c==-1&&(c=document.cookie.length),document.cookie.substring(u,c)}}return""}(o);if(l){e._min_date||(e._min_date=_),(l=unescape(l).split("@"))[0]=this._helpers.parseDate(l[0]);var h=this.isViewExists(l[1])?l[1]:s;return _=isNaN(+l[0])?_:l[0],window.setTimeout(function(){e.$destroyed||e.setCurrentView(_,h)},1),!1}}return!0}),e.attachEvent("onViewChange",function(d,n){var s,_,a=i(e),o=escape(this._helpers.formatDate(n)+"@"+d);_=a+"="+o+((s="expires=Sun, 31 Jan 9999 22:00:00 GMT")?"; "+s:""),document.cookie=_});var r=e._load;e._load=function(){var d=arguments;if(e._date)r.apply(this,d);else{var n=this;window.setTimeout(function(){r.apply(n,d)},1)}}},daytimeline:function(e){_e("Day Timeline",e.assert)},drag_between:function(e){_e("Drag Between",e.assert)},editors:function(e){e.form_blocks.combo={render:function(i){i.cached_options||(i.cached_options={});var t="";return t+="
"},set_value:function(i,t,r,d){(function(){v();var m=e.attachEvent("onAfterLightbox",function(){v(),e.detachEvent(m)});function v(){if(i._combo&&i._combo.DOMParent){var u=i._combo;u.unload?u.unload():u.destructor&&u.destructor(),u.DOMParent=u.DOMelem=null}}})(),window.dhx_globalImgPath=d.image_path||"/",i._combo=new dhtmlXCombo(i,d.name,i.offsetWidth-8),d.onchange&&i._combo.attachEvent("onChange",d.onchange),d.options_height&&i._combo.setOptionHeight(d.options_height);var n=i._combo;if(n.enableFilteringMode(d.filtering,d.script_path||null,!!d.cache),d.script_path){var s=r[d.map_to];s?d.cached_options[s]?(n.addOption(s,d.cached_options[s]),n.disable(1),n.selectOption(0),n.disable(0)):e.ajax.get(d.script_path+"?id="+s+"&uid="+e.uid(),function(m){var v,u=m.xmlDoc.responseText;try{v=JSON.parse(u).options[0].text}catch{v=e.ajax.xpath("//option",m.xmlDoc)[0].childNodes[0].nodeValue}d.cached_options[s]=v,n.addOption(s,v),n.disable(1),n.selectOption(0),n.disable(0)}):n.setComboValue("")}else{for(var _=[],a=0;a`;for(var r=0;r "+i.options[r].label+""}return t+=""},set_value:function(i,t,r,d){for(var n=i.getElementsByTagName("input"),s=0;s':""},set_value:function(i,t,r,d){i=e._lightbox.querySelector(`#${d.id}`);var n=e.uid(),s=d.checked_value!==void 0?t==d.checked_value:!!t;i.className+=" dhx_cal_checkbox";var _="",a="";if(e.config.wide_form?(i.innerHTML=a,i.nextSibling.innerHTML=_):i.innerHTML=_+a,d.handler){var o=i.getElementsByTagName("input")[0];if(o.$_eventAttached)return;o.$_eventAttached=!0,e.event(o,"click",d.handler)}},get_value:function(i,t,r){var d=(i=e._lightbox.querySelector(`#${r.id}`)).getElementsByTagName("input")[0];return d||(d=i.nextSibling.getElementsByTagName("input")[0]),d.checked?r.checked_value||!0:r.unchecked_value||!1},focus:function(i){}}},expand:function(e){e.ext.fullscreen={toggleIcon:null},e.expand=function(){if(e.callEvent("onBeforeExpand",[])){var i=e._obj;do i._position=i.style.position||"",i.style.position="static";while((i=i.parentNode)&&i.style);(i=e._obj).style.position="absolute",i._width=i.style.width,i._height=i.style.height,i.style.width=i.style.height="100%",i.style.top=i.style.left="0px";var t=document.body;t.scrollTop=0,(t=t.parentNode)&&(t.scrollTop=0),document.body._overflow=document.body.style.overflow||"",document.body.style.overflow="hidden",e._maximize(),e.callEvent("onExpand",[])}},e.collapse=function(){if(e.callEvent("onBeforeCollapse",[])){var i=e._obj;do i.style.position=i._position;while((i=i.parentNode)&&i.style);(i=e._obj).style.width=i._width,i.style.height=i._height,document.body.style.overflow=document.body._overflow,e._maximize(),e.callEvent("onCollapse",[])}},e.attachEvent("onTemplatesReady",function(){var i=document.createElement("div");i.className="dhx_expand_icon",e.ext.fullscreen.toggleIcon=i,i.innerHTML=` @@ -55,20 +63,20 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`)},a.exportToPNG=function(){ - `,e._obj.appendChild(i),e.event(i,"click",function(){e.expanded?e.collapse():e.expand()})}),e._maximize=function(){this.expanded=!this.expanded,this.expanded?this.ext.fullscreen.toggleIcon.classList.add("dhx_expand_icon--expanded"):this.ext.fullscreen.toggleIcon.classList.remove("dhx_expand_icon--expanded");for(var i=["left","top"],t=0;t400))try{l=JSON.parse(o.xmlDoc.responseText)}catch{}_(l)})},r._plain_export_copy=function(n,s){var _={};for(var a in n)_[a]=n[a];return _.start_date=s(_.start_date),_.end_date=s(_.end_date),_.$text=this.templates.event_text(n.start_date,n.end_date,n),_},r._serialize_plain=function(n,s){var _;n=n||r.date.date_to_str("%Y%m%dT%H%i%s",!0),_=s&&s.start&&s.end?r.getEvents(s.start,s.end):r.getEvents();for(var a=[],o=0;o<_.length;o++)a[o]=this._plain_export_copy(_[o],n);return a},r._serialize_columns=function(){return[{id:"start_date",header:"Start Date",width:30},{id:"end_date",header:"End Date",width:30},{id:"$text",header:"Text",width:100}]},r._send_to_export=function(n,s){if(n.version||(n.version=r.version),n.skin||(n.skin=r.skin),n.callback)return r._ajax_to_export(n,s,n.callback);var _=this._create_hidden_form();_.firstChild.action=n.server||"https://export.dhtmlx.com/scheduler",_.firstChild.childNodes[0].value=JSON.stringify(n),_.firstChild.childNodes[1].value=s,_.firstChild.submit()},r._create_hidden_form=function(){if(!this._hidden_export_form){var n=this._hidden_export_form=document.createElement("div");n.style.display="none",n.innerHTML="
",document.body.appendChild(n)}return this._hidden_export_form},r._get_export_size=function(n,s,_,a,o,l,h){a=parseInt(a)/25.4||4;var v={A5:{x:148,y:210},A4:{x:210,y:297},A3:{x:297,y:420},A2:{x:420,y:594},A1:{x:594,y:841},A0:{x:841,y:1189}},u=t("dhx_cal_data",this).x,f={y:t("dhx_cal_data",this).y+t("dhx_cal_header",this).y+t("dhx_multi_day",this).y};return f.x=n==="full"?u:Math.floor((s==="landscape"?v[n].y:v[n].x)*a),h&&(f.x*=parseFloat(h.x)||1,f.y*=parseFloat(h.y)||1),f},r._export_html=function(n){var s,_,a,o=(s=void 0,_=void 0,(a=d())&&(_=a.scrollable,s=a.smart_rendering),{nav_height:r.xy.nav_height,scroll_width:r.xy.scroll_width,style_width:r._obj.style.width,style_height:r._obj.style.height,timeline_scrollable:_,timeline_smart_rendering:s}),l=r._get_export_size(n.format,n.orientation,n.zoom,n.dpi,n.header,n.footer,n.scales),h="";try{(function(v,u){r._obj.style.width=v.x+"px",r._obj.style.height=v.y+"px",r.xy.nav_height=0,r.xy.scroll_width=0;var f=d();(u.timeline_scrollable||u.timeline_smart_rendering)&&(f.scrollable=!1,f.smart_rendering=!1)})(l,o),r.setCurrentView(),h=r._obj.innerHTML}catch(v){console.error(v)}finally{(function(v){r.xy.scroll_width=v.scroll_width,r.xy.nav_height=v.nav_height,r._obj.style.width=v.style_width,r._obj.style.height=v.style_height;var u=d();(v.timeline_scrollable||v.timeline_smart_rendering)&&(u.scrollable=v.timeline_scrollable,u.smart_rendering=v.timeline_smart_rendering)})(o),r.setCurrentView()}return h}}(e)})()},grid_view:function(e){_e("Grid",e.assert)},html_templates:function(e){e.attachEvent("onTemplatesReady",function(){for(var i=document.body.getElementsByTagName("DIV"),t=0;t=96&&d.keyCode<=105&&(d.keyCode-=48);var n=String.fromCharCode(d.keyCode);return n&&(d.keyCode=n.toLowerCase().charCodeAt(0)),d},getHashFromEvent:function(r){return this.getHash(this.getCommandFromEvent(r))},getHash:function(r){var d=[];for(var n in r.modifiers)r.modifiers[n]&&d.push(n);return d.push(r.keyCode),d.join(this.junctionChar)},getExpressions:function(r){return r.split(this.junctionChar)},getWords:function(r){return r.split(this.combinationChar)},trim:function(r){return r.replace(/\s/g,"")},junctionChar:",",combinationChar:"+",commandKeys:{shift:16,alt:18,ctrl:17,meta:!0},specialKeys:{backspace:8,tab:9,enter:13,esc:27,space:32,up:38,down:40,left:37,right:39,home:36,end:35,pageup:33,pagedown:34,delete:46,insert:45,plus:107,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123}}}(e),function(t){t.$keyboardNavigation.EventHandler={_handlers:null,findHandler:function(r){this._handlers||(this._handlers={});var d=t.$keyboardNavigation.shortcuts.getHash(r);return this._handlers[d]},doAction:function(r,d){var n=this.findHandler(r);n&&(n.call(this,d),d.preventDefault?d.preventDefault():d.returnValue=!1)},bind:function(r,d){this._handlers||(this._handlers={});for(var n=t.$keyboardNavigation.shortcuts,s=n.parse(r),_=0;_=s.length-1?0:a+1])return n.focus(),d.preventDefault(),!0;return!1}}(e),function(t){t.$keyboardNavigation.marker={clear:function(){for(var r=t.$container.querySelectorAll(".dhx_focus_slot"),d=0;d=0;a--)if(s[a].offsetWidth)return s[a];return null},addDataAttributes:function(r,d,n,s){for(var _=t.date.date_to_str(t.config.api_date),a=_(d),o=_(n),l=0;lt._max_date.valueOf()&&(l=new Date(t._max_date)),!s._trace_x)return a;for(var h=0;hr))return a;var u=this.createElement();let f,c;function p(b,k){k.setDate(1),k.setFullYear(b.getFullYear()),k.setMonth(b.getMonth()),k.setDate(b.getDate())}if(t.getView().days){const b=new Date(r);p(t._min_date,b);const k=new Date(d);p(t._min_date,k),f=t._timeline_getX({start_date:b},!1,s),c=t._timeline_getX({start_date:k},!1,s)}else f=t._timeline_getX({start_date:r},!1,s),c=t._timeline_getX({start_date:d},!1,s);var m=s._section_height[n]-1||s.dy-1,g=0;t._isRender("cell")&&(g=v.offsetTop,f+=s.dx,c+=s.dx,v=t.$container.querySelector(".dhx_cal_data"));var y=Math.max(1,c-f-1);let x="left";return t.config.rtl&&(x="right"),u.style.cssText=`height:${m}px; ${x}:${f}px; width:${y}px; top:${g}px;`,v&&(v.appendChild(u),a.push(u)),a},renderMonthCell:function(r){for(var d=t.$container.querySelectorAll(".dhx_month_head"),n=[],s=0;s1?s=t.locate_holder_day(r)+h:(s=h,l.size&&s>l.position+l.size&&(s=0))}if(!(a=t.locate_holder(s))||a.querySelector(".dhx_scale_hour"))return document.createElement("div");var v=Math.max(60*r.getHours()+r.getMinutes(),60*o.first_hour),u=Math.min(60*d.getHours()+d.getMinutes(),60*o.last_hour);if(!u&&t.date.day_start(new Date(d)).valueOf()>t.date.day_start(new Date(r)).valueOf()&&(u=60*o.last_hour),u<=v)return[];var f=this.createElement(),c=t.config.hour_size_px*o.last_hour+1,p=36e5;return f.style.top=Math.round((60*v*1e3-t.config.first_hour*p)*t.config.hour_size_px/p)%c+"px",f.style.lineHeight=f.style.height=Math.max(Math.round(60*(u-v)*1e3*t.config.hour_size_px/p)%c,1)+"px",f.style.width="100%",a.appendChild(f),_.push(f),_[0]}}}(e),function(t){t.$keyboardNavigation.SchedulerNode=function(){},t.$keyboardNavigation.SchedulerNode.prototype=t._compose(t.$keyboardNavigation.EventHandler,{getDefaultNode:function(){var r=new t.$keyboardNavigation.TimeSlot;return r.isValid()||(r=r.fallback()),r},_modes:{month:"month",year:"year",dayColumns:"dayColumns",timeline:"timeline",units:"units",weekAgenda:"weekAgenda",list:"list"},getMode:function(){var r=t.getState().mode;return t.matrix&&t.matrix[r]?this._modes.timeline:t._props&&t._props[r]?this._modes.units:r=="month"?this._modes.month:r=="year"?this._modes.year:r=="week_agenda"?this._modes.weekAgenda:r=="map"||r=="agenda"||t._grid&&t["grid_"+r]?this._modes.list:this._modes.dayColumns},focus:function(){t.focus()},blur:function(){},disable:function(){t.$container.setAttribute("tabindex","0")},enable:function(){t.$container&&t.$container.removeAttribute("tabindex")},isEnabled:function(){return t.$container.hasAttribute("tabindex")},_compareEvents:function(r,d){return r.start_date.valueOf()==d.start_date.valueOf()?r.id>d.id?1:-1:r.start_date.valueOf()>d.start_date.valueOf()?1:-1},_pickEvent:function(r,d,n,s){var _=t.getState();r=new Date(Math.max(_.min_date.valueOf(),r.valueOf())),d=new Date(Math.min(_.max_date.valueOf(),d.valueOf()));var a=t.getEvents(r,d);a.sort(this._compareEvents),s&&(a=a.reverse());for(var o=!!n,l=0;l=this.getNodes().length&&(r=0),this.moveTo(new t.$keyboardNavigation.HeaderCell(r))},down:function(){this.moveTo(new t.$keyboardNavigation.TimeSlot)},enter:function(){var r=this.getNode();r&&r.click()}}}),t.$keyboardNavigation.HeaderCell.prototype.bindAll(t.$keyboardNavigation.HeaderCell.prototype.keys)}(e),function(t){t.$keyboardNavigation.Event=function(r){if(this.eventId=null,t.getEvent(r)){var d=t.getEvent(r);this.start=new Date(d.start_date),this.end=new Date(d.end_date),this.section=this._getSection(d),this.eventId=r}},t.$keyboardNavigation.Event.prototype=t._compose(t.$keyboardNavigation.KeyNavNode,{_getNodes:function(){return Array.prototype.slice.call(t.$container.querySelectorAll("["+t.config.event_attribute+"]"))},_modes:t.$keyboardNavigation.SchedulerNode.prototype._modes,getMode:t.$keyboardNavigation.SchedulerNode.prototype.getMode,_handlers:null,isValid:function(){return!(!t.getEvent(this.eventId)||!this.getNode())},fallback:function(){var r=this._getNodes()[0],d=null;if(r&&t._locate_event(r)){var n=t._locate_event(r);d=new t.$keyboardNavigation.Event(n)}else d=new t.$keyboardNavigation.TimeSlot;return d},isScrolledIntoView:function(r){var d=r.getBoundingClientRect(),n=t.$container.querySelector(".dhx_cal_data").getBoundingClientRect();return!(d.bottomn.bottom)},getNode:function(){var r="["+t.config.event_attribute+"='"+this.eventId+"']",d=t.$keyboardNavigation.dispatcher.getInlineEditor(this.eventId);if(d)return d;if(t.isMultisectionEvent&&t.isMultisectionEvent(t.getEvent(this.eventId))){for(var n=t.$container.querySelectorAll(r),s=0;sd.max_date.valueOf()||r.end_date.valueOf()<=d.min_date.valueOf())&&t.setCurrentView(r.start_date);var n=this.getNode();this.isScrolledIntoView(n)?t.$keyboardNavigation.dispatcher.keepScrollPosition((function(){t.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this)}).bind(this)):t.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this)},blur:function(){t.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this)},_getSection:function(r){var d=null,n=t.getState().mode;return t.matrix&&t.matrix[n]?d=r[t.matrix[t.getState().mode].y_property]:t._props&&t._props[n]&&(d=r[t._props[n].map_to]),d},_moveToSlot:function(r){var d=t.getEvent(this.eventId);if(d){var n=this._getSection(d),s=new t.$keyboardNavigation.TimeSlot(d.start_date,null,n);this.moveTo(s.nextSlot(s,r))}else this.moveTo(new t.$keyboardNavigation.TimeSlot)},keys:{left:function(){this._moveToSlot("left")},right:function(){this._moveToSlot("right")},down:function(){this.getMode()==this._modes.list?t.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler():this._moveToSlot("down")},space:function(){var r=this.getNode();r&&r.click?r.click():this.moveTo(new t.$keyboardNavigation.TimeSlot)},up:function(){this.getMode()==this._modes.list?t.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler():this._moveToSlot("up")},delete:function(){t.getEvent(this.eventId)?t._click.buttons.delete(this.eventId):this.moveTo(new t.$keyboardNavigation.TimeSlot)},enter:function(){t.getEvent(this.eventId)?t.showLightbox(this.eventId):this.moveTo(new t.$keyboardNavigation.TimeSlot)}}}),t.$keyboardNavigation.Event.prototype.bindAll(t.$keyboardNavigation.Event.prototype.keys)}(e),function(t){t.$keyboardNavigation.TimeSlot=function(r,d,n,s){var _=t.getState(),a=t.matrix&&t.matrix[_.mode];r||(r=this.getDefaultDate()),d||(d=a?t.date.add(r,a.x_step,a.x_unit):t.date.add(r,t.config.key_nav_step,"minute")),this.section=n||this._getDefaultSection(),this.start_date=new Date(r),this.end_date=new Date(d),this.movingDate=s||null},t.$keyboardNavigation.TimeSlot.prototype=t._compose(t.$keyboardNavigation.KeyNavNode,{_handlers:null,getDefaultDate:function(){var r,d=t.getState(),n=new Date(d.date);n.setSeconds(0),n.setMilliseconds(0);var s=new Date;s.setSeconds(0),s.setMilliseconds(0);var _=t.matrix&&t.matrix[d.mode],a=!1;if(n.valueOf()===s.valueOf()&&(a=!0),_)a?(_.x_unit==="day"?(s.setHours(0),s.setMinutes(0)):_.x_unit==="hour"&&s.setMinutes(0),r=s):r=t.date[_.name+"_start"](new Date(d.date)),r=this.findVisibleColumn(r);else if(r=new Date(t.getState().min_date),a&&(r=s),r=this.findVisibleColumn(r),a||r.setHours(t.config.first_hour),!t._table_view){var o=t.$container.querySelector(".dhx_cal_data");o.scrollTop&&r.setHours(t.config.first_hour+Math.ceil(o.scrollTop/t.config.hour_size_px))}return r},clone:function(r){return new t.$keyboardNavigation.TimeSlot(r.start_date,r.end_date,r.section,r.movingDate)},_getMultisectionView:function(){var r,d=t.getState();return t._props&&t._props[d.mode]?r=t._props[d.mode]:t.matrix&&t.matrix[d.mode]&&(r=t.matrix[d.mode]),r},_getDefaultSection:function(){var r=null;return this._getMultisectionView()&&!r&&(r=this._getNextSection()),r},_getNextSection:function(r,d){var n=this._getMultisectionView(),s=n.order[r],_=s;(_=s!==void 0?s+d:n.size&&n.position?n.position:0)<0&&(_=0);var a=n.options||n.y_unit;return _>=a.length&&(_=a.length-1),a[_]?a[_].key:null},isValid:function(){var r=t.getState();if(this.start_date.valueOf()=r.max_date.valueOf()||!this.isVisible(this.start_date,this.end_date))return!1;var d=this._getMultisectionView();return!d||d.order[this.section]!==void 0},fallback:function(){var r=new t.$keyboardNavigation.TimeSlot;return r.isValid()?r:new t.$keyboardNavigation.DataArea},getNodes:function(){return Array.prototype.slice.call(t.$container.querySelectorAll(".dhx_focus_slot"))},getNode:function(){return this.getNodes()[0]},focus:function(){this.section&&t.getView()&&t.getView().smart_rendering&&t.getView().scrollTo&&!t.$container.querySelector(`[data-section-id="${this.section}"]`)&&t.getView().scrollTo({section:this.section}),t.$keyboardNavigation.marker.render(this.start_date,this.end_date,this.section),t.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this),t.$keyboardNavigation._pasteDate=this.start_date,t.$keyboardNavigation._pasteSection=this.section},blur:function(){t.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this),t.$keyboardNavigation.marker.clear()},_modes:t.$keyboardNavigation.SchedulerNode.prototype._modes,_getMode:t.$keyboardNavigation.SchedulerNode.prototype.getMode,addMonthDate:function(r,d,n){var s;switch(d){case"up":s=t.date.add(r,-1,"week");break;case"down":s=t.date.add(r,1,"week");break;case"left":s=t.date.day_start(t.date.add(r,-1,"day")),s=this.findVisibleColumn(s,-1);break;case"right":s=t.date.day_start(t.date.add(r,1,"day")),s=this.findVisibleColumn(s,1);break;default:s=t.date.day_start(new Date(r))}var _=t.getState();return(r.valueOf()<_.min_date.valueOf()||!n&&r.valueOf()>=_.max_date.valueOf())&&(s=new Date(_.min_date)),s},nextMonthSlot:function(r,d,n){var s,_;return(s=this.addMonthDate(r.start_date,d,n)).setHours(t.config.first_hour),(_=new Date(s)).setHours(t.config.last_hour),{start_date:s,end_date:_}},_alignTimeSlot:function(r,d,n,s){for(var _=new Date(d);_.valueOf()r.valueOf()&&(_=t.date.add(_,-s,n)),_},nextTimelineSlot:function(r,d,n){var s=t.getState(),_=t.matrix[s.mode],a=this._alignTimeSlot(r.start_date,t.date[_.name+"_start"](new Date(r.start_date)),_.x_unit,_.x_step),o=this._alignTimeSlot(r.end_date,t.date[_.name+"_start"](new Date(r.end_date)),_.x_unit,_.x_step);o.valueOf()<=a.valueOf()&&(o=t.date.add(a,_.x_step,_.x_unit));var l=this.clone(r);switch(l.start_date=a,l.end_date=o,l.section=r.section||this._getNextSection(),d){case"up":l.section=this._getNextSection(r.section,-1);break;case"down":l.section=this._getNextSection(r.section,1);break;case"left":l.start_date=this.findVisibleColumn(t.date.add(l.start_date,-_.x_step,_.x_unit),-1),l.end_date=t.date.add(l.start_date,_.x_step,_.x_unit);break;case"right":l.start_date=this.findVisibleColumn(t.date.add(l.start_date,_.x_step,_.x_unit),1),l.end_date=t.date.add(l.start_date,_.x_step,_.x_unit)}return(l.start_date.valueOf()=s.max_date.valueOf())&&(n&&l.start_date.valueOf()>=s.max_date.valueOf()?l.start_date=new Date(s.max_date):(l.start_date=t.date[s.mode+"_start"](t.date.add(s.date,d=="left"?-1:1,s.mode)),l.end_date=t.date.add(l.start_date,_.x_step,_.x_unit))),l},nextUnitsSlot:function(r,d,n){var s=this.clone(r);s.section=r.section||this._getNextSection();var _=r.section||this._getNextSection(),a=t.getState(),o=t._props[a.mode];switch(d){case"left":_=this._getNextSection(r.section,-1);var l=o.size?o.size-1:o.options.length;o.days>1&&o.order[_]==l-1&&t.date.add(r.start_date,-1,"day").valueOf()>=a.min_date.valueOf()&&(s=this.nextDaySlot(r,d,n));break;case"right":_=this._getNextSection(r.section,1),o.days>1&&!o.order[_]&&t.date.add(r.start_date,1,"day").valueOf()=_||!d&&!n&&(!s&&a==24||s==a)},isInVisibleDayTime:function(r,d){return this.isBeforeLastHour(r,d)&&this.isAfterFirstHour(r,d)},nextDaySlot:function(r,d,n){var s,_,a=t.config.key_nav_step,o=this._alignTimeSlot(r.start_date,t.date.day_start(new Date(r.start_date)),"minute",a),l=r.start_date;switch(d){case"up":if(s=t.date.add(o,-a,"minute"),!this.isInVisibleDayTime(s,!0)&&(!n||this.isInVisibleDayTime(l,!0))){var h=!0;n&&t.date.date_part(new Date(s)).valueOf()!=t.date.date_part(new Date(l)).valueOf()&&(h=!1),h&&(s=this.findVisibleColumn(t.date.add(r.start_date,-1,"day"),-1)),s.setHours(t.config.last_hour),s.setMinutes(0),s=t.date.add(s,-a,"minute")}_=t.date.add(s,a,"minute");break;case"down":s=t.date.add(o,a,"minute");var v=n?s:t.date.add(s,a,"minute");this.isInVisibleDayTime(v,!1)||n&&!this.isInVisibleDayTime(l,!1)||(n?(h=!0,t.date.date_part(new Date(l)).valueOf()==l.valueOf()&&(h=!1),h&&(s=this.findVisibleColumn(t.date.add(r.start_date,1,"day"),1)),s.setHours(t.config.first_hour),s.setMinutes(0),s=t.date.add(s,a,"minute")):((s=this.findVisibleColumn(t.date.add(r.start_date,1,"day"),1)).setHours(t.config.first_hour),s.setMinutes(0))),_=t.date.add(s,a,"minute");break;case"left":s=this._moveDate(r.start_date,-1),_=this._moveDate(r.end_date,-1);break;case"right":s=this._moveDate(r.start_date,1),_=this._moveDate(r.end_date,1);break;default:s=o,_=t.date.add(s,a,"minute")}return{start_date:s,end_date:_}},nextWeekAgendaSlot:function(r,d){var n,s,_=t.getState();switch(d){case"down":case"left":n=t.date.day_start(t.date.add(r.start_date,-1,"day")),n=this.findVisibleColumn(n,-1);break;case"up":case"right":n=t.date.day_start(t.date.add(r.start_date,1,"day")),n=this.findVisibleColumn(n,1);break;default:n=t.date.day_start(r.start_date)}return(r.start_date.valueOf()<_.min_date.valueOf()||r.start_date.valueOf()>=_.max_date.valueOf())&&(n=new Date(_.min_date)),(s=new Date(n)).setHours(t.config.last_hour),{start_date:n,end_date:s}},nextAgendaSlot:function(r,d){return{start_date:r.start_date,end_date:r.end_date}},isDateVisible:function(r){if(!t._ignores_detected)return!0;var d,n=t.matrix&&t.matrix[t.getState().mode];return d=n?t._get_date_index(n,r):t.locate_holder_day(r),!t._ignores[d]},findVisibleColumn:function(r,d){var n=r;d=d||1;for(var s=t.getState();!this.isDateVisible(n)&&(d>0&&n.valueOf()<=s.max_date.valueOf()||d<0&&n.valueOf()>=s.min_date.valueOf());)n=this.nextDateColumn(n,d);return n},nextDateColumn:function(r,d){d=d||1;var n=t.matrix&&t.matrix[t.getState().mode];return n?t.date.add(r,d*n.x_step,n.x_unit):t.date.day_start(t.date.add(r,d,"day"))},isVisible:function(r,d){if(!t._ignores_detected)return!0;for(var n=new Date(r);n.valueOf()=_.end_date.valueOf()&&(_=this.nextSlot(_,d,n)),t.$keyboardNavigation.TimeSlot.prototype.clone(_)},extendSlot:function(r,d){var n;switch(this._getMode()){case this._modes.units:n=d=="left"||d=="right"?this.nextUnitsSlot(r,d):this.extendUnitsSlot(r,d);break;case this._modes.timeline:n=d=="down"||d=="up"?this.nextTimelineSlot(r,d):this.extendTimelineSlot(r,d);break;case this._modes.year:case this._modes.month:n=this.extendMonthSlot(r,d);break;case this._modes.dayColumns:n=this.extendDaySlot(r,d);break;case this._modes.weekAgenda:n=this.extendWeekAgendaSlot(r,d);break;default:n=r}var s=t.getState();return n.start_date.valueOf()s.max_date.valueOf()&&(n.end_date=this.findVisibleColumn(s.max_date,-1)),t.$keyboardNavigation.TimeSlot.prototype.clone(n)},extendTimelineSlot:function(r,d){return this.extendGenericSlot({left:"start_date",right:"end_date"},r,d,"timeline")},extendWeekAgendaSlot:function(r,d){return this.extendGenericSlot({left:"start_date",right:"end_date"},r,d,"weekAgenda")},extendGenericSlot:function(r,d,n,s){var _,a=d.movingDate;if(a||(a=r[n]),!a||!r[n])return d;if(!n)return t.$keyboardNavigation.TimeSlot.prototype.clone(d);(_=this.nextSlot({start_date:d[a],section:d.section},n,s,!0)).start_date.valueOf()==d.start_date.valueOf()&&(_=this.nextSlot({start_date:_.start_date,section:_.section},n,s,!0)),_.movingDate=a;var o=this.extendSlotDates(d,_,_.movingDate);return o.end_date.valueOf()<=o.start_date.valueOf()&&(_.movingDate=_.movingDate=="end_date"?"start_date":"end_date"),o=this.extendSlotDates(d,_,_.movingDate),_.start_date=o.start_date,_.end_date=o.end_date,_},extendSlotDates:function(r,d,n){var s={start_date:null,end_date:null};return n=="start_date"?(s.start_date=d.start_date,s.end_date=r.end_date):(s.start_date=r.start_date,s.end_date=d.start_date),s},extendMonthSlot:function(r,d){return(r=this.extendGenericSlot({up:"start_date",down:"end_date",left:"start_date",right:"end_date"},r,d,"month")).start_date.setHours(t.config.first_hour),r.end_date=t.date.add(r.end_date,-1,"day"),r.end_date.setHours(t.config.last_hour),r},extendUnitsSlot:function(r,d){var n;switch(d){case"down":case"up":n=this.extendDaySlot(r,d);break;default:n=r}return n.section=r.section,n},extendDaySlot:function(r,d){return this.extendGenericSlot({up:"start_date",down:"end_date",left:"start_date",right:"end_date"},r,d,"dayColumns")},scrollSlot:function(r){var d=t.getState(),n=this.nextSlot(this,r);(n.start_date.valueOf()=d.max_date.valueOf())&&t.setCurrentView(new Date(n.start_date)),this.moveTo(n)},keys:{left:function(){this.scrollSlot("left")},right:function(){this.scrollSlot("right")},down:function(){this._getMode()==this._modes.list?t.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler():this.scrollSlot("down")},up:function(){this._getMode()==this._modes.list?t.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler():this.scrollSlot("up")},"shift+down":function(){this.moveTo(this.extendSlot(this,"down"))},"shift+up":function(){this.moveTo(this.extendSlot(this,"up"))},"shift+right":function(){this.moveTo(this.extendSlot(this,"right"))},"shift+left":function(){this.moveTo(this.extendSlot(this,"left"))},enter:function(){var r={start_date:new Date(this.start_date),end_date:new Date(this.end_date)},d=t.getState().mode;t.matrix&&t.matrix[d]?r[t.matrix[t.getState().mode].y_property]=this.section:t._props&&t._props[d]&&(r[t._props[d].map_to]=this.section),t.addEventNow(r)}}}),t.$keyboardNavigation.TimeSlot.prototype.bindAll(t.$keyboardNavigation.TimeSlot.prototype.keys)}(e),function(t){t.$keyboardNavigation.MinicalButton=function(r,d){this.container=r,this.index=d||0},t.$keyboardNavigation.MinicalButton.prototype=t._compose(t.$keyboardNavigation.KeyNavNode,{isValid:function(){return!!this.container.offsetWidth},fallback:function(){var r=new t.$keyboardNavigation.TimeSlot;return r.isValid()?r:new t.$keyboardNavigation.DataArea},focus:function(){t.$keyboardNavigation.dispatcher.globalNode.disable(),this.container.removeAttribute("tabindex"),t.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this)},blur:function(){this.container.setAttribute("tabindex","0"),t.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this)},getNode:function(){return this.index?this.container.querySelector(".dhx_cal_next_button"):this.container.querySelector(".dhx_cal_prev_button")},keys:{right:function(r){this.moveTo(new t.$keyboardNavigation.MinicalButton(this.container,this.index?0:1))},left:function(r){this.moveTo(new t.$keyboardNavigation.MinicalButton(this.container,this.index?0:1))},down:function(){var r=new t.$keyboardNavigation.MinicalCell(this.container,0,0);r&&!r.isValid()&&(r=r.fallback()),this.moveTo(r)},enter:function(r){this.getNode().click()}}}),t.$keyboardNavigation.MinicalButton.prototype.bindAll(t.$keyboardNavigation.MinicalButton.prototype.keys)}(e),function(t){t.$keyboardNavigation.MinicalCell=function(r,d,n){this.container=r,this.row=d||0,this.col=n||0},t.$keyboardNavigation.MinicalCell.prototype=t._compose(t.$keyboardNavigation.KeyNavNode,{isValid:function(){var r=this._getGrid();return!(!r[this.row]||!r[this.row][this.col])},fallback:function(){var r=this.row,d=this.col,n=this._getGrid();n[r]||(r=0);var s=!0;if(r>n.length/2&&(s=!1),!n[r]){var _=new t.$keyboardNavigation.TimeSlot;return _.isValid()?_:new t.$keyboardNavigation.DataArea}if(s){for(var a=d;n[r]&&a-1||l.indexOf("dhx_before")>-1||l.indexOf("dhx_scale_ignore")>-1)&&(o=!1),d[n][_]=o}}return d},keys:{right:function(r){var d=this._getGrid(),n=this.row,s=this.col+1;d[n]&&d[n][s]||(d[n+1]?(n+=1,s=0):s=this.col);var _=new t.$keyboardNavigation.MinicalCell(this.container,n,s);_.isValid()||(_=_.fallback()),this.moveTo(_)},left:function(r){var d=this._getGrid(),n=this.row,s=this.col-1;d[n]&&d[n][s]||(s=d[n-1]?d[n-=1].length-1:this.col);var _=new t.$keyboardNavigation.MinicalCell(this.container,n,s);_.isValid()||(_=_.fallback()),this.moveTo(_)},down:function(){var r=this._getGrid(),d=this.row+1,n=this.col;r[d]&&r[d][n]||(d=this.row);var s=new t.$keyboardNavigation.MinicalCell(this.container,d,n);s.isValid()||(s=s.fallback()),this.moveTo(s)},up:function(){var r=this._getGrid(),d=this.row-1,n=this.col;if(r[d]&&r[d][n]){var s=new t.$keyboardNavigation.MinicalCell(this.container,d,n);s.isValid()||(s=s.fallback()),this.moveTo(s)}else{var _=0;this.col>r[this.row].length/2&&(_=1),this.moveTo(new t.$keyboardNavigation.MinicalButton(this.container,_))}},enter:function(r){this.getNode().querySelector(".dhx_month_head").click()}}}),t.$keyboardNavigation.MinicalCell.prototype.bindAll(t.$keyboardNavigation.MinicalCell.prototype.keys)}(e),function(t){t.$keyboardNavigation.DataArea=function(r){this.index=r||0},t.$keyboardNavigation.DataArea.prototype=t._compose(t.$keyboardNavigation.KeyNavNode,{getNode:function(r){return t.$container.querySelector(".dhx_cal_data")},_handlers:null,isValid:function(){return!0},fallback:function(){return this},keys:{"up,down,right,left":function(){this.moveTo(new t.$keyboardNavigation.TimeSlot)}}}),t.$keyboardNavigation.DataArea.prototype.bindAll(t.$keyboardNavigation.DataArea.prototype.keys)}(e),Na(e),function(t){t.$keyboardNavigation.dispatcher={isActive:!1,activeNode:null,globalNode:new t.$keyboardNavigation.SchedulerNode,keepScrollPosition:function(r){var d,n,s=t.$container.querySelector(".dhx_timeline_scrollable_data");s||(s=t.$container.querySelector(".dhx_cal_data")),s&&(d=s.scrollTop,n=s.scrollLeft),r(),s&&(s.scrollTop=d,s.scrollLeft=n)},enable:function(){if(t.$container){this.isActive=!0;var r=this;this.keepScrollPosition(function(){r.globalNode.enable(),r.setActiveNode(r.getActiveNode())})}},disable:function(){this.isActive=!1,this.globalNode.disable()},isEnabled:function(){return!!this.isActive},getDefaultNode:function(){return this.globalNode.getDefaultNode()},setDefaultNode:function(){this.setActiveNode(this.getDefaultNode())},getActiveNode:function(){var r=this.activeNode;return r&&!r.isValid()&&(r=r.fallback()),r},focusGlobalNode:function(){this.blurNode(this.globalNode),this.focusNode(this.globalNode)},setActiveNode:function(r){r&&r.isValid()&&(this.activeNode&&this.activeNode.compareTo(r)||this.isEnabled()&&(this.blurNode(this.activeNode),this.activeNode=r,this.focusNode(this.activeNode)))},focusNode:function(r){r&&r.focus&&(r.focus(),r.getNode&&document.activeElement!=r.getNode()&&this.setActiveNode(new t.$keyboardNavigation.DataArea))},blurNode:function(r){r&&r.blur&&r.blur()},getInlineEditor:function(r){var d=t.$container.querySelector(".dhx_cal_editor["+t.config.event_attribute+"='"+r+"'] textarea");return d&&d.offsetWidth?d:null},keyDownHandler:function(r){if(!r.defaultPrevented){var d=this.getActiveNode();if((!t.$keyboardNavigation.isModal()||d&&d.container&&t.utils.dom.locateCss({target:d.container},"dhx_minical_popup",!1))&&(!t.getState().editor_id||!this.getInlineEditor(t.getState().editor_id))&&this.isEnabled()){r=r||window.event;var n=this.globalNode,s=t.$keyboardNavigation.shortcuts.getCommandFromEvent(r);d?d.findHandler(s)?d.doAction(s,r):n.findHandler(s)&&n.doAction(s,r):this.setDefaultNode()}}},_timeout:null,delay:function(r,d){clearTimeout(this._timeout),this._timeout=setTimeout(r,d||1)}}}(e),Ta(e),function(){Aa(e),function(_){_.$keyboardNavigation._minicalendars=[],_.$keyboardNavigation.isMinical=function(a){for(var o=_.$keyboardNavigation._minicalendars,l=0;l=e.config.collision_limit}),e.addEvent=function(t,r,d,n,s){var _=t;arguments.length!=1&&((_=s||{}).start_date=t,_.end_date=r,_.text=d,_.id=n,_.layer=this.defaultLayer),_.id=_.id||e.uid(),_.text=_.text||"",typeof _.start_date=="string"&&(_.start_date=this.templates.api_date(_.start_date)),typeof _.end_date=="string"&&(_.end_date=this.templates.api_date(_.end_date)),_._timed=this.isOneDayEvent(_);var a=!this._events[_.id];this._events[_.id]=_,this.event_updated(_),this._loading||this.callEvent(a?"onEventAdded":"onEventChanged",[_.id,_])},this._evs_layer={};for(var i=0;i_.getHours()&&(_.setHours(a),t=_.valueOf()),r=t+s}n.start_date=n.start_date||_,n.end_date=n.end_date||new Date(r),n.text=n.text||this.locale.labels.new_event,n.id=this._drag_id=this.uid(),n.layer=this.defaultLayer,this._drag_mode="new-size",this._loading=!0,this.addEvent(n),this.callEvent("onEventCreated",[this._drag_id,d]),this._loading=!1,this._drag_event={},this._on_mouse_up(d)},e._t_render_view_data=function(t){if(this.config.multi_day&&!this._table_view){for(var r=[],d=[],n=0;n';return k+='
 
',k+='
'+a+"
",k+='
'+o+"
",k+='',v.innerHTML=k,v.style.zIndex=100,v.firstChild},e.render_event_bar=function(t){var r=this._els.dhx_cal_data[0],d=this._colsS[t._sday],n=this._colsS[t._eday];n==d&&(n=this._colsS[t._eday+1]);var s=this.xy.bar_height,_=this._colsS.heights[t._sweek]+(this._colsS.height?this.xy.month_scale_height+2:2)+t._sorder*s,a=document.createElement("div"),o=t._timed?"dhx_cal_event_clear":"dhx_cal_event_line",l=e.templates["event_class_"+t.layer]?e.templates["event_class_"+t.layer](t.start_date,t.end_date,t):e.templates.event_class(t.start_date,t.end_date,t);l&&(o=o+" "+l);var h='
';t._timed&&(h+=e.templates["event_bar_date_"+t.layer]?e.templates["event_bar_date_"+t.layer](t.start_date,t.end_date,t):e.templates.event_bar_date(t.start_date,t.end_date,t)),h+=e.templates["event_bar_text_"+t.layer]?e.templates["event_bar_text_"+t.layer](t.start_date,t.end_date,t):e.templates.event_bar_text(t.start_date,t.end_date,t)+"
)",h+="",a.innerHTML=h,this._rendered.push(a.firstChild),r.appendChild(a.firstChild)},e.render_event=function(t){var r=e.xy.menu_width;if(e.getLayer(t.layer).noMenu&&(r=0),!(t._sday<0)){var d=e.locate_holder(t._sday);if(d){var n=60*t.start_date.getHours()+t.start_date.getMinutes(),s=60*t.end_date.getHours()+t.end_date.getMinutes()||60*e.config.last_hour,_=Math.round((60*n*1e3-60*this.config.first_hour*60*1e3)*this.config.hour_size_px/36e5)%(24*this.config.hour_size_px)+1,a=Math.max(e.xy.min_event_height,(s-n)*this.config.hour_size_px/60)+1,o=Math.floor((d.clientWidth-r)/t._count),l=t._sorder*o+1;t._inner||(o*=t._count-t._sorder);var h=this._render_v_bar(t.id,r+l,_,o,a,t._text_style,e.templates.event_header(t.start_date,t.end_date,t),e.templates.event_text(t.start_date,t.end_date,t));if(this._rendered.push(h),d.appendChild(h),l=l+parseInt(d.style.left,10)+r,_+=this._dy_shift,h.style.zIndex=this._layers_zindex[t.layer],this._edit_id==t.id){h.style.zIndex=parseInt(h.style.zIndex)+1;var v=h.style.zIndex;o=Math.max(o-4,e.xy.editor_width),(h=document.createElement("div")).setAttribute("event_id",t.id),h.setAttribute(this.config.event_attribute,t.id),this.set_xy(h,o,a-20,l,_+14),h.className="dhx_cal_editor",h.style.zIndex=v;var u=document.createElement("div");this.set_xy(u,o-6,a-26),u.style.cssText+=";margin:2px 2px 2px 2px;overflow:hidden;",u.style.zIndex=v,h.appendChild(u),this._els.dhx_cal_data[0].appendChild(h),this._rendered.push(h),u.innerHTML="",this._editor=u.firstChild,this._editor.addEventListener("keypress",function(g){if(g.shiftKey)return!0;var y=g.keyCode;y==e.keys.edit_save&&e.editStop(!0),y==e.keys.edit_cancel&&e.editStop(!1)}),this._editor.addEventListener("selectstart",function(g){return g.cancelBubble=!0,!0}),u.firstChild.focus(),this._els.dhx_cal_data[0].scrollLeft=0,u.firstChild.select()}if(this._select_id==t.id){h.style.zIndex=parseInt(h.style.zIndex)+1;for(var f=this.config["icons_"+(this._edit_id==t.id?"edit":"select")],c="",p=0;p";var m=this._render_v_bar(t.id,l-r+1,_,r,20*f.length+26,"","
",c,!0);m.style.left=l-r+1,m.style.zIndex=h.style.zIndex,this._els.dhx_cal_data[0].appendChild(m),this._rendered.push(m)}}}},e.filter_agenda=function(t,r){var d=e.getLayer(r.layer);return d&&d.visible}})},limit:function(e){e.config.limit_start=null,e.config.limit_end=null,e.config.limit_view=!1,e.config.check_limits=!0,e._temp_limit_scope=function(){var i=null;e.attachEvent("onBeforeViewChange",function(t,r,d,n){function s(_,a){var o=e.config.limit_start,l=e.config.limit_end,h=e.date.add(_,1,a);return _.valueOf()>l.valueOf()||h<=o.valueOf()}return!e.config.limit_view||!s(n=n||r,d=d||t)||r.valueOf()==n.valueOf()||(setTimeout(function(){if(e.$destroyed)return!0;var _=s(r,d)?e.config.limit_start:r;e.setCurrentView(s(_,d)?null:_,d)},1),!1)}),e.attachEvent("onMouseDown",function(t){return t!="dhx_time_block"}),e.attachEvent("onBeforeDrag",function(t){return!t||e.checkLimitViolation(e.getEvent(t))}),e.attachEvent("onClick",function(t,r){return e.checkLimitViolation(e.getEvent(t))}),e.attachEvent("onBeforeLightbox",function(t){var r=e.getEvent(t);return i=[r.start_date,r.end_date],e.checkLimitViolation(r)}),e.attachEvent("onEventSave",function(t,r,d){if(!r.start_date||!r.end_date){var n=e.getEvent(t);r.start_date=new Date(n.start_date),r.end_date=new Date(n.end_date)}if(r.rec_type){var s=e._lame_clone(r);return e._roll_back_dates(s),e.checkLimitViolation(s)}return e.checkLimitViolation(r)}),e.attachEvent("onEventAdded",function(t){if(!t)return!0;var r=e.getEvent(t);return!e.checkLimitViolation(r)&&e.config.limit_start&&e.config.limit_end&&(r.start_date=e.config.limit_end.valueOf()&&(r.start_date=this.date.add(e.config.limit_end,-1,"day")),r.end_date=e.config.limit_end.valueOf()&&(r.end_date=this.date.add(e.config.limit_end,-1,"day")),r.start_date.valueOf()>=r.end_date.valueOf()&&(r.end_date=this.date.add(r.start_date,this.config.event_duration||this.config.time_step,"minute")),r._timed=this.isOneDayEvent(r)),!0}),e.attachEvent("onEventChanged",function(t){if(!t)return!0;var r=e.getEvent(t);if(!e.checkLimitViolation(r)){if(!i)return!1;r.start_date=i[0],r.end_date=i[1],r._timed=this.isOneDayEvent(r)}return!0}),e.attachEvent("onBeforeEventChanged",function(t,r,d){return e.checkLimitViolation(t)}),e.attachEvent("onBeforeEventCreated",function(t){var r=e.getActionData(t).date,d={_timed:!0,start_date:r,end_date:e.date.add(r,e.config.time_step,"minute")};return e.checkLimitViolation(d)}),e.attachEvent("onViewChange",function(){e._mark_now()}),e.attachEvent("onAfterSchedulerResize",function(){return window.setTimeout(function(){if(e.$destroyed)return!0;e._mark_now()},1),!0}),e.attachEvent("onTemplatesReady",function(){e._mark_now_timer=window.setInterval(function(){e._is_initialized()&&e._mark_now()},6e4)}),e.attachEvent("onDestroy",function(){clearInterval(e._mark_now_timer)})},e._temp_limit_scope()},map_view:function(e){let i=null,t=[];const r={googleMap:new Ca(e),openStreetMaps:new Oa(e),mapbox:new La(e)};function d(s){i=s.ext.mapView.createAdapter(),t.push(e.attachEvent("onEventSave",function(_,a,o){let l=e.getEvent(_);return l&&l.event_location!=a.event_location&&(e._eventLocationChanged=!0),!0}),e.attachEvent("onEventChanged",(_,a)=>{const{start_date:o,end_date:l}=a,{min_date:h,max_date:v}=e.getState();return o.valueOf()h.valueOf()&&i&&(e.config.map_settings.resolve_event_location&&a.event_location&&!e._latLngUpdate?n(a,i):i.updateEventMarker(a)),e._latLngUpdate=!1,!0}),e.attachEvent("onEventIdChange",function(_,a){let o=e.getEvent(a);i==null||i.removeEventMarker(_),i==null||i.addEventMarker(o)}),e.attachEvent("onEventAdded",(_,a)=>{const{start_date:o,end_date:l}=a,{min_date:h,max_date:v}=e.getState();o.valueOf()h.valueOf()&&i&&(e.config.map_settings.resolve_event_location&&a.event_location&&e._eventLocationChanged?(n(a,i),e._eventLocationChanged=!1):(i.addEventMarker(a),i.onEventClick(a)))}),e.attachEvent("onClick",function(_,a){const o=e.getEvent(_);return i&&o&&i.onEventClick(o),!1}),e.attachEvent("onBeforeEventDelete",(_,a)=>(i&&i.removeEventMarker(_),!0)))}async function n(s,_){let a=await _.resolveAddress(s.event_location);return s.lat=a.lat,s.lng=a.lng,_.removeEventMarker(String(s.id)),_.addEventMarker(s),s}e.ext||(e.ext={}),e.ext.mapView={createAdapter:function(){return r[e.config.map_view_provider]},createMarker:function(s){return new google.maps.Marker(s)},currentAdapter:null,adapters:r},e._latLngUpdate=!1,e._eventLocationChanged=!1,e.config.map_view_provider="googleMap",e.config.map_settings={initial_position:{lat:48.724,lng:8.215},error_position:{lat:15,lng:15},initial_zoom:1,zoom_after_resolve:15,info_window_max_width:300,resolve_user_location:!0,resolve_event_location:!0,view_provider:"googleMap"},e.config.map_initial_position&&(e.config.map_settings.initial_position={lat:e.config.map_initial_position.lat(),lng:e.config.map_initial_position.lng()}),e.config.map_error_position&&(e.config.map_settings.error_position={lat:e.config.map_error_position.lat(),lng:e.config.map_error_position.lng()}),e.xy.map_date_width=188,e.xy.map_icon_width=25,e.xy.map_description_width=400,e.date.add_map=function(s,_,a){return new Date(s.valueOf())},e.templates.map_date=function(s,_,a){return""},e.templates.map_time=function(s,_,a){return e.config.rtl&&!a._timed?e.templates.day_date(_)+" – "+e.templates.day_date(s):a._timed?this.day_date(a.start_date,a.end_date,a)+" "+this.event_date(s):e.templates.day_date(s)+" – "+e.templates.day_date(_)},e.templates.map_text=function(s,_,a){return a.text},e.templates.map_info_content=function(s){return`
Event's text: ${s.text} + `,e._obj.appendChild(i),e.event(i,"click",function(){e.expanded?e.collapse():e.expand()})}),e._maximize=function(){this.expanded=!this.expanded,this.expanded?this.ext.fullscreen.toggleIcon.classList.add("dhx_expand_icon--expanded"):this.ext.fullscreen.toggleIcon.classList.remove("dhx_expand_icon--expanded");for(var i=["left","top"],t=0;t400))try{l=JSON.parse(o.xmlDoc.responseText)}catch{}_(l)})},r._plain_export_copy=function(n,s){var _={};for(var a in n)_[a]=n[a];return _.start_date=s(_.start_date),_.end_date=s(_.end_date),_.$text=this.templates.event_text(n.start_date,n.end_date,n),_},r._serialize_plain=function(n,s){var _;n=n||r.date.date_to_str("%Y%m%dT%H%i%s",!0),_=s&&s.start&&s.end?r.getEvents(s.start,s.end):r.getEvents();for(var a=[],o=0;o<_.length;o++)a[o]=this._plain_export_copy(_[o],n);return a},r._serialize_columns=function(){return[{id:"start_date",header:"Start Date",width:30},{id:"end_date",header:"End Date",width:30},{id:"$text",header:"Text",width:100}]},r._send_to_export=function(n,s){if(n.version||(n.version=r.version),n.skin||(n.skin=r.skin),n.callback)return r._ajax_to_export(n,s,n.callback);var _=this._create_hidden_form();_.firstChild.action=n.server||"https://export.dhtmlx.com/scheduler",_.firstChild.childNodes[0].value=JSON.stringify(n),_.firstChild.childNodes[1].value=s,_.firstChild.submit()},r._create_hidden_form=function(){if(!this._hidden_export_form){var n=this._hidden_export_form=document.createElement("div");n.style.display="none",n.innerHTML="
",document.body.appendChild(n)}return this._hidden_export_form},r._get_export_size=function(n,s,_,a,o,l,h){a=parseInt(a)/25.4||4;var m={A5:{x:148,y:210},A4:{x:210,y:297},A3:{x:297,y:420},A2:{x:420,y:594},A1:{x:594,y:841},A0:{x:841,y:1189}},v=t("dhx_cal_data",this).x,u={y:t("dhx_cal_data",this).y+t("dhx_cal_header",this).y+t("dhx_multi_day",this).y};return u.x=n==="full"?v:Math.floor((s==="landscape"?m[n].y:m[n].x)*a),h&&(u.x*=parseFloat(h.x)||1,u.y*=parseFloat(h.y)||1),u},r._export_html=function(n){var s,_,a,o=(s=void 0,_=void 0,(a=d())&&(_=a.scrollable,s=a.smart_rendering),{nav_height:r.xy.nav_height,scroll_width:r.xy.scroll_width,style_width:r._obj.style.width,style_height:r._obj.style.height,timeline_scrollable:_,timeline_smart_rendering:s}),l=r._get_export_size(n.format,n.orientation,n.zoom,n.dpi,n.header,n.footer,n.scales),h="";try{(function(m,v){r._obj.style.width=m.x+"px",r._obj.style.height=m.y+"px",r.xy.nav_height=0,r.xy.scroll_width=0;var u=d();(v.timeline_scrollable||v.timeline_smart_rendering)&&(u.scrollable=!1,u.smart_rendering=!1)})(l,o),r.setCurrentView(),h=r._obj.innerHTML}catch(m){console.error(m)}finally{(function(m){r.xy.scroll_width=m.scroll_width,r.xy.nav_height=m.nav_height,r._obj.style.width=m.style_width,r._obj.style.height=m.style_height;var v=d();(m.timeline_scrollable||m.timeline_smart_rendering)&&(v.scrollable=m.timeline_scrollable,v.smart_rendering=m.timeline_smart_rendering)})(o),r.setCurrentView()}return h}}(e)})()},grid_view:function(e){_e("Grid",e.assert)},html_templates:function(e){e.attachEvent("onTemplatesReady",function(){for(var i=document.body.getElementsByTagName("DIV"),t=0;t=96&&d.keyCode<=105&&(d.keyCode-=48);var n=String.fromCharCode(d.keyCode);return n&&(d.keyCode=n.toLowerCase().charCodeAt(0)),d},getHashFromEvent:function(r){return this.getHash(this.getCommandFromEvent(r))},getHash:function(r){var d=[];for(var n in r.modifiers)r.modifiers[n]&&d.push(n);return d.push(r.keyCode),d.join(this.junctionChar)},getExpressions:function(r){return r.split(this.junctionChar)},getWords:function(r){return r.split(this.combinationChar)},trim:function(r){return r.replace(/\s/g,"")},junctionChar:",",combinationChar:"+",commandKeys:{shift:16,alt:18,ctrl:17,meta:!0},specialKeys:{backspace:8,tab:9,enter:13,esc:27,space:32,up:38,down:40,left:37,right:39,home:36,end:35,pageup:33,pagedown:34,delete:46,insert:45,plus:107,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123}}}(e),function(t){t.$keyboardNavigation.EventHandler={_handlers:null,findHandler:function(r){this._handlers||(this._handlers={});var d=t.$keyboardNavigation.shortcuts.getHash(r);return this._handlers[d]},doAction:function(r,d){var n=this.findHandler(r);n&&(n.call(this,d),d.preventDefault?d.preventDefault():d.returnValue=!1)},bind:function(r,d){this._handlers||(this._handlers={});for(var n=t.$keyboardNavigation.shortcuts,s=n.parse(r),_=0;_=s.length-1?0:a+1])return n.focus(),d.preventDefault(),!0;return!1}}(e),function(t){t.$keyboardNavigation.marker={clear:function(){for(var r=t.$container.querySelectorAll(".dhx_focus_slot"),d=0;d=0;a--)if(s[a].offsetWidth)return s[a];return null},addDataAttributes:function(r,d,n,s){for(var _=t.date.date_to_str(t.config.api_date),a=_(d),o=_(n),l=0;lt._max_date.valueOf()&&(l=new Date(t._max_date)),!s._trace_x)return a;for(var h=0;hr))return a;var v=this.createElement();let u,c;function f(b,k){k.setDate(1),k.setFullYear(b.getFullYear()),k.setMonth(b.getMonth()),k.setDate(b.getDate())}if(t.getView().days){const b=new Date(r);f(t._min_date,b);const k=new Date(d);f(t._min_date,k),u=t._timeline_getX({start_date:b},!1,s),c=t._timeline_getX({start_date:k},!1,s)}else u=t._timeline_getX({start_date:r},!1,s),c=t._timeline_getX({start_date:d},!1,s);var p=s._section_height[n]-1||s.dy-1,g=0;t._isRender("cell")&&(g=m.offsetTop,u+=s.dx,c+=s.dx,m=t.$container.querySelector(".dhx_cal_data"));var y=Math.max(1,c-u-1);let x="left";return t.config.rtl&&(x="right"),v.style.cssText=`height:${p}px; ${x}:${u}px; width:${y}px; top:${g}px;`,m&&(m.appendChild(v),a.push(v)),a},renderMonthCell:function(r){for(var d=t.$container.querySelectorAll(".dhx_month_head"),n=[],s=0;s1?s=t.locate_holder_day(r)+h:(s=h,l.size&&s>l.position+l.size&&(s=0))}if(!(a=t.locate_holder(s))||a.querySelector(".dhx_scale_hour"))return document.createElement("div");var m=Math.max(60*r.getHours()+r.getMinutes(),60*o.first_hour),v=Math.min(60*d.getHours()+d.getMinutes(),60*o.last_hour);if(!v&&t.date.day_start(new Date(d)).valueOf()>t.date.day_start(new Date(r)).valueOf()&&(v=60*o.last_hour),v<=m)return[];var u=this.createElement(),c=t.config.hour_size_px*o.last_hour+1,f=36e5;return u.style.top=Math.round((60*m*1e3-t.config.first_hour*f)*t.config.hour_size_px/f)%c+"px",u.style.lineHeight=u.style.height=Math.max(Math.round(60*(v-m)*1e3*t.config.hour_size_px/f)%c,1)+"px",u.style.width="100%",a.appendChild(u),_.push(u),_[0]}}}(e),function(t){t.$keyboardNavigation.SchedulerNode=function(){},t.$keyboardNavigation.SchedulerNode.prototype=t._compose(t.$keyboardNavigation.EventHandler,{getDefaultNode:function(){var r=new t.$keyboardNavigation.TimeSlot;return r.isValid()||(r=r.fallback()),r},_modes:{month:"month",year:"year",dayColumns:"dayColumns",timeline:"timeline",units:"units",weekAgenda:"weekAgenda",list:"list"},getMode:function(){var r=t.getState().mode;return t.matrix&&t.matrix[r]?this._modes.timeline:t._props&&t._props[r]?this._modes.units:r=="month"?this._modes.month:r=="year"?this._modes.year:r=="week_agenda"?this._modes.weekAgenda:r=="map"||r=="agenda"||t._grid&&t["grid_"+r]?this._modes.list:this._modes.dayColumns},focus:function(){t.focus()},blur:function(){},disable:function(){t.$container.setAttribute("tabindex","0")},enable:function(){t.$container&&t.$container.removeAttribute("tabindex")},isEnabled:function(){return t.$container.hasAttribute("tabindex")},_compareEvents:function(r,d){return r.start_date.valueOf()==d.start_date.valueOf()?r.id>d.id?1:-1:r.start_date.valueOf()>d.start_date.valueOf()?1:-1},_pickEvent:function(r,d,n,s){var _=t.getState();r=new Date(Math.max(_.min_date.valueOf(),r.valueOf())),d=new Date(Math.min(_.max_date.valueOf(),d.valueOf()));var a=t.getEvents(r,d);a.sort(this._compareEvents),s&&(a=a.reverse());for(var o=!!n,l=0;l=this.getNodes().length&&(r=0),this.moveTo(new t.$keyboardNavigation.HeaderCell(r))},down:function(){this.moveTo(new t.$keyboardNavigation.TimeSlot)},enter:function(){var r=this.getNode();r&&r.click()}}}),t.$keyboardNavigation.HeaderCell.prototype.bindAll(t.$keyboardNavigation.HeaderCell.prototype.keys)}(e),function(t){t.$keyboardNavigation.Event=function(r){if(this.eventId=null,t.getEvent(r)){var d=t.getEvent(r);this.start=new Date(d.start_date),this.end=new Date(d.end_date),this.section=this._getSection(d),this.eventId=r}},t.$keyboardNavigation.Event.prototype=t._compose(t.$keyboardNavigation.KeyNavNode,{_getNodes:function(){return Array.prototype.slice.call(t.$container.querySelectorAll("["+t.config.event_attribute+"]"))},_modes:t.$keyboardNavigation.SchedulerNode.prototype._modes,getMode:t.$keyboardNavigation.SchedulerNode.prototype.getMode,_handlers:null,isValid:function(){return!(!t.getEvent(this.eventId)||!this.getNode())},fallback:function(){var r=this._getNodes()[0],d=null;if(r&&t._locate_event(r)){var n=t._locate_event(r);d=new t.$keyboardNavigation.Event(n)}else d=new t.$keyboardNavigation.TimeSlot;return d},isScrolledIntoView:function(r){var d=r.getBoundingClientRect(),n=t.$container.querySelector(".dhx_cal_data").getBoundingClientRect();return!(d.bottomn.bottom)},getNode:function(){var r="["+t.config.event_attribute+"='"+this.eventId+"']",d=t.$keyboardNavigation.dispatcher.getInlineEditor(this.eventId);if(d)return d;if(t.isMultisectionEvent&&t.isMultisectionEvent(t.getEvent(this.eventId))){for(var n=t.$container.querySelectorAll(r),s=0;sd.max_date.valueOf()||r.end_date.valueOf()<=d.min_date.valueOf())&&t.setCurrentView(r.start_date);var n=this.getNode();this.isScrolledIntoView(n)?t.$keyboardNavigation.dispatcher.keepScrollPosition((function(){t.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this)}).bind(this)):t.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this)},blur:function(){t.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this)},_getSection:function(r){var d=null,n=t.getState().mode;return t.matrix&&t.matrix[n]?d=r[t.matrix[t.getState().mode].y_property]:t._props&&t._props[n]&&(d=r[t._props[n].map_to]),d},_moveToSlot:function(r){var d=t.getEvent(this.eventId);if(d){var n=this._getSection(d),s=new t.$keyboardNavigation.TimeSlot(d.start_date,null,n);this.moveTo(s.nextSlot(s,r))}else this.moveTo(new t.$keyboardNavigation.TimeSlot)},keys:{left:function(){this._moveToSlot("left")},right:function(){this._moveToSlot("right")},down:function(){this.getMode()==this._modes.list?t.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler():this._moveToSlot("down")},space:function(){var r=this.getNode();r&&r.click?r.click():this.moveTo(new t.$keyboardNavigation.TimeSlot)},up:function(){this.getMode()==this._modes.list?t.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler():this._moveToSlot("up")},delete:function(){t.getEvent(this.eventId)?t._click.buttons.delete(this.eventId):this.moveTo(new t.$keyboardNavigation.TimeSlot)},enter:function(){t.getEvent(this.eventId)?t.showLightbox(this.eventId):this.moveTo(new t.$keyboardNavigation.TimeSlot)}}}),t.$keyboardNavigation.Event.prototype.bindAll(t.$keyboardNavigation.Event.prototype.keys)}(e),function(t){t.$keyboardNavigation.TimeSlot=function(r,d,n,s){var _=t.getState(),a=t.matrix&&t.matrix[_.mode];r||(r=this.getDefaultDate()),d||(d=a?t.date.add(r,a.x_step,a.x_unit):t.date.add(r,t.config.key_nav_step,"minute")),this.section=n||this._getDefaultSection(),this.start_date=new Date(r),this.end_date=new Date(d),this.movingDate=s||null},t.$keyboardNavigation.TimeSlot.prototype=t._compose(t.$keyboardNavigation.KeyNavNode,{_handlers:null,getDefaultDate:function(){var r,d=t.getState(),n=new Date(d.date);n.setSeconds(0),n.setMilliseconds(0);var s=new Date;s.setSeconds(0),s.setMilliseconds(0);var _=t.matrix&&t.matrix[d.mode],a=!1;if(n.valueOf()===s.valueOf()&&(a=!0),_)a?(_.x_unit==="day"?(s.setHours(0),s.setMinutes(0)):_.x_unit==="hour"&&s.setMinutes(0),r=s):r=t.date[_.name+"_start"](new Date(d.date)),r=this.findVisibleColumn(r);else if(r=new Date(t.getState().min_date),a&&(r=s),r=this.findVisibleColumn(r),a||r.setHours(t.config.first_hour),!t._table_view){var o=t.$container.querySelector(".dhx_cal_data");o.scrollTop&&r.setHours(t.config.first_hour+Math.ceil(o.scrollTop/t.config.hour_size_px))}return r},clone:function(r){return new t.$keyboardNavigation.TimeSlot(r.start_date,r.end_date,r.section,r.movingDate)},_getMultisectionView:function(){var r,d=t.getState();return t._props&&t._props[d.mode]?r=t._props[d.mode]:t.matrix&&t.matrix[d.mode]&&(r=t.matrix[d.mode]),r},_getDefaultSection:function(){var r=null;return this._getMultisectionView()&&!r&&(r=this._getNextSection()),r},_getNextSection:function(r,d){var n=this._getMultisectionView(),s=n.order[r],_=s;(_=s!==void 0?s+d:n.size&&n.position?n.position:0)<0&&(_=0);var a=n.options||n.y_unit;return _>=a.length&&(_=a.length-1),a[_]?a[_].key:null},isValid:function(){var r=t.getState();if(this.start_date.valueOf()=r.max_date.valueOf()||!this.isVisible(this.start_date,this.end_date))return!1;var d=this._getMultisectionView();return!d||d.order[this.section]!==void 0},fallback:function(){var r=new t.$keyboardNavigation.TimeSlot;return r.isValid()?r:new t.$keyboardNavigation.DataArea},getNodes:function(){return Array.prototype.slice.call(t.$container.querySelectorAll(".dhx_focus_slot"))},getNode:function(){return this.getNodes()[0]},focus:function(){this.section&&t.getView()&&t.getView().smart_rendering&&t.getView().scrollTo&&!t.$container.querySelector(`[data-section-id="${this.section}"]`)&&t.getView().scrollTo({section:this.section}),t.$keyboardNavigation.marker.render(this.start_date,this.end_date,this.section),t.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this),t.$keyboardNavigation._pasteDate=this.start_date,t.$keyboardNavigation._pasteSection=this.section},blur:function(){t.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this),t.$keyboardNavigation.marker.clear()},_modes:t.$keyboardNavigation.SchedulerNode.prototype._modes,_getMode:t.$keyboardNavigation.SchedulerNode.prototype.getMode,addMonthDate:function(r,d,n){var s;switch(d){case"up":s=t.date.add(r,-1,"week");break;case"down":s=t.date.add(r,1,"week");break;case"left":s=t.date.day_start(t.date.add(r,-1,"day")),s=this.findVisibleColumn(s,-1);break;case"right":s=t.date.day_start(t.date.add(r,1,"day")),s=this.findVisibleColumn(s,1);break;default:s=t.date.day_start(new Date(r))}var _=t.getState();return(r.valueOf()<_.min_date.valueOf()||!n&&r.valueOf()>=_.max_date.valueOf())&&(s=new Date(_.min_date)),s},nextMonthSlot:function(r,d,n){var s,_;return(s=this.addMonthDate(r.start_date,d,n)).setHours(t.config.first_hour),(_=new Date(s)).setHours(t.config.last_hour),{start_date:s,end_date:_}},_alignTimeSlot:function(r,d,n,s){for(var _=new Date(d);_.valueOf()r.valueOf()&&(_=t.date.add(_,-s,n)),_},nextTimelineSlot:function(r,d,n){var s=t.getState(),_=t.matrix[s.mode],a=this._alignTimeSlot(r.start_date,t.date[_.name+"_start"](new Date(r.start_date)),_.x_unit,_.x_step),o=this._alignTimeSlot(r.end_date,t.date[_.name+"_start"](new Date(r.end_date)),_.x_unit,_.x_step);o.valueOf()<=a.valueOf()&&(o=t.date.add(a,_.x_step,_.x_unit));var l=this.clone(r);switch(l.start_date=a,l.end_date=o,l.section=r.section||this._getNextSection(),d){case"up":l.section=this._getNextSection(r.section,-1);break;case"down":l.section=this._getNextSection(r.section,1);break;case"left":l.start_date=this.findVisibleColumn(t.date.add(l.start_date,-_.x_step,_.x_unit),-1),l.end_date=t.date.add(l.start_date,_.x_step,_.x_unit);break;case"right":l.start_date=this.findVisibleColumn(t.date.add(l.start_date,_.x_step,_.x_unit),1),l.end_date=t.date.add(l.start_date,_.x_step,_.x_unit)}return(l.start_date.valueOf()=s.max_date.valueOf())&&(n&&l.start_date.valueOf()>=s.max_date.valueOf()?l.start_date=new Date(s.max_date):(l.start_date=t.date[s.mode+"_start"](t.date.add(s.date,d=="left"?-1:1,s.mode)),l.end_date=t.date.add(l.start_date,_.x_step,_.x_unit))),l},nextUnitsSlot:function(r,d,n){var s=this.clone(r);s.section=r.section||this._getNextSection();var _=r.section||this._getNextSection(),a=t.getState(),o=t._props[a.mode];switch(d){case"left":_=this._getNextSection(r.section,-1);var l=o.size?o.size-1:o.options.length;o.days>1&&o.order[_]==l-1&&t.date.add(r.start_date,-1,"day").valueOf()>=a.min_date.valueOf()&&(s=this.nextDaySlot(r,d,n));break;case"right":_=this._getNextSection(r.section,1),o.days>1&&!o.order[_]&&t.date.add(r.start_date,1,"day").valueOf()=_||!d&&!n&&(!s&&a==24||s==a)},isInVisibleDayTime:function(r,d){return this.isBeforeLastHour(r,d)&&this.isAfterFirstHour(r,d)},nextDaySlot:function(r,d,n){var s,_,a=t.config.key_nav_step,o=this._alignTimeSlot(r.start_date,t.date.day_start(new Date(r.start_date)),"minute",a),l=r.start_date;switch(d){case"up":if(s=t.date.add(o,-a,"minute"),!this.isInVisibleDayTime(s,!0)&&(!n||this.isInVisibleDayTime(l,!0))){var h=!0;n&&t.date.date_part(new Date(s)).valueOf()!=t.date.date_part(new Date(l)).valueOf()&&(h=!1),h&&(s=this.findVisibleColumn(t.date.add(r.start_date,-1,"day"),-1)),s.setHours(t.config.last_hour),s.setMinutes(0),s=t.date.add(s,-a,"minute")}_=t.date.add(s,a,"minute");break;case"down":s=t.date.add(o,a,"minute");var m=n?s:t.date.add(s,a,"minute");this.isInVisibleDayTime(m,!1)||n&&!this.isInVisibleDayTime(l,!1)||(n?(h=!0,t.date.date_part(new Date(l)).valueOf()==l.valueOf()&&(h=!1),h&&(s=this.findVisibleColumn(t.date.add(r.start_date,1,"day"),1)),s.setHours(t.config.first_hour),s.setMinutes(0),s=t.date.add(s,a,"minute")):((s=this.findVisibleColumn(t.date.add(r.start_date,1,"day"),1)).setHours(t.config.first_hour),s.setMinutes(0))),_=t.date.add(s,a,"minute");break;case"left":s=this._moveDate(r.start_date,-1),_=this._moveDate(r.end_date,-1);break;case"right":s=this._moveDate(r.start_date,1),_=this._moveDate(r.end_date,1);break;default:s=o,_=t.date.add(s,a,"minute")}return{start_date:s,end_date:_}},nextWeekAgendaSlot:function(r,d){var n,s,_=t.getState();switch(d){case"down":case"left":n=t.date.day_start(t.date.add(r.start_date,-1,"day")),n=this.findVisibleColumn(n,-1);break;case"up":case"right":n=t.date.day_start(t.date.add(r.start_date,1,"day")),n=this.findVisibleColumn(n,1);break;default:n=t.date.day_start(r.start_date)}return(r.start_date.valueOf()<_.min_date.valueOf()||r.start_date.valueOf()>=_.max_date.valueOf())&&(n=new Date(_.min_date)),(s=new Date(n)).setHours(t.config.last_hour),{start_date:n,end_date:s}},nextAgendaSlot:function(r,d){return{start_date:r.start_date,end_date:r.end_date}},isDateVisible:function(r){if(!t._ignores_detected)return!0;var d,n=t.matrix&&t.matrix[t.getState().mode];return d=n?t._get_date_index(n,r):t.locate_holder_day(r),!t._ignores[d]},findVisibleColumn:function(r,d){var n=r;d=d||1;for(var s=t.getState();!this.isDateVisible(n)&&(d>0&&n.valueOf()<=s.max_date.valueOf()||d<0&&n.valueOf()>=s.min_date.valueOf());)n=this.nextDateColumn(n,d);return n},nextDateColumn:function(r,d){d=d||1;var n=t.matrix&&t.matrix[t.getState().mode];return n?t.date.add(r,d*n.x_step,n.x_unit):t.date.day_start(t.date.add(r,d,"day"))},isVisible:function(r,d){if(!t._ignores_detected)return!0;for(var n=new Date(r);n.valueOf()=_.end_date.valueOf()&&(_=this.nextSlot(_,d,n)),t.$keyboardNavigation.TimeSlot.prototype.clone(_)},extendSlot:function(r,d){var n;switch(this._getMode()){case this._modes.units:n=d=="left"||d=="right"?this.nextUnitsSlot(r,d):this.extendUnitsSlot(r,d);break;case this._modes.timeline:n=d=="down"||d=="up"?this.nextTimelineSlot(r,d):this.extendTimelineSlot(r,d);break;case this._modes.year:case this._modes.month:n=this.extendMonthSlot(r,d);break;case this._modes.dayColumns:n=this.extendDaySlot(r,d);break;case this._modes.weekAgenda:n=this.extendWeekAgendaSlot(r,d);break;default:n=r}var s=t.getState();return n.start_date.valueOf()s.max_date.valueOf()&&(n.end_date=this.findVisibleColumn(s.max_date,-1)),t.$keyboardNavigation.TimeSlot.prototype.clone(n)},extendTimelineSlot:function(r,d){return this.extendGenericSlot({left:"start_date",right:"end_date"},r,d,"timeline")},extendWeekAgendaSlot:function(r,d){return this.extendGenericSlot({left:"start_date",right:"end_date"},r,d,"weekAgenda")},extendGenericSlot:function(r,d,n,s){var _,a=d.movingDate;if(a||(a=r[n]),!a||!r[n])return d;if(!n)return t.$keyboardNavigation.TimeSlot.prototype.clone(d);(_=this.nextSlot({start_date:d[a],section:d.section},n,s,!0)).start_date.valueOf()==d.start_date.valueOf()&&(_=this.nextSlot({start_date:_.start_date,section:_.section},n,s,!0)),_.movingDate=a;var o=this.extendSlotDates(d,_,_.movingDate);return o.end_date.valueOf()<=o.start_date.valueOf()&&(_.movingDate=_.movingDate=="end_date"?"start_date":"end_date"),o=this.extendSlotDates(d,_,_.movingDate),_.start_date=o.start_date,_.end_date=o.end_date,_},extendSlotDates:function(r,d,n){var s={start_date:null,end_date:null};return n=="start_date"?(s.start_date=d.start_date,s.end_date=r.end_date):(s.start_date=r.start_date,s.end_date=d.start_date),s},extendMonthSlot:function(r,d){return(r=this.extendGenericSlot({up:"start_date",down:"end_date",left:"start_date",right:"end_date"},r,d,"month")).start_date.setHours(t.config.first_hour),r.end_date=t.date.add(r.end_date,-1,"day"),r.end_date.setHours(t.config.last_hour),r},extendUnitsSlot:function(r,d){var n;switch(d){case"down":case"up":n=this.extendDaySlot(r,d);break;default:n=r}return n.section=r.section,n},extendDaySlot:function(r,d){return this.extendGenericSlot({up:"start_date",down:"end_date",left:"start_date",right:"end_date"},r,d,"dayColumns")},scrollSlot:function(r){var d=t.getState(),n=this.nextSlot(this,r);(n.start_date.valueOf()=d.max_date.valueOf())&&t.setCurrentView(new Date(n.start_date)),this.moveTo(n)},keys:{left:function(){this.scrollSlot("left")},right:function(){this.scrollSlot("right")},down:function(){this._getMode()==this._modes.list?t.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler():this.scrollSlot("down")},up:function(){this._getMode()==this._modes.list?t.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler():this.scrollSlot("up")},"shift+down":function(){this.moveTo(this.extendSlot(this,"down"))},"shift+up":function(){this.moveTo(this.extendSlot(this,"up"))},"shift+right":function(){this.moveTo(this.extendSlot(this,"right"))},"shift+left":function(){this.moveTo(this.extendSlot(this,"left"))},enter:function(){var r={start_date:new Date(this.start_date),end_date:new Date(this.end_date)},d=t.getState().mode;t.matrix&&t.matrix[d]?r[t.matrix[t.getState().mode].y_property]=this.section:t._props&&t._props[d]&&(r[t._props[d].map_to]=this.section),t.addEventNow(r)}}}),t.$keyboardNavigation.TimeSlot.prototype.bindAll(t.$keyboardNavigation.TimeSlot.prototype.keys)}(e),function(t){t.$keyboardNavigation.MinicalButton=function(r,d){this.container=r,this.index=d||0},t.$keyboardNavigation.MinicalButton.prototype=t._compose(t.$keyboardNavigation.KeyNavNode,{isValid:function(){return!!this.container.offsetWidth},fallback:function(){var r=new t.$keyboardNavigation.TimeSlot;return r.isValid()?r:new t.$keyboardNavigation.DataArea},focus:function(){t.$keyboardNavigation.dispatcher.globalNode.disable(),this.container.removeAttribute("tabindex"),t.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this)},blur:function(){this.container.setAttribute("tabindex","0"),t.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this)},getNode:function(){return this.index?this.container.querySelector(".dhx_cal_next_button"):this.container.querySelector(".dhx_cal_prev_button")},keys:{right:function(r){this.moveTo(new t.$keyboardNavigation.MinicalButton(this.container,this.index?0:1))},left:function(r){this.moveTo(new t.$keyboardNavigation.MinicalButton(this.container,this.index?0:1))},down:function(){var r=new t.$keyboardNavigation.MinicalCell(this.container,0,0);r&&!r.isValid()&&(r=r.fallback()),this.moveTo(r)},enter:function(r){this.getNode().click()}}}),t.$keyboardNavigation.MinicalButton.prototype.bindAll(t.$keyboardNavigation.MinicalButton.prototype.keys)}(e),function(t){t.$keyboardNavigation.MinicalCell=function(r,d,n){this.container=r,this.row=d||0,this.col=n||0},t.$keyboardNavigation.MinicalCell.prototype=t._compose(t.$keyboardNavigation.KeyNavNode,{isValid:function(){var r=this._getGrid();return!(!r[this.row]||!r[this.row][this.col])},fallback:function(){var r=this.row,d=this.col,n=this._getGrid();n[r]||(r=0);var s=!0;if(r>n.length/2&&(s=!1),!n[r]){var _=new t.$keyboardNavigation.TimeSlot;return _.isValid()?_:new t.$keyboardNavigation.DataArea}if(s){for(var a=d;n[r]&&a-1||l.indexOf("dhx_before")>-1||l.indexOf("dhx_scale_ignore")>-1)&&(o=!1),d[n][_]=o}}return d},keys:{right:function(r){var d=this._getGrid(),n=this.row,s=this.col+1;d[n]&&d[n][s]||(d[n+1]?(n+=1,s=0):s=this.col);var _=new t.$keyboardNavigation.MinicalCell(this.container,n,s);_.isValid()||(_=_.fallback()),this.moveTo(_)},left:function(r){var d=this._getGrid(),n=this.row,s=this.col-1;d[n]&&d[n][s]||(s=d[n-1]?d[n-=1].length-1:this.col);var _=new t.$keyboardNavigation.MinicalCell(this.container,n,s);_.isValid()||(_=_.fallback()),this.moveTo(_)},down:function(){var r=this._getGrid(),d=this.row+1,n=this.col;r[d]&&r[d][n]||(d=this.row);var s=new t.$keyboardNavigation.MinicalCell(this.container,d,n);s.isValid()||(s=s.fallback()),this.moveTo(s)},up:function(){var r=this._getGrid(),d=this.row-1,n=this.col;if(r[d]&&r[d][n]){var s=new t.$keyboardNavigation.MinicalCell(this.container,d,n);s.isValid()||(s=s.fallback()),this.moveTo(s)}else{var _=0;this.col>r[this.row].length/2&&(_=1),this.moveTo(new t.$keyboardNavigation.MinicalButton(this.container,_))}},enter:function(r){this.getNode().querySelector(".dhx_month_head").click()}}}),t.$keyboardNavigation.MinicalCell.prototype.bindAll(t.$keyboardNavigation.MinicalCell.prototype.keys)}(e),function(t){t.$keyboardNavigation.DataArea=function(r){this.index=r||0},t.$keyboardNavigation.DataArea.prototype=t._compose(t.$keyboardNavigation.KeyNavNode,{getNode:function(r){return t.$container.querySelector(".dhx_cal_data")},_handlers:null,isValid:function(){return!0},fallback:function(){return this},keys:{"up,down,right,left":function(){this.moveTo(new t.$keyboardNavigation.TimeSlot)}}}),t.$keyboardNavigation.DataArea.prototype.bindAll(t.$keyboardNavigation.DataArea.prototype.keys)}(e),Na(e),function(t){t.$keyboardNavigation.dispatcher={isActive:!1,activeNode:null,globalNode:new t.$keyboardNavigation.SchedulerNode,keepScrollPosition:function(r){var d,n,s=t.$container.querySelector(".dhx_timeline_scrollable_data");s||(s=t.$container.querySelector(".dhx_cal_data")),s&&(d=s.scrollTop,n=s.scrollLeft),r(),s&&(s.scrollTop=d,s.scrollLeft=n)},enable:function(){if(t.$container){this.isActive=!0;var r=this;this.keepScrollPosition(function(){r.globalNode.enable(),r.setActiveNode(r.getActiveNode())})}},disable:function(){this.isActive=!1,this.globalNode.disable()},isEnabled:function(){return!!this.isActive},getDefaultNode:function(){return this.globalNode.getDefaultNode()},setDefaultNode:function(){this.setActiveNode(this.getDefaultNode())},getActiveNode:function(){var r=this.activeNode;return r&&!r.isValid()&&(r=r.fallback()),r},focusGlobalNode:function(){this.blurNode(this.globalNode),this.focusNode(this.globalNode)},setActiveNode:function(r){r&&r.isValid()&&(this.activeNode&&this.activeNode.compareTo(r)||this.isEnabled()&&(this.blurNode(this.activeNode),this.activeNode=r,this.focusNode(this.activeNode)))},focusNode:function(r){r&&r.focus&&(r.focus(),r.getNode&&document.activeElement!=r.getNode()&&this.setActiveNode(new t.$keyboardNavigation.DataArea))},blurNode:function(r){r&&r.blur&&r.blur()},getInlineEditor:function(r){var d=t.$container.querySelector(".dhx_cal_editor["+t.config.event_attribute+"='"+r+"'] textarea");return d&&d.offsetWidth?d:null},keyDownHandler:function(r){if(!r.defaultPrevented){var d=this.getActiveNode();if((!t.$keyboardNavigation.isModal()||d&&d.container&&t.utils.dom.locateCss({target:d.container},"dhx_minical_popup",!1))&&(!t.getState().editor_id||!this.getInlineEditor(t.getState().editor_id))&&this.isEnabled()){r=r||window.event;var n=this.globalNode,s=t.$keyboardNavigation.shortcuts.getCommandFromEvent(r);d?d.findHandler(s)?d.doAction(s,r):n.findHandler(s)&&n.doAction(s,r):this.setDefaultNode()}}},_timeout:null,delay:function(r,d){clearTimeout(this._timeout),this._timeout=setTimeout(r,d||1)}}}(e),Ta(e),function(){Aa(e),function(_){_.$keyboardNavigation._minicalendars=[],_.$keyboardNavigation.isMinical=function(a){for(var o=_.$keyboardNavigation._minicalendars,l=0;l=e.config.collision_limit}),e.addEvent=function(t,r,d,n,s){var _=t;arguments.length!=1&&((_=s||{}).start_date=t,_.end_date=r,_.text=d,_.id=n,_.layer=this.defaultLayer),_.id=_.id||e.uid(),_.text=_.text||"",typeof _.start_date=="string"&&(_.start_date=this.templates.api_date(_.start_date)),typeof _.end_date=="string"&&(_.end_date=this.templates.api_date(_.end_date)),_._timed=this.isOneDayEvent(_);var a=!this._events[_.id];this._events[_.id]=_,this.event_updated(_),this._loading||this.callEvent(a?"onEventAdded":"onEventChanged",[_.id,_])},this._evs_layer={};for(var i=0;i_.getHours()&&(_.setHours(a),t=_.valueOf()),r=t+s}n.start_date=n.start_date||_,n.end_date=n.end_date||new Date(r),n.text=n.text||this.locale.labels.new_event,n.id=this._drag_id=this.uid(),n.layer=this.defaultLayer,this._drag_mode="new-size",this._loading=!0,this.addEvent(n),this.callEvent("onEventCreated",[this._drag_id,d]),this._loading=!1,this._drag_event={},this._on_mouse_up(d)},e._t_render_view_data=function(t){if(this.config.multi_day&&!this._table_view){for(var r=[],d=[],n=0;n';return k+='
 
',k+='
'+a+"
",k+='
'+o+"
",k+='
',m.innerHTML=k,m.style.zIndex=100,m.firstChild},e.render_event_bar=function(t){var r=this._els.dhx_cal_data[0],d=this._colsS[t._sday],n=this._colsS[t._eday];n==d&&(n=this._colsS[t._eday+1]);var s=this.xy.bar_height,_=this._colsS.heights[t._sweek]+(this._colsS.height?this.xy.month_scale_height+2:2)+t._sorder*s,a=document.createElement("div"),o=t._timed?"dhx_cal_event_clear":"dhx_cal_event_line",l=e.templates["event_class_"+t.layer]?e.templates["event_class_"+t.layer](t.start_date,t.end_date,t):e.templates.event_class(t.start_date,t.end_date,t);l&&(o=o+" "+l);var h='
';t._timed&&(h+=e.templates["event_bar_date_"+t.layer]?e.templates["event_bar_date_"+t.layer](t.start_date,t.end_date,t):e.templates.event_bar_date(t.start_date,t.end_date,t)),h+=e.templates["event_bar_text_"+t.layer]?e.templates["event_bar_text_"+t.layer](t.start_date,t.end_date,t):e.templates.event_bar_text(t.start_date,t.end_date,t)+"
)",h+="",a.innerHTML=h,this._rendered.push(a.firstChild),r.appendChild(a.firstChild)},e.render_event=function(t){var r=e.xy.menu_width;if(e.getLayer(t.layer).noMenu&&(r=0),!(t._sday<0)){var d=e.locate_holder(t._sday);if(d){var n=60*t.start_date.getHours()+t.start_date.getMinutes(),s=60*t.end_date.getHours()+t.end_date.getMinutes()||60*e.config.last_hour,_=Math.round((60*n*1e3-60*this.config.first_hour*60*1e3)*this.config.hour_size_px/36e5)%(24*this.config.hour_size_px)+1,a=Math.max(e.xy.min_event_height,(s-n)*this.config.hour_size_px/60)+1,o=Math.floor((d.clientWidth-r)/t._count),l=t._sorder*o+1;t._inner||(o*=t._count-t._sorder);var h=this._render_v_bar(t.id,r+l,_,o,a,t._text_style,e.templates.event_header(t.start_date,t.end_date,t),e.templates.event_text(t.start_date,t.end_date,t));if(this._rendered.push(h),d.appendChild(h),l=l+parseInt(d.style.left,10)+r,_+=this._dy_shift,h.style.zIndex=this._layers_zindex[t.layer],this._edit_id==t.id){h.style.zIndex=parseInt(h.style.zIndex)+1;var m=h.style.zIndex;o=Math.max(o-4,e.xy.editor_width),(h=document.createElement("div")).setAttribute("event_id",t.id),h.setAttribute(this.config.event_attribute,t.id),this.set_xy(h,o,a-20,l,_+14),h.className="dhx_cal_editor",h.style.zIndex=m;var v=document.createElement("div");this.set_xy(v,o-6,a-26),v.style.cssText+=";margin:2px 2px 2px 2px;overflow:hidden;",v.style.zIndex=m,h.appendChild(v),this._els.dhx_cal_data[0].appendChild(h),this._rendered.push(h),v.innerHTML="",this._editor=v.firstChild,this._editor.addEventListener("keypress",function(g){if(g.shiftKey)return!0;var y=g.keyCode;y==e.keys.edit_save&&e.editStop(!0),y==e.keys.edit_cancel&&e.editStop(!1)}),this._editor.addEventListener("selectstart",function(g){return g.cancelBubble=!0,!0}),v.firstChild.focus(),this._els.dhx_cal_data[0].scrollLeft=0,v.firstChild.select()}if(this._select_id==t.id){h.style.zIndex=parseInt(h.style.zIndex)+1;for(var u=this.config["icons_"+(this._edit_id==t.id?"edit":"select")],c="",f=0;f";var p=this._render_v_bar(t.id,l-r+1,_,r,20*u.length+26,"","
",c,!0);p.style.left=l-r+1,p.style.zIndex=h.style.zIndex,this._els.dhx_cal_data[0].appendChild(p),this._rendered.push(p)}}}},e.filter_agenda=function(t,r){var d=e.getLayer(r.layer);return d&&d.visible}})},limit:function(e){e.config.limit_start=null,e.config.limit_end=null,e.config.limit_view=!1,e.config.check_limits=!0,e._temp_limit_scope=function(){var i=null;e.attachEvent("onBeforeViewChange",function(t,r,d,n){function s(_,a){var o=e.config.limit_start,l=e.config.limit_end,h=e.date.add(_,1,a);return _.valueOf()>l.valueOf()||h<=o.valueOf()}return!e.config.limit_view||!s(n=n||r,d=d||t)||r.valueOf()==n.valueOf()||(setTimeout(function(){if(e.$destroyed)return!0;var _=s(r,d)?e.config.limit_start:r;e.setCurrentView(s(_,d)?null:_,d)},1),!1)}),e.attachEvent("onMouseDown",function(t){return t!="dhx_time_block"}),e.attachEvent("onBeforeDrag",function(t){return!t||e.checkLimitViolation(e.getEvent(t))}),e.attachEvent("onClick",function(t,r){return e.checkLimitViolation(e.getEvent(t))}),e.attachEvent("onBeforeLightbox",function(t){var r=e.getEvent(t);return i=[r.start_date,r.end_date],e.checkLimitViolation(r)}),e.attachEvent("onEventSave",function(t,r,d){if(!r.start_date||!r.end_date){var n=e.getEvent(t);r.start_date=new Date(n.start_date),r.end_date=new Date(n.end_date)}if(r.rec_type){var s=e._lame_clone(r);return e._roll_back_dates(s),e.checkLimitViolation(s)}return e.checkLimitViolation(r)}),e.attachEvent("onEventAdded",function(t){if(!t)return!0;var r=e.getEvent(t);return!e.checkLimitViolation(r)&&e.config.limit_start&&e.config.limit_end&&(r.start_date=e.config.limit_end.valueOf()&&(r.start_date=this.date.add(e.config.limit_end,-1,"day")),r.end_date=e.config.limit_end.valueOf()&&(r.end_date=this.date.add(e.config.limit_end,-1,"day")),r.start_date.valueOf()>=r.end_date.valueOf()&&(r.end_date=this.date.add(r.start_date,this.config.event_duration||this.config.time_step,"minute")),r._timed=this.isOneDayEvent(r)),!0}),e.attachEvent("onEventChanged",function(t){if(!t)return!0;var r=e.getEvent(t);if(!e.checkLimitViolation(r)){if(!i)return!1;r.start_date=i[0],r.end_date=i[1],r._timed=this.isOneDayEvent(r)}return!0}),e.attachEvent("onBeforeEventChanged",function(t,r,d){return e.checkLimitViolation(t)}),e.attachEvent("onBeforeEventCreated",function(t){var r=e.getActionData(t).date,d={_timed:!0,start_date:r,end_date:e.date.add(r,e.config.time_step,"minute")};return e.checkLimitViolation(d)}),e.attachEvent("onViewChange",function(){e._mark_now()}),e.attachEvent("onAfterSchedulerResize",function(){return window.setTimeout(function(){if(e.$destroyed)return!0;e._mark_now()},1),!0}),e.attachEvent("onTemplatesReady",function(){e._mark_now_timer=window.setInterval(function(){e._is_initialized()&&e._mark_now()},6e4)}),e.attachEvent("onDestroy",function(){clearInterval(e._mark_now_timer)})},e._temp_limit_scope()},map_view:function(e){let i=null,t=[];const r={googleMap:new Ca(e),openStreetMaps:new Oa(e),mapbox:new La(e)};function d(s){i=s.ext.mapView.createAdapter(),t.push(e.attachEvent("onEventSave",function(_,a,o){let l=e.getEvent(_);return l&&l.event_location!=a.event_location&&(e._eventLocationChanged=!0),!0}),e.attachEvent("onEventChanged",(_,a)=>{const{start_date:o,end_date:l}=a,{min_date:h,max_date:m}=e.getState();return o.valueOf()h.valueOf()&&i&&(e.config.map_settings.resolve_event_location&&a.event_location&&!e._latLngUpdate?n(a,i):i.updateEventMarker(a)),e._latLngUpdate=!1,!0}),e.attachEvent("onEventIdChange",function(_,a){let o=e.getEvent(a);i==null||i.removeEventMarker(_),i==null||i.addEventMarker(o)}),e.attachEvent("onEventAdded",(_,a)=>{const{start_date:o,end_date:l}=a,{min_date:h,max_date:m}=e.getState();o.valueOf()h.valueOf()&&i&&(e.config.map_settings.resolve_event_location&&a.event_location&&e._eventLocationChanged?(n(a,i),e._eventLocationChanged=!1):(i.addEventMarker(a),i.onEventClick(a)))}),e.attachEvent("onClick",function(_,a){const o=e.getEvent(_);return i&&o&&i.onEventClick(o),!1}),e.attachEvent("onBeforeEventDelete",(_,a)=>(i&&i.removeEventMarker(_),!0)))}async function n(s,_){let a=await _.resolveAddress(s.event_location);return s.lat=a.lat,s.lng=a.lng,_.removeEventMarker(String(s.id)),_.addEventMarker(s),s}e.ext||(e.ext={}),e.ext.mapView={createAdapter:function(){return r[e.config.map_view_provider]},createMarker:function(s){return new google.maps.Marker(s)},currentAdapter:null,adapters:r},e._latLngUpdate=!1,e._eventLocationChanged=!1,e.config.map_view_provider="googleMap",e.config.map_settings={initial_position:{lat:48.724,lng:8.215},error_position:{lat:15,lng:15},initial_zoom:1,zoom_after_resolve:15,info_window_max_width:300,resolve_user_location:!0,resolve_event_location:!0,view_provider:"googleMap"},e.config.map_initial_position&&(e.config.map_settings.initial_position={lat:e.config.map_initial_position.lat(),lng:e.config.map_initial_position.lng()}),e.config.map_error_position&&(e.config.map_settings.error_position={lat:e.config.map_error_position.lat(),lng:e.config.map_error_position.lng()}),e.xy.map_date_width=188,e.xy.map_icon_width=25,e.xy.map_description_width=400,e.date.add_map=function(s,_,a){return new Date(s.valueOf())},e.templates.map_date=function(s,_,a){return""},e.templates.map_time=function(s,_,a){return e.config.rtl&&!a._timed?e.templates.day_date(_)+" – "+e.templates.day_date(s):a._timed?this.day_date(a.start_date,a.end_date,a)+" "+this.event_date(s):e.templates.day_date(s)+" – "+e.templates.day_date(_)},e.templates.map_text=function(s,_,a){return a.text},e.templates.map_info_content=function(s){return`
Event's text: ${s.text}
Location: ${s.event_location}
Starts: ${e.templates.tooltip_date_format(s.start_date)}
Ends: ${e.templates.tooltip_date_format(s.end_date)}
-
`},e.date.map_start=function(s){return s},e.dblclick_dhx_map_area=function(s){let _=s.target.closest(`[${e.config.event_attribute}]`);if(_){let a=_.getAttribute(`${e.config.event_attribute}`);e.showLightbox(a)}this.config.readonly||!this.config.dblclick_create||_||this.addEventNow({start_date:e.config.map_start,end_date:e.date.add(e.config.map_start,e.config.time_step,"minute")})},e.attachEvent("onSchedulerReady",function(){e.config.map_initial_zoom!==void 0&&(e.config.map_settings.initial_zoom=e.config.map_initial_zoom),e.config.map_zoom_after_resolve!==void 0&&(e.config.map_settings.zoom_after_resolve=e.config.map_zoom_after_resolve),e.config.map_infowindow_max_width!==void 0&&(e.config.map_settings.info_window_max_width=e.config.map_infowindow_max_width),e.config.map_resolve_user_location!==void 0&&(e.config.map_settings.resolve_user_location=e.config.map_resolve_user_location),e.config.map_view_provider!==void 0&&(e.config.map_settings.view_provider=e.config.map_view_provider),e.config.map_type!==void 0&&(e.config.map_settings.type=e.config.map_type),e.config.map_resolve_event_location!==void 0&&(e.config.map_settings.resolve_event_location=e.config.map_resolve_event_location),e.ext.mapView.currentAdapter=e.config.map_view_provider;let s=document.createElement("div");s.className="mapContainer",s.id="mapContainer",s.style.display="none",s.style.zIndex="1",e._obj.appendChild(s);const _=e.render_data;function a(){let l=e.get_visible_events();l.sort(function(f,c){return f.start_date.valueOf()==c.start_date.valueOf()?f.id>c.id?1:-1:f.start_date>c.start_date?1:-1});let h="
";for(let f=0;f
"+e.templates.map_time(c.start_date,c.end_date,c)+"
",h+=`
+
`},e.date.map_start=function(s){return s},e.dblclick_dhx_map_area=function(s){let _=s.target.closest(`[${e.config.event_attribute}]`);if(_){let a=_.getAttribute(`${e.config.event_attribute}`);e.showLightbox(a)}this.config.readonly||!this.config.dblclick_create||_||this.addEventNow({start_date:e.config.map_start,end_date:e.date.add(e.config.map_start,e.config.time_step,"minute")})},e.attachEvent("onSchedulerReady",function(){e.config.map_initial_zoom!==void 0&&(e.config.map_settings.initial_zoom=e.config.map_initial_zoom),e.config.map_zoom_after_resolve!==void 0&&(e.config.map_settings.zoom_after_resolve=e.config.map_zoom_after_resolve),e.config.map_infowindow_max_width!==void 0&&(e.config.map_settings.info_window_max_width=e.config.map_infowindow_max_width),e.config.map_resolve_user_location!==void 0&&(e.config.map_settings.resolve_user_location=e.config.map_resolve_user_location),e.config.map_view_provider!==void 0&&(e.config.map_settings.view_provider=e.config.map_view_provider),e.config.map_type!==void 0&&(e.config.map_settings.type=e.config.map_type),e.config.map_resolve_event_location!==void 0&&(e.config.map_settings.resolve_event_location=e.config.map_resolve_event_location),e.ext.mapView.currentAdapter=e.config.map_view_provider;let s=document.createElement("div");s.className="mapContainer",s.id="mapContainer",s.style.display="none",s.style.zIndex="1",e._obj.appendChild(s);const _=e.render_data;function a(){let l=e.get_visible_events();l.sort(function(u,c){return u.start_date.valueOf()==c.start_date.valueOf()?u.id>c.id?1:-1:u.start_date>c.start_date?1:-1});let h="
";for(let u=0;u
"+e.templates.map_time(c.start_date,c.end_date,c)+"
",h+=`
-
`,h+="
"+e.templates.map_text(c.start_date,c.end_date,c)+"
"}h+="
",e._els.dhx_cal_data[0].scrollTop=0,e._els.dhx_cal_data[0].innerHTML=h;let v=e._els.dhx_cal_data[0].firstChild.childNodes,u=e._getNavDateElement();u&&(u.innerHTML=e.templates[e._mode+"_date"](e._min_date,e._max_date,e._mode)),e._rendered=[];for(let f=0;fi==null?void 0:i.addEventMarker(u)))}},e.map_view=function(l){e._els.dhx_cal_data[0].style.width=e.xy.map_date_width+e.xy.map_description_width+1+"px",e._min_date=e.config.map_start||e._currentDate(),e._max_date=e.config.map_end||e.date.add(e._currentDate(),1,"year"),e._table_view=!0,function(f){if(f){const c=e.locale.labels;e._els.dhx_cal_header[0].innerHTML="
"+c.date+"
"+c.description+"
",e._table_view=!0,e.set_sizes()}}(l);let h=document.getElementById("mapContainer");var v,u;(function(f){let c=document.getElementById(f);if(c){const p=e.$container.querySelector(".dhx_cal_navline").offsetHeight;let m=e.$container.querySelector(".dhx_cal_data").offsetHeight+e.$container.querySelector(".dhx_cal_header").offsetHeight;m<0&&(m=0);let g=e._x-e.xy.map_date_width-e.xy.map_description_width-1;g<0&&(g=0),c.style.height=m+"px",c.style.width=g+"px",c.style.position="absolute",c.style.top=p+"px",e.config.rtl?c.style.marginRight=e.xy.map_date_width+e.xy.map_description_width+1+"px":c.style.marginLeft=e.xy.map_date_width+e.xy.map_description_width+1+"px",c.style.marginTop=e.xy.nav_height+2+"px"}})("mapContainer"),l&&h?(s.style.display="block",a(),e.config.map_view_provider==e.ext.mapView.currentAdapter?(i==null||i.destroy(h),d(e),i==null||i.initialize(h,e.config.map_settings)):(i==null||i.destroy(h),d(e),i==null||i.initialize(h,e.config.map_settings),e.ext.mapView.currentAdapter=e.config.map_view_provider),i&&(v=e.config.map_settings,u=i,v.resolve_user_location?navigator.geolocation&&navigator.geolocation.getCurrentPosition(function(f){u.setView(f.coords.latitude,f.coords.longitude,v.zoom_after_resolve||v.initial_zoom)}):u.setView(v.initial_position.lat,v.initial_position.lng,v.initial_zoom))):(s.style.display="none",e._els.dhx_cal_data[0].style.width="100%",i&&h&&(i.destroy(h),i=null,e.ext.mapView.currentAdapter=e.config.map_view_provider),t.forEach(f=>e.detachEvent(f)),t=[])},e.attachEvent("onLocationError",function(l){return alert("Location can't be found"),google.maps.LatLng(51.47784,-.001492)});let o=async function(l){if(i){const h=await i.resolveAddress(l.event_location);h.lat&&h.lng?(l.lat=+h.lat,l.lng=+h.lng):(e.callEvent("onLocationError",[l.id]),l.lng=e.config.map_settings.error_position.lng,l.lat=e.config.map_settings.error_position.lat),e._latLngUpdate=!0,e.callEvent("onEventChanged",[l.id,l])}};e._event_resolve_delay=1500,e.attachEvent("onEventLoading",function(l){return l.lat&&l.lng&&(l.lat=+l.lat,l.lng=+l.lng),e.config.map_settings.resolve_event_location&&l.event_location&&!l.lat&&!l.lng&&(e._event_resolve_delay+=1500,function(h,v,u,f){setTimeout(function(){if(e.$destroyed)return!0;let c=h.apply(v,u);return h=v=u=null,c},f||1)}(o,this,[l],e._event_resolve_delay)),!0})})},minical:function(e){const i=e._createDomEventScope();e.config.minicalendar={mark_events:!0},e._synced_minicalendars=[],e.renderCalendar=function(t,r,d){var n=null,s=t.date||e._currentDate();if(typeof s=="string"&&(s=this.templates.api_date(s)),r)n=this._render_calendar(r.parentNode,s,t,r),e.unmarkCalendar(n);else{var _=t.container,a=t.position;if(typeof _=="string"&&(_=document.getElementById(_)),typeof a=="string"&&(a=document.getElementById(a)),a&&a.left===void 0&&a.right===void 0){var o=e.$domHelpers.getOffset(a);a={top:o.top+a.offsetHeight,left:o.left}}_||(_=e._get_def_cont(a)),(n=this._render_calendar(_,s,t)).$_eventAttached||(n.$_eventAttached=!0,i.attach(n,"click",(function(g){var y=g.target||g.srcElement,x=e.$domHelpers;if(x.closest(y,".dhx_month_head")&&!x.closest(y,".dhx_after")&&!x.closest(y,".dhx_before")){var b=x.closest(y,"[data-cell-date]").getAttribute("data-cell-date"),k=e.templates.parse_date(b);e.unmarkCalendar(this),e.markCalendar(this,k,"dhx_calendar_click"),this._last_date=k,this.conf.handler&&this.conf.handler.call(e,k,this)}}).bind(n)))}if(e.config.minicalendar.mark_events)for(var l=e.date.month_start(s),h=e.date.add(l,1,"month"),v=this.getEvents(l,h),u=this["filter_"+this._mode],f={},c=0;c=h.valueOf())););}}return this._markCalendarCurrentDate(n),n.conf=t,t.sync&&!d&&this._synced_minicalendars.push(n),n.conf._on_xle_handler||(n.conf._on_xle_handler=e.attachEvent("onXLE",function(){e.updateCalendar(n,n.conf.date)})),this.config.wai_aria_attributes&&this.config.wai_aria_application_role&&n.setAttribute("role","application"),n},e._get_def_cont=function(t){return this._def_count||(this._def_count=document.createElement("div"),this._def_count.className="dhx_minical_popup",e.event(this._def_count,"click",function(r){r.cancelBubble=!0}),document.body.appendChild(this._def_count)),t.left&&(this._def_count.style.left=t.left+"px"),t.right&&(this._def_count.style.right=t.right+"px"),t.top&&(this._def_count.style.top=t.top+"px"),t.bottom&&(this._def_count.style.bottom=t.bottom+"px"),this._def_count._created=new Date,this._def_count},e._locateCalendar=function(t,r){if(typeof r=="string"&&(r=e.templates.api_date(r)),+r>+t._max_date||+r<+t._min_date)return null;for(var d=t.querySelector(".dhx_year_body").childNodes[0],n=0,s=new Date(t._min_date);+this.date.add(s,1,"week")<=+r;)s=this.date.add(s,1,"week"),n++;var _=e.config.start_on_monday,a=(r.getDay()||(_?7:0))-(_?1:0);const o=d.querySelector(`.dhx_cal_month_row:nth-child(${n+1}) .dhx_cal_month_cell:nth-child(${a+1})`);return o?o.firstChild:null},e.markCalendar=function(t,r,d){var n=this._locateCalendar(t,r);n&&(n.className+=" "+d)},e.unmarkCalendar=function(t,r,d){if(d=d||"dhx_calendar_click",r=r||t._last_date){var n=this._locateCalendar(t,r);n&&(n.className=(n.className||"").replace(RegExp(d,"g")))}},e._week_template=function(t){for(var r=t||250,d=0,n=document.createElement("div"),s=this.date.week_start(e._currentDate()),_=0;_<7;_++)this._cols[_]=Math.floor(r/(7-_)),this._render_x_header(_,d,s,n),s=this.date.add(s,1,"day"),r-=this._cols[_],d+=this._cols[_];return n.lastChild.className+=" dhx_scale_bar_last",n},e.updateCalendar=function(t,r){t.conf.date=r,this.renderCalendar(t.conf,t,!0)},e._mini_cal_arrows=[" "," "],e._render_calendar=function(t,r,d,n){var s=e.templates,_=this._cols;this._cols=[];var a=this._mode;this._mode="calendar";var o=this._colsS;this._colsS={height:0};var l=new Date(this._min_date),h=new Date(this._max_date),v=new Date(e._date),u=s.month_day,f=this._ignores_detected;this._ignores_detected=0,s.month_day=s.calendar_date,r=this.date.month_start(r);var c,p=this._week_template(t.offsetWidth-1-this.config.minicalendar.padding);n?c=n:(c=document.createElement("div")).className="dhx_cal_container dhx_mini_calendar",c.setAttribute("date",this._helpers.formatDate(r)),c.innerHTML="
":"'>")+"
"+(p?p.innerHTML:"")+"
";var m=c.querySelector(".dhx_year_month"),g=c.querySelector(".dhx_year_week"),y=c.querySelector(".dhx_year_body");if(m.innerHTML=this.templates.calendar_month(r),d.navigation)for(var x=function(z,K){var U=e.date.add(z._date,K,"month");e.updateCalendar(z,U),e._date.getMonth()==z._date.getMonth()&&e._date.getFullYear()==z._date.getFullYear()&&e._markCalendarCurrentDate(z)},b=["dhx_cal_prev_button","dhx_cal_next_button"],k=["left:1px;top:4px;position:absolute;","left:auto; right:1px;top:4px;position:absolute;"],E=[-1,1],D=function(z){return function(){if(d.sync)for(var K=e._synced_minicalendars,U=0;U500)&&(t=this._def_count.firstChild),t&&(i.detachAll(),t.innerHTML="",t.parentNode&&t.parentNode.removeChild(t),this._def_count&&(this._def_count.style.top="-1000px"),t.conf&&t.conf._on_xle_handler&&e.detachEvent(t.conf._on_xle_handler))},e.isCalendarVisible=function(){return!!(this._def_count&&parseInt(this._def_count.style.top,10)>0)&&this._def_count},e.attachEvent("onTemplatesReady",function(){e.event(document.body,"click",function(){e.destroyCalendar()})},{once:!0}),e.form_blocks.calendar_time={render:function(t){var r="",d=e.config,n=this.date.date_part(e._currentDate()),s=1440,_=0;d.limit_time_select&&(_=60*d.first_hour,s=60*d.last_hour+1),n.setHours(_/60),t._time_values=[],r+=" ")+"  –  "+r+""},set_value:function(t,r,d,n){var s,_,a=t.getElementsByTagName("input"),o=t.getElementsByTagName("select"),l=function(m,g,y){e.event(m,"click",function(){e.destroyCalendar(null,!0),e.renderCalendar({position:m,date:new Date(this._date),navigation:!0,handler:function(x){m.value=e.templates.calendar_time(x),m._date=new Date(x),e.destroyCalendar(),e.config.event_duration&&e.config.auto_end_date&&y===0&&f()}})})};if(e.config.full_day){if(!t._full_day){var h="";e.config.wide_form||(h=t.previousSibling.innerHTML+h),t.previousSibling.innerHTML=h,t._full_day=!0}var v=t.previousSibling.getElementsByTagName("input")[0],u=e.date.time_part(d.start_date)===0&&e.date.time_part(d.end_date)===0;v.checked=u,o[0].disabled=v.checked,o[1].disabled=v.checked,v.$_eventAttached||(v.$_eventAttached=!0,e.event(v,"click",function(){if(v.checked===!0){var m={};e.form_blocks.calendar_time.get_value(t,m),s=e.date.date_part(m.start_date),(+(_=e.date.date_part(m.end_date))==+s||+_>=+s&&(d.end_date.getHours()!==0||d.end_date.getMinutes()!==0))&&(_=e.date.add(_,1,"day"))}var g=s||d.start_date,y=_||d.end_date;c(a[0],g),c(a[1],y),o[0].value=60*g.getHours()+g.getMinutes(),o[1].value=60*y.getHours()+y.getMinutes(),o[0].disabled=v.checked,o[1].disabled=v.checked}))}if(e.config.event_duration&&e.config.auto_end_date){var f=function(){e.config.auto_end_date&&e.config.event_duration&&(s=e.date.add(a[0]._date,o[0].value,"minute"),_=new Date(s.getTime()+60*e.config.event_duration*1e3),a[1].value=e.templates.calendar_time(_),a[1]._date=e.date.date_part(new Date(_)),o[1].value=60*_.getHours()+_.getMinutes())};o[0].$_eventAttached||o[0].addEventListener("change",f)}function c(m,g,y){l(m,g,y),m.value=e.templates.calendar_time(g),m._date=e.date.date_part(new Date(g))}function p(m){for(var g=n._time_values,y=60*m.getHours()+m.getMinutes(),x=y,b=!1,k=0;k=a.valueOf()))for(var o=d;o.valueOf()o&&e.markCalendar(t,o,"dhx_calendar_click"),o=e.date.add(o,1,"day")},e.attachEvent("onEventCancel",function(){e.destroyCalendar(null,!0)}),e.attachEvent("onDestroy",function(){e.destroyCalendar()})},monthheight:function(e){e.attachEvent("onTemplatesReady",function(){e.xy.scroll_width=0;var i=e.render_view_data;e.render_view_data=function(){var r=this._els.dhx_cal_data[0];r.firstChild._h_fix=!0,i.apply(e,arguments);var d=parseInt(r.style.height);r.style.height="1px",r.style.height=r.scrollHeight+"px",this._obj.style.height=this._obj.clientHeight+r.scrollHeight-d+"px"};var t=e._reset_month_scale;e._reset_month_scale=function(r,d,n,s){var _={clientHeight:100};t.apply(e,[_,d,n,s]),r.innerHTML=_.innerHTML}})},multisection:function(e){_e("Multisection",e.assert)},multiselect:function(e){e.form_blocks.multiselect={render:function(i){var t="dhx_multi_select_control dhx_multi_select_"+i.name;i.vertical&&(t+=" dhx_multi_select_control_vertical");for(var r="
",d=0;d"+i.options[d].label+"";return r+="
"},set_value:function(i,t,r,d){for(var n=i.getElementsByTagName("input"),s=0;s]*>","g"),d=new RegExp("]*>","g");function n(b){return b.replace(d,` -`).replace(r,"")}function s(b,k){b=parseFloat(b),k=parseFloat(k),isNaN(k)||(b-=k);var E=a(b);return b=b-E.width+E.cols*i,isNaN(b)?"auto":100*b/i}function _(b,k,E){b=parseFloat(b),k=parseFloat(k),!isNaN(k)&&E&&(b-=k);var D=a(b);return b=b-D.width+D.cols*i,isNaN(b)?"auto":100*b/(i-(isNaN(k)?0:k))}function a(b){for(var k=0,E=e._els.dhx_cal_header[0].childNodes,D=E[1]?E[1].childNodes:E[0].childNodes,w=0;wM))break;b-=M+1,k+=M+1}return{width:k,cols:w}}function o(b){return b=parseFloat(b),isNaN(b)?"auto":100*b/t}function l(b,k){return(window.getComputedStyle?window.getComputedStyle(b,null)[k]:b.currentStyle?b.currentStyle[k]:null)||""}function h(b,k){for(var E=parseInt(b.style.left,10),D=0;DE)return D;return k}function u(b){return b?"":""}function f(b,k,E,D){var w="<"+b+" profile='"+k+"'";return E&&(w+=" header='"+E+"'"),D&&(w+=" footer='"+D+"'"),w+=">"}function c(){var b="",k=e._mode;if(e.matrix&&e.matrix[e._mode]&&(k=e.matrix[e._mode].render=="cell"?"matrix":"timeline"),b+="",e._mode=="week_agenda")for(var E=e._els.dhx_cal_data[0].getElementsByTagName("DIV"),D=0;D"+n(E[D].innerHTML)+"");else if(e._mode=="agenda"||e._mode=="map")b+=""+n((E=e._els.dhx_cal_header[0].childNodes[0].childNodes)[0].innerHTML)+""+n(E[1].innerHTML)+"";else if(e._mode=="year")for(E=e._els.dhx_cal_data[0].childNodes,D=0;D",b+=m(E[D].querySelector(".dhx_year_week").childNodes),b+=p(E[D].querySelector(".dhx_year_body")),b+="";else{b+="",b+=m(E=e._els.dhx_cal_header[0].childNodes),b+="";var w=e._els.dhx_cal_data[0];if(e.matrix&&e.matrix[e._mode]){for(b+="",D=0;D";b+="",t=w.firstChild.rows[0].cells[0].offsetHeight}else if(w.firstChild.tagName=="TABLE")b+=p(w);else{for(w=w.childNodes[w.childNodes.length-1];w.className.indexOf("dhx_scale_holder")==-1;)w=w.previousSibling;for(w=w.childNodes,b+="",D=0;D";b+="",t=w[0].offsetHeight}}return b+=""}function p(b){for(var k="",E=b.querySelectorAll("tr"),D=0;D",t=S[0].offsetHeight}return k}function m(b){var k,E="";e.matrix&&e.matrix[e._mode]&&(e.matrix[e._mode].second_scale&&(k=b[1].childNodes),b=b[0].childNodes);for(var D=0;D";if(i=b[0].offsetWidth,k){var w=0,S=b[0].offsetWidth,M=1;for(D=0;D",(w+=k[D].offsetWidth)>=S&&(S+=b[M]?b[M].offsetWidth:0,M++),i=k[0].offsetWidth}return E}function g(b){var k="",E=e._rendered,D=e.matrix&&e.matrix[e._mode];if(e._mode=="agenda"||e._mode=="map")for(var w=0;w";else if(e._mode=="week_agenda")for(w=0;w"+n(E[w].innerHTML)+"";else if(e._mode=="year")for(E=e.get_visible_events(),w=0;w",(S=e.date.add(S,1,"day")).valueOf()>=e._max_date.valueOf())break}}else if(D&&D.render=="cell")for(E=e._els.dhx_cal_data[0].getElementsByTagName("TD"),w=0;w";else for(w=0;w",U=="event"?(k+="
",A=b?l(E[w].childNodes[2],"color"):"",k+=""):(A=b?l(E[w],"color"):"",k+=""),k+=""}}}}return k}function y(b,k,E,D,w,S){var M=!1;D=="fullcolor"&&(M=!0,D="color"),D=D||"color";var N,A="";if(b){var T=e._date,H=e._mode;k=e.date[E+"_start"](k),k=e.date["get_"+E+"_end"]?e.date["get_"+E+"_end"](k):e.date.add(k,1,E),A=f("pages",D,w,S);for(var $=new Date(b);+$<+k;$=this.date.add($,1,E))this.setCurrentView($,E),A+=((N="page")?"<"+N+">":"")+c().replace("–","-")+g(M)+u("page");A+=u("pages"),this.setCurrentView(T,H)}else A=f("data",D,w,S)+c().replace("–","-")+g(M)+u("data");return A}function x(b,k,E,D,w,S,M){(function(N,A){var T=e.uid(),H=document.createElement("div");H.style.display="none",document.body.appendChild(H),H.innerHTML='
',document.getElementById(T).firstChild.value=encodeURIComponent(N),document.getElementById(T).submit(),H.parentNode.removeChild(H)})(typeof w=="object"?function(N){for(var A="",T=0;Te._x/2?1:0,dy:s+d.offsetHeight/2>e._y/2?1:0,width:d.offsetWidth,height:d.offsetHeight}:0}e.attachEvent("onSchedulerReady",function(){const d=e.$container;d._$quickInfoHandler||(d._$quickInfoHandler=!0,e.event(d,"mousedown",function(n){const s=n.target.closest(`[${e.config.event_attribute}]`);s&&(i={id:s.getAttribute(e.config.event_attribute),position:r(s)})}),e.attachEvent("onDestroy",()=>{delete d._$quickInfoHandler}))}),e.attachEvent("onClick",function(d){if(e.config.show_quick_info)return e.showQuickInfo(d),!0}),function(){for(var d=["onEmptyClick","onViewChange","onLightbox","onBeforeEventDelete","onBeforeDrag"],n=function(){return e.hideQuickInfo(!0),!0},s=0;swindow.innerWidth&&(a=window.innerWidth-s),a=Math.max(0,a),n.style.left=a+"px",n.style.top=d.top-(d.dy?_:-d.height)+"px"}else{const o=e.$container.querySelector(".dhx_cal_data").offsetTop;n.style.top=o+20+"px",d.dx==1?(n.style.right="auto",n.style.left=-s+"px",setTimeout(function(){n.style.left="-10px"},1)):(n.style.left="auto",n.style.right=-s+"px",setTimeout(function(){n.style.right="-10px"},1)),n.className=n.className.replace(" dhx_qi_left","").replace(" dhx_qi_right","")+" dhx_qi_"+(d.dx==1?"left":"right")}n.ontransitionend=()=>{t(n),n.ontransitionend=null},setTimeout(()=>{t(n)},1)},e.attachEvent("onTemplatesReady",function(){if(e.hideQuickInfo(),this._quick_info_box){var d=this._quick_info_box;d.parentNode&&d.parentNode.removeChild(d),this._quick_info_box=null}}),e._quick_info_onscroll_handler=function(d){e.hideQuickInfo()},e._init_quick_info=function(){if(!this._quick_info_box){var d=this._quick_info_box=document.createElement("div");this._waiAria.quickInfoAttr(d),d.className="dhx_cal_quick_info",e.$testmode&&(d.className+=" dhx_no_animate"),e.config.rtl&&(d.className+=" dhx_quick_info_rtl");var n=` + `,h+="
"+e.templates.map_text(c.start_date,c.end_date,c)+"
"}h+="
",e._els.dhx_cal_data[0].scrollTop=0,e._els.dhx_cal_data[0].innerHTML=h;let m=e._els.dhx_cal_data[0].firstChild.childNodes,v=e._getNavDateElement();v&&(v.innerHTML=e.templates[e._mode+"_date"](e._min_date,e._max_date,e._mode)),e._rendered=[];for(let u=0;ui==null?void 0:i.addEventMarker(v)))}},e.map_view=function(l){e._els.dhx_cal_data[0].style.width=e.xy.map_date_width+e.xy.map_description_width+1+"px",e._min_date=e.config.map_start||e._currentDate(),e._max_date=e.config.map_end||e.date.add(e._currentDate(),1,"year"),e._table_view=!0,function(u){if(u){const c=e.locale.labels;e._els.dhx_cal_header[0].innerHTML="
"+c.date+"
"+c.description+"
",e._table_view=!0,e.set_sizes()}}(l);let h=document.getElementById("mapContainer");var m,v;(function(u){let c=document.getElementById(u);if(c){const f=e.$container.querySelector(".dhx_cal_navline").offsetHeight;let p=e.$container.querySelector(".dhx_cal_data").offsetHeight+e.$container.querySelector(".dhx_cal_header").offsetHeight;p<0&&(p=0);let g=e._x-e.xy.map_date_width-e.xy.map_description_width-1;g<0&&(g=0),c.style.height=p+"px",c.style.width=g+"px",c.style.position="absolute",c.style.top=f+"px",e.config.rtl?c.style.marginRight=e.xy.map_date_width+e.xy.map_description_width+1+"px":c.style.marginLeft=e.xy.map_date_width+e.xy.map_description_width+1+"px",c.style.marginTop=e.xy.nav_height+2+"px"}})("mapContainer"),l&&h?(s.style.display="block",a(),e.config.map_view_provider==e.ext.mapView.currentAdapter?(i==null||i.destroy(h),d(e),i==null||i.initialize(h,e.config.map_settings)):(i==null||i.destroy(h),d(e),i==null||i.initialize(h,e.config.map_settings),e.ext.mapView.currentAdapter=e.config.map_view_provider),i&&(m=e.config.map_settings,v=i,m.resolve_user_location?navigator.geolocation&&navigator.geolocation.getCurrentPosition(function(u){v.setView(u.coords.latitude,u.coords.longitude,m.zoom_after_resolve||m.initial_zoom)}):v.setView(m.initial_position.lat,m.initial_position.lng,m.initial_zoom))):(s.style.display="none",e._els.dhx_cal_data[0].style.width="100%",i&&h&&(i.destroy(h),i=null,e.ext.mapView.currentAdapter=e.config.map_view_provider),t.forEach(u=>e.detachEvent(u)),t=[])},e.attachEvent("onLocationError",function(l){return alert("Location can't be found"),google.maps.LatLng(51.47784,-.001492)});let o=async function(l){if(i){const h=await i.resolveAddress(l.event_location);h.lat&&h.lng?(l.lat=+h.lat,l.lng=+h.lng):(e.callEvent("onLocationError",[l.id]),l.lng=e.config.map_settings.error_position.lng,l.lat=e.config.map_settings.error_position.lat),e._latLngUpdate=!0,e.callEvent("onEventChanged",[l.id,l])}};e._event_resolve_delay=1500,e.attachEvent("onEventLoading",function(l){return l.lat&&l.lng&&(l.lat=+l.lat,l.lng=+l.lng),e.config.map_settings.resolve_event_location&&l.event_location&&!l.lat&&!l.lng&&(e._event_resolve_delay+=1500,function(h,m,v,u){setTimeout(function(){if(e.$destroyed)return!0;let c=h.apply(m,v);return h=m=v=null,c},u||1)}(o,this,[l],e._event_resolve_delay)),!0})})},minical:function(e){const i=e._createDomEventScope();e.config.minicalendar={mark_events:!0},e._synced_minicalendars=[],e.renderCalendar=function(t,r,d){var n=null,s=t.date||e._currentDate();if(typeof s=="string"&&(s=this.templates.api_date(s)),r)n=this._render_calendar(r.parentNode,s,t,r),e.unmarkCalendar(n);else{var _=t.container,a=t.position;if(typeof _=="string"&&(_=document.getElementById(_)),typeof a=="string"&&(a=document.getElementById(a)),a&&a.left===void 0&&a.right===void 0){var o=e.$domHelpers.getOffset(a);a={top:o.top+a.offsetHeight,left:o.left}}_||(_=e._get_def_cont(a)),(n=this._render_calendar(_,s,t)).$_eventAttached||(n.$_eventAttached=!0,i.attach(n,"click",(function(g){var y=g.target||g.srcElement,x=e.$domHelpers;if(x.closest(y,".dhx_month_head")&&!x.closest(y,".dhx_after")&&!x.closest(y,".dhx_before")){var b=x.closest(y,"[data-cell-date]").getAttribute("data-cell-date"),k=e.templates.parse_date(b);e.unmarkCalendar(this),e.markCalendar(this,k,"dhx_calendar_click"),this._last_date=k,this.conf.handler&&this.conf.handler.call(e,k,this)}}).bind(n)))}if(e.config.minicalendar.mark_events)for(var l=e.date.month_start(s),h=e.date.add(l,1,"month"),m=this.getEvents(l,h),v=this["filter_"+this._mode],u={},c=0;c=h.valueOf())););}}return this._markCalendarCurrentDate(n),n.conf=t,t.sync&&!d&&this._synced_minicalendars.push(n),n.conf._on_xle_handler||(n.conf._on_xle_handler=e.attachEvent("onXLE",function(){e.updateCalendar(n,n.conf.date)})),this.config.wai_aria_attributes&&this.config.wai_aria_application_role&&n.setAttribute("role","application"),n},e._get_def_cont=function(t){return this._def_count||(this._def_count=document.createElement("div"),this._def_count.className="dhx_minical_popup",e.event(this._def_count,"click",function(r){r.cancelBubble=!0}),document.body.appendChild(this._def_count)),t.left&&(this._def_count.style.left=t.left+"px"),t.right&&(this._def_count.style.right=t.right+"px"),t.top&&(this._def_count.style.top=t.top+"px"),t.bottom&&(this._def_count.style.bottom=t.bottom+"px"),this._def_count._created=new Date,this._def_count},e._locateCalendar=function(t,r){if(typeof r=="string"&&(r=e.templates.api_date(r)),+r>+t._max_date||+r<+t._min_date)return null;for(var d=t.querySelector(".dhx_year_body").childNodes[0],n=0,s=new Date(t._min_date);+this.date.add(s,1,"week")<=+r;)s=this.date.add(s,1,"week"),n++;var _=e.config.start_on_monday,a=(r.getDay()||(_?7:0))-(_?1:0);const o=d.querySelector(`.dhx_cal_month_row:nth-child(${n+1}) .dhx_cal_month_cell:nth-child(${a+1})`);return o?o.firstChild:null},e.markCalendar=function(t,r,d){var n=this._locateCalendar(t,r);n&&(n.className+=" "+d)},e.unmarkCalendar=function(t,r,d){if(d=d||"dhx_calendar_click",r=r||t._last_date){var n=this._locateCalendar(t,r);n&&(n.className=(n.className||"").replace(RegExp(d,"g")))}},e._week_template=function(t){for(var r=t||250,d=0,n=document.createElement("div"),s=this.date.week_start(e._currentDate()),_=0;_<7;_++)this._cols[_]=Math.floor(r/(7-_)),this._render_x_header(_,d,s,n),s=this.date.add(s,1,"day"),r-=this._cols[_],d+=this._cols[_];return n.lastChild.className+=" dhx_scale_bar_last",n},e.updateCalendar=function(t,r){t.conf.date=r,this.renderCalendar(t.conf,t,!0)},e._mini_cal_arrows=[" "," "],e._render_calendar=function(t,r,d,n){var s=e.templates,_=this._cols;this._cols=[];var a=this._mode;this._mode="calendar";var o=this._colsS;this._colsS={height:0};var l=new Date(this._min_date),h=new Date(this._max_date),m=new Date(e._date),v=s.month_day,u=this._ignores_detected;this._ignores_detected=0,s.month_day=s.calendar_date,r=this.date.month_start(r);var c,f=this._week_template(t.offsetWidth-1-this.config.minicalendar.padding);n?c=n:(c=document.createElement("div")).className="dhx_cal_container dhx_mini_calendar",c.setAttribute("date",this._helpers.formatDate(r)),c.innerHTML="
":"'>")+"
"+(f?f.innerHTML:"")+"
";var p=c.querySelector(".dhx_year_month"),g=c.querySelector(".dhx_year_week"),y=c.querySelector(".dhx_year_body");if(p.innerHTML=this.templates.calendar_month(r),d.navigation)for(var x=function(z,K){var U=e.date.add(z._date,K,"month");e.updateCalendar(z,U),e._date.getMonth()==z._date.getMonth()&&e._date.getFullYear()==z._date.getFullYear()&&e._markCalendarCurrentDate(z)},b=["dhx_cal_prev_button","dhx_cal_next_button"],k=["left:1px;top:4px;position:absolute;","left:auto; right:1px;top:4px;position:absolute;"],w=[-1,1],D=function(z){return function(){if(d.sync)for(var K=e._synced_minicalendars,U=0;U500)&&(t=this._def_count.firstChild),t&&(i.detachAll(),t.innerHTML="",t.parentNode&&t.parentNode.removeChild(t),this._def_count&&(this._def_count.style.top="-1000px"),t.conf&&t.conf._on_xle_handler&&e.detachEvent(t.conf._on_xle_handler))},e.isCalendarVisible=function(){return!!(this._def_count&&parseInt(this._def_count.style.top,10)>0)&&this._def_count},e.attachEvent("onTemplatesReady",function(){e.event(document.body,"click",function(){e.destroyCalendar()})},{once:!0}),e.form_blocks.calendar_time={render:function(t){var r="",d=e.config,n=this.date.date_part(e._currentDate()),s=1440,_=0;d.limit_time_select&&(_=60*d.first_hour,s=60*d.last_hour+1),n.setHours(_/60),t._time_values=[],r+=" ")+"  –  "+r+""},set_value:function(t,r,d,n){var s,_,a=t.getElementsByTagName("input"),o=t.getElementsByTagName("select"),l=function(p,g,y){e.event(p,"click",function(){e.destroyCalendar(null,!0),e.renderCalendar({position:p,date:new Date(this._date),navigation:!0,handler:function(x){p.value=e.templates.calendar_time(x),p._date=new Date(x),e.destroyCalendar(),e.config.event_duration&&e.config.auto_end_date&&y===0&&u()}})})};if(e.config.full_day){if(!t._full_day){var h="";e.config.wide_form||(h=t.previousSibling.innerHTML+h),t.previousSibling.innerHTML=h,t._full_day=!0}var m=t.previousSibling.getElementsByTagName("input")[0],v=e.date.time_part(d.start_date)===0&&e.date.time_part(d.end_date)===0;m.checked=v,o[0].disabled=m.checked,o[1].disabled=m.checked,m.$_eventAttached||(m.$_eventAttached=!0,e.event(m,"click",function(){if(m.checked===!0){var p={};e.form_blocks.calendar_time.get_value(t,p),s=e.date.date_part(p.start_date),(+(_=e.date.date_part(p.end_date))==+s||+_>=+s&&(d.end_date.getHours()!==0||d.end_date.getMinutes()!==0))&&(_=e.date.add(_,1,"day"))}else s=null,_=null;var g=s||d.start_date,y=_||d.end_date;c(a[0],g),c(a[1],y),o[0].value=60*g.getHours()+g.getMinutes(),o[1].value=60*y.getHours()+y.getMinutes(),o[0].disabled=m.checked,o[1].disabled=m.checked}))}if(e.config.event_duration&&e.config.auto_end_date){var u=function(){e.config.auto_end_date&&e.config.event_duration&&(s=e.date.add(a[0]._date,o[0].value,"minute"),_=new Date(s.getTime()+60*e.config.event_duration*1e3),a[1].value=e.templates.calendar_time(_),a[1]._date=e.date.date_part(new Date(_)),o[1].value=60*_.getHours()+_.getMinutes())};o[0].$_eventAttached||o[0].addEventListener("change",u)}function c(p,g,y){l(p,g,y),p.value=e.templates.calendar_time(g),p._date=e.date.date_part(new Date(g))}function f(p){for(var g=n._time_values,y=60*p.getHours()+p.getMinutes(),x=y,b=!1,k=0;k=a.valueOf()))for(var o=d;o.valueOf()o&&e.markCalendar(t,o,"dhx_calendar_click"),o=e.date.add(o,1,"day")},e.attachEvent("onEventCancel",function(){e.destroyCalendar(null,!0)}),e.attachEvent("onDestroy",function(){e.destroyCalendar()})},monthheight:function(e){e.attachEvent("onTemplatesReady",function(){e.xy.scroll_width=0;var i=e.render_view_data;e.render_view_data=function(){var r=this._els.dhx_cal_data[0];r.firstChild._h_fix=!0,i.apply(e,arguments);var d=parseInt(r.style.height);r.style.height="1px",r.style.height=r.scrollHeight+"px",this._obj.style.height=this._obj.clientHeight+r.scrollHeight-d+"px"};var t=e._reset_month_scale;e._reset_month_scale=function(r,d,n,s){var _={clientHeight:100};t.apply(e,[_,d,n,s]),r.innerHTML=_.innerHTML}})},multisection:function(e){_e("Multisection",e.assert)},multiselect:function(e){e.form_blocks.multiselect={render:function(i){var t="dhx_multi_select_control dhx_multi_select_"+i.name;i.vertical&&(t+=" dhx_multi_select_control_vertical");for(var r="
",d=0;d"+i.options[d].label+"";return r+="
"},set_value:function(i,t,r,d){for(var n=i.getElementsByTagName("input"),s=0;s]*>","g"),d=new RegExp("]*>","g");function n(b){return b.replace(d,` +`).replace(r,"")}function s(b,k){b=parseFloat(b),k=parseFloat(k),isNaN(k)||(b-=k);var w=a(b);return b=b-w.width+w.cols*i,isNaN(b)?"auto":100*b/i}function _(b,k,w){b=parseFloat(b),k=parseFloat(k),!isNaN(k)&&w&&(b-=k);var D=a(b);return b=b-D.width+D.cols*i,isNaN(b)?"auto":100*b/(i-(isNaN(k)?0:k))}function a(b){for(var k=0,w=e._els.dhx_cal_header[0].childNodes,D=w[1]?w[1].childNodes:w[0].childNodes,E=0;EM))break;b-=M+1,k+=M+1}return{width:k,cols:E}}function o(b){return b=parseFloat(b),isNaN(b)?"auto":100*b/t}function l(b,k){return(window.getComputedStyle?window.getComputedStyle(b,null)[k]:b.currentStyle?b.currentStyle[k]:null)||""}function h(b,k){for(var w=parseInt(b.style.left,10),D=0;Dw)return D;return k}function v(b){return b?"":""}function u(b,k,w,D){var E="<"+b+" profile='"+k+"'";return w&&(E+=" header='"+w+"'"),D&&(E+=" footer='"+D+"'"),E+=">"}function c(){var b="",k=e._mode;if(e.matrix&&e.matrix[e._mode]&&(k=e.matrix[e._mode].render=="cell"?"matrix":"timeline"),b+="",e._mode=="week_agenda")for(var w=e._els.dhx_cal_data[0].getElementsByTagName("DIV"),D=0;D"+n(w[D].innerHTML)+"");else if(e._mode=="agenda"||e._mode=="map")b+=""+n((w=e._els.dhx_cal_header[0].childNodes[0].childNodes)[0].innerHTML)+""+n(w[1].innerHTML)+"";else if(e._mode=="year")for(w=e._els.dhx_cal_data[0].childNodes,D=0;D",b+=p(w[D].querySelector(".dhx_year_week").childNodes),b+=f(w[D].querySelector(".dhx_year_body")),b+="";else{b+="",b+=p(w=e._els.dhx_cal_header[0].childNodes),b+="";var E=e._els.dhx_cal_data[0];if(e.matrix&&e.matrix[e._mode]){for(b+="",D=0;D";b+="",t=E.firstChild.rows[0].cells[0].offsetHeight}else if(E.firstChild.tagName=="TABLE")b+=f(E);else{for(E=E.childNodes[E.childNodes.length-1];E.className.indexOf("dhx_scale_holder")==-1;)E=E.previousSibling;for(E=E.childNodes,b+="",D=0;D";b+="",t=E[0].offsetHeight}}return b+=""}function f(b){for(var k="",w=b.querySelectorAll("tr"),D=0;D",t=S[0].offsetHeight}return k}function p(b){var k,w="";e.matrix&&e.matrix[e._mode]&&(e.matrix[e._mode].second_scale&&(k=b[1].childNodes),b=b[0].childNodes);for(var D=0;D";if(i=b[0].offsetWidth,k){var E=0,S=b[0].offsetWidth,M=1;for(D=0;D",(E+=k[D].offsetWidth)>=S&&(S+=b[M]?b[M].offsetWidth:0,M++),i=k[0].offsetWidth}return w}function g(b){var k="",w=e._rendered,D=e.matrix&&e.matrix[e._mode];if(e._mode=="agenda"||e._mode=="map")for(var E=0;E";else if(e._mode=="week_agenda")for(E=0;E"+n(w[E].innerHTML)+"";else if(e._mode=="year")for(w=e.get_visible_events(),E=0;E",(S=e.date.add(S,1,"day")).valueOf()>=e._max_date.valueOf())break}}else if(D&&D.render=="cell")for(w=e._els.dhx_cal_data[0].getElementsByTagName("TD"),E=0;E";else for(E=0;E",U=="event"?(k+="
",T=b?l(w[E].childNodes[2],"color"):"",k+=""):(T=b?l(w[E],"color"):"",k+=""),k+=""}}}}return k}function y(b,k,w,D,E,S){var M=!1;D=="fullcolor"&&(M=!0,D="color"),D=D||"color";var N,T="";if(b){var A=e._date,H=e._mode;k=e.date[w+"_start"](k),k=e.date["get_"+w+"_end"]?e.date["get_"+w+"_end"](k):e.date.add(k,1,w),T=u("pages",D,E,S);for(var $=new Date(b);+$<+k;$=this.date.add($,1,w))this.setCurrentView($,w),T+=((N="page")?"<"+N+">":"")+c().replace("–","-")+g(M)+v("page");T+=v("pages"),this.setCurrentView(A,H)}else T=u("data",D,E,S)+c().replace("–","-")+g(M)+v("data");return T}function x(b,k,w,D,E,S,M){(function(N,T){var A=e.uid(),H=document.createElement("div");H.style.display="none",document.body.appendChild(H),H.innerHTML='
',document.getElementById(A).firstChild.value=encodeURIComponent(N),document.getElementById(A).submit(),H.parentNode.removeChild(H)})(typeof E=="object"?function(N){for(var T="",A=0;Ae._x/2?1:0,dy:s+d.offsetHeight/2>e._y/2?1:0,width:d.offsetWidth,height:d.offsetHeight}:0}e.attachEvent("onSchedulerReady",function(){const d=e.$container;d._$quickInfoHandler||(d._$quickInfoHandler=!0,e.event(d,"mousedown",function(n){const s=n.target.closest(`[${e.config.event_attribute}]`);s&&(i={id:s.getAttribute(e.config.event_attribute),position:r(s)})}),e.attachEvent("onDestroy",()=>{delete d._$quickInfoHandler}))}),e.attachEvent("onClick",function(d){if(e.config.show_quick_info)return e.showQuickInfo(d),!0}),function(){for(var d=["onEmptyClick","onViewChange","onLightbox","onBeforeEventDelete","onBeforeDrag"],n=function(){return e.hideQuickInfo(!0),!0},s=0;swindow.innerWidth&&(a=window.innerWidth-s),a=Math.max(0,a),n.style.left=a+"px",n.style.top=d.top-(d.dy?_:-d.height)+"px"}else{const o=e.$container.querySelector(".dhx_cal_data").offsetTop;n.style.top=o+20+"px",d.dx==1?(n.style.right="auto",n.style.left=-s+"px",setTimeout(function(){n.style.left="-10px"},1)):(n.style.left="auto",n.style.right=-s+"px",setTimeout(function(){n.style.right="-10px"},1)),n.className=n.className.replace(" dhx_qi_left","").replace(" dhx_qi_right","")+" dhx_qi_"+(d.dx==1?"left":"right")}n.ontransitionend=()=>{t(n),n.ontransitionend=null},setTimeout(()=>{t(n)},1)},e.attachEvent("onTemplatesReady",function(){if(e.hideQuickInfo(),this._quick_info_box){var d=this._quick_info_box;d.parentNode&&d.parentNode.removeChild(d),this._quick_info_box=null}}),e._quick_info_onscroll_handler=function(d){e.hideQuickInfo()},e._init_quick_info=function(){if(!this._quick_info_box){var d=this._quick_info_box=document.createElement("div");this._waiAria.quickInfoAttr(d),d.className="dhx_cal_quick_info",e.$testmode&&(d.className+=" dhx_no_animate"),e.config.rtl&&(d.className+=" dhx_quick_info_rtl");var n=`
@@ -78,38 +86,38 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`)},a.exportToPNG=function(){
`;n+='
';for(var s=e.config.icons_select,_=0;_ -
${e.locale.labels[s[_]]}
`;n+="",d.innerHTML=n,e.event(d,"click",function(a){e._qi_button_click(a.target||a.srcElement)}),e.config.quick_info_detached&&(e._detachDomEvent(e._els.dhx_cal_data[0],"scroll",e._quick_info_onscroll_handler),e.event(e._els.dhx_cal_data[0],"scroll",e._quick_info_onscroll_handler))}return this._quick_info_box},e._qi_button_click=function(d){var n=e._quick_info_box;if(d&&d!=n)if(d.closest(".dhx_cal_qi_close_btn"))e.hideQuickInfo();else{var s=e._getClassName(d);if(s.indexOf("_icon")!=-1){var _=e._quick_info_box_id;e._click.buttons[s.split(" ")[1].replace("icon_","")](_)}else e._qi_button_click(d.parentNode)}},e._get_event_counter_part=function(d){return r(e.getRenderedEvent(d))},e._fill_quick_data=function(d){var n=e.getEvent(d),s=e._quick_info_box;e._quick_info_box_id=d;var _={content:e.templates.quick_info_title(n.start_date,n.end_date,n),date:e.templates.quick_info_date(n.start_date,n.end_date,n)};s.querySelector(".dhx_cal_qi_tcontent").innerHTML=`${_.content}`,s.querySelector(".dhx_cal_qi_tdate").innerHTML=_.date,e._waiAria.quickInfoHeader(s,[_.content,_.date].join(" "));var a=s.querySelector(".dhx_cal_qi_content");const o=e.templates.quick_info_content(n.start_date,n.end_date,n);o?(a.classList.remove("dhx_hidden"),a.innerHTML=o):a.classList.add("dhx_hidden")}},readonly:function(e){e.attachEvent("onTemplatesReady",function(){var i;e.form_blocks.recurring&&(i=e.form_blocks.recurring.set_value);var t=e.config.buttons_left.slice(),r=e.config.buttons_right.slice();function d(_,a,o,l){for(var h=a.getElementsByTagName(_),v=o.getElementsByTagName(_),u=v.length-1;u>=0;u--)if(o=v[u],l){var f=document.createElement("span");f.className="dhx_text_disabled",f.innerHTML=l(h[u]),o.parentNode.insertBefore(f,o),o.parentNode.removeChild(o)}else o.disabled=!0,a.checked&&(o.checked=!0)}e.attachEvent("onBeforeLightbox",function(_){this.config.readonly_form||this.getEvent(_).readonly?this.config.readonly_active=!0:(this.config.readonly_active=!1,e.config.buttons_left=t.slice(),e.config.buttons_right=r.slice(),e.form_blocks.recurring&&(e.form_blocks.recurring.set_value=i));var a=this.config.lightbox.sections;if(this.config.readonly_active){for(var o=0;o{const N=new Date(M);return N.setHours(u.start_date.getHours()),N.setMinutes(u.start_date.getMinutes()),N.setSeconds(u.start_date.getSeconds()),N});let w=0;const S=u.duration;for(let M=0;M=g);M++){const N=D[M];let A=x[N.valueOf()];if(A){if(A.deleted)continue;w++,f.push(A)}else{const T=e._copy_event(u);if(T.text=u.text,T.start_date=N,T.id=u.id+"#"+Math.ceil(N.valueOf()),T.end_date=new Date(N.valueOf()+1e3*S),T.end_date=e._fix_daylight_saving_date(T.start_date,T.end_date,u,N,T.end_date),T._timed=e.isOneDayEvent(T),!T._timed&&!e._table_view&&!e.config.multi_day)continue;f.push(T),c||(e._events[T.id]=T,e._rec_temp.push(T)),w++}}if(x&&D.length==0)for(let M in x){let N=x[M];if(N){if(N.deleted)continue;p&&m&&N.start_datep&&f.push(N)}}},e._fix_daylight_saving_date=function(u,f,c,p,m){var g=u.getTimezoneOffset()-f.getTimezoneOffset();return g?g>0?new Date(p.valueOf()+1e3*c.duration-60*g*1e3):new Date(f.valueOf()-60*g*1e3):new Date(m.valueOf())},e.getRecDates=function(u,f){var c=typeof u=="object"?u:e.getEvent(u),p=[];if(f=f||100,!t(c))return[{start_date:c.start_date,end_date:c.end_date}];if(c.deleted)return[];e.repeat_date(c,p,!0,c.start_date,c.end_date,f);for(var m=[],g=0;gu)if(t(g)){var y=[];this.repeat_date(g,y,!0,u,f,void 0,p),y.forEach(function(x){x.start_dateu&&c.push(x)})}else this._is_virtual_event(g.id)||c.push(g);else u||f||this._is_virtual_event(g.id)||c.push(g)}return c},e._copy_dummy=function(u){var f=new Date(this.start_date),c=new Date(this.end_date);this.start_date=f,this.end_date=c,this.duration=this.rrule=null},e.config.include_end_by=!1,e.config.lightbox_recurring="ask",e.config.recurring_workdays=[C.MO.weekday,C.TU.weekday,C.WE.weekday,C.TH.weekday,C.FR.weekday],e.config.repeat_date="%m.%d.%Y",e.config.lightbox.sections=[{name:"description",map_to:"text",type:"textarea",focus:!0},{name:"recurring",type:"recurring",map_to:"rec_type"},{name:"time",height:72,type:"time",map_to:"auto"}],e.attachEvent("onClearAll",function(){e._rec_markers={},e._rec_markers_pull={},e._rec_temp=[]});const _={0:"SU",1:"MO",2:"TU",3:"WE",4:"TH",5:"FR",6:"SA"},a={0:1,1:2,2:3,3:4,4:5,5:6,6:0};function o(u){switch(u){case 1:case 31:return`${u}st`;case 2:return`${u}nd`;case 3:return`${u}rd`;default:return`${u}th`}}e.templates.repeat_monthly_date=function(u,f){return`Every ${o(u.getDate())}`},e.templates.repeat_monthly_weekday=function(u,f){const c=s(u);return`Every ${o(c.dayNumber)} ${e.locale.date.day_full[c.dayOfWeek]}`},e.templates.repeat_yearly_month_date=function(u,f){const c=u.getDate(),p=e.locale.date.month_full[u.getMonth()];return`Every ${o(c)} day of ${p}`},e.templates.repeat_yearly_month_weekday=function(u,f){const c=s(u),p=e.locale.date.month_full[u.getMonth()];return`Every ${o(c.dayNumber)} ${e.locale.date.day_full[c.dayOfWeek]} of ${p}`};const l={MONTHLY:function(u){return{rrule:{freq:C.MONTHLY,interval:1,bymonthday:u.start.getDate()},until:new Date(9999,1,1)}},WEEKLY:function(u){let f=u.start.getDay()-1;return f==-1&&(f=6),{rrule:{freq:C.WEEKLY,interval:1,byweekday:[f]},until:new Date(9999,1,1)}},DAILY:function(u){return{rrule:{freq:C.DAILY,interval:1},until:new Date(9999,1,1)}},YEARLY:function(u){return{rrule:{freq:C.YEARLY,bymonth:u.start.getMonth()+1,interval:1,bymonthday:u.start.getDate()},until:new Date(9999,1,1)}},WORKDAYS:function(u){return{rrule:{freq:C.WEEKLY,interval:1,byweekday:e.config.recurring_workdays},until:new Date(9999,1,1)}},CUSTOM:function(u,f){const c={},p=f.querySelector('[name="repeat_interval_unit"]').value,m=Math.max(1,f.querySelector('[name="repeat_interval_value"]').value),g=f.querySelector('[name="dhx_custom_month_option"]').value,y=f.querySelector('[name="dhx_custom_year_option"]').value;let x,b;switch(c.interval=m,p){case"DAILY":c.freq=C.DAILY;break;case"WEEKLY":c.freq=C.WEEKLY,x=[],f.querySelectorAll('.dhx_form_repeat_custom_week [name="week_day"]').forEach(w=>{w.checked&&x.push(w.value)}),c.byweekday=x.map(w=>{switch(w){case"MO":return C.MO.weekday;case"TU":return C.TU.weekday;case"WE":return C.WE.weekday;case"TH":return C.TH.weekday;case"FR":return C.FR.weekday;case"SA":return C.SA.weekday;case"SU":return C.SU.weekday}});break;case"MONTHLY":c.freq=C.MONTHLY,g==="month_date"?c.bymonthday=u.start.getDate():(b=u.start.getDay()-1,b==-1&&(b=6),c.byweekday=[b],c.bysetpos=s(u.start).dayNumber);break;case"YEARLY":c.freq=C.YEARLY,c.bymonth=u.start.getMonth()+1,y=="month_date"?c.bymonthday=u.start.getDate():(b=u.start.getDay()-1,b==-1&&(b=6),c.byweekday=[b],c.bysetpos=s(u.start).dayNumber)}const k=e.date.str_to_date("%Y-%m-%d");let E=new Date(9999,1,1);const D=f.querySelector('[name="dhx_custom_repeat_ends"]');return D.value==="ON"?E=k(f.querySelector('[name="dhx_form_repeat_ends_ondate"]').value):D.value==="AFTER"&&(c.count=Math.max(1,f.querySelector('[name="dhx_form_repeat_ends_after"]').value)),{rrule:c,until:E}},NEVER:function(){}};function h(u,f,c){(function(p,m){p.querySelector("[name='repeat_interval_value']").value=(m?m.interval:1)||1})(u,f),function(p,m,g){if(p.querySelector("[name='repeat_interval_value']").value=(m?m.interval:1)||1,p.querySelectorAll(".dhx_form_repeat_custom_week input").forEach(y=>y.checked=!1),m&&m.byweekday)m.byweekday.forEach(y=>{const x=a[y.weekday],b=_[x];p.querySelector(`.dhx_form_repeat_custom_week input[value="${b}"]`).checked=!0});else{const y=_[g.start_date.getDay()];p.querySelector(`.dhx_form_repeat_custom_week input[value="${y}"]`).checked=!0}}(u,f,c),function(p,m,g){p.querySelector("[name='repeat_interval_value']").value=(m?m.interval:1)||1;const y=p.querySelector('.dhx_form_repeat_custom_month [value="month_date"]'),x=p.querySelector('.dhx_form_repeat_custom_month [value="month_nth_weekday"]');y.innerText=e.templates.repeat_monthly_date(g.start_date,g),x.innerText=e.templates.repeat_monthly_weekday(g.start_date,g),m&&(!m.bysetpos||m.byweekday&&m.byweekday.length)?p.querySelector('[name="dhx_custom_month_option"]').value="month_nth_weekday":p.querySelector('[name="dhx_custom_month_option"]').value="month_date"}(u,f,c),function(p,m,g){const y=p.querySelector('.dhx_form_repeat_custom_year [value="month_date"]'),x=p.querySelector('.dhx_form_repeat_custom_year [value="month_nth_weekday"]');y.innerText=e.templates.repeat_yearly_month_date(g.start_date,g),x.innerText=e.templates.repeat_yearly_month_weekday(g.start_date,g),m&&(!m.bysetpos||m.byweekday&&m.byweekday.length)?p.querySelector('[name="dhx_custom_year_option"]').value="month_nth_weekday":p.querySelector('[name="dhx_custom_year_option"]').value="month_date"}(u,f,c),function(p,m,g){const y=p.querySelector('.dhx_form_repeat_ends_extra [name="dhx_form_repeat_ends_after"]'),x=p.querySelector('.dhx_form_repeat_ends_extra [name="dhx_form_repeat_ends_ondate"]'),b=p.querySelector("[name='dhx_custom_repeat_ends']");y.value=1;let k=e.date.date_to_str("%Y-%m-%d");e.config.repeat_date_of_end||(e.config.repeat_date_of_end=k(e.date.add(e._currentDate(),30,"day"))),x.value=e.config.repeat_date_of_end,m&&m.count?(b.value="AFTER",y.value=m.count):g._end_date&&g._end_date.getFullYear()!==9999?(b.value="ON",x.value=k(g._end_date)):b.value="NEVER",b.dispatchEvent(new Event("change"))}(u,f,c)}function v(u){for(let f=0;f +
${e.locale.labels[s[_]]}
`;n+="",d.innerHTML=n,e.event(d,"click",function(a){e._qi_button_click(a.target||a.srcElement)}),e.config.quick_info_detached&&(e._detachDomEvent(e._els.dhx_cal_data[0],"scroll",e._quick_info_onscroll_handler),e.event(e._els.dhx_cal_data[0],"scroll",e._quick_info_onscroll_handler))}return this._quick_info_box},e._qi_button_click=function(d){var n=e._quick_info_box;if(d&&d!=n)if(d.closest(".dhx_cal_qi_close_btn"))e.hideQuickInfo();else{var s=e._getClassName(d);if(s.indexOf("_icon")!=-1){var _=e._quick_info_box_id;e._click.buttons[s.split(" ")[1].replace("icon_","")](_)}else e._qi_button_click(d.parentNode)}},e._get_event_counter_part=function(d){return r(e.getRenderedEvent(d))},e._fill_quick_data=function(d){var n=e.getEvent(d),s=e._quick_info_box;e._quick_info_box_id=d;var _={content:e.templates.quick_info_title(n.start_date,n.end_date,n),date:e.templates.quick_info_date(n.start_date,n.end_date,n)};s.querySelector(".dhx_cal_qi_tcontent").innerHTML=`${_.content}`,s.querySelector(".dhx_cal_qi_tdate").innerHTML=_.date,e._waiAria.quickInfoHeader(s,[_.content,_.date].join(" "));var a=s.querySelector(".dhx_cal_qi_content");const o=e.templates.quick_info_content(n.start_date,n.end_date,n);o?(a.classList.remove("dhx_hidden"),a.innerHTML=o):a.classList.add("dhx_hidden")}},readonly:function(e){e.attachEvent("onTemplatesReady",function(){var i;e.form_blocks.recurring&&(i=e.form_blocks.recurring.set_value);var t=e.config.buttons_left.slice(),r=e.config.buttons_right.slice();function d(_,a,o,l){for(var h=a.getElementsByTagName(_),m=o.getElementsByTagName(_),v=m.length-1;v>=0;v--)if(o=m[v],l){var u=document.createElement("span");u.className="dhx_text_disabled",u.innerHTML=l(h[v]),o.parentNode.insertBefore(u,o),o.parentNode.removeChild(o)}else o.disabled=!0,a.checked&&(o.checked=!0)}e.attachEvent("onBeforeLightbox",function(_){this.config.readonly_form||this.getEvent(_).readonly?this.config.readonly_active=!0:(this.config.readonly_active=!1,e.config.buttons_left=t.slice(),e.config.buttons_right=r.slice(),e.form_blocks.recurring&&(e.form_blocks.recurring.set_value=i));var a=this.config.lightbox.sections;if(this.config.readonly_active){for(var o=0;o{const N=(T=M,new Date(T.getUTCFullYear(),T.getUTCMonth(),T.getUTCDate(),T.getUTCHours(),T.getUTCMinutes(),T.getUTCSeconds()));var T;return N.setHours(u.start_date.getHours()),N.setMinutes(u.start_date.getMinutes()),N.setSeconds(u.start_date.getSeconds()),N});let E=0;const S=u.duration;for(let M=0;M=y);M++){const N=D[M];let T=b[N.valueOf()];if(T){if(T.deleted)continue;E++,c.push(T)}else{const A=e._copy_event(u);if(A.text=u.text,A.start_date=N,A.id=u.id+"#"+Math.ceil(N.valueOf()),A.end_date=new Date(N.valueOf()+1e3*S),A.end_date=e._fix_daylight_saving_date(A.start_date,A.end_date,u,N,A.end_date),A._timed=e.isOneDayEvent(A),!A._timed&&!e._table_view&&!e.config.multi_day)continue;c.push(A),f||(e._events[A.id]=A,e._rec_temp.push(A)),E++}}if(b&&D.length==0)for(let M in b){let N=b[M];if(N){if(N.deleted)continue;p&&g&&N.start_datep&&c.push(N)}}},e._fix_daylight_saving_date=function(u,c,f,p,g){var y=u.getTimezoneOffset()-c.getTimezoneOffset();return y?y>0?new Date(p.valueOf()+1e3*f.duration-60*y*1e3):new Date(c.valueOf()-60*y*1e3):new Date(g.valueOf())},e.getRecDates=function(u,c){var f=typeof u=="object"?u:e.getEvent(u),p=[];if(c=c||100,!t(f))return[{start_date:f.start_date,end_date:f.end_date}];if(f.deleted)return[];e.repeat_date(f,p,!0,f.start_date,f.end_date,c);for(var g=[],y=0;yu)if(t(y)){var x=[];this.repeat_date(y,x,!0,u,c,void 0,p),x.forEach(function(b){b.start_dateu&&f.push(b)})}else this._is_virtual_event(y.id)||f.push(y);else u||c||this._is_virtual_event(y.id)||f.push(y)}return f},e._copy_dummy=function(u){var c=new Date(this.start_date),f=new Date(this.end_date);this.start_date=c,this.end_date=f,this.duration=this.rrule=null},e.config.include_end_by=!1,e.config.lightbox_recurring="ask",e.config.recurring_workdays=[C.MO.weekday,C.TU.weekday,C.WE.weekday,C.TH.weekday,C.FR.weekday],e.config.repeat_date="%m.%d.%Y",e.config.lightbox.sections=[{name:"description",map_to:"text",type:"textarea",focus:!0},{name:"recurring",type:"recurring",map_to:"rec_type"},{name:"time",height:72,type:"time",map_to:"auto"}],e.attachEvent("onClearAll",function(){e._rec_markers={},e._rec_markers_pull={},e._rec_temp=[]});const a={0:"SU",1:"MO",2:"TU",3:"WE",4:"TH",5:"FR",6:"SA"},o={0:1,1:2,2:3,3:4,4:5,5:6,6:0};function l(u){switch(u){case 1:case 31:return`${u}st`;case 2:return`${u}nd`;case 3:return`${u}rd`;default:return`${u}th`}}e.templates.repeat_monthly_date=function(u,c){return`Every ${l(u.getDate())}`},e.templates.repeat_monthly_weekday=function(u,c){const f=_(u);return`Every ${l(f.dayNumber)} ${e.locale.date.day_full[f.dayOfWeek]}`},e.templates.repeat_yearly_month_date=function(u,c){const f=u.getDate(),p=e.locale.date.month_full[u.getMonth()];return`Every ${l(f)} day of ${p}`},e.templates.repeat_yearly_month_weekday=function(u,c){const f=_(u),p=e.locale.date.month_full[u.getMonth()];return`Every ${l(f.dayNumber)} ${e.locale.date.day_full[f.dayOfWeek]} of ${p}`};const h={MONTHLY:function(u){return{rrule:{freq:C.MONTHLY,interval:1,bymonthday:u.start.getDate()},until:new Date(9999,1,1)}},WEEKLY:function(u){let c=u.start.getDay()-1;return c==-1&&(c=6),{rrule:{freq:C.WEEKLY,interval:1,byweekday:[c]},until:new Date(9999,1,1)}},DAILY:function(u){return{rrule:{freq:C.DAILY,interval:1},until:new Date(9999,1,1)}},YEARLY:function(u){return{rrule:{freq:C.YEARLY,bymonth:u.start.getMonth()+1,interval:1,bymonthday:u.start.getDate()},until:new Date(9999,1,1)}},WORKDAYS:function(u){return{rrule:{freq:C.WEEKLY,interval:1,byweekday:e.config.recurring_workdays},until:new Date(9999,1,1)}},CUSTOM:function(u,c){const f={},p=c.querySelector('[name="repeat_interval_unit"]').value,g=Math.max(1,c.querySelector('[name="repeat_interval_value"]').value),y=c.querySelector('[name="dhx_custom_month_option"]').value,x=c.querySelector('[name="dhx_custom_year_option"]').value;let b,k;switch(f.interval=g,p){case"DAILY":f.freq=C.DAILY;break;case"WEEKLY":f.freq=C.WEEKLY,b=[],c.querySelectorAll('.dhx_form_repeat_custom_week [name="week_day"]').forEach(S=>{S.checked&&b.push(S.value)}),f.byweekday=b.map(S=>{switch(S){case"MO":return C.MO.weekday;case"TU":return C.TU.weekday;case"WE":return C.WE.weekday;case"TH":return C.TH.weekday;case"FR":return C.FR.weekday;case"SA":return C.SA.weekday;case"SU":return C.SU.weekday}});break;case"MONTHLY":f.freq=C.MONTHLY,y==="month_date"?f.bymonthday=u.start.getDate():(k=u.start.getDay()-1,k==-1&&(k=6),f.byweekday=[k],f.bysetpos=_(u.start).dayNumber);break;case"YEARLY":f.freq=C.YEARLY,f.bymonth=u.start.getMonth()+1,x=="month_date"?f.bymonthday=u.start.getDate():(k=u.start.getDay()-1,k==-1&&(k=6),f.byweekday=[k],f.bysetpos=_(u.start).dayNumber)}const w=e.date.str_to_date("%Y-%m-%d");let D=new Date(9999,1,1);const E=c.querySelector('[name="dhx_custom_repeat_ends"]');return E.value==="ON"?D=w(c.querySelector('[name="dhx_form_repeat_ends_ondate"]').value):E.value==="AFTER"&&(f.count=Math.max(1,c.querySelector('[name="dhx_form_repeat_ends_after"]').value)),{rrule:f,until:D}},NEVER:function(){}};function m(u,c,f){(function(p,g){p.querySelector("[name='repeat_interval_value']").value=(g?g.interval:1)||1})(u,c),function(p,g,y){if(p.querySelector("[name='repeat_interval_value']").value=(g?g.interval:1)||1,p.querySelectorAll(".dhx_form_repeat_custom_week input").forEach(x=>x.checked=!1),g&&g.byweekday)g.byweekday.forEach(x=>{const b=o[x.weekday],k=a[b];p.querySelector(`.dhx_form_repeat_custom_week input[value="${k}"]`).checked=!0});else{const x=a[y.start_date.getDay()];p.querySelector(`.dhx_form_repeat_custom_week input[value="${x}"]`).checked=!0}}(u,c,f),function(p,g,y){p.querySelector("[name='repeat_interval_value']").value=(g?g.interval:1)||1;const x=p.querySelector('.dhx_form_repeat_custom_month [value="month_date"]'),b=p.querySelector('.dhx_form_repeat_custom_month [value="month_nth_weekday"]');x.innerText=e.templates.repeat_monthly_date(y.start_date,y),b.innerText=e.templates.repeat_monthly_weekday(y.start_date,y),g&&(!g.bysetpos||g.byweekday&&g.byweekday.length)?p.querySelector('[name="dhx_custom_month_option"]').value="month_nth_weekday":p.querySelector('[name="dhx_custom_month_option"]').value="month_date"}(u,c,f),function(p,g,y){const x=p.querySelector('.dhx_form_repeat_custom_year [value="month_date"]'),b=p.querySelector('.dhx_form_repeat_custom_year [value="month_nth_weekday"]');x.innerText=e.templates.repeat_yearly_month_date(y.start_date,y),b.innerText=e.templates.repeat_yearly_month_weekday(y.start_date,y),g&&(!g.bysetpos||g.byweekday&&g.byweekday.length)?p.querySelector('[name="dhx_custom_year_option"]').value="month_nth_weekday":p.querySelector('[name="dhx_custom_year_option"]').value="month_date"}(u,c,f),function(p,g,y){const x=p.querySelector('.dhx_form_repeat_ends_extra [name="dhx_form_repeat_ends_after"]'),b=p.querySelector('.dhx_form_repeat_ends_extra [name="dhx_form_repeat_ends_ondate"]'),k=p.querySelector("[name='dhx_custom_repeat_ends']");x.value=1;let w=e.date.date_to_str("%Y-%m-%d");e.config.repeat_date_of_end||(e.config.repeat_date_of_end=w(e.date.add(e._currentDate(),30,"day"))),b.value=e.config.repeat_date_of_end,g&&g.count?(k.value="AFTER",x.value=g.count):y._end_date&&y._end_date.getFullYear()!==9999?(k.value="ON",b.value=w(y._end_date)):k.value="NEVER",k.dispatchEvent(new Event("change"))}(u,c,f)}function v(u){for(let c=0;c
- - - - - - - + + + + + + +
@@ -128,16 +136,16 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`)},a.exportToPNG=function(){
-
${f.repeat_ends}
+
${c.repeat_ends}
- +
@@ -147,16 +155,16 @@ https://docs.dhtmlx.com/scheduler/minicalendar.html`)},a.exportToPNG=function(){
-
`},_init_set_value:function(u,f,c){function p(g){g.classList.add("dhx_hidden")}function m(g){g.classList.remove("dhx_hidden")}e.form_blocks.recurring._ds={start:c.start_date,end:c.end_date},u.querySelector(".dhx_form_repeat_pattern select").addEventListener("change",function(){(function(g){const y=u.querySelector(".dhx_form_repeat_custom");g==="CUSTOM"?m(y):p(y)})(this.value)}),u.querySelector(".dhx_form_repeat_custom_interval [name='repeat_interval_unit']").addEventListener("change",function(){(function(g){const y={weekly:u.querySelector(".dhx_form_repeat_custom_week"),monthly:u.querySelector(".dhx_form_repeat_custom_month"),yearly:u.querySelector(".dhx_form_repeat_custom_year")};switch(g){case"DAILY":p(y.weekly),p(y.monthly),p(y.yearly);break;case"WEEKLY":m(y.weekly),p(y.monthly),p(y.yearly);break;case"MONTHLY":p(y.weekly),m(y.monthly),p(y.yearly);break;case"YEARLY":p(y.weekly),p(y.monthly),m(y.yearly)}})(this.value)}),u.querySelector(".dhx_form_repeat_ends [name='dhx_custom_repeat_ends']").addEventListener("change",function(){(function(g){const y={after:u.querySelector(".dhx_form_repeat_ends_extra .dhx_form_repeat_ends_after"),on:u.querySelector(".dhx_form_repeat_ends_extra .dhx_form_repeat_ends_on")};switch(g){case"NEVER":p(y.after),p(y.on);break;case"AFTER":m(y.after),p(y.on);break;case"ON":p(y.after),m(y.on)}})(this.value)}),e._lightbox._rec_init_done=!0},button_click:function(){},set_value:function(u,f,c){let p=e.form_blocks.recurring;e._lightbox._rec_init_done||p._init_set_value(u,f,c),u.open=!c.rrule,u.blocked=this._is_modified_occurence(c);let m=p._ds;if(m.start=c.start_date,m.end=c._end_date,c.rrule){const g=Me(c.rrule);h(u,g.origOptions,c);const y=function(x,b){const k=x.options,E=k.until||b;return k.count||E&&E.getFullYear()!==9999?"CUSTOM":k.freq!==C.DAILY||k.interval!==1||k.byweekday?k.freq!==C.WEEKLY||k.interval!==1||k.byweekday?k.freq!==C.MONTHLY||k.interval!==1||k.bysetpos?k.freq!==C.YEARLY||k.interval!==1||k.bysetpos?k.freq===C.DAILY&&k.byweekday&&k.byweekday.length===e.config.recurring_workdays.length&&k.byweekday.includes(C.MO)&&k.byweekday.includes(C.TU)&&k.byweekday.includes(C.WE)&&k.byweekday.includes(C.TH)&&k.byweekday.includes(C.FR)?"WORKDAYS":"CUSTOM":"YEARLY":"MONTHLY":"WEEKLY":"DAILY"}(g,c._end_date);if(u.querySelector(".dhx_form_repeat_pattern select").value=y,y==="CUSTOM"){let x;switch(g.origOptions.freq){case C.DAILY:x="DAILY";break;case C.WEEKLY:x="WEEKLY";break;case C.MONTHLY:x="MONTHLY";break;case C.YEARLY:x="YEARLY"}x&&(u.querySelector('[name="repeat_interval_unit"]').value=x,u.querySelector('[name="repeat_interval_unit"]').dispatchEvent(new Event("change")))}}else h(u,null,c),u.querySelector(".dhx_form_repeat_pattern select").value="NEVER";u.querySelector(".dhx_form_repeat_pattern select").dispatchEvent(new Event("change"))},get_value:function(u,f){if(u.blocked||u.querySelector(".dhx_form_repeat_pattern select").value==="NEVER")f.rrule=f.rrule="",f._end_date=f.end_date;else{let c=e.form_blocks.recurring._ds,p={};(function(){let y=e.formSection("time");if(y||(y=v("time")),y||(y=v("calendar_time")),!y)throw new Error(["Can't calculate the recurring rule, the Recurring form block can't find the Time control. Make sure you have the time control in 'scheduler.config.lightbox.sections' config.","You can use either the default time control https://docs.dhtmlx.com/scheduler/time.html, or the datepicker https://docs.dhtmlx.com/scheduler/minicalendar.html, or a custom control. ",'In the latter case, make sure the control is named "time":',"","scheduler.config.lightbox.sections = [",'{name:"time", height:72, type:"YOU CONTROL", map_to:"auto" }];'].join(` -`));return y})().getValue(p),c.start=p.start_date;const m=u.querySelector(".dhx_form_repeat_pattern select").value,g=l[m](c,u);f.rrule=new C(g.rrule).toString().replace("RRULE:",""),c.end=g.until,f.duration=Math.floor((p.end_date-p.start_date)/1e3),c._start?(f.start_date=new Date(c.start),f._start_date=new Date(c.start),c._start=!1):f._start_date=null,f._end_date=c.end}return f.rrule},focus:function(u){}}},recurring_legacy:function(e){function i(){var n=e.formSection("recurring");if(n||(n=t("recurring")),!n)throw new Error(["Can't locate the Recurring form section.","Make sure that you have the recurring control on the lightbox configuration https://docs.dhtmlx.com/scheduler/recurring_events.html#recurringlightbox ",'and that the recurring control has name "recurring":',"","scheduler.config.lightbox.sections = [",' {name:"recurring", ... }',"];"].join(` -`));return n}function t(n){for(var s=0;s
'+o.repeat_text_occurences_count+'
'},_ds:{},_get_form_node:function(n,s,_){var a=n[s];if(!a)return null;if(a.nodeName)return a;if(a.length){for(var o=0;ol)return n.setDate(n.getDate()+1*s[h]-l-(a?_:o));this.transpose_day_week(n,s,_+a,null,_)},e.transpose_type=function(n){var s="transpose_"+n;if(!this.date[s]){var _=n.split("_"),a="add_"+n,o=this.transponse_size[_[0]]*_[1];if(_[0]=="day"||_[0]=="week"){var l=null;if(_[4]&&(l=_[4].split(","),e.config.start_on_monday)){for(var h=0;h0&&v.setDate(v.getDate()+f*o),l&&e.transpose_day_week(v,l,1,o),v},this.date[a]=function(v,u){var f=new Date(v.valueOf());if(l)for(var c=0;c=0&&(v.setDate(1),v.setMonth(v.getMonth()+c*o)),e.date[a](v,0,f)},this.date[a]=function(v,u,f,c){if(c?c++:c=1,c>12)return null;var p=new Date(v.valueOf());p.setDate(1),p.setMonth(p.getMonth()+u*o);var m=p.getMonth(),g=p.getFullYear();p.setDate(f.start_date.getDate()),_[3]&&e.date.day_week(p,_[2],_[3]);var y=e.config.recurring_overflow_instances;return p.getMonth()!=m&&y!="none"&&(p=y==="lastDay"?new Date(g,m+1,0,p.getHours(),p.getMinutes(),p.getSeconds(),p.getMilliseconds()):e.date[a](new Date(g,m+1,0),u||1,f,c)),p})}},e.repeat_date=function(n,s,_,a,o,l){a=a||this._min_date,o=o||this._max_date;var h=l||-1,v=new Date(n.start_date.valueOf()),u=v.getHours(),f=0;for(!n.rec_pattern&&n.rec_type&&(n.rec_pattern=n.rec_type.split("#")[0]),this.transpose_type(n.rec_pattern),v=e.date["transpose_"+n.rec_pattern](v,a,n);v&&(v0?new Date(a.valueOf()+1e3*_.event_length-60*l*1e3):new Date(s.valueOf()-60*l*1e3):new Date(o.valueOf())},e.getRecDates=function(n,s){var _=typeof n=="object"?n:e.getEvent(n),a=[];if(s=s||100,!_.rec_type)return[{start_date:_.start_date,end_date:_.end_date}];if(_.rec_type=="none")return[];e.repeat_date(_,a,!0,_.start_date,_.end_date,s);for(var o=[],l=0;ln)if(o.rec_pattern){if(o.rec_pattern=="none")continue;var l=[];this.repeat_date(o,l,!0,n,s);for(var h=0;hn&&!this._rec_markers[l[h].id]&&_.push(l[h])}else this._is_virtual_event(o.id)||_.push(o)}return _},e.config.repeat_date="%m.%d.%Y",e.config.lightbox.sections=[{name:"description",map_to:"text",type:"textarea",focus:!0},{name:"recurring",type:"recurring",map_to:"rec_type",button:"recurring"},{name:"time",height:72,type:"time",map_to:"auto"}],e._copy_dummy=function(n){var s=new Date(this.start_date),_=new Date(this.end_date);this.start_date=s,this.end_date=_,this.event_length=this.event_pid=this.rec_pattern=this.rec_type=null},e.config.include_end_by=!1,e.config.lightbox_recurring="ask",e.attachEvent("onClearAll",function(){e._rec_markers={},e._rec_markers_pull={},e._rec_temp=[]})},serialize:function(e){const i=tt(e);e.data_attributes=function(){var t=[],r=e._helpers.formatDate,d=i();for(var n in d){var s=d[n];for(var _ in s)_.substr(0,1)!="_"&&t.push([_,_=="start_date"||_=="end_date"?r:null]);break}return t},e.toXML=function(t){var r=[],d=this.data_attributes(),n=i();for(var s in n){var _=n[s];r.push("");for(var a=0;a");r.push("")}return(t||"")+""+r.join(` +
`},_init_set_value:function(u,c,f){function p(y){y.classList.add("dhx_hidden")}function g(y){y.classList.remove("dhx_hidden")}e.form_blocks.recurring._ds={start:f.start_date,end:f.end_date},u.querySelector(".dhx_form_repeat_pattern select").addEventListener("change",function(){(function(y){const x=u.querySelector(".dhx_form_repeat_custom");y==="CUSTOM"?g(x):p(x)})(this.value)}),u.querySelector(".dhx_form_repeat_custom_interval [name='repeat_interval_unit']").addEventListener("change",function(){(function(y){const x={weekly:u.querySelector(".dhx_form_repeat_custom_week"),monthly:u.querySelector(".dhx_form_repeat_custom_month"),yearly:u.querySelector(".dhx_form_repeat_custom_year")};switch(y){case"DAILY":p(x.weekly),p(x.monthly),p(x.yearly);break;case"WEEKLY":g(x.weekly),p(x.monthly),p(x.yearly);break;case"MONTHLY":p(x.weekly),g(x.monthly),p(x.yearly);break;case"YEARLY":p(x.weekly),p(x.monthly),g(x.yearly)}})(this.value)}),u.querySelector(".dhx_form_repeat_ends [name='dhx_custom_repeat_ends']").addEventListener("change",function(){(function(y){const x={after:u.querySelector(".dhx_form_repeat_ends_extra .dhx_form_repeat_ends_after"),on:u.querySelector(".dhx_form_repeat_ends_extra .dhx_form_repeat_ends_on")};switch(y){case"NEVER":p(x.after),p(x.on);break;case"AFTER":g(x.after),p(x.on);break;case"ON":p(x.after),g(x.on)}})(this.value)}),e._lightbox._rec_init_done=!0},button_click:function(){},set_value:function(u,c,f){let p=e.form_blocks.recurring;e._lightbox._rec_init_done||p._init_set_value(u,c,f),u.open=!f.rrule,u.blocked=this._is_modified_occurence(f);let g=p._ds;if(g.start=f.start_date,g.end=f._end_date,f.rrule){const y=Me(f.rrule);m(u,y.origOptions,f);const x=function(b,k){const w=b.options,D=w.until||k;return w.count||D&&D.getFullYear()!==9999?"CUSTOM":w.freq!==C.DAILY||w.interval!==1||w.byweekday?w.freq!==C.WEEKLY||w.interval!==1||w.byweekday?w.freq!==C.MONTHLY||w.interval!==1||w.bysetpos?w.freq!==C.YEARLY||w.interval!==1||w.bysetpos?w.freq===C.DAILY&&w.byweekday&&w.byweekday.length===e.config.recurring_workdays.length&&w.byweekday.includes(C.MO)&&w.byweekday.includes(C.TU)&&w.byweekday.includes(C.WE)&&w.byweekday.includes(C.TH)&&w.byweekday.includes(C.FR)?"WORKDAYS":"CUSTOM":"YEARLY":"MONTHLY":"WEEKLY":"DAILY"}(y,f._end_date);if(u.querySelector(".dhx_form_repeat_pattern select").value=x,x==="CUSTOM"){let b;switch(y.origOptions.freq){case C.DAILY:b="DAILY";break;case C.WEEKLY:b="WEEKLY";break;case C.MONTHLY:b="MONTHLY";break;case C.YEARLY:b="YEARLY"}b&&(u.querySelector('[name="repeat_interval_unit"]').value=b,u.querySelector('[name="repeat_interval_unit"]').dispatchEvent(new Event("change")))}}else m(u,null,f),u.querySelector(".dhx_form_repeat_pattern select").value="NEVER";u.querySelector(".dhx_form_repeat_pattern select").dispatchEvent(new Event("change"))},get_value:function(u,c){if(u.blocked||u.querySelector(".dhx_form_repeat_pattern select").value==="NEVER")c.rrule=c.rrule="",c._end_date=c.end_date;else{let f=e.form_blocks.recurring._ds,p={};(function(){let x=e.formSection("time");if(x||(x=v("time")),x||(x=v("calendar_time")),!x)throw new Error(["Can't calculate the recurring rule, the Recurring form block can't find the Time control. Make sure you have the time control in 'scheduler.config.lightbox.sections' config.","You can use either the default time control https://docs.dhtmlx.com/scheduler/time.html, or the datepicker https://docs.dhtmlx.com/scheduler/minicalendar.html, or a custom control. ",'In the latter case, make sure the control is named "time":',"","scheduler.config.lightbox.sections = [",'{name:"time", height:72, type:"YOU CONTROL", map_to:"auto" }];'].join(` +`));return x})().getValue(p),f.start=p.start_date;const g=u.querySelector(".dhx_form_repeat_pattern select").value,y=h[g](f,u);c.rrule=new C(y.rrule).toString().replace("RRULE:",""),f.end=y.until,c.duration=Math.floor((p.end_date-p.start_date)/1e3),f._start?(c.start_date=new Date(f.start),c._start_date=new Date(f.start),f._start=!1):c._start_date=null,c._end_date=f.end}return c.rrule},focus:function(u){}}},recurring_legacy:function(e){function i(){var n=e.formSection("recurring");if(n||(n=t("recurring")),!n)throw new Error(["Can't locate the Recurring form section.","Make sure that you have the recurring control on the lightbox configuration https://docs.dhtmlx.com/scheduler/recurring_events.html#recurringlightbox ",'and that the recurring control has name "recurring":',"","scheduler.config.lightbox.sections = [",' {name:"recurring", ... }',"];"].join(` +`));return n}function t(n){for(var s=0;s
'+o.repeat_text_occurences_count+'
'},_ds:{},_get_form_node:function(n,s,_){var a=n[s];if(!a)return null;if(a.nodeName)return a;if(a.length){for(var o=0;ol)return n.setDate(n.getDate()+1*s[h]-l-(a?_:o));this.transpose_day_week(n,s,_+a,null,_)},e.transpose_type=function(n){var s="transpose_"+n;if(!this.date[s]){var _=n.split("_"),a="add_"+n,o=this.transponse_size[_[0]]*_[1];if(_[0]=="day"||_[0]=="week"){var l=null;if(_[4]&&(l=_[4].split(","),e.config.start_on_monday)){for(var h=0;h0&&m.setDate(m.getDate()+u*o),l&&e.transpose_day_week(m,l,1,o),m},this.date[a]=function(m,v){var u=new Date(m.valueOf());if(l)for(var c=0;c=0&&(m.setDate(1),m.setMonth(m.getMonth()+c*o)),e.date[a](m,0,u)},this.date[a]=function(m,v,u,c){if(c?c++:c=1,c>12)return null;var f=new Date(m.valueOf());f.setDate(1),f.setMonth(f.getMonth()+v*o);var p=f.getMonth(),g=f.getFullYear();f.setDate(u.start_date.getDate()),_[3]&&e.date.day_week(f,_[2],_[3]);var y=e.config.recurring_overflow_instances;return f.getMonth()!=p&&y!="none"&&(f=y==="lastDay"?new Date(g,p+1,0,f.getHours(),f.getMinutes(),f.getSeconds(),f.getMilliseconds()):e.date[a](new Date(g,p+1,0),v||1,u,c)),f})}},e.repeat_date=function(n,s,_,a,o,l){a=a||this._min_date,o=o||this._max_date;var h=l||-1,m=new Date(n.start_date.valueOf()),v=m.getHours(),u=0;for(!n.rec_pattern&&n.rec_type&&(n.rec_pattern=n.rec_type.split("#")[0]),this.transpose_type(n.rec_pattern),m=e.date["transpose_"+n.rec_pattern](m,a,n);m&&(m0?new Date(a.valueOf()+1e3*_.event_length-60*l*1e3):new Date(s.valueOf()-60*l*1e3):new Date(o.valueOf())},e.getRecDates=function(n,s){var _=typeof n=="object"?n:e.getEvent(n),a=[];if(s=s||100,!_.rec_type)return[{start_date:_.start_date,end_date:_.end_date}];if(_.rec_type=="none")return[];e.repeat_date(_,a,!0,_.start_date,_.end_date,s);for(var o=[],l=0;ln)if(o.rec_pattern){if(o.rec_pattern=="none")continue;var l=[];this.repeat_date(o,l,!0,n,s);for(var h=0;hn&&!this._rec_markers[l[h].id]&&_.push(l[h])}else this._is_virtual_event(o.id)||_.push(o)}return _},e.config.repeat_date="%m.%d.%Y",e.config.lightbox.sections=[{name:"description",map_to:"text",type:"textarea",focus:!0},{name:"recurring",type:"recurring",map_to:"rec_type",button:"recurring"},{name:"time",height:72,type:"time",map_to:"auto"}],e._copy_dummy=function(n){var s=new Date(this.start_date),_=new Date(this.end_date);this.start_date=s,this.end_date=_,this.event_length=this.event_pid=this.rec_pattern=this.rec_type=null},e.config.include_end_by=!1,e.config.lightbox_recurring="ask",e.attachEvent("onClearAll",function(){e._rec_markers={},e._rec_markers_pull={},e._rec_temp=[]})},serialize:function(e){const i=tt(e);e.data_attributes=function(){var t=[],r=e._helpers.formatDate,d=i();for(var n in d){var s=d[n];for(var _ in s)_.substr(0,1)!="_"&&t.push([_,_=="start_date"||_=="end_date"?r:null]);break}return t},e.toXML=function(t){var r=[],d=this.data_attributes(),n=i();for(var s in n){var _=n[s];r.push("");for(var a=0;a");r.push("")}return(t||"")+""+r.join(` `)+""},e._serialize_json_value=function(t){return t===null||typeof t=="boolean"?t=""+t:(t||t===0||(t=""),t='"'+t.toString().replace(/\n/g,"").replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'),t},e.toJSON=function(){return JSON.stringify(this.serialize())},e.toICal=function(t){var r=e.date.date_to_str("%Y%m%dT%H%i%s"),d=e.date.date_to_str("%Y%m%d"),n=[],s=i();for(var _ in s){var a=s[_];n.push("BEGIN:VEVENT"),a._timed&&(a.start_date.getHours()||a.start_date.getMinutes())?n.push("DTSTART:"+r(a.start_date)):n.push("DTSTART:"+d(a.start_date)),a._timed&&(a.end_date.getHours()||a.end_date.getMinutes())?n.push("DTEND:"+r(a.end_date)):n.push("DTEND:"+d(a.end_date)),n.push("SUMMARY:"+a.text),n.push("END:VEVENT")}return`BEGIN:VCALENDAR VERSION:2.0 PRODID:-//dhtmlXScheduler//NONSGML v2.2//EN DESCRIPTION:`+(t||"")+` `+n.join(` `)+` -END:VCALENDAR`}},timeline:function(e){_e("Timeline",e.assert)},tooltip:function(e){e.config.tooltip_timeout=30,e.config.tooltip_offset_y=20,e.config.tooltip_offset_x=10,e.config.tooltip_hide_timeout=30;const i=new vn(e);e.ext.tooltips=i,e.attachEvent("onSchedulerReady",function(){i.tooltipFor({selector:"["+e.config.event_attribute+"]",html:t=>{if(e._mobile&&!e.config.touch_tooltip)return;const r=e._locate_event(t.target);if(e.getEvent(r)){const d=e.getEvent(r);return e.templates.tooltip_text(d.start_date,d.end_date,d)}return null},global:!1})}),e.attachEvent("onDestroy",function(){i.destructor()}),e.attachEvent("onLightbox",function(){i.hideTooltip()}),e.attachEvent("onBeforeDrag",function(){return e._mobile&&e.config.touch_tooltip||i.hideTooltip(),!0}),e.attachEvent("onEventDeleted",function(){return i.hideTooltip(),!0})},treetimeline:function(e){_e("Tree Timeline",e.assert)},units:function(e){_e("Units",e.assert)},url:function(e){e._get_url_nav=function(){for(var i={},t=(document.location.hash||"").replace("#","").split(","),r=0;r",u+="
"+(v[f]._timed?this.templates.event_date(v[f].start_date):"")+"
",u+="
 
",u+=this.templates.year_tooltip(v[f].start_date,v[f].end_date,v[f])+""}}this._tooltip.style.display="",this._tooltip.style.top="0px",document.body.offsetWidth-a.left-this._tooltip.offsetWidth<0?this._tooltip.style.left=a.left-this._tooltip.offsetWidth+"px":this._tooltip.style.left=a.left+l.offsetWidth+"px",this._tooltip.date=_,this._tooltip.innerHTML=u,document.body.offsetHeight-a.top-this._tooltip.offsetHeight<0?this._tooltip.style.top=a.top-this._tooltip.offsetHeight+l.offsetHeight+"px":this._tooltip.style.top=a.top+"px"},e._year_view_tooltip_handler=function(_){if(i()){var a=_.target||_.srcElement;a.tagName.toLowerCase()=="a"&&(a=a.parentNode),e._getClassName(a).indexOf("dhx_year_event")!=-1?e._showToolTip(e.templates.parse_date(a.getAttribute("data-year-date")),e.$domHelpers.getOffset(a),_,a):e._hideToolTip()}},e._init_year_tooltip=function(){e._detachDomEvent(e._els.dhx_cal_data[0],"mouseover",e._year_view_tooltip_handler),e.event(e._els.dhx_cal_data[0],"mouseover",e._year_view_tooltip_handler)},e._get_year_cell=function(_){for(var a=e.templates.format_date(_),o=this.$root.querySelectorAll(`.dhx_cal_data .dhx_cal_datepicker_date[data-cell-date="${a}"]`),l=0;l=this._max_date.valueOf())return},e.year_view=function(_){if(e.set_sizes(),e._table_view=_,!this._load_mode||!this._load())if(_){if(e._init_year_tooltip(),e._reset_year_scale(),e._load_mode&&e._load())return void(e._render_wait=!0);e.render_view_data()}else e._hideToolTip()},e._reset_year_scale=function(){this._cols=[],this._colsS={};var _=[],a=this._els.dhx_cal_data[0],o=this.config;a.scrollTop=0,a.innerHTML="",Math.floor((parseInt(a.style.height)-e.xy.year_top)/o.year_y);var l=document.createElement("div"),h=this.date.week_start(e._currentDate());this._process_ignores(h,7,"day",1);for(var v=0;v<7;v++)this._ignores&&this._ignores[v]||(this._cols[v]="var(--dhx-scheduler-datepicker-cell-size)",this._render_x_header(v,0,h,l)),h=this.date.add(h,1,"day");for(l.lastChild.className+=" dhx_scale_bar_last",v=0;v
"+l.innerHTML+"
";var g=c.querySelector(".dhx_year_month"),y=c.querySelector(".dhx_year_grid"),x=c.querySelector(".dhx_year_body"),b=e.uid();this._waiAria.yearHeader(g,b),this._waiAria.yearGrid(y,b),g.innerHTML=this.templates.year_month(u);var k=this.date.week_start(u);this._reset_month_scale(x,u,k,6);for(var E=x.querySelectorAll("td"),D=0;D${this.templates.year_month(l)} -
`;const c=f.querySelector(".dhx_year_grid"),p=e._createDatePicker(null,{date:l,minWeeks:6});p._renderDayGrid(c),p.destructor(),o.appendChild(f),l=this.date.add(l,1,"month")}_.appendChild(o);let h=this.date.add(a,1,"year");h.valueOf()!=this.date.week_start(new Date(h)).valueOf()&&(h=this.date.week_start(new Date(h)),h=this.date.add(h,1,"week")),this._max_date=h;var v=this._getNavDateElement();v&&(v.innerHTML=this.templates[this._mode+"_date"](a,h,this._mode))};var n=e.getActionData;e.getActionData=function(_){return i()?{date:t(_.target),section:null}:n.apply(e,arguments)};var s=e._locate_event;e._locate_event=function(_){var a=s.apply(e,arguments);if(!a){var o=t(_);if(!o)return null;var l=e.getEvents(o,e.date.add(o,1,"day"));if(!l.length)return null;a=l[0].id}return a},e.attachEvent("onDestroy",function(){e._hideToolTip()})}},Je=new class{constructor(e){this._seed=0,this._schedulerPlugins=[],this._bundledExtensions=e,this._extensionsManager=new Ma(e)}plugin(e){this._schedulerPlugins.push(e),G.scheduler&&e(G.scheduler)}getSchedulerInstance(e){for(var i=Sa(this._extensionsManager),t=0;t{if(e._mobile&&!e.config.touch_tooltip)return;const r=e._locate_event(t.target);if(e.getEvent(r)){const d=e.getEvent(r);return e.templates.tooltip_text(d.start_date,d.end_date,d)}return null},global:!1})}),e.attachEvent("onDestroy",function(){i.destructor()}),e.attachEvent("onLightbox",function(){i.hideTooltip()}),e.attachEvent("onBeforeDrag",function(){return e._mobile&&e.config.touch_tooltip||i.hideTooltip(),!0}),e.attachEvent("onEventDeleted",function(){return i.hideTooltip(),!0})},treetimeline:function(e){_e("Tree Timeline",e.assert)},units:function(e){_e("Units",e.assert)},url:function(e){e._get_url_nav=function(){for(var i={},t=(document.location.hash||"").replace("#","").split(","),r=0;r",v+="
"+(m[u]._timed?this.templates.event_date(m[u].start_date):"")+"
",v+="
 
",v+=this.templates.year_tooltip(m[u].start_date,m[u].end_date,m[u])+""}}this._tooltip.style.display="",this._tooltip.style.top="0px",document.body.offsetWidth-a.left-this._tooltip.offsetWidth<0?this._tooltip.style.left=a.left-this._tooltip.offsetWidth+"px":this._tooltip.style.left=a.left+l.offsetWidth+"px",this._tooltip.date=_,this._tooltip.innerHTML=v,document.body.offsetHeight-a.top-this._tooltip.offsetHeight<0?this._tooltip.style.top=a.top-this._tooltip.offsetHeight+l.offsetHeight+"px":this._tooltip.style.top=a.top+"px"},e._year_view_tooltip_handler=function(_){if(i()){var a=_.target||_.srcElement;a.tagName.toLowerCase()=="a"&&(a=a.parentNode),e._getClassName(a).indexOf("dhx_year_event")!=-1?e._showToolTip(e.templates.parse_date(a.getAttribute("data-year-date")),e.$domHelpers.getOffset(a),_,a):e._hideToolTip()}},e._init_year_tooltip=function(){e._detachDomEvent(e._els.dhx_cal_data[0],"mouseover",e._year_view_tooltip_handler),e.event(e._els.dhx_cal_data[0],"mouseover",e._year_view_tooltip_handler)},e._get_year_cell=function(_){for(var a=e.templates.format_date(_),o=this.$root.querySelectorAll(`.dhx_cal_data .dhx_cal_datepicker_date[data-cell-date="${a}"]`),l=0;l=this._max_date.valueOf())return},e.year_view=function(_){if(e.set_sizes(),e._table_view=_,!this._load_mode||!this._load())if(_){if(e._init_year_tooltip(),e._reset_year_scale(),e._load_mode&&e._load())return void(e._render_wait=!0);e.render_view_data()}else e._hideToolTip()},e._reset_year_scale=function(){this._cols=[],this._colsS={};var _=[],a=this._els.dhx_cal_data[0],o=this.config;a.scrollTop=0,a.innerHTML="",Math.floor((parseInt(a.style.height)-e.xy.year_top)/o.year_y);var l=document.createElement("div"),h=this.date.week_start(e._currentDate());this._process_ignores(h,7,"day",1);for(var m=0;m<7;m++)this._ignores&&this._ignores[m]||(this._cols[m]="var(--dhx-scheduler-datepicker-cell-size)",this._render_x_header(m,0,h,l)),h=this.date.add(h,1,"day");for(l.lastChild.className+=" dhx_scale_bar_last",m=0;m
"+l.innerHTML+"
";var g=c.querySelector(".dhx_year_month"),y=c.querySelector(".dhx_year_grid"),x=c.querySelector(".dhx_year_body"),b=e.uid();this._waiAria.yearHeader(g,b),this._waiAria.yearGrid(y,b),g.innerHTML=this.templates.year_month(v);var k=this.date.week_start(v);this._reset_month_scale(x,v,k,6);for(var w=x.querySelectorAll("td"),D=0;D${this.templates.year_month(l)} +
`;const c=u.querySelector(".dhx_year_grid"),f=e._createDatePicker(null,{date:l,filterDays:e.ignore_year,minWeeks:6});f._renderDayGrid(c),f.destructor(),o.appendChild(u),l=this.date.add(l,1,"month")}_.appendChild(o);let h=this.date.add(a,1,"year");h.valueOf()!=this.date.week_start(new Date(h)).valueOf()&&(h=this.date.week_start(new Date(h)),h=this.date.add(h,1,"week")),this._max_date=h;var m=this._getNavDateElement();m&&(m.innerHTML=this.templates[this._mode+"_date"](a,h,this._mode))};var n=e.getActionData;e.getActionData=function(_){return i()?{date:t(_.target),section:null}:n.apply(e,arguments)};var s=e._locate_event;e._locate_event=function(_){var a=s.apply(e,arguments);if(!a){var o=t(_);if(!o)return null;var l=e.getEvents(o,e.date.add(o,1,"day"));if(!l.length)return null;a=l[0].id}return a},e.attachEvent("onDestroy",function(){e._hideToolTip()})}},Je=new class{constructor(e){this._seed=0,this._schedulerPlugins=[],this._bundledExtensions=e,this._extensionsManager=new Ma(e)}plugin(e){this._schedulerPlugins.push(e),G.scheduler&&e(G.scheduler)}getSchedulerInstance(e){for(var i=Sa(this._extensionsManager),t=0;t {\r\n dndMarkers.push(scheduler.markTimespan(cfg));\r\n });\r\n }\r\n\r\n function getColumnViewMarkers(settings){\r\n const {event, layout, viewName, sectionId} = settings;\r\n let columnViewMarkersArray = [];\r\n let eventNodes = scheduler.$container.querySelectorAll(`[${scheduler.config.event_attribute}='${event.id}']:not(.dhx_cal_select_menu):not(.dhx_drag_marker)`);\r\n if(eventNodes){\r\n for (let i = 0; i < eventNodes.length; i++) {\r\n let eventNodeClone = eventNodes[i].cloneNode(true);\r\n let startDate = new Date(+eventNodeClone.getAttribute(\"data-bar-start\"));\r\n let endDate = new Date(+eventNodeClone.getAttribute(\"data-bar-end\"));\r\n let dates = {start_date: startDate, end_date: endDate};\r\n const configSettings = {\r\n event: dates, \r\n layout, \r\n viewName, \r\n sectionId, \r\n eventNode:eventNodeClone\r\n };\r\n columnViewMarkersArray.push(createMarkerConfig(configSettings));\r\n }\t\r\n }\r\n return columnViewMarkersArray;\r\n }\r\n\r\n function getMonthViewMarkers(settings){\r\n let monthViewMarkersArray = [];\r\n const {event, layout, viewName, sectionId} = settings;\r\n const weekDates = [];\r\n let currDate = new Date(event.start_date);\r\n while(currDate.valueOf() < event.end_date.valueOf()){\r\n let obj = {start_date: currDate};\r\n weekDates.push(obj);\r\n currDate = scheduler.date.week_start(scheduler.date.add(currDate, 1, \"week\"));\r\n }\r\n let cells = scheduler.$container.querySelectorAll(`[${scheduler.config.event_attribute}='${event.id}']`);\r\n for (let i = 0; i < cells.length; i++) {\r\n const configSettings = {\r\n event: weekDates[i], \r\n layout, \r\n viewName, \r\n sectionId, \r\n eventNode: cells[i].cloneNode(true)\r\n };\r\n monthViewMarkersArray.push(createMarkerConfig(configSettings));\r\n }\r\n return monthViewMarkersArray;\r\n }\r\n\r\n function getTimelineAndUnitsViewMarkers(settings){\r\n let unitMarkersArray = [];\r\n const {event, layout, viewName, eventNode} = settings;\r\n let sectionPropertyName = checkSectionPropertyName(viewName);\r\n if (scheduler.config.multisection && sectionPropertyName){\r\n const sections = String(event[sectionPropertyName]).split(scheduler.config.section_delimiter);\r\n const formatedSections = sections.map(element => String(element));\r\n const elems = [];\r\n for (let i = 0; i < formatedSections.length; i++) {\r\n elems[i] = eventNode.cloneNode(true);\r\n const configSettings = {\r\n event, \r\n layout, \r\n viewName, \r\n sectionId: formatedSections[i],\r\n eventNode: elems[i]\r\n };\r\n unitMarkersArray.push(createMarkerConfig(configSettings));\r\n }\r\n }\r\n return unitMarkersArray;\r\n }\r\n \r\n scheduler.attachEvent(\"onBeforeDrag\", function (id, mode, e){\r\n if (isEnabled()) {\r\n dragStarted = true;\r\n event = scheduler.getEvent(id);\r\n eventNode = e.target.closest(`[${scheduler.config.event_attribute}]`);\r\n const viewName = scheduler.getState().mode;\r\n const layout = checkViewName(viewName);\r\n // to avoid incorrect eventNode and marker creation when scheduler.config.cascade_event_display included\r\n if (layout == \"units\" && scheduler.config.cascade_event_display ) {\r\n scheduler.unselect(id);\r\n eventNode = e.target.closest(`[${scheduler.config.event_attribute}]`);\r\n }\r\n }\r\n return true;\r\n });\r\n\r\n scheduler.attachEvent(\"onEventDrag\", function (id, mode, e){\r\n if(dragStarted && isEnabled()){\r\n dragStarted = false;// insert element only once after dnd start\r\n const viewName = scheduler.getState().mode;\r\n const layout = checkViewName(viewName);\r\n const sectionId = scheduler.getActionData(e).section;\r\n if (event) {\r\n const settings = {\r\n event, \r\n layout, \r\n viewName, \r\n sectionId, \r\n eventNode\r\n };\r\n createViewMarker(settings);\r\n }\r\n }\r\n });\r\n\r\n scheduler.attachEvent(\"onDragEnd\", function(id, mode, e){\r\n for (let i = 0; i < dndMarkers.length; i++) {\r\n scheduler.unmarkTimespan(dndMarkers[i]);\r\n }\r\n dndMarkers = [];\r\n eventNode = null;\r\n event = null;\r\n });\r\n}","export default function limitPlugin(scheduler){\r\n\r\n\r\n\tscheduler.config.mark_now = true;\r\n\tscheduler.config.display_marked_timespans = true;\r\n\tscheduler.config.overwrite_marked_timespans = true;\r\n\r\n\r\n\tvar dhx_time_block = \"dhx_time_block\";\r\n\tvar default_timespan_type = \"default\";\r\n\tvar fix_options = function(options, days, zones) {\r\n\t\tif (days instanceof Date && zones instanceof Date) {\r\n\t\t\toptions.start_date = days;\r\n\t\t\toptions.end_date = zones;\r\n\t\t} else {\r\n\t\t\toptions.days = days;\r\n\t\t\toptions.zones = zones;\r\n\t\t}\r\n\t\treturn options;\r\n\t};\r\n\tvar get_resulting_options = function(days, zones, sections) {\r\n\t\tvar options = (typeof days == \"object\") ? days : { days: days };\r\n\t\toptions.type = dhx_time_block;\r\n\t\toptions.css = \"\";\r\n\t\tif (zones) {\r\n\t\t\tif (sections)\r\n\t\t\t\toptions.sections = sections;\r\n\t\t\toptions = fix_options(options, days, zones);\r\n\t\t}\r\n\t\treturn options;\r\n\t};\r\n\tscheduler.blockTime = function(days, zones, sections){\r\n\t\tvar options = get_resulting_options(days, zones, sections);\r\n\t\treturn scheduler.addMarkedTimespan(options);\r\n\t};\r\n\tscheduler.unblockTime = function(days, zones, sections) {\r\n\t\tzones = zones || \"fullday\";\r\n\t\tvar options = get_resulting_options(days, zones, sections);\r\n\t\treturn scheduler.deleteMarkedTimespan(options);\r\n\t};\r\n\r\n\tscheduler.checkInMarkedTimespan = function(ev, timespan_type, on_overlap){\r\n\t\ttimespan_type = timespan_type || default_timespan_type;\r\n\r\n\t\tvar res = true;\r\n\t\tvar temp_start_date = new Date(ev.start_date.valueOf());\r\n\t\tvar temp_end_date = scheduler.date.add(temp_start_date, 1, \"day\");\r\n\t\tvar timespans = scheduler._marked_timespans;\r\n\t\tfor (; temp_start_date < ev.end_date; temp_start_date = scheduler.date.date_part(temp_end_date), temp_end_date = scheduler.date.add(temp_start_date, 1, \"day\") ) {\r\n\t\t\tvar day_value = +scheduler.date.date_part( new Date(temp_start_date) ); // the first part of event not necessarily contains only date part\r\n\t\t\tvar day_index = temp_start_date.getDay();\r\n\r\n\t\t\tvar zones = getZones(ev, timespans, day_index, day_value, timespan_type);\r\n\t\t\tif (zones){\r\n\t\t\t\tfor (var i = 0; i < zones.length; i+=2) {\r\n\r\n\t\t\t\t\t// they may change for new event if it passes limit zone\r\n\t\t\t\t\tvar eventStart = scheduler._get_zone_minutes(temp_start_date);\r\n\t\t\t\t\tvar eventEnd = ( ev.end_date>temp_end_date || ev.end_date.getDate() != temp_start_date.getDate() ) ? 1440 : scheduler._get_zone_minutes(ev.end_date);\r\n\r\n\t\t\t\t\tvar markerStart = zones[i];\r\n\t\t\t\t\tvar markerEnd = zones[i+1];\r\n\t\t\t\t\tif (markerStarteventStart) {\r\n\t\t\t\t\t\tif(typeof on_overlap == \"function\"){\r\n\t\t\t\t\t\t\t//handler allows to cancel overlapping\r\n\t\t\t\t\t\t\t//actually needed only to keep default behavior of limits\r\n\t\t\t\t\t\t\tres = on_overlap(ev, eventStart, eventEnd, markerStart, markerEnd);//event object, event start/end minutes in 'zones' format, zone start/end minutes\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tres = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(!res)\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn !res;\r\n\t};\r\n\tscheduler.checkLimitViolation = function(event){\r\n\t\tif(!event)\r\n\t\t\treturn true;\r\n\t\tif (!scheduler.config.check_limits)\r\n\t\t\treturn true;\r\n\t\tvar s = scheduler;\r\n\t\tvar c = s.config;\r\n\t\tvar evs = [];\r\n\t\tif ((event.rec_type && event._end_date) || (event.rrule)) {\r\n\t\t\tconst seriesEnd = event._end_date || event.end_date;\r\n\t\t\t// GS-2482 need to take into account that a part of recurring events might be outside the limits\r\n\t\t\tif ((c.limit_start && c.limit_end)) {\r\n\t\t\t\tvar recEventInLimits = seriesEnd.valueOf() >= c.limit_start.valueOf() && event.start_date.valueOf() <= c.limit_end.valueOf();\r\n\t\t\t\treturn recEventInLimits;\r\n\t\t\t} else return true;\r\n\t\t} else {\r\n\t\t\tevs = [event];\r\n\t\t}\r\n\r\n\t\tvar complete_res = true;\r\n\t\tfor (var p=0; p= c.limit_start.valueOf() && ev.end_date.valueOf() <= c.limit_end.valueOf()) : true;\r\n\t\t\tif (res){\r\n\t\t\t\tres = !scheduler.checkInMarkedTimespan(ev, dhx_time_block, function(event, eventStart, eventEnd, markerStart, markerEnd){\r\n\t\t\t\t\t//try crop event to allow placing\r\n\t\t\t\t\tvar allow = true;\r\n\t\t\t\t\tif (eventStart<=markerEnd && eventStart >= markerStart){\r\n\t\t\t\t\t\tif (markerEnd == 24*60 || eventEnd <= markerEnd){\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(event._timed && s._drag_id && s._drag_mode == \"new-size\"){\r\n\t\t\t\t\t\t\tevent.start_date.setHours(0);\r\n\t\t\t\t\t\t\tevent.start_date.setMinutes(markerEnd);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ((eventEnd >= markerStart && eventEnd <= markerEnd) || (eventStart < markerStart && eventEnd > markerEnd)){\r\n\t\t\t\t\t\tif(event._timed && s._drag_id && s._drag_mode == \"new-size\"){\r\n\t\t\t\t\t\t\tevent.end_date.setHours(0);\r\n\t\t\t\t\t\t\tevent.end_date.setMinutes(markerStart);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn allow;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\tif (!res) {\r\n\t\t\t\tres = (s.checkEvent(\"onLimitViolation\")) ? s.callEvent(\"onLimitViolation\",[ev.id, ev]) : res;\r\n\t\t\t}\r\n\t\t\tcomplete_res = complete_res && res;\r\n\t\t}\r\n\t\tif(!complete_res){\r\n\t\t\ts._drag_id = null;\r\n\t\t\ts._drag_mode = null;\r\n\t\t}\r\n\t\treturn complete_res;\r\n\r\n\r\n\t};\r\n\tscheduler._get_blocked_zones = function(timespans, property, day_index, day_value, timespan_type){\r\n\t\tvar zones =[];\r\n\t\tif (timespans && timespans[property]) {\r\n\t\t\tvar timeline_zones = timespans[property];\r\n\t\t\tvar blocked_timeline_zones = this._get_relevant_blocked_zones(day_index, day_value, timeline_zones, timespan_type);\r\n\t\t\tfor (var i=0; i this._min_date && now.getHours() >= cfg.first_hour && now.getHours() 1) {\r\n\t\t\t\t\tif(view.size && view.options.length){\r\n\t\t\t\t\t\tday_index = ((view.position+ day_index) / view.options.length) * view.size;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstart_index = day_index;\r\n\t\t\t\t\tend_index = day_index + units_l;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tstart_index = 0;\r\n\t\t\t\t\tend_index = start_index + units_l;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar r_divs = [];\r\n\r\n\t\t\t\tfor (var i = start_index; i < end_index; i++) {\r\n\t\t\t\t\tvar t_day = i; // as each unit is actually considered +1 day\r\n\t\t\t\t\toptions.days = t_day;\r\n\t\t\t\t\tvar t_div = scheduler._render_marked_timespan(options, null, t_day)[0];\r\n\t\t\t\t\tr_divs.push(t_div);\r\n\t\t\t\t}\r\n\t\t\t\treturn r_divs;\r\n\t\t\t} else { // day/week views\r\n\t\t\t\toptions.days = day_index;\r\n\t\t\t\treturn scheduler._render_marked_timespan(options, null, day_index);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\toptions.days = +scheduler.date.date_part(now);\r\n\t\t\t\treturn scheduler._render_marked_timespan(options, null, null);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tscheduler._remove_mark_now = function() {\r\n\t\tvar dhx_now_time = 'dhx_now_time';\r\n\t\tvar els = this._els[dhx_now_time];\r\n\t\tfor (var i=0; i config.start_date) || (config.days !== undefined && config.zones)) && !config.type )\r\n\t\t\treturn r_configs; // incorrect config was provided\r\n\r\n\t\tvar min = 0;\r\n\t\tvar max = 24*60;\r\n\t\tif (config.zones == \"fullday\")\r\n\t\t\tconfig.zones = [min, max];\r\n\t\tif (config.zones && config.invert_zones) {\r\n\t\t\tconfig.zones = scheduler.invertZones(config.zones);\r\n\t\t}\r\n\r\n\t\tconfig.id = scheduler.uid();\r\n\t\tconfig.css = config.css||\"\";\r\n\t\tconfig.type = config.type||default_timespan_type;\r\n\r\n\t\tvar sections = config.sections;\r\n\t\tif (sections) {\r\n\t\t\tfor (var view_key in sections) {\r\n\t\t\t\tif (sections.hasOwnProperty(view_key)) {\r\n\t\t\t\t\tvar ids = sections[view_key];\r\n\t\t\t\t\tif (!(ids instanceof Array))\r\n\t\t\t\t\t\tids = [ids];\r\n\t\t\t\t\tfor (var i=0; i t_sd) ? scheduler._get_zone_minutes(start_date) : min;\r\n\t\t\t\t\tvar zone_end = ( end_date > t_ed || end_date.getDate() != t_sd.getDate() ) ? max : scheduler._get_zone_minutes(end_date);\r\n\t\t\t\t\tt_config.zones = [zone_start, zone_end];\r\n\t\t\t\t\tr_configs.push(t_config);\r\n\r\n\t\t\t\t\tt_sd = t_ed;\r\n\t\t\t\t\tt_ed = scheduler.date.add(t_ed, 1, \"day\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (c_config.days instanceof Date)\r\n\t\t\t\t\tc_config.days = (scheduler.date.date_part(c_config.days)).valueOf();\r\n\t\t\t\tc_config.zones = config.zones.slice();\r\n\t\t\t\tr_configs.push(c_config);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn r_configs;\r\n\t};\r\n\tscheduler._get_dates_by_index = function(index, start, end) {\r\n\t\tvar dates = [];\r\n\t\tstart = scheduler.date.date_part(new Date(start||scheduler._min_date));\r\n\t\tend = new Date(end||scheduler._max_date);\r\n\t\tvar start_day = start.getDay();\r\n\t\tvar delta = (index-start_day >= 0) ? (index-start_day) : (7-start.getDay()+index);\r\n\t\tvar t_date = scheduler.date.add(start, delta, \"day\");\r\n\t\tfor (; t_date < end; t_date = scheduler.date.add(t_date, 1, \"week\")) {\r\n\t\t\tdates.push(t_date);\r\n\t\t}\r\n\t\treturn dates;\r\n\t};\r\n\tscheduler._get_css_classes_by_config = function(config) {\r\n\t\tvar css_classes = [];\r\n\t\tif (config.type == dhx_time_block) {\r\n\t\t\tcss_classes.push(dhx_time_block);\r\n\t\t\tif (config.css)\r\n\t\t\t\tcss_classes.push(dhx_time_block+\"_reset\");\r\n\t\t}\r\n\t\tcss_classes.push(\"dhx_marked_timespan\", config.css);\r\n\t\treturn css_classes.join(\" \");\r\n\t};\r\n\tscheduler._get_block_by_config = function(config) {\r\n\t\tvar block = document.createElement(\"div\");\r\n\t\tif (config.html) {\r\n\t\t\tif (typeof config.html == \"string\")\r\n\t\t\t\tblock.innerHTML = config.html;\r\n\t\t\telse\r\n\t\t\t\tblock.appendChild(config.html);\r\n\t\t}\r\n\t\treturn block;\r\n\t};\r\n\tscheduler._render_marked_timespan = function(options, area, day) {\r\n\t\tvar blocks = []; // resulting block which will be rendered and returned\r\n\t\tvar c = scheduler.config;\r\n\t\tvar min_date = this._min_date;\r\n\t\tvar max_date = this._max_date;\r\n\t\tvar day_value = false; // if timespan for specific date should be displayed\r\n\r\n\t\tif (!c.display_marked_timespans)\r\n\t\t\treturn blocks;\r\n\r\n\t\t// in case of markTimespan\r\n\t\tif (!day && day !== 0) {\r\n\t\t\tif (options.days < 7)\r\n\t\t\t\tday = options.days;\r\n\t\t\telse {\r\n\t\t\t\tvar date_to_display = new Date(options.days);\r\n\t\t\t\tday_value = +date_to_display;\r\n\r\n\t\t\t\t// in case of markTimespan date could be not in the viewing range, need to return\r\n\t\t\t\tif ( !(+max_date > +date_to_display && +min_date <= +date_to_display) )\r\n\t\t\t\t\treturn blocks;\r\n\r\n\t\t\t\tday = date_to_display.getDay();\r\n\t\t\t}\r\n\r\n\t\t\t// convert day default index (Sun - 0, Sat - 6) to index of hourscales (depends on week_start and config.start_on_monday)\r\n\t\t\tvar min_day = min_date.getDay();\r\n\t\t\tif (min_day > day) {\r\n\t\t\t\tday = 7 - (min_day-day);\r\n\t\t\t} else {\r\n\t\t\t\tday = day - min_day;\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar zones = options.zones;\r\n\t\tvar css_classes = scheduler._get_css_classes_by_config(options);\r\n\r\n\t\tif (scheduler._table_view && scheduler._mode == \"month\") {\r\n\t\t\tvar areas = [];\r\n\t\t\tvar days = [];\r\n\r\n\r\n\t\t\tif (!area) {\r\n\t\t\t\tdays = (day_value) ? [day_value] : scheduler._get_dates_by_index(day);\r\n\t\t\t\tfor (var i=0; i < days.length; i++) {\r\n\t\t\t\t\tareas.push( this._scales[days[i]] );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tareas.push(area);\r\n\t\t\t\tdays.push(day);\r\n\t\t\t}\r\n\r\n\t\t\tfor (var i=0; i < areas.length; i++) {\r\n\t\t\t\tarea = areas[i];\r\n\t\t\t\tday = days[i];\r\n\r\n\t\t\t\tvar sday = this.locate_holder_day(day, false) % this._cols.length;\r\n\r\n\t\t\t\tif(this._ignores[sday]) continue;\r\n\r\n\t\t\t\tvar block_proto = scheduler._get_block_by_config(options);\r\n\t\t\t\tblock_proto.className = css_classes;\r\n\t\t\t\tblock_proto.style.top = \"0px\";\r\n\t\t\t\tblock_proto.style.height = \"100%\";\r\n\t\t\t\t\r\n\t\t\t\tfor (var k=0; k < zones.length; k+=2) {\r\n\t\t\t\t\tvar start = zones[i];\r\n\t\t\t\t\tvar end = zones[i+1];\r\n\t\t\t\t\tif (end <= start)\r\n\t\t\t\t\t\treturn [];\r\n\r\n\t\t\t\t\tvar block = block_proto.cloneNode(true);\r\n\r\n\t\t\t\t\tblock.style.left = \"0px\";\r\n\t\t\t\t\tblock.style.width = \"100%\";\r\n\r\n\t\t\t\t\tarea.appendChild(block);\r\n\t\t\t\t\tblocks.push(block);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvar index = day;\r\n\r\n\t\t\tif(this._ignores[this.locate_holder_day(day, false)]) return blocks;\r\n\r\n\t\t\tif (this._props && this._props[this._mode] && options.sections && options.sections[this._mode]) {\r\n\t\t\t\tvar view = this._props[this._mode];\r\n\t\t\t\tindex = view.order[options.sections[this._mode]];\r\n\r\n\t\t\t\tvar inner_index = view.order[options.sections[this._mode]];\r\n\t\t\t\tif(!(view.days > 1)){\r\n\t\t\t\t\tindex = inner_index;\r\n\t\t\t\t\tif (view.size && (index > view.position+view.size)) {\r\n\t\t\t\t\t\tindex = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar units_l = view.size || view.options.length;\r\n\t\t\t\t\tindex = index*units_l + inner_index;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tarea = area ? area : scheduler.locate_holder(index);\r\n\r\n\t\t\tfor (var i = 0; i < zones.length; i+=2){\r\n\t\t\t\tvar start = Math.max(zones[i], c.first_hour*60);\r\n\t\t\t\tvar end = Math.min(zones[i+1], c.last_hour*60);\r\n\t\t\t\tif (end <= start) {\r\n\t\t\t\t\tif (i+2 < zones.length)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\treturn [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar block = scheduler._get_block_by_config(options);\r\n\t\t\t\tblock.className = css_classes;\r\n\r\n\t\t\t\t// +1 for working with section which really takes up whole height (as % would be == 0)\r\n\t\t\t\tvar all_hours_height = this.config.hour_size_px*24 + 1;\r\n\t\t\t\tvar hour_ms = 60*60*1000;\r\n\t\t\t\tblock.style.top = (Math.round((start*60*1000-this.config.first_hour*hour_ms)*this.config.hour_size_px/hour_ms) % all_hours_height) + \"px\";\r\n\t\t\t\tblock.style.height = Math.max((Math.round(((end-start)*60*1000)*this.config.hour_size_px/hour_ms)) % all_hours_height, 1)+\"px\";\r\n\r\n\t\t\t\tarea.appendChild(block);\r\n\t\t\t\tblocks.push(block);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn blocks;\r\n\t};\r\n\r\n\tscheduler._mark_timespans = function(){\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\t\tvar divs = [];\r\n\t\tif (scheduler._table_view && scheduler._mode == \"month\"){\r\n\t\t\tfor (var day in this._scales) {\r\n\t\t\t\tvar date = new Date(+day);\r\n\t\t\t\tdivs.push.apply(divs, scheduler._on_scale_add_marker(this._scales[day],date));\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\t//manually trigger rendering of configs for each column\r\n\t\t\tvar date = new Date(scheduler._min_date);\r\n\t\t\tfor (var i = 0, len = data.childNodes.length; i < len; i++) {\r\n\t\t\t\tvar area = data.childNodes[i];\r\n\t\t\t\tif (area.firstChild && scheduler._getClassName(area.firstChild).indexOf(\"dhx_scale_hour\") > -1) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdivs.push.apply(divs, scheduler._on_scale_add_marker(area, date));\r\n\t\t\t\tdate = scheduler.date.add(date, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn divs;\r\n\t};\r\n\r\n\t// just marks timespan, will be cleaned after refresh\r\n\tscheduler.markTimespan = function(configuration) {\r\n\t\tif(!this._els){\r\n\t\t\tthrow new Error(\"`scheduler.markTimespan` can't be used before scheduler initialization. Place `scheduler.markTimespan` call after `scheduler.init`.\");\r\n\t\t}\r\n\r\n\r\n\t\tvar rebuild_els = false;\r\n\t\tif(!this._els[\"dhx_cal_data\"]){\r\n\t\t\tscheduler.get_elements();\r\n\t\t\trebuild_els = true;\r\n\t\t}\r\n\r\n\r\n\t\t// backup regular marked timespans\r\n\t\tvar timespans_ids = scheduler._marked_timespans_ids,\r\n\t\t\ttimespan_types = scheduler._marked_timespans_types,\r\n\t\t\ttimespans = scheduler._marked_timespans;\r\n\r\n\t\tscheduler.deleteMarkedTimespan();\r\n\r\n\t\t//add block to configs\r\n\t\tscheduler.addMarkedTimespan(configuration);\r\n\r\n\t\tvar divs = scheduler._mark_timespans();\r\n\r\n\t\tif(rebuild_els)\r\n\t\t\tscheduler._els = [];\r\n\r\n\t\t// restore timespan config\r\n\t\tscheduler._marked_timespans_ids = timespans_ids;\r\n\t\tscheduler._marked_timespans_types = timespan_types;\r\n\t\tscheduler._marked_timespans = timespans;\r\n\r\n\t\treturn divs;\r\n\t};\r\n\tscheduler.unmarkTimespan = function(divs) {\r\n\t\tif (!divs)\r\n\t\t\treturn;\r\n\t\tfor (var i=0; i c_zone_end && zone_start <= c_zone_end) || (zone_start < c_zone_start && zone_end >= c_zone_start)) {\r\n\t\t\t\t\tresulting_zones[i] = Math.min(c_zone_start, zone_start);\r\n\t\t\t\t\tresulting_zones[i+1] = Math.max(c_zone_end, zone_end);\r\n\t\t\t\t\ti -= 2;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!isLast) // do nothing, maybe next current zone will match or will be last\r\n\t\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\t\tvar offset = (c_zone_start > zone_start)?0:2;\r\n\t\t\t\t\tresulting_zones.splice(i+offset, 0, zone_start, zone_end); // last current zone, need to add another\r\n\t\t\t\t}\r\n\t\t\t\tzones.splice(k--,2); // zone was merged or added, need to exclude it\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn resulting_zones;\r\n\t};\r\n\tscheduler._subtract_timespan_zones = function(current_zones, zones) {\r\n\t\tvar resulting_zones = current_zones.slice();\r\n\t\tfor (var i=0; i c_zone_start && zone_start < c_zone_end) {\r\n\t\t\t\t\tvar is_modified = false;\r\n\t\t\t\t\tif (c_zone_start >= zone_start && c_zone_end <= zone_end) {\r\n\t\t\t\t\t\tresulting_zones.splice(i, 2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (c_zone_start < zone_start) {\r\n\t\t\t\t\t\tresulting_zones.splice(i, 2, c_zone_start, zone_start);\r\n\t\t\t\t\t\tis_modified = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (c_zone_end > zone_end) {\r\n\t\t\t\t\t\tresulting_zones.splice( (is_modified)?(i+2):i, (is_modified)?0:2, zone_end, c_zone_end);\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti -= 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn resulting_zones;\r\n\t};\r\n\tscheduler.invertZones = function(zones) {\r\n\t\treturn scheduler._subtract_timespan_zones([0, 1440], zones.slice());\r\n\t};\r\n\tscheduler._delete_marked_timespan_by_id = function(id) {\r\n\t\tvar configs = scheduler._marked_timespans_ids[id];\r\n\t\tif (configs) {\r\n\t\t\tfor (var i=0; i 1)){\r\n\t\t\t\tday = scheduler.date.date_part(new Date(this._date)); // for units view actually only 1 day is displayed yet the day variable will change, need to use this._date for all calls\r\n\t\t\t}else{\r\n\t\t\t\tvar dx = 24*60*60*1000;\r\n\t\t\t\tvar day_ind = Math.round((day - scheduler._min_date)/dx);\r\n\t\t\t\tvar unitsPerDay = view.size || units.length;\r\n\t\t\t\tday = scheduler.date.add(scheduler._min_date, Math.floor(day_ind/unitsPerDay), \"day\"); // to the \"same\" day for all sections\r\n\t\t\t\tday = scheduler.date.date_part(day);\r\n\t\t\t}\r\n\t\t\tday_index = day.getDay();\r\n\t\t\tday_value = day.valueOf();\r\n\r\n\t\t\tif (timespans[mode] && timespans[mode][unit.key]) {\r\n\t\t\t\tvar unit_zones = timespans[mode][unit.key];\r\n\t\t\t\tvar unit_types = scheduler._get_types_to_render(unit_zones[day_index], unit_zones[day_value]);\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(unit_types));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar global_data = timespans[\"global\"];\r\n\r\n\t\tif(scheduler.config.overwrite_marked_timespans){\r\n\t\t\tvar day_types = global_data[day_value]||global_data[day_index];\r\n\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(day_types));\r\n\t\t} else {\r\n\t\t\tif(global_data[day_value]){\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(global_data[day_value]));\r\n\t\t\t}\r\n\t\t\tif(global_data[day_index]){\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(global_data[day_index]));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (var i=0; i {\r\n\t\t\tif(date){\r\n\t\t\t\tcalls.setModeDate.date = date;\r\n\t\t\t}\r\n\t\t\tif(mode){\r\n\t\t\t\tcalls.setModeDate.mode = mode;\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tvar methods = {\r\n\t\t\trender:(date, mode) => {calls.needRender = true; rememberModeDate(date, mode);},\r\n\t\t\tsetCurrentView:(date, mode) => {calls.needRender = true; rememberModeDate(date, mode);},\r\n\t\t\tupdateView:(date, mode) => {calls.needUpdateView = true; rememberModeDate(date, mode);},\r\n\t\t\trender_data:() => calls.needRender = true,\r\n\t\t\trender_view_data:(evs) => { \r\n\t\t\t\tif(evs && evs.length){\r\n\t\t\t\t\tevs.forEach((e) => calls.repaintEvents[e.id] = true);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcalls.needRender = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tdisableMethods.call(this, methods);\r\n\r\n\t\tisActive = true;\r\n\t\tthis.callEvent(\"onBeforeBatchUpdate\", []);\r\n\r\n\t\tbatchUpdatePayload(callback);\r\n\r\n\t\tthis.callEvent(\"onAfterBatchUpdate\", []);\r\n\r\n\t\trestoreMethods.call(this);\r\n\r\n\t\tisActive = false;\r\n\t\tif(!noRedraw){\r\n\t\t\tif(calls.needRender){\r\n\t\t\t\tscheduler.render(calls.setModeDate.date, calls.setModeDate.mode);\r\n\t\t\t}else if(calls.needUpdateView){\r\n\t\t\t\tscheduler.updateView(calls.setModeDate.date, calls.setModeDate.mode);\r\n\t\t\t}else{\r\n\t\t\t\tfor(const i in calls.repaintEvents){\r\n\t\t\t\t\tscheduler.updateEvent(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (call_dp) {\r\n\t\t\tthis._dp.setUpdateMode(dp_mode);\r\n\t\t\tthis._dp.sendData();\r\n\t\t}\r\n\t};\r\n}\r\n\r\nexport default function(scheduler){\r\n\tscheduler.batchUpdate = createMethod(scheduler);\r\n}","import dragHighlightPos from \"./drag_highlight_pos\";\r\nimport undoDelete from \"./undo_delete\";\r\nimport limit from \"./limit\";\r\nimport batchUpdate from \"./batch_update\";\r\n\r\nexport default function initPlugins(scheduler){\r\n undoDelete(scheduler);\r\n dragHighlightPos(scheduler);\r\n limit(scheduler);\r\n batchUpdate(scheduler);\r\n}","export default function undoDelete(scheduler) {\r\n\tscheduler.attachEvent(\"onEventDeleted\", function (id, ev) {\r\n\t\tlet deletedEvent = scheduler.copy(ev);\r\n\t\tif (scheduler.config.undo_deleted && !scheduler.getState().new_event) {\r\n\t\t\tscheduler.message({\r\n\t\t\t\ttext: `
\r\n Event deleted\r\n \r\n
`,\r\n\t\t\t\texpire: 10000,\r\n\t\t\t\ttype: \"popup_after_delete\",\r\n\t\t\t\tcallback: function (e) {\r\n\t\t\t\t\tlet undoBtn = e.target.closest(\r\n\t\t\t\t\t\t`[data-deleted-event-id=\"${ev.id}\"]`\r\n\t\t\t\t\t);\r\n\t\t\t\t\tif (undoBtn) {\r\n\t\t\t\t\t\tscheduler.addEvent(deletedEvent);\r\n\t\t\t\t\t\tscheduler.render();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t});\r\n}\r\n","var uidSeed = Date.now();\r\nfunction uid () {\r\n\treturn uidSeed++;\r\n}\r\n\r\n// iframe-safe array type check instead of using instanceof\r\nfunction isArray(obj){\r\n\tif(Array.isArray){\r\n\t\treturn Array.isArray(obj);\r\n\t}else{\r\n\t\t// close enough\r\n\t\treturn (obj && obj.length !== undefined && obj.pop && obj.push);\r\n\t}\r\n}\r\n\r\n// non-primitive string object, e.g. new String(\"abc\")\r\nfunction isStringObject(obj){\r\n\treturn obj && typeof obj === \"object\" && \r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function String() { [native code] }\";\r\n}\r\n\r\n// non-primitive number object, e.g. new Number(5)\r\nfunction isNumberObject(obj){\r\n\treturn obj && typeof obj === \"object\" && \r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function Number() { [native code] }\";\r\n}\r\n\r\n// non-primitive number object, e.g. new Boolean(true)\r\nfunction isBooleanObject(obj){\r\n\treturn obj && typeof obj === \"object\" &&\r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function Boolean() { [native code] }\";\r\n}\r\n\r\nfunction isDate(obj) {\r\n\tif (obj && typeof obj === \"object\") {\r\n\t\treturn !!(obj.getFullYear && obj.getMonth && obj.getDate);\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\nfunction defined(obj) {\r\n\treturn typeof(obj) != \"undefined\";\r\n}\r\n\r\nfunction delay (callback, timeout){\r\n\tvar timer;\r\n\r\n\tvar result = function() {\r\n\t\tresult.$cancelTimeout();\r\n\t\tresult.$pending = true;\r\n\t\tvar args = Array.prototype.slice.call(arguments);\r\n\t\ttimer = setTimeout(function(){\r\n\t\t\tcallback.apply(this, args);\r\n\t\t\tresult.$pending = false;\r\n\t\t}, timeout);\r\n\t};\r\n\r\n\tresult.$pending = false;\r\n\tresult.$cancelTimeout = function(){\r\n\t\tclearTimeout(timer);\r\n\t\tresult.$pending = false;\r\n\t};\r\n\tresult.$execute = function(){\r\n\t\tvar args = Array.prototype.slice.call(arguments);\r\n\t\tcallback.apply(this, args);\r\n\t\tresult.$cancelTimeout();\r\n\t};\r\n\r\n\treturn result;\r\n}\r\n\r\nexport default {\r\n\tuid: uid,\r\n\tmixin: function mixin (target, source, force){\r\n\t\tfor (var f in source)\r\n\t\t\tif (((target[f] === undefined) || force)) target[f]=source[f];\r\n\t\treturn target;\r\n\t},\r\n\tcopy: function copy(object) {\r\n\t\tvar i, result; // iterator, types array, result\r\n\t\r\n\t\tif (object && typeof object == \"object\") {\r\n\t\r\n\t\t\tswitch (true){\r\n\t\t\t\tcase (isDate(object)):\r\n\t\t\t\t\tresult = new Date(object);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isArray(object)):\r\n\t\t\t\t\tresult = new Array(object.length);\r\n\t\t\t\t\tfor(i = 0; i < object.length; i++){\r\n\t\t\t\t\t\tresult[i] = copy(object[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isStringObject(object)):\r\n\t\t\t\t\tresult = new String(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isNumberObject(object)):\r\n\t\t\t\t\tresult = new Number(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isBooleanObject(object)):\r\n\t\t\t\t\tresult = new Boolean(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tresult = {};\r\n\t\t\t\t\tfor (i in object) {\r\n\t\t\t\t\t\tconst varType = typeof object[i];\r\n\r\n\t\t\t\t\t\tif (varType === \"string\" || varType === \"number\" || varType === \"boolean\" ) {\r\n\t\t\t\t\t\t\tresult[i] = object[i];\r\n\t\t\t\t\t\t} else if(isDate(object[i])){\r\n\t\t\t\t\t\t\tresult[i] = new Date(object[i]);\r\n\t\t\t\t\t\t}else if (Object.prototype.hasOwnProperty.apply(object, [i]))\r\n\t\t\t\t\t\t\tresult[i] = copy(object[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result || object;\r\n\t},\r\n\tdefined,\r\n\tisDate,\r\n\tdelay\r\n};\r\n","export default function extend(scheduler) {\r\n\r\nfunction div(className){\r\n\tvar element = document.createElement(\"div\");\r\n\tvar classes = (className || \"\").split(\" \");\r\n\tclasses.forEach(function(cssClass){\r\n\t\telement.classList.add(cssClass);\r\n\t});\r\n\treturn element;\r\n}\r\nvar itemTypes = {\r\n\trows_container: function(){\r\n\t\treturn div(\"dhx_cal_navbar_rows_container\");\r\n\t},\r\n\trow: function(){\r\n\t\treturn div(\"dhx_cal_navbar_row\");\r\n\t},\r\n\tview: function (config) {\r\n\t\tvar element = div(\"dhx_cal_tab\");\r\n\t\telement.setAttribute(\"name\", config.view + \"_tab\");\r\n\t\telement.setAttribute(\"data-tab\", config.view);\r\n\t\t// element.setAttribute(\"data-viewname\", config.view); // FIXME: need to remove? not used anywhere\r\n\t\tif(scheduler.config.fix_tab_position){\r\n\t\t\tif(config.$firstTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_first\");\r\n\t\t\t}else if(config.$lastTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_last\");\r\n\t\t\t} else if(config.view !== \"week\") {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_standalone\");\r\n\t\t\t}\r\n\r\n\t\t\tif(config.$segmentedTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn element;\r\n\t},\r\n\tdate: function () {\r\n\t\treturn div(\"dhx_cal_date\");\r\n\t},\r\n\tbutton: function (config) {\r\n\t\treturn div(\"dhx_cal_nav_button dhx_cal_nav_button_custom dhx_cal_tab\");\r\n\t},\r\n\tbuiltInButton: function (config){\r\n\t\treturn div(\"dhx_cal_\" + config.view + \"_button dhx_cal_nav_button\");\r\n\t},\r\n\tspacer: function () {\r\n\t\treturn div(\"dhx_cal_line_spacer\");\r\n\t},\r\n\tminicalendarButton: function(config){\r\n\t\tvar minicalendarDiv = div('dhx_minical_icon');\r\n\t\tif(!config.click && !minicalendarDiv.$_eventAttached){\r\n\t\t\t\r\n\t\t\tscheduler.event(minicalendarDiv, \"click\", function () {\r\n\t\t\t\tif (scheduler.isCalendarVisible()) {\r\n\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tscheduler.renderCalendar({\r\n\t\t\t\t\t\tposition: this,\r\n\t\t\t\t\t\tdate: scheduler.getState().date,\r\n\t\t\t\t\t\tnavigation: true,\r\n\t\t\t\t\t\thandler: function (date, calendar) {\r\n\t\t\t\t\t\t\tscheduler.setCurrentView(date);\r\n\t\t\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn minicalendarDiv;\r\n\t},\r\n\thtml_element: function (config) {\r\n\t\treturn div(\"dhx_cal_nav_content\");\r\n\t}\r\n};\r\n\r\nfunction findRenderer(config) {\r\n\tvar renderer;\r\n\tif (config.view) {\r\n\t\tswitch (config.view){\r\n\t\t\tcase \"today\":\r\n\t\t\tcase \"next\":\r\n\t\t\tcase \"prev\":\r\n\t\t\t\trenderer = itemTypes.builtInButton;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"date\":\r\n\t\t\t\trenderer = itemTypes.date;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"spacer\":\r\n\t\t\t\trenderer = itemTypes.spacer;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"button\":\r\n\t\t\t\trenderer = itemTypes.button;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"minicalendar\":\r\n\t\t\t\trenderer = itemTypes.minicalendarButton;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\trenderer = itemTypes.view;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t} else if(config.rows) {\r\n\t\trenderer = itemTypes.rows_container;\r\n\t} else if(config.cols) {\r\n\t\trenderer = itemTypes.row;\r\n\t}\r\n\treturn renderer;\r\n}\r\n\r\nfunction renderElement(config){\r\n\tvar renderer = findRenderer(config);\r\n\tif(!renderer){\r\n\t\treturn;\r\n\t}\r\n\tvar element = renderer(config);\r\n\tif(config.css){\r\n\t\telement.classList.add(config.css);\r\n\t}\r\n\tif(config.width){\r\n\t\tvar value = config.width;\r\n\t\tif(value === value * 1){\r\n\t\t\tvalue += \"px\";\r\n\t\t}\r\n\t\telement.style.width = value;\r\n\t}\r\n\tif(config.height){\r\n\t\tvar value = config.height;\r\n\t\tif(value === value * 1){\r\n\t\t\tvalue += \"px\";\r\n\t\t}\r\n\t\telement.style.height = value;\r\n\t}\r\n\tif (config.click) {\r\n\t\tscheduler.event(element, \"click\", config.click);\r\n\t}\r\n\tif (config.html) {\r\n\t\telement.innerHTML = config.html;\r\n\t}\r\n\r\n\tif (config.align) {\r\n\t\tvar value = \"\";\r\n\t\tif (config.align == \"right\") {\r\n\t\t\tvalue = \"flex-end\";\r\n\t\t} else if(config.align == \"left\") {\r\n\t\t\tvalue = \"flex-start\";\r\n\t\t}\r\n\t\telement.style.justifyContent = value;\r\n\t}\r\n\treturn element;\r\n}\r\n\r\nfunction prepareConfig(config) {\r\n\tif (typeof config === \"string\") {\r\n\t\tconfig = {\r\n\t\t\tview: config\r\n\t\t};\r\n\t}\r\n\tif (!config.view && !config.rows && !config.cols) {\r\n\t\tconfig.view = \"button\";\r\n\t}\r\n\treturn config;\r\n}\r\n\r\nfunction renderLayout(config) {\r\n\tvar fragment = document.createDocumentFragment();\r\n\tvar items;\r\n\tif(Array.isArray(config)){\r\n\t\titems = config;\r\n\t}else{\r\n\t\titems = [config];\r\n\t}\r\n\r\n\tfor (var i = 0; i < items.length; i++) {\r\n\t\tvar view = prepareConfig(items[i]);\r\n\r\n\t\tif(view.view === \"day\" && items[i + 1]){\r\n\t\t\tvar next = prepareConfig(items[i + 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"month\"){\r\n\t\t\t\tview.$firstTab = true;\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(view.view === \"week\" && items[i - 1]){\r\n\t\t\tvar next = prepareConfig(items[i + 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"month\"){\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(view.view === \"month\" && items[i - 1]){\r\n\t\t\tvar next = prepareConfig(items[i - 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"day\"){\r\n\t\t\t\tview.$lastTab = true;\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar element = renderElement(view);\r\n\r\n\t\tfragment.appendChild(element);\r\n\t\tif(view.cols || view.rows){\r\n\t\t\telement.appendChild(renderLayout(view.cols || view.rows));\r\n\t\t}\r\n\t}\r\n\treturn fragment;\r\n}\r\n\r\nscheduler._init_nav_bar = function (items) {\r\n\tvar navBar = this.$container.querySelector(\".dhx_cal_navline\");\r\n\tif (!navBar){\r\n\t\tnavBar = document.createElement(\"div\");\r\n\t\tnavBar.className = \"dhx_cal_navline dhx_cal_navline_flex\";\r\n\t\tscheduler._update_nav_bar(items, navBar);\r\n\t\treturn navBar;\r\n\t}\r\n\treturn navBar;\r\n};\r\n\r\nvar previousNavbar = null;\r\nvar previousHeight = null;\r\nscheduler._update_nav_bar = function (config, container) {\r\n\r\n\tif(!config){\r\n\t\treturn;\r\n\t}\r\n\tvar heightChanged = false;\r\n\tvar configChanged = false;\r\n\r\n\tvar newHeight = config.height || scheduler.xy.nav_height;\r\n\r\n\tif(previousHeight === null ||\r\n\t\t\t(previousHeight !== newHeight)){\r\n\t\theightChanged = true;\r\n\t}\r\n\tif(!previousNavbar || JSON.stringify(config) !== previousNavbar){\r\n\t\tconfigChanged = true;\r\n\t}\r\n\r\n\tif(heightChanged){\r\n\t\tscheduler.xy.nav_height = newHeight;\r\n\t}\r\n\tif(configChanged){\r\n\t\tcontainer.innerHTML = \"\";\r\n\t\tcontainer.appendChild(renderLayout(config));\r\n\t}\r\n\r\n\tif(heightChanged || configChanged){\r\n\t\tscheduler.unset_actions();\r\n\t\tscheduler._els = [];\r\n\t\tscheduler.get_elements();\r\n\t\tscheduler.set_actions();\r\n\t}\r\n\r\n\tif(newHeight === 0){\r\n\t\tcontainer.style.display = \"none\";\r\n\t}else{\r\n\t\tcontainer.style.display = \"\";\r\n\t}\r\n\r\n\tpreviousHeight = newHeight;\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\tfunction isAttachedNode(container){\r\n\t\tvar root = document.body;\r\n\t\r\n\t\twhile(container && container != root){\r\n\t\t\tcontainer = container.parentNode;\r\n\t\t}\r\n\t\r\n\t\treturn !!(root == container);\r\n\t}\r\n\t\r\n\tfunction getWindowSize(window){\r\n\t\treturn {\r\n\t\t\tw : window.innerWidth || document.documentElement.clientWidth,\r\n\t\t\th : window.innerHeight || document.documentElement.clientHeight\r\n\t\t};\r\n\t}\r\n\tfunction equals(a,b){\r\n\t\treturn a.w == b.w && a.h == b.h;\r\n\t}\r\n\t\r\n\tfunction listenWindowResize(scheduler, window){\r\n\t\tvar oldSize = getWindowSize(window);\r\n\t\tvar resizeDelay;\r\n\t\tscheduler.event(window, \"resize\", function(){\r\n\t\t\tclearTimeout(resizeDelay);\r\n\t\t\tresizeDelay = setTimeout(function(){\r\n\r\n\t\t\t\tif (!isAttachedNode(scheduler.$container) || scheduler.$destroyed){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tvar newSize = getWindowSize(window);\r\n\t\t\t\t// element may be resized by container-autoresize exteinsion\r\n\t\t\t\t// check if the size is actually changed in order to not to get endless loop\r\n\t\t\t\tif (!equals(oldSize, newSize)) {\r\n\t\t\t\t\toldSize = newSize;\r\n\t\t\t\t\ttriggerSchedulerResize(scheduler);\r\n\t\t\t\t}\r\n\t\t\t}, 150);\r\n\t\t});\r\n\t}\r\n\t\r\n\tfunction triggerSchedulerResize(scheduler){\r\n\t\tif(scheduler.$destroyed || !scheduler.$root || !isAttachedNode(scheduler.$root)){\r\n\t\t\treturn;\t\r\n\t\t}\r\n\t\tif (scheduler.callEvent(\"onSchedulerResize\", [])) {\r\n\t\t\tscheduler.updateView();\r\n\t\t\tscheduler.callEvent(\"onAfterSchedulerResize\", []);\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction watchNodeResize(scheduler){\r\n\t\tvar previousHeight = scheduler.$root.offsetHeight;\r\n\t\tvar previousWidth = scheduler.$root.offsetWidth;\r\n\t\t\r\n\t\tfunction lowlevelResizeWatcher(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(scheduler.$root){\r\n\t\t\t\tif (scheduler.$root.offsetHeight != previousHeight ||\r\n\t\t\t\t\tscheduler.$root.offsetWidth != previousWidth){\r\n\t\t\t\t\ttriggerSchedulerResize(scheduler);\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\tpreviousHeight = scheduler.$root.offsetHeight;\r\n\t\t\t\tpreviousWidth = scheduler.$root.offsetWidth;\r\n\t\t\t}\r\n\t\r\n\t\t\tsetTimeout(lowlevelResizeWatcher, 200);\r\n\t\t}\r\n\t\t\r\n\t\tlowlevelResizeWatcher();\r\n\t}\r\n\t\r\n\tfunction addResizeListener(scheduler){\r\n\t\tvar root = scheduler.$container;\r\n\t\tvar containerStyles = window.getComputedStyle(root);\r\n\t\tif(containerStyles.getPropertyValue(\"position\") == \"static\"){\r\n\t\t\troot.style.position = \"relative\";\r\n\t\t}\r\n\t\r\n\t\tvar resizeWatcher = document.createElement('iframe');\r\n\t\tresizeWatcher.className = \"scheduler_container_resize_watcher\";\r\n\t\tresizeWatcher.tabIndex = -1;\r\n\t\tif(scheduler.config.wai_aria_attributes){\r\n\t\t\tresizeWatcher.setAttribute(\"role\", \"none\");\r\n\t\t\tresizeWatcher.setAttribute(\"aria-hidden\", true);\r\n\t\t}\r\n\t\r\n\t\t// in some environments (namely, in SalesForce) iframe.contentWindow is not available\r\n\t\tvar salesforce_environment = !!window[\"Sfdc\"] || !!window[\"$A\"] || window[\"Aura\"];\r\n\t\tif(salesforce_environment){\r\n\t\t\twatchNodeResize(scheduler);\r\n\t\t} else {\r\n\t\t\troot.appendChild(resizeWatcher);\r\n\t\t\tif (resizeWatcher.contentWindow) {\r\n\t\t\t\tlistenWindowResize(scheduler, resizeWatcher.contentWindow);\r\n\t\t\t} else {\r\n\t\t\t\t// if so - ditch the iframe and fallback to listening the main window resize\r\n\t\t\t\troot.removeChild(resizeWatcher);\r\n\t\t\t\tlistenWindowResize(scheduler, window);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\taddResizeListener(scheduler);\r\n\r\n}","class EventHost {\r\n\tconstructor(){\r\n\t\tthis._silent_mode = false;\r\n\t\tthis.listeners = {};\r\n\t}\r\n\t_silentStart(){\r\n\t\tthis._silent_mode = true;\r\n\t}\r\n\t_silentEnd() {\r\n\t\tthis._silent_mode = false;\r\n\t}\r\n}\r\n\r\nconst createEventStorage = function(obj) {\r\n\tlet handlers = {};\r\n\tlet index = 0;\r\n\tconst eventStorage = function(){\r\n\t\tlet combinedResult = true;\r\n\t\tfor(const i in handlers){\r\n\t\t\tconst handlerResult = handlers[i].apply(obj, arguments);\r\n\t\t\tcombinedResult=combinedResult && handlerResult;\r\n\t\t}\r\n\t\treturn combinedResult;\r\n\t};\r\n\teventStorage.addEvent=function(handler, settings){\r\n\t\tif (typeof (handler) == \"function\"){\r\n\t\t\tlet handlerId;\r\n\t\t\tif(settings && settings.id){\r\n\t\t\t\thandlerId = settings.id;\r\n\t\t\t}else{\r\n\t\t\t\thandlerId = index;\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\r\n\t\t\tif(settings && settings.once){\r\n\t\t\t\tconst originalHandler = handler;\r\n\t\t\t\thandler = function(){\r\n\t\t\t\t\toriginalHandler();\r\n\t\t\t\t\teventStorage.removeEvent(handlerId);\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\thandlers[handlerId] = handler;\r\n\t\t\treturn handlerId;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\teventStorage.removeEvent=function(id){\r\n\t\tdelete handlers[id];\r\n\t};\r\n\r\n\teventStorage.clear = function(){\r\n\t\thandlers = {};\r\n\t};\r\n\r\n\treturn eventStorage;\r\n};\r\n\r\nfunction makeEventable(obj){\r\n\r\n\tconst eventHost = new EventHost();\r\n\tobj.attachEvent=function(eventName, handler, settings){\r\n\t\teventName = 'ev_'+eventName.toLowerCase();\r\n\t\tif (!eventHost.listeners[eventName]){\r\n\t\t\teventHost.listeners[eventName] = createEventStorage(this);\r\n\t\t}\r\n\r\n\t\tif(settings && settings.thisObject){\r\n\t\t\thandler = handler.bind(settings.thisObject);\r\n\t\t}\r\n\r\n\t\tconst innerId = eventHost.listeners[eventName].addEvent(handler, settings);\r\n\r\n\t\tlet handlerId = (eventName+':'+innerId); //return ID (ev_eventname:1)\r\n\t\tif(settings && settings.id){\r\n\t\t\thandlerId = settings.id;\r\n\t\t}\r\n\t\treturn handlerId;\r\n\t};\r\n\r\n\tobj.attachAll = function(callback){\r\n\t\tthis.attachEvent('listen_all', callback);\r\n\t};\r\n\r\n\tobj.callEvent=function(name, eventArguments){\r\n\t\tif (eventHost._silent_mode) return true;\r\n\r\n\t\tconst handlerName = 'ev_'+name.toLowerCase();\r\n\r\n\t\tconst listeners = eventHost.listeners;\r\n\t\tif (listeners['ev_listen_all']){\r\n\t\t\tlisteners['ev_listen_all'].apply(this, [name].concat(eventArguments));\r\n\t\t}\r\n\r\n\t\tif (listeners[handlerName])\r\n\t\t\treturn listeners[handlerName].apply(this, eventArguments);\r\n\t\treturn true;\r\n\t};\r\n\r\n\tobj.checkEvent=function(name){\r\n\t\tconst listeners = eventHost.listeners;\r\n\t\treturn (!!listeners['ev_'+name.toLowerCase()]);\r\n\t};\r\n\r\n\tobj.detachEvent=function(id){\r\n\t\tif (id){\r\n\t\t\tlet listeners = eventHost.listeners;\r\n\t\t\tfor(const i in listeners){\r\n\t\t\t\tlisteners[i].removeEvent(id); //remove event\r\n\t\t\t}\r\n\r\n\t\t\tconst list = id.split(':');//get EventName and ID\r\n\t\t\tlisteners = eventHost.listeners;\r\n\t\t\tif(list.length === 2){\r\n\t\t\t\tconst eventName = list[0];\r\n\t\t\t\tconst eventId = list[1];\r\n\t\t\t\tif(listeners[eventName]){\r\n\t\t\t\t\tlisteners[eventName].removeEvent(eventId); //remove event\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tobj.detachAllEvents = function(){\r\n\t\tfor (const name in eventHost.listeners) {\r\n\t\t\teventHost.listeners[name].clear();\r\n\t\t}\r\n\t};\r\n\r\n}\r\n\r\nexport default makeEventable;","export default {\r\n\tevent: function (el, event, handler){\r\n\t\tif (el.addEventListener)\r\n\t\t\tel.addEventListener(event, handler, false);\r\n\t\r\n\t\telse if (el.attachEvent)\r\n\t\t\tel.attachEvent(\"on\"+event, handler);\r\n\t},\r\n\teventRemove: function (el, event, handler){\r\n\t\tif (el.removeEventListener)\r\n\t\t\tel.removeEventListener(event, handler, false);\r\n\t\r\n\t\telse if (el.detachEvent)\r\n\t\t\tel.detachEvent(\"on\"+event, handler);\r\n\t}\r\n};","import createEventScope from './utils/scoped_event';\r\n\r\nexport default function extend(scheduler) {\r\n\r\n\r\nvar domEvents = createEventScope();\r\n\r\nscheduler.event = domEvents.attach;\r\nscheduler.eventRemove = domEvents.detach;\r\nscheduler._eventRemoveAll = domEvents.detachAll;\r\nscheduler._createDomEventScope = domEvents.extend;\r\n\r\n\r\nscheduler._trim = function(str){\r\n\tvar func = String.prototype.trim || function(){ return this.replace(/^\\s+|\\s+$/g, \"\"); };\r\n\treturn func.apply(str);\r\n};\r\n\r\nscheduler._isDate = function(obj){\r\n\tif (obj && typeof obj == \"object\") {\r\n\t\treturn !!(obj.getFullYear && obj.getMonth && obj.getDate);\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n};\r\n\r\nscheduler._isObject = function(obj){\r\n\treturn (obj && typeof obj == \"object\");\r\n};\r\n\r\n}","import defaultDomEvents from './event';\r\n\r\nexport default function(){\r\n\r\n\tvar domEvents = function (addEvent, removeEvent) {\r\n\t\taddEvent = addEvent || defaultDomEvents.event;\r\n\t\tremoveEvent = removeEvent || defaultDomEvents.eventRemove;\r\n\t\tvar handlers = [];\r\n\t\tvar eventScope = {\r\n\t\t\tattach: function(el, event, callback, capture){\r\n\t\t\t\thandlers.push({element: el, event:event, callback: callback, capture: capture});\r\n\t\t\t\taddEvent(el, event, callback, capture);\r\n\t\t\t},\r\n\t\t\tdetach: function(el, event, callback, capture){\r\n\t\t\t\tremoveEvent(el, event, callback, capture);\r\n\t\t\t\tfor(var i = 0; i < handlers.length; i++){\r\n\t\t\t\t\tvar handler = handlers[i];\r\n\t\t\t\t\tif (handler.element === el && handler.event === event && handler.callback === callback && handler.capture === capture) {\r\n\t\t\t\t\t\thandlers.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tdetachAll: function () {\r\n\t\t\t\tvar staticArray = handlers.slice();\r\n\t\t\t\t// original handlers array can be spliced on every iteration\r\n\t\t\t\tfor (var i = 0; i < staticArray.length; i++){\r\n\t\t\t\t\tvar handler = staticArray[i];\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, handler.capture);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, undefined);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, false);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, true);\r\n\t\t\t\t}\r\n\t\t\t\thandlers.splice(0, handlers.length);\r\n\t\t\t},\r\n\t\t\textend: function(){\r\n\t\t\t\treturn domEvents(this.event, this.eventRemove);\r\n\t\t\t}\r\n\t\t};\r\n\t\treturn eventScope;\r\n\t};\r\n\t\r\n\treturn domEvents();\r\n}","//returns position of html element on the page\r\nfunction elementPosition(elem) {\r\n\tvar top=0, left=0, right=0, bottom=0;\r\n\tif (elem.getBoundingClientRect) { //HTML5 method\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\t\tvar body = document.body;\r\n\t\tvar docElem = (document.documentElement ||\r\n\t\t\tdocument.body.parentNode ||\r\n\t\t\tdocument.body);\r\n\r\n\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\t\ttop = box.top + scrollTop - clientTop;\r\n\t\tleft = box.left + scrollLeft - clientLeft;\r\n\r\n\t\tright = document.body.offsetWidth - box.right;\r\n\t\tbottom = document.body.offsetHeight - box.bottom;\r\n\t} else { //fallback to naive approach\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop,10);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft,10);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\r\n\t\tright = document.body.offsetWidth - elem.offsetWidth - left;\r\n\t\tbottom = document.body.offsetHeight - elem.offsetHeight - top;\r\n\t}\r\n\treturn { y: Math.round(top), x: Math.round(left), width:elem.offsetWidth, height:elem.offsetHeight, right: Math.round(right), bottom: Math.round(bottom) };\r\n}\r\n\r\n/*\r\nevent position relatively to DOM element\r\n */\r\nfunction getRelativeEventPosition(ev, node){\r\n\tvar d = document.documentElement;\r\n\tvar box = elementPosition(node);\r\n\r\n\treturn {\r\n\t\tx: ev.clientX - d.clientLeft - box.x + node.scrollLeft,\r\n\t\ty: ev.clientY - d.clientTop - box.y + node.scrollTop\r\n\t};\r\n}\r\n\r\nfunction getNodePosition(elem) {\r\n\tvar top=0, left=0, right=0, bottom=0;\r\n\tif (elem.getBoundingClientRect) { //HTML5 method\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\t\tvar body = document.body;\r\n\t\tvar docElem = (document.documentElement ||\r\n\t\t\tdocument.body.parentNode ||\r\n\t\t\tdocument.body);\r\n\r\n\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\t\ttop = box.top + scrollTop - clientTop;\r\n\t\tleft = box.left + scrollLeft - clientLeft;\r\n\r\n\t\tright = document.body.offsetWidth - box.right;\r\n\t\tbottom = document.body.offsetHeight - box.bottom;\r\n\t} else { //fallback to naive approach\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop,10);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft,10);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\r\n\t\tright = document.body.offsetWidth - elem.offsetWidth - left;\r\n\t\tbottom = document.body.offsetHeight - elem.offsetHeight - top;\r\n\t}\r\n\treturn { y: Math.round(top), x: Math.round(left), width:elem.offsetWidth, height:elem.offsetHeight, right: Math.round(right), bottom: Math.round(bottom) };\r\n}\r\n\r\nfunction getClassName(node){\r\n\tif(!node) return \"\";\r\n\r\n\tvar className = node.className || \"\";\r\n\tif(className.baseVal)//'className' exist but not a string - IE svg element in DOM\r\n\t\tclassName = className.baseVal;\r\n\r\n\tif(!className.indexOf)\r\n\t\tclassName = '';\r\n\r\n\treturn className || \"\";\r\n}\r\n\r\nfunction getTargetNode(e) {\r\n\tvar trg;\r\n\tif (e.tagName)\r\n\t\ttrg = e;\r\n\telse {\r\n\t\te = e || window.event;\r\n\t\ttrg = e.target || e.srcElement;\r\n\t\tif (trg.shadowRoot && e.composedPath) {\r\n\t\t\ttrg = e.composedPath()[0];\r\n\t\t}\r\n\t}\r\n\treturn trg;\r\n}\r\n\r\nfunction locateCss(e, classname, strict){\r\n\tif(strict === undefined)\r\n\t\tstrict = true;\r\n\r\n\tvar trg = e.target || e.srcElement;\r\n\tvar css = '';\r\n\r\n\twhile (trg){\r\n\t\tcss = getClassName(trg);\r\n\r\n\t\tif(css){\r\n\t\t\tvar ind = css.indexOf(classname);\r\n\t\t\tif (ind >= 0){\r\n\t\t\t\tif (!strict)\r\n\t\t\t\t\treturn trg;\r\n\r\n\t\t\t\t//check that we have exact match\r\n\t\t\t\tvar left = (ind === 0) || (!((css.charAt(ind - 1)||\"\").trim()));\r\n\t\t\t\tvar right = ((ind + classname.length >= css.length)) || (!((css.charAt(ind + classname.length)).trim()));\r\n\r\n\t\t\t\tif (left && right)\r\n\t\t\t\t\treturn trg;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttrg=trg.parentNode;\r\n\t}\r\n\treturn null;\r\n}\r\n\r\n\r\n// get focusable nodes\r\nfunction isVisible(node){\r\n\tvar display = false,\r\n\t\tvisibility = false;\r\n\tif(window.getComputedStyle){\r\n\t\tvar style = window.getComputedStyle(node, null);\r\n\t\tdisplay = style[\"display\"];\r\n\t\tvisibility = style[\"visibility\"];\r\n\t}else if(node.currentStyle){\r\n\t\tdisplay = node.currentStyle[\"display\"];\r\n\t\tvisibility = node.currentStyle[\"visibility\"];\r\n\t}\r\n\r\n\tvar hiddenSection = false;\r\n\tvar recurringSection = locateCss({target:node}, \"dhx_form_repeat\", false);\r\n\tif(recurringSection){\r\n\t\thiddenSection = !!(recurringSection.style.height == \"0px\");\r\n\t}\r\n\thiddenSection = hiddenSection || !(node.offsetHeight);\r\n\r\n\treturn (display != \"none\" && visibility != \"hidden\" && !hiddenSection);\r\n}\r\n\r\nfunction hasNonNegativeTabIndex(node){\r\n\treturn !isNaN(node.getAttribute(\"tabindex\")) && (node.getAttribute(\"tabindex\")*1 >= 0);\r\n}\r\n\r\nfunction hasHref(node){\r\n\tvar canHaveHref = {\"a\": true, \"area\": true};\r\n\tif(canHaveHref[node.nodeName.loLowerCase()]){\r\n\t\treturn !!node.getAttribute(\"href\");\r\n\t}\r\n\treturn true;\r\n}\r\n\r\nfunction isEnabled(node){\r\n\tvar canDisable = {\"input\":true, \"select\":true, \"textarea\":true, \"button\":true, \"object\":true};\r\n\tif(canDisable[node.nodeName.toLowerCase()]){\r\n\t\treturn !node.hasAttribute(\"disabled\");\r\n\t}\r\n\r\n\treturn true;\r\n}\r\n\r\n\r\nfunction getFocusableNodes(root){\r\n\tvar nodes = root.querySelectorAll([\r\n\t\t\"a[href]\",\r\n\t\t\"area[href]\",\r\n\t\t\"input\",\r\n\t\t\"select\",\r\n\t\t\"textarea\",\r\n\t\t\"button\",\r\n\t\t\"iframe\",\r\n\t\t\"object\",\r\n\t\t\"embed\",\r\n\t\t\"[tabindex]\",\r\n\t\t\"[contenteditable]\"\r\n\t].join(\", \"));\r\n\r\n\tvar nodesArray = Array.prototype.slice.call(nodes, 0);\r\n\t\r\n\tfor(var i = 0; i < nodesArray.length; i++){\r\n\t\tnodesArray[i].$position = i;\r\n\t\t// we remember original nodes order, \r\n\t\t// so when we sort them by tabindex we ensure order of nodes with same tabindex is preserved, \r\n\t\t// since some browsers do unstable sort\r\n\t}\r\n\t\r\n\tnodesArray.sort(function(a, b) {\r\n\t\tif(a.tabIndex === 0 && b.tabIndex !== 0){\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\tif(a.tabIndex !== 0 && b.tabIndex === 0){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\t\r\n\t\tif (a.tabIndex === b.tabIndex){\r\n\t\t\t// ensure we do stable sort\r\n\t\t\treturn a.$position - b.$position;\r\n\t\t}\r\n\t\tif (a.tabIndex < b.tabIndex) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn 1;\r\n\t});\r\n\t\r\n\tfor(var i = 0; i < nodesArray.length; i++){\r\n\t\tvar node = nodesArray[i];\r\n\t\tvar isValid = (hasNonNegativeTabIndex(node) || isEnabled(node) || hasHref(node)) && isVisible(node);\r\n\t\tif(!isValid){\r\n\t\t\tnodesArray.splice(i, 1);\r\n\t\t\ti--;\r\n\t\t}\r\n\t}\r\n\treturn nodesArray;\r\n}\r\n\r\n\r\nfunction isShadowDomSupported() {\r\n\treturn document.head.createShadowRoot || document.head.attachShadow;\r\n}\r\n\r\n/**\r\n * Returns element that has the browser focus, or null if no element has focus.\r\n * Works with shadow DOM, so it's prefereed to use this function instead of document.activeElement directly.\r\n * @returns HTMLElement\r\n */\r\nfunction getActiveElement(){\r\n\tvar activeElement = document.activeElement;\r\n\tif (activeElement.shadowRoot) {\r\n\t\tactiveElement = activeElement.shadowRoot.activeElement;\r\n\t}\r\n\tif (activeElement === document.body && document.getSelection) {\r\n\t\tactiveElement = document.getSelection().focusNode || document.body;\r\n\t}\r\n\r\n\treturn activeElement;\r\n}\r\n\r\n/**\r\n * Returns document.body or the host node of the ShadowRoot, if the element is attached to ShadowDom\r\n * @param {HTMLElement} element \r\n * @returns HTMLElement\r\n */\r\nfunction getRootNode(element) {\r\n\tif (!element) {\r\n\t\treturn document.body;\r\n\t}\r\n\tif (!isShadowDomSupported()) {\r\n\t\treturn document.body;\r\n\t}\r\n\twhile (element.parentNode && (element = element.parentNode)) {\r\n\t\tif (element instanceof ShadowRoot) {\r\n\t\t\treturn element.host;\r\n\t\t}\r\n\t}\r\n\treturn document.body;\r\n}\r\n\r\nfunction hasShadowParent(element) {\r\n\treturn !!getRootNode(element);\r\n}\r\n\r\nexport default {\r\n\t/**\r\n\t * @desc: Calculate absolute position of html object\r\n\t * @type: private\r\n\t * @param: htmlObject - html object\r\n\t * @topic: 0\r\n\t */\r\n\tgetAbsoluteLeft: function getAbsoluteLeft(htmlObject){\r\n\t\treturn this.getOffset(htmlObject).left;\r\n\t},\r\n\t/**\r\n\t * @desc: Calculate absolute position of html object\r\n\t * @type: private\r\n\t * @param: htmlObject - html object\r\n\t * @topic: 0\r\n\t */\r\n\tgetAbsoluteTop: function getAbsoluteTop(htmlObject){\r\n\t\treturn this.getOffset(htmlObject).top;\r\n\t},\r\n\r\n\tgetOffsetSum: function getOffsetSum(elem) {\r\n\t\tvar top=0, left=0;\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\t\treturn {top: top, left: left};\r\n\t},\r\n\r\n\tgetOffsetRect: function getOffsetRect(elem) {\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\r\n\t\tvar top = 0,\r\n\t\t\tleft = 0;\r\n\r\n\t\t// https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#Mobile_Tablet_or_Desktop\r\n\t\tif (!/Mobi/.test(navigator.userAgent)) {\r\n\t\t\tvar body = document.body;\r\n\t\t\tvar docElem = document.documentElement;\r\n\t\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\r\n\t\t\ttop = box.top + scrollTop - clientTop;\r\n\t\t\tleft = box.left + scrollLeft - clientLeft;\r\n\t\t}else {\r\n\t\t\t// incorrect left coordinate on mobile zoom\r\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=489206\r\n\r\n\t\t\tvar dummy = document.createElement(\"div\");\r\n\t\t\tdummy.style.position=\"absolute\";\r\n\t\t\tdummy.style.left=\"0px\";\r\n\t\t\tdummy.style.top=\"0px\";\r\n\t\t\tdummy.style.width=\"1px\";\r\n\t\t\tdummy.style.height = \"1px\";\r\n\r\n\t\t\tdocument.body.appendChild(dummy);\r\n\t\t\tvar dummyBox = dummy.getBoundingClientRect();\r\n\t\t\ttop = box.top - dummyBox.top;\r\n\t\t\tleft = box.left - dummyBox.left;\r\n\r\n\t\t\tdummy.parentNode.removeChild(dummy);\r\n\t\t}\r\n\r\n\t\treturn { top: Math.round(top), left: Math.round(left) };\r\n\t},\r\n\r\n\tgetOffset: function getOffset(elem) {\r\n\t\tif (elem.getBoundingClientRect) {\r\n\t\t\treturn this.getOffsetRect(elem);\r\n\t\t} else {\r\n\t\t\treturn this.getOffsetSum(elem);\r\n\t\t}\r\n\t},\r\n\r\n\tclosest: function(element, selector){\r\n\t\tif(!element || !selector){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn closest(element, selector);\r\n\t},\r\n\tinsertAfter: function(newNode, referenceNode){\r\n\t\tif(referenceNode.nextSibling){\r\n\t\t\treferenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);\r\n\t\t}else{\r\n\t\t\treferenceNode.parentNode.appendChild(newNode);\r\n\t\t}\r\n\t},\r\n\tremove: function(node) {\r\n\t\tif (node && node.parentNode) {\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t}\r\n\t},\r\n\tisChildOf: function(child, parent) {\r\n\t\treturn parent.contains(child);\r\n\t},\r\n\tgetFocusableNodes,\r\n\tgetClassName,\r\n\tlocateCss,\r\n\tgetRootNode,\r\n\thasShadowParent,\r\n\tisShadowDomSupported,\r\n\tgetActiveElement,\r\n\tgetRelativeEventPosition,\r\n\tgetTargetNode,\r\n\tgetNodePosition\r\n};\r\n\r\nvar closest;\r\nif(Element.prototype.closest){\r\n\tclosest = function(element, selector){\r\n\t\treturn element.closest(selector);\r\n\t};\r\n}else{\r\n\tvar matches = Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\r\n\tclosest = function(element, selector) {\r\n\t\tvar el = element;\r\n\t\tdo {\r\n\t\t\tif (matches.call(el, selector)){\r\n\t\t\t\treturn el;\r\n\t\t\t}\r\n\t\t\tel = el.parentElement || el.parentNode;\r\n\t\t} while (el !== null && el.nodeType === 1);\r\n\t\treturn null;\r\n\t};\r\n}\r\n","/* eslint-disable no-restricted-globals */\r\nvar isWindowAwailable = typeof window !== \"undefined\";\r\n\r\n/* eslint-enable no-restricted-globals */\r\n\r\nexport default {\r\n\tisIE: isWindowAwailable && (navigator.userAgent.indexOf(\"MSIE\") >= 0 || navigator.userAgent.indexOf(\"Trident\") >= 0),\r\n\tisOpera: isWindowAwailable && (navigator.userAgent.indexOf(\"Opera\") >= 0),\r\n\tisChrome: isWindowAwailable && (navigator.userAgent.indexOf(\"Chrome\") >= 0),\r\n\tisKHTML: isWindowAwailable && (navigator.userAgent.indexOf(\"Safari\") >= 0 || navigator.userAgent.indexOf(\"Konqueror\") >= 0),\r\n\tisFF: isWindowAwailable && (navigator.userAgent.indexOf(\"Firefox\") >= 0),\r\n\tisIPad: isWindowAwailable && (navigator.userAgent.search(/iPad/gi) >= 0),\r\n\tisEdge: isWindowAwailable && (navigator.userAgent.indexOf(\"Edge\")!=-1),\r\n\tisNode: (!isWindowAwailable || typeof navigator == \"undefined\")\r\n};","export default function(data) {\r\n\tif (typeof data === \"string\" || typeof data === \"number\") {\r\n\t\treturn data;\r\n\t}\r\n\tvar result = \"\";\r\n\tfor (var key in data) {\r\n\t\tvar serialized = \"\";\r\n\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\tif (typeof data[key] === \"string\") {\r\n\t\t\t\tserialized = encodeURIComponent(data[key]);\r\n\t\t\t} else if (typeof data[key] === \"number\") {\r\n\t\t\t\tserialized = data[key];\r\n\t\t\t} else {\r\n\t\t\t\tserialized = encodeURIComponent(JSON.stringify(data[key]));\r\n\t\t\t}\r\n\t\t\tserialized = key + \"=\" + serialized;\r\n\r\n\t\t\tif (result.length) {\r\n\t\t\t\tserialized = \"&\" + serialized;\r\n\t\t\t}\r\n\t\t\tresult += serialized;\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n}","export default function extend(scheduler) {\r\n\r\nvar generateStringToDate = function (format, utc) {\r\n\tvar splt = \"var temp=date.match(/[a-zA-Z]+|[0-9]+/g);\";\r\n\tvar mask = format.match(/%[a-zA-Z]/g);\r\n\tfor (var i = 0; i < mask.length; i++) {\r\n\t\tswitch (mask[i]) {\r\n\t\t\tcase \"%j\":\r\n\t\t\tcase \"%d\": splt += \"set[2]=temp[\" + i + \"]||1;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%n\":\r\n\t\t\tcase \"%m\": splt += \"set[1]=(temp[\" + i + \"]||1)-1;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%y\": splt += \"set[0]=temp[\" + i + \"]*1+(temp[\" + i + \"]>50?1900:2000);\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%g\":\r\n\t\t\tcase \"%G\":\r\n\t\t\tcase \"%h\":\r\n\t\t\tcase \"%H\":\r\n\t\t\t\tsplt += \"set[3]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%i\":\r\n\t\t\t\tsplt += \"set[4]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%Y\": splt += \"set[0]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%a\":\r\n\t\t\tcase \"%A\": splt += \"set[3]=set[3]%12+((temp[\" + i + \"]||'').toLowerCase()=='am'?0:12);\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%s\": splt += \"set[5]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%M\": splt += \"set[1]=this.locale.date.month_short_hash[temp[\" + i + \"]]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%F\": splt += \"set[1]=this.locale.date.month_full_hash[temp[\" + i + \"]]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\tvar code = \"set[0],set[1],set[2],set[3],set[4],set[5]\";\r\n\tif (utc) code = \" Date.UTC(\" + code + \")\";\r\n\treturn new Function(\"date\", \"var set=[0,0,1,0,0,0]; \" + splt + \" return new Date(\" + code + \");\");\r\n};\r\nvar csp_date_to_str = function (format, utc) {\r\n\treturn function(date) {\r\n\t\treturn format.replace(/%[a-zA-Z]/g, function (a) {\r\n\t\t\tswitch (a) {\r\n\t\t\t\tcase \"%d\": return utc ? scheduler.date.to_fixed(date.getUTCDate()) : scheduler.date.to_fixed(date.getDate());\r\n\t\t\t\tcase \"%m\": return utc ? scheduler.date.to_fixed((date.getUTCMonth() + 1)) : scheduler.date.to_fixed((date.getMonth() + 1));\r\n\t\t\t\tcase \"%j\": return utc ? date.getUTCDate() : date.getDate();\r\n\t\t\t\tcase \"%n\": return utc ? (date.getUTCMonth() + 1) : (date.getMonth() + 1);\r\n\t\t\t\tcase \"%y\": return utc ? scheduler.date.to_fixed(date.getUTCFullYear() % 100) : scheduler.date.to_fixed(date.getFullYear() % 100);\r\n\t\t\t\tcase \"%Y\": return utc ? date.getUTCFullYear() : date.getFullYear();\r\n\t\t\t\tcase \"%D\": return utc ? scheduler.locale.date.day_short[date.getUTCDay()] : scheduler.locale.date.day_short[date.getDay()];\r\n\t\t\t\tcase \"%l\": return utc ? scheduler.locale.date.day_full[date.getUTCDay()] : scheduler.locale.date.day_full[date.getDay()];\r\n\t\t\t\tcase \"%M\": return utc ? scheduler.locale.date.month_short[date.getUTCMonth()] : scheduler.locale.date.month_short[date.getMonth()];\r\n\t\t\t\tcase \"%F\": return utc ? scheduler.locale.date.month_full[date.getUTCMonth()] : scheduler.locale.date.month_full[date.getMonth()];\r\n\t\t\t\tcase \"%h\": return utc ? scheduler.date.to_fixed((date.getUTCHours() + 11) % 12 + 1) : scheduler.date.to_fixed((date.getHours() + 11) % 12 + 1);\r\n\t\t\t\tcase \"%g\": return utc ? ((date.getUTCHours() + 11) % 12 + 1) : ((date.getHours() + 11) % 12 + 1);\r\n\t\t\t\tcase \"%G\": return utc ? date.getUTCHours() : date.getHours();\r\n\t\t\t\tcase \"%H\": return utc ? scheduler.date.to_fixed(date.getUTCHours()) : scheduler.date.to_fixed(date.getHours());\r\n\t\t\t\tcase \"%i\": return utc ? scheduler.date.to_fixed(date.getUTCMinutes()) : scheduler.date.to_fixed(date.getMinutes());\r\n\t\t\t\tcase \"%a\": return utc ? (date.getUTCHours() > 11 ? \"pm\" : \"am\") : (date.getHours() > 11 ? \"pm\" : \"am\");\r\n\t\t\t\tcase \"%A\": return utc ? (date.getUTCHours() > 11 ? \"PM\" : \"AM\") : (date.getHours() > 11 ? \"PM\" : \"AM\");\r\n\t\t\t\tcase \"%s\": return utc ? scheduler.date.to_fixed(date.getUTCSeconds()) : scheduler.date.to_fixed(date.getSeconds());\r\n\t\t\t\tcase \"%W\": return utc ? scheduler.date.to_fixed(scheduler.date.getUTCISOWeek(date)) : scheduler.date.to_fixed(scheduler.date.getISOWeek(date));\r\n\t\t\t\tdefault: return a;\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n};\r\nvar csp_str_to_date = function (format, utc) {\r\n\tconst mask = format.match(/%[a-zA-Z]/g);\r\n\treturn function (date){\r\n\t\tvar set = [0, 0, 1, 0, 0, 0];\r\n\t\tvar temp = date.match(/[a-zA-Z]+|[0-9]+/g);\r\n\r\n\t\tfor (var i = 0; i < mask.length; i++) {\r\n\t\t\tswitch (mask[i]) {\r\n\t\t\t\tcase \"%j\":\r\n\t\t\t\tcase \"%d\":\r\n\t\t\t\t\tset[2] = temp[i] || 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%n\":\r\n\t\t\t\tcase \"%m\":\r\n\t\t\t\t\tset[1] = (temp[i] || 1) - 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%y\":\r\n\t\t\t\t\tset[0] = temp[i] * 1 + (temp[i] > 50 ? 1900 : 2000);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%g\":\r\n\t\t\t\tcase \"%G\":\r\n\t\t\t\tcase \"%h\":\r\n\t\t\t\tcase \"%H\":\r\n\t\t\t\t\tset[3] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%i\":\r\n\t\t\t\t\tset[4] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\tset[0] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%a\":\r\n\t\t\t\tcase \"%A\":\r\n\t\t\t\t\tset[3] = set[3] % 12 + ((temp[i] || '').toLowerCase() == 'am' ? 0 : 12);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%s\":\r\n\t\t\t\t\tset[5] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%M\":\r\n\t\t\t\t\tset[1] = scheduler.locale.date.month_short_hash[temp[i]] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%F\":\r\n\t\t\t\t\tset[1] = scheduler.locale.date.month_full_hash[temp[i]] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (utc) {\r\n\t\t\treturn new Date(Date.UTC(set[0], set[1], set[2], set[3], set[4], set[5]));\r\n\t\t}\r\n\r\n\t\treturn new Date(set[0], set[1], set[2], set[3], set[4], set[5]);\r\n\t};\r\n};\r\n\r\nlet cspEnabled = undefined;\r\nfunction checkIfCSPEnabled(){\r\n\ttry {\r\n\t\tnew Function(\"cspEnabled = false;\");\r\n\t\tcspEnabled = false;\r\n\t} catch(e) {\r\n\t\tcspEnabled = true;\r\n\t}\r\n\treturn cspEnabled;\r\n}\r\n\r\nfunction useCsp() {\r\n\tvar result = false;\r\n\tif (scheduler.config.csp === \"auto\") {\r\n\t\tif(cspEnabled === undefined){\r\n\t\t\tcspEnabled = checkIfCSPEnabled();\r\n\t\t}\r\n\t\tresult = cspEnabled;\r\n\t} else {\r\n\t\tresult = scheduler.config.csp;\r\n\t}\r\n\treturn result;\r\n}\r\nscheduler.date = {\r\n\tinit:function(){\r\n\t\tvar s = scheduler.locale.date.month_short;\r\n\t\tvar t = scheduler.locale.date.month_short_hash = {};\r\n\t\tfor (var i = 0; i < s.length; i++)\r\n\t\t\tt[s[i]]=i;\r\n\r\n\t\tvar s = scheduler.locale.date.month_full;\r\n\t\tvar t = scheduler.locale.date.month_full_hash = {};\r\n\t\tfor (var i = 0; i < s.length; i++)\r\n\t\t\tt[s[i]]=i;\r\n\t},\r\n\tdate_part:function(date){\r\n\t\tvar old = new Date(date);\r\n\t\tdate.setHours(0);\r\n\t\tdate.setMinutes(0);\r\n\t\tdate.setSeconds(0);\r\n\t\tdate.setMilliseconds(0);\r\n\t\tif (date.getHours() && //shift to yesterday on dst\r\n\t\t\t(date.getDate() < old.getDate() || date.getMonth() < old.getMonth() || date.getFullYear() < old.getFullYear()) )\r\n\t\t\tdate.setTime(date.getTime() + 60 * 60 * 1000 * (24 - date.getHours()));\r\n\t\treturn date;\r\n\t},\r\n\ttime_part:function(date){\r\n\t\treturn (date.valueOf()/1000 - date.getTimezoneOffset()*60)%86400;\r\n\t},\r\n\tweek_start:function(date){\r\n\t\tvar shift=date.getDay();\r\n\t\tif (scheduler.config.start_on_monday){\r\n\t\t\tif (shift===0) shift=6;\r\n\t\t\telse shift--;\r\n\t\t}\r\n\t\treturn this.date_part(this.add(date,-1*shift,\"day\"));\r\n\t},\r\n\tmonth_start:function(date){\r\n\t\tdate.setDate(1);\r\n\t\treturn this.date_part(date);\r\n\t},\r\n\tyear_start:function(date){\r\n\t\tdate.setMonth(0);\r\n\t\treturn this.month_start(date);\r\n\t},\r\n\tday_start:function(date){\r\n\t\treturn this.date_part(date);\r\n\t},\r\n\t_add_days:function(date, inc){\r\n\t\tvar ndate = new Date(date.valueOf());\r\n\r\n\t\tndate.setDate(ndate.getDate() + inc);\r\n\r\n\t\t// Workaround for Safari/iOS timezone bug, ref:OKZ-149693\r\n\t\tif(inc == Math.round(inc) && inc > 0){\r\n\t\t\tvar datesDiff = +ndate - +date,\r\n\t\t\t\trest = datesDiff % (24*60*60*1000);\r\n\t\t\tif(rest && date.getTimezoneOffset() == ndate.getTimezoneOffset()){\r\n\t\t\t\tvar hours = rest / (60* 60 * 1000);\r\n\t\t\t\tndate.setTime(ndate.getTime() + (24 - hours) * 60 * 60 * 1000);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (inc >= 0 && (!date.getHours() && ndate.getHours()) &&//shift to yesterday on dst\r\n\t\t\t(ndate.getDate() < date.getDate() || ndate.getMonth() < date.getMonth() || ndate.getFullYear() < date.getFullYear()) )\r\n\t\t\tndate.setTime(ndate.getTime() + 60 * 60 * 1000 * (24 - ndate.getHours()));\r\n\t\treturn ndate;\r\n\t},\r\n\tadd:function(date,inc,mode){\r\n\t\tvar ndate=new Date(date.valueOf());\r\n\t\tswitch(mode){\r\n\t\t\tcase \"day\":\r\n\t\t\t\tndate = scheduler.date._add_days(ndate, inc);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"week\":\r\n\t\t\t\tndate = scheduler.date._add_days(ndate, inc * 7);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"month\": ndate.setMonth(ndate.getMonth()+inc); break;\r\n\t\t\tcase \"year\": ndate.setYear(ndate.getFullYear()+inc); break;\r\n\t\t\tcase \"hour\":\r\n\t\t\t\t/*\r\n\t\t\t\t setHour(getHour() + inc) and setMinutes gives weird result when is applied on a Daylight Saving time switch\r\n\t\t\t\t setTime seems working as expected\r\n\t\t\t\t*/\r\n\t\t\t\tndate.setTime(ndate.getTime() + inc * 60 * 60 * 1000);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"minute\":\r\n\t\t\t\tndate.setTime(ndate.getTime() + inc * 60 * 1000);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\treturn scheduler.date[\"add_\"+mode](date,inc,mode);\r\n\t\t}\r\n\t\treturn ndate;\r\n\t},\r\n\tto_fixed:function(num){\r\n\t\tif (num<10)\treturn \"0\"+num;\r\n\t\treturn num;\r\n\t},\r\n\tcopy:function(date){\r\n\t\treturn new Date(date.valueOf());\r\n\t},\r\n\tdate_to_str:function(format,utc){\r\n\t\tif (useCsp()) {\r\n\t\t\treturn csp_date_to_str(format,utc);\r\n\t\t}\r\n\r\n\t\tformat=format.replace(/%[a-zA-Z]/g,function(a){\r\n\t\t\tswitch(a){\r\n\t\t\t\tcase \"%d\": return \"\\\"+this.date.to_fixed(date.getDate())+\\\"\";\r\n\t\t\t\tcase \"%m\": return \"\\\"+this.date.to_fixed((date.getMonth()+1))+\\\"\";\r\n\t\t\t\tcase \"%j\": return \"\\\"+date.getDate()+\\\"\";\r\n\t\t\t\tcase \"%n\": return \"\\\"+(date.getMonth()+1)+\\\"\";\r\n\t\t\t\tcase \"%y\": return \"\\\"+this.date.to_fixed(date.getFullYear()%100)+\\\"\";\r\n\t\t\t\tcase \"%Y\": return \"\\\"+date.getFullYear()+\\\"\";\r\n\t\t\t\tcase \"%D\": return \"\\\"+this.locale.date.day_short[date.getDay()]+\\\"\";\r\n\t\t\t\tcase \"%l\": return \"\\\"+this.locale.date.day_full[date.getDay()]+\\\"\";\r\n\t\t\t\tcase \"%M\": return \"\\\"+this.locale.date.month_short[date.getMonth()]+\\\"\";\r\n\t\t\t\tcase \"%F\": return \"\\\"+this.locale.date.month_full[date.getMonth()]+\\\"\";\r\n\t\t\t\tcase \"%h\": return \"\\\"+this.date.to_fixed((date.getHours()+11)%12+1)+\\\"\";\r\n\t\t\t\tcase \"%g\": return \"\\\"+((date.getHours()+11)%12+1)+\\\"\";\r\n\t\t\t\tcase \"%G\": return \"\\\"+date.getHours()+\\\"\";\r\n\t\t\t\tcase \"%H\": return \"\\\"+this.date.to_fixed(date.getHours())+\\\"\";\r\n\t\t\t\tcase \"%i\": return \"\\\"+this.date.to_fixed(date.getMinutes())+\\\"\";\r\n\t\t\t\tcase \"%a\": return \"\\\"+(date.getHours()>11?\\\"pm\\\":\\\"am\\\")+\\\"\";\r\n\t\t\t\tcase \"%A\": return \"\\\"+(date.getHours()>11?\\\"PM\\\":\\\"AM\\\")+\\\"\";\r\n\t\t\t\tcase \"%s\": return \"\\\"+this.date.to_fixed(date.getSeconds())+\\\"\";\r\n\t\t\t\tcase \"%W\": return \"\\\"+this.date.to_fixed(this.date.getISOWeek(date))+\\\"\";\r\n\t\t\t\tdefault: return a;\r\n\t\t\t}\r\n\t\t});\r\n\t\tif (utc) format=format.replace(/date\\.get/g,\"date.getUTC\");\r\n\t\tvar func = new Function(\"date\",\"return \\\"\"+format+\"\\\";\");\r\n\r\n\t\treturn func.bind(scheduler);\r\n\t},\r\n\tstr_to_date:function(format, utc, exactFormat){\r\n\t\tvar stringToDateMethod = useCsp() ? csp_str_to_date : generateStringToDate;\r\n\t\tvar parseExactFormat = stringToDateMethod(format, utc);\r\n\t\t// eslint-disable-next-line\r\n\t\tvar yyyyMMddhhIIss = /^[0-9]{4}(\\-|\\/)[0-9]{2}(\\-|\\/)[0-9]{2} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/;\r\n\r\n\t\t// MM/dd/yyyy - default old format for xml-date\r\n\t\t// eslint-disable-next-line\r\n\t\tvar MMddyyyyhhIIss = /^[0-9]{2}\\/[0-9]{2}\\/[0-9]{4} ?(([0-9]{1,2}:[0-9]{2})(:[0-9]{1,2})?)?$/;\r\n\t\t// dd-MM-yyyy - default old format for api-date\r\n\t\t// eslint-disable-next-line\r\n\t\tvar ddMMyyyyhhIIss = /^[0-9]{2}\\-[0-9]{2}\\-[0-9]{4} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/;\r\n\t\t// eslint-disable-next-line\r\n\t\tvar ISO8601 = /^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$/;\r\n\r\n\t\tvar isYMDDate = function (datestr) {\r\n\t\t\treturn yyyyMMddhhIIss.test(String(datestr));\r\n\t\t};\r\n\r\n\t\tvar isMDYDate = function (datestr) {\r\n\t\t\treturn MMddyyyyhhIIss.test(String(datestr));\r\n\t\t};\r\n\t\tvar isDMYDate = function (datestr) {\r\n\t\t\treturn ddMMyyyyhhIIss.test(String(datestr));\r\n\t\t};\r\n\t\tvar isISO8601 = function (datestr) {\r\n\t\t\treturn ISO8601.test(datestr);\r\n\t\t};\r\n\r\n\t\tvar parseYMD = stringToDateMethod(\"%Y-%m-%d %H:%i:%s\", utc);\r\n\t\tvar parseMDY = stringToDateMethod(\"%m/%d/%Y %H:%i:%s\", utc);\r\n\t\tvar parseDMY = stringToDateMethod(\"%d-%m-%Y %H:%i:%s\", utc);\r\n\r\n\t\treturn function (dateString) {\r\n\r\n\t\t\tif (!exactFormat && !scheduler.config.parse_exact_format) {\r\n\t\t\t\tif (dateString && dateString.getISOWeek) {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t} else if (typeof dateString === \"number\") {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t} else if (isYMDDate(dateString)) {\r\n\t\t\t\t\treturn parseYMD(dateString);\r\n\t\t\t\t} else if (isMDYDate(dateString)) {\r\n\t\t\t\t\treturn parseMDY(dateString);\r\n\t\t\t\t} else if (isDMYDate(dateString)) {\r\n\t\t\t\t\treturn parseDMY(dateString);\r\n\t\t\t\t} else if (isISO8601(dateString)) {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn parseExactFormat.call(scheduler, dateString);\r\n\t\t};\r\n\t},\r\n\tgetISOWeek: function(ndate) {\r\n\t\tif(!ndate) return false;\r\n\t\tndate = this.date_part(new Date(ndate));\r\n\t\tvar nday = ndate.getDay();\r\n\t\tif (nday === 0) {\r\n\t\t\tnday = 7;\r\n\t\t}\r\n\t\tvar first_thursday = new Date(ndate.valueOf());\r\n\t\tfirst_thursday.setDate(ndate.getDate() + (4 - nday));\r\n\t\tvar year_number = first_thursday.getFullYear(); // year of the first Thursday\r\n\t\tvar ordinal_date = Math.round( (first_thursday.getTime() - new Date(year_number, 0, 1).getTime()) / 86400000); //ordinal date of the first Thursday - 1 (so not really ordinal date)\r\n\t\tvar week_number = 1 + Math.floor( ordinal_date / 7);\r\n\t\treturn week_number;\r\n\t},\r\n\tgetUTCISOWeek: function(ndate){\r\n\t\treturn this.getISOWeek(this.convert_to_utc(ndate));\r\n\t},\r\n\tconvert_to_utc: function(date) {\r\n\t\treturn new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds());\r\n\t}\r\n};\r\n\r\n}\r\n\r\n","export default function(scheduler){\r\n\treturn (function(){\r\n\t\tvar res = {};\r\n\t\tfor (var a in this._events){\r\n\t\t\tvar ev = this._events[a];\r\n\t\t\tif (ev.id.toString().indexOf(\"#\") == -1){\r\n\t\t\t\tres[ev.id] = ev;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t}).bind(scheduler);\r\n}","import xmlLoaded from \"./loaders/xml\";\r\nimport jsonLoader from \"./loaders/json\";\r\nimport iCalLoader from \"./loaders/ical\";\r\nimport createSerializator from \"../core/common/get_serializable_events\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler._loaded = {};\r\nscheduler._load = function(url, from) {\r\n\turl = url || this._load_url;\r\n\r\n\tif(!url){\r\n\t\t//if scheduler.setLoadMode is called before scheduler.init, initial rendering will invoke data loading while url is undefined\r\n\t\treturn;\r\n\t}\r\n\r\n\turl += (url.indexOf(\"?\") == -1 ? \"?\" : \"&\") + \"timeshift=\" + (new Date()).getTimezoneOffset();\r\n\tif (this.config.prevent_cache) url += \"&uid=\" + this.uid();\r\n\tvar to;\r\n\tfrom = from || this._date;\r\n\tfunction ajaxCallback(response) {\r\n\t\tscheduler.on_load(response);\r\n\t\tscheduler.callEvent(\"onLoadEnd\", []);\r\n\t}\r\n\tif (this._load_mode) {\r\n\t\tvar lf = this.templates.load_format;\r\n\r\n\t\tfrom = this.date[this._load_mode + \"_start\"](new Date(from.valueOf()));\r\n\t\twhile (from > this._min_date) from = this.date.add(from, -1, this._load_mode);\r\n\t\tto = from;\r\n\r\n\t\tvar cache_line = true;\r\n\t\twhile (to < this._max_date) {\r\n\t\t\tto = this.date.add(to, 1, this._load_mode);\r\n\t\t\tif (this._loaded[lf(from)] && cache_line)\r\n\t\t\t\tfrom = this.date.add(from, 1, this._load_mode); else cache_line = false;\r\n\t\t}\r\n\r\n\t\tvar temp_to = to;\r\n\t\tdo {\r\n\t\t\tto = temp_to;\r\n\t\t\ttemp_to = this.date.add(to, -1, this._load_mode);\r\n\t\t} while (temp_to > from && this._loaded[lf(temp_to)]);\r\n\r\n\t\tif (to <= from)\r\n\t\t\treturn false; //already loaded\r\n\r\n\t\tscheduler.ajax.get(url + \"&from=\" + lf(from) + \"&to=\" + lf(to), ajaxCallback);\r\n\r\n\t\twhile (from < to) {\r\n\t\t\tthis._loaded[lf(from)] = true;\r\n\t\t\tfrom = this.date.add(from, 1, this._load_mode);\r\n\t\t}\r\n\t} else {\r\n\t\tscheduler.ajax.get(url, ajaxCallback);\r\n\t}\r\n\r\n\t// TODO: remove onXLS\r\n\tthis.callEvent(\"onXLS\", []);\r\n\tthis.callEvent(\"onLoadStart\", []);\r\n\treturn true;\r\n};\r\n\r\nscheduler._parsers = {};\r\n\r\n\r\nxmlLoaded(scheduler);\r\njsonLoader(scheduler);\r\niCalLoader(scheduler);\r\n\r\nscheduler.on_load = function (loader) {\r\n\tthis.callEvent(\"onBeforeParse\", []);\r\n\r\n\tvar evs;\r\n\tvar error = false;\r\n\r\n\tvar foundParser = false;\r\n\tfor(var i in this._parsers){\r\n\t\tvar parser = this._parsers[i];\r\n\t\tif(parser.canParse(loader.xmlDoc.responseText, loader.xmlDoc)){\r\n\t\t\ttry{\r\n\t\t\t\tvar param = loader.xmlDoc.responseText;\r\n\t\t\t\tif(i === \"xml\"){\r\n\t\t\t\t\tparam = loader;\r\n\t\t\t\t}\r\n\t\t\t\tevs = parser.parse(param);\r\n\t\t\t\tif(!evs){\r\n\t\t\t\t\terror = true;\r\n\t\t\t\t}\r\n\t\t\t}catch(e){\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\t\t\tfoundParser = true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif(!foundParser){\r\n\t\tif(this._process && this[this._process]){\r\n\t\t\ttry{\r\n\t\t\t\tevs = this[this._process].parse(loader.xmlDoc.responseText);\r\n\t\t\t}catch (e){\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\terror = true;\r\n\t\t}\r\n\t}\r\n\r\n\tif(error || (loader.xmlDoc.status && loader.xmlDoc.status >= 400)){\r\n\t\tthis.callEvent(\"onLoadError\", [loader.xmlDoc]);\r\n\t\tevs = [];\r\n\t}\r\n\r\n\tthis._process_loading(evs);\r\n\r\n\t// TODO: remove onXLE\r\n\tthis.callEvent(\"onXLE\", []);\r\n\tthis.callEvent(\"onParse\", []);\r\n};\r\nscheduler._process_loading = function(evs) {\r\n\tthis._loading = true;\r\n\tthis._not_render = true;\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tif (!this.callEvent(\"onEventLoading\", [evs[i]])) continue;\r\n\t\tthis.addEvent(evs[i]);\r\n\t}\r\n\tthis._not_render = false;\r\n\tif (this._render_wait) this.render_view_data();\r\n\r\n\tthis._loading = false;\r\n\tif (this._after_call) this._after_call();\r\n\tthis._after_call = null;\r\n};\r\nscheduler._init_event = function(event) {\r\n\tevent.text = (event.text || event._tagvalue) || \"\";\r\n\tevent.start_date = scheduler._init_date(event.start_date);\r\n\tevent.end_date = scheduler._init_date(event.end_date);\r\n};\r\n\r\nscheduler._init_date = function(date){\r\n\tif(!date)\r\n\t\treturn null;\r\n\tif (typeof date == \"string\") {\r\n\t\treturn scheduler._helpers.parseDate(date);\r\n\t}\r\n\telse return new Date(date);\r\n};\r\n\r\nconst getSerializableData = createSerializator(scheduler);\r\nscheduler.serialize = function(){\r\n\tconst dataset = [];\r\n\tconst allEvents = getSerializableData();\r\n\tfor (var a in allEvents){\r\n\t\t\r\n\t\tconst exportedEvent = {};\r\n\t\tvar ev = allEvents[a];\r\n\r\n\t\tfor(var key in ev){\r\n\t\t\tif (key.charAt(0) == \"$\" || key.charAt(0) == \"_\"){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tlet exportValue;\r\n\t\t\tconst rawValue = ev[key];\r\n\t\t\tif(scheduler.utils.isDate(rawValue)){\r\n\t\t\t\texportValue = scheduler.defined(scheduler.templates.xml_format) ? scheduler.templates.xml_format(rawValue) : scheduler.templates.format_date(rawValue);\r\n\t\t\t}else{\r\n\t\t\t\texportValue = rawValue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\texportedEvent[key] = exportValue;\r\n\t\t}\r\n\r\n\t\tdataset.push(exportedEvent);\r\n\t}\r\n\treturn dataset;\r\n};\r\n\r\n/*\r\nscheduler.json = {};\r\nscheduler.json.parse = function(data) {\r\n\r\n\tvar events = [];\r\n\r\n\tif (typeof data == \"string\") {\r\n\t\tdata = JSON.parse(data);\r\n\t}\r\n\tif (Object.prototype.toString.call(data) === '[object Array]') {\r\n\t\tevents = data;\r\n\t} else {\r\n\t\tif(data){\r\n\t\t\tif(data.events){\r\n\t\t\t\tevents = data.events;\r\n\t\t\t}else if(data.data){\r\n\t\t\t\tevents = data.data;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tevents = events || [];\r\n\r\n\tif (data.dhx_security) {\r\n\t\tif (window.dhtmlx) {\r\n\t\t\twindow.dhtmlx.security_key = data.dhx_security;\r\n\t\t}\r\n\t\tscheduler.security_key = data.dhx_security;\r\n\t}\r\n\r\n\tvar collections = (data && data.collections) ? data.collections : {};\r\n\tvar collections_loaded = false;\r\n\tfor (var key in collections) {\r\n\t\tif (collections.hasOwnProperty(key)) {\r\n\t\t\tcollections_loaded = true;\r\n\t\t\tvar collection = collections[key];\r\n\t\t\tvar arr = scheduler.serverList[key];\r\n\t\t\tif (!arr) {\r\n\t\t\t\tscheduler.serverList[key] = arr = [];\r\n\t\t\t}\r\n\t\t\tarr.splice(0, arr.length); //clear old options\r\n\t\t\tfor (var j = 0; j < collection.length; j++) {\r\n\t\t\t\tvar option = collection[j];\r\n\t\t\t\tvar obj = { key: option.value, label: option.label }; // resulting option object\r\n\t\t\t\tfor (var option_key in option) {\r\n\t\t\t\t\tif (option.hasOwnProperty(option_key)) {\r\n\t\t\t\t\t\tif (option_key == \"value\" || option_key == \"label\")\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\tobj[option_key] = option[option_key]; // obj['value'] = option['value']\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tarr.push(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (collections_loaded)\r\n\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\r\n\tvar evs = [];\r\n\tfor (var i = 0; i < events.length; i++) {\r\n\t\tvar event = events[i];\r\n\t\tscheduler._init_event(event);\r\n\t\tevs.push(event);\r\n\t}\r\n\treturn evs;\r\n};*/\r\nscheduler.parse = function(data, type) {\r\n\tthis._process = type;\r\n\tthis.on_load({xmlDoc: {responseText: data}});\r\n};\r\nscheduler.load = function(url, call) {\r\n\tif (typeof call == \"string\") {\r\n\t\tthis._process = call;\r\n\t\tcall = arguments[2];\r\n\t}\r\n\r\n\tthis._load_url = url;\r\n\tthis._after_call = call;\r\n\tthis._load(url, this._date);\r\n};\r\n//possible values - day,week,month,year,all\r\nscheduler.setLoadMode = function(mode) {\r\n\tif (mode == \"all\") mode = \"\";\r\n\tthis._load_mode = mode;\r\n};\r\n\r\nscheduler.serverList = function(name, array) {\r\n\tif (array) {\r\n\t\tthis.serverList[name] = array.slice(0);\r\n\t\treturn this.serverList[name];\r\n\t}\r\n\tthis.serverList[name] = (this.serverList[name] || []);\r\n\treturn this.serverList[name];\r\n};\r\nscheduler._userdata = {};\r\n\r\nscheduler._xmlNodeToJSON = function(node) {\r\n\tvar t = {};\r\n\tfor (var i = 0; i < node.attributes.length; i++)\r\n\t\tt[node.attributes[i].name] = node.attributes[i].value;\r\n\r\n\tfor (var i = 0; i < node.childNodes.length; i++) {\r\n\t\tvar child = node.childNodes[i];\r\n\t\tif (child.nodeType == 1)\r\n\t\t\tt[child.tagName] = child.firstChild ? child.firstChild.nodeValue : \"\";\r\n\t}\r\n\r\n\tif (!t.text) t.text = node.firstChild ? node.firstChild.nodeValue : \"\";\r\n\r\n\treturn t;\r\n};\r\nscheduler.attachEvent(\"onXLS\", function() {\r\n\tif (this.config.show_loading === true) {\r\n\t\tvar t;\r\n\t\tt = this.config.show_loading = document.createElement(\"div\");\r\n\t\tt.className = 'dhx_loading';\r\n\t\tt.style.left = Math.round((this._x - 128) / 2) + \"px\";\r\n\t\tt.style.top = Math.round((this._y - 15) / 2) + \"px\";\r\n\t\tthis._obj.appendChild(t);\r\n\t}\r\n});\r\nscheduler.attachEvent(\"onXLE\", function() {\r\n\tvar t = this.config.show_loading;\r\n\tif (t && typeof t == \"object\") {\r\n\t\tif(t.parentNode) {\r\n\t\t\tt.parentNode.removeChild(t);\r\n\t\t}\r\n\t\tthis.config.show_loading = true;\r\n\t}\r\n});\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._parsers.xml = {\r\n\tcanParse: function(data, xhr){\r\n\t\t// IE returns non-empty responseXML type regardless of actual data type\r\n\t\tif(xhr.responseXML && xhr.responseXML.firstChild){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\ttry{\r\n\t\t\tvar xmlDoc = scheduler.ajax.parse(xhr.responseText);\r\n\t\t\tvar topElement = scheduler.ajax.xmltop(\"data\", xmlDoc);\r\n\t\t\tif(topElement && topElement.tagName === \"data\"){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}catch (e){\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\tparse: function(loader) {\r\n\t\tvar xml;\r\n\r\n\t\tif (!loader.xmlDoc.responseXML) { //from a string\r\n\t\t\tloader.xmlDoc.responseXML = scheduler.ajax.parse(loader.xmlDoc.responseText);\r\n\t\t}\r\n\t\r\n\t\txml = scheduler.ajax.xmltop(\"data\", loader.xmlDoc);\r\n\t\tif (xml.tagName != \"data\") return null;//not an xml\r\n\t\tvar csrfToken = xml.getAttribute(\"dhx_security\");\r\n\t\tif (csrfToken) {\r\n\t\t\tif (window.dhtmlx) {\r\n\t\t\t\twindow.dhtmlx.security_key = csrfToken;\r\n\t\t\t}\r\n\t\t\tscheduler.security_key = csrfToken;\r\n\t\t}\r\n\t\r\n\t\tvar opts = scheduler.ajax.xpath(\"//coll_options\", loader.xmlDoc);\r\n\t\tfor (var i = 0; i < opts.length; i++) {\r\n\t\t\tvar bind = opts[i].getAttribute(\"for\");\r\n\t\t\tvar arr = scheduler.serverList[bind];\r\n\t\t\tif (!arr) {\r\n\t\t\t\tscheduler.serverList[bind] = arr = [];\r\n\t\t\t}\r\n\t\t\tarr.splice(0, arr.length);\t//clear old options\r\n\t\t\tvar itms = scheduler.ajax.xpath(\".//item\", opts[i]);\r\n\t\t\tfor (var j = 0; j < itms.length; j++) {\r\n\t\t\t\tvar itm = itms[j];\r\n\t\t\t\tvar attrs = itm.attributes;\r\n\t\t\t\tvar obj = { key: itms[j].getAttribute(\"value\"), label: itms[j].getAttribute(\"label\")};\r\n\t\t\t\tfor (var k = 0; k < attrs.length; k++) {\r\n\t\t\t\t\tvar attr = attrs[k];\r\n\t\t\t\t\tif (attr.nodeName == \"value\" || attr.nodeName == \"label\")\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\tobj[attr.nodeName] = attr.nodeValue;\r\n\t\t\t\t}\r\n\t\t\t\tarr.push(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (opts.length)\r\n\t\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\t\r\n\t\tvar ud = scheduler.ajax.xpath(\"//userdata\", loader.xmlDoc);\r\n\t\tfor (var i = 0; i < ud.length; i++) {\r\n\t\t\tvar udx = scheduler._xmlNodeToJSON(ud[i]);\r\n\t\t\tscheduler._userdata[udx.name] = udx.text;\r\n\t\t}\r\n\t\r\n\t\tvar evs = [];\r\n\t\txml = scheduler.ajax.xpath(\"//event\", loader.xmlDoc);\r\n\t\r\n\t\tfor (var i = 0; i < xml.length; i++) {\r\n\t\t\tvar ev = evs[i] = scheduler._xmlNodeToJSON(xml[i]);\r\n\t\t\tscheduler._init_event(ev);\r\n\t\t}\r\n\t\treturn evs;\r\n\t}\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler.json = scheduler._parsers.json = {\r\n\tcanParse: function(data){\r\n\t\tif(data && typeof data === \"object\"){\r\n\t\t\treturn true;\r\n\t\t} else if(typeof data === \"string\"){\r\n\t\t\ttry {\r\n\t\t\t\tvar result = JSON.parse(data);\r\n\t\t\t\treturn Object.prototype.toString.call(result) === '[object Object]' || \r\n\t\t\t\t\t\tObject.prototype.toString.call(result) === '[object Array]';\r\n\t\t\t} catch (err) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\tparse: function(data) {\r\n\t\tvar events = [];\r\n\r\n\t\tif (typeof data == \"string\") {\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\t\tif (Object.prototype.toString.call(data) === '[object Array]') {\r\n\t\t\tevents = data;\r\n\t\t} else {\r\n\t\t\tif(data){\r\n\t\t\t\tif(data.events){\r\n\t\t\t\t\tevents = data.events;\r\n\t\t\t\t}else if(data.data){\r\n\t\t\t\t\tevents = data.data;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tevents = events || [];\r\n\r\n\t\tif (data.dhx_security) {\r\n\t\t\tif (window.dhtmlx) {\r\n\t\t\t\twindow.dhtmlx.security_key = data.dhx_security;\r\n\t\t\t}\r\n\t\t\tscheduler.security_key = data.dhx_security;\r\n\t\t}\r\n\r\n\t\tvar collections = (data && data.collections) ? data.collections : {};\r\n\t\tvar collections_loaded = false;\r\n\t\tfor (var key in collections) {\r\n\t\t\tif (collections.hasOwnProperty(key)) {\r\n\t\t\t\tcollections_loaded = true;\r\n\t\t\t\tvar collection = collections[key];\r\n\t\t\t\tvar arr = scheduler.serverList[key];\r\n\t\t\t\tif (!arr) {\r\n\t\t\t\t\tscheduler.serverList[key] = arr = [];\r\n\t\t\t\t}\r\n\t\t\t\tarr.splice(0, arr.length); //clear old options\r\n\t\t\t\tfor (var j = 0; j < collection.length; j++) {\r\n\t\t\t\t\tvar option = collection[j];\r\n\t\t\t\t\tvar obj = { key: option.value, label: option.label }; // resulting option object\r\n\t\t\t\t\tfor (var option_key in option) {\r\n\t\t\t\t\t\tif (option.hasOwnProperty(option_key)) {\r\n\t\t\t\t\t\t\tif (option_key == \"value\" || option_key == \"label\")\r\n\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\tobj[option_key] = option[option_key]; // obj['value'] = option['value']\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tarr.push(obj);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (collections_loaded)\r\n\t\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\r\n\t\tvar evs = [];\r\n\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\tvar event = events[i];\r\n\t\t\tscheduler._init_event(event);\r\n\t\t\tevs.push(event);\r\n\t\t}\r\n\t\treturn evs;\r\n\t}\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler.ical = scheduler._parsers.ical = {\r\n\tcanParse: function(data){\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\treturn new RegExp(\"^BEGIN:VCALENDAR\").test(data);\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n\tparse:function(str){\r\n\t\tvar data = str.match(RegExp(this.c_start+\"[^\\f]*\"+this.c_end,\"\"));\r\n\t\tif (!data.length) return;\r\n\r\n\t\t// mpl: handle bad unfolding\r\n\t\tdata[0]=data[0].replace(/[\\r\\n]+ /g,\"\");\r\n\r\n\t\t//unfolding \r\n\t\tdata[0]=data[0].replace(/[\\r\\n]+(?=[a-z \\t])/g,\" \");\r\n\t\t//drop property\r\n\t\tdata[0]=data[0].replace(/;[^:\\r\\n]*:/g,\":\");\r\n\t\t\r\n\t\t\r\n\t\tvar incoming=[];\r\n\t\tvar match;\r\n\t\tvar event_r = RegExp(\"(?:\"+this.e_start+\")([^\\f]*?)(?:\"+this.e_end+\")\",\"g\");\r\n\t\twhile ((match=event_r.exec(data)) !== null){\r\n\t\t\tvar e={};\r\n\t\t\tvar param;\r\n\t\t\tvar param_r = /[^\\r\\n]+[\\r\\n]+/g;\r\n\t\t\twhile ((param=param_r.exec(match[1])) !== null)\r\n\t\t\t\tthis.parse_param(param.toString(),e);\r\n\t\t\tif (e.uid && !e.id) e.id = e.uid; //fallback to UID, when ID is not defined\r\n\t\t\tincoming.push(e);\t\r\n\t\t}\r\n\t\treturn incoming;\r\n\t},\r\n\tparse_param:function(str,obj){\r\n\t\tvar d = str.indexOf(\":\"); \r\n\t\t\tif (d==-1) return;\r\n\t\t\r\n\t\tvar name = str.substr(0,d).toLowerCase();\r\n\t\tvar value = str.substr(d+1).replace(/\\\\,/g,\",\").replace(/[\\r\\n]+$/,\"\");\r\n\t\tif (name==\"summary\")\r\n\t\t\tname=\"text\";\r\n\t\telse if (name==\"dtstart\"){\r\n\t\t\tname = \"start_date\";\r\n\t\t\tvalue = this.parse_date(value,0,0);\r\n\t\t}\r\n\t\telse if (name==\"dtend\"){\r\n\t\t\tname = \"end_date\";\r\n\t\t\tvalue = this.parse_date(value,0,0);\r\n\t\t}\r\n\t\tobj[name]=value;\r\n\t},\r\n\tparse_date:function(value,dh,dm){\r\n\t\tvar t = value.split(\"T\");\r\n\r\n\t\tvar utcMark = false;\r\n\t\tif (t[1]){\r\n\t\t\tdh=t[1].substr(0,2);\r\n\t\t\tdm=t[1].substr(2,2);\r\n\t\t\tutcMark = !!(t[1][6] == \"Z\");\r\n\t\t}\r\n\t\tvar dy = t[0].substr(0,4);\r\n\t\tvar dn = parseInt(t[0].substr(4,2),10)-1;\r\n\t\tvar dd = t[0].substr(6,2);\r\n\r\n\t\tif(scheduler.config.server_utc || utcMark){\r\n\t\t\treturn new Date(Date.UTC(dy,dn,dd,dh,dm)) ;\r\n\t\t}else{\r\n\t\t\treturn new Date(dy,dn,dd,dh,dm);\r\n\t\t}\r\n\t},\r\n\tc_start:\"BEGIN:VCALENDAR\",\r\n\te_start:\"BEGIN:VEVENT\",\r\n\te_end:\"END:VEVENT\",\r\n\tc_end:\"END:VCALENDAR\"\t\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._init_touch_events = function(){\r\n\tvar mobile = this.config.touch &&\r\n\t\t( ((navigator.userAgent.indexOf(\"Mobile\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"iPad\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"Android\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"Touch\")!=-1)) && !window.MSStream) ||\r\n\t\t\t((navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1));\r\n\r\n\tif(mobile){\r\n\t\tthis.xy.scroll_width = 0;\r\n\t\tthis._mobile = true;\r\n\t}\r\n\r\n\tif(this.config.touch){\r\n\r\n\t\tvar touchEventsSupported = true;\r\n\t\ttry {\r\n\t\t\tdocument.createEvent(\"TouchEvent\");\r\n\t\t} catch (e) {\r\n\t\t\ttouchEventsSupported = false;\r\n\t\t}\r\n\r\n\t\tif (touchEventsSupported) {\r\n\t\t\tthis._touch_events([\"touchmove\", \"touchstart\", \"touchend\"], function (ev) {\r\n\t\t\t\tif (ev.touches && ev.touches.length > 1) return null;\r\n\t\t\t\tif (ev.touches[0])\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\ttarget: ev.target,\r\n\t\t\t\t\t\tpageX: ev.touches[0].pageX,\r\n\t\t\t\t\t\tpageY: ev.touches[0].pageY,\r\n\t\t\t\t\t\tclientX: ev.touches[0].clientX,\r\n\t\t\t\t\t\tclientY: ev.touches[0].clientY\r\n\t\t\t\t\t};\r\n\t\t\t\telse\r\n\t\t\t\t\treturn ev;\r\n\t\t\t}, function () {\r\n\t\t\t\treturn false;\r\n\t\t\t});\r\n\t\t} else if (window.PointerEvent || window.navigator.pointerEnabled) {\r\n\t\t\tthis._touch_events([\"pointermove\", \"pointerdown\", \"pointerup\"], function (ev) {\r\n\t\t\t\tif (ev.pointerType == \"mouse\") return null;\r\n\t\t\t\treturn ev;\r\n\t\t\t}, function (ev) {\r\n\t\t\t\treturn (!ev || (ev.pointerType == \"mouse\" ));\r\n\t\t\t});\r\n\t\t} else if (window.navigator.msPointerEnabled) {\r\n\t\t\tthis._touch_events([\"MSPointerMove\", \"MSPointerDown\", \"MSPointerUp\"], function (ev) {\r\n\t\t\t\tif (ev.pointerType == ev.MSPOINTER_TYPE_MOUSE) return null;\r\n\t\t\t\treturn ev;\r\n\t\t\t}, function (ev) {\r\n\t\t\t\treturn (!ev || ev.pointerType == ev.MSPOINTER_TYPE_MOUSE);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n};\r\n\r\nscheduler._touch_events = function(names, accessor, ignore){\r\n\t//webkit on android need to be handled separately\r\n\t//var a_webkit = (navigator.userAgent.indexOf(\"Android\")!=-1) && (navigator.userAgent.indexOf(\"WebKit\")!=-1);\r\n\tvar source, tracker, timer, drag_mode, scroll_mode, action_mode;\r\n\tvar dblclicktime = 0;\r\n\r\n\tfunction attachTouchEvent(element, name, callback){\r\n\t\t//touch gestures must be disabled when ligthbox is opened\r\n\t\tscheduler.event(element, name, function(e){\r\n\t\t\tif(scheduler._is_lightbox_open()){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tif (ignore(e)) return;\r\n\t\t\t\treturn callback(e);\r\n\t\t\t}\r\n\t\t}, { passive: false });\r\n\t}\r\n\r\n\tfunction check_direction_swipe(s_ev, e_ev, step, max_dy){\r\n\t\tif (!s_ev || !e_ev) return false;\r\n\r\n\t\tvar t = s_ev.target;\r\n\t\twhile(t && t != scheduler._obj){\r\n\t\t\tt = t.parentNode;\r\n\t\t}\r\n\t\tif(t != scheduler._obj){\r\n\t\t\t//swipe outside scheduler\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// ignore swipe in horizontal timeline\r\n\t\tif(scheduler.matrix && scheduler.matrix[scheduler.getState().mode]){\r\n\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\tif(timeline.scrollable){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar dy = Math.abs(s_ev.pageY - e_ev.pageY);\r\n\t\tvar dx = Math.abs(s_ev.pageX - e_ev.pageX);\r\n\t\tif (dy < max_dy && dx>step && (!dy || (dx/dy > 3))){\r\n\t\t\tif (s_ev.pageX > e_ev.pageX) {\r\n\t\t\t\tscheduler._click.dhx_cal_next_button();\r\n\t\t\t}else {\r\n\t\t\t\tscheduler._click.dhx_cal_prev_button();\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\tfunction doMouseMove(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tvar dnd = scheduler.getState().drag_mode,\r\n\t\t\ttimeline = scheduler.matrix ? scheduler.matrix[scheduler._mode] : false;\r\n\r\n\t\tvar original_render = scheduler.render_view_data;\r\n\t\tif(dnd == 'create' && timeline){\r\n\t\t\t//suppress full redraw of timeline on creating event\r\n\t\t\tscheduler.render_view_data = function() {\r\n\t\t\t\tvar id = scheduler.getState().drag_id;\r\n\t\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\t\tvar property = timeline.y_property;\r\n\r\n\t\t\t\tvar evs = scheduler.getEvents(ev.start_date, ev.end_date);\r\n\t\t\t\tfor(var i = 0; i < evs.length; i++){\r\n\t\t\t\t\tif(evs[i][property] != ev[property]){\r\n\t\t\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tev._sorder = evs.length - 1;\r\n\t\t\t\tev._count = evs.length;\r\n\r\n\t\t\t\tthis.render_data([ev], scheduler.getState().mode);\r\n\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\tscheduler._on_mouse_move(e);\r\n\r\n\t\tif(dnd == 'create' && timeline){\r\n\t\t\tscheduler.render_view_data = original_render;\r\n\t\t}\r\n\r\n\t\tif (e.preventDefault)\r\n\t\t\te.preventDefault();\r\n\t\te.cancelBubble = true;\r\n\t\treturn false;\r\n\t}\r\n\r\n\t// touchmove\r\n\tattachTouchEvent(document.body, names[0], function(e){\r\n\t\tif (ignore(e)) return;\r\n\r\n\t\tvar acc = accessor(e);\r\n\t\tif(!acc) return;\r\n\t\tif (drag_mode){\r\n\t\t\tdoMouseMove(acc);\r\n\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._update_global_tip();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//if (tracker && a_webkit){\r\n\t\t//\tcheck_direction_swipe(tracker, accessor(e), 0);\r\n\t\t//}\r\n\r\n\t\ttracker = accessor(e);\r\n\t\t//ignore common and scrolling moves\r\n\t\tif (!action_mode) return;\r\n\r\n\t\t//multitouch\r\n\t\tif (!tracker){\r\n\t\t\tscroll_mode = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//target changed - probably in scroll mode\r\n\r\n\t\tif (source.target != tracker.target || (Math.abs(source.pageX - tracker.pageX) > 5) || (Math.abs(source.pageY - tracker.pageY) > 5)){\r\n\t\t\tscroll_mode = true;\r\n\t\t\tclearTimeout(timer);\r\n\t\t}\r\n\r\n\t});\r\n\r\n\t//attachTouchEvent(this._els[\"dhx_cal_data\"][0], \"scroll\", drag_cancel);\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], \"touchcancel\", drag_cancel);\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], \"contextmenu\", function(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tif (action_mode){\r\n\t\t\tif (e && e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t});\r\n\r\n\t// touchstart\r\n\tattachTouchEvent(this._obj, names[1], function(e){\r\n\t\t// block pull-to-refresh\r\n\t\tif(document && document.body){\r\n\t\t\tdocument.body.classList.add(\"dhx_cal_touch_active\");\r\n\t\t}\r\n\r\n\t\tif (ignore(e)) return;\r\n\t\tscheduler._pointerDragId = e.pointerId;\r\n\r\n\t\tvar fake_event;\r\n\t\tdrag_mode = scroll_mode = false;\r\n\t\taction_mode = true;\r\n\t\tfake_event = tracker = accessor(e);\r\n\r\n\t\tif (!fake_event){\r\n\t\t\tscroll_mode = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//dbl click\r\n\t\tvar now = new Date();\r\n\r\n\t\tif (!scroll_mode && !drag_mode && now - dblclicktime < 250){\r\n\t\t\tscheduler._click.dhx_cal_data(fake_event);\r\n\t\t\twindow.setTimeout(function(){\r\n\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t//fake_event.type = \"dblclick\";\r\n\t\t\t\tscheduler._on_dbl_click(fake_event);\r\n\t\t\t}, 50);\r\n\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._block_next_stop = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tdblclicktime = now;\r\n\r\n\t\t//drag\r\n\r\n\t\tif (scroll_mode || drag_mode || !scheduler.config.touch_drag)\r\n\t\t\treturn;\r\n\r\n\t\tvar actTask = scheduler._locate_event(document.activeElement);\r\n\t\tvar fakeTask = scheduler._locate_event(fake_event.target);\r\n\t\tvar sourceTask = source? scheduler._locate_event(source.target) : null;\r\n\r\n\t\tif(actTask && fakeTask && actTask == fakeTask && actTask != sourceTask)\r\n\t\t{\r\n\t\t\tif(e.preventDefault) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\tscheduler._click.dhx_cal_data(fake_event);\r\n\t\t\tsource = fake_event;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//there is no target\r\n\t\ttimer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tdrag_mode = true;\r\n\t\t\tvar target = source.target;\r\n\t\t\tvar className = scheduler._getClassName(target);\r\n\t\t\tif (target && className.indexOf(\"dhx_body\") != -1)\r\n\t\t\t\ttarget = target.previousSibling;\r\n\r\n\t\t\tscheduler._on_mouse_down(source, target);\r\n\t\t\tif (scheduler._drag_mode && scheduler._drag_mode != \"create\"){\r\n\t\t\t\tscheduler.for_rendered(scheduler._drag_id, function(node, i) {\r\n\t\t\t\t\tnode.style.display='none';\r\n\t\t\t\t\tscheduler._rendered.splice(i, 1);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (scheduler.config.touch_tip) {\r\n\t\t\t\tscheduler._show_global_tip();\r\n\t\t\t}\r\n\t\t\tscheduler.updateEvent(scheduler._drag_id);\r\n\t\t},scheduler.config.touch_drag);\r\n\r\n\t\tsource = fake_event;\r\n\t});\r\n\tfunction drag_cancel(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tscheduler._hide_global_tip();\r\n\t\tif (drag_mode){\r\n\t\t\tscheduler._on_mouse_up( accessor(e) );\r\n\t\t\tscheduler._temp_touch_block = false;\r\n\t\t}\r\n\t\tscheduler._drag_id = null;\r\n\t\tscheduler._drag_mode=null;\r\n\t\tscheduler._drag_pos=null;\r\n\t\tscheduler._pointerDragId = null;\r\n\t\tclearTimeout(timer);\r\n\t\tdrag_mode = action_mode = false;\r\n\t\tscroll_mode = true;\r\n\t}\r\n\r\n\t// touch end\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], names[2], function(e){\r\n\t\tif(document && document.body){\r\n\t\t\tdocument.body.classList.remove(\"dhx_cal_touch_active\");\r\n\t\t}\r\n\r\n\t\tif (ignore(e)) return;\r\n\r\n\t\tif(scheduler.config.touch_swipe_dates){\r\n\t\t\tif (!drag_mode && check_direction_swipe(source, tracker, 200, 100)) {\r\n\t\t\t\tscheduler._block_next_stop = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (drag_mode) {\r\n\t\t\tscheduler._ignore_next_click = true;\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\t}, 100);\r\n\t\t}\r\n\r\n\t\tdrag_cancel(e);\r\n\t\tif (scheduler._block_next_stop){\r\n\t\t\tscheduler._block_next_stop = false;\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler.event(document.body, names[2], drag_cancel);\r\n};\r\n\r\nscheduler._show_global_tip = function(){\r\n\tscheduler._hide_global_tip();\r\n\r\n\tvar toptip = scheduler._global_tip = document.createElement(\"div\");\r\n\ttoptip.className='dhx_global_tip';\r\n\r\n\tscheduler._update_global_tip(1);\r\n\r\n\tdocument.body.appendChild(toptip);\r\n};\r\nscheduler._update_global_tip = function(init){\r\n\tvar toptip = scheduler._global_tip;\r\n\tif (toptip){\r\n\t\tvar time = \"\";\r\n\t\tif (scheduler._drag_id && !init){\r\n\t\t\tvar ev = scheduler.getEvent(scheduler._drag_id);\r\n\t\t\tif (ev)\r\n\t\t\t\ttime = \"
\" + (ev._timed ? scheduler.templates.event_header(ev.start_date, ev.end_date, ev):scheduler.templates.day_date(ev.start_date, ev.end_date, ev)) + \"
\";\r\n\t\t}\r\n\r\n\t\tif (scheduler._drag_mode == \"create\" || scheduler._drag_mode == \"new-size\")\r\n\t\t\ttoptip.innerHTML = (scheduler.locale.labels.drag_to_create || \"Drag to create\")+time;\r\n\t\telse\r\n\t\t\ttoptip.innerHTML = (scheduler.locale.labels.drag_to_move || \"Drag to move\")+time;\r\n\t}\r\n};\r\nscheduler._hide_global_tip = function(){\r\n\tvar toptip = scheduler._global_tip;\r\n\tif (toptip && toptip.parentNode){\r\n\t\ttoptip.parentNode.removeChild(toptip);\r\n\t\tscheduler._global_tip = 0;\r\n\t}\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._addThemeClass = function(){\r\n\tdocument.documentElement.setAttribute(\"data-scheduler-theme\", scheduler.skin);\r\n};\r\n\r\nscheduler._skin_settings = {\r\n\tfix_tab_position: [1,0],\r\n\tuse_select_menu_space: [1,0],\r\n\twide_form: [1,0],\r\n\r\n\thour_size_px: [44,42],\r\n\tdisplayed_event_color: [\"#ff4a4a\", \"ffc5ab\"],\r\n\tdisplayed_event_text_color: [\"#ffef80\", \"7e2727\"]\r\n};\r\n\r\nscheduler._skin_xy = {\r\n\tlightbox_additional_height: [90,50],\r\n\tnav_height: [59,22],\r\n\tbar_height: [24,20]\r\n};\r\n\r\n// material skin uses a different box sizing model than other skins, and also requires some post-processing.\r\n// In order to render events correctly, we need to know which box sizing model is used\r\n// We can detect it by styles applied, taking into account that styles may be loaded after scheduler is rendered\r\n\r\nscheduler._is_material_skin = function(){\r\n\tif(!scheduler.skin){\r\n\t\treturn checkIfMaterialSkin();\r\n\t}else{\r\n\t\treturn ((scheduler.skin + \"\").indexOf(\"material\") > -1);\r\n\t}\r\n};\r\n\r\nfunction themeNameFromFile(){\r\n\tvar links = document.getElementsByTagName(\"link\");\r\n\tfor (var i = 0; i < links.length; i++) {\r\n\t\tvar res = links[i].href.match(\"dhtmlxscheduler_([a-z]+).css\");\r\n\t\tif (res){\r\n\t\t\treturn res[1];\r\n\t\t}\r\n\t}\r\n}\r\n\r\nscheduler._build_skin_info = function() {\r\n\tmonitorThemeChange();\r\n\tconst styles = getComputedStyle(this.$container);\r\n\tconst themeVar = styles.getPropertyValue(\"--dhx-scheduler-theme\");\r\n\r\n\tlet isCssVarTheme = !!themeVar;\r\n\tlet themeName;\r\n\tlet cssValues = {};\r\n\tlet oldMaterialTheme = false;\r\n\r\n\tif(isCssVarTheme){\r\n\t\tthemeName = themeVar;\r\n\t\tfor(let i in scheduler.xy){\r\n\t\t\tcssValues[i] = styles.getPropertyValue(`--dhx-scheduler-xy-${i}`);\r\n\t\t}\r\n\r\n\t\tcssValues.hour_size_px = styles.getPropertyValue(`--dhx-scheduler-config-hour_size_px`);\r\n\t\tcssValues.wide_form = styles.getPropertyValue(`--dhx-scheduler-config-form_wide`);\r\n\r\n\t}else{\r\n\t\tthemeName = themeNameFromFile();\r\n\t\toldMaterialTheme = scheduler._is_material_skin();\r\n\t}\r\n\r\n\r\n\tscheduler._theme_info = {\r\n\t\ttheme: themeName,\r\n\t\tcssVarTheme: isCssVarTheme,\r\n\t\toldMaterialTheme: oldMaterialTheme,\r\n\t\tvalues: cssValues\r\n\t};\r\n\r\n\tif(scheduler._theme_info.cssVarTheme){\r\n\t\tconst themeVariables = this._theme_info.values;\r\n\t\tfor(let i in scheduler.xy){\r\n\t\t\tif(!isNaN(parseInt(themeVariables[i]))){\r\n\t\t\t\tscheduler.xy[i] = parseInt(themeVariables[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n\r\nvar calculatedMaterial;\r\nfunction checkIfMaterialSkin(){\r\n\tif(calculatedMaterial === undefined){\r\n\t\tvar probe = document.createElement(\"div\");\r\n\t\tprobe.style.position = \"absolute\";\r\n\t\tprobe.style.left = \"-9999px\";\r\n\t\tprobe.style.top = \"-9999px\";\r\n\t\tprobe.innerHTML = \"
\" +\r\n\t\t\t\"
\" +\r\n\t\t\t\"
\"+\r\n\t\t\"
\";\r\n\t\tdocument.body.appendChild(probe);\r\n\t\tvar styles = window.getComputedStyle(probe.querySelector(\".dhx_cal_scale_placeholder\"));\r\n\t\tvar position = styles.getPropertyValue('position');\r\n\t\tif(position === \"absolute\"){\r\n\t\t\t// page has skins for placeholder element from material skin\r\n\t\t\tcalculatedMaterial = true;\r\n\t\t}else{\r\n\t\t\tcalculatedMaterial = false;\r\n\t\t}\r\n\r\n\t\tsetTimeout(function(){\r\n\t\t\tcalculatedMaterial = null;\r\n\t\t\tif(probe && probe.parentNode){\r\n\t\t\t\tprobe.parentNode.removeChild(probe);\r\n\t\t\t}\r\n\t\t}, 500);\r\n\t}\r\n\treturn calculatedMaterial;\r\n}\r\n\r\nvar cachedBorderBoxValue;\r\nfunction checkIfBorderBoxStyling(){\r\n\tif(scheduler._is_material_skin()){\r\n\t\treturn true;\r\n\t}else{\r\n\t\tif(cachedBorderBoxValue === undefined){\r\n\t\t\tvar probe = document.createElement(\"div\");\r\n\t\t\tprobe.style.position = \"absolute\";\r\n\t\t\tprobe.style.left = \"-9999px\";\r\n\t\t\tprobe.style.top = \"-9999px\";\r\n\t\t\tprobe.innerHTML = \"
\" +\r\n\t\t\t\t\"
\" +\r\n\t\t\t\t\t\"
\"+\r\n\t\t\t\t\"
\"+\r\n\t\t\t\"
\";\r\n\r\n\t\t\tdocument.body.appendChild(probe);\r\n\t\t\tvar styles = window.getComputedStyle(probe.querySelector(\".dhx_body\"));\r\n\t\t\tvar boxSizing = styles.getPropertyValue('box-sizing');\r\n\t\t\tdocument.body.removeChild(probe);\r\n\t\t\tcachedBorderBoxValue = !!(boxSizing === \"border-box\");\r\n\r\n\t\t\tif(!cachedBorderBoxValue){\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tcachedBorderBoxValue = undefined;\r\n\t\t\t\t}, 1000);// recalculate in case scheduler initialized before skin is loaded\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn cachedBorderBoxValue;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction refreshAfterLoad(){\r\n\tif(scheduler._is_material_skin() || scheduler._border_box_events()){\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar oldStyling = cachedBorderBoxValue;\r\n\tcachedBorderBoxValue = undefined;\r\n\tcalculatedMaterial = undefined;\r\n\tvar newStyling = checkIfBorderBoxStyling();\r\n\r\n\t// if box styling model changed - means scheduler was rendered before stylesheet was loaded or parsed inline\r\n\t// repaint scheduler in order to apply new styles\r\n\tif(oldStyling !== newStyling && scheduler.$container && scheduler.getState().mode){\r\n\t\tscheduler.setCurrentView();\r\n\t}\r\n}\r\nscheduler.event(window, 'DOMContentLoaded', refreshAfterLoad);\r\nscheduler.event(window, 'load', refreshAfterLoad);\r\n\r\nscheduler._border_box_events = function(){\r\n\treturn checkIfBorderBoxStyling();\r\n};\r\n\r\nscheduler._configure = function(col, data, skin){\r\n\tfor (var key in data)\r\n\t\tif (typeof col[key] == \"undefined\")\r\n\t\t\tcol[key] = data[key][skin];\r\n};\r\n\r\nscheduler.setSkin = function(value){\r\n\tthis.skin = value;\r\n\tscheduler._addThemeClass();\r\n\tif(scheduler.$container){\r\n\t\tthis._skin_init();\r\n\t\tthis.render();\r\n\t}\r\n\t\r\n\t//\r\n};\r\n\r\nfunction flatSkinHourScale(date){\r\n\tvar min = date.getMinutes();\r\n\tmin = min < 10 ? \"0\"+min : min;\r\n\tvar html = \"\"+ date.getHours() +\"\"+\r\n\t\t\" \"+ min +\"\";\r\n\treturn html;\r\n}\r\n\r\nlet monitorIntervalId = null;\r\nfunction monitorThemeChange(){\r\n\tconst container = scheduler.$container;\r\n\t\r\n\tclearInterval(monitorIntervalId);\r\n\tif(container){\r\n\t\tmonitorIntervalId = setInterval(() => {\r\n\t\t\tconst csstheme = getComputedStyle(container).getPropertyValue('--dhx-scheduler-theme');\r\n\t\t\tif(csstheme && csstheme !== scheduler.skin){\r\n\t\t\t\tscheduler.setSkin(csstheme);\r\n\t\t\t}\r\n\r\n\t\t}, 100);\r\n\t}\r\n}\r\nscheduler.attachEvent(\"onDestroy\", function(){\r\n\tclearInterval(monitorIntervalId);\r\n});\r\n\r\nscheduler._skin_init = function(){\r\n\tthis._build_skin_info();\r\n\r\n\tif (!this.skin){\r\n\t\tthis.skin = this._theme_info.theme;\r\n\t}\r\n\tscheduler._addThemeClass();\r\n\tif (scheduler.skin === \"flat\"){\r\n\t\t// scheduler.xy.scale_height = 35;\r\n\t\tscheduler.templates.hour_scale = flatSkinHourScale;\r\n\t}else if (scheduler.templates.hour_scale === flatSkinHourScale){\r\n\t\tscheduler.templates.hour_scale = scheduler.date.date_to_str(scheduler.config.hour_date);\r\n\t}\r\n\r\n\r\n\r\n\t//scheduler._lightbox_template=\"
 
\";\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\r\n\t\tvar date_to_str = scheduler.date.date_to_str(\"%d\");\r\n\t\tif(!scheduler.templates._old_month_day){\r\n\t\t\tscheduler.templates._old_month_day = scheduler.templates.month_day;\r\n\t\t}\r\n\t\tvar old_month_day = scheduler.templates._old_month_day;\r\n\t\tscheduler.templates.month_day = function(date) {\r\n\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\tvar label = date_to_str(date);\r\n\t\t\t\tif (date.getDate() == 1) {\r\n\t\t\t\t\tlabel = scheduler.locale.date.month_full[date.getMonth()] + \" \" + label;\r\n\t\t\t\t}\r\n\t\t\t\tif (+date == +scheduler.date.date_part(this._currentDate())) {\r\n\t\t\t\t\tlabel = scheduler.locale.labels.dhx_cal_today_button + \" \" + label;\r\n\t\t\t\t}\r\n\t\t\t\treturn label;\r\n\t\t\t} else {\r\n\t\t\t\treturn old_month_day.call(this, date);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t// tab classes\r\n\t\tif(scheduler.config.fix_tab_position){\r\n\t\t\tconst tabs = scheduler._els[\"dhx_cal_navline\"][0].querySelectorAll('[data-tab]');\r\n\t\t\ttabs.forEach((tab) => {\r\n\t\t\t\tconst view = tab.getAttribute(\"data-tab\") || tab.getAttribute(\"name\");\r\n\r\n\t\t\t\tswitch (view) {\r\n\t\t\t\t\tcase \"day\":\r\n\t\t\t\t\tcase \"day_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_first\");\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"week\":\r\n\t\t\t\t\tcase \"week_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"month\":\r\n\t\t\t\t\tcase \"month_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_last\");\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_standalone\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\treorderTabs(scheduler._els[\"dhx_cal_navline\"][0]);\r\n\r\n\t\t}\r\n\t}, {once: true});\r\n\r\n\tfunction reorderTabs(container) {\r\n\t\t// segmented tabs should go first\r\n\r\n\t\tif(scheduler.config.header){\r\n\t\t\treturn;\r\n\t\t\t// don't reorder tabs if header is defined via config\r\n\t\t}\r\n\t\tconst tabs = Array.from(container.querySelectorAll('.dhx_cal_tab'));\r\n\t\r\n\t\t// segmented tabs\r\n\t\tconst order = ['day', 'week', 'month'];\r\n\t\r\n\t\tconst specialTabs = order.map(tabName => \r\n\t\t\ttabs.find(tab => tab.getAttribute('data-tab') === tabName)\r\n\t\t).filter(tab => tab !== undefined);\r\n\t\r\n\t\tlet firstTab = tabs.length > 0 ? tabs[0] : null;\r\n\r\n\t\tspecialTabs.reverse().forEach(tab => {\r\n\t\t\tcontainer.insertBefore(tab, firstTab);\r\n\t\t\tfirstTab = tab;\r\n\t\t});\r\n\t}\r\n\r\n\t// scheduler._skin_init = function(){\r\n\t// \tthis._build_skin_info();\r\n\t// \tthis.skin = this._theme_info.theme;\r\n\t// };\r\n};\r\n\r\n\r\n\r\n}","export default function DataProcessorEvents(scheduler, dp){\r\n\tthis.$scheduler = scheduler;\r\n\tthis.$dp = dp;\r\n\tthis._dataProcessorHandlers = [];\r\n\r\n\tthis.attach = function () {\r\n\t\tvar dp = this.$dp;\r\n\t\tvar scheduler = this.$scheduler;\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onEventAdded\", function(id) {\r\n\t\t\tif (!this._loading && this._validId(id))\r\n\t\t\tdp.setUpdated(id,true,\"inserted\");\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function(id) {\r\n\t\t\tif (!this._validId(id)) return;\r\n\t\t\tvar z=dp.getState(id);\r\n\r\n\t\t\tif (z==\"inserted\" || this._new_event) { dp.setUpdated(id,false); return true; }\r\n\t\t\tif (z==\"deleted\") return false;\r\n\t\t\tif (z==\"true_deleted\") return true;\r\n\r\n\t\t\tdp.setUpdated(id,true,\"deleted\");\r\n\t\t\treturn false;\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onEventChanged\", function(id) { \r\n\t\t\tif (!this._loading && this._validId(id))\r\n\t\t\tdp.setUpdated(id,true,\"updated\");\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onClearAll\", function() { \r\n\t\t\t// clear dataprocessor state when scheduler is reset\r\n\t\t\tdp._in_progress={};\r\n\t\t\tdp._invalid={};\r\n\t\t\tdp.updatedRows = [];\r\n\t\t\tdp._waitMode = 0;\r\n\t\t}));\r\n\r\n\t\tdp.attachEvent(\"insertCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"updateCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"deleteCallback\", function(upd, id) {\r\n\t\t\tif (scheduler.getEvent(id)){\r\n\t\t\t\tscheduler.setUserData(id, this.action_param, \"true_deleted\");\r\n\t\t\t\tscheduler.deleteEvent(id);\r\n\t\t\t} else if (scheduler._add_rec_marker)\r\n\t\t\t\tscheduler._update_callback(upd, id);\r\n\t\t});\r\n\t};\r\n\r\n\tthis.detach = function () {\r\n\t\tfor (var key in this._dataProcessorHandlers) {\r\n\t\t\tvar handler = this._dataProcessorHandlers[key];\r\n\t\t\tthis.$scheduler.detachEvent(handler);\r\n\t\t}\r\n\t\tthis._dataProcessorHandlers = [];\r\n\t};\r\n}\r\n\r\nexport function extendScheduler(scheduler, dp){\r\n\tscheduler._validId=function(id){\r\n\t\tif(this._is_virtual_event){\r\n\t\t\treturn !this._is_virtual_event(id);\r\n\t\t}\r\n\t\treturn true;\r\n\t};\r\n\tscheduler.setUserData=function(id,name,value){\r\n\t\tif (id){\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif(ev) ev[name]=value;\r\n\t\t}else{\r\n\t\t\tthis._userdata[name]=value;\r\n\t\t}\r\n\t};\r\n\tscheduler.getUserData=function(id,name){\r\n\t\tif (id){\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif(ev)\r\n\t\t\t\treturn ev[name];\r\n\t\t\telse\r\n\t\t\t\treturn null;\r\n\t\t}else{\r\n\t\t\treturn this._userdata[name];\r\n\t\t}\r\n\t};\r\n\tscheduler._set_event_text_style=function(id,style){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\t\tthis.for_rendered(id,function(r){\r\n\t\t\tr.style.cssText+=\";\"+style;\r\n\t\t});\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tev[\"_text_style\"]=style;\r\n\t\tthis.event_updated(ev);\r\n\t};\r\n\tscheduler._update_callback = function(upd,id){\r\n\t\tvar data = scheduler._xmlNodeToJSON(upd.firstChild);\r\n\t\t//fix for updates of recurring events\r\n\t\tif (data.rec_type == \"none\") data.rec_pattern = \"none\";\r\n\t\tdata.text = data.text||data._tagvalue;\r\n\t\tdata.start_date = scheduler._helpers.parseDate(data.start_date);\r\n\t\tdata.end_date = scheduler._helpers.parseDate(data.end_date);\r\n\t\tscheduler.addEvent(data);\r\n\t\tif (scheduler._add_rec_marker)\r\n\t\t\tscheduler.setCurrentView();\r\n\t};\r\n\tscheduler._dp_change_event_id = function(id, new_id){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\t\tscheduler.changeEventId(id, new_id);\r\n\t};\r\n\tscheduler._dp_hook_delete = function(id, new_id){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\r\n\t\tif(new_id && id != new_id){\r\n\t\t\tif(this.getUserData(id, dp.action_param) == \"true_deleted\")\r\n\t\t\t\tthis.setUserData(id, dp.action_param, \"updated\");\r\n\r\n\t\t\tthis.changeEventId(id, new_id);\r\n\t\t}\r\n\t\treturn this.deleteEvent(new_id, true);\r\n\t};\r\n\r\n\tscheduler.setDp = function() {\r\n\t\tthis._dp = dp;\r\n\t};\r\n\tscheduler.setDp();\r\n}","import DataProcessorEvents from \"./dataprocessor_hooks\";\r\nimport { extendScheduler } from \"./dataprocessor_hooks\";\r\nimport eventable from \"../../utils/eventable\";\r\nimport global from \"../../global\";\r\n\r\n/**\r\n *\t@desc: constructor, data processor object\r\n *\t@param: serverProcessorURL - url used for update\r\n *\t@type: public\r\n */\r\nexport function DataProcessor(serverProcessorURL){\r\n\tthis.serverProcessor = serverProcessorURL;\r\n\tthis.action_param = \"!nativeeditor_status\";\r\n\r\n\tthis.object = null;\r\n\tthis.updatedRows = []; // ids of updated rows\r\n\r\n\tthis.autoUpdate = true;\r\n\tthis.updateMode = \"cell\";\r\n\tthis._tMode = \"GET\";\r\n\tthis._headers = null;\r\n\tthis._payload = null;\r\n\tthis.post_delim = \"_\";\r\n\r\n\tthis._waitMode = 0;\r\n\tthis._in_progress = {};\r\n\tthis._invalid = {};\r\n\tthis.messages = [];\r\n\r\n\tthis.styles = {\r\n\t\tupdated: \"font-weight:bold;\",\r\n\t\tinserted: \"font-weight:bold;\",\r\n\t\tdeleted: \"text-decoration : line-through;\",\r\n\t\tinvalid: \"background-color:FFE0E0;\",\r\n\t\tinvalid_cell: \"border-bottom:2px solid red;\",\r\n\t\terror: \"color:red;\",\r\n\t\tclear: \"font-weight:normal;text-decoration:none;\"\r\n\t};\r\n\tthis.enableUTFencoding(true);\r\n\teventable(this); // TODO: need to update\r\n\r\n\treturn this;\r\n}\r\nDataProcessor.prototype = {\r\n\tsetTransactionMode: function (mode, total) {\r\n\t\tif (typeof mode == \"object\") {\r\n\t\t\tthis._tMode = mode.mode || this._tMode;\r\n\r\n\t\t\tif (mode.headers !== undefined) {\r\n\t\t\t\tthis._headers = mode.headers;\r\n\t\t\t}\r\n\r\n\t\t\tif (mode.payload !== undefined) {\r\n\t\t\t\tthis._payload = mode.payload;\r\n\t\t\t}\r\n\t\t\tthis._tSend = !!total;\r\n\t\t} else {\r\n\t\t\tthis._tMode = mode;\r\n\t\t\tthis._tSend = total;\r\n\t\t}\r\n\r\n\t\tif (this._tMode == \"REST\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t}\r\n\r\n\t\tif (this._tMode === \"JSON\" || this._tMode === \"REST-JSON\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t\tthis._serializeAsJson = true;\r\n\t\t\tthis._headers = this._headers || {};\r\n\t\t\tthis._headers[\"Content-Type\"] = \"application/json\";\r\n\t\t}else{\r\n\t\t\tif(this._headers && !this._headers[\"Content-Type\"]){\r\n\t\t\t\tthis._headers[\"Content-Type\"] = \"application/x-www-form-urlencoded\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (this._tMode === \"CUSTOM\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t\tthis._router = mode.router;\r\n\t\t}\r\n\t},\r\n\tescape: function (data) {\r\n\t\tif (this._utf)\r\n\t\t\treturn encodeURIComponent(data);\r\n\t\telse\r\n\t\t\treturn escape(data);\r\n\t},\r\n\t/**\r\n\t *\t@desc: allows to set escaping mode\r\n\t *\t@param: true - utf based escaping, simple - use current page encoding\r\n\t *\t@type: public\r\n\t */\r\n\tenableUTFencoding: function (mode) {\r\n\t\tthis._utf = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: allows to define, which column may trigger update\r\n\t *\t@param: val - array or list of true/false values\r\n\t *\t@type: public\r\n\t */\r\n\tsetDataColumns: function (val) {\r\n\t\tthis._columns = (typeof val == \"string\") ? val.split(\",\") : val;\r\n\t},\r\n\t/**\r\n\t *\t@desc: get state of updating\r\n\t *\t@returns: true - all in sync with server, false - some items not updated yet.\r\n\t *\t@type: public\r\n\t */\r\n\tgetSyncState: function () {\r\n\t\treturn !this.updatedRows.length;\r\n\t},\r\n\t/**\r\n\t *\t@desc: enable/disable named field for data syncing, will use column ids for grid\r\n\t *\t@param: mode - true/false\r\n\t *\t@type: public\r\n\t */\r\n\tenableDataNames: function (mode) {\r\n\t\tthis._endnm = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: enable/disable mode , when only changed fields and row id send to the server side, instead of all fields in default mode\r\n\t *\t@param: mode - true/false\r\n\t *\t@type: public\r\n\t */\r\n\tenablePartialDataSend: function (mode) {\r\n\t\tthis._changed = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: set if rows should be send to server automatically\r\n\t *\t@param: mode - \"row\" - based on row selection changed, \"cell\" - based on cell editing finished, \"off\" - manual data sending\r\n\t *\t@type: public\r\n\t */\r\n\tsetUpdateMode: function (mode, dnd) {\r\n\t\tthis.autoUpdate = (mode == \"cell\");\r\n\t\tthis.updateMode = mode;\r\n\t\tthis.dnd = dnd;\r\n\t},\r\n\tignore: function (code, master) {\r\n\t\tthis._silent_mode = true;\r\n\t\tcode.call(master || window);\r\n\t\tthis._silent_mode = false;\r\n\t},\r\n\t/**\r\n\t *\t@desc: mark row as updated/normal. check mandatory fields,initiate autoupdate (if turned on)\r\n\t *\t@param: rowId - id of row to set update-status for\r\n\t *\t@param: state - true for \"updated\", false for \"not updated\"\r\n\t *\t@param: mode - update mode name\r\n\t *\t@type: public\r\n\t */\r\n\tsetUpdated: function (rowId, state, mode) {\r\n\t\tif (this._silent_mode) return;\r\n\t\tvar ind = this.findRow(rowId);\r\n\r\n\t\tmode = mode || \"updated\";\r\n\t\tvar existing = this.$scheduler.getUserData(rowId, this.action_param);\r\n\t\tif (existing && mode == \"updated\") mode = existing;\r\n\t\tif (state) {\r\n\t\t\tthis.set_invalid(rowId, false); //clear previous error flag\r\n\t\t\tthis.updatedRows[ind] = rowId;\r\n\t\t\tthis.$scheduler.setUserData(rowId, this.action_param, mode);\r\n\t\t\tif (this._in_progress[rowId])\r\n\t\t\t\tthis._in_progress[rowId] = \"wait\";\r\n\t\t} else {\r\n\t\t\tif (!this.is_invalid(rowId)) {\r\n\t\t\t\tthis.updatedRows.splice(ind, 1);\r\n\t\t\t\tthis.$scheduler.setUserData(rowId, this.action_param, \"\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.markRow(rowId, state, mode);\r\n\t\tif (state && this.autoUpdate) this.sendData(rowId);\r\n\t},\r\n\r\n\tmarkRow: function (id, state, mode) {\r\n\t\tvar str = \"\";\r\n\t\tvar invalid = this.is_invalid(id);\r\n\t\tif (invalid) {\r\n\t\t\tstr = this.styles[invalid];\r\n\t\t\tstate = true;\r\n\t\t}\r\n\t\tif (this.callEvent(\"onRowMark\", [id, state, mode, invalid])) {\r\n\t\t\t//default logic\r\n\t\t\tstr = this.styles[state ? mode : \"clear\"] + str;\r\n\r\n\t\t\tthis.$scheduler[this._methods[0]](id, str);\r\n\r\n\t\t\tif (invalid && invalid.details) {\r\n\t\t\t\tstr += this.styles[invalid + \"_cell\"];\r\n\t\t\t\tfor (var i = 0; i < invalid.details.length; i++)\r\n\t\t\t\t\tif (invalid.details[i])\r\n\t\t\t\t\t\tthis.$scheduler[this._methods[1]](id, i, str);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tgetActionByState: function(state) {\r\n\t\tif (state === \"inserted\") {\r\n\t\t\treturn \"create\";\r\n\t\t}\r\n\t\tif (state === \"updated\") {\r\n\t\t\treturn \"update\";\r\n\t\t}\r\n\t\tif (state === \"deleted\") {\r\n\t\t\treturn \"delete\";\r\n\t\t}\r\n\t\treturn \"update\";\r\n\t},\r\n\r\n\tgetState: function (id) {\r\n\t\treturn this.$scheduler.getUserData(id, this.action_param);\r\n\t},\r\n\tis_invalid: function (id) {\r\n\t\treturn this._invalid[id];\r\n\t},\r\n\tset_invalid: function (id, mode, details) {\r\n\t\tif (details) mode = {\r\n\t\t\tvalue: mode, details: details, toString: function () {\r\n\t\t\t\treturn this.value.toString();\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis._invalid[id] = mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: check mandatory fields and varify values of cells, initiate update (if specified)\r\n\t *\t@param: rowId - id of row to set update-status for\r\n\t *\t@type: public\r\n\t */\r\n\tcheckBeforeUpdate: function (rowId) {\r\n\t\treturn true;\r\n\t},\r\n\t/**\r\n\t *\t@desc: send row(s) values to server\r\n\t *\t@param: rowId - id of row which data to send. If not specified, then all \"updated\" rows will be send\r\n\t *\t@type: public\r\n\t */\r\n\tsendData: function (rowId) {\r\n\t\tif (this.$scheduler.editStop) this.$scheduler.editStop();\r\n\r\n\t\tif (typeof rowId == \"undefined\" || this._tSend) return this.sendAllData();\r\n\t\tif (this._in_progress[rowId]) return false;\r\n\r\n\t\tthis.messages = [];\r\n\t\tif (!this.checkBeforeUpdate(rowId) && this.callEvent(\"onValidationError\", [rowId, this.messages])) return false;\r\n\t\tthis._beforeSendData(this._getRowData(rowId), rowId);\r\n\t},\r\n\t_beforeSendData: function (data, rowId) {\r\n\t\tif (!this.callEvent(\"onBeforeUpdate\", [rowId, this.getState(rowId), data])) return false;\r\n\t\tthis._sendData(data, rowId);\r\n\t},\r\n\tserialize: function (data, id) {\r\n\t\tif (this._serializeAsJson) {\r\n\t\t\treturn this._serializeAsJSON(data);\r\n\t\t}\r\n\r\n\t\tif (typeof data == \"string\")\r\n\t\t\treturn data;\r\n\t\tif (typeof id != \"undefined\")\r\n\t\t\treturn this.serialize_one(data, \"\");\r\n\t\telse {\r\n\t\t\tvar stack = [];\r\n\t\t\tvar keys = [];\r\n\t\t\tfor (var key in data)\r\n\t\t\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\t\t\tstack.push(this.serialize_one(data[key], key + this.post_delim));\r\n\t\t\t\t\tkeys.push(key);\r\n\t\t\t\t}\r\n\t\t\tstack.push(\"ids=\" + this.escape(keys.join(\",\")));\r\n\t\t\tif (this.$scheduler.security_key)\r\n\t\t\t\tstack.push(\"dhx_security=\" + (this.$scheduler.security_key));\r\n\t\t\treturn stack.join(\"&\");\r\n\t\t}\r\n\t},\r\n\tserialize_one: function (data, pref) {\r\n\t\tif (typeof data == \"string\")\r\n\t\t\treturn data;\r\n\t\tvar stack = [];\r\n\t\tvar serialized = \"\";\r\n\t\tfor (var key in data)\r\n\t\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\t\tif ((key == \"id\" || key == this.action_param) && this._tMode == \"REST\") continue;\r\n\t\t\t\tif (typeof data[key] === \"string\" || typeof data[key] === \"number\") {\r\n\t\t\t\t\tserialized = data[key];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tserialized = JSON.stringify(data[key]);\r\n\t\t\t\t}\r\n\t\t\t\tstack.push(this.escape((pref || \"\") + key) + \"=\" + this.escape(serialized));\r\n\t\t\t}\r\n\t\treturn stack.join(\"&\");\r\n\t},\r\n\t_applyPayload: function (url) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tif (this._payload)\r\n\t\t\tfor (var key in this._payload)\r\n\t\t\t\turl = url + ajax.urlSeparator(url) + this.escape(key) + \"=\" + this.escape(this._payload[key]);\r\n\t\treturn url;\r\n\t},\r\n\t_sendData: function (dataToSend, rowId) {\r\n\t\tif (!dataToSend) {\r\n\t\t\treturn; // nothing to send\r\n\t\t}\r\n\t\tif (!this.callEvent(\"onBeforeDataSending\", rowId ? [rowId, this.getState(rowId), dataToSend] : [null, null, dataToSend])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (rowId) {\r\n\t\t\tthis._in_progress[rowId] = (new Date()).valueOf();\r\n\t\t}\r\n\r\n\t\tvar self = this;\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\r\n\t\tif (this._tMode === \"CUSTOM\") {\r\n\t\t\tvar state = this.getState(rowId);\r\n\t\t\tvar action = this.getActionByState(state);\r\n\t\t\tvar _onResolvedCreateUpdate = function (tag) {\r\n\t\t\t\tvar resultState = state;\r\n\t\t\t\tif(tag && tag.responseText && tag.setRequestHeader){\r\n\t\t\t\t\tif(tag.status !== 200){\r\n\t\t\t\t\t\tresultState = \"error\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\ttag = JSON.parse(tag.responseText);\r\n\t\t\t\t\t} catch (e){}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tresultState = resultState || \"updated\";\r\n\t\t\t\tvar sid = rowId;\r\n\t\t\t\tvar tid = rowId;\r\n\r\n\t\t\t\tif (tag) {\r\n\t\t\t\t\tresultState = tag.action || resultState;\r\n\t\t\t\t\tsid = tag.sid || sid;\r\n\t\t\t\t\ttid = tag.id || tag.tid || tid;\r\n\t\t\t\t}\r\n\t\t\t\tself.afterUpdateCallback(sid, tid, resultState, tag);\r\n\t\t\t};\r\n\r\n\t\t\tconst routerMode = \"event\";\r\n\t\t\tvar actionPromise;\r\n\t\t\tif (this._router instanceof Function) {\r\n\t\t\t\tactionPromise = this._router(routerMode, action, dataToSend, rowId);\r\n\t\t\t} else {\r\n\t\t\t\tswitch (state) {\r\n\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].create(dataToSend);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].delete(rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].update(dataToSend, rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(actionPromise){\r\n\t\t\t\t// neither promise nor {tid: newId} response object\r\n\t\t\t\tif(!actionPromise.then &&\r\n\t\t\t\t\t(actionPromise.id === undefined && actionPromise.tid === undefined && actionPromise.action === undefined)){\r\n\t\t\t\t\tthrow new Error(\"Incorrect router return value. A Promise or a response object is expected\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(actionPromise.then){\r\n\t\t\t\t\tactionPromise.then(_onResolvedCreateUpdate).catch(function(error) {\r\n\t\t\t\t\t\tif(error && error.action){\r\n\t\t\t\t\t\t\t_onResolvedCreateUpdate(error);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t_onResolvedCreateUpdate({ action: \"error\", value: error});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// custom method may return a response object in case of sync action\r\n\t\t\t\t\t_onResolvedCreateUpdate(actionPromise);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t_onResolvedCreateUpdate(null);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar queryParams = {\r\n\t\t\tcallback: function(xml) {\r\n\t\t\t\tvar ids = [];\r\n\r\n\t\t\t\tif (rowId) {\r\n\t\t\t\t\tids.push(rowId);\r\n\t\t\t\t} else if (dataToSend) {\r\n\t\t\t\t\tfor (var key in dataToSend) {\r\n\t\t\t\t\t\tids.push(key);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.afterUpdate(self, xml, ids);\r\n\t\t\t},\r\n\t\t\theaders: self._headers\r\n\t\t};\r\n\r\n\t\tvar urlParams = this.serverProcessor + (this._user ? (ajax.urlSeparator(this.serverProcessor) + [\"dhx_user=\" + this._user, \"dhx_version=\" + this.$scheduler.getUserData(0, \"version\")].join(\"&\")) : \"\");\r\n\t\tvar url = this._applyPayload(urlParams);\r\n\t\tvar data;\r\n\r\n\t\tswitch (this._tMode) {\r\n\t\t\tcase \"GET\":\r\n\t\t\t\tdata = this._cleanupArgumentsBeforeSend(dataToSend);\r\n\t\t\t\tqueryParams.url = url + ajax.urlSeparator(url) + this.serialize(data, rowId);\r\n\t\t\t\tqueryParams.method = \"GET\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"POST\":\r\n\t\t\t\tdata = this._cleanupArgumentsBeforeSend(dataToSend);\r\n\t\t\t\tqueryParams.url = url;\r\n\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\tqueryParams.data = this.serialize(data, rowId);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"JSON\":\r\n\t\t\t\tdata = {};\r\n\t\t\t\tvar preprocessedData = this._cleanupItemBeforeSend(dataToSend);\r\n\t\t\t\tfor (var key in preprocessedData) {\r\n\t\t\t\t\tif (key === this.action_param || key === \"id\" || key === \"gr_id\") {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdata[key] = preprocessedData[key];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tqueryParams.url = url;\r\n\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\tqueryParams.data = JSON.stringify({\r\n\t\t\t\t\tid: rowId,\r\n\t\t\t\t\taction: dataToSend[this.action_param],\r\n\t\t\t\t\tdata: data\r\n\t\t\t\t});\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"REST\":\r\n\t\t\tcase \"REST-JSON\":\r\n\t\t\t\turl = urlParams.replace(/(&|\\?)editing=true/, \"\");\r\n\t\t\t\tdata = \"\";\r\n\r\n\t\t\t\tswitch (this.getState(rowId)) {\r\n\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\t\t\tqueryParams.data = this.serialize(dataToSend, rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\tqueryParams.method = \"DELETE\";\r\n\t\t\t\t\t\turl = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + rowId;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tqueryParams.method = \"PUT\";\r\n\t\t\t\t\t\tqueryParams.data = this.serialize(dataToSend, rowId);\r\n\t\t\t\t\t\turl = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + rowId;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tqueryParams.url = this._applyPayload(url);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tthis._waitMode++;\r\n\t\treturn ajax.query(queryParams);\r\n\t},\r\n\tsendAllData: function () {\r\n\t\tif (!this.updatedRows.length || this.updateMode === \"off\") { // FIXME: need to leave checking 'this.updateMode === \"off\"'?\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.messages = [];\r\n\t\tvar valid = true;\r\n\r\n\t\tthis._forEachUpdatedRow(function(rowId) {\r\n\t\t\tvalid = valid && this.checkBeforeUpdate(rowId);\r\n\t\t});\r\n\r\n\t\tif (!valid && !this.callEvent(\"onValidationError\", [\"\", this.messages])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (this._tSend) {\r\n\t\t\tthis._sendData(this._getAllData());\r\n\t\t} else {\r\n\t\t\tthis._forEachUpdatedRow(function(rowId) {\r\n\t\t\t\tif (!this._in_progress[rowId]) {\r\n\t\t\t\t\tif (this.is_invalid(rowId)) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis._beforeSendData(this._getRowData(rowId), rowId);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\t_getAllData: function (rowId) {\r\n\t\tvar out = {};\r\n\t\tvar has_one = false;\r\n\t\tthis._forEachUpdatedRow(function(id) {\r\n\t\t\tif (this._in_progress[id] || this.is_invalid(id)){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar row = this._getRowData(id);\r\n\t\t\tif (!this.callEvent(\"onBeforeUpdate\", [id, this.getState(id), row])) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tout[id] = row;\r\n\t\t\thas_one = true;\r\n\t\t\tthis._in_progress[id] = (new Date()).valueOf();\r\n\t\t});\r\n\t\treturn has_one ? out : null;\r\n\t},\r\n\r\n\tfindRow: function (pattern) {\r\n\t\tvar i = 0;\r\n\t\tfor (i = 0; i < this.updatedRows.length; i++)\r\n\t\t\tif (pattern == this.updatedRows[i]) break;\r\n\t\treturn i;\r\n\t},\r\n\r\n\t/**\r\n\t *\t@desc: define custom actions\r\n\t *\t@param: name - name of action, same as value of action attribute\r\n\t *\t@param: handler - custom function, which receives a XMl response content for action\r\n\t *\t@type: private\r\n\t */\r\n\tdefineAction: function (name, handler) {\r\n\t\tif (!this._uActions) this._uActions = {};\r\n\t\tthis._uActions[name] = handler;\r\n\t},\r\n\r\n\t/**\r\n\t *\t @desc: used in combination with setOnBeforeUpdateHandler to create custom client-server transport system\r\n\t *\t @param: sid - id of item before update\r\n\t *\t @param: tid - id of item after up0ate\r\n\t *\t @param: action - action name\r\n\t *\t @type: public\r\n\t *\t @topic: 0\r\n\t */\r\n\tafterUpdateCallback: function (sid, tid, action, btag) {\r\n\t\tif(!this.$scheduler){\r\n\t\t\t// destructor has been called before the callback\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar marker = sid;\r\n\t\tvar correct = (action !== \"error\" && action !== \"invalid\");\r\n\t\tif (!correct) {\r\n\t\t\tthis.set_invalid(sid, action);\r\n\t\t}\r\n\t\tif ((this._uActions) && (this._uActions[action]) && (!this._uActions[action](btag))) {\r\n\t\t\treturn (delete this._in_progress[marker]);\r\n\t\t}\r\n\r\n\t\tif (this._in_progress[marker] !== \"wait\") {\r\n\t\t\tthis.setUpdated(sid, false);\r\n\t\t}\r\n\r\n\t\tvar originalSid = sid;\r\n\r\n\t\tswitch (action) {\r\n\t\t\tcase \"inserted\":\r\n\t\t\tcase \"insert\":\r\n\t\t\t\tif (tid != sid) {\r\n\t\t\t\t\tthis.setUpdated(sid, false);\r\n\t\t\t\t\tthis.$scheduler[this._methods[2]](sid, tid);\r\n\t\t\t\t\tsid = tid;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"delete\":\r\n\t\t\tcase \"deleted\":\r\n\t\t\t\tthis.$scheduler.setUserData(sid, this.action_param, \"true_deleted\");\r\n\t\t\t\tthis.$scheduler[this._methods[3]](sid, tid);\r\n\t\t\t\tdelete this._in_progress[marker];\r\n\t\t\t\treturn this.callEvent(\"onAfterUpdate\", [sid, action, tid, btag]);\r\n\t\t}\r\n\r\n\t\tif (this._in_progress[marker] !== \"wait\") {\r\n\t\t\tif (correct) {\r\n\t\t\t\tthis.$scheduler.setUserData(sid, this.action_param, \"\");\r\n\t\t\t}\r\n\t\t\tdelete this._in_progress[marker];\r\n\t\t} else {\r\n\t\t\tdelete this._in_progress[marker];\r\n\t\t\tthis.setUpdated(tid, true, this.$scheduler.getUserData(sid, this.action_param));\r\n\t\t}\r\n\r\n\t\tthis.callEvent(\"onAfterUpdate\", [originalSid, action, tid, btag]);\r\n\t},\r\n\r\n\t_errorResponse: function (xml, id){\r\n\t\tif(this.$scheduler && this.$scheduler.callEvent){\r\n\t\t\tthis.$scheduler.callEvent(\"onSaveError\", [id, xml.xmlDoc]);\r\n\t\t}\r\n\t\treturn this.cleanUpdate(id);\r\n\t},\r\n\r\n\t_setDefaultTransactionMode: function () {\r\n\t\tif (this.serverProcessor) {\r\n\t\t\tthis.setTransactionMode(\"POST\", true);\r\n\t\t\tthis.serverProcessor += (this.serverProcessor.indexOf(\"?\") !== -1 ? \"&\" : \"?\") + \"editing=true\";\r\n\t\t\tthis._serverProcessor = this.serverProcessor;\r\n\t\t}\r\n\t},\r\n\t\r\n\t/**\r\n\t *\t@desc: response from server\r\n\t *\t@param: xml - XMLLoader object with response XML\r\n\t *\t@type: private\r\n\t */\r\n\tafterUpdate: function (that, xml, id) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\r\n\t\tif (xml.xmlDoc.status !== 200){\r\n\t\t\tthis._errorResponse(xml, id);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// try to use json first\r\n\t\tvar tag;\r\n\t\ttry {\r\n\t\t\ttag = JSON.parse(xml.xmlDoc.responseText);\r\n\t\t} catch (e) {\r\n\t\t\t// empty response also can be processed by json handler\r\n\t\t\tif (!xml.xmlDoc.responseText.length) {\r\n\t\t\t\ttag = {};\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (tag) {\r\n\t\t\tvar action = tag.action || this.getState(id) || \"updated\";\r\n\t\t\tvar sid = tag.sid || id[0];\r\n\t\t\tvar tid = tag.tid || id[0];\r\n\t\t\tthat.afterUpdateCallback(sid, tid, action, tag);\r\n\t\t\tthat.finalizeUpdate();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// xml response\r\n\t\tvar top = ajax.xmltop(\"data\", xml.xmlDoc); // fix incorrect content type in IE\r\n\t\tif (!top) {\r\n\t\t\treturn this._errorResponse(xml, id);\r\n\t\t}\r\n\t\tvar atag = ajax.xpath(\"//data/action\", top);\r\n\t\tif (!atag.length) {\r\n\t\t\treturn this._errorResponse(xml, id);\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < atag.length; i++) {\r\n\t\t\tvar btag = atag[i];\r\n\t\t\tvar action = btag.getAttribute(\"type\");\r\n\t\t\tvar sid = btag.getAttribute(\"sid\");\r\n\t\t\tvar tid = btag.getAttribute(\"tid\");\r\n\r\n\t\t\tthat.afterUpdateCallback(sid, tid, action, btag);\r\n\t\t}\r\n\t\tthat.finalizeUpdate();\r\n\t},\r\n\tcleanUpdate: function (id) {\r\n\t\tif (id)\r\n\t\t\tfor (var i = 0; i < id.length; i++)\r\n\t\t\t\tdelete this._in_progress[id[i]];\r\n\t},\r\n\tfinalizeUpdate: function () {\r\n\t\tif (this._waitMode) this._waitMode--;\r\n\r\n\t\tthis.callEvent(\"onAfterUpdateFinish\", []);\r\n\t\tif (!this.updatedRows.length)\r\n\t\t\tthis.callEvent(\"onFullSync\", []);\r\n\t},\r\n\r\n\t/**\r\n\t *\t@desc: initializes data-processor\r\n\t *\t@param: scheduler - dhtmlxScheduler object to attach this data-processor to\r\n\t *\t@type: public\r\n\t */\r\n\tinit: function (scheduler) {\r\n\t\tif (this._initialized) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.$scheduler = scheduler;\r\n\t\tif (this.$scheduler._dp_init) {\r\n\t\t\tthis.$scheduler._dp_init(this);\r\n\t\t}\r\n\r\n\t\tthis._setDefaultTransactionMode();\r\n\r\n\t\tthis._methods=this._methods||[\"_set_event_text_style\",\"\",\"_dp_change_event_id\",\"_dp_hook_delete\"];\r\n\t\textendScheduler(this.$scheduler, this);\r\n\t\tvar dataProcessorEvents = new DataProcessorEvents(this.$scheduler, this);\r\n\t\tdataProcessorEvents.attach();\r\n\t\tthis.attachEvent(\"onDestroy\", function() {\r\n\t\t\tdelete this._getRowData;\r\n\r\n\t\t\tdelete this.$scheduler._dp;\r\n\t\t\tdelete this.$scheduler._dataprocessor;\r\n\t\t\tdelete this.$scheduler._set_event_text_style;\r\n\t\t\tdelete this.$scheduler._dp_change_event_id;\r\n\t\t\tdelete this.$scheduler._dp_hook_delete;\r\n\t\t\tdelete this.$scheduler;\r\n\t\t\tdataProcessorEvents.detach();\r\n\t\t});\r\n\t\tthis.$scheduler.callEvent(\"onDataProcessorReady\", [this]);\r\n\t\tthis._initialized = true;\r\n\r\n\t\tscheduler._dataprocessor=this;\r\n\t},\r\n\r\n\tsetOnAfterUpdate: function (ev) {\r\n\t\tthis.attachEvent(\"onAfterUpdate\", ev);\r\n\t},\r\n\tsetOnBeforeUpdateHandler: function (func) {\r\n\t\tthis.attachEvent(\"onBeforeDataSending\", func);\r\n\t},\r\n\r\n\t/* starts autoupdate mode\r\n\t\t@param interval time interval for sending update requests\r\n\t*/\r\n\tsetAutoUpdate: function (interval, user) {\r\n\t\tinterval = interval || 2000;\r\n\r\n\t\tthis._user = user || (new Date()).valueOf();\r\n\t\tthis._need_update = false;\r\n\t\t//this._loader = null;\r\n\t\tthis._update_busy = false;\r\n\r\n\t\tthis.attachEvent(\"onAfterUpdate\", function (sid, action, tid, xml_node) {\r\n\t\t\tthis.afterAutoUpdate(sid, action, tid, xml_node);\r\n\t\t});\r\n\t\tthis.attachEvent(\"onFullSync\", function () {\r\n\t\t\tthis.fullSync();\r\n\t\t});\r\n\r\n\t\tvar self = this;\r\n\t\tlet intervalId = global.setInterval(function () {\r\n\t\t\tself.loadUpdate();\r\n\t\t}, interval);\r\n\t\tthis.attachEvent(\"onDestroy\", function(){\r\n\t\t\tclearInterval(intervalId);\r\n\t\t});\r\n\t},\r\n\r\n\t/* process updating request answer\r\n\t\tif status == collision version is deprecated\r\n\t\tset flag for autoupdating immediately\r\n\t*/\r\n\tafterAutoUpdate: function (sid, action, tid, xml_node) {\r\n\t\tif (action == 'collision') {\r\n\t\t\tthis._need_update = true;\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t},\r\n\r\n\t/* callback function for onFillSync event\r\n\t\tcall update function if it's need\r\n\t*/\r\n\tfullSync: function () {\r\n\t\tif (this._need_update) {\r\n\t\t\tthis._need_update = false;\r\n\t\t\tthis.loadUpdate();\r\n\t\t}\r\n\t\treturn true;\r\n\t},\r\n\r\n\t/* sends query to the server and call callback function\r\n\t*/\r\n\tgetUpdates: function (url, callback) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tif (this._update_busy)\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\tthis._update_busy = true;\r\n\r\n\t\tajax.get(url, callback);\r\n\t},\r\n\r\n\t/* returns xml node value\r\n\t\t@param node\r\n\t\t\txml node\r\n\t*/\r\n\t_getXmlNodeValue: function(node) {\r\n\t\tif (node.firstChild) {\r\n\t\t\treturn node.firstChild.nodeValue;\r\n\t\t}\r\n\t\treturn \"\";\r\n\t},\r\n\r\n\t/* loads updates and processes them\r\n\t*/\r\n\tloadUpdate: function () {\r\n\t\tvar self = this;\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tvar version = this.$scheduler.getUserData(0, \"version\");\r\n\t\tvar url = this.serverProcessor + ajax.urlSeparator(this.serverProcessor) + [\"dhx_user=\" + this._user, \"dhx_version=\" + version].join(\"&\");\r\n\t\turl = url.replace(\"editing=true&\", \"\");\r\n\t\tthis.getUpdates(url, function (xml) {\r\n\t\t\tvar vers = ajax.xpath(\"//userdata\", xml);\r\n\t\t\tself.$scheduler.setUserData(0, \"version\", self._getXmlNodeValue(vers[0]));\r\n\r\n\t\t\tvar updates = ajax.xpath(\"//update\", xml);\r\n\t\t\tif (updates.length) {\r\n\t\t\t\tself._silent_mode = true;\r\n\r\n\t\t\t\tfor (var i = 0; i < updates.length; i++) {\r\n\t\t\t\t\tvar status = updates[i].getAttribute(\"status\");\r\n\t\t\t\t\tvar id = updates[i].getAttribute(\"id\");\r\n\t\t\t\t\tvar parent = updates[i].getAttribute(\"parent\");\r\n\t\t\t\t\tswitch (status) {\r\n\t\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"insertCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"updated\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"updateCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"deleteCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tself._silent_mode = false;\r\n\t\t\t}\r\n\t\t\tself._update_busy = false;\r\n\t\t\tself = null;\r\n\t\t});\r\n\t},\r\n\r\n\tdestructor: function() {\r\n\t\tthis.callEvent(\"onDestroy\", []);\r\n\t\tthis.detachAllEvents();\r\n\r\n\t\tthis.updatedRows = [];\r\n\t\tthis._in_progress = {};\r\n\t\tthis._invalid = {};\r\n\t\tthis._headers = null;\r\n\t\tthis._payload = null;\r\n\t\tdelete this._initialized;\r\n\t},\r\n\r\n\turl: function(url) {\r\n\t\tthis.serverProcessor = this._serverProcessor = url;\r\n\t},\r\n\r\n\t_serializeAsJSON: function(data) {\r\n\t\tif (typeof data === \"string\") {\r\n\t\t\treturn data;\r\n\t\t}\r\n\r\n\t\tvar copy = this.$scheduler.utils.copy(data);\r\n\t\tif (this._tMode === \"REST-JSON\") {\r\n\t\t\tdelete copy.id;\r\n\t\t\tdelete copy[this.action_param];\r\n\t\t}\r\n\r\n\t\treturn JSON.stringify(copy);\r\n\t},\r\n\r\n\t// GET/POST/JSON modes of the dataProcessor didn't send the whole data items in 'delete' requests\r\n\t// clear extra info from the data in order not to change the request format\r\n\t_cleanupArgumentsBeforeSend: function(dataToSend) {\r\n\t\tvar processedData;\r\n\t\tif(dataToSend[this.action_param] === undefined){// hash of updated items, and not an individual item\r\n\t\t\tprocessedData = {};\r\n\t\t\tfor(var i in dataToSend) {\r\n\t\t\t\tprocessedData[i] = this._cleanupArgumentsBeforeSend(dataToSend[i]);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tprocessedData = this._cleanupItemBeforeSend(dataToSend);\r\n\t\t}\r\n\t\treturn processedData;\r\n\t},\r\n\t_cleanupItemBeforeSend: function(updatedItem) {\r\n\t\tvar output = null;\r\n\t\tif(updatedItem){\r\n\t\t\tif(updatedItem[this.action_param] === \"deleted\"){\r\n\t\t\t\toutput = {};\r\n\t\t\t\toutput.id = updatedItem.id;\r\n\t\t\t\toutput[this.action_param] = updatedItem[this.action_param];\r\n\t\t\t}else{\r\n\t\t\t\toutput = updatedItem;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn output;\r\n\t},\r\n\r\n\t_forEachUpdatedRow: function(code) {\r\n\t\tvar updatedRows = this.updatedRows.slice();\r\n\t\tfor (var i = 0; i < updatedRows.length; i++) {\r\n\t\t\tvar rowId = updatedRows[i];\r\n\t\t\tif (this.$scheduler.getUserData(rowId, this.action_param)) {\r\n\t\t\t\tcode.call(this, rowId);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\t_prepareItemForJson(item){\r\n\t\tconst processedItem = {};\r\n\t\tconst scheduler = this.$scheduler;\r\n\t\tconst copy = scheduler.utils.copy(item);\r\n\t\tfor (let i in copy) {\r\n\t\t\tlet prop = copy[i];\r\n\t\t\tif (i.indexOf(\"_\") === 0) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} else if (prop){\r\n\t\t\t\tif(prop.getUTCFullYear){\r\n\t\t\t\t\tprocessedItem[i] = scheduler._helpers.formatDate(prop);\r\n\t\t\t\t} else if(typeof prop == \"object\") {\r\n\t\t\t\t\tprocessedItem[i] = this._prepareItemForJson(prop);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprocessedItem[i] = prop; \r\n\t\t\t\t}\r\n\t\t\t} else if (prop !== undefined){\r\n\t\t\t\tprocessedItem[i] = prop; \r\n\t\t\t}\r\n\t\t}\r\n\t\tprocessedItem[this.action_param] = scheduler.getUserData(item.id, this.action_param);\r\n\t\treturn processedItem;\r\n\t},\r\n\t_prepareItemForForm(item){\r\n\t\tconst processedItem = {};\r\n\t\tconst scheduler = this.$scheduler;\r\n\t\tconst copy = scheduler.utils.copy(item);\r\n\t\tfor (var i in copy) {\r\n\t\t\tlet prop = copy[i];\r\n\t\t\tif (i.indexOf(\"_\") === 0) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} else if (prop) {\r\n\t\t\t\tif(prop.getUTCFullYear){\r\n\t\t\t\t\tprocessedItem[i] = scheduler._helpers.formatDate(prop);\r\n\t\t\t\t} else if(typeof prop == \"object\") {\r\n\t\t\t\t\tprocessedItem[i] = this._prepareItemForForm(prop);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprocessedItem[i] = prop;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tprocessedItem[i] = \"\"; // for all falthy values\r\n\t\t\t}\r\n\t\t}\r\n\t\tprocessedItem[this.action_param] = scheduler.getUserData(item.id, this.action_param);\r\n\t\treturn processedItem;\r\n\t},\r\n\t_prepareDataItem: function(item) {\r\n\t\tif(this._serializeAsJson){\r\n\t\t\treturn this._prepareItemForJson(item);\r\n\t\t}else {\r\n\t\t\treturn this._prepareItemForForm(item);\r\n\t\t}\r\n\t},\r\n\t_getRowData: function(id) {\r\n\t\tvar dataItem = this.$scheduler.getEvent(id);\r\n\t\tif (!dataItem) {\r\n\t\t\tdataItem = { id: id };\r\n\t\t}\r\n\t\treturn this._prepareDataItem(dataItem);\r\n\t}\r\n};\r\n\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler.createDataProcessor = function(config) {\r\n\tvar router;\r\n\tvar tMode;\r\n\tif (config instanceof Function) {\r\n\t\trouter = config;\r\n\t} else if (config.hasOwnProperty(\"router\")) {\r\n\t\trouter = config.router;\r\n\t} else if(config.hasOwnProperty(\"event\")){\r\n\t\trouter = config;\r\n\t}\r\n\r\n\tif (router) {\r\n\t\ttMode = \"CUSTOM\";\r\n\t} else {\r\n\t\ttMode = config.mode || \"REST-JSON\";\r\n\t}\r\n\r\n\tvar dp = new DataProcessor(config.url);\r\n\tdp.init(scheduler);\r\n\tdp.setTransactionMode({\r\n\t\tmode: tMode,\r\n\t\trouter: router\r\n\t}, config.batchUpdate); // FIXME: config.batchUpdate where it is explained?\r\n\treturn dp;\r\n};\r\n\r\nscheduler.DataProcessor = DataProcessor;\r\n\r\n}\r\n\r\n//var dataProcessor = global.dataProcessor = DataProcessor; // for old","import utils from \"./utils/utils\";\r\nimport domHelpers from \"./utils/dom_helpers\";\r\n\r\n\r\nexport default function(scheduler) {\r\n\r\n\tvar boxAttribute = \"data-dhxbox\";\r\n\r\n\tvar _dhx_msg_cfg = null;\r\n\r\n\tfunction callback(config, result) {\r\n\t\tvar usercall = config.callback;\r\n\t\tmodalBox.hide(config.box);\r\n\r\n\t\t_dhx_msg_cfg = config.box = null;\r\n\tif (usercall)\r\n\t\t\tusercall(result);\r\n\t}\r\n\r\n\tfunction modal_key(event) {\r\n\t\tif (_dhx_msg_cfg) {\r\n\r\n\t\t\tvar code = event.which || event.keyCode;\r\n\t\t\tvar preventDefault = false;\r\n\r\n\t\t\tif (messageBox.keyboard) {\r\n\t\t\t\tif (code == 13 || code == 32) {\r\n\t\t\t\t\t// default behavior is to confirm/submit popup on space/enter\r\n\t\t\t\t\t// if browser focus is set on button element - do button click instead of default behavior\r\n\t\t\t\t\tvar target = event.target || event.srcElement;\r\n\t\t\t\t\tif (domHelpers.getClassName(target).indexOf(\"scheduler_popup_button\") > -1 && target.click) {\r\n\t\t\t\t\t\ttarget.click();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcallback(_dhx_msg_cfg, true);\r\n\t\t\t\t\t\tpreventDefault = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (code == 27) {\r\n\t\t\t\t\tcallback(_dhx_msg_cfg, false);\r\n\t\t\t\t\tpreventDefault = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (preventDefault) {\r\n\t\t\t\tif (event.preventDefault){\r\n\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t}\r\n\t\t\t\treturn !(event.cancelBubble = true);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.event(document, \"keydown\", modal_key, true);\r\n\r\n\tfunction modality(mode) {\r\n\t\tif (!modality.cover) {\r\n\t\t\tmodality.cover = document.createElement(\"div\");\r\n\t\t\t//necessary for IE only\r\n\t\t\tscheduler.event(modality.cover, \"keydown\", modal_key);\r\n\t\t\tmodality.cover.className = \"dhx_modal_cover\";\r\n\t\t\tdocument.body.appendChild(modality.cover);\r\n\t\t}\r\n\r\n\t\tmodality.cover.style.display = mode ? \"inline-block\" : \"none\";\r\n\t}\r\n\r\n\tfunction button(text, classValue, result) {\r\n\t\tvar buttonAriaAttrs = scheduler._waiAria.messageButtonAttrString(text);\r\n\t\tvar name = (classValue || \"\").toLowerCase().replace(/ /g, \"_\");\r\n\t\tvar buttonCss = `scheduler_${name}_button dhtmlx_${name}_button`; \r\n\t\treturn `
${text}
`;\r\n\t}\r\n\r\n\tfunction info(text) {\r\n\t\tif (!messageBox.area) {\r\n\t\t\tmessageBox.area = document.createElement(\"div\");\r\n\t\t\tmessageBox.area.className = \"scheduler_message_area dhtmlx_message_area\";\r\n\t\t\tmessageBox.area.style[messageBox.position] = \"5px\";\r\n\t\t\tdocument.body.appendChild(messageBox.area);\r\n\t\t}\r\n\r\n\t\tmessageBox.hide(text.id);\r\n\t\tvar message = document.createElement(\"div\");\r\n\t\tmessage.innerHTML = \"
\" + text.text + \"
\";\r\n\t\tmessage.className = \"scheduler-info dhtmlx-info scheduler-\" + text.type + \" dhtmlx-\" + text.type;\r\n\t\tscheduler.event(message, \"click\",function (e) {\r\n if(text.callback) {\r\n text.callback.call(this, e);\r\n }\r\n\t\t\tmessageBox.hide(text.id);\r\n\t\t\ttext = null;\r\n\t\t});\r\n\r\n\t\tscheduler._waiAria.messageInfoAttr(message);\r\n\r\n\t\tif (messageBox.position == \"bottom\" && messageBox.area.firstChild)\r\n\t\t\tmessageBox.area.insertBefore(message, messageBox.area.firstChild);\r\n\t\telse\r\n\t\t\tmessageBox.area.appendChild(message);\r\n\r\n\t\tif (text.expire > 0)\r\n\t\t\tmessageBox.timers[text.id] = window.setTimeout(function () {\r\n\t\t\t\t// GS-1213: We need that when Scheduler is destroyed\r\n\t\t\t\tif (messageBox) messageBox.hide(text.id);\r\n\t\t\t}, text.expire);\r\n\r\n\t\tmessageBox.pull[text.id] = message;\r\n\t\tmessage = null;\r\n\r\n\t\treturn text.id;\r\n\t}\r\n\r\n\tfunction getFirstDefined() {\r\n\t\tvar values = [].slice.apply(arguments, [0]);\r\n\r\n\t\tfor (var i = 0; i < values.length; i++) {\r\n\t\t\tif (values[i]) {\r\n\t\t\t\treturn values[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tfunction _boxStructure(config, ok, cancel) {\r\n\t\tvar box = document.createElement(\"div\");\r\n\r\n\t\tvar contentId = utils.uid();\r\n\t\tscheduler._waiAria.messageModalAttr(box, contentId);\r\n\r\n\r\n\t\tbox.className = \" scheduler_modal_box dhtmlx_modal_box scheduler-\" + config.type + \" dhtmlx-\" + config.type;\r\n\t\tbox.setAttribute(boxAttribute, 1);\r\n\r\n\t\tvar inner = '';\r\n\r\n\t\tif (config.width)\r\n\t\t\tbox.style.width = config.width;\r\n\t\tif (config.height)\r\n\t\t\tbox.style.height = config.height;\r\n\t\tif (config.title)\r\n\t\t\tinner += '
' + config.title + '
';\r\n\t\tinner += '
' + (config.content ? '' : config.text) + '
';\r\n\t\tif (ok)\r\n\t\t\tinner += button(getFirstDefined(config.ok, scheduler.locale.labels.message_ok, \"OK\"), \"ok\", true);\r\n\t\tif (cancel)\r\n\t\t\tinner += button(getFirstDefined(config.cancel, scheduler.locale.labels.message_cancel, \"Cancel\"), \"cancel\", false);\r\n\r\n\t\tif (config.buttons) {\r\n\t\t\tfor (var i = 0; i < config.buttons.length; i++) {\r\n\t\t\t\tvar btn = config.buttons[i];\r\n\t\t\t\tif (typeof btn == \"object\") {\r\n\t\t\t\t\t// Support { label:\"Save\", css:\"main_button\", value:\"save\" }\r\n\t\t\t\t\tvar label = btn.label;\r\n\t\t\t\t\tvar css = btn.css || (\"scheduler_\" + btn.label.toLowerCase() + \"_button dhtmlx_\" + btn.label.toLowerCase() + \"_button\");\r\n\t\t\t\t\tvar value = btn.value || i;\r\n\t\t\t\t\tinner += button(label, css, value);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tinner += button(btn, btn, i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tinner += '
';\r\n\t\tbox.innerHTML = inner;\r\n\r\n\t\tif (config.content) {\r\n\t\t\tvar node = config.content;\r\n\t\t\tif (typeof node == \"string\")\r\n\t\t\t\tnode = document.getElementById(node);\r\n\t\t\tif (node.style.display == 'none')\r\n\t\t\t\tnode.style.display = \"\";\r\n\t\t\tbox.childNodes[config.title ? 1 : 0].appendChild(node);\r\n\t\t}\r\n\r\n\t\tscheduler.event(box, \"click\", function (event) {\r\n\t\t\tvar source = event.target || event.srcElement;\r\n\t\t\tif (!source.className) source = source.parentNode;\r\n\t\t\tif (domHelpers.closest(source, \".scheduler_popup_button\")) {\r\n\t\t\t\tvar result = source.getAttribute(\"data-result\");\r\n\t\t\t\tresult = (result == \"true\") || (result == \"false\" ? false : result);\r\n\t\t\t\tcallback(config, result);\r\n\t\t\t}\r\n\t\t});\r\n\t\tconfig.box = box;\r\n\t\tif (ok || cancel)\r\n\t\t\t_dhx_msg_cfg = config;\r\n\r\n\t\treturn box;\r\n\t}\r\n\r\n\tfunction _createBox(config, ok, cancel) {\r\n\t\tvar box = config.tagName ? config : _boxStructure(config, ok, cancel);\r\n\r\n\t\tif (!config.hidden)\r\n\t\t\tmodality(true);\r\n\t\tdocument.body.appendChild(box);\r\n\t\tvar x = Math.abs(Math.floor(((window.innerWidth || document.documentElement.offsetWidth) - box.offsetWidth) / 2));\r\n\t\tvar y = Math.abs(Math.floor(((window.innerHeight || document.documentElement.offsetHeight) - box.offsetHeight) / 2));\r\n\t\tif (config.position == \"top\")\r\n\t\t\tbox.style.top = \"-3px\";\r\n\t\telse\r\n\t\t\tbox.style.top = y + 'px';\r\n\t\tbox.style.left = x + 'px';\r\n\t\t//necessary for IE only\r\n\t\tscheduler.event(box, \"keydown\", modal_key);\r\n\r\n\t\tmodalBox.focus(box);\r\n\r\n\t\tif (config.hidden)\r\n\t\t\tmodalBox.hide(box);\r\n\r\n\t\tscheduler.callEvent(\"onMessagePopup\", [box]);\r\n\t\treturn box;\r\n\t}\r\n\r\n\tfunction alertPopup(config) {\r\n\t\treturn _createBox(config, true, false);\r\n\t}\r\n\r\n\tfunction confirmPopup(config) {\r\n\t\treturn _createBox(config, true, true);\r\n\t}\r\n\r\n\tfunction boxPopup(config) {\r\n\t\treturn _createBox(config);\r\n\t}\r\n\r\n\tfunction box_params(text, type, callback) {\r\n\t\tif (typeof text != \"object\") {\r\n\t\t\tif (typeof type == \"function\") {\r\n\t\t\t\tcallback = type;\r\n\t\t\t\ttype = \"\";\r\n\t\t\t}\r\n\t\t\ttext = {text: text, type: type, callback: callback};\r\n\t\t}\r\n\t\treturn text;\r\n\t}\r\n\r\n\tfunction params(text, type, expire, id, callback) {\r\n\t\tif (typeof text != \"object\")\r\n\t\t\ttext = {text: text, type: type, expire: expire, id: id, callback: callback};\r\n\t\ttext.id = text.id || utils.uid();\r\n\t\ttext.expire = text.expire || messageBox.expire;\r\n\t\treturn text;\r\n\t}\r\n\r\n\tvar alertBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"confirm\";\r\n\t\treturn alertPopup(text);\r\n\t};\r\n\tvar confirmBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"alert\";\r\n\t\treturn confirmPopup(text);\r\n\t};\r\n\tvar modalBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"alert\";\r\n\t\treturn boxPopup(text);\r\n\t};\r\n\tmodalBox.hide = function (node) {\r\n\t\twhile (node && node.getAttribute && !node.getAttribute(boxAttribute))\r\n\t\t\tnode = node.parentNode;\r\n\t\tif (node) {\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t\tmodality(false);\r\n\r\n\t\t\tscheduler.callEvent(\"onAfterMessagePopup\", [node]);\r\n\t\t}\r\n\t};\r\n\r\n\tmodalBox.focus = function (node) {\r\n\t\tsetTimeout(function () {\r\n\t\t\tvar focusable = domHelpers.getFocusableNodes(node);\r\n\t\t\tif (focusable.length) {\r\n\t\t\t\tif (focusable[0].focus) focusable[0].focus();\r\n\t\t\t}\r\n\t\t}, 1);\r\n\t};\r\n\r\n\tvar messageBox = function (text, type, expire, id) {\r\n\t\ttext = params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"info\";\r\n\r\n\t\tvar subtype = text.type.split(\"-\")[0];\r\n\t\tswitch (subtype) {\r\n\t\t\tcase \"alert\":\r\n\t\t\t\treturn alertPopup(text);\r\n\t\t\tcase \"confirm\":\r\n\t\t\t\treturn confirmPopup(text);\r\n\t\t\tcase \"modalbox\":\r\n\t\t\t\treturn boxPopup(text);\r\n\t\t\tdefault:\r\n\t\t\t\treturn info(text);\r\n\t\t}\r\n\t};\r\n\r\n\tmessageBox.seed = (new Date()).valueOf();\r\n\tmessageBox.uid = utils.uid;\r\n\tmessageBox.expire = 4000;\r\n\tmessageBox.keyboard = true;\r\n\tmessageBox.position = \"top\";\r\n\tmessageBox.pull = {};\r\n\tmessageBox.timers = {};\r\n\r\n\tmessageBox.hideAll = function () {\r\n\t\tfor (var key in messageBox.pull)\r\n\t\t\tmessageBox.hide(key);\r\n\t};\r\n\tmessageBox.hide = function (id) {\r\n\t\tvar obj = messageBox.pull[id];\r\n\t\tif (obj && obj.parentNode) {\r\n\t\t\twindow.setTimeout(function () {\r\n\t\t\t\tobj.parentNode.removeChild(obj);\r\n\t\t\t\tobj = null;\r\n\t\t\t}, 2000);\r\n\t\t\tobj.className += \" hidden\";\r\n\r\n\t\t\tif (messageBox.timers[id])\r\n\t\t\t\twindow.clearTimeout(messageBox.timers[id]);\r\n\t\t\tdelete messageBox.pull[id];\r\n\t\t}\r\n\t};\r\n\r\n\tvar popups = [];\r\n\tscheduler.attachEvent(\"onMessagePopup\", function(box){\r\n\t\tpopups.push(box);\r\n\t});\r\n\tscheduler.attachEvent(\"onAfterMessagePopup\", function(box){\r\n\t\tfor(var i = 0; i < popups.length; i++){\r\n\t\t\tif(popups[i] === box){\r\n\t\t\t\tpopups.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tif(modality.cover && modality.cover.parentNode){\r\n\t\t\tmodality.cover.parentNode.removeChild(modality.cover);\r\n\t\t}\r\n\r\n\t\tfor(var i = 0; i < popups.length; i++){\r\n\t\t\tif(popups[i].parentNode){\r\n\t\t\t\tpopups[i].parentNode.removeChild(popups[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tpopups = null;\r\n\r\n\t\tif(messageBox.area && messageBox.area.parentNode){\r\n\t\t\tmessageBox.area.parentNode.removeChild(messageBox.area);\r\n\t\t}\r\n\t\tmessageBox = null;\r\n\t});\r\n\r\n\treturn {\r\n\t\talert: alertBox,\r\n\t\tconfirm: confirmBox,\r\n\t\tmessage: messageBox,\r\n\t\tmodalbox: modalBox\r\n\t};\r\n}","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"كانون الثاني\", \"شباط\", \"آذار\", \"نيسان\", \"أيار\", \"حزيران\", \"تموز\", \"آب\", \"أيلول\", \"تشرين الأول\", \"تشرين الثاني\", \"كانون الأول\"],\r\n\t\tmonth_short: [\"يناير\", \"فبراير\", \"مارس\", \"أبريل\", \"مايو\", \"يونيو\", \"يوليو\", \"أغسطس\", \"سبتمبر\", \"أكتوبر\", \"نوفمبر\", \"ديسمبر\"],\r\n\t\tday_full: [\"الأحد\", \"الأثنين\", \"ألثلاثاء\", \"الأربعاء\", \"ألحميس\", \"ألجمعة\", \"السبت\"],\r\n\t\tday_short: [\"احد\", \"اثنين\", \"ثلاثاء\", \"اربعاء\", \"خميس\", \"جمعة\", \"سبت\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"اليوم\",\r\n\t\tday_tab: \"يوم\",\r\n\t\tweek_tab: \"أسبوع\",\r\n\t\tmonth_tab: \"شهر\",\r\n\t\tnew_event: \"حدث جديد\",\r\n\t\ticon_save: \"اخزن\",\r\n\t\ticon_cancel: \"الغاء\",\r\n\t\ticon_details: \"تفاصيل\",\r\n\t\ticon_edit: \"تحرير\",\r\n\t\ticon_delete: \"حذف\",\r\n\t\tconfirm_closing: \"التغييرات سوف تضيع, هل انت متأكد؟\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"الحدث سيتم حذفها نهائيا ، هل أنت متأكد؟\",\r\n\t\tsection_description: \"الوصف\",\r\n\t\tsection_time: \"الفترة الزمنية\",\r\n\t\tfull_day: \"طوال اليوم\",\r\n\r\n\t\tconfirm_recurring: \"هل تريد تحرير مجموعة كاملة من الأحداث المتكررة؟\",\r\n\t\tsection_recurring: \"تكرار الحدث\",\r\n\t\tbutton_recurring: \"تعطيل\",\r\n\t\tbutton_recurring_open: \"تمكين\",\r\n\t\tbutton_edit_series: \"تحرير سلسلة\",\r\n\t\tbutton_edit_occurrence: \"تعديل نسخة\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"جدول\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create: \"Drag to create\",\r\n\t\tdrag_to_move: \"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour: \"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"يومي\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"أسبوعي\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"شهري\",\r\n\t\trepeat_radio_year: \"سنوي\",\r\n\t\trepeat_radio_day_type: \"كل\",\r\n\t\trepeat_text_day_count: \"يوم\",\r\n\t\trepeat_radio_day_type2: \"كل يوم عمل\",\r\n\t\trepeat_week: \" تكرار كل\",\r\n\t\trepeat_text_week_count: \"أسبوع في الأيام التالية:\",\r\n\t\trepeat_radio_month_type: \"تكرار\",\r\n\t\trepeat_radio_month_start: \"في\",\r\n\t\trepeat_text_month_day: \"يوم كل\",\r\n\t\trepeat_text_month_count: \"شهر\",\r\n\t\trepeat_text_month_count2_before: \"كل\",\r\n\t\trepeat_text_month_count2_after: \"شهر\",\r\n\t\trepeat_year_label: \"في\",\r\n\t\tselect_year_day2: \"من\",\r\n\t\trepeat_text_year_day: \"يوم\",\r\n\t\tselect_year_month: \"شهر\",\r\n\t\trepeat_radio_end: \"بدون تاريخ انتهاء\",\r\n\t\trepeat_text_occurences_count: \"تكرارات\",\r\n\t\trepeat_radio_end2: \"بعد\",\r\n\t\trepeat_radio_end3: \"ينتهي في\",\r\n\r\n\t\trepeat_never: \"أبداً\",\r\n\t\trepeat_daily: \"كل يوم\",\r\n\t\trepeat_workdays: \"كل يوم عمل\",\r\n\t\trepeat_weekly: \"كل أسبوع\",\r\n\t\trepeat_monthly: \"كل شهر\",\r\n\t\trepeat_yearly: \"كل سنة\",\r\n\t\trepeat_custom: \"تخصيص\",\r\n\t\trepeat_freq_day: \"يوم\",\r\n\t\trepeat_freq_week: \"أسبوع\",\r\n\t\trepeat_freq_month: \"شهر\",\r\n\t\trepeat_freq_year: \"سنة\",\r\n\t\trepeat_on_date: \"في التاريخ\",\r\n\t\trepeat_ends: \"ينتهي\",\r\n\r\n\t\tmonth_for_recurring: [\"يناير\", \"فبراير\", \"مارس\", \"أبريل\", \"مايو\", \"يونيو\", \"يوليو\", \"أغسطس\", \"سبتمبر\", \"أكتوبر\", \"نوفمبر\", \"ديسمبر\"],\r\n\t\tday_for_recurring: [\"الأحد\", \"الإثنين\", \"الثلاثاء\", \"الأربعاء\", \"الخميس\", \"الجمعة\", \"السبت\"]\r\n\t}\r\n};\r\n\r\n\r\n","/*\r\n Translation by Sofya Morozova\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Студзень\", \"Люты\", \"Сакавік\", \"Красавік\", \"Maй\", \"Чэрвень\", \"Ліпень\", \"Жнівень\", \"Верасень\", \"Кастрычнік\", \"Лістапад\", \"Снежань\"],\r\n\t\tmonth_short: [\"Студз\", \"Лют\", \"Сак\", \"Крас\", \"Maй\", \"Чэр\", \"Ліп\", \"Жнів\", \"Вер\", \"Каст\", \"Ліст\", \"Снеж\"],\r\n\t\tday_full: [ \"Нядзеля\", \"Панядзелак\", \"Аўторак\", \"Серада\", \"Чацвер\", \"Пятніца\", \"Субота\"],\r\n\t\tday_short: [\"Нд\", \"Пн\", \"Аўт\", \"Ср\", \"Чцв\", \"Пт\", \"Сб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сёння\",\r\n\t\tday_tab: \"Дзень\",\r\n\t\tweek_tab: \"Тыдзень\",\r\n\t\tmonth_tab: \"Месяц\",\r\n\t\tnew_event: \"Новая падзея\",\r\n\t\ticon_save: \"Захаваць\",\r\n\t\ticon_cancel: \"Адмяніць\",\r\n\t\ticon_details: \"Дэталі\",\r\n\t\ticon_edit: \"Змяніць\",\r\n\t\ticon_delete: \"Выдаліць\",\r\n\t\tconfirm_closing: \"\", //Унесеныя змены будуць страчаны, працягнуць?\r\n\t\tconfirm_deleting: \"Падзея будзе выдалена незваротна, працягнуць?\",\r\n\t\tsection_description: \"Апісанне\",\r\n\t\tsection_time: \"Перыяд часу\",\r\n\t\tfull_day: \"Увесь дзень\",\r\n\r\n\t\tconfirm_recurring: \"Вы хочаце змяніць усю серыю паўтаральных падзей?\",\r\n\t\tsection_recurring: \"Паўтарэнне\",\r\n\t\tbutton_recurring: \"Адключана\",\r\n\t\tbutton_recurring_open: \"Уключана\",\r\n\t\tbutton_edit_series: \"Рэдагаваць серыю\",\r\n\t\tbutton_edit_occurrence: \"Рэдагаваць асобнік\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Спіс\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Апісанне\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Год\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Спіс\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Спic\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Дзень\",\r\n\t\trepeat_radio_week: \"Тыдзень\",\r\n\t\trepeat_radio_month: \"Месяц\",\r\n\t\trepeat_radio_year: \"Год\",\r\n\t\trepeat_radio_day_type: \"Кожны\",\r\n\t\trepeat_text_day_count: \"дзень\",\r\n\t\trepeat_radio_day_type2: \"Кожны працоўны дзень\",\r\n\t\trepeat_week: \" Паўтараць кожны\",\r\n\t\trepeat_text_week_count: \"тыдзень\",\r\n\t\trepeat_radio_month_type: \"Паўтараць\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" чысла кожнага\",\r\n\t\trepeat_text_month_count: \"месяцу\",\r\n\t\trepeat_text_month_count2_before: \"кожны \",\r\n\t\trepeat_text_month_count2_after: \"месяц\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"дзень\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без даты заканчэння\",\r\n\t\trepeat_text_occurences_count: \"паўтораў\",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\trepeat_radio_end3: \"Да \",\r\n\r\n\t\trepeat_never: \"Ніколі\",\r\n\t\trepeat_daily: \"Кожны дзень\",\r\n\t\trepeat_workdays: \"Кожны працоўны дзень\",\r\n\t\trepeat_weekly: \"Кожны тыдзень\",\r\n\t\trepeat_monthly: \"Кожны месяц\",\r\n\t\trepeat_yearly: \"Кожны год\",\r\n\t\trepeat_custom: \"Наладжвальны\",\r\n\t\trepeat_freq_day: \"Дзень\",\r\n\t\trepeat_freq_week: \"Тыдзень\",\r\n\t\trepeat_freq_month: \"Месяц\",\r\n\t\trepeat_freq_year: \"Год\",\r\n\t\trepeat_on_date: \"На дату\",\r\n\t\trepeat_ends: \"Заканчваецца\",\r\n\r\n\t\tmonth_for_recurring: [\"Студзеня\", \"Лютага\", \"Сакавіка\", \"Красавіка\", \"Мая\", \"Чэрвеня\", \"Ліпeня\", \"Жніўня\", \"Верасня\", \"Кастрычніка\", \"Лістапада\", \"Снежня\"],\r\n\t\tday_for_recurring: [\"Нядзелю\", \"Панядзелак\", \"Аўторак\", \"Сераду\", \"Чацвер\", \"Пятніцу\", \"Суботу\"]\r\n\t}\r\n};\r\n","/*\r\n @Traducido por Vicente Adria Bohigues - vicenteadria@hotmail.com\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Gener\", \"Febrer\", \"Març\", \"Abril\", \"Maig\", \"Juny\", \"Juliol\", \"Agost\", \"Setembre\", \"Octubre\", \"Novembre\", \"Desembre\"],\r\n\t\tmonth_short: [\"Gen\", \"Feb\", \"Mar\", \"Abr\", \"Mai\", \"Jun\", \"Jul\", \"Ago\", \"Set\", \"Oct\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Diumenge\", \"Dilluns\", \"Dimarts\", \"Dimecres\", \"Dijous\", \"Divendres\", \"Dissabte\"],\r\n\t\tday_short: [\"Dg\", \"Dl\", \"Dm\", \"Dc\", \"Dj\", \"Dv\", \"Ds\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hui\",\r\n\t\tday_tab: \"Dia\",\r\n\t\tweek_tab: \"Setmana\",\r\n\t\tmonth_tab: \"Mes\",\r\n\t\tnew_event: \"Nou esdeveniment\",\r\n\t\ticon_save: \"Guardar\",\r\n\t\ticon_cancel: \"Cancel·lar\",\r\n\t\ticon_details: \"Detalls\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Esborrar\",\r\n\t\tconfirm_closing: \"\", //\"Els seus canvis es perdràn, continuar ?\"\r\n\t\tconfirm_deleting: \"L'esdeveniment s'esborrarà definitivament, continuar ?\",\r\n\t\tsection_description: \"Descripció\",\r\n\t\tsection_time: \"Periode de temps\",\r\n\t\tfull_day: \"Tot el dia\",\r\n\r\n\t\tconfirm_recurring: \"¿Desitja modificar el conjunt d'esdeveniments repetits?\",\r\n\t\tsection_recurring: \"Repeteixca l'esdeveniment\",\r\n\t\tbutton_recurring: \"Impedit\",\r\n\t\tbutton_recurring_open: \"Permés\",\r\n\t\tbutton_edit_series: \"Edit sèrie\",\r\n\t\tbutton_edit_occurrence: \"Edita Instància\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descripció\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Any\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Taula\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create: \"Drag to create\",\r\n\t\tdrag_to_move: \"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour: \"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diari\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Setmanal\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Mensual\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia\",\r\n\t\trepeat_radio_day_type2: \"Cada dia laborable\",\r\n\t\trepeat_week: \" Repetir cada\",\r\n\t\trepeat_text_week_count: \"setmana els dies següents:\",\r\n\t\trepeat_radio_month_type: \"Repetir\",\r\n\t\trepeat_radio_month_start: \"El\",\r\n\t\trepeat_text_month_day: \"dia cada\",\r\n\t\trepeat_text_month_count: \"mes\",\r\n\t\trepeat_text_month_count2_before: \"cada\",\r\n\t\trepeat_text_month_count2_after: \"mes\",\r\n\t\trepeat_year_label: \"El\",\r\n\t\tselect_year_day2: \"de\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mes\",\r\n\t\trepeat_radio_end: \"Sense data de finalització\",\r\n\t\trepeat_text_occurences_count: \"ocurrències\",\r\n\t\trepeat_radio_end2: \"Després\",\r\n\t\trepeat_radio_end3: \"Finalitzar el\",\r\n\r\n\t\trepeat_never: \"Mai\",\r\n\t\trepeat_daily: \"Cada dia\",\r\n\t\trepeat_workdays: \"Cada dia laborable\",\r\n\t\trepeat_weekly: \"Cada setmana\",\r\n\t\trepeat_monthly: \"Cada mes\",\r\n\t\trepeat_yearly: \"Cada any\",\r\n\t\trepeat_custom: \"Personalitzat\",\r\n\t\trepeat_freq_day: \"Dia\",\r\n\t\trepeat_freq_week: \"Setmana\",\r\n\t\trepeat_freq_month: \"Mes\",\r\n\t\trepeat_freq_year: \"Any\",\r\n\t\trepeat_on_date: \"En la data\",\r\n\t\trepeat_ends: \"Finalitza\",\r\n\r\n\t\tmonth_for_recurring: [\"Gener\", \"Febrer\", \"Març\", \"Abril\", \"Maig\", \"Juny\", \"Juliol\", \"Agost\", \"Setembre\", \"Octubre\", \"Novembre\", \"Desembre\"],\r\n\t\tday_for_recurring: [\"Diumenge\", \"Dilluns\", \"Dimarts\", \"Dimecres\", \"Dijous\", \"Divendres\", \"Dissabte\"]\r\n\t}\r\n};","/*\r\nTranslation by FreezeSoul\r\n*/\r\n//scheduler.config.day_date=\"%M %d日 %D\";\r\n//scheduler.config.default_date=\"%Y年 %M %d日\";\r\n//scheduler.config.month_date=\"%Y年 %M\";\r\n\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"一月\", \"二月\", \"三月\", \"四月\", \"五月\", \"六月\", \"七月\", \"八月\", \"九月\", \"十月\", \"十一月\", \"十二月\"],\r\n\t\tmonth_short: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_full: [\"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\"],\r\n\t\tday_short: [\"日\", \"一\", \"二\", \"三\", \"四\", \"五\", \"六\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"今天\",\r\n\t\tday_tab: \"日\",\r\n\t\tweek_tab: \"周\",\r\n\t\tmonth_tab: \"月\",\r\n\t\tnew_event: \"新建日程\",\r\n\t\ticon_save: \"保存\",\r\n\t\ticon_cancel: \"关闭\",\r\n\t\ticon_details: \"详细\",\r\n\t\ticon_edit: \"编辑\",\r\n\t\ticon_delete: \"删除\",\r\n\t\tconfirm_closing: \"请确认是否撤销修改!\", //Your changes will be lost, are your sure?\r\n\t\tconfirm_deleting: \"是否删除日程?\",\r\n\t\tsection_description: \"描述\",\r\n\t\tsection_time: \"时间范围\",\r\n\t\tfull_day: \"整天\",\r\n\r\n\t\tconfirm_recurring:\"请确认是否将日程设为重复模式?\",\r\n\t\tsection_recurring:\"重复周期\",\r\n\t\tbutton_recurring:\"禁用\",\r\n\t\tbutton_recurring_open:\"启用\",\r\n\t\tbutton_edit_series: \"编辑系列\",\r\n\t\tbutton_edit_occurrence: \"编辑实例\",\r\n\t\t\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"议程\",\r\n\t\tdate:\"日期\",\r\n\t\tdescription:\"说明\",\r\n\t\t\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"今年\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"议程\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab:\"电网\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"按天\",\r\n\t\trepeat_radio_week: \"按周\",\r\n\t\trepeat_radio_month: \"按月\",\r\n\t\trepeat_radio_year: \"按年\",\r\n\t\trepeat_radio_day_type: \"每\",\r\n\t\trepeat_text_day_count: \"天\",\r\n\t\trepeat_radio_day_type2: \"每个工作日\",\r\n\t\trepeat_week: \" 重复 每\",\r\n\t\trepeat_text_week_count: \"星期的:\",\r\n\t\trepeat_radio_month_type: \"重复\",\r\n\t\trepeat_radio_month_start: \"在\",\r\n\t\trepeat_text_month_day: \"日 每\",\r\n\t\trepeat_text_month_count: \"月\",\r\n\t\trepeat_text_month_count2_before: \"每\",\r\n\t\trepeat_text_month_count2_after: \"月\",\r\n\t\trepeat_year_label: \"在\",\r\n\t\tselect_year_day2: \"的\",\r\n\t\trepeat_text_year_day: \"日\",\r\n\t\tselect_year_month: \"月\",\r\n\t\trepeat_radio_end: \"无结束日期\",\r\n\t\trepeat_text_occurences_count: \"次结束\",\r\n\t\trepeat_radio_end2: \"重复\",\r\n\t\trepeat_radio_end3: \"结束于\",\r\n\t\t\r\n\t\trepeat_never: \"从不\",\r\n\t\trepeat_daily: \"每天\",\r\n\t\trepeat_workdays: \"每个工作日\",\r\n\t\trepeat_weekly: \"每周\",\r\n\t\trepeat_monthly: \"每月\",\r\n\t\trepeat_yearly: \"每年\",\r\n\t\trepeat_custom: \"自定义\",\r\n\t\trepeat_freq_day: \"天\",\r\n\t\trepeat_freq_week: \"周\",\r\n\t\trepeat_freq_month: \"月\",\r\n\t\trepeat_freq_year: \"年\",\r\n\t\trepeat_on_date: \"在日期\",\r\n\t\trepeat_ends: \"结束\",\r\n\r\n\t\tmonth_for_recurring: [\"一月\", \"二月\", \"三月\", \"四月\", \"五月\", \"六月\", \"七月\", \"八月\", \"九月\", \"十月\", \"十一月\", \"十二月\"],\r\n\t\tday_for_recurring: [\"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Leden\", \"Únor\", \"Březen\", \"Duben\", \"Květen\", \"Červen\", \"Červenec\", \"Srpen\", \"Září\", \"Říjen\", \"Listopad\", \"Prosinec\"],\r\n\t\tmonth_short: [\"Led\", \"Ún\", \"Bře\", \"Dub\", \"Kvě\", \"Čer\", \"Čec\", \"Srp\", \"Září\", \"Říj\", \"List\", \"Pro\"],\r\n\t\tday_full: [\"Neděle\", \"Pondělí\", \"Úterý\", \"Středa\", \"Čtvrtek\", \"Pátek\", \"Sobota\"],\r\n\t\tday_short: [\"Ne\", \"Po\", \"Út\", \"St\", \"Čt\", \"Pá\", \"So\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dnes\",\r\n\t\tday_tab: \"Den\",\r\n\t\tweek_tab: \"Týden\",\r\n\t\tmonth_tab: \"Měsíc\",\r\n\t\tnew_event: \"Nová událost\",\r\n\t\ticon_save: \"Uložit\",\r\n\t\ticon_cancel: \"Zpět\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edituj\",\r\n\t\ticon_delete: \"Smazat\",\r\n\t\tconfirm_closing: \"\", //Vaše změny budou ztraceny, opravdu ?\r\n\t\tconfirm_deleting: \"Událost bude trvale smazána, opravdu?\",\r\n\t\tsection_description: \"Poznámky\",\r\n\t\tsection_time: \"Doba platnosti\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Přejete si upravit celou řadu opakovaných událostí?\",\r\n\t\tsection_recurring: \"Opakování události\",\r\n\t\tbutton_recurring: \"Vypnuto\",\r\n\t\tbutton_recurring_open: \"Zapnuto\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Upravit instance\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Program\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Poznámka\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\t\tfull_day: \"Full day\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Program\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Mřížka\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Denně\",\r\n\t\trepeat_radio_week: \"Týdně\",\r\n\t\trepeat_radio_month: \"Měsíčně\",\r\n\t\trepeat_radio_year: \"Ročně\",\r\n\t\trepeat_radio_day_type: \"každý\",\r\n\t\trepeat_text_day_count: \"Den\",\r\n\t\trepeat_radio_day_type2: \"pracovní dny\",\r\n\t\trepeat_week: \"Opakuje každých\",\r\n\t\trepeat_text_week_count: \"Týdnů na:\",\r\n\t\trepeat_radio_month_type: \"u každého\",\r\n\t\trepeat_radio_month_start: \"na\",\r\n\t\trepeat_text_month_day: \"Den každého\",\r\n\t\trepeat_text_month_count: \"Měsíc\",\r\n\t\trepeat_text_month_count2_before: \"každý\",\r\n\t\trepeat_text_month_count2_after: \"Měsíc\",\r\n\t\trepeat_year_label: \"na\",\r\n\t\tselect_year_day2: \"v\",\r\n\t\trepeat_text_year_day: \"Den v\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"bez data ukončení\",\r\n\t\trepeat_text_occurences_count: \"Události\",\r\n\t\trepeat_radio_end2: \"po\",\r\n\t\trepeat_radio_end3: \"Konec\",\r\n\r\n\t\trepeat_never: \"Nikdy\",\r\n\t\trepeat_daily: \"Každý den\",\r\n\t\trepeat_workdays: \"Každý pracovní den\",\r\n\t\trepeat_weekly: \"Každý týden\",\r\n\t\trepeat_monthly: \"Každý měsíc\",\r\n\t\trepeat_yearly: \"Každý rok\",\r\n\t\trepeat_custom: \"Vlastní\",\r\n\t\trepeat_freq_day: \"Den\",\r\n\t\trepeat_freq_week: \"Týden\",\r\n\t\trepeat_freq_month: \"Měsíc\",\r\n\t\trepeat_freq_year: \"Rok\",\r\n\t\trepeat_on_date: \"Na datum\",\r\n\t\trepeat_ends: \"Končí\",\r\n\r\n\t\tmonth_for_recurring: [\"Leden\", \"Únor\", \"Březen\", \"Duben\", \"Květen\", \"Červen\", \"Červenec\", \"Srpen\", \"Září\", \"Říjen\", \"Listopad\", \"Prosinec\"],\r\n\t\tday_for_recurring: [\"Neděle \", \"Pondělí\", \"Úterý\", \"Středa\", \"Čtvrtek\", \"Pátek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Marts\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Man\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uge\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny begivenhed\",\r\n\t\ticon_save: \"Gem\",\r\n\t\ticon_cancel: \"Fortryd\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Tilret\",\r\n\t\ticon_delete: \"Slet\",\r\n\t\tconfirm_closing: \"Dine rettelser vil gå tabt.. Er dy sikker?\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Bigivenheden vil blive slettet permanent. Er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du tilrette hele serien af gentagne begivenheder?\",\r\n\t\tsection_recurring: \"Gentag begivenhed\",\r\n\t\tbutton_recurring: \"Frakoblet\",\r\n\t\tbutton_recurring_open: \"Tilkoblet\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Rediger en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dagsorden\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dagsorden\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\",\r\n\t\trepeat_radio_week: \"Ugenlig\",\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"På hver arbejdsdag\",\r\n\t\trepeat_week: \" Gentager sig hver\",\r\n\t\trepeat_text_week_count: \"uge på følgende dage:\",\r\n\t\trepeat_radio_month_type: \"Hver den\",\r\n\t\trepeat_radio_month_start: \"Den\",\r\n\t\trepeat_text_month_day: \" i hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"Den\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Ingen slutdato\",\r\n\t\trepeat_text_occurences_count: \"gentagelse\",\r\n\t\trepeat_radio_end2: \"Efter\",\r\n\t\trepeat_radio_end3: \"Slut\",\r\n\r\n\t\trepeat_never: \"Aldrig\",\r\n\t\trepeat_daily: \"Hver dag\",\r\n\t\trepeat_workdays: \"Hver hverdag\",\r\n\t\trepeat_weekly: \"Hver uge\",\r\n\t\trepeat_monthly: \"Hver måned\",\r\n\t\trepeat_yearly: \"Hvert år\",\r\n\t\trepeat_custom: \"Brugerdefineret\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Uge\",\r\n\t\trepeat_freq_month: \"Måned\",\r\n\t\trepeat_freq_year: \"År\",\r\n\t\trepeat_on_date: \"På dato\",\r\n\t\trepeat_ends: \"Slutter\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"März\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Dezember\"],\r\n\t\tday_for_recurring: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\" Januar\", \" Februar\", \" März \", \" April\", \" Mai\", \" Juni\", \" Juli\", \" August\", \" September \", \" Oktober\", \" November \", \" Dezember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mär\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dez\"],\r\n\t\tday_full: [ \"Sonntag\", \"Montag\", \"Dienstag\", \" Mittwoch\", \" Donnerstag\", \"Freitag\", \"Samstag\"],\r\n\t\tday_short: [\"So\", \"Mo\", \"Di\", \"Mi\", \"Do\", \"Fr\", \"Sa\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Heute\",\r\n\t\tday_tab: \"Tag\",\r\n\t\tweek_tab: \"Woche\",\r\n\t\tmonth_tab: \"Monat\",\r\n\t\tnew_event: \"neuer Eintrag\",\r\n\t\ticon_save: \"Speichern\",\r\n\t\ticon_cancel: \"Abbrechen\",\r\n\t\ticon_details: \"Details\",\r\n\t\ticon_edit: \"Ändern\",\r\n\t\ticon_delete: \"Löschen\",\r\n\t\tconfirm_closing: \"\", //\"Ihre Veränderungen werden verloren sein, wollen Sie ergänzen? \"\r\n\t\tconfirm_deleting: \"Der Eintrag wird gelöscht\",\r\n\t\tsection_description: \"Beschreibung\",\r\n\t\tsection_time: \"Zeitspanne\",\r\n\t\tfull_day: \"Ganzer Tag\",\r\n\r\n\t\tconfirm_recurring: \"Wollen Sie alle Einträge bearbeiten oder nur diesen einzelnen Eintrag?\",\r\n\t\tsection_recurring: \"Wiederholung\",\r\n\t\tbutton_recurring: \"Aus\",\r\n\t\tbutton_recurring_open: \"An\",\r\n\t\tbutton_edit_series: \"Bearbeiten Sie die Serie\",\r\n\t\tbutton_edit_occurrence: \"Bearbeiten Sie eine Kopie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Beschreibung\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Jahre\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Täglich\",\r\n\t\trepeat_radio_week: \"Wöchentlich\",\r\n\t\trepeat_radio_month: \"Monatlich\",\r\n\t\trepeat_radio_year: \"Jährlich\",\r\n\t\trepeat_radio_day_type: \"jeden\",\r\n\t\trepeat_text_day_count: \"Tag\",\r\n\t\trepeat_radio_day_type2: \"an jedem Arbeitstag\",\r\n\t\trepeat_week: \" Wiederholt sich jede\",\r\n\t\trepeat_text_week_count: \"Woche am:\",\r\n\t\trepeat_radio_month_type: \"an jedem\",\r\n\t\trepeat_radio_month_start: \"am\",\r\n\t\trepeat_text_month_day: \"Tag eines jeden\",\r\n\t\trepeat_text_month_count: \"Monats\",\r\n\t\trepeat_text_month_count2_before: \"jeden\",\r\n\t\trepeat_text_month_count2_after: \"Monats\",\r\n\t\trepeat_year_label: \"am\",\r\n\t\tselect_year_day2: \"im\",\r\n\t\trepeat_text_year_day: \"Tag im\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"kein Enddatum\",\r\n\t\trepeat_text_occurences_count: \"Ereignissen\",\r\n\t\trepeat_radio_end3: \"Schluß\",\r\n\t\trepeat_radio_end2: \"nach\",\r\n\r\n\t\trepeat_never: \"Nie\",\r\n\t\trepeat_daily: \"Jeden Tag\",\r\n\t\trepeat_workdays: \"Jeden Werktag\",\r\n\t\trepeat_weekly: \"Jede Woche\",\r\n\t\trepeat_monthly: \"Jeden Monat\",\r\n\t\trepeat_yearly: \"Jedes Jahr\",\r\n\t\trepeat_custom: \"Benutzerdefiniert\",\r\n\t\trepeat_freq_day: \"Tag\",\r\n\t\trepeat_freq_week: \"Woche\",\r\n\t\trepeat_freq_month: \"Monat\",\r\n\t\trepeat_freq_year: \"Jahr\",\r\n\t\trepeat_on_date: \"Am Datum\",\r\n\t\trepeat_ends: \"Endet\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"März\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Dezember\"],\r\n\t\tday_for_recurring: [\"Sonntag\", \"Montag\", \"Dienstag\", \"Mittwoch\", \"Donnerstag\", \"Freitag\", \"Samstag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Ιανουάριος\", \"Φεβρουάριος\", \"Μάρτιος\", \"Απρίλιος\", \"Μάϊος\", \"Ιούνιος\", \"Ιούλιος\", \"Αύγουστος\", \"Σεπτέμβριος\", \"Οκτώβριος\", \"Νοέμβριος\", \"Δεκέμβριος\"],\r\n\t\tmonth_short: [\"ΙΑΝ\", \"ΦΕΒ\", \"ΜΑΡ\", \"ΑΠΡ\", \"ΜΑΙ\", \"ΙΟΥΝ\", \"ΙΟΥΛ\", \"ΑΥΓ\", \"ΣΕΠ\", \"ΟΚΤ\", \"ΝΟΕ\", \"ΔΕΚ\"],\r\n\t\tday_full: [\"Κυριακή\", \"Δευτέρα\", \"Τρίτη\", \"Τετάρτη\", \"Πέμπτη\", \"Παρασκευή\", \"Σάββατο\"],\r\n\t\tday_short: [\"ΚΥ\", \"ΔΕ\", \"ΤΡ\", \"ΤΕ\", \"ΠΕ\", \"ΠΑ\", \"ΣΑ\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Σήμερα\",\r\n\t\tday_tab: \"Ημέρα\",\r\n\t\tweek_tab: \"Εβδομάδα\",\r\n\t\tmonth_tab: \"Μήνας\",\r\n\t\tnew_event: \"Νέο έργο\",\r\n\t\ticon_save: \"Αποθήκευση\",\r\n\t\ticon_cancel: \"Άκυρο\",\r\n\t\ticon_details: \"Λεπτομέρειες\",\r\n\t\ticon_edit: \"Επεξεργασία\",\r\n\t\ticon_delete: \"Διαγραφή\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Το έργο θα διαγραφεί οριστικά. Θέλετε να συνεχίσετε;\",\r\n\t\tsection_description: \"Περιγραφή\",\r\n\t\tsection_time: \"Χρονική περίοδος\",\r\n\t\tfull_day: \"Πλήρης Ημέρα\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Θέλετε να επεξεργασθείτε ολόκληρη την ομάδα των επαναλαμβανόμενων έργων;\",\r\n\t\tsection_recurring: \"Επαναλαμβανόμενο έργο\",\r\n\t\tbutton_recurring: \"Ανενεργό\",\r\n\t\tbutton_recurring_open: \"Ενεργό\",\r\n\t\tbutton_edit_series: \"Επεξεργαστείτε τη σειρά\",\r\n\t\tbutton_edit_occurrence: \"Επεξεργασία ένα αντίγραφο\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Ημερήσια Διάταξη\",\r\n\t\tdate: \"Ημερομηνία\",\r\n\t\tdescription: \"Περιγραφή\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Έτος\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Ημερήσια Διάταξη\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Πλέγμα\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Ημερησίως\",\r\n\t\trepeat_radio_week: \"Εβδομαδιαίως\",\r\n\t\trepeat_radio_month: \"Μηνιαίως\",\r\n\t\trepeat_radio_year: \"Ετησίως\",\r\n\t\trepeat_radio_day_type: \"Κάθε\",\r\n\t\trepeat_text_day_count: \"ημέρα\",\r\n\t\trepeat_radio_day_type2: \"Κάθε εργάσιμη\",\r\n\t\trepeat_week: \" Επανάληψη κάθε\",\r\n\t\trepeat_text_week_count: \"εβδομάδα τις επόμενες ημέρες:\",\r\n\t\trepeat_radio_month_type: \"Επανάληψη\",\r\n\t\trepeat_radio_month_start: \"Την\",\r\n\t\trepeat_text_month_day: \"ημέρα κάθε\",\r\n\t\trepeat_text_month_count: \"μήνα\",\r\n\t\trepeat_text_month_count2_before: \"κάθε\",\r\n\t\trepeat_text_month_count2_after: \"μήνα\",\r\n\t\trepeat_year_label: \"Την\",\r\n\t\tselect_year_day2: \"του\",\r\n\t\trepeat_text_year_day: \"ημέρα\",\r\n\t\tselect_year_month: \"μήνα\",\r\n\t\trepeat_radio_end: \"Χωρίς ημερομηνία λήξεως\",\r\n\t\trepeat_text_occurences_count: \"επαναλήψεις\",\r\n\t\trepeat_radio_end3: \"Λήγει την\",\r\n\t\trepeat_radio_end2: \"Μετά από\",\r\n\r\n\t\trepeat_never: \"Ποτέ\",\r\n\t\trepeat_daily: \"Κάθε μέρα\",\r\n\t\trepeat_workdays: \"Κάθε εργάσιμη μέρα\",\r\n\t\trepeat_weekly: \"Κάθε εβδομάδα\",\r\n\t\trepeat_monthly: \"Κάθε μήνα\",\r\n\t\trepeat_yearly: \"Κάθε χρόνο\",\r\n\t\trepeat_custom: \"Προσαρμοσμένο\",\r\n\t\trepeat_freq_day: \"Ημέρα\",\r\n\t\trepeat_freq_week: \"Εβδομάδα\",\r\n\t\trepeat_freq_month: \"Μήνας\",\r\n\t\trepeat_freq_year: \"Χρόνος\",\r\n\t\trepeat_on_date: \"Σε ημερομηνία\",\r\n\t\trepeat_ends: \"Λήγει\",\r\n\r\n\t\tmonth_for_recurring: [\"Ιανουάριος\", \"Φεβρουάριος\", \"Μάρτιος\", \"Απρίλιος\", \"Μάϊος\", \"Ιούνιος\", \"Ιούλιος\", \"Αύγουστος\", \"Σεπτέμβριος\", \"Οκτώβριος\", \"Νοέμβριος\", \"Δεκέμβριος\"],\r\n\t\tday_for_recurring: [\"Κυριακή\", \"Δευτέρα\", \"Τρίτη\", \"Τετάρτη\", \"Πέμπτη\", \"Παρασκευή\", \"Σάββατο\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate:{\r\n\t\tmonth_full:[\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\r\n\t\tmonth_short:[\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n\t\tday_full:[\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\r\n\t\tday_short:[\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"]\r\n\t},\r\n\tlabels:{\r\n\t\tdhx_cal_today_button:\"Today\",\r\n\t\tday_tab:\"Day\",\r\n\t\tweek_tab:\"Week\",\r\n\t\tmonth_tab:\"Month\",\r\n\t\tnew_event:\"New event\",\r\n\t\ticon_save:\"Save\",\r\n\t\ticon_cancel:\"Cancel\",\r\n\t\ticon_details:\"Details\",\r\n\t\ticon_edit:\"Edit\",\r\n\t\ticon_delete:\"Delete\",\r\n\t\tconfirm_closing:\"\",//Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting:\"Event will be deleted permanently, are you sure?\",\r\n\t\tsection_description:\"Description\",\r\n\t\tsection_time:\"Time period\",\r\n\t\tfull_day:\"Full day\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring:\"Do you want to edit the whole set of repeated events?\",\r\n\t\tsection_recurring:\"Repeat event\",\r\n\t\tbutton_recurring:\"Disabled\",\r\n\t\tbutton_recurring_open:\"Enabled\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Edit occurrence\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"Agenda\",\r\n\t\tdate:\"Date\",\r\n\t\tdescription:\"Description\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"Year\",\r\n\r\n\t\t/* week agenda extension */\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daily\",//name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Weekly\",//name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Monthly\",\r\n\t\trepeat_radio_year: \"Yearly\",\r\n\t\trepeat_radio_day_type: \"Every\",\r\n\t\trepeat_text_day_count: \"day\",\r\n\t\trepeat_radio_day_type2: \"Every workday\",\r\n\t\trepeat_week: \" Repeat every\",\r\n\t\trepeat_text_week_count: \"week next days:\",\r\n\t\trepeat_radio_month_type: \"Repeat\",\r\n\t\trepeat_radio_month_start: \"On\",\r\n\t\trepeat_text_month_day: \"day every\",\r\n\t\trepeat_text_month_count: \"month\",\r\n\t\trepeat_text_month_count2_before: \"every\",\r\n\t\trepeat_text_month_count2_after: \"month\",\r\n\t\trepeat_year_label: \"On\",\r\n\t\tselect_year_day2: \"of\",\r\n\t\trepeat_text_year_day: \"day\",\r\n\t\tselect_year_month: \"month\",\r\n\t\trepeat_radio_end: \"No end date\",\r\n\t\trepeat_text_occurences_count: \"occurrences\",\r\n\t\trepeat_radio_end2: \"After\",\r\n\t\trepeat_radio_end3: \"End by\",\r\n\r\n\t\trepeat_never: \"Never\",\r\n\t\trepeat_daily: \"Every day\",\r\n\t\trepeat_workdays: \"Every weekday\",\r\n\t\trepeat_weekly: \"Every week\",\r\n\t\trepeat_monthly: \"Every month\",\r\n\t\trepeat_yearly: \"Every year\",\r\n\t\trepeat_custom: \"Custom\",\r\n\t\trepeat_freq_day: \"Day\",\r\n\t\trepeat_freq_week: \"Week\",\r\n\t\trepeat_freq_month: \"Month\",\r\n\t\trepeat_freq_year: \"Year\",\r\n\t\trepeat_on_date: \"On date\",\r\n\t\trepeat_ends: \"Ends\",\r\n\r\n\t\tmonth_for_recurring: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"]//\r\n\t}\r\n};\r\n\r\n","/*\r\n @Autor Manuel Fernandez Panzuela - www.mfernandez.es\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Enero\", \"Febrero\", \"Marzo\", \"Abril\", \"Mayo\", \"Junio\", \"Julio\", \"Agosto\", \"Septiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"],\r\n\t\tmonth_short: [\"Ene\", \"Feb\", \"Mar\", \"Abr\", \"May\", \"Jun\", \"Jul\", \"Ago\", \"Sep\", \"Oct\", \"Nov\", \"Dic\"],\r\n\t\tday_full: [\"Domingo\", \"Lunes\", \"Martes\", \"Miércoles\", \"Jueves\", \"Viernes\", \"Sábado\"],\r\n\t\tday_short: [\"Dom\", \"Lun\", \"Mar\", \"Mié\", \"Jue\", \"Vie\", \"Sáb\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hoy\",\r\n\t\tday_tab: \"Día\",\r\n\t\tweek_tab: \"Semana\",\r\n\t\tmonth_tab: \"Mes\",\r\n\t\tnew_event: \"Nuevo evento\",\r\n\t\ticon_save: \"Guardar\",\r\n\t\ticon_cancel: \"Cancelar\",\r\n\t\ticon_details: \"Detalles\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Eliminar\",\r\n\t\tconfirm_closing: \"\", //\"Sus cambios se perderán, continuar ?\"\r\n\t\tconfirm_deleting: \"El evento se borrará definitivamente, ¿continuar?\",\r\n\t\tsection_description: \"Descripción\",\r\n\t\tsection_time: \"Período\",\r\n\t\tfull_day: \"Todo el día\",\r\n\r\n\t\tconfirm_recurring: \"¿Desea modificar el conjunto de eventos repetidos?\",\r\n\t\tsection_recurring: \"Repita el evento\",\r\n\t\tbutton_recurring: \"Impedido\",\r\n\t\tbutton_recurring_open: \"Permitido\",\r\n\t\tbutton_edit_series: \"Editar la serie\",\r\n\t\tbutton_edit_occurrence: \"Editar este evento\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Día\",\r\n\t\tdate: \"Fecha\",\r\n\t\tdescription: \"Descripción\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Año\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Día\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Reja\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diariamente\",\r\n\t\trepeat_radio_week: \"Semanalmente\",\r\n\t\trepeat_radio_month: \"Mensualmente\",\r\n\t\trepeat_radio_year: \"Anualmente\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia\",\r\n\t\trepeat_radio_day_type2: \"Cada jornada de trabajo\",\r\n\t\trepeat_week: \" Repetir cada\",\r\n\t\trepeat_text_week_count: \"semana:\",\r\n\t\trepeat_radio_month_type: \"Repita\",\r\n\t\trepeat_radio_month_start: \"El\",\r\n\t\trepeat_text_month_day: \"dia cada \",\r\n\t\trepeat_text_month_count: \"mes\",\r\n\t\trepeat_text_month_count2_before: \"cada\",\r\n\t\trepeat_text_month_count2_after: \"mes\",\r\n\t\trepeat_year_label: \"El\",\r\n\t\tselect_year_day2: \"del\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mes\",\r\n\t\trepeat_radio_end: \"Sin fecha de finalización\",\r\n\t\trepeat_text_occurences_count: \"ocurrencias\",\r\n\t\trepeat_radio_end3: \"Fin\",\r\n\t\trepeat_radio_end2: \"Después de\",\r\n\r\n\t\trepeat_never: \"Nunca\",\r\n\t\trepeat_daily: \"Cada día\",\r\n\t\trepeat_workdays: \"Cada día laborable\",\r\n\t\trepeat_weekly: \"Cada semana\",\r\n\t\trepeat_monthly: \"Cada mes\",\r\n\t\trepeat_yearly: \"Cada año\",\r\n\t\trepeat_custom: \"Personalizado\",\r\n\t\trepeat_freq_day: \"Día\",\r\n\t\trepeat_freq_week: \"Semana\",\r\n\t\trepeat_freq_month: \"Mes\",\r\n\t\trepeat_freq_year: \"Año\",\r\n\t\trepeat_on_date: \"En la fecha\",\r\n\t\trepeat_ends: \"Termina\",\r\n\r\n\t\tmonth_for_recurring: [\"Enero\", \"Febrero\", \"Маrzo\", \"Аbril\", \"Mayo\", \"Junio\", \"Julio\", \"Аgosto\", \"Setiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"],\r\n\t\tday_for_recurring: [\"Domingo\", \"Lunes\", \"Martes\", \"Miércoles\", \"Jeuves\", \"Viernes\", \"Sabado\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Tammikuu\", \"Helmikuu\", \"Maaliskuu\", \"Huhtikuu\", \"Toukokuu\", \"Kesäkuu\", \"Heinäkuu\", \"Elokuu\", \"Syyskuu\", \"Lokakuu\", \"Marraskuu\", \"Joulukuu\"],\r\n\t\tmonth_short: [\"Tam\", \"Hel\", \"Maa\", \"Huh\", \"Tou\", \"Kes\", \"Hei\", \"Elo\", \"Syy\", \"Lok\", \"Mar\", \"Jou\"],\r\n\t\tday_full: [\"Sunnuntai\", \"Maanantai\", \"Tiistai\", \"Keskiviikko\", \"Torstai\", \"Perjantai\", \"Lauantai\"],\r\n\t\tday_short: [\"Su\", \"Ma\", \"Ti\", \"Ke\", \"To\", \"Pe\", \"La\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Tänään\",\r\n\t\tday_tab: \"Päivä\",\r\n\t\tweek_tab: \"Viikko\",\r\n\t\tmonth_tab: \"Kuukausi\",\r\n\t\tnew_event: \"Uusi tapahtuma\",\r\n\t\ticon_save: \"Tallenna\",\r\n\t\ticon_cancel: \"Peru\",\r\n\t\ticon_details: \"Tiedot\",\r\n\t\ticon_edit: \"Muokkaa\",\r\n\t\ticon_delete: \"Poista\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Haluatko varmasti poistaa tapahtuman?\",\r\n\t\tsection_description: \"Kuvaus\",\r\n\t\tsection_time: \"Aikajakso\",\r\n\t\tfull_day: \"Koko päivä\",\r\n\r\n\t\tconfirm_recurring: \"Haluatko varmasti muokata toistuvan tapahtuman kaikkia jaksoja?\",\r\n\t\tsection_recurring: \"Toista tapahtuma\",\r\n\t\tbutton_recurring: \"Ei käytössä\",\r\n\t\tbutton_recurring_open: \"Käytössä\",\r\n\t\tbutton_edit_series: \"Muokkaa sarja\",\r\n\t\tbutton_edit_occurrence: \"Muokkaa kopio\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Esityslista\",\r\n\t\tdate: \"Päivämäärä\",\r\n\t\tdescription: \"Kuvaus\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Vuoden\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Esityslista\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Ritilä\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Luo uusi vetämällä\",\r\n\t\tdrag_to_move:\"Siirrä vetämällä\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Päivittäin\",\r\n\t\trepeat_radio_week: \"Viikoittain\",\r\n\t\trepeat_radio_month: \"Kuukausittain\",\r\n\t\trepeat_radio_year: \"Vuosittain\",\r\n\t\trepeat_radio_day_type: \"Joka\",\r\n\t\trepeat_text_day_count: \"päivä\",\r\n\t\trepeat_radio_day_type2: \"Joka arkipäivä\",\r\n\t\trepeat_week: \"Toista joka\",\r\n\t\trepeat_text_week_count: \"viikko näinä päivinä:\",\r\n\t\trepeat_radio_month_type: \"Toista\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \"päivänä joka\",\r\n\t\trepeat_text_month_count: \"kuukausi\",\r\n\t\trepeat_text_month_count2_before: \"joka\",\r\n\t\trepeat_text_month_count2_after: \"kuukausi\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"päivä\",\r\n\t\tselect_year_month: \"kuukausi\",\r\n\t\trepeat_radio_end: \"Ei loppumisaikaa\",\r\n\t\trepeat_text_occurences_count: \"Toiston jälkeen\",\r\n\t\trepeat_radio_end3: \"Loppuu\",\r\n\t\trepeat_radio_end2: \"\",\r\n\r\n\t\trepeat_never: \"Ei koskaan\",\r\n\t\trepeat_daily: \"Joka päivä\",\r\n\t\trepeat_workdays: \"Joka arkipäivä\",\r\n\t\trepeat_weekly: \"Joka viikko\",\r\n\t\trepeat_monthly: \"Joka kuukausi\",\r\n\t\trepeat_yearly: \"Joka vuosi\",\r\n\t\trepeat_custom: \"Mukautettu\",\r\n\t\trepeat_freq_day: \"Päivä\",\r\n\t\trepeat_freq_week: \"Viikko\",\r\n\t\trepeat_freq_month: \"Kuukausi\",\r\n\t\trepeat_freq_year: \"Vuosi\",\r\n\t\trepeat_on_date: \"Tiettynä päivänä\",\r\n\t\trepeat_ends: \"Päättyy\",\r\n\r\n\t\tmonth_for_recurring: [\"Tammikuu\", \"Helmikuu\", \"Maaliskuu\", \"Huhtikuu\", \"Toukokuu\", \"Kesäkuu\", \"Heinäkuu\", \"Elokuu\", \"Syyskuu\", \"Lokakuu\", \"Marraskuu\", \"Joulukuu\"],\r\n\t\tday_for_recurring: [\"Sunnuntai\", \"Maanantai\", \"Tiistai\", \"Keskiviikko\", \"Torstai\", \"Perjantai\", \"Lauantai\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Janvier\", \"Février\", \"Mars\", \"Avril\", \"Mai\", \"Juin\", \"Juillet\", \"Août\", \"Septembre\", \"Octobre\", \"Novembre\", \"Décembre\"],\r\n\t\tmonth_short: [\"Jan\", \"Fév\", \"Mar\", \"Avr\", \"Mai\", \"Juin\", \"Juil\", \"Aoû\", \"Sep\", \"Oct\", \"Nov\", \"Déc\"],\r\n\t\tday_full: [\"Dimanche\", \"Lundi\", \"Mardi\", \"Mercredi\", \"Jeudi\", \"Vendredi\", \"Samedi\"],\r\n\t\tday_short: [\"Dim\", \"Lun\", \"Mar\", \"Mer\", \"Jeu\", \"Ven\", \"Sam\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Aujourd'hui\",\r\n\t\tday_tab: \"Jour\",\r\n\t\tweek_tab: \"Semaine\",\r\n\t\tmonth_tab: \"Mois\",\r\n\t\tnew_event: \"Nouvel événement\",\r\n\t\ticon_save: \"Enregistrer\",\r\n\t\ticon_cancel: \"Annuler\",\r\n\t\ticon_details: \"Détails\",\r\n\t\ticon_edit: \"Modifier\",\r\n\t\ticon_delete: \"Effacer\",\r\n\t\tconfirm_closing: \"\", //Vos modifications seront perdus, êtes-vous sûr ?\r\n\t\tconfirm_deleting: \"L'événement sera effacé sans appel, êtes-vous sûr ?\",\r\n\t\tsection_description: \"Description\",\r\n\t\tsection_time: \"Période\",\r\n\t\tfull_day: \"Journée complète\",\r\n\r\n\t\tconfirm_recurring: \"Voulez-vous éditer toute une série d'évènements répétés?\",\r\n\t\tsection_recurring: \"Périodicité\",\r\n\t\tbutton_recurring: \"Désactivé\",\r\n\t\tbutton_recurring_open: \"Activé\",\r\n\t\tbutton_edit_series: \"Modifier la série\",\r\n\t\tbutton_edit_occurrence: \"Modifier une copie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Jour\",\r\n\t\tdate: \"Date\",\r\n\t\tdescription: \"Description\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Année\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Jour\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grille\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Quotidienne\",\r\n\t\trepeat_radio_week: \"Hebdomadaire\",\r\n\t\trepeat_radio_month: \"Mensuelle\",\r\n\t\trepeat_radio_year: \"Annuelle\",\r\n\t\trepeat_radio_day_type: \"Chaque\",\r\n\t\trepeat_text_day_count: \"jour\",\r\n\t\trepeat_radio_day_type2: \"Chaque journée de travail\",\r\n\t\trepeat_week: \" Répéter toutes les\",\r\n\t\trepeat_text_week_count: \"semaine:\",\r\n\t\trepeat_radio_month_type: \"Répéter\",\r\n\t\trepeat_radio_month_start: \"Le\",\r\n\t\trepeat_text_month_day: \"jour chaque\",\r\n\t\trepeat_text_month_count: \"mois\",\r\n\t\trepeat_text_month_count2_before: \"chaque\",\r\n\t\trepeat_text_month_count2_after: \"mois\",\r\n\t\trepeat_year_label: \"Le\",\r\n\t\tselect_year_day2: \"du\",\r\n\t\trepeat_text_year_day: \"jour\",\r\n\t\tselect_year_month: \"mois\",\r\n\t\trepeat_radio_end: \"Pas de date d"achèvement\",\r\n\t\trepeat_text_occurences_count: \"occurrences\",\r\n\t\trepeat_radio_end3: \"Fin\",\r\n\t\trepeat_radio_end2: \"Après\",\r\n\r\n\t\trepeat_never: \"Jamais\",\r\n\t\trepeat_daily: \"Chaque jour\",\r\n\t\trepeat_workdays: \"Chaque jour ouvrable\",\r\n\t\trepeat_weekly: \"Chaque semaine\",\r\n\t\trepeat_monthly: \"Chaque mois\",\r\n\t\trepeat_yearly: \"Chaque année\",\r\n\t\trepeat_custom: \"Personnalisé\",\r\n\t\trepeat_freq_day: \"Jour\",\r\n\t\trepeat_freq_week: \"Semaine\",\r\n\t\trepeat_freq_month: \"Mois\",\r\n\t\trepeat_freq_year: \"Année\",\r\n\t\trepeat_on_date: \"À la date\",\r\n\t\trepeat_ends: \"Se termine\",\r\n\r\n\t\tmonth_for_recurring: [\"Janvier\", \"Février\", \"Mars\", \"Avril\", \"Mai\", \"Juin\", \"Juillet\", \"Août\", \"Septembre\", \"Octobre\", \"Novembre\", \"Décembre\"],\r\n\t\tday_for_recurring: [\"Dimanche\", \"Lundi\", \"Mardi\", \"Mercredi\", \"Jeudi\", \"Vendredi\", \"Samedi\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"ינואר\", \"פברואר\", \"מרץ\", \"אפריל\", \"מאי\", \"יוני\", \"יולי\", \"אוגוסט\", \"ספטמבר\", \"אוקטובר\", \"נובמבר\", \"דצמבר\"],\r\n\t\tmonth_short: [\"ינו\", \"פבר\", \"מרץ\", \"אפר\", \"מאי\", \"יונ\", \"יול\", \"אוג\", \"ספט\", \"אוק\", \"נוב\", \"דצמ\"],\r\n\t\tday_full: [\"ראשון\", \"שני\", \"שלישי\", \"רביעי\", \"חמישי\", \"שישי\", \"שבת\"],\r\n\t\tday_short: [\"א\", \"ב\", \"ג\", \"ד\", \"ה\", \"ו\", \"ש\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"היום\",\r\n\t\tday_tab: \"יום\",\r\n\t\tweek_tab: \"שבוע\",\r\n\t\tmonth_tab: \"חודש\",\r\n\t\tnew_event: \"ארוע חדש\",\r\n\t\ticon_save: \"שמור\",\r\n\t\ticon_cancel: \"בטל\",\r\n\t\ticon_details: \"פרטים\",\r\n\t\ticon_edit: \"ערוך\",\r\n\t\ticon_delete: \"מחק\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"ארוע ימחק סופית.להמשיך?\",\r\n\t\tsection_description: \"תיאור\",\r\n\t\tsection_time: \"תקופה\",\r\n\r\n\t\tconfirm_recurring: \"האם ברצונך לשנות כל סדרת ארועים מתמשכים?\",\r\n\t\tsection_recurring: \"להעתיק ארוע\",\r\n\t\tbutton_recurring: \"לא פעיל\",\r\n\t\tbutton_recurring_open: \"פעיל\",\r\n\t\tfull_day: \"יום שלם\",\r\n\t\tbutton_edit_series: \"ערוך את הסדרה\",\r\n\t\tbutton_edit_occurrence: \"עריכת עותק\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"סדר יום\",\r\n\t\tdate: \"תאריך\",\r\n\t\tdescription: \"תיאור\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"לשנה\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"סדר יום\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"סורג\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"גרור כדי להזיז\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"בטל\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"הבא\",\r\n\t\tprev: \"הקודם\",\r\n\t\tyear: \"שנה\",\r\n\t\tmonth: \"חודש\",\r\n\t\tday: \"יום\",\r\n\t\thour:\"שעה\",\r\n\t\tminute: \"דקה\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"יומי\",\r\n\t\trepeat_radio_week: \"שבועי\",\r\n\t\trepeat_radio_month: \"חודשי\",\r\n\t\trepeat_radio_year: \"שנתי\",\r\n\t\trepeat_radio_day_type: \"חזור כל\",\r\n\t\trepeat_text_day_count: \"ימים\",\r\n\t\trepeat_radio_day_type2: \"חזור כל יום עבודה\",\r\n\t\trepeat_week: \" חזור כל\",\r\n\t\trepeat_text_week_count: \"שבוע לפי ימים:\",\r\n\t\trepeat_radio_month_type: \"חזור כל\",\r\n\t\trepeat_radio_month_start: \"כל\",\r\n\t\trepeat_text_month_day: \"ימים כל\",\r\n\t\trepeat_text_month_count: \"חודשים\",\r\n\t\trepeat_text_month_count2_before: \"חזור כל\",\r\n\t\trepeat_text_month_count2_after: \"חודש\",\r\n\t\trepeat_year_label: \"כל\",\r\n\t\tselect_year_day2: \"בחודש\",\r\n\t\trepeat_text_year_day: \"ימים\",\r\n\t\tselect_year_month: \"חודש\",\r\n\t\trepeat_radio_end: \"לעולם לא מסתיים\",\r\n\t\trepeat_text_occurences_count: \"אירועים\",\r\n\t\trepeat_radio_end3: \"מסתיים ב\",\r\n\t\trepeat_radio_end2: \"אחרי\",\r\n\r\n\t\trepeat_never: \"אף פעם\",\r\n\t\trepeat_daily: \"כל יום\",\r\n\t\trepeat_workdays: \"כל יום עבודה\",\r\n\t\trepeat_weekly: \"כל שבוע\",\r\n\t\trepeat_monthly: \"כל חודש\",\r\n\t\trepeat_yearly: \"כל שנה\",\r\n\t\trepeat_custom: \"מותאם אישית\",\r\n\t\trepeat_freq_day: \"יום\",\r\n\t\trepeat_freq_week: \"שבוע\",\r\n\t\trepeat_freq_month: \"חודש\",\r\n\t\trepeat_freq_year: \"שנה\",\r\n\t\trepeat_on_date: \"בתאריך\",\r\n\t\trepeat_ends: \"מסתיים\",\r\n\r\n\t\tmonth_for_recurring: [\"ינואר\", \"פברואר\", \"מרץ\", \"אפריל\", \"מאי\", \"יוני\", \"יולי\", \"אוגוסט\", \"ספטמבר\", \"אוקטובר\", \"נובמבר\", \"דצמבר\"],\r\n\t\tday_for_recurring: [\"ראשון\", \"שני\", \"שלישי\", \"רביעי\", \"חמישי\", \"שישי\", \"שבת\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Január\", \"Február\", \"Március\", \"Április\", \"Május\", \"Június\", \"Július\", \"Augusztus\", \"Szeptember\", \"Október\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Már\", \"Ápr\", \"Máj\", \"Jún\", \"Júl\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Vasárnap\", \"Hétfõ\", \"Kedd\", \"Szerda\", \"Csütörtök\", \"Péntek\", \"szombat\"],\r\n\t\tday_short: [\"Va\", \"Hé\", \"Ke\", \"Sze\", \"Csü\", \"Pé\", \"Szo\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Ma\",\r\n\t\tday_tab: \"Nap\",\r\n\t\tweek_tab: \"Hét\",\r\n\t\tmonth_tab: \"Hónap\",\r\n\t\tnew_event: \"Új esemény\",\r\n\t\ticon_save: \"Mentés\",\r\n\t\ticon_cancel: \"Mégse\",\r\n\t\ticon_details: \"Részletek\",\r\n\t\ticon_edit: \"Szerkesztés\",\r\n\t\ticon_delete: \"Törlés\",\r\n\t\tconfirm_closing: \"\", //A változások elvesznek, biztosan folytatja? \"\r\n\t\tconfirm_deleting: \"Az esemény törölve lesz, biztosan folytatja?\",\r\n\t\tsection_description: \"Leírás\",\r\n\t\tsection_time: \"Idõszak\",\r\n\t\tfull_day: \"Egesz napos\",\r\n\r\n\t\t/*ismétlõdõ események*/\r\n\t\tconfirm_recurring: \"Biztosan szerkeszteni akarod az összes ismétlõdõ esemény beállítását?\",\r\n\t\tsection_recurring: \"Esemény ismétlése\",\r\n\t\tbutton_recurring: \"Tiltás\",\r\n\t\tbutton_recurring_open: \"Engedélyezés\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Szerkesztés bíróság\",\r\n\r\n\t\t/*napirendi nézet*/\r\n\t\tagenda_tab: \"Napirend\",\r\n\t\tdate: \"Dátum\",\r\n\t\tdescription: \"Leírás\",\r\n\r\n\t\t/*éves nézet*/\r\n\t\tyear_tab: \"Év\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Napi\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Heti\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Havi\",\r\n\t\trepeat_radio_year: \"Éves\",\r\n\t\trepeat_radio_day_type: \"Minden\",\r\n\t\trepeat_text_day_count: \"nap\",\r\n\t\trepeat_radio_day_type2: \"Minden munkanap\",\r\n\t\trepeat_week: \" Ismételje meg minden\",\r\n\t\trepeat_text_week_count: \"héten a következő napokon:\",\r\n\t\trepeat_radio_month_type: \"Ismétlés\",\r\n\t\trepeat_radio_month_start: \"Ekkor\",\r\n\t\trepeat_text_month_day: \"nap minden\",\r\n\t\trepeat_text_month_count: \"hónapban\",\r\n\t\trepeat_text_month_count2_before: \"minden\",\r\n\t\trepeat_text_month_count2_after: \"hónapban\",\r\n\t\trepeat_year_label: \"Ekkor\",\r\n\t\tselect_year_day2: \"-án/-én\",\r\n\t\trepeat_text_year_day: \"nap\",\r\n\t\tselect_year_month: \"hónap\",\r\n\t\trepeat_radio_end: \"Nincs befejezési dátum\",\r\n\t\trepeat_text_occurences_count: \"esemény\",\r\n\t\trepeat_radio_end2: \"Után\",\r\n\t\trepeat_radio_end3: \"Befejező dátum\",\r\n\r\n\t\trepeat_never: \"Soha\",\r\n\t\trepeat_daily: \"Minden nap\",\r\n\t\trepeat_workdays: \"Minden munkanap\",\r\n\t\trepeat_weekly: \"Minden héten\",\r\n\t\trepeat_monthly: \"Minden hónapban\",\r\n\t\trepeat_yearly: \"Minden évben\",\r\n\t\trepeat_custom: \"Egyedi\",\r\n\t\trepeat_freq_day: \"Nap\",\r\n\t\trepeat_freq_week: \"Hét\",\r\n\t\trepeat_freq_month: \"Hónap\",\r\n\t\trepeat_freq_year: \"Év\",\r\n\t\trepeat_on_date: \"Dátum szerint\",\r\n\t\trepeat_ends: \"Befejeződik\",\r\n\r\n\t\tmonth_for_recurring: [\"Január\", \"Február\", \"Március\", \"Április\", \"Május\", \"Június\", \"Július\", \"Augusztus\", \"Szeptember\", \"Október\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Vasárnap\", \"Hétfő\", \"Kedd\", \"Szerda\", \"Csütörtök\", \"Péntek\", \"Szombat\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Maret\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Agustus\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mei\", \"Jun\", \"Jul\", \"Ags\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Minggu\", \"Senin\", \"Selasa\", \"Rabu\", \"Kamis\", \"Jumat\", \"Sabtu\"],\r\n\t\tday_short: [\"Ming\", \"Sen\", \"Sel\", \"Rab\", \"Kam\", \"Jum\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hari Ini\",\r\n\t\tday_tab: \"Hari\",\r\n\t\tweek_tab: \"Minggu\",\r\n\t\tmonth_tab: \"Bulan\",\r\n\t\tnew_event: \"Acara Baru\",\r\n\t\ticon_save: \"Simpan\",\r\n\t\ticon_cancel: \"Batal\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edit\",\r\n\t\ticon_delete: \"Hapus\",\r\n\t\tconfirm_closing: \"\", /*Perubahan tidak akan disimpan ?*/\r\n\t\tconfirm_deleting: \"Acara akan dihapus\",\r\n\t\tsection_description: \"Keterangan\",\r\n\t\tsection_time: \"Periode\",\r\n\t\tfull_day: \"Hari penuh\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Apakah acara ini akan berulang?\",\r\n\t\tsection_recurring: \"Acara Rutin\",\r\n\t\tbutton_recurring: \"Tidak Difungsikan\",\r\n\t\tbutton_recurring_open: \"Difungsikan\",\r\n\t\tbutton_edit_series: \"Mengedit seri\",\r\n\t\tbutton_edit_occurrence: \"Mengedit salinan\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Tanggal\",\r\n\t\tdescription: \"Keterangan\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Tahun\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabel\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Harian\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Mingguan\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Bulanan\",\r\n\t\trepeat_radio_year: \"Tahunan\",\r\n\t\trepeat_radio_day_type: \"Setiap\",\r\n\t\trepeat_text_day_count: \"hari\",\r\n\t\trepeat_radio_day_type2: \"Setiap hari kerja\",\r\n\t\trepeat_week: \" Ulangi setiap\",\r\n\t\trepeat_text_week_count: \"minggu pada hari berikut:\",\r\n\t\trepeat_radio_month_type: \"Ulangi\",\r\n\t\trepeat_radio_month_start: \"Pada\",\r\n\t\trepeat_text_month_day: \"hari setiap\",\r\n\t\trepeat_text_month_count: \"bulan\",\r\n\t\trepeat_text_month_count2_before: \"setiap\",\r\n\t\trepeat_text_month_count2_after: \"bulan\",\r\n\t\trepeat_year_label: \"Pada\",\r\n\t\tselect_year_day2: \"dari\",\r\n\t\trepeat_text_year_day: \"hari\",\r\n\t\tselect_year_month: \"bulan\",\r\n\t\trepeat_radio_end: \"Tanpa tanggal akhir\",\r\n\t\trepeat_text_occurences_count: \"kejadian\",\r\n\t\trepeat_radio_end2: \"Setelah\",\r\n\t\trepeat_radio_end3: \"Berakhir pada\",\r\n\r\n\t\trepeat_never: \"Tidak pernah\",\r\n\t\trepeat_daily: \"Setiap hari\",\r\n\t\trepeat_workdays: \"Setiap hari kerja\",\r\n\t\trepeat_weekly: \"Setiap minggu\",\r\n\t\trepeat_monthly: \"Setiap bulan\",\r\n\t\trepeat_yearly: \"Setiap tahun\",\r\n\t\trepeat_custom: \"Kustom\",\r\n\t\trepeat_freq_day: \"Hari\",\r\n\t\trepeat_freq_week: \"Minggu\",\r\n\t\trepeat_freq_month: \"Bulan\",\r\n\t\trepeat_freq_year: \"Tahun\",\r\n\t\trepeat_on_date: \"Pada tanggal\",\r\n\t\trepeat_ends: \"Berakhir\",\r\n\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Maret\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Agustus\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tday_for_recurring: [\"Minggu\", \"Senin\", \"Selasa\", \"Rabu\", \"Kamis\", \"Jumat\", \"Sabtu\"]\r\n\t}\r\n};","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Gennaio\", \"Febbraio\", \"Marzo\", \"Aprile\", \"Maggio\", \"Giugno\", \"Luglio\", \"Agosto\", \"Settembre\", \"Ottobre\", \"Novembre\", \"Dicembre\"],\r\n\t\tmonth_short: [\"Gen\", \"Feb\", \"Mar\", \"Apr\", \"Mag\", \"Giu\", \"Lug\", \"Ago\", \"Set\", \"Ott\", \"Nov\", \"Dic\"],\r\n\t\tday_full: [\"Domenica\", \"Lunedì\", \"Martedì\", \"Mercoledì\", \"Giovedì\", \"Venerdì\", \"Sabato\"],\r\n\t\tday_short: [\"Dom\", \"Lun\", \"Mar\", \"Mer\", \"Gio\", \"Ven\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Oggi\",\r\n\t\tday_tab: \"Giorno\",\r\n\t\tweek_tab: \"Settimana\",\r\n\t\tmonth_tab: \"Mese\",\r\n\t\tnew_event: \"Nuovo evento\",\r\n\t\ticon_save: \"Salva\",\r\n\t\ticon_cancel: \"Chiudi\",\r\n\t\ticon_details: \"Dettagli\",\r\n\t\ticon_edit: \"Modifica\",\r\n\t\ticon_delete: \"Elimina\",\r\n\t\tconfirm_closing: \"\", //Le modifiche apportate saranno perse, siete sicuri?\r\n\t\tconfirm_deleting: \"L'evento sarà eliminato, siete sicuri?\",\r\n\t\tsection_description: \"Descrizione\",\r\n\t\tsection_time: \"Periodo di tempo\",\r\n\t\tfull_day: \"Intera giornata\",\r\n\r\n\t\tconfirm_recurring: \"Vuoi modificare l'intera serie di eventi?\",\r\n\t\tsection_recurring: \"Ripetere l'evento\",\r\n\t\tbutton_recurring: \"Disattivato\",\r\n\t\tbutton_recurring_open: \"Attivato\",\r\n\t\tbutton_edit_series: \"Modificare la serie\",\r\n\t\tbutton_edit_occurrence: \"Modificare una copia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descrizione\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Anno\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Griglia\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Quotidiano\",\r\n\t\trepeat_radio_week: \"Settimanale\",\r\n\t\trepeat_radio_month: \"Mensile\",\r\n\t\trepeat_radio_year: \"Annuale\",\r\n\t\trepeat_radio_day_type: \"Ogni\",\r\n\t\trepeat_text_day_count: \"giorno\",\r\n\t\trepeat_radio_day_type2: \"Ogni giornata lavorativa\",\r\n\t\trepeat_week: \" Ripetere ogni\",\r\n\t\trepeat_text_week_count: \"settimana:\",\r\n\t\trepeat_radio_month_type: \"Ripetere\",\r\n\t\trepeat_radio_month_start: \"Il\",\r\n\t\trepeat_text_month_day: \"giorno ogni\",\r\n\t\trepeat_text_month_count: \"mese\",\r\n\t\trepeat_text_month_count2_before: \"ogni\",\r\n\t\trepeat_text_month_count2_after: \"mese\",\r\n\t\trepeat_year_label: \"Il\",\r\n\t\tselect_year_day2: \"del\",\r\n\t\trepeat_text_year_day: \"giorno\",\r\n\t\tselect_year_month: \"mese\",\r\n\t\trepeat_radio_end: \"Senza data finale\",\r\n\t\trepeat_text_occurences_count: \"occorenze\",\r\n\t\trepeat_radio_end3: \"Fine\",\r\n\t\trepeat_radio_end2: \"Dopo\",\r\n\r\n\t\trepeat_never: \"Mai\",\r\n\t\trepeat_daily: \"Ogni giorno\",\r\n\t\trepeat_workdays: \"Ogni giorno feriale\",\r\n\t\trepeat_weekly: \"Ogni settimana\",\r\n\t\trepeat_monthly: \"Ogni mese\",\r\n\t\trepeat_yearly: \"Ogni anno\",\r\n\t\trepeat_custom: \"Personalizzato\",\r\n\t\trepeat_freq_day: \"Giorno\",\r\n\t\trepeat_freq_week: \"Settimana\",\r\n\t\trepeat_freq_month: \"Mese\",\r\n\t\trepeat_freq_year: \"Anno\",\r\n\t\trepeat_on_date: \"Alla data\",\r\n\t\trepeat_ends: \"Finisce\",\r\n\r\n\t\tmonth_for_recurring: [\"Gennaio\", \"Febbraio\", \"Marzo\", \"Aprile\", \"Maggio\", \"Jiugno\", \"Luglio\", \"Agosto\", \"Settembre\", \"Ottobre\", \"Novembre\", \"Dicembre\"],\r\n\t\tday_for_recurring: [\"Domenica\", \"Lunedì\", \"Martedì\", \"Mercoledì\", \"Jovedì\", \"Venerdì\", \"Sabato\"]\r\n\t}\r\n};\r\n","/*\r\n Translation by Genexus Japan Inc.\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tmonth_short: [ \"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_full: [\"日曜日\", \"月曜日\", \"火曜日\", \"水曜日\", \"木曜日\", \"金曜日\", \"土曜日\"],\r\n\t\tday_short: [\"日\", \"月\", \"火\", \"水\", \"木\", \"金\", \"土\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"今日\",\r\n\t\tday_tab: \"日\",\r\n\t\tweek_tab: \"週\",\r\n\t\tmonth_tab: \"月\",\r\n\t\tnew_event: \"新イベント\",\r\n\t\ticon_save: \"保存\",\r\n\t\ticon_cancel: \"キャンセル\",\r\n\t\ticon_details: \"詳細\",\r\n\t\ticon_edit: \"編集\",\r\n\t\ticon_delete: \"削除\",\r\n\t\tconfirm_closing: \"\", //変更が取り消されます、宜しいですか?\r\n\t\tconfirm_deleting: \"イベント完全に削除されます、宜しいですか?\",\r\n\t\tsection_description: \"デスクリプション\",\r\n\t\tsection_time: \"期間\",\r\n\t\tconfirm_recurring: \"繰り返されているイベントを全て編集しますか?\",\r\n\t\tsection_recurring: \"イベントを繰り返す\",\r\n\t\tbutton_recurring: \"無効\",\r\n\t\tbutton_recurring_open: \"有効\",\r\n\t\tfull_day: \"終日\",\r\n\t\tbutton_edit_series: \"シリーズを編集します\",\r\n\t\tbutton_edit_occurrence: \"コピーを編集\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"議題は\",\r\n\t\tdate: \"日付\",\r\n\t\tdescription: \"説明\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"今年\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"議題は\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"グリッド\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"毎日\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"毎週\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"毎月\",\r\n\t\trepeat_radio_year: \"毎年\",\r\n\t\trepeat_radio_day_type: \"毎\",\r\n\t\trepeat_text_day_count: \"日\",\r\n\t\trepeat_radio_day_type2: \"毎営業日\",\r\n\t\trepeat_week: \" 繰り返し毎\",\r\n\t\trepeat_text_week_count: \"週 次の日:\",\r\n\t\trepeat_radio_month_type: \"繰り返し\",\r\n\t\trepeat_radio_month_start: \"オン\",\r\n\t\trepeat_text_month_day: \"日毎\",\r\n\t\trepeat_text_month_count: \"月\",\r\n\t\trepeat_text_month_count2_before: \"毎\",\r\n\t\trepeat_text_month_count2_after: \"月\",\r\n\t\trepeat_year_label: \"オン\",\r\n\t\tselect_year_day2: \"の\",\r\n\t\trepeat_text_year_day: \"日\",\r\n\t\tselect_year_month: \"月\",\r\n\t\trepeat_radio_end: \"終了日なし\",\r\n\t\trepeat_text_occurences_count: \"回数\",\r\n\t\trepeat_radio_end2: \"後\",\r\n\t\trepeat_radio_end3: \"終了日まで\",\r\n\r\n\t\trepeat_never: \"決して\",\r\n\t\trepeat_daily: \"毎日\",\r\n\t\trepeat_workdays: \"毎営業日\",\r\n\t\trepeat_weekly: \"毎週\",\r\n\t\trepeat_monthly: \"毎月\",\r\n\t\trepeat_yearly: \"毎年\",\r\n\t\trepeat_custom: \"カスタム\",\r\n\t\trepeat_freq_day: \"日\",\r\n\t\trepeat_freq_week: \"週\",\r\n\t\trepeat_freq_month: \"月\",\r\n\t\trepeat_freq_year: \"年\",\r\n\t\trepeat_on_date: \"日にち\",\r\n\t\trepeat_ends: \"終了\",\r\n\r\n\t\tmonth_for_recurring: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_for_recurring: [\"日曜日\", \"月曜日\", \"火曜日\", \"水曜日\", \"木曜日\", \"金曜日\", \"土曜日\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default class LocaleManager{\r\n\tconstructor(config){\r\n\t\tthis._locales = {};\r\n\t\tfor(const i in config){\r\n\t\t\tthis._locales[i] = config[i];\r\n\t\t}\r\n\t}\r\n\r\n\taddLocale(name, locale) {\r\n\t\tthis._locales[name] = locale;\r\n\t}\r\n\r\n\tgetLocale(name) {\r\n\t\treturn this._locales[name];\r\n\t}\r\n}","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Mon\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"I dag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uke\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny hendelse\",\r\n\t\ticon_save: \"Lagre\",\r\n\t\ticon_cancel: \"Avbryt\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Rediger\",\r\n\t\ticon_delete: \"Slett\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Hendelsen vil bli slettet permanent. Er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du forandre hele dette settet av repeterende hendelser?\",\r\n\t\tsection_recurring: \"Repeter hendelsen\",\r\n\t\tbutton_recurring: \"Av\",\r\n\t\tbutton_recurring_open: \"På\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Redigere en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\",\r\n\t\trepeat_radio_week: \"Ukentlig\",\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Alle hverdager\",\r\n\t\trepeat_week: \" Gjentas hver\",\r\n\t\trepeat_text_week_count: \"uke på:\",\r\n\t\trepeat_radio_month_type: \"På hver\",\r\n\t\trepeat_radio_month_start: \"På\",\r\n\t\trepeat_text_month_day: \"dag hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"på\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Ingen sluttdato\",\r\n\t\trepeat_text_occurences_count: \"forekomst\",\r\n\t\trepeat_radio_end3: \"Stop den\",\r\n\t\trepeat_radio_end2: \"Etter\",\r\n\r\n\t\trepeat_never: \"Aldri\",\r\n\t\trepeat_daily: \"Hver dag\",\r\n\t\trepeat_workdays: \"Hver ukedag\",\r\n\t\trepeat_weekly: \"Hver uke\",\r\n\t\trepeat_monthly: \"Hver måned\",\r\n\t\trepeat_yearly: \"Hvert år\",\r\n\t\trepeat_custom: \"Tilpasset\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Uke\",\r\n\t\trepeat_freq_month: \"Måned\",\r\n\t\trepeat_freq_year: \"År\",\r\n\t\trepeat_on_date: \"På dato\",\r\n\t\trepeat_ends: \"Slutter\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tday_for_recurring: [\"Sondag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Maart\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Augustus\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"mrt\", \"Apr\", \"Mei\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Zondag\", \"Maandag\", \"Dinsdag\", \"Woensdag\", \"Donderdag\", \"Vrijdag\", \"Zaterdag\"],\r\n\t\tday_short: [\"Zo\", \"Ma\", \"Di\", \"Wo\", \"Do\", \"Vr\", \"Za\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Vandaag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Week\",\r\n\t\tmonth_tab: \"Maand\",\r\n\t\tnew_event: \"Nieuw item\",\r\n\t\ticon_save: \"Opslaan\",\r\n\t\ticon_cancel: \"Annuleren\",\r\n\t\ticon_details: \"Details\",\r\n\t\ticon_edit: \"Bewerken\",\r\n\t\ticon_delete: \"Verwijderen\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Item zal permanent worden verwijderd, doorgaan?\",\r\n\t\tsection_description: \"Beschrijving\",\r\n\t\tsection_time: \"Tijd periode\",\r\n\t\tfull_day: \"Hele dag\",\r\n\r\n\t\tconfirm_recurring: \"Wilt u alle terugkerende items bijwerken?\",\r\n\t\tsection_recurring: \"Item herhalen\",\r\n\t\tbutton_recurring: \"Uit\",\r\n\t\tbutton_recurring_open: \"Aan\",\r\n\t\tbutton_edit_series: \"Bewerk de serie\",\r\n\t\tbutton_edit_occurrence: \"Bewerk een kopie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Omschrijving\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Jaar\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabel\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dagelijks\",\r\n\t\trepeat_radio_week: \"Wekelijks\",\r\n\t\trepeat_radio_month: \"Maandelijks\",\r\n\t\trepeat_radio_year: \"Jaarlijks\",\r\n\t\trepeat_radio_day_type: \"Elke\",\r\n\t\trepeat_text_day_count: \"dag(en)\",\r\n\t\trepeat_radio_day_type2: \"Elke werkdag\",\r\n\t\trepeat_week: \" Herhaal elke\",\r\n\t\trepeat_text_week_count: \"week op de volgende dagen:\",\r\n\t\trepeat_radio_month_type: \"Herhaal\",\r\n\t\trepeat_radio_month_start: \"Op\",\r\n\t\trepeat_text_month_day: \"dag iedere\",\r\n\t\trepeat_text_month_count: \"maanden\",\r\n\t\trepeat_text_month_count2_before: \"iedere\",\r\n\t\trepeat_text_month_count2_after: \"maanden\",\r\n\t\trepeat_year_label: \"Op\",\r\n\t\tselect_year_day2: \"van\",\r\n\t\trepeat_text_year_day: \"dag\",\r\n\t\tselect_year_month: \"maand\",\r\n\t\trepeat_radio_end: \"Geen eind datum\",\r\n\t\trepeat_text_occurences_count: \"keren\",\r\n\t\trepeat_radio_end3: \"Eindigd per\",\r\n\t\trepeat_radio_end2: \"Na\",\r\n\r\n\t\trepeat_never: \"Nooit\",\r\n\t\trepeat_daily: \"Elke dag\",\r\n\t\trepeat_workdays: \"Elke werkdag\",\r\n\t\trepeat_weekly: \"Elke week\",\r\n\t\trepeat_monthly: \"Elke maand\",\r\n\t\trepeat_yearly: \"Elk jaar\",\r\n\t\trepeat_custom: \"Aangepast\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Week\",\r\n\t\trepeat_freq_month: \"Maand\",\r\n\t\trepeat_freq_year: \"Jaar\",\r\n\t\trepeat_on_date: \"Op datum\",\r\n\t\trepeat_ends: \"Eindigt\",\r\n\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Maart\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Augustus\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Zondag\", \"Maandag\", \"Dinsdag\", \"Woensdag\", \"Donderdag\", \"Vrijdag\", \"Zaterdag\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Man\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uke\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny\",\r\n\t\ticon_save: \"Lagre\",\r\n\t\ticon_cancel: \"Avbryt\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Endre\",\r\n\t\ticon_delete: \"Slett\",\r\n\t\tconfirm_closing: \"Endringer blir ikke lagret, er du sikker?\", //Endringer blir ikke lagret, er du sikker?\r\n\t\tconfirm_deleting: \"Oppføringen vil bli slettet, er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\t\tfull_day: \"Full dag\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du endre hele settet med repeterende oppføringer?\",\r\n\t\tsection_recurring: \"Repeterende oppføring\",\r\n\t\tbutton_recurring: \"Ikke aktiv\",\r\n\t\tbutton_recurring_open: \"Aktiv\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Redigere en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Ukentlig\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Hver arbeidsdag\",\r\n\t\trepeat_week: \" Gjenta hver\",\r\n\t\trepeat_text_week_count: \"uke neste dager:\",\r\n\t\trepeat_radio_month_type: \"Gjenta\",\r\n\t\trepeat_radio_month_start: \"På\",\r\n\t\trepeat_text_month_day: \"dag hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"På\",\r\n\t\tselect_year_day2: \"av\",\r\n\t\trepeat_text_year_day: \"dag\",\r\n\t\tselect_year_month: \"måned\",\r\n\t\trepeat_radio_end: \"Ingen sluttdato\",\r\n\t\trepeat_text_occurences_count: \"forekomster\",\r\n\t\trepeat_radio_end2: \"Etter\",\r\n\t\trepeat_radio_end3: \"Slutt innen\",\r\n\r\n\t\trepeat_never: \"Aldri\",\r\n\t\trepeat_daily: \"Hver dag\",\r\n\t\trepeat_workdays: \"Hver ukedag\",\r\n\t\trepeat_weekly: \"Hver uke\",\r\n\t\trepeat_monthly: \"Hver måned\",\r\n\t\trepeat_yearly: \"Hvert år\",\r\n\t\trepeat_custom: \"Tilpasset\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Uke\",\r\n\t\trepeat_freq_month: \"Måned\",\r\n\t\trepeat_freq_year: \"År\",\r\n\t\trepeat_on_date: \"På dato\",\r\n\t\trepeat_ends: \"Slutter\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tday_for_recurring: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Styczeń\", \"Luty\", \"Marzec\", \"Kwiecień\", \"Maj\", \"Czerwiec\", \"Lipiec\", \"Sierpień\", \"Wrzesień\", \"Październik\", \"Listopad\", \"Grudzień\"],\r\n\t\tmonth_short: [\"Sty\", \"Lut\", \"Mar\", \"Kwi\", \"Maj\", \"Cze\", \"Lip\", \"Sie\", \"Wrz\", \"Paź\", \"Lis\", \"Gru\"],\r\n\t\tday_full: [\"Niedziela\", \"Poniedziałek\", \"Wtorek\", \"Środa\", \"Czwartek\", \"Piątek\", \"Sobota\"],\r\n\t\tday_short: [\"Nie\", \"Pon\", \"Wto\", \"Śro\", \"Czw\", \"Pią\", \"Sob\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dziś\",\r\n\t\tday_tab: \"Dzień\",\r\n\t\tweek_tab: \"Tydzień\",\r\n\t\tmonth_tab: \"Miesiąc\",\r\n\t\tnew_event: \"Nowe zdarzenie\",\r\n\t\ticon_save: \"Zapisz\",\r\n\t\ticon_cancel: \"Anuluj\",\r\n\t\ticon_details: \"Szczegóły\",\r\n\t\ticon_edit: \"Edytuj\",\r\n\t\ticon_delete: \"Usuń\",\r\n\t\tconfirm_closing: \"\", //Zmiany zostaną usunięte, jesteś pewien?\r\n\t\tconfirm_deleting: \"Zdarzenie zostanie usunięte na zawsze, kontynuować?\",\r\n\t\tsection_description: \"Opis\",\r\n\t\tsection_time: \"Okres czasu\",\r\n\t\tfull_day: \"Cały dzień\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Czy chcesz edytować cały zbiór powtarzających się zdarzeń?\",\r\n\t\tsection_recurring: \"Powtórz zdarzenie\",\r\n\t\tbutton_recurring: \"Nieaktywne\",\r\n\t\tbutton_recurring_open: \"Aktywne\",\r\n\t\tbutton_edit_series: \"Edytuj serię\",\r\n\t\tbutton_edit_occurrence: \"Edytuj kopię\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Opis\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabela\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Codziennie\",\r\n\t\trepeat_radio_week: \"Co tydzie\",\r\n\t\trepeat_radio_month: \"Co miesic\",\r\n\t\trepeat_radio_year: \"Co rok\",\r\n\t\trepeat_radio_day_type: \"Kadego\",\r\n\t\trepeat_text_day_count: \"dnia\",\r\n\t\trepeat_radio_day_type2: \"Kadego dnia roboczego\",\r\n\t\trepeat_week: \" Powtarzaj kadego\",\r\n\t\trepeat_text_week_count: \"tygodnia w dni:\",\r\n\t\trepeat_radio_month_type: \"Powtrz\",\r\n\t\trepeat_radio_month_start: \"W\",\r\n\t\trepeat_text_month_day: \"dnia kadego\",\r\n\t\trepeat_text_month_count: \"miesica\",\r\n\t\trepeat_text_month_count2_before: \"kadego\",\r\n\t\trepeat_text_month_count2_after: \"miesica\",\r\n\t\trepeat_year_label: \"W\",\r\n\t\tselect_year_day2: \"miesica\",\r\n\t\trepeat_text_year_day: \"dnia miesica\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Bez daty kocowej\",\r\n\t\trepeat_text_occurences_count: \"wystpieniu/ach\",\r\n\t\trepeat_radio_end3: \"Zakocz w\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\r\n\t\trepeat_never: \"Nigdy\",\r\n\t\trepeat_daily: \"Codziennie\",\r\n\t\trepeat_workdays: \"Każdy dzień roboczy\",\r\n\t\trepeat_weekly: \"Co tydzień\",\r\n\t\trepeat_monthly: \"Co miesiąc\",\r\n\t\trepeat_yearly: \"Co rok\",\r\n\t\trepeat_custom: \"Niestandardowy\",\r\n\t\trepeat_freq_day: \"Dzień\",\r\n\t\trepeat_freq_week: \"Tydzień\",\r\n\t\trepeat_freq_month: \"Miesiąc\",\r\n\t\trepeat_freq_year: \"Rok\",\r\n\t\trepeat_on_date: \"W dniu\",\r\n\t\trepeat_ends: \"Kończy się\",\r\n\r\n\t\tmonth_for_recurring: [\"Stycznia\", \"Lutego\", \"Marca\", \"Kwietnia\", \"Maja\", \"Czerwca\", \"Lipca\", \"Sierpnia\", \"Wrzenia\", \"Padziernka\", \"Listopada\", \"Grudnia\"],\r\n\t\tday_for_recurring: [\"Niedziela\", \"Poniedziaek\", \"Wtorek\", \"roda\", \"Czwartek\", \"Pitek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","/*\r\n\r\n TRANSLATION BY MATTHEUS PIROVANI RORIZ GONЗALVES\r\n\r\n mattheusroriz@hotmail.com / mattheus.pirovani@gmail.com /\r\n\r\n www.atrixian.com.br\r\n\r\n */\r\n\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Janeiro\", \"Fevereiro\", \"Março\", \"Abril\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"],\r\n\t\tmonth_short: [\"Jan\", \"Fev\", \"Mar\", \"Abr\", \"Mai\", \"Jun\", \"Jul\", \"Ago\", \"Set\", \"Out\", \"Nov\", \"Dez\"],\r\n\t\tday_full: [\"Domingo\", \"Segunda\", \"Terça\", \"Quarta\", \"Quinta\", \"Sexta\", \"Sábado\"],\r\n\t\tday_short: [\"Dom\", \"Seg\", \"Ter\", \"Qua\", \"Qui\", \"Sex\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hoje\",\r\n\t\tday_tab: \"Dia\",\r\n\t\tweek_tab: \"Semana\",\r\n\t\tmonth_tab: \"Mês\",\r\n\t\tnew_event: \"Novo evento\",\r\n\t\ticon_save: \"Salvar\",\r\n\t\ticon_cancel: \"Cancelar\",\r\n\t\ticon_details: \"Detalhes\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Deletar\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Tem certeza que deseja excluir?\",\r\n\t\tsection_description: \"Descrição\",\r\n\t\tsection_time: \"Período de tempo\",\r\n\t\tfull_day: \"Dia inteiro\",\r\n\r\n\t\tconfirm_recurring: \"Deseja editar todos esses eventos repetidos?\",\r\n\t\tsection_recurring: \"Repetir evento\",\r\n\t\tbutton_recurring: \"Desabilitar\",\r\n\t\tbutton_recurring_open: \"Habilitar\",\r\n\t\tbutton_edit_series: \"Editar a série\",\r\n\t\tbutton_edit_occurrence: \"Editar uma cópia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dia\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descrição\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Ano\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dia\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grade\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diário\",\r\n\t\trepeat_radio_week: \"Semanal\",\r\n\t\trepeat_radio_month: \"Mensal\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia(s)\",\r\n\t\trepeat_radio_day_type2: \"Cada trabalho diário\",\r\n\t\trepeat_week: \" Repita cada\",\r\n\t\trepeat_text_week_count: \"semana:\",\r\n\t\trepeat_radio_month_type: \"Repetir\",\r\n\t\trepeat_radio_month_start: \"Em\",\r\n\t\trepeat_text_month_day: \"todo dia\",\r\n\t\trepeat_text_month_count: \"mês\",\r\n\t\trepeat_text_month_count2_before: \"todo\",\r\n\t\trepeat_text_month_count2_after: \"mês\",\r\n\t\trepeat_year_label: \"Em\",\r\n\t\tselect_year_day2: \"of\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mês\",\r\n\t\trepeat_radio_end: \"Sem data final\",\r\n\t\trepeat_text_occurences_count: \"ocorrências\",\r\n\t\trepeat_radio_end3: \"Fim\",\r\n\t\trepeat_radio_end2: \"Depois\",\r\n\r\n\t\trepeat_never: \"Nunca\",\r\n\t\trepeat_daily: \"Todos os dias\",\r\n\t\trepeat_workdays: \"Todos os dias úteis\",\r\n\t\trepeat_weekly: \"Toda semana\",\r\n\t\trepeat_monthly: \"Todo mês\",\r\n\t\trepeat_yearly: \"Todo ano\",\r\n\t\trepeat_custom: \"Personalizado\",\r\n\t\trepeat_freq_day: \"Dia\",\r\n\t\trepeat_freq_week: \"Semana\",\r\n\t\trepeat_freq_month: \"Mês\",\r\n\t\trepeat_freq_year: \"Ano\",\r\n\t\trepeat_on_date: \"Na data\",\r\n\t\trepeat_ends: \"Termina\",\r\n\r\n\t\tmonth_for_recurring: [\"Janeiro\", \"Fevereiro\", \"Março\", \"Abril\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"],\r\n\t\tday_for_recurring: [\"Domingo\", \"Segunda\", \"Terça\", \"Quarta\", \"Quinta\", \"Sexta\", \"Sábado\"]\r\n\t}\r\n};\r\n\r\n\r\n","/*\r\n\tTraducere de Ovidiu Lixandru: http://www.madball.ro\r\n */\r\n\r\nexport default {\r\n\tdate:{\r\n\t\tmonth_full:[\"Ianuarie\", \"Februarie\", \"Martie\", \"Aprilie\", \"Mai\", \"Iunie\", \"Iulie\", \"August\", \"Septembrie\", \"Octombrie\", \"November\", \"December\"],\r\n\t\tmonth_short:[\"Ian\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Iun\", \"Iul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n\t\tday_full:[\"Duminica\", \"Luni\", \"Marti\", \"Miercuri\", \"Joi\", \"Vineri\", \"Sambata\"],\r\n\t\tday_short:[\"Du\", \"Lu\", \"Ma\", \"Mi\", \"Jo\", \"Vi\", \"Sa\"]\r\n\t},\r\n\tlabels:{\r\n\t\tdhx_cal_today_button:\"Astazi\",\r\n\t\tday_tab:\"Zi\",\r\n\t\tweek_tab:\"Saptamana\",\r\n\t\tmonth_tab:\"Luna\",\r\n\t\tnew_event:\"Eveniment nou\",\r\n\t\ticon_save:\"Salveaza\",\r\n\t\ticon_cancel:\"Anuleaza\",\r\n\t\ticon_details:\"Detalii\",\r\n\t\ticon_edit:\"Editeaza\",\r\n\t\ticon_delete:\"Sterge\",\r\n\t\tconfirm_closing:\"Schimbarile nu vor fi salvate, esti sigur?\",//Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting:\"Evenimentul va fi sters permanent, esti sigur?\",\r\n\t\tsection_description:\"Descriere\",\r\n\t\tsection_time:\"Interval\",\r\n\t\tfull_day:\"Toata ziua\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring:\"Vrei sa editezi toata seria de evenimente repetate?\",\r\n\t\tsection_recurring:\"Repetare\",\r\n\t\tbutton_recurring:\"Dezactivata\",\r\n\t\tbutton_recurring_open:\"Activata\",\r\n\t\tbutton_edit_series: \"Editeaza serie\",\r\n\t\tbutton_edit_occurrence: \"Editeaza doar intrare\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"Agenda\",\r\n\t\tdate:\"Data\",\r\n\t\tdescription:\"Descriere\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"An\",\r\n\r\n\t\t/* week agenda extension */\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Lista\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Zilnic\",\r\n\t\trepeat_radio_week: \"Saptamanal\",\r\n\t\trepeat_radio_month: \"Lunar\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"La fiecare\",\r\n\t\trepeat_text_day_count: \"zi(le)\",\r\n\t\trepeat_radio_day_type2: \"Fiecare zi lucratoare\",\r\n\t\trepeat_week: \" Repeta la fiecare\",\r\n\t\trepeat_text_week_count: \"saptamana in urmatoarele zile:\",\r\n\t\trepeat_radio_month_type: \"Repeta in\",\r\n\t\trepeat_radio_month_start: \"In a\",\r\n\t\trepeat_text_month_day: \"zi la fiecare\",\r\n\t\trepeat_text_month_count: \"luni\",\r\n\t\trepeat_text_month_count2_before: \"la fiecare\",\r\n\t\trepeat_text_month_count2_after: \"luni\",\r\n\t\trepeat_year_label: \"In\",\r\n\t\tselect_year_day2: \"a lunii\",\r\n\t\trepeat_text_year_day: \"zi a lunii\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Fara data de sfarsit\",\r\n\t\trepeat_text_occurences_count: \"evenimente\",\r\n\t\trepeat_radio_end3: \"La data\",\r\n\t\trepeat_radio_end2: \"Dupa\",\r\n\r\n\t\trepeat_never: \"Niciodată\",\r\n\t\trepeat_daily: \"În fiecare zi\",\r\n\t\trepeat_workdays: \"În fiecare zi lucrătoare\",\r\n\t\trepeat_weekly: \"În fiecare săptămână\",\r\n\t\trepeat_monthly: \"În fiecare lună\",\r\n\t\trepeat_yearly: \"În fiecare an\",\r\n\t\trepeat_custom: \"Personalizat\",\r\n\t\trepeat_freq_day: \"Zi\",\r\n\t\trepeat_freq_week: \"Săptămână\",\r\n\t\trepeat_freq_month: \"Lună\",\r\n\t\trepeat_freq_year: \"An\",\r\n\t\trepeat_on_date: \"La data\",\r\n\t\trepeat_ends: \"Se termină\",\r\n\r\n\t\tmonth_for_recurring: [\"Ianuarie\", \"Februarie\", \"Martie\", \"Aprilie\", \"Mai\", \"Iunie\", \"Iulie\", \"August\", \"Septembrie\", \"Octombrie\", \"Noiembrie\", \"Decembrie\"],\r\n\t\tday_for_recurring: [\"Duminica\", \"Luni\", \"Marti\", \"Miercuri\", \"Joi\", \"Vineri\", \"Sambata\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Январь\", \"Февраль\", \"Март\", \"Апрель\", \"Maй\", \"Июнь\", \"Июль\", \"Август\", \"Сентябрь\", \"Oктябрь\", \"Ноябрь\", \"Декабрь\"],\r\n\t\tmonth_short: [\"Янв\", \"Фев\", \"Maр\", \"Aпр\", \"Maй\", \"Июн\", \"Июл\", \"Aвг\", \"Сен\", \"Окт\", \"Ноя\", \"Дек\"],\r\n\t\tday_full: [ \"Воскресенье\", \"Понедельник\", \"Вторник\", \"Среда\", \"Четверг\", \"Пятница\", \"Суббота\"],\r\n\t\tday_short: [\"Вс\", \"Пн\", \"Вт\", \"Ср\", \"Чт\", \"Пт\", \"Сб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сегодня\",\r\n\t\tday_tab: \"День\",\r\n\t\tweek_tab: \"Неделя\",\r\n\t\tmonth_tab: \"Месяц\",\r\n\t\tnew_event: \"Новое событие\",\r\n\t\ticon_save: \"Сохранить\",\r\n\t\ticon_cancel: \"Отменить\",\r\n\t\ticon_details: \"Детали\",\r\n\t\ticon_edit: \"Изменить\",\r\n\t\ticon_delete: \"Удалить\",\r\n\t\tconfirm_closing: \"\", //Ваши изменения будут потеряны, продолжить?\r\n\t\tconfirm_deleting: \"Событие будет удалено безвозвратно, продолжить?\",\r\n\t\tsection_description: \"Описание\",\r\n\t\tsection_time: \"Период времени\",\r\n\t\tfull_day: \"Весь день\",\r\n\r\n\t\tconfirm_recurring: \"Вы хотите изменить всю серию повторяющихся событий?\",\r\n\t\tsection_recurring: \"Повторение\",\r\n\t\tbutton_recurring: \"Отключено\",\r\n\t\tbutton_recurring_open: \"Включено\",\r\n\t\tbutton_edit_series: \"Редактировать серию\",\r\n\t\tbutton_edit_occurrence: \"Редактировать экземпляр\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Список\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Описание\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Год\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Список\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Таблица\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"День\",\r\n\t\trepeat_radio_week: \"Неделя\",\r\n\t\trepeat_radio_month: \"Месяц\",\r\n\t\trepeat_radio_year: \"Год\",\r\n\t\trepeat_radio_day_type: \"Каждый\",\r\n\t\trepeat_text_day_count: \"день\",\r\n\t\trepeat_radio_day_type2: \"Каждый рабочий день\",\r\n\t\trepeat_week: \" Повторять каждую\",\r\n\t\trepeat_text_week_count: \"неделю , в:\",\r\n\t\trepeat_radio_month_type: \"Повторять\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" числа каждый \",\r\n\t\trepeat_text_month_count: \"месяц\",\r\n\t\trepeat_text_month_count2_before: \"каждый \",\r\n\t\trepeat_text_month_count2_after: \"месяц\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"день\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без даты окончания\",\r\n\t\trepeat_text_occurences_count: \"повторений\",\r\n\t\trepeat_radio_end3: \"До \",\r\n\t\trepeat_radio_end2: \"\",\r\n\r\n\t\trepeat_never: \"Никогда\",\r\n\t\trepeat_daily: \"Каждый день\",\r\n\t\trepeat_workdays: \"Каждый будний день\",\r\n\t\trepeat_weekly: \"Каждую неделю\",\r\n\t\trepeat_monthly: \"Каждый месяц\",\r\n\t\trepeat_yearly: \"Каждый год\",\r\n\t\trepeat_custom: \"Настроить\",\r\n\t\trepeat_freq_day: \"День\",\r\n\t\trepeat_freq_week: \"Неделя\",\r\n\t\trepeat_freq_month: \"Месяц\",\r\n\t\trepeat_freq_year: \"Год\",\r\n\t\trepeat_on_date: \"В дату\",\r\n\t\trepeat_ends: \"Заканчивается\",\r\n\r\n\t\tmonth_for_recurring: [\"Января\", \"Февраля\", \"Марта\", \"Апреля\", \"Мая\", \"Июня\", \"Июля\", \"Августа\", \"Сентября\", \"Октября\", \"Ноября\", \"Декабря\"],\r\n\t\tday_for_recurring: [\"Воскресенье\", \"Понедельник\", \"Вторник\", \"Среду\", \"Четверг\", \"Пятницу\", \"Субботу\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Marec\", \"April\", \"Maj\", \"Junij\", \"Julij\", \"Avgust\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Nedelja\", \"Ponedeljek\", \"Torek\", \"Sreda\", \"Četrtek\", \"Petek\", \"Sobota\"],\r\n\t\tday_short: [\"Ned\", \"Pon\", \"Tor\", \"Sre\", \"Čet\", \"Pet\", \"Sob\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Danes\",\r\n\t\tday_tab: \"Dan\",\r\n\t\tweek_tab: \"Teden\",\r\n\t\tmonth_tab: \"Mesec\",\r\n\t\tnew_event: \"Nov dogodek\",\r\n\t\ticon_save: \"Shrani\",\r\n\t\ticon_cancel: \"Prekliči\",\r\n\t\ticon_details: \"Podrobnosti\",\r\n\t\ticon_edit: \"Uredi\",\r\n\t\ticon_delete: \"Izbriši\",\r\n\t\tconfirm_closing: \"\", //Spremembe ne bodo shranjene. Želite nadaljevati ?\r\n\t\tconfirm_deleting: \"Dogodek bo izbrisan. Želite nadaljevati?\",\r\n\t\tsection_description: \"Opis\",\r\n\t\tsection_time: \"Časovni okvir\",\r\n\t\tfull_day: \"Ves dan\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Želite urediti celoten set ponavljajočih dogodkov?\",\r\n\t\tsection_recurring: \"Ponovi dogodek\",\r\n\t\tbutton_recurring: \"Onemogočeno\",\r\n\t\tbutton_recurring_open: \"Omogočeno\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Edit occurrence\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Zadeva\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Opis\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Leto\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Zadeva\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Miza\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dnevno\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Tedensko\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Mesečno\",\r\n\t\trepeat_radio_year: \"Letno\",\r\n\t\trepeat_radio_day_type: \"Vsak\",\r\n\t\trepeat_text_day_count: \"dan\",\r\n\t\trepeat_radio_day_type2: \"Vsak delovni dan\",\r\n\t\trepeat_week: \" Ponavljaj vsak\",\r\n\t\trepeat_text_week_count: \"teden na naslednje dni:\",\r\n\t\trepeat_radio_month_type: \"Ponavljaj\",\r\n\t\trepeat_radio_month_start: \"Na\",\r\n\t\trepeat_text_month_day: \"dan vsak\",\r\n\t\trepeat_text_month_count: \"mesec\",\r\n\t\trepeat_text_month_count2_before: \"vsak\",\r\n\t\trepeat_text_month_count2_after: \"mesec\",\r\n\t\trepeat_year_label: \"Na\",\r\n\t\tselect_year_day2: \"od\",\r\n\t\trepeat_text_year_day: \"dan\",\r\n\t\tselect_year_month: \"mesec\",\r\n\t\trepeat_radio_end: \"Brez končnega datuma\",\r\n\t\trepeat_text_occurences_count: \"pojavitve\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\t\trepeat_radio_end3: \"Končaj do\",\r\n\r\n\t\trepeat_never: \"Nikoli\",\r\n\t\trepeat_daily: \"Vsak dan\",\r\n\t\trepeat_workdays: \"Vsak delovni dan\",\r\n\t\trepeat_weekly: \"Vsak teden\",\r\n\t\trepeat_monthly: \"Vsak mesec\",\r\n\t\trepeat_yearly: \"Vsako leto\",\r\n\t\trepeat_custom: \"Po meri\",\r\n\t\trepeat_freq_day: \"Dan\",\r\n\t\trepeat_freq_week: \"Teden\",\r\n\t\trepeat_freq_month: \"Mesec\",\r\n\t\trepeat_freq_year: \"Leto\",\r\n\t\trepeat_on_date: \"Na datum\",\r\n\t\trepeat_ends: \"Konča se\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"Marec\", \"April\", \"Maj\", \"Junij\", \"Julij\", \"Avgust\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Nedelja\", \"Ponedeljek\", \"Torek\", \"Sreda\", \"Četrtek\", \"Petek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Január\", \"Február\", \"Marec\", \"Apríl\", \"Máj\", \"Jún\", \"Júl\", \"August\", \"September\", \"Október\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Máj\", \"Jún\", \"Júl\", \"Aug\", \"Sept\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Nedeľa\", \"Pondelok\", \"Utorok\", \"Streda\", \"Štvrtok\", \"Piatok\", \"Sobota\"],\r\n\t\tday_short: [\"Ne\", \"Po\", \"Ut\", \"St\", \"Št\", \"Pi\", \"So\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dnes\",\r\n\t\tday_tab: \"Deň\",\r\n\t\tweek_tab: \"Týždeň\",\r\n\t\tmonth_tab: \"Mesiac\",\r\n\t\tnew_event: \"Nová udalosť\",\r\n\t\ticon_save: \"Uložiť\",\r\n\t\ticon_cancel: \"Späť\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edituj\",\r\n\t\ticon_delete: \"Zmazať\",\r\n\t\tconfirm_closing: \"Vaše zmeny nebudú uložené. Skutočne?\", //Vaše změny budou ztraceny, opravdu ?\r\n\t\tconfirm_deleting: \"Udalosť bude natrvalo vymazaná. Skutočne?\",\r\n\t\tsection_description: \"Poznámky\",\r\n\t\tsection_time: \"Doba platnosti\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Prajete si upraviť celú radu opakovaných udalostí?\",\r\n\t\tsection_recurring: \"Opakovanie udalosti\",\r\n\t\tbutton_recurring: \"Vypnuté\",\r\n\t\tbutton_recurring_open: \"Zapnuté\",\r\n\t\tbutton_edit_series: \"Upraviť opakovania\",\r\n\t\tbutton_edit_occurrence: \"Upraviť inštancie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Program\",\r\n\t\tdate: \"Dátum\",\r\n\t\tdescription: \"Poznámka\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\t\tfull_day: \"Celý deň\", // Full day\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Program\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Mriežka\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Denne\",\r\n\t\trepeat_radio_week: \"Týždenne\",\r\n\t\trepeat_radio_month: \"Mesaène\",\r\n\t\trepeat_radio_year: \"Roène\",\r\n\t\trepeat_radio_day_type: \"Každý\",\r\n\t\trepeat_text_day_count: \"deò\",\r\n\t\trepeat_radio_day_type2: \"Každý prac. deò\",\r\n\t\trepeat_week: \"Opakova každý\",\r\n\t\trepeat_text_week_count: \"týždeò v dòoch:\",\r\n\t\trepeat_radio_month_type: \"Opakova\",\r\n\t\trepeat_radio_month_start: \"On\",\r\n\t\trepeat_text_month_day: \"deò každý\",\r\n\t\trepeat_text_month_count: \"mesiac\",\r\n\t\trepeat_text_month_count2_before: \"každý\",\r\n\t\trepeat_text_month_count2_after: \"mesiac\",\r\n\t\trepeat_year_label: \"On\",\r\n\t\tselect_year_day2: \"poèas\",\r\n\t\trepeat_text_year_day: \"deò\",\r\n\t\tselect_year_month: \"mesiac\",\r\n\t\trepeat_radio_end: \"Bez dátumu ukonèenia\",\r\n\t\trepeat_text_occurences_count: \"udalostiach\",\r\n\t\trepeat_radio_end3: \"Ukonèi\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\r\n\t\trepeat_never: \"Nikdy\",\r\n\t\trepeat_daily: \"Každý deň\",\r\n\t\trepeat_workdays: \"Každý pracovný deň\",\r\n\t\trepeat_weekly: \"Každý týždeň\",\r\n\t\trepeat_monthly: \"Každý mesiac\",\r\n\t\trepeat_yearly: \"Každý rok\",\r\n\t\trepeat_custom: \"Vlastné\",\r\n\t\trepeat_freq_day: \"Deň\",\r\n\t\trepeat_freq_week: \"Týždeň\",\r\n\t\trepeat_freq_month: \"Mesiac\",\r\n\t\trepeat_freq_year: \"Rok\",\r\n\t\trepeat_on_date: \"Na dátum\",\r\n\t\trepeat_ends: \"Koniec\",\r\n\r\n\t\tmonth_for_recurring: [\"Január\", \"Február\", \"Marec\", \"Apríl\", \"Máj\", \"Jún\", \"Júl\", \"August\", \"September\", \"Október\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Nede¾a\", \"Pondelok\", \"Utorok\", \"Streda\", \"Štvrtok\", \"Piatok\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Mars\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"Augusti\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Söndag\", \"Måndag\", \"Tisdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lördag\"],\r\n\t\tday_short: [\"Sön\", \"Mån\", \"Tis\", \"Ons\", \"Tor\", \"Fre\", \"Lör\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Vecka\",\r\n\t\tmonth_tab: \"Månad\",\r\n\t\tnew_event: \"Ny händelse\",\r\n\t\ticon_save: \"Spara\",\r\n\t\ticon_cancel: \"Ångra\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Ändra\",\r\n\t\ticon_delete: \"Ta bort\",\r\n\t\tconfirm_closing: \"\", //Dina förändingar kommer gå förlorade, är du säker?\r\n\t\tconfirm_deleting: \"Är du säker på att du vill ta bort händelsen permanent?\",\r\n\t\tsection_description: \"Beskrivning\",\r\n\t\tsection_time: \"Tid\",\r\n\t\tfull_day: \"Hela dagen\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vill du redigera hela serien med repeterande händelser?\",\r\n\t\tsection_recurring: \"Upprepa händelse\",\r\n\t\tbutton_recurring: \"Inaktiverat\",\r\n\t\tbutton_recurring_open: \"Aktiverat\",\r\n\t\tbutton_edit_series: \"Redigera serien\",\r\n\t\tbutton_edit_occurrence: \"Redigera en kopia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dagordning\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Beskrivning\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dagordning\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Galler\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Dra för att skapa ny\",\r\n\t\tdrag_to_move:\"Dra för att flytta\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dagligen\",\r\n\t\trepeat_radio_week: \"Veckovis\",\r\n\t\trepeat_radio_month: \"Månadsvis\",\r\n\t\trepeat_radio_year: \"Årligen\",\r\n\t\trepeat_radio_day_type: \"Var\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Varje arbetsdag\",\r\n\t\trepeat_week: \" Upprepa var\",\r\n\t\trepeat_text_week_count: \"vecka dessa dagar:\",\r\n\t\trepeat_radio_month_type: \"Upprepa\",\r\n\t\trepeat_radio_month_start: \"Den\",\r\n\t\trepeat_text_month_day: \"dagen var\",\r\n\t\trepeat_text_month_count: \"månad\",\r\n\t\trepeat_text_month_count2_before: \"var\",\r\n\t\trepeat_text_month_count2_after: \"månad\",\r\n\t\trepeat_year_label: \"Den\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"månad\",\r\n\t\trepeat_radio_end: \"Inget slutdatum\",\r\n\t\trepeat_text_occurences_count: \"upprepningar\",\r\n\t\trepeat_radio_end3: \"Sluta efter\",\r\n\t\trepeat_radio_end2: \"Efter\",\r\n\r\n\t\trepeat_never: \"Aldrig\",\r\n\t\trepeat_daily: \"Varje dag\",\r\n\t\trepeat_workdays: \"Varje vardag\",\r\n\t\trepeat_weekly: \"Varje vecka\",\r\n\t\trepeat_monthly: \"Varje månad\",\r\n\t\trepeat_yearly: \"Varje år\",\r\n\t\trepeat_custom: \"Anpassad\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Vecka\",\r\n\t\trepeat_freq_month: \"Månad\",\r\n\t\trepeat_freq_year: \"År\",\r\n\t\trepeat_on_date: \"På datum\",\r\n\t\trepeat_ends: \"Slutar\",\r\n\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Mars\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"Augusti\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Söndag\", \"Måndag\", \"Tisdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lördag\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Ocak\", \"Þubat\", \"Mart\", \"Nisan\", \"Mayýs\", \"Haziran\", \"Temmuz\", \"Aðustos\", \"Eylül\", \"Ekim\", \"Kasým\", \"Aralýk\"],\r\n\t\tmonth_short: [\"Oca\", \"Þub\", \"Mar\", \"Nis\", \"May\", \"Haz\", \"Tem\", \"Aðu\", \"Eyl\", \"Eki\", \"Kas\", \"Ara\"],\r\n\t\tday_full: [\"Pazar\", \"Pazartes,\", \"Salý\", \"Çarþamba\", \"Perþembe\", \"Cuma\", \"Cumartesi\"],\r\n\t\tday_short: [\"Paz\", \"Pts\", \"Sal\", \"Çar\", \"Per\", \"Cum\", \"Cts\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Bugün\",\r\n\t\tday_tab: \"Gün\",\r\n\t\tweek_tab: \"Hafta\",\r\n\t\tmonth_tab: \"Ay\",\r\n\t\tnew_event: \"Uygun\",\r\n\t\ticon_save: \"Kaydet\",\r\n\t\ticon_cancel: \"Ýptal\",\r\n\t\ticon_details: \"Detaylar\",\r\n\t\ticon_edit: \"Düzenle\",\r\n\t\ticon_delete: \"Sil\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Etkinlik silinecek, devam?\",\r\n\t\tsection_description: \"Açýklama\",\r\n\t\tsection_time: \"Zaman aralýðý\",\r\n\t\tfull_day: \"Tam gün\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Tüm tekrar eden etkinlikler silinecek, devam?\",\r\n\t\tsection_recurring: \"Etkinliði tekrarla\",\r\n\t\tbutton_recurring: \"Pasif\",\r\n\t\tbutton_recurring_open: \"Aktif\",\r\n\t\tbutton_edit_series: \"Dizi düzenleme\",\r\n\t\tbutton_edit_occurrence: \"Bir kopyasını düzenleyin\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Ajanda\",\r\n\t\tdate: \"Tarih\",\r\n\t\tdescription: \"Açýklama\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Yýl\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Ajanda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Izgara\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Günlük\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Haftalık\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Aylık\",\r\n\t\trepeat_radio_year: \"Yıllık\",\r\n\t\trepeat_radio_day_type: \"Her\",\r\n\t\trepeat_text_day_count: \"gün\",\r\n\t\trepeat_radio_day_type2: \"Her iş günü\",\r\n\t\trepeat_week: \" Tekrar her\",\r\n\t\trepeat_text_week_count: \"hafta şu günlerde:\",\r\n\t\trepeat_radio_month_type: \"Tekrar et\",\r\n\t\trepeat_radio_month_start: \"Tarihinde\",\r\n\t\trepeat_text_month_day: \"gün her\",\r\n\t\trepeat_text_month_count: \"ay\",\r\n\t\trepeat_text_month_count2_before: \"her\",\r\n\t\trepeat_text_month_count2_after: \"ay\",\r\n\t\trepeat_year_label: \"Tarihinde\",\r\n\t\tselect_year_day2: \"ayın\",\r\n\t\trepeat_text_year_day: \"günü\",\r\n\t\tselect_year_month: \"ay\",\r\n\t\trepeat_radio_end: \"Bitiş tarihi yok\",\r\n\t\trepeat_text_occurences_count: \"olay\",\r\n\t\trepeat_radio_end2: \"Sonra\",\r\n\t\trepeat_radio_end3: \"Tarihinde bitir\",\r\n\r\n\t\trepeat_never: \"Asla\",\r\n\t\trepeat_daily: \"Her gün\",\r\n\t\trepeat_workdays: \"Her iş günü\",\r\n\t\trepeat_weekly: \"Her hafta\",\r\n\t\trepeat_monthly: \"Her ay\",\r\n\t\trepeat_yearly: \"Her yıl\",\r\n\t\trepeat_custom: \"Özel\",\r\n\t\trepeat_freq_day: \"Gün\",\r\n\t\trepeat_freq_week: \"Hafta\",\r\n\t\trepeat_freq_month: \"Ay\",\r\n\t\trepeat_freq_year: \"Yıl\",\r\n\t\trepeat_on_date: \"Tarihinde\",\r\n\t\trepeat_ends: \"Biter\",\r\n\r\n\t\tmonth_for_recurring: [\"Ocak\", \"Şubat\", \"Mart\", \"Nisan\", \"Mayıs\", \"Haziran\", \"Temmuz\", \"Ağustos\", \"Eylül\", \"Ekim\", \"Kasım\", \"Aralık\"],\r\n\t\tday_for_recurring: [\"Pazar\", \"Pazartesi\", \"Salı\", \"Çarşamba\", \"Perşembe\", \"Cuma\", \"Cumartesi\"]\r\n\t}\r\n};","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Січень\", \"Лютий\", \"Березень\", \"Квітень\", \"Травень\", \"Червень\", \"Липень\", \"Серпень\", \"Вересень\", \"Жовтень\", \"Листопад\", \"Грудень\"],\r\n\t\tmonth_short: [\"Січ\", \"Лют\", \"Бер\", \"Кві\", \"Тра\", \"Чер\", \"Лип\", \"Сер\", \"Вер\", \"Жов\", \"Лис\", \"Гру\"],\r\n\t\tday_full: [\"Неділя\", \"Понеділок\", \"Вівторок\", \"Середа\", \"Четвер\", \"П'ятниця\", \"Субота\"],\r\n\t\tday_short: [\"Нед\", \"Пон\", \"Вів\", \"Сер\", \"Чет\", \"Птн\", \"Суб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сьогодні\",\r\n\t\tday_tab: \"День\",\r\n\t\tweek_tab: \"Тиждень\",\r\n\t\tmonth_tab: \"Місяць\",\r\n\t\tnew_event: \"Нова подія\",\r\n\t\ticon_save: \"Зберегти\",\r\n\t\ticon_cancel: \"Відміна\",\r\n\t\ticon_details: \"Деталі\",\r\n\t\ticon_edit: \"Редагувати\",\r\n\t\ticon_delete: \"Вилучити\",\r\n\t\tconfirm_closing: \"\", //Ваші зміни втратяться. Ви впевнені ?\r\n\t\tconfirm_deleting: \"Подія вилучиться назавжди. Ви впевнені?\",\r\n\t\tsection_description: \"Опис\",\r\n\t\tsection_time: \"Часовий проміжок\",\r\n\t\tfull_day: \"Весь день\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Хочете редагувати весь перелік повторюваних подій?\",\r\n\t\tsection_recurring: \"Повторювана подія\",\r\n\t\tbutton_recurring: \"Відключено\",\r\n\t\tbutton_recurring_open: \"Включено\",\r\n\t\tbutton_edit_series: \"Редагувати серію\",\r\n\t\tbutton_edit_occurrence: \"Редагувати примірник\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Перелік\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Опис\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Рік\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Перелік\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Таблиця\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"День\",\r\n\t\trepeat_radio_week: \"Тиждень\",\r\n\t\trepeat_radio_month: \"Місяць\",\r\n\t\trepeat_radio_year: \"Рік\",\r\n\t\trepeat_radio_day_type: \"Кожний\",\r\n\t\trepeat_text_day_count: \"день\",\r\n\t\trepeat_radio_day_type2: \"Кожний робочий день\",\r\n\t\trepeat_week: \" Повторювати кожен\",\r\n\t\trepeat_text_week_count: \"тиждень , по:\",\r\n\t\trepeat_radio_month_type: \"Повторювати\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" числа кожний \",\r\n\t\trepeat_text_month_count: \"місяць\",\r\n\t\trepeat_text_month_count2_before: \"кожен \",\r\n\t\trepeat_text_month_count2_after: \"місяць\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"день\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без дати закінчення\",\r\n\t\trepeat_text_occurences_count: \"повторень\",\r\n\t\trepeat_radio_end3: \"До \",\r\n\t\trepeat_radio_end2: \"\",\r\n\r\n\t\trepeat_never: \"Ніколи\",\r\n\t\trepeat_daily: \"Щодня\",\r\n\t\trepeat_workdays: \"Щодня в робочі дні\",\r\n\t\trepeat_weekly: \"Щотижня\",\r\n\t\trepeat_monthly: \"Щомісяця\",\r\n\t\trepeat_yearly: \"Щороку\",\r\n\t\trepeat_custom: \"Налаштоване\",\r\n\t\trepeat_freq_day: \"День\",\r\n\t\trepeat_freq_week: \"Тиждень\",\r\n\t\trepeat_freq_month: \"Місяць\",\r\n\t\trepeat_freq_year: \"Рік\",\r\n\t\trepeat_on_date: \"На дату\",\r\n\t\trepeat_ends: \"Закінчується\",\r\n\r\n\t\tmonth_for_recurring: [\"січня\", \"лютого\", \"березня\", \"квітня\", \"травня\", \"червня\", \"липня\", \"серпня\", \"вересня\", \"жовтня\", \"листопада\", \"грудня\"],\r\n\t\tday_for_recurring: [\"Неділям\", \"Понеділкам\", \"Вівторкам\", \"Середам\", \"Четвергам\", \"П'ятницям\", \"Суботам\"]\r\n\t}\r\n};\r\n","import eventable from \"../utils/eventable\";\r\n\r\nexport class DatePicker {\r\n\tconstructor(scheduler, container, state = {}) {\r\n\t\tthis.state = {\r\n\t\t\tdate: new Date(),\r\n\t\t\tmodes: ['days', 'months', 'years'],\r\n\t\t\tcurrentRange: [],\r\n\t\t\teventDates: [],\r\n\t\t\tcurrentModeIndex: 0,\r\n\t\t\t...state\r\n\t\t};\r\n\t\tthis.container = null;\r\n\t\tthis.element = null;\r\n\t\tthis.onStateChangeHandlers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t\tthis._domEvents = scheduler._createDomEventScope();\r\n\t\tthis.state = this.getState();\r\n\t\teventable(this);\r\n\t\tif(container){\r\n\r\n\t\t\tthis.container = container;\r\n\t\t\tthis.render(this.container);\r\n\t\t}\r\n\r\n\t\tthis.onStateChange((oldState, newState) => {\r\n\t\t\tthis.callEvent(\"onStateChange\", [newState, oldState]);\r\n\t\t});\r\n\t}\r\n\r\n\tgetState() {\r\n\t\treturn { \r\n\t\t\t...this.state,\r\n\t\t\tmode: this.state.modes[this.state.currentModeIndex]\r\n\t\t};\r\n\t}\r\n\r\n\tsetState(newState) {\r\n\t\tconst oldState = { ...this.state };\r\n\t\tif(newState.mode){\r\n\t\t\tnewState.currentModeIndex = this.state.modes.indexOf(newState.mode);\r\n\t\t}\r\n\t\tthis.state = { ...this.state, ...newState };\r\n\r\n\t\tthis._notifyStateChange(oldState, this.state);\r\n\r\n\t\tif (this.container) {\r\n\t\t\tthis.render(this.container);\r\n\t\t}\r\n\t}\r\n\r\n\tonStateChange(handler) {\r\n\t\tthis.onStateChangeHandlers.push(handler);\r\n\r\n\t\t// function to remove the handler\r\n\t\treturn () => {\r\n\t\t\tconst index = this.onStateChangeHandlers.indexOf(handler);\r\n\t\t\tif (index !== -1) {\r\n\t\t\t\tthis.onStateChangeHandlers.splice(index, 1);\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\r\n\t_notifyStateChange(oldState, newState) {\r\n\t\tthis.onStateChangeHandlers.forEach(handler => handler(oldState, newState));\r\n\t}\r\n\r\n\t_adjustDate(direction) {\r\n\r\n\t\tconst {mode, date} = this.getState();\r\n\t\tconst newDate = new Date(date);\r\n\t\tif (mode === 'days') {\r\n\t\t\tnewDate.setMonth(date.getMonth() + direction);\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tnewDate.setFullYear(date.getFullYear() + direction);\r\n\t\t} else {\r\n\t\t\tnewDate.setFullYear(date.getFullYear() + direction * 10);\r\n\t\t}\r\n\t\tthis.setState({ date: newDate });\r\n\t}\r\n\r\n\t_toggleMode() {\r\n\t\tconst newIndex = (this.state.currentModeIndex + 1) % this.state.modes.length;\r\n\t\tthis.setState({ currentModeIndex: newIndex });\r\n\t}\r\n\r\n\t_renderCalendarHeader(container) {\r\n\t\tconst {mode, date} = this.getState();\r\n\r\n\t\tconst header = document.createElement('div');\r\n\t\theader.classList.add('dhx_cal_datepicker_header');\r\n\r\n\t\tconst backwardArrow = document.createElement('button');\r\n\r\n\t\tbackwardArrow.classList.add(\"dhx_cal_datepicker_arrow\", \"scheduler_icon\", \"arrow_left\");\r\n\t\theader.appendChild(backwardArrow);\r\n\r\n\t\tconst monthLabel = document.createElement('div');\r\n\t\tmonthLabel.classList.add('dhx_cal_datepicker_title');\r\n\r\n\t\tif (mode === 'days') {\r\n\t\t\tmonthLabel.innerText = date.toLocaleString('default', { month: 'long' }) + ' ' + date.getFullYear();\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tmonthLabel.innerText = date.getFullYear();\r\n\t\t} else {\r\n\t\t\tconst startYear = Math.floor(date.getFullYear() / 10) * 10;\r\n\t\t\tmonthLabel.innerText = `${startYear} - ${startYear + 9}`;\r\n\t\t}\r\n\r\n\t\tthis._domEvents.attach(monthLabel, \"click\", this._toggleMode.bind(this));\r\n\t\theader.appendChild(monthLabel);\r\n\r\n\t\tconst forwardArrow = document.createElement('button');\r\n\r\n\t\tforwardArrow.classList.add(\"dhx_cal_datepicker_arrow\", \"scheduler_icon\", \"arrow_right\");\r\n\t\theader.appendChild(forwardArrow);\r\n\r\n\t\tcontainer.appendChild(header);\r\n\r\n\t\tthis._domEvents.attach(backwardArrow, \"click\", this._adjustDate.bind(this, -1));\r\n\t\tthis._domEvents.attach(forwardArrow, \"click\", this._adjustDate.bind(this, 1));\r\n\t}\r\n\r\n\trender(container) {\r\n\t\tthis._domEvents.detachAll();\r\n\t\tthis.container = container || this.container; \r\n\t\tthis.container.innerHTML = '';\r\n\r\n\t\tif(!this.element){\r\n\t\t\tthis.element = document.createElement(\"div\");\r\n\t\t\tthis.element.classList.add(\"dhx_cal_datepicker\");\r\n\t\t}\r\n\t\tthis.element.innerHTML = '';\r\n\t\tthis.container.appendChild(this.element);\r\n\r\n\t\tthis._renderCalendarHeader(this.element);\r\n\t\tconst dataContainer = document.createElement(\"div\");\r\n\t\tdataContainer.classList.add(\"dhx_cal_datepicker_data\");\r\n\t\tthis.element.appendChild(dataContainer);\r\n\r\n\t\tconst {mode} = this.getState();\r\n\t\tif (mode === 'days') {\r\n\t\t\tthis._renderDayGrid(dataContainer);\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tthis._renderMonthGrid(dataContainer);\r\n\t\t} else {\r\n\t\t\tthis._renderYearGrid(dataContainer);\r\n\t\t}\r\n\t}\r\n\r\n\t_renderDayGridHeader(daysOfWeekContainer) {\r\n\t\tconst {date} = this.getState();\r\n\t\tconst scheduler = this.scheduler;\r\n\r\n\t\tlet currentDate = scheduler.date.week_start(new Date(date));\r\n\t\tconst maxDate = scheduler.date.add(scheduler.date.week_start(new Date(date)), 1, 'week');\r\n\r\n\t\tdaysOfWeekContainer.classList.add('dhx_cal_datepicker_days');\r\n\r\n\t\tconst labelFormat = scheduler.date.date_to_str(\"%D\");\r\n\r\n\t\twhile (currentDate.valueOf() < maxDate.valueOf()) {\r\n\t\t\tconst label = labelFormat(currentDate);\r\n\r\n\t\t\tconst dayElement = document.createElement('div');\r\n\t\t\tdayElement.setAttribute(\"data-day\", currentDate.getDay());\r\n\t\t\tdayElement.classList.add('dhx_cal_datepicker_dayname');\r\n\t\t\tdayElement.innerText = label;\r\n\t\t\tdaysOfWeekContainer.appendChild(dayElement);\r\n\r\n\t\t\tcurrentDate = scheduler.date.add(currentDate, 1, 'day');\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t_weeksBetween(min, max) {\r\n\t\tconst scheduler = this.scheduler;\r\n\t\tlet weeks = 0;\r\n\t\tlet currWeek = new Date(min);\r\n\t\twhile(currWeek.valueOf() < max.valueOf()){\r\n\t\t\tweeks += 1;\r\n\t\t\tcurrWeek = scheduler.date.week_start(scheduler.date.add(currWeek, 1, \"week\"));\r\n\t\t}\r\n\t\treturn weeks;\r\n\t}\r\n\r\n\t_renderDayGrid(container) {\r\n\t\tconst {date, currentRange, eventDates, minWeeks} = this.getState();\r\n\r\n\t\tlet minSchedulerDate = currentRange[0];\r\n\t\tlet maxSchedulerDate = currentRange[1];\r\n\r\n\t\tconst eventDaysTable = eventDates.reduce((acc, date) => {\r\n\t\t\tconst dayStart = this.scheduler.date.day_start(new Date(date));\r\n\t\t\tacc[dayStart.valueOf()] = true;\r\n\t\t\treturn acc;\r\n\t\t}, {});\r\n\r\n\r\n\t\t// Render Days of the Week\r\n\t\tconst daysOfWeekContainer = document.createElement('div');\r\n\t\tthis._renderDayGridHeader(daysOfWeekContainer);\r\n\t\tcontainer.appendChild(daysOfWeekContainer);\r\n\r\n\t\tconst scheduler = this.scheduler;\r\n\t\tconst firstDate = scheduler.date.week_start(scheduler.date.month_start(new Date(date)));\r\n\t\tconst monthStart = scheduler.date.month_start(new Date(date));\r\n\t\tconst monthEnd = scheduler.date.add(scheduler.date.month_start(new Date(date)), 1, 'month');\r\n\t\tlet lastDate = scheduler.date.add(scheduler.date.month_start(new Date(date)), 1, 'month');\r\n\t\tconst currentCalDate = scheduler.date.date_part(scheduler._currentDate());\r\n\t\tif(lastDate.getDay() !== 0){\r\n\t\t\tlastDate = scheduler.date.add(scheduler.date.week_start(lastDate), 1, \"week\");\r\n\t\t}\r\n\r\n\t\tlet weeks = this._weeksBetween(firstDate, lastDate);\r\n\t\tif(minWeeks && weeks < minWeeks){\r\n\t\t\tlastDate = scheduler.date.add(lastDate, (minWeeks - weeks), \"week\");\r\n\t\t}\r\n\r\n\t\tlet currDate = firstDate;\r\n\r\n\t\tconst dayGridContainer = document.createElement('div');\r\n\t\tdayGridContainer.classList.add('dhx_cal_datepicker_days');\r\n\r\n\t\tthis._domEvents.attach(dayGridContainer, \"click\", (event) => {\r\n\t\t\tconst dateCell = event.target.closest(\"[data-cell-date]\");\r\n\t\t\tconst date = new Date(dateCell.getAttribute(\"data-cell-date\"));\r\n\t\t\tthis.callEvent(\"onDateClick\", [date, event]);\r\n\t\t});\r\n\r\n\t\twhile(currDate.valueOf() < lastDate.valueOf()){\r\n\t\t\tconst dayElement = document.createElement('div');\r\n\t\t\tdayElement.setAttribute(\"data-cell-date\", scheduler.templates.format_date(currDate));\r\n\t\t\tdayElement.setAttribute(\"data-day\", currDate.getDay());\r\n\t\t\tdayElement.innerHTML = currDate.getDate();\r\n\r\n\t\t\tif(currDate.valueOf() < monthStart.valueOf()){\r\n\t\t\t\tdayElement.classList.add('dhx_before');\r\n\t\t\t}else if(currDate.valueOf() >= monthEnd.valueOf()){\t\r\n\t\t\t\tdayElement.classList.add('dhx_after');\r\n\t\t\t}\r\n\r\n\t\t\tif(currDate.getDay() === 0 || currDate.getDay() === 6){\r\n\t\t\t\tdayElement.classList.add(\"dhx_cal_datepicker_weekend\");\r\n\t\t\t}\r\n\r\n\t\t\tif(currDate.valueOf() == currentCalDate.valueOf()){\r\n\t\t\t\tdayElement.classList.add(\"dhx_now\");\r\n\t\t\t}\r\n\r\n\t\t\tif(minSchedulerDate && maxSchedulerDate){\r\n\t\t\t\tif(currDate.valueOf() >= minSchedulerDate.valueOf() && currDate.valueOf() < maxSchedulerDate.valueOf()){\r\n\t\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(eventDaysTable[currDate.valueOf()]){\r\n\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_event');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdayElement.classList.add('dhx_cal_datepicker_date');\r\n\r\n\t\t\tdayGridContainer.appendChild(dayElement);\r\n\t\t\tcurrDate = scheduler.date.add(currDate, 1, 'day');\r\n\t\t}\r\n\r\n\t\tcontainer.appendChild(dayGridContainer);\r\n\r\n\t}\r\n\r\n\t_renderMonthGrid(container) {\r\n\t\tconst {date} = this.getState();\r\n\r\n\t\tconst wrapper = document.createElement('div');\r\n\t\twrapper.classList.add(\"dhx_cal_datepicker_months\");\r\n\r\n\t\tconst months = [];\r\n\t\tfor(let i = 0; i < 12; i++){\r\n\t\t\tmonths.push(new Date(date.getFullYear(), i, 1));\r\n\t\t}\r\n\r\n\t\tconst formatLabel = this.scheduler.date.date_to_str(\"%M\");\r\n\t\tmonths.forEach(month => {\r\n\t\t\tconst monthElement = document.createElement('div');\r\n\t\t\tmonthElement.classList.add('dhx_cal_datepicker_month');\r\n\t\t\tif(date.getMonth() === month.getMonth()){\r\n\t\t\t\tmonthElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t}\r\n\t\t\tmonthElement.setAttribute(\"data-month\", month.getMonth());\r\n\t\t\tmonthElement.innerHTML = formatLabel(month);\r\n\t\t\tthis._domEvents.attach(monthElement, \"click\", () => {\r\n\t\t\t\tconst newDate = new Date(month);\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tdate: newDate,\r\n\t\t\t\t\tmode: 'days'\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\twrapper.appendChild(monthElement);\r\n\t\t});\r\n\t\tcontainer.appendChild(wrapper);\r\n\r\n\t\tconst doneArea = document.createElement(\"div\");\r\n\t\tdoneArea.classList.add(\"dhx_cal_datepicker_done\");\r\n\t\tconst doneBtn = document.createElement(\"button\");\r\n\t\tdoneBtn.innerText = \"Done\";\r\n\t\tdoneBtn.classList.add(\"dhx_cal_datepicker_done_btn\");\r\n\t\tthis._domEvents.attach(doneBtn, \"click\", () => {\r\n\t\t\tthis.setState({\r\n\t\t\t\tmode: 'days'\r\n\t\t\t});\r\n\t\t});\r\n\t\tdoneArea.appendChild(doneBtn);\r\n\t\tcontainer.appendChild(doneArea);\r\n\t}\r\n\r\n\t_renderYearGrid(container) {\r\n\t\tconst {date} = this.getState();\r\n\t\tconst startYear = Math.floor(date.getFullYear() / 10) * 10;\r\n\t\t\r\n\t\tconst wrapper = document.createElement('div');\r\n\t\twrapper.classList.add(\"dhx_cal_datepicker_years\");\r\n\t\tfor (let i = startYear - 1; i <= startYear + 10; i++) {\r\n\t\t\tconst yearElement = document.createElement('div');\r\n\t\t\tyearElement.innerText = i;\r\n\t\t\tyearElement.classList.add('dhx_cal_datepicker_year');\r\n\t\t\tyearElement.setAttribute(\"data-year\", i);\r\n\t\t\tif(date.getFullYear() === i){\r\n\t\t\t\tyearElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t}\r\n\t\t\tthis._domEvents.attach(yearElement, \"click\", () => {\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tdate: new Date(i, date.getMonth(), 1),\r\n\t\t\t\t\tmode: 'months'\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\twrapper.appendChild(yearElement);\r\n\t\t\t\r\n\t\t}\r\n\t\tcontainer.appendChild(wrapper);\r\n\r\n\t\tconst doneArea = document.createElement(\"div\");\r\n\t\tdoneArea.classList.add(\"dhx_cal_datepicker_done\");\r\n\t\tconst doneBtn = document.createElement(\"button\");\r\n\t\tdoneBtn.innerText = \"Done\";\r\n\t\tdoneBtn.classList.add(\"dhx_cal_datepicker_done_btn\");\r\n\t\tthis._domEvents.attach(doneBtn, \"click\", () => {\r\n\t\t\tthis.setState({\r\n\t\t\t\tmode: 'months'\r\n\t\t\t});\r\n\t\t});\r\n\t\tdoneArea.appendChild(doneBtn);\r\n\t\tcontainer.appendChild(doneArea);\r\n\t}\r\n\r\n\tdestructor(){\r\n\t\tthis.onStateChangeHandlers = [];\r\n\t\tif(this.element){\r\n\t\t\tthis.element.innerHTML = '';\r\n\t\t\tthis.element.remove();\r\n\t\t}\r\n\r\n\t\tthis._domEvents.detachAll();\r\n\t\tthis.callEvent(\"onDestroy\", []);\r\n\t\tthis.detachAllEvents();\r\n\r\n\t\tthis.scheduler = null;\r\n\t}\r\n}","// import \"./css/dhtmlxscheduler_terrace\";\r\n// import \"./css/dhtmlxscheduler_material\";\r\n// import \"./css/dhtmlxscheduler_material_nofont\";\r\n// import \"./css/dhtmlxscheduler_flat\";\r\n// import \"./css/dhtmlxscheduler_contrast_black\";\r\n// import \"./css/dhtmlxscheduler_contrast_white\";\r\n\r\nimport addPlugins from \"./plugins\";\r\nimport stateProvider from \"./core/state\";\r\nimport assert from \"./core/common/assert\";\r\nimport common_errors from \"./core/common_errors\";\r\nimport connector from \"./core/connector\";\r\nimport schedulerCore from \"./core/scheduler\";\r\nimport common from \"./core/common\";\r\nimport wai_aria from \"./core/wai_aria\";\r\nimport utils from \"./core/utils/utils\";\r\nimport dom_helpers from \"./core/utils/dom_helpers\";\r\nimport env from \"./utils/env\";\r\nimport destructor from \"./core/destructor\";\r\nimport ajax from \"./core/utils/ajax\";\r\nimport base from \"./core/base\";\r\nimport config from \"./core/config\";\r\nimport event from \"./core/event\";\r\nimport event_highlight from \"./core/event_highlight\";\r\nimport load from \"./core/load\";\r\nimport lightbox from \"./core/lightbox\";\r\nimport touch from \"./core/touch\";\r\nimport dhtmlx_suite_hooks from \"./core/dhtmlx/dhtmlx_suite_hooks\";\r\nimport skins from \"./core/skins\";\r\nimport jquery from \"./core/jquery\";\r\nimport delay_render from \"./core/delay_render\";\r\nimport dataProcessorExtend from \"./core/dataprocessor/dataprocessor\";\r\nimport message from \"./core/message\";\r\nimport i18nFactory from \"./locale\";\r\n\r\nimport voidFirst from \"./publish_helpers/void_script_first\";\r\nimport voidSecond from \"./publish_helpers/void_script_second\";\r\nimport voidThird from \"./publish_helpers/void_script_third\";\r\n\r\n//import datepickerHeader from \"./core/clickable_header\";\r\n\r\nimport { DatePicker } from \"./core/datepicker\";\r\n\r\nexport default function(extensionManager) {\r\n\r\n\tconst scheduler = { version: VERSION };\r\n\t\r\n\tscheduler.$stateProvider = stateProvider();\r\n\r\n\tscheduler.getState = scheduler.$stateProvider.getState;\r\n\tcommon_errors(scheduler);\r\n\tcommon(scheduler);\r\n\tschedulerCore(scheduler);\r\n\twai_aria(scheduler);\r\n\t//utils(scheduler);\r\n\r\n\tscheduler.utils = utils;\r\n\tscheduler.$domHelpers = dom_helpers;\r\n\tscheduler.utils.dom = dom_helpers;\r\n\tscheduler.uid = utils.uid;\r\n\tscheduler.mixin = utils.mixin;\r\n\tscheduler.defined = utils.defined;\r\n\tscheduler.assert = assert(scheduler);\r\n\tscheduler.copy = utils.copy;\r\n\r\n\tscheduler._createDatePicker = function(container, config){\r\n\t\treturn new DatePicker(scheduler, container, config);\r\n\t};\r\n\r\n\t//datepickerHeader(scheduler);\r\n\r\n\r\n\t//old api compatibility\r\n\tscheduler._getFocusableNodes = dom_helpers.getFocusableNodes;\r\n\tscheduler._getClassName = dom_helpers.getClassName;\r\n\tscheduler._locate_css = dom_helpers.locateCss;\r\n\r\n\tconst messageApi = message(scheduler);\r\n\tscheduler.utils.mixin(scheduler, messageApi);\r\n\r\n\tscheduler.env = scheduler.$env = env;\r\n\tscheduler.Promise = window.Promise;\r\n\tdestructor(scheduler);\r\n\tajax(scheduler);\r\n\tvoidFirst(scheduler);\r\n\tbase(scheduler);\r\n\tconfig(scheduler);\r\n\tevent(scheduler);\r\n\tevent_highlight(scheduler);\r\n\tload(scheduler);\r\n\tlightbox(scheduler);\r\n\ttouch(scheduler);\r\n\tdhtmlx_suite_hooks(scheduler);\r\n\tvoidSecond(scheduler);\r\n\tskins(scheduler);\r\n\tjquery(scheduler);\r\n\tdelay_render(scheduler);\r\n\tdataProcessorExtend(scheduler);\r\n\tvoidThird(scheduler);\r\n\tconnector(scheduler);\r\n\tconst i18n = i18nFactory();\r\n\tscheduler.i18n = {\r\n\t\taddLocale: i18n.addLocale,\r\n\t\tsetLocale: function(locale){\r\n\t\t\tif(typeof locale === \"string\"){\r\n\t\t\t\tvar localeObject = i18n.getLocale(locale);\r\n\t\t\t\tif(!localeObject){\r\n\t\t\t\t\tlocaleObject = i18n.getLocale(\"en\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler.locale = localeObject;\r\n\t\t\t}else if(locale){\r\n\t\t\t\tif(!scheduler.locale){\r\n\t\t\t\t\tscheduler.locale = locale;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfor(var i in locale){\r\n\t\t\t\t\t\tif(locale[i] && typeof locale[i] === \"object\"){\r\n\t\t\t\t\t\t\tif(!scheduler.locale[i]){\r\n\t\t\t\t\t\t\t\tscheduler.locale[i] = {};\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tscheduler.mixin(scheduler.locale[i], locale[i], true);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tscheduler.locale[i] = locale[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar labels = scheduler.locale.labels;\r\n\t\t\tlabels.dhx_save_btn \t= labels.icon_save;\r\n\t\t\tlabels.dhx_cancel_btn \t= labels.icon_cancel;\r\n\t\t\tlabels.dhx_delete_btn \t= labels.icon_delete;\r\n\r\n\t\t\tif(scheduler.$container){\r\n\t\t\t\tscheduler.get_elements();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t},\r\n\t\tgetLocale: i18n.getLocale\r\n\t};\r\n\tscheduler.i18n.setLocale(\"en\");\r\n\taddPlugins(scheduler);\r\n\tscheduler.ext = {};\r\n\r\n\tconst activePlugins = {};\r\n\tscheduler.plugins = function(config){\r\n\t\tconst extensionList = getExtensionList(config, {\r\n\t\t\t\ttreetimeline: [\"timeline\"],\r\n\t\t\t\tdaytimeline: [\"timeline\"],\r\n\t\t\t\touterdrag: [\"legacy\"]\r\n\t\t\t}, {\r\n\t\t\t\tlegacy: 1,\r\n\t\t\t\tlimit: 1,\r\n\t\t\t\ttimeline: 2,\r\n\t\t\t\tdaytimeline: 3,\r\n\t\t\t\ttreetimeline: 3,\r\n\t\t\t\touterdrag:6\r\n\t\t\t});\r\n\r\n\t\textensionList.forEach(function(name){\r\n\t\t\tif(!activePlugins[name]){\r\n\t\t\t\tconst plugin = extensionManager.getExtension(name);\r\n\t\t\t\tif(plugin){\r\n\t\t\t\t\tplugin(scheduler);\r\n\t\t\t\t\tactivePlugins[name] = true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthrow new Error(\"unknown plugin \" + name);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n\r\n\tfunction getExtensionList(config, dependencies, priorities){\r\n\t\tconst result = [];\r\n\r\n\t\tfor(const i in config){\r\n\t\t\tif(config[i]){\r\n\t\t\t\tconst extension = i.toLowerCase();\r\n\t\t\t\tif(dependencies[extension]){\r\n\t\t\t\t\tdependencies[extension].forEach(function(dep){\r\n\t\t\t\t\t\tconst dependencyName = dep.toLowerCase();\r\n\t\t\t\t\t\tif(!config[dependencyName]){\r\n\t\t\t\t\t\t\tresult.push(dependencyName);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\tresult.push(extension);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tresult.sort(function(a, b){\r\n\t\t\tconst orderA = priorities[a] || 0;\r\n\t\t\tconst orderB = priorities[b] || 0;\r\n\t\t\tif(orderA > orderB){\r\n\t\t\t\treturn 1;\r\n\t\t\t}else if(orderA < orderB){\r\n\t\t\t\treturn -1;\r\n\t\t\t}else{\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\treturn scheduler;\r\n\r\n}","import utils from \"./utils/utils\";\r\n\r\nconst StateService = (function(){\r\n\tconst stateProviders = {};\r\n\r\n\tfunction getState(name){\r\n\t\tconst provider = stateProviders[name];\r\n\t\tif(provider){\r\n\t\t\treturn stateProviders[name].method();\r\n\t\t}else{\r\n\t\t\tconst res = {};\r\n\t\t\tfor(const i in stateProviders){\r\n\t\t\t\tif(!stateProviders[i].internal)\r\n\t\t\t\t\tutils.mixin(res, stateProviders[i].method(), true);\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\t\t}\r\n\t}\r\n\r\n\tfunction registerProvider(name, provider, internal){\r\n\t\tstateProviders[name] = { method: provider, internal: internal};\r\n\t}\r\n\r\n\tfunction unregisterProvider(name){\r\n\t\tdelete stateProviders[name];\r\n\t}\r\n\r\n\treturn {\r\n\t\tgetState: getState,\r\n\t\tregisterProvider: registerProvider,\r\n\t\tunregisterProvider: unregisterProvider\r\n\t};\r\n});\r\n\r\nexport default StateService;\r\n\r\n","export default function extend(scheduler) {\r\n\r\nvar commonViews = {\r\n\tagenda: \"https://docs.dhtmlx.com/scheduler/agenda_view.html\",\r\n\tgrid: \"https://docs.dhtmlx.com/scheduler/grid_view.html\",\r\n\tmap: \"https://docs.dhtmlx.com/scheduler/map_view.html\",\r\n\tunit: \"https://docs.dhtmlx.com/scheduler/units_view.html\",\r\n\ttimeline: \"https://docs.dhtmlx.com/scheduler/timeline_view.html\",\r\n\tweek_agenda: \"https://docs.dhtmlx.com/scheduler/weekagenda_view.html\",\r\n\tyear: \"https://docs.dhtmlx.com/scheduler/year_view.html\",\r\n\tanythingElse: \"https://docs.dhtmlx.com/scheduler/views.html\"\r\n};\r\n\r\nvar requiredExtensions = {\r\n\tagenda: \"ext/dhtmlxscheduler_agenda_view.js\",\r\n\tgrid: \"ext/dhtmlxscheduler_grid_view.js\",\r\n\tmap: \"ext/dhtmlxscheduler_map_view.js\",\r\n\tunit: \"ext/dhtmlxscheduler_units.js\",\r\n\ttimeline: \"ext/dhtmlxscheduler_timeline.js, ext/dhtmlxscheduler_treetimeline.js, ext/dhtmlxscheduler_daytimeline.js\",\r\n\tweek_agenda: \"ext/dhtmlxscheduler_week_agenda.js\",\r\n\tyear: \"ext/dhtmlxscheduler_year_view.js\",\r\n\tlimit: \"ext/dhtmlxscheduler_limit.js\"\r\n};\r\n\r\nscheduler._commonErrorMessages = {\r\n\tunknownView: function(view){\r\n\t\tvar relatedDoc = \"Related docs: \" + (commonViews[view] || commonViews.anythingElse); \r\n\t\tvar relatedExtension = requiredExtensions[view] ? (\"You're probably missing \" + requiredExtensions[view] + \".\") : \"\";\r\n\t\treturn (\r\n\t\t\t\"`\"+view+\"` view is not defined. \\n\" +\r\n\t\t\t\"Please check parameters you pass to `scheduler.init` or `scheduler.setCurrentView` in your code and ensure you've imported appropriate extensions. \\n\" + \r\n\t\t\trelatedDoc + \"\\n\" + (relatedExtension ? (relatedExtension + \"\\n\") : \"\"));\r\n\t},\r\n\tcollapsedContainer: function(div){\r\n\t\treturn \"Scheduler container height is set to *100%* but the rendered height is zero and the scheduler is not visible. \\n\"+\r\n\t\t\"Make sure that the container has some initial height or use different units. For example:\\n\" +\r\n\t\t\"
\\n\";\r\n\t}\r\n};\r\n\r\nscheduler.createTimelineView = function() {\r\n\tthrow new Error(\"scheduler.createTimelineView is not implemented. Be sure to add the required extension: \" + requiredExtensions.timeline + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.timeline);\r\n};\r\n\r\nscheduler.createUnitsView = function() {\r\n\tthrow new Error(\"scheduler.createUnitsView is not implemented. Be sure to add the required extension: \" + requiredExtensions.unit + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.unit);\r\n};\r\n\r\nscheduler.createGridView = function() {\r\n\tthrow new Error(\"scheduler.createGridView is not implemented. Be sure to add the required extension: \" + requiredExtensions.grid + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.grid);\r\n};\r\n\r\nscheduler.addMarkedTimespan = function() {\r\n\tthrow new Error(\"scheduler.addMarkedTimespan is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_limit.js\" + \r\n\t\"\\n\" +\r\n\t\"Related docs: https://docs.dhtmlx.com/scheduler/limits.html\");\r\n};\r\n\r\nscheduler.renderCalendar = function() {\r\n\tthrow new Error(\"scheduler.renderCalendar is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_minical.js\" + \r\n\t\"\\n\" +\r\n\t\"https://docs.dhtmlx.com/scheduler/minicalendar.html\");\r\n};\r\n\r\nscheduler.exportToPNG = function() {\r\n\tthrow new Error([\r\n\t\t\"scheduler.exportToPNG is not implemented.\",\r\n\t\t\"This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/png.html\",\r\n\t\t\"Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml\"\r\n\t].join(\"\\n\"));\r\n};\r\n\r\nscheduler.exportToPDF = function() {\r\n\tthrow new Error([\r\n\t\t\"scheduler.exportToPDF is not implemented.\",\r\n\t\t\"This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/pdf.html\",\r\n\t\t\"Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml\"\r\n\t].join(\"\\n\"));\r\n};\r\n\r\n\r\n}","\r\nimport nav_bar from \"./nav_bar\";\r\nimport scheduler_resize_listener from \"./scheduler_resize_listener\";\r\nimport eventable from \"../utils/eventable\";\r\n\r\n\r\nexport default function extend(scheduler) {\r\n\r\neventable(scheduler);\r\n\r\nnav_bar(scheduler);\r\n\r\nscheduler._detachDomEvent = function(el, event, handler){\r\n\tif (el.removeEventListener){\r\n\t\tel.removeEventListener(event, handler, false);\r\n\r\n\t}else if (el.detachEvent){\r\n\t\tel.detachEvent(\"on\"+event, handler);\r\n\t}\r\n};\r\n\r\n\r\nscheduler._init_once = function(){\r\n\tscheduler_resize_listener(scheduler);\r\n\r\n\tscheduler._init_once = function(){};\r\n};\r\n\r\nconst layout = {\r\n\t\"navbar\": {\r\n\t\trender: function (config) {\r\n\t\t\treturn scheduler._init_nav_bar(config);\r\n\t\t}\r\n\t},\r\n\t\"header\": {\r\n\t\trender: function (config) {\r\n\t\t\tconst element = document.createElement(\"div\");\r\n\t\t\telement.className = \"dhx_cal_header\";\r\n\t\t\treturn element;\r\n\t\t}\r\n\t},\r\n\t\"dataArea\": {\r\n\t\trender: function (config) {\r\n\t\t\tconst element = document.createElement(\"div\");\r\n\t\t\telement.className = \"dhx_cal_data\";\r\n\t\t\treturn element;\r\n\t\t}\r\n\t},\r\n\t\"html_element\": {\r\n\t\trender: function (config) {\r\n\t\t\treturn config.html;\r\n\t\t}\r\n\t}\r\n};\r\n\r\nfunction hasSchedulerMarkup(element){\r\n\treturn !!(\r\n\t\telement.querySelector(\".dhx_cal_header\") &&\r\n\t\telement.querySelector(\".dhx_cal_data\") &&\r\n\t\telement.querySelector(\".dhx_cal_navline\")\r\n\t\t);\r\n}\r\n\r\nfunction createDefaultHeader(scheduler){\r\n\tconst views = [\r\n\t\t\"day\",\r\n\t\t\"week\",\r\n\t\t\"month\"\r\n\t];\r\n\tconst date = [\r\n\t\t\"date\"\r\n\t];\r\n\tconst nav = [\r\n\t\t\"prev\",\r\n\t\t\"today\",\r\n\t\t\"next\"\r\n\t];\r\n\r\n\tif(scheduler.matrix){\r\n\t\tfor(const i in scheduler.matrix){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\tif(scheduler._props){\r\n\t\tfor(const i in scheduler._props){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\r\n\tif(scheduler._grid && scheduler._grid.names){\r\n\t\tfor(const i in scheduler._grid.names){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\r\n\tconst optionalViews = [\r\n\t\t\"map\",\r\n\t\t\"agenda\",\r\n\t\t\"week_agenda\",\r\n\t\t\"year\"\r\n\t];\r\n\r\n\toptionalViews.forEach(function(viewName){\r\n\t\tif(scheduler[viewName + \"_view\"]){\r\n\t\t\tviews.push(viewName);\r\n\t\t}\r\n\t});\r\n\r\n\treturn views.concat(date).concat(nav);\r\n}\r\n\r\nscheduler.init=function(id,date,mode){\r\n\tif(this.$destroyed){\r\n\t\treturn; // not have errors when try to reinit destroyed scheduler\r\n\t}\r\n\tdate=date||(scheduler._currentDate());\r\n\tmode=mode||\"week\";\r\n\r\n\tif(this._obj){\r\n\t\tthis.unset_actions();\r\n\t}\r\n\r\n\tthis._obj=(typeof id == \"string\")?document.getElementById(id):id;\r\n\tthis.$container = this._obj;\r\n\tthis.$root = this._obj;\r\n\r\n\tif(!this.$container.offsetHeight && this.$container.offsetWidth && this.$container.style.height === \"100%\"){\r\n\t\t// scheduler container has zero height and non-zero width\r\n\t\twindow.console.error(scheduler._commonErrorMessages.collapsedContainer(), this.$container);\r\n\t}\r\n\r\n\tif(this.config.wai_aria_attributes && this.config.wai_aria_application_role){\r\n\t\tthis.$container.setAttribute(\"role\", \"application\");\r\n\t}\r\n\r\n\tif(!this.config.header && !hasSchedulerMarkup(this.$container)){\r\n\t\t// if no header config and no required markup - use the default header\r\n\t\t// so the scheduler could be initialized in an empty div\r\n\t\tthis.config.header = createDefaultHeader(this);\r\n\t\twindow.console.log([// jshint ignore:line\r\n\t\t\t\"Required DOM elements are missing from the scheduler container and **scheduler.config.header** is not specified.\",\r\n\t\t\t\"Using a default header configuration: \",\r\n\t\t\t\"scheduler.config.header = \" + JSON.stringify(this.config.header, null, 2),\r\n\t\t\t\"Check this article for the details: https://docs.dhtmlx.com/scheduler/initialization.html\"\r\n\t\t].join(\"\\n\"));// jshint ignore:line\r\n\t}\r\n\r\n\tif (this.config.header) {\r\n\t\tthis.$container.innerHTML = \"\";\r\n\t\tthis.$container.classList.add(\"dhx_cal_container\");\r\n\t\tif(this.config.header.height){\r\n\t\t\tthis.xy.nav_height = this.config.header.height;\r\n\t\t}\r\n\t\tthis.$container.appendChild(layout.navbar.render(this.config.header));\r\n\t\tthis.$container.appendChild(layout.header.render());\r\n\t\tthis.$container.appendChild(layout.dataArea.render());\r\n\t} else {\r\n\t\t// if no header config provided - make sure scheduler container has all necessary elements\r\n\t\tif(!hasSchedulerMarkup(this.$container)){\r\n\t\t\tthrow new Error([\r\n\t\t\t\t\"Required DOM elements are missing from the scheduler container.\",\r\n\t\t\t\t\"Be sure to either specify them manually in the markup: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviamarkup\",\r\n\t\t\t\t\"Or to use **scheduler.config.header** setting so they could be created automatically: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviaheaderconfig\"\r\n\t\t\t].join(\"\\n\"));\r\n\t\t}\r\n\t}\r\n\r\n\tif (this.config.rtl) this.$container.className += \" dhx_cal_container_rtl\";\r\n\r\n\t//hook for terrace skin\r\n\tif (this._skin_init)\r\n\t\tscheduler._skin_init();\r\n\r\n\tscheduler.date.init();\r\n\r\n\tthis._scroll=true;\r\n\r\n\tthis._els=[];\r\n\tthis.get_elements();\r\n\tthis.init_templates();\r\n\tthis.set_actions();\r\n\r\n\tthis._init_once();\r\n\tthis._init_touch_events();\r\n\r\n\tthis.set_sizes();\r\n\tscheduler.callEvent('onSchedulerReady', []);\r\n\tscheduler.$initialized = true;\r\n\tthis.setCurrentView(date,mode);\r\n\r\n};\r\n\r\nscheduler.xy={\r\n\tmin_event_height:20,\r\n\tbar_height: 24,\r\n\tscale_width:50,\r\n\tscroll_width:18,\r\n\tscale_height:20,\r\n\tmonth_scale_height:20,\r\n\tmenu_width:25,\r\n\tmargin_top:0,\r\n\tmargin_left:0,\r\n\teditor_width:140,\r\n\tmonth_head_height:22,\r\n\tevent_header_height: 14\r\n};\r\nscheduler.keys={\r\n\tedit_save:13,\r\n\tedit_cancel:27\r\n};\r\n\r\nscheduler.bind = function bind(functor, object){\r\n\tif(functor.bind)\r\n\t\treturn functor.bind(object);\r\n\telse\r\n\t\treturn function(){ return functor.apply(object,arguments); };\r\n};\r\n\r\nscheduler.set_sizes=function(){\r\n\r\n\tvar w = this._x = this._obj.clientWidth-this.xy.margin_left;\r\n\r\n\t//not-table mode always has scroll - need to be fixed in future\r\n\tvar scale_x=this._table_view?0:(this.xy.scale_width+this.xy.scroll_width);\r\n\r\n\tvar materialScalePlaceholder = this.$container.querySelector(\".dhx_cal_scale_placeholder\");\r\n\tif(scheduler._is_material_skin()){\r\n\t\tif(!materialScalePlaceholder) {\r\n\t\t\tmaterialScalePlaceholder = document.createElement(\"div\");\r\n\t\t\tmaterialScalePlaceholder.className = \"dhx_cal_scale_placeholder\";\r\n\t\t\tthis.$container.insertBefore(materialScalePlaceholder, this._els[\"dhx_cal_header\"][0]);\r\n\t\t}\r\n\t\tmaterialScalePlaceholder.style.display = \"block\";\r\n\r\n\t\tthis.set_xy(materialScalePlaceholder,w,this.xy.scale_height + 1,0, this._els[\"dhx_cal_header\"][0].offsetTop);\r\n\r\n\t}else{\r\n\t\tif(materialScalePlaceholder){\r\n\t\t\tmaterialScalePlaceholder.parentNode.removeChild(materialScalePlaceholder);\r\n\t\t}\r\n\t}\r\n\r\n\tif (this._lightbox) {\r\n\t\tif (scheduler.$container.offsetWidth < 1200) {\r\n\t\t} else {\r\n\t\t\tthis._setLbPosition(document.querySelector(\".dhx_cal_light\"));\r\n\t\t}\r\n\t}\r\n\r\n\tthis._data_width = w-scale_x;\r\n\r\n\tthis._els[\"dhx_cal_navline\"][0].style.width = w + \"px\";\r\n\tconst header = this._els[\"dhx_cal_header\"][0];\r\n\tthis.set_xy(header, this._data_width, this.xy.scale_height);\r\n\t// this._els[\"dhx_cal_header\"][0].style.marginLeft = `${scheduler.xy.scale_width}px`;\r\n\theader.style.left = ``;\r\n\theader.style.right = ``;\r\n\tif(!this._table_view){\r\n\t\tif(this.config.rtl){\r\n\t\t\theader.style.right = `${this.xy.scale_width}px`;\r\n\t\t}else{\r\n\t\t\theader.style.left = `${this.xy.scale_width}px`;\r\n\t\t}\r\n\t} else {\r\n\t\tif(!this.config.rtl){\r\n\t\t\theader.style.left = `-1px`;\r\n\t\t} else {\r\n\t\t\theader.style.right = `-1px`;\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.set_xy=function(node,w,h,x,y){\r\n\tfunction prepareValue(val){\r\n\t\tlet prepared = val;\r\n\t\tif(!isNaN(Number(prepared))){\r\n\t\t\tprepared = Math.max(0,prepared) + \"px\";\r\n\t\t}\r\n\t\treturn prepared;\r\n\t}\r\n\r\n\tvar direction = 'left';\r\n\r\n\tif(w !== undefined) {\r\n\t\tnode.style.width = prepareValue(w);\r\n\t}\r\n\r\n\tif(h !== undefined){\r\n\t\tnode.style.height = prepareValue(h);\r\n\t}\r\n\r\n\tif (arguments.length>3){\r\n\r\n\t\tif(x !== undefined){\r\n\t\t\tif (this.config.rtl) direction = 'right';\r\n\t\t\tnode.style[direction]=x+\"px\";\r\n\t\t}\r\n\t\tif(y !== undefined){\r\n\t\t\tnode.style.top=y+\"px\";\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.get_elements=function(){\r\n\t//get all child elements as named hash\r\n\tconst els=this._obj.getElementsByTagName(\"DIV\");\r\n\tfor (let i=0; i < els.length; i++){\r\n\t\tlet class_name= scheduler._getClassName(els[i]);\r\n\t\tconst attr_value = els[i].getAttribute(\"data-tab\") || els[i].getAttribute(\"name\") || \"\";\r\n\t\tif (class_name) class_name = class_name.split(\" \")[0];\r\n\t\tif (!this._els[class_name]) this._els[class_name]=[];\r\n\t\tthis._els[class_name].push(els[i]);\r\n\r\n\t\t//check if name need to be changed\r\n\t\t// scheduler.locale.labels[attr_value+\"_tab\"] - to fix getting labels for data-tab\r\n\t\tlet label = scheduler.locale.labels[attr_value+\"_tab\"] || scheduler.locale.labels[attr_value||class_name];\r\n\t\tif (typeof label !== \"string\" && attr_value && !els[i].innerHTML)\r\n\t\t\tlabel = attr_value.split(\"_\")[0];\r\n\t\tif (label) {\r\n\t\t\tthis._waiAria.labelAttr(els[i], label);\r\n\t\t\tels[i].innerHTML = label;\r\n\t\t}\r\n\t}\r\n};\r\n\r\n\r\nconst domEventsScope = scheduler._createDomEventScope();\r\n\r\nscheduler.unset_actions = function(){\r\n\tdomEventsScope.detachAll();\r\n};\r\n\r\nscheduler.set_actions=function(){\r\n\tfor (const a in this._els){\r\n\t\tif (this._click[a]){\r\n\t\t\tfor (let i=0; i < this._els[a].length; i++){\r\n\t\t\t\tconst element = this._els[a][i];\r\n\t\t\t\tconst handler = this._click[a].bind(element);\r\n\t\t\t\tdomEventsScope.attach(element, \"click\", handler);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tdomEventsScope.attach(this._obj, \"selectstart\", function(e){\r\n\t\te.preventDefault();\r\n\t\treturn false;\r\n\t});\r\n\t//this._obj.onselectstart=function(e){ return false; };\r\n\tdomEventsScope.attach(this._obj, \"mousemove\", function(e){\r\n\t\tif (!scheduler._temp_touch_block)\r\n\t\t\tscheduler._on_mouse_move(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"mousedown\", function(e){\r\n\t\tif (!scheduler._ignore_next_click)\r\n\t\t\tscheduler._on_mouse_down(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"mouseup\", function(e){\r\n\t\tif (!scheduler._ignore_next_click)\r\n\t\t\tscheduler._on_mouse_up(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"dblclick\", function(e){\r\n\t\tscheduler._on_dbl_click(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"contextmenu\", function(event) {\r\n\t\tif(scheduler.checkEvent(\"onContextMenu\")){\r\n\t\t\t// block the default browser context menu \r\n\t\t\tevent.preventDefault();\r\n\t\t}\r\n\r\n\t\tconst returnValue = scheduler.callEvent(\"onContextMenu\", [scheduler._locate_event(event.target), event]);\r\n\t\treturn returnValue;\r\n\t});\r\n};\r\nscheduler.select=function(id){\r\n\tif (this._select_id==id) return;\r\n\tscheduler._close_not_saved();\r\n\tthis.editStop(false);\r\n\tif(this._select_id){\r\n\t\tthis.unselect();\r\n\t}\r\n\tthis._select_id = id;\r\n\tthis.updateEvent(id);\r\n\tthis.callEvent(\"onEventSelected\", [id]);\r\n};\r\nscheduler.unselect=function(id){\r\n\tif (id && id!=this._select_id) {\r\n\t\treturn;\r\n\t}\r\n\tconst previousSelection = this._select_id;\r\n\tthis._select_id = null;\r\n\tif (previousSelection && this.getEvent(previousSelection)) {\r\n\t\tthis.updateEvent(previousSelection);\r\n\t}\r\n\tthis.callEvent(\"onEventUnselected\", [previousSelection]);\r\n};\r\nscheduler.$stateProvider.registerProvider(\"global\", (function(){\r\n\treturn {\r\n\t\tmode: this._mode,\r\n\t\tdate: new Date(this._date),\r\n\t\tmin_date: new Date(this._min_date),\r\n\t\tmax_date: new Date(this._max_date),\r\n\t\teditor_id: this._edit_id,\r\n\t\tlightbox_id: this._lightbox_id,\r\n\t\tnew_event: this._new_event,\r\n\t\tselect_id: this._select_id,\r\n\t\texpanded: this.expanded,\r\n\t\tdrag_id: this._drag_id,\r\n\t\tdrag_mode: this._drag_mode\r\n\t};\r\n}).bind(scheduler));\r\n\r\nscheduler._click={\r\n\tdhx_cal_data:function(e){\r\n\t\t//in case of touch disable click processing\r\n\t\tif (scheduler._ignore_next_click){\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\r\n\t\tconst id = scheduler._locate_event(e.target);\r\n\r\n\t\tif (!id) {\r\n\t\t\tscheduler.callEvent(\"onEmptyClick\",[scheduler.getActionData(e).date, e]);\r\n\t\t} else {\r\n\t\t\tif ( !scheduler.callEvent(\"onClick\",[id,e]) || scheduler.config.readonly ) return;\r\n\t\t}\r\n\r\n\t\tif (id && scheduler.config.select) {\r\n\r\n\t\t\tscheduler.select(id);\r\n\t\t\tconst icon = e.target.closest(\".dhx_menu_icon\");\r\n\r\n\t\t\tconst mask = scheduler._getClassName(icon);\r\n\t\t\tif (mask.indexOf(\"_icon\")!=-1)\r\n\t\t\t\tscheduler._click.buttons[mask.split(\" \")[1].replace(\"icon_\",\"\")](id);\r\n\t\t} else{\r\n\t\t\tscheduler._close_not_saved();\r\n\t\t\tif (scheduler.getState().select_id && new Date().valueOf()-(scheduler._new_event||0) > 500){\r\n\t\t\t\tscheduler.unselect();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tdhx_cal_prev_button:function(){\r\n\t\tscheduler._click.dhx_cal_next_button(0,-1);\r\n\t},\r\n\tdhx_cal_next_button:function(dummy,step){\r\n\t\tlet def_step = 1;\r\n\t\tif (scheduler.config.rtl){\r\n\t\t\tstep = -step;\r\n\t\t\tdef_step = -def_step;\r\n\t\t}\r\n\t\tscheduler.setCurrentView(scheduler.date.add( //next line changes scheduler._date , but seems it has not side-effects\r\n\t\t\tscheduler.date[scheduler._mode+\"_start\"](new Date(scheduler._date)),(step||def_step),scheduler._mode));\r\n\t},\r\n\tdhx_cal_today_button:function(){\r\n\t\tif (scheduler.callEvent(\"onBeforeTodayDisplayed\", [])) {\r\n\t\t\tscheduler.setCurrentView(scheduler._currentDate());\r\n\t\t}\r\n\t},\r\n\tdhx_cal_tab:function(){\r\n\t\tconst name = this.getAttribute(\"data-tab\");\r\n\t\tconst deprecated_name = this.getAttribute(\"name\");\r\n\t\tconst mode = name || deprecated_name.substring(0, deprecated_name.search(\"_tab\"));\r\n\t\tscheduler.setCurrentView(scheduler._date,mode);\r\n\t},\r\n\tbuttons:{\r\n\t\t\"delete\":function(id){\r\n\t\t\tconst c = scheduler.locale.labels.confirm_deleting;\r\n\t\t\tscheduler._dhtmlx_confirm({message: c, title: scheduler.locale.labels.title_confirm_deleting, callback:function(){ scheduler.deleteEvent(id); },\r\n\t\t\tconfig: {ok: scheduler.locale.labels.icon_delete}\r\n\t\t});\r\n\t\t},\r\n\t\tedit:function(id){ scheduler.edit(id); },\r\n\t\tsave:function(id){ scheduler.editStop(true); },\r\n\t\tdetails:function(id){ scheduler.showLightbox(id); },\r\n\t\tform:function(id){ scheduler.showLightbox(id); },\r\n\t\tcancel:function(id){ scheduler.editStop(false); }\r\n\t}\r\n};\r\nscheduler._dhtmlx_confirm = function({message, title, callback, config}) {\r\n\tif (!message)\r\n\t\treturn callback();\r\n\r\n\tconfig = config || {};\r\n\tconst opts = { ...config, text: message };\r\n\tif (title) {\r\n\t\topts.title = title;\r\n\t}\r\n\tif (callback) {\r\n\t\topts.callback = function(result) {\r\n\t\t\tif (result) {\r\n\t\t\t\tcallback();\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\tscheduler.confirm(opts);\r\n};\r\nscheduler.addEventNow=function(start,end,e){\r\n\tlet base = {};\r\n\tif (scheduler._isObject(start) && !scheduler._isDate(start)){\r\n\t\tbase = start;\r\n\t\tstart = null;\r\n\t}\r\n\r\n\tconst duration = (this.config.event_duration||this.config.time_step)*60000;\r\n\tif (!start) start = base.start_date||Math.round((scheduler._currentDate()).valueOf()/duration)*duration;\r\n\tlet start_date = new Date(start);\r\n\tif (!end){\r\n\t\tlet start_hour = this.config.first_hour;\r\n\t\tif (start_hour > start_date.getHours()){\r\n\t\t\tstart_date.setHours(start_hour);\r\n\t\t\tstart = start_date.valueOf();\r\n\t\t}\r\n\t\tend = start.valueOf()+duration;\r\n\t}\r\n\tlet end_date = new Date(end);\r\n\r\n\t// scheduler.addEventNow(new Date(), new Date()) + collision though get_visible events defect (such event was not retrieved)\r\n\tif(start_date.valueOf() == end_date.valueOf())\r\n\t\tend_date.setTime(end_date.valueOf()+duration);\r\n\tbase.start_date = base.start_date||start_date;\r\n\tbase.end_date = base.end_date||end_date;\r\n\tbase.text = base.text||this.locale.labels.new_event;\r\n\tbase.id = this._drag_id = base.id || this.uid();\r\n\tthis._drag_mode=\"new-size\";\r\n\tthis._loading=true;\r\n\tconst eventId = this.addEvent(base);\r\n\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\tthis._loading=false;\r\n\r\n\tthis._drag_event={}; //dummy , to trigger correct event updating logic\r\n\tthis._on_mouse_up(e);\r\n\treturn eventId;\r\n};\r\nscheduler._on_dbl_click=function(e,src){\r\n\tsrc = src || e.target;\r\n\tif (this.config.readonly) return;\r\n\tconst name = scheduler._getClassName(src).split(\" \")[0];\r\n\tswitch(name){\r\n\t\tcase \"dhx_scale_holder\":\r\n\t\tcase \"dhx_scale_holder_now\":\r\n\t\tcase \"dhx_month_body\":\r\n\t\tcase \"dhx_wa_day_data\":\r\n\t\t\tif (!scheduler.config.dblclick_create) break;\r\n\t\t\tthis.addEventNow(this.getActionData(e).date,null,e);\r\n\t\t\tbreak;\r\n\t\tcase \"dhx_cal_event\":\r\n\t\tcase \"dhx_wa_ev_body\":\r\n\t\tcase \"dhx_agenda_line\":\r\n\t\tcase \"dhx_cal_agenda_event_line\":\r\n\t\tcase \"dhx_grid_event\":\r\n\t\tcase \"dhx_cal_event_line\":\r\n\t\tcase \"dhx_cal_event_clear\": {\r\n\t\t\tconst id = this._locate_event(src);\r\n\t\t\tif (!this.callEvent(\"onDblClick\",[id,e])) return;\r\n\t\t\tif (this.config.details_on_dblclick || this._table_view || !this.getEvent(id)._timed || !this.config.select)\r\n\t\t\t\tthis.showLightbox(id);\r\n\t\t\telse\r\n\t\t\t\tthis.edit(id);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcase \"dhx_time_block\":\r\n\t\tcase \"dhx_cal_container\":\r\n\t\t\treturn;\r\n\t\tdefault: {\r\n\t\t\tconst viewHandler = this[\"dblclick_\"+name];\r\n\t\t\tif (viewHandler) {\r\n\t\t\t\tviewHandler.call(this,e);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif (src.parentNode && src != this)\r\n\t\t\t\t\treturn scheduler._on_dbl_click(e,src.parentNode);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n};\r\n//column index by mouse x-coordinate\r\nscheduler._get_column_index = function(x_pos){\r\n\tlet column = 0;\r\n\tif (this._cols){\r\n\t\tlet width = 0;\r\n\t\tlet i = 0;\r\n\t\twhile (width + this._cols[i] < x_pos && i < this._cols.length){\r\n\t\t\twidth += this._cols[i];\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tcolumn = i + (this._cols[i] ? ((x_pos - width)/ this._cols[i]) : 0);\r\n\r\n\t\tif (this._ignores){\r\n\t\t\tif(column >= this._cols.length){\r\n\t\t\t\twhile(column >= 1 && this._ignores[Math.floor(column)]){\r\n\t\t\t\t\tcolumn--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n\treturn column;\r\n};\r\n\r\n//transform mouse coordinates to day-time indexes of week based view\r\nscheduler._week_indexes_from_pos = function(pos){\r\n\t//\"get position\" can be invoked before columns are loaded into the units view(e.g. by onMouseMove handler in key_nav.js)\r\n\tif(!this._cols){\r\n\t\treturn pos;\r\n\t}else{\r\n\t\tconst column = this._get_column_index(pos.x);\r\n\r\n\t\tpos.x=Math.min(this._cols.length-1, Math.max(0,Math.ceil(column)-1));\r\n\t\tpos.y=Math.max(0,Math.ceil(pos.y*60/(this.config.time_step*this.config.hour_size_px))-1)+this.config.first_hour*(60/this.config.time_step);\r\n\t\treturn pos;\r\n\t}\r\n};\r\n\r\nscheduler._mouse_coords=function(ev){\r\n\tlet pos;\r\n\tconst body = document.body;\r\n\tconst documentElement = document.documentElement;\r\n\tif (!this.$env.isIE && (ev.pageX || ev.pageY))\r\n\t\tpos={x:ev.pageX, y:ev.pageY};\r\n\telse pos={\r\n\t\tx:ev.clientX + (body.scrollLeft||documentElement.scrollLeft||0) - body.clientLeft,\r\n\t\ty:ev.clientY + (body.scrollTop||documentElement.scrollTop||0) - body.clientTop\r\n\t};\r\n\t//apply layout\r\n\tif (this.config.rtl && this._colsS) {\r\n\t\tpos.x = this.$container.querySelector(\".dhx_cal_data\").offsetWidth - pos.x;\r\n\t\tpos.x += this.$domHelpers.getAbsoluteLeft(this._obj);\r\n\t\tif (this._mode !== \"month\") {\r\n\t\t\tpos.x -= this.xy.scale_width;\r\n\t\t}\r\n\t} else {\r\n\t\tpos.x-=this.$domHelpers.getAbsoluteLeft(this._obj)+(this._table_view?0:this.xy.scale_width);\r\n\t}\r\n\r\n\tconst dataArea = this.$container.querySelector(\".dhx_cal_data\");\r\n\t//pos.y-=this.$domHelpers.getAbsoluteTop(this._obj)+this.xy.nav_height+(this._dy_shift||0)+this.xy.scale_height-this._els[\"dhx_cal_data\"][0].scrollTop;\r\n\tpos.y-=this.$domHelpers.getAbsoluteTop(dataArea)-this._els[\"dhx_cal_data\"][0].scrollTop;\r\n\tpos.ev = ev;\r\n\tconst handler = this[\"mouse_\"+this._mode];\r\n\tif (handler){\r\n\t\tpos = handler.call(this,pos);\r\n\t}else{\r\n\t\t//transform to date\r\n\t\tif (!this._table_view) {\r\n\t\t\tpos = this._week_indexes_from_pos(pos);\r\n\t\t} else {\r\n\t\t\tconst column = this._get_column_index(pos.x);\r\n\t\t\tif (!this._cols || !this._colsS) // agenda/map views\r\n\t\t\t\treturn pos;\r\n\t\t\tlet dy=0;\r\n\t\t\tfor (dy=1; dy < this._colsS.heights.length; dy++)\r\n\t\t\t\tif (this._colsS.heights[dy]>pos.y) break;\r\n\r\n\t\t\tpos.y=Math.ceil( (Math.max(0, column)+Math.max(0,dy-1)*7)*24*60/this.config.time_step );\r\n\r\n\t\t\tif (scheduler._drag_mode || this._mode == \"month\")\r\n\t\t\t\tpos.y=(Math.max(0,Math.ceil(column)-1)+Math.max(0,dy-1)*7)*24*60/this.config.time_step;\r\n\r\n\t\t\t//we care about ignored days only during event moving in month view\r\n\t\t\tif (this._drag_mode == \"move\"){\r\n\t\t\t\tif (scheduler._ignores_detected && scheduler.config.preserve_length){\r\n\t\t\t\t\tpos._ignores = true;\r\n\t\t\t\t\t//get real lengtn of event\r\n\t\t\t\t\tif (!this._drag_event._event_length)\r\n\t\t\t\t\t\tthis._drag_event._event_length = this._get_real_event_length(this._drag_event.start_date, this._drag_event.end_date, { x_step:1, x_unit:\"day\"});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tpos.x=0;\r\n\t\t}\r\n\t}\r\n\tpos.timestamp = +new Date();\r\n\treturn pos;\r\n};\r\nscheduler._close_not_saved=function(){\r\n\tif (new Date().valueOf()-(scheduler._new_event||0) > 500 && scheduler._edit_id){\r\n\t\tconst confirmationText=scheduler.locale.labels.confirm_closing;\r\n\r\n\t\tscheduler._dhtmlx_confirm({\r\n\t\t\tmessage: confirmationText, \r\n\t\t\ttitle: scheduler.locale.labels.title_confirm_closing, \r\n\t\t\tcallback: function() { \r\n\t\t\t\tscheduler.editStop(scheduler.config.positive_closing);\r\n\t\t\t}\r\n\t\t});\r\n\t\tif(confirmationText){\r\n\t\t\tthis._drag_id = this._drag_pos = this._drag_mode = null;\r\n\t\t}\r\n\t}\r\n};\r\nscheduler._correct_shift=function(start, back){\r\n\treturn start-=((new Date(scheduler._min_date)).getTimezoneOffset()-(new Date(start)).getTimezoneOffset())*60000*(back?-1:1);\r\n};\r\n\r\nscheduler._is_pos_changed = function(old_pos, new_pos){\r\n\tfunction diff(old_val, new_val, acc){\r\n\t\treturn !!(Math.abs(old_val - new_val) > acc);\r\n\t}\r\n\r\n\tif(!(old_pos && this._drag_pos)){\r\n\t\treturn true;\r\n\t}\r\n\tconst delay = 100;\r\n\tconst d_pos = 5;\r\n\r\n\t// start drag only if passed some time since mouse down, or if mouse position changed sufficiently\r\n\treturn !!(this._drag_pos.has_moved || !this._drag_pos.timestamp || (new_pos.timestamp - this._drag_pos.timestamp > delay) || diff(old_pos.ev.clientX, new_pos.ev.clientX, d_pos) || diff(old_pos.ev.clientY, new_pos.ev.clientY, d_pos));\r\n};\r\n\r\nscheduler._correct_drag_start_date = function(start){\r\n\tlet obj;\r\n\tif (scheduler.matrix)\r\n\t\tobj = scheduler.matrix[scheduler._mode];\r\n\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\tstart = new Date(start);\r\n\tlet len = 1;\r\n\tif(obj._start_correction || obj._end_correction)\r\n\t\tlen = (obj.last_hour||0)*60 - (start.getHours()*60+start.getMinutes()) || 1;\r\n\r\n\treturn start*1 + (scheduler._get_fictional_event_length(start, len, obj) - len);\r\n};\r\nscheduler._correct_drag_end_date = function(start, duration){\r\n\tlet obj;\r\n\tif (scheduler.matrix) {\r\n\t\tobj = scheduler.matrix[scheduler._mode];\r\n\t}\r\n\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\tconst end = start*1 + scheduler._get_fictional_event_length(start, duration, obj);\r\n\treturn new Date(end*1 - (scheduler._get_fictional_event_length(end, -1, obj, -1) + 1));\r\n};\r\n\r\nscheduler._on_mouse_move=function(e){\r\n\tif (this._drag_mode){\r\n\t\tvar pos=this._mouse_coords(e);\r\n\t\tif (this._is_pos_changed(this._drag_pos, pos)){\r\n\t\t\tvar start, end;\r\n\t\t\tif (this._edit_id!=this._drag_id)\r\n\t\t\t\tthis._close_not_saved();\r\n\r\n\t\t\tif(!this._drag_mode)\r\n\t\t\t\treturn;\r\n\r\n\t\t\tvar mousedownPos = null;\r\n\t\t\tif(this._drag_pos && !this._drag_pos.has_moved){\r\n\t\t\t\tmousedownPos = this._drag_pos;\r\n\t\t\t\tmousedownPos.has_moved = true;\r\n\t\t\t}\r\n\r\n\t\t\tthis._drag_pos = pos;\r\n\r\n\t\t\tthis._drag_pos.has_moved = true;\r\n\r\n\t\t\tif (this._drag_mode==\"create\"){\r\n\r\n\t\t\t\t// use mouse down position as a starting point for drag-create\r\n\t\t\t\tif(mousedownPos){\r\n\t\t\t\t\tpos = mousedownPos;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._close_not_saved();\r\n\t\t\t\tthis.unselect(this._select_id);\r\n\t\t\t\tthis._loading=true; //will be ignored by dataprocessor\r\n\r\n\t\t\t\tstart = this._get_date_from_pos(pos).valueOf();\r\n\r\n\t\t\t\tif (!this._drag_start) {\r\n\t\t\t\t\tvar res = this.callEvent(\"onBeforeEventCreated\", [e, this._drag_id]);\r\n\t\t\t\t\tif (!res){\r\n\t\t\t\t\t\tthis._loading=false;\r\n\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis._loading=false;\r\n\t\t\t\t\tthis._drag_start=start;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tend = start;\r\n\t\t\t\tif (end == this._drag_start) {\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar start_date = new Date(this._drag_start);\r\n\t\t\t\tvar end_date = new Date(end);\r\n\t\t\t\tif ( (this._mode == \"day\" || this._mode == \"week\") &&\r\n\t\t\t\t\t(start_date.getHours() == end_date.getHours() &&\r\n\t\t\t\t\tstart_date.getMinutes() == end_date.getMinutes()) ) {\r\n\t\t\t\t\t\tend_date = new Date(this._drag_start+1000);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\tthis._drag_id=this.uid();\r\n\t\t\t\tthis.addEvent(start_date, end_date, this.locale.labels.new_event, this._drag_id, pos.fields);\r\n\r\n\t\t\t\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\t\t\t\tthis._loading=false;\r\n\t\t\t\tthis._drag_mode=\"new-size\";\r\n\r\n\t\t\t}\r\n\r\n\t\t\tvar timeStep = this.config.time_step;\r\n\t\t\tvar ev=this.getEvent(this._drag_id);\r\n\t\t\tvar obj;\r\n\t\t\tif (scheduler.matrix)\r\n\t\t\t\tobj = scheduler.matrix[scheduler._mode];\r\n\t\t\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\t\t\tif (this._drag_mode==\"move\"){\r\n\t\t\t\tstart = this._min_date.valueOf()+(pos.y*this.config.time_step+pos.x*24*60)*60000;\r\n\t\t\t\tif (!pos.custom && this._table_view) {\r\n\t\t\t\t\tstart += this.date.time_part(ev.start_date) * 1000;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!this._table_view && this._dragEventBody && this._drag_event._move_event_shift === undefined) {\r\n\t\t\t\t\tthis._drag_event._move_event_shift = start - ev.start_date;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (this._drag_event._move_event_shift) {\r\n\t\t\t\t\tstart -= this._drag_event._move_event_shift;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstart = this._correct_shift(start);\r\n\r\n\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view && obj){\r\n\r\n\t\t\t\t\tstart = scheduler._correct_drag_start_date(start);\r\n\t\t\t\t\tend = scheduler._correct_drag_end_date(start,this._drag_event._event_length);\r\n\r\n\t\t\t\t} else\r\n\t\t\t\t\tend = ev.end_date.valueOf()-(ev.start_date.valueOf()-start);\r\n\t\t\t} else { // resize\r\n\t\t\t\tstart = ev.start_date.valueOf();\r\n\t\t\t\tend = ev.end_date.valueOf();\r\n\t\t\t\tif (this._table_view) {\r\n\t\t\t\t\tvar resize_date = this._min_date.valueOf()+pos.y*this.config.time_step*60000 + (pos.custom?0:24*60*60000);\r\n\t\t\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\t\t\tresize_date = this._correct_shift(resize_date, false);\r\n\t\t\t\t\t\tif( this._drag_from_start ) {\r\n\t\t\t\t\t\t\tvar day = 24*60*60000;\r\n\t\t\t\t\t\t\tif( resize_date <= scheduler.date.date_part(new Date(end+day-1)).valueOf() ) // to get end time as 23:59:59 and then the day start\r\n\t\t\t\t\t\t\t\tstart = resize_date - day;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tend = resize_date;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif(this.config.preserve_length) {\r\n\t\t\t\t\t\t\tif (pos.resize_from_start) {\r\n\t\t\t\t\t\t\t\tstart = scheduler._correct_drag_start_date(resize_date);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tend = scheduler._correct_drag_end_date(resize_date, 0);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tif (pos.resize_from_start) {\r\n\t\t\t\t\t\t\t\tstart = resize_date;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tend = resize_date;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar end_day_start = this.date.date_part(new Date(ev.end_date.valueOf() - 1)).valueOf();\r\n\t\t\t\t\tvar end_day_date = new Date(end_day_start);\r\n\t\t\t\t\tvar firstHour = this.config.first_hour;\r\n\t\t\t\t\tvar lastHour = this.config.last_hour;\r\n\t\t\t\t\tvar maxY = (lastHour - firstHour) * (60/timeStep);\r\n\r\n\t\t\t\t\tthis.config.time_step = 1;\r\n\t\t\t\t\tvar precisePos = this._mouse_coords(e);\r\n\t\t\t\t\tthis.config.time_step = timeStep;\r\n\r\n\t\t\t\t\tvar minDate = pos.y*timeStep*60000;\r\n\t\t\t\t\tvar maxDate = Math.min(pos.y + 1, maxY)*timeStep*60000;\r\n\t\t\t\t\tvar preciseDate = precisePos.y*60000;\r\n\r\n\t\t\t\t\t// rounding end date to the closest time step\r\n\t\t\t\t\tif(Math.abs(minDate - preciseDate) > Math.abs(maxDate - preciseDate)){\r\n\t\t\t\t\t\tend = end_day_start + maxDate;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tend = end_day_start + minDate;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = end + ((new Date(end)).getTimezoneOffset() - end_day_date.getTimezoneOffset()) * 60000;\r\n\t\t\t\t\tthis._els[\"dhx_cal_data\"][0].style.cursor=\"s-resize\";\r\n\t\t\t\t\tif (this._mode == \"week\" || this._mode == \"day\")\r\n\t\t\t\t\t\tend = this._correct_shift(end);\r\n\t\t\t\t}\r\n\t\t\t\tif (this._drag_mode == \"new-size\") {\r\n\t\t\t\t\tif (end <= this._drag_start){\r\n\t\t\t\t\t\tvar shift = pos.shift||((this._table_view && !pos.custom)?24*60*60000:0);\r\n\t\t\t\t\t\tstart = end-(pos.shift?0:shift);\r\n\t\t\t\t\t\tend = this._drag_start+(shift||(timeStep*60000));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tstart = this._drag_start;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (end<=start)\r\n\t\t\t\t\t\tend=start+timeStep*60000;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar new_end = new Date(end-1);\r\n\t\t\tvar new_start = new Date(start);\r\n\t\t\t//deny drag out of visible scheduler scale in timeline view\r\n\t\t\tif(this._drag_mode==\"move\" && scheduler.config.limit_drag_out &&\r\n\t\t\t\t(+new_start < +scheduler._min_date || +end > +scheduler._max_date)){\r\n\r\n\t\t\t\tif(+ev.start_date < +scheduler._min_date || +ev.end_date > +scheduler._max_date){\r\n\t\t\t\t\t// not move event if it's already outside time scale\r\n\t\t\t\t\tnew_start = new Date(ev.start_date);\r\n\t\t\t\t\tend = new Date(ev.end_date);\r\n\t\t\t\t}else{\r\n\r\n\t\t\t\t\tvar duration = end - new_start;\r\n\r\n\t\t\t\t\tif(+new_start < +scheduler._min_date){\r\n\t\t\t\t\t\tnew_start = new Date(scheduler._min_date);\r\n\t\t\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view){\r\n\t\t\t\t\t\t\tnew_start = new Date(scheduler._correct_drag_start_date(new_start));\r\n\t\t\t\t\t\t\tif(obj._start_correction)\r\n\t\t\t\t\t\t\t\tnew_start = new Date(new_start.valueOf() + obj._start_correction);\r\n\t\t\t\t\t\t\tend = new Date(new_start*1 + this._get_fictional_event_length(new_start, this._drag_event._event_length, obj));\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tend = new Date(+new_start + duration);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tend = new Date(scheduler._max_date);\r\n\r\n\t\t\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view){\r\n\t\t\t\t\t\t\tif(obj._end_correction)\r\n\t\t\t\t\t\t\t\tend = new Date(end.valueOf() - obj._end_correction);\r\n\t\t\t\t\t\t\tend = new Date(end*1 - this._get_fictional_event_length(end, 0, obj, true));\r\n\t\t\t\t\t\t\tnew_start = new Date(end*1 - this._get_fictional_event_length(end, this._drag_event._event_length, obj, true));\r\n\t\t\t\t\t\t\tif(this._ignores_detected){\r\n\t\t\t\t\t\t\t\tnew_start = scheduler.date.add(new_start, obj.x_step, obj.x_unit);\r\n\t\t\t\t\t\t\t\tend = new Date(end*1 - this._get_fictional_event_length(end, 0, obj, true));\r\n\t\t\t\t\t\t\t\tend = scheduler.date.add(end, obj.x_step, obj.x_unit);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tnew_start = new Date(+end - duration);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\tvar new_end = new Date(end-1);\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\t// fix event dates when resized to bottom of the column (day/week views)\r\n\t\t\tif(!this._table_view && this._dragEventBody &&\r\n\t\t\t\t!scheduler.config.all_timed &&\r\n\t\t\t\t((!scheduler._get_section_view() && pos.x != this._get_event_sday({start_date: new Date(start), end_date:new Date(start)})) || new Date(start).getHours() < this.config.first_hour)){\r\n\t\t\t\tvar duration = end - new_start;\r\n\t\t\t\tif (this._drag_mode == \"move\") {\r\n\t\t\t\t\tvar day = this._min_date.valueOf() + (pos.x * 24 * 60) * 60000;\r\n\t\t\t\t\tnew_start = new Date(day);\r\n\t\t\t\t\tnew_start.setHours(this.config.first_hour);\r\n\t\t\t\t\tend = new Date(new_start.valueOf() + duration);\r\n\t\t\t\t\tnew_end = new Date(end-1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// fix event dates when resized to bottom of the column (day/week views)\r\n\t\t\tif(!this._table_view &&\r\n\t\t\t\t!scheduler.config.all_timed &&\r\n\t\t\t\t((!scheduler.getView() && pos.x != this._get_event_sday({start_date: new Date(end), end_date:new Date(end)})) || new Date(end).getHours() >= this.config.last_hour)){\r\n\t\t\t\tvar duration = end - new_start;\r\n\t\t\t\tvar day = this._min_date.valueOf()+(pos.x*24*60)*60000;\r\n\t\t\t\tend = scheduler.date.date_part(new Date(day));\r\n\t\t\t\tend.setHours(this.config.last_hour);\r\n\t\t\t\tnew_end = new Date(end-1);\r\n\t\t\t\tif(this._drag_mode == \"move\"){\r\n\t\t\t\t\tnew_start = new Date(+end - duration);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//prevent out-of-borders situation for day|week view\r\n\t\t\tif ( this._table_view || (new_end.getDate()==new_start.getDate() && new_end.getHours()=ed)\r\n\t\t\t\tcls += ' dhx_after';\r\n\t\t\telse if (sd.valueOf()==cd.valueOf())\r\n\t\t\t\tcls += ' dhx_now';\r\n\r\n\t\t\tif (this._ignores_detected && this._ignores[j]){\r\n\t\t\t\tcls += \" dhx_scale_ignore\";\r\n\t\t\t}\r\n\r\n\t\t\tcell.className = cls + \" \" + this.templates.month_date_class(sd, cd);\r\n\r\n\t\t\tcell.setAttribute(\"data-cell-date\", scheduler.templates.format_date(sd));\r\n\t\t\tvar body_class = \"dhx_month_body\";\r\n\t\t\tvar head_class = \"dhx_month_head\";\r\n\t\t\tif (j === 0 && this.config.left_border) {\r\n\t\t\t\tbody_class += \" dhx_month_body_border\";\r\n\t\t\t\thead_class += \" dhx_month_head_border\";\r\n\t\t\t}\r\n\t\t\tif (!this._ignores_detected || !this._ignores[j]){\r\n\t\t\t\tcell.style.width = tdwidths[j];\r\n\t\t\t\tthis._waiAria.monthCellAttr(cell, sd);\r\n\r\n\t\t\t\tvar cellHead = document.createElement(\"div\");\r\n\t\t\t\tcellHead.style.height = scheduler.xy.month_head_height + \"px\";\r\n\t\t\t\tcellHead.className = head_class;\r\n\t\t\t\tcellHead.innerHTML = this.templates.month_day(sd);\r\n\t\t\t\tcell.appendChild(cellHead);\r\n\r\n\t\t\t\tvar cellBody = document.createElement(\"div\");\r\n\t\t\t\tcellBody.className = body_class;\r\n\t\t\t\t// cellBody.style.height = row_height + \"px\";\r\n\t\t\t\t// cellBody.style.width = tdwidths[j];\r\n\t\t\t\tcell.appendChild(cellBody);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tcell.appendChild(document.createElement(\"div\"));\r\n\t\t\t\tcell.appendChild(document.createElement(\"div\"));\r\n\t\t\t}\r\n\t\t\trendered_dates.push(sd);\r\n\t\t\tvar bf1 = sd.getDate();\r\n\t\t\tsd=this.date.add(sd,1,\"day\");\r\n\t\t\tif (sd.getDate() - bf1 > 1)\r\n\t\t\t\tsd = new Date(sd.getFullYear(), sd.getMonth(), bf1 + 1, 12, 0);\r\n\t\t}\r\n\r\n\t\tscheduler._colsS.heights[i] = cellheight;\r\n\t\tcellheight += getCellHeight(i);\r\n\t}\r\n\r\n\tthis._min_date = view_start;\r\n\tthis._max_date = sd;\r\n\r\n\tdiv.innerHTML = \"\";\r\n\tdiv.appendChild(table);\r\n\r\n\tthis._scales = {};\r\n\tvar cells = div.querySelectorAll('[data-cell-date]');\r\n\tcells.forEach((cell) => {\r\n\t\tconst date = scheduler.templates.parse_date(cell.getAttribute(\"data-cell-date\"));\r\n\t\tconst body = cell.querySelector(\".dhx_month_body\");\r\n\t\tthis._scales[+date] = body;\r\n\t\tthis.callEvent(\"onScaleAdd\", [this._scales[+date], date]);\r\n\t});\r\n\r\n\treturn this._max_date;\r\n};\r\n\r\nscheduler._reset_month_scale=function(b,dd,sd,rows){\r\n\t//recalculates rows height and redraws month layout\r\n\tvar ed=scheduler.date.add(dd,1,\"month\");\r\n\r\n\t//trim time part for comparison reasons\r\n\tvar cd = scheduler._currentDate();\r\n\tthis.date.date_part(cd);\r\n\tthis.date.date_part(sd);\r\n\r\n\trows = rows || Math.ceil(Math.round((ed.valueOf()-sd.valueOf()) / (60*60*24*1000) ) / 7);\r\n\r\n\tvar height = (Math.floor(b.clientHeight/rows) - this.xy.month_head_height);\r\n\r\n\tthis._colsS.height = height + this.xy.month_head_height;\r\n\tthis._colsS.heights = [];\r\n\r\n\treturn scheduler._render_month_scale(b, dd, sd, rows);\r\n\r\n};\r\n\r\nscheduler.getView = function (viewName) {\r\n\tif (!viewName) {\r\n\t\tviewName = scheduler.getState().mode;\r\n\t}\r\n\tif (scheduler.matrix && scheduler.matrix[viewName]) {\r\n\t\treturn scheduler.matrix[viewName];\r\n\t}\r\n\r\n\tif (scheduler._props && scheduler._props[viewName]) {\r\n\t\treturn scheduler._props[viewName];\r\n\t}\r\n\r\n\treturn null;\r\n};\r\n\r\nscheduler.getLabel = function(property, key) {\r\n\tvar sections = this.config.lightbox.sections;\r\n\tfor (var i=0; i scheduler.getState().max_date.valueOf()){\r\n\t\t\tendColumnIndex += getDaysDifference(endDate, scheduler.getState().max_date);\r\n\t\t}\r\n\t} else{\r\n\t\tendColumnIndex = Math.round(eventLength/60/60/1000/24);\r\n\t}\r\n\r\n\tvar last_column = true;\r\n\twhile (startColumnIndex < endColumnIndex){\r\n\t\tvar check = scheduler.date.add(endDate, -config.x_step, config.x_unit);\r\n\t\tif (ignore && ignore(endDate) && (!last_column || (last_column && ignore(check) ))){\r\n\t\t\teventLength -= (endDate-check);\r\n\r\n\t\t}else{\r\n\t\t\tlet excludedDuration = 0;\r\n\t\t\tconst intervalStart = new Date(Math.max(check.valueOf(), startDate.valueOf()));\r\n\t\t\tconst intervalEnd = endDate;\r\n\t\t\tconst leftCellCutOffStart = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.first_hour);\r\n\t\t\tconst leftCellCutOffEnd = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.last_hour||24);\r\n\t\t\tconst rightCellCutOffStart = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.first_hour);\r\n\t\t\tconst rightCellCutOffEnd = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.last_hour||24);\r\n\r\n\t\t\tif(intervalEnd.valueOf() > rightCellCutOffEnd.valueOf()){\r\n\t\t\t\texcludedDuration += intervalEnd - rightCellCutOffEnd;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalEnd.valueOf() > rightCellCutOffStart.valueOf()){\r\n\t\t\t\texcludedDuration += config._start_correction;\r\n\t\t\t} else {\r\n\t\t\t\texcludedDuration += intervalEnd.getHours()*60*60*1000 + intervalEnd.getMinutes()*60*1000;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalStart.valueOf() < leftCellCutOffEnd.valueOf()){\r\n\t\t\t\texcludedDuration += config._end_correction;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalStart.valueOf() < leftCellCutOffStart.valueOf()){\r\n\t\t\t\texcludedDuration += (leftCellCutOffStart.valueOf() - intervalStart.valueOf());\r\n\t\t\t}\r\n\t\t\t\r\n\r\n\t\t\teventLength -= excludedDuration;\r\n\t\t\tlast_column = false;\r\n\t\t}\r\n\t\tendDate = check;\r\n\t\tendColumnIndex--;\r\n\t}\r\n\treturn eventLength;\r\n};\r\nscheduler._get_fictional_event_length=function(end_date, ev_length, obj, back){\r\n\tvar sd = new Date(end_date);\r\n\tvar dir = back ? -1 : 1;\r\n\r\n\t//get difference caused by first|last hour\r\n\tif (obj._start_correction || obj._end_correction){\r\n\t\tvar today;\r\n\t\tif (back)\r\n\t\t\ttoday = (sd.getHours()*60+sd.getMinutes()) - (obj.first_hour||0)*60;\r\n\t\telse\r\n\t\t\ttoday = (obj.last_hour||0)*60 - (sd.getHours()*60+sd.getMinutes());\r\n\t\tvar per_day = (obj.last_hour - obj.first_hour)*60;\r\n\t\tvar days = Math.ceil( (ev_length / (60*1000) - today ) / per_day);\r\n\t\tif(days < 0) days = 0;\r\n\t\tev_length += days * (24*60 - per_day) * 60 * 1000;\r\n\t}\r\n\r\n\tvar fd = new Date(end_date*1+ev_length*dir);\r\n\tvar ignore = this[\"ignore_\"+this._mode];\r\n\r\n\tvar start_slot = 0,\r\n\t\tend_slot;\r\n\tif (obj.render){\r\n\t\tstart_slot = this._get_date_index(obj, sd);\r\n\t\tend_slot = this._get_date_index(obj, fd);\r\n\t} else{\r\n\t\tend_slot = Math.round(ev_length/60/60/1000/24);\r\n\t}\r\n\r\n\twhile (start_slot*dir <= end_slot*dir){\r\n\t\tvar check = scheduler.date.add(sd, obj.x_step*dir, obj.x_unit);\r\n\t\tif (ignore && ignore(sd)){\r\n\t\t\tev_length += (check-sd)*dir;\r\n\t\t\tend_slot += dir;\r\n\t\t}\r\n\r\n\t\tsd = check;\r\n\t\tstart_slot+=dir;\r\n\t}\r\n\r\n\treturn ev_length;\r\n};\r\n\r\nscheduler._get_section_view = function(){\r\n\treturn this.getView();\r\n};\r\n\r\nscheduler._get_section_property = function(){\r\n\tif(this.matrix && this.matrix[this._mode]){\r\n\t\treturn this.matrix[this._mode].y_property;\r\n\t}else if(this._props && this._props[this._mode]){\r\n\t\treturn this._props[this._mode].map_to;\r\n\t}\r\n\treturn null;\r\n};\r\n\r\nscheduler._is_initialized = function(){\r\n\tvar state = this.getState();\r\n\treturn (this._obj && state.date && state.mode);\r\n};\r\nscheduler._is_lightbox_open = function(){\r\n\tvar state = this.getState();\r\n\treturn state.lightbox_id !== null && state.lightbox_id !== undefined;\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n(function(){\r\n\r\n\t// eslint-disable-next-line no-control-regex\r\n\tvar htmlTags = new RegExp(\"<(?:.|\\n)*?>\", \"gm\");\r\n\tvar extraSpaces = new RegExp(\" +\", \"gm\");\r\n\r\n\tfunction stripHTMLLite(htmlText){\r\n\t\treturn (htmlText + \"\")\r\n\t\t\t.replace(htmlTags, \" \").\r\n\t\t\treplace(extraSpaces, \" \");\r\n\t}\r\n\r\n\tvar singleQuotes = new RegExp(\"'\", \"gm\");\r\n\tfunction escapeQuotes(text){\r\n\t\treturn (text + \"\").replace(singleQuotes, \"'\");\r\n\t}\r\n\r\n\tscheduler._waiAria = {\r\n\t\tgetAttributeString: function(attr){\r\n\t\t\tvar attributes = [\" \"];\r\n\t\t\tfor(var i in attr){\r\n\t\t\t\tif(typeof attr[i] != \"function\" && typeof attr[i] != \"object\") {\r\n\t\t\t\t\tvar text = escapeQuotes(stripHTMLLite(attr[i]));\r\n\t\t\t\t\tattributes.push(i + \"='\" + text + \"'\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tattributes.push(\" \");\r\n\t\t\treturn attributes.join(\" \");\r\n\t\t},\r\n\t\tsetAttributes: function(div, values){\r\n\t\t\tfor(var i in values){\r\n\t\t\t\tdiv.setAttribute(i, stripHTMLLite(values[i]));\r\n\t\t\t}\r\n\t\t\treturn div;\r\n\t\t},\r\n\r\n\t\tlabelAttr: function(div, content){\r\n\t\t\treturn this.setAttributes(div, {\"aria-label\": content});\r\n\t\t},\r\n\t\tlabel: function(label){\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": label});\r\n\t\t},\r\n\r\n\t\t// day/week/units\r\n\r\n\t\thourScaleAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\r\n\t\t},\r\n\t\tmonthCellAttr: function(div, date){\r\n\t\t\tthis.labelAttr(div, scheduler.templates.day_date(date));\r\n\t\t},\r\n\r\n\t\tnavBarDateAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\t\t},\r\n\t\tdayHeaderAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\t\t},\r\n\r\n\t\tdayColumnAttr: function(div, date){\r\n\t\t\tthis.dayHeaderAttr(div, scheduler.templates.day_date(date));\r\n\t\t},\r\n\r\n\t\theaderButtonsAttributes: function(div, label){\r\n\t\t\treturn this.setAttributes(div, {\"role\":\"button\", \"aria-label\":label});\r\n\t\t},\r\n\r\n\t\theaderToggleState: function(div, isActive){\r\n\t\t\treturn this.setAttributes(div, {\"aria-pressed\": isActive ? \"true\" : \"false\"});\r\n\t\t},\r\n\r\n\r\n\t\tgetHeaderCellAttr:function(dateString){\r\n\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": dateString});\r\n\t\t},\r\n\r\n\r\n\t\teventAttr: function(event, div){\r\n\t\t\tthis._eventCommonAttr(event, div);\r\n\t\t},\r\n\r\n\r\n\t\t_eventCommonAttr: function(event, div){\r\n\t\t\tdiv.setAttribute(\"aria-label\", stripHTMLLite(scheduler.templates.event_text(event.start_date, event.end_date, event)));\r\n\r\n\t\t\tif(scheduler.config.readonly){\r\n\t\t\t\tdiv.setAttribute(\"aria-readonly\", true);\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif(event.$dataprocessor_class){\r\n\t\t\t\tdiv.setAttribute(\"aria-busy\", true);\r\n\t\t\t}\r\n\r\n\r\n\t\t\tdiv.setAttribute(\"aria-selected\",\r\n\t\t\t\t(scheduler.getState().select_id == event.id) ? \"true\" : \"false\");\r\n\t\t},\r\n\r\n\t\tsetEventBarAttr: function(event, div){\r\n\t\t\tthis._eventCommonAttr(event, div);\r\n\t\t},\r\n\r\n\t\t_getAttributes: function(attributeSetter, arg){\r\n\t\t\tvar result = {\r\n\t\t\t\tsetAttribute:function(name, value){\r\n\t\t\t\t\tthis[name] = value;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\tattributeSetter.apply(this, [arg, result]);\r\n\t\t\treturn result;\r\n\r\n\t\t},\r\n\r\n\t\teventBarAttrString: function(event){\r\n\t\t\treturn this.getAttributeString(this._getAttributes(this.setEventBarAttr, event));\r\n\t\t},\r\n\r\n\r\n\r\n\t\tagendaHeadAttrString :function(){\r\n\t\t\treturn this.getAttributeString({role: \"row\"});\r\n\t\t},\r\n\t\tagendaHeadDateString :function(label){\r\n\t\t\treturn this.getAttributeString({role: \"columnheader\", \"aria-label\": label});\r\n\t\t},\r\n\t\tagendaHeadDescriptionString :function(label){\r\n\t\t\treturn this.agendaHeadDateString(label);\r\n\t\t},\r\n\t\tagendaDataAttrString: function(){\r\n\t\t\treturn this.getAttributeString({role: \"grid\"});\r\n\t\t},\r\n\t\tagendaEventAttrString: function(event){\r\n\t\t\tvar attrs = this._getAttributes(this._eventCommonAttr, event);\r\n\r\n\t\t\tattrs[\"role\"] = \"row\";\r\n\r\n\t\t\treturn this.getAttributeString(attrs);\r\n\r\n\t\t},\r\n\t\tagendaDetailsBtnString: function(){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels.icon_details});\r\n\t\t},\r\n\r\n\r\n\t\tgridAttrString: function(){\r\n\t\t\treturn this.getAttributeString({role: \"grid\"});\r\n\t\t},\r\n\r\n\t\tgridRowAttrString: function(event){\r\n\t\t\treturn this.agendaEventAttrString(event);\r\n\t\t},\r\n\r\n\t\tgridCellAttrString: function(event, column, value){\r\n\t\t\treturn this.getAttributeString({\"role\":\"gridcell\", \"aria-label\": [\r\n\t\t\t\t(column.label === undefined ? column.id : column.label),\r\n\t\t\t\t\": \",\r\n\t\t\t\tvalue\r\n\t\t\t]});\r\n\t\t},\r\n\r\n\t\tmapAttrString: function(){\r\n\t\t\treturn this.gridAttrString();\r\n\t\t},\r\n\t\tmapRowAttrString: function(event){\r\n\t\t\treturn this.gridRowAttrString(event);\r\n\t\t},\r\n\t\tmapDetailsBtnString: function(){\r\n\t\t\treturn this.agendaDetailsBtnString();\r\n\t\t},\r\n\r\n\t\tminicalHeader: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"id\":headerId+\"\",\r\n\t\t\t\t\"aria-live\":\"assertice\",\r\n\t\t\t\t\"aria-atomic\":\"true\"\r\n\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalGrid: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"aria-labelledby\":headerId+\"\",\r\n\t\t\t\t\"role\":\"grid\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalRow: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"row\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalDayCell: function(div, date){\r\n\t\t\tvar selected = (date.valueOf() < scheduler._max_date.valueOf() && date.valueOf() >= scheduler._min_date.valueOf());\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"gridcell\",\r\n\t\t\t\t\"aria-label\": scheduler.templates.day_date(date),\r\n\t\t\t\t\"aria-selected\": selected ? \"true\" : \"false\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalHeadCell: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"columnheader\"\r\n\t\t\t});\r\n\t\t},\r\n\r\n\r\n\t\tweekAgendaDayCell: function(div, date){\r\n\t\t\tvar header = div.querySelector(\".dhx_wa_scale_bar\");\r\n\t\t\tvar content = div.querySelector(\".dhx_wa_day_data\");\r\n\t\t\tvar headerId = scheduler.uid() + \"\";\r\n\t\t\tthis.setAttributes(header, { \"id\": headerId});\r\n\t\t\tthis.setAttributes(content, { \"aria-labelledby\": headerId});\r\n\r\n\t\t},\r\n\t\tweekAgendaEvent: function(div, event){\r\n\t\t\tthis.eventAttr(event, div);\r\n\t\t},\r\n\r\n\t\tlightboxHiddenAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t},\r\n\r\n\t\tlightboxVisibleAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"false\");\r\n\t\t},\r\n\r\n\t\tlightboxSectionButtonAttrString: function(label){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":label, \"tabindex\":\"0\"});\r\n\t\t},\r\n\r\n\t\tyearHeader: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"id\":headerId+\"\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tyearGrid: function(div, headerId){\r\n\t\t\tthis.minicalGrid(div, headerId);\r\n\t\t},\r\n\t\tyearHeadCell: function(div){\r\n\t\t\treturn this.minicalHeadCell(div);\r\n\t\t},\r\n\t\tyearRow: function(div){\r\n\t\t\treturn this.minicalRow(div);\r\n\t\t},\r\n\t\tyearDayCell: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"gridcell\"\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\tlightboxAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t\tdiv.firstChild.setAttribute(\"role\", \"heading\");\r\n\t\t},\r\n\r\n\t\tlightboxButtonAttrString:function(buttonName){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels[buttonName], \"tabindex\":\"0\"});\r\n\t\t},\r\n\t\teventMenuAttrString: function(iconName){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels[iconName]});\r\n\t\t},\r\n\t\tlightboxHeader: function(div, headerText){\r\n\t\t\tdiv.setAttribute(\"aria-label\", headerText);\r\n\t\t},\r\n\r\n\t\tlightboxSelectAttrString: function(time_option){\r\n\t\t\tvar label = \"\";\r\n\r\n\t\t\tswitch (time_option) {\r\n\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.year;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%m\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.month;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%d\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.day;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%H:%i\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.hour + \" \" + scheduler.locale.labels.minute;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": label});\r\n\t\t},\r\n\r\n\r\n\t\tmessageButtonAttrString: function(buttonLabel){\r\n\t\t\treturn \"tabindex='0' role='button' aria-label='\"+buttonLabel+\"'\";\r\n\t\t},\r\n\r\n\t\tmessageInfoAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"alert\");\r\n\t\t\t//div.setAttribute(\"tabindex\", \"-1\");\r\n\t\t},\r\n\r\n\t\tmessageModalAttr: function(div, uid){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t\tif(uid){\r\n\t\t\t\tdiv.setAttribute(\"aria-labelledby\", uid);\r\n\t\t\t}\r\n\r\n\t\t\t//\tdiv.setAttribute(\"tabindex\", \"-1\");\r\n\t\t},\r\n\r\n\t\tquickInfoAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t},\r\n\r\n\t\tquickInfoHeaderAttrString: function(){\r\n\t\t\treturn \" role='heading' \";\r\n\t\t},\r\n\r\n\t\tquickInfoHeader: function(div, header){\r\n\t\t\tdiv.setAttribute(\"aria-label\", header);\r\n\t\t},\r\n\r\n\t\tquickInfoButtonAttrString: function(label){\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"role\":\"button\", \"aria-label\":label, \"tabindex\":\"0\"});\r\n\t\t},\r\n\r\n\t\ttooltipAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"tooltip\");\r\n\t\t},\r\n\r\n\t\ttooltipVisibleAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"false\");\r\n\t\t},\r\n\r\n\t\ttooltipHiddenAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t}\r\n\t};\r\n\r\n\tfunction isDisabled(){\r\n\t\treturn !scheduler.config.wai_aria_attributes;\r\n\t}\r\n\r\n\tfor(var i in scheduler._waiAria){\r\n\t\tscheduler._waiAria[i] = (function(payload){\r\n\t\t\treturn function(){\r\n\t\t\t\tif(isDisabled()){\r\n\t\t\t\t\treturn \" \";\r\n\t\t\t\t}\r\n\t\t\t\treturn payload.apply(this, arguments);\r\n\t\t\t};\r\n\t\t})(scheduler._waiAria[i]);\r\n\t}\r\n\r\n\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\treturn function assert(check, message){\r\n\t\tif (!check){\r\n\t\t\tif(scheduler.config.show_errors && scheduler.callEvent(\"onError\",[message]) !== false) {\r\n\t\t\t\tif (scheduler.message) {\r\n\t\t\t\t\tscheduler.message({type: \"error\", text: message, expire: -1});\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// eslint-disable-next-line\r\n\t\t\t\t\tconsole.log(message);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// eslint-disable-next-line no-debugger\r\n\t\t\t\tdebugger;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n}","export default function extend(scheduler) {\r\n\r\nif (window.jQuery){\r\n\r\n(function( $ ){\r\n\tvar counter = 0;\r\n\tvar methods = [];\r\n\t$.fn.dhx_scheduler = function(config){\r\n\t\tif (typeof(config) === 'string') {\r\n\t\t\tif (methods[config] ) {\r\n\t\t\t\treturn methods[config].apply(this, []);\r\n\t\t\t}else {\r\n\t\t\t\t$.error('Method ' + config + ' does not exist on jQuery.dhx_scheduler');\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvar views = [];\r\n\t\t\tthis.each(function() {\r\n\t\t\t\tif (this && this.getAttribute){\r\n\t\t\t\t\tif (!this.getAttribute(\"dhxscheduler\")){\r\n\t\t\t\t\t\tvar name = \"scheduler\";\r\n\t\t\t\t\t\tif (counter){\r\n\t\t\t\t\t\t\tname = \"scheduler\" + (counter+1);\r\n\t\t\t\t\t\t\twindow[name] = Scheduler.getSchedulerInstance();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tvar comp = window[name];\r\n\r\n\t\t\t\t\t\tthis.setAttribute(\"dhxscheduler\", name);\r\n\t\t\t\t\t\tfor (var key in config)\r\n\t\t\t\t\t\t\tif (key!=\"data\")\r\n\t\t\t\t\t\t\t\tcomp.config[key] = config[key];\r\n\r\n\t\t\t\t\t\tif (!this.getElementsByTagName(\"div\").length){\r\n\t\t\t\t\t\t\tthis.innerHTML = '
';\r\n\t\t\t\t\t\t\tthis.className += \" dhx_cal_container\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcomp.init(this, comp.config.date, comp.config.mode);\r\n\t\t\t\t\t\tif (config.data)\r\n\t\t\t\t\t\t\tcomp.parse(config.data);\r\n\r\n\t\t\t\t\t\tviews.push(comp);\r\n\t\t\t\t\t\tcounter++;\r\n\t\t\t\t\t} else\r\n\t\t\t\t\t\tviews.push(window[this.getAttribute(\"dhxscheduler\")]);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif (views.length === 1) return views[0];\r\n\t\t\treturn views;\r\n\t\t}\r\n\t};\r\n\r\n\r\n\r\n\r\n})(window.jQuery);\r\n\r\n}\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler.destructor = function(){\r\n\tscheduler.callEvent(\"onDestroy\", []);\r\n\tthis.clearAll();\r\n\r\n\tif(this.$container){\r\n\t\t// FIXME: clear container or remove container\r\n\t\tthis.$container.innerHTML = \"\";\r\n\t\t// scheduler.$domHelpers.remove(this.$container);\r\n\t}\r\n\r\n\tif(this._eventRemoveAll){\r\n\t\tthis._eventRemoveAll();\r\n\t}\r\n\r\n\tif(this.resetLightbox){\r\n\t\tthis.resetLightbox();\r\n\t}\r\n\r\n\tif(this._dp && this._dp.destructor){\r\n\t\tthis._dp.destructor();\r\n\t}\r\n\r\n\t// detachAllEvents should be called last, because in components may be attached events\r\n\tthis.detachAllEvents();\r\n\r\n\tfor(var i in this){\r\n\t\tif(i.indexOf(\"$\") === 0){\r\n\t\t\tdelete this[i];\r\n\t\t}\r\n\t}\r\n\tscheduler.$destroyed = true;\r\n};\r\n\r\n}","import serialize from \"../common/url_serialize.js\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler.Promise = window.Promise; \r\n\r\nfunction createConfig(method, args) {\r\n\tvar result = {\r\n\t\tmethod: method\r\n\t};\r\n\r\n\tif (args.length === 0) {\r\n\t\tthrow new Error(\"Arguments list of query is wrong.\");\r\n\t}\r\n\tif (args.length === 1) {\r\n\t\tif (typeof args[0] === \"string\") {\r\n\t\t\tresult.url = args[0];\r\n\t\t\tresult.async = true;\r\n\t\t} else {\r\n\t\t\tresult.url = args[0].url;\r\n\t\t\tresult.async = (args[0].async || true);\r\n\t\t\tresult.callback = args[0].callback;\r\n\t\t\tresult.headers = args[0].headers;\r\n\t\t}\r\n\t\tif (method === \"POST\" || \"PUT\") {\r\n\t\t\tif (args[0].data) {\r\n\t\t\t\tif (typeof args[0].data !== \"string\") {\r\n\t\t\t\t\tresult.data = serialize(args[0].data);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult.data = args[0].data;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tresult.data = \"\";\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n\tresult.url = args[0];\r\n\tswitch(method) {\r\n\t\tcase \"GET\":\r\n\t\tcase \"DELETE\":\r\n\t\t\tresult.callback = args[1];\r\n\t\t\tresult.headers = args[2];\r\n\t\tbreak;\r\n\t\tcase \"POST\":\r\n\t\tcase \"PUT\":\r\n\t\t\tif (args[1]) {\r\n\t\t\t\tif (typeof args[1] !== \"string\") {\r\n\t\t\t\t\tresult.data = serialize(args[1]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult.data = args[1];\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tresult.data = \"\";\r\n\t\t\t}\r\n\t\t\tresult.callback = args[2];\r\n\t\t\tresult.headers = args[3];\r\n\t\tbreak;\r\n\t}\r\n\treturn result;\r\n}\r\nscheduler.ajax = {\r\n\t// if false - dhxr param will added to prevent caching on client side (default),\r\n\t// if true - do not add extra params\r\n\tcache: true,\r\n\r\n\t// default method for load/loadStruct, post/get allowed\r\n\tmethod: \"get\",\r\n\r\n\tserializeRequestParams: serialize,\r\n\tparse: function(data) {\r\n\t\tif (typeof data !== \"string\") return data;\r\n\r\n\t\tvar obj;\r\n\t\tdata = data.replace(/^[\\s]+/,\"\");\r\n\t\tif (typeof DOMParser !== \"undefined\" && !scheduler.$env.isIE) { // ff,ie9\r\n\t\t\tobj = (new DOMParser()).parseFromString(data, \"text/xml\");\r\n\t\t} else if (typeof window.ActiveXObject !== \"undefined\") {\r\n\t\t\tobj = new window.ActiveXObject(\"Microsoft.XMLDOM\");\r\n\t\t\tobj.async = \"false\";\r\n\t\t\tobj.loadXML(data);\r\n\t\t}\r\n\t\treturn obj;\r\n\t},\r\n\txmltop: function(tagname, xhr, obj) {\r\n\t\tif (typeof xhr.status == \"undefined\" || xhr.status < 400) {\r\n\t\t\tvar xml = (!xhr.responseXML) ? this.parse(xhr.responseText || xhr) : (xhr.responseXML || xhr);\r\n\t\t\tif (xml && xml.documentElement !== null && !xml.getElementsByTagName(\"parsererror\").length) {\r\n\t\t\t\treturn xml.getElementsByTagName(tagname)[0];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (obj !== -1) scheduler.callEvent(\"onLoadXMLError\",[\"Incorrect XML\", arguments[1], obj]);\r\n\t\treturn document.createElement(\"DIV\");\r\n\t},\r\n\txpath: function(xpathExp, docObj) {\r\n\t\tif (!docObj.nodeName) docObj = docObj.responseXML || docObj;\r\n\t\tif (scheduler.$env.isIE) {\r\n\t\t\treturn docObj.selectNodes(xpathExp)||[];\r\n\t\t} else {\r\n\t\t\tvar rows = [];\r\n\t\t\tvar first;\r\n\t\t\tvar col = (docObj.ownerDocument||docObj).evaluate(xpathExp, docObj, null, XPathResult.ANY_TYPE, null);\r\n\r\n\t\t\twhile (true){\r\n\t\t\t\tfirst = col.iterateNext();\r\n\t\t\t\tif(first){\r\n\t\t\t\t\trows.push(first);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn rows;\r\n\t\t}\r\n\t},\r\n\tquery: function(config) {\r\n\t\treturn this._call(\r\n\t\t\t(config.method || \"GET\"),\r\n\t\t\tconfig.url,\r\n\t\t\tconfig.data || \"\",\r\n\t\t\t(config.async || true),\r\n\t\t\tconfig.callback,\r\n\t\t\tconfig.headers\r\n\t\t);\r\n\t},\r\n\tget: function(url, onLoad, headers) {\r\n\t\tvar config = createConfig(\"GET\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tgetSync: function(url, headers) {\r\n\t\tvar config = createConfig(\"GET\", arguments);\r\n\t\tconfig.async = false;\r\n\t\treturn this.query(config);\r\n\t},\r\n\tput: function(url, postData, onLoad, headers) {\r\n\t\tvar config = createConfig(\"PUT\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tdel: function(url, onLoad, headers) {\r\n\t\t/**\r\n\t\t * https://tools.ietf.org/html/rfc7231#section-4.3.5\r\n\t\t * A payload within a DELETE request message has no defined semantics;\r\n\t\t * sending a payload body on a DELETE request might cause some existing\r\n\t\t * implementations to reject the request.\r\n\t\t */\r\n\t\tvar config = createConfig(\"DELETE\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tpost: function(url, postData, onLoad, headers) {\r\n\t\tif (arguments.length == 1) {\r\n\t\t\tpostData = \"\";\r\n\t\t} else if (arguments.length == 2 && typeof(postData) == \"function\") {\r\n\t\t\tonLoad = postData;\r\n\t\t\tpostData = \"\";\r\n\t\t}\r\n\t\tvar config = createConfig(\"POST\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tpostSync: function(url, postData, headers) {\r\n\t\tpostData = (postData === null ? \"\" : String(postData));\r\n\r\n\t\tvar config = createConfig(\"POST\", arguments);\r\n\t\tconfig.async = false;\r\n\t\treturn this.query(config);\r\n\t},\r\n\t_call: function(method, url, postData, async, onLoad, headers) {\r\n\t\treturn new scheduler.Promise((function(resolve, reject) {\r\n\t\t\tvar t = (typeof XMLHttpRequest !== undefined && !scheduler.$env.isIE ? new XMLHttpRequest() : new window.ActiveXObject(\"Microsoft.XMLHTTP\"));\r\n\t\t\tvar isQt = (navigator.userAgent.match(/AppleWebKit/) !== null && navigator.userAgent.match(/Qt/) !== null && navigator.userAgent.match(/Safari/) !== null);\r\n\r\n\t\t\tif (!!async) {\r\n\t\t\t\tt.addEventListener(\"readystatechange\", function() {\r\n\t\t\t\t\tif ((t.readyState == 4) || (isQt && t.readyState == 3)) { // what for long response and status 404?\r\n\t\t\t\t\t\tif (t.status != 200 || t.responseText === \"\")\r\n\t\t\t\t\t\t\tif (!scheduler.callEvent(\"onAjaxError\", [t])) return;\r\n\r\n\t\t\t\t\t\tsetTimeout(function() {\r\n\t\t\t\t\t\t\tif (typeof(onLoad) == \"function\") {\r\n\t\t\t\t\t\t\t\tonLoad.apply(window, [{xmlDoc:t, filePath:url}]); // dhtmlx-compat, response.xmlDoc.responseXML/responseText\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tresolve(t);\r\n\t\t\t\t\t\t\tif (typeof(onLoad) == \"function\") {\r\n\t\t\t\t\t\t\t\tonLoad = null;\r\n\t\t\t\t\t\t\t\tt = null;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}, 0);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (method == \"GET\" && !this.cache) {\r\n\t\t\t\turl += (url.indexOf(\"?\")>=0?\"&\":\"?\")+\"dhxr\"+new Date().getTime()+\"=1\";\r\n\t\t\t}\r\n\r\n\t\t\tt.open(method, url, async);\r\n\r\n\t\t\tif (headers){\r\n\t\t\t\tfor (var key in headers)\r\n\t\t\t\t\tt.setRequestHeader(key, headers[key]);\r\n\t\t\t} else if (method.toUpperCase() == \"POST\" || method == \"PUT\" || method == \"DELETE\") {\r\n\t\t\t\tt.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\r\n\t\t\t} else if (method == \"GET\") {\r\n\t\t\t\tpostData = null;\r\n\t\t\t}\r\n\r\n\t\t\tt.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\r\n\r\n\t\t\tt.send(postData);\r\n\r\n\t\t\tif (!async) return {xmlDoc:t, filePath:url}; // dhtmlx-compat, response.xmlDoc.responseXML/responseText\r\n\t\t}.bind(this)));\r\n\t},\r\n\turlSeparator: function(str){\r\n\t\tif (str.indexOf(\"?\") != -1)\r\n\t\t\treturn \"&\";\r\n\t\telse\r\n\t\t\treturn \"?\";\r\n\t}\r\n};\r\n\r\nscheduler.$ajax = scheduler.ajax; // for old\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n/*\r\n%e\tDay of the month without leading zeros (01..31)\r\n%d\tDay of the month, 2 digits with leading zeros (01..31)\r\n%j\tDay of the year, 3 digits with leading zeros (001..366)\r\n%a\tA textual representation of a day, two letters\r\n%W\tA full textual representation of the day of the week\r\n\r\n%c\tNumeric representation of a month, without leading zeros (0..12)\r\n%m\tNumeric representation of a month, with leading zeros (00..12)\r\n%b\tA short textual representation of a month, three letters (Jan..Dec)\r\n%M\tA full textual representation of a month, such as January or March (January..December)\r\n\r\n%y\tA two digit representation of a year (93..03)\r\n%Y\tA full numeric representation of a year, 4 digits (1993..03)\r\n*/\r\n\r\nscheduler.config={\r\n\tdefault_date: \"%j %M %Y\",\r\n\tmonth_date: \"%F %Y\",\r\n\tload_date: \"%Y-%m-%d\",\r\n\tweek_date: \"%l\",\r\n\tday_date: \"%D %j\",\r\n\thour_date: \"%H:%i\",\r\n\tmonth_day: \"%d\",\r\n\t//xml_date: \"%m/%d/%Y %H:%i\",\r\n\tdate_format: \"%Y-%m-%d %H:%i\",\r\n\tapi_date: \"%d-%m-%Y %H:%i\",\r\n\tparse_exact_format: false,\r\n\tpreserve_length:true,\r\n\ttime_step: 5,\r\n\tdisplayed_event_color: \"#ff4a4a\",\r\n\tdisplayed_event_text_color: \"#ffef80\",\r\n\twide_form: 0,\r\n\tday_column_padding: 8,\r\n\tuse_select_menu_space: true,\r\n\tfix_tab_position: true,\r\n\tstart_on_monday: true,\r\n\tfirst_hour: 0,\r\n\tlast_hour: 24,\r\n\treadonly: false,\r\n\tdrag_resize: true,\r\n\tdrag_move: true,\r\n\tdrag_create: true,\r\n\tdrag_event_body: true,\r\n\tdblclick_create: true,\r\n\tdetails_on_dblclick: true,\r\n\tedit_on_create: true,\r\n\tdetails_on_create: true,\r\n\theader: null,\r\n\thour_size_px: 44,\r\n\tresize_month_events:false,\r\n\tresize_month_timed:false,\r\n\tresponsive_lightbox: false,\r\n\tseparate_short_events: true,\r\n\trtl:false,\r\n\r\n\tcascade_event_display: false,\r\n\tcascade_event_count: 4,\r\n\tcascade_event_margin: 30,\r\n\r\n\tmulti_day:true,\r\n\tmulti_day_height_limit: 200,\r\n\r\n\tdrag_lightbox: true,\r\n\tpreserve_scroll: true,\r\n\tselect: true,\r\n\tundo_deleted: true,\r\n\tserver_utc: false,\r\n\ttouch:true,\r\n\ttouch_tip:true,\r\n\ttouch_drag:500,\r\n\ttouch_swipe_dates: false,\r\n\tquick_info_detached:true,\r\n\r\n\tpositive_closing: false,\r\n\t//header_datepicker: true,\r\n\tdrag_highlight: true,\r\n\tlimit_drag_out: false,\r\n\ticons_edit: [\"icon_save\", \"icon_cancel\"],\r\n\ticons_select: [\"icon_details\", \"icon_edit\", \"icon_delete\"],\r\n\tbuttons_left: [\"dhx_save_btn\", \"dhx_cancel_btn\"],\r\n\tbuttons_right: [\"dhx_delete_btn\"],\r\n\tlightbox: {\r\n\t\tsections: [\r\n\t\t\t{name: \"description\", map_to: \"text\", type: \"textarea\", focus: true},\r\n\t\t\t{name: \"time\", height: 72, type: \"time\", map_to: \"auto\"}\r\n\t\t]\r\n\t},\r\n\thighlight_displayed_event: true,\r\n\tleft_border: false,\r\n\r\n\tajax_error: \"alert\",//\"ignore\"|\"console\"\r\n\tdelay_render: 0,\r\n\ttimeline_swap_resize: true,\r\n\twai_aria_attributes: true,\r\n\twai_aria_application_role: true,\r\n\r\n\tcsp: \"auto\",\r\n\tevent_attribute: \"data-event-id\",\r\n\tshow_errors: true\r\n};\r\n\r\nscheduler.config.buttons_left.$initial = scheduler.config.buttons_left.join();\r\nscheduler.config.buttons_right.$initial = scheduler.config.buttons_right.join();\r\n\r\nscheduler._helpers = {\r\n\tparseDate: function parseDate(date) {\r\n\t\tvar parse = scheduler.templates.xml_date || scheduler.templates.parse_date;\r\n\t\treturn parse(date);\r\n\t},\r\n\tformatDate: function formatDate(date) {\r\n\t\tvar format = scheduler.templates.xml_format || scheduler.templates.format_date;\r\n\t\treturn format(date);\r\n\t}\r\n};\r\n\r\nscheduler.templates={};\r\nscheduler.init_templates=function(){\r\n\r\n\r\n\r\n\tvar d=scheduler.date.date_to_str;\r\n\tvar c=scheduler.config;\r\n\tvar f = function(a,b){\r\n\t\tfor (var c in b)\r\n\t\t\tif (!a[c]) a[c]=b[c];\r\n\t};\r\n\tf(scheduler.templates,{\r\n\t\tday_date:d(c.default_date),\r\n\t\tmonth_date:d(c.month_date),\r\n\t\tweek_date:function(d1,d2){\r\n\t\t\tif(c.rtl) {\r\n\t\t\t\treturn scheduler.templates.day_date(scheduler.date.add(d2,-1,\"day\"))+\" – \"+scheduler.templates.day_date(d1);\r\n\t\t\t} \r\n\t\t\treturn scheduler.templates.day_date(d1)+\" – \"+scheduler.templates.day_date(scheduler.date.add(d2,-1,\"day\"));\r\n\t\t},\r\n\t\tday_scale_date:d(c.default_date),\r\n\t\ttime_slot_text: function(date){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\ttime_slot_class: function(date){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\r\n\t\tmonth_scale_date:d(c.week_date),\r\n\t\tweek_scale_date:d(c.day_date),\r\n\t\thour_scale:d(c.hour_date),\r\n\t\ttime_picker:d(c.hour_date),\r\n\t\tevent_date:d(c.hour_date),\r\n\t\tmonth_day:d(c.month_day),\r\n\r\n\t\tload_format: d(c.load_date),\r\n\t//\txml_date:scheduler.date.str_to_date(c.xml_date,c.server_utc),\r\n\t//\txml_format:d(c.date_format,c.server_utc),\r\n\t\tformat_date: d(c.date_format, c.server_utc),\r\n\t\tparse_date:scheduler.date.str_to_date(c.date_format,c.server_utc),\r\n\t\tapi_date:scheduler.date.str_to_date(c.api_date, false, false),\r\n\t\tevent_header:function(start,end,ev){\r\n\r\n\t\t\tif(ev._mode === \"small\" || ev._mode === \"smallest\"){\r\n\t\t\t\treturn scheduler.templates.event_date(start);\r\n\t\t\t}else{\r\n\t\t\t\treturn scheduler.templates.event_date(start)+\" - \"+scheduler.templates.event_date(end);\r\n\t\t\t}\r\n\t\t},\r\n\t\tevent_text:function(start,end,ev){\r\n\t\t\treturn ev.text;\r\n\t\t},\r\n\t\tevent_class:function(start,end,ev){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tmonth_date_class:function(d){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tweek_date_class:function(d){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tevent_bar_date:function(start,end,ev) {\r\n\t\t\treturn scheduler.templates.event_date(start);\r\n\t\t},\r\n\t\tevent_bar_text:function(start,end,ev){\r\n\t\t\treturn ev.text;\r\n\t\t},\r\n\t\tmonth_events_link : function(date, count){\r\n\t\t\treturn \"View more(\"+count+\" events)\";\r\n\t\t},\r\n\t\tdrag_marker_class : function(start, end, event){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tdrag_marker_content : function(start, end, event){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\t/* Could be redifined */\r\n\t\ttooltip_date_format: scheduler.date.date_to_str(\"%Y-%m-%d %H:%i\"),\r\n\t\ttooltip_text: function(start, end, event) {\r\n\t\t\treturn \"Event: \" + event.text + \"
Start date: \" + scheduler.templates.tooltip_date_format(start) + \"
End date: \" + scheduler.templates.tooltip_date_format(end);\r\n\t\t},\r\n\r\n\t\tcalendar_month: d(\"%F %Y\"),\r\n\t\tcalendar_scale_date: d(\"%D\"),\r\n\t\tcalendar_date: d(\"%d\"),\r\n\t\tcalendar_time: d(\"%d-%m-%Y\")\r\n\r\n\t});\r\n\tthis.callEvent(\"onTemplatesReady\",[]);\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler._events = {};\r\nscheduler.clearAll = function() {\r\n\tthis._events = {};\r\n\tthis._loaded = {};\r\n\r\n\tthis._edit_id = null;\r\n\tthis._select_id = null;\r\n\tthis._drag_id = null;\r\n\tthis._drag_mode = null;\r\n\tthis._drag_pos = null;\r\n\tthis._new_event = null;\r\n\r\n\tthis.clear_view();\r\n\tthis.callEvent(\"onClearAll\", []);\r\n};\r\nscheduler.addEvent = function(start_date, end_date, text, id, extra_data) {\r\n\tif (!arguments.length)\r\n\t\treturn this.addEventNow();\r\n\tvar ev = start_date;\r\n\tif (arguments.length != 1) {\r\n\t\tev = extra_data || {};\r\n\t\tev.start_date = start_date;\r\n\t\tev.end_date = end_date;\r\n\t\tev.text = text;\r\n\t\tev.id = id;\r\n\t}\r\n\tev.id = ev.id || scheduler.uid();\r\n\tev.text = ev.text || \"\";\r\n\r\n\tif (typeof ev.start_date == \"string\") ev.start_date = this.templates.api_date(ev.start_date);\r\n\tif (typeof ev.end_date == \"string\") ev.end_date = this.templates.api_date(ev.end_date);\r\n\tvar d = (this.config.event_duration || this.config.time_step) * 60000;\r\n\tif (ev.start_date.valueOf() == ev.end_date.valueOf())\r\n\t\tev.end_date.setTime(ev.end_date.valueOf() + d);\r\n\r\n\tev.start_date.setMilliseconds(0);\r\n\tev.end_date.setMilliseconds(0);\r\n\r\n\tev._timed = this.isOneDayEvent(ev);\r\n\r\n\tvar is_new = !this._events[ev.id];\r\n\tthis._events[ev.id] = ev;\r\n\tthis.event_updated(ev);\r\n\tif (!this._loading)\r\n\t\tthis.callEvent(is_new ? \"onEventAdded\" : \"onEventChanged\", [ev.id, ev]);\r\n\treturn ev.id;\r\n};\r\nscheduler.deleteEvent = function(id, silent) {\r\n\tvar ev = this._events[id];\r\n\tif (!silent && (!this.callEvent(\"onBeforeEventDelete\", [id, ev]) || !this.callEvent(\"onConfirmedBeforeEventDelete\", [id, ev])))\r\n\t\treturn;\r\n\tif (ev) {\r\n\t\tif(scheduler.getState().select_id == id){\r\n\t\t\tscheduler.unselect();\r\n\t\t}\r\n\t\tdelete this._events[id];\r\n\t\tthis.event_updated(ev);\r\n\r\n\t\tif(this._drag_id == ev.id){\r\n\t\t\tthis._drag_id = null;\r\n\t\t\tthis._drag_mode=null;\r\n\t\t\tthis._drag_pos=null;\r\n\t\t}\r\n\t}\r\n\r\n\tthis.callEvent(\"onEventDeleted\", [id, ev]);\r\n};\r\nscheduler.getEvent = function(id) {\r\n\treturn this._events[id];\r\n};\r\nscheduler.setEvent = function(id, hash) {\r\n\tif(!hash.id)\r\n\t\thash.id = id;\r\n\r\n\tthis._events[id] = hash;\r\n};\r\nscheduler.for_rendered = function(id, method) {\r\n\tfor (var i = this._rendered.length - 1; i >= 0; i--)\r\n\t\tif (this._rendered[i].getAttribute(this.config.event_attribute) == id)\r\n\t\t\tmethod(this._rendered[i], i);\r\n};\r\nscheduler.changeEventId = function(id, new_id) {\r\n\tif (id == new_id) return;\r\n\tvar ev = this._events[id];\r\n\tif (ev) {\r\n\t\tev.id = new_id;\r\n\t\tthis._events[new_id] = ev;\r\n\t\tdelete this._events[id];\r\n\t}\r\n\tthis.for_rendered(id, function(r) {\r\n\t\tr.setAttribute(\"event_id\", new_id); // for backward compatibility\r\n\t\tr.setAttribute(scheduler.config.event_attribute, new_id);\r\n\t});\r\n\tif (this._select_id == id) this._select_id = new_id;\r\n\tif (this._edit_id == id) this._edit_id = new_id;\r\n\t//if (this._drag_id==id) this._drag_id=new_id;\r\n\tthis.callEvent(\"onEventIdChange\", [id, new_id]);\r\n};\r\n\r\n(function() {\r\n\tvar attrs = [\"text\", \"Text\", \"start_date\", \"StartDate\", \"end_date\", \"EndDate\"];\r\n\tvar create_getter = function(name) {\r\n\t\treturn function(id) { return (scheduler.getEvent(id))[name]; };\r\n\t};\r\n\tvar create_setter = function(name) {\r\n\t\treturn function(id, value) {\r\n\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\tev[name] = value;\r\n\t\t\tev._changed = true;\r\n\t\t\tev._timed = this.isOneDayEvent(ev);\r\n\t\t\tscheduler.event_updated(ev, true);\r\n\t\t};\r\n\t};\r\n\tfor (var i = 0; i < attrs.length; i += 2) {\r\n\t\tscheduler[\"getEvent\" + attrs[i + 1]] = create_getter(attrs[i]);\r\n\t\tscheduler[\"setEvent\" + attrs[i + 1]] = create_setter(attrs[i]);\r\n\t}\r\n})();\r\n\r\nscheduler.event_updated = function(ev, force) {\r\n\tif (this.is_visible_events(ev))\r\n\t\tthis.render_view_data();\r\n\telse\r\n\t\tthis.clear_event(ev.id);\r\n};\r\nscheduler.is_visible_events = function(ev) {\r\n\tif(!this._min_date || !this._max_date){\r\n\t\treturn false;\r\n\t}\r\n\r\n\t//if in displayed dates\r\n\tvar in_visible_range = (ev.start_date.valueOf() < this._max_date.valueOf() && this._min_date.valueOf() < ev.end_date.valueOf());\r\n\r\n\tif(in_visible_range){\r\n\r\n\t\t//end dates are not between last/first hours\r\n\t\tvar evFirstHour = ev.start_date.getHours(),\r\n\t\t\tevLastHour = ev.end_date.getHours() + (ev.end_date.getMinutes()/60),\r\n\t\t\tlastHour = this.config.last_hour,\r\n\t\t\tfirstHour = this.config.first_hour;\r\n\r\n\t\tvar end_dates_visible = (this._table_view || !((evLastHour > lastHour || evLastHour <= firstHour) && (evFirstHour >= lastHour || evFirstHour < firstHour)));\r\n\r\n\t\tif(end_dates_visible){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\r\n\t\t\t//event is bigger than area hidden between last/first hours\r\n\t\t\tvar event_duration = (ev.end_date.valueOf() - ev.start_date.valueOf()) / (1000*60*60),//hours\r\n\t\t\t\thidden_duration = 24 - (this.config.last_hour - this.config.first_hour);\r\n\r\n\t\t\treturn !!((event_duration > hidden_duration) || (evFirstHour < lastHour && evLastHour > firstHour));\r\n\r\n\t\t}\r\n\t}else{\r\n\t\treturn false;\r\n\t}\r\n};\r\nscheduler.isOneDayEvent = function(ev) {\r\n\t// decrease by one ms so events that ends on midnight on the next day were still considered one day events\r\n\t// e.g. (09-02-2018 19:00 - 10-02-2018 00:00)\r\n\t// events >= 24h long are considered multiday\r\n\tvar checkEndDate = new Date(ev.end_date.valueOf() - 1);\r\n\treturn (\r\n\t\tev.start_date.getFullYear() === checkEndDate.getFullYear() &&\r\n\t\tev.start_date.getMonth() === checkEndDate.getMonth() &&\r\n\t\tev.start_date.getDate() === checkEndDate.getDate()\r\n\t) && ((ev.end_date.valueOf() - ev.start_date.valueOf()) < (1000 * 60 * 60 * 24));\r\n};\r\n\r\nscheduler.get_visible_events = function(only_timed) {\r\n\t//not the best strategy for sure\r\n\tvar stack = [];\r\n\r\n\tfor (var id in this._events)\r\n\t\tif (this.is_visible_events(this._events[id]))\r\n\t\t\tif (!only_timed || this._events[id]._timed)\r\n\t\t\t\tif (this.filter_event(id, this._events[id]))\r\n\t\t\t\t\tstack.push(this._events[id]);\r\n\r\n\treturn stack;\r\n};\r\nscheduler.filter_event = function(id, ev) {\r\n\tvar filter = this[\"filter_\" + this._mode];\r\n\treturn (filter) ? filter(id, ev) : true;\r\n};\r\nscheduler._is_main_area_event = function(ev){\r\n\treturn !!ev._timed;\r\n};\r\nscheduler.render_view_data = function(evs, hold) {\r\n\tvar full = false;\r\n\tif (!evs) {\r\n\t\tfull = true;\r\n\t\tif (this._not_render) {\r\n\t\t\tthis._render_wait = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._render_wait = false;\r\n\r\n\t\tthis.clear_view();\r\n\t\tevs = this.get_visible_events(!(this._table_view || this.config.multi_day));\r\n\t}\r\n\tfor(var i= 0, len = evs.length; i < len; i++){\r\n\t\tthis._recalculate_timed(evs[i]);\r\n\t}\r\n\r\n\tif (this.config.multi_day && !this._table_view) {\r\n\r\n\t\tvar tvs = [];\r\n\t\tvar tvd = [];\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tif (this._is_main_area_event(evs[i]))\r\n\t\t\t\ttvs.push(evs[i]);\r\n\t\t\telse\r\n\t\t\t\ttvd.push(evs[i]);\r\n\t\t}\r\n\r\n\t\tif(!this._els['dhx_multi_day']){\r\n\t\t\tvar message = scheduler._commonErrorMessages.unknownView(this._mode);\r\n\t\t\tthrow new Error(message);\r\n\t\t}\r\n\r\n\t\t// multiday events\r\n\t\tthis._rendered_location = this._els['dhx_multi_day'][0];\r\n\t\tthis._table_view = true;\r\n\t\tthis.render_data(tvd, hold);\r\n\t\tthis._table_view = false;\r\n\r\n\t\t// normal events\r\n\t\tthis._rendered_location = this._els['dhx_cal_data'][0];\r\n\t\tthis._table_view = false;\r\n\t\tthis.render_data(tvs, hold);\r\n\r\n\t} else {\r\n\t\tvar buffer = document.createDocumentFragment();\r\n\t\tvar renderedLocation = this._els['dhx_cal_data'][0];\r\n\t\tthis._rendered_location = buffer;\r\n\t\tthis.render_data(evs, hold);\r\n\t\trenderedLocation.appendChild(buffer);\r\n\t\tthis._rendered_location = renderedLocation;\r\n\r\n\t}\r\n\r\n\tif(full){\r\n\t\tthis.callEvent(\"onDataRender\", []);\r\n\t}\r\n};\r\n\r\n\r\nscheduler._view_month_day = function(e){\r\n\tvar date = scheduler.getActionData(e).date;\r\n\tif(!scheduler.callEvent(\"onViewMoreClick\", [date]))\r\n\t\treturn;\r\n\tscheduler.setCurrentView(date, \"day\");\r\n};\r\n\r\nscheduler._render_month_link = function(ev){\r\n\tvar parent = this._rendered_location;\r\n\tvar toRender = this._lame_clone(ev);\r\n\r\n\t//render links in each cell of multiday events\r\n\tfor(var d = ev._sday; d < ev._eday; d++){\r\n\r\n\t\ttoRender._sday = d;\r\n\t\ttoRender._eday = d+1;\r\n\r\n\t\tvar date = scheduler.date;\r\n\t\tvar curr = scheduler._min_date;\r\n\t\tcurr = date.add(curr, toRender._sweek, \"week\");\r\n\t\tcurr = date.add(curr, toRender._sday, \"day\");\r\n\t\tvar count = scheduler.getEvents(curr, date.add(curr, 1, \"day\")).length;\r\n\r\n\t\tvar pos = this._get_event_bar_pos(toRender);\r\n\t\tvar widt = (pos.x2 - pos.x);\r\n\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tscheduler.event(el, \"click\", function(e){scheduler._view_month_day(e);});\r\n\t\tel.className = \"dhx_month_link\";\r\n\t\tel.style.top = pos.y + \"px\";\r\n\t\tel.style.left = pos.x + \"px\";\r\n\t\tel.style.width = widt + \"px\";\r\n\t\tel.innerHTML = scheduler.templates.month_events_link(curr, count);\r\n\t\tthis._rendered.push(el);\r\n\r\n\t\tparent.appendChild(el);\r\n\t}\r\n};\r\n\r\nscheduler._recalculate_timed = function(id){\r\n\tif(!id) return;\r\n\tvar ev;\r\n\tif(typeof(id) != \"object\")\r\n\t\tev = this._events[id];\r\n\telse\r\n\t\tev = id;\r\n\tif(!ev) return;\r\n\tev._timed = scheduler.isOneDayEvent(ev);\r\n};\r\nscheduler.attachEvent(\"onEventChanged\", scheduler._recalculate_timed);\r\nscheduler.attachEvent(\"onEventAdded\", scheduler._recalculate_timed);\r\n\r\nscheduler.render_data = function(evs, hold) {\r\n\tevs = this._pre_render_events(evs, hold);\r\n\tvar containers = {};\r\n\tfor (var i = 0; i < evs.length; i++)\r\n\t\tif (this._table_view){\r\n\t\t\tif(scheduler._mode != 'month'){\r\n\t\t\t\tthis.render_event_bar(evs[i]);//may be multiday section on other views\r\n\t\t\t}else{\r\n\r\n\t\t\t\tvar max_evs = scheduler.config.max_month_events;\r\n\t\t\t\tif(max_evs !== max_evs*1 || evs[i]._sorder < max_evs){\r\n\t\t\t\t\t//of max number events per month cell is set and event can be rendered\r\n\t\t\t\t\tthis.render_event_bar(evs[i]);\r\n\t\t\t\t}else if(max_evs !== undefined && evs[i]._sorder == max_evs){\r\n\t\t\t\t\t//render 'view more' links\r\n\t\t\t\t\tscheduler._render_month_link(evs[i]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//do not render events with ordinal number > maximum events per cell\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t}else{\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tvar parent = scheduler.locate_holder(ev._sday);\r\n\t\t\tif (!parent) continue; //attempt to render non-visible event\r\n\r\n\t\t\tif(!containers[ev._sday]){\r\n\t\t\t\tcontainers[ev._sday] = {\r\n\t\t\t\t\treal: parent,\r\n\t\t\t\t\tbuffer: document.createDocumentFragment(),\r\n\t\t\t\t\twidth: parent.clientWidth\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\tvar container = containers[ev._sday];\r\n\t\t\tthis.render_event(ev, container.buffer, container.width);\r\n\t\t}\r\n\r\n\t\tfor(var i in containers){\r\n\t\t\tvar container = containers[i];\r\n\t\t\tif(container.real && container.buffer){\r\n\t\t\t\tcontainer.real.appendChild(container.buffer);\r\n\t\t\t}\r\n\t\t}\r\n};\r\n\r\nscheduler._get_first_visible_cell = function(cells) {\r\n\tfor (var i = 0; i < cells.length; i++) {\r\n\t\tif ((cells[i].className || \"\").indexOf(\"dhx_scale_ignore\") == -1) {\r\n\t\t\treturn cells[i];\r\n\t\t}\r\n\t}\r\n\t// if no visible cell found, return cells[0] to be more tolerant, since it's the original logic\r\n\treturn cells[0];\r\n};\r\n\r\nscheduler._pre_render_events = function(evs, hold) {\r\n\tvar hb = this.xy.bar_height;\r\n\tvar h_old = this._colsS.heights;\r\n\tvar h = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0];\r\n\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\r\n\tif (!this._table_view) {\r\n\t\tevs = this._pre_render_events_line(evs, hold); //ignore long events for now\r\n\t}\r\n\telse {\r\n\t\tevs = this._pre_render_events_table(evs, hold);\r\n\t}\r\n\tif (this._table_view) {\r\n\t\tif (hold)\r\n\t\t\tthis._colsS.heights = h_old;\r\n\t\telse {\r\n\t\t\tvar monthRows = data.querySelectorAll(\".dhx_cal_month_row\");\r\n\t\t\tif (monthRows.length) {\r\n\t\t\t\tfor (var i = 0; i < monthRows.length; i++) {\r\n\t\t\t\t\th[i]++;\r\n\t\t\t\t\tvar cells = monthRows[i].querySelectorAll(\".dhx_cal_month_cell\");\r\n\t\t\t\t\tvar cellHeight = this._colsS.height - this.xy.month_head_height;\r\n\t\t\t\t\tif ((h[i]) * hb > cellHeight) { // 22 - height of cell's header\r\n\t\t\t\t\t\t//we have overflow, update heights\r\n\r\n\t\t\t\t\t\tvar cHeight = cellHeight;\r\n\t\t\t\t\t\tif(this.config.max_month_events*1 !== this.config.max_month_events || h[i] <= this.config.max_month_events){\r\n\t\t\t\t\t\t\tcHeight = h[i] * hb;\r\n\t\t\t\t\t\t}else if( (this.config.max_month_events + 1) * hb > cellHeight){\r\n\t\t\t\t\t\t\tcHeight = (this.config.max_month_events + 1) * hb;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tmonthRows[i].style.height = (cHeight + this.xy.month_head_height) + \"px\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\th[i] = (h[i - 1] || 0) + scheduler._get_first_visible_cell(cells).offsetHeight;\r\n\t\t\t\t}\r\n\t\t\t\th.unshift(0);\r\n\t\t\t\tconst dataArea = this.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tif (dataArea.offsetHeight < dataArea.scrollHeight && !scheduler._colsS.scroll_fix && scheduler.xy.scroll_width) {\r\n\r\n\t\t\t\t\tvar scale_settings = scheduler._colsS,\r\n\t\t\t\t\t\tsum_width = scale_settings[scale_settings.col_length],\r\n\t\t\t\t\t\trow_heights = scale_settings.heights.slice();\r\n\r\n\t\t\t\t\tsum_width -= (scheduler.xy.scroll_width || 0);\r\n\t\t\t\t\tthis._calc_scale_sizes(sum_width, this._min_date, this._max_date);\r\n\t\t\t\t\tscheduler._colsS.heights = row_heights;\r\n\r\n\t\t\t\t\tthis.set_xy(this._els[\"dhx_cal_header\"][0], sum_width/*, this.xy.scale_height*/);\r\n\t\t\t\t\tscheduler._render_scales(this._els[\"dhx_cal_header\"][0]);\r\n\t\t\t\t\tscheduler._render_month_scale(this._els[\"dhx_cal_data\"][0], this._get_timeunit_start(), this._min_date);\r\n\r\n\t\t\t\t\tscale_settings.scroll_fix = true;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (!evs.length && this._els[\"dhx_multi_day\"][0].style.visibility == \"visible\")\r\n\t\t\t\t\th[0] = -1;\r\n\t\t\t\tif (evs.length || h[0] == -1) {\r\n\t\t\t\t\t//shift days to have space for multiday events\r\n\t\t\t\t\t//var childs = evl.parentNode.childNodes;\r\n\r\n\t\t\t\t\t// +1 so multiday events would have 2px from top and 2px from bottom by default\r\n\t\t\t\t\tvar full_multi_day_height = (h[0] + 1) * hb + 4;\r\n\r\n\t\t\t\t\tvar used_multi_day_height = full_multi_day_height;\r\n\t\t\t\t\tvar used_multi_day_height_css = full_multi_day_height + \"px\";\r\n\t\t\t\t\tif (this.config.multi_day_height_limit) {\r\n\t\t\t\t\t\tused_multi_day_height = Math.min(full_multi_day_height, this.config.multi_day_height_limit) ;\r\n\t\t\t\t\t\tused_multi_day_height_css = used_multi_day_height + \"px\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar multi_day_section = this._els[\"dhx_multi_day\"][0];\r\n\t\t\t\t\tmulti_day_section.style.height = used_multi_day_height_css;\r\n\t\t\t\t\tmulti_day_section.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\tmulti_day_section.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\r\n\t\t\t\t\t// icon\r\n\t\t\t\t\tvar multi_day_icon = this._els[\"dhx_multi_day\"][1];\r\n\t\t\t\t\tmulti_day_icon.style.height = used_multi_day_height_css;\r\n\t\t\t\t\tmulti_day_icon.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\tmulti_day_icon.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\t\t\t\t\tmulti_day_icon.className = h[0] ? \"dhx_multi_day_icon\" : \"dhx_multi_day_icon_small\";\r\n\t\t\t\t\tthis._dy_shift = (h[0] + 1) * hb;\r\n\t\t\t\t\tif(this.config.multi_day_height_limit){\r\n\t\t\t\t\t\tthis._dy_shift = Math.min(this.config.multi_day_height_limit, this._dy_shift);\r\n\t\t\t\t\t}\r\n\t\t\t\t\th[0] = 0;\r\n\r\n\t\t\t\t\tif (used_multi_day_height != full_multi_day_height) {\r\n\r\n\t\t\t\t\t\tmulti_day_section.style.overflowY = \"auto\";\r\n\t\t\t\t\t//\tmulti_day_section.style.width = (parseInt(this._els[\"dhx_cal_navline\"][0].style.width)) + \"px\";\r\n\r\n\t\t\t\t\t\tmulti_day_icon.style.position = \"fixed\";\r\n\t\t\t\t\t\tmulti_day_icon.style.top = \"\";\r\n\t\t\t\t\t\tmulti_day_icon.style.left = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn evs;\r\n};\r\nscheduler._get_event_sday = function(ev) {\r\n\t// get day in current view\r\n\t// use rounding for 23 or 25 hour days on DST\r\n\tvar datePart = this.date.day_start(new Date(ev.start_date));\r\n\treturn Math.round((datePart.valueOf() - this._min_date.valueOf()) / (24 * 60 * 60 * 1000));\r\n};\r\nscheduler._get_event_mapped_end_date = function(ev) {\r\n\tvar end_date = ev.end_date;\r\n\tif (this.config.separate_short_events) {\r\n\t\tvar ev_duration = (ev.end_date - ev.start_date) / 60000; // minutes\r\n\t\tif (ev_duration < this._min_mapped_duration) {\r\n\t\t\tend_date = this.date.add(end_date, this._min_mapped_duration - ev_duration, \"minute\");\r\n\t\t}\r\n\t}\r\n\treturn end_date;\r\n};\r\nscheduler._pre_render_events_line = function(evs, hold){\r\n\tevs.sort(function(a, b) {\r\n\t\tif (a.start_date.valueOf() == b.start_date.valueOf())\r\n\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\treturn a.start_date > b.start_date ? 1 : -1;\r\n\t});\r\n\tvar days = []; //events by weeks\r\n\tvar evs_originals = [];\r\n\r\n\tthis._min_mapped_duration = Math.floor(this.xy.min_event_height * 60 / this.config.hour_size_px); // values could change along the way\r\n\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tvar ev = evs[i];\r\n\r\n\t\t//check date overflow\r\n\t\tvar sd = ev.start_date;\r\n\t\tvar ed = ev.end_date;\r\n\t\t//check scale overflow\r\n\t\tvar sh = sd.getHours();\r\n\t\tvar eh = ed.getHours();\r\n\t\tev._sday = this._get_event_sday(ev); // sday based on event start_date\r\n\t\tif (this._ignores[ev._sday]){\r\n\t\t\t//ignore event\r\n\t\t\tevs.splice(i,1);\r\n\t\t\ti--;\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tif (!days[ev._sday]) days[ev._sday] = [];\r\n\r\n\t\tif (!hold) {\r\n\t\t\tev._inner = false;\r\n\r\n\t\t\tvar stack = days[ev._sday];\r\n\r\n\t\t\twhile (stack.length) {\r\n\t\t\t\tvar t_ev = stack[stack.length - 1];\r\n\t\t\t\tvar t_end_date = this._get_event_mapped_end_date(t_ev);\r\n\t\t\t\tif (t_end_date.valueOf() <= ev.start_date.valueOf()) {\r\n\t\t\t\t\tstack.splice(stack.length - 1, 1);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar slot_index = stack.length;\r\n\t\t\tvar sorderSet = false;\r\n\t\t\tfor (var j = 0; j < stack.length; j++) {\r\n\t\t\t\tvar t_ev = stack[j];\r\n\t\t\t\tvar t_end_date = this._get_event_mapped_end_date(t_ev);\r\n\t\t\t\tif (t_end_date.valueOf() <= ev.start_date.valueOf()) {\r\n\t\t\t\t\tsorderSet = true;\r\n\t\t\t\t\tev._sorder = t_ev._sorder;\r\n\t\t\t\t\tslot_index = j;\r\n\t\t\t\t\tev._inner = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (stack.length)\r\n\t\t\t\tstack[stack.length - 1]._inner = true;\r\n\r\n\t\t\tif (!sorderSet) {\r\n\t\t\t\tif (stack.length) {\r\n\t\t\t\t\tif (stack.length <= stack[stack.length - 1]._sorder) {\r\n\t\t\t\t\t\tif (!stack[stack.length - 1]._sorder)\r\n\t\t\t\t\t\t\tev._sorder = 0;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tfor (j = 0; j < stack.length; j++) {\r\n\t\t\t\t\t\t\t\tvar _is_sorder = false;\r\n\t\t\t\t\t\t\t\tfor (var k = 0; k < stack.length; k++) {\r\n\t\t\t\t\t\t\t\t\tif (stack[k]._sorder == j) {\r\n\t\t\t\t\t\t\t\t\t\t_is_sorder = true;\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (!_is_sorder) {\r\n\t\t\t\t\t\t\t\t\tev._sorder = j;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\tev._inner = true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvar _max_sorder = stack[0]._sorder;\r\n\t\t\t\t\t\tfor (j = 1; j < stack.length; j++) {\r\n\t\t\t\t\t\t\tif (stack[j]._sorder > _max_sorder)\r\n\t\t\t\t\t\t\t\t_max_sorder = stack[j]._sorder;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tev._sorder = _max_sorder + 1;\r\n\t\t\t\t\t\tev._inner = false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else\r\n\t\t\t\t\tev._sorder = 0;\r\n\t\t\t}\r\n\r\n\t\t\tstack.splice(slot_index, slot_index == stack.length ? 0 : 1, ev);\r\n\r\n\t\t\tif (stack.length > (stack.max_count || 0)) {\r\n\t\t\t\tstack.max_count = stack.length;\r\n\t\t\t\tev._count = stack.length;\r\n\t\t\t} else {\r\n\t\t\t\tev._count = (ev._count) ? ev._count : 1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (sh < this.config.first_hour || eh >= this.config.last_hour) {\r\n\t\t\t// Need to create copy of event as we will be changing it's start/end date\r\n\t\t\t// e.g. first_hour = 11 and event.start_date hours = 9. Need to preserve that info\r\n\t\t\tevs_originals.push(ev);\r\n\t\t\tevs[i] = ev = this._copy_event(ev);\r\n\r\n\t\t\tif (sh < this.config.first_hour) {\r\n\t\t\t\tev.start_date.setHours(this.config.first_hour);\r\n\t\t\t\tev.start_date.setMinutes(0);\r\n\t\t\t}\r\n\t\t\tif (eh >= this.config.last_hour) {\r\n\t\t\t\tev.end_date.setMinutes(0);\r\n\t\t\t\tev.end_date.setHours(this.config.last_hour);\r\n\t\t\t}\r\n\r\n\t\t\tif (ev.start_date > ev.end_date || sh == this.config.last_hour) {\r\n\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (!hold) {\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tevs[i]._count = days[evs[i]._sday].max_count;\r\n\t\t}\r\n\t\tfor (var i = 0; i < evs_originals.length; i++)\r\n\t\t\tevs_originals[i]._count = days[evs_originals[i]._sday].max_count;\r\n\t}\r\n\r\n\treturn evs;\r\n};\r\nscheduler._time_order = function(evs) {\r\n\tevs.sort(function(a, b) {\r\n\t\tif (a.start_date.valueOf() == b.start_date.valueOf()) {\r\n\t\t\tif (a._timed && !b._timed) return 1;\r\n\t\t\tif (!a._timed && b._timed) return -1;\r\n\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\t}\r\n\t\treturn a.start_date > b.start_date ? 1 : -1;\r\n\t});\r\n};\r\n\r\nscheduler._is_any_multiday_cell_visible = function(from, to, event){\r\n\tvar cols = this._cols.length;\r\n\tvar isAnyCellVisible = false;\r\n\tvar checkDate = from;\r\n\tvar noCells = true;\r\n\tvar lastDayEnd = new Date(to);\r\n\tif(scheduler.date.day_start(new Date(to)).valueOf() != to.valueOf()){\r\n\t\tlastDayEnd = scheduler.date.day_start(lastDayEnd);\r\n\t\tlastDayEnd = scheduler.date.add(lastDayEnd, 1, \"day\");\r\n\t}\r\n\twhile(checkDate < lastDayEnd){\r\n\t\tnoCells = false;\r\n\t\tvar cellIndex = this.locate_holder_day(checkDate, false, event);\r\n\t\tvar weekCellIndex = cellIndex % cols;\r\n\t\tif(!this._ignores[weekCellIndex]){\r\n\t\t\tisAnyCellVisible = true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcheckDate = scheduler.date.add(checkDate, 1, \"day\");\r\n\t}\r\n\treturn noCells || isAnyCellVisible;\r\n};\r\n\r\nscheduler._pre_render_events_table = function(evs, hold) { // max - max height of week slot\r\n\tthis._time_order(evs);\r\n\tvar out = [];\r\n\tvar weeks = [\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[]\r\n\t]; //events by weeks\r\n\tvar max = this._colsS.heights;\r\n\tvar start_date;\r\n\tvar cols = this._cols.length;\r\n\tvar chunks_info = {};\r\n\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tvar ev = evs[i];\r\n\t\tvar id = ev.id;\r\n\t\tif (!chunks_info[id]) {\r\n\t\t\tchunks_info[id] = {\r\n\t\t\t\tfirst_chunk: true,\r\n\t\t\t\tlast_chunk: true\r\n\t\t\t};\r\n\t\t}\r\n\t\tvar chunk_info = chunks_info[id];\r\n\t\tvar sd = (start_date || ev.start_date);\r\n\t\tvar ed = ev.end_date;\r\n\t\t//trim events which are crossing through current view\r\n\t\tif (sd < this._min_date) {\r\n\t\t\tchunk_info.first_chunk = false;\r\n\t\t\tsd = this._min_date;\r\n\t\t}\r\n\t\tif (ed > this._max_date) {\r\n\t\t\tchunk_info.last_chunk = false;\r\n\t\t\ted = this._max_date;\r\n\t\t}\r\n\r\n\t\tvar locate_s = this.locate_holder_day(sd, false, ev);\r\n\t\tev._sday = locate_s % cols;\r\n\t\t//skip single day events for ignored dates\r\n\t\tif (this._ignores[ev._sday] && ev._timed) continue;\r\n\r\n\t\tvar locate_e = this.locate_holder_day(ed, true, ev) || cols;\r\n\t\tev._eday = (locate_e % cols) || cols; //cols used to fill full week, when event end on monday\r\n\t\tev._length = locate_e - locate_s;\r\n\t\t//3600000 - compensate 1 hour during winter|summer time shift\r\n\t\tev._sweek = Math.floor((this._correct_shift(sd.valueOf(), 1) - this._min_date.valueOf()) / (60 * 60 * 1000 * 24 * cols));\r\n\r\n\t\tvar isAnyCellVisible = scheduler._is_any_multiday_cell_visible(sd, ed, ev);\r\n\r\n\t\tif(!isAnyCellVisible){\r\n\t\t\tstart_date = null;\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\t//current slot\r\n\t\tvar stack = weeks[ev._sweek];\r\n\t\t//check order position\r\n\t\tvar stack_line;\r\n\r\n\t\tfor (stack_line = 0; stack_line < stack.length; stack_line++)\r\n\t\t\tif (stack[stack_line]._eday <= ev._sday)\r\n\t\t\t\tbreak;\r\n\r\n\t\tif (!ev._sorder || !hold) {\r\n\t\t\tev._sorder = stack_line;\r\n\t\t}\r\n\r\n\t\tif (ev._sday + ev._length <= cols) {\r\n\t\t\tstart_date = null;\r\n\t\t\tout.push(ev);\r\n\t\t\tstack[stack_line] = ev;\r\n\t\t\t//get max height of slot\r\n\t\t\tmax[ev._sweek] = stack.length - 1;\r\n\t\t\tev._first_chunk = chunk_info.first_chunk;\r\n\t\t\tev._last_chunk = chunk_info.last_chunk;\r\n\t\t} else { // split long event in chunks\r\n\t\t\tvar copy = this._copy_event(ev);\r\n\t\t\tcopy.id = ev.id;\r\n\t\t\tcopy._length = cols - ev._sday;\r\n\t\t\tcopy._eday = cols;\r\n\t\t\tcopy._sday = ev._sday;\r\n\t\t\tcopy._sweek = ev._sweek;\r\n\t\t\tcopy._sorder = ev._sorder;\r\n\t\t\tcopy.end_date = this.date.add(sd, copy._length, \"day\");\r\n\t\t\tcopy._first_chunk = chunk_info.first_chunk;\r\n\t\t\tif (chunk_info.first_chunk) {\r\n\t\t\t\tchunk_info.first_chunk = false;\r\n\t\t\t}\r\n\r\n\t\t\tout.push(copy);\r\n\t\t\tstack[stack_line] = copy;\r\n\t\t\tstart_date = copy.end_date;\r\n\t\t\t//get max height of slot\r\n\t\t\tmax[ev._sweek] = stack.length - 1;\r\n\t\t\ti--;\r\n\t\t\tcontinue; //repeat same step\r\n\t\t}\r\n\t}\r\n\treturn out;\r\n};\r\nscheduler._copy_dummy = function() {\r\n\tvar a = new Date(this.start_date);\r\n\tvar b = new Date(this.end_date);\r\n\tthis.start_date = a;\r\n\tthis.end_date = b;\r\n};\r\nscheduler._copy_event = function(ev) {\r\n\tthis._copy_dummy.prototype = ev;\r\n\treturn new this._copy_dummy();\r\n\t//return {start_date:ev.start_date, end_date:ev.end_date, text:ev.text, id:ev.id}\r\n};\r\nscheduler._rendered = [];\r\nscheduler.clear_view = function() {\r\n\tfor (var i = 0; i < this._rendered.length; i++) {\r\n\t\tvar obj = this._rendered[i];\r\n\t\tif (obj.parentNode) obj.parentNode.removeChild(obj);\r\n\t}\r\n\tthis._rendered = [];\r\n};\r\nscheduler.updateEvent = function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tthis.clear_event(id);\r\n\r\n\tif (ev && this.is_visible_events(ev) && this.filter_event(id, ev) && (this._table_view || this.config.multi_day || ev._timed)) {\r\n\t\tif (this.config.update_render){\r\n\t\t\tthis.render_view_data();\r\n\t\t}else{\r\n\t\t\tif(this.getState().mode == \"month\" && !this.getState().drag_id && !this.isOneDayEvent(ev)){\r\n\t\t\t\tthis.render_view_data();\r\n\t\t\t}else{\r\n\t\t\t\tthis.render_view_data([ev], true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.clear_event = function(id) {\r\n\tthis.for_rendered(id, function(node, i) {\r\n\t\tif (node.parentNode)\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\tscheduler._rendered.splice(i, 1);\r\n\t});\r\n};\r\nscheduler._y_from_date = function(date){\r\n\tvar sm = date.getHours() * 60 + date.getMinutes();\r\n\treturn ((Math.round((sm * 60 * 1000 - this.config.first_hour * 60 * 60 * 1000) * this.config.hour_size_px / (60 * 60 * 1000))) % (this.config.hour_size_px * 24)); //42px/hour\r\n};\r\nscheduler._calc_event_y = function(ev, min_height){\r\n\tmin_height = min_height || 0;\r\n\tvar sm = ev.start_date.getHours() * 60 + ev.start_date.getMinutes();\r\n\tvar em = (ev.end_date.getHours() * 60 + ev.end_date.getMinutes()) || (scheduler.config.last_hour * 60);\r\n\tvar top = this._y_from_date(ev.start_date);\r\n\r\n\tvar height = Math.max(min_height, (em - sm) * this.config.hour_size_px / 60); //42px/hour\r\n\treturn {\r\n\t\ttop: top,\r\n\t\theight: height\r\n\t};\r\n};\r\nscheduler.render_event = function(ev, buffer, parentWidth) {\r\n\tvar menu = scheduler.xy.menu_width;\r\n\tvar menu_offset = (this.config.use_select_menu_space) ? 0 : menu;\r\n\tif (ev._sday < 0) return; //can occur in case of recurring event during time shift\r\n\r\n\tvar parent = scheduler.locate_holder(ev._sday);\r\n\tif (!parent) return; //attempt to render non-visible event\r\n\r\n\tbuffer = buffer || parent;\r\n\r\n\tvar pos_y = this._calc_event_y(ev, scheduler.xy.min_event_height);\r\n\tvar top = pos_y.top,\r\n\t\theight = pos_y.height;\r\n\r\n\tvar ev_count = ev._count || 1;\r\n\tvar ev_sorder = ev._sorder || 0;\r\n\r\n\tparentWidth = parentWidth || parent.clientWidth;\r\n\tif(this.config.day_column_padding){\r\n\t\tparentWidth -= this.config.day_column_padding;\r\n\t}\r\n\r\n\tvar width = Math.floor((parentWidth - menu_offset) / ev_count);\r\n\tvar left = ev_sorder * width + 1;\r\n\tif (!ev._inner) width = width * (ev_count - ev_sorder);\r\n\tif (this.config.cascade_event_display) {\r\n\t\tvar limit = this.config.cascade_event_count;\r\n\t\tvar margin = this.config.cascade_event_margin;\r\n\t\tleft = ev_sorder % limit * margin;\r\n\t\tvar right = (ev._inner) ? (ev_count - ev_sorder - 1) % limit * margin / 2 : 0;\r\n\t\twidth = Math.floor(parentWidth - menu_offset - left - right);\r\n\t}\r\n\r\n\tif(height < 30){\r\n\t\tev._mode = \"smallest\";\r\n\t}else if(height < 42){\r\n\t\tev._mode = \"small\";\r\n\t}else{\r\n\t\tev._mode = null;\r\n\t}\r\n\r\n\tvar d = this._render_v_bar(ev, menu_offset + left, top, width, height, ev._text_style, scheduler.templates.event_header(ev.start_date, ev.end_date, ev), scheduler.templates.event_text(ev.start_date, ev.end_date, ev));\r\n\t\r\n\tif(ev._mode === \"smallest\"){\r\n\t\td.classList.add(\"dhx_cal_event--xsmall\");\r\n\t}else if (ev._mode === \"small\"){\r\n\t\td.classList.add(\"dhx_cal_event--small\");\r\n\t}\r\n\r\n\tthis._waiAria.eventAttr(ev, d);\r\n\tthis._rendered.push(d);\r\n\tbuffer.appendChild(d);\r\n\r\n\tvar parentPosition = parseInt( this.config.rtl ? parent.style.right : parent.style.left, 10);\r\n\r\n\tleft = left + parentPosition + menu_offset;\r\n\r\n\tif (this._edit_id == ev.id) {\r\n\r\n\t\td.style.zIndex = 1; //fix overlapping issue\r\n\t\twidth = Math.max(width, scheduler.xy.editor_width);\r\n\t\td = document.createElement(\"div\");\r\n\t\td.setAttribute(\"event_id\", ev.id); // for backward compatibility\r\n\t\td.setAttribute(this.config.event_attribute, ev.id);\r\n\r\n\t\tthis._waiAria.eventAttr(ev, d);\r\n\r\n\t\td.className = \"dhx_cal_event dhx_cal_editor\";\r\n\t\tif (this.config.rtl) left++;\r\n\t\tthis.set_xy(d, width, height, left, top);\r\n\r\n\r\n\t\tif(ev.color){\r\n\t\t\td.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tvar tplClass = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\r\n\t\tif(tplClass){\r\n\t\t\td.className += \" \" + tplClass;\r\n\t\t}\r\n\t\tvar d2 = document.createElement(\"div\");\r\n\t\td2.style.cssText += \"overflow:hidden;height:100%\";\r\n\r\n\t\td.appendChild(d2);\r\n\t\tthis._els[\"dhx_cal_data\"][0].appendChild(d);\r\n\t\tthis._rendered.push(d);\r\n\r\n\t\td2.innerHTML = \"\";\r\n\t\tthis._editor = d2.querySelector(\"textarea\");\r\n\t\t\r\n\t\tscheduler.event(this._editor, \"keydown\", function(e) {\r\n\t\t\tif (e.shiftKey) return true;\r\n\t\t\tvar code = e.keyCode;\r\n\t\t\tif (code == scheduler.keys.edit_save) scheduler.editStop(true);\r\n\t\t\tif (code == scheduler.keys.edit_cancel) scheduler.editStop(false);\r\n\r\n\t\t\tif(code == scheduler.keys.edit_save || code == scheduler.keys.edit_cancel){\r\n\t\t\t\tif(e.preventDefault) e.preventDefault();\r\n\t\t\t}\r\n\t\t});\r\n\t\tscheduler.event(this._editor, \"selectstart\", function (e) {\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn true;\r\n\t\t});\r\n\t\tscheduler._focus(this._editor, true);\r\n\t\t//IE and opera can add x-scroll during focusing\r\n\t\tthis._els[\"dhx_cal_data\"][0].scrollLeft = 0;\r\n\t}\r\n\tif (this.xy.menu_width !== 0 && this._select_id == ev.id) {\r\n\r\n\t\tif (this.config.cascade_event_display && this._drag_mode)\r\n\t\t\td.style.zIndex = 1; //fix overlapping issue for cascade view in case of dnd of selected event\r\n\t\tvar icons = this.config[\"icons_\" + ((this._edit_id == ev.id) ? \"edit\" : \"select\")];\r\n\t\tvar icons_str = \"\";\r\n\r\n\t\tvar ariaAttr;\r\n\r\n\t\tfor (var i = 0; i < icons.length; i++) {\r\n\t\t\tconst currentIcon = icons[i];\r\n\t\t\tariaAttr = this._waiAria.eventMenuAttrString(currentIcon);\r\n\t\t\ticons_str += `
`;\r\n\t\t}\r\n\t\tvar obj = this._render_v_bar(ev, left - menu - 1, top, menu, null, \"\", \"
\", icons_str, true);\r\n\r\n\t\tif(ev.color){\r\n\t\t\tobj.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tobj.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\t//obj.style.left = left - menu + 1;\r\n\t\tthis._els[\"dhx_cal_data\"][0].appendChild(obj);\r\n\t\tthis._rendered.push(obj);\r\n\t}\r\n\tif(this.config.drag_highlight && this._drag_id == ev.id){\r\n\t\tthis.highlightEventPosition(ev);\r\n\t}\r\n};\r\nscheduler._render_v_bar = function (ev, x, y, w, h, style, contentA, contentB, bottom) {\r\n\tvar d = document.createElement(\"div\");\r\n\tvar id = ev.id;\r\n\tvar cs = (bottom) ? \"dhx_cal_event dhx_cal_select_menu\" : \"dhx_cal_event\";\r\n\r\n\tvar state = scheduler.getState();\r\n\tif(state.drag_id == ev.id){\r\n\t\tcs += \" dhx_cal_event_drag\";\r\n\t}\r\n\r\n\tif(state.select_id == ev.id){\r\n\t\tcs += \" dhx_cal_event_selected\";\r\n\t}\r\n\r\n\tvar cse = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\tif (cse) cs = cs + \" \" + cse;\r\n\r\n\tif(this.config.cascade_event_display) {\r\n\t\tcs += \" dhx_cal_event_cascade\";\r\n\t}\r\n\r\n\tvar boxWidth = w - 1;\r\n\tvar html = `
\r\n\t\t\t\t
`;\r\n\r\n\td.innerHTML = html;\r\n\r\n\tvar container = d.cloneNode(true).firstChild;\r\n\r\n\tif (!bottom && scheduler.renderEvent(container, ev, w, h, contentA, contentB)) {\r\n\t\tif(ev.color){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\treturn container;\r\n\t} else {\r\n\t\tcontainer = d.firstChild;\r\n\t\tif(ev.color){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\tvar inner_html = '
 
';\r\n\t\tinner_html += '
' + contentA + '
';\r\n\t\tinner_html += '
' + contentB + '
'; // +2 css specific, moved from render_event\r\n\r\n\t\tvar footer_class = \"dhx_event_resize dhx_footer\";\r\n\t\tif (bottom || ev._drag_resize === false)\r\n\t\t\tfooter_class = \"dhx_resize_denied \" + footer_class;\r\n\r\n\t\tinner_html += '
';\r\n\r\n\t\tcontainer.innerHTML = inner_html;\r\n\t}\r\n\r\n\treturn container;\r\n};\r\nscheduler.renderEvent = function(){\r\n\treturn false;\r\n};\r\nscheduler.locate_holder = function(day) {\r\n\tif (this._mode == \"day\") return this._els[\"dhx_cal_data\"][0].firstChild; //dirty\r\n\treturn this._els[\"dhx_cal_data\"][0].childNodes[day];\r\n};\r\nscheduler.locate_holder_day = function(date, past) {\r\n\tvar day = Math.floor((this._correct_shift(date, 1) - this._min_date) / (60 * 60 * 24 * 1000));\r\n\t//when locating end data of event , we need to use next day if time part was defined\r\n\tif (past && this.date.time_part(date)) day++;\r\n\treturn day;\r\n};\r\n\r\n\r\n\r\nscheduler._get_dnd_order = function(order, ev_height, max_height){\r\n\tif(!this._drag_event)\r\n\t\treturn order;\r\n\tif(!this._drag_event._orig_sorder)\r\n\t\tthis._drag_event._orig_sorder = order;\r\n\telse\r\n\t\torder = this._drag_event._orig_sorder;\r\n\r\n\tvar evTop = ev_height * order;\r\n\twhile((evTop + ev_height) > max_height){\r\n\t\torder--;\r\n\t\tevTop -= ev_height;\r\n\t}\r\n\torder = Math.max(order, 0);\r\n\treturn order;\r\n};\r\n//scheduler._get_event_bar_pos = function(sday, eday, week, drag){\r\nscheduler._get_event_bar_pos = function(ev){\r\n\tvar rtl = this.config.rtl;\r\n\tvar columns = this._colsS;\r\n\tvar x = columns[ev._sday];\r\n\tvar x2 = columns[ev._eday];\r\n\tif (rtl) {\r\n\t\tx = columns[columns.col_length] - columns[ev._eday] + columns[0];\r\n\t\tx2 = columns[columns.col_length] - columns[ev._sday] + columns[0];\r\n\t}\r\n\r\n\tif (x2 == x) x2 = columns[ev._eday + 1];\r\n\tvar hb = this.xy.bar_height;\r\n\r\n\tvar order = ev._sorder;\r\n\tif(ev.id == this._drag_id){\r\n\t\tvar cellHeight = columns.heights[ev._sweek + 1] - columns.heights[ev._sweek]- this.xy.month_head_height;//22 for month head height\r\n\t\torder = scheduler._get_dnd_order(order, hb, cellHeight);\r\n\t}\r\n\tvar y_event_offset = order * hb;\r\n\tvar y = columns.heights[ev._sweek] + (columns.height ? (this.xy.month_scale_height + 2) : 2 ) + y_event_offset;\r\n\treturn {x:x, x2:x2, y:y};\r\n};\r\n\r\nscheduler.render_event_bar = function (ev) {\r\n\tvar parent = this._rendered_location;\r\n\tvar pos = this._get_event_bar_pos(ev);\r\n\tvar y = pos.y;\r\n\tvar x = pos.x;\r\n\tvar x2 = pos.x2;\r\n\t// resize for month mutliday events\r\n\tvar resize_handle = \"\";\r\n\r\n\t//events in ignored dates\r\n\r\n\tif (!x2) return;\r\n\r\n\tvar resizable = scheduler.config.resize_month_events && this._mode == \"month\" &&\r\n\t\t(!ev._timed || scheduler.config.resize_month_timed);\r\n\r\n\tvar d = document.createElement(\"div\");\r\n\tvar left_chunk = (ev.hasOwnProperty(\"_first_chunk\") && ev._first_chunk),\r\n\t\tright_chunk = (ev.hasOwnProperty(\"_last_chunk\") && ev._last_chunk);\r\n\r\n\tvar resize_left = resizable && (ev._timed || left_chunk);\r\n\tvar resize_right = resizable && (ev._timed || right_chunk);\r\n\r\n\tvar timed = true;\r\n\tvar cs = \"dhx_cal_event_clear\";\r\n\tif (!ev._timed || resizable) {\r\n\t\ttimed = false;\r\n\t\tcs = \"dhx_cal_event_line\";\r\n\t}\r\n\tif(left_chunk){\r\n\t\tcs += \" dhx_cal_event_line_start\";\r\n\t}\r\n\tif(right_chunk){\r\n\t\tcs += \" dhx_cal_event_line_end\";\r\n\t}\r\n\tif(resize_left){\r\n\t\tresize_handle += \"
\";\r\n\t}\r\n\tif(resize_right){\r\n\t\tresize_handle += \"
\";\r\n\t}\r\n\r\n\tvar cse = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\tif (cse){\r\n\t\tcs += \" \" + cse;\r\n\t}\r\n\r\n\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\tvar style_text = [\r\n\t\t\"position:absolute\",\r\n\t\t\"top:\" + y + \"px\",\r\n\t\t\"left:\" + x + \"px\",\r\n\t\t\"width:\" + (x2 - x - (timed ? 1 : 0)) + \"px\",\r\n\t\t\"height:\" + (this.xy.bar_height - 2) + \"px\",\r\n\t\tcolor,\r\n\t\tbg_color,\r\n\t\t(ev._text_style || \"\")\r\n\t].join(\";\");\r\n\r\n\tvar html = \"
\";\r\n\tif (resizable) {\r\n\t\thtml += resize_handle;\r\n\t}\r\n\tif(scheduler.getState().mode == \"month\"){\r\n\t\tev = scheduler.getEvent(ev.id); // ev at this point could be a part (row in a month view) of a larger event\r\n\t}\r\n\r\n\tif (ev._timed){\r\n\t\thtml += `${scheduler.templates.event_bar_date(ev.start_date, ev.end_date, ev)}`;\r\n\t}\r\n\r\n\thtml += \"
\";\r\n\thtml += scheduler.templates.event_bar_text(ev.start_date, ev.end_date, ev) + '
';\r\n\thtml += \"
\";\r\n\thtml += '
';\r\n\r\n\td.innerHTML = html;\r\n\r\n\tthis._rendered.push(d.firstChild);\r\n\tparent.appendChild(d.firstChild);\r\n};\r\n\r\nscheduler._locate_event = function(node) {\r\n\tvar id = null;\r\n\twhile (node && !id && node.getAttribute) {\r\n\t\tid = node.getAttribute(this.config.event_attribute);\r\n\t\tnode = node.parentNode;\r\n\t}\r\n\treturn id;\r\n};\r\n\r\nscheduler.edit = function(id) {\r\n\tif (this._edit_id == id) return;\r\n\tthis.editStop(false, id);\r\n\tthis._edit_id = id;\r\n\tthis.updateEvent(id);\r\n};\r\nscheduler.editStop = function(mode, id) {\r\n\tif (id && this._edit_id == id) return;\r\n\tvar ev = this.getEvent(this._edit_id);\r\n\tif (ev) {\r\n\t\tif (mode) ev.text = this._editor.value;\r\n\t\tthis._edit_id = null;\r\n\t\tthis._editor = null;\r\n\t\tthis.updateEvent(ev.id);\r\n\t\tthis._edit_stop_event(ev, mode);\r\n\t}\r\n};\r\nscheduler._edit_stop_event = function(ev, mode) {\r\n\tif (this._new_event) {\r\n\t\tif (!mode) {\r\n\t\t\tif (ev) // in case of custom lightbox user can already delete event\r\n\t\t\t\tthis.deleteEvent(ev.id, true);\r\n\t\t} else {\r\n\t\t\tthis.callEvent(\"onEventAdded\", [ev.id, ev]);\r\n\t\t}\r\n\t\tthis._new_event = null;\r\n\t} else {\r\n\t\tif (mode){\r\n\t\t\tthis.callEvent(\"onEventChanged\", [ev.id, ev]);\r\n\t\t}\r\n\t}\r\n};\r\n\r\nscheduler.getEvents = function(from, to) {\r\n\tvar result = [];\r\n\tfor (var a in this._events) {\r\n\t\tvar ev = this._events[a];\r\n\t\tif (ev && ( (!from && !to) || (ev.start_date < to && ev.end_date > from) ))\r\n\t\t\tresult.push(ev);\r\n\t}\r\n\treturn result;\r\n};\r\nscheduler.getRenderedEvent = function(id) {\r\n\tif (!id)\r\n\t\treturn;\r\n\tvar rendered_events = scheduler._rendered;\r\n\tfor (var i=0; i -1){\r\n\t\t\t\t\tsection = section.split(scheduler.config.section_delimiter)[0];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar top = timeline.getSectionTop(section);\r\n\t\t\tvar left = timeline.posFromDate(event.start_date);\r\n\t\t\tvar container = scheduler.$container.querySelector(\".dhx_timeline_data_wrapper\");\r\n\t\t\tleft = left - (container.offsetWidth - timeline.dx) / 2;\r\n\t\t\ttop = top - container.offsetHeight / 2 + timeline.dy/2;\r\n\r\n\t\t\tif (timeline._smartRenderingEnabled()) {\r\n\t\t\t\tvar handlerId = timeline.attachEvent(\"onScroll\", function(){\r\n\t\t\t\t\trestoreOriginalColors();\r\n\t\t\t\t\ttimeline.detachEvent(handlerId);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\ttimeline.scrollTo({\r\n\t\t\t\tleft: left,\r\n\t\t\t\ttop: top\r\n\t\t\t});\r\n\t\t\tif (!timeline._smartRenderingEnabled()) {\r\n\t\t\t\trestoreOriginalColors();\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\trestoreOriginalColors();\r\n\t}\r\n\r\n\tscheduler.callEvent(\"onAfterEventDisplay\", [ev, mode]);\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._append_drag_marker = function(m){\r\n\tif(m.parentNode) return;\r\n\tvar zone = scheduler._els[\"dhx_cal_data\"][0];\r\n\r\n\tvar scale = zone.lastChild;\r\n\tvar className = scheduler._getClassName(scale);\r\n\tif(className.indexOf(\"dhx_scale_holder\") < 0 && scale.previousSibling){\r\n\t\tscale = scale.previousSibling;\r\n\t}\r\n\r\n\tclassName = scheduler._getClassName(scale);\r\n\tif (scale && className.indexOf(\"dhx_scale_holder\") === 0) {\r\n\t\tscale.appendChild(m);\r\n\t}\r\n};\r\n\r\nscheduler._update_marker_position = function(m, event){\r\n\tvar size = scheduler._calc_event_y(event, 0);\r\n\tm.style.top = size.top + \"px\";\r\n\tm.style.height = size.height + \"px\";\r\n};\r\n\r\nscheduler.highlightEventPosition = function(event){\r\n\tvar m = document.createElement(\"div\");\r\n\r\n\tm.setAttribute(\"event_id\", event.id); // for backward compatibility\r\n\tm.setAttribute(this.config.event_attribute, event.id);\r\n\tthis._rendered.push(m);\r\n\tthis._update_marker_position(m, event);\r\n\r\n\tvar css = this.templates.drag_marker_class(event.start_date, event.end_date, event);\r\n\tvar html = this.templates.drag_marker_content(event.start_date, event.end_date, event);\r\n\tm.className = \"dhx_drag_marker\";\r\n\tif(css)\r\n\t\tm.className += \" \" + css;\r\n\tif(html)\r\n\t\tm.innerHTML = html;\r\n\tthis._append_drag_marker(m);\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler._lightbox_controls = {};\r\nscheduler.formSection = function(name){\r\n\tvar config = this.config.lightbox.sections;\r\n\tvar i = 0;\r\n\tfor (i; i < config.length; i++) {\r\n\t\tif (config[i].name == name) {\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif (i === config.length) {\r\n\t\t// GS-1662 section not found, should exit here instead of throwing an error\r\n\t\treturn null;\r\n\t}\r\n\r\n\tvar section = config[i];\r\n\tif (!scheduler._lightbox) {\r\n\t\tscheduler.getLightbox();\r\n\t}\r\n\tvar header = scheduler._lightbox.querySelector(`#${section.id}`);\r\n\tvar node = header.nextSibling;\r\n\r\n\tvar result = {\r\n\t\tsection: section,\r\n\t\theader: header,\r\n\t\tnode: node,\r\n\t\tgetValue:function(ev){\r\n\t\t\treturn scheduler.form_blocks[section.type].get_value(node, (ev||{}), section);\r\n\t\t},\r\n\t\tsetValue:function(value, ev){\r\n\t\t\treturn scheduler.form_blocks[section.type].set_value(node, value, (ev||{}), section);\r\n\t\t}\r\n\t};\r\n\r\n\tvar handler = scheduler._lightbox_controls[\"get_\"+section.type+\"_control\"];\r\n\treturn handler?handler(result):result;\r\n};\r\nscheduler._lightbox_controls.get_template_control = function(result) {\r\n\tresult.control = result.node;\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_select_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('select')[0];\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_textarea_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('textarea')[0];\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_time_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('select'); // array\r\n\treturn result;\r\n};\r\n\r\nscheduler._lightbox_controls.defaults = {\r\n\ttemplate: {\r\n\t\theight:30\r\n\t},\r\n\ttextarea: {\r\n\t\theight: 200\r\n\t},\r\n\tselect: {\r\n\t\theight: 23\r\n\t},\r\n\ttime: {\r\n\t\theight: 20\r\n\t}\r\n};\r\n\r\n\r\nscheduler.form_blocks={\r\n\ttemplate:{\r\n\t\trender: function(sns){\r\n\t\t\treturn \"
\";\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,config){\r\n\t\t\tnode.innerHTML = value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev,config){\r\n\t\t\treturn node.innerHTML||\"\";\r\n\t\t},\r\n\t\tfocus: function(node){\r\n\t\t}\r\n\t},\r\n\ttextarea:{\r\n\t\trender:function(sns){\r\n\t\t\tconst placeholder = sns.placeholder ? `placeholder='${sns.placeholder}'` : \"\";\r\n\t\t\treturn `
`;\r\n\t\t},\r\n\t\tset_value:function(node,value,ev){\r\n\t\t\tscheduler.form_blocks.textarea._get_input(node).value=value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev){\r\n\t\t\treturn scheduler.form_blocks.textarea._get_input(node).value;\r\n\t\t},\r\n\t\tfocus:function(node){\r\n\t\t\tvar a = scheduler.form_blocks.textarea._get_input(node);\r\n\t\t\tscheduler._focus(a, true);\r\n\t\t},\r\n\t\t_get_input: function(node){\r\n\t\t\treturn node.getElementsByTagName(\"textarea\")[0];\r\n\t\t}\r\n\t},\r\n\tselect:{\r\n\t\trender:function(sns){\r\n\t\t\t//var defaults = scheduler._lightbox_controls.defaults.select;\r\n\t\t\tvar html=\"
\";\r\n\t\t\treturn html;\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,sns){\r\n\t\t\tvar select = node.firstChild;\r\n\t\t\tif (!select._dhx_onchange && sns.onchange) {\r\n\t\t\t\tscheduler.event(select, \"change\", sns.onchange);\r\n\t\t\t\tselect._dhx_onchange = true;\r\n\t\t\t}\r\n\t\t\tif (typeof value == \"undefined\")\r\n\t\t\t\tvalue = (select.options[0]||{}).value;\r\n\t\t\tselect.value=value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev){\r\n\t\t\treturn node.firstChild.value;\r\n\t\t},\r\n\t\tfocus:function(node){\r\n\t\t\tvar a=node.firstChild; scheduler._focus(a, true);\r\n\t\t}\r\n\t},\r\n\ttime:{\r\n\t\trender:function(sns) {\r\n\t\t\tif (!sns.time_format) {\r\n\t\t\t\t// default order\r\n\t\t\t\tsns.time_format = [\"%H:%i\", \"%d\", \"%m\", \"%Y\"];\r\n\t\t\t}\r\n\t\t\t// map: default order => real one\r\n\t\t\tsns._time_format_order = {};\r\n\t\t\tvar time_format = sns.time_format;\r\n\r\n\t\t\tvar cfg = scheduler.config;\r\n\t\t\tvar dt = scheduler.date.date_part(scheduler._currentDate());\r\n\t\t\tvar last = 24*60, first = 0;\r\n\t\t\tif(scheduler.config.limit_time_select){\r\n\t\t\t\tlast = 60*cfg.last_hour+1;\r\n\t\t\t\tfirst = 60*cfg.first_hour;\r\n\t\t\t\tdt.setHours(cfg.first_hour);\r\n\t\t\t}\r\n\t\t\tvar html = \"\";\r\n\r\n\t\t\tfor (var p = 0; p < time_format.length; p++) {\r\n\t\t\t\tvar time_option = time_format[p];\r\n\r\n\t\t\t\t// adding spaces between selects\r\n\t\t\t\tif (p > 0) {\r\n\t\t\t\t\thtml += \" \";\r\n\t\t\t\t}\r\n\t\t\t\tvar selectBoxClass = \"\";\r\n\t\t\t\tvar options = \"\";\r\n\t\t\t\tswitch (time_option) {\r\n\t\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_year_select\";\r\n\t\t\t\t\t\tsns._time_format_order[3] = p;\r\n\t\t\t\t\t\t//year\r\n\t\t\t\t\t\tvar range;\r\n\t\t\t\t\t\tvar start_year;\r\n\t\t\t\t\t\tvar end_year;\r\n\t\t\t\t\t\tif(sns.year_range){\r\n\t\t\t\t\t\t\tif (!isNaN(sns.year_range)) {\r\n\t\t\t\t\t\t\t\trange = sns.year_range;\r\n\t\t\t\t\t\t\t} else if (sns.year_range.push) {\r\n\t\t\t\t\t\t\t\t// if\r\n\t\t\t\t\t\t\t\tstart_year = sns.year_range[0];\r\n\t\t\t\t\t\t\t\tend_year = sns.year_range[1];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\trange = range || 10;\r\n\t\t\t\t\t\tvar offset = offset || Math.floor(range / 2);\r\n\t\t\t\t\t\tstart_year = start_year || dt.getFullYear() - offset;\r\n\t\t\t\t\t\tend_year = end_year || start_year + range;\r\n\r\n\t\t\t\t\t\tfor (var i = start_year; i < end_year; i++)\r\n\t\t\t\t\t\t\toptions += \"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%m\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_month_select\";\r\n\t\t\t\t\t\tsns._time_format_order[2] = p;\r\n\t\t\t\t\t\t//month\r\n\t\t\t\t\t\tfor (var i=0; i < 12; i++)\r\n\t\t\t\t\t\t\toptions+=\"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%d\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_day_select\";\r\n\t\t\t\t\t\tsns._time_format_order[1] = p;\r\n\t\t\t\t\t\t//days\r\n\t\t\t\t\t\tfor (var i=1; i < 32; i++)\r\n\t\t\t\t\t\t\toptions+=\"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%H:%i\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_time_select\";\r\n\t\t\t\t\t\tsns._time_format_order[0] = p;\r\n\t\t\t\t\t\t//hours\r\n\t\t\t\t\t\tvar i = first;\r\n\t\t\t\t\t\tvar tdate = dt.getDate();\r\n\t\t\t\t\t\tsns._time_values = [];\r\n\r\n\t\t\t\t\t\twhile(i\"+time+\"\";\r\n\t\t\t\t\t\t\tsns._time_values.push(i);\r\n\t\t\t\t\t\t\tdt.setTime(dt.valueOf()+this.config.time_step*60*1000);\r\n\t\t\t\t\t\t\tvar diff = (dt.getDate()!=tdate)?1:0; // moved or not to the next day\r\n\t\t\t\t\t\t\ti=diff*24*60+dt.getHours()*60+dt.getMinutes();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(options){\r\n\r\n\t\t\t\t\tvar ariaAttrs = scheduler._waiAria.lightboxSelectAttrString(time_option);\r\n\t\t\t\t\tvar readonly = sns.readonly ? \"disabled='disabled'\" : \"\";\r\n\t\t\t\t\thtml += \" \";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//var defaults = scheduler._lightbox_controls.defaults.select;\r\n\r\n\t\t\treturn \"
\"+html+\"  –  \"+html+\"
\";\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,config){\r\n\t\t\tvar cfg = scheduler.config;\r\n\t\t\tvar s=node.getElementsByTagName(\"select\");\r\n\t\t\tvar map = config._time_format_order;\r\n\t\t\tvar start_date, end_date;\r\n\r\n\t\t\tif(cfg.full_day) {\r\n\t\t\t\tif (!node._full_day){\r\n\t\t\t\t\tvar html = \"\";\r\n\t\t\t\t\tif (!scheduler.config.wide_form)\r\n\t\t\t\t\t\thtml = node.previousSibling.innerHTML+html;\r\n\t\t\t\t\tnode.previousSibling.innerHTML=html;\r\n\t\t\t\t\tnode._full_day=true;\r\n\t\t\t\t}\r\n\t\t\t\tvar input=node.previousSibling.getElementsByTagName(\"input\")[0];\r\n\t\t\t\tinput.checked = (scheduler.date.time_part(ev.start_date)===0 && scheduler.date.time_part(ev.end_date)===0);\r\n\r\n\t\t\t\ts[map[0]].disabled=input.checked;\r\n\t\t\t\ts[ map[0] + s.length/2 ].disabled=input.checked;\r\n\r\n\t\t\t\tif(!input.$_eventAttached){\r\n\t\t\t\t\tinput.$_eventAttached = true;\r\n\r\n\t\t\t\t\t\tscheduler.event(input, \"click\", function(){\r\n\t\t\t\t\t\tif(input.checked) {\r\n\t\t\t\t\t\t\tvar obj = {};\r\n\t\t\t\t\t\t\tscheduler.form_blocks.time.get_value(node,obj,config);\r\n\r\n\t\t\t\t\t\t\tstart_date = scheduler.date.date_part(obj.start_date);\r\n\t\t\t\t\t\t\tend_date = scheduler.date.date_part(obj.end_date);\r\n\r\n\t\t\t\t\t\t\tif (+end_date == +start_date || (+end_date >= +start_date && (ev.end_date.getHours() !== 0 || ev.end_date.getMinutes() !== 0)))\r\n\t\t\t\t\t\t\t\tend_date = scheduler.date.add(end_date, 1, \"day\");\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tstart_date = null;\r\n\t\t\t\t\t\t\tend_date = null;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\ts[map[0]].disabled=input.checked;\r\n\t\t\t\t\t\ts[ map[0] + s.length/2 ].disabled=input.checked;\r\n\r\n\t\t\t\t\t\t_fill_lightbox_select(s,0,start_date||ev.start_date);\r\n\t\t\t\t\t\t_fill_lightbox_select(s,4,end_date||ev.end_date);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(cfg.auto_end_date && cfg.event_duration) {\r\n\t\t\t\tvar _update_lightbox_select = function () {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (!(cfg.auto_end_date && cfg.event_duration)){\r\n\t\t\t\t\t\t// setting may be disabled after the handler is attached\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstart_date = new Date(s[map[3]].value,s[map[2]].value,s[map[1]].value,0,s[map[0]].value);\r\n\t\t\t\t\tend_date = new Date(start_date.getTime() + (scheduler.config.event_duration * 60 * 1000));\r\n\t\t\t\t\t_fill_lightbox_select(s, 4, end_date);\r\n\t\t\t\t};\r\n\t\t\t\tfor(var i=0; i<4; i++) {\r\n\t\t\t\t\tif(!s[i].$_eventAttached) {\r\n\t\t\t\t\t\ts[i].$_eventAttached = true;\r\n\t\t\t\t\t\tscheduler.event(s[i], \"change\", _update_lightbox_select);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction _fill_lightbox_select(s,i,d) {\r\n\t\t\t\tvar time_values = config._time_values;\r\n\t\t\t\tvar direct_value = d.getHours()*60+d.getMinutes();\r\n\t\t\t\tvar fixed_value = direct_value;\r\n\t\t\t\tvar value_found = false;\r\n\t\t\t\tfor (var k=0; k\";\r\n\t\tvar ariaAttr = \"\";\r\n\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\tariaAttr = this._waiAria.lightboxButtonAttrString(buttons[i]);\r\n\t\t\thtml += \"
\" + scheduler.locale.labels[buttons[i]] + \"
\";\r\n\t\t}\r\n\r\n\t\tbuttons = this.config.buttons_right;\r\n\t\tvar rtl = scheduler.config.rtl;\r\n\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\tariaAttr = this._waiAria.lightboxButtonAttrString(buttons[i]);\r\n\r\n\t\t\thtml += \"
\";\r\n\r\n\t\t\thtml += \"
\" + scheduler.locale.labels[buttons[i]] + \"
\";\r\n\t\t}\r\n\t\thtml += \"
\";\r\n\t\thtml+=\"
\";\r\n\t\td.innerHTML=html;\r\n\t\tif (scheduler.config.drag_lightbox){\r\n\t\t\tscheduler.event(d.firstChild, \"mousedown\", scheduler._ready_to_dnd);\r\n\t\t\tscheduler.event(d.firstChild, \"selectstart\", function(e){ \r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn false; \r\n\t\t\t});\r\n\t\t\td.firstChild.style.cursor = \"move\";\r\n\t\t\tscheduler._init_dnd_events();\r\n\r\n\t\t}\r\n\r\n\t\tthis._waiAria.lightboxAttr(d);\r\n\r\n\t\tthis.show_cover();\r\n\t\tthis._cover.insertBefore(d,this._cover.firstChild);\r\n\t\t\r\n\t\tthis._lightbox=d;\r\n\r\n\t\tvar sns=this.config.lightbox.sections;\r\n\t\thtml=\"\";\r\n\t\tfor (var i=0; i < sns.length; i++) {\r\n\t\t\tvar block=this.form_blocks[sns[i].type];\r\n\t\t\tif (!block) continue; //ignore incorrect blocks\r\n\t\t\tsns[i].id=\"area_\"+this.uid();\r\n\t\t\tvar button = \"\";\r\n\t\t\tif (sns[i].button){\r\n\t\t\t\tvar ariaAttr = scheduler._waiAria.lightboxSectionButtonAttrString(this.locale.labels[\"button_\"+sns[i].button]);\r\n\t\t\t\tbutton = \"
\"+this.locale.labels[\"button_\"+sns[i].button]+\"
\";\r\n\t\t\t}\r\n\r\n\t\t\tif (this.config.wide_form){\r\n\t\t\t\thtml+=\"
\";\r\n\t\t\t}\r\n\r\n\t\t\tvar label_name = this.locale.labels[\"section_\"+sns[i].name];\r\n\t\t\tif(typeof label_name !== \"string\"){\r\n\t\t\t\tlabel_name = sns[i].name;\r\n\t\t\t}\r\n\t\t\thtml+=\"
\"+button+ \"
\"+block.render.call(this,sns[i]);\r\n\t\t\thtml+=\"
\";\r\n\t\t}\r\n\r\n\t\tvar ds=d.getElementsByTagName(\"div\");\r\n\t\tfor (var i=0; i
 \r\n
\r\n
\r\n\r\n
`;\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler.getRootView = function() {\r\n\treturn {\r\n\t\tview: {\r\n\t\t\trender: function(){\r\n\t\t\t\treturn {\r\n\t\t\t\t\ttag: \"div\",\r\n\t\t\t\t\ttype: 1,\r\n\t\t\t\t\tattrs: {\r\n\t\t\t\t\t\tstyle: \"width:100%;height:100%;\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\thooks: {\r\n\t\t\t\t\t\t\"didInsert\": function(){\r\n\t\t\t\t\t\t\tscheduler.setCurrentView();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tbody: [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tel: this.el,\r\n\t\t\t\t\t\t\ttype: 1\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t};\r\n\t\t\t},\r\n\t\t\tinit: function(){\r\n\t\t\t\tvar container = document.createElement(\"DIV\");\r\n\t\t\t\tcontainer.id = \"scheduler_\"+ scheduler.uid();\r\n\t\t\t\tcontainer.style.width = \"100%\";\r\n\t\t\t\tcontainer.style.height = \"100%\";\r\n\t\t\t\tcontainer.classList.add(\"dhx_cal_container\");\r\n\t\t\t\tcontainer.cmp = \"grid\";\r\n\t\t\t\tcontainer.innerHTML = '
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
';\r\n\t\t\t\tscheduler.init(container);\r\n\r\n\t\t\t\tthis.el = container;\r\n\t\t\t}\r\n\t\t},\r\n\t\ttype: 4\r\n\t};\r\n};\r\n\r\n}","import global from \"../global\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\n(function(){\r\n\r\n\tvar setCurrentView = scheduler.setCurrentView,\r\n\t\tupdateView = scheduler.updateView;\r\n\tvar update_view_timer = null,\r\n\t\tcurr_view_timer = null;\r\n\r\n\tvar lazy_setCurrentView = function(date, mode){\r\n\t\tvar self = this;\r\n\t\tglobal.clearTimeout(curr_view_timer);\r\n\t\tglobal.clearTimeout(update_view_timer);\r\n\r\n\t\tvar oldDate = self._date,\r\n\t\t\toldMode = self._mode;\r\n\t\tupdateFlags(this, date, mode);\r\n\r\n\t\tcurr_view_timer = setTimeout(function(){\r\n\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif (!self.callEvent(\"onBeforeViewChange\", [oldMode, oldDate, mode || self._mode, date || self._date])){\r\n\t\t\t\tupdateFlags(self, oldDate, oldMode);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tupdateView.call(self, date, mode);\r\n\t\t\tself.callEvent(\"onViewChange\", [self._mode, self._date]);\r\n\r\n\t\t\tglobal.clearTimeout(update_view_timer);\r\n\t\t\tcurr_view_timer = 0;\r\n\t\t}, scheduler.config.delay_render);\r\n\t};\r\n\tvar lazy_updateView = function(date, mode){\r\n\t\tvar self = this,\r\n\t\t\tars = arguments;\r\n\r\n\t\tupdateFlags(this, date, mode);\r\n\r\n\t\tglobal.clearTimeout(update_view_timer);\r\n\t\tupdate_view_timer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif(curr_view_timer)\r\n\t\t\t\treturn;\r\n\r\n\t\t\tupdateView.apply(self, ars);\r\n\t\t}, scheduler.config.delay_render);\r\n\t};\r\n\tfunction updateFlags(scheduler, date, mode){\r\n\t\tif(date)\r\n\t\t\tscheduler._date = date;\r\n\t\tif(mode)\r\n\t\t\tscheduler._mode = mode;\r\n\r\n\t}\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\tif(scheduler.config.delay_render){\r\n\t\t\tscheduler.setCurrentView = lazy_setCurrentView;\r\n\t\t\tscheduler.updateView = lazy_updateView;\r\n\t\t}else{\r\n\t\t\tscheduler.setCurrentView = setCurrentView;\r\n\t\t\tscheduler.updateView = updateView;\r\n\t\t}\r\n\t});\r\n\r\n})();\r\n\r\n}","import global from \"../global\";\r\n\r\nexport default function extend(scheduler) {\r\n/*\r\nif (global.dataProcessor && !dataProcessor.prototype.init_original){\r\n\tdataProcessor.prototype.init_original=dataProcessor.prototype.init;\r\n\tdataProcessor.prototype.init=function(obj){\r\n\t\tthis.init_original(obj);\r\n\t\tobj._dataprocessor=this;\r\n\r\n\t\tthis.setTransactionMode(\"POST\",true);\r\n\t\tthis.serverProcessor+=(this.serverProcessor.indexOf(\"?\")!=-1?\"&\":\"?\")+\"editing=true\";\r\n\t};\r\n}*/\r\n\r\nscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\tif(typeof dhtmlxError !== \"undefined\") {\r\n\t\twindow.dhtmlxError.catchError(\"LoadXML\", function(a, b, c){\r\n\t\t\tvar message = c[0].responseText;\r\n\r\n\t\t\tswitch (scheduler.config.ajax_error){\r\n\t\t\t\tcase \"alert\":\r\n\t\t\t\t\tglobal.alert(message);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"console\":\r\n\t\t\t\t\tglobal.console.log(message);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n});\r\n\r\n\r\n}","import ar from \"./locale_ar\";\r\nimport be from \"./locale_be\";\r\nimport ca from \"./locale_ca\";\r\nimport cn from \"./locale_cn\";\r\nimport cs from \"./locale_cs\";\r\nimport da from \"./locale_da\";\r\nimport de from \"./locale_de\";\r\nimport el from \"./locale_el\";\r\nimport en from \"./locale_en\";\r\nimport es from \"./locale_es\";\r\nimport fi from \"./locale_fi\";\r\nimport fr from \"./locale_fr\";\r\nimport he from \"./locale_he\";\r\nimport hu from \"./locale_hu\";\r\nimport id from \"./locale_id\";\r\nimport it from \"./locale_it\";\r\nimport jp from \"./locale_jp\";\r\n\r\nimport LocaleManager from \"./locale_manager\";\r\n\r\nimport nb from \"./locale_nb\";\r\nimport nl from \"./locale_nl\";\r\nimport no from \"./locale_no\";\r\nimport pl from \"./locale_pl\";\r\nimport pt from \"./locale_pt\";\r\nimport ro from \"./locale_ro\";\r\nimport ru from \"./locale_ru\";\r\nimport si from \"./locale_si\";\r\nimport sk from \"./locale_sk\";\r\nimport sv from \"./locale_sv\";\r\nimport tr from \"./locale_tr\";\r\nimport ua from \"./locale_ua\";\r\n\r\nexport default function(){\r\n\treturn new LocaleManager({\r\n\t\ten,\r\n\t\tar,\r\n\t\tbe,\r\n\t\tca,\r\n\t\tcn,\r\n\t\tcs,\r\n\t\tda,\r\n\t\tde,\r\n\t\tel,\r\n\t\tes,\r\n\t\tfi,\r\n\t\tfr,\r\n\t\the,\r\n\t\thu,\r\n\t\tid,\r\n\t\tit,\r\n\t\tjp,\r\n\t\tnb,\r\n\t\tnl,\r\n\t\tno,\r\n\t\tpl,\r\n\t\tpt,\r\n\t\tro,\r\n\t\tru,\r\n\t\tsi,\r\n\t\tsk,\r\n\t\tsv,\r\n\t\ttr,\r\n\t\tua\r\n\t});\r\n}","export default class ExtensionsManager{\r\n\tconstructor(config){\r\n\t\tthis._extensions = {};\r\n\t\tfor(const i in config){\r\n\t\t\tthis._extensions[i] = config[i];\r\n\t\t}\r\n\t}\r\n\r\n\taddExtension(name, ext) {\r\n\t\tthis._extensions[name] = ext;\r\n\t}\r\n\r\n\tgetExtension(name) {\r\n\t\treturn this._extensions[name];\r\n\t}\r\n}","\r\nexport default function(){\r\n/* global dhtmlx */\r\nif (typeof dhtmlx != \"undefined\" && dhtmlx.attaches) {\r\n\tdhtmlx.attaches.attachScheduler = function (day, mode, tabs, scheduler) {\r\n\t\tvar tabs = tabs || '
';\r\n\t\tvar obj = document.createElement(\"DIV\");\r\n\t\tobj.id = \"dhxSchedObj_\" + this._genStr(12);\r\n\t\tobj.innerHTML = '
' + tabs + '
';\r\n\t\tdocument.body.appendChild(obj.firstChild);\r\n\r\n\t\tthis.attachObject(obj.id, false, true);\r\n\r\n\t\tthis.vs[this.av].sched = scheduler;\r\n\t\tthis.vs[this.av].schedId = obj.id;\r\n\t\tscheduler.setSizes = scheduler.updateView;\r\n\t\tscheduler.destructor = function () { };\r\n\t\tscheduler.init(obj.id, day, mode);\r\n\r\n\t\treturn this.vs[this._viewRestore()].sched;\r\n\t};\r\n}\r\n\r\n}","export default {\r\n\talert: (extension, assert) => {\r\n\t\tassert(false, `The ${extension} extension is not included in this version of dhtmlxScheduler.
\r\n\t\tYou may need a Professional version of the component.
\r\n\t\tContact us at https://dhtmlx.com/docs/contact.shtml if you have any questions.`);\r\n\t}\r\n};","export default function(scheduler){\r\n\r\n\r\n\r\n(function(){\r\n\tvar modalsStack = [];\r\n\r\n\tfunction isModal(){\r\n\t\treturn !!(modalsStack.length);\r\n\t}\r\n\r\n\tfunction isChildOf(child, parent){\r\n\t\twhile(child && child != parent){\r\n\t\t\tchild = child.parentNode;\r\n\t\t}\r\n\r\n\t\treturn !!(child == parent);\r\n\t}\r\n\r\n\tfunction afterPopup(box){\r\n\t\tsetTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif(!isModal() && !(isChildOf(document.activeElement, scheduler.$container))) {\r\n\t\t\t\tscheduler.focus();\r\n\t\t\t}\r\n\t\t}, 1);\r\n\t}\r\n\tfunction startModal(box){\r\n\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\tscheduler.event(box, \"keydown\", trapFocus);\r\n\t\tmodalsStack.push(box);\r\n\t\t//scheduler.$keyboardNavigation.dispatcher.disable();\r\n\t}\r\n\r\n\tfunction endModal(){\r\n\t\tvar box = modalsStack.pop();\r\n\t\tif(box) {\r\n\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t}\r\n\t\tafterPopup(box);\r\n\r\n\t}\r\n\r\n\tfunction isTopModal(box){\r\n\t//\tif(dhtmlx._modalsStack.length){\r\n\t//\t\treturn box == dhtmlx._modalsStack[dhtmlx._modalsStack.length - 1];\r\n\t//\t}else{\r\n\t\t\treturn box == modalsStack[modalsStack.length - 1];\r\n\t//\t}\r\n\r\n\t}\r\n\r\n\tfunction trapFocus(event){\r\n\t\tvar event = event || window.event;\r\n\t\tvar target = event.currentTarget;\r\n\t\tif(!isTopModal(target)) return;\r\n\r\n\t\tscheduler.$keyboardNavigation.trapFocus(target, event);\r\n\t}\r\n\r\n\tfunction traceLightbox(){\r\n\t\tstartModal(scheduler.getLightbox());\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onLightbox\", traceLightbox);\r\n\tscheduler.attachEvent(\"onAfterLightbox\", endModal);\r\n\r\n\tscheduler.attachEvent(\"onAfterQuickInfo\", function(){afterPopup();});\r\n\r\n\tif(!scheduler._keyNavMessagePopup) {\r\n\t\tscheduler._keyNavMessagePopup = true;\r\n\r\n\t\tvar focusElement = null;\r\n\t\tvar backupFocus = null;\r\n\t\tconst modalsStack = [];\r\n\t\tscheduler.attachEvent(\"onMessagePopup\", function(box){\r\n\t\t\tfocusElement = document.activeElement;\r\n\t\t\tbackupFocus = focusElement;\r\n\r\n\t\t\twhile(backupFocus && scheduler._getClassName(backupFocus).indexOf(\"dhx_cal_data\") < 0){\r\n\t\t\t\tbackupFocus = backupFocus.parentNode;\r\n\t\t\t}\r\n\t\t\tif(backupFocus){\r\n\t\t\t\tbackupFocus = backupFocus.parentNode;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t\tscheduler.event(box, \"keydown\", trapFocus);\r\n\t\t\tmodalsStack.push(box);\r\n\t\t});\r\n\r\n\r\n\t\tscheduler.attachEvent(\"onAfterMessagePopup\", function () {\r\n\t\t\tvar box = modalsStack.pop();\r\n\t\t\tif(box) {\r\n\t\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t\t}\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tvar currentTarget = document.activeElement;\r\n\t\t\t\twhile(currentTarget && scheduler._getClassName(currentTarget).indexOf(\"dhx_cal_light\") < 0){\r\n\t\t\t\t\tcurrentTarget = currentTarget.parentNode;\r\n\t\t\t\t}\r\n\t\t\t\tif(currentTarget)\r\n\t\t\t\t\treturn;\r\n\r\n\r\n\t\t\t\tif(focusElement && focusElement.parentNode){\r\n\t\t\t\t\tfocusElement.focus();\r\n\r\n\t\t\t\t}else if(backupFocus && backupFocus.parentNode){\r\n\t\t\t\t\tbackupFocus.focus();\r\n\t\t\t\t}\r\n\t\t\t\tfocusElement = null;\r\n\t\t\t\tbackupFocus = null;\r\n\r\n\t\t\t}, 1);\r\n\t\t});\r\n\t}\r\n\r\n\tscheduler.$keyboardNavigation.isModal = isModal;\r\n\r\n\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\r\n//Initial idea and implementation by Steve MC\r\nscheduler._temp_key_scope = function (){\r\n\r\n\tscheduler.config.key_nav = true;\r\n\r\n\tscheduler.$keyboardNavigation._pasteDate = null; // used for copy and paste operations\r\n\tscheduler.$keyboardNavigation._pasteSection = null; // used for copy and paste operations\r\n\tvar isCopy = null;\r\n\r\n\tvar pos = {};\r\n\r\n\tif(!document.body){\r\n\t\tscheduler.event(window, \"load\", function(){\r\n\t\t\tscheduler.event(document.body, \"mousemove\", trackMousePosition);\r\n\t\t});\r\n\t}else{\r\n\t\tscheduler.event(document.body, \"mousemove\", trackMousePosition);\r\n\t}\r\n\r\n\tfunction trackMousePosition(event){\r\n\t\tevent = event || window.event;\r\n\t\tpos.x = event.clientX;\r\n\t\tpos.y = event.clientY;\r\n\t}\r\n\tfunction currentTarget(){\r\n\r\n\t\tvar mousePointer = false;\r\n\t\tvar keyNavPointer = false;\r\n\r\n\t\tvar target = document.elementFromPoint(pos.x, pos.y);\r\n\t\twhile(target && target != scheduler._obj){\r\n\t\t\ttarget = target.parentNode;\r\n\t\t}\r\n\t\tmousePointer = !!(target == scheduler._obj);\r\n\r\n\t\tkeyNavPointer = scheduler.$keyboardNavigation.dispatcher.isEnabled();\r\n\r\n\t\treturn mousePointer || keyNavPointer;\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onMouseMove\", function(id,e){\r\n\t\tvar state = scheduler.getState();\r\n\r\n\t\t// make sure scheduler is fully initialized before calling scheduler.getActionData\r\n\t\tif(!(state.mode && state.min_date)){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar position = scheduler.getActionData(e);\r\n\t\tscheduler.$keyboardNavigation._pasteDate = position.date;\r\n\t\tscheduler.$keyboardNavigation._pasteSection = position.section;\r\n\t});\r\n\r\n\tfunction clear_event_after(ev){\r\n\t\tdelete ev.rec_type; delete ev.rec_pattern;\r\n\t\tdelete ev.event_pid; delete ev.event_length;\r\n\t}\r\n\r\n\tfunction copyEvent(ev){\r\n\t\treturn scheduler._lame_copy({}, ev);\r\n\t}\r\n\r\n\tscheduler._make_pasted_event = function(ev){\r\n\t\tvar date = scheduler.$keyboardNavigation._pasteDate;\r\n\t\tvar section = scheduler.$keyboardNavigation._pasteSection;\r\n\r\n\t\tvar event_duration = ev.end_date-ev.start_date;\r\n\r\n\t\tvar copy = copyEvent(ev);\r\n\t\tclear_event_after(copy);\r\n\t\tcopy.start_date = new Date(date);\r\n\t\tcopy.end_date = new Date(copy.start_date.valueOf() + event_duration);\r\n\r\n\t\tif(section){\r\n\t\t\tvar property = scheduler._get_section_property();\r\n\t\t\t// GS-2527: if the event has multiple sections, it will be inserted into the initial sections.\r\n\t\t\tif(scheduler.config.multisection && ev[property] && scheduler.isMultisectionEvent && scheduler.isMultisectionEvent(ev)) \r\n\t\t\t\tcopy[property] = ev[property]; // save initial set of resources for multisection view\r\n\t\t\telse\r\n\t\t\t\tcopy[property] = section;\r\n\t\t}\r\n\t\treturn copy;\r\n\t};\r\n\tscheduler._do_paste = function(is_copy, modified_ev, original_ev){\r\n\t\tif(scheduler.callEvent(\"onBeforeEventPasted\", [is_copy, modified_ev, original_ev]) === false){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tscheduler.addEvent(modified_ev);\r\n\t\tscheduler.callEvent(\"onEventPasted\", [is_copy, modified_ev, original_ev]);\r\n\t};\r\n\r\n\tscheduler._is_key_nav_active = function(){\r\n\t\tif(this._is_initialized() && !this._is_lightbox_open() && this.config.key_nav){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\r\n\tfunction getSelectedEvent(){\r\n\t\tvar node = scheduler.$keyboardNavigation.dispatcher.getActiveNode();\r\n\t\tif(node && node.eventId) return node.eventId;\r\n\t\treturn scheduler._select_id;\r\n\t}\r\n\r\n\tscheduler.event(document, \"keydown\", function(e){\r\n\t\t// compatibility fix - scheduler focus on ctrl+v on mouse hover\r\n\t\tif(((e.ctrlKey || e.metaKey) && e.keyCode == 86) && scheduler._buffer_event && !scheduler.$keyboardNavigation.dispatcher.isEnabled()) {\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.isActive = currentTarget();\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler._key_nav_copy_paste = function(e){\r\n\t\tif(!scheduler._is_key_nav_active()) return true;\r\n\r\n\t\tif (e.keyCode == 37 || e.keyCode == 39) { // Left, Right arrows\r\n\t\t\te.cancelBubble = true;\r\n\r\n\t\t\tvar next = scheduler.date.add(scheduler._date,(e.keyCode == 37 ? -1 : 1 ),scheduler._mode);\r\n\t\t\tscheduler.setCurrentView(next);\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tvar select_id = getSelectedEvent();\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 67) { // CTRL+C\r\n\t\t\tif (select_id) {\r\n\t\t\t\tscheduler._buffer_event = copyEvent(scheduler.getEvent(select_id));\r\n\t\t\t\tisCopy = true;\r\n\t\t\t\tscheduler.callEvent(\"onEventCopied\", [scheduler.getEvent(select_id)]);\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 88) { // CTRL+X\r\n\t\t\tif (select_id) {\r\n\t\t\t\tisCopy = false;\r\n\t\t\t\tvar ev = scheduler._buffer_event = copyEvent(scheduler.getEvent(select_id));\r\n\r\n\t\t\t\tscheduler.updateEvent(ev.id);\r\n\t\t\t\tscheduler.callEvent(\"onEventCut\", [ev]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 86 && currentTarget(e)) { // CTRL+V\r\n\t\t\tvar ev = scheduler._buffer_event ? scheduler.getEvent(scheduler._buffer_event.id) : scheduler._buffer_event;\r\n\t\t\tev = ev || scheduler._buffer_event;\r\n\r\n\t\t\tif (ev) {\r\n\t\t\t\tvar new_ev = scheduler._make_pasted_event(ev);\r\n\t\t\t\tif (isCopy) {\r\n\t\t\t\t\tnew_ev.id = scheduler.uid();\r\n\t\t\t\t\tscheduler._do_paste(isCopy, new_ev, ev);\r\n\t\t\t\t}\r\n\t\t\t\telse { // cut operation\r\n\t\t\t\t\tvar res = scheduler.callEvent(\"onBeforeEventChanged\",[new_ev, e, false, ev]);\r\n\t\t\t\t\tif (res) {\r\n\t\t\t\t\t\tscheduler._do_paste(isCopy, new_ev, ev);\r\n\t\t\t\t\t\tisCopy = true; // switch to copy after first paste operation\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t};\r\n};\r\nscheduler._temp_key_scope();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.attachSchedulerHandlers = function(){\r\n\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\tvar keyDownHandler = function(e){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\r\n\t\treturn dispatcher.keyDownHandler(e);\r\n\t};\r\n\r\n\tvar focusHandler = function () {\r\n\t\tdispatcher.keepScrollPosition(function () {\r\n\t\t\tdispatcher.focusGlobalNode();\r\n\t\t});\r\n\t};\r\n\r\n\tvar waitCall;\r\n\tscheduler.attachEvent(\"onDataRender\", function(){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\t\tif(!(dispatcher.isEnabled() && !scheduler.getState().editor_id)) return;\r\n\r\n\t\tclearTimeout(waitCall);\r\n\t\twaitCall = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif(!dispatcher.isEnabled())\r\n\t\t\t\tdispatcher.enable();\r\n\t\t\treFocusActiveNode();\r\n\t\t});\r\n\t});\r\n\r\n\tvar reFocusActiveNode = function(){\r\n\t\tif(!dispatcher.isEnabled())\r\n\t\t\treturn;\r\n\r\n\t\tvar activeNode = dispatcher.getActiveNode();\r\n\t\tif(!activeNode)\r\n\t\t\treturn;\r\n\r\n\t\tif(!activeNode.isValid()){\r\n\t\t\tactiveNode = activeNode.fallback();\r\n\t\t}\r\n\r\n\t\tif(!activeNode || activeNode instanceof scheduler.$keyboardNavigation.MinicalButton || activeNode instanceof scheduler.$keyboardNavigation.MinicalCell)\r\n\t\t\treturn;\r\n\r\n\t\tdispatcher.keepScrollPosition(function () {\r\n\t\t\tactiveNode.focus(true);\r\n\t\t});\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\tvar container = scheduler.$container;\r\n\t\tscheduler.eventRemove(document, \"keydown\", keyDownHandler);\r\n\t\tscheduler.eventRemove(container, \"mousedown\", mousedownHandler);\r\n\t\tscheduler.eventRemove(container, \"focus\", focusHandler);\r\n\r\n\r\n\t\tif(scheduler.config.key_nav){\r\n\r\n\t\t\tscheduler.event(document, \"keydown\", keyDownHandler);\r\n\t\t\tscheduler.event(container, \"mousedown\", mousedownHandler);\r\n\t\t\tscheduler.event(container, \"focus\", focusHandler);\r\n\r\n\t\t\tcontainer.setAttribute(\"tabindex\", \"0\");\r\n\r\n\t\t}else{\r\n\t\t\tcontainer.removeAttribute(\"tabindex\");\r\n\t\t}\r\n\t});\r\n\r\n\tfunction mousedownHandler(e){\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\r\n\t\tconst view = scheduler.getView();\r\n\t\tlet dataAreaClick = false;\r\n\t\tif (scheduler.getState().mode === \"month\") {\r\n\t\t\tdataAreaClick = scheduler.$keyboardNavigation.isChildOf(e.target || e.srcElement, scheduler.$container.querySelector(\".dhx_cal_month_table\"));\r\n\t\t} else if (view && view.layout === \"timeline\") {\r\n\t\t\tdataAreaClick = scheduler.$keyboardNavigation.isChildOf(e.target || e.srcElement, scheduler.$container.querySelector(\".dhx_timeline_data_col\"));\r\n\t\t} else {\r\n\t\t\tconst listOfScales = scheduler.$container.querySelectorAll(\".dhx_scale_holder\");\r\n\t\t\tconst arrOfScales = Array.from(listOfScales);\r\n\t\t\tdataAreaClick = arrOfScales.some(scale => scale === e.target.parentNode);\r\n\t\t}\r\n\r\n\t\tvar pos = scheduler.getActionData(e);\r\n\r\n\t\tvar focusNode;\r\n\t\tif(scheduler._locate_event(e.target || e.srcElement)){\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.Event(scheduler._locate_event(e.target || e.srcElement));\r\n\t\t}else if(dataAreaClick){\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(pos.date && dataAreaClick){\r\n\t\t\t\tfocusNode = focusNode.nextSlot(new scheduler.$keyboardNavigation.TimeSlot(pos.date, null, pos.section));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(focusNode) {\r\n\t\t\tif (!dispatcher.isEnabled()) {\r\n\t\t\t\tdispatcher.activeNode = focusNode;\r\n\r\n\t\t\t} else {\r\n\t\t\t\tif (pos.date && dataAreaClick) {\r\n\t\t\t\t\tdispatcher.delay(function () {\r\n\t\t\t\t\t\tdispatcher.setActiveNode(focusNode);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction focusEvent(evNode){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\t\tif(!dispatcher.isEnabled()) return;\r\n\r\n\r\n\t\tvar prevState = evNode;\r\n\t\tvar focusNode = new scheduler.$keyboardNavigation.Event(prevState.eventId);\r\n\t\tif(!focusNode.isValid()){\r\n\t\t\tvar lastStart = focusNode.start || prevState.start;\r\n\t\t\tvar lastEnd = focusNode.end || prevState.end;\r\n\t\t\tvar lastSection = focusNode.section || prevState.section;\r\n\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot(lastStart, lastEnd, lastSection);\r\n\t\t\tif(!focusNode.isValid()){\r\n\t\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdispatcher.setActiveNode(focusNode);\r\n\t\tvar node = dispatcher.getActiveNode();\r\n\t\tif(node && node.getNode && document.activeElement != node.getNode()){\r\n\t\t\tdispatcher.focusNode(dispatcher.getActiveNode());\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tvar updateEvent = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id){\r\n\t\tvar res = updateEvent.apply(this, arguments);\r\n\t\tif(scheduler.config.key_nav && dispatcher.isEnabled()){\r\n\t\t\tif(scheduler.getState().select_id == id){\r\n\t\t\t\tvar element = new scheduler.$keyboardNavigation.Event(id);\r\n\r\n\t\t\t\tif(!scheduler.getState().lightbox_id){\r\n\t\t\t\t\tfocusEvent(element);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onEventDeleted\", function(id) {\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\t\tif(dispatcher.isEnabled()){\r\n\t\t\tvar activeNode = dispatcher.getActiveNode();\r\n\t\t\tif(activeNode.eventId == id){\r\n\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onClearAll\", function(){\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\t\tif(dispatcher.isEnabled()){\r\n\t\t\tif(dispatcher.getActiveNode() instanceof scheduler.$keyboardNavigation.Event){\r\n\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n};\r\n\r\n}","import { IMapAdapter, ICalendarEvent, IMapSettings, IMapPosition} from \"./types\";\r\ndeclare let google: any;\r\n\r\nexport class GoogleMapAdapter implements IMapAdapter {\r\n\tprivate map: any;\r\n\tprivate scheduler: any;\r\n\tprivate settings: IMapSettings;\r\n\tprivate _markers: any[];\r\n\tprivate infoWindow: any;\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.map = null;\r\n\t\tthis._markers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t}\r\n\tonEventClick(event: ICalendarEvent): void {\r\n\t\tif (this._markers && this._markers.length > 0) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\t\tif (event.id == this._markers[i].event.id) {\r\n\t\t\t\t\tlet zoom = this.settings.zoom_after_resolve || this.settings.initial_zoom;\r\n\t\t\t\t\tif (event.lat && event.lng){\r\n\t\t\t\t\t\tthis.map.setCenter({\r\n\t\t\t\t\t\t\tlat: event.lat, \r\n\t\t\t\t\t\t\tlng: event.lng,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tthis.map.setZoom(zoom);\r\n\t\t\t\t\t} else {\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.map.setCenter({\r\n\t\t\t\t\t\t\tlat: this.settings.error_position.lat, \r\n\t\t\t\t\t\t\tlng: this.settings.error_position.lng,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tthis.map.setZoom(zoom);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tgoogle.maps.event.trigger(this._markers[i].marker, 'click');\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t} \r\n\t}\r\n\r\n\tinitialize(container: HTMLElement, options: IMapSettings): void {\r\n\t\tthis.settings = options;\r\n\t\tlet scheduler = this.scheduler;\r\n\t\tlet mapOptions = {\r\n\t\t\tcenter: { lat: options.initial_position.lat, lng: options.initial_position.lng },\r\n\t\t\tzoom: options.initial_zoom,\r\n\t\t\tmapId: container.id,\r\n\t\t\tscrollwheel: true,\r\n\t\t\tmapTypeId: options.type\r\n\t\t}\r\n\t\t// we need to reuse the google map to avoid leak memory\r\n\t\tif (this.map === null) {\r\n\t\t\tthis.map = new google.maps.Map(container, mapOptions);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tlet map = this.map;\r\n\t\t\tcontainer.appendChild(this.map.__gm.messageOverlay);\r\n\t\t\tcontainer.appendChild(this.map.__gm.outerContainer);\r\n\t\t\tsetTimeout(function() {\r\n\t\t\t\tmap.setOptions({container: container.id});\r\n\t\t\t}, 500);\r\n\t\t}\r\n\t\tgoogle.maps.event.addListener(this.map, \"dblclick\", function(event) {\r\n\t\t\tconst geocoder = new google.maps.Geocoder();\r\n\t\r\n\t\t\tif (!scheduler.config.readonly && scheduler.config.dblclick_create) {\r\n\t\t\t\tlet point = event.latLng;\r\n\t\t\t\tgeocoder.geocode(\r\n\t\t\t\t\t{ 'latLng': point },\r\n\t\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\t\tif (status == google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\t\tpoint = results[0].geometry.location;\r\n\t\t\t\t\t\t\tscheduler.addEventNow({\r\n\t\t\t\t\t\t\t\tlat: point.lat(),\r\n\t\t\t\t\t\t\t\tlng: point.lng(),\r\n\t\t\t\t\t\t\t\tevent_location: results[0].formatted_address,\r\n\t\t\t\t\t\t\t\tstart_date: scheduler.getState().date,\r\n\t\t\t\t\t\t\t\tend_date: scheduler.date.add(scheduler.getState().date, scheduler.config.time_step, \"minute\")\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tconsole.error('Geocode was not successful for the following reason: ' + status);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tdestroy(container: HTMLElement): void {\r\n\t\tgoogle.maps.event.clearInstanceListeners(window);\r\n\t\tgoogle.maps.event.clearInstanceListeners(document);\r\n\t\tgoogle.maps.event.clearInstanceListeners(container);\r\n\t\twhile (container.firstChild) {\r\n\t\t\tcontainer.firstChild.remove();\r\n\t\t}\r\n\t\tcontainer.innerHTML = \"\";\r\n\t}\r\n\r\n\tasync addEventMarker(event: ICalendarEvent): Promise {\r\n\t\tlet config = {\r\n\t\t\ttitle: event.text,\r\n\t\t\tposition: {},\r\n\t\t\tmap: {}\r\n\t\t}\r\n\t\t\r\n\t\tif (event.lat && event.lng) {\r\n\t\t\tconfig.position = { lat: event.lat, lng: event.lng };\r\n\t\t} else {\r\n\t\t\tconfig.position = { lat: this.settings.error_position.lat, lng: this.settings.error_position.lng }\r\n\t\t}\r\n\t\tconst { AdvancedMarkerElement } = await google.maps.importLibrary(\"marker\");\r\n\t\tlet marker;\r\n\t\tif (this.scheduler.ext.mapView.createMarker) {\r\n\t\t\tconfig.map = this.map;\r\n\t\t\tmarker = this.scheduler.ext.mapView.createMarker(config);\r\n\t\t} else {\r\n\t\t\tmarker = new AdvancedMarkerElement(config);\r\n\t\t\tmarker.map = this.map;\r\n\t\t}\r\n\t\tmarker.setMap(this.map);\r\n\t\t//case for markeks which were deleted with DataProcessor\r\n\t\tif (event[\"!nativeeditor_status\"] == \"true_deleted\"){\r\n\t\t\tmarker.setMap(null);\r\n\t\t}\r\n\t\tgoogle.maps.event.addListener(marker, \"click\", () => {\r\n\t\t\tif (this.infoWindow) {\r\n\t\t\t\tthis.infoWindow.close();\r\n\t\t\t}\r\n\t\t\tthis.infoWindow = new google.maps.InfoWindow({maxWidth: this.settings.info_window_max_width});\r\n\t\t\tthis.infoWindow.setContent(this.scheduler.templates.map_info_content(event));\r\n\t\t\tthis.infoWindow.open({\r\n\t\t\t\tanchor: marker,\r\n\t\t\t\tmap: this.map,\r\n\t\t\t});\r\n\t\t});\r\n\t\tlet markerInfo = {event, ...config, marker};\r\n\t\tthis._markers.push(markerInfo);\r\n\t}\r\n\r\n\tremoveEventMarker(eventId: string): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif (eventId == this._markers[i].event.id) {\r\n\t\t\t\tthis._markers[i].marker.setVisible(false);\r\n\t\t\t\tthis._markers[i].marker.setMap(null);\r\n\t\t\t\tthis._markers[i].marker.setPosition(null);\r\n\t\t\t\tthis._markers[i].marker = null;\r\n\t\t\t\tthis._markers.splice(i,1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tupdateEventMarker(event: ICalendarEvent): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif(this._markers[i].event.id == event.id) {\r\n\t\t\t\tthis._markers[i].event = event;\r\n\t\t\t\tthis._markers[i].position.lat = event.lat;\r\n\t\t\t\tthis._markers[i].position.lng = event.lng;\r\n\t\t\t\tthis._markers[i].text = event.text;\r\n\t\t\t\tlet latlng = new google.maps.LatLng(event.lat, event.lng);\r\n\t\t\t\tthis._markers[i].marker.setPosition(latlng);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tclearEventMarkers(): void {\r\n\t\tif (this._markers.length > 0) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\t\tthis._markers[i].marker.setMap(null);\r\n\t\t\t}\r\n\t\t\tthis._markers = [];\r\n\t\t}\r\n\t}\r\n\r\n\tsetView(latitude: number, longitude: number, zoom: number): void {\r\n\t\tthis.map.setCenter({\r\n\t\t\tlat: latitude, \r\n\t\t\tlng: longitude,\r\n\t\t});\r\n\t\tthis.map.setZoom(zoom);\r\n\t}\r\n\r\n\tasync resolveAddress(string: string): Promise {\r\n\t\tconst geocoder = new google.maps.Geocoder();\r\n\t\tlet position: any = await new Promise((resolve) => {\r\n\t\t\tgeocoder.geocode(\r\n\t\t\t\t{ 'address': string },\r\n\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\tif (status == google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\tresolve({\r\n\t\t\t\t\t\t lat: results[0].geometry.location.lat(),\r\n\t\t\t\t\t\t lng: results[0].geometry.location.lng()\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tconsole.error('Geocode was not successful for the following reason: ' + status);\r\n\t\t\t\t\t\tresolve({});\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t});\r\n\t\treturn position;\r\n\t}\r\n\t\r\n}","import { IMapAdapter, ICalendarEvent, IMapSettings, IMapPosition} from \"./types\";\r\n\r\ndeclare let L: any\r\n\r\nexport class OpenStreetMapAdapter implements IMapAdapter {\r\n\tprivate map: any;\r\n\tprivate scheduler: any;\r\n\tprivate _markers: any[];\r\n\tprivate settings: IMapSettings;\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.map = null;\r\n\t\tthis._markers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t}\r\n\tonEventClick(event: ICalendarEvent): void {\r\n\t\tif (this._markers && this._markers.length > 0) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\t\tif (event.id == this._markers[i].event.id) {\r\n\t\t\t\t\tthis._markers[i].marker.openPopup();\r\n\t\t\t\t\tthis._markers[i].marker.closeTooltip();\r\n\t\t\t\t\tif (event.lat && event.lng) {\r\n\t\t\t\t\t\tthis.setView(event.lat, event.lng, this.settings.zoom_after_resolve || this.settings.initial_zoom);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.setView(this.settings.error_position.lat, this.settings.error_position.lng, this.settings.zoom_after_resolve || this.settings.initial_zoom);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t} \r\n\t}\r\n\r\n\tinitialize(container: HTMLElement, options: IMapSettings): void {\r\n\t\tlet scheduler = this.scheduler;\r\n\t\tlet mapWrapper = document.createElement('div');\r\n\t\tmapWrapper.className = 'mapWrapper';\r\n\t\tmapWrapper.id = 'mapWrapper';\r\n\t\tmapWrapper.style.width = container.style.width;\r\n\t\tmapWrapper.style.height = container.style.height;\r\n\t\tcontainer.appendChild(mapWrapper);\r\n\r\n\t\tlet map = L.map(mapWrapper, {\r\n\t\t\tcenter: L.latLng(options.initial_position.lat, options.initial_position.lng),\r\n\t\t\tzoom: options.initial_zoom,\r\n\t\t\tkeyboard: false // need to set false, due to bug with moving window\r\n\t\t});\r\n\t\tL.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(map);\r\n\t\tmap.on(\"dblclick\", async function(e){\r\n\t\t\tconst settings = {\r\n\t\t\t\t\"method\": \"GET\",\r\n\t\t\t\theaders: {\r\n\t\t\t\t\t\"Accept-Language\": \"en\",\r\n\t\t\t\t},\r\n\t\t\t};\r\n\t\t\tlet response = await fetch(`https://nominatim.openstreetmap.org/reverse?lat=${e.latlng.lat}&lon=${e.latlng.lng}&format=json`, settings).then(response => response.json());\r\n\t\t\tif (response.address) {\r\n\t\t\t\tlet address = response.address.country;\r\n\t\t\t\tscheduler.addEventNow({\r\n\t\t\t\t\tlat: e.latlng.lat,\r\n\t\t\t\t\tlng: e.latlng.lng,\r\n\t\t\t\t\tevent_location: address,\r\n\t\t\t\t\tstart_date: scheduler.getState().date,\r\n\t\t\t\t\tend_date: scheduler.date.add(scheduler.getState().date, scheduler.config.time_step, \"minute\")\r\n\t\t\t\t});\r\n\t\t\t} else {\r\n\t\t\t\tconsole.error(\"unable recieve a position of the event\", response.error);\r\n\t\t\t}\r\n\t\t});\r\n\t\tthis.map = map;\r\n\t\tthis.settings = options;\r\n\t}\r\n\r\n\tdestroy(container: HTMLElement): void {\r\n\t\tthis.map.remove();\r\n\t\twhile (container.firstChild) {\r\n\t\t\tcontainer.firstChild.remove();\r\n\t\t}\r\n\t\tcontainer.innerHTML = \"\";\r\n\t}\r\n\r\n\taddEventMarker(event: ICalendarEvent): void {\r\n\t\tconst myIcon = L.icon({\r\n\t\t\ticonUrl: 'https://unpkg.com/leaflet@1.0.3/dist/images/marker-icon.png',\r\n\t\t\ticonSize: [25, 41],\r\n\t\t\tshadowSize: [30, 65],\r\n\t\t\ticonAnchor: [12, 41],\r\n\t\t\tshadowAnchor: [7, 65]\r\n\t\t});\r\n\t\tlet popupConfig = {\r\n\t\t\tminWidth: 180,\r\n\t\t\tmaxWidth: this.settings.info_window_max_width,\r\n\t\t}\r\n\t\tconst markerPopup = L.popup(popupConfig).setContent(this.scheduler.templates.map_info_content(event));\r\n\t\tconst tooltip = L.tooltip().setContent(event.text);\r\n\r\n\t\tlet markerConfig = [\r\n\t\t\tevent.lat,\r\n\t\t\tevent.lng\r\n\t\t]\r\n\t\t\r\n\t\tif (!event.lat || !event.lng) {\r\n\t\t\tmarkerConfig = [this.settings.error_position.lat, this.settings.error_position.lng];\r\n\t\t}\r\n\t\tconst marker = L.marker(markerConfig, {\r\n\t\t\ticon: myIcon\r\n\t\t}).bindPopup(markerPopup).bindTooltip(tooltip).addTo(this.map);\r\n\t\tconst markerInfo = {event, marker};\r\n\t\tthis._markers.push(markerInfo);\t\t\r\n\t}\r\n\r\n\tremoveEventMarker(eventId: string): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif (eventId == this._markers[i].event.id) {\r\n\t\t\t\tthis.map.removeLayer(this._markers[i].marker);\r\n\t\t\t\tthis._markers.splice(i,1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tupdateEventMarker(event: ICalendarEvent): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif(this._markers[i].event.id == event.id) {\r\n\t\t\t\tthis._markers[i].event = event;\r\n\t\t\t\tif (!event.lat || !event.lng){\r\n\t\t\t\t\tthis._markers[i].marker.setLatLng([this.settings.error_position.lat, this.settings.error_position.lng]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis._markers[i].marker.setLatLng([event.lat, event.lng]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tclearEventMarkers(): void {\r\n\t\tif(this._markers) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\t\tthis.map.removeLayer(this._markers[i].marker); \r\n\t\t\t}\r\n\t\t\tthis._markers = [];\r\n\t\t}\r\n\t}\r\n\r\n\tsetView(latitude: number, longitude: number, zoom: number): void {\r\n\t\tthis.map.setView([latitude, longitude], zoom);\r\n\t}\r\n\r\n\tasync resolveAddress(string: string): Promise {\r\n\t\tconst settings = {\r\n\t\t\t\"method\": \"GET\",\r\n\t\t\theaders: {\r\n\t\t\t\t\"Accept-Language\": \"en\",\r\n\t\t\t},\r\n\t\t};\r\n\t\tlet position:any = {};\r\n\t\tlet response = await fetch(`https://nominatim.openstreetmap.org/search?q=${string}&format=json`, settings).then(response => response.json());\r\n\t\tif (response && response.length) {\r\n\t\t\tposition.lat = +response[0].lat;\r\n\t\t\tposition.lng = +response[0].lon;\r\n\t\t} else {\r\n\t\t\tconsole.error(`Unable recieve a position of the event's location: ${string}`);\r\n\t\t}\r\n\t\treturn position;\r\n\t}\r\n}","import { IMapAdapter, ICalendarEvent, IMapSettings, IMapPosition} from \"./types\";\r\n\r\ndeclare let mapboxgl: any;\r\ndeclare let MapboxGeocoder: any;\r\n\r\nexport class MapboxAdapter implements IMapAdapter {\r\n\tprivate map: any;\r\n\tprivate scheduler: any;\r\n\tprivate settings: IMapSettings;\r\n\tprivate _markers: any[];\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.map = null;\r\n\t\tthis._markers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t}\r\n\tonEventClick(event: ICalendarEvent): void {\r\n\t\tif (this._markers && this._markers.length > 0) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n const popup = this._markers[i].marker.getPopup();\r\n if (popup.isOpen()){\r\n popup.remove();\r\n }\r\n\t\t\t\tif (event.id == this._markers[i].event.id) {\r\n\t\t\t\t\tthis._markers[i].marker.togglePopup();\r\n\t\t\t\t\tif (event.lat && event.lng) {\r\n\t\t\t\t\t\tthis.setView(event.lat, event.lng, this.settings.zoom_after_resolve || this.settings.initial_zoom);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.setView(this.settings.error_position.lat, this.settings.error_position.lng, this.settings.zoom_after_resolve || this.settings.initial_zoom);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t} \r\n\t}\r\n\r\n\tinitialize(container: HTMLElement, options: IMapSettings): void {\r\n let scheduler = this.scheduler;\r\n\r\n\t\tmapboxgl.accessToken = options.accessToken;\r\n const map = new mapboxgl.Map({\r\n container: container, \r\n center: [options.initial_position.lng, options.initial_position.lat], \r\n zoom: options.initial_zoom + 1, // problems with coordinates if zoom = 1\r\n });\r\n map.on(\"dblclick\",async function(e){\r\n\t\t\tlet response = await fetch(`https://api.mapbox.com/geocoding/v5/mapbox.places/${e.lngLat.lng},${ e.lngLat.lat}.json?access_token=${options.accessToken}`).then(response => response.json());\r\n\t\t\tif (response.features){\r\n\t\t\t\tlet address = response.features[0].place_name;\r\n\t\t\t\tscheduler.addEventNow({\r\n\t\t\t\t\tlat: e.lngLat.lat,\r\n\t\t\t\t\tlng: e.lngLat.lng,\r\n\t\t\t\t\tevent_location: address,\r\n\t\t\t\t\tstart_date: scheduler.getState().date,\r\n\t\t\t\t\tend_date: scheduler.date.add(scheduler.getState().date, scheduler.config.time_step, \"minute\")\r\n\t\t\t\t});\r\n\t\t\t} else {\r\n\t\t\t\tconsole.error(\"unable recieve a position of the event\");\r\n\t\t\t}\r\n\t\t});\r\n this.map = map;\r\n this.settings = options;\r\n\t}\r\n\r\n\tdestroy(container: HTMLElement): void {\r\n\t\tthis.map.remove();\r\n while (container.firstChild) {\r\n\t\t\tcontainer.firstChild.remove();\r\n\t\t}\r\n container.innerHTML = \"\";\r\n\t}\r\n\r\n\taddEventMarker(event: ICalendarEvent): void {\r\n let config = [\r\n\t\t\tevent.lng,\r\n\t\t\tevent.lat\r\n\t\t]\r\n\t\t\r\n\t\tif (!event.lat || !event.lng) {\r\n\t\t\tconfig = [this.settings.error_position.lng, this.settings.error_position.lat];\r\n\t\t} \r\n\r\n\t\tconst popup = new mapboxgl.Popup({ offset: 25, focusAfterOpen: false})\r\n .setMaxWidth(`${this.settings.info_window_max_width}px`) \r\n .setHTML(this.scheduler.templates.map_info_content(event));\r\n const marker = new mapboxgl.Marker()\r\n .setLngLat(config)\r\n .setPopup(popup)\r\n .addTo(this.map);\r\n const markerInfo = {event, marker}; \r\n this._markers.push(markerInfo);\r\n\t}\r\n\r\n\tremoveEventMarker(eventId: string): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif (eventId == this._markers[i].event.id) {\r\n\t\t\t\tthis._markers[i].marker.remove();\r\n this._markers.splice(i,1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tupdateEventMarker(event: ICalendarEvent): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif(this._markers[i].event.id == event.id) {\r\n\t\t\t\tthis._markers[i].event = event;\r\n\t\t\t\tif (!event.lat || !event.lng){\r\n\t\t\t\t\tthis._markers[i].marker.setLngLat([this.settings.error_position.lng, this.settings.error_position.lat]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis._markers[i].marker.setLngLat([event.lng, event.lat]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tclearEventMarkers(): void {\r\n\t\tfor (let i = 0; i {\r\n\t\tlet response = await fetch(`https://api.mapbox.com/geocoding/v5/mapbox.places/${string}.json?access_token=${this.settings.accessToken}`).then(response => response.json());\r\n\t\tlet position:any = {};\r\n\t\tif (response && response.features.length) {\r\n\t\t\tposition.lng = response.features[0].center[0];\r\n\t\t\tposition.lat = response.features[0].center[1];\r\n\t\t} else {\r\n\t\t\tconsole.error(`Unable recieve a position of the event's location: ${string}`);\r\n\t\t}\r\n\t\treturn position;\r\n\t}\r\n}","// =============================================================================\n// Weekday\n// =============================================================================\nexport var ALL_WEEKDAYS = [\n 'MO',\n 'TU',\n 'WE',\n 'TH',\n 'FR',\n 'SA',\n 'SU',\n];\nvar Weekday = /** @class */ (function () {\n function Weekday(weekday, n) {\n if (n === 0)\n throw new Error(\"Can't create weekday with n == 0\");\n this.weekday = weekday;\n this.n = n;\n }\n Weekday.fromStr = function (str) {\n return new Weekday(ALL_WEEKDAYS.indexOf(str));\n };\n // __call__ - Cannot call the object directly, do it through\n // e.g. RRule.TH.nth(-1) instead,\n Weekday.prototype.nth = function (n) {\n return this.n === n ? this : new Weekday(this.weekday, n);\n };\n // __eq__\n Weekday.prototype.equals = function (other) {\n return this.weekday === other.weekday && this.n === other.n;\n };\n // __repr__\n Weekday.prototype.toString = function () {\n var s = ALL_WEEKDAYS[this.weekday];\n if (this.n)\n s = (this.n > 0 ? '+' : '') + String(this.n) + s;\n return s;\n };\n Weekday.prototype.getJsWeekday = function () {\n return this.weekday === 6 ? 0 : this.weekday + 1;\n };\n return Weekday;\n}());\nexport { Weekday };\n//# sourceMappingURL=weekday.js.map","// =============================================================================\n// Helper functions\n// =============================================================================\nimport { ALL_WEEKDAYS } from './weekday';\nexport var isPresent = function (value) {\n return value !== null && value !== undefined;\n};\nexport var isNumber = function (value) {\n return typeof value === 'number';\n};\nexport var isWeekdayStr = function (value) {\n return typeof value === 'string' && ALL_WEEKDAYS.includes(value);\n};\nexport var isArray = Array.isArray;\n/**\n * Simplified version of python's range()\n */\nexport var range = function (start, end) {\n if (end === void 0) { end = start; }\n if (arguments.length === 1) {\n end = start;\n start = 0;\n }\n var rang = [];\n for (var i = start; i < end; i++)\n rang.push(i);\n return rang;\n};\nexport var clone = function (array) {\n return [].concat(array);\n};\nexport var repeat = function (value, times) {\n var i = 0;\n var array = [];\n if (isArray(value)) {\n for (; i < times; i++)\n array[i] = [].concat(value);\n }\n else {\n for (; i < times; i++)\n array[i] = value;\n }\n return array;\n};\nexport var toArray = function (item) {\n if (isArray(item)) {\n return item;\n }\n return [item];\n};\nexport function padStart(item, targetLength, padString) {\n if (padString === void 0) { padString = ' '; }\n var str = String(item);\n targetLength = targetLength >> 0;\n if (str.length > targetLength) {\n return String(str);\n }\n targetLength = targetLength - str.length;\n if (targetLength > padString.length) {\n padString += repeat(padString, targetLength / padString.length);\n }\n return padString.slice(0, targetLength) + String(str);\n}\n/**\n * Python like split\n */\nexport var split = function (str, sep, num) {\n var splits = str.split(sep);\n return num\n ? splits.slice(0, num).concat([splits.slice(num).join(sep)])\n : splits;\n};\n/**\n * closure/goog/math/math.js:modulo\n * Copyright 2006 The Closure Library Authors.\n * The % operator in JavaScript returns the remainder of a / b, but differs from\n * some other languages in that the result will have the same sign as the\n * dividend. For example, -1 % 8 == -1, whereas in some other languages\n * (such as Python) the result would be 7. This function emulates the more\n * correct modulo behavior, which is useful for certain applications such as\n * calculating an offset index in a circular list.\n *\n * @param {number} a The dividend.\n * @param {number} b The divisor.\n * @return {number} a % b where the result is between 0 and b (either 0 <= x < b\n * or b < x <= 0, depending on the sign of b).\n */\nexport var pymod = function (a, b) {\n var r = a % b;\n // If r and b differ in sign, add b to wrap the result to the correct sign.\n return r * b < 0 ? r + b : r;\n};\n/**\n * @see: \n */\nexport var divmod = function (a, b) {\n return { div: Math.floor(a / b), mod: pymod(a, b) };\n};\nexport var empty = function (obj) {\n return !isPresent(obj) || obj.length === 0;\n};\n/**\n * Python-like boolean\n *\n * @return {Boolean} value of an object/primitive, taking into account\n * the fact that in Python an empty list's/tuple's\n * boolean value is False, whereas in JS it's true\n */\nexport var notEmpty = function (obj) {\n return !empty(obj);\n};\n/**\n * Return true if a value is in an array\n */\nexport var includes = function (arr, val) {\n return notEmpty(arr) && arr.indexOf(val) !== -1;\n};\n//# sourceMappingURL=helpers.js.map","import { padStart } from './helpers';\nexport var datetime = function (y, m, d, h, i, s) {\n if (h === void 0) { h = 0; }\n if (i === void 0) { i = 0; }\n if (s === void 0) { s = 0; }\n return new Date(Date.UTC(y, m - 1, d, h, i, s));\n};\n/**\n * General date-related utilities.\n * Also handles several incompatibilities between JavaScript and Python\n *\n */\nexport var MONTH_DAYS = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n/**\n * Number of milliseconds of one day\n */\nexport var ONE_DAY = 1000 * 60 * 60 * 24;\n/**\n * @see: \n */\nexport var MAXYEAR = 9999;\n/**\n * Python uses 1-Jan-1 as the base for calculating ordinals but we don't\n * want to confuse the JS engine with milliseconds > Number.MAX_NUMBER,\n * therefore we use 1-Jan-1970 instead\n */\nexport var ORDINAL_BASE = datetime(1970, 1, 1);\n/**\n * Python: MO-SU: 0 - 6\n * JS: SU-SAT 0 - 6\n */\nexport var PY_WEEKDAYS = [6, 0, 1, 2, 3, 4, 5];\n/**\n * py_date.timetuple()[7]\n */\nexport var getYearDay = function (date) {\n var dateNoTime = new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate());\n return (Math.ceil((dateNoTime.valueOf() - new Date(date.getUTCFullYear(), 0, 1).valueOf()) /\n ONE_DAY) + 1);\n};\nexport var isLeapYear = function (year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n};\nexport var isDate = function (value) {\n return value instanceof Date;\n};\nexport var isValidDate = function (value) {\n return isDate(value) && !isNaN(value.getTime());\n};\n/**\n * @return {Number} the date's timezone offset in ms\n */\nexport var tzOffset = function (date) {\n return date.getTimezoneOffset() * 60 * 1000;\n};\n/**\n * @see: \n */\nexport var daysBetween = function (date1, date2) {\n // The number of milliseconds in one day\n // Convert both dates to milliseconds\n var date1ms = date1.getTime();\n var date2ms = date2.getTime();\n // Calculate the difference in milliseconds\n var differencems = date1ms - date2ms;\n // Convert back to days and return\n return Math.round(differencems / ONE_DAY);\n};\n/**\n * @see: \n */\nexport var toOrdinal = function (date) {\n return daysBetween(date, ORDINAL_BASE);\n};\n/**\n * @see - \n */\nexport var fromOrdinal = function (ordinal) {\n return new Date(ORDINAL_BASE.getTime() + ordinal * ONE_DAY);\n};\nexport var getMonthDays = function (date) {\n var month = date.getUTCMonth();\n return month === 1 && isLeapYear(date.getUTCFullYear())\n ? 29\n : MONTH_DAYS[month];\n};\n/**\n * @return {Number} python-like weekday\n */\nexport var getWeekday = function (date) {\n return PY_WEEKDAYS[date.getUTCDay()];\n};\n/**\n * @see: \n */\nexport var monthRange = function (year, month) {\n var date = datetime(year, month + 1, 1);\n return [getWeekday(date), getMonthDays(date)];\n};\n/**\n * @see: \n */\nexport var combine = function (date, time) {\n time = time || date;\n return new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), time.getHours(), time.getMinutes(), time.getSeconds(), time.getMilliseconds()));\n};\nexport var clone = function (date) {\n var dolly = new Date(date.getTime());\n return dolly;\n};\nexport var cloneDates = function (dates) {\n var clones = [];\n for (var i = 0; i < dates.length; i++) {\n clones.push(clone(dates[i]));\n }\n return clones;\n};\n/**\n * Sorts an array of Date or Time objects\n */\nexport var sort = function (dates) {\n dates.sort(function (a, b) {\n return a.getTime() - b.getTime();\n });\n};\nexport var timeToUntilString = function (time, utc) {\n if (utc === void 0) { utc = true; }\n var date = new Date(time);\n return [\n padStart(date.getUTCFullYear().toString(), 4, '0'),\n padStart(date.getUTCMonth() + 1, 2, '0'),\n padStart(date.getUTCDate(), 2, '0'),\n 'T',\n padStart(date.getUTCHours(), 2, '0'),\n padStart(date.getUTCMinutes(), 2, '0'),\n padStart(date.getUTCSeconds(), 2, '0'),\n utc ? 'Z' : '',\n ].join('');\n};\nexport var untilStringToDate = function (until) {\n var re = /^(\\d{4})(\\d{2})(\\d{2})(T(\\d{2})(\\d{2})(\\d{2})Z?)?$/;\n var bits = re.exec(until);\n if (!bits)\n throw new Error(\"Invalid UNTIL value: \".concat(until));\n return new Date(Date.UTC(parseInt(bits[1], 10), parseInt(bits[2], 10) - 1, parseInt(bits[3], 10), parseInt(bits[5], 10) || 0, parseInt(bits[6], 10) || 0, parseInt(bits[7], 10) || 0));\n};\nvar dateTZtoISO8601 = function (date, timeZone) {\n // date format for sv-SE is almost ISO8601\n var dateStr = date.toLocaleString('sv-SE', { timeZone: timeZone });\n // '2023-02-07 10:41:36'\n return dateStr.replace(' ', 'T') + 'Z';\n};\nexport var dateInTimeZone = function (date, timeZone) {\n var localTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;\n // Date constructor can only reliably parse dates in ISO8601 format\n var dateInLocalTZ = new Date(dateTZtoISO8601(date, localTimeZone));\n var dateInTargetTZ = new Date(dateTZtoISO8601(date, timeZone !== null && timeZone !== void 0 ? timeZone : 'UTC'));\n var tzOffset = dateInTargetTZ.getTime() - dateInLocalTZ.getTime();\n return new Date(date.getTime() - tzOffset);\n};\n//# sourceMappingURL=dateutil.js.map","/**\n * This class helps us to emulate python's generators, sorta.\n */\nvar IterResult = /** @class */ (function () {\n function IterResult(method, args) {\n this.minDate = null;\n this.maxDate = null;\n this._result = [];\n this.total = 0;\n this.method = method;\n this.args = args;\n if (method === 'between') {\n this.maxDate = args.inc\n ? args.before\n : new Date(args.before.getTime() - 1);\n this.minDate = args.inc ? args.after : new Date(args.after.getTime() + 1);\n }\n else if (method === 'before') {\n this.maxDate = args.inc ? args.dt : new Date(args.dt.getTime() - 1);\n }\n else if (method === 'after') {\n this.minDate = args.inc ? args.dt : new Date(args.dt.getTime() + 1);\n }\n }\n /**\n * Possibly adds a date into the result.\n *\n * @param {Date} date - the date isn't necessarly added to the result\n * list (if it is too late/too early)\n * @return {Boolean} true if it makes sense to continue the iteration\n * false if we're done.\n */\n IterResult.prototype.accept = function (date) {\n ++this.total;\n var tooEarly = this.minDate && date < this.minDate;\n var tooLate = this.maxDate && date > this.maxDate;\n if (this.method === 'between') {\n if (tooEarly)\n return true;\n if (tooLate)\n return false;\n }\n else if (this.method === 'before') {\n if (tooLate)\n return false;\n }\n else if (this.method === 'after') {\n if (tooEarly)\n return true;\n this.add(date);\n return false;\n }\n return this.add(date);\n };\n /**\n *\n * @param {Date} date that is part of the result.\n * @return {Boolean} whether we are interested in more values.\n */\n IterResult.prototype.add = function (date) {\n this._result.push(date);\n return true;\n };\n /**\n * 'before' and 'after' return only one date, whereas 'all'\n * and 'between' an array.\n *\n * @return {Date,Array?}\n */\n IterResult.prototype.getValue = function () {\n var res = this._result;\n switch (this.method) {\n case 'all':\n case 'between':\n return res;\n case 'before':\n case 'after':\n default:\n return (res.length ? res[res.length - 1] : null);\n }\n };\n IterResult.prototype.clone = function () {\n return new IterResult(this.method, this.args);\n };\n return IterResult;\n}());\nexport default IterResult;\n//# sourceMappingURL=iterresult.js.map","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol */\n\nvar 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 (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(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\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n function next() {\n while (env.stack.length) {\n var rec = env.stack.pop();\n try {\n var result = rec.dispose && rec.dispose.call(rec.value);\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n catch (e) {\n fail(e);\n }\n }\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n};\n","import { __extends } from \"tslib\";\nimport IterResult from './iterresult';\n/**\n * IterResult subclass that calls a callback function on each add,\n * and stops iterating when the callback returns false.\n */\nvar CallbackIterResult = /** @class */ (function (_super) {\n __extends(CallbackIterResult, _super);\n function CallbackIterResult(method, args, iterator) {\n var _this = _super.call(this, method, args) || this;\n _this.iterator = iterator;\n return _this;\n }\n CallbackIterResult.prototype.add = function (date) {\n if (this.iterator(date, this._result.length)) {\n this._result.push(date);\n return true;\n }\n return false;\n };\n return CallbackIterResult;\n}(IterResult));\nexport default CallbackIterResult;\n//# sourceMappingURL=callbackiterresult.js.map","export var Frequency;\n(function (Frequency) {\n Frequency[Frequency[\"YEARLY\"] = 0] = \"YEARLY\";\n Frequency[Frequency[\"MONTHLY\"] = 1] = \"MONTHLY\";\n Frequency[Frequency[\"WEEKLY\"] = 2] = \"WEEKLY\";\n Frequency[Frequency[\"DAILY\"] = 3] = \"DAILY\";\n Frequency[Frequency[\"HOURLY\"] = 4] = \"HOURLY\";\n Frequency[Frequency[\"MINUTELY\"] = 5] = \"MINUTELY\";\n Frequency[Frequency[\"SECONDLY\"] = 6] = \"SECONDLY\";\n})(Frequency || (Frequency = {}));\nexport function freqIsDailyOrGreater(freq) {\n return freq < Frequency.HOURLY;\n}\n//# sourceMappingURL=types.js.map","// =============================================================================\n// i18n\n// =============================================================================\nvar ENGLISH = {\n dayNames: [\n 'Sunday',\n 'Monday',\n 'Tuesday',\n 'Wednesday',\n 'Thursday',\n 'Friday',\n 'Saturday',\n ],\n monthNames: [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n ],\n tokens: {\n SKIP: /^[ \\r\\n\\t]+|^\\.$/,\n number: /^[1-9][0-9]*/,\n numberAsText: /^(one|two|three)/i,\n every: /^every/i,\n 'day(s)': /^days?/i,\n 'weekday(s)': /^weekdays?/i,\n 'week(s)': /^weeks?/i,\n 'hour(s)': /^hours?/i,\n 'minute(s)': /^minutes?/i,\n 'month(s)': /^months?/i,\n 'year(s)': /^years?/i,\n on: /^(on|in)/i,\n at: /^(at)/i,\n the: /^the/i,\n first: /^first/i,\n second: /^second/i,\n third: /^third/i,\n nth: /^([1-9][0-9]*)(\\.|th|nd|rd|st)/i,\n last: /^last/i,\n for: /^for/i,\n 'time(s)': /^times?/i,\n until: /^(un)?til/i,\n monday: /^mo(n(day)?)?/i,\n tuesday: /^tu(e(s(day)?)?)?/i,\n wednesday: /^we(d(n(esday)?)?)?/i,\n thursday: /^th(u(r(sday)?)?)?/i,\n friday: /^fr(i(day)?)?/i,\n saturday: /^sa(t(urday)?)?/i,\n sunday: /^su(n(day)?)?/i,\n january: /^jan(uary)?/i,\n february: /^feb(ruary)?/i,\n march: /^mar(ch)?/i,\n april: /^apr(il)?/i,\n may: /^may/i,\n june: /^june?/i,\n july: /^july?/i,\n august: /^aug(ust)?/i,\n september: /^sep(t(ember)?)?/i,\n october: /^oct(ober)?/i,\n november: /^nov(ember)?/i,\n december: /^dec(ember)?/i,\n comma: /^(,\\s*|(and|or)\\s*)+/i,\n },\n};\nexport default ENGLISH;\n//# sourceMappingURL=i18n.js.map","import ENGLISH from './i18n';\nimport { RRule } from '../rrule';\nimport { isArray, isNumber, isPresent } from '../helpers';\n// =============================================================================\n// Helper functions\n// =============================================================================\n/**\n * Return true if a value is in an array\n */\nvar contains = function (arr, val) {\n return arr.indexOf(val) !== -1;\n};\nvar defaultGetText = function (id) { return id.toString(); };\nvar defaultDateFormatter = function (year, month, day) { return \"\".concat(month, \" \").concat(day, \", \").concat(year); };\n/**\n *\n * @param {RRule} rrule\n * Optional:\n * @param {Function} gettext function\n * @param {Object} language definition\n * @constructor\n */\nvar ToText = /** @class */ (function () {\n function ToText(rrule, gettext, language, dateFormatter) {\n if (gettext === void 0) { gettext = defaultGetText; }\n if (language === void 0) { language = ENGLISH; }\n if (dateFormatter === void 0) { dateFormatter = defaultDateFormatter; }\n this.text = [];\n this.language = language || ENGLISH;\n this.gettext = gettext;\n this.dateFormatter = dateFormatter;\n this.rrule = rrule;\n this.options = rrule.options;\n this.origOptions = rrule.origOptions;\n if (this.origOptions.bymonthday) {\n var bymonthday = [].concat(this.options.bymonthday);\n var bynmonthday = [].concat(this.options.bynmonthday);\n bymonthday.sort(function (a, b) { return a - b; });\n bynmonthday.sort(function (a, b) { return b - a; });\n // 1, 2, 3, .., -5, -4, -3, ..\n this.bymonthday = bymonthday.concat(bynmonthday);\n if (!this.bymonthday.length)\n this.bymonthday = null;\n }\n if (isPresent(this.origOptions.byweekday)) {\n var byweekday = !isArray(this.origOptions.byweekday)\n ? [this.origOptions.byweekday]\n : this.origOptions.byweekday;\n var days = String(byweekday);\n this.byweekday = {\n allWeeks: byweekday.filter(function (weekday) {\n return !weekday.n;\n }),\n someWeeks: byweekday.filter(function (weekday) {\n return Boolean(weekday.n);\n }),\n isWeekdays: days.indexOf('MO') !== -1 &&\n days.indexOf('TU') !== -1 &&\n days.indexOf('WE') !== -1 &&\n days.indexOf('TH') !== -1 &&\n days.indexOf('FR') !== -1 &&\n days.indexOf('SA') === -1 &&\n days.indexOf('SU') === -1,\n isEveryDay: days.indexOf('MO') !== -1 &&\n days.indexOf('TU') !== -1 &&\n days.indexOf('WE') !== -1 &&\n days.indexOf('TH') !== -1 &&\n days.indexOf('FR') !== -1 &&\n days.indexOf('SA') !== -1 &&\n days.indexOf('SU') !== -1,\n };\n var sortWeekDays = function (a, b) {\n return a.weekday - b.weekday;\n };\n this.byweekday.allWeeks.sort(sortWeekDays);\n this.byweekday.someWeeks.sort(sortWeekDays);\n if (!this.byweekday.allWeeks.length)\n this.byweekday.allWeeks = null;\n if (!this.byweekday.someWeeks.length)\n this.byweekday.someWeeks = null;\n }\n else {\n this.byweekday = null;\n }\n }\n /**\n * Test whether the rrule can be fully converted to text.\n *\n * @param {RRule} rrule\n * @return {Boolean}\n */\n ToText.isFullyConvertible = function (rrule) {\n var canConvert = true;\n if (!(rrule.options.freq in ToText.IMPLEMENTED))\n return false;\n if (rrule.origOptions.until && rrule.origOptions.count)\n return false;\n for (var key in rrule.origOptions) {\n if (contains(['dtstart', 'tzid', 'wkst', 'freq'], key))\n return true;\n if (!contains(ToText.IMPLEMENTED[rrule.options.freq], key))\n return false;\n }\n return canConvert;\n };\n ToText.prototype.isFullyConvertible = function () {\n return ToText.isFullyConvertible(this.rrule);\n };\n /**\n * Perform the conversion. Only some of the frequencies are supported.\n * If some of the rrule's options aren't supported, they'll\n * be omitted from the output an \"(~ approximate)\" will be appended.\n *\n * @return {*}\n */\n ToText.prototype.toString = function () {\n var gettext = this.gettext;\n if (!(this.options.freq in ToText.IMPLEMENTED)) {\n return gettext('RRule error: Unable to fully convert this rrule to text');\n }\n this.text = [gettext('every')];\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this[RRule.FREQUENCIES[this.options.freq]]();\n if (this.options.until) {\n this.add(gettext('until'));\n var until = this.options.until;\n this.add(this.dateFormatter(until.getUTCFullYear(), this.language.monthNames[until.getUTCMonth()], until.getUTCDate()));\n }\n else if (this.options.count) {\n this.add(gettext('for'))\n .add(this.options.count.toString())\n .add(this.plural(this.options.count) ? gettext('times') : gettext('time'));\n }\n if (!this.isFullyConvertible())\n this.add(gettext('(~ approximate)'));\n return this.text.join('');\n };\n ToText.prototype.HOURLY = function () {\n var gettext = this.gettext;\n if (this.options.interval !== 1)\n this.add(this.options.interval.toString());\n this.add(this.plural(this.options.interval) ? gettext('hours') : gettext('hour'));\n };\n ToText.prototype.MINUTELY = function () {\n var gettext = this.gettext;\n if (this.options.interval !== 1)\n this.add(this.options.interval.toString());\n this.add(this.plural(this.options.interval)\n ? gettext('minutes')\n : gettext('minute'));\n };\n ToText.prototype.DAILY = function () {\n var gettext = this.gettext;\n if (this.options.interval !== 1)\n this.add(this.options.interval.toString());\n if (this.byweekday && this.byweekday.isWeekdays) {\n this.add(this.plural(this.options.interval)\n ? gettext('weekdays')\n : gettext('weekday'));\n }\n else {\n this.add(this.plural(this.options.interval) ? gettext('days') : gettext('day'));\n }\n if (this.origOptions.bymonth) {\n this.add(gettext('in'));\n this._bymonth();\n }\n if (this.bymonthday) {\n this._bymonthday();\n }\n else if (this.byweekday) {\n this._byweekday();\n }\n else if (this.origOptions.byhour) {\n this._byhour();\n }\n };\n ToText.prototype.WEEKLY = function () {\n var gettext = this.gettext;\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString()).add(this.plural(this.options.interval) ? gettext('weeks') : gettext('week'));\n }\n if (this.byweekday && this.byweekday.isWeekdays) {\n if (this.options.interval === 1) {\n this.add(this.plural(this.options.interval)\n ? gettext('weekdays')\n : gettext('weekday'));\n }\n else {\n this.add(gettext('on')).add(gettext('weekdays'));\n }\n }\n else if (this.byweekday && this.byweekday.isEveryDay) {\n this.add(this.plural(this.options.interval) ? gettext('days') : gettext('day'));\n }\n else {\n if (this.options.interval === 1)\n this.add(gettext('week'));\n if (this.origOptions.bymonth) {\n this.add(gettext('in'));\n this._bymonth();\n }\n if (this.bymonthday) {\n this._bymonthday();\n }\n else if (this.byweekday) {\n this._byweekday();\n }\n if (this.origOptions.byhour) {\n this._byhour();\n }\n }\n };\n ToText.prototype.MONTHLY = function () {\n var gettext = this.gettext;\n if (this.origOptions.bymonth) {\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString()).add(gettext('months'));\n if (this.plural(this.options.interval))\n this.add(gettext('in'));\n }\n else {\n // this.add(gettext('MONTH'))\n }\n this._bymonth();\n }\n else {\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString());\n }\n this.add(this.plural(this.options.interval)\n ? gettext('months')\n : gettext('month'));\n }\n if (this.bymonthday) {\n this._bymonthday();\n }\n else if (this.byweekday && this.byweekday.isWeekdays) {\n this.add(gettext('on')).add(gettext('weekdays'));\n }\n else if (this.byweekday) {\n this._byweekday();\n }\n };\n ToText.prototype.YEARLY = function () {\n var gettext = this.gettext;\n if (this.origOptions.bymonth) {\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString());\n this.add(gettext('years'));\n }\n else {\n // this.add(gettext('YEAR'))\n }\n this._bymonth();\n }\n else {\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString());\n }\n this.add(this.plural(this.options.interval) ? gettext('years') : gettext('year'));\n }\n if (this.bymonthday) {\n this._bymonthday();\n }\n else if (this.byweekday) {\n this._byweekday();\n }\n if (this.options.byyearday) {\n this.add(gettext('on the'))\n .add(this.list(this.options.byyearday, this.nth, gettext('and')))\n .add(gettext('day'));\n }\n if (this.options.byweekno) {\n this.add(gettext('in'))\n .add(this.plural(this.options.byweekno.length)\n ? gettext('weeks')\n : gettext('week'))\n .add(this.list(this.options.byweekno, undefined, gettext('and')));\n }\n };\n ToText.prototype._bymonthday = function () {\n var gettext = this.gettext;\n if (this.byweekday && this.byweekday.allWeeks) {\n this.add(gettext('on'))\n .add(this.list(this.byweekday.allWeeks, this.weekdaytext, gettext('or')))\n .add(gettext('the'))\n .add(this.list(this.bymonthday, this.nth, gettext('or')));\n }\n else {\n this.add(gettext('on the')).add(this.list(this.bymonthday, this.nth, gettext('and')));\n }\n // this.add(gettext('DAY'))\n };\n ToText.prototype._byweekday = function () {\n var gettext = this.gettext;\n if (this.byweekday.allWeeks && !this.byweekday.isWeekdays) {\n this.add(gettext('on')).add(this.list(this.byweekday.allWeeks, this.weekdaytext));\n }\n if (this.byweekday.someWeeks) {\n if (this.byweekday.allWeeks)\n this.add(gettext('and'));\n this.add(gettext('on the')).add(this.list(this.byweekday.someWeeks, this.weekdaytext, gettext('and')));\n }\n };\n ToText.prototype._byhour = function () {\n var gettext = this.gettext;\n this.add(gettext('at')).add(this.list(this.origOptions.byhour, undefined, gettext('and')));\n };\n ToText.prototype._bymonth = function () {\n this.add(this.list(this.options.bymonth, this.monthtext, this.gettext('and')));\n };\n ToText.prototype.nth = function (n) {\n n = parseInt(n.toString(), 10);\n var nth;\n var gettext = this.gettext;\n if (n === -1)\n return gettext('last');\n var npos = Math.abs(n);\n switch (npos) {\n case 1:\n case 21:\n case 31:\n nth = npos + gettext('st');\n break;\n case 2:\n case 22:\n nth = npos + gettext('nd');\n break;\n case 3:\n case 23:\n nth = npos + gettext('rd');\n break;\n default:\n nth = npos + gettext('th');\n }\n return n < 0 ? nth + ' ' + gettext('last') : nth;\n };\n ToText.prototype.monthtext = function (m) {\n return this.language.monthNames[m - 1];\n };\n ToText.prototype.weekdaytext = function (wday) {\n var weekday = isNumber(wday) ? (wday + 1) % 7 : wday.getJsWeekday();\n return ((wday.n ? this.nth(wday.n) + ' ' : '') +\n this.language.dayNames[weekday]);\n };\n ToText.prototype.plural = function (n) {\n return n % 100 !== 1;\n };\n ToText.prototype.add = function (s) {\n this.text.push(' ');\n this.text.push(s);\n return this;\n };\n ToText.prototype.list = function (arr, callback, finalDelim, delim) {\n var _this = this;\n if (delim === void 0) { delim = ','; }\n if (!isArray(arr)) {\n arr = [arr];\n }\n var delimJoin = function (array, delimiter, finalDelimiter) {\n var list = '';\n for (var i = 0; i < array.length; i++) {\n if (i !== 0) {\n if (i === array.length - 1) {\n list += ' ' + finalDelimiter + ' ';\n }\n else {\n list += delimiter + ' ';\n }\n }\n list += array[i];\n }\n return list;\n };\n callback =\n callback ||\n function (o) {\n return o.toString();\n };\n var realCallback = function (arg) {\n return callback && callback.call(_this, arg);\n };\n if (finalDelim) {\n return delimJoin(arr.map(realCallback), delim, finalDelim);\n }\n else {\n return arr.map(realCallback).join(delim + ' ');\n }\n };\n return ToText;\n}());\nexport default ToText;\n//# sourceMappingURL=totext.js.map","import ENGLISH from './i18n';\nimport { RRule } from '../rrule';\n// =============================================================================\n// Parser\n// =============================================================================\nvar Parser = /** @class */ (function () {\n function Parser(rules) {\n this.done = true;\n this.rules = rules;\n }\n Parser.prototype.start = function (text) {\n this.text = text;\n this.done = false;\n return this.nextSymbol();\n };\n Parser.prototype.isDone = function () {\n return this.done && this.symbol === null;\n };\n Parser.prototype.nextSymbol = function () {\n var best;\n var bestSymbol;\n this.symbol = null;\n this.value = null;\n do {\n if (this.done)\n return false;\n var rule = void 0;\n best = null;\n for (var name_1 in this.rules) {\n rule = this.rules[name_1];\n var match = rule.exec(this.text);\n if (match) {\n if (best === null || match[0].length > best[0].length) {\n best = match;\n bestSymbol = name_1;\n }\n }\n }\n if (best != null) {\n this.text = this.text.substr(best[0].length);\n if (this.text === '')\n this.done = true;\n }\n if (best == null) {\n this.done = true;\n this.symbol = null;\n this.value = null;\n return;\n }\n } while (bestSymbol === 'SKIP');\n this.symbol = bestSymbol;\n this.value = best;\n return true;\n };\n Parser.prototype.accept = function (name) {\n if (this.symbol === name) {\n if (this.value) {\n var v = this.value;\n this.nextSymbol();\n return v;\n }\n this.nextSymbol();\n return true;\n }\n return false;\n };\n Parser.prototype.acceptNumber = function () {\n return this.accept('number');\n };\n Parser.prototype.expect = function (name) {\n if (this.accept(name))\n return true;\n throw new Error('expected ' + name + ' but found ' + this.symbol);\n };\n return Parser;\n}());\nexport default function parseText(text, language) {\n if (language === void 0) { language = ENGLISH; }\n var options = {};\n var ttr = new Parser(language.tokens);\n if (!ttr.start(text))\n return null;\n S();\n return options;\n function S() {\n // every [n]\n ttr.expect('every');\n var n = ttr.acceptNumber();\n if (n)\n options.interval = parseInt(n[0], 10);\n if (ttr.isDone())\n throw new Error('Unexpected end');\n switch (ttr.symbol) {\n case 'day(s)':\n options.freq = RRule.DAILY;\n if (ttr.nextSymbol()) {\n AT();\n F();\n }\n break;\n // FIXME Note: every 2 weekdays != every two weeks on weekdays.\n // DAILY on weekdays is not a valid rule\n case 'weekday(s)':\n options.freq = RRule.WEEKLY;\n options.byweekday = [RRule.MO, RRule.TU, RRule.WE, RRule.TH, RRule.FR];\n ttr.nextSymbol();\n AT();\n F();\n break;\n case 'week(s)':\n options.freq = RRule.WEEKLY;\n if (ttr.nextSymbol()) {\n ON();\n AT();\n F();\n }\n break;\n case 'hour(s)':\n options.freq = RRule.HOURLY;\n if (ttr.nextSymbol()) {\n ON();\n F();\n }\n break;\n case 'minute(s)':\n options.freq = RRule.MINUTELY;\n if (ttr.nextSymbol()) {\n ON();\n F();\n }\n break;\n case 'month(s)':\n options.freq = RRule.MONTHLY;\n if (ttr.nextSymbol()) {\n ON();\n F();\n }\n break;\n case 'year(s)':\n options.freq = RRule.YEARLY;\n if (ttr.nextSymbol()) {\n ON();\n F();\n }\n break;\n case 'monday':\n case 'tuesday':\n case 'wednesday':\n case 'thursday':\n case 'friday':\n case 'saturday':\n case 'sunday':\n options.freq = RRule.WEEKLY;\n var key = ttr.symbol\n .substr(0, 2)\n .toUpperCase();\n options.byweekday = [RRule[key]];\n if (!ttr.nextSymbol())\n return;\n // TODO check for duplicates\n while (ttr.accept('comma')) {\n if (ttr.isDone())\n throw new Error('Unexpected end');\n var wkd = decodeWKD();\n if (!wkd) {\n throw new Error('Unexpected symbol ' + ttr.symbol + ', expected weekday');\n }\n options.byweekday.push(RRule[wkd]);\n ttr.nextSymbol();\n }\n AT();\n MDAYs();\n F();\n break;\n case 'january':\n case 'february':\n case 'march':\n case 'april':\n case 'may':\n case 'june':\n case 'july':\n case 'august':\n case 'september':\n case 'october':\n case 'november':\n case 'december':\n options.freq = RRule.YEARLY;\n options.bymonth = [decodeM()];\n if (!ttr.nextSymbol())\n return;\n // TODO check for duplicates\n while (ttr.accept('comma')) {\n if (ttr.isDone())\n throw new Error('Unexpected end');\n var m = decodeM();\n if (!m) {\n throw new Error('Unexpected symbol ' + ttr.symbol + ', expected month');\n }\n options.bymonth.push(m);\n ttr.nextSymbol();\n }\n ON();\n F();\n break;\n default:\n throw new Error('Unknown symbol');\n }\n }\n function ON() {\n var on = ttr.accept('on');\n var the = ttr.accept('the');\n if (!(on || the))\n return;\n do {\n var nth = decodeNTH();\n var wkd = decodeWKD();\n var m = decodeM();\n // nth | \n if (nth) {\n // ttr.nextSymbol()\n if (wkd) {\n ttr.nextSymbol();\n if (!options.byweekday)\n options.byweekday = [];\n options.byweekday.push(RRule[wkd].nth(nth));\n }\n else {\n if (!options.bymonthday)\n options.bymonthday = [];\n options.bymonthday.push(nth);\n ttr.accept('day(s)');\n }\n // \n }\n else if (wkd) {\n ttr.nextSymbol();\n if (!options.byweekday)\n options.byweekday = [];\n options.byweekday.push(RRule[wkd]);\n }\n else if (ttr.symbol === 'weekday(s)') {\n ttr.nextSymbol();\n if (!options.byweekday) {\n options.byweekday = [RRule.MO, RRule.TU, RRule.WE, RRule.TH, RRule.FR];\n }\n }\n else if (ttr.symbol === 'week(s)') {\n ttr.nextSymbol();\n var n = ttr.acceptNumber();\n if (!n) {\n throw new Error('Unexpected symbol ' + ttr.symbol + ', expected week number');\n }\n options.byweekno = [parseInt(n[0], 10)];\n while (ttr.accept('comma')) {\n n = ttr.acceptNumber();\n if (!n) {\n throw new Error('Unexpected symbol ' + ttr.symbol + '; expected monthday');\n }\n options.byweekno.push(parseInt(n[0], 10));\n }\n }\n else if (m) {\n ttr.nextSymbol();\n if (!options.bymonth)\n options.bymonth = [];\n options.bymonth.push(m);\n }\n else {\n return;\n }\n } while (ttr.accept('comma') || ttr.accept('the') || ttr.accept('on'));\n }\n function AT() {\n var at = ttr.accept('at');\n if (!at)\n return;\n do {\n var n = ttr.acceptNumber();\n if (!n) {\n throw new Error('Unexpected symbol ' + ttr.symbol + ', expected hour');\n }\n options.byhour = [parseInt(n[0], 10)];\n while (ttr.accept('comma')) {\n n = ttr.acceptNumber();\n if (!n) {\n throw new Error('Unexpected symbol ' + ttr.symbol + '; expected hour');\n }\n options.byhour.push(parseInt(n[0], 10));\n }\n } while (ttr.accept('comma') || ttr.accept('at'));\n }\n function decodeM() {\n switch (ttr.symbol) {\n case 'january':\n return 1;\n case 'february':\n return 2;\n case 'march':\n return 3;\n case 'april':\n return 4;\n case 'may':\n return 5;\n case 'june':\n return 6;\n case 'july':\n return 7;\n case 'august':\n return 8;\n case 'september':\n return 9;\n case 'october':\n return 10;\n case 'november':\n return 11;\n case 'december':\n return 12;\n default:\n return false;\n }\n }\n function decodeWKD() {\n switch (ttr.symbol) {\n case 'monday':\n case 'tuesday':\n case 'wednesday':\n case 'thursday':\n case 'friday':\n case 'saturday':\n case 'sunday':\n return ttr.symbol.substr(0, 2).toUpperCase();\n default:\n return false;\n }\n }\n function decodeNTH() {\n switch (ttr.symbol) {\n case 'last':\n ttr.nextSymbol();\n return -1;\n case 'first':\n ttr.nextSymbol();\n return 1;\n case 'second':\n ttr.nextSymbol();\n return ttr.accept('last') ? -2 : 2;\n case 'third':\n ttr.nextSymbol();\n return ttr.accept('last') ? -3 : 3;\n case 'nth':\n var v = parseInt(ttr.value[1], 10);\n if (v < -366 || v > 366)\n throw new Error('Nth out of range: ' + v);\n ttr.nextSymbol();\n return ttr.accept('last') ? -v : v;\n default:\n return false;\n }\n }\n function MDAYs() {\n ttr.accept('on');\n ttr.accept('the');\n var nth = decodeNTH();\n if (!nth)\n return;\n options.bymonthday = [nth];\n ttr.nextSymbol();\n while (ttr.accept('comma')) {\n nth = decodeNTH();\n if (!nth) {\n throw new Error('Unexpected symbol ' + ttr.symbol + '; expected monthday');\n }\n options.bymonthday.push(nth);\n ttr.nextSymbol();\n }\n }\n function F() {\n if (ttr.symbol === 'until') {\n var date = Date.parse(ttr.text);\n if (!date)\n throw new Error('Cannot parse until date:' + ttr.text);\n options.until = new Date(date);\n }\n else if (ttr.accept('for')) {\n options.count = parseInt(ttr.value[0], 10);\n ttr.expect('number');\n // ttr.expect('times')\n }\n }\n}\n//# sourceMappingURL=parsetext.js.map","import ToText from './totext';\nimport parseText from './parsetext';\nimport { RRule } from '../rrule';\nimport { Frequency } from '../types';\nimport ENGLISH from './i18n';\n/* !\n * rrule.js - Library for working with recurrence rules for calendar dates.\n * https://github.com/jakubroztocil/rrule\n *\n * Copyright 2010, Jakub Roztocil and Lars Schoning\n * Licenced under the BSD licence.\n * https://github.com/jakubroztocil/rrule/blob/master/LICENCE\n *\n */\n/**\n *\n * Implementation of RRule.fromText() and RRule::toText().\n *\n *\n * On the client side, this file needs to be included\n * when those functions are used.\n *\n */\n// =============================================================================\n// fromText\n// =============================================================================\n/**\n * Will be able to convert some of the below described rules from\n * text format to a rule object.\n *\n *\n * RULES\n *\n * Every ([n])\n * day(s)\n * | [weekday], ..., (and) [weekday]\n * | weekday(s)\n * | week(s)\n * | month(s)\n * | [month], ..., (and) [month]\n * | year(s)\n *\n *\n * Plus 0, 1, or multiple of these:\n *\n * on [weekday], ..., (or) [weekday] the [monthday], [monthday], ... (or) [monthday]\n *\n * on [weekday], ..., (and) [weekday]\n *\n * on the [monthday], [monthday], ... (and) [monthday] (day of the month)\n *\n * on the [nth-weekday], ..., (and) [nth-weekday] (of the month/year)\n *\n *\n * Plus 0 or 1 of these:\n *\n * for [n] time(s)\n *\n * until [date]\n *\n * Plus (.)\n *\n *\n * Definitely no supported for parsing:\n *\n * (for year):\n * in week(s) [n], ..., (and) [n]\n *\n * on the [yearday], ..., (and) [n] day of the year\n * on day [yearday], ..., (and) [n]\n *\n *\n * NON-TERMINALS\n *\n * [n]: 1, 2 ..., one, two, three ..\n * [month]: January, February, March, April, May, ... December\n * [weekday]: Monday, ... Sunday\n * [nth-weekday]: first [weekday], 2nd [weekday], ... last [weekday], ...\n * [monthday]: first, 1., 2., 1st, 2nd, second, ... 31st, last day, 2nd last day, ..\n * [date]:\n * - [month] (0-31(,) ([year])),\n * - (the) 0-31.(1-12.([year])),\n * - (the) 0-31/(1-12/([year])),\n * - [weekday]\n *\n * [year]: 0000, 0001, ... 01, 02, ..\n *\n * Definitely not supported for parsing:\n *\n * [yearday]: first, 1., 2., 1st, 2nd, second, ... 366th, last day, 2nd last day, ..\n *\n * @param {String} text\n * @return {Object, Boolean} the rule, or null.\n */\nvar fromText = function (text, language) {\n if (language === void 0) { language = ENGLISH; }\n return new RRule(parseText(text, language) || undefined);\n};\nvar common = [\n 'count',\n 'until',\n 'interval',\n 'byweekday',\n 'bymonthday',\n 'bymonth',\n];\nToText.IMPLEMENTED = [];\nToText.IMPLEMENTED[Frequency.HOURLY] = common;\nToText.IMPLEMENTED[Frequency.MINUTELY] = common;\nToText.IMPLEMENTED[Frequency.DAILY] = ['byhour'].concat(common);\nToText.IMPLEMENTED[Frequency.WEEKLY] = common;\nToText.IMPLEMENTED[Frequency.MONTHLY] = common;\nToText.IMPLEMENTED[Frequency.YEARLY] = ['byweekno', 'byyearday'].concat(common);\n// =============================================================================\n// Export\n// =============================================================================\nvar toText = function (rrule, gettext, language, dateFormatter) {\n return new ToText(rrule, gettext, language, dateFormatter).toString();\n};\nvar isFullyConvertible = ToText.isFullyConvertible;\nexport { fromText, parseText, isFullyConvertible, toText };\n//# sourceMappingURL=index.js.map","import { __extends } from \"tslib\";\nimport { Frequency } from './types';\nimport { pymod, divmod, empty, includes } from './helpers';\nimport { getWeekday, MAXYEAR, monthRange } from './dateutil';\nvar Time = /** @class */ (function () {\n function Time(hour, minute, second, millisecond) {\n this.hour = hour;\n this.minute = minute;\n this.second = second;\n this.millisecond = millisecond || 0;\n }\n Time.prototype.getHours = function () {\n return this.hour;\n };\n Time.prototype.getMinutes = function () {\n return this.minute;\n };\n Time.prototype.getSeconds = function () {\n return this.second;\n };\n Time.prototype.getMilliseconds = function () {\n return this.millisecond;\n };\n Time.prototype.getTime = function () {\n return ((this.hour * 60 * 60 + this.minute * 60 + this.second) * 1000 +\n this.millisecond);\n };\n return Time;\n}());\nexport { Time };\nvar DateTime = /** @class */ (function (_super) {\n __extends(DateTime, _super);\n function DateTime(year, month, day, hour, minute, second, millisecond) {\n var _this = _super.call(this, hour, minute, second, millisecond) || this;\n _this.year = year;\n _this.month = month;\n _this.day = day;\n return _this;\n }\n DateTime.fromDate = function (date) {\n return new this(date.getUTCFullYear(), date.getUTCMonth() + 1, date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), date.valueOf() % 1000);\n };\n DateTime.prototype.getWeekday = function () {\n return getWeekday(new Date(this.getTime()));\n };\n DateTime.prototype.getTime = function () {\n return new Date(Date.UTC(this.year, this.month - 1, this.day, this.hour, this.minute, this.second, this.millisecond)).getTime();\n };\n DateTime.prototype.getDay = function () {\n return this.day;\n };\n DateTime.prototype.getMonth = function () {\n return this.month;\n };\n DateTime.prototype.getYear = function () {\n return this.year;\n };\n DateTime.prototype.addYears = function (years) {\n this.year += years;\n };\n DateTime.prototype.addMonths = function (months) {\n this.month += months;\n if (this.month > 12) {\n var yearDiv = Math.floor(this.month / 12);\n var monthMod = pymod(this.month, 12);\n this.month = monthMod;\n this.year += yearDiv;\n if (this.month === 0) {\n this.month = 12;\n --this.year;\n }\n }\n };\n DateTime.prototype.addWeekly = function (days, wkst) {\n if (wkst > this.getWeekday()) {\n this.day += -(this.getWeekday() + 1 + (6 - wkst)) + days * 7;\n }\n else {\n this.day += -(this.getWeekday() - wkst) + days * 7;\n }\n this.fixDay();\n };\n DateTime.prototype.addDaily = function (days) {\n this.day += days;\n this.fixDay();\n };\n DateTime.prototype.addHours = function (hours, filtered, byhour) {\n if (filtered) {\n // Jump to one iteration before next day\n this.hour += Math.floor((23 - this.hour) / hours) * hours;\n }\n for (;;) {\n this.hour += hours;\n var _a = divmod(this.hour, 24), dayDiv = _a.div, hourMod = _a.mod;\n if (dayDiv) {\n this.hour = hourMod;\n this.addDaily(dayDiv);\n }\n if (empty(byhour) || includes(byhour, this.hour))\n break;\n }\n };\n DateTime.prototype.addMinutes = function (minutes, filtered, byhour, byminute) {\n if (filtered) {\n // Jump to one iteration before next day\n this.minute +=\n Math.floor((1439 - (this.hour * 60 + this.minute)) / minutes) * minutes;\n }\n for (;;) {\n this.minute += minutes;\n var _a = divmod(this.minute, 60), hourDiv = _a.div, minuteMod = _a.mod;\n if (hourDiv) {\n this.minute = minuteMod;\n this.addHours(hourDiv, false, byhour);\n }\n if ((empty(byhour) || includes(byhour, this.hour)) &&\n (empty(byminute) || includes(byminute, this.minute))) {\n break;\n }\n }\n };\n DateTime.prototype.addSeconds = function (seconds, filtered, byhour, byminute, bysecond) {\n if (filtered) {\n // Jump to one iteration before next day\n this.second +=\n Math.floor((86399 - (this.hour * 3600 + this.minute * 60 + this.second)) /\n seconds) * seconds;\n }\n for (;;) {\n this.second += seconds;\n var _a = divmod(this.second, 60), minuteDiv = _a.div, secondMod = _a.mod;\n if (minuteDiv) {\n this.second = secondMod;\n this.addMinutes(minuteDiv, false, byhour, byminute);\n }\n if ((empty(byhour) || includes(byhour, this.hour)) &&\n (empty(byminute) || includes(byminute, this.minute)) &&\n (empty(bysecond) || includes(bysecond, this.second))) {\n break;\n }\n }\n };\n DateTime.prototype.fixDay = function () {\n if (this.day <= 28) {\n return;\n }\n var daysinmonth = monthRange(this.year, this.month - 1)[1];\n if (this.day <= daysinmonth) {\n return;\n }\n while (this.day > daysinmonth) {\n this.day -= daysinmonth;\n ++this.month;\n if (this.month === 13) {\n this.month = 1;\n ++this.year;\n if (this.year > MAXYEAR) {\n return;\n }\n }\n daysinmonth = monthRange(this.year, this.month - 1)[1];\n }\n };\n DateTime.prototype.add = function (options, filtered) {\n var freq = options.freq, interval = options.interval, wkst = options.wkst, byhour = options.byhour, byminute = options.byminute, bysecond = options.bysecond;\n switch (freq) {\n case Frequency.YEARLY:\n return this.addYears(interval);\n case Frequency.MONTHLY:\n return this.addMonths(interval);\n case Frequency.WEEKLY:\n return this.addWeekly(interval, wkst);\n case Frequency.DAILY:\n return this.addDaily(interval);\n case Frequency.HOURLY:\n return this.addHours(interval, filtered, byhour);\n case Frequency.MINUTELY:\n return this.addMinutes(interval, filtered, byhour, byminute);\n case Frequency.SECONDLY:\n return this.addSeconds(interval, filtered, byhour, byminute, bysecond);\n }\n };\n return DateTime;\n}(Time));\nexport { DateTime };\n//# sourceMappingURL=datetime.js.map","import { __assign } from \"tslib\";\nimport { freqIsDailyOrGreater } from './types';\nimport { includes, notEmpty, isPresent, isNumber, isArray, isWeekdayStr, } from './helpers';\nimport { RRule, defaultKeys, DEFAULT_OPTIONS } from './rrule';\nimport { getWeekday, isDate, isValidDate } from './dateutil';\nimport { Weekday } from './weekday';\nimport { Time } from './datetime';\nexport function initializeOptions(options) {\n var invalid = [];\n var keys = Object.keys(options);\n // Shallow copy for options and origOptions and check for invalid\n for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {\n var key = keys_1[_i];\n if (!includes(defaultKeys, key))\n invalid.push(key);\n if (isDate(options[key]) && !isValidDate(options[key])) {\n invalid.push(key);\n }\n }\n if (invalid.length) {\n throw new Error('Invalid options: ' + invalid.join(', '));\n }\n return __assign({}, options);\n}\nexport function parseOptions(options) {\n var opts = __assign(__assign({}, DEFAULT_OPTIONS), initializeOptions(options));\n if (isPresent(opts.byeaster))\n opts.freq = RRule.YEARLY;\n if (!(isPresent(opts.freq) && RRule.FREQUENCIES[opts.freq])) {\n throw new Error(\"Invalid frequency: \".concat(opts.freq, \" \").concat(options.freq));\n }\n if (!opts.dtstart)\n opts.dtstart = new Date(new Date().setMilliseconds(0));\n if (!isPresent(opts.wkst)) {\n opts.wkst = RRule.MO.weekday;\n }\n else if (isNumber(opts.wkst)) {\n // cool, just keep it like that\n }\n else {\n opts.wkst = opts.wkst.weekday;\n }\n if (isPresent(opts.bysetpos)) {\n if (isNumber(opts.bysetpos))\n opts.bysetpos = [opts.bysetpos];\n for (var i = 0; i < opts.bysetpos.length; i++) {\n var v = opts.bysetpos[i];\n if (v === 0 || !(v >= -366 && v <= 366)) {\n throw new Error('bysetpos must be between 1 and 366,' + ' or between -366 and -1');\n }\n }\n }\n if (!(Boolean(opts.byweekno) ||\n notEmpty(opts.byweekno) ||\n notEmpty(opts.byyearday) ||\n Boolean(opts.bymonthday) ||\n notEmpty(opts.bymonthday) ||\n isPresent(opts.byweekday) ||\n isPresent(opts.byeaster))) {\n switch (opts.freq) {\n case RRule.YEARLY:\n if (!opts.bymonth)\n opts.bymonth = opts.dtstart.getUTCMonth() + 1;\n opts.bymonthday = opts.dtstart.getUTCDate();\n break;\n case RRule.MONTHLY:\n opts.bymonthday = opts.dtstart.getUTCDate();\n break;\n case RRule.WEEKLY:\n opts.byweekday = [getWeekday(opts.dtstart)];\n break;\n }\n }\n // bymonth\n if (isPresent(opts.bymonth) && !isArray(opts.bymonth)) {\n opts.bymonth = [opts.bymonth];\n }\n // byyearday\n if (isPresent(opts.byyearday) &&\n !isArray(opts.byyearday) &&\n isNumber(opts.byyearday)) {\n opts.byyearday = [opts.byyearday];\n }\n // bymonthday\n if (!isPresent(opts.bymonthday)) {\n opts.bymonthday = [];\n opts.bynmonthday = [];\n }\n else if (isArray(opts.bymonthday)) {\n var bymonthday = [];\n var bynmonthday = [];\n for (var i = 0; i < opts.bymonthday.length; i++) {\n var v = opts.bymonthday[i];\n if (v > 0) {\n bymonthday.push(v);\n }\n else if (v < 0) {\n bynmonthday.push(v);\n }\n }\n opts.bymonthday = bymonthday;\n opts.bynmonthday = bynmonthday;\n }\n else if (opts.bymonthday < 0) {\n opts.bynmonthday = [opts.bymonthday];\n opts.bymonthday = [];\n }\n else {\n opts.bynmonthday = [];\n opts.bymonthday = [opts.bymonthday];\n }\n // byweekno\n if (isPresent(opts.byweekno) && !isArray(opts.byweekno)) {\n opts.byweekno = [opts.byweekno];\n }\n // byweekday / bynweekday\n if (!isPresent(opts.byweekday)) {\n opts.bynweekday = null;\n }\n else if (isNumber(opts.byweekday)) {\n opts.byweekday = [opts.byweekday];\n opts.bynweekday = null;\n }\n else if (isWeekdayStr(opts.byweekday)) {\n opts.byweekday = [Weekday.fromStr(opts.byweekday).weekday];\n opts.bynweekday = null;\n }\n else if (opts.byweekday instanceof Weekday) {\n if (!opts.byweekday.n || opts.freq > RRule.MONTHLY) {\n opts.byweekday = [opts.byweekday.weekday];\n opts.bynweekday = null;\n }\n else {\n opts.bynweekday = [[opts.byweekday.weekday, opts.byweekday.n]];\n opts.byweekday = null;\n }\n }\n else {\n var byweekday = [];\n var bynweekday = [];\n for (var i = 0; i < opts.byweekday.length; i++) {\n var wday = opts.byweekday[i];\n if (isNumber(wday)) {\n byweekday.push(wday);\n continue;\n }\n else if (isWeekdayStr(wday)) {\n byweekday.push(Weekday.fromStr(wday).weekday);\n continue;\n }\n if (!wday.n || opts.freq > RRule.MONTHLY) {\n byweekday.push(wday.weekday);\n }\n else {\n bynweekday.push([wday.weekday, wday.n]);\n }\n }\n opts.byweekday = notEmpty(byweekday) ? byweekday : null;\n opts.bynweekday = notEmpty(bynweekday) ? bynweekday : null;\n }\n // byhour\n if (!isPresent(opts.byhour)) {\n opts.byhour = opts.freq < RRule.HOURLY ? [opts.dtstart.getUTCHours()] : null;\n }\n else if (isNumber(opts.byhour)) {\n opts.byhour = [opts.byhour];\n }\n // byminute\n if (!isPresent(opts.byminute)) {\n opts.byminute =\n opts.freq < RRule.MINUTELY ? [opts.dtstart.getUTCMinutes()] : null;\n }\n else if (isNumber(opts.byminute)) {\n opts.byminute = [opts.byminute];\n }\n // bysecond\n if (!isPresent(opts.bysecond)) {\n opts.bysecond =\n opts.freq < RRule.SECONDLY ? [opts.dtstart.getUTCSeconds()] : null;\n }\n else if (isNumber(opts.bysecond)) {\n opts.bysecond = [opts.bysecond];\n }\n return { parsedOptions: opts };\n}\nexport function buildTimeset(opts) {\n var millisecondModulo = opts.dtstart.getTime() % 1000;\n if (!freqIsDailyOrGreater(opts.freq)) {\n return [];\n }\n var timeset = [];\n opts.byhour.forEach(function (hour) {\n opts.byminute.forEach(function (minute) {\n opts.bysecond.forEach(function (second) {\n timeset.push(new Time(hour, minute, second, millisecondModulo));\n });\n });\n });\n return timeset;\n}\n//# sourceMappingURL=parseoptions.js.map","import { __assign } from \"tslib\";\nimport { Frequency } from './types';\nimport { Weekday } from './weekday';\nimport { untilStringToDate } from './dateutil';\nimport { Days } from './rrule';\nexport function parseString(rfcString) {\n var options = rfcString\n .split('\\n')\n .map(parseLine)\n .filter(function (x) { return x !== null; });\n return __assign(__assign({}, options[0]), options[1]);\n}\nexport function parseDtstart(line) {\n var options = {};\n var dtstartWithZone = /DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\\s]+)/i.exec(line);\n if (!dtstartWithZone) {\n return options;\n }\n var tzid = dtstartWithZone[1], dtstart = dtstartWithZone[2];\n if (tzid) {\n options.tzid = tzid;\n }\n options.dtstart = untilStringToDate(dtstart);\n return options;\n}\nfunction parseLine(rfcString) {\n rfcString = rfcString.replace(/^\\s+|\\s+$/, '');\n if (!rfcString.length)\n return null;\n var header = /^([A-Z]+?)[:;]/.exec(rfcString.toUpperCase());\n if (!header) {\n return parseRrule(rfcString);\n }\n var key = header[1];\n switch (key.toUpperCase()) {\n case 'RRULE':\n case 'EXRULE':\n return parseRrule(rfcString);\n case 'DTSTART':\n return parseDtstart(rfcString);\n default:\n throw new Error(\"Unsupported RFC prop \".concat(key, \" in \").concat(rfcString));\n }\n}\nfunction parseRrule(line) {\n var strippedLine = line.replace(/^RRULE:/i, '');\n var options = parseDtstart(strippedLine);\n var attrs = line.replace(/^(?:RRULE|EXRULE):/i, '').split(';');\n attrs.forEach(function (attr) {\n var _a = attr.split('='), key = _a[0], value = _a[1];\n switch (key.toUpperCase()) {\n case 'FREQ':\n options.freq = Frequency[value.toUpperCase()];\n break;\n case 'WKST':\n options.wkst = Days[value.toUpperCase()];\n break;\n case 'COUNT':\n case 'INTERVAL':\n case 'BYSETPOS':\n case 'BYMONTH':\n case 'BYMONTHDAY':\n case 'BYYEARDAY':\n case 'BYWEEKNO':\n case 'BYHOUR':\n case 'BYMINUTE':\n case 'BYSECOND':\n var num = parseNumber(value);\n var optionKey = key.toLowerCase();\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n options[optionKey] = num;\n break;\n case 'BYWEEKDAY':\n case 'BYDAY':\n options.byweekday = parseWeekday(value);\n break;\n case 'DTSTART':\n case 'TZID':\n // for backwards compatibility\n var dtstart = parseDtstart(line);\n options.tzid = dtstart.tzid;\n options.dtstart = dtstart.dtstart;\n break;\n case 'UNTIL':\n options.until = untilStringToDate(value);\n break;\n case 'BYEASTER':\n options.byeaster = Number(value);\n break;\n default:\n throw new Error(\"Unknown RRULE property '\" + key + \"'\");\n }\n });\n return options;\n}\nfunction parseNumber(value) {\n if (value.indexOf(',') !== -1) {\n var values = value.split(',');\n return values.map(parseIndividualNumber);\n }\n return parseIndividualNumber(value);\n}\nfunction parseIndividualNumber(value) {\n if (/^[+-]?\\d+$/.test(value)) {\n return Number(value);\n }\n return value;\n}\nfunction parseWeekday(value) {\n var days = value.split(',');\n return days.map(function (day) {\n if (day.length === 2) {\n // MO, TU, ...\n return Days[day]; // wday instanceof Weekday\n }\n // -1MO, +3FR, 1SO, 13TU ...\n var parts = day.match(/^([+-]?\\d{1,2})([A-Z]{2})$/);\n if (!parts || parts.length < 3) {\n throw new SyntaxError(\"Invalid weekday string: \".concat(day));\n }\n var n = Number(parts[1]);\n var wdaypart = parts[2];\n var wday = Days[wdaypart].weekday;\n return new Weekday(wday, n);\n });\n}\n//# sourceMappingURL=parsestring.js.map","import { dateInTimeZone, timeToUntilString } from './dateutil';\nvar DateWithZone = /** @class */ (function () {\n function DateWithZone(date, tzid) {\n if (isNaN(date.getTime())) {\n throw new RangeError('Invalid date passed to DateWithZone');\n }\n this.date = date;\n this.tzid = tzid;\n }\n Object.defineProperty(DateWithZone.prototype, \"isUTC\", {\n get: function () {\n return !this.tzid || this.tzid.toUpperCase() === 'UTC';\n },\n enumerable: false,\n configurable: true\n });\n DateWithZone.prototype.toString = function () {\n var datestr = timeToUntilString(this.date.getTime(), this.isUTC);\n if (!this.isUTC) {\n return \";TZID=\".concat(this.tzid, \":\").concat(datestr);\n }\n return \":\".concat(datestr);\n };\n DateWithZone.prototype.getTime = function () {\n return this.date.getTime();\n };\n DateWithZone.prototype.rezonedDate = function () {\n if (this.isUTC) {\n return this.date;\n }\n return dateInTimeZone(this.date, this.tzid);\n };\n return DateWithZone;\n}());\nexport { DateWithZone };\n//# sourceMappingURL=datewithzone.js.map","import { RRule, DEFAULT_OPTIONS } from './rrule';\nimport { includes, isPresent, isArray, isNumber, toArray } from './helpers';\nimport { Weekday } from './weekday';\nimport { timeToUntilString } from './dateutil';\nimport { DateWithZone } from './datewithzone';\nexport function optionsToString(options) {\n var rrule = [];\n var dtstart = '';\n var keys = Object.keys(options);\n var defaultKeys = Object.keys(DEFAULT_OPTIONS);\n for (var i = 0; i < keys.length; i++) {\n if (keys[i] === 'tzid')\n continue;\n if (!includes(defaultKeys, keys[i]))\n continue;\n var key = keys[i].toUpperCase();\n var value = options[keys[i]];\n var outValue = '';\n if (!isPresent(value) || (isArray(value) && !value.length))\n continue;\n switch (key) {\n case 'FREQ':\n outValue = RRule.FREQUENCIES[options.freq];\n break;\n case 'WKST':\n if (isNumber(value)) {\n outValue = new Weekday(value).toString();\n }\n else {\n outValue = value.toString();\n }\n break;\n case 'BYWEEKDAY':\n /*\n NOTE: BYWEEKDAY is a special case.\n RRule() deconstructs the rule.options.byweekday array\n into an array of Weekday arguments.\n On the other hand, rule.origOptions is an array of Weekdays.\n We need to handle both cases here.\n It might be worth change RRule to keep the Weekdays.\n \n Also, BYWEEKDAY (used by RRule) vs. BYDAY (RFC)\n \n */\n key = 'BYDAY';\n outValue = toArray(value)\n .map(function (wday) {\n if (wday instanceof Weekday) {\n return wday;\n }\n if (isArray(wday)) {\n return new Weekday(wday[0], wday[1]);\n }\n return new Weekday(wday);\n })\n .toString();\n break;\n case 'DTSTART':\n dtstart = buildDtstart(value, options.tzid);\n break;\n case 'UNTIL':\n outValue = timeToUntilString(value, !options.tzid);\n break;\n default:\n if (isArray(value)) {\n var strValues = [];\n for (var j = 0; j < value.length; j++) {\n strValues[j] = String(value[j]);\n }\n outValue = strValues.toString();\n }\n else {\n outValue = String(value);\n }\n }\n if (outValue) {\n rrule.push([key, outValue]);\n }\n }\n var rules = rrule\n .map(function (_a) {\n var key = _a[0], value = _a[1];\n return \"\".concat(key, \"=\").concat(value.toString());\n })\n .join(';');\n var ruleString = '';\n if (rules !== '') {\n ruleString = \"RRULE:\".concat(rules);\n }\n return [dtstart, ruleString].filter(function (x) { return !!x; }).join('\\n');\n}\nfunction buildDtstart(dtstart, tzid) {\n if (!dtstart) {\n return '';\n }\n return 'DTSTART' + new DateWithZone(new Date(dtstart), tzid).toString();\n}\n//# sourceMappingURL=optionstostring.js.map","import IterResult from './iterresult';\nimport { clone, cloneDates } from './dateutil';\nimport { isArray } from './helpers';\nfunction argsMatch(left, right) {\n if (Array.isArray(left)) {\n if (!Array.isArray(right))\n return false;\n if (left.length !== right.length)\n return false;\n return left.every(function (date, i) { return date.getTime() === right[i].getTime(); });\n }\n if (left instanceof Date) {\n return right instanceof Date && left.getTime() === right.getTime();\n }\n return left === right;\n}\nvar Cache = /** @class */ (function () {\n function Cache() {\n this.all = false;\n this.before = [];\n this.after = [];\n this.between = [];\n }\n /**\n * @param {String} what - all/before/after/between\n * @param {Array,Date} value - an array of dates, one date, or null\n * @param {Object?} args - _iter arguments\n */\n Cache.prototype._cacheAdd = function (what, value, args) {\n if (value) {\n value = value instanceof Date ? clone(value) : cloneDates(value);\n }\n if (what === 'all') {\n this.all = value;\n }\n else {\n args._value = value;\n this[what].push(args);\n }\n };\n /**\n * @return false - not in the cache\n * @return null - cached, but zero occurrences (before/after)\n * @return Date - cached (before/after)\n * @return [] - cached, but zero occurrences (all/between)\n * @return [Date1, DateN] - cached (all/between)\n */\n Cache.prototype._cacheGet = function (what, args) {\n var cached = false;\n var argsKeys = args ? Object.keys(args) : [];\n var findCacheDiff = function (item) {\n for (var i = 0; i < argsKeys.length; i++) {\n var key = argsKeys[i];\n if (!argsMatch(args[key], item[key])) {\n return true;\n }\n }\n return false;\n };\n var cachedObject = this[what];\n if (what === 'all') {\n cached = this.all;\n }\n else if (isArray(cachedObject)) {\n // Let's see whether we've already called the\n // 'what' method with the same 'args'\n for (var i = 0; i < cachedObject.length; i++) {\n var item = cachedObject[i];\n if (argsKeys.length && findCacheDiff(item))\n continue;\n cached = item._value;\n break;\n }\n }\n if (!cached && this.all) {\n // Not in the cache, but we already know all the occurrences,\n // so we can find the correct dates from the cached ones.\n var iterResult = new IterResult(what, args);\n for (var i = 0; i < this.all.length; i++) {\n if (!iterResult.accept(this.all[i]))\n break;\n }\n cached = iterResult.getValue();\n this._cacheAdd(what, cached, args);\n }\n return isArray(cached)\n ? cloneDates(cached)\n : cached instanceof Date\n ? clone(cached)\n : cached;\n };\n return Cache;\n}());\nexport { Cache };\n//# sourceMappingURL=cache.js.map","import { __spreadArray } from \"tslib\";\nimport { range, repeat } from './helpers';\n// =============================================================================\n// Date masks\n// =============================================================================\n// Every mask is 7 days longer to handle cross-year weekly periods.\nvar M365MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], repeat(1, 31), true), repeat(2, 28), true), repeat(3, 31), true), repeat(4, 30), true), repeat(5, 31), true), repeat(6, 30), true), repeat(7, 31), true), repeat(8, 31), true), repeat(9, 30), true), repeat(10, 31), true), repeat(11, 30), true), repeat(12, 31), true), repeat(1, 7), true);\nvar M366MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], repeat(1, 31), true), repeat(2, 29), true), repeat(3, 31), true), repeat(4, 30), true), repeat(5, 31), true), repeat(6, 30), true), repeat(7, 31), true), repeat(8, 31), true), repeat(9, 30), true), repeat(10, 31), true), repeat(11, 30), true), repeat(12, 31), true), repeat(1, 7), true);\nvar M28 = range(1, 29);\nvar M29 = range(1, 30);\nvar M30 = range(1, 31);\nvar M31 = range(1, 32);\nvar MDAY366MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], M31, true), M29, true), M31, true), M30, true), M31, true), M30, true), M31, true), M31, true), M30, true), M31, true), M30, true), M31, true), M31.slice(0, 7), true);\nvar MDAY365MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], M31, true), M28, true), M31, true), M30, true), M31, true), M30, true), M31, true), M31, true), M30, true), M31, true), M30, true), M31, true), M31.slice(0, 7), true);\nvar NM28 = range(-28, 0);\nvar NM29 = range(-29, 0);\nvar NM30 = range(-30, 0);\nvar NM31 = range(-31, 0);\nvar NMDAY366MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], NM31, true), NM29, true), NM31, true), NM30, true), NM31, true), NM30, true), NM31, true), NM31, true), NM30, true), NM31, true), NM30, true), NM31, true), NM31.slice(0, 7), true);\nvar NMDAY365MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], NM31, true), NM28, true), NM31, true), NM30, true), NM31, true), NM30, true), NM31, true), NM31, true), NM30, true), NM31, true), NM30, true), NM31, true), NM31.slice(0, 7), true);\nvar M366RANGE = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366];\nvar M365RANGE = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365];\nvar WDAYMASK = (function () {\n var wdaymask = [];\n for (var i = 0; i < 55; i++)\n wdaymask = wdaymask.concat(range(7));\n return wdaymask;\n})();\nexport { WDAYMASK, M365MASK, M365RANGE, M366MASK, M366RANGE, MDAY365MASK, MDAY366MASK, NMDAY365MASK, NMDAY366MASK, };\n//# sourceMappingURL=masks.js.map","import { __assign } from \"tslib\";\nimport { datetime, getWeekday, isLeapYear, toOrdinal } from '../dateutil';\nimport { empty, repeat, pymod, includes } from '../helpers';\nimport { M365MASK, MDAY365MASK, NMDAY365MASK, WDAYMASK, M365RANGE, M366MASK, MDAY366MASK, NMDAY366MASK, M366RANGE, } from '../masks';\nexport function rebuildYear(year, options) {\n var firstyday = datetime(year, 1, 1);\n var yearlen = isLeapYear(year) ? 366 : 365;\n var nextyearlen = isLeapYear(year + 1) ? 366 : 365;\n var yearordinal = toOrdinal(firstyday);\n var yearweekday = getWeekday(firstyday);\n var result = __assign(__assign({ yearlen: yearlen, nextyearlen: nextyearlen, yearordinal: yearordinal, yearweekday: yearweekday }, baseYearMasks(year)), { wnomask: null });\n if (empty(options.byweekno)) {\n return result;\n }\n result.wnomask = repeat(0, yearlen + 7);\n var firstwkst;\n var wyearlen;\n var no1wkst = (firstwkst = pymod(7 - yearweekday + options.wkst, 7));\n if (no1wkst >= 4) {\n no1wkst = 0;\n // Number of days in the year, plus the days we got\n // from last year.\n wyearlen = result.yearlen + pymod(yearweekday - options.wkst, 7);\n }\n else {\n // Number of days in the year, minus the days we\n // left in last year.\n wyearlen = yearlen - no1wkst;\n }\n var div = Math.floor(wyearlen / 7);\n var mod = pymod(wyearlen, 7);\n var numweeks = Math.floor(div + mod / 4);\n for (var j = 0; j < options.byweekno.length; j++) {\n var n = options.byweekno[j];\n if (n < 0) {\n n += numweeks + 1;\n }\n if (!(n > 0 && n <= numweeks)) {\n continue;\n }\n var i = void 0;\n if (n > 1) {\n i = no1wkst + (n - 1) * 7;\n if (no1wkst !== firstwkst) {\n i -= 7 - firstwkst;\n }\n }\n else {\n i = no1wkst;\n }\n for (var k = 0; k < 7; k++) {\n result.wnomask[i] = 1;\n i++;\n if (result.wdaymask[i] === options.wkst)\n break;\n }\n }\n if (includes(options.byweekno, 1)) {\n // Check week number 1 of next year as well\n // orig-TODO : Check -numweeks for next year.\n var i = no1wkst + numweeks * 7;\n if (no1wkst !== firstwkst)\n i -= 7 - firstwkst;\n if (i < yearlen) {\n // If week starts in next year, we\n // don't care about it.\n for (var j = 0; j < 7; j++) {\n result.wnomask[i] = 1;\n i += 1;\n if (result.wdaymask[i] === options.wkst)\n break;\n }\n }\n }\n if (no1wkst) {\n // Check last week number of last year as\n // well. If no1wkst is 0, either the year\n // started on week start, or week number 1\n // got days from last year, so there are no\n // days from last year's last week number in\n // this year.\n var lnumweeks = void 0;\n if (!includes(options.byweekno, -1)) {\n var lyearweekday = getWeekday(datetime(year - 1, 1, 1));\n var lno1wkst = pymod(7 - lyearweekday.valueOf() + options.wkst, 7);\n var lyearlen = isLeapYear(year - 1) ? 366 : 365;\n var weekst = void 0;\n if (lno1wkst >= 4) {\n lno1wkst = 0;\n weekst = lyearlen + pymod(lyearweekday - options.wkst, 7);\n }\n else {\n weekst = yearlen - no1wkst;\n }\n lnumweeks = Math.floor(52 + pymod(weekst, 7) / 4);\n }\n else {\n lnumweeks = -1;\n }\n if (includes(options.byweekno, lnumweeks)) {\n for (var i = 0; i < no1wkst; i++)\n result.wnomask[i] = 1;\n }\n }\n return result;\n}\nfunction baseYearMasks(year) {\n var yearlen = isLeapYear(year) ? 366 : 365;\n var firstyday = datetime(year, 1, 1);\n var wday = getWeekday(firstyday);\n if (yearlen === 365) {\n return {\n mmask: M365MASK,\n mdaymask: MDAY365MASK,\n nmdaymask: NMDAY365MASK,\n wdaymask: WDAYMASK.slice(wday),\n mrange: M365RANGE,\n };\n }\n return {\n mmask: M366MASK,\n mdaymask: MDAY366MASK,\n nmdaymask: NMDAY366MASK,\n wdaymask: WDAYMASK.slice(wday),\n mrange: M366RANGE,\n };\n}\n//# sourceMappingURL=yearinfo.js.map","import { notEmpty, repeat, range, isPresent } from '../helpers';\nimport { Frequency } from '../types';\nimport { rebuildYear } from './yearinfo';\nimport { rebuildMonth } from './monthinfo';\nimport { easter } from './easter';\nimport { Time } from '../datetime';\nimport { datetime, sort, toOrdinal } from '../dateutil';\n// =============================================================================\n// Iterinfo\n// =============================================================================\nvar Iterinfo = /** @class */ (function () {\n // eslint-disable-next-line no-empty-function\n function Iterinfo(options) {\n this.options = options;\n }\n Iterinfo.prototype.rebuild = function (year, month) {\n var options = this.options;\n if (year !== this.lastyear) {\n this.yearinfo = rebuildYear(year, options);\n }\n if (notEmpty(options.bynweekday) &&\n (month !== this.lastmonth || year !== this.lastyear)) {\n var _a = this.yearinfo, yearlen = _a.yearlen, mrange = _a.mrange, wdaymask = _a.wdaymask;\n this.monthinfo = rebuildMonth(year, month, yearlen, mrange, wdaymask, options);\n }\n if (isPresent(options.byeaster)) {\n this.eastermask = easter(year, options.byeaster);\n }\n };\n Object.defineProperty(Iterinfo.prototype, \"lastyear\", {\n get: function () {\n return this.monthinfo ? this.monthinfo.lastyear : null;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"lastmonth\", {\n get: function () {\n return this.monthinfo ? this.monthinfo.lastmonth : null;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"yearlen\", {\n get: function () {\n return this.yearinfo.yearlen;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"yearordinal\", {\n get: function () {\n return this.yearinfo.yearordinal;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"mrange\", {\n get: function () {\n return this.yearinfo.mrange;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"wdaymask\", {\n get: function () {\n return this.yearinfo.wdaymask;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"mmask\", {\n get: function () {\n return this.yearinfo.mmask;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"wnomask\", {\n get: function () {\n return this.yearinfo.wnomask;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"nwdaymask\", {\n get: function () {\n return this.monthinfo ? this.monthinfo.nwdaymask : [];\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"nextyearlen\", {\n get: function () {\n return this.yearinfo.nextyearlen;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"mdaymask\", {\n get: function () {\n return this.yearinfo.mdaymask;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"nmdaymask\", {\n get: function () {\n return this.yearinfo.nmdaymask;\n },\n enumerable: false,\n configurable: true\n });\n Iterinfo.prototype.ydayset = function () {\n return [range(this.yearlen), 0, this.yearlen];\n };\n Iterinfo.prototype.mdayset = function (_, month) {\n var start = this.mrange[month - 1];\n var end = this.mrange[month];\n var set = repeat(null, this.yearlen);\n for (var i = start; i < end; i++)\n set[i] = i;\n return [set, start, end];\n };\n Iterinfo.prototype.wdayset = function (year, month, day) {\n // We need to handle cross-year weeks here.\n var set = repeat(null, this.yearlen + 7);\n var i = toOrdinal(datetime(year, month, day)) - this.yearordinal;\n var start = i;\n for (var j = 0; j < 7; j++) {\n set[i] = i;\n ++i;\n if (this.wdaymask[i] === this.options.wkst)\n break;\n }\n return [set, start, i];\n };\n Iterinfo.prototype.ddayset = function (year, month, day) {\n var set = repeat(null, this.yearlen);\n var i = toOrdinal(datetime(year, month, day)) - this.yearordinal;\n set[i] = i;\n return [set, i, i + 1];\n };\n Iterinfo.prototype.htimeset = function (hour, _, second, millisecond) {\n var _this = this;\n var set = [];\n this.options.byminute.forEach(function (minute) {\n set = set.concat(_this.mtimeset(hour, minute, second, millisecond));\n });\n sort(set);\n return set;\n };\n Iterinfo.prototype.mtimeset = function (hour, minute, _, millisecond) {\n var set = this.options.bysecond.map(function (second) { return new Time(hour, minute, second, millisecond); });\n sort(set);\n return set;\n };\n Iterinfo.prototype.stimeset = function (hour, minute, second, millisecond) {\n return [new Time(hour, minute, second, millisecond)];\n };\n Iterinfo.prototype.getdayset = function (freq) {\n switch (freq) {\n case Frequency.YEARLY:\n return this.ydayset.bind(this);\n case Frequency.MONTHLY:\n return this.mdayset.bind(this);\n case Frequency.WEEKLY:\n return this.wdayset.bind(this);\n case Frequency.DAILY:\n return this.ddayset.bind(this);\n default:\n return this.ddayset.bind(this);\n }\n };\n Iterinfo.prototype.gettimeset = function (freq) {\n switch (freq) {\n case Frequency.HOURLY:\n return this.htimeset.bind(this);\n case Frequency.MINUTELY:\n return this.mtimeset.bind(this);\n case Frequency.SECONDLY:\n return this.stimeset.bind(this);\n }\n };\n return Iterinfo;\n}());\nexport default Iterinfo;\n//# sourceMappingURL=index.js.map","import { RRule } from '../rrule';\nimport { empty, repeat, pymod } from '../helpers';\nexport function rebuildMonth(year, month, yearlen, mrange, wdaymask, options) {\n var result = {\n lastyear: year,\n lastmonth: month,\n nwdaymask: [],\n };\n var ranges = [];\n if (options.freq === RRule.YEARLY) {\n if (empty(options.bymonth)) {\n ranges = [[0, yearlen]];\n }\n else {\n for (var j = 0; j < options.bymonth.length; j++) {\n month = options.bymonth[j];\n ranges.push(mrange.slice(month - 1, month + 1));\n }\n }\n }\n else if (options.freq === RRule.MONTHLY) {\n ranges = [mrange.slice(month - 1, month + 1)];\n }\n if (empty(ranges)) {\n return result;\n }\n // Weekly frequency won't get here, so we may not\n // care about cross-year weekly periods.\n result.nwdaymask = repeat(0, yearlen);\n for (var j = 0; j < ranges.length; j++) {\n var rang = ranges[j];\n var first = rang[0];\n var last = rang[1] - 1;\n for (var k = 0; k < options.bynweekday.length; k++) {\n var i = void 0;\n var _a = options.bynweekday[k], wday = _a[0], n = _a[1];\n if (n < 0) {\n i = last + (n + 1) * 7;\n i -= pymod(wdaymask[i] - wday, 7);\n }\n else {\n i = first + (n - 1) * 7;\n i += pymod(7 - wdaymask[i] + wday, 7);\n }\n if (first <= i && i <= last)\n result.nwdaymask[i] = 1;\n }\n }\n return result;\n}\n//# sourceMappingURL=monthinfo.js.map","export function easter(y, offset) {\n if (offset === void 0) { offset = 0; }\n var a = y % 19;\n var b = Math.floor(y / 100);\n var c = y % 100;\n var d = Math.floor(b / 4);\n var e = b % 4;\n var f = Math.floor((b + 8) / 25);\n var g = Math.floor((b - f + 1) / 3);\n var h = Math.floor(19 * a + b - d - g + 15) % 30;\n var i = Math.floor(c / 4);\n var k = c % 4;\n var l = Math.floor(32 + 2 * e + 2 * i - h - k) % 7;\n var m = Math.floor((a + 11 * h + 22 * l) / 451);\n var month = Math.floor((h + l - 7 * m + 114) / 31);\n var day = ((h + l - 7 * m + 114) % 31) + 1;\n var date = Date.UTC(y, month - 1, day + offset);\n var yearStart = Date.UTC(y, 0, 1);\n return [Math.ceil((date - yearStart) / (1000 * 60 * 60 * 24))];\n}\n//# sourceMappingURL=easter.js.map","import { combine, fromOrdinal, sort } from '../dateutil';\nimport { pymod, isPresent, includes } from '../helpers';\nexport function buildPoslist(bysetpos, timeset, start, end, ii, dayset) {\n var poslist = [];\n for (var j = 0; j < bysetpos.length; j++) {\n var daypos = void 0;\n var timepos = void 0;\n var pos = bysetpos[j];\n if (pos < 0) {\n daypos = Math.floor(pos / timeset.length);\n timepos = pymod(pos, timeset.length);\n }\n else {\n daypos = Math.floor((pos - 1) / timeset.length);\n timepos = pymod(pos - 1, timeset.length);\n }\n var tmp = [];\n for (var k = start; k < end; k++) {\n var val = dayset[k];\n if (!isPresent(val))\n continue;\n tmp.push(val);\n }\n var i = void 0;\n if (daypos < 0) {\n i = tmp.slice(daypos)[0];\n }\n else {\n i = tmp[daypos];\n }\n var time = timeset[timepos];\n var date = fromOrdinal(ii.yearordinal + i);\n var res = combine(date, time);\n // XXX: can this ever be in the array?\n // - compare the actual date instead?\n if (!includes(poslist, res))\n poslist.push(res);\n }\n sort(poslist);\n return poslist;\n}\n//# sourceMappingURL=poslist.js.map","import { freqIsDailyOrGreater } from '../types';\nimport { combine, fromOrdinal, MAXYEAR } from '../dateutil';\nimport Iterinfo from '../iterinfo/index';\nimport { RRule } from '../rrule';\nimport { buildTimeset } from '../parseoptions';\nimport { notEmpty, includes, isPresent } from '../helpers';\nimport { DateWithZone } from '../datewithzone';\nimport { buildPoslist } from './poslist';\nimport { DateTime } from '../datetime';\nexport function iter(iterResult, options) {\n var dtstart = options.dtstart, freq = options.freq, interval = options.interval, until = options.until, bysetpos = options.bysetpos;\n var count = options.count;\n if (count === 0 || interval === 0) {\n return emitResult(iterResult);\n }\n var counterDate = DateTime.fromDate(dtstart);\n var ii = new Iterinfo(options);\n ii.rebuild(counterDate.year, counterDate.month);\n var timeset = makeTimeset(ii, counterDate, options);\n for (;;) {\n var _a = ii.getdayset(freq)(counterDate.year, counterDate.month, counterDate.day), dayset = _a[0], start = _a[1], end = _a[2];\n var filtered = removeFilteredDays(dayset, start, end, ii, options);\n if (notEmpty(bysetpos)) {\n var poslist = buildPoslist(bysetpos, timeset, start, end, ii, dayset);\n for (var j = 0; j < poslist.length; j++) {\n var res = poslist[j];\n if (until && res > until) {\n return emitResult(iterResult);\n }\n if (res >= dtstart) {\n var rezonedDate = rezoneIfNeeded(res, options);\n if (!iterResult.accept(rezonedDate)) {\n return emitResult(iterResult);\n }\n if (count) {\n --count;\n if (!count) {\n return emitResult(iterResult);\n }\n }\n }\n }\n }\n else {\n for (var j = start; j < end; j++) {\n var currentDay = dayset[j];\n if (!isPresent(currentDay)) {\n continue;\n }\n var date = fromOrdinal(ii.yearordinal + currentDay);\n for (var k = 0; k < timeset.length; k++) {\n var time = timeset[k];\n var res = combine(date, time);\n if (until && res > until) {\n return emitResult(iterResult);\n }\n if (res >= dtstart) {\n var rezonedDate = rezoneIfNeeded(res, options);\n if (!iterResult.accept(rezonedDate)) {\n return emitResult(iterResult);\n }\n if (count) {\n --count;\n if (!count) {\n return emitResult(iterResult);\n }\n }\n }\n }\n }\n }\n if (options.interval === 0) {\n return emitResult(iterResult);\n }\n // Handle frequency and interval\n counterDate.add(options, filtered);\n if (counterDate.year > MAXYEAR) {\n return emitResult(iterResult);\n }\n if (!freqIsDailyOrGreater(freq)) {\n timeset = ii.gettimeset(freq)(counterDate.hour, counterDate.minute, counterDate.second, 0);\n }\n ii.rebuild(counterDate.year, counterDate.month);\n }\n}\nfunction isFiltered(ii, currentDay, options) {\n var bymonth = options.bymonth, byweekno = options.byweekno, byweekday = options.byweekday, byeaster = options.byeaster, bymonthday = options.bymonthday, bynmonthday = options.bynmonthday, byyearday = options.byyearday;\n return ((notEmpty(bymonth) && !includes(bymonth, ii.mmask[currentDay])) ||\n (notEmpty(byweekno) && !ii.wnomask[currentDay]) ||\n (notEmpty(byweekday) && !includes(byweekday, ii.wdaymask[currentDay])) ||\n (notEmpty(ii.nwdaymask) && !ii.nwdaymask[currentDay]) ||\n (byeaster !== null && !includes(ii.eastermask, currentDay)) ||\n ((notEmpty(bymonthday) || notEmpty(bynmonthday)) &&\n !includes(bymonthday, ii.mdaymask[currentDay]) &&\n !includes(bynmonthday, ii.nmdaymask[currentDay])) ||\n (notEmpty(byyearday) &&\n ((currentDay < ii.yearlen &&\n !includes(byyearday, currentDay + 1) &&\n !includes(byyearday, -ii.yearlen + currentDay)) ||\n (currentDay >= ii.yearlen &&\n !includes(byyearday, currentDay + 1 - ii.yearlen) &&\n !includes(byyearday, -ii.nextyearlen + currentDay - ii.yearlen)))));\n}\nfunction rezoneIfNeeded(date, options) {\n return new DateWithZone(date, options.tzid).rezonedDate();\n}\nfunction emitResult(iterResult) {\n return iterResult.getValue();\n}\nfunction removeFilteredDays(dayset, start, end, ii, options) {\n var filtered = false;\n for (var dayCounter = start; dayCounter < end; dayCounter++) {\n var currentDay = dayset[dayCounter];\n filtered = isFiltered(ii, currentDay, options);\n if (filtered)\n dayset[currentDay] = null;\n }\n return filtered;\n}\nfunction makeTimeset(ii, counterDate, options) {\n var freq = options.freq, byhour = options.byhour, byminute = options.byminute, bysecond = options.bysecond;\n if (freqIsDailyOrGreater(freq)) {\n return buildTimeset(options);\n }\n if ((freq >= RRule.HOURLY &&\n notEmpty(byhour) &&\n !includes(byhour, counterDate.hour)) ||\n (freq >= RRule.MINUTELY &&\n notEmpty(byminute) &&\n !includes(byminute, counterDate.minute)) ||\n (freq >= RRule.SECONDLY &&\n notEmpty(bysecond) &&\n !includes(bysecond, counterDate.second))) {\n return [];\n }\n return ii.gettimeset(freq)(counterDate.hour, counterDate.minute, counterDate.second, counterDate.millisecond);\n}\n//# sourceMappingURL=index.js.map","import { isValidDate } from './dateutil';\nimport IterResult from './iterresult';\nimport CallbackIterResult from './callbackiterresult';\nimport { fromText, parseText, toText, isFullyConvertible } from './nlp/index';\nimport { Frequency, } from './types';\nimport { parseOptions, initializeOptions } from './parseoptions';\nimport { parseString } from './parsestring';\nimport { optionsToString } from './optionstostring';\nimport { Cache } from './cache';\nimport { Weekday } from './weekday';\nimport { iter } from './iter/index';\n// =============================================================================\n// RRule\n// =============================================================================\nexport var Days = {\n MO: new Weekday(0),\n TU: new Weekday(1),\n WE: new Weekday(2),\n TH: new Weekday(3),\n FR: new Weekday(4),\n SA: new Weekday(5),\n SU: new Weekday(6),\n};\nexport var DEFAULT_OPTIONS = {\n freq: Frequency.YEARLY,\n dtstart: null,\n interval: 1,\n wkst: Days.MO,\n count: null,\n until: null,\n tzid: null,\n bysetpos: null,\n bymonth: null,\n bymonthday: null,\n bynmonthday: null,\n byyearday: null,\n byweekno: null,\n byweekday: null,\n bynweekday: null,\n byhour: null,\n byminute: null,\n bysecond: null,\n byeaster: null,\n};\nexport var defaultKeys = Object.keys(DEFAULT_OPTIONS);\n/**\n *\n * @param {Options?} options - see \n * - The only required option is `freq`, one of RRule.YEARLY, RRule.MONTHLY, ...\n * @constructor\n */\nvar RRule = /** @class */ (function () {\n function RRule(options, noCache) {\n if (options === void 0) { options = {}; }\n if (noCache === void 0) { noCache = false; }\n // RFC string\n this._cache = noCache ? null : new Cache();\n // used by toString()\n this.origOptions = initializeOptions(options);\n var parsedOptions = parseOptions(options).parsedOptions;\n this.options = parsedOptions;\n }\n RRule.parseText = function (text, language) {\n return parseText(text, language);\n };\n RRule.fromText = function (text, language) {\n return fromText(text, language);\n };\n RRule.fromString = function (str) {\n return new RRule(RRule.parseString(str) || undefined);\n };\n RRule.prototype._iter = function (iterResult) {\n return iter(iterResult, this.options);\n };\n RRule.prototype._cacheGet = function (what, args) {\n if (!this._cache)\n return false;\n return this._cache._cacheGet(what, args);\n };\n RRule.prototype._cacheAdd = function (what, value, args) {\n if (!this._cache)\n return;\n return this._cache._cacheAdd(what, value, args);\n };\n /**\n * @param {Function} iterator - optional function that will be called\n * on each date that is added. It can return false\n * to stop the iteration.\n * @return Array containing all recurrences.\n */\n RRule.prototype.all = function (iterator) {\n if (iterator) {\n return this._iter(new CallbackIterResult('all', {}, iterator));\n }\n var result = this._cacheGet('all');\n if (result === false) {\n result = this._iter(new IterResult('all', {}));\n this._cacheAdd('all', result);\n }\n return result;\n };\n /**\n * Returns all the occurrences of the rrule between after and before.\n * The inc keyword defines what happens if after and/or before are\n * themselves occurrences. With inc == True, they will be included in the\n * list, if they are found in the recurrence set.\n *\n * @return Array\n */\n RRule.prototype.between = function (after, before, inc, iterator) {\n if (inc === void 0) { inc = false; }\n if (!isValidDate(after) || !isValidDate(before)) {\n throw new Error('Invalid date passed in to RRule.between');\n }\n var args = {\n before: before,\n after: after,\n inc: inc,\n };\n if (iterator) {\n return this._iter(new CallbackIterResult('between', args, iterator));\n }\n var result = this._cacheGet('between', args);\n if (result === false) {\n result = this._iter(new IterResult('between', args));\n this._cacheAdd('between', result, args);\n }\n return result;\n };\n /**\n * Returns the last recurrence before the given datetime instance.\n * The inc keyword defines what happens if dt is an occurrence.\n * With inc == True, if dt itself is an occurrence, it will be returned.\n *\n * @return Date or null\n */\n RRule.prototype.before = function (dt, inc) {\n if (inc === void 0) { inc = false; }\n if (!isValidDate(dt)) {\n throw new Error('Invalid date passed in to RRule.before');\n }\n var args = { dt: dt, inc: inc };\n var result = this._cacheGet('before', args);\n if (result === false) {\n result = this._iter(new IterResult('before', args));\n this._cacheAdd('before', result, args);\n }\n return result;\n };\n /**\n * Returns the first recurrence after the given datetime instance.\n * The inc keyword defines what happens if dt is an occurrence.\n * With inc == True, if dt itself is an occurrence, it will be returned.\n *\n * @return Date or null\n */\n RRule.prototype.after = function (dt, inc) {\n if (inc === void 0) { inc = false; }\n if (!isValidDate(dt)) {\n throw new Error('Invalid date passed in to RRule.after');\n }\n var args = { dt: dt, inc: inc };\n var result = this._cacheGet('after', args);\n if (result === false) {\n result = this._iter(new IterResult('after', args));\n this._cacheAdd('after', result, args);\n }\n return result;\n };\n /**\n * Returns the number of recurrences in this set. It will have go trough\n * the whole recurrence, if this hasn't been done before.\n */\n RRule.prototype.count = function () {\n return this.all().length;\n };\n /**\n * Converts the rrule into its string representation\n *\n * @see \n * @return String\n */\n RRule.prototype.toString = function () {\n return optionsToString(this.origOptions);\n };\n /**\n * Will convert all rules described in nlp:ToText\n * to text.\n */\n RRule.prototype.toText = function (gettext, language, dateFormatter) {\n return toText(this, gettext, language, dateFormatter);\n };\n RRule.prototype.isFullyConvertibleToText = function () {\n return isFullyConvertible(this);\n };\n /**\n * @return a RRule instance with the same freq and options\n * as this one (cache is not cloned)\n */\n RRule.prototype.clone = function () {\n return new RRule(this.origOptions);\n };\n // RRule class 'constants'\n RRule.FREQUENCIES = [\n 'YEARLY',\n 'MONTHLY',\n 'WEEKLY',\n 'DAILY',\n 'HOURLY',\n 'MINUTELY',\n 'SECONDLY',\n ];\n RRule.YEARLY = Frequency.YEARLY;\n RRule.MONTHLY = Frequency.MONTHLY;\n RRule.WEEKLY = Frequency.WEEKLY;\n RRule.DAILY = Frequency.DAILY;\n RRule.HOURLY = Frequency.HOURLY;\n RRule.MINUTELY = Frequency.MINUTELY;\n RRule.SECONDLY = Frequency.SECONDLY;\n RRule.MO = Days.MO;\n RRule.TU = Days.TU;\n RRule.WE = Days.WE;\n RRule.TH = Days.TH;\n RRule.FR = Days.FR;\n RRule.SA = Days.SA;\n RRule.SU = Days.SU;\n RRule.parseString = parseString;\n RRule.optionsToString = optionsToString;\n return RRule;\n}());\nexport { RRule };\n//# sourceMappingURL=rrule.js.map","import { __assign } from \"tslib\";\nimport { RRule } from './rrule';\nimport { RRuleSet } from './rruleset';\nimport { untilStringToDate } from './dateutil';\nimport { includes, split } from './helpers';\nimport { parseString, parseDtstart } from './parsestring';\n/**\n * RRuleStr\n * To parse a set of rrule strings\n */\nvar DEFAULT_OPTIONS = {\n dtstart: null,\n cache: false,\n unfold: false,\n forceset: false,\n compatible: false,\n tzid: null,\n};\nexport function parseInput(s, options) {\n var rrulevals = [];\n var rdatevals = [];\n var exrulevals = [];\n var exdatevals = [];\n var parsedDtstart = parseDtstart(s);\n var dtstart = parsedDtstart.dtstart;\n var tzid = parsedDtstart.tzid;\n var lines = splitIntoLines(s, options.unfold);\n lines.forEach(function (line) {\n var _a;\n if (!line)\n return;\n var _b = breakDownLine(line), name = _b.name, parms = _b.parms, value = _b.value;\n switch (name.toUpperCase()) {\n case 'RRULE':\n if (parms.length) {\n throw new Error(\"unsupported RRULE parm: \".concat(parms.join(',')));\n }\n rrulevals.push(parseString(line));\n break;\n case 'RDATE':\n var _c = (_a = /RDATE(?:;TZID=([^:=]+))?/i.exec(line)) !== null && _a !== void 0 ? _a : [], rdateTzid = _c[1];\n if (rdateTzid && !tzid) {\n tzid = rdateTzid;\n }\n rdatevals = rdatevals.concat(parseRDate(value, parms));\n break;\n case 'EXRULE':\n if (parms.length) {\n throw new Error(\"unsupported EXRULE parm: \".concat(parms.join(',')));\n }\n exrulevals.push(parseString(value));\n break;\n case 'EXDATE':\n exdatevals = exdatevals.concat(parseRDate(value, parms));\n break;\n case 'DTSTART':\n break;\n default:\n throw new Error('unsupported property: ' + name);\n }\n });\n return {\n dtstart: dtstart,\n tzid: tzid,\n rrulevals: rrulevals,\n rdatevals: rdatevals,\n exrulevals: exrulevals,\n exdatevals: exdatevals,\n };\n}\nfunction buildRule(s, options) {\n var _a = parseInput(s, options), rrulevals = _a.rrulevals, rdatevals = _a.rdatevals, exrulevals = _a.exrulevals, exdatevals = _a.exdatevals, dtstart = _a.dtstart, tzid = _a.tzid;\n var noCache = options.cache === false;\n if (options.compatible) {\n options.forceset = true;\n options.unfold = true;\n }\n if (options.forceset ||\n rrulevals.length > 1 ||\n rdatevals.length ||\n exrulevals.length ||\n exdatevals.length) {\n var rset_1 = new RRuleSet(noCache);\n rset_1.dtstart(dtstart);\n rset_1.tzid(tzid || undefined);\n rrulevals.forEach(function (val) {\n rset_1.rrule(new RRule(groomRruleOptions(val, dtstart, tzid), noCache));\n });\n rdatevals.forEach(function (date) {\n rset_1.rdate(date);\n });\n exrulevals.forEach(function (val) {\n rset_1.exrule(new RRule(groomRruleOptions(val, dtstart, tzid), noCache));\n });\n exdatevals.forEach(function (date) {\n rset_1.exdate(date);\n });\n if (options.compatible && options.dtstart)\n rset_1.rdate(dtstart);\n return rset_1;\n }\n var val = rrulevals[0] || {};\n return new RRule(groomRruleOptions(val, val.dtstart || options.dtstart || dtstart, val.tzid || options.tzid || tzid), noCache);\n}\nexport function rrulestr(s, options) {\n if (options === void 0) { options = {}; }\n return buildRule(s, initializeOptions(options));\n}\nfunction groomRruleOptions(val, dtstart, tzid) {\n return __assign(__assign({}, val), { dtstart: dtstart, tzid: tzid });\n}\nfunction initializeOptions(options) {\n var invalid = [];\n var keys = Object.keys(options);\n var defaultKeys = Object.keys(DEFAULT_OPTIONS);\n keys.forEach(function (key) {\n if (!includes(defaultKeys, key))\n invalid.push(key);\n });\n if (invalid.length) {\n throw new Error('Invalid options: ' + invalid.join(', '));\n }\n return __assign(__assign({}, DEFAULT_OPTIONS), options);\n}\nfunction extractName(line) {\n if (line.indexOf(':') === -1) {\n return {\n name: 'RRULE',\n value: line,\n };\n }\n var _a = split(line, ':', 1), name = _a[0], value = _a[1];\n return {\n name: name,\n value: value,\n };\n}\nfunction breakDownLine(line) {\n var _a = extractName(line), name = _a.name, value = _a.value;\n var parms = name.split(';');\n if (!parms)\n throw new Error('empty property name');\n return {\n name: parms[0].toUpperCase(),\n parms: parms.slice(1),\n value: value,\n };\n}\nfunction splitIntoLines(s, unfold) {\n if (unfold === void 0) { unfold = false; }\n s = s && s.trim();\n if (!s)\n throw new Error('Invalid empty string');\n // More info about 'unfold' option\n // Go head to http://www.ietf.org/rfc/rfc2445.txt\n if (!unfold) {\n return s.split(/\\s/);\n }\n var lines = s.split('\\n');\n var i = 0;\n while (i < lines.length) {\n // TODO\n var line = (lines[i] = lines[i].replace(/\\s+$/g, ''));\n if (!line) {\n lines.splice(i, 1);\n }\n else if (i > 0 && line[0] === ' ') {\n lines[i - 1] += line.slice(1);\n lines.splice(i, 1);\n }\n else {\n i += 1;\n }\n }\n return lines;\n}\nfunction validateDateParm(parms) {\n parms.forEach(function (parm) {\n if (!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(parm)) {\n throw new Error('unsupported RDATE/EXDATE parm: ' + parm);\n }\n });\n}\nfunction parseRDate(rdateval, parms) {\n validateDateParm(parms);\n return rdateval.split(',').map(function (datestr) { return untilStringToDate(datestr); });\n}\n//# sourceMappingURL=rrulestr.js.map","import { __extends } from \"tslib\";\nimport { RRule } from './rrule';\nimport { sort, timeToUntilString } from './dateutil';\nimport { includes } from './helpers';\nimport { iterSet } from './iterset';\nimport { rrulestr } from './rrulestr';\nimport { optionsToString } from './optionstostring';\nfunction createGetterSetter(fieldName) {\n var _this = this;\n return function (field) {\n if (field !== undefined) {\n _this[\"_\".concat(fieldName)] = field;\n }\n if (_this[\"_\".concat(fieldName)] !== undefined) {\n return _this[\"_\".concat(fieldName)];\n }\n for (var i = 0; i < _this._rrule.length; i++) {\n var field_1 = _this._rrule[i].origOptions[fieldName];\n if (field_1) {\n return field_1;\n }\n }\n };\n}\nvar RRuleSet = /** @class */ (function (_super) {\n __extends(RRuleSet, _super);\n /**\n *\n * @param {Boolean?} noCache\n * The same stratagy as RRule on cache, default to false\n * @constructor\n */\n function RRuleSet(noCache) {\n if (noCache === void 0) { noCache = false; }\n var _this = _super.call(this, {}, noCache) || this;\n _this.dtstart = createGetterSetter.apply(_this, ['dtstart']);\n _this.tzid = createGetterSetter.apply(_this, ['tzid']);\n _this._rrule = [];\n _this._rdate = [];\n _this._exrule = [];\n _this._exdate = [];\n return _this;\n }\n RRuleSet.prototype._iter = function (iterResult) {\n return iterSet(iterResult, this._rrule, this._exrule, this._rdate, this._exdate, this.tzid());\n };\n /**\n * Adds an RRule to the set\n *\n * @param {RRule}\n */\n RRuleSet.prototype.rrule = function (rrule) {\n _addRule(rrule, this._rrule);\n };\n /**\n * Adds an EXRULE to the set\n *\n * @param {RRule}\n */\n RRuleSet.prototype.exrule = function (rrule) {\n _addRule(rrule, this._exrule);\n };\n /**\n * Adds an RDate to the set\n *\n * @param {Date}\n */\n RRuleSet.prototype.rdate = function (date) {\n _addDate(date, this._rdate);\n };\n /**\n * Adds an EXDATE to the set\n *\n * @param {Date}\n */\n RRuleSet.prototype.exdate = function (date) {\n _addDate(date, this._exdate);\n };\n /**\n * Get list of included rrules in this recurrence set.\n *\n * @return List of rrules\n */\n RRuleSet.prototype.rrules = function () {\n return this._rrule.map(function (e) { return rrulestr(e.toString()); });\n };\n /**\n * Get list of excluded rrules in this recurrence set.\n *\n * @return List of exrules\n */\n RRuleSet.prototype.exrules = function () {\n return this._exrule.map(function (e) { return rrulestr(e.toString()); });\n };\n /**\n * Get list of included datetimes in this recurrence set.\n *\n * @return List of rdates\n */\n RRuleSet.prototype.rdates = function () {\n return this._rdate.map(function (e) { return new Date(e.getTime()); });\n };\n /**\n * Get list of included datetimes in this recurrence set.\n *\n * @return List of exdates\n */\n RRuleSet.prototype.exdates = function () {\n return this._exdate.map(function (e) { return new Date(e.getTime()); });\n };\n RRuleSet.prototype.valueOf = function () {\n var result = [];\n if (!this._rrule.length && this._dtstart) {\n result = result.concat(optionsToString({ dtstart: this._dtstart }));\n }\n this._rrule.forEach(function (rrule) {\n result = result.concat(rrule.toString().split('\\n'));\n });\n this._exrule.forEach(function (exrule) {\n result = result.concat(exrule\n .toString()\n .split('\\n')\n .map(function (line) { return line.replace(/^RRULE:/, 'EXRULE:'); })\n .filter(function (line) { return !/^DTSTART/.test(line); }));\n });\n if (this._rdate.length) {\n result.push(rdatesToString('RDATE', this._rdate, this.tzid()));\n }\n if (this._exdate.length) {\n result.push(rdatesToString('EXDATE', this._exdate, this.tzid()));\n }\n return result;\n };\n /**\n * to generate recurrence field such as:\n * DTSTART:19970902T010000Z\n * RRULE:FREQ=YEARLY;COUNT=2;BYDAY=TU\n * RRULE:FREQ=YEARLY;COUNT=1;BYDAY=TH\n */\n RRuleSet.prototype.toString = function () {\n return this.valueOf().join('\\n');\n };\n /**\n * Create a new RRuleSet Object completely base on current instance\n */\n RRuleSet.prototype.clone = function () {\n var rrs = new RRuleSet(!!this._cache);\n this._rrule.forEach(function (rule) { return rrs.rrule(rule.clone()); });\n this._exrule.forEach(function (rule) { return rrs.exrule(rule.clone()); });\n this._rdate.forEach(function (date) { return rrs.rdate(new Date(date.getTime())); });\n this._exdate.forEach(function (date) { return rrs.exdate(new Date(date.getTime())); });\n return rrs;\n };\n return RRuleSet;\n}(RRule));\nexport { RRuleSet };\nfunction _addRule(rrule, collection) {\n if (!(rrule instanceof RRule)) {\n throw new TypeError(String(rrule) + ' is not RRule instance');\n }\n if (!includes(collection.map(String), String(rrule))) {\n collection.push(rrule);\n }\n}\nfunction _addDate(date, collection) {\n if (!(date instanceof Date)) {\n throw new TypeError(String(date) + ' is not Date instance');\n }\n if (!includes(collection.map(Number), Number(date))) {\n collection.push(date);\n sort(collection);\n }\n}\nfunction rdatesToString(param, rdates, tzid) {\n var isUTC = !tzid || tzid.toUpperCase() === 'UTC';\n var header = isUTC ? \"\".concat(param, \":\") : \"\".concat(param, \";TZID=\").concat(tzid, \":\");\n var dateString = rdates\n .map(function (rdate) { return timeToUntilString(rdate.valueOf(), isUTC); })\n .join(',');\n return \"\".concat(header).concat(dateString);\n}\n//# sourceMappingURL=rruleset.js.map","import { DateWithZone } from './datewithzone';\nimport { iter } from './iter';\nimport { sort } from './dateutil';\nexport function iterSet(iterResult, _rrule, _exrule, _rdate, _exdate, tzid) {\n var _exdateHash = {};\n var _accept = iterResult.accept;\n function evalExdate(after, before) {\n _exrule.forEach(function (rrule) {\n rrule.between(after, before, true).forEach(function (date) {\n _exdateHash[Number(date)] = true;\n });\n });\n }\n _exdate.forEach(function (date) {\n var zonedDate = new DateWithZone(date, tzid).rezonedDate();\n _exdateHash[Number(zonedDate)] = true;\n });\n iterResult.accept = function (date) {\n var dt = Number(date);\n if (isNaN(dt))\n return _accept.call(this, date);\n if (!_exdateHash[dt]) {\n evalExdate(new Date(dt - 1), new Date(dt + 1));\n if (!_exdateHash[dt]) {\n _exdateHash[dt] = true;\n return _accept.call(this, date);\n }\n }\n return true;\n };\n if (iterResult.method === 'between') {\n evalExdate(iterResult.args.after, iterResult.args.before);\n iterResult.accept = function (date) {\n var dt = Number(date);\n if (!_exdateHash[dt]) {\n _exdateHash[dt] = true;\n return _accept.call(this, date);\n }\n return true;\n };\n }\n for (var i = 0; i < _rdate.length; i++) {\n var zonedDate = new DateWithZone(_rdate[i], tzid).rezonedDate();\n if (!iterResult.accept(new Date(zonedDate.getTime())))\n break;\n }\n _rrule.forEach(function (rrule) {\n iter(iterResult, rrule.options);\n });\n var res = iterResult._result;\n sort(res);\n switch (iterResult.method) {\n case 'all':\n case 'between':\n return res;\n case 'before':\n return ((res.length && res[res.length - 1]) || null);\n case 'after':\n default:\n return ((res.length && res[0]) || null);\n }\n}\n//# sourceMappingURL=iterset.js.map","interface IViewPosition{\r\n\ttop: number;\r\n\tleft: number;\r\n}\r\n\r\ninterface IViewBox extends IViewPosition{\r\n\twidth: number;\r\n\theight: number;\r\n\tbottom: number;\r\n\tright: number;\r\n}\r\n\r\nexport class Tooltip {\r\n\tprivate _root: HTMLElement;\r\n\tprivate _tooltipNode: HTMLElement | null;\r\n\tprivate _scheduler: any;\r\n\r\n\tconstructor(scheduler: any){\r\n\t\tthis._scheduler = scheduler;\r\n\t}\r\n\r\n\tgetNode() : HTMLElement {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tif (!this._tooltipNode){\r\n\t\t\tthis._tooltipNode = document.createElement(\"div\");\r\n\t\t\tthis._tooltipNode.className = \"dhtmlXTooltip scheduler_tooltip tooltip\";\r\n\r\n\t\t\tscheduler._waiAria.tooltipAttr(this._tooltipNode);\r\n\t\t}\r\n\t\tif(scheduler.config.rtl){\r\n\t\t\tthis._tooltipNode.classList.add(\"dhtmlXTooltip_rtl\");\r\n\t\t} else{\r\n\t\t\tthis._tooltipNode.classList.remove(\"dhtmlXTooltip_rtl\");\r\n\t\t}\r\n\t\treturn this._tooltipNode;\r\n\t}\r\n\r\n\tsetViewport(node: HTMLElement):Tooltip{\r\n\t\tthis._root = node;\r\n\t\treturn this;\r\n\t}\r\n\r\n\tshow(left: number, top: number): Tooltip;\r\n\tshow(event: MouseEvent): Tooltip;\r\n\tshow(left: number | MouseEvent, top?: number): Tooltip {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tconst container = document.body;\r\n\t\tconst node = this.getNode();\r\n\r\n\t\tif(!domHelpers.isChildOf(node, container)){\r\n\t\t\tthis.hide();\r\n\t\t\tcontainer.appendChild(node);\r\n\t\t}\r\n\r\n\t\tif (this._isLikeMouseEvent(left)) {\r\n\t\t\tconst position = this._calculateTooltipPosition(left as MouseEvent);\r\n\t\t\ttop = position.top;\r\n\t\t\tleft = position.left;\r\n\t\t}\r\n\r\n\t\tnode.style.top = top + \"px\";\r\n\t\tnode.style.left = left + \"px\";\r\n\r\n\t\tscheduler._waiAria.tooltipVisibleAttr(node);\r\n\t\treturn this;\r\n\t}\r\n\thide() : Tooltip{\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst node = this.getNode();\r\n\t\tif(node && node.parentNode){\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t}\r\n\t\tscheduler._waiAria.tooltipHiddenAttr(node);\r\n\t\treturn this;\r\n\t}\r\n\r\n\tsetContent(html: string) : Tooltip{\r\n\t\tconst node = this.getNode();\r\n\t\tnode.innerHTML = html;\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// it is for salesforce, because it proxies event to it own events\r\n\tprivate _isLikeMouseEvent(event: any): boolean {\r\n\t\tif (!event || typeof event !== \"object\") {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn \"clientX\" in event && \"clientY\" in event;\r\n\t}\r\n\r\n\tprivate _getViewPort() : HTMLElement {\r\n\t\treturn this._root || document.body;\r\n\t}\r\n\r\n\r\n\tprivate _calculateTooltipPosition(event: MouseEvent): IViewPosition{\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\t// top/left coordinates inside the viewport by mouse position\r\n\t\tconst viewport = this._getViewPortSize();\r\n\t\tconst tooltipNode = this.getNode();\r\n\t\tconst tooltip: IViewBox = {\r\n\t\t\ttop:0,\r\n\t\t\tleft: 0,\r\n\t\t\twidth: tooltipNode.offsetWidth,\r\n\t\t\theight: tooltipNode.offsetHeight,\r\n\t\t\tbottom: 0,\r\n\t\t\tright: 0\r\n\t\t};\r\n\r\n\t\tconst offsetX = scheduler.config.tooltip_offset_x;\r\n\t\tconst offsetY = scheduler.config.tooltip_offset_y;\r\n\r\n\t\tconst container = document.body;\r\n\t\tconst mouse = domHelpers.getRelativeEventPosition(event, container);\r\n\t\tconst containerPos = domHelpers.getNodePosition(container);\r\n\t\tmouse.y += containerPos.y; // to fix margin collapsing\r\n\r\n\t\ttooltip.top = mouse.y;\r\n\t\ttooltip.left = mouse.x;\r\n\t\ttooltip.top += offsetY;\r\n\t\ttooltip.left += offsetX;\r\n\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\ttooltip.right = tooltip.left + tooltip.width;\r\n\r\n\t\tconst scrollTop = window.scrollY + container.scrollTop; // to fix margin collapsing\r\n\t\t// edge cases when the tooltip element can be partially hidden by edges of the viewport\r\n\t\tif(tooltip.top < viewport.top - scrollTop){\r\n\t\t\ttooltip.top = viewport.top;\r\n\t\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\t}else if(tooltip.bottom > viewport.bottom){\r\n\t\t\ttooltip.bottom = viewport.bottom;\r\n\t\t\ttooltip.top = tooltip.bottom - tooltip.height;\r\n\t\t}\r\n\r\n\t\tif(tooltip.left < viewport.left){\r\n\t\t\ttooltip.left = viewport.left;\r\n\t\t\ttooltip.right = viewport.left + tooltip.width;\r\n\t\t}else if(tooltip.right > viewport.right){\r\n\t\t\ttooltip.right = viewport.right;\r\n\t\t\ttooltip.left = tooltip.right - tooltip.width;\r\n\t\t}\r\n\r\n\t\tif(mouse.x >= tooltip.left && mouse.x <= tooltip.right) {\r\n\t\t\ttooltip.left = mouse.x - tooltip.width - offsetX;\r\n\t\t\ttooltip.right = tooltip.left + tooltip.width;\r\n\t\t}\r\n\r\n\t\tif(mouse.y >= tooltip.top && mouse.y <= tooltip.bottom) {\r\n\t\t\ttooltip.top = mouse.y - tooltip.height - offsetY;\r\n\t\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\t}\r\n\r\n\t\treturn tooltip;\r\n\t}\r\n\r\n\tprivate _getViewPortSize() : IViewBox {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tconst container = this._getViewPort();\r\n\t\tlet viewport = container;\r\n\t\tlet scrollTop = window.scrollY + document.body.scrollTop;\r\n\t\tlet scrollLeft = window.scrollX + document.body.scrollLeft;\r\n\t\tlet pos;\r\n\t\t// support for the initial tooltip mode where the tooltip element was attached to the data area of scheduler\r\n\t\tif(container === scheduler.$event_data){\r\n\t\t\tviewport = scheduler.$event;\r\n\t\t\tscrollTop = 0;\r\n\t\t\tscrollLeft = 0;\r\n\t\t\tpos = domHelpers.getNodePosition(scheduler.$event);\r\n\t\t}else{\r\n\t\t\tpos = domHelpers.getNodePosition(viewport);\r\n\t\t}\r\n\t\treturn {\r\n\t\t\tleft:pos.x + scrollLeft,\r\n\t\t\ttop: pos.y + scrollTop,\r\n\t\t\twidth: pos.width,\r\n\t\t\theight: pos.height,\r\n\t\t\tbottom: pos.y + pos.height + scrollTop,\r\n\t\t\tright: pos.x + pos.width + scrollLeft\r\n\t\t};\r\n\t}\r\n}\r\n","import * as utils from \"../../core/utils/utils\";\r\nimport { Tooltip } from \"./tooltip\";\r\n\r\ninterface ITrackerTarget {\r\n\tselector: string;\r\n\tonmouseenter: (event: MouseEvent, node: HTMLElement) => void;\r\n\tonmousemove: (event: MouseEvent, node: HTMLElement) => void;\r\n\tonmouseleave: (event: MouseEvent, node: HTMLElement) => void;\r\n\tglobal: boolean;\r\n}\r\n\r\ninterface ITooltipConfig {\r\n\tselector: string;\r\n\thtml: (event: MouseEvent, node: HTMLElement) => string;\r\n\tglobal: boolean;\r\n}\r\n\r\nexport class TooltipManager{\r\n\ttooltip: Tooltip;\r\n\tprotected _domEvents: any;\r\n\tprivate _listeners: object = {};\r\n\tprivate _scheduler: any;\r\n\tprivate delayShow: any;\r\n\tprivate delayHide: any;\r\n\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.tooltip = new Tooltip(scheduler);\r\n\t\tthis._scheduler = scheduler;\r\n\t\tthis._domEvents = scheduler._createDomEventScope();\r\n\t\tthis._initDelayedFunctions();\r\n\t}\r\n\r\n\tdestructor(): void{\r\n\t\tthis.tooltip.hide();\r\n\t\tthis._domEvents.detachAll();\r\n\t}\r\n\thideTooltip(): void{\r\n\t\tthis.delayHide();\r\n\t}\r\n\tattach(config: ITrackerTarget): void {\r\n\t\tlet root = document.body;\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tif(!config.global){\r\n\t\t\troot = scheduler.$root;\r\n\t\t}\r\n\r\n\t\tlet watchableTarget = null;\r\n\t\tconst handler = (event) => {\r\n\t\t\tconst eventTarget = domHelpers.getTargetNode(event);\r\n\t\t\tconst targetNode = domHelpers.closest(eventTarget, config.selector);\r\n\t\t\tif(domHelpers.isChildOf(eventTarget, this.tooltip.getNode())){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tconst doOnMouseEnter = () => {\r\n\t\t\t\twatchableTarget = targetNode;\r\n\t\t\t\tconfig.onmouseenter(event, targetNode);\r\n\t\t\t};\r\n\t\t\t// GS-2377: to show tooltip after touch and hide it when touch is outside the events\r\n\t\t\tif (scheduler._mobile && scheduler.config.touch_tooltip){\r\n\t\t\t\tif(targetNode){\r\n\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tconfig.onmouseleave(event, targetNode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(watchableTarget){\r\n\t\t\t\tif(targetNode && targetNode === watchableTarget){\r\n\t\t\t\t\tconfig.onmousemove(event, targetNode);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconfig.onmouseleave(event, watchableTarget);\r\n\t\t\t\t\twatchableTarget = null;\r\n\r\n\t\t\t\t\tif(targetNode && targetNode !== watchableTarget){\r\n\t\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(targetNode){\r\n\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.detach(config.selector);\r\n\t\tthis._domEvents.attach(root, \"mousemove\", handler);\r\n\t\tthis._listeners[config.selector] = {\r\n\t\t\tnode: root,\r\n\t\t\thandler\r\n\t\t};\r\n\t}\r\n\r\n\tdetach(selector: string): void {\r\n\t\tconst listener = this._listeners[selector];\r\n\t\tif(listener){\r\n\t\t\tthis._domEvents.detach(listener.node, \"mousemove\", listener.handler);\r\n\t\t}\r\n\t}\r\n\r\n\ttooltipFor(config: ITooltipConfig): void {\r\n\t\tconst cloneDomEvent = (event: MouseEvent) => {\r\n\t\t\tlet clone = event;\r\n\t\t\t// making events survive timeout in ie\r\n\t\t\t// tslint:disable-next-line no-string-literal\r\n\t\t\tif(document[\"createEventObject\"] && !document.createEvent){\r\n\t\t\t\t// tslint:disable-next-line no-string-literal\r\n\t\t\t\tclone = document[\"createEventObject\"](event);\r\n\t\t\t}\r\n\t\t\treturn clone;\r\n\t\t};\r\n\t\tthis._initDelayedFunctions();\r\n\t\tthis.attach({\r\n\t\t\tselector: config.selector,\r\n\t\t\tglobal: config.global,\r\n\t\t\tonmouseenter:(event: MouseEvent, node: HTMLElement) => {\r\n\t\t\t\tconst html = config.html(event, node);\r\n\t\t\t\tif(html){\r\n\t\t\t\t\tthis.delayShow(cloneDomEvent(event), html);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonmousemove:(event: MouseEvent, node: HTMLElement) => {\r\n\t\t\t\tconst html = config.html(event, node);\r\n\t\t\t\tif(html){\r\n\t\t\t\t\tthis.delayShow(cloneDomEvent(event), html);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\t\t\tthis.delayHide();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonmouseleave:() => {\r\n\t\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\t\tthis.delayHide();\r\n\t\t\t},\r\n\t\t});\r\n\t}\r\n\r\n\tprivate _initDelayedFunctions(){\r\n\t\tconst scheduler = this._scheduler;\r\n\t\t// reset delayed functions in order to apply current values of tooltip_timeout\r\n\t\tif(this.delayShow){\r\n\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t}\r\n\t\tif(this.delayHide){\r\n\t\t\tthis.delayHide.$cancelTimeout();\r\n\t\t}\r\n\t\tthis.tooltip.hide();\r\n\t\t\r\n\t\tthis.delayShow = (utils as any).default.delay((event: MouseEvent, html: string) => {\r\n\t\t\tif(scheduler.callEvent(\"onBeforeTooltip\", [event]) === false) {\r\n\t\t\t\tthis.tooltip.hide();\r\n\t\t\t} else {\r\n\t\t\t\tthis.tooltip.setContent(html);\r\n\t\t\t\tthis.tooltip.show(event);\r\n\t\t\t}\r\n\t\t}, scheduler.config.tooltip_timeout || 1);\r\n\r\n\t\tthis.delayHide = (utils as any).default.delay(() => {\r\n\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\tthis.tooltip.hide();\r\n\t\t}, scheduler.config.tooltip_hide_timeout || 1);\r\n\t}\r\n\r\n}","import active_links from \"./active_links\";\r\nimport agenda_legacy from \"./agenda_legacy_view\";\r\nimport agenda_view from \"./agenda\";\r\nimport all_timed from \"./all_timed\";\r\nimport collision from \"./collision\";\r\nimport container_autoresize from \"./container_autoresize\";\r\nimport cookie from \"./cookie\";\r\nimport daytimeline_restricted from \"./restricted_extensions/daytimeline\";\r\nimport drag_between_restricted from \"./restricted_extensions/drag_between\";\r\nimport editors from \"./editors\";\r\nimport expand from \"./expand\";\r\nimport grid_view from \"./restricted_extensions/grid_view\";\r\nimport html_templates from \"./html_templates\";\r\nimport key_nav from \"./key_nav\";\r\nimport layer from \"./layer\";\r\nimport limit from \"./limit\";\r\nimport map_view from \"./map_view\";\r\nimport minical from \"./minical\";\r\nimport monthheight from \"./monthheight\";\r\nimport multisection_restricted from \"./restricted_extensions/multisection\";\r\nimport multiselect from \"./multiselect\";\r\nimport multisource from \"./multisource\";\r\nimport mvc from \"./mvc\";\r\nimport outerdrag from \"./outerdrag\";\r\nimport pdf from \"./pdf\";\r\nimport quick_info from \"./quick_info\";\r\nimport readonly from \"./readonly\";\r\nimport recurring from \"./recurring\";\r\nimport recurring_legacy from \"./recurring_legacy\";\r\nimport serialize from \"./serialize\";\r\nimport timeline_restricted from \"./restricted_extensions/timeline\";\r\nimport tooltip from \"./tooltip\";\r\nimport treetimeline_restricted from \"./restricted_extensions/treetimeline\";\r\nimport units_restricted from \"./restricted_extensions/units\";\r\nimport url from \"./url\";\r\nimport week_agenda_restricted from \"./restricted_extensions/week_agenda\";\r\nimport wp from \"./wp\";\r\nimport year_view from \"./year_view\";\r\nimport export_api from \"./export_api\";\r\n\r\nexport default {\r\n\tactive_links,\r\n\tagenda_legacy,\r\n\tagenda_view,\r\n\tall_timed,\r\n\tcollision,\r\n\tcontainer_autoresize,\r\n\tcookie,\r\n\tdaytimeline: daytimeline_restricted,\r\n\tdrag_between: drag_between_restricted,\r\n\teditors,\r\n\texpand,\r\n\texport_api,\r\n\tgrid_view,\r\n\thtml_templates,\r\n\tkey_nav,\r\n\tlayer,\r\n\tlimit,\r\n\tmap_view,\r\n\tminical,\r\n\tmonthheight,\r\n\tmultisection: multisection_restricted,\r\n\tmultiselect,\r\n\tmultisource,\r\n\tmvc,\r\n\touterdrag,\r\n\tpdf,\r\n\tquick_info,\r\n\treadonly,\r\n\trecurring,\r\n\trecurring_legacy,\r\n\tserialize,\r\n\ttimeline: timeline_restricted,\r\n\ttooltip,\r\n\ttreetimeline: treetimeline_restricted,\r\n\tunits: units_restricted,\r\n\turl,\r\n\tweek_agenda: week_agenda_restricted,\r\n\twp,\r\n\tyear_view\r\n};","export default function(scheduler){\r\n\r\nscheduler.config.active_link_view = \"day\";\r\nscheduler._active_link_click = function(e){\r\n\tvar start = e.target;\r\n\tvar to = start.getAttribute(\"data-link-date\");\r\n\tvar s_d = scheduler.date.str_to_date(scheduler.config.api_date, false, true);\r\n\tif (to) {\r\n\t\tscheduler.setCurrentView(s_d(to), scheduler.config.active_link_view);\r\n\t\tif (e && e.preventDefault)\r\n\t\t\te.preventDefault();\r\n\t\treturn false;\r\n\t}\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar do_wrapper = function(key, fullname){\r\n\t\tfullname = fullname || (key+\"_scale_date\");\r\n\r\n\t\tif(!scheduler.templates['_active_links_old_'+ fullname]){\r\n\t\t\tscheduler.templates['_active_links_old_'+ fullname] = scheduler.templates[fullname];\r\n\t\t}\r\n\t\tvar week_x = scheduler.templates['_active_links_old_'+ fullname];\r\n\t\tvar d_s = scheduler.date.date_to_str(scheduler.config.api_date);\r\n\t\tscheduler.templates[fullname] = function(date) {\r\n\t\t\treturn \"\" + week_x(date) + \"\";\r\n\t\t};\r\n\t};\r\n\r\n\tdo_wrapper(\"week\");\r\n\tdo_wrapper(\"\", \"month_day\");\r\n\tif (this.matrix){\r\n\t\tfor (var key in this.matrix)\r\n\t\t\tdo_wrapper(key);\r\n\t}\r\n\r\n\tthis._detachDomEvent(this._obj, \"click\", scheduler._active_link_click);\r\n\tscheduler.event(this._obj, \"click\", scheduler._active_link_click);\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.date.add_agenda_legacy = function(date){\r\n\treturn scheduler.date.add(date, 1, \"year\");\r\n};\r\n\r\nscheduler.templates.agenda_legacy_time = function(start,end,ev){\r\n\tif (ev._timed)\r\n\t\treturn this.day_date(ev.start_date, ev.end_date, ev)+\" \"+this.event_date(start);\r\n\telse\r\n\t\treturn scheduler.templates.day_date(start)+\" – \"+scheduler.templates.day_date(end);\r\n};\r\nscheduler.templates.agenda_legacy_text = function(start,end,event){\r\n\treturn event.text;\r\n};\r\nscheduler.templates.agenda_legacy_date = function(){ return \"\"; };\r\n\r\nscheduler.date.agenda_legacy_start=function(){ return scheduler.date.date_part(scheduler._currentDate()); };\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function() {\r\n\tvar old_dblclick_dhx_cal_data = scheduler.dblclick_dhx_cal_data;\r\n\tscheduler.dblclick_dhx_cal_data = function() {\r\n\t\tif (this._mode == \"agenda_legacy\") {\r\n\t\t\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\t\t\tthis.addEventNow();\r\n\t\t} else {\r\n\t\t\tif (old_dblclick_dhx_cal_data)\r\n\t\t\t\treturn old_dblclick_dhx_cal_data.apply(this, arguments);\r\n\t\t}\r\n\t};\r\n\r\n\r\n\tvar old = scheduler.render_data;\r\n\tscheduler.render_data=function(evs){\r\n\t\tif (this._mode == \"agenda_legacy\")\r\n\t\t\tfill_agenda_tab();\r\n\t\telse\r\n\t\t\treturn old.apply(this,arguments);\r\n\t};\r\n\r\n\tvar old_render_view_data = scheduler.render_view_data;\r\n\tscheduler.render_view_data = function(){\r\n\t\tif(this._mode == \"agenda_legacy\") {\r\n\t\t\tscheduler._agendaScrollTop = scheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop;\r\n\t\t\tscheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop = 0;\r\n\t\t}\r\n\t\treturn old_render_view_data.apply(this,arguments);\r\n\t};\r\n\r\n\r\n\r\n\tfunction set_full_view(mode){\r\n\t\tif (mode){\r\n\t\t\tvar l = scheduler.locale.labels;\r\n\r\n\t\t\tvar rowAttr = scheduler._waiAria.agendaHeadAttrString();\r\n\t\t\tvar dateHeader = scheduler._waiAria.agendaHeadDateString(l.date);\r\n\t\t\tvar descriptionHeader = scheduler._waiAria.agendaHeadDescriptionString(l.description);\r\n\r\n\t\t\tscheduler._els[\"dhx_cal_header\"][0].innerHTML=\"
\" +\r\n\t\t\t\t\"
\"+l.date+\"
\" +\r\n\t\t\t\t\"\"+l.description+\"\" +\r\n\t\t\t\t\"
\";\r\n\t\t\tscheduler._table_view=true;\r\n\t\t\tscheduler.set_sizes();\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fill_agenda_tab(){\r\n\t\t//select events for which data need to be printed\r\n\r\n\t\tvar events = scheduler.get_visible_events();\r\n\t\tevents.sort(function(a,b){ return a.start_date>b.start_date?1:-1;});\r\n\r\n\t\tvar tableAttr = scheduler._waiAria.agendaDataAttrString();\r\n\t\tvar agendaEventAttrString;\r\n\t\t//generate html for the view\r\n\t\tvar html=\"
\";\r\n\t\tfor (var i=0; i
\"+\r\n\t\t\t\t\t(scheduler.config.rtl ? scheduler.templates.agenda_time(ev.end_date,ev.start_date, ev):scheduler.templates.agenda_time(ev.start_date, ev.end_date,ev))+\r\n\t\t\t\t\t\"
\";\r\n\t\t\thtml+=`
\r\n\t\t\t\r\n\t\t\t
`;\r\n\t\t\thtml+=\"\"+scheduler.templates.agenda_text(ev.start_date, ev.end_date, ev)+\"
\";\r\n\t\t}\r\n\t\thtml+=\"
\";\r\n\r\n\t\t//render html\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop = scheduler._agendaScrollTop||0;\r\n\r\n\t\t// setting up dhx_v_border size\r\n\t\tvar agenda_area = scheduler._els[\"dhx_cal_data\"][0].childNodes[0];\r\n\t\tvar v_border = agenda_area.childNodes[agenda_area.childNodes.length-1];\r\n\t\tv_border.style.height = (agenda_area.offsetHeight < scheduler._els[\"dhx_cal_data\"][0].offsetHeight) ? \"100%\" : (agenda_area.offsetHeight+\"px\");\r\n\r\n\t\tvar t=scheduler._els[\"dhx_cal_data\"][0].firstChild.childNodes;\r\n\r\n\t\tvar dateElement = scheduler._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML=scheduler.templates.agenda_date(scheduler._min_date, scheduler._max_date, scheduler._mode);\r\n\t\t}\r\n\r\n\t\tscheduler._rendered=[];\r\n\t\tfor (var i=0; i < t.length-1; i++)\r\n\t\t\tscheduler._rendered[i]=t[i];\r\n\r\n\t}\r\n\r\n\tscheduler.agenda_legacy_view=function(mode){\r\n\t\tscheduler._min_date = scheduler.config.agenda_start||scheduler.date.agenda_legacy_start(scheduler._date);\r\n\t\tscheduler._max_date = scheduler.config.agenda_end||scheduler.date.add_agenda_legacy(scheduler._min_date, 1);\r\n\r\n\t\tset_full_view(mode);\r\n\t\tif (mode){\r\n\t\t\tscheduler._cols = null;\r\n\t\t\tscheduler._colsS = null;\r\n\t\t\tscheduler._table_view = true;\r\n\t\t\t//agenda tab activated\r\n\t\t\tfill_agenda_tab();\r\n\t\t} else {\r\n\t\t\tscheduler._table_view = false;\r\n\t\t\t//agenda tab de-activated\r\n\t\t}\r\n\t};\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.date.add_agenda = function(date, inc){\r\n\t\treturn scheduler.date.add(date, 1*inc, \"month\");\r\n\t};\r\n\t\r\n\tscheduler.templates.agenda_time = function(start,end,ev){\r\n\t\tif (ev._timed){\r\n\t\t\treturn `${this.event_date(start)} - ${this.event_date(end)}`;\r\n\t\t}else{\r\n\t\t\treturn scheduler.locale.labels.full_day;\r\n\t\t}\r\n\t};\r\n\tscheduler.templates.agenda_text = function(start,end,ev){\r\n\t\treturn ev.text;\r\n\t};\r\n\r\n\tconst dayDateToStr = scheduler.date.date_to_str(\"%F %j\");\r\n\tconst dayDowToStr = scheduler.date.date_to_str(\"%l\");\r\n\r\n\tscheduler.templates.agenda_day = function(date){ \r\n\t\treturn `
${dayDateToStr(date)}
\r\n\t\t
${dayDowToStr(date)}
`;\r\n\t};\r\n\tscheduler.templates.agenda_date = function(start, end){ \r\n\t\treturn scheduler.templates.month_date(scheduler.getState().date); \r\n\t};\r\n\t\r\n\tscheduler.date.agenda_start=function(date){\r\n\t\treturn scheduler.date.month_start(new Date(date));\r\n\t};\r\n\r\n\tlet scrollTop = 0;\r\n\t\r\n\tscheduler.attachEvent(\"onTemplatesReady\",function() {\r\n\t\tvar old_dblclick_dhx_cal_data = scheduler.dblclick_dhx_cal_data;\r\n\t\tscheduler.dblclick_dhx_cal_data = function() {\r\n\t\t\tif (this._mode == \"agenda\") {\r\n\t\t\t\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\t\t\t\tthis.addEventNow();\r\n\t\t\t} else {\r\n\t\t\t\tif (old_dblclick_dhx_cal_data)\r\n\t\t\t\t\treturn old_dblclick_dhx_cal_data.apply(this, arguments);\r\n\t\t\t}\r\n\t\t};\r\n\t\r\n\t\r\n\t\tvar old = scheduler.render_data;\r\n\t\tscheduler.render_data=function(evs){\r\n\t\t\tif (this._mode == \"agenda\")\r\n\t\t\t\tfill_agenda_tab();\r\n\t\t\telse\r\n\t\t\t\treturn old.apply(this,arguments);\r\n\t\t};\r\n\t\r\n\t\tvar old_render_view_data = scheduler.render_view_data;\r\n\t\tscheduler.render_view_data = function(){\r\n\t\t\tif(this._mode == \"agenda\") {\r\n\t\t\t\tscrollTop = scheduler._els[\"dhx_cal_data\"][0].scrollTop;\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = 0;\r\n\t\t\t}\r\n\t\t\treturn old_render_view_data.apply(this,arguments);\r\n\t\t};\r\n\r\n\t\tfunction fill_agenda_tab(){\r\n\t\t\tconst events = scheduler.get_visible_events();\r\n\t\t\tevents.sort(function(a,b){ return a.start_date>b.start_date?1:-1;});\r\n\r\n\t\t\tconst eventsInDays = {};\r\n\t\t\tlet currDate = scheduler.getState().min_date;\r\n\t\t\tconst maxDate = scheduler.getState().max_date;\r\n\t\t\twhile(currDate.valueOf() < maxDate.valueOf()){\r\n\t\t\t\teventsInDays[currDate.valueOf()] = [];\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\r\n\t\t\tlet anyEvents = false;\r\n\r\n\t\t\tevents.forEach((ev) => {\r\n\t\t\t\tlet eventStart = scheduler.date.day_start(new Date(ev.start_date)); \r\n\t\t\t\twhile (eventStart.valueOf() < ev.end_date.valueOf()) {\r\n\t\t\t\t\tif (eventsInDays[eventStart.valueOf()]) {\r\n\t\t\t\t\t\teventsInDays[eventStart.valueOf()].push(ev);\r\n\t\t\t\t\t\tanyEvents = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\teventStart = scheduler.date.day_start(scheduler.date.add(eventStart, 1, \"day\"));\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(!anyEvents){\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = renderEmptyView();\r\n\t\t\t}else{\r\n\t\t\t\tlet html = \"\";\r\n\t\t\t\tfor(let day in eventsInDays){\r\n\t\t\t\t\thtml += renderDay(new Date(day*1), eventsInDays[day]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = scrollTop;\r\n\t\t\t\r\n\t\t\tlet t = scheduler._els[\"dhx_cal_data\"][0].querySelectorAll(\".dhx_cal_agenda_event_line\");\r\n\t\t\tscheduler._rendered = [];\r\n\t\t\tfor (var i = 0; i < t.length - 1; i++) {\r\n\t\t\t\tscheduler._rendered[i] = t[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\r\n\r\n\t\tfunction renderEmptyView(){\r\n\t\t\treturn `
${scheduler.locale.labels.agenda_tab}
`;\r\n\t\t}\r\n\r\n\t\tfunction renderDay(day, events) {\r\n\t\t\tif(!events.length){\r\n\t\t\t\treturn \"\";\r\n\t\t\t}\r\n\t\t\tlet html = `\r\n
\r\n\t
${scheduler.templates.agenda_day(day)}
\r\n\t
\r\n`;\r\n\r\n\t\t\tevents.forEach((calendarEvent) => {\r\n\t\t\t\thtml += renderOneEvent(day, calendarEvent);\r\n\t\t\t});\r\n\r\n\t\t\thtml += `
`;\r\n\t\t\treturn html;\r\n\t\t}\r\n\r\n\t\tfunction renderOneEvent(day, calendarEvent){\r\n\t\t\tconst dates = scheduler.templates.agenda_time(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\t\t\tconst selectedId = scheduler.getState().select_id;\r\n\t\t\tconst cls = scheduler.templates.event_class(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\t\t\tconst description = scheduler.templates.agenda_text(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\r\n\t\t\tlet style = \"\";\r\n\t\t\tif(calendarEvent.color || calendarEvent.textColor){\r\n\t\t\t\tconst bg = (calendarEvent.color ? (\"--dhx-scheduler-event-background:\" + calendarEvent.color + \";\") : \"\");\r\n\t\t\t\tconst color = (calendarEvent.textColor ? (\"--dhx-scheduler-event-color:\" + calendarEvent.textColor + \";\") : \"\");\r\n\t\t\t\tstyle = ` style=\"${bg}${color}\" `;\r\n\t\t\t}\r\n\r\n\t\t\treturn `
\r\n\t
\r\n\t
${dates}
\r\n\t
${description}
\r\n
`;\r\n\t\t}\r\n\t\r\n\t\tscheduler.agenda_view=function(mode){\r\n\t\t\tif (mode){\r\n\t\t\t\tscheduler._min_date = scheduler.config.agenda_start || scheduler.date.agenda_start(scheduler._date);\r\n\t\t\t\tscheduler._max_date = scheduler.config.agenda_end || scheduler.date.add_agenda(scheduler._min_date, 1);\r\n\t\t\t\tscheduler._cols = null;\r\n\t\t\t\tscheduler._colsS = null;\r\n\t\t\t\tscheduler._table_view = true;\r\n\r\n\t\t\t\tconst dateHeader = scheduler._getNavDateElement();\r\n\t\t\t\tdateHeader.innerHTML = scheduler.templates.agenda_date(scheduler._date);\r\n\t\t\t\t//agenda tab activated\r\n\t\t\t\tfill_agenda_tab();\r\n\t\t\t} else {\r\n\t\t\t\tscheduler._table_view = false;\r\n\t\t\t\t//agenda tab de-activated\r\n\t\t\t}\r\n\t\t};\r\n\t});\r\n\r\n\t// scheduler.attachEvent(\"onEventSelected\", function(id){\r\n\t// \tconst oldSelected = scheduler.$container.querySelectorAll(\".dhx_cal_agenda_event_line_selected\");\r\n\t// \toldSelected.forEach((el) => {\r\n\t// \t\tel.classList.remove(\"dhx_cal_agenda_event_line_selected\");\r\n\t// \t});\r\n\r\n\t// \tconst selected = scheduler.$container.querySelector(`[${scheduler.config.event_attribute}=\"${id}\"]`);\r\n\t// \tif(selected){\r\n\t// \t\tselected.classList.add(\"dhx_cal_agenda_event_line_selected\");\r\n\t// \t}\r\n\t// });\r\n\t\r\n\t\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.config.all_timed = \"short\";\r\n\tscheduler.config.all_timed_month = false;\r\n\r\n\tvar is_event_short = function (ev) {\r\n\t\tif(!((ev.end_date - ev.start_date)/(1000*60*60) >= 24)){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t// short event shouldn't disappear to multiday area during dnd-resize\r\n\t\tif(scheduler._drag_mode == \"resize\" && scheduler._drag_id == ev.id){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn \tfalse;\r\n\t};\r\n\r\n\t// copy of usual events and recurring instances;\r\n\t// regular copy causes problems with recurrings which have series event as a prototype\r\n\tscheduler._safe_copy = function(event){\r\n\t\tvar proto = null,\r\n\t\t\tcopy = scheduler._copy_event(event);\r\n\t\tif(event.event_pid){\r\n\t\t\tproto = scheduler.getEvent(event.event_pid);\r\n\t\t}\r\n\r\n\t\tif (proto && proto.isPrototypeOf(event)) {\r\n\t\t\tdelete copy.event_length;\r\n\t\t\tdelete copy.event_pid;\r\n\t\t\tdelete copy.rec_pattern;\r\n\t\t\tdelete copy.rec_type;\r\n\t\t}\r\n\r\n\t\treturn copy;\r\n\t};\r\n\r\n\tvar old_prerender_events_line = scheduler._pre_render_events_line;\r\n\tvar old_prerender_events_table = scheduler._pre_render_events_table;\r\n\r\n\tvar prerender_events = function (evs, hold) {\r\n\t\tif (!this._table_view) {\r\n\t\t\treturn old_prerender_events_line.call(this, evs, hold);\r\n\t\t}\r\n\r\n\t\treturn old_prerender_events_table.call(this, evs, hold);\r\n\t};\r\n\r\n\tscheduler._pre_render_events_line = scheduler._pre_render_events_table = function(evs, hold){\r\n\t\tif (!this.config.all_timed ||\r\n\t\t\t(this._table_view && this._mode != \"month\") ||\r\n\t\t\t(this._mode == \"month\" && !this.config.all_timed_month))\r\n\t\t\treturn prerender_events.call(this, evs, hold);\r\n\r\n\t\tfor (var i=0; i < evs.length; i++) {\r\n\t\t\tvar ev=evs[i];\r\n\r\n\t\t\tif (ev._timed)\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tif (this.config.all_timed == \"short\") {\r\n\t\t\t\tif (!is_event_short(ev)) {\r\n\t\t\t\t\tif (this._mode != \"month\") {\r\n\t\t\t\t\t\tevs.splice(i--, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar ce = this._safe_copy(ev); // current event (event for one specific day) is copy of original with modified dates\r\n\t\t\tif(!ev._virtual){\r\n\t\t\t\tce._first_chunk = true;\r\n\t\t\t}else{\r\n\t\t\t\tce._first_chunk = false;\r\n\t\t\t}\r\n\t\t\tce._drag_resize = false;\r\n\t\t\tce._virtual = true;\r\n\t\t\tce.start_date = new Date(ce.start_date); // as lame copy doesn't copy date objects\r\n\r\n\t\t\tif (!isOvernightEvent(ev)) {\r\n\t\t\t\tce.end_date = new Date(ev.end_date);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tce.end_date = getNextDay(ce.start_date);\r\n\t\t\t\tif (this.config.last_hour != 24) { // if specific last_hour was set (e.g. 20)\r\n\t\t\t\t\tce.end_date = setDateTime(ce.start_date, this.config.last_hour);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar event_changed = false;\r\n\t\t\tif (ce.start_date < this._max_date && ce.end_date > this._min_date && ce.start_date < ce.end_date) {\r\n\t\t\t\tevs[i] = ce; // adding another event in collection\r\n\t\t\t\tevent_changed = true;\r\n\t\t\t}\r\n\t\t//\tif (ce.start_date > ce.end_date) {\r\n\t\t//\t\tevs.splice(i--,1);\r\n\t\t//\t}\r\n\r\n\t\t\tvar re = this._safe_copy(ev); // remaining event, copy of original with modified start_date (making range more narrow)\r\n\t\t\tre._virtual = true;\r\n\t\t\tre.end_date = new Date(re.end_date);\r\n\t\t\tif (re.start_date < this._min_date)\r\n\t\t\t\tre.start_date = setDateTime(this._min_date, this.config.first_hour);// as we are starting only with whole hours\r\n\t\t\telse\r\n\t\t\t\tre.start_date = setDateTime(getNextDay(ev.start_date), this.config.first_hour);\r\n\r\n\t\t\tif (re.start_date < this._max_date && re.start_date < re.end_date) {\r\n\t\t\t\tif (event_changed){\r\n\t\t\t\t\tevs.splice(i+1,0,re);//insert part\r\n\t\t\t\t}else {\r\n\t\t\t\t\tevs[i--] = re;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tre._last_chunk = false;\r\n\t\t\t}else{\r\n\t\t\t\tce._last_chunk = true;\r\n\t\t\t\tce._drag_resize = true;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// in case of all_timed pre_render is not applied to the original event\r\n\t\t// so we need to force redraw in case of dnd\r\n\t\tvar redraw = (this._drag_mode == 'move')?false:hold;\r\n\t\treturn prerender_events.call(this, evs, redraw);\r\n\r\n\r\n\t\tfunction isOvernightEvent(ev){\r\n\t\t\tvar next_day = getNextDay(ev.start_date);\r\n\t\t\treturn (+ev.end_date > +next_day);\r\n\t\t}\r\n\t\tfunction getNextDay(date){\r\n\t\t\tvar next_day = scheduler.date.add(date, 1, \"day\");\r\n\t\t\tnext_day = scheduler.date.date_part(next_day);\r\n\t\t\treturn next_day;\r\n\t\t}\r\n\t\tfunction setDateTime(date, hours){\r\n\t\t\tvar val = scheduler.date.date_part(new Date(date));\r\n\t\t\tval.setHours(hours);\r\n\t\t\treturn val;\r\n\t\t}\r\n\t};\r\n\tvar old_get_visible_events = scheduler.get_visible_events;\r\n\tscheduler.get_visible_events = function(only_timed){\r\n\t\tif (!(this.config.all_timed && this.config.multi_day))\r\n\t\t\treturn old_get_visible_events.call(this, only_timed);\r\n\t\treturn old_get_visible_events.call(this, false); // only timed = false\r\n\t};\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function (old_mode, old_date, mode, date) {\r\n\t\tscheduler._allow_dnd = (mode == \"day\" || mode == \"week\" || scheduler.getView(mode));\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler._is_main_area_event = function(ev){\r\n\t\treturn !!(ev._timed || this.config.all_timed === true || (this.config.all_timed == \"short\" && is_event_short(ev)) );\r\n\t};\r\n\r\n\tvar oldUpdate = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id){\r\n\t\t// full redraw(update_render=true) messes events order while dnd.\r\n\t\t// individual redraw(update_render=false) of multiday event, which happens on select/unselect, expands event to full width of the cell and can be fixes only with full redraw.\r\n\t\t// so for now full redraw is always enabled for not-dnd updates\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tvar fullRedrawNeeded;\r\n\t\tvar initial;\r\n\t\tif(ev) {\r\n\t\t\tfullRedrawNeeded = (scheduler.config.all_timed && !(scheduler.isOneDayEvent(scheduler._events[id]) || scheduler.getState().drag_id));\r\n\t\t\tif (fullRedrawNeeded) {\r\n\t\t\t\tinitial = scheduler.config.update_render;\r\n\t\t\t\tscheduler.config.update_render = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\toldUpdate.apply(scheduler, arguments);\r\n\r\n\t\tif(ev) {\r\n\t\t\tif (fullRedrawNeeded) {\r\n\t\t\t\tscheduler.config.update_render = initial;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\r\nvar temp_section;\r\nvar before;\r\n\r\nscheduler.config.collision_limit = 1;\r\n\r\nfunction _setTempSection(event_id) { // for custom views (matrix, timeline, units)\r\n\tvar checked_mode = scheduler._get_section_view();\r\n\tif(checked_mode && event_id){\r\n\t\ttemp_section = scheduler.getEvent(event_id)[scheduler._get_section_property()];\r\n\t}\r\n}\r\n\r\nscheduler.attachEvent(\"onBeforeDrag\",function(id){\r\n\t_setTempSection(id);\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onBeforeLightbox\",function(id){\r\n\tvar ev = scheduler.getEvent(id);\r\n\tbefore = [ev.start_date, ev.end_date];\r\n\t_setTempSection(id);\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventChanged\",function(id){\r\n\tif (!id || !scheduler.getEvent(id)) return true;\r\n\tvar ev = scheduler.getEvent(id);\r\n\tif (!scheduler.checkCollision(ev)){\r\n\t\tif (!before) return false;\r\n\t\tev.start_date = before[0];\r\n\t\tev.end_date = before[1];\r\n\t\tev._timed=this.isOneDayEvent(ev);\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onBeforeEventChanged\",function(ev,e,is_new){\r\n\treturn scheduler.checkCollision(ev);\r\n});\r\nscheduler.attachEvent(\"onEventAdded\",function(id,ev) {\r\n\tvar result = scheduler.checkCollision(ev);\r\n\tif (!result)\r\n\t\tscheduler.deleteEvent(id);\r\n});\r\nscheduler.attachEvent(\"onEventSave\",function(id, edited_ev, is_new){\r\n\tedited_ev = scheduler._lame_clone(edited_ev);\r\n\tedited_ev.id = id;\r\n\r\n\t//lightbox may not have 'time' section\r\n\tif(!(edited_ev.start_date && edited_ev.end_date)){\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tedited_ev.start_date = new Date(ev.start_date);\r\n\t\tedited_ev.end_date = new Date(ev.end_date);\r\n\t}\r\n\r\n\tif((edited_ev.rrule && !edited_ev.recurring_event_id) || edited_ev.rec_type){\r\n\t\tscheduler._roll_back_dates(edited_ev);\r\n\t}\r\n\treturn scheduler.checkCollision(edited_ev); // in case user creates event on one date but then edited it another\r\n});\r\n\r\nscheduler._check_sections_collision = function(first, second){\r\n\tvar map_to = scheduler._get_section_property();\r\n\tif (first[map_to] == second[map_to] && first.id != second.id)\r\n\t\treturn true;\r\n\treturn false;\r\n};\r\n\r\nscheduler.checkCollision = function(ev) {\r\n\tvar evs = [];\r\n\tvar collision_limit = scheduler.config.collision_limit;\r\n\r\n\tif (ev.rrule || ev.rec_type) {\r\n\t\tvar evs_dates = scheduler.getRecDates(ev);\r\n\t\tfor(var k=0; k= collision_limit) {\r\n\r\n\t\t\tsingle = false;\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tif ( evs.length >= collision_limit )\r\n\t\t\tsingle = false;\r\n\t}\r\n\tif (!single) {\r\n\t\tvar res = !scheduler.callEvent(\"onEventCollision\",[ev,evs]);\r\n\t\tif (!res) {\r\n\t\t\tev[map_to] = temp_section||ev[map_to]; // from _setTempSection for custom views\r\n\t\t}\r\n\t\treturn res;\r\n\t}\r\n\treturn single;\r\n\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.config.container_autoresize = true;\r\n\tscheduler.config.month_day_min_height = 90;\r\n\tscheduler.config.min_grid_size = 25;\r\n\tscheduler.config.min_map_size = 400;\r\n\r\n\tvar old_pre_render_event = scheduler._pre_render_events;\r\n\r\n\t//need for temporary disabling without modifying public config\r\n\tvar active = true;\r\n\tvar total_height = 0;\r\n\tvar multiday_height = 0;\r\n\r\n\tscheduler._pre_render_events = function(evs, hold) {\r\n\t\tif (!(scheduler.config.container_autoresize && active)) {\r\n\t\t\treturn old_pre_render_event.apply(this, arguments);\r\n\t\t}\r\n\r\n\t\tvar hb = this.xy.bar_height;\r\n\t\tvar h_old = this._colsS.heights;\r\n\t\tvar h = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0];\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tif (!this._table_view)\r\n\t\t\tevs = this._pre_render_events_line(evs, hold); //ignore long events for now\r\n\t\telse\r\n\t\t\tevs = this._pre_render_events_table(evs, hold);\r\n\r\n\t\tif (this._table_view) {\r\n\t\t\tif (hold){\r\n\t\t\t\tthis._colsS.heights = h_old;\r\n\t\t\t} else {\r\n\t\t\t\tvar evl = data.firstChild;\r\n\t\t\t\tconst rows = evl.querySelectorAll(\".dhx_cal_month_row\");\r\n\t\t\t\tif (rows && rows.length) {\r\n\t\t\t\t\tfor (var i = 0; i < rows.length; i++) {\r\n\t\t\t\t\t\th[i]++;\r\n\r\n\t\t\t\t\t\tif ((h[i]) * hb > this._colsS.height - this.xy.month_head_height) { // 22 - height of cell's header\r\n\t\t\t\t\t\t\t//we have overflow, update heights\r\n\t\t\t\t\t\t\tvar cells = rows[i].querySelectorAll(\".dhx_cal_month_cell\");\r\n\r\n\t\t\t\t\t\t\tvar cHeight = this._colsS.height - this.xy.month_head_height;\r\n\t\t\t\t\t\t\tif(this.config.max_month_events*1 !== this.config.max_month_events || h[i] <= this.config.max_month_events){\r\n\t\t\t\t\t\t\t\tcHeight = h[i] * hb;\r\n\t\t\t\t\t\t\t}else if( (this.config.max_month_events + 1) * hb > this._colsS.height - this.xy.month_head_height){\r\n\t\t\t\t\t\t\t\tcHeight = (this.config.max_month_events + 1) * hb;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\trows[i].style.height = (cHeight + this.xy.month_head_height) + \"px\";\r\n\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\tfor (var j = 0; j < cells.length; j++) {\r\n\t\t\t\t\t\t\t\tcells[j].childNodes[1].style.height = cHeight + \"px\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\th[i] = (h[i - 1] || 0) + cells[0].offsetHeight;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\th[i] = (h[i - 1] || 0) + rows[i].querySelectorAll(\".dhx_cal_month_cell\")[0].offsetHeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t\th.unshift(0);\r\n\t\t\t\t\tif (evl.parentNode.offsetHeight < evl.parentNode.scrollHeight && !evl._h_fix) {\r\n\t\t\t\t\t\t//we have v-scroll, decrease last day cell\r\n\r\n\t\t\t\t\t\t// NO CHECK SHOULD BE MADE ON VERTICAL SCROLL\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!evs.length && this._els[\"dhx_multi_day\"][0].style.visibility == \"visible\")\r\n\t\t\t\t\t\th[0] = -1;\r\n\t\t\t\t\tif (evs.length || h[0] == -1) {\r\n\t\t\t\t\t\t//shift days to have space for multiday events\r\n\t\t\t\t\t\t//var childs = evl.parentNode.childNodes;\r\n\t\t\t\t\t\tvar dh = ((h[0] + 1) * hb + 1); // +1 so multiday events would have 2px from top and 2px from bottom by default\r\n\t\t\t\t\t\tif(multiday_height != dh + 1) {\r\n\t\t\t\t\t\t\tthis._obj.style.height = (total_height - multiday_height + dh - 1) + \"px\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tdh += \"px\";\r\n\t\t\t\t\t\tconst navHeight = this._els[\"dhx_cal_navline\"][0].offsetHeight;\r\n\t\t\t\t\t\tconst headerHeight = this._els[\"dhx_cal_header\"][0].offsetHeight;\r\n\t\t\t\t\t\tdata.style.height = (this._obj.offsetHeight - navHeight - headerHeight - (this.xy.margin_top || 0)) + 'px';\r\n\t\t\t\t\t\tvar last = this._els[\"dhx_multi_day\"][0];\r\n\t\t\t\t\t\tlast.style.height = dh;\r\n\t\t\t\t\t\tlast.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\t\tlast.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\t\t\t\t\t\tlast = this._els[\"dhx_multi_day\"][1];\r\n\t\t\t\t\t\tlast.style.height = dh;\r\n\t\t\t\t\t\tlast.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\t\tlast.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\r\n\t\t\t\t\t\tlast.className = h[0] ? \"dhx_multi_day_icon\" : \"dhx_multi_day_icon_small\";\r\n\t\t\t\t\t\tthis._dy_shift = (h[0] + 1) * hb;\r\n\t\t\t\t\t\th[0] = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn evs;\r\n\t};\r\n\r\n\tvar checked_divs = [\"dhx_cal_navline\", \"dhx_cal_header\", \"dhx_multi_day\", \"dhx_cal_data\"];\r\n\tvar updateContainterHeight = function(is_repaint) {\r\n\t\ttotal_height = 0;\r\n\t\tfor (var i = 0; i < checked_divs.length; i++) {\r\n\r\n\t\t\tvar className = checked_divs[i];\r\n\t\t\tvar checked_div = (scheduler._els[className]) ? scheduler._els[className][0] : null;\r\n\t\t\tvar height = 0;\r\n\t\t\tswitch (className) {\r\n\t\t\t\tcase \"dhx_cal_navline\":\r\n\t\t\t\tcase \"dhx_cal_header\":\r\n\t\t\t\t\theight = checked_div.offsetHeight;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"dhx_multi_day\":\r\n\t\t\t\t\theight = (checked_div) ? checked_div.offsetHeight - 1 : 0;\r\n\t\t\t\t\tmultiday_height = height;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"dhx_cal_data\":\r\n\t\t\t\t\tvar mode = scheduler.getState().mode;\r\n\r\n\t\t\t\t\tif(checked_div.childNodes[1] && mode != \"month\") {\r\n\t\t\t\t\t\tlet maxHeight = 0;\r\n\t\t\t\t\t\tfor(let i = 0; i < checked_div.childNodes.length; i++){\r\n\t\t\t\t\t\t\tif(checked_div.childNodes[i].offsetHeight > maxHeight){\r\n\t\t\t\t\t\t\t\tmaxHeight = checked_div.childNodes[i].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\theight = maxHeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\theight = Math.max(checked_div.offsetHeight - 1, checked_div.scrollHeight);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (mode == \"month\") {\r\n\t\t\t\t\t\tif (scheduler.config.month_day_min_height && !is_repaint) {\r\n\t\t\t\t\t\t\tvar rows_length = checked_div.querySelectorAll(\".dhx_cal_month_row\").length;\r\n\t\t\t\t\t\t\theight = rows_length * scheduler.config.month_day_min_height;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (is_repaint) {\r\n\t\t\t\t\t\t\tchecked_div.style.height = height + \"px\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (mode == \"year\"){\r\n\t\t\t\t\t\theight = 190 * scheduler.config.year_y;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(mode == \"agenda\"){\r\n\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\tif(checked_div.childNodes && checked_div.childNodes.length){\r\n\t\t\t\t\t\t\tfor(var j = 0; j < checked_div.childNodes.length; j++){\r\n\t\t\t\t\t\t\t\theight += checked_div.childNodes[j].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(height + 2 < scheduler.config.min_grid_size){\r\n\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (mode == \"week_agenda\"){\r\n\t\t\t\t\t\tvar min_height = scheduler.xy.week_agenda_scale_height + scheduler.config.min_grid_size,\r\n\t\t\t\t\t\t\tcur_height;\r\n\r\n\t\t\t\t\t\tvar column;\r\n\t\t\t\t\t\tfor(var k = 0; k < checked_div.childNodes.length; k++){\r\n\t\t\t\t\t\t\tcolumn = checked_div.childNodes[k];\r\n\t\t\t\t\t\t\tfor(var j = 0; j < column.childNodes.length; j++) {\r\n\t\t\t\t\t\t\t\tvar innerHeight = 0,\r\n\t\t\t\t\t\t\t\t\teventsContainer = column.childNodes[j].childNodes[1];\r\n\r\n\t\t\t\t\t\t\t\tfor(var g =0; g < eventsContainer.childNodes.length; g++){\r\n\t\t\t\t\t\t\t\t\tinnerHeight += eventsContainer.childNodes[g].offsetHeight;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tcur_height = innerHeight + scheduler.xy.week_agenda_scale_height;\r\n\t\t\t\t\t\t\t\tcur_height = (k == 1 && (j == 2 || j == 3)) ? cur_height * 2 : cur_height; // for last two cells;\r\n\r\n\t\t\t\t\t\t\t\tif (cur_height > min_height) {\r\n\t\t\t\t\t\t\t\t\tmin_height = cur_height;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\theight = min_height * 3;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(mode == \"map\") {\r\n\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\tvar evs = checked_div.querySelectorAll(\".dhx_map_line\");\r\n\r\n\t\t\t\t\t\tfor (var j = 0; j < evs.length; j++) {\r\n\t\t\t\t\t\t\theight += evs[j].offsetHeight;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (height + 2 < scheduler.config.min_map_size) {\r\n\t\t\t\t\t\t\theight = scheduler.config.min_map_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(scheduler._gridView) {\r\n\t\t\t\t\t\theight = 0;\r\n\r\n\t\t\t\t\t\tif (checked_div.childNodes[1].childNodes[0].childNodes && checked_div.childNodes[1].childNodes[0].childNodes.length) {\r\n\t\t\t\t\t\t\tvar evs = checked_div.childNodes[1].childNodes[0].childNodes[0].childNodes;\r\n\r\n\t\t\t\t\t\t\tfor (var j = 0; j < evs.length; j++) {\r\n\t\t\t\t\t\t\t\theight += evs[j].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\theight += 2;\r\n\r\n\t\t\t\t\t\t\tif(height < scheduler.config.min_grid_size){\r\n\t\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (scheduler.matrix && scheduler.matrix[mode]) {\r\n\t\t\t\t\t\tif (is_repaint) {\r\n\t\t\t\t\t\t\theight += 0;\r\n\t\t\t\t\t\t\tchecked_div.style.height = height + \"px\";\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\t\tvar cfg = scheduler.matrix[mode];\r\n\t\t\t\t\t\t\tvar rows = cfg.y_unit;\r\n\t\t\t\t\t\t\tfor(var r=0; r < rows.length; r++){\r\n\t\t\t\t\t\t\t\theight += cfg.getSectionHeight(rows[r].key);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// Check and add extra height to avoid events hiding by the horizontal scrollbar\r\n\t\t\t\t\t\t\tif(scheduler.$container.clientWidth != scheduler.$container.scrollWidth){\r\n\t\t\t\t\t\t\t\theight += getScrollSize();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\theight -= 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (mode == \"day\" || mode == \"week\" || (scheduler._props && scheduler._props[mode])) {\r\n\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\theight += 1;\r\n\t\t\ttotal_height += height;\r\n\t\t}\r\n\t\tscheduler._obj.style.height = (total_height) + \"px\";\r\n\r\n\t\tif (!is_repaint)\r\n\t\t\tscheduler.updateView();\r\n\t};\r\n\r\n\tfunction callUpdate(){\r\n\t\tactive = false;\r\n\t\tscheduler.callEvent(\"onAfterSchedulerResize\", []);\r\n\t\tactive = true;\r\n\t}\r\n\r\n\tvar conditionalUpdateContainerHeight = function() {\r\n\t\tif(!(scheduler.config.container_autoresize && active))\r\n\t\t\treturn true;\r\n\r\n\t\tvar mode = scheduler.getState().mode;\r\n\r\n\t\tif(!mode) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tvar asyncRepaint = window.requestAnimationFrame || window.setTimeout;\r\n\t\tvar scrollTop = document.documentElement.scrollTop;\r\n\r\n\t\tasyncRepaint(function() {\r\n\t\t\tif(scheduler.$destroyed || !scheduler.$initialized){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tupdateContainterHeight();\r\n\t\t});\r\n\r\n\t\tif ( (scheduler.matrix && scheduler.matrix[mode]) || mode == \"month\") {\r\n\t\t\tasyncRepaint(function() {\r\n\t\t\t\tif(scheduler.$destroyed || !scheduler.$initialized){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tupdateContainterHeight(true);\r\n\t\t\t\tdocument.documentElement.scrollTop = scrollTop;\r\n\t\t\t\tcallUpdate();\r\n\t\t\t}, 1);\r\n\t\t}else{\r\n\t\t\tcallUpdate();\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function(){\r\n\t\tvar autosizeEnabled = scheduler.config.container_autoresize;\r\n\t\tif(!scheduler.xy.$original_scroll_width){\r\n\t\t\tscheduler.xy.$original_scroll_width = scheduler.xy.scroll_width;\r\n\t\t}\r\n\r\n\t\tscheduler.xy.scroll_width = autosizeEnabled ? 0 : scheduler.xy.$original_scroll_width;\r\n\r\n\t\tif(scheduler.matrix){\r\n\t\t\tfor(var i in scheduler.matrix){\r\n\t\t\t\tvar timeline = scheduler.matrix[i];\r\n\t\t\t\tif(!timeline.$original_section_autoheight){\r\n\t\t\t\t\ttimeline.$original_section_autoheight = timeline.section_autoheight;\r\n\t\t\t\t}\r\n\t\t\t\tif(autosizeEnabled){\r\n\t\t\t\t\ttimeline.section_autoheight = false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\ttimeline.section_autoheight = timeline.$original_section_autoheight;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onXLE\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventChanged\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventCreated\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventAdded\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventDeleted\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onAfterSchedulerResize\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onClearAll\", conditionalUpdateContainerHeight);\r\n\r\n\t//disable container autoresize when expanded\r\n\tscheduler.attachEvent(\"onBeforeExpand\", function(){\r\n\t\tactive = false;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeCollapse\", function(){\r\n\t\tactive = true;\r\n\t\treturn true;\r\n\t});\r\n\t// helper function\r\n\tfunction getScrollSize() {\r\n\t\tvar div = document.createElement(\"div\");\r\n\t\tdiv.style.cssText = \"visibility:hidden;position:absolute;left:-1000px;width:100px;padding:0px;margin:0px;height:110px;min-height:100px;overflow-y:scroll;\";\r\n\r\n\t\tdocument.body.appendChild(div);\r\n\t\tvar size = div.offsetWidth - div.clientWidth;\r\n\t\tdocument.body.removeChild(div);\r\n\t\treturn size;\r\n\t}\r\n\r\n\r\n}","export default function(scheduler){\r\n\tfunction setCookie(name,cookie_param,value) {\r\n\t\tvar str = name + \"=\" + value + (cookie_param?(\"; \"+cookie_param):\"\");\r\n\t\tdocument.cookie = str;\r\n\t}\r\n\tfunction getCookie(name) {\r\n\t\tvar search = name + \"=\";\r\n\t\tif (document.cookie.length > 0) {\r\n\t\t\tvar offset = document.cookie.indexOf(search);\r\n\t\t\tif (offset != -1) {\r\n\t\t\t\toffset += search.length;\r\n\t\t\t\tvar end = document.cookie.indexOf(\";\", offset);\r\n\t\t\t\tif (end == -1)\r\n\t\t\t\t\tend = document.cookie.length;\r\n\t\t\t\treturn document.cookie.substring(offset, end);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}\r\n\r\n\tfunction getCookieName(scheduler) {\r\n\t\treturn (scheduler._obj.id || \"scheduler\") + \"_settings\";\r\n\t}\r\n\r\n\tvar first = true;\r\n\tscheduler.attachEvent(\"onBeforeViewChange\",function(oldMode,oldDate,mode,date){\r\n\t\t// if Url plugin is enabled - explicit url values should have more priority than cookies\r\n\t\tif (first && scheduler._get_url_nav){\r\n\t\t\tvar urlNavigationPlugin = scheduler._get_url_nav();\r\n\t\t\tif(urlNavigationPlugin.date || urlNavigationPlugin.mode || urlNavigationPlugin.event){\r\n\t\t\t\tfirst = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar cookie = getCookieName(scheduler);\r\n\r\n\t\tif (first){\r\n\t\t\tfirst = false;\r\n\t\t\tvar schedulerCookie = getCookie(cookie);\r\n\t\t\tif (schedulerCookie){\r\n\r\n\t\t\t\tif(!scheduler._min_date){\r\n\t\t\t\t\t//otherwise scheduler will have incorrect date until timeout\r\n\t\t\t\t\t//it can cause js error with 'onMouseMove' handler of key_nav.js\r\n\t\t\t\t\tscheduler._min_date = date;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tschedulerCookie = unescape(schedulerCookie).split(\"@\");\r\n\t\t\t\tschedulerCookie[0] = this._helpers.parseDate(schedulerCookie[0]);\r\n\t\t\t\tvar view = this.isViewExists(schedulerCookie[1]) ? schedulerCookie[1] : mode,\r\n\t\t\t\t\tdate = !isNaN(+schedulerCookie[0]) ? schedulerCookie[0] : date;\r\n\r\n\t\t\t\twindow.setTimeout(function(){\r\n\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tscheduler.setCurrentView(date,view);\r\n\t\t\t\t},1);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", function (newMode , newDate){\r\n\t\tvar cookie = getCookieName(scheduler);\r\n\t\tvar text = escape(this._helpers.formatDate(newDate)+\"@\"+(newMode));\r\n\t\tsetCookie(cookie,\"expires=Sun, 31 Jan 9999 22:00:00 GMT\",text);\r\n\t});\r\n\r\n\t// As we are blocking first render above there could be a problem in case of dynamic loading and rendering of visible data in general ('from'/'to' won't be defined)\r\n\tvar old_load = scheduler._load;\r\n\tscheduler._load = function() {\r\n\t\tvar args = arguments;\r\n\r\n\t\tif (!scheduler._date) {\r\n\t\t\tvar that = this;\r\n\t\t\twindow.setTimeout(function() {\r\n\t\t\t\told_load.apply(that, args);\r\n\t\t\t},1);\r\n\t\t} else {\r\n\t\t\told_load.apply(this, args);\r\n\t\t}\r\n\t};\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Day Timeline\", scheduler.assert);\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Drag Between\", scheduler.assert);\r\n}","export default function(scheduler){\r\n/* global dhtmlXCombo */\r\nscheduler.form_blocks['combo']={\r\n\trender:function(sns) {\r\n\t\tif (!sns.cached_options)\r\n\t\t\tsns.cached_options = {};\r\n\t\tvar res = '';\r\n\t\tres += \"
\";\r\n\t\treturn res;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\t(function(){\r\n\t\t\tresetCombo();\r\n\t\t\tvar id = scheduler.attachEvent(\"onAfterLightbox\",function(){\r\n\t\t\t\t// otherwise destructor will never be called after form reset(e.g. in readonly event mode)\r\n\t\t\t\tresetCombo();\r\n\t\t\t\tscheduler.detachEvent(id);\r\n\t\t\t});\r\n\t\t\tfunction resetCombo(){\r\n\t\t\t\tif(node._combo && node._combo.DOMParent) {\r\n\t\t\t\t\tvar combo = node._combo;\r\n\t\t\t\t\tif(combo.unload){\r\n\t\t\t\t\t\tcombo.unload();\r\n\t\t\t\t\t}else if(combo.destructor){\r\n\t\t\t\t\t\tcombo.destructor();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// dhtmlxCombo 4.1.0 bug\r\n\t\t\t\t\tcombo.DOMParent = combo.DOMelem = null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})();\r\n\t\twindow.dhx_globalImgPath = config.image_path||'/';\r\n\t\tnode._combo = new dhtmlXCombo(node, config.name, node.offsetWidth-8);\r\n\t\tif (config.onchange)\r\n\t\t\tnode._combo.attachEvent(\"onChange\", config.onchange);\r\n\r\n\t\tif (config.options_height)\r\n\t\t\tnode._combo.setOptionHeight(config.options_height);\r\n\t\tvar combo = node._combo;\r\n\t\tcombo.enableFilteringMode(config.filtering, config.script_path||null, !!config.cache);\r\n\r\n\t\tif (!config.script_path) { // script-side filtration is used\r\n\t\t\tvar all_options = [];\r\n\t\t\tfor (var i = 0; i < config.options.length; i++) {\r\n\t\t\t\tvar option = config.options[i];\r\n\t\t\t\tvar single_option = [\r\n\t\t\t\t\toption.key,\r\n\t\t\t\t\toption.label,\r\n\t\t\t\t\toption.css\r\n\t\t\t\t];\r\n\t\t\t\tall_options.push(single_option);\r\n\t\t\t}\r\n\t\t\tcombo.addOption(all_options);\r\n\t\t\tif (ev[config.map_to]) {\r\n\t\t\t\tvar index = combo.getIndexByValue(ev[config.map_to]);\r\n\t\t\t\tcombo.selectOption(index);\r\n\t\t\t}\r\n\t\t} else { // server-side filtration is used\r\n\t\t\tvar selected_id = ev[config.map_to];\r\n\t\t\tif (selected_id) {\r\n\t\t\t\tif (config.cached_options[selected_id]) {\r\n\t\t\t\t\tcombo.addOption(selected_id, config.cached_options[selected_id]);\r\n\t\t\t\t\tcombo.disable(1);\r\n\t\t\t\t\tcombo.selectOption(0);\r\n\t\t\t\t\tcombo.disable(0);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tscheduler.ajax.get(config.script_path+\"?id=\"+selected_id+\"&uid=\"+scheduler.uid(), function(result){\r\n\t\t\t\t\t\tvar responseText = result.xmlDoc.responseText;\r\n\t\t\t\t\t\tvar label;\r\n\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\tvar res = JSON.parse(responseText);\r\n\t\t\t\t\t\t\tlabel = res.options[0].text;\r\n\t\t\t\t\t\t}catch(e){\r\n\t\t\t\t\t\t\tvar option = scheduler.ajax.xpath(\"//option\", result.xmlDoc)[0];\r\n\t\t\t\t\t\t\tlabel = option.childNodes[0].nodeValue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tconfig.cached_options[selected_id] = label;\r\n\t\t\t\t\t\tcombo.addOption(selected_id, label);\r\n\t\t\t\t\t\tcombo.disable(1);\r\n\t\t\t\t\t\tcombo.selectOption(0);\r\n\t\t\t\t\t\tcombo.disable(0);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tcombo.setComboValue(\"\");\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config) {\r\n\t\tvar selected_id = node._combo.getSelectedValue(); // value = key\r\n\t\tif (config.script_path) {\r\n\t\t\tconfig.cached_options[selected_id] = node._combo.getSelectedText();\r\n\t\t}\r\n\t\treturn selected_id;\r\n\t},\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\nscheduler.form_blocks['radio']={\r\n\trender:function(sns) {\r\n\t\tvar res = '';\r\n\t\tres += `
`;\r\n\t\tfor (var i=0; i\"+\" \"+sns.options[i].label+\"\";\r\n\t\t}\r\n\t\tres += \"
\";\r\n\r\n\t\treturn res;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\tvar radiobuttons = node.getElementsByTagName('input');\r\n\t\tfor (var i = 0; i < radiobuttons.length; i++) {\r\n\t\t\tradiobuttons[i].checked = false;\r\n\t\t\tvar checked_value = ev[config.map_to]||value;\r\n\t\t\tif (radiobuttons[i].value == checked_value) {\r\n\t\t\t\tradiobuttons[i].checked = true;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tvar radiobuttons = node.getElementsByTagName('input');\r\n\t\tfor(var i=0; i
';\r\n\t\telse\r\n\t\t\treturn '';\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\tnode=scheduler._lightbox.querySelector(`#${config.id}`);\r\n\t\tvar id = scheduler.uid();\r\n\t\tvar isChecked = (typeof config.checked_value != \"undefined\") ? value == config.checked_value : !!value;\r\n\t\tnode.className += \" dhx_cal_checkbox\";\r\n\t\tvar check_html = \"\";\r\n\t\tvar label_html = \"\";\r\n\t\tif (scheduler.config.wide_form){\r\n\t\t\tnode.innerHTML = label_html;\r\n\t\t\tnode.nextSibling.innerHTML=check_html;\r\n\t\t} else\r\n\t\t\tnode.innerHTML=check_html+label_html;\r\n\r\n\t\tif (config.handler) {\r\n\t\t\tvar checkbox = node.getElementsByTagName('input')[0];\r\n\t\t\tif(checkbox.$_eventAttached){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tcheckbox.$_eventAttached = true;\r\n\t\t\tscheduler.event(checkbox, \"click\", config.handler);\r\n\t\t\t//checkbox.onclick = config.handler;\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tnode=scheduler._lightbox.querySelector(`#${config.id}`);\r\n\t\tvar checkbox = node.getElementsByTagName('input')[0]; // moved to the header\r\n\t\tif (!checkbox)\r\n\t\t\tcheckbox = node.nextSibling.getElementsByTagName('input')[0];\r\n\t\treturn (checkbox.checked)?(config.checked_value||true):(config.unchecked_value||false);\r\n\t},\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.ext.fullscreen = {\r\n\ttoggleIcon: null\r\n};\r\n\r\nscheduler.expand = function() {\r\n\tif(!scheduler.callEvent(\"onBeforeExpand\", []))\r\n\t\treturn;\r\n\tvar t = scheduler._obj;\r\n\tdo {\r\n\t\tt._position = t.style.position || \"\";\r\n\t\tt.style.position = \"static\";\r\n\t} while ((t = t.parentNode) && t.style);\r\n\tt = scheduler._obj;\r\n\tt.style.position = \"absolute\";\r\n\tt._width = t.style.width;\r\n\tt._height = t.style.height;\r\n\tt.style.width = t.style.height = \"100%\";\r\n\tt.style.top = t.style.left = \"0px\";\r\n\r\n\tvar top = document.body;\r\n\ttop.scrollTop = 0;\r\n\r\n\ttop = top.parentNode;\r\n\tif (top)\r\n\t\ttop.scrollTop = 0;\r\n\tdocument.body._overflow = document.body.style.overflow || \"\";\r\n\tdocument.body.style.overflow = \"hidden\";\r\n\tscheduler._maximize();\r\n\tscheduler.callEvent(\"onExpand\", []);\r\n};\r\nscheduler.collapse = function() {\r\n\tif(!scheduler.callEvent(\"onBeforeCollapse\", []))\r\n\t\treturn;\r\n\tvar t = scheduler._obj;\r\n\tdo {\r\n\t\tt.style.position = t._position;\r\n\t} while ((t = t.parentNode) && t.style);\r\n\tt = scheduler._obj;\r\n\tt.style.width = t._width;\r\n\tt.style.height = t._height;\r\n\tdocument.body.style.overflow = document.body._overflow;\r\n\tscheduler._maximize();\r\n\tscheduler.callEvent(\"onCollapse\", []);\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar t = document.createElement(\"div\");\r\n\tt.className = \"dhx_expand_icon\";\r\n\tscheduler.ext.fullscreen.toggleIcon = t;\r\n\tt.innerHTML = `\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t`;\r\n\tscheduler._obj.appendChild(t);\r\n\tscheduler.event(t, \"click\", function() {\r\n\t\tif (!scheduler.expanded)\r\n\t\t\tscheduler.expand(); else\r\n\t\t\tscheduler.collapse();\r\n\t});\r\n});\r\nscheduler._maximize = function() {\r\n\tthis.expanded = !this.expanded;\r\n\tif(this.expanded){\r\n\t\tthis.ext.fullscreen.toggleIcon.classList.add(\"dhx_expand_icon--expanded\");\r\n\t\t\r\n\t}else{\r\n\t\tthis.ext.fullscreen.toggleIcon.classList.remove(\"dhx_expand_icon--expanded\");\r\n\t}\r\n\t\r\n\t//scheduler.ext.fullscreen.toggleIcon.style.backgroundPosition = \"0 \" + (this.expanded ? \"0\" : \"18\") + \"px\";\r\n\r\n\tvar directions = ['left', 'top'];\r\n\tfor (var i = 0; i < directions.length; i++) {\r\n\t\t//var margin = scheduler.xy['margin_' + directions[i]];\r\n\t\tvar prev_margin = scheduler['_prev_margin_' + directions[i]];\r\n\t\tif (scheduler.xy['margin_' + directions[i]]) {\r\n\t\t\tscheduler['_prev_margin_' + directions[i]] = scheduler.xy['margin_' + directions[i]];\r\n\t\t\tscheduler.xy['margin_' + directions[i]] = 0;\r\n\t\t} else {\r\n\t\t\tif (prev_margin) {\r\n\t\t\t\tscheduler.xy['margin_' + directions[i]] = scheduler['_prev_margin_' + directions[i]];\r\n\t\t\t\tdelete scheduler['_prev_margin_' + directions[i]];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.setCurrentView();\r\n};\r\n\r\n\r\n}\r\n","export default function(scheduler){\r\n\r\n\r\n(function(){\r\n\r\nfunction defaults(obj, std){\r\n\tfor (var key in std)\r\n\t\tif (!obj[key])\r\n\t\t\tobj[key] = std[key];\r\n\treturn obj;\r\n}\r\n\r\nfunction getElementSizes(element, scheduler) {\r\n\tvar sizes = {};\r\n\telement = scheduler._els[element];\r\n\tif (element && element[0]) {\r\n\t\tsizes.x = element[0].scrollWidth;\r\n\t\tsizes.y = element[0].scrollHeight;\r\n\t} else {\r\n\t\tsizes.x = 0;\r\n\t\tsizes.y = 0;\r\n\t}\r\n\treturn sizes;\r\n}\r\n\r\n//compatibility for new versions of scheduler\r\nif(!window.dhtmlxAjax){\r\n\twindow.dhtmlxAjax = {\r\n\t\tpost: function(url, data, callback){\r\n\t\t\treturn window.dhx4.ajax.post(url, data, callback);\r\n\t\t},\r\n\t\tget: function(url, callback){\r\n\t\t\treturn window.ajax.get(url, callback);\r\n\t\t}\r\n\t};\r\n}\r\n\r\nfunction add_export_methods(scheduler){\r\n\r\n\tscheduler.exportToPDF = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.pdf\",\r\n\t\t\tformat:\"A4\",\r\n\t\t\torientation:\"landscape\",\r\n\t\t\tdpi:96,\r\n\t\t\tzoom:1,\r\n\t\t\trtl: scheduler.config.rtl\r\n\t\t});\r\n\t\tconfig.html = this._export_html(config);\r\n\t\tconfig.mode = this.getState().mode;\r\n\t\tthis._send_to_export(config, \"pdf\");\r\n\t};\r\n\r\n\tscheduler.exportToPNG = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.png\",\r\n\t\t\tformat:\"A4\",\r\n\t\t\torientation:\"landscape\",\r\n\t\t\tdpi:96,\r\n\t\t\tzoom:1,\r\n\t\t\trtl: scheduler.config.rtl\r\n\t\t});\r\n\t\tconfig.html = this._export_html(config);\r\n\t\tconfig.mode = this.getState().mode;\r\n\t\tthis._send_to_export(config, \"png\");\r\n\t};\r\n\r\n\tscheduler.exportToICal = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.ical\",\r\n\t\t\tdata:this._serialize_plain(null, config)\r\n\t\t});\r\n\t\tthis._send_to_export(config, \"ical\");\r\n\t};\r\n\r\n\tscheduler.exportToExcel = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.xlsx\",\r\n\t\t\ttitle:\"Events\",\r\n\t\t\tdata:this._serialize_plain( this.templates.xml_format, config),\r\n\t\t\tcolumns:this._serialize_columns()\r\n\t\t});\r\n\t\tthis._send_to_export(config, \"excel\");\r\n\t};\r\n\r\n\tscheduler._ajax_to_export = function(data, type, callback){\r\n\t\tdelete data.callback;\r\n\t\tvar url = data.server || \"https://export.dhtmlx.com/scheduler\";\r\n\r\n\t\twindow.dhtmlxAjax.post(url,\r\n\t\t\t\"type=\"+type+\"&store=1&data=\"+encodeURIComponent(JSON.stringify(data)),\r\n\t\t\tfunction(loader){\r\n\t\t\t\tvar fail = loader.xmlDoc.status > 400;\r\n\t\t\t\tvar info = null;\r\n\r\n\t\t\t\tif (!fail){\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\tinfo = JSON.parse(loader.xmlDoc.responseText);\r\n\t\t\t\t\t}catch(e){}\r\n\t\t\t\t}\r\n\t\t\t\tcallback(info);\r\n\t\t\t}\r\n\t\t);\r\n\t};\r\n\r\n\tscheduler._plain_export_copy = function(source, format){\r\n\t\tvar target = {};\r\n\t\tfor (var key in source)\r\n\t\t\ttarget[key] = source[key];\r\n\r\n\t\ttarget.start_date = format(target.start_date);\r\n\t\ttarget.end_date = format(target.end_date);\r\n\t\ttarget.$text = this.templates.event_text(source.start_date, source.end_date, source);\r\n\r\n\t\treturn target;\r\n\t};\r\n\r\n\tscheduler._serialize_plain = function(format, config){\r\n\t\tformat = format || scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\", true);\r\n\r\n\t\tvar events;\r\n\t\tif (config && config.start && config.end)\r\n\t\t\tevents = scheduler.getEvents(config.start, config.end);\r\n\t\telse\r\n\t\t\tevents = scheduler.getEvents();\r\n\r\n\t\tvar data = [];\r\n\t\tfor (var i = 0; i< events.length; i++)\r\n\t\t\tdata[i] = this._plain_export_copy(events[i], format);\r\n\r\n\t\treturn data;\r\n\t};\r\n\r\n\tscheduler._serialize_columns = function(){\r\n\t\treturn [\r\n\t\t\t{ id:\"start_date\", header:\"Start Date\", width:30 },\r\n\t\t\t{ id:\"end_date\", header:\"End Date\", width:30 },\r\n\t\t\t{ id:\"$text\", header:\"Text\", width:100 }\r\n\t\t];\r\n\t};\r\n\r\n\tscheduler._send_to_export = function(data, type){\r\n\t\tif(!data.version){\r\n\t\t\tdata.version = scheduler.version;\r\n\t\t}\r\n\r\n\t\tif(!data.skin){\r\n\t\t\tdata.skin = scheduler.skin;\r\n\t\t}\r\n\r\n\t\tif (data.callback)\r\n\t\t\t\treturn scheduler._ajax_to_export(data, type, data.callback);\r\n\r\n\t\tvar form = this._create_hidden_form();\r\n\r\n\t\tform.firstChild.action = data.server || \"https://export.dhtmlx.com/scheduler\";\r\n\t\tform.firstChild.childNodes[0].value = JSON.stringify(data);\r\n\t\tform.firstChild.childNodes[1].value = type;\r\n\t\tform.firstChild.submit();\r\n\t};\r\n\r\n\tscheduler._create_hidden_form = function(){\r\n\t\tif (!this._hidden_export_form){\r\n\t\t\tvar t = this._hidden_export_form = document.createElement(\"div\");\r\n\t\t\tt.style.display = \"none\";\r\n\t\t\tt.innerHTML = \"
\";\r\n\t\t\tdocument.body.appendChild(t);\r\n\t\t}\r\n\t\treturn this._hidden_export_form;\r\n\t};\r\n\r\n\tscheduler._get_export_size = function(format, orientation, zoom, dpi, header, footer, scales) {\r\n\r\n\t\tdpi = parseInt(dpi)/25.4 || 4;\r\n\r\n\t\tvar sizes = {\r\n\t\t\t\"A5\":{ x:148, y:210 },\r\n\t\t\t\"A4\":{ x:210, y:297 },\r\n\t\t\t\"A3\":{ x:297, y:420 },\r\n\t\t\t\"A2\":{ x:420, y:594 },\r\n\t\t\t\"A1\":{ x:594, y:841 },\r\n\t\t\t\"A0\":{ x:841, y:1189 }\r\n\t\t};\r\n\r\n\t\tvar dataX = getElementSizes(\"dhx_cal_data\", this).x;\r\n\t\tvar dataY = getElementSizes(\"dhx_cal_data\", this).y;\r\n\t\tvar headY = getElementSizes(\"dhx_cal_header\", this).y;\r\n\t\tvar multY = getElementSizes(\"dhx_multi_day\", this).y;\r\n\r\n\t\tvar cSize = {\r\n\t\t\ty: dataY + headY + multY\r\n\t\t};\r\n\r\n\t\tif (format === \"full\") {\r\n\t\t\tcSize.x = dataX;\r\n\t\t} else {\r\n\t\t\tcSize.x = Math.floor( (orientation === \"landscape\" ? sizes[format].y : sizes[format].x) * dpi );\r\n\t\t}\r\n\r\n\t\tif (scales) {\r\n\t\t\tcSize.x *= (parseFloat(scales.x) || 1);\r\n\t\t\tcSize.y *= (parseFloat(scales.y) || 1);\r\n\t\t}\r\n\r\n\t\treturn cSize;\r\n\t};\r\n\r\n\tfunction getTimeline() {\r\n\t\tvar mode = scheduler.getState().mode;\r\n\t\tif (scheduler.matrix && scheduler.matrix[mode]) {\r\n\t\t\treturn scheduler.matrix[mode];\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\r\n\tfunction getInitialSizes() {\r\n\t\tvar smartRendering = undefined,\r\n\t\t\tscrollable = undefined;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (timeline) {\r\n\t\t\tscrollable = timeline.scrollable;\r\n\t\t\tsmartRendering = timeline.smart_rendering;\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tnav_height: scheduler.xy.nav_height,\r\n\t\t\tscroll_width: scheduler.xy.scroll_width,\r\n\t\t\tstyle_width: scheduler._obj.style.width,\r\n\t\t\tstyle_height: scheduler._obj.style.height,\r\n\t\t\ttimeline_scrollable: scrollable,\r\n\t\t\ttimeline_smart_rendering: smartRendering\r\n\t\t};\r\n\t}\r\n\r\n\tfunction setExportSizes(size, initialSizes) {\r\n\t\tscheduler._obj.style.width = size.x + \"px\";\r\n\t\tscheduler._obj.style.height = size.y + \"px\";\r\n\r\n\t\tscheduler.xy.nav_height = 0;\r\n\t\tscheduler.xy.scroll_width = 0;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (initialSizes.timeline_scrollable || initialSizes.timeline_smart_rendering) {\r\n\r\n\t\t\ttimeline.scrollable = false;\r\n\t\t\ttimeline.smart_rendering = false;\r\n\t\t}\r\n\t}\r\n\r\n\tfunction setInitialSizes(initialSizes) {\r\n\t\tscheduler.xy.scroll_width = initialSizes.scroll_width;\r\n\t\tscheduler.xy.nav_height = initialSizes.nav_height;\r\n\t\tscheduler._obj.style.width = initialSizes.style_width;\r\n\t\tscheduler._obj.style.height = initialSizes.style_height;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (initialSizes.timeline_scrollable || initialSizes.timeline_smart_rendering) {\r\n\t\t\ttimeline.scrollable = initialSizes.timeline_scrollable;\r\n\t\t\ttimeline.smart_rendering = initialSizes.timeline_smart_rendering;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler._export_html = function (obj) {\r\n\t\tvar initialSizes = getInitialSizes();\r\n\t\tvar size = scheduler._get_export_size(obj.format, obj.orientation, obj.zoom, obj.dpi, obj.header, obj.footer, obj.scales);\r\n\r\n\t\tvar html = \"\";\r\n\t\ttry {\r\n\t\t\tsetExportSizes(size, initialSizes);\r\n\t\t\tscheduler.setCurrentView();\r\n\t\t\thtml = scheduler._obj.innerHTML;\r\n\t\t} catch (e) {\r\n\r\n\t\t\t// eslint-disable-next-line no-console\r\n\t\t\tconsole.error(e);\r\n\t\t} finally {\r\n\t\t\tsetInitialSizes(initialSizes);\r\n\t\t\tscheduler.setCurrentView();\r\n\t\t}\r\n\r\n\t\treturn html;\r\n\t};\r\n\r\n}\r\n\r\nadd_export_methods(scheduler);\r\n\r\n\r\n})();\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Grid\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\tvar els = document.body.getElementsByTagName(\"DIV\");\r\n\tfor (var i=0; i < els.length; i++) {\r\n\t\tvar cs = els[i].className||\"\";\r\n\t\tcs = cs.split(\":\");\r\n\t\tif (cs.length == 2 && cs[0] == \"template\"){\r\n\t\t\tvar code = \"return \\\"\"+(els[i].innerHTML||\"\").replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g,\"\\\\\\\"\").replace(/[\\n\\r]+/g,\"\")+\"\\\";\";\r\n\t\t\tcode = unescape(code).replace(/\\{event\\.([a-z]+)\\}/g,function(all,mask){\r\n\t\t\t\treturn '\"+ev.'+mask+'+\"';\r\n\t\t\t});\r\n\t\t\tscheduler.templates[cs[1]]=Function(\"start\",\"end\",\"ev\",code);\r\n\t\t\tels[i].style.display='none';\r\n\t\t}\r\n\t}\r\n});\r\n\r\n}","import keyboard_shortcuts from \"./keyboard_navigation/common/keyboard_shortcuts\";\r\nimport eventhandler from \"./keyboard_navigation/common/eventhandler\";\r\nimport trap_modal_focus from \"./keyboard_navigation/common/trap_modal_focus\";\r\nimport marker from \"./keyboard_navigation/marker\";\r\nimport scheduler_node from \"./keyboard_navigation/elements/scheduler_node\";\r\nimport nav_node from \"./keyboard_navigation/elements/nav_node\";\r\nimport header_cell from \"./keyboard_navigation/elements/header_cell\";\r\nimport event from \"./keyboard_navigation/elements/event\";\r\nimport time_slot from \"./keyboard_navigation/elements/time_slot\";\r\nimport minical_button from \"./keyboard_navigation/elements/minical_button\";\r\nimport minical_cell from \"./keyboard_navigation/elements/minical_cell\";\r\nimport data_area from \"./keyboard_navigation/elements/data_area\";\r\nimport modals from \"./keyboard_navigation/modals\";\r\nimport core from \"./keyboard_navigation/core\";\r\nimport key_nav_legacy from \"./keyboard_navigation/key_nav_legacy\";\r\n\r\n\r\nimport scheduler_handlers from \"./keyboard_navigation/scheduler_handlers\";\r\nimport minical_handlers from \"./keyboard_navigation/minical_handlers\";\r\n\r\nexport default function(scheduler){\r\n\t\tscheduler.config.key_nav = true;\r\n\t\tscheduler.config.key_nav_step = 30;\r\n\t\tscheduler.addShortcut = function(shortcut, handler, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tscopeObject.prototype.bind(shortcut, handler);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.getShortcutHandler = function(shortcut, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tvar commands = scheduler.$keyboardNavigation.shortcuts.parse(shortcut);\r\n\t\t\t\tif(commands.length){\r\n\t\t\t\t\treturn scopeObject.prototype.findHandler(commands[0]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.removeShortcut = function(shortcut, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tscopeObject.prototype.unbind(shortcut);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.focus = function(){\r\n\t\t\tif(!scheduler.config.key_nav){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar disp = scheduler.$keyboardNavigation.dispatcher;\r\n\t\t\tdisp.enable();\r\n\t\t\tvar activeNode = disp.getActiveNode();\r\n\t\t\tif(!activeNode || activeNode instanceof scheduler.$keyboardNavigation.MinicalButton || activeNode instanceof scheduler.$keyboardNavigation.MinicalCell){\r\n\t\t\t\tdisp.setDefaultNode();\r\n\t\t\t}else{\r\n\t\t\t\tdisp.focusNode(disp.getActiveNode());\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfunction getScope(mode){\r\n\t\t\tvar scopes = {\r\n\t\t\t\t\"minicalButton\":scheduler.$keyboardNavigation.MinicalButton,\r\n\t\t\t\t\"minicalDate\":scheduler.$keyboardNavigation.MinicalCell,\r\n\t\t\t\t\"scheduler\":scheduler.$keyboardNavigation.SchedulerNode,\r\n\t\t\t\t\"dataArea\": scheduler.$keyboardNavigation.DataArea,\r\n\t\t\t\t\"timeSlot\": scheduler.$keyboardNavigation.TimeSlot,\r\n\t\t\t\t\"event\": scheduler.$keyboardNavigation.Event\r\n\t\t\t};\r\n\r\n\t\t\tvar searchMap = {};\r\n\t\t\tfor(var i in scopes)\r\n\t\t\t\tsearchMap[i.toLowerCase()] = scopes[i];\r\n\r\n\t\t\tmode = (mode + \"\").toLowerCase();\r\n\r\n\t\t\treturn searchMap[mode] || scopes.scheduler;\r\n\t\t}\r\n\r\n\t\tscheduler.$keyboardNavigation = {};\r\n\r\n\t\tscheduler._compose = function(){\r\n\t\t\tvar parts = Array.prototype.slice.call(arguments, 0);\r\n\t\t\tvar res = {};\r\n\t\t\tfor(var i = 0; i < parts.length; i++){\r\n\t\t\t\tvar obj = parts[i];\r\n\t\t\t\tif(typeof obj == \"function\"){\r\n\t\t\t\t\tobj = new obj();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor(var p in obj){\r\n\t\t\t\t\tres[p] = obj[p];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\t\t};\r\n\r\n\t\tkeyboard_shortcuts(scheduler);\r\n\t\teventhandler(scheduler);\r\n\t\ttrap_modal_focus(scheduler);\r\n\t\tmarker(scheduler);\r\n\t\tscheduler_node(scheduler);\r\n\t\tnav_node(scheduler);\r\n\t\theader_cell(scheduler);\r\n\t\tevent(scheduler);\r\n\t\ttime_slot(scheduler);\r\n\t\tminical_button(scheduler);\r\n\t\tminical_cell(scheduler);\r\n\t\tdata_area(scheduler);\r\n\t\tmodals(scheduler);\r\n\t\tcore(scheduler);\r\n\t\tkey_nav_legacy(scheduler);\r\n\r\n\t\t(function(){\r\n\t\t\tscheduler_handlers(scheduler);\r\n\t\t\tminical_handlers(scheduler);\r\n\r\n\t\t\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\t\t\tscheduler.$keyboardNavigation.attachSchedulerHandlers();\r\n\r\n\t\t\tif(scheduler.renderCalendar){\r\n\t\t\t\t// if minical ext loaded before key nav ext - patch it now\r\n\t\t\t\tscheduler.$keyboardNavigation.patchMinicalendar();\r\n\t\t\t}else{\r\n\t\t\t\t// otherwise - wait until everything is loaded and try again\r\n\t\t\t\tvar attachOnce = scheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\t\t\t\tscheduler.detachEvent(attachOnce);\r\n\t\t\t\t\tscheduler.$keyboardNavigation.patchMinicalendar();\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\tfunction isSchedulerSelected(){\r\n\t\t\t\tif(!scheduler.config.key_nav) return;\r\n\r\n\t\t\t\tvar enable;\r\n\t\t\t\tvar focusElement = document.activeElement;\r\n\t\t\t\t// halt key nav when focus is outside scheduler or in quick info popup\r\n\t\t\t\tif(!focusElement || scheduler.utils.dom.locateCss(focusElement, \"dhx_cal_quick_info\", false)){\r\n\t\t\t\t\tenable = false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tenable = scheduler.$keyboardNavigation.isChildOf(focusElement, scheduler.$container) || scheduler.$keyboardNavigation.isMinical(focusElement);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn enable;\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\tfunction changeState(enable){\r\n\t\t\t\tif(enable && !dispatcher.isEnabled()){\r\n\t\t\t\t\tdispatcher.enable();\r\n\t\t\t\t}else if(!enable && dispatcher.isEnabled()){\r\n\t\t\t\t\tdispatcher.disable();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tconst intervalId = setInterval(function(){\r\n\t\t\t\tif(!scheduler.$container || !scheduler.$keyboardNavigation.isChildOf(scheduler.$container, document.body)){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar enable = isSchedulerSelected();\r\n\r\n\t\t\t\tif(enable){\r\n\t\t\t\t\tchangeState(enable);\r\n\t\t\t\t}else if(!enable && dispatcher.isEnabled()){\r\n\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// doublecheck in case checking is done in handler before focus element is repainted\r\n\t\t\t\t\t\tif(scheduler.config.key_nav){\r\n\t\t\t\t\t\t\tchangeState(isSchedulerSelected());\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tscheduler.$container.removeAttribute(\"tabindex\");\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}, 100);\r\n\t\t\t\t}\r\n\t\t\t}, 500);\r\n\t\t\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\t\t\tclearInterval(intervalId);\r\n\t\t\t});\r\n\t\t})();\r\n\t}\r\n\r\n\r\n","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.shortcuts = {\r\n\tcreateCommand: function(){\r\n\t\treturn {\r\n\t\t\tmodifiers:{\r\n\t\t\t\t\"shift\": false,\r\n\t\t\t\t\"alt\": false,\r\n\t\t\t\t\"ctrl\": false,\r\n\t\t\t\t\"meta\": false\r\n\t\t\t},\r\n\t\t\tkeyCode: null\r\n\t\t};\r\n\t},\r\n\tparse: function(shortcut){\r\n\t\tvar commands = [];\r\n\r\n\t\tvar expr = this.getExpressions(this.trim(shortcut));\r\n\t\tfor(var i = 0; i < expr.length; i++){\r\n\t\t\tvar words = this.getWords(expr[i]);\r\n\r\n\t\t\tvar command = this.createCommand();\r\n\r\n\t\t\tfor(var j = 0; j < words.length; j++){\r\n\t\t\t\tif(this.commandKeys[words[j]]){\r\n\t\t\t\t\tcommand.modifiers[words[j]] = true;\r\n\t\t\t\t}else if(this.specialKeys[words[j]]){\r\n\t\t\t\t\tcommand.keyCode = this.specialKeys[words[j]];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcommand.keyCode = words[j].charCodeAt(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tcommands.push(command);\r\n\t\t}\r\n\t\treturn commands;\r\n\t},\r\n\r\n\tgetCommandFromEvent: function(domEvent){\r\n\t\tvar command = this.createCommand();\r\n\t\tcommand.modifiers.shift = !!domEvent.shiftKey;\r\n\t\tcommand.modifiers.alt = !!domEvent.altKey;\r\n\t\tcommand.modifiers.ctrl = !!domEvent.ctrlKey;\r\n\t\tcommand.modifiers.meta = !!domEvent.metaKey;\r\n\t\tcommand.keyCode = domEvent.which || domEvent.keyCode;\r\n\r\n\t\tif(command.keyCode >= 96 && command.keyCode <= 105){\r\n\t\t\t// numpad keys 96-105 -> 48-57\r\n\t\t\tcommand.keyCode -= 48;//convert numpad number code to regular number code\r\n\t\t}\r\n\r\n\t\tvar printableKey = String.fromCharCode(command.keyCode );\r\n\t\tif(printableKey){\r\n\t\t\tcommand.keyCode = printableKey.toLowerCase().charCodeAt(0);\r\n\t\t}\r\n\t\treturn command;\r\n\t},\r\n\r\n\tgetHashFromEvent: function(domEvent){\r\n\t\treturn this.getHash(this.getCommandFromEvent(domEvent));\r\n\t},\r\n\r\n\tgetHash: function(command){\r\n\t\tvar parts = [];\r\n\t\tfor(var i in command.modifiers){\r\n\t\t\tif(command.modifiers[i]){\r\n\t\t\t\tparts.push(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tparts.push(command.keyCode);\r\n\r\n\t\treturn parts.join(this.junctionChar);\r\n\t},\r\n\r\n\tgetExpressions: function(shortcut){\r\n\t\treturn shortcut.split(this.junctionChar);\r\n\t},\r\n\tgetWords: function(term){\r\n\t\treturn term.split(this.combinationChar);\r\n\t},\r\n\ttrim: function(shortcut){\r\n\t\treturn shortcut.replace(/\\s/g, \"\");\r\n\t},\r\n\tjunctionChar:\",\",\r\n\tcombinationChar:\"+\",\r\n\tcommandKeys:{\r\n\t\t\"shift\": 16,\r\n\t\t\"alt\": 18,\r\n\t\t\"ctrl\": 17,\r\n\t\t\"meta\": true\r\n\t},\r\n\tspecialKeys:{\r\n\t\t\"backspace\": 8,\r\n\t\t\"tab\": 9,\r\n\t\t\"enter\": 13,\r\n\t\t\"esc\": 27,\r\n\t\t\"space\": 32,\r\n\t\t\"up\": 38,\r\n\t\t\"down\": 40,\r\n\t\t\"left\": 37,\r\n\t\t\"right\": 39,\r\n\t\t\"home\": 36,\r\n\t\t\"end\": 35,\r\n\t\t\"pageup\": 33,\r\n\t\t\"pagedown\": 34,\r\n\t\t\"delete\": 46,\r\n\t\t\"insert\": 45,\r\n\t\t\"plus\":107,\r\n\t\t\"f1\": 112,\r\n\t\t\"f2\": 113,\r\n\t\t\"f3\": 114,\r\n\t\t\"f4\": 115,\r\n\t\t\"f5\": 116,\r\n\t\t\"f6\": 117,\r\n\t\t\"f7\": 118,\r\n\t\t\"f8\": 119,\r\n\t\t\"f9\": 120,\r\n\t\t\"f10\": 121,\r\n\t\t\"f11\": 122,\r\n\t\t\"f12\": 123\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.EventHandler = {\r\n\t_handlers: null,\r\n\tfindHandler: function(command){\r\n\t\tif(!this._handlers) this._handlers = {};\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\t\tvar hash = shortcuts.getHash(command);\r\n\r\n\t\treturn this._handlers[hash];\r\n\t},\r\n\r\n\tdoAction: function(command, e){\r\n\t\tvar handler = this.findHandler(command);\r\n\t\tif(handler){\r\n\t\t\thandler.call(this, e);\r\n\r\n\t\t\tif (e.preventDefault) e.preventDefault();\r\n\t\t\telse e.returnValue = false;\r\n\r\n\t\t}\r\n\t},\r\n\tbind: function(shortcut, handler){\r\n\t\tif(!this._handlers) this._handlers = {};\r\n\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\r\n\t\tvar commands = shortcuts.parse(shortcut);\r\n\t\tfor(var i = 0; i < commands.length; i++){\r\n\t\t\tthis._handlers[shortcuts.getHash(commands[i])] = handler;\r\n\t\t}\r\n\t},\r\n\tunbind: function(shortcut){\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\r\n\t\tvar commands = shortcuts.parse(shortcut);\r\n\t\tfor(var i = 0; i < commands.length; i++){\r\n\t\t\tif(this._handlers[shortcuts.getHash(commands[i])]){\r\n\t\t\t\tdelete this._handlers[shortcuts.getHash(commands[i])];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tbindAll: function(map){\r\n\t\tfor(var i in map){\r\n\t\t\tthis.bind(i, map[i]);\r\n\t\t}\r\n\t},\r\n\tinitKeys: function(){\r\n\t\tif(!this._handlers)\r\n\t\t\tthis._handlers = {};\r\n\t\tif(this.keys){\r\n\t\t\tthis.bindAll(this.keys);\r\n\t\t}\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n(function(){\r\n\tscheduler.$keyboardNavigation.getFocusableNodes = scheduler._getFocusableNodes;\r\n\r\n\tscheduler.$keyboardNavigation.trapFocus = function trapFocus(root, e){\r\n\t\tif(e.keyCode != 9) return false;\r\n\r\n\t\tvar focusable = scheduler.$keyboardNavigation.getFocusableNodes(root);\r\n\t\tvar currentFocus = document.activeElement;\r\n\t\tvar currentIndex = -1;\r\n\t\tfor(var i = 0; i < focusable.length; i++){\r\n\t\t\tif(focusable[i] == currentFocus){\r\n\t\t\t\tcurrentIndex = i;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar nextIndex, nextItem;\r\n\t\tif(e.shiftKey){\r\n\r\n\t\t\t// back tab\r\n\t\t\t// go to the last element if we focused on the first\r\n\t\t\tnextIndex = (currentIndex <= 0) ? (focusable.length - 1) : (currentIndex - 1);\r\n\r\n\t\t\tnextItem = focusable[nextIndex];\r\n\t\t\tif(nextItem){\r\n\t\t\t\tnextItem.focus();\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\t// forward tab\r\n\t\t\t// forward tab from last element should go back to the first element\r\n\t\t\tnextIndex = (currentIndex >= focusable.length - 1) ? 0 : (currentIndex + 1);\r\n\t\t\tnextItem = focusable[nextIndex];\r\n\t\t\tif(nextItem){\r\n\t\t\t\tnextItem.focus();\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t};\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.marker = {\r\n\tclear: function(){\r\n\t\tvar divs = scheduler.$container.querySelectorAll(\".dhx_focus_slot\");\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tdivs[i].parentNode.removeChild(divs[i]);\r\n\t\t}\r\n\t},\r\n\tcreateElement: function(){\r\n\t\tvar element = document.createElement(\"div\");\r\n\t\telement.setAttribute(\"tabindex\", -1);\r\n\t\telement.className = \"dhx_focus_slot\";\r\n\t\treturn element;\r\n\t},\r\n\r\n\trenderMultiple: function(start, end, method){\r\n\t\tvar divs = [];\r\n\t\tvar currentStart = new Date(start);\r\n\t\tvar currentEnd = new Date(Math.min(end.valueOf(), scheduler.date.add(scheduler.date.day_start(new Date(start)), 1, \"day\").valueOf()));\r\n\t\twhile(currentStart.valueOf() < end.valueOf()){\r\n\r\n\t\t\tdivs = divs.concat(method.call(this, currentStart, new Date(Math.min(currentEnd.valueOf(), end.valueOf()))));\r\n\t\t\tcurrentStart = scheduler.date.day_start(scheduler.date.add(currentStart, 1, \"day\"));\r\n\r\n\t\t\tcurrentEnd = scheduler.date.day_start(scheduler.date.add(currentStart, 1, \"day\"));\r\n\t\t\tcurrentEnd = new Date(Math.min(currentEnd.valueOf(), end.valueOf()));\r\n\t\t}\r\n\r\n\t\treturn divs;\r\n\t},\r\n\r\n\r\n\trender: function(start, end, section){\r\n\t\tthis.clear();\r\n\t\tvar divs = [];\r\n\r\n\t\tvar modes = scheduler.$keyboardNavigation.TimeSlot.prototype._modes;\r\n\t\tvar view = scheduler.$keyboardNavigation.TimeSlot.prototype._getMode();\r\n\t\tswitch (view){\r\n\t\t\tcase modes.units:\r\n\t\t\t\tdivs = this.renderVerticalMarker(start, end, section);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.timeline:\r\n\t\t\t\tdivs = this.renderTimelineMarker(start, end, section);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.year:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderYearMarker));\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.month:\r\n\t\t\t\tdivs = this.renderMonthMarker(start, end);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.weekAgenda:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderWeekAgendaMarker));\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.list:\r\n\t\t\t\tdivs = this.renderAgendaMarker(start, end);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.dayColumns:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderVerticalMarker));\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tthis.addWaiAriaLabel(divs, start, end, section);\r\n\t\tthis.addDataAttributes(divs, start, end, section);\r\n\r\n\t\tfor(var i = divs.length - 1; i >= 0; i--){\r\n\t\t\tif(divs[i].offsetWidth){\r\n\t\t\t\treturn divs[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t},\r\n\r\n\taddDataAttributes: function(divs, start, end, section){\r\n\t\tvar dateToStr = scheduler.date.date_to_str(scheduler.config.api_date);\r\n\r\n\t\tvar from = dateToStr(start),\r\n\t\t\tto = dateToStr(end);\r\n\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tdivs[i].setAttribute(\"data-start-date\", from);\r\n\t\t\tdivs[i].setAttribute(\"data-end-date\", to);\r\n\t\t\tif(section){\r\n\t\t\t\tdivs[i].setAttribute(\"data-section\", section);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\taddWaiAriaLabel: function(divs, start, end, section){\r\n\t\tvar label = \"\";\r\n\t\tvar state = scheduler.getState();\r\n\t\tvar mode = state.mode;\r\n\r\n\t\tvar dateTimeLabel = false;\r\n\r\n\t\tlabel += scheduler.templates.day_date(start);\r\n\r\n\t\tif((scheduler.date.day_start(new Date(start)).valueOf() != start.valueOf())){\r\n\t\t\tlabel += \" \" + scheduler.templates.hour_scale(start);\r\n\t\t\tdateTimeLabel = true;\r\n\t\t}\r\n\r\n\t\tif((scheduler.date.day_start(new Date(start)).valueOf() != scheduler.date.day_start(new Date(end)).valueOf())){\r\n\r\n\t\t\tlabel += \" - \" + scheduler.templates.day_date(end);\r\n\t\t\tif(dateTimeLabel || (scheduler.date.day_start(new Date(end)).valueOf() != end.valueOf())){\r\n\t\t\t\tlabel += \" \" + scheduler.templates.hour_scale(end);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(section){\r\n\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\t\t\t\tconst timeline = scheduler.matrix[mode];\r\n\t\t\t\tconst sectionObject = timeline.y_unit[timeline.order[section]];\r\n\t\t\t\tlabel += \", \" + scheduler.templates[mode + \"_scale_label\"](sectionObject.key, sectionObject.label, sectionObject);\r\n\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\tconst units = scheduler._props[mode];\r\n\t\t\t\tconst sectionObject = units.options[units.order[section]];\r\n\r\n\t\t\t\tlabel += \", \" + scheduler.templates[mode + \"_scale_text\"](sectionObject.key, sectionObject.label, sectionObject);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tscheduler._waiAria.setAttributes(divs[i], {\r\n\t\t\t\t\"aria-label\": label,\r\n\t\t\t\t\"aria-live\": \"polite\"\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\trenderWeekAgendaMarker: function(start_date, end_date){\r\n\t\tvar divs = scheduler.$container.querySelectorAll(\".dhx_wa_day_cont .dhx_wa_scale_bar\");\r\n\r\n\t\tvar currDate = scheduler.date.week_start(new Date(scheduler.getState().min_date));\r\n\r\n\t\tvar index = -1;\r\n\t\tvar markerDate = scheduler.date.day_start(new Date(start_date));\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tindex++;\r\n\t\t\tif(scheduler.date.day_start(new Date(currDate)).valueOf() == markerDate.valueOf()){\r\n\t\t\t\tbreak;\r\n\t\t\t}else{\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(index != -1) return this._wrapDiv(divs[index]);\r\n\t\treturn [];\r\n\t},\r\n\r\n\t_wrapDiv: function(cell){\r\n\t\tvar marker = this.createElement();\r\n\t\tmarker.style.top = cell.offsetTop + \"px\";\r\n\t\tmarker.style.left = cell.offsetLeft + \"px\";\r\n\t\tmarker.style.width = cell.offsetWidth + \"px\";\r\n\t\tmarker.style.height = cell.offsetHeight + \"px\";\r\n\t\tcell.appendChild(marker);\r\n\t\treturn [marker];\r\n\t},\r\n\trenderYearMarker: function(start_date, end_date){\r\n\t\tvar cell = scheduler._get_year_cell(start_date);\r\n\t\tcell.style.position = \"relative\";\r\n\t\tvar marker = this.createElement();\r\n\t\tmarker.style.top = \"0px\";\r\n\t\tmarker.style.left = \"0px\";\r\n\t\tmarker.style.width = \"100%\";\r\n\t\tmarker.style.height = \"100%\";\r\n\t\tcell.appendChild(marker);\r\n\t\treturn [marker];\r\n\t},\r\n\r\n\trenderAgendaMarker: function(start_date, end_date){\r\n\t\tvar block = this.createElement();\r\n\t\tblock.style.height = \"1px\";\r\n\t\tblock.style.width = \"100%\";\r\n\t\tblock.style.opacity = 1;\r\n\t\tblock.style.top = \"0px\";\r\n\t\tblock.style.left = \"0px\";\r\n\t\tscheduler.$container.querySelector(\".dhx_cal_data\").appendChild(block);\r\n\t\treturn [block];\r\n\t},\r\n\r\n\trenderTimelineMarker: function(start_date, end_date, section){\r\n\t\tvar view_opts = scheduler._lame_copy({}, scheduler.matrix[scheduler._mode]);\r\n\t\tvar areas = view_opts._scales;\r\n\t\t//timespans must always use actual position, not rounded\r\n\t\tview_opts.round_position = false;\r\n\t\tvar blocks = [];\r\n\r\n\t\tvar min_date = start_date ? new Date(start_date) : scheduler._min_date;\r\n\t\tvar max_date = end_date ? new Date(end_date) : scheduler._max_date;\r\n\r\n\t\tif(min_date.valueOf() < scheduler._min_date.valueOf())\r\n\t\t\tmin_date = new Date(scheduler._min_date);\r\n\t\tif(max_date.valueOf() > scheduler._max_date.valueOf())\r\n\t\t\tmax_date = new Date(scheduler._max_date);\r\n\r\n\t\tif(!view_opts._trace_x) return blocks;\r\n\r\n\t\tfor(var i = 0; i < view_opts._trace_x.length; i++){\r\n\t\t\tif(scheduler._is_column_visible(view_opts._trace_x[i]))\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\tif(i == view_opts._trace_x.length)\r\n\t\t\treturn blocks;\r\n\r\n\t\tvar area = areas[section];\r\n\r\n\t\tif (!(min_date < end_date && max_date > start_date))\r\n\t\t\treturn blocks;\r\n\r\n\t\tvar block = this.createElement();\r\n\r\n\t\tlet start_pos;\r\n\t\tlet end_pos;\r\n\r\n\t\tfunction set_date_part(source, target) {\r\n\t\t\t// reset to start of the month in order to prevent month change when target is on 31th day, and source month has only 30 days\r\n\t\t\ttarget.setDate(1);\r\n\r\n\t\t\ttarget.setFullYear(source.getFullYear());\r\n\t\t\ttarget.setMonth(source.getMonth());\r\n\t\t\ttarget.setDate(source.getDate());\r\n\t\t}\r\n\r\n\t\tif(!scheduler.getView().days){\r\n\t\t\tstart_pos = scheduler._timeline_getX({start_date: start_date}, false, view_opts);\r\n\t\t\tend_pos = scheduler._timeline_getX({start_date: end_date}, false, view_opts);\r\n\t\t}else{\r\n\t\t\t// daytimeline\r\n\t\t\tconst tempStart = new Date(start_date);\r\n\t\t\tset_date_part(scheduler._min_date, tempStart);\r\n\t\t\tconst tempEnd = new Date(end_date);\r\n\t\t\tset_date_part(scheduler._min_date, tempEnd);\r\n\t\t\tstart_pos = scheduler._timeline_getX({start_date: tempStart}, false, view_opts);\r\n\t\t\tend_pos = scheduler._timeline_getX({start_date: tempEnd}, false, view_opts);\r\n\t\t}\r\n\r\n\t\tvar height = ((view_opts._section_height[section]-1) || (view_opts.dy - 1));\r\n\r\n\t\tvar top = 0;\r\n\t\tif (scheduler._isRender('cell')){\r\n\t\t\ttop = area.offsetTop;\r\n\t\t\tstart_pos += view_opts.dx;\r\n\t\t\tend_pos += view_opts.dx;\r\n\t\t\tarea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t}else{\r\n\r\n\t\t}\r\n\t\tvar width = Math.max(1, end_pos - start_pos - 1);\r\n\t\tlet direction = \"left\";\r\n\t\tif(scheduler.config.rtl){\r\n\t\t\tdirection = \"right\";\r\n\t\t}\r\n\t\tblock.style.cssText = `height:${height}px; ${direction}:${start_pos}px; width:${width}px; top:${top}px;`;\r\n\r\n\t\tif(area){\r\n\t\t\tarea.appendChild(block);\r\n\t\t\tblocks.push(block);\r\n\t\t}\r\n\r\n\t\treturn blocks;\r\n\t},\r\n\r\n\trenderMonthCell: function(date){\r\n\t\tvar cells = scheduler.$container.querySelectorAll(\".dhx_month_head\");\r\n\r\n\t\tvar divs = [];\r\n\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\tdivs.push(cells[i].parentNode);\r\n\t\t}\r\n\r\n\t\tvar firstDate = scheduler.date.week_start(new Date(scheduler.getState().min_date));\r\n\r\n\t\tvar index = -1;\r\n\t\tvar weekNumber = 0;\r\n\t\tvar dayIndex = -1;\r\n\t\tvar currDate = firstDate;\r\n\t\tvar markerDate = scheduler.date.day_start(new Date(date));\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tindex++;\r\n\r\n\t\t\tif(dayIndex == 6){\r\n\t\t\t\tweekNumber++;\r\n\t\t\t\tdayIndex = 0;\r\n\t\t\t}else{\r\n\t\t\t\tdayIndex++;\r\n\t\t\t}\r\n\r\n\t\t\tif(scheduler.date.day_start(new Date(currDate)).valueOf() == markerDate.valueOf()){\r\n\t\t\t\tbreak;\r\n\t\t\t}else{\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(index == -1){\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tvar left = scheduler._colsS[dayIndex];\r\n\t\tvar top = scheduler._colsS.heights[weekNumber];\r\n\r\n\t\tvar div = this.createElement();\r\n\t\tdiv.style.top = top + \"px\";\r\n\t\tdiv.style.left = left + \"px\";\r\n\t\tdiv.style.width = scheduler._cols[dayIndex] + \"px\";\r\n\t\tdiv.style.height = ((scheduler._colsS.heights[weekNumber + 1] - top) || scheduler._colsS.height) + \"px\" ;\r\n\r\n\r\n\t\tvar container = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\r\n\t\tvar datatable = container.querySelector(\".dhx_cal_month_table\");\r\n\t\tif(datatable.nextSibling){\r\n\t\t\tcontainer.insertBefore(div, datatable.nextSibling);\r\n\t\t}else{\r\n\t\t\tcontainer.appendChild(div);\r\n\t\t}\r\n\t\treturn div;\r\n\t},\r\n\trenderMonthMarker: function(start_date, end_date){\r\n\t\tvar res = [];\r\n\t\tvar currentDate = start_date;\r\n\t\twhile(currentDate.valueOf() < end_date.valueOf()){\r\n\t\t\tres.push(this.renderMonthCell(currentDate));\r\n\t\t\tcurrentDate = scheduler.date.add(currentDate, 1, \"day\");\r\n\t\t}\r\n\t\treturn res;\r\n\t},\r\n\r\n\trenderVerticalMarker: function(start_date, end_date, section){\r\n\t\tvar index = scheduler.locate_holder_day(start_date);\r\n\r\n\t\tvar divs = [];\r\n\t\tvar area = null;\r\n\r\n\t\tvar c = scheduler.config;\r\n\t\tif(scheduler._ignores[index]) return divs;\r\n\r\n\t\tif (scheduler._props && scheduler._props[scheduler._mode] && section) {\r\n\t\t\tvar view = scheduler._props[scheduler._mode];\r\n\t\t\tindex = view.order[section];\r\n\r\n\t\t\tvar inner_index = view.order[section];\r\n\t\t\tif(!(view.days > 1)){\r\n\t\t\t\tindex = inner_index;\r\n\t\t\t\tif (view.size && (index > view.position+view.size)) {\r\n\t\t\t\t\tindex = 0;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t//var units_l = view.size || view.options.length;\r\n\r\n\t\t\t\tindex = scheduler.locate_holder_day(start_date) + inner_index;\r\n\t\t\t\t//index = index*units_l + inner_index;\r\n\t\t\t}\r\n\t\t}\r\n\t\tarea = scheduler.locate_holder(index);\r\n\t\tif(!area || area.querySelector(\".dhx_scale_hour\")){\r\n\t\t\t// hour scale instead of date column\r\n\t\t\treturn document.createElement(\"div\");\r\n\t\t}\r\n\r\n\t\tvar start = Math.max((start_date.getHours()*60 + start_date.getMinutes()), c.first_hour*60);\r\n\r\n\r\n\t\tvar end = Math.min((end_date.getHours()*60 + end_date.getMinutes()), c.last_hour*60);\r\n\t\tif(!end && (scheduler.date.day_start(new Date(end_date)).valueOf() > scheduler.date.day_start(new Date(start_date)).valueOf())){\r\n\t\t\tend = c.last_hour*60;\r\n\t\t}\r\n\r\n\t\tif (end <= start) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tvar block = this.createElement();\r\n\r\n\t\t// +1 for working with section which really takes up whole height (as % would be == 0)\r\n\t\tvar all_hours_height = scheduler.config.hour_size_px*c.last_hour + 1;\r\n\t\tvar hour_ms = 60*60*1000;\r\n\t\tblock.style.top = (Math.round((start*60*1000-scheduler.config.first_hour*hour_ms)*scheduler.config.hour_size_px/hour_ms) % all_hours_height) + \"px\";\r\n\t\tblock.style.lineHeight = block.style.height = Math.max((Math.round(((end-start)*60*1000)*scheduler.config.hour_size_px/hour_ms)) % all_hours_height, 1)+\"px\";\r\n\t\tblock.style.width = \"100%\";\r\n\t\tarea.appendChild(block);\r\n\t\tdivs.push(block);\r\n\t\treturn divs[0];\r\n\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode = function(){};\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.EventHandler,\r\n\t{\r\n\t\tgetDefaultNode: function(){\r\n\t\t\tvar node = new scheduler.$keyboardNavigation.TimeSlot();\r\n\r\n\t\t\tif(!node.isValid()){\r\n\t\t\t\tnode = node.fallback();\r\n\t\t\t}\r\n\t\t\treturn node;\r\n\t\t},\r\n\r\n\t\t_modes:{\r\n\t\t\tmonth: \"month\",\r\n\t\t\tyear: \"year\",\r\n\t\t\tdayColumns: \"dayColumns\",\r\n\t\t\ttimeline:\"timeline\",\r\n\t\t\tunits:\"units\",\r\n\t\t\tweekAgenda: \"weekAgenda\",\r\n\t\t\tlist: \"list\"\r\n\t\t},\r\n\t\tgetMode: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tvar mode = state.mode;\r\n\t\t\tif((scheduler.matrix && scheduler.matrix[mode])){\r\n\t\t\t\treturn this._modes.timeline;\r\n\t\t\t} else if((scheduler._props && scheduler._props[mode])){\r\n\t\t\t\treturn this._modes.units;\r\n\t\t\t}else if(mode == \"month\"){\r\n\t\t\t\treturn this._modes.month;\r\n\t\t\t}else if(mode == \"year\"){\r\n\t\t\t\treturn this._modes.year;\r\n\t\t\t}else if(mode == \"week_agenda\"){\r\n\t\t\t\treturn this._modes.weekAgenda;\r\n\t\t\t}else if(mode == \"map\" || mode == \"agenda\" || (scheduler._grid && scheduler[\"grid_\" + mode])){\r\n\t\t\t\treturn this._modes.list;\r\n\t\t\t}else{\r\n\t\t\t\treturn this._modes.dayColumns;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.focus();\r\n\t\t},\r\n\r\n\t\tblur: function(){\r\n\r\n\t\t},\r\n\r\n\t\tdisable: function(){\r\n\t\t\tscheduler.$container.setAttribute(\"tabindex\", \"0\");\r\n\t\t},\r\n\t\tenable: function(){\r\n\t\t\tif(scheduler.$container)\r\n\t\t\t\tscheduler.$container.removeAttribute(\"tabindex\");\r\n\t\t},\r\n\t\tisEnabled: function(){\r\n\t\t\treturn scheduler.$container.hasAttribute(\"tabindex\");\r\n\t\t},\r\n\r\n\r\n\t\t_compareEvents: function(a, b){\r\n\t\t\tif (a.start_date.valueOf() == b.start_date.valueOf())\r\n\t\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\t\treturn a.start_date.valueOf() > b.start_date.valueOf() ? 1 : -1;\r\n\t\t},\r\n\r\n\t\t_pickEvent: function(from, to, startId, reverse){\r\n\t\t\tvar range = scheduler.getState();\r\n\t\t\tfrom = new Date(Math.max(range.min_date.valueOf(), from.valueOf()));\r\n\t\t\tto = new Date(Math.min(range.max_date.valueOf(), to.valueOf()));\r\n\r\n\t\t\tvar evs = scheduler.getEvents(from, to);\r\n\t\t\tevs.sort(this._compareEvents);\r\n\t\t\tif(reverse){\r\n\t\t\t\tevs = evs.reverse();\r\n\t\t\t}\r\n\r\n\t\t\tvar trim = !!startId;\r\n\t\t\tfor(var i =0; i < evs.length && trim; i++){\r\n\t\t\t\tif(evs[i].id == startId){\r\n\t\t\t\t\ttrim = false;\r\n\t\t\t\t}\r\n\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\r\n\t\t\tfor(var i = 0; i < evs.length; i++){\r\n\t\t\t\tvar eventElement = new scheduler.$keyboardNavigation.Event(evs[i].id);\r\n\t\t\t\tif(eventElement.getNode())\r\n\t\t\t\t\treturn evs[i];\r\n\t\t\t}\r\n\r\n\t\t\treturn null;\r\n\t\t},\r\n\r\n\t\tnextEventHandler: function(id){\r\n\t\t\tvar activeNode = scheduler.$keyboardNavigation.dispatcher.activeNode;\r\n\r\n\t\t\tvar startId = id || (activeNode && activeNode.eventId);\r\n\r\n\t\t\tvar nextEvent = null;\r\n\t\t\tif(startId && scheduler.getEvent(startId)){\r\n\t\t\t\tvar currEvent = scheduler.getEvent(startId);\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tcurrEvent.start_date,\r\n\t\t\t\t\tscheduler.date.add(currEvent.start_date, 1, \"year\"),\r\n\t\t\t\t\tcurrEvent.id,\r\n\t\t\t\t\tfalse\r\n\t\t\t\t);\r\n\r\n\t\t\t}\r\n\t\t\tif(!nextEvent && !id){\r\n\t\t\t\tvar visibleDates = scheduler.getState();\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tvisibleDates.min_date,\r\n\t\t\t\t\tscheduler.date.add(visibleDates.min_date, 1, \"year\"),\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\tfalse\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tif(nextEvent){\r\n\r\n\t\t\t\tvar nextEv = new scheduler.$keyboardNavigation.Event(nextEvent.id);\r\n\t\t\t\tif(!nextEv.isValid()){// not visible event\r\n\t\t\t\t\tthis.nextEventHandler(nextEvent.id);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(activeNode){activeNode.blur();}\r\n\t\t\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(nextEv);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tprevEventHandler: function(id){\r\n\t\t\tvar activeNode = scheduler.$keyboardNavigation.dispatcher.activeNode;\r\n\r\n\t\t\tvar startId = id || (activeNode && activeNode.eventId);\r\n\r\n\t\t\tvar nextEvent = null;\r\n\t\t\tif(startId && scheduler.getEvent(startId)){\r\n\t\t\t\tvar currEvent = scheduler.getEvent(startId);\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tscheduler.date.add(currEvent.end_date, -1, \"year\"),\r\n\t\t\t\t\tcurrEvent.end_date,\r\n\t\t\t\t\tcurrEvent.id,\r\n\t\t\t\t\ttrue\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\tif(!nextEvent && !id){\r\n\t\t\t\tvar visibleDates = scheduler.getState();\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tscheduler.date.add(visibleDates.max_date, -1, \"year\"),\r\n\t\t\t\t\tvisibleDates.max_date,\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\ttrue\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tif(nextEvent){\r\n\t\t\t\tvar nextEv = new scheduler.$keyboardNavigation.Event(nextEvent.id);\r\n\t\t\t\tif(!nextEv.isValid()){// not visible event\r\n\t\t\t\t\tthis.prevEventHandler(nextEvent.id);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(activeNode){activeNode.blur();}\r\n\t\t\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(nextEv);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\r\n\t\t\t\"alt+1, alt+2, alt+3, alt+4, alt+5, alt+6, alt+7, alt+8, alt+9\": function(e){\r\n\t\t\t\tvar tabs = scheduler.$keyboardNavigation.HeaderCell.prototype.getNodes(\".dhx_cal_navline .dhx_cal_tab\");\r\n\t\t\t\tvar key = e.key;\r\n\t\t\t\tif(key === undefined){\r\n\t\t\t\t\tkey = e.keyCode - 48;\r\n\t\t\t\t}\r\n\t\t\t\tif(tabs[key*1 - 1]){\r\n\t\t\t\t\ttabs[key*1 - 1].click();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+left,meta+left\": function(e){\r\n\t\t\t\tscheduler._click.dhx_cal_prev_button();\r\n\t\t\t},\r\n\t\t\t\"ctrl+right,meta+right\": function(e){\r\n\t\t\t\tscheduler._click.dhx_cal_next_button();\r\n\t\t\t},\r\n\t\t\t\"ctrl+up,meta+up\":function(e){\r\n\t\t\t\tvar dataArea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tdataArea.scrollTop -= 20;\r\n\t\t\t},\r\n\t\t\t\"ctrl+down,meta+down\": function(e){\r\n\t\t\t\tvar dataArea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tdataArea.scrollTop += 20;\r\n\t\t\t},\r\n\r\n\r\n\t\t\t\"e\": function(){\r\n\t\t\t\tthis.nextEventHandler();\r\n\t\t\t},\r\n\r\n\t\t\t\"home\": function(){\r\n\t\t\t\tscheduler.setCurrentView(new Date());\r\n\t\t\t},\r\n\r\n\t\t\t\"shift+e\": function(){\r\n\t\t\t\tthis.prevEventHandler();\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+enter,meta+enter\": function(){\r\n\t\t\t\tscheduler.addEventNow({start_date: new Date(scheduler.getState().date)});\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+c,meta+c\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t},\r\n\t\t\t\"ctrl+v,meta+v\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t},\r\n\t\t\t\"ctrl+x,meta+x\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode.prototype.bindAll(scheduler.$keyboardNavigation.SchedulerNode.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.KeyNavNode = function(){};\r\n\r\nscheduler.$keyboardNavigation.KeyNavNode.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.EventHandler,\r\n\t{\r\n\t\tisValid: function(){\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\treturn null;\r\n\t\t},\r\n\r\n\t\tmoveTo: function (element) {\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(element);\r\n\t\t},\r\n\r\n\t\tcompareTo: function(b){\r\n\t\t\t// good enough comparison of two random objects\r\n\t\t\tif(!b) return false;\r\n\t\t\tfor(var i in this){\r\n\t\t\t\tif(!!this[i] != !!b[i]) return false;\r\n\r\n\t\t\t\tvar canStringifyThis = !!(this[i] && this[i].toString);\r\n\t\t\t\tvar canStringifyThat = !!(b[i] && b[i].toString);\r\n\t\t\t\tif(canStringifyThat != canStringifyThis) return false;\r\n\t\t\t\tif(!(canStringifyThat && canStringifyThis)) {\r\n\t\t\t\t\tif(b[i] != this[i]) return false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(b[i].toString() != this[i].toString())\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\tgetNode: function(){},\r\n\t\tfocus: function(){\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif(node){\r\n\t\t\t\tnode.setAttribute(\"tabindex\", \"-1\");\r\n\t\t\t\t//node.className += \" scheduler_focused\";\r\n\t\t\t\tif(node.focus) node.focus();\r\n\t\t\t}\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif(node){\r\n\t\t\t\tnode.setAttribute(\"tabindex\", \"-1\");\r\n\t\t\t\t//node.className = (node.className || \"\").replace(/ ?scheduler_focused/g, \"\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.HeaderCell = function(index){\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.HeaderCell.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\tgetNode: function(index){\r\n\t\t\tindex = index || this.index || 0;\r\n\t\t\tvar nodes = this.getNodes();\r\n\t\t\tif(nodes[index]) return nodes[index];\r\n\t\t},\r\n\r\n\t\tgetNodes: function(selector){\r\n\t\t\tselector = selector || [\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_prev_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_next_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_today_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_tab\"\r\n\t\t\t\t].join(\", \");\r\n\r\n\t\t\tvar nodes = Array.prototype.slice.call(scheduler.$container.querySelectorAll(selector));\r\n\t\t\tnodes.sort(function(a, b){\r\n\t\t\t\treturn a.offsetLeft - b.offsetLeft;\r\n\t\t\t});\r\n\t\t\treturn nodes;\r\n\t\t},\r\n\r\n\t\t_handlers:null,\r\n\r\n\t\tisValid: function(){\r\n\t\t\treturn !!this.getNode(this.index);\r\n\t\t},\r\n\t\tfallback:function(){\r\n\t\t\tvar defaultCell = this.getNode(0);\r\n\t\t\tif(!defaultCell){\r\n\t\t\t\tdefaultCell = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}\r\n\t\t\treturn defaultCell;\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tvar newIndex = this.index - 1;\r\n\t\t\t\tif(newIndex < 0){\r\n\t\t\t\t\tnewIndex = this.getNodes().length - 1;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.HeaderCell(newIndex));\r\n\r\n\t\t\t},\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tvar newIndex = this.index + 1;\r\n\t\t\t\tif(newIndex >= this.getNodes().length){\r\n\t\t\t\t\tnewIndex = 0;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.HeaderCell(newIndex));\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t},\r\n\r\n\t\t\t\"enter\": function(){\r\n\t\t\t\tvar node = this.getNode();\r\n\t\t\t\tif(node){\r\n\t\t\t\t\tnode.click();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.HeaderCell.prototype.bindAll(scheduler.$keyboardNavigation.HeaderCell.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.Event = function(id){\r\n\tthis.eventId = null;\r\n\tif(scheduler.getEvent(id)){\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tthis.start = new Date(ev.start_date);\r\n\t\tthis.end = new Date(ev.end_date);\r\n\r\n\t\tthis.section = this._getSection(ev);\r\n\t\tthis.eventId = id;\r\n\t}\r\n};\r\n\r\nscheduler.$keyboardNavigation.Event.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\t_getNodes: function(){\r\n\t\t\treturn Array.prototype.slice.call(scheduler.$container.querySelectorAll(\"[\"+scheduler.config.event_attribute+\"]\"));\r\n\t\t},\r\n\r\n\t\t_modes: scheduler.$keyboardNavigation.SchedulerNode.prototype._modes,\r\n\r\n\t\tgetMode: scheduler.$keyboardNavigation.SchedulerNode.prototype.getMode,\r\n\r\n\t\t_handlers: null,\r\n\t\tisValid: function(){\r\n\t\t\treturn !!(scheduler.getEvent(this.eventId) && this.getNode());\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\tvar eventNode = this._getNodes()[0];\r\n\t\t\tvar defaultElement = null;\r\n\t\t\tif(!eventNode || !(scheduler._locate_event(eventNode))){\r\n\t\t\t\tdefaultElement = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}else{\r\n\t\t\t\tvar id = scheduler._locate_event(eventNode);\r\n\t\t\t\tdefaultElement = new scheduler.$keyboardNavigation.Event(id);\r\n\t\t\t}\r\n\r\n\t\t\treturn defaultElement;\r\n\t\t},\r\n\r\n\t\tisScrolledIntoView: function (el) {\r\n\t\t\tvar eventBox = el.getBoundingClientRect();\r\n\t\t\tvar viewPort = scheduler.$container.querySelector(\".dhx_cal_data\").getBoundingClientRect();\r\n\t\t\t\r\n\t\t\tif(eventBox.bottom < viewPort.top || eventBox.top > viewPort.bottom){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\tgetNode: function(){\r\n\r\n\t\t\tvar idSelector = \"[\"+scheduler.config.event_attribute+\"='\"+this.eventId+\"']\";\r\n\r\n\t\t\tvar inlineEditor = scheduler.$keyboardNavigation.dispatcher.getInlineEditor(this.eventId);\r\n\t\t\tif(inlineEditor){// is inline editor visible\r\n\t\t\t\treturn inlineEditor;\r\n\t\t\t}else{\r\n\t\t\t\tif(scheduler.isMultisectionEvent && scheduler.isMultisectionEvent(scheduler.getEvent(this.eventId))){\r\n\t\t\t\t\tvar nodes = scheduler.$container.querySelectorAll(idSelector);\r\n\t\t\t\t\tfor(var i = 0; i < nodes.length; i++){\r\n\t\t\t\t\t\tif(this.isScrolledIntoView(nodes[i])){\r\n\t\t\t\t\t\t\treturn nodes[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn nodes[0];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn scheduler.$container.querySelector(idSelector);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tvar event = scheduler.getEvent(this.eventId);\r\n\r\n\t\t\tvar calendar = scheduler.getState();\r\n\t\t\tif(event.start_date.valueOf() > calendar.max_date.valueOf() || event.end_date.valueOf() <= calendar.min_date.valueOf()){\r\n\t\t\t\tscheduler.setCurrentView(event.start_date);\r\n\t\t\t}\r\n\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif (this.isScrolledIntoView(node)) {\r\n\t\t\t\tscheduler.$keyboardNavigation.dispatcher.keepScrollPosition((function(){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\t\t}).bind(this));\r\n\t\t\t} else {\r\n\t\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\t}\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\r\n\r\n\t\t_getSection: function(ev){\r\n\t\t\tvar section = null;\r\n\t\t\tvar mode = scheduler.getState().mode;\r\n\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\t\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\t\tsection = ev[timeline.y_property];\r\n\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\tvar unit = scheduler._props[mode];\r\n\t\t\t\tsection = ev[unit.map_to];\r\n\t\t\t}\r\n\t\t\treturn section;\r\n\t\t},\r\n\t\t_moveToSlot: function(dir){\r\n\t\t\tvar ev = scheduler.getEvent(this.eventId);\r\n\t\t\tif(ev){\r\n\t\t\t\tvar section =this._getSection(ev);\r\n\t\t\t\tvar slot = new scheduler.$keyboardNavigation.TimeSlot(ev.start_date, null, section);\r\n\t\t\t\tthis.moveTo(slot.nextSlot(slot, dir));\r\n\t\t\t}else{\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tthis._moveToSlot(\"left\");\r\n\t\t\t},\r\n\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tthis._moveToSlot(\"right\");\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\t\t\t\tif(this.getMode() == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis._moveToSlot(\"down\");\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"space\": function(){\r\n\t\t\t\tvar node = this.getNode();\r\n\t\t\t\tif(node && node.click){\r\n\t\t\t\t\tnode.click();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"up\": function () {\r\n\t\t\t\tif(this.getMode() == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis._moveToSlot(\"up\");\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"delete\": function(){\r\n\t\t\t\tif(scheduler.getEvent(this.eventId)) {\r\n\t\t\t\t\tscheduler._click.buttons[\"delete\"](this.eventId);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t// open lightbox\r\n\t\t\t\"enter\": function () {\r\n\t\t\t\tif(scheduler.getEvent(this.eventId)) {\r\n\t\t\t\t\tscheduler.showLightbox(this.eventId);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\nscheduler.$keyboardNavigation.Event.prototype.bindAll(scheduler.$keyboardNavigation.Event.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.TimeSlot = function(from, to, section, movingDate){\r\n\tvar state = scheduler.getState();\r\n\tvar timeline = scheduler.matrix && scheduler.matrix[state.mode];\r\n\r\n\tif(!from){\r\n\t\tfrom = this.getDefaultDate();\r\n\t}\r\n\r\n\tif(!to){\r\n\r\n\t\tif(timeline){\r\n\t\t\tto = scheduler.date.add(from, timeline.x_step, timeline.x_unit);\r\n\t\t}else{\r\n\t\t\tto = scheduler.date.add(from, scheduler.config.key_nav_step, \"minute\");\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tthis.section = section || this._getDefaultSection();\r\n\tthis.start_date = new Date(from);\r\n\tthis.end_date = new Date(to);\r\n\tthis.movingDate = movingDate || null;\r\n};\r\n\r\nscheduler.$keyboardNavigation.TimeSlot.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\t_handlers:null,\r\n\r\n\t\tgetDefaultDate: function(){\r\n\t\t\tvar from;\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar visibleTime = new Date(state.date);\r\n\t\t\tvisibleTime.setSeconds(0);\r\n\t\t\tvisibleTime.setMilliseconds(0);\r\n\r\n\t\t\tvar nowTime = new Date();\r\n\t\t\tnowTime.setSeconds(0);\r\n\t\t\tnowTime.setMilliseconds(0);\r\n\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[state.mode];\r\n\t\t\tvar showNowTime = false;\r\n\t\t\tif(visibleTime.valueOf() === nowTime.valueOf()){\r\n\t\t\t\tshowNowTime = true;\r\n\t\t\t}\r\n\r\n\t\t\tif(timeline){\r\n\t\t\t\tif(showNowTime){\r\n\t\t\t\t\tif(timeline.x_unit === \"day\"){\r\n\t\t\t\t\t\tnowTime.setHours(0);\r\n\t\t\t\t\t\tnowTime.setMinutes(0);\r\n\t\t\t\t\t}else if(timeline.x_unit === \"hour\"){\r\n\t\t\t\t\t\tnowTime.setMinutes(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfrom = nowTime;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfrom = scheduler.date[timeline.name + \"_start\"](new Date(state.date));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfrom = this.findVisibleColumn(from);\r\n\t\t\t}else{\r\n\t\t\t\tfrom = new Date(scheduler.getState().min_date);\r\n\t\t\t\tif(showNowTime){\r\n\t\t\t\t\tfrom = nowTime;\r\n\t\t\t\t}\r\n\t\t\t\tfrom = this.findVisibleColumn(from);\r\n\t\t\t\tif(!showNowTime){\r\n\t\t\t\t\tfrom.setHours(scheduler.config.first_hour);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(!scheduler._table_view){\r\n\t\t\t\t\tvar dataContainer = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\t\tif(dataContainer.scrollTop){\r\n\t\t\t\t\t\tfrom.setHours(scheduler.config.first_hour + Math.ceil(dataContainer.scrollTop / scheduler.config.hour_size_px));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn from;\r\n\t\t},\r\n\r\n\t\tclone: function(timeslot){\r\n\t\t\treturn new scheduler.$keyboardNavigation.TimeSlot(timeslot.start_date, timeslot.end_date, timeslot.section, timeslot.movingDate);\r\n\t\t},\r\n\t\t_getMultisectionView: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view;\r\n\t\t\tif(scheduler._props && scheduler._props[state.mode]) {\r\n\t\t\t\tview = scheduler._props[state.mode];\r\n\t\t\t}else if(scheduler.matrix && scheduler.matrix[state.mode]){\r\n\t\t\t\tview = scheduler.matrix[state.mode];\r\n\t\t\t}\r\n\t\t\treturn view;\r\n\t\t},\r\n\r\n\t\t_getDefaultSection: function(){\r\n\t\t\tvar section = null;\r\n\t\t\tvar view = this._getMultisectionView();\r\n\t\t\tif(view && !section){\r\n\t\t\t\tsection = this._getNextSection();\r\n\t\t\t}\r\n\t\t\treturn section;\r\n\t\t},\r\n\r\n\t\t_getNextSection: function(sectionId, dir){\r\n\t\t\tvar view = this._getMultisectionView();\r\n\t\t\tvar currentIndex = view.order[sectionId];\r\n\t\t\tvar nextIndex = currentIndex;\r\n\t\t\tif(currentIndex !== undefined){\r\n\t\t\t\tnextIndex = currentIndex + dir;\r\n\t\t\t}else{\r\n\t\t\t\tnextIndex = (view.size && view.position) ? view.position : 0;\r\n\t\t\t}\r\n\r\n\t\t\tif(nextIndex < 0){\r\n\t\t\t\tnextIndex = 0;\r\n\t\t\t}\r\n\t\t\tvar options = view.options || view.y_unit;\r\n\r\n\t\t\tif(nextIndex >= options.length){\r\n\t\t\t\tnextIndex = options.length - 1;\r\n\t\t\t}\r\n\t\t\t//nextIndex = nextIndex < 0 ? nextIndex = (view.options || view.y_unit).length -1 : nextIndex;\r\n\r\n\t\t\tif(options[nextIndex]){\r\n\t\t\t\treturn options[nextIndex].key;\r\n\t\t\t}else{\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar isInRange = !(this.start_date.valueOf() < state.min_date.valueOf() || this.start_date.valueOf() >= state.max_date.valueOf());\r\n\r\n\t\t\tif(!isInRange) return false;\r\n\r\n\r\n\t\t\tif(!this.isVisible(this.start_date, this.end_date)) return false;\r\n\r\n\t\t\tvar view = this._getMultisectionView();\r\n\r\n\t\t\tif(view){\r\n\t\t\t\treturn (view.order[this.section] !== undefined);\r\n\t\t\t}else{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\tfallback:function(){\r\n\r\n\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(!defaultSlot.isValid()){\r\n\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t}else{\r\n\t\t\t\treturn defaultSlot;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tgetNodes: function(){\r\n\t\t\treturn Array.prototype.slice.call(scheduler.$container.querySelectorAll(\".dhx_focus_slot\"));\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\treturn this.getNodes()[0];\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tif(this.section && scheduler.getView() && scheduler.getView().smart_rendering && scheduler.getView().scrollTo && !scheduler.$container.querySelector(`[data-section-id=\"${this.section}\"]`)){\r\n\t\t\t\tscheduler.getView().scrollTo({section: this.section});\r\n\t\t\t}\r\n\t\t\tscheduler.$keyboardNavigation.marker.render(this.start_date, this.end_date, this.section);\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\tscheduler.$keyboardNavigation._pasteDate = this.start_date;\r\n\t\t\tscheduler.$keyboardNavigation._pasteSection = this.section;\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t\tscheduler.$keyboardNavigation.marker.clear();\r\n\t\t},\r\n\r\n\t\t_modes: scheduler.$keyboardNavigation.SchedulerNode.prototype._modes,\r\n\r\n\t\t_getMode: scheduler.$keyboardNavigation.SchedulerNode.prototype.getMode,\r\n\r\n\t\taddMonthDate: function(date, dir, extend){\r\n\t\t\tvar res;\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tres = scheduler.date.add(date, -1, \"week\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tres = scheduler.date.add(date, 1, \"week\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tres = scheduler.date.day_start(scheduler.date.add(date, -1, \"day\"));\r\n\t\t\t\t\tres = this.findVisibleColumn(res, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tres = scheduler.date.day_start(scheduler.date.add(date, 1, \"day\"));\r\n\t\t\t\t\tres = this.findVisibleColumn(res, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tres = scheduler.date.day_start(new Date(date));\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tif(date.valueOf() < state.min_date.valueOf() || (!extend && date.valueOf() >= state.max_date.valueOf())){\r\n\t\t\t\tres = new Date(state.min_date);\r\n\t\t\t}\r\n\r\n\t\t\treturn res;\r\n\t\t},\r\n\r\n\t\tnextMonthSlot: function(slot, dir, extend){\r\n\r\n\t\t\tvar start, end;\r\n\t\t\tstart = this.addMonthDate(slot.start_date, dir, extend);\r\n\r\n\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\tend = new Date(start);\r\n\t\t\tend.setHours(scheduler.config.last_hour);\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\r\n\t\t_alignTimeSlot: function(date, minDate, unit, step){\r\n\t\t\tvar currentDate = new Date(minDate);\r\n\t\t\twhile(currentDate.valueOf() < date.valueOf()){\r\n\t\t\t\tcurrentDate = scheduler.date.add(currentDate, step, unit);\r\n\t\t\t}\r\n\r\n\t\t\tif(currentDate.valueOf() > date.valueOf()){\r\n\t\t\t\tcurrentDate = scheduler.date.add(currentDate, -step, unit);\r\n\t\t\t}\r\n\r\n\t\t\treturn currentDate;\r\n\t\t},\r\n\r\n\t\tnextTimelineSlot: function(slot, dir, extend){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view = scheduler.matrix[state.mode];\r\n\r\n\t\t\tvar startDate = this._alignTimeSlot(slot.start_date, scheduler.date[view.name + \"_start\"](new Date(slot.start_date)), view.x_unit, view.x_step);\r\n\t\t\tvar endDate = this._alignTimeSlot(slot.end_date, scheduler.date[view.name + \"_start\"](new Date(slot.end_date)), view.x_unit, view.x_step);\r\n\r\n\t\t\tif(endDate.valueOf() <= startDate.valueOf()){\r\n\t\t\t\tendDate = scheduler.date.add(startDate, view.x_step, view.x_unit);\r\n\t\t\t}\r\n\t\t\tvar newPos = this.clone(slot);\r\n\t\t\tnewPos.start_date = startDate;\r\n\t\t\tnewPos.end_date = endDate;\r\n\t\t\tnewPos.section = slot.section || this._getNextSection();\r\n\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tnewPos.section = this._getNextSection(slot.section, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tnewPos.section = this._getNextSection(slot.section, +1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tnewPos.start_date = this.findVisibleColumn(scheduler.date.add(newPos.start_date, -view.x_step, view.x_unit), -1);\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tnewPos.start_date = this.findVisibleColumn(scheduler.date.add(newPos.start_date, view.x_step, view.x_unit), 1);\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(newPos.start_date.valueOf() < state.min_date.valueOf() || newPos.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tif(extend && newPos.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\t\tnewPos.start_date = new Date(state.max_date);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tnewPos.start_date = scheduler.date[state.mode + \"_start\"](scheduler.date.add(state.date, dir == \"left\" ? -1 : 1, state.mode));\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn newPos;\r\n\t\t},\r\n\r\n\t\tnextUnitsSlot: function(slot, dir, extend){\r\n\t\t\tvar newPos = this.clone(slot);\r\n\t\t\tnewPos.section = slot.section || this._getNextSection();\r\n\r\n\t\t\tvar section = slot.section || this._getNextSection();\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view = scheduler._props[state.mode];\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tsection = this._getNextSection(slot.section, -1);\r\n\t\t\t\t\tvar optionsCount = view.size ? (view.size - 1) : view.options.length;\r\n\r\n\t\t\t\t\tif(view.days > 1 && (view.order[section] == optionsCount - 1)){\r\n\t\t\t\t\t\tif(scheduler.date.add(slot.start_date, -1, \"day\").valueOf() >= state.min_date.valueOf()){\r\n\t\t\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tsection = this._getNextSection(slot.section, 1);\r\n\t\t\t\t\tif(view.days > 1 && !view.order[section]){\r\n\t\t\t\t\t\tif(scheduler.date.add(slot.start_date, 1, \"day\").valueOf() < state.max_date.valueOf()){\r\n\t\t\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\tsection = slot.section;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tnewPos.section = section;\r\n\t\t\treturn newPos;\r\n\t\t},\r\n\r\n\t\t_moveDate: function(oldDate, dir){\r\n\t\t\tvar newDate = this.findVisibleColumn(scheduler.date.add(oldDate, dir, \"day\"), dir);\r\n\t\t\tnewDate.setHours(oldDate.getHours());\r\n\t\t\tnewDate.setMinutes(oldDate.getMinutes());\r\n\t\t\treturn newDate;\r\n\t\t},\r\n\r\n\t\tisBeforeLastHour: function(date, isStartDate){\r\n\t\t\tvar minutes = date.getMinutes(),\r\n\t\t\t\thours = date.getHours(),\r\n\t\t\t\tlast_hour = scheduler.config.last_hour;\r\n\t\t\treturn (hours < last_hour || (!isStartDate && ((last_hour == 24 || hours == last_hour) && !minutes)));\r\n\t\t},\r\n\t\tisAfterFirstHour: function(date, isStartDate){\r\n\t\t\tvar minutes = date.getMinutes(),\r\n\t\t\t\thours = date.getHours(),\r\n\t\t\t\tfirst_hour = scheduler.config.first_hour,\r\n\t\t\t\tlast_hour = scheduler.config.last_hour;\r\n\t\t\treturn (hours >= first_hour || (!isStartDate && (!minutes && ((!hours && last_hour == 24) || (hours == last_hour)))));\r\n\t\t},\r\n\t\tisInVisibleDayTime: function(date, isStartDate){\r\n\t\t\treturn (this.isBeforeLastHour(date, isStartDate) && this.isAfterFirstHour(date, isStartDate));\r\n\t\t},\r\n\r\n\t\tnextDaySlot: function(slot, dir, extend){\r\n\t\t\tvar start, end;\r\n\r\n\t\t\tvar key_nav_step = scheduler.config.key_nav_step;\r\n\r\n\t\t\tvar date = this._alignTimeSlot(slot.start_date, scheduler.date.day_start(new Date(slot.start_date)), \"minute\", key_nav_step);\r\n\r\n\r\n\t\t\tvar oldStart = slot.start_date;\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tstart = scheduler.date.add(date, -key_nav_step, \"minute\");\r\n\r\n\t\t\t\t\tif(!this.isInVisibleDayTime(start, true)){\r\n\t\t\t\t\t\tif (!extend || this.isInVisibleDayTime(oldStart, true)) {\r\n\r\n\t\t\t\t\t\t\tvar toNextDay = true;\r\n\t\t\t\t\t\t\tif(extend && scheduler.date.date_part(new Date(start)).valueOf() != scheduler.date.date_part(new Date(oldStart)).valueOf())\r\n\t\t\t\t\t\t\t\ttoNextDay = false;\r\n\t\t\t\t\t\t\tif(toNextDay)\r\n\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, -1, \"day\"), -1);\r\n\r\n\t\t\t\t\t\t\tstart.setHours(scheduler.config.last_hour);\r\n\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\tstart = scheduler.date.add(start, -key_nav_step, \"minute\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tstart = scheduler.date.add(date, key_nav_step, \"minute\");\r\n\r\n\t\t\t\t\tvar testEnd = extend ? start : scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tif(!this.isInVisibleDayTime(testEnd, false)){\r\n\t\t\t\t\t\tif(!extend || this.isInVisibleDayTime(oldStart, false)) {\r\n\t\t\t\t\t\t\tif (!extend) {\r\n\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, 1, \"day\"), 1);\r\n\t\t\t\t\t\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tvar toNextDay = true;\r\n\t\t\t\t\t\t\t\tif (scheduler.date.date_part(new Date(oldStart)).valueOf() == oldStart.valueOf()) {\r\n\t\t\t\t\t\t\t\t\ttoNextDay = false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (toNextDay) {\r\n\t\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, 1, \"day\"), 1);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\t\tstart = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tstart = this._moveDate(slot.start_date, -1);\r\n\t\t\t\t\tend = this._moveDate(slot.end_date, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tstart = this._moveDate(slot.start_date, 1);\r\n\t\t\t\t\tend = this._moveDate(slot.end_date, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tstart = date;\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\t\tnextWeekAgendaSlot: function(slot, dir){\r\n\t\t\tvar start, end;\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tstart = scheduler.date.day_start(scheduler.date.add(slot.start_date, -1, \"day\"));\r\n\t\t\t\t\tstart = this.findVisibleColumn(start, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tstart = scheduler.date.day_start(scheduler.date.add(slot.start_date, 1, \"day\"));\r\n\t\t\t\t\tstart = this.findVisibleColumn(start, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tstart = scheduler.date.day_start(slot.start_date);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif(slot.start_date.valueOf() < state.min_date.valueOf() || slot.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tstart = new Date(state.min_date);\r\n\r\n\t\t\t}\r\n\t\t\tend = new Date(start);\r\n\t\t\tend.setHours(scheduler.config.last_hour);\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\t\tnextAgendaSlot: function(slot, dir){\r\n\t\t\treturn {start_date: slot.start_date, end_date: slot.end_date};\r\n\t\t},\r\n\r\n\r\n\t\tisDateVisible: function(date){\r\n\t\t\tif(!scheduler._ignores_detected)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[scheduler.getState().mode];\r\n\r\n\t\t\tvar index;\r\n\t\t\tif(timeline){\r\n\t\t\t\tindex = scheduler._get_date_index(timeline, date);\r\n\t\t\t}else{\r\n\t\t\t\tindex = scheduler.locate_holder_day(date);\r\n\t\t\t}\r\n\r\n\t\t\treturn !scheduler._ignores[index];\r\n\t\t},\r\n\r\n\t\tfindVisibleColumn: function(start, dir){\r\n\t\t\tvar date = start;\r\n\t\t\tdir = dir || 1;\r\n\t\t\tvar range = scheduler.getState();\r\n\r\n\t\t\twhile(!this.isDateVisible(date) && ((dir > 0 && date.valueOf() <= range.max_date.valueOf()) || (dir < 0 && date.valueOf() >= range.min_date.valueOf()))){\r\n\t\t\t\tdate = this.nextDateColumn(date, dir);\r\n\t\t\t}\r\n\r\n\t\t\treturn date;\r\n\t\t},\r\n\r\n\t\tnextDateColumn: function(start, dir){\r\n\t\t\tdir = dir || 1;\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[scheduler.getState().mode];\r\n\r\n\t\t\tvar date;\r\n\t\t\tif(timeline){\r\n\t\t\t\tdate = scheduler.date.add(start, dir * timeline.x_step, timeline.x_unit);\r\n\t\t\t}else{\r\n\t\t\t\tdate = scheduler.date.day_start(scheduler.date.add(start, dir, \"day\"));\r\n\t\t\t}\r\n\r\n\t\t\treturn date;\r\n\t\t},\r\n\r\n\t\tisVisible:function(from, to){\r\n\t\t\tif(!scheduler._ignores_detected)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tvar current = new Date(from);\r\n\r\n\t\t\twhile(current.valueOf() < to.valueOf()){\r\n\t\t\t\tif(this.isDateVisible(current)) return true;\r\n\t\t\t\tcurrent = this.nextDateColumn(current);\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t},\r\n\r\n\t\tnextSlot: function(slot, dir, view, extend){\r\n\t\t\tvar next;\r\n\t\t\tview = view || this._getMode();\r\n\r\n\t\t\tvar tempSlot = scheduler.$keyboardNavigation.TimeSlot.prototype.clone(slot);\r\n\r\n\t\t\tswitch (view){\r\n\t\t\t\tcase this._modes.units:\r\n\t\t\t\t\tnext = this.nextUnitsSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.timeline:\r\n\t\t\t\t\tnext = this.nextTimelineSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.year:\r\n\t\t\t\t\tnext = this.nextMonthSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.month:\r\n\t\t\t\t\tnext = this.nextMonthSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.weekAgenda:\r\n\t\t\t\t\tnext = this.nextWeekAgendaSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.list:\r\n\t\t\t\t\tnext = this.nextAgendaSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.dayColumns:\r\n\t\t\t\t\tnext = this.nextDaySlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(next.start_date.valueOf() >= next.end_date.valueOf()){\r\n\t\t\t\tnext = this.nextSlot(next, dir, view);\r\n\t\t\t}\r\n\r\n\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(next);\r\n\r\n\t\t},\r\n\r\n\t\textendSlot: function(slot, dir){\r\n\t\t\tvar view = this._getMode();\r\n\t\t\tvar next;\r\n\t\t\tswitch (view){\r\n\t\t\t\tcase this._modes.units:\r\n\t\t\t\t\tif(dir == \"left\" || dir == \"right\"){\r\n\t\t\t\t\t\tnext = this.nextUnitsSlot(slot, dir);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnext = this.extendUnitsSlot(slot, dir);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.timeline:\r\n\t\t\t\t\tif(dir == \"down\" || dir == \"up\"){\r\n\t\t\t\t\t\tnext = this.nextTimelineSlot(slot, dir);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnext = this.extendTimelineSlot(slot, dir);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.year:\r\n\t\t\t\t\tnext = this.extendMonthSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.month:\r\n\t\t\t\t\tnext = this.extendMonthSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.dayColumns:\r\n\t\t\t\t\tnext = this.extendDaySlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.weekAgenda:\r\n\t\t\t\t\tnext = this.extendWeekAgendaSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnext = slot;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tvar range = scheduler.getState();\r\n\t\t\tif(next.start_date.valueOf() < range.min_date.valueOf()){\r\n\t\t\t\tnext.start_date = this.findVisibleColumn(range.min_date);\r\n\t\t\t\tnext.start_date.setHours(scheduler.config.first_hour);\r\n\t\t\t}\r\n\r\n\t\t\tif(next.end_date.valueOf() > range.max_date.valueOf()){\r\n\t\t\t//\tnext.end_date = new Date(slot.end_date);\r\n\t\t\t\tnext.end_date = this.findVisibleColumn(range.max_date, -1);\r\n\t\t\t}\r\n\r\n\r\n\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(next);\r\n\t\t},\r\n\r\n\t\textendTimelineSlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"timeline\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\textendWeekAgendaSlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"weekAgenda\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\textendGenericSlot: function(allowedDirections, slot, direction, type){\r\n\t\t\tvar next;\r\n\t\t\tvar moveDate = slot.movingDate;\r\n\r\n\t\t\tif(!moveDate){\r\n\t\t\t\tmoveDate = allowedDirections[direction];\r\n\t\t\t}\r\n\r\n\t\t\tif(!moveDate || !allowedDirections[direction]){\r\n\t\t\t\treturn slot;\r\n\t\t\t}\r\n\r\n\t\t\tif(direction){\r\n\t\t\t\tnext = this.nextSlot({start_date: slot[moveDate], section: slot.section}, direction, type, true);\r\n\r\n\t\t\t\tif(next.start_date.valueOf() == slot.start_date.valueOf()){\r\n\t\t\t\t\tnext = this.nextSlot({start_date: next.start_date, section:next.section}, direction, type, true);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tnext.movingDate = moveDate;\r\n\t\t\t}else{\r\n\t\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(slot);\r\n\t\t\t}\r\n\r\n\t\t\tvar newDates = this.extendSlotDates(slot, next, next.movingDate);\r\n\r\n\t\t\tif(newDates.end_date.valueOf() <= newDates.start_date.valueOf()){\r\n\t\t\t\tnext.movingDate = next.movingDate == \"end_date\" ? \"start_date\" : \"end_date\";\r\n\t\t\t}\r\n\t\t\tnewDates = this.extendSlotDates(slot, next, next.movingDate);\r\n\r\n\t\t\tnext.start_date = newDates.start_date;\r\n\t\t\tnext.end_date = newDates.end_date;\r\n\t\t\treturn next;\r\n\t\t},\r\n\r\n\t\textendSlotDates: function(oldSlot, newSlot, dateDirection){\r\n\t\t\tvar res = {start_date:null, end_date:null};\r\n\r\n\t\t\tif(dateDirection == \"start_date\"){\r\n\t\t\t\tres.start_date = newSlot.start_date;\r\n\t\t\t\tres.end_date = oldSlot.end_date;\r\n\t\t\t}else{\r\n\t\t\t\tres.start_date = oldSlot.start_date;\r\n\t\t\t\tres.end_date = newSlot.start_date;\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\r\n\t\t},\r\n\r\n\t\textendMonthSlot: function(slot, direction){\r\n\t\t\tvar slot = this.extendGenericSlot({\r\n\t\t\t\t\t\"up\":\"start_date\",\r\n\t\t\t\t\t\"down\":\"end_date\",\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"month\"\r\n\t\t\t);\r\n\r\n\t\t\tslot.start_date.setHours(scheduler.config.first_hour);\r\n\t\t\tslot.end_date = scheduler.date.add(slot.end_date, -1, \"day\");\r\n\t\t\tslot.end_date.setHours(scheduler.config.last_hour);\r\n\t\t\treturn slot;\r\n\t\t},\r\n\r\n\t\textendUnitsSlot: function(slot, direction){\r\n\t\t\tvar next;\r\n\r\n\t\t\tswitch (direction){\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tnext = this.extendDaySlot(slot, direction);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnext = slot;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tnext.section = slot.section;\r\n\t\t\treturn next;\r\n\t\t},\r\n\t\textendDaySlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\t\"up\":\"start_date\",\r\n\t\t\t\t\t\"down\":\"end_date\",\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"dayColumns\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\tscrollSlot: function(dir){\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tvar slot = this.nextSlot(this, dir);\r\n\t\t\tif(slot.start_date.valueOf() < state.min_date.valueOf() || slot.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tscheduler.setCurrentView(new Date(slot.start_date));\r\n\t\t\t}\r\n\r\n\t\t\tthis.moveTo(slot);\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tthis.scrollSlot(\"left\");\r\n\t\t\t},\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tthis.scrollSlot(\"right\");\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\r\n\t\t\t\tvar mode = this._getMode();\r\n\t\t\t\tif(mode == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.scrollSlot(\"down\");\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"up\": function () {\r\n\t\t\t\tvar mode = this._getMode();\r\n\t\t\t\tif(mode == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.scrollSlot(\"up\");\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"shift+down\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"down\"));\r\n\t\t\t},\r\n\t\t\t\"shift+up\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"up\"));\r\n\t\t\t},\r\n\t\t\t\"shift+right\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"right\"));\r\n\t\t\t},\r\n\t\t\t\"shift+left\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"left\"));\r\n\t\t\t},\r\n\r\n\r\n\t\t\t\"enter\": function(){\r\n\t\t\t\tvar obj = {start_date: new Date(this.start_date), end_date: new Date(this.end_date)};\r\n\r\n\t\t\t\tvar mode = scheduler.getState().mode;\r\n\t\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\r\n\t\t\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\t\t\tobj[timeline.y_property] = this.section;\r\n\t\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\t\tvar unit = scheduler._props[mode];\r\n\t\t\t\t\tobj[unit.map_to] = this.section;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler.addEventNow(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.TimeSlot.prototype.bindAll(scheduler.$keyboardNavigation.TimeSlot.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.MinicalButton = function(div, index){\r\n\tthis.container = div;\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.MinicalButton.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar container = this.container;\r\n\t\t\treturn !!container.offsetWidth;// valid if container is visible\r\n\t\t},\r\n\r\n\t\tfallback: function(){\r\n\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(defaultSlot.isValid()){\r\n\t\t\t\treturn defaultSlot;\r\n\t\t\t}else{\r\n\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t}\r\n\t\t},\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.globalNode.disable();\r\n\t\t\tthis.container.removeAttribute(\"tabindex\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tthis.container.setAttribute(\"tabindex\", \"0\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\tif(!this.index){\r\n\t\t\t\treturn this.container.querySelector(\".dhx_cal_prev_button\");\r\n\t\t\t}else{\r\n\t\t\t\treturn this.container.querySelector(\".dhx_cal_next_button\");\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"right\": function(e){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, this.index ? 0 : 1));\r\n\t\t\t},\r\n\t\t\t\"left\": function(e){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, this.index ? 0 : 1));\r\n\t\t\t},\r\n\t\t\t\"down\": function(){\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, 0, 0);\r\n\t\t\t\tif(next && !next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"enter\": function(e){\r\n\t\t\t\tthis.getNode().click();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.MinicalButton.prototype.bindAll(scheduler.$keyboardNavigation.MinicalButton.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.MinicalCell = function(div, row, col){\r\n\tthis.container = div;\r\n\tthis.row = row || 0;\r\n\tthis.col = col || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.MinicalCell.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar grid = this._getGrid();\r\n\t\t\treturn !!(grid[this.row] && grid[this.row][this.col]);\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\tvar row = this.row;\r\n\t\t\tvar col = this.col;\r\n\t\t\tvar grid = this._getGrid();\r\n\t\t\tif(!grid[row]){\r\n\t\t\t\trow = 0;\r\n\t\t\t}\r\n\t\t\tvar dir = true;\r\n\t\t\tif(row > grid.length / 2){\r\n\t\t\t\tdir = false;\r\n\t\t\t}\r\n\r\n\t\t\tif(!grid[row]){\r\n\t\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t\tif(defaultSlot.isValid()){\r\n\t\t\t\t\treturn defaultSlot;\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(dir){\r\n\t\t\t\tfor(var c = col; grid[row] && c < grid[row].length; c++){\r\n\t\t\t\t\tif(!grid[row][c] && c == grid[row].length - 1){\r\n\t\t\t\t\t\trow++;\r\n\t\t\t\t\t\tcol = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(grid[row][c]){\r\n\t\t\t\t\t\treturn new scheduler.$keyboardNavigation.MinicalCell(this.container, row, c);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tfor(var c = col; grid[row] && c < grid[row].length; c--){\r\n\t\t\t\t\tif(!grid[row][c] && !c){\r\n\t\t\t\t\t\trow--;\r\n\t\t\t\t\t\tcol = grid[row].length - 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(grid[row][c]){\r\n\t\t\t\t\t\treturn new scheduler.$keyboardNavigation.MinicalCell(this.container, row, c);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn new scheduler.$keyboardNavigation.MinicalButton(this.container, 0);\r\n\t\t},\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.globalNode.disable();\r\n\r\n\t\t\tthis.container.removeAttribute(\"tabindex\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tthis.container.setAttribute(\"tabindex\", \"0\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\t\t_getNode: function(row, col){\r\n\t\t\treturn this.container.querySelector(\".dhx_year_body tr:nth-child(\"+(row + 1) + \") td:nth-child(\"+(col + 1)+\")\");\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\treturn this._getNode(this.row, this.col);\r\n\t\t},\r\n\r\n\t\t_getGrid: function(){\r\n\t\t\tvar rows = this.container.querySelectorAll(\".dhx_year_body tr\");\r\n\t\t\tvar grid = [];\r\n\t\t\tfor(var i = 0; i < rows.length; i++){\r\n\t\t\t\tgrid[i] = [];\r\n\t\t\t\tvar row = rows[i];\r\n\t\t\t\tvar cells = row.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var c = 0; c < cells.length; c++){\r\n\t\t\t\t\tvar cell = cells[c];\r\n\t\t\t\t\tvar enabled = true;\r\n\t\t\t\t\tvar css = scheduler._getClassName(cell);\r\n\t\t\t\t\tif(css.indexOf(\"dhx_after\") > -1 || css.indexOf(\"dhx_before\") > -1 || css.indexOf(\"dhx_scale_ignore\") > -1){\r\n\t\t\t\t\t\tenabled = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tgrid[i][c] = enabled;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn grid;\r\n\t\t},\r\n\r\n\r\n\t\tkeys: {\r\n\t\t\t\"right\": function(e){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row;\r\n\t\t\t\tvar newCol = this.col + 1;\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tif(grid[newRow + 1]){\r\n\t\t\t\t\t\tnewRow = newRow + 1;\r\n\t\t\t\t\t\tnewCol = 0;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnewCol = this.col;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"left\": function(e){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row;\r\n\t\t\t\tvar newCol = this.col - 1;\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tif(grid[newRow - 1]){\r\n\t\t\t\t\t\tnewRow = newRow - 1;\r\n\t\t\t\t\t\tnewCol = grid[newRow].length - 1;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnewCol = this.col;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"down\": function(){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row + 1;\r\n\t\t\t\tvar newCol = this.col;\r\n\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tnewRow = this.row;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"up\": function(){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row - 1;\r\n\t\t\t\tvar newCol = this.col;\r\n\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tvar index = 0;\r\n\t\t\t\t\tif(this.col > grid[this.row].length / 2){\r\n\t\t\t\t\t\tindex = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, index));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.moveTo(next);\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\t\t\t\"enter\": function(e){\r\n\t\t\t\tthis.getNode().querySelector(\".dhx_month_head\").click();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.MinicalCell.prototype.bindAll(scheduler.$keyboardNavigation.MinicalCell.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.DataArea = function(index){\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.DataArea.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\tgetNode: function(index){\r\n\t\t\treturn scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t},\r\n\r\n\t\t_handlers:null,\r\n\r\n\t\tisValid: function(){\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tfallback:function(){\r\n\t\t\treturn this;\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"up,down,right,left\":function(){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.DataArea.prototype.bindAll(scheduler.$keyboardNavigation.DataArea.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.dispatcher = {\r\n\tisActive: false,\r\n\tactiveNode: null,\r\n\tglobalNode: new scheduler.$keyboardNavigation.SchedulerNode(),\r\n\r\n\tkeepScrollPosition: function (callback) {\r\n\t\tvar top, left;\r\n\r\n\t\tvar scrollable = scheduler.$container.querySelector(\".dhx_timeline_scrollable_data\");\r\n\t\tif(!scrollable){\r\n\t\t\tscrollable = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t}\r\n\r\n\t\tif(scrollable){\r\n\t\t\ttop = scrollable.scrollTop;\r\n\t\t\tleft = scrollable.scrollLeft;\r\n\t\t}\r\n\r\n\t\tcallback();\r\n\r\n\t\tif(scrollable){\r\n\t\t\tscrollable.scrollTop = top;\r\n\t\t\tscrollable.scrollLeft = left;\r\n\t\t}\r\n\t},\r\n\tenable: function(){\r\n\t\tif(!scheduler.$container){\r\n\t\t\t// do nothing if not initialized\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.isActive = true;\r\n\t\tvar self = this;\r\n\t\tthis.keepScrollPosition(function () {\r\n\t\t\tself.globalNode.enable();\r\n\t\t\tself.setActiveNode(self.getActiveNode());\r\n\t\t});\r\n\t},\r\n\r\n\tdisable: function(){\r\n\t\tthis.isActive = false;\r\n\t\tthis.globalNode.disable();\r\n\t},\r\n\r\n\tisEnabled: function(){\r\n\t\treturn !!this.isActive;\r\n\t},\r\n\r\n\tgetDefaultNode: function(){\r\n\t\treturn this.globalNode.getDefaultNode();\r\n\t},\r\n\r\n\tsetDefaultNode: function() {\r\n\t\tthis.setActiveNode(this.getDefaultNode());\r\n\t},\r\n\r\n\tgetActiveNode: function(){\r\n\t\tvar node = this.activeNode;\r\n\t\tif(node && !node.isValid()){\r\n\t\t\tnode = node.fallback();\r\n\t\t}\r\n\t\treturn node;\r\n\t},\r\n\r\n\tfocusGlobalNode: function(){\r\n\t\tthis.blurNode(this.globalNode);\r\n\t\tthis.focusNode(this.globalNode);\r\n\t},\r\n\r\n\tsetActiveNode: function(el){\r\n\t\tif(!el || !el.isValid())\r\n\t\t\treturn;\r\n\r\n\t\tif(this.activeNode){\r\n\t\t\tif(this.activeNode.compareTo(el)){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(this.isEnabled()){\r\n\t\t\tthis.blurNode(this.activeNode);\r\n\t\t\tthis.activeNode = el;\r\n\t\t\tthis.focusNode(this.activeNode);\r\n\t\t}\r\n\t},\r\n\r\n\tfocusNode: function(el){\r\n\t\tif(el && el.focus){\r\n\t\t\tel.focus();\r\n\t\t\tif(el.getNode && document.activeElement != el.getNode()){\r\n\t\t\t\tthis.setActiveNode(new scheduler.$keyboardNavigation.DataArea());\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tblurNode: function(el){\r\n\t\tif(el && el.blur){\r\n\t\t\tel.blur();\r\n\t\t}\r\n\t},\r\n\r\n\tgetInlineEditor: function(id){\r\n\t\tvar editor = scheduler.$container.querySelector(\".dhx_cal_editor[\"+scheduler.config.event_attribute+\"='\"+id+\"'] textarea\");\r\n\t\tif(editor && editor.offsetWidth){\r\n\t\t\t// if exists and visible\r\n\t\t\treturn editor;\r\n\t\t}\r\n\t\treturn null;\r\n\t},\r\n\r\n\tkeyDownHandler: function (e) {\r\n\r\n\t\tif(e.defaultPrevented){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar activeElement = this.getActiveNode();\r\n\r\n\t\tif(scheduler.$keyboardNavigation.isModal() &&\r\n\t\t\t!(activeElement && activeElement.container && scheduler.utils.dom.locateCss({target:activeElement.container}, \"dhx_minical_popup\", false)))\r\n\t\t\treturn;\r\n\r\n\t\tif(scheduler.getState().editor_id && this.getInlineEditor(scheduler.getState().editor_id))\r\n\t\t\treturn;\r\n\r\n\t\tif (!this.isEnabled())\r\n\t\t\treturn;\r\n\r\n\t\te = e || window.event;\r\n\r\n\t\tvar schedulerNode = this.globalNode;\r\n\r\n\t\tvar command = scheduler.$keyboardNavigation.shortcuts.getCommandFromEvent(e);\r\n\r\n\t\tif(!activeElement){\r\n\t\t\tthis.setDefaultNode();\r\n\t\t}else if(activeElement.findHandler(command)){\r\n\t\t\tactiveElement.doAction(command, e);\r\n\t\t}else if(schedulerNode.findHandler(command)){\r\n\t\t\tschedulerNode.doAction(command, e);\r\n\t\t}\r\n\r\n\t},\r\n\r\n\t_timeout: null,\r\n\tdelay: function(callback, delay){\r\n\r\n\t\tclearTimeout(this._timeout);\r\n\t\tthis._timeout = setTimeout(callback, delay || 1);\r\n\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation._minicalendars = [];\r\n\r\nscheduler.$keyboardNavigation.isMinical = function(node){\r\n\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\tif(this.isChildOf(node, minicalendars[i]))\r\n\t\t\treturn true;\r\n\t}\r\n\treturn false;\r\n};\r\n\r\nscheduler.$keyboardNavigation.isChildOf = function(child, parent){\r\n\twhile(child && child !== parent){\r\n\t\tchild = child.parentNode;\r\n\t}\r\n\r\n\treturn !!(child === parent);\r\n};\r\n\r\nscheduler.$keyboardNavigation.patchMinicalendar = function(){\r\n\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\tfunction focusMinical(e){\r\n\t\tvar target = e.target;\r\n\r\n\t\tdispatcher.enable();\r\n\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.MinicalButton(target, 0));\r\n\t}\r\n\r\n\tfunction minicalClick(e){\r\n\t\tvar target = e.target || e.srcElement;\r\n\r\n\t\tvar prev = scheduler.utils.dom.locateCss(e, \"dhx_cal_prev_button\", false);\r\n\t\tvar next = scheduler.utils.dom.locateCss(e, \"dhx_cal_next_button\", false);\r\n\t\tvar cell = scheduler.utils.dom.locateCss(e, \"dhx_year_body\", false);\r\n\r\n\t\tvar rowIndex = 0;\r\n\t\tvar cellIndex = 0;\r\n\t\tif(cell){\r\n\t\t\tvar tr;\r\n\t\t\tvar td;\r\n\t\t\tvar current = target;\r\n\t\t\twhile(current && current.tagName.toLowerCase() != \"td\"){\r\n\t\t\t\tcurrent = current.parentNode;\r\n\t\t\t}\r\n\t\t\tif(current){\r\n\t\t\t\ttd = current;\r\n\t\t\t\ttr = td.parentNode;\r\n\t\t\t}\r\n\r\n\t\t\tif(tr && td){\r\n\t\t\t\tvar rows = tr.parentNode.querySelectorAll(\"tr\");\r\n\t\t\t\tfor(var i = 0; i < rows.length; i++){\r\n\t\t\t\t\tif(rows[i] == tr){\r\n\t\t\t\t\t\trowIndex = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tvar cells = tr.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\t\t\tif(cells[i] == td){\r\n\t\t\t\t\t\tcellIndex = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar root = e.currentTarget;\r\n\t\tdispatcher.delay(function(){\r\n\t\t\tif(prev || next || cell){\r\n\r\n\t\t\t\tvar element;\r\n\t\t\t\tif(prev){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalButton(root, 0);\r\n\t\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.MinicalButton(root, 0));\r\n\t\t\t\t}else if(next){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalButton(root, 1);\r\n\t\t\t\t}else if(cell){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalCell(root, rowIndex, cellIndex);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(element){\r\n\r\n\t\t\t\t\tdispatcher.enable();\r\n\t\t\t\t\tif(element.isValid()){\r\n\t\t\t\t\t\tdispatcher.activeNode = null;\r\n\t\t\t\t\t\tdispatcher.setActiveNode(element);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t}\r\n\r\n\tif(scheduler.renderCalendar){\r\n\t\tvar renderMinical = scheduler.renderCalendar;\r\n\t\tscheduler.renderCalendar = function(){\r\n\t\t\tvar cal = renderMinical.apply(this, arguments);\r\n\t\t\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\r\n\t\t\tscheduler.eventRemove(cal, \"click\", minicalClick);\r\n\t\t\tscheduler.event(cal, \"click\", minicalClick);\r\n\r\n\t\t\tscheduler.eventRemove(cal, \"focus\", focusMinical);\r\n\t\t\tscheduler.event(cal, \"focus\", focusMinical);\r\n\r\n\t\t\tvar added = false;\r\n\t\t\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\t\t\tif(minicalendars[i] == cal){\r\n\t\t\t\t\tadded = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(!added)\r\n\t\t\t\tminicalendars.push(cal);\r\n\r\n\t\t\tif(dispatcher.isEnabled()){\r\n\t\t\t\tvar node = dispatcher.getActiveNode();\r\n\t\t\t\tif(node && node.container == cal){\r\n\t\t\t\t\tdispatcher.focusNode(node);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcal.setAttribute(\"tabindex\", \"0\");\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tcal.setAttribute(\"tabindex\", \"0\");\r\n\t\t\t}\r\n\t\t\treturn cal;\r\n\t\t};\r\n\t}\r\n\r\n\tif(scheduler.destroyCalendar){\r\n\t\tvar destroyMinical = scheduler.destroyCalendar;\r\n\t\tscheduler.destroyCalendar = function(cal, force){\r\n\t\t\tcal = cal || (scheduler._def_count ? scheduler._def_count.firstChild : null);\r\n\t\t\tvar res = destroyMinical.apply(this, arguments);\r\n\r\n\t\t\tif(!cal || !cal.parentNode){\r\n\t\t\t\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\t\t\t\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\t\t\t\tif(minicalendars[i] == cal){\r\n\t\t\t\t\t\tscheduler.eventRemove(minicalendars[i], \"focus\", focusMinical);\r\n\t\t\t\t\t\tminicalendars.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn res;\r\n\t\t};\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\r\n\tthis.layers.sort(function(a, b){\r\n\t\treturn a.zIndex - b.zIndex;\r\n\t});\r\n\r\n\tscheduler._dp_init=function(dp){\r\n\t\tdp._methods=[\"_set_event_text_style\",\"\",\"changeEventId\",\"deleteEvent\"];\r\n\r\n\t\tthis.attachEvent(\"onEventAdded\",function(id){\r\n\t\t\tif (!this._loading && this.validId(id) && this.getEvent(id) && this.getEvent(id).layer == dp.layer)\r\n\t\t\t\tdp.setUpdated(id,true,\"inserted\");\r\n\t\t});\r\n\t\tthis.attachEvent(\"onBeforeEventDelete\",function(id){\r\n\t\t\tif(this.getEvent(id) && this.getEvent(id).layer == dp.layer) {\r\n\t\t\t\tif (!this.validId(id)) return;\r\n\t\t\t\tvar z=dp.getState(id);\r\n\r\n\t\t\t\tif (z==\"inserted\" || this._new_event) { dp.setUpdated(id,false);\t\treturn true; }\r\n\t\t\t\tif (z==\"deleted\") return false;\r\n\t\t\t\tif (z==\"true_deleted\") return true;\r\n\r\n\t\t\t\tdp.setUpdated(id,true,\"deleted\");\r\n\t\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\telse return true;\r\n\t\t});\r\n\t\tthis.attachEvent(\"onEventChanged\",function(id){\r\n\t\t\tif (!this._loading && this.validId(id) && this.getEvent(id) && this.getEvent(id).layer == dp.layer)\r\n\t\t\t\tdp.setUpdated(id,true,\"updated\");\r\n\t\t});\r\n\r\n\t\tdp._getRowData=function(id,pref){\r\n\t\t\tvar ev=this.obj.getEvent(id);\r\n\t\t\tvar data = {};\r\n\r\n\t\t\tfor (var a in ev){\r\n\t\t\t\tif (a.indexOf(\"_\")===0) continue;\r\n\t\t\t\tif (ev[a] && ev[a].getUTCFullYear) //not very good, but will work\r\n\t\t\t\t\tdata[a] = this.obj._helpers.formatDate(ev[a]);\r\n\t\t\t\telse\r\n\t\t\t\t\tdata[a] = ev[a];\r\n\t\t\t}\r\n\t\t\treturn data;\r\n\t\t};\r\n\t\tdp._clearUpdateFlag=function(){};\r\n\r\n\t\tdp.attachEvent(\"insertCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"updateCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"deleteCallback\", function(upd, id) {\r\n\t\t\tthis.obj.setUserData(id, this.action_param, \"true_deleted\");\r\n\t\t\tthis.obj.deleteEvent(id);\r\n\t\t});\r\n\t};\r\n\r\n\t(function() {\r\n var _cloneObj = function(obj){\r\n if(obj === null || typeof(obj) != 'object')\r\n return obj;\r\n var temp = new obj.constructor();\r\n for(var key in obj)\r\n temp[key] = _cloneObj(obj[key]);\r\n return temp;\r\n };\r\n\r\n\t\tscheduler._dataprocessors = [];\r\n\t\tscheduler._layers_zindex = {};\r\n\t\tfor(var i=0; i= scheduler.config.collision_limit);\r\n\t});\r\n\r\n\tscheduler.addEvent=function(start_date,end_date,text,id,extra_data){\r\n\t\tvar ev=start_date;\r\n\t\tif (arguments.length!=1){\r\n\t\t\tev=extra_data||{};\r\n\t\t\tev.start_date=start_date;\r\n\t\t\tev.end_date=end_date;\r\n\t\t\tev.text=text;\r\n\t\t\tev.id=id;\r\n\t\t\tev.layer = this.defaultLayer;\r\n\t\t}\r\n\t\tev.id = ev.id||scheduler.uid();\r\n\t\tev.text = ev.text||\"\";\r\n\r\n\r\n\t\tif (typeof ev.start_date == \"string\") ev.start_date=this.templates.api_date(ev.start_date);\r\n\t\tif (typeof ev.end_date == \"string\") ev.end_date=this.templates.api_date(ev.end_date);\r\n\t\tev._timed=this.isOneDayEvent(ev);\r\n\r\n\t\tvar is_new=!this._events[ev.id];\r\n\t\tthis._events[ev.id]=ev;\r\n\t\tthis.event_updated(ev);\r\n\t\tif (!this._loading)\r\n\t\t\tthis.callEvent(is_new?\"onEventAdded\":\"onEventChanged\",[ev.id,ev]);\r\n\t};\r\n\r\n\tthis._evs_layer = {};\r\n\tfor (var i = 0; i < this.layers.length; i++) { // array in object for each layer\r\n\t\tthis._evs_layer[this.layers[i].name] = [];\r\n\t}\r\n\r\n\tscheduler.addEventNow=function(start,end,e){\r\n\t\tvar base = {};\r\n\t\tif (typeof start == \"object\"){\r\n\t\t\tbase = start;\r\n\t\t\tstart = null;\r\n\t\t}\r\n\r\n\t\tvar d = (this.config.event_duration||this.config.time_step)*60000;\r\n\t\tif (!start) start = Math.round((scheduler._currentDate()).valueOf()/d)*d;\r\n\t\tvar start_date = new Date(start);\r\n\t\tif (!end){\r\n\t\t\tvar start_hour = this.config.first_hour;\r\n\t\t\tif (start_hour > start_date.getHours()){\r\n\t\t\t\tstart_date.setHours(start_hour);\r\n\t\t\t\tstart = start_date.valueOf();\r\n\t\t\t}\r\n\t\t\tend = start+d;\r\n\t\t}\r\n\r\n\r\n\t\tbase.start_date = base.start_date||start_date;\r\n\t\tbase.end_date = base.end_date||new Date(end);\r\n\t\tbase.text = base.text||this.locale.labels.new_event;\r\n\t\tbase.id = this._drag_id = this.uid();\r\n\t\tbase.layer = this.defaultLayer;\r\n\t\tthis._drag_mode=\"new-size\";\r\n\r\n\t\tthis._loading=true;\r\n\t\tthis.addEvent(base);\r\n\t\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\t\tthis._loading=false;\r\n\r\n\t\tthis._drag_event={}; //dummy , to trigger correct event updating logic\r\n\t\tthis._on_mouse_up(e);\r\n\t};\r\n\r\n\tscheduler._t_render_view_data = function(events) { // helper\r\n\t\tif (this.config.multi_day && !this._table_view) {\r\n\t\t\tvar tvs = [];\r\n\t\t\tvar tvd = [];\r\n\t\t\tfor (var k = 0; k < events.length; k++) {\r\n\t\t\t\tif (events[k]._timed)\r\n\t\t\t\t\ttvs.push(events[k]);\r\n\t\t\t\telse\r\n\t\t\t\t\ttvd.push(events[k]);\r\n\t\t\t}\r\n\t\t\tthis._table_view = true;\r\n\t\t\tthis.render_data(tvd);\r\n\t\t\tthis._table_view = false;\r\n\t\t\tthis.render_data(tvs);\r\n\t\t}\r\n\t\telse\r\n\t\t\tthis.render_data(events);\r\n\t};\r\n\r\n\tscheduler.render_view_data = function(){\r\n\t\tif (this._not_render) {\r\n\t\t\tthis._render_wait = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._render_wait = false;\r\n\r\n\t\tthis.clear_view();\r\n\r\n\t\tthis._evs_layer = {};\r\n\t\tfor (var i = 0; i < this.layers.length; i++) { // array in object for each layer\r\n\t\t\tthis._evs_layer[this.layers[i].name] = [];\r\n\t\t}\r\n\r\n\t\tvar evs = this.get_visible_events();\r\n\t\tfor (var i = 0; i < evs.length; i++) { // filling layer arrays with events\r\n\t\t\tif(this._evs_layer[evs[i].layer])\r\n\t\t\t\tthis._evs_layer[evs[i].layer].push(evs[i]);\r\n\t\t}\r\n\r\n\t\tif(this._mode == 'month') { // old logic is used\r\n\t\t\tvar tevs = [];\r\n\t\t\tfor (var i = 0; i < this.layers.length; i++) {\r\n\t\t\t\tif (this.layers[i].visible)\r\n\t\t\t\t\ttevs = tevs.concat(this._evs_layer[this.layers[i].name]);\r\n\t\t\t}\r\n\t\t\tthis._t_render_view_data(tevs);\r\n\t\t}\r\n\t\telse { // week, day; should use new logic\r\n\t\t\tfor (var i = 0; i < this.layers.length; i++) {\r\n\t\t\t\tif (this.layers[i].visible) {\r\n\t\t\t\t\tvar evs_layer = this._evs_layer[this.layers[i].name];\r\n\t\t\t\t\tthis._t_render_view_data(evs_layer);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._render_v_bar=function(ev,x,y,w,h,style,contentA,contentB,bottom){\r\n\t\tvar id = ev.id;\r\n\r\n\t\tif(contentA.indexOf('
';\r\n\t\thtml+='
 
';\r\n\t\thtml+='
'+contentA+'
';\r\n\t\thtml+='
'+contentB+'
';\r\n\t\thtml+='
';\r\n\r\n\t\td.innerHTML=html;\r\n\t\td.style.zIndex = 100;\r\n\t\treturn d.firstChild;\r\n\t};\r\n\r\n\tscheduler.render_event_bar=function(ev){\r\n\t\tvar parent=this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tvar x=this._colsS[ev._sday];\r\n\t\tvar x2=this._colsS[ev._eday];\r\n\t\tif (x2==x) x2=this._colsS[ev._eday+1];\r\n\t\tvar hb = this.xy.bar_height;\r\n\r\n\t\tvar y=this._colsS.heights[ev._sweek]+(this._colsS.height?(this.xy.month_scale_height+2):2)+ev._sorder*hb;\r\n\r\n\t\tvar d=document.createElement(\"div\");\r\n\t\tvar cs = ev._timed?\"dhx_cal_event_clear\":\"dhx_cal_event_line\";\r\n\t\tvar cse = (scheduler.templates['event_class_'+ev.layer])?scheduler.templates['event_class_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_class(ev.start_date,ev.end_date,ev);\r\n\t\tif (cse) cs=cs+\" \"+cse;\r\n\r\n\t\tvar html='
';\r\n\r\n\t\tif (ev._timed)\r\n\t\t\thtml+=(scheduler.templates['event_bar_date_'+ev.layer])?scheduler.templates['event_bar_date_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_bar_date(ev.start_date,ev.end_date,ev);\r\n\t\thtml+=( (scheduler.templates['event_bar_text_'+ev.layer])?scheduler.templates['event_bar_text_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_bar_text(ev.start_date,ev.end_date,ev) + '
)');\r\n\t\thtml+='';\r\n\r\n\t\td.innerHTML=html;\r\n\r\n\t\tthis._rendered.push(d.firstChild);\r\n\t\tparent.appendChild(d.firstChild);\r\n\t};\r\n\r\n\tscheduler.render_event=function(ev){\r\n\t\tvar menu = scheduler.xy.menu_width;\r\n\t\tif(scheduler.getLayer(ev.layer).noMenu)\r\n\t\t\tmenu = 0;\r\n\r\n\t\tif (ev._sday<0) return; //can occur in case of recurring event during time shift\r\n\t\tvar parent=scheduler.locate_holder(ev._sday);\r\n\t\tif (!parent) return; //attempt to render non-visible event\r\n\t\tvar sm = ev.start_date.getHours()*60+ev.start_date.getMinutes();\r\n\t\tvar em = (ev.end_date.getHours()*60+ev.end_date.getMinutes())||(scheduler.config.last_hour*60);\r\n\r\n\t\tvar top = (Math.round((sm*60*1000-this.config.first_hour*60*60*1000)*this.config.hour_size_px/(60*60*1000)))%(this.config.hour_size_px*24)+1; //42px/hour\r\n\t\tvar height = Math.max(scheduler.xy.min_event_height,(em-sm)*this.config.hour_size_px/60)+1; //42px/hour\r\n\t\t\r\n\t\tvar width=Math.floor((parent.clientWidth-menu)/ev._count);\r\n\t\tvar left=ev._sorder*width+1;\r\n\t\tif (!ev._inner) width=width*(ev._count-ev._sorder);\r\n\r\n\r\n\r\n\t\tvar d=this._render_v_bar(ev.id,menu+left,top,width,height,ev._text_style,scheduler.templates.event_header(ev.start_date,ev.end_date,ev),scheduler.templates.event_text(ev.start_date,ev.end_date,ev));\r\n\r\n\t\tthis._rendered.push(d);\r\n\t\tparent.appendChild(d);\r\n\r\n\t\tleft=left+parseInt(parent.style.left,10)+menu;\r\n\r\n\t\ttop+=this._dy_shift; //corrupt top, to include possible multi-day shift\r\n\t\td.style.zIndex = this._layers_zindex[ev.layer];\r\n\r\n\t\tif (this._edit_id==ev.id){\r\n\t\t\td.style.zIndex = parseInt(d.style.zIndex)+1; //fix overlapping issue\r\n\t\t\tvar new_zIndex = d.style.zIndex;\r\n\t\t\twidth=Math.max(width-4,scheduler.xy.editor_width);\r\n\t\t\tvar d=document.createElement(\"div\");\r\n\t\t\td.setAttribute(\"event_id\",ev.id); // for backward compatibility\r\n\t\t\td.setAttribute(this.config.event_attribute,ev.id);\r\n\t\t\tthis.set_xy(d,width,height-20,left,top+14);\r\n\t\t\td.className=\"dhx_cal_editor\";\r\n\t\t\td.style.zIndex = new_zIndex;\r\n\t\t\tvar d2=document.createElement(\"div\");\r\n\t\t\tthis.set_xy(d2,width-6,height-26);\r\n\t\t\td2.style.cssText+=\";margin:2px 2px 2px 2px;overflow:hidden;\";\r\n\r\n\r\n\t\t\td2.style.zIndex = new_zIndex;\r\n\t\t\td.appendChild(d2);\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].appendChild(d);\r\n\t\t\tthis._rendered.push(d);\r\n\r\n\t\t\td2.innerHTML=\"\";\r\n\r\n\t\t\tthis._editor=d2.firstChild;\r\n\t\t\tthis._editor.addEventListener(\"keypress\", function(e){\r\n\t\t\t\tif (e.shiftKey) return true;\r\n\t\t\t\tvar code= e.keyCode;\r\n\t\t\t\tif (code==scheduler.keys.edit_save) scheduler.editStop(true);\r\n\t\t\t\tif (code==scheduler.keys.edit_cancel) scheduler.editStop(false);\r\n\t\t\t});\r\n\t\t\tthis._editor.addEventListener(\"selectstart\", function(e){ e.cancelBubble=true; return true; });\r\n\t\t\td2.firstChild.focus();\r\n\t\t\t//IE and opera can add x-scroll during focusing\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].scrollLeft=0;\r\n\t\t\td2.firstChild.select();\r\n\t\t}\r\n\t\tif (this._select_id==ev.id){\r\n\t\t\td.style.zIndex = parseInt(d.style.zIndex)+1; //fix overlapping issue\r\n\t\t\tvar icons=this.config[\"icons_\"+((this._edit_id==ev.id)?\"edit\":\"select\")];\r\n\t\t\tvar icons_str=\"\";\r\n\t\t\tfor (var i=0; i\";\r\n\t\t\tvar obj = this._render_v_bar(ev.id,left-menu+1,top,menu,icons.length*20+26,\"\",\"
\",icons_str,true);\r\n\t\t\tobj.style.left=left-menu+1;\r\n\t\t\tobj.style.zIndex = d.style.zIndex;\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].appendChild(obj);\r\n\t\t\tthis._rendered.push(obj);\r\n\t\t}\r\n\r\n\t};\r\n\r\n scheduler.filter_agenda = function(id, event) {\r\n var layer = scheduler.getLayer(event.layer);\r\n return (layer && layer.visible);\r\n };\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.limit_start = null;\r\nscheduler.config.limit_end = null;\r\nscheduler.config.limit_view = false;\r\nscheduler.config.check_limits = true;\r\n\r\nscheduler._temp_limit_scope = function(){\r\n\tvar before = null;\r\n\tvar dhx_time_block = \"dhx_time_block\";\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\",function(om,od,nm,nd){\r\n\r\n\t\tfunction isBlocked(date, mode){\r\n\t\t\tvar limit_start = scheduler.config.limit_start,\r\n\t\t\t\tlimit_end = scheduler.config.limit_end,\r\n\t\t\t\tdate_end = scheduler.date.add(date,1,mode);\r\n\r\n\t\t\treturn (date.valueOf() > limit_end.valueOf() || date_end <= limit_start.valueOf());\r\n\t\t}\r\n\r\n\t\tif (scheduler.config.limit_view){\r\n\t\t\tnd = nd||od; nm = nm||om;\r\n\t\t\tif (isBlocked(nd, nm) && !(od.valueOf() == nd.valueOf())){\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar resetDate = !isBlocked(od, nm) ? od : scheduler.config.limit_start;\r\n\r\n\t\t\t\t\tscheduler.setCurrentView(!isBlocked(resetDate, nm) ? resetDate : null, nm);\r\n\t\t\t\t},1);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onMouseDown\", function(classname) {\r\n\t\treturn !(classname == dhx_time_block);\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeDrag\",function(id){\r\n\t\tif (!id) return true;\r\n\t\treturn scheduler.checkLimitViolation(scheduler.getEvent(id));\r\n\t});\r\n\tscheduler.attachEvent(\"onClick\", function (event_id, native_event_object){\r\n\t\treturn scheduler.checkLimitViolation(scheduler.getEvent(event_id));\r\n });\r\n\tscheduler.attachEvent(\"onBeforeLightbox\",function(id){\r\n\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tbefore = [ev.start_date, ev.end_date];\r\n\t\treturn scheduler.checkLimitViolation(ev);\r\n\t});\r\n\tscheduler.attachEvent(\"onEventSave\", function(id, data, is_new_event) {\r\n\r\n\t\t//lightbox may not have 'time' section\r\n\t\tif(!(data.start_date && data.end_date)){\r\n\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\tdata.start_date = new Date(ev.start_date);\r\n\t\t\tdata.end_date = new Date(ev.end_date);\r\n\t\t}\r\n\r\n\t\tif(data.rec_type){\r\n\t\t\t//_roll_back_dates modifies start_date of recurring event, need to check limits after modification\r\n\t\t\t// use a copy to keep original event unchanged\r\n\t\t\tvar data_copy = scheduler._lame_clone(data);\r\n\t\t\tscheduler._roll_back_dates(data_copy);\r\n\t\t\treturn scheduler.checkLimitViolation(data_copy);\r\n\t\t}\r\n\t\treturn scheduler.checkLimitViolation(data);\r\n\t});\r\n\tscheduler.attachEvent(\"onEventAdded\",function(id){\r\n\t\tif (!id) return true;\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif (!scheduler.checkLimitViolation(ev) && scheduler.config.limit_start && scheduler.config.limit_end) {\r\n\t\t\t//if newly created event is outside of limited time - crop it, leaving only allowed time\r\n\t\t\tif (ev.start_date < scheduler.config.limit_start) {\r\n\t\t\t\tev.start_date = new Date(scheduler.config.limit_start);\r\n\t\t\t}\r\n\t\t\tif (ev.start_date.valueOf() >= scheduler.config.limit_end.valueOf()) {\r\n\t\t\t\tev.start_date = this.date.add(scheduler.config.limit_end, -1, \"day\");\r\n\t\t\t}\r\n\t\t\tif (ev.end_date < scheduler.config.limit_start) {\r\n\t\t\t\tev.end_date = new Date(scheduler.config.limit_start);\r\n\t\t\t}\r\n\t\t\tif (ev.end_date.valueOf() >= scheduler.config.limit_end.valueOf()) {\r\n\t\t\t\tev.end_date = this.date.add(scheduler.config.limit_end, -1, \"day\");\r\n\t\t\t}\r\n\t\t\tif (ev.start_date.valueOf() >= ev.end_date.valueOf()) {\r\n\t\t\t\tev.end_date = this.date.add(ev.start_date, (this.config.event_duration||this.config.time_step), \"minute\");\r\n\t\t\t}\r\n\t\t\tev._timed=this.isOneDayEvent(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\",function(id){\r\n\t\tif (!id) return true;\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif (!scheduler.checkLimitViolation(ev)){\r\n\t\t\tif (!before) return false;\r\n\t\t\tev.start_date = before[0];\r\n\t\t\tev.end_date = before[1];\r\n\t\t\tev._timed=this.isOneDayEvent(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeEventChanged\",function(ev, native_object, is_new){\r\n\t\treturn scheduler.checkLimitViolation(ev);\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeEventCreated\", function(ev) { // native event\r\n\t\tvar start_date = scheduler.getActionData(ev).date;\r\n\t\tvar event = {\r\n\t\t\t_timed: true,\r\n\t\t\tstart_date: start_date,\r\n\t\t\tend_date: scheduler.date.add(start_date, scheduler.config.time_step, \"minute\")\r\n\t\t};\r\n\t\treturn scheduler.checkLimitViolation(event);\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", function(){\r\n\t\tscheduler._mark_now();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onAfterSchedulerResize\", function(){\r\n\t\twindow.setTimeout(function(){ \r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler._mark_now(); \r\n\t\t}, 1);\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\t\tscheduler._mark_now_timer = window.setInterval(function() {\r\n\t\t\tif(!scheduler._is_initialized())\r\n\t\t\t\treturn;\r\n\t\t\tscheduler._mark_now();\r\n\t\t}, 60000);\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tclearInterval(scheduler._mark_now_timer);\r\n\t});\r\n\r\n};\r\nscheduler._temp_limit_scope();\r\n\r\n\r\n}","import { GoogleMapAdapter } from \"./gMapAdapter\";\r\nimport { OpenStreetMapAdapter } from \"./osmMapAdapter\";\r\nimport { MapboxAdapter } from \"./mapboxAdapter\";\r\nimport { IMapAdapter, ICalendarEvent, IMapSettings } from \"./types\";\r\n\r\ndeclare let google: any;\r\n\r\nexport default function(scheduler: any){\r\n\t\r\nlet mapAdapter: IMapAdapter | null = null;\r\nlet eventHandlerIds: number[] = [];\r\nconst adapters: { [name:string]: IMapAdapter } = {\r\n\tgoogleMap: new GoogleMapAdapter(scheduler),\r\n\topenStreetMaps: new OpenStreetMapAdapter(scheduler),\r\n\tmapbox: new MapboxAdapter(scheduler)\r\n}\r\n\r\nif(!scheduler.ext){\r\n\tscheduler.ext = {};\r\n}\r\nscheduler.ext.mapView = {\r\n\tcreateAdapter: function():IMapAdapter{\r\n\t\treturn adapters[scheduler.config.map_view_provider];\r\n\t},\r\n\tcreateMarker: function(config){\r\n\t\treturn new google.maps.Marker(config);\r\n\t},\r\n\tcurrentAdapter: null,\r\n\tadapters\r\n};\r\nscheduler._latLngUpdate = false; // flag for updating events which don't have event.lat and event.lng\r\nscheduler._eventLocationChanged = false; // flag for checking if the location of the event is changed\r\nscheduler.config.map_view_provider = \"googleMap\";\r\nscheduler.config.map_settings = {\r\n\tinitial_position: {\r\n\t lat: 48.724,\r\n\t lng: 8.215\r\n\t},\r\n\terror_position: {\r\n\t lat: 15,\r\n\t lng: 15\r\n\t},\r\n\tinitial_zoom: 1,\r\n\tzoom_after_resolve: 15,\r\n\tinfo_window_max_width: 300,\r\n\tresolve_user_location: true,\r\n\tresolve_event_location: true,\r\n\tview_provider: \"googleMap\"\r\n}\r\nif (scheduler.config.map_initial_position) {\r\n\tscheduler.config.map_settings.initial_position = {\r\n\t\tlat: scheduler.config.map_initial_position.lat(),\r\n\t\tlng: scheduler.config.map_initial_position.lng(), \r\n\t};\r\n}\r\n\r\nif (scheduler.config.map_error_position) {\r\n\tscheduler.config.map_settings.error_position = {\r\n\t\tlat: scheduler.config.map_error_position.lat(),\r\n\t\tlng: scheduler.config.map_error_position.lng(), \r\n\t};\r\n}\r\n\r\nscheduler.xy.map_date_width = 188; // date column width\r\nscheduler.xy.map_icon_width = 25; // event details icon width\r\nscheduler.xy.map_description_width = 400; // description column width\r\nscheduler.date.add_map = function(date, inc, mode) {\r\n\treturn (new Date(date.valueOf()));\r\n};\r\nscheduler.templates.map_date = function(dd, ed, mode) {\r\n\treturn '';\r\n};\r\nscheduler.templates.map_time = function(start, end, ev) {\r\n\tif (scheduler.config.rtl && !ev._timed) {\r\n\t\treturn scheduler.templates.day_date(end) + \" – \" + scheduler.templates.day_date(start);\r\n\t} else if (ev._timed) {\r\n\t\treturn this.day_date(ev.start_date, ev.end_date, ev) + \" \" + this.event_date(start);\r\n\t} else {\r\n\t\treturn scheduler.templates.day_date(start) + \" – \" + scheduler.templates.day_date(end);\r\n\t}\r\n};\r\nscheduler.templates.map_text = function(start, end, ev) {\r\n\treturn ev.text;\r\n};\r\nscheduler.templates.map_info_content = function(event){\r\n return `
Event's text: ${event.text}\r\n\t\t\t\t
Location: ${event.event_location}
\r\n\t\t\t\t
Starts: ${scheduler.templates.tooltip_date_format(event.start_date)}
\r\n\t\t\t\t
Ends: ${scheduler.templates.tooltip_date_format(event.end_date)}
\r\n\t\t\t
`;\r\n};\r\nscheduler.date.map_start = function(d) {\r\n\treturn d;\r\n};\r\n\r\nfunction setupMapView(scheduler) {\r\n\t// Initialization logic, possibly including creation of a new mapAdapter\r\n\tmapAdapter = scheduler.ext.mapView.createAdapter();\r\n\tattachSchedulerEvents();\r\n}\r\nasync function addEventWithLocation(event: ICalendarEvent, mapAdapter: IMapAdapter){\r\n\tlet coordinates = await mapAdapter.resolveAddress(event.event_location);\r\n\tevent.lat = coordinates.lat;\r\n\tevent.lng = coordinates.lng;\r\n\tmapAdapter.removeEventMarker(String(event.id));\r\n\tmapAdapter.addEventMarker(event);\r\n\treturn event;\r\n}\r\nfunction setUserLocation(options: IMapSettings, adapter: IMapAdapter): void{\r\n\tif (options.resolve_user_location) {\r\n\t\tif (navigator.geolocation) {\r\n\t\t\tnavigator.geolocation.getCurrentPosition(function(position) {\r\n\t\t\t\tadapter.setView(position.coords.latitude, position.coords.longitude, options.zoom_after_resolve || options.initial_zoom);\r\n\t\t\t});\r\n\t\t}\r\n\t} else {\r\n\t\tadapter.setView(options.initial_position.lat, options.initial_position.lng, options.initial_zoom);\r\n\t}\r\n}\r\nscheduler.dblclick_dhx_map_area = function(e) {\r\n\tlet eventNode = e.target.closest(`[${scheduler.config.event_attribute}]`);\r\n\tif (eventNode){\r\n\t\tlet eventId = eventNode.getAttribute(`${scheduler.config.event_attribute}`);\r\n\t\tscheduler.showLightbox(eventId);\r\n\t}\r\n\tif (!this.config.readonly && this.config.dblclick_create && !eventNode) {\r\n\t\tthis.addEventNow({\r\n\t\t\tstart_date: scheduler.config.map_start,\r\n\t\t\tend_date: scheduler.date.add( scheduler.config.map_start, scheduler.config.time_step, \"minute\"),\r\n\t\t});\r\n\t}\t\r\n};\r\n\r\nfunction attachSchedulerEvents() { \r\n eventHandlerIds.push(\r\n\tscheduler.attachEvent(\"onEventSave\",function(id,ev,is_new){\r\n\t\tlet unmodifiedEvent = scheduler.getEvent(id);\r\n\t\tif (unmodifiedEvent && unmodifiedEvent.event_location != ev.event_location) {\r\n\t\t\tscheduler._eventLocationChanged = true;\r\n\t\t}\r\n\t\treturn true;\r\n\t}),\r\n scheduler.attachEvent(\"onEventChanged\", (id, event) => {\r\n\t\tconst {start_date, end_date} = event;\r\n\t\tconst {min_date, max_date} = scheduler.getState();\r\n\t\tif(start_date.valueOf() < max_date.valueOf() && end_date.valueOf() > min_date.valueOf()){\r\n\t\t\tif (mapAdapter) {\r\n\t\t\t\tif (scheduler.config.map_settings.resolve_event_location && event.event_location && !scheduler._latLngUpdate ) {\r\n\t\t\t\t \taddEventWithLocation(event, mapAdapter);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmapAdapter.updateEventMarker(event);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._latLngUpdate = false;\r\n\t\treturn true;\r\n }),\r\n\tscheduler.attachEvent(\"onEventIdChange\", function(old_id,new_id){\r\n\t\tlet newIdEvent = scheduler.getEvent(new_id);\r\n\t\tmapAdapter?.removeEventMarker(old_id);\r\n\t\tmapAdapter?.addEventMarker(newIdEvent);\r\n\t}),\r\n scheduler.attachEvent(\"onEventAdded\", (id, event) => {\r\n\t\tconst {start_date, end_date} = event;\r\n\t\tconst {min_date, max_date} = scheduler.getState();\r\n\t\tif(start_date.valueOf() < max_date.valueOf() && end_date.valueOf() > min_date.valueOf()){\r\n \t\tif (mapAdapter) {\r\n\t\t\t\tif (scheduler.config.map_settings.resolve_event_location && event.event_location && scheduler._eventLocationChanged) {\r\n\t\t\t\t\taddEventWithLocation(event, mapAdapter);\r\n\t\t\t\t\tscheduler._eventLocationChanged = false;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmapAdapter.addEventMarker(event);\r\n\t\t\t\t\tmapAdapter.onEventClick(event);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n }),\r\n scheduler.attachEvent(\"onClick\", function (id, e){\r\n\t\tconst event = scheduler.getEvent(id);\r\n\t\tif (mapAdapter && event) mapAdapter.onEventClick(event);\r\n\t\treturn false;\r\n }),\r\n scheduler.attachEvent(\"onBeforeEventDelete\", (id, event) => {\r\n\t\tif (mapAdapter) {\r\n\t\t\tmapAdapter.removeEventMarker(id);\r\n\t\t}\r\n\t\treturn true;\r\n })\r\n );\r\n}\r\nfunction detachSchedulerEvents() {\r\n\teventHandlerIds.forEach(id => scheduler.detachEvent(id));\r\n\teventHandlerIds = [];\r\n}\r\n\r\nscheduler.attachEvent(\"onSchedulerReady\", function() {\r\n\r\n\tif(scheduler.config.map_initial_zoom !== undefined){\r\n\t\tscheduler.config.map_settings.initial_zoom = scheduler.config.map_initial_zoom;\r\n\t}\r\n\tif(scheduler.config.map_zoom_after_resolve !== undefined){\r\n\t\tscheduler.config.map_settings.zoom_after_resolve = scheduler.config.map_zoom_after_resolve;\r\n\t}\r\n\tif(scheduler.config.map_infowindow_max_width !== undefined){\r\n\t\tscheduler.config.map_settings.info_window_max_width = scheduler.config.map_infowindow_max_width;\r\n\t}\r\n\tif(scheduler.config.map_resolve_user_location !== undefined){\r\n\t\tscheduler.config.map_settings.resolve_user_location = scheduler.config.map_resolve_user_location;\r\n\t}\r\n\tif(scheduler.config.map_view_provider !== undefined){\r\n\t\tscheduler.config.map_settings.view_provider = scheduler.config.map_view_provider;\r\n\t}\r\n\tif(scheduler.config.map_type !== undefined){\r\n\t\tscheduler.config.map_settings.type = scheduler.config.map_type;\r\n\t}\r\n\tif(scheduler.config.map_resolve_event_location !== undefined){\r\n\t\tscheduler.config.map_settings.resolve_event_location = scheduler.config.map_resolve_event_location;\r\n\t}\r\n\tscheduler.ext.mapView.currentAdapter = scheduler.config.map_view_provider;\r\n\r\n\tlet map = document.createElement('div');\r\n\tmap.className = 'mapContainer';\r\n\tmap.id = 'mapContainer';\r\n\tmap.style.display = \"none\";\r\n\tmap.style.zIndex = \"1\";\r\n\tscheduler._obj.appendChild(map);\r\n\r\n\tconst old = scheduler.render_data;\r\n\tscheduler.render_data = function(evs, hold) {\r\n\t\tif (this._mode == \"map\") {\r\n\t\t\tfill_map_tab();\r\n\t\t\tlet events = scheduler.get_visible_events();\r\n\t\t\tif (mapAdapter) {\r\n\t\t\t\tmapAdapter.clearEventMarkers();\r\n\t\t\t\tevents.forEach((event) => mapAdapter?.addEventMarker(event));\r\n\t\t\t}\r\n\t\t} else\r\n\t\t\treturn old.apply(this, arguments);\r\n\t};\r\n\r\n\tscheduler.map_view = function(mode) {\r\n\t\tscheduler._els.dhx_cal_data[0].style.width = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\tscheduler._min_date = scheduler.config.map_start || (scheduler._currentDate());\r\n\t\tscheduler._max_date = scheduler.config.map_end || scheduler.date.add(scheduler._currentDate(), 1, \"year\");\r\n\t\tscheduler._table_view = true;\r\n\t\tset_full_view(mode);\r\n\t\tlet mapContainer = document.getElementById('mapContainer');\r\n\t\t_setMapSize('mapContainer');\r\n\r\n\t\t// creating the new logic\r\n\t\tif (mode && mapContainer) {\r\n\t\t\tmap.style.display = 'block';\r\n\t\t\tfill_map_tab();\r\n\t\t\t// case to display several maps and has the opportunity to switch between them\r\n\t\t\tif (scheduler.config.map_view_provider == scheduler.ext.mapView.currentAdapter) {\r\n\t\t\t\tmapAdapter?.destroy(mapContainer);\r\n\t\t\t\tsetupMapView(scheduler);\r\n\t\t\t\tmapAdapter?.initialize(mapContainer, scheduler.config.map_settings);\r\n\t\t\t} else {\r\n\t\t\t\tmapAdapter?.destroy(mapContainer);\r\n\t\t\t\tsetupMapView(scheduler);\r\n\t\t\t\tmapAdapter?.initialize(mapContainer, scheduler.config.map_settings);\r\n\t\t\t \tscheduler.ext.mapView.currentAdapter = scheduler.config.map_view_provider;\r\n\t\t\t}\r\n\t\t\tif(mapAdapter) {\r\n\t\t\t\tsetUserLocation(scheduler.config.map_settings, mapAdapter);\r\n\t\t\t}\t\r\n\t\t} else {\r\n\t\t\tmap.style.display = 'none';\r\n\t\t\tscheduler._els.dhx_cal_data[0].style.width = \"100%\";\r\n\t\t \tif (mapAdapter && mapContainer ) {\r\n\t\t\t\tmapAdapter.destroy(mapContainer);\r\n\t\t\t\tmapAdapter = null;\r\n\t\t\t\tscheduler.ext.mapView.currentAdapter = scheduler.config.map_view_provider;\r\n\t\t }\r\n\t\t \tdetachSchedulerEvents();\r\n\t\t}\r\n\t};\r\n\r\n\tfunction _setMapSize(elem_id) { //input - map's div id\r\n\t\tlet map = document.getElementById(elem_id);\r\n\t\tif (map) {\r\n\t\t\tconst nav_height = scheduler.$container.querySelector(\".dhx_cal_navline\").offsetHeight;\r\n\t\t\tlet height = scheduler.$container.querySelector(\".dhx_cal_data\").offsetHeight + scheduler.$container.querySelector(\".dhx_cal_header\").offsetHeight;\r\n\t\t\tif (height < 0)\r\n\t\t\t\theight = 0;\r\n\t\t\tlet width = scheduler._x - scheduler.xy.map_date_width - scheduler.xy.map_description_width - 1;\r\n\t\t\tif (width < 0)\r\n\t\t\t\twidth = 0;\r\n\t\t\tmap.style.height = height + 'px';\r\n\t\t\tmap.style.width = width + 'px';\r\n\t\t\tmap.style.position = \"absolute\";\r\n\t\t\tmap.style.top = nav_height + \"px\";\r\n\t\t\tif (scheduler.config.rtl) {\r\n\t\t\t\tmap.style.marginRight = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\t\t} else {\r\n\t\t\t\tmap.style.marginLeft = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\t\t}\r\n\t\t\tmap.style.marginTop = (scheduler.xy.nav_height + 2) + 'px';\r\n\t\t}\r\n\t}\t\r\n\tfunction fill_map_tab() {\r\n\t\t//select events for which data need to be printed\r\n\t\tlet events = scheduler.get_visible_events();\r\n\t\tevents.sort(function(a, b) {\r\n\t\t\tif(a.start_date.valueOf()==b.start_date.valueOf())\r\n\t\t\t\treturn a.id>b.id?1:-1;\r\n\t\t\treturn a.start_date>b.start_date?1:-1;\r\n\t\t});\r\n\r\n\t\t//generate html for the view\r\n\t\tlet ariaAttr = scheduler._waiAria.mapAttrString();\r\n\r\n\t\tlet html = \"
\";\r\n\t\tfor (let i = 0; i < events.length; i++) {\r\n\t\t\tlet ev = events[i];\r\n\t\t\tlet event_class = (ev.id == scheduler._selected_event_id) ? 'dhx_map_line highlight' : 'dhx_map_line';\r\n\t\t\tlet bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\t\t\tlet color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\t\t\tlet ariaAttr = scheduler._waiAria.mapRowAttrString(ev);\r\n\t\t\tlet ariaButtonAttr = scheduler._waiAria.mapDetailsBtnString();\r\n\r\n\t\t\thtml += \"
\" + scheduler.templates.map_time(ev.start_date, ev.end_date, ev) + \"
\";\r\n\t\t\thtml += `
\r\n\t\t\t\r\n\t\t\t
`;\r\n\t\t\thtml += \"
\" + scheduler.templates.map_text(ev.start_date, ev.end_date, ev) + \"
\"; // -25 = icon size 20 and padding 5\r\n\t\t}\r\n\t\thtml += \"
\";\r\n\r\n\t\t//render html\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = 0; //fix flickering in FF\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t//\tscheduler._els[\"dhx_cal_data\"][0].style.width = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\r\n\t\tlet t = scheduler._els[\"dhx_cal_data\"][0].firstChild.childNodes;\r\n\r\n\t\tlet dateElement = scheduler._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML=scheduler.templates[scheduler._mode + \"_date\"](scheduler._min_date, scheduler._max_date, scheduler._mode);\r\n\t\t}\r\n\r\n\t\tscheduler._rendered = [];\r\n\t\tfor (let i = 0; i < t.length - 2; i++) {\r\n\t\t\tscheduler._rendered[i] = t[i];\r\n\t\t}\r\n\t}\r\n\tfunction set_full_view(mode) {\r\n\t\tif (mode) {\r\n\t\t\tconst l = scheduler.locale.labels;\r\n\t\t\tscheduler._els[\"dhx_cal_header\"][0].innerHTML = \"
\" + l.date + \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"
\" + l.description + \"
\";\r\n\t\t\tscheduler._table_view = true;\r\n\t\t\tscheduler.set_sizes();\r\n\t\t}\r\n\t}\r\n\t\r\n\tscheduler.attachEvent(\"onLocationError\", function (id){\r\n\t\talert(\"Location can't be found\");\r\n\t\treturn google.maps.LatLng(51.477840, -0.001492); \r\n\t\t//the coordinates of the Greenwich Royal Observatory\r\n\t})\r\n\tlet _updateEventLocation = async function(event) {\r\n\t\tif (mapAdapter){\r\n\t\t\tconst coordinates = await mapAdapter.resolveAddress(event.event_location);\r\n\t\t\tif (coordinates.lat && coordinates.lng) {\r\n\t\t\t\tevent.lat = +coordinates.lat;\r\n\t\t\t\tevent.lng = +coordinates.lng;\r\n\t\t\t} else {\r\n\t\t\t\tscheduler.callEvent(\"onLocationError\", [event.id]);\r\n\t\t\t\tevent.lng = scheduler.config.map_settings.error_position.lng;\r\n\t\t\t\tevent.lat = scheduler.config.map_settings.error_position.lat;\r\n\t\t\t}\r\n\t\t\tscheduler._latLngUpdate = true;\r\n\t\t\tscheduler.callEvent(\"onEventChanged\", [event.id, event]);\r\n\t\t}\r\n\t};\r\n\tlet _delay = function(method, object, params, delay) {\r\n\t\tsetTimeout(function() {\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tlet ret = method.apply(object, params);\r\n\t\t\tmethod = object = params = null;\r\n\t\t\treturn ret;\r\n\t\t}, delay || 1);\r\n\t};\r\n\tscheduler._event_resolve_delay = 1500;\r\n\tscheduler.attachEvent(\"onEventLoading\", function(event) {\r\n\t\tif (event.lat && event.lng) {\r\n\t\t\tevent.lat = +event.lat;\r\n\t\t\tevent.lng = +event.lng;\r\n\t\t}\r\n\t\tif (scheduler.config.map_settings.resolve_event_location && event.event_location && !event.lat && !event.lng) { // don't delete !event.lat && !event.lng as location could change\r\n\t\t\tscheduler._event_resolve_delay += 1500;\r\n\t\t\t_delay(_updateEventLocation, this, [event], scheduler._event_resolve_delay);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n})\r\n\r\n}","export default function(scheduler){\r\n\r\nconst minicalDomEvents = scheduler._createDomEventScope();\r\n\t\r\n\r\nscheduler.config.minicalendar = {\r\n\tmark_events: true\r\n};\r\nscheduler._synced_minicalendars = [];\r\nscheduler.renderCalendar = function(obj, _prev, is_refresh) {\r\n\tvar cal = null;\r\n\tvar date = obj.date || (scheduler._currentDate());\r\n\tif (typeof date == \"string\")\r\n\t\tdate = this.templates.api_date(date);\r\n\r\n\tif (!_prev) {\r\n\t\tvar cont = obj.container;\r\n\t\tvar pos = obj.position;\r\n\r\n\t\tif (typeof cont == \"string\")\r\n\t\t\tcont = document.getElementById(cont);\r\n\r\n\t\tif (typeof pos == \"string\")\r\n\t\t\tpos = document.getElementById(pos);\r\n\t\tif (pos && (typeof pos.left == \"undefined\" && typeof pos.right == \"undefined\")) {\r\n\t\t\tvar tpos = scheduler.$domHelpers.getOffset(pos);\r\n\t\t\tpos = {\r\n\t\t\t\ttop: tpos.top + pos.offsetHeight,\r\n\t\t\t\tleft: tpos.left\r\n\t\t\t};\r\n\t\t}\r\n\t\tif (!cont)\r\n\t\t\tcont = scheduler._get_def_cont(pos);\r\n\r\n\t\tcal = this._render_calendar(cont, date, obj);\r\n\t\r\n\t\tif (!cal.$_eventAttached) {\r\n\t\t\tcal.$_eventAttached = true;\r\n\t\t\tminicalDomEvents.attach(cal, \"click\", (function(e) {\r\n\t\t\t\tvar src = e.target || e.srcElement;\r\n\r\n\t\t\t\tvar $dom = scheduler.$domHelpers;\r\n\t\t\t\tif ($dom.closest(src, \".dhx_month_head\")) {\r\n\t\t\t\t\tif (!$dom.closest(src, \".dhx_after\") && !$dom.closest(src, \".dhx_before\")) {\r\n\r\n\t\t\t\t\t\tvar cellRoot = $dom.closest(src, \"[data-cell-date]\");\r\n\t\t\t\t\t\tvar dateAttribute = cellRoot.getAttribute(\"data-cell-date\");\r\n\t\t\t\t\t\tvar newDate = scheduler.templates.parse_date(dateAttribute);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tscheduler.unmarkCalendar(this);\r\n\t\t\t\t\t\tscheduler.markCalendar(this, newDate, \"dhx_calendar_click\");\r\n\t\t\t\t\t\tthis._last_date = newDate;\r\n\t\t\t\t\t\tif (this.conf.handler) this.conf.handler.call(scheduler, newDate, this);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}).bind(cal));\r\n\t\t}\r\n\t\r\n\t} else {\r\n\t\tcal = this._render_calendar(_prev.parentNode, date, obj, _prev);\r\n\t\tscheduler.unmarkCalendar(cal);\r\n\t}\r\n\r\n\tif (scheduler.config.minicalendar.mark_events) {\r\n\t\tvar start = scheduler.date.month_start(date);\r\n\t\tvar end = scheduler.date.add(start, 1, \"month\");\r\n\t\tvar evs = this.getEvents(start, end);\r\n\t\tvar filter = this[\"filter_\" + this._mode];\r\n\t\tvar markedDates = {};\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tif (filter && !filter(ev.id, ev))\r\n\t\t\t\tcontinue;\r\n\t\t\tvar d = ev.start_date;\r\n\t\t\tif (d.valueOf() < start.valueOf())\r\n\t\t\t\td = start;\r\n\t\t\td = scheduler.date.date_part(new Date(d.valueOf()));\r\n\t\t\twhile (d < ev.end_date) {\r\n\t\t\t\tif(!markedDates[+d]) {\r\n\t\t\t\t\tmarkedDates[+d] = true;\r\n\t\t\t\t\tthis.markCalendar(cal, d, \"dhx_year_event\");\r\n\t\t\t\t}\r\n\t\t\t\td = this.date.add(d, 1, \"day\");\r\n\t\t\t\tif (d.valueOf() >= end.valueOf())\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tthis._markCalendarCurrentDate(cal);\r\n\r\n\tcal.conf = obj;\r\n\tif (obj.sync && !is_refresh)\r\n\t\tthis._synced_minicalendars.push(cal);\r\n\r\n\tif(!cal.conf._on_xle_handler){\r\n\t\tcal.conf._on_xle_handler = scheduler.attachEvent(\"onXLE\", function refreshOnLoad(){\r\n\t\t\tscheduler.updateCalendar(cal, cal.conf.date);\r\n\t\t});\r\n\t}\r\n\r\n\tif(this.config.wai_aria_attributes && this.config.wai_aria_application_role){\r\n\t\tcal.setAttribute(\"role\", \"application\");\r\n\t}\r\n\r\n\treturn cal;\r\n};\r\nscheduler._get_def_cont = function(pos) {\r\n\tif (!this._def_count) {\r\n\t\tthis._def_count = document.createElement(\"div\");\r\n\t\tthis._def_count.className = \"dhx_minical_popup\";\r\n\t\tscheduler.event(this._def_count, \"click\", function(e) { e.cancelBubble = true; });\r\n\t\tdocument.body.appendChild(this._def_count);\r\n\t}\r\n\r\n\tif(pos.left){\r\n\t\tthis._def_count.style.left = pos.left + \"px\";\r\n\t}\r\n\tif(pos.right){\r\n\t\tthis._def_count.style.right = pos.right + \"px\";\r\n\t}\r\n\tif(pos.top){\r\n\t\tthis._def_count.style.top = pos.top + \"px\";\r\n\t}\r\n\tif(pos.bottom){\r\n\t\tthis._def_count.style.bottom = pos.bottom + \"px\";\r\n\t}\r\n\r\n\tthis._def_count._created = new Date();\r\n\r\n\treturn this._def_count;\r\n};\r\nscheduler._locateCalendar = function(cal, date) {\r\n\tif (typeof date == \"string\")\r\n\t\tdate = scheduler.templates.api_date(date);\r\n\r\n\tif(+date > +cal._max_date || +date < +cal._min_date)\r\n\t\treturn null;\r\n\r\n\tvar table = cal.querySelector(\".dhx_year_body\").childNodes[0];\r\n\r\n\tvar weekNum = 0;\r\n\tvar dat = new Date(cal._min_date);\r\n\twhile(+this.date.add(dat, 1, \"week\") <= +date){\r\n\t\tdat = this.date.add(dat, 1, \"week\");\r\n\t\tweekNum++;\r\n\t}\r\n\r\n\tvar sm = scheduler.config.start_on_monday;\r\n\tvar day = (date.getDay() || (sm ? 7 : 0)) - (sm ? 1 : 0);\r\n\r\n\tconst dayCell = table.querySelector(`.dhx_cal_month_row:nth-child(${weekNum + 1}) .dhx_cal_month_cell:nth-child(${day + 1})`);\r\n\tif(dayCell) {\r\n\t\treturn dayCell.firstChild;\r\n\t} else {\r\n\t\treturn null;\r\n\t}\r\n};\r\nscheduler.markCalendar = function(cal, date, css) {\r\n\tvar div = this._locateCalendar(cal, date);\r\n\tif(!div)\r\n\t\treturn;\r\n\r\n\tdiv.className += \" \" + css;\r\n};\r\nscheduler.unmarkCalendar = function(cal, date, css) {\r\n\tdate = date || cal._last_date;\r\n\tcss = css || \"dhx_calendar_click\";\r\n\tif (!date) return;\r\n\tvar el = this._locateCalendar(cal, date);\r\n\tif(!el)\r\n\t\treturn;\r\n\tel.className = (el.className || \"\").replace(RegExp(css, \"g\"));\r\n};\r\nscheduler._week_template = function(width) {\r\n\tvar summ = (width || 250);\r\n\tvar left = 0;\r\n\r\n\tvar week_template = document.createElement(\"div\");\r\n\tvar dummy_date = this.date.week_start(scheduler._currentDate());\r\n\tfor (var i = 0; i < 7; i++) {\r\n\t\tthis._cols[i] = Math.floor(summ / (7 - i));\r\n\t\tthis._render_x_header(i, left, dummy_date, week_template);\r\n\t\tdummy_date = this.date.add(dummy_date, 1, \"day\");\r\n\t\tsumm -= this._cols[i];\r\n\t\tleft += this._cols[i];\r\n\t}\r\n\tweek_template.lastChild.className += \" dhx_scale_bar_last\";\r\n\treturn week_template;\r\n};\r\nscheduler.updateCalendar = function(obj, sd) {\r\n\tobj.conf.date = sd;\r\n\tthis.renderCalendar(obj.conf, obj, true);\r\n};\r\nscheduler._mini_cal_arrows = [\" \", \" \"];\r\nscheduler._render_calendar = function(obj, sd, conf, previous) {\r\n\t/*store*/\r\n\tvar ts = scheduler.templates;\r\n\tvar temp = this._cols;\r\n\tthis._cols = [];\r\n\tvar temp2 = this._mode;\r\n\tthis._mode = \"calendar\";\r\n\tvar temp3 = this._colsS;\r\n\tthis._colsS = {height: 0};\r\n\tvar temp4 = new Date(this._min_date);\r\n\tvar temp5 = new Date(this._max_date);\r\n\tvar temp6 = new Date(scheduler._date);\r\n\tvar temp7 = ts.month_day;\r\n\tvar temp8 = this._ignores_detected; this._ignores_detected = 0;\r\n\tts.month_day = ts.calendar_date;\r\n\r\n\tsd = this.date.month_start(sd);\r\n\tvar week_template = this._week_template(obj.offsetWidth - 1 - this.config.minicalendar.padding );\r\n\r\n\tvar d;\r\n\tif (previous){\r\n\t\td = previous;\r\n\t} else {\r\n\t\td = document.createElement(\"div\");\r\n\t\td.className = \"dhx_cal_container dhx_mini_calendar\";\r\n\t}\r\n\td.setAttribute(\"date\", this._helpers.formatDate(sd));\r\n\td.innerHTML = \"
\" +\r\n\t\t\t\"
\" : \"'>\") +\r\n\t\t\t\"
\"+(week_template ? week_template.innerHTML : \"\")+\"
\" +\r\n\t\t\t\"
\" +\r\n\t\t\"
\";\r\n\tvar header = d.querySelector(\".dhx_year_month\");\r\n\tvar weekHeader = d.querySelector(\".dhx_year_week\");\r\n\tvar body = d.querySelector(\".dhx_year_body\");\r\n\r\n\theader.innerHTML = this.templates.calendar_month(sd);\r\n\tif (conf.navigation) {\r\n\t\tvar move_minicalendar_date = function(calendar, diff) {\r\n\t\t\tvar date = scheduler.date.add(calendar._date, diff, \"month\");\r\n\t\t\tscheduler.updateCalendar(calendar, date);\r\n\t\t\tif (scheduler._date.getMonth() == calendar._date.getMonth() && scheduler._date.getFullYear() == calendar._date.getFullYear()) {\r\n\t\t\t\tscheduler._markCalendarCurrentDate(calendar);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tvar css_classnames = [\"dhx_cal_prev_button\", \"dhx_cal_next_button\"];\r\n\t\tvar css_texts = [\"left:1px;top:4px;position:absolute;\", \"left:auto; right:1px;top:4px;position:absolute;\"];\r\n\t\tvar diffs = [-1, 1];\r\n\t\tvar handler = function(diff) {\r\n\t\t\treturn function() {\t\r\n\t\t\t\tif (conf.sync) {\r\n\t\t\t\t\tvar calendars = scheduler._synced_minicalendars;\r\n\t\t\t\t\tfor (var k = 0; k < calendars.length; k++) {\r\n\t\t\t\t\t\tmove_minicalendar_date(calendars[k], diff);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (scheduler.config.rtl) {\r\n\t\t\t\t\t\tdiff = -diff;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmove_minicalendar_date(d, diff);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t};\r\n\t\tvar labels = [scheduler.locale.labels.prev, scheduler.locale.labels.next];\r\n\t\tfor (var j = 0; j < 2; j++) {\r\n\t\t\tvar arrow = document.createElement(\"div\");\r\n\t\t\t//var diff = diffs[j];\r\n\t\t\tarrow.className = css_classnames[j];\r\n\r\n\t\t\tscheduler._waiAria.headerButtonsAttributes(arrow, labels[j]);\r\n\r\n\t\t\tarrow.style.cssText = css_texts[j];\r\n\t\t\tarrow.innerHTML = this._mini_cal_arrows[j];\r\n\t\t\theader.appendChild(arrow);\r\n\t\t\tminicalDomEvents.attach(arrow, \"click\", handler(diffs[j]));\r\n\t\t}\r\n\t}\r\n\td._date = new Date(sd);\r\n\r\n\td.week_start = (sd.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;\r\n\r\n\tvar dd = d._min_date = this.date.week_start(sd);\r\n\td._max_date = this.date.add(d._min_date, 6, \"week\");\r\n\r\n\tthis._reset_month_scale(body, sd, dd, 6);\r\n\r\n\tif (!previous)\r\n\t\tobj.appendChild(d);\r\n\r\n\tweekHeader.style.height = (weekHeader.childNodes[0].offsetHeight - 1) + \"px\"; // dhx_year_week should have height property so that day dates would get correct position. dhx_year_week height = height of it's child (with the day name)\r\n\r\n\tvar headerId = scheduler.uid();\r\n\tscheduler._waiAria.minicalHeader(header, headerId);\r\n\tscheduler._waiAria.minicalGrid(d.querySelector(\".dhx_year_grid\"), headerId);\r\n\tscheduler._waiAria.minicalRow(weekHeader);\r\n\r\n\tvar dayHeaders = weekHeader.querySelectorAll(\".dhx_scale_bar\");\r\n\tfor(var i = 0; i < dayHeaders.length; i++){\r\n\t\tscheduler._waiAria.minicalHeadCell(dayHeaders[i]);\r\n\t}\r\n\tvar dayCells = body.querySelectorAll(\".dhx_cal_month_cell\");\r\n\tvar firstDate = new Date(dd);\r\n\tfor(var i = 0; i < dayCells.length; i++){\r\n\r\n\t\tscheduler._waiAria.minicalDayCell(dayCells[i], new Date(firstDate));\r\n\t\tfirstDate = scheduler.date.add(firstDate, 1, \"day\");\r\n\t}\r\n\r\n\tscheduler._waiAria.minicalHeader(header, headerId);\r\n\r\n\t/*restore*/\r\n\tthis._cols = temp;\r\n\tthis._mode = temp2;\r\n\tthis._colsS = temp3;\r\n\tthis._min_date = temp4;\r\n\tthis._max_date = temp5;\r\n\tscheduler._date = temp6;\r\n\tts.month_day = temp7;\r\n\tthis._ignores_detected = temp8;\r\n\treturn d;\r\n};\r\nscheduler.destroyCalendar = function(cal, force) {\r\n\tif (!cal && this._def_count && this._def_count.firstChild) {\r\n\t\tif (force || (new Date()).valueOf() - this._def_count._created.valueOf() > 500)\r\n\t\t\tcal = this._def_count.firstChild;\r\n\t}\r\n\tif (!cal) return;\r\n\tminicalDomEvents.detachAll();\r\n\t//cal.onclick = null;\r\n\tcal.innerHTML = \"\";\r\n\tif (cal.parentNode)\r\n\t\tcal.parentNode.removeChild(cal);\r\n\tif (this._def_count)\r\n\t\tthis._def_count.style.top = \"-1000px\";\r\n\r\n\tif(cal.conf && cal.conf._on_xle_handler)\r\n\t\tscheduler.detachEvent(cal.conf._on_xle_handler);\r\n};\r\nscheduler.isCalendarVisible = function() {\r\n\tif (this._def_count && parseInt(this._def_count.style.top, 10) > 0)\r\n\t\treturn this._def_count;\r\n\treturn false;\r\n};\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tscheduler.event(document.body, \"click\", function() { scheduler.destroyCalendar(); });\r\n}, {once: true});\r\n\r\n\r\n\r\nscheduler.form_blocks.calendar_time = {\r\n\trender: function(sns) {\r\n\t\tvar html = \"\";\r\n\r\n\t\tvar cfg = scheduler.config;\r\n\t\tvar dt = this.date.date_part(scheduler._currentDate());\r\n\r\n\t\tvar last = 24 * 60, first = 0;\r\n\t\tif (cfg.limit_time_select) {\r\n\t\t\tfirst = 60 * cfg.first_hour;\r\n\t\t\tlast = 60 * cfg.last_hour + 1; // to include \"17:00\" option if time select is limited\r\n\t\t}\r\n\t\tdt.setHours(first / 60);\r\n\r\n\t\tsns._time_values = [];\r\n\t\thtml += \" \";\r\n\r\n\t\t//var full_day = scheduler.config.full_day;\r\n\r\n\t\treturn \"
\" + html + \"  –  \" + html + \"
\";\r\n\t},\r\n\tset_value: function(node, value, ev, config) {\r\n\r\n\t\tvar inputs = node.getElementsByTagName(\"input\");\r\n\t\tvar selects = node.getElementsByTagName(\"select\");\r\n\t\tvar start_date,\r\n\t\t\tend_date;\r\n\r\n\t\tvar _init_once = function(inp, date, number) {\r\n\t\t\tscheduler.event(inp, \"click\", function() {\r\n\t\t\t\tscheduler.destroyCalendar(null, true);\r\n\t\t\t\tscheduler.renderCalendar({\r\n\t\t\t\t\tposition: inp,\r\n\t\t\t\t\tdate: new Date(this._date),\r\n\t\t\t\t\tnavigation: true,\r\n\t\t\t\t\thandler: function(new_date) {\r\n\t\t\t\t\t\tinp.value = scheduler.templates.calendar_time(new_date);\r\n\t\t\t\t\t\tinp._date = new Date(new_date);\r\n\t\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t\t\tif (scheduler.config.event_duration && scheduler.config.auto_end_date && number === 0) { //first element = start date\r\n\t\t\t\t\t\t\t_update_minical_select();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t};\r\n\r\n\t\tif (scheduler.config.full_day) {\r\n\t\t\tif (!node._full_day) {\r\n\t\t\t\tvar html = \"\";\r\n\t\t\t\tif (!scheduler.config.wide_form)\r\n\t\t\t\t\thtml = node.previousSibling.innerHTML + html;\r\n\t\t\t\tnode.previousSibling.innerHTML = html;\r\n\t\t\t\tnode._full_day = true;\r\n\t\t\t}\r\n\t\t\tvar input = node.previousSibling.getElementsByTagName(\"input\")[0];\r\n\r\n\t\t\tvar isFulldayEvent = (scheduler.date.time_part(ev.start_date) === 0 && scheduler.date.time_part(ev.end_date) === 0);\r\n\t\t\tinput.checked = isFulldayEvent;\r\n\r\n\t\t\tselects[0].disabled = input.checked;\r\n\t\t\tselects[1].disabled = input.checked;\r\n\r\n\t\t\tif (!input.$_eventAttached) {\r\n\t\t\t\tinput.$_eventAttached = true;\r\n\t\t\t\tscheduler.event(input, \"click\", function() {\r\n\t\t\t\t\tif (input.checked === true) {\r\n\t\t\t\t\t\tvar obj = {};\r\n\t\t\t\t\t\tscheduler.form_blocks.calendar_time.get_value(node, obj);\r\n\r\n\t\t\t\t\t\tstart_date = scheduler.date.date_part(obj.start_date);\r\n\t\t\t\t\t\tend_date = scheduler.date.date_part(obj.end_date);\r\n\r\n\t\t\t\t\t\tif (+end_date == +start_date || (+end_date >= +start_date && (ev.end_date.getHours() !== 0 || ev.end_date.getMinutes() !== 0)))\r\n\t\t\t\t\t\t\tend_date = scheduler.date.add(end_date, 1, \"day\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar start = start_date || ev.start_date;\r\n\t\t\t\t\tvar end = end_date || ev.end_date;\r\n\t\t\t\t\t_attach_action(inputs[0], start);\r\n\t\t\t\t\t_attach_action(inputs[1], end);\r\n\t\t\t\t\tselects[0].value = start.getHours() * 60 + start.getMinutes();\r\n\t\t\t\t\tselects[1].value = end.getHours() * 60 + end.getMinutes();\r\n\r\n\t\t\t\t\tselects[0].disabled = input.checked;\r\n\t\t\t\t\tselects[1].disabled = input.checked;\r\n\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (scheduler.config.event_duration && scheduler.config.auto_end_date) {\r\n\r\n\t\t\tvar _update_minical_select = function () {\r\n\t\t\t\tif (!(scheduler.config.auto_end_date && scheduler.config.event_duration)){\r\n\t\t\t\t\t// setting may be disabled after the handler is attached\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tstart_date = scheduler.date.add(inputs[0]._date, selects[0].value, \"minute\");\r\n\t\t\t\tend_date = new Date(start_date.getTime() + (scheduler.config.event_duration * 60 * 1000));\r\n\r\n\t\t\t\tinputs[1].value = scheduler.templates.calendar_time(end_date);\r\n\t\t\t\tinputs[1]._date = scheduler.date.date_part(new Date(end_date));\r\n\r\n\t\t\t\tselects[1].value = end_date.getHours() * 60 + end_date.getMinutes();\r\n\t\t\t};\r\n\r\n\t\t\tif(!selects[0].$_eventAttached){\r\n\t\t\t\tselects[0].addEventListener(\"change\", _update_minical_select); // only update on first select should trigger update so user could define other end date if he wishes too\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction _attach_action(inp, date, number) {\r\n\t\t\t_init_once(inp, date, number);\r\n\t\t\tinp.value = scheduler.templates.calendar_time(date);\r\n\t\t\tinp._date = scheduler.date.date_part(new Date(date));\r\n\t\t}\r\n\r\n\t\t_attach_action(inputs[0], ev.start_date, 0);\r\n\t\t_attach_action(inputs[1], ev.end_date, 1);\r\n\t\t_init_once = function() {};\r\n\r\n\t\tfunction _round_minutes(date) {\r\n\t\t\tvar time_values = config._time_values;\r\n\t\t\tvar direct_value = date.getHours() * 60 + date.getMinutes();\r\n\t\t\tvar fixed_value = direct_value;\r\n\t\t\tvar value_found = false;\r\n\r\n\t\t\tfor (var k = 0; k < time_values.length; k++) {\r\n\t\t\t\tvar t_v = time_values[k];\r\n\t\t\t\tif (t_v === direct_value) {\r\n\t\t\t\t\tvalue_found = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif (t_v < direct_value)\r\n\t\t\t\t\tfixed_value = t_v;\r\n\t\t\t}\r\n\r\n\t\t\tif(!(value_found || fixed_value))\r\n\t\t\t\treturn -1;\r\n\r\n\t\t\treturn (value_found) ? direct_value : fixed_value;\r\n\t\t}\r\n\r\n\t\tselects[0].value = _round_minutes(ev.start_date);\r\n\t\tselects[1].value = _round_minutes(ev.end_date);\r\n\r\n\t},\r\n\tget_value: function(node, ev) {\r\n\t\tvar inputs = node.getElementsByTagName(\"input\");\r\n\t\tvar selects = node.getElementsByTagName(\"select\");\r\n\r\n\t\tev.start_date = scheduler.date.add(inputs[0]._date, selects[0].value, \"minute\");\r\n\t\tev.end_date = scheduler.date.add(inputs[1]._date, selects[1].value, \"minute\");\r\n\r\n\t\tif (ev.end_date <= ev.start_date)\r\n\t\t\tev.end_date = scheduler.date.add(ev.start_date, scheduler.config.time_step, \"minute\");\r\n\t\treturn {\r\n\t\t\tstart_date: new Date(ev.start_date),\r\n\t\t\tend_date: new Date(ev.end_date)\r\n\t\t};\r\n\t},\r\n\tfocus: function(node) {\r\n\t}\r\n};\r\nscheduler.linkCalendar = function(calendar, datediff) {\r\n\tvar action = function() {\r\n\t\tvar date = scheduler._date;\r\n\t\tvar dateNew = new Date(date.valueOf());\r\n\t\tif (datediff) dateNew = datediff(dateNew);\r\n\t\tdateNew.setDate(1);\r\n\t\tscheduler.updateCalendar(calendar, dateNew);\r\n\t\treturn true;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", action);\r\n\tscheduler.attachEvent(\"onXLE\", action);\r\n\tscheduler.attachEvent(\"onEventAdded\", action);\r\n\tscheduler.attachEvent(\"onEventChanged\", action);\r\n\tscheduler.attachEvent(\"onEventDeleted\", action);\r\n\taction();\r\n};\r\n\r\nscheduler._markCalendarCurrentDate = function(calendar) {\r\n\tvar state = scheduler.getState();\r\n\tvar from = state.min_date;\r\n\tvar to = state.max_date;\r\n\tvar mode = state.mode;\r\n\r\n\tvar month_start = scheduler.date.month_start(new Date(calendar._date));\r\n\tvar month_end = scheduler.date.add(month_start, 1, \"month\");\r\n\r\n\tvar noHighlight = {\r\n\t\t\"month\":true,\r\n\t\t\"year\":true,\r\n\t\t\"agenda\":true,\r\n\t\t\"grid\":true\r\n\t};\r\n\t// no need to highlight current dates for a large range views - agenda, year, etc.\r\n\tif(noHighlight[mode] || (from.valueOf() <= month_start.valueOf() && to.valueOf() >= month_end.valueOf())){\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar current = from;\r\n\twhile(current.valueOf() < to.valueOf()){\r\n\t\tif (month_start.valueOf() <= current.valueOf() && month_end > current) {\r\n\t\t\tscheduler.markCalendar(calendar, current, \"dhx_calendar_click\");\r\n\t\t}\r\n\t\tcurrent = scheduler.date.add(current, 1, \"day\");\r\n\t}\r\n};\r\n\r\nscheduler.attachEvent(\"onEventCancel\", function(){\r\n\tscheduler.destroyCalendar(null, true);\r\n});\r\n\r\nscheduler.attachEvent(\"onDestroy\", function(){\r\n\tscheduler.destroyCalendar();\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\tscheduler.xy.scroll_width = 0;\r\n\r\n\tvar old = scheduler.render_view_data;\r\n\tscheduler.render_view_data=function(){\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\t\tdata.firstChild._h_fix = true;\r\n\r\n\t\told.apply(scheduler,arguments);\r\n\r\n\r\n\r\n\t\tvar height = parseInt(data.style.height);\r\n\t\tdata.style.height=\"1px\";\r\n\t\tdata.style.height=data.scrollHeight+\"px\";\r\n\r\n\t\tthis._obj.style.height = this._obj.clientHeight + data.scrollHeight - height + \"px\";\r\n\t};\r\n\r\n\tvar old_s=scheduler._reset_month_scale;\r\n\tscheduler._reset_month_scale=function(a,b,c,d){\r\n\t\tvar dummy = {clientHeight:100};\r\n\t\told_s.apply(scheduler,[dummy,b,c,d]);\r\n\t\ta.innerHTML = dummy.innerHTML;\r\n\t};\r\n\r\n});\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Multisection\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\n\r\nfunction parseXMLOptions(loader, config){\r\n\tvar items = scheduler.ajax.xpath(\"//data/item\", loader.xmlDoc);\r\n\tvar ids = {};\r\n\tfor (var i = 0; i < items.length; i++) {\r\n\t\tids[items[i].getAttribute(config.map_to)] = true;\r\n\t}\r\n\treturn ids;\r\n}\r\n\r\nfunction parseJSONOptions(loader, config){\r\n\ttry{\r\n\t\tvar items = JSON.parse(loader.xmlDoc.responseText);\r\n\t\tvar ids = {};\r\n\t\tfor (var i = 0; i < items.length; i++) {\r\n\t\t\tvar option = items[i];\r\n\r\n\t\t\tids[option.value || option.key || option.id] = true;\r\n\t\t}\r\n\t\treturn ids;\r\n\t}catch(e){\r\n\t\treturn null;\r\n\t}\r\n}\r\n\r\nscheduler.form_blocks[\"multiselect\"]={\r\n\trender:function(sns) {\r\n\t\tvar css = \"dhx_multi_select_control dhx_multi_select_\"+sns.name;\r\n\t\tif(!!sns.vertical){\r\n\t\t\tcss += \" dhx_multi_select_control_vertical\";\r\n\t\t}\r\n\r\n\t\tvar _result = \"
\";\r\n\t\tfor (var i=0; i\"+sns.options[i].label+\"\";\r\n\t\t}\r\n\t\t_result += \"
\";\r\n\t\treturn _result;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\r\n\t\tvar _children = node.getElementsByTagName('input');\r\n\t\tfor(var i=0;i<_children.length;i++) {\r\n\t\t\t_children[i].checked = false; //unchecking all inputs on the form\r\n\t\t}\r\n\r\n\t\tfunction _mark_inputs(ids) { // ids = [ 0: undefined, 1: undefined, 2: true, 'custom_name': false ... ]\r\n\t\t\tvar _children = node.getElementsByTagName('input');\r\n\t\t\tfor(var i=0;i<_children.length; i++) {\r\n\t\t\t\t_children[i].checked = !! ids[_children[i].value];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar _ids = {};\r\n\t\tif (ev[config.map_to]) {\r\n\t\t\tvar results = (ev[config.map_to] + \"\").split(config.delimiter || scheduler.config.section_delimiter || \",\");\r\n\t\t\tfor (var i = 0; i < results.length; i++) {\r\n\t\t\t\t_ids[results[i]] = true;\r\n\t\t\t}\r\n\t\t\t_mark_inputs(_ids);\r\n\t\t} else {\r\n\t\t\tif (scheduler._new_event || !config.script_url)\r\n\t\t\t\treturn;\r\n\t\t\tvar divLoading = document.createElement('div');\r\n\t\t\tdivLoading.className = 'dhx_loading';\r\n\t\t\tdivLoading.style.cssText = \"position: absolute; top: 40%; left: 40%;\";\r\n\t\t\tnode.appendChild(divLoading);\r\n\r\n\t\t\tvar url = [\r\n\t\t\t\tconfig.script_url,\r\n\t\t\t\t(config.script_url.indexOf(\"?\") == -1 ? \"?\" : \"&\"),\r\n\t\t\t\t'dhx_crosslink_' + config.map_to + '=' + ev.id + '&uid=' + scheduler.uid()\r\n\t\t\t].join(\"\");\r\n\r\n\t\t\tscheduler.ajax.get(url, function(loader) {\r\n\t\t\t\tvar options = parseJSONOptions(loader, config);\r\n\t\t\t\tif(!options){\r\n\t\t\t\t\toptions = parseXMLOptions(loader, config);\r\n\t\t\t\t}\r\n\t\t\t\t_mark_inputs(options);\r\n\t\t\t\tnode.removeChild(divLoading);\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tvar _result = [];\r\n\t\tvar _children = node.getElementsByTagName(\"input\");\r\n\t\tfor(var i=0;i<_children.length;i++) {\r\n\t\t\tif(_children[i].checked)\r\n\t\t\t\t_result.push(_children[i].value);\r\n\t\t}\r\n\t\treturn _result.join(config.delimiter || scheduler.config.section_delimiter || \",\");\r\n\t},\r\n\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\r\n\tfunction backup(obj){\r\n\t\tvar t = function(){};\r\n\t\tt.prototype = obj;\r\n\t\treturn t;\r\n\t}\r\n\r\n\tvar old = scheduler._load;\r\n\tscheduler._load=function(url,from){\r\n\t\turl=url||this._load_url;\r\n\t\tif (typeof url == \"object\"){\r\n\t\t\tvar t = backup(this._loaded);\r\n\t\t\tfor (var i=0; i < url.length; i++) {\r\n\t\t\t\tthis._loaded=new t();\r\n\t\t\t\told.call(this,url[i],from);\r\n\t\t\t}\r\n\t\t} else\r\n\t\t\told.apply(this,arguments);\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\t/* global Backbone */\r\n\tvar cfg = {\r\n\t\tuse_id : false\r\n\t};\r\n\r\n\t//remove private properties\r\n\tfunction sanitize(ev){\r\n\t\tvar obj = {};\r\n\t\tfor (var key in ev)\r\n\t\t\tif (key.indexOf(\"_\") !== 0)\r\n\t\t\t\tobj[key] = ev[key];\r\n\r\n\t\tif (!cfg.use_id)\r\n\t\t\tdelete obj.id;\r\n\r\n\t\treturn obj;\r\n\t}\r\n\r\n\tvar update_timer;\r\n\tfunction update_view(){\r\n\t\tclearTimeout(update_timer);\r\n\t\tupdate_timer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler.updateView();\r\n\t\t},1);\r\n\t}\r\n\r\n\tfunction _start_ext_load(cal){\r\n\t\tcal._loading = true;\r\n\t\tcal._not_render = true;\r\n\r\n\t\tcal.callEvent(\"onXLS\", []);\r\n\t}\r\n\tfunction _finish_ext_load(cal){\r\n\t\tcal._not_render = false;\r\n\t\tif (cal._render_wait)\r\n\t\t\tcal.render_view_data();\r\n\t\tcal._loading = false;\r\n\r\n\t\tcal.callEvent(\"onXLE\", []);\r\n\t}\r\n\r\n\r\n\tfunction _get_id(model){\r\n\t\treturn cfg.use_id ? model.id : model.cid;\r\n\t}\r\n\r\nscheduler.backbone = function(events, config){\r\n\tif (config) cfg = config;\r\n\r\n\tevents.bind(\"change\", function(model, info){\r\n\t\tvar cid = _get_id(model);\r\n\t\tvar ev = scheduler._events[cid] = model.toJSON();\r\n\t\tev.id = cid;\r\n\r\n\t\tscheduler._init_event(ev);\r\n\t\tupdate_view();\r\n\t});\r\n\tevents.bind(\"remove\", function(model, changes){\r\n\t\tvar cid = _get_id(model);\r\n\t\tif (scheduler._events[cid])\r\n\t\t\tscheduler.deleteEvent(cid);\r\n\t});\r\n\r\n\tvar queue = [];\r\n\tfunction add_from_queue(){\r\n\t\tif(scheduler.$destroyed){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (queue.length){\r\n\t\t\tscheduler.parse(queue, \"json\");\r\n\t\t\tqueue = [];\r\n\t\t}\r\n\t}\r\n\r\n\tevents.bind(\"add\", function(model, changes){\r\n\t\tvar cid = _get_id(model);\r\n\t\tif (!scheduler._events[cid]){\r\n\t\t\tvar ev = model.toJSON();\r\n\t\t\tev.id = cid;\r\n\t\t\tscheduler._init_event(ev);\r\n\r\n\t\t\tqueue.push(ev);\r\n\t\t\tif (queue.length == 1)\r\n\t\t\t\tsetTimeout(add_from_queue,1);\r\n\t\t}\r\n\t});\r\n\r\n\tevents.bind(\"request\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_start_ext_load(scheduler);\r\n\t});\r\n\tevents.bind(\"sync\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_finish_ext_load(scheduler);\r\n\t});\r\n\tevents.bind(\"error\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_finish_ext_load(scheduler);\r\n\t});\r\n\r\n\r\n\tscheduler.attachEvent(\"onEventCreated\", function(id){\r\n\t\tvar ev = new events.model(scheduler.getEvent(id));\r\n\t\tscheduler._events[id] = ev.toJSON();\r\n\t\tscheduler._events[id].id = id;\r\n\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventAdded\", function(id){\r\n\t\tif (!events.get(id)){\r\n\t\t\tvar data = sanitize(scheduler.getEvent(id));\r\n\t\t\tvar model = new events.model(data);\r\n\r\n\t\t\tvar cid = _get_id(model);\r\n\t\t\tif (cid != id)\r\n\t\t\t\tthis.changeEventId(id, cid);\r\n\t\t\tevents.add(model);\r\n\t\t\tevents.trigger(\"scheduler:add\", model);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\", function(id){\r\n\t\tvar ev = events.get(id);\r\n\t\tvar upd = sanitize(scheduler.getEvent(id));\r\n\r\n\t\tev.set(upd);\r\n\t\tevents.trigger(\"scheduler:change\", ev);\r\n\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function(id){\r\n\t\tvar model = events.get(id);\r\n\t\tif (model){\r\n\t\t\tevents.trigger(\"scheduler:remove\", model);\r\n\t\t\tevents.remove(id);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\t/* global dhtmlDragAndDropObject, dhtmlx */\r\n// lame old code doesn't provide raw event object\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\t\tvar dragger = (new dhtmlDragAndDropObject());\r\n\t\tvar old = dragger.stopDrag;\r\n\t\tvar last_event;\r\n\t\tdragger.stopDrag = function(e) {\r\n\t\t\tlast_event = e;\r\n\t\t\treturn old.apply(this, arguments);\r\n\t\t};\r\n\r\n\t\tfunction on_drop(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml) {\r\n\r\n\t\t\tif (scheduler.checkEvent(\"onBeforeExternalDragIn\") && !scheduler.callEvent(\"onBeforeExternalDragIn\", [sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml, last_event]))\r\n\t\t\t\treturn;\r\n\r\n\t\t\tvar temp = scheduler.attachEvent(\"onEventCreated\", function (id) {\r\n\t\t\t\tif (!scheduler.callEvent(\"onExternalDragIn\", [id, sourceHtmlObject, last_event])) {\r\n\t\t\t\t\tthis._drag_mode = this._drag_id = null;\r\n\t\t\t\t\tthis.deleteEvent(id);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tvar action_data = scheduler.getActionData(last_event);\r\n\t\t\tvar event_data = {\r\n\t\t\t\tstart_date: new Date(action_data.date)\r\n\t\t\t};\r\n\r\n\t\t\t// custom views, need to assign section id, fix dates\r\n\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\tvar view_options = scheduler.matrix[scheduler._mode];\r\n\t\t\t\tevent_data[view_options.y_property] = action_data.section;\r\n\r\n\t\t\t\tvar pos = scheduler._locate_cell_timeline(last_event);\r\n\t\t\t\tevent_data.start_date = view_options._trace_x[pos.x];\r\n\t\t\t\tevent_data.end_date = scheduler.date.add(event_data.start_date, view_options.x_step, view_options.x_unit);\r\n\t\t\t}\r\n\t\t\tif (scheduler._props && scheduler._props[scheduler._mode]) {\r\n\t\t\t\tevent_data[scheduler._props[scheduler._mode].map_to] = action_data.section;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler.addEventNow(event_data);\r\n\r\n\t\t\tscheduler.detachEvent(temp);\r\n\t\t}\r\n\r\n\t\tdragger.addDragLanding(scheduler._els[\"dhx_cal_data\"][0], {\r\n\t\t\t_drag: function(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml) {\r\n\t\t\t\ton_drop(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml);\r\n\t\t\t},\r\n\t\t\t_dragIn: function(htmlObject, shtmlObject) {\r\n\t\t\t\treturn htmlObject;\r\n\t\t\t},\r\n\t\t\t_dragOut: function(htmlObject) {\r\n\t\t\t\treturn this;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(dhtmlx.DragControl) {\r\n\t\t\tdhtmlx.DragControl.addDrop(scheduler._els[\"dhx_cal_data\"][0], {\r\n\t\t\t\tonDrop: function (source, target, d, e) {\r\n\t\t\t\t\tvar sourceDhtmlx = dhtmlx.DragControl.getMaster(source);\r\n\t\t\t\t\tlast_event = e;\r\n\t\t\t\t\ton_drop(source, sourceDhtmlx, target, e.target || e.srcElement);\r\n\t\t\t\t},\r\n\r\n\t\t\t\tonDragIn: function (source, target, e) {\r\n\t\t\t\t\treturn target;\r\n\t\t\t\t}\r\n\t\t\t}, true);\r\n\t\t}\r\n\t});\r\n\r\n}","export default function(scheduler){\r\n\r\n\tvar dx, dy,\r\n\t\thtml_regexp = new RegExp(\"<[^>]*>\", \"g\"),\r\n\t\tnewline_regexp = new RegExp(\"]*>\", \"g\");\r\n\r\n\tfunction clean_html(val) {\r\n\t\treturn val.replace(newline_regexp, \"\\n\").replace(html_regexp, \"\");\r\n\t}\r\n\r\n\tfunction x_norm(x, offset) {\r\n\t\tx = parseFloat(x);\r\n\t\toffset = parseFloat(offset);\r\n\t\tif (!isNaN(offset)) x -= offset;\r\n\r\n\t\tvar w = colsWidth(x);\r\n\t\tx = x - w.width + w.cols*dx;\r\n\t\treturn isNaN(x)?\"auto\":(100*x/(dx));\r\n\t}\r\n\r\n\tfunction x_norm_event(x, offset, is_left) {\r\n\t\tx = parseFloat(x);\r\n\t\toffset = parseFloat(offset);\r\n\t\tif (!isNaN(offset) && is_left) x -= offset;\r\n\r\n\t\tvar w = colsWidth(x);\r\n\t\tx = x - w.width + w.cols*dx;\r\n\t\treturn isNaN(x)?\"auto\":(100*x/(dx-(!isNaN(offset)?offset:0)));\r\n\t}\r\n\tfunction colsWidth(width) {\r\n\t\tvar r = 0;\r\n\t\tvar header = scheduler._els.dhx_cal_header[0].childNodes;\r\n\t\tvar els = header[1] ? header[1].childNodes : header[0].childNodes;\r\n\t\tfor (var i = 0; i < els.length; i++) {\r\n\t\t\tvar el = els[i].style ? els[i] : els[i].parentNode;\r\n\t\t\tvar w = parseFloat(el.style.width);\r\n\t\t\tif (width > w){\r\n\t\t\t\twidth -= (w+1);\r\n\t\t\t\tr+=(w+1);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\treturn { width: r, cols: i };\r\n\t}\r\n\r\n\tfunction y_norm(y) {\r\n\t\ty = parseFloat(y);\r\n\t\tif (isNaN(y)) return \"auto\";\r\n\t\treturn 100 * y / dy;\r\n\t}\r\n\r\n\tfunction get_style(node, style){\r\n\t\treturn (window.getComputedStyle?(window.getComputedStyle(node, null)[style]):(node.currentStyle?node.currentStyle[style]:null))||\"\";\r\n\t}\r\n\r\n\tfunction de_day(node, n) {\r\n\t\tvar x = parseInt(node.style.left, 10);\r\n\r\n\t\tfor (var dx = 0; dx < scheduler._cols.length; dx++) {\r\n\t\t\tx -= scheduler._cols[dx];\r\n\t\t\tif (x < 0) return dx;\r\n\t\t}\r\n\t\treturn n;\r\n\t}\r\n\r\n\tfunction de_week(node, n) {\r\n\t\tvar y = parseInt(node.style.top, 10);\r\n\t\tfor (var dy = 0; dy < scheduler._colsS.heights.length; dy++)\r\n\t\t\tif (scheduler._colsS.heights[dy] > y) return dy;\r\n\t\treturn n;\r\n\t}\r\n\r\n\tfunction xml_start(tag) {\r\n\t\treturn tag ? \"<\"+tag+\">\" : \"\";\r\n\t}\r\n\tfunction xml_end(tag) {\r\n\t\treturn tag ? \"\" : \"\";\r\n\t}\r\n\r\n\tfunction xml_top(tag, profile, header, footer) {\r\n\t\tvar xml = \"<\"+tag+\" profile='\" + profile + \"'\";\r\n\t\tif (header)\r\n\t\t\txml += \" header='\" + header + \"'\";\r\n\t\tif (footer)\r\n\t\t\txml += \" footer='\" + footer + \"'\";\r\n\t\txml += \">\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_body_header() {\r\n\t\tvar xml = \"\";\r\n\t\t// detects if current mode is timeline\r\n\t\tvar mode = scheduler._mode;\r\n\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode])\r\n\t\t\tmode = (scheduler.matrix[scheduler._mode].render == \"cell\") ? \"matrix\" : \"timeline\";\r\n\t\txml += \"\";\r\n\r\n\t\tif (scheduler._mode == \"week_agenda\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_data[0].getElementsByTagName(\"DIV\");\r\n\t\t\tfor (var i = 0; i < xh.length; i++)\r\n\t\t\t\tif (xh[i].className == \"dhx_wa_scale_bar\")\r\n\t\t\t\t\txml += \"\" + clean_html(xh[i].innerHTML) + \"\";\r\n\t\t} else if (scheduler._mode == \"agenda\" || scheduler._mode == \"map\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_header[0].childNodes[0].childNodes;\r\n\r\n\t\t\txml += \"\" + clean_html(xh[0].innerHTML) + \"\" + clean_html(xh[1].innerHTML) + \"\";\r\n\t\t} else if (scheduler._mode == \"year\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_data[0].childNodes;\r\n\t\t\tfor (var i = 0; i < xh.length; i++) {\r\n\t\t\t\txml += \"\";\r\n\t\t\t\txml += xml_month_scale(xh[i].querySelector(\".dhx_year_week\").childNodes);\r\n\t\t\t\txml += xml_month(xh[i].querySelector(\".dhx_year_body\"));\r\n\t\t\t\txml += \"\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\txml += \"\";\r\n\t\t\tvar xh = scheduler._els.dhx_cal_header[0].childNodes;\r\n\t\t\txml += xml_month_scale(xh);\r\n\t\t\txml += \"\";\r\n\r\n\t\t\tvar yh = scheduler._els.dhx_cal_data[0];\r\n\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tfor (var i = 0; i < yh.firstChild.rows.length; i++) {\r\n\t\t\t\t\tvar el = yh.firstChild.rows[i];\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t}\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tdy = yh.firstChild.rows[0].cells[0].offsetHeight;\r\n\t\t\t} else if (yh.firstChild.tagName == \"TABLE\") {\r\n\t\t\t\txml += xml_month(yh);\r\n\t\t\t} else {\r\n\t\t\t\tyh = yh.childNodes[yh.childNodes.length - 1];\r\n\t\t\t\twhile (yh.className.indexOf(\"dhx_scale_holder\") == -1)\r\n\t\t\t\t\tyh = yh.previousSibling;\r\n\t\t\t\tyh = yh.childNodes;\r\n\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tfor (var i = 0; i < yh.length; i++)\r\n\t\t\t\t\txml += \"\\n\";\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tdy = yh[0].offsetHeight;\r\n\t\t\t}\r\n\t\t}\r\n\t\txml += \"\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_month(yh) {\r\n\t\tvar xml = \"\";\r\n\t\tvar r = yh.querySelectorAll(\"tr\");\r\n\t\tfor (var i = 0; i < r.length; i++) {\r\n\t\t\tvar days = [];\r\n\t\t\tvar cells = r[i].querySelectorAll(\"td\");\r\n\r\n\t\t\tfor (var j = 0; j < cells.length; j++)\r\n\t\t\t\tdays.push(cells[j].querySelector(\".dhx_month_head\").innerHTML);\r\n\r\n\t\t\txml += \"\\n\";\r\n\t\t\tdy = cells[0].offsetHeight;\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_month_scale(xh) {\r\n\t\tvar xhs,\r\n\t\t\txml = \"\";\r\n\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\tif (scheduler.matrix[scheduler._mode].second_scale)\r\n\t\t\t\txhs = xh[1].childNodes;\r\n\r\n\t\t\txh = xh[0].childNodes;\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < xh.length; i++)\r\n\t\t\txml += \"\\n\";\r\n\t\tdx = xh[0].offsetWidth;\r\n\r\n\t\tif (xhs) {\r\n\t\t\tvar width = 0;\r\n\t\t\tvar top_width = xh[0].offsetWidth;\r\n\t\t\tvar top_col = 1;\r\n\t\t\tfor (var i = 0; i < xhs.length; i++) {\r\n\t\t\t\txml += \"\\n\";\r\n\t\t\t\twidth += xhs[i].offsetWidth;\r\n\t\t\t\tif (width >= top_width) {\r\n\t\t\t\t\ttop_width += (xh[top_col] ? xh[top_col].offsetWidth : 0);\r\n\t\t\t\t\ttop_col++;\r\n\t\t\t\t}\r\n\t\t\t\tdx = xhs[0].offsetWidth;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_body(colors) {\r\n\t\tvar xml = \"\";\r\n\t\tvar evs = scheduler._rendered;\r\n\t\tvar matrix = scheduler.matrix && scheduler.matrix[scheduler._mode];\r\n\r\n\t\tif (scheduler._mode == \"agenda\" || scheduler._mode == \"map\") {\r\n\r\n\t\t\tfor (var i = 0; i < evs.length; i++)\r\n xml += \"\";\r\n\r\n\t\t} else if (scheduler._mode == \"week_agenda\") {\r\n\r\n\t\t\tfor (var i = 0; i < evs.length; i++)\r\n\t\t\t\txml += \"\" + clean_html(evs[i].innerHTML) + \"\";\r\n\r\n\t\t} else if (scheduler._mode == \"year\") {\r\n\r\n\t\t\tvar evs = scheduler.get_visible_events();\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar d = evs[i].start_date;\r\n\t\t\t\tif (d.valueOf() < scheduler._min_date.valueOf())\r\n\t\t\t\t\td = scheduler._min_date;\r\n\r\n\t\t\t\twhile (d < evs[i].end_date) {\r\n\t\t\t\t\tvar m = d.getMonth() + 12 * (d.getFullYear() - scheduler._min_date.getFullYear()) - scheduler.week_starts._month;\r\n\t\t\t\t\tvar day = scheduler.week_starts[m] + d.getDate() - 1;\r\n\t\t\t\t\tvar text_color = colors ? get_style(scheduler._get_year_cell(d), \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(scheduler._get_year_cell(d), \"backgroundColor\") : \"\";\r\n\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t\td = scheduler.date.add(d, 1, \"day\");\r\n\t\t\t\t\tif (d.valueOf() >= scheduler._max_date.valueOf())\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (matrix && matrix.render == \"cell\") {\r\n\t\t\tvar evs = scheduler._els.dhx_cal_data[0].getElementsByTagName(\"TD\");\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar text_color = colors ? get_style(evs[i], \"color\") : \"\";\r\n\t\t\t\tvar bg_color = colors ? get_style(evs[i], \"backgroundColor\") : \"\";\r\n\t\t\t\txml += \"\\n\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar zx, zdx;\r\n\t\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\t\t// logic for timeline view\r\n\t\t\t\t\tzx = x_norm(evs[i].style.left);\r\n\t\t\t\t\tzdx = x_norm(evs[i].offsetWidth)-1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// we should use specific logic for day/week/units view\r\n\t\t\t\t\tvar left_norm = scheduler.config.use_select_menu_space ? 0 : 26;\r\n\t\t\t\t\tzx = x_norm_event(evs[i].style.left, left_norm, true);\r\n\t\t\t\t\tzdx = x_norm_event(evs[i].style.width, left_norm)-1;\r\n\t\t\t\t}\r\n\t\t\t\tif (isNaN(zdx * 1)) continue;\r\n\t\t\t\tvar zy = y_norm(evs[i].style.top);\r\n\t\t\t\tvar zdy = y_norm(evs[i].style.height);\r\n\r\n\t\t\t\tvar e_type = evs[i].className.split(\" \")[0].replace(\"dhx_cal_\", \"\");\r\n\t\t\t\tif (e_type === 'dhx_tooltip_line') continue;\r\n\r\n\t\t\t\tvar dets = scheduler.getEvent(evs[i].getAttribute(scheduler.config.event_attribute));\r\n if (!dets) continue;\r\n\t\t\t\tvar day = dets._sday;\r\n\t\t\t\tvar week = dets._sweek;\r\n\t\t\t\tvar length = dets._length || 0;\r\n\r\n\t\t\t\tif (scheduler._mode == \"month\") {\r\n\t\t\t\t\tzdy = parseInt(evs[i].offsetHeight, 10);\r\n\t\t\t\t\tzy = parseInt(evs[i].style.top, 10) - scheduler.xy.month_head_height;\r\n\r\n\t\t\t\t\tday = de_day(evs[i], day);\r\n\t\t\t\t\tweek = de_week(evs[i], week);\r\n\t\t\t\t} else if (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\t\tday = 0;\r\n\t\t\t\t\tvar el = evs[i].parentNode.parentNode.parentNode;\r\n\t\t\t\t\tweek = el.rowIndex;\r\n\t\t\t\t\tvar dy_copy = dy;\r\n\t\t\t\t\tdy = evs[i].parentNode.offsetHeight;\r\n\t\t\t\t\tzy = y_norm(evs[i].style.top);\r\n\t\t\t\t\tzy -= zy * 0.2;\r\n\t\t\t\t\tdy = dy_copy;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (evs[i].parentNode == scheduler._els.dhx_cal_data[0]) continue;\r\n\t\t\t\t\tvar parent = scheduler._els[\"dhx_cal_data\"][0].childNodes[0];\r\n\t\t\t\t\tvar offset = parseFloat(parent.className.indexOf(\"dhx_scale_holder\") != -1 ? parent.style.left : 0);\r\n\t\t\t\t\tzx += x_norm(evs[i].parentNode.style.left, offset);\r\n\t\t\t\t}\r\n\r\n\t\t\t\txml += \"\\n\";\r\n\r\n\t\t\t\tif (e_type == \"event\") {\r\n\t\t\t\t\txml += \"
\";\r\n\t\t\t\t\tvar text_color = colors ? get_style(evs[i].childNodes[2], \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(evs[i].childNodes[2], \"backgroundColor\") : \"\";\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar text_color = colors ? get_style(evs[i], \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(evs[i], \"backgroundColor\") : \"\";\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t}\r\n\t\t\t\txml += \"
\";\r\n\t\t\t}\r\n\t\t\t}\r\n\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction toXML(start, end, view, mode, header, footer){\r\n\t\tvar colors = false;\r\n\t\tif (mode == \"fullcolor\") {\r\n\t\t\tcolors = true;\r\n\t\t\tmode = \"color\";\r\n\t\t}\r\n\r\n\t\tmode = mode || \"color\";\r\n\r\n\t\tvar xml = \"\";\r\n\t\tif (start) {\r\n\r\n\t\t\tvar original_date = scheduler._date;\r\n\t\t\tvar original_mode = scheduler._mode;\r\n\t\t\tend = scheduler.date[view+\"_start\"](end);\r\n\t\t\tend = scheduler.date[\"get_\"+view+\"_end\"] ? scheduler.date[\"get_\"+view+\"_end\"](end) : scheduler.date.add(end, 1, view);\r\n\r\n\t\t\txml = xml_top(\"pages\", mode, header, footer);\r\n\t\t\tfor (var temp_date = new Date(start); +temp_date < +end; temp_date = this.date.add(temp_date, 1, view)) {\r\n\t\t\t\tthis.setCurrentView(temp_date, view);\r\n\t\t\t\txml += xml_start(\"page\") + xml_body_header().replace(\"\\u2013\", \"-\") + xml_body(colors) + xml_end(\"page\");\r\n\t\t\t}\r\n\t\t\txml += xml_end(\"pages\");\r\n\r\n\t\t\tthis.setCurrentView(original_date, original_mode);\r\n\t\t} else {\r\n\t\t\txml = xml_top(\"data\", mode, header, footer) + xml_body_header().replace(\"\\u2013\", \"-\") + xml_body(colors) + xml_end(\"data\");\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\tscheduler.getPDFData = toXML;\r\n\tfunction send_xml(xml, url){\r\n\t\tvar uid = scheduler.uid();\r\n\t\tvar d = document.createElement(\"div\");\r\n\t\td.style.display = \"none\";\r\n\t\tdocument.body.appendChild(d);\r\n\r\n\t\td.innerHTML = '
';\r\n\t\tdocument.getElementById(uid).firstChild.value = encodeURIComponent(xml);\r\n\t\tdocument.getElementById(uid).submit();\r\n\t\td.parentNode.removeChild(d);\r\n\t}\r\n\r\n\tfunction to_pdf(start, end, view, url, mode, header, footer) {\r\n\t\tvar xml = \"\";\r\n\t\tif(typeof mode == \"object\"){\r\n\t\t\txml = schedulersToPdf(mode);\r\n\t\t}else{\r\n\t\t\txml = toXML.apply(this, [start, end, view, mode, header, footer]);\r\n\t\t}\r\n\r\n\t\tsend_xml(xml, url);\r\n\t}\r\n\r\n\tfunction schedulersToPdf(objects){\r\n\t\tvar xml = \"\";\r\n\t\tfor(var i=0; i < objects.length; i++){\r\n\t\t\txml += objects[i].source.getPDFData(objects[i].start, objects[i].end, objects[i].view, objects[i].mode, objects[i].header, objects[i].footer);\r\n\t\t}\r\n\t\txml += \"\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\t/*\r\n\t * scheduler.toPDF(url, mode, header, footer) - for a single scheduler\r\n\t * scheduler.toPDF(url, [scheduler1, scheduler2,...]) - for multiple schedulers\r\n\t * example:\r\n\t * scheduler.toPDF(\"generate.ashx\", [\r\n\t * { source: scheduler1, mode: \"color\" },\r\n\t * { source: scheduler2, mode: \"gray\", view:\"week\", start:new Date(2013, 06, 1), end:new Date(2013, 06, 28) },\r\n\t * { source: scheduler3 }\r\n\t * ]);\r\n\t *\r\n\t */\r\n\tscheduler.toPDF = function(url, mode, header, footer) {\r\n\t\treturn to_pdf.apply(this, [null, null, null, url, mode, header, footer]);\r\n\t};\r\n\tscheduler.toPDFRange = function(start, end, view, url, mode, header, footer) {\r\n\t\tif (typeof start == \"string\") {\r\n\t\t\tstart = scheduler.templates.api_date(start);\r\n\t\t\tend = scheduler.templates.api_date(end);\r\n\t\t}\r\n\r\n\t\treturn to_pdf.apply(this, arguments);\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.icons_select = [\"icon_form\", \"icon_delete\"];\r\nscheduler.config.details_on_create = true;\r\nscheduler.config.show_quick_info = true;\r\nscheduler.xy.menu_width = 0;\r\n\r\n\r\n\r\nlet clickedElementPosition = null;\r\nscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\tconst container = scheduler.$container;\r\n\tif(container._$quickInfoHandler){\r\n\t\treturn;\r\n\t}else{\r\n\t\tcontainer._$quickInfoHandler = true;\r\n\t\t// store coordinates of clicked segment of an event\r\n\t\t// in case multi section events or multi-line month events\r\n\t\tscheduler.event(container, \"mousedown\", function(e){\r\n\t\t\tconst eventElement = e.target.closest(`[${scheduler.config.event_attribute}]`);\r\n\t\t\tif (eventElement) {\r\n\t\t\t\tclickedElementPosition = {\r\n\t\t\t\t\tid: eventElement.getAttribute(scheduler.config.event_attribute),\r\n\t\t\t\t\tposition: getPositionInsideScheduler(eventElement)\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t});\r\n\t\tscheduler.attachEvent(\"onDestroy\", () => {\r\n\t\t\tdelete container._$quickInfoHandler;\r\n\t\t});\r\n\t}\r\n});\r\n\r\nscheduler.attachEvent(\"onClick\", function(id){\r\n\tif(!scheduler.config.show_quick_info){\r\n\t\treturn;\r\n\t}\r\n\tscheduler.showQuickInfo(id);\r\n\treturn true;\r\n});\r\n\r\n(function(){\r\n\t// pass `force` argument in order to hide quick info synchronously\r\n\t// so it won't affect showQuickInfo call that can follow\r\n\tvar events = [\"onEmptyClick\", \"onViewChange\", \"onLightbox\", \"onBeforeEventDelete\", \"onBeforeDrag\"];\r\n\tvar hiding_function = function(){\r\n\t\tscheduler.hideQuickInfo(true);\r\n\t\treturn true;\r\n\t};\r\n\tfor (var i=0; i window.innerWidth){\r\n\t\t\tleft = window.innerWidth - width;\r\n\t\t}\r\n\t\tleft = Math.max(0, left);\r\n\r\n\t\tqi.style.left = left + \"px\";\r\n\t\tqi.style.top = pos.top - (pos.dy?height:-pos.height) + \"px\";\r\n\t} else {\r\n\r\n\t\tconst dataPos = scheduler.$container.querySelector('.dhx_cal_data').offsetTop;\r\n\t\tqi.style.top = dataPos + 20 + \"px\";\r\n\t\tif (pos.dx == 1){\r\n\t\t\tqi.style.right = \"auto\";\r\n\t\t\tqi.style.left = -width + \"px\";\r\n\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tqi.style.left = \"-10px\";\r\n\t\t\t},1);\r\n\t\t} else {\r\n\t\t\tqi.style.left = \"auto\";\r\n\t\t\tqi.style.right = -width + \"px\";\r\n\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tqi.style.right = \"-10px\";\r\n\t\t\t},1);\r\n\t\t}\r\n\t\tqi.className = qi.className.replace(\" dhx_qi_left\",\"\").replace(\" dhx_qi_right\",\"\")+\" dhx_qi_\"+(pos.dx==1?\"left\":\"right\");\r\n\t}\r\n\r\n\tqi.ontransitionend = () => {\r\n\t\tfitQIInsideWindow(qi);\r\n\t\tqi.ontransitionend = null;\r\n\t};\r\n\tsetTimeout(() => {\r\n\t\tfitQIInsideWindow(qi);\r\n\t}, 1);\r\n};\r\n\r\nfunction fitQIInsideWindow(quickInfoPopup){\r\n\tconst popupRect = quickInfoPopup.getBoundingClientRect();\r\n\tconst containerRect = scheduler.$container.getBoundingClientRect();\r\n\r\n\t// calculate the bottom offset of the Quick Info relative to the scheduler container\r\n\tconst offsetBottom = containerRect.bottom - popupRect.bottom;\r\n\r\n\t// If the popup extends outside the scheduler container, adjust its top position\r\n\tif (offsetBottom < 0) {\r\n\t\tquickInfoPopup.style.top = `${parseFloat(quickInfoPopup.style.top) + offsetBottom}px`;\r\n\t}\r\n}\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function(){\r\n\tscheduler.hideQuickInfo();\r\n\tif(this._quick_info_box){\r\n\t\tvar box = this._quick_info_box;\r\n\t\tif(box.parentNode){\r\n\t\t\tbox.parentNode.removeChild(box);\r\n\t\t}\r\n\t\tthis._quick_info_box = null;\r\n\t}\r\n});\r\nscheduler._quick_info_onscroll_handler = function(e){\r\n\tscheduler.hideQuickInfo();\r\n};\r\nscheduler._init_quick_info = function(){\r\n\tif (!this._quick_info_box){\r\n\r\n\r\n\t\tvar qi = this._quick_info_box = document.createElement(\"div\");\r\n\r\n\t\tthis._waiAria.quickInfoAttr(qi);\r\n\r\n\t\tqi.className = \"dhx_cal_quick_info\";\r\n\t\tif (scheduler.$testmode)\r\n\t\t\tqi.className += \" dhx_no_animate\";\r\n\t\tif (scheduler.config.rtl) qi.className += \" dhx_quick_info_rtl\";\r\n\t//title\r\n\t\tvar ariaAttr = this._waiAria.quickInfoHeaderAttrString();\r\n\t\tvar html = `\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t\t
\r\n\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t\t
`;\r\n\r\n\t//buttons\r\n\t\thtml += \"
\";\r\n\t\tvar buttons = scheduler.config.icons_select;\r\n\t\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\t\tvar ariaAttr = this._waiAria.quickInfoButtonAttrString(this.locale.labels[buttons[i]]);\r\n\t\t\t\thtml += `
\r\n\t\t\t\t
${scheduler.locale.labels[buttons[i]]}
`;\r\n\t\t\t}\r\n\t\t// }\r\n\t\thtml += \"
\";\r\n\r\n\t\tqi.innerHTML = html;\r\n\t\tscheduler.event(qi, \"click\", function(ev){\r\n\t\t\tscheduler._qi_button_click(ev.target || ev.srcElement);\r\n\t\t});\r\n\t\tif (scheduler.config.quick_info_detached){\r\n\t\t\tscheduler._detachDomEvent(scheduler._els[\"dhx_cal_data\"][0], \"scroll\", scheduler._quick_info_onscroll_handler);\r\n\t\t\tscheduler.event(scheduler._els[\"dhx_cal_data\"][0], \"scroll\", scheduler._quick_info_onscroll_handler);\r\n\t\t}\r\n\t}\r\n\r\n\treturn this._quick_info_box;\r\n};\r\n\r\nscheduler._qi_button_click = function(node){\r\n\tvar box = scheduler._quick_info_box;\r\n\tif (!node || node == box) return;\r\n\r\n\tif(node.closest(\".dhx_cal_qi_close_btn\")){\r\n\t\tscheduler.hideQuickInfo();\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar mask = scheduler._getClassName(node);\r\n\tif (mask.indexOf(\"_icon\")!=-1){\r\n\t\tvar id = scheduler._quick_info_box_id;\r\n\t\tscheduler._click.buttons[mask.split(\" \")[1].replace(\"icon_\",\"\")](id);\r\n\t} else\r\n\t\tscheduler._qi_button_click(node.parentNode);\r\n};\r\n\r\nfunction getPositionInsideScheduler(element){\r\n\tlet left = 0;\r\n\tlet top = 0;\r\n\r\n\tlet node = element;\r\n\twhile (node && node != scheduler._obj){\r\n\t\tleft += node.offsetLeft;\r\n\t\ttop += node.offsetTop-node.scrollTop;\r\n\t\tnode = node.offsetParent;\r\n\t}\r\n\tif(node){\r\n\t\tlet dx = (left + element.offsetWidth/2) > (scheduler._x/2) ? 1 : 0;\r\n\t\tlet dy = (top + element.offsetHeight/2) > (scheduler._y/2) ? 1 : 0;\r\n\r\n\t\treturn { left:left, top:top, dx:dx, dy:dy,\r\n\t\t\twidth:element.offsetWidth, height:element.offsetHeight };\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\nscheduler._get_event_counter_part = function(id){\r\n\tvar domEv = scheduler.getRenderedEvent(id);\r\n\treturn getPositionInsideScheduler(domEv);\r\n};\r\n\r\nscheduler._fill_quick_data = function(id){\r\n\tvar ev = scheduler.getEvent(id);\r\n\tvar qi = scheduler._quick_info_box;\r\n\r\n\tscheduler._quick_info_box_id = id;\r\n\r\n//title content\r\n\r\n\tvar header = {\r\n\t\tcontent: scheduler.templates.quick_info_title(ev.start_date, ev.end_date, ev),\r\n\t\tdate: scheduler.templates.quick_info_date(ev.start_date, ev.end_date, ev)\r\n\t};\r\n\tvar titleContent = qi.querySelector(\".dhx_cal_qi_tcontent\");\r\n\ttitleContent.innerHTML = `${header.content}`;\r\n\tvar titleDate = qi.querySelector(\".dhx_cal_qi_tdate\");\r\n\ttitleDate.innerHTML = header.date;\r\n\r\n\tscheduler._waiAria.quickInfoHeader(qi, [header.content, header.date].join(\" \"));\r\n\r\n//main content\r\n\tvar main = qi.querySelector(\".dhx_cal_qi_content\");\r\n\tconst mainContent = scheduler.templates.quick_info_content(ev.start_date, ev.end_date, ev);\r\n\tif(mainContent){\r\n\t\tmain.classList.remove(\"dhx_hidden\");\r\n\t\tmain.innerHTML = mainContent;\r\n\t}else{\r\n\t\tmain.classList.add(\"dhx_hidden\");\r\n\t}\r\n};\r\n\r\n\r\n}","export default function(scheduler){\r\n\t\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar originalRecurringSetValue;\r\n\tif (scheduler.form_blocks.recurring) {\r\n\t\toriginalRecurringSetValue = scheduler.form_blocks.recurring.set_value;\r\n\t}\r\n\tvar original_left_buttons = scheduler.config.buttons_left.slice();\r\n\tvar original_right_buttons = scheduler.config.buttons_right.slice();\r\n\r\n\tscheduler.attachEvent(\"onBeforeLightbox\", function(id) {\r\n\t\tif (this.config.readonly_form || this.getEvent(id).readonly) {\r\n\t\t\tthis.config.readonly_active = true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.config.readonly_active = false;\r\n\t\t\tscheduler.config.buttons_left = original_left_buttons.slice();\r\n\t\t\tscheduler.config.buttons_right = original_right_buttons.slice();\r\n\t\r\n\t\t\t// initial value\r\n\t\t\tif(scheduler.form_blocks.recurring) {\r\n\t\t\t\tscheduler.form_blocks.recurring.set_value = originalRecurringSetValue;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar sns = this.config.lightbox.sections;\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\tfor (var i = 0; i < sns.length; i++) {\r\n\t\t\t\tif (sns[i].type == 'recurring') {\r\n\t\t\t\t\tif (this.config.readonly_active && scheduler.form_blocks.recurring) {\r\n\t\t\t\t\t\tscheduler.form_blocks.recurring.set_value = function(node, value, ev) {\r\n\t\t\t\t\t\t\tvar wrapper = scheduler.$domHelpers.closest(node, \".dhx_wrap_section\");\r\n\t\t\t\t\t\t\tvar style = \"none\";\r\n\t\t\t\t\t\t\twrapper.querySelector('.dhx_cal_lsection').display = style;\r\n\t\t\t\t\t\t\twrapper.querySelector('.dhx_form_repeat').display = style;\r\n\t\t\t\t\t\t\twrapper.style.display = style;\r\n\r\n\t\t\t\t\t\t\tscheduler.setLightboxSize();\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar forbidden_buttons = [\"dhx_delete_btn\", \"dhx_save_btn\"];\r\n\t\t\tvar button_arrays = [scheduler.config.buttons_left, scheduler.config.buttons_right];\r\n\t\t\tfor (var i = 0; i < forbidden_buttons.length; i++) {\r\n\t\t\t\tvar forbidden_button = forbidden_buttons[i];\r\n\t\t\t\tfor (var k = 0; k < button_arrays.length; k++) {\r\n\t\t\t\t\tvar button_array = button_arrays[k];\r\n\t\t\t\t\tvar index = -1;\r\n\t\t\t\t\tfor (var p = 0; p < button_array.length; p++) {\r\n\t\t\t\t\t\tif (button_array[p] == forbidden_button) {\r\n\t\t\t\t\t\t\tindex = p;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (index != -1) {\r\n\t\t\t\t\t\tbutton_array.splice(index, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.resetLightbox();\r\n\r\n\t\treturn true;\r\n\t});\r\n\r\n\tfunction txt_replace(tag, d, n, text) {\r\n\t\tvar txts = d.getElementsByTagName(tag);\r\n\t\tvar txtt = n.getElementsByTagName(tag);\r\n\t\tfor (var i = txtt.length - 1; i >= 0; i--) {\r\n\t\t\tvar n = txtt[i];\r\n\t\t\tif (!text){\r\n\t\t\t\tn.disabled = true;\r\n\t\t\t\t//radio and checkboxes loses state after .cloneNode in IE\r\n\t\t\t\tif(d.checked)\r\n\t\t\t\t\tn.checked = true;\r\n\t\t\t}else {\r\n\t\t\t\tvar t = document.createElement(\"span\");\r\n\t\t\t\tt.className = \"dhx_text_disabled\";\r\n\t\t\t\tt.innerHTML = text(txts[i]);\r\n\t\t\t\tn.parentNode.insertBefore(t, n);\r\n\t\t\t\tn.parentNode.removeChild(n);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tvar old = scheduler._fill_lightbox;\r\n\tscheduler._fill_lightbox = function() {\r\n\r\n\t\tvar lb = this.getLightbox();\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\tlb.style.visibility = 'hidden';\r\n\t\t\t// lightbox should have actual sizes before rendering controls\r\n\t\t\t// currently only matters for dhtmlxCombo\r\n\t\t\tlb.style.display = 'block';\r\n\t\t}\r\n\t\tvar res = old.apply(this, arguments);\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\t//reset visibility and display\r\n\t\t\tlb.style.visibility = '';\r\n\t\t\tlb.style.display = 'none';\r\n\t\t}\r\n\r\n\t\tif (this.config.readonly_active) {\r\n\r\n\t\t\tvar originalForm = this.getLightbox();\r\n\t\t\tvar readonlyForm = this._lightbox_r = originalForm.cloneNode(true);\r\n\t\t\treadonlyForm.id = scheduler.uid();\r\n\t\t\treadonlyForm.className += \" dhx_cal_light_readonly\";\r\n\t\t\ttxt_replace(\"textarea\", originalForm, readonlyForm, function(a) {\r\n\t\t\t\treturn a.value;\r\n\t\t\t});\r\n\t\t\ttxt_replace(\"input\", originalForm, readonlyForm, false);\r\n\t\t\ttxt_replace(\"select\", originalForm, readonlyForm, function(a) {\r\n\t\t\t\tif(!a.options.length) return \"\";\r\n\t\t\t\treturn a.options[Math.max((a.selectedIndex || 0), 0)].text;\r\n\t\t\t});\r\n\r\n\t\t\toriginalForm.parentNode.insertBefore(readonlyForm, originalForm);\r\n\r\n\t\t\tthis.showCover(readonlyForm);\r\n\t\t\tif (scheduler._lightbox)\r\n\t\t\t\tscheduler._lightbox.parentNode.removeChild(scheduler._lightbox);\r\n\t\t\tthis._lightbox = readonlyForm;\r\n\r\n\t\t\tif (scheduler.config.drag_lightbox)\r\n\t\t\t\tscheduler.event(readonlyForm.firstChild, \"mousedown\", scheduler._ready_to_dnd);\r\n\t\t\t\t\r\n\t\t\tscheduler._init_lightbox_events();\r\n\t\t\tthis.setLightboxSize();\r\n\t\t}\r\n\t\treturn res;\r\n\t};\r\n\r\n\tvar hold = scheduler.hide_lightbox;\r\n\tscheduler.hide_lightbox = function() {\r\n\t\tif (this._lightbox_r) {\r\n\t\t\tthis._lightbox_r.parentNode.removeChild(this._lightbox_r);\r\n\t\t\tthis._lightbox_r = this._lightbox = null;\r\n\t\t}\r\n\r\n\t\treturn hold.apply(this, arguments);\r\n\t};\r\n});\r\n\r\n\r\n}","import { RRule, rrulestr } from 'rrule';\r\n\r\nexport default function (scheduler) {\r\n\r\n\tfunction clearMilliseconds(date) {\r\n\t\treturn new Date(\r\n\t\t\tdate.getFullYear(),\r\n\t\t\tdate.getMonth(),\r\n\t\t\tdate.getDate(),\r\n\t\t\tdate.getHours(),\r\n\t\t\tdate.getMinutes(),\r\n\t\t\tdate.getSeconds(),\r\n\t\t\t0\r\n\t\t);\r\n\t}\r\n\r\n\tfunction isDeletedOccurrence(event) {\r\n\t\treturn !!event.deleted;\r\n\t}\r\n\r\n\tfunction isSeries(event) {\r\n\t\treturn !!event.rrule && !event.recurring_event_id;\r\n\t}\r\n\r\n\tfunction clearRecurringProperties(event) {\r\n\t\tevent.rrule = \"\";\r\n\t\tevent.original_start = null;\r\n\t\tevent.recurring_event_id = null;\r\n\t\tevent.duration = null;\r\n\t\tevent.deleted = null;\r\n\t}\r\n\r\n\tfunction createException(ev) {\r\n\t\tlet id = ev.id.split(\"#\");\r\n\r\n\t\tlet nid = scheduler.uid();\r\n\t\tscheduler._not_render = true;\r\n\t\tlet nev = scheduler._copy_event(ev);\r\n\t\tnev.id = nid;\r\n\t\tnev.recurring_event_id = id[0];\r\n\r\n\t\tlet timestamp = id[1];\r\n\r\n\t\tnev.original_start = new Date(Number(timestamp));\r\n\r\n\t\tscheduler._add_rec_marker(nev, timestamp);\r\n\t\tscheduler.addEvent(nev);\r\n\t\tscheduler._not_render = false;\r\n\t}\r\n\r\n\tscheduler._rec_temp = [];\r\n\tscheduler._rec_markers_pull = {};\r\n\tscheduler._rec_markers = {};\r\n\tscheduler._add_rec_marker = function (ev, time) {\r\n\t\tev._pid_time = time;\r\n\t\tthis._rec_markers[ev.id] = ev;\r\n\t\tif (!this._rec_markers_pull[ev.event_pid]) this._rec_markers_pull[ev.event_pid] = {};\r\n\t\tthis._rec_markers_pull[ev.event_pid][time] = ev;\r\n\t};\r\n\tscheduler._get_rec_marker = function (time, id) {\r\n\t\tlet ch = this._rec_markers_pull[id];\r\n\t\tif (ch) return ch[time];\r\n\t\treturn null;\r\n\t};\r\n\tscheduler._get_rec_markers = function (id) {\r\n\t\treturn (this._rec_markers_pull[id] || []);\r\n\t};\r\n\r\n\t(function () {\r\n\t\tvar old_add_event = scheduler.addEvent;\r\n\t\tscheduler.addEvent = function (start_date, end_date, text, id, extra_data) {\r\n\t\t\tvar ev_id = old_add_event.apply(this, arguments);\r\n\r\n\t\t\tif (ev_id && scheduler.getEvent(ev_id)) {\r\n\t\t\t\tvar ev = scheduler.getEvent(ev_id);\r\n\r\n\t\t\t\tif (ev.start_date) {\r\n\t\t\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t\t\t}\r\n\t\t\t\tif (ev.end_date) {\r\n\t\t\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn ev_id;\r\n\t\t};\r\n\t})();\r\n\r\n\tscheduler.attachEvent(\"onEventLoading\", function (event) {\r\n\r\n\t\tif (event.original_start) {\r\n\t\t\tevent.original_start = scheduler.templates.parse_date(event.original_start);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventIdChange\", function (id, new_id) {\r\n\t\tif (this._ignore_call) return;\r\n\t\tthis._ignore_call = true;\r\n\r\n\t\tif (scheduler._rec_markers[id]) {\r\n\t\t\t//important for for correct work of scheduler.getEvents(from, to) and collision detection\r\n\t\t\tscheduler._rec_markers[new_id] = scheduler._rec_markers[id];\r\n\t\t\tdelete scheduler._rec_markers[id];\r\n\t\t}\r\n\r\n\t\tif (scheduler._rec_markers_pull[id]) {\r\n\t\t\tscheduler._rec_markers_pull[new_id] = scheduler._rec_markers_pull[id];\r\n\t\t\tdelete scheduler._rec_markers_pull[id];\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < this._rec_temp.length; i++) {\r\n\t\t\tvar tev = this._rec_temp[i];\r\n\t\t\tif (tev.recurring_event_id == id) {\r\n\t\t\t\ttev.recurring_event_id = new_id;\r\n\t\t\t\tthis.changeEventId(tev.id, new_id + \"#\" + tev.id.split(\"#\")[1]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (var i in this._rec_markers) {\r\n\t\t\tvar tev = this._rec_markers[i];\r\n\t\t\tif (tev.recurring_event_id == id) {\r\n\t\t\t\ttev.recurring_event_id = new_id;\r\n\t\t\t\ttev._pid_changed = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar el = scheduler._rec_markers[new_id];\r\n\t\tif (el && el._pid_changed) {\r\n\t\t\tdelete el._pid_changed;\r\n\t\t\tsetTimeout(function () {\r\n\t\t\t\tif (scheduler.$destroyed) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tscheduler.callEvent(\"onEventChanged\", [new_id, scheduler.getEvent(new_id)]);\r\n\t\t\t}, 1);\r\n\t\t}\r\n\r\n\t\tdelete this._ignore_call;\r\n\t});\r\n\r\n\tfunction deleteEventFromSeries(idTimestamp, ev) {\r\n\t\tlet id = idTimestamp;\r\n\t\tidTimestamp = id.split(\"#\");\r\n\t\tlet nid = scheduler.uid();\r\n\t\tlet tid = (idTimestamp[1]) ? idTimestamp[1] : (ev._pid_time);\r\n\t\tlet nev = scheduler._copy_event(ev);\r\n\t\tnev.id = nid;\r\n\t\tnev.recurring_event_id = ev.recurring_event_id || idTimestamp[0];\r\n\t\tnev.original_start = new Date(Number(tid));\r\n\t\tnev.deleted = true;\r\n\t\tscheduler.addEvent(nev);\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function (id) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (this._is_virtual_event(id) || (this._is_modified_occurence(ev) && !isDeletedOccurrence(ev))) {\r\n\t\t\tdeleteEventFromSeries(id, ev);\r\n\t\t} else {\r\n\t\t\tif (isSeries(ev) && this._lightbox_id)\r\n\t\t\t\tthis._roll_back_dates(ev);\r\n\r\n\r\n\t\t\tvar sub = this._get_rec_markers(id);\r\n\t\t\tfor (var i in sub) {\r\n\t\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\t\tid = sub[i].id;\r\n\t\t\t\t\tif (this.getEvent(id))\r\n\t\t\t\t\t\tthis.deleteEvent(id, true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function (id, ev) {\r\n\t\tif (!this._is_virtual_event(id) && this._is_modified_occurence(ev)) {\r\n\t\t\tif (!scheduler._events[id]) {\r\n\t\t\t\tev.deleted = true;\r\n\t\t\t\tthis.setEvent(id, ev);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\", function (id, event) {\r\n\t\tif (this._loading) return true;\r\n\r\n\t\tvar ev = this.getEvent(id);\r\n\r\n\t\tif (this._is_virtual_event(id)) {\r\n\t\t\tcreateException(ev);\r\n\r\n\t\t} else {\r\n\t\t\tif (ev.start_date) {\r\n\t\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t\t}\r\n\t\t\tif (ev.end_date) {\r\n\t\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t\t}\r\n\r\n\t\t\tif (isSeries(ev) && this._lightbox_id) {\r\n\t\t\t\tthis._roll_back_dates(ev);\r\n\t\t\t\t//scheduler.recurrings.rollbackDates(ev);\r\n\t\t\t}\r\n\r\n\t\t\tvar sub = this._get_rec_markers(id);\r\n\t\t\tfor (var i in sub) {\r\n\t\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\t\tdelete this._rec_markers[sub[i].id];\r\n\t\t\t\t\tthis.deleteEvent(sub[i].id, true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tdelete this._rec_markers_pull[id];\r\n\r\n\t\t\t// it's possible that after editing event is no longer exists, in such case we need to remove _select_id flag\r\n\t\t\tvar isEventFound = false;\r\n\t\t\tfor (var k = 0; k < this._rendered.length; k++) {\r\n\t\t\t\tif (this._rendered[k].getAttribute(this.config.event_attribute) == id)\r\n\t\t\t\t\tisEventFound = true;\r\n\t\t\t}\r\n\t\t\tif (!isEventFound)\r\n\t\t\t\tthis._select_id = null;\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventAdded\", function (id) {\r\n\t\tif (!this._loading) {\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif (isSeries(ev)) {\r\n\t\t\t\tthis._roll_back_dates(ev);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventSave\", function (id, data, is_new_event) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (isSeries(ev))\r\n\t\t\tthis._select_id = null;\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventCreated\", function (id) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (!isSeries(ev)) {\r\n\t\t\tclearRecurringProperties(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventCancel\", function (id) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (isSeries(ev)) {\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t\t// a bit expensive, but we need to be sure that event re-rendered, because view can be corrupted by resize , during edit process\r\n\t\t\tthis.render_view_data();\r\n\t\t}\r\n\t});\r\n\tscheduler._roll_back_dates = function (ev) {\r\n\t\t//// !!!!! calc temp properties\r\n\t\tif (ev.start_date) {\r\n\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t}\r\n\t\tif (ev.end_date) {\r\n\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t}\r\n\r\n\t\tev.duration = Math.round((ev.end_date.valueOf() - ev.start_date.valueOf()) / 1000);\r\n\t\tev.end_date = ev._end_date;\r\n\t\tif (ev._start_date) {\r\n\t\t\tev.start_date.setMonth(0);\r\n\t\t\tev.start_date.setDate(ev._start_date.getDate());\r\n\t\t\tev.start_date.setMonth(ev._start_date.getMonth());\r\n\t\t\tev.start_date.setFullYear(ev._start_date.getFullYear());\r\n\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._is_virtual_event = function (id) {\r\n\t\treturn id.toString().indexOf(\"#\") != -1;\r\n\t};\r\n\tscheduler._is_modified_occurence = function (ev) {\r\n\t\treturn (ev.recurring_event_id && ev.recurring_event_id != \"0\");\r\n\t};\r\n\r\n\tscheduler.showLightbox_rec = scheduler.showLightbox;\r\n\tscheduler.showLightbox = function (id) {\r\n\t\tvar locale = this.locale;\r\n\t\tvar c = scheduler.config.lightbox_recurring;\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tvar pid = ev.recurring_event_id;\r\n\t\tvar isVirtual = this._is_virtual_event(id);\r\n\t\tif (isVirtual)\r\n\t\t\tpid = id.split(\"#\")[0];\r\n\r\n\t\t// show series\r\n\t\tvar showSeries = function (id) {\r\n\t\t\tvar event = scheduler.getEvent(id);\r\n\t\t\tevent._end_date = event.end_date;\r\n\t\t\tevent.end_date = new Date(event.start_date.valueOf() + event.duration * 1000);\r\n\t\t\treturn scheduler.showLightbox_rec(id); // editing series\r\n\t\t};\r\n\r\n\t\tif ((pid || pid * 1 === 0) && isSeries(ev)) {\r\n\t\t\t// direct API call on series id\r\n\t\t\treturn showSeries(id);\r\n\t\t}\r\n\t\tif (!pid || pid === '0' || ((!locale.labels.confirm_recurring || c == 'instance') || (c == 'series' && !isVirtual))) {\r\n\t\t\t// editing instance or non recurring event\r\n\t\t\treturn this.showLightbox_rec(id);\r\n\t\t}\r\n\t\tif (c == 'ask') {\r\n\t\t\tvar that = this;\r\n\t\t\tscheduler.modalbox({\r\n\t\t\t\ttext: locale.labels.confirm_recurring,\r\n\t\t\t\ttitle: locale.labels.title_confirm_recurring,\r\n\t\t\t\twidth: \"500px\",\r\n\t\t\t\tposition: \"middle\",\r\n\t\t\t\tbuttons: [locale.labels.button_edit_series, locale.labels.button_edit_occurrence, locale.labels.icon_cancel],\r\n\t\t\t\tcallback: function (index) {\r\n\t\t\t\t\tswitch (+index) {\r\n\t\t\t\t\t\tcase 0:\r\n\t\t\t\t\t\t\treturn showSeries(pid);\r\n\t\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\t\treturn that.showLightbox_rec(id);\r\n\t\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tshowSeries(pid);\r\n\t\t}\r\n\t};\r\n\r\n\tfunction groupExceptions() {\r\n\t\tconst exceptions = {};\r\n\t\tfor (const i in scheduler._events) {\r\n\t\t\tconst ev = scheduler._events[i];\r\n\t\t\tif (ev.recurring_event_id) {\r\n\t\t\t\tif (!exceptions[ev.recurring_event_id]) {\r\n\t\t\t\t\texceptions[ev.recurring_event_id] = {};\r\n\t\t\t\t}\r\n\t\t\t\texceptions[ev.recurring_event_id][ev.original_start.valueOf()] = ev;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn exceptions;\r\n\t}\r\n\r\n\tscheduler.get_visible_events_rec = scheduler.get_visible_events;\r\n\tscheduler.get_visible_events = function (only_timed) {\r\n\t\tfor (var i = 0; i < this._rec_temp.length; i++)\r\n\t\t\tdelete this._events[this._rec_temp[i].id];\r\n\t\tthis._rec_temp = [];\r\n\r\n\t\tconst exceptions = groupExceptions();\r\n\t\tvar stack = this.get_visible_events_rec(only_timed);\r\n\t\tvar out = [];\r\n\t\tfor (var i = 0; i < stack.length; i++) {\r\n\t\t\tif (stack[i].deleted || stack[i].recurring_event_id) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif (isSeries(stack[i])) {\r\n\t\t\t\tthis.repeat_date(stack[i], out, undefined, undefined, undefined, undefined, exceptions);\r\n\t\t\t} else {\r\n\t\t\t\tout.push(stack[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn out;\r\n\t};\r\n\r\n\t(function () {\r\n\t\tvar old = scheduler.isOneDayEvent;\r\n\t\tscheduler.isOneDayEvent = function (ev) {\r\n\t\t\tif (isSeries(ev)) return true;\r\n\t\t\treturn old.call(this, ev);\r\n\t\t};\r\n\t\tvar old_update_event = scheduler.updateEvent;\r\n\t\tscheduler.updateEvent = function (id) {\r\n\t\t\tvar ev = scheduler.getEvent(id);\r\n\r\n\t\t\tif (ev && isSeries(ev) && !this._is_virtual_event(id)) {\r\n\t\t\t\tscheduler.update_view();\r\n\t\t\t} else {\r\n\t\t\t\told_update_event.call(this, id);\r\n\t\t\t}\r\n\t\t};\r\n\t})();\r\n\r\n\tconst toIcalString = scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\");\r\n\r\n\tscheduler.repeat_date = function (ev, stack, non_render, from, to, maxCount, exceptions) {\r\n\t\tif (!ev.rrule) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tlet seriesExceptions = exceptions ? exceptions[ev.id] : groupExceptions()[ev.id];\r\n\t\tif (!seriesExceptions) {\r\n\t\t\tseriesExceptions = {};\r\n\t\t}\r\n\r\n\t\tif (!from) {\r\n\t\t\tfrom = scheduler._min_date;\r\n\t\t}\r\n\t\tif (!to) {\r\n\t\t\tto = scheduler._max_date;\r\n\t\t}\r\n\r\n\t\tconst utcStart = new Date(Date.UTC(ev.start_date.getFullYear(), ev.start_date.getMonth(), ev.start_date.getDate(), ev.start_date.getHours(), ev.start_date.getMinutes(), ev.start_date.getSeconds()));\r\n\t\tlet parsedRRule;\r\n\t\tif (maxCount){\r\n\t\t\t// for getRecDates() method\r\n\t\t\tparsedRRule = rrulestr(`RRULE:${ev.rrule};UNTIL=${toIcalString(ev.end_date)};COUNT=${maxCount}`, { dtstart: utcStart });\r\n\t\t} else {\r\n\t\t\tparsedRRule = rrulestr(`RRULE:${ev.rrule};UNTIL=${toIcalString(ev.end_date)}`, { dtstart: utcStart/*ev.start_date*/ });\r\n\t\t}\r\n\t\t// `from` is already in UTC from `dtstart: utcStart`\r\n\t\tconst utcTo = new Date(Date.UTC(to.getFullYear(), to.getMonth(), to.getDate(), to.getHours(), to.getMinutes(), to.getSeconds())); \r\n\t\tconst repeatedDates = parsedRRule.between(from, utcTo).map(date => {\r\n\t\t\tconst adjustedDate = new Date(date);\r\n\t\t\tadjustedDate.setHours(ev.start_date.getHours());\r\n\t\t\tadjustedDate.setMinutes(ev.start_date.getMinutes());\r\n\t\t\tadjustedDate.setSeconds(ev.start_date.getSeconds());\r\n\t\t\treturn adjustedDate;\r\n\t\t});\r\n\t\tlet visibleCount = 0;\r\n\r\n\t\tconst eventDuration = ev.duration;\r\n\r\n\t\tfor (let i = 0; i < repeatedDates.length; i++) {\r\n\t\t\tif (maxCount && visibleCount >= maxCount) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tconst date = repeatedDates[i];\r\n\r\n\t\t\tlet exception = seriesExceptions[date.valueOf()];\r\n\t\t\tif (exception) {\r\n\t\t\t\tif (exception.deleted) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvisibleCount++;\r\n\t\t\t\t\tstack.push(exception);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tconst copy = scheduler._copy_event(ev);\r\n\t\t\t\t//copy._timed = ev._timed;\r\n\t\t\t\tcopy.text = ev.text;\r\n\t\t\t\tcopy.start_date = date;\r\n\t\t\t\tcopy.id = ev.id + \"#\" + Math.ceil(date.valueOf());\r\n\t\t\t\tcopy.end_date = new Date(date.valueOf() + eventDuration * 1000);\r\n\t\t\t\tcopy.end_date = scheduler._fix_daylight_saving_date(copy.start_date, copy.end_date, ev, date, copy.end_date);\r\n\t\t\t\tcopy._timed = scheduler.isOneDayEvent(copy);\r\n\r\n\r\n\r\n\t\t\t\tif (!copy._timed && !scheduler._table_view && !scheduler.config.multi_day) continue;\r\n\t\t\t\tstack.push(copy);\r\n\r\n\t\t\t\tif (!non_render) {\r\n\t\t\t\t\tscheduler._events[copy.id] = copy;\r\n\t\t\t\t\tscheduler._rec_temp.push(copy);\r\n\t\t\t\t}\r\n\t\t\t\tvisibleCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//GS-2534: case when exceptions have different dates\r\n\t\tif (seriesExceptions && repeatedDates.length == 0 ){\r\n\t\t\tfor (let a in seriesExceptions){\r\n\t\t\t\tlet exception = seriesExceptions[a];\r\n\t\t\t\tif (exception) {\r\n\t\t\t\t\tif(exception.deleted){\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\telse if (from && to && exception.start_date < to && exception.end_date > from) {\r\n\t\t\t\t\t\tstack.push(exception);\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t} \r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._fix_daylight_saving_date = function (start_date, end_date, ev, counter, default_date) {\r\n\t\tvar shift = start_date.getTimezoneOffset() - end_date.getTimezoneOffset();\r\n\t\tif (shift) {\r\n\t\t\tif (shift > 0) {\r\n\t\t\t\t// e.g. 24h -> 23h\r\n\t\t\t\treturn new Date(counter.valueOf() + ev.duration * 1000 - shift * 60 * 1000);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t// e.g. 24h -> 25h\r\n\t\t\t\treturn new Date(end_date.valueOf() - shift * 60 * 1000);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new Date(default_date.valueOf());\r\n\t};\r\n\tscheduler.getRecDates = function (id, max) {\r\n\t\tvar ev = typeof id == \"object\" ? id : scheduler.getEvent(id);\r\n\t\tvar recurrings = [];\r\n\t\tmax = max || 100;\r\n\r\n\t\tif (!isSeries(ev)) {\r\n\t\t\treturn [\r\n\t\t\t\t{ start_date: ev.start_date, end_date: ev.end_date }\r\n\t\t\t];\r\n\t\t}\r\n\t\tif (ev.deleted) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tscheduler.repeat_date(ev, recurrings, true, ev.start_date, ev.end_date, max);\r\n\r\n\t\tvar result = [];\r\n\t\tfor (var i = 0; i < recurrings.length; i++) {\r\n\t\t\tif (!recurrings[i].deleted) {\r\n\t\t\t\tresult.push({ start_date: recurrings[i].start_date, end_date: recurrings[i].end_date });\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t};\r\n\tscheduler.getEvents = function (from, to) {\r\n\t\tvar result = [];\r\n\t\tconst exceptions = groupExceptions();\r\n\t\tfor (var a in this._events) {\r\n\t\t\tvar ev = this._events[a];\r\n\t\t\tif (ev.recurring_event_id) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif (from && to && ev.start_date < to && ev.end_date > from) {\r\n\t\t\t\tif (isSeries(ev)) {\r\n\t\t\t\t\tvar sev = [];\r\n\t\t\t\t\tthis.repeat_date(ev, sev, true, from, to, undefined, exceptions);\r\n\t\t\t\t\tsev.forEach(function(occurence){\r\n\t\t\t\t\t\tif (occurence.start_date < to && occurence.end_date > from) {\r\n\t\t\t\t\t\t\tresult.push(occurence);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t// if it's virtual event we can skip it\r\n\t\t\t\t} else if (!this._is_virtual_event(ev.id)) {\r\n\t\t\t\t\tresult.push(ev);\r\n\t\t\t\t}\r\n\t\t\t} else if (!from && !to && !this._is_virtual_event(ev.id)) {\r\n\t\t\t\tresult.push(ev);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t};\r\n\r\n\t//drop secondary attributes\r\n\tscheduler._copy_dummy = function (ev) {\r\n\t\tvar start_date = new Date(this.start_date);\r\n\t\tvar end_date = new Date(this.end_date);\r\n\t\tthis.start_date = start_date;\r\n\t\tthis.end_date = end_date;\r\n\t\tthis.duration = this.rrule = null;\r\n\t};\r\n\r\n\tscheduler.config.include_end_by = false;\r\n\tscheduler.config.lightbox_recurring = 'ask'; // series, instance\r\n\tscheduler.config.recurring_workdays = [RRule.MO.weekday,RRule.TU.weekday,RRule.WE.weekday,RRule.TH.weekday,RRule.FR.weekday];\r\n\tscheduler.config.repeat_date = \"%m.%d.%Y\";\r\n\tscheduler.config.lightbox.sections = [\r\n\t\t{ name: \"description\", map_to: \"text\", type: \"textarea\", focus: true },\r\n\t\t{ name: \"recurring\", type: \"recurring\", map_to: \"rec_type\" },\r\n\t\t{ name: \"time\", height: 72, type: \"time\", map_to: \"auto\" }\r\n\t];\r\n\r\n\tscheduler.attachEvent(\"onClearAll\", function () {\r\n\t\tscheduler._rec_markers = {}; //clear recurring events data\r\n\t\tscheduler._rec_markers_pull = {};\r\n\t\tscheduler._rec_temp = [];\r\n\t});\r\n\r\n\r\n\tfunction getTopLevelOption(rruleObj, untilDate) {\r\n\t\tconst options = rruleObj.options;\r\n\t\tconst until = options.until || untilDate;\r\n\r\n\t\tconst hasEndCondition = options.count || (until && until.getFullYear() !== 9999);\r\n\r\n\t\tif (hasEndCondition) {\r\n\t\t\treturn 'CUSTOM';\r\n\t\t}\r\n\r\n\t\tif (options.freq === RRule.DAILY && options.interval === 1 && !options.byweekday) {\r\n\t\t\treturn 'DAILY';\r\n\t\t} else if (options.freq === RRule.WEEKLY && options.interval === 1 && !options.byweekday) {\r\n\t\t\treturn 'WEEKLY';\r\n\t\t} else if (options.freq === RRule.MONTHLY && options.interval === 1 && !options.bysetpos) {\r\n\t\t\treturn 'MONTHLY';\r\n\t\t} else if (options.freq === RRule.YEARLY && options.interval === 1 && !options.bysetpos) {\r\n\t\t\treturn 'YEARLY';\r\n\t\t} else if (options.freq === RRule.DAILY && options.byweekday && options.byweekday.length === scheduler.config.recurring_workdays.length &&\r\n\t\t\toptions.byweekday.includes(RRule.MO) &&\r\n\t\t\toptions.byweekday.includes(RRule.TU) &&\r\n\t\t\toptions.byweekday.includes(RRule.WE) &&\r\n\t\t\toptions.byweekday.includes(RRule.TH) &&\r\n\t\t\toptions.byweekday.includes(RRule.FR)) {\r\n\t\t\treturn 'WORKDAYS';\r\n\t\t} else {\r\n\t\t\treturn 'CUSTOM';\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction getWeekdayOfMonth(date) {\r\n\t\tconst dayOfWeek = date.getDay();\r\n\t\tconst dayOfMonth = date.getDate();\r\n\t\tconst dayNumber = Math.ceil(dayOfMonth / 7);\r\n\t\treturn { dayOfWeek, dayNumber };\r\n\t}\r\n\r\n\r\n\tconst jsDaysToRRULEDays = {\r\n\t\t0: \"SU\",\r\n\t\t1: \"MO\",\r\n\t\t2: \"TU\",\r\n\t\t3: \"WE\",\r\n\t\t4: \"TH\",\r\n\t\t5: \"FR\",\r\n\t\t6: \"SA\"\r\n\t};\r\n\tconst RruleDayNumsToJs = {\r\n\t\t0: 1,\r\n\t\t1: 2,\r\n\t\t2: 3,\r\n\t\t3: 4,\r\n\t\t4: 5,\r\n\t\t5: 6,\r\n\t\t6: 0\r\n\t};\r\n\r\n\tfunction fillCustomDaily(node, rule) {\r\n\t\tnode.querySelector(\"[name='repeat_interval_value']\").value = (rule ? rule.interval : 1) || 1;\r\n\t}\r\n\r\n\tfunction fillCustomWeekly(node, rule, event) {\r\n\t\tnode.querySelector(\"[name='repeat_interval_value']\").value = (rule ? rule.interval : 1) || 1;\r\n\r\n\t\tconst dayCheckboxes = node.querySelectorAll(`.dhx_form_repeat_custom_week input`);\r\n\t\tdayCheckboxes.forEach((ch) => ch.checked = false);\r\n\t\tif (rule && rule.byweekday) {\r\n\t\t\trule.byweekday.forEach((day) => {\r\n\t\t\t\tconst dayNum = RruleDayNumsToJs[day.weekday];\r\n\t\t\t\tconst dayLabel = jsDaysToRRULEDays[dayNum];\r\n\t\t\t\tnode.querySelector(`.dhx_form_repeat_custom_week input[value=\"${dayLabel}\"]`).checked = true;\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tconst dayLabel = jsDaysToRRULEDays[event.start_date.getDay()];\r\n\t\t\tnode.querySelector(`.dhx_form_repeat_custom_week input[value=\"${dayLabel}\"]`).checked = true;\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tfunction fillCustomMonthly(node, rule, event) {\r\n\t\tnode.querySelector(\"[name='repeat_interval_value']\").value = (rule ? rule.interval : 1) || 1;\r\n\r\n\t\tconst dateOfMonth = node.querySelector(`.dhx_form_repeat_custom_month [value=\"month_date\"]`);\r\n\t\tconst nthWeekDayOfMonth = node.querySelector(`.dhx_form_repeat_custom_month [value=\"month_nth_weekday\"]`);\r\n\t\tdateOfMonth.innerText = scheduler.templates.repeat_monthly_date(event.start_date, event);\r\n\t\tnthWeekDayOfMonth.innerText = scheduler.templates.repeat_monthly_weekday(event.start_date, event);\r\n\r\n\t\tif (!rule || (rule.bysetpos && !(rule.byweekday && rule.byweekday.length))) {\r\n\t\t\tnode.querySelector(`[name=\"dhx_custom_month_option\"]`).value = \"month_date\";\r\n\t\t} else {\r\n\t\t\tnode.querySelector(`[name=\"dhx_custom_month_option\"]`).value = \"month_nth_weekday\";\r\n\t\t}\r\n\t}\r\n\r\n\tfunction formatDayNumber(date){\r\n\t\tswitch (date) {\r\n\t\t\tcase 1:\r\n\t\t\tcase 31:\r\n\t\t\t\treturn `${date}st`;\r\n\t\t\tcase 2:\r\n\t\t\t\treturn `${date}nd`;\r\n\t\t\tcase 3:\r\n\t\t\t\treturn `${date}rd`;\r\n\t\t\tdefault:\r\n\t\t\t\treturn `${date}th`;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.templates.repeat_monthly_date = function(startDate, event) {\r\n\t\tconst date = startDate.getDate();\r\n\t\treturn `Every ${formatDayNumber(date)}`;\r\n\t};\r\n\tscheduler.templates.repeat_monthly_weekday = function(startDate, event) {\r\n\t\tconst nthDayOfMonth = getWeekdayOfMonth(startDate);\r\n\t\treturn `Every ${formatDayNumber(nthDayOfMonth.dayNumber)} ${scheduler.locale.date.day_full[nthDayOfMonth.dayOfWeek]}`;\r\n\t};\r\n\t\r\n\tscheduler.templates.repeat_yearly_month_date = function(startDate, event) {\r\n\t\tconst date = startDate.getDate();\r\n\t\tconst monthLabel = scheduler.locale.date.month_full[startDate.getMonth()];\r\n\t\treturn `Every ${formatDayNumber(date)} day of ${monthLabel}`;\r\n\t};\r\n\tscheduler.templates.repeat_yearly_month_weekday = function(startDate, event) {\r\n\t\tconst nthDayOfMonth = getWeekdayOfMonth(startDate);\r\n\t\tconst monthLabel = scheduler.locale.date.month_full[startDate.getMonth()];\r\n\t\treturn `Every ${formatDayNumber(nthDayOfMonth.dayNumber)} ${scheduler.locale.date.day_full[nthDayOfMonth.dayOfWeek]} of ${monthLabel}`;\r\n\t};\r\n\r\n\tfunction fillCustomYearly(node, rule, event) {\r\n\t\tconst dateOfYear = node.querySelector(`.dhx_form_repeat_custom_year [value=\"month_date\"]`);\r\n\t\tconst nthWeekDayOfYear = node.querySelector(`.dhx_form_repeat_custom_year [value=\"month_nth_weekday\"]`);\r\n\t\tdateOfYear.innerText = scheduler.templates.repeat_yearly_month_date(event.start_date, event);\r\n\t\tnthWeekDayOfYear.innerText = scheduler.templates.repeat_yearly_month_weekday(event.start_date, event);\r\n\r\n\t\tif (!rule || (rule.bysetpos && !(rule.byweekday && rule.byweekday.length))) {\r\n\t\t\tnode.querySelector(`[name=\"dhx_custom_year_option\"]`).value = \"month_date\";\r\n\t\t} else {\r\n\t\t\tnode.querySelector(`[name=\"dhx_custom_year_option\"]`).value = \"month_nth_weekday\";\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fillEndRule(node, rule, event) {\r\n\t\tconst countInput = node.querySelector(`.dhx_form_repeat_ends_extra [name=\"dhx_form_repeat_ends_after\"]`);\r\n\t\tconst ondateInput = node.querySelector(`.dhx_form_repeat_ends_extra [name=\"dhx_form_repeat_ends_ondate\"]`);\r\n\t\tconst endOptionSelect = node.querySelector(`[name='dhx_custom_repeat_ends']`);\r\n\t\tcountInput.value = 1;\r\n\r\n\t\tlet formatter = scheduler.date.date_to_str(\"%Y-%m-%d\");\r\n\t\tif (!scheduler.config.repeat_date_of_end) {\r\n\t\t\tscheduler.config.repeat_date_of_end = formatter(scheduler.date.add(scheduler._currentDate(), 30, \"day\"));\r\n\t\t}\r\n\t\tondateInput.value = scheduler.config.repeat_date_of_end;\r\n\r\n\t\tif (rule && rule.count) {\r\n\t\t\tendOptionSelect.value = \"AFTER\";\r\n\t\t\tcountInput.value = rule.count;\r\n\t\t} else if (event._end_date && event._end_date.getFullYear() !== 9999) {\r\n\t\t\tendOptionSelect.value = \"ON\";\r\n\t\t\tondateInput.value = formatter(event._end_date);\r\n\t\t} else {\r\n\t\t\tendOptionSelect.value = \"NEVER\";\r\n\t\t}\r\n\t\tendOptionSelect.dispatchEvent(new Event(\"change\"));\r\n\t}\r\n\r\n\tconst getRecValue = {\r\n\t\tMONTHLY: function (dates) {\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.MONTHLY,\r\n\t\t\t\tinterval: 1,\r\n\t\t\t\tbymonthday: dates.start.getDate()\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tWEEKLY: function (dates) {\r\n\t\t\tlet day = dates.start.getDay() - 1;\r\n\t\t\tif (day == -1) day = 6;\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.WEEKLY,\r\n\t\t\t\tinterval: 1,\r\n\t\t\t\tbyweekday: [day]\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tDAILY: function (dates) {\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.DAILY,\r\n\t\t\t\tinterval: 1\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tYEARLY: function (dates) {\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.YEARLY,\r\n\t\t\t\tbymonth: dates.start.getMonth() + 1,\r\n\t\t\t\tinterval: 1,\r\n\t\t\t\tbymonthday: dates.start.getDate()\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tWORKDAYS: function (dates) {\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.WEEKLY,\r\n\t\t\t\tinterval: 1,\r\n\t\t\t\tbyweekday: scheduler.config.recurring_workdays\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tCUSTOM: function (dates, node) {\r\n\t\t\tconst rrule = {};\r\n\t\t\tconst freq = node.querySelector(`[name=\"repeat_interval_unit\"]`).value;\r\n\t\t\tconst interval = Math.max(1, node.querySelector(`[name=\"repeat_interval_value\"]`).value);\r\n\t\t\tconst monthRepeat = node.querySelector(`[name=\"dhx_custom_month_option\"]`).value;\r\n\t\t\tconst yearRepeat = node.querySelector(`[name=\"dhx_custom_year_option\"]`).value;\r\n\r\n\t\t\trrule.interval = interval;\r\n\t\t\tlet days;\r\n\t\t\tlet day;\r\n\r\n\t\t\tswitch (freq) {\r\n\t\t\t\tcase \"DAILY\":\r\n\t\t\t\t\trrule.freq = RRule.DAILY;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"WEEKLY\": \r\n\t\t\t\t\trrule.freq = RRule.WEEKLY;\r\n\t\t\t\t\tdays = [];\r\n\t\t\t\t\tnode.querySelectorAll(`.dhx_form_repeat_custom_week [name=\"week_day\"]`).forEach((ch) => {\r\n\t\t\t\t\t\tif(ch.checked){\r\n\t\t\t\t\t\t\tdays.push(ch.value);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\trrule.byweekday = days.map((day) => {\r\n\t\t\t\t\t\tswitch (day) {\r\n\t\t\t\t\t\t\tcase \"MO\":\r\n\t\t\t\t\t\t\t\treturn RRule.MO.weekday;\r\n\t\t\t\t\t\t\tcase \"TU\":\r\n\t\t\t\t\t\t\t\treturn RRule.TU.weekday;\r\n\t\t\t\t\t\t\tcase \"WE\":\r\n\t\t\t\t\t\t\t\treturn RRule.WE.weekday;\r\n\t\t\t\t\t\t\tcase \"TH\":\r\n\t\t\t\t\t\t\t\treturn RRule.TH.weekday;\r\n\t\t\t\t\t\t\tcase \"FR\":\r\n\t\t\t\t\t\t\t\treturn RRule.FR.weekday;\r\n\t\t\t\t\t\t\tcase \"SA\":\r\n\t\t\t\t\t\t\t\treturn RRule.SA.weekday;\r\n\t\t\t\t\t\t\tcase \"SU\":\r\n\t\t\t\t\t\t\t\treturn RRule.SU.weekday;\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"MONTHLY\":\r\n\t\t\t\t\trrule.freq = RRule.MONTHLY;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (monthRepeat === \"month_date\") {\r\n\t\t\t\t\t\trrule.bymonthday = dates.start.getDate();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tday = dates.start.getDay() - 1;\r\n\t\t\t\t\t\tif (day == -1) day = 6;\r\n\t\t\t\t\t\trrule.byweekday = [day];\r\n\t\t\t\t\t\trrule.bysetpos = getWeekdayOfMonth(dates.start).dayNumber;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"YEARLY\":\r\n\t\t\t\t\trrule.freq = RRule.YEARLY;\r\n\t\t\t\t\trrule.bymonth = dates.start.getMonth() + 1;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (yearRepeat == \"month_date\") {\r\n\t\t\t\t\t\trrule.bymonthday = dates.start.getDate();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tday = dates.start.getDay() - 1;\r\n\t\t\t\t\t\tif (day == -1) day = 6;\r\n\t\t\t\t\t\trrule.byweekday = [day];\r\n\t\t\t\t\t\trrule.bysetpos = getWeekdayOfMonth(dates.start).dayNumber;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tconst formatFunc = scheduler.date.str_to_date(\"%Y-%m-%d\");\r\n\t\t\tlet until = new Date(9999, 1, 1);\r\n\t\t\tconst endRule = node.querySelector(`[name=\"dhx_custom_repeat_ends\"]`);\r\n\t\t\tif(endRule.value === \"ON\"){\r\n\t\t\t\tuntil = formatFunc(node.querySelector(`[name=\"dhx_form_repeat_ends_ondate\"]`).value);\r\n\t\t\t} else if(endRule.value === \"AFTER\") {\r\n\t\t\t\trrule.count = Math.max(1, node.querySelector(`[name=\"dhx_form_repeat_ends_after\"]`).value);\r\n\t\t\t}\r\n\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tNEVER: function () {\r\n\t\t}\r\n\t};\r\n\r\n\tfunction fillInDefaults(node, rule, event) {\r\n\t\tfillCustomDaily(node, rule, event);\r\n\t\tfillCustomWeekly(node, rule, event);\r\n\t\tfillCustomMonthly(node, rule, event);\r\n\t\tfillCustomYearly(node, rule, event);\r\n\t\tfillEndRule(node, rule, event);\r\n\t}\r\n\tscheduler.form_blocks[\"recurring\"] = {\r\n\t\trender: function (sns) {\r\n\t\t\tif (sns.form) {\r\n\t\t\t\tlet rec = scheduler.form_blocks[\"recurring\"];\r\n\t\t\t\tlet form = rec._get_node(sns.form);\r\n\t\t\t\tlet html = rec._outer_html(form);\r\n\t\t\t\tform.style.display = 'none';\r\n\t\t\t\treturn html;\r\n\t\t\t}\r\n\t\t\tlet loc = scheduler.locale.labels;\r\n\r\n\t\t\treturn `
\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t
\r\n\r\n\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t
\r\n\r\n\t\t\t
\r\n\t\t\t\t
${loc.repeat_ends}
\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\r\n\t\t
\r\n\t
`;\r\n\t\t},\r\n\r\n\t\r\n\t\t_init_set_value: function (node, value, event) {\r\n\t\t\tscheduler.form_blocks[\"recurring\"]._ds = { start: event.start_date, end: event.end_date };\r\n\t\t\tfunction hide(node) {\r\n\t\t\t\tnode.classList.add(\"dhx_hidden\");\r\n\t\t\t}\r\n\t\t\tfunction show(node) {\r\n\t\t\t\tnode.classList.remove(\"dhx_hidden\");\r\n\t\t\t}\r\n\t\t\tfunction onRepeatOptionChange(value) {\r\n\t\t\t\tconst repeat = node.querySelector(\".dhx_form_repeat_custom\");\r\n\t\t\t\tif (value === \"CUSTOM\") {\r\n\t\t\t\t\tshow(repeat);\r\n\t\t\t\t} else {\r\n\t\t\t\t\thide(repeat);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction onCustomRepeatIntervalChange(value) {\r\n\t\t\t\tconst nodes = {\r\n\t\t\t\t\tweekly: node.querySelector(\".dhx_form_repeat_custom_week\"),\r\n\t\t\t\t\tmonthly: node.querySelector(\".dhx_form_repeat_custom_month\"),\r\n\t\t\t\t\tyearly: node.querySelector(\".dhx_form_repeat_custom_year\")\r\n\t\t\t\t};\r\n\t\t\t\tswitch (value) {\r\n\t\t\t\t\tcase \"DAILY\":\r\n\t\t\t\t\t\thide(nodes.weekly);\r\n\t\t\t\t\t\thide(nodes.monthly);\r\n\t\t\t\t\t\thide(nodes.yearly);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"WEEKLY\":\r\n\t\t\t\t\t\tshow(nodes.weekly);\r\n\t\t\t\t\t\thide(nodes.monthly);\r\n\t\t\t\t\t\thide(nodes.yearly);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"MONTHLY\":\r\n\t\t\t\t\t\thide(nodes.weekly);\r\n\t\t\t\t\t\tshow(nodes.monthly);\r\n\t\t\t\t\t\thide(nodes.yearly);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"YEARLY\":\r\n\t\t\t\t\t\thide(nodes.weekly);\r\n\t\t\t\t\t\thide(nodes.monthly);\r\n\t\t\t\t\t\tshow(nodes.yearly);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction onCustomRepeatEndRule(value) {\r\n\t\t\t\tconst nodes = {\r\n\t\t\t\t\tafter: node.querySelector(\".dhx_form_repeat_ends_extra .dhx_form_repeat_ends_after\"),\r\n\t\t\t\t\ton: node.querySelector(\".dhx_form_repeat_ends_extra .dhx_form_repeat_ends_on\")\r\n\t\t\t\t};\r\n\t\t\t\tswitch (value) {\r\n\t\t\t\t\tcase \"NEVER\":\r\n\t\t\t\t\t\thide(nodes.after);\r\n\t\t\t\t\t\thide(nodes.on);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"AFTER\":\r\n\t\t\t\t\t\tshow(nodes.after);\r\n\t\t\t\t\t\thide(nodes.on);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"ON\":\r\n\t\t\t\t\t\thide(nodes.after);\r\n\t\t\t\t\t\tshow(nodes.on);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// repeat section change\r\n\t\t\tnode.querySelector(\".dhx_form_repeat_pattern select\").addEventListener(\"change\", function () {\r\n\t\t\t\tonRepeatOptionChange(this.value);\r\n\t\t\t});\r\n\r\n\t\t\t// custom repeat interval change\r\n\t\t\tnode.querySelector(\".dhx_form_repeat_custom_interval [name='repeat_interval_unit']\").addEventListener(\"change\", function () {\r\n\t\t\t\tonCustomRepeatIntervalChange(this.value);\r\n\t\t\t});\r\n\r\n\t\t\t// custom repeat end rule\r\n\t\t\tnode.querySelector(\".dhx_form_repeat_ends [name='dhx_custom_repeat_ends']\").addEventListener(\"change\", function () {\r\n\t\t\t\tonCustomRepeatEndRule(this.value);\r\n\t\t\t});\r\n\r\n\t\t\tscheduler._lightbox._rec_init_done = true;\r\n\t\t},\r\n\t\tbutton_click: function(){},\r\n\t\tset_value: function (node, value, ev) {\r\n\t\t\tlet rf = scheduler.form_blocks[\"recurring\"];\r\n\t\t\tif (!scheduler._lightbox._rec_init_done)\r\n\t\t\t\trf._init_set_value(node, value, ev);\r\n\t\t\tnode.open = !ev.rrule;\r\n\r\n\t\t\tnode.blocked = this._is_modified_occurence(ev);\r\n\r\n\t\t\tlet ds = rf._ds;\r\n\t\t\tds.start = ev.start_date;\r\n\t\t\tds.end = ev._end_date;\r\n\r\n\t\t\tif (ev.rrule) {\r\n\t\t\t\tconst rruleset = rrulestr(ev.rrule);\r\n\t\t\t\tfillInDefaults(node, rruleset.origOptions, ev);\r\n\t\t\t\tconst topOption = getTopLevelOption(rruleset, ev._end_date);\r\n\t\t\t\tnode.querySelector(\".dhx_form_repeat_pattern select\").value = topOption;\r\n\t\t\t\tif(topOption === \"CUSTOM\"){\r\n\t\t\t\t\tlet customFreq;\r\n\t\t\t\t\tswitch (rruleset.origOptions.freq) {\r\n\t\t\t\t\t\tcase RRule.DAILY:\r\n\t\t\t\t\t\t\tcustomFreq = \"DAILY\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase RRule.WEEKLY:\r\n\t\t\t\t\t\t\tcustomFreq = \"WEEKLY\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase RRule.MONTHLY:\r\n\t\t\t\t\t\t\tcustomFreq = \"MONTHLY\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase RRule.YEARLY:\r\n\t\t\t\t\t\t\tcustomFreq = \"YEARLY\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(customFreq){\r\n\t\t\t\t\t\tnode.querySelector(`[name=\"repeat_interval_unit\"]`).value = customFreq;\r\n\t\t\t\t\t\tnode.querySelector(`[name=\"repeat_interval_unit\"]`).dispatchEvent(new Event(\"change\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t//\trepeat_interval_unit\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tfillInDefaults(node, null, ev);\r\n\t\t\t\tnode.querySelector(\".dhx_form_repeat_pattern select\").value = \"NEVER\";\r\n\t\t\t}\r\n\t\t\tnode.querySelector(\".dhx_form_repeat_pattern select\").dispatchEvent(new Event(\"change\"));\r\n\r\n\t\t},\r\n\t\tget_value: function (node, ev) {\r\n\t\t\t\r\n\t\t\tif(!node.blocked && node.querySelector(\".dhx_form_repeat_pattern select\").value !== \"NEVER\") {\r\n\t\t\t\tlet ds = scheduler.form_blocks[\"recurring\"]._ds;\r\n\t\t\t\tlet actual_dates = {};\r\n\r\n\t\t\t\tlet timeControl = getTimeSection();\r\n\r\n\t\t\t\ttimeControl.getValue(actual_dates);\r\n\t\t\t\tds.start = actual_dates.start_date;\r\n\t\t\t\tconst pattern = node.querySelector(\".dhx_form_repeat_pattern select\").value;\r\n\t\t\t\tconst recurrence = getRecValue[pattern](ds, node);\r\n\t\t\t\tev.rrule = new RRule(recurrence.rrule).toString().replace(\"RRULE:\", \"\");\r\n\t\t\t\tds.end = recurrence.until;\r\n\r\n\t\t\t\tev.duration = Math.floor((actual_dates.end_date - actual_dates.start_date) / 1000);\r\n\r\n\t\t\t\tif (ds._start) {\r\n\t\t\t\t\tev.start_date = new Date(ds.start);\r\n\t\t\t\t\tev._start_date = new Date(ds.start);\r\n\t\t\t\t\tds._start = false;\r\n\t\t\t\t} else\r\n\t\t\t\t\tev._start_date = null;\r\n\r\n\t\t\t\tev._end_date = ds.end;\r\n\t\t\t}else{\r\n\t\t\t\tev.rrule = ev.rrule = \"\";\r\n\t\t\t\tev._end_date = ev.end_date;\r\n\t\t\t}\r\n\r\n\t\t\treturn ev.rrule;\r\n\t\t},\r\n\r\n\t\tfocus: function (node) {\r\n\t\t}\r\n\t};\r\n\r\n\tfunction getTimeSection() {\r\n\t\tlet timeControl = scheduler.formSection('time');\r\n\t\tif (!timeControl) {\r\n\t\t\ttimeControl = getFirstSectionOfType('time');\r\n\t\t}\r\n\t\tif (!timeControl) {\r\n\t\t\ttimeControl = getFirstSectionOfType('calendar_time');\r\n\t\t}\r\n\r\n\r\n\t\tif (!timeControl) {\r\n\t\t\tthrow new Error([\"Can't calculate the recurring rule, the Recurring form block can't find the Time control. Make sure you have the time control in 'scheduler.config.lightbox.sections' config.\",\r\n\t\t\t\t\"You can use either the default time control https://docs.dhtmlx.com/scheduler/time.html, or the datepicker https://docs.dhtmlx.com/scheduler/minicalendar.html, or a custom control. \",\r\n\t\t\t\t\"In the latter case, make sure the control is named \\\"time\\\":\",\r\n\t\t\t\t\"\",\r\n\t\t\t\t\"scheduler.config.lightbox.sections = [\",\r\n\t\t\t\t\"{name:\\\"time\\\", height:72, type:\\\"YOU CONTROL\\\", map_to:\\\"auto\\\" }];\"]\r\n\t\t\t\t.join(\"\\n\"));\r\n\t\t}\r\n\r\n\t\treturn timeControl;\r\n\t}\r\n\r\n\tfunction getFirstSectionOfType(type) {\r\n\t\tfor (let i = 0; i < scheduler.config.lightbox.sections.length; i++) {\r\n\t\t\tlet section = scheduler.config.lightbox.sections[i];\r\n\t\t\tif (section.type === type) {\r\n\t\t\t\treturn scheduler.formSection(section.name);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.occurrence_timestamp_in_utc = false;\r\nscheduler.config.recurring_workdays = [1,2,3,4,5];\r\nscheduler.form_blocks[\"recurring\"] = {\r\n\t_get_node : function(node){\r\n\t\tif (typeof node == \"string\"){\r\n\t\t\tlet element = scheduler._lightbox.querySelector(`#${node}`);\r\n\t\t\tif(!element){\r\n\t\t\t\t// form is detached from lightbox \r\n\t\t\t\t// search globally, won't work in LWC\r\n\t\t\t\telement = document.getElementById(node);\r\n\t\t\t}\r\n\t\t\tnode = element;\r\n\t\t}\r\n\t\tif (node.style.display == 'none')\r\n\t\t\tnode.style.display = \"\";\r\n\t\treturn node;\r\n\t},\r\n\t_outer_html: function(node){\r\n\t\treturn node.outerHTML || getOuterHTML(node);\r\n\r\n\t\t//probably not needed, FF v10- only\r\n\t\tfunction getOuterHTML(n){\r\n\t\t\tvar div = document.createElement('div'), h;\r\n\t\t\tdiv.appendChild( n.cloneNode(true) );\r\n\t\t\th = div.innerHTML;\r\n\t\t\tdiv = null;\r\n\t\t\treturn h;\r\n\t\t}\r\n\t},\r\n\trender:function(sns) {\r\n\t\tif(sns.form){\r\n\t\t\tvar rec = scheduler.form_blocks[\"recurring\"];\r\n\t\t\tvar form = rec._get_node(sns.form);\r\n\t\t\tvar html = rec._outer_html(form);\r\n\t\t\tform.style.display = 'none';\r\n\t\t\treturn html;\r\n\t\t}\r\n\t\tvar loc = scheduler.locale.labels;\r\n\t\treturn '
'+\r\n\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t''+loc.repeat_text_week_count+'
'+\r\n\t\t\t\t\t\t\t\t' '+\r\n\t\t\t\t\t\t\t\t\t' '+\r\n\t\t\t\t\t\t\t\t\t\t' '+\r\n\t\t\t\t\t\t\t\t\t\t' '+\r\n\t\t\t\t\t\t\t\t\t\t' '+\r\n\t\t\t\t\t\t\t\t\t\t' '+\r\n\t\t\t\t\t\t\t\t\t' '+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t\t''+\r\n\t\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t\t''+\r\n\t\t\t\t\t\t\t\t\t''+\r\n\t\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t''+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t''+\r\n\t\t\t\t\t\t\t\t''+\r\n\t\t\t\t\t\t\t\tloc.select_year_day2+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t''+loc.repeat_text_occurences_count+'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t'
'+\r\n\t\t\t\t'
'+\r\n\t\t\t\t'';\r\n\t},\r\n\t_ds: {},\r\n\t_get_form_node: function(els, name, value){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return null;\r\n\t\tif(col.nodeName) return col;\r\n\r\n\t\tif(col.length){\r\n\t\t\tfor(var i=0; i < col.length; i++){\r\n\t\t\t\tif(col[i].value == value)\r\n\t\t\t\t\treturn col[i];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\t_get_node_value: function(els, name, multiselect){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return \"\";\r\n\t\tif(col.length){\r\n\t\t\tif(multiselect){\r\n\t\t\t\tvar res = [];\r\n\t\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\t\tif (col[i].checked) res.push(col[i].value);\r\n\r\n\t\t\t\treturn res;\r\n\t\t\t}else{\r\n\t\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\t\tif (col[i].checked) return col[i].value;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(col.value)\r\n\t\t\treturn !multiselect ? col.value : [col.value];\r\n\t},\r\n\r\n\t_get_node_numeric_value: function(els, name){\r\n\t\tvar value = scheduler.form_blocks[\"recurring\"]._get_node_value(els, name);\r\n\t\treturn ((value * 1) || 0);\r\n\t},\r\n\r\n\t_set_node_value: function(els, name, value){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return;\r\n\r\n\t\tif(col.name == name){\r\n\t\t\tcol.value = value;\r\n\t\t}else if(col.length){\r\n\t\t\tvar hash_value = typeof value == \"object\";\r\n\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\tif (hash_value || col[i].value == value){\r\n\t\t\t\t\tcol[i].checked = hash_value ? !!value[col[i].value] : !!value;\r\n\t\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_init_set_value:function(node, value, ev) {\r\n\t\tvar block = scheduler.form_blocks[\"recurring\"];\r\n\t\tvar get_value = block._get_node_value;\r\n\t\tvar set_value = block._set_node_value;\r\n\t\tscheduler.form_blocks[\"recurring\"]._ds = {start:ev.start_date, end:ev._end_date};\r\n\r\n\t\tvar str_date_format = scheduler.date.str_to_date(scheduler.config.repeat_date, false, true);\r\n\t\tvar str_date = function(str_date) {\r\n\t\t\tvar date = str_date_format(str_date);\r\n\t\t\tif (scheduler.config.include_end_by)\r\n\t\t\t\tdate = scheduler.date.add(date, 1, 'day');\r\n\t\t\treturn date;\r\n\t\t};\r\n\r\n\t\tvar date_str = scheduler.date.date_to_str(scheduler.config.repeat_date);\r\n\r\n\t\tvar top = node.getElementsByTagName(\"FORM\")[0];\r\n\t\tvar els = {};\r\n\r\n\t\tfunction register_els(inps) {\r\n\t\t\tfor (var i = 0; i < inps.length; i++) {\r\n\t\t\t\tvar inp = inps[i];\r\n\r\n\t\t\t\tif(inp.name){\r\n\t\t\t\t\tif(!els[inp.name]){\r\n\t\t\t\t\t\tels[inp.name] = inp;\r\n\t\t\t\t\t}else if(els[inp.name].nodeType){\r\n\t\t\t\t\t\tvar node = els[inp.name];\r\n\t\t\t\t\t\tels[inp.name] = [node, inp];\r\n\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tels[inp.name].push(inp);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tregister_els(top.getElementsByTagName(\"INPUT\"));\r\n\t\tregister_els(top.getElementsByTagName(\"SELECT\"));\r\n\r\n\t\tif (!scheduler.config.repeat_date_of_end) {\r\n\t\t\tvar formatter = scheduler.date.date_to_str(scheduler.config.repeat_date);\r\n\t\t\tscheduler.config.repeat_date_of_end = formatter(scheduler.date.add(scheduler._currentDate(), 30, \"day\"));\r\n\t\t}\r\n\t\tset_value(els, \"date_of_end\", scheduler.config.repeat_date_of_end);\r\n\r\n\t\tvar $ = function(a) {\r\n\t\t\treturn scheduler._lightbox.querySelector(`#${a}`) || { style:{} };//return fake object if node not found\r\n\t\t};\r\n\r\n\t\tfunction change_current_view() {\r\n\t\t\t$(\"dhx_repeat_day\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_week\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_month\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_year\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_\" + this.value).style.display = \"\";\r\n\t\t\tscheduler.setLightboxSize();\r\n\t\t}\r\n\r\n\t\tfunction get_repeat_code(dates) {\r\n\t\t\tvar code = [get_value(els, \"repeat\")];\r\n\t\t\tget_rcode[code[0]](code, dates);\r\n\r\n\t\t\twhile (code.length < 5) code.push(\"\");\r\n\t\t\tvar repeat = \"\";\r\n\r\n\t\t\tvar end = get_end_rule(els);\r\n\r\n\t\t\tif (end == \"no\") {\r\n\t\t\t\tdates.end = new Date(9999, 1, 1);\r\n\t\t\t\trepeat = \"no\";\r\n\t\t\t}\r\n\t\t\telse if (end == \"date_of_end\") {\r\n\t\t\t\tdates.end = str_date(get_value(els, \"date_of_end\"));\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tscheduler.transpose_type(code.join(\"_\"));\r\n\t\t\t\trepeat = Math.max(1, get_value(els, \"occurences_count\"));\r\n\r\n\t\t\t\tvar transp = 0;\r\n\r\n\t\t\t\t//var transp = ((code[0] == \"week\" && code[4] && code[4].toString().indexOf(scheduler.config.start_on_monday ? 1 : 0) == -1) ? 1 : 0);\r\n\r\n\t\t\t\t// which is equal to following code, seems to produce extra instance, not clear why needed\r\n\r\n\t\t\t\t/*if(code[0] == \"week\"){\r\n\t\t\t\t\tvar days = code[4] || \"\";\r\n\t\t\t\t\tif(scheduler.config.start_on_monday){\r\n\t\t\t\t\t\tif(days.indexOf(1) == -1)\r\n\t\t\t\t\t\ttransp = 1;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(days.indexOf(0) == -1)\r\n\t\t\t\t\t\ttransp = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}*/\r\n\r\n\t\t\t//\tdates.end = scheduler.date.add(new Date(dates.start), repeat + transp, code.join(\"_\"));\r\n\r\n\t\t\t\tdates.end = scheduler.date[\"add_\" + code.join(\"_\")](new Date(dates.start), repeat + transp, {start_date: dates.start}) || dates.start;\r\n\t\t\t}\r\n\r\n\t\t\treturn code.join(\"_\") + \"#\" + repeat;\r\n\t\t}\r\n\t\tfunction get_end_rule(els){\r\n\t\t\tvar end = els[\"end\"];\r\n\t\t\tif(end.length){\r\n\t\t\t\tfor(var i =0; i < end.length; i++){\r\n\t\t\t\t\tif(end[i].checked){\r\n\t\t\t\t\t\tif(end[i].value && end[i].value != \"on\"){//seems to be default value:var input = document.createElement(\"input\"); input.type = \"radio\"; input.value\r\n\t\t\t\t\t\t\treturn end[i].value;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif(!i){\r\n\t\t\t\t\t\t\t\treturn \"no\";\r\n\t\t\t\t\t\t\t}else if(i == 2){\r\n\t\t\t\t\t\t\t\treturn \"date_of_end\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\treturn \"occurences_count\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(end.value)\r\n\t\t\t\t\treturn end.value;\r\n\t\t\t}\r\n\t\t\treturn \"no\";\r\n\t\t}\r\n\t\tfunction set_end_rule(els, value){\r\n\t\t\tvar end = els[\"end\"];\r\n\r\n\t\t\tif(end.length){\r\n\t\t\t\tvar has_values = !!end[0].value && end[0].value != \"on\";\r\n\t\t\t\tif(has_values){\r\n\t\t\t\t\tfor(var i =0; i < end.length; i++){\r\n\t\t\t\t\t\tif(end[i].value == value)\r\n\t\t\t\t\t\t\tend[i].checked = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar ind = 0;\r\n\t\t\t\t\tswitch(value){\r\n\t\t\t\t\t\tcase \"no\":\r\n\t\t\t\t\t\t\tind = 0;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"date_of_end\":\r\n\t\t\t\t\t\t\tind = 2;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tind = 1;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend[ind].checked = true;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tend.value = value;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tscheduler.form_blocks[\"recurring\"]._get_repeat_code = get_repeat_code;\r\n\t\tvar get_rcode = {\r\n\t\t\tmonth:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tif (get_value(els, \"month_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_count\")));\r\n\t\t\t\t\tdates.start.setDate(get_value(els, \"month_day\"));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_count2\")));\r\n\t\t\t\t\tcode.push( get_value(els, \"month_day2\"));\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_week2\")));\r\n\t\t\t\t\tif (!scheduler.config.repeat_precise){\r\n\t\t\t\t\t\tdates.start.setDate(1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tdates._start = true;\r\n\t\t\t},\r\n\t\t\tweek:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"week_count\")));\r\n\t\t\t\tcode.push(\"\");\r\n\t\t\t\tcode.push(\"\");\r\n\t\t\t\tvar t = [];\r\n\r\n\t\t\t\tvar col = get_value(els, \"week_day\", true);\r\n\t\t\t\t//var col = els[\"week_day\"];\r\n\t\t\t\tvar day = dates.start.getDay();\r\n\t\t\t\tvar start_exists = false;\r\n\r\n\t\t\t\tfor (var i = 0; i < col.length; i++){\r\n\t\t\t\t\tt.push(col[i]);\r\n\t\t\t\t\tstart_exists = start_exists || col[i] == day;\r\n\t\t\t\t}\r\n\t\t\t\tif (!t.length){\r\n\t\t\t\t\tt.push(day);\r\n\t\t\t\t\tstart_exists = true;\r\n\t\t\t\t}\r\n\t\t\t\tt.sort();\r\n\r\n\r\n\t\t\t\tif (!scheduler.config.repeat_precise){\r\n\t\t\t\t\tdates.start = scheduler.date.week_start(dates.start);\r\n\t\t\t\t\tdates._start = true;\r\n\t\t\t\t} else if (!start_exists){\r\n\t\t\t\t\tscheduler.transpose_day_week(dates.start, t, 1, 7);\r\n\t\t\t\t\tdates._start = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcode.push(t.join(\",\"));\r\n\t\t\t},\r\n\t\t\tday:function(code) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tif (get_value(els, \"day_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"day_count\")));\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcode.push(\"week\");\r\n\t\t\t\t\tcode.push(1);\r\n\t\t\t\t\tcode.push(\"\");\r\n\t\t\t\t\tcode.push(\"\");\r\n\t\t\t\t\tcode.push(scheduler.config.recurring_workdays.join(\",\"));\r\n\t\t\t\t\tcode.splice(0, 1);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tyear:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\r\n\t\t\t\tif (get_value(els, \"year_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(\"1\");\r\n\t\t\t\t\tdates.start.setMonth(0);\r\n\t\t\t\t\tdates.start.setDate(get_value(els, \"year_day\"));\r\n\t\t\t\t\tdates.start.setMonth(get_value(els, \"year_month\"));\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcode.push(\"1\");\r\n\t\t\t\t\tcode.push(get_value(els, \"year_day2\"));\r\n\t\t\t\t\tcode.push(get_value(els, \"year_week2\"));\r\n\t\t\t\t\tdates.start.setDate(1);\r\n\t\t\t\t\tdates.start.setMonth(get_value(els, \"year_month2\"));\r\n\t\t\t\t}\r\n\t\t\t\tdates._start = true;\r\n\t\t\t}\r\n\t\t};\r\n\t\tvar set_rcode = {\r\n\t\t\tweek:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\t\tset_value(els, \"week_count\", code[1]);\r\n\r\n\t\t\t\tvar t = code[4].split(\",\");\r\n\t\t\t\tvar d = {};\r\n\t\t\t\tfor (var i = 0; i < t.length; i++) d[t[i]] = true;\r\n\r\n\t\t\t\tset_value(els, \"week_day\", d);\r\n\r\n\t\t\t\t//for (var i = 0; i < col.length; i++)\r\n\t\t\t\t//\tcol[i].checked = (!!d[col[i].value]);\r\n\t\t\t},\r\n\t\t\tmonth:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\r\n\t\t\t\tif (code[2] === \"\") {\r\n\t\t\t\t\tset_value(els, \"month_type\", \"d\");\r\n\t\t\t\t\tset_value(els, \"month_count\", code[1]);\r\n\t\t\t\t\tset_value(els, \"month_day\", dates.start.getDate());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tset_value(els, \"month_type\", \"w\");\r\n\t\t\t\t\tset_value(els, \"month_count2\", code[1]);\r\n\t\t\t\t\tset_value(els, \"month_week2\", code[3]);\r\n\t\t\t\t\tset_value(els, \"month_day2\", code[2]);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tday:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\t\tset_value(els, \"day_type\", \"d\");\r\n\t\t\t\tset_value(els, \"day_count\", code[1]);\r\n\t\t\t},\r\n\t\t\tyear:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\r\n\t\t\t\tif (code[2] === \"\") {\r\n\t\t\t\t\tset_value(els, \"year_type\", \"d\");\r\n\t\t\t\t\tset_value(els, \"year_day\", dates.start.getDate());\r\n\t\t\t\t\tset_value(els, \"year_month\", dates.start.getMonth());\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tset_value(els, \"year_type\", \"w\");\r\n\t\t\t\t\tset_value(els, \"year_week2\", code[3]);\r\n\t\t\t\t\tset_value(els, \"year_day2\", code[2]);\r\n\t\t\t\t\tset_value(els, \"year_month2\", dates.start.getMonth());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfunction set_repeat_code(code, dates) {\r\n\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\tvar data = code.split(\"#\");\r\n\t\t\tcode = data[0].split(\"_\");\r\n\t\t\tset_rcode[code[0]](code, dates);\r\n\r\n\t\t\tswitch (data[1]) {\r\n\t\t\t\tcase \"no\":\r\n\t\t\t\t\tset_end_rule(els, \"no\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"\":\r\n\t\t\t\t\tset_end_rule(els, \"date_of_end\");\r\n\r\n\t\t\t\t\tvar end_date = dates.end;\r\n\t\t\t\t\tif (scheduler.config.include_end_by){\r\n\t\t\t\t\t\tend_date = scheduler.date.add(end_date, -1, 'day');\r\n\t\t\t\t\t}\r\n\t\t\t\t\tset_value(els, \"date_of_end\", date_str(end_date));\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tset_end_rule(els, \"occurences_count\");\r\n\t\t\t\t\tset_value(els, \"occurences_count\", data[1]);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tset_value(els, \"repeat\", code[0]);\r\n\t\t\t//e.checked = true;\r\n\r\n\t\t\tvar node = scheduler.form_blocks[\"recurring\"]._get_form_node(els, \"repeat\", code[0]);\r\n\t\t\tif(node.nodeName == \"SELECT\"/* && node.onchange*/){\r\n\t\t\t//\tnode.onchange();\r\n\t\t\t\tnode.dispatchEvent(new Event('change'));\r\n\t\t\t\tnode.dispatchEvent(new MouseEvent('click'));\r\n\t\t\t}else{\r\n\t\t\t\tnode.dispatchEvent(new MouseEvent('click'));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tscheduler.form_blocks[\"recurring\"]._set_repeat_code = set_repeat_code;\r\n\r\n\t\tfor (var i = 0; i < top.elements.length; i++) {\r\n\t\t\tvar el = top.elements[i];\r\n\t\t\tswitch (el.name) {\r\n\t\t\t\tcase \"repeat\":\r\n\t\t\t\t\tif (el.nodeName == \"SELECT\" && !el.$_eventAttached) {\r\n\t\t\t\t\t\tel.$_eventAttached = true;\r\n\t\t\t\t\t\tel.addEventListener(\"change\", change_current_view);\r\n\t\t\t\t\t} else if(!el.$_eventAttached){\r\n\t\t\t\t\t\tel.$_eventAttached = true;\r\n\t\t\t\t\t\tel.addEventListener(\"click\", change_current_view);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._lightbox._rec_init_done = true;\r\n\t},\r\n\tset_value:function(node, value, ev) {\r\n\t\tvar rf = scheduler.form_blocks[\"recurring\"];\r\n\t\tif (!scheduler._lightbox._rec_init_done)\r\n\t\t\trf._init_set_value(node, value, ev);\r\n\t\tnode.open = !ev.rec_type;\r\n\r\n\t\tnode.blocked = this._is_modified_occurence(ev);\r\n\r\n\t\tvar ds = rf._ds;\r\n\t\tds.start = ev.start_date;\r\n\t\tds.end = ev._end_date;\r\n\r\n\t\trf._toggle_block();\r\n\r\n\t\tif (value)\r\n\t\t\trf._set_repeat_code(value, ds);\r\n\t},\r\n\tget_value:function(node, ev) {\r\n\t\tif (node.open) {\r\n\t\t\tvar ds = scheduler.form_blocks[\"recurring\"]._ds;\r\n\t\t\tvar actual_dates = {};\r\n\r\n\t\t\tvar timeControl = getTimeSection();\r\n\r\n\t\t\ttimeControl.getValue(actual_dates);\r\n\t\t\tds.start = actual_dates.start_date;\r\n\t\t\tev.rec_type = scheduler.form_blocks[\"recurring\"]._get_repeat_code(ds);\r\n\t\t\tif (ds._start) {\r\n\t\t\t\tev.start_date = new Date(ds.start);\r\n\t\t\t\tev._start_date = new Date(ds.start);\r\n\t\t\t\tds._start = false;\r\n\t\t\t} else\r\n\t\t\t\tev._start_date = null;\r\n\r\n\t\t\tev._end_date = ds.end;\r\n\t\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\t\t} else {\r\n\t\t\tev.rec_type = ev.rec_pattern = \"\";\r\n\t\t\tev._end_date = ev.end_date;\r\n\t\t}\r\n\t\treturn ev.rec_type;\r\n\t},\r\n\t_get_button: function(){\r\n\t\tvar node = getRecurringSection().header;\r\n\t\treturn node.firstChild.firstChild;\r\n\t},\r\n\t_get_form: function(){\r\n\t\treturn getRecurringSection().node;\r\n\t},\r\n\topen:function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form();\r\n\t\tif(!cont.open)\r\n\t\t\tblock._toggle_block();\r\n\t},\r\n\tclose: function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form();\r\n\r\n\t\tif(cont.open)\r\n\t\t\tblock._toggle_block();\r\n\t},\r\n\t_toggle_block: function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form(),\r\n\t\t\tel = block._get_button();\r\n\t\tif (!cont.open && !cont.blocked) {\r\n\t\t\tcont.style.height = \"auto\";//reset to default value\r\n\t\t\tif(el){\r\n\t\t\t\tel.style.backgroundPosition = \"-5px 0px\";\r\n\t\t\t\tel.nextSibling.innerHTML = scheduler.locale.labels.button_recurring_open;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tcont.style.height = \"0px\";\r\n\t\t\tif(el){\r\n\t\t\t\tel.style.backgroundPosition = \"-5px 20px\";\r\n\t\t\t\tel.nextSibling.innerHTML = scheduler.locale.labels.button_recurring;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcont.open = !cont.open;\r\n\r\n\t\tscheduler.setLightboxSize();\r\n\t},\r\n\tfocus:function(node) {\r\n\t},\r\n\tbutton_click:function(node, button, event) {\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\t\tvar cont = block._get_form();\r\n\t\tif (!cont.blocked)\r\n\t\t\tscheduler.form_blocks.recurring._toggle_block();\r\n\t}\r\n};\r\n\r\nfunction getTimeSection(){\r\n\tvar timeControl = scheduler.formSection('time');\r\n\tif(!timeControl){\r\n\t\ttimeControl = getFirstSectionOfType('time');\r\n\t}\r\n\tif(!timeControl){\r\n\t\ttimeControl = getFirstSectionOfType('calendar_time');\r\n\t}\r\n\r\n\t\r\n\tif (!timeControl) {\r\n\t\tthrow new Error([\"Can't calculate the recurring rule, the Recurring form block can't find the Time control. Make sure you have the time control in 'scheduler.config.lightbox.sections' config.\",\r\n\"You can use either the default time control https://docs.dhtmlx.com/scheduler/time.html, or the datepicker https://docs.dhtmlx.com/scheduler/minicalendar.html, or a custom control. \",\r\n\"In the latter case, make sure the control is named \\\"time\\\":\",\r\n\"\",\r\n\"scheduler.config.lightbox.sections = [\",\r\n\"{name:\\\"time\\\", height:72, type:\\\"YOU CONTROL\\\", map_to:\\\"auto\\\" }];\"]\r\n.join(\"\\n\"));\r\n\t}\r\n\r\n\treturn timeControl;\r\n}\r\n\r\nfunction getRecurringSection(){\r\n\tvar recurringSection = scheduler.formSection('recurring');\r\n\tif(!recurringSection){\r\n\t\trecurringSection = getFirstSectionOfType('recurring');\r\n\t}\r\n\r\n\tif (!recurringSection) {\r\n\t\tthrow new Error([\"Can't locate the Recurring form section.\",\r\n\t\t\"Make sure that you have the recurring control on the lightbox configuration https://docs.dhtmlx.com/scheduler/recurring_events.html#recurringlightbox \",\r\n\t\t\"and that the recurring control has name \\\"recurring\\\":\",\r\n\"\",\r\n\"scheduler.config.lightbox.sections = [\",\r\n\"\t{name:\\\"recurring\\\", ... }\",\r\n\"];\"].join(\"\\n\"));\r\n\r\n\t}\r\n\r\n\treturn recurringSection;\r\n}\r\n\r\nfunction getFirstSectionOfType(type){\r\n\tfor(var i = 0; i < scheduler.config.lightbox.sections.length; i++){\r\n\t\tvar section = scheduler.config.lightbox.sections[i];\r\n\t\tif(section.type === type){\r\n\t\t\treturn scheduler.formSection(section.name);\r\n\t\t}\r\n\t}\r\n\treturn null;\r\n}\r\n\r\n//problem may occur if we will have two repeating events in the same moment of time\r\nscheduler._rec_markers = {};\r\nscheduler._rec_markers_pull = {};\r\nscheduler._add_rec_marker = function(ev, time) {\r\n\tev._pid_time = time;\r\n\tthis._rec_markers[ev.id] = ev;\r\n\tif (!this._rec_markers_pull[ev.event_pid]) this._rec_markers_pull[ev.event_pid] = {};\r\n\tthis._rec_markers_pull[ev.event_pid][time] = ev;\r\n};\r\nscheduler._get_rec_marker = function(time, id) {\r\n\tvar ch = this._rec_markers_pull[id];\r\n\tif (ch) return ch[time];\r\n\treturn null;\r\n};\r\nscheduler._get_rec_markers = function(id) {\r\n\treturn (this._rec_markers_pull[id] || []);\r\n};\r\n\r\nfunction clearMilliseconds(date){\r\n//\treturn date;\r\n\treturn new Date(\r\n\t\tdate.getFullYear(), \r\n\t\tdate.getMonth(), \r\n\t\tdate.getDate(), \r\n\t\tdate.getHours(), \r\n\t\tdate.getMinutes(),\r\n\t\tdate.getSeconds(),\r\n\t\t0\r\n\t);\r\n}\r\n\r\nscheduler._rec_temp = [];\r\n(function() {\r\n\tvar old_add_event = scheduler.addEvent;\r\n\tscheduler.addEvent = function(start_date, end_date, text, id, extra_data) {\r\n\t\tvar ev_id = old_add_event.apply(this, arguments);\r\n\r\n\t\tif (ev_id && scheduler.getEvent(ev_id)) {\r\n\t\t\tvar ev = scheduler.getEvent(ev_id);\r\n\t\t\t\r\n\t\t\tif(ev.start_date){\r\n\t\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t\t}\r\n\t\t\tif(ev.end_date){\r\n\t\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t\t}\r\n\t\t\tif (this._is_modified_occurence(ev))\r\n\t\t\t\tscheduler._add_rec_marker(ev, ev.event_length * 1000);\r\n\t\t\tif (ev.rec_type)\r\n\t\t\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\t\t}\r\n\t\treturn ev_id;\r\n\t};\r\n})();\r\n\r\nscheduler.attachEvent(\"onEventIdChange\", function(id, new_id) {\r\n\tif (this._ignore_call) return;\r\n\tthis._ignore_call = true;\r\n\r\n\tif(scheduler._rec_markers[id]){\r\n\t\t//important for for correct work of scheduler.getEvents(from, to) and collision detection\r\n\t\tscheduler._rec_markers[new_id] = scheduler._rec_markers[id];\r\n\t\tdelete scheduler._rec_markers[id];\r\n\t}\r\n\r\n\tif(scheduler._rec_markers_pull[id]){\r\n\t\tscheduler._rec_markers_pull[new_id] = scheduler._rec_markers_pull[id];\r\n\t\tdelete scheduler._rec_markers_pull[id];\r\n\t}\r\n\r\n\tfor (var i = 0; i < this._rec_temp.length; i++) {\r\n\t\tvar tev = this._rec_temp[i];\r\n\t\tif (tev.event_pid == id) {\r\n\t\t\ttev.event_pid = new_id;\r\n\t\t\tthis.changeEventId(tev.id, new_id + \"#\" + tev.id.split(\"#\")[1]);\r\n\t\t}\r\n\t}\r\n\r\n\tfor(var i in this._rec_markers){\r\n\t\tvar tev = this._rec_markers[i];\r\n\t\tif(tev.event_pid == id){\r\n\t\t\ttev.event_pid = new_id;\r\n\t\t\ttev._pid_changed = true;\r\n\t\t}\r\n\t}\r\n\r\n\tvar el = scheduler._rec_markers[new_id];\r\n\tif(el && el._pid_changed) {\r\n\t\tdelete el._pid_changed;\r\n\t\tsetTimeout(function() {\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler.callEvent(\"onEventChanged\", [new_id, scheduler.getEvent(new_id)]);\r\n\t\t}, 1);\r\n\t}\r\n\r\n\tdelete this._ignore_call;\r\n});\r\nscheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (this._is_virtual_event(id) || (this._is_modified_occurence(ev) && ev.rec_type && ev.rec_type != 'none')) {\r\n\t\tid = id.split(\"#\");\r\n\t\tvar nid = this.uid();\r\n\t\tvar tid = (id[1]) ? id[1] : Math.round(ev._pid_time / 1000);\r\n\r\n\t\tvar nev = this._copy_event(ev);\r\n\t\tnev.id = nid;\r\n\t\tnev.event_pid = ev.event_pid || id[0];\r\n\t\tvar timestamp = tid;\r\n\t\tnev.event_length = timestamp;\r\n\t\tnev.rec_type = nev.rec_pattern = \"none\";\r\n\t\tthis.addEvent(nev);\r\n\r\n\t\tthis._add_rec_marker(nev, timestamp * 1000);\r\n\t} else {\r\n\t\tif (ev.rec_type && this._lightbox_id)\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\tvar sub = this._get_rec_markers(id);\r\n\t\tfor (var i in sub) {\r\n\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\tid = sub[i].id;\r\n\t\t\t\tif (this.getEvent(id))\r\n\t\t\t\t\tthis.deleteEvent(id, true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventDeleted\", function(id, ev){\r\n\tif(!this._is_virtual_event(id) && this._is_modified_occurence(ev)){\r\n\t\tif(!scheduler._events[id]){\r\n\t\t\tev.rec_type = ev.rec_pattern = \"none\";\r\n\t\t\tthis.setEvent(id, ev);\r\n\t\t}\r\n\t}\r\n});\r\nscheduler.attachEvent(\"onEventChanged\", function(id, event) {\r\n\tif (this._loading) return true;\r\n\r\n\tvar ev = this.getEvent(id);\r\n\r\n\tif (this._is_virtual_event(id)) {\r\n\t\tvar id = id.split(\"#\");\r\n\t\tvar nid = this.uid();\r\n\t\tthis._not_render = true;\r\n\r\n\t\tvar nev = this._copy_event(event);\r\n\t\tnev.id = nid;\r\n\t\tnev.event_pid = id[0];\r\n\t\tvar timestamp = id[1];\r\n\t\tnev.event_length = timestamp;\r\n\t\tnev.rec_type = nev.rec_pattern = \"\";\r\n\r\n\t\tthis._add_rec_marker(nev, timestamp * 1000);\r\n\t\tthis.addEvent(nev);\r\n\r\n\t\tthis._not_render = false;\r\n\r\n\t} else {\r\n\t\tif(ev.start_date){\r\n\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t}\r\n\t\tif(ev.end_date){\r\n\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t}\r\n\r\n\t\tif (ev.rec_type && this._lightbox_id){\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t}\r\n\t\tvar sub = this._get_rec_markers(id);\r\n\t\tfor (var i in sub) {\r\n\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\tdelete this._rec_markers[sub[i].id];\r\n\t\t\t\tthis.deleteEvent(sub[i].id, true);\r\n\t\t\t}\r\n\t\t}\r\n\t\tdelete this._rec_markers_pull[id];\r\n\r\n\t\t// it's possible that after editing event is no longer exists, in such case we need to remove _select_id flag\r\n\t\tvar isEventFound = false;\r\n\t\tfor (var k = 0; k < this._rendered.length; k++) {\r\n\t\t\tif (this._rendered[k].getAttribute(this.config.event_attribute) == id)\r\n\t\t\t\tisEventFound = true;\r\n\t\t}\r\n\t\tif (!isEventFound)\r\n\t\t\tthis._select_id = null;\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventAdded\", function(id) {\r\n\tif (!this._loading) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (ev.rec_type && !ev.event_length){\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventSave\", function(id, data, is_new_event) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (!ev.rec_type && data.rec_type && !this._is_virtual_event(id))\r\n\t\tthis._select_id = null;\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventCreated\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (!ev.rec_type)\r\n\t\tev.rec_type = ev.rec_pattern = ev.event_length = ev.event_pid = \"\";\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventCancel\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (ev.rec_type) {\r\n\t\tthis._roll_back_dates(ev);\r\n\t\t// a bit expensive, but we need to be sure that event re-rendered, because view can be corrupted by resize , during edit process\r\n\t\tthis.render_view_data();\r\n\t}\r\n});\r\nscheduler._roll_back_dates = function(ev) {\r\n\tif(ev.start_date){\r\n\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t}\r\n\tif(ev.end_date){\r\n\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t}\r\n\tev.event_length = Math.round((ev.end_date.valueOf() - ev.start_date.valueOf()) / 1000);\r\n\tev.end_date = ev._end_date;\r\n\tif (ev._start_date) {\r\n\t\tev.start_date.setMonth(0);\r\n\t\tev.start_date.setDate(ev._start_date.getDate());\r\n\t\tev.start_date.setMonth(ev._start_date.getMonth());\r\n\t\tev.start_date.setFullYear(ev._start_date.getFullYear());\r\n\r\n\t}\r\n};\r\n\r\nscheduler._is_virtual_event = function(id){\r\n\treturn id.toString().indexOf(\"#\") != -1;\r\n};\r\nscheduler._is_modified_occurence = function(ev){\r\n\treturn (ev.event_pid && ev.event_pid != \"0\");\r\n};\r\n\r\nscheduler.showLightbox_rec = scheduler.showLightbox;\r\nscheduler.showLightbox = function(id) {\r\n\tvar locale = this.locale;\r\n\tvar c = scheduler.config.lightbox_recurring;\r\n\tvar ev = this.getEvent(id);\r\n\tvar pid = ev.event_pid;\r\n\tvar isVirtual = this._is_virtual_event(id);\r\n\tif (isVirtual)\r\n\t\tpid = id.split(\"#\")[0];\r\n\r\n\t// show series\r\n\tvar showSeries = function(id) {\r\n\t\tvar event = scheduler.getEvent(id);\r\n\t\tevent._end_date = event.end_date;\r\n\t\tevent.end_date = new Date(event.start_date.valueOf() + event.event_length * 1000);\r\n\t\treturn scheduler.showLightbox_rec(id); // editing series\r\n\t};\r\n\r\n\tif ( (pid || pid*1 === 0) && ev.rec_type) {\r\n\t\t// direct API call on series id\r\n\t\treturn showSeries(id);\r\n\t}\r\n\tif ( !pid || pid === '0' || ( (!locale.labels.confirm_recurring || c == 'instance') || (c == 'series' && !isVirtual)) ) {\r\n\t\t// editing instance or non recurring event\r\n\t\treturn this.showLightbox_rec(id);\r\n\t}\r\n\tif (c == 'ask') {\r\n\t\tvar that = this;\r\n\t\tscheduler.modalbox({\r\n\t\t\ttext: locale.labels.confirm_recurring,\r\n\t\t\ttitle: locale.labels.title_confirm_recurring,\r\n\t\t\twidth: \"500px\",\r\n\t\t\tposition: \"middle\",\r\n\t\t\tbuttons:[locale.labels.button_edit_series, locale.labels.button_edit_occurrence, locale.labels.icon_cancel],\r\n\t\t\tcallback: function(index) {\r\n\t\t\t\tswitch(+index) {\r\n\t\t\t\t\tcase 0:\r\n\t\t\t\t\t\treturn showSeries(pid);\r\n\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\treturn that.showLightbox_rec(id);\r\n\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\tshowSeries(pid);\r\n\t}\r\n};\r\n\r\n\r\nscheduler.get_visible_events_rec = scheduler.get_visible_events;\r\nscheduler.get_visible_events = function(only_timed) {\r\n\tfor (var i = 0; i < this._rec_temp.length; i++)\r\n\t\tdelete this._events[this._rec_temp[i].id];\r\n\tthis._rec_temp = [];\r\n\r\n\tvar stack = this.get_visible_events_rec(only_timed);\r\n\tvar out = [];\r\n\tfor (var i = 0; i < stack.length; i++) {\r\n\t\tif (stack[i].rec_type) {\r\n\t\t\t//deleted element of series\r\n\t\t\tif (stack[i].rec_pattern != \"none\")\r\n\t\t\t\tthis.repeat_date(stack[i], out);\r\n\t\t}\r\n\t\telse out.push(stack[i]);\r\n\t}\r\n\treturn out;\r\n};\r\n\r\n\r\n(function() {\r\n\tvar old = scheduler.isOneDayEvent;\r\n\tscheduler.isOneDayEvent = function(ev) {\r\n\t\tif (ev.rec_type) return true;\r\n\t\treturn old.call(this, ev);\r\n\t};\r\n\tvar old_update_event = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id) {\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif(ev && ev.rec_type){\r\n\t\t\t//rec_type can be changed without the lightbox,\r\n\t\t\t// make sure rec_pattern updated as well\r\n\t\t\tev.rec_pattern = (ev.rec_type || \"\").split(\"#\")[0];\r\n\t\t}\r\n\t\tif (ev && ev.rec_type && !this._is_virtual_event(id)) {\r\n\t\t\tscheduler.update_view();\r\n\t\t} else {\r\n\t\t\told_update_event.call(this, id);\r\n\t\t}\r\n\t};\r\n})();\r\n\r\nscheduler.transponse_size = {\r\n\tday:1, week:7, month:1, year:12\r\n};\r\nscheduler.date.day_week = function(sd, day, week) {\r\n\tsd.setDate(1);\r\n\tvar originalMonth = scheduler.date.month_start(new Date(sd));\r\n\tweek = (week - 1) * 7;\r\n\tvar cday = sd.getDay();\r\n\tvar nday = day * 1 + week - cday + 1;\r\n\tsd.setDate(nday <= week ? (nday + 7) : nday);\r\n\tvar newMonth = scheduler.date.month_start(new Date(sd));\r\n\tif(originalMonth.valueOf() !== newMonth.valueOf()){\r\n\t\treturn false;\r\n\t}\r\n\treturn true;\r\n};\r\nscheduler.transpose_day_week = function(sd, list, cor, size, cor2) {\r\n\tvar cday = (sd.getDay() || (scheduler.config.start_on_monday ? 7 : 0)) - cor;\r\n\tfor (var i = 0; i < list.length; i++) {\r\n\t\tif (list[i] > cday)\r\n\t\t\treturn sd.setDate(sd.getDate() + list[i] * 1 - cday - (size ? cor : cor2));\r\n\t}\r\n\tthis.transpose_day_week(sd, list, cor + size, null, cor);\r\n};\r\nscheduler.transpose_type = function(type) {\r\n\tvar transposeRecurring = \"transpose_\" + type;\r\n\tif (!this.date[transposeRecurring]) {\r\n\t\tvar recurringParts = type.split(\"_\");\r\n\t\tvar dayDurationMs = 60 * 60 * 24 * 1000;\r\n\t\tvar addRecurring = \"add_\" + type;\r\n\t\tvar recurringStepDays = this.transponse_size[recurringParts[0]] * recurringParts[1];\r\n\r\n\t\tif (recurringParts[0] == \"day\" || recurringParts[0] == \"week\") {\r\n\t\t\tvar weekDays = null;\r\n\t\t\tif (recurringParts[4]) {\r\n\t\t\t\tweekDays = recurringParts[4].split(\",\");\r\n\t\t\t\tif (scheduler.config.start_on_monday) {\r\n\t\t\t\t\tfor (var i = 0; i < weekDays.length; i++)\r\n\t\t\t\t\t\tweekDays[i] = (weekDays[i] * 1) || 7;\r\n\t\t\t\t\tweekDays.sort();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.date[transposeRecurring] = function(nd, td) {\r\n\t\t\t\tvar delta = Math.floor((td.valueOf() - nd.valueOf()) / (dayDurationMs * recurringStepDays));\r\n\t\t\t\tif (delta > 0)\r\n\t\t\t\t\tnd.setDate(nd.getDate() + delta * recurringStepDays);\r\n\t\t\t\tif (weekDays)\r\n\t\t\t\t\tscheduler.transpose_day_week(nd, weekDays, 1, recurringStepDays);\r\n\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t\tthis.date[addRecurring] = function(sd, inc) {\r\n\t\t\t\tvar nd = new Date(sd.valueOf());\r\n\t\t\t\tif (weekDays) {\r\n\t\t\t\t\tfor (var count = 0; count < inc; count++)\r\n\t\t\t\t\t\tscheduler.transpose_day_week(nd, weekDays, 0, recurringStepDays);\r\n\t\t\t\t} else\r\n\t\t\t\t\tnd.setDate(nd.getDate() + inc * recurringStepDays);\r\n\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t}\r\n\t\telse if (recurringParts[0] == \"month\" || recurringParts[0] == \"year\") {\r\n\t\t\tthis.date[transposeRecurring] = function(nd, td, seriesInstance) {\r\n\t\t\t\tvar delta = Math.ceil(((td.getFullYear() * 12 + td.getMonth() * 1 + 1) - (nd.getFullYear() * 12 + nd.getMonth() * 1 + 1)) / (recurringStepDays) - 1);\r\n\r\n\t\t\t\tif (delta >= 0){\r\n\t\t\t\t\tnd.setDate(1);\r\n\t\t\t\t\tnd.setMonth(nd.getMonth() + delta * recurringStepDays);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn scheduler.date[addRecurring](nd, 0, seriesInstance);\r\n\t\t\t\t//if (str[3]){\r\n\t\t\t\t//\tscheduler.date.day_week(nd, str[2], str[3]);\r\n\t\t\t\t//}\r\n\t\t\t};\r\n\t\t\tthis.date[addRecurring] = function(sd, inc, seriesInstance, currentCount) {\r\n\t\t\t\tif(!currentCount){\r\n\t\t\t\t\tcurrentCount = 1;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcurrentCount++;\r\n\t\t\t\t}\r\n\t\t\t\tvar maxCount = 12;\r\n\t\t\t\tif(currentCount > maxCount){\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar nd = new Date(sd.valueOf());\r\n\t\t\t\tnd.setDate(1);\r\n\r\n\r\n\t\t\t\tnd.setMonth(nd.getMonth() + inc * recurringStepDays);\r\n\t\t\t\tvar origMonth = nd.getMonth();\r\n\t\t\t\tvar origYear = nd.getFullYear();\r\n\t\t\t\tnd.setDate(seriesInstance.start_date.getDate());\r\n\t\t\t\tif (recurringParts[3]){\r\n\t\t\t\t\tscheduler.date.day_week(nd, recurringParts[2], recurringParts[3]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar correctOverflowInstances = scheduler.config.recurring_overflow_instances;\r\n\t\t\t\tif(nd.getMonth() != origMonth && correctOverflowInstances != \"none\"){\r\n\t\t\t\t\t// no such day in a month\r\n\t\t\t\t\tif(correctOverflowInstances === \"lastDay\"){\r\n\t\t\t\t\t\t// return either last day of the month\r\n\t\t\t\t\t\tnd = new Date(origYear, origMonth + 1, 0, nd.getHours(), nd.getMinutes(), nd.getSeconds(), nd.getMilliseconds());\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t// or go to the next instance\r\n\t\t\t\t\t\tnd = scheduler.date[addRecurring](new Date(origYear, origMonth + 1, 0), inc||1, seriesInstance, currentCount);\r\n\t\t\t\t\t\t// if next instance is not possible (e.g. 'repeat on 40th day of the month') null will be returned\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.repeat_date = function(ev, stack, non_render, from, to, maxCount) {\r\n\r\n\tfrom = from || this._min_date;\r\n\tto = to || this._max_date;\r\n\tvar max = maxCount || -1;\r\n\tvar td = new Date(ev.start_date.valueOf());\r\n\r\n\tvar startHour = td.getHours();\r\n\r\n\tvar visibleCount = 0;\r\n\r\n\tif (!ev.rec_pattern && ev.rec_type)\r\n\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\r\n\tthis.transpose_type(ev.rec_pattern);\r\n\ttd = scheduler.date[\"transpose_\" + ev.rec_pattern](td, from, ev);\r\n\twhile ( td && (\r\n\t\ttd < ev.start_date ||\r\n\t\tscheduler._fix_daylight_saving_date(td,from,ev,td,new Date(td.valueOf() + ev.event_length * 1000)).valueOf() <= from.valueOf() ||\r\n\t\ttd.valueOf() + ev.event_length * 1000 <= from.valueOf())){\r\n\t\t\ttd = this.date[\"add_\" + ev.rec_pattern](td, 1, ev);\r\n\r\n\t}\r\n\twhile (td && (td < to && td < ev.end_date && (max < 0 || visibleCount < max))) {\r\n\t\ttd.setHours(startHour);\r\n\r\n\t\tvar timestamp = (scheduler.config.occurrence_timestamp_in_utc) ? Date.UTC(td.getFullYear(), td.getMonth(), td.getDate(), td.getHours(), td.getMinutes(), td.getSeconds()) : td.valueOf();\r\n\t\tvar ch = this._get_rec_marker(timestamp, ev.id);\r\n\t\tif (!ch) { // unmodified element of series\r\n\t\t\tvar ted = new Date(td.valueOf() + ev.event_length * 1000);\r\n\t\t\tvar copy = this._copy_event(ev);\r\n\t\t\t//copy._timed = ev._timed;\r\n\t\t\tcopy.text = ev.text;\r\n\t\t\tcopy.start_date = td;\r\n\t\t\tcopy.event_pid = ev.id;\r\n\t\t\tcopy.id = ev.id + \"#\" + Math.round(timestamp / 1000);\r\n\t\t\tcopy.end_date = ted;\r\n\r\n\t\t\tcopy.end_date = scheduler._fix_daylight_saving_date(copy.start_date, copy.end_date, ev, td, copy.end_date);\r\n\r\n\t\t\tcopy._timed = this.isOneDayEvent(copy);\r\n\r\n\t\t\tif (!copy._timed && !this._table_view && !this.config.multi_day) return;\r\n\t\t\tstack.push(copy);\r\n\r\n\t\t\tif (!non_render) {\r\n\t\t\t\tthis._events[copy.id] = copy;\r\n\t\t\t\tthis._rec_temp.push(copy);\r\n\t\t\t}\r\n\r\n\t\t\tvisibleCount++;\r\n\r\n\t\t} else\r\n\t\tif (non_render){\r\n\t\t\tif(ch.rec_type != \"none\"){\r\n\t\t\t\tvisibleCount++;\r\n\t\t\t}\r\n\t\t\tstack.push(ch);\r\n\t\t}\r\n\r\n\t\ttd = this.date[\"add_\" + ev.rec_pattern](td, 1, ev);\r\n\t//\tif(!scheduler.date[\"validate_add_\" + ev.rec_pattern](td, 1, ev.rec_pattern)){\r\n\t///\t\talert(\"detect add\")\r\n\t//\t}\r\n\t}\r\n};\r\nscheduler._fix_daylight_saving_date = function(start_date, end_date, ev, counter, default_date) {\r\n\tvar shift = start_date.getTimezoneOffset() - end_date.getTimezoneOffset();\r\n\tif (shift) {\r\n\t\tif (shift > 0) {\r\n\t\t\t// e.g. 24h -> 23h\r\n\t\t\treturn new Date(counter.valueOf() + ev.event_length * 1000 - shift * 60 * 1000);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// e.g. 24h -> 25h\r\n\t\t\treturn new Date(end_date.valueOf() - shift * 60 * 1000);\r\n\t\t}\r\n\t}\r\n\treturn new Date(default_date.valueOf());\r\n};\r\nscheduler.getRecDates = function(id, max) {\r\n\tvar ev = typeof id == \"object\" ? id : scheduler.getEvent(id);\r\n\tvar recurrings = [];\r\n\tmax = max || 100;\r\n\r\n\tif (!ev.rec_type) {\r\n\t\treturn [\r\n\t\t\t{ start_date: ev.start_date, end_date: ev.end_date }\r\n\t\t];\r\n\t}\r\n\tif (ev.rec_type == \"none\") {\r\n\t\treturn [];\r\n\t}\r\n\r\n\tscheduler.repeat_date(ev, recurrings, true, ev.start_date, ev.end_date, max);\r\n\r\n\tvar result = [];\r\n\tfor(var i = 0; i < recurrings.length; i++){\r\n\t\tif(recurrings[i].rec_type != \"none\"){\r\n\t\t\tresult.push({start_date: recurrings[i].start_date, end_date: recurrings[i].end_date});\r\n\t\t}\r\n\t}\r\n\r\n\treturn result;\r\n};\r\nscheduler.getEvents = function(from, to) {\r\n\tvar result = [];\r\n\tfor (var a in this._events) {\r\n\t\tvar ev = this._events[a];\r\n\t\tif (ev && ev.start_date < to && ev.end_date > from) {\r\n\t\t\tif (ev.rec_pattern) {\r\n\t\t\t\tif (ev.rec_pattern == \"none\") continue;\r\n\t\t\t\tvar sev = [];\r\n\t\t\t\tthis.repeat_date(ev, sev, true, from, to);\r\n\t\t\t\tfor (var i = 0; i < sev.length; i++) {\r\n\t\t\t\t\t// if event is in rec_markers then it will be checked by himself, here need to skip it\r\n\t\t\t\t\tif (!sev[i].rec_pattern && sev[i].start_date < to && sev[i].end_date > from && !this._rec_markers[sev[i].id]) {\r\n\t\t\t\t\t\tresult.push(sev[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if (!this._is_virtual_event(ev.id)) { // if it's virtual event we can skip it\r\n\t\t\t\tresult.push(ev);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n};\r\n\r\nscheduler.config.repeat_date = \"%m.%d.%Y\";\r\nscheduler.config.lightbox.sections = [\r\n\t{name:\"description\", map_to:\"text\", type:\"textarea\" , focus:true},\r\n\t{name:\"recurring\", type:\"recurring\", map_to:\"rec_type\", button:\"recurring\"},\r\n\t{name:\"time\", height:72, type:\"time\", map_to:\"auto\"}\r\n];\r\n\r\n\r\n//drop secondary attributes\r\nscheduler._copy_dummy = function(ev) {\r\n\tvar start_date = new Date(this.start_date);\r\n\tvar end_date = new Date(this.end_date);\r\n\tthis.start_date = start_date;\r\n\tthis.end_date = end_date;\r\n\tthis.event_length = this.event_pid = this.rec_pattern = this.rec_type = null;\r\n};\r\n\r\nscheduler.config.include_end_by = false;\r\nscheduler.config.lightbox_recurring = 'ask'; // series, instance\r\n\r\nscheduler.attachEvent(\"onClearAll\", function(){\r\n\tscheduler._rec_markers = {}; //clear recurring events data\r\n\tscheduler._rec_markers_pull = {};\r\n\tscheduler._rec_temp = [];\r\n});\r\n\r\n}","import getSerializator from '../core/common/get_serializable_events';\r\nexport default function(scheduler){\r\n\r\n\t\r\nconst getSerializableData = getSerializator(scheduler);\r\n\r\n//redefine this method, if you want to provide a custom set of attributes for serialization\r\nscheduler.data_attributes=function(){\r\n\tvar attrs = [];\r\n\tvar format = scheduler._helpers.formatDate;\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\t\tfor (var name in ev)\r\n\t\t\tif (name.substr(0,1) !=\"_\")\r\n\t\t\t\tattrs.push([name,((name == \"start_date\" || name == \"end_date\")?format:null)]);\r\n\t\tbreak;\r\n\t}\r\n\treturn attrs;\r\n};\r\n\r\nscheduler.toXML = function(header){\r\n\tvar xml = [];\r\n\tvar attrs = this.data_attributes();\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\r\n\t\txml.push(\"\");\r\n\t\tfor (var i=0; i < attrs.length; i++)\r\n\t\t\txml.push(\"<\"+attrs[i][0]+\">\");\r\n\r\n\t\txml.push(\"\");\r\n\t}\r\n\treturn (header||\"\")+\"\"+xml.join(\"\\n\")+\"\";\r\n};\r\n\r\nscheduler._serialize_json_value = function(value){\r\n\tif(value === null || typeof value === \"boolean\"){\r\n\t\tvalue = \"\" + value;\r\n\t}else{\r\n\t\tif(!value && value !== 0){\r\n\t\t\tvalue = \"\";\r\n\t\t}\r\n\t\tvalue = '\"' + value.toString().\r\n\t\t\treplace(/\\n/g,\"\").\r\n\t\t\treplace(/\\\\/g,\"\\\\\\\\\").\r\n\t\t\treplace(/\"/g, '\\\\\"') + '\"';\r\n\t}\r\n\treturn value;\r\n};\r\n\r\n\r\n\r\nscheduler.toJSON = function(){\r\n\treturn JSON.stringify(this.serialize());\r\n};\r\n\r\n\r\nscheduler.toICal = function(header){\r\n\tvar start = \"BEGIN:VCALENDAR\\nVERSION:2.0\\nPRODID:-//dhtmlXScheduler//NONSGML v2.2//EN\\nDESCRIPTION:\";\r\n\tvar end = \"END:VCALENDAR\";\r\n\tvar format = scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\");\r\n\tvar full_day_format = scheduler.date.date_to_str(\"%Y%m%d\");\r\n\r\n\tvar ical = [];\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\r\n\r\n\t\tical.push(\"BEGIN:VEVENT\");\r\n\t\tif (!ev._timed || (!ev.start_date.getHours() && !ev.start_date.getMinutes()))\r\n\t\t\tical.push(\"DTSTART:\"+full_day_format(ev.start_date));\r\n\t\telse\r\n\t\t\tical.push(\"DTSTART:\"+format(ev.start_date));\r\n\t\tif (!ev._timed || (!ev.end_date.getHours() && !ev.end_date.getMinutes()))\r\n\t\t\tical.push(\"DTEND:\"+full_day_format(ev.end_date));\r\n\t\telse\r\n\t\t\tical.push(\"DTEND:\"+format(ev.end_date));\r\n\t\tical.push(\"SUMMARY:\"+ev.text);\r\n\t\tical.push(\"END:VEVENT\");\r\n\t}\r\n\treturn start+(header||\"\")+\"\\n\"+ical.join(\"\\n\")+\"\\n\"+end;\r\n};\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Timeline\", scheduler.assert);\r\n}","import { TooltipManager } from \"./tooltipManager\";\r\n\r\nexport default function (scheduler: any) {\r\n\r\n\tscheduler.config.tooltip_timeout = 30;\r\n\tscheduler.config.tooltip_offset_y = 20;\r\n\tscheduler.config.tooltip_offset_x = 10;\r\n\tscheduler.config.tooltip_hide_timeout = 30;\r\n\r\n\tconst tooltipManager = new TooltipManager(scheduler);\r\n\r\n\tscheduler.ext.tooltips = tooltipManager;\r\n\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function () {\r\n\r\n\t\ttooltipManager.tooltipFor({\r\n\t\t\tselector: \"[\" + scheduler.config.event_attribute + \"]\",\r\n\t\t\thtml: (event: MouseEvent) => {\r\n\t\t\t\tif (scheduler._mobile && !scheduler.config.touch_tooltip) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst targetEventId = scheduler._locate_event(event.target);\r\n\t\t\t\tif (scheduler.getEvent(targetEventId)) {\r\n\t\t\t\t\tconst event = scheduler.getEvent(targetEventId);\r\n\t\t\t\t\treturn scheduler.templates.tooltip_text(event.start_date, event.end_date, event);\r\n\t\t\t\t}\r\n\t\t\t\treturn null;\r\n\t\t\t},\r\n\t\t\tglobal: false\r\n\t\t});\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function () {\r\n\t\ttooltipManager.destructor();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onLightbox\", function () {\r\n\t\ttooltipManager.hideTooltip();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeDrag\", function() {\r\n\t\t// GS-2377: don't hide tooltip on mobile device when ontouchstart event occurs\r\n\t\tif (scheduler._mobile && scheduler.config.touch_tooltip) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\ttooltipManager.hideTooltip();\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function() {\r\n\t\ttooltipManager.hideTooltip();\r\n\t\treturn true;\r\n\t});\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Tree Timeline\", scheduler.assert);\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Units\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\nscheduler._get_url_nav = function(){\r\n\tvar p = {};\r\n\tvar data = (document.location.hash || \"\").replace(\"#\", \"\").split(\",\");\r\n\tfor (var i = 0; i < data.length; i++) {\r\n\t\tvar s = data[i].split(\"=\");\r\n\t\tif (s.length == 2)\r\n\t\t\tp[s[0]] = s[1];\r\n\t}\r\n\treturn p;\r\n};\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function () {\r\n\tvar first = true;\r\n\tvar s2d = scheduler.date.str_to_date(\"%Y-%m-%d\");\r\n\tvar d2s = scheduler.date.date_to_str(\"%Y-%m-%d\");\r\n\tvar select_event = scheduler._get_url_nav().event || null;\r\n\r\n\tscheduler.attachEvent(\"onAfterEventDisplay\", function(ev){\r\n\t\tselect_event = null;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function (om, od, m, d) {\r\n\t\tif (first) {\r\n\t\t\tfirst = false;\r\n\t\t\tvar p = scheduler._get_url_nav();\r\n\r\n\t\t\tif (p.event){\r\n\t\t\t\ttry{\r\n\t\t\t\t\tif(scheduler.getEvent(p.event)){\r\n\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\tshowEvent(p.event);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tvar handler = scheduler.attachEvent(\"onXLE\", function(){\r\n\t\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\t\tshowEvent(p.event);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\tscheduler.detachEvent(handler);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (e){}\r\n\t\t\t}\r\n\r\n\t\t\tif (p.date || p.mode) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthis.setCurrentView((p.date ? s2d(p.date) : null), (p.mode || null));\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\t//assuming that mode is not available anymore\r\n\t\t\t\t\tthis.setCurrentView((p.date ? s2d(p.date) : null), m);\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar values = [\r\n\t\t\t\"date=\" + d2s(d || od),\r\n\t\t\t\"mode=\" + (m || om)\r\n\t\t];\r\n\r\n\t\tif(select_event){\r\n\t\t\tvalues.push(\"event=\" + select_event);\r\n\t\t}\r\n\r\n\t\tvar text = \"#\" + values.join(\",\");\r\n\t\tdocument.location.hash = text;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tfunction showEvent(e){\r\n\t\tif(scheduler.$destroyed){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tselect_event = e;\r\n\t\tif(scheduler.getEvent(e)){\r\n\t\t\tscheduler.showEvent(e);\r\n\t\t}\r\n\t}\r\n});\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Week Agenda\", scheduler.assert);\r\n}","export default function(scheduler){\r\nscheduler.attachEvent(\"onLightBox\",function(){\r\n\tif (this._cover){\r\n\t\ttry{\r\n\t\t\tthis._cover.style.height = this.expanded ? \"100%\" : ((document.body.parentNode||document.body).scrollHeight+\"px\");\r\n\t\t} catch(e) {\r\n\r\n\t\t}\r\n\t}\r\n});\r\n\r\nscheduler.form_blocks.select.set_value=function(node,value,ev){\r\n\tif (typeof value == \"undefined\" || value === \"\")\r\n\t\tvalue = (node.firstChild.options[0]||{}).value;\r\n\tnode.firstChild.value=value||\"\";\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\t// scheduler.config.year_x = 4;\r\n\t// scheduler.config.year_y = 3;\r\n\t// scheduler.xy.year_top = 0;\r\n\r\n\tscheduler.templates.year_date = function(date) {\r\n\t\treturn scheduler.date.date_to_str(scheduler.locale.labels.year_tab + \" %Y\")(date);\r\n\t};\r\n\tscheduler.templates.year_month = scheduler.date.date_to_str(\"%F\");\r\n\tscheduler.templates.year_scale_date = scheduler.date.date_to_str(\"%D\");\r\n\tscheduler.templates.year_tooltip = function(s, e, ev) {\r\n\t\treturn ev.text;\r\n\t};\r\n\r\n\tconst isYearMode = function() {\r\n\t\treturn scheduler._mode == \"year\";\r\n\t};\r\n\t\r\n\tconst getCellDate = function(node){\r\n\t\tvar day = scheduler.$domHelpers.closest(node, \"[data-cell-date]\");\r\n\t\tif(!day || !day.hasAttribute(\"data-cell-date\")) return null;\r\n\t\treturn scheduler.templates.parse_date(day.getAttribute(\"data-cell-date\"));\r\n\t};\r\n\r\n\t// dbl click hook for scheduler._on_dbl_click\r\n\tscheduler.dblclick_dhx_year_grid= function(e) {\r\n\t\tif (isYearMode()) {\r\n\t\t\tconst target = e.target;\r\n\t\t\tif(scheduler.$domHelpers.closest(target, \".dhx_before\") || scheduler.$domHelpers.closest(target, \".dhx_after\")){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tconst date = getCellDate(target);\r\n\t\t\t\r\n\t\t\tif(date){\r\n\t\t\t\tconst start = date;\r\n\t\t\t\tconst end = this.date.add(start, 1, \"day\");\r\n\t\t\t\tif (!this.config.readonly && this.config.dblclick_create){\r\n\t\t\t\t\tthis.addEventNow(start.valueOf(), end.valueOf(), e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\t\r\n\tscheduler.attachEvent(\"onEventIdChange\", function(){\r\n\t\tif (isYearMode())\r\n\t\t\tthis.year_view(true);\r\n\t});\r\n\r\n\r\n\tvar old = scheduler.render_data;\r\n\tscheduler.render_data = function(evs) {\r\n\t\tif (!isYearMode()) return old.apply(this, arguments);\r\n\t\tfor (var i = 0; i < evs.length; i++)\r\n\t\t\tthis._year_render_event(evs[i]);\r\n\t};\r\n\r\n\tvar clear = scheduler.clear_view;\r\n\tscheduler.clear_view = function() {\r\n\t\tif (!isYearMode()) return clear.apply(this, arguments);\r\n\t\tvar dates = scheduler._year_marked_cells,\r\n\t\t\tdiv = null;\r\n\t\tfor (var date in dates) {\r\n\t\t\tif (dates.hasOwnProperty(date)) {\r\n\t\t\t\tdiv = dates[date];\r\n\t\t\t\tdiv.classList.remove(\"dhx_year_event\", \"dhx_cal_datepicker_event\");\r\n\t\t\t\t// div.className = \"dhx_month_head\";\r\n\t\t\t\t// div.removeAttribute(\"date\");\r\n\t\t\t\t// div.removeAttribute(\"data-year-date\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._year_marked_cells = {};\r\n\t};\r\n\r\n\tscheduler._hideToolTip = function() {\r\n\t\tif (this._tooltip) {\r\n\t\t\tthis._tooltip.style.display = \"none\";\r\n\t\t\tthis._tooltip.date = new Date(9999, 1, 1);\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._showToolTip = function(date, pos, e, src) {\r\n\t\tif (this._tooltip) {\r\n\t\t\tif (this._tooltip.date.valueOf() == date.valueOf()) return;\r\n\t\t\tthis._tooltip.innerHTML = \"\";\r\n\t\t} else {\r\n\t\t\tvar t = this._tooltip = document.createElement(\"div\");\r\n\t\t\tt.className = \"dhx_year_tooltip\";\r\n\t\t\tif (this.config.rtl) t.className += \" dhx_tooltip_rtl\";\r\n\t\t\tdocument.body.appendChild(t);\r\n\t\t\tt.addEventListener(\"click\", scheduler._click.dhx_cal_data);\r\n\t\t\tt.addEventListener(\"click\", function(e){\r\n\t\t\t\tif(e.target.closest(`[${scheduler.config.event_attribute}]`)){\r\n\t\t\t\t\tconst id = e.target.closest(`[${scheduler.config.event_attribute}]`).getAttribute(scheduler.config.event_attribute);\r\n\t\t\t\t\tscheduler.showLightbox(id);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\tvar evs = this.getEvents(date, this.date.add(date, 1, \"day\"));\r\n\t\tvar html = \"\";\r\n\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tif(!this.filter_event(ev.id, ev))\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\t\t\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\t\t\thtml += \"
\";\r\n\t\t\thtml += \"
\" + (evs[i]._timed ? this.templates.event_date(evs[i].start_date) : \"\") + \"
\";\r\n\t\t\thtml += \"
 
\";\r\n\t\t\thtml += this.templates.year_tooltip(evs[i].start_date, evs[i].end_date, evs[i]) + \"
\";\r\n\t\t}\r\n\r\n\t\tthis._tooltip.style.display = \"\";\r\n\t\tthis._tooltip.style.top = \"0px\";\r\n\r\n\r\n\t\tif (document.body.offsetWidth - pos.left - this._tooltip.offsetWidth < 0)\r\n\t\t\tthis._tooltip.style.left = pos.left - this._tooltip.offsetWidth + \"px\";\r\n\t\telse\r\n\t\t\tthis._tooltip.style.left = pos.left + src.offsetWidth + \"px\";\r\n\r\n\t\tthis._tooltip.date = date;\r\n\t\tthis._tooltip.innerHTML = html;\r\n\r\n\t\tif (document.body.offsetHeight - pos.top - this._tooltip.offsetHeight < 0)\r\n\t\t\tthis._tooltip.style.top = pos.top - this._tooltip.offsetHeight + src.offsetHeight + \"px\";\r\n\t\telse\r\n\t\t\tthis._tooltip.style.top = pos.top + \"px\";\r\n\t};\r\n\r\n\tscheduler._year_view_tooltip_handler = function(e){\r\n\t\tif (!isYearMode()) return;\r\n\r\n\t\tvar src = e.target || e.srcElement;\r\n\t\tif (src.tagName.toLowerCase() == 'a') // fix for active links extension (it adds links to the date in the cell)\r\n\t\t\tsrc = src.parentNode;\r\n\t\tif (scheduler._getClassName(src).indexOf(\"dhx_year_event\") != -1)\r\n\t\t\tscheduler._showToolTip(scheduler.templates.parse_date(src.getAttribute(\"data-year-date\")), scheduler.$domHelpers.getOffset(src), e, src);\r\n\t\telse\r\n\t\t\tscheduler._hideToolTip();\r\n\t};\r\n\tscheduler._init_year_tooltip = function() {\r\n\t\tscheduler._detachDomEvent(scheduler._els[\"dhx_cal_data\"][0], \"mouseover\", scheduler._year_view_tooltip_handler);\r\n\t\tscheduler.event(scheduler._els[\"dhx_cal_data\"][0], \"mouseover\", scheduler._year_view_tooltip_handler);\r\n\t};\r\n\r\n\tscheduler._get_year_cell = function(d) {\r\n\t\tvar dateString = scheduler.templates.format_date(d);\r\n\t\tvar cells = this.$root.querySelectorAll(`.dhx_cal_data .dhx_cal_datepicker_date[data-cell-date=\"${dateString}\"]`);\r\n\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\tif(!scheduler.$domHelpers.closest(cells[i], \".dhx_after, .dhx_before\")){\r\n\t\t\t\treturn cells[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t};\r\n\r\n\tscheduler._year_marked_cells = {};\r\n\tscheduler._mark_year_date = function(date, event) {\r\n\t\tvar dateString = scheduler.templates.format_date(date);\r\n\t\tvar cell = this._get_year_cell(date);\r\n\t\tif (!cell) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar ev_class = this.templates.event_class(event.start_date, event.end_date, event);\r\n\t\tif (!scheduler._year_marked_cells[dateString]) {\r\n\t\t\tcell.classList.add(\"dhx_year_event\", \"dhx_cal_datepicker_event\");// = \"dhx_month_head dhx_year_event\";\r\n\t\t\tcell.setAttribute(\"data-year-date\", dateString);\r\n\t\t\tcell.setAttribute(\"date\", dateString);\r\n\t\t\tscheduler._year_marked_cells[dateString] = cell;\r\n\t\t}\r\n\t\tif(ev_class){\r\n\t\t\tcell.classList.add(ev_class);\r\n\t\t}\r\n\t};\r\n\tscheduler._unmark_year_date = function(date) {\r\n\t\tvar cell = this._get_year_cell(date);\r\n\t\tif (!cell) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcell.classList.remove(\"dhx_year_event\", \"dhx_cal_datepicker_event\");\r\n//\t\tcell.className = \"dhx_month_head\";\r\n\t};\r\n\tscheduler._year_render_event = function(event) {\r\n\t\tvar date = event.start_date;\r\n\t\tif (date.valueOf() < this._min_date.valueOf()){\r\n\t\t\tdate = this._min_date;\r\n\t\t} else {\r\n\t\t\tdate = this.date.date_part(new Date(date));\r\n\t\t}\r\n\r\n\t\twhile (date < event.end_date) {\r\n\t\t\tthis._mark_year_date(date, event);\r\n\t\t\tdate = this.date.add(date, 1, \"day\");\r\n\t\t\tif (date.valueOf() >= this._max_date.valueOf())\r\n\t\t\t\treturn;\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.year_view = function(mode) {\r\n\r\n\t\tscheduler.set_sizes();\r\n\r\n\t\tscheduler._table_view = mode;\r\n\r\n\t\tif (this._load_mode && this._load()) return;\r\n\r\n\t\tif (mode) {\r\n\t\t\tscheduler._init_year_tooltip();\r\n\t\t\tscheduler._reset_year_scale();\r\n\t\t\tif (scheduler._load_mode && scheduler._load()){\r\n\t\t\t\tscheduler._render_wait = true;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tscheduler.render_view_data();\r\n\t\t} else {\r\n\t\t\tscheduler._hideToolTip();\r\n\t\t}\r\n\t};\r\n\tscheduler._reset_year_scale = function() {\r\n\t\tthis._cols = [];\r\n\t\tthis._colsS = {};\r\n\t\tvar week_starts = []; //start day of first week in each month\r\n\t\tvar dataArea = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tvar c = this.config;\r\n\t\tdataArea.scrollTop = 0; //fix flickering in FF\r\n\t\tdataArea.innerHTML = \"\";\r\n\r\n\t\tvar dy = Math.floor((parseInt(dataArea.style.height) - scheduler.xy.year_top) / c.year_y);\r\n\t\tif (dy < 190) {\r\n\t\t\tdy = 190;\r\n\t\t}\r\n\r\n\t\tvar week_template = document.createElement(\"div\");\r\n\t\tvar dummy_date = this.date.week_start(scheduler._currentDate());\r\n\r\n\t\tthis._process_ignores(dummy_date, 7, \"day\", 1);\r\n\r\n\t\tfor (var i = 0; i < 7; i++) {\r\n\t\t\tif(!(this._ignores && this._ignores[i])) {\r\n\t\t\t\tthis._cols[i] = 'var(--dhx-scheduler-datepicker-cell-size)';\r\n\t\t\t\tthis._render_x_header(i, 0, dummy_date, week_template);\r\n\r\n\t\t\t}\r\n\t\t\tdummy_date = this.date.add(dummy_date, 1, \"day\");\r\n\t\t}\r\n\t\tweek_template.lastChild.className += \" dhx_scale_bar_last\";\r\n\r\n\t\tfor(var i = 0; i < week_template.childNodes.length; i++){\r\n\t\t\tthis._waiAria.yearHeadCell(week_template.childNodes[i]);\r\n\t\t}\r\n\r\n\t\tvar sd = this.date[this._mode + \"_start\"](this.date.copy(this._date));\r\n\t\tvar ssd = sd;\r\n\t\tvar yearBox = null;\r\n\t\tconst wrapper = document.createElement(\"div\");\r\n\t\twrapper.classList.add(\"dhx_year_wrapper\");\r\n\t\tfor (var i = 0; i < c.year_y; i++){\r\n\t\t\tfor (var j = 0; j < c.year_x; j++) {\r\n\t\t\t\tyearBox = document.createElement(\"div\");\r\n\t\t\t\tyearBox.className = \"dhx_year_box\";\r\n\r\n\t\t\t\tyearBox.setAttribute(\"date\", this._helpers.formatDate(sd));\r\n\t\t\t\tyearBox.setAttribute(\"data-month-date\", this._helpers.formatDate(sd));\r\n\t\t\t\tyearBox.innerHTML = \"
\" + week_template.innerHTML + \"
\";\r\n\r\n\t\t\t\tvar header = yearBox.querySelector(\".dhx_year_month\");\r\n\t\t\t\tvar grid = yearBox.querySelector(\".dhx_year_grid\");\r\n\t\t\t\tvar body = yearBox.querySelector(\".dhx_year_body\");\r\n\r\n\t\t\t\tvar headerId = scheduler.uid();\r\n\t\t\t\tthis._waiAria.yearHeader(header, headerId);\r\n\t\t\t\tthis._waiAria.yearGrid(grid, headerId);\r\n\r\n\r\n\t\t\t\theader.innerHTML = this.templates.year_month(sd);\r\n\r\n\r\n\r\n\t\t\t\tvar dd = this.date.week_start(sd);\r\n\t\t\t\tthis._reset_month_scale(body, sd, dd, 6);\r\n\r\n\t\t\t\tvar days = body.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var day = 0; day < days.length; day++){\r\n\t\t\t\t\tthis._waiAria.yearDayCell(days[day]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\twrapper.appendChild(yearBox);\r\n\r\n\t\t\t\tweek_starts[i * c.year_x + j] = (sd.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;\r\n\t\t\t\tsd = this.date.add(sd, 1, \"month\");\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdataArea.appendChild(wrapper);\r\n\r\n\t\tvar dateElement = this._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML = this.templates[this._mode + \"_date\"](ssd, sd, this._mode);\r\n\t\t}\r\n\r\n\t\tthis.week_starts = week_starts;\r\n\t\tweek_starts._month = ssd.getMonth();\r\n\t\tthis._min_date = ssd;\r\n\t\tthis._max_date = sd;\r\n\t};\r\n\r\n\tscheduler._reset_year_scale = function(){\r\n\r\n\t\tvar dataArea = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tdataArea.scrollTop = 0; //fix flickering in FF\r\n\t\tdataArea.innerHTML = \"\";\r\n\r\n\t\tlet yearStart = this.date.year_start(new Date(this._date));\r\n\t\t\r\n\t\tthis._min_date = this.date.week_start(new Date(yearStart));\r\n\r\n\t\tconst wrapper = document.createElement(\"div\");\r\n\t\twrapper.classList.add(\"dhx_year_wrapper\");\r\n\r\n\t\tlet currentDate = yearStart;\r\n\t\tfor(let i = 0; i < 12; i++){\r\n\t\t\tlet yearBox = document.createElement(\"div\");\r\n\t\t\tyearBox.className = \"dhx_year_box\";\r\n\r\n\t\t\tyearBox.setAttribute(\"date\", this._helpers.formatDate(currentDate));\r\n\t\t\tyearBox.setAttribute(\"data-month-date\", this._helpers.formatDate(currentDate));\r\n\t\t\tyearBox.innerHTML = `
${this.templates.year_month(currentDate)}
\r\n\t\t\t
`;\r\n\r\n\t\t\tconst yearGrid = yearBox.querySelector(\".dhx_year_grid\");\r\n\t\t\tconst datepicker = scheduler._createDatePicker(null, {\r\n\t\t\t\tdate: currentDate,\r\n\t\t\t\tminWeeks: 6\r\n\t\t\t});\r\n\t\t\tdatepicker._renderDayGrid(yearGrid);\r\n\t\t\tdatepicker.destructor();\r\n\r\n\t\t\twrapper.appendChild(yearBox);\r\n\r\n\t\t\tcurrentDate = this.date.add(currentDate, 1, \"month\");\r\n\r\n\t\t}\r\n\t\tdataArea.appendChild(wrapper);\r\n\r\n\t\tlet lastDate = this.date.add(yearStart, 1, \"year\");\r\n\t\tif(lastDate.valueOf() != this.date.week_start(new Date(lastDate)).valueOf()){\r\n\t\t\tlastDate = this.date.week_start(new Date(lastDate));\r\n\t\t\tlastDate = this.date.add(lastDate, 1, \"week\");\r\n\t\t}\r\n\t\tthis._max_date = lastDate;\r\n\t\tvar dateElement = this._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML = this.templates[this._mode + \"_date\"](yearStart, lastDate, this._mode);\r\n\t\t}\r\n\t};\r\n\r\n\tvar getActionData = scheduler.getActionData;\r\n\tscheduler.getActionData = function(n_ev) {\r\n\t\tif(!isYearMode()){\r\n\t\t\treturn getActionData.apply(scheduler, arguments);\r\n\t\t}\r\n\t\t\r\n\t\tvar date = getCellDate(n_ev.target);\r\n\t\treturn {\r\n\t\t\tdate:date,\r\n\t\t\tsection:null\r\n\t\t};\r\n\t};\r\n\r\n\tvar locateEvent = scheduler._locate_event;\r\n\tscheduler._locate_event = function(node) {\r\n\t\tvar id = locateEvent.apply(scheduler, arguments);\r\n\t\tif(!id){\r\n\t\t\t\r\n\t\t\tvar date = getCellDate(node);\r\n\t\t\tif(!date) return null;\r\n\t\t\tvar evs = scheduler.getEvents(date, scheduler.date.add(date, 1, \"day\"));\r\n\t\t\tif(!evs.length) return null;\r\n\r\n\t\t\t//can be multiple events in the cell, return any single one\r\n\t\t\tid = evs[0].id;\r\n\t\t}\r\n\t\treturn id;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tscheduler._hideToolTip();\r\n\t});\r\n}","import SchedulerFactory from \"./scheduler_factory\";\r\nimport gplExtensions from \"./ext/extensions_gpl\";\r\n\r\nconst factory = new SchedulerFactory(gplExtensions);\r\n\r\nconst scheduler = factory.getSchedulerInstance();\r\nconst Scheduler = {\r\n\tplugin: scheduler.bind(factory.plugin, factory)\r\n};\r\n\r\nwindow.scheduler = scheduler;\r\nwindow.Scheduler = Scheduler;\r\n\r\nif(!window.$dhx) {\r\n\twindow.$dhx = {};\r\n}\r\n\r\nwindow.$dhx.scheduler = scheduler;\r\nwindow.$dhx.Scheduler = Scheduler;\r\n\r\nexport default scheduler;export { scheduler, Scheduler };","\r\n\r\nimport dhtmlxHook from \"./dhtmlx_hook\";\r\nimport \"./css/theme.less\";\r\ndhtmlxHook();\r\n\r\nimport global from \"./global\";\r\n\r\nimport factoryMethod from \"./scheduler_factory_method\";\r\nimport ExtensionsManager from \"./ext/extension_manager\";\r\n\r\nclass SchedulerFactory {\r\n\r\n\tconstructor (extensions) {\r\n\t\tthis._seed = 0;\r\n\t\tthis._schedulerPlugins = [];\r\n\t\tthis._bundledExtensions = extensions;\r\n\t\tthis._extensionsManager = new ExtensionsManager(extensions);\r\n\t}\r\n\r\n\tplugin(code) {\r\n\t\tthis._schedulerPlugins.push(code);\r\n\r\n\t\tif(global.scheduler){\r\n\t\t\tcode(global.scheduler);\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetSchedulerInstance(initConfig) {\r\n\t\tvar scheduler = factoryMethod(this._extensionsManager);\r\n\r\n\t\tfor (var i = 0; i < this._schedulerPlugins.length; i++) {\r\n\t\t\tthis._schedulerPlugins[i](scheduler);\r\n\t\t}\r\n\t\tscheduler._internal_id = this._seed++;\r\n\t\r\n\t\tif (this.$syncFactory){\r\n\t\t\tthis.$syncFactory(scheduler);\r\n\t\t}\r\n\r\n\t\tif(initConfig){\r\n\t\t\tthis._initFromConfig(scheduler, initConfig);\r\n\t\t}\r\n\r\n\t\treturn scheduler;\r\n\t}\r\n\r\n\t_initFromConfig(scheduler, initConfig){\r\n\t\tif(initConfig.plugins){\r\n\t\t\tscheduler.plugins(initConfig.plugins);\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.config){\r\n\t\t\tscheduler.mixin(scheduler.config, initConfig.config, true);\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.templates){\r\n\t\t\tscheduler.attachEvent(\"onTemplatesReady\", function(){\r\n\t\t\t\tscheduler.mixin(scheduler.templates, initConfig.templates, true);\r\n\t\t\t}, {once: true});\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.events){\r\n\t\t\tfor(const event in initConfig.events){\r\n\t\t\t\tscheduler.attachEvent(event, initConfig.events[event]);\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.locale){\r\n\t\t\tscheduler.i18n.setLocale(initConfig.locale);\r\n\t\t}\r\n\t\r\n\t\tif(Array.isArray(initConfig.calendars)){\r\n\t\t\tinitConfig.calendars.forEach(function(calendar){\r\n\t\t\t\tscheduler.addCalendar(calendar);\r\n\t\t\t});\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.container){\r\n\t\t\tscheduler.init(initConfig.container);\r\n\t\t} else {\r\n\t\t\tscheduler.init();\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.data){\r\n\t\t\tif(typeof initConfig.data === \"string\"){\r\n\t\t\t\tscheduler.load(initConfig.data);\r\n\t\t\t}else{\r\n\t\t\t\tscheduler.parse(initConfig.data);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\r\n}\r\n\r\nexport default SchedulerFactory;"],"names":["global$1","window","global","dragHighlightPos","scheduler","dndMarkers","dragStarted","eventNode","event","isEnabled","config","drag_highlight","markTimespan","checkViewName","viewName","viewObj","getView","layout","createMarkerConfig","configSettings","sectionId","style","top","left","marginLeft","sections","markerObject","start_date","end_date","css","html","date","add","createViewMarker","settings","markerConfigs","monthViewMarkersArray","weekDates","currDate","Date","valueOf","obj","push","week_start","cells","$container","querySelectorAll","event_attribute","id","i","length","cloneNode","unitMarkersArray","sectionPropertyName","y_property","map_to","multisection","formatedSections","String","split","section_delimiter","map","element","elems","columnViewMarkersArray","eventNodes","eventNodeClone","getAttribute","forEach","cfg","attachEvent","mode","e","getEvent","target","closest","getState","cascade_event_display","unselect","getActionData","section","unmarkTimespan","limitPlugin","mark_now","display_marked_timespans","overwrite_marked_timespans","dhx_time_block","default_timespan_type","get_resulting_options","days","zones","options","type","getZones","ev","timespans","day_index","day_value","timespan_type","s","containers","_props","matrix","container","property","view","linker","_add_timespan_zones","_get_blocked_zones","blockTime","addMarkedTimespan","unblockTime","deleteMarkedTimespan","checkInMarkedTimespan","on_overlap","res","temp_start_date","temp_end_date","_marked_timespans","date_part","getDay","eventStart","_get_zone_minutes","eventEnd","getDate","markerStart","markerEnd","checkLimitViolation","check_limits","c","evs","rec_type","_end_date","seriesEnd","limit_start","limit_end","complete_res","p","_timed","isOneDayEvent","allow","_drag_id","_drag_mode","setHours","setMinutes","checkEvent","callEvent","timeline_zones","blocked_timeline_zones","this","_get_relevant_blocked_zones","resultZones","concat","_mark_now","hide","dhx_now_time","_els","now","_currentDate","_remove_mark_now","_max_date","_min_date","getHours","first_hour","last_hour","locate_holder_day","_append_mark_now","zone_start","_table_view","_mode","start_index","end_index","units_l","size","position","r_divs","t_day","t_div","_render_marked_timespan","els","div","parent","parentNode","removeChild","getMinutes","_prepare_timespan_options","r_configs","temp_configs","Array","t_days","slice","cloned_config","_lame_clone","apply","undefined","invert_zones","invertZones","uid","view_key","hasOwnProperty","ids","t_config","_lame_copy","k","c_config","t_sd","t_ed","zone_end","_get_dates_by_index","index","start","end","dates","start_day","delta","t_date","_get_css_classes_by_config","css_classes","join","_get_block_by_config","block","document","createElement","innerHTML","appendChild","area","day","blocks","min_date","max_date","date_to_display","min_day","areas","d","_scales","sday","_cols","_ignores","block_proto","className","height","width","order","inner_index","locate_holder","Math","max","min","all_hours_height","hour_size_px","hour_ms","round","_mark_timespans","data","divs","_on_scale_add_marker","len","childNodes","firstChild","_getClassName","indexOf","configuration","Error","rebuild_els","get_elements","timespans_ids","_marked_timespans_ids","timespan_types","_marked_timespans_types","_addMarkerTimespanConfig","unit_id","timespans_view","day_configs","_array","configs","current_zones","resulting_zones","c_zone_start","c_zone_end","isLast","offset","splice","_subtract_timespan_zones","is_modified","_","_delete_marked_timespan_by_id","parent_array","_delete_marked_timespan_by_config","viewspans","_delete_marked_timespans_list","dayConfig","day_timespans","d_t","related_zones","arguments","types","t","typedConfig","_get_types_to_render","common","specific","types_to_render","_get_configs_to_render","units","unit","_get_unit_index","day_ind","unitsPerDay","floor","_date","key","unit_zones","unit_types","global_data","day_types","dblclick_dhx_marked_timespan","src","dblclick_create","addEventNow","createMethod","methods","isActive","disableMethod","methodName","dummyMethod","restoreMethod","disableMethods","methodsHash","call","restoreMethods","batchUpdatePayload","callback","console","error","$stateProvider","registerProvider","batch_update","noRedraw","dp_mode","call_dp","_dp","updateMode","setUpdateMode","calls","setModeDate","needRender","needUpdateView","repaintEvents","rememberModeDate","render","setCurrentView","updateView","render_data","render_view_data","updateEvent","sendData","initPlugins","deletedEvent","copy","undo_deleted","new_event","message","text","expire","addEvent","limit","batchUpdate","uidSeed","isDate","getFullYear","getMonth","utils","mixin","source","force","f","object","result","isArray","pop","Function","prototype","toString","constructor","Number","Boolean","varType","Object","defined","delay","timeout","timer","$cancelTimeout","$pending","args","setTimeout","clearTimeout","$execute","extend","cssClass","classList","itemTypes","rows_container","row","setAttribute","fix_tab_position","$firstTab","$lastTab","$segmentedTab","button","builtInButton","spacer","minicalendarButton","minicalendarDiv","click","$_eventAttached","isCalendarVisible","destroyCalendar","renderCalendar","navigation","handler","calendar","html_element","renderElement","renderer","rows","cols","value","align","justifyContent","prepareConfig","renderLayout","items","fragment","createDocumentFragment","next","_init_nav_bar","navBar","querySelector","_update_nav_bar","previousHeight","heightChanged","newHeight","xy","nav_height","unset_actions","set_actions","display","isAttachedNode","root","body","getWindowSize","w","innerWidth","documentElement","clientWidth","h","innerHeight","clientHeight","listenWindowResize","resizeDelay","oldSize","$destroyed","a","b","newSize","triggerSchedulerResize","$root","getComputedStyle","getPropertyValue","resizeWatcher","tabIndex","wai_aria_attributes","offsetHeight","previousWidth","offsetWidth","lowlevelResizeWatcher","contentWindow","EventHost","_silent_mode","listeners","createEventStorage","handlers","eventStorage","combinedResult","handlerResult","handlerId","once","originalHandler","removeEvent","clear","makeEventable","eventHost","eventName","toLowerCase","thisObject","bind","attachAll","name","eventArguments","handlerName","detachEvent","list","eventId","detachAllEvents","defaultDomEvents","el","addEventListener","eventRemove","removeEventListener","domEvents","eventScope","attach","capture","detach","detachAll","staticArray","createEventScope","_eventRemoveAll","_createDomEventScope","_trim","str","trim","replace","_isDate","_isObject","getClassName","node","baseVal","locateCss","classname","strict","trg","srcElement","ind","charAt","right","isVisible","visibility","currentStyle","hiddenSection","recurringSection","hasNonNegativeTabIndex","isNaN","hasHref","nodeName","loLowerCase","input","select","textarea","hasAttribute","isShadowDomSupported","head","createShadowRoot","attachShadow","getRootNode","ShadowRoot","host","dom_helpers","getAbsoluteLeft","htmlObject","getOffset","getAbsoluteTop","getOffsetSum","elem","parseInt","offsetTop","offsetLeft","offsetParent","getOffsetRect","box","getBoundingClientRect","test","navigator","userAgent","dummy","dummyBox","docElem","scrollTop","pageYOffset","scrollLeft","pageXOffset","clientTop","clientLeft","selector","insertAfter","newNode","referenceNode","nextSibling","insertBefore","remove","isChildOf","child","contains","getFocusableNodes","nodes","nodesArray","$position","sort","hasShadowParent","getActiveElement","activeElement","shadowRoot","getSelection","focusNode","getRelativeEventPosition","bottom","y","x","clientX","clientY","getTargetNode","tagName","composedPath","getNodePosition","Element","matches","msMatchesSelector","webkitMatchesSelector","parentElement","nodeType","isWindowAwailable","env","isIE","isOpera","isChrome","isKHTML","isFF","isIPad","search","isEdge","isNode","serialize$1","serialized","encodeURIComponent","JSON","stringify","generateStringToDate","format","utc","splt","mask","match","code","csp_str_to_date","set","temp","locale","month_short_hash","month_full_hash","UTC","cspEnabled","useCsp","csp","init","month_short","month_full","old","setSeconds","setMilliseconds","setTime","getTime","time_part","getTimezoneOffset","shift","start_on_monday","month_start","setDate","year_start","setMonth","day_start","_add_days","inc","ndate","rest","hours","setYear","to_fixed","num","date_to_str","getUTCDate","getUTCMonth","getUTCFullYear","day_short","getUTCDay","day_full","getUTCHours","getUTCMinutes","getUTCSeconds","getSeconds","getUTCISOWeek","getISOWeek","str_to_date","exactFormat","stringToDateMethod","parseExactFormat","yyyyMMddhhIIss","MMddyyyyhhIIss","ddMMyyyyhhIIss","ISO8601","parseYMD","parseMDY","parseDMY","dateString","parse_exact_format","datestr","nday","first_thursday","year_number","ordinal_date","convert_to_utc","getSerializator","_events","_loaded","_load","url","from","_load_url","to","prevent_cache","_load_mode","lf","templates","load_format","cache_line","temp_to","ajax","get","ajaxCallback","response","on_load","_parsers","xml","canParse","xhr","responseXML","xmlDoc","parse","responseText","topElement","xmltop","loader","csrfToken","dhtmlx","security_key","opts","xpath","arr","serverList","itms","j","attrs","attributes","label","attr","nodeValue","ud","udx","_xmlNodeToJSON","_userdata","_init_event","json","events","dhx_security","collections","collections_loaded","collection","option","option_key","ical","RegExp","c_start","c_end","incoming","event_r","e_start","e_end","exec","param","param_r","parse_param","substr","parse_date","dh","dm","utcMark","dy","dn","dd","server_utc","foundParser","parser","_process","status","_process_loading","_loading","_not_render","_render_wait","_after_call","_tagvalue","_init_date","_helpers","parseDate","getSerializableData","createSerializator","serialize","dataset","allEvents","exportedEvent","exportValue","rawValue","xml_format","format_date","load","setLoadMode","array","show_loading","_x","_y","_obj","_init_touch_events","touch","MSStream","platform","maxTouchPoints","scroll_width","_mobile","touchEventsSupported","createEvent","_touch_events","touches","pageX","pageY","PointerEvent","pointerEnabled","pointerType","msPointerEnabled","MSPOINTER_TYPE_MOUSE","names","accessor","ignore","tracker","drag_mode","scroll_mode","action_mode","dblclicktime","attachTouchEvent","_is_lightbox_open","passive","drag_cancel","_hide_global_tip","_on_mouse_up","_temp_touch_block","_drag_pos","_pointerDragId","acc","dnd","timeline","original_render","drag_id","getEvents","_sorder","_count","_on_mouse_move","preventDefault","cancelBubble","_update_global_tip","abs","fake_event","pointerId","_click","dhx_cal_data","_on_dbl_click","_block_next_stop","touch_drag","actTask","_locate_event","fakeTask","sourceTask","_ignore_next_click","previousSibling","_on_mouse_down","for_rendered","_rendered","touch_tip","_show_global_tip","touch_swipe_dates","s_ev","e_ev","step","max_dy","scrollable","dx","dhx_cal_next_button","dhx_cal_prev_button","toptip","_global_tip","time","event_header","day_date","labels","drag_to_create","drag_to_move","calculatedMaterial","cachedBorderBoxValue","checkIfBorderBoxStyling","_is_material_skin","probe","boxSizing","refreshAfterLoad","_border_box_events","oldStyling","flatSkinHourScale","_addThemeClass","skin","_skin_settings","use_select_menu_space","wide_form","displayed_event_color","displayed_event_text_color","_skin_xy","lightbox_additional_height","bar_height","_build_skin_info","clearInterval","monitorIntervalId","setInterval","csstheme","setSkin","styles","themeVar","themeName","isCssVarTheme","cssValues","oldMaterialTheme","links","getElementsByTagName","href","themeNameFromFile","_theme_info","theme","cssVarTheme","values","themeVariables","_configure","col","_skin_init","hour_scale","hour_date","_old_month_day","month_day","old_month_day","dhx_cal_today_button","tab","header","tabs","specialTabs","tabName","find","filter","firstTab","reverse","DataProcessorEvents","dp","$scheduler","$dp","_dataProcessorHandlers","_validId","setUpdated","z","_new_event","_in_progress","_invalid","updatedRows","_waitMode","_update_callback","upd","setUserData","action_param","deleteEvent","_add_rec_marker","DataProcessor","serverProcessorURL","serverProcessor","autoUpdate","_tMode","_headers","_payload","post_delim","messages","updated","inserted","deleted","invalid","invalid_cell","enableUTFencoding","eventable","boxAttribute","_dhx_msg_cfg","usercall","modalBox","modal_key","which","keyCode","messageBox","keyboard","domHelpers","modality","cover","classValue","buttonAriaAttrs","_waiAria","messageButtonAttrString","getFirstDefined","_createBox","ok","cancel","contentId","messageModalAttr","inner","title","content","message_ok","message_cancel","buttons","btn","getElementById","hidden","focus","alertPopup","confirmPopup","boxPopup","box_params","params","focusable","messageInfoAttr","timers","pull","seed","hideAll","popups","alert","confirm","modalbox","setTransactionMode","total","headers","payload","_tSend","_endnm","_serializeAsJson","_router","router","escape","_utf","setDataColumns","val","_columns","getSyncState","enableDataNames","enablePartialDataSend","_changed","master","rowId","state","findRow","existing","getUserData","set_invalid","is_invalid","markRow","_methods","details","getActionByState","checkBeforeUpdate","editStop","sendAllData","_beforeSendData","_getRowData","_sendData","_serializeAsJSON","serialize_one","stack","keys","pref","_applyPayload","urlSeparator","dataToSend","self","queryParams","afterUpdate","urlParams","_user","_cleanupArgumentsBeforeSend","method","preprocessedData","_cleanupItemBeforeSend","action","query","_onResolvedCreateUpdate","tag","resultState","setRequestHeader","sid","tid","afterUpdateCallback","routerMode","actionPromise","create","delete","update","then","catch","valid","_forEachUpdatedRow","_getAllData","out","has_one","pattern","defineAction","_uActions","btag","marker","correct","originalSid","_errorResponse","cleanUpdate","_setDefaultTransactionMode","_serverProcessor","that","finalizeUpdate","atag","_initialized","_dp_init","_is_virtual_event","_set_event_text_style","r","cssText","event_updated","rec_pattern","_dp_change_event_id","new_id","changeEventId","_dp_hook_delete","setDp","dataProcessorEvents","_dataprocessor","setOnAfterUpdate","setOnBeforeUpdateHandler","func","setAutoUpdate","interval","user","_need_update","_update_busy","xml_node","afterAutoUpdate","fullSync","intervalId","loadUpdate","getUpdates","_getXmlNodeValue","version","vers","updates","destructor","processedData","updatedItem","output","item","processedItem","prop","formatDate","_prepareItemForJson","_prepareItemForForm","_prepareDataItem","dataItem","ar","day_tab","week_tab","month_tab","icon_save","icon_cancel","icon_details","icon_edit","icon_delete","confirm_closing","confirm_deleting","section_description","section_time","full_day","confirm_recurring","section_recurring","button_recurring","button_recurring_open","button_edit_series","button_edit_occurrence","grid_tab","prev","year","month","hour","minute","repeat_radio_day","repeat_radio_week","repeat_radio_month","repeat_radio_year","repeat_radio_day_type","repeat_text_day_count","repeat_radio_day_type2","repeat_week","repeat_text_week_count","repeat_radio_month_type","repeat_radio_month_start","repeat_text_month_day","repeat_text_month_count","repeat_text_month_count2_before","repeat_text_month_count2_after","repeat_year_label","select_year_day2","repeat_text_year_day","select_year_month","repeat_radio_end","repeat_text_occurences_count","repeat_radio_end2","repeat_radio_end3","repeat_never","repeat_daily","repeat_workdays","repeat_weekly","repeat_monthly","repeat_yearly","repeat_custom","repeat_freq_day","repeat_freq_week","repeat_freq_month","repeat_freq_year","repeat_on_date","repeat_ends","month_for_recurring","day_for_recurring","be","agenda_tab","description","year_tab","week_agenda_tab","ca","cn","cs","da","de","en","es","fi","fr","he","hu","it","jp","LocaleManager","_locales","nb","nl","no","pl","pt","ro","ru","si","sk","sv","tr","ua","DatePicker","modes","currentRange","eventDates","currentModeIndex","onStateChangeHandlers","_domEvents","onStateChange","oldState","newState","_notifyStateChange","direction","newDate","setFullYear","setState","newIndex","backwardArrow","monthLabel","innerText","toLocaleString","startYear","_toggleMode","forwardArrow","_adjustDate","_renderCalendarHeader","dataContainer","_renderDayGrid","_renderMonthGrid","_renderYearGrid","daysOfWeekContainer","currentDate","maxDate","labelFormat","dayElement","weeks","currWeek","minWeeks","minSchedulerDate","maxSchedulerDate","eventDaysTable","reduce","_renderDayGridHeader","firstDate","monthStart","monthEnd","lastDate","currentCalDate","_weeksBetween","dayGridContainer","dateCell","wrapper","months","formatLabel","monthElement","doneArea","doneBtn","yearElement","factoryMethod","extensionManager","stateProviders","internal","provider","unregisterProvider","stateProvider","commonViews","agenda","grid","week_agenda","anythingElse","requiredExtensions","_commonErrorMessages","unknownView","relatedExtension","collapsedContainer","createTimelineView","createUnitsView","createGridView","exportToPNG","exportToPDF","extend$l","_detachDomEvent","_init_once","scheduler_resize_listener","hasSchedulerMarkup","wai_aria_application_role","views","_grid","log","rtl","_scroll","init_templates","set_sizes","$initialized","min_event_height","scale_width","scale_height","month_scale_height","menu_width","margin_top","margin_left","editor_width","month_head_height","event_header_height","edit_save","edit_cancel","functor","scale_x","materialScalePlaceholder","set_xy","_lightbox","_setLbPosition","_data_width","prepareValue","prepared","class_name","attr_value","labelAttr","domEventsScope","getDaysDifference","startDate","endDate","differenceInDays","_select_id","_close_not_saved","previousSelection","editor_id","_edit_id","lightbox_id","_lightbox_id","select_id","expanded","readonly","icon","def_step","dhx_cal_tab","deprecated_name","substring","_dhtmlx_confirm","title_confirm_deleting","edit","save","showLightbox","form","base","duration","event_duration","time_step","start_hour","_drag_event","details_on_dblclick","viewHandler","_get_column_index","x_pos","column","_week_indexes_from_pos","pos","ceil","_mouse_coords","$env","_colsS","$domHelpers","dataArea","heights","_ignores_detected","preserve_length","_event_length","_get_real_event_length","x_step","x_unit","timestamp","confirmationText","title_confirm_closing","positive_closing","_correct_shift","back","_is_pos_changed","old_pos","new_pos","diff","old_val","new_val","has_moved","_correct_drag_start_date","_start_correction","_end_correction","_get_fictional_event_length","_correct_drag_end_date","mousedownPos","_get_date_from_pos","_drag_start","fields","timeStep","custom","_dragEventBody","_move_event_shift","resize_date","_drag_from_start","resize_from_start","end_day_start","end_day_date","firstHour","maxY","precisePos","minDate","preciseDate","cursor","new_end","new_start","limit_drag_out","all_timed","_get_section_view","_get_event_sday","_allow_dnd","update_render","sx","update_view","drag_event_body","_get_private_properties","_clear_temporary_properties","clean","flagged_event","initial","current_state","moved","_dhx_changed","is_new","edit_on_create","details_on_create","_trigger_dyn_loading","_reset_ignores","_reset_scale","isViewExists","_set_aria_buttons_attrs","buttonGroups","group","headerButtonsAttributes","icon_form","oldClass","newClass","multidayScroll","dhx_multi_day","prev_scroll","preserve_scroll","_dy_shift","headerToggleState","_render_x_header","offset_top","left_border","columnHeaderText","dayHeaderAttr","_get_columns_num","count","count_n","_get_timeunit_start","_get_view_end","ed","_calc_scale_sizes","summ","_process_ignores","realcount","_set_scale_col_size","_render_scales","data_area","sd","today","scales","cls","firstHalf","slotDate","htmlContent","time_slot_text","time_slot_class","secondHalf","week_date_class","dayColumnAttr","_getNavDateElement","drag_resize","drag_move","navBarDateStr","scaleElement","navBarDateAttr","_reset_month_scale","_reset_hours_scale","multi_day","c1","totalWidth","col_length","hiddenWidth","c2","cc","hourScaleAttr","scroll_hour","now_date","n","preserve","ign_date","_render_month_scale","view_start","cd","tdwidths","cell_width","getCellHeight","cellheight","table","cell","month_date_class","body_class","head_class","monthCellAttr","cellHead","cellBody","bf1","getLabel","lightbox","updateCollection","list_name","resetLightbox","hideCover","cache","n_ev","_focus","endColumnIndex","eventLength","startColumnIndex","_get_date_index","last_column","check","excludedDuration","intervalStart","intervalEnd","leftCellCutOffStart","leftCellCutOffEnd","rightCellCutOffStart","rightCellCutOffEnd","ev_length","dir","per_day","end_slot","fd","start_slot","_get_section_property","_is_initialized","htmlTags","extraSpaces","stripHTMLLite","htmlText","singleQuotes","escapeQuotes","getAttributeString","setAttributes","role","getHeaderCellAttr","eventAttr","_eventCommonAttr","event_text","$dataprocessor_class","setEventBarAttr","_getAttributes","attributeSetter","arg","eventBarAttrString","agendaHeadAttrString","agendaHeadDateString","agendaHeadDescriptionString","agendaDataAttrString","agendaEventAttrString","agendaDetailsBtnString","gridAttrString","gridRowAttrString","gridCellAttrString","mapAttrString","mapRowAttrString","mapDetailsBtnString","minicalHeader","headerId","minicalGrid","minicalRow","minicalDayCell","selected","minicalHeadCell","weekAgendaDayCell","weekAgendaEvent","lightboxHiddenAttr","lightboxVisibleAttr","lightboxSectionButtonAttrString","tabindex","yearHeader","yearGrid","yearHeadCell","yearRow","yearDayCell","lightboxAttr","lightboxButtonAttrString","buttonName","eventMenuAttrString","iconName","lightboxHeader","headerText","lightboxSelectAttrString","time_option","buttonLabel","quickInfoAttr","quickInfoHeaderAttrString","quickInfoHeader","quickInfoButtonAttrString","tooltipAttr","tooltipVisibleAttr","tooltipHiddenAttr","dom","assert","show_errors","_createDatePicker","_getFocusableNodes","_locate_css","messageApi","$","counter","Promise","clearAll","createConfig","async","serializeRequestParams","DOMParser","ActiveXObject","loadXML","parseFromString","tagname","xpathExp","docObj","selectNodes","first","ownerDocument","evaluate","XPathResult","ANY_TYPE","iterateNext","_call","onLoad","getSync","put","postData","del","post","postSync","resolve","reject","XMLHttpRequest","isQt","readyState","filePath","open","toUpperCase","send","$ajax","default_date","month_date","load_date","week_date","date_format","api_date","day_column_padding","drag_create","resize_month_events","resize_month_timed","responsive_lightbox","separate_short_events","cascade_event_count","cascade_event_margin","multi_day_height_limit","drag_lightbox","quick_info_detached","icons_edit","icons_select","buttons_left","buttons_right","highlight_displayed_event","ajax_error","delay_render","timeline_swap_resize","$initial","xml_date","d1","d2","day_scale_date","month_scale_date","week_scale_date","time_picker","event_date","event_class","event_bar_date","event_bar_text","month_events_link","drag_marker_class","drag_marker_content","tooltip_date_format","tooltip_text","calendar_month","calendar_scale_date","calendar_date","calendar_time","clear_view","extra_data","silent","setEvent","hash","create_getter","create_setter","is_visible_events","clear_event","evFirstHour","evLastHour","lastHour","checkEndDate","get_visible_events","only_timed","filter_event","_is_main_area_event","hold","full","_recalculate_timed","tvs","tvd","_rendered_location","buffer","renderedLocation","_view_month_day","_render_month_link","toRender","_sday","_eday","curr","_sweek","_get_event_bar_pos","widt","x2","_pre_render_events","render_event_bar","max_evs","max_month_events","real","render_event","_get_first_visible_cell","hb","h_old","_pre_render_events_table","_pre_render_events_line","monthRows","cellHeight","cHeight","unshift","scrollHeight","scroll_fix","scale_settings","sum_width","row_heights","full_multi_day_height","used_multi_day_height","used_multi_day_height_css","multi_day_section","multi_day_icon","overflowY","datePart","_get_event_mapped_end_date","ev_duration","_min_mapped_duration","evs_originals","sh","eh","_inner","t_ev","slot_index","sorderSet","_is_sorder","_max_sorder","max_count","_copy_event","_time_order","_is_any_multiday_cell_visible","isAnyCellVisible","checkDate","noCells","lastDayEnd","weekCellIndex","chunks_info","first_chunk","last_chunk","chunk_info","locate_s","locate_e","_length","stack_line","_first_chunk","_last_chunk","_copy_dummy","_y_from_date","sm","_calc_event_y","min_height","em","parentWidth","menu","menu_offset","pos_y","ev_count","ev_sorder","margin","_render_v_bar","_text_style","zIndex","color","setProperty","tplClass","_editor","shiftKey","ariaAttr","icons","icons_str","currentIcon","textColor","highlightEventPosition","contentA","contentB","cse","boxWidth","renderEvent","inner_html","footer_class","_drag_resize","past","_get_dnd_order","ev_height","max_height","_orig_sorder","evTop","columns","y_event_offset","resize_handle","resizable","left_chunk","right_chunk","resize_left","resize_right","timed","bg_color","style_text","_edit_stop_event","getRenderedEvent","rendered_events","rendered_event","showEvent","original_color","original_text_color","getSectionTop","posFromDate","_smartRenderingEnabled","restoreOriginalColors","scrollTo","_append_drag_marker","m","scale","lastChild","_update_marker_position","getLightboxRoot","cspEnvironment","salesforceEnvironment","_lightbox_controls","formSection","getLightbox","getValue","form_blocks","get_value","setValue","set_value","get_template_control","control","get_select_control","get_textarea_control","get_time_control","defaults","template","sns","placeholder","_get_input","_dhx_onchange","onchange","time_format","_time_format_order","dt","last","limit_time_select","selectBoxClass","range","start_year","end_year","year_range","tdate","_time_values","ariaAttrs","_full_day","checked","disabled","_fill_lightbox_select","auto_end_date","_update_lightbox_select","time_values","direct_value","fixed_value","value_found","t_v","selectedIndex","original","showCover","show_cover","_cover","_fill_lightbox","lightbox_header","headerContent","headerDate","headerTitle","current_sns","_get_lightbox_section_node","default_value","_lightbox_out","_empty_lightbox","hide_lightbox","endLightbox","hide_cover","_move_while_dnd","_finish_dnd","save_lightbox","startLightbox","_custom_lightbox","_temp_lightbox","cancel_lightbox","hideLightbox","_init_lightbox_events","buttonTarget","sectionButton","button_click","readonly_active","setLightboxSize","_init_dnd_events","_dnd_start_lb","dhx_unselectable","lb","_lb_start","_ready_to_dnd","recurring","_lightbox_template","label_name","ds","t_ds","_bindLightboxLabels","inputBlock","fallback","inputId","old_id","getRootView","hooks","didInsert","cmp","skins","jQuery","fn","dhx_scheduler","each","Scheduler","getSchedulerInstance","comp","update_view_timer","curr_view_timer","lazy_setCurrentView","oldDate","oldMode","updateFlags","lazy_updateView","ars","createDataProcessor","tMode","dhtmlxError","catchError","i18n","addLocale","setLocale","localeObject","getLocale","dhx_save_btn","dhx_cancel_btn","dhx_delete_btn","addPlugins","ext","activePlugins","plugins","dependencies","priorities","extension","dep","dependencyName","orderA","orderB","treetimeline","daytimeline","outerdrag","legacy","extensionList","plugin","getExtension","ExtensionsManager","_extensions","attaches","attachScheduler","_genStr","attachObject","vs","av","sched","schedId","setSizes","_viewRestore","notImplemented","modals","modalsStack","isModal","afterPopup","trapFocus","currentTarget","$keyboardNavigation","_keyNavMessagePopup","focusElement","backupFocus","key_nav_legacy","_temp_key_scope","key_nav","_pasteDate","_pasteSection","isCopy","trackMousePosition","mousePointer","keyNavPointer","elementFromPoint","dispatcher","copyEvent","_make_pasted_event","event_pid","event_length","isMultisectionEvent","_do_paste","is_copy","modified_ev","original_ev","_is_key_nav_active","ctrlKey","metaKey","_buffer_event","_key_nav_copy_paste","getActiveNode","new_ev","scheduler_handlers","attachSchedulerHandlers","waitCall","keyDownHandler","focusHandler","keepScrollPosition","focusGlobalNode","enable","reFocusActiveNode","activeNode","isValid","MinicalButton","MinicalCell","mousedownHandler","dataAreaClick","listOfScales","some","Event","TimeSlot","nextSlot","setActiveNode","removeAttribute","evNode","prevState","lastStart","lastEnd","lastSection","getNode","GoogleMapAdapter","_markers","zoom","zoom_after_resolve","initial_zoom","lat","lng","setCenter","setZoom","error_position","google","maps","trigger","mapOptions","center","initial_position","mapId","scrollwheel","mapTypeId","Map","__gm","messageOverlay","outerContainer","setOptions","addListener","geocoder","Geocoder","point","latLng","geocode","results","GeocoderStatus","OK","geometry","location","event_location","formatted_address","clearInstanceListeners","addEventMarker","AdvancedMarkerElement","importLibrary","mapView","createMarker","setMap","infoWindow","close","InfoWindow","maxWidth","info_window_max_width","setContent","map_info_content","anchor","markerInfo","setVisible","setPosition","latlng","LatLng","clearEventMarkers","latitude","longitude","string","address","OpenStreetMapAdapter","openPopup","closeTooltip","setView","mapWrapper","L","tileLayer","addTo","on","fetch","country","myIcon","iconUrl","iconSize","shadowSize","iconAnchor","shadowAnchor","popupConfig","minWidth","markerPopup","popup","tooltip","markerConfig","bindPopup","bindTooltip","removeLayer","setLatLng","resolveAddress","lon","MapboxAdapter","getPopup","isOpen","togglePopup","mapboxgl","accessToken","lngLat","features","place_name","Popup","focusAfterOpen","setMaxWidth","setHTML","Marker","setLngLat","setPopup","ALL_WEEKDAYS","Weekday","weekday","fromStr","nth","equals","other","getJsWeekday","isPresent","isNumber","isWeekdayStr","includes","rang","repeat","times","padStart","targetLength","padString","sep","splits","pymod","divmod","mod","empty","notEmpty","datetime","MONTH_DAYS","ONE_DAY","MAXYEAR","ORDINAL_BASE","PY_WEEKDAYS","isLeapYear","isValidDate","toOrdinal","date2","differencems","fromOrdinal","ordinal","getMonthDays","getWeekday","monthRange","combine","getMilliseconds","clone","cloneDates","clones","timeToUntilString","untilStringToDate","until","bits","dateTZtoISO8601","timeZone","IterResult","_result","before","after","accept","tooEarly","tooLate","extendStatics","setPrototypeOf","__proto__","__extends","TypeError","__","__assign","assign","__spreadArray","pack","l","SuppressedError","Frequency","CallbackIterResult","_super","iterator","_this","ENGLISH","dayNames","monthNames","tokens","SKIP","number","numberAsText","every","at","the","second","third","for","monday","tuesday","wednesday","thursday","friday","saturday","sunday","january","february","march","april","may","june","july","august","september","october","november","december","comma","defaultGetText","defaultDateFormatter","ToText","rrule","gettext","language","dateFormatter","origOptions","bymonthday","bynmonthday","byweekday","allWeeks","someWeeks","isWeekdays","isEveryDay","sortWeekDays","isFullyConvertible","freq","IMPLEMENTED","RRule","FREQUENCIES","plural","HOURLY","MINUTELY","DAILY","bymonth","_bymonth","_bymonthday","_byweekday","byhour","_byhour","WEEKLY","MONTHLY","YEARLY","byyearday","byweekno","weekdaytext","monthtext","npos","wday","finalDelim","delim","o","realCallback","delimiter","finalDelimiter","Parser","rules","done","nextSymbol","isDone","symbol","best","bestSymbol","name_1","v","acceptNumber","expect","parseText","ttr","AT","F","MO","TU","WE","TH","FR","ON","wkd","decodeWKD","decodeNTH","MDAYs","decodeM","S","freqIsDailyOrGreater","fromText","Time","millisecond","DateTime","fromDate","getYear","addYears","years","addMonths","yearDiv","monthMod","addWeekly","wkst","fixDay","addDaily","addHours","filtered","_a","dayDiv","hourMod","addMinutes","minutes","byminute","hourDiv","minuteMod","addSeconds","seconds","bysecond","minuteDiv","secondMod","daysinmonth","SECONDLY","initializeOptions","_i","keys_1","defaultKeys","parseOptions","DEFAULT_OPTIONS","byeaster","dtstart","bysetpos","bynweekday","parsedOptions","parseString","rfcString","parseLine","parseDtstart","line","dtstartWithZone","tzid","parseRrule","Days","parseIndividualNumber","optionKey","parts","SyntaxError","wdaypart","DateWithZone","RangeError","defineProperty","enumerable","configurable","isUTC","rezonedDate","localTimeZone","Intl","DateTimeFormat","resolvedOptions","dateInLocalTZ","tzOffset","optionsToString","outValue","buildDtstart","strValues","ruleString","argsMatch","Cache","all","between","_cacheAdd","what","_value","_cacheGet","cached","argsKeys","findCacheDiff","cachedObject","iterResult","M365MASK","M366MASK","M28","M29","M30","M31","MDAY366MASK","MDAY365MASK","NM28","NM29","NM30","NM31","NMDAY366MASK","NMDAY365MASK","M366RANGE","M365RANGE","WDAYMASK","wdaymask","rebuildYear","firstwkst","wyearlen","firstyday","yearlen","nextyearlen","yearordinal","yearweekday","mmask","mdaymask","nmdaymask","mrange","wnomask","no1wkst","numweeks","lnumweeks","lyearweekday","lno1wkst","lyearlen","weekst","Iterinfo","rebuild","lastyear","yearinfo","lastmonth","monthinfo","nwdaymask","ranges","eastermask","g","yearStart","ydayset","mdayset","wdayset","ddayset","htimeset","mtimeset","stimeset","getdayset","gettimeset","buildPoslist","timeset","ii","dayset","poslist","daypos","timepos","tmp","iter","emitResult","counterDate","millisecondModulo","removeFilteredDays","rezoneIfNeeded","currentDay","isFiltered","dayCounter","SA","SU","noCache","_cache","fromString","_iter","toText","isFullyConvertibleToText","unfold","forceset","compatible","parseInput","rrulevals","rdatevals","exrulevals","exdatevals","parsedDtstart","lines","_b","parms","rdateTzid","parseRDate","rrulestr","rset_1","RRuleSet","groomRruleOptions","rdate","exrule","exdate","rdateval","parm","createGetterSetter","fieldName","field","_rrule","field_1","_rdate","_exrule","_exdate","_exdateHash","_accept","evalExdate","zonedDate","_addRule","_addDate","rrules","exrules","rdates","exdates","_dtstart","rdatesToString","rrs","rule","Tooltip","_scheduler","_tooltipNode","_root","_isLikeMouseEvent","_calculateTooltipPosition","_getViewPort","viewport","_getViewPortSize","tooltipNode","offsetX","tooltip_offset_x","offsetY","tooltip_offset_y","mouse","containerPos","scrollY","scrollX","$event_data","$event","TooltipManager","_listeners","_initDelayedFunctions","hideTooltip","delayHide","watchableTarget","eventTarget","targetNode","doOnMouseEnter","onmouseenter","touch_tooltip","onmouseleave","onmousemove","listener","cloneDomEvent","delayShow","utils.default","show","tooltip_timeout","tooltip_hide_timeout","gplExtensions","active_links","active_link_view","_active_link_click","s_d","do_wrapper","fullname","week_x","d_s","agenda_legacy","add_agenda_legacy","agenda_legacy_time","agenda_legacy_text","agenda_legacy_date","agenda_legacy_start","old_dblclick_dhx_cal_data","dblclick_dhx_cal_data","fill_agenda_tab","old_render_view_data","ev_class","agendaDetailsButtonAttr","agenda_time","agenda_text","_agendaScrollTop","agenda_area","dateElement","agenda_date","agenda_legacy_view","agenda_start","agenda_end","rowAttr","dateHeader","descriptionHeader","agenda_view","add_agenda","dayDateToStr","dayDowToStr","agenda_day","eventsInDays","anyEvents","renderDay","calendarEvent","selectedId","all_timed_month","is_event_short","_safe_copy","proto","isPrototypeOf","old_prerender_events_line","old_prerender_events_table","prerender_events","ce","_virtual","isOvernightEvent","getNextDay","setDateTime","event_changed","re","redraw","next_day","old_get_visible_events","old_mode","old_date","oldUpdate","fullRedrawNeeded","collision","temp_section","_setTempSection","event_id","collision_limit","checkCollision","edited_ev","recurring_event_id","_roll_back_dates","_check_sections_collision","evs_dates","getRecDates","tevs","concurrent","_pid_time","checked_mode","single","container_autoresize","month_day_min_height","min_grid_size","min_map_size","old_pre_render_event","active","total_height","multiday_height","evl","_h_fix","navHeight","headerHeight","checked_divs","updateContainterHeight","is_repaint","checked_div","maxHeight","year_y","cur_height","week_agenda_scale_height","eventsContainer","_gridView","y_unit","getSectionHeight","scrollWidth","getScrollSize","callUpdate","conditionalUpdateContainerHeight","asyncRepaint","requestAnimationFrame","autosizeEnabled","$original_scroll_width","$original_section_autoheight","section_autoheight","cookie","getCookieName","_get_url_nav","urlNavigationPlugin","schedulerCookie","unescape","newMode","cookie_param","old_load","drag_between","editors","cached_options","resetCombo","_combo","DOMParent","combo","unload","DOMelem","dhx_globalImgPath","image_path","dhtmlXCombo","options_height","setOptionHeight","enableFilteringMode","filtering","script_path","selected_id","addOption","disable","selectOption","setComboValue","all_options","single_option","getIndexByValue","getSelectedValue","getSelectedText","vertical","radiobuttons","checked_value","isChecked","check_html","label_html","checkbox","unchecked_value","expand","fullscreen","toggleIcon","_position","_width","_height","_overflow","overflow","_maximize","collapse","directions","prev_margin","export_api","std","getElementSizes","sizes","dhtmlxAjax","dhx4","getTimeline","orientation","dpi","_export_html","_send_to_export","exportToICal","_serialize_plain","exportToExcel","_serialize_columns","_ajax_to_export","server","info","_plain_export_copy","$text","_create_hidden_form","submit","_hidden_export_form","_get_export_size","footer","A5","A4","A3","A2","A1","A0","dataX","cSize","parseFloat","smartRendering","initialSizes","smart_rendering","style_width","style_height","timeline_scrollable","timeline_smart_rendering","grid_view","html_templates","getScope","scopes","minicalButton","minicalDate","SchedulerNode","DataArea","timeSlot","searchMap","key_nav_step","addShortcut","shortcut","scope","scopeObject","getShortcutHandler","commands","shortcuts","findHandler","removeShortcut","unbind","disp","setDefaultNode","_compose","createCommand","modifiers","alt","ctrl","meta","expr","getExpressions","words","getWords","command","commandKeys","specialKeys","charCodeAt","getCommandFromEvent","domEvent","altKey","printableKey","fromCharCode","getHashFromEvent","getHash","junctionChar","term","combinationChar","backspace","enter","esc","space","up","down","home","pageup","pagedown","insert","plus","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10","f11","f12","EventHandler","_handlers","doAction","returnValue","bindAll","initKeys","nextItem","currentFocus","currentIndex","renderMultiple","currentStart","currentEnd","_modes","_getMode","renderVerticalMarker","renderTimelineMarker","renderYearMarker","renderMonthMarker","weekAgenda","renderWeekAgendaMarker","renderAgendaMarker","dayColumns","addWaiAriaLabel","addDataAttributes","dateToStr","dateTimeLabel","sectionObject","markerDate","_wrapDiv","_get_year_cell","opacity","view_opts","round_position","_trace_x","_is_column_visible","start_pos","end_pos","set_date_part","tempStart","tempEnd","_timeline_getX","_section_height","_isRender","renderMonthCell","weekNumber","dayIndex","datatable","lineHeight","getDefaultNode","getMode","blur","_compareEvents","_pickEvent","startId","nextEventHandler","nextEvent","currEvent","visibleDates","nextEv","prevEventHandler","HeaderCell","getNodes","KeyNavNode","moveTo","compareTo","canStringifyThis","canStringifyThat","defaultCell","_getSection","_getNodes","defaultElement","isScrolledIntoView","eventBox","viewPort","idSelector","inlineEditor","getInlineEditor","_moveToSlot","slot","movingDate","getDefaultDate","_getDefaultSection","visibleTime","nowTime","showNowTime","findVisibleColumn","timeslot","_getMultisectionView","_getNextSection","nextIndex","defaultSlot","addMonthDate","nextMonthSlot","_alignTimeSlot","nextTimelineSlot","newPos","nextUnitsSlot","optionsCount","nextDaySlot","_moveDate","isBeforeLastHour","isStartDate","isAfterFirstHour","isInVisibleDayTime","oldStart","toNextDay","testEnd","nextWeekAgendaSlot","nextAgendaSlot","isDateVisible","nextDateColumn","current","tempSlot","extendSlot","extendUnitsSlot","extendTimelineSlot","extendMonthSlot","extendDaySlot","extendWeekAgendaSlot","extendGenericSlot","allowedDirections","moveDate","newDates","extendSlotDates","oldSlot","newSlot","dateDirection","scrollSlot","globalNode","_getGrid","_getNode","enabled","newRow","newCol","blurNode","editor","defaultPrevented","schedulerNode","_timeout","_minicalendars","isMinical","minicalendars","patchMinicalendar","focusMinical","minicalClick","rowIndex","cellIndex","td","renderMinical","cal","added","destroyMinical","_def_count","attachOnce","isSchedulerSelected","changeState","layer","layers","validId","_clearUpdateFlag","_cloneObj","_dataprocessors","_layers_zindex","initial_layer_zindex","isDefault","defaultLayer","showLayer","tlayer","toggleLayer","hideLayer","visible","getLayer","layer_name","native_event_object","noMenu","_evs_layer","_t_render_view_data","evs_layer","borderBox","borderBoxWidth","headerWidth","bodyWidth","footerWidth","bodyHeight","new_zIndex","filter_agenda","limit_view","_temp_limit_scope","om","od","nm","nd","isBlocked","date_end","resetDate","is_new_event","data_copy","native_object","_mark_now_timer","map_view","mapAdapter","eventHandlerIds","adapters","googleMap","openStreetMaps","mapbox","setupMapView","createAdapter","unmodifiedEvent","_eventLocationChanged","map_settings","resolve_event_location","_latLngUpdate","addEventWithLocation","updateEventMarker","newIdEvent","removeEventMarker","onEventClick","coordinates","map_view_provider","currentAdapter","resolve_user_location","view_provider","map_initial_position","map_error_position","map_date_width","map_icon_width","map_description_width","add_map","map_date","map_time","map_text","map_start","dblclick_dhx_map_area","map_initial_zoom","map_zoom_after_resolve","map_infowindow_max_width","map_resolve_user_location","map_type","map_resolve_event_location","fill_map_tab","_selected_event_id","ariaButtonAttr","map_end","mapContainer","adapter","elem_id","marginRight","marginTop","destroy","initialize","geolocation","getCurrentPosition","coords","_updateEventLocation","_event_resolve_delay","ret","minical","minicalDomEvents","minicalendar","mark_events","_synced_minicalendars","_prev","is_refresh","_render_calendar","unmarkCalendar","cont","tpos","_get_def_cont","$dom","dateAttribute","markCalendar","_last_date","conf","markedDates","_markCalendarCurrentDate","sync","_on_xle_handler","updateCalendar","_created","_locateCalendar","weekNum","dat","dayCell","_week_template","week_template","dummy_date","_mini_cal_arrows","previous","ts","temp2","temp3","temp4","temp5","temp6","temp7","temp8","padding","weekHeader","move_minicalendar_date","css_classnames","css_texts","diffs","calendars","arrow","dayHeaders","dayCells","inputs","selects","inp","new_date","_update_minical_select","isFulldayEvent","_attach_action","_round_minutes","linkCalendar","datediff","dateNew","month_end","monthheight","old_s","multiselect","_children","_mark_inputs","_ids","script_url","divLoading","multisource","mvc","update_timer","use_id","sanitize","_finish_ext_load","_get_id","model","cid","backbone","toJSON","changes","queue","add_from_queue","Backbone","Collection","last_event","dragger","dhtmlDragAndDropObject","stopDrag","on_drop","sourceHtmlObject","dhtmlObject","targetHtmlObject","targetHtml","action_data","event_data","view_options","_locate_cell_timeline","addDragLanding","_drag","_dragIn","shtmlObject","_dragOut","DragControl","addDrop","onDrop","sourceDhtmlx","getMaster","onDragIn","pdf","html_regexp","newline_regexp","clean_html","x_norm","colsWidth","x_norm_event","is_left","dhx_cal_header","y_norm","get_style","de_day","de_week","xml_end","xml_top","profile","xml_body_header","dhx_cal_date","xh","xml_month_scale","xml_month","yh","xhs","second_scale","top_width","top_col","xml_body","colors","week_starts","_month","text_color","zx","zdx","left_norm","zy","zdy","e_type","dets","week","dy_copy","toXML","original_date","original_mode","temp_date","to_pdf","objects","getPDFData","toPDF","toPDFRange","quick_info","show_quick_info","clickedElementPosition","fitQIInsideWindow","quickInfoPopup","popupRect","offsetBottom","getPositionInsideScheduler","_$quickInfoHandler","eventElement","showQuickInfo","hiding_function","hideQuickInfo","quick_info_title","quick_info_content","quick_info_date","_quick_info_box_id","_get_event_counter_part","_quick_info_box","_init_quick_info","_fill_quick_data","_show_quick_info","cssTimeToMs","milliseconds","forced","qi","_x_scroll","dataPos","ontransitionend","_quick_info_onscroll_handler","$testmode","_qi_button_click","main","mainContent","originalRecurringSetValue","original_left_buttons","original_right_buttons","txt_replace","txts","txtt","readonly_form","forbidden_buttons","button_arrays","forbidden_button","button_array","originalForm","readonlyForm","_lightbox_r","clearMilliseconds","isSeries","old_add_event","groupExceptions","exceptions","original_start","_rec_temp","_rec_markers_pull","_rec_markers","_get_rec_marker","ch","_get_rec_markers","ev_id","_ignore_call","tev","_pid_changed","_is_modified_occurence","idTimestamp","nid","nev","sub","isEventFound","_start_date","showLightbox_rec","lightbox_recurring","pid","isVirtual","showSeries","title_confirm_recurring","get_visible_events_rec","repeat_date","old_update_event","toIcalString","getWeekdayOfMonth","dayOfWeek","dayOfMonth","dayNumber","non_render","maxCount","seriesExceptions","utcStart","parsedRRule","utcTo","repeatedDates","adjustedDate","visibleCount","eventDuration","exception","_fix_daylight_saving_date","recurrings","sev","occurence","include_end_by","recurring_workdays","jsDaysToRRULEDays","RruleDayNumsToJs","formatDayNumber","repeat_monthly_date","repeat_monthly_weekday","nthDayOfMonth","repeat_yearly_month_date","repeat_yearly_month_weekday","getRecValue","WORKDAYS","CUSTOM","monthRepeat","yearRepeat","formatFunc","endRule","NEVER","fillInDefaults","dayNum","dayLabel","dateOfMonth","nthWeekDayOfMonth","dateOfYear","nthWeekDayOfYear","countInput","ondateInput","endOptionSelect","formatter","repeat_date_of_end","dispatchEvent","getFirstSectionOfType","rec","_get_node","_outer_html","loc","_init_set_value","_ds","weekly","monthly","yearly","_rec_init_done","rf","blocked","rruleset","topOption","rruleObj","untilDate","customFreq","actual_dates","timeControl","recurrence","_start","recurring_legacy","getRecurringSection","occurrence_timestamp_in_utc","outerHTML","_get_form_node","_get_node_value","_get_node_numeric_value","_set_node_value","hash_value","str_date_format","date_str","register_els","inps","change_current_view","set_end_rule","_get_repeat_code","get_rcode","str_date","transpose_type","get_numeric_value","repeat_precise","start_exists","transpose_day_week","set_rcode","_set_repeat_code","MouseEvent","elements","_toggle_block","getTimeSection","_get_button","_get_form","backgroundPosition","transponse_size","day_week","originalMonth","newMonth","cor","cor2","cday","transposeRecurring","recurringParts","addRecurring","recurringStepDays","weekDays","seriesInstance","currentCount","origMonth","origYear","correctOverflowInstances","recurring_overflow_instances","startHour","ted","data_attributes","all_events","_serialize_json_value","toICal","full_day_format","tooltipManager","tooltips","tooltipFor","targetEventId","s2d","d2s","select_event","wp","year_view","year_date","year_month","year_scale_date","year_tooltip","isYearMode","getCellDate","dblclick_dhx_year_grid","_year_render_event","_year_marked_cells","_hideToolTip","_tooltip","_showToolTip","_year_view_tooltip_handler","_init_year_tooltip","_mark_year_date","_unmark_year_date","_reset_year_scale","year_top","ssd","yearBox","year_x","datepicker","locateEvent","factory","extensions","_seed","_schedulerPlugins","_bundledExtensions","_extensionsManager","initConfig","_internal_id","$syncFactory","_initFromConfig","addCalendar","$dhx"],"mappings":"yOAUA,MAAAA,SAPUC,OAAW,IACNA,OAEAC,OCNA,SAASC,GAAiBC,EACrC,CAAA,IAAIC,EAAa,CAAA,EACbC,KACAC,EA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yB,KAAKuxF,EAAWv0G,IAE1BzP,EAAAA,EAAU6tB,MAAMm2F,EAAWv0G,MAG7B,CDxFmCo5E,EAAAA,EAAAA,EAE/B7oF,GAAY0jH,GAAQtkD,uBACpBD,GAAY,CACjBuC,OAAQ1hE,GAAU4e,KAAK8kG,GAAQhiD,OAAQgiD,EAGxC7jH,CAAAA,EAAAA,OAAOG,UAAYA,GACnBH,OAAOs/D,UAAYA,GAEft/D,OAAOwkH,OACVxkH,OAAOwkH,KAAO,IAGfxkH,OAAOwkH,KAAKrkH,UAAYA,GACxBH,OAAOwkH,KAAKllD,UAAYA","x_google_ignoreList":[84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111]} \ No newline at end of file +{"version":3,"file":"dhtmlxscheduler.js","sources":["../sources/global.js","../sources/plugins/drag_highlight_pos.js","../sources/plugins/limit.js","../sources/plugins/batch_update.js","../sources/plugins/index.js","../sources/plugins/undo_delete.js","../sources/core/utils/utils.js","../sources/core/nav_bar.js","../sources/core/scheduler_resize_listener.js","../sources/utils/eventable.js","../sources/core/utils/event.js","../sources/core/common.js","../sources/core/utils/scoped_event.js","../sources/core/utils/dom_helpers.js","../sources/utils/env.js","../sources/core/common/url_serialize.js","../sources/core/base.js","../sources/core/common/get_serializable_events.js","../sources/core/load.js","../sources/core/loaders/xml.js","../sources/core/loaders/json.js","../sources/core/loaders/ical.js","../sources/core/touch.js","../sources/core/skins.js","../sources/core/dataprocessor/dataprocessor_hooks.js","../sources/core/dataprocessor/dataprocessor.js","../sources/core/message.js","../sources/locale/locale_ar.js","../sources/locale/locale_be.js","../sources/locale/locale_ca.js","../sources/locale/locale_cn.js","../sources/locale/locale_cs.js","../sources/locale/locale_da.js","../sources/locale/locale_de.js","../sources/locale/locale_el.js","../sources/locale/locale_en.js","../sources/locale/locale_es.js","../sources/locale/locale_fi.js","../sources/locale/locale_fr.js","../sources/locale/locale_he.js","../sources/locale/locale_hu.js","../sources/locale/locale_id.js","../sources/locale/locale_it.js","../sources/locale/locale_jp.js","../sources/locale/locale_manager.js","../sources/locale/locale_nb.js","../sources/locale/locale_nl.js","../sources/locale/locale_no.js","../sources/locale/locale_pl.js","../sources/locale/locale_pt.js","../sources/locale/locale_ro.js","../sources/locale/locale_ru.js","../sources/locale/locale_si.js","../sources/locale/locale_sk.js","../sources/locale/locale_sv.js","../sources/locale/locale_tr.js","../sources/locale/locale_ua.js","../sources/core/datepicker.js","../sources/scheduler_factory_method.js","../sources/core/state.js","../sources/core/common_errors.js","../sources/core/scheduler.js","../sources/core/wai_aria.js","../sources/core/common/assert.js","../sources/core/jquery.js","../sources/core/destructor.js","../sources/core/utils/ajax.js","../sources/core/config.js","../sources/core/event.js","../sources/core/event_highlight.js","../sources/core/lightbox.js","../sources/core/dhtmlx/dhtmlx_suite_hooks.js","../sources/core/delay_render.js","../sources/core/connector.js","../sources/locale/index.js","../sources/ext/extension_manager.js","../sources/dhtmlx_hook.js","../sources/ext/restricted_extensions/not_implemented_extension.js","../sources/ext/keyboard_navigation/modals.js","../sources/ext/keyboard_navigation/key_nav_legacy.js","../sources/ext/keyboard_navigation/scheduler_handlers.js","../sources/ext/map_view/gMapAdapter.ts","../sources/ext/map_view/osmMapAdapter.ts","../sources/ext/map_view/mapboxAdapter.ts","../node_modules/rrule/dist/esm/weekday.js","../node_modules/rrule/dist/esm/helpers.js","../node_modules/rrule/dist/esm/dateutil.js","../node_modules/rrule/dist/esm/iterresult.js","../node_modules/rrule/node_modules/tslib/tslib.es6.mjs","../node_modules/rrule/dist/esm/callbackiterresult.js","../node_modules/rrule/dist/esm/types.js","../node_modules/rrule/dist/esm/nlp/i18n.js","../node_modules/rrule/dist/esm/nlp/totext.js","../node_modules/rrule/dist/esm/nlp/parsetext.js","../node_modules/rrule/dist/esm/nlp/index.js","../node_modules/rrule/dist/esm/datetime.js","../node_modules/rrule/dist/esm/parseoptions.js","../node_modules/rrule/dist/esm/parsestring.js","../node_modules/rrule/dist/esm/datewithzone.js","../node_modules/rrule/dist/esm/optionstostring.js","../node_modules/rrule/dist/esm/cache.js","../node_modules/rrule/dist/esm/masks.js","../node_modules/rrule/dist/esm/iterinfo/yearinfo.js","../node_modules/rrule/dist/esm/iterinfo/index.js","../node_modules/rrule/dist/esm/iterinfo/monthinfo.js","../node_modules/rrule/dist/esm/iterinfo/easter.js","../node_modules/rrule/dist/esm/iter/poslist.js","../node_modules/rrule/dist/esm/iter/index.js","../node_modules/rrule/dist/esm/rrule.js","../node_modules/rrule/dist/esm/rrulestr.js","../node_modules/rrule/dist/esm/rruleset.js","../node_modules/rrule/dist/esm/iterset.js","../sources/ext/tooltip/tooltip.ts","../sources/ext/tooltip/tooltipManager.ts","../sources/ext/extensions_gpl.js","../sources/ext/active_links.js","../sources/ext/agenda_legacy_view.js","../sources/ext/agenda.js","../sources/ext/all_timed.js","../sources/ext/collision.js","../sources/ext/container_autoresize.js","../sources/ext/cookie.js","../sources/ext/restricted_extensions/daytimeline.js","../sources/ext/restricted_extensions/drag_between.js","../sources/ext/editors.js","../sources/ext/expand.js","../sources/ext/export_api/index.js","../sources/ext/restricted_extensions/grid_view.js","../sources/ext/html_templates.js","../sources/ext/key_nav.js","../sources/ext/keyboard_navigation/common/keyboard_shortcuts.js","../sources/ext/keyboard_navigation/common/eventhandler.js","../sources/ext/keyboard_navigation/common/trap_modal_focus.js","../sources/ext/keyboard_navigation/marker.js","../sources/ext/keyboard_navigation/elements/scheduler_node.js","../sources/ext/keyboard_navigation/elements/nav_node.js","../sources/ext/keyboard_navigation/elements/header_cell.js","../sources/ext/keyboard_navigation/elements/event.js","../sources/ext/keyboard_navigation/elements/time_slot.js","../sources/ext/keyboard_navigation/elements/minical_button.js","../sources/ext/keyboard_navigation/elements/minical_cell.js","../sources/ext/keyboard_navigation/elements/data_area.js","../sources/ext/keyboard_navigation/core.js","../sources/ext/keyboard_navigation/minical_handlers.js","../sources/ext/layer.js","../sources/ext/limit.js","../sources/ext/map_view/index.ts","../sources/ext/minical.js","../sources/ext/monthheight.js","../sources/ext/restricted_extensions/multisection.js","../sources/ext/multiselect.js","../sources/ext/multisource.js","../sources/ext/mvc.js","../sources/ext/outerdrag.js","../sources/ext/pdf.js","../sources/ext/quick_info.js","../sources/ext/readonly.js","../sources/ext/recurring.js","../sources/ext/recurring_legacy.js","../sources/ext/serialize.js","../sources/ext/restricted_extensions/timeline.js","../sources/ext/tooltip/index.ts","../sources/ext/restricted_extensions/treetimeline.js","../sources/ext/restricted_extensions/units.js","../sources/ext/url.js","../sources/ext/restricted_extensions/week_agenda.js","../sources/ext/wp.js","../sources/ext/year_view.js","../sources/dhtmlxscheduler.gpl.js","../sources/scheduler_factory.js"],"sourcesContent":["\r\n/* eslint-disable no-restricted-globals */\r\nvar globalScope;\r\nif(typeof window !== \"undefined\"){\r\n\tglobalScope = window;\r\n}else{\r\n\tglobalScope = global;\r\n}\r\n/* eslint-enable no-restricted-globals */\r\n\r\nexport default globalScope;","export default function dragHighlightPos(scheduler){\r\n let dndMarkers = [];\r\n let dragStarted = false;\r\n let eventNode = null;\r\n let event = null;\r\n\r\n function isEnabled() { \r\n return scheduler.config.drag_highlight && scheduler.markTimespan;\r\n }\r\n\r\n function checkViewName(viewName){\r\n const viewObj = scheduler.getView(viewName);\r\n if(viewObj){\r\n return viewObj.layout;\r\n }\r\n return viewName;\r\n }\r\n\r\n function checkSectionPropertyName(viewName){\r\n const viewObj = scheduler.getView(viewName);\r\n if(viewObj.y_property){\r\n return viewObj.y_property;\r\n }\r\n if(viewObj.map_to){\r\n return viewObj.map_to;\r\n }\r\n }\r\n\r\n function setRequiredStylesToMarker(eventNode, layout){\r\n switch (layout) {\r\n case \"month\":\r\n eventNode.style.top = \"\";\r\n eventNode.style.left = \"\";\r\n break;\r\n case \"timeline\":\r\n eventNode.style.left = \"\";\r\n eventNode.style.marginLeft = \"1px\";\r\n break;\r\n default:\r\n eventNode.style.top = \"\";\r\n break;\r\n }\r\n }\r\n \r\n function createMarkerConfig(configSettings){\r\n const { event, layout, viewName, sectionId, eventNode } = configSettings;\r\n setRequiredStylesToMarker(eventNode, layout);\r\n const sections = {};\r\n let markerObject = {\r\n start_date: event.start_date,\r\n end_date: event.end_date,\r\n css: \"dhx_scheduler_dnd_marker\",\r\n html: eventNode\r\n };\r\n if (layout == \"timeline\" || layout == \"month\" ){\r\n // we need to set end date less than 24 hours of the views to avoid receiving multiple marktimespans\r\n markerObject = {...markerObject, end_date: scheduler.date.add(event.start_date, 1, 'minute')};\r\n }\r\n if (sectionId){\r\n sections[viewName] = sectionId;\r\n markerObject.sections = sections;\r\n }\r\n return markerObject;\r\n }\r\n\r\n function createViewMarker(settings){\r\n const { layout } = settings;\r\n let markerConfigs;\r\n switch (layout) {\r\n case \"month\": \r\n markerConfigs = getMonthViewMarkers(settings);\r\n break;\r\n case 'timeline':\r\n case 'units':\r\n markerConfigs = getTimelineAndUnitsViewMarkers(settings);\r\n break;\r\n default: \r\n markerConfigs = getColumnViewMarkers(settings);\r\n break;\r\n }\r\n markerConfigs.forEach((cfg) => {\r\n dndMarkers.push(scheduler.markTimespan(cfg));\r\n });\r\n }\r\n\r\n function getColumnViewMarkers(settings){\r\n const {event, layout, viewName, sectionId} = settings;\r\n let columnViewMarkersArray = [];\r\n let eventNodes = scheduler.$container.querySelectorAll(`[${scheduler.config.event_attribute}='${event.id}']:not(.dhx_cal_select_menu):not(.dhx_drag_marker)`);\r\n if(eventNodes){\r\n for (let i = 0; i < eventNodes.length; i++) {\r\n let eventNodeClone = eventNodes[i].cloneNode(true);\r\n let startDate = new Date(+eventNodeClone.getAttribute(\"data-bar-start\"));\r\n let endDate = new Date(+eventNodeClone.getAttribute(\"data-bar-end\"));\r\n let dates = {start_date: startDate, end_date: endDate};\r\n const configSettings = {\r\n event: dates, \r\n layout, \r\n viewName, \r\n sectionId, \r\n eventNode:eventNodeClone\r\n };\r\n columnViewMarkersArray.push(createMarkerConfig(configSettings));\r\n }\t\r\n }\r\n return columnViewMarkersArray;\r\n }\r\n\r\n function getMonthViewMarkers(settings){\r\n let monthViewMarkersArray = [];\r\n const {event, layout, viewName, sectionId} = settings;\r\n const weekDates = [];\r\n let currDate = new Date(event.start_date);\r\n while(currDate.valueOf() < event.end_date.valueOf()){\r\n let obj = {start_date: currDate};\r\n weekDates.push(obj);\r\n currDate = scheduler.date.week_start(scheduler.date.add(currDate, 1, \"week\"));\r\n }\r\n let cells = scheduler.$container.querySelectorAll(`[${scheduler.config.event_attribute}='${event.id}']`);\r\n for (let i = 0; i < cells.length; i++) {\r\n const configSettings = {\r\n event: weekDates[i], \r\n layout, \r\n viewName, \r\n sectionId, \r\n eventNode: cells[i].cloneNode(true)\r\n };\r\n monthViewMarkersArray.push(createMarkerConfig(configSettings));\r\n }\r\n return monthViewMarkersArray;\r\n }\r\n\r\n function getTimelineAndUnitsViewMarkers(settings){\r\n let unitMarkersArray = [];\r\n const {event, layout, viewName, eventNode} = settings;\r\n let sectionPropertyName = checkSectionPropertyName(viewName);\r\n if (sectionPropertyName){\r\n const sections = String(event[sectionPropertyName]).split(scheduler.config.section_delimiter);\r\n const formatedSections = sections.map(element => String(element));\r\n const elems = [];\r\n for (let i = 0; i < formatedSections.length; i++) {\r\n elems[i] = eventNode.cloneNode(true);\r\n const configSettings = {\r\n event, \r\n layout, \r\n viewName, \r\n sectionId: formatedSections[i],\r\n eventNode: elems[i]\r\n };\r\n unitMarkersArray.push(createMarkerConfig(configSettings));\r\n }\r\n }\r\n return unitMarkersArray;\r\n }\r\n \r\n scheduler.attachEvent(\"onBeforeDrag\", function (id, mode, e){\r\n if (isEnabled()) {\r\n dragStarted = true;\r\n event = scheduler.getEvent(id);\r\n eventNode = e.target.closest(`[${scheduler.config.event_attribute}]`);\r\n const viewName = scheduler.getState().mode;\r\n const layout = checkViewName(viewName);\r\n // to avoid incorrect eventNode and marker creation when scheduler.config.cascade_event_display included\r\n if (layout == \"units\" && scheduler.config.cascade_event_display ) {\r\n scheduler.unselect(id);\r\n eventNode = e.target.closest(`[${scheduler.config.event_attribute}]`);\r\n }\r\n }\r\n return true;\r\n });\r\n\r\n scheduler.attachEvent(\"onEventDrag\", function (id, mode, e){\r\n if(dragStarted && isEnabled()){\r\n dragStarted = false;// insert element only once after dnd start\r\n const viewName = scheduler.getState().mode;\r\n const layout = checkViewName(viewName);\r\n const sectionId = scheduler.getActionData(e).section;\r\n if (event) {\r\n const settings = {\r\n event, \r\n layout, \r\n viewName, \r\n sectionId, \r\n eventNode\r\n };\r\n createViewMarker(settings);\r\n }\r\n }\r\n });\r\n\r\n scheduler.attachEvent(\"onDragEnd\", function(id, mode, e){\r\n for (let i = 0; i < dndMarkers.length; i++) {\r\n scheduler.unmarkTimespan(dndMarkers[i]);\r\n }\r\n dndMarkers = [];\r\n eventNode = null;\r\n event = null;\r\n });\r\n}","export default function limitPlugin(scheduler){\r\n\r\n\r\n\tscheduler.config.mark_now = true;\r\n\tscheduler.config.display_marked_timespans = true;\r\n\tscheduler.config.overwrite_marked_timespans = true;\r\n\r\n\r\n\tvar dhx_time_block = \"dhx_time_block\";\r\n\tvar default_timespan_type = \"default\";\r\n\tvar fix_options = function(options, days, zones) {\r\n\t\tif (days instanceof Date && zones instanceof Date) {\r\n\t\t\toptions.start_date = days;\r\n\t\t\toptions.end_date = zones;\r\n\t\t} else {\r\n\t\t\toptions.days = days;\r\n\t\t\toptions.zones = zones;\r\n\t\t}\r\n\t\treturn options;\r\n\t};\r\n\tvar get_resulting_options = function(days, zones, sections) {\r\n\t\tvar options = (typeof days == \"object\") ? days : { days: days };\r\n\t\toptions.type = dhx_time_block;\r\n\t\toptions.css = \"\";\r\n\t\tif (zones) {\r\n\t\t\tif (sections)\r\n\t\t\t\toptions.sections = sections;\r\n\t\t\toptions = fix_options(options, days, zones);\r\n\t\t}\r\n\t\treturn options;\r\n\t};\r\n\tscheduler.blockTime = function(days, zones, sections){\r\n\t\tvar options = get_resulting_options(days, zones, sections);\r\n\t\treturn scheduler.addMarkedTimespan(options);\r\n\t};\r\n\tscheduler.unblockTime = function(days, zones, sections) {\r\n\t\tzones = zones || \"fullday\";\r\n\t\tvar options = get_resulting_options(days, zones, sections);\r\n\t\treturn scheduler.deleteMarkedTimespan(options);\r\n\t};\r\n\r\n\tscheduler.checkInMarkedTimespan = function(ev, timespan_type, on_overlap){\r\n\t\ttimespan_type = timespan_type || default_timespan_type;\r\n\r\n\t\tvar res = true;\r\n\t\tvar temp_start_date = new Date(ev.start_date.valueOf());\r\n\t\tvar temp_end_date = scheduler.date.add(temp_start_date, 1, \"day\");\r\n\t\tvar timespans = scheduler._marked_timespans;\r\n\t\tfor (; temp_start_date < ev.end_date; temp_start_date = scheduler.date.date_part(temp_end_date), temp_end_date = scheduler.date.add(temp_start_date, 1, \"day\") ) {\r\n\t\t\tvar day_value = +scheduler.date.date_part( new Date(temp_start_date) ); // the first part of event not necessarily contains only date part\r\n\t\t\tvar day_index = temp_start_date.getDay();\r\n\r\n\t\t\tvar zones = getZones(ev, timespans, day_index, day_value, timespan_type);\r\n\t\t\tif (zones){\r\n\t\t\t\tfor (var i = 0; i < zones.length; i+=2) {\r\n\r\n\t\t\t\t\t// they may change for new event if it passes limit zone\r\n\t\t\t\t\tvar eventStart = scheduler._get_zone_minutes(temp_start_date);\r\n\t\t\t\t\tvar eventEnd = ( ev.end_date>temp_end_date || ev.end_date.getDate() != temp_start_date.getDate() ) ? 1440 : scheduler._get_zone_minutes(ev.end_date);\r\n\r\n\t\t\t\t\tvar markerStart = zones[i];\r\n\t\t\t\t\tvar markerEnd = zones[i+1];\r\n\t\t\t\t\tif (markerStarteventStart) {\r\n\t\t\t\t\t\tif(typeof on_overlap == \"function\"){\r\n\t\t\t\t\t\t\t//handler allows to cancel overlapping\r\n\t\t\t\t\t\t\t//actually needed only to keep default behavior of limits\r\n\t\t\t\t\t\t\tres = on_overlap(ev, eventStart, eventEnd, markerStart, markerEnd);//event object, event start/end minutes in 'zones' format, zone start/end minutes\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tres = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(!res)\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn !res;\r\n\t};\r\n\tscheduler.checkLimitViolation = function(event){\r\n\t\tif(!event)\r\n\t\t\treturn true;\r\n\t\tif (!scheduler.config.check_limits)\r\n\t\t\treturn true;\r\n\t\tvar s = scheduler;\r\n\t\tvar c = s.config;\r\n\t\tvar evs = [];\r\n\t\tif ((event.rec_type && event._end_date) || (event.rrule)) {\r\n\t\t\tconst seriesEnd = event._end_date || event.end_date;\r\n\t\t\t// GS-2482 need to take into account that a part of recurring events might be outside the limits\r\n\t\t\tif ((c.limit_start && c.limit_end)) {\r\n\t\t\t\tvar recEventInLimits = seriesEnd.valueOf() >= c.limit_start.valueOf() && event.start_date.valueOf() <= c.limit_end.valueOf();\r\n\t\t\t\treturn recEventInLimits;\r\n\t\t\t} else return true;\r\n\t\t} else {\r\n\t\t\tevs = [event];\r\n\t\t}\r\n\r\n\t\tvar complete_res = true;\r\n\t\tfor (var p=0; p= c.limit_start.valueOf() && ev.end_date.valueOf() <= c.limit_end.valueOf()) : true;\r\n\t\t\tif (res){\r\n\t\t\t\tres = !scheduler.checkInMarkedTimespan(ev, dhx_time_block, function(event, eventStart, eventEnd, markerStart, markerEnd){\r\n\t\t\t\t\t//try crop event to allow placing\r\n\t\t\t\t\tvar allow = true;\r\n\t\t\t\t\tif (eventStart<=markerEnd && eventStart >= markerStart){\r\n\t\t\t\t\t\tif (markerEnd == 24*60 || eventEnd <= markerEnd){\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(event._timed && s._drag_id && s._drag_mode == \"new-size\"){\r\n\t\t\t\t\t\t\tevent.start_date.setHours(0);\r\n\t\t\t\t\t\t\tevent.start_date.setMinutes(markerEnd);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ((eventEnd >= markerStart && eventEnd <= markerEnd) || (eventStart < markerStart && eventEnd > markerEnd)){\r\n\t\t\t\t\t\tif(event._timed && s._drag_id && s._drag_mode == \"new-size\"){\r\n\t\t\t\t\t\t\tevent.end_date.setHours(0);\r\n\t\t\t\t\t\t\tevent.end_date.setMinutes(markerStart);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn allow;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\tif (!res) {\r\n\t\t\t\tres = (s.checkEvent(\"onLimitViolation\")) ? s.callEvent(\"onLimitViolation\",[ev.id, ev]) : res;\r\n\t\t\t}\r\n\t\t\tcomplete_res = complete_res && res;\r\n\t\t}\r\n\t\tif(!complete_res){\r\n\t\t\ts._drag_id = null;\r\n\t\t\ts._drag_mode = null;\r\n\t\t}\r\n\t\treturn complete_res;\r\n\r\n\r\n\t};\r\n\tscheduler._get_blocked_zones = function(timespans, property, day_index, day_value, timespan_type){\r\n\t\tvar zones =[];\r\n\t\tif (timespans && timespans[property]) {\r\n\t\t\tvar timeline_zones = timespans[property];\r\n\t\t\tvar blocked_timeline_zones = this._get_relevant_blocked_zones(day_index, day_value, timeline_zones, timespan_type);\r\n\t\t\tfor (var i=0; i this._min_date && now.getHours() >= cfg.first_hour && now.getHours() 1) {\r\n\t\t\t\t\tif(view.size && view.options.length){\r\n\t\t\t\t\t\tday_index = ((view.position+ day_index) / view.options.length) * view.size;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstart_index = day_index;\r\n\t\t\t\t\tend_index = day_index + units_l;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tstart_index = 0;\r\n\t\t\t\t\tend_index = start_index + units_l;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar r_divs = [];\r\n\r\n\t\t\t\tfor (var i = start_index; i < end_index; i++) {\r\n\t\t\t\t\tvar t_day = i; // as each unit is actually considered +1 day\r\n\t\t\t\t\toptions.days = t_day;\r\n\t\t\t\t\tvar t_div = scheduler._render_marked_timespan(options, null, t_day)[0];\r\n\t\t\t\t\tr_divs.push(t_div);\r\n\t\t\t\t}\r\n\t\t\t\treturn r_divs;\r\n\t\t\t} else { // day/week views\r\n\t\t\t\toptions.days = day_index;\r\n\t\t\t\treturn scheduler._render_marked_timespan(options, null, day_index);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\toptions.days = +scheduler.date.date_part(now);\r\n\t\t\t\treturn scheduler._render_marked_timespan(options, null, null);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tscheduler._remove_mark_now = function() {\r\n\t\tvar dhx_now_time = 'dhx_now_time';\r\n\t\tvar els = this._els[dhx_now_time];\r\n\t\tfor (var i=0; i config.start_date) || (config.days !== undefined && config.zones)) && !config.type )\r\n\t\t\treturn r_configs; // incorrect config was provided\r\n\r\n\t\tvar min = 0;\r\n\t\tvar max = 24*60;\r\n\t\tif (config.zones == \"fullday\")\r\n\t\t\tconfig.zones = [min, max];\r\n\t\tif (config.zones && config.invert_zones) {\r\n\t\t\tconfig.zones = scheduler.invertZones(config.zones);\r\n\t\t}\r\n\r\n\t\tconfig.id = scheduler.uid();\r\n\t\tconfig.css = config.css||\"\";\r\n\t\tconfig.type = config.type||default_timespan_type;\r\n\r\n\t\tvar sections = config.sections;\r\n\t\tif (sections) {\r\n\t\t\tfor (var view_key in sections) {\r\n\t\t\t\tif (sections.hasOwnProperty(view_key)) {\r\n\t\t\t\t\tvar ids = sections[view_key];\r\n\t\t\t\t\tif (!(ids instanceof Array))\r\n\t\t\t\t\t\tids = [ids];\r\n\t\t\t\t\tfor (var i=0; i t_sd) ? scheduler._get_zone_minutes(start_date) : min;\r\n\t\t\t\t\tvar zone_end = ( end_date > t_ed || end_date.getDate() != t_sd.getDate() ) ? max : scheduler._get_zone_minutes(end_date);\r\n\t\t\t\t\tt_config.zones = [zone_start, zone_end];\r\n\t\t\t\t\tr_configs.push(t_config);\r\n\r\n\t\t\t\t\tt_sd = t_ed;\r\n\t\t\t\t\tt_ed = scheduler.date.add(t_ed, 1, \"day\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (c_config.days instanceof Date)\r\n\t\t\t\t\tc_config.days = (scheduler.date.date_part(c_config.days)).valueOf();\r\n\t\t\t\tc_config.zones = config.zones.slice();\r\n\t\t\t\tr_configs.push(c_config);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn r_configs;\r\n\t};\r\n\tscheduler._get_dates_by_index = function(index, start, end) {\r\n\t\tvar dates = [];\r\n\t\tstart = scheduler.date.date_part(new Date(start||scheduler._min_date));\r\n\t\tend = new Date(end||scheduler._max_date);\r\n\t\tvar start_day = start.getDay();\r\n\t\tvar delta = (index-start_day >= 0) ? (index-start_day) : (7-start.getDay()+index);\r\n\t\tvar t_date = scheduler.date.add(start, delta, \"day\");\r\n\t\tfor (; t_date < end; t_date = scheduler.date.add(t_date, 1, \"week\")) {\r\n\t\t\tdates.push(t_date);\r\n\t\t}\r\n\t\treturn dates;\r\n\t};\r\n\tscheduler._get_css_classes_by_config = function(config) {\r\n\t\tvar css_classes = [];\r\n\t\tif (config.type == dhx_time_block) {\r\n\t\t\tcss_classes.push(dhx_time_block);\r\n\t\t\tif (config.css)\r\n\t\t\t\tcss_classes.push(dhx_time_block+\"_reset\");\r\n\t\t}\r\n\t\tcss_classes.push(\"dhx_marked_timespan\", config.css);\r\n\t\treturn css_classes.join(\" \");\r\n\t};\r\n\tscheduler._get_block_by_config = function(config) {\r\n\t\tvar block = document.createElement(\"div\");\r\n\t\tif (config.html) {\r\n\t\t\tif (typeof config.html == \"string\")\r\n\t\t\t\tblock.innerHTML = config.html;\r\n\t\t\telse\r\n\t\t\t\tblock.appendChild(config.html);\r\n\t\t}\r\n\t\treturn block;\r\n\t};\r\n\tscheduler._render_marked_timespan = function(options, area, day) {\r\n\t\tvar blocks = []; // resulting block which will be rendered and returned\r\n\t\tvar c = scheduler.config;\r\n\t\tvar min_date = this._min_date;\r\n\t\tvar max_date = this._max_date;\r\n\t\tvar day_value = false; // if timespan for specific date should be displayed\r\n\r\n\t\tif (!c.display_marked_timespans)\r\n\t\t\treturn blocks;\r\n\r\n\t\t// in case of markTimespan\r\n\t\tif (!day && day !== 0) {\r\n\t\t\tif (options.days < 7)\r\n\t\t\t\tday = options.days;\r\n\t\t\telse {\r\n\t\t\t\tvar date_to_display = new Date(options.days);\r\n\t\t\t\tday_value = +date_to_display;\r\n\r\n\t\t\t\t// in case of markTimespan date could be not in the viewing range, need to return\r\n\t\t\t\tif ( !(+max_date > +date_to_display && +min_date <= +date_to_display) )\r\n\t\t\t\t\treturn blocks;\r\n\r\n\t\t\t\tday = date_to_display.getDay();\r\n\t\t\t}\r\n\r\n\t\t\t// convert day default index (Sun - 0, Sat - 6) to index of hourscales (depends on week_start and config.start_on_monday)\r\n\t\t\tvar min_day = min_date.getDay();\r\n\t\t\tif (min_day > day) {\r\n\t\t\t\tday = 7 - (min_day-day);\r\n\t\t\t} else {\r\n\t\t\t\tday = day - min_day;\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar zones = options.zones;\r\n\t\tvar css_classes = scheduler._get_css_classes_by_config(options);\r\n\r\n\t\tif (scheduler._table_view && scheduler._mode == \"month\") {\r\n\t\t\tvar areas = [];\r\n\t\t\tvar days = [];\r\n\r\n\r\n\t\t\tif (!area) {\r\n\t\t\t\tdays = (day_value) ? [day_value] : scheduler._get_dates_by_index(day);\r\n\t\t\t\tfor (var i=0; i < days.length; i++) {\r\n\t\t\t\t\tareas.push( this._scales[days[i]] );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tareas.push(area);\r\n\t\t\t\tdays.push(day);\r\n\t\t\t}\r\n\r\n\t\t\tfor (var i=0; i < areas.length; i++) {\r\n\t\t\t\tarea = areas[i];\r\n\t\t\t\tday = days[i];\r\n\r\n\t\t\t\tvar sday = this.locate_holder_day(day, false) % this._cols.length;\r\n\r\n\t\t\t\tif(this._ignores[sday]) continue;\r\n\r\n\t\t\t\tvar block_proto = scheduler._get_block_by_config(options);\r\n\t\t\t\tblock_proto.className = css_classes;\r\n\t\t\t\tblock_proto.style.top = \"0px\";\r\n\t\t\t\tblock_proto.style.height = \"100%\";\r\n\t\t\t\t\r\n\t\t\t\tfor (var k=0; k < zones.length; k+=2) {\r\n\t\t\t\t\tvar start = zones[i];\r\n\t\t\t\t\tvar end = zones[i+1];\r\n\t\t\t\t\tif (end <= start)\r\n\t\t\t\t\t\treturn [];\r\n\r\n\t\t\t\t\tvar block = block_proto.cloneNode(true);\r\n\r\n\t\t\t\t\tblock.style.left = \"0px\";\r\n\t\t\t\t\tblock.style.width = \"100%\";\r\n\r\n\t\t\t\t\tarea.appendChild(block);\r\n\t\t\t\t\tblocks.push(block);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvar index = day;\r\n\r\n\t\t\tif(this._ignores[this.locate_holder_day(day, false)]) return blocks;\r\n\r\n\t\t\tif (this._props && this._props[this._mode] && options.sections && options.sections[this._mode]) {\r\n\t\t\t\tvar view = this._props[this._mode];\r\n\t\t\t\tindex = view.order[options.sections[this._mode]];\r\n\r\n\t\t\t\tvar inner_index = view.order[options.sections[this._mode]];\r\n\t\t\t\tif(!(view.days > 1)){\r\n\t\t\t\t\tindex = inner_index;\r\n\t\t\t\t\tif (view.size && (index > view.position+view.size)) {\r\n\t\t\t\t\t\tindex = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar units_l = view.size || view.options.length;\r\n\t\t\t\t\tindex = index*units_l + inner_index;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tarea = area ? area : scheduler.locate_holder(index);\r\n\r\n\t\t\tfor (var i = 0; i < zones.length; i+=2){\r\n\t\t\t\tvar start = Math.max(zones[i], c.first_hour*60);\r\n\t\t\t\tvar end = Math.min(zones[i+1], c.last_hour*60);\r\n\t\t\t\tif (end <= start) {\r\n\t\t\t\t\tif (i+2 < zones.length)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\treturn [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar block = scheduler._get_block_by_config(options);\r\n\t\t\t\tblock.className = css_classes;\r\n\r\n\t\t\t\t// +1 for working with section which really takes up whole height (as % would be == 0)\r\n\t\t\t\tvar all_hours_height = this.config.hour_size_px*24 + 1;\r\n\t\t\t\tvar hour_ms = 60*60*1000;\r\n\t\t\t\tblock.style.top = (Math.round((start*60*1000-this.config.first_hour*hour_ms)*this.config.hour_size_px/hour_ms) % all_hours_height) + \"px\";\r\n\t\t\t\tblock.style.height = Math.max((Math.round(((end-start)*60*1000)*this.config.hour_size_px/hour_ms)) % all_hours_height, 1)+\"px\";\r\n\r\n\t\t\t\tarea.appendChild(block);\r\n\t\t\t\tblocks.push(block);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn blocks;\r\n\t};\r\n\r\n\tscheduler._mark_timespans = function(){\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\t\tvar divs = [];\r\n\t\tif (scheduler._table_view && scheduler._mode == \"month\"){\r\n\t\t\tfor (var day in this._scales) {\r\n\t\t\t\tvar date = new Date(+day);\r\n\t\t\t\tdivs.push.apply(divs, scheduler._on_scale_add_marker(this._scales[day],date));\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\t//manually trigger rendering of configs for each column\r\n\t\t\tvar date = new Date(scheduler._min_date);\r\n\t\t\tfor (var i = 0, len = data.childNodes.length; i < len; i++) {\r\n\t\t\t\tvar area = data.childNodes[i];\r\n\t\t\t\tif (area.firstChild && scheduler._getClassName(area.firstChild).indexOf(\"dhx_scale_hour\") > -1) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdivs.push.apply(divs, scheduler._on_scale_add_marker(area, date));\r\n\t\t\t\tdate = scheduler.date.add(date, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn divs;\r\n\t};\r\n\r\n\t// just marks timespan, will be cleaned after refresh\r\n\tscheduler.markTimespan = function(configuration) {\r\n\t\tif(!this._els){\r\n\t\t\tthrow new Error(\"`scheduler.markTimespan` can't be used before scheduler initialization. Place `scheduler.markTimespan` call after `scheduler.init`.\");\r\n\t\t}\r\n\r\n\r\n\t\tvar rebuild_els = false;\r\n\t\tif(!this._els[\"dhx_cal_data\"]){\r\n\t\t\tscheduler.get_elements();\r\n\t\t\trebuild_els = true;\r\n\t\t}\r\n\r\n\r\n\t\t// backup regular marked timespans\r\n\t\tvar timespans_ids = scheduler._marked_timespans_ids,\r\n\t\t\ttimespan_types = scheduler._marked_timespans_types,\r\n\t\t\ttimespans = scheduler._marked_timespans;\r\n\r\n\t\tscheduler.deleteMarkedTimespan();\r\n\r\n\t\t//add block to configs\r\n\t\tscheduler.addMarkedTimespan(configuration);\r\n\r\n\t\tvar divs = scheduler._mark_timespans();\r\n\r\n\t\tif(rebuild_els)\r\n\t\t\tscheduler._els = [];\r\n\r\n\t\t// restore timespan config\r\n\t\tscheduler._marked_timespans_ids = timespans_ids;\r\n\t\tscheduler._marked_timespans_types = timespan_types;\r\n\t\tscheduler._marked_timespans = timespans;\r\n\r\n\t\treturn divs;\r\n\t};\r\n\tscheduler.unmarkTimespan = function(divs) {\r\n\t\tif (!divs)\r\n\t\t\treturn;\r\n\t\tfor (var i=0; i c_zone_end && zone_start <= c_zone_end) || (zone_start < c_zone_start && zone_end >= c_zone_start)) {\r\n\t\t\t\t\tresulting_zones[i] = Math.min(c_zone_start, zone_start);\r\n\t\t\t\t\tresulting_zones[i+1] = Math.max(c_zone_end, zone_end);\r\n\t\t\t\t\ti -= 2;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!isLast) // do nothing, maybe next current zone will match or will be last\r\n\t\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\t\tvar offset = (c_zone_start > zone_start)?0:2;\r\n\t\t\t\t\tresulting_zones.splice(i+offset, 0, zone_start, zone_end); // last current zone, need to add another\r\n\t\t\t\t}\r\n\t\t\t\tzones.splice(k--,2); // zone was merged or added, need to exclude it\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn resulting_zones;\r\n\t};\r\n\tscheduler._subtract_timespan_zones = function(current_zones, zones) {\r\n\t\tvar resulting_zones = current_zones.slice();\r\n\t\tfor (var i=0; i c_zone_start && zone_start < c_zone_end) {\r\n\t\t\t\t\tvar is_modified = false;\r\n\t\t\t\t\tif (c_zone_start >= zone_start && c_zone_end <= zone_end) {\r\n\t\t\t\t\t\tresulting_zones.splice(i, 2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (c_zone_start < zone_start) {\r\n\t\t\t\t\t\tresulting_zones.splice(i, 2, c_zone_start, zone_start);\r\n\t\t\t\t\t\tis_modified = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (c_zone_end > zone_end) {\r\n\t\t\t\t\t\tresulting_zones.splice( (is_modified)?(i+2):i, (is_modified)?0:2, zone_end, c_zone_end);\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti -= 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn resulting_zones;\r\n\t};\r\n\tscheduler.invertZones = function(zones) {\r\n\t\treturn scheduler._subtract_timespan_zones([0, 1440], zones.slice());\r\n\t};\r\n\tscheduler._delete_marked_timespan_by_id = function(id) {\r\n\t\tvar configs = scheduler._marked_timespans_ids[id];\r\n\t\tif (configs) {\r\n\t\t\tfor (var i=0; i 1)){\r\n\t\t\t\tday = scheduler.date.date_part(new Date(this._date)); // for units view actually only 1 day is displayed yet the day variable will change, need to use this._date for all calls\r\n\t\t\t}else{\r\n\t\t\t\tvar dx = 24*60*60*1000;\r\n\t\t\t\tvar day_ind = Math.round((day - scheduler._min_date)/dx);\r\n\t\t\t\tvar unitsPerDay = view.size || units.length;\r\n\t\t\t\tday = scheduler.date.add(scheduler._min_date, Math.floor(day_ind/unitsPerDay), \"day\"); // to the \"same\" day for all sections\r\n\t\t\t\tday = scheduler.date.date_part(day);\r\n\t\t\t}\r\n\t\t\tday_index = day.getDay();\r\n\t\t\tday_value = day.valueOf();\r\n\r\n\t\t\tif (timespans[mode] && timespans[mode][unit.key]) {\r\n\t\t\t\tvar unit_zones = timespans[mode][unit.key];\r\n\t\t\t\tvar unit_types = scheduler._get_types_to_render(unit_zones[day_index], unit_zones[day_value]);\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(unit_types));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar global_data = timespans[\"global\"];\r\n\r\n\t\tif(scheduler.config.overwrite_marked_timespans){\r\n\t\t\tvar day_types = global_data[day_value]||global_data[day_index];\r\n\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(day_types));\r\n\t\t} else {\r\n\t\t\tif(global_data[day_value]){\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(global_data[day_value]));\r\n\t\t\t}\r\n\t\t\tif(global_data[day_index]){\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(global_data[day_index]));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (var i=0; i {\r\n\t\t\tif(date){\r\n\t\t\t\tcalls.setModeDate.date = date;\r\n\t\t\t}\r\n\t\t\tif(mode){\r\n\t\t\t\tcalls.setModeDate.mode = mode;\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tvar methods = {\r\n\t\t\trender:(date, mode) => {calls.needRender = true; rememberModeDate(date, mode);},\r\n\t\t\tsetCurrentView:(date, mode) => {calls.needRender = true; rememberModeDate(date, mode);},\r\n\t\t\tupdateView:(date, mode) => {calls.needUpdateView = true; rememberModeDate(date, mode);},\r\n\t\t\trender_data:() => calls.needRender = true,\r\n\t\t\trender_view_data:(evs) => { \r\n\t\t\t\tif(evs && evs.length){\r\n\t\t\t\t\tevs.forEach((e) => calls.repaintEvents[e.id] = true);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcalls.needRender = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tdisableMethods.call(this, methods);\r\n\r\n\t\tisActive = true;\r\n\t\tthis.callEvent(\"onBeforeBatchUpdate\", []);\r\n\r\n\t\tbatchUpdatePayload(callback);\r\n\r\n\t\tthis.callEvent(\"onAfterBatchUpdate\", []);\r\n\r\n\t\trestoreMethods.call(this);\r\n\r\n\t\tisActive = false;\r\n\t\tif(!noRedraw){\r\n\t\t\tif(calls.needRender){\r\n\t\t\t\tscheduler.render(calls.setModeDate.date, calls.setModeDate.mode);\r\n\t\t\t}else if(calls.needUpdateView){\r\n\t\t\t\tscheduler.updateView(calls.setModeDate.date, calls.setModeDate.mode);\r\n\t\t\t}else{\r\n\t\t\t\tfor(const i in calls.repaintEvents){\r\n\t\t\t\t\tscheduler.updateEvent(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (call_dp) {\r\n\t\t\tthis._dp.setUpdateMode(dp_mode);\r\n\t\t\tthis._dp.sendData();\r\n\t\t}\r\n\t};\r\n}\r\n\r\nexport default function(scheduler){\r\n\tscheduler.batchUpdate = createMethod(scheduler);\r\n}","import dragHighlightPos from \"./drag_highlight_pos\";\r\nimport undoDelete from \"./undo_delete\";\r\nimport limit from \"./limit\";\r\nimport batchUpdate from \"./batch_update\";\r\n\r\nexport default function initPlugins(scheduler){\r\n undoDelete(scheduler);\r\n dragHighlightPos(scheduler);\r\n limit(scheduler);\r\n batchUpdate(scheduler);\r\n}","export default function undoDelete(scheduler) {\r\n\tscheduler.attachEvent(\"onEventDeleted\", function (id, ev) {\r\n\t\tlet deletedEvent = scheduler.copy(ev);\r\n\t\tif (scheduler.config.undo_deleted && !scheduler.getState().new_event) {\r\n\t\t\tscheduler.message({\r\n\t\t\t\ttext: `
\r\n Event deleted\r\n \r\n
`,\r\n\t\t\t\texpire: 10000,\r\n\t\t\t\ttype: \"popup_after_delete\",\r\n\t\t\t\tcallback: function (e) {\r\n\t\t\t\t\tlet undoBtn = e.target.closest(\r\n\t\t\t\t\t\t`[data-deleted-event-id=\"${ev.id}\"]`\r\n\t\t\t\t\t);\r\n\t\t\t\t\tif (undoBtn) {\r\n\t\t\t\t\t\tscheduler.addEvent(deletedEvent);\r\n\t\t\t\t\t\tscheduler.render();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t});\r\n}\r\n","var uidSeed = Date.now();\r\nfunction uid () {\r\n\treturn uidSeed++;\r\n}\r\n\r\n// iframe-safe array type check instead of using instanceof\r\nfunction isArray(obj){\r\n\tif(Array.isArray){\r\n\t\treturn Array.isArray(obj);\r\n\t}else{\r\n\t\t// close enough\r\n\t\treturn (obj && obj.length !== undefined && obj.pop && obj.push);\r\n\t}\r\n}\r\n\r\n// non-primitive string object, e.g. new String(\"abc\")\r\nfunction isStringObject(obj){\r\n\treturn obj && typeof obj === \"object\" && \r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function String() { [native code] }\";\r\n}\r\n\r\n// non-primitive number object, e.g. new Number(5)\r\nfunction isNumberObject(obj){\r\n\treturn obj && typeof obj === \"object\" && \r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function Number() { [native code] }\";\r\n}\r\n\r\n// non-primitive number object, e.g. new Boolean(true)\r\nfunction isBooleanObject(obj){\r\n\treturn obj && typeof obj === \"object\" &&\r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function Boolean() { [native code] }\";\r\n}\r\n\r\nfunction isDate(obj) {\r\n\tif (obj && typeof obj === \"object\") {\r\n\t\treturn !!(obj.getFullYear && obj.getMonth && obj.getDate);\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\nfunction defined(obj) {\r\n\treturn typeof(obj) != \"undefined\";\r\n}\r\n\r\nfunction delay (callback, timeout){\r\n\tvar timer;\r\n\r\n\tvar result = function() {\r\n\t\tresult.$cancelTimeout();\r\n\t\tresult.$pending = true;\r\n\t\tvar args = Array.prototype.slice.call(arguments);\r\n\t\ttimer = setTimeout(function(){\r\n\t\t\tcallback.apply(this, args);\r\n\t\t\tresult.$pending = false;\r\n\t\t}, timeout);\r\n\t};\r\n\r\n\tresult.$pending = false;\r\n\tresult.$cancelTimeout = function(){\r\n\t\tclearTimeout(timer);\r\n\t\tresult.$pending = false;\r\n\t};\r\n\tresult.$execute = function(){\r\n\t\tvar args = Array.prototype.slice.call(arguments);\r\n\t\tcallback.apply(this, args);\r\n\t\tresult.$cancelTimeout();\r\n\t};\r\n\r\n\treturn result;\r\n}\r\n\r\nexport default {\r\n\tuid: uid,\r\n\tmixin: function mixin (target, source, force){\r\n\t\tfor (var f in source)\r\n\t\t\tif (((target[f] === undefined) || force)) target[f]=source[f];\r\n\t\treturn target;\r\n\t},\r\n\tcopy: function copy(object) {\r\n\t\tvar i, result; // iterator, types array, result\r\n\t\r\n\t\tif (object && typeof object == \"object\") {\r\n\t\r\n\t\t\tswitch (true){\r\n\t\t\t\tcase (isDate(object)):\r\n\t\t\t\t\tresult = new Date(object);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isArray(object)):\r\n\t\t\t\t\tresult = new Array(object.length);\r\n\t\t\t\t\tfor(i = 0; i < object.length; i++){\r\n\t\t\t\t\t\tresult[i] = copy(object[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isStringObject(object)):\r\n\t\t\t\t\tresult = new String(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isNumberObject(object)):\r\n\t\t\t\t\tresult = new Number(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isBooleanObject(object)):\r\n\t\t\t\t\tresult = new Boolean(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tresult = {};\r\n\t\t\t\t\tfor (i in object) {\r\n\t\t\t\t\t\tconst varType = typeof object[i];\r\n\r\n\t\t\t\t\t\tif (varType === \"string\" || varType === \"number\" || varType === \"boolean\" ) {\r\n\t\t\t\t\t\t\tresult[i] = object[i];\r\n\t\t\t\t\t\t} else if(isDate(object[i])){\r\n\t\t\t\t\t\t\tresult[i] = new Date(object[i]);\r\n\t\t\t\t\t\t}else if (Object.prototype.hasOwnProperty.apply(object, [i]))\r\n\t\t\t\t\t\t\tresult[i] = copy(object[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result || object;\r\n\t},\r\n\tdefined,\r\n\tisDate,\r\n\tdelay\r\n};\r\n","export default function extend(scheduler) {\r\n\r\nfunction div(className){\r\n\tvar element = document.createElement(\"div\");\r\n\tvar classes = (className || \"\").split(\" \");\r\n\tclasses.forEach(function(cssClass){\r\n\t\telement.classList.add(cssClass);\r\n\t});\r\n\treturn element;\r\n}\r\nvar itemTypes = {\r\n\trows_container: function(){\r\n\t\treturn div(\"dhx_cal_navbar_rows_container\");\r\n\t},\r\n\trow: function(){\r\n\t\treturn div(\"dhx_cal_navbar_row\");\r\n\t},\r\n\tview: function (config) {\r\n\t\tvar element = div(\"dhx_cal_tab\");\r\n\t\telement.setAttribute(\"name\", config.view + \"_tab\");\r\n\t\telement.setAttribute(\"data-tab\", config.view);\r\n\t\t// element.setAttribute(\"data-viewname\", config.view); // FIXME: need to remove? not used anywhere\r\n\t\tif(scheduler.config.fix_tab_position){\r\n\t\t\tif(config.$firstTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_first\");\r\n\t\t\t}else if(config.$lastTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_last\");\r\n\t\t\t} else if(config.view !== \"week\") {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_standalone\");\r\n\t\t\t}\r\n\r\n\t\t\tif(config.$segmentedTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn element;\r\n\t},\r\n\tdate: function () {\r\n\t\treturn div(\"dhx_cal_date\");\r\n\t},\r\n\tbutton: function (config) {\r\n\t\treturn div(\"dhx_cal_nav_button dhx_cal_nav_button_custom dhx_cal_tab\");\r\n\t},\r\n\tbuiltInButton: function (config){\r\n\t\treturn div(\"dhx_cal_\" + config.view + \"_button dhx_cal_nav_button\");\r\n\t},\r\n\tspacer: function () {\r\n\t\treturn div(\"dhx_cal_line_spacer\");\r\n\t},\r\n\tminicalendarButton: function(config){\r\n\t\tvar minicalendarDiv = div('dhx_minical_icon');\r\n\t\tif(!config.click && !minicalendarDiv.$_eventAttached){\r\n\t\t\t\r\n\t\t\tscheduler.event(minicalendarDiv, \"click\", function () {\r\n\t\t\t\tif (scheduler.isCalendarVisible()) {\r\n\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tscheduler.renderCalendar({\r\n\t\t\t\t\t\tposition: this,\r\n\t\t\t\t\t\tdate: scheduler.getState().date,\r\n\t\t\t\t\t\tnavigation: true,\r\n\t\t\t\t\t\thandler: function (date, calendar) {\r\n\t\t\t\t\t\t\tscheduler.setCurrentView(date);\r\n\t\t\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn minicalendarDiv;\r\n\t},\r\n\thtml_element: function (config) {\r\n\t\treturn div(\"dhx_cal_nav_content\");\r\n\t}\r\n};\r\n\r\nfunction findRenderer(config) {\r\n\tvar renderer;\r\n\tif (config.view) {\r\n\t\tswitch (config.view){\r\n\t\t\tcase \"today\":\r\n\t\t\tcase \"next\":\r\n\t\t\tcase \"prev\":\r\n\t\t\t\trenderer = itemTypes.builtInButton;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"date\":\r\n\t\t\t\trenderer = itemTypes.date;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"spacer\":\r\n\t\t\t\trenderer = itemTypes.spacer;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"button\":\r\n\t\t\t\trenderer = itemTypes.button;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"minicalendar\":\r\n\t\t\t\trenderer = itemTypes.minicalendarButton;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\trenderer = itemTypes.view;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t} else if(config.rows) {\r\n\t\trenderer = itemTypes.rows_container;\r\n\t} else if(config.cols) {\r\n\t\trenderer = itemTypes.row;\r\n\t}\r\n\treturn renderer;\r\n}\r\n\r\nfunction renderElement(config){\r\n\tvar renderer = findRenderer(config);\r\n\tif(!renderer){\r\n\t\treturn;\r\n\t}\r\n\tvar element = renderer(config);\r\n\tif(config.css){\r\n\t\telement.classList.add(config.css);\r\n\t}\r\n\tif(config.width){\r\n\t\tvar value = config.width;\r\n\t\tif(value === value * 1){\r\n\t\t\tvalue += \"px\";\r\n\t\t}\r\n\t\telement.style.width = value;\r\n\t}\r\n\tif(config.height){\r\n\t\tvar value = config.height;\r\n\t\tif(value === value * 1){\r\n\t\t\tvalue += \"px\";\r\n\t\t}\r\n\t\telement.style.height = value;\r\n\t}\r\n\tif (config.click) {\r\n\t\tscheduler.event(element, \"click\", config.click);\r\n\t}\r\n\tif (config.html) {\r\n\t\telement.innerHTML = config.html;\r\n\t}\r\n\r\n\tif (config.align) {\r\n\t\tvar value = \"\";\r\n\t\tif (config.align == \"right\") {\r\n\t\t\tvalue = \"flex-end\";\r\n\t\t} else if(config.align == \"left\") {\r\n\t\t\tvalue = \"flex-start\";\r\n\t\t}\r\n\t\telement.style.justifyContent = value;\r\n\t}\r\n\treturn element;\r\n}\r\n\r\nfunction prepareConfig(config) {\r\n\tif (typeof config === \"string\") {\r\n\t\tconfig = {\r\n\t\t\tview: config\r\n\t\t};\r\n\t}\r\n\tif (!config.view && !config.rows && !config.cols) {\r\n\t\tconfig.view = \"button\";\r\n\t}\r\n\treturn config;\r\n}\r\n\r\nfunction renderLayout(config) {\r\n\tvar fragment = document.createDocumentFragment();\r\n\tvar items;\r\n\tif(Array.isArray(config)){\r\n\t\titems = config;\r\n\t}else{\r\n\t\titems = [config];\r\n\t}\r\n\r\n\tfor (var i = 0; i < items.length; i++) {\r\n\t\tvar view = prepareConfig(items[i]);\r\n\r\n\t\tif(view.view === \"day\" && items[i + 1]){\r\n\t\t\tvar next = prepareConfig(items[i + 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"month\"){\r\n\t\t\t\tview.$firstTab = true;\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(view.view === \"week\" && items[i - 1]){\r\n\t\t\tvar next = prepareConfig(items[i + 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"month\"){\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(view.view === \"month\" && items[i - 1]){\r\n\t\t\tvar next = prepareConfig(items[i - 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"day\"){\r\n\t\t\t\tview.$lastTab = true;\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar element = renderElement(view);\r\n\r\n\t\tfragment.appendChild(element);\r\n\t\tif(view.cols || view.rows){\r\n\t\t\telement.appendChild(renderLayout(view.cols || view.rows));\r\n\t\t}\r\n\t}\r\n\treturn fragment;\r\n}\r\n\r\nscheduler._init_nav_bar = function (items) {\r\n\tvar navBar = this.$container.querySelector(\".dhx_cal_navline\");\r\n\tif (!navBar){\r\n\t\tnavBar = document.createElement(\"div\");\r\n\t\tnavBar.className = \"dhx_cal_navline dhx_cal_navline_flex\";\r\n\t\tscheduler._update_nav_bar(items, navBar);\r\n\t\treturn navBar;\r\n\t}\r\n\treturn navBar;\r\n};\r\n\r\nvar previousNavbar = null;\r\nvar previousHeight = null;\r\nscheduler._update_nav_bar = function (config, container) {\r\n\r\n\tif(!config){\r\n\t\treturn;\r\n\t}\r\n\tvar heightChanged = false;\r\n\tvar configChanged = false;\r\n\r\n\tvar newHeight = config.height || scheduler.xy.nav_height;\r\n\r\n\tif(previousHeight === null ||\r\n\t\t\t(previousHeight !== newHeight)){\r\n\t\theightChanged = true;\r\n\t}\r\n\tif(!previousNavbar || JSON.stringify(config) !== previousNavbar){\r\n\t\tconfigChanged = true;\r\n\t}\r\n\r\n\tif(heightChanged){\r\n\t\tscheduler.xy.nav_height = newHeight;\r\n\t}\r\n\tif(configChanged){\r\n\t\tcontainer.innerHTML = \"\";\r\n\t\tcontainer.appendChild(renderLayout(config));\r\n\t}\r\n\r\n\tif(heightChanged || configChanged){\r\n\t\tscheduler.unset_actions();\r\n\t\tscheduler._els = [];\r\n\t\tscheduler.get_elements();\r\n\t\tscheduler.set_actions();\r\n\t}\r\n\r\n\tif(newHeight === 0){\r\n\t\tcontainer.style.display = \"none\";\r\n\t}else{\r\n\t\tcontainer.style.display = \"\";\r\n\t}\r\n\r\n\tpreviousHeight = newHeight;\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\tfunction isAttachedNode(container){\r\n\t\tvar root = document.body;\r\n\t\r\n\t\twhile(container && container != root){\r\n\t\t\tcontainer = container.parentNode;\r\n\t\t}\r\n\t\r\n\t\treturn !!(root == container);\r\n\t}\r\n\t\r\n\tfunction getWindowSize(window){\r\n\t\treturn {\r\n\t\t\tw : window.innerWidth || document.documentElement.clientWidth,\r\n\t\t\th : window.innerHeight || document.documentElement.clientHeight\r\n\t\t};\r\n\t}\r\n\tfunction equals(a,b){\r\n\t\treturn a.w == b.w && a.h == b.h;\r\n\t}\r\n\t\r\n\tfunction listenWindowResize(scheduler, window){\r\n\t\tvar oldSize = getWindowSize(window);\r\n\t\tvar resizeDelay;\r\n\t\tscheduler.event(window, \"resize\", function(){\r\n\t\t\tclearTimeout(resizeDelay);\r\n\t\t\tresizeDelay = setTimeout(function(){\r\n\r\n\t\t\t\tif (!isAttachedNode(scheduler.$container) || scheduler.$destroyed){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tvar newSize = getWindowSize(window);\r\n\t\t\t\t// element may be resized by container-autoresize exteinsion\r\n\t\t\t\t// check if the size is actually changed in order to not to get endless loop\r\n\t\t\t\tif (!equals(oldSize, newSize)) {\r\n\t\t\t\t\toldSize = newSize;\r\n\t\t\t\t\ttriggerSchedulerResize(scheduler);\r\n\t\t\t\t}\r\n\t\t\t}, 150);\r\n\t\t});\r\n\t}\r\n\t\r\n\tfunction triggerSchedulerResize(scheduler){\r\n\t\tif(scheduler.$destroyed || !scheduler.$root || !isAttachedNode(scheduler.$root)){\r\n\t\t\treturn;\t\r\n\t\t}\r\n\t\tif (scheduler.callEvent(\"onSchedulerResize\", [])) {\r\n\t\t\tscheduler.updateView();\r\n\t\t\tscheduler.callEvent(\"onAfterSchedulerResize\", []);\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction watchNodeResize(scheduler){\r\n\t\tvar previousHeight = scheduler.$root.offsetHeight;\r\n\t\tvar previousWidth = scheduler.$root.offsetWidth;\r\n\t\t\r\n\t\tfunction lowlevelResizeWatcher(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(scheduler.$root){\r\n\t\t\t\tif (scheduler.$root.offsetHeight != previousHeight ||\r\n\t\t\t\t\tscheduler.$root.offsetWidth != previousWidth){\r\n\t\t\t\t\ttriggerSchedulerResize(scheduler);\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\tpreviousHeight = scheduler.$root.offsetHeight;\r\n\t\t\t\tpreviousWidth = scheduler.$root.offsetWidth;\r\n\t\t\t}\r\n\t\r\n\t\t\tsetTimeout(lowlevelResizeWatcher, 200);\r\n\t\t}\r\n\t\t\r\n\t\tlowlevelResizeWatcher();\r\n\t}\r\n\t\r\n\tfunction addResizeListener(scheduler){\r\n\t\tvar root = scheduler.$container;\r\n\t\tvar containerStyles = window.getComputedStyle(root);\r\n\t\tif(containerStyles.getPropertyValue(\"position\") == \"static\"){\r\n\t\t\troot.style.position = \"relative\";\r\n\t\t}\r\n\t\r\n\t\tvar resizeWatcher = document.createElement('iframe');\r\n\t\tresizeWatcher.className = \"scheduler_container_resize_watcher\";\r\n\t\tresizeWatcher.tabIndex = -1;\r\n\t\tif(scheduler.config.wai_aria_attributes){\r\n\t\t\tresizeWatcher.setAttribute(\"role\", \"none\");\r\n\t\t\tresizeWatcher.setAttribute(\"aria-hidden\", true);\r\n\t\t}\r\n\t\r\n\t\t// in some environments (namely, in SalesForce) iframe.contentWindow is not available\r\n\t\tvar salesforce_environment = !!window[\"Sfdc\"] || !!window[\"$A\"] || window[\"Aura\"];\r\n\t\tif(salesforce_environment){\r\n\t\t\twatchNodeResize(scheduler);\r\n\t\t} else {\r\n\t\t\troot.appendChild(resizeWatcher);\r\n\t\t\tif (resizeWatcher.contentWindow) {\r\n\t\t\t\tlistenWindowResize(scheduler, resizeWatcher.contentWindow);\r\n\t\t\t} else {\r\n\t\t\t\t// if so - ditch the iframe and fallback to listening the main window resize\r\n\t\t\t\troot.removeChild(resizeWatcher);\r\n\t\t\t\tlistenWindowResize(scheduler, window);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\taddResizeListener(scheduler);\r\n\r\n}","class EventHost {\r\n\tconstructor(){\r\n\t\tthis._silent_mode = false;\r\n\t\tthis.listeners = {};\r\n\t}\r\n\t_silentStart(){\r\n\t\tthis._silent_mode = true;\r\n\t}\r\n\t_silentEnd() {\r\n\t\tthis._silent_mode = false;\r\n\t}\r\n}\r\n\r\nconst createEventStorage = function(obj) {\r\n\tlet handlers = {};\r\n\tlet index = 0;\r\n\tconst eventStorage = function(){\r\n\t\tlet combinedResult = true;\r\n\t\tfor(const i in handlers){\r\n\t\t\tconst handlerResult = handlers[i].apply(obj, arguments);\r\n\t\t\tcombinedResult=combinedResult && handlerResult;\r\n\t\t}\r\n\t\treturn combinedResult;\r\n\t};\r\n\teventStorage.addEvent=function(handler, settings){\r\n\t\tif (typeof (handler) == \"function\"){\r\n\t\t\tlet handlerId;\r\n\t\t\tif(settings && settings.id){\r\n\t\t\t\thandlerId = settings.id;\r\n\t\t\t}else{\r\n\t\t\t\thandlerId = index;\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\r\n\t\t\tif(settings && settings.once){\r\n\t\t\t\tconst originalHandler = handler;\r\n\t\t\t\thandler = function(){\r\n\t\t\t\t\toriginalHandler();\r\n\t\t\t\t\teventStorage.removeEvent(handlerId);\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\thandlers[handlerId] = handler;\r\n\t\t\treturn handlerId;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\teventStorage.removeEvent=function(id){\r\n\t\tdelete handlers[id];\r\n\t};\r\n\r\n\teventStorage.clear = function(){\r\n\t\thandlers = {};\r\n\t};\r\n\r\n\treturn eventStorage;\r\n};\r\n\r\nfunction makeEventable(obj){\r\n\r\n\tconst eventHost = new EventHost();\r\n\tobj.attachEvent=function(eventName, handler, settings){\r\n\t\teventName = 'ev_'+eventName.toLowerCase();\r\n\t\tif (!eventHost.listeners[eventName]){\r\n\t\t\teventHost.listeners[eventName] = createEventStorage(this);\r\n\t\t}\r\n\r\n\t\tif(settings && settings.thisObject){\r\n\t\t\thandler = handler.bind(settings.thisObject);\r\n\t\t}\r\n\r\n\t\tconst innerId = eventHost.listeners[eventName].addEvent(handler, settings);\r\n\r\n\t\tlet handlerId = (eventName+':'+innerId); //return ID (ev_eventname:1)\r\n\t\tif(settings && settings.id){\r\n\t\t\thandlerId = settings.id;\r\n\t\t}\r\n\t\treturn handlerId;\r\n\t};\r\n\r\n\tobj.attachAll = function(callback){\r\n\t\tthis.attachEvent('listen_all', callback);\r\n\t};\r\n\r\n\tobj.callEvent=function(name, eventArguments){\r\n\t\tif (eventHost._silent_mode) return true;\r\n\r\n\t\tconst handlerName = 'ev_'+name.toLowerCase();\r\n\r\n\t\tconst listeners = eventHost.listeners;\r\n\t\tif (listeners['ev_listen_all']){\r\n\t\t\tlisteners['ev_listen_all'].apply(this, [name].concat(eventArguments));\r\n\t\t}\r\n\r\n\t\tif (listeners[handlerName])\r\n\t\t\treturn listeners[handlerName].apply(this, eventArguments);\r\n\t\treturn true;\r\n\t};\r\n\r\n\tobj.checkEvent=function(name){\r\n\t\tconst listeners = eventHost.listeners;\r\n\t\treturn (!!listeners['ev_'+name.toLowerCase()]);\r\n\t};\r\n\r\n\tobj.detachEvent=function(id){\r\n\t\tif (id){\r\n\t\t\tlet listeners = eventHost.listeners;\r\n\t\t\tfor(const i in listeners){\r\n\t\t\t\tlisteners[i].removeEvent(id); //remove event\r\n\t\t\t}\r\n\r\n\t\t\tconst list = id.split(':');//get EventName and ID\r\n\t\t\tlisteners = eventHost.listeners;\r\n\t\t\tif(list.length === 2){\r\n\t\t\t\tconst eventName = list[0];\r\n\t\t\t\tconst eventId = list[1];\r\n\t\t\t\tif(listeners[eventName]){\r\n\t\t\t\t\tlisteners[eventName].removeEvent(eventId); //remove event\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tobj.detachAllEvents = function(){\r\n\t\tfor (const name in eventHost.listeners) {\r\n\t\t\teventHost.listeners[name].clear();\r\n\t\t}\r\n\t};\r\n\r\n}\r\n\r\nexport default makeEventable;","export default {\r\n\tevent: function (el, event, handler){\r\n\t\tif (el.addEventListener)\r\n\t\t\tel.addEventListener(event, handler, false);\r\n\t\r\n\t\telse if (el.attachEvent)\r\n\t\t\tel.attachEvent(\"on\"+event, handler);\r\n\t},\r\n\teventRemove: function (el, event, handler){\r\n\t\tif (el.removeEventListener)\r\n\t\t\tel.removeEventListener(event, handler, false);\r\n\t\r\n\t\telse if (el.detachEvent)\r\n\t\t\tel.detachEvent(\"on\"+event, handler);\r\n\t}\r\n};","import createEventScope from './utils/scoped_event';\r\n\r\nexport default function extend(scheduler) {\r\n\r\n\r\nvar domEvents = createEventScope();\r\n\r\nscheduler.event = domEvents.attach;\r\nscheduler.eventRemove = domEvents.detach;\r\nscheduler._eventRemoveAll = domEvents.detachAll;\r\nscheduler._createDomEventScope = domEvents.extend;\r\n\r\n\r\nscheduler._trim = function(str){\r\n\tvar func = String.prototype.trim || function(){ return this.replace(/^\\s+|\\s+$/g, \"\"); };\r\n\treturn func.apply(str);\r\n};\r\n\r\nscheduler._isDate = function(obj){\r\n\tif (obj && typeof obj == \"object\") {\r\n\t\treturn !!(obj.getFullYear && obj.getMonth && obj.getDate);\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n};\r\n\r\nscheduler._isObject = function(obj){\r\n\treturn (obj && typeof obj == \"object\");\r\n};\r\n\r\n}","import defaultDomEvents from './event';\r\n\r\nexport default function(){\r\n\r\n\tvar domEvents = function (addEvent, removeEvent) {\r\n\t\taddEvent = addEvent || defaultDomEvents.event;\r\n\t\tremoveEvent = removeEvent || defaultDomEvents.eventRemove;\r\n\t\tvar handlers = [];\r\n\t\tvar eventScope = {\r\n\t\t\tattach: function(el, event, callback, capture){\r\n\t\t\t\thandlers.push({element: el, event:event, callback: callback, capture: capture});\r\n\t\t\t\taddEvent(el, event, callback, capture);\r\n\t\t\t},\r\n\t\t\tdetach: function(el, event, callback, capture){\r\n\t\t\t\tremoveEvent(el, event, callback, capture);\r\n\t\t\t\tfor(var i = 0; i < handlers.length; i++){\r\n\t\t\t\t\tvar handler = handlers[i];\r\n\t\t\t\t\tif (handler.element === el && handler.event === event && handler.callback === callback && handler.capture === capture) {\r\n\t\t\t\t\t\thandlers.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tdetachAll: function () {\r\n\t\t\t\tvar staticArray = handlers.slice();\r\n\t\t\t\t// original handlers array can be spliced on every iteration\r\n\t\t\t\tfor (var i = 0; i < staticArray.length; i++){\r\n\t\t\t\t\tvar handler = staticArray[i];\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, handler.capture);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, undefined);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, false);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, true);\r\n\t\t\t\t}\r\n\t\t\t\thandlers.splice(0, handlers.length);\r\n\t\t\t},\r\n\t\t\textend: function(){\r\n\t\t\t\treturn domEvents(this.event, this.eventRemove);\r\n\t\t\t}\r\n\t\t};\r\n\t\treturn eventScope;\r\n\t};\r\n\t\r\n\treturn domEvents();\r\n}","//returns position of html element on the page\r\nfunction elementPosition(elem) {\r\n\tvar top=0, left=0, right=0, bottom=0;\r\n\tif (elem.getBoundingClientRect) { //HTML5 method\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\t\tvar body = document.body;\r\n\t\tvar docElem = (document.documentElement ||\r\n\t\t\tdocument.body.parentNode ||\r\n\t\t\tdocument.body);\r\n\r\n\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\t\ttop = box.top + scrollTop - clientTop;\r\n\t\tleft = box.left + scrollLeft - clientLeft;\r\n\r\n\t\tright = document.body.offsetWidth - box.right;\r\n\t\tbottom = document.body.offsetHeight - box.bottom;\r\n\t} else { //fallback to naive approach\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop,10);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft,10);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\r\n\t\tright = document.body.offsetWidth - elem.offsetWidth - left;\r\n\t\tbottom = document.body.offsetHeight - elem.offsetHeight - top;\r\n\t}\r\n\treturn { y: Math.round(top), x: Math.round(left), width:elem.offsetWidth, height:elem.offsetHeight, right: Math.round(right), bottom: Math.round(bottom) };\r\n}\r\n\r\n/*\r\nevent position relatively to DOM element\r\n */\r\nfunction getRelativeEventPosition(ev, node){\r\n\tvar d = document.documentElement;\r\n\tvar box = elementPosition(node);\r\n\r\n\treturn {\r\n\t\tx: ev.clientX - d.clientLeft - box.x + node.scrollLeft,\r\n\t\ty: ev.clientY - d.clientTop - box.y + node.scrollTop\r\n\t};\r\n}\r\n\r\nfunction getNodePosition(elem) {\r\n\tvar top=0, left=0, right=0, bottom=0;\r\n\tif (elem.getBoundingClientRect) { //HTML5 method\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\t\tvar body = document.body;\r\n\t\tvar docElem = (document.documentElement ||\r\n\t\t\tdocument.body.parentNode ||\r\n\t\t\tdocument.body);\r\n\r\n\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\t\ttop = box.top + scrollTop - clientTop;\r\n\t\tleft = box.left + scrollLeft - clientLeft;\r\n\r\n\t\tright = document.body.offsetWidth - box.right;\r\n\t\tbottom = document.body.offsetHeight - box.bottom;\r\n\t} else { //fallback to naive approach\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop,10);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft,10);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\r\n\t\tright = document.body.offsetWidth - elem.offsetWidth - left;\r\n\t\tbottom = document.body.offsetHeight - elem.offsetHeight - top;\r\n\t}\r\n\treturn { y: Math.round(top), x: Math.round(left), width:elem.offsetWidth, height:elem.offsetHeight, right: Math.round(right), bottom: Math.round(bottom) };\r\n}\r\n\r\nfunction getClassName(node){\r\n\tif(!node) return \"\";\r\n\r\n\tvar className = node.className || \"\";\r\n\tif(className.baseVal)//'className' exist but not a string - IE svg element in DOM\r\n\t\tclassName = className.baseVal;\r\n\r\n\tif(!className.indexOf)\r\n\t\tclassName = '';\r\n\r\n\treturn className || \"\";\r\n}\r\n\r\nfunction getTargetNode(e) {\r\n\tvar trg;\r\n\tif (e.tagName)\r\n\t\ttrg = e;\r\n\telse {\r\n\t\te = e || window.event;\r\n\t\ttrg = e.target || e.srcElement;\r\n\t\tif (trg.shadowRoot && e.composedPath) {\r\n\t\t\ttrg = e.composedPath()[0];\r\n\t\t}\r\n\t}\r\n\treturn trg;\r\n}\r\n\r\nfunction locateCss(e, classname, strict){\r\n\tif(strict === undefined)\r\n\t\tstrict = true;\r\n\r\n\tvar trg = e.target || e.srcElement;\r\n\tvar css = '';\r\n\r\n\twhile (trg){\r\n\t\tcss = getClassName(trg);\r\n\r\n\t\tif(css){\r\n\t\t\tvar ind = css.indexOf(classname);\r\n\t\t\tif (ind >= 0){\r\n\t\t\t\tif (!strict)\r\n\t\t\t\t\treturn trg;\r\n\r\n\t\t\t\t//check that we have exact match\r\n\t\t\t\tvar left = (ind === 0) || (!((css.charAt(ind - 1)||\"\").trim()));\r\n\t\t\t\tvar right = ((ind + classname.length >= css.length)) || (!((css.charAt(ind + classname.length)).trim()));\r\n\r\n\t\t\t\tif (left && right)\r\n\t\t\t\t\treturn trg;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttrg=trg.parentNode;\r\n\t}\r\n\treturn null;\r\n}\r\n\r\n\r\n// get focusable nodes\r\nfunction isVisible(node){\r\n\tvar display = false,\r\n\t\tvisibility = false;\r\n\tif(window.getComputedStyle){\r\n\t\tvar style = window.getComputedStyle(node, null);\r\n\t\tdisplay = style[\"display\"];\r\n\t\tvisibility = style[\"visibility\"];\r\n\t}else if(node.currentStyle){\r\n\t\tdisplay = node.currentStyle[\"display\"];\r\n\t\tvisibility = node.currentStyle[\"visibility\"];\r\n\t}\r\n\r\n\tvar hiddenSection = false;\r\n\tvar recurringSection = locateCss({target:node}, \"dhx_form_repeat\", false);\r\n\tif(recurringSection){\r\n\t\thiddenSection = !!(recurringSection.style.height == \"0px\");\r\n\t}\r\n\thiddenSection = hiddenSection || !(node.offsetHeight);\r\n\r\n\treturn (display != \"none\" && visibility != \"hidden\" && !hiddenSection);\r\n}\r\n\r\nfunction hasNonNegativeTabIndex(node){\r\n\treturn !isNaN(node.getAttribute(\"tabindex\")) && (node.getAttribute(\"tabindex\")*1 >= 0);\r\n}\r\n\r\nfunction hasHref(node){\r\n\tvar canHaveHref = {\"a\": true, \"area\": true};\r\n\tif(canHaveHref[node.nodeName.loLowerCase()]){\r\n\t\treturn !!node.getAttribute(\"href\");\r\n\t}\r\n\treturn true;\r\n}\r\n\r\nfunction isEnabled(node){\r\n\tvar canDisable = {\"input\":true, \"select\":true, \"textarea\":true, \"button\":true, \"object\":true};\r\n\tif(canDisable[node.nodeName.toLowerCase()]){\r\n\t\treturn !node.hasAttribute(\"disabled\");\r\n\t}\r\n\r\n\treturn true;\r\n}\r\n\r\n\r\nfunction getFocusableNodes(root){\r\n\tvar nodes = root.querySelectorAll([\r\n\t\t\"a[href]\",\r\n\t\t\"area[href]\",\r\n\t\t\"input\",\r\n\t\t\"select\",\r\n\t\t\"textarea\",\r\n\t\t\"button\",\r\n\t\t\"iframe\",\r\n\t\t\"object\",\r\n\t\t\"embed\",\r\n\t\t\"[tabindex]\",\r\n\t\t\"[contenteditable]\"\r\n\t].join(\", \"));\r\n\r\n\tvar nodesArray = Array.prototype.slice.call(nodes, 0);\r\n\t\r\n\tfor(var i = 0; i < nodesArray.length; i++){\r\n\t\tnodesArray[i].$position = i;\r\n\t\t// we remember original nodes order, \r\n\t\t// so when we sort them by tabindex we ensure order of nodes with same tabindex is preserved, \r\n\t\t// since some browsers do unstable sort\r\n\t}\r\n\t\r\n\tnodesArray.sort(function(a, b) {\r\n\t\tif(a.tabIndex === 0 && b.tabIndex !== 0){\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\tif(a.tabIndex !== 0 && b.tabIndex === 0){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\t\r\n\t\tif (a.tabIndex === b.tabIndex){\r\n\t\t\t// ensure we do stable sort\r\n\t\t\treturn a.$position - b.$position;\r\n\t\t}\r\n\t\tif (a.tabIndex < b.tabIndex) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn 1;\r\n\t});\r\n\t\r\n\tfor(var i = 0; i < nodesArray.length; i++){\r\n\t\tvar node = nodesArray[i];\r\n\t\tvar isValid = (hasNonNegativeTabIndex(node) || isEnabled(node) || hasHref(node)) && isVisible(node);\r\n\t\tif(!isValid){\r\n\t\t\tnodesArray.splice(i, 1);\r\n\t\t\ti--;\r\n\t\t}\r\n\t}\r\n\treturn nodesArray;\r\n}\r\n\r\n\r\nfunction isShadowDomSupported() {\r\n\treturn document.head.createShadowRoot || document.head.attachShadow;\r\n}\r\n\r\n/**\r\n * Returns element that has the browser focus, or null if no element has focus.\r\n * Works with shadow DOM, so it's prefereed to use this function instead of document.activeElement directly.\r\n * @returns HTMLElement\r\n */\r\nfunction getActiveElement(){\r\n\tvar activeElement = document.activeElement;\r\n\tif (activeElement.shadowRoot) {\r\n\t\tactiveElement = activeElement.shadowRoot.activeElement;\r\n\t}\r\n\tif (activeElement === document.body && document.getSelection) {\r\n\t\tactiveElement = document.getSelection().focusNode || document.body;\r\n\t}\r\n\r\n\treturn activeElement;\r\n}\r\n\r\n/**\r\n * Returns document.body or the host node of the ShadowRoot, if the element is attached to ShadowDom\r\n * @param {HTMLElement} element \r\n * @returns HTMLElement\r\n */\r\nfunction getRootNode(element) {\r\n\tif (!element) {\r\n\t\treturn document.body;\r\n\t}\r\n\tif (!isShadowDomSupported()) {\r\n\t\treturn document.body;\r\n\t}\r\n\twhile (element.parentNode && (element = element.parentNode)) {\r\n\t\tif (element instanceof ShadowRoot) {\r\n\t\t\treturn element.host;\r\n\t\t}\r\n\t}\r\n\treturn document.body;\r\n}\r\n\r\nfunction hasShadowParent(element) {\r\n\treturn !!getRootNode(element);\r\n}\r\n\r\nexport default {\r\n\t/**\r\n\t * @desc: Calculate absolute position of html object\r\n\t * @type: private\r\n\t * @param: htmlObject - html object\r\n\t * @topic: 0\r\n\t */\r\n\tgetAbsoluteLeft: function getAbsoluteLeft(htmlObject){\r\n\t\treturn this.getOffset(htmlObject).left;\r\n\t},\r\n\t/**\r\n\t * @desc: Calculate absolute position of html object\r\n\t * @type: private\r\n\t * @param: htmlObject - html object\r\n\t * @topic: 0\r\n\t */\r\n\tgetAbsoluteTop: function getAbsoluteTop(htmlObject){\r\n\t\treturn this.getOffset(htmlObject).top;\r\n\t},\r\n\r\n\tgetOffsetSum: function getOffsetSum(elem) {\r\n\t\tvar top=0, left=0;\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\t\treturn {top: top, left: left};\r\n\t},\r\n\r\n\tgetOffsetRect: function getOffsetRect(elem) {\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\r\n\t\tvar top = 0,\r\n\t\t\tleft = 0;\r\n\r\n\t\t// https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#Mobile_Tablet_or_Desktop\r\n\t\tif (!/Mobi/.test(navigator.userAgent)) {\r\n\t\t\tvar body = document.body;\r\n\t\t\tvar docElem = document.documentElement;\r\n\t\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\r\n\t\t\ttop = box.top + scrollTop - clientTop;\r\n\t\t\tleft = box.left + scrollLeft - clientLeft;\r\n\t\t}else {\r\n\t\t\t// incorrect left coordinate on mobile zoom\r\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=489206\r\n\r\n\t\t\tvar dummy = document.createElement(\"div\");\r\n\t\t\tdummy.style.position=\"absolute\";\r\n\t\t\tdummy.style.left=\"0px\";\r\n\t\t\tdummy.style.top=\"0px\";\r\n\t\t\tdummy.style.width=\"1px\";\r\n\t\t\tdummy.style.height = \"1px\";\r\n\r\n\t\t\tdocument.body.appendChild(dummy);\r\n\t\t\tvar dummyBox = dummy.getBoundingClientRect();\r\n\t\t\ttop = box.top - dummyBox.top;\r\n\t\t\tleft = box.left - dummyBox.left;\r\n\r\n\t\t\tdummy.parentNode.removeChild(dummy);\r\n\t\t}\r\n\r\n\t\treturn { top: Math.round(top), left: Math.round(left) };\r\n\t},\r\n\r\n\tgetOffset: function getOffset(elem) {\r\n\t\tif (elem.getBoundingClientRect) {\r\n\t\t\treturn this.getOffsetRect(elem);\r\n\t\t} else {\r\n\t\t\treturn this.getOffsetSum(elem);\r\n\t\t}\r\n\t},\r\n\r\n\tclosest: function(element, selector){\r\n\t\tif(!element || !selector){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn closest(element, selector);\r\n\t},\r\n\tinsertAfter: function(newNode, referenceNode){\r\n\t\tif(referenceNode.nextSibling){\r\n\t\t\treferenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);\r\n\t\t}else{\r\n\t\t\treferenceNode.parentNode.appendChild(newNode);\r\n\t\t}\r\n\t},\r\n\tremove: function(node) {\r\n\t\tif (node && node.parentNode) {\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t}\r\n\t},\r\n\tisChildOf: function(child, parent) {\r\n\t\treturn parent.contains(child);\r\n\t},\r\n\tgetFocusableNodes,\r\n\tgetClassName,\r\n\tlocateCss,\r\n\tgetRootNode,\r\n\thasShadowParent,\r\n\tisShadowDomSupported,\r\n\tgetActiveElement,\r\n\tgetRelativeEventPosition,\r\n\tgetTargetNode,\r\n\tgetNodePosition\r\n};\r\n\r\nvar closest;\r\nif(Element.prototype.closest){\r\n\tclosest = function(element, selector){\r\n\t\treturn element.closest(selector);\r\n\t};\r\n}else{\r\n\tvar matches = Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\r\n\tclosest = function(element, selector) {\r\n\t\tvar el = element;\r\n\t\tdo {\r\n\t\t\tif (matches.call(el, selector)){\r\n\t\t\t\treturn el;\r\n\t\t\t}\r\n\t\t\tel = el.parentElement || el.parentNode;\r\n\t\t} while (el !== null && el.nodeType === 1);\r\n\t\treturn null;\r\n\t};\r\n}\r\n","/* eslint-disable no-restricted-globals */\r\nvar isWindowAwailable = typeof window !== \"undefined\";\r\n\r\n/* eslint-enable no-restricted-globals */\r\n\r\nexport default {\r\n\tisIE: isWindowAwailable && (navigator.userAgent.indexOf(\"MSIE\") >= 0 || navigator.userAgent.indexOf(\"Trident\") >= 0),\r\n\tisOpera: isWindowAwailable && (navigator.userAgent.indexOf(\"Opera\") >= 0),\r\n\tisChrome: isWindowAwailable && (navigator.userAgent.indexOf(\"Chrome\") >= 0),\r\n\tisKHTML: isWindowAwailable && (navigator.userAgent.indexOf(\"Safari\") >= 0 || navigator.userAgent.indexOf(\"Konqueror\") >= 0),\r\n\tisFF: isWindowAwailable && (navigator.userAgent.indexOf(\"Firefox\") >= 0),\r\n\tisIPad: isWindowAwailable && (navigator.userAgent.search(/iPad/gi) >= 0),\r\n\tisEdge: isWindowAwailable && (navigator.userAgent.indexOf(\"Edge\")!=-1),\r\n\tisNode: (!isWindowAwailable || typeof navigator == \"undefined\")\r\n};","export default function(data) {\r\n\tif (typeof data === \"string\" || typeof data === \"number\") {\r\n\t\treturn data;\r\n\t}\r\n\tvar result = \"\";\r\n\tfor (var key in data) {\r\n\t\tvar serialized = \"\";\r\n\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\tif (typeof data[key] === \"string\") {\r\n\t\t\t\tserialized = encodeURIComponent(data[key]);\r\n\t\t\t} else if (typeof data[key] === \"number\") {\r\n\t\t\t\tserialized = data[key];\r\n\t\t\t} else {\r\n\t\t\t\tserialized = encodeURIComponent(JSON.stringify(data[key]));\r\n\t\t\t}\r\n\t\t\tserialized = key + \"=\" + serialized;\r\n\r\n\t\t\tif (result.length) {\r\n\t\t\t\tserialized = \"&\" + serialized;\r\n\t\t\t}\r\n\t\t\tresult += serialized;\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n}","export default function extend(scheduler) {\r\n\r\nvar generateStringToDate = function (format, utc) {\r\n\tvar splt = \"var temp=date.match(/[a-zA-Z]+|[0-9]+/g);\";\r\n\tvar mask = format.match(/%[a-zA-Z]/g);\r\n\tfor (var i = 0; i < mask.length; i++) {\r\n\t\tswitch (mask[i]) {\r\n\t\t\tcase \"%j\":\r\n\t\t\tcase \"%d\": splt += \"set[2]=temp[\" + i + \"]||1;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%n\":\r\n\t\t\tcase \"%m\": splt += \"set[1]=(temp[\" + i + \"]||1)-1;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%y\": splt += \"set[0]=temp[\" + i + \"]*1+(temp[\" + i + \"]>50?1900:2000);\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%g\":\r\n\t\t\tcase \"%G\":\r\n\t\t\tcase \"%h\":\r\n\t\t\tcase \"%H\":\r\n\t\t\t\tsplt += \"set[3]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%i\":\r\n\t\t\t\tsplt += \"set[4]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%Y\": splt += \"set[0]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%a\":\r\n\t\t\tcase \"%A\": splt += \"set[3]=set[3]%12+((temp[\" + i + \"]||'').toLowerCase()=='am'?0:12);\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%s\": splt += \"set[5]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%M\": splt += \"set[1]=this.locale.date.month_short_hash[temp[\" + i + \"]]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%F\": splt += \"set[1]=this.locale.date.month_full_hash[temp[\" + i + \"]]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\tvar code = \"set[0],set[1],set[2],set[3],set[4],set[5]\";\r\n\tif (utc) code = \" Date.UTC(\" + code + \")\";\r\n\treturn new Function(\"date\", \"var set=[0,0,1,0,0,0]; \" + splt + \" return new Date(\" + code + \");\");\r\n};\r\nvar csp_date_to_str = function (format, utc) {\r\n\treturn function(date) {\r\n\t\treturn format.replace(/%[a-zA-Z]/g, function (a) {\r\n\t\t\tswitch (a) {\r\n\t\t\t\tcase \"%d\": return utc ? scheduler.date.to_fixed(date.getUTCDate()) : scheduler.date.to_fixed(date.getDate());\r\n\t\t\t\tcase \"%m\": return utc ? scheduler.date.to_fixed((date.getUTCMonth() + 1)) : scheduler.date.to_fixed((date.getMonth() + 1));\r\n\t\t\t\tcase \"%j\": return utc ? date.getUTCDate() : date.getDate();\r\n\t\t\t\tcase \"%n\": return utc ? (date.getUTCMonth() + 1) : (date.getMonth() + 1);\r\n\t\t\t\tcase \"%y\": return utc ? scheduler.date.to_fixed(date.getUTCFullYear() % 100) : scheduler.date.to_fixed(date.getFullYear() % 100);\r\n\t\t\t\tcase \"%Y\": return utc ? date.getUTCFullYear() : date.getFullYear();\r\n\t\t\t\tcase \"%D\": return utc ? scheduler.locale.date.day_short[date.getUTCDay()] : scheduler.locale.date.day_short[date.getDay()];\r\n\t\t\t\tcase \"%l\": return utc ? scheduler.locale.date.day_full[date.getUTCDay()] : scheduler.locale.date.day_full[date.getDay()];\r\n\t\t\t\tcase \"%M\": return utc ? scheduler.locale.date.month_short[date.getUTCMonth()] : scheduler.locale.date.month_short[date.getMonth()];\r\n\t\t\t\tcase \"%F\": return utc ? scheduler.locale.date.month_full[date.getUTCMonth()] : scheduler.locale.date.month_full[date.getMonth()];\r\n\t\t\t\tcase \"%h\": return utc ? scheduler.date.to_fixed((date.getUTCHours() + 11) % 12 + 1) : scheduler.date.to_fixed((date.getHours() + 11) % 12 + 1);\r\n\t\t\t\tcase \"%g\": return utc ? ((date.getUTCHours() + 11) % 12 + 1) : ((date.getHours() + 11) % 12 + 1);\r\n\t\t\t\tcase \"%G\": return utc ? date.getUTCHours() : date.getHours();\r\n\t\t\t\tcase \"%H\": return utc ? scheduler.date.to_fixed(date.getUTCHours()) : scheduler.date.to_fixed(date.getHours());\r\n\t\t\t\tcase \"%i\": return utc ? scheduler.date.to_fixed(date.getUTCMinutes()) : scheduler.date.to_fixed(date.getMinutes());\r\n\t\t\t\tcase \"%a\": return utc ? (date.getUTCHours() > 11 ? \"pm\" : \"am\") : (date.getHours() > 11 ? \"pm\" : \"am\");\r\n\t\t\t\tcase \"%A\": return utc ? (date.getUTCHours() > 11 ? \"PM\" : \"AM\") : (date.getHours() > 11 ? \"PM\" : \"AM\");\r\n\t\t\t\tcase \"%s\": return utc ? scheduler.date.to_fixed(date.getUTCSeconds()) : scheduler.date.to_fixed(date.getSeconds());\r\n\t\t\t\tcase \"%W\": return utc ? scheduler.date.to_fixed(scheduler.date.getUTCISOWeek(date)) : scheduler.date.to_fixed(scheduler.date.getISOWeek(date));\r\n\t\t\t\tdefault: return a;\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n};\r\nvar csp_str_to_date = function (format, utc) {\r\n\tconst mask = format.match(/%[a-zA-Z]/g);\r\n\treturn function (date){\r\n\t\tvar set = [0, 0, 1, 0, 0, 0];\r\n\t\tvar temp = date.match(/[a-zA-Z]+|[0-9]+/g);\r\n\r\n\t\tfor (var i = 0; i < mask.length; i++) {\r\n\t\t\tswitch (mask[i]) {\r\n\t\t\t\tcase \"%j\":\r\n\t\t\t\tcase \"%d\":\r\n\t\t\t\t\tset[2] = temp[i] || 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%n\":\r\n\t\t\t\tcase \"%m\":\r\n\t\t\t\t\tset[1] = (temp[i] || 1) - 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%y\":\r\n\t\t\t\t\tset[0] = temp[i] * 1 + (temp[i] > 50 ? 1900 : 2000);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%g\":\r\n\t\t\t\tcase \"%G\":\r\n\t\t\t\tcase \"%h\":\r\n\t\t\t\tcase \"%H\":\r\n\t\t\t\t\tset[3] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%i\":\r\n\t\t\t\t\tset[4] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\tset[0] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%a\":\r\n\t\t\t\tcase \"%A\":\r\n\t\t\t\t\tset[3] = set[3] % 12 + ((temp[i] || '').toLowerCase() == 'am' ? 0 : 12);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%s\":\r\n\t\t\t\t\tset[5] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%M\":\r\n\t\t\t\t\tset[1] = scheduler.locale.date.month_short_hash[temp[i]] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%F\":\r\n\t\t\t\t\tset[1] = scheduler.locale.date.month_full_hash[temp[i]] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (utc) {\r\n\t\t\treturn new Date(Date.UTC(set[0], set[1], set[2], set[3], set[4], set[5]));\r\n\t\t}\r\n\r\n\t\treturn new Date(set[0], set[1], set[2], set[3], set[4], set[5]);\r\n\t};\r\n};\r\n\r\nlet cspEnabled = undefined;\r\nfunction checkIfCSPEnabled(){\r\n\ttry {\r\n\t\tnew Function(\"cspEnabled = false;\");\r\n\t\tcspEnabled = false;\r\n\t} catch(e) {\r\n\t\tcspEnabled = true;\r\n\t}\r\n\treturn cspEnabled;\r\n}\r\n\r\nfunction useCsp() {\r\n\tvar result = false;\r\n\tif (scheduler.config.csp === \"auto\") {\r\n\t\tif(cspEnabled === undefined){\r\n\t\t\tcspEnabled = checkIfCSPEnabled();\r\n\t\t}\r\n\t\tresult = cspEnabled;\r\n\t} else {\r\n\t\tresult = scheduler.config.csp;\r\n\t}\r\n\treturn result;\r\n}\r\nscheduler.date = {\r\n\tinit:function(){\r\n\t\tvar s = scheduler.locale.date.month_short;\r\n\t\tvar t = scheduler.locale.date.month_short_hash = {};\r\n\t\tfor (var i = 0; i < s.length; i++)\r\n\t\t\tt[s[i]]=i;\r\n\r\n\t\tvar s = scheduler.locale.date.month_full;\r\n\t\tvar t = scheduler.locale.date.month_full_hash = {};\r\n\t\tfor (var i = 0; i < s.length; i++)\r\n\t\t\tt[s[i]]=i;\r\n\t},\r\n\tdate_part:function(date){\r\n\t\tvar old = new Date(date);\r\n\t\tdate.setHours(0);\r\n\t\tdate.setMinutes(0);\r\n\t\tdate.setSeconds(0);\r\n\t\tdate.setMilliseconds(0);\r\n\t\tif (date.getHours() && //shift to yesterday on dst\r\n\t\t\t(date.getDate() < old.getDate() || date.getMonth() < old.getMonth() || date.getFullYear() < old.getFullYear()) )\r\n\t\t\tdate.setTime(date.getTime() + 60 * 60 * 1000 * (24 - date.getHours()));\r\n\t\treturn date;\r\n\t},\r\n\ttime_part:function(date){\r\n\t\treturn (date.valueOf()/1000 - date.getTimezoneOffset()*60)%86400;\r\n\t},\r\n\tweek_start:function(date){\r\n\t\tvar shift=date.getDay();\r\n\t\tif (scheduler.config.start_on_monday){\r\n\t\t\tif (shift===0) shift=6;\r\n\t\t\telse shift--;\r\n\t\t}\r\n\t\treturn this.date_part(this.add(date,-1*shift,\"day\"));\r\n\t},\r\n\tmonth_start:function(date){\r\n\t\tdate.setDate(1);\r\n\t\treturn this.date_part(date);\r\n\t},\r\n\tyear_start:function(date){\r\n\t\tdate.setMonth(0);\r\n\t\treturn this.month_start(date);\r\n\t},\r\n\tday_start:function(date){\r\n\t\treturn this.date_part(date);\r\n\t},\r\n\t_add_days:function(date, inc){\r\n\t\tvar ndate = new Date(date.valueOf());\r\n\r\n\t\tndate.setDate(ndate.getDate() + inc);\r\n\r\n\t\t// Workaround for Safari/iOS timezone bug, ref:OKZ-149693\r\n\t\tif(inc == Math.round(inc) && inc > 0){\r\n\t\t\tvar datesDiff = +ndate - +date,\r\n\t\t\t\trest = datesDiff % (24*60*60*1000);\r\n\t\t\tif(rest && date.getTimezoneOffset() == ndate.getTimezoneOffset()){\r\n\t\t\t\tvar hours = rest / (60* 60 * 1000);\r\n\t\t\t\tndate.setTime(ndate.getTime() + (24 - hours) * 60 * 60 * 1000);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (inc >= 0 && (!date.getHours() && ndate.getHours()) &&//shift to yesterday on dst\r\n\t\t\t(ndate.getDate() < date.getDate() || ndate.getMonth() < date.getMonth() || ndate.getFullYear() < date.getFullYear()) )\r\n\t\t\tndate.setTime(ndate.getTime() + 60 * 60 * 1000 * (24 - ndate.getHours()));\r\n\t\treturn ndate;\r\n\t},\r\n\tadd:function(date,inc,mode){\r\n\t\tvar ndate=new Date(date.valueOf());\r\n\t\tswitch(mode){\r\n\t\t\tcase \"day\":\r\n\t\t\t\tndate = scheduler.date._add_days(ndate, inc);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"week\":\r\n\t\t\t\tndate = scheduler.date._add_days(ndate, inc * 7);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"month\": ndate.setMonth(ndate.getMonth()+inc); break;\r\n\t\t\tcase \"year\": ndate.setYear(ndate.getFullYear()+inc); break;\r\n\t\t\tcase \"hour\":\r\n\t\t\t\t/*\r\n\t\t\t\t setHour(getHour() + inc) and setMinutes gives weird result when is applied on a Daylight Saving time switch\r\n\t\t\t\t setTime seems working as expected\r\n\t\t\t\t*/\r\n\t\t\t\tndate.setTime(ndate.getTime() + inc * 60 * 60 * 1000);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"minute\":\r\n\t\t\t\tndate.setTime(ndate.getTime() + inc * 60 * 1000);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\treturn scheduler.date[\"add_\"+mode](date,inc,mode);\r\n\t\t}\r\n\t\treturn ndate;\r\n\t},\r\n\tto_fixed:function(num){\r\n\t\tif (num<10)\treturn \"0\"+num;\r\n\t\treturn num;\r\n\t},\r\n\tcopy:function(date){\r\n\t\treturn new Date(date.valueOf());\r\n\t},\r\n\tdate_to_str:function(format,utc){\r\n\t\tif (useCsp()) {\r\n\t\t\treturn csp_date_to_str(format,utc);\r\n\t\t}\r\n\r\n\t\tformat=format.replace(/%[a-zA-Z]/g,function(a){\r\n\t\t\tswitch(a){\r\n\t\t\t\tcase \"%d\": return \"\\\"+this.date.to_fixed(date.getDate())+\\\"\";\r\n\t\t\t\tcase \"%m\": return \"\\\"+this.date.to_fixed((date.getMonth()+1))+\\\"\";\r\n\t\t\t\tcase \"%j\": return \"\\\"+date.getDate()+\\\"\";\r\n\t\t\t\tcase \"%n\": return \"\\\"+(date.getMonth()+1)+\\\"\";\r\n\t\t\t\tcase \"%y\": return \"\\\"+this.date.to_fixed(date.getFullYear()%100)+\\\"\";\r\n\t\t\t\tcase \"%Y\": return \"\\\"+date.getFullYear()+\\\"\";\r\n\t\t\t\tcase \"%D\": return \"\\\"+this.locale.date.day_short[date.getDay()]+\\\"\";\r\n\t\t\t\tcase \"%l\": return \"\\\"+this.locale.date.day_full[date.getDay()]+\\\"\";\r\n\t\t\t\tcase \"%M\": return \"\\\"+this.locale.date.month_short[date.getMonth()]+\\\"\";\r\n\t\t\t\tcase \"%F\": return \"\\\"+this.locale.date.month_full[date.getMonth()]+\\\"\";\r\n\t\t\t\tcase \"%h\": return \"\\\"+this.date.to_fixed((date.getHours()+11)%12+1)+\\\"\";\r\n\t\t\t\tcase \"%g\": return \"\\\"+((date.getHours()+11)%12+1)+\\\"\";\r\n\t\t\t\tcase \"%G\": return \"\\\"+date.getHours()+\\\"\";\r\n\t\t\t\tcase \"%H\": return \"\\\"+this.date.to_fixed(date.getHours())+\\\"\";\r\n\t\t\t\tcase \"%i\": return \"\\\"+this.date.to_fixed(date.getMinutes())+\\\"\";\r\n\t\t\t\tcase \"%a\": return \"\\\"+(date.getHours()>11?\\\"pm\\\":\\\"am\\\")+\\\"\";\r\n\t\t\t\tcase \"%A\": return \"\\\"+(date.getHours()>11?\\\"PM\\\":\\\"AM\\\")+\\\"\";\r\n\t\t\t\tcase \"%s\": return \"\\\"+this.date.to_fixed(date.getSeconds())+\\\"\";\r\n\t\t\t\tcase \"%W\": return \"\\\"+this.date.to_fixed(this.date.getISOWeek(date))+\\\"\";\r\n\t\t\t\tdefault: return a;\r\n\t\t\t}\r\n\t\t});\r\n\t\tif (utc) format=format.replace(/date\\.get/g,\"date.getUTC\");\r\n\t\tvar func = new Function(\"date\",\"return \\\"\"+format+\"\\\";\");\r\n\r\n\t\treturn func.bind(scheduler);\r\n\t},\r\n\tstr_to_date:function(format, utc, exactFormat){\r\n\t\tvar stringToDateMethod = useCsp() ? csp_str_to_date : generateStringToDate;\r\n\t\tvar parseExactFormat = stringToDateMethod(format, utc);\r\n\t\t// eslint-disable-next-line\r\n\t\tvar yyyyMMddhhIIss = /^[0-9]{4}(\\-|\\/)[0-9]{2}(\\-|\\/)[0-9]{2} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/;\r\n\r\n\t\t// MM/dd/yyyy - default old format for xml-date\r\n\t\t// eslint-disable-next-line\r\n\t\tvar MMddyyyyhhIIss = /^[0-9]{2}\\/[0-9]{2}\\/[0-9]{4} ?(([0-9]{1,2}:[0-9]{2})(:[0-9]{1,2})?)?$/;\r\n\t\t// dd-MM-yyyy - default old format for api-date\r\n\t\t// eslint-disable-next-line\r\n\t\tvar ddMMyyyyhhIIss = /^[0-9]{2}\\-[0-9]{2}\\-[0-9]{4} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/;\r\n\t\t// eslint-disable-next-line\r\n\t\tvar ISO8601 = /^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$/;\r\n\r\n\t\tvar isYMDDate = function (datestr) {\r\n\t\t\treturn yyyyMMddhhIIss.test(String(datestr));\r\n\t\t};\r\n\r\n\t\tvar isMDYDate = function (datestr) {\r\n\t\t\treturn MMddyyyyhhIIss.test(String(datestr));\r\n\t\t};\r\n\t\tvar isDMYDate = function (datestr) {\r\n\t\t\treturn ddMMyyyyhhIIss.test(String(datestr));\r\n\t\t};\r\n\t\tvar isISO8601 = function (datestr) {\r\n\t\t\treturn ISO8601.test(datestr);\r\n\t\t};\r\n\r\n\t\tvar parseYMD = stringToDateMethod(\"%Y-%m-%d %H:%i:%s\", utc);\r\n\t\tvar parseMDY = stringToDateMethod(\"%m/%d/%Y %H:%i:%s\", utc);\r\n\t\tvar parseDMY = stringToDateMethod(\"%d-%m-%Y %H:%i:%s\", utc);\r\n\r\n\t\treturn function (dateString) {\r\n\r\n\t\t\tif (!exactFormat && !scheduler.config.parse_exact_format) {\r\n\t\t\t\tif (dateString && dateString.getISOWeek) {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t} else if (typeof dateString === \"number\") {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t} else if (isYMDDate(dateString)) {\r\n\t\t\t\t\treturn parseYMD(dateString);\r\n\t\t\t\t} else if (isMDYDate(dateString)) {\r\n\t\t\t\t\treturn parseMDY(dateString);\r\n\t\t\t\t} else if (isDMYDate(dateString)) {\r\n\t\t\t\t\treturn parseDMY(dateString);\r\n\t\t\t\t} else if (isISO8601(dateString)) {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn parseExactFormat.call(scheduler, dateString);\r\n\t\t};\r\n\t},\r\n\tgetISOWeek: function(ndate) {\r\n\t\tif(!ndate) return false;\r\n\t\tndate = this.date_part(new Date(ndate));\r\n\t\tvar nday = ndate.getDay();\r\n\t\tif (nday === 0) {\r\n\t\t\tnday = 7;\r\n\t\t}\r\n\t\tvar first_thursday = new Date(ndate.valueOf());\r\n\t\tfirst_thursday.setDate(ndate.getDate() + (4 - nday));\r\n\t\tvar year_number = first_thursday.getFullYear(); // year of the first Thursday\r\n\t\tvar ordinal_date = Math.round( (first_thursday.getTime() - new Date(year_number, 0, 1).getTime()) / 86400000); //ordinal date of the first Thursday - 1 (so not really ordinal date)\r\n\t\tvar week_number = 1 + Math.floor( ordinal_date / 7);\r\n\t\treturn week_number;\r\n\t},\r\n\tgetUTCISOWeek: function(ndate){\r\n\t\treturn this.getISOWeek(this.convert_to_utc(ndate));\r\n\t},\r\n\tconvert_to_utc: function(date) {\r\n\t\treturn new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds());\r\n\t}\r\n};\r\n\r\n}\r\n\r\n","export default function(scheduler){\r\n\treturn (function(){\r\n\t\tvar res = {};\r\n\t\tfor (var a in this._events){\r\n\t\t\tvar ev = this._events[a];\r\n\t\t\tif (ev.id.toString().indexOf(\"#\") == -1){\r\n\t\t\t\tres[ev.id] = ev;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t}).bind(scheduler);\r\n}","import xmlLoaded from \"./loaders/xml\";\r\nimport jsonLoader from \"./loaders/json\";\r\nimport iCalLoader from \"./loaders/ical\";\r\nimport createSerializator from \"../core/common/get_serializable_events\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler._loaded = {};\r\nscheduler._load = function(url, from) {\r\n\turl = url || this._load_url;\r\n\r\n\tif(!url){\r\n\t\t//if scheduler.setLoadMode is called before scheduler.init, initial rendering will invoke data loading while url is undefined\r\n\t\treturn;\r\n\t}\r\n\r\n\turl += (url.indexOf(\"?\") == -1 ? \"?\" : \"&\") + \"timeshift=\" + (new Date()).getTimezoneOffset();\r\n\tif (this.config.prevent_cache) url += \"&uid=\" + this.uid();\r\n\tvar to;\r\n\tfrom = from || this._date;\r\n\tfunction ajaxCallback(response) {\r\n\t\tscheduler.on_load(response);\r\n\t\tscheduler.callEvent(\"onLoadEnd\", []);\r\n\t}\r\n\tif (this._load_mode) {\r\n\t\tvar lf = this.templates.load_format;\r\n\r\n\t\tfrom = this.date[this._load_mode + \"_start\"](new Date(from.valueOf()));\r\n\t\twhile (from > this._min_date) from = this.date.add(from, -1, this._load_mode);\r\n\t\tto = from;\r\n\r\n\t\tvar cache_line = true;\r\n\t\twhile (to < this._max_date) {\r\n\t\t\tto = this.date.add(to, 1, this._load_mode);\r\n\t\t\tif (this._loaded[lf(from)] && cache_line)\r\n\t\t\t\tfrom = this.date.add(from, 1, this._load_mode); else cache_line = false;\r\n\t\t}\r\n\r\n\t\tvar temp_to = to;\r\n\t\tdo {\r\n\t\t\tto = temp_to;\r\n\t\t\ttemp_to = this.date.add(to, -1, this._load_mode);\r\n\t\t} while (temp_to > from && this._loaded[lf(temp_to)]);\r\n\r\n\t\tif (to <= from)\r\n\t\t\treturn false; //already loaded\r\n\r\n\t\tscheduler.ajax.get(url + \"&from=\" + lf(from) + \"&to=\" + lf(to), ajaxCallback);\r\n\r\n\t\twhile (from < to) {\r\n\t\t\tthis._loaded[lf(from)] = true;\r\n\t\t\tfrom = this.date.add(from, 1, this._load_mode);\r\n\t\t}\r\n\t} else {\r\n\t\tscheduler.ajax.get(url, ajaxCallback);\r\n\t}\r\n\r\n\t// TODO: remove onXLS\r\n\tthis.callEvent(\"onXLS\", []);\r\n\tthis.callEvent(\"onLoadStart\", []);\r\n\treturn true;\r\n};\r\n\r\nscheduler._parsers = {};\r\n\r\n\r\nxmlLoaded(scheduler);\r\njsonLoader(scheduler);\r\niCalLoader(scheduler);\r\n\r\nscheduler.on_load = function (loader) {\r\n\tthis.callEvent(\"onBeforeParse\", []);\r\n\r\n\tvar evs;\r\n\tvar error = false;\r\n\r\n\tvar foundParser = false;\r\n\tfor(var i in this._parsers){\r\n\t\tvar parser = this._parsers[i];\r\n\t\tif(parser.canParse(loader.xmlDoc.responseText, loader.xmlDoc)){\r\n\t\t\ttry{\r\n\t\t\t\tvar param = loader.xmlDoc.responseText;\r\n\t\t\t\tif(i === \"xml\"){\r\n\t\t\t\t\tparam = loader;\r\n\t\t\t\t}\r\n\t\t\t\tevs = parser.parse(param);\r\n\t\t\t\tif(!evs){\r\n\t\t\t\t\terror = true;\r\n\t\t\t\t}\r\n\t\t\t}catch(e){\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\t\t\tfoundParser = true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif(!foundParser){\r\n\t\tif(this._process && this[this._process]){\r\n\t\t\ttry{\r\n\t\t\t\tevs = this[this._process].parse(loader.xmlDoc.responseText);\r\n\t\t\t}catch (e){\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\terror = true;\r\n\t\t}\r\n\t}\r\n\r\n\tif(error || (loader.xmlDoc.status && loader.xmlDoc.status >= 400)){\r\n\t\tthis.callEvent(\"onLoadError\", [loader.xmlDoc]);\r\n\t\tevs = [];\r\n\t}\r\n\r\n\tthis._process_loading(evs);\r\n\r\n\t// TODO: remove onXLE\r\n\tthis.callEvent(\"onXLE\", []);\r\n\tthis.callEvent(\"onParse\", []);\r\n};\r\nscheduler._process_loading = function(evs) {\r\n\tthis._loading = true;\r\n\tthis._not_render = true;\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tif (!this.callEvent(\"onEventLoading\", [evs[i]])) continue;\r\n\t\tthis.addEvent(evs[i]);\r\n\t}\r\n\tthis._not_render = false;\r\n\tif (this._render_wait) this.render_view_data();\r\n\r\n\tthis._loading = false;\r\n\tif (this._after_call) this._after_call();\r\n\tthis._after_call = null;\r\n};\r\nscheduler._init_event = function(event) {\r\n\tevent.text = (event.text || event._tagvalue) || \"\";\r\n\tevent.start_date = scheduler._init_date(event.start_date);\r\n\tevent.end_date = scheduler._init_date(event.end_date);\r\n};\r\n\r\nscheduler._init_date = function(date){\r\n\tif(!date)\r\n\t\treturn null;\r\n\tif (typeof date == \"string\") {\r\n\t\treturn scheduler._helpers.parseDate(date);\r\n\t}\r\n\telse return new Date(date);\r\n};\r\n\r\nconst getSerializableData = createSerializator(scheduler);\r\nscheduler.serialize = function(){\r\n\tconst dataset = [];\r\n\tconst allEvents = getSerializableData();\r\n\tfor (var a in allEvents){\r\n\t\t\r\n\t\tconst exportedEvent = {};\r\n\t\tvar ev = allEvents[a];\r\n\r\n\t\tfor(var key in ev){\r\n\t\t\tif (key.charAt(0) == \"$\" || key.charAt(0) == \"_\"){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tlet exportValue;\r\n\t\t\tconst rawValue = ev[key];\r\n\t\t\tif(scheduler.utils.isDate(rawValue)){\r\n\t\t\t\texportValue = scheduler.defined(scheduler.templates.xml_format) ? scheduler.templates.xml_format(rawValue) : scheduler.templates.format_date(rawValue);\r\n\t\t\t}else{\r\n\t\t\t\texportValue = rawValue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\texportedEvent[key] = exportValue;\r\n\t\t}\r\n\r\n\t\tdataset.push(exportedEvent);\r\n\t}\r\n\treturn dataset;\r\n};\r\n\r\n/*\r\nscheduler.json = {};\r\nscheduler.json.parse = function(data) {\r\n\r\n\tvar events = [];\r\n\r\n\tif (typeof data == \"string\") {\r\n\t\tdata = JSON.parse(data);\r\n\t}\r\n\tif (Object.prototype.toString.call(data) === '[object Array]') {\r\n\t\tevents = data;\r\n\t} else {\r\n\t\tif(data){\r\n\t\t\tif(data.events){\r\n\t\t\t\tevents = data.events;\r\n\t\t\t}else if(data.data){\r\n\t\t\t\tevents = data.data;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tevents = events || [];\r\n\r\n\tif (data.dhx_security) {\r\n\t\tif (window.dhtmlx) {\r\n\t\t\twindow.dhtmlx.security_key = data.dhx_security;\r\n\t\t}\r\n\t\tscheduler.security_key = data.dhx_security;\r\n\t}\r\n\r\n\tvar collections = (data && data.collections) ? data.collections : {};\r\n\tvar collections_loaded = false;\r\n\tfor (var key in collections) {\r\n\t\tif (collections.hasOwnProperty(key)) {\r\n\t\t\tcollections_loaded = true;\r\n\t\t\tvar collection = collections[key];\r\n\t\t\tvar arr = scheduler.serverList[key];\r\n\t\t\tif (!arr) {\r\n\t\t\t\tscheduler.serverList[key] = arr = [];\r\n\t\t\t}\r\n\t\t\tarr.splice(0, arr.length); //clear old options\r\n\t\t\tfor (var j = 0; j < collection.length; j++) {\r\n\t\t\t\tvar option = collection[j];\r\n\t\t\t\tvar obj = { key: option.value, label: option.label }; // resulting option object\r\n\t\t\t\tfor (var option_key in option) {\r\n\t\t\t\t\tif (option.hasOwnProperty(option_key)) {\r\n\t\t\t\t\t\tif (option_key == \"value\" || option_key == \"label\")\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\tobj[option_key] = option[option_key]; // obj['value'] = option['value']\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tarr.push(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (collections_loaded)\r\n\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\r\n\tvar evs = [];\r\n\tfor (var i = 0; i < events.length; i++) {\r\n\t\tvar event = events[i];\r\n\t\tscheduler._init_event(event);\r\n\t\tevs.push(event);\r\n\t}\r\n\treturn evs;\r\n};*/\r\nscheduler.parse = function(data, type) {\r\n\tthis._process = type;\r\n\tthis.on_load({xmlDoc: {responseText: data}});\r\n};\r\nscheduler.load = function(url, call) {\r\n\tif (typeof call == \"string\") {\r\n\t\tthis._process = call;\r\n\t\tcall = arguments[2];\r\n\t}\r\n\r\n\tthis._load_url = url;\r\n\tthis._after_call = call;\r\n\tthis._load(url, this._date);\r\n};\r\n//possible values - day,week,month,year,all\r\nscheduler.setLoadMode = function(mode) {\r\n\tif (mode == \"all\") mode = \"\";\r\n\tthis._load_mode = mode;\r\n};\r\n\r\nscheduler.serverList = function(name, array) {\r\n\tif (array) {\r\n\t\tthis.serverList[name] = array.slice(0);\r\n\t\treturn this.serverList[name];\r\n\t}\r\n\tthis.serverList[name] = (this.serverList[name] || []);\r\n\treturn this.serverList[name];\r\n};\r\nscheduler._userdata = {};\r\n\r\nscheduler._xmlNodeToJSON = function(node) {\r\n\tvar t = {};\r\n\tfor (var i = 0; i < node.attributes.length; i++)\r\n\t\tt[node.attributes[i].name] = node.attributes[i].value;\r\n\r\n\tfor (var i = 0; i < node.childNodes.length; i++) {\r\n\t\tvar child = node.childNodes[i];\r\n\t\tif (child.nodeType == 1)\r\n\t\t\tt[child.tagName] = child.firstChild ? child.firstChild.nodeValue : \"\";\r\n\t}\r\n\r\n\tif (!t.text) t.text = node.firstChild ? node.firstChild.nodeValue : \"\";\r\n\r\n\treturn t;\r\n};\r\nscheduler.attachEvent(\"onXLS\", function() {\r\n\tif (this.config.show_loading === true) {\r\n\t\tvar t;\r\n\t\tt = this.config.show_loading = document.createElement(\"div\");\r\n\t\tt.className = 'dhx_loading';\r\n\t\tt.style.left = Math.round((this._x - 128) / 2) + \"px\";\r\n\t\tt.style.top = Math.round((this._y - 15) / 2) + \"px\";\r\n\t\tthis._obj.appendChild(t);\r\n\t}\r\n});\r\nscheduler.attachEvent(\"onXLE\", function() {\r\n\tvar t = this.config.show_loading;\r\n\tif (t && typeof t == \"object\") {\r\n\t\tif(t.parentNode) {\r\n\t\t\tt.parentNode.removeChild(t);\r\n\t\t}\r\n\t\tthis.config.show_loading = true;\r\n\t}\r\n});\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._parsers.xml = {\r\n\tcanParse: function(data, xhr){\r\n\t\t// IE returns non-empty responseXML type regardless of actual data type\r\n\t\tif(xhr.responseXML && xhr.responseXML.firstChild){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\ttry{\r\n\t\t\tvar xmlDoc = scheduler.ajax.parse(xhr.responseText);\r\n\t\t\tvar topElement = scheduler.ajax.xmltop(\"data\", xmlDoc);\r\n\t\t\tif(topElement && topElement.tagName === \"data\"){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}catch (e){\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\tparse: function(loader) {\r\n\t\tvar xml;\r\n\r\n\t\tif (!loader.xmlDoc.responseXML) { //from a string\r\n\t\t\tloader.xmlDoc.responseXML = scheduler.ajax.parse(loader.xmlDoc.responseText);\r\n\t\t}\r\n\t\r\n\t\txml = scheduler.ajax.xmltop(\"data\", loader.xmlDoc);\r\n\t\tif (xml.tagName != \"data\") return null;//not an xml\r\n\t\tvar csrfToken = xml.getAttribute(\"dhx_security\");\r\n\t\tif (csrfToken) {\r\n\t\t\tif (window.dhtmlx) {\r\n\t\t\t\twindow.dhtmlx.security_key = csrfToken;\r\n\t\t\t}\r\n\t\t\tscheduler.security_key = csrfToken;\r\n\t\t}\r\n\t\r\n\t\tvar opts = scheduler.ajax.xpath(\"//coll_options\", loader.xmlDoc);\r\n\t\tfor (var i = 0; i < opts.length; i++) {\r\n\t\t\tvar bind = opts[i].getAttribute(\"for\");\r\n\t\t\tvar arr = scheduler.serverList[bind];\r\n\t\t\tif (!arr) {\r\n\t\t\t\tscheduler.serverList[bind] = arr = [];\r\n\t\t\t}\r\n\t\t\tarr.splice(0, arr.length);\t//clear old options\r\n\t\t\tvar itms = scheduler.ajax.xpath(\".//item\", opts[i]);\r\n\t\t\tfor (var j = 0; j < itms.length; j++) {\r\n\t\t\t\tvar itm = itms[j];\r\n\t\t\t\tvar attrs = itm.attributes;\r\n\t\t\t\tvar obj = { key: itms[j].getAttribute(\"value\"), label: itms[j].getAttribute(\"label\")};\r\n\t\t\t\tfor (var k = 0; k < attrs.length; k++) {\r\n\t\t\t\t\tvar attr = attrs[k];\r\n\t\t\t\t\tif (attr.nodeName == \"value\" || attr.nodeName == \"label\")\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\tobj[attr.nodeName] = attr.nodeValue;\r\n\t\t\t\t}\r\n\t\t\t\tarr.push(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (opts.length)\r\n\t\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\t\r\n\t\tvar ud = scheduler.ajax.xpath(\"//userdata\", loader.xmlDoc);\r\n\t\tfor (var i = 0; i < ud.length; i++) {\r\n\t\t\tvar udx = scheduler._xmlNodeToJSON(ud[i]);\r\n\t\t\tscheduler._userdata[udx.name] = udx.text;\r\n\t\t}\r\n\t\r\n\t\tvar evs = [];\r\n\t\txml = scheduler.ajax.xpath(\"//event\", loader.xmlDoc);\r\n\t\r\n\t\tfor (var i = 0; i < xml.length; i++) {\r\n\t\t\tvar ev = evs[i] = scheduler._xmlNodeToJSON(xml[i]);\r\n\t\t\tscheduler._init_event(ev);\r\n\t\t}\r\n\t\treturn evs;\r\n\t}\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler.json = scheduler._parsers.json = {\r\n\tcanParse: function(data){\r\n\t\tif(data && typeof data === \"object\"){\r\n\t\t\treturn true;\r\n\t\t} else if(typeof data === \"string\"){\r\n\t\t\ttry {\r\n\t\t\t\tvar result = JSON.parse(data);\r\n\t\t\t\treturn Object.prototype.toString.call(result) === '[object Object]' || \r\n\t\t\t\t\t\tObject.prototype.toString.call(result) === '[object Array]';\r\n\t\t\t} catch (err) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\tparse: function(data) {\r\n\t\tvar events = [];\r\n\r\n\t\tif (typeof data == \"string\") {\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\t\tif (Object.prototype.toString.call(data) === '[object Array]') {\r\n\t\t\tevents = data;\r\n\t\t} else {\r\n\t\t\tif(data){\r\n\t\t\t\tif(data.events){\r\n\t\t\t\t\tevents = data.events;\r\n\t\t\t\t}else if(data.data){\r\n\t\t\t\t\tevents = data.data;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tevents = events || [];\r\n\r\n\t\tif (data.dhx_security) {\r\n\t\t\tif (window.dhtmlx) {\r\n\t\t\t\twindow.dhtmlx.security_key = data.dhx_security;\r\n\t\t\t}\r\n\t\t\tscheduler.security_key = data.dhx_security;\r\n\t\t}\r\n\r\n\t\tvar collections = (data && data.collections) ? data.collections : {};\r\n\t\tvar collections_loaded = false;\r\n\t\tfor (var key in collections) {\r\n\t\t\tif (collections.hasOwnProperty(key)) {\r\n\t\t\t\tcollections_loaded = true;\r\n\t\t\t\tvar collection = collections[key];\r\n\t\t\t\tvar arr = scheduler.serverList[key];\r\n\t\t\t\tif (!arr) {\r\n\t\t\t\t\tscheduler.serverList[key] = arr = [];\r\n\t\t\t\t}\r\n\t\t\t\tarr.splice(0, arr.length); //clear old options\r\n\t\t\t\tfor (var j = 0; j < collection.length; j++) {\r\n\t\t\t\t\tvar option = collection[j];\r\n\t\t\t\t\tvar obj = { key: option.value, label: option.label }; // resulting option object\r\n\t\t\t\t\tfor (var option_key in option) {\r\n\t\t\t\t\t\tif (option.hasOwnProperty(option_key)) {\r\n\t\t\t\t\t\t\tif (option_key == \"value\" || option_key == \"label\")\r\n\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\tobj[option_key] = option[option_key]; // obj['value'] = option['value']\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tarr.push(obj);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (collections_loaded)\r\n\t\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\r\n\t\tvar evs = [];\r\n\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\tvar event = events[i];\r\n\t\t\tscheduler._init_event(event);\r\n\t\t\tevs.push(event);\r\n\t\t}\r\n\t\treturn evs;\r\n\t}\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler.ical = scheduler._parsers.ical = {\r\n\tcanParse: function(data){\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\treturn new RegExp(\"^BEGIN:VCALENDAR\").test(data);\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n\tparse:function(str){\r\n\t\tvar data = str.match(RegExp(this.c_start+\"[^\\f]*\"+this.c_end,\"\"));\r\n\t\tif (!data.length) return;\r\n\r\n\t\t// mpl: handle bad unfolding\r\n\t\tdata[0]=data[0].replace(/[\\r\\n]+ /g,\"\");\r\n\r\n\t\t//unfolding \r\n\t\tdata[0]=data[0].replace(/[\\r\\n]+(?=[a-z \\t])/g,\" \");\r\n\t\t//drop property\r\n\t\tdata[0]=data[0].replace(/;[^:\\r\\n]*:/g,\":\");\r\n\t\t\r\n\t\t\r\n\t\tvar incoming=[];\r\n\t\tvar match;\r\n\t\tvar event_r = RegExp(\"(?:\"+this.e_start+\")([^\\f]*?)(?:\"+this.e_end+\")\",\"g\");\r\n\t\twhile ((match=event_r.exec(data)) !== null){\r\n\t\t\tvar e={};\r\n\t\t\tvar param;\r\n\t\t\tvar param_r = /[^\\r\\n]+[\\r\\n]+/g;\r\n\t\t\twhile ((param=param_r.exec(match[1])) !== null)\r\n\t\t\t\tthis.parse_param(param.toString(),e);\r\n\t\t\tif (e.uid && !e.id) e.id = e.uid; //fallback to UID, when ID is not defined\r\n\t\t\tincoming.push(e);\t\r\n\t\t}\r\n\t\treturn incoming;\r\n\t},\r\n\tparse_param:function(str,obj){\r\n\t\tvar d = str.indexOf(\":\"); \r\n\t\t\tif (d==-1) return;\r\n\t\t\r\n\t\tvar name = str.substr(0,d).toLowerCase();\r\n\t\tvar value = str.substr(d+1).replace(/\\\\,/g,\",\").replace(/[\\r\\n]+$/,\"\");\r\n\t\tif (name==\"summary\")\r\n\t\t\tname=\"text\";\r\n\t\telse if (name==\"dtstart\"){\r\n\t\t\tname = \"start_date\";\r\n\t\t\tvalue = this.parse_date(value,0,0);\r\n\t\t}\r\n\t\telse if (name==\"dtend\"){\r\n\t\t\tname = \"end_date\";\r\n\t\t\tvalue = this.parse_date(value,0,0);\r\n\t\t}\r\n\t\tobj[name]=value;\r\n\t},\r\n\tparse_date:function(value,dh,dm){\r\n\t\tvar t = value.split(\"T\");\r\n\r\n\t\tvar utcMark = false;\r\n\t\tif (t[1]){\r\n\t\t\tdh=t[1].substr(0,2);\r\n\t\t\tdm=t[1].substr(2,2);\r\n\t\t\tutcMark = !!(t[1][6] == \"Z\");\r\n\t\t}\r\n\t\tvar dy = t[0].substr(0,4);\r\n\t\tvar dn = parseInt(t[0].substr(4,2),10)-1;\r\n\t\tvar dd = t[0].substr(6,2);\r\n\r\n\t\tif(scheduler.config.server_utc || utcMark){\r\n\t\t\treturn new Date(Date.UTC(dy,dn,dd,dh,dm)) ;\r\n\t\t}else{\r\n\t\t\treturn new Date(dy,dn,dd,dh,dm);\r\n\t\t}\r\n\t},\r\n\tc_start:\"BEGIN:VCALENDAR\",\r\n\te_start:\"BEGIN:VEVENT\",\r\n\te_end:\"END:VEVENT\",\r\n\tc_end:\"END:VCALENDAR\"\t\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._init_touch_events = function(){\r\n\tvar mobile = this.config.touch &&\r\n\t\t( ((navigator.userAgent.indexOf(\"Mobile\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"iPad\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"Android\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"Touch\")!=-1)) && !window.MSStream) ||\r\n\t\t\t((navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1));\r\n\r\n\tif(mobile){\r\n\t\tthis.xy.scroll_width = 0;\r\n\t\tthis._mobile = true;\r\n\t}\r\n\r\n\tif(this.config.touch){\r\n\r\n\t\tvar touchEventsSupported = true;\r\n\t\ttry {\r\n\t\t\tdocument.createEvent(\"TouchEvent\");\r\n\t\t} catch (e) {\r\n\t\t\ttouchEventsSupported = false;\r\n\t\t}\r\n\r\n\t\tif (touchEventsSupported) {\r\n\t\t\tthis._touch_events([\"touchmove\", \"touchstart\", \"touchend\"], function (ev) {\r\n\t\t\t\tif (ev.touches && ev.touches.length > 1) return null;\r\n\t\t\t\tif (ev.touches[0])\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\ttarget: ev.target,\r\n\t\t\t\t\t\tpageX: ev.touches[0].pageX,\r\n\t\t\t\t\t\tpageY: ev.touches[0].pageY,\r\n\t\t\t\t\t\tclientX: ev.touches[0].clientX,\r\n\t\t\t\t\t\tclientY: ev.touches[0].clientY\r\n\t\t\t\t\t};\r\n\t\t\t\telse\r\n\t\t\t\t\treturn ev;\r\n\t\t\t}, function () {\r\n\t\t\t\treturn false;\r\n\t\t\t});\r\n\t\t} else if (window.PointerEvent || window.navigator.pointerEnabled) {\r\n\t\t\tthis._touch_events([\"pointermove\", \"pointerdown\", \"pointerup\"], function (ev) {\r\n\t\t\t\tif (ev.pointerType == \"mouse\") return null;\r\n\t\t\t\treturn ev;\r\n\t\t\t}, function (ev) {\r\n\t\t\t\treturn (!ev || (ev.pointerType == \"mouse\" ));\r\n\t\t\t});\r\n\t\t} else if (window.navigator.msPointerEnabled) {\r\n\t\t\tthis._touch_events([\"MSPointerMove\", \"MSPointerDown\", \"MSPointerUp\"], function (ev) {\r\n\t\t\t\tif (ev.pointerType == ev.MSPOINTER_TYPE_MOUSE) return null;\r\n\t\t\t\treturn ev;\r\n\t\t\t}, function (ev) {\r\n\t\t\t\treturn (!ev || ev.pointerType == ev.MSPOINTER_TYPE_MOUSE);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n};\r\n\r\nscheduler._touch_events = function(names, accessor, ignore){\r\n\t//webkit on android need to be handled separately\r\n\t//var a_webkit = (navigator.userAgent.indexOf(\"Android\")!=-1) && (navigator.userAgent.indexOf(\"WebKit\")!=-1);\r\n\tvar source, tracker, timer, drag_mode, scroll_mode, action_mode;\r\n\tvar dblclicktime = 0;\r\n\r\n\tfunction attachTouchEvent(element, name, callback){\r\n\t\t//touch gestures must be disabled when ligthbox is opened\r\n\t\tscheduler.event(element, name, function(e){\r\n\t\t\tif(scheduler._is_lightbox_open()){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tif (ignore(e)) return;\r\n\t\t\t\treturn callback(e);\r\n\t\t\t}\r\n\t\t}, { passive: false });\r\n\t}\r\n\r\n\tfunction check_direction_swipe(s_ev, e_ev, step, max_dy){\r\n\t\tif (!s_ev || !e_ev) return false;\r\n\r\n\t\tvar t = s_ev.target;\r\n\t\twhile(t && t != scheduler._obj){\r\n\t\t\tt = t.parentNode;\r\n\t\t}\r\n\t\tif(t != scheduler._obj){\r\n\t\t\t//swipe outside scheduler\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// ignore swipe in horizontal timeline\r\n\t\tif(scheduler.matrix && scheduler.matrix[scheduler.getState().mode]){\r\n\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\tif(timeline.scrollable){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar dy = Math.abs(s_ev.pageY - e_ev.pageY);\r\n\t\tvar dx = Math.abs(s_ev.pageX - e_ev.pageX);\r\n\t\tif (dy < max_dy && dx>step && (!dy || (dx/dy > 3))){\r\n\t\t\tif (s_ev.pageX > e_ev.pageX) {\r\n\t\t\t\tscheduler._click.dhx_cal_next_button();\r\n\t\t\t}else {\r\n\t\t\t\tscheduler._click.dhx_cal_prev_button();\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\tfunction doMouseMove(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tvar dnd = scheduler.getState().drag_mode,\r\n\t\t\ttimeline = scheduler.matrix ? scheduler.matrix[scheduler._mode] : false;\r\n\r\n\t\tvar original_render = scheduler.render_view_data;\r\n\t\tif(dnd == 'create' && timeline){\r\n\t\t\t//suppress full redraw of timeline on creating event\r\n\t\t\tscheduler.render_view_data = function() {\r\n\t\t\t\tvar id = scheduler.getState().drag_id;\r\n\t\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\t\tvar property = timeline.y_property;\r\n\r\n\t\t\t\tvar evs = scheduler.getEvents(ev.start_date, ev.end_date);\r\n\t\t\t\tfor(var i = 0; i < evs.length; i++){\r\n\t\t\t\t\tif(evs[i][property] != ev[property]){\r\n\t\t\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tev._sorder = evs.length - 1;\r\n\t\t\t\tev._count = evs.length;\r\n\r\n\t\t\t\tthis.render_data([ev], scheduler.getState().mode);\r\n\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\tscheduler._on_mouse_move(e);\r\n\r\n\t\tif(dnd == 'create' && timeline){\r\n\t\t\tscheduler.render_view_data = original_render;\r\n\t\t}\r\n\r\n\t\tif (e.preventDefault)\r\n\t\t\te.preventDefault();\r\n\t\te.cancelBubble = true;\r\n\t\treturn false;\r\n\t}\r\n\r\n\t// touchmove\r\n\tattachTouchEvent(document.body, names[0], function(e){\r\n\t\tif (ignore(e)) return;\r\n\r\n\t\tvar acc = accessor(e);\r\n\t\tif(!acc) return;\r\n\t\tif (drag_mode){\r\n\t\t\tdoMouseMove(acc);\r\n\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._update_global_tip();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//if (tracker && a_webkit){\r\n\t\t//\tcheck_direction_swipe(tracker, accessor(e), 0);\r\n\t\t//}\r\n\r\n\t\ttracker = accessor(e);\r\n\t\t//ignore common and scrolling moves\r\n\t\tif (!action_mode) return;\r\n\r\n\t\t//multitouch\r\n\t\tif (!tracker){\r\n\t\t\tscroll_mode = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//target changed - probably in scroll mode\r\n\r\n\t\tif (source.target != tracker.target || (Math.abs(source.pageX - tracker.pageX) > 5) || (Math.abs(source.pageY - tracker.pageY) > 5)){\r\n\t\t\tscroll_mode = true;\r\n\t\t\tclearTimeout(timer);\r\n\t\t}\r\n\r\n\t});\r\n\r\n\t//attachTouchEvent(this._els[\"dhx_cal_data\"][0], \"scroll\", drag_cancel);\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], \"touchcancel\", drag_cancel);\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], \"contextmenu\", function(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tif (action_mode){\r\n\t\t\tif (e && e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t});\r\n\r\n\t// touchstart\r\n\tattachTouchEvent(this._obj, names[1], function(e){\r\n\t\t// block pull-to-refresh\r\n\t\tif(document && document.body){\r\n\t\t\tdocument.body.classList.add(\"dhx_cal_touch_active\");\r\n\t\t}\r\n\r\n\t\tif (ignore(e)) return;\r\n\t\tscheduler._pointerDragId = e.pointerId;\r\n\r\n\t\tvar fake_event;\r\n\t\tdrag_mode = scroll_mode = false;\r\n\t\taction_mode = true;\r\n\t\tfake_event = tracker = accessor(e);\r\n\r\n\t\tif (!fake_event){\r\n\t\t\tscroll_mode = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//dbl click\r\n\t\tvar now = new Date();\r\n\r\n\t\tif (!scroll_mode && !drag_mode && now - dblclicktime < 250){\r\n\t\t\tscheduler._click.dhx_cal_data(fake_event);\r\n\t\t\twindow.setTimeout(function(){\r\n\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t//fake_event.type = \"dblclick\";\r\n\t\t\t\tscheduler._on_dbl_click(fake_event);\r\n\t\t\t}, 50);\r\n\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._block_next_stop = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tdblclicktime = now;\r\n\r\n\t\t//drag\r\n\r\n\t\tif (scroll_mode || drag_mode || !scheduler.config.touch_drag)\r\n\t\t\treturn;\r\n\r\n\t\tvar actTask = scheduler._locate_event(document.activeElement);\r\n\t\tvar fakeTask = scheduler._locate_event(fake_event.target);\r\n\t\tvar sourceTask = source? scheduler._locate_event(source.target) : null;\r\n\r\n\t\tif(actTask && fakeTask && actTask == fakeTask && actTask != sourceTask)\r\n\t\t{\r\n\t\t\tif(e.preventDefault) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\tscheduler._click.dhx_cal_data(fake_event);\r\n\t\t\tsource = fake_event;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//there is no target\r\n\t\ttimer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tdrag_mode = true;\r\n\t\t\tvar target = source.target;\r\n\t\t\tvar className = scheduler._getClassName(target);\r\n\t\t\tif (target && className.indexOf(\"dhx_body\") != -1)\r\n\t\t\t\ttarget = target.previousSibling;\r\n\r\n\t\t\tscheduler._on_mouse_down(source, target);\r\n\t\t\tif (scheduler._drag_mode && scheduler._drag_mode != \"create\"){\r\n\t\t\t\tscheduler.for_rendered(scheduler._drag_id, function(node, i) {\r\n\t\t\t\t\tnode.style.display='none';\r\n\t\t\t\t\tscheduler._rendered.splice(i, 1);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (scheduler.config.touch_tip) {\r\n\t\t\t\tscheduler._show_global_tip();\r\n\t\t\t}\r\n\t\t\tscheduler.updateEvent(scheduler._drag_id);\r\n\t\t},scheduler.config.touch_drag);\r\n\r\n\t\tsource = fake_event;\r\n\t});\r\n\tfunction drag_cancel(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tscheduler._hide_global_tip();\r\n\t\tif (drag_mode){\r\n\t\t\tscheduler._on_mouse_up( accessor(e) );\r\n\t\t\tscheduler._temp_touch_block = false;\r\n\t\t}\r\n\t\tscheduler._drag_id = null;\r\n\t\tscheduler._drag_mode=null;\r\n\t\tscheduler._drag_pos=null;\r\n\t\tscheduler._pointerDragId = null;\r\n\t\tclearTimeout(timer);\r\n\t\tdrag_mode = action_mode = false;\r\n\t\tscroll_mode = true;\r\n\t}\r\n\r\n\t// touch end\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], names[2], function(e){\r\n\t\tif(document && document.body){\r\n\t\t\tdocument.body.classList.remove(\"dhx_cal_touch_active\");\r\n\t\t}\r\n\r\n\t\tif (ignore(e)) return;\r\n\r\n\t\tif(scheduler.config.touch_swipe_dates){\r\n\t\t\tif (!drag_mode && check_direction_swipe(source, tracker, 200, 100)) {\r\n\t\t\t\tscheduler._block_next_stop = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (drag_mode) {\r\n\t\t\tscheduler._ignore_next_click = true;\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\t}, 100);\r\n\t\t}\r\n\r\n\t\tdrag_cancel(e);\r\n\t\tif (scheduler._block_next_stop){\r\n\t\t\tscheduler._block_next_stop = false;\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler.event(document.body, names[2], drag_cancel);\r\n};\r\n\r\nscheduler._show_global_tip = function(){\r\n\tscheduler._hide_global_tip();\r\n\r\n\tvar toptip = scheduler._global_tip = document.createElement(\"div\");\r\n\ttoptip.className='dhx_global_tip';\r\n\r\n\tscheduler._update_global_tip(1);\r\n\r\n\tdocument.body.appendChild(toptip);\r\n};\r\nscheduler._update_global_tip = function(init){\r\n\tvar toptip = scheduler._global_tip;\r\n\tif (toptip){\r\n\t\tvar time = \"\";\r\n\t\tif (scheduler._drag_id && !init){\r\n\t\t\tvar ev = scheduler.getEvent(scheduler._drag_id);\r\n\t\t\tif (ev)\r\n\t\t\t\ttime = \"
\" + (ev._timed ? scheduler.templates.event_header(ev.start_date, ev.end_date, ev):scheduler.templates.day_date(ev.start_date, ev.end_date, ev)) + \"
\";\r\n\t\t}\r\n\r\n\t\tif (scheduler._drag_mode == \"create\" || scheduler._drag_mode == \"new-size\")\r\n\t\t\ttoptip.innerHTML = (scheduler.locale.labels.drag_to_create || \"Drag to create\")+time;\r\n\t\telse\r\n\t\t\ttoptip.innerHTML = (scheduler.locale.labels.drag_to_move || \"Drag to move\")+time;\r\n\t}\r\n};\r\nscheduler._hide_global_tip = function(){\r\n\tvar toptip = scheduler._global_tip;\r\n\tif (toptip && toptip.parentNode){\r\n\t\ttoptip.parentNode.removeChild(toptip);\r\n\t\tscheduler._global_tip = 0;\r\n\t}\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._addThemeClass = function(){\r\n\tdocument.documentElement.setAttribute(\"data-scheduler-theme\", scheduler.skin);\r\n};\r\n\r\nscheduler._skin_settings = {\r\n\tfix_tab_position: [1,0],\r\n\tuse_select_menu_space: [1,0],\r\n\twide_form: [1,0],\r\n\r\n\thour_size_px: [44,42],\r\n\tdisplayed_event_color: [\"#ff4a4a\", \"ffc5ab\"],\r\n\tdisplayed_event_text_color: [\"#ffef80\", \"7e2727\"]\r\n};\r\n\r\nscheduler._skin_xy = {\r\n\tlightbox_additional_height: [90,50],\r\n\tnav_height: [59,22],\r\n\tbar_height: [24,20]\r\n};\r\n\r\n// material skin uses a different box sizing model than other skins, and also requires some post-processing.\r\n// In order to render events correctly, we need to know which box sizing model is used\r\n// We can detect it by styles applied, taking into account that styles may be loaded after scheduler is rendered\r\n\r\nscheduler._is_material_skin = function(){\r\n\tif(!scheduler.skin){\r\n\t\treturn checkIfMaterialSkin();\r\n\t}else{\r\n\t\treturn ((scheduler.skin + \"\").indexOf(\"material\") > -1);\r\n\t}\r\n};\r\n\r\nfunction themeNameFromFile(){\r\n\tvar links = document.getElementsByTagName(\"link\");\r\n\tfor (var i = 0; i < links.length; i++) {\r\n\t\tvar res = links[i].href.match(\"dhtmlxscheduler_([a-z]+).css\");\r\n\t\tif (res){\r\n\t\t\treturn res[1];\r\n\t\t}\r\n\t}\r\n}\r\n\r\nscheduler._build_skin_info = function() {\r\n\tmonitorThemeChange();\r\n\tconst styles = getComputedStyle(this.$container);\r\n\tconst themeVar = styles.getPropertyValue(\"--dhx-scheduler-theme\");\r\n\r\n\tlet isCssVarTheme = !!themeVar;\r\n\tlet themeName;\r\n\tlet cssValues = {};\r\n\tlet oldMaterialTheme = false;\r\n\r\n\tif(isCssVarTheme){\r\n\t\tthemeName = themeVar;\r\n\t\tfor(let i in scheduler.xy){\r\n\t\t\tcssValues[i] = styles.getPropertyValue(`--dhx-scheduler-xy-${i}`);\r\n\t\t}\r\n\r\n\t\tcssValues.hour_size_px = styles.getPropertyValue(`--dhx-scheduler-config-hour_size_px`);\r\n\t\tcssValues.wide_form = styles.getPropertyValue(`--dhx-scheduler-config-form_wide`);\r\n\r\n\t}else{\r\n\t\tthemeName = themeNameFromFile();\r\n\t\toldMaterialTheme = scheduler._is_material_skin();\r\n\t}\r\n\r\n\r\n\tscheduler._theme_info = {\r\n\t\ttheme: themeName,\r\n\t\tcssVarTheme: isCssVarTheme,\r\n\t\toldMaterialTheme: oldMaterialTheme,\r\n\t\tvalues: cssValues\r\n\t};\r\n\r\n\tif(scheduler._theme_info.cssVarTheme){\r\n\t\tconst themeVariables = this._theme_info.values;\r\n\t\tfor(let i in scheduler.xy){\r\n\t\t\tif(!isNaN(parseInt(themeVariables[i]))){\r\n\t\t\t\tscheduler.xy[i] = parseInt(themeVariables[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n\r\nvar calculatedMaterial;\r\nfunction checkIfMaterialSkin(){\r\n\tif(calculatedMaterial === undefined){\r\n\t\tvar probe = document.createElement(\"div\");\r\n\t\tprobe.style.position = \"absolute\";\r\n\t\tprobe.style.left = \"-9999px\";\r\n\t\tprobe.style.top = \"-9999px\";\r\n\t\tprobe.innerHTML = \"
\" +\r\n\t\t\t\"
\" +\r\n\t\t\t\"
\"+\r\n\t\t\"
\";\r\n\t\tdocument.body.appendChild(probe);\r\n\t\tvar styles = window.getComputedStyle(probe.querySelector(\".dhx_cal_scale_placeholder\"));\r\n\t\tvar position = styles.getPropertyValue('position');\r\n\t\tif(position === \"absolute\"){\r\n\t\t\t// page has skins for placeholder element from material skin\r\n\t\t\tcalculatedMaterial = true;\r\n\t\t}else{\r\n\t\t\tcalculatedMaterial = false;\r\n\t\t}\r\n\r\n\t\tsetTimeout(function(){\r\n\t\t\tcalculatedMaterial = null;\r\n\t\t\tif(probe && probe.parentNode){\r\n\t\t\t\tprobe.parentNode.removeChild(probe);\r\n\t\t\t}\r\n\t\t}, 500);\r\n\t}\r\n\treturn calculatedMaterial;\r\n}\r\n\r\nvar cachedBorderBoxValue;\r\nfunction checkIfBorderBoxStyling(){\r\n\tif(scheduler._is_material_skin()){\r\n\t\treturn true;\r\n\t}else{\r\n\t\tif(cachedBorderBoxValue === undefined){\r\n\t\t\tvar probe = document.createElement(\"div\");\r\n\t\t\tprobe.style.position = \"absolute\";\r\n\t\t\tprobe.style.left = \"-9999px\";\r\n\t\t\tprobe.style.top = \"-9999px\";\r\n\t\t\tprobe.innerHTML = \"
\" +\r\n\t\t\t\t\"
\" +\r\n\t\t\t\t\t\"
\"+\r\n\t\t\t\t\"
\"+\r\n\t\t\t\"
\";\r\n\r\n\t\t\tdocument.body.appendChild(probe);\r\n\t\t\tvar styles = window.getComputedStyle(probe.querySelector(\".dhx_body\"));\r\n\t\t\tvar boxSizing = styles.getPropertyValue('box-sizing');\r\n\t\t\tdocument.body.removeChild(probe);\r\n\t\t\tcachedBorderBoxValue = !!(boxSizing === \"border-box\");\r\n\r\n\t\t\tif(!cachedBorderBoxValue){\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tcachedBorderBoxValue = undefined;\r\n\t\t\t\t}, 1000);// recalculate in case scheduler initialized before skin is loaded\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn cachedBorderBoxValue;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction refreshAfterLoad(){\r\n\tif(scheduler._is_material_skin() || scheduler._border_box_events()){\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar oldStyling = cachedBorderBoxValue;\r\n\tcachedBorderBoxValue = undefined;\r\n\tcalculatedMaterial = undefined;\r\n\tvar newStyling = checkIfBorderBoxStyling();\r\n\r\n\t// if box styling model changed - means scheduler was rendered before stylesheet was loaded or parsed inline\r\n\t// repaint scheduler in order to apply new styles\r\n\tif(oldStyling !== newStyling && scheduler.$container && scheduler.getState().mode){\r\n\t\tscheduler.setCurrentView();\r\n\t}\r\n}\r\nscheduler.event(window, 'DOMContentLoaded', refreshAfterLoad);\r\nscheduler.event(window, 'load', refreshAfterLoad);\r\n\r\nscheduler._border_box_events = function(){\r\n\treturn checkIfBorderBoxStyling();\r\n};\r\n\r\nscheduler._configure = function(col, data, skin){\r\n\tfor (var key in data)\r\n\t\tif (typeof col[key] == \"undefined\")\r\n\t\t\tcol[key] = data[key][skin];\r\n};\r\n\r\nscheduler.setSkin = function(value){\r\n\tthis.skin = value;\r\n\tscheduler._addThemeClass();\r\n\tif(scheduler.$container){\r\n\t\tthis._skin_init();\r\n\t\tthis.render();\r\n\t}\r\n\t\r\n\t//\r\n};\r\n\r\nfunction flatSkinHourScale(date){\r\n\tvar min = date.getMinutes();\r\n\tmin = min < 10 ? \"0\"+min : min;\r\n\tvar html = \"\"+ date.getHours() +\"\"+\r\n\t\t\" \"+ min +\"\";\r\n\treturn html;\r\n}\r\n\r\nlet monitorIntervalId = null;\r\nfunction monitorThemeChange(){\r\n\tconst container = scheduler.$container;\r\n\t\r\n\tclearInterval(monitorIntervalId);\r\n\tif(container){\r\n\t\tmonitorIntervalId = setInterval(() => {\r\n\t\t\tconst csstheme = getComputedStyle(container).getPropertyValue('--dhx-scheduler-theme');\r\n\t\t\tif(csstheme && csstheme !== scheduler.skin){\r\n\t\t\t\tscheduler.setSkin(csstheme);\r\n\t\t\t}\r\n\r\n\t\t}, 100);\r\n\t}\r\n}\r\nscheduler.attachEvent(\"onDestroy\", function(){\r\n\tclearInterval(monitorIntervalId);\r\n});\r\n\r\nscheduler._skin_init = function(){\r\n\tthis._build_skin_info();\r\n\r\n\tif (!this.skin){\r\n\t\tthis.skin = this._theme_info.theme;\r\n\t}\r\n\tscheduler._addThemeClass();\r\n\tif (scheduler.skin === \"flat\"){\r\n\t\t// scheduler.xy.scale_height = 35;\r\n\t\tscheduler.templates.hour_scale = flatSkinHourScale;\r\n\t}else if (scheduler.templates.hour_scale === flatSkinHourScale){\r\n\t\tscheduler.templates.hour_scale = scheduler.date.date_to_str(scheduler.config.hour_date);\r\n\t}\r\n\r\n\r\n\r\n\t//scheduler._lightbox_template=\"
 
\";\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\r\n\t\tvar date_to_str = scheduler.date.date_to_str(\"%d\");\r\n\t\tif(!scheduler.templates._old_month_day){\r\n\t\t\tscheduler.templates._old_month_day = scheduler.templates.month_day;\r\n\t\t}\r\n\t\tvar old_month_day = scheduler.templates._old_month_day;\r\n\t\tscheduler.templates.month_day = function(date) {\r\n\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\tvar label = date_to_str(date);\r\n\t\t\t\tif (date.getDate() == 1) {\r\n\t\t\t\t\tlabel = scheduler.locale.date.month_full[date.getMonth()] + \" \" + label;\r\n\t\t\t\t}\r\n\t\t\t\tif (+date == +scheduler.date.date_part(this._currentDate())) {\r\n\t\t\t\t\tlabel = scheduler.locale.labels.dhx_cal_today_button + \" \" + label;\r\n\t\t\t\t}\r\n\t\t\t\treturn label;\r\n\t\t\t} else {\r\n\t\t\t\treturn old_month_day.call(this, date);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t// tab classes\r\n\t\tif(scheduler.config.fix_tab_position){\r\n\t\t\tconst tabs = scheduler._els[\"dhx_cal_navline\"][0].querySelectorAll('[data-tab]');\r\n\t\t\ttabs.forEach((tab) => {\r\n\t\t\t\tconst view = tab.getAttribute(\"data-tab\") || tab.getAttribute(\"name\");\r\n\r\n\t\t\t\tswitch (view) {\r\n\t\t\t\t\tcase \"day\":\r\n\t\t\t\t\tcase \"day_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_first\");\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"week\":\r\n\t\t\t\t\tcase \"week_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"month\":\r\n\t\t\t\t\tcase \"month_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_last\");\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_standalone\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\treorderTabs(scheduler._els[\"dhx_cal_navline\"][0]);\r\n\r\n\t\t}\r\n\t}, {once: true});\r\n\r\n\tfunction reorderTabs(container) {\r\n\t\t// segmented tabs should go first\r\n\r\n\t\tif(scheduler.config.header){\r\n\t\t\treturn;\r\n\t\t\t// don't reorder tabs if header is defined via config\r\n\t\t}\r\n\t\tconst tabs = Array.from(container.querySelectorAll('.dhx_cal_tab'));\r\n\t\r\n\t\t// segmented tabs\r\n\t\tconst order = ['day', 'week', 'month'];\r\n\t\r\n\t\tconst specialTabs = order.map(tabName => \r\n\t\t\ttabs.find(tab => tab.getAttribute('data-tab') === tabName)\r\n\t\t).filter(tab => tab !== undefined);\r\n\t\r\n\t\tlet firstTab = tabs.length > 0 ? tabs[0] : null;\r\n\r\n\t\tspecialTabs.reverse().forEach(tab => {\r\n\t\t\tcontainer.insertBefore(tab, firstTab);\r\n\t\t\tfirstTab = tab;\r\n\t\t});\r\n\t}\r\n\r\n\t// scheduler._skin_init = function(){\r\n\t// \tthis._build_skin_info();\r\n\t// \tthis.skin = this._theme_info.theme;\r\n\t// };\r\n};\r\n\r\n\r\n\r\n}","export default function DataProcessorEvents(scheduler, dp){\r\n\tthis.$scheduler = scheduler;\r\n\tthis.$dp = dp;\r\n\tthis._dataProcessorHandlers = [];\r\n\r\n\tthis.attach = function () {\r\n\t\tvar dp = this.$dp;\r\n\t\tvar scheduler = this.$scheduler;\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onEventAdded\", function(id) {\r\n\t\t\tif (!this._loading && this._validId(id))\r\n\t\t\tdp.setUpdated(id,true,\"inserted\");\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function(id) {\r\n\t\t\tif (!this._validId(id)) return;\r\n\t\t\tvar z=dp.getState(id);\r\n\r\n\t\t\tif (z==\"inserted\" || this._new_event) { dp.setUpdated(id,false); return true; }\r\n\t\t\tif (z==\"deleted\") return false;\r\n\t\t\tif (z==\"true_deleted\") return true;\r\n\r\n\t\t\tdp.setUpdated(id,true,\"deleted\");\r\n\t\t\treturn false;\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onEventChanged\", function(id) { \r\n\t\t\tif (!this._loading && this._validId(id))\r\n\t\t\tdp.setUpdated(id,true,\"updated\");\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onClearAll\", function() { \r\n\t\t\t// clear dataprocessor state when scheduler is reset\r\n\t\t\tdp._in_progress={};\r\n\t\t\tdp._invalid={};\r\n\t\t\tdp.updatedRows = [];\r\n\t\t\tdp._waitMode = 0;\r\n\t\t}));\r\n\r\n\t\tdp.attachEvent(\"insertCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"updateCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"deleteCallback\", function(upd, id) {\r\n\t\t\tif (scheduler.getEvent(id)){\r\n\t\t\t\tscheduler.setUserData(id, this.action_param, \"true_deleted\");\r\n\t\t\t\tscheduler.deleteEvent(id);\r\n\t\t\t} else if (scheduler._add_rec_marker)\r\n\t\t\t\tscheduler._update_callback(upd, id);\r\n\t\t});\r\n\t};\r\n\r\n\tthis.detach = function () {\r\n\t\tfor (var key in this._dataProcessorHandlers) {\r\n\t\t\tvar handler = this._dataProcessorHandlers[key];\r\n\t\t\tthis.$scheduler.detachEvent(handler);\r\n\t\t}\r\n\t\tthis._dataProcessorHandlers = [];\r\n\t};\r\n}\r\n\r\nexport function extendScheduler(scheduler, dp){\r\n\tscheduler._validId=function(id){\r\n\t\tif(this._is_virtual_event){\r\n\t\t\treturn !this._is_virtual_event(id);\r\n\t\t}\r\n\t\treturn true;\r\n\t};\r\n\tscheduler.setUserData=function(id,name,value){\r\n\t\tif (id){\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif(ev) ev[name]=value;\r\n\t\t}else{\r\n\t\t\tthis._userdata[name]=value;\r\n\t\t}\r\n\t};\r\n\tscheduler.getUserData=function(id,name){\r\n\t\tif (id){\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif(ev)\r\n\t\t\t\treturn ev[name];\r\n\t\t\telse\r\n\t\t\t\treturn null;\r\n\t\t}else{\r\n\t\t\treturn this._userdata[name];\r\n\t\t}\r\n\t};\r\n\tscheduler._set_event_text_style=function(id,style){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\t\tthis.for_rendered(id,function(r){\r\n\t\t\tr.style.cssText+=\";\"+style;\r\n\t\t});\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tev[\"_text_style\"]=style;\r\n\t\tthis.event_updated(ev);\r\n\t};\r\n\tscheduler._update_callback = function(upd,id){\r\n\t\tvar data = scheduler._xmlNodeToJSON(upd.firstChild);\r\n\t\t//fix for updates of recurring events\r\n\t\tif (data.rec_type == \"none\") data.rec_pattern = \"none\";\r\n\t\tdata.text = data.text||data._tagvalue;\r\n\t\tdata.start_date = scheduler._helpers.parseDate(data.start_date);\r\n\t\tdata.end_date = scheduler._helpers.parseDate(data.end_date);\r\n\t\tscheduler.addEvent(data);\r\n\t\tif (scheduler._add_rec_marker)\r\n\t\t\tscheduler.setCurrentView();\r\n\t};\r\n\tscheduler._dp_change_event_id = function(id, new_id){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\t\tscheduler.changeEventId(id, new_id);\r\n\t};\r\n\tscheduler._dp_hook_delete = function(id, new_id){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\r\n\t\tif(new_id && id != new_id){\r\n\t\t\tif(this.getUserData(id, dp.action_param) == \"true_deleted\")\r\n\t\t\t\tthis.setUserData(id, dp.action_param, \"updated\");\r\n\r\n\t\t\tthis.changeEventId(id, new_id);\r\n\t\t}\r\n\t\treturn this.deleteEvent(new_id, true);\r\n\t};\r\n\r\n\tscheduler.setDp = function() {\r\n\t\tthis._dp = dp;\r\n\t};\r\n\tscheduler.setDp();\r\n}","import DataProcessorEvents from \"./dataprocessor_hooks\";\r\nimport { extendScheduler } from \"./dataprocessor_hooks\";\r\nimport eventable from \"../../utils/eventable\";\r\nimport global from \"../../global\";\r\n\r\n/**\r\n *\t@desc: constructor, data processor object\r\n *\t@param: serverProcessorURL - url used for update\r\n *\t@type: public\r\n */\r\nexport function DataProcessor(serverProcessorURL){\r\n\tthis.serverProcessor = serverProcessorURL;\r\n\tthis.action_param = \"!nativeeditor_status\";\r\n\r\n\tthis.object = null;\r\n\tthis.updatedRows = []; // ids of updated rows\r\n\r\n\tthis.autoUpdate = true;\r\n\tthis.updateMode = \"cell\";\r\n\tthis._tMode = \"GET\";\r\n\tthis._headers = null;\r\n\tthis._payload = null;\r\n\tthis.post_delim = \"_\";\r\n\r\n\tthis._waitMode = 0;\r\n\tthis._in_progress = {};\r\n\tthis._invalid = {};\r\n\tthis.messages = [];\r\n\r\n\tthis.styles = {\r\n\t\tupdated: \"font-weight:bold;\",\r\n\t\tinserted: \"font-weight:bold;\",\r\n\t\tdeleted: \"text-decoration : line-through;\",\r\n\t\tinvalid: \"background-color:FFE0E0;\",\r\n\t\tinvalid_cell: \"border-bottom:2px solid red;\",\r\n\t\terror: \"color:red;\",\r\n\t\tclear: \"font-weight:normal;text-decoration:none;\"\r\n\t};\r\n\tthis.enableUTFencoding(true);\r\n\teventable(this); // TODO: need to update\r\n\r\n\treturn this;\r\n}\r\nDataProcessor.prototype = {\r\n\tsetTransactionMode: function (mode, total) {\r\n\t\tif (typeof mode == \"object\") {\r\n\t\t\tthis._tMode = mode.mode || this._tMode;\r\n\r\n\t\t\tif (mode.headers !== undefined) {\r\n\t\t\t\tthis._headers = mode.headers;\r\n\t\t\t}\r\n\r\n\t\t\tif (mode.payload !== undefined) {\r\n\t\t\t\tthis._payload = mode.payload;\r\n\t\t\t}\r\n\t\t\tthis._tSend = !!total;\r\n\t\t} else {\r\n\t\t\tthis._tMode = mode;\r\n\t\t\tthis._tSend = total;\r\n\t\t}\r\n\r\n\t\tif (this._tMode == \"REST\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t}\r\n\r\n\t\tif (this._tMode === \"JSON\" || this._tMode === \"REST-JSON\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t\tthis._serializeAsJson = true;\r\n\t\t\tthis._headers = this._headers || {};\r\n\t\t\tthis._headers[\"Content-Type\"] = \"application/json\";\r\n\t\t}else{\r\n\t\t\tif(this._headers && !this._headers[\"Content-Type\"]){\r\n\t\t\t\tthis._headers[\"Content-Type\"] = \"application/x-www-form-urlencoded\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (this._tMode === \"CUSTOM\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t\tthis._router = mode.router;\r\n\t\t}\r\n\t},\r\n\tescape: function (data) {\r\n\t\tif (this._utf)\r\n\t\t\treturn encodeURIComponent(data);\r\n\t\telse\r\n\t\t\treturn escape(data);\r\n\t},\r\n\t/**\r\n\t *\t@desc: allows to set escaping mode\r\n\t *\t@param: true - utf based escaping, simple - use current page encoding\r\n\t *\t@type: public\r\n\t */\r\n\tenableUTFencoding: function (mode) {\r\n\t\tthis._utf = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: allows to define, which column may trigger update\r\n\t *\t@param: val - array or list of true/false values\r\n\t *\t@type: public\r\n\t */\r\n\tsetDataColumns: function (val) {\r\n\t\tthis._columns = (typeof val == \"string\") ? val.split(\",\") : val;\r\n\t},\r\n\t/**\r\n\t *\t@desc: get state of updating\r\n\t *\t@returns: true - all in sync with server, false - some items not updated yet.\r\n\t *\t@type: public\r\n\t */\r\n\tgetSyncState: function () {\r\n\t\treturn !this.updatedRows.length;\r\n\t},\r\n\t/**\r\n\t *\t@desc: enable/disable named field for data syncing, will use column ids for grid\r\n\t *\t@param: mode - true/false\r\n\t *\t@type: public\r\n\t */\r\n\tenableDataNames: function (mode) {\r\n\t\tthis._endnm = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: enable/disable mode , when only changed fields and row id send to the server side, instead of all fields in default mode\r\n\t *\t@param: mode - true/false\r\n\t *\t@type: public\r\n\t */\r\n\tenablePartialDataSend: function (mode) {\r\n\t\tthis._changed = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: set if rows should be send to server automatically\r\n\t *\t@param: mode - \"row\" - based on row selection changed, \"cell\" - based on cell editing finished, \"off\" - manual data sending\r\n\t *\t@type: public\r\n\t */\r\n\tsetUpdateMode: function (mode, dnd) {\r\n\t\tthis.autoUpdate = (mode == \"cell\");\r\n\t\tthis.updateMode = mode;\r\n\t\tthis.dnd = dnd;\r\n\t},\r\n\tignore: function (code, master) {\r\n\t\tthis._silent_mode = true;\r\n\t\tcode.call(master || window);\r\n\t\tthis._silent_mode = false;\r\n\t},\r\n\t/**\r\n\t *\t@desc: mark row as updated/normal. check mandatory fields,initiate autoupdate (if turned on)\r\n\t *\t@param: rowId - id of row to set update-status for\r\n\t *\t@param: state - true for \"updated\", false for \"not updated\"\r\n\t *\t@param: mode - update mode name\r\n\t *\t@type: public\r\n\t */\r\n\tsetUpdated: function (rowId, state, mode) {\r\n\t\tif (this._silent_mode) return;\r\n\t\tvar ind = this.findRow(rowId);\r\n\r\n\t\tmode = mode || \"updated\";\r\n\t\tvar existing = this.$scheduler.getUserData(rowId, this.action_param);\r\n\t\tif (existing && mode == \"updated\") mode = existing;\r\n\t\tif (state) {\r\n\t\t\tthis.set_invalid(rowId, false); //clear previous error flag\r\n\t\t\tthis.updatedRows[ind] = rowId;\r\n\t\t\tthis.$scheduler.setUserData(rowId, this.action_param, mode);\r\n\t\t\tif (this._in_progress[rowId])\r\n\t\t\t\tthis._in_progress[rowId] = \"wait\";\r\n\t\t} else {\r\n\t\t\tif (!this.is_invalid(rowId)) {\r\n\t\t\t\tthis.updatedRows.splice(ind, 1);\r\n\t\t\t\tthis.$scheduler.setUserData(rowId, this.action_param, \"\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.markRow(rowId, state, mode);\r\n\t\tif (state && this.autoUpdate) this.sendData(rowId);\r\n\t},\r\n\r\n\tmarkRow: function (id, state, mode) {\r\n\t\tvar str = \"\";\r\n\t\tvar invalid = this.is_invalid(id);\r\n\t\tif (invalid) {\r\n\t\t\tstr = this.styles[invalid];\r\n\t\t\tstate = true;\r\n\t\t}\r\n\t\tif (this.callEvent(\"onRowMark\", [id, state, mode, invalid])) {\r\n\t\t\t//default logic\r\n\t\t\tstr = this.styles[state ? mode : \"clear\"] + str;\r\n\r\n\t\t\tthis.$scheduler[this._methods[0]](id, str);\r\n\r\n\t\t\tif (invalid && invalid.details) {\r\n\t\t\t\tstr += this.styles[invalid + \"_cell\"];\r\n\t\t\t\tfor (var i = 0; i < invalid.details.length; i++)\r\n\t\t\t\t\tif (invalid.details[i])\r\n\t\t\t\t\t\tthis.$scheduler[this._methods[1]](id, i, str);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tgetActionByState: function(state) {\r\n\t\tif (state === \"inserted\") {\r\n\t\t\treturn \"create\";\r\n\t\t}\r\n\t\tif (state === \"updated\") {\r\n\t\t\treturn \"update\";\r\n\t\t}\r\n\t\tif (state === \"deleted\") {\r\n\t\t\treturn \"delete\";\r\n\t\t}\r\n\t\treturn \"update\";\r\n\t},\r\n\r\n\tgetState: function (id) {\r\n\t\treturn this.$scheduler.getUserData(id, this.action_param);\r\n\t},\r\n\tis_invalid: function (id) {\r\n\t\treturn this._invalid[id];\r\n\t},\r\n\tset_invalid: function (id, mode, details) {\r\n\t\tif (details) mode = {\r\n\t\t\tvalue: mode, details: details, toString: function () {\r\n\t\t\t\treturn this.value.toString();\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis._invalid[id] = mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: check mandatory fields and varify values of cells, initiate update (if specified)\r\n\t *\t@param: rowId - id of row to set update-status for\r\n\t *\t@type: public\r\n\t */\r\n\tcheckBeforeUpdate: function (rowId) {\r\n\t\treturn true;\r\n\t},\r\n\t/**\r\n\t *\t@desc: send row(s) values to server\r\n\t *\t@param: rowId - id of row which data to send. If not specified, then all \"updated\" rows will be send\r\n\t *\t@type: public\r\n\t */\r\n\tsendData: function (rowId) {\r\n\t\tif (this.$scheduler.editStop) this.$scheduler.editStop();\r\n\r\n\t\tif (typeof rowId == \"undefined\" || this._tSend) return this.sendAllData();\r\n\t\tif (this._in_progress[rowId]) return false;\r\n\r\n\t\tthis.messages = [];\r\n\t\tif (!this.checkBeforeUpdate(rowId) && this.callEvent(\"onValidationError\", [rowId, this.messages])) return false;\r\n\t\tthis._beforeSendData(this._getRowData(rowId), rowId);\r\n\t},\r\n\t_beforeSendData: function (data, rowId) {\r\n\t\tif (!this.callEvent(\"onBeforeUpdate\", [rowId, this.getState(rowId), data])) return false;\r\n\t\tthis._sendData(data, rowId);\r\n\t},\r\n\tserialize: function (data, id) {\r\n\t\tif (this._serializeAsJson) {\r\n\t\t\treturn this._serializeAsJSON(data);\r\n\t\t}\r\n\r\n\t\tif (typeof data == \"string\")\r\n\t\t\treturn data;\r\n\t\tif (typeof id != \"undefined\")\r\n\t\t\treturn this.serialize_one(data, \"\");\r\n\t\telse {\r\n\t\t\tvar stack = [];\r\n\t\t\tvar keys = [];\r\n\t\t\tfor (var key in data)\r\n\t\t\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\t\t\tstack.push(this.serialize_one(data[key], key + this.post_delim));\r\n\t\t\t\t\tkeys.push(key);\r\n\t\t\t\t}\r\n\t\t\tstack.push(\"ids=\" + this.escape(keys.join(\",\")));\r\n\t\t\tif (this.$scheduler.security_key)\r\n\t\t\t\tstack.push(\"dhx_security=\" + (this.$scheduler.security_key));\r\n\t\t\treturn stack.join(\"&\");\r\n\t\t}\r\n\t},\r\n\tserialize_one: function (data, pref) {\r\n\t\tif (typeof data == \"string\")\r\n\t\t\treturn data;\r\n\t\tvar stack = [];\r\n\t\tvar serialized = \"\";\r\n\t\tfor (var key in data)\r\n\t\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\t\tif ((key == \"id\" || key == this.action_param) && this._tMode == \"REST\") continue;\r\n\t\t\t\tif (typeof data[key] === \"string\" || typeof data[key] === \"number\") {\r\n\t\t\t\t\tserialized = data[key];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tserialized = JSON.stringify(data[key]);\r\n\t\t\t\t}\r\n\t\t\t\tstack.push(this.escape((pref || \"\") + key) + \"=\" + this.escape(serialized));\r\n\t\t\t}\r\n\t\treturn stack.join(\"&\");\r\n\t},\r\n\t_applyPayload: function (url) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tif (this._payload)\r\n\t\t\tfor (var key in this._payload)\r\n\t\t\t\turl = url + ajax.urlSeparator(url) + this.escape(key) + \"=\" + this.escape(this._payload[key]);\r\n\t\treturn url;\r\n\t},\r\n\t_sendData: function (dataToSend, rowId) {\r\n\t\tif (!dataToSend) {\r\n\t\t\treturn; // nothing to send\r\n\t\t}\r\n\t\tif (!this.callEvent(\"onBeforeDataSending\", rowId ? [rowId, this.getState(rowId), dataToSend] : [null, null, dataToSend])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (rowId) {\r\n\t\t\tthis._in_progress[rowId] = (new Date()).valueOf();\r\n\t\t}\r\n\r\n\t\tvar self = this;\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\r\n\t\tif (this._tMode === \"CUSTOM\") {\r\n\t\t\tvar state = this.getState(rowId);\r\n\t\t\tvar action = this.getActionByState(state);\r\n\t\t\tvar _onResolvedCreateUpdate = function (tag) {\r\n\t\t\t\tvar resultState = state;\r\n\t\t\t\tif(tag && tag.responseText && tag.setRequestHeader){\r\n\t\t\t\t\tif(tag.status !== 200){\r\n\t\t\t\t\t\tresultState = \"error\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\ttag = JSON.parse(tag.responseText);\r\n\t\t\t\t\t} catch (e){}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tresultState = resultState || \"updated\";\r\n\t\t\t\tvar sid = rowId;\r\n\t\t\t\tvar tid = rowId;\r\n\r\n\t\t\t\tif (tag) {\r\n\t\t\t\t\tresultState = tag.action || resultState;\r\n\t\t\t\t\tsid = tag.sid || sid;\r\n\t\t\t\t\ttid = tag.id || tag.tid || tid;\r\n\t\t\t\t}\r\n\t\t\t\tself.afterUpdateCallback(sid, tid, resultState, tag);\r\n\t\t\t};\r\n\r\n\t\t\tconst routerMode = \"event\";\r\n\t\t\tvar actionPromise;\r\n\t\t\tif (this._router instanceof Function) {\r\n\t\t\t\tactionPromise = this._router(routerMode, action, dataToSend, rowId);\r\n\t\t\t} else {\r\n\t\t\t\tswitch (state) {\r\n\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].create(dataToSend);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].delete(rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].update(dataToSend, rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(actionPromise){\r\n\t\t\t\t// neither promise nor {tid: newId} response object\r\n\t\t\t\tif(!actionPromise.then &&\r\n\t\t\t\t\t(actionPromise.id === undefined && actionPromise.tid === undefined && actionPromise.action === undefined)){\r\n\t\t\t\t\tthrow new Error(\"Incorrect router return value. A Promise or a response object is expected\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(actionPromise.then){\r\n\t\t\t\t\tactionPromise.then(_onResolvedCreateUpdate).catch(function(error) {\r\n\t\t\t\t\t\tif(error && error.action){\r\n\t\t\t\t\t\t\t_onResolvedCreateUpdate(error);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t_onResolvedCreateUpdate({ action: \"error\", value: error});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// custom method may return a response object in case of sync action\r\n\t\t\t\t\t_onResolvedCreateUpdate(actionPromise);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t_onResolvedCreateUpdate(null);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar queryParams = {\r\n\t\t\tcallback: function(xml) {\r\n\t\t\t\tvar ids = [];\r\n\r\n\t\t\t\tif (rowId) {\r\n\t\t\t\t\tids.push(rowId);\r\n\t\t\t\t} else if (dataToSend) {\r\n\t\t\t\t\tfor (var key in dataToSend) {\r\n\t\t\t\t\t\tids.push(key);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.afterUpdate(self, xml, ids);\r\n\t\t\t},\r\n\t\t\theaders: self._headers\r\n\t\t};\r\n\r\n\t\tvar urlParams = this.serverProcessor + (this._user ? (ajax.urlSeparator(this.serverProcessor) + [\"dhx_user=\" + this._user, \"dhx_version=\" + this.$scheduler.getUserData(0, \"version\")].join(\"&\")) : \"\");\r\n\t\tvar url = this._applyPayload(urlParams);\r\n\t\tvar data;\r\n\r\n\t\tswitch (this._tMode) {\r\n\t\t\tcase \"GET\":\r\n\t\t\t\tdata = this._cleanupArgumentsBeforeSend(dataToSend);\r\n\t\t\t\tqueryParams.url = url + ajax.urlSeparator(url) + this.serialize(data, rowId);\r\n\t\t\t\tqueryParams.method = \"GET\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"POST\":\r\n\t\t\t\tdata = this._cleanupArgumentsBeforeSend(dataToSend);\r\n\t\t\t\tqueryParams.url = url;\r\n\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\tqueryParams.data = this.serialize(data, rowId);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"JSON\":\r\n\t\t\t\tdata = {};\r\n\t\t\t\tvar preprocessedData = this._cleanupItemBeforeSend(dataToSend);\r\n\t\t\t\tfor (var key in preprocessedData) {\r\n\t\t\t\t\tif (key === this.action_param || key === \"id\" || key === \"gr_id\") {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdata[key] = preprocessedData[key];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tqueryParams.url = url;\r\n\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\tqueryParams.data = JSON.stringify({\r\n\t\t\t\t\tid: rowId,\r\n\t\t\t\t\taction: dataToSend[this.action_param],\r\n\t\t\t\t\tdata: data\r\n\t\t\t\t});\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"REST\":\r\n\t\t\tcase \"REST-JSON\":\r\n\t\t\t\turl = urlParams.replace(/(&|\\?)editing=true/, \"\");\r\n\t\t\t\tdata = \"\";\r\n\r\n\t\t\t\tswitch (this.getState(rowId)) {\r\n\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\t\t\tqueryParams.data = this.serialize(dataToSend, rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\tqueryParams.method = \"DELETE\";\r\n\t\t\t\t\t\turl = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + rowId;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tqueryParams.method = \"PUT\";\r\n\t\t\t\t\t\tqueryParams.data = this.serialize(dataToSend, rowId);\r\n\t\t\t\t\t\turl = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + rowId;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tqueryParams.url = this._applyPayload(url);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tthis._waitMode++;\r\n\t\treturn ajax.query(queryParams);\r\n\t},\r\n\tsendAllData: function () {\r\n\t\tif (!this.updatedRows.length || this.updateMode === \"off\") { // FIXME: need to leave checking 'this.updateMode === \"off\"'?\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.messages = [];\r\n\t\tvar valid = true;\r\n\r\n\t\tthis._forEachUpdatedRow(function(rowId) {\r\n\t\t\tvalid = valid && this.checkBeforeUpdate(rowId);\r\n\t\t});\r\n\r\n\t\tif (!valid && !this.callEvent(\"onValidationError\", [\"\", this.messages])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (this._tSend) {\r\n\t\t\tthis._sendData(this._getAllData());\r\n\t\t} else {\r\n\t\t\tthis._forEachUpdatedRow(function(rowId) {\r\n\t\t\t\tif (!this._in_progress[rowId]) {\r\n\t\t\t\t\tif (this.is_invalid(rowId)) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis._beforeSendData(this._getRowData(rowId), rowId);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\t_getAllData: function (rowId) {\r\n\t\tvar out = {};\r\n\t\tvar has_one = false;\r\n\t\tthis._forEachUpdatedRow(function(id) {\r\n\t\t\tif (this._in_progress[id] || this.is_invalid(id)){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar row = this._getRowData(id);\r\n\t\t\tif (!this.callEvent(\"onBeforeUpdate\", [id, this.getState(id), row])) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tout[id] = row;\r\n\t\t\thas_one = true;\r\n\t\t\tthis._in_progress[id] = (new Date()).valueOf();\r\n\t\t});\r\n\t\treturn has_one ? out : null;\r\n\t},\r\n\r\n\tfindRow: function (pattern) {\r\n\t\tvar i = 0;\r\n\t\tfor (i = 0; i < this.updatedRows.length; i++)\r\n\t\t\tif (pattern == this.updatedRows[i]) break;\r\n\t\treturn i;\r\n\t},\r\n\r\n\t/**\r\n\t *\t@desc: define custom actions\r\n\t *\t@param: name - name of action, same as value of action attribute\r\n\t *\t@param: handler - custom function, which receives a XMl response content for action\r\n\t *\t@type: private\r\n\t */\r\n\tdefineAction: function (name, handler) {\r\n\t\tif (!this._uActions) this._uActions = {};\r\n\t\tthis._uActions[name] = handler;\r\n\t},\r\n\r\n\t/**\r\n\t *\t @desc: used in combination with setOnBeforeUpdateHandler to create custom client-server transport system\r\n\t *\t @param: sid - id of item before update\r\n\t *\t @param: tid - id of item after up0ate\r\n\t *\t @param: action - action name\r\n\t *\t @type: public\r\n\t *\t @topic: 0\r\n\t */\r\n\tafterUpdateCallback: function (sid, tid, action, btag) {\r\n\t\tif(!this.$scheduler){\r\n\t\t\t// destructor has been called before the callback\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar marker = sid;\r\n\t\tvar correct = (action !== \"error\" && action !== \"invalid\");\r\n\t\tif (!correct) {\r\n\t\t\tthis.set_invalid(sid, action);\r\n\t\t}\r\n\t\tif ((this._uActions) && (this._uActions[action]) && (!this._uActions[action](btag))) {\r\n\t\t\treturn (delete this._in_progress[marker]);\r\n\t\t}\r\n\r\n\t\tif (this._in_progress[marker] !== \"wait\") {\r\n\t\t\tthis.setUpdated(sid, false);\r\n\t\t}\r\n\r\n\t\tvar originalSid = sid;\r\n\r\n\t\tswitch (action) {\r\n\t\t\tcase \"inserted\":\r\n\t\t\tcase \"insert\":\r\n\t\t\t\tif (tid != sid) {\r\n\t\t\t\t\tthis.setUpdated(sid, false);\r\n\t\t\t\t\tthis.$scheduler[this._methods[2]](sid, tid);\r\n\t\t\t\t\tsid = tid;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"delete\":\r\n\t\t\tcase \"deleted\":\r\n\t\t\t\tthis.$scheduler.setUserData(sid, this.action_param, \"true_deleted\");\r\n\t\t\t\tthis.$scheduler[this._methods[3]](sid, tid);\r\n\t\t\t\tdelete this._in_progress[marker];\r\n\t\t\t\treturn this.callEvent(\"onAfterUpdate\", [sid, action, tid, btag]);\r\n\t\t}\r\n\r\n\t\tif (this._in_progress[marker] !== \"wait\") {\r\n\t\t\tif (correct) {\r\n\t\t\t\tthis.$scheduler.setUserData(sid, this.action_param, \"\");\r\n\t\t\t}\r\n\t\t\tdelete this._in_progress[marker];\r\n\t\t} else {\r\n\t\t\tdelete this._in_progress[marker];\r\n\t\t\tthis.setUpdated(tid, true, this.$scheduler.getUserData(sid, this.action_param));\r\n\t\t}\r\n\r\n\t\tthis.callEvent(\"onAfterUpdate\", [originalSid, action, tid, btag]);\r\n\t},\r\n\r\n\t_errorResponse: function (xml, id){\r\n\t\tif(this.$scheduler && this.$scheduler.callEvent){\r\n\t\t\tthis.$scheduler.callEvent(\"onSaveError\", [id, xml.xmlDoc]);\r\n\t\t}\r\n\t\treturn this.cleanUpdate(id);\r\n\t},\r\n\r\n\t_setDefaultTransactionMode: function () {\r\n\t\tif (this.serverProcessor) {\r\n\t\t\tthis.setTransactionMode(\"POST\", true);\r\n\t\t\tthis.serverProcessor += (this.serverProcessor.indexOf(\"?\") !== -1 ? \"&\" : \"?\") + \"editing=true\";\r\n\t\t\tthis._serverProcessor = this.serverProcessor;\r\n\t\t}\r\n\t},\r\n\t\r\n\t/**\r\n\t *\t@desc: response from server\r\n\t *\t@param: xml - XMLLoader object with response XML\r\n\t *\t@type: private\r\n\t */\r\n\tafterUpdate: function (that, xml, id) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\r\n\t\tif (xml.xmlDoc.status !== 200){\r\n\t\t\tthis._errorResponse(xml, id);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// try to use json first\r\n\t\tvar tag;\r\n\t\ttry {\r\n\t\t\ttag = JSON.parse(xml.xmlDoc.responseText);\r\n\t\t} catch (e) {\r\n\t\t\t// empty response also can be processed by json handler\r\n\t\t\tif (!xml.xmlDoc.responseText.length) {\r\n\t\t\t\ttag = {};\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (tag) {\r\n\t\t\tvar action = tag.action || this.getState(id) || \"updated\";\r\n\t\t\tvar sid = tag.sid || id[0];\r\n\t\t\tvar tid = tag.tid || id[0];\r\n\t\t\tthat.afterUpdateCallback(sid, tid, action, tag);\r\n\t\t\tthat.finalizeUpdate();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// xml response\r\n\t\tvar top = ajax.xmltop(\"data\", xml.xmlDoc); // fix incorrect content type in IE\r\n\t\tif (!top) {\r\n\t\t\treturn this._errorResponse(xml, id);\r\n\t\t}\r\n\t\tvar atag = ajax.xpath(\"//data/action\", top);\r\n\t\tif (!atag.length) {\r\n\t\t\treturn this._errorResponse(xml, id);\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < atag.length; i++) {\r\n\t\t\tvar btag = atag[i];\r\n\t\t\tvar action = btag.getAttribute(\"type\");\r\n\t\t\tvar sid = btag.getAttribute(\"sid\");\r\n\t\t\tvar tid = btag.getAttribute(\"tid\");\r\n\r\n\t\t\tthat.afterUpdateCallback(sid, tid, action, btag);\r\n\t\t}\r\n\t\tthat.finalizeUpdate();\r\n\t},\r\n\tcleanUpdate: function (id) {\r\n\t\tif (id)\r\n\t\t\tfor (var i = 0; i < id.length; i++)\r\n\t\t\t\tdelete this._in_progress[id[i]];\r\n\t},\r\n\tfinalizeUpdate: function () {\r\n\t\tif (this._waitMode) this._waitMode--;\r\n\r\n\t\tthis.callEvent(\"onAfterUpdateFinish\", []);\r\n\t\tif (!this.updatedRows.length)\r\n\t\t\tthis.callEvent(\"onFullSync\", []);\r\n\t},\r\n\r\n\t/**\r\n\t *\t@desc: initializes data-processor\r\n\t *\t@param: scheduler - dhtmlxScheduler object to attach this data-processor to\r\n\t *\t@type: public\r\n\t */\r\n\tinit: function (scheduler) {\r\n\t\tif (this._initialized) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.$scheduler = scheduler;\r\n\t\tif (this.$scheduler._dp_init) {\r\n\t\t\tthis.$scheduler._dp_init(this);\r\n\t\t}\r\n\r\n\t\tthis._setDefaultTransactionMode();\r\n\r\n\t\tthis._methods=this._methods||[\"_set_event_text_style\",\"\",\"_dp_change_event_id\",\"_dp_hook_delete\"];\r\n\t\textendScheduler(this.$scheduler, this);\r\n\t\tvar dataProcessorEvents = new DataProcessorEvents(this.$scheduler, this);\r\n\t\tdataProcessorEvents.attach();\r\n\t\tthis.attachEvent(\"onDestroy\", function() {\r\n\t\t\tdelete this._getRowData;\r\n\r\n\t\t\tdelete this.$scheduler._dp;\r\n\t\t\tdelete this.$scheduler._dataprocessor;\r\n\t\t\tdelete this.$scheduler._set_event_text_style;\r\n\t\t\tdelete this.$scheduler._dp_change_event_id;\r\n\t\t\tdelete this.$scheduler._dp_hook_delete;\r\n\t\t\tdelete this.$scheduler;\r\n\t\t\tdataProcessorEvents.detach();\r\n\t\t});\r\n\t\tthis.$scheduler.callEvent(\"onDataProcessorReady\", [this]);\r\n\t\tthis._initialized = true;\r\n\r\n\t\tscheduler._dataprocessor=this;\r\n\t},\r\n\r\n\tsetOnAfterUpdate: function (ev) {\r\n\t\tthis.attachEvent(\"onAfterUpdate\", ev);\r\n\t},\r\n\tsetOnBeforeUpdateHandler: function (func) {\r\n\t\tthis.attachEvent(\"onBeforeDataSending\", func);\r\n\t},\r\n\r\n\t/* starts autoupdate mode\r\n\t\t@param interval time interval for sending update requests\r\n\t*/\r\n\tsetAutoUpdate: function (interval, user) {\r\n\t\tinterval = interval || 2000;\r\n\r\n\t\tthis._user = user || (new Date()).valueOf();\r\n\t\tthis._need_update = false;\r\n\t\t//this._loader = null;\r\n\t\tthis._update_busy = false;\r\n\r\n\t\tthis.attachEvent(\"onAfterUpdate\", function (sid, action, tid, xml_node) {\r\n\t\t\tthis.afterAutoUpdate(sid, action, tid, xml_node);\r\n\t\t});\r\n\t\tthis.attachEvent(\"onFullSync\", function () {\r\n\t\t\tthis.fullSync();\r\n\t\t});\r\n\r\n\t\tvar self = this;\r\n\t\tlet intervalId = global.setInterval(function () {\r\n\t\t\tself.loadUpdate();\r\n\t\t}, interval);\r\n\t\tthis.attachEvent(\"onDestroy\", function(){\r\n\t\t\tclearInterval(intervalId);\r\n\t\t});\r\n\t},\r\n\r\n\t/* process updating request answer\r\n\t\tif status == collision version is deprecated\r\n\t\tset flag for autoupdating immediately\r\n\t*/\r\n\tafterAutoUpdate: function (sid, action, tid, xml_node) {\r\n\t\tif (action == 'collision') {\r\n\t\t\tthis._need_update = true;\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t},\r\n\r\n\t/* callback function for onFillSync event\r\n\t\tcall update function if it's need\r\n\t*/\r\n\tfullSync: function () {\r\n\t\tif (this._need_update) {\r\n\t\t\tthis._need_update = false;\r\n\t\t\tthis.loadUpdate();\r\n\t\t}\r\n\t\treturn true;\r\n\t},\r\n\r\n\t/* sends query to the server and call callback function\r\n\t*/\r\n\tgetUpdates: function (url, callback) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tif (this._update_busy)\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\tthis._update_busy = true;\r\n\r\n\t\tajax.get(url, callback);\r\n\t},\r\n\r\n\t/* returns xml node value\r\n\t\t@param node\r\n\t\t\txml node\r\n\t*/\r\n\t_getXmlNodeValue: function(node) {\r\n\t\tif (node.firstChild) {\r\n\t\t\treturn node.firstChild.nodeValue;\r\n\t\t}\r\n\t\treturn \"\";\r\n\t},\r\n\r\n\t/* loads updates and processes them\r\n\t*/\r\n\tloadUpdate: function () {\r\n\t\tvar self = this;\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tvar version = this.$scheduler.getUserData(0, \"version\");\r\n\t\tvar url = this.serverProcessor + ajax.urlSeparator(this.serverProcessor) + [\"dhx_user=\" + this._user, \"dhx_version=\" + version].join(\"&\");\r\n\t\turl = url.replace(\"editing=true&\", \"\");\r\n\t\tthis.getUpdates(url, function (xml) {\r\n\t\t\tvar vers = ajax.xpath(\"//userdata\", xml);\r\n\t\t\tself.$scheduler.setUserData(0, \"version\", self._getXmlNodeValue(vers[0]));\r\n\r\n\t\t\tvar updates = ajax.xpath(\"//update\", xml);\r\n\t\t\tif (updates.length) {\r\n\t\t\t\tself._silent_mode = true;\r\n\r\n\t\t\t\tfor (var i = 0; i < updates.length; i++) {\r\n\t\t\t\t\tvar status = updates[i].getAttribute(\"status\");\r\n\t\t\t\t\tvar id = updates[i].getAttribute(\"id\");\r\n\t\t\t\t\tvar parent = updates[i].getAttribute(\"parent\");\r\n\t\t\t\t\tswitch (status) {\r\n\t\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"insertCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"updated\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"updateCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"deleteCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tself._silent_mode = false;\r\n\t\t\t}\r\n\t\t\tself._update_busy = false;\r\n\t\t\tself = null;\r\n\t\t});\r\n\t},\r\n\r\n\tdestructor: function() {\r\n\t\tthis.callEvent(\"onDestroy\", []);\r\n\t\tthis.detachAllEvents();\r\n\r\n\t\tthis.updatedRows = [];\r\n\t\tthis._in_progress = {};\r\n\t\tthis._invalid = {};\r\n\t\tthis._headers = null;\r\n\t\tthis._payload = null;\r\n\t\tdelete this._initialized;\r\n\t},\r\n\r\n\turl: function(url) {\r\n\t\tthis.serverProcessor = this._serverProcessor = url;\r\n\t},\r\n\r\n\t_serializeAsJSON: function(data) {\r\n\t\tif (typeof data === \"string\") {\r\n\t\t\treturn data;\r\n\t\t}\r\n\r\n\t\tvar copy = this.$scheduler.utils.copy(data);\r\n\t\tif (this._tMode === \"REST-JSON\") {\r\n\t\t\tdelete copy.id;\r\n\t\t\tdelete copy[this.action_param];\r\n\t\t}\r\n\r\n\t\treturn JSON.stringify(copy);\r\n\t},\r\n\r\n\t// GET/POST/JSON modes of the dataProcessor didn't send the whole data items in 'delete' requests\r\n\t// clear extra info from the data in order not to change the request format\r\n\t_cleanupArgumentsBeforeSend: function(dataToSend) {\r\n\t\tvar processedData;\r\n\t\tif(dataToSend[this.action_param] === undefined){// hash of updated items, and not an individual item\r\n\t\t\tprocessedData = {};\r\n\t\t\tfor(var i in dataToSend) {\r\n\t\t\t\tprocessedData[i] = this._cleanupArgumentsBeforeSend(dataToSend[i]);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tprocessedData = this._cleanupItemBeforeSend(dataToSend);\r\n\t\t}\r\n\t\treturn processedData;\r\n\t},\r\n\t_cleanupItemBeforeSend: function(updatedItem) {\r\n\t\tvar output = null;\r\n\t\tif(updatedItem){\r\n\t\t\tif(updatedItem[this.action_param] === \"deleted\"){\r\n\t\t\t\toutput = {};\r\n\t\t\t\toutput.id = updatedItem.id;\r\n\t\t\t\toutput[this.action_param] = updatedItem[this.action_param];\r\n\t\t\t}else{\r\n\t\t\t\toutput = updatedItem;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn output;\r\n\t},\r\n\r\n\t_forEachUpdatedRow: function(code) {\r\n\t\tvar updatedRows = this.updatedRows.slice();\r\n\t\tfor (var i = 0; i < updatedRows.length; i++) {\r\n\t\t\tvar rowId = updatedRows[i];\r\n\t\t\tif (this.$scheduler.getUserData(rowId, this.action_param)) {\r\n\t\t\t\tcode.call(this, rowId);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\t_prepareItemForJson(item){\r\n\t\tconst processedItem = {};\r\n\t\tconst scheduler = this.$scheduler;\r\n\t\tconst copy = scheduler.utils.copy(item);\r\n\t\tfor (let i in copy) {\r\n\t\t\tlet prop = copy[i];\r\n\t\t\tif (i.indexOf(\"_\") === 0) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} else if (prop){\r\n\t\t\t\tif(prop.getUTCFullYear){\r\n\t\t\t\t\tprocessedItem[i] = scheduler._helpers.formatDate(prop);\r\n\t\t\t\t} else if(typeof prop == \"object\") {\r\n\t\t\t\t\tprocessedItem[i] = this._prepareItemForJson(prop);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprocessedItem[i] = prop; \r\n\t\t\t\t}\r\n\t\t\t} else if (prop !== undefined){\r\n\t\t\t\tprocessedItem[i] = prop; \r\n\t\t\t}\r\n\t\t}\r\n\t\tprocessedItem[this.action_param] = scheduler.getUserData(item.id, this.action_param);\r\n\t\treturn processedItem;\r\n\t},\r\n\t_prepareItemForForm(item){\r\n\t\tconst processedItem = {};\r\n\t\tconst scheduler = this.$scheduler;\r\n\t\tconst copy = scheduler.utils.copy(item);\r\n\t\tfor (var i in copy) {\r\n\t\t\tlet prop = copy[i];\r\n\t\t\tif (i.indexOf(\"_\") === 0) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} else if (prop) {\r\n\t\t\t\tif(prop.getUTCFullYear){\r\n\t\t\t\t\tprocessedItem[i] = scheduler._helpers.formatDate(prop);\r\n\t\t\t\t} else if(typeof prop == \"object\") {\r\n\t\t\t\t\tprocessedItem[i] = this._prepareItemForForm(prop);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprocessedItem[i] = prop;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tprocessedItem[i] = \"\"; // for all falthy values\r\n\t\t\t}\r\n\t\t}\r\n\t\tprocessedItem[this.action_param] = scheduler.getUserData(item.id, this.action_param);\r\n\t\treturn processedItem;\r\n\t},\r\n\t_prepareDataItem: function(item) {\r\n\t\tif(this._serializeAsJson){\r\n\t\t\treturn this._prepareItemForJson(item);\r\n\t\t}else {\r\n\t\t\treturn this._prepareItemForForm(item);\r\n\t\t}\r\n\t},\r\n\t_getRowData: function(id) {\r\n\t\tvar dataItem = this.$scheduler.getEvent(id);\r\n\t\tif (!dataItem) {\r\n\t\t\tdataItem = { id: id };\r\n\t\t}\r\n\t\treturn this._prepareDataItem(dataItem);\r\n\t}\r\n};\r\n\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler.createDataProcessor = function(config) {\r\n\tvar router;\r\n\tvar tMode;\r\n\tif (config instanceof Function) {\r\n\t\trouter = config;\r\n\t} else if (config.hasOwnProperty(\"router\")) {\r\n\t\trouter = config.router;\r\n\t} else if(config.hasOwnProperty(\"event\")){\r\n\t\trouter = config;\r\n\t}\r\n\r\n\tif (router) {\r\n\t\ttMode = \"CUSTOM\";\r\n\t} else {\r\n\t\ttMode = config.mode || \"REST-JSON\";\r\n\t}\r\n\r\n\tvar dp = new DataProcessor(config.url);\r\n\tdp.init(scheduler);\r\n\tdp.setTransactionMode({\r\n\t\tmode: tMode,\r\n\t\trouter: router\r\n\t}, config.batchUpdate); // FIXME: config.batchUpdate where it is explained?\r\n\treturn dp;\r\n};\r\n\r\nscheduler.DataProcessor = DataProcessor;\r\n\r\n}\r\n\r\n//var dataProcessor = global.dataProcessor = DataProcessor; // for old","import utils from \"./utils/utils\";\r\nimport domHelpers from \"./utils/dom_helpers\";\r\n\r\n\r\nexport default function(scheduler) {\r\n\r\n\tvar boxAttribute = \"data-dhxbox\";\r\n\r\n\tvar _dhx_msg_cfg = null;\r\n\r\n\tfunction callback(config, result) {\r\n\t\tvar usercall = config.callback;\r\n\t\tmodalBox.hide(config.box);\r\n\r\n\t\t_dhx_msg_cfg = config.box = null;\r\n\tif (usercall)\r\n\t\t\tusercall(result);\r\n\t}\r\n\r\n\tfunction modal_key(event) {\r\n\t\tif (_dhx_msg_cfg) {\r\n\r\n\t\t\tvar code = event.which || event.keyCode;\r\n\t\t\tvar preventDefault = false;\r\n\r\n\t\t\tif (messageBox.keyboard) {\r\n\t\t\t\tif (code == 13 || code == 32) {\r\n\t\t\t\t\t// default behavior is to confirm/submit popup on space/enter\r\n\t\t\t\t\t// if browser focus is set on button element - do button click instead of default behavior\r\n\t\t\t\t\tvar target = event.target || event.srcElement;\r\n\t\t\t\t\tif (domHelpers.getClassName(target).indexOf(\"scheduler_popup_button\") > -1 && target.click) {\r\n\t\t\t\t\t\ttarget.click();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcallback(_dhx_msg_cfg, true);\r\n\t\t\t\t\t\tpreventDefault = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (code == 27) {\r\n\t\t\t\t\tcallback(_dhx_msg_cfg, false);\r\n\t\t\t\t\tpreventDefault = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (preventDefault) {\r\n\t\t\t\tif (event.preventDefault){\r\n\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t}\r\n\t\t\t\treturn !(event.cancelBubble = true);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.event(document, \"keydown\", modal_key, true);\r\n\r\n\tfunction modality(mode) {\r\n\t\tif (!modality.cover) {\r\n\t\t\tmodality.cover = document.createElement(\"div\");\r\n\t\t\t//necessary for IE only\r\n\t\t\tscheduler.event(modality.cover, \"keydown\", modal_key);\r\n\t\t\tmodality.cover.className = \"dhx_modal_cover\";\r\n\t\t\tdocument.body.appendChild(modality.cover);\r\n\t\t}\r\n\r\n\t\tmodality.cover.style.display = mode ? \"inline-block\" : \"none\";\r\n\t}\r\n\r\n\tfunction button(text, classValue, result) {\r\n\t\tvar buttonAriaAttrs = scheduler._waiAria.messageButtonAttrString(text);\r\n\t\tvar name = (classValue || \"\").toLowerCase().replace(/ /g, \"_\");\r\n\t\tvar buttonCss = `scheduler_${name}_button dhtmlx_${name}_button`; \r\n\t\treturn `
${text}
`;\r\n\t}\r\n\r\n\tfunction info(text) {\r\n\t\tif (!messageBox.area) {\r\n\t\t\tmessageBox.area = document.createElement(\"div\");\r\n\t\t\tmessageBox.area.className = \"scheduler_message_area dhtmlx_message_area\";\r\n\t\t\tmessageBox.area.style[messageBox.position] = \"5px\";\r\n\t\t\tdocument.body.appendChild(messageBox.area);\r\n\t\t}\r\n\r\n\t\tmessageBox.hide(text.id);\r\n\t\tvar message = document.createElement(\"div\");\r\n\t\tmessage.innerHTML = \"
\" + text.text + \"
\";\r\n\t\tmessage.className = \"scheduler-info dhtmlx-info scheduler-\" + text.type + \" dhtmlx-\" + text.type;\r\n\t\tscheduler.event(message, \"click\",function (e) {\r\n if(text.callback) {\r\n text.callback.call(this, e);\r\n }\r\n\t\t\tmessageBox.hide(text.id);\r\n\t\t\ttext = null;\r\n\t\t});\r\n\r\n\t\tscheduler._waiAria.messageInfoAttr(message);\r\n\r\n\t\tif (messageBox.position == \"bottom\" && messageBox.area.firstChild)\r\n\t\t\tmessageBox.area.insertBefore(message, messageBox.area.firstChild);\r\n\t\telse\r\n\t\t\tmessageBox.area.appendChild(message);\r\n\r\n\t\tif (text.expire > 0)\r\n\t\t\tmessageBox.timers[text.id] = window.setTimeout(function () {\r\n\t\t\t\t// GS-1213: We need that when Scheduler is destroyed\r\n\t\t\t\tif (messageBox) messageBox.hide(text.id);\r\n\t\t\t}, text.expire);\r\n\r\n\t\tmessageBox.pull[text.id] = message;\r\n\t\tmessage = null;\r\n\r\n\t\treturn text.id;\r\n\t}\r\n\r\n\tfunction getFirstDefined() {\r\n\t\tvar values = [].slice.apply(arguments, [0]);\r\n\r\n\t\tfor (var i = 0; i < values.length; i++) {\r\n\t\t\tif (values[i]) {\r\n\t\t\t\treturn values[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tfunction _boxStructure(config, ok, cancel) {\r\n\t\tvar box = document.createElement(\"div\");\r\n\r\n\t\tvar contentId = utils.uid();\r\n\t\tscheduler._waiAria.messageModalAttr(box, contentId);\r\n\r\n\r\n\t\tbox.className = \" scheduler_modal_box dhtmlx_modal_box scheduler-\" + config.type + \" dhtmlx-\" + config.type;\r\n\t\tbox.setAttribute(boxAttribute, 1);\r\n\r\n\t\tvar inner = '';\r\n\r\n\t\tif (config.width)\r\n\t\t\tbox.style.width = config.width;\r\n\t\tif (config.height)\r\n\t\t\tbox.style.height = config.height;\r\n\t\tif (config.title)\r\n\t\t\tinner += '
' + config.title + '
';\r\n\t\tinner += '
' + (config.content ? '' : config.text) + '
';\r\n\t\tif (ok)\r\n\t\t\tinner += button(getFirstDefined(config.ok, scheduler.locale.labels.message_ok, \"OK\"), \"ok\", true);\r\n\t\tif (cancel)\r\n\t\t\tinner += button(getFirstDefined(config.cancel, scheduler.locale.labels.message_cancel, \"Cancel\"), \"cancel\", false);\r\n\r\n\t\tif (config.buttons) {\r\n\t\t\tfor (var i = 0; i < config.buttons.length; i++) {\r\n\t\t\t\tvar btn = config.buttons[i];\r\n\t\t\t\tif (typeof btn == \"object\") {\r\n\t\t\t\t\t// Support { label:\"Save\", css:\"main_button\", value:\"save\" }\r\n\t\t\t\t\tvar label = btn.label;\r\n\t\t\t\t\tvar css = btn.css || (\"scheduler_\" + btn.label.toLowerCase() + \"_button dhtmlx_\" + btn.label.toLowerCase() + \"_button\");\r\n\t\t\t\t\tvar value = btn.value || i;\r\n\t\t\t\t\tinner += button(label, css, value);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tinner += button(btn, btn, i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tinner += '
';\r\n\t\tbox.innerHTML = inner;\r\n\r\n\t\tif (config.content) {\r\n\t\t\tvar node = config.content;\r\n\t\t\tif (typeof node == \"string\")\r\n\t\t\t\tnode = document.getElementById(node);\r\n\t\t\tif (node.style.display == 'none')\r\n\t\t\t\tnode.style.display = \"\";\r\n\t\t\tbox.childNodes[config.title ? 1 : 0].appendChild(node);\r\n\t\t}\r\n\r\n\t\tscheduler.event(box, \"click\", function (event) {\r\n\t\t\tvar source = event.target || event.srcElement;\r\n\t\t\tif (!source.className) source = source.parentNode;\r\n\t\t\tif (domHelpers.closest(source, \".scheduler_popup_button\")) {\r\n\t\t\t\tvar result = source.getAttribute(\"data-result\");\r\n\t\t\t\tresult = (result == \"true\") || (result == \"false\" ? false : result);\r\n\t\t\t\tcallback(config, result);\r\n\t\t\t}\r\n\t\t});\r\n\t\tconfig.box = box;\r\n\t\tif (ok || cancel)\r\n\t\t\t_dhx_msg_cfg = config;\r\n\r\n\t\treturn box;\r\n\t}\r\n\r\n\tfunction _createBox(config, ok, cancel) {\r\n\t\tvar box = config.tagName ? config : _boxStructure(config, ok, cancel);\r\n\r\n\t\tif (!config.hidden)\r\n\t\t\tmodality(true);\r\n\t\tdocument.body.appendChild(box);\r\n\t\tvar x = Math.abs(Math.floor(((window.innerWidth || document.documentElement.offsetWidth) - box.offsetWidth) / 2));\r\n\t\tvar y = Math.abs(Math.floor(((window.innerHeight || document.documentElement.offsetHeight) - box.offsetHeight) / 2));\r\n\t\tif (config.position == \"top\")\r\n\t\t\tbox.style.top = \"-3px\";\r\n\t\telse\r\n\t\t\tbox.style.top = y + 'px';\r\n\t\tbox.style.left = x + 'px';\r\n\t\t//necessary for IE only\r\n\t\tscheduler.event(box, \"keydown\", modal_key);\r\n\r\n\t\tmodalBox.focus(box);\r\n\r\n\t\tif (config.hidden)\r\n\t\t\tmodalBox.hide(box);\r\n\r\n\t\tscheduler.callEvent(\"onMessagePopup\", [box]);\r\n\t\treturn box;\r\n\t}\r\n\r\n\tfunction alertPopup(config) {\r\n\t\treturn _createBox(config, true, false);\r\n\t}\r\n\r\n\tfunction confirmPopup(config) {\r\n\t\treturn _createBox(config, true, true);\r\n\t}\r\n\r\n\tfunction boxPopup(config) {\r\n\t\treturn _createBox(config);\r\n\t}\r\n\r\n\tfunction box_params(text, type, callback) {\r\n\t\tif (typeof text != \"object\") {\r\n\t\t\tif (typeof type == \"function\") {\r\n\t\t\t\tcallback = type;\r\n\t\t\t\ttype = \"\";\r\n\t\t\t}\r\n\t\t\ttext = {text: text, type: type, callback: callback};\r\n\t\t}\r\n\t\treturn text;\r\n\t}\r\n\r\n\tfunction params(text, type, expire, id, callback) {\r\n\t\tif (typeof text != \"object\")\r\n\t\t\ttext = {text: text, type: type, expire: expire, id: id, callback: callback};\r\n\t\ttext.id = text.id || utils.uid();\r\n\t\ttext.expire = text.expire || messageBox.expire;\r\n\t\treturn text;\r\n\t}\r\n\r\n\tvar alertBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"confirm\";\r\n\t\treturn alertPopup(text);\r\n\t};\r\n\tvar confirmBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"alert\";\r\n\t\treturn confirmPopup(text);\r\n\t};\r\n\tvar modalBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"alert\";\r\n\t\treturn boxPopup(text);\r\n\t};\r\n\tmodalBox.hide = function (node) {\r\n\t\twhile (node && node.getAttribute && !node.getAttribute(boxAttribute))\r\n\t\t\tnode = node.parentNode;\r\n\t\tif (node) {\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t\tmodality(false);\r\n\r\n\t\t\tscheduler.callEvent(\"onAfterMessagePopup\", [node]);\r\n\t\t}\r\n\t};\r\n\r\n\tmodalBox.focus = function (node) {\r\n\t\tsetTimeout(function () {\r\n\t\t\tvar focusable = domHelpers.getFocusableNodes(node);\r\n\t\t\tif (focusable.length) {\r\n\t\t\t\tif (focusable[0].focus) focusable[0].focus();\r\n\t\t\t}\r\n\t\t}, 1);\r\n\t};\r\n\r\n\tvar messageBox = function (text, type, expire, id) {\r\n\t\ttext = params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"info\";\r\n\r\n\t\tvar subtype = text.type.split(\"-\")[0];\r\n\t\tswitch (subtype) {\r\n\t\t\tcase \"alert\":\r\n\t\t\t\treturn alertPopup(text);\r\n\t\t\tcase \"confirm\":\r\n\t\t\t\treturn confirmPopup(text);\r\n\t\t\tcase \"modalbox\":\r\n\t\t\t\treturn boxPopup(text);\r\n\t\t\tdefault:\r\n\t\t\t\treturn info(text);\r\n\t\t}\r\n\t};\r\n\r\n\tmessageBox.seed = (new Date()).valueOf();\r\n\tmessageBox.uid = utils.uid;\r\n\tmessageBox.expire = 4000;\r\n\tmessageBox.keyboard = true;\r\n\tmessageBox.position = \"top\";\r\n\tmessageBox.pull = {};\r\n\tmessageBox.timers = {};\r\n\r\n\tmessageBox.hideAll = function () {\r\n\t\tfor (var key in messageBox.pull)\r\n\t\t\tmessageBox.hide(key);\r\n\t};\r\n\tmessageBox.hide = function (id) {\r\n\t\tvar obj = messageBox.pull[id];\r\n\t\tif (obj && obj.parentNode) {\r\n\t\t\twindow.setTimeout(function () {\r\n\t\t\t\tobj.parentNode.removeChild(obj);\r\n\t\t\t\tobj = null;\r\n\t\t\t}, 2000);\r\n\t\t\tobj.className += \" hidden\";\r\n\r\n\t\t\tif (messageBox.timers[id])\r\n\t\t\t\twindow.clearTimeout(messageBox.timers[id]);\r\n\t\t\tdelete messageBox.pull[id];\r\n\t\t}\r\n\t};\r\n\r\n\tvar popups = [];\r\n\tscheduler.attachEvent(\"onMessagePopup\", function(box){\r\n\t\tpopups.push(box);\r\n\t});\r\n\tscheduler.attachEvent(\"onAfterMessagePopup\", function(box){\r\n\t\tfor(var i = 0; i < popups.length; i++){\r\n\t\t\tif(popups[i] === box){\r\n\t\t\t\tpopups.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tif(modality.cover && modality.cover.parentNode){\r\n\t\t\tmodality.cover.parentNode.removeChild(modality.cover);\r\n\t\t}\r\n\r\n\t\tfor(var i = 0; i < popups.length; i++){\r\n\t\t\tif(popups[i].parentNode){\r\n\t\t\t\tpopups[i].parentNode.removeChild(popups[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tpopups = null;\r\n\r\n\t\tif(messageBox.area && messageBox.area.parentNode){\r\n\t\t\tmessageBox.area.parentNode.removeChild(messageBox.area);\r\n\t\t}\r\n\t\tmessageBox = null;\r\n\t});\r\n\r\n\treturn {\r\n\t\talert: alertBox,\r\n\t\tconfirm: confirmBox,\r\n\t\tmessage: messageBox,\r\n\t\tmodalbox: modalBox\r\n\t};\r\n}","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"كانون الثاني\", \"شباط\", \"آذار\", \"نيسان\", \"أيار\", \"حزيران\", \"تموز\", \"آب\", \"أيلول\", \"تشرين الأول\", \"تشرين الثاني\", \"كانون الأول\"],\r\n\t\tmonth_short: [\"يناير\", \"فبراير\", \"مارس\", \"أبريل\", \"مايو\", \"يونيو\", \"يوليو\", \"أغسطس\", \"سبتمبر\", \"أكتوبر\", \"نوفمبر\", \"ديسمبر\"],\r\n\t\tday_full: [\"الأحد\", \"الأثنين\", \"ألثلاثاء\", \"الأربعاء\", \"ألحميس\", \"ألجمعة\", \"السبت\"],\r\n\t\tday_short: [\"احد\", \"اثنين\", \"ثلاثاء\", \"اربعاء\", \"خميس\", \"جمعة\", \"سبت\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"اليوم\",\r\n\t\tday_tab: \"يوم\",\r\n\t\tweek_tab: \"أسبوع\",\r\n\t\tmonth_tab: \"شهر\",\r\n\t\tnew_event: \"حدث جديد\",\r\n\t\ticon_save: \"اخزن\",\r\n\t\ticon_cancel: \"الغاء\",\r\n\t\ticon_details: \"تفاصيل\",\r\n\t\ticon_edit: \"تحرير\",\r\n\t\ticon_delete: \"حذف\",\r\n\t\tconfirm_closing: \"التغييرات سوف تضيع, هل انت متأكد؟\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"الحدث سيتم حذفها نهائيا ، هل أنت متأكد؟\",\r\n\t\tsection_description: \"الوصف\",\r\n\t\tsection_time: \"الفترة الزمنية\",\r\n\t\tfull_day: \"طوال اليوم\",\r\n\r\n\t\tconfirm_recurring: \"هل تريد تحرير مجموعة كاملة من الأحداث المتكررة؟\",\r\n\t\tsection_recurring: \"تكرار الحدث\",\r\n\t\tbutton_recurring: \"تعطيل\",\r\n\t\tbutton_recurring_open: \"تمكين\",\r\n\t\tbutton_edit_series: \"تحرير سلسلة\",\r\n\t\tbutton_edit_occurrence: \"تعديل نسخة\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"جدول\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create: \"Drag to create\",\r\n\t\tdrag_to_move: \"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour: \"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"يومي\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"أسبوعي\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"شهري\",\r\n\t\trepeat_radio_year: \"سنوي\",\r\n\t\trepeat_radio_day_type: \"كل\",\r\n\t\trepeat_text_day_count: \"يوم\",\r\n\t\trepeat_radio_day_type2: \"كل يوم عمل\",\r\n\t\trepeat_week: \" تكرار كل\",\r\n\t\trepeat_text_week_count: \"أسبوع في الأيام التالية:\",\r\n\t\trepeat_radio_month_type: \"تكرار\",\r\n\t\trepeat_radio_month_start: \"في\",\r\n\t\trepeat_text_month_day: \"يوم كل\",\r\n\t\trepeat_text_month_count: \"شهر\",\r\n\t\trepeat_text_month_count2_before: \"كل\",\r\n\t\trepeat_text_month_count2_after: \"شهر\",\r\n\t\trepeat_year_label: \"في\",\r\n\t\tselect_year_day2: \"من\",\r\n\t\trepeat_text_year_day: \"يوم\",\r\n\t\tselect_year_month: \"شهر\",\r\n\t\trepeat_radio_end: \"بدون تاريخ انتهاء\",\r\n\t\trepeat_text_occurences_count: \"تكرارات\",\r\n\t\trepeat_radio_end2: \"بعد\",\r\n\t\trepeat_radio_end3: \"ينتهي في\",\r\n\r\n\t\trepeat_never: \"أبداً\",\r\n\t\trepeat_daily: \"كل يوم\",\r\n\t\trepeat_workdays: \"كل يوم عمل\",\r\n\t\trepeat_weekly: \"كل أسبوع\",\r\n\t\trepeat_monthly: \"كل شهر\",\r\n\t\trepeat_yearly: \"كل سنة\",\r\n\t\trepeat_custom: \"تخصيص\",\r\n\t\trepeat_freq_day: \"يوم\",\r\n\t\trepeat_freq_week: \"أسبوع\",\r\n\t\trepeat_freq_month: \"شهر\",\r\n\t\trepeat_freq_year: \"سنة\",\r\n\t\trepeat_on_date: \"في التاريخ\",\r\n\t\trepeat_ends: \"ينتهي\",\r\n\r\n\t\tmonth_for_recurring: [\"يناير\", \"فبراير\", \"مارس\", \"أبريل\", \"مايو\", \"يونيو\", \"يوليو\", \"أغسطس\", \"سبتمبر\", \"أكتوبر\", \"نوفمبر\", \"ديسمبر\"],\r\n\t\tday_for_recurring: [\"الأحد\", \"الإثنين\", \"الثلاثاء\", \"الأربعاء\", \"الخميس\", \"الجمعة\", \"السبت\"]\r\n\t}\r\n};\r\n\r\n\r\n","/*\r\n Translation by Sofya Morozova\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Студзень\", \"Люты\", \"Сакавік\", \"Красавік\", \"Maй\", \"Чэрвень\", \"Ліпень\", \"Жнівень\", \"Верасень\", \"Кастрычнік\", \"Лістапад\", \"Снежань\"],\r\n\t\tmonth_short: [\"Студз\", \"Лют\", \"Сак\", \"Крас\", \"Maй\", \"Чэр\", \"Ліп\", \"Жнів\", \"Вер\", \"Каст\", \"Ліст\", \"Снеж\"],\r\n\t\tday_full: [ \"Нядзеля\", \"Панядзелак\", \"Аўторак\", \"Серада\", \"Чацвер\", \"Пятніца\", \"Субота\"],\r\n\t\tday_short: [\"Нд\", \"Пн\", \"Аўт\", \"Ср\", \"Чцв\", \"Пт\", \"Сб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сёння\",\r\n\t\tday_tab: \"Дзень\",\r\n\t\tweek_tab: \"Тыдзень\",\r\n\t\tmonth_tab: \"Месяц\",\r\n\t\tnew_event: \"Новая падзея\",\r\n\t\ticon_save: \"Захаваць\",\r\n\t\ticon_cancel: \"Адмяніць\",\r\n\t\ticon_details: \"Дэталі\",\r\n\t\ticon_edit: \"Змяніць\",\r\n\t\ticon_delete: \"Выдаліць\",\r\n\t\tconfirm_closing: \"\", //Унесеныя змены будуць страчаны, працягнуць?\r\n\t\tconfirm_deleting: \"Падзея будзе выдалена незваротна, працягнуць?\",\r\n\t\tsection_description: \"Апісанне\",\r\n\t\tsection_time: \"Перыяд часу\",\r\n\t\tfull_day: \"Увесь дзень\",\r\n\r\n\t\tconfirm_recurring: \"Вы хочаце змяніць усю серыю паўтаральных падзей?\",\r\n\t\tsection_recurring: \"Паўтарэнне\",\r\n\t\tbutton_recurring: \"Адключана\",\r\n\t\tbutton_recurring_open: \"Уключана\",\r\n\t\tbutton_edit_series: \"Рэдагаваць серыю\",\r\n\t\tbutton_edit_occurrence: \"Рэдагаваць асобнік\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Спіс\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Апісанне\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Год\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Спіс\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Спic\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Дзень\",\r\n\t\trepeat_radio_week: \"Тыдзень\",\r\n\t\trepeat_radio_month: \"Месяц\",\r\n\t\trepeat_radio_year: \"Год\",\r\n\t\trepeat_radio_day_type: \"Кожны\",\r\n\t\trepeat_text_day_count: \"дзень\",\r\n\t\trepeat_radio_day_type2: \"Кожны працоўны дзень\",\r\n\t\trepeat_week: \" Паўтараць кожны\",\r\n\t\trepeat_text_week_count: \"тыдзень\",\r\n\t\trepeat_radio_month_type: \"Паўтараць\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" чысла кожнага\",\r\n\t\trepeat_text_month_count: \"месяцу\",\r\n\t\trepeat_text_month_count2_before: \"кожны \",\r\n\t\trepeat_text_month_count2_after: \"месяц\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"дзень\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без даты заканчэння\",\r\n\t\trepeat_text_occurences_count: \"паўтораў\",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\trepeat_radio_end3: \"Да \",\r\n\r\n\t\trepeat_never: \"Ніколі\",\r\n\t\trepeat_daily: \"Кожны дзень\",\r\n\t\trepeat_workdays: \"Кожны працоўны дзень\",\r\n\t\trepeat_weekly: \"Кожны тыдзень\",\r\n\t\trepeat_monthly: \"Кожны месяц\",\r\n\t\trepeat_yearly: \"Кожны год\",\r\n\t\trepeat_custom: \"Наладжвальны\",\r\n\t\trepeat_freq_day: \"Дзень\",\r\n\t\trepeat_freq_week: \"Тыдзень\",\r\n\t\trepeat_freq_month: \"Месяц\",\r\n\t\trepeat_freq_year: \"Год\",\r\n\t\trepeat_on_date: \"На дату\",\r\n\t\trepeat_ends: \"Заканчваецца\",\r\n\r\n\t\tmonth_for_recurring: [\"Студзеня\", \"Лютага\", \"Сакавіка\", \"Красавіка\", \"Мая\", \"Чэрвеня\", \"Ліпeня\", \"Жніўня\", \"Верасня\", \"Кастрычніка\", \"Лістапада\", \"Снежня\"],\r\n\t\tday_for_recurring: [\"Нядзелю\", \"Панядзелак\", \"Аўторак\", \"Сераду\", \"Чацвер\", \"Пятніцу\", \"Суботу\"]\r\n\t}\r\n};\r\n","/*\r\n @Traducido por Vicente Adria Bohigues - vicenteadria@hotmail.com\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Gener\", \"Febrer\", \"Març\", \"Abril\", \"Maig\", \"Juny\", \"Juliol\", \"Agost\", \"Setembre\", \"Octubre\", \"Novembre\", \"Desembre\"],\r\n\t\tmonth_short: [\"Gen\", \"Feb\", \"Mar\", \"Abr\", \"Mai\", \"Jun\", \"Jul\", \"Ago\", \"Set\", \"Oct\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Diumenge\", \"Dilluns\", \"Dimarts\", \"Dimecres\", \"Dijous\", \"Divendres\", \"Dissabte\"],\r\n\t\tday_short: [\"Dg\", \"Dl\", \"Dm\", \"Dc\", \"Dj\", \"Dv\", \"Ds\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hui\",\r\n\t\tday_tab: \"Dia\",\r\n\t\tweek_tab: \"Setmana\",\r\n\t\tmonth_tab: \"Mes\",\r\n\t\tnew_event: \"Nou esdeveniment\",\r\n\t\ticon_save: \"Guardar\",\r\n\t\ticon_cancel: \"Cancel·lar\",\r\n\t\ticon_details: \"Detalls\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Esborrar\",\r\n\t\tconfirm_closing: \"\", //\"Els seus canvis es perdràn, continuar ?\"\r\n\t\tconfirm_deleting: \"L'esdeveniment s'esborrarà definitivament, continuar ?\",\r\n\t\tsection_description: \"Descripció\",\r\n\t\tsection_time: \"Periode de temps\",\r\n\t\tfull_day: \"Tot el dia\",\r\n\r\n\t\tconfirm_recurring: \"¿Desitja modificar el conjunt d'esdeveniments repetits?\",\r\n\t\tsection_recurring: \"Repeteixca l'esdeveniment\",\r\n\t\tbutton_recurring: \"Impedit\",\r\n\t\tbutton_recurring_open: \"Permés\",\r\n\t\tbutton_edit_series: \"Edit sèrie\",\r\n\t\tbutton_edit_occurrence: \"Edita Instància\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descripció\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Any\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Taula\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create: \"Drag to create\",\r\n\t\tdrag_to_move: \"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour: \"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diari\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Setmanal\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Mensual\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia\",\r\n\t\trepeat_radio_day_type2: \"Cada dia laborable\",\r\n\t\trepeat_week: \" Repetir cada\",\r\n\t\trepeat_text_week_count: \"setmana els dies següents:\",\r\n\t\trepeat_radio_month_type: \"Repetir\",\r\n\t\trepeat_radio_month_start: \"El\",\r\n\t\trepeat_text_month_day: \"dia cada\",\r\n\t\trepeat_text_month_count: \"mes\",\r\n\t\trepeat_text_month_count2_before: \"cada\",\r\n\t\trepeat_text_month_count2_after: \"mes\",\r\n\t\trepeat_year_label: \"El\",\r\n\t\tselect_year_day2: \"de\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mes\",\r\n\t\trepeat_radio_end: \"Sense data de finalització\",\r\n\t\trepeat_text_occurences_count: \"ocurrències\",\r\n\t\trepeat_radio_end2: \"Després\",\r\n\t\trepeat_radio_end3: \"Finalitzar el\",\r\n\r\n\t\trepeat_never: \"Mai\",\r\n\t\trepeat_daily: \"Cada dia\",\r\n\t\trepeat_workdays: \"Cada dia laborable\",\r\n\t\trepeat_weekly: \"Cada setmana\",\r\n\t\trepeat_monthly: \"Cada mes\",\r\n\t\trepeat_yearly: \"Cada any\",\r\n\t\trepeat_custom: \"Personalitzat\",\r\n\t\trepeat_freq_day: \"Dia\",\r\n\t\trepeat_freq_week: \"Setmana\",\r\n\t\trepeat_freq_month: \"Mes\",\r\n\t\trepeat_freq_year: \"Any\",\r\n\t\trepeat_on_date: \"En la data\",\r\n\t\trepeat_ends: \"Finalitza\",\r\n\r\n\t\tmonth_for_recurring: [\"Gener\", \"Febrer\", \"Març\", \"Abril\", \"Maig\", \"Juny\", \"Juliol\", \"Agost\", \"Setembre\", \"Octubre\", \"Novembre\", \"Desembre\"],\r\n\t\tday_for_recurring: [\"Diumenge\", \"Dilluns\", \"Dimarts\", \"Dimecres\", \"Dijous\", \"Divendres\", \"Dissabte\"]\r\n\t}\r\n};","/*\r\nTranslation by FreezeSoul\r\n*/\r\n//scheduler.config.day_date=\"%M %d日 %D\";\r\n//scheduler.config.default_date=\"%Y年 %M %d日\";\r\n//scheduler.config.month_date=\"%Y年 %M\";\r\n\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"一月\", \"二月\", \"三月\", \"四月\", \"五月\", \"六月\", \"七月\", \"八月\", \"九月\", \"十月\", \"十一月\", \"十二月\"],\r\n\t\tmonth_short: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_full: [\"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\"],\r\n\t\tday_short: [\"日\", \"一\", \"二\", \"三\", \"四\", \"五\", \"六\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"今天\",\r\n\t\tday_tab: \"日\",\r\n\t\tweek_tab: \"周\",\r\n\t\tmonth_tab: \"月\",\r\n\t\tnew_event: \"新建日程\",\r\n\t\ticon_save: \"保存\",\r\n\t\ticon_cancel: \"关闭\",\r\n\t\ticon_details: \"详细\",\r\n\t\ticon_edit: \"编辑\",\r\n\t\ticon_delete: \"删除\",\r\n\t\tconfirm_closing: \"请确认是否撤销修改!\", //Your changes will be lost, are your sure?\r\n\t\tconfirm_deleting: \"是否删除日程?\",\r\n\t\tsection_description: \"描述\",\r\n\t\tsection_time: \"时间范围\",\r\n\t\tfull_day: \"整天\",\r\n\r\n\t\tconfirm_recurring:\"请确认是否将日程设为重复模式?\",\r\n\t\tsection_recurring:\"重复周期\",\r\n\t\tbutton_recurring:\"禁用\",\r\n\t\tbutton_recurring_open:\"启用\",\r\n\t\tbutton_edit_series: \"编辑系列\",\r\n\t\tbutton_edit_occurrence: \"编辑实例\",\r\n\t\t\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"议程\",\r\n\t\tdate:\"日期\",\r\n\t\tdescription:\"说明\",\r\n\t\t\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"今年\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"议程\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab:\"电网\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"按天\",\r\n\t\trepeat_radio_week: \"按周\",\r\n\t\trepeat_radio_month: \"按月\",\r\n\t\trepeat_radio_year: \"按年\",\r\n\t\trepeat_radio_day_type: \"每\",\r\n\t\trepeat_text_day_count: \"天\",\r\n\t\trepeat_radio_day_type2: \"每个工作日\",\r\n\t\trepeat_week: \" 重复 每\",\r\n\t\trepeat_text_week_count: \"星期的:\",\r\n\t\trepeat_radio_month_type: \"重复\",\r\n\t\trepeat_radio_month_start: \"在\",\r\n\t\trepeat_text_month_day: \"日 每\",\r\n\t\trepeat_text_month_count: \"月\",\r\n\t\trepeat_text_month_count2_before: \"每\",\r\n\t\trepeat_text_month_count2_after: \"月\",\r\n\t\trepeat_year_label: \"在\",\r\n\t\tselect_year_day2: \"的\",\r\n\t\trepeat_text_year_day: \"日\",\r\n\t\tselect_year_month: \"月\",\r\n\t\trepeat_radio_end: \"无结束日期\",\r\n\t\trepeat_text_occurences_count: \"次结束\",\r\n\t\trepeat_radio_end2: \"重复\",\r\n\t\trepeat_radio_end3: \"结束于\",\r\n\t\t\r\n\t\trepeat_never: \"从不\",\r\n\t\trepeat_daily: \"每天\",\r\n\t\trepeat_workdays: \"每个工作日\",\r\n\t\trepeat_weekly: \"每周\",\r\n\t\trepeat_monthly: \"每月\",\r\n\t\trepeat_yearly: \"每年\",\r\n\t\trepeat_custom: \"自定义\",\r\n\t\trepeat_freq_day: \"天\",\r\n\t\trepeat_freq_week: \"周\",\r\n\t\trepeat_freq_month: \"月\",\r\n\t\trepeat_freq_year: \"年\",\r\n\t\trepeat_on_date: \"在日期\",\r\n\t\trepeat_ends: \"结束\",\r\n\r\n\t\tmonth_for_recurring: [\"一月\", \"二月\", \"三月\", \"四月\", \"五月\", \"六月\", \"七月\", \"八月\", \"九月\", \"十月\", \"十一月\", \"十二月\"],\r\n\t\tday_for_recurring: [\"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Leden\", \"Únor\", \"Březen\", \"Duben\", \"Květen\", \"Červen\", \"Červenec\", \"Srpen\", \"Září\", \"Říjen\", \"Listopad\", \"Prosinec\"],\r\n\t\tmonth_short: [\"Led\", \"Ún\", \"Bře\", \"Dub\", \"Kvě\", \"Čer\", \"Čec\", \"Srp\", \"Září\", \"Říj\", \"List\", \"Pro\"],\r\n\t\tday_full: [\"Neděle\", \"Pondělí\", \"Úterý\", \"Středa\", \"Čtvrtek\", \"Pátek\", \"Sobota\"],\r\n\t\tday_short: [\"Ne\", \"Po\", \"Út\", \"St\", \"Čt\", \"Pá\", \"So\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dnes\",\r\n\t\tday_tab: \"Den\",\r\n\t\tweek_tab: \"Týden\",\r\n\t\tmonth_tab: \"Měsíc\",\r\n\t\tnew_event: \"Nová událost\",\r\n\t\ticon_save: \"Uložit\",\r\n\t\ticon_cancel: \"Zpět\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edituj\",\r\n\t\ticon_delete: \"Smazat\",\r\n\t\tconfirm_closing: \"\", //Vaše změny budou ztraceny, opravdu ?\r\n\t\tconfirm_deleting: \"Událost bude trvale smazána, opravdu?\",\r\n\t\tsection_description: \"Poznámky\",\r\n\t\tsection_time: \"Doba platnosti\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Přejete si upravit celou řadu opakovaných událostí?\",\r\n\t\tsection_recurring: \"Opakování události\",\r\n\t\tbutton_recurring: \"Vypnuto\",\r\n\t\tbutton_recurring_open: \"Zapnuto\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Upravit instance\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Program\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Poznámka\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\t\tfull_day: \"Full day\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Program\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Mřížka\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Denně\",\r\n\t\trepeat_radio_week: \"Týdně\",\r\n\t\trepeat_radio_month: \"Měsíčně\",\r\n\t\trepeat_radio_year: \"Ročně\",\r\n\t\trepeat_radio_day_type: \"každý\",\r\n\t\trepeat_text_day_count: \"Den\",\r\n\t\trepeat_radio_day_type2: \"pracovní dny\",\r\n\t\trepeat_week: \"Opakuje každých\",\r\n\t\trepeat_text_week_count: \"Týdnů na:\",\r\n\t\trepeat_radio_month_type: \"u každého\",\r\n\t\trepeat_radio_month_start: \"na\",\r\n\t\trepeat_text_month_day: \"Den každého\",\r\n\t\trepeat_text_month_count: \"Měsíc\",\r\n\t\trepeat_text_month_count2_before: \"každý\",\r\n\t\trepeat_text_month_count2_after: \"Měsíc\",\r\n\t\trepeat_year_label: \"na\",\r\n\t\tselect_year_day2: \"v\",\r\n\t\trepeat_text_year_day: \"Den v\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"bez data ukončení\",\r\n\t\trepeat_text_occurences_count: \"Události\",\r\n\t\trepeat_radio_end2: \"po\",\r\n\t\trepeat_radio_end3: \"Konec\",\r\n\r\n\t\trepeat_never: \"Nikdy\",\r\n\t\trepeat_daily: \"Každý den\",\r\n\t\trepeat_workdays: \"Každý pracovní den\",\r\n\t\trepeat_weekly: \"Každý týden\",\r\n\t\trepeat_monthly: \"Každý měsíc\",\r\n\t\trepeat_yearly: \"Každý rok\",\r\n\t\trepeat_custom: \"Vlastní\",\r\n\t\trepeat_freq_day: \"Den\",\r\n\t\trepeat_freq_week: \"Týden\",\r\n\t\trepeat_freq_month: \"Měsíc\",\r\n\t\trepeat_freq_year: \"Rok\",\r\n\t\trepeat_on_date: \"Na datum\",\r\n\t\trepeat_ends: \"Končí\",\r\n\r\n\t\tmonth_for_recurring: [\"Leden\", \"Únor\", \"Březen\", \"Duben\", \"Květen\", \"Červen\", \"Červenec\", \"Srpen\", \"Září\", \"Říjen\", \"Listopad\", \"Prosinec\"],\r\n\t\tday_for_recurring: [\"Neděle \", \"Pondělí\", \"Úterý\", \"Středa\", \"Čtvrtek\", \"Pátek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Marts\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Man\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uge\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny begivenhed\",\r\n\t\ticon_save: \"Gem\",\r\n\t\ticon_cancel: \"Fortryd\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Tilret\",\r\n\t\ticon_delete: \"Slet\",\r\n\t\tconfirm_closing: \"Dine rettelser vil gå tabt.. Er dy sikker?\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Bigivenheden vil blive slettet permanent. Er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du tilrette hele serien af gentagne begivenheder?\",\r\n\t\tsection_recurring: \"Gentag begivenhed\",\r\n\t\tbutton_recurring: \"Frakoblet\",\r\n\t\tbutton_recurring_open: \"Tilkoblet\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Rediger en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dagsorden\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dagsorden\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\",\r\n\t\trepeat_radio_week: \"Ugenlig\",\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"På hver arbejdsdag\",\r\n\t\trepeat_week: \" Gentager sig hver\",\r\n\t\trepeat_text_week_count: \"uge på følgende dage:\",\r\n\t\trepeat_radio_month_type: \"Hver den\",\r\n\t\trepeat_radio_month_start: \"Den\",\r\n\t\trepeat_text_month_day: \" i hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"Den\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Ingen slutdato\",\r\n\t\trepeat_text_occurences_count: \"gentagelse\",\r\n\t\trepeat_radio_end2: \"Efter\",\r\n\t\trepeat_radio_end3: \"Slut\",\r\n\r\n\t\trepeat_never: \"Aldrig\",\r\n\t\trepeat_daily: \"Hver dag\",\r\n\t\trepeat_workdays: \"Hver hverdag\",\r\n\t\trepeat_weekly: \"Hver uge\",\r\n\t\trepeat_monthly: \"Hver måned\",\r\n\t\trepeat_yearly: \"Hvert år\",\r\n\t\trepeat_custom: \"Brugerdefineret\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Uge\",\r\n\t\trepeat_freq_month: \"Måned\",\r\n\t\trepeat_freq_year: \"År\",\r\n\t\trepeat_on_date: \"På dato\",\r\n\t\trepeat_ends: \"Slutter\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"März\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Dezember\"],\r\n\t\tday_for_recurring: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\" Januar\", \" Februar\", \" März \", \" April\", \" Mai\", \" Juni\", \" Juli\", \" August\", \" September \", \" Oktober\", \" November \", \" Dezember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mär\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dez\"],\r\n\t\tday_full: [ \"Sonntag\", \"Montag\", \"Dienstag\", \" Mittwoch\", \" Donnerstag\", \"Freitag\", \"Samstag\"],\r\n\t\tday_short: [\"So\", \"Mo\", \"Di\", \"Mi\", \"Do\", \"Fr\", \"Sa\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Heute\",\r\n\t\tday_tab: \"Tag\",\r\n\t\tweek_tab: \"Woche\",\r\n\t\tmonth_tab: \"Monat\",\r\n\t\tnew_event: \"neuer Eintrag\",\r\n\t\ticon_save: \"Speichern\",\r\n\t\ticon_cancel: \"Abbrechen\",\r\n\t\ticon_details: \"Details\",\r\n\t\ticon_edit: \"Ändern\",\r\n\t\ticon_delete: \"Löschen\",\r\n\t\tconfirm_closing: \"\", //\"Ihre Veränderungen werden verloren sein, wollen Sie ergänzen? \"\r\n\t\tconfirm_deleting: \"Der Eintrag wird gelöscht\",\r\n\t\tsection_description: \"Beschreibung\",\r\n\t\tsection_time: \"Zeitspanne\",\r\n\t\tfull_day: \"Ganzer Tag\",\r\n\r\n\t\tconfirm_recurring: \"Wollen Sie alle Einträge bearbeiten oder nur diesen einzelnen Eintrag?\",\r\n\t\tsection_recurring: \"Wiederholung\",\r\n\t\tbutton_recurring: \"Aus\",\r\n\t\tbutton_recurring_open: \"An\",\r\n\t\tbutton_edit_series: \"Bearbeiten Sie die Serie\",\r\n\t\tbutton_edit_occurrence: \"Bearbeiten Sie eine Kopie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Beschreibung\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Jahre\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Täglich\",\r\n\t\trepeat_radio_week: \"Wöchentlich\",\r\n\t\trepeat_radio_month: \"Monatlich\",\r\n\t\trepeat_radio_year: \"Jährlich\",\r\n\t\trepeat_radio_day_type: \"jeden\",\r\n\t\trepeat_text_day_count: \"Tag\",\r\n\t\trepeat_radio_day_type2: \"an jedem Arbeitstag\",\r\n\t\trepeat_week: \" Wiederholt sich jede\",\r\n\t\trepeat_text_week_count: \"Woche am:\",\r\n\t\trepeat_radio_month_type: \"an jedem\",\r\n\t\trepeat_radio_month_start: \"am\",\r\n\t\trepeat_text_month_day: \"Tag eines jeden\",\r\n\t\trepeat_text_month_count: \"Monats\",\r\n\t\trepeat_text_month_count2_before: \"jeden\",\r\n\t\trepeat_text_month_count2_after: \"Monats\",\r\n\t\trepeat_year_label: \"am\",\r\n\t\tselect_year_day2: \"im\",\r\n\t\trepeat_text_year_day: \"Tag im\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"kein Enddatum\",\r\n\t\trepeat_text_occurences_count: \"Ereignissen\",\r\n\t\trepeat_radio_end3: \"Schluß\",\r\n\t\trepeat_radio_end2: \"nach\",\r\n\r\n\t\trepeat_never: \"Nie\",\r\n\t\trepeat_daily: \"Jeden Tag\",\r\n\t\trepeat_workdays: \"Jeden Werktag\",\r\n\t\trepeat_weekly: \"Jede Woche\",\r\n\t\trepeat_monthly: \"Jeden Monat\",\r\n\t\trepeat_yearly: \"Jedes Jahr\",\r\n\t\trepeat_custom: \"Benutzerdefiniert\",\r\n\t\trepeat_freq_day: \"Tag\",\r\n\t\trepeat_freq_week: \"Woche\",\r\n\t\trepeat_freq_month: \"Monat\",\r\n\t\trepeat_freq_year: \"Jahr\",\r\n\t\trepeat_on_date: \"Am Datum\",\r\n\t\trepeat_ends: \"Endet\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"März\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Dezember\"],\r\n\t\tday_for_recurring: [\"Sonntag\", \"Montag\", \"Dienstag\", \"Mittwoch\", \"Donnerstag\", \"Freitag\", \"Samstag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Ιανουάριος\", \"Φεβρουάριος\", \"Μάρτιος\", \"Απρίλιος\", \"Μάϊος\", \"Ιούνιος\", \"Ιούλιος\", \"Αύγουστος\", \"Σεπτέμβριος\", \"Οκτώβριος\", \"Νοέμβριος\", \"Δεκέμβριος\"],\r\n\t\tmonth_short: [\"ΙΑΝ\", \"ΦΕΒ\", \"ΜΑΡ\", \"ΑΠΡ\", \"ΜΑΙ\", \"ΙΟΥΝ\", \"ΙΟΥΛ\", \"ΑΥΓ\", \"ΣΕΠ\", \"ΟΚΤ\", \"ΝΟΕ\", \"ΔΕΚ\"],\r\n\t\tday_full: [\"Κυριακή\", \"Δευτέρα\", \"Τρίτη\", \"Τετάρτη\", \"Πέμπτη\", \"Παρασκευή\", \"Σάββατο\"],\r\n\t\tday_short: [\"ΚΥ\", \"ΔΕ\", \"ΤΡ\", \"ΤΕ\", \"ΠΕ\", \"ΠΑ\", \"ΣΑ\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Σήμερα\",\r\n\t\tday_tab: \"Ημέρα\",\r\n\t\tweek_tab: \"Εβδομάδα\",\r\n\t\tmonth_tab: \"Μήνας\",\r\n\t\tnew_event: \"Νέο έργο\",\r\n\t\ticon_save: \"Αποθήκευση\",\r\n\t\ticon_cancel: \"Άκυρο\",\r\n\t\ticon_details: \"Λεπτομέρειες\",\r\n\t\ticon_edit: \"Επεξεργασία\",\r\n\t\ticon_delete: \"Διαγραφή\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Το έργο θα διαγραφεί οριστικά. Θέλετε να συνεχίσετε;\",\r\n\t\tsection_description: \"Περιγραφή\",\r\n\t\tsection_time: \"Χρονική περίοδος\",\r\n\t\tfull_day: \"Πλήρης Ημέρα\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Θέλετε να επεξεργασθείτε ολόκληρη την ομάδα των επαναλαμβανόμενων έργων;\",\r\n\t\tsection_recurring: \"Επαναλαμβανόμενο έργο\",\r\n\t\tbutton_recurring: \"Ανενεργό\",\r\n\t\tbutton_recurring_open: \"Ενεργό\",\r\n\t\tbutton_edit_series: \"Επεξεργαστείτε τη σειρά\",\r\n\t\tbutton_edit_occurrence: \"Επεξεργασία ένα αντίγραφο\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Ημερήσια Διάταξη\",\r\n\t\tdate: \"Ημερομηνία\",\r\n\t\tdescription: \"Περιγραφή\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Έτος\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Ημερήσια Διάταξη\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Πλέγμα\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Ημερησίως\",\r\n\t\trepeat_radio_week: \"Εβδομαδιαίως\",\r\n\t\trepeat_radio_month: \"Μηνιαίως\",\r\n\t\trepeat_radio_year: \"Ετησίως\",\r\n\t\trepeat_radio_day_type: \"Κάθε\",\r\n\t\trepeat_text_day_count: \"ημέρα\",\r\n\t\trepeat_radio_day_type2: \"Κάθε εργάσιμη\",\r\n\t\trepeat_week: \" Επανάληψη κάθε\",\r\n\t\trepeat_text_week_count: \"εβδομάδα τις επόμενες ημέρες:\",\r\n\t\trepeat_radio_month_type: \"Επανάληψη\",\r\n\t\trepeat_radio_month_start: \"Την\",\r\n\t\trepeat_text_month_day: \"ημέρα κάθε\",\r\n\t\trepeat_text_month_count: \"μήνα\",\r\n\t\trepeat_text_month_count2_before: \"κάθε\",\r\n\t\trepeat_text_month_count2_after: \"μήνα\",\r\n\t\trepeat_year_label: \"Την\",\r\n\t\tselect_year_day2: \"του\",\r\n\t\trepeat_text_year_day: \"ημέρα\",\r\n\t\tselect_year_month: \"μήνα\",\r\n\t\trepeat_radio_end: \"Χωρίς ημερομηνία λήξεως\",\r\n\t\trepeat_text_occurences_count: \"επαναλήψεις\",\r\n\t\trepeat_radio_end3: \"Λήγει την\",\r\n\t\trepeat_radio_end2: \"Μετά από\",\r\n\r\n\t\trepeat_never: \"Ποτέ\",\r\n\t\trepeat_daily: \"Κάθε μέρα\",\r\n\t\trepeat_workdays: \"Κάθε εργάσιμη μέρα\",\r\n\t\trepeat_weekly: \"Κάθε εβδομάδα\",\r\n\t\trepeat_monthly: \"Κάθε μήνα\",\r\n\t\trepeat_yearly: \"Κάθε χρόνο\",\r\n\t\trepeat_custom: \"Προσαρμοσμένο\",\r\n\t\trepeat_freq_day: \"Ημέρα\",\r\n\t\trepeat_freq_week: \"Εβδομάδα\",\r\n\t\trepeat_freq_month: \"Μήνας\",\r\n\t\trepeat_freq_year: \"Χρόνος\",\r\n\t\trepeat_on_date: \"Σε ημερομηνία\",\r\n\t\trepeat_ends: \"Λήγει\",\r\n\r\n\t\tmonth_for_recurring: [\"Ιανουάριος\", \"Φεβρουάριος\", \"Μάρτιος\", \"Απρίλιος\", \"Μάϊος\", \"Ιούνιος\", \"Ιούλιος\", \"Αύγουστος\", \"Σεπτέμβριος\", \"Οκτώβριος\", \"Νοέμβριος\", \"Δεκέμβριος\"],\r\n\t\tday_for_recurring: [\"Κυριακή\", \"Δευτέρα\", \"Τρίτη\", \"Τετάρτη\", \"Πέμπτη\", \"Παρασκευή\", \"Σάββατο\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate:{\r\n\t\tmonth_full:[\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\r\n\t\tmonth_short:[\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n\t\tday_full:[\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\r\n\t\tday_short:[\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"]\r\n\t},\r\n\tlabels:{\r\n\t\tdhx_cal_today_button:\"Today\",\r\n\t\tday_tab:\"Day\",\r\n\t\tweek_tab:\"Week\",\r\n\t\tmonth_tab:\"Month\",\r\n\t\tnew_event:\"New event\",\r\n\t\ticon_save:\"Save\",\r\n\t\ticon_cancel:\"Cancel\",\r\n\t\ticon_details:\"Details\",\r\n\t\ticon_edit:\"Edit\",\r\n\t\ticon_delete:\"Delete\",\r\n\t\tconfirm_closing:\"\",//Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting:\"Event will be deleted permanently, are you sure?\",\r\n\t\tsection_description:\"Description\",\r\n\t\tsection_time:\"Time period\",\r\n\t\tfull_day:\"Full day\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring:\"Do you want to edit the whole set of repeated events?\",\r\n\t\tsection_recurring:\"Repeat event\",\r\n\t\tbutton_recurring:\"Disabled\",\r\n\t\tbutton_recurring_open:\"Enabled\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Edit occurrence\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"Agenda\",\r\n\t\tdate:\"Date\",\r\n\t\tdescription:\"Description\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"Year\",\r\n\r\n\t\t/* week agenda extension */\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daily\",//name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Weekly\",//name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Monthly\",\r\n\t\trepeat_radio_year: \"Yearly\",\r\n\t\trepeat_radio_day_type: \"Every\",\r\n\t\trepeat_text_day_count: \"day\",\r\n\t\trepeat_radio_day_type2: \"Every workday\",\r\n\t\trepeat_week: \" Repeat every\",\r\n\t\trepeat_text_week_count: \"week next days:\",\r\n\t\trepeat_radio_month_type: \"Repeat\",\r\n\t\trepeat_radio_month_start: \"On\",\r\n\t\trepeat_text_month_day: \"day every\",\r\n\t\trepeat_text_month_count: \"month\",\r\n\t\trepeat_text_month_count2_before: \"every\",\r\n\t\trepeat_text_month_count2_after: \"month\",\r\n\t\trepeat_year_label: \"On\",\r\n\t\tselect_year_day2: \"of\",\r\n\t\trepeat_text_year_day: \"day\",\r\n\t\tselect_year_month: \"month\",\r\n\t\trepeat_radio_end: \"No end date\",\r\n\t\trepeat_text_occurences_count: \"occurrences\",\r\n\t\trepeat_radio_end2: \"After\",\r\n\t\trepeat_radio_end3: \"End by\",\r\n\r\n\t\trepeat_never: \"Never\",\r\n\t\trepeat_daily: \"Every day\",\r\n\t\trepeat_workdays: \"Every weekday\",\r\n\t\trepeat_weekly: \"Every week\",\r\n\t\trepeat_monthly: \"Every month\",\r\n\t\trepeat_yearly: \"Every year\",\r\n\t\trepeat_custom: \"Custom\",\r\n\t\trepeat_freq_day: \"Day\",\r\n\t\trepeat_freq_week: \"Week\",\r\n\t\trepeat_freq_month: \"Month\",\r\n\t\trepeat_freq_year: \"Year\",\r\n\t\trepeat_on_date: \"On date\",\r\n\t\trepeat_ends: \"Ends\",\r\n\r\n\t\tmonth_for_recurring: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"]//\r\n\t}\r\n};\r\n\r\n","/*\r\n @Autor Manuel Fernandez Panzuela - www.mfernandez.es\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Enero\", \"Febrero\", \"Marzo\", \"Abril\", \"Mayo\", \"Junio\", \"Julio\", \"Agosto\", \"Septiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"],\r\n\t\tmonth_short: [\"Ene\", \"Feb\", \"Mar\", \"Abr\", \"May\", \"Jun\", \"Jul\", \"Ago\", \"Sep\", \"Oct\", \"Nov\", \"Dic\"],\r\n\t\tday_full: [\"Domingo\", \"Lunes\", \"Martes\", \"Miércoles\", \"Jueves\", \"Viernes\", \"Sábado\"],\r\n\t\tday_short: [\"Dom\", \"Lun\", \"Mar\", \"Mié\", \"Jue\", \"Vie\", \"Sáb\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hoy\",\r\n\t\tday_tab: \"Día\",\r\n\t\tweek_tab: \"Semana\",\r\n\t\tmonth_tab: \"Mes\",\r\n\t\tnew_event: \"Nuevo evento\",\r\n\t\ticon_save: \"Guardar\",\r\n\t\ticon_cancel: \"Cancelar\",\r\n\t\ticon_details: \"Detalles\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Eliminar\",\r\n\t\tconfirm_closing: \"\", //\"Sus cambios se perderán, continuar ?\"\r\n\t\tconfirm_deleting: \"El evento se borrará definitivamente, ¿continuar?\",\r\n\t\tsection_description: \"Descripción\",\r\n\t\tsection_time: \"Período\",\r\n\t\tfull_day: \"Todo el día\",\r\n\r\n\t\tconfirm_recurring: \"¿Desea modificar el conjunto de eventos repetidos?\",\r\n\t\tsection_recurring: \"Repita el evento\",\r\n\t\tbutton_recurring: \"Impedido\",\r\n\t\tbutton_recurring_open: \"Permitido\",\r\n\t\tbutton_edit_series: \"Editar la serie\",\r\n\t\tbutton_edit_occurrence: \"Editar este evento\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Día\",\r\n\t\tdate: \"Fecha\",\r\n\t\tdescription: \"Descripción\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Año\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Día\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Reja\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diariamente\",\r\n\t\trepeat_radio_week: \"Semanalmente\",\r\n\t\trepeat_radio_month: \"Mensualmente\",\r\n\t\trepeat_radio_year: \"Anualmente\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia\",\r\n\t\trepeat_radio_day_type2: \"Cada jornada de trabajo\",\r\n\t\trepeat_week: \" Repetir cada\",\r\n\t\trepeat_text_week_count: \"semana:\",\r\n\t\trepeat_radio_month_type: \"Repita\",\r\n\t\trepeat_radio_month_start: \"El\",\r\n\t\trepeat_text_month_day: \"dia cada \",\r\n\t\trepeat_text_month_count: \"mes\",\r\n\t\trepeat_text_month_count2_before: \"cada\",\r\n\t\trepeat_text_month_count2_after: \"mes\",\r\n\t\trepeat_year_label: \"El\",\r\n\t\tselect_year_day2: \"del\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mes\",\r\n\t\trepeat_radio_end: \"Sin fecha de finalización\",\r\n\t\trepeat_text_occurences_count: \"ocurrencias\",\r\n\t\trepeat_radio_end3: \"Fin\",\r\n\t\trepeat_radio_end2: \"Después de\",\r\n\r\n\t\trepeat_never: \"Nunca\",\r\n\t\trepeat_daily: \"Cada día\",\r\n\t\trepeat_workdays: \"Cada día laborable\",\r\n\t\trepeat_weekly: \"Cada semana\",\r\n\t\trepeat_monthly: \"Cada mes\",\r\n\t\trepeat_yearly: \"Cada año\",\r\n\t\trepeat_custom: \"Personalizado\",\r\n\t\trepeat_freq_day: \"Día\",\r\n\t\trepeat_freq_week: \"Semana\",\r\n\t\trepeat_freq_month: \"Mes\",\r\n\t\trepeat_freq_year: \"Año\",\r\n\t\trepeat_on_date: \"En la fecha\",\r\n\t\trepeat_ends: \"Termina\",\r\n\r\n\t\tmonth_for_recurring: [\"Enero\", \"Febrero\", \"Маrzo\", \"Аbril\", \"Mayo\", \"Junio\", \"Julio\", \"Аgosto\", \"Setiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"],\r\n\t\tday_for_recurring: [\"Domingo\", \"Lunes\", \"Martes\", \"Miércoles\", \"Jeuves\", \"Viernes\", \"Sabado\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Tammikuu\", \"Helmikuu\", \"Maaliskuu\", \"Huhtikuu\", \"Toukokuu\", \"Kesäkuu\", \"Heinäkuu\", \"Elokuu\", \"Syyskuu\", \"Lokakuu\", \"Marraskuu\", \"Joulukuu\"],\r\n\t\tmonth_short: [\"Tam\", \"Hel\", \"Maa\", \"Huh\", \"Tou\", \"Kes\", \"Hei\", \"Elo\", \"Syy\", \"Lok\", \"Mar\", \"Jou\"],\r\n\t\tday_full: [\"Sunnuntai\", \"Maanantai\", \"Tiistai\", \"Keskiviikko\", \"Torstai\", \"Perjantai\", \"Lauantai\"],\r\n\t\tday_short: [\"Su\", \"Ma\", \"Ti\", \"Ke\", \"To\", \"Pe\", \"La\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Tänään\",\r\n\t\tday_tab: \"Päivä\",\r\n\t\tweek_tab: \"Viikko\",\r\n\t\tmonth_tab: \"Kuukausi\",\r\n\t\tnew_event: \"Uusi tapahtuma\",\r\n\t\ticon_save: \"Tallenna\",\r\n\t\ticon_cancel: \"Peru\",\r\n\t\ticon_details: \"Tiedot\",\r\n\t\ticon_edit: \"Muokkaa\",\r\n\t\ticon_delete: \"Poista\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Haluatko varmasti poistaa tapahtuman?\",\r\n\t\tsection_description: \"Kuvaus\",\r\n\t\tsection_time: \"Aikajakso\",\r\n\t\tfull_day: \"Koko päivä\",\r\n\r\n\t\tconfirm_recurring: \"Haluatko varmasti muokata toistuvan tapahtuman kaikkia jaksoja?\",\r\n\t\tsection_recurring: \"Toista tapahtuma\",\r\n\t\tbutton_recurring: \"Ei käytössä\",\r\n\t\tbutton_recurring_open: \"Käytössä\",\r\n\t\tbutton_edit_series: \"Muokkaa sarja\",\r\n\t\tbutton_edit_occurrence: \"Muokkaa kopio\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Esityslista\",\r\n\t\tdate: \"Päivämäärä\",\r\n\t\tdescription: \"Kuvaus\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Vuoden\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Esityslista\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Ritilä\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Luo uusi vetämällä\",\r\n\t\tdrag_to_move:\"Siirrä vetämällä\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Päivittäin\",\r\n\t\trepeat_radio_week: \"Viikoittain\",\r\n\t\trepeat_radio_month: \"Kuukausittain\",\r\n\t\trepeat_radio_year: \"Vuosittain\",\r\n\t\trepeat_radio_day_type: \"Joka\",\r\n\t\trepeat_text_day_count: \"päivä\",\r\n\t\trepeat_radio_day_type2: \"Joka arkipäivä\",\r\n\t\trepeat_week: \"Toista joka\",\r\n\t\trepeat_text_week_count: \"viikko näinä päivinä:\",\r\n\t\trepeat_radio_month_type: \"Toista\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \"päivänä joka\",\r\n\t\trepeat_text_month_count: \"kuukausi\",\r\n\t\trepeat_text_month_count2_before: \"joka\",\r\n\t\trepeat_text_month_count2_after: \"kuukausi\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"päivä\",\r\n\t\tselect_year_month: \"kuukausi\",\r\n\t\trepeat_radio_end: \"Ei loppumisaikaa\",\r\n\t\trepeat_text_occurences_count: \"Toiston jälkeen\",\r\n\t\trepeat_radio_end3: \"Loppuu\",\r\n\t\trepeat_radio_end2: \"\",\r\n\r\n\t\trepeat_never: \"Ei koskaan\",\r\n\t\trepeat_daily: \"Joka päivä\",\r\n\t\trepeat_workdays: \"Joka arkipäivä\",\r\n\t\trepeat_weekly: \"Joka viikko\",\r\n\t\trepeat_monthly: \"Joka kuukausi\",\r\n\t\trepeat_yearly: \"Joka vuosi\",\r\n\t\trepeat_custom: \"Mukautettu\",\r\n\t\trepeat_freq_day: \"Päivä\",\r\n\t\trepeat_freq_week: \"Viikko\",\r\n\t\trepeat_freq_month: \"Kuukausi\",\r\n\t\trepeat_freq_year: \"Vuosi\",\r\n\t\trepeat_on_date: \"Tiettynä päivänä\",\r\n\t\trepeat_ends: \"Päättyy\",\r\n\r\n\t\tmonth_for_recurring: [\"Tammikuu\", \"Helmikuu\", \"Maaliskuu\", \"Huhtikuu\", \"Toukokuu\", \"Kesäkuu\", \"Heinäkuu\", \"Elokuu\", \"Syyskuu\", \"Lokakuu\", \"Marraskuu\", \"Joulukuu\"],\r\n\t\tday_for_recurring: [\"Sunnuntai\", \"Maanantai\", \"Tiistai\", \"Keskiviikko\", \"Torstai\", \"Perjantai\", \"Lauantai\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Janvier\", \"Février\", \"Mars\", \"Avril\", \"Mai\", \"Juin\", \"Juillet\", \"Août\", \"Septembre\", \"Octobre\", \"Novembre\", \"Décembre\"],\r\n\t\tmonth_short: [\"Jan\", \"Fév\", \"Mar\", \"Avr\", \"Mai\", \"Juin\", \"Juil\", \"Aoû\", \"Sep\", \"Oct\", \"Nov\", \"Déc\"],\r\n\t\tday_full: [\"Dimanche\", \"Lundi\", \"Mardi\", \"Mercredi\", \"Jeudi\", \"Vendredi\", \"Samedi\"],\r\n\t\tday_short: [\"Dim\", \"Lun\", \"Mar\", \"Mer\", \"Jeu\", \"Ven\", \"Sam\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Aujourd'hui\",\r\n\t\tday_tab: \"Jour\",\r\n\t\tweek_tab: \"Semaine\",\r\n\t\tmonth_tab: \"Mois\",\r\n\t\tnew_event: \"Nouvel événement\",\r\n\t\ticon_save: \"Enregistrer\",\r\n\t\ticon_cancel: \"Annuler\",\r\n\t\ticon_details: \"Détails\",\r\n\t\ticon_edit: \"Modifier\",\r\n\t\ticon_delete: \"Effacer\",\r\n\t\tconfirm_closing: \"\", //Vos modifications seront perdus, êtes-vous sûr ?\r\n\t\tconfirm_deleting: \"L'événement sera effacé sans appel, êtes-vous sûr ?\",\r\n\t\tsection_description: \"Description\",\r\n\t\tsection_time: \"Période\",\r\n\t\tfull_day: \"Journée complète\",\r\n\r\n\t\tconfirm_recurring: \"Voulez-vous éditer toute une série d'évènements répétés?\",\r\n\t\tsection_recurring: \"Périodicité\",\r\n\t\tbutton_recurring: \"Désactivé\",\r\n\t\tbutton_recurring_open: \"Activé\",\r\n\t\tbutton_edit_series: \"Modifier la série\",\r\n\t\tbutton_edit_occurrence: \"Modifier une copie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Jour\",\r\n\t\tdate: \"Date\",\r\n\t\tdescription: \"Description\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Année\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Jour\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grille\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Quotidienne\",\r\n\t\trepeat_radio_week: \"Hebdomadaire\",\r\n\t\trepeat_radio_month: \"Mensuelle\",\r\n\t\trepeat_radio_year: \"Annuelle\",\r\n\t\trepeat_radio_day_type: \"Chaque\",\r\n\t\trepeat_text_day_count: \"jour\",\r\n\t\trepeat_radio_day_type2: \"Chaque journée de travail\",\r\n\t\trepeat_week: \" Répéter toutes les\",\r\n\t\trepeat_text_week_count: \"semaine:\",\r\n\t\trepeat_radio_month_type: \"Répéter\",\r\n\t\trepeat_radio_month_start: \"Le\",\r\n\t\trepeat_text_month_day: \"jour chaque\",\r\n\t\trepeat_text_month_count: \"mois\",\r\n\t\trepeat_text_month_count2_before: \"chaque\",\r\n\t\trepeat_text_month_count2_after: \"mois\",\r\n\t\trepeat_year_label: \"Le\",\r\n\t\tselect_year_day2: \"du\",\r\n\t\trepeat_text_year_day: \"jour\",\r\n\t\tselect_year_month: \"mois\",\r\n\t\trepeat_radio_end: \"Pas de date d"achèvement\",\r\n\t\trepeat_text_occurences_count: \"occurrences\",\r\n\t\trepeat_radio_end3: \"Fin\",\r\n\t\trepeat_radio_end2: \"Après\",\r\n\r\n\t\trepeat_never: \"Jamais\",\r\n\t\trepeat_daily: \"Chaque jour\",\r\n\t\trepeat_workdays: \"Chaque jour ouvrable\",\r\n\t\trepeat_weekly: \"Chaque semaine\",\r\n\t\trepeat_monthly: \"Chaque mois\",\r\n\t\trepeat_yearly: \"Chaque année\",\r\n\t\trepeat_custom: \"Personnalisé\",\r\n\t\trepeat_freq_day: \"Jour\",\r\n\t\trepeat_freq_week: \"Semaine\",\r\n\t\trepeat_freq_month: \"Mois\",\r\n\t\trepeat_freq_year: \"Année\",\r\n\t\trepeat_on_date: \"À la date\",\r\n\t\trepeat_ends: \"Se termine\",\r\n\r\n\t\tmonth_for_recurring: [\"Janvier\", \"Février\", \"Mars\", \"Avril\", \"Mai\", \"Juin\", \"Juillet\", \"Août\", \"Septembre\", \"Octobre\", \"Novembre\", \"Décembre\"],\r\n\t\tday_for_recurring: [\"Dimanche\", \"Lundi\", \"Mardi\", \"Mercredi\", \"Jeudi\", \"Vendredi\", \"Samedi\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"ינואר\", \"פברואר\", \"מרץ\", \"אפריל\", \"מאי\", \"יוני\", \"יולי\", \"אוגוסט\", \"ספטמבר\", \"אוקטובר\", \"נובמבר\", \"דצמבר\"],\r\n\t\tmonth_short: [\"ינו\", \"פבר\", \"מרץ\", \"אפר\", \"מאי\", \"יונ\", \"יול\", \"אוג\", \"ספט\", \"אוק\", \"נוב\", \"דצמ\"],\r\n\t\tday_full: [\"ראשון\", \"שני\", \"שלישי\", \"רביעי\", \"חמישי\", \"שישי\", \"שבת\"],\r\n\t\tday_short: [\"א\", \"ב\", \"ג\", \"ד\", \"ה\", \"ו\", \"ש\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"היום\",\r\n\t\tday_tab: \"יום\",\r\n\t\tweek_tab: \"שבוע\",\r\n\t\tmonth_tab: \"חודש\",\r\n\t\tnew_event: \"ארוע חדש\",\r\n\t\ticon_save: \"שמור\",\r\n\t\ticon_cancel: \"בטל\",\r\n\t\ticon_details: \"פרטים\",\r\n\t\ticon_edit: \"ערוך\",\r\n\t\ticon_delete: \"מחק\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"ארוע ימחק סופית.להמשיך?\",\r\n\t\tsection_description: \"תיאור\",\r\n\t\tsection_time: \"תקופה\",\r\n\r\n\t\tconfirm_recurring: \"האם ברצונך לשנות כל סדרת ארועים מתמשכים?\",\r\n\t\tsection_recurring: \"להעתיק ארוע\",\r\n\t\tbutton_recurring: \"לא פעיל\",\r\n\t\tbutton_recurring_open: \"פעיל\",\r\n\t\tfull_day: \"יום שלם\",\r\n\t\tbutton_edit_series: \"ערוך את הסדרה\",\r\n\t\tbutton_edit_occurrence: \"עריכת עותק\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"סדר יום\",\r\n\t\tdate: \"תאריך\",\r\n\t\tdescription: \"תיאור\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"לשנה\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"סדר יום\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"סורג\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"גרור כדי להזיז\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"בטל\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"הבא\",\r\n\t\tprev: \"הקודם\",\r\n\t\tyear: \"שנה\",\r\n\t\tmonth: \"חודש\",\r\n\t\tday: \"יום\",\r\n\t\thour:\"שעה\",\r\n\t\tminute: \"דקה\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"יומי\",\r\n\t\trepeat_radio_week: \"שבועי\",\r\n\t\trepeat_radio_month: \"חודשי\",\r\n\t\trepeat_radio_year: \"שנתי\",\r\n\t\trepeat_radio_day_type: \"חזור כל\",\r\n\t\trepeat_text_day_count: \"ימים\",\r\n\t\trepeat_radio_day_type2: \"חזור כל יום עבודה\",\r\n\t\trepeat_week: \" חזור כל\",\r\n\t\trepeat_text_week_count: \"שבוע לפי ימים:\",\r\n\t\trepeat_radio_month_type: \"חזור כל\",\r\n\t\trepeat_radio_month_start: \"כל\",\r\n\t\trepeat_text_month_day: \"ימים כל\",\r\n\t\trepeat_text_month_count: \"חודשים\",\r\n\t\trepeat_text_month_count2_before: \"חזור כל\",\r\n\t\trepeat_text_month_count2_after: \"חודש\",\r\n\t\trepeat_year_label: \"כל\",\r\n\t\tselect_year_day2: \"בחודש\",\r\n\t\trepeat_text_year_day: \"ימים\",\r\n\t\tselect_year_month: \"חודש\",\r\n\t\trepeat_radio_end: \"לעולם לא מסתיים\",\r\n\t\trepeat_text_occurences_count: \"אירועים\",\r\n\t\trepeat_radio_end3: \"מסתיים ב\",\r\n\t\trepeat_radio_end2: \"אחרי\",\r\n\r\n\t\trepeat_never: \"אף פעם\",\r\n\t\trepeat_daily: \"כל יום\",\r\n\t\trepeat_workdays: \"כל יום עבודה\",\r\n\t\trepeat_weekly: \"כל שבוע\",\r\n\t\trepeat_monthly: \"כל חודש\",\r\n\t\trepeat_yearly: \"כל שנה\",\r\n\t\trepeat_custom: \"מותאם אישית\",\r\n\t\trepeat_freq_day: \"יום\",\r\n\t\trepeat_freq_week: \"שבוע\",\r\n\t\trepeat_freq_month: \"חודש\",\r\n\t\trepeat_freq_year: \"שנה\",\r\n\t\trepeat_on_date: \"בתאריך\",\r\n\t\trepeat_ends: \"מסתיים\",\r\n\r\n\t\tmonth_for_recurring: [\"ינואר\", \"פברואר\", \"מרץ\", \"אפריל\", \"מאי\", \"יוני\", \"יולי\", \"אוגוסט\", \"ספטמבר\", \"אוקטובר\", \"נובמבר\", \"דצמבר\"],\r\n\t\tday_for_recurring: [\"ראשון\", \"שני\", \"שלישי\", \"רביעי\", \"חמישי\", \"שישי\", \"שבת\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Január\", \"Február\", \"Március\", \"Április\", \"Május\", \"Június\", \"Július\", \"Augusztus\", \"Szeptember\", \"Október\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Már\", \"Ápr\", \"Máj\", \"Jún\", \"Júl\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Vasárnap\", \"Hétfõ\", \"Kedd\", \"Szerda\", \"Csütörtök\", \"Péntek\", \"szombat\"],\r\n\t\tday_short: [\"Va\", \"Hé\", \"Ke\", \"Sze\", \"Csü\", \"Pé\", \"Szo\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Ma\",\r\n\t\tday_tab: \"Nap\",\r\n\t\tweek_tab: \"Hét\",\r\n\t\tmonth_tab: \"Hónap\",\r\n\t\tnew_event: \"Új esemény\",\r\n\t\ticon_save: \"Mentés\",\r\n\t\ticon_cancel: \"Mégse\",\r\n\t\ticon_details: \"Részletek\",\r\n\t\ticon_edit: \"Szerkesztés\",\r\n\t\ticon_delete: \"Törlés\",\r\n\t\tconfirm_closing: \"\", //A változások elvesznek, biztosan folytatja? \"\r\n\t\tconfirm_deleting: \"Az esemény törölve lesz, biztosan folytatja?\",\r\n\t\tsection_description: \"Leírás\",\r\n\t\tsection_time: \"Idõszak\",\r\n\t\tfull_day: \"Egesz napos\",\r\n\r\n\t\t/*ismétlõdõ események*/\r\n\t\tconfirm_recurring: \"Biztosan szerkeszteni akarod az összes ismétlõdõ esemény beállítását?\",\r\n\t\tsection_recurring: \"Esemény ismétlése\",\r\n\t\tbutton_recurring: \"Tiltás\",\r\n\t\tbutton_recurring_open: \"Engedélyezés\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Szerkesztés bíróság\",\r\n\r\n\t\t/*napirendi nézet*/\r\n\t\tagenda_tab: \"Napirend\",\r\n\t\tdate: \"Dátum\",\r\n\t\tdescription: \"Leírás\",\r\n\r\n\t\t/*éves nézet*/\r\n\t\tyear_tab: \"Év\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Napi\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Heti\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Havi\",\r\n\t\trepeat_radio_year: \"Éves\",\r\n\t\trepeat_radio_day_type: \"Minden\",\r\n\t\trepeat_text_day_count: \"nap\",\r\n\t\trepeat_radio_day_type2: \"Minden munkanap\",\r\n\t\trepeat_week: \" Ismételje meg minden\",\r\n\t\trepeat_text_week_count: \"héten a következő napokon:\",\r\n\t\trepeat_radio_month_type: \"Ismétlés\",\r\n\t\trepeat_radio_month_start: \"Ekkor\",\r\n\t\trepeat_text_month_day: \"nap minden\",\r\n\t\trepeat_text_month_count: \"hónapban\",\r\n\t\trepeat_text_month_count2_before: \"minden\",\r\n\t\trepeat_text_month_count2_after: \"hónapban\",\r\n\t\trepeat_year_label: \"Ekkor\",\r\n\t\tselect_year_day2: \"-án/-én\",\r\n\t\trepeat_text_year_day: \"nap\",\r\n\t\tselect_year_month: \"hónap\",\r\n\t\trepeat_radio_end: \"Nincs befejezési dátum\",\r\n\t\trepeat_text_occurences_count: \"esemény\",\r\n\t\trepeat_radio_end2: \"Után\",\r\n\t\trepeat_radio_end3: \"Befejező dátum\",\r\n\r\n\t\trepeat_never: \"Soha\",\r\n\t\trepeat_daily: \"Minden nap\",\r\n\t\trepeat_workdays: \"Minden munkanap\",\r\n\t\trepeat_weekly: \"Minden héten\",\r\n\t\trepeat_monthly: \"Minden hónapban\",\r\n\t\trepeat_yearly: \"Minden évben\",\r\n\t\trepeat_custom: \"Egyedi\",\r\n\t\trepeat_freq_day: \"Nap\",\r\n\t\trepeat_freq_week: \"Hét\",\r\n\t\trepeat_freq_month: \"Hónap\",\r\n\t\trepeat_freq_year: \"Év\",\r\n\t\trepeat_on_date: \"Dátum szerint\",\r\n\t\trepeat_ends: \"Befejeződik\",\r\n\r\n\t\tmonth_for_recurring: [\"Január\", \"Február\", \"Március\", \"Április\", \"Május\", \"Június\", \"Július\", \"Augusztus\", \"Szeptember\", \"Október\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Vasárnap\", \"Hétfő\", \"Kedd\", \"Szerda\", \"Csütörtök\", \"Péntek\", \"Szombat\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Maret\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Agustus\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mei\", \"Jun\", \"Jul\", \"Ags\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Minggu\", \"Senin\", \"Selasa\", \"Rabu\", \"Kamis\", \"Jumat\", \"Sabtu\"],\r\n\t\tday_short: [\"Ming\", \"Sen\", \"Sel\", \"Rab\", \"Kam\", \"Jum\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hari Ini\",\r\n\t\tday_tab: \"Hari\",\r\n\t\tweek_tab: \"Minggu\",\r\n\t\tmonth_tab: \"Bulan\",\r\n\t\tnew_event: \"Acara Baru\",\r\n\t\ticon_save: \"Simpan\",\r\n\t\ticon_cancel: \"Batal\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edit\",\r\n\t\ticon_delete: \"Hapus\",\r\n\t\tconfirm_closing: \"\", /*Perubahan tidak akan disimpan ?*/\r\n\t\tconfirm_deleting: \"Acara akan dihapus\",\r\n\t\tsection_description: \"Keterangan\",\r\n\t\tsection_time: \"Periode\",\r\n\t\tfull_day: \"Hari penuh\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Apakah acara ini akan berulang?\",\r\n\t\tsection_recurring: \"Acara Rutin\",\r\n\t\tbutton_recurring: \"Tidak Difungsikan\",\r\n\t\tbutton_recurring_open: \"Difungsikan\",\r\n\t\tbutton_edit_series: \"Mengedit seri\",\r\n\t\tbutton_edit_occurrence: \"Mengedit salinan\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Tanggal\",\r\n\t\tdescription: \"Keterangan\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Tahun\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabel\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Harian\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Mingguan\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Bulanan\",\r\n\t\trepeat_radio_year: \"Tahunan\",\r\n\t\trepeat_radio_day_type: \"Setiap\",\r\n\t\trepeat_text_day_count: \"hari\",\r\n\t\trepeat_radio_day_type2: \"Setiap hari kerja\",\r\n\t\trepeat_week: \" Ulangi setiap\",\r\n\t\trepeat_text_week_count: \"minggu pada hari berikut:\",\r\n\t\trepeat_radio_month_type: \"Ulangi\",\r\n\t\trepeat_radio_month_start: \"Pada\",\r\n\t\trepeat_text_month_day: \"hari setiap\",\r\n\t\trepeat_text_month_count: \"bulan\",\r\n\t\trepeat_text_month_count2_before: \"setiap\",\r\n\t\trepeat_text_month_count2_after: \"bulan\",\r\n\t\trepeat_year_label: \"Pada\",\r\n\t\tselect_year_day2: \"dari\",\r\n\t\trepeat_text_year_day: \"hari\",\r\n\t\tselect_year_month: \"bulan\",\r\n\t\trepeat_radio_end: \"Tanpa tanggal akhir\",\r\n\t\trepeat_text_occurences_count: \"kejadian\",\r\n\t\trepeat_radio_end2: \"Setelah\",\r\n\t\trepeat_radio_end3: \"Berakhir pada\",\r\n\r\n\t\trepeat_never: \"Tidak pernah\",\r\n\t\trepeat_daily: \"Setiap hari\",\r\n\t\trepeat_workdays: \"Setiap hari kerja\",\r\n\t\trepeat_weekly: \"Setiap minggu\",\r\n\t\trepeat_monthly: \"Setiap bulan\",\r\n\t\trepeat_yearly: \"Setiap tahun\",\r\n\t\trepeat_custom: \"Kustom\",\r\n\t\trepeat_freq_day: \"Hari\",\r\n\t\trepeat_freq_week: \"Minggu\",\r\n\t\trepeat_freq_month: \"Bulan\",\r\n\t\trepeat_freq_year: \"Tahun\",\r\n\t\trepeat_on_date: \"Pada tanggal\",\r\n\t\trepeat_ends: \"Berakhir\",\r\n\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Maret\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Agustus\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tday_for_recurring: [\"Minggu\", \"Senin\", \"Selasa\", \"Rabu\", \"Kamis\", \"Jumat\", \"Sabtu\"]\r\n\t}\r\n};","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Gennaio\", \"Febbraio\", \"Marzo\", \"Aprile\", \"Maggio\", \"Giugno\", \"Luglio\", \"Agosto\", \"Settembre\", \"Ottobre\", \"Novembre\", \"Dicembre\"],\r\n\t\tmonth_short: [\"Gen\", \"Feb\", \"Mar\", \"Apr\", \"Mag\", \"Giu\", \"Lug\", \"Ago\", \"Set\", \"Ott\", \"Nov\", \"Dic\"],\r\n\t\tday_full: [\"Domenica\", \"Lunedì\", \"Martedì\", \"Mercoledì\", \"Giovedì\", \"Venerdì\", \"Sabato\"],\r\n\t\tday_short: [\"Dom\", \"Lun\", \"Mar\", \"Mer\", \"Gio\", \"Ven\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Oggi\",\r\n\t\tday_tab: \"Giorno\",\r\n\t\tweek_tab: \"Settimana\",\r\n\t\tmonth_tab: \"Mese\",\r\n\t\tnew_event: \"Nuovo evento\",\r\n\t\ticon_save: \"Salva\",\r\n\t\ticon_cancel: \"Chiudi\",\r\n\t\ticon_details: \"Dettagli\",\r\n\t\ticon_edit: \"Modifica\",\r\n\t\ticon_delete: \"Elimina\",\r\n\t\tconfirm_closing: \"\", //Le modifiche apportate saranno perse, siete sicuri?\r\n\t\tconfirm_deleting: \"L'evento sarà eliminato, siete sicuri?\",\r\n\t\tsection_description: \"Descrizione\",\r\n\t\tsection_time: \"Periodo di tempo\",\r\n\t\tfull_day: \"Intera giornata\",\r\n\r\n\t\tconfirm_recurring: \"Vuoi modificare l'intera serie di eventi?\",\r\n\t\tsection_recurring: \"Ripetere l'evento\",\r\n\t\tbutton_recurring: \"Disattivato\",\r\n\t\tbutton_recurring_open: \"Attivato\",\r\n\t\tbutton_edit_series: \"Modificare la serie\",\r\n\t\tbutton_edit_occurrence: \"Modificare una copia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descrizione\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Anno\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Griglia\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Quotidiano\",\r\n\t\trepeat_radio_week: \"Settimanale\",\r\n\t\trepeat_radio_month: \"Mensile\",\r\n\t\trepeat_radio_year: \"Annuale\",\r\n\t\trepeat_radio_day_type: \"Ogni\",\r\n\t\trepeat_text_day_count: \"giorno\",\r\n\t\trepeat_radio_day_type2: \"Ogni giornata lavorativa\",\r\n\t\trepeat_week: \" Ripetere ogni\",\r\n\t\trepeat_text_week_count: \"settimana:\",\r\n\t\trepeat_radio_month_type: \"Ripetere\",\r\n\t\trepeat_radio_month_start: \"Il\",\r\n\t\trepeat_text_month_day: \"giorno ogni\",\r\n\t\trepeat_text_month_count: \"mese\",\r\n\t\trepeat_text_month_count2_before: \"ogni\",\r\n\t\trepeat_text_month_count2_after: \"mese\",\r\n\t\trepeat_year_label: \"Il\",\r\n\t\tselect_year_day2: \"del\",\r\n\t\trepeat_text_year_day: \"giorno\",\r\n\t\tselect_year_month: \"mese\",\r\n\t\trepeat_radio_end: \"Senza data finale\",\r\n\t\trepeat_text_occurences_count: \"occorenze\",\r\n\t\trepeat_radio_end3: \"Fine\",\r\n\t\trepeat_radio_end2: \"Dopo\",\r\n\r\n\t\trepeat_never: \"Mai\",\r\n\t\trepeat_daily: \"Ogni giorno\",\r\n\t\trepeat_workdays: \"Ogni giorno feriale\",\r\n\t\trepeat_weekly: \"Ogni settimana\",\r\n\t\trepeat_monthly: \"Ogni mese\",\r\n\t\trepeat_yearly: \"Ogni anno\",\r\n\t\trepeat_custom: \"Personalizzato\",\r\n\t\trepeat_freq_day: \"Giorno\",\r\n\t\trepeat_freq_week: \"Settimana\",\r\n\t\trepeat_freq_month: \"Mese\",\r\n\t\trepeat_freq_year: \"Anno\",\r\n\t\trepeat_on_date: \"Alla data\",\r\n\t\trepeat_ends: \"Finisce\",\r\n\r\n\t\tmonth_for_recurring: [\"Gennaio\", \"Febbraio\", \"Marzo\", \"Aprile\", \"Maggio\", \"Jiugno\", \"Luglio\", \"Agosto\", \"Settembre\", \"Ottobre\", \"Novembre\", \"Dicembre\"],\r\n\t\tday_for_recurring: [\"Domenica\", \"Lunedì\", \"Martedì\", \"Mercoledì\", \"Jovedì\", \"Venerdì\", \"Sabato\"]\r\n\t}\r\n};\r\n","/*\r\n Translation by Genexus Japan Inc.\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tmonth_short: [ \"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_full: [\"日曜日\", \"月曜日\", \"火曜日\", \"水曜日\", \"木曜日\", \"金曜日\", \"土曜日\"],\r\n\t\tday_short: [\"日\", \"月\", \"火\", \"水\", \"木\", \"金\", \"土\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"今日\",\r\n\t\tday_tab: \"日\",\r\n\t\tweek_tab: \"週\",\r\n\t\tmonth_tab: \"月\",\r\n\t\tnew_event: \"新イベント\",\r\n\t\ticon_save: \"保存\",\r\n\t\ticon_cancel: \"キャンセル\",\r\n\t\ticon_details: \"詳細\",\r\n\t\ticon_edit: \"編集\",\r\n\t\ticon_delete: \"削除\",\r\n\t\tconfirm_closing: \"\", //変更が取り消されます、宜しいですか?\r\n\t\tconfirm_deleting: \"イベント完全に削除されます、宜しいですか?\",\r\n\t\tsection_description: \"デスクリプション\",\r\n\t\tsection_time: \"期間\",\r\n\t\tconfirm_recurring: \"繰り返されているイベントを全て編集しますか?\",\r\n\t\tsection_recurring: \"イベントを繰り返す\",\r\n\t\tbutton_recurring: \"無効\",\r\n\t\tbutton_recurring_open: \"有効\",\r\n\t\tfull_day: \"終日\",\r\n\t\tbutton_edit_series: \"シリーズを編集します\",\r\n\t\tbutton_edit_occurrence: \"コピーを編集\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"議題は\",\r\n\t\tdate: \"日付\",\r\n\t\tdescription: \"説明\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"今年\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"議題は\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"グリッド\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"毎日\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"毎週\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"毎月\",\r\n\t\trepeat_radio_year: \"毎年\",\r\n\t\trepeat_radio_day_type: \"毎\",\r\n\t\trepeat_text_day_count: \"日\",\r\n\t\trepeat_radio_day_type2: \"毎営業日\",\r\n\t\trepeat_week: \" 繰り返し毎\",\r\n\t\trepeat_text_week_count: \"週 次の日:\",\r\n\t\trepeat_radio_month_type: \"繰り返し\",\r\n\t\trepeat_radio_month_start: \"オン\",\r\n\t\trepeat_text_month_day: \"日毎\",\r\n\t\trepeat_text_month_count: \"月\",\r\n\t\trepeat_text_month_count2_before: \"毎\",\r\n\t\trepeat_text_month_count2_after: \"月\",\r\n\t\trepeat_year_label: \"オン\",\r\n\t\tselect_year_day2: \"の\",\r\n\t\trepeat_text_year_day: \"日\",\r\n\t\tselect_year_month: \"月\",\r\n\t\trepeat_radio_end: \"終了日なし\",\r\n\t\trepeat_text_occurences_count: \"回数\",\r\n\t\trepeat_radio_end2: \"後\",\r\n\t\trepeat_radio_end3: \"終了日まで\",\r\n\r\n\t\trepeat_never: \"決して\",\r\n\t\trepeat_daily: \"毎日\",\r\n\t\trepeat_workdays: \"毎営業日\",\r\n\t\trepeat_weekly: \"毎週\",\r\n\t\trepeat_monthly: \"毎月\",\r\n\t\trepeat_yearly: \"毎年\",\r\n\t\trepeat_custom: \"カスタム\",\r\n\t\trepeat_freq_day: \"日\",\r\n\t\trepeat_freq_week: \"週\",\r\n\t\trepeat_freq_month: \"月\",\r\n\t\trepeat_freq_year: \"年\",\r\n\t\trepeat_on_date: \"日にち\",\r\n\t\trepeat_ends: \"終了\",\r\n\r\n\t\tmonth_for_recurring: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_for_recurring: [\"日曜日\", \"月曜日\", \"火曜日\", \"水曜日\", \"木曜日\", \"金曜日\", \"土曜日\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default class LocaleManager{\r\n\tconstructor(config){\r\n\t\tthis._locales = {};\r\n\t\tfor(const i in config){\r\n\t\t\tthis._locales[i] = config[i];\r\n\t\t}\r\n\t}\r\n\r\n\taddLocale(name, locale) {\r\n\t\tthis._locales[name] = locale;\r\n\t}\r\n\r\n\tgetLocale(name) {\r\n\t\treturn this._locales[name];\r\n\t}\r\n}","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Mon\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"I dag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uke\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny hendelse\",\r\n\t\ticon_save: \"Lagre\",\r\n\t\ticon_cancel: \"Avbryt\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Rediger\",\r\n\t\ticon_delete: \"Slett\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Hendelsen vil bli slettet permanent. Er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du forandre hele dette settet av repeterende hendelser?\",\r\n\t\tsection_recurring: \"Repeter hendelsen\",\r\n\t\tbutton_recurring: \"Av\",\r\n\t\tbutton_recurring_open: \"På\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Redigere en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\",\r\n\t\trepeat_radio_week: \"Ukentlig\",\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Alle hverdager\",\r\n\t\trepeat_week: \" Gjentas hver\",\r\n\t\trepeat_text_week_count: \"uke på:\",\r\n\t\trepeat_radio_month_type: \"På hver\",\r\n\t\trepeat_radio_month_start: \"På\",\r\n\t\trepeat_text_month_day: \"dag hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"på\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Ingen sluttdato\",\r\n\t\trepeat_text_occurences_count: \"forekomst\",\r\n\t\trepeat_radio_end3: \"Stop den\",\r\n\t\trepeat_radio_end2: \"Etter\",\r\n\r\n\t\trepeat_never: \"Aldri\",\r\n\t\trepeat_daily: \"Hver dag\",\r\n\t\trepeat_workdays: \"Hver ukedag\",\r\n\t\trepeat_weekly: \"Hver uke\",\r\n\t\trepeat_monthly: \"Hver måned\",\r\n\t\trepeat_yearly: \"Hvert år\",\r\n\t\trepeat_custom: \"Tilpasset\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Uke\",\r\n\t\trepeat_freq_month: \"Måned\",\r\n\t\trepeat_freq_year: \"År\",\r\n\t\trepeat_on_date: \"På dato\",\r\n\t\trepeat_ends: \"Slutter\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tday_for_recurring: [\"Sondag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Maart\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Augustus\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"mrt\", \"Apr\", \"Mei\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Zondag\", \"Maandag\", \"Dinsdag\", \"Woensdag\", \"Donderdag\", \"Vrijdag\", \"Zaterdag\"],\r\n\t\tday_short: [\"Zo\", \"Ma\", \"Di\", \"Wo\", \"Do\", \"Vr\", \"Za\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Vandaag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Week\",\r\n\t\tmonth_tab: \"Maand\",\r\n\t\tnew_event: \"Nieuw item\",\r\n\t\ticon_save: \"Opslaan\",\r\n\t\ticon_cancel: \"Annuleren\",\r\n\t\ticon_details: \"Details\",\r\n\t\ticon_edit: \"Bewerken\",\r\n\t\ticon_delete: \"Verwijderen\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Item zal permanent worden verwijderd, doorgaan?\",\r\n\t\tsection_description: \"Beschrijving\",\r\n\t\tsection_time: \"Tijd periode\",\r\n\t\tfull_day: \"Hele dag\",\r\n\r\n\t\tconfirm_recurring: \"Wilt u alle terugkerende items bijwerken?\",\r\n\t\tsection_recurring: \"Item herhalen\",\r\n\t\tbutton_recurring: \"Uit\",\r\n\t\tbutton_recurring_open: \"Aan\",\r\n\t\tbutton_edit_series: \"Bewerk de serie\",\r\n\t\tbutton_edit_occurrence: \"Bewerk een kopie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Omschrijving\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Jaar\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabel\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dagelijks\",\r\n\t\trepeat_radio_week: \"Wekelijks\",\r\n\t\trepeat_radio_month: \"Maandelijks\",\r\n\t\trepeat_radio_year: \"Jaarlijks\",\r\n\t\trepeat_radio_day_type: \"Elke\",\r\n\t\trepeat_text_day_count: \"dag(en)\",\r\n\t\trepeat_radio_day_type2: \"Elke werkdag\",\r\n\t\trepeat_week: \" Herhaal elke\",\r\n\t\trepeat_text_week_count: \"week op de volgende dagen:\",\r\n\t\trepeat_radio_month_type: \"Herhaal\",\r\n\t\trepeat_radio_month_start: \"Op\",\r\n\t\trepeat_text_month_day: \"dag iedere\",\r\n\t\trepeat_text_month_count: \"maanden\",\r\n\t\trepeat_text_month_count2_before: \"iedere\",\r\n\t\trepeat_text_month_count2_after: \"maanden\",\r\n\t\trepeat_year_label: \"Op\",\r\n\t\tselect_year_day2: \"van\",\r\n\t\trepeat_text_year_day: \"dag\",\r\n\t\tselect_year_month: \"maand\",\r\n\t\trepeat_radio_end: \"Geen eind datum\",\r\n\t\trepeat_text_occurences_count: \"keren\",\r\n\t\trepeat_radio_end3: \"Eindigd per\",\r\n\t\trepeat_radio_end2: \"Na\",\r\n\r\n\t\trepeat_never: \"Nooit\",\r\n\t\trepeat_daily: \"Elke dag\",\r\n\t\trepeat_workdays: \"Elke werkdag\",\r\n\t\trepeat_weekly: \"Elke week\",\r\n\t\trepeat_monthly: \"Elke maand\",\r\n\t\trepeat_yearly: \"Elk jaar\",\r\n\t\trepeat_custom: \"Aangepast\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Week\",\r\n\t\trepeat_freq_month: \"Maand\",\r\n\t\trepeat_freq_year: \"Jaar\",\r\n\t\trepeat_on_date: \"Op datum\",\r\n\t\trepeat_ends: \"Eindigt\",\r\n\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Maart\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Augustus\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Zondag\", \"Maandag\", \"Dinsdag\", \"Woensdag\", \"Donderdag\", \"Vrijdag\", \"Zaterdag\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Man\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uke\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny\",\r\n\t\ticon_save: \"Lagre\",\r\n\t\ticon_cancel: \"Avbryt\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Endre\",\r\n\t\ticon_delete: \"Slett\",\r\n\t\tconfirm_closing: \"Endringer blir ikke lagret, er du sikker?\", //Endringer blir ikke lagret, er du sikker?\r\n\t\tconfirm_deleting: \"Oppføringen vil bli slettet, er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\t\tfull_day: \"Full dag\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du endre hele settet med repeterende oppføringer?\",\r\n\t\tsection_recurring: \"Repeterende oppføring\",\r\n\t\tbutton_recurring: \"Ikke aktiv\",\r\n\t\tbutton_recurring_open: \"Aktiv\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Redigere en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Ukentlig\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Hver arbeidsdag\",\r\n\t\trepeat_week: \" Gjenta hver\",\r\n\t\trepeat_text_week_count: \"uke neste dager:\",\r\n\t\trepeat_radio_month_type: \"Gjenta\",\r\n\t\trepeat_radio_month_start: \"På\",\r\n\t\trepeat_text_month_day: \"dag hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"På\",\r\n\t\tselect_year_day2: \"av\",\r\n\t\trepeat_text_year_day: \"dag\",\r\n\t\tselect_year_month: \"måned\",\r\n\t\trepeat_radio_end: \"Ingen sluttdato\",\r\n\t\trepeat_text_occurences_count: \"forekomster\",\r\n\t\trepeat_radio_end2: \"Etter\",\r\n\t\trepeat_radio_end3: \"Slutt innen\",\r\n\r\n\t\trepeat_never: \"Aldri\",\r\n\t\trepeat_daily: \"Hver dag\",\r\n\t\trepeat_workdays: \"Hver ukedag\",\r\n\t\trepeat_weekly: \"Hver uke\",\r\n\t\trepeat_monthly: \"Hver måned\",\r\n\t\trepeat_yearly: \"Hvert år\",\r\n\t\trepeat_custom: \"Tilpasset\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Uke\",\r\n\t\trepeat_freq_month: \"Måned\",\r\n\t\trepeat_freq_year: \"År\",\r\n\t\trepeat_on_date: \"På dato\",\r\n\t\trepeat_ends: \"Slutter\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tday_for_recurring: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Styczeń\", \"Luty\", \"Marzec\", \"Kwiecień\", \"Maj\", \"Czerwiec\", \"Lipiec\", \"Sierpień\", \"Wrzesień\", \"Październik\", \"Listopad\", \"Grudzień\"],\r\n\t\tmonth_short: [\"Sty\", \"Lut\", \"Mar\", \"Kwi\", \"Maj\", \"Cze\", \"Lip\", \"Sie\", \"Wrz\", \"Paź\", \"Lis\", \"Gru\"],\r\n\t\tday_full: [\"Niedziela\", \"Poniedziałek\", \"Wtorek\", \"Środa\", \"Czwartek\", \"Piątek\", \"Sobota\"],\r\n\t\tday_short: [\"Nie\", \"Pon\", \"Wto\", \"Śro\", \"Czw\", \"Pią\", \"Sob\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dziś\",\r\n\t\tday_tab: \"Dzień\",\r\n\t\tweek_tab: \"Tydzień\",\r\n\t\tmonth_tab: \"Miesiąc\",\r\n\t\tnew_event: \"Nowe zdarzenie\",\r\n\t\ticon_save: \"Zapisz\",\r\n\t\ticon_cancel: \"Anuluj\",\r\n\t\ticon_details: \"Szczegóły\",\r\n\t\ticon_edit: \"Edytuj\",\r\n\t\ticon_delete: \"Usuń\",\r\n\t\tconfirm_closing: \"\", //Zmiany zostaną usunięte, jesteś pewien?\r\n\t\tconfirm_deleting: \"Zdarzenie zostanie usunięte na zawsze, kontynuować?\",\r\n\t\tsection_description: \"Opis\",\r\n\t\tsection_time: \"Okres czasu\",\r\n\t\tfull_day: \"Cały dzień\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Czy chcesz edytować cały zbiór powtarzających się zdarzeń?\",\r\n\t\tsection_recurring: \"Powtórz zdarzenie\",\r\n\t\tbutton_recurring: \"Nieaktywne\",\r\n\t\tbutton_recurring_open: \"Aktywne\",\r\n\t\tbutton_edit_series: \"Edytuj serię\",\r\n\t\tbutton_edit_occurrence: \"Edytuj kopię\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Opis\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabela\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Codziennie\",\r\n\t\trepeat_radio_week: \"Co tydzie\",\r\n\t\trepeat_radio_month: \"Co miesic\",\r\n\t\trepeat_radio_year: \"Co rok\",\r\n\t\trepeat_radio_day_type: \"Kadego\",\r\n\t\trepeat_text_day_count: \"dnia\",\r\n\t\trepeat_radio_day_type2: \"Kadego dnia roboczego\",\r\n\t\trepeat_week: \" Powtarzaj kadego\",\r\n\t\trepeat_text_week_count: \"tygodnia w dni:\",\r\n\t\trepeat_radio_month_type: \"Powtrz\",\r\n\t\trepeat_radio_month_start: \"W\",\r\n\t\trepeat_text_month_day: \"dnia kadego\",\r\n\t\trepeat_text_month_count: \"miesica\",\r\n\t\trepeat_text_month_count2_before: \"kadego\",\r\n\t\trepeat_text_month_count2_after: \"miesica\",\r\n\t\trepeat_year_label: \"W\",\r\n\t\tselect_year_day2: \"miesica\",\r\n\t\trepeat_text_year_day: \"dnia miesica\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Bez daty kocowej\",\r\n\t\trepeat_text_occurences_count: \"wystpieniu/ach\",\r\n\t\trepeat_radio_end3: \"Zakocz w\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\r\n\t\trepeat_never: \"Nigdy\",\r\n\t\trepeat_daily: \"Codziennie\",\r\n\t\trepeat_workdays: \"Każdy dzień roboczy\",\r\n\t\trepeat_weekly: \"Co tydzień\",\r\n\t\trepeat_monthly: \"Co miesiąc\",\r\n\t\trepeat_yearly: \"Co rok\",\r\n\t\trepeat_custom: \"Niestandardowy\",\r\n\t\trepeat_freq_day: \"Dzień\",\r\n\t\trepeat_freq_week: \"Tydzień\",\r\n\t\trepeat_freq_month: \"Miesiąc\",\r\n\t\trepeat_freq_year: \"Rok\",\r\n\t\trepeat_on_date: \"W dniu\",\r\n\t\trepeat_ends: \"Kończy się\",\r\n\r\n\t\tmonth_for_recurring: [\"Stycznia\", \"Lutego\", \"Marca\", \"Kwietnia\", \"Maja\", \"Czerwca\", \"Lipca\", \"Sierpnia\", \"Wrzenia\", \"Padziernka\", \"Listopada\", \"Grudnia\"],\r\n\t\tday_for_recurring: [\"Niedziela\", \"Poniedziaek\", \"Wtorek\", \"roda\", \"Czwartek\", \"Pitek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","/*\r\n\r\n TRANSLATION BY MATTHEUS PIROVANI RORIZ GONЗALVES\r\n\r\n mattheusroriz@hotmail.com / mattheus.pirovani@gmail.com /\r\n\r\n www.atrixian.com.br\r\n\r\n */\r\n\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Janeiro\", \"Fevereiro\", \"Março\", \"Abril\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"],\r\n\t\tmonth_short: [\"Jan\", \"Fev\", \"Mar\", \"Abr\", \"Mai\", \"Jun\", \"Jul\", \"Ago\", \"Set\", \"Out\", \"Nov\", \"Dez\"],\r\n\t\tday_full: [\"Domingo\", \"Segunda\", \"Terça\", \"Quarta\", \"Quinta\", \"Sexta\", \"Sábado\"],\r\n\t\tday_short: [\"Dom\", \"Seg\", \"Ter\", \"Qua\", \"Qui\", \"Sex\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hoje\",\r\n\t\tday_tab: \"Dia\",\r\n\t\tweek_tab: \"Semana\",\r\n\t\tmonth_tab: \"Mês\",\r\n\t\tnew_event: \"Novo evento\",\r\n\t\ticon_save: \"Salvar\",\r\n\t\ticon_cancel: \"Cancelar\",\r\n\t\ticon_details: \"Detalhes\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Deletar\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Tem certeza que deseja excluir?\",\r\n\t\tsection_description: \"Descrição\",\r\n\t\tsection_time: \"Período de tempo\",\r\n\t\tfull_day: \"Dia inteiro\",\r\n\r\n\t\tconfirm_recurring: \"Deseja editar todos esses eventos repetidos?\",\r\n\t\tsection_recurring: \"Repetir evento\",\r\n\t\tbutton_recurring: \"Desabilitar\",\r\n\t\tbutton_recurring_open: \"Habilitar\",\r\n\t\tbutton_edit_series: \"Editar a série\",\r\n\t\tbutton_edit_occurrence: \"Editar uma cópia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dia\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descrição\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Ano\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dia\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grade\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diário\",\r\n\t\trepeat_radio_week: \"Semanal\",\r\n\t\trepeat_radio_month: \"Mensal\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia(s)\",\r\n\t\trepeat_radio_day_type2: \"Cada trabalho diário\",\r\n\t\trepeat_week: \" Repita cada\",\r\n\t\trepeat_text_week_count: \"semana:\",\r\n\t\trepeat_radio_month_type: \"Repetir\",\r\n\t\trepeat_radio_month_start: \"Em\",\r\n\t\trepeat_text_month_day: \"todo dia\",\r\n\t\trepeat_text_month_count: \"mês\",\r\n\t\trepeat_text_month_count2_before: \"todo\",\r\n\t\trepeat_text_month_count2_after: \"mês\",\r\n\t\trepeat_year_label: \"Em\",\r\n\t\tselect_year_day2: \"of\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mês\",\r\n\t\trepeat_radio_end: \"Sem data final\",\r\n\t\trepeat_text_occurences_count: \"ocorrências\",\r\n\t\trepeat_radio_end3: \"Fim\",\r\n\t\trepeat_radio_end2: \"Depois\",\r\n\r\n\t\trepeat_never: \"Nunca\",\r\n\t\trepeat_daily: \"Todos os dias\",\r\n\t\trepeat_workdays: \"Todos os dias úteis\",\r\n\t\trepeat_weekly: \"Toda semana\",\r\n\t\trepeat_monthly: \"Todo mês\",\r\n\t\trepeat_yearly: \"Todo ano\",\r\n\t\trepeat_custom: \"Personalizado\",\r\n\t\trepeat_freq_day: \"Dia\",\r\n\t\trepeat_freq_week: \"Semana\",\r\n\t\trepeat_freq_month: \"Mês\",\r\n\t\trepeat_freq_year: \"Ano\",\r\n\t\trepeat_on_date: \"Na data\",\r\n\t\trepeat_ends: \"Termina\",\r\n\r\n\t\tmonth_for_recurring: [\"Janeiro\", \"Fevereiro\", \"Março\", \"Abril\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"],\r\n\t\tday_for_recurring: [\"Domingo\", \"Segunda\", \"Terça\", \"Quarta\", \"Quinta\", \"Sexta\", \"Sábado\"]\r\n\t}\r\n};\r\n\r\n\r\n","/*\r\n\tTraducere de Ovidiu Lixandru: http://www.madball.ro\r\n */\r\n\r\nexport default {\r\n\tdate:{\r\n\t\tmonth_full:[\"Ianuarie\", \"Februarie\", \"Martie\", \"Aprilie\", \"Mai\", \"Iunie\", \"Iulie\", \"August\", \"Septembrie\", \"Octombrie\", \"November\", \"December\"],\r\n\t\tmonth_short:[\"Ian\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Iun\", \"Iul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n\t\tday_full:[\"Duminica\", \"Luni\", \"Marti\", \"Miercuri\", \"Joi\", \"Vineri\", \"Sambata\"],\r\n\t\tday_short:[\"Du\", \"Lu\", \"Ma\", \"Mi\", \"Jo\", \"Vi\", \"Sa\"]\r\n\t},\r\n\tlabels:{\r\n\t\tdhx_cal_today_button:\"Astazi\",\r\n\t\tday_tab:\"Zi\",\r\n\t\tweek_tab:\"Saptamana\",\r\n\t\tmonth_tab:\"Luna\",\r\n\t\tnew_event:\"Eveniment nou\",\r\n\t\ticon_save:\"Salveaza\",\r\n\t\ticon_cancel:\"Anuleaza\",\r\n\t\ticon_details:\"Detalii\",\r\n\t\ticon_edit:\"Editeaza\",\r\n\t\ticon_delete:\"Sterge\",\r\n\t\tconfirm_closing:\"Schimbarile nu vor fi salvate, esti sigur?\",//Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting:\"Evenimentul va fi sters permanent, esti sigur?\",\r\n\t\tsection_description:\"Descriere\",\r\n\t\tsection_time:\"Interval\",\r\n\t\tfull_day:\"Toata ziua\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring:\"Vrei sa editezi toata seria de evenimente repetate?\",\r\n\t\tsection_recurring:\"Repetare\",\r\n\t\tbutton_recurring:\"Dezactivata\",\r\n\t\tbutton_recurring_open:\"Activata\",\r\n\t\tbutton_edit_series: \"Editeaza serie\",\r\n\t\tbutton_edit_occurrence: \"Editeaza doar intrare\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"Agenda\",\r\n\t\tdate:\"Data\",\r\n\t\tdescription:\"Descriere\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"An\",\r\n\r\n\t\t/* week agenda extension */\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Lista\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Zilnic\",\r\n\t\trepeat_radio_week: \"Saptamanal\",\r\n\t\trepeat_radio_month: \"Lunar\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"La fiecare\",\r\n\t\trepeat_text_day_count: \"zi(le)\",\r\n\t\trepeat_radio_day_type2: \"Fiecare zi lucratoare\",\r\n\t\trepeat_week: \" Repeta la fiecare\",\r\n\t\trepeat_text_week_count: \"saptamana in urmatoarele zile:\",\r\n\t\trepeat_radio_month_type: \"Repeta in\",\r\n\t\trepeat_radio_month_start: \"In a\",\r\n\t\trepeat_text_month_day: \"zi la fiecare\",\r\n\t\trepeat_text_month_count: \"luni\",\r\n\t\trepeat_text_month_count2_before: \"la fiecare\",\r\n\t\trepeat_text_month_count2_after: \"luni\",\r\n\t\trepeat_year_label: \"In\",\r\n\t\tselect_year_day2: \"a lunii\",\r\n\t\trepeat_text_year_day: \"zi a lunii\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Fara data de sfarsit\",\r\n\t\trepeat_text_occurences_count: \"evenimente\",\r\n\t\trepeat_radio_end3: \"La data\",\r\n\t\trepeat_radio_end2: \"Dupa\",\r\n\r\n\t\trepeat_never: \"Niciodată\",\r\n\t\trepeat_daily: \"În fiecare zi\",\r\n\t\trepeat_workdays: \"În fiecare zi lucrătoare\",\r\n\t\trepeat_weekly: \"În fiecare săptămână\",\r\n\t\trepeat_monthly: \"În fiecare lună\",\r\n\t\trepeat_yearly: \"În fiecare an\",\r\n\t\trepeat_custom: \"Personalizat\",\r\n\t\trepeat_freq_day: \"Zi\",\r\n\t\trepeat_freq_week: \"Săptămână\",\r\n\t\trepeat_freq_month: \"Lună\",\r\n\t\trepeat_freq_year: \"An\",\r\n\t\trepeat_on_date: \"La data\",\r\n\t\trepeat_ends: \"Se termină\",\r\n\r\n\t\tmonth_for_recurring: [\"Ianuarie\", \"Februarie\", \"Martie\", \"Aprilie\", \"Mai\", \"Iunie\", \"Iulie\", \"August\", \"Septembrie\", \"Octombrie\", \"Noiembrie\", \"Decembrie\"],\r\n\t\tday_for_recurring: [\"Duminica\", \"Luni\", \"Marti\", \"Miercuri\", \"Joi\", \"Vineri\", \"Sambata\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Январь\", \"Февраль\", \"Март\", \"Апрель\", \"Maй\", \"Июнь\", \"Июль\", \"Август\", \"Сентябрь\", \"Oктябрь\", \"Ноябрь\", \"Декабрь\"],\r\n\t\tmonth_short: [\"Янв\", \"Фев\", \"Maр\", \"Aпр\", \"Maй\", \"Июн\", \"Июл\", \"Aвг\", \"Сен\", \"Окт\", \"Ноя\", \"Дек\"],\r\n\t\tday_full: [ \"Воскресенье\", \"Понедельник\", \"Вторник\", \"Среда\", \"Четверг\", \"Пятница\", \"Суббота\"],\r\n\t\tday_short: [\"Вс\", \"Пн\", \"Вт\", \"Ср\", \"Чт\", \"Пт\", \"Сб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сегодня\",\r\n\t\tday_tab: \"День\",\r\n\t\tweek_tab: \"Неделя\",\r\n\t\tmonth_tab: \"Месяц\",\r\n\t\tnew_event: \"Новое событие\",\r\n\t\ticon_save: \"Сохранить\",\r\n\t\ticon_cancel: \"Отменить\",\r\n\t\ticon_details: \"Детали\",\r\n\t\ticon_edit: \"Изменить\",\r\n\t\ticon_delete: \"Удалить\",\r\n\t\tconfirm_closing: \"\", //Ваши изменения будут потеряны, продолжить?\r\n\t\tconfirm_deleting: \"Событие будет удалено безвозвратно, продолжить?\",\r\n\t\tsection_description: \"Описание\",\r\n\t\tsection_time: \"Период времени\",\r\n\t\tfull_day: \"Весь день\",\r\n\r\n\t\tconfirm_recurring: \"Вы хотите изменить всю серию повторяющихся событий?\",\r\n\t\tsection_recurring: \"Повторение\",\r\n\t\tbutton_recurring: \"Отключено\",\r\n\t\tbutton_recurring_open: \"Включено\",\r\n\t\tbutton_edit_series: \"Редактировать серию\",\r\n\t\tbutton_edit_occurrence: \"Редактировать экземпляр\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Список\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Описание\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Год\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Список\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Таблица\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"День\",\r\n\t\trepeat_radio_week: \"Неделя\",\r\n\t\trepeat_radio_month: \"Месяц\",\r\n\t\trepeat_radio_year: \"Год\",\r\n\t\trepeat_radio_day_type: \"Каждый\",\r\n\t\trepeat_text_day_count: \"день\",\r\n\t\trepeat_radio_day_type2: \"Каждый рабочий день\",\r\n\t\trepeat_week: \" Повторять каждую\",\r\n\t\trepeat_text_week_count: \"неделю , в:\",\r\n\t\trepeat_radio_month_type: \"Повторять\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" числа каждый \",\r\n\t\trepeat_text_month_count: \"месяц\",\r\n\t\trepeat_text_month_count2_before: \"каждый \",\r\n\t\trepeat_text_month_count2_after: \"месяц\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"день\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без даты окончания\",\r\n\t\trepeat_text_occurences_count: \"повторений\",\r\n\t\trepeat_radio_end3: \"До \",\r\n\t\trepeat_radio_end2: \"\",\r\n\r\n\t\trepeat_never: \"Никогда\",\r\n\t\trepeat_daily: \"Каждый день\",\r\n\t\trepeat_workdays: \"Каждый будний день\",\r\n\t\trepeat_weekly: \"Каждую неделю\",\r\n\t\trepeat_monthly: \"Каждый месяц\",\r\n\t\trepeat_yearly: \"Каждый год\",\r\n\t\trepeat_custom: \"Настроить\",\r\n\t\trepeat_freq_day: \"День\",\r\n\t\trepeat_freq_week: \"Неделя\",\r\n\t\trepeat_freq_month: \"Месяц\",\r\n\t\trepeat_freq_year: \"Год\",\r\n\t\trepeat_on_date: \"В дату\",\r\n\t\trepeat_ends: \"Заканчивается\",\r\n\r\n\t\tmonth_for_recurring: [\"Января\", \"Февраля\", \"Марта\", \"Апреля\", \"Мая\", \"Июня\", \"Июля\", \"Августа\", \"Сентября\", \"Октября\", \"Ноября\", \"Декабря\"],\r\n\t\tday_for_recurring: [\"Воскресенье\", \"Понедельник\", \"Вторник\", \"Среду\", \"Четверг\", \"Пятницу\", \"Субботу\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Marec\", \"April\", \"Maj\", \"Junij\", \"Julij\", \"Avgust\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Nedelja\", \"Ponedeljek\", \"Torek\", \"Sreda\", \"Četrtek\", \"Petek\", \"Sobota\"],\r\n\t\tday_short: [\"Ned\", \"Pon\", \"Tor\", \"Sre\", \"Čet\", \"Pet\", \"Sob\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Danes\",\r\n\t\tday_tab: \"Dan\",\r\n\t\tweek_tab: \"Teden\",\r\n\t\tmonth_tab: \"Mesec\",\r\n\t\tnew_event: \"Nov dogodek\",\r\n\t\ticon_save: \"Shrani\",\r\n\t\ticon_cancel: \"Prekliči\",\r\n\t\ticon_details: \"Podrobnosti\",\r\n\t\ticon_edit: \"Uredi\",\r\n\t\ticon_delete: \"Izbriši\",\r\n\t\tconfirm_closing: \"\", //Spremembe ne bodo shranjene. Želite nadaljevati ?\r\n\t\tconfirm_deleting: \"Dogodek bo izbrisan. Želite nadaljevati?\",\r\n\t\tsection_description: \"Opis\",\r\n\t\tsection_time: \"Časovni okvir\",\r\n\t\tfull_day: \"Ves dan\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Želite urediti celoten set ponavljajočih dogodkov?\",\r\n\t\tsection_recurring: \"Ponovi dogodek\",\r\n\t\tbutton_recurring: \"Onemogočeno\",\r\n\t\tbutton_recurring_open: \"Omogočeno\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Edit occurrence\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Zadeva\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Opis\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Leto\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Zadeva\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Miza\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dnevno\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Tedensko\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Mesečno\",\r\n\t\trepeat_radio_year: \"Letno\",\r\n\t\trepeat_radio_day_type: \"Vsak\",\r\n\t\trepeat_text_day_count: \"dan\",\r\n\t\trepeat_radio_day_type2: \"Vsak delovni dan\",\r\n\t\trepeat_week: \" Ponavljaj vsak\",\r\n\t\trepeat_text_week_count: \"teden na naslednje dni:\",\r\n\t\trepeat_radio_month_type: \"Ponavljaj\",\r\n\t\trepeat_radio_month_start: \"Na\",\r\n\t\trepeat_text_month_day: \"dan vsak\",\r\n\t\trepeat_text_month_count: \"mesec\",\r\n\t\trepeat_text_month_count2_before: \"vsak\",\r\n\t\trepeat_text_month_count2_after: \"mesec\",\r\n\t\trepeat_year_label: \"Na\",\r\n\t\tselect_year_day2: \"od\",\r\n\t\trepeat_text_year_day: \"dan\",\r\n\t\tselect_year_month: \"mesec\",\r\n\t\trepeat_radio_end: \"Brez končnega datuma\",\r\n\t\trepeat_text_occurences_count: \"pojavitve\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\t\trepeat_radio_end3: \"Končaj do\",\r\n\r\n\t\trepeat_never: \"Nikoli\",\r\n\t\trepeat_daily: \"Vsak dan\",\r\n\t\trepeat_workdays: \"Vsak delovni dan\",\r\n\t\trepeat_weekly: \"Vsak teden\",\r\n\t\trepeat_monthly: \"Vsak mesec\",\r\n\t\trepeat_yearly: \"Vsako leto\",\r\n\t\trepeat_custom: \"Po meri\",\r\n\t\trepeat_freq_day: \"Dan\",\r\n\t\trepeat_freq_week: \"Teden\",\r\n\t\trepeat_freq_month: \"Mesec\",\r\n\t\trepeat_freq_year: \"Leto\",\r\n\t\trepeat_on_date: \"Na datum\",\r\n\t\trepeat_ends: \"Konča se\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"Marec\", \"April\", \"Maj\", \"Junij\", \"Julij\", \"Avgust\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Nedelja\", \"Ponedeljek\", \"Torek\", \"Sreda\", \"Četrtek\", \"Petek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Január\", \"Február\", \"Marec\", \"Apríl\", \"Máj\", \"Jún\", \"Júl\", \"August\", \"September\", \"Október\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Máj\", \"Jún\", \"Júl\", \"Aug\", \"Sept\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Nedeľa\", \"Pondelok\", \"Utorok\", \"Streda\", \"Štvrtok\", \"Piatok\", \"Sobota\"],\r\n\t\tday_short: [\"Ne\", \"Po\", \"Ut\", \"St\", \"Št\", \"Pi\", \"So\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dnes\",\r\n\t\tday_tab: \"Deň\",\r\n\t\tweek_tab: \"Týždeň\",\r\n\t\tmonth_tab: \"Mesiac\",\r\n\t\tnew_event: \"Nová udalosť\",\r\n\t\ticon_save: \"Uložiť\",\r\n\t\ticon_cancel: \"Späť\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edituj\",\r\n\t\ticon_delete: \"Zmazať\",\r\n\t\tconfirm_closing: \"Vaše zmeny nebudú uložené. Skutočne?\", //Vaše změny budou ztraceny, opravdu ?\r\n\t\tconfirm_deleting: \"Udalosť bude natrvalo vymazaná. Skutočne?\",\r\n\t\tsection_description: \"Poznámky\",\r\n\t\tsection_time: \"Doba platnosti\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Prajete si upraviť celú radu opakovaných udalostí?\",\r\n\t\tsection_recurring: \"Opakovanie udalosti\",\r\n\t\tbutton_recurring: \"Vypnuté\",\r\n\t\tbutton_recurring_open: \"Zapnuté\",\r\n\t\tbutton_edit_series: \"Upraviť opakovania\",\r\n\t\tbutton_edit_occurrence: \"Upraviť inštancie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Program\",\r\n\t\tdate: \"Dátum\",\r\n\t\tdescription: \"Poznámka\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\t\tfull_day: \"Celý deň\", // Full day\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Program\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Mriežka\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Denne\",\r\n\t\trepeat_radio_week: \"Týždenne\",\r\n\t\trepeat_radio_month: \"Mesaène\",\r\n\t\trepeat_radio_year: \"Roène\",\r\n\t\trepeat_radio_day_type: \"Každý\",\r\n\t\trepeat_text_day_count: \"deò\",\r\n\t\trepeat_radio_day_type2: \"Každý prac. deò\",\r\n\t\trepeat_week: \"Opakova každý\",\r\n\t\trepeat_text_week_count: \"týždeò v dòoch:\",\r\n\t\trepeat_radio_month_type: \"Opakova\",\r\n\t\trepeat_radio_month_start: \"On\",\r\n\t\trepeat_text_month_day: \"deò každý\",\r\n\t\trepeat_text_month_count: \"mesiac\",\r\n\t\trepeat_text_month_count2_before: \"každý\",\r\n\t\trepeat_text_month_count2_after: \"mesiac\",\r\n\t\trepeat_year_label: \"On\",\r\n\t\tselect_year_day2: \"poèas\",\r\n\t\trepeat_text_year_day: \"deò\",\r\n\t\tselect_year_month: \"mesiac\",\r\n\t\trepeat_radio_end: \"Bez dátumu ukonèenia\",\r\n\t\trepeat_text_occurences_count: \"udalostiach\",\r\n\t\trepeat_radio_end3: \"Ukonèi\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\r\n\t\trepeat_never: \"Nikdy\",\r\n\t\trepeat_daily: \"Každý deň\",\r\n\t\trepeat_workdays: \"Každý pracovný deň\",\r\n\t\trepeat_weekly: \"Každý týždeň\",\r\n\t\trepeat_monthly: \"Každý mesiac\",\r\n\t\trepeat_yearly: \"Každý rok\",\r\n\t\trepeat_custom: \"Vlastné\",\r\n\t\trepeat_freq_day: \"Deň\",\r\n\t\trepeat_freq_week: \"Týždeň\",\r\n\t\trepeat_freq_month: \"Mesiac\",\r\n\t\trepeat_freq_year: \"Rok\",\r\n\t\trepeat_on_date: \"Na dátum\",\r\n\t\trepeat_ends: \"Koniec\",\r\n\r\n\t\tmonth_for_recurring: [\"Január\", \"Február\", \"Marec\", \"Apríl\", \"Máj\", \"Jún\", \"Júl\", \"August\", \"September\", \"Október\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Nede¾a\", \"Pondelok\", \"Utorok\", \"Streda\", \"Štvrtok\", \"Piatok\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Mars\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"Augusti\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Söndag\", \"Måndag\", \"Tisdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lördag\"],\r\n\t\tday_short: [\"Sön\", \"Mån\", \"Tis\", \"Ons\", \"Tor\", \"Fre\", \"Lör\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Vecka\",\r\n\t\tmonth_tab: \"Månad\",\r\n\t\tnew_event: \"Ny händelse\",\r\n\t\ticon_save: \"Spara\",\r\n\t\ticon_cancel: \"Ångra\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Ändra\",\r\n\t\ticon_delete: \"Ta bort\",\r\n\t\tconfirm_closing: \"\", //Dina förändingar kommer gå förlorade, är du säker?\r\n\t\tconfirm_deleting: \"Är du säker på att du vill ta bort händelsen permanent?\",\r\n\t\tsection_description: \"Beskrivning\",\r\n\t\tsection_time: \"Tid\",\r\n\t\tfull_day: \"Hela dagen\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vill du redigera hela serien med repeterande händelser?\",\r\n\t\tsection_recurring: \"Upprepa händelse\",\r\n\t\tbutton_recurring: \"Inaktiverat\",\r\n\t\tbutton_recurring_open: \"Aktiverat\",\r\n\t\tbutton_edit_series: \"Redigera serien\",\r\n\t\tbutton_edit_occurrence: \"Redigera en kopia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dagordning\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Beskrivning\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dagordning\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Galler\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Dra för att skapa ny\",\r\n\t\tdrag_to_move:\"Dra för att flytta\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dagligen\",\r\n\t\trepeat_radio_week: \"Veckovis\",\r\n\t\trepeat_radio_month: \"Månadsvis\",\r\n\t\trepeat_radio_year: \"Årligen\",\r\n\t\trepeat_radio_day_type: \"Var\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Varje arbetsdag\",\r\n\t\trepeat_week: \" Upprepa var\",\r\n\t\trepeat_text_week_count: \"vecka dessa dagar:\",\r\n\t\trepeat_radio_month_type: \"Upprepa\",\r\n\t\trepeat_radio_month_start: \"Den\",\r\n\t\trepeat_text_month_day: \"dagen var\",\r\n\t\trepeat_text_month_count: \"månad\",\r\n\t\trepeat_text_month_count2_before: \"var\",\r\n\t\trepeat_text_month_count2_after: \"månad\",\r\n\t\trepeat_year_label: \"Den\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"månad\",\r\n\t\trepeat_radio_end: \"Inget slutdatum\",\r\n\t\trepeat_text_occurences_count: \"upprepningar\",\r\n\t\trepeat_radio_end3: \"Sluta efter\",\r\n\t\trepeat_radio_end2: \"Efter\",\r\n\r\n\t\trepeat_never: \"Aldrig\",\r\n\t\trepeat_daily: \"Varje dag\",\r\n\t\trepeat_workdays: \"Varje vardag\",\r\n\t\trepeat_weekly: \"Varje vecka\",\r\n\t\trepeat_monthly: \"Varje månad\",\r\n\t\trepeat_yearly: \"Varje år\",\r\n\t\trepeat_custom: \"Anpassad\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Vecka\",\r\n\t\trepeat_freq_month: \"Månad\",\r\n\t\trepeat_freq_year: \"År\",\r\n\t\trepeat_on_date: \"På datum\",\r\n\t\trepeat_ends: \"Slutar\",\r\n\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Mars\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"Augusti\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Söndag\", \"Måndag\", \"Tisdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lördag\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Ocak\", \"Þubat\", \"Mart\", \"Nisan\", \"Mayýs\", \"Haziran\", \"Temmuz\", \"Aðustos\", \"Eylül\", \"Ekim\", \"Kasým\", \"Aralýk\"],\r\n\t\tmonth_short: [\"Oca\", \"Þub\", \"Mar\", \"Nis\", \"May\", \"Haz\", \"Tem\", \"Aðu\", \"Eyl\", \"Eki\", \"Kas\", \"Ara\"],\r\n\t\tday_full: [\"Pazar\", \"Pazartes,\", \"Salý\", \"Çarþamba\", \"Perþembe\", \"Cuma\", \"Cumartesi\"],\r\n\t\tday_short: [\"Paz\", \"Pts\", \"Sal\", \"Çar\", \"Per\", \"Cum\", \"Cts\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Bugün\",\r\n\t\tday_tab: \"Gün\",\r\n\t\tweek_tab: \"Hafta\",\r\n\t\tmonth_tab: \"Ay\",\r\n\t\tnew_event: \"Uygun\",\r\n\t\ticon_save: \"Kaydet\",\r\n\t\ticon_cancel: \"Ýptal\",\r\n\t\ticon_details: \"Detaylar\",\r\n\t\ticon_edit: \"Düzenle\",\r\n\t\ticon_delete: \"Sil\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Etkinlik silinecek, devam?\",\r\n\t\tsection_description: \"Açýklama\",\r\n\t\tsection_time: \"Zaman aralýðý\",\r\n\t\tfull_day: \"Tam gün\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Tüm tekrar eden etkinlikler silinecek, devam?\",\r\n\t\tsection_recurring: \"Etkinliði tekrarla\",\r\n\t\tbutton_recurring: \"Pasif\",\r\n\t\tbutton_recurring_open: \"Aktif\",\r\n\t\tbutton_edit_series: \"Dizi düzenleme\",\r\n\t\tbutton_edit_occurrence: \"Bir kopyasını düzenleyin\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Ajanda\",\r\n\t\tdate: \"Tarih\",\r\n\t\tdescription: \"Açýklama\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Yýl\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Ajanda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Izgara\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Günlük\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Haftalık\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Aylık\",\r\n\t\trepeat_radio_year: \"Yıllık\",\r\n\t\trepeat_radio_day_type: \"Her\",\r\n\t\trepeat_text_day_count: \"gün\",\r\n\t\trepeat_radio_day_type2: \"Her iş günü\",\r\n\t\trepeat_week: \" Tekrar her\",\r\n\t\trepeat_text_week_count: \"hafta şu günlerde:\",\r\n\t\trepeat_radio_month_type: \"Tekrar et\",\r\n\t\trepeat_radio_month_start: \"Tarihinde\",\r\n\t\trepeat_text_month_day: \"gün her\",\r\n\t\trepeat_text_month_count: \"ay\",\r\n\t\trepeat_text_month_count2_before: \"her\",\r\n\t\trepeat_text_month_count2_after: \"ay\",\r\n\t\trepeat_year_label: \"Tarihinde\",\r\n\t\tselect_year_day2: \"ayın\",\r\n\t\trepeat_text_year_day: \"günü\",\r\n\t\tselect_year_month: \"ay\",\r\n\t\trepeat_radio_end: \"Bitiş tarihi yok\",\r\n\t\trepeat_text_occurences_count: \"olay\",\r\n\t\trepeat_radio_end2: \"Sonra\",\r\n\t\trepeat_radio_end3: \"Tarihinde bitir\",\r\n\r\n\t\trepeat_never: \"Asla\",\r\n\t\trepeat_daily: \"Her gün\",\r\n\t\trepeat_workdays: \"Her iş günü\",\r\n\t\trepeat_weekly: \"Her hafta\",\r\n\t\trepeat_monthly: \"Her ay\",\r\n\t\trepeat_yearly: \"Her yıl\",\r\n\t\trepeat_custom: \"Özel\",\r\n\t\trepeat_freq_day: \"Gün\",\r\n\t\trepeat_freq_week: \"Hafta\",\r\n\t\trepeat_freq_month: \"Ay\",\r\n\t\trepeat_freq_year: \"Yıl\",\r\n\t\trepeat_on_date: \"Tarihinde\",\r\n\t\trepeat_ends: \"Biter\",\r\n\r\n\t\tmonth_for_recurring: [\"Ocak\", \"Şubat\", \"Mart\", \"Nisan\", \"Mayıs\", \"Haziran\", \"Temmuz\", \"Ağustos\", \"Eylül\", \"Ekim\", \"Kasım\", \"Aralık\"],\r\n\t\tday_for_recurring: [\"Pazar\", \"Pazartesi\", \"Salı\", \"Çarşamba\", \"Perşembe\", \"Cuma\", \"Cumartesi\"]\r\n\t}\r\n};","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Січень\", \"Лютий\", \"Березень\", \"Квітень\", \"Травень\", \"Червень\", \"Липень\", \"Серпень\", \"Вересень\", \"Жовтень\", \"Листопад\", \"Грудень\"],\r\n\t\tmonth_short: [\"Січ\", \"Лют\", \"Бер\", \"Кві\", \"Тра\", \"Чер\", \"Лип\", \"Сер\", \"Вер\", \"Жов\", \"Лис\", \"Гру\"],\r\n\t\tday_full: [\"Неділя\", \"Понеділок\", \"Вівторок\", \"Середа\", \"Четвер\", \"П'ятниця\", \"Субота\"],\r\n\t\tday_short: [\"Нед\", \"Пон\", \"Вів\", \"Сер\", \"Чет\", \"Птн\", \"Суб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сьогодні\",\r\n\t\tday_tab: \"День\",\r\n\t\tweek_tab: \"Тиждень\",\r\n\t\tmonth_tab: \"Місяць\",\r\n\t\tnew_event: \"Нова подія\",\r\n\t\ticon_save: \"Зберегти\",\r\n\t\ticon_cancel: \"Відміна\",\r\n\t\ticon_details: \"Деталі\",\r\n\t\ticon_edit: \"Редагувати\",\r\n\t\ticon_delete: \"Вилучити\",\r\n\t\tconfirm_closing: \"\", //Ваші зміни втратяться. Ви впевнені ?\r\n\t\tconfirm_deleting: \"Подія вилучиться назавжди. Ви впевнені?\",\r\n\t\tsection_description: \"Опис\",\r\n\t\tsection_time: \"Часовий проміжок\",\r\n\t\tfull_day: \"Весь день\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Хочете редагувати весь перелік повторюваних подій?\",\r\n\t\tsection_recurring: \"Повторювана подія\",\r\n\t\tbutton_recurring: \"Відключено\",\r\n\t\tbutton_recurring_open: \"Включено\",\r\n\t\tbutton_edit_series: \"Редагувати серію\",\r\n\t\tbutton_edit_occurrence: \"Редагувати примірник\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Перелік\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Опис\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Рік\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Перелік\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Таблиця\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"День\",\r\n\t\trepeat_radio_week: \"Тиждень\",\r\n\t\trepeat_radio_month: \"Місяць\",\r\n\t\trepeat_radio_year: \"Рік\",\r\n\t\trepeat_radio_day_type: \"Кожний\",\r\n\t\trepeat_text_day_count: \"день\",\r\n\t\trepeat_radio_day_type2: \"Кожний робочий день\",\r\n\t\trepeat_week: \" Повторювати кожен\",\r\n\t\trepeat_text_week_count: \"тиждень , по:\",\r\n\t\trepeat_radio_month_type: \"Повторювати\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" числа кожний \",\r\n\t\trepeat_text_month_count: \"місяць\",\r\n\t\trepeat_text_month_count2_before: \"кожен \",\r\n\t\trepeat_text_month_count2_after: \"місяць\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"день\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без дати закінчення\",\r\n\t\trepeat_text_occurences_count: \"повторень\",\r\n\t\trepeat_radio_end3: \"До \",\r\n\t\trepeat_radio_end2: \"\",\r\n\r\n\t\trepeat_never: \"Ніколи\",\r\n\t\trepeat_daily: \"Щодня\",\r\n\t\trepeat_workdays: \"Щодня в робочі дні\",\r\n\t\trepeat_weekly: \"Щотижня\",\r\n\t\trepeat_monthly: \"Щомісяця\",\r\n\t\trepeat_yearly: \"Щороку\",\r\n\t\trepeat_custom: \"Налаштоване\",\r\n\t\trepeat_freq_day: \"День\",\r\n\t\trepeat_freq_week: \"Тиждень\",\r\n\t\trepeat_freq_month: \"Місяць\",\r\n\t\trepeat_freq_year: \"Рік\",\r\n\t\trepeat_on_date: \"На дату\",\r\n\t\trepeat_ends: \"Закінчується\",\r\n\r\n\t\tmonth_for_recurring: [\"січня\", \"лютого\", \"березня\", \"квітня\", \"травня\", \"червня\", \"липня\", \"серпня\", \"вересня\", \"жовтня\", \"листопада\", \"грудня\"],\r\n\t\tday_for_recurring: [\"Неділям\", \"Понеділкам\", \"Вівторкам\", \"Середам\", \"Четвергам\", \"П'ятницям\", \"Суботам\"]\r\n\t}\r\n};\r\n","import eventable from \"../utils/eventable\";\r\n\r\nexport class DatePicker {\r\n\tconstructor(scheduler, container, state = {}) {\r\n\t\tthis.state = {\r\n\t\t\tdate: new Date(),\r\n\t\t\tmodes: ['days', 'months', 'years'],\r\n\t\t\tcurrentRange: [],\r\n\t\t\teventDates: [],\r\n\t\t\tfilterDays: null,\r\n\t\t\tcurrentModeIndex: 0,\r\n\t\t\t...state\r\n\t\t};\r\n\t\tthis.container = null;\r\n\t\tthis.element = null;\r\n\t\tthis.onStateChangeHandlers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t\tthis._domEvents = scheduler._createDomEventScope();\r\n\t\tthis.state = this.getState();\r\n\t\teventable(this);\r\n\t\tif(container){\r\n\r\n\t\t\tthis.container = container;\r\n\t\t\tthis.render(this.container);\r\n\t\t}\r\n\r\n\t\tthis.onStateChange((oldState, newState) => {\r\n\t\t\tthis.callEvent(\"onStateChange\", [newState, oldState]);\r\n\t\t});\r\n\t}\r\n\r\n\tgetState() {\r\n\t\treturn { \r\n\t\t\t...this.state,\r\n\t\t\tmode: this.state.modes[this.state.currentModeIndex]\r\n\t\t};\r\n\t}\r\n\r\n\tsetState(newState) {\r\n\t\tconst oldState = { ...this.state };\r\n\t\tif(newState.mode){\r\n\t\t\tnewState.currentModeIndex = this.state.modes.indexOf(newState.mode);\r\n\t\t}\r\n\t\tthis.state = { ...this.state, ...newState };\r\n\r\n\t\tthis._notifyStateChange(oldState, this.state);\r\n\r\n\t\tif (this.container) {\r\n\t\t\tthis.render(this.container);\r\n\t\t}\r\n\t}\r\n\r\n\tonStateChange(handler) {\r\n\t\tthis.onStateChangeHandlers.push(handler);\r\n\r\n\t\t// function to remove the handler\r\n\t\treturn () => {\r\n\t\t\tconst index = this.onStateChangeHandlers.indexOf(handler);\r\n\t\t\tif (index !== -1) {\r\n\t\t\t\tthis.onStateChangeHandlers.splice(index, 1);\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\r\n\t_notifyStateChange(oldState, newState) {\r\n\t\tthis.onStateChangeHandlers.forEach(handler => handler(oldState, newState));\r\n\t}\r\n\r\n\t_adjustDate(direction) {\r\n\r\n\t\tconst {mode, date} = this.getState();\r\n\t\tconst newDate = new Date(date);\r\n\t\tif (mode === 'days') {\r\n\t\t\tnewDate.setMonth(date.getMonth() + direction);\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tnewDate.setFullYear(date.getFullYear() + direction);\r\n\t\t} else {\r\n\t\t\tnewDate.setFullYear(date.getFullYear() + direction * 10);\r\n\t\t}\r\n\t\tthis.setState({ date: newDate });\r\n\t}\r\n\r\n\t_toggleMode() {\r\n\t\tconst newIndex = (this.state.currentModeIndex + 1) % this.state.modes.length;\r\n\t\tthis.setState({ currentModeIndex: newIndex });\r\n\t}\r\n\r\n\t_renderCalendarHeader(container) {\r\n\t\tconst {mode, date} = this.getState();\r\n\r\n\t\tconst header = document.createElement('div');\r\n\t\theader.classList.add('dhx_cal_datepicker_header');\r\n\r\n\t\tconst backwardArrow = document.createElement('button');\r\n\r\n\t\tbackwardArrow.classList.add(\"dhx_cal_datepicker_arrow\", \"scheduler_icon\", \"arrow_left\");\r\n\t\theader.appendChild(backwardArrow);\r\n\r\n\t\tconst monthLabel = document.createElement('div');\r\n\t\tmonthLabel.classList.add('dhx_cal_datepicker_title');\r\n\r\n\t\tif (mode === 'days') {\r\n\t\t\tmonthLabel.innerText = date.toLocaleString('default', { month: 'long' }) + ' ' + date.getFullYear();\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tmonthLabel.innerText = date.getFullYear();\r\n\t\t} else {\r\n\t\t\tconst startYear = Math.floor(date.getFullYear() / 10) * 10;\r\n\t\t\tmonthLabel.innerText = `${startYear} - ${startYear + 9}`;\r\n\t\t}\r\n\r\n\t\tthis._domEvents.attach(monthLabel, \"click\", this._toggleMode.bind(this));\r\n\t\theader.appendChild(monthLabel);\r\n\r\n\t\tconst forwardArrow = document.createElement('button');\r\n\r\n\t\tforwardArrow.classList.add(\"dhx_cal_datepicker_arrow\", \"scheduler_icon\", \"arrow_right\");\r\n\t\theader.appendChild(forwardArrow);\r\n\r\n\t\tcontainer.appendChild(header);\r\n\r\n\t\tthis._domEvents.attach(backwardArrow, \"click\", this._adjustDate.bind(this, -1));\r\n\t\tthis._domEvents.attach(forwardArrow, \"click\", this._adjustDate.bind(this, 1));\r\n\t}\r\n\r\n\trender(container) {\r\n\t\tthis._domEvents.detachAll();\r\n\t\tthis.container = container || this.container; \r\n\t\tthis.container.innerHTML = '';\r\n\r\n\t\tif(!this.element){\r\n\t\t\tthis.element = document.createElement(\"div\");\r\n\t\t\tthis.element.classList.add(\"dhx_cal_datepicker\");\r\n\t\t}\r\n\t\tthis.element.innerHTML = '';\r\n\t\tthis.container.appendChild(this.element);\r\n\r\n\t\tthis._renderCalendarHeader(this.element);\r\n\t\tconst dataContainer = document.createElement(\"div\");\r\n\t\tdataContainer.classList.add(\"dhx_cal_datepicker_data\");\r\n\t\tthis.element.appendChild(dataContainer);\r\n\r\n\t\tconst {mode} = this.getState();\r\n\t\tif (mode === 'days') {\r\n\t\t\tthis._renderDayGrid(dataContainer);\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tthis._renderMonthGrid(dataContainer);\r\n\t\t} else {\r\n\t\t\tthis._renderYearGrid(dataContainer);\r\n\t\t}\r\n\t}\r\n\r\n\t_renderDayGridHeader(daysOfWeekContainer) {\r\n\t\tconst {date, filterDays} = this.getState();\r\n\t\tconst scheduler = this.scheduler;\r\n\r\n\t\tlet currentDate = scheduler.date.week_start(new Date(date));\r\n\t\tconst maxDate = scheduler.date.add(scheduler.date.week_start(new Date(date)), 1, 'week');\r\n\r\n\t\tdaysOfWeekContainer.classList.add('dhx_cal_datepicker_days');\r\n\r\n\t\tconst labelFormat = scheduler.date.date_to_str(\"%D\");\r\n\r\n\t\twhile (currentDate.valueOf() < maxDate.valueOf()) {\r\n\t\t\tif(!(filterDays && filterDays(currentDate))){\r\n\t\t\t\tconst label = labelFormat(currentDate);\r\n\r\n\t\t\t\tconst dayElement = document.createElement('div');\r\n\t\t\t\tdayElement.setAttribute(\"data-day\", currentDate.getDay());\r\n\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_dayname');\r\n\t\t\t\tdayElement.innerText = label;\r\n\t\t\t\tdaysOfWeekContainer.appendChild(dayElement);\r\n\t\t\t}\r\n\r\n\t\t\tcurrentDate = scheduler.date.add(currentDate, 1, 'day');\r\n\t\t}\r\n\t}\r\n\r\n\t_weeksBetween(min, max) {\r\n\t\tconst scheduler = this.scheduler;\r\n\t\tlet weeks = 0;\r\n\t\tlet currWeek = new Date(min);\r\n\t\twhile(currWeek.valueOf() < max.valueOf()){\r\n\t\t\tweeks += 1;\r\n\t\t\tcurrWeek = scheduler.date.week_start(scheduler.date.add(currWeek, 1, \"week\"));\r\n\t\t}\r\n\t\treturn weeks;\r\n\t}\r\n\r\n\t_renderDayGrid(container) {\r\n\t\tconst {date, currentRange, eventDates, minWeeks, filterDays} = this.getState();\r\n\r\n\t\tlet minSchedulerDate = currentRange[0];\r\n\t\tlet maxSchedulerDate = currentRange[1];\r\n\r\n\t\tconst eventDaysTable = eventDates.reduce((acc, date) => {\r\n\t\t\tconst dayStart = this.scheduler.date.day_start(new Date(date));\r\n\t\t\tacc[dayStart.valueOf()] = true;\r\n\t\t\treturn acc;\r\n\t\t}, {});\r\n\r\n\r\n\t\t// Render Days of the Week\r\n\t\tconst daysOfWeekContainer = document.createElement('div');\r\n\t\tthis._renderDayGridHeader(daysOfWeekContainer);\r\n\t\tconst weekLength = daysOfWeekContainer.children.length;\r\n\t\tcontainer.appendChild(daysOfWeekContainer);\r\n\t\tif(weekLength !== 7){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-week-length\", weekLength);\r\n\t\t}\r\n\r\n\t\tconst scheduler = this.scheduler;\r\n\t\tconst firstDate = scheduler.date.week_start(scheduler.date.month_start(new Date(date)));\r\n\t\tconst monthStart = scheduler.date.month_start(new Date(date));\r\n\t\tconst monthEnd = scheduler.date.add(scheduler.date.month_start(new Date(date)), 1, 'month');\r\n\t\tlet lastDate = scheduler.date.add(scheduler.date.month_start(new Date(date)), 1, 'month');\r\n\t\tconst currentCalDate = scheduler.date.date_part(scheduler._currentDate());\r\n\t\tif(lastDate.getDay() !== 0){\r\n\t\t\tlastDate = scheduler.date.add(scheduler.date.week_start(lastDate), 1, \"week\");\r\n\t\t}\r\n\r\n\t\tlet weeks = this._weeksBetween(firstDate, lastDate);\r\n\t\tif(minWeeks && weeks < minWeeks){\r\n\t\t\tlastDate = scheduler.date.add(lastDate, (minWeeks - weeks), \"week\");\r\n\t\t}\r\n\r\n\t\tlet currDate = firstDate;\r\n\r\n\t\tconst dayGridContainer = document.createElement('div');\r\n\t\tdayGridContainer.classList.add('dhx_cal_datepicker_days');\r\n\r\n\t\tthis._domEvents.attach(dayGridContainer, \"click\", (event) => {\r\n\t\t\tconst dateCell = event.target.closest(\"[data-cell-date]\");\r\n\t\t\tconst date = new Date(dateCell.getAttribute(\"data-cell-date\"));\r\n\t\t\tthis.callEvent(\"onDateClick\", [date, event]);\r\n\t\t});\r\n\r\n\t\twhile(currDate.valueOf() < lastDate.valueOf()){\r\n\t\t\tif(!(filterDays && filterDays(currDate))){\r\n\r\n\t\t\t\tconst dayElement = document.createElement('div');\r\n\t\t\t\tdayElement.setAttribute(\"data-cell-date\", scheduler.templates.format_date(currDate));\r\n\t\t\t\tdayElement.setAttribute(\"data-day\", currDate.getDay());\r\n\t\t\t\tdayElement.innerHTML = currDate.getDate();\r\n\r\n\t\t\t\tif(currDate.valueOf() < monthStart.valueOf()){\r\n\t\t\t\t\tdayElement.classList.add('dhx_before');\r\n\t\t\t\t}else if(currDate.valueOf() >= monthEnd.valueOf()){\t\r\n\t\t\t\t\tdayElement.classList.add('dhx_after');\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(currDate.getDay() === 0 || currDate.getDay() === 6){\r\n\t\t\t\t\tdayElement.classList.add(\"dhx_cal_datepicker_weekend\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(currDate.valueOf() == currentCalDate.valueOf()){\r\n\t\t\t\t\tdayElement.classList.add(\"dhx_now\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(minSchedulerDate && maxSchedulerDate){\r\n\t\t\t\t\tif(currDate.valueOf() >= minSchedulerDate.valueOf() && currDate.valueOf() < maxSchedulerDate.valueOf()){\r\n\t\t\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(eventDaysTable[currDate.valueOf()]){\r\n\t\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_event');\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_date');\r\n\r\n\t\t\t\tdayGridContainer.appendChild(dayElement);\r\n\t\t\t}\r\n\t\t\tcurrDate = scheduler.date.add(currDate, 1, 'day');\r\n\t\t}\r\n\r\n\t\tcontainer.appendChild(dayGridContainer);\r\n\r\n\t}\r\n\r\n\t_renderMonthGrid(container) {\r\n\t\tconst {date} = this.getState();\r\n\r\n\t\tconst wrapper = document.createElement('div');\r\n\t\twrapper.classList.add(\"dhx_cal_datepicker_months\");\r\n\r\n\t\tconst months = [];\r\n\t\tfor(let i = 0; i < 12; i++){\r\n\t\t\tmonths.push(new Date(date.getFullYear(), i, 1));\r\n\t\t}\r\n\r\n\t\tconst formatLabel = this.scheduler.date.date_to_str(\"%M\");\r\n\t\tmonths.forEach(month => {\r\n\t\t\tconst monthElement = document.createElement('div');\r\n\t\t\tmonthElement.classList.add('dhx_cal_datepicker_month');\r\n\t\t\tif(date.getMonth() === month.getMonth()){\r\n\t\t\t\tmonthElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t}\r\n\t\t\tmonthElement.setAttribute(\"data-month\", month.getMonth());\r\n\t\t\tmonthElement.innerHTML = formatLabel(month);\r\n\t\t\tthis._domEvents.attach(monthElement, \"click\", () => {\r\n\t\t\t\tconst newDate = new Date(month);\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tdate: newDate,\r\n\t\t\t\t\tmode: 'days'\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\twrapper.appendChild(monthElement);\r\n\t\t});\r\n\t\tcontainer.appendChild(wrapper);\r\n\r\n\t\tconst doneArea = document.createElement(\"div\");\r\n\t\tdoneArea.classList.add(\"dhx_cal_datepicker_done\");\r\n\t\tconst doneBtn = document.createElement(\"button\");\r\n\t\tdoneBtn.innerText = \"Done\";\r\n\t\tdoneBtn.classList.add(\"dhx_cal_datepicker_done_btn\");\r\n\t\tthis._domEvents.attach(doneBtn, \"click\", () => {\r\n\t\t\tthis.setState({\r\n\t\t\t\tmode: 'days'\r\n\t\t\t});\r\n\t\t});\r\n\t\tdoneArea.appendChild(doneBtn);\r\n\t\tcontainer.appendChild(doneArea);\r\n\t}\r\n\r\n\t_renderYearGrid(container) {\r\n\t\tconst {date} = this.getState();\r\n\t\tconst startYear = Math.floor(date.getFullYear() / 10) * 10;\r\n\t\t\r\n\t\tconst wrapper = document.createElement('div');\r\n\t\twrapper.classList.add(\"dhx_cal_datepicker_years\");\r\n\t\tfor (let i = startYear - 1; i <= startYear + 10; i++) {\r\n\t\t\tconst yearElement = document.createElement('div');\r\n\t\t\tyearElement.innerText = i;\r\n\t\t\tyearElement.classList.add('dhx_cal_datepicker_year');\r\n\t\t\tyearElement.setAttribute(\"data-year\", i);\r\n\t\t\tif(date.getFullYear() === i){\r\n\t\t\t\tyearElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t}\r\n\t\t\tthis._domEvents.attach(yearElement, \"click\", () => {\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tdate: new Date(i, date.getMonth(), 1),\r\n\t\t\t\t\tmode: 'months'\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\twrapper.appendChild(yearElement);\r\n\t\t\t\r\n\t\t}\r\n\t\tcontainer.appendChild(wrapper);\r\n\r\n\t\tconst doneArea = document.createElement(\"div\");\r\n\t\tdoneArea.classList.add(\"dhx_cal_datepicker_done\");\r\n\t\tconst doneBtn = document.createElement(\"button\");\r\n\t\tdoneBtn.innerText = \"Done\";\r\n\t\tdoneBtn.classList.add(\"dhx_cal_datepicker_done_btn\");\r\n\t\tthis._domEvents.attach(doneBtn, \"click\", () => {\r\n\t\t\tthis.setState({\r\n\t\t\t\tmode: 'months'\r\n\t\t\t});\r\n\t\t});\r\n\t\tdoneArea.appendChild(doneBtn);\r\n\t\tcontainer.appendChild(doneArea);\r\n\t}\r\n\r\n\tdestructor(){\r\n\t\tthis.onStateChangeHandlers = [];\r\n\t\tif(this.element){\r\n\t\t\tthis.element.innerHTML = '';\r\n\t\t\tthis.element.remove();\r\n\t\t}\r\n\r\n\t\tthis._domEvents.detachAll();\r\n\t\tthis.callEvent(\"onDestroy\", []);\r\n\t\tthis.detachAllEvents();\r\n\r\n\t\tthis.scheduler = null;\r\n\t}\r\n}","// import \"./css/dhtmlxscheduler_terrace\";\r\n// import \"./css/dhtmlxscheduler_material\";\r\n// import \"./css/dhtmlxscheduler_material_nofont\";\r\n// import \"./css/dhtmlxscheduler_flat\";\r\n// import \"./css/dhtmlxscheduler_contrast_black\";\r\n// import \"./css/dhtmlxscheduler_contrast_white\";\r\n\r\nimport addPlugins from \"./plugins\";\r\nimport stateProvider from \"./core/state\";\r\nimport assert from \"./core/common/assert\";\r\nimport common_errors from \"./core/common_errors\";\r\nimport connector from \"./core/connector\";\r\nimport schedulerCore from \"./core/scheduler\";\r\nimport common from \"./core/common\";\r\nimport wai_aria from \"./core/wai_aria\";\r\nimport utils from \"./core/utils/utils\";\r\nimport dom_helpers from \"./core/utils/dom_helpers\";\r\nimport env from \"./utils/env\";\r\nimport destructor from \"./core/destructor\";\r\nimport ajax from \"./core/utils/ajax\";\r\nimport base from \"./core/base\";\r\nimport config from \"./core/config\";\r\nimport event from \"./core/event\";\r\nimport event_highlight from \"./core/event_highlight\";\r\nimport load from \"./core/load\";\r\nimport lightbox from \"./core/lightbox\";\r\nimport touch from \"./core/touch\";\r\nimport dhtmlx_suite_hooks from \"./core/dhtmlx/dhtmlx_suite_hooks\";\r\nimport skins from \"./core/skins\";\r\nimport jquery from \"./core/jquery\";\r\nimport delay_render from \"./core/delay_render\";\r\nimport dataProcessorExtend from \"./core/dataprocessor/dataprocessor\";\r\nimport message from \"./core/message\";\r\nimport i18nFactory from \"./locale\";\r\n\r\nimport voidFirst from \"./publish_helpers/void_script_first\";\r\nimport voidSecond from \"./publish_helpers/void_script_second\";\r\nimport voidThird from \"./publish_helpers/void_script_third\";\r\n\r\n//import datepickerHeader from \"./core/clickable_header\";\r\n\r\nimport { DatePicker } from \"./core/datepicker\";\r\n\r\nexport default function(extensionManager) {\r\n\r\n\tconst scheduler = { version: VERSION };\r\n\t\r\n\tscheduler.$stateProvider = stateProvider();\r\n\r\n\tscheduler.getState = scheduler.$stateProvider.getState;\r\n\tcommon_errors(scheduler);\r\n\tcommon(scheduler);\r\n\tschedulerCore(scheduler);\r\n\twai_aria(scheduler);\r\n\t//utils(scheduler);\r\n\r\n\tscheduler.utils = utils;\r\n\tscheduler.$domHelpers = dom_helpers;\r\n\tscheduler.utils.dom = dom_helpers;\r\n\tscheduler.uid = utils.uid;\r\n\tscheduler.mixin = utils.mixin;\r\n\tscheduler.defined = utils.defined;\r\n\tscheduler.assert = assert(scheduler);\r\n\tscheduler.copy = utils.copy;\r\n\r\n\tscheduler._createDatePicker = function(container, config){\r\n\t\treturn new DatePicker(scheduler, container, config);\r\n\t};\r\n\r\n\t//datepickerHeader(scheduler);\r\n\r\n\r\n\t//old api compatibility\r\n\tscheduler._getFocusableNodes = dom_helpers.getFocusableNodes;\r\n\tscheduler._getClassName = dom_helpers.getClassName;\r\n\tscheduler._locate_css = dom_helpers.locateCss;\r\n\r\n\tconst messageApi = message(scheduler);\r\n\tscheduler.utils.mixin(scheduler, messageApi);\r\n\r\n\tscheduler.env = scheduler.$env = env;\r\n\tscheduler.Promise = window.Promise;\r\n\tdestructor(scheduler);\r\n\tajax(scheduler);\r\n\tvoidFirst(scheduler);\r\n\tbase(scheduler);\r\n\tconfig(scheduler);\r\n\tevent(scheduler);\r\n\tevent_highlight(scheduler);\r\n\tload(scheduler);\r\n\tlightbox(scheduler);\r\n\ttouch(scheduler);\r\n\tdhtmlx_suite_hooks(scheduler);\r\n\tvoidSecond(scheduler);\r\n\tskins(scheduler);\r\n\tjquery(scheduler);\r\n\tdelay_render(scheduler);\r\n\tdataProcessorExtend(scheduler);\r\n\tvoidThird(scheduler);\r\n\tconnector(scheduler);\r\n\tconst i18n = i18nFactory();\r\n\tscheduler.i18n = {\r\n\t\taddLocale: i18n.addLocale,\r\n\t\tsetLocale: function(locale){\r\n\t\t\tif(typeof locale === \"string\"){\r\n\t\t\t\tvar localeObject = i18n.getLocale(locale);\r\n\t\t\t\tif(!localeObject){\r\n\t\t\t\t\tlocaleObject = i18n.getLocale(\"en\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler.locale = localeObject;\r\n\t\t\t}else if(locale){\r\n\t\t\t\tif(!scheduler.locale){\r\n\t\t\t\t\tscheduler.locale = locale;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfor(var i in locale){\r\n\t\t\t\t\t\tif(locale[i] && typeof locale[i] === \"object\"){\r\n\t\t\t\t\t\t\tif(!scheduler.locale[i]){\r\n\t\t\t\t\t\t\t\tscheduler.locale[i] = {};\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tscheduler.mixin(scheduler.locale[i], locale[i], true);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tscheduler.locale[i] = locale[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar labels = scheduler.locale.labels;\r\n\t\t\tlabels.dhx_save_btn \t= labels.icon_save;\r\n\t\t\tlabels.dhx_cancel_btn \t= labels.icon_cancel;\r\n\t\t\tlabels.dhx_delete_btn \t= labels.icon_delete;\r\n\r\n\t\t\tif(scheduler.$container){\r\n\t\t\t\tscheduler.get_elements();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t},\r\n\t\tgetLocale: i18n.getLocale\r\n\t};\r\n\tscheduler.i18n.setLocale(\"en\");\r\n\taddPlugins(scheduler);\r\n\tscheduler.ext = {};\r\n\r\n\tconst activePlugins = {};\r\n\tscheduler.plugins = function(config){\r\n\t\tconst extensionList = getExtensionList(config, {\r\n\t\t\t\ttreetimeline: [\"timeline\"],\r\n\t\t\t\tdaytimeline: [\"timeline\"],\r\n\t\t\t\touterdrag: [\"legacy\"]\r\n\t\t\t}, {\r\n\t\t\t\tlegacy: 1,\r\n\t\t\t\tlimit: 1,\r\n\t\t\t\ttimeline: 2,\r\n\t\t\t\tdaytimeline: 3,\r\n\t\t\t\ttreetimeline: 3,\r\n\t\t\t\touterdrag:6\r\n\t\t\t});\r\n\r\n\t\textensionList.forEach(function(name){\r\n\t\t\tif(!activePlugins[name]){\r\n\t\t\t\tconst plugin = extensionManager.getExtension(name);\r\n\t\t\t\tif(plugin){\r\n\t\t\t\t\tplugin(scheduler);\r\n\t\t\t\t\tactivePlugins[name] = true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthrow new Error(\"unknown plugin \" + name);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n\r\n\tfunction getExtensionList(config, dependencies, priorities){\r\n\t\tconst result = [];\r\n\r\n\t\tfor(const i in config){\r\n\t\t\tif(config[i]){\r\n\t\t\t\tconst extension = i.toLowerCase();\r\n\t\t\t\tif(dependencies[extension]){\r\n\t\t\t\t\tdependencies[extension].forEach(function(dep){\r\n\t\t\t\t\t\tconst dependencyName = dep.toLowerCase();\r\n\t\t\t\t\t\tif(!config[dependencyName]){\r\n\t\t\t\t\t\t\tresult.push(dependencyName);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\tresult.push(extension);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tresult.sort(function(a, b){\r\n\t\t\tconst orderA = priorities[a] || 0;\r\n\t\t\tconst orderB = priorities[b] || 0;\r\n\t\t\tif(orderA > orderB){\r\n\t\t\t\treturn 1;\r\n\t\t\t}else if(orderA < orderB){\r\n\t\t\t\treturn -1;\r\n\t\t\t}else{\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\treturn scheduler;\r\n\r\n}","import utils from \"./utils/utils\";\r\n\r\nconst StateService = (function(){\r\n\tconst stateProviders = {};\r\n\r\n\tfunction getState(name){\r\n\t\tconst provider = stateProviders[name];\r\n\t\tif(provider){\r\n\t\t\treturn stateProviders[name].method();\r\n\t\t}else{\r\n\t\t\tconst res = {};\r\n\t\t\tfor(const i in stateProviders){\r\n\t\t\t\tif(!stateProviders[i].internal)\r\n\t\t\t\t\tutils.mixin(res, stateProviders[i].method(), true);\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\t\t}\r\n\t}\r\n\r\n\tfunction registerProvider(name, provider, internal){\r\n\t\tstateProviders[name] = { method: provider, internal: internal};\r\n\t}\r\n\r\n\tfunction unregisterProvider(name){\r\n\t\tdelete stateProviders[name];\r\n\t}\r\n\r\n\treturn {\r\n\t\tgetState: getState,\r\n\t\tregisterProvider: registerProvider,\r\n\t\tunregisterProvider: unregisterProvider\r\n\t};\r\n});\r\n\r\nexport default StateService;\r\n\r\n","export default function extend(scheduler) {\r\n\r\nvar commonViews = {\r\n\tagenda: \"https://docs.dhtmlx.com/scheduler/agenda_view.html\",\r\n\tgrid: \"https://docs.dhtmlx.com/scheduler/grid_view.html\",\r\n\tmap: \"https://docs.dhtmlx.com/scheduler/map_view.html\",\r\n\tunit: \"https://docs.dhtmlx.com/scheduler/units_view.html\",\r\n\ttimeline: \"https://docs.dhtmlx.com/scheduler/timeline_view.html\",\r\n\tweek_agenda: \"https://docs.dhtmlx.com/scheduler/weekagenda_view.html\",\r\n\tyear: \"https://docs.dhtmlx.com/scheduler/year_view.html\",\r\n\tanythingElse: \"https://docs.dhtmlx.com/scheduler/views.html\"\r\n};\r\n\r\nvar requiredExtensions = {\r\n\tagenda: \"ext/dhtmlxscheduler_agenda_view.js\",\r\n\tgrid: \"ext/dhtmlxscheduler_grid_view.js\",\r\n\tmap: \"ext/dhtmlxscheduler_map_view.js\",\r\n\tunit: \"ext/dhtmlxscheduler_units.js\",\r\n\ttimeline: \"ext/dhtmlxscheduler_timeline.js, ext/dhtmlxscheduler_treetimeline.js, ext/dhtmlxscheduler_daytimeline.js\",\r\n\tweek_agenda: \"ext/dhtmlxscheduler_week_agenda.js\",\r\n\tyear: \"ext/dhtmlxscheduler_year_view.js\",\r\n\tlimit: \"ext/dhtmlxscheduler_limit.js\"\r\n};\r\n\r\nscheduler._commonErrorMessages = {\r\n\tunknownView: function(view){\r\n\t\tvar relatedDoc = \"Related docs: \" + (commonViews[view] || commonViews.anythingElse); \r\n\t\tvar relatedExtension = requiredExtensions[view] ? (\"You're probably missing \" + requiredExtensions[view] + \".\") : \"\";\r\n\t\treturn (\r\n\t\t\t\"`\"+view+\"` view is not defined. \\n\" +\r\n\t\t\t\"Please check parameters you pass to `scheduler.init` or `scheduler.setCurrentView` in your code and ensure you've imported appropriate extensions. \\n\" + \r\n\t\t\trelatedDoc + \"\\n\" + (relatedExtension ? (relatedExtension + \"\\n\") : \"\"));\r\n\t},\r\n\tcollapsedContainer: function(div){\r\n\t\treturn \"Scheduler container height is set to *100%* but the rendered height is zero and the scheduler is not visible. \\n\"+\r\n\t\t\"Make sure that the container has some initial height or use different units. For example:\\n\" +\r\n\t\t\"
\\n\";\r\n\t}\r\n};\r\n\r\nscheduler.createTimelineView = function() {\r\n\tthrow new Error(\"scheduler.createTimelineView is not implemented. Be sure to add the required extension: \" + requiredExtensions.timeline + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.timeline);\r\n};\r\n\r\nscheduler.createUnitsView = function() {\r\n\tthrow new Error(\"scheduler.createUnitsView is not implemented. Be sure to add the required extension: \" + requiredExtensions.unit + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.unit);\r\n};\r\n\r\nscheduler.createGridView = function() {\r\n\tthrow new Error(\"scheduler.createGridView is not implemented. Be sure to add the required extension: \" + requiredExtensions.grid + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.grid);\r\n};\r\n\r\nscheduler.addMarkedTimespan = function() {\r\n\tthrow new Error(\"scheduler.addMarkedTimespan is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_limit.js\" + \r\n\t\"\\n\" +\r\n\t\"Related docs: https://docs.dhtmlx.com/scheduler/limits.html\");\r\n};\r\n\r\nscheduler.renderCalendar = function() {\r\n\tthrow new Error(\"scheduler.renderCalendar is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_minical.js\" + \r\n\t\"\\n\" +\r\n\t\"https://docs.dhtmlx.com/scheduler/minicalendar.html\");\r\n};\r\n\r\nscheduler.exportToPNG = function() {\r\n\tthrow new Error([\r\n\t\t\"scheduler.exportToPNG is not implemented.\",\r\n\t\t\"This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/png.html\",\r\n\t\t\"Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml\"\r\n\t].join(\"\\n\"));\r\n};\r\n\r\nscheduler.exportToPDF = function() {\r\n\tthrow new Error([\r\n\t\t\"scheduler.exportToPDF is not implemented.\",\r\n\t\t\"This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/pdf.html\",\r\n\t\t\"Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml\"\r\n\t].join(\"\\n\"));\r\n};\r\n\r\n\r\n}","\r\nimport nav_bar from \"./nav_bar\";\r\nimport scheduler_resize_listener from \"./scheduler_resize_listener\";\r\nimport eventable from \"../utils/eventable\";\r\n\r\n\r\nexport default function extend(scheduler) {\r\n\r\neventable(scheduler);\r\n\r\nnav_bar(scheduler);\r\n\r\nscheduler._detachDomEvent = function(el, event, handler){\r\n\tif (el.removeEventListener){\r\n\t\tel.removeEventListener(event, handler, false);\r\n\r\n\t}else if (el.detachEvent){\r\n\t\tel.detachEvent(\"on\"+event, handler);\r\n\t}\r\n};\r\n\r\n\r\nscheduler._init_once = function(){\r\n\tscheduler_resize_listener(scheduler);\r\n\r\n\tscheduler._init_once = function(){};\r\n};\r\n\r\nconst layout = {\r\n\t\"navbar\": {\r\n\t\trender: function (config) {\r\n\t\t\treturn scheduler._init_nav_bar(config);\r\n\t\t}\r\n\t},\r\n\t\"header\": {\r\n\t\trender: function (config) {\r\n\t\t\tconst element = document.createElement(\"div\");\r\n\t\t\telement.className = \"dhx_cal_header\";\r\n\t\t\treturn element;\r\n\t\t}\r\n\t},\r\n\t\"dataArea\": {\r\n\t\trender: function (config) {\r\n\t\t\tconst element = document.createElement(\"div\");\r\n\t\t\telement.className = \"dhx_cal_data\";\r\n\t\t\treturn element;\r\n\t\t}\r\n\t},\r\n\t\"html_element\": {\r\n\t\trender: function (config) {\r\n\t\t\treturn config.html;\r\n\t\t}\r\n\t}\r\n};\r\n\r\nfunction hasSchedulerMarkup(element){\r\n\treturn !!(\r\n\t\telement.querySelector(\".dhx_cal_header\") &&\r\n\t\telement.querySelector(\".dhx_cal_data\") &&\r\n\t\telement.querySelector(\".dhx_cal_navline\")\r\n\t\t);\r\n}\r\n\r\nfunction createDefaultHeader(scheduler){\r\n\tconst views = [\r\n\t\t\"day\",\r\n\t\t\"week\",\r\n\t\t\"month\"\r\n\t];\r\n\tconst date = [\r\n\t\t\"date\"\r\n\t];\r\n\tconst nav = [\r\n\t\t\"prev\",\r\n\t\t\"today\",\r\n\t\t\"next\"\r\n\t];\r\n\r\n\tif(scheduler.matrix){\r\n\t\tfor(const i in scheduler.matrix){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\tif(scheduler._props){\r\n\t\tfor(const i in scheduler._props){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\r\n\tif(scheduler._grid && scheduler._grid.names){\r\n\t\tfor(const i in scheduler._grid.names){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\r\n\tconst optionalViews = [\r\n\t\t\"map\",\r\n\t\t\"agenda\",\r\n\t\t\"week_agenda\",\r\n\t\t\"year\"\r\n\t];\r\n\r\n\toptionalViews.forEach(function(viewName){\r\n\t\tif(scheduler[viewName + \"_view\"]){\r\n\t\t\tviews.push(viewName);\r\n\t\t}\r\n\t});\r\n\r\n\treturn views.concat(date).concat(nav);\r\n}\r\n\r\nscheduler.init=function(id,date,mode){\r\n\tif(this.$destroyed){\r\n\t\treturn; // not have errors when try to reinit destroyed scheduler\r\n\t}\r\n\tdate=date||(scheduler._currentDate());\r\n\tmode=mode||\"week\";\r\n\r\n\tif(this._obj){\r\n\t\tthis.unset_actions();\r\n\t}\r\n\r\n\tthis._obj=(typeof id == \"string\")?document.getElementById(id):id;\r\n\tthis.$container = this._obj;\r\n\tthis.$root = this._obj;\r\n\r\n\tif(!this.$container.offsetHeight && this.$container.offsetWidth && this.$container.style.height === \"100%\"){\r\n\t\t// scheduler container has zero height and non-zero width\r\n\t\twindow.console.error(scheduler._commonErrorMessages.collapsedContainer(), this.$container);\r\n\t}\r\n\r\n\tif(this.config.wai_aria_attributes && this.config.wai_aria_application_role){\r\n\t\tthis.$container.setAttribute(\"role\", \"application\");\r\n\t}\r\n\r\n\tif(!this.config.header && !hasSchedulerMarkup(this.$container)){\r\n\t\t// if no header config and no required markup - use the default header\r\n\t\t// so the scheduler could be initialized in an empty div\r\n\t\tthis.config.header = createDefaultHeader(this);\r\n\t\twindow.console.log([// jshint ignore:line\r\n\t\t\t\"Required DOM elements are missing from the scheduler container and **scheduler.config.header** is not specified.\",\r\n\t\t\t\"Using a default header configuration: \",\r\n\t\t\t\"scheduler.config.header = \" + JSON.stringify(this.config.header, null, 2),\r\n\t\t\t\"Check this article for the details: https://docs.dhtmlx.com/scheduler/initialization.html\"\r\n\t\t].join(\"\\n\"));// jshint ignore:line\r\n\t}\r\n\r\n\tif (this.config.header) {\r\n\t\tthis.$container.innerHTML = \"\";\r\n\t\tthis.$container.classList.add(\"dhx_cal_container\");\r\n\t\tif(this.config.header.height){\r\n\t\t\tthis.xy.nav_height = this.config.header.height;\r\n\t\t}\r\n\t\tthis.$container.appendChild(layout.navbar.render(this.config.header));\r\n\t\tthis.$container.appendChild(layout.header.render());\r\n\t\tthis.$container.appendChild(layout.dataArea.render());\r\n\t} else {\r\n\t\t// if no header config provided - make sure scheduler container has all necessary elements\r\n\t\tif(!hasSchedulerMarkup(this.$container)){\r\n\t\t\tthrow new Error([\r\n\t\t\t\t\"Required DOM elements are missing from the scheduler container.\",\r\n\t\t\t\t\"Be sure to either specify them manually in the markup: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviamarkup\",\r\n\t\t\t\t\"Or to use **scheduler.config.header** setting so they could be created automatically: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviaheaderconfig\"\r\n\t\t\t].join(\"\\n\"));\r\n\t\t}\r\n\t}\r\n\r\n\tif (this.config.rtl) this.$container.className += \" dhx_cal_container_rtl\";\r\n\r\n\t//hook for terrace skin\r\n\tif (this._skin_init)\r\n\t\tscheduler._skin_init();\r\n\r\n\tscheduler.date.init();\r\n\r\n\tthis._scroll=true;\r\n\r\n\tthis._els=[];\r\n\tthis.get_elements();\r\n\tthis.init_templates();\r\n\tthis.set_actions();\r\n\r\n\tthis._init_once();\r\n\tthis._init_touch_events();\r\n\r\n\tthis.set_sizes();\r\n\tscheduler.callEvent('onSchedulerReady', []);\r\n\tscheduler.$initialized = true;\r\n\tthis.setCurrentView(date,mode);\r\n\r\n};\r\n\r\nscheduler.xy={\r\n\tmin_event_height:20,\r\n\tbar_height: 24,\r\n\tscale_width:50,\r\n\tscroll_width:18,\r\n\tscale_height:20,\r\n\tmonth_scale_height:20,\r\n\tmenu_width:25,\r\n\tmargin_top:0,\r\n\tmargin_left:0,\r\n\teditor_width:140,\r\n\tmonth_head_height:22,\r\n\tevent_header_height: 14\r\n};\r\nscheduler.keys={\r\n\tedit_save:13,\r\n\tedit_cancel:27\r\n};\r\n\r\nscheduler.bind = function bind(functor, object){\r\n\tif(functor.bind)\r\n\t\treturn functor.bind(object);\r\n\telse\r\n\t\treturn function(){ return functor.apply(object,arguments); };\r\n};\r\n\r\nscheduler.set_sizes=function(){\r\n\r\n\tvar w = this._x = this._obj.clientWidth-this.xy.margin_left;\r\n\r\n\t//not-table mode always has scroll - need to be fixed in future\r\n\tvar scale_x=this._table_view?0:(this.xy.scale_width+this.xy.scroll_width);\r\n\r\n\tvar materialScalePlaceholder = this.$container.querySelector(\".dhx_cal_scale_placeholder\");\r\n\tif(scheduler._is_material_skin()){\r\n\t\tif(!materialScalePlaceholder) {\r\n\t\t\tmaterialScalePlaceholder = document.createElement(\"div\");\r\n\t\t\tmaterialScalePlaceholder.className = \"dhx_cal_scale_placeholder\";\r\n\t\t\tthis.$container.insertBefore(materialScalePlaceholder, this._els[\"dhx_cal_header\"][0]);\r\n\t\t}\r\n\t\tmaterialScalePlaceholder.style.display = \"block\";\r\n\r\n\t\tthis.set_xy(materialScalePlaceholder,w,this.xy.scale_height + 1,0, this._els[\"dhx_cal_header\"][0].offsetTop);\r\n\r\n\t}else{\r\n\t\tif(materialScalePlaceholder){\r\n\t\t\tmaterialScalePlaceholder.parentNode.removeChild(materialScalePlaceholder);\r\n\t\t}\r\n\t}\r\n\r\n\tif (this._lightbox) {\r\n\t\tif (scheduler.$container.offsetWidth < 1200) {\r\n\t\t} else {\r\n\t\t\tthis._setLbPosition(document.querySelector(\".dhx_cal_light\"));\r\n\t\t}\r\n\t}\r\n\r\n\tthis._data_width = w-scale_x;\r\n\r\n\tthis._els[\"dhx_cal_navline\"][0].style.width = w + \"px\";\r\n\tconst header = this._els[\"dhx_cal_header\"][0];\r\n\tthis.set_xy(header, this._data_width, this.xy.scale_height);\r\n\t// this._els[\"dhx_cal_header\"][0].style.marginLeft = `${scheduler.xy.scale_width}px`;\r\n\theader.style.left = ``;\r\n\theader.style.right = ``;\r\n\tif(!this._table_view){\r\n\t\tif(this.config.rtl){\r\n\t\t\theader.style.right = `${this.xy.scale_width}px`;\r\n\t\t}else{\r\n\t\t\theader.style.left = `${this.xy.scale_width}px`;\r\n\t\t}\r\n\t} else {\r\n\t\tif(!this.config.rtl){\r\n\t\t\theader.style.left = `-1px`;\r\n\t\t} else {\r\n\t\t\theader.style.right = `-1px`;\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.set_xy=function(node,w,h,x,y){\r\n\tfunction prepareValue(val){\r\n\t\tlet prepared = val;\r\n\t\tif(!isNaN(Number(prepared))){\r\n\t\t\tprepared = Math.max(0,prepared) + \"px\";\r\n\t\t}\r\n\t\treturn prepared;\r\n\t}\r\n\r\n\tvar direction = 'left';\r\n\r\n\tif(w !== undefined) {\r\n\t\tnode.style.width = prepareValue(w);\r\n\t}\r\n\r\n\tif(h !== undefined){\r\n\t\tnode.style.height = prepareValue(h);\r\n\t}\r\n\r\n\tif (arguments.length>3){\r\n\r\n\t\tif(x !== undefined){\r\n\t\t\tif (this.config.rtl) direction = 'right';\r\n\t\t\tnode.style[direction]=x+\"px\";\r\n\t\t}\r\n\t\tif(y !== undefined){\r\n\t\t\tnode.style.top=y+\"px\";\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.get_elements=function(){\r\n\t//get all child elements as named hash\r\n\tconst els=this._obj.getElementsByTagName(\"DIV\");\r\n\tfor (let i=0; i < els.length; i++){\r\n\t\tlet class_name= scheduler._getClassName(els[i]);\r\n\t\tconst attr_value = els[i].getAttribute(\"data-tab\") || els[i].getAttribute(\"name\") || \"\";\r\n\t\tif (class_name) class_name = class_name.split(\" \")[0];\r\n\t\tif (!this._els[class_name]) this._els[class_name]=[];\r\n\t\tthis._els[class_name].push(els[i]);\r\n\r\n\t\t//check if name need to be changed\r\n\t\t// scheduler.locale.labels[attr_value+\"_tab\"] - to fix getting labels for data-tab\r\n\t\tlet label = scheduler.locale.labels[attr_value+\"_tab\"] || scheduler.locale.labels[attr_value||class_name];\r\n\t\tif (typeof label !== \"string\" && attr_value && !els[i].innerHTML)\r\n\t\t\tlabel = attr_value.split(\"_\")[0];\r\n\t\tif (label) {\r\n\t\t\tthis._waiAria.labelAttr(els[i], label);\r\n\t\t\tels[i].innerHTML = label;\r\n\t\t}\r\n\t}\r\n};\r\n\r\n\r\nconst domEventsScope = scheduler._createDomEventScope();\r\n\r\nscheduler.unset_actions = function(){\r\n\tdomEventsScope.detachAll();\r\n};\r\n\r\nscheduler.set_actions=function(){\r\n\tfor (const a in this._els){\r\n\t\tif (this._click[a]){\r\n\t\t\tfor (let i=0; i < this._els[a].length; i++){\r\n\t\t\t\tconst element = this._els[a][i];\r\n\t\t\t\tconst handler = this._click[a].bind(element);\r\n\t\t\t\tdomEventsScope.attach(element, \"click\", handler);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tdomEventsScope.attach(this._obj, \"selectstart\", function(e){\r\n\t\te.preventDefault();\r\n\t\treturn false;\r\n\t});\r\n\t//this._obj.onselectstart=function(e){ return false; };\r\n\tdomEventsScope.attach(this._obj, \"mousemove\", function(e){\r\n\t\tif (!scheduler._temp_touch_block)\r\n\t\t\tscheduler._on_mouse_move(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"mousedown\", function(e){\r\n\t\tif (!scheduler._ignore_next_click)\r\n\t\t\tscheduler._on_mouse_down(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"mouseup\", function(e){\r\n\t\tif (!scheduler._ignore_next_click)\r\n\t\t\tscheduler._on_mouse_up(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"dblclick\", function(e){\r\n\t\tscheduler._on_dbl_click(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"contextmenu\", function(event) {\r\n\t\tif(scheduler.checkEvent(\"onContextMenu\")){\r\n\t\t\t// block the default browser context menu \r\n\t\t\tevent.preventDefault();\r\n\t\t}\r\n\r\n\t\tconst returnValue = scheduler.callEvent(\"onContextMenu\", [scheduler._locate_event(event.target), event]);\r\n\t\treturn returnValue;\r\n\t});\r\n};\r\nscheduler.select=function(id){\r\n\tif (this._select_id==id) return;\r\n\tscheduler._close_not_saved();\r\n\tthis.editStop(false);\r\n\tif(this._select_id){\r\n\t\tthis.unselect();\r\n\t}\r\n\tthis._select_id = id;\r\n\tthis.updateEvent(id);\r\n\tthis.callEvent(\"onEventSelected\", [id]);\r\n};\r\nscheduler.unselect=function(id){\r\n\tif (id && id!=this._select_id) {\r\n\t\treturn;\r\n\t}\r\n\tconst previousSelection = this._select_id;\r\n\tthis._select_id = null;\r\n\tif (previousSelection && this.getEvent(previousSelection)) {\r\n\t\tthis.updateEvent(previousSelection);\r\n\t}\r\n\tthis.callEvent(\"onEventUnselected\", [previousSelection]);\r\n};\r\nscheduler.$stateProvider.registerProvider(\"global\", (function(){\r\n\treturn {\r\n\t\tmode: this._mode,\r\n\t\tdate: new Date(this._date),\r\n\t\tmin_date: new Date(this._min_date),\r\n\t\tmax_date: new Date(this._max_date),\r\n\t\teditor_id: this._edit_id,\r\n\t\tlightbox_id: this._lightbox_id,\r\n\t\tnew_event: this._new_event,\r\n\t\tselect_id: this._select_id,\r\n\t\texpanded: this.expanded,\r\n\t\tdrag_id: this._drag_id,\r\n\t\tdrag_mode: this._drag_mode\r\n\t};\r\n}).bind(scheduler));\r\n\r\nscheduler._click={\r\n\tdhx_cal_data:function(e){\r\n\t\t//in case of touch disable click processing\r\n\t\tif (scheduler._ignore_next_click){\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\r\n\t\tconst id = scheduler._locate_event(e.target);\r\n\r\n\t\tif (!id) {\r\n\t\t\tscheduler.callEvent(\"onEmptyClick\",[scheduler.getActionData(e).date, e]);\r\n\t\t} else {\r\n\t\t\tif ( !scheduler.callEvent(\"onClick\",[id,e]) || scheduler.config.readonly ) return;\r\n\t\t}\r\n\r\n\t\tif (id && scheduler.config.select) {\r\n\r\n\t\t\tscheduler.select(id);\r\n\t\t\tconst icon = e.target.closest(\".dhx_menu_icon\");\r\n\r\n\t\t\tconst mask = scheduler._getClassName(icon);\r\n\t\t\tif (mask.indexOf(\"_icon\")!=-1)\r\n\t\t\t\tscheduler._click.buttons[mask.split(\" \")[1].replace(\"icon_\",\"\")](id);\r\n\t\t} else{\r\n\t\t\tscheduler._close_not_saved();\r\n\t\t\tif (scheduler.getState().select_id && new Date().valueOf()-(scheduler._new_event||0) > 500){\r\n\t\t\t\tscheduler.unselect();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tdhx_cal_prev_button:function(){\r\n\t\tscheduler._click.dhx_cal_next_button(0,-1);\r\n\t},\r\n\tdhx_cal_next_button:function(dummy,step){\r\n\t\tlet def_step = 1;\r\n\t\tif (scheduler.config.rtl){\r\n\t\t\tstep = -step;\r\n\t\t\tdef_step = -def_step;\r\n\t\t}\r\n\t\tscheduler.setCurrentView(scheduler.date.add( //next line changes scheduler._date , but seems it has not side-effects\r\n\t\t\tscheduler.date[scheduler._mode+\"_start\"](new Date(scheduler._date)),(step||def_step),scheduler._mode));\r\n\t},\r\n\tdhx_cal_today_button:function(){\r\n\t\tif (scheduler.callEvent(\"onBeforeTodayDisplayed\", [])) {\r\n\t\t\tscheduler.setCurrentView(scheduler._currentDate());\r\n\t\t}\r\n\t},\r\n\tdhx_cal_tab:function(){\r\n\t\tconst name = this.getAttribute(\"data-tab\");\r\n\t\tconst deprecated_name = this.getAttribute(\"name\");\r\n\t\tconst mode = name || deprecated_name.substring(0, deprecated_name.search(\"_tab\"));\r\n\t\tscheduler.setCurrentView(scheduler._date,mode);\r\n\t},\r\n\tbuttons:{\r\n\t\t\"delete\":function(id){\r\n\t\t\tconst c = scheduler.locale.labels.confirm_deleting;\r\n\t\t\tscheduler._dhtmlx_confirm({message: c, title: scheduler.locale.labels.title_confirm_deleting, callback:function(){ scheduler.deleteEvent(id); },\r\n\t\t\tconfig: {ok: scheduler.locale.labels.icon_delete}\r\n\t\t});\r\n\t\t},\r\n\t\tedit:function(id){ scheduler.edit(id); },\r\n\t\tsave:function(id){ scheduler.editStop(true); },\r\n\t\tdetails:function(id){ scheduler.showLightbox(id); },\r\n\t\tform:function(id){ scheduler.showLightbox(id); },\r\n\t\tcancel:function(id){ scheduler.editStop(false); }\r\n\t}\r\n};\r\nscheduler._dhtmlx_confirm = function({message, title, callback, config}) {\r\n\tif (!message)\r\n\t\treturn callback();\r\n\r\n\tconfig = config || {};\r\n\tconst opts = { ...config, text: message };\r\n\tif (title) {\r\n\t\topts.title = title;\r\n\t}\r\n\tif (callback) {\r\n\t\topts.callback = function(result) {\r\n\t\t\tif (result) {\r\n\t\t\t\tcallback();\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\tscheduler.confirm(opts);\r\n};\r\nscheduler.addEventNow=function(start,end,e){\r\n\tlet base = {};\r\n\tif (scheduler._isObject(start) && !scheduler._isDate(start)){\r\n\t\tbase = start;\r\n\t\tstart = null;\r\n\t}\r\n\r\n\tconst duration = (this.config.event_duration||this.config.time_step)*60000;\r\n\tif (!start) start = base.start_date||Math.round((scheduler._currentDate()).valueOf()/duration)*duration;\r\n\tlet start_date = new Date(start);\r\n\tif (!end){\r\n\t\tlet start_hour = this.config.first_hour;\r\n\t\tif (start_hour > start_date.getHours()){\r\n\t\t\tstart_date.setHours(start_hour);\r\n\t\t\tstart = start_date.valueOf();\r\n\t\t}\r\n\t\tend = start.valueOf()+duration;\r\n\t}\r\n\tlet end_date = new Date(end);\r\n\r\n\t// scheduler.addEventNow(new Date(), new Date()) + collision though get_visible events defect (such event was not retrieved)\r\n\tif(start_date.valueOf() == end_date.valueOf())\r\n\t\tend_date.setTime(end_date.valueOf()+duration);\r\n\tbase.start_date = base.start_date||start_date;\r\n\tbase.end_date = base.end_date||end_date;\r\n\tbase.text = base.text||this.locale.labels.new_event;\r\n\tbase.id = this._drag_id = base.id || this.uid();\r\n\tthis._drag_mode=\"new-size\";\r\n\tthis._loading=true;\r\n\tconst eventId = this.addEvent(base);\r\n\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\tthis._loading=false;\r\n\r\n\tthis._drag_event={}; //dummy , to trigger correct event updating logic\r\n\tthis._on_mouse_up(e);\r\n\treturn eventId;\r\n};\r\nscheduler._on_dbl_click=function(e,src){\r\n\tsrc = src || e.target;\r\n\tif (this.config.readonly) return;\r\n\tconst name = scheduler._getClassName(src).split(\" \")[0];\r\n\tswitch(name){\r\n\t\tcase \"dhx_scale_holder\":\r\n\t\tcase \"dhx_scale_holder_now\":\r\n\t\tcase \"dhx_month_body\":\r\n\t\tcase \"dhx_wa_day_data\":\r\n\t\t\tif (!scheduler.config.dblclick_create) break;\r\n\t\t\tthis.addEventNow(this.getActionData(e).date,null,e);\r\n\t\t\tbreak;\r\n\t\tcase \"dhx_cal_event\":\r\n\t\tcase \"dhx_wa_ev_body\":\r\n\t\tcase \"dhx_agenda_line\":\r\n\t\tcase \"dhx_cal_agenda_event_line\":\r\n\t\tcase \"dhx_grid_event\":\r\n\t\tcase \"dhx_cal_event_line\":\r\n\t\tcase \"dhx_cal_event_clear\": {\r\n\t\t\tconst id = this._locate_event(src);\r\n\t\t\tif (!this.callEvent(\"onDblClick\",[id,e])) return;\r\n\t\t\tif (this.config.details_on_dblclick || this._table_view || !this.getEvent(id)._timed || !this.config.select)\r\n\t\t\t\tthis.showLightbox(id);\r\n\t\t\telse\r\n\t\t\t\tthis.edit(id);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcase \"dhx_time_block\":\r\n\t\tcase \"dhx_cal_container\":\r\n\t\t\treturn;\r\n\t\tdefault: {\r\n\t\t\tconst viewHandler = this[\"dblclick_\"+name];\r\n\t\t\tif (viewHandler) {\r\n\t\t\t\tviewHandler.call(this,e);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif (src.parentNode && src != this)\r\n\t\t\t\t\treturn scheduler._on_dbl_click(e,src.parentNode);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n};\r\n//column index by mouse x-coordinate\r\nscheduler._get_column_index = function(x_pos){\r\n\tlet column = 0;\r\n\tif (this._cols){\r\n\t\tlet width = 0;\r\n\t\tlet i = 0;\r\n\t\twhile (width + this._cols[i] < x_pos && i < this._cols.length){\r\n\t\t\twidth += this._cols[i];\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tcolumn = i + (this._cols[i] ? ((x_pos - width)/ this._cols[i]) : 0);\r\n\r\n\t\tif (this._ignores){\r\n\t\t\tif(column >= this._cols.length){\r\n\t\t\t\twhile(column >= 1 && this._ignores[Math.floor(column)]){\r\n\t\t\t\t\tcolumn--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n\treturn column;\r\n};\r\n\r\n//transform mouse coordinates to day-time indexes of week based view\r\nscheduler._week_indexes_from_pos = function(pos){\r\n\t//\"get position\" can be invoked before columns are loaded into the units view(e.g. by onMouseMove handler in key_nav.js)\r\n\tif(!this._cols){\r\n\t\treturn pos;\r\n\t}else{\r\n\t\tconst column = this._get_column_index(pos.x);\r\n\r\n\t\tpos.x=Math.min(this._cols.length-1, Math.max(0,Math.ceil(column)-1));\r\n\t\tpos.y=Math.max(0,Math.ceil(pos.y*60/(this.config.time_step*this.config.hour_size_px))-1)+this.config.first_hour*(60/this.config.time_step);\r\n\t\treturn pos;\r\n\t}\r\n};\r\n\r\nscheduler._mouse_coords=function(ev){\r\n\tlet pos;\r\n\tconst body = document.body;\r\n\tconst documentElement = document.documentElement;\r\n\tif (!this.$env.isIE && (ev.pageX || ev.pageY))\r\n\t\tpos={x:ev.pageX, y:ev.pageY};\r\n\telse pos={\r\n\t\tx:ev.clientX + (body.scrollLeft||documentElement.scrollLeft||0) - body.clientLeft,\r\n\t\ty:ev.clientY + (body.scrollTop||documentElement.scrollTop||0) - body.clientTop\r\n\t};\r\n\t//apply layout\r\n\tif (this.config.rtl && this._colsS) {\r\n\t\tpos.x = this.$container.querySelector(\".dhx_cal_data\").offsetWidth - pos.x;\r\n\t\tpos.x += this.$domHelpers.getAbsoluteLeft(this._obj);\r\n\t\tif (this._mode !== \"month\") {\r\n\t\t\tpos.x -= this.xy.scale_width;\r\n\t\t}\r\n\t} else {\r\n\t\tpos.x-=this.$domHelpers.getAbsoluteLeft(this._obj)+(this._table_view?0:this.xy.scale_width);\r\n\t}\r\n\r\n\tconst dataArea = this.$container.querySelector(\".dhx_cal_data\");\r\n\t//pos.y-=this.$domHelpers.getAbsoluteTop(this._obj)+this.xy.nav_height+(this._dy_shift||0)+this.xy.scale_height-this._els[\"dhx_cal_data\"][0].scrollTop;\r\n\tpos.y-=this.$domHelpers.getAbsoluteTop(dataArea)-this._els[\"dhx_cal_data\"][0].scrollTop;\r\n\tpos.ev = ev;\r\n\tconst handler = this[\"mouse_\"+this._mode];\r\n\tif (handler){\r\n\t\tpos = handler.call(this,pos);\r\n\t}else{\r\n\t\t//transform to date\r\n\t\tif (!this._table_view) {\r\n\t\t\tpos = this._week_indexes_from_pos(pos);\r\n\t\t} else {\r\n\t\t\tconst column = this._get_column_index(pos.x);\r\n\t\t\tif (!this._cols || !this._colsS) // agenda/map views\r\n\t\t\t\treturn pos;\r\n\t\t\tlet dy=0;\r\n\t\t\tfor (dy=1; dy < this._colsS.heights.length; dy++)\r\n\t\t\t\tif (this._colsS.heights[dy]>pos.y) break;\r\n\r\n\t\t\tpos.y=Math.ceil( (Math.max(0, column)+Math.max(0,dy-1)*7)*24*60/this.config.time_step );\r\n\r\n\t\t\tif (scheduler._drag_mode || this._mode == \"month\")\r\n\t\t\t\tpos.y=(Math.max(0,Math.ceil(column)-1)+Math.max(0,dy-1)*7)*24*60/this.config.time_step;\r\n\r\n\t\t\t//we care about ignored days only during event moving in month view\r\n\t\t\tif (this._drag_mode == \"move\"){\r\n\t\t\t\tif (scheduler._ignores_detected && scheduler.config.preserve_length){\r\n\t\t\t\t\tpos._ignores = true;\r\n\t\t\t\t\t//get real lengtn of event\r\n\t\t\t\t\tif (!this._drag_event._event_length)\r\n\t\t\t\t\t\tthis._drag_event._event_length = this._get_real_event_length(this._drag_event.start_date, this._drag_event.end_date, { x_step:1, x_unit:\"day\"});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tpos.x=0;\r\n\t\t}\r\n\t}\r\n\tpos.timestamp = +new Date();\r\n\treturn pos;\r\n};\r\nscheduler._close_not_saved=function(){\r\n\tif (new Date().valueOf()-(scheduler._new_event||0) > 500 && scheduler._edit_id){\r\n\t\tconst confirmationText=scheduler.locale.labels.confirm_closing;\r\n\r\n\t\tscheduler._dhtmlx_confirm({\r\n\t\t\tmessage: confirmationText, \r\n\t\t\ttitle: scheduler.locale.labels.title_confirm_closing, \r\n\t\t\tcallback: function() { \r\n\t\t\t\tscheduler.editStop(scheduler.config.positive_closing);\r\n\t\t\t}\r\n\t\t});\r\n\t\tif(confirmationText){\r\n\t\t\tthis._drag_id = this._drag_pos = this._drag_mode = null;\r\n\t\t}\r\n\t}\r\n};\r\nscheduler._correct_shift=function(start, back){\r\n\treturn start-=((new Date(scheduler._min_date)).getTimezoneOffset()-(new Date(start)).getTimezoneOffset())*60000*(back?-1:1);\r\n};\r\n\r\nscheduler._is_pos_changed = function(old_pos, new_pos){\r\n\tfunction diff(old_val, new_val, acc){\r\n\t\treturn !!(Math.abs(old_val - new_val) > acc);\r\n\t}\r\n\r\n\tif(!(old_pos && this._drag_pos)){\r\n\t\treturn true;\r\n\t}\r\n\tconst delay = 100;\r\n\tconst d_pos = 5;\r\n\r\n\t// start drag only if passed some time since mouse down, or if mouse position changed sufficiently\r\n\treturn !!(this._drag_pos.has_moved || !this._drag_pos.timestamp || (new_pos.timestamp - this._drag_pos.timestamp > delay) || diff(old_pos.ev.clientX, new_pos.ev.clientX, d_pos) || diff(old_pos.ev.clientY, new_pos.ev.clientY, d_pos));\r\n};\r\n\r\nscheduler._correct_drag_start_date = function(start){\r\n\tlet obj;\r\n\tif (scheduler.matrix)\r\n\t\tobj = scheduler.matrix[scheduler._mode];\r\n\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\tstart = new Date(start);\r\n\tlet len = 1;\r\n\tif(obj._start_correction || obj._end_correction)\r\n\t\tlen = (obj.last_hour||0)*60 - (start.getHours()*60+start.getMinutes()) || 1;\r\n\r\n\treturn start*1 + (scheduler._get_fictional_event_length(start, len, obj) - len);\r\n};\r\nscheduler._correct_drag_end_date = function(start, duration){\r\n\tlet obj;\r\n\tif (scheduler.matrix) {\r\n\t\tobj = scheduler.matrix[scheduler._mode];\r\n\t}\r\n\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\tconst end = start*1 + scheduler._get_fictional_event_length(start, duration, obj);\r\n\treturn new Date(end*1 - (scheduler._get_fictional_event_length(end, -1, obj, -1) + 1));\r\n};\r\n\r\nscheduler._on_mouse_move=function(e){\r\n\tif (this._drag_mode){\r\n\t\tvar pos=this._mouse_coords(e);\r\n\t\tif (this._is_pos_changed(this._drag_pos, pos)){\r\n\t\t\tvar start, end;\r\n\t\t\tif (this._edit_id!=this._drag_id)\r\n\t\t\t\tthis._close_not_saved();\r\n\r\n\t\t\tif(!this._drag_mode)\r\n\t\t\t\treturn;\r\n\r\n\t\t\tvar mousedownPos = null;\r\n\t\t\tif(this._drag_pos && !this._drag_pos.has_moved){\r\n\t\t\t\tmousedownPos = this._drag_pos;\r\n\t\t\t\tmousedownPos.has_moved = true;\r\n\t\t\t}\r\n\r\n\t\t\tthis._drag_pos = pos;\r\n\r\n\t\t\tthis._drag_pos.has_moved = true;\r\n\r\n\t\t\tif (this._drag_mode==\"create\"){\r\n\r\n\t\t\t\t// use mouse down position as a starting point for drag-create\r\n\t\t\t\tif(mousedownPos){\r\n\t\t\t\t\tpos = mousedownPos;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._close_not_saved();\r\n\t\t\t\tthis.unselect(this._select_id);\r\n\t\t\t\tthis._loading=true; //will be ignored by dataprocessor\r\n\r\n\t\t\t\tstart = this._get_date_from_pos(pos).valueOf();\r\n\r\n\t\t\t\tif (!this._drag_start) {\r\n\t\t\t\t\tvar res = this.callEvent(\"onBeforeEventCreated\", [e, this._drag_id]);\r\n\t\t\t\t\tif (!res){\r\n\t\t\t\t\t\tthis._loading=false;\r\n\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis._loading=false;\r\n\t\t\t\t\tthis._drag_start=start;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tend = start;\r\n\t\t\t\tif (end == this._drag_start) {\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar start_date = new Date(this._drag_start);\r\n\t\t\t\tvar end_date = new Date(end);\r\n\t\t\t\tif ( (this._mode == \"day\" || this._mode == \"week\") &&\r\n\t\t\t\t\t(start_date.getHours() == end_date.getHours() &&\r\n\t\t\t\t\tstart_date.getMinutes() == end_date.getMinutes()) ) {\r\n\t\t\t\t\t\tend_date = new Date(this._drag_start+1000);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\tthis._drag_id=this.uid();\r\n\t\t\t\tthis.addEvent(start_date, end_date, this.locale.labels.new_event, this._drag_id, pos.fields);\r\n\r\n\t\t\t\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\t\t\t\tthis._loading=false;\r\n\t\t\t\tthis._drag_mode=\"new-size\";\r\n\r\n\t\t\t}\r\n\r\n\t\t\tvar timeStep = this.config.time_step;\r\n\t\t\tvar ev=this.getEvent(this._drag_id);\r\n\t\t\tvar obj;\r\n\t\t\tif (scheduler.matrix)\r\n\t\t\t\tobj = scheduler.matrix[scheduler._mode];\r\n\t\t\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\t\t\tif (this._drag_mode==\"move\"){\r\n\t\t\t\tstart = this._min_date.valueOf()+(pos.y*this.config.time_step+pos.x*24*60)*60000;\r\n\t\t\t\tif (!pos.custom && this._table_view) {\r\n\t\t\t\t\tstart += this.date.time_part(ev.start_date) * 1000;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!this._table_view && this._dragEventBody && this._drag_event._move_event_shift === undefined) {\r\n\t\t\t\t\tthis._drag_event._move_event_shift = start - ev.start_date;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (this._drag_event._move_event_shift) {\r\n\t\t\t\t\tstart -= this._drag_event._move_event_shift;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstart = this._correct_shift(start);\r\n\r\n\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view && obj){\r\n\r\n\t\t\t\t\tstart = scheduler._correct_drag_start_date(start);\r\n\t\t\t\t\tend = scheduler._correct_drag_end_date(start,this._drag_event._event_length);\r\n\r\n\t\t\t\t} else\r\n\t\t\t\t\tend = ev.end_date.valueOf()-(ev.start_date.valueOf()-start);\r\n\t\t\t} else { // resize\r\n\t\t\t\tstart = ev.start_date.valueOf();\r\n\t\t\t\tend = ev.end_date.valueOf();\r\n\t\t\t\tif (this._table_view) {\r\n\t\t\t\t\tvar resize_date = this._min_date.valueOf()+pos.y*this.config.time_step*60000 + (pos.custom?0:24*60*60000);\r\n\t\t\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\t\t\tresize_date = this._correct_shift(resize_date, false);\r\n\t\t\t\t\t\tif( this._drag_from_start ) {\r\n\t\t\t\t\t\t\tvar day = 24*60*60000;\r\n\t\t\t\t\t\t\tif( resize_date <= scheduler.date.date_part(new Date(end+day-1)).valueOf() ) // to get end time as 23:59:59 and then the day start\r\n\t\t\t\t\t\t\t\tstart = resize_date - day;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tend = resize_date;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif(this.config.preserve_length) {\r\n\t\t\t\t\t\t\tif (pos.resize_from_start) {\r\n\t\t\t\t\t\t\t\tstart = scheduler._correct_drag_start_date(resize_date);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tend = scheduler._correct_drag_end_date(resize_date, 0);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tif (pos.resize_from_start) {\r\n\t\t\t\t\t\t\t\tstart = resize_date;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tend = resize_date;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar end_day_start = this.date.date_part(new Date(ev.end_date.valueOf() - 1)).valueOf();\r\n\t\t\t\t\tvar end_day_date = new Date(end_day_start);\r\n\t\t\t\t\tvar firstHour = this.config.first_hour;\r\n\t\t\t\t\tvar lastHour = this.config.last_hour;\r\n\t\t\t\t\tvar maxY = (lastHour - firstHour) * (60/timeStep);\r\n\r\n\t\t\t\t\tthis.config.time_step = 1;\r\n\t\t\t\t\tvar precisePos = this._mouse_coords(e);\r\n\t\t\t\t\tthis.config.time_step = timeStep;\r\n\r\n\t\t\t\t\tvar minDate = pos.y*timeStep*60000;\r\n\t\t\t\t\tvar maxDate = Math.min(pos.y + 1, maxY)*timeStep*60000;\r\n\t\t\t\t\tvar preciseDate = precisePos.y*60000;\r\n\r\n\t\t\t\t\t// rounding end date to the closest time step\r\n\t\t\t\t\tif(Math.abs(minDate - preciseDate) > Math.abs(maxDate - preciseDate)){\r\n\t\t\t\t\t\tend = end_day_start + maxDate;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tend = end_day_start + minDate;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = end + ((new Date(end)).getTimezoneOffset() - end_day_date.getTimezoneOffset()) * 60000;\r\n\t\t\t\t\tthis._els[\"dhx_cal_data\"][0].style.cursor=\"s-resize\";\r\n\t\t\t\t\tif (this._mode == \"week\" || this._mode == \"day\")\r\n\t\t\t\t\t\tend = this._correct_shift(end);\r\n\t\t\t\t}\r\n\t\t\t\tif (this._drag_mode == \"new-size\") {\r\n\t\t\t\t\tif (end <= this._drag_start){\r\n\t\t\t\t\t\tvar shift = pos.shift||((this._table_view && !pos.custom)?24*60*60000:0);\r\n\t\t\t\t\t\tstart = end-(pos.shift?0:shift);\r\n\t\t\t\t\t\tend = this._drag_start+(shift||(timeStep*60000));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tstart = this._drag_start;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (end<=start)\r\n\t\t\t\t\t\tend=start+timeStep*60000;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar new_end = new Date(end-1);\r\n\t\t\tvar new_start = new Date(start);\r\n\t\t\t//deny drag out of visible scheduler scale in timeline view\r\n\t\t\tif(this._drag_mode==\"move\" && scheduler.config.limit_drag_out &&\r\n\t\t\t\t(+new_start < +scheduler._min_date || +end > +scheduler._max_date)){\r\n\r\n\t\t\t\tif(+ev.start_date < +scheduler._min_date || +ev.end_date > +scheduler._max_date){\r\n\t\t\t\t\t// not move event if it's already outside time scale\r\n\t\t\t\t\tnew_start = new Date(ev.start_date);\r\n\t\t\t\t\tend = new Date(ev.end_date);\r\n\t\t\t\t}else{\r\n\r\n\t\t\t\t\tvar duration = end - new_start;\r\n\r\n\t\t\t\t\tif(+new_start < +scheduler._min_date){\r\n\t\t\t\t\t\tnew_start = new Date(scheduler._min_date);\r\n\t\t\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view){\r\n\t\t\t\t\t\t\tnew_start = new Date(scheduler._correct_drag_start_date(new_start));\r\n\t\t\t\t\t\t\tif(obj._start_correction)\r\n\t\t\t\t\t\t\t\tnew_start = new Date(new_start.valueOf() + obj._start_correction);\r\n\t\t\t\t\t\t\tend = new Date(new_start*1 + this._get_fictional_event_length(new_start, this._drag_event._event_length, obj));\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tend = new Date(+new_start + duration);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tend = new Date(scheduler._max_date);\r\n\r\n\t\t\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view){\r\n\t\t\t\t\t\t\tif(obj._end_correction)\r\n\t\t\t\t\t\t\t\tend = new Date(end.valueOf() - obj._end_correction);\r\n\t\t\t\t\t\t\tend = new Date(end*1 - this._get_fictional_event_length(end, 0, obj, true));\r\n\t\t\t\t\t\t\tnew_start = new Date(end*1 - this._get_fictional_event_length(end, this._drag_event._event_length, obj, true));\r\n\t\t\t\t\t\t\tif(this._ignores_detected){\r\n\t\t\t\t\t\t\t\tnew_start = scheduler.date.add(new_start, obj.x_step, obj.x_unit);\r\n\t\t\t\t\t\t\t\tend = new Date(end*1 - this._get_fictional_event_length(end, 0, obj, true));\r\n\t\t\t\t\t\t\t\tend = scheduler.date.add(end, obj.x_step, obj.x_unit);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tnew_start = new Date(+end - duration);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\tvar new_end = new Date(end-1);\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\t// fix event dates when resized to bottom of the column (day/week views)\r\n\t\t\tif(!this._table_view && this._dragEventBody &&\r\n\t\t\t\t!scheduler.config.all_timed &&\r\n\t\t\t\t((!scheduler._get_section_view() && pos.x != this._get_event_sday({start_date: new Date(start), end_date:new Date(start)})) || new Date(start).getHours() < this.config.first_hour)){\r\n\t\t\t\tvar duration = end - new_start;\r\n\t\t\t\tif (this._drag_mode == \"move\") {\r\n\t\t\t\t\tvar day = this._min_date.valueOf() + (pos.x * 24 * 60) * 60000;\r\n\t\t\t\t\tnew_start = new Date(day);\r\n\t\t\t\t\tnew_start.setHours(this.config.first_hour);\r\n\t\t\t\t\tend = new Date(new_start.valueOf() + duration);\r\n\t\t\t\t\tnew_end = new Date(end-1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// fix event dates when resized to bottom of the column (day/week views)\r\n\t\t\tif(!this._table_view &&\r\n\t\t\t\t!scheduler.config.all_timed &&\r\n\t\t\t\t((!scheduler.getView() && pos.x != this._get_event_sday({start_date: new Date(end), end_date:new Date(end)})) || new Date(end).getHours() >= this.config.last_hour)){\r\n\t\t\t\tvar duration = end - new_start;\r\n\t\t\t\tvar day = this._min_date.valueOf()+(pos.x*24*60)*60000;\r\n\t\t\t\tend = scheduler.date.date_part(new Date(day));\r\n\t\t\t\tend.setHours(this.config.last_hour);\r\n\t\t\t\tnew_end = new Date(end-1);\r\n\t\t\t\tif(this._drag_mode == \"move\"){\r\n\t\t\t\t\tnew_start = new Date(+end - duration);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//prevent out-of-borders situation for day|week view\r\n\t\t\tif ( this._table_view || (new_end.getDate()==new_start.getDate() && new_end.getHours()=ed)\r\n\t\t\t\tcls += ' dhx_after';\r\n\t\t\telse if (sd.valueOf()==cd.valueOf())\r\n\t\t\t\tcls += ' dhx_now';\r\n\r\n\t\t\tif (this._ignores_detected && this._ignores[j]){\r\n\t\t\t\tcls += \" dhx_scale_ignore\";\r\n\t\t\t}\r\n\r\n\t\t\tcell.className = cls + \" \" + this.templates.month_date_class(sd, cd);\r\n\r\n\t\t\tcell.setAttribute(\"data-cell-date\", scheduler.templates.format_date(sd));\r\n\t\t\tvar body_class = \"dhx_month_body\";\r\n\t\t\tvar head_class = \"dhx_month_head\";\r\n\t\t\tif (j === 0 && this.config.left_border) {\r\n\t\t\t\tbody_class += \" dhx_month_body_border\";\r\n\t\t\t\thead_class += \" dhx_month_head_border\";\r\n\t\t\t}\r\n\t\t\tif (!this._ignores_detected || !this._ignores[j]){\r\n\t\t\t\tcell.style.width = tdwidths[j];\r\n\t\t\t\tthis._waiAria.monthCellAttr(cell, sd);\r\n\r\n\t\t\t\tvar cellHead = document.createElement(\"div\");\r\n\t\t\t\tcellHead.style.height = scheduler.xy.month_head_height + \"px\";\r\n\t\t\t\tcellHead.className = head_class;\r\n\t\t\t\tcellHead.innerHTML = this.templates.month_day(sd);\r\n\t\t\t\tcell.appendChild(cellHead);\r\n\r\n\t\t\t\tvar cellBody = document.createElement(\"div\");\r\n\t\t\t\tcellBody.className = body_class;\r\n\t\t\t\t// cellBody.style.height = row_height + \"px\";\r\n\t\t\t\t// cellBody.style.width = tdwidths[j];\r\n\t\t\t\tcell.appendChild(cellBody);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tcell.appendChild(document.createElement(\"div\"));\r\n\t\t\t\tcell.appendChild(document.createElement(\"div\"));\r\n\t\t\t}\r\n\t\t\trendered_dates.push(sd);\r\n\t\t\tvar bf1 = sd.getDate();\r\n\t\t\tsd=this.date.add(sd,1,\"day\");\r\n\t\t\tif (sd.getDate() - bf1 > 1)\r\n\t\t\t\tsd = new Date(sd.getFullYear(), sd.getMonth(), bf1 + 1, 12, 0);\r\n\t\t}\r\n\r\n\t\tscheduler._colsS.heights[i] = cellheight;\r\n\t\tcellheight += getCellHeight(i);\r\n\t}\r\n\r\n\tthis._min_date = view_start;\r\n\tthis._max_date = sd;\r\n\r\n\tdiv.innerHTML = \"\";\r\n\tdiv.appendChild(table);\r\n\r\n\tthis._scales = {};\r\n\tvar cells = div.querySelectorAll('[data-cell-date]');\r\n\tcells.forEach((cell) => {\r\n\t\tconst date = scheduler.templates.parse_date(cell.getAttribute(\"data-cell-date\"));\r\n\t\tconst body = cell.querySelector(\".dhx_month_body\");\r\n\t\tthis._scales[+date] = body;\r\n\t\tthis.callEvent(\"onScaleAdd\", [this._scales[+date], date]);\r\n\t});\r\n\r\n\treturn this._max_date;\r\n};\r\n\r\nscheduler._reset_month_scale=function(b,dd,sd,rows){\r\n\t//recalculates rows height and redraws month layout\r\n\tvar ed=scheduler.date.add(dd,1,\"month\");\r\n\r\n\t//trim time part for comparison reasons\r\n\tvar cd = scheduler._currentDate();\r\n\tthis.date.date_part(cd);\r\n\tthis.date.date_part(sd);\r\n\r\n\trows = rows || Math.ceil(Math.round((ed.valueOf()-sd.valueOf()) / (60*60*24*1000) ) / 7);\r\n\r\n\tvar height = (Math.floor(b.clientHeight/rows) - this.xy.month_head_height);\r\n\r\n\tthis._colsS.height = height + this.xy.month_head_height;\r\n\tthis._colsS.heights = [];\r\n\r\n\treturn scheduler._render_month_scale(b, dd, sd, rows);\r\n\r\n};\r\n\r\nscheduler.getView = function (viewName) {\r\n\tif (!viewName) {\r\n\t\tviewName = scheduler.getState().mode;\r\n\t}\r\n\tif (scheduler.matrix && scheduler.matrix[viewName]) {\r\n\t\treturn scheduler.matrix[viewName];\r\n\t}\r\n\r\n\tif (scheduler._props && scheduler._props[viewName]) {\r\n\t\treturn scheduler._props[viewName];\r\n\t}\r\n\r\n\treturn null;\r\n};\r\n\r\nscheduler.getLabel = function(property, key) {\r\n\tvar sections = this.config.lightbox.sections;\r\n\tfor (var i=0; i scheduler.getState().max_date.valueOf()){\r\n\t\t\tendColumnIndex += getDaysDifference(endDate, scheduler.getState().max_date);\r\n\t\t}\r\n\t} else{\r\n\t\tendColumnIndex = Math.round(eventLength/60/60/1000/24);\r\n\t}\r\n\r\n\tvar last_column = true;\r\n\twhile (startColumnIndex < endColumnIndex){\r\n\t\tvar check = scheduler.date.add(endDate, -config.x_step, config.x_unit);\r\n\t\tif (ignore && ignore(endDate) && (!last_column || (last_column && ignore(check) ))){\r\n\t\t\teventLength -= (endDate-check);\r\n\r\n\t\t}else{\r\n\t\t\tlet excludedDuration = 0;\r\n\t\t\tconst intervalStart = new Date(Math.max(check.valueOf(), startDate.valueOf()));\r\n\t\t\tconst intervalEnd = endDate;\r\n\t\t\tconst leftCellCutOffStart = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.first_hour);\r\n\t\t\tconst leftCellCutOffEnd = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.last_hour||24);\r\n\t\t\tconst rightCellCutOffStart = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.first_hour);\r\n\t\t\tconst rightCellCutOffEnd = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.last_hour||24);\r\n\r\n\t\t\tif(intervalEnd.valueOf() > rightCellCutOffEnd.valueOf()){\r\n\t\t\t\texcludedDuration += intervalEnd - rightCellCutOffEnd;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalEnd.valueOf() > rightCellCutOffStart.valueOf()){\r\n\t\t\t\texcludedDuration += config._start_correction;\r\n\t\t\t} else {\r\n\t\t\t\texcludedDuration += intervalEnd.getHours()*60*60*1000 + intervalEnd.getMinutes()*60*1000;\r\n\t\t\t}\r\n\t\t\t// GS-2580: if the end date of the events is quals to the last_hour config, need to include that date\r\n\t\t\tif(intervalStart.valueOf() <= leftCellCutOffEnd.valueOf()){\r\n\t\t\t\texcludedDuration += config._end_correction;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalStart.valueOf() < leftCellCutOffStart.valueOf()){\r\n\t\t\t\texcludedDuration += (leftCellCutOffStart.valueOf() - intervalStart.valueOf());\r\n\t\t\t}\r\n\t\t\t\r\n\r\n\t\t\teventLength -= excludedDuration;\r\n\t\t\tlast_column = false;\r\n\t\t}\r\n\t\tendDate = check;\r\n\t\tendColumnIndex--;\r\n\t}\r\n\treturn eventLength;\r\n};\r\nscheduler._get_fictional_event_length=function(end_date, ev_length, obj, back){\r\n\tvar sd = new Date(end_date);\r\n\tvar dir = back ? -1 : 1;\r\n\r\n\t//get difference caused by first|last hour\r\n\tif (obj._start_correction || obj._end_correction){\r\n\t\tvar today;\r\n\t\tif (back)\r\n\t\t\ttoday = (sd.getHours()*60+sd.getMinutes()) - (obj.first_hour||0)*60;\r\n\t\telse\r\n\t\t\ttoday = (obj.last_hour||0)*60 - (sd.getHours()*60+sd.getMinutes());\r\n\t\tvar per_day = (obj.last_hour - obj.first_hour)*60;\r\n\t\tvar days = Math.ceil( (ev_length / (60*1000) - today ) / per_day);\r\n\t\tif(days < 0) days = 0;\r\n\t\tev_length += days * (24*60 - per_day) * 60 * 1000;\r\n\t}\r\n\r\n\tvar fd = new Date(end_date*1+ev_length*dir);\r\n\tvar ignore = this[\"ignore_\"+this._mode];\r\n\r\n\tvar start_slot = 0,\r\n\t\tend_slot;\r\n\tif (obj.render){\r\n\t\tstart_slot = this._get_date_index(obj, sd);\r\n\t\tend_slot = this._get_date_index(obj, fd);\r\n\t} else{\r\n\t\tend_slot = Math.round(ev_length/60/60/1000/24);\r\n\t}\r\n\r\n\twhile (start_slot*dir <= end_slot*dir){\r\n\t\tvar check = scheduler.date.add(sd, obj.x_step*dir, obj.x_unit);\r\n\t\tif (ignore && ignore(sd)){\r\n\t\t\tev_length += (check-sd)*dir;\r\n\t\t\tend_slot += dir;\r\n\t\t}\r\n\r\n\t\tsd = check;\r\n\t\tstart_slot+=dir;\r\n\t}\r\n\r\n\treturn ev_length;\r\n};\r\n\r\nscheduler._get_section_view = function(){\r\n\treturn this.getView();\r\n};\r\n\r\nscheduler._get_section_property = function(){\r\n\tif(this.matrix && this.matrix[this._mode]){\r\n\t\treturn this.matrix[this._mode].y_property;\r\n\t}else if(this._props && this._props[this._mode]){\r\n\t\treturn this._props[this._mode].map_to;\r\n\t}\r\n\treturn null;\r\n};\r\n\r\nscheduler._is_initialized = function(){\r\n\tvar state = this.getState();\r\n\treturn (this._obj && state.date && state.mode);\r\n};\r\nscheduler._is_lightbox_open = function(){\r\n\tvar state = this.getState();\r\n\treturn state.lightbox_id !== null && state.lightbox_id !== undefined;\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n(function(){\r\n\r\n\t// eslint-disable-next-line no-control-regex\r\n\tvar htmlTags = new RegExp(\"<(?:.|\\n)*?>\", \"gm\");\r\n\tvar extraSpaces = new RegExp(\" +\", \"gm\");\r\n\r\n\tfunction stripHTMLLite(htmlText){\r\n\t\treturn (htmlText + \"\")\r\n\t\t\t.replace(htmlTags, \" \").\r\n\t\t\treplace(extraSpaces, \" \");\r\n\t}\r\n\r\n\tvar singleQuotes = new RegExp(\"'\", \"gm\");\r\n\tfunction escapeQuotes(text){\r\n\t\treturn (text + \"\").replace(singleQuotes, \"'\");\r\n\t}\r\n\r\n\tscheduler._waiAria = {\r\n\t\tgetAttributeString: function(attr){\r\n\t\t\tvar attributes = [\" \"];\r\n\t\t\tfor(var i in attr){\r\n\t\t\t\tif(typeof attr[i] != \"function\" && typeof attr[i] != \"object\") {\r\n\t\t\t\t\tvar text = escapeQuotes(stripHTMLLite(attr[i]));\r\n\t\t\t\t\tattributes.push(i + \"='\" + text + \"'\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tattributes.push(\" \");\r\n\t\t\treturn attributes.join(\" \");\r\n\t\t},\r\n\t\tsetAttributes: function(div, values){\r\n\t\t\tfor(var i in values){\r\n\t\t\t\tdiv.setAttribute(i, stripHTMLLite(values[i]));\r\n\t\t\t}\r\n\t\t\treturn div;\r\n\t\t},\r\n\r\n\t\tlabelAttr: function(div, content){\r\n\t\t\treturn this.setAttributes(div, {\"aria-label\": content});\r\n\t\t},\r\n\t\tlabel: function(label){\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": label});\r\n\t\t},\r\n\r\n\t\t// day/week/units\r\n\r\n\t\thourScaleAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\r\n\t\t},\r\n\t\tmonthCellAttr: function(div, date){\r\n\t\t\tthis.labelAttr(div, scheduler.templates.day_date(date));\r\n\t\t},\r\n\r\n\t\tnavBarDateAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\t\t},\r\n\t\tdayHeaderAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\t\t},\r\n\r\n\t\tdayColumnAttr: function(div, date){\r\n\t\t\tthis.dayHeaderAttr(div, scheduler.templates.day_date(date));\r\n\t\t},\r\n\r\n\t\theaderButtonsAttributes: function(div, label){\r\n\t\t\treturn this.setAttributes(div, {\"role\":\"button\", \"aria-label\":label});\r\n\t\t},\r\n\r\n\t\theaderToggleState: function(div, isActive){\r\n\t\t\treturn this.setAttributes(div, {\"aria-pressed\": isActive ? \"true\" : \"false\"});\r\n\t\t},\r\n\r\n\r\n\t\tgetHeaderCellAttr:function(dateString){\r\n\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": dateString});\r\n\t\t},\r\n\r\n\r\n\t\teventAttr: function(event, div){\r\n\t\t\tthis._eventCommonAttr(event, div);\r\n\t\t},\r\n\r\n\r\n\t\t_eventCommonAttr: function(event, div){\r\n\t\t\tdiv.setAttribute(\"aria-label\", stripHTMLLite(scheduler.templates.event_text(event.start_date, event.end_date, event)));\r\n\r\n\t\t\tif(scheduler.config.readonly){\r\n\t\t\t\tdiv.setAttribute(\"aria-readonly\", true);\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif(event.$dataprocessor_class){\r\n\t\t\t\tdiv.setAttribute(\"aria-busy\", true);\r\n\t\t\t}\r\n\r\n\r\n\t\t\tdiv.setAttribute(\"aria-selected\",\r\n\t\t\t\t(scheduler.getState().select_id == event.id) ? \"true\" : \"false\");\r\n\t\t},\r\n\r\n\t\tsetEventBarAttr: function(event, div){\r\n\t\t\tthis._eventCommonAttr(event, div);\r\n\t\t},\r\n\r\n\t\t_getAttributes: function(attributeSetter, arg){\r\n\t\t\tvar result = {\r\n\t\t\t\tsetAttribute:function(name, value){\r\n\t\t\t\t\tthis[name] = value;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\tattributeSetter.apply(this, [arg, result]);\r\n\t\t\treturn result;\r\n\r\n\t\t},\r\n\r\n\t\teventBarAttrString: function(event){\r\n\t\t\treturn this.getAttributeString(this._getAttributes(this.setEventBarAttr, event));\r\n\t\t},\r\n\r\n\r\n\r\n\t\tagendaHeadAttrString :function(){\r\n\t\t\treturn this.getAttributeString({role: \"row\"});\r\n\t\t},\r\n\t\tagendaHeadDateString :function(label){\r\n\t\t\treturn this.getAttributeString({role: \"columnheader\", \"aria-label\": label});\r\n\t\t},\r\n\t\tagendaHeadDescriptionString :function(label){\r\n\t\t\treturn this.agendaHeadDateString(label);\r\n\t\t},\r\n\t\tagendaDataAttrString: function(){\r\n\t\t\treturn this.getAttributeString({role: \"grid\"});\r\n\t\t},\r\n\t\tagendaEventAttrString: function(event){\r\n\t\t\tvar attrs = this._getAttributes(this._eventCommonAttr, event);\r\n\r\n\t\t\tattrs[\"role\"] = \"row\";\r\n\r\n\t\t\treturn this.getAttributeString(attrs);\r\n\r\n\t\t},\r\n\t\tagendaDetailsBtnString: function(){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels.icon_details});\r\n\t\t},\r\n\r\n\r\n\t\tgridAttrString: function(){\r\n\t\t\treturn this.getAttributeString({role: \"grid\"});\r\n\t\t},\r\n\r\n\t\tgridRowAttrString: function(event){\r\n\t\t\treturn this.agendaEventAttrString(event);\r\n\t\t},\r\n\r\n\t\tgridCellAttrString: function(event, column, value){\r\n\t\t\treturn this.getAttributeString({\"role\":\"gridcell\", \"aria-label\": [\r\n\t\t\t\t(column.label === undefined ? column.id : column.label),\r\n\t\t\t\t\": \",\r\n\t\t\t\tvalue\r\n\t\t\t]});\r\n\t\t},\r\n\r\n\t\tmapAttrString: function(){\r\n\t\t\treturn this.gridAttrString();\r\n\t\t},\r\n\t\tmapRowAttrString: function(event){\r\n\t\t\treturn this.gridRowAttrString(event);\r\n\t\t},\r\n\t\tmapDetailsBtnString: function(){\r\n\t\t\treturn this.agendaDetailsBtnString();\r\n\t\t},\r\n\r\n\t\tminicalHeader: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"id\":headerId+\"\",\r\n\t\t\t\t\"aria-live\":\"assertice\",\r\n\t\t\t\t\"aria-atomic\":\"true\"\r\n\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalGrid: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"aria-labelledby\":headerId+\"\",\r\n\t\t\t\t\"role\":\"grid\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalRow: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"row\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalDayCell: function(div, date){\r\n\t\t\tvar selected = (date.valueOf() < scheduler._max_date.valueOf() && date.valueOf() >= scheduler._min_date.valueOf());\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"gridcell\",\r\n\t\t\t\t\"aria-label\": scheduler.templates.day_date(date),\r\n\t\t\t\t\"aria-selected\": selected ? \"true\" : \"false\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalHeadCell: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"columnheader\"\r\n\t\t\t});\r\n\t\t},\r\n\r\n\r\n\t\tweekAgendaDayCell: function(div, date){\r\n\t\t\tvar header = div.querySelector(\".dhx_wa_scale_bar\");\r\n\t\t\tvar content = div.querySelector(\".dhx_wa_day_data\");\r\n\t\t\tvar headerId = scheduler.uid() + \"\";\r\n\t\t\tthis.setAttributes(header, { \"id\": headerId});\r\n\t\t\tthis.setAttributes(content, { \"aria-labelledby\": headerId});\r\n\r\n\t\t},\r\n\t\tweekAgendaEvent: function(div, event){\r\n\t\t\tthis.eventAttr(event, div);\r\n\t\t},\r\n\r\n\t\tlightboxHiddenAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t},\r\n\r\n\t\tlightboxVisibleAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"false\");\r\n\t\t},\r\n\r\n\t\tlightboxSectionButtonAttrString: function(label){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":label, \"tabindex\":\"0\"});\r\n\t\t},\r\n\r\n\t\tyearHeader: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"id\":headerId+\"\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tyearGrid: function(div, headerId){\r\n\t\t\tthis.minicalGrid(div, headerId);\r\n\t\t},\r\n\t\tyearHeadCell: function(div){\r\n\t\t\treturn this.minicalHeadCell(div);\r\n\t\t},\r\n\t\tyearRow: function(div){\r\n\t\t\treturn this.minicalRow(div);\r\n\t\t},\r\n\t\tyearDayCell: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"gridcell\"\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\tlightboxAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t\tdiv.firstChild.setAttribute(\"role\", \"heading\");\r\n\t\t},\r\n\r\n\t\tlightboxButtonAttrString:function(buttonName){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels[buttonName], \"tabindex\":\"0\"});\r\n\t\t},\r\n\t\teventMenuAttrString: function(iconName){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels[iconName]});\r\n\t\t},\r\n\t\tlightboxHeader: function(div, headerText){\r\n\t\t\tdiv.setAttribute(\"aria-label\", headerText);\r\n\t\t},\r\n\r\n\t\tlightboxSelectAttrString: function(time_option){\r\n\t\t\tvar label = \"\";\r\n\r\n\t\t\tswitch (time_option) {\r\n\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.year;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%m\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.month;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%d\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.day;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%H:%i\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.hour + \" \" + scheduler.locale.labels.minute;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": label});\r\n\t\t},\r\n\r\n\r\n\t\tmessageButtonAttrString: function(buttonLabel){\r\n\t\t\treturn \"tabindex='0' role='button' aria-label='\"+buttonLabel+\"'\";\r\n\t\t},\r\n\r\n\t\tmessageInfoAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"alert\");\r\n\t\t\t//div.setAttribute(\"tabindex\", \"-1\");\r\n\t\t},\r\n\r\n\t\tmessageModalAttr: function(div, uid){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t\tif(uid){\r\n\t\t\t\tdiv.setAttribute(\"aria-labelledby\", uid);\r\n\t\t\t}\r\n\r\n\t\t\t//\tdiv.setAttribute(\"tabindex\", \"-1\");\r\n\t\t},\r\n\r\n\t\tquickInfoAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t},\r\n\r\n\t\tquickInfoHeaderAttrString: function(){\r\n\t\t\treturn \" role='heading' \";\r\n\t\t},\r\n\r\n\t\tquickInfoHeader: function(div, header){\r\n\t\t\tdiv.setAttribute(\"aria-label\", header);\r\n\t\t},\r\n\r\n\t\tquickInfoButtonAttrString: function(label){\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"role\":\"button\", \"aria-label\":label, \"tabindex\":\"0\"});\r\n\t\t},\r\n\r\n\t\ttooltipAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"tooltip\");\r\n\t\t},\r\n\r\n\t\ttooltipVisibleAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"false\");\r\n\t\t},\r\n\r\n\t\ttooltipHiddenAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t}\r\n\t};\r\n\r\n\tfunction isDisabled(){\r\n\t\treturn !scheduler.config.wai_aria_attributes;\r\n\t}\r\n\r\n\tfor(var i in scheduler._waiAria){\r\n\t\tscheduler._waiAria[i] = (function(payload){\r\n\t\t\treturn function(){\r\n\t\t\t\tif(isDisabled()){\r\n\t\t\t\t\treturn \" \";\r\n\t\t\t\t}\r\n\t\t\t\treturn payload.apply(this, arguments);\r\n\t\t\t};\r\n\t\t})(scheduler._waiAria[i]);\r\n\t}\r\n\r\n\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\treturn function assert(check, message){\r\n\t\tif (!check){\r\n\t\t\tif(scheduler.config.show_errors && scheduler.callEvent(\"onError\",[message]) !== false) {\r\n\t\t\t\tif (scheduler.message) {\r\n\t\t\t\t\tscheduler.message({type: \"error\", text: message, expire: -1});\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// eslint-disable-next-line\r\n\t\t\t\t\tconsole.log(message);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// eslint-disable-next-line no-debugger\r\n\t\t\t\tdebugger;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n}","export default function extend(scheduler) {\r\n\r\nif (window.jQuery){\r\n\r\n(function( $ ){\r\n\tvar counter = 0;\r\n\tvar methods = [];\r\n\t$.fn.dhx_scheduler = function(config){\r\n\t\tif (typeof(config) === 'string') {\r\n\t\t\tif (methods[config] ) {\r\n\t\t\t\treturn methods[config].apply(this, []);\r\n\t\t\t}else {\r\n\t\t\t\t$.error('Method ' + config + ' does not exist on jQuery.dhx_scheduler');\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvar views = [];\r\n\t\t\tthis.each(function() {\r\n\t\t\t\tif (this && this.getAttribute){\r\n\t\t\t\t\tif (!this.getAttribute(\"dhxscheduler\")){\r\n\t\t\t\t\t\tvar name = \"scheduler\";\r\n\t\t\t\t\t\tif (counter){\r\n\t\t\t\t\t\t\tname = \"scheduler\" + (counter+1);\r\n\t\t\t\t\t\t\twindow[name] = Scheduler.getSchedulerInstance();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tvar comp = window[name];\r\n\r\n\t\t\t\t\t\tthis.setAttribute(\"dhxscheduler\", name);\r\n\t\t\t\t\t\tfor (var key in config)\r\n\t\t\t\t\t\t\tif (key!=\"data\")\r\n\t\t\t\t\t\t\t\tcomp.config[key] = config[key];\r\n\r\n\t\t\t\t\t\tif (!this.getElementsByTagName(\"div\").length){\r\n\t\t\t\t\t\t\tthis.innerHTML = '
';\r\n\t\t\t\t\t\t\tthis.className += \" dhx_cal_container\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcomp.init(this, comp.config.date, comp.config.mode);\r\n\t\t\t\t\t\tif (config.data)\r\n\t\t\t\t\t\t\tcomp.parse(config.data);\r\n\r\n\t\t\t\t\t\tviews.push(comp);\r\n\t\t\t\t\t\tcounter++;\r\n\t\t\t\t\t} else\r\n\t\t\t\t\t\tviews.push(window[this.getAttribute(\"dhxscheduler\")]);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif (views.length === 1) return views[0];\r\n\t\t\treturn views;\r\n\t\t}\r\n\t};\r\n\r\n\r\n\r\n\r\n})(window.jQuery);\r\n\r\n}\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler.destructor = function(){\r\n\tscheduler.callEvent(\"onDestroy\", []);\r\n\tthis.clearAll();\r\n\r\n\tif(this.$container){\r\n\t\t// FIXME: clear container or remove container\r\n\t\tthis.$container.innerHTML = \"\";\r\n\t\t// scheduler.$domHelpers.remove(this.$container);\r\n\t}\r\n\r\n\tif(this._eventRemoveAll){\r\n\t\tthis._eventRemoveAll();\r\n\t}\r\n\r\n\tif(this.resetLightbox){\r\n\t\tthis.resetLightbox();\r\n\t}\r\n\r\n\tif(this._dp && this._dp.destructor){\r\n\t\tthis._dp.destructor();\r\n\t}\r\n\r\n\t// detachAllEvents should be called last, because in components may be attached events\r\n\tthis.detachAllEvents();\r\n\r\n\tfor(var i in this){\r\n\t\tif(i.indexOf(\"$\") === 0){\r\n\t\t\tdelete this[i];\r\n\t\t}\r\n\t}\r\n\tscheduler.$destroyed = true;\r\n};\r\n\r\n}","import serialize from \"../common/url_serialize.js\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler.Promise = window.Promise; \r\n\r\nfunction createConfig(method, args) {\r\n\tvar result = {\r\n\t\tmethod: method\r\n\t};\r\n\r\n\tif (args.length === 0) {\r\n\t\tthrow new Error(\"Arguments list of query is wrong.\");\r\n\t}\r\n\tif (args.length === 1) {\r\n\t\tif (typeof args[0] === \"string\") {\r\n\t\t\tresult.url = args[0];\r\n\t\t\tresult.async = true;\r\n\t\t} else {\r\n\t\t\tresult.url = args[0].url;\r\n\t\t\tresult.async = (args[0].async || true);\r\n\t\t\tresult.callback = args[0].callback;\r\n\t\t\tresult.headers = args[0].headers;\r\n\t\t}\r\n\t\tif (method === \"POST\" || \"PUT\") {\r\n\t\t\tif (args[0].data) {\r\n\t\t\t\tif (typeof args[0].data !== \"string\") {\r\n\t\t\t\t\tresult.data = serialize(args[0].data);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult.data = args[0].data;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tresult.data = \"\";\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n\tresult.url = args[0];\r\n\tswitch(method) {\r\n\t\tcase \"GET\":\r\n\t\tcase \"DELETE\":\r\n\t\t\tresult.callback = args[1];\r\n\t\t\tresult.headers = args[2];\r\n\t\tbreak;\r\n\t\tcase \"POST\":\r\n\t\tcase \"PUT\":\r\n\t\t\tif (args[1]) {\r\n\t\t\t\tif (typeof args[1] !== \"string\") {\r\n\t\t\t\t\tresult.data = serialize(args[1]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult.data = args[1];\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tresult.data = \"\";\r\n\t\t\t}\r\n\t\t\tresult.callback = args[2];\r\n\t\t\tresult.headers = args[3];\r\n\t\tbreak;\r\n\t}\r\n\treturn result;\r\n}\r\nscheduler.ajax = {\r\n\t// if false - dhxr param will added to prevent caching on client side (default),\r\n\t// if true - do not add extra params\r\n\tcache: true,\r\n\r\n\t// default method for load/loadStruct, post/get allowed\r\n\tmethod: \"get\",\r\n\r\n\tserializeRequestParams: serialize,\r\n\tparse: function(data) {\r\n\t\tif (typeof data !== \"string\") return data;\r\n\r\n\t\tvar obj;\r\n\t\tdata = data.replace(/^[\\s]+/,\"\");\r\n\t\tif (typeof DOMParser !== \"undefined\" && !scheduler.$env.isIE) { // ff,ie9\r\n\t\t\tobj = (new DOMParser()).parseFromString(data, \"text/xml\");\r\n\t\t} else if (typeof window.ActiveXObject !== \"undefined\") {\r\n\t\t\tobj = new window.ActiveXObject(\"Microsoft.XMLDOM\");\r\n\t\t\tobj.async = \"false\";\r\n\t\t\tobj.loadXML(data);\r\n\t\t}\r\n\t\treturn obj;\r\n\t},\r\n\txmltop: function(tagname, xhr, obj) {\r\n\t\tif (typeof xhr.status == \"undefined\" || xhr.status < 400) {\r\n\t\t\tvar xml = (!xhr.responseXML) ? this.parse(xhr.responseText || xhr) : (xhr.responseXML || xhr);\r\n\t\t\tif (xml && xml.documentElement !== null && !xml.getElementsByTagName(\"parsererror\").length) {\r\n\t\t\t\treturn xml.getElementsByTagName(tagname)[0];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (obj !== -1) scheduler.callEvent(\"onLoadXMLError\",[\"Incorrect XML\", arguments[1], obj]);\r\n\t\treturn document.createElement(\"DIV\");\r\n\t},\r\n\txpath: function(xpathExp, docObj) {\r\n\t\tif (!docObj.nodeName) docObj = docObj.responseXML || docObj;\r\n\t\tif (scheduler.$env.isIE) {\r\n\t\t\treturn docObj.selectNodes(xpathExp)||[];\r\n\t\t} else {\r\n\t\t\tvar rows = [];\r\n\t\t\tvar first;\r\n\t\t\tvar col = (docObj.ownerDocument||docObj).evaluate(xpathExp, docObj, null, XPathResult.ANY_TYPE, null);\r\n\r\n\t\t\twhile (true){\r\n\t\t\t\tfirst = col.iterateNext();\r\n\t\t\t\tif(first){\r\n\t\t\t\t\trows.push(first);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn rows;\r\n\t\t}\r\n\t},\r\n\tquery: function(config) {\r\n\t\treturn this._call(\r\n\t\t\t(config.method || \"GET\"),\r\n\t\t\tconfig.url,\r\n\t\t\tconfig.data || \"\",\r\n\t\t\t(config.async || true),\r\n\t\t\tconfig.callback,\r\n\t\t\tconfig.headers\r\n\t\t);\r\n\t},\r\n\tget: function(url, onLoad, headers) {\r\n\t\tvar config = createConfig(\"GET\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tgetSync: function(url, headers) {\r\n\t\tvar config = createConfig(\"GET\", arguments);\r\n\t\tconfig.async = false;\r\n\t\treturn this.query(config);\r\n\t},\r\n\tput: function(url, postData, onLoad, headers) {\r\n\t\tvar config = createConfig(\"PUT\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tdel: function(url, onLoad, headers) {\r\n\t\t/**\r\n\t\t * https://tools.ietf.org/html/rfc7231#section-4.3.5\r\n\t\t * A payload within a DELETE request message has no defined semantics;\r\n\t\t * sending a payload body on a DELETE request might cause some existing\r\n\t\t * implementations to reject the request.\r\n\t\t */\r\n\t\tvar config = createConfig(\"DELETE\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tpost: function(url, postData, onLoad, headers) {\r\n\t\tif (arguments.length == 1) {\r\n\t\t\tpostData = \"\";\r\n\t\t} else if (arguments.length == 2 && typeof(postData) == \"function\") {\r\n\t\t\tonLoad = postData;\r\n\t\t\tpostData = \"\";\r\n\t\t}\r\n\t\tvar config = createConfig(\"POST\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tpostSync: function(url, postData, headers) {\r\n\t\tpostData = (postData === null ? \"\" : String(postData));\r\n\r\n\t\tvar config = createConfig(\"POST\", arguments);\r\n\t\tconfig.async = false;\r\n\t\treturn this.query(config);\r\n\t},\r\n\t_call: function(method, url, postData, async, onLoad, headers) {\r\n\t\treturn new scheduler.Promise((function(resolve, reject) {\r\n\t\t\tvar t = (typeof XMLHttpRequest !== undefined && !scheduler.$env.isIE ? new XMLHttpRequest() : new window.ActiveXObject(\"Microsoft.XMLHTTP\"));\r\n\t\t\tvar isQt = (navigator.userAgent.match(/AppleWebKit/) !== null && navigator.userAgent.match(/Qt/) !== null && navigator.userAgent.match(/Safari/) !== null);\r\n\r\n\t\t\tif (!!async) {\r\n\t\t\t\tt.addEventListener(\"readystatechange\", function() {\r\n\t\t\t\t\tif ((t.readyState == 4) || (isQt && t.readyState == 3)) { // what for long response and status 404?\r\n\t\t\t\t\t\tif (t.status != 200 || t.responseText === \"\")\r\n\t\t\t\t\t\t\tif (!scheduler.callEvent(\"onAjaxError\", [t])) return;\r\n\r\n\t\t\t\t\t\tsetTimeout(function() {\r\n\t\t\t\t\t\t\tif (typeof(onLoad) == \"function\") {\r\n\t\t\t\t\t\t\t\tonLoad.apply(window, [{xmlDoc:t, filePath:url}]); // dhtmlx-compat, response.xmlDoc.responseXML/responseText\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tresolve(t);\r\n\t\t\t\t\t\t\tif (typeof(onLoad) == \"function\") {\r\n\t\t\t\t\t\t\t\tonLoad = null;\r\n\t\t\t\t\t\t\t\tt = null;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}, 0);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (method == \"GET\" && !this.cache) {\r\n\t\t\t\turl += (url.indexOf(\"?\")>=0?\"&\":\"?\")+\"dhxr\"+new Date().getTime()+\"=1\";\r\n\t\t\t}\r\n\r\n\t\t\tt.open(method, url, async);\r\n\r\n\t\t\tif (headers){\r\n\t\t\t\tfor (var key in headers)\r\n\t\t\t\t\tt.setRequestHeader(key, headers[key]);\r\n\t\t\t} else if (method.toUpperCase() == \"POST\" || method == \"PUT\" || method == \"DELETE\") {\r\n\t\t\t\tt.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\r\n\t\t\t} else if (method == \"GET\") {\r\n\t\t\t\tpostData = null;\r\n\t\t\t}\r\n\r\n\t\t\tt.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\r\n\r\n\t\t\tt.send(postData);\r\n\r\n\t\t\tif (!async) return {xmlDoc:t, filePath:url}; // dhtmlx-compat, response.xmlDoc.responseXML/responseText\r\n\t\t}.bind(this)));\r\n\t},\r\n\turlSeparator: function(str){\r\n\t\tif (str.indexOf(\"?\") != -1)\r\n\t\t\treturn \"&\";\r\n\t\telse\r\n\t\t\treturn \"?\";\r\n\t}\r\n};\r\n\r\nscheduler.$ajax = scheduler.ajax; // for old\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n/*\r\n%e\tDay of the month without leading zeros (01..31)\r\n%d\tDay of the month, 2 digits with leading zeros (01..31)\r\n%j\tDay of the year, 3 digits with leading zeros (001..366)\r\n%a\tA textual representation of a day, two letters\r\n%W\tA full textual representation of the day of the week\r\n\r\n%c\tNumeric representation of a month, without leading zeros (0..12)\r\n%m\tNumeric representation of a month, with leading zeros (00..12)\r\n%b\tA short textual representation of a month, three letters (Jan..Dec)\r\n%M\tA full textual representation of a month, such as January or March (January..December)\r\n\r\n%y\tA two digit representation of a year (93..03)\r\n%Y\tA full numeric representation of a year, 4 digits (1993..03)\r\n*/\r\n\r\nscheduler.config={\r\n\tdefault_date: \"%j %M %Y\",\r\n\tmonth_date: \"%F %Y\",\r\n\tload_date: \"%Y-%m-%d\",\r\n\tweek_date: \"%l\",\r\n\tday_date: \"%D %j\",\r\n\thour_date: \"%H:%i\",\r\n\tmonth_day: \"%d\",\r\n\t//xml_date: \"%m/%d/%Y %H:%i\",\r\n\tdate_format: \"%Y-%m-%d %H:%i\",\r\n\tapi_date: \"%d-%m-%Y %H:%i\",\r\n\tparse_exact_format: false,\r\n\tpreserve_length:true,\r\n\ttime_step: 5,\r\n\tdisplayed_event_color: \"#ff4a4a\",\r\n\tdisplayed_event_text_color: \"#ffef80\",\r\n\twide_form: 0,\r\n\tday_column_padding: 8,\r\n\tuse_select_menu_space: true,\r\n\tfix_tab_position: true,\r\n\tstart_on_monday: true,\r\n\tfirst_hour: 0,\r\n\tlast_hour: 24,\r\n\treadonly: false,\r\n\tdrag_resize: true,\r\n\tdrag_move: true,\r\n\tdrag_create: true,\r\n\tdrag_event_body: true,\r\n\tdblclick_create: true,\r\n\tdetails_on_dblclick: true,\r\n\tedit_on_create: true,\r\n\tdetails_on_create: true,\r\n\theader: null,\r\n\thour_size_px: 44,\r\n\tresize_month_events:false,\r\n\tresize_month_timed:false,\r\n\tresponsive_lightbox: false,\r\n\tseparate_short_events: true,\r\n\trtl:false,\r\n\r\n\tcascade_event_display: false,\r\n\tcascade_event_count: 4,\r\n\tcascade_event_margin: 30,\r\n\r\n\tmulti_day:true,\r\n\tmulti_day_height_limit: 200,\r\n\r\n\tdrag_lightbox: true,\r\n\tpreserve_scroll: true,\r\n\tselect: true,\r\n\tundo_deleted: true,\r\n\tserver_utc: false,\r\n\ttouch:true,\r\n\ttouch_tip:true,\r\n\ttouch_drag:500,\r\n\ttouch_swipe_dates: false,\r\n\tquick_info_detached:true,\r\n\r\n\tpositive_closing: false,\r\n\t//header_datepicker: true,\r\n\tdrag_highlight: true,\r\n\tlimit_drag_out: false,\r\n\ticons_edit: [\"icon_save\", \"icon_cancel\"],\r\n\ticons_select: [\"icon_details\", \"icon_edit\", \"icon_delete\"],\r\n\tbuttons_left: [\"dhx_save_btn\", \"dhx_cancel_btn\"],\r\n\tbuttons_right: [\"dhx_delete_btn\"],\r\n\tlightbox: {\r\n\t\tsections: [\r\n\t\t\t{name: \"description\", map_to: \"text\", type: \"textarea\", focus: true},\r\n\t\t\t{name: \"time\", height: 72, type: \"time\", map_to: \"auto\"}\r\n\t\t]\r\n\t},\r\n\thighlight_displayed_event: true,\r\n\tleft_border: false,\r\n\r\n\tajax_error: \"alert\",//\"ignore\"|\"console\"\r\n\tdelay_render: 0,\r\n\ttimeline_swap_resize: true,\r\n\twai_aria_attributes: true,\r\n\twai_aria_application_role: true,\r\n\r\n\tcsp: \"auto\",\r\n\tevent_attribute: \"data-event-id\",\r\n\tshow_errors: true\r\n};\r\n\r\nscheduler.config.buttons_left.$initial = scheduler.config.buttons_left.join();\r\nscheduler.config.buttons_right.$initial = scheduler.config.buttons_right.join();\r\n\r\nscheduler._helpers = {\r\n\tparseDate: function parseDate(date) {\r\n\t\tvar parse = scheduler.templates.xml_date || scheduler.templates.parse_date;\r\n\t\treturn parse(date);\r\n\t},\r\n\tformatDate: function formatDate(date) {\r\n\t\tvar format = scheduler.templates.xml_format || scheduler.templates.format_date;\r\n\t\treturn format(date);\r\n\t}\r\n};\r\n\r\nscheduler.templates={};\r\nscheduler.init_templates=function(){\r\n\r\n\r\n\r\n\tvar d=scheduler.date.date_to_str;\r\n\tvar c=scheduler.config;\r\n\tvar f = function(a,b){\r\n\t\tfor (var c in b)\r\n\t\t\tif (!a[c]) a[c]=b[c];\r\n\t};\r\n\tf(scheduler.templates,{\r\n\t\tday_date:d(c.default_date),\r\n\t\tmonth_date:d(c.month_date),\r\n\t\tweek_date:function(d1,d2){\r\n\t\t\tif(c.rtl) {\r\n\t\t\t\treturn scheduler.templates.day_date(scheduler.date.add(d2,-1,\"day\"))+\" – \"+scheduler.templates.day_date(d1);\r\n\t\t\t} \r\n\t\t\treturn scheduler.templates.day_date(d1)+\" – \"+scheduler.templates.day_date(scheduler.date.add(d2,-1,\"day\"));\r\n\t\t},\r\n\t\tday_scale_date:d(c.default_date),\r\n\t\ttime_slot_text: function(date){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\ttime_slot_class: function(date){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\r\n\t\tmonth_scale_date:d(c.week_date),\r\n\t\tweek_scale_date:d(c.day_date),\r\n\t\thour_scale:d(c.hour_date),\r\n\t\ttime_picker:d(c.hour_date),\r\n\t\tevent_date:d(c.hour_date),\r\n\t\tmonth_day:d(c.month_day),\r\n\r\n\t\tload_format: d(c.load_date),\r\n\t//\txml_date:scheduler.date.str_to_date(c.xml_date,c.server_utc),\r\n\t//\txml_format:d(c.date_format,c.server_utc),\r\n\t\tformat_date: d(c.date_format, c.server_utc),\r\n\t\tparse_date:scheduler.date.str_to_date(c.date_format,c.server_utc),\r\n\t\tapi_date:scheduler.date.str_to_date(c.api_date, false, false),\r\n\t\tevent_header:function(start,end,ev){\r\n\r\n\t\t\tif(ev._mode === \"small\" || ev._mode === \"smallest\"){\r\n\t\t\t\treturn scheduler.templates.event_date(start);\r\n\t\t\t}else{\r\n\t\t\t\treturn scheduler.templates.event_date(start)+\" - \"+scheduler.templates.event_date(end);\r\n\t\t\t}\r\n\t\t},\r\n\t\tevent_text:function(start,end,ev){\r\n\t\t\treturn ev.text;\r\n\t\t},\r\n\t\tevent_class:function(start,end,ev){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tmonth_date_class:function(d){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tweek_date_class:function(d){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tevent_bar_date:function(start,end,ev) {\r\n\t\t\treturn scheduler.templates.event_date(start);\r\n\t\t},\r\n\t\tevent_bar_text:function(start,end,ev){\r\n\t\t\treturn ev.text;\r\n\t\t},\r\n\t\tmonth_events_link : function(date, count){\r\n\t\t\treturn \"View more(\"+count+\" events)\";\r\n\t\t},\r\n\t\tdrag_marker_class : function(start, end, event){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tdrag_marker_content : function(start, end, event){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\t/* Could be redifined */\r\n\t\ttooltip_date_format: scheduler.date.date_to_str(\"%Y-%m-%d %H:%i\"),\r\n\t\ttooltip_text: function(start, end, event) {\r\n\t\t\treturn \"Event: \" + event.text + \"
Start date: \" + scheduler.templates.tooltip_date_format(start) + \"
End date: \" + scheduler.templates.tooltip_date_format(end);\r\n\t\t},\r\n\r\n\t\tcalendar_month: d(\"%F %Y\"),\r\n\t\tcalendar_scale_date: d(\"%D\"),\r\n\t\tcalendar_date: d(\"%d\"),\r\n\t\tcalendar_time: d(\"%d-%m-%Y\")\r\n\r\n\t});\r\n\tthis.callEvent(\"onTemplatesReady\",[]);\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler._events = {};\r\nscheduler.clearAll = function() {\r\n\tthis._events = {};\r\n\tthis._loaded = {};\r\n\r\n\tthis._edit_id = null;\r\n\tthis._select_id = null;\r\n\tthis._drag_id = null;\r\n\tthis._drag_mode = null;\r\n\tthis._drag_pos = null;\r\n\tthis._new_event = null;\r\n\r\n\tthis.clear_view();\r\n\tthis.callEvent(\"onClearAll\", []);\r\n};\r\nscheduler.addEvent = function(start_date, end_date, text, id, extra_data) {\r\n\tif (!arguments.length)\r\n\t\treturn this.addEventNow();\r\n\tvar ev = start_date;\r\n\tif (arguments.length != 1) {\r\n\t\tev = extra_data || {};\r\n\t\tev.start_date = start_date;\r\n\t\tev.end_date = end_date;\r\n\t\tev.text = text;\r\n\t\tev.id = id;\r\n\t}\r\n\tev.id = ev.id || scheduler.uid();\r\n\tev.text = ev.text || \"\";\r\n\r\n\tif (typeof ev.start_date == \"string\") ev.start_date = this.templates.api_date(ev.start_date);\r\n\tif (typeof ev.end_date == \"string\") ev.end_date = this.templates.api_date(ev.end_date);\r\n\tvar d = (this.config.event_duration || this.config.time_step) * 60000;\r\n\tif (ev.start_date.valueOf() == ev.end_date.valueOf())\r\n\t\tev.end_date.setTime(ev.end_date.valueOf() + d);\r\n\r\n\tev.start_date.setMilliseconds(0);\r\n\tev.end_date.setMilliseconds(0);\r\n\r\n\tev._timed = this.isOneDayEvent(ev);\r\n\r\n\tvar is_new = !this._events[ev.id];\r\n\tthis._events[ev.id] = ev;\r\n\tthis.event_updated(ev);\r\n\tif (!this._loading)\r\n\t\tthis.callEvent(is_new ? \"onEventAdded\" : \"onEventChanged\", [ev.id, ev]);\r\n\treturn ev.id;\r\n};\r\nscheduler.deleteEvent = function(id, silent) {\r\n\tvar ev = this._events[id];\r\n\tif (!silent && (!this.callEvent(\"onBeforeEventDelete\", [id, ev]) || !this.callEvent(\"onConfirmedBeforeEventDelete\", [id, ev])))\r\n\t\treturn;\r\n\tif (ev) {\r\n\t\tif(scheduler.getState().select_id == id){\r\n\t\t\tscheduler.unselect();\r\n\t\t}\r\n\t\tdelete this._events[id];\r\n\t\tthis.event_updated(ev);\r\n\r\n\t\tif(this._drag_id == ev.id){\r\n\t\t\tthis._drag_id = null;\r\n\t\t\tthis._drag_mode=null;\r\n\t\t\tthis._drag_pos=null;\r\n\t\t}\r\n\t}\r\n\r\n\tthis.callEvent(\"onEventDeleted\", [id, ev]);\r\n};\r\nscheduler.getEvent = function(id) {\r\n\treturn this._events[id];\r\n};\r\nscheduler.setEvent = function(id, hash) {\r\n\tif(!hash.id)\r\n\t\thash.id = id;\r\n\r\n\tthis._events[id] = hash;\r\n};\r\nscheduler.for_rendered = function(id, method) {\r\n\tfor (var i = this._rendered.length - 1; i >= 0; i--)\r\n\t\tif (this._rendered[i].getAttribute(this.config.event_attribute) == id)\r\n\t\t\tmethod(this._rendered[i], i);\r\n};\r\nscheduler.changeEventId = function(id, new_id) {\r\n\tif (id == new_id) return;\r\n\tvar ev = this._events[id];\r\n\tif (ev) {\r\n\t\tev.id = new_id;\r\n\t\tthis._events[new_id] = ev;\r\n\t\tdelete this._events[id];\r\n\t}\r\n\tthis.for_rendered(id, function(r) {\r\n\t\tr.setAttribute(\"event_id\", new_id); // for backward compatibility\r\n\t\tr.setAttribute(scheduler.config.event_attribute, new_id);\r\n\t});\r\n\tif (this._select_id == id) this._select_id = new_id;\r\n\tif (this._edit_id == id) this._edit_id = new_id;\r\n\t//if (this._drag_id==id) this._drag_id=new_id;\r\n\tthis.callEvent(\"onEventIdChange\", [id, new_id]);\r\n};\r\n\r\n(function() {\r\n\tvar attrs = [\"text\", \"Text\", \"start_date\", \"StartDate\", \"end_date\", \"EndDate\"];\r\n\tvar create_getter = function(name) {\r\n\t\treturn function(id) { return (scheduler.getEvent(id))[name]; };\r\n\t};\r\n\tvar create_setter = function(name) {\r\n\t\treturn function(id, value) {\r\n\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\tev[name] = value;\r\n\t\t\tev._changed = true;\r\n\t\t\tev._timed = this.isOneDayEvent(ev);\r\n\t\t\tscheduler.event_updated(ev, true);\r\n\t\t};\r\n\t};\r\n\tfor (var i = 0; i < attrs.length; i += 2) {\r\n\t\tscheduler[\"getEvent\" + attrs[i + 1]] = create_getter(attrs[i]);\r\n\t\tscheduler[\"setEvent\" + attrs[i + 1]] = create_setter(attrs[i]);\r\n\t}\r\n})();\r\n\r\nscheduler.event_updated = function(ev, force) {\r\n\tif (this.is_visible_events(ev))\r\n\t\tthis.render_view_data();\r\n\telse\r\n\t\tthis.clear_event(ev.id);\r\n};\r\nscheduler.is_visible_events = function(ev) {\r\n\tif(!this._min_date || !this._max_date){\r\n\t\treturn false;\r\n\t}\r\n\r\n\t//if in displayed dates\r\n\tvar in_visible_range = (ev.start_date.valueOf() < this._max_date.valueOf() && this._min_date.valueOf() < ev.end_date.valueOf());\r\n\r\n\tif(in_visible_range){\r\n\r\n\t\t//end dates are not between last/first hours\r\n\t\tvar evFirstHour = ev.start_date.getHours(),\r\n\t\t\tevLastHour = ev.end_date.getHours() + (ev.end_date.getMinutes()/60),\r\n\t\t\tlastHour = this.config.last_hour,\r\n\t\t\tfirstHour = this.config.first_hour;\r\n\r\n\t\tvar end_dates_visible = (this._table_view || !((evLastHour > lastHour || evLastHour <= firstHour) && (evFirstHour >= lastHour || evFirstHour < firstHour)));\r\n\r\n\t\tif(end_dates_visible){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\r\n\t\t\t//event is bigger than area hidden between last/first hours\r\n\t\t\tvar event_duration = (ev.end_date.valueOf() - ev.start_date.valueOf()) / (1000*60*60),//hours\r\n\t\t\t\thidden_duration = 24 - (this.config.last_hour - this.config.first_hour);\r\n\r\n\t\t\treturn !!((event_duration > hidden_duration) || (evFirstHour < lastHour && evLastHour > firstHour));\r\n\r\n\t\t}\r\n\t}else{\r\n\t\treturn false;\r\n\t}\r\n};\r\nscheduler.isOneDayEvent = function(ev) {\r\n\t// decrease by one ms so events that ends on midnight on the next day were still considered one day events\r\n\t// e.g. (09-02-2018 19:00 - 10-02-2018 00:00)\r\n\t// events >= 24h long are considered multiday\r\n\tvar checkEndDate = new Date(ev.end_date.valueOf() - 1);\r\n\treturn (\r\n\t\tev.start_date.getFullYear() === checkEndDate.getFullYear() &&\r\n\t\tev.start_date.getMonth() === checkEndDate.getMonth() &&\r\n\t\tev.start_date.getDate() === checkEndDate.getDate()\r\n\t) && ((ev.end_date.valueOf() - ev.start_date.valueOf()) < (1000 * 60 * 60 * 24));\r\n};\r\n\r\nscheduler.get_visible_events = function(only_timed) {\r\n\t//not the best strategy for sure\r\n\tvar stack = [];\r\n\r\n\tfor (var id in this._events)\r\n\t\tif (this.is_visible_events(this._events[id]))\r\n\t\t\tif (!only_timed || this._events[id]._timed)\r\n\t\t\t\tif (this.filter_event(id, this._events[id]))\r\n\t\t\t\t\tstack.push(this._events[id]);\r\n\r\n\treturn stack;\r\n};\r\nscheduler.filter_event = function(id, ev) {\r\n\tvar filter = this[\"filter_\" + this._mode];\r\n\treturn (filter) ? filter(id, ev) : true;\r\n};\r\nscheduler._is_main_area_event = function(ev){\r\n\treturn !!ev._timed;\r\n};\r\nscheduler.render_view_data = function(evs, hold) {\r\n\tvar full = false;\r\n\tif (!evs) {\r\n\t\tfull = true;\r\n\t\tif (this._not_render) {\r\n\t\t\tthis._render_wait = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._render_wait = false;\r\n\r\n\t\tthis.clear_view();\r\n\t\tevs = this.get_visible_events(!(this._table_view || this.config.multi_day));\r\n\t}\r\n\tfor(var i= 0, len = evs.length; i < len; i++){\r\n\t\tthis._recalculate_timed(evs[i]);\r\n\t}\r\n\r\n\tif (this.config.multi_day && !this._table_view) {\r\n\r\n\t\tvar tvs = [];\r\n\t\tvar tvd = [];\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tif (this._is_main_area_event(evs[i]))\r\n\t\t\t\ttvs.push(evs[i]);\r\n\t\t\telse\r\n\t\t\t\ttvd.push(evs[i]);\r\n\t\t}\r\n\r\n\t\tif(!this._els['dhx_multi_day']){\r\n\t\t\tvar message = scheduler._commonErrorMessages.unknownView(this._mode);\r\n\t\t\tthrow new Error(message);\r\n\t\t}\r\n\r\n\t\t// multiday events\r\n\t\tthis._rendered_location = this._els['dhx_multi_day'][0];\r\n\t\tthis._table_view = true;\r\n\t\tthis.render_data(tvd, hold);\r\n\t\tthis._table_view = false;\r\n\r\n\t\t// normal events\r\n\t\tthis._rendered_location = this._els['dhx_cal_data'][0];\r\n\t\tthis._table_view = false;\r\n\t\tthis.render_data(tvs, hold);\r\n\r\n\t} else {\r\n\t\tvar buffer = document.createDocumentFragment();\r\n\t\tvar renderedLocation = this._els['dhx_cal_data'][0];\r\n\t\tthis._rendered_location = buffer;\r\n\t\tthis.render_data(evs, hold);\r\n\t\trenderedLocation.appendChild(buffer);\r\n\t\tthis._rendered_location = renderedLocation;\r\n\r\n\t}\r\n\r\n\tif(full){\r\n\t\tthis.callEvent(\"onDataRender\", []);\r\n\t}\r\n};\r\n\r\n\r\nscheduler._view_month_day = function(e){\r\n\tvar date = scheduler.getActionData(e).date;\r\n\tif(!scheduler.callEvent(\"onViewMoreClick\", [date]))\r\n\t\treturn;\r\n\tscheduler.setCurrentView(date, \"day\");\r\n};\r\n\r\nscheduler._render_month_link = function(ev){\r\n\tvar parent = this._rendered_location;\r\n\tvar toRender = this._lame_clone(ev);\r\n\r\n\t//render links in each cell of multiday events\r\n\tfor(var d = ev._sday; d < ev._eday; d++){\r\n\r\n\t\ttoRender._sday = d;\r\n\t\ttoRender._eday = d+1;\r\n\r\n\t\tvar date = scheduler.date;\r\n\t\tvar curr = scheduler._min_date;\r\n\t\tcurr = date.add(curr, toRender._sweek, \"week\");\r\n\t\tcurr = date.add(curr, toRender._sday, \"day\");\r\n\t\tvar count = scheduler.getEvents(curr, date.add(curr, 1, \"day\")).length;\r\n\r\n\t\tvar pos = this._get_event_bar_pos(toRender);\r\n\t\tvar widt = (pos.x2 - pos.x);\r\n\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tscheduler.event(el, \"click\", function(e){scheduler._view_month_day(e);});\r\n\t\tel.className = \"dhx_month_link\";\r\n\t\tel.style.top = pos.y + \"px\";\r\n\t\tel.style.left = pos.x + \"px\";\r\n\t\tel.style.width = widt + \"px\";\r\n\t\tel.innerHTML = scheduler.templates.month_events_link(curr, count);\r\n\t\tthis._rendered.push(el);\r\n\r\n\t\tparent.appendChild(el);\r\n\t}\r\n};\r\n\r\nscheduler._recalculate_timed = function(id){\r\n\tif(!id) return;\r\n\tvar ev;\r\n\tif(typeof(id) != \"object\")\r\n\t\tev = this._events[id];\r\n\telse\r\n\t\tev = id;\r\n\tif(!ev) return;\r\n\tev._timed = scheduler.isOneDayEvent(ev);\r\n};\r\nscheduler.attachEvent(\"onEventChanged\", scheduler._recalculate_timed);\r\nscheduler.attachEvent(\"onEventAdded\", scheduler._recalculate_timed);\r\n\r\nscheduler.render_data = function(evs, hold) {\r\n\tevs = this._pre_render_events(evs, hold);\r\n\tvar containers = {};\r\n\tfor (var i = 0; i < evs.length; i++)\r\n\t\tif (this._table_view){\r\n\t\t\tif(scheduler._mode != 'month'){\r\n\t\t\t\tthis.render_event_bar(evs[i]);//may be multiday section on other views\r\n\t\t\t}else{\r\n\r\n\t\t\t\tvar max_evs = scheduler.config.max_month_events;\r\n\t\t\t\tif(max_evs !== max_evs*1 || evs[i]._sorder < max_evs){\r\n\t\t\t\t\t//of max number events per month cell is set and event can be rendered\r\n\t\t\t\t\tthis.render_event_bar(evs[i]);\r\n\t\t\t\t}else if(max_evs !== undefined && evs[i]._sorder == max_evs){\r\n\t\t\t\t\t//render 'view more' links\r\n\t\t\t\t\tscheduler._render_month_link(evs[i]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//do not render events with ordinal number > maximum events per cell\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t}else{\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tvar parent = scheduler.locate_holder(ev._sday);\r\n\t\t\tif (!parent) continue; //attempt to render non-visible event\r\n\r\n\t\t\tif(!containers[ev._sday]){\r\n\t\t\t\tcontainers[ev._sday] = {\r\n\t\t\t\t\treal: parent,\r\n\t\t\t\t\tbuffer: document.createDocumentFragment(),\r\n\t\t\t\t\twidth: parent.clientWidth\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\tvar container = containers[ev._sday];\r\n\t\t\tthis.render_event(ev, container.buffer, container.width);\r\n\t\t}\r\n\r\n\t\tfor(var i in containers){\r\n\t\t\tvar container = containers[i];\r\n\t\t\tif(container.real && container.buffer){\r\n\t\t\t\tcontainer.real.appendChild(container.buffer);\r\n\t\t\t}\r\n\t\t}\r\n};\r\n\r\nscheduler._get_first_visible_cell = function(cells) {\r\n\tfor (var i = 0; i < cells.length; i++) {\r\n\t\tif ((cells[i].className || \"\").indexOf(\"dhx_scale_ignore\") == -1) {\r\n\t\t\treturn cells[i];\r\n\t\t}\r\n\t}\r\n\t// if no visible cell found, return cells[0] to be more tolerant, since it's the original logic\r\n\treturn cells[0];\r\n};\r\n\r\nscheduler._pre_render_events = function(evs, hold) {\r\n\tvar hb = this.xy.bar_height;\r\n\tvar h_old = this._colsS.heights;\r\n\tvar h = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0];\r\n\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\r\n\tif (!this._table_view) {\r\n\t\tevs = this._pre_render_events_line(evs, hold); //ignore long events for now\r\n\t}\r\n\telse {\r\n\t\tevs = this._pre_render_events_table(evs, hold);\r\n\t}\r\n\tif (this._table_view) {\r\n\t\tif (hold)\r\n\t\t\tthis._colsS.heights = h_old;\r\n\t\telse {\r\n\t\t\tvar monthRows = data.querySelectorAll(\".dhx_cal_month_row\");\r\n\t\t\tif (monthRows.length) {\r\n\t\t\t\tfor (var i = 0; i < monthRows.length; i++) {\r\n\t\t\t\t\th[i]++;\r\n\t\t\t\t\tvar cells = monthRows[i].querySelectorAll(\".dhx_cal_month_cell\");\r\n\t\t\t\t\tvar cellHeight = this._colsS.height - this.xy.month_head_height;\r\n\t\t\t\t\tif ((h[i]) * hb > cellHeight) { // 22 - height of cell's header\r\n\t\t\t\t\t\t//we have overflow, update heights\r\n\r\n\t\t\t\t\t\tvar cHeight = cellHeight;\r\n\t\t\t\t\t\tif(this.config.max_month_events*1 !== this.config.max_month_events || h[i] <= this.config.max_month_events){\r\n\t\t\t\t\t\t\tcHeight = h[i] * hb;\r\n\t\t\t\t\t\t}else if( (this.config.max_month_events + 1) * hb > cellHeight){\r\n\t\t\t\t\t\t\tcHeight = (this.config.max_month_events + 1) * hb;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tmonthRows[i].style.height = (cHeight + this.xy.month_head_height) + \"px\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\th[i] = (h[i - 1] || 0) + scheduler._get_first_visible_cell(cells).offsetHeight;\r\n\t\t\t\t}\r\n\t\t\t\th.unshift(0);\r\n\t\t\t\tconst dataArea = this.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tif (dataArea.offsetHeight < dataArea.scrollHeight && !scheduler._colsS.scroll_fix && scheduler.xy.scroll_width) {\r\n\r\n\t\t\t\t\tvar scale_settings = scheduler._colsS,\r\n\t\t\t\t\t\tsum_width = scale_settings[scale_settings.col_length],\r\n\t\t\t\t\t\trow_heights = scale_settings.heights.slice();\r\n\r\n\t\t\t\t\tsum_width -= (scheduler.xy.scroll_width || 0);\r\n\t\t\t\t\tthis._calc_scale_sizes(sum_width, this._min_date, this._max_date);\r\n\t\t\t\t\tscheduler._colsS.heights = row_heights;\r\n\r\n\t\t\t\t\tthis.set_xy(this._els[\"dhx_cal_header\"][0], sum_width/*, this.xy.scale_height*/);\r\n\t\t\t\t\tscheduler._render_scales(this._els[\"dhx_cal_header\"][0]);\r\n\t\t\t\t\tscheduler._render_month_scale(this._els[\"dhx_cal_data\"][0], this._get_timeunit_start(), this._min_date);\r\n\r\n\t\t\t\t\tscale_settings.scroll_fix = true;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (!evs.length && this._els[\"dhx_multi_day\"][0].style.visibility == \"visible\")\r\n\t\t\t\t\th[0] = -1;\r\n\t\t\t\tif (evs.length || h[0] == -1) {\r\n\t\t\t\t\t//shift days to have space for multiday events\r\n\t\t\t\t\t//var childs = evl.parentNode.childNodes;\r\n\r\n\t\t\t\t\t// +1 so multiday events would have 2px from top and 2px from bottom by default\r\n\t\t\t\t\tvar full_multi_day_height = (h[0] + 1) * hb + 4;\r\n\r\n\t\t\t\t\tvar used_multi_day_height = full_multi_day_height;\r\n\t\t\t\t\tvar used_multi_day_height_css = full_multi_day_height + \"px\";\r\n\t\t\t\t\tif (this.config.multi_day_height_limit) {\r\n\t\t\t\t\t\tused_multi_day_height = Math.min(full_multi_day_height, this.config.multi_day_height_limit) ;\r\n\t\t\t\t\t\tused_multi_day_height_css = used_multi_day_height + \"px\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar multi_day_section = this._els[\"dhx_multi_day\"][0];\r\n\t\t\t\t\tmulti_day_section.style.height = used_multi_day_height_css;\r\n\t\t\t\t\tmulti_day_section.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\tmulti_day_section.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\r\n\t\t\t\t\t// icon\r\n\t\t\t\t\tvar multi_day_icon = this._els[\"dhx_multi_day\"][1];\r\n\t\t\t\t\tmulti_day_icon.style.height = used_multi_day_height_css;\r\n\t\t\t\t\tmulti_day_icon.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\tmulti_day_icon.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\t\t\t\t\tmulti_day_icon.className = h[0] ? \"dhx_multi_day_icon\" : \"dhx_multi_day_icon_small\";\r\n\t\t\t\t\tthis._dy_shift = (h[0] + 1) * hb;\r\n\t\t\t\t\tif(this.config.multi_day_height_limit){\r\n\t\t\t\t\t\tthis._dy_shift = Math.min(this.config.multi_day_height_limit, this._dy_shift);\r\n\t\t\t\t\t}\r\n\t\t\t\t\th[0] = 0;\r\n\r\n\t\t\t\t\tif (used_multi_day_height != full_multi_day_height) {\r\n\r\n\t\t\t\t\t\tmulti_day_section.style.overflowY = \"auto\";\r\n\t\t\t\t\t//\tmulti_day_section.style.width = (parseInt(this._els[\"dhx_cal_navline\"][0].style.width)) + \"px\";\r\n\r\n\t\t\t\t\t\tmulti_day_icon.style.position = \"fixed\";\r\n\t\t\t\t\t\tmulti_day_icon.style.top = \"\";\r\n\t\t\t\t\t\tmulti_day_icon.style.left = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn evs;\r\n};\r\nscheduler._get_event_sday = function(ev) {\r\n\t// get day in current view\r\n\t// use rounding for 23 or 25 hour days on DST\r\n\tvar datePart = this.date.day_start(new Date(ev.start_date));\r\n\treturn Math.round((datePart.valueOf() - this._min_date.valueOf()) / (24 * 60 * 60 * 1000));\r\n};\r\nscheduler._get_event_mapped_end_date = function(ev) {\r\n\tvar end_date = ev.end_date;\r\n\tif (this.config.separate_short_events) {\r\n\t\tvar ev_duration = (ev.end_date - ev.start_date) / 60000; // minutes\r\n\t\tif (ev_duration < this._min_mapped_duration) {\r\n\t\t\tend_date = this.date.add(end_date, this._min_mapped_duration - ev_duration, \"minute\");\r\n\t\t}\r\n\t}\r\n\treturn end_date;\r\n};\r\nscheduler._pre_render_events_line = function(evs, hold){\r\n\tevs.sort(function(a, b) {\r\n\t\tif (a.start_date.valueOf() == b.start_date.valueOf())\r\n\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\treturn a.start_date > b.start_date ? 1 : -1;\r\n\t});\r\n\tvar days = []; //events by weeks\r\n\tvar evs_originals = [];\r\n\r\n\tthis._min_mapped_duration = Math.floor(this.xy.min_event_height * 60 / this.config.hour_size_px); // values could change along the way\r\n\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tvar ev = evs[i];\r\n\r\n\t\t//check date overflow\r\n\t\tvar sd = ev.start_date;\r\n\t\tvar ed = ev.end_date;\r\n\t\t//check scale overflow\r\n\t\tvar sh = sd.getHours();\r\n\t\tvar eh = ed.getHours();\r\n\t\tev._sday = this._get_event_sday(ev); // sday based on event start_date\r\n\t\tif (this._ignores[ev._sday]){\r\n\t\t\t//ignore event\r\n\t\t\tevs.splice(i,1);\r\n\t\t\ti--;\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tif (!days[ev._sday]) days[ev._sday] = [];\r\n\r\n\t\tif (!hold) {\r\n\t\t\tev._inner = false;\r\n\r\n\t\t\tvar stack = days[ev._sday];\r\n\r\n\t\t\twhile (stack.length) {\r\n\t\t\t\tvar t_ev = stack[stack.length - 1];\r\n\t\t\t\tvar t_end_date = this._get_event_mapped_end_date(t_ev);\r\n\t\t\t\tif (t_end_date.valueOf() <= ev.start_date.valueOf()) {\r\n\t\t\t\t\tstack.splice(stack.length - 1, 1);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar slot_index = stack.length;\r\n\t\t\tvar sorderSet = false;\r\n\t\t\tfor (var j = 0; j < stack.length; j++) {\r\n\t\t\t\tvar t_ev = stack[j];\r\n\t\t\t\tvar t_end_date = this._get_event_mapped_end_date(t_ev);\r\n\t\t\t\tif (t_end_date.valueOf() <= ev.start_date.valueOf()) {\r\n\t\t\t\t\tsorderSet = true;\r\n\t\t\t\t\tev._sorder = t_ev._sorder;\r\n\t\t\t\t\tslot_index = j;\r\n\t\t\t\t\tev._inner = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (stack.length)\r\n\t\t\t\tstack[stack.length - 1]._inner = true;\r\n\r\n\t\t\tif (!sorderSet) {\r\n\t\t\t\tif (stack.length) {\r\n\t\t\t\t\tif (stack.length <= stack[stack.length - 1]._sorder) {\r\n\t\t\t\t\t\tif (!stack[stack.length - 1]._sorder)\r\n\t\t\t\t\t\t\tev._sorder = 0;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tfor (j = 0; j < stack.length; j++) {\r\n\t\t\t\t\t\t\t\tvar _is_sorder = false;\r\n\t\t\t\t\t\t\t\tfor (var k = 0; k < stack.length; k++) {\r\n\t\t\t\t\t\t\t\t\tif (stack[k]._sorder == j) {\r\n\t\t\t\t\t\t\t\t\t\t_is_sorder = true;\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (!_is_sorder) {\r\n\t\t\t\t\t\t\t\t\tev._sorder = j;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\tev._inner = true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvar _max_sorder = stack[0]._sorder;\r\n\t\t\t\t\t\tfor (j = 1; j < stack.length; j++) {\r\n\t\t\t\t\t\t\tif (stack[j]._sorder > _max_sorder)\r\n\t\t\t\t\t\t\t\t_max_sorder = stack[j]._sorder;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tev._sorder = _max_sorder + 1;\r\n\t\t\t\t\t\tev._inner = false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else\r\n\t\t\t\t\tev._sorder = 0;\r\n\t\t\t}\r\n\r\n\t\t\tstack.splice(slot_index, slot_index == stack.length ? 0 : 1, ev);\r\n\r\n\t\t\tif (stack.length > (stack.max_count || 0)) {\r\n\t\t\t\tstack.max_count = stack.length;\r\n\t\t\t\tev._count = stack.length;\r\n\t\t\t} else {\r\n\t\t\t\tev._count = (ev._count) ? ev._count : 1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (sh < this.config.first_hour || eh >= this.config.last_hour) {\r\n\t\t\t// Need to create copy of event as we will be changing it's start/end date\r\n\t\t\t// e.g. first_hour = 11 and event.start_date hours = 9. Need to preserve that info\r\n\t\t\tevs_originals.push(ev);\r\n\t\t\tevs[i] = ev = this._copy_event(ev);\r\n\r\n\t\t\tif (sh < this.config.first_hour) {\r\n\t\t\t\tev.start_date.setHours(this.config.first_hour);\r\n\t\t\t\tev.start_date.setMinutes(0);\r\n\t\t\t}\r\n\t\t\tif (eh >= this.config.last_hour) {\r\n\t\t\t\tev.end_date.setMinutes(0);\r\n\t\t\t\tev.end_date.setHours(this.config.last_hour);\r\n\t\t\t}\r\n\r\n\t\t\tif (ev.start_date > ev.end_date || sh == this.config.last_hour) {\r\n\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (!hold) {\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tevs[i]._count = days[evs[i]._sday].max_count;\r\n\t\t}\r\n\t\tfor (var i = 0; i < evs_originals.length; i++)\r\n\t\t\tevs_originals[i]._count = days[evs_originals[i]._sday].max_count;\r\n\t}\r\n\r\n\treturn evs;\r\n};\r\nscheduler._time_order = function(evs) {\r\n\tevs.sort(function(a, b) {\r\n\t\tif (a.start_date.valueOf() == b.start_date.valueOf()) {\r\n\t\t\tif (a._timed && !b._timed) return 1;\r\n\t\t\tif (!a._timed && b._timed) return -1;\r\n\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\t}\r\n\t\treturn a.start_date > b.start_date ? 1 : -1;\r\n\t});\r\n};\r\n\r\nscheduler._is_any_multiday_cell_visible = function(from, to, event){\r\n\tvar cols = this._cols.length;\r\n\tvar isAnyCellVisible = false;\r\n\tvar checkDate = from;\r\n\tvar noCells = true;\r\n\tvar lastDayEnd = new Date(to);\r\n\tif(scheduler.date.day_start(new Date(to)).valueOf() != to.valueOf()){\r\n\t\tlastDayEnd = scheduler.date.day_start(lastDayEnd);\r\n\t\tlastDayEnd = scheduler.date.add(lastDayEnd, 1, \"day\");\r\n\t}\r\n\twhile(checkDate < lastDayEnd){\r\n\t\tnoCells = false;\r\n\t\tvar cellIndex = this.locate_holder_day(checkDate, false, event);\r\n\t\tvar weekCellIndex = cellIndex % cols;\r\n\t\tif(!this._ignores[weekCellIndex]){\r\n\t\t\tisAnyCellVisible = true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcheckDate = scheduler.date.add(checkDate, 1, \"day\");\r\n\t}\r\n\treturn noCells || isAnyCellVisible;\r\n};\r\n\r\nscheduler._pre_render_events_table = function(evs, hold) { // max - max height of week slot\r\n\tthis._time_order(evs);\r\n\tvar out = [];\r\n\tvar weeks = [\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[]\r\n\t]; //events by weeks\r\n\tvar max = this._colsS.heights;\r\n\tvar start_date;\r\n\tvar cols = this._cols.length;\r\n\tvar chunks_info = {};\r\n\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tvar ev = evs[i];\r\n\t\tvar id = ev.id;\r\n\t\tif (!chunks_info[id]) {\r\n\t\t\tchunks_info[id] = {\r\n\t\t\t\tfirst_chunk: true,\r\n\t\t\t\tlast_chunk: true\r\n\t\t\t};\r\n\t\t}\r\n\t\tvar chunk_info = chunks_info[id];\r\n\t\tvar sd = (start_date || ev.start_date);\r\n\t\tvar ed = ev.end_date;\r\n\t\t//trim events which are crossing through current view\r\n\t\tif (sd < this._min_date) {\r\n\t\t\tchunk_info.first_chunk = false;\r\n\t\t\tsd = this._min_date;\r\n\t\t}\r\n\t\tif (ed > this._max_date) {\r\n\t\t\tchunk_info.last_chunk = false;\r\n\t\t\ted = this._max_date;\r\n\t\t}\r\n\r\n\t\tvar locate_s = this.locate_holder_day(sd, false, ev);\r\n\t\tev._sday = locate_s % cols;\r\n\t\t//skip single day events for ignored dates\r\n\t\tif (this._ignores[ev._sday] && ev._timed) continue;\r\n\r\n\t\tvar locate_e = this.locate_holder_day(ed, true, ev) || cols;\r\n\t\tev._eday = (locate_e % cols) || cols; //cols used to fill full week, when event end on monday\r\n\t\tev._length = locate_e - locate_s;\r\n\t\t//3600000 - compensate 1 hour during winter|summer time shift\r\n\t\tev._sweek = Math.floor((this._correct_shift(sd.valueOf(), 1) - this._min_date.valueOf()) / (60 * 60 * 1000 * 24 * cols));\r\n\r\n\t\tvar isAnyCellVisible = scheduler._is_any_multiday_cell_visible(sd, ed, ev);\r\n\r\n\t\tif(!isAnyCellVisible){\r\n\t\t\tstart_date = null;\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\t//current slot\r\n\t\tvar stack = weeks[ev._sweek];\r\n\t\t//check order position\r\n\t\tvar stack_line;\r\n\r\n\t\tfor (stack_line = 0; stack_line < stack.length; stack_line++)\r\n\t\t\tif (stack[stack_line]._eday <= ev._sday)\r\n\t\t\t\tbreak;\r\n\r\n\t\tif (!ev._sorder || !hold) {\r\n\t\t\tev._sorder = stack_line;\r\n\t\t}\r\n\r\n\t\tif (ev._sday + ev._length <= cols) {\r\n\t\t\tstart_date = null;\r\n\t\t\tout.push(ev);\r\n\t\t\tstack[stack_line] = ev;\r\n\t\t\t//get max height of slot\r\n\t\t\tmax[ev._sweek] = stack.length - 1;\r\n\t\t\tev._first_chunk = chunk_info.first_chunk;\r\n\t\t\tev._last_chunk = chunk_info.last_chunk;\r\n\t\t} else { // split long event in chunks\r\n\t\t\tvar copy = this._copy_event(ev);\r\n\t\t\tcopy.id = ev.id;\r\n\t\t\tcopy._length = cols - ev._sday;\r\n\t\t\tcopy._eday = cols;\r\n\t\t\tcopy._sday = ev._sday;\r\n\t\t\tcopy._sweek = ev._sweek;\r\n\t\t\tcopy._sorder = ev._sorder;\r\n\t\t\tcopy.end_date = this.date.add(sd, copy._length, \"day\");\r\n\t\t\tcopy._first_chunk = chunk_info.first_chunk;\r\n\t\t\tif (chunk_info.first_chunk) {\r\n\t\t\t\tchunk_info.first_chunk = false;\r\n\t\t\t}\r\n\r\n\t\t\tout.push(copy);\r\n\t\t\tstack[stack_line] = copy;\r\n\t\t\tstart_date = copy.end_date;\r\n\t\t\t//get max height of slot\r\n\t\t\tmax[ev._sweek] = stack.length - 1;\r\n\t\t\ti--;\r\n\t\t\tcontinue; //repeat same step\r\n\t\t}\r\n\t}\r\n\treturn out;\r\n};\r\nscheduler._copy_dummy = function() {\r\n\tvar a = new Date(this.start_date);\r\n\tvar b = new Date(this.end_date);\r\n\tthis.start_date = a;\r\n\tthis.end_date = b;\r\n};\r\nscheduler._copy_event = function(ev) {\r\n\tthis._copy_dummy.prototype = ev;\r\n\treturn new this._copy_dummy();\r\n\t//return {start_date:ev.start_date, end_date:ev.end_date, text:ev.text, id:ev.id}\r\n};\r\nscheduler._rendered = [];\r\nscheduler.clear_view = function() {\r\n\tfor (var i = 0; i < this._rendered.length; i++) {\r\n\t\tvar obj = this._rendered[i];\r\n\t\tif (obj.parentNode) obj.parentNode.removeChild(obj);\r\n\t}\r\n\tthis._rendered = [];\r\n};\r\nscheduler.updateEvent = function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tthis.clear_event(id);\r\n\r\n\tif (ev && this.is_visible_events(ev) && this.filter_event(id, ev) && (this._table_view || this.config.multi_day || ev._timed)) {\r\n\t\tif (this.config.update_render){\r\n\t\t\tthis.render_view_data();\r\n\t\t}else{\r\n\t\t\tif(this.getState().mode == \"month\" && !this.getState().drag_id && !this.isOneDayEvent(ev)){\r\n\t\t\t\tthis.render_view_data();\r\n\t\t\t}else{\r\n\t\t\t\tthis.render_view_data([ev], true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.clear_event = function(id) {\r\n\tthis.for_rendered(id, function(node, i) {\r\n\t\tif (node.parentNode)\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\tscheduler._rendered.splice(i, 1);\r\n\t});\r\n};\r\nscheduler._y_from_date = function(date){\r\n\tvar sm = date.getHours() * 60 + date.getMinutes();\r\n\treturn ((Math.round((sm * 60 * 1000 - this.config.first_hour * 60 * 60 * 1000) * this.config.hour_size_px / (60 * 60 * 1000))) % (this.config.hour_size_px * 24)); //42px/hour\r\n};\r\nscheduler._calc_event_y = function(ev, min_height){\r\n\tmin_height = min_height || 0;\r\n\tvar sm = ev.start_date.getHours() * 60 + ev.start_date.getMinutes();\r\n\tvar em = (ev.end_date.getHours() * 60 + ev.end_date.getMinutes()) || (scheduler.config.last_hour * 60);\r\n\tvar top = this._y_from_date(ev.start_date);\r\n\r\n\tvar height = Math.max(min_height, (em - sm) * this.config.hour_size_px / 60); //42px/hour\r\n\treturn {\r\n\t\ttop: top,\r\n\t\theight: height\r\n\t};\r\n};\r\nscheduler.render_event = function(ev, buffer, parentWidth) {\r\n\tvar menu = scheduler.xy.menu_width;\r\n\tvar menu_offset = (this.config.use_select_menu_space) ? 0 : menu;\r\n\tif (ev._sday < 0) return; //can occur in case of recurring event during time shift\r\n\r\n\tvar parent = scheduler.locate_holder(ev._sday);\r\n\tif (!parent) return; //attempt to render non-visible event\r\n\r\n\tbuffer = buffer || parent;\r\n\r\n\tvar pos_y = this._calc_event_y(ev, scheduler.xy.min_event_height);\r\n\tvar top = pos_y.top,\r\n\t\theight = pos_y.height;\r\n\r\n\tvar ev_count = ev._count || 1;\r\n\tvar ev_sorder = ev._sorder || 0;\r\n\r\n\tparentWidth = parentWidth || parent.clientWidth;\r\n\tif(this.config.day_column_padding){\r\n\t\tparentWidth -= this.config.day_column_padding;\r\n\t}\r\n\r\n\tvar width = Math.floor((parentWidth - menu_offset) / ev_count);\r\n\tvar left = ev_sorder * width + 1;\r\n\tif (!ev._inner) width = width * (ev_count - ev_sorder);\r\n\tif (this.config.cascade_event_display) {\r\n\t\tvar limit = this.config.cascade_event_count;\r\n\t\tvar margin = this.config.cascade_event_margin;\r\n\t\tleft = ev_sorder % limit * margin;\r\n\t\tvar right = (ev._inner) ? (ev_count - ev_sorder - 1) % limit * margin / 2 : 0;\r\n\t\twidth = Math.floor(parentWidth - menu_offset - left - right);\r\n\t}\r\n\r\n\tif(height < 30){\r\n\t\tev._mode = \"smallest\";\r\n\t}else if(height < 42){\r\n\t\tev._mode = \"small\";\r\n\t}else{\r\n\t\tev._mode = null;\r\n\t}\r\n\r\n\tvar d = this._render_v_bar(ev, menu_offset + left, top, width, height, ev._text_style, scheduler.templates.event_header(ev.start_date, ev.end_date, ev), scheduler.templates.event_text(ev.start_date, ev.end_date, ev));\r\n\t\r\n\tif(ev._mode === \"smallest\"){\r\n\t\td.classList.add(\"dhx_cal_event--xsmall\");\r\n\t}else if (ev._mode === \"small\"){\r\n\t\td.classList.add(\"dhx_cal_event--small\");\r\n\t}\r\n\r\n\tthis._waiAria.eventAttr(ev, d);\r\n\tthis._rendered.push(d);\r\n\tbuffer.appendChild(d);\r\n\r\n\tvar parentPosition = parseInt( this.config.rtl ? parent.style.right : parent.style.left, 10);\r\n\r\n\tleft = left + parentPosition + menu_offset;\r\n\r\n\tif (this._edit_id == ev.id) {\r\n\r\n\t\td.style.zIndex = 1; //fix overlapping issue\r\n\t\twidth = Math.max(width, scheduler.xy.editor_width);\r\n\t\td = document.createElement(\"div\");\r\n\t\td.setAttribute(\"event_id\", ev.id); // for backward compatibility\r\n\t\td.setAttribute(this.config.event_attribute, ev.id);\r\n\r\n\t\tthis._waiAria.eventAttr(ev, d);\r\n\r\n\t\td.className = \"dhx_cal_event dhx_cal_editor\";\r\n\t\tif (this.config.rtl) left++;\r\n\t\tthis.set_xy(d, width, height, left, top);\r\n\r\n\r\n\t\tif(ev.color){\r\n\t\t\td.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tvar tplClass = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\r\n\t\tif(tplClass){\r\n\t\t\td.className += \" \" + tplClass;\r\n\t\t}\r\n\t\tvar d2 = document.createElement(\"div\");\r\n\t\td2.style.cssText += \"overflow:hidden;height:100%\";\r\n\r\n\t\td.appendChild(d2);\r\n\t\tthis._els[\"dhx_cal_data\"][0].appendChild(d);\r\n\t\tthis._rendered.push(d);\r\n\r\n\t\td2.innerHTML = \"\";\r\n\t\tthis._editor = d2.querySelector(\"textarea\");\r\n\t\t\r\n\t\tscheduler.event(this._editor, \"keydown\", function(e) {\r\n\t\t\tif (e.shiftKey) return true;\r\n\t\t\tvar code = e.keyCode;\r\n\t\t\tif (code == scheduler.keys.edit_save) scheduler.editStop(true);\r\n\t\t\tif (code == scheduler.keys.edit_cancel) scheduler.editStop(false);\r\n\r\n\t\t\tif(code == scheduler.keys.edit_save || code == scheduler.keys.edit_cancel){\r\n\t\t\t\tif(e.preventDefault) e.preventDefault();\r\n\t\t\t}\r\n\t\t});\r\n\t\tscheduler.event(this._editor, \"selectstart\", function (e) {\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn true;\r\n\t\t});\r\n\t\tscheduler._focus(this._editor, true);\r\n\t\t//IE and opera can add x-scroll during focusing\r\n\t\tthis._els[\"dhx_cal_data\"][0].scrollLeft = 0;\r\n\t}\r\n\tif (this.xy.menu_width !== 0 && this._select_id == ev.id) {\r\n\r\n\t\tif (this.config.cascade_event_display && this._drag_mode)\r\n\t\t\td.style.zIndex = 1; //fix overlapping issue for cascade view in case of dnd of selected event\r\n\t\tvar icons = this.config[\"icons_\" + ((this._edit_id == ev.id) ? \"edit\" : \"select\")];\r\n\t\tvar icons_str = \"\";\r\n\r\n\t\tvar ariaAttr;\r\n\r\n\t\tfor (var i = 0; i < icons.length; i++) {\r\n\t\t\tconst currentIcon = icons[i];\r\n\t\t\tariaAttr = this._waiAria.eventMenuAttrString(currentIcon);\r\n\t\t\ticons_str += `
`;\r\n\t\t}\r\n\t\tvar obj = this._render_v_bar(ev, left - menu - 1, top, menu, null, \"\", \"
\", icons_str, true);\r\n\r\n\t\tif(ev.color){\r\n\t\t\tobj.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tobj.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\t//obj.style.left = left - menu + 1;\r\n\t\tthis._els[\"dhx_cal_data\"][0].appendChild(obj);\r\n\t\tthis._rendered.push(obj);\r\n\t}\r\n\tif(this.config.drag_highlight && this._drag_id == ev.id){\r\n\t\tthis.highlightEventPosition(ev);\r\n\t}\r\n};\r\nscheduler._render_v_bar = function (ev, x, y, w, h, style, contentA, contentB, bottom) {\r\n\tvar d = document.createElement(\"div\");\r\n\tvar id = ev.id;\r\n\tvar cs = (bottom) ? \"dhx_cal_event dhx_cal_select_menu\" : \"dhx_cal_event\";\r\n\r\n\tvar state = scheduler.getState();\r\n\tif(state.drag_id == ev.id){\r\n\t\tcs += \" dhx_cal_event_drag\";\r\n\t}\r\n\r\n\tif(state.select_id == ev.id){\r\n\t\tcs += \" dhx_cal_event_selected\";\r\n\t}\r\n\r\n\tvar cse = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\tif (cse) cs = cs + \" \" + cse;\r\n\r\n\tif(this.config.cascade_event_display) {\r\n\t\tcs += \" dhx_cal_event_cascade\";\r\n\t}\r\n\r\n\tvar boxWidth = w - 1;\r\n\tvar html = `
\r\n\t\t\t\t
`;\r\n\r\n\td.innerHTML = html;\r\n\r\n\tvar container = d.cloneNode(true).firstChild;\r\n\r\n\tif (!bottom && scheduler.renderEvent(container, ev, w, h, contentA, contentB)) {\r\n\t\tif(ev.color){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\treturn container;\r\n\t} else {\r\n\t\tcontainer = d.firstChild;\r\n\t\tif(ev.color){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\tvar inner_html = '
 
';\r\n\t\tinner_html += '
' + contentA + '
';\r\n\t\tinner_html += '
' + contentB + '
'; // +2 css specific, moved from render_event\r\n\r\n\t\tvar footer_class = \"dhx_event_resize dhx_footer\";\r\n\t\tif (bottom || ev._drag_resize === false)\r\n\t\t\tfooter_class = \"dhx_resize_denied \" + footer_class;\r\n\r\n\t\tinner_html += '
';\r\n\r\n\t\tcontainer.innerHTML = inner_html;\r\n\t}\r\n\r\n\treturn container;\r\n};\r\nscheduler.renderEvent = function(){\r\n\treturn false;\r\n};\r\nscheduler.locate_holder = function(day) {\r\n\tif (this._mode == \"day\") return this._els[\"dhx_cal_data\"][0].firstChild; //dirty\r\n\treturn this._els[\"dhx_cal_data\"][0].childNodes[day];\r\n};\r\nscheduler.locate_holder_day = function(date, past) {\r\n\tvar day = Math.floor((this._correct_shift(date, 1) - this._min_date) / (60 * 60 * 24 * 1000));\r\n\t//when locating end data of event , we need to use next day if time part was defined\r\n\tif (past && this.date.time_part(date)) day++;\r\n\treturn day;\r\n};\r\n\r\n\r\n\r\nscheduler._get_dnd_order = function(order, ev_height, max_height){\r\n\tif(!this._drag_event)\r\n\t\treturn order;\r\n\tif(!this._drag_event._orig_sorder)\r\n\t\tthis._drag_event._orig_sorder = order;\r\n\telse\r\n\t\torder = this._drag_event._orig_sorder;\r\n\r\n\tvar evTop = ev_height * order;\r\n\twhile((evTop + ev_height) > max_height){\r\n\t\torder--;\r\n\t\tevTop -= ev_height;\r\n\t}\r\n\torder = Math.max(order, 0);\r\n\treturn order;\r\n};\r\n//scheduler._get_event_bar_pos = function(sday, eday, week, drag){\r\nscheduler._get_event_bar_pos = function(ev){\r\n\tvar rtl = this.config.rtl;\r\n\tvar columns = this._colsS;\r\n\tvar x = columns[ev._sday];\r\n\tvar x2 = columns[ev._eday];\r\n\tif (rtl) {\r\n\t\tx = columns[columns.col_length] - columns[ev._eday] + columns[0];\r\n\t\tx2 = columns[columns.col_length] - columns[ev._sday] + columns[0];\r\n\t}\r\n\r\n\tif (x2 == x) x2 = columns[ev._eday + 1];\r\n\tvar hb = this.xy.bar_height;\r\n\r\n\tvar order = ev._sorder;\r\n\tif(ev.id == this._drag_id){\r\n\t\tvar cellHeight = columns.heights[ev._sweek + 1] - columns.heights[ev._sweek]- this.xy.month_head_height;//22 for month head height\r\n\t\torder = scheduler._get_dnd_order(order, hb, cellHeight);\r\n\t}\r\n\tvar y_event_offset = order * hb;\r\n\tvar y = columns.heights[ev._sweek] + (columns.height ? (this.xy.month_scale_height + 2) : 2 ) + y_event_offset;\r\n\treturn {x:x, x2:x2, y:y};\r\n};\r\n\r\nscheduler.render_event_bar = function (ev) {\r\n\tvar parent = this._rendered_location;\r\n\tvar pos = this._get_event_bar_pos(ev);\r\n\tvar y = pos.y;\r\n\tvar x = pos.x;\r\n\tvar x2 = pos.x2;\r\n\t// resize for month mutliday events\r\n\tvar resize_handle = \"\";\r\n\r\n\t//events in ignored dates\r\n\r\n\tif (!x2) return;\r\n\r\n\tvar resizable = scheduler.config.resize_month_events && this._mode == \"month\" &&\r\n\t\t(!ev._timed || scheduler.config.resize_month_timed);\r\n\r\n\tvar d = document.createElement(\"div\");\r\n\tvar left_chunk = (ev.hasOwnProperty(\"_first_chunk\") && ev._first_chunk),\r\n\t\tright_chunk = (ev.hasOwnProperty(\"_last_chunk\") && ev._last_chunk);\r\n\r\n\tvar resize_left = resizable && (ev._timed || left_chunk);\r\n\tvar resize_right = resizable && (ev._timed || right_chunk);\r\n\r\n\tvar timed = true;\r\n\tvar cs = \"dhx_cal_event_clear\";\r\n\tif (!ev._timed || resizable) {\r\n\t\ttimed = false;\r\n\t\tcs = \"dhx_cal_event_line\";\r\n\t}\r\n\tif(left_chunk){\r\n\t\tcs += \" dhx_cal_event_line_start\";\r\n\t}\r\n\tif(right_chunk){\r\n\t\tcs += \" dhx_cal_event_line_end\";\r\n\t}\r\n\tif(resize_left){\r\n\t\tresize_handle += \"
\";\r\n\t}\r\n\tif(resize_right){\r\n\t\tresize_handle += \"
\";\r\n\t}\r\n\r\n\tvar cse = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\tif (cse){\r\n\t\tcs += \" \" + cse;\r\n\t}\r\n\r\n\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\tvar style_text = [\r\n\t\t\"position:absolute\",\r\n\t\t\"top:\" + y + \"px\",\r\n\t\t\"left:\" + x + \"px\",\r\n\t\t\"width:\" + (x2 - x - (timed ? 1 : 0)) + \"px\",\r\n\t\t\"height:\" + (this.xy.bar_height - 2) + \"px\",\r\n\t\tcolor,\r\n\t\tbg_color,\r\n\t\t(ev._text_style || \"\")\r\n\t].join(\";\");\r\n\r\n\tvar html = \"
\";\r\n\tif (resizable) {\r\n\t\thtml += resize_handle;\r\n\t}\r\n\tif(scheduler.getState().mode == \"month\"){\r\n\t\tev = scheduler.getEvent(ev.id); // ev at this point could be a part (row in a month view) of a larger event\r\n\t}\r\n\r\n\tif (ev._timed){\r\n\t\thtml += `${scheduler.templates.event_bar_date(ev.start_date, ev.end_date, ev)}`;\r\n\t}\r\n\r\n\thtml += \"
\";\r\n\thtml += scheduler.templates.event_bar_text(ev.start_date, ev.end_date, ev) + '
';\r\n\thtml += \"
\";\r\n\thtml += '
';\r\n\r\n\td.innerHTML = html;\r\n\r\n\tthis._rendered.push(d.firstChild);\r\n\tparent.appendChild(d.firstChild);\r\n};\r\n\r\nscheduler._locate_event = function(node) {\r\n\tvar id = null;\r\n\twhile (node && !id && node.getAttribute) {\r\n\t\tid = node.getAttribute(this.config.event_attribute);\r\n\t\tnode = node.parentNode;\r\n\t}\r\n\treturn id;\r\n};\r\n\r\nscheduler.edit = function(id) {\r\n\tif (this._edit_id == id) return;\r\n\tthis.editStop(false, id);\r\n\tthis._edit_id = id;\r\n\tthis.updateEvent(id);\r\n};\r\nscheduler.editStop = function(mode, id) {\r\n\tif (id && this._edit_id == id) return;\r\n\tvar ev = this.getEvent(this._edit_id);\r\n\tif (ev) {\r\n\t\tif (mode) ev.text = this._editor.value;\r\n\t\tthis._edit_id = null;\r\n\t\tthis._editor = null;\r\n\t\tthis.updateEvent(ev.id);\r\n\t\tthis._edit_stop_event(ev, mode);\r\n\t}\r\n};\r\nscheduler._edit_stop_event = function(ev, mode) {\r\n\tif (this._new_event) {\r\n\t\tif (!mode) {\r\n\t\t\tif (ev) // in case of custom lightbox user can already delete event\r\n\t\t\t\tthis.deleteEvent(ev.id, true);\r\n\t\t} else {\r\n\t\t\tthis.callEvent(\"onEventAdded\", [ev.id, ev]);\r\n\t\t}\r\n\t\tthis._new_event = null;\r\n\t} else {\r\n\t\tif (mode){\r\n\t\t\tthis.callEvent(\"onEventChanged\", [ev.id, ev]);\r\n\t\t}\r\n\t}\r\n};\r\n\r\nscheduler.getEvents = function(from, to) {\r\n\tvar result = [];\r\n\tfor (var a in this._events) {\r\n\t\tvar ev = this._events[a];\r\n\t\tif (ev && ( (!from && !to) || (ev.start_date < to && ev.end_date > from) ))\r\n\t\t\tresult.push(ev);\r\n\t}\r\n\treturn result;\r\n};\r\nscheduler.getRenderedEvent = function(id) {\r\n\tif (!id)\r\n\t\treturn;\r\n\tvar rendered_events = scheduler._rendered;\r\n\tfor (var i=0; i -1){\r\n\t\t\t\t\tsection = section.split(scheduler.config.section_delimiter)[0];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar top = timeline.getSectionTop(section);\r\n\t\t\tvar left = timeline.posFromDate(event.start_date);\r\n\t\t\tvar container = scheduler.$container.querySelector(\".dhx_timeline_data_wrapper\");\r\n\t\t\tleft = left - (container.offsetWidth - timeline.dx) / 2;\r\n\t\t\ttop = top - container.offsetHeight / 2 + timeline.dy/2;\r\n\r\n\t\t\tif (timeline._smartRenderingEnabled()) {\r\n\t\t\t\tvar handlerId = timeline.attachEvent(\"onScroll\", function(){\r\n\t\t\t\t\trestoreOriginalColors();\r\n\t\t\t\t\ttimeline.detachEvent(handlerId);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\ttimeline.scrollTo({\r\n\t\t\t\tleft: left,\r\n\t\t\t\ttop: top\r\n\t\t\t});\r\n\t\t\tif (!timeline._smartRenderingEnabled()) {\r\n\t\t\t\trestoreOriginalColors();\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\trestoreOriginalColors();\r\n\t}\r\n\r\n\tscheduler.callEvent(\"onAfterEventDisplay\", [ev, mode]);\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._append_drag_marker = function(m){\r\n\tif(m.parentNode) return;\r\n\tvar zone = scheduler._els[\"dhx_cal_data\"][0];\r\n\r\n\tvar scale = zone.lastChild;\r\n\tvar className = scheduler._getClassName(scale);\r\n\tif(className.indexOf(\"dhx_scale_holder\") < 0 && scale.previousSibling){\r\n\t\tscale = scale.previousSibling;\r\n\t}\r\n\r\n\tclassName = scheduler._getClassName(scale);\r\n\tif (scale && className.indexOf(\"dhx_scale_holder\") === 0) {\r\n\t\tscale.appendChild(m);\r\n\t}\r\n};\r\n\r\nscheduler._update_marker_position = function(m, event){\r\n\tvar size = scheduler._calc_event_y(event, 0);\r\n\tm.style.top = size.top + \"px\";\r\n\tm.style.height = size.height + \"px\";\r\n};\r\n\r\nscheduler.highlightEventPosition = function(event){\r\n\tvar m = document.createElement(\"div\");\r\n\r\n\tm.setAttribute(\"event_id\", event.id); // for backward compatibility\r\n\tm.setAttribute(this.config.event_attribute, event.id);\r\n\tthis._rendered.push(m);\r\n\tthis._update_marker_position(m, event);\r\n\r\n\tvar css = this.templates.drag_marker_class(event.start_date, event.end_date, event);\r\n\tvar html = this.templates.drag_marker_content(event.start_date, event.end_date, event);\r\n\tm.className = \"dhx_drag_marker\";\r\n\tif(css)\r\n\t\tm.className += \" \" + css;\r\n\tif(html)\r\n\t\tm.innerHTML = html;\r\n\tthis._append_drag_marker(m);\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler._lightbox_controls = {};\r\nscheduler.formSection = function(name){\r\n\tvar config = this.config.lightbox.sections;\r\n\tvar i = 0;\r\n\tfor (i; i < config.length; i++) {\r\n\t\tif (config[i].name == name) {\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif (i === config.length) {\r\n\t\t// GS-1662 section not found, should exit here instead of throwing an error\r\n\t\treturn null;\r\n\t}\r\n\r\n\tvar section = config[i];\r\n\tif (!scheduler._lightbox) {\r\n\t\tscheduler.getLightbox();\r\n\t}\r\n\tvar header = scheduler._lightbox.querySelector(`#${section.id}`);\r\n\tvar node = header.nextSibling;\r\n\r\n\tvar result = {\r\n\t\tsection: section,\r\n\t\theader: header,\r\n\t\tnode: node,\r\n\t\tgetValue:function(ev){\r\n\t\t\treturn scheduler.form_blocks[section.type].get_value(node, (ev||{}), section);\r\n\t\t},\r\n\t\tsetValue:function(value, ev){\r\n\t\t\treturn scheduler.form_blocks[section.type].set_value(node, value, (ev||{}), section);\r\n\t\t}\r\n\t};\r\n\r\n\tvar handler = scheduler._lightbox_controls[\"get_\"+section.type+\"_control\"];\r\n\treturn handler?handler(result):result;\r\n};\r\nscheduler._lightbox_controls.get_template_control = function(result) {\r\n\tresult.control = result.node;\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_select_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('select')[0];\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_textarea_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('textarea')[0];\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_time_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('select'); // array\r\n\treturn result;\r\n};\r\n\r\nscheduler._lightbox_controls.defaults = {\r\n\ttemplate: {\r\n\t\theight:30\r\n\t},\r\n\ttextarea: {\r\n\t\theight: 200\r\n\t},\r\n\tselect: {\r\n\t\theight: 23\r\n\t},\r\n\ttime: {\r\n\t\theight: 20\r\n\t}\r\n};\r\n\r\n\r\nscheduler.form_blocks={\r\n\ttemplate:{\r\n\t\trender: function(sns){\r\n\t\t\treturn \"
\";\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,config){\r\n\t\t\tnode.innerHTML = value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev,config){\r\n\t\t\treturn node.innerHTML||\"\";\r\n\t\t},\r\n\t\tfocus: function(node){\r\n\t\t}\r\n\t},\r\n\ttextarea:{\r\n\t\trender:function(sns){\r\n\t\t\tconst placeholder = sns.placeholder ? `placeholder='${sns.placeholder}'` : \"\";\r\n\t\t\treturn `
`;\r\n\t\t},\r\n\t\tset_value:function(node,value,ev){\r\n\t\t\tscheduler.form_blocks.textarea._get_input(node).value=value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev){\r\n\t\t\treturn scheduler.form_blocks.textarea._get_input(node).value;\r\n\t\t},\r\n\t\tfocus:function(node){\r\n\t\t\tvar a = scheduler.form_blocks.textarea._get_input(node);\r\n\t\t\tscheduler._focus(a, true);\r\n\t\t},\r\n\t\t_get_input: function(node){\r\n\t\t\treturn node.getElementsByTagName(\"textarea\")[0];\r\n\t\t}\r\n\t},\r\n\tselect:{\r\n\t\trender:function(sns){\r\n\t\t\t//var defaults = scheduler._lightbox_controls.defaults.select;\r\n\t\t\tvar html=\"
\";\r\n\t\t\treturn html;\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,sns){\r\n\t\t\tvar select = node.firstChild;\r\n\t\t\tif (!select._dhx_onchange && sns.onchange) {\r\n\t\t\t\tscheduler.event(select, \"change\", sns.onchange);\r\n\t\t\t\tselect._dhx_onchange = true;\r\n\t\t\t}\r\n\t\t\tif (typeof value == \"undefined\")\r\n\t\t\t\tvalue = (select.options[0]||{}).value;\r\n\t\t\tselect.value=value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev){\r\n\t\t\treturn node.firstChild.value;\r\n\t\t},\r\n\t\tfocus:function(node){\r\n\t\t\tvar a=node.firstChild; scheduler._focus(a, true);\r\n\t\t}\r\n\t},\r\n\ttime:{\r\n\t\trender:function(sns) {\r\n\t\t\tif (!sns.time_format) {\r\n\t\t\t\t// default order\r\n\t\t\t\tsns.time_format = [\"%H:%i\", \"%d\", \"%m\", \"%Y\"];\r\n\t\t\t}\r\n\t\t\t// map: default order => real one\r\n\t\t\tsns._time_format_order = {};\r\n\t\t\tvar time_format = sns.time_format;\r\n\r\n\t\t\tvar cfg = scheduler.config;\r\n\t\t\tvar dt = scheduler.date.date_part(scheduler._currentDate());\r\n\t\t\tvar last = 24*60, first = 0;\r\n\t\t\tif(scheduler.config.limit_time_select){\r\n\t\t\t\tlast = 60*cfg.last_hour+1;\r\n\t\t\t\tfirst = 60*cfg.first_hour;\r\n\t\t\t\tdt.setHours(cfg.first_hour);\r\n\t\t\t}\r\n\t\t\tvar html = \"\";\r\n\r\n\t\t\tfor (var p = 0; p < time_format.length; p++) {\r\n\t\t\t\tvar time_option = time_format[p];\r\n\r\n\t\t\t\t// adding spaces between selects\r\n\t\t\t\tif (p > 0) {\r\n\t\t\t\t\thtml += \" \";\r\n\t\t\t\t}\r\n\t\t\t\tvar selectBoxClass = \"\";\r\n\t\t\t\tvar options = \"\";\r\n\t\t\t\tswitch (time_option) {\r\n\t\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_year_select\";\r\n\t\t\t\t\t\tsns._time_format_order[3] = p;\r\n\t\t\t\t\t\t//year\r\n\t\t\t\t\t\tvar range;\r\n\t\t\t\t\t\tvar start_year;\r\n\t\t\t\t\t\tvar end_year;\r\n\t\t\t\t\t\tif(sns.year_range){\r\n\t\t\t\t\t\t\tif (!isNaN(sns.year_range)) {\r\n\t\t\t\t\t\t\t\trange = sns.year_range;\r\n\t\t\t\t\t\t\t} else if (sns.year_range.push) {\r\n\t\t\t\t\t\t\t\t// if\r\n\t\t\t\t\t\t\t\tstart_year = sns.year_range[0];\r\n\t\t\t\t\t\t\t\tend_year = sns.year_range[1];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\trange = range || 10;\r\n\t\t\t\t\t\tvar offset = offset || Math.floor(range / 2);\r\n\t\t\t\t\t\tstart_year = start_year || dt.getFullYear() - offset;\r\n\t\t\t\t\t\tend_year = end_year || start_year + range;\r\n\r\n\t\t\t\t\t\tfor (var i = start_year; i < end_year; i++)\r\n\t\t\t\t\t\t\toptions += \"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%m\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_month_select\";\r\n\t\t\t\t\t\tsns._time_format_order[2] = p;\r\n\t\t\t\t\t\t//month\r\n\t\t\t\t\t\tfor (var i=0; i < 12; i++)\r\n\t\t\t\t\t\t\toptions+=\"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%d\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_day_select\";\r\n\t\t\t\t\t\tsns._time_format_order[1] = p;\r\n\t\t\t\t\t\t//days\r\n\t\t\t\t\t\tfor (var i=1; i < 32; i++)\r\n\t\t\t\t\t\t\toptions+=\"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%H:%i\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_time_select\";\r\n\t\t\t\t\t\tsns._time_format_order[0] = p;\r\n\t\t\t\t\t\t//hours\r\n\t\t\t\t\t\tvar i = first;\r\n\t\t\t\t\t\tvar tdate = dt.getDate();\r\n\t\t\t\t\t\tsns._time_values = [];\r\n\r\n\t\t\t\t\t\twhile(i\"+time+\"\";\r\n\t\t\t\t\t\t\tsns._time_values.push(i);\r\n\t\t\t\t\t\t\tdt.setTime(dt.valueOf()+this.config.time_step*60*1000);\r\n\t\t\t\t\t\t\tvar diff = (dt.getDate()!=tdate)?1:0; // moved or not to the next day\r\n\t\t\t\t\t\t\ti=diff*24*60+dt.getHours()*60+dt.getMinutes();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(options){\r\n\r\n\t\t\t\t\tvar ariaAttrs = scheduler._waiAria.lightboxSelectAttrString(time_option);\r\n\t\t\t\t\tvar readonly = sns.readonly ? \"disabled='disabled'\" : \"\";\r\n\t\t\t\t\thtml += \" \";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//var defaults = scheduler._lightbox_controls.defaults.select;\r\n\r\n\t\t\treturn \"
\"+html+\"  –  \"+html+\"
\";\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,config){\r\n\t\t\tvar cfg = scheduler.config;\r\n\t\t\tvar s=node.getElementsByTagName(\"select\");\r\n\t\t\tvar map = config._time_format_order;\r\n\t\t\tvar start_date, end_date;\r\n\r\n\t\t\tif(cfg.full_day) {\r\n\t\t\t\tif (!node._full_day){\r\n\t\t\t\t\tvar html = \"\";\r\n\t\t\t\t\tif (!scheduler.config.wide_form)\r\n\t\t\t\t\t\thtml = node.previousSibling.innerHTML+html;\r\n\t\t\t\t\tnode.previousSibling.innerHTML=html;\r\n\t\t\t\t\tnode._full_day=true;\r\n\t\t\t\t}\r\n\t\t\t\tvar input=node.previousSibling.getElementsByTagName(\"input\")[0];\r\n\t\t\t\tinput.checked = (scheduler.date.time_part(ev.start_date)===0 && scheduler.date.time_part(ev.end_date)===0);\r\n\r\n\t\t\t\ts[map[0]].disabled=input.checked;\r\n\t\t\t\ts[ map[0] + s.length/2 ].disabled=input.checked;\r\n\r\n\t\t\t\tif(!input.$_eventAttached){\r\n\t\t\t\t\tinput.$_eventAttached = true;\r\n\r\n\t\t\t\t\t\tscheduler.event(input, \"click\", function(){\r\n\t\t\t\t\t\tif(input.checked) {\r\n\t\t\t\t\t\t\tvar obj = {};\r\n\t\t\t\t\t\t\tscheduler.form_blocks.time.get_value(node,obj,config);\r\n\r\n\t\t\t\t\t\t\tstart_date = scheduler.date.date_part(obj.start_date);\r\n\t\t\t\t\t\t\tend_date = scheduler.date.date_part(obj.end_date);\r\n\r\n\t\t\t\t\t\t\tif (+end_date == +start_date || (+end_date >= +start_date && (ev.end_date.getHours() !== 0 || ev.end_date.getMinutes() !== 0)))\r\n\t\t\t\t\t\t\t\tend_date = scheduler.date.add(end_date, 1, \"day\");\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tstart_date = null;\r\n\t\t\t\t\t\t\tend_date = null;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\ts[map[0]].disabled=input.checked;\r\n\t\t\t\t\t\ts[ map[0] + s.length/2 ].disabled=input.checked;\r\n\r\n\t\t\t\t\t\t_fill_lightbox_select(s,0,start_date||ev.start_date);\r\n\t\t\t\t\t\t_fill_lightbox_select(s,4,end_date||ev.end_date);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(cfg.auto_end_date && cfg.event_duration) {\r\n\t\t\t\tvar _update_lightbox_select = function () {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (!(cfg.auto_end_date && cfg.event_duration)){\r\n\t\t\t\t\t\t// setting may be disabled after the handler is attached\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstart_date = new Date(s[map[3]].value,s[map[2]].value,s[map[1]].value,0,s[map[0]].value);\r\n\t\t\t\t\tend_date = new Date(start_date.getTime() + (scheduler.config.event_duration * 60 * 1000));\r\n\t\t\t\t\t_fill_lightbox_select(s, 4, end_date);\r\n\t\t\t\t};\r\n\t\t\t\tfor(var i=0; i<4; i++) {\r\n\t\t\t\t\tif(!s[i].$_eventAttached) {\r\n\t\t\t\t\t\ts[i].$_eventAttached = true;\r\n\t\t\t\t\t\tscheduler.event(s[i], \"change\", _update_lightbox_select);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction _fill_lightbox_select(s,i,d) {\r\n\t\t\t\tvar time_values = config._time_values;\r\n\t\t\t\tvar direct_value = d.getHours()*60+d.getMinutes();\r\n\t\t\t\tvar fixed_value = direct_value;\r\n\t\t\t\tvar value_found = false;\r\n\t\t\t\tfor (var k=0; k\";\r\n\t\tvar ariaAttr = \"\";\r\n\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\tariaAttr = this._waiAria.lightboxButtonAttrString(buttons[i]);\r\n\t\t\thtml += \"
\" + scheduler.locale.labels[buttons[i]] + \"
\";\r\n\t\t}\r\n\r\n\t\tbuttons = this.config.buttons_right;\r\n\t\tvar rtl = scheduler.config.rtl;\r\n\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\tariaAttr = this._waiAria.lightboxButtonAttrString(buttons[i]);\r\n\r\n\t\t\thtml += \"
\";\r\n\r\n\t\t\thtml += \"
\" + scheduler.locale.labels[buttons[i]] + \"
\";\r\n\t\t}\r\n\t\thtml += \"
\";\r\n\t\thtml+=\"
\";\r\n\t\td.innerHTML=html;\r\n\t\tif (scheduler.config.drag_lightbox){\r\n\t\t\tscheduler.event(d.firstChild, \"mousedown\", scheduler._ready_to_dnd);\r\n\t\t\tscheduler.event(d.firstChild, \"selectstart\", function(e){ \r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn false; \r\n\t\t\t});\r\n\t\t\td.firstChild.style.cursor = \"move\";\r\n\t\t\tscheduler._init_dnd_events();\r\n\r\n\t\t}\r\n\r\n\t\tthis._waiAria.lightboxAttr(d);\r\n\r\n\t\tthis.show_cover();\r\n\t\tthis._cover.insertBefore(d,this._cover.firstChild);\r\n\t\t\r\n\t\tthis._lightbox=d;\r\n\r\n\t\tvar sns=this.config.lightbox.sections;\r\n\t\thtml=\"\";\r\n\t\tfor (var i=0; i < sns.length; i++) {\r\n\t\t\tvar block=this.form_blocks[sns[i].type];\r\n\t\t\tif (!block) continue; //ignore incorrect blocks\r\n\t\t\tsns[i].id=\"area_\"+this.uid();\r\n\t\t\tvar button = \"\";\r\n\t\t\tif (sns[i].button){\r\n\t\t\t\tvar ariaAttr = scheduler._waiAria.lightboxSectionButtonAttrString(this.locale.labels[\"button_\"+sns[i].button]);\r\n\t\t\t\tbutton = \"
\"+this.locale.labels[\"button_\"+sns[i].button]+\"
\";\r\n\t\t\t}\r\n\r\n\t\t\tif (this.config.wide_form){\r\n\t\t\t\thtml+=\"
\";\r\n\t\t\t}\r\n\r\n\t\t\tvar label_name = this.locale.labels[\"section_\"+sns[i].name];\r\n\t\t\tif(typeof label_name !== \"string\"){\r\n\t\t\t\tlabel_name = sns[i].name;\r\n\t\t\t}\r\n\t\t\thtml+=\"
\"+button+ \"
\"+block.render.call(this,sns[i]);\r\n\t\t\thtml+=\"
\";\r\n\t\t}\r\n\r\n\t\tvar ds=d.getElementsByTagName(\"div\");\r\n\t\tfor (var i=0; i
 \r\n
\r\n
\r\n\r\n
`;\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler.getRootView = function() {\r\n\treturn {\r\n\t\tview: {\r\n\t\t\trender: function(){\r\n\t\t\t\treturn {\r\n\t\t\t\t\ttag: \"div\",\r\n\t\t\t\t\ttype: 1,\r\n\t\t\t\t\tattrs: {\r\n\t\t\t\t\t\tstyle: \"width:100%;height:100%;\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\thooks: {\r\n\t\t\t\t\t\t\"didInsert\": function(){\r\n\t\t\t\t\t\t\tscheduler.setCurrentView();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tbody: [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tel: this.el,\r\n\t\t\t\t\t\t\ttype: 1\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t};\r\n\t\t\t},\r\n\t\t\tinit: function(){\r\n\t\t\t\tvar container = document.createElement(\"DIV\");\r\n\t\t\t\tcontainer.id = \"scheduler_\"+ scheduler.uid();\r\n\t\t\t\tcontainer.style.width = \"100%\";\r\n\t\t\t\tcontainer.style.height = \"100%\";\r\n\t\t\t\tcontainer.classList.add(\"dhx_cal_container\");\r\n\t\t\t\tcontainer.cmp = \"grid\";\r\n\t\t\t\tcontainer.innerHTML = '
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
';\r\n\t\t\t\tscheduler.init(container);\r\n\r\n\t\t\t\tthis.el = container;\r\n\t\t\t}\r\n\t\t},\r\n\t\ttype: 4\r\n\t};\r\n};\r\n\r\n}","import global from \"../global\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\n(function(){\r\n\r\n\tvar setCurrentView = scheduler.setCurrentView,\r\n\t\tupdateView = scheduler.updateView;\r\n\tvar update_view_timer = null,\r\n\t\tcurr_view_timer = null;\r\n\r\n\tvar lazy_setCurrentView = function(date, mode){\r\n\t\tvar self = this;\r\n\t\tglobal.clearTimeout(curr_view_timer);\r\n\t\tglobal.clearTimeout(update_view_timer);\r\n\r\n\t\tvar oldDate = self._date,\r\n\t\t\toldMode = self._mode;\r\n\t\tupdateFlags(this, date, mode);\r\n\r\n\t\tcurr_view_timer = setTimeout(function(){\r\n\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif (!self.callEvent(\"onBeforeViewChange\", [oldMode, oldDate, mode || self._mode, date || self._date])){\r\n\t\t\t\tupdateFlags(self, oldDate, oldMode);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tupdateView.call(self, date, mode);\r\n\t\t\tself.callEvent(\"onViewChange\", [self._mode, self._date]);\r\n\r\n\t\t\tglobal.clearTimeout(update_view_timer);\r\n\t\t\tcurr_view_timer = 0;\r\n\t\t}, scheduler.config.delay_render);\r\n\t};\r\n\tvar lazy_updateView = function(date, mode){\r\n\t\tvar self = this,\r\n\t\t\tars = arguments;\r\n\r\n\t\tupdateFlags(this, date, mode);\r\n\r\n\t\tglobal.clearTimeout(update_view_timer);\r\n\t\tupdate_view_timer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif(curr_view_timer)\r\n\t\t\t\treturn;\r\n\r\n\t\t\tupdateView.apply(self, ars);\r\n\t\t}, scheduler.config.delay_render);\r\n\t};\r\n\tfunction updateFlags(scheduler, date, mode){\r\n\t\tif(date)\r\n\t\t\tscheduler._date = date;\r\n\t\tif(mode)\r\n\t\t\tscheduler._mode = mode;\r\n\r\n\t}\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\tif(scheduler.config.delay_render){\r\n\t\t\tscheduler.setCurrentView = lazy_setCurrentView;\r\n\t\t\tscheduler.updateView = lazy_updateView;\r\n\t\t}else{\r\n\t\t\tscheduler.setCurrentView = setCurrentView;\r\n\t\t\tscheduler.updateView = updateView;\r\n\t\t}\r\n\t});\r\n\r\n})();\r\n\r\n}","import global from \"../global\";\r\n\r\nexport default function extend(scheduler) {\r\n/*\r\nif (global.dataProcessor && !dataProcessor.prototype.init_original){\r\n\tdataProcessor.prototype.init_original=dataProcessor.prototype.init;\r\n\tdataProcessor.prototype.init=function(obj){\r\n\t\tthis.init_original(obj);\r\n\t\tobj._dataprocessor=this;\r\n\r\n\t\tthis.setTransactionMode(\"POST\",true);\r\n\t\tthis.serverProcessor+=(this.serverProcessor.indexOf(\"?\")!=-1?\"&\":\"?\")+\"editing=true\";\r\n\t};\r\n}*/\r\n\r\nscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\tif(typeof dhtmlxError !== \"undefined\") {\r\n\t\twindow.dhtmlxError.catchError(\"LoadXML\", function(a, b, c){\r\n\t\t\tvar message = c[0].responseText;\r\n\r\n\t\t\tswitch (scheduler.config.ajax_error){\r\n\t\t\t\tcase \"alert\":\r\n\t\t\t\t\tglobal.alert(message);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"console\":\r\n\t\t\t\t\tglobal.console.log(message);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n});\r\n\r\n\r\n}","import ar from \"./locale_ar\";\r\nimport be from \"./locale_be\";\r\nimport ca from \"./locale_ca\";\r\nimport cn from \"./locale_cn\";\r\nimport cs from \"./locale_cs\";\r\nimport da from \"./locale_da\";\r\nimport de from \"./locale_de\";\r\nimport el from \"./locale_el\";\r\nimport en from \"./locale_en\";\r\nimport es from \"./locale_es\";\r\nimport fi from \"./locale_fi\";\r\nimport fr from \"./locale_fr\";\r\nimport he from \"./locale_he\";\r\nimport hu from \"./locale_hu\";\r\nimport id from \"./locale_id\";\r\nimport it from \"./locale_it\";\r\nimport jp from \"./locale_jp\";\r\n\r\nimport LocaleManager from \"./locale_manager\";\r\n\r\nimport nb from \"./locale_nb\";\r\nimport nl from \"./locale_nl\";\r\nimport no from \"./locale_no\";\r\nimport pl from \"./locale_pl\";\r\nimport pt from \"./locale_pt\";\r\nimport ro from \"./locale_ro\";\r\nimport ru from \"./locale_ru\";\r\nimport si from \"./locale_si\";\r\nimport sk from \"./locale_sk\";\r\nimport sv from \"./locale_sv\";\r\nimport tr from \"./locale_tr\";\r\nimport ua from \"./locale_ua\";\r\n\r\nexport default function(){\r\n\treturn new LocaleManager({\r\n\t\ten,\r\n\t\tar,\r\n\t\tbe,\r\n\t\tca,\r\n\t\tcn,\r\n\t\tcs,\r\n\t\tda,\r\n\t\tde,\r\n\t\tel,\r\n\t\tes,\r\n\t\tfi,\r\n\t\tfr,\r\n\t\the,\r\n\t\thu,\r\n\t\tid,\r\n\t\tit,\r\n\t\tjp,\r\n\t\tnb,\r\n\t\tnl,\r\n\t\tno,\r\n\t\tpl,\r\n\t\tpt,\r\n\t\tro,\r\n\t\tru,\r\n\t\tsi,\r\n\t\tsk,\r\n\t\tsv,\r\n\t\ttr,\r\n\t\tua\r\n\t});\r\n}","export default class ExtensionsManager{\r\n\tconstructor(config){\r\n\t\tthis._extensions = {};\r\n\t\tfor(const i in config){\r\n\t\t\tthis._extensions[i] = config[i];\r\n\t\t}\r\n\t}\r\n\r\n\taddExtension(name, ext) {\r\n\t\tthis._extensions[name] = ext;\r\n\t}\r\n\r\n\tgetExtension(name) {\r\n\t\treturn this._extensions[name];\r\n\t}\r\n}","\r\nexport default function(){\r\n/* global dhtmlx */\r\nif (typeof dhtmlx != \"undefined\" && dhtmlx.attaches) {\r\n\tdhtmlx.attaches.attachScheduler = function (day, mode, tabs, scheduler) {\r\n\t\tvar tabs = tabs || '
';\r\n\t\tvar obj = document.createElement(\"DIV\");\r\n\t\tobj.id = \"dhxSchedObj_\" + this._genStr(12);\r\n\t\tobj.innerHTML = '
' + tabs + '
';\r\n\t\tdocument.body.appendChild(obj.firstChild);\r\n\r\n\t\tthis.attachObject(obj.id, false, true);\r\n\r\n\t\tthis.vs[this.av].sched = scheduler;\r\n\t\tthis.vs[this.av].schedId = obj.id;\r\n\t\tscheduler.setSizes = scheduler.updateView;\r\n\t\tscheduler.destructor = function () { };\r\n\t\tscheduler.init(obj.id, day, mode);\r\n\r\n\t\treturn this.vs[this._viewRestore()].sched;\r\n\t};\r\n}\r\n\r\n}","export default {\r\n\talert: (extension, assert) => {\r\n\t\tassert(false, `The ${extension} extension is not included in this version of dhtmlxScheduler.
\r\n\t\tYou may need a Professional version of the component.
\r\n\t\tContact us at https://dhtmlx.com/docs/contact.shtml if you have any questions.`);\r\n\t}\r\n};","export default function(scheduler){\r\n\r\n\r\n\r\n(function(){\r\n\tvar modalsStack = [];\r\n\r\n\tfunction isModal(){\r\n\t\treturn !!(modalsStack.length);\r\n\t}\r\n\r\n\tfunction isChildOf(child, parent){\r\n\t\twhile(child && child != parent){\r\n\t\t\tchild = child.parentNode;\r\n\t\t}\r\n\r\n\t\treturn !!(child == parent);\r\n\t}\r\n\r\n\tfunction afterPopup(box){\r\n\t\tsetTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif(!isModal() && !(isChildOf(document.activeElement, scheduler.$container))) {\r\n\t\t\t\tscheduler.focus();\r\n\t\t\t}\r\n\t\t}, 1);\r\n\t}\r\n\tfunction startModal(box){\r\n\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\tscheduler.event(box, \"keydown\", trapFocus);\r\n\t\tmodalsStack.push(box);\r\n\t\t//scheduler.$keyboardNavigation.dispatcher.disable();\r\n\t}\r\n\r\n\tfunction endModal(){\r\n\t\tvar box = modalsStack.pop();\r\n\t\tif(box) {\r\n\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t}\r\n\t\tafterPopup(box);\r\n\r\n\t}\r\n\r\n\tfunction isTopModal(box){\r\n\t//\tif(dhtmlx._modalsStack.length){\r\n\t//\t\treturn box == dhtmlx._modalsStack[dhtmlx._modalsStack.length - 1];\r\n\t//\t}else{\r\n\t\t\treturn box == modalsStack[modalsStack.length - 1];\r\n\t//\t}\r\n\r\n\t}\r\n\r\n\tfunction trapFocus(event){\r\n\t\tvar event = event || window.event;\r\n\t\tvar target = event.currentTarget;\r\n\t\tif(!isTopModal(target)) return;\r\n\r\n\t\tscheduler.$keyboardNavigation.trapFocus(target, event);\r\n\t}\r\n\r\n\tfunction traceLightbox(){\r\n\t\tstartModal(scheduler.getLightbox());\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onLightbox\", traceLightbox);\r\n\tscheduler.attachEvent(\"onAfterLightbox\", endModal);\r\n\r\n\tscheduler.attachEvent(\"onAfterQuickInfo\", function(){afterPopup();});\r\n\r\n\tif(!scheduler._keyNavMessagePopup) {\r\n\t\tscheduler._keyNavMessagePopup = true;\r\n\r\n\t\tvar focusElement = null;\r\n\t\tvar backupFocus = null;\r\n\t\tconst modalsStack = [];\r\n\t\tscheduler.attachEvent(\"onMessagePopup\", function(box){\r\n\t\t\tfocusElement = document.activeElement;\r\n\t\t\tbackupFocus = focusElement;\r\n\r\n\t\t\twhile(backupFocus && scheduler._getClassName(backupFocus).indexOf(\"dhx_cal_data\") < 0){\r\n\t\t\t\tbackupFocus = backupFocus.parentNode;\r\n\t\t\t}\r\n\t\t\tif(backupFocus){\r\n\t\t\t\tbackupFocus = backupFocus.parentNode;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t\tscheduler.event(box, \"keydown\", trapFocus);\r\n\t\t\tmodalsStack.push(box);\r\n\t\t});\r\n\r\n\r\n\t\tscheduler.attachEvent(\"onAfterMessagePopup\", function () {\r\n\t\t\tvar box = modalsStack.pop();\r\n\t\t\tif(box) {\r\n\t\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t\t}\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tvar currentTarget = document.activeElement;\r\n\t\t\t\twhile(currentTarget && scheduler._getClassName(currentTarget).indexOf(\"dhx_cal_light\") < 0){\r\n\t\t\t\t\tcurrentTarget = currentTarget.parentNode;\r\n\t\t\t\t}\r\n\t\t\t\tif(currentTarget)\r\n\t\t\t\t\treturn;\r\n\r\n\r\n\t\t\t\tif(focusElement && focusElement.parentNode){\r\n\t\t\t\t\tfocusElement.focus();\r\n\r\n\t\t\t\t}else if(backupFocus && backupFocus.parentNode){\r\n\t\t\t\t\tbackupFocus.focus();\r\n\t\t\t\t}\r\n\t\t\t\tfocusElement = null;\r\n\t\t\t\tbackupFocus = null;\r\n\r\n\t\t\t}, 1);\r\n\t\t});\r\n\t}\r\n\r\n\tscheduler.$keyboardNavigation.isModal = isModal;\r\n\r\n\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\r\n//Initial idea and implementation by Steve MC\r\nscheduler._temp_key_scope = function (){\r\n\r\n\tscheduler.config.key_nav = true;\r\n\r\n\tscheduler.$keyboardNavigation._pasteDate = null; // used for copy and paste operations\r\n\tscheduler.$keyboardNavigation._pasteSection = null; // used for copy and paste operations\r\n\tvar isCopy = null;\r\n\r\n\tvar pos = {};\r\n\r\n\tif(!document.body){\r\n\t\tscheduler.event(window, \"load\", function(){\r\n\t\t\tscheduler.event(document.body, \"mousemove\", trackMousePosition);\r\n\t\t});\r\n\t}else{\r\n\t\tscheduler.event(document.body, \"mousemove\", trackMousePosition);\r\n\t}\r\n\r\n\tfunction trackMousePosition(event){\r\n\t\tevent = event || window.event;\r\n\t\tpos.x = event.clientX;\r\n\t\tpos.y = event.clientY;\r\n\t}\r\n\tfunction currentTarget(){\r\n\r\n\t\tvar mousePointer = false;\r\n\t\tvar keyNavPointer = false;\r\n\r\n\t\tvar target = document.elementFromPoint(pos.x, pos.y);\r\n\t\twhile(target && target != scheduler._obj){\r\n\t\t\ttarget = target.parentNode;\r\n\t\t}\r\n\t\tmousePointer = !!(target == scheduler._obj);\r\n\r\n\t\tkeyNavPointer = scheduler.$keyboardNavigation.dispatcher.isEnabled();\r\n\r\n\t\treturn mousePointer || keyNavPointer;\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onMouseMove\", function(id,e){\r\n\t\tvar state = scheduler.getState();\r\n\r\n\t\t// make sure scheduler is fully initialized before calling scheduler.getActionData\r\n\t\tif(!(state.mode && state.min_date)){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar position = scheduler.getActionData(e);\r\n\t\tscheduler.$keyboardNavigation._pasteDate = position.date;\r\n\t\tscheduler.$keyboardNavigation._pasteSection = position.section;\r\n\t});\r\n\r\n\tfunction clear_event_after(ev){\r\n\t\tdelete ev.rec_type; delete ev.rec_pattern;\r\n\t\tdelete ev.event_pid; delete ev.event_length;\r\n\t}\r\n\r\n\tfunction copyEvent(ev){\r\n\t\treturn scheduler._lame_copy({}, ev);\r\n\t}\r\n\r\n\tscheduler._make_pasted_event = function(ev){\r\n\t\tvar date = scheduler.$keyboardNavigation._pasteDate;\r\n\t\tvar section = scheduler.$keyboardNavigation._pasteSection;\r\n\r\n\t\tvar event_duration = ev.end_date-ev.start_date;\r\n\r\n\t\tvar copy = copyEvent(ev);\r\n\t\tclear_event_after(copy);\r\n\t\tcopy.start_date = new Date(date);\r\n\t\tcopy.end_date = new Date(copy.start_date.valueOf() + event_duration);\r\n\r\n\t\tif(section){\r\n\t\t\tvar property = scheduler._get_section_property();\r\n\t\t\t// GS-2527: if the event has multiple sections, it will be inserted into the initial sections.\r\n\t\t\tif(scheduler.config.multisection && ev[property] && scheduler.isMultisectionEvent && scheduler.isMultisectionEvent(ev)) \r\n\t\t\t\tcopy[property] = ev[property]; // save initial set of resources for multisection view\r\n\t\t\telse\r\n\t\t\t\tcopy[property] = section;\r\n\t\t}\r\n\t\treturn copy;\r\n\t};\r\n\tscheduler._do_paste = function(is_copy, modified_ev, original_ev){\r\n\t\tif(scheduler.callEvent(\"onBeforeEventPasted\", [is_copy, modified_ev, original_ev]) === false){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tscheduler.addEvent(modified_ev);\r\n\t\tscheduler.callEvent(\"onEventPasted\", [is_copy, modified_ev, original_ev]);\r\n\t};\r\n\r\n\tscheduler._is_key_nav_active = function(){\r\n\t\tif(this._is_initialized() && !this._is_lightbox_open() && this.config.key_nav){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\r\n\tfunction getSelectedEvent(){\r\n\t\tvar node = scheduler.$keyboardNavigation.dispatcher.getActiveNode();\r\n\t\tif(node && node.eventId) return node.eventId;\r\n\t\treturn scheduler._select_id;\r\n\t}\r\n\r\n\tscheduler.event(document, \"keydown\", function(e){\r\n\t\t// compatibility fix - scheduler focus on ctrl+v on mouse hover\r\n\t\tif(((e.ctrlKey || e.metaKey) && e.keyCode == 86) && scheduler._buffer_event && !scheduler.$keyboardNavigation.dispatcher.isEnabled()) {\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.isActive = currentTarget();\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler._key_nav_copy_paste = function(e){\r\n\t\tif(!scheduler._is_key_nav_active()) return true;\r\n\r\n\t\tif (e.keyCode == 37 || e.keyCode == 39) { // Left, Right arrows\r\n\t\t\te.cancelBubble = true;\r\n\r\n\t\t\tvar next = scheduler.date.add(scheduler._date,(e.keyCode == 37 ? -1 : 1 ),scheduler._mode);\r\n\t\t\tscheduler.setCurrentView(next);\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tvar select_id = getSelectedEvent();\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 67) { // CTRL+C\r\n\t\t\tif (select_id) {\r\n\t\t\t\tscheduler._buffer_event = copyEvent(scheduler.getEvent(select_id));\r\n\t\t\t\tisCopy = true;\r\n\t\t\t\tscheduler.callEvent(\"onEventCopied\", [scheduler.getEvent(select_id)]);\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 88) { // CTRL+X\r\n\t\t\tif (select_id) {\r\n\t\t\t\tisCopy = false;\r\n\t\t\t\tvar ev = scheduler._buffer_event = copyEvent(scheduler.getEvent(select_id));\r\n\r\n\t\t\t\tscheduler.updateEvent(ev.id);\r\n\t\t\t\tscheduler.callEvent(\"onEventCut\", [ev]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 86 && currentTarget(e)) { // CTRL+V\r\n\t\t\tvar ev = scheduler._buffer_event ? scheduler.getEvent(scheduler._buffer_event.id) : scheduler._buffer_event;\r\n\t\t\tev = ev || scheduler._buffer_event;\r\n\r\n\t\t\tif (ev) {\r\n\t\t\t\tvar new_ev = scheduler._make_pasted_event(ev);\r\n\t\t\t\tif (isCopy) {\r\n\t\t\t\t\tnew_ev.id = scheduler.uid();\r\n\t\t\t\t\tscheduler._do_paste(isCopy, new_ev, ev);\r\n\t\t\t\t}\r\n\t\t\t\telse { // cut operation\r\n\t\t\t\t\tvar res = scheduler.callEvent(\"onBeforeEventChanged\",[new_ev, e, false, ev]);\r\n\t\t\t\t\tif (res) {\r\n\t\t\t\t\t\tscheduler._do_paste(isCopy, new_ev, ev);\r\n\t\t\t\t\t\tisCopy = true; // switch to copy after first paste operation\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t};\r\n};\r\nscheduler._temp_key_scope();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.attachSchedulerHandlers = function(){\r\n\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\tvar keyDownHandler = function(e){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\r\n\t\treturn dispatcher.keyDownHandler(e);\r\n\t};\r\n\r\n\tvar focusHandler = function () {\r\n\t\tdispatcher.keepScrollPosition(function () {\r\n\t\t\tdispatcher.focusGlobalNode();\r\n\t\t});\r\n\t};\r\n\r\n\tvar waitCall;\r\n\tscheduler.attachEvent(\"onDataRender\", function(){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\t\tif(!(dispatcher.isEnabled() && !scheduler.getState().editor_id)) return;\r\n\r\n\t\tclearTimeout(waitCall);\r\n\t\twaitCall = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif(!dispatcher.isEnabled())\r\n\t\t\t\tdispatcher.enable();\r\n\t\t\treFocusActiveNode();\r\n\t\t});\r\n\t});\r\n\r\n\tvar reFocusActiveNode = function(){\r\n\t\tif(!dispatcher.isEnabled())\r\n\t\t\treturn;\r\n\r\n\t\tvar activeNode = dispatcher.getActiveNode();\r\n\t\tif(!activeNode)\r\n\t\t\treturn;\r\n\r\n\t\tif(!activeNode.isValid()){\r\n\t\t\tactiveNode = activeNode.fallback();\r\n\t\t}\r\n\r\n\t\tif(!activeNode || activeNode instanceof scheduler.$keyboardNavigation.MinicalButton || activeNode instanceof scheduler.$keyboardNavigation.MinicalCell)\r\n\t\t\treturn;\r\n\r\n\t\tdispatcher.keepScrollPosition(function () {\r\n\t\t\tactiveNode.focus(true);\r\n\t\t});\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\tvar container = scheduler.$container;\r\n\t\tscheduler.eventRemove(document, \"keydown\", keyDownHandler);\r\n\t\tscheduler.eventRemove(container, \"mousedown\", mousedownHandler);\r\n\t\tscheduler.eventRemove(container, \"focus\", focusHandler);\r\n\r\n\r\n\t\tif(scheduler.config.key_nav){\r\n\r\n\t\t\tscheduler.event(document, \"keydown\", keyDownHandler);\r\n\t\t\tscheduler.event(container, \"mousedown\", mousedownHandler);\r\n\t\t\tscheduler.event(container, \"focus\", focusHandler);\r\n\r\n\t\t\tcontainer.setAttribute(\"tabindex\", \"0\");\r\n\r\n\t\t}else{\r\n\t\t\tcontainer.removeAttribute(\"tabindex\");\r\n\t\t}\r\n\t});\r\n\r\n\tfunction mousedownHandler(e){\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\r\n\t\tconst view = scheduler.getView();\r\n\t\tlet dataAreaClick = false;\r\n\t\tif (scheduler.getState().mode === \"month\") {\r\n\t\t\tdataAreaClick = scheduler.$keyboardNavigation.isChildOf(e.target || e.srcElement, scheduler.$container.querySelector(\".dhx_cal_month_table\"));\r\n\t\t} else if (view && view.layout === \"timeline\") {\r\n\t\t\tdataAreaClick = scheduler.$keyboardNavigation.isChildOf(e.target || e.srcElement, scheduler.$container.querySelector(\".dhx_timeline_data_col\"));\r\n\t\t} else {\r\n\t\t\tconst listOfScales = scheduler.$container.querySelectorAll(\".dhx_scale_holder\");\r\n\t\t\tconst arrOfScales = Array.from(listOfScales);\r\n\t\t\tdataAreaClick = arrOfScales.some(scale => scale === e.target.parentNode);\r\n\t\t}\r\n\r\n\t\tvar pos = scheduler.getActionData(e);\r\n\r\n\t\tvar focusNode;\r\n\t\tif(scheduler._locate_event(e.target || e.srcElement)){\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.Event(scheduler._locate_event(e.target || e.srcElement));\r\n\t\t}else if(dataAreaClick){\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(pos.date && dataAreaClick){\r\n\t\t\t\tfocusNode = focusNode.nextSlot(new scheduler.$keyboardNavigation.TimeSlot(pos.date, null, pos.section));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(focusNode) {\r\n\t\t\tif (!dispatcher.isEnabled()) {\r\n\t\t\t\tdispatcher.activeNode = focusNode;\r\n\r\n\t\t\t} else {\r\n\t\t\t\tif (pos.date && dataAreaClick) {\r\n\t\t\t\t\tdispatcher.delay(function () {\r\n\t\t\t\t\t\tdispatcher.setActiveNode(focusNode);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction focusEvent(evNode){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\t\tif(!dispatcher.isEnabled()) return;\r\n\r\n\r\n\t\tvar prevState = evNode;\r\n\t\tvar focusNode = new scheduler.$keyboardNavigation.Event(prevState.eventId);\r\n\t\tif(!focusNode.isValid()){\r\n\t\t\tvar lastStart = focusNode.start || prevState.start;\r\n\t\t\tvar lastEnd = focusNode.end || prevState.end;\r\n\t\t\tvar lastSection = focusNode.section || prevState.section;\r\n\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot(lastStart, lastEnd, lastSection);\r\n\t\t\tif(!focusNode.isValid()){\r\n\t\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdispatcher.setActiveNode(focusNode);\r\n\t\tvar node = dispatcher.getActiveNode();\r\n\t\tif(node && node.getNode && document.activeElement != node.getNode()){\r\n\t\t\tdispatcher.focusNode(dispatcher.getActiveNode());\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tvar updateEvent = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id){\r\n\t\tvar res = updateEvent.apply(this, arguments);\r\n\t\tif(scheduler.config.key_nav && dispatcher.isEnabled()){\r\n\t\t\tif(scheduler.getState().select_id == id){\r\n\t\t\t\tvar element = new scheduler.$keyboardNavigation.Event(id);\r\n\r\n\t\t\t\tif(!scheduler.getState().lightbox_id){\r\n\t\t\t\t\tfocusEvent(element);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onEventDeleted\", function(id) {\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\t\tif(dispatcher.isEnabled()){\r\n\t\t\tvar activeNode = dispatcher.getActiveNode();\r\n\t\t\tif(activeNode.eventId == id){\r\n\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onClearAll\", function(){\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\t\tif(dispatcher.isEnabled()){\r\n\t\t\tif(dispatcher.getActiveNode() instanceof scheduler.$keyboardNavigation.Event){\r\n\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n};\r\n\r\n}","import { IMapAdapter, ICalendarEvent, IMapSettings, IMapPosition} from \"./types\";\r\ndeclare let google: any;\r\n\r\nexport class GoogleMapAdapter implements IMapAdapter {\r\n\tprivate map: any;\r\n\tprivate scheduler: any;\r\n\tprivate settings: IMapSettings;\r\n\tprivate _markers: any[];\r\n\tprivate infoWindow: any;\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.map = null;\r\n\t\tthis._markers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t}\r\n\tonEventClick(event: ICalendarEvent): void {\r\n\t\tif (this._markers && this._markers.length > 0) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\t\tif (event.id == this._markers[i].event.id) {\r\n\t\t\t\t\tlet zoom = this.settings.zoom_after_resolve || this.settings.initial_zoom;\r\n\t\t\t\t\tif (event.lat && event.lng){\r\n\t\t\t\t\t\tthis.map.setCenter({\r\n\t\t\t\t\t\t\tlat: event.lat, \r\n\t\t\t\t\t\t\tlng: event.lng,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tthis.map.setZoom(zoom);\r\n\t\t\t\t\t} else {\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.map.setCenter({\r\n\t\t\t\t\t\t\tlat: this.settings.error_position.lat, \r\n\t\t\t\t\t\t\tlng: this.settings.error_position.lng,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tthis.map.setZoom(zoom);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tgoogle.maps.event.trigger(this._markers[i].marker, 'click');\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t} \r\n\t}\r\n\r\n\tinitialize(container: HTMLElement, options: IMapSettings): void {\r\n\t\tthis.settings = options;\r\n\t\tlet scheduler = this.scheduler;\r\n\t\tlet mapOptions = {\r\n\t\t\tcenter: { lat: options.initial_position.lat, lng: options.initial_position.lng },\r\n\t\t\tzoom: options.initial_zoom,\r\n\t\t\tmapId: container.id,\r\n\t\t\tscrollwheel: true,\r\n\t\t\tmapTypeId: options.type\r\n\t\t}\r\n\t\t// we need to reuse the google map to avoid leak memory\r\n\t\tif (this.map === null) {\r\n\t\t\tthis.map = new google.maps.Map(container, mapOptions);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tlet map = this.map;\r\n\t\t\tcontainer.appendChild(this.map.__gm.messageOverlay);\r\n\t\t\tcontainer.appendChild(this.map.__gm.outerContainer);\r\n\t\t\tsetTimeout(function() {\r\n\t\t\t\tmap.setOptions({container: container.id});\r\n\t\t\t}, 500);\r\n\t\t}\r\n\t\tgoogle.maps.event.addListener(this.map, \"dblclick\", function(event) {\r\n\t\t\tconst geocoder = new google.maps.Geocoder();\r\n\t\r\n\t\t\tif (!scheduler.config.readonly && scheduler.config.dblclick_create) {\r\n\t\t\t\tlet point = event.latLng;\r\n\t\t\t\tgeocoder.geocode(\r\n\t\t\t\t\t{ 'latLng': point },\r\n\t\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\t\tif (status == google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\t\tpoint = results[0].geometry.location;\r\n\t\t\t\t\t\t\tscheduler.addEventNow({\r\n\t\t\t\t\t\t\t\tlat: point.lat(),\r\n\t\t\t\t\t\t\t\tlng: point.lng(),\r\n\t\t\t\t\t\t\t\tevent_location: results[0].formatted_address,\r\n\t\t\t\t\t\t\t\tstart_date: scheduler.getState().date,\r\n\t\t\t\t\t\t\t\tend_date: scheduler.date.add(scheduler.getState().date, scheduler.config.time_step, \"minute\")\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tconsole.error('Geocode was not successful for the following reason: ' + status);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tdestroy(container: HTMLElement): void {\r\n\t\tgoogle.maps.event.clearInstanceListeners(window);\r\n\t\tgoogle.maps.event.clearInstanceListeners(document);\r\n\t\tgoogle.maps.event.clearInstanceListeners(container);\r\n\t\twhile (container.firstChild) {\r\n\t\t\tcontainer.firstChild.remove();\r\n\t\t}\r\n\t\tcontainer.innerHTML = \"\";\r\n\t}\r\n\r\n\tasync addEventMarker(event: ICalendarEvent): Promise {\r\n\t\tlet config = {\r\n\t\t\ttitle: event.text,\r\n\t\t\tposition: {},\r\n\t\t\tmap: {}\r\n\t\t}\r\n\t\t\r\n\t\tif (event.lat && event.lng) {\r\n\t\t\tconfig.position = { lat: event.lat, lng: event.lng };\r\n\t\t} else {\r\n\t\t\tconfig.position = { lat: this.settings.error_position.lat, lng: this.settings.error_position.lng }\r\n\t\t}\r\n\t\tconst { AdvancedMarkerElement } = await google.maps.importLibrary(\"marker\");\r\n\t\tlet marker;\r\n\t\tif (this.scheduler.ext.mapView.createMarker) {\r\n\t\t\tconfig.map = this.map;\r\n\t\t\tmarker = this.scheduler.ext.mapView.createMarker(config);\r\n\t\t} else {\r\n\t\t\tmarker = new AdvancedMarkerElement(config);\r\n\t\t\tmarker.map = this.map;\r\n\t\t}\r\n\t\tmarker.setMap(this.map);\r\n\t\t//case for markeks which were deleted with DataProcessor\r\n\t\tif (event[\"!nativeeditor_status\"] == \"true_deleted\"){\r\n\t\t\tmarker.setMap(null);\r\n\t\t}\r\n\t\tgoogle.maps.event.addListener(marker, \"click\", () => {\r\n\t\t\tif (this.infoWindow) {\r\n\t\t\t\tthis.infoWindow.close();\r\n\t\t\t}\r\n\t\t\tthis.infoWindow = new google.maps.InfoWindow({maxWidth: this.settings.info_window_max_width});\r\n\t\t\tthis.infoWindow.setContent(this.scheduler.templates.map_info_content(event));\r\n\t\t\tthis.infoWindow.open({\r\n\t\t\t\tanchor: marker,\r\n\t\t\t\tmap: this.map,\r\n\t\t\t});\r\n\t\t});\r\n\t\tlet markerInfo = {event, ...config, marker};\r\n\t\tthis._markers.push(markerInfo);\r\n\t}\r\n\r\n\tremoveEventMarker(eventId: string): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif (eventId == this._markers[i].event.id) {\r\n\t\t\t\tthis._markers[i].marker.setVisible(false);\r\n\t\t\t\tthis._markers[i].marker.setMap(null);\r\n\t\t\t\tthis._markers[i].marker.setPosition(null);\r\n\t\t\t\tthis._markers[i].marker = null;\r\n\t\t\t\tthis._markers.splice(i,1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tupdateEventMarker(event: ICalendarEvent): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif(this._markers[i].event.id == event.id) {\r\n\t\t\t\tthis._markers[i].event = event;\r\n\t\t\t\tthis._markers[i].position.lat = event.lat;\r\n\t\t\t\tthis._markers[i].position.lng = event.lng;\r\n\t\t\t\tthis._markers[i].text = event.text;\r\n\t\t\t\tlet latlng = new google.maps.LatLng(event.lat, event.lng);\r\n\t\t\t\tthis._markers[i].marker.setPosition(latlng);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tclearEventMarkers(): void {\r\n\t\tif (this._markers.length > 0) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\t\tthis._markers[i].marker.setMap(null);\r\n\t\t\t}\r\n\t\t\tthis._markers = [];\r\n\t\t}\r\n\t}\r\n\r\n\tsetView(latitude: number, longitude: number, zoom: number): void {\r\n\t\tthis.map.setCenter({\r\n\t\t\tlat: latitude, \r\n\t\t\tlng: longitude,\r\n\t\t});\r\n\t\tthis.map.setZoom(zoom);\r\n\t}\r\n\r\n\tasync resolveAddress(string: string): Promise {\r\n\t\tconst geocoder = new google.maps.Geocoder();\r\n\t\tlet position: any = await new Promise((resolve) => {\r\n\t\t\tgeocoder.geocode(\r\n\t\t\t\t{ 'address': string },\r\n\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\tif (status == google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\tresolve({\r\n\t\t\t\t\t\t lat: results[0].geometry.location.lat(),\r\n\t\t\t\t\t\t lng: results[0].geometry.location.lng()\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tconsole.error('Geocode was not successful for the following reason: ' + status);\r\n\t\t\t\t\t\tresolve({});\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t});\r\n\t\treturn position;\r\n\t}\r\n\t\r\n}","import { IMapAdapter, ICalendarEvent, IMapSettings, IMapPosition} from \"./types\";\r\n\r\ndeclare let L: any\r\n\r\nexport class OpenStreetMapAdapter implements IMapAdapter {\r\n\tprivate map: any;\r\n\tprivate scheduler: any;\r\n\tprivate _markers: any[];\r\n\tprivate settings: IMapSettings;\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.map = null;\r\n\t\tthis._markers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t}\r\n\tonEventClick(event: ICalendarEvent): void {\r\n\t\tif (this._markers && this._markers.length > 0) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\t\tif (event.id == this._markers[i].event.id) {\r\n\t\t\t\t\tthis._markers[i].marker.openPopup();\r\n\t\t\t\t\tthis._markers[i].marker.closeTooltip();\r\n\t\t\t\t\tif (event.lat && event.lng) {\r\n\t\t\t\t\t\tthis.setView(event.lat, event.lng, this.settings.zoom_after_resolve || this.settings.initial_zoom);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.setView(this.settings.error_position.lat, this.settings.error_position.lng, this.settings.zoom_after_resolve || this.settings.initial_zoom);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t} \r\n\t}\r\n\r\n\tinitialize(container: HTMLElement, options: IMapSettings): void {\r\n\t\tlet scheduler = this.scheduler;\r\n\t\tlet mapWrapper = document.createElement('div');\r\n\t\tmapWrapper.className = 'mapWrapper';\r\n\t\tmapWrapper.id = 'mapWrapper';\r\n\t\tmapWrapper.style.width = container.style.width;\r\n\t\tmapWrapper.style.height = container.style.height;\r\n\t\tcontainer.appendChild(mapWrapper);\r\n\r\n\t\tlet map = L.map(mapWrapper, {\r\n\t\t\tcenter: L.latLng(options.initial_position.lat, options.initial_position.lng),\r\n\t\t\tzoom: options.initial_zoom,\r\n\t\t\tkeyboard: false // need to set false, due to bug with moving window\r\n\t\t});\r\n\t\tL.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(map);\r\n\t\tmap.on(\"dblclick\", async function(e){\r\n\t\t\tconst settings = {\r\n\t\t\t\t\"method\": \"GET\",\r\n\t\t\t\theaders: {\r\n\t\t\t\t\t\"Accept-Language\": \"en\",\r\n\t\t\t\t},\r\n\t\t\t};\r\n\t\t\tlet response = await fetch(`https://nominatim.openstreetmap.org/reverse?lat=${e.latlng.lat}&lon=${e.latlng.lng}&format=json`, settings).then(response => response.json());\r\n\t\t\tif (response.address) {\r\n\t\t\t\tlet address = response.address.country;\r\n\t\t\t\tscheduler.addEventNow({\r\n\t\t\t\t\tlat: e.latlng.lat,\r\n\t\t\t\t\tlng: e.latlng.lng,\r\n\t\t\t\t\tevent_location: address,\r\n\t\t\t\t\tstart_date: scheduler.getState().date,\r\n\t\t\t\t\tend_date: scheduler.date.add(scheduler.getState().date, scheduler.config.time_step, \"minute\")\r\n\t\t\t\t});\r\n\t\t\t} else {\r\n\t\t\t\tconsole.error(\"unable recieve a position of the event\", response.error);\r\n\t\t\t}\r\n\t\t});\r\n\t\tthis.map = map;\r\n\t\tthis.settings = options;\r\n\t}\r\n\r\n\tdestroy(container: HTMLElement): void {\r\n\t\tthis.map.remove();\r\n\t\twhile (container.firstChild) {\r\n\t\t\tcontainer.firstChild.remove();\r\n\t\t}\r\n\t\tcontainer.innerHTML = \"\";\r\n\t}\r\n\r\n\taddEventMarker(event: ICalendarEvent): void {\r\n\t\tconst myIcon = L.icon({\r\n\t\t\ticonUrl: 'https://unpkg.com/leaflet@1.0.3/dist/images/marker-icon.png',\r\n\t\t\ticonSize: [25, 41],\r\n\t\t\tshadowSize: [30, 65],\r\n\t\t\ticonAnchor: [12, 41],\r\n\t\t\tshadowAnchor: [7, 65]\r\n\t\t});\r\n\t\tlet popupConfig = {\r\n\t\t\tminWidth: 180,\r\n\t\t\tmaxWidth: this.settings.info_window_max_width,\r\n\t\t}\r\n\t\tconst markerPopup = L.popup(popupConfig).setContent(this.scheduler.templates.map_info_content(event));\r\n\t\tconst tooltip = L.tooltip().setContent(event.text);\r\n\r\n\t\tlet markerConfig = [\r\n\t\t\tevent.lat,\r\n\t\t\tevent.lng\r\n\t\t]\r\n\t\t\r\n\t\tif (!event.lat || !event.lng) {\r\n\t\t\tmarkerConfig = [this.settings.error_position.lat, this.settings.error_position.lng];\r\n\t\t}\r\n\t\tconst marker = L.marker(markerConfig, {\r\n\t\t\ticon: myIcon\r\n\t\t}).bindPopup(markerPopup).bindTooltip(tooltip).addTo(this.map);\r\n\t\tconst markerInfo = {event, marker};\r\n\t\tthis._markers.push(markerInfo);\t\t\r\n\t}\r\n\r\n\tremoveEventMarker(eventId: string): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif (eventId == this._markers[i].event.id) {\r\n\t\t\t\tthis.map.removeLayer(this._markers[i].marker);\r\n\t\t\t\tthis._markers.splice(i,1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tupdateEventMarker(event: ICalendarEvent): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif(this._markers[i].event.id == event.id) {\r\n\t\t\t\tthis._markers[i].event = event;\r\n\t\t\t\tif (!event.lat || !event.lng){\r\n\t\t\t\t\tthis._markers[i].marker.setLatLng([this.settings.error_position.lat, this.settings.error_position.lng]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis._markers[i].marker.setLatLng([event.lat, event.lng]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tclearEventMarkers(): void {\r\n\t\tif(this._markers) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\t\tthis.map.removeLayer(this._markers[i].marker); \r\n\t\t\t}\r\n\t\t\tthis._markers = [];\r\n\t\t}\r\n\t}\r\n\r\n\tsetView(latitude: number, longitude: number, zoom: number): void {\r\n\t\tthis.map.setView([latitude, longitude], zoom);\r\n\t}\r\n\r\n\tasync resolveAddress(string: string): Promise {\r\n\t\tconst settings = {\r\n\t\t\t\"method\": \"GET\",\r\n\t\t\theaders: {\r\n\t\t\t\t\"Accept-Language\": \"en\",\r\n\t\t\t},\r\n\t\t};\r\n\t\tlet position:any = {};\r\n\t\tlet response = await fetch(`https://nominatim.openstreetmap.org/search?q=${string}&format=json`, settings).then(response => response.json());\r\n\t\tif (response && response.length) {\r\n\t\t\tposition.lat = +response[0].lat;\r\n\t\t\tposition.lng = +response[0].lon;\r\n\t\t} else {\r\n\t\t\tconsole.error(`Unable recieve a position of the event's location: ${string}`);\r\n\t\t}\r\n\t\treturn position;\r\n\t}\r\n}","import { IMapAdapter, ICalendarEvent, IMapSettings, IMapPosition} from \"./types\";\r\n\r\ndeclare let mapboxgl: any;\r\ndeclare let MapboxGeocoder: any;\r\n\r\nexport class MapboxAdapter implements IMapAdapter {\r\n\tprivate map: any;\r\n\tprivate scheduler: any;\r\n\tprivate settings: IMapSettings;\r\n\tprivate _markers: any[];\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.map = null;\r\n\t\tthis._markers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t}\r\n\tonEventClick(event: ICalendarEvent): void {\r\n\t\tif (this._markers && this._markers.length > 0) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n const popup = this._markers[i].marker.getPopup();\r\n if (popup.isOpen()){\r\n popup.remove();\r\n }\r\n\t\t\t\tif (event.id == this._markers[i].event.id) {\r\n\t\t\t\t\tthis._markers[i].marker.togglePopup();\r\n\t\t\t\t\tif (event.lat && event.lng) {\r\n\t\t\t\t\t\tthis.setView(event.lat, event.lng, this.settings.zoom_after_resolve || this.settings.initial_zoom);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.setView(this.settings.error_position.lat, this.settings.error_position.lng, this.settings.zoom_after_resolve || this.settings.initial_zoom);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t} \r\n\t}\r\n\r\n\tinitialize(container: HTMLElement, options: IMapSettings): void {\r\n let scheduler = this.scheduler;\r\n\r\n\t\tmapboxgl.accessToken = options.accessToken;\r\n const map = new mapboxgl.Map({\r\n container: container, \r\n center: [options.initial_position.lng, options.initial_position.lat], \r\n zoom: options.initial_zoom + 1, // problems with coordinates if zoom = 1\r\n });\r\n map.on(\"dblclick\",async function(e){\r\n\t\t\tlet response = await fetch(`https://api.mapbox.com/geocoding/v5/mapbox.places/${e.lngLat.lng},${ e.lngLat.lat}.json?access_token=${options.accessToken}`).then(response => response.json());\r\n\t\t\tif (response.features){\r\n\t\t\t\tlet address = response.features[0].place_name;\r\n\t\t\t\tscheduler.addEventNow({\r\n\t\t\t\t\tlat: e.lngLat.lat,\r\n\t\t\t\t\tlng: e.lngLat.lng,\r\n\t\t\t\t\tevent_location: address,\r\n\t\t\t\t\tstart_date: scheduler.getState().date,\r\n\t\t\t\t\tend_date: scheduler.date.add(scheduler.getState().date, scheduler.config.time_step, \"minute\")\r\n\t\t\t\t});\r\n\t\t\t} else {\r\n\t\t\t\tconsole.error(\"unable recieve a position of the event\");\r\n\t\t\t}\r\n\t\t});\r\n this.map = map;\r\n this.settings = options;\r\n\t}\r\n\r\n\tdestroy(container: HTMLElement): void {\r\n\t\tthis.map.remove();\r\n while (container.firstChild) {\r\n\t\t\tcontainer.firstChild.remove();\r\n\t\t}\r\n container.innerHTML = \"\";\r\n\t}\r\n\r\n\taddEventMarker(event: ICalendarEvent): void {\r\n let config = [\r\n\t\t\tevent.lng,\r\n\t\t\tevent.lat\r\n\t\t]\r\n\t\t\r\n\t\tif (!event.lat || !event.lng) {\r\n\t\t\tconfig = [this.settings.error_position.lng, this.settings.error_position.lat];\r\n\t\t} \r\n\r\n\t\tconst popup = new mapboxgl.Popup({ offset: 25, focusAfterOpen: false})\r\n .setMaxWidth(`${this.settings.info_window_max_width}px`) \r\n .setHTML(this.scheduler.templates.map_info_content(event));\r\n const marker = new mapboxgl.Marker()\r\n .setLngLat(config)\r\n .setPopup(popup)\r\n .addTo(this.map);\r\n const markerInfo = {event, marker}; \r\n this._markers.push(markerInfo);\r\n\t}\r\n\r\n\tremoveEventMarker(eventId: string): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif (eventId == this._markers[i].event.id) {\r\n\t\t\t\tthis._markers[i].marker.remove();\r\n this._markers.splice(i,1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tupdateEventMarker(event: ICalendarEvent): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif(this._markers[i].event.id == event.id) {\r\n\t\t\t\tthis._markers[i].event = event;\r\n\t\t\t\tif (!event.lat || !event.lng){\r\n\t\t\t\t\tthis._markers[i].marker.setLngLat([this.settings.error_position.lng, this.settings.error_position.lat]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis._markers[i].marker.setLngLat([event.lng, event.lat]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tclearEventMarkers(): void {\r\n\t\tfor (let i = 0; i {\r\n\t\tlet response = await fetch(`https://api.mapbox.com/geocoding/v5/mapbox.places/${string}.json?access_token=${this.settings.accessToken}`).then(response => response.json());\r\n\t\tlet position:any = {};\r\n\t\tif (response && response.features.length) {\r\n\t\t\tposition.lng = response.features[0].center[0];\r\n\t\t\tposition.lat = response.features[0].center[1];\r\n\t\t} else {\r\n\t\t\tconsole.error(`Unable recieve a position of the event's location: ${string}`);\r\n\t\t}\r\n\t\treturn position;\r\n\t}\r\n}","// =============================================================================\n// Weekday\n// =============================================================================\nexport var ALL_WEEKDAYS = [\n 'MO',\n 'TU',\n 'WE',\n 'TH',\n 'FR',\n 'SA',\n 'SU',\n];\nvar Weekday = /** @class */ (function () {\n function Weekday(weekday, n) {\n if (n === 0)\n throw new Error(\"Can't create weekday with n == 0\");\n this.weekday = weekday;\n this.n = n;\n }\n Weekday.fromStr = function (str) {\n return new Weekday(ALL_WEEKDAYS.indexOf(str));\n };\n // __call__ - Cannot call the object directly, do it through\n // e.g. RRule.TH.nth(-1) instead,\n Weekday.prototype.nth = function (n) {\n return this.n === n ? this : new Weekday(this.weekday, n);\n };\n // __eq__\n Weekday.prototype.equals = function (other) {\n return this.weekday === other.weekday && this.n === other.n;\n };\n // __repr__\n Weekday.prototype.toString = function () {\n var s = ALL_WEEKDAYS[this.weekday];\n if (this.n)\n s = (this.n > 0 ? '+' : '') + String(this.n) + s;\n return s;\n };\n Weekday.prototype.getJsWeekday = function () {\n return this.weekday === 6 ? 0 : this.weekday + 1;\n };\n return Weekday;\n}());\nexport { Weekday };\n//# sourceMappingURL=weekday.js.map","// =============================================================================\n// Helper functions\n// =============================================================================\nimport { ALL_WEEKDAYS } from './weekday';\nexport var isPresent = function (value) {\n return value !== null && value !== undefined;\n};\nexport var isNumber = function (value) {\n return typeof value === 'number';\n};\nexport var isWeekdayStr = function (value) {\n return typeof value === 'string' && ALL_WEEKDAYS.includes(value);\n};\nexport var isArray = Array.isArray;\n/**\n * Simplified version of python's range()\n */\nexport var range = function (start, end) {\n if (end === void 0) { end = start; }\n if (arguments.length === 1) {\n end = start;\n start = 0;\n }\n var rang = [];\n for (var i = start; i < end; i++)\n rang.push(i);\n return rang;\n};\nexport var clone = function (array) {\n return [].concat(array);\n};\nexport var repeat = function (value, times) {\n var i = 0;\n var array = [];\n if (isArray(value)) {\n for (; i < times; i++)\n array[i] = [].concat(value);\n }\n else {\n for (; i < times; i++)\n array[i] = value;\n }\n return array;\n};\nexport var toArray = function (item) {\n if (isArray(item)) {\n return item;\n }\n return [item];\n};\nexport function padStart(item, targetLength, padString) {\n if (padString === void 0) { padString = ' '; }\n var str = String(item);\n targetLength = targetLength >> 0;\n if (str.length > targetLength) {\n return String(str);\n }\n targetLength = targetLength - str.length;\n if (targetLength > padString.length) {\n padString += repeat(padString, targetLength / padString.length);\n }\n return padString.slice(0, targetLength) + String(str);\n}\n/**\n * Python like split\n */\nexport var split = function (str, sep, num) {\n var splits = str.split(sep);\n return num\n ? splits.slice(0, num).concat([splits.slice(num).join(sep)])\n : splits;\n};\n/**\n * closure/goog/math/math.js:modulo\n * Copyright 2006 The Closure Library Authors.\n * The % operator in JavaScript returns the remainder of a / b, but differs from\n * some other languages in that the result will have the same sign as the\n * dividend. For example, -1 % 8 == -1, whereas in some other languages\n * (such as Python) the result would be 7. This function emulates the more\n * correct modulo behavior, which is useful for certain applications such as\n * calculating an offset index in a circular list.\n *\n * @param {number} a The dividend.\n * @param {number} b The divisor.\n * @return {number} a % b where the result is between 0 and b (either 0 <= x < b\n * or b < x <= 0, depending on the sign of b).\n */\nexport var pymod = function (a, b) {\n var r = a % b;\n // If r and b differ in sign, add b to wrap the result to the correct sign.\n return r * b < 0 ? r + b : r;\n};\n/**\n * @see: \n */\nexport var divmod = function (a, b) {\n return { div: Math.floor(a / b), mod: pymod(a, b) };\n};\nexport var empty = function (obj) {\n return !isPresent(obj) || obj.length === 0;\n};\n/**\n * Python-like boolean\n *\n * @return {Boolean} value of an object/primitive, taking into account\n * the fact that in Python an empty list's/tuple's\n * boolean value is False, whereas in JS it's true\n */\nexport var notEmpty = function (obj) {\n return !empty(obj);\n};\n/**\n * Return true if a value is in an array\n */\nexport var includes = function (arr, val) {\n return notEmpty(arr) && arr.indexOf(val) !== -1;\n};\n//# sourceMappingURL=helpers.js.map","import { padStart } from './helpers';\nexport var datetime = function (y, m, d, h, i, s) {\n if (h === void 0) { h = 0; }\n if (i === void 0) { i = 0; }\n if (s === void 0) { s = 0; }\n return new Date(Date.UTC(y, m - 1, d, h, i, s));\n};\n/**\n * General date-related utilities.\n * Also handles several incompatibilities between JavaScript and Python\n *\n */\nexport var MONTH_DAYS = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n/**\n * Number of milliseconds of one day\n */\nexport var ONE_DAY = 1000 * 60 * 60 * 24;\n/**\n * @see: \n */\nexport var MAXYEAR = 9999;\n/**\n * Python uses 1-Jan-1 as the base for calculating ordinals but we don't\n * want to confuse the JS engine with milliseconds > Number.MAX_NUMBER,\n * therefore we use 1-Jan-1970 instead\n */\nexport var ORDINAL_BASE = datetime(1970, 1, 1);\n/**\n * Python: MO-SU: 0 - 6\n * JS: SU-SAT 0 - 6\n */\nexport var PY_WEEKDAYS = [6, 0, 1, 2, 3, 4, 5];\n/**\n * py_date.timetuple()[7]\n */\nexport var getYearDay = function (date) {\n var dateNoTime = new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate());\n return (Math.ceil((dateNoTime.valueOf() - new Date(date.getUTCFullYear(), 0, 1).valueOf()) /\n ONE_DAY) + 1);\n};\nexport var isLeapYear = function (year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n};\nexport var isDate = function (value) {\n return value instanceof Date;\n};\nexport var isValidDate = function (value) {\n return isDate(value) && !isNaN(value.getTime());\n};\n/**\n * @return {Number} the date's timezone offset in ms\n */\nexport var tzOffset = function (date) {\n return date.getTimezoneOffset() * 60 * 1000;\n};\n/**\n * @see: \n */\nexport var daysBetween = function (date1, date2) {\n // The number of milliseconds in one day\n // Convert both dates to milliseconds\n var date1ms = date1.getTime();\n var date2ms = date2.getTime();\n // Calculate the difference in milliseconds\n var differencems = date1ms - date2ms;\n // Convert back to days and return\n return Math.round(differencems / ONE_DAY);\n};\n/**\n * @see: \n */\nexport var toOrdinal = function (date) {\n return daysBetween(date, ORDINAL_BASE);\n};\n/**\n * @see - \n */\nexport var fromOrdinal = function (ordinal) {\n return new Date(ORDINAL_BASE.getTime() + ordinal * ONE_DAY);\n};\nexport var getMonthDays = function (date) {\n var month = date.getUTCMonth();\n return month === 1 && isLeapYear(date.getUTCFullYear())\n ? 29\n : MONTH_DAYS[month];\n};\n/**\n * @return {Number} python-like weekday\n */\nexport var getWeekday = function (date) {\n return PY_WEEKDAYS[date.getUTCDay()];\n};\n/**\n * @see: \n */\nexport var monthRange = function (year, month) {\n var date = datetime(year, month + 1, 1);\n return [getWeekday(date), getMonthDays(date)];\n};\n/**\n * @see: \n */\nexport var combine = function (date, time) {\n time = time || date;\n return new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), time.getHours(), time.getMinutes(), time.getSeconds(), time.getMilliseconds()));\n};\nexport var clone = function (date) {\n var dolly = new Date(date.getTime());\n return dolly;\n};\nexport var cloneDates = function (dates) {\n var clones = [];\n for (var i = 0; i < dates.length; i++) {\n clones.push(clone(dates[i]));\n }\n return clones;\n};\n/**\n * Sorts an array of Date or Time objects\n */\nexport var sort = function (dates) {\n dates.sort(function (a, b) {\n return a.getTime() - b.getTime();\n });\n};\nexport var timeToUntilString = function (time, utc) {\n if (utc === void 0) { utc = true; }\n var date = new Date(time);\n return [\n padStart(date.getUTCFullYear().toString(), 4, '0'),\n padStart(date.getUTCMonth() + 1, 2, '0'),\n padStart(date.getUTCDate(), 2, '0'),\n 'T',\n padStart(date.getUTCHours(), 2, '0'),\n padStart(date.getUTCMinutes(), 2, '0'),\n padStart(date.getUTCSeconds(), 2, '0'),\n utc ? 'Z' : '',\n ].join('');\n};\nexport var untilStringToDate = function (until) {\n var re = /^(\\d{4})(\\d{2})(\\d{2})(T(\\d{2})(\\d{2})(\\d{2})Z?)?$/;\n var bits = re.exec(until);\n if (!bits)\n throw new Error(\"Invalid UNTIL value: \".concat(until));\n return new Date(Date.UTC(parseInt(bits[1], 10), parseInt(bits[2], 10) - 1, parseInt(bits[3], 10), parseInt(bits[5], 10) || 0, parseInt(bits[6], 10) || 0, parseInt(bits[7], 10) || 0));\n};\nvar dateTZtoISO8601 = function (date, timeZone) {\n // date format for sv-SE is almost ISO8601\n var dateStr = date.toLocaleString('sv-SE', { timeZone: timeZone });\n // '2023-02-07 10:41:36'\n return dateStr.replace(' ', 'T') + 'Z';\n};\nexport var dateInTimeZone = function (date, timeZone) {\n var localTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;\n // Date constructor can only reliably parse dates in ISO8601 format\n var dateInLocalTZ = new Date(dateTZtoISO8601(date, localTimeZone));\n var dateInTargetTZ = new Date(dateTZtoISO8601(date, timeZone !== null && timeZone !== void 0 ? timeZone : 'UTC'));\n var tzOffset = dateInTargetTZ.getTime() - dateInLocalTZ.getTime();\n return new Date(date.getTime() - tzOffset);\n};\n//# sourceMappingURL=dateutil.js.map","/**\n * This class helps us to emulate python's generators, sorta.\n */\nvar IterResult = /** @class */ (function () {\n function IterResult(method, args) {\n this.minDate = null;\n this.maxDate = null;\n this._result = [];\n this.total = 0;\n this.method = method;\n this.args = args;\n if (method === 'between') {\n this.maxDate = args.inc\n ? args.before\n : new Date(args.before.getTime() - 1);\n this.minDate = args.inc ? args.after : new Date(args.after.getTime() + 1);\n }\n else if (method === 'before') {\n this.maxDate = args.inc ? args.dt : new Date(args.dt.getTime() - 1);\n }\n else if (method === 'after') {\n this.minDate = args.inc ? args.dt : new Date(args.dt.getTime() + 1);\n }\n }\n /**\n * Possibly adds a date into the result.\n *\n * @param {Date} date - the date isn't necessarly added to the result\n * list (if it is too late/too early)\n * @return {Boolean} true if it makes sense to continue the iteration\n * false if we're done.\n */\n IterResult.prototype.accept = function (date) {\n ++this.total;\n var tooEarly = this.minDate && date < this.minDate;\n var tooLate = this.maxDate && date > this.maxDate;\n if (this.method === 'between') {\n if (tooEarly)\n return true;\n if (tooLate)\n return false;\n }\n else if (this.method === 'before') {\n if (tooLate)\n return false;\n }\n else if (this.method === 'after') {\n if (tooEarly)\n return true;\n this.add(date);\n return false;\n }\n return this.add(date);\n };\n /**\n *\n * @param {Date} date that is part of the result.\n * @return {Boolean} whether we are interested in more values.\n */\n IterResult.prototype.add = function (date) {\n this._result.push(date);\n return true;\n };\n /**\n * 'before' and 'after' return only one date, whereas 'all'\n * and 'between' an array.\n *\n * @return {Date,Array?}\n */\n IterResult.prototype.getValue = function () {\n var res = this._result;\n switch (this.method) {\n case 'all':\n case 'between':\n return res;\n case 'before':\n case 'after':\n default:\n return (res.length ? res[res.length - 1] : null);\n }\n };\n IterResult.prototype.clone = function () {\n return new IterResult(this.method, this.args);\n };\n return IterResult;\n}());\nexport default IterResult;\n//# sourceMappingURL=iterresult.js.map","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol */\n\nvar 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 (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(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\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n function next() {\n while (env.stack.length) {\n var rec = env.stack.pop();\n try {\n var result = rec.dispose && rec.dispose.call(rec.value);\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n catch (e) {\n fail(e);\n }\n }\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n};\n","import { __extends } from \"tslib\";\nimport IterResult from './iterresult';\n/**\n * IterResult subclass that calls a callback function on each add,\n * and stops iterating when the callback returns false.\n */\nvar CallbackIterResult = /** @class */ (function (_super) {\n __extends(CallbackIterResult, _super);\n function CallbackIterResult(method, args, iterator) {\n var _this = _super.call(this, method, args) || this;\n _this.iterator = iterator;\n return _this;\n }\n CallbackIterResult.prototype.add = function (date) {\n if (this.iterator(date, this._result.length)) {\n this._result.push(date);\n return true;\n }\n return false;\n };\n return CallbackIterResult;\n}(IterResult));\nexport default CallbackIterResult;\n//# sourceMappingURL=callbackiterresult.js.map","export var Frequency;\n(function (Frequency) {\n Frequency[Frequency[\"YEARLY\"] = 0] = \"YEARLY\";\n Frequency[Frequency[\"MONTHLY\"] = 1] = \"MONTHLY\";\n Frequency[Frequency[\"WEEKLY\"] = 2] = \"WEEKLY\";\n Frequency[Frequency[\"DAILY\"] = 3] = \"DAILY\";\n Frequency[Frequency[\"HOURLY\"] = 4] = \"HOURLY\";\n Frequency[Frequency[\"MINUTELY\"] = 5] = \"MINUTELY\";\n Frequency[Frequency[\"SECONDLY\"] = 6] = \"SECONDLY\";\n})(Frequency || (Frequency = {}));\nexport function freqIsDailyOrGreater(freq) {\n return freq < Frequency.HOURLY;\n}\n//# sourceMappingURL=types.js.map","// =============================================================================\n// i18n\n// =============================================================================\nvar ENGLISH = {\n dayNames: [\n 'Sunday',\n 'Monday',\n 'Tuesday',\n 'Wednesday',\n 'Thursday',\n 'Friday',\n 'Saturday',\n ],\n monthNames: [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n ],\n tokens: {\n SKIP: /^[ \\r\\n\\t]+|^\\.$/,\n number: /^[1-9][0-9]*/,\n numberAsText: /^(one|two|three)/i,\n every: /^every/i,\n 'day(s)': /^days?/i,\n 'weekday(s)': /^weekdays?/i,\n 'week(s)': /^weeks?/i,\n 'hour(s)': /^hours?/i,\n 'minute(s)': /^minutes?/i,\n 'month(s)': /^months?/i,\n 'year(s)': /^years?/i,\n on: /^(on|in)/i,\n at: /^(at)/i,\n the: /^the/i,\n first: /^first/i,\n second: /^second/i,\n third: /^third/i,\n nth: /^([1-9][0-9]*)(\\.|th|nd|rd|st)/i,\n last: /^last/i,\n for: /^for/i,\n 'time(s)': /^times?/i,\n until: /^(un)?til/i,\n monday: /^mo(n(day)?)?/i,\n tuesday: /^tu(e(s(day)?)?)?/i,\n wednesday: /^we(d(n(esday)?)?)?/i,\n thursday: /^th(u(r(sday)?)?)?/i,\n friday: /^fr(i(day)?)?/i,\n saturday: /^sa(t(urday)?)?/i,\n sunday: /^su(n(day)?)?/i,\n january: /^jan(uary)?/i,\n february: /^feb(ruary)?/i,\n march: /^mar(ch)?/i,\n april: /^apr(il)?/i,\n may: /^may/i,\n june: /^june?/i,\n july: /^july?/i,\n august: /^aug(ust)?/i,\n september: /^sep(t(ember)?)?/i,\n october: /^oct(ober)?/i,\n november: /^nov(ember)?/i,\n december: /^dec(ember)?/i,\n comma: /^(,\\s*|(and|or)\\s*)+/i,\n },\n};\nexport default ENGLISH;\n//# sourceMappingURL=i18n.js.map","import ENGLISH from './i18n';\nimport { RRule } from '../rrule';\nimport { isArray, isNumber, isPresent } from '../helpers';\n// =============================================================================\n// Helper functions\n// =============================================================================\n/**\n * Return true if a value is in an array\n */\nvar contains = function (arr, val) {\n return arr.indexOf(val) !== -1;\n};\nvar defaultGetText = function (id) { return id.toString(); };\nvar defaultDateFormatter = function (year, month, day) { return \"\".concat(month, \" \").concat(day, \", \").concat(year); };\n/**\n *\n * @param {RRule} rrule\n * Optional:\n * @param {Function} gettext function\n * @param {Object} language definition\n * @constructor\n */\nvar ToText = /** @class */ (function () {\n function ToText(rrule, gettext, language, dateFormatter) {\n if (gettext === void 0) { gettext = defaultGetText; }\n if (language === void 0) { language = ENGLISH; }\n if (dateFormatter === void 0) { dateFormatter = defaultDateFormatter; }\n this.text = [];\n this.language = language || ENGLISH;\n this.gettext = gettext;\n this.dateFormatter = dateFormatter;\n this.rrule = rrule;\n this.options = rrule.options;\n this.origOptions = rrule.origOptions;\n if (this.origOptions.bymonthday) {\n var bymonthday = [].concat(this.options.bymonthday);\n var bynmonthday = [].concat(this.options.bynmonthday);\n bymonthday.sort(function (a, b) { return a - b; });\n bynmonthday.sort(function (a, b) { return b - a; });\n // 1, 2, 3, .., -5, -4, -3, ..\n this.bymonthday = bymonthday.concat(bynmonthday);\n if (!this.bymonthday.length)\n this.bymonthday = null;\n }\n if (isPresent(this.origOptions.byweekday)) {\n var byweekday = !isArray(this.origOptions.byweekday)\n ? [this.origOptions.byweekday]\n : this.origOptions.byweekday;\n var days = String(byweekday);\n this.byweekday = {\n allWeeks: byweekday.filter(function (weekday) {\n return !weekday.n;\n }),\n someWeeks: byweekday.filter(function (weekday) {\n return Boolean(weekday.n);\n }),\n isWeekdays: days.indexOf('MO') !== -1 &&\n days.indexOf('TU') !== -1 &&\n days.indexOf('WE') !== -1 &&\n days.indexOf('TH') !== -1 &&\n days.indexOf('FR') !== -1 &&\n days.indexOf('SA') === -1 &&\n days.indexOf('SU') === -1,\n isEveryDay: days.indexOf('MO') !== -1 &&\n days.indexOf('TU') !== -1 &&\n days.indexOf('WE') !== -1 &&\n days.indexOf('TH') !== -1 &&\n days.indexOf('FR') !== -1 &&\n days.indexOf('SA') !== -1 &&\n days.indexOf('SU') !== -1,\n };\n var sortWeekDays = function (a, b) {\n return a.weekday - b.weekday;\n };\n this.byweekday.allWeeks.sort(sortWeekDays);\n this.byweekday.someWeeks.sort(sortWeekDays);\n if (!this.byweekday.allWeeks.length)\n this.byweekday.allWeeks = null;\n if (!this.byweekday.someWeeks.length)\n this.byweekday.someWeeks = null;\n }\n else {\n this.byweekday = null;\n }\n }\n /**\n * Test whether the rrule can be fully converted to text.\n *\n * @param {RRule} rrule\n * @return {Boolean}\n */\n ToText.isFullyConvertible = function (rrule) {\n var canConvert = true;\n if (!(rrule.options.freq in ToText.IMPLEMENTED))\n return false;\n if (rrule.origOptions.until && rrule.origOptions.count)\n return false;\n for (var key in rrule.origOptions) {\n if (contains(['dtstart', 'tzid', 'wkst', 'freq'], key))\n return true;\n if (!contains(ToText.IMPLEMENTED[rrule.options.freq], key))\n return false;\n }\n return canConvert;\n };\n ToText.prototype.isFullyConvertible = function () {\n return ToText.isFullyConvertible(this.rrule);\n };\n /**\n * Perform the conversion. Only some of the frequencies are supported.\n * If some of the rrule's options aren't supported, they'll\n * be omitted from the output an \"(~ approximate)\" will be appended.\n *\n * @return {*}\n */\n ToText.prototype.toString = function () {\n var gettext = this.gettext;\n if (!(this.options.freq in ToText.IMPLEMENTED)) {\n return gettext('RRule error: Unable to fully convert this rrule to text');\n }\n this.text = [gettext('every')];\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this[RRule.FREQUENCIES[this.options.freq]]();\n if (this.options.until) {\n this.add(gettext('until'));\n var until = this.options.until;\n this.add(this.dateFormatter(until.getUTCFullYear(), this.language.monthNames[until.getUTCMonth()], until.getUTCDate()));\n }\n else if (this.options.count) {\n this.add(gettext('for'))\n .add(this.options.count.toString())\n .add(this.plural(this.options.count) ? gettext('times') : gettext('time'));\n }\n if (!this.isFullyConvertible())\n this.add(gettext('(~ approximate)'));\n return this.text.join('');\n };\n ToText.prototype.HOURLY = function () {\n var gettext = this.gettext;\n if (this.options.interval !== 1)\n this.add(this.options.interval.toString());\n this.add(this.plural(this.options.interval) ? gettext('hours') : gettext('hour'));\n };\n ToText.prototype.MINUTELY = function () {\n var gettext = this.gettext;\n if (this.options.interval !== 1)\n this.add(this.options.interval.toString());\n this.add(this.plural(this.options.interval)\n ? gettext('minutes')\n : gettext('minute'));\n };\n ToText.prototype.DAILY = function () {\n var gettext = this.gettext;\n if (this.options.interval !== 1)\n this.add(this.options.interval.toString());\n if (this.byweekday && this.byweekday.isWeekdays) {\n this.add(this.plural(this.options.interval)\n ? gettext('weekdays')\n : gettext('weekday'));\n }\n else {\n this.add(this.plural(this.options.interval) ? gettext('days') : gettext('day'));\n }\n if (this.origOptions.bymonth) {\n this.add(gettext('in'));\n this._bymonth();\n }\n if (this.bymonthday) {\n this._bymonthday();\n }\n else if (this.byweekday) {\n this._byweekday();\n }\n else if (this.origOptions.byhour) {\n this._byhour();\n }\n };\n ToText.prototype.WEEKLY = function () {\n var gettext = this.gettext;\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString()).add(this.plural(this.options.interval) ? gettext('weeks') : gettext('week'));\n }\n if (this.byweekday && this.byweekday.isWeekdays) {\n if (this.options.interval === 1) {\n this.add(this.plural(this.options.interval)\n ? gettext('weekdays')\n : gettext('weekday'));\n }\n else {\n this.add(gettext('on')).add(gettext('weekdays'));\n }\n }\n else if (this.byweekday && this.byweekday.isEveryDay) {\n this.add(this.plural(this.options.interval) ? gettext('days') : gettext('day'));\n }\n else {\n if (this.options.interval === 1)\n this.add(gettext('week'));\n if (this.origOptions.bymonth) {\n this.add(gettext('in'));\n this._bymonth();\n }\n if (this.bymonthday) {\n this._bymonthday();\n }\n else if (this.byweekday) {\n this._byweekday();\n }\n if (this.origOptions.byhour) {\n this._byhour();\n }\n }\n };\n ToText.prototype.MONTHLY = function () {\n var gettext = this.gettext;\n if (this.origOptions.bymonth) {\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString()).add(gettext('months'));\n if (this.plural(this.options.interval))\n this.add(gettext('in'));\n }\n else {\n // this.add(gettext('MONTH'))\n }\n this._bymonth();\n }\n else {\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString());\n }\n this.add(this.plural(this.options.interval)\n ? gettext('months')\n : gettext('month'));\n }\n if (this.bymonthday) {\n this._bymonthday();\n }\n else if (this.byweekday && this.byweekday.isWeekdays) {\n this.add(gettext('on')).add(gettext('weekdays'));\n }\n else if (this.byweekday) {\n this._byweekday();\n }\n };\n ToText.prototype.YEARLY = function () {\n var gettext = this.gettext;\n if (this.origOptions.bymonth) {\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString());\n this.add(gettext('years'));\n }\n else {\n // this.add(gettext('YEAR'))\n }\n this._bymonth();\n }\n else {\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString());\n }\n this.add(this.plural(this.options.interval) ? gettext('years') : gettext('year'));\n }\n if (this.bymonthday) {\n this._bymonthday();\n }\n else if (this.byweekday) {\n this._byweekday();\n }\n if (this.options.byyearday) {\n this.add(gettext('on the'))\n .add(this.list(this.options.byyearday, this.nth, gettext('and')))\n .add(gettext('day'));\n }\n if (this.options.byweekno) {\n this.add(gettext('in'))\n .add(this.plural(this.options.byweekno.length)\n ? gettext('weeks')\n : gettext('week'))\n .add(this.list(this.options.byweekno, undefined, gettext('and')));\n }\n };\n ToText.prototype._bymonthday = function () {\n var gettext = this.gettext;\n if (this.byweekday && this.byweekday.allWeeks) {\n this.add(gettext('on'))\n .add(this.list(this.byweekday.allWeeks, this.weekdaytext, gettext('or')))\n .add(gettext('the'))\n .add(this.list(this.bymonthday, this.nth, gettext('or')));\n }\n else {\n this.add(gettext('on the')).add(this.list(this.bymonthday, this.nth, gettext('and')));\n }\n // this.add(gettext('DAY'))\n };\n ToText.prototype._byweekday = function () {\n var gettext = this.gettext;\n if (this.byweekday.allWeeks && !this.byweekday.isWeekdays) {\n this.add(gettext('on')).add(this.list(this.byweekday.allWeeks, this.weekdaytext));\n }\n if (this.byweekday.someWeeks) {\n if (this.byweekday.allWeeks)\n this.add(gettext('and'));\n this.add(gettext('on the')).add(this.list(this.byweekday.someWeeks, this.weekdaytext, gettext('and')));\n }\n };\n ToText.prototype._byhour = function () {\n var gettext = this.gettext;\n this.add(gettext('at')).add(this.list(this.origOptions.byhour, undefined, gettext('and')));\n };\n ToText.prototype._bymonth = function () {\n this.add(this.list(this.options.bymonth, this.monthtext, this.gettext('and')));\n };\n ToText.prototype.nth = function (n) {\n n = parseInt(n.toString(), 10);\n var nth;\n var gettext = this.gettext;\n if (n === -1)\n return gettext('last');\n var npos = Math.abs(n);\n switch (npos) {\n case 1:\n case 21:\n case 31:\n nth = npos + gettext('st');\n break;\n case 2:\n case 22:\n nth = npos + gettext('nd');\n break;\n case 3:\n case 23:\n nth = npos + gettext('rd');\n break;\n default:\n nth = npos + gettext('th');\n }\n return n < 0 ? nth + ' ' + gettext('last') : nth;\n };\n ToText.prototype.monthtext = function (m) {\n return this.language.monthNames[m - 1];\n };\n ToText.prototype.weekdaytext = function (wday) {\n var weekday = isNumber(wday) ? (wday + 1) % 7 : wday.getJsWeekday();\n return ((wday.n ? this.nth(wday.n) + ' ' : '') +\n this.language.dayNames[weekday]);\n };\n ToText.prototype.plural = function (n) {\n return n % 100 !== 1;\n };\n ToText.prototype.add = function (s) {\n this.text.push(' ');\n this.text.push(s);\n return this;\n };\n ToText.prototype.list = function (arr, callback, finalDelim, delim) {\n var _this = this;\n if (delim === void 0) { delim = ','; }\n if (!isArray(arr)) {\n arr = [arr];\n }\n var delimJoin = function (array, delimiter, finalDelimiter) {\n var list = '';\n for (var i = 0; i < array.length; i++) {\n if (i !== 0) {\n if (i === array.length - 1) {\n list += ' ' + finalDelimiter + ' ';\n }\n else {\n list += delimiter + ' ';\n }\n }\n list += array[i];\n }\n return list;\n };\n callback =\n callback ||\n function (o) {\n return o.toString();\n };\n var realCallback = function (arg) {\n return callback && callback.call(_this, arg);\n };\n if (finalDelim) {\n return delimJoin(arr.map(realCallback), delim, finalDelim);\n }\n else {\n return arr.map(realCallback).join(delim + ' ');\n }\n };\n return ToText;\n}());\nexport default ToText;\n//# sourceMappingURL=totext.js.map","import ENGLISH from './i18n';\nimport { RRule } from '../rrule';\n// =============================================================================\n// Parser\n// =============================================================================\nvar Parser = /** @class */ (function () {\n function Parser(rules) {\n this.done = true;\n this.rules = rules;\n }\n Parser.prototype.start = function (text) {\n this.text = text;\n this.done = false;\n return this.nextSymbol();\n };\n Parser.prototype.isDone = function () {\n return this.done && this.symbol === null;\n };\n Parser.prototype.nextSymbol = function () {\n var best;\n var bestSymbol;\n this.symbol = null;\n this.value = null;\n do {\n if (this.done)\n return false;\n var rule = void 0;\n best = null;\n for (var name_1 in this.rules) {\n rule = this.rules[name_1];\n var match = rule.exec(this.text);\n if (match) {\n if (best === null || match[0].length > best[0].length) {\n best = match;\n bestSymbol = name_1;\n }\n }\n }\n if (best != null) {\n this.text = this.text.substr(best[0].length);\n if (this.text === '')\n this.done = true;\n }\n if (best == null) {\n this.done = true;\n this.symbol = null;\n this.value = null;\n return;\n }\n } while (bestSymbol === 'SKIP');\n this.symbol = bestSymbol;\n this.value = best;\n return true;\n };\n Parser.prototype.accept = function (name) {\n if (this.symbol === name) {\n if (this.value) {\n var v = this.value;\n this.nextSymbol();\n return v;\n }\n this.nextSymbol();\n return true;\n }\n return false;\n };\n Parser.prototype.acceptNumber = function () {\n return this.accept('number');\n };\n Parser.prototype.expect = function (name) {\n if (this.accept(name))\n return true;\n throw new Error('expected ' + name + ' but found ' + this.symbol);\n };\n return Parser;\n}());\nexport default function parseText(text, language) {\n if (language === void 0) { language = ENGLISH; }\n var options = {};\n var ttr = new Parser(language.tokens);\n if (!ttr.start(text))\n return null;\n S();\n return options;\n function S() {\n // every [n]\n ttr.expect('every');\n var n = ttr.acceptNumber();\n if (n)\n options.interval = parseInt(n[0], 10);\n if (ttr.isDone())\n throw new Error('Unexpected end');\n switch (ttr.symbol) {\n case 'day(s)':\n options.freq = RRule.DAILY;\n if (ttr.nextSymbol()) {\n AT();\n F();\n }\n break;\n // FIXME Note: every 2 weekdays != every two weeks on weekdays.\n // DAILY on weekdays is not a valid rule\n case 'weekday(s)':\n options.freq = RRule.WEEKLY;\n options.byweekday = [RRule.MO, RRule.TU, RRule.WE, RRule.TH, RRule.FR];\n ttr.nextSymbol();\n AT();\n F();\n break;\n case 'week(s)':\n options.freq = RRule.WEEKLY;\n if (ttr.nextSymbol()) {\n ON();\n AT();\n F();\n }\n break;\n case 'hour(s)':\n options.freq = RRule.HOURLY;\n if (ttr.nextSymbol()) {\n ON();\n F();\n }\n break;\n case 'minute(s)':\n options.freq = RRule.MINUTELY;\n if (ttr.nextSymbol()) {\n ON();\n F();\n }\n break;\n case 'month(s)':\n options.freq = RRule.MONTHLY;\n if (ttr.nextSymbol()) {\n ON();\n F();\n }\n break;\n case 'year(s)':\n options.freq = RRule.YEARLY;\n if (ttr.nextSymbol()) {\n ON();\n F();\n }\n break;\n case 'monday':\n case 'tuesday':\n case 'wednesday':\n case 'thursday':\n case 'friday':\n case 'saturday':\n case 'sunday':\n options.freq = RRule.WEEKLY;\n var key = ttr.symbol\n .substr(0, 2)\n .toUpperCase();\n options.byweekday = [RRule[key]];\n if (!ttr.nextSymbol())\n return;\n // TODO check for duplicates\n while (ttr.accept('comma')) {\n if (ttr.isDone())\n throw new Error('Unexpected end');\n var wkd = decodeWKD();\n if (!wkd) {\n throw new Error('Unexpected symbol ' + ttr.symbol + ', expected weekday');\n }\n options.byweekday.push(RRule[wkd]);\n ttr.nextSymbol();\n }\n AT();\n MDAYs();\n F();\n break;\n case 'january':\n case 'february':\n case 'march':\n case 'april':\n case 'may':\n case 'june':\n case 'july':\n case 'august':\n case 'september':\n case 'october':\n case 'november':\n case 'december':\n options.freq = RRule.YEARLY;\n options.bymonth = [decodeM()];\n if (!ttr.nextSymbol())\n return;\n // TODO check for duplicates\n while (ttr.accept('comma')) {\n if (ttr.isDone())\n throw new Error('Unexpected end');\n var m = decodeM();\n if (!m) {\n throw new Error('Unexpected symbol ' + ttr.symbol + ', expected month');\n }\n options.bymonth.push(m);\n ttr.nextSymbol();\n }\n ON();\n F();\n break;\n default:\n throw new Error('Unknown symbol');\n }\n }\n function ON() {\n var on = ttr.accept('on');\n var the = ttr.accept('the');\n if (!(on || the))\n return;\n do {\n var nth = decodeNTH();\n var wkd = decodeWKD();\n var m = decodeM();\n // nth | \n if (nth) {\n // ttr.nextSymbol()\n if (wkd) {\n ttr.nextSymbol();\n if (!options.byweekday)\n options.byweekday = [];\n options.byweekday.push(RRule[wkd].nth(nth));\n }\n else {\n if (!options.bymonthday)\n options.bymonthday = [];\n options.bymonthday.push(nth);\n ttr.accept('day(s)');\n }\n // \n }\n else if (wkd) {\n ttr.nextSymbol();\n if (!options.byweekday)\n options.byweekday = [];\n options.byweekday.push(RRule[wkd]);\n }\n else if (ttr.symbol === 'weekday(s)') {\n ttr.nextSymbol();\n if (!options.byweekday) {\n options.byweekday = [RRule.MO, RRule.TU, RRule.WE, RRule.TH, RRule.FR];\n }\n }\n else if (ttr.symbol === 'week(s)') {\n ttr.nextSymbol();\n var n = ttr.acceptNumber();\n if (!n) {\n throw new Error('Unexpected symbol ' + ttr.symbol + ', expected week number');\n }\n options.byweekno = [parseInt(n[0], 10)];\n while (ttr.accept('comma')) {\n n = ttr.acceptNumber();\n if (!n) {\n throw new Error('Unexpected symbol ' + ttr.symbol + '; expected monthday');\n }\n options.byweekno.push(parseInt(n[0], 10));\n }\n }\n else if (m) {\n ttr.nextSymbol();\n if (!options.bymonth)\n options.bymonth = [];\n options.bymonth.push(m);\n }\n else {\n return;\n }\n } while (ttr.accept('comma') || ttr.accept('the') || ttr.accept('on'));\n }\n function AT() {\n var at = ttr.accept('at');\n if (!at)\n return;\n do {\n var n = ttr.acceptNumber();\n if (!n) {\n throw new Error('Unexpected symbol ' + ttr.symbol + ', expected hour');\n }\n options.byhour = [parseInt(n[0], 10)];\n while (ttr.accept('comma')) {\n n = ttr.acceptNumber();\n if (!n) {\n throw new Error('Unexpected symbol ' + ttr.symbol + '; expected hour');\n }\n options.byhour.push(parseInt(n[0], 10));\n }\n } while (ttr.accept('comma') || ttr.accept('at'));\n }\n function decodeM() {\n switch (ttr.symbol) {\n case 'january':\n return 1;\n case 'february':\n return 2;\n case 'march':\n return 3;\n case 'april':\n return 4;\n case 'may':\n return 5;\n case 'june':\n return 6;\n case 'july':\n return 7;\n case 'august':\n return 8;\n case 'september':\n return 9;\n case 'october':\n return 10;\n case 'november':\n return 11;\n case 'december':\n return 12;\n default:\n return false;\n }\n }\n function decodeWKD() {\n switch (ttr.symbol) {\n case 'monday':\n case 'tuesday':\n case 'wednesday':\n case 'thursday':\n case 'friday':\n case 'saturday':\n case 'sunday':\n return ttr.symbol.substr(0, 2).toUpperCase();\n default:\n return false;\n }\n }\n function decodeNTH() {\n switch (ttr.symbol) {\n case 'last':\n ttr.nextSymbol();\n return -1;\n case 'first':\n ttr.nextSymbol();\n return 1;\n case 'second':\n ttr.nextSymbol();\n return ttr.accept('last') ? -2 : 2;\n case 'third':\n ttr.nextSymbol();\n return ttr.accept('last') ? -3 : 3;\n case 'nth':\n var v = parseInt(ttr.value[1], 10);\n if (v < -366 || v > 366)\n throw new Error('Nth out of range: ' + v);\n ttr.nextSymbol();\n return ttr.accept('last') ? -v : v;\n default:\n return false;\n }\n }\n function MDAYs() {\n ttr.accept('on');\n ttr.accept('the');\n var nth = decodeNTH();\n if (!nth)\n return;\n options.bymonthday = [nth];\n ttr.nextSymbol();\n while (ttr.accept('comma')) {\n nth = decodeNTH();\n if (!nth) {\n throw new Error('Unexpected symbol ' + ttr.symbol + '; expected monthday');\n }\n options.bymonthday.push(nth);\n ttr.nextSymbol();\n }\n }\n function F() {\n if (ttr.symbol === 'until') {\n var date = Date.parse(ttr.text);\n if (!date)\n throw new Error('Cannot parse until date:' + ttr.text);\n options.until = new Date(date);\n }\n else if (ttr.accept('for')) {\n options.count = parseInt(ttr.value[0], 10);\n ttr.expect('number');\n // ttr.expect('times')\n }\n }\n}\n//# sourceMappingURL=parsetext.js.map","import ToText from './totext';\nimport parseText from './parsetext';\nimport { RRule } from '../rrule';\nimport { Frequency } from '../types';\nimport ENGLISH from './i18n';\n/* !\n * rrule.js - Library for working with recurrence rules for calendar dates.\n * https://github.com/jakubroztocil/rrule\n *\n * Copyright 2010, Jakub Roztocil and Lars Schoning\n * Licenced under the BSD licence.\n * https://github.com/jakubroztocil/rrule/blob/master/LICENCE\n *\n */\n/**\n *\n * Implementation of RRule.fromText() and RRule::toText().\n *\n *\n * On the client side, this file needs to be included\n * when those functions are used.\n *\n */\n// =============================================================================\n// fromText\n// =============================================================================\n/**\n * Will be able to convert some of the below described rules from\n * text format to a rule object.\n *\n *\n * RULES\n *\n * Every ([n])\n * day(s)\n * | [weekday], ..., (and) [weekday]\n * | weekday(s)\n * | week(s)\n * | month(s)\n * | [month], ..., (and) [month]\n * | year(s)\n *\n *\n * Plus 0, 1, or multiple of these:\n *\n * on [weekday], ..., (or) [weekday] the [monthday], [monthday], ... (or) [monthday]\n *\n * on [weekday], ..., (and) [weekday]\n *\n * on the [monthday], [monthday], ... (and) [monthday] (day of the month)\n *\n * on the [nth-weekday], ..., (and) [nth-weekday] (of the month/year)\n *\n *\n * Plus 0 or 1 of these:\n *\n * for [n] time(s)\n *\n * until [date]\n *\n * Plus (.)\n *\n *\n * Definitely no supported for parsing:\n *\n * (for year):\n * in week(s) [n], ..., (and) [n]\n *\n * on the [yearday], ..., (and) [n] day of the year\n * on day [yearday], ..., (and) [n]\n *\n *\n * NON-TERMINALS\n *\n * [n]: 1, 2 ..., one, two, three ..\n * [month]: January, February, March, April, May, ... December\n * [weekday]: Monday, ... Sunday\n * [nth-weekday]: first [weekday], 2nd [weekday], ... last [weekday], ...\n * [monthday]: first, 1., 2., 1st, 2nd, second, ... 31st, last day, 2nd last day, ..\n * [date]:\n * - [month] (0-31(,) ([year])),\n * - (the) 0-31.(1-12.([year])),\n * - (the) 0-31/(1-12/([year])),\n * - [weekday]\n *\n * [year]: 0000, 0001, ... 01, 02, ..\n *\n * Definitely not supported for parsing:\n *\n * [yearday]: first, 1., 2., 1st, 2nd, second, ... 366th, last day, 2nd last day, ..\n *\n * @param {String} text\n * @return {Object, Boolean} the rule, or null.\n */\nvar fromText = function (text, language) {\n if (language === void 0) { language = ENGLISH; }\n return new RRule(parseText(text, language) || undefined);\n};\nvar common = [\n 'count',\n 'until',\n 'interval',\n 'byweekday',\n 'bymonthday',\n 'bymonth',\n];\nToText.IMPLEMENTED = [];\nToText.IMPLEMENTED[Frequency.HOURLY] = common;\nToText.IMPLEMENTED[Frequency.MINUTELY] = common;\nToText.IMPLEMENTED[Frequency.DAILY] = ['byhour'].concat(common);\nToText.IMPLEMENTED[Frequency.WEEKLY] = common;\nToText.IMPLEMENTED[Frequency.MONTHLY] = common;\nToText.IMPLEMENTED[Frequency.YEARLY] = ['byweekno', 'byyearday'].concat(common);\n// =============================================================================\n// Export\n// =============================================================================\nvar toText = function (rrule, gettext, language, dateFormatter) {\n return new ToText(rrule, gettext, language, dateFormatter).toString();\n};\nvar isFullyConvertible = ToText.isFullyConvertible;\nexport { fromText, parseText, isFullyConvertible, toText };\n//# sourceMappingURL=index.js.map","import { __extends } from \"tslib\";\nimport { Frequency } from './types';\nimport { pymod, divmod, empty, includes } from './helpers';\nimport { getWeekday, MAXYEAR, monthRange } from './dateutil';\nvar Time = /** @class */ (function () {\n function Time(hour, minute, second, millisecond) {\n this.hour = hour;\n this.minute = minute;\n this.second = second;\n this.millisecond = millisecond || 0;\n }\n Time.prototype.getHours = function () {\n return this.hour;\n };\n Time.prototype.getMinutes = function () {\n return this.minute;\n };\n Time.prototype.getSeconds = function () {\n return this.second;\n };\n Time.prototype.getMilliseconds = function () {\n return this.millisecond;\n };\n Time.prototype.getTime = function () {\n return ((this.hour * 60 * 60 + this.minute * 60 + this.second) * 1000 +\n this.millisecond);\n };\n return Time;\n}());\nexport { Time };\nvar DateTime = /** @class */ (function (_super) {\n __extends(DateTime, _super);\n function DateTime(year, month, day, hour, minute, second, millisecond) {\n var _this = _super.call(this, hour, minute, second, millisecond) || this;\n _this.year = year;\n _this.month = month;\n _this.day = day;\n return _this;\n }\n DateTime.fromDate = function (date) {\n return new this(date.getUTCFullYear(), date.getUTCMonth() + 1, date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), date.valueOf() % 1000);\n };\n DateTime.prototype.getWeekday = function () {\n return getWeekday(new Date(this.getTime()));\n };\n DateTime.prototype.getTime = function () {\n return new Date(Date.UTC(this.year, this.month - 1, this.day, this.hour, this.minute, this.second, this.millisecond)).getTime();\n };\n DateTime.prototype.getDay = function () {\n return this.day;\n };\n DateTime.prototype.getMonth = function () {\n return this.month;\n };\n DateTime.prototype.getYear = function () {\n return this.year;\n };\n DateTime.prototype.addYears = function (years) {\n this.year += years;\n };\n DateTime.prototype.addMonths = function (months) {\n this.month += months;\n if (this.month > 12) {\n var yearDiv = Math.floor(this.month / 12);\n var monthMod = pymod(this.month, 12);\n this.month = monthMod;\n this.year += yearDiv;\n if (this.month === 0) {\n this.month = 12;\n --this.year;\n }\n }\n };\n DateTime.prototype.addWeekly = function (days, wkst) {\n if (wkst > this.getWeekday()) {\n this.day += -(this.getWeekday() + 1 + (6 - wkst)) + days * 7;\n }\n else {\n this.day += -(this.getWeekday() - wkst) + days * 7;\n }\n this.fixDay();\n };\n DateTime.prototype.addDaily = function (days) {\n this.day += days;\n this.fixDay();\n };\n DateTime.prototype.addHours = function (hours, filtered, byhour) {\n if (filtered) {\n // Jump to one iteration before next day\n this.hour += Math.floor((23 - this.hour) / hours) * hours;\n }\n for (;;) {\n this.hour += hours;\n var _a = divmod(this.hour, 24), dayDiv = _a.div, hourMod = _a.mod;\n if (dayDiv) {\n this.hour = hourMod;\n this.addDaily(dayDiv);\n }\n if (empty(byhour) || includes(byhour, this.hour))\n break;\n }\n };\n DateTime.prototype.addMinutes = function (minutes, filtered, byhour, byminute) {\n if (filtered) {\n // Jump to one iteration before next day\n this.minute +=\n Math.floor((1439 - (this.hour * 60 + this.minute)) / minutes) * minutes;\n }\n for (;;) {\n this.minute += minutes;\n var _a = divmod(this.minute, 60), hourDiv = _a.div, minuteMod = _a.mod;\n if (hourDiv) {\n this.minute = minuteMod;\n this.addHours(hourDiv, false, byhour);\n }\n if ((empty(byhour) || includes(byhour, this.hour)) &&\n (empty(byminute) || includes(byminute, this.minute))) {\n break;\n }\n }\n };\n DateTime.prototype.addSeconds = function (seconds, filtered, byhour, byminute, bysecond) {\n if (filtered) {\n // Jump to one iteration before next day\n this.second +=\n Math.floor((86399 - (this.hour * 3600 + this.minute * 60 + this.second)) /\n seconds) * seconds;\n }\n for (;;) {\n this.second += seconds;\n var _a = divmod(this.second, 60), minuteDiv = _a.div, secondMod = _a.mod;\n if (minuteDiv) {\n this.second = secondMod;\n this.addMinutes(minuteDiv, false, byhour, byminute);\n }\n if ((empty(byhour) || includes(byhour, this.hour)) &&\n (empty(byminute) || includes(byminute, this.minute)) &&\n (empty(bysecond) || includes(bysecond, this.second))) {\n break;\n }\n }\n };\n DateTime.prototype.fixDay = function () {\n if (this.day <= 28) {\n return;\n }\n var daysinmonth = monthRange(this.year, this.month - 1)[1];\n if (this.day <= daysinmonth) {\n return;\n }\n while (this.day > daysinmonth) {\n this.day -= daysinmonth;\n ++this.month;\n if (this.month === 13) {\n this.month = 1;\n ++this.year;\n if (this.year > MAXYEAR) {\n return;\n }\n }\n daysinmonth = monthRange(this.year, this.month - 1)[1];\n }\n };\n DateTime.prototype.add = function (options, filtered) {\n var freq = options.freq, interval = options.interval, wkst = options.wkst, byhour = options.byhour, byminute = options.byminute, bysecond = options.bysecond;\n switch (freq) {\n case Frequency.YEARLY:\n return this.addYears(interval);\n case Frequency.MONTHLY:\n return this.addMonths(interval);\n case Frequency.WEEKLY:\n return this.addWeekly(interval, wkst);\n case Frequency.DAILY:\n return this.addDaily(interval);\n case Frequency.HOURLY:\n return this.addHours(interval, filtered, byhour);\n case Frequency.MINUTELY:\n return this.addMinutes(interval, filtered, byhour, byminute);\n case Frequency.SECONDLY:\n return this.addSeconds(interval, filtered, byhour, byminute, bysecond);\n }\n };\n return DateTime;\n}(Time));\nexport { DateTime };\n//# sourceMappingURL=datetime.js.map","import { __assign } from \"tslib\";\nimport { freqIsDailyOrGreater } from './types';\nimport { includes, notEmpty, isPresent, isNumber, isArray, isWeekdayStr, } from './helpers';\nimport { RRule, defaultKeys, DEFAULT_OPTIONS } from './rrule';\nimport { getWeekday, isDate, isValidDate } from './dateutil';\nimport { Weekday } from './weekday';\nimport { Time } from './datetime';\nexport function initializeOptions(options) {\n var invalid = [];\n var keys = Object.keys(options);\n // Shallow copy for options and origOptions and check for invalid\n for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {\n var key = keys_1[_i];\n if (!includes(defaultKeys, key))\n invalid.push(key);\n if (isDate(options[key]) && !isValidDate(options[key])) {\n invalid.push(key);\n }\n }\n if (invalid.length) {\n throw new Error('Invalid options: ' + invalid.join(', '));\n }\n return __assign({}, options);\n}\nexport function parseOptions(options) {\n var opts = __assign(__assign({}, DEFAULT_OPTIONS), initializeOptions(options));\n if (isPresent(opts.byeaster))\n opts.freq = RRule.YEARLY;\n if (!(isPresent(opts.freq) && RRule.FREQUENCIES[opts.freq])) {\n throw new Error(\"Invalid frequency: \".concat(opts.freq, \" \").concat(options.freq));\n }\n if (!opts.dtstart)\n opts.dtstart = new Date(new Date().setMilliseconds(0));\n if (!isPresent(opts.wkst)) {\n opts.wkst = RRule.MO.weekday;\n }\n else if (isNumber(opts.wkst)) {\n // cool, just keep it like that\n }\n else {\n opts.wkst = opts.wkst.weekday;\n }\n if (isPresent(opts.bysetpos)) {\n if (isNumber(opts.bysetpos))\n opts.bysetpos = [opts.bysetpos];\n for (var i = 0; i < opts.bysetpos.length; i++) {\n var v = opts.bysetpos[i];\n if (v === 0 || !(v >= -366 && v <= 366)) {\n throw new Error('bysetpos must be between 1 and 366,' + ' or between -366 and -1');\n }\n }\n }\n if (!(Boolean(opts.byweekno) ||\n notEmpty(opts.byweekno) ||\n notEmpty(opts.byyearday) ||\n Boolean(opts.bymonthday) ||\n notEmpty(opts.bymonthday) ||\n isPresent(opts.byweekday) ||\n isPresent(opts.byeaster))) {\n switch (opts.freq) {\n case RRule.YEARLY:\n if (!opts.bymonth)\n opts.bymonth = opts.dtstart.getUTCMonth() + 1;\n opts.bymonthday = opts.dtstart.getUTCDate();\n break;\n case RRule.MONTHLY:\n opts.bymonthday = opts.dtstart.getUTCDate();\n break;\n case RRule.WEEKLY:\n opts.byweekday = [getWeekday(opts.dtstart)];\n break;\n }\n }\n // bymonth\n if (isPresent(opts.bymonth) && !isArray(opts.bymonth)) {\n opts.bymonth = [opts.bymonth];\n }\n // byyearday\n if (isPresent(opts.byyearday) &&\n !isArray(opts.byyearday) &&\n isNumber(opts.byyearday)) {\n opts.byyearday = [opts.byyearday];\n }\n // bymonthday\n if (!isPresent(opts.bymonthday)) {\n opts.bymonthday = [];\n opts.bynmonthday = [];\n }\n else if (isArray(opts.bymonthday)) {\n var bymonthday = [];\n var bynmonthday = [];\n for (var i = 0; i < opts.bymonthday.length; i++) {\n var v = opts.bymonthday[i];\n if (v > 0) {\n bymonthday.push(v);\n }\n else if (v < 0) {\n bynmonthday.push(v);\n }\n }\n opts.bymonthday = bymonthday;\n opts.bynmonthday = bynmonthday;\n }\n else if (opts.bymonthday < 0) {\n opts.bynmonthday = [opts.bymonthday];\n opts.bymonthday = [];\n }\n else {\n opts.bynmonthday = [];\n opts.bymonthday = [opts.bymonthday];\n }\n // byweekno\n if (isPresent(opts.byweekno) && !isArray(opts.byweekno)) {\n opts.byweekno = [opts.byweekno];\n }\n // byweekday / bynweekday\n if (!isPresent(opts.byweekday)) {\n opts.bynweekday = null;\n }\n else if (isNumber(opts.byweekday)) {\n opts.byweekday = [opts.byweekday];\n opts.bynweekday = null;\n }\n else if (isWeekdayStr(opts.byweekday)) {\n opts.byweekday = [Weekday.fromStr(opts.byweekday).weekday];\n opts.bynweekday = null;\n }\n else if (opts.byweekday instanceof Weekday) {\n if (!opts.byweekday.n || opts.freq > RRule.MONTHLY) {\n opts.byweekday = [opts.byweekday.weekday];\n opts.bynweekday = null;\n }\n else {\n opts.bynweekday = [[opts.byweekday.weekday, opts.byweekday.n]];\n opts.byweekday = null;\n }\n }\n else {\n var byweekday = [];\n var bynweekday = [];\n for (var i = 0; i < opts.byweekday.length; i++) {\n var wday = opts.byweekday[i];\n if (isNumber(wday)) {\n byweekday.push(wday);\n continue;\n }\n else if (isWeekdayStr(wday)) {\n byweekday.push(Weekday.fromStr(wday).weekday);\n continue;\n }\n if (!wday.n || opts.freq > RRule.MONTHLY) {\n byweekday.push(wday.weekday);\n }\n else {\n bynweekday.push([wday.weekday, wday.n]);\n }\n }\n opts.byweekday = notEmpty(byweekday) ? byweekday : null;\n opts.bynweekday = notEmpty(bynweekday) ? bynweekday : null;\n }\n // byhour\n if (!isPresent(opts.byhour)) {\n opts.byhour = opts.freq < RRule.HOURLY ? [opts.dtstart.getUTCHours()] : null;\n }\n else if (isNumber(opts.byhour)) {\n opts.byhour = [opts.byhour];\n }\n // byminute\n if (!isPresent(opts.byminute)) {\n opts.byminute =\n opts.freq < RRule.MINUTELY ? [opts.dtstart.getUTCMinutes()] : null;\n }\n else if (isNumber(opts.byminute)) {\n opts.byminute = [opts.byminute];\n }\n // bysecond\n if (!isPresent(opts.bysecond)) {\n opts.bysecond =\n opts.freq < RRule.SECONDLY ? [opts.dtstart.getUTCSeconds()] : null;\n }\n else if (isNumber(opts.bysecond)) {\n opts.bysecond = [opts.bysecond];\n }\n return { parsedOptions: opts };\n}\nexport function buildTimeset(opts) {\n var millisecondModulo = opts.dtstart.getTime() % 1000;\n if (!freqIsDailyOrGreater(opts.freq)) {\n return [];\n }\n var timeset = [];\n opts.byhour.forEach(function (hour) {\n opts.byminute.forEach(function (minute) {\n opts.bysecond.forEach(function (second) {\n timeset.push(new Time(hour, minute, second, millisecondModulo));\n });\n });\n });\n return timeset;\n}\n//# sourceMappingURL=parseoptions.js.map","import { __assign } from \"tslib\";\nimport { Frequency } from './types';\nimport { Weekday } from './weekday';\nimport { untilStringToDate } from './dateutil';\nimport { Days } from './rrule';\nexport function parseString(rfcString) {\n var options = rfcString\n .split('\\n')\n .map(parseLine)\n .filter(function (x) { return x !== null; });\n return __assign(__assign({}, options[0]), options[1]);\n}\nexport function parseDtstart(line) {\n var options = {};\n var dtstartWithZone = /DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\\s]+)/i.exec(line);\n if (!dtstartWithZone) {\n return options;\n }\n var tzid = dtstartWithZone[1], dtstart = dtstartWithZone[2];\n if (tzid) {\n options.tzid = tzid;\n }\n options.dtstart = untilStringToDate(dtstart);\n return options;\n}\nfunction parseLine(rfcString) {\n rfcString = rfcString.replace(/^\\s+|\\s+$/, '');\n if (!rfcString.length)\n return null;\n var header = /^([A-Z]+?)[:;]/.exec(rfcString.toUpperCase());\n if (!header) {\n return parseRrule(rfcString);\n }\n var key = header[1];\n switch (key.toUpperCase()) {\n case 'RRULE':\n case 'EXRULE':\n return parseRrule(rfcString);\n case 'DTSTART':\n return parseDtstart(rfcString);\n default:\n throw new Error(\"Unsupported RFC prop \".concat(key, \" in \").concat(rfcString));\n }\n}\nfunction parseRrule(line) {\n var strippedLine = line.replace(/^RRULE:/i, '');\n var options = parseDtstart(strippedLine);\n var attrs = line.replace(/^(?:RRULE|EXRULE):/i, '').split(';');\n attrs.forEach(function (attr) {\n var _a = attr.split('='), key = _a[0], value = _a[1];\n switch (key.toUpperCase()) {\n case 'FREQ':\n options.freq = Frequency[value.toUpperCase()];\n break;\n case 'WKST':\n options.wkst = Days[value.toUpperCase()];\n break;\n case 'COUNT':\n case 'INTERVAL':\n case 'BYSETPOS':\n case 'BYMONTH':\n case 'BYMONTHDAY':\n case 'BYYEARDAY':\n case 'BYWEEKNO':\n case 'BYHOUR':\n case 'BYMINUTE':\n case 'BYSECOND':\n var num = parseNumber(value);\n var optionKey = key.toLowerCase();\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n options[optionKey] = num;\n break;\n case 'BYWEEKDAY':\n case 'BYDAY':\n options.byweekday = parseWeekday(value);\n break;\n case 'DTSTART':\n case 'TZID':\n // for backwards compatibility\n var dtstart = parseDtstart(line);\n options.tzid = dtstart.tzid;\n options.dtstart = dtstart.dtstart;\n break;\n case 'UNTIL':\n options.until = untilStringToDate(value);\n break;\n case 'BYEASTER':\n options.byeaster = Number(value);\n break;\n default:\n throw new Error(\"Unknown RRULE property '\" + key + \"'\");\n }\n });\n return options;\n}\nfunction parseNumber(value) {\n if (value.indexOf(',') !== -1) {\n var values = value.split(',');\n return values.map(parseIndividualNumber);\n }\n return parseIndividualNumber(value);\n}\nfunction parseIndividualNumber(value) {\n if (/^[+-]?\\d+$/.test(value)) {\n return Number(value);\n }\n return value;\n}\nfunction parseWeekday(value) {\n var days = value.split(',');\n return days.map(function (day) {\n if (day.length === 2) {\n // MO, TU, ...\n return Days[day]; // wday instanceof Weekday\n }\n // -1MO, +3FR, 1SO, 13TU ...\n var parts = day.match(/^([+-]?\\d{1,2})([A-Z]{2})$/);\n if (!parts || parts.length < 3) {\n throw new SyntaxError(\"Invalid weekday string: \".concat(day));\n }\n var n = Number(parts[1]);\n var wdaypart = parts[2];\n var wday = Days[wdaypart].weekday;\n return new Weekday(wday, n);\n });\n}\n//# sourceMappingURL=parsestring.js.map","import { dateInTimeZone, timeToUntilString } from './dateutil';\nvar DateWithZone = /** @class */ (function () {\n function DateWithZone(date, tzid) {\n if (isNaN(date.getTime())) {\n throw new RangeError('Invalid date passed to DateWithZone');\n }\n this.date = date;\n this.tzid = tzid;\n }\n Object.defineProperty(DateWithZone.prototype, \"isUTC\", {\n get: function () {\n return !this.tzid || this.tzid.toUpperCase() === 'UTC';\n },\n enumerable: false,\n configurable: true\n });\n DateWithZone.prototype.toString = function () {\n var datestr = timeToUntilString(this.date.getTime(), this.isUTC);\n if (!this.isUTC) {\n return \";TZID=\".concat(this.tzid, \":\").concat(datestr);\n }\n return \":\".concat(datestr);\n };\n DateWithZone.prototype.getTime = function () {\n return this.date.getTime();\n };\n DateWithZone.prototype.rezonedDate = function () {\n if (this.isUTC) {\n return this.date;\n }\n return dateInTimeZone(this.date, this.tzid);\n };\n return DateWithZone;\n}());\nexport { DateWithZone };\n//# sourceMappingURL=datewithzone.js.map","import { RRule, DEFAULT_OPTIONS } from './rrule';\nimport { includes, isPresent, isArray, isNumber, toArray } from './helpers';\nimport { Weekday } from './weekday';\nimport { timeToUntilString } from './dateutil';\nimport { DateWithZone } from './datewithzone';\nexport function optionsToString(options) {\n var rrule = [];\n var dtstart = '';\n var keys = Object.keys(options);\n var defaultKeys = Object.keys(DEFAULT_OPTIONS);\n for (var i = 0; i < keys.length; i++) {\n if (keys[i] === 'tzid')\n continue;\n if (!includes(defaultKeys, keys[i]))\n continue;\n var key = keys[i].toUpperCase();\n var value = options[keys[i]];\n var outValue = '';\n if (!isPresent(value) || (isArray(value) && !value.length))\n continue;\n switch (key) {\n case 'FREQ':\n outValue = RRule.FREQUENCIES[options.freq];\n break;\n case 'WKST':\n if (isNumber(value)) {\n outValue = new Weekday(value).toString();\n }\n else {\n outValue = value.toString();\n }\n break;\n case 'BYWEEKDAY':\n /*\n NOTE: BYWEEKDAY is a special case.\n RRule() deconstructs the rule.options.byweekday array\n into an array of Weekday arguments.\n On the other hand, rule.origOptions is an array of Weekdays.\n We need to handle both cases here.\n It might be worth change RRule to keep the Weekdays.\n \n Also, BYWEEKDAY (used by RRule) vs. BYDAY (RFC)\n \n */\n key = 'BYDAY';\n outValue = toArray(value)\n .map(function (wday) {\n if (wday instanceof Weekday) {\n return wday;\n }\n if (isArray(wday)) {\n return new Weekday(wday[0], wday[1]);\n }\n return new Weekday(wday);\n })\n .toString();\n break;\n case 'DTSTART':\n dtstart = buildDtstart(value, options.tzid);\n break;\n case 'UNTIL':\n outValue = timeToUntilString(value, !options.tzid);\n break;\n default:\n if (isArray(value)) {\n var strValues = [];\n for (var j = 0; j < value.length; j++) {\n strValues[j] = String(value[j]);\n }\n outValue = strValues.toString();\n }\n else {\n outValue = String(value);\n }\n }\n if (outValue) {\n rrule.push([key, outValue]);\n }\n }\n var rules = rrule\n .map(function (_a) {\n var key = _a[0], value = _a[1];\n return \"\".concat(key, \"=\").concat(value.toString());\n })\n .join(';');\n var ruleString = '';\n if (rules !== '') {\n ruleString = \"RRULE:\".concat(rules);\n }\n return [dtstart, ruleString].filter(function (x) { return !!x; }).join('\\n');\n}\nfunction buildDtstart(dtstart, tzid) {\n if (!dtstart) {\n return '';\n }\n return 'DTSTART' + new DateWithZone(new Date(dtstart), tzid).toString();\n}\n//# sourceMappingURL=optionstostring.js.map","import IterResult from './iterresult';\nimport { clone, cloneDates } from './dateutil';\nimport { isArray } from './helpers';\nfunction argsMatch(left, right) {\n if (Array.isArray(left)) {\n if (!Array.isArray(right))\n return false;\n if (left.length !== right.length)\n return false;\n return left.every(function (date, i) { return date.getTime() === right[i].getTime(); });\n }\n if (left instanceof Date) {\n return right instanceof Date && left.getTime() === right.getTime();\n }\n return left === right;\n}\nvar Cache = /** @class */ (function () {\n function Cache() {\n this.all = false;\n this.before = [];\n this.after = [];\n this.between = [];\n }\n /**\n * @param {String} what - all/before/after/between\n * @param {Array,Date} value - an array of dates, one date, or null\n * @param {Object?} args - _iter arguments\n */\n Cache.prototype._cacheAdd = function (what, value, args) {\n if (value) {\n value = value instanceof Date ? clone(value) : cloneDates(value);\n }\n if (what === 'all') {\n this.all = value;\n }\n else {\n args._value = value;\n this[what].push(args);\n }\n };\n /**\n * @return false - not in the cache\n * @return null - cached, but zero occurrences (before/after)\n * @return Date - cached (before/after)\n * @return [] - cached, but zero occurrences (all/between)\n * @return [Date1, DateN] - cached (all/between)\n */\n Cache.prototype._cacheGet = function (what, args) {\n var cached = false;\n var argsKeys = args ? Object.keys(args) : [];\n var findCacheDiff = function (item) {\n for (var i = 0; i < argsKeys.length; i++) {\n var key = argsKeys[i];\n if (!argsMatch(args[key], item[key])) {\n return true;\n }\n }\n return false;\n };\n var cachedObject = this[what];\n if (what === 'all') {\n cached = this.all;\n }\n else if (isArray(cachedObject)) {\n // Let's see whether we've already called the\n // 'what' method with the same 'args'\n for (var i = 0; i < cachedObject.length; i++) {\n var item = cachedObject[i];\n if (argsKeys.length && findCacheDiff(item))\n continue;\n cached = item._value;\n break;\n }\n }\n if (!cached && this.all) {\n // Not in the cache, but we already know all the occurrences,\n // so we can find the correct dates from the cached ones.\n var iterResult = new IterResult(what, args);\n for (var i = 0; i < this.all.length; i++) {\n if (!iterResult.accept(this.all[i]))\n break;\n }\n cached = iterResult.getValue();\n this._cacheAdd(what, cached, args);\n }\n return isArray(cached)\n ? cloneDates(cached)\n : cached instanceof Date\n ? clone(cached)\n : cached;\n };\n return Cache;\n}());\nexport { Cache };\n//# sourceMappingURL=cache.js.map","import { __spreadArray } from \"tslib\";\nimport { range, repeat } from './helpers';\n// =============================================================================\n// Date masks\n// =============================================================================\n// Every mask is 7 days longer to handle cross-year weekly periods.\nvar M365MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], repeat(1, 31), true), repeat(2, 28), true), repeat(3, 31), true), repeat(4, 30), true), repeat(5, 31), true), repeat(6, 30), true), repeat(7, 31), true), repeat(8, 31), true), repeat(9, 30), true), repeat(10, 31), true), repeat(11, 30), true), repeat(12, 31), true), repeat(1, 7), true);\nvar M366MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], repeat(1, 31), true), repeat(2, 29), true), repeat(3, 31), true), repeat(4, 30), true), repeat(5, 31), true), repeat(6, 30), true), repeat(7, 31), true), repeat(8, 31), true), repeat(9, 30), true), repeat(10, 31), true), repeat(11, 30), true), repeat(12, 31), true), repeat(1, 7), true);\nvar M28 = range(1, 29);\nvar M29 = range(1, 30);\nvar M30 = range(1, 31);\nvar M31 = range(1, 32);\nvar MDAY366MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], M31, true), M29, true), M31, true), M30, true), M31, true), M30, true), M31, true), M31, true), M30, true), M31, true), M30, true), M31, true), M31.slice(0, 7), true);\nvar MDAY365MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], M31, true), M28, true), M31, true), M30, true), M31, true), M30, true), M31, true), M31, true), M30, true), M31, true), M30, true), M31, true), M31.slice(0, 7), true);\nvar NM28 = range(-28, 0);\nvar NM29 = range(-29, 0);\nvar NM30 = range(-30, 0);\nvar NM31 = range(-31, 0);\nvar NMDAY366MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], NM31, true), NM29, true), NM31, true), NM30, true), NM31, true), NM30, true), NM31, true), NM31, true), NM30, true), NM31, true), NM30, true), NM31, true), NM31.slice(0, 7), true);\nvar NMDAY365MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], NM31, true), NM28, true), NM31, true), NM30, true), NM31, true), NM30, true), NM31, true), NM31, true), NM30, true), NM31, true), NM30, true), NM31, true), NM31.slice(0, 7), true);\nvar M366RANGE = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366];\nvar M365RANGE = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365];\nvar WDAYMASK = (function () {\n var wdaymask = [];\n for (var i = 0; i < 55; i++)\n wdaymask = wdaymask.concat(range(7));\n return wdaymask;\n})();\nexport { WDAYMASK, M365MASK, M365RANGE, M366MASK, M366RANGE, MDAY365MASK, MDAY366MASK, NMDAY365MASK, NMDAY366MASK, };\n//# sourceMappingURL=masks.js.map","import { __assign } from \"tslib\";\nimport { datetime, getWeekday, isLeapYear, toOrdinal } from '../dateutil';\nimport { empty, repeat, pymod, includes } from '../helpers';\nimport { M365MASK, MDAY365MASK, NMDAY365MASK, WDAYMASK, M365RANGE, M366MASK, MDAY366MASK, NMDAY366MASK, M366RANGE, } from '../masks';\nexport function rebuildYear(year, options) {\n var firstyday = datetime(year, 1, 1);\n var yearlen = isLeapYear(year) ? 366 : 365;\n var nextyearlen = isLeapYear(year + 1) ? 366 : 365;\n var yearordinal = toOrdinal(firstyday);\n var yearweekday = getWeekday(firstyday);\n var result = __assign(__assign({ yearlen: yearlen, nextyearlen: nextyearlen, yearordinal: yearordinal, yearweekday: yearweekday }, baseYearMasks(year)), { wnomask: null });\n if (empty(options.byweekno)) {\n return result;\n }\n result.wnomask = repeat(0, yearlen + 7);\n var firstwkst;\n var wyearlen;\n var no1wkst = (firstwkst = pymod(7 - yearweekday + options.wkst, 7));\n if (no1wkst >= 4) {\n no1wkst = 0;\n // Number of days in the year, plus the days we got\n // from last year.\n wyearlen = result.yearlen + pymod(yearweekday - options.wkst, 7);\n }\n else {\n // Number of days in the year, minus the days we\n // left in last year.\n wyearlen = yearlen - no1wkst;\n }\n var div = Math.floor(wyearlen / 7);\n var mod = pymod(wyearlen, 7);\n var numweeks = Math.floor(div + mod / 4);\n for (var j = 0; j < options.byweekno.length; j++) {\n var n = options.byweekno[j];\n if (n < 0) {\n n += numweeks + 1;\n }\n if (!(n > 0 && n <= numweeks)) {\n continue;\n }\n var i = void 0;\n if (n > 1) {\n i = no1wkst + (n - 1) * 7;\n if (no1wkst !== firstwkst) {\n i -= 7 - firstwkst;\n }\n }\n else {\n i = no1wkst;\n }\n for (var k = 0; k < 7; k++) {\n result.wnomask[i] = 1;\n i++;\n if (result.wdaymask[i] === options.wkst)\n break;\n }\n }\n if (includes(options.byweekno, 1)) {\n // Check week number 1 of next year as well\n // orig-TODO : Check -numweeks for next year.\n var i = no1wkst + numweeks * 7;\n if (no1wkst !== firstwkst)\n i -= 7 - firstwkst;\n if (i < yearlen) {\n // If week starts in next year, we\n // don't care about it.\n for (var j = 0; j < 7; j++) {\n result.wnomask[i] = 1;\n i += 1;\n if (result.wdaymask[i] === options.wkst)\n break;\n }\n }\n }\n if (no1wkst) {\n // Check last week number of last year as\n // well. If no1wkst is 0, either the year\n // started on week start, or week number 1\n // got days from last year, so there are no\n // days from last year's last week number in\n // this year.\n var lnumweeks = void 0;\n if (!includes(options.byweekno, -1)) {\n var lyearweekday = getWeekday(datetime(year - 1, 1, 1));\n var lno1wkst = pymod(7 - lyearweekday.valueOf() + options.wkst, 7);\n var lyearlen = isLeapYear(year - 1) ? 366 : 365;\n var weekst = void 0;\n if (lno1wkst >= 4) {\n lno1wkst = 0;\n weekst = lyearlen + pymod(lyearweekday - options.wkst, 7);\n }\n else {\n weekst = yearlen - no1wkst;\n }\n lnumweeks = Math.floor(52 + pymod(weekst, 7) / 4);\n }\n else {\n lnumweeks = -1;\n }\n if (includes(options.byweekno, lnumweeks)) {\n for (var i = 0; i < no1wkst; i++)\n result.wnomask[i] = 1;\n }\n }\n return result;\n}\nfunction baseYearMasks(year) {\n var yearlen = isLeapYear(year) ? 366 : 365;\n var firstyday = datetime(year, 1, 1);\n var wday = getWeekday(firstyday);\n if (yearlen === 365) {\n return {\n mmask: M365MASK,\n mdaymask: MDAY365MASK,\n nmdaymask: NMDAY365MASK,\n wdaymask: WDAYMASK.slice(wday),\n mrange: M365RANGE,\n };\n }\n return {\n mmask: M366MASK,\n mdaymask: MDAY366MASK,\n nmdaymask: NMDAY366MASK,\n wdaymask: WDAYMASK.slice(wday),\n mrange: M366RANGE,\n };\n}\n//# sourceMappingURL=yearinfo.js.map","import { notEmpty, repeat, range, isPresent } from '../helpers';\nimport { Frequency } from '../types';\nimport { rebuildYear } from './yearinfo';\nimport { rebuildMonth } from './monthinfo';\nimport { easter } from './easter';\nimport { Time } from '../datetime';\nimport { datetime, sort, toOrdinal } from '../dateutil';\n// =============================================================================\n// Iterinfo\n// =============================================================================\nvar Iterinfo = /** @class */ (function () {\n // eslint-disable-next-line no-empty-function\n function Iterinfo(options) {\n this.options = options;\n }\n Iterinfo.prototype.rebuild = function (year, month) {\n var options = this.options;\n if (year !== this.lastyear) {\n this.yearinfo = rebuildYear(year, options);\n }\n if (notEmpty(options.bynweekday) &&\n (month !== this.lastmonth || year !== this.lastyear)) {\n var _a = this.yearinfo, yearlen = _a.yearlen, mrange = _a.mrange, wdaymask = _a.wdaymask;\n this.monthinfo = rebuildMonth(year, month, yearlen, mrange, wdaymask, options);\n }\n if (isPresent(options.byeaster)) {\n this.eastermask = easter(year, options.byeaster);\n }\n };\n Object.defineProperty(Iterinfo.prototype, \"lastyear\", {\n get: function () {\n return this.monthinfo ? this.monthinfo.lastyear : null;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"lastmonth\", {\n get: function () {\n return this.monthinfo ? this.monthinfo.lastmonth : null;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"yearlen\", {\n get: function () {\n return this.yearinfo.yearlen;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"yearordinal\", {\n get: function () {\n return this.yearinfo.yearordinal;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"mrange\", {\n get: function () {\n return this.yearinfo.mrange;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"wdaymask\", {\n get: function () {\n return this.yearinfo.wdaymask;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"mmask\", {\n get: function () {\n return this.yearinfo.mmask;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"wnomask\", {\n get: function () {\n return this.yearinfo.wnomask;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"nwdaymask\", {\n get: function () {\n return this.monthinfo ? this.monthinfo.nwdaymask : [];\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"nextyearlen\", {\n get: function () {\n return this.yearinfo.nextyearlen;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"mdaymask\", {\n get: function () {\n return this.yearinfo.mdaymask;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"nmdaymask\", {\n get: function () {\n return this.yearinfo.nmdaymask;\n },\n enumerable: false,\n configurable: true\n });\n Iterinfo.prototype.ydayset = function () {\n return [range(this.yearlen), 0, this.yearlen];\n };\n Iterinfo.prototype.mdayset = function (_, month) {\n var start = this.mrange[month - 1];\n var end = this.mrange[month];\n var set = repeat(null, this.yearlen);\n for (var i = start; i < end; i++)\n set[i] = i;\n return [set, start, end];\n };\n Iterinfo.prototype.wdayset = function (year, month, day) {\n // We need to handle cross-year weeks here.\n var set = repeat(null, this.yearlen + 7);\n var i = toOrdinal(datetime(year, month, day)) - this.yearordinal;\n var start = i;\n for (var j = 0; j < 7; j++) {\n set[i] = i;\n ++i;\n if (this.wdaymask[i] === this.options.wkst)\n break;\n }\n return [set, start, i];\n };\n Iterinfo.prototype.ddayset = function (year, month, day) {\n var set = repeat(null, this.yearlen);\n var i = toOrdinal(datetime(year, month, day)) - this.yearordinal;\n set[i] = i;\n return [set, i, i + 1];\n };\n Iterinfo.prototype.htimeset = function (hour, _, second, millisecond) {\n var _this = this;\n var set = [];\n this.options.byminute.forEach(function (minute) {\n set = set.concat(_this.mtimeset(hour, minute, second, millisecond));\n });\n sort(set);\n return set;\n };\n Iterinfo.prototype.mtimeset = function (hour, minute, _, millisecond) {\n var set = this.options.bysecond.map(function (second) { return new Time(hour, minute, second, millisecond); });\n sort(set);\n return set;\n };\n Iterinfo.prototype.stimeset = function (hour, minute, second, millisecond) {\n return [new Time(hour, minute, second, millisecond)];\n };\n Iterinfo.prototype.getdayset = function (freq) {\n switch (freq) {\n case Frequency.YEARLY:\n return this.ydayset.bind(this);\n case Frequency.MONTHLY:\n return this.mdayset.bind(this);\n case Frequency.WEEKLY:\n return this.wdayset.bind(this);\n case Frequency.DAILY:\n return this.ddayset.bind(this);\n default:\n return this.ddayset.bind(this);\n }\n };\n Iterinfo.prototype.gettimeset = function (freq) {\n switch (freq) {\n case Frequency.HOURLY:\n return this.htimeset.bind(this);\n case Frequency.MINUTELY:\n return this.mtimeset.bind(this);\n case Frequency.SECONDLY:\n return this.stimeset.bind(this);\n }\n };\n return Iterinfo;\n}());\nexport default Iterinfo;\n//# sourceMappingURL=index.js.map","import { RRule } from '../rrule';\nimport { empty, repeat, pymod } from '../helpers';\nexport function rebuildMonth(year, month, yearlen, mrange, wdaymask, options) {\n var result = {\n lastyear: year,\n lastmonth: month,\n nwdaymask: [],\n };\n var ranges = [];\n if (options.freq === RRule.YEARLY) {\n if (empty(options.bymonth)) {\n ranges = [[0, yearlen]];\n }\n else {\n for (var j = 0; j < options.bymonth.length; j++) {\n month = options.bymonth[j];\n ranges.push(mrange.slice(month - 1, month + 1));\n }\n }\n }\n else if (options.freq === RRule.MONTHLY) {\n ranges = [mrange.slice(month - 1, month + 1)];\n }\n if (empty(ranges)) {\n return result;\n }\n // Weekly frequency won't get here, so we may not\n // care about cross-year weekly periods.\n result.nwdaymask = repeat(0, yearlen);\n for (var j = 0; j < ranges.length; j++) {\n var rang = ranges[j];\n var first = rang[0];\n var last = rang[1] - 1;\n for (var k = 0; k < options.bynweekday.length; k++) {\n var i = void 0;\n var _a = options.bynweekday[k], wday = _a[0], n = _a[1];\n if (n < 0) {\n i = last + (n + 1) * 7;\n i -= pymod(wdaymask[i] - wday, 7);\n }\n else {\n i = first + (n - 1) * 7;\n i += pymod(7 - wdaymask[i] + wday, 7);\n }\n if (first <= i && i <= last)\n result.nwdaymask[i] = 1;\n }\n }\n return result;\n}\n//# sourceMappingURL=monthinfo.js.map","export function easter(y, offset) {\n if (offset === void 0) { offset = 0; }\n var a = y % 19;\n var b = Math.floor(y / 100);\n var c = y % 100;\n var d = Math.floor(b / 4);\n var e = b % 4;\n var f = Math.floor((b + 8) / 25);\n var g = Math.floor((b - f + 1) / 3);\n var h = Math.floor(19 * a + b - d - g + 15) % 30;\n var i = Math.floor(c / 4);\n var k = c % 4;\n var l = Math.floor(32 + 2 * e + 2 * i - h - k) % 7;\n var m = Math.floor((a + 11 * h + 22 * l) / 451);\n var month = Math.floor((h + l - 7 * m + 114) / 31);\n var day = ((h + l - 7 * m + 114) % 31) + 1;\n var date = Date.UTC(y, month - 1, day + offset);\n var yearStart = Date.UTC(y, 0, 1);\n return [Math.ceil((date - yearStart) / (1000 * 60 * 60 * 24))];\n}\n//# sourceMappingURL=easter.js.map","import { combine, fromOrdinal, sort } from '../dateutil';\nimport { pymod, isPresent, includes } from '../helpers';\nexport function buildPoslist(bysetpos, timeset, start, end, ii, dayset) {\n var poslist = [];\n for (var j = 0; j < bysetpos.length; j++) {\n var daypos = void 0;\n var timepos = void 0;\n var pos = bysetpos[j];\n if (pos < 0) {\n daypos = Math.floor(pos / timeset.length);\n timepos = pymod(pos, timeset.length);\n }\n else {\n daypos = Math.floor((pos - 1) / timeset.length);\n timepos = pymod(pos - 1, timeset.length);\n }\n var tmp = [];\n for (var k = start; k < end; k++) {\n var val = dayset[k];\n if (!isPresent(val))\n continue;\n tmp.push(val);\n }\n var i = void 0;\n if (daypos < 0) {\n i = tmp.slice(daypos)[0];\n }\n else {\n i = tmp[daypos];\n }\n var time = timeset[timepos];\n var date = fromOrdinal(ii.yearordinal + i);\n var res = combine(date, time);\n // XXX: can this ever be in the array?\n // - compare the actual date instead?\n if (!includes(poslist, res))\n poslist.push(res);\n }\n sort(poslist);\n return poslist;\n}\n//# sourceMappingURL=poslist.js.map","import { freqIsDailyOrGreater } from '../types';\nimport { combine, fromOrdinal, MAXYEAR } from '../dateutil';\nimport Iterinfo from '../iterinfo/index';\nimport { RRule } from '../rrule';\nimport { buildTimeset } from '../parseoptions';\nimport { notEmpty, includes, isPresent } from '../helpers';\nimport { DateWithZone } from '../datewithzone';\nimport { buildPoslist } from './poslist';\nimport { DateTime } from '../datetime';\nexport function iter(iterResult, options) {\n var dtstart = options.dtstart, freq = options.freq, interval = options.interval, until = options.until, bysetpos = options.bysetpos;\n var count = options.count;\n if (count === 0 || interval === 0) {\n return emitResult(iterResult);\n }\n var counterDate = DateTime.fromDate(dtstart);\n var ii = new Iterinfo(options);\n ii.rebuild(counterDate.year, counterDate.month);\n var timeset = makeTimeset(ii, counterDate, options);\n for (;;) {\n var _a = ii.getdayset(freq)(counterDate.year, counterDate.month, counterDate.day), dayset = _a[0], start = _a[1], end = _a[2];\n var filtered = removeFilteredDays(dayset, start, end, ii, options);\n if (notEmpty(bysetpos)) {\n var poslist = buildPoslist(bysetpos, timeset, start, end, ii, dayset);\n for (var j = 0; j < poslist.length; j++) {\n var res = poslist[j];\n if (until && res > until) {\n return emitResult(iterResult);\n }\n if (res >= dtstart) {\n var rezonedDate = rezoneIfNeeded(res, options);\n if (!iterResult.accept(rezonedDate)) {\n return emitResult(iterResult);\n }\n if (count) {\n --count;\n if (!count) {\n return emitResult(iterResult);\n }\n }\n }\n }\n }\n else {\n for (var j = start; j < end; j++) {\n var currentDay = dayset[j];\n if (!isPresent(currentDay)) {\n continue;\n }\n var date = fromOrdinal(ii.yearordinal + currentDay);\n for (var k = 0; k < timeset.length; k++) {\n var time = timeset[k];\n var res = combine(date, time);\n if (until && res > until) {\n return emitResult(iterResult);\n }\n if (res >= dtstart) {\n var rezonedDate = rezoneIfNeeded(res, options);\n if (!iterResult.accept(rezonedDate)) {\n return emitResult(iterResult);\n }\n if (count) {\n --count;\n if (!count) {\n return emitResult(iterResult);\n }\n }\n }\n }\n }\n }\n if (options.interval === 0) {\n return emitResult(iterResult);\n }\n // Handle frequency and interval\n counterDate.add(options, filtered);\n if (counterDate.year > MAXYEAR) {\n return emitResult(iterResult);\n }\n if (!freqIsDailyOrGreater(freq)) {\n timeset = ii.gettimeset(freq)(counterDate.hour, counterDate.minute, counterDate.second, 0);\n }\n ii.rebuild(counterDate.year, counterDate.month);\n }\n}\nfunction isFiltered(ii, currentDay, options) {\n var bymonth = options.bymonth, byweekno = options.byweekno, byweekday = options.byweekday, byeaster = options.byeaster, bymonthday = options.bymonthday, bynmonthday = options.bynmonthday, byyearday = options.byyearday;\n return ((notEmpty(bymonth) && !includes(bymonth, ii.mmask[currentDay])) ||\n (notEmpty(byweekno) && !ii.wnomask[currentDay]) ||\n (notEmpty(byweekday) && !includes(byweekday, ii.wdaymask[currentDay])) ||\n (notEmpty(ii.nwdaymask) && !ii.nwdaymask[currentDay]) ||\n (byeaster !== null && !includes(ii.eastermask, currentDay)) ||\n ((notEmpty(bymonthday) || notEmpty(bynmonthday)) &&\n !includes(bymonthday, ii.mdaymask[currentDay]) &&\n !includes(bynmonthday, ii.nmdaymask[currentDay])) ||\n (notEmpty(byyearday) &&\n ((currentDay < ii.yearlen &&\n !includes(byyearday, currentDay + 1) &&\n !includes(byyearday, -ii.yearlen + currentDay)) ||\n (currentDay >= ii.yearlen &&\n !includes(byyearday, currentDay + 1 - ii.yearlen) &&\n !includes(byyearday, -ii.nextyearlen + currentDay - ii.yearlen)))));\n}\nfunction rezoneIfNeeded(date, options) {\n return new DateWithZone(date, options.tzid).rezonedDate();\n}\nfunction emitResult(iterResult) {\n return iterResult.getValue();\n}\nfunction removeFilteredDays(dayset, start, end, ii, options) {\n var filtered = false;\n for (var dayCounter = start; dayCounter < end; dayCounter++) {\n var currentDay = dayset[dayCounter];\n filtered = isFiltered(ii, currentDay, options);\n if (filtered)\n dayset[currentDay] = null;\n }\n return filtered;\n}\nfunction makeTimeset(ii, counterDate, options) {\n var freq = options.freq, byhour = options.byhour, byminute = options.byminute, bysecond = options.bysecond;\n if (freqIsDailyOrGreater(freq)) {\n return buildTimeset(options);\n }\n if ((freq >= RRule.HOURLY &&\n notEmpty(byhour) &&\n !includes(byhour, counterDate.hour)) ||\n (freq >= RRule.MINUTELY &&\n notEmpty(byminute) &&\n !includes(byminute, counterDate.minute)) ||\n (freq >= RRule.SECONDLY &&\n notEmpty(bysecond) &&\n !includes(bysecond, counterDate.second))) {\n return [];\n }\n return ii.gettimeset(freq)(counterDate.hour, counterDate.minute, counterDate.second, counterDate.millisecond);\n}\n//# sourceMappingURL=index.js.map","import { isValidDate } from './dateutil';\nimport IterResult from './iterresult';\nimport CallbackIterResult from './callbackiterresult';\nimport { fromText, parseText, toText, isFullyConvertible } from './nlp/index';\nimport { Frequency, } from './types';\nimport { parseOptions, initializeOptions } from './parseoptions';\nimport { parseString } from './parsestring';\nimport { optionsToString } from './optionstostring';\nimport { Cache } from './cache';\nimport { Weekday } from './weekday';\nimport { iter } from './iter/index';\n// =============================================================================\n// RRule\n// =============================================================================\nexport var Days = {\n MO: new Weekday(0),\n TU: new Weekday(1),\n WE: new Weekday(2),\n TH: new Weekday(3),\n FR: new Weekday(4),\n SA: new Weekday(5),\n SU: new Weekday(6),\n};\nexport var DEFAULT_OPTIONS = {\n freq: Frequency.YEARLY,\n dtstart: null,\n interval: 1,\n wkst: Days.MO,\n count: null,\n until: null,\n tzid: null,\n bysetpos: null,\n bymonth: null,\n bymonthday: null,\n bynmonthday: null,\n byyearday: null,\n byweekno: null,\n byweekday: null,\n bynweekday: null,\n byhour: null,\n byminute: null,\n bysecond: null,\n byeaster: null,\n};\nexport var defaultKeys = Object.keys(DEFAULT_OPTIONS);\n/**\n *\n * @param {Options?} options - see \n * - The only required option is `freq`, one of RRule.YEARLY, RRule.MONTHLY, ...\n * @constructor\n */\nvar RRule = /** @class */ (function () {\n function RRule(options, noCache) {\n if (options === void 0) { options = {}; }\n if (noCache === void 0) { noCache = false; }\n // RFC string\n this._cache = noCache ? null : new Cache();\n // used by toString()\n this.origOptions = initializeOptions(options);\n var parsedOptions = parseOptions(options).parsedOptions;\n this.options = parsedOptions;\n }\n RRule.parseText = function (text, language) {\n return parseText(text, language);\n };\n RRule.fromText = function (text, language) {\n return fromText(text, language);\n };\n RRule.fromString = function (str) {\n return new RRule(RRule.parseString(str) || undefined);\n };\n RRule.prototype._iter = function (iterResult) {\n return iter(iterResult, this.options);\n };\n RRule.prototype._cacheGet = function (what, args) {\n if (!this._cache)\n return false;\n return this._cache._cacheGet(what, args);\n };\n RRule.prototype._cacheAdd = function (what, value, args) {\n if (!this._cache)\n return;\n return this._cache._cacheAdd(what, value, args);\n };\n /**\n * @param {Function} iterator - optional function that will be called\n * on each date that is added. It can return false\n * to stop the iteration.\n * @return Array containing all recurrences.\n */\n RRule.prototype.all = function (iterator) {\n if (iterator) {\n return this._iter(new CallbackIterResult('all', {}, iterator));\n }\n var result = this._cacheGet('all');\n if (result === false) {\n result = this._iter(new IterResult('all', {}));\n this._cacheAdd('all', result);\n }\n return result;\n };\n /**\n * Returns all the occurrences of the rrule between after and before.\n * The inc keyword defines what happens if after and/or before are\n * themselves occurrences. With inc == True, they will be included in the\n * list, if they are found in the recurrence set.\n *\n * @return Array\n */\n RRule.prototype.between = function (after, before, inc, iterator) {\n if (inc === void 0) { inc = false; }\n if (!isValidDate(after) || !isValidDate(before)) {\n throw new Error('Invalid date passed in to RRule.between');\n }\n var args = {\n before: before,\n after: after,\n inc: inc,\n };\n if (iterator) {\n return this._iter(new CallbackIterResult('between', args, iterator));\n }\n var result = this._cacheGet('between', args);\n if (result === false) {\n result = this._iter(new IterResult('between', args));\n this._cacheAdd('between', result, args);\n }\n return result;\n };\n /**\n * Returns the last recurrence before the given datetime instance.\n * The inc keyword defines what happens if dt is an occurrence.\n * With inc == True, if dt itself is an occurrence, it will be returned.\n *\n * @return Date or null\n */\n RRule.prototype.before = function (dt, inc) {\n if (inc === void 0) { inc = false; }\n if (!isValidDate(dt)) {\n throw new Error('Invalid date passed in to RRule.before');\n }\n var args = { dt: dt, inc: inc };\n var result = this._cacheGet('before', args);\n if (result === false) {\n result = this._iter(new IterResult('before', args));\n this._cacheAdd('before', result, args);\n }\n return result;\n };\n /**\n * Returns the first recurrence after the given datetime instance.\n * The inc keyword defines what happens if dt is an occurrence.\n * With inc == True, if dt itself is an occurrence, it will be returned.\n *\n * @return Date or null\n */\n RRule.prototype.after = function (dt, inc) {\n if (inc === void 0) { inc = false; }\n if (!isValidDate(dt)) {\n throw new Error('Invalid date passed in to RRule.after');\n }\n var args = { dt: dt, inc: inc };\n var result = this._cacheGet('after', args);\n if (result === false) {\n result = this._iter(new IterResult('after', args));\n this._cacheAdd('after', result, args);\n }\n return result;\n };\n /**\n * Returns the number of recurrences in this set. It will have go trough\n * the whole recurrence, if this hasn't been done before.\n */\n RRule.prototype.count = function () {\n return this.all().length;\n };\n /**\n * Converts the rrule into its string representation\n *\n * @see \n * @return String\n */\n RRule.prototype.toString = function () {\n return optionsToString(this.origOptions);\n };\n /**\n * Will convert all rules described in nlp:ToText\n * to text.\n */\n RRule.prototype.toText = function (gettext, language, dateFormatter) {\n return toText(this, gettext, language, dateFormatter);\n };\n RRule.prototype.isFullyConvertibleToText = function () {\n return isFullyConvertible(this);\n };\n /**\n * @return a RRule instance with the same freq and options\n * as this one (cache is not cloned)\n */\n RRule.prototype.clone = function () {\n return new RRule(this.origOptions);\n };\n // RRule class 'constants'\n RRule.FREQUENCIES = [\n 'YEARLY',\n 'MONTHLY',\n 'WEEKLY',\n 'DAILY',\n 'HOURLY',\n 'MINUTELY',\n 'SECONDLY',\n ];\n RRule.YEARLY = Frequency.YEARLY;\n RRule.MONTHLY = Frequency.MONTHLY;\n RRule.WEEKLY = Frequency.WEEKLY;\n RRule.DAILY = Frequency.DAILY;\n RRule.HOURLY = Frequency.HOURLY;\n RRule.MINUTELY = Frequency.MINUTELY;\n RRule.SECONDLY = Frequency.SECONDLY;\n RRule.MO = Days.MO;\n RRule.TU = Days.TU;\n RRule.WE = Days.WE;\n RRule.TH = Days.TH;\n RRule.FR = Days.FR;\n RRule.SA = Days.SA;\n RRule.SU = Days.SU;\n RRule.parseString = parseString;\n RRule.optionsToString = optionsToString;\n return RRule;\n}());\nexport { RRule };\n//# sourceMappingURL=rrule.js.map","import { __assign } from \"tslib\";\nimport { RRule } from './rrule';\nimport { RRuleSet } from './rruleset';\nimport { untilStringToDate } from './dateutil';\nimport { includes, split } from './helpers';\nimport { parseString, parseDtstart } from './parsestring';\n/**\n * RRuleStr\n * To parse a set of rrule strings\n */\nvar DEFAULT_OPTIONS = {\n dtstart: null,\n cache: false,\n unfold: false,\n forceset: false,\n compatible: false,\n tzid: null,\n};\nexport function parseInput(s, options) {\n var rrulevals = [];\n var rdatevals = [];\n var exrulevals = [];\n var exdatevals = [];\n var parsedDtstart = parseDtstart(s);\n var dtstart = parsedDtstart.dtstart;\n var tzid = parsedDtstart.tzid;\n var lines = splitIntoLines(s, options.unfold);\n lines.forEach(function (line) {\n var _a;\n if (!line)\n return;\n var _b = breakDownLine(line), name = _b.name, parms = _b.parms, value = _b.value;\n switch (name.toUpperCase()) {\n case 'RRULE':\n if (parms.length) {\n throw new Error(\"unsupported RRULE parm: \".concat(parms.join(',')));\n }\n rrulevals.push(parseString(line));\n break;\n case 'RDATE':\n var _c = (_a = /RDATE(?:;TZID=([^:=]+))?/i.exec(line)) !== null && _a !== void 0 ? _a : [], rdateTzid = _c[1];\n if (rdateTzid && !tzid) {\n tzid = rdateTzid;\n }\n rdatevals = rdatevals.concat(parseRDate(value, parms));\n break;\n case 'EXRULE':\n if (parms.length) {\n throw new Error(\"unsupported EXRULE parm: \".concat(parms.join(',')));\n }\n exrulevals.push(parseString(value));\n break;\n case 'EXDATE':\n exdatevals = exdatevals.concat(parseRDate(value, parms));\n break;\n case 'DTSTART':\n break;\n default:\n throw new Error('unsupported property: ' + name);\n }\n });\n return {\n dtstart: dtstart,\n tzid: tzid,\n rrulevals: rrulevals,\n rdatevals: rdatevals,\n exrulevals: exrulevals,\n exdatevals: exdatevals,\n };\n}\nfunction buildRule(s, options) {\n var _a = parseInput(s, options), rrulevals = _a.rrulevals, rdatevals = _a.rdatevals, exrulevals = _a.exrulevals, exdatevals = _a.exdatevals, dtstart = _a.dtstart, tzid = _a.tzid;\n var noCache = options.cache === false;\n if (options.compatible) {\n options.forceset = true;\n options.unfold = true;\n }\n if (options.forceset ||\n rrulevals.length > 1 ||\n rdatevals.length ||\n exrulevals.length ||\n exdatevals.length) {\n var rset_1 = new RRuleSet(noCache);\n rset_1.dtstart(dtstart);\n rset_1.tzid(tzid || undefined);\n rrulevals.forEach(function (val) {\n rset_1.rrule(new RRule(groomRruleOptions(val, dtstart, tzid), noCache));\n });\n rdatevals.forEach(function (date) {\n rset_1.rdate(date);\n });\n exrulevals.forEach(function (val) {\n rset_1.exrule(new RRule(groomRruleOptions(val, dtstart, tzid), noCache));\n });\n exdatevals.forEach(function (date) {\n rset_1.exdate(date);\n });\n if (options.compatible && options.dtstart)\n rset_1.rdate(dtstart);\n return rset_1;\n }\n var val = rrulevals[0] || {};\n return new RRule(groomRruleOptions(val, val.dtstart || options.dtstart || dtstart, val.tzid || options.tzid || tzid), noCache);\n}\nexport function rrulestr(s, options) {\n if (options === void 0) { options = {}; }\n return buildRule(s, initializeOptions(options));\n}\nfunction groomRruleOptions(val, dtstart, tzid) {\n return __assign(__assign({}, val), { dtstart: dtstart, tzid: tzid });\n}\nfunction initializeOptions(options) {\n var invalid = [];\n var keys = Object.keys(options);\n var defaultKeys = Object.keys(DEFAULT_OPTIONS);\n keys.forEach(function (key) {\n if (!includes(defaultKeys, key))\n invalid.push(key);\n });\n if (invalid.length) {\n throw new Error('Invalid options: ' + invalid.join(', '));\n }\n return __assign(__assign({}, DEFAULT_OPTIONS), options);\n}\nfunction extractName(line) {\n if (line.indexOf(':') === -1) {\n return {\n name: 'RRULE',\n value: line,\n };\n }\n var _a = split(line, ':', 1), name = _a[0], value = _a[1];\n return {\n name: name,\n value: value,\n };\n}\nfunction breakDownLine(line) {\n var _a = extractName(line), name = _a.name, value = _a.value;\n var parms = name.split(';');\n if (!parms)\n throw new Error('empty property name');\n return {\n name: parms[0].toUpperCase(),\n parms: parms.slice(1),\n value: value,\n };\n}\nfunction splitIntoLines(s, unfold) {\n if (unfold === void 0) { unfold = false; }\n s = s && s.trim();\n if (!s)\n throw new Error('Invalid empty string');\n // More info about 'unfold' option\n // Go head to http://www.ietf.org/rfc/rfc2445.txt\n if (!unfold) {\n return s.split(/\\s/);\n }\n var lines = s.split('\\n');\n var i = 0;\n while (i < lines.length) {\n // TODO\n var line = (lines[i] = lines[i].replace(/\\s+$/g, ''));\n if (!line) {\n lines.splice(i, 1);\n }\n else if (i > 0 && line[0] === ' ') {\n lines[i - 1] += line.slice(1);\n lines.splice(i, 1);\n }\n else {\n i += 1;\n }\n }\n return lines;\n}\nfunction validateDateParm(parms) {\n parms.forEach(function (parm) {\n if (!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(parm)) {\n throw new Error('unsupported RDATE/EXDATE parm: ' + parm);\n }\n });\n}\nfunction parseRDate(rdateval, parms) {\n validateDateParm(parms);\n return rdateval.split(',').map(function (datestr) { return untilStringToDate(datestr); });\n}\n//# sourceMappingURL=rrulestr.js.map","import { __extends } from \"tslib\";\nimport { RRule } from './rrule';\nimport { sort, timeToUntilString } from './dateutil';\nimport { includes } from './helpers';\nimport { iterSet } from './iterset';\nimport { rrulestr } from './rrulestr';\nimport { optionsToString } from './optionstostring';\nfunction createGetterSetter(fieldName) {\n var _this = this;\n return function (field) {\n if (field !== undefined) {\n _this[\"_\".concat(fieldName)] = field;\n }\n if (_this[\"_\".concat(fieldName)] !== undefined) {\n return _this[\"_\".concat(fieldName)];\n }\n for (var i = 0; i < _this._rrule.length; i++) {\n var field_1 = _this._rrule[i].origOptions[fieldName];\n if (field_1) {\n return field_1;\n }\n }\n };\n}\nvar RRuleSet = /** @class */ (function (_super) {\n __extends(RRuleSet, _super);\n /**\n *\n * @param {Boolean?} noCache\n * The same stratagy as RRule on cache, default to false\n * @constructor\n */\n function RRuleSet(noCache) {\n if (noCache === void 0) { noCache = false; }\n var _this = _super.call(this, {}, noCache) || this;\n _this.dtstart = createGetterSetter.apply(_this, ['dtstart']);\n _this.tzid = createGetterSetter.apply(_this, ['tzid']);\n _this._rrule = [];\n _this._rdate = [];\n _this._exrule = [];\n _this._exdate = [];\n return _this;\n }\n RRuleSet.prototype._iter = function (iterResult) {\n return iterSet(iterResult, this._rrule, this._exrule, this._rdate, this._exdate, this.tzid());\n };\n /**\n * Adds an RRule to the set\n *\n * @param {RRule}\n */\n RRuleSet.prototype.rrule = function (rrule) {\n _addRule(rrule, this._rrule);\n };\n /**\n * Adds an EXRULE to the set\n *\n * @param {RRule}\n */\n RRuleSet.prototype.exrule = function (rrule) {\n _addRule(rrule, this._exrule);\n };\n /**\n * Adds an RDate to the set\n *\n * @param {Date}\n */\n RRuleSet.prototype.rdate = function (date) {\n _addDate(date, this._rdate);\n };\n /**\n * Adds an EXDATE to the set\n *\n * @param {Date}\n */\n RRuleSet.prototype.exdate = function (date) {\n _addDate(date, this._exdate);\n };\n /**\n * Get list of included rrules in this recurrence set.\n *\n * @return List of rrules\n */\n RRuleSet.prototype.rrules = function () {\n return this._rrule.map(function (e) { return rrulestr(e.toString()); });\n };\n /**\n * Get list of excluded rrules in this recurrence set.\n *\n * @return List of exrules\n */\n RRuleSet.prototype.exrules = function () {\n return this._exrule.map(function (e) { return rrulestr(e.toString()); });\n };\n /**\n * Get list of included datetimes in this recurrence set.\n *\n * @return List of rdates\n */\n RRuleSet.prototype.rdates = function () {\n return this._rdate.map(function (e) { return new Date(e.getTime()); });\n };\n /**\n * Get list of included datetimes in this recurrence set.\n *\n * @return List of exdates\n */\n RRuleSet.prototype.exdates = function () {\n return this._exdate.map(function (e) { return new Date(e.getTime()); });\n };\n RRuleSet.prototype.valueOf = function () {\n var result = [];\n if (!this._rrule.length && this._dtstart) {\n result = result.concat(optionsToString({ dtstart: this._dtstart }));\n }\n this._rrule.forEach(function (rrule) {\n result = result.concat(rrule.toString().split('\\n'));\n });\n this._exrule.forEach(function (exrule) {\n result = result.concat(exrule\n .toString()\n .split('\\n')\n .map(function (line) { return line.replace(/^RRULE:/, 'EXRULE:'); })\n .filter(function (line) { return !/^DTSTART/.test(line); }));\n });\n if (this._rdate.length) {\n result.push(rdatesToString('RDATE', this._rdate, this.tzid()));\n }\n if (this._exdate.length) {\n result.push(rdatesToString('EXDATE', this._exdate, this.tzid()));\n }\n return result;\n };\n /**\n * to generate recurrence field such as:\n * DTSTART:19970902T010000Z\n * RRULE:FREQ=YEARLY;COUNT=2;BYDAY=TU\n * RRULE:FREQ=YEARLY;COUNT=1;BYDAY=TH\n */\n RRuleSet.prototype.toString = function () {\n return this.valueOf().join('\\n');\n };\n /**\n * Create a new RRuleSet Object completely base on current instance\n */\n RRuleSet.prototype.clone = function () {\n var rrs = new RRuleSet(!!this._cache);\n this._rrule.forEach(function (rule) { return rrs.rrule(rule.clone()); });\n this._exrule.forEach(function (rule) { return rrs.exrule(rule.clone()); });\n this._rdate.forEach(function (date) { return rrs.rdate(new Date(date.getTime())); });\n this._exdate.forEach(function (date) { return rrs.exdate(new Date(date.getTime())); });\n return rrs;\n };\n return RRuleSet;\n}(RRule));\nexport { RRuleSet };\nfunction _addRule(rrule, collection) {\n if (!(rrule instanceof RRule)) {\n throw new TypeError(String(rrule) + ' is not RRule instance');\n }\n if (!includes(collection.map(String), String(rrule))) {\n collection.push(rrule);\n }\n}\nfunction _addDate(date, collection) {\n if (!(date instanceof Date)) {\n throw new TypeError(String(date) + ' is not Date instance');\n }\n if (!includes(collection.map(Number), Number(date))) {\n collection.push(date);\n sort(collection);\n }\n}\nfunction rdatesToString(param, rdates, tzid) {\n var isUTC = !tzid || tzid.toUpperCase() === 'UTC';\n var header = isUTC ? \"\".concat(param, \":\") : \"\".concat(param, \";TZID=\").concat(tzid, \":\");\n var dateString = rdates\n .map(function (rdate) { return timeToUntilString(rdate.valueOf(), isUTC); })\n .join(',');\n return \"\".concat(header).concat(dateString);\n}\n//# sourceMappingURL=rruleset.js.map","import { DateWithZone } from './datewithzone';\nimport { iter } from './iter';\nimport { sort } from './dateutil';\nexport function iterSet(iterResult, _rrule, _exrule, _rdate, _exdate, tzid) {\n var _exdateHash = {};\n var _accept = iterResult.accept;\n function evalExdate(after, before) {\n _exrule.forEach(function (rrule) {\n rrule.between(after, before, true).forEach(function (date) {\n _exdateHash[Number(date)] = true;\n });\n });\n }\n _exdate.forEach(function (date) {\n var zonedDate = new DateWithZone(date, tzid).rezonedDate();\n _exdateHash[Number(zonedDate)] = true;\n });\n iterResult.accept = function (date) {\n var dt = Number(date);\n if (isNaN(dt))\n return _accept.call(this, date);\n if (!_exdateHash[dt]) {\n evalExdate(new Date(dt - 1), new Date(dt + 1));\n if (!_exdateHash[dt]) {\n _exdateHash[dt] = true;\n return _accept.call(this, date);\n }\n }\n return true;\n };\n if (iterResult.method === 'between') {\n evalExdate(iterResult.args.after, iterResult.args.before);\n iterResult.accept = function (date) {\n var dt = Number(date);\n if (!_exdateHash[dt]) {\n _exdateHash[dt] = true;\n return _accept.call(this, date);\n }\n return true;\n };\n }\n for (var i = 0; i < _rdate.length; i++) {\n var zonedDate = new DateWithZone(_rdate[i], tzid).rezonedDate();\n if (!iterResult.accept(new Date(zonedDate.getTime())))\n break;\n }\n _rrule.forEach(function (rrule) {\n iter(iterResult, rrule.options);\n });\n var res = iterResult._result;\n sort(res);\n switch (iterResult.method) {\n case 'all':\n case 'between':\n return res;\n case 'before':\n return ((res.length && res[res.length - 1]) || null);\n case 'after':\n default:\n return ((res.length && res[0]) || null);\n }\n}\n//# sourceMappingURL=iterset.js.map","interface IViewPosition{\r\n\ttop: number;\r\n\tleft: number;\r\n}\r\n\r\ninterface IViewBox extends IViewPosition{\r\n\twidth: number;\r\n\theight: number;\r\n\tbottom: number;\r\n\tright: number;\r\n}\r\n\r\nexport class Tooltip {\r\n\tprivate _root: HTMLElement;\r\n\tprivate _tooltipNode: HTMLElement | null;\r\n\tprivate _scheduler: any;\r\n\r\n\tconstructor(scheduler: any){\r\n\t\tthis._scheduler = scheduler;\r\n\t}\r\n\r\n\tgetNode() : HTMLElement {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tif (!this._tooltipNode){\r\n\t\t\tthis._tooltipNode = document.createElement(\"div\");\r\n\t\t\tthis._tooltipNode.className = \"dhtmlXTooltip scheduler_tooltip tooltip\";\r\n\r\n\t\t\tscheduler._waiAria.tooltipAttr(this._tooltipNode);\r\n\t\t}\r\n\t\tif(scheduler.config.rtl){\r\n\t\t\tthis._tooltipNode.classList.add(\"dhtmlXTooltip_rtl\");\r\n\t\t} else{\r\n\t\t\tthis._tooltipNode.classList.remove(\"dhtmlXTooltip_rtl\");\r\n\t\t}\r\n\t\treturn this._tooltipNode;\r\n\t}\r\n\r\n\tsetViewport(node: HTMLElement):Tooltip{\r\n\t\tthis._root = node;\r\n\t\treturn this;\r\n\t}\r\n\r\n\tshow(left: number, top: number): Tooltip;\r\n\tshow(event: MouseEvent): Tooltip;\r\n\tshow(left: number | MouseEvent, top?: number): Tooltip {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tconst container = document.body;\r\n\t\tconst node = this.getNode();\r\n\r\n\t\tif(!domHelpers.isChildOf(node, container)){\r\n\t\t\tthis.hide();\r\n\t\t\tcontainer.appendChild(node);\r\n\t\t}\r\n\r\n\t\tif (this._isLikeMouseEvent(left)) {\r\n\t\t\tconst position = this._calculateTooltipPosition(left as MouseEvent);\r\n\t\t\ttop = position.top;\r\n\t\t\tleft = position.left;\r\n\t\t}\r\n\r\n\t\tnode.style.top = top + \"px\";\r\n\t\tnode.style.left = left + \"px\";\r\n\r\n\t\tscheduler._waiAria.tooltipVisibleAttr(node);\r\n\t\treturn this;\r\n\t}\r\n\thide() : Tooltip{\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst node = this.getNode();\r\n\t\tif(node && node.parentNode){\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t}\r\n\t\tscheduler._waiAria.tooltipHiddenAttr(node);\r\n\t\treturn this;\r\n\t}\r\n\r\n\tsetContent(html: string) : Tooltip{\r\n\t\tconst node = this.getNode();\r\n\t\tnode.innerHTML = html;\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// it is for salesforce, because it proxies event to it own events\r\n\tprivate _isLikeMouseEvent(event: any): boolean {\r\n\t\tif (!event || typeof event !== \"object\") {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn \"clientX\" in event && \"clientY\" in event;\r\n\t}\r\n\r\n\tprivate _getViewPort() : HTMLElement {\r\n\t\treturn this._root || document.body;\r\n\t}\r\n\r\n\r\n\tprivate _calculateTooltipPosition(event: MouseEvent): IViewPosition{\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\t// top/left coordinates inside the viewport by mouse position\r\n\t\tconst viewport = this._getViewPortSize();\r\n\t\tconst tooltipNode = this.getNode();\r\n\t\tconst tooltip: IViewBox = {\r\n\t\t\ttop:0,\r\n\t\t\tleft: 0,\r\n\t\t\twidth: tooltipNode.offsetWidth,\r\n\t\t\theight: tooltipNode.offsetHeight,\r\n\t\t\tbottom: 0,\r\n\t\t\tright: 0\r\n\t\t};\r\n\r\n\t\tconst offsetX = scheduler.config.tooltip_offset_x;\r\n\t\tconst offsetY = scheduler.config.tooltip_offset_y;\r\n\r\n\t\tconst container = document.body;\r\n\t\tconst mouse = domHelpers.getRelativeEventPosition(event, container);\r\n\t\tconst containerPos = domHelpers.getNodePosition(container);\r\n\t\tmouse.y += containerPos.y; // to fix margin collapsing\r\n\r\n\t\ttooltip.top = mouse.y;\r\n\t\ttooltip.left = mouse.x;\r\n\t\ttooltip.top += offsetY;\r\n\t\ttooltip.left += offsetX;\r\n\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\ttooltip.right = tooltip.left + tooltip.width;\r\n\r\n\t\tconst scrollTop = window.scrollY + container.scrollTop; // to fix margin collapsing\r\n\t\t// edge cases when the tooltip element can be partially hidden by edges of the viewport\r\n\t\tif(tooltip.top < viewport.top - scrollTop){\r\n\t\t\ttooltip.top = viewport.top;\r\n\t\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\t}else if(tooltip.bottom > viewport.bottom){\r\n\t\t\ttooltip.bottom = viewport.bottom;\r\n\t\t\ttooltip.top = tooltip.bottom - tooltip.height;\r\n\t\t}\r\n\r\n\t\tif(tooltip.left < viewport.left){\r\n\t\t\ttooltip.left = viewport.left;\r\n\t\t\ttooltip.right = viewport.left + tooltip.width;\r\n\t\t}else if(tooltip.right > viewport.right){\r\n\t\t\ttooltip.right = viewport.right;\r\n\t\t\ttooltip.left = tooltip.right - tooltip.width;\r\n\t\t}\r\n\r\n\t\tif(mouse.x >= tooltip.left && mouse.x <= tooltip.right) {\r\n\t\t\ttooltip.left = mouse.x - tooltip.width - offsetX;\r\n\t\t\ttooltip.right = tooltip.left + tooltip.width;\r\n\t\t}\r\n\r\n\t\tif(mouse.y >= tooltip.top && mouse.y <= tooltip.bottom) {\r\n\t\t\ttooltip.top = mouse.y - tooltip.height - offsetY;\r\n\t\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\t}\r\n\r\n\t\treturn tooltip;\r\n\t}\r\n\r\n\tprivate _getViewPortSize() : IViewBox {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tconst container = this._getViewPort();\r\n\t\tlet viewport = container;\r\n\t\tlet scrollTop = window.scrollY + document.body.scrollTop;\r\n\t\tlet scrollLeft = window.scrollX + document.body.scrollLeft;\r\n\t\tlet pos;\r\n\t\t// support for the initial tooltip mode where the tooltip element was attached to the data area of scheduler\r\n\t\tif(container === scheduler.$event_data){\r\n\t\t\tviewport = scheduler.$event;\r\n\t\t\tscrollTop = 0;\r\n\t\t\tscrollLeft = 0;\r\n\t\t\tpos = domHelpers.getNodePosition(scheduler.$event);\r\n\t\t}else{\r\n\t\t\tpos = domHelpers.getNodePosition(viewport);\r\n\t\t}\r\n\t\treturn {\r\n\t\t\tleft:pos.x + scrollLeft,\r\n\t\t\ttop: pos.y + scrollTop,\r\n\t\t\twidth: pos.width,\r\n\t\t\theight: pos.height,\r\n\t\t\tbottom: pos.y + pos.height + scrollTop,\r\n\t\t\tright: pos.x + pos.width + scrollLeft\r\n\t\t};\r\n\t}\r\n}\r\n","import * as utils from \"../../core/utils/utils\";\r\nimport { Tooltip } from \"./tooltip\";\r\n\r\ninterface ITrackerTarget {\r\n\tselector: string;\r\n\tonmouseenter: (event: MouseEvent, node: HTMLElement) => void;\r\n\tonmousemove: (event: MouseEvent, node: HTMLElement) => void;\r\n\tonmouseleave: (event: MouseEvent, node: HTMLElement) => void;\r\n\tglobal: boolean;\r\n}\r\n\r\ninterface ITooltipConfig {\r\n\tselector: string;\r\n\thtml: (event: MouseEvent, node: HTMLElement) => string;\r\n\tglobal: boolean;\r\n}\r\n\r\nexport class TooltipManager{\r\n\ttooltip: Tooltip;\r\n\tprotected _domEvents: any;\r\n\tprivate _listeners: object = {};\r\n\tprivate _scheduler: any;\r\n\tprivate delayShow: any;\r\n\tprivate delayHide: any;\r\n\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.tooltip = new Tooltip(scheduler);\r\n\t\tthis._scheduler = scheduler;\r\n\t\tthis._domEvents = scheduler._createDomEventScope();\r\n\t\tthis._initDelayedFunctions();\r\n\t}\r\n\r\n\tdestructor(): void{\r\n\t\tthis.tooltip.hide();\r\n\t\tthis._domEvents.detachAll();\r\n\t}\r\n\thideTooltip(): void{\r\n\t\tthis.delayHide();\r\n\t}\r\n\tattach(config: ITrackerTarget): void {\r\n\t\tlet root = document.body;\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tif(!config.global){\r\n\t\t\troot = scheduler.$root;\r\n\t\t}\r\n\r\n\t\tlet watchableTarget = null;\r\n\t\tconst handler = (event) => {\r\n\t\t\tconst eventTarget = domHelpers.getTargetNode(event);\r\n\t\t\tconst targetNode = domHelpers.closest(eventTarget, config.selector);\r\n\t\t\tif(domHelpers.isChildOf(eventTarget, this.tooltip.getNode())){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tconst doOnMouseEnter = () => {\r\n\t\t\t\twatchableTarget = targetNode;\r\n\t\t\t\tconfig.onmouseenter(event, targetNode);\r\n\t\t\t};\r\n\t\t\t// GS-2377: to show tooltip after touch and hide it when touch is outside the events\r\n\t\t\tif (scheduler._mobile && scheduler.config.touch_tooltip){\r\n\t\t\t\tif(targetNode){\r\n\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tconfig.onmouseleave(event, targetNode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(watchableTarget){\r\n\t\t\t\tif(targetNode && targetNode === watchableTarget){\r\n\t\t\t\t\tconfig.onmousemove(event, targetNode);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconfig.onmouseleave(event, watchableTarget);\r\n\t\t\t\t\twatchableTarget = null;\r\n\r\n\t\t\t\t\tif(targetNode && targetNode !== watchableTarget){\r\n\t\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(targetNode){\r\n\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.detach(config.selector);\r\n\t\tthis._domEvents.attach(root, \"mousemove\", handler);\r\n\t\tthis._listeners[config.selector] = {\r\n\t\t\tnode: root,\r\n\t\t\thandler\r\n\t\t};\r\n\t}\r\n\r\n\tdetach(selector: string): void {\r\n\t\tconst listener = this._listeners[selector];\r\n\t\tif(listener){\r\n\t\t\tthis._domEvents.detach(listener.node, \"mousemove\", listener.handler);\r\n\t\t}\r\n\t}\r\n\r\n\ttooltipFor(config: ITooltipConfig): void {\r\n\t\tconst cloneDomEvent = (event: MouseEvent) => {\r\n\t\t\tlet clone = event;\r\n\t\t\t// making events survive timeout in ie\r\n\t\t\t// tslint:disable-next-line no-string-literal\r\n\t\t\tif(document[\"createEventObject\"] && !document.createEvent){\r\n\t\t\t\t// tslint:disable-next-line no-string-literal\r\n\t\t\t\tclone = document[\"createEventObject\"](event);\r\n\t\t\t}\r\n\t\t\treturn clone;\r\n\t\t};\r\n\t\tthis._initDelayedFunctions();\r\n\t\tthis.attach({\r\n\t\t\tselector: config.selector,\r\n\t\t\tglobal: config.global,\r\n\t\t\tonmouseenter:(event: MouseEvent, node: HTMLElement) => {\r\n\t\t\t\tconst html = config.html(event, node);\r\n\t\t\t\tif(html){\r\n\t\t\t\t\tthis.delayShow(cloneDomEvent(event), html);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonmousemove:(event: MouseEvent, node: HTMLElement) => {\r\n\t\t\t\tconst html = config.html(event, node);\r\n\t\t\t\tif(html){\r\n\t\t\t\t\tthis.delayShow(cloneDomEvent(event), html);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\t\t\tthis.delayHide();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonmouseleave:() => {\r\n\t\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\t\tthis.delayHide();\r\n\t\t\t},\r\n\t\t});\r\n\t}\r\n\r\n\tprivate _initDelayedFunctions(){\r\n\t\tconst scheduler = this._scheduler;\r\n\t\t// reset delayed functions in order to apply current values of tooltip_timeout\r\n\t\tif(this.delayShow){\r\n\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t}\r\n\t\tif(this.delayHide){\r\n\t\t\tthis.delayHide.$cancelTimeout();\r\n\t\t}\r\n\t\tthis.tooltip.hide();\r\n\t\t\r\n\t\tthis.delayShow = (utils as any).default.delay((event: MouseEvent, html: string) => {\r\n\t\t\tif(scheduler.callEvent(\"onBeforeTooltip\", [event]) === false) {\r\n\t\t\t\tthis.tooltip.hide();\r\n\t\t\t} else {\r\n\t\t\t\tthis.tooltip.setContent(html);\r\n\t\t\t\tthis.tooltip.show(event);\r\n\t\t\t}\r\n\t\t}, scheduler.config.tooltip_timeout || 1);\r\n\r\n\t\tthis.delayHide = (utils as any).default.delay(() => {\r\n\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\tthis.tooltip.hide();\r\n\t\t}, scheduler.config.tooltip_hide_timeout || 1);\r\n\t}\r\n\r\n}","import active_links from \"./active_links\";\r\nimport agenda_legacy from \"./agenda_legacy_view\";\r\nimport agenda_view from \"./agenda\";\r\nimport all_timed from \"./all_timed\";\r\nimport collision from \"./collision\";\r\nimport container_autoresize from \"./container_autoresize\";\r\nimport cookie from \"./cookie\";\r\nimport daytimeline_restricted from \"./restricted_extensions/daytimeline\";\r\nimport drag_between_restricted from \"./restricted_extensions/drag_between\";\r\nimport editors from \"./editors\";\r\nimport expand from \"./expand\";\r\nimport grid_view from \"./restricted_extensions/grid_view\";\r\nimport html_templates from \"./html_templates\";\r\nimport key_nav from \"./key_nav\";\r\nimport layer from \"./layer\";\r\nimport limit from \"./limit\";\r\nimport map_view from \"./map_view\";\r\nimport minical from \"./minical\";\r\nimport monthheight from \"./monthheight\";\r\nimport multisection_restricted from \"./restricted_extensions/multisection\";\r\nimport multiselect from \"./multiselect\";\r\nimport multisource from \"./multisource\";\r\nimport mvc from \"./mvc\";\r\nimport outerdrag from \"./outerdrag\";\r\nimport pdf from \"./pdf\";\r\nimport quick_info from \"./quick_info\";\r\nimport readonly from \"./readonly\";\r\nimport recurring from \"./recurring\";\r\nimport recurring_legacy from \"./recurring_legacy\";\r\nimport serialize from \"./serialize\";\r\nimport timeline_restricted from \"./restricted_extensions/timeline\";\r\nimport tooltip from \"./tooltip\";\r\nimport treetimeline_restricted from \"./restricted_extensions/treetimeline\";\r\nimport units_restricted from \"./restricted_extensions/units\";\r\nimport url from \"./url\";\r\nimport week_agenda_restricted from \"./restricted_extensions/week_agenda\";\r\nimport wp from \"./wp\";\r\nimport year_view from \"./year_view\";\r\nimport export_api from \"./export_api\";\r\n\r\nexport default {\r\n\tactive_links,\r\n\tagenda_legacy,\r\n\tagenda_view,\r\n\tall_timed,\r\n\tcollision,\r\n\tcontainer_autoresize,\r\n\tcookie,\r\n\tdaytimeline: daytimeline_restricted,\r\n\tdrag_between: drag_between_restricted,\r\n\teditors,\r\n\texpand,\r\n\texport_api,\r\n\tgrid_view,\r\n\thtml_templates,\r\n\tkey_nav,\r\n\tlayer,\r\n\tlimit,\r\n\tmap_view,\r\n\tminical,\r\n\tmonthheight,\r\n\tmultisection: multisection_restricted,\r\n\tmultiselect,\r\n\tmultisource,\r\n\tmvc,\r\n\touterdrag,\r\n\tpdf,\r\n\tquick_info,\r\n\treadonly,\r\n\trecurring,\r\n\trecurring_legacy,\r\n\tserialize,\r\n\ttimeline: timeline_restricted,\r\n\ttooltip,\r\n\ttreetimeline: treetimeline_restricted,\r\n\tunits: units_restricted,\r\n\turl,\r\n\tweek_agenda: week_agenda_restricted,\r\n\twp,\r\n\tyear_view\r\n};","export default function(scheduler){\r\n\r\nscheduler.config.active_link_view = \"day\";\r\nscheduler._active_link_click = function(e){\r\n\tvar start = e.target;\r\n\tvar to = start.getAttribute(\"data-link-date\");\r\n\tvar s_d = scheduler.date.str_to_date(scheduler.config.api_date, false, true);\r\n\tif (to) {\r\n\t\tscheduler.setCurrentView(s_d(to), scheduler.config.active_link_view);\r\n\t\tif (e && e.preventDefault)\r\n\t\t\te.preventDefault();\r\n\t\treturn false;\r\n\t}\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar do_wrapper = function(key, fullname){\r\n\t\tfullname = fullname || (key+\"_scale_date\");\r\n\r\n\t\tif(!scheduler.templates['_active_links_old_'+ fullname]){\r\n\t\t\tscheduler.templates['_active_links_old_'+ fullname] = scheduler.templates[fullname];\r\n\t\t}\r\n\t\tvar week_x = scheduler.templates['_active_links_old_'+ fullname];\r\n\t\tvar d_s = scheduler.date.date_to_str(scheduler.config.api_date);\r\n\t\tscheduler.templates[fullname] = function(date) {\r\n\t\t\treturn \"\" + week_x(date) + \"\";\r\n\t\t};\r\n\t};\r\n\r\n\tdo_wrapper(\"week\");\r\n\tdo_wrapper(\"\", \"month_day\");\r\n\tif (this.matrix){\r\n\t\tfor (var key in this.matrix)\r\n\t\t\tdo_wrapper(key);\r\n\t}\r\n\r\n\tthis._detachDomEvent(this._obj, \"click\", scheduler._active_link_click);\r\n\tscheduler.event(this._obj, \"click\", scheduler._active_link_click);\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.date.add_agenda_legacy = function(date){\r\n\treturn scheduler.date.add(date, 1, \"year\");\r\n};\r\n\r\nscheduler.templates.agenda_legacy_time = function(start,end,ev){\r\n\tif (ev._timed)\r\n\t\treturn this.day_date(ev.start_date, ev.end_date, ev)+\" \"+this.event_date(start);\r\n\telse\r\n\t\treturn scheduler.templates.day_date(start)+\" – \"+scheduler.templates.day_date(end);\r\n};\r\nscheduler.templates.agenda_legacy_text = function(start,end,event){\r\n\treturn event.text;\r\n};\r\nscheduler.templates.agenda_legacy_date = function(){ return \"\"; };\r\n\r\nscheduler.date.agenda_legacy_start=function(){ return scheduler.date.date_part(scheduler._currentDate()); };\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function() {\r\n\tvar old_dblclick_dhx_cal_data = scheduler.dblclick_dhx_cal_data;\r\n\tscheduler.dblclick_dhx_cal_data = function() {\r\n\t\tif (this._mode == \"agenda_legacy\") {\r\n\t\t\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\t\t\tthis.addEventNow();\r\n\t\t} else {\r\n\t\t\tif (old_dblclick_dhx_cal_data)\r\n\t\t\t\treturn old_dblclick_dhx_cal_data.apply(this, arguments);\r\n\t\t}\r\n\t};\r\n\r\n\r\n\tvar old = scheduler.render_data;\r\n\tscheduler.render_data=function(evs){\r\n\t\tif (this._mode == \"agenda_legacy\")\r\n\t\t\tfill_agenda_tab();\r\n\t\telse\r\n\t\t\treturn old.apply(this,arguments);\r\n\t};\r\n\r\n\tvar old_render_view_data = scheduler.render_view_data;\r\n\tscheduler.render_view_data = function(){\r\n\t\tif(this._mode == \"agenda_legacy\") {\r\n\t\t\tscheduler._agendaScrollTop = scheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop;\r\n\t\t\tscheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop = 0;\r\n\t\t}\r\n\t\treturn old_render_view_data.apply(this,arguments);\r\n\t};\r\n\r\n\r\n\r\n\tfunction set_full_view(mode){\r\n\t\tif (mode){\r\n\t\t\tvar l = scheduler.locale.labels;\r\n\r\n\t\t\tvar rowAttr = scheduler._waiAria.agendaHeadAttrString();\r\n\t\t\tvar dateHeader = scheduler._waiAria.agendaHeadDateString(l.date);\r\n\t\t\tvar descriptionHeader = scheduler._waiAria.agendaHeadDescriptionString(l.description);\r\n\r\n\t\t\tscheduler._els[\"dhx_cal_header\"][0].innerHTML=\"
\" +\r\n\t\t\t\t\"
\"+l.date+\"
\" +\r\n\t\t\t\t\"\"+l.description+\"\" +\r\n\t\t\t\t\"
\";\r\n\t\t\tscheduler._table_view=true;\r\n\t\t\tscheduler.set_sizes();\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fill_agenda_tab(){\r\n\t\t//select events for which data need to be printed\r\n\r\n\t\tvar events = scheduler.get_visible_events();\r\n\t\tevents.sort(function(a,b){ return a.start_date>b.start_date?1:-1;});\r\n\r\n\t\tvar tableAttr = scheduler._waiAria.agendaDataAttrString();\r\n\t\tvar agendaEventAttrString;\r\n\t\t//generate html for the view\r\n\t\tvar html=\"
\";\r\n\t\tfor (var i=0; i
\"+\r\n\t\t\t\t\t(scheduler.config.rtl ? scheduler.templates.agenda_time(ev.end_date,ev.start_date, ev):scheduler.templates.agenda_time(ev.start_date, ev.end_date,ev))+\r\n\t\t\t\t\t\"
\";\r\n\t\t\thtml+=`
\r\n\t\t\t\r\n\t\t\t
`;\r\n\t\t\thtml+=\"\"+scheduler.templates.agenda_text(ev.start_date, ev.end_date, ev)+\"
\";\r\n\t\t}\r\n\t\thtml+=\"
\";\r\n\r\n\t\t//render html\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop = scheduler._agendaScrollTop||0;\r\n\r\n\t\t// setting up dhx_v_border size\r\n\t\tvar agenda_area = scheduler._els[\"dhx_cal_data\"][0].childNodes[0];\r\n\t\tvar v_border = agenda_area.childNodes[agenda_area.childNodes.length-1];\r\n\t\tv_border.style.height = (agenda_area.offsetHeight < scheduler._els[\"dhx_cal_data\"][0].offsetHeight) ? \"100%\" : (agenda_area.offsetHeight+\"px\");\r\n\r\n\t\tvar t=scheduler._els[\"dhx_cal_data\"][0].firstChild.childNodes;\r\n\r\n\t\tvar dateElement = scheduler._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML=scheduler.templates.agenda_date(scheduler._min_date, scheduler._max_date, scheduler._mode);\r\n\t\t}\r\n\r\n\t\tscheduler._rendered=[];\r\n\t\tfor (var i=0; i < t.length-1; i++)\r\n\t\t\tscheduler._rendered[i]=t[i];\r\n\r\n\t}\r\n\r\n\tscheduler.agenda_legacy_view=function(mode){\r\n\t\tscheduler._min_date = scheduler.config.agenda_start||scheduler.date.agenda_legacy_start(scheduler._date);\r\n\t\tscheduler._max_date = scheduler.config.agenda_end||scheduler.date.add_agenda_legacy(scheduler._min_date, 1);\r\n\r\n\t\tset_full_view(mode);\r\n\t\tif (mode){\r\n\t\t\tscheduler._cols = null;\r\n\t\t\tscheduler._colsS = null;\r\n\t\t\tscheduler._table_view = true;\r\n\t\t\t//agenda tab activated\r\n\t\t\tfill_agenda_tab();\r\n\t\t} else {\r\n\t\t\tscheduler._table_view = false;\r\n\t\t\t//agenda tab de-activated\r\n\t\t}\r\n\t};\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.date.add_agenda = function(date, inc){\r\n\t\treturn scheduler.date.add(date, 1*inc, \"month\");\r\n\t};\r\n\t\r\n\tscheduler.templates.agenda_time = function(start,end,ev){\r\n\t\tif (ev._timed){\r\n\t\t\treturn `${this.event_date(start)} - ${this.event_date(end)}`;\r\n\t\t}else{\r\n\t\t\treturn scheduler.locale.labels.full_day;\r\n\t\t}\r\n\t};\r\n\tscheduler.templates.agenda_text = function(start,end,ev){\r\n\t\treturn ev.text;\r\n\t};\r\n\r\n\tconst dayDateToStr = scheduler.date.date_to_str(\"%F %j\");\r\n\tconst dayDowToStr = scheduler.date.date_to_str(\"%l\");\r\n\r\n\tscheduler.templates.agenda_day = function(date){ \r\n\t\treturn `
${dayDateToStr(date)}
\r\n\t\t
${dayDowToStr(date)}
`;\r\n\t};\r\n\tscheduler.templates.agenda_date = function(start, end){ \r\n\t\treturn scheduler.templates.month_date(scheduler.getState().date); \r\n\t};\r\n\t\r\n\tscheduler.date.agenda_start=function(date){\r\n\t\treturn scheduler.date.month_start(new Date(date));\r\n\t};\r\n\r\n\tlet scrollTop = 0;\r\n\t\r\n\tscheduler.attachEvent(\"onTemplatesReady\",function() {\r\n\t\tvar old_dblclick_dhx_cal_data = scheduler.dblclick_dhx_cal_data;\r\n\t\tscheduler.dblclick_dhx_cal_data = function() {\r\n\t\t\tif (this._mode == \"agenda\") {\r\n\t\t\t\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\t\t\t\tthis.addEventNow();\r\n\t\t\t} else {\r\n\t\t\t\tif (old_dblclick_dhx_cal_data)\r\n\t\t\t\t\treturn old_dblclick_dhx_cal_data.apply(this, arguments);\r\n\t\t\t}\r\n\t\t};\r\n\t\r\n\t\r\n\t\tvar old = scheduler.render_data;\r\n\t\tscheduler.render_data=function(evs){\r\n\t\t\tif (this._mode == \"agenda\")\r\n\t\t\t\tfill_agenda_tab();\r\n\t\t\telse\r\n\t\t\t\treturn old.apply(this,arguments);\r\n\t\t};\r\n\t\r\n\t\tvar old_render_view_data = scheduler.render_view_data;\r\n\t\tscheduler.render_view_data = function(){\r\n\t\t\tif(this._mode == \"agenda\") {\r\n\t\t\t\tscrollTop = scheduler._els[\"dhx_cal_data\"][0].scrollTop;\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = 0;\r\n\t\t\t}\r\n\t\t\treturn old_render_view_data.apply(this,arguments);\r\n\t\t};\r\n\r\n\t\tfunction fill_agenda_tab(){\r\n\t\t\tconst events = scheduler.get_visible_events();\r\n\t\t\tevents.sort(function(a,b){ return a.start_date>b.start_date?1:-1;});\r\n\r\n\t\t\tconst eventsInDays = {};\r\n\t\t\tlet currDate = scheduler.getState().min_date;\r\n\t\t\tconst maxDate = scheduler.getState().max_date;\r\n\t\t\twhile(currDate.valueOf() < maxDate.valueOf()){\r\n\t\t\t\teventsInDays[currDate.valueOf()] = [];\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\r\n\t\t\tlet anyEvents = false;\r\n\r\n\t\t\tevents.forEach((ev) => {\r\n\t\t\t\tlet eventStart = scheduler.date.day_start(new Date(ev.start_date)); \r\n\t\t\t\twhile (eventStart.valueOf() < ev.end_date.valueOf()) {\r\n\t\t\t\t\tif (eventsInDays[eventStart.valueOf()]) {\r\n\t\t\t\t\t\teventsInDays[eventStart.valueOf()].push(ev);\r\n\t\t\t\t\t\tanyEvents = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\teventStart = scheduler.date.day_start(scheduler.date.add(eventStart, 1, \"day\"));\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(!anyEvents){\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = renderEmptyView();\r\n\t\t\t}else{\r\n\t\t\t\tlet html = \"\";\r\n\t\t\t\tfor(let day in eventsInDays){\r\n\t\t\t\t\tif(scheduler.ignore_agenda && scheduler.ignore_agenda(new Date(day*1))){\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\thtml += renderDay(new Date(day*1), eventsInDays[day]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = scrollTop;\r\n\t\t\t\r\n\t\t\tlet t = scheduler._els[\"dhx_cal_data\"][0].querySelectorAll(\".dhx_cal_agenda_event_line\");\r\n\t\t\tscheduler._rendered = [];\r\n\t\t\tfor (var i = 0; i < t.length - 1; i++) {\r\n\t\t\t\tscheduler._rendered[i] = t[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\r\n\r\n\t\tfunction renderEmptyView(){\r\n\t\t\treturn `
${scheduler.locale.labels.agenda_tab}
`;\r\n\t\t}\r\n\r\n\t\tfunction renderDay(day, events) {\r\n\t\t\tif(!events.length){\r\n\t\t\t\treturn \"\";\r\n\t\t\t}\r\n\t\t\tlet html = `\r\n
\r\n\t
${scheduler.templates.agenda_day(day)}
\r\n\t
\r\n`;\r\n\r\n\t\t\tevents.forEach((calendarEvent) => {\r\n\t\t\t\thtml += renderOneEvent(day, calendarEvent);\r\n\t\t\t});\r\n\r\n\t\t\thtml += `
`;\r\n\t\t\treturn html;\r\n\t\t}\r\n\r\n\t\tfunction renderOneEvent(day, calendarEvent){\r\n\t\t\tconst dates = scheduler.templates.agenda_time(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\t\t\tconst selectedId = scheduler.getState().select_id;\r\n\t\t\tconst cls = scheduler.templates.event_class(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\t\t\tconst description = scheduler.templates.agenda_text(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\r\n\t\t\tlet style = \"\";\r\n\t\t\tif(calendarEvent.color || calendarEvent.textColor){\r\n\t\t\t\tconst bg = (calendarEvent.color ? (\"--dhx-scheduler-event-background:\" + calendarEvent.color + \";\") : \"\");\r\n\t\t\t\tconst color = (calendarEvent.textColor ? (\"--dhx-scheduler-event-color:\" + calendarEvent.textColor + \";\") : \"\");\r\n\t\t\t\tstyle = ` style=\"${bg}${color}\" `;\r\n\t\t\t}\r\n\r\n\t\t\treturn `
\r\n\t
\r\n\t
${dates}
\r\n\t
${description}
\r\n
`;\r\n\t\t}\r\n\t\r\n\t\tscheduler.agenda_view=function(mode){\r\n\t\t\tif (mode){\r\n\t\t\t\tscheduler._min_date = scheduler.config.agenda_start || scheduler.date.agenda_start(scheduler._date);\r\n\t\t\t\tscheduler._max_date = scheduler.config.agenda_end || scheduler.date.add_agenda(scheduler._min_date, 1);\r\n\t\t\t\tscheduler._cols = null;\r\n\t\t\t\tscheduler._colsS = null;\r\n\t\t\t\tscheduler._table_view = true;\r\n\r\n\t\t\t\tconst dateHeader = scheduler._getNavDateElement();\r\n\t\t\t\tdateHeader.innerHTML = scheduler.templates.agenda_date(scheduler._date);\r\n\t\t\t\t//agenda tab activated\r\n\t\t\t\tfill_agenda_tab();\r\n\t\t\t} else {\r\n\t\t\t\tscheduler._table_view = false;\r\n\t\t\t\t//agenda tab de-activated\r\n\t\t\t}\r\n\t\t};\r\n\t});\r\n\r\n\t// scheduler.attachEvent(\"onEventSelected\", function(id){\r\n\t// \tconst oldSelected = scheduler.$container.querySelectorAll(\".dhx_cal_agenda_event_line_selected\");\r\n\t// \toldSelected.forEach((el) => {\r\n\t// \t\tel.classList.remove(\"dhx_cal_agenda_event_line_selected\");\r\n\t// \t});\r\n\r\n\t// \tconst selected = scheduler.$container.querySelector(`[${scheduler.config.event_attribute}=\"${id}\"]`);\r\n\t// \tif(selected){\r\n\t// \t\tselected.classList.add(\"dhx_cal_agenda_event_line_selected\");\r\n\t// \t}\r\n\t// });\r\n\t\r\n\t\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.config.all_timed = \"short\";\r\n\tscheduler.config.all_timed_month = false;\r\n\r\n\tvar is_event_short = function (ev) {\r\n\t\tif(!((ev.end_date - ev.start_date)/(1000*60*60) >= 24)){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t// short event shouldn't disappear to multiday area during dnd-resize\r\n\t\tif(scheduler._drag_mode == \"resize\" && scheduler._drag_id == ev.id){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn \tfalse;\r\n\t};\r\n\r\n\t// copy of usual events and recurring instances;\r\n\t// regular copy causes problems with recurrings which have series event as a prototype\r\n\tscheduler._safe_copy = function(event){\r\n\t\tvar proto = null,\r\n\t\t\tcopy = scheduler._copy_event(event);\r\n\t\tif(event.event_pid){\r\n\t\t\tproto = scheduler.getEvent(event.event_pid);\r\n\t\t}\r\n\r\n\t\tif (proto && proto.isPrototypeOf(event)) {\r\n\t\t\tdelete copy.event_length;\r\n\t\t\tdelete copy.event_pid;\r\n\t\t\tdelete copy.rec_pattern;\r\n\t\t\tdelete copy.rec_type;\r\n\t\t}\r\n\r\n\t\treturn copy;\r\n\t};\r\n\r\n\tvar old_prerender_events_line = scheduler._pre_render_events_line;\r\n\tvar old_prerender_events_table = scheduler._pre_render_events_table;\r\n\r\n\tvar prerender_events = function (evs, hold) {\r\n\t\tif (!this._table_view) {\r\n\t\t\treturn old_prerender_events_line.call(this, evs, hold);\r\n\t\t}\r\n\r\n\t\treturn old_prerender_events_table.call(this, evs, hold);\r\n\t};\r\n\r\n\tscheduler._pre_render_events_line = scheduler._pre_render_events_table = function(evs, hold){\r\n\t\tif (!this.config.all_timed ||\r\n\t\t\t(this._table_view && this._mode != \"month\") ||\r\n\t\t\t(this._mode == \"month\" && !this.config.all_timed_month))\r\n\t\t\treturn prerender_events.call(this, evs, hold);\r\n\r\n\t\tfor (var i=0; i < evs.length; i++) {\r\n\t\t\tvar ev=evs[i];\r\n\r\n\t\t\tif (ev._timed)\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tif (this.config.all_timed == \"short\") {\r\n\t\t\t\tif (!is_event_short(ev)) {\r\n\t\t\t\t\tif (this._mode != \"month\") {\r\n\t\t\t\t\t\tevs.splice(i--, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar ce = this._safe_copy(ev); // current event (event for one specific day) is copy of original with modified dates\r\n\t\t\tif(!ev._virtual){\r\n\t\t\t\tce._first_chunk = true;\r\n\t\t\t}else{\r\n\t\t\t\tce._first_chunk = false;\r\n\t\t\t}\r\n\t\t\tce._drag_resize = false;\r\n\t\t\tce._virtual = true;\r\n\t\t\tce.start_date = new Date(ce.start_date); // as lame copy doesn't copy date objects\r\n\r\n\t\t\tif (!isOvernightEvent(ev)) {\r\n\t\t\t\tce.end_date = new Date(ev.end_date);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tce.end_date = getNextDay(ce.start_date);\r\n\t\t\t\tif (this.config.last_hour != 24) { // if specific last_hour was set (e.g. 20)\r\n\t\t\t\t\tce.end_date = setDateTime(ce.start_date, this.config.last_hour);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar event_changed = false;\r\n\t\t\tif (ce.start_date < this._max_date && ce.end_date > this._min_date && ce.start_date < ce.end_date) {\r\n\t\t\t\tevs[i] = ce; // adding another event in collection\r\n\t\t\t\tevent_changed = true;\r\n\t\t\t}\r\n\t\t//\tif (ce.start_date > ce.end_date) {\r\n\t\t//\t\tevs.splice(i--,1);\r\n\t\t//\t}\r\n\r\n\t\t\tvar re = this._safe_copy(ev); // remaining event, copy of original with modified start_date (making range more narrow)\r\n\t\t\tre._virtual = true;\r\n\t\t\tre.end_date = new Date(re.end_date);\r\n\t\t\tif (re.start_date < this._min_date)\r\n\t\t\t\tre.start_date = setDateTime(this._min_date, this.config.first_hour);// as we are starting only with whole hours\r\n\t\t\telse\r\n\t\t\t\tre.start_date = setDateTime(getNextDay(ev.start_date), this.config.first_hour);\r\n\r\n\t\t\tif (re.start_date < this._max_date && re.start_date < re.end_date) {\r\n\t\t\t\tif (event_changed){\r\n\t\t\t\t\tevs.splice(i+1,0,re);//insert part\r\n\t\t\t\t}else {\r\n\t\t\t\t\tevs[i--] = re;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tre._last_chunk = false;\r\n\t\t\t}else{\r\n\t\t\t\tce._last_chunk = true;\r\n\t\t\t\tce._drag_resize = true;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// in case of all_timed pre_render is not applied to the original event\r\n\t\t// so we need to force redraw in case of dnd\r\n\t\tvar redraw = (this._drag_mode == 'move')?false:hold;\r\n\t\treturn prerender_events.call(this, evs, redraw);\r\n\r\n\r\n\t\tfunction isOvernightEvent(ev){\r\n\t\t\tvar next_day = getNextDay(ev.start_date);\r\n\t\t\treturn (+ev.end_date > +next_day);\r\n\t\t}\r\n\t\tfunction getNextDay(date){\r\n\t\t\tvar next_day = scheduler.date.add(date, 1, \"day\");\r\n\t\t\tnext_day = scheduler.date.date_part(next_day);\r\n\t\t\treturn next_day;\r\n\t\t}\r\n\t\tfunction setDateTime(date, hours){\r\n\t\t\tvar val = scheduler.date.date_part(new Date(date));\r\n\t\t\tval.setHours(hours);\r\n\t\t\treturn val;\r\n\t\t}\r\n\t};\r\n\tvar old_get_visible_events = scheduler.get_visible_events;\r\n\tscheduler.get_visible_events = function(only_timed){\r\n\t\tif (!(this.config.all_timed && this.config.multi_day))\r\n\t\t\treturn old_get_visible_events.call(this, only_timed);\r\n\t\treturn old_get_visible_events.call(this, false); // only timed = false\r\n\t};\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function (old_mode, old_date, mode, date) {\r\n\t\tscheduler._allow_dnd = (mode == \"day\" || mode == \"week\" || scheduler.getView(mode));\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler._is_main_area_event = function(ev){\r\n\t\treturn !!(ev._timed || this.config.all_timed === true || (this.config.all_timed == \"short\" && is_event_short(ev)) );\r\n\t};\r\n\r\n\tvar oldUpdate = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id){\r\n\t\t// full redraw(update_render=true) messes events order while dnd.\r\n\t\t// individual redraw(update_render=false) of multiday event, which happens on select/unselect, expands event to full width of the cell and can be fixes only with full redraw.\r\n\t\t// so for now full redraw is always enabled for not-dnd updates\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tvar fullRedrawNeeded;\r\n\t\tvar initial;\r\n\t\tif(ev) {\r\n\t\t\tfullRedrawNeeded = (scheduler.config.all_timed && !(scheduler.isOneDayEvent(scheduler._events[id]) || scheduler.getState().drag_id));\r\n\t\t\tif (fullRedrawNeeded) {\r\n\t\t\t\tinitial = scheduler.config.update_render;\r\n\t\t\t\tscheduler.config.update_render = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\toldUpdate.apply(scheduler, arguments);\r\n\r\n\t\tif(ev) {\r\n\t\t\tif (fullRedrawNeeded) {\r\n\t\t\t\tscheduler.config.update_render = initial;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\r\nvar temp_section;\r\nvar before;\r\n\r\nscheduler.config.collision_limit = 1;\r\n\r\nfunction _setTempSection(event_id) { // for custom views (matrix, timeline, units)\r\n\tvar checked_mode = scheduler._get_section_view();\r\n\tif(checked_mode && event_id){\r\n\t\ttemp_section = scheduler.getEvent(event_id)[scheduler._get_section_property()];\r\n\t}\r\n}\r\n\r\nscheduler.attachEvent(\"onBeforeDrag\",function(id){\r\n\t_setTempSection(id);\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onBeforeLightbox\",function(id){\r\n\tvar ev = scheduler.getEvent(id);\r\n\tbefore = [ev.start_date, ev.end_date];\r\n\t_setTempSection(id);\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventChanged\",function(id){\r\n\tif (!id || !scheduler.getEvent(id)) return true;\r\n\tvar ev = scheduler.getEvent(id);\r\n\tif (!scheduler.checkCollision(ev)){\r\n\t\tif (!before) return false;\r\n\t\tev.start_date = before[0];\r\n\t\tev.end_date = before[1];\r\n\t\tev._timed=this.isOneDayEvent(ev);\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onBeforeEventChanged\",function(ev,e,is_new){\r\n\treturn scheduler.checkCollision(ev);\r\n});\r\nscheduler.attachEvent(\"onEventAdded\",function(id,ev) {\r\n\tvar result = scheduler.checkCollision(ev);\r\n\tif (!result)\r\n\t\tscheduler.deleteEvent(id);\r\n});\r\nscheduler.attachEvent(\"onEventSave\",function(id, edited_ev, is_new){\r\n\tedited_ev = scheduler._lame_clone(edited_ev);\r\n\tedited_ev.id = id;\r\n\r\n\t//lightbox may not have 'time' section\r\n\tif(!(edited_ev.start_date && edited_ev.end_date)){\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tedited_ev.start_date = new Date(ev.start_date);\r\n\t\tedited_ev.end_date = new Date(ev.end_date);\r\n\t}\r\n\r\n\tif((edited_ev.rrule && !edited_ev.recurring_event_id) || edited_ev.rec_type){\r\n\t\tscheduler._roll_back_dates(edited_ev);\r\n\t}\r\n\treturn scheduler.checkCollision(edited_ev); // in case user creates event on one date but then edited it another\r\n});\r\n\r\nscheduler._check_sections_collision = function(first, second){\r\n\tvar map_to = scheduler._get_section_property();\r\n\tif (first[map_to] == second[map_to] && first.id != second.id)\r\n\t\treturn true;\r\n\treturn false;\r\n};\r\n\r\nscheduler.checkCollision = function(ev) {\r\n\tvar evs = [];\r\n\tvar collision_limit = scheduler.config.collision_limit;\r\n\r\n\tif (ev.rrule || ev.rec_type) {\r\n\t\tvar evs_dates = scheduler.getRecDates(ev);\r\n\t\tfor(var k=0; k= collision_limit) {\r\n\r\n\t\t\tsingle = false;\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tif ( evs.length >= collision_limit )\r\n\t\t\tsingle = false;\r\n\t}\r\n\tif (!single) {\r\n\t\tvar res = !scheduler.callEvent(\"onEventCollision\",[ev,evs]);\r\n\t\tif (!res) {\r\n\t\t\tev[map_to] = temp_section||ev[map_to]; // from _setTempSection for custom views\r\n\t\t}\r\n\t\treturn res;\r\n\t}\r\n\treturn single;\r\n\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.config.container_autoresize = true;\r\n\tscheduler.config.month_day_min_height = 90;\r\n\tscheduler.config.min_grid_size = 25;\r\n\tscheduler.config.min_map_size = 400;\r\n\r\n\tvar old_pre_render_event = scheduler._pre_render_events;\r\n\r\n\t//need for temporary disabling without modifying public config\r\n\tvar active = true;\r\n\tvar total_height = 0;\r\n\tvar multiday_height = 0;\r\n\r\n\tscheduler._pre_render_events = function(evs, hold) {\r\n\t\tif (!(scheduler.config.container_autoresize && active)) {\r\n\t\t\treturn old_pre_render_event.apply(this, arguments);\r\n\t\t}\r\n\r\n\t\tvar hb = this.xy.bar_height;\r\n\t\tvar h_old = this._colsS.heights;\r\n\t\tvar h = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0];\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tif (!this._table_view)\r\n\t\t\tevs = this._pre_render_events_line(evs, hold); //ignore long events for now\r\n\t\telse\r\n\t\t\tevs = this._pre_render_events_table(evs, hold);\r\n\r\n\t\tif (this._table_view) {\r\n\t\t\tif (hold){\r\n\t\t\t\tthis._colsS.heights = h_old;\r\n\t\t\t} else {\r\n\t\t\t\tvar evl = data.firstChild;\r\n\t\t\t\tconst rows = evl.querySelectorAll(\".dhx_cal_month_row\");\r\n\t\t\t\tif (rows && rows.length) {\r\n\t\t\t\t\tfor (var i = 0; i < rows.length; i++) {\r\n\t\t\t\t\t\th[i]++;\r\n\r\n\t\t\t\t\t\tif ((h[i]) * hb > this._colsS.height - this.xy.month_head_height) { // 22 - height of cell's header\r\n\t\t\t\t\t\t\t//we have overflow, update heights\r\n\t\t\t\t\t\t\tvar cells = rows[i].querySelectorAll(\".dhx_cal_month_cell\");\r\n\r\n\t\t\t\t\t\t\tvar cHeight = this._colsS.height - this.xy.month_head_height;\r\n\t\t\t\t\t\t\tif(this.config.max_month_events*1 !== this.config.max_month_events || h[i] <= this.config.max_month_events){\r\n\t\t\t\t\t\t\t\tcHeight = h[i] * hb;\r\n\t\t\t\t\t\t\t}else if( (this.config.max_month_events + 1) * hb > this._colsS.height - this.xy.month_head_height){\r\n\t\t\t\t\t\t\t\tcHeight = (this.config.max_month_events + 1) * hb;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\trows[i].style.height = (cHeight + this.xy.month_head_height) + \"px\";\r\n\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\tfor (var j = 0; j < cells.length; j++) {\r\n\t\t\t\t\t\t\t\tcells[j].childNodes[1].style.height = cHeight + \"px\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\th[i] = (h[i - 1] || 0) + cells[0].offsetHeight;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\th[i] = (h[i - 1] || 0) + rows[i].querySelectorAll(\".dhx_cal_month_cell\")[0].offsetHeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t\th.unshift(0);\r\n\t\t\t\t\tif (evl.parentNode.offsetHeight < evl.parentNode.scrollHeight && !evl._h_fix) {\r\n\t\t\t\t\t\t//we have v-scroll, decrease last day cell\r\n\r\n\t\t\t\t\t\t// NO CHECK SHOULD BE MADE ON VERTICAL SCROLL\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!evs.length && this._els[\"dhx_multi_day\"][0].style.visibility == \"visible\")\r\n\t\t\t\t\t\th[0] = -1;\r\n\t\t\t\t\tif (evs.length || h[0] == -1) {\r\n\t\t\t\t\t\t//shift days to have space for multiday events\r\n\t\t\t\t\t\t//var childs = evl.parentNode.childNodes;\r\n\t\t\t\t\t\tvar dh = ((h[0] + 1) * hb + 1); // +1 so multiday events would have 2px from top and 2px from bottom by default\r\n\t\t\t\t\t\tif(multiday_height != dh + 1) {\r\n\t\t\t\t\t\t\tthis._obj.style.height = (total_height - multiday_height + dh - 1) + \"px\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tdh += \"px\";\r\n\t\t\t\t\t\tconst navHeight = this._els[\"dhx_cal_navline\"][0].offsetHeight;\r\n\t\t\t\t\t\tconst headerHeight = this._els[\"dhx_cal_header\"][0].offsetHeight;\r\n\t\t\t\t\t\tdata.style.height = (this._obj.offsetHeight - navHeight - headerHeight - (this.xy.margin_top || 0)) + 'px';\r\n\t\t\t\t\t\tvar last = this._els[\"dhx_multi_day\"][0];\r\n\t\t\t\t\t\tlast.style.height = dh;\r\n\t\t\t\t\t\tlast.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\t\tlast.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\t\t\t\t\t\tlast = this._els[\"dhx_multi_day\"][1];\r\n\t\t\t\t\t\tlast.style.height = dh;\r\n\t\t\t\t\t\tlast.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\t\tlast.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\r\n\t\t\t\t\t\tlast.className = h[0] ? \"dhx_multi_day_icon\" : \"dhx_multi_day_icon_small\";\r\n\t\t\t\t\t\tthis._dy_shift = (h[0] + 1) * hb;\r\n\t\t\t\t\t\th[0] = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn evs;\r\n\t};\r\n\r\n\tvar checked_divs = [\"dhx_cal_navline\", \"dhx_cal_header\", \"dhx_multi_day\", \"dhx_cal_data\"];\r\n\tvar updateContainterHeight = function(is_repaint) {\r\n\t\ttotal_height = 0;\r\n\t\tfor (var i = 0; i < checked_divs.length; i++) {\r\n\r\n\t\t\tvar className = checked_divs[i];\r\n\t\t\tvar checked_div = (scheduler._els[className]) ? scheduler._els[className][0] : null;\r\n\t\t\tvar height = 0;\r\n\t\t\tswitch (className) {\r\n\t\t\t\tcase \"dhx_cal_navline\":\r\n\t\t\t\tcase \"dhx_cal_header\":\r\n\t\t\t\t\theight = checked_div.offsetHeight;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"dhx_multi_day\":\r\n\t\t\t\t\theight = (checked_div) ? checked_div.offsetHeight - 1 : 0;\r\n\t\t\t\t\tmultiday_height = height;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"dhx_cal_data\":\r\n\t\t\t\t\tvar mode = scheduler.getState().mode;\r\n\r\n\t\t\t\t\tif(checked_div.childNodes[1] && mode != \"month\") {\r\n\t\t\t\t\t\tlet maxHeight = 0;\r\n\t\t\t\t\t\tfor(let i = 0; i < checked_div.childNodes.length; i++){\r\n\t\t\t\t\t\t\tif(checked_div.childNodes[i].offsetHeight > maxHeight){\r\n\t\t\t\t\t\t\t\tmaxHeight = checked_div.childNodes[i].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\theight = maxHeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\theight = Math.max(checked_div.offsetHeight - 1, checked_div.scrollHeight);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (mode == \"month\") {\r\n\t\t\t\t\t\tif (scheduler.config.month_day_min_height && !is_repaint) {\r\n\t\t\t\t\t\t\tvar rows_length = checked_div.querySelectorAll(\".dhx_cal_month_row\").length;\r\n\t\t\t\t\t\t\theight = rows_length * scheduler.config.month_day_min_height;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (is_repaint) {\r\n\t\t\t\t\t\t\tchecked_div.style.height = height + \"px\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (mode == \"year\"){\r\n\t\t\t\t\t\theight = 190 * scheduler.config.year_y;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(mode == \"agenda\"){\r\n\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\tif(checked_div.childNodes && checked_div.childNodes.length){\r\n\t\t\t\t\t\t\tfor(var j = 0; j < checked_div.childNodes.length; j++){\r\n\t\t\t\t\t\t\t\theight += checked_div.childNodes[j].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(height + 2 < scheduler.config.min_grid_size){\r\n\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (mode == \"week_agenda\"){\r\n\t\t\t\t\t\tvar min_height = scheduler.xy.week_agenda_scale_height + scheduler.config.min_grid_size,\r\n\t\t\t\t\t\t\tcur_height;\r\n\r\n\t\t\t\t\t\tvar column;\r\n\t\t\t\t\t\tfor(var k = 0; k < checked_div.childNodes.length; k++){\r\n\t\t\t\t\t\t\tcolumn = checked_div.childNodes[k];\r\n\t\t\t\t\t\t\tfor(var j = 0; j < column.childNodes.length; j++) {\r\n\t\t\t\t\t\t\t\tvar innerHeight = 0,\r\n\t\t\t\t\t\t\t\t\teventsContainer = column.childNodes[j].childNodes[1];\r\n\r\n\t\t\t\t\t\t\t\tfor(var g =0; g < eventsContainer.childNodes.length; g++){\r\n\t\t\t\t\t\t\t\t\tinnerHeight += eventsContainer.childNodes[g].offsetHeight;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tcur_height = innerHeight + scheduler.xy.week_agenda_scale_height;\r\n\t\t\t\t\t\t\t\tcur_height = (k == 1 && (j == 2 || j == 3)) ? cur_height * 2 : cur_height; // for last two cells;\r\n\r\n\t\t\t\t\t\t\t\tif (cur_height > min_height) {\r\n\t\t\t\t\t\t\t\t\tmin_height = cur_height;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\theight = min_height * 3;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(mode == \"map\") {\r\n\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\tvar evs = checked_div.querySelectorAll(\".dhx_map_line\");\r\n\r\n\t\t\t\t\t\tfor (var j = 0; j < evs.length; j++) {\r\n\t\t\t\t\t\t\theight += evs[j].offsetHeight;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (height + 2 < scheduler.config.min_map_size) {\r\n\t\t\t\t\t\t\theight = scheduler.config.min_map_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(scheduler._gridView) {\r\n\t\t\t\t\t\theight = 0;\r\n\r\n\t\t\t\t\t\tif (checked_div.childNodes[1].childNodes[0].childNodes && checked_div.childNodes[1].childNodes[0].childNodes.length) {\r\n\t\t\t\t\t\t\tvar evs = checked_div.childNodes[1].childNodes[0].childNodes[0].childNodes;\r\n\r\n\t\t\t\t\t\t\tfor (var j = 0; j < evs.length; j++) {\r\n\t\t\t\t\t\t\t\theight += evs[j].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\theight += 2;\r\n\r\n\t\t\t\t\t\t\tif(height < scheduler.config.min_grid_size){\r\n\t\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (scheduler.matrix && scheduler.matrix[mode]) {\r\n\t\t\t\t\t\tif (is_repaint) {\r\n\t\t\t\t\t\t\theight += 0;\r\n\t\t\t\t\t\t\tchecked_div.style.height = height + \"px\";\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\t\tvar cfg = scheduler.matrix[mode];\r\n\t\t\t\t\t\t\tvar rows = cfg.y_unit;\r\n\t\t\t\t\t\t\tfor(var r=0; r < rows.length; r++){\r\n\t\t\t\t\t\t\t\theight += cfg.getSectionHeight(rows[r].key);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// Check and add extra height to avoid events hiding by the horizontal scrollbar\r\n\t\t\t\t\t\t\tif(scheduler.$container.clientWidth != scheduler.$container.scrollWidth){\r\n\t\t\t\t\t\t\t\theight += getScrollSize();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\theight -= 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (mode == \"day\" || mode == \"week\" || (scheduler._props && scheduler._props[mode])) {\r\n\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\theight += 1;\r\n\t\t\ttotal_height += height;\r\n\t\t}\r\n\t\tscheduler._obj.style.height = (total_height) + \"px\";\r\n\r\n\t\tif (!is_repaint)\r\n\t\t\tscheduler.updateView();\r\n\t};\r\n\r\n\tfunction callUpdate(){\r\n\t\tactive = false;\r\n\t\tscheduler.callEvent(\"onAfterSchedulerResize\", []);\r\n\t\tactive = true;\r\n\t}\r\n\r\n\tvar conditionalUpdateContainerHeight = function() {\r\n\t\tif(!(scheduler.config.container_autoresize && active))\r\n\t\t\treturn true;\r\n\r\n\t\tvar mode = scheduler.getState().mode;\r\n\r\n\t\tif(!mode) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tvar asyncRepaint = window.requestAnimationFrame || window.setTimeout;\r\n\t\tvar scrollTop = document.documentElement.scrollTop;\r\n\r\n\t\tasyncRepaint(function() {\r\n\t\t\tif(scheduler.$destroyed || !scheduler.$initialized){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tupdateContainterHeight();\r\n\t\t});\r\n\r\n\t\tif ( (scheduler.matrix && scheduler.matrix[mode]) || mode == \"month\") {\r\n\t\t\tasyncRepaint(function() {\r\n\t\t\t\tif(scheduler.$destroyed || !scheduler.$initialized){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tupdateContainterHeight(true);\r\n\t\t\t\tdocument.documentElement.scrollTop = scrollTop;\r\n\t\t\t\tcallUpdate();\r\n\t\t\t}, 1);\r\n\t\t}else{\r\n\t\t\tcallUpdate();\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function(){\r\n\t\tvar autosizeEnabled = scheduler.config.container_autoresize;\r\n\t\tif(!scheduler.xy.$original_scroll_width){\r\n\t\t\tscheduler.xy.$original_scroll_width = scheduler.xy.scroll_width;\r\n\t\t}\r\n\r\n\t\tscheduler.xy.scroll_width = autosizeEnabled ? 0 : scheduler.xy.$original_scroll_width;\r\n\r\n\t\tif(scheduler.matrix){\r\n\t\t\tfor(var i in scheduler.matrix){\r\n\t\t\t\tvar timeline = scheduler.matrix[i];\r\n\t\t\t\tif(!timeline.$original_section_autoheight){\r\n\t\t\t\t\ttimeline.$original_section_autoheight = timeline.section_autoheight;\r\n\t\t\t\t}\r\n\t\t\t\tif(autosizeEnabled){\r\n\t\t\t\t\ttimeline.section_autoheight = false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\ttimeline.section_autoheight = timeline.$original_section_autoheight;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onXLE\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventChanged\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventCreated\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventAdded\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventDeleted\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onAfterSchedulerResize\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onClearAll\", conditionalUpdateContainerHeight);\r\n\r\n\t//disable container autoresize when expanded\r\n\tscheduler.attachEvent(\"onBeforeExpand\", function(){\r\n\t\tactive = false;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeCollapse\", function(){\r\n\t\tactive = true;\r\n\t\treturn true;\r\n\t});\r\n\t// helper function\r\n\tfunction getScrollSize() {\r\n\t\tvar div = document.createElement(\"div\");\r\n\t\tdiv.style.cssText = \"visibility:hidden;position:absolute;left:-1000px;width:100px;padding:0px;margin:0px;height:110px;min-height:100px;overflow-y:scroll;\";\r\n\r\n\t\tdocument.body.appendChild(div);\r\n\t\tvar size = div.offsetWidth - div.clientWidth;\r\n\t\tdocument.body.removeChild(div);\r\n\t\treturn size;\r\n\t}\r\n\r\n\r\n}","export default function(scheduler){\r\n\tfunction setCookie(name,cookie_param,value) {\r\n\t\tvar str = name + \"=\" + value + (cookie_param?(\"; \"+cookie_param):\"\");\r\n\t\tdocument.cookie = str;\r\n\t}\r\n\tfunction getCookie(name) {\r\n\t\tvar search = name + \"=\";\r\n\t\tif (document.cookie.length > 0) {\r\n\t\t\tvar offset = document.cookie.indexOf(search);\r\n\t\t\tif (offset != -1) {\r\n\t\t\t\toffset += search.length;\r\n\t\t\t\tvar end = document.cookie.indexOf(\";\", offset);\r\n\t\t\t\tif (end == -1)\r\n\t\t\t\t\tend = document.cookie.length;\r\n\t\t\t\treturn document.cookie.substring(offset, end);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}\r\n\r\n\tfunction getCookieName(scheduler) {\r\n\t\treturn (scheduler._obj.id || \"scheduler\") + \"_settings\";\r\n\t}\r\n\r\n\tvar first = true;\r\n\tscheduler.attachEvent(\"onBeforeViewChange\",function(oldMode,oldDate,mode,date){\r\n\t\t// if Url plugin is enabled - explicit url values should have more priority than cookies\r\n\t\tif (first && scheduler._get_url_nav){\r\n\t\t\tvar urlNavigationPlugin = scheduler._get_url_nav();\r\n\t\t\tif(urlNavigationPlugin.date || urlNavigationPlugin.mode || urlNavigationPlugin.event){\r\n\t\t\t\tfirst = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar cookie = getCookieName(scheduler);\r\n\r\n\t\tif (first){\r\n\t\t\tfirst = false;\r\n\t\t\tvar schedulerCookie = getCookie(cookie);\r\n\t\t\tif (schedulerCookie){\r\n\r\n\t\t\t\tif(!scheduler._min_date){\r\n\t\t\t\t\t//otherwise scheduler will have incorrect date until timeout\r\n\t\t\t\t\t//it can cause js error with 'onMouseMove' handler of key_nav.js\r\n\t\t\t\t\tscheduler._min_date = date;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tschedulerCookie = unescape(schedulerCookie).split(\"@\");\r\n\t\t\t\tschedulerCookie[0] = this._helpers.parseDate(schedulerCookie[0]);\r\n\t\t\t\tvar view = this.isViewExists(schedulerCookie[1]) ? schedulerCookie[1] : mode,\r\n\t\t\t\t\tdate = !isNaN(+schedulerCookie[0]) ? schedulerCookie[0] : date;\r\n\r\n\t\t\t\twindow.setTimeout(function(){\r\n\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tscheduler.setCurrentView(date,view);\r\n\t\t\t\t},1);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", function (newMode , newDate){\r\n\t\tvar cookie = getCookieName(scheduler);\r\n\t\tvar text = escape(this._helpers.formatDate(newDate)+\"@\"+(newMode));\r\n\t\tsetCookie(cookie,\"expires=Sun, 31 Jan 9999 22:00:00 GMT\",text);\r\n\t});\r\n\r\n\t// As we are blocking first render above there could be a problem in case of dynamic loading and rendering of visible data in general ('from'/'to' won't be defined)\r\n\tvar old_load = scheduler._load;\r\n\tscheduler._load = function() {\r\n\t\tvar args = arguments;\r\n\r\n\t\tif (!scheduler._date) {\r\n\t\t\tvar that = this;\r\n\t\t\twindow.setTimeout(function() {\r\n\t\t\t\told_load.apply(that, args);\r\n\t\t\t},1);\r\n\t\t} else {\r\n\t\t\told_load.apply(this, args);\r\n\t\t}\r\n\t};\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Day Timeline\", scheduler.assert);\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Drag Between\", scheduler.assert);\r\n}","export default function(scheduler){\r\n/* global dhtmlXCombo */\r\nscheduler.form_blocks['combo']={\r\n\trender:function(sns) {\r\n\t\tif (!sns.cached_options)\r\n\t\t\tsns.cached_options = {};\r\n\t\tvar res = '';\r\n\t\tres += \"
\";\r\n\t\treturn res;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\t(function(){\r\n\t\t\tresetCombo();\r\n\t\t\tvar id = scheduler.attachEvent(\"onAfterLightbox\",function(){\r\n\t\t\t\t// otherwise destructor will never be called after form reset(e.g. in readonly event mode)\r\n\t\t\t\tresetCombo();\r\n\t\t\t\tscheduler.detachEvent(id);\r\n\t\t\t});\r\n\t\t\tfunction resetCombo(){\r\n\t\t\t\tif(node._combo && node._combo.DOMParent) {\r\n\t\t\t\t\tvar combo = node._combo;\r\n\t\t\t\t\tif(combo.unload){\r\n\t\t\t\t\t\tcombo.unload();\r\n\t\t\t\t\t}else if(combo.destructor){\r\n\t\t\t\t\t\tcombo.destructor();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// dhtmlxCombo 4.1.0 bug\r\n\t\t\t\t\tcombo.DOMParent = combo.DOMelem = null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})();\r\n\t\twindow.dhx_globalImgPath = config.image_path||'/';\r\n\t\tnode._combo = new dhtmlXCombo(node, config.name, node.offsetWidth-8);\r\n\t\tif (config.onchange)\r\n\t\t\tnode._combo.attachEvent(\"onChange\", config.onchange);\r\n\r\n\t\tif (config.options_height)\r\n\t\t\tnode._combo.setOptionHeight(config.options_height);\r\n\t\tvar combo = node._combo;\r\n\t\tcombo.enableFilteringMode(config.filtering, config.script_path||null, !!config.cache);\r\n\r\n\t\tif (!config.script_path) { // script-side filtration is used\r\n\t\t\tvar all_options = [];\r\n\t\t\tfor (var i = 0; i < config.options.length; i++) {\r\n\t\t\t\tvar option = config.options[i];\r\n\t\t\t\tvar single_option = [\r\n\t\t\t\t\toption.key,\r\n\t\t\t\t\toption.label,\r\n\t\t\t\t\toption.css\r\n\t\t\t\t];\r\n\t\t\t\tall_options.push(single_option);\r\n\t\t\t}\r\n\t\t\tcombo.addOption(all_options);\r\n\t\t\tif (ev[config.map_to]) {\r\n\t\t\t\tvar index = combo.getIndexByValue(ev[config.map_to]);\r\n\t\t\t\tcombo.selectOption(index);\r\n\t\t\t}\r\n\t\t} else { // server-side filtration is used\r\n\t\t\tvar selected_id = ev[config.map_to];\r\n\t\t\tif (selected_id) {\r\n\t\t\t\tif (config.cached_options[selected_id]) {\r\n\t\t\t\t\tcombo.addOption(selected_id, config.cached_options[selected_id]);\r\n\t\t\t\t\tcombo.disable(1);\r\n\t\t\t\t\tcombo.selectOption(0);\r\n\t\t\t\t\tcombo.disable(0);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tscheduler.ajax.get(config.script_path+\"?id=\"+selected_id+\"&uid=\"+scheduler.uid(), function(result){\r\n\t\t\t\t\t\tvar responseText = result.xmlDoc.responseText;\r\n\t\t\t\t\t\tvar label;\r\n\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\tvar res = JSON.parse(responseText);\r\n\t\t\t\t\t\t\tlabel = res.options[0].text;\r\n\t\t\t\t\t\t}catch(e){\r\n\t\t\t\t\t\t\tvar option = scheduler.ajax.xpath(\"//option\", result.xmlDoc)[0];\r\n\t\t\t\t\t\t\tlabel = option.childNodes[0].nodeValue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tconfig.cached_options[selected_id] = label;\r\n\t\t\t\t\t\tcombo.addOption(selected_id, label);\r\n\t\t\t\t\t\tcombo.disable(1);\r\n\t\t\t\t\t\tcombo.selectOption(0);\r\n\t\t\t\t\t\tcombo.disable(0);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tcombo.setComboValue(\"\");\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config) {\r\n\t\tvar selected_id = node._combo.getSelectedValue(); // value = key\r\n\t\tif (config.script_path) {\r\n\t\t\tconfig.cached_options[selected_id] = node._combo.getSelectedText();\r\n\t\t}\r\n\t\treturn selected_id;\r\n\t},\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\nscheduler.form_blocks['radio']={\r\n\trender:function(sns) {\r\n\t\tvar res = '';\r\n\t\tres += `
`;\r\n\t\tfor (var i=0; i\"+\" \"+sns.options[i].label+\"\";\r\n\t\t}\r\n\t\tres += \"
\";\r\n\r\n\t\treturn res;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\tvar radiobuttons = node.getElementsByTagName('input');\r\n\t\tfor (var i = 0; i < radiobuttons.length; i++) {\r\n\t\t\tradiobuttons[i].checked = false;\r\n\t\t\tvar checked_value = ev[config.map_to]||value;\r\n\t\t\tif (radiobuttons[i].value == checked_value) {\r\n\t\t\t\tradiobuttons[i].checked = true;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tvar radiobuttons = node.getElementsByTagName('input');\r\n\t\tfor(var i=0; i
';\r\n\t\telse\r\n\t\t\treturn '';\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\tnode=scheduler._lightbox.querySelector(`#${config.id}`);\r\n\t\tvar id = scheduler.uid();\r\n\t\tvar isChecked = (typeof config.checked_value != \"undefined\") ? value == config.checked_value : !!value;\r\n\t\tnode.className += \" dhx_cal_checkbox\";\r\n\t\tvar check_html = \"\";\r\n\t\tvar label_html = \"\";\r\n\t\tif (scheduler.config.wide_form){\r\n\t\t\tnode.innerHTML = label_html;\r\n\t\t\tnode.nextSibling.innerHTML=check_html;\r\n\t\t} else\r\n\t\t\tnode.innerHTML=check_html+label_html;\r\n\r\n\t\tif (config.handler) {\r\n\t\t\tvar checkbox = node.getElementsByTagName('input')[0];\r\n\t\t\tif(checkbox.$_eventAttached){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tcheckbox.$_eventAttached = true;\r\n\t\t\tscheduler.event(checkbox, \"click\", config.handler);\r\n\t\t\t//checkbox.onclick = config.handler;\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tnode=scheduler._lightbox.querySelector(`#${config.id}`);\r\n\t\tvar checkbox = node.getElementsByTagName('input')[0]; // moved to the header\r\n\t\tif (!checkbox)\r\n\t\t\tcheckbox = node.nextSibling.getElementsByTagName('input')[0];\r\n\t\treturn (checkbox.checked)?(config.checked_value||true):(config.unchecked_value||false);\r\n\t},\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.ext.fullscreen = {\r\n\ttoggleIcon: null\r\n};\r\n\r\nscheduler.expand = function() {\r\n\tif(!scheduler.callEvent(\"onBeforeExpand\", []))\r\n\t\treturn;\r\n\tvar t = scheduler._obj;\r\n\tdo {\r\n\t\tt._position = t.style.position || \"\";\r\n\t\tt.style.position = \"static\";\r\n\t} while ((t = t.parentNode) && t.style);\r\n\tt = scheduler._obj;\r\n\tt.style.position = \"absolute\";\r\n\tt._width = t.style.width;\r\n\tt._height = t.style.height;\r\n\tt.style.width = t.style.height = \"100%\";\r\n\tt.style.top = t.style.left = \"0px\";\r\n\r\n\tvar top = document.body;\r\n\ttop.scrollTop = 0;\r\n\r\n\ttop = top.parentNode;\r\n\tif (top)\r\n\t\ttop.scrollTop = 0;\r\n\tdocument.body._overflow = document.body.style.overflow || \"\";\r\n\tdocument.body.style.overflow = \"hidden\";\r\n\tscheduler._maximize();\r\n\tscheduler.callEvent(\"onExpand\", []);\r\n};\r\nscheduler.collapse = function() {\r\n\tif(!scheduler.callEvent(\"onBeforeCollapse\", []))\r\n\t\treturn;\r\n\tvar t = scheduler._obj;\r\n\tdo {\r\n\t\tt.style.position = t._position;\r\n\t} while ((t = t.parentNode) && t.style);\r\n\tt = scheduler._obj;\r\n\tt.style.width = t._width;\r\n\tt.style.height = t._height;\r\n\tdocument.body.style.overflow = document.body._overflow;\r\n\tscheduler._maximize();\r\n\tscheduler.callEvent(\"onCollapse\", []);\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar t = document.createElement(\"div\");\r\n\tt.className = \"dhx_expand_icon\";\r\n\tscheduler.ext.fullscreen.toggleIcon = t;\r\n\tt.innerHTML = `\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t`;\r\n\tscheduler._obj.appendChild(t);\r\n\tscheduler.event(t, \"click\", function() {\r\n\t\tif (!scheduler.expanded)\r\n\t\t\tscheduler.expand(); else\r\n\t\t\tscheduler.collapse();\r\n\t});\r\n});\r\nscheduler._maximize = function() {\r\n\tthis.expanded = !this.expanded;\r\n\tif(this.expanded){\r\n\t\tthis.ext.fullscreen.toggleIcon.classList.add(\"dhx_expand_icon--expanded\");\r\n\t\t\r\n\t}else{\r\n\t\tthis.ext.fullscreen.toggleIcon.classList.remove(\"dhx_expand_icon--expanded\");\r\n\t}\r\n\t\r\n\t//scheduler.ext.fullscreen.toggleIcon.style.backgroundPosition = \"0 \" + (this.expanded ? \"0\" : \"18\") + \"px\";\r\n\r\n\tvar directions = ['left', 'top'];\r\n\tfor (var i = 0; i < directions.length; i++) {\r\n\t\t//var margin = scheduler.xy['margin_' + directions[i]];\r\n\t\tvar prev_margin = scheduler['_prev_margin_' + directions[i]];\r\n\t\tif (scheduler.xy['margin_' + directions[i]]) {\r\n\t\t\tscheduler['_prev_margin_' + directions[i]] = scheduler.xy['margin_' + directions[i]];\r\n\t\t\tscheduler.xy['margin_' + directions[i]] = 0;\r\n\t\t} else {\r\n\t\t\tif (prev_margin) {\r\n\t\t\t\tscheduler.xy['margin_' + directions[i]] = scheduler['_prev_margin_' + directions[i]];\r\n\t\t\t\tdelete scheduler['_prev_margin_' + directions[i]];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.setCurrentView();\r\n};\r\n\r\n\r\n}\r\n","export default function(scheduler){\r\n\r\n\r\n(function(){\r\n\r\nfunction defaults(obj, std){\r\n\tfor (var key in std)\r\n\t\tif (!obj[key])\r\n\t\t\tobj[key] = std[key];\r\n\treturn obj;\r\n}\r\n\r\nfunction getElementSizes(element, scheduler) {\r\n\tvar sizes = {};\r\n\telement = scheduler._els[element];\r\n\tif (element && element[0]) {\r\n\t\tsizes.x = element[0].scrollWidth;\r\n\t\tsizes.y = element[0].scrollHeight;\r\n\t} else {\r\n\t\tsizes.x = 0;\r\n\t\tsizes.y = 0;\r\n\t}\r\n\treturn sizes;\r\n}\r\n\r\n//compatibility for new versions of scheduler\r\nif(!window.dhtmlxAjax){\r\n\twindow.dhtmlxAjax = {\r\n\t\tpost: function(url, data, callback){\r\n\t\t\treturn window.dhx4.ajax.post(url, data, callback);\r\n\t\t},\r\n\t\tget: function(url, callback){\r\n\t\t\treturn window.ajax.get(url, callback);\r\n\t\t}\r\n\t};\r\n}\r\n\r\nfunction add_export_methods(scheduler){\r\n\r\n\tscheduler.exportToPDF = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.pdf\",\r\n\t\t\tformat:\"A4\",\r\n\t\t\torientation:\"landscape\",\r\n\t\t\tdpi:96,\r\n\t\t\tzoom:1,\r\n\t\t\trtl: scheduler.config.rtl\r\n\t\t});\r\n\t\tconfig.html = this._export_html(config);\r\n\t\tconfig.mode = this.getState().mode;\r\n\t\tthis._send_to_export(config, \"pdf\");\r\n\t};\r\n\r\n\tscheduler.exportToPNG = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.png\",\r\n\t\t\tformat:\"A4\",\r\n\t\t\torientation:\"landscape\",\r\n\t\t\tdpi:96,\r\n\t\t\tzoom:1,\r\n\t\t\trtl: scheduler.config.rtl\r\n\t\t});\r\n\t\tconfig.html = this._export_html(config);\r\n\t\tconfig.mode = this.getState().mode;\r\n\t\tthis._send_to_export(config, \"png\");\r\n\t};\r\n\r\n\tscheduler.exportToICal = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.ical\",\r\n\t\t\tdata:this._serialize_plain(null, config)\r\n\t\t});\r\n\t\tthis._send_to_export(config, \"ical\");\r\n\t};\r\n\r\n\tscheduler.exportToExcel = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.xlsx\",\r\n\t\t\ttitle:\"Events\",\r\n\t\t\tdata:this._serialize_plain( this.templates.xml_format, config),\r\n\t\t\tcolumns:this._serialize_columns()\r\n\t\t});\r\n\t\tthis._send_to_export(config, \"excel\");\r\n\t};\r\n\r\n\tscheduler._ajax_to_export = function(data, type, callback){\r\n\t\tdelete data.callback;\r\n\t\tvar url = data.server || \"https://export.dhtmlx.com/scheduler\";\r\n\r\n\t\twindow.dhtmlxAjax.post(url,\r\n\t\t\t\"type=\"+type+\"&store=1&data=\"+encodeURIComponent(JSON.stringify(data)),\r\n\t\t\tfunction(loader){\r\n\t\t\t\tvar fail = loader.xmlDoc.status > 400;\r\n\t\t\t\tvar info = null;\r\n\r\n\t\t\t\tif (!fail){\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\tinfo = JSON.parse(loader.xmlDoc.responseText);\r\n\t\t\t\t\t}catch(e){}\r\n\t\t\t\t}\r\n\t\t\t\tcallback(info);\r\n\t\t\t}\r\n\t\t);\r\n\t};\r\n\r\n\tscheduler._plain_export_copy = function(source, format){\r\n\t\tvar target = {};\r\n\t\tfor (var key in source)\r\n\t\t\ttarget[key] = source[key];\r\n\r\n\t\ttarget.start_date = format(target.start_date);\r\n\t\ttarget.end_date = format(target.end_date);\r\n\t\ttarget.$text = this.templates.event_text(source.start_date, source.end_date, source);\r\n\r\n\t\treturn target;\r\n\t};\r\n\r\n\tscheduler._serialize_plain = function(format, config){\r\n\t\tformat = format || scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\", true);\r\n\r\n\t\tvar events;\r\n\t\tif (config && config.start && config.end)\r\n\t\t\tevents = scheduler.getEvents(config.start, config.end);\r\n\t\telse\r\n\t\t\tevents = scheduler.getEvents();\r\n\r\n\t\tvar data = [];\r\n\t\tfor (var i = 0; i< events.length; i++)\r\n\t\t\tdata[i] = this._plain_export_copy(events[i], format);\r\n\r\n\t\treturn data;\r\n\t};\r\n\r\n\tscheduler._serialize_columns = function(){\r\n\t\treturn [\r\n\t\t\t{ id:\"start_date\", header:\"Start Date\", width:30 },\r\n\t\t\t{ id:\"end_date\", header:\"End Date\", width:30 },\r\n\t\t\t{ id:\"$text\", header:\"Text\", width:100 }\r\n\t\t];\r\n\t};\r\n\r\n\tscheduler._send_to_export = function(data, type){\r\n\t\tif(!data.version){\r\n\t\t\tdata.version = scheduler.version;\r\n\t\t}\r\n\r\n\t\tif(!data.skin){\r\n\t\t\tdata.skin = scheduler.skin;\r\n\t\t}\r\n\r\n\t\tif (data.callback)\r\n\t\t\t\treturn scheduler._ajax_to_export(data, type, data.callback);\r\n\r\n\t\tvar form = this._create_hidden_form();\r\n\r\n\t\tform.firstChild.action = data.server || \"https://export.dhtmlx.com/scheduler\";\r\n\t\tform.firstChild.childNodes[0].value = JSON.stringify(data);\r\n\t\tform.firstChild.childNodes[1].value = type;\r\n\t\tform.firstChild.submit();\r\n\t};\r\n\r\n\tscheduler._create_hidden_form = function(){\r\n\t\tif (!this._hidden_export_form){\r\n\t\t\tvar t = this._hidden_export_form = document.createElement(\"div\");\r\n\t\t\tt.style.display = \"none\";\r\n\t\t\tt.innerHTML = \"
\";\r\n\t\t\tdocument.body.appendChild(t);\r\n\t\t}\r\n\t\treturn this._hidden_export_form;\r\n\t};\r\n\r\n\tscheduler._get_export_size = function(format, orientation, zoom, dpi, header, footer, scales) {\r\n\r\n\t\tdpi = parseInt(dpi)/25.4 || 4;\r\n\r\n\t\tvar sizes = {\r\n\t\t\t\"A5\":{ x:148, y:210 },\r\n\t\t\t\"A4\":{ x:210, y:297 },\r\n\t\t\t\"A3\":{ x:297, y:420 },\r\n\t\t\t\"A2\":{ x:420, y:594 },\r\n\t\t\t\"A1\":{ x:594, y:841 },\r\n\t\t\t\"A0\":{ x:841, y:1189 }\r\n\t\t};\r\n\r\n\t\tvar dataX = getElementSizes(\"dhx_cal_data\", this).x;\r\n\t\tvar dataY = getElementSizes(\"dhx_cal_data\", this).y;\r\n\t\tvar headY = getElementSizes(\"dhx_cal_header\", this).y;\r\n\t\tvar multY = getElementSizes(\"dhx_multi_day\", this).y;\r\n\r\n\t\tvar cSize = {\r\n\t\t\ty: dataY + headY + multY\r\n\t\t};\r\n\r\n\t\tif (format === \"full\") {\r\n\t\t\tcSize.x = dataX;\r\n\t\t} else {\r\n\t\t\tcSize.x = Math.floor( (orientation === \"landscape\" ? sizes[format].y : sizes[format].x) * dpi );\r\n\t\t}\r\n\r\n\t\tif (scales) {\r\n\t\t\tcSize.x *= (parseFloat(scales.x) || 1);\r\n\t\t\tcSize.y *= (parseFloat(scales.y) || 1);\r\n\t\t}\r\n\r\n\t\treturn cSize;\r\n\t};\r\n\r\n\tfunction getTimeline() {\r\n\t\tvar mode = scheduler.getState().mode;\r\n\t\tif (scheduler.matrix && scheduler.matrix[mode]) {\r\n\t\t\treturn scheduler.matrix[mode];\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\r\n\tfunction getInitialSizes() {\r\n\t\tvar smartRendering = undefined,\r\n\t\t\tscrollable = undefined;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (timeline) {\r\n\t\t\tscrollable = timeline.scrollable;\r\n\t\t\tsmartRendering = timeline.smart_rendering;\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tnav_height: scheduler.xy.nav_height,\r\n\t\t\tscroll_width: scheduler.xy.scroll_width,\r\n\t\t\tstyle_width: scheduler._obj.style.width,\r\n\t\t\tstyle_height: scheduler._obj.style.height,\r\n\t\t\ttimeline_scrollable: scrollable,\r\n\t\t\ttimeline_smart_rendering: smartRendering\r\n\t\t};\r\n\t}\r\n\r\n\tfunction setExportSizes(size, initialSizes) {\r\n\t\tscheduler._obj.style.width = size.x + \"px\";\r\n\t\tscheduler._obj.style.height = size.y + \"px\";\r\n\r\n\t\tscheduler.xy.nav_height = 0;\r\n\t\tscheduler.xy.scroll_width = 0;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (initialSizes.timeline_scrollable || initialSizes.timeline_smart_rendering) {\r\n\r\n\t\t\ttimeline.scrollable = false;\r\n\t\t\ttimeline.smart_rendering = false;\r\n\t\t}\r\n\t}\r\n\r\n\tfunction setInitialSizes(initialSizes) {\r\n\t\tscheduler.xy.scroll_width = initialSizes.scroll_width;\r\n\t\tscheduler.xy.nav_height = initialSizes.nav_height;\r\n\t\tscheduler._obj.style.width = initialSizes.style_width;\r\n\t\tscheduler._obj.style.height = initialSizes.style_height;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (initialSizes.timeline_scrollable || initialSizes.timeline_smart_rendering) {\r\n\t\t\ttimeline.scrollable = initialSizes.timeline_scrollable;\r\n\t\t\ttimeline.smart_rendering = initialSizes.timeline_smart_rendering;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler._export_html = function (obj) {\r\n\t\tvar initialSizes = getInitialSizes();\r\n\t\tvar size = scheduler._get_export_size(obj.format, obj.orientation, obj.zoom, obj.dpi, obj.header, obj.footer, obj.scales);\r\n\r\n\t\tvar html = \"\";\r\n\t\ttry {\r\n\t\t\tsetExportSizes(size, initialSizes);\r\n\t\t\tscheduler.setCurrentView();\r\n\t\t\thtml = scheduler._obj.innerHTML;\r\n\t\t} catch (e) {\r\n\r\n\t\t\t// eslint-disable-next-line no-console\r\n\t\t\tconsole.error(e);\r\n\t\t} finally {\r\n\t\t\tsetInitialSizes(initialSizes);\r\n\t\t\tscheduler.setCurrentView();\r\n\t\t}\r\n\r\n\t\treturn html;\r\n\t};\r\n\r\n}\r\n\r\nadd_export_methods(scheduler);\r\n\r\n\r\n})();\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Grid\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\tvar els = document.body.getElementsByTagName(\"DIV\");\r\n\tfor (var i=0; i < els.length; i++) {\r\n\t\tvar cs = els[i].className||\"\";\r\n\t\tcs = cs.split(\":\");\r\n\t\tif (cs.length == 2 && cs[0] == \"template\"){\r\n\t\t\tvar code = \"return \\\"\"+(els[i].innerHTML||\"\").replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g,\"\\\\\\\"\").replace(/[\\n\\r]+/g,\"\")+\"\\\";\";\r\n\t\t\tcode = unescape(code).replace(/\\{event\\.([a-z]+)\\}/g,function(all,mask){\r\n\t\t\t\treturn '\"+ev.'+mask+'+\"';\r\n\t\t\t});\r\n\t\t\tscheduler.templates[cs[1]]=Function(\"start\",\"end\",\"ev\",code);\r\n\t\t\tels[i].style.display='none';\r\n\t\t}\r\n\t}\r\n});\r\n\r\n}","import keyboard_shortcuts from \"./keyboard_navigation/common/keyboard_shortcuts\";\r\nimport eventhandler from \"./keyboard_navigation/common/eventhandler\";\r\nimport trap_modal_focus from \"./keyboard_navigation/common/trap_modal_focus\";\r\nimport marker from \"./keyboard_navigation/marker\";\r\nimport scheduler_node from \"./keyboard_navigation/elements/scheduler_node\";\r\nimport nav_node from \"./keyboard_navigation/elements/nav_node\";\r\nimport header_cell from \"./keyboard_navigation/elements/header_cell\";\r\nimport event from \"./keyboard_navigation/elements/event\";\r\nimport time_slot from \"./keyboard_navigation/elements/time_slot\";\r\nimport minical_button from \"./keyboard_navigation/elements/minical_button\";\r\nimport minical_cell from \"./keyboard_navigation/elements/minical_cell\";\r\nimport data_area from \"./keyboard_navigation/elements/data_area\";\r\nimport modals from \"./keyboard_navigation/modals\";\r\nimport core from \"./keyboard_navigation/core\";\r\nimport key_nav_legacy from \"./keyboard_navigation/key_nav_legacy\";\r\n\r\n\r\nimport scheduler_handlers from \"./keyboard_navigation/scheduler_handlers\";\r\nimport minical_handlers from \"./keyboard_navigation/minical_handlers\";\r\n\r\nexport default function(scheduler){\r\n\t\tscheduler.config.key_nav = true;\r\n\t\tscheduler.config.key_nav_step = 30;\r\n\t\tscheduler.addShortcut = function(shortcut, handler, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tscopeObject.prototype.bind(shortcut, handler);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.getShortcutHandler = function(shortcut, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tvar commands = scheduler.$keyboardNavigation.shortcuts.parse(shortcut);\r\n\t\t\t\tif(commands.length){\r\n\t\t\t\t\treturn scopeObject.prototype.findHandler(commands[0]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.removeShortcut = function(shortcut, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tscopeObject.prototype.unbind(shortcut);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.focus = function(){\r\n\t\t\tif(!scheduler.config.key_nav){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar disp = scheduler.$keyboardNavigation.dispatcher;\r\n\t\t\tdisp.enable();\r\n\t\t\tvar activeNode = disp.getActiveNode();\r\n\t\t\tif(!activeNode || activeNode instanceof scheduler.$keyboardNavigation.MinicalButton || activeNode instanceof scheduler.$keyboardNavigation.MinicalCell){\r\n\t\t\t\tdisp.setDefaultNode();\r\n\t\t\t}else{\r\n\t\t\t\tdisp.focusNode(disp.getActiveNode());\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfunction getScope(mode){\r\n\t\t\tvar scopes = {\r\n\t\t\t\t\"minicalButton\":scheduler.$keyboardNavigation.MinicalButton,\r\n\t\t\t\t\"minicalDate\":scheduler.$keyboardNavigation.MinicalCell,\r\n\t\t\t\t\"scheduler\":scheduler.$keyboardNavigation.SchedulerNode,\r\n\t\t\t\t\"dataArea\": scheduler.$keyboardNavigation.DataArea,\r\n\t\t\t\t\"timeSlot\": scheduler.$keyboardNavigation.TimeSlot,\r\n\t\t\t\t\"event\": scheduler.$keyboardNavigation.Event\r\n\t\t\t};\r\n\r\n\t\t\tvar searchMap = {};\r\n\t\t\tfor(var i in scopes)\r\n\t\t\t\tsearchMap[i.toLowerCase()] = scopes[i];\r\n\r\n\t\t\tmode = (mode + \"\").toLowerCase();\r\n\r\n\t\t\treturn searchMap[mode] || scopes.scheduler;\r\n\t\t}\r\n\r\n\t\tscheduler.$keyboardNavigation = {};\r\n\r\n\t\tscheduler._compose = function(){\r\n\t\t\tvar parts = Array.prototype.slice.call(arguments, 0);\r\n\t\t\tvar res = {};\r\n\t\t\tfor(var i = 0; i < parts.length; i++){\r\n\t\t\t\tvar obj = parts[i];\r\n\t\t\t\tif(typeof obj == \"function\"){\r\n\t\t\t\t\tobj = new obj();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor(var p in obj){\r\n\t\t\t\t\tres[p] = obj[p];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\t\t};\r\n\r\n\t\tkeyboard_shortcuts(scheduler);\r\n\t\teventhandler(scheduler);\r\n\t\ttrap_modal_focus(scheduler);\r\n\t\tmarker(scheduler);\r\n\t\tscheduler_node(scheduler);\r\n\t\tnav_node(scheduler);\r\n\t\theader_cell(scheduler);\r\n\t\tevent(scheduler);\r\n\t\ttime_slot(scheduler);\r\n\t\tminical_button(scheduler);\r\n\t\tminical_cell(scheduler);\r\n\t\tdata_area(scheduler);\r\n\t\tmodals(scheduler);\r\n\t\tcore(scheduler);\r\n\t\tkey_nav_legacy(scheduler);\r\n\r\n\t\t(function(){\r\n\t\t\tscheduler_handlers(scheduler);\r\n\t\t\tminical_handlers(scheduler);\r\n\r\n\t\t\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\t\t\tscheduler.$keyboardNavigation.attachSchedulerHandlers();\r\n\r\n\t\t\tif(scheduler.renderCalendar){\r\n\t\t\t\t// if minical ext loaded before key nav ext - patch it now\r\n\t\t\t\tscheduler.$keyboardNavigation.patchMinicalendar();\r\n\t\t\t}else{\r\n\t\t\t\t// otherwise - wait until everything is loaded and try again\r\n\t\t\t\tvar attachOnce = scheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\t\t\t\tscheduler.detachEvent(attachOnce);\r\n\t\t\t\t\tscheduler.$keyboardNavigation.patchMinicalendar();\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\tfunction isSchedulerSelected(){\r\n\t\t\t\tif(!scheduler.config.key_nav) return;\r\n\r\n\t\t\t\tvar enable;\r\n\t\t\t\tvar focusElement = document.activeElement;\r\n\t\t\t\t// halt key nav when focus is outside scheduler or in quick info popup\r\n\t\t\t\tif(!focusElement || scheduler.utils.dom.locateCss(focusElement, \"dhx_cal_quick_info\", false)){\r\n\t\t\t\t\tenable = false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tenable = scheduler.$keyboardNavigation.isChildOf(focusElement, scheduler.$container) || scheduler.$keyboardNavigation.isMinical(focusElement);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn enable;\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\tfunction changeState(enable){\r\n\t\t\t\tif(enable && !dispatcher.isEnabled()){\r\n\t\t\t\t\tdispatcher.enable();\r\n\t\t\t\t}else if(!enable && dispatcher.isEnabled()){\r\n\t\t\t\t\tdispatcher.disable();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tconst intervalId = setInterval(function(){\r\n\t\t\t\tif(!scheduler.$container || !scheduler.$keyboardNavigation.isChildOf(scheduler.$container, document.body)){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar enable = isSchedulerSelected();\r\n\r\n\t\t\t\tif(enable){\r\n\t\t\t\t\tchangeState(enable);\r\n\t\t\t\t}else if(!enable && dispatcher.isEnabled()){\r\n\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// doublecheck in case checking is done in handler before focus element is repainted\r\n\t\t\t\t\t\tif(scheduler.config.key_nav){\r\n\t\t\t\t\t\t\tchangeState(isSchedulerSelected());\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tscheduler.$container.removeAttribute(\"tabindex\");\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}, 100);\r\n\t\t\t\t}\r\n\t\t\t}, 500);\r\n\t\t\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\t\t\tclearInterval(intervalId);\r\n\t\t\t});\r\n\t\t})();\r\n\t}\r\n\r\n\r\n","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.shortcuts = {\r\n\tcreateCommand: function(){\r\n\t\treturn {\r\n\t\t\tmodifiers:{\r\n\t\t\t\t\"shift\": false,\r\n\t\t\t\t\"alt\": false,\r\n\t\t\t\t\"ctrl\": false,\r\n\t\t\t\t\"meta\": false\r\n\t\t\t},\r\n\t\t\tkeyCode: null\r\n\t\t};\r\n\t},\r\n\tparse: function(shortcut){\r\n\t\tvar commands = [];\r\n\r\n\t\tvar expr = this.getExpressions(this.trim(shortcut));\r\n\t\tfor(var i = 0; i < expr.length; i++){\r\n\t\t\tvar words = this.getWords(expr[i]);\r\n\r\n\t\t\tvar command = this.createCommand();\r\n\r\n\t\t\tfor(var j = 0; j < words.length; j++){\r\n\t\t\t\tif(this.commandKeys[words[j]]){\r\n\t\t\t\t\tcommand.modifiers[words[j]] = true;\r\n\t\t\t\t}else if(this.specialKeys[words[j]]){\r\n\t\t\t\t\tcommand.keyCode = this.specialKeys[words[j]];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcommand.keyCode = words[j].charCodeAt(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tcommands.push(command);\r\n\t\t}\r\n\t\treturn commands;\r\n\t},\r\n\r\n\tgetCommandFromEvent: function(domEvent){\r\n\t\tvar command = this.createCommand();\r\n\t\tcommand.modifiers.shift = !!domEvent.shiftKey;\r\n\t\tcommand.modifiers.alt = !!domEvent.altKey;\r\n\t\tcommand.modifiers.ctrl = !!domEvent.ctrlKey;\r\n\t\tcommand.modifiers.meta = !!domEvent.metaKey;\r\n\t\tcommand.keyCode = domEvent.which || domEvent.keyCode;\r\n\r\n\t\tif(command.keyCode >= 96 && command.keyCode <= 105){\r\n\t\t\t// numpad keys 96-105 -> 48-57\r\n\t\t\tcommand.keyCode -= 48;//convert numpad number code to regular number code\r\n\t\t}\r\n\r\n\t\tvar printableKey = String.fromCharCode(command.keyCode );\r\n\t\tif(printableKey){\r\n\t\t\tcommand.keyCode = printableKey.toLowerCase().charCodeAt(0);\r\n\t\t}\r\n\t\treturn command;\r\n\t},\r\n\r\n\tgetHashFromEvent: function(domEvent){\r\n\t\treturn this.getHash(this.getCommandFromEvent(domEvent));\r\n\t},\r\n\r\n\tgetHash: function(command){\r\n\t\tvar parts = [];\r\n\t\tfor(var i in command.modifiers){\r\n\t\t\tif(command.modifiers[i]){\r\n\t\t\t\tparts.push(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tparts.push(command.keyCode);\r\n\r\n\t\treturn parts.join(this.junctionChar);\r\n\t},\r\n\r\n\tgetExpressions: function(shortcut){\r\n\t\treturn shortcut.split(this.junctionChar);\r\n\t},\r\n\tgetWords: function(term){\r\n\t\treturn term.split(this.combinationChar);\r\n\t},\r\n\ttrim: function(shortcut){\r\n\t\treturn shortcut.replace(/\\s/g, \"\");\r\n\t},\r\n\tjunctionChar:\",\",\r\n\tcombinationChar:\"+\",\r\n\tcommandKeys:{\r\n\t\t\"shift\": 16,\r\n\t\t\"alt\": 18,\r\n\t\t\"ctrl\": 17,\r\n\t\t\"meta\": true\r\n\t},\r\n\tspecialKeys:{\r\n\t\t\"backspace\": 8,\r\n\t\t\"tab\": 9,\r\n\t\t\"enter\": 13,\r\n\t\t\"esc\": 27,\r\n\t\t\"space\": 32,\r\n\t\t\"up\": 38,\r\n\t\t\"down\": 40,\r\n\t\t\"left\": 37,\r\n\t\t\"right\": 39,\r\n\t\t\"home\": 36,\r\n\t\t\"end\": 35,\r\n\t\t\"pageup\": 33,\r\n\t\t\"pagedown\": 34,\r\n\t\t\"delete\": 46,\r\n\t\t\"insert\": 45,\r\n\t\t\"plus\":107,\r\n\t\t\"f1\": 112,\r\n\t\t\"f2\": 113,\r\n\t\t\"f3\": 114,\r\n\t\t\"f4\": 115,\r\n\t\t\"f5\": 116,\r\n\t\t\"f6\": 117,\r\n\t\t\"f7\": 118,\r\n\t\t\"f8\": 119,\r\n\t\t\"f9\": 120,\r\n\t\t\"f10\": 121,\r\n\t\t\"f11\": 122,\r\n\t\t\"f12\": 123\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.EventHandler = {\r\n\t_handlers: null,\r\n\tfindHandler: function(command){\r\n\t\tif(!this._handlers) this._handlers = {};\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\t\tvar hash = shortcuts.getHash(command);\r\n\r\n\t\treturn this._handlers[hash];\r\n\t},\r\n\r\n\tdoAction: function(command, e){\r\n\t\tvar handler = this.findHandler(command);\r\n\t\tif(handler){\r\n\t\t\thandler.call(this, e);\r\n\r\n\t\t\tif (e.preventDefault) e.preventDefault();\r\n\t\t\telse e.returnValue = false;\r\n\r\n\t\t}\r\n\t},\r\n\tbind: function(shortcut, handler){\r\n\t\tif(!this._handlers) this._handlers = {};\r\n\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\r\n\t\tvar commands = shortcuts.parse(shortcut);\r\n\t\tfor(var i = 0; i < commands.length; i++){\r\n\t\t\tthis._handlers[shortcuts.getHash(commands[i])] = handler;\r\n\t\t}\r\n\t},\r\n\tunbind: function(shortcut){\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\r\n\t\tvar commands = shortcuts.parse(shortcut);\r\n\t\tfor(var i = 0; i < commands.length; i++){\r\n\t\t\tif(this._handlers[shortcuts.getHash(commands[i])]){\r\n\t\t\t\tdelete this._handlers[shortcuts.getHash(commands[i])];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tbindAll: function(map){\r\n\t\tfor(var i in map){\r\n\t\t\tthis.bind(i, map[i]);\r\n\t\t}\r\n\t},\r\n\tinitKeys: function(){\r\n\t\tif(!this._handlers)\r\n\t\t\tthis._handlers = {};\r\n\t\tif(this.keys){\r\n\t\t\tthis.bindAll(this.keys);\r\n\t\t}\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n(function(){\r\n\tscheduler.$keyboardNavigation.getFocusableNodes = scheduler._getFocusableNodes;\r\n\r\n\tscheduler.$keyboardNavigation.trapFocus = function trapFocus(root, e){\r\n\t\tif(e.keyCode != 9) return false;\r\n\r\n\t\tvar focusable = scheduler.$keyboardNavigation.getFocusableNodes(root);\r\n\t\tvar currentFocus = document.activeElement;\r\n\t\tvar currentIndex = -1;\r\n\t\tfor(var i = 0; i < focusable.length; i++){\r\n\t\t\tif(focusable[i] == currentFocus){\r\n\t\t\t\tcurrentIndex = i;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar nextIndex, nextItem;\r\n\t\tif(e.shiftKey){\r\n\r\n\t\t\t// back tab\r\n\t\t\t// go to the last element if we focused on the first\r\n\t\t\tnextIndex = (currentIndex <= 0) ? (focusable.length - 1) : (currentIndex - 1);\r\n\r\n\t\t\tnextItem = focusable[nextIndex];\r\n\t\t\tif(nextItem){\r\n\t\t\t\tnextItem.focus();\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\t// forward tab\r\n\t\t\t// forward tab from last element should go back to the first element\r\n\t\t\tnextIndex = (currentIndex >= focusable.length - 1) ? 0 : (currentIndex + 1);\r\n\t\t\tnextItem = focusable[nextIndex];\r\n\t\t\tif(nextItem){\r\n\t\t\t\tnextItem.focus();\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t};\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.marker = {\r\n\tclear: function(){\r\n\t\tvar divs = scheduler.$container.querySelectorAll(\".dhx_focus_slot\");\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tdivs[i].parentNode.removeChild(divs[i]);\r\n\t\t}\r\n\t},\r\n\tcreateElement: function(){\r\n\t\tvar element = document.createElement(\"div\");\r\n\t\telement.setAttribute(\"tabindex\", -1);\r\n\t\telement.className = \"dhx_focus_slot\";\r\n\t\treturn element;\r\n\t},\r\n\r\n\trenderMultiple: function(start, end, method){\r\n\t\tvar divs = [];\r\n\t\tvar currentStart = new Date(start);\r\n\t\tvar currentEnd = new Date(Math.min(end.valueOf(), scheduler.date.add(scheduler.date.day_start(new Date(start)), 1, \"day\").valueOf()));\r\n\t\twhile(currentStart.valueOf() < end.valueOf()){\r\n\r\n\t\t\tdivs = divs.concat(method.call(this, currentStart, new Date(Math.min(currentEnd.valueOf(), end.valueOf()))));\r\n\t\t\tcurrentStart = scheduler.date.day_start(scheduler.date.add(currentStart, 1, \"day\"));\r\n\r\n\t\t\tcurrentEnd = scheduler.date.day_start(scheduler.date.add(currentStart, 1, \"day\"));\r\n\t\t\tcurrentEnd = new Date(Math.min(currentEnd.valueOf(), end.valueOf()));\r\n\t\t}\r\n\r\n\t\treturn divs;\r\n\t},\r\n\r\n\r\n\trender: function(start, end, section){\r\n\t\tthis.clear();\r\n\t\tvar divs = [];\r\n\r\n\t\tvar modes = scheduler.$keyboardNavigation.TimeSlot.prototype._modes;\r\n\t\tvar view = scheduler.$keyboardNavigation.TimeSlot.prototype._getMode();\r\n\t\tswitch (view){\r\n\t\t\tcase modes.units:\r\n\t\t\t\tdivs = this.renderVerticalMarker(start, end, section);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.timeline:\r\n\t\t\t\tdivs = this.renderTimelineMarker(start, end, section);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.year:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderYearMarker));\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.month:\r\n\t\t\t\tdivs = this.renderMonthMarker(start, end);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.weekAgenda:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderWeekAgendaMarker));\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.list:\r\n\t\t\t\tdivs = this.renderAgendaMarker(start, end);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.dayColumns:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderVerticalMarker));\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tthis.addWaiAriaLabel(divs, start, end, section);\r\n\t\tthis.addDataAttributes(divs, start, end, section);\r\n\r\n\t\tfor(var i = divs.length - 1; i >= 0; i--){\r\n\t\t\tif(divs[i].offsetWidth){\r\n\t\t\t\treturn divs[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t},\r\n\r\n\taddDataAttributes: function(divs, start, end, section){\r\n\t\tvar dateToStr = scheduler.date.date_to_str(scheduler.config.api_date);\r\n\r\n\t\tvar from = dateToStr(start),\r\n\t\t\tto = dateToStr(end);\r\n\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tdivs[i].setAttribute(\"data-start-date\", from);\r\n\t\t\tdivs[i].setAttribute(\"data-end-date\", to);\r\n\t\t\tif(section){\r\n\t\t\t\tdivs[i].setAttribute(\"data-section\", section);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\taddWaiAriaLabel: function(divs, start, end, section){\r\n\t\tvar label = \"\";\r\n\t\tvar state = scheduler.getState();\r\n\t\tvar mode = state.mode;\r\n\r\n\t\tvar dateTimeLabel = false;\r\n\r\n\t\tlabel += scheduler.templates.day_date(start);\r\n\r\n\t\tif((scheduler.date.day_start(new Date(start)).valueOf() != start.valueOf())){\r\n\t\t\tlabel += \" \" + scheduler.templates.hour_scale(start);\r\n\t\t\tdateTimeLabel = true;\r\n\t\t}\r\n\r\n\t\tif((scheduler.date.day_start(new Date(start)).valueOf() != scheduler.date.day_start(new Date(end)).valueOf())){\r\n\r\n\t\t\tlabel += \" - \" + scheduler.templates.day_date(end);\r\n\t\t\tif(dateTimeLabel || (scheduler.date.day_start(new Date(end)).valueOf() != end.valueOf())){\r\n\t\t\t\tlabel += \" \" + scheduler.templates.hour_scale(end);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(section){\r\n\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\t\t\t\tconst timeline = scheduler.matrix[mode];\r\n\t\t\t\tconst sectionObject = timeline.y_unit[timeline.order[section]];\r\n\t\t\t\tlabel += \", \" + scheduler.templates[mode + \"_scale_label\"](sectionObject.key, sectionObject.label, sectionObject);\r\n\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\tconst units = scheduler._props[mode];\r\n\t\t\t\tconst sectionObject = units.options[units.order[section]];\r\n\r\n\t\t\t\tlabel += \", \" + scheduler.templates[mode + \"_scale_text\"](sectionObject.key, sectionObject.label, sectionObject);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tscheduler._waiAria.setAttributes(divs[i], {\r\n\t\t\t\t\"aria-label\": label,\r\n\t\t\t\t\"aria-live\": \"polite\"\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\trenderWeekAgendaMarker: function(start_date, end_date){\r\n\t\tvar divs = scheduler.$container.querySelectorAll(\".dhx_wa_day_cont .dhx_wa_scale_bar\");\r\n\r\n\t\tvar currDate = scheduler.date.week_start(new Date(scheduler.getState().min_date));\r\n\r\n\t\tvar index = -1;\r\n\t\tvar markerDate = scheduler.date.day_start(new Date(start_date));\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tindex++;\r\n\t\t\tif(scheduler.date.day_start(new Date(currDate)).valueOf() == markerDate.valueOf()){\r\n\t\t\t\tbreak;\r\n\t\t\t}else{\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(index != -1) return this._wrapDiv(divs[index]);\r\n\t\treturn [];\r\n\t},\r\n\r\n\t_wrapDiv: function(cell){\r\n\t\tvar marker = this.createElement();\r\n\t\tmarker.style.top = cell.offsetTop + \"px\";\r\n\t\tmarker.style.left = cell.offsetLeft + \"px\";\r\n\t\tmarker.style.width = cell.offsetWidth + \"px\";\r\n\t\tmarker.style.height = cell.offsetHeight + \"px\";\r\n\t\tcell.appendChild(marker);\r\n\t\treturn [marker];\r\n\t},\r\n\trenderYearMarker: function(start_date, end_date){\r\n\t\tvar cell = scheduler._get_year_cell(start_date);\r\n\t\tcell.style.position = \"relative\";\r\n\t\tvar marker = this.createElement();\r\n\t\tmarker.style.top = \"0px\";\r\n\t\tmarker.style.left = \"0px\";\r\n\t\tmarker.style.width = \"100%\";\r\n\t\tmarker.style.height = \"100%\";\r\n\t\tcell.appendChild(marker);\r\n\t\treturn [marker];\r\n\t},\r\n\r\n\trenderAgendaMarker: function(start_date, end_date){\r\n\t\tvar block = this.createElement();\r\n\t\tblock.style.height = \"1px\";\r\n\t\tblock.style.width = \"100%\";\r\n\t\tblock.style.opacity = 1;\r\n\t\tblock.style.top = \"0px\";\r\n\t\tblock.style.left = \"0px\";\r\n\t\tscheduler.$container.querySelector(\".dhx_cal_data\").appendChild(block);\r\n\t\treturn [block];\r\n\t},\r\n\r\n\trenderTimelineMarker: function(start_date, end_date, section){\r\n\t\tvar view_opts = scheduler._lame_copy({}, scheduler.matrix[scheduler._mode]);\r\n\t\tvar areas = view_opts._scales;\r\n\t\t//timespans must always use actual position, not rounded\r\n\t\tview_opts.round_position = false;\r\n\t\tvar blocks = [];\r\n\r\n\t\tvar min_date = start_date ? new Date(start_date) : scheduler._min_date;\r\n\t\tvar max_date = end_date ? new Date(end_date) : scheduler._max_date;\r\n\r\n\t\tif(min_date.valueOf() < scheduler._min_date.valueOf())\r\n\t\t\tmin_date = new Date(scheduler._min_date);\r\n\t\tif(max_date.valueOf() > scheduler._max_date.valueOf())\r\n\t\t\tmax_date = new Date(scheduler._max_date);\r\n\r\n\t\tif(!view_opts._trace_x) return blocks;\r\n\r\n\t\tfor(var i = 0; i < view_opts._trace_x.length; i++){\r\n\t\t\tif(scheduler._is_column_visible(view_opts._trace_x[i]))\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\tif(i == view_opts._trace_x.length)\r\n\t\t\treturn blocks;\r\n\r\n\t\tvar area = areas[section];\r\n\r\n\t\tif (!(min_date < end_date && max_date > start_date))\r\n\t\t\treturn blocks;\r\n\r\n\t\tvar block = this.createElement();\r\n\r\n\t\tlet start_pos;\r\n\t\tlet end_pos;\r\n\r\n\t\tfunction set_date_part(source, target) {\r\n\t\t\t// reset to start of the month in order to prevent month change when target is on 31th day, and source month has only 30 days\r\n\t\t\ttarget.setDate(1);\r\n\r\n\t\t\ttarget.setFullYear(source.getFullYear());\r\n\t\t\ttarget.setMonth(source.getMonth());\r\n\t\t\ttarget.setDate(source.getDate());\r\n\t\t}\r\n\r\n\t\tif(!scheduler.getView().days){\r\n\t\t\tstart_pos = scheduler._timeline_getX({start_date: start_date}, false, view_opts);\r\n\t\t\tend_pos = scheduler._timeline_getX({start_date: end_date}, false, view_opts);\r\n\t\t}else{\r\n\t\t\t// daytimeline\r\n\t\t\tconst tempStart = new Date(start_date);\r\n\t\t\tset_date_part(scheduler._min_date, tempStart);\r\n\t\t\tconst tempEnd = new Date(end_date);\r\n\t\t\tset_date_part(scheduler._min_date, tempEnd);\r\n\t\t\tstart_pos = scheduler._timeline_getX({start_date: tempStart}, false, view_opts);\r\n\t\t\tend_pos = scheduler._timeline_getX({start_date: tempEnd}, false, view_opts);\r\n\t\t}\r\n\r\n\t\tvar height = ((view_opts._section_height[section]-1) || (view_opts.dy - 1));\r\n\r\n\t\tvar top = 0;\r\n\t\tif (scheduler._isRender('cell')){\r\n\t\t\ttop = area.offsetTop;\r\n\t\t\tstart_pos += view_opts.dx;\r\n\t\t\tend_pos += view_opts.dx;\r\n\t\t\tarea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t}else{\r\n\r\n\t\t}\r\n\t\tvar width = Math.max(1, end_pos - start_pos - 1);\r\n\t\tlet direction = \"left\";\r\n\t\tif(scheduler.config.rtl){\r\n\t\t\tdirection = \"right\";\r\n\t\t}\r\n\t\tblock.style.cssText = `height:${height}px; ${direction}:${start_pos}px; width:${width}px; top:${top}px;`;\r\n\r\n\t\tif(area){\r\n\t\t\tarea.appendChild(block);\r\n\t\t\tblocks.push(block);\r\n\t\t}\r\n\r\n\t\treturn blocks;\r\n\t},\r\n\r\n\trenderMonthCell: function(date){\r\n\t\tvar cells = scheduler.$container.querySelectorAll(\".dhx_month_head\");\r\n\r\n\t\tvar divs = [];\r\n\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\tdivs.push(cells[i].parentNode);\r\n\t\t}\r\n\r\n\t\tvar firstDate = scheduler.date.week_start(new Date(scheduler.getState().min_date));\r\n\r\n\t\tvar index = -1;\r\n\t\tvar weekNumber = 0;\r\n\t\tvar dayIndex = -1;\r\n\t\tvar currDate = firstDate;\r\n\t\tvar markerDate = scheduler.date.day_start(new Date(date));\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tindex++;\r\n\r\n\t\t\tif(dayIndex == 6){\r\n\t\t\t\tweekNumber++;\r\n\t\t\t\tdayIndex = 0;\r\n\t\t\t}else{\r\n\t\t\t\tdayIndex++;\r\n\t\t\t}\r\n\r\n\t\t\tif(scheduler.date.day_start(new Date(currDate)).valueOf() == markerDate.valueOf()){\r\n\t\t\t\tbreak;\r\n\t\t\t}else{\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(index == -1){\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tvar left = scheduler._colsS[dayIndex];\r\n\t\tvar top = scheduler._colsS.heights[weekNumber];\r\n\r\n\t\tvar div = this.createElement();\r\n\t\tdiv.style.top = top + \"px\";\r\n\t\tdiv.style.left = left + \"px\";\r\n\t\tdiv.style.width = scheduler._cols[dayIndex] + \"px\";\r\n\t\tdiv.style.height = ((scheduler._colsS.heights[weekNumber + 1] - top) || scheduler._colsS.height) + \"px\" ;\r\n\r\n\r\n\t\tvar container = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\r\n\t\tvar datatable = container.querySelector(\".dhx_cal_month_table\");\r\n\t\tif(datatable.nextSibling){\r\n\t\t\tcontainer.insertBefore(div, datatable.nextSibling);\r\n\t\t}else{\r\n\t\t\tcontainer.appendChild(div);\r\n\t\t}\r\n\t\treturn div;\r\n\t},\r\n\trenderMonthMarker: function(start_date, end_date){\r\n\t\tvar res = [];\r\n\t\tvar currentDate = start_date;\r\n\t\twhile(currentDate.valueOf() < end_date.valueOf()){\r\n\t\t\tres.push(this.renderMonthCell(currentDate));\r\n\t\t\tcurrentDate = scheduler.date.add(currentDate, 1, \"day\");\r\n\t\t}\r\n\t\treturn res;\r\n\t},\r\n\r\n\trenderVerticalMarker: function(start_date, end_date, section){\r\n\t\tvar index = scheduler.locate_holder_day(start_date);\r\n\r\n\t\tvar divs = [];\r\n\t\tvar area = null;\r\n\r\n\t\tvar c = scheduler.config;\r\n\t\tif(scheduler._ignores[index]) return divs;\r\n\r\n\t\tif (scheduler._props && scheduler._props[scheduler._mode] && section) {\r\n\t\t\tvar view = scheduler._props[scheduler._mode];\r\n\t\t\tindex = view.order[section];\r\n\r\n\t\t\tvar inner_index = view.order[section];\r\n\t\t\tif(!(view.days > 1)){\r\n\t\t\t\tindex = inner_index;\r\n\t\t\t\tif (view.size && (index > view.position+view.size)) {\r\n\t\t\t\t\tindex = 0;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t//var units_l = view.size || view.options.length;\r\n\r\n\t\t\t\tindex = scheduler.locate_holder_day(start_date) + inner_index;\r\n\t\t\t\t//index = index*units_l + inner_index;\r\n\t\t\t}\r\n\t\t}\r\n\t\tarea = scheduler.locate_holder(index);\r\n\t\tif(!area || area.querySelector(\".dhx_scale_hour\")){\r\n\t\t\t// hour scale instead of date column\r\n\t\t\treturn document.createElement(\"div\");\r\n\t\t}\r\n\r\n\t\tvar start = Math.max((start_date.getHours()*60 + start_date.getMinutes()), c.first_hour*60);\r\n\r\n\r\n\t\tvar end = Math.min((end_date.getHours()*60 + end_date.getMinutes()), c.last_hour*60);\r\n\t\tif(!end && (scheduler.date.day_start(new Date(end_date)).valueOf() > scheduler.date.day_start(new Date(start_date)).valueOf())){\r\n\t\t\tend = c.last_hour*60;\r\n\t\t}\r\n\r\n\t\tif (end <= start) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tvar block = this.createElement();\r\n\r\n\t\t// +1 for working with section which really takes up whole height (as % would be == 0)\r\n\t\tvar all_hours_height = scheduler.config.hour_size_px*c.last_hour + 1;\r\n\t\tvar hour_ms = 60*60*1000;\r\n\t\tblock.style.top = (Math.round((start*60*1000-scheduler.config.first_hour*hour_ms)*scheduler.config.hour_size_px/hour_ms) % all_hours_height) + \"px\";\r\n\t\tblock.style.lineHeight = block.style.height = Math.max((Math.round(((end-start)*60*1000)*scheduler.config.hour_size_px/hour_ms)) % all_hours_height, 1)+\"px\";\r\n\t\tblock.style.width = \"100%\";\r\n\t\tarea.appendChild(block);\r\n\t\tdivs.push(block);\r\n\t\treturn divs[0];\r\n\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode = function(){};\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.EventHandler,\r\n\t{\r\n\t\tgetDefaultNode: function(){\r\n\t\t\tvar node = new scheduler.$keyboardNavigation.TimeSlot();\r\n\r\n\t\t\tif(!node.isValid()){\r\n\t\t\t\tnode = node.fallback();\r\n\t\t\t}\r\n\t\t\treturn node;\r\n\t\t},\r\n\r\n\t\t_modes:{\r\n\t\t\tmonth: \"month\",\r\n\t\t\tyear: \"year\",\r\n\t\t\tdayColumns: \"dayColumns\",\r\n\t\t\ttimeline:\"timeline\",\r\n\t\t\tunits:\"units\",\r\n\t\t\tweekAgenda: \"weekAgenda\",\r\n\t\t\tlist: \"list\"\r\n\t\t},\r\n\t\tgetMode: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tvar mode = state.mode;\r\n\t\t\tif((scheduler.matrix && scheduler.matrix[mode])){\r\n\t\t\t\treturn this._modes.timeline;\r\n\t\t\t} else if((scheduler._props && scheduler._props[mode])){\r\n\t\t\t\treturn this._modes.units;\r\n\t\t\t}else if(mode == \"month\"){\r\n\t\t\t\treturn this._modes.month;\r\n\t\t\t}else if(mode == \"year\"){\r\n\t\t\t\treturn this._modes.year;\r\n\t\t\t}else if(mode == \"week_agenda\"){\r\n\t\t\t\treturn this._modes.weekAgenda;\r\n\t\t\t}else if(mode == \"map\" || mode == \"agenda\" || (scheduler._grid && scheduler[\"grid_\" + mode])){\r\n\t\t\t\treturn this._modes.list;\r\n\t\t\t}else{\r\n\t\t\t\treturn this._modes.dayColumns;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.focus();\r\n\t\t},\r\n\r\n\t\tblur: function(){\r\n\r\n\t\t},\r\n\r\n\t\tdisable: function(){\r\n\t\t\tscheduler.$container.setAttribute(\"tabindex\", \"0\");\r\n\t\t},\r\n\t\tenable: function(){\r\n\t\t\tif(scheduler.$container)\r\n\t\t\t\tscheduler.$container.removeAttribute(\"tabindex\");\r\n\t\t},\r\n\t\tisEnabled: function(){\r\n\t\t\treturn scheduler.$container.hasAttribute(\"tabindex\");\r\n\t\t},\r\n\r\n\r\n\t\t_compareEvents: function(a, b){\r\n\t\t\tif (a.start_date.valueOf() == b.start_date.valueOf())\r\n\t\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\t\treturn a.start_date.valueOf() > b.start_date.valueOf() ? 1 : -1;\r\n\t\t},\r\n\r\n\t\t_pickEvent: function(from, to, startId, reverse){\r\n\t\t\tvar range = scheduler.getState();\r\n\t\t\tfrom = new Date(Math.max(range.min_date.valueOf(), from.valueOf()));\r\n\t\t\tto = new Date(Math.min(range.max_date.valueOf(), to.valueOf()));\r\n\r\n\t\t\tvar evs = scheduler.getEvents(from, to);\r\n\t\t\tevs.sort(this._compareEvents);\r\n\t\t\tif(reverse){\r\n\t\t\t\tevs = evs.reverse();\r\n\t\t\t}\r\n\r\n\t\t\tvar trim = !!startId;\r\n\t\t\tfor(var i =0; i < evs.length && trim; i++){\r\n\t\t\t\tif(evs[i].id == startId){\r\n\t\t\t\t\ttrim = false;\r\n\t\t\t\t}\r\n\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\r\n\t\t\tfor(var i = 0; i < evs.length; i++){\r\n\t\t\t\tvar eventElement = new scheduler.$keyboardNavigation.Event(evs[i].id);\r\n\t\t\t\tif(eventElement.getNode())\r\n\t\t\t\t\treturn evs[i];\r\n\t\t\t}\r\n\r\n\t\t\treturn null;\r\n\t\t},\r\n\r\n\t\tnextEventHandler: function(id){\r\n\t\t\tvar activeNode = scheduler.$keyboardNavigation.dispatcher.activeNode;\r\n\r\n\t\t\tvar startId = id || (activeNode && activeNode.eventId);\r\n\r\n\t\t\tvar nextEvent = null;\r\n\t\t\tif(startId && scheduler.getEvent(startId)){\r\n\t\t\t\tvar currEvent = scheduler.getEvent(startId);\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tcurrEvent.start_date,\r\n\t\t\t\t\tscheduler.date.add(currEvent.start_date, 1, \"year\"),\r\n\t\t\t\t\tcurrEvent.id,\r\n\t\t\t\t\tfalse\r\n\t\t\t\t);\r\n\r\n\t\t\t}\r\n\t\t\tif(!nextEvent && !id){\r\n\t\t\t\tvar visibleDates = scheduler.getState();\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tvisibleDates.min_date,\r\n\t\t\t\t\tscheduler.date.add(visibleDates.min_date, 1, \"year\"),\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\tfalse\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tif(nextEvent){\r\n\r\n\t\t\t\tvar nextEv = new scheduler.$keyboardNavigation.Event(nextEvent.id);\r\n\t\t\t\tif(!nextEv.isValid()){// not visible event\r\n\t\t\t\t\tthis.nextEventHandler(nextEvent.id);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(activeNode){activeNode.blur();}\r\n\t\t\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(nextEv);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tprevEventHandler: function(id){\r\n\t\t\tvar activeNode = scheduler.$keyboardNavigation.dispatcher.activeNode;\r\n\r\n\t\t\tvar startId = id || (activeNode && activeNode.eventId);\r\n\r\n\t\t\tvar nextEvent = null;\r\n\t\t\tif(startId && scheduler.getEvent(startId)){\r\n\t\t\t\tvar currEvent = scheduler.getEvent(startId);\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tscheduler.date.add(currEvent.end_date, -1, \"year\"),\r\n\t\t\t\t\tcurrEvent.end_date,\r\n\t\t\t\t\tcurrEvent.id,\r\n\t\t\t\t\ttrue\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\tif(!nextEvent && !id){\r\n\t\t\t\tvar visibleDates = scheduler.getState();\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tscheduler.date.add(visibleDates.max_date, -1, \"year\"),\r\n\t\t\t\t\tvisibleDates.max_date,\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\ttrue\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tif(nextEvent){\r\n\t\t\t\tvar nextEv = new scheduler.$keyboardNavigation.Event(nextEvent.id);\r\n\t\t\t\tif(!nextEv.isValid()){// not visible event\r\n\t\t\t\t\tthis.prevEventHandler(nextEvent.id);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(activeNode){activeNode.blur();}\r\n\t\t\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(nextEv);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\r\n\t\t\t\"alt+1, alt+2, alt+3, alt+4, alt+5, alt+6, alt+7, alt+8, alt+9\": function(e){\r\n\t\t\t\tvar tabs = scheduler.$keyboardNavigation.HeaderCell.prototype.getNodes(\".dhx_cal_navline .dhx_cal_tab\");\r\n\t\t\t\tvar key = e.key;\r\n\t\t\t\tif(key === undefined){\r\n\t\t\t\t\tkey = e.keyCode - 48;\r\n\t\t\t\t}\r\n\t\t\t\tif(tabs[key*1 - 1]){\r\n\t\t\t\t\ttabs[key*1 - 1].click();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+left,meta+left\": function(e){\r\n\t\t\t\tscheduler._click.dhx_cal_prev_button();\r\n\t\t\t},\r\n\t\t\t\"ctrl+right,meta+right\": function(e){\r\n\t\t\t\tscheduler._click.dhx_cal_next_button();\r\n\t\t\t},\r\n\t\t\t\"ctrl+up,meta+up\":function(e){\r\n\t\t\t\tvar dataArea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tdataArea.scrollTop -= 20;\r\n\t\t\t},\r\n\t\t\t\"ctrl+down,meta+down\": function(e){\r\n\t\t\t\tvar dataArea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tdataArea.scrollTop += 20;\r\n\t\t\t},\r\n\r\n\r\n\t\t\t\"e\": function(){\r\n\t\t\t\tthis.nextEventHandler();\r\n\t\t\t},\r\n\r\n\t\t\t\"home\": function(){\r\n\t\t\t\tscheduler.setCurrentView(new Date());\r\n\t\t\t},\r\n\r\n\t\t\t\"shift+e\": function(){\r\n\t\t\t\tthis.prevEventHandler();\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+enter,meta+enter\": function(){\r\n\t\t\t\tscheduler.addEventNow({start_date: new Date(scheduler.getState().date)});\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+c,meta+c\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t},\r\n\t\t\t\"ctrl+v,meta+v\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t},\r\n\t\t\t\"ctrl+x,meta+x\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode.prototype.bindAll(scheduler.$keyboardNavigation.SchedulerNode.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.KeyNavNode = function(){};\r\n\r\nscheduler.$keyboardNavigation.KeyNavNode.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.EventHandler,\r\n\t{\r\n\t\tisValid: function(){\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\treturn null;\r\n\t\t},\r\n\r\n\t\tmoveTo: function (element) {\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(element);\r\n\t\t},\r\n\r\n\t\tcompareTo: function(b){\r\n\t\t\t// good enough comparison of two random objects\r\n\t\t\tif(!b) return false;\r\n\t\t\tfor(var i in this){\r\n\t\t\t\tif(!!this[i] != !!b[i]) return false;\r\n\r\n\t\t\t\tvar canStringifyThis = !!(this[i] && this[i].toString);\r\n\t\t\t\tvar canStringifyThat = !!(b[i] && b[i].toString);\r\n\t\t\t\tif(canStringifyThat != canStringifyThis) return false;\r\n\t\t\t\tif(!(canStringifyThat && canStringifyThis)) {\r\n\t\t\t\t\tif(b[i] != this[i]) return false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(b[i].toString() != this[i].toString())\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\tgetNode: function(){},\r\n\t\tfocus: function(){\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif(node){\r\n\t\t\t\tnode.setAttribute(\"tabindex\", \"-1\");\r\n\t\t\t\t//node.className += \" scheduler_focused\";\r\n\t\t\t\tif(node.focus) node.focus();\r\n\t\t\t}\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif(node){\r\n\t\t\t\tnode.setAttribute(\"tabindex\", \"-1\");\r\n\t\t\t\t//node.className = (node.className || \"\").replace(/ ?scheduler_focused/g, \"\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.HeaderCell = function(index){\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.HeaderCell.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\tgetNode: function(index){\r\n\t\t\tindex = index || this.index || 0;\r\n\t\t\tvar nodes = this.getNodes();\r\n\t\t\tif(nodes[index]) return nodes[index];\r\n\t\t},\r\n\r\n\t\tgetNodes: function(selector){\r\n\t\t\tselector = selector || [\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_prev_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_next_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_today_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_tab\"\r\n\t\t\t\t].join(\", \");\r\n\r\n\t\t\tvar nodes = Array.prototype.slice.call(scheduler.$container.querySelectorAll(selector));\r\n\t\t\tnodes.sort(function(a, b){\r\n\t\t\t\treturn a.offsetLeft - b.offsetLeft;\r\n\t\t\t});\r\n\t\t\treturn nodes;\r\n\t\t},\r\n\r\n\t\t_handlers:null,\r\n\r\n\t\tisValid: function(){\r\n\t\t\treturn !!this.getNode(this.index);\r\n\t\t},\r\n\t\tfallback:function(){\r\n\t\t\tvar defaultCell = this.getNode(0);\r\n\t\t\tif(!defaultCell){\r\n\t\t\t\tdefaultCell = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}\r\n\t\t\treturn defaultCell;\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tvar newIndex = this.index - 1;\r\n\t\t\t\tif(newIndex < 0){\r\n\t\t\t\t\tnewIndex = this.getNodes().length - 1;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.HeaderCell(newIndex));\r\n\r\n\t\t\t},\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tvar newIndex = this.index + 1;\r\n\t\t\t\tif(newIndex >= this.getNodes().length){\r\n\t\t\t\t\tnewIndex = 0;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.HeaderCell(newIndex));\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t},\r\n\r\n\t\t\t\"enter\": function(){\r\n\t\t\t\tvar node = this.getNode();\r\n\t\t\t\tif(node){\r\n\t\t\t\t\tnode.click();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.HeaderCell.prototype.bindAll(scheduler.$keyboardNavigation.HeaderCell.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.Event = function(id){\r\n\tthis.eventId = null;\r\n\tif(scheduler.getEvent(id)){\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tthis.start = new Date(ev.start_date);\r\n\t\tthis.end = new Date(ev.end_date);\r\n\r\n\t\tthis.section = this._getSection(ev);\r\n\t\tthis.eventId = id;\r\n\t}\r\n};\r\n\r\nscheduler.$keyboardNavigation.Event.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\t_getNodes: function(){\r\n\t\t\treturn Array.prototype.slice.call(scheduler.$container.querySelectorAll(\"[\"+scheduler.config.event_attribute+\"]\"));\r\n\t\t},\r\n\r\n\t\t_modes: scheduler.$keyboardNavigation.SchedulerNode.prototype._modes,\r\n\r\n\t\tgetMode: scheduler.$keyboardNavigation.SchedulerNode.prototype.getMode,\r\n\r\n\t\t_handlers: null,\r\n\t\tisValid: function(){\r\n\t\t\treturn !!(scheduler.getEvent(this.eventId) && this.getNode());\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\tvar eventNode = this._getNodes()[0];\r\n\t\t\tvar defaultElement = null;\r\n\t\t\tif(!eventNode || !(scheduler._locate_event(eventNode))){\r\n\t\t\t\tdefaultElement = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}else{\r\n\t\t\t\tvar id = scheduler._locate_event(eventNode);\r\n\t\t\t\tdefaultElement = new scheduler.$keyboardNavigation.Event(id);\r\n\t\t\t}\r\n\r\n\t\t\treturn defaultElement;\r\n\t\t},\r\n\r\n\t\tisScrolledIntoView: function (el) {\r\n\t\t\tvar eventBox = el.getBoundingClientRect();\r\n\t\t\tvar viewPort = scheduler.$container.querySelector(\".dhx_cal_data\").getBoundingClientRect();\r\n\t\t\t\r\n\t\t\tif(eventBox.bottom < viewPort.top || eventBox.top > viewPort.bottom){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\tgetNode: function(){\r\n\r\n\t\t\tvar idSelector = \"[\"+scheduler.config.event_attribute+\"='\"+this.eventId+\"']\";\r\n\r\n\t\t\tvar inlineEditor = scheduler.$keyboardNavigation.dispatcher.getInlineEditor(this.eventId);\r\n\t\t\tif(inlineEditor){// is inline editor visible\r\n\t\t\t\treturn inlineEditor;\r\n\t\t\t}else{\r\n\t\t\t\tif(scheduler.isMultisectionEvent && scheduler.isMultisectionEvent(scheduler.getEvent(this.eventId))){\r\n\t\t\t\t\tvar nodes = scheduler.$container.querySelectorAll(idSelector);\r\n\t\t\t\t\tfor(var i = 0; i < nodes.length; i++){\r\n\t\t\t\t\t\tif(this.isScrolledIntoView(nodes[i])){\r\n\t\t\t\t\t\t\treturn nodes[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn nodes[0];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn scheduler.$container.querySelector(idSelector);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tvar event = scheduler.getEvent(this.eventId);\r\n\r\n\t\t\tvar calendar = scheduler.getState();\r\n\t\t\tif(event.start_date.valueOf() > calendar.max_date.valueOf() || event.end_date.valueOf() <= calendar.min_date.valueOf()){\r\n\t\t\t\tscheduler.setCurrentView(event.start_date);\r\n\t\t\t}\r\n\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif (this.isScrolledIntoView(node)) {\r\n\t\t\t\tscheduler.$keyboardNavigation.dispatcher.keepScrollPosition((function(){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\t\t}).bind(this));\r\n\t\t\t} else {\r\n\t\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\t}\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\r\n\r\n\t\t_getSection: function(ev){\r\n\t\t\tvar section = null;\r\n\t\t\tvar mode = scheduler.getState().mode;\r\n\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\t\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\t\tsection = ev[timeline.y_property];\r\n\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\tvar unit = scheduler._props[mode];\r\n\t\t\t\tsection = ev[unit.map_to];\r\n\t\t\t}\r\n\t\t\treturn section;\r\n\t\t},\r\n\t\t_moveToSlot: function(dir){\r\n\t\t\tvar ev = scheduler.getEvent(this.eventId);\r\n\t\t\tif(ev){\r\n\t\t\t\tvar section =this._getSection(ev);\r\n\t\t\t\tvar slot = new scheduler.$keyboardNavigation.TimeSlot(ev.start_date, null, section);\r\n\t\t\t\tthis.moveTo(slot.nextSlot(slot, dir));\r\n\t\t\t}else{\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tthis._moveToSlot(\"left\");\r\n\t\t\t},\r\n\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tthis._moveToSlot(\"right\");\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\t\t\t\tif(this.getMode() == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis._moveToSlot(\"down\");\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"space\": function(){\r\n\t\t\t\tvar node = this.getNode();\r\n\t\t\t\tif(node && node.click){\r\n\t\t\t\t\tnode.click();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"up\": function () {\r\n\t\t\t\tif(this.getMode() == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis._moveToSlot(\"up\");\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"delete\": function(){\r\n\t\t\t\tif(scheduler.getEvent(this.eventId)) {\r\n\t\t\t\t\tscheduler._click.buttons[\"delete\"](this.eventId);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t// open lightbox\r\n\t\t\t\"enter\": function () {\r\n\t\t\t\tif(scheduler.getEvent(this.eventId)) {\r\n\t\t\t\t\tscheduler.showLightbox(this.eventId);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\nscheduler.$keyboardNavigation.Event.prototype.bindAll(scheduler.$keyboardNavigation.Event.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.TimeSlot = function(from, to, section, movingDate){\r\n\tvar state = scheduler.getState();\r\n\tvar timeline = scheduler.matrix && scheduler.matrix[state.mode];\r\n\r\n\tif(!from){\r\n\t\tfrom = this.getDefaultDate();\r\n\t}\r\n\r\n\tif(!to){\r\n\r\n\t\tif(timeline){\r\n\t\t\tto = scheduler.date.add(from, timeline.x_step, timeline.x_unit);\r\n\t\t}else{\r\n\t\t\tto = scheduler.date.add(from, scheduler.config.key_nav_step, \"minute\");\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tthis.section = section || this._getDefaultSection();\r\n\tthis.start_date = new Date(from);\r\n\tthis.end_date = new Date(to);\r\n\tthis.movingDate = movingDate || null;\r\n};\r\n\r\nscheduler.$keyboardNavigation.TimeSlot.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\t_handlers:null,\r\n\r\n\t\tgetDefaultDate: function(){\r\n\t\t\tvar from;\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar visibleTime = new Date(state.date);\r\n\t\t\tvisibleTime.setSeconds(0);\r\n\t\t\tvisibleTime.setMilliseconds(0);\r\n\r\n\t\t\tvar nowTime = new Date();\r\n\t\t\tnowTime.setSeconds(0);\r\n\t\t\tnowTime.setMilliseconds(0);\r\n\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[state.mode];\r\n\t\t\tvar showNowTime = false;\r\n\t\t\tif(visibleTime.valueOf() === nowTime.valueOf()){\r\n\t\t\t\tshowNowTime = true;\r\n\t\t\t}\r\n\r\n\t\t\tif(timeline){\r\n\t\t\t\tif(showNowTime){\r\n\t\t\t\t\tif(timeline.x_unit === \"day\"){\r\n\t\t\t\t\t\tnowTime.setHours(0);\r\n\t\t\t\t\t\tnowTime.setMinutes(0);\r\n\t\t\t\t\t}else if(timeline.x_unit === \"hour\"){\r\n\t\t\t\t\t\tnowTime.setMinutes(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfrom = nowTime;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfrom = scheduler.date[timeline.name + \"_start\"](new Date(state.date));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfrom = this.findVisibleColumn(from);\r\n\t\t\t}else{\r\n\t\t\t\tfrom = new Date(scheduler.getState().min_date);\r\n\t\t\t\tif(showNowTime){\r\n\t\t\t\t\tfrom = nowTime;\r\n\t\t\t\t}\r\n\t\t\t\tfrom = this.findVisibleColumn(from);\r\n\t\t\t\tif(!showNowTime){\r\n\t\t\t\t\tfrom.setHours(scheduler.config.first_hour);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(!scheduler._table_view){\r\n\t\t\t\t\tvar dataContainer = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\t\tif(dataContainer.scrollTop){\r\n\t\t\t\t\t\tfrom.setHours(scheduler.config.first_hour + Math.ceil(dataContainer.scrollTop / scheduler.config.hour_size_px));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn from;\r\n\t\t},\r\n\r\n\t\tclone: function(timeslot){\r\n\t\t\treturn new scheduler.$keyboardNavigation.TimeSlot(timeslot.start_date, timeslot.end_date, timeslot.section, timeslot.movingDate);\r\n\t\t},\r\n\t\t_getMultisectionView: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view;\r\n\t\t\tif(scheduler._props && scheduler._props[state.mode]) {\r\n\t\t\t\tview = scheduler._props[state.mode];\r\n\t\t\t}else if(scheduler.matrix && scheduler.matrix[state.mode]){\r\n\t\t\t\tview = scheduler.matrix[state.mode];\r\n\t\t\t}\r\n\t\t\treturn view;\r\n\t\t},\r\n\r\n\t\t_getDefaultSection: function(){\r\n\t\t\tvar section = null;\r\n\t\t\tvar view = this._getMultisectionView();\r\n\t\t\tif(view && !section){\r\n\t\t\t\tsection = this._getNextSection();\r\n\t\t\t}\r\n\t\t\treturn section;\r\n\t\t},\r\n\r\n\t\t_getNextSection: function(sectionId, dir){\r\n\t\t\tvar view = this._getMultisectionView();\r\n\t\t\tvar currentIndex = view.order[sectionId];\r\n\t\t\tvar nextIndex = currentIndex;\r\n\t\t\tif(currentIndex !== undefined){\r\n\t\t\t\tnextIndex = currentIndex + dir;\r\n\t\t\t}else{\r\n\t\t\t\tnextIndex = (view.size && view.position) ? view.position : 0;\r\n\t\t\t}\r\n\r\n\t\t\tif(nextIndex < 0){\r\n\t\t\t\tnextIndex = 0;\r\n\t\t\t}\r\n\t\t\tvar options = view.options || view.y_unit;\r\n\r\n\t\t\tif(nextIndex >= options.length){\r\n\t\t\t\tnextIndex = options.length - 1;\r\n\t\t\t}\r\n\t\t\t//nextIndex = nextIndex < 0 ? nextIndex = (view.options || view.y_unit).length -1 : nextIndex;\r\n\r\n\t\t\tif(options[nextIndex]){\r\n\t\t\t\treturn options[nextIndex].key;\r\n\t\t\t}else{\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar isInRange = !(this.start_date.valueOf() < state.min_date.valueOf() || this.start_date.valueOf() >= state.max_date.valueOf());\r\n\r\n\t\t\tif(!isInRange) return false;\r\n\r\n\r\n\t\t\tif(!this.isVisible(this.start_date, this.end_date)) return false;\r\n\r\n\t\t\tvar view = this._getMultisectionView();\r\n\r\n\t\t\tif(view){\r\n\t\t\t\treturn (view.order[this.section] !== undefined);\r\n\t\t\t}else{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\tfallback:function(){\r\n\r\n\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(!defaultSlot.isValid()){\r\n\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t}else{\r\n\t\t\t\treturn defaultSlot;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tgetNodes: function(){\r\n\t\t\treturn Array.prototype.slice.call(scheduler.$container.querySelectorAll(\".dhx_focus_slot\"));\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\treturn this.getNodes()[0];\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tif(this.section && scheduler.getView() && scheduler.getView().smart_rendering && scheduler.getView().scrollTo && !scheduler.$container.querySelector(`[data-section-id=\"${this.section}\"]`)){\r\n\t\t\t\tscheduler.getView().scrollTo({section: this.section});\r\n\t\t\t}\r\n\t\t\tscheduler.$keyboardNavigation.marker.render(this.start_date, this.end_date, this.section);\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\tscheduler.$keyboardNavigation._pasteDate = this.start_date;\r\n\t\t\tscheduler.$keyboardNavigation._pasteSection = this.section;\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t\tscheduler.$keyboardNavigation.marker.clear();\r\n\t\t},\r\n\r\n\t\t_modes: scheduler.$keyboardNavigation.SchedulerNode.prototype._modes,\r\n\r\n\t\t_getMode: scheduler.$keyboardNavigation.SchedulerNode.prototype.getMode,\r\n\r\n\t\taddMonthDate: function(date, dir, extend){\r\n\t\t\tvar res;\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tres = scheduler.date.add(date, -1, \"week\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tres = scheduler.date.add(date, 1, \"week\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tres = scheduler.date.day_start(scheduler.date.add(date, -1, \"day\"));\r\n\t\t\t\t\tres = this.findVisibleColumn(res, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tres = scheduler.date.day_start(scheduler.date.add(date, 1, \"day\"));\r\n\t\t\t\t\tres = this.findVisibleColumn(res, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tres = scheduler.date.day_start(new Date(date));\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tif(date.valueOf() < state.min_date.valueOf() || (!extend && date.valueOf() >= state.max_date.valueOf())){\r\n\t\t\t\tres = new Date(state.min_date);\r\n\t\t\t}\r\n\r\n\t\t\treturn res;\r\n\t\t},\r\n\r\n\t\tnextMonthSlot: function(slot, dir, extend){\r\n\r\n\t\t\tvar start, end;\r\n\t\t\tstart = this.addMonthDate(slot.start_date, dir, extend);\r\n\r\n\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\tend = new Date(start);\r\n\t\t\tend.setHours(scheduler.config.last_hour);\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\r\n\t\t_alignTimeSlot: function(date, minDate, unit, step){\r\n\t\t\tvar currentDate = new Date(minDate);\r\n\t\t\twhile(currentDate.valueOf() < date.valueOf()){\r\n\t\t\t\tcurrentDate = scheduler.date.add(currentDate, step, unit);\r\n\t\t\t}\r\n\r\n\t\t\tif(currentDate.valueOf() > date.valueOf()){\r\n\t\t\t\tcurrentDate = scheduler.date.add(currentDate, -step, unit);\r\n\t\t\t}\r\n\r\n\t\t\treturn currentDate;\r\n\t\t},\r\n\r\n\t\tnextTimelineSlot: function(slot, dir, extend){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view = scheduler.matrix[state.mode];\r\n\r\n\t\t\tvar startDate = this._alignTimeSlot(slot.start_date, scheduler.date[view.name + \"_start\"](new Date(slot.start_date)), view.x_unit, view.x_step);\r\n\t\t\tvar endDate = this._alignTimeSlot(slot.end_date, scheduler.date[view.name + \"_start\"](new Date(slot.end_date)), view.x_unit, view.x_step);\r\n\r\n\t\t\tif(endDate.valueOf() <= startDate.valueOf()){\r\n\t\t\t\tendDate = scheduler.date.add(startDate, view.x_step, view.x_unit);\r\n\t\t\t}\r\n\t\t\tvar newPos = this.clone(slot);\r\n\t\t\tnewPos.start_date = startDate;\r\n\t\t\tnewPos.end_date = endDate;\r\n\t\t\tnewPos.section = slot.section || this._getNextSection();\r\n\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tnewPos.section = this._getNextSection(slot.section, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tnewPos.section = this._getNextSection(slot.section, +1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tnewPos.start_date = this.findVisibleColumn(scheduler.date.add(newPos.start_date, -view.x_step, view.x_unit), -1);\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tnewPos.start_date = this.findVisibleColumn(scheduler.date.add(newPos.start_date, view.x_step, view.x_unit), 1);\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(newPos.start_date.valueOf() < state.min_date.valueOf() || newPos.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tif(extend && newPos.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\t\tnewPos.start_date = new Date(state.max_date);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tnewPos.start_date = scheduler.date[state.mode + \"_start\"](scheduler.date.add(state.date, dir == \"left\" ? -1 : 1, state.mode));\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn newPos;\r\n\t\t},\r\n\r\n\t\tnextUnitsSlot: function(slot, dir, extend){\r\n\t\t\tvar newPos = this.clone(slot);\r\n\t\t\tnewPos.section = slot.section || this._getNextSection();\r\n\r\n\t\t\tvar section = slot.section || this._getNextSection();\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view = scheduler._props[state.mode];\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tsection = this._getNextSection(slot.section, -1);\r\n\t\t\t\t\tvar optionsCount = view.size ? (view.size - 1) : view.options.length;\r\n\r\n\t\t\t\t\tif(view.days > 1 && (view.order[section] == optionsCount - 1)){\r\n\t\t\t\t\t\tif(scheduler.date.add(slot.start_date, -1, \"day\").valueOf() >= state.min_date.valueOf()){\r\n\t\t\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tsection = this._getNextSection(slot.section, 1);\r\n\t\t\t\t\tif(view.days > 1 && !view.order[section]){\r\n\t\t\t\t\t\tif(scheduler.date.add(slot.start_date, 1, \"day\").valueOf() < state.max_date.valueOf()){\r\n\t\t\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\tsection = slot.section;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tnewPos.section = section;\r\n\t\t\treturn newPos;\r\n\t\t},\r\n\r\n\t\t_moveDate: function(oldDate, dir){\r\n\t\t\tvar newDate = this.findVisibleColumn(scheduler.date.add(oldDate, dir, \"day\"), dir);\r\n\t\t\tnewDate.setHours(oldDate.getHours());\r\n\t\t\tnewDate.setMinutes(oldDate.getMinutes());\r\n\t\t\treturn newDate;\r\n\t\t},\r\n\r\n\t\tisBeforeLastHour: function(date, isStartDate){\r\n\t\t\tvar minutes = date.getMinutes(),\r\n\t\t\t\thours = date.getHours(),\r\n\t\t\t\tlast_hour = scheduler.config.last_hour;\r\n\t\t\treturn (hours < last_hour || (!isStartDate && ((last_hour == 24 || hours == last_hour) && !minutes)));\r\n\t\t},\r\n\t\tisAfterFirstHour: function(date, isStartDate){\r\n\t\t\tvar minutes = date.getMinutes(),\r\n\t\t\t\thours = date.getHours(),\r\n\t\t\t\tfirst_hour = scheduler.config.first_hour,\r\n\t\t\t\tlast_hour = scheduler.config.last_hour;\r\n\t\t\treturn (hours >= first_hour || (!isStartDate && (!minutes && ((!hours && last_hour == 24) || (hours == last_hour)))));\r\n\t\t},\r\n\t\tisInVisibleDayTime: function(date, isStartDate){\r\n\t\t\treturn (this.isBeforeLastHour(date, isStartDate) && this.isAfterFirstHour(date, isStartDate));\r\n\t\t},\r\n\r\n\t\tnextDaySlot: function(slot, dir, extend){\r\n\t\t\tvar start, end;\r\n\r\n\t\t\tvar key_nav_step = scheduler.config.key_nav_step;\r\n\r\n\t\t\tvar date = this._alignTimeSlot(slot.start_date, scheduler.date.day_start(new Date(slot.start_date)), \"minute\", key_nav_step);\r\n\r\n\r\n\t\t\tvar oldStart = slot.start_date;\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tstart = scheduler.date.add(date, -key_nav_step, \"minute\");\r\n\r\n\t\t\t\t\tif(!this.isInVisibleDayTime(start, true)){\r\n\t\t\t\t\t\tif (!extend || this.isInVisibleDayTime(oldStart, true)) {\r\n\r\n\t\t\t\t\t\t\tvar toNextDay = true;\r\n\t\t\t\t\t\t\tif(extend && scheduler.date.date_part(new Date(start)).valueOf() != scheduler.date.date_part(new Date(oldStart)).valueOf())\r\n\t\t\t\t\t\t\t\ttoNextDay = false;\r\n\t\t\t\t\t\t\tif(toNextDay)\r\n\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, -1, \"day\"), -1);\r\n\r\n\t\t\t\t\t\t\tstart.setHours(scheduler.config.last_hour);\r\n\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\tstart = scheduler.date.add(start, -key_nav_step, \"minute\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tstart = scheduler.date.add(date, key_nav_step, \"minute\");\r\n\r\n\t\t\t\t\tvar testEnd = extend ? start : scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tif(!this.isInVisibleDayTime(testEnd, false)){\r\n\t\t\t\t\t\tif(!extend || this.isInVisibleDayTime(oldStart, false)) {\r\n\t\t\t\t\t\t\tif (!extend) {\r\n\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, 1, \"day\"), 1);\r\n\t\t\t\t\t\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tvar toNextDay = true;\r\n\t\t\t\t\t\t\t\tif (scheduler.date.date_part(new Date(oldStart)).valueOf() == oldStart.valueOf()) {\r\n\t\t\t\t\t\t\t\t\ttoNextDay = false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (toNextDay) {\r\n\t\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, 1, \"day\"), 1);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\t\tstart = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tstart = this._moveDate(slot.start_date, -1);\r\n\t\t\t\t\tend = this._moveDate(slot.end_date, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tstart = this._moveDate(slot.start_date, 1);\r\n\t\t\t\t\tend = this._moveDate(slot.end_date, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tstart = date;\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\t\tnextWeekAgendaSlot: function(slot, dir){\r\n\t\t\tvar start, end;\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tstart = scheduler.date.day_start(scheduler.date.add(slot.start_date, -1, \"day\"));\r\n\t\t\t\t\tstart = this.findVisibleColumn(start, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tstart = scheduler.date.day_start(scheduler.date.add(slot.start_date, 1, \"day\"));\r\n\t\t\t\t\tstart = this.findVisibleColumn(start, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tstart = scheduler.date.day_start(slot.start_date);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif(slot.start_date.valueOf() < state.min_date.valueOf() || slot.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tstart = new Date(state.min_date);\r\n\r\n\t\t\t}\r\n\t\t\tend = new Date(start);\r\n\t\t\tend.setHours(scheduler.config.last_hour);\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\t\tnextAgendaSlot: function(slot, dir){\r\n\t\t\treturn {start_date: slot.start_date, end_date: slot.end_date};\r\n\t\t},\r\n\r\n\r\n\t\tisDateVisible: function(date){\r\n\t\t\tif(!scheduler._ignores_detected)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[scheduler.getState().mode];\r\n\r\n\t\t\tvar index;\r\n\t\t\tif(timeline){\r\n\t\t\t\tindex = scheduler._get_date_index(timeline, date);\r\n\t\t\t}else{\r\n\t\t\t\tindex = scheduler.locate_holder_day(date);\r\n\t\t\t}\r\n\r\n\t\t\treturn !scheduler._ignores[index];\r\n\t\t},\r\n\r\n\t\tfindVisibleColumn: function(start, dir){\r\n\t\t\tvar date = start;\r\n\t\t\tdir = dir || 1;\r\n\t\t\tvar range = scheduler.getState();\r\n\r\n\t\t\twhile(!this.isDateVisible(date) && ((dir > 0 && date.valueOf() <= range.max_date.valueOf()) || (dir < 0 && date.valueOf() >= range.min_date.valueOf()))){\r\n\t\t\t\tdate = this.nextDateColumn(date, dir);\r\n\t\t\t}\r\n\r\n\t\t\treturn date;\r\n\t\t},\r\n\r\n\t\tnextDateColumn: function(start, dir){\r\n\t\t\tdir = dir || 1;\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[scheduler.getState().mode];\r\n\r\n\t\t\tvar date;\r\n\t\t\tif(timeline){\r\n\t\t\t\tdate = scheduler.date.add(start, dir * timeline.x_step, timeline.x_unit);\r\n\t\t\t}else{\r\n\t\t\t\tdate = scheduler.date.day_start(scheduler.date.add(start, dir, \"day\"));\r\n\t\t\t}\r\n\r\n\t\t\treturn date;\r\n\t\t},\r\n\r\n\t\tisVisible:function(from, to){\r\n\t\t\tif(!scheduler._ignores_detected)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tvar current = new Date(from);\r\n\r\n\t\t\twhile(current.valueOf() < to.valueOf()){\r\n\t\t\t\tif(this.isDateVisible(current)) return true;\r\n\t\t\t\tcurrent = this.nextDateColumn(current);\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t},\r\n\r\n\t\tnextSlot: function(slot, dir, view, extend){\r\n\t\t\tvar next;\r\n\t\t\tview = view || this._getMode();\r\n\r\n\t\t\tvar tempSlot = scheduler.$keyboardNavigation.TimeSlot.prototype.clone(slot);\r\n\r\n\t\t\tswitch (view){\r\n\t\t\t\tcase this._modes.units:\r\n\t\t\t\t\tnext = this.nextUnitsSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.timeline:\r\n\t\t\t\t\tnext = this.nextTimelineSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.year:\r\n\t\t\t\t\tnext = this.nextMonthSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.month:\r\n\t\t\t\t\tnext = this.nextMonthSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.weekAgenda:\r\n\t\t\t\t\tnext = this.nextWeekAgendaSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.list:\r\n\t\t\t\t\tnext = this.nextAgendaSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.dayColumns:\r\n\t\t\t\t\tnext = this.nextDaySlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(next.start_date.valueOf() >= next.end_date.valueOf()){\r\n\t\t\t\tnext = this.nextSlot(next, dir, view);\r\n\t\t\t}\r\n\r\n\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(next);\r\n\r\n\t\t},\r\n\r\n\t\textendSlot: function(slot, dir){\r\n\t\t\tvar view = this._getMode();\r\n\t\t\tvar next;\r\n\t\t\tswitch (view){\r\n\t\t\t\tcase this._modes.units:\r\n\t\t\t\t\tif(dir == \"left\" || dir == \"right\"){\r\n\t\t\t\t\t\tnext = this.nextUnitsSlot(slot, dir);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnext = this.extendUnitsSlot(slot, dir);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.timeline:\r\n\t\t\t\t\tif(dir == \"down\" || dir == \"up\"){\r\n\t\t\t\t\t\tnext = this.nextTimelineSlot(slot, dir);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnext = this.extendTimelineSlot(slot, dir);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.year:\r\n\t\t\t\t\tnext = this.extendMonthSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.month:\r\n\t\t\t\t\tnext = this.extendMonthSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.dayColumns:\r\n\t\t\t\t\tnext = this.extendDaySlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.weekAgenda:\r\n\t\t\t\t\tnext = this.extendWeekAgendaSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnext = slot;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tvar range = scheduler.getState();\r\n\t\t\tif(next.start_date.valueOf() < range.min_date.valueOf()){\r\n\t\t\t\tnext.start_date = this.findVisibleColumn(range.min_date);\r\n\t\t\t\tnext.start_date.setHours(scheduler.config.first_hour);\r\n\t\t\t}\r\n\r\n\t\t\tif(next.end_date.valueOf() > range.max_date.valueOf()){\r\n\t\t\t//\tnext.end_date = new Date(slot.end_date);\r\n\t\t\t\tnext.end_date = this.findVisibleColumn(range.max_date, -1);\r\n\t\t\t}\r\n\r\n\r\n\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(next);\r\n\t\t},\r\n\r\n\t\textendTimelineSlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"timeline\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\textendWeekAgendaSlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"weekAgenda\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\textendGenericSlot: function(allowedDirections, slot, direction, type){\r\n\t\t\tvar next;\r\n\t\t\tvar moveDate = slot.movingDate;\r\n\r\n\t\t\tif(!moveDate){\r\n\t\t\t\tmoveDate = allowedDirections[direction];\r\n\t\t\t}\r\n\r\n\t\t\tif(!moveDate || !allowedDirections[direction]){\r\n\t\t\t\treturn slot;\r\n\t\t\t}\r\n\r\n\t\t\tif(direction){\r\n\t\t\t\tnext = this.nextSlot({start_date: slot[moveDate], section: slot.section}, direction, type, true);\r\n\r\n\t\t\t\tif(next.start_date.valueOf() == slot.start_date.valueOf()){\r\n\t\t\t\t\tnext = this.nextSlot({start_date: next.start_date, section:next.section}, direction, type, true);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tnext.movingDate = moveDate;\r\n\t\t\t}else{\r\n\t\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(slot);\r\n\t\t\t}\r\n\r\n\t\t\tvar newDates = this.extendSlotDates(slot, next, next.movingDate);\r\n\r\n\t\t\tif(newDates.end_date.valueOf() <= newDates.start_date.valueOf()){\r\n\t\t\t\tnext.movingDate = next.movingDate == \"end_date\" ? \"start_date\" : \"end_date\";\r\n\t\t\t}\r\n\t\t\tnewDates = this.extendSlotDates(slot, next, next.movingDate);\r\n\r\n\t\t\tnext.start_date = newDates.start_date;\r\n\t\t\tnext.end_date = newDates.end_date;\r\n\t\t\treturn next;\r\n\t\t},\r\n\r\n\t\textendSlotDates: function(oldSlot, newSlot, dateDirection){\r\n\t\t\tvar res = {start_date:null, end_date:null};\r\n\r\n\t\t\tif(dateDirection == \"start_date\"){\r\n\t\t\t\tres.start_date = newSlot.start_date;\r\n\t\t\t\tres.end_date = oldSlot.end_date;\r\n\t\t\t}else{\r\n\t\t\t\tres.start_date = oldSlot.start_date;\r\n\t\t\t\tres.end_date = newSlot.start_date;\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\r\n\t\t},\r\n\r\n\t\textendMonthSlot: function(slot, direction){\r\n\t\t\tvar slot = this.extendGenericSlot({\r\n\t\t\t\t\t\"up\":\"start_date\",\r\n\t\t\t\t\t\"down\":\"end_date\",\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"month\"\r\n\t\t\t);\r\n\r\n\t\t\tslot.start_date.setHours(scheduler.config.first_hour);\r\n\t\t\tslot.end_date = scheduler.date.add(slot.end_date, -1, \"day\");\r\n\t\t\tslot.end_date.setHours(scheduler.config.last_hour);\r\n\t\t\treturn slot;\r\n\t\t},\r\n\r\n\t\textendUnitsSlot: function(slot, direction){\r\n\t\t\tvar next;\r\n\r\n\t\t\tswitch (direction){\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tnext = this.extendDaySlot(slot, direction);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnext = slot;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tnext.section = slot.section;\r\n\t\t\treturn next;\r\n\t\t},\r\n\t\textendDaySlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\t\"up\":\"start_date\",\r\n\t\t\t\t\t\"down\":\"end_date\",\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"dayColumns\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\tscrollSlot: function(dir){\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tvar slot = this.nextSlot(this, dir);\r\n\t\t\tif(slot.start_date.valueOf() < state.min_date.valueOf() || slot.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tscheduler.setCurrentView(new Date(slot.start_date));\r\n\t\t\t}\r\n\r\n\t\t\tthis.moveTo(slot);\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tthis.scrollSlot(\"left\");\r\n\t\t\t},\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tthis.scrollSlot(\"right\");\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\r\n\t\t\t\tvar mode = this._getMode();\r\n\t\t\t\tif(mode == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.scrollSlot(\"down\");\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"up\": function () {\r\n\t\t\t\tvar mode = this._getMode();\r\n\t\t\t\tif(mode == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.scrollSlot(\"up\");\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"shift+down\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"down\"));\r\n\t\t\t},\r\n\t\t\t\"shift+up\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"up\"));\r\n\t\t\t},\r\n\t\t\t\"shift+right\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"right\"));\r\n\t\t\t},\r\n\t\t\t\"shift+left\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"left\"));\r\n\t\t\t},\r\n\r\n\r\n\t\t\t\"enter\": function(){\r\n\t\t\t\tvar obj = {start_date: new Date(this.start_date), end_date: new Date(this.end_date)};\r\n\r\n\t\t\t\tvar mode = scheduler.getState().mode;\r\n\t\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\r\n\t\t\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\t\t\tobj[timeline.y_property] = this.section;\r\n\t\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\t\tvar unit = scheduler._props[mode];\r\n\t\t\t\t\tobj[unit.map_to] = this.section;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler.addEventNow(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.TimeSlot.prototype.bindAll(scheduler.$keyboardNavigation.TimeSlot.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.MinicalButton = function(div, index){\r\n\tthis.container = div;\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.MinicalButton.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar container = this.container;\r\n\t\t\treturn !!container.offsetWidth;// valid if container is visible\r\n\t\t},\r\n\r\n\t\tfallback: function(){\r\n\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(defaultSlot.isValid()){\r\n\t\t\t\treturn defaultSlot;\r\n\t\t\t}else{\r\n\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t}\r\n\t\t},\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.globalNode.disable();\r\n\t\t\tthis.container.removeAttribute(\"tabindex\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tthis.container.setAttribute(\"tabindex\", \"0\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\tif(!this.index){\r\n\t\t\t\treturn this.container.querySelector(\".dhx_cal_prev_button\");\r\n\t\t\t}else{\r\n\t\t\t\treturn this.container.querySelector(\".dhx_cal_next_button\");\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"right\": function(e){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, this.index ? 0 : 1));\r\n\t\t\t},\r\n\t\t\t\"left\": function(e){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, this.index ? 0 : 1));\r\n\t\t\t},\r\n\t\t\t\"down\": function(){\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, 0, 0);\r\n\t\t\t\tif(next && !next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"enter\": function(e){\r\n\t\t\t\tthis.getNode().click();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.MinicalButton.prototype.bindAll(scheduler.$keyboardNavigation.MinicalButton.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.MinicalCell = function(div, row, col){\r\n\tthis.container = div;\r\n\tthis.row = row || 0;\r\n\tthis.col = col || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.MinicalCell.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar grid = this._getGrid();\r\n\t\t\treturn !!(grid[this.row] && grid[this.row][this.col]);\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\tvar row = this.row;\r\n\t\t\tvar col = this.col;\r\n\t\t\tvar grid = this._getGrid();\r\n\t\t\tif(!grid[row]){\r\n\t\t\t\trow = 0;\r\n\t\t\t}\r\n\t\t\tvar dir = true;\r\n\t\t\tif(row > grid.length / 2){\r\n\t\t\t\tdir = false;\r\n\t\t\t}\r\n\r\n\t\t\tif(!grid[row]){\r\n\t\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t\tif(defaultSlot.isValid()){\r\n\t\t\t\t\treturn defaultSlot;\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(dir){\r\n\t\t\t\tfor(var c = col; grid[row] && c < grid[row].length; c++){\r\n\t\t\t\t\tif(!grid[row][c] && c == grid[row].length - 1){\r\n\t\t\t\t\t\trow++;\r\n\t\t\t\t\t\tcol = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(grid[row][c]){\r\n\t\t\t\t\t\treturn new scheduler.$keyboardNavigation.MinicalCell(this.container, row, c);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tfor(var c = col; grid[row] && c < grid[row].length; c--){\r\n\t\t\t\t\tif(!grid[row][c] && !c){\r\n\t\t\t\t\t\trow--;\r\n\t\t\t\t\t\tcol = grid[row].length - 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(grid[row][c]){\r\n\t\t\t\t\t\treturn new scheduler.$keyboardNavigation.MinicalCell(this.container, row, c);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn new scheduler.$keyboardNavigation.MinicalButton(this.container, 0);\r\n\t\t},\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.globalNode.disable();\r\n\r\n\t\t\tthis.container.removeAttribute(\"tabindex\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tthis.container.setAttribute(\"tabindex\", \"0\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\t\t_getNode: function(row, col){\r\n\t\t\treturn this.container.querySelector(\".dhx_year_body tr:nth-child(\"+(row + 1) + \") td:nth-child(\"+(col + 1)+\")\");\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\treturn this._getNode(this.row, this.col);\r\n\t\t},\r\n\r\n\t\t_getGrid: function(){\r\n\t\t\tvar rows = this.container.querySelectorAll(\".dhx_year_body tr\");\r\n\t\t\tvar grid = [];\r\n\t\t\tfor(var i = 0; i < rows.length; i++){\r\n\t\t\t\tgrid[i] = [];\r\n\t\t\t\tvar row = rows[i];\r\n\t\t\t\tvar cells = row.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var c = 0; c < cells.length; c++){\r\n\t\t\t\t\tvar cell = cells[c];\r\n\t\t\t\t\tvar enabled = true;\r\n\t\t\t\t\tvar css = scheduler._getClassName(cell);\r\n\t\t\t\t\tif(css.indexOf(\"dhx_after\") > -1 || css.indexOf(\"dhx_before\") > -1 || css.indexOf(\"dhx_scale_ignore\") > -1){\r\n\t\t\t\t\t\tenabled = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tgrid[i][c] = enabled;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn grid;\r\n\t\t},\r\n\r\n\r\n\t\tkeys: {\r\n\t\t\t\"right\": function(e){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row;\r\n\t\t\t\tvar newCol = this.col + 1;\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tif(grid[newRow + 1]){\r\n\t\t\t\t\t\tnewRow = newRow + 1;\r\n\t\t\t\t\t\tnewCol = 0;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnewCol = this.col;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"left\": function(e){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row;\r\n\t\t\t\tvar newCol = this.col - 1;\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tif(grid[newRow - 1]){\r\n\t\t\t\t\t\tnewRow = newRow - 1;\r\n\t\t\t\t\t\tnewCol = grid[newRow].length - 1;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnewCol = this.col;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"down\": function(){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row + 1;\r\n\t\t\t\tvar newCol = this.col;\r\n\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tnewRow = this.row;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"up\": function(){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row - 1;\r\n\t\t\t\tvar newCol = this.col;\r\n\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tvar index = 0;\r\n\t\t\t\t\tif(this.col > grid[this.row].length / 2){\r\n\t\t\t\t\t\tindex = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, index));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.moveTo(next);\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\t\t\t\"enter\": function(e){\r\n\t\t\t\tthis.getNode().querySelector(\".dhx_month_head\").click();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.MinicalCell.prototype.bindAll(scheduler.$keyboardNavigation.MinicalCell.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.DataArea = function(index){\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.DataArea.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\tgetNode: function(index){\r\n\t\t\treturn scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t},\r\n\r\n\t\t_handlers:null,\r\n\r\n\t\tisValid: function(){\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tfallback:function(){\r\n\t\t\treturn this;\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"up,down,right,left\":function(){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.DataArea.prototype.bindAll(scheduler.$keyboardNavigation.DataArea.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.dispatcher = {\r\n\tisActive: false,\r\n\tactiveNode: null,\r\n\tglobalNode: new scheduler.$keyboardNavigation.SchedulerNode(),\r\n\r\n\tkeepScrollPosition: function (callback) {\r\n\t\tvar top, left;\r\n\r\n\t\tvar scrollable = scheduler.$container.querySelector(\".dhx_timeline_scrollable_data\");\r\n\t\tif(!scrollable){\r\n\t\t\tscrollable = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t}\r\n\r\n\t\tif(scrollable){\r\n\t\t\ttop = scrollable.scrollTop;\r\n\t\t\tleft = scrollable.scrollLeft;\r\n\t\t}\r\n\r\n\t\tcallback();\r\n\r\n\t\tif(scrollable){\r\n\t\t\tscrollable.scrollTop = top;\r\n\t\t\tscrollable.scrollLeft = left;\r\n\t\t}\r\n\t},\r\n\tenable: function(){\r\n\t\tif(!scheduler.$container){\r\n\t\t\t// do nothing if not initialized\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.isActive = true;\r\n\t\tvar self = this;\r\n\t\tthis.keepScrollPosition(function () {\r\n\t\t\tself.globalNode.enable();\r\n\t\t\tself.setActiveNode(self.getActiveNode());\r\n\t\t});\r\n\t},\r\n\r\n\tdisable: function(){\r\n\t\tthis.isActive = false;\r\n\t\tthis.globalNode.disable();\r\n\t},\r\n\r\n\tisEnabled: function(){\r\n\t\treturn !!this.isActive;\r\n\t},\r\n\r\n\tgetDefaultNode: function(){\r\n\t\treturn this.globalNode.getDefaultNode();\r\n\t},\r\n\r\n\tsetDefaultNode: function() {\r\n\t\tthis.setActiveNode(this.getDefaultNode());\r\n\t},\r\n\r\n\tgetActiveNode: function(){\r\n\t\tvar node = this.activeNode;\r\n\t\tif(node && !node.isValid()){\r\n\t\t\tnode = node.fallback();\r\n\t\t}\r\n\t\treturn node;\r\n\t},\r\n\r\n\tfocusGlobalNode: function(){\r\n\t\tthis.blurNode(this.globalNode);\r\n\t\tthis.focusNode(this.globalNode);\r\n\t},\r\n\r\n\tsetActiveNode: function(el){\r\n\t\tif(!el || !el.isValid())\r\n\t\t\treturn;\r\n\r\n\t\tif(this.activeNode){\r\n\t\t\tif(this.activeNode.compareTo(el)){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(this.isEnabled()){\r\n\t\t\tthis.blurNode(this.activeNode);\r\n\t\t\tthis.activeNode = el;\r\n\t\t\tthis.focusNode(this.activeNode);\r\n\t\t}\r\n\t},\r\n\r\n\tfocusNode: function(el){\r\n\t\tif(el && el.focus){\r\n\t\t\tel.focus();\r\n\t\t\tif(el.getNode && document.activeElement != el.getNode()){\r\n\t\t\t\tthis.setActiveNode(new scheduler.$keyboardNavigation.DataArea());\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tblurNode: function(el){\r\n\t\tif(el && el.blur){\r\n\t\t\tel.blur();\r\n\t\t}\r\n\t},\r\n\r\n\tgetInlineEditor: function(id){\r\n\t\tvar editor = scheduler.$container.querySelector(\".dhx_cal_editor[\"+scheduler.config.event_attribute+\"='\"+id+\"'] textarea\");\r\n\t\tif(editor && editor.offsetWidth){\r\n\t\t\t// if exists and visible\r\n\t\t\treturn editor;\r\n\t\t}\r\n\t\treturn null;\r\n\t},\r\n\r\n\tkeyDownHandler: function (e) {\r\n\r\n\t\tif(e.defaultPrevented){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar activeElement = this.getActiveNode();\r\n\r\n\t\tif(scheduler.$keyboardNavigation.isModal() &&\r\n\t\t\t!(activeElement && activeElement.container && scheduler.utils.dom.locateCss({target:activeElement.container}, \"dhx_minical_popup\", false)))\r\n\t\t\treturn;\r\n\r\n\t\tif(scheduler.getState().editor_id && this.getInlineEditor(scheduler.getState().editor_id))\r\n\t\t\treturn;\r\n\r\n\t\tif (!this.isEnabled())\r\n\t\t\treturn;\r\n\r\n\t\te = e || window.event;\r\n\r\n\t\tvar schedulerNode = this.globalNode;\r\n\r\n\t\tvar command = scheduler.$keyboardNavigation.shortcuts.getCommandFromEvent(e);\r\n\r\n\t\tif(!activeElement){\r\n\t\t\tthis.setDefaultNode();\r\n\t\t}else if(activeElement.findHandler(command)){\r\n\t\t\tactiveElement.doAction(command, e);\r\n\t\t}else if(schedulerNode.findHandler(command)){\r\n\t\t\tschedulerNode.doAction(command, e);\r\n\t\t}\r\n\r\n\t},\r\n\r\n\t_timeout: null,\r\n\tdelay: function(callback, delay){\r\n\r\n\t\tclearTimeout(this._timeout);\r\n\t\tthis._timeout = setTimeout(callback, delay || 1);\r\n\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation._minicalendars = [];\r\n\r\nscheduler.$keyboardNavigation.isMinical = function(node){\r\n\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\tif(this.isChildOf(node, minicalendars[i]))\r\n\t\t\treturn true;\r\n\t}\r\n\treturn false;\r\n};\r\n\r\nscheduler.$keyboardNavigation.isChildOf = function(child, parent){\r\n\twhile(child && child !== parent){\r\n\t\tchild = child.parentNode;\r\n\t}\r\n\r\n\treturn !!(child === parent);\r\n};\r\n\r\nscheduler.$keyboardNavigation.patchMinicalendar = function(){\r\n\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\tfunction focusMinical(e){\r\n\t\tvar target = e.target;\r\n\r\n\t\tdispatcher.enable();\r\n\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.MinicalButton(target, 0));\r\n\t}\r\n\r\n\tfunction minicalClick(e){\r\n\t\tvar target = e.target || e.srcElement;\r\n\r\n\t\tvar prev = scheduler.utils.dom.locateCss(e, \"dhx_cal_prev_button\", false);\r\n\t\tvar next = scheduler.utils.dom.locateCss(e, \"dhx_cal_next_button\", false);\r\n\t\tvar cell = scheduler.utils.dom.locateCss(e, \"dhx_year_body\", false);\r\n\r\n\t\tvar rowIndex = 0;\r\n\t\tvar cellIndex = 0;\r\n\t\tif(cell){\r\n\t\t\tvar tr;\r\n\t\t\tvar td;\r\n\t\t\tvar current = target;\r\n\t\t\twhile(current && current.tagName.toLowerCase() != \"td\"){\r\n\t\t\t\tcurrent = current.parentNode;\r\n\t\t\t}\r\n\t\t\tif(current){\r\n\t\t\t\ttd = current;\r\n\t\t\t\ttr = td.parentNode;\r\n\t\t\t}\r\n\r\n\t\t\tif(tr && td){\r\n\t\t\t\tvar rows = tr.parentNode.querySelectorAll(\"tr\");\r\n\t\t\t\tfor(var i = 0; i < rows.length; i++){\r\n\t\t\t\t\tif(rows[i] == tr){\r\n\t\t\t\t\t\trowIndex = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tvar cells = tr.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\t\t\tif(cells[i] == td){\r\n\t\t\t\t\t\tcellIndex = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar root = e.currentTarget;\r\n\t\tdispatcher.delay(function(){\r\n\t\t\tif(prev || next || cell){\r\n\r\n\t\t\t\tvar element;\r\n\t\t\t\tif(prev){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalButton(root, 0);\r\n\t\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.MinicalButton(root, 0));\r\n\t\t\t\t}else if(next){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalButton(root, 1);\r\n\t\t\t\t}else if(cell){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalCell(root, rowIndex, cellIndex);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(element){\r\n\r\n\t\t\t\t\tdispatcher.enable();\r\n\t\t\t\t\tif(element.isValid()){\r\n\t\t\t\t\t\tdispatcher.activeNode = null;\r\n\t\t\t\t\t\tdispatcher.setActiveNode(element);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t}\r\n\r\n\tif(scheduler.renderCalendar){\r\n\t\tvar renderMinical = scheduler.renderCalendar;\r\n\t\tscheduler.renderCalendar = function(){\r\n\t\t\tvar cal = renderMinical.apply(this, arguments);\r\n\t\t\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\r\n\t\t\tscheduler.eventRemove(cal, \"click\", minicalClick);\r\n\t\t\tscheduler.event(cal, \"click\", minicalClick);\r\n\r\n\t\t\tscheduler.eventRemove(cal, \"focus\", focusMinical);\r\n\t\t\tscheduler.event(cal, \"focus\", focusMinical);\r\n\r\n\t\t\tvar added = false;\r\n\t\t\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\t\t\tif(minicalendars[i] == cal){\r\n\t\t\t\t\tadded = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(!added)\r\n\t\t\t\tminicalendars.push(cal);\r\n\r\n\t\t\tif(dispatcher.isEnabled()){\r\n\t\t\t\tvar node = dispatcher.getActiveNode();\r\n\t\t\t\tif(node && node.container == cal){\r\n\t\t\t\t\tdispatcher.focusNode(node);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcal.setAttribute(\"tabindex\", \"0\");\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tcal.setAttribute(\"tabindex\", \"0\");\r\n\t\t\t}\r\n\t\t\treturn cal;\r\n\t\t};\r\n\t}\r\n\r\n\tif(scheduler.destroyCalendar){\r\n\t\tvar destroyMinical = scheduler.destroyCalendar;\r\n\t\tscheduler.destroyCalendar = function(cal, force){\r\n\t\t\tcal = cal || (scheduler._def_count ? scheduler._def_count.firstChild : null);\r\n\t\t\tvar res = destroyMinical.apply(this, arguments);\r\n\r\n\t\t\tif(!cal || !cal.parentNode){\r\n\t\t\t\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\t\t\t\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\t\t\t\tif(minicalendars[i] == cal){\r\n\t\t\t\t\t\tscheduler.eventRemove(minicalendars[i], \"focus\", focusMinical);\r\n\t\t\t\t\t\tminicalendars.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn res;\r\n\t\t};\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\r\n\tthis.layers.sort(function(a, b){\r\n\t\treturn a.zIndex - b.zIndex;\r\n\t});\r\n\r\n\tscheduler._dp_init=function(dp){\r\n\t\tdp._methods=[\"_set_event_text_style\",\"\",\"changeEventId\",\"deleteEvent\"];\r\n\r\n\t\tthis.attachEvent(\"onEventAdded\",function(id){\r\n\t\t\tif (!this._loading && this.validId(id) && this.getEvent(id) && this.getEvent(id).layer == dp.layer)\r\n\t\t\t\tdp.setUpdated(id,true,\"inserted\");\r\n\t\t});\r\n\t\tthis.attachEvent(\"onBeforeEventDelete\",function(id){\r\n\t\t\tif(this.getEvent(id) && this.getEvent(id).layer == dp.layer) {\r\n\t\t\t\tif (!this.validId(id)) return;\r\n\t\t\t\tvar z=dp.getState(id);\r\n\r\n\t\t\t\tif (z==\"inserted\" || this._new_event) { dp.setUpdated(id,false);\t\treturn true; }\r\n\t\t\t\tif (z==\"deleted\") return false;\r\n\t\t\t\tif (z==\"true_deleted\") return true;\r\n\r\n\t\t\t\tdp.setUpdated(id,true,\"deleted\");\r\n\t\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\telse return true;\r\n\t\t});\r\n\t\tthis.attachEvent(\"onEventChanged\",function(id){\r\n\t\t\tif (!this._loading && this.validId(id) && this.getEvent(id) && this.getEvent(id).layer == dp.layer)\r\n\t\t\t\tdp.setUpdated(id,true,\"updated\");\r\n\t\t});\r\n\r\n\t\tdp._getRowData=function(id,pref){\r\n\t\t\tvar ev=this.obj.getEvent(id);\r\n\t\t\tvar data = {};\r\n\r\n\t\t\tfor (var a in ev){\r\n\t\t\t\tif (a.indexOf(\"_\")===0) continue;\r\n\t\t\t\tif (ev[a] && ev[a].getUTCFullYear) //not very good, but will work\r\n\t\t\t\t\tdata[a] = this.obj._helpers.formatDate(ev[a]);\r\n\t\t\t\telse\r\n\t\t\t\t\tdata[a] = ev[a];\r\n\t\t\t}\r\n\t\t\treturn data;\r\n\t\t};\r\n\t\tdp._clearUpdateFlag=function(){};\r\n\r\n\t\tdp.attachEvent(\"insertCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"updateCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"deleteCallback\", function(upd, id) {\r\n\t\t\tthis.obj.setUserData(id, this.action_param, \"true_deleted\");\r\n\t\t\tthis.obj.deleteEvent(id);\r\n\t\t});\r\n\t};\r\n\r\n\t(function() {\r\n var _cloneObj = function(obj){\r\n if(obj === null || typeof(obj) != 'object')\r\n return obj;\r\n var temp = new obj.constructor();\r\n for(var key in obj)\r\n temp[key] = _cloneObj(obj[key]);\r\n return temp;\r\n };\r\n\r\n\t\tscheduler._dataprocessors = [];\r\n\t\tscheduler._layers_zindex = {};\r\n\t\tfor(var i=0; i= scheduler.config.collision_limit);\r\n\t});\r\n\r\n\tscheduler.addEvent=function(start_date,end_date,text,id,extra_data){\r\n\t\tvar ev=start_date;\r\n\t\tif (arguments.length!=1){\r\n\t\t\tev=extra_data||{};\r\n\t\t\tev.start_date=start_date;\r\n\t\t\tev.end_date=end_date;\r\n\t\t\tev.text=text;\r\n\t\t\tev.id=id;\r\n\t\t\tev.layer = this.defaultLayer;\r\n\t\t}\r\n\t\tev.id = ev.id||scheduler.uid();\r\n\t\tev.text = ev.text||\"\";\r\n\r\n\r\n\t\tif (typeof ev.start_date == \"string\") ev.start_date=this.templates.api_date(ev.start_date);\r\n\t\tif (typeof ev.end_date == \"string\") ev.end_date=this.templates.api_date(ev.end_date);\r\n\t\tev._timed=this.isOneDayEvent(ev);\r\n\r\n\t\tvar is_new=!this._events[ev.id];\r\n\t\tthis._events[ev.id]=ev;\r\n\t\tthis.event_updated(ev);\r\n\t\tif (!this._loading)\r\n\t\t\tthis.callEvent(is_new?\"onEventAdded\":\"onEventChanged\",[ev.id,ev]);\r\n\t};\r\n\r\n\tthis._evs_layer = {};\r\n\tfor (var i = 0; i < this.layers.length; i++) { // array in object for each layer\r\n\t\tthis._evs_layer[this.layers[i].name] = [];\r\n\t}\r\n\r\n\tscheduler.addEventNow=function(start,end,e){\r\n\t\tvar base = {};\r\n\t\tif (typeof start == \"object\"){\r\n\t\t\tbase = start;\r\n\t\t\tstart = null;\r\n\t\t}\r\n\r\n\t\tvar d = (this.config.event_duration||this.config.time_step)*60000;\r\n\t\tif (!start) start = Math.round((scheduler._currentDate()).valueOf()/d)*d;\r\n\t\tvar start_date = new Date(start);\r\n\t\tif (!end){\r\n\t\t\tvar start_hour = this.config.first_hour;\r\n\t\t\tif (start_hour > start_date.getHours()){\r\n\t\t\t\tstart_date.setHours(start_hour);\r\n\t\t\t\tstart = start_date.valueOf();\r\n\t\t\t}\r\n\t\t\tend = start+d;\r\n\t\t}\r\n\r\n\r\n\t\tbase.start_date = base.start_date||start_date;\r\n\t\tbase.end_date = base.end_date||new Date(end);\r\n\t\tbase.text = base.text||this.locale.labels.new_event;\r\n\t\tbase.id = this._drag_id = this.uid();\r\n\t\tbase.layer = this.defaultLayer;\r\n\t\tthis._drag_mode=\"new-size\";\r\n\r\n\t\tthis._loading=true;\r\n\t\tthis.addEvent(base);\r\n\t\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\t\tthis._loading=false;\r\n\r\n\t\tthis._drag_event={}; //dummy , to trigger correct event updating logic\r\n\t\tthis._on_mouse_up(e);\r\n\t};\r\n\r\n\tscheduler._t_render_view_data = function(events) { // helper\r\n\t\tif (this.config.multi_day && !this._table_view) {\r\n\t\t\tvar tvs = [];\r\n\t\t\tvar tvd = [];\r\n\t\t\tfor (var k = 0; k < events.length; k++) {\r\n\t\t\t\tif (events[k]._timed)\r\n\t\t\t\t\ttvs.push(events[k]);\r\n\t\t\t\telse\r\n\t\t\t\t\ttvd.push(events[k]);\r\n\t\t\t}\r\n\t\t\tthis._table_view = true;\r\n\t\t\tthis.render_data(tvd);\r\n\t\t\tthis._table_view = false;\r\n\t\t\tthis.render_data(tvs);\r\n\t\t}\r\n\t\telse\r\n\t\t\tthis.render_data(events);\r\n\t};\r\n\r\n\tscheduler.render_view_data = function(){\r\n\t\tif (this._not_render) {\r\n\t\t\tthis._render_wait = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._render_wait = false;\r\n\r\n\t\tthis.clear_view();\r\n\r\n\t\tthis._evs_layer = {};\r\n\t\tfor (var i = 0; i < this.layers.length; i++) { // array in object for each layer\r\n\t\t\tthis._evs_layer[this.layers[i].name] = [];\r\n\t\t}\r\n\r\n\t\tvar evs = this.get_visible_events();\r\n\t\tfor (var i = 0; i < evs.length; i++) { // filling layer arrays with events\r\n\t\t\tif(this._evs_layer[evs[i].layer])\r\n\t\t\t\tthis._evs_layer[evs[i].layer].push(evs[i]);\r\n\t\t}\r\n\r\n\t\tif(this._mode == 'month') { // old logic is used\r\n\t\t\tvar tevs = [];\r\n\t\t\tfor (var i = 0; i < this.layers.length; i++) {\r\n\t\t\t\tif (this.layers[i].visible)\r\n\t\t\t\t\ttevs = tevs.concat(this._evs_layer[this.layers[i].name]);\r\n\t\t\t}\r\n\t\t\tthis._t_render_view_data(tevs);\r\n\t\t}\r\n\t\telse { // week, day; should use new logic\r\n\t\t\tfor (var i = 0; i < this.layers.length; i++) {\r\n\t\t\t\tif (this.layers[i].visible) {\r\n\t\t\t\t\tvar evs_layer = this._evs_layer[this.layers[i].name];\r\n\t\t\t\t\tthis._t_render_view_data(evs_layer);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._render_v_bar=function(ev,x,y,w,h,style,contentA,contentB,bottom){\r\n\t\tvar id = ev.id;\r\n\r\n\t\tif(contentA.indexOf('
';\r\n\t\thtml+='
 
';\r\n\t\thtml+='
'+contentA+'
';\r\n\t\thtml+='
'+contentB+'
';\r\n\t\thtml+='
';\r\n\r\n\t\td.innerHTML=html;\r\n\t\td.style.zIndex = 100;\r\n\t\treturn d.firstChild;\r\n\t};\r\n\r\n\tscheduler.render_event_bar=function(ev){\r\n\t\tvar parent=this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tvar x=this._colsS[ev._sday];\r\n\t\tvar x2=this._colsS[ev._eday];\r\n\t\tif (x2==x) x2=this._colsS[ev._eday+1];\r\n\t\tvar hb = this.xy.bar_height;\r\n\r\n\t\tvar y=this._colsS.heights[ev._sweek]+(this._colsS.height?(this.xy.month_scale_height+2):2)+ev._sorder*hb;\r\n\r\n\t\tvar d=document.createElement(\"div\");\r\n\t\tvar cs = ev._timed?\"dhx_cal_event_clear\":\"dhx_cal_event_line\";\r\n\t\tvar cse = (scheduler.templates['event_class_'+ev.layer])?scheduler.templates['event_class_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_class(ev.start_date,ev.end_date,ev);\r\n\t\tif (cse) cs=cs+\" \"+cse;\r\n\r\n\t\tvar html='
';\r\n\r\n\t\tif (ev._timed)\r\n\t\t\thtml+=(scheduler.templates['event_bar_date_'+ev.layer])?scheduler.templates['event_bar_date_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_bar_date(ev.start_date,ev.end_date,ev);\r\n\t\thtml+=( (scheduler.templates['event_bar_text_'+ev.layer])?scheduler.templates['event_bar_text_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_bar_text(ev.start_date,ev.end_date,ev) + '
)');\r\n\t\thtml+='';\r\n\r\n\t\td.innerHTML=html;\r\n\r\n\t\tthis._rendered.push(d.firstChild);\r\n\t\tparent.appendChild(d.firstChild);\r\n\t};\r\n\r\n\tscheduler.render_event=function(ev){\r\n\t\tvar menu = scheduler.xy.menu_width;\r\n\t\tif(scheduler.getLayer(ev.layer).noMenu)\r\n\t\t\tmenu = 0;\r\n\r\n\t\tif (ev._sday<0) return; //can occur in case of recurring event during time shift\r\n\t\tvar parent=scheduler.locate_holder(ev._sday);\r\n\t\tif (!parent) return; //attempt to render non-visible event\r\n\t\tvar sm = ev.start_date.getHours()*60+ev.start_date.getMinutes();\r\n\t\tvar em = (ev.end_date.getHours()*60+ev.end_date.getMinutes())||(scheduler.config.last_hour*60);\r\n\r\n\t\tvar top = (Math.round((sm*60*1000-this.config.first_hour*60*60*1000)*this.config.hour_size_px/(60*60*1000)))%(this.config.hour_size_px*24)+1; //42px/hour\r\n\t\tvar height = Math.max(scheduler.xy.min_event_height,(em-sm)*this.config.hour_size_px/60)+1; //42px/hour\r\n\t\t\r\n\t\tvar width=Math.floor((parent.clientWidth-menu)/ev._count);\r\n\t\tvar left=ev._sorder*width+1;\r\n\t\tif (!ev._inner) width=width*(ev._count-ev._sorder);\r\n\r\n\r\n\r\n\t\tvar d=this._render_v_bar(ev.id,menu+left,top,width,height,ev._text_style,scheduler.templates.event_header(ev.start_date,ev.end_date,ev),scheduler.templates.event_text(ev.start_date,ev.end_date,ev));\r\n\r\n\t\tthis._rendered.push(d);\r\n\t\tparent.appendChild(d);\r\n\r\n\t\tleft=left+parseInt(parent.style.left,10)+menu;\r\n\r\n\t\ttop+=this._dy_shift; //corrupt top, to include possible multi-day shift\r\n\t\td.style.zIndex = this._layers_zindex[ev.layer];\r\n\r\n\t\tif (this._edit_id==ev.id){\r\n\t\t\td.style.zIndex = parseInt(d.style.zIndex)+1; //fix overlapping issue\r\n\t\t\tvar new_zIndex = d.style.zIndex;\r\n\t\t\twidth=Math.max(width-4,scheduler.xy.editor_width);\r\n\t\t\tvar d=document.createElement(\"div\");\r\n\t\t\td.setAttribute(\"event_id\",ev.id); // for backward compatibility\r\n\t\t\td.setAttribute(this.config.event_attribute,ev.id);\r\n\t\t\tthis.set_xy(d,width,height-20,left,top+14);\r\n\t\t\td.className=\"dhx_cal_editor\";\r\n\t\t\td.style.zIndex = new_zIndex;\r\n\t\t\tvar d2=document.createElement(\"div\");\r\n\t\t\tthis.set_xy(d2,width-6,height-26);\r\n\t\t\td2.style.cssText+=\";margin:2px 2px 2px 2px;overflow:hidden;\";\r\n\r\n\r\n\t\t\td2.style.zIndex = new_zIndex;\r\n\t\t\td.appendChild(d2);\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].appendChild(d);\r\n\t\t\tthis._rendered.push(d);\r\n\r\n\t\t\td2.innerHTML=\"\";\r\n\r\n\t\t\tthis._editor=d2.firstChild;\r\n\t\t\tthis._editor.addEventListener(\"keypress\", function(e){\r\n\t\t\t\tif (e.shiftKey) return true;\r\n\t\t\t\tvar code= e.keyCode;\r\n\t\t\t\tif (code==scheduler.keys.edit_save) scheduler.editStop(true);\r\n\t\t\t\tif (code==scheduler.keys.edit_cancel) scheduler.editStop(false);\r\n\t\t\t});\r\n\t\t\tthis._editor.addEventListener(\"selectstart\", function(e){ e.cancelBubble=true; return true; });\r\n\t\t\td2.firstChild.focus();\r\n\t\t\t//IE and opera can add x-scroll during focusing\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].scrollLeft=0;\r\n\t\t\td2.firstChild.select();\r\n\t\t}\r\n\t\tif (this._select_id==ev.id){\r\n\t\t\td.style.zIndex = parseInt(d.style.zIndex)+1; //fix overlapping issue\r\n\t\t\tvar icons=this.config[\"icons_\"+((this._edit_id==ev.id)?\"edit\":\"select\")];\r\n\t\t\tvar icons_str=\"\";\r\n\t\t\tfor (var i=0; i\";\r\n\t\t\tvar obj = this._render_v_bar(ev.id,left-menu+1,top,menu,icons.length*20+26,\"\",\"
\",icons_str,true);\r\n\t\t\tobj.style.left=left-menu+1;\r\n\t\t\tobj.style.zIndex = d.style.zIndex;\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].appendChild(obj);\r\n\t\t\tthis._rendered.push(obj);\r\n\t\t}\r\n\r\n\t};\r\n\r\n scheduler.filter_agenda = function(id, event) {\r\n var layer = scheduler.getLayer(event.layer);\r\n return (layer && layer.visible);\r\n };\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.limit_start = null;\r\nscheduler.config.limit_end = null;\r\nscheduler.config.limit_view = false;\r\nscheduler.config.check_limits = true;\r\n\r\nscheduler._temp_limit_scope = function(){\r\n\tvar before = null;\r\n\tvar dhx_time_block = \"dhx_time_block\";\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\",function(om,od,nm,nd){\r\n\r\n\t\tfunction isBlocked(date, mode){\r\n\t\t\tvar limit_start = scheduler.config.limit_start,\r\n\t\t\t\tlimit_end = scheduler.config.limit_end,\r\n\t\t\t\tdate_end = scheduler.date.add(date,1,mode);\r\n\r\n\t\t\treturn (date.valueOf() > limit_end.valueOf() || date_end <= limit_start.valueOf());\r\n\t\t}\r\n\r\n\t\tif (scheduler.config.limit_view){\r\n\t\t\tnd = nd||od; nm = nm||om;\r\n\t\t\tif (isBlocked(nd, nm) && !(od.valueOf() == nd.valueOf())){\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar resetDate = !isBlocked(od, nm) ? od : scheduler.config.limit_start;\r\n\r\n\t\t\t\t\tscheduler.setCurrentView(!isBlocked(resetDate, nm) ? resetDate : null, nm);\r\n\t\t\t\t},1);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onMouseDown\", function(classname) {\r\n\t\treturn !(classname == dhx_time_block);\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeDrag\",function(id){\r\n\t\tif (!id) return true;\r\n\t\treturn scheduler.checkLimitViolation(scheduler.getEvent(id));\r\n\t});\r\n\tscheduler.attachEvent(\"onClick\", function (event_id, native_event_object){\r\n\t\treturn scheduler.checkLimitViolation(scheduler.getEvent(event_id));\r\n });\r\n\tscheduler.attachEvent(\"onBeforeLightbox\",function(id){\r\n\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tbefore = [ev.start_date, ev.end_date];\r\n\t\treturn scheduler.checkLimitViolation(ev);\r\n\t});\r\n\tscheduler.attachEvent(\"onEventSave\", function(id, data, is_new_event) {\r\n\r\n\t\t//lightbox may not have 'time' section\r\n\t\tif(!(data.start_date && data.end_date)){\r\n\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\tdata.start_date = new Date(ev.start_date);\r\n\t\t\tdata.end_date = new Date(ev.end_date);\r\n\t\t}\r\n\r\n\t\tif(data.rec_type){\r\n\t\t\t//_roll_back_dates modifies start_date of recurring event, need to check limits after modification\r\n\t\t\t// use a copy to keep original event unchanged\r\n\t\t\tvar data_copy = scheduler._lame_clone(data);\r\n\t\t\tscheduler._roll_back_dates(data_copy);\r\n\t\t\treturn scheduler.checkLimitViolation(data_copy);\r\n\t\t}\r\n\t\treturn scheduler.checkLimitViolation(data);\r\n\t});\r\n\tscheduler.attachEvent(\"onEventAdded\",function(id){\r\n\t\tif (!id) return true;\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif (!scheduler.checkLimitViolation(ev) && scheduler.config.limit_start && scheduler.config.limit_end) {\r\n\t\t\t//if newly created event is outside of limited time - crop it, leaving only allowed time\r\n\t\t\tif (ev.start_date < scheduler.config.limit_start) {\r\n\t\t\t\tev.start_date = new Date(scheduler.config.limit_start);\r\n\t\t\t}\r\n\t\t\tif (ev.start_date.valueOf() >= scheduler.config.limit_end.valueOf()) {\r\n\t\t\t\tev.start_date = this.date.add(scheduler.config.limit_end, -1, \"day\");\r\n\t\t\t}\r\n\t\t\tif (ev.end_date < scheduler.config.limit_start) {\r\n\t\t\t\tev.end_date = new Date(scheduler.config.limit_start);\r\n\t\t\t}\r\n\t\t\tif (ev.end_date.valueOf() >= scheduler.config.limit_end.valueOf()) {\r\n\t\t\t\tev.end_date = this.date.add(scheduler.config.limit_end, -1, \"day\");\r\n\t\t\t}\r\n\t\t\tif (ev.start_date.valueOf() >= ev.end_date.valueOf()) {\r\n\t\t\t\tev.end_date = this.date.add(ev.start_date, (this.config.event_duration||this.config.time_step), \"minute\");\r\n\t\t\t}\r\n\t\t\tev._timed=this.isOneDayEvent(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\",function(id){\r\n\t\tif (!id) return true;\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif (!scheduler.checkLimitViolation(ev)){\r\n\t\t\tif (!before) return false;\r\n\t\t\tev.start_date = before[0];\r\n\t\t\tev.end_date = before[1];\r\n\t\t\tev._timed=this.isOneDayEvent(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeEventChanged\",function(ev, native_object, is_new){\r\n\t\treturn scheduler.checkLimitViolation(ev);\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeEventCreated\", function(ev) { // native event\r\n\t\tvar start_date = scheduler.getActionData(ev).date;\r\n\t\tvar event = {\r\n\t\t\t_timed: true,\r\n\t\t\tstart_date: start_date,\r\n\t\t\tend_date: scheduler.date.add(start_date, scheduler.config.time_step, \"minute\")\r\n\t\t};\r\n\t\treturn scheduler.checkLimitViolation(event);\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", function(){\r\n\t\tscheduler._mark_now();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onAfterSchedulerResize\", function(){\r\n\t\twindow.setTimeout(function(){ \r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler._mark_now(); \r\n\t\t}, 1);\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\t\tscheduler._mark_now_timer = window.setInterval(function() {\r\n\t\t\tif(!scheduler._is_initialized())\r\n\t\t\t\treturn;\r\n\t\t\tscheduler._mark_now();\r\n\t\t}, 60000);\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tclearInterval(scheduler._mark_now_timer);\r\n\t});\r\n\r\n};\r\nscheduler._temp_limit_scope();\r\n\r\n\r\n}","import { GoogleMapAdapter } from \"./gMapAdapter\";\r\nimport { OpenStreetMapAdapter } from \"./osmMapAdapter\";\r\nimport { MapboxAdapter } from \"./mapboxAdapter\";\r\nimport { IMapAdapter, ICalendarEvent, IMapSettings } from \"./types\";\r\n\r\ndeclare let google: any;\r\n\r\nexport default function(scheduler: any){\r\n\t\r\nlet mapAdapter: IMapAdapter | null = null;\r\nlet eventHandlerIds: number[] = [];\r\nconst adapters: { [name:string]: IMapAdapter } = {\r\n\tgoogleMap: new GoogleMapAdapter(scheduler),\r\n\topenStreetMaps: new OpenStreetMapAdapter(scheduler),\r\n\tmapbox: new MapboxAdapter(scheduler)\r\n}\r\n\r\nif(!scheduler.ext){\r\n\tscheduler.ext = {};\r\n}\r\nscheduler.ext.mapView = {\r\n\tcreateAdapter: function():IMapAdapter{\r\n\t\treturn adapters[scheduler.config.map_view_provider];\r\n\t},\r\n\tcreateMarker: function(config){\r\n\t\treturn new google.maps.Marker(config);\r\n\t},\r\n\tcurrentAdapter: null,\r\n\tadapters\r\n};\r\nscheduler._latLngUpdate = false; // flag for updating events which don't have event.lat and event.lng\r\nscheduler._eventLocationChanged = false; // flag for checking if the location of the event is changed\r\nscheduler.config.map_view_provider = \"googleMap\";\r\nscheduler.config.map_settings = {\r\n\tinitial_position: {\r\n\t lat: 48.724,\r\n\t lng: 8.215\r\n\t},\r\n\terror_position: {\r\n\t lat: 15,\r\n\t lng: 15\r\n\t},\r\n\tinitial_zoom: 1,\r\n\tzoom_after_resolve: 15,\r\n\tinfo_window_max_width: 300,\r\n\tresolve_user_location: true,\r\n\tresolve_event_location: true,\r\n\tview_provider: \"googleMap\"\r\n}\r\nif (scheduler.config.map_initial_position) {\r\n\tscheduler.config.map_settings.initial_position = {\r\n\t\tlat: scheduler.config.map_initial_position.lat(),\r\n\t\tlng: scheduler.config.map_initial_position.lng(), \r\n\t};\r\n}\r\n\r\nif (scheduler.config.map_error_position) {\r\n\tscheduler.config.map_settings.error_position = {\r\n\t\tlat: scheduler.config.map_error_position.lat(),\r\n\t\tlng: scheduler.config.map_error_position.lng(), \r\n\t};\r\n}\r\n\r\nscheduler.xy.map_date_width = 188; // date column width\r\nscheduler.xy.map_icon_width = 25; // event details icon width\r\nscheduler.xy.map_description_width = 400; // description column width\r\nscheduler.date.add_map = function(date, inc, mode) {\r\n\treturn (new Date(date.valueOf()));\r\n};\r\nscheduler.templates.map_date = function(dd, ed, mode) {\r\n\treturn '';\r\n};\r\nscheduler.templates.map_time = function(start, end, ev) {\r\n\tif (scheduler.config.rtl && !ev._timed) {\r\n\t\treturn scheduler.templates.day_date(end) + \" – \" + scheduler.templates.day_date(start);\r\n\t} else if (ev._timed) {\r\n\t\treturn this.day_date(ev.start_date, ev.end_date, ev) + \" \" + this.event_date(start);\r\n\t} else {\r\n\t\treturn scheduler.templates.day_date(start) + \" – \" + scheduler.templates.day_date(end);\r\n\t}\r\n};\r\nscheduler.templates.map_text = function(start, end, ev) {\r\n\treturn ev.text;\r\n};\r\nscheduler.templates.map_info_content = function(event){\r\n return `
Event's text: ${event.text}\r\n\t\t\t\t
Location: ${event.event_location}
\r\n\t\t\t\t
Starts: ${scheduler.templates.tooltip_date_format(event.start_date)}
\r\n\t\t\t\t
Ends: ${scheduler.templates.tooltip_date_format(event.end_date)}
\r\n\t\t\t
`;\r\n};\r\nscheduler.date.map_start = function(d) {\r\n\treturn d;\r\n};\r\n\r\nfunction setupMapView(scheduler) {\r\n\t// Initialization logic, possibly including creation of a new mapAdapter\r\n\tmapAdapter = scheduler.ext.mapView.createAdapter();\r\n\tattachSchedulerEvents();\r\n}\r\nasync function addEventWithLocation(event: ICalendarEvent, mapAdapter: IMapAdapter){\r\n\tlet coordinates = await mapAdapter.resolveAddress(event.event_location);\r\n\tevent.lat = coordinates.lat;\r\n\tevent.lng = coordinates.lng;\r\n\tmapAdapter.removeEventMarker(String(event.id));\r\n\tmapAdapter.addEventMarker(event);\r\n\treturn event;\r\n}\r\nfunction setUserLocation(options: IMapSettings, adapter: IMapAdapter): void{\r\n\tif (options.resolve_user_location) {\r\n\t\tif (navigator.geolocation) {\r\n\t\t\tnavigator.geolocation.getCurrentPosition(function(position) {\r\n\t\t\t\tadapter.setView(position.coords.latitude, position.coords.longitude, options.zoom_after_resolve || options.initial_zoom);\r\n\t\t\t});\r\n\t\t}\r\n\t} else {\r\n\t\tadapter.setView(options.initial_position.lat, options.initial_position.lng, options.initial_zoom);\r\n\t}\r\n}\r\nscheduler.dblclick_dhx_map_area = function(e) {\r\n\tlet eventNode = e.target.closest(`[${scheduler.config.event_attribute}]`);\r\n\tif (eventNode){\r\n\t\tlet eventId = eventNode.getAttribute(`${scheduler.config.event_attribute}`);\r\n\t\tscheduler.showLightbox(eventId);\r\n\t}\r\n\tif (!this.config.readonly && this.config.dblclick_create && !eventNode) {\r\n\t\tthis.addEventNow({\r\n\t\t\tstart_date: scheduler.config.map_start,\r\n\t\t\tend_date: scheduler.date.add( scheduler.config.map_start, scheduler.config.time_step, \"minute\"),\r\n\t\t});\r\n\t}\t\r\n};\r\n\r\nfunction attachSchedulerEvents() { \r\n eventHandlerIds.push(\r\n\tscheduler.attachEvent(\"onEventSave\",function(id,ev,is_new){\r\n\t\tlet unmodifiedEvent = scheduler.getEvent(id);\r\n\t\tif (unmodifiedEvent && unmodifiedEvent.event_location != ev.event_location) {\r\n\t\t\tscheduler._eventLocationChanged = true;\r\n\t\t}\r\n\t\treturn true;\r\n\t}),\r\n scheduler.attachEvent(\"onEventChanged\", (id, event) => {\r\n\t\tconst {start_date, end_date} = event;\r\n\t\tconst {min_date, max_date} = scheduler.getState();\r\n\t\tif(start_date.valueOf() < max_date.valueOf() && end_date.valueOf() > min_date.valueOf()){\r\n\t\t\tif (mapAdapter) {\r\n\t\t\t\tif (scheduler.config.map_settings.resolve_event_location && event.event_location && !scheduler._latLngUpdate ) {\r\n\t\t\t\t \taddEventWithLocation(event, mapAdapter);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmapAdapter.updateEventMarker(event);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._latLngUpdate = false;\r\n\t\treturn true;\r\n }),\r\n\tscheduler.attachEvent(\"onEventIdChange\", function(old_id,new_id){\r\n\t\tlet newIdEvent = scheduler.getEvent(new_id);\r\n\t\tmapAdapter?.removeEventMarker(old_id);\r\n\t\tmapAdapter?.addEventMarker(newIdEvent);\r\n\t}),\r\n scheduler.attachEvent(\"onEventAdded\", (id, event) => {\r\n\t\tconst {start_date, end_date} = event;\r\n\t\tconst {min_date, max_date} = scheduler.getState();\r\n\t\tif(start_date.valueOf() < max_date.valueOf() && end_date.valueOf() > min_date.valueOf()){\r\n \t\tif (mapAdapter) {\r\n\t\t\t\tif (scheduler.config.map_settings.resolve_event_location && event.event_location && scheduler._eventLocationChanged) {\r\n\t\t\t\t\taddEventWithLocation(event, mapAdapter);\r\n\t\t\t\t\tscheduler._eventLocationChanged = false;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmapAdapter.addEventMarker(event);\r\n\t\t\t\t\tmapAdapter.onEventClick(event);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n }),\r\n scheduler.attachEvent(\"onClick\", function (id, e){\r\n\t\tconst event = scheduler.getEvent(id);\r\n\t\tif (mapAdapter && event) mapAdapter.onEventClick(event);\r\n\t\treturn false;\r\n }),\r\n scheduler.attachEvent(\"onBeforeEventDelete\", (id, event) => {\r\n\t\tif (mapAdapter) {\r\n\t\t\tmapAdapter.removeEventMarker(id);\r\n\t\t}\r\n\t\treturn true;\r\n })\r\n );\r\n}\r\nfunction detachSchedulerEvents() {\r\n\teventHandlerIds.forEach(id => scheduler.detachEvent(id));\r\n\teventHandlerIds = [];\r\n}\r\n\r\nscheduler.attachEvent(\"onSchedulerReady\", function() {\r\n\r\n\tif(scheduler.config.map_initial_zoom !== undefined){\r\n\t\tscheduler.config.map_settings.initial_zoom = scheduler.config.map_initial_zoom;\r\n\t}\r\n\tif(scheduler.config.map_zoom_after_resolve !== undefined){\r\n\t\tscheduler.config.map_settings.zoom_after_resolve = scheduler.config.map_zoom_after_resolve;\r\n\t}\r\n\tif(scheduler.config.map_infowindow_max_width !== undefined){\r\n\t\tscheduler.config.map_settings.info_window_max_width = scheduler.config.map_infowindow_max_width;\r\n\t}\r\n\tif(scheduler.config.map_resolve_user_location !== undefined){\r\n\t\tscheduler.config.map_settings.resolve_user_location = scheduler.config.map_resolve_user_location;\r\n\t}\r\n\tif(scheduler.config.map_view_provider !== undefined){\r\n\t\tscheduler.config.map_settings.view_provider = scheduler.config.map_view_provider;\r\n\t}\r\n\tif(scheduler.config.map_type !== undefined){\r\n\t\tscheduler.config.map_settings.type = scheduler.config.map_type;\r\n\t}\r\n\tif(scheduler.config.map_resolve_event_location !== undefined){\r\n\t\tscheduler.config.map_settings.resolve_event_location = scheduler.config.map_resolve_event_location;\r\n\t}\r\n\tscheduler.ext.mapView.currentAdapter = scheduler.config.map_view_provider;\r\n\r\n\tlet map = document.createElement('div');\r\n\tmap.className = 'mapContainer';\r\n\tmap.id = 'mapContainer';\r\n\tmap.style.display = \"none\";\r\n\tmap.style.zIndex = \"1\";\r\n\tscheduler._obj.appendChild(map);\r\n\r\n\tconst old = scheduler.render_data;\r\n\tscheduler.render_data = function(evs, hold) {\r\n\t\tif (this._mode == \"map\") {\r\n\t\t\tfill_map_tab();\r\n\t\t\tlet events = scheduler.get_visible_events();\r\n\t\t\tif (mapAdapter) {\r\n\t\t\t\tmapAdapter.clearEventMarkers();\r\n\t\t\t\tevents.forEach((event) => mapAdapter?.addEventMarker(event));\r\n\t\t\t}\r\n\t\t} else\r\n\t\t\treturn old.apply(this, arguments);\r\n\t};\r\n\r\n\tscheduler.map_view = function(mode) {\r\n\t\tscheduler._els.dhx_cal_data[0].style.width = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\tscheduler._min_date = scheduler.config.map_start || (scheduler._currentDate());\r\n\t\tscheduler._max_date = scheduler.config.map_end || scheduler.date.add(scheduler._currentDate(), 1, \"year\");\r\n\t\tscheduler._table_view = true;\r\n\t\tset_full_view(mode);\r\n\t\tlet mapContainer = document.getElementById('mapContainer');\r\n\t\t_setMapSize('mapContainer');\r\n\r\n\t\t// creating the new logic\r\n\t\tif (mode && mapContainer) {\r\n\t\t\tmap.style.display = 'block';\r\n\t\t\tfill_map_tab();\r\n\t\t\t// case to display several maps and has the opportunity to switch between them\r\n\t\t\tif (scheduler.config.map_view_provider == scheduler.ext.mapView.currentAdapter) {\r\n\t\t\t\tmapAdapter?.destroy(mapContainer);\r\n\t\t\t\tsetupMapView(scheduler);\r\n\t\t\t\tmapAdapter?.initialize(mapContainer, scheduler.config.map_settings);\r\n\t\t\t} else {\r\n\t\t\t\tmapAdapter?.destroy(mapContainer);\r\n\t\t\t\tsetupMapView(scheduler);\r\n\t\t\t\tmapAdapter?.initialize(mapContainer, scheduler.config.map_settings);\r\n\t\t\t \tscheduler.ext.mapView.currentAdapter = scheduler.config.map_view_provider;\r\n\t\t\t}\r\n\t\t\tif(mapAdapter) {\r\n\t\t\t\tsetUserLocation(scheduler.config.map_settings, mapAdapter);\r\n\t\t\t}\t\r\n\t\t} else {\r\n\t\t\tmap.style.display = 'none';\r\n\t\t\tscheduler._els.dhx_cal_data[0].style.width = \"100%\";\r\n\t\t \tif (mapAdapter && mapContainer ) {\r\n\t\t\t\tmapAdapter.destroy(mapContainer);\r\n\t\t\t\tmapAdapter = null;\r\n\t\t\t\tscheduler.ext.mapView.currentAdapter = scheduler.config.map_view_provider;\r\n\t\t }\r\n\t\t \tdetachSchedulerEvents();\r\n\t\t}\r\n\t};\r\n\r\n\tfunction _setMapSize(elem_id) { //input - map's div id\r\n\t\tlet map = document.getElementById(elem_id);\r\n\t\tif (map) {\r\n\t\t\tconst nav_height = scheduler.$container.querySelector(\".dhx_cal_navline\").offsetHeight;\r\n\t\t\tlet height = scheduler.$container.querySelector(\".dhx_cal_data\").offsetHeight + scheduler.$container.querySelector(\".dhx_cal_header\").offsetHeight;\r\n\t\t\tif (height < 0)\r\n\t\t\t\theight = 0;\r\n\t\t\tlet width = scheduler._x - scheduler.xy.map_date_width - scheduler.xy.map_description_width - 1;\r\n\t\t\tif (width < 0)\r\n\t\t\t\twidth = 0;\r\n\t\t\tmap.style.height = height + 'px';\r\n\t\t\tmap.style.width = width + 'px';\r\n\t\t\tmap.style.position = \"absolute\";\r\n\t\t\tmap.style.top = nav_height + \"px\";\r\n\t\t\tif (scheduler.config.rtl) {\r\n\t\t\t\tmap.style.marginRight = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\t\t} else {\r\n\t\t\t\tmap.style.marginLeft = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\t\t}\r\n\t\t\tmap.style.marginTop = (scheduler.xy.nav_height + 2) + 'px';\r\n\t\t}\r\n\t}\t\r\n\tfunction fill_map_tab() {\r\n\t\t//select events for which data need to be printed\r\n\t\tlet events = scheduler.get_visible_events();\r\n\t\tevents.sort(function(a, b) {\r\n\t\t\tif(a.start_date.valueOf()==b.start_date.valueOf())\r\n\t\t\t\treturn a.id>b.id?1:-1;\r\n\t\t\treturn a.start_date>b.start_date?1:-1;\r\n\t\t});\r\n\r\n\t\t//generate html for the view\r\n\t\tlet ariaAttr = scheduler._waiAria.mapAttrString();\r\n\r\n\t\tlet html = \"
\";\r\n\t\tfor (let i = 0; i < events.length; i++) {\r\n\t\t\tlet ev = events[i];\r\n\t\t\tlet event_class = (ev.id == scheduler._selected_event_id) ? 'dhx_map_line highlight' : 'dhx_map_line';\r\n\t\t\tlet bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\t\t\tlet color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\t\t\tlet ariaAttr = scheduler._waiAria.mapRowAttrString(ev);\r\n\t\t\tlet ariaButtonAttr = scheduler._waiAria.mapDetailsBtnString();\r\n\r\n\t\t\thtml += \"
\" + scheduler.templates.map_time(ev.start_date, ev.end_date, ev) + \"
\";\r\n\t\t\thtml += `
\r\n\t\t\t\r\n\t\t\t
`;\r\n\t\t\thtml += \"
\" + scheduler.templates.map_text(ev.start_date, ev.end_date, ev) + \"
\"; // -25 = icon size 20 and padding 5\r\n\t\t}\r\n\t\thtml += \"
\";\r\n\r\n\t\t//render html\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = 0; //fix flickering in FF\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t//\tscheduler._els[\"dhx_cal_data\"][0].style.width = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\r\n\t\tlet t = scheduler._els[\"dhx_cal_data\"][0].firstChild.childNodes;\r\n\r\n\t\tlet dateElement = scheduler._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML=scheduler.templates[scheduler._mode + \"_date\"](scheduler._min_date, scheduler._max_date, scheduler._mode);\r\n\t\t}\r\n\r\n\t\tscheduler._rendered = [];\r\n\t\tfor (let i = 0; i < t.length - 2; i++) {\r\n\t\t\tscheduler._rendered[i] = t[i];\r\n\t\t}\r\n\t}\r\n\tfunction set_full_view(mode) {\r\n\t\tif (mode) {\r\n\t\t\tconst l = scheduler.locale.labels;\r\n\t\t\tscheduler._els[\"dhx_cal_header\"][0].innerHTML = \"
\" + l.date + \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"
\" + l.description + \"
\";\r\n\t\t\tscheduler._table_view = true;\r\n\t\t\tscheduler.set_sizes();\r\n\t\t}\r\n\t}\r\n\t\r\n\tscheduler.attachEvent(\"onLocationError\", function (id){\r\n\t\talert(\"Location can't be found\");\r\n\t\treturn google.maps.LatLng(51.477840, -0.001492); \r\n\t\t//the coordinates of the Greenwich Royal Observatory\r\n\t})\r\n\tlet _updateEventLocation = async function(event) {\r\n\t\tif (mapAdapter){\r\n\t\t\tconst coordinates = await mapAdapter.resolveAddress(event.event_location);\r\n\t\t\tif (coordinates.lat && coordinates.lng) {\r\n\t\t\t\tevent.lat = +coordinates.lat;\r\n\t\t\t\tevent.lng = +coordinates.lng;\r\n\t\t\t} else {\r\n\t\t\t\tscheduler.callEvent(\"onLocationError\", [event.id]);\r\n\t\t\t\tevent.lng = scheduler.config.map_settings.error_position.lng;\r\n\t\t\t\tevent.lat = scheduler.config.map_settings.error_position.lat;\r\n\t\t\t}\r\n\t\t\tscheduler._latLngUpdate = true;\r\n\t\t\tscheduler.callEvent(\"onEventChanged\", [event.id, event]);\r\n\t\t}\r\n\t};\r\n\tlet _delay = function(method, object, params, delay) {\r\n\t\tsetTimeout(function() {\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tlet ret = method.apply(object, params);\r\n\t\t\tmethod = object = params = null;\r\n\t\t\treturn ret;\r\n\t\t}, delay || 1);\r\n\t};\r\n\tscheduler._event_resolve_delay = 1500;\r\n\tscheduler.attachEvent(\"onEventLoading\", function(event) {\r\n\t\tif (event.lat && event.lng) {\r\n\t\t\tevent.lat = +event.lat;\r\n\t\t\tevent.lng = +event.lng;\r\n\t\t}\r\n\t\tif (scheduler.config.map_settings.resolve_event_location && event.event_location && !event.lat && !event.lng) { // don't delete !event.lat && !event.lng as location could change\r\n\t\t\tscheduler._event_resolve_delay += 1500;\r\n\t\t\t_delay(_updateEventLocation, this, [event], scheduler._event_resolve_delay);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n})\r\n\r\n}","export default function(scheduler){\r\n\r\nconst minicalDomEvents = scheduler._createDomEventScope();\r\n\t\r\n\r\nscheduler.config.minicalendar = {\r\n\tmark_events: true\r\n};\r\nscheduler._synced_minicalendars = [];\r\nscheduler.renderCalendar = function(obj, _prev, is_refresh) {\r\n\tvar cal = null;\r\n\tvar date = obj.date || (scheduler._currentDate());\r\n\tif (typeof date == \"string\")\r\n\t\tdate = this.templates.api_date(date);\r\n\r\n\tif (!_prev) {\r\n\t\tvar cont = obj.container;\r\n\t\tvar pos = obj.position;\r\n\r\n\t\tif (typeof cont == \"string\")\r\n\t\t\tcont = document.getElementById(cont);\r\n\r\n\t\tif (typeof pos == \"string\")\r\n\t\t\tpos = document.getElementById(pos);\r\n\t\tif (pos && (typeof pos.left == \"undefined\" && typeof pos.right == \"undefined\")) {\r\n\t\t\tvar tpos = scheduler.$domHelpers.getOffset(pos);\r\n\t\t\tpos = {\r\n\t\t\t\ttop: tpos.top + pos.offsetHeight,\r\n\t\t\t\tleft: tpos.left\r\n\t\t\t};\r\n\t\t}\r\n\t\tif (!cont)\r\n\t\t\tcont = scheduler._get_def_cont(pos);\r\n\r\n\t\tcal = this._render_calendar(cont, date, obj);\r\n\t\r\n\t\tif (!cal.$_eventAttached) {\r\n\t\t\tcal.$_eventAttached = true;\r\n\t\t\tminicalDomEvents.attach(cal, \"click\", (function(e) {\r\n\t\t\t\tvar src = e.target || e.srcElement;\r\n\r\n\t\t\t\tvar $dom = scheduler.$domHelpers;\r\n\t\t\t\tif ($dom.closest(src, \".dhx_month_head\")) {\r\n\t\t\t\t\tif (!$dom.closest(src, \".dhx_after\") && !$dom.closest(src, \".dhx_before\")) {\r\n\r\n\t\t\t\t\t\tvar cellRoot = $dom.closest(src, \"[data-cell-date]\");\r\n\t\t\t\t\t\tvar dateAttribute = cellRoot.getAttribute(\"data-cell-date\");\r\n\t\t\t\t\t\tvar newDate = scheduler.templates.parse_date(dateAttribute);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tscheduler.unmarkCalendar(this);\r\n\t\t\t\t\t\tscheduler.markCalendar(this, newDate, \"dhx_calendar_click\");\r\n\t\t\t\t\t\tthis._last_date = newDate;\r\n\t\t\t\t\t\tif (this.conf.handler) this.conf.handler.call(scheduler, newDate, this);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}).bind(cal));\r\n\t\t}\r\n\t\r\n\t} else {\r\n\t\tcal = this._render_calendar(_prev.parentNode, date, obj, _prev);\r\n\t\tscheduler.unmarkCalendar(cal);\r\n\t}\r\n\r\n\tif (scheduler.config.minicalendar.mark_events) {\r\n\t\tvar start = scheduler.date.month_start(date);\r\n\t\tvar end = scheduler.date.add(start, 1, \"month\");\r\n\t\tvar evs = this.getEvents(start, end);\r\n\t\tvar filter = this[\"filter_\" + this._mode];\r\n\t\tvar markedDates = {};\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tif (filter && !filter(ev.id, ev))\r\n\t\t\t\tcontinue;\r\n\t\t\tvar d = ev.start_date;\r\n\t\t\tif (d.valueOf() < start.valueOf())\r\n\t\t\t\td = start;\r\n\t\t\td = scheduler.date.date_part(new Date(d.valueOf()));\r\n\t\t\twhile (d < ev.end_date) {\r\n\t\t\t\tif(!markedDates[+d]) {\r\n\t\t\t\t\tmarkedDates[+d] = true;\r\n\t\t\t\t\tthis.markCalendar(cal, d, \"dhx_year_event\");\r\n\t\t\t\t}\r\n\t\t\t\td = this.date.add(d, 1, \"day\");\r\n\t\t\t\tif (d.valueOf() >= end.valueOf())\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tthis._markCalendarCurrentDate(cal);\r\n\r\n\tcal.conf = obj;\r\n\tif (obj.sync && !is_refresh)\r\n\t\tthis._synced_minicalendars.push(cal);\r\n\r\n\tif(!cal.conf._on_xle_handler){\r\n\t\tcal.conf._on_xle_handler = scheduler.attachEvent(\"onXLE\", function refreshOnLoad(){\r\n\t\t\tscheduler.updateCalendar(cal, cal.conf.date);\r\n\t\t});\r\n\t}\r\n\r\n\tif(this.config.wai_aria_attributes && this.config.wai_aria_application_role){\r\n\t\tcal.setAttribute(\"role\", \"application\");\r\n\t}\r\n\r\n\treturn cal;\r\n};\r\nscheduler._get_def_cont = function(pos) {\r\n\tif (!this._def_count) {\r\n\t\tthis._def_count = document.createElement(\"div\");\r\n\t\tthis._def_count.className = \"dhx_minical_popup\";\r\n\t\tscheduler.event(this._def_count, \"click\", function(e) { e.cancelBubble = true; });\r\n\t\tdocument.body.appendChild(this._def_count);\r\n\t}\r\n\r\n\tif(pos.left){\r\n\t\tthis._def_count.style.left = pos.left + \"px\";\r\n\t}\r\n\tif(pos.right){\r\n\t\tthis._def_count.style.right = pos.right + \"px\";\r\n\t}\r\n\tif(pos.top){\r\n\t\tthis._def_count.style.top = pos.top + \"px\";\r\n\t}\r\n\tif(pos.bottom){\r\n\t\tthis._def_count.style.bottom = pos.bottom + \"px\";\r\n\t}\r\n\r\n\tthis._def_count._created = new Date();\r\n\r\n\treturn this._def_count;\r\n};\r\nscheduler._locateCalendar = function(cal, date) {\r\n\tif (typeof date == \"string\")\r\n\t\tdate = scheduler.templates.api_date(date);\r\n\r\n\tif(+date > +cal._max_date || +date < +cal._min_date)\r\n\t\treturn null;\r\n\r\n\tvar table = cal.querySelector(\".dhx_year_body\").childNodes[0];\r\n\r\n\tvar weekNum = 0;\r\n\tvar dat = new Date(cal._min_date);\r\n\twhile(+this.date.add(dat, 1, \"week\") <= +date){\r\n\t\tdat = this.date.add(dat, 1, \"week\");\r\n\t\tweekNum++;\r\n\t}\r\n\r\n\tvar sm = scheduler.config.start_on_monday;\r\n\tvar day = (date.getDay() || (sm ? 7 : 0)) - (sm ? 1 : 0);\r\n\r\n\tconst dayCell = table.querySelector(`.dhx_cal_month_row:nth-child(${weekNum + 1}) .dhx_cal_month_cell:nth-child(${day + 1})`);\r\n\tif(dayCell) {\r\n\t\treturn dayCell.firstChild;\r\n\t} else {\r\n\t\treturn null;\r\n\t}\r\n};\r\nscheduler.markCalendar = function(cal, date, css) {\r\n\tvar div = this._locateCalendar(cal, date);\r\n\tif(!div)\r\n\t\treturn;\r\n\r\n\tdiv.className += \" \" + css;\r\n};\r\nscheduler.unmarkCalendar = function(cal, date, css) {\r\n\tdate = date || cal._last_date;\r\n\tcss = css || \"dhx_calendar_click\";\r\n\tif (!date) return;\r\n\tvar el = this._locateCalendar(cal, date);\r\n\tif(!el)\r\n\t\treturn;\r\n\tel.className = (el.className || \"\").replace(RegExp(css, \"g\"));\r\n};\r\nscheduler._week_template = function(width) {\r\n\tvar summ = (width || 250);\r\n\tvar left = 0;\r\n\r\n\tvar week_template = document.createElement(\"div\");\r\n\tvar dummy_date = this.date.week_start(scheduler._currentDate());\r\n\tfor (var i = 0; i < 7; i++) {\r\n\t\tthis._cols[i] = Math.floor(summ / (7 - i));\r\n\t\tthis._render_x_header(i, left, dummy_date, week_template);\r\n\t\tdummy_date = this.date.add(dummy_date, 1, \"day\");\r\n\t\tsumm -= this._cols[i];\r\n\t\tleft += this._cols[i];\r\n\t}\r\n\tweek_template.lastChild.className += \" dhx_scale_bar_last\";\r\n\treturn week_template;\r\n};\r\nscheduler.updateCalendar = function(obj, sd) {\r\n\tobj.conf.date = sd;\r\n\tthis.renderCalendar(obj.conf, obj, true);\r\n};\r\nscheduler._mini_cal_arrows = [\" \", \" \"];\r\nscheduler._render_calendar = function(obj, sd, conf, previous) {\r\n\t/*store*/\r\n\tvar ts = scheduler.templates;\r\n\tvar temp = this._cols;\r\n\tthis._cols = [];\r\n\tvar temp2 = this._mode;\r\n\tthis._mode = \"calendar\";\r\n\tvar temp3 = this._colsS;\r\n\tthis._colsS = {height: 0};\r\n\tvar temp4 = new Date(this._min_date);\r\n\tvar temp5 = new Date(this._max_date);\r\n\tvar temp6 = new Date(scheduler._date);\r\n\tvar temp7 = ts.month_day;\r\n\tvar temp8 = this._ignores_detected; this._ignores_detected = 0;\r\n\tts.month_day = ts.calendar_date;\r\n\r\n\tsd = this.date.month_start(sd);\r\n\tvar week_template = this._week_template(obj.offsetWidth - 1 - this.config.minicalendar.padding );\r\n\r\n\tvar d;\r\n\tif (previous){\r\n\t\td = previous;\r\n\t} else {\r\n\t\td = document.createElement(\"div\");\r\n\t\td.className = \"dhx_cal_container dhx_mini_calendar\";\r\n\t}\r\n\td.setAttribute(\"date\", this._helpers.formatDate(sd));\r\n\td.innerHTML = \"
\" +\r\n\t\t\t\"
\" : \"'>\") +\r\n\t\t\t\"
\"+(week_template ? week_template.innerHTML : \"\")+\"
\" +\r\n\t\t\t\"
\" +\r\n\t\t\"
\";\r\n\tvar header = d.querySelector(\".dhx_year_month\");\r\n\tvar weekHeader = d.querySelector(\".dhx_year_week\");\r\n\tvar body = d.querySelector(\".dhx_year_body\");\r\n\r\n\theader.innerHTML = this.templates.calendar_month(sd);\r\n\tif (conf.navigation) {\r\n\t\tvar move_minicalendar_date = function(calendar, diff) {\r\n\t\t\tvar date = scheduler.date.add(calendar._date, diff, \"month\");\r\n\t\t\tscheduler.updateCalendar(calendar, date);\r\n\t\t\tif (scheduler._date.getMonth() == calendar._date.getMonth() && scheduler._date.getFullYear() == calendar._date.getFullYear()) {\r\n\t\t\t\tscheduler._markCalendarCurrentDate(calendar);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tvar css_classnames = [\"dhx_cal_prev_button\", \"dhx_cal_next_button\"];\r\n\t\tvar css_texts = [\"left:1px;top:4px;position:absolute;\", \"left:auto; right:1px;top:4px;position:absolute;\"];\r\n\t\tvar diffs = [-1, 1];\r\n\t\tvar handler = function(diff) {\r\n\t\t\treturn function() {\t\r\n\t\t\t\tif (conf.sync) {\r\n\t\t\t\t\tvar calendars = scheduler._synced_minicalendars;\r\n\t\t\t\t\tfor (var k = 0; k < calendars.length; k++) {\r\n\t\t\t\t\t\tmove_minicalendar_date(calendars[k], diff);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (scheduler.config.rtl) {\r\n\t\t\t\t\t\tdiff = -diff;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmove_minicalendar_date(d, diff);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t};\r\n\t\tvar labels = [scheduler.locale.labels.prev, scheduler.locale.labels.next];\r\n\t\tfor (var j = 0; j < 2; j++) {\r\n\t\t\tvar arrow = document.createElement(\"div\");\r\n\t\t\t//var diff = diffs[j];\r\n\t\t\tarrow.className = css_classnames[j];\r\n\r\n\t\t\tscheduler._waiAria.headerButtonsAttributes(arrow, labels[j]);\r\n\r\n\t\t\tarrow.style.cssText = css_texts[j];\r\n\t\t\tarrow.innerHTML = this._mini_cal_arrows[j];\r\n\t\t\theader.appendChild(arrow);\r\n\t\t\tminicalDomEvents.attach(arrow, \"click\", handler(diffs[j]));\r\n\t\t}\r\n\t}\r\n\td._date = new Date(sd);\r\n\r\n\td.week_start = (sd.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;\r\n\r\n\tvar dd = d._min_date = this.date.week_start(sd);\r\n\td._max_date = this.date.add(d._min_date, 6, \"week\");\r\n\r\n\tthis._reset_month_scale(body, sd, dd, 6);\r\n\r\n\tif (!previous)\r\n\t\tobj.appendChild(d);\r\n\r\n\tweekHeader.style.height = (weekHeader.childNodes[0].offsetHeight - 1) + \"px\"; // dhx_year_week should have height property so that day dates would get correct position. dhx_year_week height = height of it's child (with the day name)\r\n\r\n\tvar headerId = scheduler.uid();\r\n\tscheduler._waiAria.minicalHeader(header, headerId);\r\n\tscheduler._waiAria.minicalGrid(d.querySelector(\".dhx_year_grid\"), headerId);\r\n\tscheduler._waiAria.minicalRow(weekHeader);\r\n\r\n\tvar dayHeaders = weekHeader.querySelectorAll(\".dhx_scale_bar\");\r\n\tfor(var i = 0; i < dayHeaders.length; i++){\r\n\t\tscheduler._waiAria.minicalHeadCell(dayHeaders[i]);\r\n\t}\r\n\tvar dayCells = body.querySelectorAll(\".dhx_cal_month_cell\");\r\n\tvar firstDate = new Date(dd);\r\n\tfor(var i = 0; i < dayCells.length; i++){\r\n\r\n\t\tscheduler._waiAria.minicalDayCell(dayCells[i], new Date(firstDate));\r\n\t\tfirstDate = scheduler.date.add(firstDate, 1, \"day\");\r\n\t}\r\n\r\n\tscheduler._waiAria.minicalHeader(header, headerId);\r\n\r\n\t/*restore*/\r\n\tthis._cols = temp;\r\n\tthis._mode = temp2;\r\n\tthis._colsS = temp3;\r\n\tthis._min_date = temp4;\r\n\tthis._max_date = temp5;\r\n\tscheduler._date = temp6;\r\n\tts.month_day = temp7;\r\n\tthis._ignores_detected = temp8;\r\n\treturn d;\r\n};\r\nscheduler.destroyCalendar = function(cal, force) {\r\n\tif (!cal && this._def_count && this._def_count.firstChild) {\r\n\t\tif (force || (new Date()).valueOf() - this._def_count._created.valueOf() > 500)\r\n\t\t\tcal = this._def_count.firstChild;\r\n\t}\r\n\tif (!cal) return;\r\n\tminicalDomEvents.detachAll();\r\n\t//cal.onclick = null;\r\n\tcal.innerHTML = \"\";\r\n\tif (cal.parentNode)\r\n\t\tcal.parentNode.removeChild(cal);\r\n\tif (this._def_count)\r\n\t\tthis._def_count.style.top = \"-1000px\";\r\n\r\n\tif(cal.conf && cal.conf._on_xle_handler)\r\n\t\tscheduler.detachEvent(cal.conf._on_xle_handler);\r\n};\r\nscheduler.isCalendarVisible = function() {\r\n\tif (this._def_count && parseInt(this._def_count.style.top, 10) > 0)\r\n\t\treturn this._def_count;\r\n\treturn false;\r\n};\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tscheduler.event(document.body, \"click\", function() { scheduler.destroyCalendar(); });\r\n}, {once: true});\r\n\r\n\r\n\r\nscheduler.form_blocks.calendar_time = {\r\n\trender: function(sns) {\r\n\t\tvar html = \"\";\r\n\r\n\t\tvar cfg = scheduler.config;\r\n\t\tvar dt = this.date.date_part(scheduler._currentDate());\r\n\r\n\t\tvar last = 24 * 60, first = 0;\r\n\t\tif (cfg.limit_time_select) {\r\n\t\t\tfirst = 60 * cfg.first_hour;\r\n\t\t\tlast = 60 * cfg.last_hour + 1; // to include \"17:00\" option if time select is limited\r\n\t\t}\r\n\t\tdt.setHours(first / 60);\r\n\r\n\t\tsns._time_values = [];\r\n\t\thtml += \" \";\r\n\r\n\t\t//var full_day = scheduler.config.full_day;\r\n\r\n\t\treturn \"
\" + html + \"  –  \" + html + \"
\";\r\n\t},\r\n\tset_value: function(node, value, ev, config) {\r\n\r\n\t\tvar inputs = node.getElementsByTagName(\"input\");\r\n\t\tvar selects = node.getElementsByTagName(\"select\");\r\n\t\tvar start_date,\r\n\t\t\tend_date;\r\n\r\n\t\tvar _init_once = function(inp, date, number) {\r\n\t\t\tscheduler.event(inp, \"click\", function() {\r\n\t\t\t\tscheduler.destroyCalendar(null, true);\r\n\t\t\t\tscheduler.renderCalendar({\r\n\t\t\t\t\tposition: inp,\r\n\t\t\t\t\tdate: new Date(this._date),\r\n\t\t\t\t\tnavigation: true,\r\n\t\t\t\t\thandler: function(new_date) {\r\n\t\t\t\t\t\tinp.value = scheduler.templates.calendar_time(new_date);\r\n\t\t\t\t\t\tinp._date = new Date(new_date);\r\n\t\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t\t\tif (scheduler.config.event_duration && scheduler.config.auto_end_date && number === 0) { //first element = start date\r\n\t\t\t\t\t\t\t_update_minical_select();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t};\r\n\r\n\t\tif (scheduler.config.full_day) {\r\n\t\t\tif (!node._full_day) {\r\n\t\t\t\tvar html = \"\";\r\n\t\t\t\tif (!scheduler.config.wide_form)\r\n\t\t\t\t\thtml = node.previousSibling.innerHTML + html;\r\n\t\t\t\tnode.previousSibling.innerHTML = html;\r\n\t\t\t\tnode._full_day = true;\r\n\t\t\t}\r\n\t\t\tvar input = node.previousSibling.getElementsByTagName(\"input\")[0];\r\n\r\n\t\t\tvar isFulldayEvent = (scheduler.date.time_part(ev.start_date) === 0 && scheduler.date.time_part(ev.end_date) === 0);\r\n\t\t\tinput.checked = isFulldayEvent;\r\n\r\n\t\t\tselects[0].disabled = input.checked;\r\n\t\t\tselects[1].disabled = input.checked;\r\n\r\n\t\t\tif (!input.$_eventAttached) {\r\n\t\t\t\tinput.$_eventAttached = true;\r\n\t\t\t\tscheduler.event(input, \"click\", function() {\r\n\t\t\t\t\tif (input.checked === true) {\r\n\t\t\t\t\t\tvar obj = {};\r\n\t\t\t\t\t\tscheduler.form_blocks.calendar_time.get_value(node, obj);\r\n\r\n\t\t\t\t\t\tstart_date = scheduler.date.date_part(obj.start_date);\r\n\t\t\t\t\t\tend_date = scheduler.date.date_part(obj.end_date);\r\n\r\n\t\t\t\t\t\tif (+end_date == +start_date || (+end_date >= +start_date && (ev.end_date.getHours() !== 0 || ev.end_date.getMinutes() !== 0)))\r\n\t\t\t\t\t\t\tend_date = scheduler.date.add(end_date, 1, \"day\");\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tstart_date = null;\r\n\t\t\t\t\t\tend_date = null;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar start = start_date || ev.start_date;\r\n\t\t\t\t\tvar end = end_date || ev.end_date;\r\n\t\t\t\t\t_attach_action(inputs[0], start);\r\n\t\t\t\t\t_attach_action(inputs[1], end);\r\n\t\t\t\t\tselects[0].value = start.getHours() * 60 + start.getMinutes();\r\n\t\t\t\t\tselects[1].value = end.getHours() * 60 + end.getMinutes();\r\n\r\n\t\t\t\t\tselects[0].disabled = input.checked;\r\n\t\t\t\t\tselects[1].disabled = input.checked;\r\n\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (scheduler.config.event_duration && scheduler.config.auto_end_date) {\r\n\r\n\t\t\tvar _update_minical_select = function () {\r\n\t\t\t\tif (!(scheduler.config.auto_end_date && scheduler.config.event_duration)){\r\n\t\t\t\t\t// setting may be disabled after the handler is attached\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tstart_date = scheduler.date.add(inputs[0]._date, selects[0].value, \"minute\");\r\n\t\t\t\tend_date = new Date(start_date.getTime() + (scheduler.config.event_duration * 60 * 1000));\r\n\r\n\t\t\t\tinputs[1].value = scheduler.templates.calendar_time(end_date);\r\n\t\t\t\tinputs[1]._date = scheduler.date.date_part(new Date(end_date));\r\n\r\n\t\t\t\tselects[1].value = end_date.getHours() * 60 + end_date.getMinutes();\r\n\t\t\t};\r\n\r\n\t\t\tif(!selects[0].$_eventAttached){\r\n\t\t\t\tselects[0].addEventListener(\"change\", _update_minical_select); // only update on first select should trigger update so user could define other end date if he wishes too\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction _attach_action(inp, date, number) {\r\n\t\t\t_init_once(inp, date, number);\r\n\t\t\tinp.value = scheduler.templates.calendar_time(date);\r\n\t\t\tinp._date = scheduler.date.date_part(new Date(date));\r\n\t\t}\r\n\r\n\t\t_attach_action(inputs[0], ev.start_date, 0);\r\n\t\t_attach_action(inputs[1], ev.end_date, 1);\r\n\t\t_init_once = function() {};\r\n\r\n\t\tfunction _round_minutes(date) {\r\n\t\t\tvar time_values = config._time_values;\r\n\t\t\tvar direct_value = date.getHours() * 60 + date.getMinutes();\r\n\t\t\tvar fixed_value = direct_value;\r\n\t\t\tvar value_found = false;\r\n\r\n\t\t\tfor (var k = 0; k < time_values.length; k++) {\r\n\t\t\t\tvar t_v = time_values[k];\r\n\t\t\t\tif (t_v === direct_value) {\r\n\t\t\t\t\tvalue_found = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif (t_v < direct_value)\r\n\t\t\t\t\tfixed_value = t_v;\r\n\t\t\t}\r\n\r\n\t\t\tif(!(value_found || fixed_value))\r\n\t\t\t\treturn -1;\r\n\r\n\t\t\treturn (value_found) ? direct_value : fixed_value;\r\n\t\t}\r\n\r\n\t\tselects[0].value = _round_minutes(ev.start_date);\r\n\t\tselects[1].value = _round_minutes(ev.end_date);\r\n\r\n\t},\r\n\tget_value: function(node, ev) {\r\n\t\tvar inputs = node.getElementsByTagName(\"input\");\r\n\t\tvar selects = node.getElementsByTagName(\"select\");\r\n\r\n\t\tev.start_date = scheduler.date.add(inputs[0]._date, selects[0].value, \"minute\");\r\n\t\tev.end_date = scheduler.date.add(inputs[1]._date, selects[1].value, \"minute\");\r\n\r\n\t\tif (ev.end_date <= ev.start_date)\r\n\t\t\tev.end_date = scheduler.date.add(ev.start_date, scheduler.config.time_step, \"minute\");\r\n\t\treturn {\r\n\t\t\tstart_date: new Date(ev.start_date),\r\n\t\t\tend_date: new Date(ev.end_date)\r\n\t\t};\r\n\t},\r\n\tfocus: function(node) {\r\n\t}\r\n};\r\nscheduler.linkCalendar = function(calendar, datediff) {\r\n\tvar action = function() {\r\n\t\tvar date = scheduler._date;\r\n\t\tvar dateNew = new Date(date.valueOf());\r\n\t\tif (datediff) dateNew = datediff(dateNew);\r\n\t\tdateNew.setDate(1);\r\n\t\tscheduler.updateCalendar(calendar, dateNew);\r\n\t\treturn true;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", action);\r\n\tscheduler.attachEvent(\"onXLE\", action);\r\n\tscheduler.attachEvent(\"onEventAdded\", action);\r\n\tscheduler.attachEvent(\"onEventChanged\", action);\r\n\tscheduler.attachEvent(\"onEventDeleted\", action);\r\n\taction();\r\n};\r\n\r\nscheduler._markCalendarCurrentDate = function(calendar) {\r\n\tvar state = scheduler.getState();\r\n\tvar from = state.min_date;\r\n\tvar to = state.max_date;\r\n\tvar mode = state.mode;\r\n\r\n\tvar month_start = scheduler.date.month_start(new Date(calendar._date));\r\n\tvar month_end = scheduler.date.add(month_start, 1, \"month\");\r\n\r\n\tvar noHighlight = {\r\n\t\t\"month\":true,\r\n\t\t\"year\":true,\r\n\t\t\"agenda\":true,\r\n\t\t\"grid\":true\r\n\t};\r\n\t// no need to highlight current dates for a large range views - agenda, year, etc.\r\n\tif(noHighlight[mode] || (from.valueOf() <= month_start.valueOf() && to.valueOf() >= month_end.valueOf())){\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar current = from;\r\n\twhile(current.valueOf() < to.valueOf()){\r\n\t\tif (month_start.valueOf() <= current.valueOf() && month_end > current) {\r\n\t\t\tscheduler.markCalendar(calendar, current, \"dhx_calendar_click\");\r\n\t\t}\r\n\t\tcurrent = scheduler.date.add(current, 1, \"day\");\r\n\t}\r\n};\r\n\r\nscheduler.attachEvent(\"onEventCancel\", function(){\r\n\tscheduler.destroyCalendar(null, true);\r\n});\r\n\r\nscheduler.attachEvent(\"onDestroy\", function(){\r\n\tscheduler.destroyCalendar();\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\tscheduler.xy.scroll_width = 0;\r\n\r\n\tvar old = scheduler.render_view_data;\r\n\tscheduler.render_view_data=function(){\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\t\tdata.firstChild._h_fix = true;\r\n\r\n\t\told.apply(scheduler,arguments);\r\n\r\n\r\n\r\n\t\tvar height = parseInt(data.style.height);\r\n\t\tdata.style.height=\"1px\";\r\n\t\tdata.style.height=data.scrollHeight+\"px\";\r\n\r\n\t\tthis._obj.style.height = this._obj.clientHeight + data.scrollHeight - height + \"px\";\r\n\t};\r\n\r\n\tvar old_s=scheduler._reset_month_scale;\r\n\tscheduler._reset_month_scale=function(a,b,c,d){\r\n\t\tvar dummy = {clientHeight:100};\r\n\t\told_s.apply(scheduler,[dummy,b,c,d]);\r\n\t\ta.innerHTML = dummy.innerHTML;\r\n\t};\r\n\r\n});\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Multisection\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\n\r\nfunction parseXMLOptions(loader, config){\r\n\tvar items = scheduler.ajax.xpath(\"//data/item\", loader.xmlDoc);\r\n\tvar ids = {};\r\n\tfor (var i = 0; i < items.length; i++) {\r\n\t\tids[items[i].getAttribute(config.map_to)] = true;\r\n\t}\r\n\treturn ids;\r\n}\r\n\r\nfunction parseJSONOptions(loader, config){\r\n\ttry{\r\n\t\tvar items = JSON.parse(loader.xmlDoc.responseText);\r\n\t\tvar ids = {};\r\n\t\tfor (var i = 0; i < items.length; i++) {\r\n\t\t\tvar option = items[i];\r\n\r\n\t\t\tids[option.value || option.key || option.id] = true;\r\n\t\t}\r\n\t\treturn ids;\r\n\t}catch(e){\r\n\t\treturn null;\r\n\t}\r\n}\r\n\r\nscheduler.form_blocks[\"multiselect\"]={\r\n\trender:function(sns) {\r\n\t\tvar css = \"dhx_multi_select_control dhx_multi_select_\"+sns.name;\r\n\t\tif(!!sns.vertical){\r\n\t\t\tcss += \" dhx_multi_select_control_vertical\";\r\n\t\t}\r\n\r\n\t\tvar _result = \"
\";\r\n\t\tfor (var i=0; i\"+sns.options[i].label+\"\";\r\n\t\t}\r\n\t\t_result += \"
\";\r\n\t\treturn _result;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\r\n\t\tvar _children = node.getElementsByTagName('input');\r\n\t\tfor(var i=0;i<_children.length;i++) {\r\n\t\t\t_children[i].checked = false; //unchecking all inputs on the form\r\n\t\t}\r\n\r\n\t\tfunction _mark_inputs(ids) { // ids = [ 0: undefined, 1: undefined, 2: true, 'custom_name': false ... ]\r\n\t\t\tvar _children = node.getElementsByTagName('input');\r\n\t\t\tfor(var i=0;i<_children.length; i++) {\r\n\t\t\t\t_children[i].checked = !! ids[_children[i].value];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar _ids = {};\r\n\t\tif (ev[config.map_to]) {\r\n\t\t\tvar results = (ev[config.map_to] + \"\").split(config.delimiter || scheduler.config.section_delimiter || \",\");\r\n\t\t\tfor (var i = 0; i < results.length; i++) {\r\n\t\t\t\t_ids[results[i]] = true;\r\n\t\t\t}\r\n\t\t\t_mark_inputs(_ids);\r\n\t\t} else {\r\n\t\t\tif (scheduler._new_event || !config.script_url)\r\n\t\t\t\treturn;\r\n\t\t\tvar divLoading = document.createElement('div');\r\n\t\t\tdivLoading.className = 'dhx_loading';\r\n\t\t\tdivLoading.style.cssText = \"position: absolute; top: 40%; left: 40%;\";\r\n\t\t\tnode.appendChild(divLoading);\r\n\r\n\t\t\tvar url = [\r\n\t\t\t\tconfig.script_url,\r\n\t\t\t\t(config.script_url.indexOf(\"?\") == -1 ? \"?\" : \"&\"),\r\n\t\t\t\t'dhx_crosslink_' + config.map_to + '=' + ev.id + '&uid=' + scheduler.uid()\r\n\t\t\t].join(\"\");\r\n\r\n\t\t\tscheduler.ajax.get(url, function(loader) {\r\n\t\t\t\tvar options = parseJSONOptions(loader, config);\r\n\t\t\t\tif(!options){\r\n\t\t\t\t\toptions = parseXMLOptions(loader, config);\r\n\t\t\t\t}\r\n\t\t\t\t_mark_inputs(options);\r\n\t\t\t\tnode.removeChild(divLoading);\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tvar _result = [];\r\n\t\tvar _children = node.getElementsByTagName(\"input\");\r\n\t\tfor(var i=0;i<_children.length;i++) {\r\n\t\t\tif(_children[i].checked)\r\n\t\t\t\t_result.push(_children[i].value);\r\n\t\t}\r\n\t\treturn _result.join(config.delimiter || scheduler.config.section_delimiter || \",\");\r\n\t},\r\n\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\r\n\tfunction backup(obj){\r\n\t\tvar t = function(){};\r\n\t\tt.prototype = obj;\r\n\t\treturn t;\r\n\t}\r\n\r\n\tvar old = scheduler._load;\r\n\tscheduler._load=function(url,from){\r\n\t\turl=url||this._load_url;\r\n\t\tif (typeof url == \"object\"){\r\n\t\t\tvar t = backup(this._loaded);\r\n\t\t\tfor (var i=0; i < url.length; i++) {\r\n\t\t\t\tthis._loaded=new t();\r\n\t\t\t\told.call(this,url[i],from);\r\n\t\t\t}\r\n\t\t} else\r\n\t\t\told.apply(this,arguments);\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\t/* global Backbone */\r\n\tvar cfg = {\r\n\t\tuse_id : false\r\n\t};\r\n\r\n\t//remove private properties\r\n\tfunction sanitize(ev){\r\n\t\tvar obj = {};\r\n\t\tfor (var key in ev)\r\n\t\t\tif (key.indexOf(\"_\") !== 0)\r\n\t\t\t\tobj[key] = ev[key];\r\n\r\n\t\tif (!cfg.use_id)\r\n\t\t\tdelete obj.id;\r\n\r\n\t\treturn obj;\r\n\t}\r\n\r\n\tvar update_timer;\r\n\tfunction update_view(){\r\n\t\tclearTimeout(update_timer);\r\n\t\tupdate_timer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler.updateView();\r\n\t\t},1);\r\n\t}\r\n\r\n\tfunction _start_ext_load(cal){\r\n\t\tcal._loading = true;\r\n\t\tcal._not_render = true;\r\n\r\n\t\tcal.callEvent(\"onXLS\", []);\r\n\t}\r\n\tfunction _finish_ext_load(cal){\r\n\t\tcal._not_render = false;\r\n\t\tif (cal._render_wait)\r\n\t\t\tcal.render_view_data();\r\n\t\tcal._loading = false;\r\n\r\n\t\tcal.callEvent(\"onXLE\", []);\r\n\t}\r\n\r\n\r\n\tfunction _get_id(model){\r\n\t\treturn cfg.use_id ? model.id : model.cid;\r\n\t}\r\n\r\nscheduler.backbone = function(events, config){\r\n\tif (config) cfg = config;\r\n\r\n\tevents.bind(\"change\", function(model, info){\r\n\t\tvar cid = _get_id(model);\r\n\t\tvar ev = scheduler._events[cid] = model.toJSON();\r\n\t\tev.id = cid;\r\n\r\n\t\tscheduler._init_event(ev);\r\n\t\tupdate_view();\r\n\t});\r\n\tevents.bind(\"remove\", function(model, changes){\r\n\t\tvar cid = _get_id(model);\r\n\t\tif (scheduler._events[cid])\r\n\t\t\tscheduler.deleteEvent(cid);\r\n\t});\r\n\r\n\tvar queue = [];\r\n\tfunction add_from_queue(){\r\n\t\tif(scheduler.$destroyed){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (queue.length){\r\n\t\t\tscheduler.parse(queue, \"json\");\r\n\t\t\tqueue = [];\r\n\t\t}\r\n\t}\r\n\r\n\tevents.bind(\"add\", function(model, changes){\r\n\t\tvar cid = _get_id(model);\r\n\t\tif (!scheduler._events[cid]){\r\n\t\t\tvar ev = model.toJSON();\r\n\t\t\tev.id = cid;\r\n\t\t\tscheduler._init_event(ev);\r\n\r\n\t\t\tqueue.push(ev);\r\n\t\t\tif (queue.length == 1)\r\n\t\t\t\tsetTimeout(add_from_queue,1);\r\n\t\t}\r\n\t});\r\n\r\n\tevents.bind(\"request\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_start_ext_load(scheduler);\r\n\t});\r\n\tevents.bind(\"sync\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_finish_ext_load(scheduler);\r\n\t});\r\n\tevents.bind(\"error\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_finish_ext_load(scheduler);\r\n\t});\r\n\r\n\r\n\tscheduler.attachEvent(\"onEventCreated\", function(id){\r\n\t\tvar ev = new events.model(scheduler.getEvent(id));\r\n\t\tscheduler._events[id] = ev.toJSON();\r\n\t\tscheduler._events[id].id = id;\r\n\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventAdded\", function(id){\r\n\t\tif (!events.get(id)){\r\n\t\t\tvar data = sanitize(scheduler.getEvent(id));\r\n\t\t\tvar model = new events.model(data);\r\n\r\n\t\t\tvar cid = _get_id(model);\r\n\t\t\tif (cid != id)\r\n\t\t\t\tthis.changeEventId(id, cid);\r\n\t\t\tevents.add(model);\r\n\t\t\tevents.trigger(\"scheduler:add\", model);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\", function(id){\r\n\t\tvar ev = events.get(id);\r\n\t\tvar upd = sanitize(scheduler.getEvent(id));\r\n\r\n\t\tev.set(upd);\r\n\t\tevents.trigger(\"scheduler:change\", ev);\r\n\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function(id){\r\n\t\tvar model = events.get(id);\r\n\t\tif (model){\r\n\t\t\tevents.trigger(\"scheduler:remove\", model);\r\n\t\t\tevents.remove(id);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\t/* global dhtmlDragAndDropObject, dhtmlx */\r\n// lame old code doesn't provide raw event object\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\t\tvar dragger = (new dhtmlDragAndDropObject());\r\n\t\tvar old = dragger.stopDrag;\r\n\t\tvar last_event;\r\n\t\tdragger.stopDrag = function(e) {\r\n\t\t\tlast_event = e;\r\n\t\t\treturn old.apply(this, arguments);\r\n\t\t};\r\n\r\n\t\tfunction on_drop(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml) {\r\n\r\n\t\t\tif (scheduler.checkEvent(\"onBeforeExternalDragIn\") && !scheduler.callEvent(\"onBeforeExternalDragIn\", [sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml, last_event]))\r\n\t\t\t\treturn;\r\n\r\n\t\t\tvar temp = scheduler.attachEvent(\"onEventCreated\", function (id) {\r\n\t\t\t\tif (!scheduler.callEvent(\"onExternalDragIn\", [id, sourceHtmlObject, last_event])) {\r\n\t\t\t\t\tthis._drag_mode = this._drag_id = null;\r\n\t\t\t\t\tthis.deleteEvent(id);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tvar action_data = scheduler.getActionData(last_event);\r\n\t\t\tvar event_data = {\r\n\t\t\t\tstart_date: new Date(action_data.date)\r\n\t\t\t};\r\n\r\n\t\t\t// custom views, need to assign section id, fix dates\r\n\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\tvar view_options = scheduler.matrix[scheduler._mode];\r\n\t\t\t\tevent_data[view_options.y_property] = action_data.section;\r\n\r\n\t\t\t\tvar pos = scheduler._locate_cell_timeline(last_event);\r\n\t\t\t\tevent_data.start_date = view_options._trace_x[pos.x];\r\n\t\t\t\tevent_data.end_date = scheduler.date.add(event_data.start_date, view_options.x_step, view_options.x_unit);\r\n\t\t\t}\r\n\t\t\tif (scheduler._props && scheduler._props[scheduler._mode]) {\r\n\t\t\t\tevent_data[scheduler._props[scheduler._mode].map_to] = action_data.section;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler.addEventNow(event_data);\r\n\r\n\t\t\tscheduler.detachEvent(temp);\r\n\t\t}\r\n\r\n\t\tdragger.addDragLanding(scheduler._els[\"dhx_cal_data\"][0], {\r\n\t\t\t_drag: function(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml) {\r\n\t\t\t\ton_drop(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml);\r\n\t\t\t},\r\n\t\t\t_dragIn: function(htmlObject, shtmlObject) {\r\n\t\t\t\treturn htmlObject;\r\n\t\t\t},\r\n\t\t\t_dragOut: function(htmlObject) {\r\n\t\t\t\treturn this;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(dhtmlx.DragControl) {\r\n\t\t\tdhtmlx.DragControl.addDrop(scheduler._els[\"dhx_cal_data\"][0], {\r\n\t\t\t\tonDrop: function (source, target, d, e) {\r\n\t\t\t\t\tvar sourceDhtmlx = dhtmlx.DragControl.getMaster(source);\r\n\t\t\t\t\tlast_event = e;\r\n\t\t\t\t\ton_drop(source, sourceDhtmlx, target, e.target || e.srcElement);\r\n\t\t\t\t},\r\n\r\n\t\t\t\tonDragIn: function (source, target, e) {\r\n\t\t\t\t\treturn target;\r\n\t\t\t\t}\r\n\t\t\t}, true);\r\n\t\t}\r\n\t});\r\n\r\n}","export default function(scheduler){\r\n\r\n\tvar dx, dy,\r\n\t\thtml_regexp = new RegExp(\"<[^>]*>\", \"g\"),\r\n\t\tnewline_regexp = new RegExp(\"]*>\", \"g\");\r\n\r\n\tfunction clean_html(val) {\r\n\t\treturn val.replace(newline_regexp, \"\\n\").replace(html_regexp, \"\");\r\n\t}\r\n\r\n\tfunction x_norm(x, offset) {\r\n\t\tx = parseFloat(x);\r\n\t\toffset = parseFloat(offset);\r\n\t\tif (!isNaN(offset)) x -= offset;\r\n\r\n\t\tvar w = colsWidth(x);\r\n\t\tx = x - w.width + w.cols*dx;\r\n\t\treturn isNaN(x)?\"auto\":(100*x/(dx));\r\n\t}\r\n\r\n\tfunction x_norm_event(x, offset, is_left) {\r\n\t\tx = parseFloat(x);\r\n\t\toffset = parseFloat(offset);\r\n\t\tif (!isNaN(offset) && is_left) x -= offset;\r\n\r\n\t\tvar w = colsWidth(x);\r\n\t\tx = x - w.width + w.cols*dx;\r\n\t\treturn isNaN(x)?\"auto\":(100*x/(dx-(!isNaN(offset)?offset:0)));\r\n\t}\r\n\tfunction colsWidth(width) {\r\n\t\tvar r = 0;\r\n\t\tvar header = scheduler._els.dhx_cal_header[0].childNodes;\r\n\t\tvar els = header[1] ? header[1].childNodes : header[0].childNodes;\r\n\t\tfor (var i = 0; i < els.length; i++) {\r\n\t\t\tvar el = els[i].style ? els[i] : els[i].parentNode;\r\n\t\t\tvar w = parseFloat(el.style.width);\r\n\t\t\tif (width > w){\r\n\t\t\t\twidth -= (w+1);\r\n\t\t\t\tr+=(w+1);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\treturn { width: r, cols: i };\r\n\t}\r\n\r\n\tfunction y_norm(y) {\r\n\t\ty = parseFloat(y);\r\n\t\tif (isNaN(y)) return \"auto\";\r\n\t\treturn 100 * y / dy;\r\n\t}\r\n\r\n\tfunction get_style(node, style){\r\n\t\treturn (window.getComputedStyle?(window.getComputedStyle(node, null)[style]):(node.currentStyle?node.currentStyle[style]:null))||\"\";\r\n\t}\r\n\r\n\tfunction de_day(node, n) {\r\n\t\tvar x = parseInt(node.style.left, 10);\r\n\r\n\t\tfor (var dx = 0; dx < scheduler._cols.length; dx++) {\r\n\t\t\tx -= scheduler._cols[dx];\r\n\t\t\tif (x < 0) return dx;\r\n\t\t}\r\n\t\treturn n;\r\n\t}\r\n\r\n\tfunction de_week(node, n) {\r\n\t\tvar y = parseInt(node.style.top, 10);\r\n\t\tfor (var dy = 0; dy < scheduler._colsS.heights.length; dy++)\r\n\t\t\tif (scheduler._colsS.heights[dy] > y) return dy;\r\n\t\treturn n;\r\n\t}\r\n\r\n\tfunction xml_start(tag) {\r\n\t\treturn tag ? \"<\"+tag+\">\" : \"\";\r\n\t}\r\n\tfunction xml_end(tag) {\r\n\t\treturn tag ? \"\" : \"\";\r\n\t}\r\n\r\n\tfunction xml_top(tag, profile, header, footer) {\r\n\t\tvar xml = \"<\"+tag+\" profile='\" + profile + \"'\";\r\n\t\tif (header)\r\n\t\t\txml += \" header='\" + header + \"'\";\r\n\t\tif (footer)\r\n\t\t\txml += \" footer='\" + footer + \"'\";\r\n\t\txml += \">\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_body_header() {\r\n\t\tvar xml = \"\";\r\n\t\t// detects if current mode is timeline\r\n\t\tvar mode = scheduler._mode;\r\n\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode])\r\n\t\t\tmode = (scheduler.matrix[scheduler._mode].render == \"cell\") ? \"matrix\" : \"timeline\";\r\n\t\txml += \"\";\r\n\r\n\t\tif (scheduler._mode == \"week_agenda\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_data[0].getElementsByTagName(\"DIV\");\r\n\t\t\tfor (var i = 0; i < xh.length; i++)\r\n\t\t\t\tif (xh[i].className == \"dhx_wa_scale_bar\")\r\n\t\t\t\t\txml += \"\" + clean_html(xh[i].innerHTML) + \"\";\r\n\t\t} else if (scheduler._mode == \"agenda\" || scheduler._mode == \"map\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_header[0].childNodes[0].childNodes;\r\n\r\n\t\t\txml += \"\" + clean_html(xh[0].innerHTML) + \"\" + clean_html(xh[1].innerHTML) + \"\";\r\n\t\t} else if (scheduler._mode == \"year\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_data[0].childNodes;\r\n\t\t\tfor (var i = 0; i < xh.length; i++) {\r\n\t\t\t\txml += \"\";\r\n\t\t\t\txml += xml_month_scale(xh[i].querySelector(\".dhx_year_week\").childNodes);\r\n\t\t\t\txml += xml_month(xh[i].querySelector(\".dhx_year_body\"));\r\n\t\t\t\txml += \"\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\txml += \"\";\r\n\t\t\tvar xh = scheduler._els.dhx_cal_header[0].childNodes;\r\n\t\t\txml += xml_month_scale(xh);\r\n\t\t\txml += \"\";\r\n\r\n\t\t\tvar yh = scheduler._els.dhx_cal_data[0];\r\n\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tfor (var i = 0; i < yh.firstChild.rows.length; i++) {\r\n\t\t\t\t\tvar el = yh.firstChild.rows[i];\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t}\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tdy = yh.firstChild.rows[0].cells[0].offsetHeight;\r\n\t\t\t} else if (yh.firstChild.tagName == \"TABLE\") {\r\n\t\t\t\txml += xml_month(yh);\r\n\t\t\t} else {\r\n\t\t\t\tyh = yh.childNodes[yh.childNodes.length - 1];\r\n\t\t\t\twhile (yh.className.indexOf(\"dhx_scale_holder\") == -1)\r\n\t\t\t\t\tyh = yh.previousSibling;\r\n\t\t\t\tyh = yh.childNodes;\r\n\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tfor (var i = 0; i < yh.length; i++)\r\n\t\t\t\t\txml += \"\\n\";\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tdy = yh[0].offsetHeight;\r\n\t\t\t}\r\n\t\t}\r\n\t\txml += \"\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_month(yh) {\r\n\t\tvar xml = \"\";\r\n\t\tvar r = yh.querySelectorAll(\"tr\");\r\n\t\tfor (var i = 0; i < r.length; i++) {\r\n\t\t\tvar days = [];\r\n\t\t\tvar cells = r[i].querySelectorAll(\"td\");\r\n\r\n\t\t\tfor (var j = 0; j < cells.length; j++)\r\n\t\t\t\tdays.push(cells[j].querySelector(\".dhx_month_head\").innerHTML);\r\n\r\n\t\t\txml += \"\\n\";\r\n\t\t\tdy = cells[0].offsetHeight;\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_month_scale(xh) {\r\n\t\tvar xhs,\r\n\t\t\txml = \"\";\r\n\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\tif (scheduler.matrix[scheduler._mode].second_scale)\r\n\t\t\t\txhs = xh[1].childNodes;\r\n\r\n\t\t\txh = xh[0].childNodes;\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < xh.length; i++)\r\n\t\t\txml += \"\\n\";\r\n\t\tdx = xh[0].offsetWidth;\r\n\r\n\t\tif (xhs) {\r\n\t\t\tvar width = 0;\r\n\t\t\tvar top_width = xh[0].offsetWidth;\r\n\t\t\tvar top_col = 1;\r\n\t\t\tfor (var i = 0; i < xhs.length; i++) {\r\n\t\t\t\txml += \"\\n\";\r\n\t\t\t\twidth += xhs[i].offsetWidth;\r\n\t\t\t\tif (width >= top_width) {\r\n\t\t\t\t\ttop_width += (xh[top_col] ? xh[top_col].offsetWidth : 0);\r\n\t\t\t\t\ttop_col++;\r\n\t\t\t\t}\r\n\t\t\t\tdx = xhs[0].offsetWidth;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_body(colors) {\r\n\t\tvar xml = \"\";\r\n\t\tvar evs = scheduler._rendered;\r\n\t\tvar matrix = scheduler.matrix && scheduler.matrix[scheduler._mode];\r\n\r\n\t\tif (scheduler._mode == \"agenda\" || scheduler._mode == \"map\") {\r\n\r\n\t\t\tfor (var i = 0; i < evs.length; i++)\r\n xml += \"\";\r\n\r\n\t\t} else if (scheduler._mode == \"week_agenda\") {\r\n\r\n\t\t\tfor (var i = 0; i < evs.length; i++)\r\n\t\t\t\txml += \"\" + clean_html(evs[i].innerHTML) + \"\";\r\n\r\n\t\t} else if (scheduler._mode == \"year\") {\r\n\r\n\t\t\tvar evs = scheduler.get_visible_events();\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar d = evs[i].start_date;\r\n\t\t\t\tif (d.valueOf() < scheduler._min_date.valueOf())\r\n\t\t\t\t\td = scheduler._min_date;\r\n\r\n\t\t\t\twhile (d < evs[i].end_date) {\r\n\t\t\t\t\tvar m = d.getMonth() + 12 * (d.getFullYear() - scheduler._min_date.getFullYear()) - scheduler.week_starts._month;\r\n\t\t\t\t\tvar day = scheduler.week_starts[m] + d.getDate() - 1;\r\n\t\t\t\t\tvar text_color = colors ? get_style(scheduler._get_year_cell(d), \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(scheduler._get_year_cell(d), \"backgroundColor\") : \"\";\r\n\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t\td = scheduler.date.add(d, 1, \"day\");\r\n\t\t\t\t\tif (d.valueOf() >= scheduler._max_date.valueOf())\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (matrix && matrix.render == \"cell\") {\r\n\t\t\tvar evs = scheduler._els.dhx_cal_data[0].getElementsByTagName(\"TD\");\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar text_color = colors ? get_style(evs[i], \"color\") : \"\";\r\n\t\t\t\tvar bg_color = colors ? get_style(evs[i], \"backgroundColor\") : \"\";\r\n\t\t\t\txml += \"\\n\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar zx, zdx;\r\n\t\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\t\t// logic for timeline view\r\n\t\t\t\t\tzx = x_norm(evs[i].style.left);\r\n\t\t\t\t\tzdx = x_norm(evs[i].offsetWidth)-1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// we should use specific logic for day/week/units view\r\n\t\t\t\t\tvar left_norm = scheduler.config.use_select_menu_space ? 0 : 26;\r\n\t\t\t\t\tzx = x_norm_event(evs[i].style.left, left_norm, true);\r\n\t\t\t\t\tzdx = x_norm_event(evs[i].style.width, left_norm)-1;\r\n\t\t\t\t}\r\n\t\t\t\tif (isNaN(zdx * 1)) continue;\r\n\t\t\t\tvar zy = y_norm(evs[i].style.top);\r\n\t\t\t\tvar zdy = y_norm(evs[i].style.height);\r\n\r\n\t\t\t\tvar e_type = evs[i].className.split(\" \")[0].replace(\"dhx_cal_\", \"\");\r\n\t\t\t\tif (e_type === 'dhx_tooltip_line') continue;\r\n\r\n\t\t\t\tvar dets = scheduler.getEvent(evs[i].getAttribute(scheduler.config.event_attribute));\r\n if (!dets) continue;\r\n\t\t\t\tvar day = dets._sday;\r\n\t\t\t\tvar week = dets._sweek;\r\n\t\t\t\tvar length = dets._length || 0;\r\n\r\n\t\t\t\tif (scheduler._mode == \"month\") {\r\n\t\t\t\t\tzdy = parseInt(evs[i].offsetHeight, 10);\r\n\t\t\t\t\tzy = parseInt(evs[i].style.top, 10) - scheduler.xy.month_head_height;\r\n\r\n\t\t\t\t\tday = de_day(evs[i], day);\r\n\t\t\t\t\tweek = de_week(evs[i], week);\r\n\t\t\t\t} else if (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\t\tday = 0;\r\n\t\t\t\t\tvar el = evs[i].parentNode.parentNode.parentNode;\r\n\t\t\t\t\tweek = el.rowIndex;\r\n\t\t\t\t\tvar dy_copy = dy;\r\n\t\t\t\t\tdy = evs[i].parentNode.offsetHeight;\r\n\t\t\t\t\tzy = y_norm(evs[i].style.top);\r\n\t\t\t\t\tzy -= zy * 0.2;\r\n\t\t\t\t\tdy = dy_copy;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (evs[i].parentNode == scheduler._els.dhx_cal_data[0]) continue;\r\n\t\t\t\t\tvar parent = scheduler._els[\"dhx_cal_data\"][0].childNodes[0];\r\n\t\t\t\t\tvar offset = parseFloat(parent.className.indexOf(\"dhx_scale_holder\") != -1 ? parent.style.left : 0);\r\n\t\t\t\t\tzx += x_norm(evs[i].parentNode.style.left, offset);\r\n\t\t\t\t}\r\n\r\n\t\t\t\txml += \"\\n\";\r\n\r\n\t\t\t\tif (e_type == \"event\") {\r\n\t\t\t\t\txml += \"
\";\r\n\t\t\t\t\tvar text_color = colors ? get_style(evs[i].childNodes[2], \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(evs[i].childNodes[2], \"backgroundColor\") : \"\";\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar text_color = colors ? get_style(evs[i], \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(evs[i], \"backgroundColor\") : \"\";\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t}\r\n\t\t\t\txml += \"
\";\r\n\t\t\t}\r\n\t\t\t}\r\n\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction toXML(start, end, view, mode, header, footer){\r\n\t\tvar colors = false;\r\n\t\tif (mode == \"fullcolor\") {\r\n\t\t\tcolors = true;\r\n\t\t\tmode = \"color\";\r\n\t\t}\r\n\r\n\t\tmode = mode || \"color\";\r\n\r\n\t\tvar xml = \"\";\r\n\t\tif (start) {\r\n\r\n\t\t\tvar original_date = scheduler._date;\r\n\t\t\tvar original_mode = scheduler._mode;\r\n\t\t\tend = scheduler.date[view+\"_start\"](end);\r\n\t\t\tend = scheduler.date[\"get_\"+view+\"_end\"] ? scheduler.date[\"get_\"+view+\"_end\"](end) : scheduler.date.add(end, 1, view);\r\n\r\n\t\t\txml = xml_top(\"pages\", mode, header, footer);\r\n\t\t\tfor (var temp_date = new Date(start); +temp_date < +end; temp_date = this.date.add(temp_date, 1, view)) {\r\n\t\t\t\tthis.setCurrentView(temp_date, view);\r\n\t\t\t\txml += xml_start(\"page\") + xml_body_header().replace(\"\\u2013\", \"-\") + xml_body(colors) + xml_end(\"page\");\r\n\t\t\t}\r\n\t\t\txml += xml_end(\"pages\");\r\n\r\n\t\t\tthis.setCurrentView(original_date, original_mode);\r\n\t\t} else {\r\n\t\t\txml = xml_top(\"data\", mode, header, footer) + xml_body_header().replace(\"\\u2013\", \"-\") + xml_body(colors) + xml_end(\"data\");\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\tscheduler.getPDFData = toXML;\r\n\tfunction send_xml(xml, url){\r\n\t\tvar uid = scheduler.uid();\r\n\t\tvar d = document.createElement(\"div\");\r\n\t\td.style.display = \"none\";\r\n\t\tdocument.body.appendChild(d);\r\n\r\n\t\td.innerHTML = '
';\r\n\t\tdocument.getElementById(uid).firstChild.value = encodeURIComponent(xml);\r\n\t\tdocument.getElementById(uid).submit();\r\n\t\td.parentNode.removeChild(d);\r\n\t}\r\n\r\n\tfunction to_pdf(start, end, view, url, mode, header, footer) {\r\n\t\tvar xml = \"\";\r\n\t\tif(typeof mode == \"object\"){\r\n\t\t\txml = schedulersToPdf(mode);\r\n\t\t}else{\r\n\t\t\txml = toXML.apply(this, [start, end, view, mode, header, footer]);\r\n\t\t}\r\n\r\n\t\tsend_xml(xml, url);\r\n\t}\r\n\r\n\tfunction schedulersToPdf(objects){\r\n\t\tvar xml = \"\";\r\n\t\tfor(var i=0; i < objects.length; i++){\r\n\t\t\txml += objects[i].source.getPDFData(objects[i].start, objects[i].end, objects[i].view, objects[i].mode, objects[i].header, objects[i].footer);\r\n\t\t}\r\n\t\txml += \"\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\t/*\r\n\t * scheduler.toPDF(url, mode, header, footer) - for a single scheduler\r\n\t * scheduler.toPDF(url, [scheduler1, scheduler2,...]) - for multiple schedulers\r\n\t * example:\r\n\t * scheduler.toPDF(\"generate.ashx\", [\r\n\t * { source: scheduler1, mode: \"color\" },\r\n\t * { source: scheduler2, mode: \"gray\", view:\"week\", start:new Date(2013, 06, 1), end:new Date(2013, 06, 28) },\r\n\t * { source: scheduler3 }\r\n\t * ]);\r\n\t *\r\n\t */\r\n\tscheduler.toPDF = function(url, mode, header, footer) {\r\n\t\treturn to_pdf.apply(this, [null, null, null, url, mode, header, footer]);\r\n\t};\r\n\tscheduler.toPDFRange = function(start, end, view, url, mode, header, footer) {\r\n\t\tif (typeof start == \"string\") {\r\n\t\t\tstart = scheduler.templates.api_date(start);\r\n\t\t\tend = scheduler.templates.api_date(end);\r\n\t\t}\r\n\r\n\t\treturn to_pdf.apply(this, arguments);\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.icons_select = [\"icon_form\", \"icon_delete\"];\r\nscheduler.config.details_on_create = true;\r\nscheduler.config.show_quick_info = true;\r\nscheduler.xy.menu_width = 0;\r\n\r\n\r\n\r\nlet clickedElementPosition = null;\r\nscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\tconst container = scheduler.$container;\r\n\tif(container._$quickInfoHandler){\r\n\t\treturn;\r\n\t}else{\r\n\t\tcontainer._$quickInfoHandler = true;\r\n\t\t// store coordinates of clicked segment of an event\r\n\t\t// in case multi section events or multi-line month events\r\n\t\tscheduler.event(container, \"mousedown\", function(e){\r\n\t\t\tconst eventElement = e.target.closest(`[${scheduler.config.event_attribute}]`);\r\n\t\t\tif (eventElement) {\r\n\t\t\t\tclickedElementPosition = {\r\n\t\t\t\t\tid: eventElement.getAttribute(scheduler.config.event_attribute),\r\n\t\t\t\t\tposition: getPositionInsideScheduler(eventElement)\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t});\r\n\t\tscheduler.attachEvent(\"onDestroy\", () => {\r\n\t\t\tdelete container._$quickInfoHandler;\r\n\t\t});\r\n\t}\r\n});\r\n\r\nscheduler.attachEvent(\"onClick\", function(id){\r\n\tif(!scheduler.config.show_quick_info){\r\n\t\treturn;\r\n\t}\r\n\tscheduler.showQuickInfo(id);\r\n\treturn true;\r\n});\r\n\r\n(function(){\r\n\t// pass `force` argument in order to hide quick info synchronously\r\n\t// so it won't affect showQuickInfo call that can follow\r\n\tvar events = [\"onEmptyClick\", \"onViewChange\", \"onLightbox\", \"onBeforeEventDelete\", \"onBeforeDrag\"];\r\n\tvar hiding_function = function(){\r\n\t\tscheduler.hideQuickInfo(true);\r\n\t\treturn true;\r\n\t};\r\n\tfor (var i=0; i window.innerWidth){\r\n\t\t\tleft = window.innerWidth - width;\r\n\t\t}\r\n\t\tleft = Math.max(0, left);\r\n\r\n\t\tqi.style.left = left + \"px\";\r\n\t\tqi.style.top = pos.top - (pos.dy?height:-pos.height) + \"px\";\r\n\t} else {\r\n\r\n\t\tconst dataPos = scheduler.$container.querySelector('.dhx_cal_data').offsetTop;\r\n\t\tqi.style.top = dataPos + 20 + \"px\";\r\n\t\tif (pos.dx == 1){\r\n\t\t\tqi.style.right = \"auto\";\r\n\t\t\tqi.style.left = -width + \"px\";\r\n\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tqi.style.left = \"-10px\";\r\n\t\t\t},1);\r\n\t\t} else {\r\n\t\t\tqi.style.left = \"auto\";\r\n\t\t\tqi.style.right = -width + \"px\";\r\n\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tqi.style.right = \"-10px\";\r\n\t\t\t},1);\r\n\t\t}\r\n\t\tqi.className = qi.className.replace(\" dhx_qi_left\",\"\").replace(\" dhx_qi_right\",\"\")+\" dhx_qi_\"+(pos.dx==1?\"left\":\"right\");\r\n\t}\r\n\r\n\tqi.ontransitionend = () => {\r\n\t\tfitQIInsideWindow(qi);\r\n\t\tqi.ontransitionend = null;\r\n\t};\r\n\tsetTimeout(() => {\r\n\t\tfitQIInsideWindow(qi);\r\n\t}, 1);\r\n};\r\n\r\nfunction fitQIInsideWindow(quickInfoPopup){\r\n\tconst popupRect = quickInfoPopup.getBoundingClientRect();\r\n\tconst containerRect = scheduler.$container.getBoundingClientRect();\r\n\r\n\t// calculate the bottom offset of the Quick Info relative to the scheduler container\r\n\tconst offsetBottom = containerRect.bottom - popupRect.bottom;\r\n\r\n\t// If the popup extends outside the scheduler container, adjust its top position\r\n\tif (offsetBottom < 0) {\r\n\t\tquickInfoPopup.style.top = `${parseFloat(quickInfoPopup.style.top) + offsetBottom}px`;\r\n\t}\r\n}\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function(){\r\n\tscheduler.hideQuickInfo();\r\n\tif(this._quick_info_box){\r\n\t\tvar box = this._quick_info_box;\r\n\t\tif(box.parentNode){\r\n\t\t\tbox.parentNode.removeChild(box);\r\n\t\t}\r\n\t\tthis._quick_info_box = null;\r\n\t}\r\n});\r\nscheduler._quick_info_onscroll_handler = function(e){\r\n\tscheduler.hideQuickInfo();\r\n};\r\nscheduler._init_quick_info = function(){\r\n\tif (!this._quick_info_box){\r\n\r\n\r\n\t\tvar qi = this._quick_info_box = document.createElement(\"div\");\r\n\r\n\t\tthis._waiAria.quickInfoAttr(qi);\r\n\r\n\t\tqi.className = \"dhx_cal_quick_info\";\r\n\t\tif (scheduler.$testmode)\r\n\t\t\tqi.className += \" dhx_no_animate\";\r\n\t\tif (scheduler.config.rtl) qi.className += \" dhx_quick_info_rtl\";\r\n\t//title\r\n\t\tvar ariaAttr = this._waiAria.quickInfoHeaderAttrString();\r\n\t\tvar html = `\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t\t
\r\n\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t\t
`;\r\n\r\n\t//buttons\r\n\t\thtml += \"
\";\r\n\t\tvar buttons = scheduler.config.icons_select;\r\n\t\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\t\tvar ariaAttr = this._waiAria.quickInfoButtonAttrString(this.locale.labels[buttons[i]]);\r\n\t\t\t\thtml += `
\r\n\t\t\t\t
${scheduler.locale.labels[buttons[i]]}
`;\r\n\t\t\t}\r\n\t\t// }\r\n\t\thtml += \"
\";\r\n\r\n\t\tqi.innerHTML = html;\r\n\t\tscheduler.event(qi, \"click\", function(ev){\r\n\t\t\tscheduler._qi_button_click(ev.target || ev.srcElement);\r\n\t\t});\r\n\t\tif (scheduler.config.quick_info_detached){\r\n\t\t\tscheduler._detachDomEvent(scheduler._els[\"dhx_cal_data\"][0], \"scroll\", scheduler._quick_info_onscroll_handler);\r\n\t\t\tscheduler.event(scheduler._els[\"dhx_cal_data\"][0], \"scroll\", scheduler._quick_info_onscroll_handler);\r\n\t\t}\r\n\t}\r\n\r\n\treturn this._quick_info_box;\r\n};\r\n\r\nscheduler._qi_button_click = function(node){\r\n\tvar box = scheduler._quick_info_box;\r\n\tif (!node || node == box) return;\r\n\r\n\tif(node.closest(\".dhx_cal_qi_close_btn\")){\r\n\t\tscheduler.hideQuickInfo();\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar mask = scheduler._getClassName(node);\r\n\tif (mask.indexOf(\"_icon\")!=-1){\r\n\t\tvar id = scheduler._quick_info_box_id;\r\n\t\tscheduler._click.buttons[mask.split(\" \")[1].replace(\"icon_\",\"\")](id);\r\n\t} else\r\n\t\tscheduler._qi_button_click(node.parentNode);\r\n};\r\n\r\nfunction getPositionInsideScheduler(element){\r\n\tlet left = 0;\r\n\tlet top = 0;\r\n\r\n\tlet node = element;\r\n\twhile (node && node != scheduler._obj){\r\n\t\tleft += node.offsetLeft;\r\n\t\ttop += node.offsetTop-node.scrollTop;\r\n\t\tnode = node.offsetParent;\r\n\t}\r\n\tif(node){\r\n\t\tlet dx = (left + element.offsetWidth/2) > (scheduler._x/2) ? 1 : 0;\r\n\t\tlet dy = (top + element.offsetHeight/2) > (scheduler._y/2) ? 1 : 0;\r\n\r\n\t\treturn { left:left, top:top, dx:dx, dy:dy,\r\n\t\t\twidth:element.offsetWidth, height:element.offsetHeight };\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\nscheduler._get_event_counter_part = function(id){\r\n\tvar domEv = scheduler.getRenderedEvent(id);\r\n\treturn getPositionInsideScheduler(domEv);\r\n};\r\n\r\nscheduler._fill_quick_data = function(id){\r\n\tvar ev = scheduler.getEvent(id);\r\n\tvar qi = scheduler._quick_info_box;\r\n\r\n\tscheduler._quick_info_box_id = id;\r\n\r\n//title content\r\n\r\n\tvar header = {\r\n\t\tcontent: scheduler.templates.quick_info_title(ev.start_date, ev.end_date, ev),\r\n\t\tdate: scheduler.templates.quick_info_date(ev.start_date, ev.end_date, ev)\r\n\t};\r\n\tvar titleContent = qi.querySelector(\".dhx_cal_qi_tcontent\");\r\n\ttitleContent.innerHTML = `${header.content}`;\r\n\tvar titleDate = qi.querySelector(\".dhx_cal_qi_tdate\");\r\n\ttitleDate.innerHTML = header.date;\r\n\r\n\tscheduler._waiAria.quickInfoHeader(qi, [header.content, header.date].join(\" \"));\r\n\r\n//main content\r\n\tvar main = qi.querySelector(\".dhx_cal_qi_content\");\r\n\tconst mainContent = scheduler.templates.quick_info_content(ev.start_date, ev.end_date, ev);\r\n\tif(mainContent){\r\n\t\tmain.classList.remove(\"dhx_hidden\");\r\n\t\tmain.innerHTML = mainContent;\r\n\t}else{\r\n\t\tmain.classList.add(\"dhx_hidden\");\r\n\t}\r\n};\r\n\r\n\r\n}","export default function(scheduler){\r\n\t\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar originalRecurringSetValue;\r\n\tif (scheduler.form_blocks.recurring) {\r\n\t\toriginalRecurringSetValue = scheduler.form_blocks.recurring.set_value;\r\n\t}\r\n\tvar original_left_buttons = scheduler.config.buttons_left.slice();\r\n\tvar original_right_buttons = scheduler.config.buttons_right.slice();\r\n\r\n\tscheduler.attachEvent(\"onBeforeLightbox\", function(id) {\r\n\t\tif (this.config.readonly_form || this.getEvent(id).readonly) {\r\n\t\t\tthis.config.readonly_active = true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.config.readonly_active = false;\r\n\t\t\tscheduler.config.buttons_left = original_left_buttons.slice();\r\n\t\t\tscheduler.config.buttons_right = original_right_buttons.slice();\r\n\t\r\n\t\t\t// initial value\r\n\t\t\tif(scheduler.form_blocks.recurring) {\r\n\t\t\t\tscheduler.form_blocks.recurring.set_value = originalRecurringSetValue;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar sns = this.config.lightbox.sections;\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\tfor (var i = 0; i < sns.length; i++) {\r\n\t\t\t\tif (sns[i].type == 'recurring') {\r\n\t\t\t\t\tif (this.config.readonly_active && scheduler.form_blocks.recurring) {\r\n\t\t\t\t\t\tscheduler.form_blocks.recurring.set_value = function(node, value, ev) {\r\n\t\t\t\t\t\t\tvar wrapper = scheduler.$domHelpers.closest(node, \".dhx_wrap_section\");\r\n\t\t\t\t\t\t\tvar style = \"none\";\r\n\t\t\t\t\t\t\twrapper.querySelector('.dhx_cal_lsection').display = style;\r\n\t\t\t\t\t\t\twrapper.querySelector('.dhx_form_repeat').display = style;\r\n\t\t\t\t\t\t\twrapper.style.display = style;\r\n\r\n\t\t\t\t\t\t\tscheduler.setLightboxSize();\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar forbidden_buttons = [\"dhx_delete_btn\", \"dhx_save_btn\"];\r\n\t\t\tvar button_arrays = [scheduler.config.buttons_left, scheduler.config.buttons_right];\r\n\t\t\tfor (var i = 0; i < forbidden_buttons.length; i++) {\r\n\t\t\t\tvar forbidden_button = forbidden_buttons[i];\r\n\t\t\t\tfor (var k = 0; k < button_arrays.length; k++) {\r\n\t\t\t\t\tvar button_array = button_arrays[k];\r\n\t\t\t\t\tvar index = -1;\r\n\t\t\t\t\tfor (var p = 0; p < button_array.length; p++) {\r\n\t\t\t\t\t\tif (button_array[p] == forbidden_button) {\r\n\t\t\t\t\t\t\tindex = p;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (index != -1) {\r\n\t\t\t\t\t\tbutton_array.splice(index, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.resetLightbox();\r\n\r\n\t\treturn true;\r\n\t});\r\n\r\n\tfunction txt_replace(tag, d, n, text) {\r\n\t\tvar txts = d.getElementsByTagName(tag);\r\n\t\tvar txtt = n.getElementsByTagName(tag);\r\n\t\tfor (var i = txtt.length - 1; i >= 0; i--) {\r\n\t\t\tvar n = txtt[i];\r\n\t\t\tif (!text){\r\n\t\t\t\tn.disabled = true;\r\n\t\t\t\t//radio and checkboxes loses state after .cloneNode in IE\r\n\t\t\t\tif(d.checked)\r\n\t\t\t\t\tn.checked = true;\r\n\t\t\t}else {\r\n\t\t\t\tvar t = document.createElement(\"span\");\r\n\t\t\t\tt.className = \"dhx_text_disabled\";\r\n\t\t\t\tt.innerHTML = text(txts[i]);\r\n\t\t\t\tn.parentNode.insertBefore(t, n);\r\n\t\t\t\tn.parentNode.removeChild(n);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tvar old = scheduler._fill_lightbox;\r\n\tscheduler._fill_lightbox = function() {\r\n\r\n\t\tvar lb = this.getLightbox();\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\tlb.style.visibility = 'hidden';\r\n\t\t\t// lightbox should have actual sizes before rendering controls\r\n\t\t\t// currently only matters for dhtmlxCombo\r\n\t\t\tlb.style.display = 'block';\r\n\t\t}\r\n\t\tvar res = old.apply(this, arguments);\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\t//reset visibility and display\r\n\t\t\tlb.style.visibility = '';\r\n\t\t\tlb.style.display = 'none';\r\n\t\t}\r\n\r\n\t\tif (this.config.readonly_active) {\r\n\r\n\t\t\tvar originalForm = this.getLightbox();\r\n\t\t\tvar readonlyForm = this._lightbox_r = originalForm.cloneNode(true);\r\n\t\t\treadonlyForm.id = scheduler.uid();\r\n\t\t\treadonlyForm.className += \" dhx_cal_light_readonly\";\r\n\t\t\ttxt_replace(\"textarea\", originalForm, readonlyForm, function(a) {\r\n\t\t\t\treturn a.value;\r\n\t\t\t});\r\n\t\t\ttxt_replace(\"input\", originalForm, readonlyForm, false);\r\n\t\t\ttxt_replace(\"select\", originalForm, readonlyForm, function(a) {\r\n\t\t\t\tif(!a.options.length) return \"\";\r\n\t\t\t\treturn a.options[Math.max((a.selectedIndex || 0), 0)].text;\r\n\t\t\t});\r\n\r\n\t\t\toriginalForm.parentNode.insertBefore(readonlyForm, originalForm);\r\n\r\n\t\t\tthis.showCover(readonlyForm);\r\n\t\t\tif (scheduler._lightbox)\r\n\t\t\t\tscheduler._lightbox.parentNode.removeChild(scheduler._lightbox);\r\n\t\t\tthis._lightbox = readonlyForm;\r\n\r\n\t\t\tif (scheduler.config.drag_lightbox)\r\n\t\t\t\tscheduler.event(readonlyForm.firstChild, \"mousedown\", scheduler._ready_to_dnd);\r\n\t\t\t\t\r\n\t\t\tscheduler._init_lightbox_events();\r\n\t\t\tthis.setLightboxSize();\r\n\t\t}\r\n\t\treturn res;\r\n\t};\r\n\r\n\tvar hold = scheduler.hide_lightbox;\r\n\tscheduler.hide_lightbox = function() {\r\n\t\tif (this._lightbox_r) {\r\n\t\t\tthis._lightbox_r.parentNode.removeChild(this._lightbox_r);\r\n\t\t\tthis._lightbox_r = this._lightbox = null;\r\n\t\t}\r\n\r\n\t\treturn hold.apply(this, arguments);\r\n\t};\r\n});\r\n\r\n\r\n}","import { RRule, rrulestr } from 'rrule';\r\n\r\nexport default function (scheduler) {\r\n\r\n\tfunction clearMilliseconds(date) {\r\n\t\treturn new Date(\r\n\t\t\tdate.getFullYear(),\r\n\t\t\tdate.getMonth(),\r\n\t\t\tdate.getDate(),\r\n\t\t\tdate.getHours(),\r\n\t\t\tdate.getMinutes(),\r\n\t\t\tdate.getSeconds(),\r\n\t\t\t0\r\n\t\t);\r\n\t}\r\n\r\n\tfunction isDeletedOccurrence(event) {\r\n\t\treturn !!event.deleted;\r\n\t}\r\n\r\n\tfunction isSeries(event) {\r\n\t\treturn !!event.rrule && !event.recurring_event_id;\r\n\t}\r\n\r\n\tfunction clearRecurringProperties(event) {\r\n\t\tevent.rrule = \"\";\r\n\t\tevent.original_start = null;\r\n\t\tevent.recurring_event_id = null;\r\n\t\tevent.duration = null;\r\n\t\tevent.deleted = null;\r\n\t}\r\n\r\n\tfunction createException(ev) {\r\n\t\tlet id = ev.id.split(\"#\");\r\n\r\n\t\tlet nid = scheduler.uid();\r\n\t\tscheduler._not_render = true;\r\n\t\tlet nev = scheduler._copy_event(ev);\r\n\t\tnev.id = nid;\r\n\t\tnev.recurring_event_id = id[0];\r\n\r\n\t\tlet timestamp = id[1];\r\n\r\n\t\tnev.original_start = new Date(Number(timestamp));\r\n\r\n\t\tscheduler._add_rec_marker(nev, timestamp);\r\n\t\tscheduler.addEvent(nev);\r\n\t\tscheduler._not_render = false;\r\n\t}\r\n\r\n\tfunction toUTCDate(date){\r\n\t\treturn new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(),date.getSeconds()));\r\n\t}\r\n\r\n\tfunction setUTCPartsToDate(d) {\r\n\t\treturn new Date(\r\n\t\t\td.getUTCFullYear(),\r\n\t\t\td.getUTCMonth(),\r\n\t\t\td.getUTCDate(),\r\n\t\t\td.getUTCHours(),\r\n\t\t\td.getUTCMinutes(),\r\n\t\t\td.getUTCSeconds()\r\n\t\t);\r\n\t}\r\n\r\n\tscheduler._rec_temp = [];\r\n\tscheduler._rec_markers_pull = {};\r\n\tscheduler._rec_markers = {};\r\n\tscheduler._add_rec_marker = function (ev, time) {\r\n\t\tev._pid_time = time;\r\n\t\tthis._rec_markers[ev.id] = ev;\r\n\t\tif (!this._rec_markers_pull[ev.event_pid]) this._rec_markers_pull[ev.event_pid] = {};\r\n\t\tthis._rec_markers_pull[ev.event_pid][time] = ev;\r\n\t};\r\n\tscheduler._get_rec_marker = function (time, id) {\r\n\t\tlet ch = this._rec_markers_pull[id];\r\n\t\tif (ch) return ch[time];\r\n\t\treturn null;\r\n\t};\r\n\tscheduler._get_rec_markers = function (id) {\r\n\t\treturn (this._rec_markers_pull[id] || []);\r\n\t};\r\n\r\n\t(function () {\r\n\t\tvar old_add_event = scheduler.addEvent;\r\n\t\tscheduler.addEvent = function (start_date, end_date, text, id, extra_data) {\r\n\t\t\tvar ev_id = old_add_event.apply(this, arguments);\r\n\r\n\t\t\tif (ev_id && scheduler.getEvent(ev_id)) {\r\n\t\t\t\tvar ev = scheduler.getEvent(ev_id);\r\n\r\n\t\t\t\tif (ev.start_date) {\r\n\t\t\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t\t\t}\r\n\t\t\t\tif (ev.end_date) {\r\n\t\t\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn ev_id;\r\n\t\t};\r\n\t})();\r\n\r\n\tscheduler.attachEvent(\"onEventLoading\", function (event) {\r\n\r\n\t\tif (event.original_start) {\r\n\t\t\tevent.original_start = scheduler.templates.parse_date(event.original_start);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventIdChange\", function (id, new_id) {\r\n\t\tif (this._ignore_call) return;\r\n\t\tthis._ignore_call = true;\r\n\r\n\t\tif (scheduler._rec_markers[id]) {\r\n\t\t\t//important for for correct work of scheduler.getEvents(from, to) and collision detection\r\n\t\t\tscheduler._rec_markers[new_id] = scheduler._rec_markers[id];\r\n\t\t\tdelete scheduler._rec_markers[id];\r\n\t\t}\r\n\r\n\t\tif (scheduler._rec_markers_pull[id]) {\r\n\t\t\tscheduler._rec_markers_pull[new_id] = scheduler._rec_markers_pull[id];\r\n\t\t\tdelete scheduler._rec_markers_pull[id];\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < this._rec_temp.length; i++) {\r\n\t\t\tvar tev = this._rec_temp[i];\r\n\t\t\tif (tev.recurring_event_id == id) {\r\n\t\t\t\ttev.recurring_event_id = new_id;\r\n\t\t\t\tthis.changeEventId(tev.id, new_id + \"#\" + tev.id.split(\"#\")[1]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (var i in this._rec_markers) {\r\n\t\t\tvar tev = this._rec_markers[i];\r\n\t\t\tif (tev.recurring_event_id == id) {\r\n\t\t\t\ttev.recurring_event_id = new_id;\r\n\t\t\t\ttev._pid_changed = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar el = scheduler._rec_markers[new_id];\r\n\t\tif (el && el._pid_changed) {\r\n\t\t\tdelete el._pid_changed;\r\n\t\t\tsetTimeout(function () {\r\n\t\t\t\tif (scheduler.$destroyed) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tscheduler.callEvent(\"onEventChanged\", [new_id, scheduler.getEvent(new_id)]);\r\n\t\t\t}, 1);\r\n\t\t}\r\n\r\n\t\tdelete this._ignore_call;\r\n\t});\r\n\r\n\tfunction deleteEventFromSeries(idTimestamp, ev) {\r\n\t\tlet id = idTimestamp;\r\n\t\tidTimestamp = id.split(\"#\");\r\n\t\tlet nid = scheduler.uid();\r\n\t\tlet tid = (idTimestamp[1]) ? idTimestamp[1] : (ev._pid_time);\r\n\t\tlet nev = scheduler._copy_event(ev);\r\n\t\tnev.id = nid;\r\n\t\tnev.recurring_event_id = ev.recurring_event_id || idTimestamp[0];\r\n\t\tnev.original_start = new Date(Number(tid));\r\n\t\tnev.deleted = true;\r\n\t\tscheduler.addEvent(nev);\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function (id) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (this._is_virtual_event(id) || (this._is_modified_occurence(ev) && !isDeletedOccurrence(ev))) {\r\n\t\t\tdeleteEventFromSeries(id, ev);\r\n\t\t} else {\r\n\t\t\tif (isSeries(ev) && this._lightbox_id)\r\n\t\t\t\tthis._roll_back_dates(ev);\r\n\r\n\r\n\t\t\tvar sub = this._get_rec_markers(id);\r\n\t\t\tfor (var i in sub) {\r\n\t\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\t\tid = sub[i].id;\r\n\t\t\t\t\tif (this.getEvent(id))\r\n\t\t\t\t\t\tthis.deleteEvent(id, true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function (id, ev) {\r\n\t\tif (!this._is_virtual_event(id) && this._is_modified_occurence(ev)) {\r\n\t\t\tif (!scheduler._events[id]) {\r\n\t\t\t\tev.deleted = true;\r\n\t\t\t\tthis.setEvent(id, ev);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\", function (id, event) {\r\n\t\tif (this._loading) return true;\r\n\r\n\t\tvar ev = this.getEvent(id);\r\n\r\n\t\tif (this._is_virtual_event(id)) {\r\n\t\t\tcreateException(ev);\r\n\r\n\t\t} else {\r\n\t\t\tif (ev.start_date) {\r\n\t\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t\t}\r\n\t\t\tif (ev.end_date) {\r\n\t\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t\t}\r\n\r\n\t\t\tif (isSeries(ev) && this._lightbox_id) {\r\n\t\t\t\tthis._roll_back_dates(ev);\r\n\t\t\t\t//scheduler.recurrings.rollbackDates(ev);\r\n\t\t\t}\r\n\r\n\t\t\tvar sub = this._get_rec_markers(id);\r\n\t\t\tfor (var i in sub) {\r\n\t\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\t\tdelete this._rec_markers[sub[i].id];\r\n\t\t\t\t\tthis.deleteEvent(sub[i].id, true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tdelete this._rec_markers_pull[id];\r\n\r\n\t\t\t// it's possible that after editing event is no longer exists, in such case we need to remove _select_id flag\r\n\t\t\tvar isEventFound = false;\r\n\t\t\tfor (var k = 0; k < this._rendered.length; k++) {\r\n\t\t\t\tif (this._rendered[k].getAttribute(this.config.event_attribute) == id)\r\n\t\t\t\t\tisEventFound = true;\r\n\t\t\t}\r\n\t\t\tif (!isEventFound)\r\n\t\t\t\tthis._select_id = null;\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventAdded\", function (id) {\r\n\t\tif (!this._loading) {\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif (isSeries(ev)) {\r\n\t\t\t\tthis._roll_back_dates(ev);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventSave\", function (id, data, is_new_event) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (isSeries(ev))\r\n\t\t\tthis._select_id = null;\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventCreated\", function (id) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (!isSeries(ev)) {\r\n\t\t\tclearRecurringProperties(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventCancel\", function (id) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (isSeries(ev)) {\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t\t// a bit expensive, but we need to be sure that event re-rendered, because view can be corrupted by resize , during edit process\r\n\t\t\tthis.render_view_data();\r\n\t\t}\r\n\t});\r\n\tscheduler._roll_back_dates = function (ev) {\r\n\t\t//// !!!!! calc temp properties\r\n\t\tif (ev.start_date) {\r\n\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t}\r\n\t\tif (ev.end_date) {\r\n\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t}\r\n\r\n\t\tev.duration = Math.round((ev.end_date.valueOf() - ev.start_date.valueOf()) / 1000);\r\n\t\tev.end_date = ev._end_date;\r\n\t\tif (ev._start_date) {\r\n\t\t\tev.start_date.setMonth(0);\r\n\t\t\tev.start_date.setDate(ev._start_date.getDate());\r\n\t\t\tev.start_date.setMonth(ev._start_date.getMonth());\r\n\t\t\tev.start_date.setFullYear(ev._start_date.getFullYear());\r\n\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._is_virtual_event = function (id) {\r\n\t\treturn id.toString().indexOf(\"#\") != -1;\r\n\t};\r\n\tscheduler._is_modified_occurence = function (ev) {\r\n\t\treturn (ev.recurring_event_id && ev.recurring_event_id != \"0\");\r\n\t};\r\n\r\n\tscheduler.showLightbox_rec = scheduler.showLightbox;\r\n\tscheduler.showLightbox = function (id) {\r\n\t\tvar locale = this.locale;\r\n\t\tvar c = scheduler.config.lightbox_recurring;\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tvar pid = ev.recurring_event_id;\r\n\t\tvar isVirtual = this._is_virtual_event(id);\r\n\t\tif (isVirtual)\r\n\t\t\tpid = id.split(\"#\")[0];\r\n\r\n\t\t// show series\r\n\t\tvar showSeries = function (id) {\r\n\t\t\tvar event = scheduler.getEvent(id);\r\n\t\t\tevent._end_date = event.end_date;\r\n\t\t\tevent.end_date = new Date(event.start_date.valueOf() + event.duration * 1000);\r\n\t\t\treturn scheduler.showLightbox_rec(id); // editing series\r\n\t\t};\r\n\r\n\t\tif ((pid || pid * 1 === 0) && isSeries(ev)) {\r\n\t\t\t// direct API call on series id\r\n\t\t\treturn showSeries(id);\r\n\t\t}\r\n\t\tif (!pid || pid === '0' || ((!locale.labels.confirm_recurring || c == 'instance') || (c == 'series' && !isVirtual))) {\r\n\t\t\t// editing instance or non recurring event\r\n\t\t\treturn this.showLightbox_rec(id);\r\n\t\t}\r\n\t\tif (c == 'ask') {\r\n\t\t\tvar that = this;\r\n\t\t\tscheduler.modalbox({\r\n\t\t\t\ttext: locale.labels.confirm_recurring,\r\n\t\t\t\ttitle: locale.labels.title_confirm_recurring,\r\n\t\t\t\twidth: \"500px\",\r\n\t\t\t\tposition: \"middle\",\r\n\t\t\t\tbuttons: [locale.labels.button_edit_series, locale.labels.button_edit_occurrence, locale.labels.icon_cancel],\r\n\t\t\t\tcallback: function (index) {\r\n\t\t\t\t\tswitch (+index) {\r\n\t\t\t\t\t\tcase 0:\r\n\t\t\t\t\t\t\treturn showSeries(pid);\r\n\t\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\t\treturn that.showLightbox_rec(id);\r\n\t\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tshowSeries(pid);\r\n\t\t}\r\n\t};\r\n\r\n\tfunction groupExceptions() {\r\n\t\tconst exceptions = {};\r\n\t\tfor (const i in scheduler._events) {\r\n\t\t\tconst ev = scheduler._events[i];\r\n\t\t\tif (ev.recurring_event_id) {\r\n\t\t\t\tif (!exceptions[ev.recurring_event_id]) {\r\n\t\t\t\t\texceptions[ev.recurring_event_id] = {};\r\n\t\t\t\t}\r\n\t\t\t\texceptions[ev.recurring_event_id][ev.original_start.valueOf()] = ev;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn exceptions;\r\n\t}\r\n\r\n\tscheduler.get_visible_events_rec = scheduler.get_visible_events;\r\n\tscheduler.get_visible_events = function (only_timed) {\r\n\t\tfor (var i = 0; i < this._rec_temp.length; i++)\r\n\t\t\tdelete this._events[this._rec_temp[i].id];\r\n\t\tthis._rec_temp = [];\r\n\r\n\t\tconst exceptions = groupExceptions();\r\n\t\tvar stack = this.get_visible_events_rec(only_timed);\r\n\t\tvar out = [];\r\n\t\tfor (var i = 0; i < stack.length; i++) {\r\n\t\t\tif (stack[i].deleted || stack[i].recurring_event_id) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif (isSeries(stack[i])) {\r\n\t\t\t\tthis.repeat_date(stack[i], out, undefined, undefined, undefined, undefined, exceptions);\r\n\t\t\t} else {\r\n\t\t\t\tout.push(stack[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn out;\r\n\t};\r\n\r\n\t(function () {\r\n\t\tvar old = scheduler.isOneDayEvent;\r\n\t\tscheduler.isOneDayEvent = function (ev) {\r\n\t\t\tif (isSeries(ev)) return true;\r\n\t\t\treturn old.call(this, ev);\r\n\t\t};\r\n\t\tvar old_update_event = scheduler.updateEvent;\r\n\t\tscheduler.updateEvent = function (id) {\r\n\t\t\tvar ev = scheduler.getEvent(id);\r\n\r\n\t\t\tif (ev && isSeries(ev) && !this._is_virtual_event(id)) {\r\n\t\t\t\tscheduler.update_view();\r\n\t\t\t} else {\r\n\t\t\t\told_update_event.call(this, id);\r\n\t\t\t}\r\n\t\t};\r\n\t})();\r\n\r\n\tconst toIcalString = scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\");\r\n\r\n\tscheduler.repeat_date = function (ev, stack, non_render, from, to, maxCount, exceptions) {\r\n\t\tif (!ev.rrule) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tlet seriesExceptions = exceptions ? exceptions[ev.id] : groupExceptions()[ev.id];\r\n\t\tif (!seriesExceptions) {\r\n\t\t\tseriesExceptions = {};\r\n\t\t}\r\n\r\n\t\t// GS-2596: from and to should be in UTC, \r\n\t\t// need to remove one sec to not be included in repeatedDates array\r\n\t\tfrom = toUTCDate(from || new Date(scheduler._min_date.valueOf() - 1000));\r\n\t\tto = toUTCDate(to || new Date(scheduler._max_date.valueOf() - 1000));\r\n\r\n\t\t\r\n\t\tconst utcStart = toUTCDate(ev.start_date);\r\n\t\tlet parsedRRule;\r\n\t\tif (maxCount){\r\n\t\t\t// for getRecDates() method\r\n\t\t\tparsedRRule = rrulestr(`RRULE:${ev.rrule};UNTIL=${toIcalString(ev.end_date)};COUNT=${maxCount}`, { dtstart: utcStart });\r\n\t\t} else {\r\n\t\t\tparsedRRule = rrulestr(`RRULE:${ev.rrule};UNTIL=${toIcalString(ev.end_date)}`, { dtstart: utcStart });\r\n\t\t}\r\n\t\t//GS-2596: third parameter, includes dates that match with arguments\r\n\t\tconst repeatedDates = parsedRRule.between(from, to, true).map(date => {\r\n\t\t\tconst adjustedDate = setUTCPartsToDate(date);\r\n\t\t\tadjustedDate.setHours(ev.start_date.getHours());\r\n\t\t\tadjustedDate.setMinutes(ev.start_date.getMinutes());\r\n\t\t\tadjustedDate.setSeconds(ev.start_date.getSeconds());\r\n\t\t\treturn adjustedDate;\r\n\t\t});\r\n\t\tlet visibleCount = 0;\r\n\r\n\t\tconst eventDuration = ev.duration;\r\n\r\n\t\tfor (let i = 0; i < repeatedDates.length; i++) {\r\n\t\t\tif (maxCount && visibleCount >= maxCount) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tconst date = repeatedDates[i];\r\n\r\n\t\t\tlet exception = seriesExceptions[date.valueOf()];\r\n\t\t\tif (exception) {\r\n\t\t\t\tif (exception.deleted) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvisibleCount++;\r\n\t\t\t\t\tstack.push(exception);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tconst copy = scheduler._copy_event(ev);\r\n\t\t\t\t//copy._timed = ev._timed;\r\n\t\t\t\tcopy.text = ev.text;\r\n\t\t\t\tcopy.start_date = date;\r\n\t\t\t\tcopy.id = ev.id + \"#\" + Math.ceil(date.valueOf());\r\n\t\t\t\tcopy.end_date = new Date(date.valueOf() + eventDuration * 1000);\r\n\t\t\t\tcopy.end_date = scheduler._fix_daylight_saving_date(copy.start_date, copy.end_date, ev, date, copy.end_date);\r\n\t\t\t\tcopy._timed = scheduler.isOneDayEvent(copy);\r\n\r\n\r\n\r\n\t\t\t\tif (!copy._timed && !scheduler._table_view && !scheduler.config.multi_day) continue;\r\n\t\t\t\tstack.push(copy);\r\n\r\n\t\t\t\tif (!non_render) {\r\n\t\t\t\t\tscheduler._events[copy.id] = copy;\r\n\t\t\t\t\tscheduler._rec_temp.push(copy);\r\n\t\t\t\t}\r\n\t\t\t\tvisibleCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//GS-2534: case when exceptions have different dates\r\n\t\tif (seriesExceptions && repeatedDates.length == 0 ){\r\n\t\t\tfor (let a in seriesExceptions){\r\n\t\t\t\tlet exception = seriesExceptions[a];\r\n\t\t\t\tif (exception) {\r\n\t\t\t\t\tif(exception.deleted){\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\telse if (from && to && exception.start_date < to && exception.end_date > from) {\r\n\t\t\t\t\t\tstack.push(exception);\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t} \r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._fix_daylight_saving_date = function (start_date, end_date, ev, counter, default_date) {\r\n\t\tvar shift = start_date.getTimezoneOffset() - end_date.getTimezoneOffset();\r\n\t\tif (shift) {\r\n\t\t\tif (shift > 0) {\r\n\t\t\t\t// e.g. 24h -> 23h\r\n\t\t\t\treturn new Date(counter.valueOf() + ev.duration * 1000 - shift * 60 * 1000);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t// e.g. 24h -> 25h\r\n\t\t\t\treturn new Date(end_date.valueOf() - shift * 60 * 1000);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new Date(default_date.valueOf());\r\n\t};\r\n\tscheduler.getRecDates = function (id, max) {\r\n\t\tvar ev = typeof id == \"object\" ? id : scheduler.getEvent(id);\r\n\t\tvar recurrings = [];\r\n\t\tmax = max || 100;\r\n\r\n\t\tif (!isSeries(ev)) {\r\n\t\t\treturn [\r\n\t\t\t\t{ start_date: ev.start_date, end_date: ev.end_date }\r\n\t\t\t];\r\n\t\t}\r\n\t\tif (ev.deleted) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tscheduler.repeat_date(ev, recurrings, true, ev.start_date, ev.end_date, max);\r\n\r\n\t\tvar result = [];\r\n\t\tfor (var i = 0; i < recurrings.length; i++) {\r\n\t\t\tif (!recurrings[i].deleted) {\r\n\t\t\t\tresult.push({ start_date: recurrings[i].start_date, end_date: recurrings[i].end_date });\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t};\r\n\tscheduler.getEvents = function (from, to) {\r\n\t\tvar result = [];\r\n\t\tconst exceptions = groupExceptions();\r\n\t\tfor (var a in this._events) {\r\n\t\t\tvar ev = this._events[a];\r\n\t\t\tif (ev.recurring_event_id) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif (from && to && ev.start_date < to && ev.end_date > from) {\r\n\t\t\t\tif (isSeries(ev)) {\r\n\t\t\t\t\tvar sev = [];\r\n\t\t\t\t\tthis.repeat_date(ev, sev, true, from, to, undefined, exceptions);\r\n\t\t\t\t\tsev.forEach(function(occurence){\r\n\t\t\t\t\t\tif (occurence.start_date < to && occurence.end_date > from) {\r\n\t\t\t\t\t\t\tresult.push(occurence);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t// if it's virtual event we can skip it\r\n\t\t\t\t} else if (!this._is_virtual_event(ev.id)) {\r\n\t\t\t\t\tresult.push(ev);\r\n\t\t\t\t}\r\n\t\t\t} else if (!from && !to && !this._is_virtual_event(ev.id)) {\r\n\t\t\t\tresult.push(ev);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t};\r\n\r\n\t//drop secondary attributes\r\n\tscheduler._copy_dummy = function (ev) {\r\n\t\tvar start_date = new Date(this.start_date);\r\n\t\tvar end_date = new Date(this.end_date);\r\n\t\tthis.start_date = start_date;\r\n\t\tthis.end_date = end_date;\r\n\t\tthis.duration = this.rrule = null;\r\n\t};\r\n\r\n\tscheduler.config.include_end_by = false;\r\n\tscheduler.config.lightbox_recurring = 'ask'; // series, instance\r\n\tscheduler.config.recurring_workdays = [RRule.MO.weekday,RRule.TU.weekday,RRule.WE.weekday,RRule.TH.weekday,RRule.FR.weekday];\r\n\tscheduler.config.repeat_date = \"%m.%d.%Y\";\r\n\tscheduler.config.lightbox.sections = [\r\n\t\t{ name: \"description\", map_to: \"text\", type: \"textarea\", focus: true },\r\n\t\t{ name: \"recurring\", type: \"recurring\", map_to: \"rec_type\" },\r\n\t\t{ name: \"time\", height: 72, type: \"time\", map_to: \"auto\" }\r\n\t];\r\n\r\n\tscheduler.attachEvent(\"onClearAll\", function () {\r\n\t\tscheduler._rec_markers = {}; //clear recurring events data\r\n\t\tscheduler._rec_markers_pull = {};\r\n\t\tscheduler._rec_temp = [];\r\n\t});\r\n\r\n\r\n\tfunction getTopLevelOption(rruleObj, untilDate) {\r\n\t\tconst options = rruleObj.options;\r\n\t\tconst until = options.until || untilDate;\r\n\r\n\t\tconst hasEndCondition = options.count || (until && until.getFullYear() !== 9999);\r\n\r\n\t\tif (hasEndCondition) {\r\n\t\t\treturn 'CUSTOM';\r\n\t\t}\r\n\r\n\t\tif (options.freq === RRule.DAILY && options.interval === 1 && !options.byweekday) {\r\n\t\t\treturn 'DAILY';\r\n\t\t} else if (options.freq === RRule.WEEKLY && options.interval === 1 && !options.byweekday) {\r\n\t\t\treturn 'WEEKLY';\r\n\t\t} else if (options.freq === RRule.MONTHLY && options.interval === 1 && !options.bysetpos) {\r\n\t\t\treturn 'MONTHLY';\r\n\t\t} else if (options.freq === RRule.YEARLY && options.interval === 1 && !options.bysetpos) {\r\n\t\t\treturn 'YEARLY';\r\n\t\t} else if (options.freq === RRule.DAILY && options.byweekday && options.byweekday.length === scheduler.config.recurring_workdays.length &&\r\n\t\t\toptions.byweekday.includes(RRule.MO) &&\r\n\t\t\toptions.byweekday.includes(RRule.TU) &&\r\n\t\t\toptions.byweekday.includes(RRule.WE) &&\r\n\t\t\toptions.byweekday.includes(RRule.TH) &&\r\n\t\t\toptions.byweekday.includes(RRule.FR)) {\r\n\t\t\treturn 'WORKDAYS';\r\n\t\t} else {\r\n\t\t\treturn 'CUSTOM';\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction getWeekdayOfMonth(date) {\r\n\t\tconst dayOfWeek = date.getDay();\r\n\t\tconst dayOfMonth = date.getDate();\r\n\t\tconst dayNumber = Math.ceil(dayOfMonth / 7);\r\n\t\treturn { dayOfWeek, dayNumber };\r\n\t}\r\n\r\n\r\n\tconst jsDaysToRRULEDays = {\r\n\t\t0: \"SU\",\r\n\t\t1: \"MO\",\r\n\t\t2: \"TU\",\r\n\t\t3: \"WE\",\r\n\t\t4: \"TH\",\r\n\t\t5: \"FR\",\r\n\t\t6: \"SA\"\r\n\t};\r\n\tconst RruleDayNumsToJs = {\r\n\t\t0: 1,\r\n\t\t1: 2,\r\n\t\t2: 3,\r\n\t\t3: 4,\r\n\t\t4: 5,\r\n\t\t5: 6,\r\n\t\t6: 0\r\n\t};\r\n\r\n\tfunction fillCustomDaily(node, rule) {\r\n\t\tnode.querySelector(\"[name='repeat_interval_value']\").value = (rule ? rule.interval : 1) || 1;\r\n\t}\r\n\r\n\tfunction fillCustomWeekly(node, rule, event) {\r\n\t\tnode.querySelector(\"[name='repeat_interval_value']\").value = (rule ? rule.interval : 1) || 1;\r\n\r\n\t\tconst dayCheckboxes = node.querySelectorAll(`.dhx_form_repeat_custom_week input`);\r\n\t\tdayCheckboxes.forEach((ch) => ch.checked = false);\r\n\t\tif (rule && rule.byweekday) {\r\n\t\t\trule.byweekday.forEach((day) => {\r\n\t\t\t\tconst dayNum = RruleDayNumsToJs[day.weekday];\r\n\t\t\t\tconst dayLabel = jsDaysToRRULEDays[dayNum];\r\n\t\t\t\tnode.querySelector(`.dhx_form_repeat_custom_week input[value=\"${dayLabel}\"]`).checked = true;\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tconst dayLabel = jsDaysToRRULEDays[event.start_date.getDay()];\r\n\t\t\tnode.querySelector(`.dhx_form_repeat_custom_week input[value=\"${dayLabel}\"]`).checked = true;\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tfunction fillCustomMonthly(node, rule, event) {\r\n\t\tnode.querySelector(\"[name='repeat_interval_value']\").value = (rule ? rule.interval : 1) || 1;\r\n\r\n\t\tconst dateOfMonth = node.querySelector(`.dhx_form_repeat_custom_month [value=\"month_date\"]`);\r\n\t\tconst nthWeekDayOfMonth = node.querySelector(`.dhx_form_repeat_custom_month [value=\"month_nth_weekday\"]`);\r\n\t\tdateOfMonth.innerText = scheduler.templates.repeat_monthly_date(event.start_date, event);\r\n\t\tnthWeekDayOfMonth.innerText = scheduler.templates.repeat_monthly_weekday(event.start_date, event);\r\n\r\n\t\tif (!rule || (rule.bysetpos && !(rule.byweekday && rule.byweekday.length))) {\r\n\t\t\tnode.querySelector(`[name=\"dhx_custom_month_option\"]`).value = \"month_date\";\r\n\t\t} else {\r\n\t\t\tnode.querySelector(`[name=\"dhx_custom_month_option\"]`).value = \"month_nth_weekday\";\r\n\t\t}\r\n\t}\r\n\r\n\tfunction formatDayNumber(date){\r\n\t\tswitch (date) {\r\n\t\t\tcase 1:\r\n\t\t\tcase 31:\r\n\t\t\t\treturn `${date}st`;\r\n\t\t\tcase 2:\r\n\t\t\t\treturn `${date}nd`;\r\n\t\t\tcase 3:\r\n\t\t\t\treturn `${date}rd`;\r\n\t\t\tdefault:\r\n\t\t\t\treturn `${date}th`;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.templates.repeat_monthly_date = function(startDate, event) {\r\n\t\tconst date = startDate.getDate();\r\n\t\treturn `Every ${formatDayNumber(date)}`;\r\n\t};\r\n\tscheduler.templates.repeat_monthly_weekday = function(startDate, event) {\r\n\t\tconst nthDayOfMonth = getWeekdayOfMonth(startDate);\r\n\t\treturn `Every ${formatDayNumber(nthDayOfMonth.dayNumber)} ${scheduler.locale.date.day_full[nthDayOfMonth.dayOfWeek]}`;\r\n\t};\r\n\t\r\n\tscheduler.templates.repeat_yearly_month_date = function(startDate, event) {\r\n\t\tconst date = startDate.getDate();\r\n\t\tconst monthLabel = scheduler.locale.date.month_full[startDate.getMonth()];\r\n\t\treturn `Every ${formatDayNumber(date)} day of ${monthLabel}`;\r\n\t};\r\n\tscheduler.templates.repeat_yearly_month_weekday = function(startDate, event) {\r\n\t\tconst nthDayOfMonth = getWeekdayOfMonth(startDate);\r\n\t\tconst monthLabel = scheduler.locale.date.month_full[startDate.getMonth()];\r\n\t\treturn `Every ${formatDayNumber(nthDayOfMonth.dayNumber)} ${scheduler.locale.date.day_full[nthDayOfMonth.dayOfWeek]} of ${monthLabel}`;\r\n\t};\r\n\r\n\tfunction fillCustomYearly(node, rule, event) {\r\n\t\tconst dateOfYear = node.querySelector(`.dhx_form_repeat_custom_year [value=\"month_date\"]`);\r\n\t\tconst nthWeekDayOfYear = node.querySelector(`.dhx_form_repeat_custom_year [value=\"month_nth_weekday\"]`);\r\n\t\tdateOfYear.innerText = scheduler.templates.repeat_yearly_month_date(event.start_date, event);\r\n\t\tnthWeekDayOfYear.innerText = scheduler.templates.repeat_yearly_month_weekday(event.start_date, event);\r\n\r\n\t\tif (!rule || (rule.bysetpos && !(rule.byweekday && rule.byweekday.length))) {\r\n\t\t\tnode.querySelector(`[name=\"dhx_custom_year_option\"]`).value = \"month_date\";\r\n\t\t} else {\r\n\t\t\tnode.querySelector(`[name=\"dhx_custom_year_option\"]`).value = \"month_nth_weekday\";\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fillEndRule(node, rule, event) {\r\n\t\tconst countInput = node.querySelector(`.dhx_form_repeat_ends_extra [name=\"dhx_form_repeat_ends_after\"]`);\r\n\t\tconst ondateInput = node.querySelector(`.dhx_form_repeat_ends_extra [name=\"dhx_form_repeat_ends_ondate\"]`);\r\n\t\tconst endOptionSelect = node.querySelector(`[name='dhx_custom_repeat_ends']`);\r\n\t\tcountInput.value = 1;\r\n\r\n\t\tlet formatter = scheduler.date.date_to_str(\"%Y-%m-%d\");\r\n\t\tif (!scheduler.config.repeat_date_of_end) {\r\n\t\t\tscheduler.config.repeat_date_of_end = formatter(scheduler.date.add(scheduler._currentDate(), 30, \"day\"));\r\n\t\t}\r\n\t\tondateInput.value = scheduler.config.repeat_date_of_end;\r\n\r\n\t\tif (rule && rule.count) {\r\n\t\t\tendOptionSelect.value = \"AFTER\";\r\n\t\t\tcountInput.value = rule.count;\r\n\t\t} else if (event._end_date && event._end_date.getFullYear() !== 9999) {\r\n\t\t\tendOptionSelect.value = \"ON\";\r\n\t\t\tondateInput.value = formatter(event._end_date);\r\n\t\t} else {\r\n\t\t\tendOptionSelect.value = \"NEVER\";\r\n\t\t}\r\n\t\tendOptionSelect.dispatchEvent(new Event(\"change\"));\r\n\t}\r\n\r\n\tconst getRecValue = {\r\n\t\tMONTHLY: function (dates) {\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.MONTHLY,\r\n\t\t\t\tinterval: 1,\r\n\t\t\t\tbymonthday: dates.start.getDate()\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tWEEKLY: function (dates) {\r\n\t\t\tlet day = dates.start.getDay() - 1;\r\n\t\t\tif (day == -1) day = 6;\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.WEEKLY,\r\n\t\t\t\tinterval: 1,\r\n\t\t\t\tbyweekday: [day]\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tDAILY: function (dates) {\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.DAILY,\r\n\t\t\t\tinterval: 1\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tYEARLY: function (dates) {\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.YEARLY,\r\n\t\t\t\tbymonth: dates.start.getMonth() + 1,\r\n\t\t\t\tinterval: 1,\r\n\t\t\t\tbymonthday: dates.start.getDate()\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tWORKDAYS: function (dates) {\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.WEEKLY,\r\n\t\t\t\tinterval: 1,\r\n\t\t\t\tbyweekday: scheduler.config.recurring_workdays\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tCUSTOM: function (dates, node) {\r\n\t\t\tconst rrule = {};\r\n\t\t\tconst freq = node.querySelector(`[name=\"repeat_interval_unit\"]`).value;\r\n\t\t\tconst interval = Math.max(1, node.querySelector(`[name=\"repeat_interval_value\"]`).value);\r\n\t\t\tconst monthRepeat = node.querySelector(`[name=\"dhx_custom_month_option\"]`).value;\r\n\t\t\tconst yearRepeat = node.querySelector(`[name=\"dhx_custom_year_option\"]`).value;\r\n\r\n\t\t\trrule.interval = interval;\r\n\t\t\tlet days;\r\n\t\t\tlet day;\r\n\r\n\t\t\tswitch (freq) {\r\n\t\t\t\tcase \"DAILY\":\r\n\t\t\t\t\trrule.freq = RRule.DAILY;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"WEEKLY\": \r\n\t\t\t\t\trrule.freq = RRule.WEEKLY;\r\n\t\t\t\t\tdays = [];\r\n\t\t\t\t\tnode.querySelectorAll(`.dhx_form_repeat_custom_week [name=\"week_day\"]`).forEach((ch) => {\r\n\t\t\t\t\t\tif(ch.checked){\r\n\t\t\t\t\t\t\tdays.push(ch.value);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\trrule.byweekday = days.map((day) => {\r\n\t\t\t\t\t\tswitch (day) {\r\n\t\t\t\t\t\t\tcase \"MO\":\r\n\t\t\t\t\t\t\t\treturn RRule.MO.weekday;\r\n\t\t\t\t\t\t\tcase \"TU\":\r\n\t\t\t\t\t\t\t\treturn RRule.TU.weekday;\r\n\t\t\t\t\t\t\tcase \"WE\":\r\n\t\t\t\t\t\t\t\treturn RRule.WE.weekday;\r\n\t\t\t\t\t\t\tcase \"TH\":\r\n\t\t\t\t\t\t\t\treturn RRule.TH.weekday;\r\n\t\t\t\t\t\t\tcase \"FR\":\r\n\t\t\t\t\t\t\t\treturn RRule.FR.weekday;\r\n\t\t\t\t\t\t\tcase \"SA\":\r\n\t\t\t\t\t\t\t\treturn RRule.SA.weekday;\r\n\t\t\t\t\t\t\tcase \"SU\":\r\n\t\t\t\t\t\t\t\treturn RRule.SU.weekday;\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"MONTHLY\":\r\n\t\t\t\t\trrule.freq = RRule.MONTHLY;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (monthRepeat === \"month_date\") {\r\n\t\t\t\t\t\trrule.bymonthday = dates.start.getDate();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tday = dates.start.getDay() - 1;\r\n\t\t\t\t\t\tif (day == -1) day = 6;\r\n\t\t\t\t\t\trrule.byweekday = [day];\r\n\t\t\t\t\t\trrule.bysetpos = getWeekdayOfMonth(dates.start).dayNumber;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"YEARLY\":\r\n\t\t\t\t\trrule.freq = RRule.YEARLY;\r\n\t\t\t\t\trrule.bymonth = dates.start.getMonth() + 1;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (yearRepeat == \"month_date\") {\r\n\t\t\t\t\t\trrule.bymonthday = dates.start.getDate();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tday = dates.start.getDay() - 1;\r\n\t\t\t\t\t\tif (day == -1) day = 6;\r\n\t\t\t\t\t\trrule.byweekday = [day];\r\n\t\t\t\t\t\trrule.bysetpos = getWeekdayOfMonth(dates.start).dayNumber;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tconst formatFunc = scheduler.date.str_to_date(\"%Y-%m-%d\");\r\n\t\t\tlet until = new Date(9999, 1, 1);\r\n\t\t\tconst endRule = node.querySelector(`[name=\"dhx_custom_repeat_ends\"]`);\r\n\t\t\tif(endRule.value === \"ON\"){\r\n\t\t\t\tuntil = formatFunc(node.querySelector(`[name=\"dhx_form_repeat_ends_ondate\"]`).value);\r\n\t\t\t} else if(endRule.value === \"AFTER\") {\r\n\t\t\t\trrule.count = Math.max(1, node.querySelector(`[name=\"dhx_form_repeat_ends_after\"]`).value);\r\n\t\t\t}\r\n\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tNEVER: function () {\r\n\t\t}\r\n\t};\r\n\r\n\tfunction fillInDefaults(node, rule, event) {\r\n\t\tfillCustomDaily(node, rule, event);\r\n\t\tfillCustomWeekly(node, rule, event);\r\n\t\tfillCustomMonthly(node, rule, event);\r\n\t\tfillCustomYearly(node, rule, event);\r\n\t\tfillEndRule(node, rule, event);\r\n\t}\r\n\tscheduler.form_blocks[\"recurring\"] = {\r\n\t\trender: function (sns) {\r\n\t\t\tif (sns.form) {\r\n\t\t\t\tlet rec = scheduler.form_blocks[\"recurring\"];\r\n\t\t\t\tlet form = rec._get_node(sns.form);\r\n\t\t\t\tlet html = rec._outer_html(form);\r\n\t\t\t\tform.style.display = 'none';\r\n\t\t\t\treturn html;\r\n\t\t\t}\r\n\t\t\tlet loc = scheduler.locale.labels;\r\n\r\n\t\t\treturn `
\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t
\r\n\r\n\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t
\r\n\r\n\t\t\t
\r\n\t\t\t\t
${loc.repeat_ends}
\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\r\n\t\t
\r\n\t
`;\r\n\t\t},\r\n\r\n\t\r\n\t\t_init_set_value: function (node, value, event) {\r\n\t\t\tscheduler.form_blocks[\"recurring\"]._ds = { start: event.start_date, end: event.end_date };\r\n\t\t\tfunction hide(node) {\r\n\t\t\t\tnode.classList.add(\"dhx_hidden\");\r\n\t\t\t}\r\n\t\t\tfunction show(node) {\r\n\t\t\t\tnode.classList.remove(\"dhx_hidden\");\r\n\t\t\t}\r\n\t\t\tfunction onRepeatOptionChange(value) {\r\n\t\t\t\tconst repeat = node.querySelector(\".dhx_form_repeat_custom\");\r\n\t\t\t\tif (value === \"CUSTOM\") {\r\n\t\t\t\t\tshow(repeat);\r\n\t\t\t\t} else {\r\n\t\t\t\t\thide(repeat);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction onCustomRepeatIntervalChange(value) {\r\n\t\t\t\tconst nodes = {\r\n\t\t\t\t\tweekly: node.querySelector(\".dhx_form_repeat_custom_week\"),\r\n\t\t\t\t\tmonthly: node.querySelector(\".dhx_form_repeat_custom_month\"),\r\n\t\t\t\t\tyearly: node.querySelector(\".dhx_form_repeat_custom_year\")\r\n\t\t\t\t};\r\n\t\t\t\tswitch (value) {\r\n\t\t\t\t\tcase \"DAILY\":\r\n\t\t\t\t\t\thide(nodes.weekly);\r\n\t\t\t\t\t\thide(nodes.monthly);\r\n\t\t\t\t\t\thide(nodes.yearly);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"WEEKLY\":\r\n\t\t\t\t\t\tshow(nodes.weekly);\r\n\t\t\t\t\t\thide(nodes.monthly);\r\n\t\t\t\t\t\thide(nodes.yearly);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"MONTHLY\":\r\n\t\t\t\t\t\thide(nodes.weekly);\r\n\t\t\t\t\t\tshow(nodes.monthly);\r\n\t\t\t\t\t\thide(nodes.yearly);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"YEARLY\":\r\n\t\t\t\t\t\thide(nodes.weekly);\r\n\t\t\t\t\t\thide(nodes.monthly);\r\n\t\t\t\t\t\tshow(nodes.yearly);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction onCustomRepeatEndRule(value) {\r\n\t\t\t\tconst nodes = {\r\n\t\t\t\t\tafter: node.querySelector(\".dhx_form_repeat_ends_extra .dhx_form_repeat_ends_after\"),\r\n\t\t\t\t\ton: node.querySelector(\".dhx_form_repeat_ends_extra .dhx_form_repeat_ends_on\")\r\n\t\t\t\t};\r\n\t\t\t\tswitch (value) {\r\n\t\t\t\t\tcase \"NEVER\":\r\n\t\t\t\t\t\thide(nodes.after);\r\n\t\t\t\t\t\thide(nodes.on);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"AFTER\":\r\n\t\t\t\t\t\tshow(nodes.after);\r\n\t\t\t\t\t\thide(nodes.on);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"ON\":\r\n\t\t\t\t\t\thide(nodes.after);\r\n\t\t\t\t\t\tshow(nodes.on);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// repeat section change\r\n\t\t\tnode.querySelector(\".dhx_form_repeat_pattern select\").addEventListener(\"change\", function () {\r\n\t\t\t\tonRepeatOptionChange(this.value);\r\n\t\t\t});\r\n\r\n\t\t\t// custom repeat interval change\r\n\t\t\tnode.querySelector(\".dhx_form_repeat_custom_interval [name='repeat_interval_unit']\").addEventListener(\"change\", function () {\r\n\t\t\t\tonCustomRepeatIntervalChange(this.value);\r\n\t\t\t});\r\n\r\n\t\t\t// custom repeat end rule\r\n\t\t\tnode.querySelector(\".dhx_form_repeat_ends [name='dhx_custom_repeat_ends']\").addEventListener(\"change\", function () {\r\n\t\t\t\tonCustomRepeatEndRule(this.value);\r\n\t\t\t});\r\n\r\n\t\t\tscheduler._lightbox._rec_init_done = true;\r\n\t\t},\r\n\t\tbutton_click: function(){},\r\n\t\tset_value: function (node, value, ev) {\r\n\t\t\tlet rf = scheduler.form_blocks[\"recurring\"];\r\n\t\t\tif (!scheduler._lightbox._rec_init_done)\r\n\t\t\t\trf._init_set_value(node, value, ev);\r\n\t\t\tnode.open = !ev.rrule;\r\n\r\n\t\t\tnode.blocked = this._is_modified_occurence(ev);\r\n\r\n\t\t\tlet ds = rf._ds;\r\n\t\t\tds.start = ev.start_date;\r\n\t\t\tds.end = ev._end_date;\r\n\r\n\t\t\tif (ev.rrule) {\r\n\t\t\t\tconst rruleset = rrulestr(ev.rrule);\r\n\t\t\t\tfillInDefaults(node, rruleset.origOptions, ev);\r\n\t\t\t\tconst topOption = getTopLevelOption(rruleset, ev._end_date);\r\n\t\t\t\tnode.querySelector(\".dhx_form_repeat_pattern select\").value = topOption;\r\n\t\t\t\tif(topOption === \"CUSTOM\"){\r\n\t\t\t\t\tlet customFreq;\r\n\t\t\t\t\tswitch (rruleset.origOptions.freq) {\r\n\t\t\t\t\t\tcase RRule.DAILY:\r\n\t\t\t\t\t\t\tcustomFreq = \"DAILY\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase RRule.WEEKLY:\r\n\t\t\t\t\t\t\tcustomFreq = \"WEEKLY\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase RRule.MONTHLY:\r\n\t\t\t\t\t\t\tcustomFreq = \"MONTHLY\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase RRule.YEARLY:\r\n\t\t\t\t\t\t\tcustomFreq = \"YEARLY\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(customFreq){\r\n\t\t\t\t\t\tnode.querySelector(`[name=\"repeat_interval_unit\"]`).value = customFreq;\r\n\t\t\t\t\t\tnode.querySelector(`[name=\"repeat_interval_unit\"]`).dispatchEvent(new Event(\"change\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t//\trepeat_interval_unit\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tfillInDefaults(node, null, ev);\r\n\t\t\t\tnode.querySelector(\".dhx_form_repeat_pattern select\").value = \"NEVER\";\r\n\t\t\t}\r\n\t\t\tnode.querySelector(\".dhx_form_repeat_pattern select\").dispatchEvent(new Event(\"change\"));\r\n\r\n\t\t},\r\n\t\tget_value: function (node, ev) {\r\n\t\t\t\r\n\t\t\tif(!node.blocked && node.querySelector(\".dhx_form_repeat_pattern select\").value !== \"NEVER\") {\r\n\t\t\t\tlet ds = scheduler.form_blocks[\"recurring\"]._ds;\r\n\t\t\t\tlet actual_dates = {};\r\n\r\n\t\t\t\tlet timeControl = getTimeSection();\r\n\r\n\t\t\t\ttimeControl.getValue(actual_dates);\r\n\t\t\t\tds.start = actual_dates.start_date;\r\n\t\t\t\tconst pattern = node.querySelector(\".dhx_form_repeat_pattern select\").value;\r\n\t\t\t\tconst recurrence = getRecValue[pattern](ds, node);\r\n\t\t\t\tev.rrule = new RRule(recurrence.rrule).toString().replace(\"RRULE:\", \"\");\r\n\t\t\t\tds.end = recurrence.until;\r\n\r\n\t\t\t\tev.duration = Math.floor((actual_dates.end_date - actual_dates.start_date) / 1000);\r\n\r\n\t\t\t\tif (ds._start) {\r\n\t\t\t\t\tev.start_date = new Date(ds.start);\r\n\t\t\t\t\tev._start_date = new Date(ds.start);\r\n\t\t\t\t\tds._start = false;\r\n\t\t\t\t} else\r\n\t\t\t\t\tev._start_date = null;\r\n\r\n\t\t\t\tev._end_date = ds.end;\r\n\t\t\t}else{\r\n\t\t\t\tev.rrule = ev.rrule = \"\";\r\n\t\t\t\tev._end_date = ev.end_date;\r\n\t\t\t}\r\n\r\n\t\t\treturn ev.rrule;\r\n\t\t},\r\n\r\n\t\tfocus: function (node) {\r\n\t\t}\r\n\t};\r\n\r\n\tfunction getTimeSection() {\r\n\t\tlet timeControl = scheduler.formSection('time');\r\n\t\tif (!timeControl) {\r\n\t\t\ttimeControl = getFirstSectionOfType('time');\r\n\t\t}\r\n\t\tif (!timeControl) {\r\n\t\t\ttimeControl = getFirstSectionOfType('calendar_time');\r\n\t\t}\r\n\r\n\r\n\t\tif (!timeControl) {\r\n\t\t\tthrow new Error([\"Can't calculate the recurring rule, the Recurring form block can't find the Time control. Make sure you have the time control in 'scheduler.config.lightbox.sections' config.\",\r\n\t\t\t\t\"You can use either the default time control https://docs.dhtmlx.com/scheduler/time.html, or the datepicker https://docs.dhtmlx.com/scheduler/minicalendar.html, or a custom control. \",\r\n\t\t\t\t\"In the latter case, make sure the control is named \\\"time\\\":\",\r\n\t\t\t\t\"\",\r\n\t\t\t\t\"scheduler.config.lightbox.sections = [\",\r\n\t\t\t\t\"{name:\\\"time\\\", height:72, type:\\\"YOU CONTROL\\\", map_to:\\\"auto\\\" }];\"]\r\n\t\t\t\t.join(\"\\n\"));\r\n\t\t}\r\n\r\n\t\treturn timeControl;\r\n\t}\r\n\r\n\tfunction getFirstSectionOfType(type) {\r\n\t\tfor (let i = 0; i < scheduler.config.lightbox.sections.length; i++) {\r\n\t\t\tlet section = scheduler.config.lightbox.sections[i];\r\n\t\t\tif (section.type === type) {\r\n\t\t\t\treturn scheduler.formSection(section.name);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.occurrence_timestamp_in_utc = false;\r\nscheduler.config.recurring_workdays = [1,2,3,4,5];\r\nscheduler.form_blocks[\"recurring\"] = {\r\n\t_get_node : function(node){\r\n\t\tif (typeof node == \"string\"){\r\n\t\t\tlet element = scheduler._lightbox.querySelector(`#${node}`);\r\n\t\t\tif(!element){\r\n\t\t\t\t// form is detached from lightbox \r\n\t\t\t\t// search globally, won't work in LWC\r\n\t\t\t\telement = document.getElementById(node);\r\n\t\t\t}\r\n\t\t\tnode = element;\r\n\t\t}\r\n\t\tif (node.style.display == 'none')\r\n\t\t\tnode.style.display = \"\";\r\n\t\treturn node;\r\n\t},\r\n\t_outer_html: function(node){\r\n\t\treturn node.outerHTML || getOuterHTML(node);\r\n\r\n\t\t//probably not needed, FF v10- only\r\n\t\tfunction getOuterHTML(n){\r\n\t\t\tvar div = document.createElement('div'), h;\r\n\t\t\tdiv.appendChild( n.cloneNode(true) );\r\n\t\t\th = div.innerHTML;\r\n\t\t\tdiv = null;\r\n\t\t\treturn h;\r\n\t\t}\r\n\t},\r\n\trender:function(sns) {\r\n\t\tif(sns.form){\r\n\t\t\tvar rec = scheduler.form_blocks[\"recurring\"];\r\n\t\t\tvar form = rec._get_node(sns.form);\r\n\t\t\tvar html = rec._outer_html(form);\r\n\t\t\tform.style.display = 'none';\r\n\t\t\treturn html;\r\n\t\t}\r\n\t\tvar loc = scheduler.locale.labels;\r\n\t\treturn '
'+\r\n\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r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\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t''+loc.repeat_text_occurences_count+'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t'
'+\r\n\t\t\t\t'
'+\r\n\t\t\t\t'';\r\n\t},\r\n\t_ds: {},\r\n\t_get_form_node: function(els, name, value){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return null;\r\n\t\tif(col.nodeName) return col;\r\n\r\n\t\tif(col.length){\r\n\t\t\tfor(var i=0; i < col.length; i++){\r\n\t\t\t\tif(col[i].value == value)\r\n\t\t\t\t\treturn col[i];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\t_get_node_value: function(els, name, multiselect){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return \"\";\r\n\t\tif(col.length){\r\n\t\t\tif(multiselect){\r\n\t\t\t\tvar res = [];\r\n\t\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\t\tif (col[i].checked) res.push(col[i].value);\r\n\r\n\t\t\t\treturn res;\r\n\t\t\t}else{\r\n\t\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\t\tif (col[i].checked) return col[i].value;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(col.value)\r\n\t\t\treturn !multiselect ? col.value : [col.value];\r\n\t},\r\n\r\n\t_get_node_numeric_value: function(els, name){\r\n\t\tvar value = scheduler.form_blocks[\"recurring\"]._get_node_value(els, name);\r\n\t\treturn ((value * 1) || 0);\r\n\t},\r\n\r\n\t_set_node_value: function(els, name, value){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return;\r\n\r\n\t\tif(col.name == name){\r\n\t\t\tcol.value = value;\r\n\t\t}else if(col.length){\r\n\t\t\tvar hash_value = typeof value == \"object\";\r\n\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\tif (hash_value || col[i].value == value){\r\n\t\t\t\t\tcol[i].checked = hash_value ? !!value[col[i].value] : !!value;\r\n\t\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_init_set_value:function(node, value, ev) {\r\n\t\tvar block = scheduler.form_blocks[\"recurring\"];\r\n\t\tvar get_value = block._get_node_value;\r\n\t\tvar set_value = block._set_node_value;\r\n\t\tscheduler.form_blocks[\"recurring\"]._ds = {start:ev.start_date, end:ev._end_date};\r\n\r\n\t\tvar str_date_format = scheduler.date.str_to_date(scheduler.config.repeat_date, false, true);\r\n\t\tvar str_date = function(str_date) {\r\n\t\t\tvar date = str_date_format(str_date);\r\n\t\t\tif (scheduler.config.include_end_by)\r\n\t\t\t\tdate = scheduler.date.add(date, 1, 'day');\r\n\t\t\treturn date;\r\n\t\t};\r\n\r\n\t\tvar date_str = scheduler.date.date_to_str(scheduler.config.repeat_date);\r\n\r\n\t\tvar top = node.getElementsByTagName(\"FORM\")[0];\r\n\t\tvar els = {};\r\n\r\n\t\tfunction register_els(inps) {\r\n\t\t\tfor (var i = 0; i < inps.length; i++) {\r\n\t\t\t\tvar inp = inps[i];\r\n\r\n\t\t\t\tif(inp.name){\r\n\t\t\t\t\tif(!els[inp.name]){\r\n\t\t\t\t\t\tels[inp.name] = inp;\r\n\t\t\t\t\t}else if(els[inp.name].nodeType){\r\n\t\t\t\t\t\tvar node = els[inp.name];\r\n\t\t\t\t\t\tels[inp.name] = [node, inp];\r\n\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tels[inp.name].push(inp);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tregister_els(top.getElementsByTagName(\"INPUT\"));\r\n\t\tregister_els(top.getElementsByTagName(\"SELECT\"));\r\n\r\n\t\tif (!scheduler.config.repeat_date_of_end) {\r\n\t\t\tvar formatter = scheduler.date.date_to_str(scheduler.config.repeat_date);\r\n\t\t\tscheduler.config.repeat_date_of_end = formatter(scheduler.date.add(scheduler._currentDate(), 30, \"day\"));\r\n\t\t}\r\n\t\tset_value(els, \"date_of_end\", scheduler.config.repeat_date_of_end);\r\n\r\n\t\tvar $ = function(a) {\r\n\t\t\treturn scheduler._lightbox.querySelector(`#${a}`) || { style:{} };//return fake object if node not found\r\n\t\t};\r\n\r\n\t\tfunction change_current_view() {\r\n\t\t\t$(\"dhx_repeat_day\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_week\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_month\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_year\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_\" + this.value).style.display = \"\";\r\n\t\t\tscheduler.setLightboxSize();\r\n\t\t}\r\n\r\n\t\tfunction get_repeat_code(dates) {\r\n\t\t\tvar code = [get_value(els, \"repeat\")];\r\n\t\t\tget_rcode[code[0]](code, dates);\r\n\r\n\t\t\twhile (code.length < 5) code.push(\"\");\r\n\t\t\tvar repeat = \"\";\r\n\r\n\t\t\tvar end = get_end_rule(els);\r\n\r\n\t\t\tif (end == \"no\") {\r\n\t\t\t\tdates.end = new Date(9999, 1, 1);\r\n\t\t\t\trepeat = \"no\";\r\n\t\t\t}\r\n\t\t\telse if (end == \"date_of_end\") {\r\n\t\t\t\tdates.end = str_date(get_value(els, \"date_of_end\"));\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tscheduler.transpose_type(code.join(\"_\"));\r\n\t\t\t\trepeat = Math.max(1, get_value(els, \"occurences_count\"));\r\n\r\n\t\t\t\tvar transp = 0;\r\n\r\n\t\t\t\t//var transp = ((code[0] == \"week\" && code[4] && code[4].toString().indexOf(scheduler.config.start_on_monday ? 1 : 0) == -1) ? 1 : 0);\r\n\r\n\t\t\t\t// which is equal to following code, seems to produce extra instance, not clear why needed\r\n\r\n\t\t\t\t/*if(code[0] == \"week\"){\r\n\t\t\t\t\tvar days = code[4] || \"\";\r\n\t\t\t\t\tif(scheduler.config.start_on_monday){\r\n\t\t\t\t\t\tif(days.indexOf(1) == -1)\r\n\t\t\t\t\t\ttransp = 1;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(days.indexOf(0) == -1)\r\n\t\t\t\t\t\ttransp = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}*/\r\n\r\n\t\t\t//\tdates.end = scheduler.date.add(new Date(dates.start), repeat + transp, code.join(\"_\"));\r\n\r\n\t\t\t\tdates.end = scheduler.date[\"add_\" + code.join(\"_\")](new Date(dates.start), repeat + transp, {start_date: dates.start}) || dates.start;\r\n\t\t\t}\r\n\r\n\t\t\treturn code.join(\"_\") + \"#\" + repeat;\r\n\t\t}\r\n\t\tfunction get_end_rule(els){\r\n\t\t\tvar end = els[\"end\"];\r\n\t\t\tif(end.length){\r\n\t\t\t\tfor(var i =0; i < end.length; i++){\r\n\t\t\t\t\tif(end[i].checked){\r\n\t\t\t\t\t\tif(end[i].value && end[i].value != \"on\"){//seems to be default value:var input = document.createElement(\"input\"); input.type = \"radio\"; input.value\r\n\t\t\t\t\t\t\treturn end[i].value;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif(!i){\r\n\t\t\t\t\t\t\t\treturn \"no\";\r\n\t\t\t\t\t\t\t}else if(i == 2){\r\n\t\t\t\t\t\t\t\treturn \"date_of_end\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\treturn \"occurences_count\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(end.value)\r\n\t\t\t\t\treturn end.value;\r\n\t\t\t}\r\n\t\t\treturn \"no\";\r\n\t\t}\r\n\t\tfunction set_end_rule(els, value){\r\n\t\t\tvar end = els[\"end\"];\r\n\r\n\t\t\tif(end.length){\r\n\t\t\t\tvar has_values = !!end[0].value && end[0].value != \"on\";\r\n\t\t\t\tif(has_values){\r\n\t\t\t\t\tfor(var i =0; i < end.length; i++){\r\n\t\t\t\t\t\tif(end[i].value == value)\r\n\t\t\t\t\t\t\tend[i].checked = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar ind = 0;\r\n\t\t\t\t\tswitch(value){\r\n\t\t\t\t\t\tcase \"no\":\r\n\t\t\t\t\t\t\tind = 0;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"date_of_end\":\r\n\t\t\t\t\t\t\tind = 2;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tind = 1;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend[ind].checked = true;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tend.value = value;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tscheduler.form_blocks[\"recurring\"]._get_repeat_code = get_repeat_code;\r\n\t\tvar get_rcode = {\r\n\t\t\tmonth:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tif (get_value(els, \"month_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_count\")));\r\n\t\t\t\t\tdates.start.setDate(get_value(els, \"month_day\"));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_count2\")));\r\n\t\t\t\t\tcode.push( get_value(els, \"month_day2\"));\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_week2\")));\r\n\t\t\t\t\tif (!scheduler.config.repeat_precise){\r\n\t\t\t\t\t\tdates.start.setDate(1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tdates._start = true;\r\n\t\t\t},\r\n\t\t\tweek:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"week_count\")));\r\n\t\t\t\tcode.push(\"\");\r\n\t\t\t\tcode.push(\"\");\r\n\t\t\t\tvar t = [];\r\n\r\n\t\t\t\tvar col = get_value(els, \"week_day\", true);\r\n\t\t\t\t//var col = els[\"week_day\"];\r\n\t\t\t\tvar day = dates.start.getDay();\r\n\t\t\t\tvar start_exists = false;\r\n\r\n\t\t\t\tfor (var i = 0; i < col.length; i++){\r\n\t\t\t\t\tt.push(col[i]);\r\n\t\t\t\t\tstart_exists = start_exists || col[i] == day;\r\n\t\t\t\t}\r\n\t\t\t\tif (!t.length){\r\n\t\t\t\t\tt.push(day);\r\n\t\t\t\t\tstart_exists = true;\r\n\t\t\t\t}\r\n\t\t\t\tt.sort();\r\n\r\n\r\n\t\t\t\tif (!scheduler.config.repeat_precise){\r\n\t\t\t\t\tdates.start = scheduler.date.week_start(dates.start);\r\n\t\t\t\t\tdates._start = true;\r\n\t\t\t\t} else if (!start_exists){\r\n\t\t\t\t\tscheduler.transpose_day_week(dates.start, t, 1, 7);\r\n\t\t\t\t\tdates._start = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcode.push(t.join(\",\"));\r\n\t\t\t},\r\n\t\t\tday:function(code) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tif (get_value(els, \"day_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"day_count\")));\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcode.push(\"week\");\r\n\t\t\t\t\tcode.push(1);\r\n\t\t\t\t\tcode.push(\"\");\r\n\t\t\t\t\tcode.push(\"\");\r\n\t\t\t\t\tcode.push(scheduler.config.recurring_workdays.join(\",\"));\r\n\t\t\t\t\tcode.splice(0, 1);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tyear:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\r\n\t\t\t\tif (get_value(els, \"year_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(\"1\");\r\n\t\t\t\t\tdates.start.setMonth(0);\r\n\t\t\t\t\tdates.start.setDate(get_value(els, \"year_day\"));\r\n\t\t\t\t\tdates.start.setMonth(get_value(els, \"year_month\"));\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcode.push(\"1\");\r\n\t\t\t\t\tcode.push(get_value(els, \"year_day2\"));\r\n\t\t\t\t\tcode.push(get_value(els, \"year_week2\"));\r\n\t\t\t\t\tdates.start.setDate(1);\r\n\t\t\t\t\tdates.start.setMonth(get_value(els, \"year_month2\"));\r\n\t\t\t\t}\r\n\t\t\t\tdates._start = true;\r\n\t\t\t}\r\n\t\t};\r\n\t\tvar set_rcode = {\r\n\t\t\tweek:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\t\tset_value(els, \"week_count\", code[1]);\r\n\r\n\t\t\t\tvar t = code[4].split(\",\");\r\n\t\t\t\tvar d = {};\r\n\t\t\t\tfor (var i = 0; i < t.length; i++) d[t[i]] = true;\r\n\r\n\t\t\t\tset_value(els, \"week_day\", d);\r\n\r\n\t\t\t\t//for (var i = 0; i < col.length; i++)\r\n\t\t\t\t//\tcol[i].checked = (!!d[col[i].value]);\r\n\t\t\t},\r\n\t\t\tmonth:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\r\n\t\t\t\tif (code[2] === \"\") {\r\n\t\t\t\t\tset_value(els, \"month_type\", \"d\");\r\n\t\t\t\t\tset_value(els, \"month_count\", code[1]);\r\n\t\t\t\t\tset_value(els, \"month_day\", dates.start.getDate());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tset_value(els, \"month_type\", \"w\");\r\n\t\t\t\t\tset_value(els, \"month_count2\", code[1]);\r\n\t\t\t\t\tset_value(els, \"month_week2\", code[3]);\r\n\t\t\t\t\tset_value(els, \"month_day2\", code[2]);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tday:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\t\tset_value(els, \"day_type\", \"d\");\r\n\t\t\t\tset_value(els, \"day_count\", code[1]);\r\n\t\t\t},\r\n\t\t\tyear:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\r\n\t\t\t\tif (code[2] === \"\") {\r\n\t\t\t\t\tset_value(els, \"year_type\", \"d\");\r\n\t\t\t\t\tset_value(els, \"year_day\", dates.start.getDate());\r\n\t\t\t\t\tset_value(els, \"year_month\", dates.start.getMonth());\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tset_value(els, \"year_type\", \"w\");\r\n\t\t\t\t\tset_value(els, \"year_week2\", code[3]);\r\n\t\t\t\t\tset_value(els, \"year_day2\", code[2]);\r\n\t\t\t\t\tset_value(els, \"year_month2\", dates.start.getMonth());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfunction set_repeat_code(code, dates) {\r\n\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\tvar data = code.split(\"#\");\r\n\t\t\tcode = data[0].split(\"_\");\r\n\t\t\tset_rcode[code[0]](code, dates);\r\n\r\n\t\t\tswitch (data[1]) {\r\n\t\t\t\tcase \"no\":\r\n\t\t\t\t\tset_end_rule(els, \"no\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"\":\r\n\t\t\t\t\tset_end_rule(els, \"date_of_end\");\r\n\r\n\t\t\t\t\tvar end_date = dates.end;\r\n\t\t\t\t\tif (scheduler.config.include_end_by){\r\n\t\t\t\t\t\tend_date = scheduler.date.add(end_date, -1, 'day');\r\n\t\t\t\t\t}\r\n\t\t\t\t\tset_value(els, \"date_of_end\", date_str(end_date));\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tset_end_rule(els, \"occurences_count\");\r\n\t\t\t\t\tset_value(els, \"occurences_count\", data[1]);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tset_value(els, \"repeat\", code[0]);\r\n\t\t\t//e.checked = true;\r\n\r\n\t\t\tvar node = scheduler.form_blocks[\"recurring\"]._get_form_node(els, \"repeat\", code[0]);\r\n\t\t\tif(node.nodeName == \"SELECT\"/* && node.onchange*/){\r\n\t\t\t//\tnode.onchange();\r\n\t\t\t\tnode.dispatchEvent(new Event('change'));\r\n\t\t\t\tnode.dispatchEvent(new MouseEvent('click'));\r\n\t\t\t}else{\r\n\t\t\t\tnode.dispatchEvent(new MouseEvent('click'));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tscheduler.form_blocks[\"recurring\"]._set_repeat_code = set_repeat_code;\r\n\r\n\t\tfor (var i = 0; i < top.elements.length; i++) {\r\n\t\t\tvar el = top.elements[i];\r\n\t\t\tswitch (el.name) {\r\n\t\t\t\tcase \"repeat\":\r\n\t\t\t\t\tif (el.nodeName == \"SELECT\" && !el.$_eventAttached) {\r\n\t\t\t\t\t\tel.$_eventAttached = true;\r\n\t\t\t\t\t\tel.addEventListener(\"change\", change_current_view);\r\n\t\t\t\t\t} else if(!el.$_eventAttached){\r\n\t\t\t\t\t\tel.$_eventAttached = true;\r\n\t\t\t\t\t\tel.addEventListener(\"click\", change_current_view);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._lightbox._rec_init_done = true;\r\n\t},\r\n\tset_value:function(node, value, ev) {\r\n\t\tvar rf = scheduler.form_blocks[\"recurring\"];\r\n\t\tif (!scheduler._lightbox._rec_init_done)\r\n\t\t\trf._init_set_value(node, value, ev);\r\n\t\tnode.open = !ev.rec_type;\r\n\r\n\t\tnode.blocked = this._is_modified_occurence(ev);\r\n\r\n\t\tvar ds = rf._ds;\r\n\t\tds.start = ev.start_date;\r\n\t\tds.end = ev._end_date;\r\n\r\n\t\trf._toggle_block();\r\n\r\n\t\tif (value)\r\n\t\t\trf._set_repeat_code(value, ds);\r\n\t},\r\n\tget_value:function(node, ev) {\r\n\t\tif (node.open) {\r\n\t\t\tvar ds = scheduler.form_blocks[\"recurring\"]._ds;\r\n\t\t\tvar actual_dates = {};\r\n\r\n\t\t\tvar timeControl = getTimeSection();\r\n\r\n\t\t\ttimeControl.getValue(actual_dates);\r\n\t\t\tds.start = actual_dates.start_date;\r\n\t\t\tev.rec_type = scheduler.form_blocks[\"recurring\"]._get_repeat_code(ds);\r\n\t\t\tif (ds._start) {\r\n\t\t\t\tev.start_date = new Date(ds.start);\r\n\t\t\t\tev._start_date = new Date(ds.start);\r\n\t\t\t\tds._start = false;\r\n\t\t\t} else\r\n\t\t\t\tev._start_date = null;\r\n\r\n\t\t\tev._end_date = ds.end;\r\n\t\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\t\t} else {\r\n\t\t\tev.rec_type = ev.rec_pattern = \"\";\r\n\t\t\tev._end_date = ev.end_date;\r\n\t\t}\r\n\t\treturn ev.rec_type;\r\n\t},\r\n\t_get_button: function(){\r\n\t\tvar node = getRecurringSection().header;\r\n\t\treturn node.firstChild.firstChild;\r\n\t},\r\n\t_get_form: function(){\r\n\t\treturn getRecurringSection().node;\r\n\t},\r\n\topen:function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form();\r\n\t\tif(!cont.open)\r\n\t\t\tblock._toggle_block();\r\n\t},\r\n\tclose: function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form();\r\n\r\n\t\tif(cont.open)\r\n\t\t\tblock._toggle_block();\r\n\t},\r\n\t_toggle_block: function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form(),\r\n\t\t\tel = block._get_button();\r\n\t\tif (!cont.open && !cont.blocked) {\r\n\t\t\tcont.style.height = \"auto\";//reset to default value\r\n\t\t\tif(el){\r\n\t\t\t\tel.style.backgroundPosition = \"-5px 0px\";\r\n\t\t\t\tel.nextSibling.innerHTML = scheduler.locale.labels.button_recurring_open;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tcont.style.height = \"0px\";\r\n\t\t\tif(el){\r\n\t\t\t\tel.style.backgroundPosition = \"-5px 20px\";\r\n\t\t\t\tel.nextSibling.innerHTML = scheduler.locale.labels.button_recurring;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcont.open = !cont.open;\r\n\r\n\t\tscheduler.setLightboxSize();\r\n\t},\r\n\tfocus:function(node) {\r\n\t},\r\n\tbutton_click:function(node, button, event) {\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\t\tvar cont = block._get_form();\r\n\t\tif (!cont.blocked)\r\n\t\t\tscheduler.form_blocks.recurring._toggle_block();\r\n\t}\r\n};\r\n\r\nfunction getTimeSection(){\r\n\tvar timeControl = scheduler.formSection('time');\r\n\tif(!timeControl){\r\n\t\ttimeControl = getFirstSectionOfType('time');\r\n\t}\r\n\tif(!timeControl){\r\n\t\ttimeControl = getFirstSectionOfType('calendar_time');\r\n\t}\r\n\r\n\t\r\n\tif (!timeControl) {\r\n\t\tthrow new Error([\"Can't calculate the recurring rule, the Recurring form block can't find the Time control. Make sure you have the time control in 'scheduler.config.lightbox.sections' config.\",\r\n\"You can use either the default time control https://docs.dhtmlx.com/scheduler/time.html, or the datepicker https://docs.dhtmlx.com/scheduler/minicalendar.html, or a custom control. \",\r\n\"In the latter case, make sure the control is named \\\"time\\\":\",\r\n\"\",\r\n\"scheduler.config.lightbox.sections = [\",\r\n\"{name:\\\"time\\\", height:72, type:\\\"YOU CONTROL\\\", map_to:\\\"auto\\\" }];\"]\r\n.join(\"\\n\"));\r\n\t}\r\n\r\n\treturn timeControl;\r\n}\r\n\r\nfunction getRecurringSection(){\r\n\tvar recurringSection = scheduler.formSection('recurring');\r\n\tif(!recurringSection){\r\n\t\trecurringSection = getFirstSectionOfType('recurring');\r\n\t}\r\n\r\n\tif (!recurringSection) {\r\n\t\tthrow new Error([\"Can't locate the Recurring form section.\",\r\n\t\t\"Make sure that you have the recurring control on the lightbox configuration https://docs.dhtmlx.com/scheduler/recurring_events.html#recurringlightbox \",\r\n\t\t\"and that the recurring control has name \\\"recurring\\\":\",\r\n\"\",\r\n\"scheduler.config.lightbox.sections = [\",\r\n\"\t{name:\\\"recurring\\\", ... }\",\r\n\"];\"].join(\"\\n\"));\r\n\r\n\t}\r\n\r\n\treturn recurringSection;\r\n}\r\n\r\nfunction getFirstSectionOfType(type){\r\n\tfor(var i = 0; i < scheduler.config.lightbox.sections.length; i++){\r\n\t\tvar section = scheduler.config.lightbox.sections[i];\r\n\t\tif(section.type === type){\r\n\t\t\treturn scheduler.formSection(section.name);\r\n\t\t}\r\n\t}\r\n\treturn null;\r\n}\r\n\r\n//problem may occur if we will have two repeating events in the same moment of time\r\nscheduler._rec_markers = {};\r\nscheduler._rec_markers_pull = {};\r\nscheduler._add_rec_marker = function(ev, time) {\r\n\tev._pid_time = time;\r\n\tthis._rec_markers[ev.id] = ev;\r\n\tif (!this._rec_markers_pull[ev.event_pid]) this._rec_markers_pull[ev.event_pid] = {};\r\n\tthis._rec_markers_pull[ev.event_pid][time] = ev;\r\n};\r\nscheduler._get_rec_marker = function(time, id) {\r\n\tvar ch = this._rec_markers_pull[id];\r\n\tif (ch) return ch[time];\r\n\treturn null;\r\n};\r\nscheduler._get_rec_markers = function(id) {\r\n\treturn (this._rec_markers_pull[id] || []);\r\n};\r\n\r\nfunction clearMilliseconds(date){\r\n//\treturn date;\r\n\treturn new Date(\r\n\t\tdate.getFullYear(), \r\n\t\tdate.getMonth(), \r\n\t\tdate.getDate(), \r\n\t\tdate.getHours(), \r\n\t\tdate.getMinutes(),\r\n\t\tdate.getSeconds(),\r\n\t\t0\r\n\t);\r\n}\r\n\r\nscheduler._rec_temp = [];\r\n(function() {\r\n\tvar old_add_event = scheduler.addEvent;\r\n\tscheduler.addEvent = function(start_date, end_date, text, id, extra_data) {\r\n\t\tvar ev_id = old_add_event.apply(this, arguments);\r\n\r\n\t\tif (ev_id && scheduler.getEvent(ev_id)) {\r\n\t\t\tvar ev = scheduler.getEvent(ev_id);\r\n\t\t\t\r\n\t\t\tif(ev.start_date){\r\n\t\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t\t}\r\n\t\t\tif(ev.end_date){\r\n\t\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t\t}\r\n\t\t\tif (this._is_modified_occurence(ev))\r\n\t\t\t\tscheduler._add_rec_marker(ev, ev.event_length * 1000);\r\n\t\t\tif (ev.rec_type)\r\n\t\t\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\t\t}\r\n\t\treturn ev_id;\r\n\t};\r\n})();\r\n\r\nscheduler.attachEvent(\"onEventIdChange\", function(id, new_id) {\r\n\tif (this._ignore_call) return;\r\n\tthis._ignore_call = true;\r\n\r\n\tif(scheduler._rec_markers[id]){\r\n\t\t//important for for correct work of scheduler.getEvents(from, to) and collision detection\r\n\t\tscheduler._rec_markers[new_id] = scheduler._rec_markers[id];\r\n\t\tdelete scheduler._rec_markers[id];\r\n\t}\r\n\r\n\tif(scheduler._rec_markers_pull[id]){\r\n\t\tscheduler._rec_markers_pull[new_id] = scheduler._rec_markers_pull[id];\r\n\t\tdelete scheduler._rec_markers_pull[id];\r\n\t}\r\n\r\n\tfor (var i = 0; i < this._rec_temp.length; i++) {\r\n\t\tvar tev = this._rec_temp[i];\r\n\t\tif (tev.event_pid == id) {\r\n\t\t\ttev.event_pid = new_id;\r\n\t\t\tthis.changeEventId(tev.id, new_id + \"#\" + tev.id.split(\"#\")[1]);\r\n\t\t}\r\n\t}\r\n\r\n\tfor(var i in this._rec_markers){\r\n\t\tvar tev = this._rec_markers[i];\r\n\t\tif(tev.event_pid == id){\r\n\t\t\ttev.event_pid = new_id;\r\n\t\t\ttev._pid_changed = true;\r\n\t\t}\r\n\t}\r\n\r\n\tvar el = scheduler._rec_markers[new_id];\r\n\tif(el && el._pid_changed) {\r\n\t\tdelete el._pid_changed;\r\n\t\tsetTimeout(function() {\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler.callEvent(\"onEventChanged\", [new_id, scheduler.getEvent(new_id)]);\r\n\t\t}, 1);\r\n\t}\r\n\r\n\tdelete this._ignore_call;\r\n});\r\nscheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (this._is_virtual_event(id) || (this._is_modified_occurence(ev) && ev.rec_type && ev.rec_type != 'none')) {\r\n\t\tid = id.split(\"#\");\r\n\t\tvar nid = this.uid();\r\n\t\tvar tid = (id[1]) ? id[1] : Math.round(ev._pid_time / 1000);\r\n\r\n\t\tvar nev = this._copy_event(ev);\r\n\t\tnev.id = nid;\r\n\t\tnev.event_pid = ev.event_pid || id[0];\r\n\t\tvar timestamp = tid;\r\n\t\tnev.event_length = timestamp;\r\n\t\tnev.rec_type = nev.rec_pattern = \"none\";\r\n\t\tthis.addEvent(nev);\r\n\r\n\t\tthis._add_rec_marker(nev, timestamp * 1000);\r\n\t} else {\r\n\t\tif (ev.rec_type && this._lightbox_id)\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\tvar sub = this._get_rec_markers(id);\r\n\t\tfor (var i in sub) {\r\n\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\tid = sub[i].id;\r\n\t\t\t\tif (this.getEvent(id))\r\n\t\t\t\t\tthis.deleteEvent(id, true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventDeleted\", function(id, ev){\r\n\tif(!this._is_virtual_event(id) && this._is_modified_occurence(ev)){\r\n\t\tif(!scheduler._events[id]){\r\n\t\t\tev.rec_type = ev.rec_pattern = \"none\";\r\n\t\t\tthis.setEvent(id, ev);\r\n\t\t}\r\n\t}\r\n});\r\nscheduler.attachEvent(\"onEventChanged\", function(id, event) {\r\n\tif (this._loading) return true;\r\n\r\n\tvar ev = this.getEvent(id);\r\n\r\n\tif (this._is_virtual_event(id)) {\r\n\t\tvar id = id.split(\"#\");\r\n\t\tvar nid = this.uid();\r\n\t\tthis._not_render = true;\r\n\r\n\t\tvar nev = this._copy_event(event);\r\n\t\tnev.id = nid;\r\n\t\tnev.event_pid = id[0];\r\n\t\tvar timestamp = id[1];\r\n\t\tnev.event_length = timestamp;\r\n\t\tnev.rec_type = nev.rec_pattern = \"\";\r\n\r\n\t\tthis._add_rec_marker(nev, timestamp * 1000);\r\n\t\tthis.addEvent(nev);\r\n\r\n\t\tthis._not_render = false;\r\n\r\n\t} else {\r\n\t\tif(ev.start_date){\r\n\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t}\r\n\t\tif(ev.end_date){\r\n\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t}\r\n\r\n\t\tif (ev.rec_type && this._lightbox_id){\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t}\r\n\t\tvar sub = this._get_rec_markers(id);\r\n\t\tfor (var i in sub) {\r\n\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\tdelete this._rec_markers[sub[i].id];\r\n\t\t\t\tthis.deleteEvent(sub[i].id, true);\r\n\t\t\t}\r\n\t\t}\r\n\t\tdelete this._rec_markers_pull[id];\r\n\r\n\t\t// it's possible that after editing event is no longer exists, in such case we need to remove _select_id flag\r\n\t\tvar isEventFound = false;\r\n\t\tfor (var k = 0; k < this._rendered.length; k++) {\r\n\t\t\tif (this._rendered[k].getAttribute(this.config.event_attribute) == id)\r\n\t\t\t\tisEventFound = true;\r\n\t\t}\r\n\t\tif (!isEventFound)\r\n\t\t\tthis._select_id = null;\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventAdded\", function(id) {\r\n\tif (!this._loading) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (ev.rec_type && !ev.event_length){\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventSave\", function(id, data, is_new_event) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (!ev.rec_type && data.rec_type && !this._is_virtual_event(id))\r\n\t\tthis._select_id = null;\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventCreated\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (!ev.rec_type)\r\n\t\tev.rec_type = ev.rec_pattern = ev.event_length = ev.event_pid = \"\";\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventCancel\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (ev.rec_type) {\r\n\t\tthis._roll_back_dates(ev);\r\n\t\t// a bit expensive, but we need to be sure that event re-rendered, because view can be corrupted by resize , during edit process\r\n\t\tthis.render_view_data();\r\n\t}\r\n});\r\nscheduler._roll_back_dates = function(ev) {\r\n\tif(ev.start_date){\r\n\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t}\r\n\tif(ev.end_date){\r\n\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t}\r\n\tev.event_length = Math.round((ev.end_date.valueOf() - ev.start_date.valueOf()) / 1000);\r\n\tev.end_date = ev._end_date;\r\n\tif (ev._start_date) {\r\n\t\tev.start_date.setMonth(0);\r\n\t\tev.start_date.setDate(ev._start_date.getDate());\r\n\t\tev.start_date.setMonth(ev._start_date.getMonth());\r\n\t\tev.start_date.setFullYear(ev._start_date.getFullYear());\r\n\r\n\t}\r\n};\r\n\r\nscheduler._is_virtual_event = function(id){\r\n\treturn id.toString().indexOf(\"#\") != -1;\r\n};\r\nscheduler._is_modified_occurence = function(ev){\r\n\treturn (ev.event_pid && ev.event_pid != \"0\");\r\n};\r\n\r\nscheduler.showLightbox_rec = scheduler.showLightbox;\r\nscheduler.showLightbox = function(id) {\r\n\tvar locale = this.locale;\r\n\tvar c = scheduler.config.lightbox_recurring;\r\n\tvar ev = this.getEvent(id);\r\n\tvar pid = ev.event_pid;\r\n\tvar isVirtual = this._is_virtual_event(id);\r\n\tif (isVirtual)\r\n\t\tpid = id.split(\"#\")[0];\r\n\r\n\t// show series\r\n\tvar showSeries = function(id) {\r\n\t\tvar event = scheduler.getEvent(id);\r\n\t\tevent._end_date = event.end_date;\r\n\t\tevent.end_date = new Date(event.start_date.valueOf() + event.event_length * 1000);\r\n\t\treturn scheduler.showLightbox_rec(id); // editing series\r\n\t};\r\n\r\n\tif ( (pid || pid*1 === 0) && ev.rec_type) {\r\n\t\t// direct API call on series id\r\n\t\treturn showSeries(id);\r\n\t}\r\n\tif ( !pid || pid === '0' || ( (!locale.labels.confirm_recurring || c == 'instance') || (c == 'series' && !isVirtual)) ) {\r\n\t\t// editing instance or non recurring event\r\n\t\treturn this.showLightbox_rec(id);\r\n\t}\r\n\tif (c == 'ask') {\r\n\t\tvar that = this;\r\n\t\tscheduler.modalbox({\r\n\t\t\ttext: locale.labels.confirm_recurring,\r\n\t\t\ttitle: locale.labels.title_confirm_recurring,\r\n\t\t\twidth: \"500px\",\r\n\t\t\tposition: \"middle\",\r\n\t\t\tbuttons:[locale.labels.button_edit_series, locale.labels.button_edit_occurrence, locale.labels.icon_cancel],\r\n\t\t\tcallback: function(index) {\r\n\t\t\t\tswitch(+index) {\r\n\t\t\t\t\tcase 0:\r\n\t\t\t\t\t\treturn showSeries(pid);\r\n\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\treturn that.showLightbox_rec(id);\r\n\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\tshowSeries(pid);\r\n\t}\r\n};\r\n\r\n\r\nscheduler.get_visible_events_rec = scheduler.get_visible_events;\r\nscheduler.get_visible_events = function(only_timed) {\r\n\tfor (var i = 0; i < this._rec_temp.length; i++)\r\n\t\tdelete this._events[this._rec_temp[i].id];\r\n\tthis._rec_temp = [];\r\n\r\n\tvar stack = this.get_visible_events_rec(only_timed);\r\n\tvar out = [];\r\n\tfor (var i = 0; i < stack.length; i++) {\r\n\t\tif (stack[i].rec_type) {\r\n\t\t\t//deleted element of series\r\n\t\t\tif (stack[i].rec_pattern != \"none\")\r\n\t\t\t\tthis.repeat_date(stack[i], out);\r\n\t\t}\r\n\t\telse out.push(stack[i]);\r\n\t}\r\n\treturn out;\r\n};\r\n\r\n\r\n(function() {\r\n\tvar old = scheduler.isOneDayEvent;\r\n\tscheduler.isOneDayEvent = function(ev) {\r\n\t\tif (ev.rec_type) return true;\r\n\t\treturn old.call(this, ev);\r\n\t};\r\n\tvar old_update_event = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id) {\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif(ev && ev.rec_type){\r\n\t\t\t//rec_type can be changed without the lightbox,\r\n\t\t\t// make sure rec_pattern updated as well\r\n\t\t\tev.rec_pattern = (ev.rec_type || \"\").split(\"#\")[0];\r\n\t\t}\r\n\t\tif (ev && ev.rec_type && !this._is_virtual_event(id)) {\r\n\t\t\tscheduler.update_view();\r\n\t\t} else {\r\n\t\t\told_update_event.call(this, id);\r\n\t\t}\r\n\t};\r\n})();\r\n\r\nscheduler.transponse_size = {\r\n\tday:1, week:7, month:1, year:12\r\n};\r\nscheduler.date.day_week = function(sd, day, week) {\r\n\tsd.setDate(1);\r\n\tvar originalMonth = scheduler.date.month_start(new Date(sd));\r\n\tweek = (week - 1) * 7;\r\n\tvar cday = sd.getDay();\r\n\tvar nday = day * 1 + week - cday + 1;\r\n\tsd.setDate(nday <= week ? (nday + 7) : nday);\r\n\tvar newMonth = scheduler.date.month_start(new Date(sd));\r\n\tif(originalMonth.valueOf() !== newMonth.valueOf()){\r\n\t\treturn false;\r\n\t}\r\n\treturn true;\r\n};\r\nscheduler.transpose_day_week = function(sd, list, cor, size, cor2) {\r\n\tvar cday = (sd.getDay() || (scheduler.config.start_on_monday ? 7 : 0)) - cor;\r\n\tfor (var i = 0; i < list.length; i++) {\r\n\t\tif (list[i] > cday)\r\n\t\t\treturn sd.setDate(sd.getDate() + list[i] * 1 - cday - (size ? cor : cor2));\r\n\t}\r\n\tthis.transpose_day_week(sd, list, cor + size, null, cor);\r\n};\r\nscheduler.transpose_type = function(type) {\r\n\tvar transposeRecurring = \"transpose_\" + type;\r\n\tif (!this.date[transposeRecurring]) {\r\n\t\tvar recurringParts = type.split(\"_\");\r\n\t\tvar dayDurationMs = 60 * 60 * 24 * 1000;\r\n\t\tvar addRecurring = \"add_\" + type;\r\n\t\tvar recurringStepDays = this.transponse_size[recurringParts[0]] * recurringParts[1];\r\n\r\n\t\tif (recurringParts[0] == \"day\" || recurringParts[0] == \"week\") {\r\n\t\t\tvar weekDays = null;\r\n\t\t\tif (recurringParts[4]) {\r\n\t\t\t\tweekDays = recurringParts[4].split(\",\");\r\n\t\t\t\tif (scheduler.config.start_on_monday) {\r\n\t\t\t\t\tfor (var i = 0; i < weekDays.length; i++)\r\n\t\t\t\t\t\tweekDays[i] = (weekDays[i] * 1) || 7;\r\n\t\t\t\t\tweekDays.sort();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.date[transposeRecurring] = function(nd, td) {\r\n\t\t\t\tvar delta = Math.floor((td.valueOf() - nd.valueOf()) / (dayDurationMs * recurringStepDays));\r\n\t\t\t\tif (delta > 0)\r\n\t\t\t\t\tnd.setDate(nd.getDate() + delta * recurringStepDays);\r\n\t\t\t\tif (weekDays)\r\n\t\t\t\t\tscheduler.transpose_day_week(nd, weekDays, 1, recurringStepDays);\r\n\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t\tthis.date[addRecurring] = function(sd, inc) {\r\n\t\t\t\tvar nd = new Date(sd.valueOf());\r\n\t\t\t\tif (weekDays) {\r\n\t\t\t\t\tfor (var count = 0; count < inc; count++)\r\n\t\t\t\t\t\tscheduler.transpose_day_week(nd, weekDays, 0, recurringStepDays);\r\n\t\t\t\t} else\r\n\t\t\t\t\tnd.setDate(nd.getDate() + inc * recurringStepDays);\r\n\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t}\r\n\t\telse if (recurringParts[0] == \"month\" || recurringParts[0] == \"year\") {\r\n\t\t\tthis.date[transposeRecurring] = function(nd, td, seriesInstance) {\r\n\t\t\t\tvar delta = Math.ceil(((td.getFullYear() * 12 + td.getMonth() * 1 + 1) - (nd.getFullYear() * 12 + nd.getMonth() * 1 + 1)) / (recurringStepDays) - 1);\r\n\r\n\t\t\t\tif (delta >= 0){\r\n\t\t\t\t\tnd.setDate(1);\r\n\t\t\t\t\tnd.setMonth(nd.getMonth() + delta * recurringStepDays);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn scheduler.date[addRecurring](nd, 0, seriesInstance);\r\n\t\t\t\t//if (str[3]){\r\n\t\t\t\t//\tscheduler.date.day_week(nd, str[2], str[3]);\r\n\t\t\t\t//}\r\n\t\t\t};\r\n\t\t\tthis.date[addRecurring] = function(sd, inc, seriesInstance, currentCount) {\r\n\t\t\t\tif(!currentCount){\r\n\t\t\t\t\tcurrentCount = 1;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcurrentCount++;\r\n\t\t\t\t}\r\n\t\t\t\tvar maxCount = 12;\r\n\t\t\t\tif(currentCount > maxCount){\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar nd = new Date(sd.valueOf());\r\n\t\t\t\tnd.setDate(1);\r\n\r\n\r\n\t\t\t\tnd.setMonth(nd.getMonth() + inc * recurringStepDays);\r\n\t\t\t\tvar origMonth = nd.getMonth();\r\n\t\t\t\tvar origYear = nd.getFullYear();\r\n\t\t\t\tnd.setDate(seriesInstance.start_date.getDate());\r\n\t\t\t\tif (recurringParts[3]){\r\n\t\t\t\t\tscheduler.date.day_week(nd, recurringParts[2], recurringParts[3]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar correctOverflowInstances = scheduler.config.recurring_overflow_instances;\r\n\t\t\t\tif(nd.getMonth() != origMonth && correctOverflowInstances != \"none\"){\r\n\t\t\t\t\t// no such day in a month\r\n\t\t\t\t\tif(correctOverflowInstances === \"lastDay\"){\r\n\t\t\t\t\t\t// return either last day of the month\r\n\t\t\t\t\t\tnd = new Date(origYear, origMonth + 1, 0, nd.getHours(), nd.getMinutes(), nd.getSeconds(), nd.getMilliseconds());\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t// or go to the next instance\r\n\t\t\t\t\t\tnd = scheduler.date[addRecurring](new Date(origYear, origMonth + 1, 0), inc||1, seriesInstance, currentCount);\r\n\t\t\t\t\t\t// if next instance is not possible (e.g. 'repeat on 40th day of the month') null will be returned\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.repeat_date = function(ev, stack, non_render, from, to, maxCount) {\r\n\r\n\tfrom = from || this._min_date;\r\n\tto = to || this._max_date;\r\n\tvar max = maxCount || -1;\r\n\tvar td = new Date(ev.start_date.valueOf());\r\n\r\n\tvar startHour = td.getHours();\r\n\r\n\tvar visibleCount = 0;\r\n\r\n\tif (!ev.rec_pattern && ev.rec_type)\r\n\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\r\n\tthis.transpose_type(ev.rec_pattern);\r\n\ttd = scheduler.date[\"transpose_\" + ev.rec_pattern](td, from, ev);\r\n\twhile ( td && (\r\n\t\ttd < ev.start_date ||\r\n\t\tscheduler._fix_daylight_saving_date(td,from,ev,td,new Date(td.valueOf() + ev.event_length * 1000)).valueOf() <= from.valueOf() ||\r\n\t\ttd.valueOf() + ev.event_length * 1000 <= from.valueOf())){\r\n\t\t\ttd = this.date[\"add_\" + ev.rec_pattern](td, 1, ev);\r\n\r\n\t}\r\n\twhile (td && (td < to && td < ev.end_date && (max < 0 || visibleCount < max))) {\r\n\t\ttd.setHours(startHour);\r\n\r\n\t\tvar timestamp = (scheduler.config.occurrence_timestamp_in_utc) ? Date.UTC(td.getFullYear(), td.getMonth(), td.getDate(), td.getHours(), td.getMinutes(), td.getSeconds()) : td.valueOf();\r\n\t\tvar ch = this._get_rec_marker(timestamp, ev.id);\r\n\t\tif (!ch) { // unmodified element of series\r\n\t\t\tvar ted = new Date(td.valueOf() + ev.event_length * 1000);\r\n\t\t\tvar copy = this._copy_event(ev);\r\n\t\t\t//copy._timed = ev._timed;\r\n\t\t\tcopy.text = ev.text;\r\n\t\t\tcopy.start_date = td;\r\n\t\t\tcopy.event_pid = ev.id;\r\n\t\t\tcopy.id = ev.id + \"#\" + Math.round(timestamp / 1000);\r\n\t\t\tcopy.end_date = ted;\r\n\r\n\t\t\tcopy.end_date = scheduler._fix_daylight_saving_date(copy.start_date, copy.end_date, ev, td, copy.end_date);\r\n\r\n\t\t\tcopy._timed = this.isOneDayEvent(copy);\r\n\r\n\t\t\tif (!copy._timed && !this._table_view && !this.config.multi_day) return;\r\n\t\t\tstack.push(copy);\r\n\r\n\t\t\tif (!non_render) {\r\n\t\t\t\tthis._events[copy.id] = copy;\r\n\t\t\t\tthis._rec_temp.push(copy);\r\n\t\t\t}\r\n\r\n\t\t\tvisibleCount++;\r\n\r\n\t\t} else\r\n\t\tif (non_render){\r\n\t\t\tif(ch.rec_type != \"none\"){\r\n\t\t\t\tvisibleCount++;\r\n\t\t\t}\r\n\t\t\tstack.push(ch);\r\n\t\t}\r\n\r\n\t\ttd = this.date[\"add_\" + ev.rec_pattern](td, 1, ev);\r\n\t//\tif(!scheduler.date[\"validate_add_\" + ev.rec_pattern](td, 1, ev.rec_pattern)){\r\n\t///\t\talert(\"detect add\")\r\n\t//\t}\r\n\t}\r\n};\r\nscheduler._fix_daylight_saving_date = function(start_date, end_date, ev, counter, default_date) {\r\n\tvar shift = start_date.getTimezoneOffset() - end_date.getTimezoneOffset();\r\n\tif (shift) {\r\n\t\tif (shift > 0) {\r\n\t\t\t// e.g. 24h -> 23h\r\n\t\t\treturn new Date(counter.valueOf() + ev.event_length * 1000 - shift * 60 * 1000);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// e.g. 24h -> 25h\r\n\t\t\treturn new Date(end_date.valueOf() - shift * 60 * 1000);\r\n\t\t}\r\n\t}\r\n\treturn new Date(default_date.valueOf());\r\n};\r\nscheduler.getRecDates = function(id, max) {\r\n\tvar ev = typeof id == \"object\" ? id : scheduler.getEvent(id);\r\n\tvar recurrings = [];\r\n\tmax = max || 100;\r\n\r\n\tif (!ev.rec_type) {\r\n\t\treturn [\r\n\t\t\t{ start_date: ev.start_date, end_date: ev.end_date }\r\n\t\t];\r\n\t}\r\n\tif (ev.rec_type == \"none\") {\r\n\t\treturn [];\r\n\t}\r\n\r\n\tscheduler.repeat_date(ev, recurrings, true, ev.start_date, ev.end_date, max);\r\n\r\n\tvar result = [];\r\n\tfor(var i = 0; i < recurrings.length; i++){\r\n\t\tif(recurrings[i].rec_type != \"none\"){\r\n\t\t\tresult.push({start_date: recurrings[i].start_date, end_date: recurrings[i].end_date});\r\n\t\t}\r\n\t}\r\n\r\n\treturn result;\r\n};\r\nscheduler.getEvents = function(from, to) {\r\n\tvar result = [];\r\n\tfor (var a in this._events) {\r\n\t\tvar ev = this._events[a];\r\n\t\tif (ev && ev.start_date < to && ev.end_date > from) {\r\n\t\t\tif (ev.rec_pattern) {\r\n\t\t\t\tif (ev.rec_pattern == \"none\") continue;\r\n\t\t\t\tvar sev = [];\r\n\t\t\t\tthis.repeat_date(ev, sev, true, from, to);\r\n\t\t\t\tfor (var i = 0; i < sev.length; i++) {\r\n\t\t\t\t\t// if event is in rec_markers then it will be checked by himself, here need to skip it\r\n\t\t\t\t\tif (!sev[i].rec_pattern && sev[i].start_date < to && sev[i].end_date > from && !this._rec_markers[sev[i].id]) {\r\n\t\t\t\t\t\tresult.push(sev[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if (!this._is_virtual_event(ev.id)) { // if it's virtual event we can skip it\r\n\t\t\t\tresult.push(ev);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n};\r\n\r\nscheduler.config.repeat_date = \"%m.%d.%Y\";\r\nscheduler.config.lightbox.sections = [\r\n\t{name:\"description\", map_to:\"text\", type:\"textarea\" , focus:true},\r\n\t{name:\"recurring\", type:\"recurring\", map_to:\"rec_type\", button:\"recurring\"},\r\n\t{name:\"time\", height:72, type:\"time\", map_to:\"auto\"}\r\n];\r\n\r\n\r\n//drop secondary attributes\r\nscheduler._copy_dummy = function(ev) {\r\n\tvar start_date = new Date(this.start_date);\r\n\tvar end_date = new Date(this.end_date);\r\n\tthis.start_date = start_date;\r\n\tthis.end_date = end_date;\r\n\tthis.event_length = this.event_pid = this.rec_pattern = this.rec_type = null;\r\n};\r\n\r\nscheduler.config.include_end_by = false;\r\nscheduler.config.lightbox_recurring = 'ask'; // series, instance\r\n\r\nscheduler.attachEvent(\"onClearAll\", function(){\r\n\tscheduler._rec_markers = {}; //clear recurring events data\r\n\tscheduler._rec_markers_pull = {};\r\n\tscheduler._rec_temp = [];\r\n});\r\n\r\n}","import getSerializator from '../core/common/get_serializable_events';\r\nexport default function(scheduler){\r\n\r\n\t\r\nconst getSerializableData = getSerializator(scheduler);\r\n\r\n//redefine this method, if you want to provide a custom set of attributes for serialization\r\nscheduler.data_attributes=function(){\r\n\tvar attrs = [];\r\n\tvar format = scheduler._helpers.formatDate;\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\t\tfor (var name in ev)\r\n\t\t\tif (name.substr(0,1) !=\"_\")\r\n\t\t\t\tattrs.push([name,((name == \"start_date\" || name == \"end_date\")?format:null)]);\r\n\t\tbreak;\r\n\t}\r\n\treturn attrs;\r\n};\r\n\r\nscheduler.toXML = function(header){\r\n\tvar xml = [];\r\n\tvar attrs = this.data_attributes();\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\r\n\t\txml.push(\"\");\r\n\t\tfor (var i=0; i < attrs.length; i++)\r\n\t\t\txml.push(\"<\"+attrs[i][0]+\">\");\r\n\r\n\t\txml.push(\"\");\r\n\t}\r\n\treturn (header||\"\")+\"\"+xml.join(\"\\n\")+\"\";\r\n};\r\n\r\nscheduler._serialize_json_value = function(value){\r\n\tif(value === null || typeof value === \"boolean\"){\r\n\t\tvalue = \"\" + value;\r\n\t}else{\r\n\t\tif(!value && value !== 0){\r\n\t\t\tvalue = \"\";\r\n\t\t}\r\n\t\tvalue = '\"' + value.toString().\r\n\t\t\treplace(/\\n/g,\"\").\r\n\t\t\treplace(/\\\\/g,\"\\\\\\\\\").\r\n\t\t\treplace(/\"/g, '\\\\\"') + '\"';\r\n\t}\r\n\treturn value;\r\n};\r\n\r\n\r\n\r\nscheduler.toJSON = function(){\r\n\treturn JSON.stringify(this.serialize());\r\n};\r\n\r\n\r\nscheduler.toICal = function(header){\r\n\tvar start = \"BEGIN:VCALENDAR\\nVERSION:2.0\\nPRODID:-//dhtmlXScheduler//NONSGML v2.2//EN\\nDESCRIPTION:\";\r\n\tvar end = \"END:VCALENDAR\";\r\n\tvar format = scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\");\r\n\tvar full_day_format = scheduler.date.date_to_str(\"%Y%m%d\");\r\n\r\n\tvar ical = [];\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\r\n\r\n\t\tical.push(\"BEGIN:VEVENT\");\r\n\t\tif (!ev._timed || (!ev.start_date.getHours() && !ev.start_date.getMinutes()))\r\n\t\t\tical.push(\"DTSTART:\"+full_day_format(ev.start_date));\r\n\t\telse\r\n\t\t\tical.push(\"DTSTART:\"+format(ev.start_date));\r\n\t\tif (!ev._timed || (!ev.end_date.getHours() && !ev.end_date.getMinutes()))\r\n\t\t\tical.push(\"DTEND:\"+full_day_format(ev.end_date));\r\n\t\telse\r\n\t\t\tical.push(\"DTEND:\"+format(ev.end_date));\r\n\t\tical.push(\"SUMMARY:\"+ev.text);\r\n\t\tical.push(\"END:VEVENT\");\r\n\t}\r\n\treturn start+(header||\"\")+\"\\n\"+ical.join(\"\\n\")+\"\\n\"+end;\r\n};\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Timeline\", scheduler.assert);\r\n}","import { TooltipManager } from \"./tooltipManager\";\r\n\r\nexport default function (scheduler: any) {\r\n\r\n\tscheduler.config.tooltip_timeout = 30;\r\n\tscheduler.config.tooltip_offset_y = 20;\r\n\tscheduler.config.tooltip_offset_x = 10;\r\n\tscheduler.config.tooltip_hide_timeout = 30;\r\n\r\n\tconst tooltipManager = new TooltipManager(scheduler);\r\n\r\n\tscheduler.ext.tooltips = tooltipManager;\r\n\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function () {\r\n\r\n\t\ttooltipManager.tooltipFor({\r\n\t\t\tselector: \"[\" + scheduler.config.event_attribute + \"]\",\r\n\t\t\thtml: (event: MouseEvent) => {\r\n\t\t\t\tif (scheduler._mobile && !scheduler.config.touch_tooltip) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst targetEventId = scheduler._locate_event(event.target);\r\n\t\t\t\tif (scheduler.getEvent(targetEventId)) {\r\n\t\t\t\t\tconst event = scheduler.getEvent(targetEventId);\r\n\t\t\t\t\treturn scheduler.templates.tooltip_text(event.start_date, event.end_date, event);\r\n\t\t\t\t}\r\n\t\t\t\treturn null;\r\n\t\t\t},\r\n\t\t\tglobal: false\r\n\t\t});\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function () {\r\n\t\ttooltipManager.destructor();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onLightbox\", function () {\r\n\t\ttooltipManager.hideTooltip();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeDrag\", function() {\r\n\t\t// GS-2377: don't hide tooltip on mobile device when ontouchstart event occurs\r\n\t\tif (scheduler._mobile && scheduler.config.touch_tooltip) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\ttooltipManager.hideTooltip();\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function() {\r\n\t\ttooltipManager.hideTooltip();\r\n\t\treturn true;\r\n\t});\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Tree Timeline\", scheduler.assert);\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Units\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\nscheduler._get_url_nav = function(){\r\n\tvar p = {};\r\n\tvar data = (document.location.hash || \"\").replace(\"#\", \"\").split(\",\");\r\n\tfor (var i = 0; i < data.length; i++) {\r\n\t\tvar s = data[i].split(\"=\");\r\n\t\tif (s.length == 2)\r\n\t\t\tp[s[0]] = s[1];\r\n\t}\r\n\treturn p;\r\n};\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function () {\r\n\tvar first = true;\r\n\tvar s2d = scheduler.date.str_to_date(\"%Y-%m-%d\");\r\n\tvar d2s = scheduler.date.date_to_str(\"%Y-%m-%d\");\r\n\tvar select_event = scheduler._get_url_nav().event || null;\r\n\r\n\tscheduler.attachEvent(\"onAfterEventDisplay\", function(ev){\r\n\t\tselect_event = null;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function (om, od, m, d) {\r\n\t\tif (first) {\r\n\t\t\tfirst = false;\r\n\t\t\tvar p = scheduler._get_url_nav();\r\n\r\n\t\t\tif (p.event){\r\n\t\t\t\ttry{\r\n\t\t\t\t\tif(scheduler.getEvent(p.event)){\r\n\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\tshowEvent(p.event);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tvar handler = scheduler.attachEvent(\"onXLE\", function(){\r\n\t\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\t\tshowEvent(p.event);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\tscheduler.detachEvent(handler);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (e){}\r\n\t\t\t}\r\n\r\n\t\t\tif (p.date || p.mode) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthis.setCurrentView((p.date ? s2d(p.date) : null), (p.mode || null));\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\t//assuming that mode is not available anymore\r\n\t\t\t\t\tthis.setCurrentView((p.date ? s2d(p.date) : null), m);\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar values = [\r\n\t\t\t\"date=\" + d2s(d || od),\r\n\t\t\t\"mode=\" + (m || om)\r\n\t\t];\r\n\r\n\t\tif(select_event){\r\n\t\t\tvalues.push(\"event=\" + select_event);\r\n\t\t}\r\n\r\n\t\tvar text = \"#\" + values.join(\",\");\r\n\t\tdocument.location.hash = text;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tfunction showEvent(e){\r\n\t\tif(scheduler.$destroyed){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tselect_event = e;\r\n\t\tif(scheduler.getEvent(e)){\r\n\t\t\tscheduler.showEvent(e);\r\n\t\t}\r\n\t}\r\n});\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Week Agenda\", scheduler.assert);\r\n}","export default function(scheduler){\r\nscheduler.attachEvent(\"onLightBox\",function(){\r\n\tif (this._cover){\r\n\t\ttry{\r\n\t\t\tthis._cover.style.height = this.expanded ? \"100%\" : ((document.body.parentNode||document.body).scrollHeight+\"px\");\r\n\t\t} catch(e) {\r\n\r\n\t\t}\r\n\t}\r\n});\r\n\r\nscheduler.form_blocks.select.set_value=function(node,value,ev){\r\n\tif (typeof value == \"undefined\" || value === \"\")\r\n\t\tvalue = (node.firstChild.options[0]||{}).value;\r\n\tnode.firstChild.value=value||\"\";\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\t// scheduler.config.year_x = 4;\r\n\t// scheduler.config.year_y = 3;\r\n\t// scheduler.xy.year_top = 0;\r\n\r\n\tscheduler.templates.year_date = function(date) {\r\n\t\treturn scheduler.date.date_to_str(scheduler.locale.labels.year_tab + \" %Y\")(date);\r\n\t};\r\n\tscheduler.templates.year_month = scheduler.date.date_to_str(\"%F\");\r\n\tscheduler.templates.year_scale_date = scheduler.date.date_to_str(\"%D\");\r\n\tscheduler.templates.year_tooltip = function(s, e, ev) {\r\n\t\treturn ev.text;\r\n\t};\r\n\r\n\tconst isYearMode = function() {\r\n\t\treturn scheduler._mode == \"year\";\r\n\t};\r\n\t\r\n\tconst getCellDate = function(node){\r\n\t\tvar day = scheduler.$domHelpers.closest(node, \"[data-cell-date]\");\r\n\t\tif(!day || !day.hasAttribute(\"data-cell-date\")) return null;\r\n\t\treturn scheduler.templates.parse_date(day.getAttribute(\"data-cell-date\"));\r\n\t};\r\n\r\n\t// dbl click hook for scheduler._on_dbl_click\r\n\tscheduler.dblclick_dhx_year_grid= function(e) {\r\n\t\tif (isYearMode()) {\r\n\t\t\tconst target = e.target;\r\n\t\t\tif(scheduler.$domHelpers.closest(target, \".dhx_before\") || scheduler.$domHelpers.closest(target, \".dhx_after\")){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tconst date = getCellDate(target);\r\n\t\t\t\r\n\t\t\tif(date){\r\n\t\t\t\tconst start = date;\r\n\t\t\t\tconst end = this.date.add(start, 1, \"day\");\r\n\t\t\t\tif (!this.config.readonly && this.config.dblclick_create){\r\n\t\t\t\t\tthis.addEventNow(start.valueOf(), end.valueOf(), e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\t\r\n\tscheduler.attachEvent(\"onEventIdChange\", function(){\r\n\t\tif (isYearMode())\r\n\t\t\tthis.year_view(true);\r\n\t});\r\n\r\n\r\n\tvar old = scheduler.render_data;\r\n\tscheduler.render_data = function(evs) {\r\n\t\tif (!isYearMode()) return old.apply(this, arguments);\r\n\t\tfor (var i = 0; i < evs.length; i++)\r\n\t\t\tthis._year_render_event(evs[i]);\r\n\t};\r\n\r\n\tvar clear = scheduler.clear_view;\r\n\tscheduler.clear_view = function() {\r\n\t\tif (!isYearMode()) return clear.apply(this, arguments);\r\n\t\tvar dates = scheduler._year_marked_cells,\r\n\t\t\tdiv = null;\r\n\t\tfor (var date in dates) {\r\n\t\t\tif (dates.hasOwnProperty(date)) {\r\n\t\t\t\tdiv = dates[date];\r\n\t\t\t\tdiv.classList.remove(\"dhx_year_event\", \"dhx_cal_datepicker_event\");\r\n\t\t\t\t// div.className = \"dhx_month_head\";\r\n\t\t\t\t// div.removeAttribute(\"date\");\r\n\t\t\t\t// div.removeAttribute(\"data-year-date\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._year_marked_cells = {};\r\n\t};\r\n\r\n\tscheduler._hideToolTip = function() {\r\n\t\tif (this._tooltip) {\r\n\t\t\tthis._tooltip.style.display = \"none\";\r\n\t\t\tthis._tooltip.date = new Date(9999, 1, 1);\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._showToolTip = function(date, pos, e, src) {\r\n\t\tif (this._tooltip) {\r\n\t\t\tif (this._tooltip.date.valueOf() == date.valueOf()) return;\r\n\t\t\tthis._tooltip.innerHTML = \"\";\r\n\t\t} else {\r\n\t\t\tvar t = this._tooltip = document.createElement(\"div\");\r\n\t\t\tt.className = \"dhx_year_tooltip\";\r\n\t\t\tif (this.config.rtl) t.className += \" dhx_tooltip_rtl\";\r\n\t\t\tdocument.body.appendChild(t);\r\n\t\t\tt.addEventListener(\"click\", scheduler._click.dhx_cal_data);\r\n\t\t\tt.addEventListener(\"click\", function(e){\r\n\t\t\t\tif(e.target.closest(`[${scheduler.config.event_attribute}]`)){\r\n\t\t\t\t\tconst id = e.target.closest(`[${scheduler.config.event_attribute}]`).getAttribute(scheduler.config.event_attribute);\r\n\t\t\t\t\tscheduler.showLightbox(id);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\tvar evs = this.getEvents(date, this.date.add(date, 1, \"day\"));\r\n\t\tvar html = \"\";\r\n\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tif(!this.filter_event(ev.id, ev))\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\t\t\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\t\t\thtml += \"
\";\r\n\t\t\thtml += \"
\" + (evs[i]._timed ? this.templates.event_date(evs[i].start_date) : \"\") + \"
\";\r\n\t\t\thtml += \"
 
\";\r\n\t\t\thtml += this.templates.year_tooltip(evs[i].start_date, evs[i].end_date, evs[i]) + \"
\";\r\n\t\t}\r\n\r\n\t\tthis._tooltip.style.display = \"\";\r\n\t\tthis._tooltip.style.top = \"0px\";\r\n\r\n\r\n\t\tif (document.body.offsetWidth - pos.left - this._tooltip.offsetWidth < 0)\r\n\t\t\tthis._tooltip.style.left = pos.left - this._tooltip.offsetWidth + \"px\";\r\n\t\telse\r\n\t\t\tthis._tooltip.style.left = pos.left + src.offsetWidth + \"px\";\r\n\r\n\t\tthis._tooltip.date = date;\r\n\t\tthis._tooltip.innerHTML = html;\r\n\r\n\t\tif (document.body.offsetHeight - pos.top - this._tooltip.offsetHeight < 0)\r\n\t\t\tthis._tooltip.style.top = pos.top - this._tooltip.offsetHeight + src.offsetHeight + \"px\";\r\n\t\telse\r\n\t\t\tthis._tooltip.style.top = pos.top + \"px\";\r\n\t};\r\n\r\n\tscheduler._year_view_tooltip_handler = function(e){\r\n\t\tif (!isYearMode()) return;\r\n\r\n\t\tvar src = e.target || e.srcElement;\r\n\t\tif (src.tagName.toLowerCase() == 'a') // fix for active links extension (it adds links to the date in the cell)\r\n\t\t\tsrc = src.parentNode;\r\n\t\tif (scheduler._getClassName(src).indexOf(\"dhx_year_event\") != -1)\r\n\t\t\tscheduler._showToolTip(scheduler.templates.parse_date(src.getAttribute(\"data-year-date\")), scheduler.$domHelpers.getOffset(src), e, src);\r\n\t\telse\r\n\t\t\tscheduler._hideToolTip();\r\n\t};\r\n\tscheduler._init_year_tooltip = function() {\r\n\t\tscheduler._detachDomEvent(scheduler._els[\"dhx_cal_data\"][0], \"mouseover\", scheduler._year_view_tooltip_handler);\r\n\t\tscheduler.event(scheduler._els[\"dhx_cal_data\"][0], \"mouseover\", scheduler._year_view_tooltip_handler);\r\n\t};\r\n\r\n\tscheduler._get_year_cell = function(d) {\r\n\t\tvar dateString = scheduler.templates.format_date(d);\r\n\t\tvar cells = this.$root.querySelectorAll(`.dhx_cal_data .dhx_cal_datepicker_date[data-cell-date=\"${dateString}\"]`);\r\n\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\tif(!scheduler.$domHelpers.closest(cells[i], \".dhx_after, .dhx_before\")){\r\n\t\t\t\treturn cells[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t};\r\n\r\n\tscheduler._year_marked_cells = {};\r\n\tscheduler._mark_year_date = function(date, event) {\r\n\t\tvar dateString = scheduler.templates.format_date(date);\r\n\t\tvar cell = this._get_year_cell(date);\r\n\t\tif (!cell) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar ev_class = this.templates.event_class(event.start_date, event.end_date, event);\r\n\t\tif (!scheduler._year_marked_cells[dateString]) {\r\n\t\t\tcell.classList.add(\"dhx_year_event\", \"dhx_cal_datepicker_event\");// = \"dhx_month_head dhx_year_event\";\r\n\t\t\tcell.setAttribute(\"data-year-date\", dateString);\r\n\t\t\tcell.setAttribute(\"date\", dateString);\r\n\t\t\tscheduler._year_marked_cells[dateString] = cell;\r\n\t\t}\r\n\t\tif(ev_class){\r\n\t\t\tcell.classList.add(ev_class);\r\n\t\t}\r\n\t};\r\n\tscheduler._unmark_year_date = function(date) {\r\n\t\tvar cell = this._get_year_cell(date);\r\n\t\tif (!cell) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcell.classList.remove(\"dhx_year_event\", \"dhx_cal_datepicker_event\");\r\n//\t\tcell.className = \"dhx_month_head\";\r\n\t};\r\n\tscheduler._year_render_event = function(event) {\r\n\t\tvar date = event.start_date;\r\n\t\tif (date.valueOf() < this._min_date.valueOf()){\r\n\t\t\tdate = this._min_date;\r\n\t\t} else {\r\n\t\t\tdate = this.date.date_part(new Date(date));\r\n\t\t}\r\n\r\n\t\twhile (date < event.end_date) {\r\n\t\t\tthis._mark_year_date(date, event);\r\n\t\t\tdate = this.date.add(date, 1, \"day\");\r\n\t\t\tif (date.valueOf() >= this._max_date.valueOf())\r\n\t\t\t\treturn;\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.year_view = function(mode) {\r\n\r\n\t\tscheduler.set_sizes();\r\n\r\n\t\tscheduler._table_view = mode;\r\n\r\n\t\tif (this._load_mode && this._load()) return;\r\n\r\n\t\tif (mode) {\r\n\t\t\tscheduler._init_year_tooltip();\r\n\t\t\tscheduler._reset_year_scale();\r\n\t\t\tif (scheduler._load_mode && scheduler._load()){\r\n\t\t\t\tscheduler._render_wait = true;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tscheduler.render_view_data();\r\n\t\t} else {\r\n\t\t\tscheduler._hideToolTip();\r\n\t\t}\r\n\t};\r\n\tscheduler._reset_year_scale = function() {\r\n\t\tthis._cols = [];\r\n\t\tthis._colsS = {};\r\n\t\tvar week_starts = []; //start day of first week in each month\r\n\t\tvar dataArea = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tvar c = this.config;\r\n\t\tdataArea.scrollTop = 0; //fix flickering in FF\r\n\t\tdataArea.innerHTML = \"\";\r\n\r\n\t\tvar dy = Math.floor((parseInt(dataArea.style.height) - scheduler.xy.year_top) / c.year_y);\r\n\t\tif (dy < 190) {\r\n\t\t\tdy = 190;\r\n\t\t}\r\n\r\n\t\tvar week_template = document.createElement(\"div\");\r\n\t\tvar dummy_date = this.date.week_start(scheduler._currentDate());\r\n\r\n\t\tthis._process_ignores(dummy_date, 7, \"day\", 1);\r\n\r\n\t\tfor (var i = 0; i < 7; i++) {\r\n\t\t\tif(!(this._ignores && this._ignores[i])) {\r\n\t\t\t\tthis._cols[i] = 'var(--dhx-scheduler-datepicker-cell-size)';\r\n\t\t\t\tthis._render_x_header(i, 0, dummy_date, week_template);\r\n\r\n\t\t\t}\r\n\t\t\tdummy_date = this.date.add(dummy_date, 1, \"day\");\r\n\t\t}\r\n\t\tweek_template.lastChild.className += \" dhx_scale_bar_last\";\r\n\r\n\t\tfor(var i = 0; i < week_template.childNodes.length; i++){\r\n\t\t\tthis._waiAria.yearHeadCell(week_template.childNodes[i]);\r\n\t\t}\r\n\r\n\t\tvar sd = this.date[this._mode + \"_start\"](this.date.copy(this._date));\r\n\t\tvar ssd = sd;\r\n\t\tvar yearBox = null;\r\n\t\tconst wrapper = document.createElement(\"div\");\r\n\t\twrapper.classList.add(\"dhx_year_wrapper\");\r\n\t\tfor (var i = 0; i < c.year_y; i++){\r\n\t\t\tfor (var j = 0; j < c.year_x; j++) {\r\n\t\t\t\tyearBox = document.createElement(\"div\");\r\n\t\t\t\tyearBox.className = \"dhx_year_box\";\r\n\r\n\t\t\t\tyearBox.setAttribute(\"date\", this._helpers.formatDate(sd));\r\n\t\t\t\tyearBox.setAttribute(\"data-month-date\", this._helpers.formatDate(sd));\r\n\t\t\t\tyearBox.innerHTML = \"
\" + week_template.innerHTML + \"
\";\r\n\r\n\t\t\t\tvar header = yearBox.querySelector(\".dhx_year_month\");\r\n\t\t\t\tvar grid = yearBox.querySelector(\".dhx_year_grid\");\r\n\t\t\t\tvar body = yearBox.querySelector(\".dhx_year_body\");\r\n\r\n\t\t\t\tvar headerId = scheduler.uid();\r\n\t\t\t\tthis._waiAria.yearHeader(header, headerId);\r\n\t\t\t\tthis._waiAria.yearGrid(grid, headerId);\r\n\r\n\r\n\t\t\t\theader.innerHTML = this.templates.year_month(sd);\r\n\r\n\r\n\r\n\t\t\t\tvar dd = this.date.week_start(sd);\r\n\t\t\t\tthis._reset_month_scale(body, sd, dd, 6);\r\n\r\n\t\t\t\tvar days = body.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var day = 0; day < days.length; day++){\r\n\t\t\t\t\tthis._waiAria.yearDayCell(days[day]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\twrapper.appendChild(yearBox);\r\n\r\n\t\t\t\tweek_starts[i * c.year_x + j] = (sd.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;\r\n\t\t\t\tsd = this.date.add(sd, 1, \"month\");\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdataArea.appendChild(wrapper);\r\n\r\n\t\tvar dateElement = this._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML = this.templates[this._mode + \"_date\"](ssd, sd, this._mode);\r\n\t\t}\r\n\r\n\t\tthis.week_starts = week_starts;\r\n\t\tweek_starts._month = ssd.getMonth();\r\n\t\tthis._min_date = ssd;\r\n\t\tthis._max_date = sd;\r\n\t};\r\n\r\n\tscheduler._reset_year_scale = function(){\r\n\r\n\t\tvar dataArea = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tdataArea.scrollTop = 0; //fix flickering in FF\r\n\t\tdataArea.innerHTML = \"\";\r\n\r\n\t\tlet yearStart = this.date.year_start(new Date(this._date));\r\n\t\t\r\n\t\tthis._min_date = this.date.week_start(new Date(yearStart));\r\n\r\n\t\tconst wrapper = document.createElement(\"div\");\r\n\t\twrapper.classList.add(\"dhx_year_wrapper\");\r\n\r\n\t\tlet currentDate = yearStart;\r\n\t\tfor(let i = 0; i < 12; i++){\r\n\t\t\tlet yearBox = document.createElement(\"div\");\r\n\t\t\tyearBox.className = \"dhx_year_box\";\r\n\r\n\t\t\tyearBox.setAttribute(\"date\", this._helpers.formatDate(currentDate));\r\n\t\t\tyearBox.setAttribute(\"data-month-date\", this._helpers.formatDate(currentDate));\r\n\t\t\tyearBox.innerHTML = `
${this.templates.year_month(currentDate)}
\r\n\t\t\t
`;\r\n\r\n\t\t\tconst yearGrid = yearBox.querySelector(\".dhx_year_grid\");\r\n\t\t\tconst datepicker = scheduler._createDatePicker(null, {\r\n\t\t\t\tdate: currentDate,\r\n\t\t\t\tfilterDays: scheduler.ignore_year,\r\n\t\t\t\tminWeeks: 6\r\n\t\t\t});\r\n\t\t\tdatepicker._renderDayGrid(yearGrid);\r\n\t\t\tdatepicker.destructor();\r\n\r\n\t\t\twrapper.appendChild(yearBox);\r\n\r\n\t\t\tcurrentDate = this.date.add(currentDate, 1, \"month\");\r\n\r\n\t\t}\r\n\t\tdataArea.appendChild(wrapper);\r\n\r\n\t\tlet lastDate = this.date.add(yearStart, 1, \"year\");\r\n\t\tif(lastDate.valueOf() != this.date.week_start(new Date(lastDate)).valueOf()){\r\n\t\t\tlastDate = this.date.week_start(new Date(lastDate));\r\n\t\t\tlastDate = this.date.add(lastDate, 1, \"week\");\r\n\t\t}\r\n\t\tthis._max_date = lastDate;\r\n\t\tvar dateElement = this._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML = this.templates[this._mode + \"_date\"](yearStart, lastDate, this._mode);\r\n\t\t}\r\n\t};\r\n\r\n\tvar getActionData = scheduler.getActionData;\r\n\tscheduler.getActionData = function(n_ev) {\r\n\t\tif(!isYearMode()){\r\n\t\t\treturn getActionData.apply(scheduler, arguments);\r\n\t\t}\r\n\t\t\r\n\t\tvar date = getCellDate(n_ev.target);\r\n\t\treturn {\r\n\t\t\tdate:date,\r\n\t\t\tsection:null\r\n\t\t};\r\n\t};\r\n\r\n\tvar locateEvent = scheduler._locate_event;\r\n\tscheduler._locate_event = function(node) {\r\n\t\tvar id = locateEvent.apply(scheduler, arguments);\r\n\t\tif(!id){\r\n\t\t\t\r\n\t\t\tvar date = getCellDate(node);\r\n\t\t\tif(!date) return null;\r\n\t\t\tvar evs = scheduler.getEvents(date, scheduler.date.add(date, 1, \"day\"));\r\n\t\t\tif(!evs.length) return null;\r\n\r\n\t\t\t//can be multiple events in the cell, return any single one\r\n\t\t\tid = evs[0].id;\r\n\t\t}\r\n\t\treturn id;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tscheduler._hideToolTip();\r\n\t});\r\n}","import SchedulerFactory from \"./scheduler_factory\";\r\nimport gplExtensions from \"./ext/extensions_gpl\";\r\n\r\nconst factory = new SchedulerFactory(gplExtensions);\r\n\r\nconst scheduler = factory.getSchedulerInstance();\r\nconst Scheduler = {\r\n\tplugin: scheduler.bind(factory.plugin, factory)\r\n};\r\n\r\nwindow.scheduler = scheduler;\r\nwindow.Scheduler = Scheduler;\r\n\r\nif(!window.$dhx) {\r\n\twindow.$dhx = {};\r\n}\r\n\r\nwindow.$dhx.scheduler = scheduler;\r\nwindow.$dhx.Scheduler = Scheduler;\r\n\r\nexport default scheduler;export { scheduler, Scheduler };","\r\n\r\nimport dhtmlxHook from \"./dhtmlx_hook\";\r\nimport \"./css/theme.less\";\r\ndhtmlxHook();\r\n\r\nimport global from \"./global\";\r\n\r\nimport factoryMethod from \"./scheduler_factory_method\";\r\nimport ExtensionsManager from \"./ext/extension_manager\";\r\n\r\nclass SchedulerFactory {\r\n\r\n\tconstructor (extensions) {\r\n\t\tthis._seed = 0;\r\n\t\tthis._schedulerPlugins = [];\r\n\t\tthis._bundledExtensions = extensions;\r\n\t\tthis._extensionsManager = new ExtensionsManager(extensions);\r\n\t}\r\n\r\n\tplugin(code) {\r\n\t\tthis._schedulerPlugins.push(code);\r\n\r\n\t\tif(global.scheduler){\r\n\t\t\tcode(global.scheduler);\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetSchedulerInstance(initConfig) {\r\n\t\tvar scheduler = factoryMethod(this._extensionsManager);\r\n\r\n\t\tfor (var i = 0; i < this._schedulerPlugins.length; i++) {\r\n\t\t\tthis._schedulerPlugins[i](scheduler);\r\n\t\t}\r\n\t\tscheduler._internal_id = this._seed++;\r\n\t\r\n\t\tif (this.$syncFactory){\r\n\t\t\tthis.$syncFactory(scheduler);\r\n\t\t}\r\n\r\n\t\tif(initConfig){\r\n\t\t\tthis._initFromConfig(scheduler, initConfig);\r\n\t\t}\r\n\r\n\t\treturn scheduler;\r\n\t}\r\n\r\n\t_initFromConfig(scheduler, initConfig){\r\n\t\tif(initConfig.plugins){\r\n\t\t\tscheduler.plugins(initConfig.plugins);\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.config){\r\n\t\t\tscheduler.mixin(scheduler.config, initConfig.config, true);\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.templates){\r\n\t\t\tscheduler.attachEvent(\"onTemplatesReady\", function(){\r\n\t\t\t\tscheduler.mixin(scheduler.templates, initConfig.templates, true);\r\n\t\t\t}, {once: true});\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.events){\r\n\t\t\tfor(const event in initConfig.events){\r\n\t\t\t\tscheduler.attachEvent(event, initConfig.events[event]);\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.locale){\r\n\t\t\tscheduler.i18n.setLocale(initConfig.locale);\r\n\t\t}\r\n\t\r\n\t\tif(Array.isArray(initConfig.calendars)){\r\n\t\t\tinitConfig.calendars.forEach(function(calendar){\r\n\t\t\t\tscheduler.addCalendar(calendar);\r\n\t\t\t});\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.container){\r\n\t\t\tscheduler.init(initConfig.container);\r\n\t\t} else {\r\n\t\t\tscheduler.init();\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.data){\r\n\t\t\tif(typeof initConfig.data === \"string\"){\r\n\t\t\t\tscheduler.load(initConfig.data);\r\n\t\t\t}else{\r\n\t\t\t\tscheduler.parse(initConfig.data);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\r\n}\r\n\r\nexport default SchedulerFactory;"],"names":["global$1","window","global","dragHighlightPos","scheduler","dndMarkers","dragStarted","eventNode","event","isEnabled","config","drag_highlight","markTimespan","checkViewName","viewName","viewObj","getView","layout","createMarkerConfig","configSettings","sectionId","style","top","left","marginLeft","sections","markerObject","start_date","end_date","css","html","date","add","createViewMarker","settings","markerConfigs","monthViewMarkersArray","weekDates","currDate","Date","valueOf","obj","push","week_start","cells","$container","querySelectorAll","event_attribute","id","i","length","cloneNode","unitMarkersArray","sectionPropertyName","y_property","map_to","formatedSections","String","split","section_delimiter","map","element","elems","columnViewMarkersArray","eventNodes","eventNodeClone","getAttribute","forEach","cfg","attachEvent","mode","e","getEvent","target","closest","getState","cascade_event_display","unselect","getActionData","section","n","unmarkTimespan","limitPlugin","mark_now","display_marked_timespans","overwrite_marked_timespans","dhx_time_block","default_timespan_type","get_resulting_options","days","zones","options","type","getZones","ev","timespans","day_index","day_value","timespan_type","s","containers","_props","matrix","container","property","view","linker","_add_timespan_zones","_get_blocked_zones","blockTime","addMarkedTimespan","unblockTime","deleteMarkedTimespan","checkInMarkedTimespan","on_overlap","res","temp_start_date","temp_end_date","_marked_timespans","date_part","getDay","eventStart","_get_zone_minutes","eventEnd","getDate","markerStart","markerEnd","checkLimitViolation","check_limits","c","evs","rec_type","_end_date","seriesEnd","limit_start","limit_end","complete_res","p","_timed","isOneDayEvent","allow","_drag_id","_drag_mode","setHours","setMinutes","checkEvent","callEvent","timeline_zones","blocked_timeline_zones","this","_get_relevant_blocked_zones","resultZones","concat","_mark_now","hide","dhx_now_time","_els","now","_currentDate","_remove_mark_now","_max_date","_min_date","getHours","first_hour","last_hour","locate_holder_day","_append_mark_now","zone_start","_table_view","_mode","start_index","end_index","units_l","size","position","r_divs","t_day","t_div","_render_marked_timespan","els","div","parent","parentNode","removeChild","getMinutes","_prepare_timespan_options","r_configs","temp_configs","Array","t_days","slice","cloned_config","_lame_clone","apply","invert_zones","invertZones","uid","view_key","hasOwnProperty","ids","t_config","_lame_copy","k","c_config","t_sd","t_ed","zone_end","_get_dates_by_index","index","start","end","dates","start_day","delta","t_date","_get_css_classes_by_config","css_classes","join","_get_block_by_config","block","document","createElement","innerHTML","appendChild","area","day","blocks","min_date","max_date","date_to_display","min_day","areas","d","_scales","sday","_cols","_ignores","block_proto","className","height","width","order","inner_index","locate_holder","Math","max","min","all_hours_height","hour_size_px","hour_ms","round","_mark_timespans","data","divs","_on_scale_add_marker","len","childNodes","firstChild","_getClassName","indexOf","configuration","Error","rebuild_els","get_elements","timespans_ids","_marked_timespans_ids","timespan_types","_marked_timespans_types","_addMarkerTimespanConfig","unit_id","timespans_view","day_configs","_array","configs","current_zones","resulting_zones","c_zone_start","c_zone_end","isLast","offset","splice","_subtract_timespan_zones","is_modified","_","_delete_marked_timespan_by_id","parent_array","_delete_marked_timespan_by_config","viewspans","_delete_marked_timespans_list","dayConfig","day_timespans","d_t","related_zones","arguments","types","t","typedConfig","_get_types_to_render","common","specific","types_to_render","_get_configs_to_render","units","unit","_get_unit_index","day_ind","unitsPerDay","floor","_date","key","unit_zones","unit_types","global_data","day_types","dblclick_dhx_marked_timespan","src","dblclick_create","addEventNow","createMethod","methods","isActive","disableMethod","methodName","dummyMethod","restoreMethod","disableMethods","methodsHash","call","restoreMethods","batchUpdatePayload","callback","console","error","$stateProvider","registerProvider","batch_update","noRedraw","dp_mode","call_dp","_dp","updateMode","setUpdateMode","calls","setModeDate","needRender","needUpdateView","repaintEvents","rememberModeDate","render","setCurrentView","updateView","render_data","render_view_data","updateEvent","sendData","initPlugins","deletedEvent","copy","undo_deleted","new_event","message","text","expire","addEvent","limit","batchUpdate","uidSeed","isDate","getFullYear","getMonth","utils","mixin","source","force","f","undefined","object","result","isArray","pop","Function","prototype","toString","constructor","Number","Boolean","varType","Object","defined","delay","timeout","timer","$cancelTimeout","$pending","args","setTimeout","clearTimeout","$execute","extend","cssClass","classList","itemTypes","rows_container","row","setAttribute","fix_tab_position","$firstTab","$lastTab","$segmentedTab","button","builtInButton","spacer","minicalendarButton","minicalendarDiv","click","$_eventAttached","isCalendarVisible","destroyCalendar","renderCalendar","navigation","handler","calendar","html_element","renderElement","renderer","rows","cols","value","align","justifyContent","prepareConfig","renderLayout","items","fragment","createDocumentFragment","next","_init_nav_bar","navBar","querySelector","_update_nav_bar","previousHeight","heightChanged","newHeight","xy","nav_height","unset_actions","set_actions","display","isAttachedNode","root","body","getWindowSize","w","innerWidth","documentElement","clientWidth","h","innerHeight","clientHeight","listenWindowResize","resizeDelay","oldSize","$destroyed","a","b","newSize","triggerSchedulerResize","$root","getComputedStyle","getPropertyValue","resizeWatcher","tabIndex","wai_aria_attributes","offsetHeight","previousWidth","offsetWidth","lowlevelResizeWatcher","contentWindow","EventHost","_silent_mode","listeners","_silentStart","createEventStorage","handlers","eventStorage","combinedResult","handlerResult","handlerId","once","originalHandler","removeEvent","clear","makeEventable","eventHost","eventName","toLowerCase","thisObject","bind","attachAll","name","eventArguments","handlerName","detachEvent","list","eventId","detachAllEvents","defaultDomEvents","el","addEventListener","eventRemove","removeEventListener","domEvents","eventScope","attach","capture","detach","detachAll","staticArray","createEventScope","_eventRemoveAll","_createDomEventScope","_trim","str","trim","replace","_isDate","_isObject","getClassName","node","baseVal","locateCss","classname","strict","trg","srcElement","ind","charAt","right","isVisible","visibility","currentStyle","hiddenSection","recurringSection","hasNonNegativeTabIndex","isNaN","hasHref","nodeName","loLowerCase","input","select","textarea","hasAttribute","isShadowDomSupported","head","createShadowRoot","attachShadow","getRootNode","ShadowRoot","host","dom_helpers","getAbsoluteLeft","htmlObject","getOffset","getAbsoluteTop","getOffsetSum","elem","parseInt","offsetTop","offsetLeft","offsetParent","getOffsetRect","box","getBoundingClientRect","test","navigator","userAgent","dummy","dummyBox","docElem","scrollTop","pageYOffset","scrollLeft","pageXOffset","clientTop","clientLeft","selector","insertAfter","newNode","referenceNode","nextSibling","insertBefore","remove","isChildOf","child","contains","getFocusableNodes","nodes","nodesArray","$position","sort","hasShadowParent","getActiveElement","activeElement","shadowRoot","getSelection","focusNode","getRelativeEventPosition","bottom","y","x","clientX","clientY","getTargetNode","tagName","composedPath","getNodePosition","Element","matches","msMatchesSelector","webkitMatchesSelector","parentElement","nodeType","isWindowAwailable","env","isIE","isOpera","isChrome","isKHTML","isFF","isIPad","search","isEdge","isNode","serialize$1","serialized","encodeURIComponent","JSON","stringify","generateStringToDate","format","utc","splt","mask","match","code","csp_str_to_date","set","temp","locale","month_short_hash","month_full_hash","UTC","cspEnabled","useCsp","csp","init","month_short","month_full","old","setSeconds","setMilliseconds","setTime","getTime","time_part","getTimezoneOffset","shift","start_on_monday","month_start","setDate","year_start","setMonth","day_start","_add_days","inc","ndate","rest","hours","setYear","to_fixed","num","date_to_str","getUTCDate","getUTCMonth","getUTCFullYear","day_short","getUTCDay","day_full","getUTCHours","getUTCMinutes","getUTCSeconds","getSeconds","getUTCISOWeek","getISOWeek","str_to_date","exactFormat","stringToDateMethod","parseExactFormat","yyyyMMddhhIIss","MMddyyyyhhIIss","ddMMyyyyhhIIss","ISO8601","parseYMD","parseMDY","parseDMY","dateString","parse_exact_format","datestr","nday","first_thursday","year_number","ordinal_date","convert_to_utc","getSerializator","_events","_loaded","_load","url","from","_load_url","to","prevent_cache","_load_mode","lf","templates","load_format","cache_line","temp_to","ajax","get","ajaxCallback","response","on_load","_parsers","xml","canParse","xhr","responseXML","xmlDoc","parse","responseText","topElement","xmltop","loader","csrfToken","dhtmlx","security_key","opts","xpath","arr","serverList","itms","j","attrs","attributes","label","attr","nodeValue","ud","udx","_xmlNodeToJSON","_userdata","_init_event","json","events","dhx_security","collections","collections_loaded","collection","option","option_key","ical","RegExp","c_start","c_end","incoming","event_r","e_start","e_end","exec","param","param_r","parse_param","substr","parse_date","dh","dm","utcMark","dy","dn","dd","server_utc","foundParser","parser","_process","status","_process_loading","_loading","_not_render","_render_wait","_after_call","_tagvalue","_init_date","_helpers","parseDate","getSerializableData","createSerializator","serialize","dataset","allEvents","exportedEvent","exportValue","rawValue","xml_format","format_date","load","setLoadMode","array","show_loading","_x","_y","_obj","_init_touch_events","touch","MSStream","platform","maxTouchPoints","scroll_width","_mobile","touchEventsSupported","createEvent","_touch_events","touches","pageX","pageY","PointerEvent","pointerEnabled","pointerType","msPointerEnabled","MSPOINTER_TYPE_MOUSE","names","accessor","ignore","tracker","drag_mode","scroll_mode","action_mode","dblclicktime","attachTouchEvent","_is_lightbox_open","passive","drag_cancel","_hide_global_tip","_on_mouse_up","_temp_touch_block","_drag_pos","_pointerDragId","acc","dnd","timeline","original_render","drag_id","getEvents","_sorder","_count","_on_mouse_move","preventDefault","cancelBubble","_update_global_tip","abs","fake_event","pointerId","_click","dhx_cal_data","_on_dbl_click","_block_next_stop","touch_drag","actTask","_locate_event","fakeTask","sourceTask","_ignore_next_click","previousSibling","_on_mouse_down","for_rendered","_rendered","touch_tip","_show_global_tip","touch_swipe_dates","s_ev","e_ev","step","max_dy","scrollable","dx","dhx_cal_next_button","dhx_cal_prev_button","toptip","_global_tip","time","event_header","day_date","labels","drag_to_create","drag_to_move","calculatedMaterial","cachedBorderBoxValue","checkIfBorderBoxStyling","_is_material_skin","probe","boxSizing","refreshAfterLoad","_border_box_events","oldStyling","flatSkinHourScale","_addThemeClass","skin","_skin_settings","use_select_menu_space","wide_form","displayed_event_color","displayed_event_text_color","_skin_xy","lightbox_additional_height","bar_height","_build_skin_info","clearInterval","monitorIntervalId","setInterval","csstheme","setSkin","styles","themeVar","themeName","isCssVarTheme","cssValues","oldMaterialTheme","links","getElementsByTagName","href","_theme_info","theme","cssVarTheme","values","themeVariables","_configure","col","_skin_init","hour_scale","hour_date","_old_month_day","month_day","old_month_day","dhx_cal_today_button","tab","header","tabs","specialTabs","tabName","find","filter","firstTab","reverse","DataProcessorEvents","dp","$scheduler","$dp","_dataProcessorHandlers","_validId","setUpdated","z","_new_event","_in_progress","_invalid","updatedRows","_waitMode","_update_callback","upd","setUserData","action_param","deleteEvent","_add_rec_marker","DataProcessor","serverProcessorURL","serverProcessor","autoUpdate","_tMode","_headers","_payload","post_delim","messages","updated","inserted","deleted","invalid","invalid_cell","enableUTFencoding","eventable","boxAttribute","_dhx_msg_cfg","usercall","modalBox","modal_key","which","keyCode","messageBox","keyboard","domHelpers","modality","cover","classValue","buttonAriaAttrs","_waiAria","messageButtonAttrString","getFirstDefined","_createBox","ok","cancel","contentId","messageModalAttr","inner","title","content","message_ok","message_cancel","buttons","btn","getElementById","hidden","focus","alertPopup","confirmPopup","boxPopup","box_params","params","focusable","messageInfoAttr","timers","pull","seed","hideAll","popups","alert","confirm","modalbox","setTransactionMode","total","headers","payload","_tSend","_endnm","_serializeAsJson","_router","router","escape","_utf","setDataColumns","val","_columns","getSyncState","enableDataNames","enablePartialDataSend","_changed","master","rowId","state","findRow","existing","getUserData","set_invalid","is_invalid","markRow","_methods","details","getActionByState","checkBeforeUpdate","editStop","sendAllData","_beforeSendData","_getRowData","_sendData","_serializeAsJSON","serialize_one","stack","keys","pref","_applyPayload","urlSeparator","dataToSend","self","queryParams","afterUpdate","urlParams","_user","_cleanupArgumentsBeforeSend","method","preprocessedData","_cleanupItemBeforeSend","action","query","_onResolvedCreateUpdate","tag","resultState","setRequestHeader","sid","tid","afterUpdateCallback","routerMode","actionPromise","create","delete","update","then","catch","valid","_forEachUpdatedRow","_getAllData","out","has_one","pattern","defineAction","_uActions","btag","marker","correct","originalSid","_errorResponse","cleanUpdate","_setDefaultTransactionMode","_serverProcessor","that","finalizeUpdate","atag","_initialized","_dp_init","_is_virtual_event","_set_event_text_style","r","cssText","event_updated","rec_pattern","_dp_change_event_id","new_id","changeEventId","_dp_hook_delete","setDp","dataProcessorEvents","_dataprocessor","setOnAfterUpdate","setOnBeforeUpdateHandler","func","setAutoUpdate","interval","user","_need_update","_update_busy","xml_node","afterAutoUpdate","fullSync","intervalId","loadUpdate","getUpdates","_getXmlNodeValue","version","vers","updates","destructor","processedData","updatedItem","output","item","processedItem","prop","formatDate","_prepareItemForJson","_prepareItemForForm","_prepareDataItem","dataItem","ar","day_tab","week_tab","month_tab","icon_save","icon_cancel","icon_details","icon_edit","icon_delete","confirm_closing","confirm_deleting","section_description","section_time","full_day","confirm_recurring","section_recurring","button_recurring","button_recurring_open","button_edit_series","button_edit_occurrence","grid_tab","prev","year","month","hour","minute","repeat_radio_day","repeat_radio_week","repeat_radio_month","repeat_radio_year","repeat_radio_day_type","repeat_text_day_count","repeat_radio_day_type2","repeat_week","repeat_text_week_count","repeat_radio_month_type","repeat_radio_month_start","repeat_text_month_day","repeat_text_month_count","repeat_text_month_count2_before","repeat_text_month_count2_after","repeat_year_label","select_year_day2","repeat_text_year_day","select_year_month","repeat_radio_end","repeat_text_occurences_count","repeat_radio_end2","repeat_radio_end3","repeat_never","repeat_daily","repeat_workdays","repeat_weekly","repeat_monthly","repeat_yearly","repeat_custom","repeat_freq_day","repeat_freq_week","repeat_freq_month","repeat_freq_year","repeat_on_date","repeat_ends","month_for_recurring","day_for_recurring","be","agenda_tab","description","year_tab","week_agenda_tab","ca","cn","cs","da","de","en","es","fi","fr","he","hu","it","jp","LocaleManager","_locales","nb","nl","no","pl","pt","ro","ru","si","sk","sv","tr","ua","DatePicker","modes","currentRange","eventDates","filterDays","currentModeIndex","onStateChangeHandlers","_domEvents","onStateChange","oldState","newState","_notifyStateChange","direction","newDate","setFullYear","setState","_toggleMode","newIndex","backwardArrow","monthLabel","innerText","toLocaleString","startYear","forwardArrow","_adjustDate","_renderCalendarHeader","dataContainer","_renderDayGrid","_renderMonthGrid","_renderYearGrid","daysOfWeekContainer","currentDate","maxDate","labelFormat","dayElement","weeks","currWeek","minWeeks","minSchedulerDate","maxSchedulerDate","eventDaysTable","reduce","_renderDayGridHeader","weekLength","children","setProperty","firstDate","monthStart","monthEnd","lastDate","currentCalDate","_weeksBetween","dayGridContainer","dateCell","wrapper","months","formatLabel","monthElement","doneArea","doneBtn","yearElement","factoryMethod","extensionManager","stateProviders","internal","provider","unregisterProvider","commonViews","agenda","grid","week_agenda","anythingElse","requiredExtensions","_commonErrorMessages","unknownView","relatedExtension","collapsedContainer","createTimelineView","createUnitsView","createGridView","exportToPNG","exportToPDF","extend$l","_detachDomEvent","_init_once","scheduler_resize_listener","hasSchedulerMarkup","wai_aria_application_role","views","_grid","log","rtl","_scroll","init_templates","set_sizes","$initialized","min_event_height","scale_width","scale_height","month_scale_height","menu_width","margin_top","margin_left","editor_width","month_head_height","event_header_height","edit_save","edit_cancel","functor","scale_x","materialScalePlaceholder","set_xy","_lightbox","_setLbPosition","_data_width","prepareValue","prepared","class_name","attr_value","labelAttr","domEventsScope","getDaysDifference","startDate","endDate","differenceInDays","_select_id","_close_not_saved","previousSelection","editor_id","_edit_id","lightbox_id","_lightbox_id","select_id","expanded","readonly","icon","def_step","dhx_cal_tab","deprecated_name","substring","_dhtmlx_confirm","title_confirm_deleting","edit","save","showLightbox","form","base","duration","event_duration","time_step","start_hour","_drag_event","details_on_dblclick","viewHandler","_get_column_index","x_pos","column","_week_indexes_from_pos","pos","ceil","_mouse_coords","$env","_colsS","$domHelpers","dataArea","heights","_ignores_detected","preserve_length","_event_length","_get_real_event_length","x_step","x_unit","timestamp","confirmationText","title_confirm_closing","positive_closing","_correct_shift","back","_is_pos_changed","old_pos","new_pos","diff","old_val","new_val","has_moved","_correct_drag_start_date","_start_correction","_end_correction","_get_fictional_event_length","_correct_drag_end_date","mousedownPos","_get_date_from_pos","_drag_start","fields","timeStep","custom","_dragEventBody","_move_event_shift","resize_date","_drag_from_start","resize_from_start","end_day_start","end_day_date","firstHour","maxY","precisePos","minDate","preciseDate","cursor","new_end","new_start","limit_drag_out","all_timed","_get_section_view","_get_event_sday","_allow_dnd","update_render","sx","update_view","drag_event_body","_get_private_properties","_clear_temporary_properties","clean","flagged_event","initial","current_state","moved","_dhx_changed","is_new","edit_on_create","details_on_create","_trigger_dyn_loading","_reset_ignores","_reset_scale","isViewExists","_set_aria_buttons_attrs","buttonGroups","group","headerButtonsAttributes","icon_form","oldClass","newClass","multidayScroll","dhx_multi_day","prev_scroll","preserve_scroll","_dy_shift","headerToggleState","_render_x_header","offset_top","left_border","columnHeaderText","dayHeaderAttr","_get_columns_num","count","count_n","_get_timeunit_start","_get_view_end","ed","_calc_scale_sizes","summ","_process_ignores","realcount","_set_scale_col_size","_render_scales","data_area","sd","today","scales","cls","firstHalf","slotDate","htmlContent","time_slot_text","time_slot_class","secondHalf","week_date_class","dayColumnAttr","_getNavDateElement","drag_resize","drag_move","navBarDateStr","scaleElement","navBarDateAttr","_reset_month_scale","_reset_hours_scale","multi_day","c1","totalWidth","col_length","hiddenWidth","c2","cc","hourScaleAttr","scroll_hour","now_date","preserve","ign_date","_render_month_scale","view_start","cd","tdwidths","cell_width","getCellHeight","cellheight","table","cell","month_date_class","body_class","head_class","monthCellAttr","cellHead","cellBody","bf1","getLabel","lightbox","updateCollection","list_name","resetLightbox","hideCover","cache","n_ev","_focus","endColumnIndex","eventLength","startColumnIndex","_get_date_index","last_column","check","excludedDuration","intervalStart","intervalEnd","leftCellCutOffStart","leftCellCutOffEnd","rightCellCutOffStart","rightCellCutOffEnd","ev_length","dir","per_day","end_slot","fd","start_slot","_get_section_property","_is_initialized","htmlTags","extraSpaces","stripHTMLLite","htmlText","singleQuotes","escapeQuotes","getAttributeString","setAttributes","role","getHeaderCellAttr","eventAttr","_eventCommonAttr","event_text","$dataprocessor_class","setEventBarAttr","_getAttributes","attributeSetter","arg","eventBarAttrString","agendaHeadAttrString","agendaHeadDateString","agendaHeadDescriptionString","agendaDataAttrString","agendaEventAttrString","agendaDetailsBtnString","gridAttrString","gridRowAttrString","gridCellAttrString","mapAttrString","mapRowAttrString","mapDetailsBtnString","minicalHeader","headerId","minicalGrid","minicalRow","minicalDayCell","selected","minicalHeadCell","weekAgendaDayCell","weekAgendaEvent","lightboxHiddenAttr","lightboxVisibleAttr","lightboxSectionButtonAttrString","tabindex","yearHeader","yearGrid","yearHeadCell","yearRow","yearDayCell","lightboxAttr","lightboxButtonAttrString","buttonName","eventMenuAttrString","iconName","lightboxHeader","headerText","lightboxSelectAttrString","time_option","buttonLabel","quickInfoAttr","quickInfoHeaderAttrString","quickInfoHeader","quickInfoButtonAttrString","tooltipAttr","tooltipVisibleAttr","tooltipHiddenAttr","dom","assert","show_errors","_createDatePicker","_getFocusableNodes","_locate_css","messageApi","$","counter","Promise","clearAll","createConfig","async","serializeRequestParams","DOMParser","ActiveXObject","loadXML","parseFromString","tagname","xpathExp","docObj","selectNodes","first","ownerDocument","evaluate","XPathResult","ANY_TYPE","iterateNext","_call","onLoad","getSync","put","postData","del","post","postSync","resolve","reject","XMLHttpRequest","isQt","readyState","filePath","open","toUpperCase","send","$ajax","default_date","month_date","load_date","week_date","date_format","api_date","day_column_padding","drag_create","resize_month_events","resize_month_timed","responsive_lightbox","separate_short_events","cascade_event_count","cascade_event_margin","multi_day_height_limit","drag_lightbox","quick_info_detached","icons_edit","icons_select","buttons_left","buttons_right","highlight_displayed_event","ajax_error","delay_render","timeline_swap_resize","$initial","xml_date","d1","d2","day_scale_date","month_scale_date","week_scale_date","time_picker","event_date","event_class","event_bar_date","event_bar_text","month_events_link","drag_marker_class","drag_marker_content","tooltip_date_format","tooltip_text","calendar_month","calendar_scale_date","calendar_date","calendar_time","clear_view","extra_data","silent","setEvent","hash","create_getter","create_setter","is_visible_events","clear_event","evFirstHour","evLastHour","lastHour","checkEndDate","get_visible_events","only_timed","filter_event","_is_main_area_event","hold","full","_recalculate_timed","tvs","tvd","_rendered_location","buffer","renderedLocation","_view_month_day","_render_month_link","toRender","_sday","_eday","curr","_sweek","_get_event_bar_pos","widt","x2","_pre_render_events","render_event_bar","max_evs","max_month_events","real","render_event","_get_first_visible_cell","hb","h_old","_pre_render_events_table","_pre_render_events_line","monthRows","cellHeight","cHeight","unshift","scrollHeight","scroll_fix","scale_settings","sum_width","row_heights","full_multi_day_height","used_multi_day_height","used_multi_day_height_css","multi_day_section","multi_day_icon","overflowY","datePart","_get_event_mapped_end_date","ev_duration","_min_mapped_duration","evs_originals","sh","eh","_inner","t_ev","slot_index","sorderSet","_is_sorder","_max_sorder","max_count","_copy_event","_time_order","_is_any_multiday_cell_visible","isAnyCellVisible","checkDate","noCells","lastDayEnd","weekCellIndex","chunks_info","first_chunk","last_chunk","chunk_info","locate_s","locate_e","_length","stack_line","_first_chunk","_last_chunk","_copy_dummy","_y_from_date","sm","_calc_event_y","min_height","em","parentWidth","menu","menu_offset","pos_y","ev_count","ev_sorder","margin","_render_v_bar","_text_style","zIndex","color","tplClass","_editor","shiftKey","ariaAttr","icons","icons_str","currentIcon","textColor","highlightEventPosition","contentA","contentB","cse","boxWidth","renderEvent","inner_html","footer_class","_drag_resize","past","_get_dnd_order","ev_height","max_height","_orig_sorder","evTop","columns","y_event_offset","resize_handle","resizable","left_chunk","right_chunk","resize_left","resize_right","timed","bg_color","style_text","_edit_stop_event","getRenderedEvent","rendered_events","rendered_event","showEvent","original_color","original_text_color","getSectionTop","posFromDate","_smartRenderingEnabled","restoreOriginalColors","scrollTo","_append_drag_marker","m","scale","lastChild","_update_marker_position","getLightboxRoot","cspEnvironment","salesforceEnvironment","_lightbox_controls","formSection","getLightbox","getValue","form_blocks","get_value","setValue","set_value","get_template_control","control","get_select_control","get_textarea_control","get_time_control","defaults","template","sns","placeholder","_get_input","_dhx_onchange","onchange","time_format","_time_format_order","dt","last","limit_time_select","selectBoxClass","range","start_year","end_year","year_range","tdate","_time_values","ariaAttrs","_full_day","checked","disabled","_fill_lightbox_select","auto_end_date","_update_lightbox_select","time_values","direct_value","fixed_value","value_found","t_v","selectedIndex","original","showCover","show_cover","_cover","_fill_lightbox","lightbox_header","headerContent","headerDate","headerTitle","current_sns","_get_lightbox_section_node","default_value","_lightbox_out","_empty_lightbox","hide_lightbox","endLightbox","hide_cover","_move_while_dnd","_finish_dnd","save_lightbox","startLightbox","_custom_lightbox","_temp_lightbox","cancel_lightbox","hideLightbox","_init_lightbox_events","buttonTarget","sectionButton","button_click","readonly_active","setLightboxSize","_init_dnd_events","_dnd_start_lb","dhx_unselectable","lb","_lb_start","_ready_to_dnd","recurring","_lightbox_template","label_name","ds","t_ds","_bindLightboxLabels","inputBlock","fallback","inputId","old_id","getRootView","hooks","didInsert","cmp","skins","jQuery","fn","dhx_scheduler","each","Scheduler","getSchedulerInstance","comp","update_view_timer","curr_view_timer","lazy_setCurrentView","oldDate","oldMode","updateFlags","lazy_updateView","ars","createDataProcessor","tMode","dhtmlxError","catchError","i18n","addLocale","setLocale","localeObject","getLocale","dhx_save_btn","dhx_cancel_btn","dhx_delete_btn","addPlugins","ext","activePlugins","plugins","dependencies","priorities","extension","dep","dependencyName","orderA","orderB","treetimeline","daytimeline","outerdrag","legacy","extensionList","plugin","getExtension","ExtensionsManager","_extensions","attaches","attachScheduler","_genStr","attachObject","vs","av","sched","schedId","setSizes","_viewRestore","notImplemented","modals","modalsStack","isModal","afterPopup","trapFocus","currentTarget","$keyboardNavigation","_keyNavMessagePopup","focusElement","backupFocus","key_nav_legacy","_temp_key_scope","key_nav","_pasteDate","_pasteSection","isCopy","trackMousePosition","mousePointer","keyNavPointer","elementFromPoint","dispatcher","copyEvent","_make_pasted_event","event_pid","event_length","multisection","isMultisectionEvent","_do_paste","is_copy","modified_ev","original_ev","_is_key_nav_active","ctrlKey","metaKey","_buffer_event","_key_nav_copy_paste","getActiveNode","new_ev","scheduler_handlers","attachSchedulerHandlers","waitCall","keyDownHandler","focusHandler","keepScrollPosition","focusGlobalNode","enable","reFocusActiveNode","activeNode","isValid","MinicalButton","MinicalCell","mousedownHandler","dataAreaClick","listOfScales","some","Event","TimeSlot","nextSlot","setActiveNode","removeAttribute","evNode","prevState","lastStart","lastEnd","lastSection","getNode","GoogleMapAdapter","_markers","zoom","zoom_after_resolve","initial_zoom","lat","lng","setCenter","setZoom","error_position","google","maps","trigger","mapOptions","center","initial_position","mapId","scrollwheel","mapTypeId","Map","__gm","messageOverlay","outerContainer","setOptions","addListener","geocoder","Geocoder","point","latLng","geocode","results","GeocoderStatus","OK","geometry","location","event_location","formatted_address","clearInstanceListeners","addEventMarker","AdvancedMarkerElement","importLibrary","mapView","createMarker","setMap","infoWindow","close","InfoWindow","maxWidth","info_window_max_width","setContent","map_info_content","anchor","markerInfo","setVisible","setPosition","latlng","LatLng","clearEventMarkers","latitude","longitude","resolveAddress","string","address","OpenStreetMapAdapter","openPopup","closeTooltip","setView","mapWrapper","L","tileLayer","addTo","on","fetch","country","myIcon","iconUrl","iconSize","shadowSize","iconAnchor","shadowAnchor","popupConfig","minWidth","markerPopup","popup","tooltip","markerConfig","bindPopup","bindTooltip","removeLayer","setLatLng","lon","MapboxAdapter","getPopup","isOpen","togglePopup","mapboxgl","accessToken","lngLat","features","place_name","Popup","focusAfterOpen","setMaxWidth","setHTML","Marker","setLngLat","setPopup","ALL_WEEKDAYS","Weekday","weekday","fromStr","nth","equals","other","getJsWeekday","isPresent","isNumber","isWeekdayStr","includes","rang","repeat","times","padStart","targetLength","padString","sep","splits","pymod","divmod","mod","empty","notEmpty","datetime","MONTH_DAYS","ONE_DAY","MAXYEAR","ORDINAL_BASE","PY_WEEKDAYS","isLeapYear","isValidDate","toOrdinal","date2","differencems","fromOrdinal","ordinal","getMonthDays","getWeekday","monthRange","combine","getMilliseconds","clone","cloneDates","clones","timeToUntilString","untilStringToDate","until","bits","dateTZtoISO8601","timeZone","IterResult","_result","before","after","accept","tooEarly","tooLate","extendStatics","setPrototypeOf","__proto__","__extends","TypeError","__","__assign","assign","__spreadArray","pack","l","SuppressedError","Frequency","CallbackIterResult","_super","iterator","_this","ENGLISH","dayNames","monthNames","tokens","SKIP","number","numberAsText","every","at","the","second","third","for","monday","tuesday","wednesday","thursday","friday","saturday","sunday","january","february","march","april","may","june","july","august","september","october","november","december","comma","defaultGetText","defaultDateFormatter","ToText","rrule","gettext","language","dateFormatter","origOptions","bymonthday","bynmonthday","byweekday","allWeeks","someWeeks","isWeekdays","isEveryDay","sortWeekDays","isFullyConvertible","freq","IMPLEMENTED","RRule","FREQUENCIES","plural","HOURLY","MINUTELY","DAILY","bymonth","_bymonth","_bymonthday","_byweekday","byhour","_byhour","WEEKLY","MONTHLY","YEARLY","byyearday","byweekno","weekdaytext","monthtext","npos","wday","finalDelim","delim","o","realCallback","delimiter","finalDelimiter","Parser","rules","done","nextSymbol","isDone","symbol","best","bestSymbol","name_1","v","acceptNumber","expect","parseText","ttr","AT","F","MO","TU","WE","TH","FR","ON","wkd","decodeWKD","decodeNTH","MDAYs","decodeM","S","freqIsDailyOrGreater","fromText","Time","millisecond","DateTime","fromDate","getYear","addYears","years","addMonths","yearDiv","monthMod","addWeekly","wkst","fixDay","addDaily","addHours","filtered","_a","dayDiv","hourMod","addMinutes","minutes","byminute","hourDiv","minuteMod","addSeconds","seconds","bysecond","minuteDiv","secondMod","daysinmonth","SECONDLY","initializeOptions","_i","keys_1","defaultKeys","parseOptions","DEFAULT_OPTIONS","byeaster","dtstart","bysetpos","bynweekday","parsedOptions","parseString","rfcString","parseLine","parseDtstart","line","dtstartWithZone","tzid","parseRrule","Days","parseIndividualNumber","optionKey","parts","SyntaxError","wdaypart","DateWithZone","RangeError","defineProperty","enumerable","configurable","isUTC","rezonedDate","localTimeZone","Intl","DateTimeFormat","resolvedOptions","dateInLocalTZ","tzOffset","optionsToString","outValue","buildDtstart","strValues","ruleString","argsMatch","Cache","all","between","_cacheAdd","what","_value","_cacheGet","cached","argsKeys","findCacheDiff","cachedObject","iterResult","M365MASK","M366MASK","M28","M29","M30","M31","MDAY366MASK","MDAY365MASK","NM28","NM29","NM30","NM31","NMDAY366MASK","NMDAY365MASK","M366RANGE","M365RANGE","WDAYMASK","wdaymask","rebuildYear","firstwkst","wyearlen","firstyday","yearlen","nextyearlen","yearordinal","yearweekday","mmask","mdaymask","nmdaymask","mrange","wnomask","no1wkst","numweeks","lnumweeks","lyearweekday","lno1wkst","lyearlen","weekst","Iterinfo","rebuild","lastyear","yearinfo","lastmonth","monthinfo","nwdaymask","ranges","eastermask","g","yearStart","ydayset","mdayset","wdayset","ddayset","htimeset","mtimeset","stimeset","getdayset","gettimeset","buildPoslist","timeset","ii","dayset","poslist","daypos","timepos","tmp","iter","emitResult","counterDate","millisecondModulo","removeFilteredDays","rezoneIfNeeded","currentDay","isFiltered","dayCounter","SA","SU","noCache","_cache","fromString","_iter","toText","isFullyConvertibleToText","unfold","forceset","compatible","parseInput","rrulevals","rdatevals","exrulevals","exdatevals","parsedDtstart","lines","_b","parms","rdateTzid","parseRDate","rrulestr","rset_1","RRuleSet","groomRruleOptions","rdate","exrule","exdate","rdateval","parm","createGetterSetter","fieldName","field","_rrule","field_1","_rdate","_exrule","_exdate","_exdateHash","_accept","evalExdate","zonedDate","_addRule","_addDate","rrules","exrules","rdates","exdates","_dtstart","rdatesToString","rrs","rule","Tooltip","_scheduler","_tooltipNode","_root","_isLikeMouseEvent","_calculateTooltipPosition","viewport","_getViewPortSize","tooltipNode","offsetX","tooltip_offset_x","offsetY","tooltip_offset_y","mouse","containerPos","scrollY","_getViewPort","scrollX","$event_data","$event","TooltipManager","_listeners","_initDelayedFunctions","hideTooltip","delayHide","watchableTarget","eventTarget","targetNode","doOnMouseEnter","onmouseenter","touch_tooltip","onmouseleave","onmousemove","listener","cloneDomEvent","delayShow","utils.default","show","tooltip_timeout","tooltip_hide_timeout","gplExtensions","active_links","active_link_view","_active_link_click","s_d","do_wrapper","fullname","week_x","d_s","agenda_legacy","add_agenda_legacy","agenda_legacy_time","agenda_legacy_text","agenda_legacy_date","agenda_legacy_start","old_dblclick_dhx_cal_data","dblclick_dhx_cal_data","fill_agenda_tab","old_render_view_data","ev_class","agendaDetailsButtonAttr","agenda_time","agenda_text","_agendaScrollTop","agenda_area","dateElement","agenda_date","agenda_legacy_view","agenda_start","agenda_end","rowAttr","dateHeader","descriptionHeader","agenda_view","add_agenda","dayDateToStr","dayDowToStr","agenda_day","eventsInDays","anyEvents","ignore_agenda","renderDay","calendarEvent","selectedId","all_timed_month","is_event_short","_safe_copy","proto","isPrototypeOf","old_prerender_events_line","old_prerender_events_table","prerender_events","ce","_virtual","isOvernightEvent","getNextDay","setDateTime","event_changed","re","redraw","next_day","old_get_visible_events","old_mode","old_date","oldUpdate","fullRedrawNeeded","collision","temp_section","_setTempSection","event_id","collision_limit","checkCollision","edited_ev","recurring_event_id","_roll_back_dates","_check_sections_collision","evs_dates","getRecDates","tevs","concurrent","_pid_time","checked_mode","single","container_autoresize","month_day_min_height","min_grid_size","min_map_size","old_pre_render_event","active","total_height","multiday_height","evl","_h_fix","navHeight","headerHeight","checked_divs","updateContainterHeight","is_repaint","checked_div","maxHeight","year_y","cur_height","week_agenda_scale_height","eventsContainer","_gridView","y_unit","getSectionHeight","scrollWidth","getScrollSize","callUpdate","conditionalUpdateContainerHeight","asyncRepaint","requestAnimationFrame","autosizeEnabled","$original_scroll_width","$original_section_autoheight","section_autoheight","cookie","getCookieName","_get_url_nav","urlNavigationPlugin","schedulerCookie","unescape","newMode","cookie_param","old_load","drag_between","editors","cached_options","resetCombo","_combo","DOMParent","combo","unload","DOMelem","dhx_globalImgPath","image_path","dhtmlXCombo","options_height","setOptionHeight","enableFilteringMode","filtering","script_path","selected_id","addOption","disable","selectOption","setComboValue","all_options","single_option","getIndexByValue","getSelectedValue","getSelectedText","vertical","radiobuttons","checked_value","isChecked","check_html","label_html","checkbox","unchecked_value","expand","fullscreen","toggleIcon","_position","_width","_height","_overflow","overflow","_maximize","collapse","directions","prev_margin","export_api","std","getElementSizes","sizes","dhtmlxAjax","dhx4","getTimeline","orientation","dpi","_export_html","_send_to_export","exportToICal","_serialize_plain","exportToExcel","_serialize_columns","_ajax_to_export","server","info","_plain_export_copy","$text","_create_hidden_form","submit","_hidden_export_form","_get_export_size","footer","A5","A4","A3","A2","A1","A0","dataX","cSize","parseFloat","smartRendering","initialSizes","smart_rendering","style_width","style_height","timeline_scrollable","timeline_smart_rendering","grid_view","html_templates","getScope","scopes","minicalButton","minicalDate","SchedulerNode","DataArea","timeSlot","searchMap","key_nav_step","addShortcut","shortcut","scope","scopeObject","getShortcutHandler","commands","shortcuts","findHandler","removeShortcut","unbind","disp","setDefaultNode","_compose","createCommand","modifiers","alt","ctrl","meta","expr","getExpressions","words","getWords","command","commandKeys","specialKeys","charCodeAt","getCommandFromEvent","domEvent","altKey","printableKey","fromCharCode","getHashFromEvent","getHash","junctionChar","term","combinationChar","backspace","enter","esc","space","up","down","home","pageup","pagedown","insert","plus","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10","f11","f12","EventHandler","_handlers","doAction","returnValue","bindAll","initKeys","nextItem","currentFocus","currentIndex","renderMultiple","currentStart","currentEnd","_modes","_getMode","renderVerticalMarker","renderTimelineMarker","renderYearMarker","renderMonthMarker","weekAgenda","renderWeekAgendaMarker","renderAgendaMarker","dayColumns","addWaiAriaLabel","addDataAttributes","dateToStr","dateTimeLabel","sectionObject","markerDate","_wrapDiv","_get_year_cell","opacity","view_opts","round_position","_trace_x","_is_column_visible","start_pos","end_pos","set_date_part","tempStart","tempEnd","_timeline_getX","_section_height","_isRender","renderMonthCell","weekNumber","dayIndex","datatable","lineHeight","getDefaultNode","getMode","blur","_compareEvents","_pickEvent","startId","nextEventHandler","nextEvent","currEvent","visibleDates","nextEv","prevEventHandler","HeaderCell","getNodes","KeyNavNode","moveTo","compareTo","canStringifyThis","canStringifyThat","defaultCell","_getSection","_getNodes","defaultElement","isScrolledIntoView","eventBox","viewPort","idSelector","inlineEditor","getInlineEditor","_moveToSlot","slot","movingDate","getDefaultDate","_getDefaultSection","visibleTime","nowTime","showNowTime","findVisibleColumn","timeslot","_getMultisectionView","_getNextSection","nextIndex","defaultSlot","addMonthDate","nextMonthSlot","_alignTimeSlot","nextTimelineSlot","newPos","nextUnitsSlot","optionsCount","nextDaySlot","_moveDate","isBeforeLastHour","isStartDate","isAfterFirstHour","isInVisibleDayTime","oldStart","toNextDay","testEnd","nextWeekAgendaSlot","nextAgendaSlot","isDateVisible","nextDateColumn","current","tempSlot","extendSlot","extendUnitsSlot","extendTimelineSlot","extendMonthSlot","extendDaySlot","extendWeekAgendaSlot","extendGenericSlot","allowedDirections","moveDate","newDates","extendSlotDates","oldSlot","newSlot","dateDirection","scrollSlot","globalNode","_getGrid","_getNode","enabled","newRow","newCol","blurNode","editor","defaultPrevented","schedulerNode","_timeout","_minicalendars","isMinical","minicalendars","patchMinicalendar","focusMinical","minicalClick","rowIndex","cellIndex","td","renderMinical","cal","added","destroyMinical","_def_count","attachOnce","isSchedulerSelected","changeState","layer","layers","validId","_clearUpdateFlag","_cloneObj","_dataprocessors","_layers_zindex","initial_layer_zindex","isDefault","defaultLayer","showLayer","tlayer","toggleLayer","hideLayer","visible","getLayer","layer_name","native_event_object","noMenu","_evs_layer","_t_render_view_data","evs_layer","borderBox","borderBoxWidth","headerWidth","bodyWidth","footerWidth","bodyHeight","new_zIndex","filter_agenda","limit_view","_temp_limit_scope","om","od","nm","nd","isBlocked","date_end","resetDate","is_new_event","data_copy","native_object","_mark_now_timer","map_view","mapAdapter","eventHandlerIds","adapters","googleMap","openStreetMaps","mapbox","setupMapView","createAdapter","unmodifiedEvent","_eventLocationChanged","map_settings","resolve_event_location","_latLngUpdate","addEventWithLocation","updateEventMarker","newIdEvent","removeEventMarker","onEventClick","coordinates","map_view_provider","currentAdapter","resolve_user_location","view_provider","map_initial_position","map_error_position","map_date_width","map_icon_width","map_description_width","add_map","map_date","map_time","map_text","map_start","dblclick_dhx_map_area","map_initial_zoom","map_zoom_after_resolve","map_infowindow_max_width","map_resolve_user_location","map_type","map_resolve_event_location","fill_map_tab","_selected_event_id","ariaButtonAttr","map_end","mapContainer","adapter","elem_id","marginRight","marginTop","destroy","initialize","geolocation","getCurrentPosition","coords","_updateEventLocation","_event_resolve_delay","ret","minical","minicalDomEvents","minicalendar","mark_events","_synced_minicalendars","_prev","is_refresh","_render_calendar","unmarkCalendar","cont","tpos","_get_def_cont","$dom","dateAttribute","markCalendar","_last_date","conf","markedDates","_markCalendarCurrentDate","sync","_on_xle_handler","updateCalendar","_created","_locateCalendar","weekNum","dat","dayCell","_week_template","week_template","dummy_date","_mini_cal_arrows","previous","ts","temp2","temp3","temp4","temp5","temp6","temp7","temp8","padding","weekHeader","move_minicalendar_date","css_classnames","css_texts","diffs","calendars","arrow","dayHeaders","dayCells","inputs","selects","inp","new_date","_update_minical_select","isFulldayEvent","_attach_action","_round_minutes","linkCalendar","datediff","dateNew","month_end","monthheight","old_s","multiselect","_children","_mark_inputs","_ids","script_url","divLoading","multisource","mvc","update_timer","use_id","sanitize","_finish_ext_load","_get_id","model","cid","backbone","toJSON","changes","queue","add_from_queue","Backbone","Collection","last_event","dragger","dhtmlDragAndDropObject","stopDrag","on_drop","sourceHtmlObject","dhtmlObject","targetHtmlObject","targetHtml","action_data","event_data","view_options","_locate_cell_timeline","addDragLanding","_drag","_dragIn","shtmlObject","_dragOut","DragControl","addDrop","onDrop","sourceDhtmlx","getMaster","onDragIn","pdf","html_regexp","newline_regexp","clean_html","x_norm","colsWidth","x_norm_event","is_left","dhx_cal_header","y_norm","get_style","de_day","de_week","xml_end","xml_top","profile","xml_body_header","dhx_cal_date","xh","xml_month_scale","xml_month","yh","xhs","second_scale","top_width","top_col","xml_body","colors","week_starts","_month","text_color","zx","zdx","left_norm","zy","zdy","e_type","dets","week","dy_copy","toXML","original_date","original_mode","temp_date","to_pdf","objects","getPDFData","toPDF","toPDFRange","quick_info","show_quick_info","clickedElementPosition","fitQIInsideWindow","quickInfoPopup","popupRect","offsetBottom","getPositionInsideScheduler","_$quickInfoHandler","eventElement","showQuickInfo","hiding_function","hideQuickInfo","quick_info_title","quick_info_content","quick_info_date","_quick_info_box_id","_get_event_counter_part","_quick_info_box","_init_quick_info","_fill_quick_data","_show_quick_info","cssTimeToMs","milliseconds","forced","qi","_x_scroll","dataPos","ontransitionend","_quick_info_onscroll_handler","$testmode","_qi_button_click","main","mainContent","originalRecurringSetValue","original_left_buttons","original_right_buttons","txt_replace","txts","txtt","readonly_form","forbidden_buttons","button_arrays","forbidden_button","button_array","originalForm","readonlyForm","_lightbox_r","clearMilliseconds","isSeries","toUTCDate","old_add_event","groupExceptions","exceptions","original_start","_rec_temp","_rec_markers_pull","_rec_markers","_get_rec_marker","ch","_get_rec_markers","ev_id","_ignore_call","tev","_pid_changed","_is_modified_occurence","idTimestamp","nid","nev","sub","isEventFound","_start_date","showLightbox_rec","lightbox_recurring","pid","isVirtual","showSeries","title_confirm_recurring","get_visible_events_rec","repeat_date","old_update_event","toIcalString","getWeekdayOfMonth","dayOfWeek","dayOfMonth","dayNumber","non_render","maxCount","seriesExceptions","utcStart","parsedRRule","repeatedDates","adjustedDate","visibleCount","eventDuration","exception","_fix_daylight_saving_date","recurrings","sev","occurence","include_end_by","recurring_workdays","jsDaysToRRULEDays","RruleDayNumsToJs","formatDayNumber","repeat_monthly_date","repeat_monthly_weekday","nthDayOfMonth","repeat_yearly_month_date","repeat_yearly_month_weekday","getRecValue","WORKDAYS","CUSTOM","monthRepeat","yearRepeat","formatFunc","endRule","NEVER","fillInDefaults","dayNum","dayLabel","dateOfMonth","nthWeekDayOfMonth","dateOfYear","nthWeekDayOfYear","countInput","ondateInput","endOptionSelect","formatter","repeat_date_of_end","dispatchEvent","getFirstSectionOfType","rec","_get_node","_outer_html","loc","_init_set_value","_ds","weekly","monthly","yearly","_rec_init_done","rf","blocked","rruleset","topOption","rruleObj","untilDate","customFreq","actual_dates","timeControl","recurrence","_start","recurring_legacy","getRecurringSection","occurrence_timestamp_in_utc","outerHTML","_get_form_node","_get_node_value","_get_node_numeric_value","_set_node_value","hash_value","str_date_format","date_str","register_els","inps","change_current_view","set_end_rule","_get_repeat_code","get_rcode","str_date","transpose_type","get_numeric_value","repeat_precise","start_exists","transpose_day_week","set_rcode","_set_repeat_code","MouseEvent","elements","_toggle_block","_get_button","_get_form","backgroundPosition","transponse_size","day_week","originalMonth","newMonth","cor","cor2","cday","transposeRecurring","recurringParts","addRecurring","recurringStepDays","weekDays","seriesInstance","currentCount","origMonth","origYear","correctOverflowInstances","recurring_overflow_instances","startHour","ted","data_attributes","all_events","_serialize_json_value","toICal","full_day_format","tooltipManager","tooltips","tooltipFor","targetEventId","s2d","d2s","select_event","wp","year_view","year_date","year_month","year_scale_date","year_tooltip","isYearMode","getCellDate","dblclick_dhx_year_grid","_year_render_event","_year_marked_cells","_hideToolTip","_tooltip","_showToolTip","_year_view_tooltip_handler","_init_year_tooltip","_mark_year_date","_unmark_year_date","_reset_year_scale","year_top","ssd","yearBox","year_x","datepicker","ignore_year","locateEvent","factory","extensions","_seed","_schedulerPlugins","_bundledExtensions","_extensionsManager","initConfig","_internal_id","$syncFactory","_initFromConfig","addCalendar","$dhx"],"mappings":";;;;;;;;2OAUA,MAAAA,SAPUC,OAAW,IACNA,OAEAC,OCNA,SAASC,GAAiBC,EACrC,CAAA,IAAIC,EAAa,CAAA,EACbC,KACAC,EAAY,KACZC,EAAQ,KAEZ,SAASC,GAAAA,CACL,OAAOL,EAAUM,OAAOC,gBAAkBP,EAAUQ,YACvD,CAED,SAASC,EAAcC,EAAAA,CACnB,MAAMC,EAAUX,EAAUY,QAAQF,CAAAA,EAClC,OAAGC,EACQA,EAAQE,OAEZH,CACV,CA4BD,SAASI,EAAmBC,EACxB,CAAA,KAAA,CAAMX,MAAEA,EAAKS,OAAEA,EAAMH,SAAEA,EAAQM,UAAEA,EAASb,UAAEA,CAAcY,EAAAA,GAjB9D,SAAmCZ,EAAWU,EAAAA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,OACV3kH,OAAO2kH,KAAO,IAGf3kH,OAAO2kH,KAAKxkH,UAAYA,GACxBH,OAAO2kH,KAAKplD,UAAYA","x_google_ignoreList":[84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111]} \ No newline at end of file diff --git a/codebase/sources/dhtmlxscheduler.css b/codebase/sources/dhtmlxscheduler.css index 3259853..f4442dc 100644 --- a/codebase/sources/dhtmlxscheduler.css +++ b/codebase/sources/dhtmlxscheduler.css @@ -3285,7 +3285,7 @@ div.dhx_timeline_label_column_header .dhx_timeline_label_content_wrapper { } .dhx_cal_datepicker_days { display: grid; - grid-template-columns: repeat(7, 1fr); + grid-template-columns: repeat(var(--dhx-scheduler-week-length, 7), 1fr); gap: 4px; } .dhx_cal_datepicker_dayname, diff --git a/codebase/sources/dhtmlxscheduler.es.js b/codebase/sources/dhtmlxscheduler.es.js index 726b76f..a5e13dd 100644 --- a/codebase/sources/dhtmlxscheduler.es.js +++ b/codebase/sources/dhtmlxscheduler.es.js @@ -1,3 +1,12 @@ +/** @license + +dhtmlxScheduler v.7.1.3 Standard + +To use dhtmlxScheduler in non-GPL projects (and get Pro version of the product), please obtain Commercial/Enterprise or Ultimate license on our site https://dhtmlx.com/docs/products/dhtmlxScheduler/#licensing or contact us at sales@dhtmlx.com + +(c) XB Software Ltd. + +*/ function dhtmlxHook() { if (typeof dhtmlx != "undefined" && dhtmlx.attaches) { dhtmlx.attaches.attachScheduler = function(day, mode, tabs, scheduler2) { @@ -134,7 +143,7 @@ function dragHighlightPos(scheduler2) { let unitMarkersArray = []; const { event: event3, layout, viewName, eventNode: eventNode2 } = settings; let sectionPropertyName = checkSectionPropertyName(viewName); - if (scheduler2.config.multisection && sectionPropertyName) { + if (sectionPropertyName) { const sections = String(event3[sectionPropertyName]).split(scheduler2.config.section_delimiter); const formatedSections = sections.map((element) => String(element)); const elems = []; @@ -3189,7 +3198,7 @@ function extend$j(scheduler2) { } else { excludedDuration += intervalEnd.getHours() * 60 * 60 * 1e3 + intervalEnd.getMinutes() * 60 * 1e3; } - if (intervalStart.valueOf() < leftCellCutOffEnd.valueOf()) { + if (intervalStart.valueOf() <= leftCellCutOffEnd.valueOf()) { excludedDuration += config._end_correction; } if (intervalStart.valueOf() < leftCellCutOffStart.valueOf()) { @@ -8477,7 +8486,7 @@ function i18nFactory() { } class DatePicker { constructor(scheduler2, container, state = {}) { - this.state = { date: /* @__PURE__ */ new Date(), modes: ["days", "months", "years"], currentRange: [], eventDates: [], currentModeIndex: 0, ...state }; + this.state = { date: /* @__PURE__ */ new Date(), modes: ["days", "months", "years"], currentRange: [], eventDates: [], filterDays: null, currentModeIndex: 0, ...state }; this.container = null; this.element = null; this.onStateChangeHandlers = []; @@ -8585,19 +8594,21 @@ class DatePicker { } } _renderDayGridHeader(daysOfWeekContainer) { - const { date } = this.getState(); + const { date, filterDays } = this.getState(); const scheduler2 = this.scheduler; let currentDate = scheduler2.date.week_start(new Date(date)); const maxDate = scheduler2.date.add(scheduler2.date.week_start(new Date(date)), 1, "week"); daysOfWeekContainer.classList.add("dhx_cal_datepicker_days"); const labelFormat = scheduler2.date.date_to_str("%D"); while (currentDate.valueOf() < maxDate.valueOf()) { - const label = labelFormat(currentDate); - const dayElement = document.createElement("div"); - dayElement.setAttribute("data-day", currentDate.getDay()); - dayElement.classList.add("dhx_cal_datepicker_dayname"); - dayElement.innerText = label; - daysOfWeekContainer.appendChild(dayElement); + if (!(filterDays && filterDays(currentDate))) { + const label = labelFormat(currentDate); + const dayElement = document.createElement("div"); + dayElement.setAttribute("data-day", currentDate.getDay()); + dayElement.classList.add("dhx_cal_datepicker_dayname"); + dayElement.innerText = label; + daysOfWeekContainer.appendChild(dayElement); + } currentDate = scheduler2.date.add(currentDate, 1, "day"); } } @@ -8612,7 +8623,7 @@ class DatePicker { return weeks; } _renderDayGrid(container) { - const { date, currentRange, eventDates, minWeeks } = this.getState(); + const { date, currentRange, eventDates, minWeeks, filterDays } = this.getState(); let minSchedulerDate = currentRange[0]; let maxSchedulerDate = currentRange[1]; const eventDaysTable = eventDates.reduce((acc, date2) => { @@ -8622,7 +8633,11 @@ class DatePicker { }, {}); const daysOfWeekContainer = document.createElement("div"); this._renderDayGridHeader(daysOfWeekContainer); + const weekLength = daysOfWeekContainer.children.length; container.appendChild(daysOfWeekContainer); + if (weekLength !== 7) { + container.style.setProperty("--dhx-scheduler-week-length", weekLength); + } const scheduler2 = this.scheduler; const firstDate = scheduler2.date.week_start(scheduler2.date.month_start(new Date(date))); const monthStart = scheduler2.date.month_start(new Date(date)); @@ -8645,31 +8660,33 @@ class DatePicker { this.callEvent("onDateClick", [date2, event2]); }); while (currDate.valueOf() < lastDate.valueOf()) { - const dayElement = document.createElement("div"); - dayElement.setAttribute("data-cell-date", scheduler2.templates.format_date(currDate)); - dayElement.setAttribute("data-day", currDate.getDay()); - dayElement.innerHTML = currDate.getDate(); - if (currDate.valueOf() < monthStart.valueOf()) { - dayElement.classList.add("dhx_before"); - } else if (currDate.valueOf() >= monthEnd.valueOf()) { - dayElement.classList.add("dhx_after"); - } - if (currDate.getDay() === 0 || currDate.getDay() === 6) { - dayElement.classList.add("dhx_cal_datepicker_weekend"); - } - if (currDate.valueOf() == currentCalDate.valueOf()) { - dayElement.classList.add("dhx_now"); - } - if (minSchedulerDate && maxSchedulerDate) { - if (currDate.valueOf() >= minSchedulerDate.valueOf() && currDate.valueOf() < maxSchedulerDate.valueOf()) { - dayElement.classList.add("dhx_cal_datepicker_current"); + if (!(filterDays && filterDays(currDate))) { + const dayElement = document.createElement("div"); + dayElement.setAttribute("data-cell-date", scheduler2.templates.format_date(currDate)); + dayElement.setAttribute("data-day", currDate.getDay()); + dayElement.innerHTML = currDate.getDate(); + if (currDate.valueOf() < monthStart.valueOf()) { + dayElement.classList.add("dhx_before"); + } else if (currDate.valueOf() >= monthEnd.valueOf()) { + dayElement.classList.add("dhx_after"); + } + if (currDate.getDay() === 0 || currDate.getDay() === 6) { + dayElement.classList.add("dhx_cal_datepicker_weekend"); + } + if (currDate.valueOf() == currentCalDate.valueOf()) { + dayElement.classList.add("dhx_now"); + } + if (minSchedulerDate && maxSchedulerDate) { + if (currDate.valueOf() >= minSchedulerDate.valueOf() && currDate.valueOf() < maxSchedulerDate.valueOf()) { + dayElement.classList.add("dhx_cal_datepicker_current"); + } } + if (eventDaysTable[currDate.valueOf()]) { + dayElement.classList.add("dhx_cal_datepicker_event"); + } + dayElement.classList.add("dhx_cal_datepicker_date"); + dayGridContainer.appendChild(dayElement); } - if (eventDaysTable[currDate.valueOf()]) { - dayElement.classList.add("dhx_cal_datepicker_event"); - } - dayElement.classList.add("dhx_cal_datepicker_date"); - dayGridContainer.appendChild(dayElement); currDate = scheduler2.date.add(currDate, 1, "day"); } container.appendChild(dayGridContainer); @@ -8752,7 +8769,7 @@ class DatePicker { } } function factoryMethod(extensionManager) { - const scheduler2 = { version: "7.1.2" }; + const scheduler2 = { version: "7.1.3" }; scheduler2.$stateProvider = StateService(); scheduler2.getState = scheduler2.$stateProvider.getState; extend$n(scheduler2); @@ -9177,6 +9194,9 @@ function agenda_view(scheduler2) { } else { let html = ""; for (let day in eventsInDays) { + if (scheduler2.ignore_agenda && scheduler2.ignore_agenda(new Date(day * 1))) { + continue; + } html += renderDay(new Date(day * 1), eventsInDays[day]); } scheduler2._els["dhx_cal_data"][0].innerHTML = html; @@ -9196,7 +9216,7 @@ function agenda_view(scheduler2) { return ""; } let html = ` -
+
${scheduler2.templates.agenda_day(day)}
`; @@ -13935,6 +13955,9 @@ function minical(scheduler2) { end_date = scheduler2.date.date_part(obj.end_date); if (+end_date == +start_date || +end_date >= +start_date && (ev.end_date.getHours() !== 0 || ev.end_date.getMinutes() !== 0)) end_date = scheduler2.date.add(end_date, 1, "day"); + } else { + start_date = null; + end_date = null; } var start = start_date || ev.start_date; var end = end_date || ev.end_date; @@ -17682,6 +17705,12 @@ function recurring(scheduler2) { scheduler2.addEvent(nev); scheduler2._not_render = false; } + function toUTCDate(date) { + return new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds())); + } + function setUTCPartsToDate(d) { + return new Date(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate(), d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds()); + } scheduler2._rec_temp = []; scheduler2._rec_markers_pull = {}; scheduler2._rec_markers = {}; @@ -17980,22 +18009,17 @@ function recurring(scheduler2) { if (!seriesExceptions) { seriesExceptions = {}; } - if (!from) { - from = scheduler2._min_date; - } - if (!to) { - to = scheduler2._max_date; - } - const utcStart = new Date(Date.UTC(ev.start_date.getFullYear(), ev.start_date.getMonth(), ev.start_date.getDate(), ev.start_date.getHours(), ev.start_date.getMinutes(), ev.start_date.getSeconds())); + from = toUTCDate(from || new Date(scheduler2._min_date.valueOf() - 1e3)); + to = toUTCDate(to || new Date(scheduler2._max_date.valueOf() - 1e3)); + const utcStart = toUTCDate(ev.start_date); let parsedRRule; if (maxCount) { parsedRRule = rrulestr(`RRULE:${ev.rrule};UNTIL=${toIcalString(ev.end_date)};COUNT=${maxCount}`, { dtstart: utcStart }); } else { parsedRRule = rrulestr(`RRULE:${ev.rrule};UNTIL=${toIcalString(ev.end_date)}`, { dtstart: utcStart }); } - const utcTo = new Date(Date.UTC(to.getFullYear(), to.getMonth(), to.getDate(), to.getHours(), to.getMinutes(), to.getSeconds())); - const repeatedDates = parsedRRule.between(from, utcTo).map((date) => { - const adjustedDate = new Date(date); + const repeatedDates = parsedRRule.between(from, to, true).map((date) => { + const adjustedDate = setUTCPartsToDate(date); adjustedDate.setHours(ev.start_date.getHours()); adjustedDate.setMinutes(ev.start_date.getMinutes()); adjustedDate.setSeconds(ev.start_date.getSeconds()); @@ -20255,7 +20279,7 @@ function year_view(scheduler2) { yearBox.innerHTML = `
${this.templates.year_month(currentDate)}
`; const yearGrid = yearBox.querySelector(".dhx_year_grid"); - const datepicker = scheduler2._createDatePicker(null, { date: currentDate, minWeeks: 6 }); + const datepicker = scheduler2._createDatePicker(null, { date: currentDate, filterDays: scheduler2.ignore_year, minWeeks: 6 }); datepicker._renderDayGrid(yearGrid); datepicker.destructor(); wrapper.appendChild(yearBox); diff --git a/codebase/sources/dhtmlxscheduler.es.js.map b/codebase/sources/dhtmlxscheduler.es.js.map index 4236e6a..0cc66e2 100644 --- a/codebase/sources/dhtmlxscheduler.es.js.map +++ b/codebase/sources/dhtmlxscheduler.es.js.map @@ -1 +1 @@ -{"version":3,"file":"dhtmlxscheduler.es.js","sources":["../../sources/dhtmlx_hook.js","../../sources/global.js","../../sources/plugins/drag_highlight_pos.js","../../sources/plugins/undo_delete.js","../../sources/plugins/limit.js","../../sources/plugins/batch_update.js","../../sources/plugins/index.js","../../sources/core/utils/utils.js","../../sources/core/state.js","../../sources/core/common/assert.js","../../sources/core/common_errors.js","../../sources/core/connector.js","../../sources/core/nav_bar.js","../../sources/core/scheduler_resize_listener.js","../../sources/utils/eventable.js","../../sources/core/scheduler.js","../../sources/core/utils/event.js","../../sources/core/utils/scoped_event.js","../../sources/core/common.js","../../sources/core/wai_aria.js","../../sources/core/utils/dom_helpers.js","../../sources/utils/env.js","../../sources/core/destructor.js","../../sources/core/common/url_serialize.js","../../sources/core/utils/ajax.js","../../sources/core/base.js","../../sources/core/config.js","../../sources/core/event.js","../../sources/core/event_highlight.js","../../sources/core/loaders/xml.js","../../sources/core/loaders/json.js","../../sources/core/loaders/ical.js","../../sources/core/common/get_serializable_events.js","../../sources/core/load.js","../../sources/core/lightbox.js","../../sources/core/touch.js","../../sources/core/dhtmlx/dhtmlx_suite_hooks.js","../../sources/core/skins.js","../../sources/core/jquery.js","../../sources/core/delay_render.js","../../sources/core/dataprocessor/dataprocessor_hooks.js","../../sources/core/dataprocessor/dataprocessor.js","../../sources/core/message.js","../../sources/locale/locale_ar.js","../../sources/locale/locale_be.js","../../sources/locale/locale_ca.js","../../sources/locale/locale_cn.js","../../sources/locale/locale_cs.js","../../sources/locale/locale_da.js","../../sources/locale/locale_de.js","../../sources/locale/locale_el.js","../../sources/locale/locale_en.js","../../sources/locale/locale_es.js","../../sources/locale/locale_fi.js","../../sources/locale/locale_fr.js","../../sources/locale/locale_he.js","../../sources/locale/locale_hu.js","../../sources/locale/locale_id.js","../../sources/locale/locale_it.js","../../sources/locale/locale_jp.js","../../sources/locale/locale_manager.js","../../sources/locale/locale_nb.js","../../sources/locale/locale_nl.js","../../sources/locale/locale_no.js","../../sources/locale/locale_pl.js","../../sources/locale/locale_pt.js","../../sources/locale/locale_ro.js","../../sources/locale/locale_ru.js","../../sources/locale/locale_si.js","../../sources/locale/locale_sk.js","../../sources/locale/locale_sv.js","../../sources/locale/locale_tr.js","../../sources/locale/locale_ua.js","../../sources/locale/index.js","../../sources/core/datepicker.js","../../sources/scheduler_factory_method.js","../../sources/ext/extension_manager.js","../../sources/scheduler_factory.js","../../sources/ext/active_links.js","../../sources/ext/agenda_legacy_view.js","../../sources/ext/agenda.js","../../sources/ext/all_timed.js","../../sources/ext/collision.js","../../sources/ext/container_autoresize.js","../../sources/ext/cookie.js","../../sources/ext/restricted_extensions/not_implemented_extension.js","../../sources/ext/restricted_extensions/daytimeline.js","../../sources/ext/restricted_extensions/drag_between.js","../../sources/ext/editors.js","../../sources/ext/expand.js","../../sources/ext/restricted_extensions/grid_view.js","../../sources/ext/html_templates.js","../../sources/ext/keyboard_navigation/common/keyboard_shortcuts.js","../../sources/ext/keyboard_navigation/common/eventhandler.js","../../sources/ext/keyboard_navigation/common/trap_modal_focus.js","../../sources/ext/keyboard_navigation/marker.js","../../sources/ext/keyboard_navigation/elements/scheduler_node.js","../../sources/ext/keyboard_navigation/elements/nav_node.js","../../sources/ext/keyboard_navigation/elements/header_cell.js","../../sources/ext/keyboard_navigation/elements/event.js","../../sources/ext/keyboard_navigation/elements/time_slot.js","../../sources/ext/keyboard_navigation/elements/minical_button.js","../../sources/ext/keyboard_navigation/elements/minical_cell.js","../../sources/ext/keyboard_navigation/elements/data_area.js","../../sources/ext/keyboard_navigation/modals.js","../../sources/ext/keyboard_navigation/core.js","../../sources/ext/keyboard_navigation/key_nav_legacy.js","../../sources/ext/keyboard_navigation/scheduler_handlers.js","../../sources/ext/keyboard_navigation/minical_handlers.js","../../sources/ext/key_nav.js","../../sources/ext/layer.js","../../sources/ext/limit.js","../../sources/ext/map_view/gMapAdapter.ts","../../sources/ext/map_view/osmMapAdapter.ts","../../sources/ext/map_view/mapboxAdapter.ts","../../sources/ext/map_view/index.ts","../../sources/ext/minical.js","../../sources/ext/monthheight.js","../../sources/ext/restricted_extensions/multisection.js","../../sources/ext/multiselect.js","../../sources/ext/multisource.js","../../sources/ext/mvc.js","../../sources/ext/outerdrag.js","../../sources/ext/pdf.js","../../sources/ext/quick_info.js","../../sources/ext/readonly.js","../../node_modules/rrule/dist/esm/weekday.js","../../node_modules/rrule/dist/esm/helpers.js","../../node_modules/rrule/dist/esm/dateutil.js","../../node_modules/rrule/dist/esm/iterresult.js","../../node_modules/rrule/node_modules/tslib/tslib.es6.mjs","../../node_modules/rrule/dist/esm/callbackiterresult.js","../../node_modules/rrule/dist/esm/nlp/i18n.js","../../node_modules/rrule/dist/esm/nlp/totext.js","../../node_modules/rrule/dist/esm/nlp/parsetext.js","../../node_modules/rrule/dist/esm/types.js","../../node_modules/rrule/dist/esm/nlp/index.js","../../node_modules/rrule/dist/esm/datetime.js","../../node_modules/rrule/dist/esm/parseoptions.js","../../node_modules/rrule/dist/esm/parsestring.js","../../node_modules/rrule/dist/esm/datewithzone.js","../../node_modules/rrule/dist/esm/optionstostring.js","../../node_modules/rrule/dist/esm/cache.js","../../node_modules/rrule/dist/esm/masks.js","../../node_modules/rrule/dist/esm/iterinfo/yearinfo.js","../../node_modules/rrule/dist/esm/iterinfo/monthinfo.js","../../node_modules/rrule/dist/esm/iterinfo/easter.js","../../node_modules/rrule/dist/esm/iterinfo/index.js","../../node_modules/rrule/dist/esm/iter/poslist.js","../../node_modules/rrule/dist/esm/iter/index.js","../../node_modules/rrule/dist/esm/rrule.js","../../node_modules/rrule/dist/esm/iterset.js","../../node_modules/rrule/dist/esm/rrulestr.js","../../node_modules/rrule/dist/esm/rruleset.js","../../sources/ext/recurring.js","../../sources/ext/recurring_legacy.js","../../sources/ext/serialize.js","../../sources/ext/restricted_extensions/timeline.js","../../sources/ext/tooltip/tooltip.ts","../../sources/ext/tooltip/tooltipManager.ts","../../sources/ext/tooltip/index.ts","../../sources/ext/restricted_extensions/treetimeline.js","../../sources/ext/restricted_extensions/units.js","../../sources/ext/url.js","../../sources/ext/restricted_extensions/week_agenda.js","../../sources/ext/wp.js","../../sources/ext/year_view.js","../../sources/ext/export_api/index.js","../../sources/ext/extensions_gpl.js","../../sources/dhtmlxscheduler.gpl.js"],"sourcesContent":["\r\nexport default function(){\r\n/* global dhtmlx */\r\nif (typeof dhtmlx != \"undefined\" && dhtmlx.attaches) {\r\n\tdhtmlx.attaches.attachScheduler = function (day, mode, tabs, scheduler) {\r\n\t\tvar tabs = tabs || '
';\r\n\t\tvar obj = document.createElement(\"DIV\");\r\n\t\tobj.id = \"dhxSchedObj_\" + this._genStr(12);\r\n\t\tobj.innerHTML = '
' + tabs + '
';\r\n\t\tdocument.body.appendChild(obj.firstChild);\r\n\r\n\t\tthis.attachObject(obj.id, false, true);\r\n\r\n\t\tthis.vs[this.av].sched = scheduler;\r\n\t\tthis.vs[this.av].schedId = obj.id;\r\n\t\tscheduler.setSizes = scheduler.updateView;\r\n\t\tscheduler.destructor = function () { };\r\n\t\tscheduler.init(obj.id, day, mode);\r\n\r\n\t\treturn this.vs[this._viewRestore()].sched;\r\n\t};\r\n}\r\n\r\n}","\r\n/* eslint-disable no-restricted-globals */\r\nvar globalScope;\r\nif(typeof window !== \"undefined\"){\r\n\tglobalScope = window;\r\n}else{\r\n\tglobalScope = global;\r\n}\r\n/* eslint-enable no-restricted-globals */\r\n\r\nexport default globalScope;","export default function dragHighlightPos(scheduler){\r\n let dndMarkers = [];\r\n let dragStarted = false;\r\n let eventNode = null;\r\n let event = null;\r\n\r\n function isEnabled() { \r\n return scheduler.config.drag_highlight && scheduler.markTimespan;\r\n }\r\n\r\n function checkViewName(viewName){\r\n const viewObj = scheduler.getView(viewName);\r\n if(viewObj){\r\n return viewObj.layout;\r\n }\r\n return viewName;\r\n }\r\n\r\n function checkSectionPropertyName(viewName){\r\n const viewObj = scheduler.getView(viewName);\r\n if(viewObj.y_property){\r\n return viewObj.y_property;\r\n }\r\n if(viewObj.map_to){\r\n return viewObj.map_to;\r\n }\r\n }\r\n\r\n function setRequiredStylesToMarker(eventNode, layout){\r\n switch (layout) {\r\n case \"month\":\r\n eventNode.style.top = \"\";\r\n eventNode.style.left = \"\";\r\n break;\r\n case \"timeline\":\r\n eventNode.style.left = \"\";\r\n eventNode.style.marginLeft = \"1px\";\r\n break;\r\n default:\r\n eventNode.style.top = \"\";\r\n break;\r\n }\r\n }\r\n \r\n function createMarkerConfig(configSettings){\r\n const { event, layout, viewName, sectionId, eventNode } = configSettings;\r\n setRequiredStylesToMarker(eventNode, layout);\r\n const sections = {};\r\n let markerObject = {\r\n start_date: event.start_date,\r\n end_date: event.end_date,\r\n css: \"dhx_scheduler_dnd_marker\",\r\n html: eventNode\r\n };\r\n if (layout == \"timeline\" || layout == \"month\" ){\r\n // we need to set end date less than 24 hours of the views to avoid receiving multiple marktimespans\r\n markerObject = {...markerObject, end_date: scheduler.date.add(event.start_date, 1, 'minute')};\r\n }\r\n if (sectionId){\r\n sections[viewName] = sectionId;\r\n markerObject.sections = sections;\r\n }\r\n return markerObject;\r\n }\r\n\r\n function createViewMarker(settings){\r\n const { layout } = settings;\r\n let markerConfigs;\r\n switch (layout) {\r\n case \"month\": \r\n markerConfigs = getMonthViewMarkers(settings);\r\n break;\r\n case 'timeline':\r\n case 'units':\r\n markerConfigs = getTimelineAndUnitsViewMarkers(settings);\r\n break;\r\n default: \r\n markerConfigs = getColumnViewMarkers(settings);\r\n break;\r\n }\r\n markerConfigs.forEach((cfg) => {\r\n dndMarkers.push(scheduler.markTimespan(cfg));\r\n });\r\n }\r\n\r\n function getColumnViewMarkers(settings){\r\n const {event, layout, viewName, sectionId} = settings;\r\n let columnViewMarkersArray = [];\r\n let eventNodes = scheduler.$container.querySelectorAll(`[${scheduler.config.event_attribute}='${event.id}']:not(.dhx_cal_select_menu):not(.dhx_drag_marker)`);\r\n if(eventNodes){\r\n for (let i = 0; i < eventNodes.length; i++) {\r\n let eventNodeClone = eventNodes[i].cloneNode(true);\r\n let startDate = new Date(+eventNodeClone.getAttribute(\"data-bar-start\"));\r\n let endDate = new Date(+eventNodeClone.getAttribute(\"data-bar-end\"));\r\n let dates = {start_date: startDate, end_date: endDate};\r\n const configSettings = {\r\n event: dates, \r\n layout, \r\n viewName, \r\n sectionId, \r\n eventNode:eventNodeClone\r\n };\r\n columnViewMarkersArray.push(createMarkerConfig(configSettings));\r\n }\t\r\n }\r\n return columnViewMarkersArray;\r\n }\r\n\r\n function getMonthViewMarkers(settings){\r\n let monthViewMarkersArray = [];\r\n const {event, layout, viewName, sectionId} = settings;\r\n const weekDates = [];\r\n let currDate = new Date(event.start_date);\r\n while(currDate.valueOf() < event.end_date.valueOf()){\r\n let obj = {start_date: currDate};\r\n weekDates.push(obj);\r\n currDate = scheduler.date.week_start(scheduler.date.add(currDate, 1, \"week\"));\r\n }\r\n let cells = scheduler.$container.querySelectorAll(`[${scheduler.config.event_attribute}='${event.id}']`);\r\n for (let i = 0; i < cells.length; i++) {\r\n const configSettings = {\r\n event: weekDates[i], \r\n layout, \r\n viewName, \r\n sectionId, \r\n eventNode: cells[i].cloneNode(true)\r\n };\r\n monthViewMarkersArray.push(createMarkerConfig(configSettings));\r\n }\r\n return monthViewMarkersArray;\r\n }\r\n\r\n function getTimelineAndUnitsViewMarkers(settings){\r\n let unitMarkersArray = [];\r\n const {event, layout, viewName, eventNode} = settings;\r\n let sectionPropertyName = checkSectionPropertyName(viewName);\r\n if (scheduler.config.multisection && sectionPropertyName){\r\n const sections = String(event[sectionPropertyName]).split(scheduler.config.section_delimiter);\r\n const formatedSections = sections.map(element => String(element));\r\n const elems = [];\r\n for (let i = 0; i < formatedSections.length; i++) {\r\n elems[i] = eventNode.cloneNode(true);\r\n const configSettings = {\r\n event, \r\n layout, \r\n viewName, \r\n sectionId: formatedSections[i],\r\n eventNode: elems[i]\r\n };\r\n unitMarkersArray.push(createMarkerConfig(configSettings));\r\n }\r\n }\r\n return unitMarkersArray;\r\n }\r\n \r\n scheduler.attachEvent(\"onBeforeDrag\", function (id, mode, e){\r\n if (isEnabled()) {\r\n dragStarted = true;\r\n event = scheduler.getEvent(id);\r\n eventNode = e.target.closest(`[${scheduler.config.event_attribute}]`);\r\n const viewName = scheduler.getState().mode;\r\n const layout = checkViewName(viewName);\r\n // to avoid incorrect eventNode and marker creation when scheduler.config.cascade_event_display included\r\n if (layout == \"units\" && scheduler.config.cascade_event_display ) {\r\n scheduler.unselect(id);\r\n eventNode = e.target.closest(`[${scheduler.config.event_attribute}]`);\r\n }\r\n }\r\n return true;\r\n });\r\n\r\n scheduler.attachEvent(\"onEventDrag\", function (id, mode, e){\r\n if(dragStarted && isEnabled()){\r\n dragStarted = false;// insert element only once after dnd start\r\n const viewName = scheduler.getState().mode;\r\n const layout = checkViewName(viewName);\r\n const sectionId = scheduler.getActionData(e).section;\r\n if (event) {\r\n const settings = {\r\n event, \r\n layout, \r\n viewName, \r\n sectionId, \r\n eventNode\r\n };\r\n createViewMarker(settings);\r\n }\r\n }\r\n });\r\n\r\n scheduler.attachEvent(\"onDragEnd\", function(id, mode, e){\r\n for (let i = 0; i < dndMarkers.length; i++) {\r\n scheduler.unmarkTimespan(dndMarkers[i]);\r\n }\r\n dndMarkers = [];\r\n eventNode = null;\r\n event = null;\r\n });\r\n}","export default function undoDelete(scheduler) {\r\n\tscheduler.attachEvent(\"onEventDeleted\", function (id, ev) {\r\n\t\tlet deletedEvent = scheduler.copy(ev);\r\n\t\tif (scheduler.config.undo_deleted && !scheduler.getState().new_event) {\r\n\t\t\tscheduler.message({\r\n\t\t\t\ttext: `
\r\n Event deleted\r\n \r\n
`,\r\n\t\t\t\texpire: 10000,\r\n\t\t\t\ttype: \"popup_after_delete\",\r\n\t\t\t\tcallback: function (e) {\r\n\t\t\t\t\tlet undoBtn = e.target.closest(\r\n\t\t\t\t\t\t`[data-deleted-event-id=\"${ev.id}\"]`\r\n\t\t\t\t\t);\r\n\t\t\t\t\tif (undoBtn) {\r\n\t\t\t\t\t\tscheduler.addEvent(deletedEvent);\r\n\t\t\t\t\t\tscheduler.render();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t});\r\n}\r\n","export default function limitPlugin(scheduler){\r\n\r\n\r\n\tscheduler.config.mark_now = true;\r\n\tscheduler.config.display_marked_timespans = true;\r\n\tscheduler.config.overwrite_marked_timespans = true;\r\n\r\n\r\n\tvar dhx_time_block = \"dhx_time_block\";\r\n\tvar default_timespan_type = \"default\";\r\n\tvar fix_options = function(options, days, zones) {\r\n\t\tif (days instanceof Date && zones instanceof Date) {\r\n\t\t\toptions.start_date = days;\r\n\t\t\toptions.end_date = zones;\r\n\t\t} else {\r\n\t\t\toptions.days = days;\r\n\t\t\toptions.zones = zones;\r\n\t\t}\r\n\t\treturn options;\r\n\t};\r\n\tvar get_resulting_options = function(days, zones, sections) {\r\n\t\tvar options = (typeof days == \"object\") ? days : { days: days };\r\n\t\toptions.type = dhx_time_block;\r\n\t\toptions.css = \"\";\r\n\t\tif (zones) {\r\n\t\t\tif (sections)\r\n\t\t\t\toptions.sections = sections;\r\n\t\t\toptions = fix_options(options, days, zones);\r\n\t\t}\r\n\t\treturn options;\r\n\t};\r\n\tscheduler.blockTime = function(days, zones, sections){\r\n\t\tvar options = get_resulting_options(days, zones, sections);\r\n\t\treturn scheduler.addMarkedTimespan(options);\r\n\t};\r\n\tscheduler.unblockTime = function(days, zones, sections) {\r\n\t\tzones = zones || \"fullday\";\r\n\t\tvar options = get_resulting_options(days, zones, sections);\r\n\t\treturn scheduler.deleteMarkedTimespan(options);\r\n\t};\r\n\r\n\tscheduler.checkInMarkedTimespan = function(ev, timespan_type, on_overlap){\r\n\t\ttimespan_type = timespan_type || default_timespan_type;\r\n\r\n\t\tvar res = true;\r\n\t\tvar temp_start_date = new Date(ev.start_date.valueOf());\r\n\t\tvar temp_end_date = scheduler.date.add(temp_start_date, 1, \"day\");\r\n\t\tvar timespans = scheduler._marked_timespans;\r\n\t\tfor (; temp_start_date < ev.end_date; temp_start_date = scheduler.date.date_part(temp_end_date), temp_end_date = scheduler.date.add(temp_start_date, 1, \"day\") ) {\r\n\t\t\tvar day_value = +scheduler.date.date_part( new Date(temp_start_date) ); // the first part of event not necessarily contains only date part\r\n\t\t\tvar day_index = temp_start_date.getDay();\r\n\r\n\t\t\tvar zones = getZones(ev, timespans, day_index, day_value, timespan_type);\r\n\t\t\tif (zones){\r\n\t\t\t\tfor (var i = 0; i < zones.length; i+=2) {\r\n\r\n\t\t\t\t\t// they may change for new event if it passes limit zone\r\n\t\t\t\t\tvar eventStart = scheduler._get_zone_minutes(temp_start_date);\r\n\t\t\t\t\tvar eventEnd = ( ev.end_date>temp_end_date || ev.end_date.getDate() != temp_start_date.getDate() ) ? 1440 : scheduler._get_zone_minutes(ev.end_date);\r\n\r\n\t\t\t\t\tvar markerStart = zones[i];\r\n\t\t\t\t\tvar markerEnd = zones[i+1];\r\n\t\t\t\t\tif (markerStarteventStart) {\r\n\t\t\t\t\t\tif(typeof on_overlap == \"function\"){\r\n\t\t\t\t\t\t\t//handler allows to cancel overlapping\r\n\t\t\t\t\t\t\t//actually needed only to keep default behavior of limits\r\n\t\t\t\t\t\t\tres = on_overlap(ev, eventStart, eventEnd, markerStart, markerEnd);//event object, event start/end minutes in 'zones' format, zone start/end minutes\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tres = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(!res)\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn !res;\r\n\t};\r\n\tscheduler.checkLimitViolation = function(event){\r\n\t\tif(!event)\r\n\t\t\treturn true;\r\n\t\tif (!scheduler.config.check_limits)\r\n\t\t\treturn true;\r\n\t\tvar s = scheduler;\r\n\t\tvar c = s.config;\r\n\t\tvar evs = [];\r\n\t\tif ((event.rec_type && event._end_date) || (event.rrule)) {\r\n\t\t\tconst seriesEnd = event._end_date || event.end_date;\r\n\t\t\t// GS-2482 need to take into account that a part of recurring events might be outside the limits\r\n\t\t\tif ((c.limit_start && c.limit_end)) {\r\n\t\t\t\tvar recEventInLimits = seriesEnd.valueOf() >= c.limit_start.valueOf() && event.start_date.valueOf() <= c.limit_end.valueOf();\r\n\t\t\t\treturn recEventInLimits;\r\n\t\t\t} else return true;\r\n\t\t} else {\r\n\t\t\tevs = [event];\r\n\t\t}\r\n\r\n\t\tvar complete_res = true;\r\n\t\tfor (var p=0; p= c.limit_start.valueOf() && ev.end_date.valueOf() <= c.limit_end.valueOf()) : true;\r\n\t\t\tif (res){\r\n\t\t\t\tres = !scheduler.checkInMarkedTimespan(ev, dhx_time_block, function(event, eventStart, eventEnd, markerStart, markerEnd){\r\n\t\t\t\t\t//try crop event to allow placing\r\n\t\t\t\t\tvar allow = true;\r\n\t\t\t\t\tif (eventStart<=markerEnd && eventStart >= markerStart){\r\n\t\t\t\t\t\tif (markerEnd == 24*60 || eventEnd <= markerEnd){\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(event._timed && s._drag_id && s._drag_mode == \"new-size\"){\r\n\t\t\t\t\t\t\tevent.start_date.setHours(0);\r\n\t\t\t\t\t\t\tevent.start_date.setMinutes(markerEnd);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ((eventEnd >= markerStart && eventEnd <= markerEnd) || (eventStart < markerStart && eventEnd > markerEnd)){\r\n\t\t\t\t\t\tif(event._timed && s._drag_id && s._drag_mode == \"new-size\"){\r\n\t\t\t\t\t\t\tevent.end_date.setHours(0);\r\n\t\t\t\t\t\t\tevent.end_date.setMinutes(markerStart);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn allow;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\tif (!res) {\r\n\t\t\t\tres = (s.checkEvent(\"onLimitViolation\")) ? s.callEvent(\"onLimitViolation\",[ev.id, ev]) : res;\r\n\t\t\t}\r\n\t\t\tcomplete_res = complete_res && res;\r\n\t\t}\r\n\t\tif(!complete_res){\r\n\t\t\ts._drag_id = null;\r\n\t\t\ts._drag_mode = null;\r\n\t\t}\r\n\t\treturn complete_res;\r\n\r\n\r\n\t};\r\n\tscheduler._get_blocked_zones = function(timespans, property, day_index, day_value, timespan_type){\r\n\t\tvar zones =[];\r\n\t\tif (timespans && timespans[property]) {\r\n\t\t\tvar timeline_zones = timespans[property];\r\n\t\t\tvar blocked_timeline_zones = this._get_relevant_blocked_zones(day_index, day_value, timeline_zones, timespan_type);\r\n\t\t\tfor (var i=0; i this._min_date && now.getHours() >= cfg.first_hour && now.getHours() 1) {\r\n\t\t\t\t\tif(view.size && view.options.length){\r\n\t\t\t\t\t\tday_index = ((view.position+ day_index) / view.options.length) * view.size;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstart_index = day_index;\r\n\t\t\t\t\tend_index = day_index + units_l;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tstart_index = 0;\r\n\t\t\t\t\tend_index = start_index + units_l;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar r_divs = [];\r\n\r\n\t\t\t\tfor (var i = start_index; i < end_index; i++) {\r\n\t\t\t\t\tvar t_day = i; // as each unit is actually considered +1 day\r\n\t\t\t\t\toptions.days = t_day;\r\n\t\t\t\t\tvar t_div = scheduler._render_marked_timespan(options, null, t_day)[0];\r\n\t\t\t\t\tr_divs.push(t_div);\r\n\t\t\t\t}\r\n\t\t\t\treturn r_divs;\r\n\t\t\t} else { // day/week views\r\n\t\t\t\toptions.days = day_index;\r\n\t\t\t\treturn scheduler._render_marked_timespan(options, null, day_index);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\toptions.days = +scheduler.date.date_part(now);\r\n\t\t\t\treturn scheduler._render_marked_timespan(options, null, null);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tscheduler._remove_mark_now = function() {\r\n\t\tvar dhx_now_time = 'dhx_now_time';\r\n\t\tvar els = this._els[dhx_now_time];\r\n\t\tfor (var i=0; i config.start_date) || (config.days !== undefined && config.zones)) && !config.type )\r\n\t\t\treturn r_configs; // incorrect config was provided\r\n\r\n\t\tvar min = 0;\r\n\t\tvar max = 24*60;\r\n\t\tif (config.zones == \"fullday\")\r\n\t\t\tconfig.zones = [min, max];\r\n\t\tif (config.zones && config.invert_zones) {\r\n\t\t\tconfig.zones = scheduler.invertZones(config.zones);\r\n\t\t}\r\n\r\n\t\tconfig.id = scheduler.uid();\r\n\t\tconfig.css = config.css||\"\";\r\n\t\tconfig.type = config.type||default_timespan_type;\r\n\r\n\t\tvar sections = config.sections;\r\n\t\tif (sections) {\r\n\t\t\tfor (var view_key in sections) {\r\n\t\t\t\tif (sections.hasOwnProperty(view_key)) {\r\n\t\t\t\t\tvar ids = sections[view_key];\r\n\t\t\t\t\tif (!(ids instanceof Array))\r\n\t\t\t\t\t\tids = [ids];\r\n\t\t\t\t\tfor (var i=0; i t_sd) ? scheduler._get_zone_minutes(start_date) : min;\r\n\t\t\t\t\tvar zone_end = ( end_date > t_ed || end_date.getDate() != t_sd.getDate() ) ? max : scheduler._get_zone_minutes(end_date);\r\n\t\t\t\t\tt_config.zones = [zone_start, zone_end];\r\n\t\t\t\t\tr_configs.push(t_config);\r\n\r\n\t\t\t\t\tt_sd = t_ed;\r\n\t\t\t\t\tt_ed = scheduler.date.add(t_ed, 1, \"day\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (c_config.days instanceof Date)\r\n\t\t\t\t\tc_config.days = (scheduler.date.date_part(c_config.days)).valueOf();\r\n\t\t\t\tc_config.zones = config.zones.slice();\r\n\t\t\t\tr_configs.push(c_config);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn r_configs;\r\n\t};\r\n\tscheduler._get_dates_by_index = function(index, start, end) {\r\n\t\tvar dates = [];\r\n\t\tstart = scheduler.date.date_part(new Date(start||scheduler._min_date));\r\n\t\tend = new Date(end||scheduler._max_date);\r\n\t\tvar start_day = start.getDay();\r\n\t\tvar delta = (index-start_day >= 0) ? (index-start_day) : (7-start.getDay()+index);\r\n\t\tvar t_date = scheduler.date.add(start, delta, \"day\");\r\n\t\tfor (; t_date < end; t_date = scheduler.date.add(t_date, 1, \"week\")) {\r\n\t\t\tdates.push(t_date);\r\n\t\t}\r\n\t\treturn dates;\r\n\t};\r\n\tscheduler._get_css_classes_by_config = function(config) {\r\n\t\tvar css_classes = [];\r\n\t\tif (config.type == dhx_time_block) {\r\n\t\t\tcss_classes.push(dhx_time_block);\r\n\t\t\tif (config.css)\r\n\t\t\t\tcss_classes.push(dhx_time_block+\"_reset\");\r\n\t\t}\r\n\t\tcss_classes.push(\"dhx_marked_timespan\", config.css);\r\n\t\treturn css_classes.join(\" \");\r\n\t};\r\n\tscheduler._get_block_by_config = function(config) {\r\n\t\tvar block = document.createElement(\"div\");\r\n\t\tif (config.html) {\r\n\t\t\tif (typeof config.html == \"string\")\r\n\t\t\t\tblock.innerHTML = config.html;\r\n\t\t\telse\r\n\t\t\t\tblock.appendChild(config.html);\r\n\t\t}\r\n\t\treturn block;\r\n\t};\r\n\tscheduler._render_marked_timespan = function(options, area, day) {\r\n\t\tvar blocks = []; // resulting block which will be rendered and returned\r\n\t\tvar c = scheduler.config;\r\n\t\tvar min_date = this._min_date;\r\n\t\tvar max_date = this._max_date;\r\n\t\tvar day_value = false; // if timespan for specific date should be displayed\r\n\r\n\t\tif (!c.display_marked_timespans)\r\n\t\t\treturn blocks;\r\n\r\n\t\t// in case of markTimespan\r\n\t\tif (!day && day !== 0) {\r\n\t\t\tif (options.days < 7)\r\n\t\t\t\tday = options.days;\r\n\t\t\telse {\r\n\t\t\t\tvar date_to_display = new Date(options.days);\r\n\t\t\t\tday_value = +date_to_display;\r\n\r\n\t\t\t\t// in case of markTimespan date could be not in the viewing range, need to return\r\n\t\t\t\tif ( !(+max_date > +date_to_display && +min_date <= +date_to_display) )\r\n\t\t\t\t\treturn blocks;\r\n\r\n\t\t\t\tday = date_to_display.getDay();\r\n\t\t\t}\r\n\r\n\t\t\t// convert day default index (Sun - 0, Sat - 6) to index of hourscales (depends on week_start and config.start_on_monday)\r\n\t\t\tvar min_day = min_date.getDay();\r\n\t\t\tif (min_day > day) {\r\n\t\t\t\tday = 7 - (min_day-day);\r\n\t\t\t} else {\r\n\t\t\t\tday = day - min_day;\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar zones = options.zones;\r\n\t\tvar css_classes = scheduler._get_css_classes_by_config(options);\r\n\r\n\t\tif (scheduler._table_view && scheduler._mode == \"month\") {\r\n\t\t\tvar areas = [];\r\n\t\t\tvar days = [];\r\n\r\n\r\n\t\t\tif (!area) {\r\n\t\t\t\tdays = (day_value) ? [day_value] : scheduler._get_dates_by_index(day);\r\n\t\t\t\tfor (var i=0; i < days.length; i++) {\r\n\t\t\t\t\tareas.push( this._scales[days[i]] );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tareas.push(area);\r\n\t\t\t\tdays.push(day);\r\n\t\t\t}\r\n\r\n\t\t\tfor (var i=0; i < areas.length; i++) {\r\n\t\t\t\tarea = areas[i];\r\n\t\t\t\tday = days[i];\r\n\r\n\t\t\t\tvar sday = this.locate_holder_day(day, false) % this._cols.length;\r\n\r\n\t\t\t\tif(this._ignores[sday]) continue;\r\n\r\n\t\t\t\tvar block_proto = scheduler._get_block_by_config(options);\r\n\t\t\t\tblock_proto.className = css_classes;\r\n\t\t\t\tblock_proto.style.top = \"0px\";\r\n\t\t\t\tblock_proto.style.height = \"100%\";\r\n\t\t\t\t\r\n\t\t\t\tfor (var k=0; k < zones.length; k+=2) {\r\n\t\t\t\t\tvar start = zones[i];\r\n\t\t\t\t\tvar end = zones[i+1];\r\n\t\t\t\t\tif (end <= start)\r\n\t\t\t\t\t\treturn [];\r\n\r\n\t\t\t\t\tvar block = block_proto.cloneNode(true);\r\n\r\n\t\t\t\t\tblock.style.left = \"0px\";\r\n\t\t\t\t\tblock.style.width = \"100%\";\r\n\r\n\t\t\t\t\tarea.appendChild(block);\r\n\t\t\t\t\tblocks.push(block);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvar index = day;\r\n\r\n\t\t\tif(this._ignores[this.locate_holder_day(day, false)]) return blocks;\r\n\r\n\t\t\tif (this._props && this._props[this._mode] && options.sections && options.sections[this._mode]) {\r\n\t\t\t\tvar view = this._props[this._mode];\r\n\t\t\t\tindex = view.order[options.sections[this._mode]];\r\n\r\n\t\t\t\tvar inner_index = view.order[options.sections[this._mode]];\r\n\t\t\t\tif(!(view.days > 1)){\r\n\t\t\t\t\tindex = inner_index;\r\n\t\t\t\t\tif (view.size && (index > view.position+view.size)) {\r\n\t\t\t\t\t\tindex = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar units_l = view.size || view.options.length;\r\n\t\t\t\t\tindex = index*units_l + inner_index;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tarea = area ? area : scheduler.locate_holder(index);\r\n\r\n\t\t\tfor (var i = 0; i < zones.length; i+=2){\r\n\t\t\t\tvar start = Math.max(zones[i], c.first_hour*60);\r\n\t\t\t\tvar end = Math.min(zones[i+1], c.last_hour*60);\r\n\t\t\t\tif (end <= start) {\r\n\t\t\t\t\tif (i+2 < zones.length)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\treturn [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar block = scheduler._get_block_by_config(options);\r\n\t\t\t\tblock.className = css_classes;\r\n\r\n\t\t\t\t// +1 for working with section which really takes up whole height (as % would be == 0)\r\n\t\t\t\tvar all_hours_height = this.config.hour_size_px*24 + 1;\r\n\t\t\t\tvar hour_ms = 60*60*1000;\r\n\t\t\t\tblock.style.top = (Math.round((start*60*1000-this.config.first_hour*hour_ms)*this.config.hour_size_px/hour_ms) % all_hours_height) + \"px\";\r\n\t\t\t\tblock.style.height = Math.max((Math.round(((end-start)*60*1000)*this.config.hour_size_px/hour_ms)) % all_hours_height, 1)+\"px\";\r\n\r\n\t\t\t\tarea.appendChild(block);\r\n\t\t\t\tblocks.push(block);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn blocks;\r\n\t};\r\n\r\n\tscheduler._mark_timespans = function(){\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\t\tvar divs = [];\r\n\t\tif (scheduler._table_view && scheduler._mode == \"month\"){\r\n\t\t\tfor (var day in this._scales) {\r\n\t\t\t\tvar date = new Date(+day);\r\n\t\t\t\tdivs.push.apply(divs, scheduler._on_scale_add_marker(this._scales[day],date));\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\t//manually trigger rendering of configs for each column\r\n\t\t\tvar date = new Date(scheduler._min_date);\r\n\t\t\tfor (var i = 0, len = data.childNodes.length; i < len; i++) {\r\n\t\t\t\tvar area = data.childNodes[i];\r\n\t\t\t\tif (area.firstChild && scheduler._getClassName(area.firstChild).indexOf(\"dhx_scale_hour\") > -1) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdivs.push.apply(divs, scheduler._on_scale_add_marker(area, date));\r\n\t\t\t\tdate = scheduler.date.add(date, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn divs;\r\n\t};\r\n\r\n\t// just marks timespan, will be cleaned after refresh\r\n\tscheduler.markTimespan = function(configuration) {\r\n\t\tif(!this._els){\r\n\t\t\tthrow new Error(\"`scheduler.markTimespan` can't be used before scheduler initialization. Place `scheduler.markTimespan` call after `scheduler.init`.\");\r\n\t\t}\r\n\r\n\r\n\t\tvar rebuild_els = false;\r\n\t\tif(!this._els[\"dhx_cal_data\"]){\r\n\t\t\tscheduler.get_elements();\r\n\t\t\trebuild_els = true;\r\n\t\t}\r\n\r\n\r\n\t\t// backup regular marked timespans\r\n\t\tvar timespans_ids = scheduler._marked_timespans_ids,\r\n\t\t\ttimespan_types = scheduler._marked_timespans_types,\r\n\t\t\ttimespans = scheduler._marked_timespans;\r\n\r\n\t\tscheduler.deleteMarkedTimespan();\r\n\r\n\t\t//add block to configs\r\n\t\tscheduler.addMarkedTimespan(configuration);\r\n\r\n\t\tvar divs = scheduler._mark_timespans();\r\n\r\n\t\tif(rebuild_els)\r\n\t\t\tscheduler._els = [];\r\n\r\n\t\t// restore timespan config\r\n\t\tscheduler._marked_timespans_ids = timespans_ids;\r\n\t\tscheduler._marked_timespans_types = timespan_types;\r\n\t\tscheduler._marked_timespans = timespans;\r\n\r\n\t\treturn divs;\r\n\t};\r\n\tscheduler.unmarkTimespan = function(divs) {\r\n\t\tif (!divs)\r\n\t\t\treturn;\r\n\t\tfor (var i=0; i c_zone_end && zone_start <= c_zone_end) || (zone_start < c_zone_start && zone_end >= c_zone_start)) {\r\n\t\t\t\t\tresulting_zones[i] = Math.min(c_zone_start, zone_start);\r\n\t\t\t\t\tresulting_zones[i+1] = Math.max(c_zone_end, zone_end);\r\n\t\t\t\t\ti -= 2;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!isLast) // do nothing, maybe next current zone will match or will be last\r\n\t\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\t\tvar offset = (c_zone_start > zone_start)?0:2;\r\n\t\t\t\t\tresulting_zones.splice(i+offset, 0, zone_start, zone_end); // last current zone, need to add another\r\n\t\t\t\t}\r\n\t\t\t\tzones.splice(k--,2); // zone was merged or added, need to exclude it\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn resulting_zones;\r\n\t};\r\n\tscheduler._subtract_timespan_zones = function(current_zones, zones) {\r\n\t\tvar resulting_zones = current_zones.slice();\r\n\t\tfor (var i=0; i c_zone_start && zone_start < c_zone_end) {\r\n\t\t\t\t\tvar is_modified = false;\r\n\t\t\t\t\tif (c_zone_start >= zone_start && c_zone_end <= zone_end) {\r\n\t\t\t\t\t\tresulting_zones.splice(i, 2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (c_zone_start < zone_start) {\r\n\t\t\t\t\t\tresulting_zones.splice(i, 2, c_zone_start, zone_start);\r\n\t\t\t\t\t\tis_modified = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (c_zone_end > zone_end) {\r\n\t\t\t\t\t\tresulting_zones.splice( (is_modified)?(i+2):i, (is_modified)?0:2, zone_end, c_zone_end);\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti -= 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn resulting_zones;\r\n\t};\r\n\tscheduler.invertZones = function(zones) {\r\n\t\treturn scheduler._subtract_timespan_zones([0, 1440], zones.slice());\r\n\t};\r\n\tscheduler._delete_marked_timespan_by_id = function(id) {\r\n\t\tvar configs = scheduler._marked_timespans_ids[id];\r\n\t\tif (configs) {\r\n\t\t\tfor (var i=0; i 1)){\r\n\t\t\t\tday = scheduler.date.date_part(new Date(this._date)); // for units view actually only 1 day is displayed yet the day variable will change, need to use this._date for all calls\r\n\t\t\t}else{\r\n\t\t\t\tvar dx = 24*60*60*1000;\r\n\t\t\t\tvar day_ind = Math.round((day - scheduler._min_date)/dx);\r\n\t\t\t\tvar unitsPerDay = view.size || units.length;\r\n\t\t\t\tday = scheduler.date.add(scheduler._min_date, Math.floor(day_ind/unitsPerDay), \"day\"); // to the \"same\" day for all sections\r\n\t\t\t\tday = scheduler.date.date_part(day);\r\n\t\t\t}\r\n\t\t\tday_index = day.getDay();\r\n\t\t\tday_value = day.valueOf();\r\n\r\n\t\t\tif (timespans[mode] && timespans[mode][unit.key]) {\r\n\t\t\t\tvar unit_zones = timespans[mode][unit.key];\r\n\t\t\t\tvar unit_types = scheduler._get_types_to_render(unit_zones[day_index], unit_zones[day_value]);\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(unit_types));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar global_data = timespans[\"global\"];\r\n\r\n\t\tif(scheduler.config.overwrite_marked_timespans){\r\n\t\t\tvar day_types = global_data[day_value]||global_data[day_index];\r\n\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(day_types));\r\n\t\t} else {\r\n\t\t\tif(global_data[day_value]){\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(global_data[day_value]));\r\n\t\t\t}\r\n\t\t\tif(global_data[day_index]){\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(global_data[day_index]));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (var i=0; i {\r\n\t\t\tif(date){\r\n\t\t\t\tcalls.setModeDate.date = date;\r\n\t\t\t}\r\n\t\t\tif(mode){\r\n\t\t\t\tcalls.setModeDate.mode = mode;\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tvar methods = {\r\n\t\t\trender:(date, mode) => {calls.needRender = true; rememberModeDate(date, mode);},\r\n\t\t\tsetCurrentView:(date, mode) => {calls.needRender = true; rememberModeDate(date, mode);},\r\n\t\t\tupdateView:(date, mode) => {calls.needUpdateView = true; rememberModeDate(date, mode);},\r\n\t\t\trender_data:() => calls.needRender = true,\r\n\t\t\trender_view_data:(evs) => { \r\n\t\t\t\tif(evs && evs.length){\r\n\t\t\t\t\tevs.forEach((e) => calls.repaintEvents[e.id] = true);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcalls.needRender = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tdisableMethods.call(this, methods);\r\n\r\n\t\tisActive = true;\r\n\t\tthis.callEvent(\"onBeforeBatchUpdate\", []);\r\n\r\n\t\tbatchUpdatePayload(callback);\r\n\r\n\t\tthis.callEvent(\"onAfterBatchUpdate\", []);\r\n\r\n\t\trestoreMethods.call(this);\r\n\r\n\t\tisActive = false;\r\n\t\tif(!noRedraw){\r\n\t\t\tif(calls.needRender){\r\n\t\t\t\tscheduler.render(calls.setModeDate.date, calls.setModeDate.mode);\r\n\t\t\t}else if(calls.needUpdateView){\r\n\t\t\t\tscheduler.updateView(calls.setModeDate.date, calls.setModeDate.mode);\r\n\t\t\t}else{\r\n\t\t\t\tfor(const i in calls.repaintEvents){\r\n\t\t\t\t\tscheduler.updateEvent(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (call_dp) {\r\n\t\t\tthis._dp.setUpdateMode(dp_mode);\r\n\t\t\tthis._dp.sendData();\r\n\t\t}\r\n\t};\r\n}\r\n\r\nexport default function(scheduler){\r\n\tscheduler.batchUpdate = createMethod(scheduler);\r\n}","import dragHighlightPos from \"./drag_highlight_pos\";\r\nimport undoDelete from \"./undo_delete\";\r\nimport limit from \"./limit\";\r\nimport batchUpdate from \"./batch_update\";\r\n\r\nexport default function initPlugins(scheduler){\r\n undoDelete(scheduler);\r\n dragHighlightPos(scheduler);\r\n limit(scheduler);\r\n batchUpdate(scheduler);\r\n}","var uidSeed = Date.now();\r\nfunction uid () {\r\n\treturn uidSeed++;\r\n}\r\n\r\n// iframe-safe array type check instead of using instanceof\r\nfunction isArray(obj){\r\n\tif(Array.isArray){\r\n\t\treturn Array.isArray(obj);\r\n\t}else{\r\n\t\t// close enough\r\n\t\treturn (obj && obj.length !== undefined && obj.pop && obj.push);\r\n\t}\r\n}\r\n\r\n// non-primitive string object, e.g. new String(\"abc\")\r\nfunction isStringObject(obj){\r\n\treturn obj && typeof obj === \"object\" && \r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function String() { [native code] }\";\r\n}\r\n\r\n// non-primitive number object, e.g. new Number(5)\r\nfunction isNumberObject(obj){\r\n\treturn obj && typeof obj === \"object\" && \r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function Number() { [native code] }\";\r\n}\r\n\r\n// non-primitive number object, e.g. new Boolean(true)\r\nfunction isBooleanObject(obj){\r\n\treturn obj && typeof obj === \"object\" &&\r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function Boolean() { [native code] }\";\r\n}\r\n\r\nfunction isDate(obj) {\r\n\tif (obj && typeof obj === \"object\") {\r\n\t\treturn !!(obj.getFullYear && obj.getMonth && obj.getDate);\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\nfunction defined(obj) {\r\n\treturn typeof(obj) != \"undefined\";\r\n}\r\n\r\nfunction delay (callback, timeout){\r\n\tvar timer;\r\n\r\n\tvar result = function() {\r\n\t\tresult.$cancelTimeout();\r\n\t\tresult.$pending = true;\r\n\t\tvar args = Array.prototype.slice.call(arguments);\r\n\t\ttimer = setTimeout(function(){\r\n\t\t\tcallback.apply(this, args);\r\n\t\t\tresult.$pending = false;\r\n\t\t}, timeout);\r\n\t};\r\n\r\n\tresult.$pending = false;\r\n\tresult.$cancelTimeout = function(){\r\n\t\tclearTimeout(timer);\r\n\t\tresult.$pending = false;\r\n\t};\r\n\tresult.$execute = function(){\r\n\t\tvar args = Array.prototype.slice.call(arguments);\r\n\t\tcallback.apply(this, args);\r\n\t\tresult.$cancelTimeout();\r\n\t};\r\n\r\n\treturn result;\r\n}\r\n\r\nexport default {\r\n\tuid: uid,\r\n\tmixin: function mixin (target, source, force){\r\n\t\tfor (var f in source)\r\n\t\t\tif (((target[f] === undefined) || force)) target[f]=source[f];\r\n\t\treturn target;\r\n\t},\r\n\tcopy: function copy(object) {\r\n\t\tvar i, result; // iterator, types array, result\r\n\t\r\n\t\tif (object && typeof object == \"object\") {\r\n\t\r\n\t\t\tswitch (true){\r\n\t\t\t\tcase (isDate(object)):\r\n\t\t\t\t\tresult = new Date(object);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isArray(object)):\r\n\t\t\t\t\tresult = new Array(object.length);\r\n\t\t\t\t\tfor(i = 0; i < object.length; i++){\r\n\t\t\t\t\t\tresult[i] = copy(object[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isStringObject(object)):\r\n\t\t\t\t\tresult = new String(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isNumberObject(object)):\r\n\t\t\t\t\tresult = new Number(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isBooleanObject(object)):\r\n\t\t\t\t\tresult = new Boolean(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tresult = {};\r\n\t\t\t\t\tfor (i in object) {\r\n\t\t\t\t\t\tconst varType = typeof object[i];\r\n\r\n\t\t\t\t\t\tif (varType === \"string\" || varType === \"number\" || varType === \"boolean\" ) {\r\n\t\t\t\t\t\t\tresult[i] = object[i];\r\n\t\t\t\t\t\t} else if(isDate(object[i])){\r\n\t\t\t\t\t\t\tresult[i] = new Date(object[i]);\r\n\t\t\t\t\t\t}else if (Object.prototype.hasOwnProperty.apply(object, [i]))\r\n\t\t\t\t\t\t\tresult[i] = copy(object[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result || object;\r\n\t},\r\n\tdefined,\r\n\tisDate,\r\n\tdelay\r\n};\r\n","import utils from \"./utils/utils\";\r\n\r\nconst StateService = (function(){\r\n\tconst stateProviders = {};\r\n\r\n\tfunction getState(name){\r\n\t\tconst provider = stateProviders[name];\r\n\t\tif(provider){\r\n\t\t\treturn stateProviders[name].method();\r\n\t\t}else{\r\n\t\t\tconst res = {};\r\n\t\t\tfor(const i in stateProviders){\r\n\t\t\t\tif(!stateProviders[i].internal)\r\n\t\t\t\t\tutils.mixin(res, stateProviders[i].method(), true);\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\t\t}\r\n\t}\r\n\r\n\tfunction registerProvider(name, provider, internal){\r\n\t\tstateProviders[name] = { method: provider, internal: internal};\r\n\t}\r\n\r\n\tfunction unregisterProvider(name){\r\n\t\tdelete stateProviders[name];\r\n\t}\r\n\r\n\treturn {\r\n\t\tgetState: getState,\r\n\t\tregisterProvider: registerProvider,\r\n\t\tunregisterProvider: unregisterProvider\r\n\t};\r\n});\r\n\r\nexport default StateService;\r\n\r\n","export default function(scheduler){\r\n\treturn function assert(check, message){\r\n\t\tif (!check){\r\n\t\t\tif(scheduler.config.show_errors && scheduler.callEvent(\"onError\",[message]) !== false) {\r\n\t\t\t\tif (scheduler.message) {\r\n\t\t\t\t\tscheduler.message({type: \"error\", text: message, expire: -1});\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// eslint-disable-next-line\r\n\t\t\t\t\tconsole.log(message);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// eslint-disable-next-line no-debugger\r\n\t\t\t\tdebugger;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n}","export default function extend(scheduler) {\r\n\r\nvar commonViews = {\r\n\tagenda: \"https://docs.dhtmlx.com/scheduler/agenda_view.html\",\r\n\tgrid: \"https://docs.dhtmlx.com/scheduler/grid_view.html\",\r\n\tmap: \"https://docs.dhtmlx.com/scheduler/map_view.html\",\r\n\tunit: \"https://docs.dhtmlx.com/scheduler/units_view.html\",\r\n\ttimeline: \"https://docs.dhtmlx.com/scheduler/timeline_view.html\",\r\n\tweek_agenda: \"https://docs.dhtmlx.com/scheduler/weekagenda_view.html\",\r\n\tyear: \"https://docs.dhtmlx.com/scheduler/year_view.html\",\r\n\tanythingElse: \"https://docs.dhtmlx.com/scheduler/views.html\"\r\n};\r\n\r\nvar requiredExtensions = {\r\n\tagenda: \"ext/dhtmlxscheduler_agenda_view.js\",\r\n\tgrid: \"ext/dhtmlxscheduler_grid_view.js\",\r\n\tmap: \"ext/dhtmlxscheduler_map_view.js\",\r\n\tunit: \"ext/dhtmlxscheduler_units.js\",\r\n\ttimeline: \"ext/dhtmlxscheduler_timeline.js, ext/dhtmlxscheduler_treetimeline.js, ext/dhtmlxscheduler_daytimeline.js\",\r\n\tweek_agenda: \"ext/dhtmlxscheduler_week_agenda.js\",\r\n\tyear: \"ext/dhtmlxscheduler_year_view.js\",\r\n\tlimit: \"ext/dhtmlxscheduler_limit.js\"\r\n};\r\n\r\nscheduler._commonErrorMessages = {\r\n\tunknownView: function(view){\r\n\t\tvar relatedDoc = \"Related docs: \" + (commonViews[view] || commonViews.anythingElse); \r\n\t\tvar relatedExtension = requiredExtensions[view] ? (\"You're probably missing \" + requiredExtensions[view] + \".\") : \"\";\r\n\t\treturn (\r\n\t\t\t\"`\"+view+\"` view is not defined. \\n\" +\r\n\t\t\t\"Please check parameters you pass to `scheduler.init` or `scheduler.setCurrentView` in your code and ensure you've imported appropriate extensions. \\n\" + \r\n\t\t\trelatedDoc + \"\\n\" + (relatedExtension ? (relatedExtension + \"\\n\") : \"\"));\r\n\t},\r\n\tcollapsedContainer: function(div){\r\n\t\treturn \"Scheduler container height is set to *100%* but the rendered height is zero and the scheduler is not visible. \\n\"+\r\n\t\t\"Make sure that the container has some initial height or use different units. For example:\\n\" +\r\n\t\t\"
\\n\";\r\n\t}\r\n};\r\n\r\nscheduler.createTimelineView = function() {\r\n\tthrow new Error(\"scheduler.createTimelineView is not implemented. Be sure to add the required extension: \" + requiredExtensions.timeline + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.timeline);\r\n};\r\n\r\nscheduler.createUnitsView = function() {\r\n\tthrow new Error(\"scheduler.createUnitsView is not implemented. Be sure to add the required extension: \" + requiredExtensions.unit + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.unit);\r\n};\r\n\r\nscheduler.createGridView = function() {\r\n\tthrow new Error(\"scheduler.createGridView is not implemented. Be sure to add the required extension: \" + requiredExtensions.grid + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.grid);\r\n};\r\n\r\nscheduler.addMarkedTimespan = function() {\r\n\tthrow new Error(\"scheduler.addMarkedTimespan is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_limit.js\" + \r\n\t\"\\n\" +\r\n\t\"Related docs: https://docs.dhtmlx.com/scheduler/limits.html\");\r\n};\r\n\r\nscheduler.renderCalendar = function() {\r\n\tthrow new Error(\"scheduler.renderCalendar is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_minical.js\" + \r\n\t\"\\n\" +\r\n\t\"https://docs.dhtmlx.com/scheduler/minicalendar.html\");\r\n};\r\n\r\nscheduler.exportToPNG = function() {\r\n\tthrow new Error([\r\n\t\t\"scheduler.exportToPNG is not implemented.\",\r\n\t\t\"This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/png.html\",\r\n\t\t\"Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml\"\r\n\t].join(\"\\n\"));\r\n};\r\n\r\nscheduler.exportToPDF = function() {\r\n\tthrow new Error([\r\n\t\t\"scheduler.exportToPDF is not implemented.\",\r\n\t\t\"This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/pdf.html\",\r\n\t\t\"Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml\"\r\n\t].join(\"\\n\"));\r\n};\r\n\r\n\r\n}","import global from \"../global\";\r\n\r\nexport default function extend(scheduler) {\r\n/*\r\nif (global.dataProcessor && !dataProcessor.prototype.init_original){\r\n\tdataProcessor.prototype.init_original=dataProcessor.prototype.init;\r\n\tdataProcessor.prototype.init=function(obj){\r\n\t\tthis.init_original(obj);\r\n\t\tobj._dataprocessor=this;\r\n\r\n\t\tthis.setTransactionMode(\"POST\",true);\r\n\t\tthis.serverProcessor+=(this.serverProcessor.indexOf(\"?\")!=-1?\"&\":\"?\")+\"editing=true\";\r\n\t};\r\n}*/\r\n\r\nscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\tif(typeof dhtmlxError !== \"undefined\") {\r\n\t\twindow.dhtmlxError.catchError(\"LoadXML\", function(a, b, c){\r\n\t\t\tvar message = c[0].responseText;\r\n\r\n\t\t\tswitch (scheduler.config.ajax_error){\r\n\t\t\t\tcase \"alert\":\r\n\t\t\t\t\tglobal.alert(message);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"console\":\r\n\t\t\t\t\tglobal.console.log(message);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n});\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nfunction div(className){\r\n\tvar element = document.createElement(\"div\");\r\n\tvar classes = (className || \"\").split(\" \");\r\n\tclasses.forEach(function(cssClass){\r\n\t\telement.classList.add(cssClass);\r\n\t});\r\n\treturn element;\r\n}\r\nvar itemTypes = {\r\n\trows_container: function(){\r\n\t\treturn div(\"dhx_cal_navbar_rows_container\");\r\n\t},\r\n\trow: function(){\r\n\t\treturn div(\"dhx_cal_navbar_row\");\r\n\t},\r\n\tview: function (config) {\r\n\t\tvar element = div(\"dhx_cal_tab\");\r\n\t\telement.setAttribute(\"name\", config.view + \"_tab\");\r\n\t\telement.setAttribute(\"data-tab\", config.view);\r\n\t\t// element.setAttribute(\"data-viewname\", config.view); // FIXME: need to remove? not used anywhere\r\n\t\tif(scheduler.config.fix_tab_position){\r\n\t\t\tif(config.$firstTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_first\");\r\n\t\t\t}else if(config.$lastTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_last\");\r\n\t\t\t} else if(config.view !== \"week\") {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_standalone\");\r\n\t\t\t}\r\n\r\n\t\t\tif(config.$segmentedTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn element;\r\n\t},\r\n\tdate: function () {\r\n\t\treturn div(\"dhx_cal_date\");\r\n\t},\r\n\tbutton: function (config) {\r\n\t\treturn div(\"dhx_cal_nav_button dhx_cal_nav_button_custom dhx_cal_tab\");\r\n\t},\r\n\tbuiltInButton: function (config){\r\n\t\treturn div(\"dhx_cal_\" + config.view + \"_button dhx_cal_nav_button\");\r\n\t},\r\n\tspacer: function () {\r\n\t\treturn div(\"dhx_cal_line_spacer\");\r\n\t},\r\n\tminicalendarButton: function(config){\r\n\t\tvar minicalendarDiv = div('dhx_minical_icon');\r\n\t\tif(!config.click && !minicalendarDiv.$_eventAttached){\r\n\t\t\t\r\n\t\t\tscheduler.event(minicalendarDiv, \"click\", function () {\r\n\t\t\t\tif (scheduler.isCalendarVisible()) {\r\n\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tscheduler.renderCalendar({\r\n\t\t\t\t\t\tposition: this,\r\n\t\t\t\t\t\tdate: scheduler.getState().date,\r\n\t\t\t\t\t\tnavigation: true,\r\n\t\t\t\t\t\thandler: function (date, calendar) {\r\n\t\t\t\t\t\t\tscheduler.setCurrentView(date);\r\n\t\t\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn minicalendarDiv;\r\n\t},\r\n\thtml_element: function (config) {\r\n\t\treturn div(\"dhx_cal_nav_content\");\r\n\t}\r\n};\r\n\r\nfunction findRenderer(config) {\r\n\tvar renderer;\r\n\tif (config.view) {\r\n\t\tswitch (config.view){\r\n\t\t\tcase \"today\":\r\n\t\t\tcase \"next\":\r\n\t\t\tcase \"prev\":\r\n\t\t\t\trenderer = itemTypes.builtInButton;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"date\":\r\n\t\t\t\trenderer = itemTypes.date;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"spacer\":\r\n\t\t\t\trenderer = itemTypes.spacer;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"button\":\r\n\t\t\t\trenderer = itemTypes.button;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"minicalendar\":\r\n\t\t\t\trenderer = itemTypes.minicalendarButton;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\trenderer = itemTypes.view;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t} else if(config.rows) {\r\n\t\trenderer = itemTypes.rows_container;\r\n\t} else if(config.cols) {\r\n\t\trenderer = itemTypes.row;\r\n\t}\r\n\treturn renderer;\r\n}\r\n\r\nfunction renderElement(config){\r\n\tvar renderer = findRenderer(config);\r\n\tif(!renderer){\r\n\t\treturn;\r\n\t}\r\n\tvar element = renderer(config);\r\n\tif(config.css){\r\n\t\telement.classList.add(config.css);\r\n\t}\r\n\tif(config.width){\r\n\t\tvar value = config.width;\r\n\t\tif(value === value * 1){\r\n\t\t\tvalue += \"px\";\r\n\t\t}\r\n\t\telement.style.width = value;\r\n\t}\r\n\tif(config.height){\r\n\t\tvar value = config.height;\r\n\t\tif(value === value * 1){\r\n\t\t\tvalue += \"px\";\r\n\t\t}\r\n\t\telement.style.height = value;\r\n\t}\r\n\tif (config.click) {\r\n\t\tscheduler.event(element, \"click\", config.click);\r\n\t}\r\n\tif (config.html) {\r\n\t\telement.innerHTML = config.html;\r\n\t}\r\n\r\n\tif (config.align) {\r\n\t\tvar value = \"\";\r\n\t\tif (config.align == \"right\") {\r\n\t\t\tvalue = \"flex-end\";\r\n\t\t} else if(config.align == \"left\") {\r\n\t\t\tvalue = \"flex-start\";\r\n\t\t}\r\n\t\telement.style.justifyContent = value;\r\n\t}\r\n\treturn element;\r\n}\r\n\r\nfunction prepareConfig(config) {\r\n\tif (typeof config === \"string\") {\r\n\t\tconfig = {\r\n\t\t\tview: config\r\n\t\t};\r\n\t}\r\n\tif (!config.view && !config.rows && !config.cols) {\r\n\t\tconfig.view = \"button\";\r\n\t}\r\n\treturn config;\r\n}\r\n\r\nfunction renderLayout(config) {\r\n\tvar fragment = document.createDocumentFragment();\r\n\tvar items;\r\n\tif(Array.isArray(config)){\r\n\t\titems = config;\r\n\t}else{\r\n\t\titems = [config];\r\n\t}\r\n\r\n\tfor (var i = 0; i < items.length; i++) {\r\n\t\tvar view = prepareConfig(items[i]);\r\n\r\n\t\tif(view.view === \"day\" && items[i + 1]){\r\n\t\t\tvar next = prepareConfig(items[i + 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"month\"){\r\n\t\t\t\tview.$firstTab = true;\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(view.view === \"week\" && items[i - 1]){\r\n\t\t\tvar next = prepareConfig(items[i + 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"month\"){\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(view.view === \"month\" && items[i - 1]){\r\n\t\t\tvar next = prepareConfig(items[i - 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"day\"){\r\n\t\t\t\tview.$lastTab = true;\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar element = renderElement(view);\r\n\r\n\t\tfragment.appendChild(element);\r\n\t\tif(view.cols || view.rows){\r\n\t\t\telement.appendChild(renderLayout(view.cols || view.rows));\r\n\t\t}\r\n\t}\r\n\treturn fragment;\r\n}\r\n\r\nscheduler._init_nav_bar = function (items) {\r\n\tvar navBar = this.$container.querySelector(\".dhx_cal_navline\");\r\n\tif (!navBar){\r\n\t\tnavBar = document.createElement(\"div\");\r\n\t\tnavBar.className = \"dhx_cal_navline dhx_cal_navline_flex\";\r\n\t\tscheduler._update_nav_bar(items, navBar);\r\n\t\treturn navBar;\r\n\t}\r\n\treturn navBar;\r\n};\r\n\r\nvar previousNavbar = null;\r\nvar previousHeight = null;\r\nscheduler._update_nav_bar = function (config, container) {\r\n\r\n\tif(!config){\r\n\t\treturn;\r\n\t}\r\n\tvar heightChanged = false;\r\n\tvar configChanged = false;\r\n\r\n\tvar newHeight = config.height || scheduler.xy.nav_height;\r\n\r\n\tif(previousHeight === null ||\r\n\t\t\t(previousHeight !== newHeight)){\r\n\t\theightChanged = true;\r\n\t}\r\n\tif(!previousNavbar || JSON.stringify(config) !== previousNavbar){\r\n\t\tconfigChanged = true;\r\n\t}\r\n\r\n\tif(heightChanged){\r\n\t\tscheduler.xy.nav_height = newHeight;\r\n\t}\r\n\tif(configChanged){\r\n\t\tcontainer.innerHTML = \"\";\r\n\t\tcontainer.appendChild(renderLayout(config));\r\n\t}\r\n\r\n\tif(heightChanged || configChanged){\r\n\t\tscheduler.unset_actions();\r\n\t\tscheduler._els = [];\r\n\t\tscheduler.get_elements();\r\n\t\tscheduler.set_actions();\r\n\t}\r\n\r\n\tif(newHeight === 0){\r\n\t\tcontainer.style.display = \"none\";\r\n\t}else{\r\n\t\tcontainer.style.display = \"\";\r\n\t}\r\n\r\n\tpreviousHeight = newHeight;\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\tfunction isAttachedNode(container){\r\n\t\tvar root = document.body;\r\n\t\r\n\t\twhile(container && container != root){\r\n\t\t\tcontainer = container.parentNode;\r\n\t\t}\r\n\t\r\n\t\treturn !!(root == container);\r\n\t}\r\n\t\r\n\tfunction getWindowSize(window){\r\n\t\treturn {\r\n\t\t\tw : window.innerWidth || document.documentElement.clientWidth,\r\n\t\t\th : window.innerHeight || document.documentElement.clientHeight\r\n\t\t};\r\n\t}\r\n\tfunction equals(a,b){\r\n\t\treturn a.w == b.w && a.h == b.h;\r\n\t}\r\n\t\r\n\tfunction listenWindowResize(scheduler, window){\r\n\t\tvar oldSize = getWindowSize(window);\r\n\t\tvar resizeDelay;\r\n\t\tscheduler.event(window, \"resize\", function(){\r\n\t\t\tclearTimeout(resizeDelay);\r\n\t\t\tresizeDelay = setTimeout(function(){\r\n\r\n\t\t\t\tif (!isAttachedNode(scheduler.$container) || scheduler.$destroyed){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tvar newSize = getWindowSize(window);\r\n\t\t\t\t// element may be resized by container-autoresize exteinsion\r\n\t\t\t\t// check if the size is actually changed in order to not to get endless loop\r\n\t\t\t\tif (!equals(oldSize, newSize)) {\r\n\t\t\t\t\toldSize = newSize;\r\n\t\t\t\t\ttriggerSchedulerResize(scheduler);\r\n\t\t\t\t}\r\n\t\t\t}, 150);\r\n\t\t});\r\n\t}\r\n\t\r\n\tfunction triggerSchedulerResize(scheduler){\r\n\t\tif(scheduler.$destroyed || !scheduler.$root || !isAttachedNode(scheduler.$root)){\r\n\t\t\treturn;\t\r\n\t\t}\r\n\t\tif (scheduler.callEvent(\"onSchedulerResize\", [])) {\r\n\t\t\tscheduler.updateView();\r\n\t\t\tscheduler.callEvent(\"onAfterSchedulerResize\", []);\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction watchNodeResize(scheduler){\r\n\t\tvar previousHeight = scheduler.$root.offsetHeight;\r\n\t\tvar previousWidth = scheduler.$root.offsetWidth;\r\n\t\t\r\n\t\tfunction lowlevelResizeWatcher(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(scheduler.$root){\r\n\t\t\t\tif (scheduler.$root.offsetHeight != previousHeight ||\r\n\t\t\t\t\tscheduler.$root.offsetWidth != previousWidth){\r\n\t\t\t\t\ttriggerSchedulerResize(scheduler);\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\tpreviousHeight = scheduler.$root.offsetHeight;\r\n\t\t\t\tpreviousWidth = scheduler.$root.offsetWidth;\r\n\t\t\t}\r\n\t\r\n\t\t\tsetTimeout(lowlevelResizeWatcher, 200);\r\n\t\t}\r\n\t\t\r\n\t\tlowlevelResizeWatcher();\r\n\t}\r\n\t\r\n\tfunction addResizeListener(scheduler){\r\n\t\tvar root = scheduler.$container;\r\n\t\tvar containerStyles = window.getComputedStyle(root);\r\n\t\tif(containerStyles.getPropertyValue(\"position\") == \"static\"){\r\n\t\t\troot.style.position = \"relative\";\r\n\t\t}\r\n\t\r\n\t\tvar resizeWatcher = document.createElement('iframe');\r\n\t\tresizeWatcher.className = \"scheduler_container_resize_watcher\";\r\n\t\tresizeWatcher.tabIndex = -1;\r\n\t\tif(scheduler.config.wai_aria_attributes){\r\n\t\t\tresizeWatcher.setAttribute(\"role\", \"none\");\r\n\t\t\tresizeWatcher.setAttribute(\"aria-hidden\", true);\r\n\t\t}\r\n\t\r\n\t\t// in some environments (namely, in SalesForce) iframe.contentWindow is not available\r\n\t\tvar salesforce_environment = !!window[\"Sfdc\"] || !!window[\"$A\"] || window[\"Aura\"];\r\n\t\tif(salesforce_environment){\r\n\t\t\twatchNodeResize(scheduler);\r\n\t\t} else {\r\n\t\t\troot.appendChild(resizeWatcher);\r\n\t\t\tif (resizeWatcher.contentWindow) {\r\n\t\t\t\tlistenWindowResize(scheduler, resizeWatcher.contentWindow);\r\n\t\t\t} else {\r\n\t\t\t\t// if so - ditch the iframe and fallback to listening the main window resize\r\n\t\t\t\troot.removeChild(resizeWatcher);\r\n\t\t\t\tlistenWindowResize(scheduler, window);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\taddResizeListener(scheduler);\r\n\r\n}","class EventHost {\r\n\tconstructor(){\r\n\t\tthis._silent_mode = false;\r\n\t\tthis.listeners = {};\r\n\t}\r\n\t_silentStart(){\r\n\t\tthis._silent_mode = true;\r\n\t}\r\n\t_silentEnd() {\r\n\t\tthis._silent_mode = false;\r\n\t}\r\n}\r\n\r\nconst createEventStorage = function(obj) {\r\n\tlet handlers = {};\r\n\tlet index = 0;\r\n\tconst eventStorage = function(){\r\n\t\tlet combinedResult = true;\r\n\t\tfor(const i in handlers){\r\n\t\t\tconst handlerResult = handlers[i].apply(obj, arguments);\r\n\t\t\tcombinedResult=combinedResult && handlerResult;\r\n\t\t}\r\n\t\treturn combinedResult;\r\n\t};\r\n\teventStorage.addEvent=function(handler, settings){\r\n\t\tif (typeof (handler) == \"function\"){\r\n\t\t\tlet handlerId;\r\n\t\t\tif(settings && settings.id){\r\n\t\t\t\thandlerId = settings.id;\r\n\t\t\t}else{\r\n\t\t\t\thandlerId = index;\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\r\n\t\t\tif(settings && settings.once){\r\n\t\t\t\tconst originalHandler = handler;\r\n\t\t\t\thandler = function(){\r\n\t\t\t\t\toriginalHandler();\r\n\t\t\t\t\teventStorage.removeEvent(handlerId);\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\thandlers[handlerId] = handler;\r\n\t\t\treturn handlerId;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\teventStorage.removeEvent=function(id){\r\n\t\tdelete handlers[id];\r\n\t};\r\n\r\n\teventStorage.clear = function(){\r\n\t\thandlers = {};\r\n\t};\r\n\r\n\treturn eventStorage;\r\n};\r\n\r\nfunction makeEventable(obj){\r\n\r\n\tconst eventHost = new EventHost();\r\n\tobj.attachEvent=function(eventName, handler, settings){\r\n\t\teventName = 'ev_'+eventName.toLowerCase();\r\n\t\tif (!eventHost.listeners[eventName]){\r\n\t\t\teventHost.listeners[eventName] = createEventStorage(this);\r\n\t\t}\r\n\r\n\t\tif(settings && settings.thisObject){\r\n\t\t\thandler = handler.bind(settings.thisObject);\r\n\t\t}\r\n\r\n\t\tconst innerId = eventHost.listeners[eventName].addEvent(handler, settings);\r\n\r\n\t\tlet handlerId = (eventName+':'+innerId); //return ID (ev_eventname:1)\r\n\t\tif(settings && settings.id){\r\n\t\t\thandlerId = settings.id;\r\n\t\t}\r\n\t\treturn handlerId;\r\n\t};\r\n\r\n\tobj.attachAll = function(callback){\r\n\t\tthis.attachEvent('listen_all', callback);\r\n\t};\r\n\r\n\tobj.callEvent=function(name, eventArguments){\r\n\t\tif (eventHost._silent_mode) return true;\r\n\r\n\t\tconst handlerName = 'ev_'+name.toLowerCase();\r\n\r\n\t\tconst listeners = eventHost.listeners;\r\n\t\tif (listeners['ev_listen_all']){\r\n\t\t\tlisteners['ev_listen_all'].apply(this, [name].concat(eventArguments));\r\n\t\t}\r\n\r\n\t\tif (listeners[handlerName])\r\n\t\t\treturn listeners[handlerName].apply(this, eventArguments);\r\n\t\treturn true;\r\n\t};\r\n\r\n\tobj.checkEvent=function(name){\r\n\t\tconst listeners = eventHost.listeners;\r\n\t\treturn (!!listeners['ev_'+name.toLowerCase()]);\r\n\t};\r\n\r\n\tobj.detachEvent=function(id){\r\n\t\tif (id){\r\n\t\t\tlet listeners = eventHost.listeners;\r\n\t\t\tfor(const i in listeners){\r\n\t\t\t\tlisteners[i].removeEvent(id); //remove event\r\n\t\t\t}\r\n\r\n\t\t\tconst list = id.split(':');//get EventName and ID\r\n\t\t\tlisteners = eventHost.listeners;\r\n\t\t\tif(list.length === 2){\r\n\t\t\t\tconst eventName = list[0];\r\n\t\t\t\tconst eventId = list[1];\r\n\t\t\t\tif(listeners[eventName]){\r\n\t\t\t\t\tlisteners[eventName].removeEvent(eventId); //remove event\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tobj.detachAllEvents = function(){\r\n\t\tfor (const name in eventHost.listeners) {\r\n\t\t\teventHost.listeners[name].clear();\r\n\t\t}\r\n\t};\r\n\r\n}\r\n\r\nexport default makeEventable;","\r\nimport nav_bar from \"./nav_bar\";\r\nimport scheduler_resize_listener from \"./scheduler_resize_listener\";\r\nimport eventable from \"../utils/eventable\";\r\n\r\n\r\nexport default function extend(scheduler) {\r\n\r\neventable(scheduler);\r\n\r\nnav_bar(scheduler);\r\n\r\nscheduler._detachDomEvent = function(el, event, handler){\r\n\tif (el.removeEventListener){\r\n\t\tel.removeEventListener(event, handler, false);\r\n\r\n\t}else if (el.detachEvent){\r\n\t\tel.detachEvent(\"on\"+event, handler);\r\n\t}\r\n};\r\n\r\n\r\nscheduler._init_once = function(){\r\n\tscheduler_resize_listener(scheduler);\r\n\r\n\tscheduler._init_once = function(){};\r\n};\r\n\r\nconst layout = {\r\n\t\"navbar\": {\r\n\t\trender: function (config) {\r\n\t\t\treturn scheduler._init_nav_bar(config);\r\n\t\t}\r\n\t},\r\n\t\"header\": {\r\n\t\trender: function (config) {\r\n\t\t\tconst element = document.createElement(\"div\");\r\n\t\t\telement.className = \"dhx_cal_header\";\r\n\t\t\treturn element;\r\n\t\t}\r\n\t},\r\n\t\"dataArea\": {\r\n\t\trender: function (config) {\r\n\t\t\tconst element = document.createElement(\"div\");\r\n\t\t\telement.className = \"dhx_cal_data\";\r\n\t\t\treturn element;\r\n\t\t}\r\n\t},\r\n\t\"html_element\": {\r\n\t\trender: function (config) {\r\n\t\t\treturn config.html;\r\n\t\t}\r\n\t}\r\n};\r\n\r\nfunction hasSchedulerMarkup(element){\r\n\treturn !!(\r\n\t\telement.querySelector(\".dhx_cal_header\") &&\r\n\t\telement.querySelector(\".dhx_cal_data\") &&\r\n\t\telement.querySelector(\".dhx_cal_navline\")\r\n\t\t);\r\n}\r\n\r\nfunction createDefaultHeader(scheduler){\r\n\tconst views = [\r\n\t\t\"day\",\r\n\t\t\"week\",\r\n\t\t\"month\"\r\n\t];\r\n\tconst date = [\r\n\t\t\"date\"\r\n\t];\r\n\tconst nav = [\r\n\t\t\"prev\",\r\n\t\t\"today\",\r\n\t\t\"next\"\r\n\t];\r\n\r\n\tif(scheduler.matrix){\r\n\t\tfor(const i in scheduler.matrix){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\tif(scheduler._props){\r\n\t\tfor(const i in scheduler._props){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\r\n\tif(scheduler._grid && scheduler._grid.names){\r\n\t\tfor(const i in scheduler._grid.names){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\r\n\tconst optionalViews = [\r\n\t\t\"map\",\r\n\t\t\"agenda\",\r\n\t\t\"week_agenda\",\r\n\t\t\"year\"\r\n\t];\r\n\r\n\toptionalViews.forEach(function(viewName){\r\n\t\tif(scheduler[viewName + \"_view\"]){\r\n\t\t\tviews.push(viewName);\r\n\t\t}\r\n\t});\r\n\r\n\treturn views.concat(date).concat(nav);\r\n}\r\n\r\nscheduler.init=function(id,date,mode){\r\n\tif(this.$destroyed){\r\n\t\treturn; // not have errors when try to reinit destroyed scheduler\r\n\t}\r\n\tdate=date||(scheduler._currentDate());\r\n\tmode=mode||\"week\";\r\n\r\n\tif(this._obj){\r\n\t\tthis.unset_actions();\r\n\t}\r\n\r\n\tthis._obj=(typeof id == \"string\")?document.getElementById(id):id;\r\n\tthis.$container = this._obj;\r\n\tthis.$root = this._obj;\r\n\r\n\tif(!this.$container.offsetHeight && this.$container.offsetWidth && this.$container.style.height === \"100%\"){\r\n\t\t// scheduler container has zero height and non-zero width\r\n\t\twindow.console.error(scheduler._commonErrorMessages.collapsedContainer(), this.$container);\r\n\t}\r\n\r\n\tif(this.config.wai_aria_attributes && this.config.wai_aria_application_role){\r\n\t\tthis.$container.setAttribute(\"role\", \"application\");\r\n\t}\r\n\r\n\tif(!this.config.header && !hasSchedulerMarkup(this.$container)){\r\n\t\t// if no header config and no required markup - use the default header\r\n\t\t// so the scheduler could be initialized in an empty div\r\n\t\tthis.config.header = createDefaultHeader(this);\r\n\t\twindow.console.log([// jshint ignore:line\r\n\t\t\t\"Required DOM elements are missing from the scheduler container and **scheduler.config.header** is not specified.\",\r\n\t\t\t\"Using a default header configuration: \",\r\n\t\t\t\"scheduler.config.header = \" + JSON.stringify(this.config.header, null, 2),\r\n\t\t\t\"Check this article for the details: https://docs.dhtmlx.com/scheduler/initialization.html\"\r\n\t\t].join(\"\\n\"));// jshint ignore:line\r\n\t}\r\n\r\n\tif (this.config.header) {\r\n\t\tthis.$container.innerHTML = \"\";\r\n\t\tthis.$container.classList.add(\"dhx_cal_container\");\r\n\t\tif(this.config.header.height){\r\n\t\t\tthis.xy.nav_height = this.config.header.height;\r\n\t\t}\r\n\t\tthis.$container.appendChild(layout.navbar.render(this.config.header));\r\n\t\tthis.$container.appendChild(layout.header.render());\r\n\t\tthis.$container.appendChild(layout.dataArea.render());\r\n\t} else {\r\n\t\t// if no header config provided - make sure scheduler container has all necessary elements\r\n\t\tif(!hasSchedulerMarkup(this.$container)){\r\n\t\t\tthrow new Error([\r\n\t\t\t\t\"Required DOM elements are missing from the scheduler container.\",\r\n\t\t\t\t\"Be sure to either specify them manually in the markup: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviamarkup\",\r\n\t\t\t\t\"Or to use **scheduler.config.header** setting so they could be created automatically: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviaheaderconfig\"\r\n\t\t\t].join(\"\\n\"));\r\n\t\t}\r\n\t}\r\n\r\n\tif (this.config.rtl) this.$container.className += \" dhx_cal_container_rtl\";\r\n\r\n\t//hook for terrace skin\r\n\tif (this._skin_init)\r\n\t\tscheduler._skin_init();\r\n\r\n\tscheduler.date.init();\r\n\r\n\tthis._scroll=true;\r\n\r\n\tthis._els=[];\r\n\tthis.get_elements();\r\n\tthis.init_templates();\r\n\tthis.set_actions();\r\n\r\n\tthis._init_once();\r\n\tthis._init_touch_events();\r\n\r\n\tthis.set_sizes();\r\n\tscheduler.callEvent('onSchedulerReady', []);\r\n\tscheduler.$initialized = true;\r\n\tthis.setCurrentView(date,mode);\r\n\r\n};\r\n\r\nscheduler.xy={\r\n\tmin_event_height:20,\r\n\tbar_height: 24,\r\n\tscale_width:50,\r\n\tscroll_width:18,\r\n\tscale_height:20,\r\n\tmonth_scale_height:20,\r\n\tmenu_width:25,\r\n\tmargin_top:0,\r\n\tmargin_left:0,\r\n\teditor_width:140,\r\n\tmonth_head_height:22,\r\n\tevent_header_height: 14\r\n};\r\nscheduler.keys={\r\n\tedit_save:13,\r\n\tedit_cancel:27\r\n};\r\n\r\nscheduler.bind = function bind(functor, object){\r\n\tif(functor.bind)\r\n\t\treturn functor.bind(object);\r\n\telse\r\n\t\treturn function(){ return functor.apply(object,arguments); };\r\n};\r\n\r\nscheduler.set_sizes=function(){\r\n\r\n\tvar w = this._x = this._obj.clientWidth-this.xy.margin_left;\r\n\r\n\t//not-table mode always has scroll - need to be fixed in future\r\n\tvar scale_x=this._table_view?0:(this.xy.scale_width+this.xy.scroll_width);\r\n\r\n\tvar materialScalePlaceholder = this.$container.querySelector(\".dhx_cal_scale_placeholder\");\r\n\tif(scheduler._is_material_skin()){\r\n\t\tif(!materialScalePlaceholder) {\r\n\t\t\tmaterialScalePlaceholder = document.createElement(\"div\");\r\n\t\t\tmaterialScalePlaceholder.className = \"dhx_cal_scale_placeholder\";\r\n\t\t\tthis.$container.insertBefore(materialScalePlaceholder, this._els[\"dhx_cal_header\"][0]);\r\n\t\t}\r\n\t\tmaterialScalePlaceholder.style.display = \"block\";\r\n\r\n\t\tthis.set_xy(materialScalePlaceholder,w,this.xy.scale_height + 1,0, this._els[\"dhx_cal_header\"][0].offsetTop);\r\n\r\n\t}else{\r\n\t\tif(materialScalePlaceholder){\r\n\t\t\tmaterialScalePlaceholder.parentNode.removeChild(materialScalePlaceholder);\r\n\t\t}\r\n\t}\r\n\r\n\tif (this._lightbox) {\r\n\t\tif (scheduler.$container.offsetWidth < 1200) {\r\n\t\t} else {\r\n\t\t\tthis._setLbPosition(document.querySelector(\".dhx_cal_light\"));\r\n\t\t}\r\n\t}\r\n\r\n\tthis._data_width = w-scale_x;\r\n\r\n\tthis._els[\"dhx_cal_navline\"][0].style.width = w + \"px\";\r\n\tconst header = this._els[\"dhx_cal_header\"][0];\r\n\tthis.set_xy(header, this._data_width, this.xy.scale_height);\r\n\t// this._els[\"dhx_cal_header\"][0].style.marginLeft = `${scheduler.xy.scale_width}px`;\r\n\theader.style.left = ``;\r\n\theader.style.right = ``;\r\n\tif(!this._table_view){\r\n\t\tif(this.config.rtl){\r\n\t\t\theader.style.right = `${this.xy.scale_width}px`;\r\n\t\t}else{\r\n\t\t\theader.style.left = `${this.xy.scale_width}px`;\r\n\t\t}\r\n\t} else {\r\n\t\tif(!this.config.rtl){\r\n\t\t\theader.style.left = `-1px`;\r\n\t\t} else {\r\n\t\t\theader.style.right = `-1px`;\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.set_xy=function(node,w,h,x,y){\r\n\tfunction prepareValue(val){\r\n\t\tlet prepared = val;\r\n\t\tif(!isNaN(Number(prepared))){\r\n\t\t\tprepared = Math.max(0,prepared) + \"px\";\r\n\t\t}\r\n\t\treturn prepared;\r\n\t}\r\n\r\n\tvar direction = 'left';\r\n\r\n\tif(w !== undefined) {\r\n\t\tnode.style.width = prepareValue(w);\r\n\t}\r\n\r\n\tif(h !== undefined){\r\n\t\tnode.style.height = prepareValue(h);\r\n\t}\r\n\r\n\tif (arguments.length>3){\r\n\r\n\t\tif(x !== undefined){\r\n\t\t\tif (this.config.rtl) direction = 'right';\r\n\t\t\tnode.style[direction]=x+\"px\";\r\n\t\t}\r\n\t\tif(y !== undefined){\r\n\t\t\tnode.style.top=y+\"px\";\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.get_elements=function(){\r\n\t//get all child elements as named hash\r\n\tconst els=this._obj.getElementsByTagName(\"DIV\");\r\n\tfor (let i=0; i < els.length; i++){\r\n\t\tlet class_name= scheduler._getClassName(els[i]);\r\n\t\tconst attr_value = els[i].getAttribute(\"data-tab\") || els[i].getAttribute(\"name\") || \"\";\r\n\t\tif (class_name) class_name = class_name.split(\" \")[0];\r\n\t\tif (!this._els[class_name]) this._els[class_name]=[];\r\n\t\tthis._els[class_name].push(els[i]);\r\n\r\n\t\t//check if name need to be changed\r\n\t\t// scheduler.locale.labels[attr_value+\"_tab\"] - to fix getting labels for data-tab\r\n\t\tlet label = scheduler.locale.labels[attr_value+\"_tab\"] || scheduler.locale.labels[attr_value||class_name];\r\n\t\tif (typeof label !== \"string\" && attr_value && !els[i].innerHTML)\r\n\t\t\tlabel = attr_value.split(\"_\")[0];\r\n\t\tif (label) {\r\n\t\t\tthis._waiAria.labelAttr(els[i], label);\r\n\t\t\tels[i].innerHTML = label;\r\n\t\t}\r\n\t}\r\n};\r\n\r\n\r\nconst domEventsScope = scheduler._createDomEventScope();\r\n\r\nscheduler.unset_actions = function(){\r\n\tdomEventsScope.detachAll();\r\n};\r\n\r\nscheduler.set_actions=function(){\r\n\tfor (const a in this._els){\r\n\t\tif (this._click[a]){\r\n\t\t\tfor (let i=0; i < this._els[a].length; i++){\r\n\t\t\t\tconst element = this._els[a][i];\r\n\t\t\t\tconst handler = this._click[a].bind(element);\r\n\t\t\t\tdomEventsScope.attach(element, \"click\", handler);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tdomEventsScope.attach(this._obj, \"selectstart\", function(e){\r\n\t\te.preventDefault();\r\n\t\treturn false;\r\n\t});\r\n\t//this._obj.onselectstart=function(e){ return false; };\r\n\tdomEventsScope.attach(this._obj, \"mousemove\", function(e){\r\n\t\tif (!scheduler._temp_touch_block)\r\n\t\t\tscheduler._on_mouse_move(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"mousedown\", function(e){\r\n\t\tif (!scheduler._ignore_next_click)\r\n\t\t\tscheduler._on_mouse_down(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"mouseup\", function(e){\r\n\t\tif (!scheduler._ignore_next_click)\r\n\t\t\tscheduler._on_mouse_up(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"dblclick\", function(e){\r\n\t\tscheduler._on_dbl_click(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"contextmenu\", function(event) {\r\n\t\tif(scheduler.checkEvent(\"onContextMenu\")){\r\n\t\t\t// block the default browser context menu \r\n\t\t\tevent.preventDefault();\r\n\t\t}\r\n\r\n\t\tconst returnValue = scheduler.callEvent(\"onContextMenu\", [scheduler._locate_event(event.target), event]);\r\n\t\treturn returnValue;\r\n\t});\r\n};\r\nscheduler.select=function(id){\r\n\tif (this._select_id==id) return;\r\n\tscheduler._close_not_saved();\r\n\tthis.editStop(false);\r\n\tif(this._select_id){\r\n\t\tthis.unselect();\r\n\t}\r\n\tthis._select_id = id;\r\n\tthis.updateEvent(id);\r\n\tthis.callEvent(\"onEventSelected\", [id]);\r\n};\r\nscheduler.unselect=function(id){\r\n\tif (id && id!=this._select_id) {\r\n\t\treturn;\r\n\t}\r\n\tconst previousSelection = this._select_id;\r\n\tthis._select_id = null;\r\n\tif (previousSelection && this.getEvent(previousSelection)) {\r\n\t\tthis.updateEvent(previousSelection);\r\n\t}\r\n\tthis.callEvent(\"onEventUnselected\", [previousSelection]);\r\n};\r\nscheduler.$stateProvider.registerProvider(\"global\", (function(){\r\n\treturn {\r\n\t\tmode: this._mode,\r\n\t\tdate: new Date(this._date),\r\n\t\tmin_date: new Date(this._min_date),\r\n\t\tmax_date: new Date(this._max_date),\r\n\t\teditor_id: this._edit_id,\r\n\t\tlightbox_id: this._lightbox_id,\r\n\t\tnew_event: this._new_event,\r\n\t\tselect_id: this._select_id,\r\n\t\texpanded: this.expanded,\r\n\t\tdrag_id: this._drag_id,\r\n\t\tdrag_mode: this._drag_mode\r\n\t};\r\n}).bind(scheduler));\r\n\r\nscheduler._click={\r\n\tdhx_cal_data:function(e){\r\n\t\t//in case of touch disable click processing\r\n\t\tif (scheduler._ignore_next_click){\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\r\n\t\tconst id = scheduler._locate_event(e.target);\r\n\r\n\t\tif (!id) {\r\n\t\t\tscheduler.callEvent(\"onEmptyClick\",[scheduler.getActionData(e).date, e]);\r\n\t\t} else {\r\n\t\t\tif ( !scheduler.callEvent(\"onClick\",[id,e]) || scheduler.config.readonly ) return;\r\n\t\t}\r\n\r\n\t\tif (id && scheduler.config.select) {\r\n\r\n\t\t\tscheduler.select(id);\r\n\t\t\tconst icon = e.target.closest(\".dhx_menu_icon\");\r\n\r\n\t\t\tconst mask = scheduler._getClassName(icon);\r\n\t\t\tif (mask.indexOf(\"_icon\")!=-1)\r\n\t\t\t\tscheduler._click.buttons[mask.split(\" \")[1].replace(\"icon_\",\"\")](id);\r\n\t\t} else{\r\n\t\t\tscheduler._close_not_saved();\r\n\t\t\tif (scheduler.getState().select_id && new Date().valueOf()-(scheduler._new_event||0) > 500){\r\n\t\t\t\tscheduler.unselect();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tdhx_cal_prev_button:function(){\r\n\t\tscheduler._click.dhx_cal_next_button(0,-1);\r\n\t},\r\n\tdhx_cal_next_button:function(dummy,step){\r\n\t\tlet def_step = 1;\r\n\t\tif (scheduler.config.rtl){\r\n\t\t\tstep = -step;\r\n\t\t\tdef_step = -def_step;\r\n\t\t}\r\n\t\tscheduler.setCurrentView(scheduler.date.add( //next line changes scheduler._date , but seems it has not side-effects\r\n\t\t\tscheduler.date[scheduler._mode+\"_start\"](new Date(scheduler._date)),(step||def_step),scheduler._mode));\r\n\t},\r\n\tdhx_cal_today_button:function(){\r\n\t\tif (scheduler.callEvent(\"onBeforeTodayDisplayed\", [])) {\r\n\t\t\tscheduler.setCurrentView(scheduler._currentDate());\r\n\t\t}\r\n\t},\r\n\tdhx_cal_tab:function(){\r\n\t\tconst name = this.getAttribute(\"data-tab\");\r\n\t\tconst deprecated_name = this.getAttribute(\"name\");\r\n\t\tconst mode = name || deprecated_name.substring(0, deprecated_name.search(\"_tab\"));\r\n\t\tscheduler.setCurrentView(scheduler._date,mode);\r\n\t},\r\n\tbuttons:{\r\n\t\t\"delete\":function(id){\r\n\t\t\tconst c = scheduler.locale.labels.confirm_deleting;\r\n\t\t\tscheduler._dhtmlx_confirm({message: c, title: scheduler.locale.labels.title_confirm_deleting, callback:function(){ scheduler.deleteEvent(id); },\r\n\t\t\tconfig: {ok: scheduler.locale.labels.icon_delete}\r\n\t\t});\r\n\t\t},\r\n\t\tedit:function(id){ scheduler.edit(id); },\r\n\t\tsave:function(id){ scheduler.editStop(true); },\r\n\t\tdetails:function(id){ scheduler.showLightbox(id); },\r\n\t\tform:function(id){ scheduler.showLightbox(id); },\r\n\t\tcancel:function(id){ scheduler.editStop(false); }\r\n\t}\r\n};\r\nscheduler._dhtmlx_confirm = function({message, title, callback, config}) {\r\n\tif (!message)\r\n\t\treturn callback();\r\n\r\n\tconfig = config || {};\r\n\tconst opts = { ...config, text: message };\r\n\tif (title) {\r\n\t\topts.title = title;\r\n\t}\r\n\tif (callback) {\r\n\t\topts.callback = function(result) {\r\n\t\t\tif (result) {\r\n\t\t\t\tcallback();\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\tscheduler.confirm(opts);\r\n};\r\nscheduler.addEventNow=function(start,end,e){\r\n\tlet base = {};\r\n\tif (scheduler._isObject(start) && !scheduler._isDate(start)){\r\n\t\tbase = start;\r\n\t\tstart = null;\r\n\t}\r\n\r\n\tconst duration = (this.config.event_duration||this.config.time_step)*60000;\r\n\tif (!start) start = base.start_date||Math.round((scheduler._currentDate()).valueOf()/duration)*duration;\r\n\tlet start_date = new Date(start);\r\n\tif (!end){\r\n\t\tlet start_hour = this.config.first_hour;\r\n\t\tif (start_hour > start_date.getHours()){\r\n\t\t\tstart_date.setHours(start_hour);\r\n\t\t\tstart = start_date.valueOf();\r\n\t\t}\r\n\t\tend = start.valueOf()+duration;\r\n\t}\r\n\tlet end_date = new Date(end);\r\n\r\n\t// scheduler.addEventNow(new Date(), new Date()) + collision though get_visible events defect (such event was not retrieved)\r\n\tif(start_date.valueOf() == end_date.valueOf())\r\n\t\tend_date.setTime(end_date.valueOf()+duration);\r\n\tbase.start_date = base.start_date||start_date;\r\n\tbase.end_date = base.end_date||end_date;\r\n\tbase.text = base.text||this.locale.labels.new_event;\r\n\tbase.id = this._drag_id = base.id || this.uid();\r\n\tthis._drag_mode=\"new-size\";\r\n\tthis._loading=true;\r\n\tconst eventId = this.addEvent(base);\r\n\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\tthis._loading=false;\r\n\r\n\tthis._drag_event={}; //dummy , to trigger correct event updating logic\r\n\tthis._on_mouse_up(e);\r\n\treturn eventId;\r\n};\r\nscheduler._on_dbl_click=function(e,src){\r\n\tsrc = src || e.target;\r\n\tif (this.config.readonly) return;\r\n\tconst name = scheduler._getClassName(src).split(\" \")[0];\r\n\tswitch(name){\r\n\t\tcase \"dhx_scale_holder\":\r\n\t\tcase \"dhx_scale_holder_now\":\r\n\t\tcase \"dhx_month_body\":\r\n\t\tcase \"dhx_wa_day_data\":\r\n\t\t\tif (!scheduler.config.dblclick_create) break;\r\n\t\t\tthis.addEventNow(this.getActionData(e).date,null,e);\r\n\t\t\tbreak;\r\n\t\tcase \"dhx_cal_event\":\r\n\t\tcase \"dhx_wa_ev_body\":\r\n\t\tcase \"dhx_agenda_line\":\r\n\t\tcase \"dhx_cal_agenda_event_line\":\r\n\t\tcase \"dhx_grid_event\":\r\n\t\tcase \"dhx_cal_event_line\":\r\n\t\tcase \"dhx_cal_event_clear\": {\r\n\t\t\tconst id = this._locate_event(src);\r\n\t\t\tif (!this.callEvent(\"onDblClick\",[id,e])) return;\r\n\t\t\tif (this.config.details_on_dblclick || this._table_view || !this.getEvent(id)._timed || !this.config.select)\r\n\t\t\t\tthis.showLightbox(id);\r\n\t\t\telse\r\n\t\t\t\tthis.edit(id);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcase \"dhx_time_block\":\r\n\t\tcase \"dhx_cal_container\":\r\n\t\t\treturn;\r\n\t\tdefault: {\r\n\t\t\tconst viewHandler = this[\"dblclick_\"+name];\r\n\t\t\tif (viewHandler) {\r\n\t\t\t\tviewHandler.call(this,e);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif (src.parentNode && src != this)\r\n\t\t\t\t\treturn scheduler._on_dbl_click(e,src.parentNode);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n};\r\n//column index by mouse x-coordinate\r\nscheduler._get_column_index = function(x_pos){\r\n\tlet column = 0;\r\n\tif (this._cols){\r\n\t\tlet width = 0;\r\n\t\tlet i = 0;\r\n\t\twhile (width + this._cols[i] < x_pos && i < this._cols.length){\r\n\t\t\twidth += this._cols[i];\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tcolumn = i + (this._cols[i] ? ((x_pos - width)/ this._cols[i]) : 0);\r\n\r\n\t\tif (this._ignores){\r\n\t\t\tif(column >= this._cols.length){\r\n\t\t\t\twhile(column >= 1 && this._ignores[Math.floor(column)]){\r\n\t\t\t\t\tcolumn--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n\treturn column;\r\n};\r\n\r\n//transform mouse coordinates to day-time indexes of week based view\r\nscheduler._week_indexes_from_pos = function(pos){\r\n\t//\"get position\" can be invoked before columns are loaded into the units view(e.g. by onMouseMove handler in key_nav.js)\r\n\tif(!this._cols){\r\n\t\treturn pos;\r\n\t}else{\r\n\t\tconst column = this._get_column_index(pos.x);\r\n\r\n\t\tpos.x=Math.min(this._cols.length-1, Math.max(0,Math.ceil(column)-1));\r\n\t\tpos.y=Math.max(0,Math.ceil(pos.y*60/(this.config.time_step*this.config.hour_size_px))-1)+this.config.first_hour*(60/this.config.time_step);\r\n\t\treturn pos;\r\n\t}\r\n};\r\n\r\nscheduler._mouse_coords=function(ev){\r\n\tlet pos;\r\n\tconst body = document.body;\r\n\tconst documentElement = document.documentElement;\r\n\tif (!this.$env.isIE && (ev.pageX || ev.pageY))\r\n\t\tpos={x:ev.pageX, y:ev.pageY};\r\n\telse pos={\r\n\t\tx:ev.clientX + (body.scrollLeft||documentElement.scrollLeft||0) - body.clientLeft,\r\n\t\ty:ev.clientY + (body.scrollTop||documentElement.scrollTop||0) - body.clientTop\r\n\t};\r\n\t//apply layout\r\n\tif (this.config.rtl && this._colsS) {\r\n\t\tpos.x = this.$container.querySelector(\".dhx_cal_data\").offsetWidth - pos.x;\r\n\t\tpos.x += this.$domHelpers.getAbsoluteLeft(this._obj);\r\n\t\tif (this._mode !== \"month\") {\r\n\t\t\tpos.x -= this.xy.scale_width;\r\n\t\t}\r\n\t} else {\r\n\t\tpos.x-=this.$domHelpers.getAbsoluteLeft(this._obj)+(this._table_view?0:this.xy.scale_width);\r\n\t}\r\n\r\n\tconst dataArea = this.$container.querySelector(\".dhx_cal_data\");\r\n\t//pos.y-=this.$domHelpers.getAbsoluteTop(this._obj)+this.xy.nav_height+(this._dy_shift||0)+this.xy.scale_height-this._els[\"dhx_cal_data\"][0].scrollTop;\r\n\tpos.y-=this.$domHelpers.getAbsoluteTop(dataArea)-this._els[\"dhx_cal_data\"][0].scrollTop;\r\n\tpos.ev = ev;\r\n\tconst handler = this[\"mouse_\"+this._mode];\r\n\tif (handler){\r\n\t\tpos = handler.call(this,pos);\r\n\t}else{\r\n\t\t//transform to date\r\n\t\tif (!this._table_view) {\r\n\t\t\tpos = this._week_indexes_from_pos(pos);\r\n\t\t} else {\r\n\t\t\tconst column = this._get_column_index(pos.x);\r\n\t\t\tif (!this._cols || !this._colsS) // agenda/map views\r\n\t\t\t\treturn pos;\r\n\t\t\tlet dy=0;\r\n\t\t\tfor (dy=1; dy < this._colsS.heights.length; dy++)\r\n\t\t\t\tif (this._colsS.heights[dy]>pos.y) break;\r\n\r\n\t\t\tpos.y=Math.ceil( (Math.max(0, column)+Math.max(0,dy-1)*7)*24*60/this.config.time_step );\r\n\r\n\t\t\tif (scheduler._drag_mode || this._mode == \"month\")\r\n\t\t\t\tpos.y=(Math.max(0,Math.ceil(column)-1)+Math.max(0,dy-1)*7)*24*60/this.config.time_step;\r\n\r\n\t\t\t//we care about ignored days only during event moving in month view\r\n\t\t\tif (this._drag_mode == \"move\"){\r\n\t\t\t\tif (scheduler._ignores_detected && scheduler.config.preserve_length){\r\n\t\t\t\t\tpos._ignores = true;\r\n\t\t\t\t\t//get real lengtn of event\r\n\t\t\t\t\tif (!this._drag_event._event_length)\r\n\t\t\t\t\t\tthis._drag_event._event_length = this._get_real_event_length(this._drag_event.start_date, this._drag_event.end_date, { x_step:1, x_unit:\"day\"});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tpos.x=0;\r\n\t\t}\r\n\t}\r\n\tpos.timestamp = +new Date();\r\n\treturn pos;\r\n};\r\nscheduler._close_not_saved=function(){\r\n\tif (new Date().valueOf()-(scheduler._new_event||0) > 500 && scheduler._edit_id){\r\n\t\tconst confirmationText=scheduler.locale.labels.confirm_closing;\r\n\r\n\t\tscheduler._dhtmlx_confirm({\r\n\t\t\tmessage: confirmationText, \r\n\t\t\ttitle: scheduler.locale.labels.title_confirm_closing, \r\n\t\t\tcallback: function() { \r\n\t\t\t\tscheduler.editStop(scheduler.config.positive_closing);\r\n\t\t\t}\r\n\t\t});\r\n\t\tif(confirmationText){\r\n\t\t\tthis._drag_id = this._drag_pos = this._drag_mode = null;\r\n\t\t}\r\n\t}\r\n};\r\nscheduler._correct_shift=function(start, back){\r\n\treturn start-=((new Date(scheduler._min_date)).getTimezoneOffset()-(new Date(start)).getTimezoneOffset())*60000*(back?-1:1);\r\n};\r\n\r\nscheduler._is_pos_changed = function(old_pos, new_pos){\r\n\tfunction diff(old_val, new_val, acc){\r\n\t\treturn !!(Math.abs(old_val - new_val) > acc);\r\n\t}\r\n\r\n\tif(!(old_pos && this._drag_pos)){\r\n\t\treturn true;\r\n\t}\r\n\tconst delay = 100;\r\n\tconst d_pos = 5;\r\n\r\n\t// start drag only if passed some time since mouse down, or if mouse position changed sufficiently\r\n\treturn !!(this._drag_pos.has_moved || !this._drag_pos.timestamp || (new_pos.timestamp - this._drag_pos.timestamp > delay) || diff(old_pos.ev.clientX, new_pos.ev.clientX, d_pos) || diff(old_pos.ev.clientY, new_pos.ev.clientY, d_pos));\r\n};\r\n\r\nscheduler._correct_drag_start_date = function(start){\r\n\tlet obj;\r\n\tif (scheduler.matrix)\r\n\t\tobj = scheduler.matrix[scheduler._mode];\r\n\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\tstart = new Date(start);\r\n\tlet len = 1;\r\n\tif(obj._start_correction || obj._end_correction)\r\n\t\tlen = (obj.last_hour||0)*60 - (start.getHours()*60+start.getMinutes()) || 1;\r\n\r\n\treturn start*1 + (scheduler._get_fictional_event_length(start, len, obj) - len);\r\n};\r\nscheduler._correct_drag_end_date = function(start, duration){\r\n\tlet obj;\r\n\tif (scheduler.matrix) {\r\n\t\tobj = scheduler.matrix[scheduler._mode];\r\n\t}\r\n\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\tconst end = start*1 + scheduler._get_fictional_event_length(start, duration, obj);\r\n\treturn new Date(end*1 - (scheduler._get_fictional_event_length(end, -1, obj, -1) + 1));\r\n};\r\n\r\nscheduler._on_mouse_move=function(e){\r\n\tif (this._drag_mode){\r\n\t\tvar pos=this._mouse_coords(e);\r\n\t\tif (this._is_pos_changed(this._drag_pos, pos)){\r\n\t\t\tvar start, end;\r\n\t\t\tif (this._edit_id!=this._drag_id)\r\n\t\t\t\tthis._close_not_saved();\r\n\r\n\t\t\tif(!this._drag_mode)\r\n\t\t\t\treturn;\r\n\r\n\t\t\tvar mousedownPos = null;\r\n\t\t\tif(this._drag_pos && !this._drag_pos.has_moved){\r\n\t\t\t\tmousedownPos = this._drag_pos;\r\n\t\t\t\tmousedownPos.has_moved = true;\r\n\t\t\t}\r\n\r\n\t\t\tthis._drag_pos = pos;\r\n\r\n\t\t\tthis._drag_pos.has_moved = true;\r\n\r\n\t\t\tif (this._drag_mode==\"create\"){\r\n\r\n\t\t\t\t// use mouse down position as a starting point for drag-create\r\n\t\t\t\tif(mousedownPos){\r\n\t\t\t\t\tpos = mousedownPos;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._close_not_saved();\r\n\t\t\t\tthis.unselect(this._select_id);\r\n\t\t\t\tthis._loading=true; //will be ignored by dataprocessor\r\n\r\n\t\t\t\tstart = this._get_date_from_pos(pos).valueOf();\r\n\r\n\t\t\t\tif (!this._drag_start) {\r\n\t\t\t\t\tvar res = this.callEvent(\"onBeforeEventCreated\", [e, this._drag_id]);\r\n\t\t\t\t\tif (!res){\r\n\t\t\t\t\t\tthis._loading=false;\r\n\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis._loading=false;\r\n\t\t\t\t\tthis._drag_start=start;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tend = start;\r\n\t\t\t\tif (end == this._drag_start) {\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar start_date = new Date(this._drag_start);\r\n\t\t\t\tvar end_date = new Date(end);\r\n\t\t\t\tif ( (this._mode == \"day\" || this._mode == \"week\") &&\r\n\t\t\t\t\t(start_date.getHours() == end_date.getHours() &&\r\n\t\t\t\t\tstart_date.getMinutes() == end_date.getMinutes()) ) {\r\n\t\t\t\t\t\tend_date = new Date(this._drag_start+1000);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\tthis._drag_id=this.uid();\r\n\t\t\t\tthis.addEvent(start_date, end_date, this.locale.labels.new_event, this._drag_id, pos.fields);\r\n\r\n\t\t\t\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\t\t\t\tthis._loading=false;\r\n\t\t\t\tthis._drag_mode=\"new-size\";\r\n\r\n\t\t\t}\r\n\r\n\t\t\tvar timeStep = this.config.time_step;\r\n\t\t\tvar ev=this.getEvent(this._drag_id);\r\n\t\t\tvar obj;\r\n\t\t\tif (scheduler.matrix)\r\n\t\t\t\tobj = scheduler.matrix[scheduler._mode];\r\n\t\t\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\t\t\tif (this._drag_mode==\"move\"){\r\n\t\t\t\tstart = this._min_date.valueOf()+(pos.y*this.config.time_step+pos.x*24*60)*60000;\r\n\t\t\t\tif (!pos.custom && this._table_view) {\r\n\t\t\t\t\tstart += this.date.time_part(ev.start_date) * 1000;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!this._table_view && this._dragEventBody && this._drag_event._move_event_shift === undefined) {\r\n\t\t\t\t\tthis._drag_event._move_event_shift = start - ev.start_date;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (this._drag_event._move_event_shift) {\r\n\t\t\t\t\tstart -= this._drag_event._move_event_shift;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstart = this._correct_shift(start);\r\n\r\n\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view && obj){\r\n\r\n\t\t\t\t\tstart = scheduler._correct_drag_start_date(start);\r\n\t\t\t\t\tend = scheduler._correct_drag_end_date(start,this._drag_event._event_length);\r\n\r\n\t\t\t\t} else\r\n\t\t\t\t\tend = ev.end_date.valueOf()-(ev.start_date.valueOf()-start);\r\n\t\t\t} else { // resize\r\n\t\t\t\tstart = ev.start_date.valueOf();\r\n\t\t\t\tend = ev.end_date.valueOf();\r\n\t\t\t\tif (this._table_view) {\r\n\t\t\t\t\tvar resize_date = this._min_date.valueOf()+pos.y*this.config.time_step*60000 + (pos.custom?0:24*60*60000);\r\n\t\t\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\t\t\tresize_date = this._correct_shift(resize_date, false);\r\n\t\t\t\t\t\tif( this._drag_from_start ) {\r\n\t\t\t\t\t\t\tvar day = 24*60*60000;\r\n\t\t\t\t\t\t\tif( resize_date <= scheduler.date.date_part(new Date(end+day-1)).valueOf() ) // to get end time as 23:59:59 and then the day start\r\n\t\t\t\t\t\t\t\tstart = resize_date - day;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tend = resize_date;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif(this.config.preserve_length) {\r\n\t\t\t\t\t\t\tif (pos.resize_from_start) {\r\n\t\t\t\t\t\t\t\tstart = scheduler._correct_drag_start_date(resize_date);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tend = scheduler._correct_drag_end_date(resize_date, 0);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tif (pos.resize_from_start) {\r\n\t\t\t\t\t\t\t\tstart = resize_date;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tend = resize_date;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar end_day_start = this.date.date_part(new Date(ev.end_date.valueOf() - 1)).valueOf();\r\n\t\t\t\t\tvar end_day_date = new Date(end_day_start);\r\n\t\t\t\t\tvar firstHour = this.config.first_hour;\r\n\t\t\t\t\tvar lastHour = this.config.last_hour;\r\n\t\t\t\t\tvar maxY = (lastHour - firstHour) * (60/timeStep);\r\n\r\n\t\t\t\t\tthis.config.time_step = 1;\r\n\t\t\t\t\tvar precisePos = this._mouse_coords(e);\r\n\t\t\t\t\tthis.config.time_step = timeStep;\r\n\r\n\t\t\t\t\tvar minDate = pos.y*timeStep*60000;\r\n\t\t\t\t\tvar maxDate = Math.min(pos.y + 1, maxY)*timeStep*60000;\r\n\t\t\t\t\tvar preciseDate = precisePos.y*60000;\r\n\r\n\t\t\t\t\t// rounding end date to the closest time step\r\n\t\t\t\t\tif(Math.abs(minDate - preciseDate) > Math.abs(maxDate - preciseDate)){\r\n\t\t\t\t\t\tend = end_day_start + maxDate;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tend = end_day_start + minDate;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = end + ((new Date(end)).getTimezoneOffset() - end_day_date.getTimezoneOffset()) * 60000;\r\n\t\t\t\t\tthis._els[\"dhx_cal_data\"][0].style.cursor=\"s-resize\";\r\n\t\t\t\t\tif (this._mode == \"week\" || this._mode == \"day\")\r\n\t\t\t\t\t\tend = this._correct_shift(end);\r\n\t\t\t\t}\r\n\t\t\t\tif (this._drag_mode == \"new-size\") {\r\n\t\t\t\t\tif (end <= this._drag_start){\r\n\t\t\t\t\t\tvar shift = pos.shift||((this._table_view && !pos.custom)?24*60*60000:0);\r\n\t\t\t\t\t\tstart = end-(pos.shift?0:shift);\r\n\t\t\t\t\t\tend = this._drag_start+(shift||(timeStep*60000));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tstart = this._drag_start;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (end<=start)\r\n\t\t\t\t\t\tend=start+timeStep*60000;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar new_end = new Date(end-1);\r\n\t\t\tvar new_start = new Date(start);\r\n\t\t\t//deny drag out of visible scheduler scale in timeline view\r\n\t\t\tif(this._drag_mode==\"move\" && scheduler.config.limit_drag_out &&\r\n\t\t\t\t(+new_start < +scheduler._min_date || +end > +scheduler._max_date)){\r\n\r\n\t\t\t\tif(+ev.start_date < +scheduler._min_date || +ev.end_date > +scheduler._max_date){\r\n\t\t\t\t\t// not move event if it's already outside time scale\r\n\t\t\t\t\tnew_start = new Date(ev.start_date);\r\n\t\t\t\t\tend = new Date(ev.end_date);\r\n\t\t\t\t}else{\r\n\r\n\t\t\t\t\tvar duration = end - new_start;\r\n\r\n\t\t\t\t\tif(+new_start < +scheduler._min_date){\r\n\t\t\t\t\t\tnew_start = new Date(scheduler._min_date);\r\n\t\t\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view){\r\n\t\t\t\t\t\t\tnew_start = new Date(scheduler._correct_drag_start_date(new_start));\r\n\t\t\t\t\t\t\tif(obj._start_correction)\r\n\t\t\t\t\t\t\t\tnew_start = new Date(new_start.valueOf() + obj._start_correction);\r\n\t\t\t\t\t\t\tend = new Date(new_start*1 + this._get_fictional_event_length(new_start, this._drag_event._event_length, obj));\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tend = new Date(+new_start + duration);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tend = new Date(scheduler._max_date);\r\n\r\n\t\t\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view){\r\n\t\t\t\t\t\t\tif(obj._end_correction)\r\n\t\t\t\t\t\t\t\tend = new Date(end.valueOf() - obj._end_correction);\r\n\t\t\t\t\t\t\tend = new Date(end*1 - this._get_fictional_event_length(end, 0, obj, true));\r\n\t\t\t\t\t\t\tnew_start = new Date(end*1 - this._get_fictional_event_length(end, this._drag_event._event_length, obj, true));\r\n\t\t\t\t\t\t\tif(this._ignores_detected){\r\n\t\t\t\t\t\t\t\tnew_start = scheduler.date.add(new_start, obj.x_step, obj.x_unit);\r\n\t\t\t\t\t\t\t\tend = new Date(end*1 - this._get_fictional_event_length(end, 0, obj, true));\r\n\t\t\t\t\t\t\t\tend = scheduler.date.add(end, obj.x_step, obj.x_unit);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tnew_start = new Date(+end - duration);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\tvar new_end = new Date(end-1);\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\t// fix event dates when resized to bottom of the column (day/week views)\r\n\t\t\tif(!this._table_view && this._dragEventBody &&\r\n\t\t\t\t!scheduler.config.all_timed &&\r\n\t\t\t\t((!scheduler._get_section_view() && pos.x != this._get_event_sday({start_date: new Date(start), end_date:new Date(start)})) || new Date(start).getHours() < this.config.first_hour)){\r\n\t\t\t\tvar duration = end - new_start;\r\n\t\t\t\tif (this._drag_mode == \"move\") {\r\n\t\t\t\t\tvar day = this._min_date.valueOf() + (pos.x * 24 * 60) * 60000;\r\n\t\t\t\t\tnew_start = new Date(day);\r\n\t\t\t\t\tnew_start.setHours(this.config.first_hour);\r\n\t\t\t\t\tend = new Date(new_start.valueOf() + duration);\r\n\t\t\t\t\tnew_end = new Date(end-1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// fix event dates when resized to bottom of the column (day/week views)\r\n\t\t\tif(!this._table_view &&\r\n\t\t\t\t!scheduler.config.all_timed &&\r\n\t\t\t\t((!scheduler.getView() && pos.x != this._get_event_sday({start_date: new Date(end), end_date:new Date(end)})) || new Date(end).getHours() >= this.config.last_hour)){\r\n\t\t\t\tvar duration = end - new_start;\r\n\t\t\t\tvar day = this._min_date.valueOf()+(pos.x*24*60)*60000;\r\n\t\t\t\tend = scheduler.date.date_part(new Date(day));\r\n\t\t\t\tend.setHours(this.config.last_hour);\r\n\t\t\t\tnew_end = new Date(end-1);\r\n\t\t\t\tif(this._drag_mode == \"move\"){\r\n\t\t\t\t\tnew_start = new Date(+end - duration);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//prevent out-of-borders situation for day|week view\r\n\t\t\tif ( this._table_view || (new_end.getDate()==new_start.getDate() && new_end.getHours()=ed)\r\n\t\t\t\tcls += ' dhx_after';\r\n\t\t\telse if (sd.valueOf()==cd.valueOf())\r\n\t\t\t\tcls += ' dhx_now';\r\n\r\n\t\t\tif (this._ignores_detected && this._ignores[j]){\r\n\t\t\t\tcls += \" dhx_scale_ignore\";\r\n\t\t\t}\r\n\r\n\t\t\tcell.className = cls + \" \" + this.templates.month_date_class(sd, cd);\r\n\r\n\t\t\tcell.setAttribute(\"data-cell-date\", scheduler.templates.format_date(sd));\r\n\t\t\tvar body_class = \"dhx_month_body\";\r\n\t\t\tvar head_class = \"dhx_month_head\";\r\n\t\t\tif (j === 0 && this.config.left_border) {\r\n\t\t\t\tbody_class += \" dhx_month_body_border\";\r\n\t\t\t\thead_class += \" dhx_month_head_border\";\r\n\t\t\t}\r\n\t\t\tif (!this._ignores_detected || !this._ignores[j]){\r\n\t\t\t\tcell.style.width = tdwidths[j];\r\n\t\t\t\tthis._waiAria.monthCellAttr(cell, sd);\r\n\r\n\t\t\t\tvar cellHead = document.createElement(\"div\");\r\n\t\t\t\tcellHead.style.height = scheduler.xy.month_head_height + \"px\";\r\n\t\t\t\tcellHead.className = head_class;\r\n\t\t\t\tcellHead.innerHTML = this.templates.month_day(sd);\r\n\t\t\t\tcell.appendChild(cellHead);\r\n\r\n\t\t\t\tvar cellBody = document.createElement(\"div\");\r\n\t\t\t\tcellBody.className = body_class;\r\n\t\t\t\t// cellBody.style.height = row_height + \"px\";\r\n\t\t\t\t// cellBody.style.width = tdwidths[j];\r\n\t\t\t\tcell.appendChild(cellBody);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tcell.appendChild(document.createElement(\"div\"));\r\n\t\t\t\tcell.appendChild(document.createElement(\"div\"));\r\n\t\t\t}\r\n\t\t\trendered_dates.push(sd);\r\n\t\t\tvar bf1 = sd.getDate();\r\n\t\t\tsd=this.date.add(sd,1,\"day\");\r\n\t\t\tif (sd.getDate() - bf1 > 1)\r\n\t\t\t\tsd = new Date(sd.getFullYear(), sd.getMonth(), bf1 + 1, 12, 0);\r\n\t\t}\r\n\r\n\t\tscheduler._colsS.heights[i] = cellheight;\r\n\t\tcellheight += getCellHeight(i);\r\n\t}\r\n\r\n\tthis._min_date = view_start;\r\n\tthis._max_date = sd;\r\n\r\n\tdiv.innerHTML = \"\";\r\n\tdiv.appendChild(table);\r\n\r\n\tthis._scales = {};\r\n\tvar cells = div.querySelectorAll('[data-cell-date]');\r\n\tcells.forEach((cell) => {\r\n\t\tconst date = scheduler.templates.parse_date(cell.getAttribute(\"data-cell-date\"));\r\n\t\tconst body = cell.querySelector(\".dhx_month_body\");\r\n\t\tthis._scales[+date] = body;\r\n\t\tthis.callEvent(\"onScaleAdd\", [this._scales[+date], date]);\r\n\t});\r\n\r\n\treturn this._max_date;\r\n};\r\n\r\nscheduler._reset_month_scale=function(b,dd,sd,rows){\r\n\t//recalculates rows height and redraws month layout\r\n\tvar ed=scheduler.date.add(dd,1,\"month\");\r\n\r\n\t//trim time part for comparison reasons\r\n\tvar cd = scheduler._currentDate();\r\n\tthis.date.date_part(cd);\r\n\tthis.date.date_part(sd);\r\n\r\n\trows = rows || Math.ceil(Math.round((ed.valueOf()-sd.valueOf()) / (60*60*24*1000) ) / 7);\r\n\r\n\tvar height = (Math.floor(b.clientHeight/rows) - this.xy.month_head_height);\r\n\r\n\tthis._colsS.height = height + this.xy.month_head_height;\r\n\tthis._colsS.heights = [];\r\n\r\n\treturn scheduler._render_month_scale(b, dd, sd, rows);\r\n\r\n};\r\n\r\nscheduler.getView = function (viewName) {\r\n\tif (!viewName) {\r\n\t\tviewName = scheduler.getState().mode;\r\n\t}\r\n\tif (scheduler.matrix && scheduler.matrix[viewName]) {\r\n\t\treturn scheduler.matrix[viewName];\r\n\t}\r\n\r\n\tif (scheduler._props && scheduler._props[viewName]) {\r\n\t\treturn scheduler._props[viewName];\r\n\t}\r\n\r\n\treturn null;\r\n};\r\n\r\nscheduler.getLabel = function(property, key) {\r\n\tvar sections = this.config.lightbox.sections;\r\n\tfor (var i=0; i scheduler.getState().max_date.valueOf()){\r\n\t\t\tendColumnIndex += getDaysDifference(endDate, scheduler.getState().max_date);\r\n\t\t}\r\n\t} else{\r\n\t\tendColumnIndex = Math.round(eventLength/60/60/1000/24);\r\n\t}\r\n\r\n\tvar last_column = true;\r\n\twhile (startColumnIndex < endColumnIndex){\r\n\t\tvar check = scheduler.date.add(endDate, -config.x_step, config.x_unit);\r\n\t\tif (ignore && ignore(endDate) && (!last_column || (last_column && ignore(check) ))){\r\n\t\t\teventLength -= (endDate-check);\r\n\r\n\t\t}else{\r\n\t\t\tlet excludedDuration = 0;\r\n\t\t\tconst intervalStart = new Date(Math.max(check.valueOf(), startDate.valueOf()));\r\n\t\t\tconst intervalEnd = endDate;\r\n\t\t\tconst leftCellCutOffStart = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.first_hour);\r\n\t\t\tconst leftCellCutOffEnd = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.last_hour||24);\r\n\t\t\tconst rightCellCutOffStart = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.first_hour);\r\n\t\t\tconst rightCellCutOffEnd = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.last_hour||24);\r\n\r\n\t\t\tif(intervalEnd.valueOf() > rightCellCutOffEnd.valueOf()){\r\n\t\t\t\texcludedDuration += intervalEnd - rightCellCutOffEnd;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalEnd.valueOf() > rightCellCutOffStart.valueOf()){\r\n\t\t\t\texcludedDuration += config._start_correction;\r\n\t\t\t} else {\r\n\t\t\t\texcludedDuration += intervalEnd.getHours()*60*60*1000 + intervalEnd.getMinutes()*60*1000;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalStart.valueOf() < leftCellCutOffEnd.valueOf()){\r\n\t\t\t\texcludedDuration += config._end_correction;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalStart.valueOf() < leftCellCutOffStart.valueOf()){\r\n\t\t\t\texcludedDuration += (leftCellCutOffStart.valueOf() - intervalStart.valueOf());\r\n\t\t\t}\r\n\t\t\t\r\n\r\n\t\t\teventLength -= excludedDuration;\r\n\t\t\tlast_column = false;\r\n\t\t}\r\n\t\tendDate = check;\r\n\t\tendColumnIndex--;\r\n\t}\r\n\treturn eventLength;\r\n};\r\nscheduler._get_fictional_event_length=function(end_date, ev_length, obj, back){\r\n\tvar sd = new Date(end_date);\r\n\tvar dir = back ? -1 : 1;\r\n\r\n\t//get difference caused by first|last hour\r\n\tif (obj._start_correction || obj._end_correction){\r\n\t\tvar today;\r\n\t\tif (back)\r\n\t\t\ttoday = (sd.getHours()*60+sd.getMinutes()) - (obj.first_hour||0)*60;\r\n\t\telse\r\n\t\t\ttoday = (obj.last_hour||0)*60 - (sd.getHours()*60+sd.getMinutes());\r\n\t\tvar per_day = (obj.last_hour - obj.first_hour)*60;\r\n\t\tvar days = Math.ceil( (ev_length / (60*1000) - today ) / per_day);\r\n\t\tif(days < 0) days = 0;\r\n\t\tev_length += days * (24*60 - per_day) * 60 * 1000;\r\n\t}\r\n\r\n\tvar fd = new Date(end_date*1+ev_length*dir);\r\n\tvar ignore = this[\"ignore_\"+this._mode];\r\n\r\n\tvar start_slot = 0,\r\n\t\tend_slot;\r\n\tif (obj.render){\r\n\t\tstart_slot = this._get_date_index(obj, sd);\r\n\t\tend_slot = this._get_date_index(obj, fd);\r\n\t} else{\r\n\t\tend_slot = Math.round(ev_length/60/60/1000/24);\r\n\t}\r\n\r\n\twhile (start_slot*dir <= end_slot*dir){\r\n\t\tvar check = scheduler.date.add(sd, obj.x_step*dir, obj.x_unit);\r\n\t\tif (ignore && ignore(sd)){\r\n\t\t\tev_length += (check-sd)*dir;\r\n\t\t\tend_slot += dir;\r\n\t\t}\r\n\r\n\t\tsd = check;\r\n\t\tstart_slot+=dir;\r\n\t}\r\n\r\n\treturn ev_length;\r\n};\r\n\r\nscheduler._get_section_view = function(){\r\n\treturn this.getView();\r\n};\r\n\r\nscheduler._get_section_property = function(){\r\n\tif(this.matrix && this.matrix[this._mode]){\r\n\t\treturn this.matrix[this._mode].y_property;\r\n\t}else if(this._props && this._props[this._mode]){\r\n\t\treturn this._props[this._mode].map_to;\r\n\t}\r\n\treturn null;\r\n};\r\n\r\nscheduler._is_initialized = function(){\r\n\tvar state = this.getState();\r\n\treturn (this._obj && state.date && state.mode);\r\n};\r\nscheduler._is_lightbox_open = function(){\r\n\tvar state = this.getState();\r\n\treturn state.lightbox_id !== null && state.lightbox_id !== undefined;\r\n};\r\n\r\n}","export default {\r\n\tevent: function (el, event, handler){\r\n\t\tif (el.addEventListener)\r\n\t\t\tel.addEventListener(event, handler, false);\r\n\t\r\n\t\telse if (el.attachEvent)\r\n\t\t\tel.attachEvent(\"on\"+event, handler);\r\n\t},\r\n\teventRemove: function (el, event, handler){\r\n\t\tif (el.removeEventListener)\r\n\t\t\tel.removeEventListener(event, handler, false);\r\n\t\r\n\t\telse if (el.detachEvent)\r\n\t\t\tel.detachEvent(\"on\"+event, handler);\r\n\t}\r\n};","import defaultDomEvents from './event';\r\n\r\nexport default function(){\r\n\r\n\tvar domEvents = function (addEvent, removeEvent) {\r\n\t\taddEvent = addEvent || defaultDomEvents.event;\r\n\t\tremoveEvent = removeEvent || defaultDomEvents.eventRemove;\r\n\t\tvar handlers = [];\r\n\t\tvar eventScope = {\r\n\t\t\tattach: function(el, event, callback, capture){\r\n\t\t\t\thandlers.push({element: el, event:event, callback: callback, capture: capture});\r\n\t\t\t\taddEvent(el, event, callback, capture);\r\n\t\t\t},\r\n\t\t\tdetach: function(el, event, callback, capture){\r\n\t\t\t\tremoveEvent(el, event, callback, capture);\r\n\t\t\t\tfor(var i = 0; i < handlers.length; i++){\r\n\t\t\t\t\tvar handler = handlers[i];\r\n\t\t\t\t\tif (handler.element === el && handler.event === event && handler.callback === callback && handler.capture === capture) {\r\n\t\t\t\t\t\thandlers.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tdetachAll: function () {\r\n\t\t\t\tvar staticArray = handlers.slice();\r\n\t\t\t\t// original handlers array can be spliced on every iteration\r\n\t\t\t\tfor (var i = 0; i < staticArray.length; i++){\r\n\t\t\t\t\tvar handler = staticArray[i];\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, handler.capture);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, undefined);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, false);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, true);\r\n\t\t\t\t}\r\n\t\t\t\thandlers.splice(0, handlers.length);\r\n\t\t\t},\r\n\t\t\textend: function(){\r\n\t\t\t\treturn domEvents(this.event, this.eventRemove);\r\n\t\t\t}\r\n\t\t};\r\n\t\treturn eventScope;\r\n\t};\r\n\t\r\n\treturn domEvents();\r\n}","import createEventScope from './utils/scoped_event';\r\n\r\nexport default function extend(scheduler) {\r\n\r\n\r\nvar domEvents = createEventScope();\r\n\r\nscheduler.event = domEvents.attach;\r\nscheduler.eventRemove = domEvents.detach;\r\nscheduler._eventRemoveAll = domEvents.detachAll;\r\nscheduler._createDomEventScope = domEvents.extend;\r\n\r\n\r\nscheduler._trim = function(str){\r\n\tvar func = String.prototype.trim || function(){ return this.replace(/^\\s+|\\s+$/g, \"\"); };\r\n\treturn func.apply(str);\r\n};\r\n\r\nscheduler._isDate = function(obj){\r\n\tif (obj && typeof obj == \"object\") {\r\n\t\treturn !!(obj.getFullYear && obj.getMonth && obj.getDate);\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n};\r\n\r\nscheduler._isObject = function(obj){\r\n\treturn (obj && typeof obj == \"object\");\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n(function(){\r\n\r\n\t// eslint-disable-next-line no-control-regex\r\n\tvar htmlTags = new RegExp(\"<(?:.|\\n)*?>\", \"gm\");\r\n\tvar extraSpaces = new RegExp(\" +\", \"gm\");\r\n\r\n\tfunction stripHTMLLite(htmlText){\r\n\t\treturn (htmlText + \"\")\r\n\t\t\t.replace(htmlTags, \" \").\r\n\t\t\treplace(extraSpaces, \" \");\r\n\t}\r\n\r\n\tvar singleQuotes = new RegExp(\"'\", \"gm\");\r\n\tfunction escapeQuotes(text){\r\n\t\treturn (text + \"\").replace(singleQuotes, \"'\");\r\n\t}\r\n\r\n\tscheduler._waiAria = {\r\n\t\tgetAttributeString: function(attr){\r\n\t\t\tvar attributes = [\" \"];\r\n\t\t\tfor(var i in attr){\r\n\t\t\t\tif(typeof attr[i] != \"function\" && typeof attr[i] != \"object\") {\r\n\t\t\t\t\tvar text = escapeQuotes(stripHTMLLite(attr[i]));\r\n\t\t\t\t\tattributes.push(i + \"='\" + text + \"'\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tattributes.push(\" \");\r\n\t\t\treturn attributes.join(\" \");\r\n\t\t},\r\n\t\tsetAttributes: function(div, values){\r\n\t\t\tfor(var i in values){\r\n\t\t\t\tdiv.setAttribute(i, stripHTMLLite(values[i]));\r\n\t\t\t}\r\n\t\t\treturn div;\r\n\t\t},\r\n\r\n\t\tlabelAttr: function(div, content){\r\n\t\t\treturn this.setAttributes(div, {\"aria-label\": content});\r\n\t\t},\r\n\t\tlabel: function(label){\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": label});\r\n\t\t},\r\n\r\n\t\t// day/week/units\r\n\r\n\t\thourScaleAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\r\n\t\t},\r\n\t\tmonthCellAttr: function(div, date){\r\n\t\t\tthis.labelAttr(div, scheduler.templates.day_date(date));\r\n\t\t},\r\n\r\n\t\tnavBarDateAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\t\t},\r\n\t\tdayHeaderAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\t\t},\r\n\r\n\t\tdayColumnAttr: function(div, date){\r\n\t\t\tthis.dayHeaderAttr(div, scheduler.templates.day_date(date));\r\n\t\t},\r\n\r\n\t\theaderButtonsAttributes: function(div, label){\r\n\t\t\treturn this.setAttributes(div, {\"role\":\"button\", \"aria-label\":label});\r\n\t\t},\r\n\r\n\t\theaderToggleState: function(div, isActive){\r\n\t\t\treturn this.setAttributes(div, {\"aria-pressed\": isActive ? \"true\" : \"false\"});\r\n\t\t},\r\n\r\n\r\n\t\tgetHeaderCellAttr:function(dateString){\r\n\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": dateString});\r\n\t\t},\r\n\r\n\r\n\t\teventAttr: function(event, div){\r\n\t\t\tthis._eventCommonAttr(event, div);\r\n\t\t},\r\n\r\n\r\n\t\t_eventCommonAttr: function(event, div){\r\n\t\t\tdiv.setAttribute(\"aria-label\", stripHTMLLite(scheduler.templates.event_text(event.start_date, event.end_date, event)));\r\n\r\n\t\t\tif(scheduler.config.readonly){\r\n\t\t\t\tdiv.setAttribute(\"aria-readonly\", true);\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif(event.$dataprocessor_class){\r\n\t\t\t\tdiv.setAttribute(\"aria-busy\", true);\r\n\t\t\t}\r\n\r\n\r\n\t\t\tdiv.setAttribute(\"aria-selected\",\r\n\t\t\t\t(scheduler.getState().select_id == event.id) ? \"true\" : \"false\");\r\n\t\t},\r\n\r\n\t\tsetEventBarAttr: function(event, div){\r\n\t\t\tthis._eventCommonAttr(event, div);\r\n\t\t},\r\n\r\n\t\t_getAttributes: function(attributeSetter, arg){\r\n\t\t\tvar result = {\r\n\t\t\t\tsetAttribute:function(name, value){\r\n\t\t\t\t\tthis[name] = value;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\tattributeSetter.apply(this, [arg, result]);\r\n\t\t\treturn result;\r\n\r\n\t\t},\r\n\r\n\t\teventBarAttrString: function(event){\r\n\t\t\treturn this.getAttributeString(this._getAttributes(this.setEventBarAttr, event));\r\n\t\t},\r\n\r\n\r\n\r\n\t\tagendaHeadAttrString :function(){\r\n\t\t\treturn this.getAttributeString({role: \"row\"});\r\n\t\t},\r\n\t\tagendaHeadDateString :function(label){\r\n\t\t\treturn this.getAttributeString({role: \"columnheader\", \"aria-label\": label});\r\n\t\t},\r\n\t\tagendaHeadDescriptionString :function(label){\r\n\t\t\treturn this.agendaHeadDateString(label);\r\n\t\t},\r\n\t\tagendaDataAttrString: function(){\r\n\t\t\treturn this.getAttributeString({role: \"grid\"});\r\n\t\t},\r\n\t\tagendaEventAttrString: function(event){\r\n\t\t\tvar attrs = this._getAttributes(this._eventCommonAttr, event);\r\n\r\n\t\t\tattrs[\"role\"] = \"row\";\r\n\r\n\t\t\treturn this.getAttributeString(attrs);\r\n\r\n\t\t},\r\n\t\tagendaDetailsBtnString: function(){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels.icon_details});\r\n\t\t},\r\n\r\n\r\n\t\tgridAttrString: function(){\r\n\t\t\treturn this.getAttributeString({role: \"grid\"});\r\n\t\t},\r\n\r\n\t\tgridRowAttrString: function(event){\r\n\t\t\treturn this.agendaEventAttrString(event);\r\n\t\t},\r\n\r\n\t\tgridCellAttrString: function(event, column, value){\r\n\t\t\treturn this.getAttributeString({\"role\":\"gridcell\", \"aria-label\": [\r\n\t\t\t\t(column.label === undefined ? column.id : column.label),\r\n\t\t\t\t\": \",\r\n\t\t\t\tvalue\r\n\t\t\t]});\r\n\t\t},\r\n\r\n\t\tmapAttrString: function(){\r\n\t\t\treturn this.gridAttrString();\r\n\t\t},\r\n\t\tmapRowAttrString: function(event){\r\n\t\t\treturn this.gridRowAttrString(event);\r\n\t\t},\r\n\t\tmapDetailsBtnString: function(){\r\n\t\t\treturn this.agendaDetailsBtnString();\r\n\t\t},\r\n\r\n\t\tminicalHeader: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"id\":headerId+\"\",\r\n\t\t\t\t\"aria-live\":\"assertice\",\r\n\t\t\t\t\"aria-atomic\":\"true\"\r\n\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalGrid: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"aria-labelledby\":headerId+\"\",\r\n\t\t\t\t\"role\":\"grid\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalRow: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"row\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalDayCell: function(div, date){\r\n\t\t\tvar selected = (date.valueOf() < scheduler._max_date.valueOf() && date.valueOf() >= scheduler._min_date.valueOf());\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"gridcell\",\r\n\t\t\t\t\"aria-label\": scheduler.templates.day_date(date),\r\n\t\t\t\t\"aria-selected\": selected ? \"true\" : \"false\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalHeadCell: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"columnheader\"\r\n\t\t\t});\r\n\t\t},\r\n\r\n\r\n\t\tweekAgendaDayCell: function(div, date){\r\n\t\t\tvar header = div.querySelector(\".dhx_wa_scale_bar\");\r\n\t\t\tvar content = div.querySelector(\".dhx_wa_day_data\");\r\n\t\t\tvar headerId = scheduler.uid() + \"\";\r\n\t\t\tthis.setAttributes(header, { \"id\": headerId});\r\n\t\t\tthis.setAttributes(content, { \"aria-labelledby\": headerId});\r\n\r\n\t\t},\r\n\t\tweekAgendaEvent: function(div, event){\r\n\t\t\tthis.eventAttr(event, div);\r\n\t\t},\r\n\r\n\t\tlightboxHiddenAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t},\r\n\r\n\t\tlightboxVisibleAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"false\");\r\n\t\t},\r\n\r\n\t\tlightboxSectionButtonAttrString: function(label){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":label, \"tabindex\":\"0\"});\r\n\t\t},\r\n\r\n\t\tyearHeader: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"id\":headerId+\"\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tyearGrid: function(div, headerId){\r\n\t\t\tthis.minicalGrid(div, headerId);\r\n\t\t},\r\n\t\tyearHeadCell: function(div){\r\n\t\t\treturn this.minicalHeadCell(div);\r\n\t\t},\r\n\t\tyearRow: function(div){\r\n\t\t\treturn this.minicalRow(div);\r\n\t\t},\r\n\t\tyearDayCell: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"gridcell\"\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\tlightboxAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t\tdiv.firstChild.setAttribute(\"role\", \"heading\");\r\n\t\t},\r\n\r\n\t\tlightboxButtonAttrString:function(buttonName){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels[buttonName], \"tabindex\":\"0\"});\r\n\t\t},\r\n\t\teventMenuAttrString: function(iconName){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels[iconName]});\r\n\t\t},\r\n\t\tlightboxHeader: function(div, headerText){\r\n\t\t\tdiv.setAttribute(\"aria-label\", headerText);\r\n\t\t},\r\n\r\n\t\tlightboxSelectAttrString: function(time_option){\r\n\t\t\tvar label = \"\";\r\n\r\n\t\t\tswitch (time_option) {\r\n\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.year;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%m\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.month;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%d\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.day;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%H:%i\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.hour + \" \" + scheduler.locale.labels.minute;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": label});\r\n\t\t},\r\n\r\n\r\n\t\tmessageButtonAttrString: function(buttonLabel){\r\n\t\t\treturn \"tabindex='0' role='button' aria-label='\"+buttonLabel+\"'\";\r\n\t\t},\r\n\r\n\t\tmessageInfoAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"alert\");\r\n\t\t\t//div.setAttribute(\"tabindex\", \"-1\");\r\n\t\t},\r\n\r\n\t\tmessageModalAttr: function(div, uid){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t\tif(uid){\r\n\t\t\t\tdiv.setAttribute(\"aria-labelledby\", uid);\r\n\t\t\t}\r\n\r\n\t\t\t//\tdiv.setAttribute(\"tabindex\", \"-1\");\r\n\t\t},\r\n\r\n\t\tquickInfoAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t},\r\n\r\n\t\tquickInfoHeaderAttrString: function(){\r\n\t\t\treturn \" role='heading' \";\r\n\t\t},\r\n\r\n\t\tquickInfoHeader: function(div, header){\r\n\t\t\tdiv.setAttribute(\"aria-label\", header);\r\n\t\t},\r\n\r\n\t\tquickInfoButtonAttrString: function(label){\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"role\":\"button\", \"aria-label\":label, \"tabindex\":\"0\"});\r\n\t\t},\r\n\r\n\t\ttooltipAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"tooltip\");\r\n\t\t},\r\n\r\n\t\ttooltipVisibleAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"false\");\r\n\t\t},\r\n\r\n\t\ttooltipHiddenAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t}\r\n\t};\r\n\r\n\tfunction isDisabled(){\r\n\t\treturn !scheduler.config.wai_aria_attributes;\r\n\t}\r\n\r\n\tfor(var i in scheduler._waiAria){\r\n\t\tscheduler._waiAria[i] = (function(payload){\r\n\t\t\treturn function(){\r\n\t\t\t\tif(isDisabled()){\r\n\t\t\t\t\treturn \" \";\r\n\t\t\t\t}\r\n\t\t\t\treturn payload.apply(this, arguments);\r\n\t\t\t};\r\n\t\t})(scheduler._waiAria[i]);\r\n\t}\r\n\r\n\r\n})();\r\n\r\n}","//returns position of html element on the page\r\nfunction elementPosition(elem) {\r\n\tvar top=0, left=0, right=0, bottom=0;\r\n\tif (elem.getBoundingClientRect) { //HTML5 method\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\t\tvar body = document.body;\r\n\t\tvar docElem = (document.documentElement ||\r\n\t\t\tdocument.body.parentNode ||\r\n\t\t\tdocument.body);\r\n\r\n\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\t\ttop = box.top + scrollTop - clientTop;\r\n\t\tleft = box.left + scrollLeft - clientLeft;\r\n\r\n\t\tright = document.body.offsetWidth - box.right;\r\n\t\tbottom = document.body.offsetHeight - box.bottom;\r\n\t} else { //fallback to naive approach\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop,10);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft,10);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\r\n\t\tright = document.body.offsetWidth - elem.offsetWidth - left;\r\n\t\tbottom = document.body.offsetHeight - elem.offsetHeight - top;\r\n\t}\r\n\treturn { y: Math.round(top), x: Math.round(left), width:elem.offsetWidth, height:elem.offsetHeight, right: Math.round(right), bottom: Math.round(bottom) };\r\n}\r\n\r\n/*\r\nevent position relatively to DOM element\r\n */\r\nfunction getRelativeEventPosition(ev, node){\r\n\tvar d = document.documentElement;\r\n\tvar box = elementPosition(node);\r\n\r\n\treturn {\r\n\t\tx: ev.clientX - d.clientLeft - box.x + node.scrollLeft,\r\n\t\ty: ev.clientY - d.clientTop - box.y + node.scrollTop\r\n\t};\r\n}\r\n\r\nfunction getNodePosition(elem) {\r\n\tvar top=0, left=0, right=0, bottom=0;\r\n\tif (elem.getBoundingClientRect) { //HTML5 method\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\t\tvar body = document.body;\r\n\t\tvar docElem = (document.documentElement ||\r\n\t\t\tdocument.body.parentNode ||\r\n\t\t\tdocument.body);\r\n\r\n\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\t\ttop = box.top + scrollTop - clientTop;\r\n\t\tleft = box.left + scrollLeft - clientLeft;\r\n\r\n\t\tright = document.body.offsetWidth - box.right;\r\n\t\tbottom = document.body.offsetHeight - box.bottom;\r\n\t} else { //fallback to naive approach\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop,10);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft,10);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\r\n\t\tright = document.body.offsetWidth - elem.offsetWidth - left;\r\n\t\tbottom = document.body.offsetHeight - elem.offsetHeight - top;\r\n\t}\r\n\treturn { y: Math.round(top), x: Math.round(left), width:elem.offsetWidth, height:elem.offsetHeight, right: Math.round(right), bottom: Math.round(bottom) };\r\n}\r\n\r\nfunction getClassName(node){\r\n\tif(!node) return \"\";\r\n\r\n\tvar className = node.className || \"\";\r\n\tif(className.baseVal)//'className' exist but not a string - IE svg element in DOM\r\n\t\tclassName = className.baseVal;\r\n\r\n\tif(!className.indexOf)\r\n\t\tclassName = '';\r\n\r\n\treturn className || \"\";\r\n}\r\n\r\nfunction getTargetNode(e) {\r\n\tvar trg;\r\n\tif (e.tagName)\r\n\t\ttrg = e;\r\n\telse {\r\n\t\te = e || window.event;\r\n\t\ttrg = e.target || e.srcElement;\r\n\t\tif (trg.shadowRoot && e.composedPath) {\r\n\t\t\ttrg = e.composedPath()[0];\r\n\t\t}\r\n\t}\r\n\treturn trg;\r\n}\r\n\r\nfunction locateCss(e, classname, strict){\r\n\tif(strict === undefined)\r\n\t\tstrict = true;\r\n\r\n\tvar trg = e.target || e.srcElement;\r\n\tvar css = '';\r\n\r\n\twhile (trg){\r\n\t\tcss = getClassName(trg);\r\n\r\n\t\tif(css){\r\n\t\t\tvar ind = css.indexOf(classname);\r\n\t\t\tif (ind >= 0){\r\n\t\t\t\tif (!strict)\r\n\t\t\t\t\treturn trg;\r\n\r\n\t\t\t\t//check that we have exact match\r\n\t\t\t\tvar left = (ind === 0) || (!((css.charAt(ind - 1)||\"\").trim()));\r\n\t\t\t\tvar right = ((ind + classname.length >= css.length)) || (!((css.charAt(ind + classname.length)).trim()));\r\n\r\n\t\t\t\tif (left && right)\r\n\t\t\t\t\treturn trg;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttrg=trg.parentNode;\r\n\t}\r\n\treturn null;\r\n}\r\n\r\n\r\n// get focusable nodes\r\nfunction isVisible(node){\r\n\tvar display = false,\r\n\t\tvisibility = false;\r\n\tif(window.getComputedStyle){\r\n\t\tvar style = window.getComputedStyle(node, null);\r\n\t\tdisplay = style[\"display\"];\r\n\t\tvisibility = style[\"visibility\"];\r\n\t}else if(node.currentStyle){\r\n\t\tdisplay = node.currentStyle[\"display\"];\r\n\t\tvisibility = node.currentStyle[\"visibility\"];\r\n\t}\r\n\r\n\tvar hiddenSection = false;\r\n\tvar recurringSection = locateCss({target:node}, \"dhx_form_repeat\", false);\r\n\tif(recurringSection){\r\n\t\thiddenSection = !!(recurringSection.style.height == \"0px\");\r\n\t}\r\n\thiddenSection = hiddenSection || !(node.offsetHeight);\r\n\r\n\treturn (display != \"none\" && visibility != \"hidden\" && !hiddenSection);\r\n}\r\n\r\nfunction hasNonNegativeTabIndex(node){\r\n\treturn !isNaN(node.getAttribute(\"tabindex\")) && (node.getAttribute(\"tabindex\")*1 >= 0);\r\n}\r\n\r\nfunction hasHref(node){\r\n\tvar canHaveHref = {\"a\": true, \"area\": true};\r\n\tif(canHaveHref[node.nodeName.loLowerCase()]){\r\n\t\treturn !!node.getAttribute(\"href\");\r\n\t}\r\n\treturn true;\r\n}\r\n\r\nfunction isEnabled(node){\r\n\tvar canDisable = {\"input\":true, \"select\":true, \"textarea\":true, \"button\":true, \"object\":true};\r\n\tif(canDisable[node.nodeName.toLowerCase()]){\r\n\t\treturn !node.hasAttribute(\"disabled\");\r\n\t}\r\n\r\n\treturn true;\r\n}\r\n\r\n\r\nfunction getFocusableNodes(root){\r\n\tvar nodes = root.querySelectorAll([\r\n\t\t\"a[href]\",\r\n\t\t\"area[href]\",\r\n\t\t\"input\",\r\n\t\t\"select\",\r\n\t\t\"textarea\",\r\n\t\t\"button\",\r\n\t\t\"iframe\",\r\n\t\t\"object\",\r\n\t\t\"embed\",\r\n\t\t\"[tabindex]\",\r\n\t\t\"[contenteditable]\"\r\n\t].join(\", \"));\r\n\r\n\tvar nodesArray = Array.prototype.slice.call(nodes, 0);\r\n\t\r\n\tfor(var i = 0; i < nodesArray.length; i++){\r\n\t\tnodesArray[i].$position = i;\r\n\t\t// we remember original nodes order, \r\n\t\t// so when we sort them by tabindex we ensure order of nodes with same tabindex is preserved, \r\n\t\t// since some browsers do unstable sort\r\n\t}\r\n\t\r\n\tnodesArray.sort(function(a, b) {\r\n\t\tif(a.tabIndex === 0 && b.tabIndex !== 0){\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\tif(a.tabIndex !== 0 && b.tabIndex === 0){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\t\r\n\t\tif (a.tabIndex === b.tabIndex){\r\n\t\t\t// ensure we do stable sort\r\n\t\t\treturn a.$position - b.$position;\r\n\t\t}\r\n\t\tif (a.tabIndex < b.tabIndex) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn 1;\r\n\t});\r\n\t\r\n\tfor(var i = 0; i < nodesArray.length; i++){\r\n\t\tvar node = nodesArray[i];\r\n\t\tvar isValid = (hasNonNegativeTabIndex(node) || isEnabled(node) || hasHref(node)) && isVisible(node);\r\n\t\tif(!isValid){\r\n\t\t\tnodesArray.splice(i, 1);\r\n\t\t\ti--;\r\n\t\t}\r\n\t}\r\n\treturn nodesArray;\r\n}\r\n\r\n\r\nfunction isShadowDomSupported() {\r\n\treturn document.head.createShadowRoot || document.head.attachShadow;\r\n}\r\n\r\n/**\r\n * Returns element that has the browser focus, or null if no element has focus.\r\n * Works with shadow DOM, so it's prefereed to use this function instead of document.activeElement directly.\r\n * @returns HTMLElement\r\n */\r\nfunction getActiveElement(){\r\n\tvar activeElement = document.activeElement;\r\n\tif (activeElement.shadowRoot) {\r\n\t\tactiveElement = activeElement.shadowRoot.activeElement;\r\n\t}\r\n\tif (activeElement === document.body && document.getSelection) {\r\n\t\tactiveElement = document.getSelection().focusNode || document.body;\r\n\t}\r\n\r\n\treturn activeElement;\r\n}\r\n\r\n/**\r\n * Returns document.body or the host node of the ShadowRoot, if the element is attached to ShadowDom\r\n * @param {HTMLElement} element \r\n * @returns HTMLElement\r\n */\r\nfunction getRootNode(element) {\r\n\tif (!element) {\r\n\t\treturn document.body;\r\n\t}\r\n\tif (!isShadowDomSupported()) {\r\n\t\treturn document.body;\r\n\t}\r\n\twhile (element.parentNode && (element = element.parentNode)) {\r\n\t\tif (element instanceof ShadowRoot) {\r\n\t\t\treturn element.host;\r\n\t\t}\r\n\t}\r\n\treturn document.body;\r\n}\r\n\r\nfunction hasShadowParent(element) {\r\n\treturn !!getRootNode(element);\r\n}\r\n\r\nexport default {\r\n\t/**\r\n\t * @desc: Calculate absolute position of html object\r\n\t * @type: private\r\n\t * @param: htmlObject - html object\r\n\t * @topic: 0\r\n\t */\r\n\tgetAbsoluteLeft: function getAbsoluteLeft(htmlObject){\r\n\t\treturn this.getOffset(htmlObject).left;\r\n\t},\r\n\t/**\r\n\t * @desc: Calculate absolute position of html object\r\n\t * @type: private\r\n\t * @param: htmlObject - html object\r\n\t * @topic: 0\r\n\t */\r\n\tgetAbsoluteTop: function getAbsoluteTop(htmlObject){\r\n\t\treturn this.getOffset(htmlObject).top;\r\n\t},\r\n\r\n\tgetOffsetSum: function getOffsetSum(elem) {\r\n\t\tvar top=0, left=0;\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\t\treturn {top: top, left: left};\r\n\t},\r\n\r\n\tgetOffsetRect: function getOffsetRect(elem) {\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\r\n\t\tvar top = 0,\r\n\t\t\tleft = 0;\r\n\r\n\t\t// https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#Mobile_Tablet_or_Desktop\r\n\t\tif (!/Mobi/.test(navigator.userAgent)) {\r\n\t\t\tvar body = document.body;\r\n\t\t\tvar docElem = document.documentElement;\r\n\t\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\r\n\t\t\ttop = box.top + scrollTop - clientTop;\r\n\t\t\tleft = box.left + scrollLeft - clientLeft;\r\n\t\t}else {\r\n\t\t\t// incorrect left coordinate on mobile zoom\r\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=489206\r\n\r\n\t\t\tvar dummy = document.createElement(\"div\");\r\n\t\t\tdummy.style.position=\"absolute\";\r\n\t\t\tdummy.style.left=\"0px\";\r\n\t\t\tdummy.style.top=\"0px\";\r\n\t\t\tdummy.style.width=\"1px\";\r\n\t\t\tdummy.style.height = \"1px\";\r\n\r\n\t\t\tdocument.body.appendChild(dummy);\r\n\t\t\tvar dummyBox = dummy.getBoundingClientRect();\r\n\t\t\ttop = box.top - dummyBox.top;\r\n\t\t\tleft = box.left - dummyBox.left;\r\n\r\n\t\t\tdummy.parentNode.removeChild(dummy);\r\n\t\t}\r\n\r\n\t\treturn { top: Math.round(top), left: Math.round(left) };\r\n\t},\r\n\r\n\tgetOffset: function getOffset(elem) {\r\n\t\tif (elem.getBoundingClientRect) {\r\n\t\t\treturn this.getOffsetRect(elem);\r\n\t\t} else {\r\n\t\t\treturn this.getOffsetSum(elem);\r\n\t\t}\r\n\t},\r\n\r\n\tclosest: function(element, selector){\r\n\t\tif(!element || !selector){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn closest(element, selector);\r\n\t},\r\n\tinsertAfter: function(newNode, referenceNode){\r\n\t\tif(referenceNode.nextSibling){\r\n\t\t\treferenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);\r\n\t\t}else{\r\n\t\t\treferenceNode.parentNode.appendChild(newNode);\r\n\t\t}\r\n\t},\r\n\tremove: function(node) {\r\n\t\tif (node && node.parentNode) {\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t}\r\n\t},\r\n\tisChildOf: function(child, parent) {\r\n\t\treturn parent.contains(child);\r\n\t},\r\n\tgetFocusableNodes,\r\n\tgetClassName,\r\n\tlocateCss,\r\n\tgetRootNode,\r\n\thasShadowParent,\r\n\tisShadowDomSupported,\r\n\tgetActiveElement,\r\n\tgetRelativeEventPosition,\r\n\tgetTargetNode,\r\n\tgetNodePosition\r\n};\r\n\r\nvar closest;\r\nif(Element.prototype.closest){\r\n\tclosest = function(element, selector){\r\n\t\treturn element.closest(selector);\r\n\t};\r\n}else{\r\n\tvar matches = Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\r\n\tclosest = function(element, selector) {\r\n\t\tvar el = element;\r\n\t\tdo {\r\n\t\t\tif (matches.call(el, selector)){\r\n\t\t\t\treturn el;\r\n\t\t\t}\r\n\t\t\tel = el.parentElement || el.parentNode;\r\n\t\t} while (el !== null && el.nodeType === 1);\r\n\t\treturn null;\r\n\t};\r\n}\r\n","/* eslint-disable no-restricted-globals */\r\nvar isWindowAwailable = typeof window !== \"undefined\";\r\n\r\n/* eslint-enable no-restricted-globals */\r\n\r\nexport default {\r\n\tisIE: isWindowAwailable && (navigator.userAgent.indexOf(\"MSIE\") >= 0 || navigator.userAgent.indexOf(\"Trident\") >= 0),\r\n\tisOpera: isWindowAwailable && (navigator.userAgent.indexOf(\"Opera\") >= 0),\r\n\tisChrome: isWindowAwailable && (navigator.userAgent.indexOf(\"Chrome\") >= 0),\r\n\tisKHTML: isWindowAwailable && (navigator.userAgent.indexOf(\"Safari\") >= 0 || navigator.userAgent.indexOf(\"Konqueror\") >= 0),\r\n\tisFF: isWindowAwailable && (navigator.userAgent.indexOf(\"Firefox\") >= 0),\r\n\tisIPad: isWindowAwailable && (navigator.userAgent.search(/iPad/gi) >= 0),\r\n\tisEdge: isWindowAwailable && (navigator.userAgent.indexOf(\"Edge\")!=-1),\r\n\tisNode: (!isWindowAwailable || typeof navigator == \"undefined\")\r\n};","export default function extend(scheduler) {\r\n\r\nscheduler.destructor = function(){\r\n\tscheduler.callEvent(\"onDestroy\", []);\r\n\tthis.clearAll();\r\n\r\n\tif(this.$container){\r\n\t\t// FIXME: clear container or remove container\r\n\t\tthis.$container.innerHTML = \"\";\r\n\t\t// scheduler.$domHelpers.remove(this.$container);\r\n\t}\r\n\r\n\tif(this._eventRemoveAll){\r\n\t\tthis._eventRemoveAll();\r\n\t}\r\n\r\n\tif(this.resetLightbox){\r\n\t\tthis.resetLightbox();\r\n\t}\r\n\r\n\tif(this._dp && this._dp.destructor){\r\n\t\tthis._dp.destructor();\r\n\t}\r\n\r\n\t// detachAllEvents should be called last, because in components may be attached events\r\n\tthis.detachAllEvents();\r\n\r\n\tfor(var i in this){\r\n\t\tif(i.indexOf(\"$\") === 0){\r\n\t\t\tdelete this[i];\r\n\t\t}\r\n\t}\r\n\tscheduler.$destroyed = true;\r\n};\r\n\r\n}","export default function(data) {\r\n\tif (typeof data === \"string\" || typeof data === \"number\") {\r\n\t\treturn data;\r\n\t}\r\n\tvar result = \"\";\r\n\tfor (var key in data) {\r\n\t\tvar serialized = \"\";\r\n\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\tif (typeof data[key] === \"string\") {\r\n\t\t\t\tserialized = encodeURIComponent(data[key]);\r\n\t\t\t} else if (typeof data[key] === \"number\") {\r\n\t\t\t\tserialized = data[key];\r\n\t\t\t} else {\r\n\t\t\t\tserialized = encodeURIComponent(JSON.stringify(data[key]));\r\n\t\t\t}\r\n\t\t\tserialized = key + \"=\" + serialized;\r\n\r\n\t\t\tif (result.length) {\r\n\t\t\t\tserialized = \"&\" + serialized;\r\n\t\t\t}\r\n\t\t\tresult += serialized;\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n}","import serialize from \"../common/url_serialize.js\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler.Promise = window.Promise; \r\n\r\nfunction createConfig(method, args) {\r\n\tvar result = {\r\n\t\tmethod: method\r\n\t};\r\n\r\n\tif (args.length === 0) {\r\n\t\tthrow new Error(\"Arguments list of query is wrong.\");\r\n\t}\r\n\tif (args.length === 1) {\r\n\t\tif (typeof args[0] === \"string\") {\r\n\t\t\tresult.url = args[0];\r\n\t\t\tresult.async = true;\r\n\t\t} else {\r\n\t\t\tresult.url = args[0].url;\r\n\t\t\tresult.async = (args[0].async || true);\r\n\t\t\tresult.callback = args[0].callback;\r\n\t\t\tresult.headers = args[0].headers;\r\n\t\t}\r\n\t\tif (method === \"POST\" || \"PUT\") {\r\n\t\t\tif (args[0].data) {\r\n\t\t\t\tif (typeof args[0].data !== \"string\") {\r\n\t\t\t\t\tresult.data = serialize(args[0].data);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult.data = args[0].data;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tresult.data = \"\";\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n\tresult.url = args[0];\r\n\tswitch(method) {\r\n\t\tcase \"GET\":\r\n\t\tcase \"DELETE\":\r\n\t\t\tresult.callback = args[1];\r\n\t\t\tresult.headers = args[2];\r\n\t\tbreak;\r\n\t\tcase \"POST\":\r\n\t\tcase \"PUT\":\r\n\t\t\tif (args[1]) {\r\n\t\t\t\tif (typeof args[1] !== \"string\") {\r\n\t\t\t\t\tresult.data = serialize(args[1]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult.data = args[1];\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tresult.data = \"\";\r\n\t\t\t}\r\n\t\t\tresult.callback = args[2];\r\n\t\t\tresult.headers = args[3];\r\n\t\tbreak;\r\n\t}\r\n\treturn result;\r\n}\r\nscheduler.ajax = {\r\n\t// if false - dhxr param will added to prevent caching on client side (default),\r\n\t// if true - do not add extra params\r\n\tcache: true,\r\n\r\n\t// default method for load/loadStruct, post/get allowed\r\n\tmethod: \"get\",\r\n\r\n\tserializeRequestParams: serialize,\r\n\tparse: function(data) {\r\n\t\tif (typeof data !== \"string\") return data;\r\n\r\n\t\tvar obj;\r\n\t\tdata = data.replace(/^[\\s]+/,\"\");\r\n\t\tif (typeof DOMParser !== \"undefined\" && !scheduler.$env.isIE) { // ff,ie9\r\n\t\t\tobj = (new DOMParser()).parseFromString(data, \"text/xml\");\r\n\t\t} else if (typeof window.ActiveXObject !== \"undefined\") {\r\n\t\t\tobj = new window.ActiveXObject(\"Microsoft.XMLDOM\");\r\n\t\t\tobj.async = \"false\";\r\n\t\t\tobj.loadXML(data);\r\n\t\t}\r\n\t\treturn obj;\r\n\t},\r\n\txmltop: function(tagname, xhr, obj) {\r\n\t\tif (typeof xhr.status == \"undefined\" || xhr.status < 400) {\r\n\t\t\tvar xml = (!xhr.responseXML) ? this.parse(xhr.responseText || xhr) : (xhr.responseXML || xhr);\r\n\t\t\tif (xml && xml.documentElement !== null && !xml.getElementsByTagName(\"parsererror\").length) {\r\n\t\t\t\treturn xml.getElementsByTagName(tagname)[0];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (obj !== -1) scheduler.callEvent(\"onLoadXMLError\",[\"Incorrect XML\", arguments[1], obj]);\r\n\t\treturn document.createElement(\"DIV\");\r\n\t},\r\n\txpath: function(xpathExp, docObj) {\r\n\t\tif (!docObj.nodeName) docObj = docObj.responseXML || docObj;\r\n\t\tif (scheduler.$env.isIE) {\r\n\t\t\treturn docObj.selectNodes(xpathExp)||[];\r\n\t\t} else {\r\n\t\t\tvar rows = [];\r\n\t\t\tvar first;\r\n\t\t\tvar col = (docObj.ownerDocument||docObj).evaluate(xpathExp, docObj, null, XPathResult.ANY_TYPE, null);\r\n\r\n\t\t\twhile (true){\r\n\t\t\t\tfirst = col.iterateNext();\r\n\t\t\t\tif(first){\r\n\t\t\t\t\trows.push(first);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn rows;\r\n\t\t}\r\n\t},\r\n\tquery: function(config) {\r\n\t\treturn this._call(\r\n\t\t\t(config.method || \"GET\"),\r\n\t\t\tconfig.url,\r\n\t\t\tconfig.data || \"\",\r\n\t\t\t(config.async || true),\r\n\t\t\tconfig.callback,\r\n\t\t\tconfig.headers\r\n\t\t);\r\n\t},\r\n\tget: function(url, onLoad, headers) {\r\n\t\tvar config = createConfig(\"GET\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tgetSync: function(url, headers) {\r\n\t\tvar config = createConfig(\"GET\", arguments);\r\n\t\tconfig.async = false;\r\n\t\treturn this.query(config);\r\n\t},\r\n\tput: function(url, postData, onLoad, headers) {\r\n\t\tvar config = createConfig(\"PUT\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tdel: function(url, onLoad, headers) {\r\n\t\t/**\r\n\t\t * https://tools.ietf.org/html/rfc7231#section-4.3.5\r\n\t\t * A payload within a DELETE request message has no defined semantics;\r\n\t\t * sending a payload body on a DELETE request might cause some existing\r\n\t\t * implementations to reject the request.\r\n\t\t */\r\n\t\tvar config = createConfig(\"DELETE\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tpost: function(url, postData, onLoad, headers) {\r\n\t\tif (arguments.length == 1) {\r\n\t\t\tpostData = \"\";\r\n\t\t} else if (arguments.length == 2 && typeof(postData) == \"function\") {\r\n\t\t\tonLoad = postData;\r\n\t\t\tpostData = \"\";\r\n\t\t}\r\n\t\tvar config = createConfig(\"POST\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tpostSync: function(url, postData, headers) {\r\n\t\tpostData = (postData === null ? \"\" : String(postData));\r\n\r\n\t\tvar config = createConfig(\"POST\", arguments);\r\n\t\tconfig.async = false;\r\n\t\treturn this.query(config);\r\n\t},\r\n\t_call: function(method, url, postData, async, onLoad, headers) {\r\n\t\treturn new scheduler.Promise((function(resolve, reject) {\r\n\t\t\tvar t = (typeof XMLHttpRequest !== undefined && !scheduler.$env.isIE ? new XMLHttpRequest() : new window.ActiveXObject(\"Microsoft.XMLHTTP\"));\r\n\t\t\tvar isQt = (navigator.userAgent.match(/AppleWebKit/) !== null && navigator.userAgent.match(/Qt/) !== null && navigator.userAgent.match(/Safari/) !== null);\r\n\r\n\t\t\tif (!!async) {\r\n\t\t\t\tt.addEventListener(\"readystatechange\", function() {\r\n\t\t\t\t\tif ((t.readyState == 4) || (isQt && t.readyState == 3)) { // what for long response and status 404?\r\n\t\t\t\t\t\tif (t.status != 200 || t.responseText === \"\")\r\n\t\t\t\t\t\t\tif (!scheduler.callEvent(\"onAjaxError\", [t])) return;\r\n\r\n\t\t\t\t\t\tsetTimeout(function() {\r\n\t\t\t\t\t\t\tif (typeof(onLoad) == \"function\") {\r\n\t\t\t\t\t\t\t\tonLoad.apply(window, [{xmlDoc:t, filePath:url}]); // dhtmlx-compat, response.xmlDoc.responseXML/responseText\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tresolve(t);\r\n\t\t\t\t\t\t\tif (typeof(onLoad) == \"function\") {\r\n\t\t\t\t\t\t\t\tonLoad = null;\r\n\t\t\t\t\t\t\t\tt = null;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}, 0);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (method == \"GET\" && !this.cache) {\r\n\t\t\t\turl += (url.indexOf(\"?\")>=0?\"&\":\"?\")+\"dhxr\"+new Date().getTime()+\"=1\";\r\n\t\t\t}\r\n\r\n\t\t\tt.open(method, url, async);\r\n\r\n\t\t\tif (headers){\r\n\t\t\t\tfor (var key in headers)\r\n\t\t\t\t\tt.setRequestHeader(key, headers[key]);\r\n\t\t\t} else if (method.toUpperCase() == \"POST\" || method == \"PUT\" || method == \"DELETE\") {\r\n\t\t\t\tt.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\r\n\t\t\t} else if (method == \"GET\") {\r\n\t\t\t\tpostData = null;\r\n\t\t\t}\r\n\r\n\t\t\tt.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\r\n\r\n\t\t\tt.send(postData);\r\n\r\n\t\t\tif (!async) return {xmlDoc:t, filePath:url}; // dhtmlx-compat, response.xmlDoc.responseXML/responseText\r\n\t\t}.bind(this)));\r\n\t},\r\n\turlSeparator: function(str){\r\n\t\tif (str.indexOf(\"?\") != -1)\r\n\t\t\treturn \"&\";\r\n\t\telse\r\n\t\t\treturn \"?\";\r\n\t}\r\n};\r\n\r\nscheduler.$ajax = scheduler.ajax; // for old\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nvar generateStringToDate = function (format, utc) {\r\n\tvar splt = \"var temp=date.match(/[a-zA-Z]+|[0-9]+/g);\";\r\n\tvar mask = format.match(/%[a-zA-Z]/g);\r\n\tfor (var i = 0; i < mask.length; i++) {\r\n\t\tswitch (mask[i]) {\r\n\t\t\tcase \"%j\":\r\n\t\t\tcase \"%d\": splt += \"set[2]=temp[\" + i + \"]||1;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%n\":\r\n\t\t\tcase \"%m\": splt += \"set[1]=(temp[\" + i + \"]||1)-1;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%y\": splt += \"set[0]=temp[\" + i + \"]*1+(temp[\" + i + \"]>50?1900:2000);\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%g\":\r\n\t\t\tcase \"%G\":\r\n\t\t\tcase \"%h\":\r\n\t\t\tcase \"%H\":\r\n\t\t\t\tsplt += \"set[3]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%i\":\r\n\t\t\t\tsplt += \"set[4]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%Y\": splt += \"set[0]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%a\":\r\n\t\t\tcase \"%A\": splt += \"set[3]=set[3]%12+((temp[\" + i + \"]||'').toLowerCase()=='am'?0:12);\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%s\": splt += \"set[5]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%M\": splt += \"set[1]=this.locale.date.month_short_hash[temp[\" + i + \"]]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%F\": splt += \"set[1]=this.locale.date.month_full_hash[temp[\" + i + \"]]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\tvar code = \"set[0],set[1],set[2],set[3],set[4],set[5]\";\r\n\tif (utc) code = \" Date.UTC(\" + code + \")\";\r\n\treturn new Function(\"date\", \"var set=[0,0,1,0,0,0]; \" + splt + \" return new Date(\" + code + \");\");\r\n};\r\nvar csp_date_to_str = function (format, utc) {\r\n\treturn function(date) {\r\n\t\treturn format.replace(/%[a-zA-Z]/g, function (a) {\r\n\t\t\tswitch (a) {\r\n\t\t\t\tcase \"%d\": return utc ? scheduler.date.to_fixed(date.getUTCDate()) : scheduler.date.to_fixed(date.getDate());\r\n\t\t\t\tcase \"%m\": return utc ? scheduler.date.to_fixed((date.getUTCMonth() + 1)) : scheduler.date.to_fixed((date.getMonth() + 1));\r\n\t\t\t\tcase \"%j\": return utc ? date.getUTCDate() : date.getDate();\r\n\t\t\t\tcase \"%n\": return utc ? (date.getUTCMonth() + 1) : (date.getMonth() + 1);\r\n\t\t\t\tcase \"%y\": return utc ? scheduler.date.to_fixed(date.getUTCFullYear() % 100) : scheduler.date.to_fixed(date.getFullYear() % 100);\r\n\t\t\t\tcase \"%Y\": return utc ? date.getUTCFullYear() : date.getFullYear();\r\n\t\t\t\tcase \"%D\": return utc ? scheduler.locale.date.day_short[date.getUTCDay()] : scheduler.locale.date.day_short[date.getDay()];\r\n\t\t\t\tcase \"%l\": return utc ? scheduler.locale.date.day_full[date.getUTCDay()] : scheduler.locale.date.day_full[date.getDay()];\r\n\t\t\t\tcase \"%M\": return utc ? scheduler.locale.date.month_short[date.getUTCMonth()] : scheduler.locale.date.month_short[date.getMonth()];\r\n\t\t\t\tcase \"%F\": return utc ? scheduler.locale.date.month_full[date.getUTCMonth()] : scheduler.locale.date.month_full[date.getMonth()];\r\n\t\t\t\tcase \"%h\": return utc ? scheduler.date.to_fixed((date.getUTCHours() + 11) % 12 + 1) : scheduler.date.to_fixed((date.getHours() + 11) % 12 + 1);\r\n\t\t\t\tcase \"%g\": return utc ? ((date.getUTCHours() + 11) % 12 + 1) : ((date.getHours() + 11) % 12 + 1);\r\n\t\t\t\tcase \"%G\": return utc ? date.getUTCHours() : date.getHours();\r\n\t\t\t\tcase \"%H\": return utc ? scheduler.date.to_fixed(date.getUTCHours()) : scheduler.date.to_fixed(date.getHours());\r\n\t\t\t\tcase \"%i\": return utc ? scheduler.date.to_fixed(date.getUTCMinutes()) : scheduler.date.to_fixed(date.getMinutes());\r\n\t\t\t\tcase \"%a\": return utc ? (date.getUTCHours() > 11 ? \"pm\" : \"am\") : (date.getHours() > 11 ? \"pm\" : \"am\");\r\n\t\t\t\tcase \"%A\": return utc ? (date.getUTCHours() > 11 ? \"PM\" : \"AM\") : (date.getHours() > 11 ? \"PM\" : \"AM\");\r\n\t\t\t\tcase \"%s\": return utc ? scheduler.date.to_fixed(date.getUTCSeconds()) : scheduler.date.to_fixed(date.getSeconds());\r\n\t\t\t\tcase \"%W\": return utc ? scheduler.date.to_fixed(scheduler.date.getUTCISOWeek(date)) : scheduler.date.to_fixed(scheduler.date.getISOWeek(date));\r\n\t\t\t\tdefault: return a;\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n};\r\nvar csp_str_to_date = function (format, utc) {\r\n\tconst mask = format.match(/%[a-zA-Z]/g);\r\n\treturn function (date){\r\n\t\tvar set = [0, 0, 1, 0, 0, 0];\r\n\t\tvar temp = date.match(/[a-zA-Z]+|[0-9]+/g);\r\n\r\n\t\tfor (var i = 0; i < mask.length; i++) {\r\n\t\t\tswitch (mask[i]) {\r\n\t\t\t\tcase \"%j\":\r\n\t\t\t\tcase \"%d\":\r\n\t\t\t\t\tset[2] = temp[i] || 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%n\":\r\n\t\t\t\tcase \"%m\":\r\n\t\t\t\t\tset[1] = (temp[i] || 1) - 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%y\":\r\n\t\t\t\t\tset[0] = temp[i] * 1 + (temp[i] > 50 ? 1900 : 2000);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%g\":\r\n\t\t\t\tcase \"%G\":\r\n\t\t\t\tcase \"%h\":\r\n\t\t\t\tcase \"%H\":\r\n\t\t\t\t\tset[3] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%i\":\r\n\t\t\t\t\tset[4] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\tset[0] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%a\":\r\n\t\t\t\tcase \"%A\":\r\n\t\t\t\t\tset[3] = set[3] % 12 + ((temp[i] || '').toLowerCase() == 'am' ? 0 : 12);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%s\":\r\n\t\t\t\t\tset[5] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%M\":\r\n\t\t\t\t\tset[1] = scheduler.locale.date.month_short_hash[temp[i]] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%F\":\r\n\t\t\t\t\tset[1] = scheduler.locale.date.month_full_hash[temp[i]] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (utc) {\r\n\t\t\treturn new Date(Date.UTC(set[0], set[1], set[2], set[3], set[4], set[5]));\r\n\t\t}\r\n\r\n\t\treturn new Date(set[0], set[1], set[2], set[3], set[4], set[5]);\r\n\t};\r\n};\r\n\r\nlet cspEnabled = undefined;\r\nfunction checkIfCSPEnabled(){\r\n\ttry {\r\n\t\tnew Function(\"cspEnabled = false;\");\r\n\t\tcspEnabled = false;\r\n\t} catch(e) {\r\n\t\tcspEnabled = true;\r\n\t}\r\n\treturn cspEnabled;\r\n}\r\n\r\nfunction useCsp() {\r\n\tvar result = false;\r\n\tif (scheduler.config.csp === \"auto\") {\r\n\t\tif(cspEnabled === undefined){\r\n\t\t\tcspEnabled = checkIfCSPEnabled();\r\n\t\t}\r\n\t\tresult = cspEnabled;\r\n\t} else {\r\n\t\tresult = scheduler.config.csp;\r\n\t}\r\n\treturn result;\r\n}\r\nscheduler.date = {\r\n\tinit:function(){\r\n\t\tvar s = scheduler.locale.date.month_short;\r\n\t\tvar t = scheduler.locale.date.month_short_hash = {};\r\n\t\tfor (var i = 0; i < s.length; i++)\r\n\t\t\tt[s[i]]=i;\r\n\r\n\t\tvar s = scheduler.locale.date.month_full;\r\n\t\tvar t = scheduler.locale.date.month_full_hash = {};\r\n\t\tfor (var i = 0; i < s.length; i++)\r\n\t\t\tt[s[i]]=i;\r\n\t},\r\n\tdate_part:function(date){\r\n\t\tvar old = new Date(date);\r\n\t\tdate.setHours(0);\r\n\t\tdate.setMinutes(0);\r\n\t\tdate.setSeconds(0);\r\n\t\tdate.setMilliseconds(0);\r\n\t\tif (date.getHours() && //shift to yesterday on dst\r\n\t\t\t(date.getDate() < old.getDate() || date.getMonth() < old.getMonth() || date.getFullYear() < old.getFullYear()) )\r\n\t\t\tdate.setTime(date.getTime() + 60 * 60 * 1000 * (24 - date.getHours()));\r\n\t\treturn date;\r\n\t},\r\n\ttime_part:function(date){\r\n\t\treturn (date.valueOf()/1000 - date.getTimezoneOffset()*60)%86400;\r\n\t},\r\n\tweek_start:function(date){\r\n\t\tvar shift=date.getDay();\r\n\t\tif (scheduler.config.start_on_monday){\r\n\t\t\tif (shift===0) shift=6;\r\n\t\t\telse shift--;\r\n\t\t}\r\n\t\treturn this.date_part(this.add(date,-1*shift,\"day\"));\r\n\t},\r\n\tmonth_start:function(date){\r\n\t\tdate.setDate(1);\r\n\t\treturn this.date_part(date);\r\n\t},\r\n\tyear_start:function(date){\r\n\t\tdate.setMonth(0);\r\n\t\treturn this.month_start(date);\r\n\t},\r\n\tday_start:function(date){\r\n\t\treturn this.date_part(date);\r\n\t},\r\n\t_add_days:function(date, inc){\r\n\t\tvar ndate = new Date(date.valueOf());\r\n\r\n\t\tndate.setDate(ndate.getDate() + inc);\r\n\r\n\t\t// Workaround for Safari/iOS timezone bug, ref:OKZ-149693\r\n\t\tif(inc == Math.round(inc) && inc > 0){\r\n\t\t\tvar datesDiff = +ndate - +date,\r\n\t\t\t\trest = datesDiff % (24*60*60*1000);\r\n\t\t\tif(rest && date.getTimezoneOffset() == ndate.getTimezoneOffset()){\r\n\t\t\t\tvar hours = rest / (60* 60 * 1000);\r\n\t\t\t\tndate.setTime(ndate.getTime() + (24 - hours) * 60 * 60 * 1000);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (inc >= 0 && (!date.getHours() && ndate.getHours()) &&//shift to yesterday on dst\r\n\t\t\t(ndate.getDate() < date.getDate() || ndate.getMonth() < date.getMonth() || ndate.getFullYear() < date.getFullYear()) )\r\n\t\t\tndate.setTime(ndate.getTime() + 60 * 60 * 1000 * (24 - ndate.getHours()));\r\n\t\treturn ndate;\r\n\t},\r\n\tadd:function(date,inc,mode){\r\n\t\tvar ndate=new Date(date.valueOf());\r\n\t\tswitch(mode){\r\n\t\t\tcase \"day\":\r\n\t\t\t\tndate = scheduler.date._add_days(ndate, inc);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"week\":\r\n\t\t\t\tndate = scheduler.date._add_days(ndate, inc * 7);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"month\": ndate.setMonth(ndate.getMonth()+inc); break;\r\n\t\t\tcase \"year\": ndate.setYear(ndate.getFullYear()+inc); break;\r\n\t\t\tcase \"hour\":\r\n\t\t\t\t/*\r\n\t\t\t\t setHour(getHour() + inc) and setMinutes gives weird result when is applied on a Daylight Saving time switch\r\n\t\t\t\t setTime seems working as expected\r\n\t\t\t\t*/\r\n\t\t\t\tndate.setTime(ndate.getTime() + inc * 60 * 60 * 1000);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"minute\":\r\n\t\t\t\tndate.setTime(ndate.getTime() + inc * 60 * 1000);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\treturn scheduler.date[\"add_\"+mode](date,inc,mode);\r\n\t\t}\r\n\t\treturn ndate;\r\n\t},\r\n\tto_fixed:function(num){\r\n\t\tif (num<10)\treturn \"0\"+num;\r\n\t\treturn num;\r\n\t},\r\n\tcopy:function(date){\r\n\t\treturn new Date(date.valueOf());\r\n\t},\r\n\tdate_to_str:function(format,utc){\r\n\t\tif (useCsp()) {\r\n\t\t\treturn csp_date_to_str(format,utc);\r\n\t\t}\r\n\r\n\t\tformat=format.replace(/%[a-zA-Z]/g,function(a){\r\n\t\t\tswitch(a){\r\n\t\t\t\tcase \"%d\": return \"\\\"+this.date.to_fixed(date.getDate())+\\\"\";\r\n\t\t\t\tcase \"%m\": return \"\\\"+this.date.to_fixed((date.getMonth()+1))+\\\"\";\r\n\t\t\t\tcase \"%j\": return \"\\\"+date.getDate()+\\\"\";\r\n\t\t\t\tcase \"%n\": return \"\\\"+(date.getMonth()+1)+\\\"\";\r\n\t\t\t\tcase \"%y\": return \"\\\"+this.date.to_fixed(date.getFullYear()%100)+\\\"\";\r\n\t\t\t\tcase \"%Y\": return \"\\\"+date.getFullYear()+\\\"\";\r\n\t\t\t\tcase \"%D\": return \"\\\"+this.locale.date.day_short[date.getDay()]+\\\"\";\r\n\t\t\t\tcase \"%l\": return \"\\\"+this.locale.date.day_full[date.getDay()]+\\\"\";\r\n\t\t\t\tcase \"%M\": return \"\\\"+this.locale.date.month_short[date.getMonth()]+\\\"\";\r\n\t\t\t\tcase \"%F\": return \"\\\"+this.locale.date.month_full[date.getMonth()]+\\\"\";\r\n\t\t\t\tcase \"%h\": return \"\\\"+this.date.to_fixed((date.getHours()+11)%12+1)+\\\"\";\r\n\t\t\t\tcase \"%g\": return \"\\\"+((date.getHours()+11)%12+1)+\\\"\";\r\n\t\t\t\tcase \"%G\": return \"\\\"+date.getHours()+\\\"\";\r\n\t\t\t\tcase \"%H\": return \"\\\"+this.date.to_fixed(date.getHours())+\\\"\";\r\n\t\t\t\tcase \"%i\": return \"\\\"+this.date.to_fixed(date.getMinutes())+\\\"\";\r\n\t\t\t\tcase \"%a\": return \"\\\"+(date.getHours()>11?\\\"pm\\\":\\\"am\\\")+\\\"\";\r\n\t\t\t\tcase \"%A\": return \"\\\"+(date.getHours()>11?\\\"PM\\\":\\\"AM\\\")+\\\"\";\r\n\t\t\t\tcase \"%s\": return \"\\\"+this.date.to_fixed(date.getSeconds())+\\\"\";\r\n\t\t\t\tcase \"%W\": return \"\\\"+this.date.to_fixed(this.date.getISOWeek(date))+\\\"\";\r\n\t\t\t\tdefault: return a;\r\n\t\t\t}\r\n\t\t});\r\n\t\tif (utc) format=format.replace(/date\\.get/g,\"date.getUTC\");\r\n\t\tvar func = new Function(\"date\",\"return \\\"\"+format+\"\\\";\");\r\n\r\n\t\treturn func.bind(scheduler);\r\n\t},\r\n\tstr_to_date:function(format, utc, exactFormat){\r\n\t\tvar stringToDateMethod = useCsp() ? csp_str_to_date : generateStringToDate;\r\n\t\tvar parseExactFormat = stringToDateMethod(format, utc);\r\n\t\t// eslint-disable-next-line\r\n\t\tvar yyyyMMddhhIIss = /^[0-9]{4}(\\-|\\/)[0-9]{2}(\\-|\\/)[0-9]{2} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/;\r\n\r\n\t\t// MM/dd/yyyy - default old format for xml-date\r\n\t\t// eslint-disable-next-line\r\n\t\tvar MMddyyyyhhIIss = /^[0-9]{2}\\/[0-9]{2}\\/[0-9]{4} ?(([0-9]{1,2}:[0-9]{2})(:[0-9]{1,2})?)?$/;\r\n\t\t// dd-MM-yyyy - default old format for api-date\r\n\t\t// eslint-disable-next-line\r\n\t\tvar ddMMyyyyhhIIss = /^[0-9]{2}\\-[0-9]{2}\\-[0-9]{4} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/;\r\n\t\t// eslint-disable-next-line\r\n\t\tvar ISO8601 = /^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$/;\r\n\r\n\t\tvar isYMDDate = function (datestr) {\r\n\t\t\treturn yyyyMMddhhIIss.test(String(datestr));\r\n\t\t};\r\n\r\n\t\tvar isMDYDate = function (datestr) {\r\n\t\t\treturn MMddyyyyhhIIss.test(String(datestr));\r\n\t\t};\r\n\t\tvar isDMYDate = function (datestr) {\r\n\t\t\treturn ddMMyyyyhhIIss.test(String(datestr));\r\n\t\t};\r\n\t\tvar isISO8601 = function (datestr) {\r\n\t\t\treturn ISO8601.test(datestr);\r\n\t\t};\r\n\r\n\t\tvar parseYMD = stringToDateMethod(\"%Y-%m-%d %H:%i:%s\", utc);\r\n\t\tvar parseMDY = stringToDateMethod(\"%m/%d/%Y %H:%i:%s\", utc);\r\n\t\tvar parseDMY = stringToDateMethod(\"%d-%m-%Y %H:%i:%s\", utc);\r\n\r\n\t\treturn function (dateString) {\r\n\r\n\t\t\tif (!exactFormat && !scheduler.config.parse_exact_format) {\r\n\t\t\t\tif (dateString && dateString.getISOWeek) {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t} else if (typeof dateString === \"number\") {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t} else if (isYMDDate(dateString)) {\r\n\t\t\t\t\treturn parseYMD(dateString);\r\n\t\t\t\t} else if (isMDYDate(dateString)) {\r\n\t\t\t\t\treturn parseMDY(dateString);\r\n\t\t\t\t} else if (isDMYDate(dateString)) {\r\n\t\t\t\t\treturn parseDMY(dateString);\r\n\t\t\t\t} else if (isISO8601(dateString)) {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn parseExactFormat.call(scheduler, dateString);\r\n\t\t};\r\n\t},\r\n\tgetISOWeek: function(ndate) {\r\n\t\tif(!ndate) return false;\r\n\t\tndate = this.date_part(new Date(ndate));\r\n\t\tvar nday = ndate.getDay();\r\n\t\tif (nday === 0) {\r\n\t\t\tnday = 7;\r\n\t\t}\r\n\t\tvar first_thursday = new Date(ndate.valueOf());\r\n\t\tfirst_thursday.setDate(ndate.getDate() + (4 - nday));\r\n\t\tvar year_number = first_thursday.getFullYear(); // year of the first Thursday\r\n\t\tvar ordinal_date = Math.round( (first_thursday.getTime() - new Date(year_number, 0, 1).getTime()) / 86400000); //ordinal date of the first Thursday - 1 (so not really ordinal date)\r\n\t\tvar week_number = 1 + Math.floor( ordinal_date / 7);\r\n\t\treturn week_number;\r\n\t},\r\n\tgetUTCISOWeek: function(ndate){\r\n\t\treturn this.getISOWeek(this.convert_to_utc(ndate));\r\n\t},\r\n\tconvert_to_utc: function(date) {\r\n\t\treturn new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds());\r\n\t}\r\n};\r\n\r\n}\r\n\r\n","export default function extend(scheduler) {\r\n\r\n/*\r\n%e\tDay of the month without leading zeros (01..31)\r\n%d\tDay of the month, 2 digits with leading zeros (01..31)\r\n%j\tDay of the year, 3 digits with leading zeros (001..366)\r\n%a\tA textual representation of a day, two letters\r\n%W\tA full textual representation of the day of the week\r\n\r\n%c\tNumeric representation of a month, without leading zeros (0..12)\r\n%m\tNumeric representation of a month, with leading zeros (00..12)\r\n%b\tA short textual representation of a month, three letters (Jan..Dec)\r\n%M\tA full textual representation of a month, such as January or March (January..December)\r\n\r\n%y\tA two digit representation of a year (93..03)\r\n%Y\tA full numeric representation of a year, 4 digits (1993..03)\r\n*/\r\n\r\nscheduler.config={\r\n\tdefault_date: \"%j %M %Y\",\r\n\tmonth_date: \"%F %Y\",\r\n\tload_date: \"%Y-%m-%d\",\r\n\tweek_date: \"%l\",\r\n\tday_date: \"%D %j\",\r\n\thour_date: \"%H:%i\",\r\n\tmonth_day: \"%d\",\r\n\t//xml_date: \"%m/%d/%Y %H:%i\",\r\n\tdate_format: \"%Y-%m-%d %H:%i\",\r\n\tapi_date: \"%d-%m-%Y %H:%i\",\r\n\tparse_exact_format: false,\r\n\tpreserve_length:true,\r\n\ttime_step: 5,\r\n\tdisplayed_event_color: \"#ff4a4a\",\r\n\tdisplayed_event_text_color: \"#ffef80\",\r\n\twide_form: 0,\r\n\tday_column_padding: 8,\r\n\tuse_select_menu_space: true,\r\n\tfix_tab_position: true,\r\n\tstart_on_monday: true,\r\n\tfirst_hour: 0,\r\n\tlast_hour: 24,\r\n\treadonly: false,\r\n\tdrag_resize: true,\r\n\tdrag_move: true,\r\n\tdrag_create: true,\r\n\tdrag_event_body: true,\r\n\tdblclick_create: true,\r\n\tdetails_on_dblclick: true,\r\n\tedit_on_create: true,\r\n\tdetails_on_create: true,\r\n\theader: null,\r\n\thour_size_px: 44,\r\n\tresize_month_events:false,\r\n\tresize_month_timed:false,\r\n\tresponsive_lightbox: false,\r\n\tseparate_short_events: true,\r\n\trtl:false,\r\n\r\n\tcascade_event_display: false,\r\n\tcascade_event_count: 4,\r\n\tcascade_event_margin: 30,\r\n\r\n\tmulti_day:true,\r\n\tmulti_day_height_limit: 200,\r\n\r\n\tdrag_lightbox: true,\r\n\tpreserve_scroll: true,\r\n\tselect: true,\r\n\tundo_deleted: true,\r\n\tserver_utc: false,\r\n\ttouch:true,\r\n\ttouch_tip:true,\r\n\ttouch_drag:500,\r\n\ttouch_swipe_dates: false,\r\n\tquick_info_detached:true,\r\n\r\n\tpositive_closing: false,\r\n\t//header_datepicker: true,\r\n\tdrag_highlight: true,\r\n\tlimit_drag_out: false,\r\n\ticons_edit: [\"icon_save\", \"icon_cancel\"],\r\n\ticons_select: [\"icon_details\", \"icon_edit\", \"icon_delete\"],\r\n\tbuttons_left: [\"dhx_save_btn\", \"dhx_cancel_btn\"],\r\n\tbuttons_right: [\"dhx_delete_btn\"],\r\n\tlightbox: {\r\n\t\tsections: [\r\n\t\t\t{name: \"description\", map_to: \"text\", type: \"textarea\", focus: true},\r\n\t\t\t{name: \"time\", height: 72, type: \"time\", map_to: \"auto\"}\r\n\t\t]\r\n\t},\r\n\thighlight_displayed_event: true,\r\n\tleft_border: false,\r\n\r\n\tajax_error: \"alert\",//\"ignore\"|\"console\"\r\n\tdelay_render: 0,\r\n\ttimeline_swap_resize: true,\r\n\twai_aria_attributes: true,\r\n\twai_aria_application_role: true,\r\n\r\n\tcsp: \"auto\",\r\n\tevent_attribute: \"data-event-id\",\r\n\tshow_errors: true\r\n};\r\n\r\nscheduler.config.buttons_left.$initial = scheduler.config.buttons_left.join();\r\nscheduler.config.buttons_right.$initial = scheduler.config.buttons_right.join();\r\n\r\nscheduler._helpers = {\r\n\tparseDate: function parseDate(date) {\r\n\t\tvar parse = scheduler.templates.xml_date || scheduler.templates.parse_date;\r\n\t\treturn parse(date);\r\n\t},\r\n\tformatDate: function formatDate(date) {\r\n\t\tvar format = scheduler.templates.xml_format || scheduler.templates.format_date;\r\n\t\treturn format(date);\r\n\t}\r\n};\r\n\r\nscheduler.templates={};\r\nscheduler.init_templates=function(){\r\n\r\n\r\n\r\n\tvar d=scheduler.date.date_to_str;\r\n\tvar c=scheduler.config;\r\n\tvar f = function(a,b){\r\n\t\tfor (var c in b)\r\n\t\t\tif (!a[c]) a[c]=b[c];\r\n\t};\r\n\tf(scheduler.templates,{\r\n\t\tday_date:d(c.default_date),\r\n\t\tmonth_date:d(c.month_date),\r\n\t\tweek_date:function(d1,d2){\r\n\t\t\tif(c.rtl) {\r\n\t\t\t\treturn scheduler.templates.day_date(scheduler.date.add(d2,-1,\"day\"))+\" – \"+scheduler.templates.day_date(d1);\r\n\t\t\t} \r\n\t\t\treturn scheduler.templates.day_date(d1)+\" – \"+scheduler.templates.day_date(scheduler.date.add(d2,-1,\"day\"));\r\n\t\t},\r\n\t\tday_scale_date:d(c.default_date),\r\n\t\ttime_slot_text: function(date){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\ttime_slot_class: function(date){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\r\n\t\tmonth_scale_date:d(c.week_date),\r\n\t\tweek_scale_date:d(c.day_date),\r\n\t\thour_scale:d(c.hour_date),\r\n\t\ttime_picker:d(c.hour_date),\r\n\t\tevent_date:d(c.hour_date),\r\n\t\tmonth_day:d(c.month_day),\r\n\r\n\t\tload_format: d(c.load_date),\r\n\t//\txml_date:scheduler.date.str_to_date(c.xml_date,c.server_utc),\r\n\t//\txml_format:d(c.date_format,c.server_utc),\r\n\t\tformat_date: d(c.date_format, c.server_utc),\r\n\t\tparse_date:scheduler.date.str_to_date(c.date_format,c.server_utc),\r\n\t\tapi_date:scheduler.date.str_to_date(c.api_date, false, false),\r\n\t\tevent_header:function(start,end,ev){\r\n\r\n\t\t\tif(ev._mode === \"small\" || ev._mode === \"smallest\"){\r\n\t\t\t\treturn scheduler.templates.event_date(start);\r\n\t\t\t}else{\r\n\t\t\t\treturn scheduler.templates.event_date(start)+\" - \"+scheduler.templates.event_date(end);\r\n\t\t\t}\r\n\t\t},\r\n\t\tevent_text:function(start,end,ev){\r\n\t\t\treturn ev.text;\r\n\t\t},\r\n\t\tevent_class:function(start,end,ev){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tmonth_date_class:function(d){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tweek_date_class:function(d){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tevent_bar_date:function(start,end,ev) {\r\n\t\t\treturn scheduler.templates.event_date(start);\r\n\t\t},\r\n\t\tevent_bar_text:function(start,end,ev){\r\n\t\t\treturn ev.text;\r\n\t\t},\r\n\t\tmonth_events_link : function(date, count){\r\n\t\t\treturn \"View more(\"+count+\" events)\";\r\n\t\t},\r\n\t\tdrag_marker_class : function(start, end, event){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tdrag_marker_content : function(start, end, event){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\t/* Could be redifined */\r\n\t\ttooltip_date_format: scheduler.date.date_to_str(\"%Y-%m-%d %H:%i\"),\r\n\t\ttooltip_text: function(start, end, event) {\r\n\t\t\treturn \"Event: \" + event.text + \"
Start date: \" + scheduler.templates.tooltip_date_format(start) + \"
End date: \" + scheduler.templates.tooltip_date_format(end);\r\n\t\t},\r\n\r\n\t\tcalendar_month: d(\"%F %Y\"),\r\n\t\tcalendar_scale_date: d(\"%D\"),\r\n\t\tcalendar_date: d(\"%d\"),\r\n\t\tcalendar_time: d(\"%d-%m-%Y\")\r\n\r\n\t});\r\n\tthis.callEvent(\"onTemplatesReady\",[]);\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler._events = {};\r\nscheduler.clearAll = function() {\r\n\tthis._events = {};\r\n\tthis._loaded = {};\r\n\r\n\tthis._edit_id = null;\r\n\tthis._select_id = null;\r\n\tthis._drag_id = null;\r\n\tthis._drag_mode = null;\r\n\tthis._drag_pos = null;\r\n\tthis._new_event = null;\r\n\r\n\tthis.clear_view();\r\n\tthis.callEvent(\"onClearAll\", []);\r\n};\r\nscheduler.addEvent = function(start_date, end_date, text, id, extra_data) {\r\n\tif (!arguments.length)\r\n\t\treturn this.addEventNow();\r\n\tvar ev = start_date;\r\n\tif (arguments.length != 1) {\r\n\t\tev = extra_data || {};\r\n\t\tev.start_date = start_date;\r\n\t\tev.end_date = end_date;\r\n\t\tev.text = text;\r\n\t\tev.id = id;\r\n\t}\r\n\tev.id = ev.id || scheduler.uid();\r\n\tev.text = ev.text || \"\";\r\n\r\n\tif (typeof ev.start_date == \"string\") ev.start_date = this.templates.api_date(ev.start_date);\r\n\tif (typeof ev.end_date == \"string\") ev.end_date = this.templates.api_date(ev.end_date);\r\n\tvar d = (this.config.event_duration || this.config.time_step) * 60000;\r\n\tif (ev.start_date.valueOf() == ev.end_date.valueOf())\r\n\t\tev.end_date.setTime(ev.end_date.valueOf() + d);\r\n\r\n\tev.start_date.setMilliseconds(0);\r\n\tev.end_date.setMilliseconds(0);\r\n\r\n\tev._timed = this.isOneDayEvent(ev);\r\n\r\n\tvar is_new = !this._events[ev.id];\r\n\tthis._events[ev.id] = ev;\r\n\tthis.event_updated(ev);\r\n\tif (!this._loading)\r\n\t\tthis.callEvent(is_new ? \"onEventAdded\" : \"onEventChanged\", [ev.id, ev]);\r\n\treturn ev.id;\r\n};\r\nscheduler.deleteEvent = function(id, silent) {\r\n\tvar ev = this._events[id];\r\n\tif (!silent && (!this.callEvent(\"onBeforeEventDelete\", [id, ev]) || !this.callEvent(\"onConfirmedBeforeEventDelete\", [id, ev])))\r\n\t\treturn;\r\n\tif (ev) {\r\n\t\tif(scheduler.getState().select_id == id){\r\n\t\t\tscheduler.unselect();\r\n\t\t}\r\n\t\tdelete this._events[id];\r\n\t\tthis.event_updated(ev);\r\n\r\n\t\tif(this._drag_id == ev.id){\r\n\t\t\tthis._drag_id = null;\r\n\t\t\tthis._drag_mode=null;\r\n\t\t\tthis._drag_pos=null;\r\n\t\t}\r\n\t}\r\n\r\n\tthis.callEvent(\"onEventDeleted\", [id, ev]);\r\n};\r\nscheduler.getEvent = function(id) {\r\n\treturn this._events[id];\r\n};\r\nscheduler.setEvent = function(id, hash) {\r\n\tif(!hash.id)\r\n\t\thash.id = id;\r\n\r\n\tthis._events[id] = hash;\r\n};\r\nscheduler.for_rendered = function(id, method) {\r\n\tfor (var i = this._rendered.length - 1; i >= 0; i--)\r\n\t\tif (this._rendered[i].getAttribute(this.config.event_attribute) == id)\r\n\t\t\tmethod(this._rendered[i], i);\r\n};\r\nscheduler.changeEventId = function(id, new_id) {\r\n\tif (id == new_id) return;\r\n\tvar ev = this._events[id];\r\n\tif (ev) {\r\n\t\tev.id = new_id;\r\n\t\tthis._events[new_id] = ev;\r\n\t\tdelete this._events[id];\r\n\t}\r\n\tthis.for_rendered(id, function(r) {\r\n\t\tr.setAttribute(\"event_id\", new_id); // for backward compatibility\r\n\t\tr.setAttribute(scheduler.config.event_attribute, new_id);\r\n\t});\r\n\tif (this._select_id == id) this._select_id = new_id;\r\n\tif (this._edit_id == id) this._edit_id = new_id;\r\n\t//if (this._drag_id==id) this._drag_id=new_id;\r\n\tthis.callEvent(\"onEventIdChange\", [id, new_id]);\r\n};\r\n\r\n(function() {\r\n\tvar attrs = [\"text\", \"Text\", \"start_date\", \"StartDate\", \"end_date\", \"EndDate\"];\r\n\tvar create_getter = function(name) {\r\n\t\treturn function(id) { return (scheduler.getEvent(id))[name]; };\r\n\t};\r\n\tvar create_setter = function(name) {\r\n\t\treturn function(id, value) {\r\n\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\tev[name] = value;\r\n\t\t\tev._changed = true;\r\n\t\t\tev._timed = this.isOneDayEvent(ev);\r\n\t\t\tscheduler.event_updated(ev, true);\r\n\t\t};\r\n\t};\r\n\tfor (var i = 0; i < attrs.length; i += 2) {\r\n\t\tscheduler[\"getEvent\" + attrs[i + 1]] = create_getter(attrs[i]);\r\n\t\tscheduler[\"setEvent\" + attrs[i + 1]] = create_setter(attrs[i]);\r\n\t}\r\n})();\r\n\r\nscheduler.event_updated = function(ev, force) {\r\n\tif (this.is_visible_events(ev))\r\n\t\tthis.render_view_data();\r\n\telse\r\n\t\tthis.clear_event(ev.id);\r\n};\r\nscheduler.is_visible_events = function(ev) {\r\n\tif(!this._min_date || !this._max_date){\r\n\t\treturn false;\r\n\t}\r\n\r\n\t//if in displayed dates\r\n\tvar in_visible_range = (ev.start_date.valueOf() < this._max_date.valueOf() && this._min_date.valueOf() < ev.end_date.valueOf());\r\n\r\n\tif(in_visible_range){\r\n\r\n\t\t//end dates are not between last/first hours\r\n\t\tvar evFirstHour = ev.start_date.getHours(),\r\n\t\t\tevLastHour = ev.end_date.getHours() + (ev.end_date.getMinutes()/60),\r\n\t\t\tlastHour = this.config.last_hour,\r\n\t\t\tfirstHour = this.config.first_hour;\r\n\r\n\t\tvar end_dates_visible = (this._table_view || !((evLastHour > lastHour || evLastHour <= firstHour) && (evFirstHour >= lastHour || evFirstHour < firstHour)));\r\n\r\n\t\tif(end_dates_visible){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\r\n\t\t\t//event is bigger than area hidden between last/first hours\r\n\t\t\tvar event_duration = (ev.end_date.valueOf() - ev.start_date.valueOf()) / (1000*60*60),//hours\r\n\t\t\t\thidden_duration = 24 - (this.config.last_hour - this.config.first_hour);\r\n\r\n\t\t\treturn !!((event_duration > hidden_duration) || (evFirstHour < lastHour && evLastHour > firstHour));\r\n\r\n\t\t}\r\n\t}else{\r\n\t\treturn false;\r\n\t}\r\n};\r\nscheduler.isOneDayEvent = function(ev) {\r\n\t// decrease by one ms so events that ends on midnight on the next day were still considered one day events\r\n\t// e.g. (09-02-2018 19:00 - 10-02-2018 00:00)\r\n\t// events >= 24h long are considered multiday\r\n\tvar checkEndDate = new Date(ev.end_date.valueOf() - 1);\r\n\treturn (\r\n\t\tev.start_date.getFullYear() === checkEndDate.getFullYear() &&\r\n\t\tev.start_date.getMonth() === checkEndDate.getMonth() &&\r\n\t\tev.start_date.getDate() === checkEndDate.getDate()\r\n\t) && ((ev.end_date.valueOf() - ev.start_date.valueOf()) < (1000 * 60 * 60 * 24));\r\n};\r\n\r\nscheduler.get_visible_events = function(only_timed) {\r\n\t//not the best strategy for sure\r\n\tvar stack = [];\r\n\r\n\tfor (var id in this._events)\r\n\t\tif (this.is_visible_events(this._events[id]))\r\n\t\t\tif (!only_timed || this._events[id]._timed)\r\n\t\t\t\tif (this.filter_event(id, this._events[id]))\r\n\t\t\t\t\tstack.push(this._events[id]);\r\n\r\n\treturn stack;\r\n};\r\nscheduler.filter_event = function(id, ev) {\r\n\tvar filter = this[\"filter_\" + this._mode];\r\n\treturn (filter) ? filter(id, ev) : true;\r\n};\r\nscheduler._is_main_area_event = function(ev){\r\n\treturn !!ev._timed;\r\n};\r\nscheduler.render_view_data = function(evs, hold) {\r\n\tvar full = false;\r\n\tif (!evs) {\r\n\t\tfull = true;\r\n\t\tif (this._not_render) {\r\n\t\t\tthis._render_wait = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._render_wait = false;\r\n\r\n\t\tthis.clear_view();\r\n\t\tevs = this.get_visible_events(!(this._table_view || this.config.multi_day));\r\n\t}\r\n\tfor(var i= 0, len = evs.length; i < len; i++){\r\n\t\tthis._recalculate_timed(evs[i]);\r\n\t}\r\n\r\n\tif (this.config.multi_day && !this._table_view) {\r\n\r\n\t\tvar tvs = [];\r\n\t\tvar tvd = [];\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tif (this._is_main_area_event(evs[i]))\r\n\t\t\t\ttvs.push(evs[i]);\r\n\t\t\telse\r\n\t\t\t\ttvd.push(evs[i]);\r\n\t\t}\r\n\r\n\t\tif(!this._els['dhx_multi_day']){\r\n\t\t\tvar message = scheduler._commonErrorMessages.unknownView(this._mode);\r\n\t\t\tthrow new Error(message);\r\n\t\t}\r\n\r\n\t\t// multiday events\r\n\t\tthis._rendered_location = this._els['dhx_multi_day'][0];\r\n\t\tthis._table_view = true;\r\n\t\tthis.render_data(tvd, hold);\r\n\t\tthis._table_view = false;\r\n\r\n\t\t// normal events\r\n\t\tthis._rendered_location = this._els['dhx_cal_data'][0];\r\n\t\tthis._table_view = false;\r\n\t\tthis.render_data(tvs, hold);\r\n\r\n\t} else {\r\n\t\tvar buffer = document.createDocumentFragment();\r\n\t\tvar renderedLocation = this._els['dhx_cal_data'][0];\r\n\t\tthis._rendered_location = buffer;\r\n\t\tthis.render_data(evs, hold);\r\n\t\trenderedLocation.appendChild(buffer);\r\n\t\tthis._rendered_location = renderedLocation;\r\n\r\n\t}\r\n\r\n\tif(full){\r\n\t\tthis.callEvent(\"onDataRender\", []);\r\n\t}\r\n};\r\n\r\n\r\nscheduler._view_month_day = function(e){\r\n\tvar date = scheduler.getActionData(e).date;\r\n\tif(!scheduler.callEvent(\"onViewMoreClick\", [date]))\r\n\t\treturn;\r\n\tscheduler.setCurrentView(date, \"day\");\r\n};\r\n\r\nscheduler._render_month_link = function(ev){\r\n\tvar parent = this._rendered_location;\r\n\tvar toRender = this._lame_clone(ev);\r\n\r\n\t//render links in each cell of multiday events\r\n\tfor(var d = ev._sday; d < ev._eday; d++){\r\n\r\n\t\ttoRender._sday = d;\r\n\t\ttoRender._eday = d+1;\r\n\r\n\t\tvar date = scheduler.date;\r\n\t\tvar curr = scheduler._min_date;\r\n\t\tcurr = date.add(curr, toRender._sweek, \"week\");\r\n\t\tcurr = date.add(curr, toRender._sday, \"day\");\r\n\t\tvar count = scheduler.getEvents(curr, date.add(curr, 1, \"day\")).length;\r\n\r\n\t\tvar pos = this._get_event_bar_pos(toRender);\r\n\t\tvar widt = (pos.x2 - pos.x);\r\n\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tscheduler.event(el, \"click\", function(e){scheduler._view_month_day(e);});\r\n\t\tel.className = \"dhx_month_link\";\r\n\t\tel.style.top = pos.y + \"px\";\r\n\t\tel.style.left = pos.x + \"px\";\r\n\t\tel.style.width = widt + \"px\";\r\n\t\tel.innerHTML = scheduler.templates.month_events_link(curr, count);\r\n\t\tthis._rendered.push(el);\r\n\r\n\t\tparent.appendChild(el);\r\n\t}\r\n};\r\n\r\nscheduler._recalculate_timed = function(id){\r\n\tif(!id) return;\r\n\tvar ev;\r\n\tif(typeof(id) != \"object\")\r\n\t\tev = this._events[id];\r\n\telse\r\n\t\tev = id;\r\n\tif(!ev) return;\r\n\tev._timed = scheduler.isOneDayEvent(ev);\r\n};\r\nscheduler.attachEvent(\"onEventChanged\", scheduler._recalculate_timed);\r\nscheduler.attachEvent(\"onEventAdded\", scheduler._recalculate_timed);\r\n\r\nscheduler.render_data = function(evs, hold) {\r\n\tevs = this._pre_render_events(evs, hold);\r\n\tvar containers = {};\r\n\tfor (var i = 0; i < evs.length; i++)\r\n\t\tif (this._table_view){\r\n\t\t\tif(scheduler._mode != 'month'){\r\n\t\t\t\tthis.render_event_bar(evs[i]);//may be multiday section on other views\r\n\t\t\t}else{\r\n\r\n\t\t\t\tvar max_evs = scheduler.config.max_month_events;\r\n\t\t\t\tif(max_evs !== max_evs*1 || evs[i]._sorder < max_evs){\r\n\t\t\t\t\t//of max number events per month cell is set and event can be rendered\r\n\t\t\t\t\tthis.render_event_bar(evs[i]);\r\n\t\t\t\t}else if(max_evs !== undefined && evs[i]._sorder == max_evs){\r\n\t\t\t\t\t//render 'view more' links\r\n\t\t\t\t\tscheduler._render_month_link(evs[i]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//do not render events with ordinal number > maximum events per cell\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t}else{\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tvar parent = scheduler.locate_holder(ev._sday);\r\n\t\t\tif (!parent) continue; //attempt to render non-visible event\r\n\r\n\t\t\tif(!containers[ev._sday]){\r\n\t\t\t\tcontainers[ev._sday] = {\r\n\t\t\t\t\treal: parent,\r\n\t\t\t\t\tbuffer: document.createDocumentFragment(),\r\n\t\t\t\t\twidth: parent.clientWidth\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\tvar container = containers[ev._sday];\r\n\t\t\tthis.render_event(ev, container.buffer, container.width);\r\n\t\t}\r\n\r\n\t\tfor(var i in containers){\r\n\t\t\tvar container = containers[i];\r\n\t\t\tif(container.real && container.buffer){\r\n\t\t\t\tcontainer.real.appendChild(container.buffer);\r\n\t\t\t}\r\n\t\t}\r\n};\r\n\r\nscheduler._get_first_visible_cell = function(cells) {\r\n\tfor (var i = 0; i < cells.length; i++) {\r\n\t\tif ((cells[i].className || \"\").indexOf(\"dhx_scale_ignore\") == -1) {\r\n\t\t\treturn cells[i];\r\n\t\t}\r\n\t}\r\n\t// if no visible cell found, return cells[0] to be more tolerant, since it's the original logic\r\n\treturn cells[0];\r\n};\r\n\r\nscheduler._pre_render_events = function(evs, hold) {\r\n\tvar hb = this.xy.bar_height;\r\n\tvar h_old = this._colsS.heights;\r\n\tvar h = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0];\r\n\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\r\n\tif (!this._table_view) {\r\n\t\tevs = this._pre_render_events_line(evs, hold); //ignore long events for now\r\n\t}\r\n\telse {\r\n\t\tevs = this._pre_render_events_table(evs, hold);\r\n\t}\r\n\tif (this._table_view) {\r\n\t\tif (hold)\r\n\t\t\tthis._colsS.heights = h_old;\r\n\t\telse {\r\n\t\t\tvar monthRows = data.querySelectorAll(\".dhx_cal_month_row\");\r\n\t\t\tif (monthRows.length) {\r\n\t\t\t\tfor (var i = 0; i < monthRows.length; i++) {\r\n\t\t\t\t\th[i]++;\r\n\t\t\t\t\tvar cells = monthRows[i].querySelectorAll(\".dhx_cal_month_cell\");\r\n\t\t\t\t\tvar cellHeight = this._colsS.height - this.xy.month_head_height;\r\n\t\t\t\t\tif ((h[i]) * hb > cellHeight) { // 22 - height of cell's header\r\n\t\t\t\t\t\t//we have overflow, update heights\r\n\r\n\t\t\t\t\t\tvar cHeight = cellHeight;\r\n\t\t\t\t\t\tif(this.config.max_month_events*1 !== this.config.max_month_events || h[i] <= this.config.max_month_events){\r\n\t\t\t\t\t\t\tcHeight = h[i] * hb;\r\n\t\t\t\t\t\t}else if( (this.config.max_month_events + 1) * hb > cellHeight){\r\n\t\t\t\t\t\t\tcHeight = (this.config.max_month_events + 1) * hb;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tmonthRows[i].style.height = (cHeight + this.xy.month_head_height) + \"px\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\th[i] = (h[i - 1] || 0) + scheduler._get_first_visible_cell(cells).offsetHeight;\r\n\t\t\t\t}\r\n\t\t\t\th.unshift(0);\r\n\t\t\t\tconst dataArea = this.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tif (dataArea.offsetHeight < dataArea.scrollHeight && !scheduler._colsS.scroll_fix && scheduler.xy.scroll_width) {\r\n\r\n\t\t\t\t\tvar scale_settings = scheduler._colsS,\r\n\t\t\t\t\t\tsum_width = scale_settings[scale_settings.col_length],\r\n\t\t\t\t\t\trow_heights = scale_settings.heights.slice();\r\n\r\n\t\t\t\t\tsum_width -= (scheduler.xy.scroll_width || 0);\r\n\t\t\t\t\tthis._calc_scale_sizes(sum_width, this._min_date, this._max_date);\r\n\t\t\t\t\tscheduler._colsS.heights = row_heights;\r\n\r\n\t\t\t\t\tthis.set_xy(this._els[\"dhx_cal_header\"][0], sum_width/*, this.xy.scale_height*/);\r\n\t\t\t\t\tscheduler._render_scales(this._els[\"dhx_cal_header\"][0]);\r\n\t\t\t\t\tscheduler._render_month_scale(this._els[\"dhx_cal_data\"][0], this._get_timeunit_start(), this._min_date);\r\n\r\n\t\t\t\t\tscale_settings.scroll_fix = true;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (!evs.length && this._els[\"dhx_multi_day\"][0].style.visibility == \"visible\")\r\n\t\t\t\t\th[0] = -1;\r\n\t\t\t\tif (evs.length || h[0] == -1) {\r\n\t\t\t\t\t//shift days to have space for multiday events\r\n\t\t\t\t\t//var childs = evl.parentNode.childNodes;\r\n\r\n\t\t\t\t\t// +1 so multiday events would have 2px from top and 2px from bottom by default\r\n\t\t\t\t\tvar full_multi_day_height = (h[0] + 1) * hb + 4;\r\n\r\n\t\t\t\t\tvar used_multi_day_height = full_multi_day_height;\r\n\t\t\t\t\tvar used_multi_day_height_css = full_multi_day_height + \"px\";\r\n\t\t\t\t\tif (this.config.multi_day_height_limit) {\r\n\t\t\t\t\t\tused_multi_day_height = Math.min(full_multi_day_height, this.config.multi_day_height_limit) ;\r\n\t\t\t\t\t\tused_multi_day_height_css = used_multi_day_height + \"px\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar multi_day_section = this._els[\"dhx_multi_day\"][0];\r\n\t\t\t\t\tmulti_day_section.style.height = used_multi_day_height_css;\r\n\t\t\t\t\tmulti_day_section.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\tmulti_day_section.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\r\n\t\t\t\t\t// icon\r\n\t\t\t\t\tvar multi_day_icon = this._els[\"dhx_multi_day\"][1];\r\n\t\t\t\t\tmulti_day_icon.style.height = used_multi_day_height_css;\r\n\t\t\t\t\tmulti_day_icon.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\tmulti_day_icon.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\t\t\t\t\tmulti_day_icon.className = h[0] ? \"dhx_multi_day_icon\" : \"dhx_multi_day_icon_small\";\r\n\t\t\t\t\tthis._dy_shift = (h[0] + 1) * hb;\r\n\t\t\t\t\tif(this.config.multi_day_height_limit){\r\n\t\t\t\t\t\tthis._dy_shift = Math.min(this.config.multi_day_height_limit, this._dy_shift);\r\n\t\t\t\t\t}\r\n\t\t\t\t\th[0] = 0;\r\n\r\n\t\t\t\t\tif (used_multi_day_height != full_multi_day_height) {\r\n\r\n\t\t\t\t\t\tmulti_day_section.style.overflowY = \"auto\";\r\n\t\t\t\t\t//\tmulti_day_section.style.width = (parseInt(this._els[\"dhx_cal_navline\"][0].style.width)) + \"px\";\r\n\r\n\t\t\t\t\t\tmulti_day_icon.style.position = \"fixed\";\r\n\t\t\t\t\t\tmulti_day_icon.style.top = \"\";\r\n\t\t\t\t\t\tmulti_day_icon.style.left = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn evs;\r\n};\r\nscheduler._get_event_sday = function(ev) {\r\n\t// get day in current view\r\n\t// use rounding for 23 or 25 hour days on DST\r\n\tvar datePart = this.date.day_start(new Date(ev.start_date));\r\n\treturn Math.round((datePart.valueOf() - this._min_date.valueOf()) / (24 * 60 * 60 * 1000));\r\n};\r\nscheduler._get_event_mapped_end_date = function(ev) {\r\n\tvar end_date = ev.end_date;\r\n\tif (this.config.separate_short_events) {\r\n\t\tvar ev_duration = (ev.end_date - ev.start_date) / 60000; // minutes\r\n\t\tif (ev_duration < this._min_mapped_duration) {\r\n\t\t\tend_date = this.date.add(end_date, this._min_mapped_duration - ev_duration, \"minute\");\r\n\t\t}\r\n\t}\r\n\treturn end_date;\r\n};\r\nscheduler._pre_render_events_line = function(evs, hold){\r\n\tevs.sort(function(a, b) {\r\n\t\tif (a.start_date.valueOf() == b.start_date.valueOf())\r\n\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\treturn a.start_date > b.start_date ? 1 : -1;\r\n\t});\r\n\tvar days = []; //events by weeks\r\n\tvar evs_originals = [];\r\n\r\n\tthis._min_mapped_duration = Math.floor(this.xy.min_event_height * 60 / this.config.hour_size_px); // values could change along the way\r\n\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tvar ev = evs[i];\r\n\r\n\t\t//check date overflow\r\n\t\tvar sd = ev.start_date;\r\n\t\tvar ed = ev.end_date;\r\n\t\t//check scale overflow\r\n\t\tvar sh = sd.getHours();\r\n\t\tvar eh = ed.getHours();\r\n\t\tev._sday = this._get_event_sday(ev); // sday based on event start_date\r\n\t\tif (this._ignores[ev._sday]){\r\n\t\t\t//ignore event\r\n\t\t\tevs.splice(i,1);\r\n\t\t\ti--;\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tif (!days[ev._sday]) days[ev._sday] = [];\r\n\r\n\t\tif (!hold) {\r\n\t\t\tev._inner = false;\r\n\r\n\t\t\tvar stack = days[ev._sday];\r\n\r\n\t\t\twhile (stack.length) {\r\n\t\t\t\tvar t_ev = stack[stack.length - 1];\r\n\t\t\t\tvar t_end_date = this._get_event_mapped_end_date(t_ev);\r\n\t\t\t\tif (t_end_date.valueOf() <= ev.start_date.valueOf()) {\r\n\t\t\t\t\tstack.splice(stack.length - 1, 1);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar slot_index = stack.length;\r\n\t\t\tvar sorderSet = false;\r\n\t\t\tfor (var j = 0; j < stack.length; j++) {\r\n\t\t\t\tvar t_ev = stack[j];\r\n\t\t\t\tvar t_end_date = this._get_event_mapped_end_date(t_ev);\r\n\t\t\t\tif (t_end_date.valueOf() <= ev.start_date.valueOf()) {\r\n\t\t\t\t\tsorderSet = true;\r\n\t\t\t\t\tev._sorder = t_ev._sorder;\r\n\t\t\t\t\tslot_index = j;\r\n\t\t\t\t\tev._inner = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (stack.length)\r\n\t\t\t\tstack[stack.length - 1]._inner = true;\r\n\r\n\t\t\tif (!sorderSet) {\r\n\t\t\t\tif (stack.length) {\r\n\t\t\t\t\tif (stack.length <= stack[stack.length - 1]._sorder) {\r\n\t\t\t\t\t\tif (!stack[stack.length - 1]._sorder)\r\n\t\t\t\t\t\t\tev._sorder = 0;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tfor (j = 0; j < stack.length; j++) {\r\n\t\t\t\t\t\t\t\tvar _is_sorder = false;\r\n\t\t\t\t\t\t\t\tfor (var k = 0; k < stack.length; k++) {\r\n\t\t\t\t\t\t\t\t\tif (stack[k]._sorder == j) {\r\n\t\t\t\t\t\t\t\t\t\t_is_sorder = true;\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (!_is_sorder) {\r\n\t\t\t\t\t\t\t\t\tev._sorder = j;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\tev._inner = true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvar _max_sorder = stack[0]._sorder;\r\n\t\t\t\t\t\tfor (j = 1; j < stack.length; j++) {\r\n\t\t\t\t\t\t\tif (stack[j]._sorder > _max_sorder)\r\n\t\t\t\t\t\t\t\t_max_sorder = stack[j]._sorder;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tev._sorder = _max_sorder + 1;\r\n\t\t\t\t\t\tev._inner = false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else\r\n\t\t\t\t\tev._sorder = 0;\r\n\t\t\t}\r\n\r\n\t\t\tstack.splice(slot_index, slot_index == stack.length ? 0 : 1, ev);\r\n\r\n\t\t\tif (stack.length > (stack.max_count || 0)) {\r\n\t\t\t\tstack.max_count = stack.length;\r\n\t\t\t\tev._count = stack.length;\r\n\t\t\t} else {\r\n\t\t\t\tev._count = (ev._count) ? ev._count : 1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (sh < this.config.first_hour || eh >= this.config.last_hour) {\r\n\t\t\t// Need to create copy of event as we will be changing it's start/end date\r\n\t\t\t// e.g. first_hour = 11 and event.start_date hours = 9. Need to preserve that info\r\n\t\t\tevs_originals.push(ev);\r\n\t\t\tevs[i] = ev = this._copy_event(ev);\r\n\r\n\t\t\tif (sh < this.config.first_hour) {\r\n\t\t\t\tev.start_date.setHours(this.config.first_hour);\r\n\t\t\t\tev.start_date.setMinutes(0);\r\n\t\t\t}\r\n\t\t\tif (eh >= this.config.last_hour) {\r\n\t\t\t\tev.end_date.setMinutes(0);\r\n\t\t\t\tev.end_date.setHours(this.config.last_hour);\r\n\t\t\t}\r\n\r\n\t\t\tif (ev.start_date > ev.end_date || sh == this.config.last_hour) {\r\n\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (!hold) {\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tevs[i]._count = days[evs[i]._sday].max_count;\r\n\t\t}\r\n\t\tfor (var i = 0; i < evs_originals.length; i++)\r\n\t\t\tevs_originals[i]._count = days[evs_originals[i]._sday].max_count;\r\n\t}\r\n\r\n\treturn evs;\r\n};\r\nscheduler._time_order = function(evs) {\r\n\tevs.sort(function(a, b) {\r\n\t\tif (a.start_date.valueOf() == b.start_date.valueOf()) {\r\n\t\t\tif (a._timed && !b._timed) return 1;\r\n\t\t\tif (!a._timed && b._timed) return -1;\r\n\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\t}\r\n\t\treturn a.start_date > b.start_date ? 1 : -1;\r\n\t});\r\n};\r\n\r\nscheduler._is_any_multiday_cell_visible = function(from, to, event){\r\n\tvar cols = this._cols.length;\r\n\tvar isAnyCellVisible = false;\r\n\tvar checkDate = from;\r\n\tvar noCells = true;\r\n\tvar lastDayEnd = new Date(to);\r\n\tif(scheduler.date.day_start(new Date(to)).valueOf() != to.valueOf()){\r\n\t\tlastDayEnd = scheduler.date.day_start(lastDayEnd);\r\n\t\tlastDayEnd = scheduler.date.add(lastDayEnd, 1, \"day\");\r\n\t}\r\n\twhile(checkDate < lastDayEnd){\r\n\t\tnoCells = false;\r\n\t\tvar cellIndex = this.locate_holder_day(checkDate, false, event);\r\n\t\tvar weekCellIndex = cellIndex % cols;\r\n\t\tif(!this._ignores[weekCellIndex]){\r\n\t\t\tisAnyCellVisible = true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcheckDate = scheduler.date.add(checkDate, 1, \"day\");\r\n\t}\r\n\treturn noCells || isAnyCellVisible;\r\n};\r\n\r\nscheduler._pre_render_events_table = function(evs, hold) { // max - max height of week slot\r\n\tthis._time_order(evs);\r\n\tvar out = [];\r\n\tvar weeks = [\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[]\r\n\t]; //events by weeks\r\n\tvar max = this._colsS.heights;\r\n\tvar start_date;\r\n\tvar cols = this._cols.length;\r\n\tvar chunks_info = {};\r\n\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tvar ev = evs[i];\r\n\t\tvar id = ev.id;\r\n\t\tif (!chunks_info[id]) {\r\n\t\t\tchunks_info[id] = {\r\n\t\t\t\tfirst_chunk: true,\r\n\t\t\t\tlast_chunk: true\r\n\t\t\t};\r\n\t\t}\r\n\t\tvar chunk_info = chunks_info[id];\r\n\t\tvar sd = (start_date || ev.start_date);\r\n\t\tvar ed = ev.end_date;\r\n\t\t//trim events which are crossing through current view\r\n\t\tif (sd < this._min_date) {\r\n\t\t\tchunk_info.first_chunk = false;\r\n\t\t\tsd = this._min_date;\r\n\t\t}\r\n\t\tif (ed > this._max_date) {\r\n\t\t\tchunk_info.last_chunk = false;\r\n\t\t\ted = this._max_date;\r\n\t\t}\r\n\r\n\t\tvar locate_s = this.locate_holder_day(sd, false, ev);\r\n\t\tev._sday = locate_s % cols;\r\n\t\t//skip single day events for ignored dates\r\n\t\tif (this._ignores[ev._sday] && ev._timed) continue;\r\n\r\n\t\tvar locate_e = this.locate_holder_day(ed, true, ev) || cols;\r\n\t\tev._eday = (locate_e % cols) || cols; //cols used to fill full week, when event end on monday\r\n\t\tev._length = locate_e - locate_s;\r\n\t\t//3600000 - compensate 1 hour during winter|summer time shift\r\n\t\tev._sweek = Math.floor((this._correct_shift(sd.valueOf(), 1) - this._min_date.valueOf()) / (60 * 60 * 1000 * 24 * cols));\r\n\r\n\t\tvar isAnyCellVisible = scheduler._is_any_multiday_cell_visible(sd, ed, ev);\r\n\r\n\t\tif(!isAnyCellVisible){\r\n\t\t\tstart_date = null;\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\t//current slot\r\n\t\tvar stack = weeks[ev._sweek];\r\n\t\t//check order position\r\n\t\tvar stack_line;\r\n\r\n\t\tfor (stack_line = 0; stack_line < stack.length; stack_line++)\r\n\t\t\tif (stack[stack_line]._eday <= ev._sday)\r\n\t\t\t\tbreak;\r\n\r\n\t\tif (!ev._sorder || !hold) {\r\n\t\t\tev._sorder = stack_line;\r\n\t\t}\r\n\r\n\t\tif (ev._sday + ev._length <= cols) {\r\n\t\t\tstart_date = null;\r\n\t\t\tout.push(ev);\r\n\t\t\tstack[stack_line] = ev;\r\n\t\t\t//get max height of slot\r\n\t\t\tmax[ev._sweek] = stack.length - 1;\r\n\t\t\tev._first_chunk = chunk_info.first_chunk;\r\n\t\t\tev._last_chunk = chunk_info.last_chunk;\r\n\t\t} else { // split long event in chunks\r\n\t\t\tvar copy = this._copy_event(ev);\r\n\t\t\tcopy.id = ev.id;\r\n\t\t\tcopy._length = cols - ev._sday;\r\n\t\t\tcopy._eday = cols;\r\n\t\t\tcopy._sday = ev._sday;\r\n\t\t\tcopy._sweek = ev._sweek;\r\n\t\t\tcopy._sorder = ev._sorder;\r\n\t\t\tcopy.end_date = this.date.add(sd, copy._length, \"day\");\r\n\t\t\tcopy._first_chunk = chunk_info.first_chunk;\r\n\t\t\tif (chunk_info.first_chunk) {\r\n\t\t\t\tchunk_info.first_chunk = false;\r\n\t\t\t}\r\n\r\n\t\t\tout.push(copy);\r\n\t\t\tstack[stack_line] = copy;\r\n\t\t\tstart_date = copy.end_date;\r\n\t\t\t//get max height of slot\r\n\t\t\tmax[ev._sweek] = stack.length - 1;\r\n\t\t\ti--;\r\n\t\t\tcontinue; //repeat same step\r\n\t\t}\r\n\t}\r\n\treturn out;\r\n};\r\nscheduler._copy_dummy = function() {\r\n\tvar a = new Date(this.start_date);\r\n\tvar b = new Date(this.end_date);\r\n\tthis.start_date = a;\r\n\tthis.end_date = b;\r\n};\r\nscheduler._copy_event = function(ev) {\r\n\tthis._copy_dummy.prototype = ev;\r\n\treturn new this._copy_dummy();\r\n\t//return {start_date:ev.start_date, end_date:ev.end_date, text:ev.text, id:ev.id}\r\n};\r\nscheduler._rendered = [];\r\nscheduler.clear_view = function() {\r\n\tfor (var i = 0; i < this._rendered.length; i++) {\r\n\t\tvar obj = this._rendered[i];\r\n\t\tif (obj.parentNode) obj.parentNode.removeChild(obj);\r\n\t}\r\n\tthis._rendered = [];\r\n};\r\nscheduler.updateEvent = function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tthis.clear_event(id);\r\n\r\n\tif (ev && this.is_visible_events(ev) && this.filter_event(id, ev) && (this._table_view || this.config.multi_day || ev._timed)) {\r\n\t\tif (this.config.update_render){\r\n\t\t\tthis.render_view_data();\r\n\t\t}else{\r\n\t\t\tif(this.getState().mode == \"month\" && !this.getState().drag_id && !this.isOneDayEvent(ev)){\r\n\t\t\t\tthis.render_view_data();\r\n\t\t\t}else{\r\n\t\t\t\tthis.render_view_data([ev], true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.clear_event = function(id) {\r\n\tthis.for_rendered(id, function(node, i) {\r\n\t\tif (node.parentNode)\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\tscheduler._rendered.splice(i, 1);\r\n\t});\r\n};\r\nscheduler._y_from_date = function(date){\r\n\tvar sm = date.getHours() * 60 + date.getMinutes();\r\n\treturn ((Math.round((sm * 60 * 1000 - this.config.first_hour * 60 * 60 * 1000) * this.config.hour_size_px / (60 * 60 * 1000))) % (this.config.hour_size_px * 24)); //42px/hour\r\n};\r\nscheduler._calc_event_y = function(ev, min_height){\r\n\tmin_height = min_height || 0;\r\n\tvar sm = ev.start_date.getHours() * 60 + ev.start_date.getMinutes();\r\n\tvar em = (ev.end_date.getHours() * 60 + ev.end_date.getMinutes()) || (scheduler.config.last_hour * 60);\r\n\tvar top = this._y_from_date(ev.start_date);\r\n\r\n\tvar height = Math.max(min_height, (em - sm) * this.config.hour_size_px / 60); //42px/hour\r\n\treturn {\r\n\t\ttop: top,\r\n\t\theight: height\r\n\t};\r\n};\r\nscheduler.render_event = function(ev, buffer, parentWidth) {\r\n\tvar menu = scheduler.xy.menu_width;\r\n\tvar menu_offset = (this.config.use_select_menu_space) ? 0 : menu;\r\n\tif (ev._sday < 0) return; //can occur in case of recurring event during time shift\r\n\r\n\tvar parent = scheduler.locate_holder(ev._sday);\r\n\tif (!parent) return; //attempt to render non-visible event\r\n\r\n\tbuffer = buffer || parent;\r\n\r\n\tvar pos_y = this._calc_event_y(ev, scheduler.xy.min_event_height);\r\n\tvar top = pos_y.top,\r\n\t\theight = pos_y.height;\r\n\r\n\tvar ev_count = ev._count || 1;\r\n\tvar ev_sorder = ev._sorder || 0;\r\n\r\n\tparentWidth = parentWidth || parent.clientWidth;\r\n\tif(this.config.day_column_padding){\r\n\t\tparentWidth -= this.config.day_column_padding;\r\n\t}\r\n\r\n\tvar width = Math.floor((parentWidth - menu_offset) / ev_count);\r\n\tvar left = ev_sorder * width + 1;\r\n\tif (!ev._inner) width = width * (ev_count - ev_sorder);\r\n\tif (this.config.cascade_event_display) {\r\n\t\tvar limit = this.config.cascade_event_count;\r\n\t\tvar margin = this.config.cascade_event_margin;\r\n\t\tleft = ev_sorder % limit * margin;\r\n\t\tvar right = (ev._inner) ? (ev_count - ev_sorder - 1) % limit * margin / 2 : 0;\r\n\t\twidth = Math.floor(parentWidth - menu_offset - left - right);\r\n\t}\r\n\r\n\tif(height < 30){\r\n\t\tev._mode = \"smallest\";\r\n\t}else if(height < 42){\r\n\t\tev._mode = \"small\";\r\n\t}else{\r\n\t\tev._mode = null;\r\n\t}\r\n\r\n\tvar d = this._render_v_bar(ev, menu_offset + left, top, width, height, ev._text_style, scheduler.templates.event_header(ev.start_date, ev.end_date, ev), scheduler.templates.event_text(ev.start_date, ev.end_date, ev));\r\n\t\r\n\tif(ev._mode === \"smallest\"){\r\n\t\td.classList.add(\"dhx_cal_event--xsmall\");\r\n\t}else if (ev._mode === \"small\"){\r\n\t\td.classList.add(\"dhx_cal_event--small\");\r\n\t}\r\n\r\n\tthis._waiAria.eventAttr(ev, d);\r\n\tthis._rendered.push(d);\r\n\tbuffer.appendChild(d);\r\n\r\n\tvar parentPosition = parseInt( this.config.rtl ? parent.style.right : parent.style.left, 10);\r\n\r\n\tleft = left + parentPosition + menu_offset;\r\n\r\n\tif (this._edit_id == ev.id) {\r\n\r\n\t\td.style.zIndex = 1; //fix overlapping issue\r\n\t\twidth = Math.max(width, scheduler.xy.editor_width);\r\n\t\td = document.createElement(\"div\");\r\n\t\td.setAttribute(\"event_id\", ev.id); // for backward compatibility\r\n\t\td.setAttribute(this.config.event_attribute, ev.id);\r\n\r\n\t\tthis._waiAria.eventAttr(ev, d);\r\n\r\n\t\td.className = \"dhx_cal_event dhx_cal_editor\";\r\n\t\tif (this.config.rtl) left++;\r\n\t\tthis.set_xy(d, width, height, left, top);\r\n\r\n\r\n\t\tif(ev.color){\r\n\t\t\td.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tvar tplClass = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\r\n\t\tif(tplClass){\r\n\t\t\td.className += \" \" + tplClass;\r\n\t\t}\r\n\t\tvar d2 = document.createElement(\"div\");\r\n\t\td2.style.cssText += \"overflow:hidden;height:100%\";\r\n\r\n\t\td.appendChild(d2);\r\n\t\tthis._els[\"dhx_cal_data\"][0].appendChild(d);\r\n\t\tthis._rendered.push(d);\r\n\r\n\t\td2.innerHTML = \"\";\r\n\t\tthis._editor = d2.querySelector(\"textarea\");\r\n\t\t\r\n\t\tscheduler.event(this._editor, \"keydown\", function(e) {\r\n\t\t\tif (e.shiftKey) return true;\r\n\t\t\tvar code = e.keyCode;\r\n\t\t\tif (code == scheduler.keys.edit_save) scheduler.editStop(true);\r\n\t\t\tif (code == scheduler.keys.edit_cancel) scheduler.editStop(false);\r\n\r\n\t\t\tif(code == scheduler.keys.edit_save || code == scheduler.keys.edit_cancel){\r\n\t\t\t\tif(e.preventDefault) e.preventDefault();\r\n\t\t\t}\r\n\t\t});\r\n\t\tscheduler.event(this._editor, \"selectstart\", function (e) {\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn true;\r\n\t\t});\r\n\t\tscheduler._focus(this._editor, true);\r\n\t\t//IE and opera can add x-scroll during focusing\r\n\t\tthis._els[\"dhx_cal_data\"][0].scrollLeft = 0;\r\n\t}\r\n\tif (this.xy.menu_width !== 0 && this._select_id == ev.id) {\r\n\r\n\t\tif (this.config.cascade_event_display && this._drag_mode)\r\n\t\t\td.style.zIndex = 1; //fix overlapping issue for cascade view in case of dnd of selected event\r\n\t\tvar icons = this.config[\"icons_\" + ((this._edit_id == ev.id) ? \"edit\" : \"select\")];\r\n\t\tvar icons_str = \"\";\r\n\r\n\t\tvar ariaAttr;\r\n\r\n\t\tfor (var i = 0; i < icons.length; i++) {\r\n\t\t\tconst currentIcon = icons[i];\r\n\t\t\tariaAttr = this._waiAria.eventMenuAttrString(currentIcon);\r\n\t\t\ticons_str += `
`;\r\n\t\t}\r\n\t\tvar obj = this._render_v_bar(ev, left - menu - 1, top, menu, null, \"\", \"
\", icons_str, true);\r\n\r\n\t\tif(ev.color){\r\n\t\t\tobj.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tobj.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\t//obj.style.left = left - menu + 1;\r\n\t\tthis._els[\"dhx_cal_data\"][0].appendChild(obj);\r\n\t\tthis._rendered.push(obj);\r\n\t}\r\n\tif(this.config.drag_highlight && this._drag_id == ev.id){\r\n\t\tthis.highlightEventPosition(ev);\r\n\t}\r\n};\r\nscheduler._render_v_bar = function (ev, x, y, w, h, style, contentA, contentB, bottom) {\r\n\tvar d = document.createElement(\"div\");\r\n\tvar id = ev.id;\r\n\tvar cs = (bottom) ? \"dhx_cal_event dhx_cal_select_menu\" : \"dhx_cal_event\";\r\n\r\n\tvar state = scheduler.getState();\r\n\tif(state.drag_id == ev.id){\r\n\t\tcs += \" dhx_cal_event_drag\";\r\n\t}\r\n\r\n\tif(state.select_id == ev.id){\r\n\t\tcs += \" dhx_cal_event_selected\";\r\n\t}\r\n\r\n\tvar cse = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\tif (cse) cs = cs + \" \" + cse;\r\n\r\n\tif(this.config.cascade_event_display) {\r\n\t\tcs += \" dhx_cal_event_cascade\";\r\n\t}\r\n\r\n\tvar boxWidth = w - 1;\r\n\tvar html = `
\r\n\t\t\t\t
`;\r\n\r\n\td.innerHTML = html;\r\n\r\n\tvar container = d.cloneNode(true).firstChild;\r\n\r\n\tif (!bottom && scheduler.renderEvent(container, ev, w, h, contentA, contentB)) {\r\n\t\tif(ev.color){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\treturn container;\r\n\t} else {\r\n\t\tcontainer = d.firstChild;\r\n\t\tif(ev.color){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\tvar inner_html = '
 
';\r\n\t\tinner_html += '
' + contentA + '
';\r\n\t\tinner_html += '
' + contentB + '
'; // +2 css specific, moved from render_event\r\n\r\n\t\tvar footer_class = \"dhx_event_resize dhx_footer\";\r\n\t\tif (bottom || ev._drag_resize === false)\r\n\t\t\tfooter_class = \"dhx_resize_denied \" + footer_class;\r\n\r\n\t\tinner_html += '
';\r\n\r\n\t\tcontainer.innerHTML = inner_html;\r\n\t}\r\n\r\n\treturn container;\r\n};\r\nscheduler.renderEvent = function(){\r\n\treturn false;\r\n};\r\nscheduler.locate_holder = function(day) {\r\n\tif (this._mode == \"day\") return this._els[\"dhx_cal_data\"][0].firstChild; //dirty\r\n\treturn this._els[\"dhx_cal_data\"][0].childNodes[day];\r\n};\r\nscheduler.locate_holder_day = function(date, past) {\r\n\tvar day = Math.floor((this._correct_shift(date, 1) - this._min_date) / (60 * 60 * 24 * 1000));\r\n\t//when locating end data of event , we need to use next day if time part was defined\r\n\tif (past && this.date.time_part(date)) day++;\r\n\treturn day;\r\n};\r\n\r\n\r\n\r\nscheduler._get_dnd_order = function(order, ev_height, max_height){\r\n\tif(!this._drag_event)\r\n\t\treturn order;\r\n\tif(!this._drag_event._orig_sorder)\r\n\t\tthis._drag_event._orig_sorder = order;\r\n\telse\r\n\t\torder = this._drag_event._orig_sorder;\r\n\r\n\tvar evTop = ev_height * order;\r\n\twhile((evTop + ev_height) > max_height){\r\n\t\torder--;\r\n\t\tevTop -= ev_height;\r\n\t}\r\n\torder = Math.max(order, 0);\r\n\treturn order;\r\n};\r\n//scheduler._get_event_bar_pos = function(sday, eday, week, drag){\r\nscheduler._get_event_bar_pos = function(ev){\r\n\tvar rtl = this.config.rtl;\r\n\tvar columns = this._colsS;\r\n\tvar x = columns[ev._sday];\r\n\tvar x2 = columns[ev._eday];\r\n\tif (rtl) {\r\n\t\tx = columns[columns.col_length] - columns[ev._eday] + columns[0];\r\n\t\tx2 = columns[columns.col_length] - columns[ev._sday] + columns[0];\r\n\t}\r\n\r\n\tif (x2 == x) x2 = columns[ev._eday + 1];\r\n\tvar hb = this.xy.bar_height;\r\n\r\n\tvar order = ev._sorder;\r\n\tif(ev.id == this._drag_id){\r\n\t\tvar cellHeight = columns.heights[ev._sweek + 1] - columns.heights[ev._sweek]- this.xy.month_head_height;//22 for month head height\r\n\t\torder = scheduler._get_dnd_order(order, hb, cellHeight);\r\n\t}\r\n\tvar y_event_offset = order * hb;\r\n\tvar y = columns.heights[ev._sweek] + (columns.height ? (this.xy.month_scale_height + 2) : 2 ) + y_event_offset;\r\n\treturn {x:x, x2:x2, y:y};\r\n};\r\n\r\nscheduler.render_event_bar = function (ev) {\r\n\tvar parent = this._rendered_location;\r\n\tvar pos = this._get_event_bar_pos(ev);\r\n\tvar y = pos.y;\r\n\tvar x = pos.x;\r\n\tvar x2 = pos.x2;\r\n\t// resize for month mutliday events\r\n\tvar resize_handle = \"\";\r\n\r\n\t//events in ignored dates\r\n\r\n\tif (!x2) return;\r\n\r\n\tvar resizable = scheduler.config.resize_month_events && this._mode == \"month\" &&\r\n\t\t(!ev._timed || scheduler.config.resize_month_timed);\r\n\r\n\tvar d = document.createElement(\"div\");\r\n\tvar left_chunk = (ev.hasOwnProperty(\"_first_chunk\") && ev._first_chunk),\r\n\t\tright_chunk = (ev.hasOwnProperty(\"_last_chunk\") && ev._last_chunk);\r\n\r\n\tvar resize_left = resizable && (ev._timed || left_chunk);\r\n\tvar resize_right = resizable && (ev._timed || right_chunk);\r\n\r\n\tvar timed = true;\r\n\tvar cs = \"dhx_cal_event_clear\";\r\n\tif (!ev._timed || resizable) {\r\n\t\ttimed = false;\r\n\t\tcs = \"dhx_cal_event_line\";\r\n\t}\r\n\tif(left_chunk){\r\n\t\tcs += \" dhx_cal_event_line_start\";\r\n\t}\r\n\tif(right_chunk){\r\n\t\tcs += \" dhx_cal_event_line_end\";\r\n\t}\r\n\tif(resize_left){\r\n\t\tresize_handle += \"
\";\r\n\t}\r\n\tif(resize_right){\r\n\t\tresize_handle += \"
\";\r\n\t}\r\n\r\n\tvar cse = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\tif (cse){\r\n\t\tcs += \" \" + cse;\r\n\t}\r\n\r\n\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\tvar style_text = [\r\n\t\t\"position:absolute\",\r\n\t\t\"top:\" + y + \"px\",\r\n\t\t\"left:\" + x + \"px\",\r\n\t\t\"width:\" + (x2 - x - (timed ? 1 : 0)) + \"px\",\r\n\t\t\"height:\" + (this.xy.bar_height - 2) + \"px\",\r\n\t\tcolor,\r\n\t\tbg_color,\r\n\t\t(ev._text_style || \"\")\r\n\t].join(\";\");\r\n\r\n\tvar html = \"
\";\r\n\tif (resizable) {\r\n\t\thtml += resize_handle;\r\n\t}\r\n\tif(scheduler.getState().mode == \"month\"){\r\n\t\tev = scheduler.getEvent(ev.id); // ev at this point could be a part (row in a month view) of a larger event\r\n\t}\r\n\r\n\tif (ev._timed){\r\n\t\thtml += `${scheduler.templates.event_bar_date(ev.start_date, ev.end_date, ev)}`;\r\n\t}\r\n\r\n\thtml += \"
\";\r\n\thtml += scheduler.templates.event_bar_text(ev.start_date, ev.end_date, ev) + '
';\r\n\thtml += \"
\";\r\n\thtml += '
';\r\n\r\n\td.innerHTML = html;\r\n\r\n\tthis._rendered.push(d.firstChild);\r\n\tparent.appendChild(d.firstChild);\r\n};\r\n\r\nscheduler._locate_event = function(node) {\r\n\tvar id = null;\r\n\twhile (node && !id && node.getAttribute) {\r\n\t\tid = node.getAttribute(this.config.event_attribute);\r\n\t\tnode = node.parentNode;\r\n\t}\r\n\treturn id;\r\n};\r\n\r\nscheduler.edit = function(id) {\r\n\tif (this._edit_id == id) return;\r\n\tthis.editStop(false, id);\r\n\tthis._edit_id = id;\r\n\tthis.updateEvent(id);\r\n};\r\nscheduler.editStop = function(mode, id) {\r\n\tif (id && this._edit_id == id) return;\r\n\tvar ev = this.getEvent(this._edit_id);\r\n\tif (ev) {\r\n\t\tif (mode) ev.text = this._editor.value;\r\n\t\tthis._edit_id = null;\r\n\t\tthis._editor = null;\r\n\t\tthis.updateEvent(ev.id);\r\n\t\tthis._edit_stop_event(ev, mode);\r\n\t}\r\n};\r\nscheduler._edit_stop_event = function(ev, mode) {\r\n\tif (this._new_event) {\r\n\t\tif (!mode) {\r\n\t\t\tif (ev) // in case of custom lightbox user can already delete event\r\n\t\t\t\tthis.deleteEvent(ev.id, true);\r\n\t\t} else {\r\n\t\t\tthis.callEvent(\"onEventAdded\", [ev.id, ev]);\r\n\t\t}\r\n\t\tthis._new_event = null;\r\n\t} else {\r\n\t\tif (mode){\r\n\t\t\tthis.callEvent(\"onEventChanged\", [ev.id, ev]);\r\n\t\t}\r\n\t}\r\n};\r\n\r\nscheduler.getEvents = function(from, to) {\r\n\tvar result = [];\r\n\tfor (var a in this._events) {\r\n\t\tvar ev = this._events[a];\r\n\t\tif (ev && ( (!from && !to) || (ev.start_date < to && ev.end_date > from) ))\r\n\t\t\tresult.push(ev);\r\n\t}\r\n\treturn result;\r\n};\r\nscheduler.getRenderedEvent = function(id) {\r\n\tif (!id)\r\n\t\treturn;\r\n\tvar rendered_events = scheduler._rendered;\r\n\tfor (var i=0; i -1){\r\n\t\t\t\t\tsection = section.split(scheduler.config.section_delimiter)[0];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar top = timeline.getSectionTop(section);\r\n\t\t\tvar left = timeline.posFromDate(event.start_date);\r\n\t\t\tvar container = scheduler.$container.querySelector(\".dhx_timeline_data_wrapper\");\r\n\t\t\tleft = left - (container.offsetWidth - timeline.dx) / 2;\r\n\t\t\ttop = top - container.offsetHeight / 2 + timeline.dy/2;\r\n\r\n\t\t\tif (timeline._smartRenderingEnabled()) {\r\n\t\t\t\tvar handlerId = timeline.attachEvent(\"onScroll\", function(){\r\n\t\t\t\t\trestoreOriginalColors();\r\n\t\t\t\t\ttimeline.detachEvent(handlerId);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\ttimeline.scrollTo({\r\n\t\t\t\tleft: left,\r\n\t\t\t\ttop: top\r\n\t\t\t});\r\n\t\t\tif (!timeline._smartRenderingEnabled()) {\r\n\t\t\t\trestoreOriginalColors();\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\trestoreOriginalColors();\r\n\t}\r\n\r\n\tscheduler.callEvent(\"onAfterEventDisplay\", [ev, mode]);\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._append_drag_marker = function(m){\r\n\tif(m.parentNode) return;\r\n\tvar zone = scheduler._els[\"dhx_cal_data\"][0];\r\n\r\n\tvar scale = zone.lastChild;\r\n\tvar className = scheduler._getClassName(scale);\r\n\tif(className.indexOf(\"dhx_scale_holder\") < 0 && scale.previousSibling){\r\n\t\tscale = scale.previousSibling;\r\n\t}\r\n\r\n\tclassName = scheduler._getClassName(scale);\r\n\tif (scale && className.indexOf(\"dhx_scale_holder\") === 0) {\r\n\t\tscale.appendChild(m);\r\n\t}\r\n};\r\n\r\nscheduler._update_marker_position = function(m, event){\r\n\tvar size = scheduler._calc_event_y(event, 0);\r\n\tm.style.top = size.top + \"px\";\r\n\tm.style.height = size.height + \"px\";\r\n};\r\n\r\nscheduler.highlightEventPosition = function(event){\r\n\tvar m = document.createElement(\"div\");\r\n\r\n\tm.setAttribute(\"event_id\", event.id); // for backward compatibility\r\n\tm.setAttribute(this.config.event_attribute, event.id);\r\n\tthis._rendered.push(m);\r\n\tthis._update_marker_position(m, event);\r\n\r\n\tvar css = this.templates.drag_marker_class(event.start_date, event.end_date, event);\r\n\tvar html = this.templates.drag_marker_content(event.start_date, event.end_date, event);\r\n\tm.className = \"dhx_drag_marker\";\r\n\tif(css)\r\n\t\tm.className += \" \" + css;\r\n\tif(html)\r\n\t\tm.innerHTML = html;\r\n\tthis._append_drag_marker(m);\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._parsers.xml = {\r\n\tcanParse: function(data, xhr){\r\n\t\t// IE returns non-empty responseXML type regardless of actual data type\r\n\t\tif(xhr.responseXML && xhr.responseXML.firstChild){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\ttry{\r\n\t\t\tvar xmlDoc = scheduler.ajax.parse(xhr.responseText);\r\n\t\t\tvar topElement = scheduler.ajax.xmltop(\"data\", xmlDoc);\r\n\t\t\tif(topElement && topElement.tagName === \"data\"){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}catch (e){\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\tparse: function(loader) {\r\n\t\tvar xml;\r\n\r\n\t\tif (!loader.xmlDoc.responseXML) { //from a string\r\n\t\t\tloader.xmlDoc.responseXML = scheduler.ajax.parse(loader.xmlDoc.responseText);\r\n\t\t}\r\n\t\r\n\t\txml = scheduler.ajax.xmltop(\"data\", loader.xmlDoc);\r\n\t\tif (xml.tagName != \"data\") return null;//not an xml\r\n\t\tvar csrfToken = xml.getAttribute(\"dhx_security\");\r\n\t\tif (csrfToken) {\r\n\t\t\tif (window.dhtmlx) {\r\n\t\t\t\twindow.dhtmlx.security_key = csrfToken;\r\n\t\t\t}\r\n\t\t\tscheduler.security_key = csrfToken;\r\n\t\t}\r\n\t\r\n\t\tvar opts = scheduler.ajax.xpath(\"//coll_options\", loader.xmlDoc);\r\n\t\tfor (var i = 0; i < opts.length; i++) {\r\n\t\t\tvar bind = opts[i].getAttribute(\"for\");\r\n\t\t\tvar arr = scheduler.serverList[bind];\r\n\t\t\tif (!arr) {\r\n\t\t\t\tscheduler.serverList[bind] = arr = [];\r\n\t\t\t}\r\n\t\t\tarr.splice(0, arr.length);\t//clear old options\r\n\t\t\tvar itms = scheduler.ajax.xpath(\".//item\", opts[i]);\r\n\t\t\tfor (var j = 0; j < itms.length; j++) {\r\n\t\t\t\tvar itm = itms[j];\r\n\t\t\t\tvar attrs = itm.attributes;\r\n\t\t\t\tvar obj = { key: itms[j].getAttribute(\"value\"), label: itms[j].getAttribute(\"label\")};\r\n\t\t\t\tfor (var k = 0; k < attrs.length; k++) {\r\n\t\t\t\t\tvar attr = attrs[k];\r\n\t\t\t\t\tif (attr.nodeName == \"value\" || attr.nodeName == \"label\")\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\tobj[attr.nodeName] = attr.nodeValue;\r\n\t\t\t\t}\r\n\t\t\t\tarr.push(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (opts.length)\r\n\t\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\t\r\n\t\tvar ud = scheduler.ajax.xpath(\"//userdata\", loader.xmlDoc);\r\n\t\tfor (var i = 0; i < ud.length; i++) {\r\n\t\t\tvar udx = scheduler._xmlNodeToJSON(ud[i]);\r\n\t\t\tscheduler._userdata[udx.name] = udx.text;\r\n\t\t}\r\n\t\r\n\t\tvar evs = [];\r\n\t\txml = scheduler.ajax.xpath(\"//event\", loader.xmlDoc);\r\n\t\r\n\t\tfor (var i = 0; i < xml.length; i++) {\r\n\t\t\tvar ev = evs[i] = scheduler._xmlNodeToJSON(xml[i]);\r\n\t\t\tscheduler._init_event(ev);\r\n\t\t}\r\n\t\treturn evs;\r\n\t}\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler.json = scheduler._parsers.json = {\r\n\tcanParse: function(data){\r\n\t\tif(data && typeof data === \"object\"){\r\n\t\t\treturn true;\r\n\t\t} else if(typeof data === \"string\"){\r\n\t\t\ttry {\r\n\t\t\t\tvar result = JSON.parse(data);\r\n\t\t\t\treturn Object.prototype.toString.call(result) === '[object Object]' || \r\n\t\t\t\t\t\tObject.prototype.toString.call(result) === '[object Array]';\r\n\t\t\t} catch (err) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\tparse: function(data) {\r\n\t\tvar events = [];\r\n\r\n\t\tif (typeof data == \"string\") {\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\t\tif (Object.prototype.toString.call(data) === '[object Array]') {\r\n\t\t\tevents = data;\r\n\t\t} else {\r\n\t\t\tif(data){\r\n\t\t\t\tif(data.events){\r\n\t\t\t\t\tevents = data.events;\r\n\t\t\t\t}else if(data.data){\r\n\t\t\t\t\tevents = data.data;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tevents = events || [];\r\n\r\n\t\tif (data.dhx_security) {\r\n\t\t\tif (window.dhtmlx) {\r\n\t\t\t\twindow.dhtmlx.security_key = data.dhx_security;\r\n\t\t\t}\r\n\t\t\tscheduler.security_key = data.dhx_security;\r\n\t\t}\r\n\r\n\t\tvar collections = (data && data.collections) ? data.collections : {};\r\n\t\tvar collections_loaded = false;\r\n\t\tfor (var key in collections) {\r\n\t\t\tif (collections.hasOwnProperty(key)) {\r\n\t\t\t\tcollections_loaded = true;\r\n\t\t\t\tvar collection = collections[key];\r\n\t\t\t\tvar arr = scheduler.serverList[key];\r\n\t\t\t\tif (!arr) {\r\n\t\t\t\t\tscheduler.serverList[key] = arr = [];\r\n\t\t\t\t}\r\n\t\t\t\tarr.splice(0, arr.length); //clear old options\r\n\t\t\t\tfor (var j = 0; j < collection.length; j++) {\r\n\t\t\t\t\tvar option = collection[j];\r\n\t\t\t\t\tvar obj = { key: option.value, label: option.label }; // resulting option object\r\n\t\t\t\t\tfor (var option_key in option) {\r\n\t\t\t\t\t\tif (option.hasOwnProperty(option_key)) {\r\n\t\t\t\t\t\t\tif (option_key == \"value\" || option_key == \"label\")\r\n\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\tobj[option_key] = option[option_key]; // obj['value'] = option['value']\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tarr.push(obj);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (collections_loaded)\r\n\t\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\r\n\t\tvar evs = [];\r\n\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\tvar event = events[i];\r\n\t\t\tscheduler._init_event(event);\r\n\t\t\tevs.push(event);\r\n\t\t}\r\n\t\treturn evs;\r\n\t}\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler.ical = scheduler._parsers.ical = {\r\n\tcanParse: function(data){\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\treturn new RegExp(\"^BEGIN:VCALENDAR\").test(data);\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n\tparse:function(str){\r\n\t\tvar data = str.match(RegExp(this.c_start+\"[^\\f]*\"+this.c_end,\"\"));\r\n\t\tif (!data.length) return;\r\n\r\n\t\t// mpl: handle bad unfolding\r\n\t\tdata[0]=data[0].replace(/[\\r\\n]+ /g,\"\");\r\n\r\n\t\t//unfolding \r\n\t\tdata[0]=data[0].replace(/[\\r\\n]+(?=[a-z \\t])/g,\" \");\r\n\t\t//drop property\r\n\t\tdata[0]=data[0].replace(/;[^:\\r\\n]*:/g,\":\");\r\n\t\t\r\n\t\t\r\n\t\tvar incoming=[];\r\n\t\tvar match;\r\n\t\tvar event_r = RegExp(\"(?:\"+this.e_start+\")([^\\f]*?)(?:\"+this.e_end+\")\",\"g\");\r\n\t\twhile ((match=event_r.exec(data)) !== null){\r\n\t\t\tvar e={};\r\n\t\t\tvar param;\r\n\t\t\tvar param_r = /[^\\r\\n]+[\\r\\n]+/g;\r\n\t\t\twhile ((param=param_r.exec(match[1])) !== null)\r\n\t\t\t\tthis.parse_param(param.toString(),e);\r\n\t\t\tif (e.uid && !e.id) e.id = e.uid; //fallback to UID, when ID is not defined\r\n\t\t\tincoming.push(e);\t\r\n\t\t}\r\n\t\treturn incoming;\r\n\t},\r\n\tparse_param:function(str,obj){\r\n\t\tvar d = str.indexOf(\":\"); \r\n\t\t\tif (d==-1) return;\r\n\t\t\r\n\t\tvar name = str.substr(0,d).toLowerCase();\r\n\t\tvar value = str.substr(d+1).replace(/\\\\,/g,\",\").replace(/[\\r\\n]+$/,\"\");\r\n\t\tif (name==\"summary\")\r\n\t\t\tname=\"text\";\r\n\t\telse if (name==\"dtstart\"){\r\n\t\t\tname = \"start_date\";\r\n\t\t\tvalue = this.parse_date(value,0,0);\r\n\t\t}\r\n\t\telse if (name==\"dtend\"){\r\n\t\t\tname = \"end_date\";\r\n\t\t\tvalue = this.parse_date(value,0,0);\r\n\t\t}\r\n\t\tobj[name]=value;\r\n\t},\r\n\tparse_date:function(value,dh,dm){\r\n\t\tvar t = value.split(\"T\");\r\n\r\n\t\tvar utcMark = false;\r\n\t\tif (t[1]){\r\n\t\t\tdh=t[1].substr(0,2);\r\n\t\t\tdm=t[1].substr(2,2);\r\n\t\t\tutcMark = !!(t[1][6] == \"Z\");\r\n\t\t}\r\n\t\tvar dy = t[0].substr(0,4);\r\n\t\tvar dn = parseInt(t[0].substr(4,2),10)-1;\r\n\t\tvar dd = t[0].substr(6,2);\r\n\r\n\t\tif(scheduler.config.server_utc || utcMark){\r\n\t\t\treturn new Date(Date.UTC(dy,dn,dd,dh,dm)) ;\r\n\t\t}else{\r\n\t\t\treturn new Date(dy,dn,dd,dh,dm);\r\n\t\t}\r\n\t},\r\n\tc_start:\"BEGIN:VCALENDAR\",\r\n\te_start:\"BEGIN:VEVENT\",\r\n\te_end:\"END:VEVENT\",\r\n\tc_end:\"END:VCALENDAR\"\t\r\n};\r\n\r\n}","export default function(scheduler){\r\n\treturn (function(){\r\n\t\tvar res = {};\r\n\t\tfor (var a in this._events){\r\n\t\t\tvar ev = this._events[a];\r\n\t\t\tif (ev.id.toString().indexOf(\"#\") == -1){\r\n\t\t\t\tres[ev.id] = ev;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t}).bind(scheduler);\r\n}","import xmlLoaded from \"./loaders/xml\";\r\nimport jsonLoader from \"./loaders/json\";\r\nimport iCalLoader from \"./loaders/ical\";\r\nimport createSerializator from \"../core/common/get_serializable_events\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler._loaded = {};\r\nscheduler._load = function(url, from) {\r\n\turl = url || this._load_url;\r\n\r\n\tif(!url){\r\n\t\t//if scheduler.setLoadMode is called before scheduler.init, initial rendering will invoke data loading while url is undefined\r\n\t\treturn;\r\n\t}\r\n\r\n\turl += (url.indexOf(\"?\") == -1 ? \"?\" : \"&\") + \"timeshift=\" + (new Date()).getTimezoneOffset();\r\n\tif (this.config.prevent_cache) url += \"&uid=\" + this.uid();\r\n\tvar to;\r\n\tfrom = from || this._date;\r\n\tfunction ajaxCallback(response) {\r\n\t\tscheduler.on_load(response);\r\n\t\tscheduler.callEvent(\"onLoadEnd\", []);\r\n\t}\r\n\tif (this._load_mode) {\r\n\t\tvar lf = this.templates.load_format;\r\n\r\n\t\tfrom = this.date[this._load_mode + \"_start\"](new Date(from.valueOf()));\r\n\t\twhile (from > this._min_date) from = this.date.add(from, -1, this._load_mode);\r\n\t\tto = from;\r\n\r\n\t\tvar cache_line = true;\r\n\t\twhile (to < this._max_date) {\r\n\t\t\tto = this.date.add(to, 1, this._load_mode);\r\n\t\t\tif (this._loaded[lf(from)] && cache_line)\r\n\t\t\t\tfrom = this.date.add(from, 1, this._load_mode); else cache_line = false;\r\n\t\t}\r\n\r\n\t\tvar temp_to = to;\r\n\t\tdo {\r\n\t\t\tto = temp_to;\r\n\t\t\ttemp_to = this.date.add(to, -1, this._load_mode);\r\n\t\t} while (temp_to > from && this._loaded[lf(temp_to)]);\r\n\r\n\t\tif (to <= from)\r\n\t\t\treturn false; //already loaded\r\n\r\n\t\tscheduler.ajax.get(url + \"&from=\" + lf(from) + \"&to=\" + lf(to), ajaxCallback);\r\n\r\n\t\twhile (from < to) {\r\n\t\t\tthis._loaded[lf(from)] = true;\r\n\t\t\tfrom = this.date.add(from, 1, this._load_mode);\r\n\t\t}\r\n\t} else {\r\n\t\tscheduler.ajax.get(url, ajaxCallback);\r\n\t}\r\n\r\n\t// TODO: remove onXLS\r\n\tthis.callEvent(\"onXLS\", []);\r\n\tthis.callEvent(\"onLoadStart\", []);\r\n\treturn true;\r\n};\r\n\r\nscheduler._parsers = {};\r\n\r\n\r\nxmlLoaded(scheduler);\r\njsonLoader(scheduler);\r\niCalLoader(scheduler);\r\n\r\nscheduler.on_load = function (loader) {\r\n\tthis.callEvent(\"onBeforeParse\", []);\r\n\r\n\tvar evs;\r\n\tvar error = false;\r\n\r\n\tvar foundParser = false;\r\n\tfor(var i in this._parsers){\r\n\t\tvar parser = this._parsers[i];\r\n\t\tif(parser.canParse(loader.xmlDoc.responseText, loader.xmlDoc)){\r\n\t\t\ttry{\r\n\t\t\t\tvar param = loader.xmlDoc.responseText;\r\n\t\t\t\tif(i === \"xml\"){\r\n\t\t\t\t\tparam = loader;\r\n\t\t\t\t}\r\n\t\t\t\tevs = parser.parse(param);\r\n\t\t\t\tif(!evs){\r\n\t\t\t\t\terror = true;\r\n\t\t\t\t}\r\n\t\t\t}catch(e){\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\t\t\tfoundParser = true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif(!foundParser){\r\n\t\tif(this._process && this[this._process]){\r\n\t\t\ttry{\r\n\t\t\t\tevs = this[this._process].parse(loader.xmlDoc.responseText);\r\n\t\t\t}catch (e){\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\terror = true;\r\n\t\t}\r\n\t}\r\n\r\n\tif(error || (loader.xmlDoc.status && loader.xmlDoc.status >= 400)){\r\n\t\tthis.callEvent(\"onLoadError\", [loader.xmlDoc]);\r\n\t\tevs = [];\r\n\t}\r\n\r\n\tthis._process_loading(evs);\r\n\r\n\t// TODO: remove onXLE\r\n\tthis.callEvent(\"onXLE\", []);\r\n\tthis.callEvent(\"onParse\", []);\r\n};\r\nscheduler._process_loading = function(evs) {\r\n\tthis._loading = true;\r\n\tthis._not_render = true;\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tif (!this.callEvent(\"onEventLoading\", [evs[i]])) continue;\r\n\t\tthis.addEvent(evs[i]);\r\n\t}\r\n\tthis._not_render = false;\r\n\tif (this._render_wait) this.render_view_data();\r\n\r\n\tthis._loading = false;\r\n\tif (this._after_call) this._after_call();\r\n\tthis._after_call = null;\r\n};\r\nscheduler._init_event = function(event) {\r\n\tevent.text = (event.text || event._tagvalue) || \"\";\r\n\tevent.start_date = scheduler._init_date(event.start_date);\r\n\tevent.end_date = scheduler._init_date(event.end_date);\r\n};\r\n\r\nscheduler._init_date = function(date){\r\n\tif(!date)\r\n\t\treturn null;\r\n\tif (typeof date == \"string\") {\r\n\t\treturn scheduler._helpers.parseDate(date);\r\n\t}\r\n\telse return new Date(date);\r\n};\r\n\r\nconst getSerializableData = createSerializator(scheduler);\r\nscheduler.serialize = function(){\r\n\tconst dataset = [];\r\n\tconst allEvents = getSerializableData();\r\n\tfor (var a in allEvents){\r\n\t\t\r\n\t\tconst exportedEvent = {};\r\n\t\tvar ev = allEvents[a];\r\n\r\n\t\tfor(var key in ev){\r\n\t\t\tif (key.charAt(0) == \"$\" || key.charAt(0) == \"_\"){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tlet exportValue;\r\n\t\t\tconst rawValue = ev[key];\r\n\t\t\tif(scheduler.utils.isDate(rawValue)){\r\n\t\t\t\texportValue = scheduler.defined(scheduler.templates.xml_format) ? scheduler.templates.xml_format(rawValue) : scheduler.templates.format_date(rawValue);\r\n\t\t\t}else{\r\n\t\t\t\texportValue = rawValue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\texportedEvent[key] = exportValue;\r\n\t\t}\r\n\r\n\t\tdataset.push(exportedEvent);\r\n\t}\r\n\treturn dataset;\r\n};\r\n\r\n/*\r\nscheduler.json = {};\r\nscheduler.json.parse = function(data) {\r\n\r\n\tvar events = [];\r\n\r\n\tif (typeof data == \"string\") {\r\n\t\tdata = JSON.parse(data);\r\n\t}\r\n\tif (Object.prototype.toString.call(data) === '[object Array]') {\r\n\t\tevents = data;\r\n\t} else {\r\n\t\tif(data){\r\n\t\t\tif(data.events){\r\n\t\t\t\tevents = data.events;\r\n\t\t\t}else if(data.data){\r\n\t\t\t\tevents = data.data;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tevents = events || [];\r\n\r\n\tif (data.dhx_security) {\r\n\t\tif (window.dhtmlx) {\r\n\t\t\twindow.dhtmlx.security_key = data.dhx_security;\r\n\t\t}\r\n\t\tscheduler.security_key = data.dhx_security;\r\n\t}\r\n\r\n\tvar collections = (data && data.collections) ? data.collections : {};\r\n\tvar collections_loaded = false;\r\n\tfor (var key in collections) {\r\n\t\tif (collections.hasOwnProperty(key)) {\r\n\t\t\tcollections_loaded = true;\r\n\t\t\tvar collection = collections[key];\r\n\t\t\tvar arr = scheduler.serverList[key];\r\n\t\t\tif (!arr) {\r\n\t\t\t\tscheduler.serverList[key] = arr = [];\r\n\t\t\t}\r\n\t\t\tarr.splice(0, arr.length); //clear old options\r\n\t\t\tfor (var j = 0; j < collection.length; j++) {\r\n\t\t\t\tvar option = collection[j];\r\n\t\t\t\tvar obj = { key: option.value, label: option.label }; // resulting option object\r\n\t\t\t\tfor (var option_key in option) {\r\n\t\t\t\t\tif (option.hasOwnProperty(option_key)) {\r\n\t\t\t\t\t\tif (option_key == \"value\" || option_key == \"label\")\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\tobj[option_key] = option[option_key]; // obj['value'] = option['value']\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tarr.push(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (collections_loaded)\r\n\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\r\n\tvar evs = [];\r\n\tfor (var i = 0; i < events.length; i++) {\r\n\t\tvar event = events[i];\r\n\t\tscheduler._init_event(event);\r\n\t\tevs.push(event);\r\n\t}\r\n\treturn evs;\r\n};*/\r\nscheduler.parse = function(data, type) {\r\n\tthis._process = type;\r\n\tthis.on_load({xmlDoc: {responseText: data}});\r\n};\r\nscheduler.load = function(url, call) {\r\n\tif (typeof call == \"string\") {\r\n\t\tthis._process = call;\r\n\t\tcall = arguments[2];\r\n\t}\r\n\r\n\tthis._load_url = url;\r\n\tthis._after_call = call;\r\n\tthis._load(url, this._date);\r\n};\r\n//possible values - day,week,month,year,all\r\nscheduler.setLoadMode = function(mode) {\r\n\tif (mode == \"all\") mode = \"\";\r\n\tthis._load_mode = mode;\r\n};\r\n\r\nscheduler.serverList = function(name, array) {\r\n\tif (array) {\r\n\t\tthis.serverList[name] = array.slice(0);\r\n\t\treturn this.serverList[name];\r\n\t}\r\n\tthis.serverList[name] = (this.serverList[name] || []);\r\n\treturn this.serverList[name];\r\n};\r\nscheduler._userdata = {};\r\n\r\nscheduler._xmlNodeToJSON = function(node) {\r\n\tvar t = {};\r\n\tfor (var i = 0; i < node.attributes.length; i++)\r\n\t\tt[node.attributes[i].name] = node.attributes[i].value;\r\n\r\n\tfor (var i = 0; i < node.childNodes.length; i++) {\r\n\t\tvar child = node.childNodes[i];\r\n\t\tif (child.nodeType == 1)\r\n\t\t\tt[child.tagName] = child.firstChild ? child.firstChild.nodeValue : \"\";\r\n\t}\r\n\r\n\tif (!t.text) t.text = node.firstChild ? node.firstChild.nodeValue : \"\";\r\n\r\n\treturn t;\r\n};\r\nscheduler.attachEvent(\"onXLS\", function() {\r\n\tif (this.config.show_loading === true) {\r\n\t\tvar t;\r\n\t\tt = this.config.show_loading = document.createElement(\"div\");\r\n\t\tt.className = 'dhx_loading';\r\n\t\tt.style.left = Math.round((this._x - 128) / 2) + \"px\";\r\n\t\tt.style.top = Math.round((this._y - 15) / 2) + \"px\";\r\n\t\tthis._obj.appendChild(t);\r\n\t}\r\n});\r\nscheduler.attachEvent(\"onXLE\", function() {\r\n\tvar t = this.config.show_loading;\r\n\tif (t && typeof t == \"object\") {\r\n\t\tif(t.parentNode) {\r\n\t\t\tt.parentNode.removeChild(t);\r\n\t\t}\r\n\t\tthis.config.show_loading = true;\r\n\t}\r\n});\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler._lightbox_controls = {};\r\nscheduler.formSection = function(name){\r\n\tvar config = this.config.lightbox.sections;\r\n\tvar i = 0;\r\n\tfor (i; i < config.length; i++) {\r\n\t\tif (config[i].name == name) {\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif (i === config.length) {\r\n\t\t// GS-1662 section not found, should exit here instead of throwing an error\r\n\t\treturn null;\r\n\t}\r\n\r\n\tvar section = config[i];\r\n\tif (!scheduler._lightbox) {\r\n\t\tscheduler.getLightbox();\r\n\t}\r\n\tvar header = scheduler._lightbox.querySelector(`#${section.id}`);\r\n\tvar node = header.nextSibling;\r\n\r\n\tvar result = {\r\n\t\tsection: section,\r\n\t\theader: header,\r\n\t\tnode: node,\r\n\t\tgetValue:function(ev){\r\n\t\t\treturn scheduler.form_blocks[section.type].get_value(node, (ev||{}), section);\r\n\t\t},\r\n\t\tsetValue:function(value, ev){\r\n\t\t\treturn scheduler.form_blocks[section.type].set_value(node, value, (ev||{}), section);\r\n\t\t}\r\n\t};\r\n\r\n\tvar handler = scheduler._lightbox_controls[\"get_\"+section.type+\"_control\"];\r\n\treturn handler?handler(result):result;\r\n};\r\nscheduler._lightbox_controls.get_template_control = function(result) {\r\n\tresult.control = result.node;\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_select_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('select')[0];\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_textarea_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('textarea')[0];\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_time_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('select'); // array\r\n\treturn result;\r\n};\r\n\r\nscheduler._lightbox_controls.defaults = {\r\n\ttemplate: {\r\n\t\theight:30\r\n\t},\r\n\ttextarea: {\r\n\t\theight: 200\r\n\t},\r\n\tselect: {\r\n\t\theight: 23\r\n\t},\r\n\ttime: {\r\n\t\theight: 20\r\n\t}\r\n};\r\n\r\n\r\nscheduler.form_blocks={\r\n\ttemplate:{\r\n\t\trender: function(sns){\r\n\t\t\treturn \"
\";\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,config){\r\n\t\t\tnode.innerHTML = value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev,config){\r\n\t\t\treturn node.innerHTML||\"\";\r\n\t\t},\r\n\t\tfocus: function(node){\r\n\t\t}\r\n\t},\r\n\ttextarea:{\r\n\t\trender:function(sns){\r\n\t\t\tconst placeholder = sns.placeholder ? `placeholder='${sns.placeholder}'` : \"\";\r\n\t\t\treturn `
`;\r\n\t\t},\r\n\t\tset_value:function(node,value,ev){\r\n\t\t\tscheduler.form_blocks.textarea._get_input(node).value=value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev){\r\n\t\t\treturn scheduler.form_blocks.textarea._get_input(node).value;\r\n\t\t},\r\n\t\tfocus:function(node){\r\n\t\t\tvar a = scheduler.form_blocks.textarea._get_input(node);\r\n\t\t\tscheduler._focus(a, true);\r\n\t\t},\r\n\t\t_get_input: function(node){\r\n\t\t\treturn node.getElementsByTagName(\"textarea\")[0];\r\n\t\t}\r\n\t},\r\n\tselect:{\r\n\t\trender:function(sns){\r\n\t\t\t//var defaults = scheduler._lightbox_controls.defaults.select;\r\n\t\t\tvar html=\"
\";\r\n\t\t\treturn html;\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,sns){\r\n\t\t\tvar select = node.firstChild;\r\n\t\t\tif (!select._dhx_onchange && sns.onchange) {\r\n\t\t\t\tscheduler.event(select, \"change\", sns.onchange);\r\n\t\t\t\tselect._dhx_onchange = true;\r\n\t\t\t}\r\n\t\t\tif (typeof value == \"undefined\")\r\n\t\t\t\tvalue = (select.options[0]||{}).value;\r\n\t\t\tselect.value=value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev){\r\n\t\t\treturn node.firstChild.value;\r\n\t\t},\r\n\t\tfocus:function(node){\r\n\t\t\tvar a=node.firstChild; scheduler._focus(a, true);\r\n\t\t}\r\n\t},\r\n\ttime:{\r\n\t\trender:function(sns) {\r\n\t\t\tif (!sns.time_format) {\r\n\t\t\t\t// default order\r\n\t\t\t\tsns.time_format = [\"%H:%i\", \"%d\", \"%m\", \"%Y\"];\r\n\t\t\t}\r\n\t\t\t// map: default order => real one\r\n\t\t\tsns._time_format_order = {};\r\n\t\t\tvar time_format = sns.time_format;\r\n\r\n\t\t\tvar cfg = scheduler.config;\r\n\t\t\tvar dt = scheduler.date.date_part(scheduler._currentDate());\r\n\t\t\tvar last = 24*60, first = 0;\r\n\t\t\tif(scheduler.config.limit_time_select){\r\n\t\t\t\tlast = 60*cfg.last_hour+1;\r\n\t\t\t\tfirst = 60*cfg.first_hour;\r\n\t\t\t\tdt.setHours(cfg.first_hour);\r\n\t\t\t}\r\n\t\t\tvar html = \"\";\r\n\r\n\t\t\tfor (var p = 0; p < time_format.length; p++) {\r\n\t\t\t\tvar time_option = time_format[p];\r\n\r\n\t\t\t\t// adding spaces between selects\r\n\t\t\t\tif (p > 0) {\r\n\t\t\t\t\thtml += \" \";\r\n\t\t\t\t}\r\n\t\t\t\tvar selectBoxClass = \"\";\r\n\t\t\t\tvar options = \"\";\r\n\t\t\t\tswitch (time_option) {\r\n\t\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_year_select\";\r\n\t\t\t\t\t\tsns._time_format_order[3] = p;\r\n\t\t\t\t\t\t//year\r\n\t\t\t\t\t\tvar range;\r\n\t\t\t\t\t\tvar start_year;\r\n\t\t\t\t\t\tvar end_year;\r\n\t\t\t\t\t\tif(sns.year_range){\r\n\t\t\t\t\t\t\tif (!isNaN(sns.year_range)) {\r\n\t\t\t\t\t\t\t\trange = sns.year_range;\r\n\t\t\t\t\t\t\t} else if (sns.year_range.push) {\r\n\t\t\t\t\t\t\t\t// if\r\n\t\t\t\t\t\t\t\tstart_year = sns.year_range[0];\r\n\t\t\t\t\t\t\t\tend_year = sns.year_range[1];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\trange = range || 10;\r\n\t\t\t\t\t\tvar offset = offset || Math.floor(range / 2);\r\n\t\t\t\t\t\tstart_year = start_year || dt.getFullYear() - offset;\r\n\t\t\t\t\t\tend_year = end_year || start_year + range;\r\n\r\n\t\t\t\t\t\tfor (var i = start_year; i < end_year; i++)\r\n\t\t\t\t\t\t\toptions += \"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%m\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_month_select\";\r\n\t\t\t\t\t\tsns._time_format_order[2] = p;\r\n\t\t\t\t\t\t//month\r\n\t\t\t\t\t\tfor (var i=0; i < 12; i++)\r\n\t\t\t\t\t\t\toptions+=\"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%d\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_day_select\";\r\n\t\t\t\t\t\tsns._time_format_order[1] = p;\r\n\t\t\t\t\t\t//days\r\n\t\t\t\t\t\tfor (var i=1; i < 32; i++)\r\n\t\t\t\t\t\t\toptions+=\"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%H:%i\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_time_select\";\r\n\t\t\t\t\t\tsns._time_format_order[0] = p;\r\n\t\t\t\t\t\t//hours\r\n\t\t\t\t\t\tvar i = first;\r\n\t\t\t\t\t\tvar tdate = dt.getDate();\r\n\t\t\t\t\t\tsns._time_values = [];\r\n\r\n\t\t\t\t\t\twhile(i\"+time+\"\";\r\n\t\t\t\t\t\t\tsns._time_values.push(i);\r\n\t\t\t\t\t\t\tdt.setTime(dt.valueOf()+this.config.time_step*60*1000);\r\n\t\t\t\t\t\t\tvar diff = (dt.getDate()!=tdate)?1:0; // moved or not to the next day\r\n\t\t\t\t\t\t\ti=diff*24*60+dt.getHours()*60+dt.getMinutes();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(options){\r\n\r\n\t\t\t\t\tvar ariaAttrs = scheduler._waiAria.lightboxSelectAttrString(time_option);\r\n\t\t\t\t\tvar readonly = sns.readonly ? \"disabled='disabled'\" : \"\";\r\n\t\t\t\t\thtml += \" \";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//var defaults = scheduler._lightbox_controls.defaults.select;\r\n\r\n\t\t\treturn \"
\"+html+\"  –  \"+html+\"
\";\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,config){\r\n\t\t\tvar cfg = scheduler.config;\r\n\t\t\tvar s=node.getElementsByTagName(\"select\");\r\n\t\t\tvar map = config._time_format_order;\r\n\t\t\tvar start_date, end_date;\r\n\r\n\t\t\tif(cfg.full_day) {\r\n\t\t\t\tif (!node._full_day){\r\n\t\t\t\t\tvar html = \"\";\r\n\t\t\t\t\tif (!scheduler.config.wide_form)\r\n\t\t\t\t\t\thtml = node.previousSibling.innerHTML+html;\r\n\t\t\t\t\tnode.previousSibling.innerHTML=html;\r\n\t\t\t\t\tnode._full_day=true;\r\n\t\t\t\t}\r\n\t\t\t\tvar input=node.previousSibling.getElementsByTagName(\"input\")[0];\r\n\t\t\t\tinput.checked = (scheduler.date.time_part(ev.start_date)===0 && scheduler.date.time_part(ev.end_date)===0);\r\n\r\n\t\t\t\ts[map[0]].disabled=input.checked;\r\n\t\t\t\ts[ map[0] + s.length/2 ].disabled=input.checked;\r\n\r\n\t\t\t\tif(!input.$_eventAttached){\r\n\t\t\t\t\tinput.$_eventAttached = true;\r\n\r\n\t\t\t\t\t\tscheduler.event(input, \"click\", function(){\r\n\t\t\t\t\t\tif(input.checked) {\r\n\t\t\t\t\t\t\tvar obj = {};\r\n\t\t\t\t\t\t\tscheduler.form_blocks.time.get_value(node,obj,config);\r\n\r\n\t\t\t\t\t\t\tstart_date = scheduler.date.date_part(obj.start_date);\r\n\t\t\t\t\t\t\tend_date = scheduler.date.date_part(obj.end_date);\r\n\r\n\t\t\t\t\t\t\tif (+end_date == +start_date || (+end_date >= +start_date && (ev.end_date.getHours() !== 0 || ev.end_date.getMinutes() !== 0)))\r\n\t\t\t\t\t\t\t\tend_date = scheduler.date.add(end_date, 1, \"day\");\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tstart_date = null;\r\n\t\t\t\t\t\t\tend_date = null;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\ts[map[0]].disabled=input.checked;\r\n\t\t\t\t\t\ts[ map[0] + s.length/2 ].disabled=input.checked;\r\n\r\n\t\t\t\t\t\t_fill_lightbox_select(s,0,start_date||ev.start_date);\r\n\t\t\t\t\t\t_fill_lightbox_select(s,4,end_date||ev.end_date);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(cfg.auto_end_date && cfg.event_duration) {\r\n\t\t\t\tvar _update_lightbox_select = function () {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (!(cfg.auto_end_date && cfg.event_duration)){\r\n\t\t\t\t\t\t// setting may be disabled after the handler is attached\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstart_date = new Date(s[map[3]].value,s[map[2]].value,s[map[1]].value,0,s[map[0]].value);\r\n\t\t\t\t\tend_date = new Date(start_date.getTime() + (scheduler.config.event_duration * 60 * 1000));\r\n\t\t\t\t\t_fill_lightbox_select(s, 4, end_date);\r\n\t\t\t\t};\r\n\t\t\t\tfor(var i=0; i<4; i++) {\r\n\t\t\t\t\tif(!s[i].$_eventAttached) {\r\n\t\t\t\t\t\ts[i].$_eventAttached = true;\r\n\t\t\t\t\t\tscheduler.event(s[i], \"change\", _update_lightbox_select);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction _fill_lightbox_select(s,i,d) {\r\n\t\t\t\tvar time_values = config._time_values;\r\n\t\t\t\tvar direct_value = d.getHours()*60+d.getMinutes();\r\n\t\t\t\tvar fixed_value = direct_value;\r\n\t\t\t\tvar value_found = false;\r\n\t\t\t\tfor (var k=0; k\";\r\n\t\tvar ariaAttr = \"\";\r\n\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\tariaAttr = this._waiAria.lightboxButtonAttrString(buttons[i]);\r\n\t\t\thtml += \"
\" + scheduler.locale.labels[buttons[i]] + \"
\";\r\n\t\t}\r\n\r\n\t\tbuttons = this.config.buttons_right;\r\n\t\tvar rtl = scheduler.config.rtl;\r\n\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\tariaAttr = this._waiAria.lightboxButtonAttrString(buttons[i]);\r\n\r\n\t\t\thtml += \"
\";\r\n\r\n\t\t\thtml += \"
\" + scheduler.locale.labels[buttons[i]] + \"
\";\r\n\t\t}\r\n\t\thtml += \"
\";\r\n\t\thtml+=\"
\";\r\n\t\td.innerHTML=html;\r\n\t\tif (scheduler.config.drag_lightbox){\r\n\t\t\tscheduler.event(d.firstChild, \"mousedown\", scheduler._ready_to_dnd);\r\n\t\t\tscheduler.event(d.firstChild, \"selectstart\", function(e){ \r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn false; \r\n\t\t\t});\r\n\t\t\td.firstChild.style.cursor = \"move\";\r\n\t\t\tscheduler._init_dnd_events();\r\n\r\n\t\t}\r\n\r\n\t\tthis._waiAria.lightboxAttr(d);\r\n\r\n\t\tthis.show_cover();\r\n\t\tthis._cover.insertBefore(d,this._cover.firstChild);\r\n\t\t\r\n\t\tthis._lightbox=d;\r\n\r\n\t\tvar sns=this.config.lightbox.sections;\r\n\t\thtml=\"\";\r\n\t\tfor (var i=0; i < sns.length; i++) {\r\n\t\t\tvar block=this.form_blocks[sns[i].type];\r\n\t\t\tif (!block) continue; //ignore incorrect blocks\r\n\t\t\tsns[i].id=\"area_\"+this.uid();\r\n\t\t\tvar button = \"\";\r\n\t\t\tif (sns[i].button){\r\n\t\t\t\tvar ariaAttr = scheduler._waiAria.lightboxSectionButtonAttrString(this.locale.labels[\"button_\"+sns[i].button]);\r\n\t\t\t\tbutton = \"
\"+this.locale.labels[\"button_\"+sns[i].button]+\"
\";\r\n\t\t\t}\r\n\r\n\t\t\tif (this.config.wide_form){\r\n\t\t\t\thtml+=\"
\";\r\n\t\t\t}\r\n\r\n\t\t\tvar label_name = this.locale.labels[\"section_\"+sns[i].name];\r\n\t\t\tif(typeof label_name !== \"string\"){\r\n\t\t\t\tlabel_name = sns[i].name;\r\n\t\t\t}\r\n\t\t\thtml+=\"
\"+button+ \"
\"+block.render.call(this,sns[i]);\r\n\t\t\thtml+=\"
\";\r\n\t\t}\r\n\r\n\t\tvar ds=d.getElementsByTagName(\"div\");\r\n\t\tfor (var i=0; i
 \r\n
\r\n
\r\n\r\n
`;\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._init_touch_events = function(){\r\n\tvar mobile = this.config.touch &&\r\n\t\t( ((navigator.userAgent.indexOf(\"Mobile\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"iPad\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"Android\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"Touch\")!=-1)) && !window.MSStream) ||\r\n\t\t\t((navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1));\r\n\r\n\tif(mobile){\r\n\t\tthis.xy.scroll_width = 0;\r\n\t\tthis._mobile = true;\r\n\t}\r\n\r\n\tif(this.config.touch){\r\n\r\n\t\tvar touchEventsSupported = true;\r\n\t\ttry {\r\n\t\t\tdocument.createEvent(\"TouchEvent\");\r\n\t\t} catch (e) {\r\n\t\t\ttouchEventsSupported = false;\r\n\t\t}\r\n\r\n\t\tif (touchEventsSupported) {\r\n\t\t\tthis._touch_events([\"touchmove\", \"touchstart\", \"touchend\"], function (ev) {\r\n\t\t\t\tif (ev.touches && ev.touches.length > 1) return null;\r\n\t\t\t\tif (ev.touches[0])\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\ttarget: ev.target,\r\n\t\t\t\t\t\tpageX: ev.touches[0].pageX,\r\n\t\t\t\t\t\tpageY: ev.touches[0].pageY,\r\n\t\t\t\t\t\tclientX: ev.touches[0].clientX,\r\n\t\t\t\t\t\tclientY: ev.touches[0].clientY\r\n\t\t\t\t\t};\r\n\t\t\t\telse\r\n\t\t\t\t\treturn ev;\r\n\t\t\t}, function () {\r\n\t\t\t\treturn false;\r\n\t\t\t});\r\n\t\t} else if (window.PointerEvent || window.navigator.pointerEnabled) {\r\n\t\t\tthis._touch_events([\"pointermove\", \"pointerdown\", \"pointerup\"], function (ev) {\r\n\t\t\t\tif (ev.pointerType == \"mouse\") return null;\r\n\t\t\t\treturn ev;\r\n\t\t\t}, function (ev) {\r\n\t\t\t\treturn (!ev || (ev.pointerType == \"mouse\" ));\r\n\t\t\t});\r\n\t\t} else if (window.navigator.msPointerEnabled) {\r\n\t\t\tthis._touch_events([\"MSPointerMove\", \"MSPointerDown\", \"MSPointerUp\"], function (ev) {\r\n\t\t\t\tif (ev.pointerType == ev.MSPOINTER_TYPE_MOUSE) return null;\r\n\t\t\t\treturn ev;\r\n\t\t\t}, function (ev) {\r\n\t\t\t\treturn (!ev || ev.pointerType == ev.MSPOINTER_TYPE_MOUSE);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n};\r\n\r\nscheduler._touch_events = function(names, accessor, ignore){\r\n\t//webkit on android need to be handled separately\r\n\t//var a_webkit = (navigator.userAgent.indexOf(\"Android\")!=-1) && (navigator.userAgent.indexOf(\"WebKit\")!=-1);\r\n\tvar source, tracker, timer, drag_mode, scroll_mode, action_mode;\r\n\tvar dblclicktime = 0;\r\n\r\n\tfunction attachTouchEvent(element, name, callback){\r\n\t\t//touch gestures must be disabled when ligthbox is opened\r\n\t\tscheduler.event(element, name, function(e){\r\n\t\t\tif(scheduler._is_lightbox_open()){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tif (ignore(e)) return;\r\n\t\t\t\treturn callback(e);\r\n\t\t\t}\r\n\t\t}, { passive: false });\r\n\t}\r\n\r\n\tfunction check_direction_swipe(s_ev, e_ev, step, max_dy){\r\n\t\tif (!s_ev || !e_ev) return false;\r\n\r\n\t\tvar t = s_ev.target;\r\n\t\twhile(t && t != scheduler._obj){\r\n\t\t\tt = t.parentNode;\r\n\t\t}\r\n\t\tif(t != scheduler._obj){\r\n\t\t\t//swipe outside scheduler\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// ignore swipe in horizontal timeline\r\n\t\tif(scheduler.matrix && scheduler.matrix[scheduler.getState().mode]){\r\n\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\tif(timeline.scrollable){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar dy = Math.abs(s_ev.pageY - e_ev.pageY);\r\n\t\tvar dx = Math.abs(s_ev.pageX - e_ev.pageX);\r\n\t\tif (dy < max_dy && dx>step && (!dy || (dx/dy > 3))){\r\n\t\t\tif (s_ev.pageX > e_ev.pageX) {\r\n\t\t\t\tscheduler._click.dhx_cal_next_button();\r\n\t\t\t}else {\r\n\t\t\t\tscheduler._click.dhx_cal_prev_button();\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\tfunction doMouseMove(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tvar dnd = scheduler.getState().drag_mode,\r\n\t\t\ttimeline = scheduler.matrix ? scheduler.matrix[scheduler._mode] : false;\r\n\r\n\t\tvar original_render = scheduler.render_view_data;\r\n\t\tif(dnd == 'create' && timeline){\r\n\t\t\t//suppress full redraw of timeline on creating event\r\n\t\t\tscheduler.render_view_data = function() {\r\n\t\t\t\tvar id = scheduler.getState().drag_id;\r\n\t\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\t\tvar property = timeline.y_property;\r\n\r\n\t\t\t\tvar evs = scheduler.getEvents(ev.start_date, ev.end_date);\r\n\t\t\t\tfor(var i = 0; i < evs.length; i++){\r\n\t\t\t\t\tif(evs[i][property] != ev[property]){\r\n\t\t\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tev._sorder = evs.length - 1;\r\n\t\t\t\tev._count = evs.length;\r\n\r\n\t\t\t\tthis.render_data([ev], scheduler.getState().mode);\r\n\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\tscheduler._on_mouse_move(e);\r\n\r\n\t\tif(dnd == 'create' && timeline){\r\n\t\t\tscheduler.render_view_data = original_render;\r\n\t\t}\r\n\r\n\t\tif (e.preventDefault)\r\n\t\t\te.preventDefault();\r\n\t\te.cancelBubble = true;\r\n\t\treturn false;\r\n\t}\r\n\r\n\t// touchmove\r\n\tattachTouchEvent(document.body, names[0], function(e){\r\n\t\tif (ignore(e)) return;\r\n\r\n\t\tvar acc = accessor(e);\r\n\t\tif(!acc) return;\r\n\t\tif (drag_mode){\r\n\t\t\tdoMouseMove(acc);\r\n\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._update_global_tip();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//if (tracker && a_webkit){\r\n\t\t//\tcheck_direction_swipe(tracker, accessor(e), 0);\r\n\t\t//}\r\n\r\n\t\ttracker = accessor(e);\r\n\t\t//ignore common and scrolling moves\r\n\t\tif (!action_mode) return;\r\n\r\n\t\t//multitouch\r\n\t\tif (!tracker){\r\n\t\t\tscroll_mode = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//target changed - probably in scroll mode\r\n\r\n\t\tif (source.target != tracker.target || (Math.abs(source.pageX - tracker.pageX) > 5) || (Math.abs(source.pageY - tracker.pageY) > 5)){\r\n\t\t\tscroll_mode = true;\r\n\t\t\tclearTimeout(timer);\r\n\t\t}\r\n\r\n\t});\r\n\r\n\t//attachTouchEvent(this._els[\"dhx_cal_data\"][0], \"scroll\", drag_cancel);\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], \"touchcancel\", drag_cancel);\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], \"contextmenu\", function(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tif (action_mode){\r\n\t\t\tif (e && e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t});\r\n\r\n\t// touchstart\r\n\tattachTouchEvent(this._obj, names[1], function(e){\r\n\t\t// block pull-to-refresh\r\n\t\tif(document && document.body){\r\n\t\t\tdocument.body.classList.add(\"dhx_cal_touch_active\");\r\n\t\t}\r\n\r\n\t\tif (ignore(e)) return;\r\n\t\tscheduler._pointerDragId = e.pointerId;\r\n\r\n\t\tvar fake_event;\r\n\t\tdrag_mode = scroll_mode = false;\r\n\t\taction_mode = true;\r\n\t\tfake_event = tracker = accessor(e);\r\n\r\n\t\tif (!fake_event){\r\n\t\t\tscroll_mode = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//dbl click\r\n\t\tvar now = new Date();\r\n\r\n\t\tif (!scroll_mode && !drag_mode && now - dblclicktime < 250){\r\n\t\t\tscheduler._click.dhx_cal_data(fake_event);\r\n\t\t\twindow.setTimeout(function(){\r\n\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t//fake_event.type = \"dblclick\";\r\n\t\t\t\tscheduler._on_dbl_click(fake_event);\r\n\t\t\t}, 50);\r\n\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._block_next_stop = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tdblclicktime = now;\r\n\r\n\t\t//drag\r\n\r\n\t\tif (scroll_mode || drag_mode || !scheduler.config.touch_drag)\r\n\t\t\treturn;\r\n\r\n\t\tvar actTask = scheduler._locate_event(document.activeElement);\r\n\t\tvar fakeTask = scheduler._locate_event(fake_event.target);\r\n\t\tvar sourceTask = source? scheduler._locate_event(source.target) : null;\r\n\r\n\t\tif(actTask && fakeTask && actTask == fakeTask && actTask != sourceTask)\r\n\t\t{\r\n\t\t\tif(e.preventDefault) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\tscheduler._click.dhx_cal_data(fake_event);\r\n\t\t\tsource = fake_event;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//there is no target\r\n\t\ttimer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tdrag_mode = true;\r\n\t\t\tvar target = source.target;\r\n\t\t\tvar className = scheduler._getClassName(target);\r\n\t\t\tif (target && className.indexOf(\"dhx_body\") != -1)\r\n\t\t\t\ttarget = target.previousSibling;\r\n\r\n\t\t\tscheduler._on_mouse_down(source, target);\r\n\t\t\tif (scheduler._drag_mode && scheduler._drag_mode != \"create\"){\r\n\t\t\t\tscheduler.for_rendered(scheduler._drag_id, function(node, i) {\r\n\t\t\t\t\tnode.style.display='none';\r\n\t\t\t\t\tscheduler._rendered.splice(i, 1);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (scheduler.config.touch_tip) {\r\n\t\t\t\tscheduler._show_global_tip();\r\n\t\t\t}\r\n\t\t\tscheduler.updateEvent(scheduler._drag_id);\r\n\t\t},scheduler.config.touch_drag);\r\n\r\n\t\tsource = fake_event;\r\n\t});\r\n\tfunction drag_cancel(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tscheduler._hide_global_tip();\r\n\t\tif (drag_mode){\r\n\t\t\tscheduler._on_mouse_up( accessor(e) );\r\n\t\t\tscheduler._temp_touch_block = false;\r\n\t\t}\r\n\t\tscheduler._drag_id = null;\r\n\t\tscheduler._drag_mode=null;\r\n\t\tscheduler._drag_pos=null;\r\n\t\tscheduler._pointerDragId = null;\r\n\t\tclearTimeout(timer);\r\n\t\tdrag_mode = action_mode = false;\r\n\t\tscroll_mode = true;\r\n\t}\r\n\r\n\t// touch end\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], names[2], function(e){\r\n\t\tif(document && document.body){\r\n\t\t\tdocument.body.classList.remove(\"dhx_cal_touch_active\");\r\n\t\t}\r\n\r\n\t\tif (ignore(e)) return;\r\n\r\n\t\tif(scheduler.config.touch_swipe_dates){\r\n\t\t\tif (!drag_mode && check_direction_swipe(source, tracker, 200, 100)) {\r\n\t\t\t\tscheduler._block_next_stop = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (drag_mode) {\r\n\t\t\tscheduler._ignore_next_click = true;\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\t}, 100);\r\n\t\t}\r\n\r\n\t\tdrag_cancel(e);\r\n\t\tif (scheduler._block_next_stop){\r\n\t\t\tscheduler._block_next_stop = false;\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler.event(document.body, names[2], drag_cancel);\r\n};\r\n\r\nscheduler._show_global_tip = function(){\r\n\tscheduler._hide_global_tip();\r\n\r\n\tvar toptip = scheduler._global_tip = document.createElement(\"div\");\r\n\ttoptip.className='dhx_global_tip';\r\n\r\n\tscheduler._update_global_tip(1);\r\n\r\n\tdocument.body.appendChild(toptip);\r\n};\r\nscheduler._update_global_tip = function(init){\r\n\tvar toptip = scheduler._global_tip;\r\n\tif (toptip){\r\n\t\tvar time = \"\";\r\n\t\tif (scheduler._drag_id && !init){\r\n\t\t\tvar ev = scheduler.getEvent(scheduler._drag_id);\r\n\t\t\tif (ev)\r\n\t\t\t\ttime = \"
\" + (ev._timed ? scheduler.templates.event_header(ev.start_date, ev.end_date, ev):scheduler.templates.day_date(ev.start_date, ev.end_date, ev)) + \"
\";\r\n\t\t}\r\n\r\n\t\tif (scheduler._drag_mode == \"create\" || scheduler._drag_mode == \"new-size\")\r\n\t\t\ttoptip.innerHTML = (scheduler.locale.labels.drag_to_create || \"Drag to create\")+time;\r\n\t\telse\r\n\t\t\ttoptip.innerHTML = (scheduler.locale.labels.drag_to_move || \"Drag to move\")+time;\r\n\t}\r\n};\r\nscheduler._hide_global_tip = function(){\r\n\tvar toptip = scheduler._global_tip;\r\n\tif (toptip && toptip.parentNode){\r\n\t\ttoptip.parentNode.removeChild(toptip);\r\n\t\tscheduler._global_tip = 0;\r\n\t}\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler.getRootView = function() {\r\n\treturn {\r\n\t\tview: {\r\n\t\t\trender: function(){\r\n\t\t\t\treturn {\r\n\t\t\t\t\ttag: \"div\",\r\n\t\t\t\t\ttype: 1,\r\n\t\t\t\t\tattrs: {\r\n\t\t\t\t\t\tstyle: \"width:100%;height:100%;\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\thooks: {\r\n\t\t\t\t\t\t\"didInsert\": function(){\r\n\t\t\t\t\t\t\tscheduler.setCurrentView();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tbody: [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tel: this.el,\r\n\t\t\t\t\t\t\ttype: 1\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t};\r\n\t\t\t},\r\n\t\t\tinit: function(){\r\n\t\t\t\tvar container = document.createElement(\"DIV\");\r\n\t\t\t\tcontainer.id = \"scheduler_\"+ scheduler.uid();\r\n\t\t\t\tcontainer.style.width = \"100%\";\r\n\t\t\t\tcontainer.style.height = \"100%\";\r\n\t\t\t\tcontainer.classList.add(\"dhx_cal_container\");\r\n\t\t\t\tcontainer.cmp = \"grid\";\r\n\t\t\t\tcontainer.innerHTML = '
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
';\r\n\t\t\t\tscheduler.init(container);\r\n\r\n\t\t\t\tthis.el = container;\r\n\t\t\t}\r\n\t\t},\r\n\t\ttype: 4\r\n\t};\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._addThemeClass = function(){\r\n\tdocument.documentElement.setAttribute(\"data-scheduler-theme\", scheduler.skin);\r\n};\r\n\r\nscheduler._skin_settings = {\r\n\tfix_tab_position: [1,0],\r\n\tuse_select_menu_space: [1,0],\r\n\twide_form: [1,0],\r\n\r\n\thour_size_px: [44,42],\r\n\tdisplayed_event_color: [\"#ff4a4a\", \"ffc5ab\"],\r\n\tdisplayed_event_text_color: [\"#ffef80\", \"7e2727\"]\r\n};\r\n\r\nscheduler._skin_xy = {\r\n\tlightbox_additional_height: [90,50],\r\n\tnav_height: [59,22],\r\n\tbar_height: [24,20]\r\n};\r\n\r\n// material skin uses a different box sizing model than other skins, and also requires some post-processing.\r\n// In order to render events correctly, we need to know which box sizing model is used\r\n// We can detect it by styles applied, taking into account that styles may be loaded after scheduler is rendered\r\n\r\nscheduler._is_material_skin = function(){\r\n\tif(!scheduler.skin){\r\n\t\treturn checkIfMaterialSkin();\r\n\t}else{\r\n\t\treturn ((scheduler.skin + \"\").indexOf(\"material\") > -1);\r\n\t}\r\n};\r\n\r\nfunction themeNameFromFile(){\r\n\tvar links = document.getElementsByTagName(\"link\");\r\n\tfor (var i = 0; i < links.length; i++) {\r\n\t\tvar res = links[i].href.match(\"dhtmlxscheduler_([a-z]+).css\");\r\n\t\tif (res){\r\n\t\t\treturn res[1];\r\n\t\t}\r\n\t}\r\n}\r\n\r\nscheduler._build_skin_info = function() {\r\n\tmonitorThemeChange();\r\n\tconst styles = getComputedStyle(this.$container);\r\n\tconst themeVar = styles.getPropertyValue(\"--dhx-scheduler-theme\");\r\n\r\n\tlet isCssVarTheme = !!themeVar;\r\n\tlet themeName;\r\n\tlet cssValues = {};\r\n\tlet oldMaterialTheme = false;\r\n\r\n\tif(isCssVarTheme){\r\n\t\tthemeName = themeVar;\r\n\t\tfor(let i in scheduler.xy){\r\n\t\t\tcssValues[i] = styles.getPropertyValue(`--dhx-scheduler-xy-${i}`);\r\n\t\t}\r\n\r\n\t\tcssValues.hour_size_px = styles.getPropertyValue(`--dhx-scheduler-config-hour_size_px`);\r\n\t\tcssValues.wide_form = styles.getPropertyValue(`--dhx-scheduler-config-form_wide`);\r\n\r\n\t}else{\r\n\t\tthemeName = themeNameFromFile();\r\n\t\toldMaterialTheme = scheduler._is_material_skin();\r\n\t}\r\n\r\n\r\n\tscheduler._theme_info = {\r\n\t\ttheme: themeName,\r\n\t\tcssVarTheme: isCssVarTheme,\r\n\t\toldMaterialTheme: oldMaterialTheme,\r\n\t\tvalues: cssValues\r\n\t};\r\n\r\n\tif(scheduler._theme_info.cssVarTheme){\r\n\t\tconst themeVariables = this._theme_info.values;\r\n\t\tfor(let i in scheduler.xy){\r\n\t\t\tif(!isNaN(parseInt(themeVariables[i]))){\r\n\t\t\t\tscheduler.xy[i] = parseInt(themeVariables[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n\r\nvar calculatedMaterial;\r\nfunction checkIfMaterialSkin(){\r\n\tif(calculatedMaterial === undefined){\r\n\t\tvar probe = document.createElement(\"div\");\r\n\t\tprobe.style.position = \"absolute\";\r\n\t\tprobe.style.left = \"-9999px\";\r\n\t\tprobe.style.top = \"-9999px\";\r\n\t\tprobe.innerHTML = \"
\" +\r\n\t\t\t\"
\" +\r\n\t\t\t\"
\"+\r\n\t\t\"
\";\r\n\t\tdocument.body.appendChild(probe);\r\n\t\tvar styles = window.getComputedStyle(probe.querySelector(\".dhx_cal_scale_placeholder\"));\r\n\t\tvar position = styles.getPropertyValue('position');\r\n\t\tif(position === \"absolute\"){\r\n\t\t\t// page has skins for placeholder element from material skin\r\n\t\t\tcalculatedMaterial = true;\r\n\t\t}else{\r\n\t\t\tcalculatedMaterial = false;\r\n\t\t}\r\n\r\n\t\tsetTimeout(function(){\r\n\t\t\tcalculatedMaterial = null;\r\n\t\t\tif(probe && probe.parentNode){\r\n\t\t\t\tprobe.parentNode.removeChild(probe);\r\n\t\t\t}\r\n\t\t}, 500);\r\n\t}\r\n\treturn calculatedMaterial;\r\n}\r\n\r\nvar cachedBorderBoxValue;\r\nfunction checkIfBorderBoxStyling(){\r\n\tif(scheduler._is_material_skin()){\r\n\t\treturn true;\r\n\t}else{\r\n\t\tif(cachedBorderBoxValue === undefined){\r\n\t\t\tvar probe = document.createElement(\"div\");\r\n\t\t\tprobe.style.position = \"absolute\";\r\n\t\t\tprobe.style.left = \"-9999px\";\r\n\t\t\tprobe.style.top = \"-9999px\";\r\n\t\t\tprobe.innerHTML = \"
\" +\r\n\t\t\t\t\"
\" +\r\n\t\t\t\t\t\"
\"+\r\n\t\t\t\t\"
\"+\r\n\t\t\t\"
\";\r\n\r\n\t\t\tdocument.body.appendChild(probe);\r\n\t\t\tvar styles = window.getComputedStyle(probe.querySelector(\".dhx_body\"));\r\n\t\t\tvar boxSizing = styles.getPropertyValue('box-sizing');\r\n\t\t\tdocument.body.removeChild(probe);\r\n\t\t\tcachedBorderBoxValue = !!(boxSizing === \"border-box\");\r\n\r\n\t\t\tif(!cachedBorderBoxValue){\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tcachedBorderBoxValue = undefined;\r\n\t\t\t\t}, 1000);// recalculate in case scheduler initialized before skin is loaded\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn cachedBorderBoxValue;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction refreshAfterLoad(){\r\n\tif(scheduler._is_material_skin() || scheduler._border_box_events()){\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar oldStyling = cachedBorderBoxValue;\r\n\tcachedBorderBoxValue = undefined;\r\n\tcalculatedMaterial = undefined;\r\n\tvar newStyling = checkIfBorderBoxStyling();\r\n\r\n\t// if box styling model changed - means scheduler was rendered before stylesheet was loaded or parsed inline\r\n\t// repaint scheduler in order to apply new styles\r\n\tif(oldStyling !== newStyling && scheduler.$container && scheduler.getState().mode){\r\n\t\tscheduler.setCurrentView();\r\n\t}\r\n}\r\nscheduler.event(window, 'DOMContentLoaded', refreshAfterLoad);\r\nscheduler.event(window, 'load', refreshAfterLoad);\r\n\r\nscheduler._border_box_events = function(){\r\n\treturn checkIfBorderBoxStyling();\r\n};\r\n\r\nscheduler._configure = function(col, data, skin){\r\n\tfor (var key in data)\r\n\t\tif (typeof col[key] == \"undefined\")\r\n\t\t\tcol[key] = data[key][skin];\r\n};\r\n\r\nscheduler.setSkin = function(value){\r\n\tthis.skin = value;\r\n\tscheduler._addThemeClass();\r\n\tif(scheduler.$container){\r\n\t\tthis._skin_init();\r\n\t\tthis.render();\r\n\t}\r\n\t\r\n\t//\r\n};\r\n\r\nfunction flatSkinHourScale(date){\r\n\tvar min = date.getMinutes();\r\n\tmin = min < 10 ? \"0\"+min : min;\r\n\tvar html = \"\"+ date.getHours() +\"\"+\r\n\t\t\" \"+ min +\"\";\r\n\treturn html;\r\n}\r\n\r\nlet monitorIntervalId = null;\r\nfunction monitorThemeChange(){\r\n\tconst container = scheduler.$container;\r\n\t\r\n\tclearInterval(monitorIntervalId);\r\n\tif(container){\r\n\t\tmonitorIntervalId = setInterval(() => {\r\n\t\t\tconst csstheme = getComputedStyle(container).getPropertyValue('--dhx-scheduler-theme');\r\n\t\t\tif(csstheme && csstheme !== scheduler.skin){\r\n\t\t\t\tscheduler.setSkin(csstheme);\r\n\t\t\t}\r\n\r\n\t\t}, 100);\r\n\t}\r\n}\r\nscheduler.attachEvent(\"onDestroy\", function(){\r\n\tclearInterval(monitorIntervalId);\r\n});\r\n\r\nscheduler._skin_init = function(){\r\n\tthis._build_skin_info();\r\n\r\n\tif (!this.skin){\r\n\t\tthis.skin = this._theme_info.theme;\r\n\t}\r\n\tscheduler._addThemeClass();\r\n\tif (scheduler.skin === \"flat\"){\r\n\t\t// scheduler.xy.scale_height = 35;\r\n\t\tscheduler.templates.hour_scale = flatSkinHourScale;\r\n\t}else if (scheduler.templates.hour_scale === flatSkinHourScale){\r\n\t\tscheduler.templates.hour_scale = scheduler.date.date_to_str(scheduler.config.hour_date);\r\n\t}\r\n\r\n\r\n\r\n\t//scheduler._lightbox_template=\"
 
\";\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\r\n\t\tvar date_to_str = scheduler.date.date_to_str(\"%d\");\r\n\t\tif(!scheduler.templates._old_month_day){\r\n\t\t\tscheduler.templates._old_month_day = scheduler.templates.month_day;\r\n\t\t}\r\n\t\tvar old_month_day = scheduler.templates._old_month_day;\r\n\t\tscheduler.templates.month_day = function(date) {\r\n\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\tvar label = date_to_str(date);\r\n\t\t\t\tif (date.getDate() == 1) {\r\n\t\t\t\t\tlabel = scheduler.locale.date.month_full[date.getMonth()] + \" \" + label;\r\n\t\t\t\t}\r\n\t\t\t\tif (+date == +scheduler.date.date_part(this._currentDate())) {\r\n\t\t\t\t\tlabel = scheduler.locale.labels.dhx_cal_today_button + \" \" + label;\r\n\t\t\t\t}\r\n\t\t\t\treturn label;\r\n\t\t\t} else {\r\n\t\t\t\treturn old_month_day.call(this, date);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t// tab classes\r\n\t\tif(scheduler.config.fix_tab_position){\r\n\t\t\tconst tabs = scheduler._els[\"dhx_cal_navline\"][0].querySelectorAll('[data-tab]');\r\n\t\t\ttabs.forEach((tab) => {\r\n\t\t\t\tconst view = tab.getAttribute(\"data-tab\") || tab.getAttribute(\"name\");\r\n\r\n\t\t\t\tswitch (view) {\r\n\t\t\t\t\tcase \"day\":\r\n\t\t\t\t\tcase \"day_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_first\");\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"week\":\r\n\t\t\t\t\tcase \"week_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"month\":\r\n\t\t\t\t\tcase \"month_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_last\");\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_standalone\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\treorderTabs(scheduler._els[\"dhx_cal_navline\"][0]);\r\n\r\n\t\t}\r\n\t}, {once: true});\r\n\r\n\tfunction reorderTabs(container) {\r\n\t\t// segmented tabs should go first\r\n\r\n\t\tif(scheduler.config.header){\r\n\t\t\treturn;\r\n\t\t\t// don't reorder tabs if header is defined via config\r\n\t\t}\r\n\t\tconst tabs = Array.from(container.querySelectorAll('.dhx_cal_tab'));\r\n\t\r\n\t\t// segmented tabs\r\n\t\tconst order = ['day', 'week', 'month'];\r\n\t\r\n\t\tconst specialTabs = order.map(tabName => \r\n\t\t\ttabs.find(tab => tab.getAttribute('data-tab') === tabName)\r\n\t\t).filter(tab => tab !== undefined);\r\n\t\r\n\t\tlet firstTab = tabs.length > 0 ? tabs[0] : null;\r\n\r\n\t\tspecialTabs.reverse().forEach(tab => {\r\n\t\t\tcontainer.insertBefore(tab, firstTab);\r\n\t\t\tfirstTab = tab;\r\n\t\t});\r\n\t}\r\n\r\n\t// scheduler._skin_init = function(){\r\n\t// \tthis._build_skin_info();\r\n\t// \tthis.skin = this._theme_info.theme;\r\n\t// };\r\n};\r\n\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nif (window.jQuery){\r\n\r\n(function( $ ){\r\n\tvar counter = 0;\r\n\tvar methods = [];\r\n\t$.fn.dhx_scheduler = function(config){\r\n\t\tif (typeof(config) === 'string') {\r\n\t\t\tif (methods[config] ) {\r\n\t\t\t\treturn methods[config].apply(this, []);\r\n\t\t\t}else {\r\n\t\t\t\t$.error('Method ' + config + ' does not exist on jQuery.dhx_scheduler');\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvar views = [];\r\n\t\t\tthis.each(function() {\r\n\t\t\t\tif (this && this.getAttribute){\r\n\t\t\t\t\tif (!this.getAttribute(\"dhxscheduler\")){\r\n\t\t\t\t\t\tvar name = \"scheduler\";\r\n\t\t\t\t\t\tif (counter){\r\n\t\t\t\t\t\t\tname = \"scheduler\" + (counter+1);\r\n\t\t\t\t\t\t\twindow[name] = Scheduler.getSchedulerInstance();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tvar comp = window[name];\r\n\r\n\t\t\t\t\t\tthis.setAttribute(\"dhxscheduler\", name);\r\n\t\t\t\t\t\tfor (var key in config)\r\n\t\t\t\t\t\t\tif (key!=\"data\")\r\n\t\t\t\t\t\t\t\tcomp.config[key] = config[key];\r\n\r\n\t\t\t\t\t\tif (!this.getElementsByTagName(\"div\").length){\r\n\t\t\t\t\t\t\tthis.innerHTML = '
';\r\n\t\t\t\t\t\t\tthis.className += \" dhx_cal_container\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcomp.init(this, comp.config.date, comp.config.mode);\r\n\t\t\t\t\t\tif (config.data)\r\n\t\t\t\t\t\t\tcomp.parse(config.data);\r\n\r\n\t\t\t\t\t\tviews.push(comp);\r\n\t\t\t\t\t\tcounter++;\r\n\t\t\t\t\t} else\r\n\t\t\t\t\t\tviews.push(window[this.getAttribute(\"dhxscheduler\")]);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif (views.length === 1) return views[0];\r\n\t\t\treturn views;\r\n\t\t}\r\n\t};\r\n\r\n\r\n\r\n\r\n})(window.jQuery);\r\n\r\n}\r\n\r\n}","import global from \"../global\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\n(function(){\r\n\r\n\tvar setCurrentView = scheduler.setCurrentView,\r\n\t\tupdateView = scheduler.updateView;\r\n\tvar update_view_timer = null,\r\n\t\tcurr_view_timer = null;\r\n\r\n\tvar lazy_setCurrentView = function(date, mode){\r\n\t\tvar self = this;\r\n\t\tglobal.clearTimeout(curr_view_timer);\r\n\t\tglobal.clearTimeout(update_view_timer);\r\n\r\n\t\tvar oldDate = self._date,\r\n\t\t\toldMode = self._mode;\r\n\t\tupdateFlags(this, date, mode);\r\n\r\n\t\tcurr_view_timer = setTimeout(function(){\r\n\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif (!self.callEvent(\"onBeforeViewChange\", [oldMode, oldDate, mode || self._mode, date || self._date])){\r\n\t\t\t\tupdateFlags(self, oldDate, oldMode);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tupdateView.call(self, date, mode);\r\n\t\t\tself.callEvent(\"onViewChange\", [self._mode, self._date]);\r\n\r\n\t\t\tglobal.clearTimeout(update_view_timer);\r\n\t\t\tcurr_view_timer = 0;\r\n\t\t}, scheduler.config.delay_render);\r\n\t};\r\n\tvar lazy_updateView = function(date, mode){\r\n\t\tvar self = this,\r\n\t\t\tars = arguments;\r\n\r\n\t\tupdateFlags(this, date, mode);\r\n\r\n\t\tglobal.clearTimeout(update_view_timer);\r\n\t\tupdate_view_timer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif(curr_view_timer)\r\n\t\t\t\treturn;\r\n\r\n\t\t\tupdateView.apply(self, ars);\r\n\t\t}, scheduler.config.delay_render);\r\n\t};\r\n\tfunction updateFlags(scheduler, date, mode){\r\n\t\tif(date)\r\n\t\t\tscheduler._date = date;\r\n\t\tif(mode)\r\n\t\t\tscheduler._mode = mode;\r\n\r\n\t}\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\tif(scheduler.config.delay_render){\r\n\t\t\tscheduler.setCurrentView = lazy_setCurrentView;\r\n\t\t\tscheduler.updateView = lazy_updateView;\r\n\t\t}else{\r\n\t\t\tscheduler.setCurrentView = setCurrentView;\r\n\t\t\tscheduler.updateView = updateView;\r\n\t\t}\r\n\t});\r\n\r\n})();\r\n\r\n}","export default function DataProcessorEvents(scheduler, dp){\r\n\tthis.$scheduler = scheduler;\r\n\tthis.$dp = dp;\r\n\tthis._dataProcessorHandlers = [];\r\n\r\n\tthis.attach = function () {\r\n\t\tvar dp = this.$dp;\r\n\t\tvar scheduler = this.$scheduler;\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onEventAdded\", function(id) {\r\n\t\t\tif (!this._loading && this._validId(id))\r\n\t\t\tdp.setUpdated(id,true,\"inserted\");\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function(id) {\r\n\t\t\tif (!this._validId(id)) return;\r\n\t\t\tvar z=dp.getState(id);\r\n\r\n\t\t\tif (z==\"inserted\" || this._new_event) { dp.setUpdated(id,false); return true; }\r\n\t\t\tif (z==\"deleted\") return false;\r\n\t\t\tif (z==\"true_deleted\") return true;\r\n\r\n\t\t\tdp.setUpdated(id,true,\"deleted\");\r\n\t\t\treturn false;\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onEventChanged\", function(id) { \r\n\t\t\tif (!this._loading && this._validId(id))\r\n\t\t\tdp.setUpdated(id,true,\"updated\");\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onClearAll\", function() { \r\n\t\t\t// clear dataprocessor state when scheduler is reset\r\n\t\t\tdp._in_progress={};\r\n\t\t\tdp._invalid={};\r\n\t\t\tdp.updatedRows = [];\r\n\t\t\tdp._waitMode = 0;\r\n\t\t}));\r\n\r\n\t\tdp.attachEvent(\"insertCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"updateCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"deleteCallback\", function(upd, id) {\r\n\t\t\tif (scheduler.getEvent(id)){\r\n\t\t\t\tscheduler.setUserData(id, this.action_param, \"true_deleted\");\r\n\t\t\t\tscheduler.deleteEvent(id);\r\n\t\t\t} else if (scheduler._add_rec_marker)\r\n\t\t\t\tscheduler._update_callback(upd, id);\r\n\t\t});\r\n\t};\r\n\r\n\tthis.detach = function () {\r\n\t\tfor (var key in this._dataProcessorHandlers) {\r\n\t\t\tvar handler = this._dataProcessorHandlers[key];\r\n\t\t\tthis.$scheduler.detachEvent(handler);\r\n\t\t}\r\n\t\tthis._dataProcessorHandlers = [];\r\n\t};\r\n}\r\n\r\nexport function extendScheduler(scheduler, dp){\r\n\tscheduler._validId=function(id){\r\n\t\tif(this._is_virtual_event){\r\n\t\t\treturn !this._is_virtual_event(id);\r\n\t\t}\r\n\t\treturn true;\r\n\t};\r\n\tscheduler.setUserData=function(id,name,value){\r\n\t\tif (id){\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif(ev) ev[name]=value;\r\n\t\t}else{\r\n\t\t\tthis._userdata[name]=value;\r\n\t\t}\r\n\t};\r\n\tscheduler.getUserData=function(id,name){\r\n\t\tif (id){\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif(ev)\r\n\t\t\t\treturn ev[name];\r\n\t\t\telse\r\n\t\t\t\treturn null;\r\n\t\t}else{\r\n\t\t\treturn this._userdata[name];\r\n\t\t}\r\n\t};\r\n\tscheduler._set_event_text_style=function(id,style){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\t\tthis.for_rendered(id,function(r){\r\n\t\t\tr.style.cssText+=\";\"+style;\r\n\t\t});\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tev[\"_text_style\"]=style;\r\n\t\tthis.event_updated(ev);\r\n\t};\r\n\tscheduler._update_callback = function(upd,id){\r\n\t\tvar data = scheduler._xmlNodeToJSON(upd.firstChild);\r\n\t\t//fix for updates of recurring events\r\n\t\tif (data.rec_type == \"none\") data.rec_pattern = \"none\";\r\n\t\tdata.text = data.text||data._tagvalue;\r\n\t\tdata.start_date = scheduler._helpers.parseDate(data.start_date);\r\n\t\tdata.end_date = scheduler._helpers.parseDate(data.end_date);\r\n\t\tscheduler.addEvent(data);\r\n\t\tif (scheduler._add_rec_marker)\r\n\t\t\tscheduler.setCurrentView();\r\n\t};\r\n\tscheduler._dp_change_event_id = function(id, new_id){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\t\tscheduler.changeEventId(id, new_id);\r\n\t};\r\n\tscheduler._dp_hook_delete = function(id, new_id){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\r\n\t\tif(new_id && id != new_id){\r\n\t\t\tif(this.getUserData(id, dp.action_param) == \"true_deleted\")\r\n\t\t\t\tthis.setUserData(id, dp.action_param, \"updated\");\r\n\r\n\t\t\tthis.changeEventId(id, new_id);\r\n\t\t}\r\n\t\treturn this.deleteEvent(new_id, true);\r\n\t};\r\n\r\n\tscheduler.setDp = function() {\r\n\t\tthis._dp = dp;\r\n\t};\r\n\tscheduler.setDp();\r\n}","import DataProcessorEvents from \"./dataprocessor_hooks\";\r\nimport { extendScheduler } from \"./dataprocessor_hooks\";\r\nimport eventable from \"../../utils/eventable\";\r\nimport global from \"../../global\";\r\n\r\n/**\r\n *\t@desc: constructor, data processor object\r\n *\t@param: serverProcessorURL - url used for update\r\n *\t@type: public\r\n */\r\nexport function DataProcessor(serverProcessorURL){\r\n\tthis.serverProcessor = serverProcessorURL;\r\n\tthis.action_param = \"!nativeeditor_status\";\r\n\r\n\tthis.object = null;\r\n\tthis.updatedRows = []; // ids of updated rows\r\n\r\n\tthis.autoUpdate = true;\r\n\tthis.updateMode = \"cell\";\r\n\tthis._tMode = \"GET\";\r\n\tthis._headers = null;\r\n\tthis._payload = null;\r\n\tthis.post_delim = \"_\";\r\n\r\n\tthis._waitMode = 0;\r\n\tthis._in_progress = {};\r\n\tthis._invalid = {};\r\n\tthis.messages = [];\r\n\r\n\tthis.styles = {\r\n\t\tupdated: \"font-weight:bold;\",\r\n\t\tinserted: \"font-weight:bold;\",\r\n\t\tdeleted: \"text-decoration : line-through;\",\r\n\t\tinvalid: \"background-color:FFE0E0;\",\r\n\t\tinvalid_cell: \"border-bottom:2px solid red;\",\r\n\t\terror: \"color:red;\",\r\n\t\tclear: \"font-weight:normal;text-decoration:none;\"\r\n\t};\r\n\tthis.enableUTFencoding(true);\r\n\teventable(this); // TODO: need to update\r\n\r\n\treturn this;\r\n}\r\nDataProcessor.prototype = {\r\n\tsetTransactionMode: function (mode, total) {\r\n\t\tif (typeof mode == \"object\") {\r\n\t\t\tthis._tMode = mode.mode || this._tMode;\r\n\r\n\t\t\tif (mode.headers !== undefined) {\r\n\t\t\t\tthis._headers = mode.headers;\r\n\t\t\t}\r\n\r\n\t\t\tif (mode.payload !== undefined) {\r\n\t\t\t\tthis._payload = mode.payload;\r\n\t\t\t}\r\n\t\t\tthis._tSend = !!total;\r\n\t\t} else {\r\n\t\t\tthis._tMode = mode;\r\n\t\t\tthis._tSend = total;\r\n\t\t}\r\n\r\n\t\tif (this._tMode == \"REST\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t}\r\n\r\n\t\tif (this._tMode === \"JSON\" || this._tMode === \"REST-JSON\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t\tthis._serializeAsJson = true;\r\n\t\t\tthis._headers = this._headers || {};\r\n\t\t\tthis._headers[\"Content-Type\"] = \"application/json\";\r\n\t\t}else{\r\n\t\t\tif(this._headers && !this._headers[\"Content-Type\"]){\r\n\t\t\t\tthis._headers[\"Content-Type\"] = \"application/x-www-form-urlencoded\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (this._tMode === \"CUSTOM\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t\tthis._router = mode.router;\r\n\t\t}\r\n\t},\r\n\tescape: function (data) {\r\n\t\tif (this._utf)\r\n\t\t\treturn encodeURIComponent(data);\r\n\t\telse\r\n\t\t\treturn escape(data);\r\n\t},\r\n\t/**\r\n\t *\t@desc: allows to set escaping mode\r\n\t *\t@param: true - utf based escaping, simple - use current page encoding\r\n\t *\t@type: public\r\n\t */\r\n\tenableUTFencoding: function (mode) {\r\n\t\tthis._utf = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: allows to define, which column may trigger update\r\n\t *\t@param: val - array or list of true/false values\r\n\t *\t@type: public\r\n\t */\r\n\tsetDataColumns: function (val) {\r\n\t\tthis._columns = (typeof val == \"string\") ? val.split(\",\") : val;\r\n\t},\r\n\t/**\r\n\t *\t@desc: get state of updating\r\n\t *\t@returns: true - all in sync with server, false - some items not updated yet.\r\n\t *\t@type: public\r\n\t */\r\n\tgetSyncState: function () {\r\n\t\treturn !this.updatedRows.length;\r\n\t},\r\n\t/**\r\n\t *\t@desc: enable/disable named field for data syncing, will use column ids for grid\r\n\t *\t@param: mode - true/false\r\n\t *\t@type: public\r\n\t */\r\n\tenableDataNames: function (mode) {\r\n\t\tthis._endnm = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: enable/disable mode , when only changed fields and row id send to the server side, instead of all fields in default mode\r\n\t *\t@param: mode - true/false\r\n\t *\t@type: public\r\n\t */\r\n\tenablePartialDataSend: function (mode) {\r\n\t\tthis._changed = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: set if rows should be send to server automatically\r\n\t *\t@param: mode - \"row\" - based on row selection changed, \"cell\" - based on cell editing finished, \"off\" - manual data sending\r\n\t *\t@type: public\r\n\t */\r\n\tsetUpdateMode: function (mode, dnd) {\r\n\t\tthis.autoUpdate = (mode == \"cell\");\r\n\t\tthis.updateMode = mode;\r\n\t\tthis.dnd = dnd;\r\n\t},\r\n\tignore: function (code, master) {\r\n\t\tthis._silent_mode = true;\r\n\t\tcode.call(master || window);\r\n\t\tthis._silent_mode = false;\r\n\t},\r\n\t/**\r\n\t *\t@desc: mark row as updated/normal. check mandatory fields,initiate autoupdate (if turned on)\r\n\t *\t@param: rowId - id of row to set update-status for\r\n\t *\t@param: state - true for \"updated\", false for \"not updated\"\r\n\t *\t@param: mode - update mode name\r\n\t *\t@type: public\r\n\t */\r\n\tsetUpdated: function (rowId, state, mode) {\r\n\t\tif (this._silent_mode) return;\r\n\t\tvar ind = this.findRow(rowId);\r\n\r\n\t\tmode = mode || \"updated\";\r\n\t\tvar existing = this.$scheduler.getUserData(rowId, this.action_param);\r\n\t\tif (existing && mode == \"updated\") mode = existing;\r\n\t\tif (state) {\r\n\t\t\tthis.set_invalid(rowId, false); //clear previous error flag\r\n\t\t\tthis.updatedRows[ind] = rowId;\r\n\t\t\tthis.$scheduler.setUserData(rowId, this.action_param, mode);\r\n\t\t\tif (this._in_progress[rowId])\r\n\t\t\t\tthis._in_progress[rowId] = \"wait\";\r\n\t\t} else {\r\n\t\t\tif (!this.is_invalid(rowId)) {\r\n\t\t\t\tthis.updatedRows.splice(ind, 1);\r\n\t\t\t\tthis.$scheduler.setUserData(rowId, this.action_param, \"\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.markRow(rowId, state, mode);\r\n\t\tif (state && this.autoUpdate) this.sendData(rowId);\r\n\t},\r\n\r\n\tmarkRow: function (id, state, mode) {\r\n\t\tvar str = \"\";\r\n\t\tvar invalid = this.is_invalid(id);\r\n\t\tif (invalid) {\r\n\t\t\tstr = this.styles[invalid];\r\n\t\t\tstate = true;\r\n\t\t}\r\n\t\tif (this.callEvent(\"onRowMark\", [id, state, mode, invalid])) {\r\n\t\t\t//default logic\r\n\t\t\tstr = this.styles[state ? mode : \"clear\"] + str;\r\n\r\n\t\t\tthis.$scheduler[this._methods[0]](id, str);\r\n\r\n\t\t\tif (invalid && invalid.details) {\r\n\t\t\t\tstr += this.styles[invalid + \"_cell\"];\r\n\t\t\t\tfor (var i = 0; i < invalid.details.length; i++)\r\n\t\t\t\t\tif (invalid.details[i])\r\n\t\t\t\t\t\tthis.$scheduler[this._methods[1]](id, i, str);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tgetActionByState: function(state) {\r\n\t\tif (state === \"inserted\") {\r\n\t\t\treturn \"create\";\r\n\t\t}\r\n\t\tif (state === \"updated\") {\r\n\t\t\treturn \"update\";\r\n\t\t}\r\n\t\tif (state === \"deleted\") {\r\n\t\t\treturn \"delete\";\r\n\t\t}\r\n\t\treturn \"update\";\r\n\t},\r\n\r\n\tgetState: function (id) {\r\n\t\treturn this.$scheduler.getUserData(id, this.action_param);\r\n\t},\r\n\tis_invalid: function (id) {\r\n\t\treturn this._invalid[id];\r\n\t},\r\n\tset_invalid: function (id, mode, details) {\r\n\t\tif (details) mode = {\r\n\t\t\tvalue: mode, details: details, toString: function () {\r\n\t\t\t\treturn this.value.toString();\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis._invalid[id] = mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: check mandatory fields and varify values of cells, initiate update (if specified)\r\n\t *\t@param: rowId - id of row to set update-status for\r\n\t *\t@type: public\r\n\t */\r\n\tcheckBeforeUpdate: function (rowId) {\r\n\t\treturn true;\r\n\t},\r\n\t/**\r\n\t *\t@desc: send row(s) values to server\r\n\t *\t@param: rowId - id of row which data to send. If not specified, then all \"updated\" rows will be send\r\n\t *\t@type: public\r\n\t */\r\n\tsendData: function (rowId) {\r\n\t\tif (this.$scheduler.editStop) this.$scheduler.editStop();\r\n\r\n\t\tif (typeof rowId == \"undefined\" || this._tSend) return this.sendAllData();\r\n\t\tif (this._in_progress[rowId]) return false;\r\n\r\n\t\tthis.messages = [];\r\n\t\tif (!this.checkBeforeUpdate(rowId) && this.callEvent(\"onValidationError\", [rowId, this.messages])) return false;\r\n\t\tthis._beforeSendData(this._getRowData(rowId), rowId);\r\n\t},\r\n\t_beforeSendData: function (data, rowId) {\r\n\t\tif (!this.callEvent(\"onBeforeUpdate\", [rowId, this.getState(rowId), data])) return false;\r\n\t\tthis._sendData(data, rowId);\r\n\t},\r\n\tserialize: function (data, id) {\r\n\t\tif (this._serializeAsJson) {\r\n\t\t\treturn this._serializeAsJSON(data);\r\n\t\t}\r\n\r\n\t\tif (typeof data == \"string\")\r\n\t\t\treturn data;\r\n\t\tif (typeof id != \"undefined\")\r\n\t\t\treturn this.serialize_one(data, \"\");\r\n\t\telse {\r\n\t\t\tvar stack = [];\r\n\t\t\tvar keys = [];\r\n\t\t\tfor (var key in data)\r\n\t\t\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\t\t\tstack.push(this.serialize_one(data[key], key + this.post_delim));\r\n\t\t\t\t\tkeys.push(key);\r\n\t\t\t\t}\r\n\t\t\tstack.push(\"ids=\" + this.escape(keys.join(\",\")));\r\n\t\t\tif (this.$scheduler.security_key)\r\n\t\t\t\tstack.push(\"dhx_security=\" + (this.$scheduler.security_key));\r\n\t\t\treturn stack.join(\"&\");\r\n\t\t}\r\n\t},\r\n\tserialize_one: function (data, pref) {\r\n\t\tif (typeof data == \"string\")\r\n\t\t\treturn data;\r\n\t\tvar stack = [];\r\n\t\tvar serialized = \"\";\r\n\t\tfor (var key in data)\r\n\t\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\t\tif ((key == \"id\" || key == this.action_param) && this._tMode == \"REST\") continue;\r\n\t\t\t\tif (typeof data[key] === \"string\" || typeof data[key] === \"number\") {\r\n\t\t\t\t\tserialized = data[key];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tserialized = JSON.stringify(data[key]);\r\n\t\t\t\t}\r\n\t\t\t\tstack.push(this.escape((pref || \"\") + key) + \"=\" + this.escape(serialized));\r\n\t\t\t}\r\n\t\treturn stack.join(\"&\");\r\n\t},\r\n\t_applyPayload: function (url) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tif (this._payload)\r\n\t\t\tfor (var key in this._payload)\r\n\t\t\t\turl = url + ajax.urlSeparator(url) + this.escape(key) + \"=\" + this.escape(this._payload[key]);\r\n\t\treturn url;\r\n\t},\r\n\t_sendData: function (dataToSend, rowId) {\r\n\t\tif (!dataToSend) {\r\n\t\t\treturn; // nothing to send\r\n\t\t}\r\n\t\tif (!this.callEvent(\"onBeforeDataSending\", rowId ? [rowId, this.getState(rowId), dataToSend] : [null, null, dataToSend])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (rowId) {\r\n\t\t\tthis._in_progress[rowId] = (new Date()).valueOf();\r\n\t\t}\r\n\r\n\t\tvar self = this;\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\r\n\t\tif (this._tMode === \"CUSTOM\") {\r\n\t\t\tvar state = this.getState(rowId);\r\n\t\t\tvar action = this.getActionByState(state);\r\n\t\t\tvar _onResolvedCreateUpdate = function (tag) {\r\n\t\t\t\tvar resultState = state;\r\n\t\t\t\tif(tag && tag.responseText && tag.setRequestHeader){\r\n\t\t\t\t\tif(tag.status !== 200){\r\n\t\t\t\t\t\tresultState = \"error\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\ttag = JSON.parse(tag.responseText);\r\n\t\t\t\t\t} catch (e){}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tresultState = resultState || \"updated\";\r\n\t\t\t\tvar sid = rowId;\r\n\t\t\t\tvar tid = rowId;\r\n\r\n\t\t\t\tif (tag) {\r\n\t\t\t\t\tresultState = tag.action || resultState;\r\n\t\t\t\t\tsid = tag.sid || sid;\r\n\t\t\t\t\ttid = tag.id || tag.tid || tid;\r\n\t\t\t\t}\r\n\t\t\t\tself.afterUpdateCallback(sid, tid, resultState, tag);\r\n\t\t\t};\r\n\r\n\t\t\tconst routerMode = \"event\";\r\n\t\t\tvar actionPromise;\r\n\t\t\tif (this._router instanceof Function) {\r\n\t\t\t\tactionPromise = this._router(routerMode, action, dataToSend, rowId);\r\n\t\t\t} else {\r\n\t\t\t\tswitch (state) {\r\n\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].create(dataToSend);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].delete(rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].update(dataToSend, rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(actionPromise){\r\n\t\t\t\t// neither promise nor {tid: newId} response object\r\n\t\t\t\tif(!actionPromise.then &&\r\n\t\t\t\t\t(actionPromise.id === undefined && actionPromise.tid === undefined && actionPromise.action === undefined)){\r\n\t\t\t\t\tthrow new Error(\"Incorrect router return value. A Promise or a response object is expected\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(actionPromise.then){\r\n\t\t\t\t\tactionPromise.then(_onResolvedCreateUpdate).catch(function(error) {\r\n\t\t\t\t\t\tif(error && error.action){\r\n\t\t\t\t\t\t\t_onResolvedCreateUpdate(error);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t_onResolvedCreateUpdate({ action: \"error\", value: error});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// custom method may return a response object in case of sync action\r\n\t\t\t\t\t_onResolvedCreateUpdate(actionPromise);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t_onResolvedCreateUpdate(null);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar queryParams = {\r\n\t\t\tcallback: function(xml) {\r\n\t\t\t\tvar ids = [];\r\n\r\n\t\t\t\tif (rowId) {\r\n\t\t\t\t\tids.push(rowId);\r\n\t\t\t\t} else if (dataToSend) {\r\n\t\t\t\t\tfor (var key in dataToSend) {\r\n\t\t\t\t\t\tids.push(key);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.afterUpdate(self, xml, ids);\r\n\t\t\t},\r\n\t\t\theaders: self._headers\r\n\t\t};\r\n\r\n\t\tvar urlParams = this.serverProcessor + (this._user ? (ajax.urlSeparator(this.serverProcessor) + [\"dhx_user=\" + this._user, \"dhx_version=\" + this.$scheduler.getUserData(0, \"version\")].join(\"&\")) : \"\");\r\n\t\tvar url = this._applyPayload(urlParams);\r\n\t\tvar data;\r\n\r\n\t\tswitch (this._tMode) {\r\n\t\t\tcase \"GET\":\r\n\t\t\t\tdata = this._cleanupArgumentsBeforeSend(dataToSend);\r\n\t\t\t\tqueryParams.url = url + ajax.urlSeparator(url) + this.serialize(data, rowId);\r\n\t\t\t\tqueryParams.method = \"GET\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"POST\":\r\n\t\t\t\tdata = this._cleanupArgumentsBeforeSend(dataToSend);\r\n\t\t\t\tqueryParams.url = url;\r\n\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\tqueryParams.data = this.serialize(data, rowId);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"JSON\":\r\n\t\t\t\tdata = {};\r\n\t\t\t\tvar preprocessedData = this._cleanupItemBeforeSend(dataToSend);\r\n\t\t\t\tfor (var key in preprocessedData) {\r\n\t\t\t\t\tif (key === this.action_param || key === \"id\" || key === \"gr_id\") {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdata[key] = preprocessedData[key];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tqueryParams.url = url;\r\n\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\tqueryParams.data = JSON.stringify({\r\n\t\t\t\t\tid: rowId,\r\n\t\t\t\t\taction: dataToSend[this.action_param],\r\n\t\t\t\t\tdata: data\r\n\t\t\t\t});\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"REST\":\r\n\t\t\tcase \"REST-JSON\":\r\n\t\t\t\turl = urlParams.replace(/(&|\\?)editing=true/, \"\");\r\n\t\t\t\tdata = \"\";\r\n\r\n\t\t\t\tswitch (this.getState(rowId)) {\r\n\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\t\t\tqueryParams.data = this.serialize(dataToSend, rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\tqueryParams.method = \"DELETE\";\r\n\t\t\t\t\t\turl = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + rowId;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tqueryParams.method = \"PUT\";\r\n\t\t\t\t\t\tqueryParams.data = this.serialize(dataToSend, rowId);\r\n\t\t\t\t\t\turl = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + rowId;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tqueryParams.url = this._applyPayload(url);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tthis._waitMode++;\r\n\t\treturn ajax.query(queryParams);\r\n\t},\r\n\tsendAllData: function () {\r\n\t\tif (!this.updatedRows.length || this.updateMode === \"off\") { // FIXME: need to leave checking 'this.updateMode === \"off\"'?\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.messages = [];\r\n\t\tvar valid = true;\r\n\r\n\t\tthis._forEachUpdatedRow(function(rowId) {\r\n\t\t\tvalid = valid && this.checkBeforeUpdate(rowId);\r\n\t\t});\r\n\r\n\t\tif (!valid && !this.callEvent(\"onValidationError\", [\"\", this.messages])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (this._tSend) {\r\n\t\t\tthis._sendData(this._getAllData());\r\n\t\t} else {\r\n\t\t\tthis._forEachUpdatedRow(function(rowId) {\r\n\t\t\t\tif (!this._in_progress[rowId]) {\r\n\t\t\t\t\tif (this.is_invalid(rowId)) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis._beforeSendData(this._getRowData(rowId), rowId);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\t_getAllData: function (rowId) {\r\n\t\tvar out = {};\r\n\t\tvar has_one = false;\r\n\t\tthis._forEachUpdatedRow(function(id) {\r\n\t\t\tif (this._in_progress[id] || this.is_invalid(id)){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar row = this._getRowData(id);\r\n\t\t\tif (!this.callEvent(\"onBeforeUpdate\", [id, this.getState(id), row])) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tout[id] = row;\r\n\t\t\thas_one = true;\r\n\t\t\tthis._in_progress[id] = (new Date()).valueOf();\r\n\t\t});\r\n\t\treturn has_one ? out : null;\r\n\t},\r\n\r\n\tfindRow: function (pattern) {\r\n\t\tvar i = 0;\r\n\t\tfor (i = 0; i < this.updatedRows.length; i++)\r\n\t\t\tif (pattern == this.updatedRows[i]) break;\r\n\t\treturn i;\r\n\t},\r\n\r\n\t/**\r\n\t *\t@desc: define custom actions\r\n\t *\t@param: name - name of action, same as value of action attribute\r\n\t *\t@param: handler - custom function, which receives a XMl response content for action\r\n\t *\t@type: private\r\n\t */\r\n\tdefineAction: function (name, handler) {\r\n\t\tif (!this._uActions) this._uActions = {};\r\n\t\tthis._uActions[name] = handler;\r\n\t},\r\n\r\n\t/**\r\n\t *\t @desc: used in combination with setOnBeforeUpdateHandler to create custom client-server transport system\r\n\t *\t @param: sid - id of item before update\r\n\t *\t @param: tid - id of item after up0ate\r\n\t *\t @param: action - action name\r\n\t *\t @type: public\r\n\t *\t @topic: 0\r\n\t */\r\n\tafterUpdateCallback: function (sid, tid, action, btag) {\r\n\t\tif(!this.$scheduler){\r\n\t\t\t// destructor has been called before the callback\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar marker = sid;\r\n\t\tvar correct = (action !== \"error\" && action !== \"invalid\");\r\n\t\tif (!correct) {\r\n\t\t\tthis.set_invalid(sid, action);\r\n\t\t}\r\n\t\tif ((this._uActions) && (this._uActions[action]) && (!this._uActions[action](btag))) {\r\n\t\t\treturn (delete this._in_progress[marker]);\r\n\t\t}\r\n\r\n\t\tif (this._in_progress[marker] !== \"wait\") {\r\n\t\t\tthis.setUpdated(sid, false);\r\n\t\t}\r\n\r\n\t\tvar originalSid = sid;\r\n\r\n\t\tswitch (action) {\r\n\t\t\tcase \"inserted\":\r\n\t\t\tcase \"insert\":\r\n\t\t\t\tif (tid != sid) {\r\n\t\t\t\t\tthis.setUpdated(sid, false);\r\n\t\t\t\t\tthis.$scheduler[this._methods[2]](sid, tid);\r\n\t\t\t\t\tsid = tid;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"delete\":\r\n\t\t\tcase \"deleted\":\r\n\t\t\t\tthis.$scheduler.setUserData(sid, this.action_param, \"true_deleted\");\r\n\t\t\t\tthis.$scheduler[this._methods[3]](sid, tid);\r\n\t\t\t\tdelete this._in_progress[marker];\r\n\t\t\t\treturn this.callEvent(\"onAfterUpdate\", [sid, action, tid, btag]);\r\n\t\t}\r\n\r\n\t\tif (this._in_progress[marker] !== \"wait\") {\r\n\t\t\tif (correct) {\r\n\t\t\t\tthis.$scheduler.setUserData(sid, this.action_param, \"\");\r\n\t\t\t}\r\n\t\t\tdelete this._in_progress[marker];\r\n\t\t} else {\r\n\t\t\tdelete this._in_progress[marker];\r\n\t\t\tthis.setUpdated(tid, true, this.$scheduler.getUserData(sid, this.action_param));\r\n\t\t}\r\n\r\n\t\tthis.callEvent(\"onAfterUpdate\", [originalSid, action, tid, btag]);\r\n\t},\r\n\r\n\t_errorResponse: function (xml, id){\r\n\t\tif(this.$scheduler && this.$scheduler.callEvent){\r\n\t\t\tthis.$scheduler.callEvent(\"onSaveError\", [id, xml.xmlDoc]);\r\n\t\t}\r\n\t\treturn this.cleanUpdate(id);\r\n\t},\r\n\r\n\t_setDefaultTransactionMode: function () {\r\n\t\tif (this.serverProcessor) {\r\n\t\t\tthis.setTransactionMode(\"POST\", true);\r\n\t\t\tthis.serverProcessor += (this.serverProcessor.indexOf(\"?\") !== -1 ? \"&\" : \"?\") + \"editing=true\";\r\n\t\t\tthis._serverProcessor = this.serverProcessor;\r\n\t\t}\r\n\t},\r\n\t\r\n\t/**\r\n\t *\t@desc: response from server\r\n\t *\t@param: xml - XMLLoader object with response XML\r\n\t *\t@type: private\r\n\t */\r\n\tafterUpdate: function (that, xml, id) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\r\n\t\tif (xml.xmlDoc.status !== 200){\r\n\t\t\tthis._errorResponse(xml, id);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// try to use json first\r\n\t\tvar tag;\r\n\t\ttry {\r\n\t\t\ttag = JSON.parse(xml.xmlDoc.responseText);\r\n\t\t} catch (e) {\r\n\t\t\t// empty response also can be processed by json handler\r\n\t\t\tif (!xml.xmlDoc.responseText.length) {\r\n\t\t\t\ttag = {};\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (tag) {\r\n\t\t\tvar action = tag.action || this.getState(id) || \"updated\";\r\n\t\t\tvar sid = tag.sid || id[0];\r\n\t\t\tvar tid = tag.tid || id[0];\r\n\t\t\tthat.afterUpdateCallback(sid, tid, action, tag);\r\n\t\t\tthat.finalizeUpdate();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// xml response\r\n\t\tvar top = ajax.xmltop(\"data\", xml.xmlDoc); // fix incorrect content type in IE\r\n\t\tif (!top) {\r\n\t\t\treturn this._errorResponse(xml, id);\r\n\t\t}\r\n\t\tvar atag = ajax.xpath(\"//data/action\", top);\r\n\t\tif (!atag.length) {\r\n\t\t\treturn this._errorResponse(xml, id);\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < atag.length; i++) {\r\n\t\t\tvar btag = atag[i];\r\n\t\t\tvar action = btag.getAttribute(\"type\");\r\n\t\t\tvar sid = btag.getAttribute(\"sid\");\r\n\t\t\tvar tid = btag.getAttribute(\"tid\");\r\n\r\n\t\t\tthat.afterUpdateCallback(sid, tid, action, btag);\r\n\t\t}\r\n\t\tthat.finalizeUpdate();\r\n\t},\r\n\tcleanUpdate: function (id) {\r\n\t\tif (id)\r\n\t\t\tfor (var i = 0; i < id.length; i++)\r\n\t\t\t\tdelete this._in_progress[id[i]];\r\n\t},\r\n\tfinalizeUpdate: function () {\r\n\t\tif (this._waitMode) this._waitMode--;\r\n\r\n\t\tthis.callEvent(\"onAfterUpdateFinish\", []);\r\n\t\tif (!this.updatedRows.length)\r\n\t\t\tthis.callEvent(\"onFullSync\", []);\r\n\t},\r\n\r\n\t/**\r\n\t *\t@desc: initializes data-processor\r\n\t *\t@param: scheduler - dhtmlxScheduler object to attach this data-processor to\r\n\t *\t@type: public\r\n\t */\r\n\tinit: function (scheduler) {\r\n\t\tif (this._initialized) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.$scheduler = scheduler;\r\n\t\tif (this.$scheduler._dp_init) {\r\n\t\t\tthis.$scheduler._dp_init(this);\r\n\t\t}\r\n\r\n\t\tthis._setDefaultTransactionMode();\r\n\r\n\t\tthis._methods=this._methods||[\"_set_event_text_style\",\"\",\"_dp_change_event_id\",\"_dp_hook_delete\"];\r\n\t\textendScheduler(this.$scheduler, this);\r\n\t\tvar dataProcessorEvents = new DataProcessorEvents(this.$scheduler, this);\r\n\t\tdataProcessorEvents.attach();\r\n\t\tthis.attachEvent(\"onDestroy\", function() {\r\n\t\t\tdelete this._getRowData;\r\n\r\n\t\t\tdelete this.$scheduler._dp;\r\n\t\t\tdelete this.$scheduler._dataprocessor;\r\n\t\t\tdelete this.$scheduler._set_event_text_style;\r\n\t\t\tdelete this.$scheduler._dp_change_event_id;\r\n\t\t\tdelete this.$scheduler._dp_hook_delete;\r\n\t\t\tdelete this.$scheduler;\r\n\t\t\tdataProcessorEvents.detach();\r\n\t\t});\r\n\t\tthis.$scheduler.callEvent(\"onDataProcessorReady\", [this]);\r\n\t\tthis._initialized = true;\r\n\r\n\t\tscheduler._dataprocessor=this;\r\n\t},\r\n\r\n\tsetOnAfterUpdate: function (ev) {\r\n\t\tthis.attachEvent(\"onAfterUpdate\", ev);\r\n\t},\r\n\tsetOnBeforeUpdateHandler: function (func) {\r\n\t\tthis.attachEvent(\"onBeforeDataSending\", func);\r\n\t},\r\n\r\n\t/* starts autoupdate mode\r\n\t\t@param interval time interval for sending update requests\r\n\t*/\r\n\tsetAutoUpdate: function (interval, user) {\r\n\t\tinterval = interval || 2000;\r\n\r\n\t\tthis._user = user || (new Date()).valueOf();\r\n\t\tthis._need_update = false;\r\n\t\t//this._loader = null;\r\n\t\tthis._update_busy = false;\r\n\r\n\t\tthis.attachEvent(\"onAfterUpdate\", function (sid, action, tid, xml_node) {\r\n\t\t\tthis.afterAutoUpdate(sid, action, tid, xml_node);\r\n\t\t});\r\n\t\tthis.attachEvent(\"onFullSync\", function () {\r\n\t\t\tthis.fullSync();\r\n\t\t});\r\n\r\n\t\tvar self = this;\r\n\t\tlet intervalId = global.setInterval(function () {\r\n\t\t\tself.loadUpdate();\r\n\t\t}, interval);\r\n\t\tthis.attachEvent(\"onDestroy\", function(){\r\n\t\t\tclearInterval(intervalId);\r\n\t\t});\r\n\t},\r\n\r\n\t/* process updating request answer\r\n\t\tif status == collision version is deprecated\r\n\t\tset flag for autoupdating immediately\r\n\t*/\r\n\tafterAutoUpdate: function (sid, action, tid, xml_node) {\r\n\t\tif (action == 'collision') {\r\n\t\t\tthis._need_update = true;\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t},\r\n\r\n\t/* callback function for onFillSync event\r\n\t\tcall update function if it's need\r\n\t*/\r\n\tfullSync: function () {\r\n\t\tif (this._need_update) {\r\n\t\t\tthis._need_update = false;\r\n\t\t\tthis.loadUpdate();\r\n\t\t}\r\n\t\treturn true;\r\n\t},\r\n\r\n\t/* sends query to the server and call callback function\r\n\t*/\r\n\tgetUpdates: function (url, callback) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tif (this._update_busy)\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\tthis._update_busy = true;\r\n\r\n\t\tajax.get(url, callback);\r\n\t},\r\n\r\n\t/* returns xml node value\r\n\t\t@param node\r\n\t\t\txml node\r\n\t*/\r\n\t_getXmlNodeValue: function(node) {\r\n\t\tif (node.firstChild) {\r\n\t\t\treturn node.firstChild.nodeValue;\r\n\t\t}\r\n\t\treturn \"\";\r\n\t},\r\n\r\n\t/* loads updates and processes them\r\n\t*/\r\n\tloadUpdate: function () {\r\n\t\tvar self = this;\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tvar version = this.$scheduler.getUserData(0, \"version\");\r\n\t\tvar url = this.serverProcessor + ajax.urlSeparator(this.serverProcessor) + [\"dhx_user=\" + this._user, \"dhx_version=\" + version].join(\"&\");\r\n\t\turl = url.replace(\"editing=true&\", \"\");\r\n\t\tthis.getUpdates(url, function (xml) {\r\n\t\t\tvar vers = ajax.xpath(\"//userdata\", xml);\r\n\t\t\tself.$scheduler.setUserData(0, \"version\", self._getXmlNodeValue(vers[0]));\r\n\r\n\t\t\tvar updates = ajax.xpath(\"//update\", xml);\r\n\t\t\tif (updates.length) {\r\n\t\t\t\tself._silent_mode = true;\r\n\r\n\t\t\t\tfor (var i = 0; i < updates.length; i++) {\r\n\t\t\t\t\tvar status = updates[i].getAttribute(\"status\");\r\n\t\t\t\t\tvar id = updates[i].getAttribute(\"id\");\r\n\t\t\t\t\tvar parent = updates[i].getAttribute(\"parent\");\r\n\t\t\t\t\tswitch (status) {\r\n\t\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"insertCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"updated\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"updateCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"deleteCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tself._silent_mode = false;\r\n\t\t\t}\r\n\t\t\tself._update_busy = false;\r\n\t\t\tself = null;\r\n\t\t});\r\n\t},\r\n\r\n\tdestructor: function() {\r\n\t\tthis.callEvent(\"onDestroy\", []);\r\n\t\tthis.detachAllEvents();\r\n\r\n\t\tthis.updatedRows = [];\r\n\t\tthis._in_progress = {};\r\n\t\tthis._invalid = {};\r\n\t\tthis._headers = null;\r\n\t\tthis._payload = null;\r\n\t\tdelete this._initialized;\r\n\t},\r\n\r\n\turl: function(url) {\r\n\t\tthis.serverProcessor = this._serverProcessor = url;\r\n\t},\r\n\r\n\t_serializeAsJSON: function(data) {\r\n\t\tif (typeof data === \"string\") {\r\n\t\t\treturn data;\r\n\t\t}\r\n\r\n\t\tvar copy = this.$scheduler.utils.copy(data);\r\n\t\tif (this._tMode === \"REST-JSON\") {\r\n\t\t\tdelete copy.id;\r\n\t\t\tdelete copy[this.action_param];\r\n\t\t}\r\n\r\n\t\treturn JSON.stringify(copy);\r\n\t},\r\n\r\n\t// GET/POST/JSON modes of the dataProcessor didn't send the whole data items in 'delete' requests\r\n\t// clear extra info from the data in order not to change the request format\r\n\t_cleanupArgumentsBeforeSend: function(dataToSend) {\r\n\t\tvar processedData;\r\n\t\tif(dataToSend[this.action_param] === undefined){// hash of updated items, and not an individual item\r\n\t\t\tprocessedData = {};\r\n\t\t\tfor(var i in dataToSend) {\r\n\t\t\t\tprocessedData[i] = this._cleanupArgumentsBeforeSend(dataToSend[i]);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tprocessedData = this._cleanupItemBeforeSend(dataToSend);\r\n\t\t}\r\n\t\treturn processedData;\r\n\t},\r\n\t_cleanupItemBeforeSend: function(updatedItem) {\r\n\t\tvar output = null;\r\n\t\tif(updatedItem){\r\n\t\t\tif(updatedItem[this.action_param] === \"deleted\"){\r\n\t\t\t\toutput = {};\r\n\t\t\t\toutput.id = updatedItem.id;\r\n\t\t\t\toutput[this.action_param] = updatedItem[this.action_param];\r\n\t\t\t}else{\r\n\t\t\t\toutput = updatedItem;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn output;\r\n\t},\r\n\r\n\t_forEachUpdatedRow: function(code) {\r\n\t\tvar updatedRows = this.updatedRows.slice();\r\n\t\tfor (var i = 0; i < updatedRows.length; i++) {\r\n\t\t\tvar rowId = updatedRows[i];\r\n\t\t\tif (this.$scheduler.getUserData(rowId, this.action_param)) {\r\n\t\t\t\tcode.call(this, rowId);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\t_prepareItemForJson(item){\r\n\t\tconst processedItem = {};\r\n\t\tconst scheduler = this.$scheduler;\r\n\t\tconst copy = scheduler.utils.copy(item);\r\n\t\tfor (let i in copy) {\r\n\t\t\tlet prop = copy[i];\r\n\t\t\tif (i.indexOf(\"_\") === 0) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} else if (prop){\r\n\t\t\t\tif(prop.getUTCFullYear){\r\n\t\t\t\t\tprocessedItem[i] = scheduler._helpers.formatDate(prop);\r\n\t\t\t\t} else if(typeof prop == \"object\") {\r\n\t\t\t\t\tprocessedItem[i] = this._prepareItemForJson(prop);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprocessedItem[i] = prop; \r\n\t\t\t\t}\r\n\t\t\t} else if (prop !== undefined){\r\n\t\t\t\tprocessedItem[i] = prop; \r\n\t\t\t}\r\n\t\t}\r\n\t\tprocessedItem[this.action_param] = scheduler.getUserData(item.id, this.action_param);\r\n\t\treturn processedItem;\r\n\t},\r\n\t_prepareItemForForm(item){\r\n\t\tconst processedItem = {};\r\n\t\tconst scheduler = this.$scheduler;\r\n\t\tconst copy = scheduler.utils.copy(item);\r\n\t\tfor (var i in copy) {\r\n\t\t\tlet prop = copy[i];\r\n\t\t\tif (i.indexOf(\"_\") === 0) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} else if (prop) {\r\n\t\t\t\tif(prop.getUTCFullYear){\r\n\t\t\t\t\tprocessedItem[i] = scheduler._helpers.formatDate(prop);\r\n\t\t\t\t} else if(typeof prop == \"object\") {\r\n\t\t\t\t\tprocessedItem[i] = this._prepareItemForForm(prop);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprocessedItem[i] = prop;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tprocessedItem[i] = \"\"; // for all falthy values\r\n\t\t\t}\r\n\t\t}\r\n\t\tprocessedItem[this.action_param] = scheduler.getUserData(item.id, this.action_param);\r\n\t\treturn processedItem;\r\n\t},\r\n\t_prepareDataItem: function(item) {\r\n\t\tif(this._serializeAsJson){\r\n\t\t\treturn this._prepareItemForJson(item);\r\n\t\t}else {\r\n\t\t\treturn this._prepareItemForForm(item);\r\n\t\t}\r\n\t},\r\n\t_getRowData: function(id) {\r\n\t\tvar dataItem = this.$scheduler.getEvent(id);\r\n\t\tif (!dataItem) {\r\n\t\t\tdataItem = { id: id };\r\n\t\t}\r\n\t\treturn this._prepareDataItem(dataItem);\r\n\t}\r\n};\r\n\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler.createDataProcessor = function(config) {\r\n\tvar router;\r\n\tvar tMode;\r\n\tif (config instanceof Function) {\r\n\t\trouter = config;\r\n\t} else if (config.hasOwnProperty(\"router\")) {\r\n\t\trouter = config.router;\r\n\t} else if(config.hasOwnProperty(\"event\")){\r\n\t\trouter = config;\r\n\t}\r\n\r\n\tif (router) {\r\n\t\ttMode = \"CUSTOM\";\r\n\t} else {\r\n\t\ttMode = config.mode || \"REST-JSON\";\r\n\t}\r\n\r\n\tvar dp = new DataProcessor(config.url);\r\n\tdp.init(scheduler);\r\n\tdp.setTransactionMode({\r\n\t\tmode: tMode,\r\n\t\trouter: router\r\n\t}, config.batchUpdate); // FIXME: config.batchUpdate where it is explained?\r\n\treturn dp;\r\n};\r\n\r\nscheduler.DataProcessor = DataProcessor;\r\n\r\n}\r\n\r\n//var dataProcessor = global.dataProcessor = DataProcessor; // for old","import utils from \"./utils/utils\";\r\nimport domHelpers from \"./utils/dom_helpers\";\r\n\r\n\r\nexport default function(scheduler) {\r\n\r\n\tvar boxAttribute = \"data-dhxbox\";\r\n\r\n\tvar _dhx_msg_cfg = null;\r\n\r\n\tfunction callback(config, result) {\r\n\t\tvar usercall = config.callback;\r\n\t\tmodalBox.hide(config.box);\r\n\r\n\t\t_dhx_msg_cfg = config.box = null;\r\n\tif (usercall)\r\n\t\t\tusercall(result);\r\n\t}\r\n\r\n\tfunction modal_key(event) {\r\n\t\tif (_dhx_msg_cfg) {\r\n\r\n\t\t\tvar code = event.which || event.keyCode;\r\n\t\t\tvar preventDefault = false;\r\n\r\n\t\t\tif (messageBox.keyboard) {\r\n\t\t\t\tif (code == 13 || code == 32) {\r\n\t\t\t\t\t// default behavior is to confirm/submit popup on space/enter\r\n\t\t\t\t\t// if browser focus is set on button element - do button click instead of default behavior\r\n\t\t\t\t\tvar target = event.target || event.srcElement;\r\n\t\t\t\t\tif (domHelpers.getClassName(target).indexOf(\"scheduler_popup_button\") > -1 && target.click) {\r\n\t\t\t\t\t\ttarget.click();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcallback(_dhx_msg_cfg, true);\r\n\t\t\t\t\t\tpreventDefault = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (code == 27) {\r\n\t\t\t\t\tcallback(_dhx_msg_cfg, false);\r\n\t\t\t\t\tpreventDefault = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (preventDefault) {\r\n\t\t\t\tif (event.preventDefault){\r\n\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t}\r\n\t\t\t\treturn !(event.cancelBubble = true);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.event(document, \"keydown\", modal_key, true);\r\n\r\n\tfunction modality(mode) {\r\n\t\tif (!modality.cover) {\r\n\t\t\tmodality.cover = document.createElement(\"div\");\r\n\t\t\t//necessary for IE only\r\n\t\t\tscheduler.event(modality.cover, \"keydown\", modal_key);\r\n\t\t\tmodality.cover.className = \"dhx_modal_cover\";\r\n\t\t\tdocument.body.appendChild(modality.cover);\r\n\t\t}\r\n\r\n\t\tmodality.cover.style.display = mode ? \"inline-block\" : \"none\";\r\n\t}\r\n\r\n\tfunction button(text, classValue, result) {\r\n\t\tvar buttonAriaAttrs = scheduler._waiAria.messageButtonAttrString(text);\r\n\t\tvar name = (classValue || \"\").toLowerCase().replace(/ /g, \"_\");\r\n\t\tvar buttonCss = `scheduler_${name}_button dhtmlx_${name}_button`; \r\n\t\treturn `
${text}
`;\r\n\t}\r\n\r\n\tfunction info(text) {\r\n\t\tif (!messageBox.area) {\r\n\t\t\tmessageBox.area = document.createElement(\"div\");\r\n\t\t\tmessageBox.area.className = \"scheduler_message_area dhtmlx_message_area\";\r\n\t\t\tmessageBox.area.style[messageBox.position] = \"5px\";\r\n\t\t\tdocument.body.appendChild(messageBox.area);\r\n\t\t}\r\n\r\n\t\tmessageBox.hide(text.id);\r\n\t\tvar message = document.createElement(\"div\");\r\n\t\tmessage.innerHTML = \"
\" + text.text + \"
\";\r\n\t\tmessage.className = \"scheduler-info dhtmlx-info scheduler-\" + text.type + \" dhtmlx-\" + text.type;\r\n\t\tscheduler.event(message, \"click\",function (e) {\r\n if(text.callback) {\r\n text.callback.call(this, e);\r\n }\r\n\t\t\tmessageBox.hide(text.id);\r\n\t\t\ttext = null;\r\n\t\t});\r\n\r\n\t\tscheduler._waiAria.messageInfoAttr(message);\r\n\r\n\t\tif (messageBox.position == \"bottom\" && messageBox.area.firstChild)\r\n\t\t\tmessageBox.area.insertBefore(message, messageBox.area.firstChild);\r\n\t\telse\r\n\t\t\tmessageBox.area.appendChild(message);\r\n\r\n\t\tif (text.expire > 0)\r\n\t\t\tmessageBox.timers[text.id] = window.setTimeout(function () {\r\n\t\t\t\t// GS-1213: We need that when Scheduler is destroyed\r\n\t\t\t\tif (messageBox) messageBox.hide(text.id);\r\n\t\t\t}, text.expire);\r\n\r\n\t\tmessageBox.pull[text.id] = message;\r\n\t\tmessage = null;\r\n\r\n\t\treturn text.id;\r\n\t}\r\n\r\n\tfunction getFirstDefined() {\r\n\t\tvar values = [].slice.apply(arguments, [0]);\r\n\r\n\t\tfor (var i = 0; i < values.length; i++) {\r\n\t\t\tif (values[i]) {\r\n\t\t\t\treturn values[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tfunction _boxStructure(config, ok, cancel) {\r\n\t\tvar box = document.createElement(\"div\");\r\n\r\n\t\tvar contentId = utils.uid();\r\n\t\tscheduler._waiAria.messageModalAttr(box, contentId);\r\n\r\n\r\n\t\tbox.className = \" scheduler_modal_box dhtmlx_modal_box scheduler-\" + config.type + \" dhtmlx-\" + config.type;\r\n\t\tbox.setAttribute(boxAttribute, 1);\r\n\r\n\t\tvar inner = '';\r\n\r\n\t\tif (config.width)\r\n\t\t\tbox.style.width = config.width;\r\n\t\tif (config.height)\r\n\t\t\tbox.style.height = config.height;\r\n\t\tif (config.title)\r\n\t\t\tinner += '
' + config.title + '
';\r\n\t\tinner += '
' + (config.content ? '' : config.text) + '
';\r\n\t\tif (ok)\r\n\t\t\tinner += button(getFirstDefined(config.ok, scheduler.locale.labels.message_ok, \"OK\"), \"ok\", true);\r\n\t\tif (cancel)\r\n\t\t\tinner += button(getFirstDefined(config.cancel, scheduler.locale.labels.message_cancel, \"Cancel\"), \"cancel\", false);\r\n\r\n\t\tif (config.buttons) {\r\n\t\t\tfor (var i = 0; i < config.buttons.length; i++) {\r\n\t\t\t\tvar btn = config.buttons[i];\r\n\t\t\t\tif (typeof btn == \"object\") {\r\n\t\t\t\t\t// Support { label:\"Save\", css:\"main_button\", value:\"save\" }\r\n\t\t\t\t\tvar label = btn.label;\r\n\t\t\t\t\tvar css = btn.css || (\"scheduler_\" + btn.label.toLowerCase() + \"_button dhtmlx_\" + btn.label.toLowerCase() + \"_button\");\r\n\t\t\t\t\tvar value = btn.value || i;\r\n\t\t\t\t\tinner += button(label, css, value);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tinner += button(btn, btn, i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tinner += '
';\r\n\t\tbox.innerHTML = inner;\r\n\r\n\t\tif (config.content) {\r\n\t\t\tvar node = config.content;\r\n\t\t\tif (typeof node == \"string\")\r\n\t\t\t\tnode = document.getElementById(node);\r\n\t\t\tif (node.style.display == 'none')\r\n\t\t\t\tnode.style.display = \"\";\r\n\t\t\tbox.childNodes[config.title ? 1 : 0].appendChild(node);\r\n\t\t}\r\n\r\n\t\tscheduler.event(box, \"click\", function (event) {\r\n\t\t\tvar source = event.target || event.srcElement;\r\n\t\t\tif (!source.className) source = source.parentNode;\r\n\t\t\tif (domHelpers.closest(source, \".scheduler_popup_button\")) {\r\n\t\t\t\tvar result = source.getAttribute(\"data-result\");\r\n\t\t\t\tresult = (result == \"true\") || (result == \"false\" ? false : result);\r\n\t\t\t\tcallback(config, result);\r\n\t\t\t}\r\n\t\t});\r\n\t\tconfig.box = box;\r\n\t\tif (ok || cancel)\r\n\t\t\t_dhx_msg_cfg = config;\r\n\r\n\t\treturn box;\r\n\t}\r\n\r\n\tfunction _createBox(config, ok, cancel) {\r\n\t\tvar box = config.tagName ? config : _boxStructure(config, ok, cancel);\r\n\r\n\t\tif (!config.hidden)\r\n\t\t\tmodality(true);\r\n\t\tdocument.body.appendChild(box);\r\n\t\tvar x = Math.abs(Math.floor(((window.innerWidth || document.documentElement.offsetWidth) - box.offsetWidth) / 2));\r\n\t\tvar y = Math.abs(Math.floor(((window.innerHeight || document.documentElement.offsetHeight) - box.offsetHeight) / 2));\r\n\t\tif (config.position == \"top\")\r\n\t\t\tbox.style.top = \"-3px\";\r\n\t\telse\r\n\t\t\tbox.style.top = y + 'px';\r\n\t\tbox.style.left = x + 'px';\r\n\t\t//necessary for IE only\r\n\t\tscheduler.event(box, \"keydown\", modal_key);\r\n\r\n\t\tmodalBox.focus(box);\r\n\r\n\t\tif (config.hidden)\r\n\t\t\tmodalBox.hide(box);\r\n\r\n\t\tscheduler.callEvent(\"onMessagePopup\", [box]);\r\n\t\treturn box;\r\n\t}\r\n\r\n\tfunction alertPopup(config) {\r\n\t\treturn _createBox(config, true, false);\r\n\t}\r\n\r\n\tfunction confirmPopup(config) {\r\n\t\treturn _createBox(config, true, true);\r\n\t}\r\n\r\n\tfunction boxPopup(config) {\r\n\t\treturn _createBox(config);\r\n\t}\r\n\r\n\tfunction box_params(text, type, callback) {\r\n\t\tif (typeof text != \"object\") {\r\n\t\t\tif (typeof type == \"function\") {\r\n\t\t\t\tcallback = type;\r\n\t\t\t\ttype = \"\";\r\n\t\t\t}\r\n\t\t\ttext = {text: text, type: type, callback: callback};\r\n\t\t}\r\n\t\treturn text;\r\n\t}\r\n\r\n\tfunction params(text, type, expire, id, callback) {\r\n\t\tif (typeof text != \"object\")\r\n\t\t\ttext = {text: text, type: type, expire: expire, id: id, callback: callback};\r\n\t\ttext.id = text.id || utils.uid();\r\n\t\ttext.expire = text.expire || messageBox.expire;\r\n\t\treturn text;\r\n\t}\r\n\r\n\tvar alertBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"confirm\";\r\n\t\treturn alertPopup(text);\r\n\t};\r\n\tvar confirmBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"alert\";\r\n\t\treturn confirmPopup(text);\r\n\t};\r\n\tvar modalBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"alert\";\r\n\t\treturn boxPopup(text);\r\n\t};\r\n\tmodalBox.hide = function (node) {\r\n\t\twhile (node && node.getAttribute && !node.getAttribute(boxAttribute))\r\n\t\t\tnode = node.parentNode;\r\n\t\tif (node) {\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t\tmodality(false);\r\n\r\n\t\t\tscheduler.callEvent(\"onAfterMessagePopup\", [node]);\r\n\t\t}\r\n\t};\r\n\r\n\tmodalBox.focus = function (node) {\r\n\t\tsetTimeout(function () {\r\n\t\t\tvar focusable = domHelpers.getFocusableNodes(node);\r\n\t\t\tif (focusable.length) {\r\n\t\t\t\tif (focusable[0].focus) focusable[0].focus();\r\n\t\t\t}\r\n\t\t}, 1);\r\n\t};\r\n\r\n\tvar messageBox = function (text, type, expire, id) {\r\n\t\ttext = params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"info\";\r\n\r\n\t\tvar subtype = text.type.split(\"-\")[0];\r\n\t\tswitch (subtype) {\r\n\t\t\tcase \"alert\":\r\n\t\t\t\treturn alertPopup(text);\r\n\t\t\tcase \"confirm\":\r\n\t\t\t\treturn confirmPopup(text);\r\n\t\t\tcase \"modalbox\":\r\n\t\t\t\treturn boxPopup(text);\r\n\t\t\tdefault:\r\n\t\t\t\treturn info(text);\r\n\t\t}\r\n\t};\r\n\r\n\tmessageBox.seed = (new Date()).valueOf();\r\n\tmessageBox.uid = utils.uid;\r\n\tmessageBox.expire = 4000;\r\n\tmessageBox.keyboard = true;\r\n\tmessageBox.position = \"top\";\r\n\tmessageBox.pull = {};\r\n\tmessageBox.timers = {};\r\n\r\n\tmessageBox.hideAll = function () {\r\n\t\tfor (var key in messageBox.pull)\r\n\t\t\tmessageBox.hide(key);\r\n\t};\r\n\tmessageBox.hide = function (id) {\r\n\t\tvar obj = messageBox.pull[id];\r\n\t\tif (obj && obj.parentNode) {\r\n\t\t\twindow.setTimeout(function () {\r\n\t\t\t\tobj.parentNode.removeChild(obj);\r\n\t\t\t\tobj = null;\r\n\t\t\t}, 2000);\r\n\t\t\tobj.className += \" hidden\";\r\n\r\n\t\t\tif (messageBox.timers[id])\r\n\t\t\t\twindow.clearTimeout(messageBox.timers[id]);\r\n\t\t\tdelete messageBox.pull[id];\r\n\t\t}\r\n\t};\r\n\r\n\tvar popups = [];\r\n\tscheduler.attachEvent(\"onMessagePopup\", function(box){\r\n\t\tpopups.push(box);\r\n\t});\r\n\tscheduler.attachEvent(\"onAfterMessagePopup\", function(box){\r\n\t\tfor(var i = 0; i < popups.length; i++){\r\n\t\t\tif(popups[i] === box){\r\n\t\t\t\tpopups.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tif(modality.cover && modality.cover.parentNode){\r\n\t\t\tmodality.cover.parentNode.removeChild(modality.cover);\r\n\t\t}\r\n\r\n\t\tfor(var i = 0; i < popups.length; i++){\r\n\t\t\tif(popups[i].parentNode){\r\n\t\t\t\tpopups[i].parentNode.removeChild(popups[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tpopups = null;\r\n\r\n\t\tif(messageBox.area && messageBox.area.parentNode){\r\n\t\t\tmessageBox.area.parentNode.removeChild(messageBox.area);\r\n\t\t}\r\n\t\tmessageBox = null;\r\n\t});\r\n\r\n\treturn {\r\n\t\talert: alertBox,\r\n\t\tconfirm: confirmBox,\r\n\t\tmessage: messageBox,\r\n\t\tmodalbox: modalBox\r\n\t};\r\n}","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"كانون الثاني\", \"شباط\", \"آذار\", \"نيسان\", \"أيار\", \"حزيران\", \"تموز\", \"آب\", \"أيلول\", \"تشرين الأول\", \"تشرين الثاني\", \"كانون الأول\"],\r\n\t\tmonth_short: [\"يناير\", \"فبراير\", \"مارس\", \"أبريل\", \"مايو\", \"يونيو\", \"يوليو\", \"أغسطس\", \"سبتمبر\", \"أكتوبر\", \"نوفمبر\", \"ديسمبر\"],\r\n\t\tday_full: [\"الأحد\", \"الأثنين\", \"ألثلاثاء\", \"الأربعاء\", \"ألحميس\", \"ألجمعة\", \"السبت\"],\r\n\t\tday_short: [\"احد\", \"اثنين\", \"ثلاثاء\", \"اربعاء\", \"خميس\", \"جمعة\", \"سبت\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"اليوم\",\r\n\t\tday_tab: \"يوم\",\r\n\t\tweek_tab: \"أسبوع\",\r\n\t\tmonth_tab: \"شهر\",\r\n\t\tnew_event: \"حدث جديد\",\r\n\t\ticon_save: \"اخزن\",\r\n\t\ticon_cancel: \"الغاء\",\r\n\t\ticon_details: \"تفاصيل\",\r\n\t\ticon_edit: \"تحرير\",\r\n\t\ticon_delete: \"حذف\",\r\n\t\tconfirm_closing: \"التغييرات سوف تضيع, هل انت متأكد؟\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"الحدث سيتم حذفها نهائيا ، هل أنت متأكد؟\",\r\n\t\tsection_description: \"الوصف\",\r\n\t\tsection_time: \"الفترة الزمنية\",\r\n\t\tfull_day: \"طوال اليوم\",\r\n\r\n\t\tconfirm_recurring: \"هل تريد تحرير مجموعة كاملة من الأحداث المتكررة؟\",\r\n\t\tsection_recurring: \"تكرار الحدث\",\r\n\t\tbutton_recurring: \"تعطيل\",\r\n\t\tbutton_recurring_open: \"تمكين\",\r\n\t\tbutton_edit_series: \"تحرير سلسلة\",\r\n\t\tbutton_edit_occurrence: \"تعديل نسخة\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"جدول\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create: \"Drag to create\",\r\n\t\tdrag_to_move: \"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour: \"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"يومي\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"أسبوعي\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"شهري\",\r\n\t\trepeat_radio_year: \"سنوي\",\r\n\t\trepeat_radio_day_type: \"كل\",\r\n\t\trepeat_text_day_count: \"يوم\",\r\n\t\trepeat_radio_day_type2: \"كل يوم عمل\",\r\n\t\trepeat_week: \" تكرار كل\",\r\n\t\trepeat_text_week_count: \"أسبوع في الأيام التالية:\",\r\n\t\trepeat_radio_month_type: \"تكرار\",\r\n\t\trepeat_radio_month_start: \"في\",\r\n\t\trepeat_text_month_day: \"يوم كل\",\r\n\t\trepeat_text_month_count: \"شهر\",\r\n\t\trepeat_text_month_count2_before: \"كل\",\r\n\t\trepeat_text_month_count2_after: \"شهر\",\r\n\t\trepeat_year_label: \"في\",\r\n\t\tselect_year_day2: \"من\",\r\n\t\trepeat_text_year_day: \"يوم\",\r\n\t\tselect_year_month: \"شهر\",\r\n\t\trepeat_radio_end: \"بدون تاريخ انتهاء\",\r\n\t\trepeat_text_occurences_count: \"تكرارات\",\r\n\t\trepeat_radio_end2: \"بعد\",\r\n\t\trepeat_radio_end3: \"ينتهي في\",\r\n\r\n\t\trepeat_never: \"أبداً\",\r\n\t\trepeat_daily: \"كل يوم\",\r\n\t\trepeat_workdays: \"كل يوم عمل\",\r\n\t\trepeat_weekly: \"كل أسبوع\",\r\n\t\trepeat_monthly: \"كل شهر\",\r\n\t\trepeat_yearly: \"كل سنة\",\r\n\t\trepeat_custom: \"تخصيص\",\r\n\t\trepeat_freq_day: \"يوم\",\r\n\t\trepeat_freq_week: \"أسبوع\",\r\n\t\trepeat_freq_month: \"شهر\",\r\n\t\trepeat_freq_year: \"سنة\",\r\n\t\trepeat_on_date: \"في التاريخ\",\r\n\t\trepeat_ends: \"ينتهي\",\r\n\r\n\t\tmonth_for_recurring: [\"يناير\", \"فبراير\", \"مارس\", \"أبريل\", \"مايو\", \"يونيو\", \"يوليو\", \"أغسطس\", \"سبتمبر\", \"أكتوبر\", \"نوفمبر\", \"ديسمبر\"],\r\n\t\tday_for_recurring: [\"الأحد\", \"الإثنين\", \"الثلاثاء\", \"الأربعاء\", \"الخميس\", \"الجمعة\", \"السبت\"]\r\n\t}\r\n};\r\n\r\n\r\n","/*\r\n Translation by Sofya Morozova\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Студзень\", \"Люты\", \"Сакавік\", \"Красавік\", \"Maй\", \"Чэрвень\", \"Ліпень\", \"Жнівень\", \"Верасень\", \"Кастрычнік\", \"Лістапад\", \"Снежань\"],\r\n\t\tmonth_short: [\"Студз\", \"Лют\", \"Сак\", \"Крас\", \"Maй\", \"Чэр\", \"Ліп\", \"Жнів\", \"Вер\", \"Каст\", \"Ліст\", \"Снеж\"],\r\n\t\tday_full: [ \"Нядзеля\", \"Панядзелак\", \"Аўторак\", \"Серада\", \"Чацвер\", \"Пятніца\", \"Субота\"],\r\n\t\tday_short: [\"Нд\", \"Пн\", \"Аўт\", \"Ср\", \"Чцв\", \"Пт\", \"Сб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сёння\",\r\n\t\tday_tab: \"Дзень\",\r\n\t\tweek_tab: \"Тыдзень\",\r\n\t\tmonth_tab: \"Месяц\",\r\n\t\tnew_event: \"Новая падзея\",\r\n\t\ticon_save: \"Захаваць\",\r\n\t\ticon_cancel: \"Адмяніць\",\r\n\t\ticon_details: \"Дэталі\",\r\n\t\ticon_edit: \"Змяніць\",\r\n\t\ticon_delete: \"Выдаліць\",\r\n\t\tconfirm_closing: \"\", //Унесеныя змены будуць страчаны, працягнуць?\r\n\t\tconfirm_deleting: \"Падзея будзе выдалена незваротна, працягнуць?\",\r\n\t\tsection_description: \"Апісанне\",\r\n\t\tsection_time: \"Перыяд часу\",\r\n\t\tfull_day: \"Увесь дзень\",\r\n\r\n\t\tconfirm_recurring: \"Вы хочаце змяніць усю серыю паўтаральных падзей?\",\r\n\t\tsection_recurring: \"Паўтарэнне\",\r\n\t\tbutton_recurring: \"Адключана\",\r\n\t\tbutton_recurring_open: \"Уключана\",\r\n\t\tbutton_edit_series: \"Рэдагаваць серыю\",\r\n\t\tbutton_edit_occurrence: \"Рэдагаваць асобнік\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Спіс\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Апісанне\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Год\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Спіс\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Спic\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Дзень\",\r\n\t\trepeat_radio_week: \"Тыдзень\",\r\n\t\trepeat_radio_month: \"Месяц\",\r\n\t\trepeat_radio_year: \"Год\",\r\n\t\trepeat_radio_day_type: \"Кожны\",\r\n\t\trepeat_text_day_count: \"дзень\",\r\n\t\trepeat_radio_day_type2: \"Кожны працоўны дзень\",\r\n\t\trepeat_week: \" Паўтараць кожны\",\r\n\t\trepeat_text_week_count: \"тыдзень\",\r\n\t\trepeat_radio_month_type: \"Паўтараць\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" чысла кожнага\",\r\n\t\trepeat_text_month_count: \"месяцу\",\r\n\t\trepeat_text_month_count2_before: \"кожны \",\r\n\t\trepeat_text_month_count2_after: \"месяц\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"дзень\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без даты заканчэння\",\r\n\t\trepeat_text_occurences_count: \"паўтораў\",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\trepeat_radio_end3: \"Да \",\r\n\r\n\t\trepeat_never: \"Ніколі\",\r\n\t\trepeat_daily: \"Кожны дзень\",\r\n\t\trepeat_workdays: \"Кожны працоўны дзень\",\r\n\t\trepeat_weekly: \"Кожны тыдзень\",\r\n\t\trepeat_monthly: \"Кожны месяц\",\r\n\t\trepeat_yearly: \"Кожны год\",\r\n\t\trepeat_custom: \"Наладжвальны\",\r\n\t\trepeat_freq_day: \"Дзень\",\r\n\t\trepeat_freq_week: \"Тыдзень\",\r\n\t\trepeat_freq_month: \"Месяц\",\r\n\t\trepeat_freq_year: \"Год\",\r\n\t\trepeat_on_date: \"На дату\",\r\n\t\trepeat_ends: \"Заканчваецца\",\r\n\r\n\t\tmonth_for_recurring: [\"Студзеня\", \"Лютага\", \"Сакавіка\", \"Красавіка\", \"Мая\", \"Чэрвеня\", \"Ліпeня\", \"Жніўня\", \"Верасня\", \"Кастрычніка\", \"Лістапада\", \"Снежня\"],\r\n\t\tday_for_recurring: [\"Нядзелю\", \"Панядзелак\", \"Аўторак\", \"Сераду\", \"Чацвер\", \"Пятніцу\", \"Суботу\"]\r\n\t}\r\n};\r\n","/*\r\n @Traducido por Vicente Adria Bohigues - vicenteadria@hotmail.com\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Gener\", \"Febrer\", \"Març\", \"Abril\", \"Maig\", \"Juny\", \"Juliol\", \"Agost\", \"Setembre\", \"Octubre\", \"Novembre\", \"Desembre\"],\r\n\t\tmonth_short: [\"Gen\", \"Feb\", \"Mar\", \"Abr\", \"Mai\", \"Jun\", \"Jul\", \"Ago\", \"Set\", \"Oct\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Diumenge\", \"Dilluns\", \"Dimarts\", \"Dimecres\", \"Dijous\", \"Divendres\", \"Dissabte\"],\r\n\t\tday_short: [\"Dg\", \"Dl\", \"Dm\", \"Dc\", \"Dj\", \"Dv\", \"Ds\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hui\",\r\n\t\tday_tab: \"Dia\",\r\n\t\tweek_tab: \"Setmana\",\r\n\t\tmonth_tab: \"Mes\",\r\n\t\tnew_event: \"Nou esdeveniment\",\r\n\t\ticon_save: \"Guardar\",\r\n\t\ticon_cancel: \"Cancel·lar\",\r\n\t\ticon_details: \"Detalls\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Esborrar\",\r\n\t\tconfirm_closing: \"\", //\"Els seus canvis es perdràn, continuar ?\"\r\n\t\tconfirm_deleting: \"L'esdeveniment s'esborrarà definitivament, continuar ?\",\r\n\t\tsection_description: \"Descripció\",\r\n\t\tsection_time: \"Periode de temps\",\r\n\t\tfull_day: \"Tot el dia\",\r\n\r\n\t\tconfirm_recurring: \"¿Desitja modificar el conjunt d'esdeveniments repetits?\",\r\n\t\tsection_recurring: \"Repeteixca l'esdeveniment\",\r\n\t\tbutton_recurring: \"Impedit\",\r\n\t\tbutton_recurring_open: \"Permés\",\r\n\t\tbutton_edit_series: \"Edit sèrie\",\r\n\t\tbutton_edit_occurrence: \"Edita Instància\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descripció\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Any\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Taula\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create: \"Drag to create\",\r\n\t\tdrag_to_move: \"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour: \"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diari\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Setmanal\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Mensual\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia\",\r\n\t\trepeat_radio_day_type2: \"Cada dia laborable\",\r\n\t\trepeat_week: \" Repetir cada\",\r\n\t\trepeat_text_week_count: \"setmana els dies següents:\",\r\n\t\trepeat_radio_month_type: \"Repetir\",\r\n\t\trepeat_radio_month_start: \"El\",\r\n\t\trepeat_text_month_day: \"dia cada\",\r\n\t\trepeat_text_month_count: \"mes\",\r\n\t\trepeat_text_month_count2_before: \"cada\",\r\n\t\trepeat_text_month_count2_after: \"mes\",\r\n\t\trepeat_year_label: \"El\",\r\n\t\tselect_year_day2: \"de\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mes\",\r\n\t\trepeat_radio_end: \"Sense data de finalització\",\r\n\t\trepeat_text_occurences_count: \"ocurrències\",\r\n\t\trepeat_radio_end2: \"Després\",\r\n\t\trepeat_radio_end3: \"Finalitzar el\",\r\n\r\n\t\trepeat_never: \"Mai\",\r\n\t\trepeat_daily: \"Cada dia\",\r\n\t\trepeat_workdays: \"Cada dia laborable\",\r\n\t\trepeat_weekly: \"Cada setmana\",\r\n\t\trepeat_monthly: \"Cada mes\",\r\n\t\trepeat_yearly: \"Cada any\",\r\n\t\trepeat_custom: \"Personalitzat\",\r\n\t\trepeat_freq_day: \"Dia\",\r\n\t\trepeat_freq_week: \"Setmana\",\r\n\t\trepeat_freq_month: \"Mes\",\r\n\t\trepeat_freq_year: \"Any\",\r\n\t\trepeat_on_date: \"En la data\",\r\n\t\trepeat_ends: \"Finalitza\",\r\n\r\n\t\tmonth_for_recurring: [\"Gener\", \"Febrer\", \"Març\", \"Abril\", \"Maig\", \"Juny\", \"Juliol\", \"Agost\", \"Setembre\", \"Octubre\", \"Novembre\", \"Desembre\"],\r\n\t\tday_for_recurring: [\"Diumenge\", \"Dilluns\", \"Dimarts\", \"Dimecres\", \"Dijous\", \"Divendres\", \"Dissabte\"]\r\n\t}\r\n};","/*\r\nTranslation by FreezeSoul\r\n*/\r\n//scheduler.config.day_date=\"%M %d日 %D\";\r\n//scheduler.config.default_date=\"%Y年 %M %d日\";\r\n//scheduler.config.month_date=\"%Y年 %M\";\r\n\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"一月\", \"二月\", \"三月\", \"四月\", \"五月\", \"六月\", \"七月\", \"八月\", \"九月\", \"十月\", \"十一月\", \"十二月\"],\r\n\t\tmonth_short: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_full: [\"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\"],\r\n\t\tday_short: [\"日\", \"一\", \"二\", \"三\", \"四\", \"五\", \"六\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"今天\",\r\n\t\tday_tab: \"日\",\r\n\t\tweek_tab: \"周\",\r\n\t\tmonth_tab: \"月\",\r\n\t\tnew_event: \"新建日程\",\r\n\t\ticon_save: \"保存\",\r\n\t\ticon_cancel: \"关闭\",\r\n\t\ticon_details: \"详细\",\r\n\t\ticon_edit: \"编辑\",\r\n\t\ticon_delete: \"删除\",\r\n\t\tconfirm_closing: \"请确认是否撤销修改!\", //Your changes will be lost, are your sure?\r\n\t\tconfirm_deleting: \"是否删除日程?\",\r\n\t\tsection_description: \"描述\",\r\n\t\tsection_time: \"时间范围\",\r\n\t\tfull_day: \"整天\",\r\n\r\n\t\tconfirm_recurring:\"请确认是否将日程设为重复模式?\",\r\n\t\tsection_recurring:\"重复周期\",\r\n\t\tbutton_recurring:\"禁用\",\r\n\t\tbutton_recurring_open:\"启用\",\r\n\t\tbutton_edit_series: \"编辑系列\",\r\n\t\tbutton_edit_occurrence: \"编辑实例\",\r\n\t\t\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"议程\",\r\n\t\tdate:\"日期\",\r\n\t\tdescription:\"说明\",\r\n\t\t\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"今年\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"议程\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab:\"电网\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"按天\",\r\n\t\trepeat_radio_week: \"按周\",\r\n\t\trepeat_radio_month: \"按月\",\r\n\t\trepeat_radio_year: \"按年\",\r\n\t\trepeat_radio_day_type: \"每\",\r\n\t\trepeat_text_day_count: \"天\",\r\n\t\trepeat_radio_day_type2: \"每个工作日\",\r\n\t\trepeat_week: \" 重复 每\",\r\n\t\trepeat_text_week_count: \"星期的:\",\r\n\t\trepeat_radio_month_type: \"重复\",\r\n\t\trepeat_radio_month_start: \"在\",\r\n\t\trepeat_text_month_day: \"日 每\",\r\n\t\trepeat_text_month_count: \"月\",\r\n\t\trepeat_text_month_count2_before: \"每\",\r\n\t\trepeat_text_month_count2_after: \"月\",\r\n\t\trepeat_year_label: \"在\",\r\n\t\tselect_year_day2: \"的\",\r\n\t\trepeat_text_year_day: \"日\",\r\n\t\tselect_year_month: \"月\",\r\n\t\trepeat_radio_end: \"无结束日期\",\r\n\t\trepeat_text_occurences_count: \"次结束\",\r\n\t\trepeat_radio_end2: \"重复\",\r\n\t\trepeat_radio_end3: \"结束于\",\r\n\t\t\r\n\t\trepeat_never: \"从不\",\r\n\t\trepeat_daily: \"每天\",\r\n\t\trepeat_workdays: \"每个工作日\",\r\n\t\trepeat_weekly: \"每周\",\r\n\t\trepeat_monthly: \"每月\",\r\n\t\trepeat_yearly: \"每年\",\r\n\t\trepeat_custom: \"自定义\",\r\n\t\trepeat_freq_day: \"天\",\r\n\t\trepeat_freq_week: \"周\",\r\n\t\trepeat_freq_month: \"月\",\r\n\t\trepeat_freq_year: \"年\",\r\n\t\trepeat_on_date: \"在日期\",\r\n\t\trepeat_ends: \"结束\",\r\n\r\n\t\tmonth_for_recurring: [\"一月\", \"二月\", \"三月\", \"四月\", \"五月\", \"六月\", \"七月\", \"八月\", \"九月\", \"十月\", \"十一月\", \"十二月\"],\r\n\t\tday_for_recurring: [\"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Leden\", \"Únor\", \"Březen\", \"Duben\", \"Květen\", \"Červen\", \"Červenec\", \"Srpen\", \"Září\", \"Říjen\", \"Listopad\", \"Prosinec\"],\r\n\t\tmonth_short: [\"Led\", \"Ún\", \"Bře\", \"Dub\", \"Kvě\", \"Čer\", \"Čec\", \"Srp\", \"Září\", \"Říj\", \"List\", \"Pro\"],\r\n\t\tday_full: [\"Neděle\", \"Pondělí\", \"Úterý\", \"Středa\", \"Čtvrtek\", \"Pátek\", \"Sobota\"],\r\n\t\tday_short: [\"Ne\", \"Po\", \"Út\", \"St\", \"Čt\", \"Pá\", \"So\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dnes\",\r\n\t\tday_tab: \"Den\",\r\n\t\tweek_tab: \"Týden\",\r\n\t\tmonth_tab: \"Měsíc\",\r\n\t\tnew_event: \"Nová událost\",\r\n\t\ticon_save: \"Uložit\",\r\n\t\ticon_cancel: \"Zpět\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edituj\",\r\n\t\ticon_delete: \"Smazat\",\r\n\t\tconfirm_closing: \"\", //Vaše změny budou ztraceny, opravdu ?\r\n\t\tconfirm_deleting: \"Událost bude trvale smazána, opravdu?\",\r\n\t\tsection_description: \"Poznámky\",\r\n\t\tsection_time: \"Doba platnosti\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Přejete si upravit celou řadu opakovaných událostí?\",\r\n\t\tsection_recurring: \"Opakování události\",\r\n\t\tbutton_recurring: \"Vypnuto\",\r\n\t\tbutton_recurring_open: \"Zapnuto\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Upravit instance\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Program\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Poznámka\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\t\tfull_day: \"Full day\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Program\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Mřížka\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Denně\",\r\n\t\trepeat_radio_week: \"Týdně\",\r\n\t\trepeat_radio_month: \"Měsíčně\",\r\n\t\trepeat_radio_year: \"Ročně\",\r\n\t\trepeat_radio_day_type: \"každý\",\r\n\t\trepeat_text_day_count: \"Den\",\r\n\t\trepeat_radio_day_type2: \"pracovní dny\",\r\n\t\trepeat_week: \"Opakuje každých\",\r\n\t\trepeat_text_week_count: \"Týdnů na:\",\r\n\t\trepeat_radio_month_type: \"u každého\",\r\n\t\trepeat_radio_month_start: \"na\",\r\n\t\trepeat_text_month_day: \"Den každého\",\r\n\t\trepeat_text_month_count: \"Měsíc\",\r\n\t\trepeat_text_month_count2_before: \"každý\",\r\n\t\trepeat_text_month_count2_after: \"Měsíc\",\r\n\t\trepeat_year_label: \"na\",\r\n\t\tselect_year_day2: \"v\",\r\n\t\trepeat_text_year_day: \"Den v\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"bez data ukončení\",\r\n\t\trepeat_text_occurences_count: \"Události\",\r\n\t\trepeat_radio_end2: \"po\",\r\n\t\trepeat_radio_end3: \"Konec\",\r\n\r\n\t\trepeat_never: \"Nikdy\",\r\n\t\trepeat_daily: \"Každý den\",\r\n\t\trepeat_workdays: \"Každý pracovní den\",\r\n\t\trepeat_weekly: \"Každý týden\",\r\n\t\trepeat_monthly: \"Každý měsíc\",\r\n\t\trepeat_yearly: \"Každý rok\",\r\n\t\trepeat_custom: \"Vlastní\",\r\n\t\trepeat_freq_day: \"Den\",\r\n\t\trepeat_freq_week: \"Týden\",\r\n\t\trepeat_freq_month: \"Měsíc\",\r\n\t\trepeat_freq_year: \"Rok\",\r\n\t\trepeat_on_date: \"Na datum\",\r\n\t\trepeat_ends: \"Končí\",\r\n\r\n\t\tmonth_for_recurring: [\"Leden\", \"Únor\", \"Březen\", \"Duben\", \"Květen\", \"Červen\", \"Červenec\", \"Srpen\", \"Září\", \"Říjen\", \"Listopad\", \"Prosinec\"],\r\n\t\tday_for_recurring: [\"Neděle \", \"Pondělí\", \"Úterý\", \"Středa\", \"Čtvrtek\", \"Pátek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Marts\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Man\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uge\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny begivenhed\",\r\n\t\ticon_save: \"Gem\",\r\n\t\ticon_cancel: \"Fortryd\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Tilret\",\r\n\t\ticon_delete: \"Slet\",\r\n\t\tconfirm_closing: \"Dine rettelser vil gå tabt.. Er dy sikker?\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Bigivenheden vil blive slettet permanent. Er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du tilrette hele serien af gentagne begivenheder?\",\r\n\t\tsection_recurring: \"Gentag begivenhed\",\r\n\t\tbutton_recurring: \"Frakoblet\",\r\n\t\tbutton_recurring_open: \"Tilkoblet\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Rediger en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dagsorden\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dagsorden\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\",\r\n\t\trepeat_radio_week: \"Ugenlig\",\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"På hver arbejdsdag\",\r\n\t\trepeat_week: \" Gentager sig hver\",\r\n\t\trepeat_text_week_count: \"uge på følgende dage:\",\r\n\t\trepeat_radio_month_type: \"Hver den\",\r\n\t\trepeat_radio_month_start: \"Den\",\r\n\t\trepeat_text_month_day: \" i hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"Den\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Ingen slutdato\",\r\n\t\trepeat_text_occurences_count: \"gentagelse\",\r\n\t\trepeat_radio_end2: \"Efter\",\r\n\t\trepeat_radio_end3: \"Slut\",\r\n\r\n\t\trepeat_never: \"Aldrig\",\r\n\t\trepeat_daily: \"Hver dag\",\r\n\t\trepeat_workdays: \"Hver hverdag\",\r\n\t\trepeat_weekly: \"Hver uge\",\r\n\t\trepeat_monthly: \"Hver måned\",\r\n\t\trepeat_yearly: \"Hvert år\",\r\n\t\trepeat_custom: \"Brugerdefineret\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Uge\",\r\n\t\trepeat_freq_month: \"Måned\",\r\n\t\trepeat_freq_year: \"År\",\r\n\t\trepeat_on_date: \"På dato\",\r\n\t\trepeat_ends: \"Slutter\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"März\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Dezember\"],\r\n\t\tday_for_recurring: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\" Januar\", \" Februar\", \" März \", \" April\", \" Mai\", \" Juni\", \" Juli\", \" August\", \" September \", \" Oktober\", \" November \", \" Dezember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mär\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dez\"],\r\n\t\tday_full: [ \"Sonntag\", \"Montag\", \"Dienstag\", \" Mittwoch\", \" Donnerstag\", \"Freitag\", \"Samstag\"],\r\n\t\tday_short: [\"So\", \"Mo\", \"Di\", \"Mi\", \"Do\", \"Fr\", \"Sa\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Heute\",\r\n\t\tday_tab: \"Tag\",\r\n\t\tweek_tab: \"Woche\",\r\n\t\tmonth_tab: \"Monat\",\r\n\t\tnew_event: \"neuer Eintrag\",\r\n\t\ticon_save: \"Speichern\",\r\n\t\ticon_cancel: \"Abbrechen\",\r\n\t\ticon_details: \"Details\",\r\n\t\ticon_edit: \"Ändern\",\r\n\t\ticon_delete: \"Löschen\",\r\n\t\tconfirm_closing: \"\", //\"Ihre Veränderungen werden verloren sein, wollen Sie ergänzen? \"\r\n\t\tconfirm_deleting: \"Der Eintrag wird gelöscht\",\r\n\t\tsection_description: \"Beschreibung\",\r\n\t\tsection_time: \"Zeitspanne\",\r\n\t\tfull_day: \"Ganzer Tag\",\r\n\r\n\t\tconfirm_recurring: \"Wollen Sie alle Einträge bearbeiten oder nur diesen einzelnen Eintrag?\",\r\n\t\tsection_recurring: \"Wiederholung\",\r\n\t\tbutton_recurring: \"Aus\",\r\n\t\tbutton_recurring_open: \"An\",\r\n\t\tbutton_edit_series: \"Bearbeiten Sie die Serie\",\r\n\t\tbutton_edit_occurrence: \"Bearbeiten Sie eine Kopie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Beschreibung\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Jahre\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Täglich\",\r\n\t\trepeat_radio_week: \"Wöchentlich\",\r\n\t\trepeat_radio_month: \"Monatlich\",\r\n\t\trepeat_radio_year: \"Jährlich\",\r\n\t\trepeat_radio_day_type: \"jeden\",\r\n\t\trepeat_text_day_count: \"Tag\",\r\n\t\trepeat_radio_day_type2: \"an jedem Arbeitstag\",\r\n\t\trepeat_week: \" Wiederholt sich jede\",\r\n\t\trepeat_text_week_count: \"Woche am:\",\r\n\t\trepeat_radio_month_type: \"an jedem\",\r\n\t\trepeat_radio_month_start: \"am\",\r\n\t\trepeat_text_month_day: \"Tag eines jeden\",\r\n\t\trepeat_text_month_count: \"Monats\",\r\n\t\trepeat_text_month_count2_before: \"jeden\",\r\n\t\trepeat_text_month_count2_after: \"Monats\",\r\n\t\trepeat_year_label: \"am\",\r\n\t\tselect_year_day2: \"im\",\r\n\t\trepeat_text_year_day: \"Tag im\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"kein Enddatum\",\r\n\t\trepeat_text_occurences_count: \"Ereignissen\",\r\n\t\trepeat_radio_end3: \"Schluß\",\r\n\t\trepeat_radio_end2: \"nach\",\r\n\r\n\t\trepeat_never: \"Nie\",\r\n\t\trepeat_daily: \"Jeden Tag\",\r\n\t\trepeat_workdays: \"Jeden Werktag\",\r\n\t\trepeat_weekly: \"Jede Woche\",\r\n\t\trepeat_monthly: \"Jeden Monat\",\r\n\t\trepeat_yearly: \"Jedes Jahr\",\r\n\t\trepeat_custom: \"Benutzerdefiniert\",\r\n\t\trepeat_freq_day: \"Tag\",\r\n\t\trepeat_freq_week: \"Woche\",\r\n\t\trepeat_freq_month: \"Monat\",\r\n\t\trepeat_freq_year: \"Jahr\",\r\n\t\trepeat_on_date: \"Am Datum\",\r\n\t\trepeat_ends: \"Endet\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"März\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Dezember\"],\r\n\t\tday_for_recurring: [\"Sonntag\", \"Montag\", \"Dienstag\", \"Mittwoch\", \"Donnerstag\", \"Freitag\", \"Samstag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Ιανουάριος\", \"Φεβρουάριος\", \"Μάρτιος\", \"Απρίλιος\", \"Μάϊος\", \"Ιούνιος\", \"Ιούλιος\", \"Αύγουστος\", \"Σεπτέμβριος\", \"Οκτώβριος\", \"Νοέμβριος\", \"Δεκέμβριος\"],\r\n\t\tmonth_short: [\"ΙΑΝ\", \"ΦΕΒ\", \"ΜΑΡ\", \"ΑΠΡ\", \"ΜΑΙ\", \"ΙΟΥΝ\", \"ΙΟΥΛ\", \"ΑΥΓ\", \"ΣΕΠ\", \"ΟΚΤ\", \"ΝΟΕ\", \"ΔΕΚ\"],\r\n\t\tday_full: [\"Κυριακή\", \"Δευτέρα\", \"Τρίτη\", \"Τετάρτη\", \"Πέμπτη\", \"Παρασκευή\", \"Σάββατο\"],\r\n\t\tday_short: [\"ΚΥ\", \"ΔΕ\", \"ΤΡ\", \"ΤΕ\", \"ΠΕ\", \"ΠΑ\", \"ΣΑ\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Σήμερα\",\r\n\t\tday_tab: \"Ημέρα\",\r\n\t\tweek_tab: \"Εβδομάδα\",\r\n\t\tmonth_tab: \"Μήνας\",\r\n\t\tnew_event: \"Νέο έργο\",\r\n\t\ticon_save: \"Αποθήκευση\",\r\n\t\ticon_cancel: \"Άκυρο\",\r\n\t\ticon_details: \"Λεπτομέρειες\",\r\n\t\ticon_edit: \"Επεξεργασία\",\r\n\t\ticon_delete: \"Διαγραφή\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Το έργο θα διαγραφεί οριστικά. Θέλετε να συνεχίσετε;\",\r\n\t\tsection_description: \"Περιγραφή\",\r\n\t\tsection_time: \"Χρονική περίοδος\",\r\n\t\tfull_day: \"Πλήρης Ημέρα\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Θέλετε να επεξεργασθείτε ολόκληρη την ομάδα των επαναλαμβανόμενων έργων;\",\r\n\t\tsection_recurring: \"Επαναλαμβανόμενο έργο\",\r\n\t\tbutton_recurring: \"Ανενεργό\",\r\n\t\tbutton_recurring_open: \"Ενεργό\",\r\n\t\tbutton_edit_series: \"Επεξεργαστείτε τη σειρά\",\r\n\t\tbutton_edit_occurrence: \"Επεξεργασία ένα αντίγραφο\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Ημερήσια Διάταξη\",\r\n\t\tdate: \"Ημερομηνία\",\r\n\t\tdescription: \"Περιγραφή\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Έτος\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Ημερήσια Διάταξη\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Πλέγμα\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Ημερησίως\",\r\n\t\trepeat_radio_week: \"Εβδομαδιαίως\",\r\n\t\trepeat_radio_month: \"Μηνιαίως\",\r\n\t\trepeat_radio_year: \"Ετησίως\",\r\n\t\trepeat_radio_day_type: \"Κάθε\",\r\n\t\trepeat_text_day_count: \"ημέρα\",\r\n\t\trepeat_radio_day_type2: \"Κάθε εργάσιμη\",\r\n\t\trepeat_week: \" Επανάληψη κάθε\",\r\n\t\trepeat_text_week_count: \"εβδομάδα τις επόμενες ημέρες:\",\r\n\t\trepeat_radio_month_type: \"Επανάληψη\",\r\n\t\trepeat_radio_month_start: \"Την\",\r\n\t\trepeat_text_month_day: \"ημέρα κάθε\",\r\n\t\trepeat_text_month_count: \"μήνα\",\r\n\t\trepeat_text_month_count2_before: \"κάθε\",\r\n\t\trepeat_text_month_count2_after: \"μήνα\",\r\n\t\trepeat_year_label: \"Την\",\r\n\t\tselect_year_day2: \"του\",\r\n\t\trepeat_text_year_day: \"ημέρα\",\r\n\t\tselect_year_month: \"μήνα\",\r\n\t\trepeat_radio_end: \"Χωρίς ημερομηνία λήξεως\",\r\n\t\trepeat_text_occurences_count: \"επαναλήψεις\",\r\n\t\trepeat_radio_end3: \"Λήγει την\",\r\n\t\trepeat_radio_end2: \"Μετά από\",\r\n\r\n\t\trepeat_never: \"Ποτέ\",\r\n\t\trepeat_daily: \"Κάθε μέρα\",\r\n\t\trepeat_workdays: \"Κάθε εργάσιμη μέρα\",\r\n\t\trepeat_weekly: \"Κάθε εβδομάδα\",\r\n\t\trepeat_monthly: \"Κάθε μήνα\",\r\n\t\trepeat_yearly: \"Κάθε χρόνο\",\r\n\t\trepeat_custom: \"Προσαρμοσμένο\",\r\n\t\trepeat_freq_day: \"Ημέρα\",\r\n\t\trepeat_freq_week: \"Εβδομάδα\",\r\n\t\trepeat_freq_month: \"Μήνας\",\r\n\t\trepeat_freq_year: \"Χρόνος\",\r\n\t\trepeat_on_date: \"Σε ημερομηνία\",\r\n\t\trepeat_ends: \"Λήγει\",\r\n\r\n\t\tmonth_for_recurring: [\"Ιανουάριος\", \"Φεβρουάριος\", \"Μάρτιος\", \"Απρίλιος\", \"Μάϊος\", \"Ιούνιος\", \"Ιούλιος\", \"Αύγουστος\", \"Σεπτέμβριος\", \"Οκτώβριος\", \"Νοέμβριος\", \"Δεκέμβριος\"],\r\n\t\tday_for_recurring: [\"Κυριακή\", \"Δευτέρα\", \"Τρίτη\", \"Τετάρτη\", \"Πέμπτη\", \"Παρασκευή\", \"Σάββατο\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate:{\r\n\t\tmonth_full:[\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\r\n\t\tmonth_short:[\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n\t\tday_full:[\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\r\n\t\tday_short:[\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"]\r\n\t},\r\n\tlabels:{\r\n\t\tdhx_cal_today_button:\"Today\",\r\n\t\tday_tab:\"Day\",\r\n\t\tweek_tab:\"Week\",\r\n\t\tmonth_tab:\"Month\",\r\n\t\tnew_event:\"New event\",\r\n\t\ticon_save:\"Save\",\r\n\t\ticon_cancel:\"Cancel\",\r\n\t\ticon_details:\"Details\",\r\n\t\ticon_edit:\"Edit\",\r\n\t\ticon_delete:\"Delete\",\r\n\t\tconfirm_closing:\"\",//Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting:\"Event will be deleted permanently, are you sure?\",\r\n\t\tsection_description:\"Description\",\r\n\t\tsection_time:\"Time period\",\r\n\t\tfull_day:\"Full day\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring:\"Do you want to edit the whole set of repeated events?\",\r\n\t\tsection_recurring:\"Repeat event\",\r\n\t\tbutton_recurring:\"Disabled\",\r\n\t\tbutton_recurring_open:\"Enabled\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Edit occurrence\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"Agenda\",\r\n\t\tdate:\"Date\",\r\n\t\tdescription:\"Description\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"Year\",\r\n\r\n\t\t/* week agenda extension */\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daily\",//name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Weekly\",//name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Monthly\",\r\n\t\trepeat_radio_year: \"Yearly\",\r\n\t\trepeat_radio_day_type: \"Every\",\r\n\t\trepeat_text_day_count: \"day\",\r\n\t\trepeat_radio_day_type2: \"Every workday\",\r\n\t\trepeat_week: \" Repeat every\",\r\n\t\trepeat_text_week_count: \"week next days:\",\r\n\t\trepeat_radio_month_type: \"Repeat\",\r\n\t\trepeat_radio_month_start: \"On\",\r\n\t\trepeat_text_month_day: \"day every\",\r\n\t\trepeat_text_month_count: \"month\",\r\n\t\trepeat_text_month_count2_before: \"every\",\r\n\t\trepeat_text_month_count2_after: \"month\",\r\n\t\trepeat_year_label: \"On\",\r\n\t\tselect_year_day2: \"of\",\r\n\t\trepeat_text_year_day: \"day\",\r\n\t\tselect_year_month: \"month\",\r\n\t\trepeat_radio_end: \"No end date\",\r\n\t\trepeat_text_occurences_count: \"occurrences\",\r\n\t\trepeat_radio_end2: \"After\",\r\n\t\trepeat_radio_end3: \"End by\",\r\n\r\n\t\trepeat_never: \"Never\",\r\n\t\trepeat_daily: \"Every day\",\r\n\t\trepeat_workdays: \"Every weekday\",\r\n\t\trepeat_weekly: \"Every week\",\r\n\t\trepeat_monthly: \"Every month\",\r\n\t\trepeat_yearly: \"Every year\",\r\n\t\trepeat_custom: \"Custom\",\r\n\t\trepeat_freq_day: \"Day\",\r\n\t\trepeat_freq_week: \"Week\",\r\n\t\trepeat_freq_month: \"Month\",\r\n\t\trepeat_freq_year: \"Year\",\r\n\t\trepeat_on_date: \"On date\",\r\n\t\trepeat_ends: \"Ends\",\r\n\r\n\t\tmonth_for_recurring: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"]//\r\n\t}\r\n};\r\n\r\n","/*\r\n @Autor Manuel Fernandez Panzuela - www.mfernandez.es\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Enero\", \"Febrero\", \"Marzo\", \"Abril\", \"Mayo\", \"Junio\", \"Julio\", \"Agosto\", \"Septiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"],\r\n\t\tmonth_short: [\"Ene\", \"Feb\", \"Mar\", \"Abr\", \"May\", \"Jun\", \"Jul\", \"Ago\", \"Sep\", \"Oct\", \"Nov\", \"Dic\"],\r\n\t\tday_full: [\"Domingo\", \"Lunes\", \"Martes\", \"Miércoles\", \"Jueves\", \"Viernes\", \"Sábado\"],\r\n\t\tday_short: [\"Dom\", \"Lun\", \"Mar\", \"Mié\", \"Jue\", \"Vie\", \"Sáb\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hoy\",\r\n\t\tday_tab: \"Día\",\r\n\t\tweek_tab: \"Semana\",\r\n\t\tmonth_tab: \"Mes\",\r\n\t\tnew_event: \"Nuevo evento\",\r\n\t\ticon_save: \"Guardar\",\r\n\t\ticon_cancel: \"Cancelar\",\r\n\t\ticon_details: \"Detalles\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Eliminar\",\r\n\t\tconfirm_closing: \"\", //\"Sus cambios se perderán, continuar ?\"\r\n\t\tconfirm_deleting: \"El evento se borrará definitivamente, ¿continuar?\",\r\n\t\tsection_description: \"Descripción\",\r\n\t\tsection_time: \"Período\",\r\n\t\tfull_day: \"Todo el día\",\r\n\r\n\t\tconfirm_recurring: \"¿Desea modificar el conjunto de eventos repetidos?\",\r\n\t\tsection_recurring: \"Repita el evento\",\r\n\t\tbutton_recurring: \"Impedido\",\r\n\t\tbutton_recurring_open: \"Permitido\",\r\n\t\tbutton_edit_series: \"Editar la serie\",\r\n\t\tbutton_edit_occurrence: \"Editar este evento\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Día\",\r\n\t\tdate: \"Fecha\",\r\n\t\tdescription: \"Descripción\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Año\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Día\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Reja\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diariamente\",\r\n\t\trepeat_radio_week: \"Semanalmente\",\r\n\t\trepeat_radio_month: \"Mensualmente\",\r\n\t\trepeat_radio_year: \"Anualmente\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia\",\r\n\t\trepeat_radio_day_type2: \"Cada jornada de trabajo\",\r\n\t\trepeat_week: \" Repetir cada\",\r\n\t\trepeat_text_week_count: \"semana:\",\r\n\t\trepeat_radio_month_type: \"Repita\",\r\n\t\trepeat_radio_month_start: \"El\",\r\n\t\trepeat_text_month_day: \"dia cada \",\r\n\t\trepeat_text_month_count: \"mes\",\r\n\t\trepeat_text_month_count2_before: \"cada\",\r\n\t\trepeat_text_month_count2_after: \"mes\",\r\n\t\trepeat_year_label: \"El\",\r\n\t\tselect_year_day2: \"del\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mes\",\r\n\t\trepeat_radio_end: \"Sin fecha de finalización\",\r\n\t\trepeat_text_occurences_count: \"ocurrencias\",\r\n\t\trepeat_radio_end3: \"Fin\",\r\n\t\trepeat_radio_end2: \"Después de\",\r\n\r\n\t\trepeat_never: \"Nunca\",\r\n\t\trepeat_daily: \"Cada día\",\r\n\t\trepeat_workdays: \"Cada día laborable\",\r\n\t\trepeat_weekly: \"Cada semana\",\r\n\t\trepeat_monthly: \"Cada mes\",\r\n\t\trepeat_yearly: \"Cada año\",\r\n\t\trepeat_custom: \"Personalizado\",\r\n\t\trepeat_freq_day: \"Día\",\r\n\t\trepeat_freq_week: \"Semana\",\r\n\t\trepeat_freq_month: \"Mes\",\r\n\t\trepeat_freq_year: \"Año\",\r\n\t\trepeat_on_date: \"En la fecha\",\r\n\t\trepeat_ends: \"Termina\",\r\n\r\n\t\tmonth_for_recurring: [\"Enero\", \"Febrero\", \"Маrzo\", \"Аbril\", \"Mayo\", \"Junio\", \"Julio\", \"Аgosto\", \"Setiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"],\r\n\t\tday_for_recurring: [\"Domingo\", \"Lunes\", \"Martes\", \"Miércoles\", \"Jeuves\", \"Viernes\", \"Sabado\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Tammikuu\", \"Helmikuu\", \"Maaliskuu\", \"Huhtikuu\", \"Toukokuu\", \"Kesäkuu\", \"Heinäkuu\", \"Elokuu\", \"Syyskuu\", \"Lokakuu\", \"Marraskuu\", \"Joulukuu\"],\r\n\t\tmonth_short: [\"Tam\", \"Hel\", \"Maa\", \"Huh\", \"Tou\", \"Kes\", \"Hei\", \"Elo\", \"Syy\", \"Lok\", \"Mar\", \"Jou\"],\r\n\t\tday_full: [\"Sunnuntai\", \"Maanantai\", \"Tiistai\", \"Keskiviikko\", \"Torstai\", \"Perjantai\", \"Lauantai\"],\r\n\t\tday_short: [\"Su\", \"Ma\", \"Ti\", \"Ke\", \"To\", \"Pe\", \"La\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Tänään\",\r\n\t\tday_tab: \"Päivä\",\r\n\t\tweek_tab: \"Viikko\",\r\n\t\tmonth_tab: \"Kuukausi\",\r\n\t\tnew_event: \"Uusi tapahtuma\",\r\n\t\ticon_save: \"Tallenna\",\r\n\t\ticon_cancel: \"Peru\",\r\n\t\ticon_details: \"Tiedot\",\r\n\t\ticon_edit: \"Muokkaa\",\r\n\t\ticon_delete: \"Poista\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Haluatko varmasti poistaa tapahtuman?\",\r\n\t\tsection_description: \"Kuvaus\",\r\n\t\tsection_time: \"Aikajakso\",\r\n\t\tfull_day: \"Koko päivä\",\r\n\r\n\t\tconfirm_recurring: \"Haluatko varmasti muokata toistuvan tapahtuman kaikkia jaksoja?\",\r\n\t\tsection_recurring: \"Toista tapahtuma\",\r\n\t\tbutton_recurring: \"Ei käytössä\",\r\n\t\tbutton_recurring_open: \"Käytössä\",\r\n\t\tbutton_edit_series: \"Muokkaa sarja\",\r\n\t\tbutton_edit_occurrence: \"Muokkaa kopio\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Esityslista\",\r\n\t\tdate: \"Päivämäärä\",\r\n\t\tdescription: \"Kuvaus\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Vuoden\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Esityslista\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Ritilä\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Luo uusi vetämällä\",\r\n\t\tdrag_to_move:\"Siirrä vetämällä\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Päivittäin\",\r\n\t\trepeat_radio_week: \"Viikoittain\",\r\n\t\trepeat_radio_month: \"Kuukausittain\",\r\n\t\trepeat_radio_year: \"Vuosittain\",\r\n\t\trepeat_radio_day_type: \"Joka\",\r\n\t\trepeat_text_day_count: \"päivä\",\r\n\t\trepeat_radio_day_type2: \"Joka arkipäivä\",\r\n\t\trepeat_week: \"Toista joka\",\r\n\t\trepeat_text_week_count: \"viikko näinä päivinä:\",\r\n\t\trepeat_radio_month_type: \"Toista\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \"päivänä joka\",\r\n\t\trepeat_text_month_count: \"kuukausi\",\r\n\t\trepeat_text_month_count2_before: \"joka\",\r\n\t\trepeat_text_month_count2_after: \"kuukausi\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"päivä\",\r\n\t\tselect_year_month: \"kuukausi\",\r\n\t\trepeat_radio_end: \"Ei loppumisaikaa\",\r\n\t\trepeat_text_occurences_count: \"Toiston jälkeen\",\r\n\t\trepeat_radio_end3: \"Loppuu\",\r\n\t\trepeat_radio_end2: \"\",\r\n\r\n\t\trepeat_never: \"Ei koskaan\",\r\n\t\trepeat_daily: \"Joka päivä\",\r\n\t\trepeat_workdays: \"Joka arkipäivä\",\r\n\t\trepeat_weekly: \"Joka viikko\",\r\n\t\trepeat_monthly: \"Joka kuukausi\",\r\n\t\trepeat_yearly: \"Joka vuosi\",\r\n\t\trepeat_custom: \"Mukautettu\",\r\n\t\trepeat_freq_day: \"Päivä\",\r\n\t\trepeat_freq_week: \"Viikko\",\r\n\t\trepeat_freq_month: \"Kuukausi\",\r\n\t\trepeat_freq_year: \"Vuosi\",\r\n\t\trepeat_on_date: \"Tiettynä päivänä\",\r\n\t\trepeat_ends: \"Päättyy\",\r\n\r\n\t\tmonth_for_recurring: [\"Tammikuu\", \"Helmikuu\", \"Maaliskuu\", \"Huhtikuu\", \"Toukokuu\", \"Kesäkuu\", \"Heinäkuu\", \"Elokuu\", \"Syyskuu\", \"Lokakuu\", \"Marraskuu\", \"Joulukuu\"],\r\n\t\tday_for_recurring: [\"Sunnuntai\", \"Maanantai\", \"Tiistai\", \"Keskiviikko\", \"Torstai\", \"Perjantai\", \"Lauantai\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Janvier\", \"Février\", \"Mars\", \"Avril\", \"Mai\", \"Juin\", \"Juillet\", \"Août\", \"Septembre\", \"Octobre\", \"Novembre\", \"Décembre\"],\r\n\t\tmonth_short: [\"Jan\", \"Fév\", \"Mar\", \"Avr\", \"Mai\", \"Juin\", \"Juil\", \"Aoû\", \"Sep\", \"Oct\", \"Nov\", \"Déc\"],\r\n\t\tday_full: [\"Dimanche\", \"Lundi\", \"Mardi\", \"Mercredi\", \"Jeudi\", \"Vendredi\", \"Samedi\"],\r\n\t\tday_short: [\"Dim\", \"Lun\", \"Mar\", \"Mer\", \"Jeu\", \"Ven\", \"Sam\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Aujourd'hui\",\r\n\t\tday_tab: \"Jour\",\r\n\t\tweek_tab: \"Semaine\",\r\n\t\tmonth_tab: \"Mois\",\r\n\t\tnew_event: \"Nouvel événement\",\r\n\t\ticon_save: \"Enregistrer\",\r\n\t\ticon_cancel: \"Annuler\",\r\n\t\ticon_details: \"Détails\",\r\n\t\ticon_edit: \"Modifier\",\r\n\t\ticon_delete: \"Effacer\",\r\n\t\tconfirm_closing: \"\", //Vos modifications seront perdus, êtes-vous sûr ?\r\n\t\tconfirm_deleting: \"L'événement sera effacé sans appel, êtes-vous sûr ?\",\r\n\t\tsection_description: \"Description\",\r\n\t\tsection_time: \"Période\",\r\n\t\tfull_day: \"Journée complète\",\r\n\r\n\t\tconfirm_recurring: \"Voulez-vous éditer toute une série d'évènements répétés?\",\r\n\t\tsection_recurring: \"Périodicité\",\r\n\t\tbutton_recurring: \"Désactivé\",\r\n\t\tbutton_recurring_open: \"Activé\",\r\n\t\tbutton_edit_series: \"Modifier la série\",\r\n\t\tbutton_edit_occurrence: \"Modifier une copie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Jour\",\r\n\t\tdate: \"Date\",\r\n\t\tdescription: \"Description\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Année\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Jour\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grille\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Quotidienne\",\r\n\t\trepeat_radio_week: \"Hebdomadaire\",\r\n\t\trepeat_radio_month: \"Mensuelle\",\r\n\t\trepeat_radio_year: \"Annuelle\",\r\n\t\trepeat_radio_day_type: \"Chaque\",\r\n\t\trepeat_text_day_count: \"jour\",\r\n\t\trepeat_radio_day_type2: \"Chaque journée de travail\",\r\n\t\trepeat_week: \" Répéter toutes les\",\r\n\t\trepeat_text_week_count: \"semaine:\",\r\n\t\trepeat_radio_month_type: \"Répéter\",\r\n\t\trepeat_radio_month_start: \"Le\",\r\n\t\trepeat_text_month_day: \"jour chaque\",\r\n\t\trepeat_text_month_count: \"mois\",\r\n\t\trepeat_text_month_count2_before: \"chaque\",\r\n\t\trepeat_text_month_count2_after: \"mois\",\r\n\t\trepeat_year_label: \"Le\",\r\n\t\tselect_year_day2: \"du\",\r\n\t\trepeat_text_year_day: \"jour\",\r\n\t\tselect_year_month: \"mois\",\r\n\t\trepeat_radio_end: \"Pas de date d"achèvement\",\r\n\t\trepeat_text_occurences_count: \"occurrences\",\r\n\t\trepeat_radio_end3: \"Fin\",\r\n\t\trepeat_radio_end2: \"Après\",\r\n\r\n\t\trepeat_never: \"Jamais\",\r\n\t\trepeat_daily: \"Chaque jour\",\r\n\t\trepeat_workdays: \"Chaque jour ouvrable\",\r\n\t\trepeat_weekly: \"Chaque semaine\",\r\n\t\trepeat_monthly: \"Chaque mois\",\r\n\t\trepeat_yearly: \"Chaque année\",\r\n\t\trepeat_custom: \"Personnalisé\",\r\n\t\trepeat_freq_day: \"Jour\",\r\n\t\trepeat_freq_week: \"Semaine\",\r\n\t\trepeat_freq_month: \"Mois\",\r\n\t\trepeat_freq_year: \"Année\",\r\n\t\trepeat_on_date: \"À la date\",\r\n\t\trepeat_ends: \"Se termine\",\r\n\r\n\t\tmonth_for_recurring: [\"Janvier\", \"Février\", \"Mars\", \"Avril\", \"Mai\", \"Juin\", \"Juillet\", \"Août\", \"Septembre\", \"Octobre\", \"Novembre\", \"Décembre\"],\r\n\t\tday_for_recurring: [\"Dimanche\", \"Lundi\", \"Mardi\", \"Mercredi\", \"Jeudi\", \"Vendredi\", \"Samedi\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"ינואר\", \"פברואר\", \"מרץ\", \"אפריל\", \"מאי\", \"יוני\", \"יולי\", \"אוגוסט\", \"ספטמבר\", \"אוקטובר\", \"נובמבר\", \"דצמבר\"],\r\n\t\tmonth_short: [\"ינו\", \"פבר\", \"מרץ\", \"אפר\", \"מאי\", \"יונ\", \"יול\", \"אוג\", \"ספט\", \"אוק\", \"נוב\", \"דצמ\"],\r\n\t\tday_full: [\"ראשון\", \"שני\", \"שלישי\", \"רביעי\", \"חמישי\", \"שישי\", \"שבת\"],\r\n\t\tday_short: [\"א\", \"ב\", \"ג\", \"ד\", \"ה\", \"ו\", \"ש\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"היום\",\r\n\t\tday_tab: \"יום\",\r\n\t\tweek_tab: \"שבוע\",\r\n\t\tmonth_tab: \"חודש\",\r\n\t\tnew_event: \"ארוע חדש\",\r\n\t\ticon_save: \"שמור\",\r\n\t\ticon_cancel: \"בטל\",\r\n\t\ticon_details: \"פרטים\",\r\n\t\ticon_edit: \"ערוך\",\r\n\t\ticon_delete: \"מחק\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"ארוע ימחק סופית.להמשיך?\",\r\n\t\tsection_description: \"תיאור\",\r\n\t\tsection_time: \"תקופה\",\r\n\r\n\t\tconfirm_recurring: \"האם ברצונך לשנות כל סדרת ארועים מתמשכים?\",\r\n\t\tsection_recurring: \"להעתיק ארוע\",\r\n\t\tbutton_recurring: \"לא פעיל\",\r\n\t\tbutton_recurring_open: \"פעיל\",\r\n\t\tfull_day: \"יום שלם\",\r\n\t\tbutton_edit_series: \"ערוך את הסדרה\",\r\n\t\tbutton_edit_occurrence: \"עריכת עותק\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"סדר יום\",\r\n\t\tdate: \"תאריך\",\r\n\t\tdescription: \"תיאור\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"לשנה\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"סדר יום\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"סורג\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"גרור כדי להזיז\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"בטל\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"הבא\",\r\n\t\tprev: \"הקודם\",\r\n\t\tyear: \"שנה\",\r\n\t\tmonth: \"חודש\",\r\n\t\tday: \"יום\",\r\n\t\thour:\"שעה\",\r\n\t\tminute: \"דקה\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"יומי\",\r\n\t\trepeat_radio_week: \"שבועי\",\r\n\t\trepeat_radio_month: \"חודשי\",\r\n\t\trepeat_radio_year: \"שנתי\",\r\n\t\trepeat_radio_day_type: \"חזור כל\",\r\n\t\trepeat_text_day_count: \"ימים\",\r\n\t\trepeat_radio_day_type2: \"חזור כל יום עבודה\",\r\n\t\trepeat_week: \" חזור כל\",\r\n\t\trepeat_text_week_count: \"שבוע לפי ימים:\",\r\n\t\trepeat_radio_month_type: \"חזור כל\",\r\n\t\trepeat_radio_month_start: \"כל\",\r\n\t\trepeat_text_month_day: \"ימים כל\",\r\n\t\trepeat_text_month_count: \"חודשים\",\r\n\t\trepeat_text_month_count2_before: \"חזור כל\",\r\n\t\trepeat_text_month_count2_after: \"חודש\",\r\n\t\trepeat_year_label: \"כל\",\r\n\t\tselect_year_day2: \"בחודש\",\r\n\t\trepeat_text_year_day: \"ימים\",\r\n\t\tselect_year_month: \"חודש\",\r\n\t\trepeat_radio_end: \"לעולם לא מסתיים\",\r\n\t\trepeat_text_occurences_count: \"אירועים\",\r\n\t\trepeat_radio_end3: \"מסתיים ב\",\r\n\t\trepeat_radio_end2: \"אחרי\",\r\n\r\n\t\trepeat_never: \"אף פעם\",\r\n\t\trepeat_daily: \"כל יום\",\r\n\t\trepeat_workdays: \"כל יום עבודה\",\r\n\t\trepeat_weekly: \"כל שבוע\",\r\n\t\trepeat_monthly: \"כל חודש\",\r\n\t\trepeat_yearly: \"כל שנה\",\r\n\t\trepeat_custom: \"מותאם אישית\",\r\n\t\trepeat_freq_day: \"יום\",\r\n\t\trepeat_freq_week: \"שבוע\",\r\n\t\trepeat_freq_month: \"חודש\",\r\n\t\trepeat_freq_year: \"שנה\",\r\n\t\trepeat_on_date: \"בתאריך\",\r\n\t\trepeat_ends: \"מסתיים\",\r\n\r\n\t\tmonth_for_recurring: [\"ינואר\", \"פברואר\", \"מרץ\", \"אפריל\", \"מאי\", \"יוני\", \"יולי\", \"אוגוסט\", \"ספטמבר\", \"אוקטובר\", \"נובמבר\", \"דצמבר\"],\r\n\t\tday_for_recurring: [\"ראשון\", \"שני\", \"שלישי\", \"רביעי\", \"חמישי\", \"שישי\", \"שבת\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Január\", \"Február\", \"Március\", \"Április\", \"Május\", \"Június\", \"Július\", \"Augusztus\", \"Szeptember\", \"Október\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Már\", \"Ápr\", \"Máj\", \"Jún\", \"Júl\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Vasárnap\", \"Hétfõ\", \"Kedd\", \"Szerda\", \"Csütörtök\", \"Péntek\", \"szombat\"],\r\n\t\tday_short: [\"Va\", \"Hé\", \"Ke\", \"Sze\", \"Csü\", \"Pé\", \"Szo\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Ma\",\r\n\t\tday_tab: \"Nap\",\r\n\t\tweek_tab: \"Hét\",\r\n\t\tmonth_tab: \"Hónap\",\r\n\t\tnew_event: \"Új esemény\",\r\n\t\ticon_save: \"Mentés\",\r\n\t\ticon_cancel: \"Mégse\",\r\n\t\ticon_details: \"Részletek\",\r\n\t\ticon_edit: \"Szerkesztés\",\r\n\t\ticon_delete: \"Törlés\",\r\n\t\tconfirm_closing: \"\", //A változások elvesznek, biztosan folytatja? \"\r\n\t\tconfirm_deleting: \"Az esemény törölve lesz, biztosan folytatja?\",\r\n\t\tsection_description: \"Leírás\",\r\n\t\tsection_time: \"Idõszak\",\r\n\t\tfull_day: \"Egesz napos\",\r\n\r\n\t\t/*ismétlõdõ események*/\r\n\t\tconfirm_recurring: \"Biztosan szerkeszteni akarod az összes ismétlõdõ esemény beállítását?\",\r\n\t\tsection_recurring: \"Esemény ismétlése\",\r\n\t\tbutton_recurring: \"Tiltás\",\r\n\t\tbutton_recurring_open: \"Engedélyezés\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Szerkesztés bíróság\",\r\n\r\n\t\t/*napirendi nézet*/\r\n\t\tagenda_tab: \"Napirend\",\r\n\t\tdate: \"Dátum\",\r\n\t\tdescription: \"Leírás\",\r\n\r\n\t\t/*éves nézet*/\r\n\t\tyear_tab: \"Év\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Napi\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Heti\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Havi\",\r\n\t\trepeat_radio_year: \"Éves\",\r\n\t\trepeat_radio_day_type: \"Minden\",\r\n\t\trepeat_text_day_count: \"nap\",\r\n\t\trepeat_radio_day_type2: \"Minden munkanap\",\r\n\t\trepeat_week: \" Ismételje meg minden\",\r\n\t\trepeat_text_week_count: \"héten a következő napokon:\",\r\n\t\trepeat_radio_month_type: \"Ismétlés\",\r\n\t\trepeat_radio_month_start: \"Ekkor\",\r\n\t\trepeat_text_month_day: \"nap minden\",\r\n\t\trepeat_text_month_count: \"hónapban\",\r\n\t\trepeat_text_month_count2_before: \"minden\",\r\n\t\trepeat_text_month_count2_after: \"hónapban\",\r\n\t\trepeat_year_label: \"Ekkor\",\r\n\t\tselect_year_day2: \"-án/-én\",\r\n\t\trepeat_text_year_day: \"nap\",\r\n\t\tselect_year_month: \"hónap\",\r\n\t\trepeat_radio_end: \"Nincs befejezési dátum\",\r\n\t\trepeat_text_occurences_count: \"esemény\",\r\n\t\trepeat_radio_end2: \"Után\",\r\n\t\trepeat_radio_end3: \"Befejező dátum\",\r\n\r\n\t\trepeat_never: \"Soha\",\r\n\t\trepeat_daily: \"Minden nap\",\r\n\t\trepeat_workdays: \"Minden munkanap\",\r\n\t\trepeat_weekly: \"Minden héten\",\r\n\t\trepeat_monthly: \"Minden hónapban\",\r\n\t\trepeat_yearly: \"Minden évben\",\r\n\t\trepeat_custom: \"Egyedi\",\r\n\t\trepeat_freq_day: \"Nap\",\r\n\t\trepeat_freq_week: \"Hét\",\r\n\t\trepeat_freq_month: \"Hónap\",\r\n\t\trepeat_freq_year: \"Év\",\r\n\t\trepeat_on_date: \"Dátum szerint\",\r\n\t\trepeat_ends: \"Befejeződik\",\r\n\r\n\t\tmonth_for_recurring: [\"Január\", \"Február\", \"Március\", \"Április\", \"Május\", \"Június\", \"Július\", \"Augusztus\", \"Szeptember\", \"Október\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Vasárnap\", \"Hétfő\", \"Kedd\", \"Szerda\", \"Csütörtök\", \"Péntek\", \"Szombat\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Maret\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Agustus\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mei\", \"Jun\", \"Jul\", \"Ags\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Minggu\", \"Senin\", \"Selasa\", \"Rabu\", \"Kamis\", \"Jumat\", \"Sabtu\"],\r\n\t\tday_short: [\"Ming\", \"Sen\", \"Sel\", \"Rab\", \"Kam\", \"Jum\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hari Ini\",\r\n\t\tday_tab: \"Hari\",\r\n\t\tweek_tab: \"Minggu\",\r\n\t\tmonth_tab: \"Bulan\",\r\n\t\tnew_event: \"Acara Baru\",\r\n\t\ticon_save: \"Simpan\",\r\n\t\ticon_cancel: \"Batal\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edit\",\r\n\t\ticon_delete: \"Hapus\",\r\n\t\tconfirm_closing: \"\", /*Perubahan tidak akan disimpan ?*/\r\n\t\tconfirm_deleting: \"Acara akan dihapus\",\r\n\t\tsection_description: \"Keterangan\",\r\n\t\tsection_time: \"Periode\",\r\n\t\tfull_day: \"Hari penuh\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Apakah acara ini akan berulang?\",\r\n\t\tsection_recurring: \"Acara Rutin\",\r\n\t\tbutton_recurring: \"Tidak Difungsikan\",\r\n\t\tbutton_recurring_open: \"Difungsikan\",\r\n\t\tbutton_edit_series: \"Mengedit seri\",\r\n\t\tbutton_edit_occurrence: \"Mengedit salinan\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Tanggal\",\r\n\t\tdescription: \"Keterangan\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Tahun\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabel\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Harian\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Mingguan\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Bulanan\",\r\n\t\trepeat_radio_year: \"Tahunan\",\r\n\t\trepeat_radio_day_type: \"Setiap\",\r\n\t\trepeat_text_day_count: \"hari\",\r\n\t\trepeat_radio_day_type2: \"Setiap hari kerja\",\r\n\t\trepeat_week: \" Ulangi setiap\",\r\n\t\trepeat_text_week_count: \"minggu pada hari berikut:\",\r\n\t\trepeat_radio_month_type: \"Ulangi\",\r\n\t\trepeat_radio_month_start: \"Pada\",\r\n\t\trepeat_text_month_day: \"hari setiap\",\r\n\t\trepeat_text_month_count: \"bulan\",\r\n\t\trepeat_text_month_count2_before: \"setiap\",\r\n\t\trepeat_text_month_count2_after: \"bulan\",\r\n\t\trepeat_year_label: \"Pada\",\r\n\t\tselect_year_day2: \"dari\",\r\n\t\trepeat_text_year_day: \"hari\",\r\n\t\tselect_year_month: \"bulan\",\r\n\t\trepeat_radio_end: \"Tanpa tanggal akhir\",\r\n\t\trepeat_text_occurences_count: \"kejadian\",\r\n\t\trepeat_radio_end2: \"Setelah\",\r\n\t\trepeat_radio_end3: \"Berakhir pada\",\r\n\r\n\t\trepeat_never: \"Tidak pernah\",\r\n\t\trepeat_daily: \"Setiap hari\",\r\n\t\trepeat_workdays: \"Setiap hari kerja\",\r\n\t\trepeat_weekly: \"Setiap minggu\",\r\n\t\trepeat_monthly: \"Setiap bulan\",\r\n\t\trepeat_yearly: \"Setiap tahun\",\r\n\t\trepeat_custom: \"Kustom\",\r\n\t\trepeat_freq_day: \"Hari\",\r\n\t\trepeat_freq_week: \"Minggu\",\r\n\t\trepeat_freq_month: \"Bulan\",\r\n\t\trepeat_freq_year: \"Tahun\",\r\n\t\trepeat_on_date: \"Pada tanggal\",\r\n\t\trepeat_ends: \"Berakhir\",\r\n\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Maret\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Agustus\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tday_for_recurring: [\"Minggu\", \"Senin\", \"Selasa\", \"Rabu\", \"Kamis\", \"Jumat\", \"Sabtu\"]\r\n\t}\r\n};","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Gennaio\", \"Febbraio\", \"Marzo\", \"Aprile\", \"Maggio\", \"Giugno\", \"Luglio\", \"Agosto\", \"Settembre\", \"Ottobre\", \"Novembre\", \"Dicembre\"],\r\n\t\tmonth_short: [\"Gen\", \"Feb\", \"Mar\", \"Apr\", \"Mag\", \"Giu\", \"Lug\", \"Ago\", \"Set\", \"Ott\", \"Nov\", \"Dic\"],\r\n\t\tday_full: [\"Domenica\", \"Lunedì\", \"Martedì\", \"Mercoledì\", \"Giovedì\", \"Venerdì\", \"Sabato\"],\r\n\t\tday_short: [\"Dom\", \"Lun\", \"Mar\", \"Mer\", \"Gio\", \"Ven\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Oggi\",\r\n\t\tday_tab: \"Giorno\",\r\n\t\tweek_tab: \"Settimana\",\r\n\t\tmonth_tab: \"Mese\",\r\n\t\tnew_event: \"Nuovo evento\",\r\n\t\ticon_save: \"Salva\",\r\n\t\ticon_cancel: \"Chiudi\",\r\n\t\ticon_details: \"Dettagli\",\r\n\t\ticon_edit: \"Modifica\",\r\n\t\ticon_delete: \"Elimina\",\r\n\t\tconfirm_closing: \"\", //Le modifiche apportate saranno perse, siete sicuri?\r\n\t\tconfirm_deleting: \"L'evento sarà eliminato, siete sicuri?\",\r\n\t\tsection_description: \"Descrizione\",\r\n\t\tsection_time: \"Periodo di tempo\",\r\n\t\tfull_day: \"Intera giornata\",\r\n\r\n\t\tconfirm_recurring: \"Vuoi modificare l'intera serie di eventi?\",\r\n\t\tsection_recurring: \"Ripetere l'evento\",\r\n\t\tbutton_recurring: \"Disattivato\",\r\n\t\tbutton_recurring_open: \"Attivato\",\r\n\t\tbutton_edit_series: \"Modificare la serie\",\r\n\t\tbutton_edit_occurrence: \"Modificare una copia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descrizione\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Anno\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Griglia\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Quotidiano\",\r\n\t\trepeat_radio_week: \"Settimanale\",\r\n\t\trepeat_radio_month: \"Mensile\",\r\n\t\trepeat_radio_year: \"Annuale\",\r\n\t\trepeat_radio_day_type: \"Ogni\",\r\n\t\trepeat_text_day_count: \"giorno\",\r\n\t\trepeat_radio_day_type2: \"Ogni giornata lavorativa\",\r\n\t\trepeat_week: \" Ripetere ogni\",\r\n\t\trepeat_text_week_count: \"settimana:\",\r\n\t\trepeat_radio_month_type: \"Ripetere\",\r\n\t\trepeat_radio_month_start: \"Il\",\r\n\t\trepeat_text_month_day: \"giorno ogni\",\r\n\t\trepeat_text_month_count: \"mese\",\r\n\t\trepeat_text_month_count2_before: \"ogni\",\r\n\t\trepeat_text_month_count2_after: \"mese\",\r\n\t\trepeat_year_label: \"Il\",\r\n\t\tselect_year_day2: \"del\",\r\n\t\trepeat_text_year_day: \"giorno\",\r\n\t\tselect_year_month: \"mese\",\r\n\t\trepeat_radio_end: \"Senza data finale\",\r\n\t\trepeat_text_occurences_count: \"occorenze\",\r\n\t\trepeat_radio_end3: \"Fine\",\r\n\t\trepeat_radio_end2: \"Dopo\",\r\n\r\n\t\trepeat_never: \"Mai\",\r\n\t\trepeat_daily: \"Ogni giorno\",\r\n\t\trepeat_workdays: \"Ogni giorno feriale\",\r\n\t\trepeat_weekly: \"Ogni settimana\",\r\n\t\trepeat_monthly: \"Ogni mese\",\r\n\t\trepeat_yearly: \"Ogni anno\",\r\n\t\trepeat_custom: \"Personalizzato\",\r\n\t\trepeat_freq_day: \"Giorno\",\r\n\t\trepeat_freq_week: \"Settimana\",\r\n\t\trepeat_freq_month: \"Mese\",\r\n\t\trepeat_freq_year: \"Anno\",\r\n\t\trepeat_on_date: \"Alla data\",\r\n\t\trepeat_ends: \"Finisce\",\r\n\r\n\t\tmonth_for_recurring: [\"Gennaio\", \"Febbraio\", \"Marzo\", \"Aprile\", \"Maggio\", \"Jiugno\", \"Luglio\", \"Agosto\", \"Settembre\", \"Ottobre\", \"Novembre\", \"Dicembre\"],\r\n\t\tday_for_recurring: [\"Domenica\", \"Lunedì\", \"Martedì\", \"Mercoledì\", \"Jovedì\", \"Venerdì\", \"Sabato\"]\r\n\t}\r\n};\r\n","/*\r\n Translation by Genexus Japan Inc.\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tmonth_short: [ \"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_full: [\"日曜日\", \"月曜日\", \"火曜日\", \"水曜日\", \"木曜日\", \"金曜日\", \"土曜日\"],\r\n\t\tday_short: [\"日\", \"月\", \"火\", \"水\", \"木\", \"金\", \"土\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"今日\",\r\n\t\tday_tab: \"日\",\r\n\t\tweek_tab: \"週\",\r\n\t\tmonth_tab: \"月\",\r\n\t\tnew_event: \"新イベント\",\r\n\t\ticon_save: \"保存\",\r\n\t\ticon_cancel: \"キャンセル\",\r\n\t\ticon_details: \"詳細\",\r\n\t\ticon_edit: \"編集\",\r\n\t\ticon_delete: \"削除\",\r\n\t\tconfirm_closing: \"\", //変更が取り消されます、宜しいですか?\r\n\t\tconfirm_deleting: \"イベント完全に削除されます、宜しいですか?\",\r\n\t\tsection_description: \"デスクリプション\",\r\n\t\tsection_time: \"期間\",\r\n\t\tconfirm_recurring: \"繰り返されているイベントを全て編集しますか?\",\r\n\t\tsection_recurring: \"イベントを繰り返す\",\r\n\t\tbutton_recurring: \"無効\",\r\n\t\tbutton_recurring_open: \"有効\",\r\n\t\tfull_day: \"終日\",\r\n\t\tbutton_edit_series: \"シリーズを編集します\",\r\n\t\tbutton_edit_occurrence: \"コピーを編集\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"議題は\",\r\n\t\tdate: \"日付\",\r\n\t\tdescription: \"説明\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"今年\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"議題は\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"グリッド\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"毎日\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"毎週\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"毎月\",\r\n\t\trepeat_radio_year: \"毎年\",\r\n\t\trepeat_radio_day_type: \"毎\",\r\n\t\trepeat_text_day_count: \"日\",\r\n\t\trepeat_radio_day_type2: \"毎営業日\",\r\n\t\trepeat_week: \" 繰り返し毎\",\r\n\t\trepeat_text_week_count: \"週 次の日:\",\r\n\t\trepeat_radio_month_type: \"繰り返し\",\r\n\t\trepeat_radio_month_start: \"オン\",\r\n\t\trepeat_text_month_day: \"日毎\",\r\n\t\trepeat_text_month_count: \"月\",\r\n\t\trepeat_text_month_count2_before: \"毎\",\r\n\t\trepeat_text_month_count2_after: \"月\",\r\n\t\trepeat_year_label: \"オン\",\r\n\t\tselect_year_day2: \"の\",\r\n\t\trepeat_text_year_day: \"日\",\r\n\t\tselect_year_month: \"月\",\r\n\t\trepeat_radio_end: \"終了日なし\",\r\n\t\trepeat_text_occurences_count: \"回数\",\r\n\t\trepeat_radio_end2: \"後\",\r\n\t\trepeat_radio_end3: \"終了日まで\",\r\n\r\n\t\trepeat_never: \"決して\",\r\n\t\trepeat_daily: \"毎日\",\r\n\t\trepeat_workdays: \"毎営業日\",\r\n\t\trepeat_weekly: \"毎週\",\r\n\t\trepeat_monthly: \"毎月\",\r\n\t\trepeat_yearly: \"毎年\",\r\n\t\trepeat_custom: \"カスタム\",\r\n\t\trepeat_freq_day: \"日\",\r\n\t\trepeat_freq_week: \"週\",\r\n\t\trepeat_freq_month: \"月\",\r\n\t\trepeat_freq_year: \"年\",\r\n\t\trepeat_on_date: \"日にち\",\r\n\t\trepeat_ends: \"終了\",\r\n\r\n\t\tmonth_for_recurring: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_for_recurring: [\"日曜日\", \"月曜日\", \"火曜日\", \"水曜日\", \"木曜日\", \"金曜日\", \"土曜日\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default class LocaleManager{\r\n\tconstructor(config){\r\n\t\tthis._locales = {};\r\n\t\tfor(const i in config){\r\n\t\t\tthis._locales[i] = config[i];\r\n\t\t}\r\n\t}\r\n\r\n\taddLocale(name, locale) {\r\n\t\tthis._locales[name] = locale;\r\n\t}\r\n\r\n\tgetLocale(name) {\r\n\t\treturn this._locales[name];\r\n\t}\r\n}","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Mon\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"I dag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uke\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny hendelse\",\r\n\t\ticon_save: \"Lagre\",\r\n\t\ticon_cancel: \"Avbryt\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Rediger\",\r\n\t\ticon_delete: \"Slett\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Hendelsen vil bli slettet permanent. Er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du forandre hele dette settet av repeterende hendelser?\",\r\n\t\tsection_recurring: \"Repeter hendelsen\",\r\n\t\tbutton_recurring: \"Av\",\r\n\t\tbutton_recurring_open: \"På\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Redigere en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\",\r\n\t\trepeat_radio_week: \"Ukentlig\",\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Alle hverdager\",\r\n\t\trepeat_week: \" Gjentas hver\",\r\n\t\trepeat_text_week_count: \"uke på:\",\r\n\t\trepeat_radio_month_type: \"På hver\",\r\n\t\trepeat_radio_month_start: \"På\",\r\n\t\trepeat_text_month_day: \"dag hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"på\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Ingen sluttdato\",\r\n\t\trepeat_text_occurences_count: \"forekomst\",\r\n\t\trepeat_radio_end3: \"Stop den\",\r\n\t\trepeat_radio_end2: \"Etter\",\r\n\r\n\t\trepeat_never: \"Aldri\",\r\n\t\trepeat_daily: \"Hver dag\",\r\n\t\trepeat_workdays: \"Hver ukedag\",\r\n\t\trepeat_weekly: \"Hver uke\",\r\n\t\trepeat_monthly: \"Hver måned\",\r\n\t\trepeat_yearly: \"Hvert år\",\r\n\t\trepeat_custom: \"Tilpasset\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Uke\",\r\n\t\trepeat_freq_month: \"Måned\",\r\n\t\trepeat_freq_year: \"År\",\r\n\t\trepeat_on_date: \"På dato\",\r\n\t\trepeat_ends: \"Slutter\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tday_for_recurring: [\"Sondag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Maart\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Augustus\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"mrt\", \"Apr\", \"Mei\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Zondag\", \"Maandag\", \"Dinsdag\", \"Woensdag\", \"Donderdag\", \"Vrijdag\", \"Zaterdag\"],\r\n\t\tday_short: [\"Zo\", \"Ma\", \"Di\", \"Wo\", \"Do\", \"Vr\", \"Za\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Vandaag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Week\",\r\n\t\tmonth_tab: \"Maand\",\r\n\t\tnew_event: \"Nieuw item\",\r\n\t\ticon_save: \"Opslaan\",\r\n\t\ticon_cancel: \"Annuleren\",\r\n\t\ticon_details: \"Details\",\r\n\t\ticon_edit: \"Bewerken\",\r\n\t\ticon_delete: \"Verwijderen\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Item zal permanent worden verwijderd, doorgaan?\",\r\n\t\tsection_description: \"Beschrijving\",\r\n\t\tsection_time: \"Tijd periode\",\r\n\t\tfull_day: \"Hele dag\",\r\n\r\n\t\tconfirm_recurring: \"Wilt u alle terugkerende items bijwerken?\",\r\n\t\tsection_recurring: \"Item herhalen\",\r\n\t\tbutton_recurring: \"Uit\",\r\n\t\tbutton_recurring_open: \"Aan\",\r\n\t\tbutton_edit_series: \"Bewerk de serie\",\r\n\t\tbutton_edit_occurrence: \"Bewerk een kopie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Omschrijving\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Jaar\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabel\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dagelijks\",\r\n\t\trepeat_radio_week: \"Wekelijks\",\r\n\t\trepeat_radio_month: \"Maandelijks\",\r\n\t\trepeat_radio_year: \"Jaarlijks\",\r\n\t\trepeat_radio_day_type: \"Elke\",\r\n\t\trepeat_text_day_count: \"dag(en)\",\r\n\t\trepeat_radio_day_type2: \"Elke werkdag\",\r\n\t\trepeat_week: \" Herhaal elke\",\r\n\t\trepeat_text_week_count: \"week op de volgende dagen:\",\r\n\t\trepeat_radio_month_type: \"Herhaal\",\r\n\t\trepeat_radio_month_start: \"Op\",\r\n\t\trepeat_text_month_day: \"dag iedere\",\r\n\t\trepeat_text_month_count: \"maanden\",\r\n\t\trepeat_text_month_count2_before: \"iedere\",\r\n\t\trepeat_text_month_count2_after: \"maanden\",\r\n\t\trepeat_year_label: \"Op\",\r\n\t\tselect_year_day2: \"van\",\r\n\t\trepeat_text_year_day: \"dag\",\r\n\t\tselect_year_month: \"maand\",\r\n\t\trepeat_radio_end: \"Geen eind datum\",\r\n\t\trepeat_text_occurences_count: \"keren\",\r\n\t\trepeat_radio_end3: \"Eindigd per\",\r\n\t\trepeat_radio_end2: \"Na\",\r\n\r\n\t\trepeat_never: \"Nooit\",\r\n\t\trepeat_daily: \"Elke dag\",\r\n\t\trepeat_workdays: \"Elke werkdag\",\r\n\t\trepeat_weekly: \"Elke week\",\r\n\t\trepeat_monthly: \"Elke maand\",\r\n\t\trepeat_yearly: \"Elk jaar\",\r\n\t\trepeat_custom: \"Aangepast\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Week\",\r\n\t\trepeat_freq_month: \"Maand\",\r\n\t\trepeat_freq_year: \"Jaar\",\r\n\t\trepeat_on_date: \"Op datum\",\r\n\t\trepeat_ends: \"Eindigt\",\r\n\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Maart\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Augustus\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Zondag\", \"Maandag\", \"Dinsdag\", \"Woensdag\", \"Donderdag\", \"Vrijdag\", \"Zaterdag\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Man\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uke\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny\",\r\n\t\ticon_save: \"Lagre\",\r\n\t\ticon_cancel: \"Avbryt\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Endre\",\r\n\t\ticon_delete: \"Slett\",\r\n\t\tconfirm_closing: \"Endringer blir ikke lagret, er du sikker?\", //Endringer blir ikke lagret, er du sikker?\r\n\t\tconfirm_deleting: \"Oppføringen vil bli slettet, er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\t\tfull_day: \"Full dag\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du endre hele settet med repeterende oppføringer?\",\r\n\t\tsection_recurring: \"Repeterende oppføring\",\r\n\t\tbutton_recurring: \"Ikke aktiv\",\r\n\t\tbutton_recurring_open: \"Aktiv\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Redigere en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Ukentlig\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Hver arbeidsdag\",\r\n\t\trepeat_week: \" Gjenta hver\",\r\n\t\trepeat_text_week_count: \"uke neste dager:\",\r\n\t\trepeat_radio_month_type: \"Gjenta\",\r\n\t\trepeat_radio_month_start: \"På\",\r\n\t\trepeat_text_month_day: \"dag hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"På\",\r\n\t\tselect_year_day2: \"av\",\r\n\t\trepeat_text_year_day: \"dag\",\r\n\t\tselect_year_month: \"måned\",\r\n\t\trepeat_radio_end: \"Ingen sluttdato\",\r\n\t\trepeat_text_occurences_count: \"forekomster\",\r\n\t\trepeat_radio_end2: \"Etter\",\r\n\t\trepeat_radio_end3: \"Slutt innen\",\r\n\r\n\t\trepeat_never: \"Aldri\",\r\n\t\trepeat_daily: \"Hver dag\",\r\n\t\trepeat_workdays: \"Hver ukedag\",\r\n\t\trepeat_weekly: \"Hver uke\",\r\n\t\trepeat_monthly: \"Hver måned\",\r\n\t\trepeat_yearly: \"Hvert år\",\r\n\t\trepeat_custom: \"Tilpasset\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Uke\",\r\n\t\trepeat_freq_month: \"Måned\",\r\n\t\trepeat_freq_year: \"År\",\r\n\t\trepeat_on_date: \"På dato\",\r\n\t\trepeat_ends: \"Slutter\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tday_for_recurring: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Styczeń\", \"Luty\", \"Marzec\", \"Kwiecień\", \"Maj\", \"Czerwiec\", \"Lipiec\", \"Sierpień\", \"Wrzesień\", \"Październik\", \"Listopad\", \"Grudzień\"],\r\n\t\tmonth_short: [\"Sty\", \"Lut\", \"Mar\", \"Kwi\", \"Maj\", \"Cze\", \"Lip\", \"Sie\", \"Wrz\", \"Paź\", \"Lis\", \"Gru\"],\r\n\t\tday_full: [\"Niedziela\", \"Poniedziałek\", \"Wtorek\", \"Środa\", \"Czwartek\", \"Piątek\", \"Sobota\"],\r\n\t\tday_short: [\"Nie\", \"Pon\", \"Wto\", \"Śro\", \"Czw\", \"Pią\", \"Sob\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dziś\",\r\n\t\tday_tab: \"Dzień\",\r\n\t\tweek_tab: \"Tydzień\",\r\n\t\tmonth_tab: \"Miesiąc\",\r\n\t\tnew_event: \"Nowe zdarzenie\",\r\n\t\ticon_save: \"Zapisz\",\r\n\t\ticon_cancel: \"Anuluj\",\r\n\t\ticon_details: \"Szczegóły\",\r\n\t\ticon_edit: \"Edytuj\",\r\n\t\ticon_delete: \"Usuń\",\r\n\t\tconfirm_closing: \"\", //Zmiany zostaną usunięte, jesteś pewien?\r\n\t\tconfirm_deleting: \"Zdarzenie zostanie usunięte na zawsze, kontynuować?\",\r\n\t\tsection_description: \"Opis\",\r\n\t\tsection_time: \"Okres czasu\",\r\n\t\tfull_day: \"Cały dzień\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Czy chcesz edytować cały zbiór powtarzających się zdarzeń?\",\r\n\t\tsection_recurring: \"Powtórz zdarzenie\",\r\n\t\tbutton_recurring: \"Nieaktywne\",\r\n\t\tbutton_recurring_open: \"Aktywne\",\r\n\t\tbutton_edit_series: \"Edytuj serię\",\r\n\t\tbutton_edit_occurrence: \"Edytuj kopię\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Opis\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabela\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Codziennie\",\r\n\t\trepeat_radio_week: \"Co tydzie\",\r\n\t\trepeat_radio_month: \"Co miesic\",\r\n\t\trepeat_radio_year: \"Co rok\",\r\n\t\trepeat_radio_day_type: \"Kadego\",\r\n\t\trepeat_text_day_count: \"dnia\",\r\n\t\trepeat_radio_day_type2: \"Kadego dnia roboczego\",\r\n\t\trepeat_week: \" Powtarzaj kadego\",\r\n\t\trepeat_text_week_count: \"tygodnia w dni:\",\r\n\t\trepeat_radio_month_type: \"Powtrz\",\r\n\t\trepeat_radio_month_start: \"W\",\r\n\t\trepeat_text_month_day: \"dnia kadego\",\r\n\t\trepeat_text_month_count: \"miesica\",\r\n\t\trepeat_text_month_count2_before: \"kadego\",\r\n\t\trepeat_text_month_count2_after: \"miesica\",\r\n\t\trepeat_year_label: \"W\",\r\n\t\tselect_year_day2: \"miesica\",\r\n\t\trepeat_text_year_day: \"dnia miesica\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Bez daty kocowej\",\r\n\t\trepeat_text_occurences_count: \"wystpieniu/ach\",\r\n\t\trepeat_radio_end3: \"Zakocz w\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\r\n\t\trepeat_never: \"Nigdy\",\r\n\t\trepeat_daily: \"Codziennie\",\r\n\t\trepeat_workdays: \"Każdy dzień roboczy\",\r\n\t\trepeat_weekly: \"Co tydzień\",\r\n\t\trepeat_monthly: \"Co miesiąc\",\r\n\t\trepeat_yearly: \"Co rok\",\r\n\t\trepeat_custom: \"Niestandardowy\",\r\n\t\trepeat_freq_day: \"Dzień\",\r\n\t\trepeat_freq_week: \"Tydzień\",\r\n\t\trepeat_freq_month: \"Miesiąc\",\r\n\t\trepeat_freq_year: \"Rok\",\r\n\t\trepeat_on_date: \"W dniu\",\r\n\t\trepeat_ends: \"Kończy się\",\r\n\r\n\t\tmonth_for_recurring: [\"Stycznia\", \"Lutego\", \"Marca\", \"Kwietnia\", \"Maja\", \"Czerwca\", \"Lipca\", \"Sierpnia\", \"Wrzenia\", \"Padziernka\", \"Listopada\", \"Grudnia\"],\r\n\t\tday_for_recurring: [\"Niedziela\", \"Poniedziaek\", \"Wtorek\", \"roda\", \"Czwartek\", \"Pitek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","/*\r\n\r\n TRANSLATION BY MATTHEUS PIROVANI RORIZ GONЗALVES\r\n\r\n mattheusroriz@hotmail.com / mattheus.pirovani@gmail.com /\r\n\r\n www.atrixian.com.br\r\n\r\n */\r\n\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Janeiro\", \"Fevereiro\", \"Março\", \"Abril\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"],\r\n\t\tmonth_short: [\"Jan\", \"Fev\", \"Mar\", \"Abr\", \"Mai\", \"Jun\", \"Jul\", \"Ago\", \"Set\", \"Out\", \"Nov\", \"Dez\"],\r\n\t\tday_full: [\"Domingo\", \"Segunda\", \"Terça\", \"Quarta\", \"Quinta\", \"Sexta\", \"Sábado\"],\r\n\t\tday_short: [\"Dom\", \"Seg\", \"Ter\", \"Qua\", \"Qui\", \"Sex\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hoje\",\r\n\t\tday_tab: \"Dia\",\r\n\t\tweek_tab: \"Semana\",\r\n\t\tmonth_tab: \"Mês\",\r\n\t\tnew_event: \"Novo evento\",\r\n\t\ticon_save: \"Salvar\",\r\n\t\ticon_cancel: \"Cancelar\",\r\n\t\ticon_details: \"Detalhes\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Deletar\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Tem certeza que deseja excluir?\",\r\n\t\tsection_description: \"Descrição\",\r\n\t\tsection_time: \"Período de tempo\",\r\n\t\tfull_day: \"Dia inteiro\",\r\n\r\n\t\tconfirm_recurring: \"Deseja editar todos esses eventos repetidos?\",\r\n\t\tsection_recurring: \"Repetir evento\",\r\n\t\tbutton_recurring: \"Desabilitar\",\r\n\t\tbutton_recurring_open: \"Habilitar\",\r\n\t\tbutton_edit_series: \"Editar a série\",\r\n\t\tbutton_edit_occurrence: \"Editar uma cópia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dia\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descrição\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Ano\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dia\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grade\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diário\",\r\n\t\trepeat_radio_week: \"Semanal\",\r\n\t\trepeat_radio_month: \"Mensal\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia(s)\",\r\n\t\trepeat_radio_day_type2: \"Cada trabalho diário\",\r\n\t\trepeat_week: \" Repita cada\",\r\n\t\trepeat_text_week_count: \"semana:\",\r\n\t\trepeat_radio_month_type: \"Repetir\",\r\n\t\trepeat_radio_month_start: \"Em\",\r\n\t\trepeat_text_month_day: \"todo dia\",\r\n\t\trepeat_text_month_count: \"mês\",\r\n\t\trepeat_text_month_count2_before: \"todo\",\r\n\t\trepeat_text_month_count2_after: \"mês\",\r\n\t\trepeat_year_label: \"Em\",\r\n\t\tselect_year_day2: \"of\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mês\",\r\n\t\trepeat_radio_end: \"Sem data final\",\r\n\t\trepeat_text_occurences_count: \"ocorrências\",\r\n\t\trepeat_radio_end3: \"Fim\",\r\n\t\trepeat_radio_end2: \"Depois\",\r\n\r\n\t\trepeat_never: \"Nunca\",\r\n\t\trepeat_daily: \"Todos os dias\",\r\n\t\trepeat_workdays: \"Todos os dias úteis\",\r\n\t\trepeat_weekly: \"Toda semana\",\r\n\t\trepeat_monthly: \"Todo mês\",\r\n\t\trepeat_yearly: \"Todo ano\",\r\n\t\trepeat_custom: \"Personalizado\",\r\n\t\trepeat_freq_day: \"Dia\",\r\n\t\trepeat_freq_week: \"Semana\",\r\n\t\trepeat_freq_month: \"Mês\",\r\n\t\trepeat_freq_year: \"Ano\",\r\n\t\trepeat_on_date: \"Na data\",\r\n\t\trepeat_ends: \"Termina\",\r\n\r\n\t\tmonth_for_recurring: [\"Janeiro\", \"Fevereiro\", \"Março\", \"Abril\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"],\r\n\t\tday_for_recurring: [\"Domingo\", \"Segunda\", \"Terça\", \"Quarta\", \"Quinta\", \"Sexta\", \"Sábado\"]\r\n\t}\r\n};\r\n\r\n\r\n","/*\r\n\tTraducere de Ovidiu Lixandru: http://www.madball.ro\r\n */\r\n\r\nexport default {\r\n\tdate:{\r\n\t\tmonth_full:[\"Ianuarie\", \"Februarie\", \"Martie\", \"Aprilie\", \"Mai\", \"Iunie\", \"Iulie\", \"August\", \"Septembrie\", \"Octombrie\", \"November\", \"December\"],\r\n\t\tmonth_short:[\"Ian\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Iun\", \"Iul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n\t\tday_full:[\"Duminica\", \"Luni\", \"Marti\", \"Miercuri\", \"Joi\", \"Vineri\", \"Sambata\"],\r\n\t\tday_short:[\"Du\", \"Lu\", \"Ma\", \"Mi\", \"Jo\", \"Vi\", \"Sa\"]\r\n\t},\r\n\tlabels:{\r\n\t\tdhx_cal_today_button:\"Astazi\",\r\n\t\tday_tab:\"Zi\",\r\n\t\tweek_tab:\"Saptamana\",\r\n\t\tmonth_tab:\"Luna\",\r\n\t\tnew_event:\"Eveniment nou\",\r\n\t\ticon_save:\"Salveaza\",\r\n\t\ticon_cancel:\"Anuleaza\",\r\n\t\ticon_details:\"Detalii\",\r\n\t\ticon_edit:\"Editeaza\",\r\n\t\ticon_delete:\"Sterge\",\r\n\t\tconfirm_closing:\"Schimbarile nu vor fi salvate, esti sigur?\",//Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting:\"Evenimentul va fi sters permanent, esti sigur?\",\r\n\t\tsection_description:\"Descriere\",\r\n\t\tsection_time:\"Interval\",\r\n\t\tfull_day:\"Toata ziua\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring:\"Vrei sa editezi toata seria de evenimente repetate?\",\r\n\t\tsection_recurring:\"Repetare\",\r\n\t\tbutton_recurring:\"Dezactivata\",\r\n\t\tbutton_recurring_open:\"Activata\",\r\n\t\tbutton_edit_series: \"Editeaza serie\",\r\n\t\tbutton_edit_occurrence: \"Editeaza doar intrare\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"Agenda\",\r\n\t\tdate:\"Data\",\r\n\t\tdescription:\"Descriere\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"An\",\r\n\r\n\t\t/* week agenda extension */\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Lista\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Zilnic\",\r\n\t\trepeat_radio_week: \"Saptamanal\",\r\n\t\trepeat_radio_month: \"Lunar\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"La fiecare\",\r\n\t\trepeat_text_day_count: \"zi(le)\",\r\n\t\trepeat_radio_day_type2: \"Fiecare zi lucratoare\",\r\n\t\trepeat_week: \" Repeta la fiecare\",\r\n\t\trepeat_text_week_count: \"saptamana in urmatoarele zile:\",\r\n\t\trepeat_radio_month_type: \"Repeta in\",\r\n\t\trepeat_radio_month_start: \"In a\",\r\n\t\trepeat_text_month_day: \"zi la fiecare\",\r\n\t\trepeat_text_month_count: \"luni\",\r\n\t\trepeat_text_month_count2_before: \"la fiecare\",\r\n\t\trepeat_text_month_count2_after: \"luni\",\r\n\t\trepeat_year_label: \"In\",\r\n\t\tselect_year_day2: \"a lunii\",\r\n\t\trepeat_text_year_day: \"zi a lunii\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Fara data de sfarsit\",\r\n\t\trepeat_text_occurences_count: \"evenimente\",\r\n\t\trepeat_radio_end3: \"La data\",\r\n\t\trepeat_radio_end2: \"Dupa\",\r\n\r\n\t\trepeat_never: \"Niciodată\",\r\n\t\trepeat_daily: \"În fiecare zi\",\r\n\t\trepeat_workdays: \"În fiecare zi lucrătoare\",\r\n\t\trepeat_weekly: \"În fiecare săptămână\",\r\n\t\trepeat_monthly: \"În fiecare lună\",\r\n\t\trepeat_yearly: \"În fiecare an\",\r\n\t\trepeat_custom: \"Personalizat\",\r\n\t\trepeat_freq_day: \"Zi\",\r\n\t\trepeat_freq_week: \"Săptămână\",\r\n\t\trepeat_freq_month: \"Lună\",\r\n\t\trepeat_freq_year: \"An\",\r\n\t\trepeat_on_date: \"La data\",\r\n\t\trepeat_ends: \"Se termină\",\r\n\r\n\t\tmonth_for_recurring: [\"Ianuarie\", \"Februarie\", \"Martie\", \"Aprilie\", \"Mai\", \"Iunie\", \"Iulie\", \"August\", \"Septembrie\", \"Octombrie\", \"Noiembrie\", \"Decembrie\"],\r\n\t\tday_for_recurring: [\"Duminica\", \"Luni\", \"Marti\", \"Miercuri\", \"Joi\", \"Vineri\", \"Sambata\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Январь\", \"Февраль\", \"Март\", \"Апрель\", \"Maй\", \"Июнь\", \"Июль\", \"Август\", \"Сентябрь\", \"Oктябрь\", \"Ноябрь\", \"Декабрь\"],\r\n\t\tmonth_short: [\"Янв\", \"Фев\", \"Maр\", \"Aпр\", \"Maй\", \"Июн\", \"Июл\", \"Aвг\", \"Сен\", \"Окт\", \"Ноя\", \"Дек\"],\r\n\t\tday_full: [ \"Воскресенье\", \"Понедельник\", \"Вторник\", \"Среда\", \"Четверг\", \"Пятница\", \"Суббота\"],\r\n\t\tday_short: [\"Вс\", \"Пн\", \"Вт\", \"Ср\", \"Чт\", \"Пт\", \"Сб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сегодня\",\r\n\t\tday_tab: \"День\",\r\n\t\tweek_tab: \"Неделя\",\r\n\t\tmonth_tab: \"Месяц\",\r\n\t\tnew_event: \"Новое событие\",\r\n\t\ticon_save: \"Сохранить\",\r\n\t\ticon_cancel: \"Отменить\",\r\n\t\ticon_details: \"Детали\",\r\n\t\ticon_edit: \"Изменить\",\r\n\t\ticon_delete: \"Удалить\",\r\n\t\tconfirm_closing: \"\", //Ваши изменения будут потеряны, продолжить?\r\n\t\tconfirm_deleting: \"Событие будет удалено безвозвратно, продолжить?\",\r\n\t\tsection_description: \"Описание\",\r\n\t\tsection_time: \"Период времени\",\r\n\t\tfull_day: \"Весь день\",\r\n\r\n\t\tconfirm_recurring: \"Вы хотите изменить всю серию повторяющихся событий?\",\r\n\t\tsection_recurring: \"Повторение\",\r\n\t\tbutton_recurring: \"Отключено\",\r\n\t\tbutton_recurring_open: \"Включено\",\r\n\t\tbutton_edit_series: \"Редактировать серию\",\r\n\t\tbutton_edit_occurrence: \"Редактировать экземпляр\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Список\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Описание\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Год\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Список\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Таблица\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"День\",\r\n\t\trepeat_radio_week: \"Неделя\",\r\n\t\trepeat_radio_month: \"Месяц\",\r\n\t\trepeat_radio_year: \"Год\",\r\n\t\trepeat_radio_day_type: \"Каждый\",\r\n\t\trepeat_text_day_count: \"день\",\r\n\t\trepeat_radio_day_type2: \"Каждый рабочий день\",\r\n\t\trepeat_week: \" Повторять каждую\",\r\n\t\trepeat_text_week_count: \"неделю , в:\",\r\n\t\trepeat_radio_month_type: \"Повторять\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" числа каждый \",\r\n\t\trepeat_text_month_count: \"месяц\",\r\n\t\trepeat_text_month_count2_before: \"каждый \",\r\n\t\trepeat_text_month_count2_after: \"месяц\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"день\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без даты окончания\",\r\n\t\trepeat_text_occurences_count: \"повторений\",\r\n\t\trepeat_radio_end3: \"До \",\r\n\t\trepeat_radio_end2: \"\",\r\n\r\n\t\trepeat_never: \"Никогда\",\r\n\t\trepeat_daily: \"Каждый день\",\r\n\t\trepeat_workdays: \"Каждый будний день\",\r\n\t\trepeat_weekly: \"Каждую неделю\",\r\n\t\trepeat_monthly: \"Каждый месяц\",\r\n\t\trepeat_yearly: \"Каждый год\",\r\n\t\trepeat_custom: \"Настроить\",\r\n\t\trepeat_freq_day: \"День\",\r\n\t\trepeat_freq_week: \"Неделя\",\r\n\t\trepeat_freq_month: \"Месяц\",\r\n\t\trepeat_freq_year: \"Год\",\r\n\t\trepeat_on_date: \"В дату\",\r\n\t\trepeat_ends: \"Заканчивается\",\r\n\r\n\t\tmonth_for_recurring: [\"Января\", \"Февраля\", \"Марта\", \"Апреля\", \"Мая\", \"Июня\", \"Июля\", \"Августа\", \"Сентября\", \"Октября\", \"Ноября\", \"Декабря\"],\r\n\t\tday_for_recurring: [\"Воскресенье\", \"Понедельник\", \"Вторник\", \"Среду\", \"Четверг\", \"Пятницу\", \"Субботу\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Marec\", \"April\", \"Maj\", \"Junij\", \"Julij\", \"Avgust\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Nedelja\", \"Ponedeljek\", \"Torek\", \"Sreda\", \"Četrtek\", \"Petek\", \"Sobota\"],\r\n\t\tday_short: [\"Ned\", \"Pon\", \"Tor\", \"Sre\", \"Čet\", \"Pet\", \"Sob\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Danes\",\r\n\t\tday_tab: \"Dan\",\r\n\t\tweek_tab: \"Teden\",\r\n\t\tmonth_tab: \"Mesec\",\r\n\t\tnew_event: \"Nov dogodek\",\r\n\t\ticon_save: \"Shrani\",\r\n\t\ticon_cancel: \"Prekliči\",\r\n\t\ticon_details: \"Podrobnosti\",\r\n\t\ticon_edit: \"Uredi\",\r\n\t\ticon_delete: \"Izbriši\",\r\n\t\tconfirm_closing: \"\", //Spremembe ne bodo shranjene. Želite nadaljevati ?\r\n\t\tconfirm_deleting: \"Dogodek bo izbrisan. Želite nadaljevati?\",\r\n\t\tsection_description: \"Opis\",\r\n\t\tsection_time: \"Časovni okvir\",\r\n\t\tfull_day: \"Ves dan\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Želite urediti celoten set ponavljajočih dogodkov?\",\r\n\t\tsection_recurring: \"Ponovi dogodek\",\r\n\t\tbutton_recurring: \"Onemogočeno\",\r\n\t\tbutton_recurring_open: \"Omogočeno\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Edit occurrence\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Zadeva\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Opis\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Leto\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Zadeva\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Miza\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dnevno\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Tedensko\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Mesečno\",\r\n\t\trepeat_radio_year: \"Letno\",\r\n\t\trepeat_radio_day_type: \"Vsak\",\r\n\t\trepeat_text_day_count: \"dan\",\r\n\t\trepeat_radio_day_type2: \"Vsak delovni dan\",\r\n\t\trepeat_week: \" Ponavljaj vsak\",\r\n\t\trepeat_text_week_count: \"teden na naslednje dni:\",\r\n\t\trepeat_radio_month_type: \"Ponavljaj\",\r\n\t\trepeat_radio_month_start: \"Na\",\r\n\t\trepeat_text_month_day: \"dan vsak\",\r\n\t\trepeat_text_month_count: \"mesec\",\r\n\t\trepeat_text_month_count2_before: \"vsak\",\r\n\t\trepeat_text_month_count2_after: \"mesec\",\r\n\t\trepeat_year_label: \"Na\",\r\n\t\tselect_year_day2: \"od\",\r\n\t\trepeat_text_year_day: \"dan\",\r\n\t\tselect_year_month: \"mesec\",\r\n\t\trepeat_radio_end: \"Brez končnega datuma\",\r\n\t\trepeat_text_occurences_count: \"pojavitve\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\t\trepeat_radio_end3: \"Končaj do\",\r\n\r\n\t\trepeat_never: \"Nikoli\",\r\n\t\trepeat_daily: \"Vsak dan\",\r\n\t\trepeat_workdays: \"Vsak delovni dan\",\r\n\t\trepeat_weekly: \"Vsak teden\",\r\n\t\trepeat_monthly: \"Vsak mesec\",\r\n\t\trepeat_yearly: \"Vsako leto\",\r\n\t\trepeat_custom: \"Po meri\",\r\n\t\trepeat_freq_day: \"Dan\",\r\n\t\trepeat_freq_week: \"Teden\",\r\n\t\trepeat_freq_month: \"Mesec\",\r\n\t\trepeat_freq_year: \"Leto\",\r\n\t\trepeat_on_date: \"Na datum\",\r\n\t\trepeat_ends: \"Konča se\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"Marec\", \"April\", \"Maj\", \"Junij\", \"Julij\", \"Avgust\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Nedelja\", \"Ponedeljek\", \"Torek\", \"Sreda\", \"Četrtek\", \"Petek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Január\", \"Február\", \"Marec\", \"Apríl\", \"Máj\", \"Jún\", \"Júl\", \"August\", \"September\", \"Október\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Máj\", \"Jún\", \"Júl\", \"Aug\", \"Sept\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Nedeľa\", \"Pondelok\", \"Utorok\", \"Streda\", \"Štvrtok\", \"Piatok\", \"Sobota\"],\r\n\t\tday_short: [\"Ne\", \"Po\", \"Ut\", \"St\", \"Št\", \"Pi\", \"So\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dnes\",\r\n\t\tday_tab: \"Deň\",\r\n\t\tweek_tab: \"Týždeň\",\r\n\t\tmonth_tab: \"Mesiac\",\r\n\t\tnew_event: \"Nová udalosť\",\r\n\t\ticon_save: \"Uložiť\",\r\n\t\ticon_cancel: \"Späť\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edituj\",\r\n\t\ticon_delete: \"Zmazať\",\r\n\t\tconfirm_closing: \"Vaše zmeny nebudú uložené. Skutočne?\", //Vaše změny budou ztraceny, opravdu ?\r\n\t\tconfirm_deleting: \"Udalosť bude natrvalo vymazaná. Skutočne?\",\r\n\t\tsection_description: \"Poznámky\",\r\n\t\tsection_time: \"Doba platnosti\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Prajete si upraviť celú radu opakovaných udalostí?\",\r\n\t\tsection_recurring: \"Opakovanie udalosti\",\r\n\t\tbutton_recurring: \"Vypnuté\",\r\n\t\tbutton_recurring_open: \"Zapnuté\",\r\n\t\tbutton_edit_series: \"Upraviť opakovania\",\r\n\t\tbutton_edit_occurrence: \"Upraviť inštancie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Program\",\r\n\t\tdate: \"Dátum\",\r\n\t\tdescription: \"Poznámka\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\t\tfull_day: \"Celý deň\", // Full day\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Program\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Mriežka\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Denne\",\r\n\t\trepeat_radio_week: \"Týždenne\",\r\n\t\trepeat_radio_month: \"Mesaène\",\r\n\t\trepeat_radio_year: \"Roène\",\r\n\t\trepeat_radio_day_type: \"Každý\",\r\n\t\trepeat_text_day_count: \"deò\",\r\n\t\trepeat_radio_day_type2: \"Každý prac. deò\",\r\n\t\trepeat_week: \"Opakova každý\",\r\n\t\trepeat_text_week_count: \"týždeò v dòoch:\",\r\n\t\trepeat_radio_month_type: \"Opakova\",\r\n\t\trepeat_radio_month_start: \"On\",\r\n\t\trepeat_text_month_day: \"deò každý\",\r\n\t\trepeat_text_month_count: \"mesiac\",\r\n\t\trepeat_text_month_count2_before: \"každý\",\r\n\t\trepeat_text_month_count2_after: \"mesiac\",\r\n\t\trepeat_year_label: \"On\",\r\n\t\tselect_year_day2: \"poèas\",\r\n\t\trepeat_text_year_day: \"deò\",\r\n\t\tselect_year_month: \"mesiac\",\r\n\t\trepeat_radio_end: \"Bez dátumu ukonèenia\",\r\n\t\trepeat_text_occurences_count: \"udalostiach\",\r\n\t\trepeat_radio_end3: \"Ukonèi\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\r\n\t\trepeat_never: \"Nikdy\",\r\n\t\trepeat_daily: \"Každý deň\",\r\n\t\trepeat_workdays: \"Každý pracovný deň\",\r\n\t\trepeat_weekly: \"Každý týždeň\",\r\n\t\trepeat_monthly: \"Každý mesiac\",\r\n\t\trepeat_yearly: \"Každý rok\",\r\n\t\trepeat_custom: \"Vlastné\",\r\n\t\trepeat_freq_day: \"Deň\",\r\n\t\trepeat_freq_week: \"Týždeň\",\r\n\t\trepeat_freq_month: \"Mesiac\",\r\n\t\trepeat_freq_year: \"Rok\",\r\n\t\trepeat_on_date: \"Na dátum\",\r\n\t\trepeat_ends: \"Koniec\",\r\n\r\n\t\tmonth_for_recurring: [\"Január\", \"Február\", \"Marec\", \"Apríl\", \"Máj\", \"Jún\", \"Júl\", \"August\", \"September\", \"Október\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Nede¾a\", \"Pondelok\", \"Utorok\", \"Streda\", \"Štvrtok\", \"Piatok\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Mars\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"Augusti\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Söndag\", \"Måndag\", \"Tisdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lördag\"],\r\n\t\tday_short: [\"Sön\", \"Mån\", \"Tis\", \"Ons\", \"Tor\", \"Fre\", \"Lör\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Vecka\",\r\n\t\tmonth_tab: \"Månad\",\r\n\t\tnew_event: \"Ny händelse\",\r\n\t\ticon_save: \"Spara\",\r\n\t\ticon_cancel: \"Ångra\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Ändra\",\r\n\t\ticon_delete: \"Ta bort\",\r\n\t\tconfirm_closing: \"\", //Dina förändingar kommer gå förlorade, är du säker?\r\n\t\tconfirm_deleting: \"Är du säker på att du vill ta bort händelsen permanent?\",\r\n\t\tsection_description: \"Beskrivning\",\r\n\t\tsection_time: \"Tid\",\r\n\t\tfull_day: \"Hela dagen\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vill du redigera hela serien med repeterande händelser?\",\r\n\t\tsection_recurring: \"Upprepa händelse\",\r\n\t\tbutton_recurring: \"Inaktiverat\",\r\n\t\tbutton_recurring_open: \"Aktiverat\",\r\n\t\tbutton_edit_series: \"Redigera serien\",\r\n\t\tbutton_edit_occurrence: \"Redigera en kopia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dagordning\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Beskrivning\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dagordning\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Galler\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Dra för att skapa ny\",\r\n\t\tdrag_to_move:\"Dra för att flytta\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dagligen\",\r\n\t\trepeat_radio_week: \"Veckovis\",\r\n\t\trepeat_radio_month: \"Månadsvis\",\r\n\t\trepeat_radio_year: \"Årligen\",\r\n\t\trepeat_radio_day_type: \"Var\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Varje arbetsdag\",\r\n\t\trepeat_week: \" Upprepa var\",\r\n\t\trepeat_text_week_count: \"vecka dessa dagar:\",\r\n\t\trepeat_radio_month_type: \"Upprepa\",\r\n\t\trepeat_radio_month_start: \"Den\",\r\n\t\trepeat_text_month_day: \"dagen var\",\r\n\t\trepeat_text_month_count: \"månad\",\r\n\t\trepeat_text_month_count2_before: \"var\",\r\n\t\trepeat_text_month_count2_after: \"månad\",\r\n\t\trepeat_year_label: \"Den\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"månad\",\r\n\t\trepeat_radio_end: \"Inget slutdatum\",\r\n\t\trepeat_text_occurences_count: \"upprepningar\",\r\n\t\trepeat_radio_end3: \"Sluta efter\",\r\n\t\trepeat_radio_end2: \"Efter\",\r\n\r\n\t\trepeat_never: \"Aldrig\",\r\n\t\trepeat_daily: \"Varje dag\",\r\n\t\trepeat_workdays: \"Varje vardag\",\r\n\t\trepeat_weekly: \"Varje vecka\",\r\n\t\trepeat_monthly: \"Varje månad\",\r\n\t\trepeat_yearly: \"Varje år\",\r\n\t\trepeat_custom: \"Anpassad\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Vecka\",\r\n\t\trepeat_freq_month: \"Månad\",\r\n\t\trepeat_freq_year: \"År\",\r\n\t\trepeat_on_date: \"På datum\",\r\n\t\trepeat_ends: \"Slutar\",\r\n\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Mars\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"Augusti\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Söndag\", \"Måndag\", \"Tisdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lördag\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Ocak\", \"Þubat\", \"Mart\", \"Nisan\", \"Mayýs\", \"Haziran\", \"Temmuz\", \"Aðustos\", \"Eylül\", \"Ekim\", \"Kasým\", \"Aralýk\"],\r\n\t\tmonth_short: [\"Oca\", \"Þub\", \"Mar\", \"Nis\", \"May\", \"Haz\", \"Tem\", \"Aðu\", \"Eyl\", \"Eki\", \"Kas\", \"Ara\"],\r\n\t\tday_full: [\"Pazar\", \"Pazartes,\", \"Salý\", \"Çarþamba\", \"Perþembe\", \"Cuma\", \"Cumartesi\"],\r\n\t\tday_short: [\"Paz\", \"Pts\", \"Sal\", \"Çar\", \"Per\", \"Cum\", \"Cts\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Bugün\",\r\n\t\tday_tab: \"Gün\",\r\n\t\tweek_tab: \"Hafta\",\r\n\t\tmonth_tab: \"Ay\",\r\n\t\tnew_event: \"Uygun\",\r\n\t\ticon_save: \"Kaydet\",\r\n\t\ticon_cancel: \"Ýptal\",\r\n\t\ticon_details: \"Detaylar\",\r\n\t\ticon_edit: \"Düzenle\",\r\n\t\ticon_delete: \"Sil\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Etkinlik silinecek, devam?\",\r\n\t\tsection_description: \"Açýklama\",\r\n\t\tsection_time: \"Zaman aralýðý\",\r\n\t\tfull_day: \"Tam gün\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Tüm tekrar eden etkinlikler silinecek, devam?\",\r\n\t\tsection_recurring: \"Etkinliði tekrarla\",\r\n\t\tbutton_recurring: \"Pasif\",\r\n\t\tbutton_recurring_open: \"Aktif\",\r\n\t\tbutton_edit_series: \"Dizi düzenleme\",\r\n\t\tbutton_edit_occurrence: \"Bir kopyasını düzenleyin\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Ajanda\",\r\n\t\tdate: \"Tarih\",\r\n\t\tdescription: \"Açýklama\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Yýl\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Ajanda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Izgara\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Günlük\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Haftalık\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Aylık\",\r\n\t\trepeat_radio_year: \"Yıllık\",\r\n\t\trepeat_radio_day_type: \"Her\",\r\n\t\trepeat_text_day_count: \"gün\",\r\n\t\trepeat_radio_day_type2: \"Her iş günü\",\r\n\t\trepeat_week: \" Tekrar her\",\r\n\t\trepeat_text_week_count: \"hafta şu günlerde:\",\r\n\t\trepeat_radio_month_type: \"Tekrar et\",\r\n\t\trepeat_radio_month_start: \"Tarihinde\",\r\n\t\trepeat_text_month_day: \"gün her\",\r\n\t\trepeat_text_month_count: \"ay\",\r\n\t\trepeat_text_month_count2_before: \"her\",\r\n\t\trepeat_text_month_count2_after: \"ay\",\r\n\t\trepeat_year_label: \"Tarihinde\",\r\n\t\tselect_year_day2: \"ayın\",\r\n\t\trepeat_text_year_day: \"günü\",\r\n\t\tselect_year_month: \"ay\",\r\n\t\trepeat_radio_end: \"Bitiş tarihi yok\",\r\n\t\trepeat_text_occurences_count: \"olay\",\r\n\t\trepeat_radio_end2: \"Sonra\",\r\n\t\trepeat_radio_end3: \"Tarihinde bitir\",\r\n\r\n\t\trepeat_never: \"Asla\",\r\n\t\trepeat_daily: \"Her gün\",\r\n\t\trepeat_workdays: \"Her iş günü\",\r\n\t\trepeat_weekly: \"Her hafta\",\r\n\t\trepeat_monthly: \"Her ay\",\r\n\t\trepeat_yearly: \"Her yıl\",\r\n\t\trepeat_custom: \"Özel\",\r\n\t\trepeat_freq_day: \"Gün\",\r\n\t\trepeat_freq_week: \"Hafta\",\r\n\t\trepeat_freq_month: \"Ay\",\r\n\t\trepeat_freq_year: \"Yıl\",\r\n\t\trepeat_on_date: \"Tarihinde\",\r\n\t\trepeat_ends: \"Biter\",\r\n\r\n\t\tmonth_for_recurring: [\"Ocak\", \"Şubat\", \"Mart\", \"Nisan\", \"Mayıs\", \"Haziran\", \"Temmuz\", \"Ağustos\", \"Eylül\", \"Ekim\", \"Kasım\", \"Aralık\"],\r\n\t\tday_for_recurring: [\"Pazar\", \"Pazartesi\", \"Salı\", \"Çarşamba\", \"Perşembe\", \"Cuma\", \"Cumartesi\"]\r\n\t}\r\n};","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Січень\", \"Лютий\", \"Березень\", \"Квітень\", \"Травень\", \"Червень\", \"Липень\", \"Серпень\", \"Вересень\", \"Жовтень\", \"Листопад\", \"Грудень\"],\r\n\t\tmonth_short: [\"Січ\", \"Лют\", \"Бер\", \"Кві\", \"Тра\", \"Чер\", \"Лип\", \"Сер\", \"Вер\", \"Жов\", \"Лис\", \"Гру\"],\r\n\t\tday_full: [\"Неділя\", \"Понеділок\", \"Вівторок\", \"Середа\", \"Четвер\", \"П'ятниця\", \"Субота\"],\r\n\t\tday_short: [\"Нед\", \"Пон\", \"Вів\", \"Сер\", \"Чет\", \"Птн\", \"Суб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сьогодні\",\r\n\t\tday_tab: \"День\",\r\n\t\tweek_tab: \"Тиждень\",\r\n\t\tmonth_tab: \"Місяць\",\r\n\t\tnew_event: \"Нова подія\",\r\n\t\ticon_save: \"Зберегти\",\r\n\t\ticon_cancel: \"Відміна\",\r\n\t\ticon_details: \"Деталі\",\r\n\t\ticon_edit: \"Редагувати\",\r\n\t\ticon_delete: \"Вилучити\",\r\n\t\tconfirm_closing: \"\", //Ваші зміни втратяться. Ви впевнені ?\r\n\t\tconfirm_deleting: \"Подія вилучиться назавжди. Ви впевнені?\",\r\n\t\tsection_description: \"Опис\",\r\n\t\tsection_time: \"Часовий проміжок\",\r\n\t\tfull_day: \"Весь день\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Хочете редагувати весь перелік повторюваних подій?\",\r\n\t\tsection_recurring: \"Повторювана подія\",\r\n\t\tbutton_recurring: \"Відключено\",\r\n\t\tbutton_recurring_open: \"Включено\",\r\n\t\tbutton_edit_series: \"Редагувати серію\",\r\n\t\tbutton_edit_occurrence: \"Редагувати примірник\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Перелік\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Опис\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Рік\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Перелік\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Таблиця\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"День\",\r\n\t\trepeat_radio_week: \"Тиждень\",\r\n\t\trepeat_radio_month: \"Місяць\",\r\n\t\trepeat_radio_year: \"Рік\",\r\n\t\trepeat_radio_day_type: \"Кожний\",\r\n\t\trepeat_text_day_count: \"день\",\r\n\t\trepeat_radio_day_type2: \"Кожний робочий день\",\r\n\t\trepeat_week: \" Повторювати кожен\",\r\n\t\trepeat_text_week_count: \"тиждень , по:\",\r\n\t\trepeat_radio_month_type: \"Повторювати\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" числа кожний \",\r\n\t\trepeat_text_month_count: \"місяць\",\r\n\t\trepeat_text_month_count2_before: \"кожен \",\r\n\t\trepeat_text_month_count2_after: \"місяць\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"день\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без дати закінчення\",\r\n\t\trepeat_text_occurences_count: \"повторень\",\r\n\t\trepeat_radio_end3: \"До \",\r\n\t\trepeat_radio_end2: \"\",\r\n\r\n\t\trepeat_never: \"Ніколи\",\r\n\t\trepeat_daily: \"Щодня\",\r\n\t\trepeat_workdays: \"Щодня в робочі дні\",\r\n\t\trepeat_weekly: \"Щотижня\",\r\n\t\trepeat_monthly: \"Щомісяця\",\r\n\t\trepeat_yearly: \"Щороку\",\r\n\t\trepeat_custom: \"Налаштоване\",\r\n\t\trepeat_freq_day: \"День\",\r\n\t\trepeat_freq_week: \"Тиждень\",\r\n\t\trepeat_freq_month: \"Місяць\",\r\n\t\trepeat_freq_year: \"Рік\",\r\n\t\trepeat_on_date: \"На дату\",\r\n\t\trepeat_ends: \"Закінчується\",\r\n\r\n\t\tmonth_for_recurring: [\"січня\", \"лютого\", \"березня\", \"квітня\", \"травня\", \"червня\", \"липня\", \"серпня\", \"вересня\", \"жовтня\", \"листопада\", \"грудня\"],\r\n\t\tday_for_recurring: [\"Неділям\", \"Понеділкам\", \"Вівторкам\", \"Середам\", \"Четвергам\", \"П'ятницям\", \"Суботам\"]\r\n\t}\r\n};\r\n","import ar from \"./locale_ar\";\r\nimport be from \"./locale_be\";\r\nimport ca from \"./locale_ca\";\r\nimport cn from \"./locale_cn\";\r\nimport cs from \"./locale_cs\";\r\nimport da from \"./locale_da\";\r\nimport de from \"./locale_de\";\r\nimport el from \"./locale_el\";\r\nimport en from \"./locale_en\";\r\nimport es from \"./locale_es\";\r\nimport fi from \"./locale_fi\";\r\nimport fr from \"./locale_fr\";\r\nimport he from \"./locale_he\";\r\nimport hu from \"./locale_hu\";\r\nimport id from \"./locale_id\";\r\nimport it from \"./locale_it\";\r\nimport jp from \"./locale_jp\";\r\n\r\nimport LocaleManager from \"./locale_manager\";\r\n\r\nimport nb from \"./locale_nb\";\r\nimport nl from \"./locale_nl\";\r\nimport no from \"./locale_no\";\r\nimport pl from \"./locale_pl\";\r\nimport pt from \"./locale_pt\";\r\nimport ro from \"./locale_ro\";\r\nimport ru from \"./locale_ru\";\r\nimport si from \"./locale_si\";\r\nimport sk from \"./locale_sk\";\r\nimport sv from \"./locale_sv\";\r\nimport tr from \"./locale_tr\";\r\nimport ua from \"./locale_ua\";\r\n\r\nexport default function(){\r\n\treturn new LocaleManager({\r\n\t\ten,\r\n\t\tar,\r\n\t\tbe,\r\n\t\tca,\r\n\t\tcn,\r\n\t\tcs,\r\n\t\tda,\r\n\t\tde,\r\n\t\tel,\r\n\t\tes,\r\n\t\tfi,\r\n\t\tfr,\r\n\t\the,\r\n\t\thu,\r\n\t\tid,\r\n\t\tit,\r\n\t\tjp,\r\n\t\tnb,\r\n\t\tnl,\r\n\t\tno,\r\n\t\tpl,\r\n\t\tpt,\r\n\t\tro,\r\n\t\tru,\r\n\t\tsi,\r\n\t\tsk,\r\n\t\tsv,\r\n\t\ttr,\r\n\t\tua\r\n\t});\r\n}","import eventable from \"../utils/eventable\";\r\n\r\nexport class DatePicker {\r\n\tconstructor(scheduler, container, state = {}) {\r\n\t\tthis.state = {\r\n\t\t\tdate: new Date(),\r\n\t\t\tmodes: ['days', 'months', 'years'],\r\n\t\t\tcurrentRange: [],\r\n\t\t\teventDates: [],\r\n\t\t\tcurrentModeIndex: 0,\r\n\t\t\t...state\r\n\t\t};\r\n\t\tthis.container = null;\r\n\t\tthis.element = null;\r\n\t\tthis.onStateChangeHandlers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t\tthis._domEvents = scheduler._createDomEventScope();\r\n\t\tthis.state = this.getState();\r\n\t\teventable(this);\r\n\t\tif(container){\r\n\r\n\t\t\tthis.container = container;\r\n\t\t\tthis.render(this.container);\r\n\t\t}\r\n\r\n\t\tthis.onStateChange((oldState, newState) => {\r\n\t\t\tthis.callEvent(\"onStateChange\", [newState, oldState]);\r\n\t\t});\r\n\t}\r\n\r\n\tgetState() {\r\n\t\treturn { \r\n\t\t\t...this.state,\r\n\t\t\tmode: this.state.modes[this.state.currentModeIndex]\r\n\t\t};\r\n\t}\r\n\r\n\tsetState(newState) {\r\n\t\tconst oldState = { ...this.state };\r\n\t\tif(newState.mode){\r\n\t\t\tnewState.currentModeIndex = this.state.modes.indexOf(newState.mode);\r\n\t\t}\r\n\t\tthis.state = { ...this.state, ...newState };\r\n\r\n\t\tthis._notifyStateChange(oldState, this.state);\r\n\r\n\t\tif (this.container) {\r\n\t\t\tthis.render(this.container);\r\n\t\t}\r\n\t}\r\n\r\n\tonStateChange(handler) {\r\n\t\tthis.onStateChangeHandlers.push(handler);\r\n\r\n\t\t// function to remove the handler\r\n\t\treturn () => {\r\n\t\t\tconst index = this.onStateChangeHandlers.indexOf(handler);\r\n\t\t\tif (index !== -1) {\r\n\t\t\t\tthis.onStateChangeHandlers.splice(index, 1);\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\r\n\t_notifyStateChange(oldState, newState) {\r\n\t\tthis.onStateChangeHandlers.forEach(handler => handler(oldState, newState));\r\n\t}\r\n\r\n\t_adjustDate(direction) {\r\n\r\n\t\tconst {mode, date} = this.getState();\r\n\t\tconst newDate = new Date(date);\r\n\t\tif (mode === 'days') {\r\n\t\t\tnewDate.setMonth(date.getMonth() + direction);\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tnewDate.setFullYear(date.getFullYear() + direction);\r\n\t\t} else {\r\n\t\t\tnewDate.setFullYear(date.getFullYear() + direction * 10);\r\n\t\t}\r\n\t\tthis.setState({ date: newDate });\r\n\t}\r\n\r\n\t_toggleMode() {\r\n\t\tconst newIndex = (this.state.currentModeIndex + 1) % this.state.modes.length;\r\n\t\tthis.setState({ currentModeIndex: newIndex });\r\n\t}\r\n\r\n\t_renderCalendarHeader(container) {\r\n\t\tconst {mode, date} = this.getState();\r\n\r\n\t\tconst header = document.createElement('div');\r\n\t\theader.classList.add('dhx_cal_datepicker_header');\r\n\r\n\t\tconst backwardArrow = document.createElement('button');\r\n\r\n\t\tbackwardArrow.classList.add(\"dhx_cal_datepicker_arrow\", \"scheduler_icon\", \"arrow_left\");\r\n\t\theader.appendChild(backwardArrow);\r\n\r\n\t\tconst monthLabel = document.createElement('div');\r\n\t\tmonthLabel.classList.add('dhx_cal_datepicker_title');\r\n\r\n\t\tif (mode === 'days') {\r\n\t\t\tmonthLabel.innerText = date.toLocaleString('default', { month: 'long' }) + ' ' + date.getFullYear();\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tmonthLabel.innerText = date.getFullYear();\r\n\t\t} else {\r\n\t\t\tconst startYear = Math.floor(date.getFullYear() / 10) * 10;\r\n\t\t\tmonthLabel.innerText = `${startYear} - ${startYear + 9}`;\r\n\t\t}\r\n\r\n\t\tthis._domEvents.attach(monthLabel, \"click\", this._toggleMode.bind(this));\r\n\t\theader.appendChild(monthLabel);\r\n\r\n\t\tconst forwardArrow = document.createElement('button');\r\n\r\n\t\tforwardArrow.classList.add(\"dhx_cal_datepicker_arrow\", \"scheduler_icon\", \"arrow_right\");\r\n\t\theader.appendChild(forwardArrow);\r\n\r\n\t\tcontainer.appendChild(header);\r\n\r\n\t\tthis._domEvents.attach(backwardArrow, \"click\", this._adjustDate.bind(this, -1));\r\n\t\tthis._domEvents.attach(forwardArrow, \"click\", this._adjustDate.bind(this, 1));\r\n\t}\r\n\r\n\trender(container) {\r\n\t\tthis._domEvents.detachAll();\r\n\t\tthis.container = container || this.container; \r\n\t\tthis.container.innerHTML = '';\r\n\r\n\t\tif(!this.element){\r\n\t\t\tthis.element = document.createElement(\"div\");\r\n\t\t\tthis.element.classList.add(\"dhx_cal_datepicker\");\r\n\t\t}\r\n\t\tthis.element.innerHTML = '';\r\n\t\tthis.container.appendChild(this.element);\r\n\r\n\t\tthis._renderCalendarHeader(this.element);\r\n\t\tconst dataContainer = document.createElement(\"div\");\r\n\t\tdataContainer.classList.add(\"dhx_cal_datepicker_data\");\r\n\t\tthis.element.appendChild(dataContainer);\r\n\r\n\t\tconst {mode} = this.getState();\r\n\t\tif (mode === 'days') {\r\n\t\t\tthis._renderDayGrid(dataContainer);\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tthis._renderMonthGrid(dataContainer);\r\n\t\t} else {\r\n\t\t\tthis._renderYearGrid(dataContainer);\r\n\t\t}\r\n\t}\r\n\r\n\t_renderDayGridHeader(daysOfWeekContainer) {\r\n\t\tconst {date} = this.getState();\r\n\t\tconst scheduler = this.scheduler;\r\n\r\n\t\tlet currentDate = scheduler.date.week_start(new Date(date));\r\n\t\tconst maxDate = scheduler.date.add(scheduler.date.week_start(new Date(date)), 1, 'week');\r\n\r\n\t\tdaysOfWeekContainer.classList.add('dhx_cal_datepicker_days');\r\n\r\n\t\tconst labelFormat = scheduler.date.date_to_str(\"%D\");\r\n\r\n\t\twhile (currentDate.valueOf() < maxDate.valueOf()) {\r\n\t\t\tconst label = labelFormat(currentDate);\r\n\r\n\t\t\tconst dayElement = document.createElement('div');\r\n\t\t\tdayElement.setAttribute(\"data-day\", currentDate.getDay());\r\n\t\t\tdayElement.classList.add('dhx_cal_datepicker_dayname');\r\n\t\t\tdayElement.innerText = label;\r\n\t\t\tdaysOfWeekContainer.appendChild(dayElement);\r\n\r\n\t\t\tcurrentDate = scheduler.date.add(currentDate, 1, 'day');\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t_weeksBetween(min, max) {\r\n\t\tconst scheduler = this.scheduler;\r\n\t\tlet weeks = 0;\r\n\t\tlet currWeek = new Date(min);\r\n\t\twhile(currWeek.valueOf() < max.valueOf()){\r\n\t\t\tweeks += 1;\r\n\t\t\tcurrWeek = scheduler.date.week_start(scheduler.date.add(currWeek, 1, \"week\"));\r\n\t\t}\r\n\t\treturn weeks;\r\n\t}\r\n\r\n\t_renderDayGrid(container) {\r\n\t\tconst {date, currentRange, eventDates, minWeeks} = this.getState();\r\n\r\n\t\tlet minSchedulerDate = currentRange[0];\r\n\t\tlet maxSchedulerDate = currentRange[1];\r\n\r\n\t\tconst eventDaysTable = eventDates.reduce((acc, date) => {\r\n\t\t\tconst dayStart = this.scheduler.date.day_start(new Date(date));\r\n\t\t\tacc[dayStart.valueOf()] = true;\r\n\t\t\treturn acc;\r\n\t\t}, {});\r\n\r\n\r\n\t\t// Render Days of the Week\r\n\t\tconst daysOfWeekContainer = document.createElement('div');\r\n\t\tthis._renderDayGridHeader(daysOfWeekContainer);\r\n\t\tcontainer.appendChild(daysOfWeekContainer);\r\n\r\n\t\tconst scheduler = this.scheduler;\r\n\t\tconst firstDate = scheduler.date.week_start(scheduler.date.month_start(new Date(date)));\r\n\t\tconst monthStart = scheduler.date.month_start(new Date(date));\r\n\t\tconst monthEnd = scheduler.date.add(scheduler.date.month_start(new Date(date)), 1, 'month');\r\n\t\tlet lastDate = scheduler.date.add(scheduler.date.month_start(new Date(date)), 1, 'month');\r\n\t\tconst currentCalDate = scheduler.date.date_part(scheduler._currentDate());\r\n\t\tif(lastDate.getDay() !== 0){\r\n\t\t\tlastDate = scheduler.date.add(scheduler.date.week_start(lastDate), 1, \"week\");\r\n\t\t}\r\n\r\n\t\tlet weeks = this._weeksBetween(firstDate, lastDate);\r\n\t\tif(minWeeks && weeks < minWeeks){\r\n\t\t\tlastDate = scheduler.date.add(lastDate, (minWeeks - weeks), \"week\");\r\n\t\t}\r\n\r\n\t\tlet currDate = firstDate;\r\n\r\n\t\tconst dayGridContainer = document.createElement('div');\r\n\t\tdayGridContainer.classList.add('dhx_cal_datepicker_days');\r\n\r\n\t\tthis._domEvents.attach(dayGridContainer, \"click\", (event) => {\r\n\t\t\tconst dateCell = event.target.closest(\"[data-cell-date]\");\r\n\t\t\tconst date = new Date(dateCell.getAttribute(\"data-cell-date\"));\r\n\t\t\tthis.callEvent(\"onDateClick\", [date, event]);\r\n\t\t});\r\n\r\n\t\twhile(currDate.valueOf() < lastDate.valueOf()){\r\n\t\t\tconst dayElement = document.createElement('div');\r\n\t\t\tdayElement.setAttribute(\"data-cell-date\", scheduler.templates.format_date(currDate));\r\n\t\t\tdayElement.setAttribute(\"data-day\", currDate.getDay());\r\n\t\t\tdayElement.innerHTML = currDate.getDate();\r\n\r\n\t\t\tif(currDate.valueOf() < monthStart.valueOf()){\r\n\t\t\t\tdayElement.classList.add('dhx_before');\r\n\t\t\t}else if(currDate.valueOf() >= monthEnd.valueOf()){\t\r\n\t\t\t\tdayElement.classList.add('dhx_after');\r\n\t\t\t}\r\n\r\n\t\t\tif(currDate.getDay() === 0 || currDate.getDay() === 6){\r\n\t\t\t\tdayElement.classList.add(\"dhx_cal_datepicker_weekend\");\r\n\t\t\t}\r\n\r\n\t\t\tif(currDate.valueOf() == currentCalDate.valueOf()){\r\n\t\t\t\tdayElement.classList.add(\"dhx_now\");\r\n\t\t\t}\r\n\r\n\t\t\tif(minSchedulerDate && maxSchedulerDate){\r\n\t\t\t\tif(currDate.valueOf() >= minSchedulerDate.valueOf() && currDate.valueOf() < maxSchedulerDate.valueOf()){\r\n\t\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(eventDaysTable[currDate.valueOf()]){\r\n\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_event');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdayElement.classList.add('dhx_cal_datepicker_date');\r\n\r\n\t\t\tdayGridContainer.appendChild(dayElement);\r\n\t\t\tcurrDate = scheduler.date.add(currDate, 1, 'day');\r\n\t\t}\r\n\r\n\t\tcontainer.appendChild(dayGridContainer);\r\n\r\n\t}\r\n\r\n\t_renderMonthGrid(container) {\r\n\t\tconst {date} = this.getState();\r\n\r\n\t\tconst wrapper = document.createElement('div');\r\n\t\twrapper.classList.add(\"dhx_cal_datepicker_months\");\r\n\r\n\t\tconst months = [];\r\n\t\tfor(let i = 0; i < 12; i++){\r\n\t\t\tmonths.push(new Date(date.getFullYear(), i, 1));\r\n\t\t}\r\n\r\n\t\tconst formatLabel = this.scheduler.date.date_to_str(\"%M\");\r\n\t\tmonths.forEach(month => {\r\n\t\t\tconst monthElement = document.createElement('div');\r\n\t\t\tmonthElement.classList.add('dhx_cal_datepicker_month');\r\n\t\t\tif(date.getMonth() === month.getMonth()){\r\n\t\t\t\tmonthElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t}\r\n\t\t\tmonthElement.setAttribute(\"data-month\", month.getMonth());\r\n\t\t\tmonthElement.innerHTML = formatLabel(month);\r\n\t\t\tthis._domEvents.attach(monthElement, \"click\", () => {\r\n\t\t\t\tconst newDate = new Date(month);\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tdate: newDate,\r\n\t\t\t\t\tmode: 'days'\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\twrapper.appendChild(monthElement);\r\n\t\t});\r\n\t\tcontainer.appendChild(wrapper);\r\n\r\n\t\tconst doneArea = document.createElement(\"div\");\r\n\t\tdoneArea.classList.add(\"dhx_cal_datepicker_done\");\r\n\t\tconst doneBtn = document.createElement(\"button\");\r\n\t\tdoneBtn.innerText = \"Done\";\r\n\t\tdoneBtn.classList.add(\"dhx_cal_datepicker_done_btn\");\r\n\t\tthis._domEvents.attach(doneBtn, \"click\", () => {\r\n\t\t\tthis.setState({\r\n\t\t\t\tmode: 'days'\r\n\t\t\t});\r\n\t\t});\r\n\t\tdoneArea.appendChild(doneBtn);\r\n\t\tcontainer.appendChild(doneArea);\r\n\t}\r\n\r\n\t_renderYearGrid(container) {\r\n\t\tconst {date} = this.getState();\r\n\t\tconst startYear = Math.floor(date.getFullYear() / 10) * 10;\r\n\t\t\r\n\t\tconst wrapper = document.createElement('div');\r\n\t\twrapper.classList.add(\"dhx_cal_datepicker_years\");\r\n\t\tfor (let i = startYear - 1; i <= startYear + 10; i++) {\r\n\t\t\tconst yearElement = document.createElement('div');\r\n\t\t\tyearElement.innerText = i;\r\n\t\t\tyearElement.classList.add('dhx_cal_datepicker_year');\r\n\t\t\tyearElement.setAttribute(\"data-year\", i);\r\n\t\t\tif(date.getFullYear() === i){\r\n\t\t\t\tyearElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t}\r\n\t\t\tthis._domEvents.attach(yearElement, \"click\", () => {\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tdate: new Date(i, date.getMonth(), 1),\r\n\t\t\t\t\tmode: 'months'\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\twrapper.appendChild(yearElement);\r\n\t\t\t\r\n\t\t}\r\n\t\tcontainer.appendChild(wrapper);\r\n\r\n\t\tconst doneArea = document.createElement(\"div\");\r\n\t\tdoneArea.classList.add(\"dhx_cal_datepicker_done\");\r\n\t\tconst doneBtn = document.createElement(\"button\");\r\n\t\tdoneBtn.innerText = \"Done\";\r\n\t\tdoneBtn.classList.add(\"dhx_cal_datepicker_done_btn\");\r\n\t\tthis._domEvents.attach(doneBtn, \"click\", () => {\r\n\t\t\tthis.setState({\r\n\t\t\t\tmode: 'months'\r\n\t\t\t});\r\n\t\t});\r\n\t\tdoneArea.appendChild(doneBtn);\r\n\t\tcontainer.appendChild(doneArea);\r\n\t}\r\n\r\n\tdestructor(){\r\n\t\tthis.onStateChangeHandlers = [];\r\n\t\tif(this.element){\r\n\t\t\tthis.element.innerHTML = '';\r\n\t\t\tthis.element.remove();\r\n\t\t}\r\n\r\n\t\tthis._domEvents.detachAll();\r\n\t\tthis.callEvent(\"onDestroy\", []);\r\n\t\tthis.detachAllEvents();\r\n\r\n\t\tthis.scheduler = null;\r\n\t}\r\n}","// import \"./css/dhtmlxscheduler_terrace\";\r\n// import \"./css/dhtmlxscheduler_material\";\r\n// import \"./css/dhtmlxscheduler_material_nofont\";\r\n// import \"./css/dhtmlxscheduler_flat\";\r\n// import \"./css/dhtmlxscheduler_contrast_black\";\r\n// import \"./css/dhtmlxscheduler_contrast_white\";\r\n\r\nimport addPlugins from \"./plugins\";\r\nimport stateProvider from \"./core/state\";\r\nimport assert from \"./core/common/assert\";\r\nimport common_errors from \"./core/common_errors\";\r\nimport connector from \"./core/connector\";\r\nimport schedulerCore from \"./core/scheduler\";\r\nimport common from \"./core/common\";\r\nimport wai_aria from \"./core/wai_aria\";\r\nimport utils from \"./core/utils/utils\";\r\nimport dom_helpers from \"./core/utils/dom_helpers\";\r\nimport env from \"./utils/env\";\r\nimport destructor from \"./core/destructor\";\r\nimport ajax from \"./core/utils/ajax\";\r\nimport base from \"./core/base\";\r\nimport config from \"./core/config\";\r\nimport event from \"./core/event\";\r\nimport event_highlight from \"./core/event_highlight\";\r\nimport load from \"./core/load\";\r\nimport lightbox from \"./core/lightbox\";\r\nimport touch from \"./core/touch\";\r\nimport dhtmlx_suite_hooks from \"./core/dhtmlx/dhtmlx_suite_hooks\";\r\nimport skins from \"./core/skins\";\r\nimport jquery from \"./core/jquery\";\r\nimport delay_render from \"./core/delay_render\";\r\nimport dataProcessorExtend from \"./core/dataprocessor/dataprocessor\";\r\nimport message from \"./core/message\";\r\nimport i18nFactory from \"./locale\";\r\n\r\nimport voidFirst from \"./publish_helpers/void_script_first\";\r\nimport voidSecond from \"./publish_helpers/void_script_second\";\r\nimport voidThird from \"./publish_helpers/void_script_third\";\r\n\r\n//import datepickerHeader from \"./core/clickable_header\";\r\n\r\nimport { DatePicker } from \"./core/datepicker\";\r\n\r\nexport default function(extensionManager) {\r\n\r\n\tconst scheduler = { version: VERSION };\r\n\t\r\n\tscheduler.$stateProvider = stateProvider();\r\n\r\n\tscheduler.getState = scheduler.$stateProvider.getState;\r\n\tcommon_errors(scheduler);\r\n\tcommon(scheduler);\r\n\tschedulerCore(scheduler);\r\n\twai_aria(scheduler);\r\n\t//utils(scheduler);\r\n\r\n\tscheduler.utils = utils;\r\n\tscheduler.$domHelpers = dom_helpers;\r\n\tscheduler.utils.dom = dom_helpers;\r\n\tscheduler.uid = utils.uid;\r\n\tscheduler.mixin = utils.mixin;\r\n\tscheduler.defined = utils.defined;\r\n\tscheduler.assert = assert(scheduler);\r\n\tscheduler.copy = utils.copy;\r\n\r\n\tscheduler._createDatePicker = function(container, config){\r\n\t\treturn new DatePicker(scheduler, container, config);\r\n\t};\r\n\r\n\t//datepickerHeader(scheduler);\r\n\r\n\r\n\t//old api compatibility\r\n\tscheduler._getFocusableNodes = dom_helpers.getFocusableNodes;\r\n\tscheduler._getClassName = dom_helpers.getClassName;\r\n\tscheduler._locate_css = dom_helpers.locateCss;\r\n\r\n\tconst messageApi = message(scheduler);\r\n\tscheduler.utils.mixin(scheduler, messageApi);\r\n\r\n\tscheduler.env = scheduler.$env = env;\r\n\tscheduler.Promise = window.Promise;\r\n\tdestructor(scheduler);\r\n\tajax(scheduler);\r\n\tvoidFirst(scheduler);\r\n\tbase(scheduler);\r\n\tconfig(scheduler);\r\n\tevent(scheduler);\r\n\tevent_highlight(scheduler);\r\n\tload(scheduler);\r\n\tlightbox(scheduler);\r\n\ttouch(scheduler);\r\n\tdhtmlx_suite_hooks(scheduler);\r\n\tvoidSecond(scheduler);\r\n\tskins(scheduler);\r\n\tjquery(scheduler);\r\n\tdelay_render(scheduler);\r\n\tdataProcessorExtend(scheduler);\r\n\tvoidThird(scheduler);\r\n\tconnector(scheduler);\r\n\tconst i18n = i18nFactory();\r\n\tscheduler.i18n = {\r\n\t\taddLocale: i18n.addLocale,\r\n\t\tsetLocale: function(locale){\r\n\t\t\tif(typeof locale === \"string\"){\r\n\t\t\t\tvar localeObject = i18n.getLocale(locale);\r\n\t\t\t\tif(!localeObject){\r\n\t\t\t\t\tlocaleObject = i18n.getLocale(\"en\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler.locale = localeObject;\r\n\t\t\t}else if(locale){\r\n\t\t\t\tif(!scheduler.locale){\r\n\t\t\t\t\tscheduler.locale = locale;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfor(var i in locale){\r\n\t\t\t\t\t\tif(locale[i] && typeof locale[i] === \"object\"){\r\n\t\t\t\t\t\t\tif(!scheduler.locale[i]){\r\n\t\t\t\t\t\t\t\tscheduler.locale[i] = {};\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tscheduler.mixin(scheduler.locale[i], locale[i], true);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tscheduler.locale[i] = locale[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar labels = scheduler.locale.labels;\r\n\t\t\tlabels.dhx_save_btn \t= labels.icon_save;\r\n\t\t\tlabels.dhx_cancel_btn \t= labels.icon_cancel;\r\n\t\t\tlabels.dhx_delete_btn \t= labels.icon_delete;\r\n\r\n\t\t\tif(scheduler.$container){\r\n\t\t\t\tscheduler.get_elements();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t},\r\n\t\tgetLocale: i18n.getLocale\r\n\t};\r\n\tscheduler.i18n.setLocale(\"en\");\r\n\taddPlugins(scheduler);\r\n\tscheduler.ext = {};\r\n\r\n\tconst activePlugins = {};\r\n\tscheduler.plugins = function(config){\r\n\t\tconst extensionList = getExtensionList(config, {\r\n\t\t\t\ttreetimeline: [\"timeline\"],\r\n\t\t\t\tdaytimeline: [\"timeline\"],\r\n\t\t\t\touterdrag: [\"legacy\"]\r\n\t\t\t}, {\r\n\t\t\t\tlegacy: 1,\r\n\t\t\t\tlimit: 1,\r\n\t\t\t\ttimeline: 2,\r\n\t\t\t\tdaytimeline: 3,\r\n\t\t\t\ttreetimeline: 3,\r\n\t\t\t\touterdrag:6\r\n\t\t\t});\r\n\r\n\t\textensionList.forEach(function(name){\r\n\t\t\tif(!activePlugins[name]){\r\n\t\t\t\tconst plugin = extensionManager.getExtension(name);\r\n\t\t\t\tif(plugin){\r\n\t\t\t\t\tplugin(scheduler);\r\n\t\t\t\t\tactivePlugins[name] = true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthrow new Error(\"unknown plugin \" + name);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n\r\n\tfunction getExtensionList(config, dependencies, priorities){\r\n\t\tconst result = [];\r\n\r\n\t\tfor(const i in config){\r\n\t\t\tif(config[i]){\r\n\t\t\t\tconst extension = i.toLowerCase();\r\n\t\t\t\tif(dependencies[extension]){\r\n\t\t\t\t\tdependencies[extension].forEach(function(dep){\r\n\t\t\t\t\t\tconst dependencyName = dep.toLowerCase();\r\n\t\t\t\t\t\tif(!config[dependencyName]){\r\n\t\t\t\t\t\t\tresult.push(dependencyName);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\tresult.push(extension);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tresult.sort(function(a, b){\r\n\t\t\tconst orderA = priorities[a] || 0;\r\n\t\t\tconst orderB = priorities[b] || 0;\r\n\t\t\tif(orderA > orderB){\r\n\t\t\t\treturn 1;\r\n\t\t\t}else if(orderA < orderB){\r\n\t\t\t\treturn -1;\r\n\t\t\t}else{\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\treturn scheduler;\r\n\r\n}","export default class ExtensionsManager{\r\n\tconstructor(config){\r\n\t\tthis._extensions = {};\r\n\t\tfor(const i in config){\r\n\t\t\tthis._extensions[i] = config[i];\r\n\t\t}\r\n\t}\r\n\r\n\taddExtension(name, ext) {\r\n\t\tthis._extensions[name] = ext;\r\n\t}\r\n\r\n\tgetExtension(name) {\r\n\t\treturn this._extensions[name];\r\n\t}\r\n}","\r\n\r\nimport dhtmlxHook from \"./dhtmlx_hook\";\r\nimport \"./css/theme.less\";\r\ndhtmlxHook();\r\n\r\nimport global from \"./global\";\r\n\r\nimport factoryMethod from \"./scheduler_factory_method\";\r\nimport ExtensionsManager from \"./ext/extension_manager\";\r\n\r\nclass SchedulerFactory {\r\n\r\n\tconstructor (extensions) {\r\n\t\tthis._seed = 0;\r\n\t\tthis._schedulerPlugins = [];\r\n\t\tthis._bundledExtensions = extensions;\r\n\t\tthis._extensionsManager = new ExtensionsManager(extensions);\r\n\t}\r\n\r\n\tplugin(code) {\r\n\t\tthis._schedulerPlugins.push(code);\r\n\r\n\t\tif(global.scheduler){\r\n\t\t\tcode(global.scheduler);\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetSchedulerInstance(initConfig) {\r\n\t\tvar scheduler = factoryMethod(this._extensionsManager);\r\n\r\n\t\tfor (var i = 0; i < this._schedulerPlugins.length; i++) {\r\n\t\t\tthis._schedulerPlugins[i](scheduler);\r\n\t\t}\r\n\t\tscheduler._internal_id = this._seed++;\r\n\t\r\n\t\tif (this.$syncFactory){\r\n\t\t\tthis.$syncFactory(scheduler);\r\n\t\t}\r\n\r\n\t\tif(initConfig){\r\n\t\t\tthis._initFromConfig(scheduler, initConfig);\r\n\t\t}\r\n\r\n\t\treturn scheduler;\r\n\t}\r\n\r\n\t_initFromConfig(scheduler, initConfig){\r\n\t\tif(initConfig.plugins){\r\n\t\t\tscheduler.plugins(initConfig.plugins);\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.config){\r\n\t\t\tscheduler.mixin(scheduler.config, initConfig.config, true);\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.templates){\r\n\t\t\tscheduler.attachEvent(\"onTemplatesReady\", function(){\r\n\t\t\t\tscheduler.mixin(scheduler.templates, initConfig.templates, true);\r\n\t\t\t}, {once: true});\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.events){\r\n\t\t\tfor(const event in initConfig.events){\r\n\t\t\t\tscheduler.attachEvent(event, initConfig.events[event]);\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.locale){\r\n\t\t\tscheduler.i18n.setLocale(initConfig.locale);\r\n\t\t}\r\n\t\r\n\t\tif(Array.isArray(initConfig.calendars)){\r\n\t\t\tinitConfig.calendars.forEach(function(calendar){\r\n\t\t\t\tscheduler.addCalendar(calendar);\r\n\t\t\t});\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.container){\r\n\t\t\tscheduler.init(initConfig.container);\r\n\t\t} else {\r\n\t\t\tscheduler.init();\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.data){\r\n\t\t\tif(typeof initConfig.data === \"string\"){\r\n\t\t\t\tscheduler.load(initConfig.data);\r\n\t\t\t}else{\r\n\t\t\t\tscheduler.parse(initConfig.data);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\r\n}\r\n\r\nexport default SchedulerFactory;","export default function(scheduler){\r\n\r\nscheduler.config.active_link_view = \"day\";\r\nscheduler._active_link_click = function(e){\r\n\tvar start = e.target;\r\n\tvar to = start.getAttribute(\"data-link-date\");\r\n\tvar s_d = scheduler.date.str_to_date(scheduler.config.api_date, false, true);\r\n\tif (to) {\r\n\t\tscheduler.setCurrentView(s_d(to), scheduler.config.active_link_view);\r\n\t\tif (e && e.preventDefault)\r\n\t\t\te.preventDefault();\r\n\t\treturn false;\r\n\t}\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar do_wrapper = function(key, fullname){\r\n\t\tfullname = fullname || (key+\"_scale_date\");\r\n\r\n\t\tif(!scheduler.templates['_active_links_old_'+ fullname]){\r\n\t\t\tscheduler.templates['_active_links_old_'+ fullname] = scheduler.templates[fullname];\r\n\t\t}\r\n\t\tvar week_x = scheduler.templates['_active_links_old_'+ fullname];\r\n\t\tvar d_s = scheduler.date.date_to_str(scheduler.config.api_date);\r\n\t\tscheduler.templates[fullname] = function(date) {\r\n\t\t\treturn \"\" + week_x(date) + \"\";\r\n\t\t};\r\n\t};\r\n\r\n\tdo_wrapper(\"week\");\r\n\tdo_wrapper(\"\", \"month_day\");\r\n\tif (this.matrix){\r\n\t\tfor (var key in this.matrix)\r\n\t\t\tdo_wrapper(key);\r\n\t}\r\n\r\n\tthis._detachDomEvent(this._obj, \"click\", scheduler._active_link_click);\r\n\tscheduler.event(this._obj, \"click\", scheduler._active_link_click);\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.date.add_agenda_legacy = function(date){\r\n\treturn scheduler.date.add(date, 1, \"year\");\r\n};\r\n\r\nscheduler.templates.agenda_legacy_time = function(start,end,ev){\r\n\tif (ev._timed)\r\n\t\treturn this.day_date(ev.start_date, ev.end_date, ev)+\" \"+this.event_date(start);\r\n\telse\r\n\t\treturn scheduler.templates.day_date(start)+\" – \"+scheduler.templates.day_date(end);\r\n};\r\nscheduler.templates.agenda_legacy_text = function(start,end,event){\r\n\treturn event.text;\r\n};\r\nscheduler.templates.agenda_legacy_date = function(){ return \"\"; };\r\n\r\nscheduler.date.agenda_legacy_start=function(){ return scheduler.date.date_part(scheduler._currentDate()); };\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function() {\r\n\tvar old_dblclick_dhx_cal_data = scheduler.dblclick_dhx_cal_data;\r\n\tscheduler.dblclick_dhx_cal_data = function() {\r\n\t\tif (this._mode == \"agenda_legacy\") {\r\n\t\t\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\t\t\tthis.addEventNow();\r\n\t\t} else {\r\n\t\t\tif (old_dblclick_dhx_cal_data)\r\n\t\t\t\treturn old_dblclick_dhx_cal_data.apply(this, arguments);\r\n\t\t}\r\n\t};\r\n\r\n\r\n\tvar old = scheduler.render_data;\r\n\tscheduler.render_data=function(evs){\r\n\t\tif (this._mode == \"agenda_legacy\")\r\n\t\t\tfill_agenda_tab();\r\n\t\telse\r\n\t\t\treturn old.apply(this,arguments);\r\n\t};\r\n\r\n\tvar old_render_view_data = scheduler.render_view_data;\r\n\tscheduler.render_view_data = function(){\r\n\t\tif(this._mode == \"agenda_legacy\") {\r\n\t\t\tscheduler._agendaScrollTop = scheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop;\r\n\t\t\tscheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop = 0;\r\n\t\t}\r\n\t\treturn old_render_view_data.apply(this,arguments);\r\n\t};\r\n\r\n\r\n\r\n\tfunction set_full_view(mode){\r\n\t\tif (mode){\r\n\t\t\tvar l = scheduler.locale.labels;\r\n\r\n\t\t\tvar rowAttr = scheduler._waiAria.agendaHeadAttrString();\r\n\t\t\tvar dateHeader = scheduler._waiAria.agendaHeadDateString(l.date);\r\n\t\t\tvar descriptionHeader = scheduler._waiAria.agendaHeadDescriptionString(l.description);\r\n\r\n\t\t\tscheduler._els[\"dhx_cal_header\"][0].innerHTML=\"
\" +\r\n\t\t\t\t\"
\"+l.date+\"
\" +\r\n\t\t\t\t\"\"+l.description+\"\" +\r\n\t\t\t\t\"
\";\r\n\t\t\tscheduler._table_view=true;\r\n\t\t\tscheduler.set_sizes();\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fill_agenda_tab(){\r\n\t\t//select events for which data need to be printed\r\n\r\n\t\tvar events = scheduler.get_visible_events();\r\n\t\tevents.sort(function(a,b){ return a.start_date>b.start_date?1:-1;});\r\n\r\n\t\tvar tableAttr = scheduler._waiAria.agendaDataAttrString();\r\n\t\tvar agendaEventAttrString;\r\n\t\t//generate html for the view\r\n\t\tvar html=\"
\";\r\n\t\tfor (var i=0; i
\"+\r\n\t\t\t\t\t(scheduler.config.rtl ? scheduler.templates.agenda_time(ev.end_date,ev.start_date, ev):scheduler.templates.agenda_time(ev.start_date, ev.end_date,ev))+\r\n\t\t\t\t\t\"
\";\r\n\t\t\thtml+=`
\r\n\t\t\t\r\n\t\t\t
`;\r\n\t\t\thtml+=\"\"+scheduler.templates.agenda_text(ev.start_date, ev.end_date, ev)+\"
\";\r\n\t\t}\r\n\t\thtml+=\"
\";\r\n\r\n\t\t//render html\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop = scheduler._agendaScrollTop||0;\r\n\r\n\t\t// setting up dhx_v_border size\r\n\t\tvar agenda_area = scheduler._els[\"dhx_cal_data\"][0].childNodes[0];\r\n\t\tvar v_border = agenda_area.childNodes[agenda_area.childNodes.length-1];\r\n\t\tv_border.style.height = (agenda_area.offsetHeight < scheduler._els[\"dhx_cal_data\"][0].offsetHeight) ? \"100%\" : (agenda_area.offsetHeight+\"px\");\r\n\r\n\t\tvar t=scheduler._els[\"dhx_cal_data\"][0].firstChild.childNodes;\r\n\r\n\t\tvar dateElement = scheduler._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML=scheduler.templates.agenda_date(scheduler._min_date, scheduler._max_date, scheduler._mode);\r\n\t\t}\r\n\r\n\t\tscheduler._rendered=[];\r\n\t\tfor (var i=0; i < t.length-1; i++)\r\n\t\t\tscheduler._rendered[i]=t[i];\r\n\r\n\t}\r\n\r\n\tscheduler.agenda_legacy_view=function(mode){\r\n\t\tscheduler._min_date = scheduler.config.agenda_start||scheduler.date.agenda_legacy_start(scheduler._date);\r\n\t\tscheduler._max_date = scheduler.config.agenda_end||scheduler.date.add_agenda_legacy(scheduler._min_date, 1);\r\n\r\n\t\tset_full_view(mode);\r\n\t\tif (mode){\r\n\t\t\tscheduler._cols = null;\r\n\t\t\tscheduler._colsS = null;\r\n\t\t\tscheduler._table_view = true;\r\n\t\t\t//agenda tab activated\r\n\t\t\tfill_agenda_tab();\r\n\t\t} else {\r\n\t\t\tscheduler._table_view = false;\r\n\t\t\t//agenda tab de-activated\r\n\t\t}\r\n\t};\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.date.add_agenda = function(date, inc){\r\n\t\treturn scheduler.date.add(date, 1*inc, \"month\");\r\n\t};\r\n\t\r\n\tscheduler.templates.agenda_time = function(start,end,ev){\r\n\t\tif (ev._timed){\r\n\t\t\treturn `${this.event_date(start)} - ${this.event_date(end)}`;\r\n\t\t}else{\r\n\t\t\treturn scheduler.locale.labels.full_day;\r\n\t\t}\r\n\t};\r\n\tscheduler.templates.agenda_text = function(start,end,ev){\r\n\t\treturn ev.text;\r\n\t};\r\n\r\n\tconst dayDateToStr = scheduler.date.date_to_str(\"%F %j\");\r\n\tconst dayDowToStr = scheduler.date.date_to_str(\"%l\");\r\n\r\n\tscheduler.templates.agenda_day = function(date){ \r\n\t\treturn `
${dayDateToStr(date)}
\r\n\t\t
${dayDowToStr(date)}
`;\r\n\t};\r\n\tscheduler.templates.agenda_date = function(start, end){ \r\n\t\treturn scheduler.templates.month_date(scheduler.getState().date); \r\n\t};\r\n\t\r\n\tscheduler.date.agenda_start=function(date){\r\n\t\treturn scheduler.date.month_start(new Date(date));\r\n\t};\r\n\r\n\tlet scrollTop = 0;\r\n\t\r\n\tscheduler.attachEvent(\"onTemplatesReady\",function() {\r\n\t\tvar old_dblclick_dhx_cal_data = scheduler.dblclick_dhx_cal_data;\r\n\t\tscheduler.dblclick_dhx_cal_data = function() {\r\n\t\t\tif (this._mode == \"agenda\") {\r\n\t\t\t\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\t\t\t\tthis.addEventNow();\r\n\t\t\t} else {\r\n\t\t\t\tif (old_dblclick_dhx_cal_data)\r\n\t\t\t\t\treturn old_dblclick_dhx_cal_data.apply(this, arguments);\r\n\t\t\t}\r\n\t\t};\r\n\t\r\n\t\r\n\t\tvar old = scheduler.render_data;\r\n\t\tscheduler.render_data=function(evs){\r\n\t\t\tif (this._mode == \"agenda\")\r\n\t\t\t\tfill_agenda_tab();\r\n\t\t\telse\r\n\t\t\t\treturn old.apply(this,arguments);\r\n\t\t};\r\n\t\r\n\t\tvar old_render_view_data = scheduler.render_view_data;\r\n\t\tscheduler.render_view_data = function(){\r\n\t\t\tif(this._mode == \"agenda\") {\r\n\t\t\t\tscrollTop = scheduler._els[\"dhx_cal_data\"][0].scrollTop;\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = 0;\r\n\t\t\t}\r\n\t\t\treturn old_render_view_data.apply(this,arguments);\r\n\t\t};\r\n\r\n\t\tfunction fill_agenda_tab(){\r\n\t\t\tconst events = scheduler.get_visible_events();\r\n\t\t\tevents.sort(function(a,b){ return a.start_date>b.start_date?1:-1;});\r\n\r\n\t\t\tconst eventsInDays = {};\r\n\t\t\tlet currDate = scheduler.getState().min_date;\r\n\t\t\tconst maxDate = scheduler.getState().max_date;\r\n\t\t\twhile(currDate.valueOf() < maxDate.valueOf()){\r\n\t\t\t\teventsInDays[currDate.valueOf()] = [];\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\r\n\t\t\tlet anyEvents = false;\r\n\r\n\t\t\tevents.forEach((ev) => {\r\n\t\t\t\tlet eventStart = scheduler.date.day_start(new Date(ev.start_date)); \r\n\t\t\t\twhile (eventStart.valueOf() < ev.end_date.valueOf()) {\r\n\t\t\t\t\tif (eventsInDays[eventStart.valueOf()]) {\r\n\t\t\t\t\t\teventsInDays[eventStart.valueOf()].push(ev);\r\n\t\t\t\t\t\tanyEvents = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\teventStart = scheduler.date.day_start(scheduler.date.add(eventStart, 1, \"day\"));\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(!anyEvents){\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = renderEmptyView();\r\n\t\t\t}else{\r\n\t\t\t\tlet html = \"\";\r\n\t\t\t\tfor(let day in eventsInDays){\r\n\t\t\t\t\thtml += renderDay(new Date(day*1), eventsInDays[day]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = scrollTop;\r\n\t\t\t\r\n\t\t\tlet t = scheduler._els[\"dhx_cal_data\"][0].querySelectorAll(\".dhx_cal_agenda_event_line\");\r\n\t\t\tscheduler._rendered = [];\r\n\t\t\tfor (var i = 0; i < t.length - 1; i++) {\r\n\t\t\t\tscheduler._rendered[i] = t[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\r\n\r\n\t\tfunction renderEmptyView(){\r\n\t\t\treturn `
${scheduler.locale.labels.agenda_tab}
`;\r\n\t\t}\r\n\r\n\t\tfunction renderDay(day, events) {\r\n\t\t\tif(!events.length){\r\n\t\t\t\treturn \"\";\r\n\t\t\t}\r\n\t\t\tlet html = `\r\n
\r\n\t
${scheduler.templates.agenda_day(day)}
\r\n\t
\r\n`;\r\n\r\n\t\t\tevents.forEach((calendarEvent) => {\r\n\t\t\t\thtml += renderOneEvent(day, calendarEvent);\r\n\t\t\t});\r\n\r\n\t\t\thtml += `
`;\r\n\t\t\treturn html;\r\n\t\t}\r\n\r\n\t\tfunction renderOneEvent(day, calendarEvent){\r\n\t\t\tconst dates = scheduler.templates.agenda_time(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\t\t\tconst selectedId = scheduler.getState().select_id;\r\n\t\t\tconst cls = scheduler.templates.event_class(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\t\t\tconst description = scheduler.templates.agenda_text(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\r\n\t\t\tlet style = \"\";\r\n\t\t\tif(calendarEvent.color || calendarEvent.textColor){\r\n\t\t\t\tconst bg = (calendarEvent.color ? (\"--dhx-scheduler-event-background:\" + calendarEvent.color + \";\") : \"\");\r\n\t\t\t\tconst color = (calendarEvent.textColor ? (\"--dhx-scheduler-event-color:\" + calendarEvent.textColor + \";\") : \"\");\r\n\t\t\t\tstyle = ` style=\"${bg}${color}\" `;\r\n\t\t\t}\r\n\r\n\t\t\treturn `
\r\n\t
\r\n\t
${dates}
\r\n\t
${description}
\r\n
`;\r\n\t\t}\r\n\t\r\n\t\tscheduler.agenda_view=function(mode){\r\n\t\t\tif (mode){\r\n\t\t\t\tscheduler._min_date = scheduler.config.agenda_start || scheduler.date.agenda_start(scheduler._date);\r\n\t\t\t\tscheduler._max_date = scheduler.config.agenda_end || scheduler.date.add_agenda(scheduler._min_date, 1);\r\n\t\t\t\tscheduler._cols = null;\r\n\t\t\t\tscheduler._colsS = null;\r\n\t\t\t\tscheduler._table_view = true;\r\n\r\n\t\t\t\tconst dateHeader = scheduler._getNavDateElement();\r\n\t\t\t\tdateHeader.innerHTML = scheduler.templates.agenda_date(scheduler._date);\r\n\t\t\t\t//agenda tab activated\r\n\t\t\t\tfill_agenda_tab();\r\n\t\t\t} else {\r\n\t\t\t\tscheduler._table_view = false;\r\n\t\t\t\t//agenda tab de-activated\r\n\t\t\t}\r\n\t\t};\r\n\t});\r\n\r\n\t// scheduler.attachEvent(\"onEventSelected\", function(id){\r\n\t// \tconst oldSelected = scheduler.$container.querySelectorAll(\".dhx_cal_agenda_event_line_selected\");\r\n\t// \toldSelected.forEach((el) => {\r\n\t// \t\tel.classList.remove(\"dhx_cal_agenda_event_line_selected\");\r\n\t// \t});\r\n\r\n\t// \tconst selected = scheduler.$container.querySelector(`[${scheduler.config.event_attribute}=\"${id}\"]`);\r\n\t// \tif(selected){\r\n\t// \t\tselected.classList.add(\"dhx_cal_agenda_event_line_selected\");\r\n\t// \t}\r\n\t// });\r\n\t\r\n\t\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.config.all_timed = \"short\";\r\n\tscheduler.config.all_timed_month = false;\r\n\r\n\tvar is_event_short = function (ev) {\r\n\t\tif(!((ev.end_date - ev.start_date)/(1000*60*60) >= 24)){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t// short event shouldn't disappear to multiday area during dnd-resize\r\n\t\tif(scheduler._drag_mode == \"resize\" && scheduler._drag_id == ev.id){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn \tfalse;\r\n\t};\r\n\r\n\t// copy of usual events and recurring instances;\r\n\t// regular copy causes problems with recurrings which have series event as a prototype\r\n\tscheduler._safe_copy = function(event){\r\n\t\tvar proto = null,\r\n\t\t\tcopy = scheduler._copy_event(event);\r\n\t\tif(event.event_pid){\r\n\t\t\tproto = scheduler.getEvent(event.event_pid);\r\n\t\t}\r\n\r\n\t\tif (proto && proto.isPrototypeOf(event)) {\r\n\t\t\tdelete copy.event_length;\r\n\t\t\tdelete copy.event_pid;\r\n\t\t\tdelete copy.rec_pattern;\r\n\t\t\tdelete copy.rec_type;\r\n\t\t}\r\n\r\n\t\treturn copy;\r\n\t};\r\n\r\n\tvar old_prerender_events_line = scheduler._pre_render_events_line;\r\n\tvar old_prerender_events_table = scheduler._pre_render_events_table;\r\n\r\n\tvar prerender_events = function (evs, hold) {\r\n\t\tif (!this._table_view) {\r\n\t\t\treturn old_prerender_events_line.call(this, evs, hold);\r\n\t\t}\r\n\r\n\t\treturn old_prerender_events_table.call(this, evs, hold);\r\n\t};\r\n\r\n\tscheduler._pre_render_events_line = scheduler._pre_render_events_table = function(evs, hold){\r\n\t\tif (!this.config.all_timed ||\r\n\t\t\t(this._table_view && this._mode != \"month\") ||\r\n\t\t\t(this._mode == \"month\" && !this.config.all_timed_month))\r\n\t\t\treturn prerender_events.call(this, evs, hold);\r\n\r\n\t\tfor (var i=0; i < evs.length; i++) {\r\n\t\t\tvar ev=evs[i];\r\n\r\n\t\t\tif (ev._timed)\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tif (this.config.all_timed == \"short\") {\r\n\t\t\t\tif (!is_event_short(ev)) {\r\n\t\t\t\t\tif (this._mode != \"month\") {\r\n\t\t\t\t\t\tevs.splice(i--, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar ce = this._safe_copy(ev); // current event (event for one specific day) is copy of original with modified dates\r\n\t\t\tif(!ev._virtual){\r\n\t\t\t\tce._first_chunk = true;\r\n\t\t\t}else{\r\n\t\t\t\tce._first_chunk = false;\r\n\t\t\t}\r\n\t\t\tce._drag_resize = false;\r\n\t\t\tce._virtual = true;\r\n\t\t\tce.start_date = new Date(ce.start_date); // as lame copy doesn't copy date objects\r\n\r\n\t\t\tif (!isOvernightEvent(ev)) {\r\n\t\t\t\tce.end_date = new Date(ev.end_date);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tce.end_date = getNextDay(ce.start_date);\r\n\t\t\t\tif (this.config.last_hour != 24) { // if specific last_hour was set (e.g. 20)\r\n\t\t\t\t\tce.end_date = setDateTime(ce.start_date, this.config.last_hour);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar event_changed = false;\r\n\t\t\tif (ce.start_date < this._max_date && ce.end_date > this._min_date && ce.start_date < ce.end_date) {\r\n\t\t\t\tevs[i] = ce; // adding another event in collection\r\n\t\t\t\tevent_changed = true;\r\n\t\t\t}\r\n\t\t//\tif (ce.start_date > ce.end_date) {\r\n\t\t//\t\tevs.splice(i--,1);\r\n\t\t//\t}\r\n\r\n\t\t\tvar re = this._safe_copy(ev); // remaining event, copy of original with modified start_date (making range more narrow)\r\n\t\t\tre._virtual = true;\r\n\t\t\tre.end_date = new Date(re.end_date);\r\n\t\t\tif (re.start_date < this._min_date)\r\n\t\t\t\tre.start_date = setDateTime(this._min_date, this.config.first_hour);// as we are starting only with whole hours\r\n\t\t\telse\r\n\t\t\t\tre.start_date = setDateTime(getNextDay(ev.start_date), this.config.first_hour);\r\n\r\n\t\t\tif (re.start_date < this._max_date && re.start_date < re.end_date) {\r\n\t\t\t\tif (event_changed){\r\n\t\t\t\t\tevs.splice(i+1,0,re);//insert part\r\n\t\t\t\t}else {\r\n\t\t\t\t\tevs[i--] = re;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tre._last_chunk = false;\r\n\t\t\t}else{\r\n\t\t\t\tce._last_chunk = true;\r\n\t\t\t\tce._drag_resize = true;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// in case of all_timed pre_render is not applied to the original event\r\n\t\t// so we need to force redraw in case of dnd\r\n\t\tvar redraw = (this._drag_mode == 'move')?false:hold;\r\n\t\treturn prerender_events.call(this, evs, redraw);\r\n\r\n\r\n\t\tfunction isOvernightEvent(ev){\r\n\t\t\tvar next_day = getNextDay(ev.start_date);\r\n\t\t\treturn (+ev.end_date > +next_day);\r\n\t\t}\r\n\t\tfunction getNextDay(date){\r\n\t\t\tvar next_day = scheduler.date.add(date, 1, \"day\");\r\n\t\t\tnext_day = scheduler.date.date_part(next_day);\r\n\t\t\treturn next_day;\r\n\t\t}\r\n\t\tfunction setDateTime(date, hours){\r\n\t\t\tvar val = scheduler.date.date_part(new Date(date));\r\n\t\t\tval.setHours(hours);\r\n\t\t\treturn val;\r\n\t\t}\r\n\t};\r\n\tvar old_get_visible_events = scheduler.get_visible_events;\r\n\tscheduler.get_visible_events = function(only_timed){\r\n\t\tif (!(this.config.all_timed && this.config.multi_day))\r\n\t\t\treturn old_get_visible_events.call(this, only_timed);\r\n\t\treturn old_get_visible_events.call(this, false); // only timed = false\r\n\t};\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function (old_mode, old_date, mode, date) {\r\n\t\tscheduler._allow_dnd = (mode == \"day\" || mode == \"week\" || scheduler.getView(mode));\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler._is_main_area_event = function(ev){\r\n\t\treturn !!(ev._timed || this.config.all_timed === true || (this.config.all_timed == \"short\" && is_event_short(ev)) );\r\n\t};\r\n\r\n\tvar oldUpdate = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id){\r\n\t\t// full redraw(update_render=true) messes events order while dnd.\r\n\t\t// individual redraw(update_render=false) of multiday event, which happens on select/unselect, expands event to full width of the cell and can be fixes only with full redraw.\r\n\t\t// so for now full redraw is always enabled for not-dnd updates\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tvar fullRedrawNeeded;\r\n\t\tvar initial;\r\n\t\tif(ev) {\r\n\t\t\tfullRedrawNeeded = (scheduler.config.all_timed && !(scheduler.isOneDayEvent(scheduler._events[id]) || scheduler.getState().drag_id));\r\n\t\t\tif (fullRedrawNeeded) {\r\n\t\t\t\tinitial = scheduler.config.update_render;\r\n\t\t\t\tscheduler.config.update_render = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\toldUpdate.apply(scheduler, arguments);\r\n\r\n\t\tif(ev) {\r\n\t\t\tif (fullRedrawNeeded) {\r\n\t\t\t\tscheduler.config.update_render = initial;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\r\nvar temp_section;\r\nvar before;\r\n\r\nscheduler.config.collision_limit = 1;\r\n\r\nfunction _setTempSection(event_id) { // for custom views (matrix, timeline, units)\r\n\tvar checked_mode = scheduler._get_section_view();\r\n\tif(checked_mode && event_id){\r\n\t\ttemp_section = scheduler.getEvent(event_id)[scheduler._get_section_property()];\r\n\t}\r\n}\r\n\r\nscheduler.attachEvent(\"onBeforeDrag\",function(id){\r\n\t_setTempSection(id);\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onBeforeLightbox\",function(id){\r\n\tvar ev = scheduler.getEvent(id);\r\n\tbefore = [ev.start_date, ev.end_date];\r\n\t_setTempSection(id);\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventChanged\",function(id){\r\n\tif (!id || !scheduler.getEvent(id)) return true;\r\n\tvar ev = scheduler.getEvent(id);\r\n\tif (!scheduler.checkCollision(ev)){\r\n\t\tif (!before) return false;\r\n\t\tev.start_date = before[0];\r\n\t\tev.end_date = before[1];\r\n\t\tev._timed=this.isOneDayEvent(ev);\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onBeforeEventChanged\",function(ev,e,is_new){\r\n\treturn scheduler.checkCollision(ev);\r\n});\r\nscheduler.attachEvent(\"onEventAdded\",function(id,ev) {\r\n\tvar result = scheduler.checkCollision(ev);\r\n\tif (!result)\r\n\t\tscheduler.deleteEvent(id);\r\n});\r\nscheduler.attachEvent(\"onEventSave\",function(id, edited_ev, is_new){\r\n\tedited_ev = scheduler._lame_clone(edited_ev);\r\n\tedited_ev.id = id;\r\n\r\n\t//lightbox may not have 'time' section\r\n\tif(!(edited_ev.start_date && edited_ev.end_date)){\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tedited_ev.start_date = new Date(ev.start_date);\r\n\t\tedited_ev.end_date = new Date(ev.end_date);\r\n\t}\r\n\r\n\tif((edited_ev.rrule && !edited_ev.recurring_event_id) || edited_ev.rec_type){\r\n\t\tscheduler._roll_back_dates(edited_ev);\r\n\t}\r\n\treturn scheduler.checkCollision(edited_ev); // in case user creates event on one date but then edited it another\r\n});\r\n\r\nscheduler._check_sections_collision = function(first, second){\r\n\tvar map_to = scheduler._get_section_property();\r\n\tif (first[map_to] == second[map_to] && first.id != second.id)\r\n\t\treturn true;\r\n\treturn false;\r\n};\r\n\r\nscheduler.checkCollision = function(ev) {\r\n\tvar evs = [];\r\n\tvar collision_limit = scheduler.config.collision_limit;\r\n\r\n\tif (ev.rrule || ev.rec_type) {\r\n\t\tvar evs_dates = scheduler.getRecDates(ev);\r\n\t\tfor(var k=0; k= collision_limit) {\r\n\r\n\t\t\tsingle = false;\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tif ( evs.length >= collision_limit )\r\n\t\t\tsingle = false;\r\n\t}\r\n\tif (!single) {\r\n\t\tvar res = !scheduler.callEvent(\"onEventCollision\",[ev,evs]);\r\n\t\tif (!res) {\r\n\t\t\tev[map_to] = temp_section||ev[map_to]; // from _setTempSection for custom views\r\n\t\t}\r\n\t\treturn res;\r\n\t}\r\n\treturn single;\r\n\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.config.container_autoresize = true;\r\n\tscheduler.config.month_day_min_height = 90;\r\n\tscheduler.config.min_grid_size = 25;\r\n\tscheduler.config.min_map_size = 400;\r\n\r\n\tvar old_pre_render_event = scheduler._pre_render_events;\r\n\r\n\t//need for temporary disabling without modifying public config\r\n\tvar active = true;\r\n\tvar total_height = 0;\r\n\tvar multiday_height = 0;\r\n\r\n\tscheduler._pre_render_events = function(evs, hold) {\r\n\t\tif (!(scheduler.config.container_autoresize && active)) {\r\n\t\t\treturn old_pre_render_event.apply(this, arguments);\r\n\t\t}\r\n\r\n\t\tvar hb = this.xy.bar_height;\r\n\t\tvar h_old = this._colsS.heights;\r\n\t\tvar h = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0];\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tif (!this._table_view)\r\n\t\t\tevs = this._pre_render_events_line(evs, hold); //ignore long events for now\r\n\t\telse\r\n\t\t\tevs = this._pre_render_events_table(evs, hold);\r\n\r\n\t\tif (this._table_view) {\r\n\t\t\tif (hold){\r\n\t\t\t\tthis._colsS.heights = h_old;\r\n\t\t\t} else {\r\n\t\t\t\tvar evl = data.firstChild;\r\n\t\t\t\tconst rows = evl.querySelectorAll(\".dhx_cal_month_row\");\r\n\t\t\t\tif (rows && rows.length) {\r\n\t\t\t\t\tfor (var i = 0; i < rows.length; i++) {\r\n\t\t\t\t\t\th[i]++;\r\n\r\n\t\t\t\t\t\tif ((h[i]) * hb > this._colsS.height - this.xy.month_head_height) { // 22 - height of cell's header\r\n\t\t\t\t\t\t\t//we have overflow, update heights\r\n\t\t\t\t\t\t\tvar cells = rows[i].querySelectorAll(\".dhx_cal_month_cell\");\r\n\r\n\t\t\t\t\t\t\tvar cHeight = this._colsS.height - this.xy.month_head_height;\r\n\t\t\t\t\t\t\tif(this.config.max_month_events*1 !== this.config.max_month_events || h[i] <= this.config.max_month_events){\r\n\t\t\t\t\t\t\t\tcHeight = h[i] * hb;\r\n\t\t\t\t\t\t\t}else if( (this.config.max_month_events + 1) * hb > this._colsS.height - this.xy.month_head_height){\r\n\t\t\t\t\t\t\t\tcHeight = (this.config.max_month_events + 1) * hb;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\trows[i].style.height = (cHeight + this.xy.month_head_height) + \"px\";\r\n\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\tfor (var j = 0; j < cells.length; j++) {\r\n\t\t\t\t\t\t\t\tcells[j].childNodes[1].style.height = cHeight + \"px\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\th[i] = (h[i - 1] || 0) + cells[0].offsetHeight;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\th[i] = (h[i - 1] || 0) + rows[i].querySelectorAll(\".dhx_cal_month_cell\")[0].offsetHeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t\th.unshift(0);\r\n\t\t\t\t\tif (evl.parentNode.offsetHeight < evl.parentNode.scrollHeight && !evl._h_fix) {\r\n\t\t\t\t\t\t//we have v-scroll, decrease last day cell\r\n\r\n\t\t\t\t\t\t// NO CHECK SHOULD BE MADE ON VERTICAL SCROLL\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!evs.length && this._els[\"dhx_multi_day\"][0].style.visibility == \"visible\")\r\n\t\t\t\t\t\th[0] = -1;\r\n\t\t\t\t\tif (evs.length || h[0] == -1) {\r\n\t\t\t\t\t\t//shift days to have space for multiday events\r\n\t\t\t\t\t\t//var childs = evl.parentNode.childNodes;\r\n\t\t\t\t\t\tvar dh = ((h[0] + 1) * hb + 1); // +1 so multiday events would have 2px from top and 2px from bottom by default\r\n\t\t\t\t\t\tif(multiday_height != dh + 1) {\r\n\t\t\t\t\t\t\tthis._obj.style.height = (total_height - multiday_height + dh - 1) + \"px\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tdh += \"px\";\r\n\t\t\t\t\t\tconst navHeight = this._els[\"dhx_cal_navline\"][0].offsetHeight;\r\n\t\t\t\t\t\tconst headerHeight = this._els[\"dhx_cal_header\"][0].offsetHeight;\r\n\t\t\t\t\t\tdata.style.height = (this._obj.offsetHeight - navHeight - headerHeight - (this.xy.margin_top || 0)) + 'px';\r\n\t\t\t\t\t\tvar last = this._els[\"dhx_multi_day\"][0];\r\n\t\t\t\t\t\tlast.style.height = dh;\r\n\t\t\t\t\t\tlast.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\t\tlast.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\t\t\t\t\t\tlast = this._els[\"dhx_multi_day\"][1];\r\n\t\t\t\t\t\tlast.style.height = dh;\r\n\t\t\t\t\t\tlast.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\t\tlast.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\r\n\t\t\t\t\t\tlast.className = h[0] ? \"dhx_multi_day_icon\" : \"dhx_multi_day_icon_small\";\r\n\t\t\t\t\t\tthis._dy_shift = (h[0] + 1) * hb;\r\n\t\t\t\t\t\th[0] = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn evs;\r\n\t};\r\n\r\n\tvar checked_divs = [\"dhx_cal_navline\", \"dhx_cal_header\", \"dhx_multi_day\", \"dhx_cal_data\"];\r\n\tvar updateContainterHeight = function(is_repaint) {\r\n\t\ttotal_height = 0;\r\n\t\tfor (var i = 0; i < checked_divs.length; i++) {\r\n\r\n\t\t\tvar className = checked_divs[i];\r\n\t\t\tvar checked_div = (scheduler._els[className]) ? scheduler._els[className][0] : null;\r\n\t\t\tvar height = 0;\r\n\t\t\tswitch (className) {\r\n\t\t\t\tcase \"dhx_cal_navline\":\r\n\t\t\t\tcase \"dhx_cal_header\":\r\n\t\t\t\t\theight = checked_div.offsetHeight;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"dhx_multi_day\":\r\n\t\t\t\t\theight = (checked_div) ? checked_div.offsetHeight - 1 : 0;\r\n\t\t\t\t\tmultiday_height = height;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"dhx_cal_data\":\r\n\t\t\t\t\tvar mode = scheduler.getState().mode;\r\n\r\n\t\t\t\t\tif(checked_div.childNodes[1] && mode != \"month\") {\r\n\t\t\t\t\t\tlet maxHeight = 0;\r\n\t\t\t\t\t\tfor(let i = 0; i < checked_div.childNodes.length; i++){\r\n\t\t\t\t\t\t\tif(checked_div.childNodes[i].offsetHeight > maxHeight){\r\n\t\t\t\t\t\t\t\tmaxHeight = checked_div.childNodes[i].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\theight = maxHeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\theight = Math.max(checked_div.offsetHeight - 1, checked_div.scrollHeight);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (mode == \"month\") {\r\n\t\t\t\t\t\tif (scheduler.config.month_day_min_height && !is_repaint) {\r\n\t\t\t\t\t\t\tvar rows_length = checked_div.querySelectorAll(\".dhx_cal_month_row\").length;\r\n\t\t\t\t\t\t\theight = rows_length * scheduler.config.month_day_min_height;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (is_repaint) {\r\n\t\t\t\t\t\t\tchecked_div.style.height = height + \"px\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (mode == \"year\"){\r\n\t\t\t\t\t\theight = 190 * scheduler.config.year_y;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(mode == \"agenda\"){\r\n\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\tif(checked_div.childNodes && checked_div.childNodes.length){\r\n\t\t\t\t\t\t\tfor(var j = 0; j < checked_div.childNodes.length; j++){\r\n\t\t\t\t\t\t\t\theight += checked_div.childNodes[j].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(height + 2 < scheduler.config.min_grid_size){\r\n\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (mode == \"week_agenda\"){\r\n\t\t\t\t\t\tvar min_height = scheduler.xy.week_agenda_scale_height + scheduler.config.min_grid_size,\r\n\t\t\t\t\t\t\tcur_height;\r\n\r\n\t\t\t\t\t\tvar column;\r\n\t\t\t\t\t\tfor(var k = 0; k < checked_div.childNodes.length; k++){\r\n\t\t\t\t\t\t\tcolumn = checked_div.childNodes[k];\r\n\t\t\t\t\t\t\tfor(var j = 0; j < column.childNodes.length; j++) {\r\n\t\t\t\t\t\t\t\tvar innerHeight = 0,\r\n\t\t\t\t\t\t\t\t\teventsContainer = column.childNodes[j].childNodes[1];\r\n\r\n\t\t\t\t\t\t\t\tfor(var g =0; g < eventsContainer.childNodes.length; g++){\r\n\t\t\t\t\t\t\t\t\tinnerHeight += eventsContainer.childNodes[g].offsetHeight;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tcur_height = innerHeight + scheduler.xy.week_agenda_scale_height;\r\n\t\t\t\t\t\t\t\tcur_height = (k == 1 && (j == 2 || j == 3)) ? cur_height * 2 : cur_height; // for last two cells;\r\n\r\n\t\t\t\t\t\t\t\tif (cur_height > min_height) {\r\n\t\t\t\t\t\t\t\t\tmin_height = cur_height;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\theight = min_height * 3;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(mode == \"map\") {\r\n\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\tvar evs = checked_div.querySelectorAll(\".dhx_map_line\");\r\n\r\n\t\t\t\t\t\tfor (var j = 0; j < evs.length; j++) {\r\n\t\t\t\t\t\t\theight += evs[j].offsetHeight;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (height + 2 < scheduler.config.min_map_size) {\r\n\t\t\t\t\t\t\theight = scheduler.config.min_map_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(scheduler._gridView) {\r\n\t\t\t\t\t\theight = 0;\r\n\r\n\t\t\t\t\t\tif (checked_div.childNodes[1].childNodes[0].childNodes && checked_div.childNodes[1].childNodes[0].childNodes.length) {\r\n\t\t\t\t\t\t\tvar evs = checked_div.childNodes[1].childNodes[0].childNodes[0].childNodes;\r\n\r\n\t\t\t\t\t\t\tfor (var j = 0; j < evs.length; j++) {\r\n\t\t\t\t\t\t\t\theight += evs[j].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\theight += 2;\r\n\r\n\t\t\t\t\t\t\tif(height < scheduler.config.min_grid_size){\r\n\t\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (scheduler.matrix && scheduler.matrix[mode]) {\r\n\t\t\t\t\t\tif (is_repaint) {\r\n\t\t\t\t\t\t\theight += 0;\r\n\t\t\t\t\t\t\tchecked_div.style.height = height + \"px\";\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\t\tvar cfg = scheduler.matrix[mode];\r\n\t\t\t\t\t\t\tvar rows = cfg.y_unit;\r\n\t\t\t\t\t\t\tfor(var r=0; r < rows.length; r++){\r\n\t\t\t\t\t\t\t\theight += cfg.getSectionHeight(rows[r].key);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// Check and add extra height to avoid events hiding by the horizontal scrollbar\r\n\t\t\t\t\t\t\tif(scheduler.$container.clientWidth != scheduler.$container.scrollWidth){\r\n\t\t\t\t\t\t\t\theight += getScrollSize();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\theight -= 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (mode == \"day\" || mode == \"week\" || (scheduler._props && scheduler._props[mode])) {\r\n\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\theight += 1;\r\n\t\t\ttotal_height += height;\r\n\t\t}\r\n\t\tscheduler._obj.style.height = (total_height) + \"px\";\r\n\r\n\t\tif (!is_repaint)\r\n\t\t\tscheduler.updateView();\r\n\t};\r\n\r\n\tfunction callUpdate(){\r\n\t\tactive = false;\r\n\t\tscheduler.callEvent(\"onAfterSchedulerResize\", []);\r\n\t\tactive = true;\r\n\t}\r\n\r\n\tvar conditionalUpdateContainerHeight = function() {\r\n\t\tif(!(scheduler.config.container_autoresize && active))\r\n\t\t\treturn true;\r\n\r\n\t\tvar mode = scheduler.getState().mode;\r\n\r\n\t\tif(!mode) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tvar asyncRepaint = window.requestAnimationFrame || window.setTimeout;\r\n\t\tvar scrollTop = document.documentElement.scrollTop;\r\n\r\n\t\tasyncRepaint(function() {\r\n\t\t\tif(scheduler.$destroyed || !scheduler.$initialized){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tupdateContainterHeight();\r\n\t\t});\r\n\r\n\t\tif ( (scheduler.matrix && scheduler.matrix[mode]) || mode == \"month\") {\r\n\t\t\tasyncRepaint(function() {\r\n\t\t\t\tif(scheduler.$destroyed || !scheduler.$initialized){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tupdateContainterHeight(true);\r\n\t\t\t\tdocument.documentElement.scrollTop = scrollTop;\r\n\t\t\t\tcallUpdate();\r\n\t\t\t}, 1);\r\n\t\t}else{\r\n\t\t\tcallUpdate();\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function(){\r\n\t\tvar autosizeEnabled = scheduler.config.container_autoresize;\r\n\t\tif(!scheduler.xy.$original_scroll_width){\r\n\t\t\tscheduler.xy.$original_scroll_width = scheduler.xy.scroll_width;\r\n\t\t}\r\n\r\n\t\tscheduler.xy.scroll_width = autosizeEnabled ? 0 : scheduler.xy.$original_scroll_width;\r\n\r\n\t\tif(scheduler.matrix){\r\n\t\t\tfor(var i in scheduler.matrix){\r\n\t\t\t\tvar timeline = scheduler.matrix[i];\r\n\t\t\t\tif(!timeline.$original_section_autoheight){\r\n\t\t\t\t\ttimeline.$original_section_autoheight = timeline.section_autoheight;\r\n\t\t\t\t}\r\n\t\t\t\tif(autosizeEnabled){\r\n\t\t\t\t\ttimeline.section_autoheight = false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\ttimeline.section_autoheight = timeline.$original_section_autoheight;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onXLE\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventChanged\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventCreated\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventAdded\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventDeleted\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onAfterSchedulerResize\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onClearAll\", conditionalUpdateContainerHeight);\r\n\r\n\t//disable container autoresize when expanded\r\n\tscheduler.attachEvent(\"onBeforeExpand\", function(){\r\n\t\tactive = false;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeCollapse\", function(){\r\n\t\tactive = true;\r\n\t\treturn true;\r\n\t});\r\n\t// helper function\r\n\tfunction getScrollSize() {\r\n\t\tvar div = document.createElement(\"div\");\r\n\t\tdiv.style.cssText = \"visibility:hidden;position:absolute;left:-1000px;width:100px;padding:0px;margin:0px;height:110px;min-height:100px;overflow-y:scroll;\";\r\n\r\n\t\tdocument.body.appendChild(div);\r\n\t\tvar size = div.offsetWidth - div.clientWidth;\r\n\t\tdocument.body.removeChild(div);\r\n\t\treturn size;\r\n\t}\r\n\r\n\r\n}","export default function(scheduler){\r\n\tfunction setCookie(name,cookie_param,value) {\r\n\t\tvar str = name + \"=\" + value + (cookie_param?(\"; \"+cookie_param):\"\");\r\n\t\tdocument.cookie = str;\r\n\t}\r\n\tfunction getCookie(name) {\r\n\t\tvar search = name + \"=\";\r\n\t\tif (document.cookie.length > 0) {\r\n\t\t\tvar offset = document.cookie.indexOf(search);\r\n\t\t\tif (offset != -1) {\r\n\t\t\t\toffset += search.length;\r\n\t\t\t\tvar end = document.cookie.indexOf(\";\", offset);\r\n\t\t\t\tif (end == -1)\r\n\t\t\t\t\tend = document.cookie.length;\r\n\t\t\t\treturn document.cookie.substring(offset, end);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}\r\n\r\n\tfunction getCookieName(scheduler) {\r\n\t\treturn (scheduler._obj.id || \"scheduler\") + \"_settings\";\r\n\t}\r\n\r\n\tvar first = true;\r\n\tscheduler.attachEvent(\"onBeforeViewChange\",function(oldMode,oldDate,mode,date){\r\n\t\t// if Url plugin is enabled - explicit url values should have more priority than cookies\r\n\t\tif (first && scheduler._get_url_nav){\r\n\t\t\tvar urlNavigationPlugin = scheduler._get_url_nav();\r\n\t\t\tif(urlNavigationPlugin.date || urlNavigationPlugin.mode || urlNavigationPlugin.event){\r\n\t\t\t\tfirst = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar cookie = getCookieName(scheduler);\r\n\r\n\t\tif (first){\r\n\t\t\tfirst = false;\r\n\t\t\tvar schedulerCookie = getCookie(cookie);\r\n\t\t\tif (schedulerCookie){\r\n\r\n\t\t\t\tif(!scheduler._min_date){\r\n\t\t\t\t\t//otherwise scheduler will have incorrect date until timeout\r\n\t\t\t\t\t//it can cause js error with 'onMouseMove' handler of key_nav.js\r\n\t\t\t\t\tscheduler._min_date = date;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tschedulerCookie = unescape(schedulerCookie).split(\"@\");\r\n\t\t\t\tschedulerCookie[0] = this._helpers.parseDate(schedulerCookie[0]);\r\n\t\t\t\tvar view = this.isViewExists(schedulerCookie[1]) ? schedulerCookie[1] : mode,\r\n\t\t\t\t\tdate = !isNaN(+schedulerCookie[0]) ? schedulerCookie[0] : date;\r\n\r\n\t\t\t\twindow.setTimeout(function(){\r\n\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tscheduler.setCurrentView(date,view);\r\n\t\t\t\t},1);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", function (newMode , newDate){\r\n\t\tvar cookie = getCookieName(scheduler);\r\n\t\tvar text = escape(this._helpers.formatDate(newDate)+\"@\"+(newMode));\r\n\t\tsetCookie(cookie,\"expires=Sun, 31 Jan 9999 22:00:00 GMT\",text);\r\n\t});\r\n\r\n\t// As we are blocking first render above there could be a problem in case of dynamic loading and rendering of visible data in general ('from'/'to' won't be defined)\r\n\tvar old_load = scheduler._load;\r\n\tscheduler._load = function() {\r\n\t\tvar args = arguments;\r\n\r\n\t\tif (!scheduler._date) {\r\n\t\t\tvar that = this;\r\n\t\t\twindow.setTimeout(function() {\r\n\t\t\t\told_load.apply(that, args);\r\n\t\t\t},1);\r\n\t\t} else {\r\n\t\t\told_load.apply(this, args);\r\n\t\t}\r\n\t};\r\n}","export default {\r\n\talert: (extension, assert) => {\r\n\t\tassert(false, `The ${extension} extension is not included in this version of dhtmlxScheduler.
\r\n\t\tYou may need a Professional version of the component.
\r\n\t\tContact us at https://dhtmlx.com/docs/contact.shtml if you have any questions.`);\r\n\t}\r\n};","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Day Timeline\", scheduler.assert);\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Drag Between\", scheduler.assert);\r\n}","export default function(scheduler){\r\n/* global dhtmlXCombo */\r\nscheduler.form_blocks['combo']={\r\n\trender:function(sns) {\r\n\t\tif (!sns.cached_options)\r\n\t\t\tsns.cached_options = {};\r\n\t\tvar res = '';\r\n\t\tres += \"
\";\r\n\t\treturn res;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\t(function(){\r\n\t\t\tresetCombo();\r\n\t\t\tvar id = scheduler.attachEvent(\"onAfterLightbox\",function(){\r\n\t\t\t\t// otherwise destructor will never be called after form reset(e.g. in readonly event mode)\r\n\t\t\t\tresetCombo();\r\n\t\t\t\tscheduler.detachEvent(id);\r\n\t\t\t});\r\n\t\t\tfunction resetCombo(){\r\n\t\t\t\tif(node._combo && node._combo.DOMParent) {\r\n\t\t\t\t\tvar combo = node._combo;\r\n\t\t\t\t\tif(combo.unload){\r\n\t\t\t\t\t\tcombo.unload();\r\n\t\t\t\t\t}else if(combo.destructor){\r\n\t\t\t\t\t\tcombo.destructor();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// dhtmlxCombo 4.1.0 bug\r\n\t\t\t\t\tcombo.DOMParent = combo.DOMelem = null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})();\r\n\t\twindow.dhx_globalImgPath = config.image_path||'/';\r\n\t\tnode._combo = new dhtmlXCombo(node, config.name, node.offsetWidth-8);\r\n\t\tif (config.onchange)\r\n\t\t\tnode._combo.attachEvent(\"onChange\", config.onchange);\r\n\r\n\t\tif (config.options_height)\r\n\t\t\tnode._combo.setOptionHeight(config.options_height);\r\n\t\tvar combo = node._combo;\r\n\t\tcombo.enableFilteringMode(config.filtering, config.script_path||null, !!config.cache);\r\n\r\n\t\tif (!config.script_path) { // script-side filtration is used\r\n\t\t\tvar all_options = [];\r\n\t\t\tfor (var i = 0; i < config.options.length; i++) {\r\n\t\t\t\tvar option = config.options[i];\r\n\t\t\t\tvar single_option = [\r\n\t\t\t\t\toption.key,\r\n\t\t\t\t\toption.label,\r\n\t\t\t\t\toption.css\r\n\t\t\t\t];\r\n\t\t\t\tall_options.push(single_option);\r\n\t\t\t}\r\n\t\t\tcombo.addOption(all_options);\r\n\t\t\tif (ev[config.map_to]) {\r\n\t\t\t\tvar index = combo.getIndexByValue(ev[config.map_to]);\r\n\t\t\t\tcombo.selectOption(index);\r\n\t\t\t}\r\n\t\t} else { // server-side filtration is used\r\n\t\t\tvar selected_id = ev[config.map_to];\r\n\t\t\tif (selected_id) {\r\n\t\t\t\tif (config.cached_options[selected_id]) {\r\n\t\t\t\t\tcombo.addOption(selected_id, config.cached_options[selected_id]);\r\n\t\t\t\t\tcombo.disable(1);\r\n\t\t\t\t\tcombo.selectOption(0);\r\n\t\t\t\t\tcombo.disable(0);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tscheduler.ajax.get(config.script_path+\"?id=\"+selected_id+\"&uid=\"+scheduler.uid(), function(result){\r\n\t\t\t\t\t\tvar responseText = result.xmlDoc.responseText;\r\n\t\t\t\t\t\tvar label;\r\n\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\tvar res = JSON.parse(responseText);\r\n\t\t\t\t\t\t\tlabel = res.options[0].text;\r\n\t\t\t\t\t\t}catch(e){\r\n\t\t\t\t\t\t\tvar option = scheduler.ajax.xpath(\"//option\", result.xmlDoc)[0];\r\n\t\t\t\t\t\t\tlabel = option.childNodes[0].nodeValue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tconfig.cached_options[selected_id] = label;\r\n\t\t\t\t\t\tcombo.addOption(selected_id, label);\r\n\t\t\t\t\t\tcombo.disable(1);\r\n\t\t\t\t\t\tcombo.selectOption(0);\r\n\t\t\t\t\t\tcombo.disable(0);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tcombo.setComboValue(\"\");\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config) {\r\n\t\tvar selected_id = node._combo.getSelectedValue(); // value = key\r\n\t\tif (config.script_path) {\r\n\t\t\tconfig.cached_options[selected_id] = node._combo.getSelectedText();\r\n\t\t}\r\n\t\treturn selected_id;\r\n\t},\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\nscheduler.form_blocks['radio']={\r\n\trender:function(sns) {\r\n\t\tvar res = '';\r\n\t\tres += `
`;\r\n\t\tfor (var i=0; i\"+\" \"+sns.options[i].label+\"\";\r\n\t\t}\r\n\t\tres += \"
\";\r\n\r\n\t\treturn res;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\tvar radiobuttons = node.getElementsByTagName('input');\r\n\t\tfor (var i = 0; i < radiobuttons.length; i++) {\r\n\t\t\tradiobuttons[i].checked = false;\r\n\t\t\tvar checked_value = ev[config.map_to]||value;\r\n\t\t\tif (radiobuttons[i].value == checked_value) {\r\n\t\t\t\tradiobuttons[i].checked = true;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tvar radiobuttons = node.getElementsByTagName('input');\r\n\t\tfor(var i=0; i
';\r\n\t\telse\r\n\t\t\treturn '';\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\tnode=scheduler._lightbox.querySelector(`#${config.id}`);\r\n\t\tvar id = scheduler.uid();\r\n\t\tvar isChecked = (typeof config.checked_value != \"undefined\") ? value == config.checked_value : !!value;\r\n\t\tnode.className += \" dhx_cal_checkbox\";\r\n\t\tvar check_html = \"\";\r\n\t\tvar label_html = \"\";\r\n\t\tif (scheduler.config.wide_form){\r\n\t\t\tnode.innerHTML = label_html;\r\n\t\t\tnode.nextSibling.innerHTML=check_html;\r\n\t\t} else\r\n\t\t\tnode.innerHTML=check_html+label_html;\r\n\r\n\t\tif (config.handler) {\r\n\t\t\tvar checkbox = node.getElementsByTagName('input')[0];\r\n\t\t\tif(checkbox.$_eventAttached){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tcheckbox.$_eventAttached = true;\r\n\t\t\tscheduler.event(checkbox, \"click\", config.handler);\r\n\t\t\t//checkbox.onclick = config.handler;\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tnode=scheduler._lightbox.querySelector(`#${config.id}`);\r\n\t\tvar checkbox = node.getElementsByTagName('input')[0]; // moved to the header\r\n\t\tif (!checkbox)\r\n\t\t\tcheckbox = node.nextSibling.getElementsByTagName('input')[0];\r\n\t\treturn (checkbox.checked)?(config.checked_value||true):(config.unchecked_value||false);\r\n\t},\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.ext.fullscreen = {\r\n\ttoggleIcon: null\r\n};\r\n\r\nscheduler.expand = function() {\r\n\tif(!scheduler.callEvent(\"onBeforeExpand\", []))\r\n\t\treturn;\r\n\tvar t = scheduler._obj;\r\n\tdo {\r\n\t\tt._position = t.style.position || \"\";\r\n\t\tt.style.position = \"static\";\r\n\t} while ((t = t.parentNode) && t.style);\r\n\tt = scheduler._obj;\r\n\tt.style.position = \"absolute\";\r\n\tt._width = t.style.width;\r\n\tt._height = t.style.height;\r\n\tt.style.width = t.style.height = \"100%\";\r\n\tt.style.top = t.style.left = \"0px\";\r\n\r\n\tvar top = document.body;\r\n\ttop.scrollTop = 0;\r\n\r\n\ttop = top.parentNode;\r\n\tif (top)\r\n\t\ttop.scrollTop = 0;\r\n\tdocument.body._overflow = document.body.style.overflow || \"\";\r\n\tdocument.body.style.overflow = \"hidden\";\r\n\tscheduler._maximize();\r\n\tscheduler.callEvent(\"onExpand\", []);\r\n};\r\nscheduler.collapse = function() {\r\n\tif(!scheduler.callEvent(\"onBeforeCollapse\", []))\r\n\t\treturn;\r\n\tvar t = scheduler._obj;\r\n\tdo {\r\n\t\tt.style.position = t._position;\r\n\t} while ((t = t.parentNode) && t.style);\r\n\tt = scheduler._obj;\r\n\tt.style.width = t._width;\r\n\tt.style.height = t._height;\r\n\tdocument.body.style.overflow = document.body._overflow;\r\n\tscheduler._maximize();\r\n\tscheduler.callEvent(\"onCollapse\", []);\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar t = document.createElement(\"div\");\r\n\tt.className = \"dhx_expand_icon\";\r\n\tscheduler.ext.fullscreen.toggleIcon = t;\r\n\tt.innerHTML = `\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t`;\r\n\tscheduler._obj.appendChild(t);\r\n\tscheduler.event(t, \"click\", function() {\r\n\t\tif (!scheduler.expanded)\r\n\t\t\tscheduler.expand(); else\r\n\t\t\tscheduler.collapse();\r\n\t});\r\n});\r\nscheduler._maximize = function() {\r\n\tthis.expanded = !this.expanded;\r\n\tif(this.expanded){\r\n\t\tthis.ext.fullscreen.toggleIcon.classList.add(\"dhx_expand_icon--expanded\");\r\n\t\t\r\n\t}else{\r\n\t\tthis.ext.fullscreen.toggleIcon.classList.remove(\"dhx_expand_icon--expanded\");\r\n\t}\r\n\t\r\n\t//scheduler.ext.fullscreen.toggleIcon.style.backgroundPosition = \"0 \" + (this.expanded ? \"0\" : \"18\") + \"px\";\r\n\r\n\tvar directions = ['left', 'top'];\r\n\tfor (var i = 0; i < directions.length; i++) {\r\n\t\t//var margin = scheduler.xy['margin_' + directions[i]];\r\n\t\tvar prev_margin = scheduler['_prev_margin_' + directions[i]];\r\n\t\tif (scheduler.xy['margin_' + directions[i]]) {\r\n\t\t\tscheduler['_prev_margin_' + directions[i]] = scheduler.xy['margin_' + directions[i]];\r\n\t\t\tscheduler.xy['margin_' + directions[i]] = 0;\r\n\t\t} else {\r\n\t\t\tif (prev_margin) {\r\n\t\t\t\tscheduler.xy['margin_' + directions[i]] = scheduler['_prev_margin_' + directions[i]];\r\n\t\t\t\tdelete scheduler['_prev_margin_' + directions[i]];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.setCurrentView();\r\n};\r\n\r\n\r\n}\r\n","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Grid\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\tvar els = document.body.getElementsByTagName(\"DIV\");\r\n\tfor (var i=0; i < els.length; i++) {\r\n\t\tvar cs = els[i].className||\"\";\r\n\t\tcs = cs.split(\":\");\r\n\t\tif (cs.length == 2 && cs[0] == \"template\"){\r\n\t\t\tvar code = \"return \\\"\"+(els[i].innerHTML||\"\").replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g,\"\\\\\\\"\").replace(/[\\n\\r]+/g,\"\")+\"\\\";\";\r\n\t\t\tcode = unescape(code).replace(/\\{event\\.([a-z]+)\\}/g,function(all,mask){\r\n\t\t\t\treturn '\"+ev.'+mask+'+\"';\r\n\t\t\t});\r\n\t\t\tscheduler.templates[cs[1]]=Function(\"start\",\"end\",\"ev\",code);\r\n\t\t\tels[i].style.display='none';\r\n\t\t}\r\n\t}\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.shortcuts = {\r\n\tcreateCommand: function(){\r\n\t\treturn {\r\n\t\t\tmodifiers:{\r\n\t\t\t\t\"shift\": false,\r\n\t\t\t\t\"alt\": false,\r\n\t\t\t\t\"ctrl\": false,\r\n\t\t\t\t\"meta\": false\r\n\t\t\t},\r\n\t\t\tkeyCode: null\r\n\t\t};\r\n\t},\r\n\tparse: function(shortcut){\r\n\t\tvar commands = [];\r\n\r\n\t\tvar expr = this.getExpressions(this.trim(shortcut));\r\n\t\tfor(var i = 0; i < expr.length; i++){\r\n\t\t\tvar words = this.getWords(expr[i]);\r\n\r\n\t\t\tvar command = this.createCommand();\r\n\r\n\t\t\tfor(var j = 0; j < words.length; j++){\r\n\t\t\t\tif(this.commandKeys[words[j]]){\r\n\t\t\t\t\tcommand.modifiers[words[j]] = true;\r\n\t\t\t\t}else if(this.specialKeys[words[j]]){\r\n\t\t\t\t\tcommand.keyCode = this.specialKeys[words[j]];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcommand.keyCode = words[j].charCodeAt(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tcommands.push(command);\r\n\t\t}\r\n\t\treturn commands;\r\n\t},\r\n\r\n\tgetCommandFromEvent: function(domEvent){\r\n\t\tvar command = this.createCommand();\r\n\t\tcommand.modifiers.shift = !!domEvent.shiftKey;\r\n\t\tcommand.modifiers.alt = !!domEvent.altKey;\r\n\t\tcommand.modifiers.ctrl = !!domEvent.ctrlKey;\r\n\t\tcommand.modifiers.meta = !!domEvent.metaKey;\r\n\t\tcommand.keyCode = domEvent.which || domEvent.keyCode;\r\n\r\n\t\tif(command.keyCode >= 96 && command.keyCode <= 105){\r\n\t\t\t// numpad keys 96-105 -> 48-57\r\n\t\t\tcommand.keyCode -= 48;//convert numpad number code to regular number code\r\n\t\t}\r\n\r\n\t\tvar printableKey = String.fromCharCode(command.keyCode );\r\n\t\tif(printableKey){\r\n\t\t\tcommand.keyCode = printableKey.toLowerCase().charCodeAt(0);\r\n\t\t}\r\n\t\treturn command;\r\n\t},\r\n\r\n\tgetHashFromEvent: function(domEvent){\r\n\t\treturn this.getHash(this.getCommandFromEvent(domEvent));\r\n\t},\r\n\r\n\tgetHash: function(command){\r\n\t\tvar parts = [];\r\n\t\tfor(var i in command.modifiers){\r\n\t\t\tif(command.modifiers[i]){\r\n\t\t\t\tparts.push(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tparts.push(command.keyCode);\r\n\r\n\t\treturn parts.join(this.junctionChar);\r\n\t},\r\n\r\n\tgetExpressions: function(shortcut){\r\n\t\treturn shortcut.split(this.junctionChar);\r\n\t},\r\n\tgetWords: function(term){\r\n\t\treturn term.split(this.combinationChar);\r\n\t},\r\n\ttrim: function(shortcut){\r\n\t\treturn shortcut.replace(/\\s/g, \"\");\r\n\t},\r\n\tjunctionChar:\",\",\r\n\tcombinationChar:\"+\",\r\n\tcommandKeys:{\r\n\t\t\"shift\": 16,\r\n\t\t\"alt\": 18,\r\n\t\t\"ctrl\": 17,\r\n\t\t\"meta\": true\r\n\t},\r\n\tspecialKeys:{\r\n\t\t\"backspace\": 8,\r\n\t\t\"tab\": 9,\r\n\t\t\"enter\": 13,\r\n\t\t\"esc\": 27,\r\n\t\t\"space\": 32,\r\n\t\t\"up\": 38,\r\n\t\t\"down\": 40,\r\n\t\t\"left\": 37,\r\n\t\t\"right\": 39,\r\n\t\t\"home\": 36,\r\n\t\t\"end\": 35,\r\n\t\t\"pageup\": 33,\r\n\t\t\"pagedown\": 34,\r\n\t\t\"delete\": 46,\r\n\t\t\"insert\": 45,\r\n\t\t\"plus\":107,\r\n\t\t\"f1\": 112,\r\n\t\t\"f2\": 113,\r\n\t\t\"f3\": 114,\r\n\t\t\"f4\": 115,\r\n\t\t\"f5\": 116,\r\n\t\t\"f6\": 117,\r\n\t\t\"f7\": 118,\r\n\t\t\"f8\": 119,\r\n\t\t\"f9\": 120,\r\n\t\t\"f10\": 121,\r\n\t\t\"f11\": 122,\r\n\t\t\"f12\": 123\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.EventHandler = {\r\n\t_handlers: null,\r\n\tfindHandler: function(command){\r\n\t\tif(!this._handlers) this._handlers = {};\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\t\tvar hash = shortcuts.getHash(command);\r\n\r\n\t\treturn this._handlers[hash];\r\n\t},\r\n\r\n\tdoAction: function(command, e){\r\n\t\tvar handler = this.findHandler(command);\r\n\t\tif(handler){\r\n\t\t\thandler.call(this, e);\r\n\r\n\t\t\tif (e.preventDefault) e.preventDefault();\r\n\t\t\telse e.returnValue = false;\r\n\r\n\t\t}\r\n\t},\r\n\tbind: function(shortcut, handler){\r\n\t\tif(!this._handlers) this._handlers = {};\r\n\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\r\n\t\tvar commands = shortcuts.parse(shortcut);\r\n\t\tfor(var i = 0; i < commands.length; i++){\r\n\t\t\tthis._handlers[shortcuts.getHash(commands[i])] = handler;\r\n\t\t}\r\n\t},\r\n\tunbind: function(shortcut){\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\r\n\t\tvar commands = shortcuts.parse(shortcut);\r\n\t\tfor(var i = 0; i < commands.length; i++){\r\n\t\t\tif(this._handlers[shortcuts.getHash(commands[i])]){\r\n\t\t\t\tdelete this._handlers[shortcuts.getHash(commands[i])];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tbindAll: function(map){\r\n\t\tfor(var i in map){\r\n\t\t\tthis.bind(i, map[i]);\r\n\t\t}\r\n\t},\r\n\tinitKeys: function(){\r\n\t\tif(!this._handlers)\r\n\t\t\tthis._handlers = {};\r\n\t\tif(this.keys){\r\n\t\t\tthis.bindAll(this.keys);\r\n\t\t}\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n(function(){\r\n\tscheduler.$keyboardNavigation.getFocusableNodes = scheduler._getFocusableNodes;\r\n\r\n\tscheduler.$keyboardNavigation.trapFocus = function trapFocus(root, e){\r\n\t\tif(e.keyCode != 9) return false;\r\n\r\n\t\tvar focusable = scheduler.$keyboardNavigation.getFocusableNodes(root);\r\n\t\tvar currentFocus = document.activeElement;\r\n\t\tvar currentIndex = -1;\r\n\t\tfor(var i = 0; i < focusable.length; i++){\r\n\t\t\tif(focusable[i] == currentFocus){\r\n\t\t\t\tcurrentIndex = i;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar nextIndex, nextItem;\r\n\t\tif(e.shiftKey){\r\n\r\n\t\t\t// back tab\r\n\t\t\t// go to the last element if we focused on the first\r\n\t\t\tnextIndex = (currentIndex <= 0) ? (focusable.length - 1) : (currentIndex - 1);\r\n\r\n\t\t\tnextItem = focusable[nextIndex];\r\n\t\t\tif(nextItem){\r\n\t\t\t\tnextItem.focus();\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\t// forward tab\r\n\t\t\t// forward tab from last element should go back to the first element\r\n\t\t\tnextIndex = (currentIndex >= focusable.length - 1) ? 0 : (currentIndex + 1);\r\n\t\t\tnextItem = focusable[nextIndex];\r\n\t\t\tif(nextItem){\r\n\t\t\t\tnextItem.focus();\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t};\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.marker = {\r\n\tclear: function(){\r\n\t\tvar divs = scheduler.$container.querySelectorAll(\".dhx_focus_slot\");\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tdivs[i].parentNode.removeChild(divs[i]);\r\n\t\t}\r\n\t},\r\n\tcreateElement: function(){\r\n\t\tvar element = document.createElement(\"div\");\r\n\t\telement.setAttribute(\"tabindex\", -1);\r\n\t\telement.className = \"dhx_focus_slot\";\r\n\t\treturn element;\r\n\t},\r\n\r\n\trenderMultiple: function(start, end, method){\r\n\t\tvar divs = [];\r\n\t\tvar currentStart = new Date(start);\r\n\t\tvar currentEnd = new Date(Math.min(end.valueOf(), scheduler.date.add(scheduler.date.day_start(new Date(start)), 1, \"day\").valueOf()));\r\n\t\twhile(currentStart.valueOf() < end.valueOf()){\r\n\r\n\t\t\tdivs = divs.concat(method.call(this, currentStart, new Date(Math.min(currentEnd.valueOf(), end.valueOf()))));\r\n\t\t\tcurrentStart = scheduler.date.day_start(scheduler.date.add(currentStart, 1, \"day\"));\r\n\r\n\t\t\tcurrentEnd = scheduler.date.day_start(scheduler.date.add(currentStart, 1, \"day\"));\r\n\t\t\tcurrentEnd = new Date(Math.min(currentEnd.valueOf(), end.valueOf()));\r\n\t\t}\r\n\r\n\t\treturn divs;\r\n\t},\r\n\r\n\r\n\trender: function(start, end, section){\r\n\t\tthis.clear();\r\n\t\tvar divs = [];\r\n\r\n\t\tvar modes = scheduler.$keyboardNavigation.TimeSlot.prototype._modes;\r\n\t\tvar view = scheduler.$keyboardNavigation.TimeSlot.prototype._getMode();\r\n\t\tswitch (view){\r\n\t\t\tcase modes.units:\r\n\t\t\t\tdivs = this.renderVerticalMarker(start, end, section);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.timeline:\r\n\t\t\t\tdivs = this.renderTimelineMarker(start, end, section);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.year:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderYearMarker));\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.month:\r\n\t\t\t\tdivs = this.renderMonthMarker(start, end);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.weekAgenda:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderWeekAgendaMarker));\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.list:\r\n\t\t\t\tdivs = this.renderAgendaMarker(start, end);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.dayColumns:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderVerticalMarker));\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tthis.addWaiAriaLabel(divs, start, end, section);\r\n\t\tthis.addDataAttributes(divs, start, end, section);\r\n\r\n\t\tfor(var i = divs.length - 1; i >= 0; i--){\r\n\t\t\tif(divs[i].offsetWidth){\r\n\t\t\t\treturn divs[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t},\r\n\r\n\taddDataAttributes: function(divs, start, end, section){\r\n\t\tvar dateToStr = scheduler.date.date_to_str(scheduler.config.api_date);\r\n\r\n\t\tvar from = dateToStr(start),\r\n\t\t\tto = dateToStr(end);\r\n\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tdivs[i].setAttribute(\"data-start-date\", from);\r\n\t\t\tdivs[i].setAttribute(\"data-end-date\", to);\r\n\t\t\tif(section){\r\n\t\t\t\tdivs[i].setAttribute(\"data-section\", section);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\taddWaiAriaLabel: function(divs, start, end, section){\r\n\t\tvar label = \"\";\r\n\t\tvar state = scheduler.getState();\r\n\t\tvar mode = state.mode;\r\n\r\n\t\tvar dateTimeLabel = false;\r\n\r\n\t\tlabel += scheduler.templates.day_date(start);\r\n\r\n\t\tif((scheduler.date.day_start(new Date(start)).valueOf() != start.valueOf())){\r\n\t\t\tlabel += \" \" + scheduler.templates.hour_scale(start);\r\n\t\t\tdateTimeLabel = true;\r\n\t\t}\r\n\r\n\t\tif((scheduler.date.day_start(new Date(start)).valueOf() != scheduler.date.day_start(new Date(end)).valueOf())){\r\n\r\n\t\t\tlabel += \" - \" + scheduler.templates.day_date(end);\r\n\t\t\tif(dateTimeLabel || (scheduler.date.day_start(new Date(end)).valueOf() != end.valueOf())){\r\n\t\t\t\tlabel += \" \" + scheduler.templates.hour_scale(end);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(section){\r\n\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\t\t\t\tconst timeline = scheduler.matrix[mode];\r\n\t\t\t\tconst sectionObject = timeline.y_unit[timeline.order[section]];\r\n\t\t\t\tlabel += \", \" + scheduler.templates[mode + \"_scale_label\"](sectionObject.key, sectionObject.label, sectionObject);\r\n\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\tconst units = scheduler._props[mode];\r\n\t\t\t\tconst sectionObject = units.options[units.order[section]];\r\n\r\n\t\t\t\tlabel += \", \" + scheduler.templates[mode + \"_scale_text\"](sectionObject.key, sectionObject.label, sectionObject);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tscheduler._waiAria.setAttributes(divs[i], {\r\n\t\t\t\t\"aria-label\": label,\r\n\t\t\t\t\"aria-live\": \"polite\"\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\trenderWeekAgendaMarker: function(start_date, end_date){\r\n\t\tvar divs = scheduler.$container.querySelectorAll(\".dhx_wa_day_cont .dhx_wa_scale_bar\");\r\n\r\n\t\tvar currDate = scheduler.date.week_start(new Date(scheduler.getState().min_date));\r\n\r\n\t\tvar index = -1;\r\n\t\tvar markerDate = scheduler.date.day_start(new Date(start_date));\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tindex++;\r\n\t\t\tif(scheduler.date.day_start(new Date(currDate)).valueOf() == markerDate.valueOf()){\r\n\t\t\t\tbreak;\r\n\t\t\t}else{\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(index != -1) return this._wrapDiv(divs[index]);\r\n\t\treturn [];\r\n\t},\r\n\r\n\t_wrapDiv: function(cell){\r\n\t\tvar marker = this.createElement();\r\n\t\tmarker.style.top = cell.offsetTop + \"px\";\r\n\t\tmarker.style.left = cell.offsetLeft + \"px\";\r\n\t\tmarker.style.width = cell.offsetWidth + \"px\";\r\n\t\tmarker.style.height = cell.offsetHeight + \"px\";\r\n\t\tcell.appendChild(marker);\r\n\t\treturn [marker];\r\n\t},\r\n\trenderYearMarker: function(start_date, end_date){\r\n\t\tvar cell = scheduler._get_year_cell(start_date);\r\n\t\tcell.style.position = \"relative\";\r\n\t\tvar marker = this.createElement();\r\n\t\tmarker.style.top = \"0px\";\r\n\t\tmarker.style.left = \"0px\";\r\n\t\tmarker.style.width = \"100%\";\r\n\t\tmarker.style.height = \"100%\";\r\n\t\tcell.appendChild(marker);\r\n\t\treturn [marker];\r\n\t},\r\n\r\n\trenderAgendaMarker: function(start_date, end_date){\r\n\t\tvar block = this.createElement();\r\n\t\tblock.style.height = \"1px\";\r\n\t\tblock.style.width = \"100%\";\r\n\t\tblock.style.opacity = 1;\r\n\t\tblock.style.top = \"0px\";\r\n\t\tblock.style.left = \"0px\";\r\n\t\tscheduler.$container.querySelector(\".dhx_cal_data\").appendChild(block);\r\n\t\treturn [block];\r\n\t},\r\n\r\n\trenderTimelineMarker: function(start_date, end_date, section){\r\n\t\tvar view_opts = scheduler._lame_copy({}, scheduler.matrix[scheduler._mode]);\r\n\t\tvar areas = view_opts._scales;\r\n\t\t//timespans must always use actual position, not rounded\r\n\t\tview_opts.round_position = false;\r\n\t\tvar blocks = [];\r\n\r\n\t\tvar min_date = start_date ? new Date(start_date) : scheduler._min_date;\r\n\t\tvar max_date = end_date ? new Date(end_date) : scheduler._max_date;\r\n\r\n\t\tif(min_date.valueOf() < scheduler._min_date.valueOf())\r\n\t\t\tmin_date = new Date(scheduler._min_date);\r\n\t\tif(max_date.valueOf() > scheduler._max_date.valueOf())\r\n\t\t\tmax_date = new Date(scheduler._max_date);\r\n\r\n\t\tif(!view_opts._trace_x) return blocks;\r\n\r\n\t\tfor(var i = 0; i < view_opts._trace_x.length; i++){\r\n\t\t\tif(scheduler._is_column_visible(view_opts._trace_x[i]))\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\tif(i == view_opts._trace_x.length)\r\n\t\t\treturn blocks;\r\n\r\n\t\tvar area = areas[section];\r\n\r\n\t\tif (!(min_date < end_date && max_date > start_date))\r\n\t\t\treturn blocks;\r\n\r\n\t\tvar block = this.createElement();\r\n\r\n\t\tlet start_pos;\r\n\t\tlet end_pos;\r\n\r\n\t\tfunction set_date_part(source, target) {\r\n\t\t\t// reset to start of the month in order to prevent month change when target is on 31th day, and source month has only 30 days\r\n\t\t\ttarget.setDate(1);\r\n\r\n\t\t\ttarget.setFullYear(source.getFullYear());\r\n\t\t\ttarget.setMonth(source.getMonth());\r\n\t\t\ttarget.setDate(source.getDate());\r\n\t\t}\r\n\r\n\t\tif(!scheduler.getView().days){\r\n\t\t\tstart_pos = scheduler._timeline_getX({start_date: start_date}, false, view_opts);\r\n\t\t\tend_pos = scheduler._timeline_getX({start_date: end_date}, false, view_opts);\r\n\t\t}else{\r\n\t\t\t// daytimeline\r\n\t\t\tconst tempStart = new Date(start_date);\r\n\t\t\tset_date_part(scheduler._min_date, tempStart);\r\n\t\t\tconst tempEnd = new Date(end_date);\r\n\t\t\tset_date_part(scheduler._min_date, tempEnd);\r\n\t\t\tstart_pos = scheduler._timeline_getX({start_date: tempStart}, false, view_opts);\r\n\t\t\tend_pos = scheduler._timeline_getX({start_date: tempEnd}, false, view_opts);\r\n\t\t}\r\n\r\n\t\tvar height = ((view_opts._section_height[section]-1) || (view_opts.dy - 1));\r\n\r\n\t\tvar top = 0;\r\n\t\tif (scheduler._isRender('cell')){\r\n\t\t\ttop = area.offsetTop;\r\n\t\t\tstart_pos += view_opts.dx;\r\n\t\t\tend_pos += view_opts.dx;\r\n\t\t\tarea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t}else{\r\n\r\n\t\t}\r\n\t\tvar width = Math.max(1, end_pos - start_pos - 1);\r\n\t\tlet direction = \"left\";\r\n\t\tif(scheduler.config.rtl){\r\n\t\t\tdirection = \"right\";\r\n\t\t}\r\n\t\tblock.style.cssText = `height:${height}px; ${direction}:${start_pos}px; width:${width}px; top:${top}px;`;\r\n\r\n\t\tif(area){\r\n\t\t\tarea.appendChild(block);\r\n\t\t\tblocks.push(block);\r\n\t\t}\r\n\r\n\t\treturn blocks;\r\n\t},\r\n\r\n\trenderMonthCell: function(date){\r\n\t\tvar cells = scheduler.$container.querySelectorAll(\".dhx_month_head\");\r\n\r\n\t\tvar divs = [];\r\n\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\tdivs.push(cells[i].parentNode);\r\n\t\t}\r\n\r\n\t\tvar firstDate = scheduler.date.week_start(new Date(scheduler.getState().min_date));\r\n\r\n\t\tvar index = -1;\r\n\t\tvar weekNumber = 0;\r\n\t\tvar dayIndex = -1;\r\n\t\tvar currDate = firstDate;\r\n\t\tvar markerDate = scheduler.date.day_start(new Date(date));\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tindex++;\r\n\r\n\t\t\tif(dayIndex == 6){\r\n\t\t\t\tweekNumber++;\r\n\t\t\t\tdayIndex = 0;\r\n\t\t\t}else{\r\n\t\t\t\tdayIndex++;\r\n\t\t\t}\r\n\r\n\t\t\tif(scheduler.date.day_start(new Date(currDate)).valueOf() == markerDate.valueOf()){\r\n\t\t\t\tbreak;\r\n\t\t\t}else{\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(index == -1){\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tvar left = scheduler._colsS[dayIndex];\r\n\t\tvar top = scheduler._colsS.heights[weekNumber];\r\n\r\n\t\tvar div = this.createElement();\r\n\t\tdiv.style.top = top + \"px\";\r\n\t\tdiv.style.left = left + \"px\";\r\n\t\tdiv.style.width = scheduler._cols[dayIndex] + \"px\";\r\n\t\tdiv.style.height = ((scheduler._colsS.heights[weekNumber + 1] - top) || scheduler._colsS.height) + \"px\" ;\r\n\r\n\r\n\t\tvar container = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\r\n\t\tvar datatable = container.querySelector(\".dhx_cal_month_table\");\r\n\t\tif(datatable.nextSibling){\r\n\t\t\tcontainer.insertBefore(div, datatable.nextSibling);\r\n\t\t}else{\r\n\t\t\tcontainer.appendChild(div);\r\n\t\t}\r\n\t\treturn div;\r\n\t},\r\n\trenderMonthMarker: function(start_date, end_date){\r\n\t\tvar res = [];\r\n\t\tvar currentDate = start_date;\r\n\t\twhile(currentDate.valueOf() < end_date.valueOf()){\r\n\t\t\tres.push(this.renderMonthCell(currentDate));\r\n\t\t\tcurrentDate = scheduler.date.add(currentDate, 1, \"day\");\r\n\t\t}\r\n\t\treturn res;\r\n\t},\r\n\r\n\trenderVerticalMarker: function(start_date, end_date, section){\r\n\t\tvar index = scheduler.locate_holder_day(start_date);\r\n\r\n\t\tvar divs = [];\r\n\t\tvar area = null;\r\n\r\n\t\tvar c = scheduler.config;\r\n\t\tif(scheduler._ignores[index]) return divs;\r\n\r\n\t\tif (scheduler._props && scheduler._props[scheduler._mode] && section) {\r\n\t\t\tvar view = scheduler._props[scheduler._mode];\r\n\t\t\tindex = view.order[section];\r\n\r\n\t\t\tvar inner_index = view.order[section];\r\n\t\t\tif(!(view.days > 1)){\r\n\t\t\t\tindex = inner_index;\r\n\t\t\t\tif (view.size && (index > view.position+view.size)) {\r\n\t\t\t\t\tindex = 0;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t//var units_l = view.size || view.options.length;\r\n\r\n\t\t\t\tindex = scheduler.locate_holder_day(start_date) + inner_index;\r\n\t\t\t\t//index = index*units_l + inner_index;\r\n\t\t\t}\r\n\t\t}\r\n\t\tarea = scheduler.locate_holder(index);\r\n\t\tif(!area || area.querySelector(\".dhx_scale_hour\")){\r\n\t\t\t// hour scale instead of date column\r\n\t\t\treturn document.createElement(\"div\");\r\n\t\t}\r\n\r\n\t\tvar start = Math.max((start_date.getHours()*60 + start_date.getMinutes()), c.first_hour*60);\r\n\r\n\r\n\t\tvar end = Math.min((end_date.getHours()*60 + end_date.getMinutes()), c.last_hour*60);\r\n\t\tif(!end && (scheduler.date.day_start(new Date(end_date)).valueOf() > scheduler.date.day_start(new Date(start_date)).valueOf())){\r\n\t\t\tend = c.last_hour*60;\r\n\t\t}\r\n\r\n\t\tif (end <= start) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tvar block = this.createElement();\r\n\r\n\t\t// +1 for working with section which really takes up whole height (as % would be == 0)\r\n\t\tvar all_hours_height = scheduler.config.hour_size_px*c.last_hour + 1;\r\n\t\tvar hour_ms = 60*60*1000;\r\n\t\tblock.style.top = (Math.round((start*60*1000-scheduler.config.first_hour*hour_ms)*scheduler.config.hour_size_px/hour_ms) % all_hours_height) + \"px\";\r\n\t\tblock.style.lineHeight = block.style.height = Math.max((Math.round(((end-start)*60*1000)*scheduler.config.hour_size_px/hour_ms)) % all_hours_height, 1)+\"px\";\r\n\t\tblock.style.width = \"100%\";\r\n\t\tarea.appendChild(block);\r\n\t\tdivs.push(block);\r\n\t\treturn divs[0];\r\n\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode = function(){};\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.EventHandler,\r\n\t{\r\n\t\tgetDefaultNode: function(){\r\n\t\t\tvar node = new scheduler.$keyboardNavigation.TimeSlot();\r\n\r\n\t\t\tif(!node.isValid()){\r\n\t\t\t\tnode = node.fallback();\r\n\t\t\t}\r\n\t\t\treturn node;\r\n\t\t},\r\n\r\n\t\t_modes:{\r\n\t\t\tmonth: \"month\",\r\n\t\t\tyear: \"year\",\r\n\t\t\tdayColumns: \"dayColumns\",\r\n\t\t\ttimeline:\"timeline\",\r\n\t\t\tunits:\"units\",\r\n\t\t\tweekAgenda: \"weekAgenda\",\r\n\t\t\tlist: \"list\"\r\n\t\t},\r\n\t\tgetMode: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tvar mode = state.mode;\r\n\t\t\tif((scheduler.matrix && scheduler.matrix[mode])){\r\n\t\t\t\treturn this._modes.timeline;\r\n\t\t\t} else if((scheduler._props && scheduler._props[mode])){\r\n\t\t\t\treturn this._modes.units;\r\n\t\t\t}else if(mode == \"month\"){\r\n\t\t\t\treturn this._modes.month;\r\n\t\t\t}else if(mode == \"year\"){\r\n\t\t\t\treturn this._modes.year;\r\n\t\t\t}else if(mode == \"week_agenda\"){\r\n\t\t\t\treturn this._modes.weekAgenda;\r\n\t\t\t}else if(mode == \"map\" || mode == \"agenda\" || (scheduler._grid && scheduler[\"grid_\" + mode])){\r\n\t\t\t\treturn this._modes.list;\r\n\t\t\t}else{\r\n\t\t\t\treturn this._modes.dayColumns;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.focus();\r\n\t\t},\r\n\r\n\t\tblur: function(){\r\n\r\n\t\t},\r\n\r\n\t\tdisable: function(){\r\n\t\t\tscheduler.$container.setAttribute(\"tabindex\", \"0\");\r\n\t\t},\r\n\t\tenable: function(){\r\n\t\t\tif(scheduler.$container)\r\n\t\t\t\tscheduler.$container.removeAttribute(\"tabindex\");\r\n\t\t},\r\n\t\tisEnabled: function(){\r\n\t\t\treturn scheduler.$container.hasAttribute(\"tabindex\");\r\n\t\t},\r\n\r\n\r\n\t\t_compareEvents: function(a, b){\r\n\t\t\tif (a.start_date.valueOf() == b.start_date.valueOf())\r\n\t\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\t\treturn a.start_date.valueOf() > b.start_date.valueOf() ? 1 : -1;\r\n\t\t},\r\n\r\n\t\t_pickEvent: function(from, to, startId, reverse){\r\n\t\t\tvar range = scheduler.getState();\r\n\t\t\tfrom = new Date(Math.max(range.min_date.valueOf(), from.valueOf()));\r\n\t\t\tto = new Date(Math.min(range.max_date.valueOf(), to.valueOf()));\r\n\r\n\t\t\tvar evs = scheduler.getEvents(from, to);\r\n\t\t\tevs.sort(this._compareEvents);\r\n\t\t\tif(reverse){\r\n\t\t\t\tevs = evs.reverse();\r\n\t\t\t}\r\n\r\n\t\t\tvar trim = !!startId;\r\n\t\t\tfor(var i =0; i < evs.length && trim; i++){\r\n\t\t\t\tif(evs[i].id == startId){\r\n\t\t\t\t\ttrim = false;\r\n\t\t\t\t}\r\n\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\r\n\t\t\tfor(var i = 0; i < evs.length; i++){\r\n\t\t\t\tvar eventElement = new scheduler.$keyboardNavigation.Event(evs[i].id);\r\n\t\t\t\tif(eventElement.getNode())\r\n\t\t\t\t\treturn evs[i];\r\n\t\t\t}\r\n\r\n\t\t\treturn null;\r\n\t\t},\r\n\r\n\t\tnextEventHandler: function(id){\r\n\t\t\tvar activeNode = scheduler.$keyboardNavigation.dispatcher.activeNode;\r\n\r\n\t\t\tvar startId = id || (activeNode && activeNode.eventId);\r\n\r\n\t\t\tvar nextEvent = null;\r\n\t\t\tif(startId && scheduler.getEvent(startId)){\r\n\t\t\t\tvar currEvent = scheduler.getEvent(startId);\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tcurrEvent.start_date,\r\n\t\t\t\t\tscheduler.date.add(currEvent.start_date, 1, \"year\"),\r\n\t\t\t\t\tcurrEvent.id,\r\n\t\t\t\t\tfalse\r\n\t\t\t\t);\r\n\r\n\t\t\t}\r\n\t\t\tif(!nextEvent && !id){\r\n\t\t\t\tvar visibleDates = scheduler.getState();\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tvisibleDates.min_date,\r\n\t\t\t\t\tscheduler.date.add(visibleDates.min_date, 1, \"year\"),\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\tfalse\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tif(nextEvent){\r\n\r\n\t\t\t\tvar nextEv = new scheduler.$keyboardNavigation.Event(nextEvent.id);\r\n\t\t\t\tif(!nextEv.isValid()){// not visible event\r\n\t\t\t\t\tthis.nextEventHandler(nextEvent.id);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(activeNode){activeNode.blur();}\r\n\t\t\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(nextEv);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tprevEventHandler: function(id){\r\n\t\t\tvar activeNode = scheduler.$keyboardNavigation.dispatcher.activeNode;\r\n\r\n\t\t\tvar startId = id || (activeNode && activeNode.eventId);\r\n\r\n\t\t\tvar nextEvent = null;\r\n\t\t\tif(startId && scheduler.getEvent(startId)){\r\n\t\t\t\tvar currEvent = scheduler.getEvent(startId);\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tscheduler.date.add(currEvent.end_date, -1, \"year\"),\r\n\t\t\t\t\tcurrEvent.end_date,\r\n\t\t\t\t\tcurrEvent.id,\r\n\t\t\t\t\ttrue\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\tif(!nextEvent && !id){\r\n\t\t\t\tvar visibleDates = scheduler.getState();\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tscheduler.date.add(visibleDates.max_date, -1, \"year\"),\r\n\t\t\t\t\tvisibleDates.max_date,\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\ttrue\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tif(nextEvent){\r\n\t\t\t\tvar nextEv = new scheduler.$keyboardNavigation.Event(nextEvent.id);\r\n\t\t\t\tif(!nextEv.isValid()){// not visible event\r\n\t\t\t\t\tthis.prevEventHandler(nextEvent.id);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(activeNode){activeNode.blur();}\r\n\t\t\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(nextEv);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\r\n\t\t\t\"alt+1, alt+2, alt+3, alt+4, alt+5, alt+6, alt+7, alt+8, alt+9\": function(e){\r\n\t\t\t\tvar tabs = scheduler.$keyboardNavigation.HeaderCell.prototype.getNodes(\".dhx_cal_navline .dhx_cal_tab\");\r\n\t\t\t\tvar key = e.key;\r\n\t\t\t\tif(key === undefined){\r\n\t\t\t\t\tkey = e.keyCode - 48;\r\n\t\t\t\t}\r\n\t\t\t\tif(tabs[key*1 - 1]){\r\n\t\t\t\t\ttabs[key*1 - 1].click();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+left,meta+left\": function(e){\r\n\t\t\t\tscheduler._click.dhx_cal_prev_button();\r\n\t\t\t},\r\n\t\t\t\"ctrl+right,meta+right\": function(e){\r\n\t\t\t\tscheduler._click.dhx_cal_next_button();\r\n\t\t\t},\r\n\t\t\t\"ctrl+up,meta+up\":function(e){\r\n\t\t\t\tvar dataArea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tdataArea.scrollTop -= 20;\r\n\t\t\t},\r\n\t\t\t\"ctrl+down,meta+down\": function(e){\r\n\t\t\t\tvar dataArea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tdataArea.scrollTop += 20;\r\n\t\t\t},\r\n\r\n\r\n\t\t\t\"e\": function(){\r\n\t\t\t\tthis.nextEventHandler();\r\n\t\t\t},\r\n\r\n\t\t\t\"home\": function(){\r\n\t\t\t\tscheduler.setCurrentView(new Date());\r\n\t\t\t},\r\n\r\n\t\t\t\"shift+e\": function(){\r\n\t\t\t\tthis.prevEventHandler();\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+enter,meta+enter\": function(){\r\n\t\t\t\tscheduler.addEventNow({start_date: new Date(scheduler.getState().date)});\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+c,meta+c\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t},\r\n\t\t\t\"ctrl+v,meta+v\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t},\r\n\t\t\t\"ctrl+x,meta+x\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode.prototype.bindAll(scheduler.$keyboardNavigation.SchedulerNode.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.KeyNavNode = function(){};\r\n\r\nscheduler.$keyboardNavigation.KeyNavNode.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.EventHandler,\r\n\t{\r\n\t\tisValid: function(){\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\treturn null;\r\n\t\t},\r\n\r\n\t\tmoveTo: function (element) {\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(element);\r\n\t\t},\r\n\r\n\t\tcompareTo: function(b){\r\n\t\t\t// good enough comparison of two random objects\r\n\t\t\tif(!b) return false;\r\n\t\t\tfor(var i in this){\r\n\t\t\t\tif(!!this[i] != !!b[i]) return false;\r\n\r\n\t\t\t\tvar canStringifyThis = !!(this[i] && this[i].toString);\r\n\t\t\t\tvar canStringifyThat = !!(b[i] && b[i].toString);\r\n\t\t\t\tif(canStringifyThat != canStringifyThis) return false;\r\n\t\t\t\tif(!(canStringifyThat && canStringifyThis)) {\r\n\t\t\t\t\tif(b[i] != this[i]) return false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(b[i].toString() != this[i].toString())\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\tgetNode: function(){},\r\n\t\tfocus: function(){\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif(node){\r\n\t\t\t\tnode.setAttribute(\"tabindex\", \"-1\");\r\n\t\t\t\t//node.className += \" scheduler_focused\";\r\n\t\t\t\tif(node.focus) node.focus();\r\n\t\t\t}\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif(node){\r\n\t\t\t\tnode.setAttribute(\"tabindex\", \"-1\");\r\n\t\t\t\t//node.className = (node.className || \"\").replace(/ ?scheduler_focused/g, \"\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.HeaderCell = function(index){\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.HeaderCell.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\tgetNode: function(index){\r\n\t\t\tindex = index || this.index || 0;\r\n\t\t\tvar nodes = this.getNodes();\r\n\t\t\tif(nodes[index]) return nodes[index];\r\n\t\t},\r\n\r\n\t\tgetNodes: function(selector){\r\n\t\t\tselector = selector || [\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_prev_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_next_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_today_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_tab\"\r\n\t\t\t\t].join(\", \");\r\n\r\n\t\t\tvar nodes = Array.prototype.slice.call(scheduler.$container.querySelectorAll(selector));\r\n\t\t\tnodes.sort(function(a, b){\r\n\t\t\t\treturn a.offsetLeft - b.offsetLeft;\r\n\t\t\t});\r\n\t\t\treturn nodes;\r\n\t\t},\r\n\r\n\t\t_handlers:null,\r\n\r\n\t\tisValid: function(){\r\n\t\t\treturn !!this.getNode(this.index);\r\n\t\t},\r\n\t\tfallback:function(){\r\n\t\t\tvar defaultCell = this.getNode(0);\r\n\t\t\tif(!defaultCell){\r\n\t\t\t\tdefaultCell = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}\r\n\t\t\treturn defaultCell;\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tvar newIndex = this.index - 1;\r\n\t\t\t\tif(newIndex < 0){\r\n\t\t\t\t\tnewIndex = this.getNodes().length - 1;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.HeaderCell(newIndex));\r\n\r\n\t\t\t},\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tvar newIndex = this.index + 1;\r\n\t\t\t\tif(newIndex >= this.getNodes().length){\r\n\t\t\t\t\tnewIndex = 0;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.HeaderCell(newIndex));\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t},\r\n\r\n\t\t\t\"enter\": function(){\r\n\t\t\t\tvar node = this.getNode();\r\n\t\t\t\tif(node){\r\n\t\t\t\t\tnode.click();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.HeaderCell.prototype.bindAll(scheduler.$keyboardNavigation.HeaderCell.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.Event = function(id){\r\n\tthis.eventId = null;\r\n\tif(scheduler.getEvent(id)){\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tthis.start = new Date(ev.start_date);\r\n\t\tthis.end = new Date(ev.end_date);\r\n\r\n\t\tthis.section = this._getSection(ev);\r\n\t\tthis.eventId = id;\r\n\t}\r\n};\r\n\r\nscheduler.$keyboardNavigation.Event.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\t_getNodes: function(){\r\n\t\t\treturn Array.prototype.slice.call(scheduler.$container.querySelectorAll(\"[\"+scheduler.config.event_attribute+\"]\"));\r\n\t\t},\r\n\r\n\t\t_modes: scheduler.$keyboardNavigation.SchedulerNode.prototype._modes,\r\n\r\n\t\tgetMode: scheduler.$keyboardNavigation.SchedulerNode.prototype.getMode,\r\n\r\n\t\t_handlers: null,\r\n\t\tisValid: function(){\r\n\t\t\treturn !!(scheduler.getEvent(this.eventId) && this.getNode());\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\tvar eventNode = this._getNodes()[0];\r\n\t\t\tvar defaultElement = null;\r\n\t\t\tif(!eventNode || !(scheduler._locate_event(eventNode))){\r\n\t\t\t\tdefaultElement = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}else{\r\n\t\t\t\tvar id = scheduler._locate_event(eventNode);\r\n\t\t\t\tdefaultElement = new scheduler.$keyboardNavigation.Event(id);\r\n\t\t\t}\r\n\r\n\t\t\treturn defaultElement;\r\n\t\t},\r\n\r\n\t\tisScrolledIntoView: function (el) {\r\n\t\t\tvar eventBox = el.getBoundingClientRect();\r\n\t\t\tvar viewPort = scheduler.$container.querySelector(\".dhx_cal_data\").getBoundingClientRect();\r\n\t\t\t\r\n\t\t\tif(eventBox.bottom < viewPort.top || eventBox.top > viewPort.bottom){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\tgetNode: function(){\r\n\r\n\t\t\tvar idSelector = \"[\"+scheduler.config.event_attribute+\"='\"+this.eventId+\"']\";\r\n\r\n\t\t\tvar inlineEditor = scheduler.$keyboardNavigation.dispatcher.getInlineEditor(this.eventId);\r\n\t\t\tif(inlineEditor){// is inline editor visible\r\n\t\t\t\treturn inlineEditor;\r\n\t\t\t}else{\r\n\t\t\t\tif(scheduler.isMultisectionEvent && scheduler.isMultisectionEvent(scheduler.getEvent(this.eventId))){\r\n\t\t\t\t\tvar nodes = scheduler.$container.querySelectorAll(idSelector);\r\n\t\t\t\t\tfor(var i = 0; i < nodes.length; i++){\r\n\t\t\t\t\t\tif(this.isScrolledIntoView(nodes[i])){\r\n\t\t\t\t\t\t\treturn nodes[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn nodes[0];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn scheduler.$container.querySelector(idSelector);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tvar event = scheduler.getEvent(this.eventId);\r\n\r\n\t\t\tvar calendar = scheduler.getState();\r\n\t\t\tif(event.start_date.valueOf() > calendar.max_date.valueOf() || event.end_date.valueOf() <= calendar.min_date.valueOf()){\r\n\t\t\t\tscheduler.setCurrentView(event.start_date);\r\n\t\t\t}\r\n\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif (this.isScrolledIntoView(node)) {\r\n\t\t\t\tscheduler.$keyboardNavigation.dispatcher.keepScrollPosition((function(){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\t\t}).bind(this));\r\n\t\t\t} else {\r\n\t\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\t}\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\r\n\r\n\t\t_getSection: function(ev){\r\n\t\t\tvar section = null;\r\n\t\t\tvar mode = scheduler.getState().mode;\r\n\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\t\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\t\tsection = ev[timeline.y_property];\r\n\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\tvar unit = scheduler._props[mode];\r\n\t\t\t\tsection = ev[unit.map_to];\r\n\t\t\t}\r\n\t\t\treturn section;\r\n\t\t},\r\n\t\t_moveToSlot: function(dir){\r\n\t\t\tvar ev = scheduler.getEvent(this.eventId);\r\n\t\t\tif(ev){\r\n\t\t\t\tvar section =this._getSection(ev);\r\n\t\t\t\tvar slot = new scheduler.$keyboardNavigation.TimeSlot(ev.start_date, null, section);\r\n\t\t\t\tthis.moveTo(slot.nextSlot(slot, dir));\r\n\t\t\t}else{\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tthis._moveToSlot(\"left\");\r\n\t\t\t},\r\n\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tthis._moveToSlot(\"right\");\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\t\t\t\tif(this.getMode() == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis._moveToSlot(\"down\");\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"space\": function(){\r\n\t\t\t\tvar node = this.getNode();\r\n\t\t\t\tif(node && node.click){\r\n\t\t\t\t\tnode.click();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"up\": function () {\r\n\t\t\t\tif(this.getMode() == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis._moveToSlot(\"up\");\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"delete\": function(){\r\n\t\t\t\tif(scheduler.getEvent(this.eventId)) {\r\n\t\t\t\t\tscheduler._click.buttons[\"delete\"](this.eventId);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t// open lightbox\r\n\t\t\t\"enter\": function () {\r\n\t\t\t\tif(scheduler.getEvent(this.eventId)) {\r\n\t\t\t\t\tscheduler.showLightbox(this.eventId);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\nscheduler.$keyboardNavigation.Event.prototype.bindAll(scheduler.$keyboardNavigation.Event.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.TimeSlot = function(from, to, section, movingDate){\r\n\tvar state = scheduler.getState();\r\n\tvar timeline = scheduler.matrix && scheduler.matrix[state.mode];\r\n\r\n\tif(!from){\r\n\t\tfrom = this.getDefaultDate();\r\n\t}\r\n\r\n\tif(!to){\r\n\r\n\t\tif(timeline){\r\n\t\t\tto = scheduler.date.add(from, timeline.x_step, timeline.x_unit);\r\n\t\t}else{\r\n\t\t\tto = scheduler.date.add(from, scheduler.config.key_nav_step, \"minute\");\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tthis.section = section || this._getDefaultSection();\r\n\tthis.start_date = new Date(from);\r\n\tthis.end_date = new Date(to);\r\n\tthis.movingDate = movingDate || null;\r\n};\r\n\r\nscheduler.$keyboardNavigation.TimeSlot.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\t_handlers:null,\r\n\r\n\t\tgetDefaultDate: function(){\r\n\t\t\tvar from;\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar visibleTime = new Date(state.date);\r\n\t\t\tvisibleTime.setSeconds(0);\r\n\t\t\tvisibleTime.setMilliseconds(0);\r\n\r\n\t\t\tvar nowTime = new Date();\r\n\t\t\tnowTime.setSeconds(0);\r\n\t\t\tnowTime.setMilliseconds(0);\r\n\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[state.mode];\r\n\t\t\tvar showNowTime = false;\r\n\t\t\tif(visibleTime.valueOf() === nowTime.valueOf()){\r\n\t\t\t\tshowNowTime = true;\r\n\t\t\t}\r\n\r\n\t\t\tif(timeline){\r\n\t\t\t\tif(showNowTime){\r\n\t\t\t\t\tif(timeline.x_unit === \"day\"){\r\n\t\t\t\t\t\tnowTime.setHours(0);\r\n\t\t\t\t\t\tnowTime.setMinutes(0);\r\n\t\t\t\t\t}else if(timeline.x_unit === \"hour\"){\r\n\t\t\t\t\t\tnowTime.setMinutes(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfrom = nowTime;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfrom = scheduler.date[timeline.name + \"_start\"](new Date(state.date));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfrom = this.findVisibleColumn(from);\r\n\t\t\t}else{\r\n\t\t\t\tfrom = new Date(scheduler.getState().min_date);\r\n\t\t\t\tif(showNowTime){\r\n\t\t\t\t\tfrom = nowTime;\r\n\t\t\t\t}\r\n\t\t\t\tfrom = this.findVisibleColumn(from);\r\n\t\t\t\tif(!showNowTime){\r\n\t\t\t\t\tfrom.setHours(scheduler.config.first_hour);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(!scheduler._table_view){\r\n\t\t\t\t\tvar dataContainer = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\t\tif(dataContainer.scrollTop){\r\n\t\t\t\t\t\tfrom.setHours(scheduler.config.first_hour + Math.ceil(dataContainer.scrollTop / scheduler.config.hour_size_px));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn from;\r\n\t\t},\r\n\r\n\t\tclone: function(timeslot){\r\n\t\t\treturn new scheduler.$keyboardNavigation.TimeSlot(timeslot.start_date, timeslot.end_date, timeslot.section, timeslot.movingDate);\r\n\t\t},\r\n\t\t_getMultisectionView: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view;\r\n\t\t\tif(scheduler._props && scheduler._props[state.mode]) {\r\n\t\t\t\tview = scheduler._props[state.mode];\r\n\t\t\t}else if(scheduler.matrix && scheduler.matrix[state.mode]){\r\n\t\t\t\tview = scheduler.matrix[state.mode];\r\n\t\t\t}\r\n\t\t\treturn view;\r\n\t\t},\r\n\r\n\t\t_getDefaultSection: function(){\r\n\t\t\tvar section = null;\r\n\t\t\tvar view = this._getMultisectionView();\r\n\t\t\tif(view && !section){\r\n\t\t\t\tsection = this._getNextSection();\r\n\t\t\t}\r\n\t\t\treturn section;\r\n\t\t},\r\n\r\n\t\t_getNextSection: function(sectionId, dir){\r\n\t\t\tvar view = this._getMultisectionView();\r\n\t\t\tvar currentIndex = view.order[sectionId];\r\n\t\t\tvar nextIndex = currentIndex;\r\n\t\t\tif(currentIndex !== undefined){\r\n\t\t\t\tnextIndex = currentIndex + dir;\r\n\t\t\t}else{\r\n\t\t\t\tnextIndex = (view.size && view.position) ? view.position : 0;\r\n\t\t\t}\r\n\r\n\t\t\tif(nextIndex < 0){\r\n\t\t\t\tnextIndex = 0;\r\n\t\t\t}\r\n\t\t\tvar options = view.options || view.y_unit;\r\n\r\n\t\t\tif(nextIndex >= options.length){\r\n\t\t\t\tnextIndex = options.length - 1;\r\n\t\t\t}\r\n\t\t\t//nextIndex = nextIndex < 0 ? nextIndex = (view.options || view.y_unit).length -1 : nextIndex;\r\n\r\n\t\t\tif(options[nextIndex]){\r\n\t\t\t\treturn options[nextIndex].key;\r\n\t\t\t}else{\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar isInRange = !(this.start_date.valueOf() < state.min_date.valueOf() || this.start_date.valueOf() >= state.max_date.valueOf());\r\n\r\n\t\t\tif(!isInRange) return false;\r\n\r\n\r\n\t\t\tif(!this.isVisible(this.start_date, this.end_date)) return false;\r\n\r\n\t\t\tvar view = this._getMultisectionView();\r\n\r\n\t\t\tif(view){\r\n\t\t\t\treturn (view.order[this.section] !== undefined);\r\n\t\t\t}else{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\tfallback:function(){\r\n\r\n\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(!defaultSlot.isValid()){\r\n\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t}else{\r\n\t\t\t\treturn defaultSlot;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tgetNodes: function(){\r\n\t\t\treturn Array.prototype.slice.call(scheduler.$container.querySelectorAll(\".dhx_focus_slot\"));\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\treturn this.getNodes()[0];\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tif(this.section && scheduler.getView() && scheduler.getView().smart_rendering && scheduler.getView().scrollTo && !scheduler.$container.querySelector(`[data-section-id=\"${this.section}\"]`)){\r\n\t\t\t\tscheduler.getView().scrollTo({section: this.section});\r\n\t\t\t}\r\n\t\t\tscheduler.$keyboardNavigation.marker.render(this.start_date, this.end_date, this.section);\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\tscheduler.$keyboardNavigation._pasteDate = this.start_date;\r\n\t\t\tscheduler.$keyboardNavigation._pasteSection = this.section;\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t\tscheduler.$keyboardNavigation.marker.clear();\r\n\t\t},\r\n\r\n\t\t_modes: scheduler.$keyboardNavigation.SchedulerNode.prototype._modes,\r\n\r\n\t\t_getMode: scheduler.$keyboardNavigation.SchedulerNode.prototype.getMode,\r\n\r\n\t\taddMonthDate: function(date, dir, extend){\r\n\t\t\tvar res;\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tres = scheduler.date.add(date, -1, \"week\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tres = scheduler.date.add(date, 1, \"week\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tres = scheduler.date.day_start(scheduler.date.add(date, -1, \"day\"));\r\n\t\t\t\t\tres = this.findVisibleColumn(res, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tres = scheduler.date.day_start(scheduler.date.add(date, 1, \"day\"));\r\n\t\t\t\t\tres = this.findVisibleColumn(res, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tres = scheduler.date.day_start(new Date(date));\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tif(date.valueOf() < state.min_date.valueOf() || (!extend && date.valueOf() >= state.max_date.valueOf())){\r\n\t\t\t\tres = new Date(state.min_date);\r\n\t\t\t}\r\n\r\n\t\t\treturn res;\r\n\t\t},\r\n\r\n\t\tnextMonthSlot: function(slot, dir, extend){\r\n\r\n\t\t\tvar start, end;\r\n\t\t\tstart = this.addMonthDate(slot.start_date, dir, extend);\r\n\r\n\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\tend = new Date(start);\r\n\t\t\tend.setHours(scheduler.config.last_hour);\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\r\n\t\t_alignTimeSlot: function(date, minDate, unit, step){\r\n\t\t\tvar currentDate = new Date(minDate);\r\n\t\t\twhile(currentDate.valueOf() < date.valueOf()){\r\n\t\t\t\tcurrentDate = scheduler.date.add(currentDate, step, unit);\r\n\t\t\t}\r\n\r\n\t\t\tif(currentDate.valueOf() > date.valueOf()){\r\n\t\t\t\tcurrentDate = scheduler.date.add(currentDate, -step, unit);\r\n\t\t\t}\r\n\r\n\t\t\treturn currentDate;\r\n\t\t},\r\n\r\n\t\tnextTimelineSlot: function(slot, dir, extend){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view = scheduler.matrix[state.mode];\r\n\r\n\t\t\tvar startDate = this._alignTimeSlot(slot.start_date, scheduler.date[view.name + \"_start\"](new Date(slot.start_date)), view.x_unit, view.x_step);\r\n\t\t\tvar endDate = this._alignTimeSlot(slot.end_date, scheduler.date[view.name + \"_start\"](new Date(slot.end_date)), view.x_unit, view.x_step);\r\n\r\n\t\t\tif(endDate.valueOf() <= startDate.valueOf()){\r\n\t\t\t\tendDate = scheduler.date.add(startDate, view.x_step, view.x_unit);\r\n\t\t\t}\r\n\t\t\tvar newPos = this.clone(slot);\r\n\t\t\tnewPos.start_date = startDate;\r\n\t\t\tnewPos.end_date = endDate;\r\n\t\t\tnewPos.section = slot.section || this._getNextSection();\r\n\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tnewPos.section = this._getNextSection(slot.section, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tnewPos.section = this._getNextSection(slot.section, +1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tnewPos.start_date = this.findVisibleColumn(scheduler.date.add(newPos.start_date, -view.x_step, view.x_unit), -1);\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tnewPos.start_date = this.findVisibleColumn(scheduler.date.add(newPos.start_date, view.x_step, view.x_unit), 1);\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(newPos.start_date.valueOf() < state.min_date.valueOf() || newPos.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tif(extend && newPos.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\t\tnewPos.start_date = new Date(state.max_date);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tnewPos.start_date = scheduler.date[state.mode + \"_start\"](scheduler.date.add(state.date, dir == \"left\" ? -1 : 1, state.mode));\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn newPos;\r\n\t\t},\r\n\r\n\t\tnextUnitsSlot: function(slot, dir, extend){\r\n\t\t\tvar newPos = this.clone(slot);\r\n\t\t\tnewPos.section = slot.section || this._getNextSection();\r\n\r\n\t\t\tvar section = slot.section || this._getNextSection();\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view = scheduler._props[state.mode];\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tsection = this._getNextSection(slot.section, -1);\r\n\t\t\t\t\tvar optionsCount = view.size ? (view.size - 1) : view.options.length;\r\n\r\n\t\t\t\t\tif(view.days > 1 && (view.order[section] == optionsCount - 1)){\r\n\t\t\t\t\t\tif(scheduler.date.add(slot.start_date, -1, \"day\").valueOf() >= state.min_date.valueOf()){\r\n\t\t\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tsection = this._getNextSection(slot.section, 1);\r\n\t\t\t\t\tif(view.days > 1 && !view.order[section]){\r\n\t\t\t\t\t\tif(scheduler.date.add(slot.start_date, 1, \"day\").valueOf() < state.max_date.valueOf()){\r\n\t\t\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\tsection = slot.section;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tnewPos.section = section;\r\n\t\t\treturn newPos;\r\n\t\t},\r\n\r\n\t\t_moveDate: function(oldDate, dir){\r\n\t\t\tvar newDate = this.findVisibleColumn(scheduler.date.add(oldDate, dir, \"day\"), dir);\r\n\t\t\tnewDate.setHours(oldDate.getHours());\r\n\t\t\tnewDate.setMinutes(oldDate.getMinutes());\r\n\t\t\treturn newDate;\r\n\t\t},\r\n\r\n\t\tisBeforeLastHour: function(date, isStartDate){\r\n\t\t\tvar minutes = date.getMinutes(),\r\n\t\t\t\thours = date.getHours(),\r\n\t\t\t\tlast_hour = scheduler.config.last_hour;\r\n\t\t\treturn (hours < last_hour || (!isStartDate && ((last_hour == 24 || hours == last_hour) && !minutes)));\r\n\t\t},\r\n\t\tisAfterFirstHour: function(date, isStartDate){\r\n\t\t\tvar minutes = date.getMinutes(),\r\n\t\t\t\thours = date.getHours(),\r\n\t\t\t\tfirst_hour = scheduler.config.first_hour,\r\n\t\t\t\tlast_hour = scheduler.config.last_hour;\r\n\t\t\treturn (hours >= first_hour || (!isStartDate && (!minutes && ((!hours && last_hour == 24) || (hours == last_hour)))));\r\n\t\t},\r\n\t\tisInVisibleDayTime: function(date, isStartDate){\r\n\t\t\treturn (this.isBeforeLastHour(date, isStartDate) && this.isAfterFirstHour(date, isStartDate));\r\n\t\t},\r\n\r\n\t\tnextDaySlot: function(slot, dir, extend){\r\n\t\t\tvar start, end;\r\n\r\n\t\t\tvar key_nav_step = scheduler.config.key_nav_step;\r\n\r\n\t\t\tvar date = this._alignTimeSlot(slot.start_date, scheduler.date.day_start(new Date(slot.start_date)), \"minute\", key_nav_step);\r\n\r\n\r\n\t\t\tvar oldStart = slot.start_date;\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tstart = scheduler.date.add(date, -key_nav_step, \"minute\");\r\n\r\n\t\t\t\t\tif(!this.isInVisibleDayTime(start, true)){\r\n\t\t\t\t\t\tif (!extend || this.isInVisibleDayTime(oldStart, true)) {\r\n\r\n\t\t\t\t\t\t\tvar toNextDay = true;\r\n\t\t\t\t\t\t\tif(extend && scheduler.date.date_part(new Date(start)).valueOf() != scheduler.date.date_part(new Date(oldStart)).valueOf())\r\n\t\t\t\t\t\t\t\ttoNextDay = false;\r\n\t\t\t\t\t\t\tif(toNextDay)\r\n\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, -1, \"day\"), -1);\r\n\r\n\t\t\t\t\t\t\tstart.setHours(scheduler.config.last_hour);\r\n\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\tstart = scheduler.date.add(start, -key_nav_step, \"minute\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tstart = scheduler.date.add(date, key_nav_step, \"minute\");\r\n\r\n\t\t\t\t\tvar testEnd = extend ? start : scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tif(!this.isInVisibleDayTime(testEnd, false)){\r\n\t\t\t\t\t\tif(!extend || this.isInVisibleDayTime(oldStart, false)) {\r\n\t\t\t\t\t\t\tif (!extend) {\r\n\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, 1, \"day\"), 1);\r\n\t\t\t\t\t\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tvar toNextDay = true;\r\n\t\t\t\t\t\t\t\tif (scheduler.date.date_part(new Date(oldStart)).valueOf() == oldStart.valueOf()) {\r\n\t\t\t\t\t\t\t\t\ttoNextDay = false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (toNextDay) {\r\n\t\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, 1, \"day\"), 1);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\t\tstart = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tstart = this._moveDate(slot.start_date, -1);\r\n\t\t\t\t\tend = this._moveDate(slot.end_date, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tstart = this._moveDate(slot.start_date, 1);\r\n\t\t\t\t\tend = this._moveDate(slot.end_date, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tstart = date;\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\t\tnextWeekAgendaSlot: function(slot, dir){\r\n\t\t\tvar start, end;\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tstart = scheduler.date.day_start(scheduler.date.add(slot.start_date, -1, \"day\"));\r\n\t\t\t\t\tstart = this.findVisibleColumn(start, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tstart = scheduler.date.day_start(scheduler.date.add(slot.start_date, 1, \"day\"));\r\n\t\t\t\t\tstart = this.findVisibleColumn(start, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tstart = scheduler.date.day_start(slot.start_date);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif(slot.start_date.valueOf() < state.min_date.valueOf() || slot.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tstart = new Date(state.min_date);\r\n\r\n\t\t\t}\r\n\t\t\tend = new Date(start);\r\n\t\t\tend.setHours(scheduler.config.last_hour);\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\t\tnextAgendaSlot: function(slot, dir){\r\n\t\t\treturn {start_date: slot.start_date, end_date: slot.end_date};\r\n\t\t},\r\n\r\n\r\n\t\tisDateVisible: function(date){\r\n\t\t\tif(!scheduler._ignores_detected)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[scheduler.getState().mode];\r\n\r\n\t\t\tvar index;\r\n\t\t\tif(timeline){\r\n\t\t\t\tindex = scheduler._get_date_index(timeline, date);\r\n\t\t\t}else{\r\n\t\t\t\tindex = scheduler.locate_holder_day(date);\r\n\t\t\t}\r\n\r\n\t\t\treturn !scheduler._ignores[index];\r\n\t\t},\r\n\r\n\t\tfindVisibleColumn: function(start, dir){\r\n\t\t\tvar date = start;\r\n\t\t\tdir = dir || 1;\r\n\t\t\tvar range = scheduler.getState();\r\n\r\n\t\t\twhile(!this.isDateVisible(date) && ((dir > 0 && date.valueOf() <= range.max_date.valueOf()) || (dir < 0 && date.valueOf() >= range.min_date.valueOf()))){\r\n\t\t\t\tdate = this.nextDateColumn(date, dir);\r\n\t\t\t}\r\n\r\n\t\t\treturn date;\r\n\t\t},\r\n\r\n\t\tnextDateColumn: function(start, dir){\r\n\t\t\tdir = dir || 1;\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[scheduler.getState().mode];\r\n\r\n\t\t\tvar date;\r\n\t\t\tif(timeline){\r\n\t\t\t\tdate = scheduler.date.add(start, dir * timeline.x_step, timeline.x_unit);\r\n\t\t\t}else{\r\n\t\t\t\tdate = scheduler.date.day_start(scheduler.date.add(start, dir, \"day\"));\r\n\t\t\t}\r\n\r\n\t\t\treturn date;\r\n\t\t},\r\n\r\n\t\tisVisible:function(from, to){\r\n\t\t\tif(!scheduler._ignores_detected)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tvar current = new Date(from);\r\n\r\n\t\t\twhile(current.valueOf() < to.valueOf()){\r\n\t\t\t\tif(this.isDateVisible(current)) return true;\r\n\t\t\t\tcurrent = this.nextDateColumn(current);\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t},\r\n\r\n\t\tnextSlot: function(slot, dir, view, extend){\r\n\t\t\tvar next;\r\n\t\t\tview = view || this._getMode();\r\n\r\n\t\t\tvar tempSlot = scheduler.$keyboardNavigation.TimeSlot.prototype.clone(slot);\r\n\r\n\t\t\tswitch (view){\r\n\t\t\t\tcase this._modes.units:\r\n\t\t\t\t\tnext = this.nextUnitsSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.timeline:\r\n\t\t\t\t\tnext = this.nextTimelineSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.year:\r\n\t\t\t\t\tnext = this.nextMonthSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.month:\r\n\t\t\t\t\tnext = this.nextMonthSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.weekAgenda:\r\n\t\t\t\t\tnext = this.nextWeekAgendaSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.list:\r\n\t\t\t\t\tnext = this.nextAgendaSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.dayColumns:\r\n\t\t\t\t\tnext = this.nextDaySlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(next.start_date.valueOf() >= next.end_date.valueOf()){\r\n\t\t\t\tnext = this.nextSlot(next, dir, view);\r\n\t\t\t}\r\n\r\n\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(next);\r\n\r\n\t\t},\r\n\r\n\t\textendSlot: function(slot, dir){\r\n\t\t\tvar view = this._getMode();\r\n\t\t\tvar next;\r\n\t\t\tswitch (view){\r\n\t\t\t\tcase this._modes.units:\r\n\t\t\t\t\tif(dir == \"left\" || dir == \"right\"){\r\n\t\t\t\t\t\tnext = this.nextUnitsSlot(slot, dir);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnext = this.extendUnitsSlot(slot, dir);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.timeline:\r\n\t\t\t\t\tif(dir == \"down\" || dir == \"up\"){\r\n\t\t\t\t\t\tnext = this.nextTimelineSlot(slot, dir);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnext = this.extendTimelineSlot(slot, dir);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.year:\r\n\t\t\t\t\tnext = this.extendMonthSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.month:\r\n\t\t\t\t\tnext = this.extendMonthSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.dayColumns:\r\n\t\t\t\t\tnext = this.extendDaySlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.weekAgenda:\r\n\t\t\t\t\tnext = this.extendWeekAgendaSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnext = slot;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tvar range = scheduler.getState();\r\n\t\t\tif(next.start_date.valueOf() < range.min_date.valueOf()){\r\n\t\t\t\tnext.start_date = this.findVisibleColumn(range.min_date);\r\n\t\t\t\tnext.start_date.setHours(scheduler.config.first_hour);\r\n\t\t\t}\r\n\r\n\t\t\tif(next.end_date.valueOf() > range.max_date.valueOf()){\r\n\t\t\t//\tnext.end_date = new Date(slot.end_date);\r\n\t\t\t\tnext.end_date = this.findVisibleColumn(range.max_date, -1);\r\n\t\t\t}\r\n\r\n\r\n\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(next);\r\n\t\t},\r\n\r\n\t\textendTimelineSlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"timeline\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\textendWeekAgendaSlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"weekAgenda\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\textendGenericSlot: function(allowedDirections, slot, direction, type){\r\n\t\t\tvar next;\r\n\t\t\tvar moveDate = slot.movingDate;\r\n\r\n\t\t\tif(!moveDate){\r\n\t\t\t\tmoveDate = allowedDirections[direction];\r\n\t\t\t}\r\n\r\n\t\t\tif(!moveDate || !allowedDirections[direction]){\r\n\t\t\t\treturn slot;\r\n\t\t\t}\r\n\r\n\t\t\tif(direction){\r\n\t\t\t\tnext = this.nextSlot({start_date: slot[moveDate], section: slot.section}, direction, type, true);\r\n\r\n\t\t\t\tif(next.start_date.valueOf() == slot.start_date.valueOf()){\r\n\t\t\t\t\tnext = this.nextSlot({start_date: next.start_date, section:next.section}, direction, type, true);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tnext.movingDate = moveDate;\r\n\t\t\t}else{\r\n\t\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(slot);\r\n\t\t\t}\r\n\r\n\t\t\tvar newDates = this.extendSlotDates(slot, next, next.movingDate);\r\n\r\n\t\t\tif(newDates.end_date.valueOf() <= newDates.start_date.valueOf()){\r\n\t\t\t\tnext.movingDate = next.movingDate == \"end_date\" ? \"start_date\" : \"end_date\";\r\n\t\t\t}\r\n\t\t\tnewDates = this.extendSlotDates(slot, next, next.movingDate);\r\n\r\n\t\t\tnext.start_date = newDates.start_date;\r\n\t\t\tnext.end_date = newDates.end_date;\r\n\t\t\treturn next;\r\n\t\t},\r\n\r\n\t\textendSlotDates: function(oldSlot, newSlot, dateDirection){\r\n\t\t\tvar res = {start_date:null, end_date:null};\r\n\r\n\t\t\tif(dateDirection == \"start_date\"){\r\n\t\t\t\tres.start_date = newSlot.start_date;\r\n\t\t\t\tres.end_date = oldSlot.end_date;\r\n\t\t\t}else{\r\n\t\t\t\tres.start_date = oldSlot.start_date;\r\n\t\t\t\tres.end_date = newSlot.start_date;\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\r\n\t\t},\r\n\r\n\t\textendMonthSlot: function(slot, direction){\r\n\t\t\tvar slot = this.extendGenericSlot({\r\n\t\t\t\t\t\"up\":\"start_date\",\r\n\t\t\t\t\t\"down\":\"end_date\",\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"month\"\r\n\t\t\t);\r\n\r\n\t\t\tslot.start_date.setHours(scheduler.config.first_hour);\r\n\t\t\tslot.end_date = scheduler.date.add(slot.end_date, -1, \"day\");\r\n\t\t\tslot.end_date.setHours(scheduler.config.last_hour);\r\n\t\t\treturn slot;\r\n\t\t},\r\n\r\n\t\textendUnitsSlot: function(slot, direction){\r\n\t\t\tvar next;\r\n\r\n\t\t\tswitch (direction){\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tnext = this.extendDaySlot(slot, direction);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnext = slot;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tnext.section = slot.section;\r\n\t\t\treturn next;\r\n\t\t},\r\n\t\textendDaySlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\t\"up\":\"start_date\",\r\n\t\t\t\t\t\"down\":\"end_date\",\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"dayColumns\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\tscrollSlot: function(dir){\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tvar slot = this.nextSlot(this, dir);\r\n\t\t\tif(slot.start_date.valueOf() < state.min_date.valueOf() || slot.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tscheduler.setCurrentView(new Date(slot.start_date));\r\n\t\t\t}\r\n\r\n\t\t\tthis.moveTo(slot);\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tthis.scrollSlot(\"left\");\r\n\t\t\t},\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tthis.scrollSlot(\"right\");\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\r\n\t\t\t\tvar mode = this._getMode();\r\n\t\t\t\tif(mode == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.scrollSlot(\"down\");\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"up\": function () {\r\n\t\t\t\tvar mode = this._getMode();\r\n\t\t\t\tif(mode == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.scrollSlot(\"up\");\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"shift+down\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"down\"));\r\n\t\t\t},\r\n\t\t\t\"shift+up\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"up\"));\r\n\t\t\t},\r\n\t\t\t\"shift+right\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"right\"));\r\n\t\t\t},\r\n\t\t\t\"shift+left\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"left\"));\r\n\t\t\t},\r\n\r\n\r\n\t\t\t\"enter\": function(){\r\n\t\t\t\tvar obj = {start_date: new Date(this.start_date), end_date: new Date(this.end_date)};\r\n\r\n\t\t\t\tvar mode = scheduler.getState().mode;\r\n\t\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\r\n\t\t\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\t\t\tobj[timeline.y_property] = this.section;\r\n\t\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\t\tvar unit = scheduler._props[mode];\r\n\t\t\t\t\tobj[unit.map_to] = this.section;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler.addEventNow(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.TimeSlot.prototype.bindAll(scheduler.$keyboardNavigation.TimeSlot.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.MinicalButton = function(div, index){\r\n\tthis.container = div;\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.MinicalButton.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar container = this.container;\r\n\t\t\treturn !!container.offsetWidth;// valid if container is visible\r\n\t\t},\r\n\r\n\t\tfallback: function(){\r\n\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(defaultSlot.isValid()){\r\n\t\t\t\treturn defaultSlot;\r\n\t\t\t}else{\r\n\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t}\r\n\t\t},\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.globalNode.disable();\r\n\t\t\tthis.container.removeAttribute(\"tabindex\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tthis.container.setAttribute(\"tabindex\", \"0\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\tif(!this.index){\r\n\t\t\t\treturn this.container.querySelector(\".dhx_cal_prev_button\");\r\n\t\t\t}else{\r\n\t\t\t\treturn this.container.querySelector(\".dhx_cal_next_button\");\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"right\": function(e){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, this.index ? 0 : 1));\r\n\t\t\t},\r\n\t\t\t\"left\": function(e){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, this.index ? 0 : 1));\r\n\t\t\t},\r\n\t\t\t\"down\": function(){\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, 0, 0);\r\n\t\t\t\tif(next && !next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"enter\": function(e){\r\n\t\t\t\tthis.getNode().click();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.MinicalButton.prototype.bindAll(scheduler.$keyboardNavigation.MinicalButton.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.MinicalCell = function(div, row, col){\r\n\tthis.container = div;\r\n\tthis.row = row || 0;\r\n\tthis.col = col || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.MinicalCell.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar grid = this._getGrid();\r\n\t\t\treturn !!(grid[this.row] && grid[this.row][this.col]);\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\tvar row = this.row;\r\n\t\t\tvar col = this.col;\r\n\t\t\tvar grid = this._getGrid();\r\n\t\t\tif(!grid[row]){\r\n\t\t\t\trow = 0;\r\n\t\t\t}\r\n\t\t\tvar dir = true;\r\n\t\t\tif(row > grid.length / 2){\r\n\t\t\t\tdir = false;\r\n\t\t\t}\r\n\r\n\t\t\tif(!grid[row]){\r\n\t\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t\tif(defaultSlot.isValid()){\r\n\t\t\t\t\treturn defaultSlot;\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(dir){\r\n\t\t\t\tfor(var c = col; grid[row] && c < grid[row].length; c++){\r\n\t\t\t\t\tif(!grid[row][c] && c == grid[row].length - 1){\r\n\t\t\t\t\t\trow++;\r\n\t\t\t\t\t\tcol = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(grid[row][c]){\r\n\t\t\t\t\t\treturn new scheduler.$keyboardNavigation.MinicalCell(this.container, row, c);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tfor(var c = col; grid[row] && c < grid[row].length; c--){\r\n\t\t\t\t\tif(!grid[row][c] && !c){\r\n\t\t\t\t\t\trow--;\r\n\t\t\t\t\t\tcol = grid[row].length - 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(grid[row][c]){\r\n\t\t\t\t\t\treturn new scheduler.$keyboardNavigation.MinicalCell(this.container, row, c);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn new scheduler.$keyboardNavigation.MinicalButton(this.container, 0);\r\n\t\t},\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.globalNode.disable();\r\n\r\n\t\t\tthis.container.removeAttribute(\"tabindex\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tthis.container.setAttribute(\"tabindex\", \"0\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\t\t_getNode: function(row, col){\r\n\t\t\treturn this.container.querySelector(\".dhx_year_body tr:nth-child(\"+(row + 1) + \") td:nth-child(\"+(col + 1)+\")\");\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\treturn this._getNode(this.row, this.col);\r\n\t\t},\r\n\r\n\t\t_getGrid: function(){\r\n\t\t\tvar rows = this.container.querySelectorAll(\".dhx_year_body tr\");\r\n\t\t\tvar grid = [];\r\n\t\t\tfor(var i = 0; i < rows.length; i++){\r\n\t\t\t\tgrid[i] = [];\r\n\t\t\t\tvar row = rows[i];\r\n\t\t\t\tvar cells = row.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var c = 0; c < cells.length; c++){\r\n\t\t\t\t\tvar cell = cells[c];\r\n\t\t\t\t\tvar enabled = true;\r\n\t\t\t\t\tvar css = scheduler._getClassName(cell);\r\n\t\t\t\t\tif(css.indexOf(\"dhx_after\") > -1 || css.indexOf(\"dhx_before\") > -1 || css.indexOf(\"dhx_scale_ignore\") > -1){\r\n\t\t\t\t\t\tenabled = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tgrid[i][c] = enabled;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn grid;\r\n\t\t},\r\n\r\n\r\n\t\tkeys: {\r\n\t\t\t\"right\": function(e){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row;\r\n\t\t\t\tvar newCol = this.col + 1;\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tif(grid[newRow + 1]){\r\n\t\t\t\t\t\tnewRow = newRow + 1;\r\n\t\t\t\t\t\tnewCol = 0;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnewCol = this.col;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"left\": function(e){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row;\r\n\t\t\t\tvar newCol = this.col - 1;\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tif(grid[newRow - 1]){\r\n\t\t\t\t\t\tnewRow = newRow - 1;\r\n\t\t\t\t\t\tnewCol = grid[newRow].length - 1;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnewCol = this.col;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"down\": function(){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row + 1;\r\n\t\t\t\tvar newCol = this.col;\r\n\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tnewRow = this.row;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"up\": function(){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row - 1;\r\n\t\t\t\tvar newCol = this.col;\r\n\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tvar index = 0;\r\n\t\t\t\t\tif(this.col > grid[this.row].length / 2){\r\n\t\t\t\t\t\tindex = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, index));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.moveTo(next);\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\t\t\t\"enter\": function(e){\r\n\t\t\t\tthis.getNode().querySelector(\".dhx_month_head\").click();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.MinicalCell.prototype.bindAll(scheduler.$keyboardNavigation.MinicalCell.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.DataArea = function(index){\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.DataArea.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\tgetNode: function(index){\r\n\t\t\treturn scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t},\r\n\r\n\t\t_handlers:null,\r\n\r\n\t\tisValid: function(){\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tfallback:function(){\r\n\t\t\treturn this;\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"up,down,right,left\":function(){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.DataArea.prototype.bindAll(scheduler.$keyboardNavigation.DataArea.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\n\r\n\r\n(function(){\r\n\tvar modalsStack = [];\r\n\r\n\tfunction isModal(){\r\n\t\treturn !!(modalsStack.length);\r\n\t}\r\n\r\n\tfunction isChildOf(child, parent){\r\n\t\twhile(child && child != parent){\r\n\t\t\tchild = child.parentNode;\r\n\t\t}\r\n\r\n\t\treturn !!(child == parent);\r\n\t}\r\n\r\n\tfunction afterPopup(box){\r\n\t\tsetTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif(!isModal() && !(isChildOf(document.activeElement, scheduler.$container))) {\r\n\t\t\t\tscheduler.focus();\r\n\t\t\t}\r\n\t\t}, 1);\r\n\t}\r\n\tfunction startModal(box){\r\n\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\tscheduler.event(box, \"keydown\", trapFocus);\r\n\t\tmodalsStack.push(box);\r\n\t\t//scheduler.$keyboardNavigation.dispatcher.disable();\r\n\t}\r\n\r\n\tfunction endModal(){\r\n\t\tvar box = modalsStack.pop();\r\n\t\tif(box) {\r\n\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t}\r\n\t\tafterPopup(box);\r\n\r\n\t}\r\n\r\n\tfunction isTopModal(box){\r\n\t//\tif(dhtmlx._modalsStack.length){\r\n\t//\t\treturn box == dhtmlx._modalsStack[dhtmlx._modalsStack.length - 1];\r\n\t//\t}else{\r\n\t\t\treturn box == modalsStack[modalsStack.length - 1];\r\n\t//\t}\r\n\r\n\t}\r\n\r\n\tfunction trapFocus(event){\r\n\t\tvar event = event || window.event;\r\n\t\tvar target = event.currentTarget;\r\n\t\tif(!isTopModal(target)) return;\r\n\r\n\t\tscheduler.$keyboardNavigation.trapFocus(target, event);\r\n\t}\r\n\r\n\tfunction traceLightbox(){\r\n\t\tstartModal(scheduler.getLightbox());\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onLightbox\", traceLightbox);\r\n\tscheduler.attachEvent(\"onAfterLightbox\", endModal);\r\n\r\n\tscheduler.attachEvent(\"onAfterQuickInfo\", function(){afterPopup();});\r\n\r\n\tif(!scheduler._keyNavMessagePopup) {\r\n\t\tscheduler._keyNavMessagePopup = true;\r\n\r\n\t\tvar focusElement = null;\r\n\t\tvar backupFocus = null;\r\n\t\tconst modalsStack = [];\r\n\t\tscheduler.attachEvent(\"onMessagePopup\", function(box){\r\n\t\t\tfocusElement = document.activeElement;\r\n\t\t\tbackupFocus = focusElement;\r\n\r\n\t\t\twhile(backupFocus && scheduler._getClassName(backupFocus).indexOf(\"dhx_cal_data\") < 0){\r\n\t\t\t\tbackupFocus = backupFocus.parentNode;\r\n\t\t\t}\r\n\t\t\tif(backupFocus){\r\n\t\t\t\tbackupFocus = backupFocus.parentNode;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t\tscheduler.event(box, \"keydown\", trapFocus);\r\n\t\t\tmodalsStack.push(box);\r\n\t\t});\r\n\r\n\r\n\t\tscheduler.attachEvent(\"onAfterMessagePopup\", function () {\r\n\t\t\tvar box = modalsStack.pop();\r\n\t\t\tif(box) {\r\n\t\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t\t}\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tvar currentTarget = document.activeElement;\r\n\t\t\t\twhile(currentTarget && scheduler._getClassName(currentTarget).indexOf(\"dhx_cal_light\") < 0){\r\n\t\t\t\t\tcurrentTarget = currentTarget.parentNode;\r\n\t\t\t\t}\r\n\t\t\t\tif(currentTarget)\r\n\t\t\t\t\treturn;\r\n\r\n\r\n\t\t\t\tif(focusElement && focusElement.parentNode){\r\n\t\t\t\t\tfocusElement.focus();\r\n\r\n\t\t\t\t}else if(backupFocus && backupFocus.parentNode){\r\n\t\t\t\t\tbackupFocus.focus();\r\n\t\t\t\t}\r\n\t\t\t\tfocusElement = null;\r\n\t\t\t\tbackupFocus = null;\r\n\r\n\t\t\t}, 1);\r\n\t\t});\r\n\t}\r\n\r\n\tscheduler.$keyboardNavigation.isModal = isModal;\r\n\r\n\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.dispatcher = {\r\n\tisActive: false,\r\n\tactiveNode: null,\r\n\tglobalNode: new scheduler.$keyboardNavigation.SchedulerNode(),\r\n\r\n\tkeepScrollPosition: function (callback) {\r\n\t\tvar top, left;\r\n\r\n\t\tvar scrollable = scheduler.$container.querySelector(\".dhx_timeline_scrollable_data\");\r\n\t\tif(!scrollable){\r\n\t\t\tscrollable = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t}\r\n\r\n\t\tif(scrollable){\r\n\t\t\ttop = scrollable.scrollTop;\r\n\t\t\tleft = scrollable.scrollLeft;\r\n\t\t}\r\n\r\n\t\tcallback();\r\n\r\n\t\tif(scrollable){\r\n\t\t\tscrollable.scrollTop = top;\r\n\t\t\tscrollable.scrollLeft = left;\r\n\t\t}\r\n\t},\r\n\tenable: function(){\r\n\t\tif(!scheduler.$container){\r\n\t\t\t// do nothing if not initialized\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.isActive = true;\r\n\t\tvar self = this;\r\n\t\tthis.keepScrollPosition(function () {\r\n\t\t\tself.globalNode.enable();\r\n\t\t\tself.setActiveNode(self.getActiveNode());\r\n\t\t});\r\n\t},\r\n\r\n\tdisable: function(){\r\n\t\tthis.isActive = false;\r\n\t\tthis.globalNode.disable();\r\n\t},\r\n\r\n\tisEnabled: function(){\r\n\t\treturn !!this.isActive;\r\n\t},\r\n\r\n\tgetDefaultNode: function(){\r\n\t\treturn this.globalNode.getDefaultNode();\r\n\t},\r\n\r\n\tsetDefaultNode: function() {\r\n\t\tthis.setActiveNode(this.getDefaultNode());\r\n\t},\r\n\r\n\tgetActiveNode: function(){\r\n\t\tvar node = this.activeNode;\r\n\t\tif(node && !node.isValid()){\r\n\t\t\tnode = node.fallback();\r\n\t\t}\r\n\t\treturn node;\r\n\t},\r\n\r\n\tfocusGlobalNode: function(){\r\n\t\tthis.blurNode(this.globalNode);\r\n\t\tthis.focusNode(this.globalNode);\r\n\t},\r\n\r\n\tsetActiveNode: function(el){\r\n\t\tif(!el || !el.isValid())\r\n\t\t\treturn;\r\n\r\n\t\tif(this.activeNode){\r\n\t\t\tif(this.activeNode.compareTo(el)){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(this.isEnabled()){\r\n\t\t\tthis.blurNode(this.activeNode);\r\n\t\t\tthis.activeNode = el;\r\n\t\t\tthis.focusNode(this.activeNode);\r\n\t\t}\r\n\t},\r\n\r\n\tfocusNode: function(el){\r\n\t\tif(el && el.focus){\r\n\t\t\tel.focus();\r\n\t\t\tif(el.getNode && document.activeElement != el.getNode()){\r\n\t\t\t\tthis.setActiveNode(new scheduler.$keyboardNavigation.DataArea());\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tblurNode: function(el){\r\n\t\tif(el && el.blur){\r\n\t\t\tel.blur();\r\n\t\t}\r\n\t},\r\n\r\n\tgetInlineEditor: function(id){\r\n\t\tvar editor = scheduler.$container.querySelector(\".dhx_cal_editor[\"+scheduler.config.event_attribute+\"='\"+id+\"'] textarea\");\r\n\t\tif(editor && editor.offsetWidth){\r\n\t\t\t// if exists and visible\r\n\t\t\treturn editor;\r\n\t\t}\r\n\t\treturn null;\r\n\t},\r\n\r\n\tkeyDownHandler: function (e) {\r\n\r\n\t\tif(e.defaultPrevented){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar activeElement = this.getActiveNode();\r\n\r\n\t\tif(scheduler.$keyboardNavigation.isModal() &&\r\n\t\t\t!(activeElement && activeElement.container && scheduler.utils.dom.locateCss({target:activeElement.container}, \"dhx_minical_popup\", false)))\r\n\t\t\treturn;\r\n\r\n\t\tif(scheduler.getState().editor_id && this.getInlineEditor(scheduler.getState().editor_id))\r\n\t\t\treturn;\r\n\r\n\t\tif (!this.isEnabled())\r\n\t\t\treturn;\r\n\r\n\t\te = e || window.event;\r\n\r\n\t\tvar schedulerNode = this.globalNode;\r\n\r\n\t\tvar command = scheduler.$keyboardNavigation.shortcuts.getCommandFromEvent(e);\r\n\r\n\t\tif(!activeElement){\r\n\t\t\tthis.setDefaultNode();\r\n\t\t}else if(activeElement.findHandler(command)){\r\n\t\t\tactiveElement.doAction(command, e);\r\n\t\t}else if(schedulerNode.findHandler(command)){\r\n\t\t\tschedulerNode.doAction(command, e);\r\n\t\t}\r\n\r\n\t},\r\n\r\n\t_timeout: null,\r\n\tdelay: function(callback, delay){\r\n\r\n\t\tclearTimeout(this._timeout);\r\n\t\tthis._timeout = setTimeout(callback, delay || 1);\r\n\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n//Initial idea and implementation by Steve MC\r\nscheduler._temp_key_scope = function (){\r\n\r\n\tscheduler.config.key_nav = true;\r\n\r\n\tscheduler.$keyboardNavigation._pasteDate = null; // used for copy and paste operations\r\n\tscheduler.$keyboardNavigation._pasteSection = null; // used for copy and paste operations\r\n\tvar isCopy = null;\r\n\r\n\tvar pos = {};\r\n\r\n\tif(!document.body){\r\n\t\tscheduler.event(window, \"load\", function(){\r\n\t\t\tscheduler.event(document.body, \"mousemove\", trackMousePosition);\r\n\t\t});\r\n\t}else{\r\n\t\tscheduler.event(document.body, \"mousemove\", trackMousePosition);\r\n\t}\r\n\r\n\tfunction trackMousePosition(event){\r\n\t\tevent = event || window.event;\r\n\t\tpos.x = event.clientX;\r\n\t\tpos.y = event.clientY;\r\n\t}\r\n\tfunction currentTarget(){\r\n\r\n\t\tvar mousePointer = false;\r\n\t\tvar keyNavPointer = false;\r\n\r\n\t\tvar target = document.elementFromPoint(pos.x, pos.y);\r\n\t\twhile(target && target != scheduler._obj){\r\n\t\t\ttarget = target.parentNode;\r\n\t\t}\r\n\t\tmousePointer = !!(target == scheduler._obj);\r\n\r\n\t\tkeyNavPointer = scheduler.$keyboardNavigation.dispatcher.isEnabled();\r\n\r\n\t\treturn mousePointer || keyNavPointer;\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onMouseMove\", function(id,e){\r\n\t\tvar state = scheduler.getState();\r\n\r\n\t\t// make sure scheduler is fully initialized before calling scheduler.getActionData\r\n\t\tif(!(state.mode && state.min_date)){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar position = scheduler.getActionData(e);\r\n\t\tscheduler.$keyboardNavigation._pasteDate = position.date;\r\n\t\tscheduler.$keyboardNavigation._pasteSection = position.section;\r\n\t});\r\n\r\n\tfunction clear_event_after(ev){\r\n\t\tdelete ev.rec_type; delete ev.rec_pattern;\r\n\t\tdelete ev.event_pid; delete ev.event_length;\r\n\t}\r\n\r\n\tfunction copyEvent(ev){\r\n\t\treturn scheduler._lame_copy({}, ev);\r\n\t}\r\n\r\n\tscheduler._make_pasted_event = function(ev){\r\n\t\tvar date = scheduler.$keyboardNavigation._pasteDate;\r\n\t\tvar section = scheduler.$keyboardNavigation._pasteSection;\r\n\r\n\t\tvar event_duration = ev.end_date-ev.start_date;\r\n\r\n\t\tvar copy = copyEvent(ev);\r\n\t\tclear_event_after(copy);\r\n\t\tcopy.start_date = new Date(date);\r\n\t\tcopy.end_date = new Date(copy.start_date.valueOf() + event_duration);\r\n\r\n\t\tif(section){\r\n\t\t\tvar property = scheduler._get_section_property();\r\n\t\t\t// GS-2527: if the event has multiple sections, it will be inserted into the initial sections.\r\n\t\t\tif(scheduler.config.multisection && ev[property] && scheduler.isMultisectionEvent && scheduler.isMultisectionEvent(ev)) \r\n\t\t\t\tcopy[property] = ev[property]; // save initial set of resources for multisection view\r\n\t\t\telse\r\n\t\t\t\tcopy[property] = section;\r\n\t\t}\r\n\t\treturn copy;\r\n\t};\r\n\tscheduler._do_paste = function(is_copy, modified_ev, original_ev){\r\n\t\tif(scheduler.callEvent(\"onBeforeEventPasted\", [is_copy, modified_ev, original_ev]) === false){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tscheduler.addEvent(modified_ev);\r\n\t\tscheduler.callEvent(\"onEventPasted\", [is_copy, modified_ev, original_ev]);\r\n\t};\r\n\r\n\tscheduler._is_key_nav_active = function(){\r\n\t\tif(this._is_initialized() && !this._is_lightbox_open() && this.config.key_nav){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\r\n\tfunction getSelectedEvent(){\r\n\t\tvar node = scheduler.$keyboardNavigation.dispatcher.getActiveNode();\r\n\t\tif(node && node.eventId) return node.eventId;\r\n\t\treturn scheduler._select_id;\r\n\t}\r\n\r\n\tscheduler.event(document, \"keydown\", function(e){\r\n\t\t// compatibility fix - scheduler focus on ctrl+v on mouse hover\r\n\t\tif(((e.ctrlKey || e.metaKey) && e.keyCode == 86) && scheduler._buffer_event && !scheduler.$keyboardNavigation.dispatcher.isEnabled()) {\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.isActive = currentTarget();\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler._key_nav_copy_paste = function(e){\r\n\t\tif(!scheduler._is_key_nav_active()) return true;\r\n\r\n\t\tif (e.keyCode == 37 || e.keyCode == 39) { // Left, Right arrows\r\n\t\t\te.cancelBubble = true;\r\n\r\n\t\t\tvar next = scheduler.date.add(scheduler._date,(e.keyCode == 37 ? -1 : 1 ),scheduler._mode);\r\n\t\t\tscheduler.setCurrentView(next);\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tvar select_id = getSelectedEvent();\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 67) { // CTRL+C\r\n\t\t\tif (select_id) {\r\n\t\t\t\tscheduler._buffer_event = copyEvent(scheduler.getEvent(select_id));\r\n\t\t\t\tisCopy = true;\r\n\t\t\t\tscheduler.callEvent(\"onEventCopied\", [scheduler.getEvent(select_id)]);\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 88) { // CTRL+X\r\n\t\t\tif (select_id) {\r\n\t\t\t\tisCopy = false;\r\n\t\t\t\tvar ev = scheduler._buffer_event = copyEvent(scheduler.getEvent(select_id));\r\n\r\n\t\t\t\tscheduler.updateEvent(ev.id);\r\n\t\t\t\tscheduler.callEvent(\"onEventCut\", [ev]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 86 && currentTarget(e)) { // CTRL+V\r\n\t\t\tvar ev = scheduler._buffer_event ? scheduler.getEvent(scheduler._buffer_event.id) : scheduler._buffer_event;\r\n\t\t\tev = ev || scheduler._buffer_event;\r\n\r\n\t\t\tif (ev) {\r\n\t\t\t\tvar new_ev = scheduler._make_pasted_event(ev);\r\n\t\t\t\tif (isCopy) {\r\n\t\t\t\t\tnew_ev.id = scheduler.uid();\r\n\t\t\t\t\tscheduler._do_paste(isCopy, new_ev, ev);\r\n\t\t\t\t}\r\n\t\t\t\telse { // cut operation\r\n\t\t\t\t\tvar res = scheduler.callEvent(\"onBeforeEventChanged\",[new_ev, e, false, ev]);\r\n\t\t\t\t\tif (res) {\r\n\t\t\t\t\t\tscheduler._do_paste(isCopy, new_ev, ev);\r\n\t\t\t\t\t\tisCopy = true; // switch to copy after first paste operation\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t};\r\n};\r\nscheduler._temp_key_scope();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.attachSchedulerHandlers = function(){\r\n\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\tvar keyDownHandler = function(e){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\r\n\t\treturn dispatcher.keyDownHandler(e);\r\n\t};\r\n\r\n\tvar focusHandler = function () {\r\n\t\tdispatcher.keepScrollPosition(function () {\r\n\t\t\tdispatcher.focusGlobalNode();\r\n\t\t});\r\n\t};\r\n\r\n\tvar waitCall;\r\n\tscheduler.attachEvent(\"onDataRender\", function(){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\t\tif(!(dispatcher.isEnabled() && !scheduler.getState().editor_id)) return;\r\n\r\n\t\tclearTimeout(waitCall);\r\n\t\twaitCall = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif(!dispatcher.isEnabled())\r\n\t\t\t\tdispatcher.enable();\r\n\t\t\treFocusActiveNode();\r\n\t\t});\r\n\t});\r\n\r\n\tvar reFocusActiveNode = function(){\r\n\t\tif(!dispatcher.isEnabled())\r\n\t\t\treturn;\r\n\r\n\t\tvar activeNode = dispatcher.getActiveNode();\r\n\t\tif(!activeNode)\r\n\t\t\treturn;\r\n\r\n\t\tif(!activeNode.isValid()){\r\n\t\t\tactiveNode = activeNode.fallback();\r\n\t\t}\r\n\r\n\t\tif(!activeNode || activeNode instanceof scheduler.$keyboardNavigation.MinicalButton || activeNode instanceof scheduler.$keyboardNavigation.MinicalCell)\r\n\t\t\treturn;\r\n\r\n\t\tdispatcher.keepScrollPosition(function () {\r\n\t\t\tactiveNode.focus(true);\r\n\t\t});\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\tvar container = scheduler.$container;\r\n\t\tscheduler.eventRemove(document, \"keydown\", keyDownHandler);\r\n\t\tscheduler.eventRemove(container, \"mousedown\", mousedownHandler);\r\n\t\tscheduler.eventRemove(container, \"focus\", focusHandler);\r\n\r\n\r\n\t\tif(scheduler.config.key_nav){\r\n\r\n\t\t\tscheduler.event(document, \"keydown\", keyDownHandler);\r\n\t\t\tscheduler.event(container, \"mousedown\", mousedownHandler);\r\n\t\t\tscheduler.event(container, \"focus\", focusHandler);\r\n\r\n\t\t\tcontainer.setAttribute(\"tabindex\", \"0\");\r\n\r\n\t\t}else{\r\n\t\t\tcontainer.removeAttribute(\"tabindex\");\r\n\t\t}\r\n\t});\r\n\r\n\tfunction mousedownHandler(e){\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\r\n\t\tconst view = scheduler.getView();\r\n\t\tlet dataAreaClick = false;\r\n\t\tif (scheduler.getState().mode === \"month\") {\r\n\t\t\tdataAreaClick = scheduler.$keyboardNavigation.isChildOf(e.target || e.srcElement, scheduler.$container.querySelector(\".dhx_cal_month_table\"));\r\n\t\t} else if (view && view.layout === \"timeline\") {\r\n\t\t\tdataAreaClick = scheduler.$keyboardNavigation.isChildOf(e.target || e.srcElement, scheduler.$container.querySelector(\".dhx_timeline_data_col\"));\r\n\t\t} else {\r\n\t\t\tconst listOfScales = scheduler.$container.querySelectorAll(\".dhx_scale_holder\");\r\n\t\t\tconst arrOfScales = Array.from(listOfScales);\r\n\t\t\tdataAreaClick = arrOfScales.some(scale => scale === e.target.parentNode);\r\n\t\t}\r\n\r\n\t\tvar pos = scheduler.getActionData(e);\r\n\r\n\t\tvar focusNode;\r\n\t\tif(scheduler._locate_event(e.target || e.srcElement)){\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.Event(scheduler._locate_event(e.target || e.srcElement));\r\n\t\t}else if(dataAreaClick){\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(pos.date && dataAreaClick){\r\n\t\t\t\tfocusNode = focusNode.nextSlot(new scheduler.$keyboardNavigation.TimeSlot(pos.date, null, pos.section));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(focusNode) {\r\n\t\t\tif (!dispatcher.isEnabled()) {\r\n\t\t\t\tdispatcher.activeNode = focusNode;\r\n\r\n\t\t\t} else {\r\n\t\t\t\tif (pos.date && dataAreaClick) {\r\n\t\t\t\t\tdispatcher.delay(function () {\r\n\t\t\t\t\t\tdispatcher.setActiveNode(focusNode);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction focusEvent(evNode){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\t\tif(!dispatcher.isEnabled()) return;\r\n\r\n\r\n\t\tvar prevState = evNode;\r\n\t\tvar focusNode = new scheduler.$keyboardNavigation.Event(prevState.eventId);\r\n\t\tif(!focusNode.isValid()){\r\n\t\t\tvar lastStart = focusNode.start || prevState.start;\r\n\t\t\tvar lastEnd = focusNode.end || prevState.end;\r\n\t\t\tvar lastSection = focusNode.section || prevState.section;\r\n\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot(lastStart, lastEnd, lastSection);\r\n\t\t\tif(!focusNode.isValid()){\r\n\t\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdispatcher.setActiveNode(focusNode);\r\n\t\tvar node = dispatcher.getActiveNode();\r\n\t\tif(node && node.getNode && document.activeElement != node.getNode()){\r\n\t\t\tdispatcher.focusNode(dispatcher.getActiveNode());\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tvar updateEvent = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id){\r\n\t\tvar res = updateEvent.apply(this, arguments);\r\n\t\tif(scheduler.config.key_nav && dispatcher.isEnabled()){\r\n\t\t\tif(scheduler.getState().select_id == id){\r\n\t\t\t\tvar element = new scheduler.$keyboardNavigation.Event(id);\r\n\r\n\t\t\t\tif(!scheduler.getState().lightbox_id){\r\n\t\t\t\t\tfocusEvent(element);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onEventDeleted\", function(id) {\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\t\tif(dispatcher.isEnabled()){\r\n\t\t\tvar activeNode = dispatcher.getActiveNode();\r\n\t\t\tif(activeNode.eventId == id){\r\n\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onClearAll\", function(){\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\t\tif(dispatcher.isEnabled()){\r\n\t\t\tif(dispatcher.getActiveNode() instanceof scheduler.$keyboardNavigation.Event){\r\n\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation._minicalendars = [];\r\n\r\nscheduler.$keyboardNavigation.isMinical = function(node){\r\n\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\tif(this.isChildOf(node, minicalendars[i]))\r\n\t\t\treturn true;\r\n\t}\r\n\treturn false;\r\n};\r\n\r\nscheduler.$keyboardNavigation.isChildOf = function(child, parent){\r\n\twhile(child && child !== parent){\r\n\t\tchild = child.parentNode;\r\n\t}\r\n\r\n\treturn !!(child === parent);\r\n};\r\n\r\nscheduler.$keyboardNavigation.patchMinicalendar = function(){\r\n\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\tfunction focusMinical(e){\r\n\t\tvar target = e.target;\r\n\r\n\t\tdispatcher.enable();\r\n\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.MinicalButton(target, 0));\r\n\t}\r\n\r\n\tfunction minicalClick(e){\r\n\t\tvar target = e.target || e.srcElement;\r\n\r\n\t\tvar prev = scheduler.utils.dom.locateCss(e, \"dhx_cal_prev_button\", false);\r\n\t\tvar next = scheduler.utils.dom.locateCss(e, \"dhx_cal_next_button\", false);\r\n\t\tvar cell = scheduler.utils.dom.locateCss(e, \"dhx_year_body\", false);\r\n\r\n\t\tvar rowIndex = 0;\r\n\t\tvar cellIndex = 0;\r\n\t\tif(cell){\r\n\t\t\tvar tr;\r\n\t\t\tvar td;\r\n\t\t\tvar current = target;\r\n\t\t\twhile(current && current.tagName.toLowerCase() != \"td\"){\r\n\t\t\t\tcurrent = current.parentNode;\r\n\t\t\t}\r\n\t\t\tif(current){\r\n\t\t\t\ttd = current;\r\n\t\t\t\ttr = td.parentNode;\r\n\t\t\t}\r\n\r\n\t\t\tif(tr && td){\r\n\t\t\t\tvar rows = tr.parentNode.querySelectorAll(\"tr\");\r\n\t\t\t\tfor(var i = 0; i < rows.length; i++){\r\n\t\t\t\t\tif(rows[i] == tr){\r\n\t\t\t\t\t\trowIndex = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tvar cells = tr.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\t\t\tif(cells[i] == td){\r\n\t\t\t\t\t\tcellIndex = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar root = e.currentTarget;\r\n\t\tdispatcher.delay(function(){\r\n\t\t\tif(prev || next || cell){\r\n\r\n\t\t\t\tvar element;\r\n\t\t\t\tif(prev){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalButton(root, 0);\r\n\t\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.MinicalButton(root, 0));\r\n\t\t\t\t}else if(next){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalButton(root, 1);\r\n\t\t\t\t}else if(cell){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalCell(root, rowIndex, cellIndex);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(element){\r\n\r\n\t\t\t\t\tdispatcher.enable();\r\n\t\t\t\t\tif(element.isValid()){\r\n\t\t\t\t\t\tdispatcher.activeNode = null;\r\n\t\t\t\t\t\tdispatcher.setActiveNode(element);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t}\r\n\r\n\tif(scheduler.renderCalendar){\r\n\t\tvar renderMinical = scheduler.renderCalendar;\r\n\t\tscheduler.renderCalendar = function(){\r\n\t\t\tvar cal = renderMinical.apply(this, arguments);\r\n\t\t\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\r\n\t\t\tscheduler.eventRemove(cal, \"click\", minicalClick);\r\n\t\t\tscheduler.event(cal, \"click\", minicalClick);\r\n\r\n\t\t\tscheduler.eventRemove(cal, \"focus\", focusMinical);\r\n\t\t\tscheduler.event(cal, \"focus\", focusMinical);\r\n\r\n\t\t\tvar added = false;\r\n\t\t\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\t\t\tif(minicalendars[i] == cal){\r\n\t\t\t\t\tadded = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(!added)\r\n\t\t\t\tminicalendars.push(cal);\r\n\r\n\t\t\tif(dispatcher.isEnabled()){\r\n\t\t\t\tvar node = dispatcher.getActiveNode();\r\n\t\t\t\tif(node && node.container == cal){\r\n\t\t\t\t\tdispatcher.focusNode(node);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcal.setAttribute(\"tabindex\", \"0\");\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tcal.setAttribute(\"tabindex\", \"0\");\r\n\t\t\t}\r\n\t\t\treturn cal;\r\n\t\t};\r\n\t}\r\n\r\n\tif(scheduler.destroyCalendar){\r\n\t\tvar destroyMinical = scheduler.destroyCalendar;\r\n\t\tscheduler.destroyCalendar = function(cal, force){\r\n\t\t\tcal = cal || (scheduler._def_count ? scheduler._def_count.firstChild : null);\r\n\t\t\tvar res = destroyMinical.apply(this, arguments);\r\n\r\n\t\t\tif(!cal || !cal.parentNode){\r\n\t\t\t\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\t\t\t\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\t\t\t\tif(minicalendars[i] == cal){\r\n\t\t\t\t\t\tscheduler.eventRemove(minicalendars[i], \"focus\", focusMinical);\r\n\t\t\t\t\t\tminicalendars.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn res;\r\n\t\t};\r\n\t}\r\n};\r\n\r\n}","import keyboard_shortcuts from \"./keyboard_navigation/common/keyboard_shortcuts\";\r\nimport eventhandler from \"./keyboard_navigation/common/eventhandler\";\r\nimport trap_modal_focus from \"./keyboard_navigation/common/trap_modal_focus\";\r\nimport marker from \"./keyboard_navigation/marker\";\r\nimport scheduler_node from \"./keyboard_navigation/elements/scheduler_node\";\r\nimport nav_node from \"./keyboard_navigation/elements/nav_node\";\r\nimport header_cell from \"./keyboard_navigation/elements/header_cell\";\r\nimport event from \"./keyboard_navigation/elements/event\";\r\nimport time_slot from \"./keyboard_navigation/elements/time_slot\";\r\nimport minical_button from \"./keyboard_navigation/elements/minical_button\";\r\nimport minical_cell from \"./keyboard_navigation/elements/minical_cell\";\r\nimport data_area from \"./keyboard_navigation/elements/data_area\";\r\nimport modals from \"./keyboard_navigation/modals\";\r\nimport core from \"./keyboard_navigation/core\";\r\nimport key_nav_legacy from \"./keyboard_navigation/key_nav_legacy\";\r\n\r\n\r\nimport scheduler_handlers from \"./keyboard_navigation/scheduler_handlers\";\r\nimport minical_handlers from \"./keyboard_navigation/minical_handlers\";\r\n\r\nexport default function(scheduler){\r\n\t\tscheduler.config.key_nav = true;\r\n\t\tscheduler.config.key_nav_step = 30;\r\n\t\tscheduler.addShortcut = function(shortcut, handler, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tscopeObject.prototype.bind(shortcut, handler);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.getShortcutHandler = function(shortcut, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tvar commands = scheduler.$keyboardNavigation.shortcuts.parse(shortcut);\r\n\t\t\t\tif(commands.length){\r\n\t\t\t\t\treturn scopeObject.prototype.findHandler(commands[0]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.removeShortcut = function(shortcut, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tscopeObject.prototype.unbind(shortcut);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.focus = function(){\r\n\t\t\tif(!scheduler.config.key_nav){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar disp = scheduler.$keyboardNavigation.dispatcher;\r\n\t\t\tdisp.enable();\r\n\t\t\tvar activeNode = disp.getActiveNode();\r\n\t\t\tif(!activeNode || activeNode instanceof scheduler.$keyboardNavigation.MinicalButton || activeNode instanceof scheduler.$keyboardNavigation.MinicalCell){\r\n\t\t\t\tdisp.setDefaultNode();\r\n\t\t\t}else{\r\n\t\t\t\tdisp.focusNode(disp.getActiveNode());\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfunction getScope(mode){\r\n\t\t\tvar scopes = {\r\n\t\t\t\t\"minicalButton\":scheduler.$keyboardNavigation.MinicalButton,\r\n\t\t\t\t\"minicalDate\":scheduler.$keyboardNavigation.MinicalCell,\r\n\t\t\t\t\"scheduler\":scheduler.$keyboardNavigation.SchedulerNode,\r\n\t\t\t\t\"dataArea\": scheduler.$keyboardNavigation.DataArea,\r\n\t\t\t\t\"timeSlot\": scheduler.$keyboardNavigation.TimeSlot,\r\n\t\t\t\t\"event\": scheduler.$keyboardNavigation.Event\r\n\t\t\t};\r\n\r\n\t\t\tvar searchMap = {};\r\n\t\t\tfor(var i in scopes)\r\n\t\t\t\tsearchMap[i.toLowerCase()] = scopes[i];\r\n\r\n\t\t\tmode = (mode + \"\").toLowerCase();\r\n\r\n\t\t\treturn searchMap[mode] || scopes.scheduler;\r\n\t\t}\r\n\r\n\t\tscheduler.$keyboardNavigation = {};\r\n\r\n\t\tscheduler._compose = function(){\r\n\t\t\tvar parts = Array.prototype.slice.call(arguments, 0);\r\n\t\t\tvar res = {};\r\n\t\t\tfor(var i = 0; i < parts.length; i++){\r\n\t\t\t\tvar obj = parts[i];\r\n\t\t\t\tif(typeof obj == \"function\"){\r\n\t\t\t\t\tobj = new obj();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor(var p in obj){\r\n\t\t\t\t\tres[p] = obj[p];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\t\t};\r\n\r\n\t\tkeyboard_shortcuts(scheduler);\r\n\t\teventhandler(scheduler);\r\n\t\ttrap_modal_focus(scheduler);\r\n\t\tmarker(scheduler);\r\n\t\tscheduler_node(scheduler);\r\n\t\tnav_node(scheduler);\r\n\t\theader_cell(scheduler);\r\n\t\tevent(scheduler);\r\n\t\ttime_slot(scheduler);\r\n\t\tminical_button(scheduler);\r\n\t\tminical_cell(scheduler);\r\n\t\tdata_area(scheduler);\r\n\t\tmodals(scheduler);\r\n\t\tcore(scheduler);\r\n\t\tkey_nav_legacy(scheduler);\r\n\r\n\t\t(function(){\r\n\t\t\tscheduler_handlers(scheduler);\r\n\t\t\tminical_handlers(scheduler);\r\n\r\n\t\t\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\t\t\tscheduler.$keyboardNavigation.attachSchedulerHandlers();\r\n\r\n\t\t\tif(scheduler.renderCalendar){\r\n\t\t\t\t// if minical ext loaded before key nav ext - patch it now\r\n\t\t\t\tscheduler.$keyboardNavigation.patchMinicalendar();\r\n\t\t\t}else{\r\n\t\t\t\t// otherwise - wait until everything is loaded and try again\r\n\t\t\t\tvar attachOnce = scheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\t\t\t\tscheduler.detachEvent(attachOnce);\r\n\t\t\t\t\tscheduler.$keyboardNavigation.patchMinicalendar();\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\tfunction isSchedulerSelected(){\r\n\t\t\t\tif(!scheduler.config.key_nav) return;\r\n\r\n\t\t\t\tvar enable;\r\n\t\t\t\tvar focusElement = document.activeElement;\r\n\t\t\t\t// halt key nav when focus is outside scheduler or in quick info popup\r\n\t\t\t\tif(!focusElement || scheduler.utils.dom.locateCss(focusElement, \"dhx_cal_quick_info\", false)){\r\n\t\t\t\t\tenable = false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tenable = scheduler.$keyboardNavigation.isChildOf(focusElement, scheduler.$container) || scheduler.$keyboardNavigation.isMinical(focusElement);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn enable;\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\tfunction changeState(enable){\r\n\t\t\t\tif(enable && !dispatcher.isEnabled()){\r\n\t\t\t\t\tdispatcher.enable();\r\n\t\t\t\t}else if(!enable && dispatcher.isEnabled()){\r\n\t\t\t\t\tdispatcher.disable();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tconst intervalId = setInterval(function(){\r\n\t\t\t\tif(!scheduler.$container || !scheduler.$keyboardNavigation.isChildOf(scheduler.$container, document.body)){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar enable = isSchedulerSelected();\r\n\r\n\t\t\t\tif(enable){\r\n\t\t\t\t\tchangeState(enable);\r\n\t\t\t\t}else if(!enable && dispatcher.isEnabled()){\r\n\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// doublecheck in case checking is done in handler before focus element is repainted\r\n\t\t\t\t\t\tif(scheduler.config.key_nav){\r\n\t\t\t\t\t\t\tchangeState(isSchedulerSelected());\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tscheduler.$container.removeAttribute(\"tabindex\");\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}, 100);\r\n\t\t\t\t}\r\n\t\t\t}, 500);\r\n\t\t\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\t\t\tclearInterval(intervalId);\r\n\t\t\t});\r\n\t\t})();\r\n\t}\r\n\r\n\r\n","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\r\n\tthis.layers.sort(function(a, b){\r\n\t\treturn a.zIndex - b.zIndex;\r\n\t});\r\n\r\n\tscheduler._dp_init=function(dp){\r\n\t\tdp._methods=[\"_set_event_text_style\",\"\",\"changeEventId\",\"deleteEvent\"];\r\n\r\n\t\tthis.attachEvent(\"onEventAdded\",function(id){\r\n\t\t\tif (!this._loading && this.validId(id) && this.getEvent(id) && this.getEvent(id).layer == dp.layer)\r\n\t\t\t\tdp.setUpdated(id,true,\"inserted\");\r\n\t\t});\r\n\t\tthis.attachEvent(\"onBeforeEventDelete\",function(id){\r\n\t\t\tif(this.getEvent(id) && this.getEvent(id).layer == dp.layer) {\r\n\t\t\t\tif (!this.validId(id)) return;\r\n\t\t\t\tvar z=dp.getState(id);\r\n\r\n\t\t\t\tif (z==\"inserted\" || this._new_event) { dp.setUpdated(id,false);\t\treturn true; }\r\n\t\t\t\tif (z==\"deleted\") return false;\r\n\t\t\t\tif (z==\"true_deleted\") return true;\r\n\r\n\t\t\t\tdp.setUpdated(id,true,\"deleted\");\r\n\t\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\telse return true;\r\n\t\t});\r\n\t\tthis.attachEvent(\"onEventChanged\",function(id){\r\n\t\t\tif (!this._loading && this.validId(id) && this.getEvent(id) && this.getEvent(id).layer == dp.layer)\r\n\t\t\t\tdp.setUpdated(id,true,\"updated\");\r\n\t\t});\r\n\r\n\t\tdp._getRowData=function(id,pref){\r\n\t\t\tvar ev=this.obj.getEvent(id);\r\n\t\t\tvar data = {};\r\n\r\n\t\t\tfor (var a in ev){\r\n\t\t\t\tif (a.indexOf(\"_\")===0) continue;\r\n\t\t\t\tif (ev[a] && ev[a].getUTCFullYear) //not very good, but will work\r\n\t\t\t\t\tdata[a] = this.obj._helpers.formatDate(ev[a]);\r\n\t\t\t\telse\r\n\t\t\t\t\tdata[a] = ev[a];\r\n\t\t\t}\r\n\t\t\treturn data;\r\n\t\t};\r\n\t\tdp._clearUpdateFlag=function(){};\r\n\r\n\t\tdp.attachEvent(\"insertCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"updateCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"deleteCallback\", function(upd, id) {\r\n\t\t\tthis.obj.setUserData(id, this.action_param, \"true_deleted\");\r\n\t\t\tthis.obj.deleteEvent(id);\r\n\t\t});\r\n\t};\r\n\r\n\t(function() {\r\n var _cloneObj = function(obj){\r\n if(obj === null || typeof(obj) != 'object')\r\n return obj;\r\n var temp = new obj.constructor();\r\n for(var key in obj)\r\n temp[key] = _cloneObj(obj[key]);\r\n return temp;\r\n };\r\n\r\n\t\tscheduler._dataprocessors = [];\r\n\t\tscheduler._layers_zindex = {};\r\n\t\tfor(var i=0; i= scheduler.config.collision_limit);\r\n\t});\r\n\r\n\tscheduler.addEvent=function(start_date,end_date,text,id,extra_data){\r\n\t\tvar ev=start_date;\r\n\t\tif (arguments.length!=1){\r\n\t\t\tev=extra_data||{};\r\n\t\t\tev.start_date=start_date;\r\n\t\t\tev.end_date=end_date;\r\n\t\t\tev.text=text;\r\n\t\t\tev.id=id;\r\n\t\t\tev.layer = this.defaultLayer;\r\n\t\t}\r\n\t\tev.id = ev.id||scheduler.uid();\r\n\t\tev.text = ev.text||\"\";\r\n\r\n\r\n\t\tif (typeof ev.start_date == \"string\") ev.start_date=this.templates.api_date(ev.start_date);\r\n\t\tif (typeof ev.end_date == \"string\") ev.end_date=this.templates.api_date(ev.end_date);\r\n\t\tev._timed=this.isOneDayEvent(ev);\r\n\r\n\t\tvar is_new=!this._events[ev.id];\r\n\t\tthis._events[ev.id]=ev;\r\n\t\tthis.event_updated(ev);\r\n\t\tif (!this._loading)\r\n\t\t\tthis.callEvent(is_new?\"onEventAdded\":\"onEventChanged\",[ev.id,ev]);\r\n\t};\r\n\r\n\tthis._evs_layer = {};\r\n\tfor (var i = 0; i < this.layers.length; i++) { // array in object for each layer\r\n\t\tthis._evs_layer[this.layers[i].name] = [];\r\n\t}\r\n\r\n\tscheduler.addEventNow=function(start,end,e){\r\n\t\tvar base = {};\r\n\t\tif (typeof start == \"object\"){\r\n\t\t\tbase = start;\r\n\t\t\tstart = null;\r\n\t\t}\r\n\r\n\t\tvar d = (this.config.event_duration||this.config.time_step)*60000;\r\n\t\tif (!start) start = Math.round((scheduler._currentDate()).valueOf()/d)*d;\r\n\t\tvar start_date = new Date(start);\r\n\t\tif (!end){\r\n\t\t\tvar start_hour = this.config.first_hour;\r\n\t\t\tif (start_hour > start_date.getHours()){\r\n\t\t\t\tstart_date.setHours(start_hour);\r\n\t\t\t\tstart = start_date.valueOf();\r\n\t\t\t}\r\n\t\t\tend = start+d;\r\n\t\t}\r\n\r\n\r\n\t\tbase.start_date = base.start_date||start_date;\r\n\t\tbase.end_date = base.end_date||new Date(end);\r\n\t\tbase.text = base.text||this.locale.labels.new_event;\r\n\t\tbase.id = this._drag_id = this.uid();\r\n\t\tbase.layer = this.defaultLayer;\r\n\t\tthis._drag_mode=\"new-size\";\r\n\r\n\t\tthis._loading=true;\r\n\t\tthis.addEvent(base);\r\n\t\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\t\tthis._loading=false;\r\n\r\n\t\tthis._drag_event={}; //dummy , to trigger correct event updating logic\r\n\t\tthis._on_mouse_up(e);\r\n\t};\r\n\r\n\tscheduler._t_render_view_data = function(events) { // helper\r\n\t\tif (this.config.multi_day && !this._table_view) {\r\n\t\t\tvar tvs = [];\r\n\t\t\tvar tvd = [];\r\n\t\t\tfor (var k = 0; k < events.length; k++) {\r\n\t\t\t\tif (events[k]._timed)\r\n\t\t\t\t\ttvs.push(events[k]);\r\n\t\t\t\telse\r\n\t\t\t\t\ttvd.push(events[k]);\r\n\t\t\t}\r\n\t\t\tthis._table_view = true;\r\n\t\t\tthis.render_data(tvd);\r\n\t\t\tthis._table_view = false;\r\n\t\t\tthis.render_data(tvs);\r\n\t\t}\r\n\t\telse\r\n\t\t\tthis.render_data(events);\r\n\t};\r\n\r\n\tscheduler.render_view_data = function(){\r\n\t\tif (this._not_render) {\r\n\t\t\tthis._render_wait = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._render_wait = false;\r\n\r\n\t\tthis.clear_view();\r\n\r\n\t\tthis._evs_layer = {};\r\n\t\tfor (var i = 0; i < this.layers.length; i++) { // array in object for each layer\r\n\t\t\tthis._evs_layer[this.layers[i].name] = [];\r\n\t\t}\r\n\r\n\t\tvar evs = this.get_visible_events();\r\n\t\tfor (var i = 0; i < evs.length; i++) { // filling layer arrays with events\r\n\t\t\tif(this._evs_layer[evs[i].layer])\r\n\t\t\t\tthis._evs_layer[evs[i].layer].push(evs[i]);\r\n\t\t}\r\n\r\n\t\tif(this._mode == 'month') { // old logic is used\r\n\t\t\tvar tevs = [];\r\n\t\t\tfor (var i = 0; i < this.layers.length; i++) {\r\n\t\t\t\tif (this.layers[i].visible)\r\n\t\t\t\t\ttevs = tevs.concat(this._evs_layer[this.layers[i].name]);\r\n\t\t\t}\r\n\t\t\tthis._t_render_view_data(tevs);\r\n\t\t}\r\n\t\telse { // week, day; should use new logic\r\n\t\t\tfor (var i = 0; i < this.layers.length; i++) {\r\n\t\t\t\tif (this.layers[i].visible) {\r\n\t\t\t\t\tvar evs_layer = this._evs_layer[this.layers[i].name];\r\n\t\t\t\t\tthis._t_render_view_data(evs_layer);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._render_v_bar=function(ev,x,y,w,h,style,contentA,contentB,bottom){\r\n\t\tvar id = ev.id;\r\n\r\n\t\tif(contentA.indexOf('
';\r\n\t\thtml+='
 
';\r\n\t\thtml+='
'+contentA+'
';\r\n\t\thtml+='
'+contentB+'
';\r\n\t\thtml+='
';\r\n\r\n\t\td.innerHTML=html;\r\n\t\td.style.zIndex = 100;\r\n\t\treturn d.firstChild;\r\n\t};\r\n\r\n\tscheduler.render_event_bar=function(ev){\r\n\t\tvar parent=this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tvar x=this._colsS[ev._sday];\r\n\t\tvar x2=this._colsS[ev._eday];\r\n\t\tif (x2==x) x2=this._colsS[ev._eday+1];\r\n\t\tvar hb = this.xy.bar_height;\r\n\r\n\t\tvar y=this._colsS.heights[ev._sweek]+(this._colsS.height?(this.xy.month_scale_height+2):2)+ev._sorder*hb;\r\n\r\n\t\tvar d=document.createElement(\"div\");\r\n\t\tvar cs = ev._timed?\"dhx_cal_event_clear\":\"dhx_cal_event_line\";\r\n\t\tvar cse = (scheduler.templates['event_class_'+ev.layer])?scheduler.templates['event_class_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_class(ev.start_date,ev.end_date,ev);\r\n\t\tif (cse) cs=cs+\" \"+cse;\r\n\r\n\t\tvar html='
';\r\n\r\n\t\tif (ev._timed)\r\n\t\t\thtml+=(scheduler.templates['event_bar_date_'+ev.layer])?scheduler.templates['event_bar_date_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_bar_date(ev.start_date,ev.end_date,ev);\r\n\t\thtml+=( (scheduler.templates['event_bar_text_'+ev.layer])?scheduler.templates['event_bar_text_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_bar_text(ev.start_date,ev.end_date,ev) + '
)');\r\n\t\thtml+='
';\r\n\r\n\t\td.innerHTML=html;\r\n\r\n\t\tthis._rendered.push(d.firstChild);\r\n\t\tparent.appendChild(d.firstChild);\r\n\t};\r\n\r\n\tscheduler.render_event=function(ev){\r\n\t\tvar menu = scheduler.xy.menu_width;\r\n\t\tif(scheduler.getLayer(ev.layer).noMenu)\r\n\t\t\tmenu = 0;\r\n\r\n\t\tif (ev._sday<0) return; //can occur in case of recurring event during time shift\r\n\t\tvar parent=scheduler.locate_holder(ev._sday);\r\n\t\tif (!parent) return; //attempt to render non-visible event\r\n\t\tvar sm = ev.start_date.getHours()*60+ev.start_date.getMinutes();\r\n\t\tvar em = (ev.end_date.getHours()*60+ev.end_date.getMinutes())||(scheduler.config.last_hour*60);\r\n\r\n\t\tvar top = (Math.round((sm*60*1000-this.config.first_hour*60*60*1000)*this.config.hour_size_px/(60*60*1000)))%(this.config.hour_size_px*24)+1; //42px/hour\r\n\t\tvar height = Math.max(scheduler.xy.min_event_height,(em-sm)*this.config.hour_size_px/60)+1; //42px/hour\r\n\t\t\r\n\t\tvar width=Math.floor((parent.clientWidth-menu)/ev._count);\r\n\t\tvar left=ev._sorder*width+1;\r\n\t\tif (!ev._inner) width=width*(ev._count-ev._sorder);\r\n\r\n\r\n\r\n\t\tvar d=this._render_v_bar(ev.id,menu+left,top,width,height,ev._text_style,scheduler.templates.event_header(ev.start_date,ev.end_date,ev),scheduler.templates.event_text(ev.start_date,ev.end_date,ev));\r\n\r\n\t\tthis._rendered.push(d);\r\n\t\tparent.appendChild(d);\r\n\r\n\t\tleft=left+parseInt(parent.style.left,10)+menu;\r\n\r\n\t\ttop+=this._dy_shift; //corrupt top, to include possible multi-day shift\r\n\t\td.style.zIndex = this._layers_zindex[ev.layer];\r\n\r\n\t\tif (this._edit_id==ev.id){\r\n\t\t\td.style.zIndex = parseInt(d.style.zIndex)+1; //fix overlapping issue\r\n\t\t\tvar new_zIndex = d.style.zIndex;\r\n\t\t\twidth=Math.max(width-4,scheduler.xy.editor_width);\r\n\t\t\tvar d=document.createElement(\"div\");\r\n\t\t\td.setAttribute(\"event_id\",ev.id); // for backward compatibility\r\n\t\t\td.setAttribute(this.config.event_attribute,ev.id);\r\n\t\t\tthis.set_xy(d,width,height-20,left,top+14);\r\n\t\t\td.className=\"dhx_cal_editor\";\r\n\t\t\td.style.zIndex = new_zIndex;\r\n\t\t\tvar d2=document.createElement(\"div\");\r\n\t\t\tthis.set_xy(d2,width-6,height-26);\r\n\t\t\td2.style.cssText+=\";margin:2px 2px 2px 2px;overflow:hidden;\";\r\n\r\n\r\n\t\t\td2.style.zIndex = new_zIndex;\r\n\t\t\td.appendChild(d2);\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].appendChild(d);\r\n\t\t\tthis._rendered.push(d);\r\n\r\n\t\t\td2.innerHTML=\"\";\r\n\r\n\t\t\tthis._editor=d2.firstChild;\r\n\t\t\tthis._editor.addEventListener(\"keypress\", function(e){\r\n\t\t\t\tif (e.shiftKey) return true;\r\n\t\t\t\tvar code= e.keyCode;\r\n\t\t\t\tif (code==scheduler.keys.edit_save) scheduler.editStop(true);\r\n\t\t\t\tif (code==scheduler.keys.edit_cancel) scheduler.editStop(false);\r\n\t\t\t});\r\n\t\t\tthis._editor.addEventListener(\"selectstart\", function(e){ e.cancelBubble=true; return true; });\r\n\t\t\td2.firstChild.focus();\r\n\t\t\t//IE and opera can add x-scroll during focusing\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].scrollLeft=0;\r\n\t\t\td2.firstChild.select();\r\n\t\t}\r\n\t\tif (this._select_id==ev.id){\r\n\t\t\td.style.zIndex = parseInt(d.style.zIndex)+1; //fix overlapping issue\r\n\t\t\tvar icons=this.config[\"icons_\"+((this._edit_id==ev.id)?\"edit\":\"select\")];\r\n\t\t\tvar icons_str=\"\";\r\n\t\t\tfor (var i=0; i
\";\r\n\t\t\tvar obj = this._render_v_bar(ev.id,left-menu+1,top,menu,icons.length*20+26,\"\",\"
\",icons_str,true);\r\n\t\t\tobj.style.left=left-menu+1;\r\n\t\t\tobj.style.zIndex = d.style.zIndex;\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].appendChild(obj);\r\n\t\t\tthis._rendered.push(obj);\r\n\t\t}\r\n\r\n\t};\r\n\r\n scheduler.filter_agenda = function(id, event) {\r\n var layer = scheduler.getLayer(event.layer);\r\n return (layer && layer.visible);\r\n };\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.limit_start = null;\r\nscheduler.config.limit_end = null;\r\nscheduler.config.limit_view = false;\r\nscheduler.config.check_limits = true;\r\n\r\nscheduler._temp_limit_scope = function(){\r\n\tvar before = null;\r\n\tvar dhx_time_block = \"dhx_time_block\";\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\",function(om,od,nm,nd){\r\n\r\n\t\tfunction isBlocked(date, mode){\r\n\t\t\tvar limit_start = scheduler.config.limit_start,\r\n\t\t\t\tlimit_end = scheduler.config.limit_end,\r\n\t\t\t\tdate_end = scheduler.date.add(date,1,mode);\r\n\r\n\t\t\treturn (date.valueOf() > limit_end.valueOf() || date_end <= limit_start.valueOf());\r\n\t\t}\r\n\r\n\t\tif (scheduler.config.limit_view){\r\n\t\t\tnd = nd||od; nm = nm||om;\r\n\t\t\tif (isBlocked(nd, nm) && !(od.valueOf() == nd.valueOf())){\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar resetDate = !isBlocked(od, nm) ? od : scheduler.config.limit_start;\r\n\r\n\t\t\t\t\tscheduler.setCurrentView(!isBlocked(resetDate, nm) ? resetDate : null, nm);\r\n\t\t\t\t},1);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onMouseDown\", function(classname) {\r\n\t\treturn !(classname == dhx_time_block);\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeDrag\",function(id){\r\n\t\tif (!id) return true;\r\n\t\treturn scheduler.checkLimitViolation(scheduler.getEvent(id));\r\n\t});\r\n\tscheduler.attachEvent(\"onClick\", function (event_id, native_event_object){\r\n\t\treturn scheduler.checkLimitViolation(scheduler.getEvent(event_id));\r\n });\r\n\tscheduler.attachEvent(\"onBeforeLightbox\",function(id){\r\n\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tbefore = [ev.start_date, ev.end_date];\r\n\t\treturn scheduler.checkLimitViolation(ev);\r\n\t});\r\n\tscheduler.attachEvent(\"onEventSave\", function(id, data, is_new_event) {\r\n\r\n\t\t//lightbox may not have 'time' section\r\n\t\tif(!(data.start_date && data.end_date)){\r\n\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\tdata.start_date = new Date(ev.start_date);\r\n\t\t\tdata.end_date = new Date(ev.end_date);\r\n\t\t}\r\n\r\n\t\tif(data.rec_type){\r\n\t\t\t//_roll_back_dates modifies start_date of recurring event, need to check limits after modification\r\n\t\t\t// use a copy to keep original event unchanged\r\n\t\t\tvar data_copy = scheduler._lame_clone(data);\r\n\t\t\tscheduler._roll_back_dates(data_copy);\r\n\t\t\treturn scheduler.checkLimitViolation(data_copy);\r\n\t\t}\r\n\t\treturn scheduler.checkLimitViolation(data);\r\n\t});\r\n\tscheduler.attachEvent(\"onEventAdded\",function(id){\r\n\t\tif (!id) return true;\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif (!scheduler.checkLimitViolation(ev) && scheduler.config.limit_start && scheduler.config.limit_end) {\r\n\t\t\t//if newly created event is outside of limited time - crop it, leaving only allowed time\r\n\t\t\tif (ev.start_date < scheduler.config.limit_start) {\r\n\t\t\t\tev.start_date = new Date(scheduler.config.limit_start);\r\n\t\t\t}\r\n\t\t\tif (ev.start_date.valueOf() >= scheduler.config.limit_end.valueOf()) {\r\n\t\t\t\tev.start_date = this.date.add(scheduler.config.limit_end, -1, \"day\");\r\n\t\t\t}\r\n\t\t\tif (ev.end_date < scheduler.config.limit_start) {\r\n\t\t\t\tev.end_date = new Date(scheduler.config.limit_start);\r\n\t\t\t}\r\n\t\t\tif (ev.end_date.valueOf() >= scheduler.config.limit_end.valueOf()) {\r\n\t\t\t\tev.end_date = this.date.add(scheduler.config.limit_end, -1, \"day\");\r\n\t\t\t}\r\n\t\t\tif (ev.start_date.valueOf() >= ev.end_date.valueOf()) {\r\n\t\t\t\tev.end_date = this.date.add(ev.start_date, (this.config.event_duration||this.config.time_step), \"minute\");\r\n\t\t\t}\r\n\t\t\tev._timed=this.isOneDayEvent(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\",function(id){\r\n\t\tif (!id) return true;\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif (!scheduler.checkLimitViolation(ev)){\r\n\t\t\tif (!before) return false;\r\n\t\t\tev.start_date = before[0];\r\n\t\t\tev.end_date = before[1];\r\n\t\t\tev._timed=this.isOneDayEvent(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeEventChanged\",function(ev, native_object, is_new){\r\n\t\treturn scheduler.checkLimitViolation(ev);\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeEventCreated\", function(ev) { // native event\r\n\t\tvar start_date = scheduler.getActionData(ev).date;\r\n\t\tvar event = {\r\n\t\t\t_timed: true,\r\n\t\t\tstart_date: start_date,\r\n\t\t\tend_date: scheduler.date.add(start_date, scheduler.config.time_step, \"minute\")\r\n\t\t};\r\n\t\treturn scheduler.checkLimitViolation(event);\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", function(){\r\n\t\tscheduler._mark_now();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onAfterSchedulerResize\", function(){\r\n\t\twindow.setTimeout(function(){ \r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler._mark_now(); \r\n\t\t}, 1);\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\t\tscheduler._mark_now_timer = window.setInterval(function() {\r\n\t\t\tif(!scheduler._is_initialized())\r\n\t\t\t\treturn;\r\n\t\t\tscheduler._mark_now();\r\n\t\t}, 60000);\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tclearInterval(scheduler._mark_now_timer);\r\n\t});\r\n\r\n};\r\nscheduler._temp_limit_scope();\r\n\r\n\r\n}","import { IMapAdapter, ICalendarEvent, IMapSettings, IMapPosition} from \"./types\";\r\ndeclare let google: any;\r\n\r\nexport class GoogleMapAdapter implements IMapAdapter {\r\n\tprivate map: any;\r\n\tprivate scheduler: any;\r\n\tprivate settings: IMapSettings;\r\n\tprivate _markers: any[];\r\n\tprivate infoWindow: any;\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.map = null;\r\n\t\tthis._markers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t}\r\n\tonEventClick(event: ICalendarEvent): void {\r\n\t\tif (this._markers && this._markers.length > 0) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\t\tif (event.id == this._markers[i].event.id) {\r\n\t\t\t\t\tlet zoom = this.settings.zoom_after_resolve || this.settings.initial_zoom;\r\n\t\t\t\t\tif (event.lat && event.lng){\r\n\t\t\t\t\t\tthis.map.setCenter({\r\n\t\t\t\t\t\t\tlat: event.lat, \r\n\t\t\t\t\t\t\tlng: event.lng,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tthis.map.setZoom(zoom);\r\n\t\t\t\t\t} else {\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.map.setCenter({\r\n\t\t\t\t\t\t\tlat: this.settings.error_position.lat, \r\n\t\t\t\t\t\t\tlng: this.settings.error_position.lng,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tthis.map.setZoom(zoom);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tgoogle.maps.event.trigger(this._markers[i].marker, 'click');\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t} \r\n\t}\r\n\r\n\tinitialize(container: HTMLElement, options: IMapSettings): void {\r\n\t\tthis.settings = options;\r\n\t\tlet scheduler = this.scheduler;\r\n\t\tlet mapOptions = {\r\n\t\t\tcenter: { lat: options.initial_position.lat, lng: options.initial_position.lng },\r\n\t\t\tzoom: options.initial_zoom,\r\n\t\t\tmapId: container.id,\r\n\t\t\tscrollwheel: true,\r\n\t\t\tmapTypeId: options.type\r\n\t\t}\r\n\t\t// we need to reuse the google map to avoid leak memory\r\n\t\tif (this.map === null) {\r\n\t\t\tthis.map = new google.maps.Map(container, mapOptions);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tlet map = this.map;\r\n\t\t\tcontainer.appendChild(this.map.__gm.messageOverlay);\r\n\t\t\tcontainer.appendChild(this.map.__gm.outerContainer);\r\n\t\t\tsetTimeout(function() {\r\n\t\t\t\tmap.setOptions({container: container.id});\r\n\t\t\t}, 500);\r\n\t\t}\r\n\t\tgoogle.maps.event.addListener(this.map, \"dblclick\", function(event) {\r\n\t\t\tconst geocoder = new google.maps.Geocoder();\r\n\t\r\n\t\t\tif (!scheduler.config.readonly && scheduler.config.dblclick_create) {\r\n\t\t\t\tlet point = event.latLng;\r\n\t\t\t\tgeocoder.geocode(\r\n\t\t\t\t\t{ 'latLng': point },\r\n\t\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\t\tif (status == google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\t\tpoint = results[0].geometry.location;\r\n\t\t\t\t\t\t\tscheduler.addEventNow({\r\n\t\t\t\t\t\t\t\tlat: point.lat(),\r\n\t\t\t\t\t\t\t\tlng: point.lng(),\r\n\t\t\t\t\t\t\t\tevent_location: results[0].formatted_address,\r\n\t\t\t\t\t\t\t\tstart_date: scheduler.getState().date,\r\n\t\t\t\t\t\t\t\tend_date: scheduler.date.add(scheduler.getState().date, scheduler.config.time_step, \"minute\")\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tconsole.error('Geocode was not successful for the following reason: ' + status);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tdestroy(container: HTMLElement): void {\r\n\t\tgoogle.maps.event.clearInstanceListeners(window);\r\n\t\tgoogle.maps.event.clearInstanceListeners(document);\r\n\t\tgoogle.maps.event.clearInstanceListeners(container);\r\n\t\twhile (container.firstChild) {\r\n\t\t\tcontainer.firstChild.remove();\r\n\t\t}\r\n\t\tcontainer.innerHTML = \"\";\r\n\t}\r\n\r\n\tasync addEventMarker(event: ICalendarEvent): Promise {\r\n\t\tlet config = {\r\n\t\t\ttitle: event.text,\r\n\t\t\tposition: {},\r\n\t\t\tmap: {}\r\n\t\t}\r\n\t\t\r\n\t\tif (event.lat && event.lng) {\r\n\t\t\tconfig.position = { lat: event.lat, lng: event.lng };\r\n\t\t} else {\r\n\t\t\tconfig.position = { lat: this.settings.error_position.lat, lng: this.settings.error_position.lng }\r\n\t\t}\r\n\t\tconst { AdvancedMarkerElement } = await google.maps.importLibrary(\"marker\");\r\n\t\tlet marker;\r\n\t\tif (this.scheduler.ext.mapView.createMarker) {\r\n\t\t\tconfig.map = this.map;\r\n\t\t\tmarker = this.scheduler.ext.mapView.createMarker(config);\r\n\t\t} else {\r\n\t\t\tmarker = new AdvancedMarkerElement(config);\r\n\t\t\tmarker.map = this.map;\r\n\t\t}\r\n\t\tmarker.setMap(this.map);\r\n\t\t//case for markeks which were deleted with DataProcessor\r\n\t\tif (event[\"!nativeeditor_status\"] == \"true_deleted\"){\r\n\t\t\tmarker.setMap(null);\r\n\t\t}\r\n\t\tgoogle.maps.event.addListener(marker, \"click\", () => {\r\n\t\t\tif (this.infoWindow) {\r\n\t\t\t\tthis.infoWindow.close();\r\n\t\t\t}\r\n\t\t\tthis.infoWindow = new google.maps.InfoWindow({maxWidth: this.settings.info_window_max_width});\r\n\t\t\tthis.infoWindow.setContent(this.scheduler.templates.map_info_content(event));\r\n\t\t\tthis.infoWindow.open({\r\n\t\t\t\tanchor: marker,\r\n\t\t\t\tmap: this.map,\r\n\t\t\t});\r\n\t\t});\r\n\t\tlet markerInfo = {event, ...config, marker};\r\n\t\tthis._markers.push(markerInfo);\r\n\t}\r\n\r\n\tremoveEventMarker(eventId: string): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif (eventId == this._markers[i].event.id) {\r\n\t\t\t\tthis._markers[i].marker.setVisible(false);\r\n\t\t\t\tthis._markers[i].marker.setMap(null);\r\n\t\t\t\tthis._markers[i].marker.setPosition(null);\r\n\t\t\t\tthis._markers[i].marker = null;\r\n\t\t\t\tthis._markers.splice(i,1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tupdateEventMarker(event: ICalendarEvent): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif(this._markers[i].event.id == event.id) {\r\n\t\t\t\tthis._markers[i].event = event;\r\n\t\t\t\tthis._markers[i].position.lat = event.lat;\r\n\t\t\t\tthis._markers[i].position.lng = event.lng;\r\n\t\t\t\tthis._markers[i].text = event.text;\r\n\t\t\t\tlet latlng = new google.maps.LatLng(event.lat, event.lng);\r\n\t\t\t\tthis._markers[i].marker.setPosition(latlng);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tclearEventMarkers(): void {\r\n\t\tif (this._markers.length > 0) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\t\tthis._markers[i].marker.setMap(null);\r\n\t\t\t}\r\n\t\t\tthis._markers = [];\r\n\t\t}\r\n\t}\r\n\r\n\tsetView(latitude: number, longitude: number, zoom: number): void {\r\n\t\tthis.map.setCenter({\r\n\t\t\tlat: latitude, \r\n\t\t\tlng: longitude,\r\n\t\t});\r\n\t\tthis.map.setZoom(zoom);\r\n\t}\r\n\r\n\tasync resolveAddress(string: string): Promise {\r\n\t\tconst geocoder = new google.maps.Geocoder();\r\n\t\tlet position: any = await new Promise((resolve) => {\r\n\t\t\tgeocoder.geocode(\r\n\t\t\t\t{ 'address': string },\r\n\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\tif (status == google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\tresolve({\r\n\t\t\t\t\t\t lat: results[0].geometry.location.lat(),\r\n\t\t\t\t\t\t lng: results[0].geometry.location.lng()\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tconsole.error('Geocode was not successful for the following reason: ' + status);\r\n\t\t\t\t\t\tresolve({});\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t});\r\n\t\treturn position;\r\n\t}\r\n\t\r\n}","import { IMapAdapter, ICalendarEvent, IMapSettings, IMapPosition} from \"./types\";\r\n\r\ndeclare let L: any\r\n\r\nexport class OpenStreetMapAdapter implements IMapAdapter {\r\n\tprivate map: any;\r\n\tprivate scheduler: any;\r\n\tprivate _markers: any[];\r\n\tprivate settings: IMapSettings;\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.map = null;\r\n\t\tthis._markers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t}\r\n\tonEventClick(event: ICalendarEvent): void {\r\n\t\tif (this._markers && this._markers.length > 0) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\t\tif (event.id == this._markers[i].event.id) {\r\n\t\t\t\t\tthis._markers[i].marker.openPopup();\r\n\t\t\t\t\tthis._markers[i].marker.closeTooltip();\r\n\t\t\t\t\tif (event.lat && event.lng) {\r\n\t\t\t\t\t\tthis.setView(event.lat, event.lng, this.settings.zoom_after_resolve || this.settings.initial_zoom);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.setView(this.settings.error_position.lat, this.settings.error_position.lng, this.settings.zoom_after_resolve || this.settings.initial_zoom);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t} \r\n\t}\r\n\r\n\tinitialize(container: HTMLElement, options: IMapSettings): void {\r\n\t\tlet scheduler = this.scheduler;\r\n\t\tlet mapWrapper = document.createElement('div');\r\n\t\tmapWrapper.className = 'mapWrapper';\r\n\t\tmapWrapper.id = 'mapWrapper';\r\n\t\tmapWrapper.style.width = container.style.width;\r\n\t\tmapWrapper.style.height = container.style.height;\r\n\t\tcontainer.appendChild(mapWrapper);\r\n\r\n\t\tlet map = L.map(mapWrapper, {\r\n\t\t\tcenter: L.latLng(options.initial_position.lat, options.initial_position.lng),\r\n\t\t\tzoom: options.initial_zoom,\r\n\t\t\tkeyboard: false // need to set false, due to bug with moving window\r\n\t\t});\r\n\t\tL.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(map);\r\n\t\tmap.on(\"dblclick\", async function(e){\r\n\t\t\tconst settings = {\r\n\t\t\t\t\"method\": \"GET\",\r\n\t\t\t\theaders: {\r\n\t\t\t\t\t\"Accept-Language\": \"en\",\r\n\t\t\t\t},\r\n\t\t\t};\r\n\t\t\tlet response = await fetch(`https://nominatim.openstreetmap.org/reverse?lat=${e.latlng.lat}&lon=${e.latlng.lng}&format=json`, settings).then(response => response.json());\r\n\t\t\tif (response.address) {\r\n\t\t\t\tlet address = response.address.country;\r\n\t\t\t\tscheduler.addEventNow({\r\n\t\t\t\t\tlat: e.latlng.lat,\r\n\t\t\t\t\tlng: e.latlng.lng,\r\n\t\t\t\t\tevent_location: address,\r\n\t\t\t\t\tstart_date: scheduler.getState().date,\r\n\t\t\t\t\tend_date: scheduler.date.add(scheduler.getState().date, scheduler.config.time_step, \"minute\")\r\n\t\t\t\t});\r\n\t\t\t} else {\r\n\t\t\t\tconsole.error(\"unable recieve a position of the event\", response.error);\r\n\t\t\t}\r\n\t\t});\r\n\t\tthis.map = map;\r\n\t\tthis.settings = options;\r\n\t}\r\n\r\n\tdestroy(container: HTMLElement): void {\r\n\t\tthis.map.remove();\r\n\t\twhile (container.firstChild) {\r\n\t\t\tcontainer.firstChild.remove();\r\n\t\t}\r\n\t\tcontainer.innerHTML = \"\";\r\n\t}\r\n\r\n\taddEventMarker(event: ICalendarEvent): void {\r\n\t\tconst myIcon = L.icon({\r\n\t\t\ticonUrl: 'https://unpkg.com/leaflet@1.0.3/dist/images/marker-icon.png',\r\n\t\t\ticonSize: [25, 41],\r\n\t\t\tshadowSize: [30, 65],\r\n\t\t\ticonAnchor: [12, 41],\r\n\t\t\tshadowAnchor: [7, 65]\r\n\t\t});\r\n\t\tlet popupConfig = {\r\n\t\t\tminWidth: 180,\r\n\t\t\tmaxWidth: this.settings.info_window_max_width,\r\n\t\t}\r\n\t\tconst markerPopup = L.popup(popupConfig).setContent(this.scheduler.templates.map_info_content(event));\r\n\t\tconst tooltip = L.tooltip().setContent(event.text);\r\n\r\n\t\tlet markerConfig = [\r\n\t\t\tevent.lat,\r\n\t\t\tevent.lng\r\n\t\t]\r\n\t\t\r\n\t\tif (!event.lat || !event.lng) {\r\n\t\t\tmarkerConfig = [this.settings.error_position.lat, this.settings.error_position.lng];\r\n\t\t}\r\n\t\tconst marker = L.marker(markerConfig, {\r\n\t\t\ticon: myIcon\r\n\t\t}).bindPopup(markerPopup).bindTooltip(tooltip).addTo(this.map);\r\n\t\tconst markerInfo = {event, marker};\r\n\t\tthis._markers.push(markerInfo);\t\t\r\n\t}\r\n\r\n\tremoveEventMarker(eventId: string): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif (eventId == this._markers[i].event.id) {\r\n\t\t\t\tthis.map.removeLayer(this._markers[i].marker);\r\n\t\t\t\tthis._markers.splice(i,1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tupdateEventMarker(event: ICalendarEvent): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif(this._markers[i].event.id == event.id) {\r\n\t\t\t\tthis._markers[i].event = event;\r\n\t\t\t\tif (!event.lat || !event.lng){\r\n\t\t\t\t\tthis._markers[i].marker.setLatLng([this.settings.error_position.lat, this.settings.error_position.lng]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis._markers[i].marker.setLatLng([event.lat, event.lng]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tclearEventMarkers(): void {\r\n\t\tif(this._markers) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\t\tthis.map.removeLayer(this._markers[i].marker); \r\n\t\t\t}\r\n\t\t\tthis._markers = [];\r\n\t\t}\r\n\t}\r\n\r\n\tsetView(latitude: number, longitude: number, zoom: number): void {\r\n\t\tthis.map.setView([latitude, longitude], zoom);\r\n\t}\r\n\r\n\tasync resolveAddress(string: string): Promise {\r\n\t\tconst settings = {\r\n\t\t\t\"method\": \"GET\",\r\n\t\t\theaders: {\r\n\t\t\t\t\"Accept-Language\": \"en\",\r\n\t\t\t},\r\n\t\t};\r\n\t\tlet position:any = {};\r\n\t\tlet response = await fetch(`https://nominatim.openstreetmap.org/search?q=${string}&format=json`, settings).then(response => response.json());\r\n\t\tif (response && response.length) {\r\n\t\t\tposition.lat = +response[0].lat;\r\n\t\t\tposition.lng = +response[0].lon;\r\n\t\t} else {\r\n\t\t\tconsole.error(`Unable recieve a position of the event's location: ${string}`);\r\n\t\t}\r\n\t\treturn position;\r\n\t}\r\n}","import { IMapAdapter, ICalendarEvent, IMapSettings, IMapPosition} from \"./types\";\r\n\r\ndeclare let mapboxgl: any;\r\ndeclare let MapboxGeocoder: any;\r\n\r\nexport class MapboxAdapter implements IMapAdapter {\r\n\tprivate map: any;\r\n\tprivate scheduler: any;\r\n\tprivate settings: IMapSettings;\r\n\tprivate _markers: any[];\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.map = null;\r\n\t\tthis._markers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t}\r\n\tonEventClick(event: ICalendarEvent): void {\r\n\t\tif (this._markers && this._markers.length > 0) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n const popup = this._markers[i].marker.getPopup();\r\n if (popup.isOpen()){\r\n popup.remove();\r\n }\r\n\t\t\t\tif (event.id == this._markers[i].event.id) {\r\n\t\t\t\t\tthis._markers[i].marker.togglePopup();\r\n\t\t\t\t\tif (event.lat && event.lng) {\r\n\t\t\t\t\t\tthis.setView(event.lat, event.lng, this.settings.zoom_after_resolve || this.settings.initial_zoom);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.setView(this.settings.error_position.lat, this.settings.error_position.lng, this.settings.zoom_after_resolve || this.settings.initial_zoom);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t} \r\n\t}\r\n\r\n\tinitialize(container: HTMLElement, options: IMapSettings): void {\r\n let scheduler = this.scheduler;\r\n\r\n\t\tmapboxgl.accessToken = options.accessToken;\r\n const map = new mapboxgl.Map({\r\n container: container, \r\n center: [options.initial_position.lng, options.initial_position.lat], \r\n zoom: options.initial_zoom + 1, // problems with coordinates if zoom = 1\r\n });\r\n map.on(\"dblclick\",async function(e){\r\n\t\t\tlet response = await fetch(`https://api.mapbox.com/geocoding/v5/mapbox.places/${e.lngLat.lng},${ e.lngLat.lat}.json?access_token=${options.accessToken}`).then(response => response.json());\r\n\t\t\tif (response.features){\r\n\t\t\t\tlet address = response.features[0].place_name;\r\n\t\t\t\tscheduler.addEventNow({\r\n\t\t\t\t\tlat: e.lngLat.lat,\r\n\t\t\t\t\tlng: e.lngLat.lng,\r\n\t\t\t\t\tevent_location: address,\r\n\t\t\t\t\tstart_date: scheduler.getState().date,\r\n\t\t\t\t\tend_date: scheduler.date.add(scheduler.getState().date, scheduler.config.time_step, \"minute\")\r\n\t\t\t\t});\r\n\t\t\t} else {\r\n\t\t\t\tconsole.error(\"unable recieve a position of the event\");\r\n\t\t\t}\r\n\t\t});\r\n this.map = map;\r\n this.settings = options;\r\n\t}\r\n\r\n\tdestroy(container: HTMLElement): void {\r\n\t\tthis.map.remove();\r\n while (container.firstChild) {\r\n\t\t\tcontainer.firstChild.remove();\r\n\t\t}\r\n container.innerHTML = \"\";\r\n\t}\r\n\r\n\taddEventMarker(event: ICalendarEvent): void {\r\n let config = [\r\n\t\t\tevent.lng,\r\n\t\t\tevent.lat\r\n\t\t]\r\n\t\t\r\n\t\tif (!event.lat || !event.lng) {\r\n\t\t\tconfig = [this.settings.error_position.lng, this.settings.error_position.lat];\r\n\t\t} \r\n\r\n\t\tconst popup = new mapboxgl.Popup({ offset: 25, focusAfterOpen: false})\r\n .setMaxWidth(`${this.settings.info_window_max_width}px`) \r\n .setHTML(this.scheduler.templates.map_info_content(event));\r\n const marker = new mapboxgl.Marker()\r\n .setLngLat(config)\r\n .setPopup(popup)\r\n .addTo(this.map);\r\n const markerInfo = {event, marker}; \r\n this._markers.push(markerInfo);\r\n\t}\r\n\r\n\tremoveEventMarker(eventId: string): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif (eventId == this._markers[i].event.id) {\r\n\t\t\t\tthis._markers[i].marker.remove();\r\n this._markers.splice(i,1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tupdateEventMarker(event: ICalendarEvent): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif(this._markers[i].event.id == event.id) {\r\n\t\t\t\tthis._markers[i].event = event;\r\n\t\t\t\tif (!event.lat || !event.lng){\r\n\t\t\t\t\tthis._markers[i].marker.setLngLat([this.settings.error_position.lng, this.settings.error_position.lat]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis._markers[i].marker.setLngLat([event.lng, event.lat]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tclearEventMarkers(): void {\r\n\t\tfor (let i = 0; i {\r\n\t\tlet response = await fetch(`https://api.mapbox.com/geocoding/v5/mapbox.places/${string}.json?access_token=${this.settings.accessToken}`).then(response => response.json());\r\n\t\tlet position:any = {};\r\n\t\tif (response && response.features.length) {\r\n\t\t\tposition.lng = response.features[0].center[0];\r\n\t\t\tposition.lat = response.features[0].center[1];\r\n\t\t} else {\r\n\t\t\tconsole.error(`Unable recieve a position of the event's location: ${string}`);\r\n\t\t}\r\n\t\treturn position;\r\n\t}\r\n}","import { GoogleMapAdapter } from \"./gMapAdapter\";\r\nimport { OpenStreetMapAdapter } from \"./osmMapAdapter\";\r\nimport { MapboxAdapter } from \"./mapboxAdapter\";\r\nimport { IMapAdapter, ICalendarEvent, IMapSettings } from \"./types\";\r\n\r\ndeclare let google: any;\r\n\r\nexport default function(scheduler: any){\r\n\t\r\nlet mapAdapter: IMapAdapter | null = null;\r\nlet eventHandlerIds: number[] = [];\r\nconst adapters: { [name:string]: IMapAdapter } = {\r\n\tgoogleMap: new GoogleMapAdapter(scheduler),\r\n\topenStreetMaps: new OpenStreetMapAdapter(scheduler),\r\n\tmapbox: new MapboxAdapter(scheduler)\r\n}\r\n\r\nif(!scheduler.ext){\r\n\tscheduler.ext = {};\r\n}\r\nscheduler.ext.mapView = {\r\n\tcreateAdapter: function():IMapAdapter{\r\n\t\treturn adapters[scheduler.config.map_view_provider];\r\n\t},\r\n\tcreateMarker: function(config){\r\n\t\treturn new google.maps.Marker(config);\r\n\t},\r\n\tcurrentAdapter: null,\r\n\tadapters\r\n};\r\nscheduler._latLngUpdate = false; // flag for updating events which don't have event.lat and event.lng\r\nscheduler._eventLocationChanged = false; // flag for checking if the location of the event is changed\r\nscheduler.config.map_view_provider = \"googleMap\";\r\nscheduler.config.map_settings = {\r\n\tinitial_position: {\r\n\t lat: 48.724,\r\n\t lng: 8.215\r\n\t},\r\n\terror_position: {\r\n\t lat: 15,\r\n\t lng: 15\r\n\t},\r\n\tinitial_zoom: 1,\r\n\tzoom_after_resolve: 15,\r\n\tinfo_window_max_width: 300,\r\n\tresolve_user_location: true,\r\n\tresolve_event_location: true,\r\n\tview_provider: \"googleMap\"\r\n}\r\nif (scheduler.config.map_initial_position) {\r\n\tscheduler.config.map_settings.initial_position = {\r\n\t\tlat: scheduler.config.map_initial_position.lat(),\r\n\t\tlng: scheduler.config.map_initial_position.lng(), \r\n\t};\r\n}\r\n\r\nif (scheduler.config.map_error_position) {\r\n\tscheduler.config.map_settings.error_position = {\r\n\t\tlat: scheduler.config.map_error_position.lat(),\r\n\t\tlng: scheduler.config.map_error_position.lng(), \r\n\t};\r\n}\r\n\r\nscheduler.xy.map_date_width = 188; // date column width\r\nscheduler.xy.map_icon_width = 25; // event details icon width\r\nscheduler.xy.map_description_width = 400; // description column width\r\nscheduler.date.add_map = function(date, inc, mode) {\r\n\treturn (new Date(date.valueOf()));\r\n};\r\nscheduler.templates.map_date = function(dd, ed, mode) {\r\n\treturn '';\r\n};\r\nscheduler.templates.map_time = function(start, end, ev) {\r\n\tif (scheduler.config.rtl && !ev._timed) {\r\n\t\treturn scheduler.templates.day_date(end) + \" – \" + scheduler.templates.day_date(start);\r\n\t} else if (ev._timed) {\r\n\t\treturn this.day_date(ev.start_date, ev.end_date, ev) + \" \" + this.event_date(start);\r\n\t} else {\r\n\t\treturn scheduler.templates.day_date(start) + \" – \" + scheduler.templates.day_date(end);\r\n\t}\r\n};\r\nscheduler.templates.map_text = function(start, end, ev) {\r\n\treturn ev.text;\r\n};\r\nscheduler.templates.map_info_content = function(event){\r\n return `
Event's text: ${event.text}\r\n\t\t\t\t
Location: ${event.event_location}
\r\n\t\t\t\t
Starts: ${scheduler.templates.tooltip_date_format(event.start_date)}
\r\n\t\t\t\t
Ends: ${scheduler.templates.tooltip_date_format(event.end_date)}
\r\n\t\t\t
`;\r\n};\r\nscheduler.date.map_start = function(d) {\r\n\treturn d;\r\n};\r\n\r\nfunction setupMapView(scheduler) {\r\n\t// Initialization logic, possibly including creation of a new mapAdapter\r\n\tmapAdapter = scheduler.ext.mapView.createAdapter();\r\n\tattachSchedulerEvents();\r\n}\r\nasync function addEventWithLocation(event: ICalendarEvent, mapAdapter: IMapAdapter){\r\n\tlet coordinates = await mapAdapter.resolveAddress(event.event_location);\r\n\tevent.lat = coordinates.lat;\r\n\tevent.lng = coordinates.lng;\r\n\tmapAdapter.removeEventMarker(String(event.id));\r\n\tmapAdapter.addEventMarker(event);\r\n\treturn event;\r\n}\r\nfunction setUserLocation(options: IMapSettings, adapter: IMapAdapter): void{\r\n\tif (options.resolve_user_location) {\r\n\t\tif (navigator.geolocation) {\r\n\t\t\tnavigator.geolocation.getCurrentPosition(function(position) {\r\n\t\t\t\tadapter.setView(position.coords.latitude, position.coords.longitude, options.zoom_after_resolve || options.initial_zoom);\r\n\t\t\t});\r\n\t\t}\r\n\t} else {\r\n\t\tadapter.setView(options.initial_position.lat, options.initial_position.lng, options.initial_zoom);\r\n\t}\r\n}\r\nscheduler.dblclick_dhx_map_area = function(e) {\r\n\tlet eventNode = e.target.closest(`[${scheduler.config.event_attribute}]`);\r\n\tif (eventNode){\r\n\t\tlet eventId = eventNode.getAttribute(`${scheduler.config.event_attribute}`);\r\n\t\tscheduler.showLightbox(eventId);\r\n\t}\r\n\tif (!this.config.readonly && this.config.dblclick_create && !eventNode) {\r\n\t\tthis.addEventNow({\r\n\t\t\tstart_date: scheduler.config.map_start,\r\n\t\t\tend_date: scheduler.date.add( scheduler.config.map_start, scheduler.config.time_step, \"minute\"),\r\n\t\t});\r\n\t}\t\r\n};\r\n\r\nfunction attachSchedulerEvents() { \r\n eventHandlerIds.push(\r\n\tscheduler.attachEvent(\"onEventSave\",function(id,ev,is_new){\r\n\t\tlet unmodifiedEvent = scheduler.getEvent(id);\r\n\t\tif (unmodifiedEvent && unmodifiedEvent.event_location != ev.event_location) {\r\n\t\t\tscheduler._eventLocationChanged = true;\r\n\t\t}\r\n\t\treturn true;\r\n\t}),\r\n scheduler.attachEvent(\"onEventChanged\", (id, event) => {\r\n\t\tconst {start_date, end_date} = event;\r\n\t\tconst {min_date, max_date} = scheduler.getState();\r\n\t\tif(start_date.valueOf() < max_date.valueOf() && end_date.valueOf() > min_date.valueOf()){\r\n\t\t\tif (mapAdapter) {\r\n\t\t\t\tif (scheduler.config.map_settings.resolve_event_location && event.event_location && !scheduler._latLngUpdate ) {\r\n\t\t\t\t \taddEventWithLocation(event, mapAdapter);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmapAdapter.updateEventMarker(event);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._latLngUpdate = false;\r\n\t\treturn true;\r\n }),\r\n\tscheduler.attachEvent(\"onEventIdChange\", function(old_id,new_id){\r\n\t\tlet newIdEvent = scheduler.getEvent(new_id);\r\n\t\tmapAdapter?.removeEventMarker(old_id);\r\n\t\tmapAdapter?.addEventMarker(newIdEvent);\r\n\t}),\r\n scheduler.attachEvent(\"onEventAdded\", (id, event) => {\r\n\t\tconst {start_date, end_date} = event;\r\n\t\tconst {min_date, max_date} = scheduler.getState();\r\n\t\tif(start_date.valueOf() < max_date.valueOf() && end_date.valueOf() > min_date.valueOf()){\r\n \t\tif (mapAdapter) {\r\n\t\t\t\tif (scheduler.config.map_settings.resolve_event_location && event.event_location && scheduler._eventLocationChanged) {\r\n\t\t\t\t\taddEventWithLocation(event, mapAdapter);\r\n\t\t\t\t\tscheduler._eventLocationChanged = false;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmapAdapter.addEventMarker(event);\r\n\t\t\t\t\tmapAdapter.onEventClick(event);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n }),\r\n scheduler.attachEvent(\"onClick\", function (id, e){\r\n\t\tconst event = scheduler.getEvent(id);\r\n\t\tif (mapAdapter && event) mapAdapter.onEventClick(event);\r\n\t\treturn false;\r\n }),\r\n scheduler.attachEvent(\"onBeforeEventDelete\", (id, event) => {\r\n\t\tif (mapAdapter) {\r\n\t\t\tmapAdapter.removeEventMarker(id);\r\n\t\t}\r\n\t\treturn true;\r\n })\r\n );\r\n}\r\nfunction detachSchedulerEvents() {\r\n\teventHandlerIds.forEach(id => scheduler.detachEvent(id));\r\n\teventHandlerIds = [];\r\n}\r\n\r\nscheduler.attachEvent(\"onSchedulerReady\", function() {\r\n\r\n\tif(scheduler.config.map_initial_zoom !== undefined){\r\n\t\tscheduler.config.map_settings.initial_zoom = scheduler.config.map_initial_zoom;\r\n\t}\r\n\tif(scheduler.config.map_zoom_after_resolve !== undefined){\r\n\t\tscheduler.config.map_settings.zoom_after_resolve = scheduler.config.map_zoom_after_resolve;\r\n\t}\r\n\tif(scheduler.config.map_infowindow_max_width !== undefined){\r\n\t\tscheduler.config.map_settings.info_window_max_width = scheduler.config.map_infowindow_max_width;\r\n\t}\r\n\tif(scheduler.config.map_resolve_user_location !== undefined){\r\n\t\tscheduler.config.map_settings.resolve_user_location = scheduler.config.map_resolve_user_location;\r\n\t}\r\n\tif(scheduler.config.map_view_provider !== undefined){\r\n\t\tscheduler.config.map_settings.view_provider = scheduler.config.map_view_provider;\r\n\t}\r\n\tif(scheduler.config.map_type !== undefined){\r\n\t\tscheduler.config.map_settings.type = scheduler.config.map_type;\r\n\t}\r\n\tif(scheduler.config.map_resolve_event_location !== undefined){\r\n\t\tscheduler.config.map_settings.resolve_event_location = scheduler.config.map_resolve_event_location;\r\n\t}\r\n\tscheduler.ext.mapView.currentAdapter = scheduler.config.map_view_provider;\r\n\r\n\tlet map = document.createElement('div');\r\n\tmap.className = 'mapContainer';\r\n\tmap.id = 'mapContainer';\r\n\tmap.style.display = \"none\";\r\n\tmap.style.zIndex = \"1\";\r\n\tscheduler._obj.appendChild(map);\r\n\r\n\tconst old = scheduler.render_data;\r\n\tscheduler.render_data = function(evs, hold) {\r\n\t\tif (this._mode == \"map\") {\r\n\t\t\tfill_map_tab();\r\n\t\t\tlet events = scheduler.get_visible_events();\r\n\t\t\tif (mapAdapter) {\r\n\t\t\t\tmapAdapter.clearEventMarkers();\r\n\t\t\t\tevents.forEach((event) => mapAdapter?.addEventMarker(event));\r\n\t\t\t}\r\n\t\t} else\r\n\t\t\treturn old.apply(this, arguments);\r\n\t};\r\n\r\n\tscheduler.map_view = function(mode) {\r\n\t\tscheduler._els.dhx_cal_data[0].style.width = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\tscheduler._min_date = scheduler.config.map_start || (scheduler._currentDate());\r\n\t\tscheduler._max_date = scheduler.config.map_end || scheduler.date.add(scheduler._currentDate(), 1, \"year\");\r\n\t\tscheduler._table_view = true;\r\n\t\tset_full_view(mode);\r\n\t\tlet mapContainer = document.getElementById('mapContainer');\r\n\t\t_setMapSize('mapContainer');\r\n\r\n\t\t// creating the new logic\r\n\t\tif (mode && mapContainer) {\r\n\t\t\tmap.style.display = 'block';\r\n\t\t\tfill_map_tab();\r\n\t\t\t// case to display several maps and has the opportunity to switch between them\r\n\t\t\tif (scheduler.config.map_view_provider == scheduler.ext.mapView.currentAdapter) {\r\n\t\t\t\tmapAdapter?.destroy(mapContainer);\r\n\t\t\t\tsetupMapView(scheduler);\r\n\t\t\t\tmapAdapter?.initialize(mapContainer, scheduler.config.map_settings);\r\n\t\t\t} else {\r\n\t\t\t\tmapAdapter?.destroy(mapContainer);\r\n\t\t\t\tsetupMapView(scheduler);\r\n\t\t\t\tmapAdapter?.initialize(mapContainer, scheduler.config.map_settings);\r\n\t\t\t \tscheduler.ext.mapView.currentAdapter = scheduler.config.map_view_provider;\r\n\t\t\t}\r\n\t\t\tif(mapAdapter) {\r\n\t\t\t\tsetUserLocation(scheduler.config.map_settings, mapAdapter);\r\n\t\t\t}\t\r\n\t\t} else {\r\n\t\t\tmap.style.display = 'none';\r\n\t\t\tscheduler._els.dhx_cal_data[0].style.width = \"100%\";\r\n\t\t \tif (mapAdapter && mapContainer ) {\r\n\t\t\t\tmapAdapter.destroy(mapContainer);\r\n\t\t\t\tmapAdapter = null;\r\n\t\t\t\tscheduler.ext.mapView.currentAdapter = scheduler.config.map_view_provider;\r\n\t\t }\r\n\t\t \tdetachSchedulerEvents();\r\n\t\t}\r\n\t};\r\n\r\n\tfunction _setMapSize(elem_id) { //input - map's div id\r\n\t\tlet map = document.getElementById(elem_id);\r\n\t\tif (map) {\r\n\t\t\tconst nav_height = scheduler.$container.querySelector(\".dhx_cal_navline\").offsetHeight;\r\n\t\t\tlet height = scheduler.$container.querySelector(\".dhx_cal_data\").offsetHeight + scheduler.$container.querySelector(\".dhx_cal_header\").offsetHeight;\r\n\t\t\tif (height < 0)\r\n\t\t\t\theight = 0;\r\n\t\t\tlet width = scheduler._x - scheduler.xy.map_date_width - scheduler.xy.map_description_width - 1;\r\n\t\t\tif (width < 0)\r\n\t\t\t\twidth = 0;\r\n\t\t\tmap.style.height = height + 'px';\r\n\t\t\tmap.style.width = width + 'px';\r\n\t\t\tmap.style.position = \"absolute\";\r\n\t\t\tmap.style.top = nav_height + \"px\";\r\n\t\t\tif (scheduler.config.rtl) {\r\n\t\t\t\tmap.style.marginRight = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\t\t} else {\r\n\t\t\t\tmap.style.marginLeft = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\t\t}\r\n\t\t\tmap.style.marginTop = (scheduler.xy.nav_height + 2) + 'px';\r\n\t\t}\r\n\t}\t\r\n\tfunction fill_map_tab() {\r\n\t\t//select events for which data need to be printed\r\n\t\tlet events = scheduler.get_visible_events();\r\n\t\tevents.sort(function(a, b) {\r\n\t\t\tif(a.start_date.valueOf()==b.start_date.valueOf())\r\n\t\t\t\treturn a.id>b.id?1:-1;\r\n\t\t\treturn a.start_date>b.start_date?1:-1;\r\n\t\t});\r\n\r\n\t\t//generate html for the view\r\n\t\tlet ariaAttr = scheduler._waiAria.mapAttrString();\r\n\r\n\t\tlet html = \"
\";\r\n\t\tfor (let i = 0; i < events.length; i++) {\r\n\t\t\tlet ev = events[i];\r\n\t\t\tlet event_class = (ev.id == scheduler._selected_event_id) ? 'dhx_map_line highlight' : 'dhx_map_line';\r\n\t\t\tlet bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\t\t\tlet color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\t\t\tlet ariaAttr = scheduler._waiAria.mapRowAttrString(ev);\r\n\t\t\tlet ariaButtonAttr = scheduler._waiAria.mapDetailsBtnString();\r\n\r\n\t\t\thtml += \"
\" + scheduler.templates.map_time(ev.start_date, ev.end_date, ev) + \"
\";\r\n\t\t\thtml += `
\r\n\t\t\t\r\n\t\t\t
`;\r\n\t\t\thtml += \"
\" + scheduler.templates.map_text(ev.start_date, ev.end_date, ev) + \"
\"; // -25 = icon size 20 and padding 5\r\n\t\t}\r\n\t\thtml += \"
\";\r\n\r\n\t\t//render html\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = 0; //fix flickering in FF\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t//\tscheduler._els[\"dhx_cal_data\"][0].style.width = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\r\n\t\tlet t = scheduler._els[\"dhx_cal_data\"][0].firstChild.childNodes;\r\n\r\n\t\tlet dateElement = scheduler._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML=scheduler.templates[scheduler._mode + \"_date\"](scheduler._min_date, scheduler._max_date, scheduler._mode);\r\n\t\t}\r\n\r\n\t\tscheduler._rendered = [];\r\n\t\tfor (let i = 0; i < t.length - 2; i++) {\r\n\t\t\tscheduler._rendered[i] = t[i];\r\n\t\t}\r\n\t}\r\n\tfunction set_full_view(mode) {\r\n\t\tif (mode) {\r\n\t\t\tconst l = scheduler.locale.labels;\r\n\t\t\tscheduler._els[\"dhx_cal_header\"][0].innerHTML = \"
\" + l.date + \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"
\" + l.description + \"
\";\r\n\t\t\tscheduler._table_view = true;\r\n\t\t\tscheduler.set_sizes();\r\n\t\t}\r\n\t}\r\n\t\r\n\tscheduler.attachEvent(\"onLocationError\", function (id){\r\n\t\talert(\"Location can't be found\");\r\n\t\treturn google.maps.LatLng(51.477840, -0.001492); \r\n\t\t//the coordinates of the Greenwich Royal Observatory\r\n\t})\r\n\tlet _updateEventLocation = async function(event) {\r\n\t\tif (mapAdapter){\r\n\t\t\tconst coordinates = await mapAdapter.resolveAddress(event.event_location);\r\n\t\t\tif (coordinates.lat && coordinates.lng) {\r\n\t\t\t\tevent.lat = +coordinates.lat;\r\n\t\t\t\tevent.lng = +coordinates.lng;\r\n\t\t\t} else {\r\n\t\t\t\tscheduler.callEvent(\"onLocationError\", [event.id]);\r\n\t\t\t\tevent.lng = scheduler.config.map_settings.error_position.lng;\r\n\t\t\t\tevent.lat = scheduler.config.map_settings.error_position.lat;\r\n\t\t\t}\r\n\t\t\tscheduler._latLngUpdate = true;\r\n\t\t\tscheduler.callEvent(\"onEventChanged\", [event.id, event]);\r\n\t\t}\r\n\t};\r\n\tlet _delay = function(method, object, params, delay) {\r\n\t\tsetTimeout(function() {\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tlet ret = method.apply(object, params);\r\n\t\t\tmethod = object = params = null;\r\n\t\t\treturn ret;\r\n\t\t}, delay || 1);\r\n\t};\r\n\tscheduler._event_resolve_delay = 1500;\r\n\tscheduler.attachEvent(\"onEventLoading\", function(event) {\r\n\t\tif (event.lat && event.lng) {\r\n\t\t\tevent.lat = +event.lat;\r\n\t\t\tevent.lng = +event.lng;\r\n\t\t}\r\n\t\tif (scheduler.config.map_settings.resolve_event_location && event.event_location && !event.lat && !event.lng) { // don't delete !event.lat && !event.lng as location could change\r\n\t\t\tscheduler._event_resolve_delay += 1500;\r\n\t\t\t_delay(_updateEventLocation, this, [event], scheduler._event_resolve_delay);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n})\r\n\r\n}","export default function(scheduler){\r\n\r\nconst minicalDomEvents = scheduler._createDomEventScope();\r\n\t\r\n\r\nscheduler.config.minicalendar = {\r\n\tmark_events: true\r\n};\r\nscheduler._synced_minicalendars = [];\r\nscheduler.renderCalendar = function(obj, _prev, is_refresh) {\r\n\tvar cal = null;\r\n\tvar date = obj.date || (scheduler._currentDate());\r\n\tif (typeof date == \"string\")\r\n\t\tdate = this.templates.api_date(date);\r\n\r\n\tif (!_prev) {\r\n\t\tvar cont = obj.container;\r\n\t\tvar pos = obj.position;\r\n\r\n\t\tif (typeof cont == \"string\")\r\n\t\t\tcont = document.getElementById(cont);\r\n\r\n\t\tif (typeof pos == \"string\")\r\n\t\t\tpos = document.getElementById(pos);\r\n\t\tif (pos && (typeof pos.left == \"undefined\" && typeof pos.right == \"undefined\")) {\r\n\t\t\tvar tpos = scheduler.$domHelpers.getOffset(pos);\r\n\t\t\tpos = {\r\n\t\t\t\ttop: tpos.top + pos.offsetHeight,\r\n\t\t\t\tleft: tpos.left\r\n\t\t\t};\r\n\t\t}\r\n\t\tif (!cont)\r\n\t\t\tcont = scheduler._get_def_cont(pos);\r\n\r\n\t\tcal = this._render_calendar(cont, date, obj);\r\n\t\r\n\t\tif (!cal.$_eventAttached) {\r\n\t\t\tcal.$_eventAttached = true;\r\n\t\t\tminicalDomEvents.attach(cal, \"click\", (function(e) {\r\n\t\t\t\tvar src = e.target || e.srcElement;\r\n\r\n\t\t\t\tvar $dom = scheduler.$domHelpers;\r\n\t\t\t\tif ($dom.closest(src, \".dhx_month_head\")) {\r\n\t\t\t\t\tif (!$dom.closest(src, \".dhx_after\") && !$dom.closest(src, \".dhx_before\")) {\r\n\r\n\t\t\t\t\t\tvar cellRoot = $dom.closest(src, \"[data-cell-date]\");\r\n\t\t\t\t\t\tvar dateAttribute = cellRoot.getAttribute(\"data-cell-date\");\r\n\t\t\t\t\t\tvar newDate = scheduler.templates.parse_date(dateAttribute);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tscheduler.unmarkCalendar(this);\r\n\t\t\t\t\t\tscheduler.markCalendar(this, newDate, \"dhx_calendar_click\");\r\n\t\t\t\t\t\tthis._last_date = newDate;\r\n\t\t\t\t\t\tif (this.conf.handler) this.conf.handler.call(scheduler, newDate, this);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}).bind(cal));\r\n\t\t}\r\n\t\r\n\t} else {\r\n\t\tcal = this._render_calendar(_prev.parentNode, date, obj, _prev);\r\n\t\tscheduler.unmarkCalendar(cal);\r\n\t}\r\n\r\n\tif (scheduler.config.minicalendar.mark_events) {\r\n\t\tvar start = scheduler.date.month_start(date);\r\n\t\tvar end = scheduler.date.add(start, 1, \"month\");\r\n\t\tvar evs = this.getEvents(start, end);\r\n\t\tvar filter = this[\"filter_\" + this._mode];\r\n\t\tvar markedDates = {};\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tif (filter && !filter(ev.id, ev))\r\n\t\t\t\tcontinue;\r\n\t\t\tvar d = ev.start_date;\r\n\t\t\tif (d.valueOf() < start.valueOf())\r\n\t\t\t\td = start;\r\n\t\t\td = scheduler.date.date_part(new Date(d.valueOf()));\r\n\t\t\twhile (d < ev.end_date) {\r\n\t\t\t\tif(!markedDates[+d]) {\r\n\t\t\t\t\tmarkedDates[+d] = true;\r\n\t\t\t\t\tthis.markCalendar(cal, d, \"dhx_year_event\");\r\n\t\t\t\t}\r\n\t\t\t\td = this.date.add(d, 1, \"day\");\r\n\t\t\t\tif (d.valueOf() >= end.valueOf())\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tthis._markCalendarCurrentDate(cal);\r\n\r\n\tcal.conf = obj;\r\n\tif (obj.sync && !is_refresh)\r\n\t\tthis._synced_minicalendars.push(cal);\r\n\r\n\tif(!cal.conf._on_xle_handler){\r\n\t\tcal.conf._on_xle_handler = scheduler.attachEvent(\"onXLE\", function refreshOnLoad(){\r\n\t\t\tscheduler.updateCalendar(cal, cal.conf.date);\r\n\t\t});\r\n\t}\r\n\r\n\tif(this.config.wai_aria_attributes && this.config.wai_aria_application_role){\r\n\t\tcal.setAttribute(\"role\", \"application\");\r\n\t}\r\n\r\n\treturn cal;\r\n};\r\nscheduler._get_def_cont = function(pos) {\r\n\tif (!this._def_count) {\r\n\t\tthis._def_count = document.createElement(\"div\");\r\n\t\tthis._def_count.className = \"dhx_minical_popup\";\r\n\t\tscheduler.event(this._def_count, \"click\", function(e) { e.cancelBubble = true; });\r\n\t\tdocument.body.appendChild(this._def_count);\r\n\t}\r\n\r\n\tif(pos.left){\r\n\t\tthis._def_count.style.left = pos.left + \"px\";\r\n\t}\r\n\tif(pos.right){\r\n\t\tthis._def_count.style.right = pos.right + \"px\";\r\n\t}\r\n\tif(pos.top){\r\n\t\tthis._def_count.style.top = pos.top + \"px\";\r\n\t}\r\n\tif(pos.bottom){\r\n\t\tthis._def_count.style.bottom = pos.bottom + \"px\";\r\n\t}\r\n\r\n\tthis._def_count._created = new Date();\r\n\r\n\treturn this._def_count;\r\n};\r\nscheduler._locateCalendar = function(cal, date) {\r\n\tif (typeof date == \"string\")\r\n\t\tdate = scheduler.templates.api_date(date);\r\n\r\n\tif(+date > +cal._max_date || +date < +cal._min_date)\r\n\t\treturn null;\r\n\r\n\tvar table = cal.querySelector(\".dhx_year_body\").childNodes[0];\r\n\r\n\tvar weekNum = 0;\r\n\tvar dat = new Date(cal._min_date);\r\n\twhile(+this.date.add(dat, 1, \"week\") <= +date){\r\n\t\tdat = this.date.add(dat, 1, \"week\");\r\n\t\tweekNum++;\r\n\t}\r\n\r\n\tvar sm = scheduler.config.start_on_monday;\r\n\tvar day = (date.getDay() || (sm ? 7 : 0)) - (sm ? 1 : 0);\r\n\r\n\tconst dayCell = table.querySelector(`.dhx_cal_month_row:nth-child(${weekNum + 1}) .dhx_cal_month_cell:nth-child(${day + 1})`);\r\n\tif(dayCell) {\r\n\t\treturn dayCell.firstChild;\r\n\t} else {\r\n\t\treturn null;\r\n\t}\r\n};\r\nscheduler.markCalendar = function(cal, date, css) {\r\n\tvar div = this._locateCalendar(cal, date);\r\n\tif(!div)\r\n\t\treturn;\r\n\r\n\tdiv.className += \" \" + css;\r\n};\r\nscheduler.unmarkCalendar = function(cal, date, css) {\r\n\tdate = date || cal._last_date;\r\n\tcss = css || \"dhx_calendar_click\";\r\n\tif (!date) return;\r\n\tvar el = this._locateCalendar(cal, date);\r\n\tif(!el)\r\n\t\treturn;\r\n\tel.className = (el.className || \"\").replace(RegExp(css, \"g\"));\r\n};\r\nscheduler._week_template = function(width) {\r\n\tvar summ = (width || 250);\r\n\tvar left = 0;\r\n\r\n\tvar week_template = document.createElement(\"div\");\r\n\tvar dummy_date = this.date.week_start(scheduler._currentDate());\r\n\tfor (var i = 0; i < 7; i++) {\r\n\t\tthis._cols[i] = Math.floor(summ / (7 - i));\r\n\t\tthis._render_x_header(i, left, dummy_date, week_template);\r\n\t\tdummy_date = this.date.add(dummy_date, 1, \"day\");\r\n\t\tsumm -= this._cols[i];\r\n\t\tleft += this._cols[i];\r\n\t}\r\n\tweek_template.lastChild.className += \" dhx_scale_bar_last\";\r\n\treturn week_template;\r\n};\r\nscheduler.updateCalendar = function(obj, sd) {\r\n\tobj.conf.date = sd;\r\n\tthis.renderCalendar(obj.conf, obj, true);\r\n};\r\nscheduler._mini_cal_arrows = [\" \", \" \"];\r\nscheduler._render_calendar = function(obj, sd, conf, previous) {\r\n\t/*store*/\r\n\tvar ts = scheduler.templates;\r\n\tvar temp = this._cols;\r\n\tthis._cols = [];\r\n\tvar temp2 = this._mode;\r\n\tthis._mode = \"calendar\";\r\n\tvar temp3 = this._colsS;\r\n\tthis._colsS = {height: 0};\r\n\tvar temp4 = new Date(this._min_date);\r\n\tvar temp5 = new Date(this._max_date);\r\n\tvar temp6 = new Date(scheduler._date);\r\n\tvar temp7 = ts.month_day;\r\n\tvar temp8 = this._ignores_detected; this._ignores_detected = 0;\r\n\tts.month_day = ts.calendar_date;\r\n\r\n\tsd = this.date.month_start(sd);\r\n\tvar week_template = this._week_template(obj.offsetWidth - 1 - this.config.minicalendar.padding );\r\n\r\n\tvar d;\r\n\tif (previous){\r\n\t\td = previous;\r\n\t} else {\r\n\t\td = document.createElement(\"div\");\r\n\t\td.className = \"dhx_cal_container dhx_mini_calendar\";\r\n\t}\r\n\td.setAttribute(\"date\", this._helpers.formatDate(sd));\r\n\td.innerHTML = \"
\" +\r\n\t\t\t\"
\" : \"'>\") +\r\n\t\t\t\"
\"+(week_template ? week_template.innerHTML : \"\")+\"
\" +\r\n\t\t\t\"
\" +\r\n\t\t\"
\";\r\n\tvar header = d.querySelector(\".dhx_year_month\");\r\n\tvar weekHeader = d.querySelector(\".dhx_year_week\");\r\n\tvar body = d.querySelector(\".dhx_year_body\");\r\n\r\n\theader.innerHTML = this.templates.calendar_month(sd);\r\n\tif (conf.navigation) {\r\n\t\tvar move_minicalendar_date = function(calendar, diff) {\r\n\t\t\tvar date = scheduler.date.add(calendar._date, diff, \"month\");\r\n\t\t\tscheduler.updateCalendar(calendar, date);\r\n\t\t\tif (scheduler._date.getMonth() == calendar._date.getMonth() && scheduler._date.getFullYear() == calendar._date.getFullYear()) {\r\n\t\t\t\tscheduler._markCalendarCurrentDate(calendar);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tvar css_classnames = [\"dhx_cal_prev_button\", \"dhx_cal_next_button\"];\r\n\t\tvar css_texts = [\"left:1px;top:4px;position:absolute;\", \"left:auto; right:1px;top:4px;position:absolute;\"];\r\n\t\tvar diffs = [-1, 1];\r\n\t\tvar handler = function(diff) {\r\n\t\t\treturn function() {\t\r\n\t\t\t\tif (conf.sync) {\r\n\t\t\t\t\tvar calendars = scheduler._synced_minicalendars;\r\n\t\t\t\t\tfor (var k = 0; k < calendars.length; k++) {\r\n\t\t\t\t\t\tmove_minicalendar_date(calendars[k], diff);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (scheduler.config.rtl) {\r\n\t\t\t\t\t\tdiff = -diff;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmove_minicalendar_date(d, diff);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t};\r\n\t\tvar labels = [scheduler.locale.labels.prev, scheduler.locale.labels.next];\r\n\t\tfor (var j = 0; j < 2; j++) {\r\n\t\t\tvar arrow = document.createElement(\"div\");\r\n\t\t\t//var diff = diffs[j];\r\n\t\t\tarrow.className = css_classnames[j];\r\n\r\n\t\t\tscheduler._waiAria.headerButtonsAttributes(arrow, labels[j]);\r\n\r\n\t\t\tarrow.style.cssText = css_texts[j];\r\n\t\t\tarrow.innerHTML = this._mini_cal_arrows[j];\r\n\t\t\theader.appendChild(arrow);\r\n\t\t\tminicalDomEvents.attach(arrow, \"click\", handler(diffs[j]));\r\n\t\t}\r\n\t}\r\n\td._date = new Date(sd);\r\n\r\n\td.week_start = (sd.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;\r\n\r\n\tvar dd = d._min_date = this.date.week_start(sd);\r\n\td._max_date = this.date.add(d._min_date, 6, \"week\");\r\n\r\n\tthis._reset_month_scale(body, sd, dd, 6);\r\n\r\n\tif (!previous)\r\n\t\tobj.appendChild(d);\r\n\r\n\tweekHeader.style.height = (weekHeader.childNodes[0].offsetHeight - 1) + \"px\"; // dhx_year_week should have height property so that day dates would get correct position. dhx_year_week height = height of it's child (with the day name)\r\n\r\n\tvar headerId = scheduler.uid();\r\n\tscheduler._waiAria.minicalHeader(header, headerId);\r\n\tscheduler._waiAria.minicalGrid(d.querySelector(\".dhx_year_grid\"), headerId);\r\n\tscheduler._waiAria.minicalRow(weekHeader);\r\n\r\n\tvar dayHeaders = weekHeader.querySelectorAll(\".dhx_scale_bar\");\r\n\tfor(var i = 0; i < dayHeaders.length; i++){\r\n\t\tscheduler._waiAria.minicalHeadCell(dayHeaders[i]);\r\n\t}\r\n\tvar dayCells = body.querySelectorAll(\".dhx_cal_month_cell\");\r\n\tvar firstDate = new Date(dd);\r\n\tfor(var i = 0; i < dayCells.length; i++){\r\n\r\n\t\tscheduler._waiAria.minicalDayCell(dayCells[i], new Date(firstDate));\r\n\t\tfirstDate = scheduler.date.add(firstDate, 1, \"day\");\r\n\t}\r\n\r\n\tscheduler._waiAria.minicalHeader(header, headerId);\r\n\r\n\t/*restore*/\r\n\tthis._cols = temp;\r\n\tthis._mode = temp2;\r\n\tthis._colsS = temp3;\r\n\tthis._min_date = temp4;\r\n\tthis._max_date = temp5;\r\n\tscheduler._date = temp6;\r\n\tts.month_day = temp7;\r\n\tthis._ignores_detected = temp8;\r\n\treturn d;\r\n};\r\nscheduler.destroyCalendar = function(cal, force) {\r\n\tif (!cal && this._def_count && this._def_count.firstChild) {\r\n\t\tif (force || (new Date()).valueOf() - this._def_count._created.valueOf() > 500)\r\n\t\t\tcal = this._def_count.firstChild;\r\n\t}\r\n\tif (!cal) return;\r\n\tminicalDomEvents.detachAll();\r\n\t//cal.onclick = null;\r\n\tcal.innerHTML = \"\";\r\n\tif (cal.parentNode)\r\n\t\tcal.parentNode.removeChild(cal);\r\n\tif (this._def_count)\r\n\t\tthis._def_count.style.top = \"-1000px\";\r\n\r\n\tif(cal.conf && cal.conf._on_xle_handler)\r\n\t\tscheduler.detachEvent(cal.conf._on_xle_handler);\r\n};\r\nscheduler.isCalendarVisible = function() {\r\n\tif (this._def_count && parseInt(this._def_count.style.top, 10) > 0)\r\n\t\treturn this._def_count;\r\n\treturn false;\r\n};\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tscheduler.event(document.body, \"click\", function() { scheduler.destroyCalendar(); });\r\n}, {once: true});\r\n\r\n\r\n\r\nscheduler.form_blocks.calendar_time = {\r\n\trender: function(sns) {\r\n\t\tvar html = \"\";\r\n\r\n\t\tvar cfg = scheduler.config;\r\n\t\tvar dt = this.date.date_part(scheduler._currentDate());\r\n\r\n\t\tvar last = 24 * 60, first = 0;\r\n\t\tif (cfg.limit_time_select) {\r\n\t\t\tfirst = 60 * cfg.first_hour;\r\n\t\t\tlast = 60 * cfg.last_hour + 1; // to include \"17:00\" option if time select is limited\r\n\t\t}\r\n\t\tdt.setHours(first / 60);\r\n\r\n\t\tsns._time_values = [];\r\n\t\thtml += \" \";\r\n\r\n\t\t//var full_day = scheduler.config.full_day;\r\n\r\n\t\treturn \"
\" + html + \"  –  \" + html + \"
\";\r\n\t},\r\n\tset_value: function(node, value, ev, config) {\r\n\r\n\t\tvar inputs = node.getElementsByTagName(\"input\");\r\n\t\tvar selects = node.getElementsByTagName(\"select\");\r\n\t\tvar start_date,\r\n\t\t\tend_date;\r\n\r\n\t\tvar _init_once = function(inp, date, number) {\r\n\t\t\tscheduler.event(inp, \"click\", function() {\r\n\t\t\t\tscheduler.destroyCalendar(null, true);\r\n\t\t\t\tscheduler.renderCalendar({\r\n\t\t\t\t\tposition: inp,\r\n\t\t\t\t\tdate: new Date(this._date),\r\n\t\t\t\t\tnavigation: true,\r\n\t\t\t\t\thandler: function(new_date) {\r\n\t\t\t\t\t\tinp.value = scheduler.templates.calendar_time(new_date);\r\n\t\t\t\t\t\tinp._date = new Date(new_date);\r\n\t\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t\t\tif (scheduler.config.event_duration && scheduler.config.auto_end_date && number === 0) { //first element = start date\r\n\t\t\t\t\t\t\t_update_minical_select();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t};\r\n\r\n\t\tif (scheduler.config.full_day) {\r\n\t\t\tif (!node._full_day) {\r\n\t\t\t\tvar html = \"\";\r\n\t\t\t\tif (!scheduler.config.wide_form)\r\n\t\t\t\t\thtml = node.previousSibling.innerHTML + html;\r\n\t\t\t\tnode.previousSibling.innerHTML = html;\r\n\t\t\t\tnode._full_day = true;\r\n\t\t\t}\r\n\t\t\tvar input = node.previousSibling.getElementsByTagName(\"input\")[0];\r\n\r\n\t\t\tvar isFulldayEvent = (scheduler.date.time_part(ev.start_date) === 0 && scheduler.date.time_part(ev.end_date) === 0);\r\n\t\t\tinput.checked = isFulldayEvent;\r\n\r\n\t\t\tselects[0].disabled = input.checked;\r\n\t\t\tselects[1].disabled = input.checked;\r\n\r\n\t\t\tif (!input.$_eventAttached) {\r\n\t\t\t\tinput.$_eventAttached = true;\r\n\t\t\t\tscheduler.event(input, \"click\", function() {\r\n\t\t\t\t\tif (input.checked === true) {\r\n\t\t\t\t\t\tvar obj = {};\r\n\t\t\t\t\t\tscheduler.form_blocks.calendar_time.get_value(node, obj);\r\n\r\n\t\t\t\t\t\tstart_date = scheduler.date.date_part(obj.start_date);\r\n\t\t\t\t\t\tend_date = scheduler.date.date_part(obj.end_date);\r\n\r\n\t\t\t\t\t\tif (+end_date == +start_date || (+end_date >= +start_date && (ev.end_date.getHours() !== 0 || ev.end_date.getMinutes() !== 0)))\r\n\t\t\t\t\t\t\tend_date = scheduler.date.add(end_date, 1, \"day\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar start = start_date || ev.start_date;\r\n\t\t\t\t\tvar end = end_date || ev.end_date;\r\n\t\t\t\t\t_attach_action(inputs[0], start);\r\n\t\t\t\t\t_attach_action(inputs[1], end);\r\n\t\t\t\t\tselects[0].value = start.getHours() * 60 + start.getMinutes();\r\n\t\t\t\t\tselects[1].value = end.getHours() * 60 + end.getMinutes();\r\n\r\n\t\t\t\t\tselects[0].disabled = input.checked;\r\n\t\t\t\t\tselects[1].disabled = input.checked;\r\n\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (scheduler.config.event_duration && scheduler.config.auto_end_date) {\r\n\r\n\t\t\tvar _update_minical_select = function () {\r\n\t\t\t\tif (!(scheduler.config.auto_end_date && scheduler.config.event_duration)){\r\n\t\t\t\t\t// setting may be disabled after the handler is attached\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tstart_date = scheduler.date.add(inputs[0]._date, selects[0].value, \"minute\");\r\n\t\t\t\tend_date = new Date(start_date.getTime() + (scheduler.config.event_duration * 60 * 1000));\r\n\r\n\t\t\t\tinputs[1].value = scheduler.templates.calendar_time(end_date);\r\n\t\t\t\tinputs[1]._date = scheduler.date.date_part(new Date(end_date));\r\n\r\n\t\t\t\tselects[1].value = end_date.getHours() * 60 + end_date.getMinutes();\r\n\t\t\t};\r\n\r\n\t\t\tif(!selects[0].$_eventAttached){\r\n\t\t\t\tselects[0].addEventListener(\"change\", _update_minical_select); // only update on first select should trigger update so user could define other end date if he wishes too\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction _attach_action(inp, date, number) {\r\n\t\t\t_init_once(inp, date, number);\r\n\t\t\tinp.value = scheduler.templates.calendar_time(date);\r\n\t\t\tinp._date = scheduler.date.date_part(new Date(date));\r\n\t\t}\r\n\r\n\t\t_attach_action(inputs[0], ev.start_date, 0);\r\n\t\t_attach_action(inputs[1], ev.end_date, 1);\r\n\t\t_init_once = function() {};\r\n\r\n\t\tfunction _round_minutes(date) {\r\n\t\t\tvar time_values = config._time_values;\r\n\t\t\tvar direct_value = date.getHours() * 60 + date.getMinutes();\r\n\t\t\tvar fixed_value = direct_value;\r\n\t\t\tvar value_found = false;\r\n\r\n\t\t\tfor (var k = 0; k < time_values.length; k++) {\r\n\t\t\t\tvar t_v = time_values[k];\r\n\t\t\t\tif (t_v === direct_value) {\r\n\t\t\t\t\tvalue_found = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif (t_v < direct_value)\r\n\t\t\t\t\tfixed_value = t_v;\r\n\t\t\t}\r\n\r\n\t\t\tif(!(value_found || fixed_value))\r\n\t\t\t\treturn -1;\r\n\r\n\t\t\treturn (value_found) ? direct_value : fixed_value;\r\n\t\t}\r\n\r\n\t\tselects[0].value = _round_minutes(ev.start_date);\r\n\t\tselects[1].value = _round_minutes(ev.end_date);\r\n\r\n\t},\r\n\tget_value: function(node, ev) {\r\n\t\tvar inputs = node.getElementsByTagName(\"input\");\r\n\t\tvar selects = node.getElementsByTagName(\"select\");\r\n\r\n\t\tev.start_date = scheduler.date.add(inputs[0]._date, selects[0].value, \"minute\");\r\n\t\tev.end_date = scheduler.date.add(inputs[1]._date, selects[1].value, \"minute\");\r\n\r\n\t\tif (ev.end_date <= ev.start_date)\r\n\t\t\tev.end_date = scheduler.date.add(ev.start_date, scheduler.config.time_step, \"minute\");\r\n\t\treturn {\r\n\t\t\tstart_date: new Date(ev.start_date),\r\n\t\t\tend_date: new Date(ev.end_date)\r\n\t\t};\r\n\t},\r\n\tfocus: function(node) {\r\n\t}\r\n};\r\nscheduler.linkCalendar = function(calendar, datediff) {\r\n\tvar action = function() {\r\n\t\tvar date = scheduler._date;\r\n\t\tvar dateNew = new Date(date.valueOf());\r\n\t\tif (datediff) dateNew = datediff(dateNew);\r\n\t\tdateNew.setDate(1);\r\n\t\tscheduler.updateCalendar(calendar, dateNew);\r\n\t\treturn true;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", action);\r\n\tscheduler.attachEvent(\"onXLE\", action);\r\n\tscheduler.attachEvent(\"onEventAdded\", action);\r\n\tscheduler.attachEvent(\"onEventChanged\", action);\r\n\tscheduler.attachEvent(\"onEventDeleted\", action);\r\n\taction();\r\n};\r\n\r\nscheduler._markCalendarCurrentDate = function(calendar) {\r\n\tvar state = scheduler.getState();\r\n\tvar from = state.min_date;\r\n\tvar to = state.max_date;\r\n\tvar mode = state.mode;\r\n\r\n\tvar month_start = scheduler.date.month_start(new Date(calendar._date));\r\n\tvar month_end = scheduler.date.add(month_start, 1, \"month\");\r\n\r\n\tvar noHighlight = {\r\n\t\t\"month\":true,\r\n\t\t\"year\":true,\r\n\t\t\"agenda\":true,\r\n\t\t\"grid\":true\r\n\t};\r\n\t// no need to highlight current dates for a large range views - agenda, year, etc.\r\n\tif(noHighlight[mode] || (from.valueOf() <= month_start.valueOf() && to.valueOf() >= month_end.valueOf())){\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar current = from;\r\n\twhile(current.valueOf() < to.valueOf()){\r\n\t\tif (month_start.valueOf() <= current.valueOf() && month_end > current) {\r\n\t\t\tscheduler.markCalendar(calendar, current, \"dhx_calendar_click\");\r\n\t\t}\r\n\t\tcurrent = scheduler.date.add(current, 1, \"day\");\r\n\t}\r\n};\r\n\r\nscheduler.attachEvent(\"onEventCancel\", function(){\r\n\tscheduler.destroyCalendar(null, true);\r\n});\r\n\r\nscheduler.attachEvent(\"onDestroy\", function(){\r\n\tscheduler.destroyCalendar();\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\tscheduler.xy.scroll_width = 0;\r\n\r\n\tvar old = scheduler.render_view_data;\r\n\tscheduler.render_view_data=function(){\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\t\tdata.firstChild._h_fix = true;\r\n\r\n\t\told.apply(scheduler,arguments);\r\n\r\n\r\n\r\n\t\tvar height = parseInt(data.style.height);\r\n\t\tdata.style.height=\"1px\";\r\n\t\tdata.style.height=data.scrollHeight+\"px\";\r\n\r\n\t\tthis._obj.style.height = this._obj.clientHeight + data.scrollHeight - height + \"px\";\r\n\t};\r\n\r\n\tvar old_s=scheduler._reset_month_scale;\r\n\tscheduler._reset_month_scale=function(a,b,c,d){\r\n\t\tvar dummy = {clientHeight:100};\r\n\t\told_s.apply(scheduler,[dummy,b,c,d]);\r\n\t\ta.innerHTML = dummy.innerHTML;\r\n\t};\r\n\r\n});\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Multisection\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\n\r\nfunction parseXMLOptions(loader, config){\r\n\tvar items = scheduler.ajax.xpath(\"//data/item\", loader.xmlDoc);\r\n\tvar ids = {};\r\n\tfor (var i = 0; i < items.length; i++) {\r\n\t\tids[items[i].getAttribute(config.map_to)] = true;\r\n\t}\r\n\treturn ids;\r\n}\r\n\r\nfunction parseJSONOptions(loader, config){\r\n\ttry{\r\n\t\tvar items = JSON.parse(loader.xmlDoc.responseText);\r\n\t\tvar ids = {};\r\n\t\tfor (var i = 0; i < items.length; i++) {\r\n\t\t\tvar option = items[i];\r\n\r\n\t\t\tids[option.value || option.key || option.id] = true;\r\n\t\t}\r\n\t\treturn ids;\r\n\t}catch(e){\r\n\t\treturn null;\r\n\t}\r\n}\r\n\r\nscheduler.form_blocks[\"multiselect\"]={\r\n\trender:function(sns) {\r\n\t\tvar css = \"dhx_multi_select_control dhx_multi_select_\"+sns.name;\r\n\t\tif(!!sns.vertical){\r\n\t\t\tcss += \" dhx_multi_select_control_vertical\";\r\n\t\t}\r\n\r\n\t\tvar _result = \"
\";\r\n\t\tfor (var i=0; i\"+sns.options[i].label+\"\";\r\n\t\t}\r\n\t\t_result += \"
\";\r\n\t\treturn _result;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\r\n\t\tvar _children = node.getElementsByTagName('input');\r\n\t\tfor(var i=0;i<_children.length;i++) {\r\n\t\t\t_children[i].checked = false; //unchecking all inputs on the form\r\n\t\t}\r\n\r\n\t\tfunction _mark_inputs(ids) { // ids = [ 0: undefined, 1: undefined, 2: true, 'custom_name': false ... ]\r\n\t\t\tvar _children = node.getElementsByTagName('input');\r\n\t\t\tfor(var i=0;i<_children.length; i++) {\r\n\t\t\t\t_children[i].checked = !! ids[_children[i].value];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar _ids = {};\r\n\t\tif (ev[config.map_to]) {\r\n\t\t\tvar results = (ev[config.map_to] + \"\").split(config.delimiter || scheduler.config.section_delimiter || \",\");\r\n\t\t\tfor (var i = 0; i < results.length; i++) {\r\n\t\t\t\t_ids[results[i]] = true;\r\n\t\t\t}\r\n\t\t\t_mark_inputs(_ids);\r\n\t\t} else {\r\n\t\t\tif (scheduler._new_event || !config.script_url)\r\n\t\t\t\treturn;\r\n\t\t\tvar divLoading = document.createElement('div');\r\n\t\t\tdivLoading.className = 'dhx_loading';\r\n\t\t\tdivLoading.style.cssText = \"position: absolute; top: 40%; left: 40%;\";\r\n\t\t\tnode.appendChild(divLoading);\r\n\r\n\t\t\tvar url = [\r\n\t\t\t\tconfig.script_url,\r\n\t\t\t\t(config.script_url.indexOf(\"?\") == -1 ? \"?\" : \"&\"),\r\n\t\t\t\t'dhx_crosslink_' + config.map_to + '=' + ev.id + '&uid=' + scheduler.uid()\r\n\t\t\t].join(\"\");\r\n\r\n\t\t\tscheduler.ajax.get(url, function(loader) {\r\n\t\t\t\tvar options = parseJSONOptions(loader, config);\r\n\t\t\t\tif(!options){\r\n\t\t\t\t\toptions = parseXMLOptions(loader, config);\r\n\t\t\t\t}\r\n\t\t\t\t_mark_inputs(options);\r\n\t\t\t\tnode.removeChild(divLoading);\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tvar _result = [];\r\n\t\tvar _children = node.getElementsByTagName(\"input\");\r\n\t\tfor(var i=0;i<_children.length;i++) {\r\n\t\t\tif(_children[i].checked)\r\n\t\t\t\t_result.push(_children[i].value);\r\n\t\t}\r\n\t\treturn _result.join(config.delimiter || scheduler.config.section_delimiter || \",\");\r\n\t},\r\n\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\r\n\tfunction backup(obj){\r\n\t\tvar t = function(){};\r\n\t\tt.prototype = obj;\r\n\t\treturn t;\r\n\t}\r\n\r\n\tvar old = scheduler._load;\r\n\tscheduler._load=function(url,from){\r\n\t\turl=url||this._load_url;\r\n\t\tif (typeof url == \"object\"){\r\n\t\t\tvar t = backup(this._loaded);\r\n\t\t\tfor (var i=0; i < url.length; i++) {\r\n\t\t\t\tthis._loaded=new t();\r\n\t\t\t\told.call(this,url[i],from);\r\n\t\t\t}\r\n\t\t} else\r\n\t\t\told.apply(this,arguments);\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\t/* global Backbone */\r\n\tvar cfg = {\r\n\t\tuse_id : false\r\n\t};\r\n\r\n\t//remove private properties\r\n\tfunction sanitize(ev){\r\n\t\tvar obj = {};\r\n\t\tfor (var key in ev)\r\n\t\t\tif (key.indexOf(\"_\") !== 0)\r\n\t\t\t\tobj[key] = ev[key];\r\n\r\n\t\tif (!cfg.use_id)\r\n\t\t\tdelete obj.id;\r\n\r\n\t\treturn obj;\r\n\t}\r\n\r\n\tvar update_timer;\r\n\tfunction update_view(){\r\n\t\tclearTimeout(update_timer);\r\n\t\tupdate_timer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler.updateView();\r\n\t\t},1);\r\n\t}\r\n\r\n\tfunction _start_ext_load(cal){\r\n\t\tcal._loading = true;\r\n\t\tcal._not_render = true;\r\n\r\n\t\tcal.callEvent(\"onXLS\", []);\r\n\t}\r\n\tfunction _finish_ext_load(cal){\r\n\t\tcal._not_render = false;\r\n\t\tif (cal._render_wait)\r\n\t\t\tcal.render_view_data();\r\n\t\tcal._loading = false;\r\n\r\n\t\tcal.callEvent(\"onXLE\", []);\r\n\t}\r\n\r\n\r\n\tfunction _get_id(model){\r\n\t\treturn cfg.use_id ? model.id : model.cid;\r\n\t}\r\n\r\nscheduler.backbone = function(events, config){\r\n\tif (config) cfg = config;\r\n\r\n\tevents.bind(\"change\", function(model, info){\r\n\t\tvar cid = _get_id(model);\r\n\t\tvar ev = scheduler._events[cid] = model.toJSON();\r\n\t\tev.id = cid;\r\n\r\n\t\tscheduler._init_event(ev);\r\n\t\tupdate_view();\r\n\t});\r\n\tevents.bind(\"remove\", function(model, changes){\r\n\t\tvar cid = _get_id(model);\r\n\t\tif (scheduler._events[cid])\r\n\t\t\tscheduler.deleteEvent(cid);\r\n\t});\r\n\r\n\tvar queue = [];\r\n\tfunction add_from_queue(){\r\n\t\tif(scheduler.$destroyed){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (queue.length){\r\n\t\t\tscheduler.parse(queue, \"json\");\r\n\t\t\tqueue = [];\r\n\t\t}\r\n\t}\r\n\r\n\tevents.bind(\"add\", function(model, changes){\r\n\t\tvar cid = _get_id(model);\r\n\t\tif (!scheduler._events[cid]){\r\n\t\t\tvar ev = model.toJSON();\r\n\t\t\tev.id = cid;\r\n\t\t\tscheduler._init_event(ev);\r\n\r\n\t\t\tqueue.push(ev);\r\n\t\t\tif (queue.length == 1)\r\n\t\t\t\tsetTimeout(add_from_queue,1);\r\n\t\t}\r\n\t});\r\n\r\n\tevents.bind(\"request\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_start_ext_load(scheduler);\r\n\t});\r\n\tevents.bind(\"sync\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_finish_ext_load(scheduler);\r\n\t});\r\n\tevents.bind(\"error\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_finish_ext_load(scheduler);\r\n\t});\r\n\r\n\r\n\tscheduler.attachEvent(\"onEventCreated\", function(id){\r\n\t\tvar ev = new events.model(scheduler.getEvent(id));\r\n\t\tscheduler._events[id] = ev.toJSON();\r\n\t\tscheduler._events[id].id = id;\r\n\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventAdded\", function(id){\r\n\t\tif (!events.get(id)){\r\n\t\t\tvar data = sanitize(scheduler.getEvent(id));\r\n\t\t\tvar model = new events.model(data);\r\n\r\n\t\t\tvar cid = _get_id(model);\r\n\t\t\tif (cid != id)\r\n\t\t\t\tthis.changeEventId(id, cid);\r\n\t\t\tevents.add(model);\r\n\t\t\tevents.trigger(\"scheduler:add\", model);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\", function(id){\r\n\t\tvar ev = events.get(id);\r\n\t\tvar upd = sanitize(scheduler.getEvent(id));\r\n\r\n\t\tev.set(upd);\r\n\t\tevents.trigger(\"scheduler:change\", ev);\r\n\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function(id){\r\n\t\tvar model = events.get(id);\r\n\t\tif (model){\r\n\t\t\tevents.trigger(\"scheduler:remove\", model);\r\n\t\t\tevents.remove(id);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\t/* global dhtmlDragAndDropObject, dhtmlx */\r\n// lame old code doesn't provide raw event object\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\t\tvar dragger = (new dhtmlDragAndDropObject());\r\n\t\tvar old = dragger.stopDrag;\r\n\t\tvar last_event;\r\n\t\tdragger.stopDrag = function(e) {\r\n\t\t\tlast_event = e;\r\n\t\t\treturn old.apply(this, arguments);\r\n\t\t};\r\n\r\n\t\tfunction on_drop(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml) {\r\n\r\n\t\t\tif (scheduler.checkEvent(\"onBeforeExternalDragIn\") && !scheduler.callEvent(\"onBeforeExternalDragIn\", [sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml, last_event]))\r\n\t\t\t\treturn;\r\n\r\n\t\t\tvar temp = scheduler.attachEvent(\"onEventCreated\", function (id) {\r\n\t\t\t\tif (!scheduler.callEvent(\"onExternalDragIn\", [id, sourceHtmlObject, last_event])) {\r\n\t\t\t\t\tthis._drag_mode = this._drag_id = null;\r\n\t\t\t\t\tthis.deleteEvent(id);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tvar action_data = scheduler.getActionData(last_event);\r\n\t\t\tvar event_data = {\r\n\t\t\t\tstart_date: new Date(action_data.date)\r\n\t\t\t};\r\n\r\n\t\t\t// custom views, need to assign section id, fix dates\r\n\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\tvar view_options = scheduler.matrix[scheduler._mode];\r\n\t\t\t\tevent_data[view_options.y_property] = action_data.section;\r\n\r\n\t\t\t\tvar pos = scheduler._locate_cell_timeline(last_event);\r\n\t\t\t\tevent_data.start_date = view_options._trace_x[pos.x];\r\n\t\t\t\tevent_data.end_date = scheduler.date.add(event_data.start_date, view_options.x_step, view_options.x_unit);\r\n\t\t\t}\r\n\t\t\tif (scheduler._props && scheduler._props[scheduler._mode]) {\r\n\t\t\t\tevent_data[scheduler._props[scheduler._mode].map_to] = action_data.section;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler.addEventNow(event_data);\r\n\r\n\t\t\tscheduler.detachEvent(temp);\r\n\t\t}\r\n\r\n\t\tdragger.addDragLanding(scheduler._els[\"dhx_cal_data\"][0], {\r\n\t\t\t_drag: function(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml) {\r\n\t\t\t\ton_drop(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml);\r\n\t\t\t},\r\n\t\t\t_dragIn: function(htmlObject, shtmlObject) {\r\n\t\t\t\treturn htmlObject;\r\n\t\t\t},\r\n\t\t\t_dragOut: function(htmlObject) {\r\n\t\t\t\treturn this;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(dhtmlx.DragControl) {\r\n\t\t\tdhtmlx.DragControl.addDrop(scheduler._els[\"dhx_cal_data\"][0], {\r\n\t\t\t\tonDrop: function (source, target, d, e) {\r\n\t\t\t\t\tvar sourceDhtmlx = dhtmlx.DragControl.getMaster(source);\r\n\t\t\t\t\tlast_event = e;\r\n\t\t\t\t\ton_drop(source, sourceDhtmlx, target, e.target || e.srcElement);\r\n\t\t\t\t},\r\n\r\n\t\t\t\tonDragIn: function (source, target, e) {\r\n\t\t\t\t\treturn target;\r\n\t\t\t\t}\r\n\t\t\t}, true);\r\n\t\t}\r\n\t});\r\n\r\n}","export default function(scheduler){\r\n\r\n\tvar dx, dy,\r\n\t\thtml_regexp = new RegExp(\"<[^>]*>\", \"g\"),\r\n\t\tnewline_regexp = new RegExp(\"]*>\", \"g\");\r\n\r\n\tfunction clean_html(val) {\r\n\t\treturn val.replace(newline_regexp, \"\\n\").replace(html_regexp, \"\");\r\n\t}\r\n\r\n\tfunction x_norm(x, offset) {\r\n\t\tx = parseFloat(x);\r\n\t\toffset = parseFloat(offset);\r\n\t\tif (!isNaN(offset)) x -= offset;\r\n\r\n\t\tvar w = colsWidth(x);\r\n\t\tx = x - w.width + w.cols*dx;\r\n\t\treturn isNaN(x)?\"auto\":(100*x/(dx));\r\n\t}\r\n\r\n\tfunction x_norm_event(x, offset, is_left) {\r\n\t\tx = parseFloat(x);\r\n\t\toffset = parseFloat(offset);\r\n\t\tif (!isNaN(offset) && is_left) x -= offset;\r\n\r\n\t\tvar w = colsWidth(x);\r\n\t\tx = x - w.width + w.cols*dx;\r\n\t\treturn isNaN(x)?\"auto\":(100*x/(dx-(!isNaN(offset)?offset:0)));\r\n\t}\r\n\tfunction colsWidth(width) {\r\n\t\tvar r = 0;\r\n\t\tvar header = scheduler._els.dhx_cal_header[0].childNodes;\r\n\t\tvar els = header[1] ? header[1].childNodes : header[0].childNodes;\r\n\t\tfor (var i = 0; i < els.length; i++) {\r\n\t\t\tvar el = els[i].style ? els[i] : els[i].parentNode;\r\n\t\t\tvar w = parseFloat(el.style.width);\r\n\t\t\tif (width > w){\r\n\t\t\t\twidth -= (w+1);\r\n\t\t\t\tr+=(w+1);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\treturn { width: r, cols: i };\r\n\t}\r\n\r\n\tfunction y_norm(y) {\r\n\t\ty = parseFloat(y);\r\n\t\tif (isNaN(y)) return \"auto\";\r\n\t\treturn 100 * y / dy;\r\n\t}\r\n\r\n\tfunction get_style(node, style){\r\n\t\treturn (window.getComputedStyle?(window.getComputedStyle(node, null)[style]):(node.currentStyle?node.currentStyle[style]:null))||\"\";\r\n\t}\r\n\r\n\tfunction de_day(node, n) {\r\n\t\tvar x = parseInt(node.style.left, 10);\r\n\r\n\t\tfor (var dx = 0; dx < scheduler._cols.length; dx++) {\r\n\t\t\tx -= scheduler._cols[dx];\r\n\t\t\tif (x < 0) return dx;\r\n\t\t}\r\n\t\treturn n;\r\n\t}\r\n\r\n\tfunction de_week(node, n) {\r\n\t\tvar y = parseInt(node.style.top, 10);\r\n\t\tfor (var dy = 0; dy < scheduler._colsS.heights.length; dy++)\r\n\t\t\tif (scheduler._colsS.heights[dy] > y) return dy;\r\n\t\treturn n;\r\n\t}\r\n\r\n\tfunction xml_start(tag) {\r\n\t\treturn tag ? \"<\"+tag+\">\" : \"\";\r\n\t}\r\n\tfunction xml_end(tag) {\r\n\t\treturn tag ? \"\" : \"\";\r\n\t}\r\n\r\n\tfunction xml_top(tag, profile, header, footer) {\r\n\t\tvar xml = \"<\"+tag+\" profile='\" + profile + \"'\";\r\n\t\tif (header)\r\n\t\t\txml += \" header='\" + header + \"'\";\r\n\t\tif (footer)\r\n\t\t\txml += \" footer='\" + footer + \"'\";\r\n\t\txml += \">\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_body_header() {\r\n\t\tvar xml = \"\";\r\n\t\t// detects if current mode is timeline\r\n\t\tvar mode = scheduler._mode;\r\n\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode])\r\n\t\t\tmode = (scheduler.matrix[scheduler._mode].render == \"cell\") ? \"matrix\" : \"timeline\";\r\n\t\txml += \"\";\r\n\r\n\t\tif (scheduler._mode == \"week_agenda\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_data[0].getElementsByTagName(\"DIV\");\r\n\t\t\tfor (var i = 0; i < xh.length; i++)\r\n\t\t\t\tif (xh[i].className == \"dhx_wa_scale_bar\")\r\n\t\t\t\t\txml += \"\" + clean_html(xh[i].innerHTML) + \"\";\r\n\t\t} else if (scheduler._mode == \"agenda\" || scheduler._mode == \"map\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_header[0].childNodes[0].childNodes;\r\n\r\n\t\t\txml += \"\" + clean_html(xh[0].innerHTML) + \"\" + clean_html(xh[1].innerHTML) + \"\";\r\n\t\t} else if (scheduler._mode == \"year\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_data[0].childNodes;\r\n\t\t\tfor (var i = 0; i < xh.length; i++) {\r\n\t\t\t\txml += \"\";\r\n\t\t\t\txml += xml_month_scale(xh[i].querySelector(\".dhx_year_week\").childNodes);\r\n\t\t\t\txml += xml_month(xh[i].querySelector(\".dhx_year_body\"));\r\n\t\t\t\txml += \"\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\txml += \"\";\r\n\t\t\tvar xh = scheduler._els.dhx_cal_header[0].childNodes;\r\n\t\t\txml += xml_month_scale(xh);\r\n\t\t\txml += \"\";\r\n\r\n\t\t\tvar yh = scheduler._els.dhx_cal_data[0];\r\n\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tfor (var i = 0; i < yh.firstChild.rows.length; i++) {\r\n\t\t\t\t\tvar el = yh.firstChild.rows[i];\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t}\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tdy = yh.firstChild.rows[0].cells[0].offsetHeight;\r\n\t\t\t} else if (yh.firstChild.tagName == \"TABLE\") {\r\n\t\t\t\txml += xml_month(yh);\r\n\t\t\t} else {\r\n\t\t\t\tyh = yh.childNodes[yh.childNodes.length - 1];\r\n\t\t\t\twhile (yh.className.indexOf(\"dhx_scale_holder\") == -1)\r\n\t\t\t\t\tyh = yh.previousSibling;\r\n\t\t\t\tyh = yh.childNodes;\r\n\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tfor (var i = 0; i < yh.length; i++)\r\n\t\t\t\t\txml += \"\\n\";\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tdy = yh[0].offsetHeight;\r\n\t\t\t}\r\n\t\t}\r\n\t\txml += \"\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_month(yh) {\r\n\t\tvar xml = \"\";\r\n\t\tvar r = yh.querySelectorAll(\"tr\");\r\n\t\tfor (var i = 0; i < r.length; i++) {\r\n\t\t\tvar days = [];\r\n\t\t\tvar cells = r[i].querySelectorAll(\"td\");\r\n\r\n\t\t\tfor (var j = 0; j < cells.length; j++)\r\n\t\t\t\tdays.push(cells[j].querySelector(\".dhx_month_head\").innerHTML);\r\n\r\n\t\t\txml += \"\\n\";\r\n\t\t\tdy = cells[0].offsetHeight;\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_month_scale(xh) {\r\n\t\tvar xhs,\r\n\t\t\txml = \"\";\r\n\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\tif (scheduler.matrix[scheduler._mode].second_scale)\r\n\t\t\t\txhs = xh[1].childNodes;\r\n\r\n\t\t\txh = xh[0].childNodes;\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < xh.length; i++)\r\n\t\t\txml += \"\\n\";\r\n\t\tdx = xh[0].offsetWidth;\r\n\r\n\t\tif (xhs) {\r\n\t\t\tvar width = 0;\r\n\t\t\tvar top_width = xh[0].offsetWidth;\r\n\t\t\tvar top_col = 1;\r\n\t\t\tfor (var i = 0; i < xhs.length; i++) {\r\n\t\t\t\txml += \"\\n\";\r\n\t\t\t\twidth += xhs[i].offsetWidth;\r\n\t\t\t\tif (width >= top_width) {\r\n\t\t\t\t\ttop_width += (xh[top_col] ? xh[top_col].offsetWidth : 0);\r\n\t\t\t\t\ttop_col++;\r\n\t\t\t\t}\r\n\t\t\t\tdx = xhs[0].offsetWidth;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_body(colors) {\r\n\t\tvar xml = \"\";\r\n\t\tvar evs = scheduler._rendered;\r\n\t\tvar matrix = scheduler.matrix && scheduler.matrix[scheduler._mode];\r\n\r\n\t\tif (scheduler._mode == \"agenda\" || scheduler._mode == \"map\") {\r\n\r\n\t\t\tfor (var i = 0; i < evs.length; i++)\r\n xml += \"\";\r\n\r\n\t\t} else if (scheduler._mode == \"week_agenda\") {\r\n\r\n\t\t\tfor (var i = 0; i < evs.length; i++)\r\n\t\t\t\txml += \"\" + clean_html(evs[i].innerHTML) + \"\";\r\n\r\n\t\t} else if (scheduler._mode == \"year\") {\r\n\r\n\t\t\tvar evs = scheduler.get_visible_events();\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar d = evs[i].start_date;\r\n\t\t\t\tif (d.valueOf() < scheduler._min_date.valueOf())\r\n\t\t\t\t\td = scheduler._min_date;\r\n\r\n\t\t\t\twhile (d < evs[i].end_date) {\r\n\t\t\t\t\tvar m = d.getMonth() + 12 * (d.getFullYear() - scheduler._min_date.getFullYear()) - scheduler.week_starts._month;\r\n\t\t\t\t\tvar day = scheduler.week_starts[m] + d.getDate() - 1;\r\n\t\t\t\t\tvar text_color = colors ? get_style(scheduler._get_year_cell(d), \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(scheduler._get_year_cell(d), \"backgroundColor\") : \"\";\r\n\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t\td = scheduler.date.add(d, 1, \"day\");\r\n\t\t\t\t\tif (d.valueOf() >= scheduler._max_date.valueOf())\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (matrix && matrix.render == \"cell\") {\r\n\t\t\tvar evs = scheduler._els.dhx_cal_data[0].getElementsByTagName(\"TD\");\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar text_color = colors ? get_style(evs[i], \"color\") : \"\";\r\n\t\t\t\tvar bg_color = colors ? get_style(evs[i], \"backgroundColor\") : \"\";\r\n\t\t\t\txml += \"\\n\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar zx, zdx;\r\n\t\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\t\t// logic for timeline view\r\n\t\t\t\t\tzx = x_norm(evs[i].style.left);\r\n\t\t\t\t\tzdx = x_norm(evs[i].offsetWidth)-1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// we should use specific logic for day/week/units view\r\n\t\t\t\t\tvar left_norm = scheduler.config.use_select_menu_space ? 0 : 26;\r\n\t\t\t\t\tzx = x_norm_event(evs[i].style.left, left_norm, true);\r\n\t\t\t\t\tzdx = x_norm_event(evs[i].style.width, left_norm)-1;\r\n\t\t\t\t}\r\n\t\t\t\tif (isNaN(zdx * 1)) continue;\r\n\t\t\t\tvar zy = y_norm(evs[i].style.top);\r\n\t\t\t\tvar zdy = y_norm(evs[i].style.height);\r\n\r\n\t\t\t\tvar e_type = evs[i].className.split(\" \")[0].replace(\"dhx_cal_\", \"\");\r\n\t\t\t\tif (e_type === 'dhx_tooltip_line') continue;\r\n\r\n\t\t\t\tvar dets = scheduler.getEvent(evs[i].getAttribute(scheduler.config.event_attribute));\r\n if (!dets) continue;\r\n\t\t\t\tvar day = dets._sday;\r\n\t\t\t\tvar week = dets._sweek;\r\n\t\t\t\tvar length = dets._length || 0;\r\n\r\n\t\t\t\tif (scheduler._mode == \"month\") {\r\n\t\t\t\t\tzdy = parseInt(evs[i].offsetHeight, 10);\r\n\t\t\t\t\tzy = parseInt(evs[i].style.top, 10) - scheduler.xy.month_head_height;\r\n\r\n\t\t\t\t\tday = de_day(evs[i], day);\r\n\t\t\t\t\tweek = de_week(evs[i], week);\r\n\t\t\t\t} else if (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\t\tday = 0;\r\n\t\t\t\t\tvar el = evs[i].parentNode.parentNode.parentNode;\r\n\t\t\t\t\tweek = el.rowIndex;\r\n\t\t\t\t\tvar dy_copy = dy;\r\n\t\t\t\t\tdy = evs[i].parentNode.offsetHeight;\r\n\t\t\t\t\tzy = y_norm(evs[i].style.top);\r\n\t\t\t\t\tzy -= zy * 0.2;\r\n\t\t\t\t\tdy = dy_copy;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (evs[i].parentNode == scheduler._els.dhx_cal_data[0]) continue;\r\n\t\t\t\t\tvar parent = scheduler._els[\"dhx_cal_data\"][0].childNodes[0];\r\n\t\t\t\t\tvar offset = parseFloat(parent.className.indexOf(\"dhx_scale_holder\") != -1 ? parent.style.left : 0);\r\n\t\t\t\t\tzx += x_norm(evs[i].parentNode.style.left, offset);\r\n\t\t\t\t}\r\n\r\n\t\t\t\txml += \"\\n\";\r\n\r\n\t\t\t\tif (e_type == \"event\") {\r\n\t\t\t\t\txml += \"
\";\r\n\t\t\t\t\tvar text_color = colors ? get_style(evs[i].childNodes[2], \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(evs[i].childNodes[2], \"backgroundColor\") : \"\";\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar text_color = colors ? get_style(evs[i], \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(evs[i], \"backgroundColor\") : \"\";\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t}\r\n\t\t\t\txml += \"
\";\r\n\t\t\t}\r\n\t\t\t}\r\n\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction toXML(start, end, view, mode, header, footer){\r\n\t\tvar colors = false;\r\n\t\tif (mode == \"fullcolor\") {\r\n\t\t\tcolors = true;\r\n\t\t\tmode = \"color\";\r\n\t\t}\r\n\r\n\t\tmode = mode || \"color\";\r\n\r\n\t\tvar xml = \"\";\r\n\t\tif (start) {\r\n\r\n\t\t\tvar original_date = scheduler._date;\r\n\t\t\tvar original_mode = scheduler._mode;\r\n\t\t\tend = scheduler.date[view+\"_start\"](end);\r\n\t\t\tend = scheduler.date[\"get_\"+view+\"_end\"] ? scheduler.date[\"get_\"+view+\"_end\"](end) : scheduler.date.add(end, 1, view);\r\n\r\n\t\t\txml = xml_top(\"pages\", mode, header, footer);\r\n\t\t\tfor (var temp_date = new Date(start); +temp_date < +end; temp_date = this.date.add(temp_date, 1, view)) {\r\n\t\t\t\tthis.setCurrentView(temp_date, view);\r\n\t\t\t\txml += xml_start(\"page\") + xml_body_header().replace(\"\\u2013\", \"-\") + xml_body(colors) + xml_end(\"page\");\r\n\t\t\t}\r\n\t\t\txml += xml_end(\"pages\");\r\n\r\n\t\t\tthis.setCurrentView(original_date, original_mode);\r\n\t\t} else {\r\n\t\t\txml = xml_top(\"data\", mode, header, footer) + xml_body_header().replace(\"\\u2013\", \"-\") + xml_body(colors) + xml_end(\"data\");\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\tscheduler.getPDFData = toXML;\r\n\tfunction send_xml(xml, url){\r\n\t\tvar uid = scheduler.uid();\r\n\t\tvar d = document.createElement(\"div\");\r\n\t\td.style.display = \"none\";\r\n\t\tdocument.body.appendChild(d);\r\n\r\n\t\td.innerHTML = '
';\r\n\t\tdocument.getElementById(uid).firstChild.value = encodeURIComponent(xml);\r\n\t\tdocument.getElementById(uid).submit();\r\n\t\td.parentNode.removeChild(d);\r\n\t}\r\n\r\n\tfunction to_pdf(start, end, view, url, mode, header, footer) {\r\n\t\tvar xml = \"\";\r\n\t\tif(typeof mode == \"object\"){\r\n\t\t\txml = schedulersToPdf(mode);\r\n\t\t}else{\r\n\t\t\txml = toXML.apply(this, [start, end, view, mode, header, footer]);\r\n\t\t}\r\n\r\n\t\tsend_xml(xml, url);\r\n\t}\r\n\r\n\tfunction schedulersToPdf(objects){\r\n\t\tvar xml = \"\";\r\n\t\tfor(var i=0; i < objects.length; i++){\r\n\t\t\txml += objects[i].source.getPDFData(objects[i].start, objects[i].end, objects[i].view, objects[i].mode, objects[i].header, objects[i].footer);\r\n\t\t}\r\n\t\txml += \"\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\t/*\r\n\t * scheduler.toPDF(url, mode, header, footer) - for a single scheduler\r\n\t * scheduler.toPDF(url, [scheduler1, scheduler2,...]) - for multiple schedulers\r\n\t * example:\r\n\t * scheduler.toPDF(\"generate.ashx\", [\r\n\t * { source: scheduler1, mode: \"color\" },\r\n\t * { source: scheduler2, mode: \"gray\", view:\"week\", start:new Date(2013, 06, 1), end:new Date(2013, 06, 28) },\r\n\t * { source: scheduler3 }\r\n\t * ]);\r\n\t *\r\n\t */\r\n\tscheduler.toPDF = function(url, mode, header, footer) {\r\n\t\treturn to_pdf.apply(this, [null, null, null, url, mode, header, footer]);\r\n\t};\r\n\tscheduler.toPDFRange = function(start, end, view, url, mode, header, footer) {\r\n\t\tif (typeof start == \"string\") {\r\n\t\t\tstart = scheduler.templates.api_date(start);\r\n\t\t\tend = scheduler.templates.api_date(end);\r\n\t\t}\r\n\r\n\t\treturn to_pdf.apply(this, arguments);\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.icons_select = [\"icon_form\", \"icon_delete\"];\r\nscheduler.config.details_on_create = true;\r\nscheduler.config.show_quick_info = true;\r\nscheduler.xy.menu_width = 0;\r\n\r\n\r\n\r\nlet clickedElementPosition = null;\r\nscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\tconst container = scheduler.$container;\r\n\tif(container._$quickInfoHandler){\r\n\t\treturn;\r\n\t}else{\r\n\t\tcontainer._$quickInfoHandler = true;\r\n\t\t// store coordinates of clicked segment of an event\r\n\t\t// in case multi section events or multi-line month events\r\n\t\tscheduler.event(container, \"mousedown\", function(e){\r\n\t\t\tconst eventElement = e.target.closest(`[${scheduler.config.event_attribute}]`);\r\n\t\t\tif (eventElement) {\r\n\t\t\t\tclickedElementPosition = {\r\n\t\t\t\t\tid: eventElement.getAttribute(scheduler.config.event_attribute),\r\n\t\t\t\t\tposition: getPositionInsideScheduler(eventElement)\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t});\r\n\t\tscheduler.attachEvent(\"onDestroy\", () => {\r\n\t\t\tdelete container._$quickInfoHandler;\r\n\t\t});\r\n\t}\r\n});\r\n\r\nscheduler.attachEvent(\"onClick\", function(id){\r\n\tif(!scheduler.config.show_quick_info){\r\n\t\treturn;\r\n\t}\r\n\tscheduler.showQuickInfo(id);\r\n\treturn true;\r\n});\r\n\r\n(function(){\r\n\t// pass `force` argument in order to hide quick info synchronously\r\n\t// so it won't affect showQuickInfo call that can follow\r\n\tvar events = [\"onEmptyClick\", \"onViewChange\", \"onLightbox\", \"onBeforeEventDelete\", \"onBeforeDrag\"];\r\n\tvar hiding_function = function(){\r\n\t\tscheduler.hideQuickInfo(true);\r\n\t\treturn true;\r\n\t};\r\n\tfor (var i=0; i window.innerWidth){\r\n\t\t\tleft = window.innerWidth - width;\r\n\t\t}\r\n\t\tleft = Math.max(0, left);\r\n\r\n\t\tqi.style.left = left + \"px\";\r\n\t\tqi.style.top = pos.top - (pos.dy?height:-pos.height) + \"px\";\r\n\t} else {\r\n\r\n\t\tconst dataPos = scheduler.$container.querySelector('.dhx_cal_data').offsetTop;\r\n\t\tqi.style.top = dataPos + 20 + \"px\";\r\n\t\tif (pos.dx == 1){\r\n\t\t\tqi.style.right = \"auto\";\r\n\t\t\tqi.style.left = -width + \"px\";\r\n\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tqi.style.left = \"-10px\";\r\n\t\t\t},1);\r\n\t\t} else {\r\n\t\t\tqi.style.left = \"auto\";\r\n\t\t\tqi.style.right = -width + \"px\";\r\n\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tqi.style.right = \"-10px\";\r\n\t\t\t},1);\r\n\t\t}\r\n\t\tqi.className = qi.className.replace(\" dhx_qi_left\",\"\").replace(\" dhx_qi_right\",\"\")+\" dhx_qi_\"+(pos.dx==1?\"left\":\"right\");\r\n\t}\r\n\r\n\tqi.ontransitionend = () => {\r\n\t\tfitQIInsideWindow(qi);\r\n\t\tqi.ontransitionend = null;\r\n\t};\r\n\tsetTimeout(() => {\r\n\t\tfitQIInsideWindow(qi);\r\n\t}, 1);\r\n};\r\n\r\nfunction fitQIInsideWindow(quickInfoPopup){\r\n\tconst popupRect = quickInfoPopup.getBoundingClientRect();\r\n\tconst containerRect = scheduler.$container.getBoundingClientRect();\r\n\r\n\t// calculate the bottom offset of the Quick Info relative to the scheduler container\r\n\tconst offsetBottom = containerRect.bottom - popupRect.bottom;\r\n\r\n\t// If the popup extends outside the scheduler container, adjust its top position\r\n\tif (offsetBottom < 0) {\r\n\t\tquickInfoPopup.style.top = `${parseFloat(quickInfoPopup.style.top) + offsetBottom}px`;\r\n\t}\r\n}\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function(){\r\n\tscheduler.hideQuickInfo();\r\n\tif(this._quick_info_box){\r\n\t\tvar box = this._quick_info_box;\r\n\t\tif(box.parentNode){\r\n\t\t\tbox.parentNode.removeChild(box);\r\n\t\t}\r\n\t\tthis._quick_info_box = null;\r\n\t}\r\n});\r\nscheduler._quick_info_onscroll_handler = function(e){\r\n\tscheduler.hideQuickInfo();\r\n};\r\nscheduler._init_quick_info = function(){\r\n\tif (!this._quick_info_box){\r\n\r\n\r\n\t\tvar qi = this._quick_info_box = document.createElement(\"div\");\r\n\r\n\t\tthis._waiAria.quickInfoAttr(qi);\r\n\r\n\t\tqi.className = \"dhx_cal_quick_info\";\r\n\t\tif (scheduler.$testmode)\r\n\t\t\tqi.className += \" dhx_no_animate\";\r\n\t\tif (scheduler.config.rtl) qi.className += \" dhx_quick_info_rtl\";\r\n\t//title\r\n\t\tvar ariaAttr = this._waiAria.quickInfoHeaderAttrString();\r\n\t\tvar html = `\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t\t
\r\n\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t\t
`;\r\n\r\n\t//buttons\r\n\t\thtml += \"
\";\r\n\t\tvar buttons = scheduler.config.icons_select;\r\n\t\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\t\tvar ariaAttr = this._waiAria.quickInfoButtonAttrString(this.locale.labels[buttons[i]]);\r\n\t\t\t\thtml += `
\r\n\t\t\t\t
${scheduler.locale.labels[buttons[i]]}
`;\r\n\t\t\t}\r\n\t\t// }\r\n\t\thtml += \"
\";\r\n\r\n\t\tqi.innerHTML = html;\r\n\t\tscheduler.event(qi, \"click\", function(ev){\r\n\t\t\tscheduler._qi_button_click(ev.target || ev.srcElement);\r\n\t\t});\r\n\t\tif (scheduler.config.quick_info_detached){\r\n\t\t\tscheduler._detachDomEvent(scheduler._els[\"dhx_cal_data\"][0], \"scroll\", scheduler._quick_info_onscroll_handler);\r\n\t\t\tscheduler.event(scheduler._els[\"dhx_cal_data\"][0], \"scroll\", scheduler._quick_info_onscroll_handler);\r\n\t\t}\r\n\t}\r\n\r\n\treturn this._quick_info_box;\r\n};\r\n\r\nscheduler._qi_button_click = function(node){\r\n\tvar box = scheduler._quick_info_box;\r\n\tif (!node || node == box) return;\r\n\r\n\tif(node.closest(\".dhx_cal_qi_close_btn\")){\r\n\t\tscheduler.hideQuickInfo();\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar mask = scheduler._getClassName(node);\r\n\tif (mask.indexOf(\"_icon\")!=-1){\r\n\t\tvar id = scheduler._quick_info_box_id;\r\n\t\tscheduler._click.buttons[mask.split(\" \")[1].replace(\"icon_\",\"\")](id);\r\n\t} else\r\n\t\tscheduler._qi_button_click(node.parentNode);\r\n};\r\n\r\nfunction getPositionInsideScheduler(element){\r\n\tlet left = 0;\r\n\tlet top = 0;\r\n\r\n\tlet node = element;\r\n\twhile (node && node != scheduler._obj){\r\n\t\tleft += node.offsetLeft;\r\n\t\ttop += node.offsetTop-node.scrollTop;\r\n\t\tnode = node.offsetParent;\r\n\t}\r\n\tif(node){\r\n\t\tlet dx = (left + element.offsetWidth/2) > (scheduler._x/2) ? 1 : 0;\r\n\t\tlet dy = (top + element.offsetHeight/2) > (scheduler._y/2) ? 1 : 0;\r\n\r\n\t\treturn { left:left, top:top, dx:dx, dy:dy,\r\n\t\t\twidth:element.offsetWidth, height:element.offsetHeight };\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\nscheduler._get_event_counter_part = function(id){\r\n\tvar domEv = scheduler.getRenderedEvent(id);\r\n\treturn getPositionInsideScheduler(domEv);\r\n};\r\n\r\nscheduler._fill_quick_data = function(id){\r\n\tvar ev = scheduler.getEvent(id);\r\n\tvar qi = scheduler._quick_info_box;\r\n\r\n\tscheduler._quick_info_box_id = id;\r\n\r\n//title content\r\n\r\n\tvar header = {\r\n\t\tcontent: scheduler.templates.quick_info_title(ev.start_date, ev.end_date, ev),\r\n\t\tdate: scheduler.templates.quick_info_date(ev.start_date, ev.end_date, ev)\r\n\t};\r\n\tvar titleContent = qi.querySelector(\".dhx_cal_qi_tcontent\");\r\n\ttitleContent.innerHTML = `${header.content}`;\r\n\tvar titleDate = qi.querySelector(\".dhx_cal_qi_tdate\");\r\n\ttitleDate.innerHTML = header.date;\r\n\r\n\tscheduler._waiAria.quickInfoHeader(qi, [header.content, header.date].join(\" \"));\r\n\r\n//main content\r\n\tvar main = qi.querySelector(\".dhx_cal_qi_content\");\r\n\tconst mainContent = scheduler.templates.quick_info_content(ev.start_date, ev.end_date, ev);\r\n\tif(mainContent){\r\n\t\tmain.classList.remove(\"dhx_hidden\");\r\n\t\tmain.innerHTML = mainContent;\r\n\t}else{\r\n\t\tmain.classList.add(\"dhx_hidden\");\r\n\t}\r\n};\r\n\r\n\r\n}","export default function(scheduler){\r\n\t\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar originalRecurringSetValue;\r\n\tif (scheduler.form_blocks.recurring) {\r\n\t\toriginalRecurringSetValue = scheduler.form_blocks.recurring.set_value;\r\n\t}\r\n\tvar original_left_buttons = scheduler.config.buttons_left.slice();\r\n\tvar original_right_buttons = scheduler.config.buttons_right.slice();\r\n\r\n\tscheduler.attachEvent(\"onBeforeLightbox\", function(id) {\r\n\t\tif (this.config.readonly_form || this.getEvent(id).readonly) {\r\n\t\t\tthis.config.readonly_active = true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.config.readonly_active = false;\r\n\t\t\tscheduler.config.buttons_left = original_left_buttons.slice();\r\n\t\t\tscheduler.config.buttons_right = original_right_buttons.slice();\r\n\t\r\n\t\t\t// initial value\r\n\t\t\tif(scheduler.form_blocks.recurring) {\r\n\t\t\t\tscheduler.form_blocks.recurring.set_value = originalRecurringSetValue;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar sns = this.config.lightbox.sections;\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\tfor (var i = 0; i < sns.length; i++) {\r\n\t\t\t\tif (sns[i].type == 'recurring') {\r\n\t\t\t\t\tif (this.config.readonly_active && scheduler.form_blocks.recurring) {\r\n\t\t\t\t\t\tscheduler.form_blocks.recurring.set_value = function(node, value, ev) {\r\n\t\t\t\t\t\t\tvar wrapper = scheduler.$domHelpers.closest(node, \".dhx_wrap_section\");\r\n\t\t\t\t\t\t\tvar style = \"none\";\r\n\t\t\t\t\t\t\twrapper.querySelector('.dhx_cal_lsection').display = style;\r\n\t\t\t\t\t\t\twrapper.querySelector('.dhx_form_repeat').display = style;\r\n\t\t\t\t\t\t\twrapper.style.display = style;\r\n\r\n\t\t\t\t\t\t\tscheduler.setLightboxSize();\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar forbidden_buttons = [\"dhx_delete_btn\", \"dhx_save_btn\"];\r\n\t\t\tvar button_arrays = [scheduler.config.buttons_left, scheduler.config.buttons_right];\r\n\t\t\tfor (var i = 0; i < forbidden_buttons.length; i++) {\r\n\t\t\t\tvar forbidden_button = forbidden_buttons[i];\r\n\t\t\t\tfor (var k = 0; k < button_arrays.length; k++) {\r\n\t\t\t\t\tvar button_array = button_arrays[k];\r\n\t\t\t\t\tvar index = -1;\r\n\t\t\t\t\tfor (var p = 0; p < button_array.length; p++) {\r\n\t\t\t\t\t\tif (button_array[p] == forbidden_button) {\r\n\t\t\t\t\t\t\tindex = p;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (index != -1) {\r\n\t\t\t\t\t\tbutton_array.splice(index, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.resetLightbox();\r\n\r\n\t\treturn true;\r\n\t});\r\n\r\n\tfunction txt_replace(tag, d, n, text) {\r\n\t\tvar txts = d.getElementsByTagName(tag);\r\n\t\tvar txtt = n.getElementsByTagName(tag);\r\n\t\tfor (var i = txtt.length - 1; i >= 0; i--) {\r\n\t\t\tvar n = txtt[i];\r\n\t\t\tif (!text){\r\n\t\t\t\tn.disabled = true;\r\n\t\t\t\t//radio and checkboxes loses state after .cloneNode in IE\r\n\t\t\t\tif(d.checked)\r\n\t\t\t\t\tn.checked = true;\r\n\t\t\t}else {\r\n\t\t\t\tvar t = document.createElement(\"span\");\r\n\t\t\t\tt.className = \"dhx_text_disabled\";\r\n\t\t\t\tt.innerHTML = text(txts[i]);\r\n\t\t\t\tn.parentNode.insertBefore(t, n);\r\n\t\t\t\tn.parentNode.removeChild(n);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tvar old = scheduler._fill_lightbox;\r\n\tscheduler._fill_lightbox = function() {\r\n\r\n\t\tvar lb = this.getLightbox();\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\tlb.style.visibility = 'hidden';\r\n\t\t\t// lightbox should have actual sizes before rendering controls\r\n\t\t\t// currently only matters for dhtmlxCombo\r\n\t\t\tlb.style.display = 'block';\r\n\t\t}\r\n\t\tvar res = old.apply(this, arguments);\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\t//reset visibility and display\r\n\t\t\tlb.style.visibility = '';\r\n\t\t\tlb.style.display = 'none';\r\n\t\t}\r\n\r\n\t\tif (this.config.readonly_active) {\r\n\r\n\t\t\tvar originalForm = this.getLightbox();\r\n\t\t\tvar readonlyForm = this._lightbox_r = originalForm.cloneNode(true);\r\n\t\t\treadonlyForm.id = scheduler.uid();\r\n\t\t\treadonlyForm.className += \" dhx_cal_light_readonly\";\r\n\t\t\ttxt_replace(\"textarea\", originalForm, readonlyForm, function(a) {\r\n\t\t\t\treturn a.value;\r\n\t\t\t});\r\n\t\t\ttxt_replace(\"input\", originalForm, readonlyForm, false);\r\n\t\t\ttxt_replace(\"select\", originalForm, readonlyForm, function(a) {\r\n\t\t\t\tif(!a.options.length) return \"\";\r\n\t\t\t\treturn a.options[Math.max((a.selectedIndex || 0), 0)].text;\r\n\t\t\t});\r\n\r\n\t\t\toriginalForm.parentNode.insertBefore(readonlyForm, originalForm);\r\n\r\n\t\t\tthis.showCover(readonlyForm);\r\n\t\t\tif (scheduler._lightbox)\r\n\t\t\t\tscheduler._lightbox.parentNode.removeChild(scheduler._lightbox);\r\n\t\t\tthis._lightbox = readonlyForm;\r\n\r\n\t\t\tif (scheduler.config.drag_lightbox)\r\n\t\t\t\tscheduler.event(readonlyForm.firstChild, \"mousedown\", scheduler._ready_to_dnd);\r\n\t\t\t\t\r\n\t\t\tscheduler._init_lightbox_events();\r\n\t\t\tthis.setLightboxSize();\r\n\t\t}\r\n\t\treturn res;\r\n\t};\r\n\r\n\tvar hold = scheduler.hide_lightbox;\r\n\tscheduler.hide_lightbox = function() {\r\n\t\tif (this._lightbox_r) {\r\n\t\t\tthis._lightbox_r.parentNode.removeChild(this._lightbox_r);\r\n\t\t\tthis._lightbox_r = this._lightbox = null;\r\n\t\t}\r\n\r\n\t\treturn hold.apply(this, arguments);\r\n\t};\r\n});\r\n\r\n\r\n}","// =============================================================================\n// Weekday\n// =============================================================================\nexport var ALL_WEEKDAYS = [\n 'MO',\n 'TU',\n 'WE',\n 'TH',\n 'FR',\n 'SA',\n 'SU',\n];\nvar Weekday = /** @class */ (function () {\n function Weekday(weekday, n) {\n if (n === 0)\n throw new Error(\"Can't create weekday with n == 0\");\n this.weekday = weekday;\n this.n = n;\n }\n Weekday.fromStr = function (str) {\n return new Weekday(ALL_WEEKDAYS.indexOf(str));\n };\n // __call__ - Cannot call the object directly, do it through\n // e.g. RRule.TH.nth(-1) instead,\n Weekday.prototype.nth = function (n) {\n return this.n === n ? this : new Weekday(this.weekday, n);\n };\n // __eq__\n Weekday.prototype.equals = function (other) {\n return this.weekday === other.weekday && this.n === other.n;\n };\n // __repr__\n Weekday.prototype.toString = function () {\n var s = ALL_WEEKDAYS[this.weekday];\n if (this.n)\n s = (this.n > 0 ? '+' : '') + String(this.n) + s;\n return s;\n };\n Weekday.prototype.getJsWeekday = function () {\n return this.weekday === 6 ? 0 : this.weekday + 1;\n };\n return Weekday;\n}());\nexport { Weekday };\n//# sourceMappingURL=weekday.js.map","// =============================================================================\n// Helper functions\n// =============================================================================\nimport { ALL_WEEKDAYS } from './weekday';\nexport var isPresent = function (value) {\n return value !== null && value !== undefined;\n};\nexport var isNumber = function (value) {\n return typeof value === 'number';\n};\nexport var isWeekdayStr = function (value) {\n return typeof value === 'string' && ALL_WEEKDAYS.includes(value);\n};\nexport var isArray = Array.isArray;\n/**\n * Simplified version of python's range()\n */\nexport var range = function (start, end) {\n if (end === void 0) { end = start; }\n if (arguments.length === 1) {\n end = start;\n start = 0;\n }\n var rang = [];\n for (var i = start; i < end; i++)\n rang.push(i);\n return rang;\n};\nexport var clone = function (array) {\n return [].concat(array);\n};\nexport var repeat = function (value, times) {\n var i = 0;\n var array = [];\n if (isArray(value)) {\n for (; i < times; i++)\n array[i] = [].concat(value);\n }\n else {\n for (; i < times; i++)\n array[i] = value;\n }\n return array;\n};\nexport var toArray = function (item) {\n if (isArray(item)) {\n return item;\n }\n return [item];\n};\nexport function padStart(item, targetLength, padString) {\n if (padString === void 0) { padString = ' '; }\n var str = String(item);\n targetLength = targetLength >> 0;\n if (str.length > targetLength) {\n return String(str);\n }\n targetLength = targetLength - str.length;\n if (targetLength > padString.length) {\n padString += repeat(padString, targetLength / padString.length);\n }\n return padString.slice(0, targetLength) + String(str);\n}\n/**\n * Python like split\n */\nexport var split = function (str, sep, num) {\n var splits = str.split(sep);\n return num\n ? splits.slice(0, num).concat([splits.slice(num).join(sep)])\n : splits;\n};\n/**\n * closure/goog/math/math.js:modulo\n * Copyright 2006 The Closure Library Authors.\n * The % operator in JavaScript returns the remainder of a / b, but differs from\n * some other languages in that the result will have the same sign as the\n * dividend. For example, -1 % 8 == -1, whereas in some other languages\n * (such as Python) the result would be 7. This function emulates the more\n * correct modulo behavior, which is useful for certain applications such as\n * calculating an offset index in a circular list.\n *\n * @param {number} a The dividend.\n * @param {number} b The divisor.\n * @return {number} a % b where the result is between 0 and b (either 0 <= x < b\n * or b < x <= 0, depending on the sign of b).\n */\nexport var pymod = function (a, b) {\n var r = a % b;\n // If r and b differ in sign, add b to wrap the result to the correct sign.\n return r * b < 0 ? r + b : r;\n};\n/**\n * @see: \n */\nexport var divmod = function (a, b) {\n return { div: Math.floor(a / b), mod: pymod(a, b) };\n};\nexport var empty = function (obj) {\n return !isPresent(obj) || obj.length === 0;\n};\n/**\n * Python-like boolean\n *\n * @return {Boolean} value of an object/primitive, taking into account\n * the fact that in Python an empty list's/tuple's\n * boolean value is False, whereas in JS it's true\n */\nexport var notEmpty = function (obj) {\n return !empty(obj);\n};\n/**\n * Return true if a value is in an array\n */\nexport var includes = function (arr, val) {\n return notEmpty(arr) && arr.indexOf(val) !== -1;\n};\n//# sourceMappingURL=helpers.js.map","import { padStart } from './helpers';\nexport var datetime = function (y, m, d, h, i, s) {\n if (h === void 0) { h = 0; }\n if (i === void 0) { i = 0; }\n if (s === void 0) { s = 0; }\n return new Date(Date.UTC(y, m - 1, d, h, i, s));\n};\n/**\n * General date-related utilities.\n * Also handles several incompatibilities between JavaScript and Python\n *\n */\nexport var MONTH_DAYS = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n/**\n * Number of milliseconds of one day\n */\nexport var ONE_DAY = 1000 * 60 * 60 * 24;\n/**\n * @see: \n */\nexport var MAXYEAR = 9999;\n/**\n * Python uses 1-Jan-1 as the base for calculating ordinals but we don't\n * want to confuse the JS engine with milliseconds > Number.MAX_NUMBER,\n * therefore we use 1-Jan-1970 instead\n */\nexport var ORDINAL_BASE = datetime(1970, 1, 1);\n/**\n * Python: MO-SU: 0 - 6\n * JS: SU-SAT 0 - 6\n */\nexport var PY_WEEKDAYS = [6, 0, 1, 2, 3, 4, 5];\n/**\n * py_date.timetuple()[7]\n */\nexport var getYearDay = function (date) {\n var dateNoTime = new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate());\n return (Math.ceil((dateNoTime.valueOf() - new Date(date.getUTCFullYear(), 0, 1).valueOf()) /\n ONE_DAY) + 1);\n};\nexport var isLeapYear = function (year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n};\nexport var isDate = function (value) {\n return value instanceof Date;\n};\nexport var isValidDate = function (value) {\n return isDate(value) && !isNaN(value.getTime());\n};\n/**\n * @return {Number} the date's timezone offset in ms\n */\nexport var tzOffset = function (date) {\n return date.getTimezoneOffset() * 60 * 1000;\n};\n/**\n * @see: \n */\nexport var daysBetween = function (date1, date2) {\n // The number of milliseconds in one day\n // Convert both dates to milliseconds\n var date1ms = date1.getTime();\n var date2ms = date2.getTime();\n // Calculate the difference in milliseconds\n var differencems = date1ms - date2ms;\n // Convert back to days and return\n return Math.round(differencems / ONE_DAY);\n};\n/**\n * @see: \n */\nexport var toOrdinal = function (date) {\n return daysBetween(date, ORDINAL_BASE);\n};\n/**\n * @see - \n */\nexport var fromOrdinal = function (ordinal) {\n return new Date(ORDINAL_BASE.getTime() + ordinal * ONE_DAY);\n};\nexport var getMonthDays = function (date) {\n var month = date.getUTCMonth();\n return month === 1 && isLeapYear(date.getUTCFullYear())\n ? 29\n : MONTH_DAYS[month];\n};\n/**\n * @return {Number} python-like weekday\n */\nexport var getWeekday = function (date) {\n return PY_WEEKDAYS[date.getUTCDay()];\n};\n/**\n * @see: \n */\nexport var monthRange = function (year, month) {\n var date = datetime(year, month + 1, 1);\n return [getWeekday(date), getMonthDays(date)];\n};\n/**\n * @see: \n */\nexport var combine = function (date, time) {\n time = time || date;\n return new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), time.getHours(), time.getMinutes(), time.getSeconds(), time.getMilliseconds()));\n};\nexport var clone = function (date) {\n var dolly = new Date(date.getTime());\n return dolly;\n};\nexport var cloneDates = function (dates) {\n var clones = [];\n for (var i = 0; i < dates.length; i++) {\n clones.push(clone(dates[i]));\n }\n return clones;\n};\n/**\n * Sorts an array of Date or Time objects\n */\nexport var sort = function (dates) {\n dates.sort(function (a, b) {\n return a.getTime() - b.getTime();\n });\n};\nexport var timeToUntilString = function (time, utc) {\n if (utc === void 0) { utc = true; }\n var date = new Date(time);\n return [\n padStart(date.getUTCFullYear().toString(), 4, '0'),\n padStart(date.getUTCMonth() + 1, 2, '0'),\n padStart(date.getUTCDate(), 2, '0'),\n 'T',\n padStart(date.getUTCHours(), 2, '0'),\n padStart(date.getUTCMinutes(), 2, '0'),\n padStart(date.getUTCSeconds(), 2, '0'),\n utc ? 'Z' : '',\n ].join('');\n};\nexport var untilStringToDate = function (until) {\n var re = /^(\\d{4})(\\d{2})(\\d{2})(T(\\d{2})(\\d{2})(\\d{2})Z?)?$/;\n var bits = re.exec(until);\n if (!bits)\n throw new Error(\"Invalid UNTIL value: \".concat(until));\n return new Date(Date.UTC(parseInt(bits[1], 10), parseInt(bits[2], 10) - 1, parseInt(bits[3], 10), parseInt(bits[5], 10) || 0, parseInt(bits[6], 10) || 0, parseInt(bits[7], 10) || 0));\n};\nvar dateTZtoISO8601 = function (date, timeZone) {\n // date format for sv-SE is almost ISO8601\n var dateStr = date.toLocaleString('sv-SE', { timeZone: timeZone });\n // '2023-02-07 10:41:36'\n return dateStr.replace(' ', 'T') + 'Z';\n};\nexport var dateInTimeZone = function (date, timeZone) {\n var localTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;\n // Date constructor can only reliably parse dates in ISO8601 format\n var dateInLocalTZ = new Date(dateTZtoISO8601(date, localTimeZone));\n var dateInTargetTZ = new Date(dateTZtoISO8601(date, timeZone !== null && timeZone !== void 0 ? timeZone : 'UTC'));\n var tzOffset = dateInTargetTZ.getTime() - dateInLocalTZ.getTime();\n return new Date(date.getTime() - tzOffset);\n};\n//# sourceMappingURL=dateutil.js.map","/**\n * This class helps us to emulate python's generators, sorta.\n */\nvar IterResult = /** @class */ (function () {\n function IterResult(method, args) {\n this.minDate = null;\n this.maxDate = null;\n this._result = [];\n this.total = 0;\n this.method = method;\n this.args = args;\n if (method === 'between') {\n this.maxDate = args.inc\n ? args.before\n : new Date(args.before.getTime() - 1);\n this.minDate = args.inc ? args.after : new Date(args.after.getTime() + 1);\n }\n else if (method === 'before') {\n this.maxDate = args.inc ? args.dt : new Date(args.dt.getTime() - 1);\n }\n else if (method === 'after') {\n this.minDate = args.inc ? args.dt : new Date(args.dt.getTime() + 1);\n }\n }\n /**\n * Possibly adds a date into the result.\n *\n * @param {Date} date - the date isn't necessarly added to the result\n * list (if it is too late/too early)\n * @return {Boolean} true if it makes sense to continue the iteration\n * false if we're done.\n */\n IterResult.prototype.accept = function (date) {\n ++this.total;\n var tooEarly = this.minDate && date < this.minDate;\n var tooLate = this.maxDate && date > this.maxDate;\n if (this.method === 'between') {\n if (tooEarly)\n return true;\n if (tooLate)\n return false;\n }\n else if (this.method === 'before') {\n if (tooLate)\n return false;\n }\n else if (this.method === 'after') {\n if (tooEarly)\n return true;\n this.add(date);\n return false;\n }\n return this.add(date);\n };\n /**\n *\n * @param {Date} date that is part of the result.\n * @return {Boolean} whether we are interested in more values.\n */\n IterResult.prototype.add = function (date) {\n this._result.push(date);\n return true;\n };\n /**\n * 'before' and 'after' return only one date, whereas 'all'\n * and 'between' an array.\n *\n * @return {Date,Array?}\n */\n IterResult.prototype.getValue = function () {\n var res = this._result;\n switch (this.method) {\n case 'all':\n case 'between':\n return res;\n case 'before':\n case 'after':\n default:\n return (res.length ? res[res.length - 1] : null);\n }\n };\n IterResult.prototype.clone = function () {\n return new IterResult(this.method, this.args);\n };\n return IterResult;\n}());\nexport default IterResult;\n//# sourceMappingURL=iterresult.js.map","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol */\n\nvar 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 (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(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\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n function next() {\n while (env.stack.length) {\n var rec = env.stack.pop();\n try {\n var result = rec.dispose && rec.dispose.call(rec.value);\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n catch (e) {\n fail(e);\n }\n }\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n};\n","import { __extends } from \"tslib\";\nimport IterResult from './iterresult';\n/**\n * IterResult subclass that calls a callback function on each add,\n * and stops iterating when the callback returns false.\n */\nvar CallbackIterResult = /** @class */ (function (_super) {\n __extends(CallbackIterResult, _super);\n function CallbackIterResult(method, args, iterator) {\n var _this = _super.call(this, method, args) || this;\n _this.iterator = iterator;\n return _this;\n }\n CallbackIterResult.prototype.add = function (date) {\n if (this.iterator(date, this._result.length)) {\n this._result.push(date);\n return true;\n }\n return false;\n };\n return CallbackIterResult;\n}(IterResult));\nexport default CallbackIterResult;\n//# sourceMappingURL=callbackiterresult.js.map","// =============================================================================\n// i18n\n// =============================================================================\nvar ENGLISH = {\n dayNames: [\n 'Sunday',\n 'Monday',\n 'Tuesday',\n 'Wednesday',\n 'Thursday',\n 'Friday',\n 'Saturday',\n ],\n monthNames: [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n ],\n tokens: {\n SKIP: /^[ \\r\\n\\t]+|^\\.$/,\n number: /^[1-9][0-9]*/,\n numberAsText: /^(one|two|three)/i,\n every: /^every/i,\n 'day(s)': /^days?/i,\n 'weekday(s)': /^weekdays?/i,\n 'week(s)': /^weeks?/i,\n 'hour(s)': /^hours?/i,\n 'minute(s)': /^minutes?/i,\n 'month(s)': /^months?/i,\n 'year(s)': /^years?/i,\n on: /^(on|in)/i,\n at: /^(at)/i,\n the: /^the/i,\n first: /^first/i,\n second: /^second/i,\n third: /^third/i,\n nth: /^([1-9][0-9]*)(\\.|th|nd|rd|st)/i,\n last: /^last/i,\n for: /^for/i,\n 'time(s)': /^times?/i,\n until: /^(un)?til/i,\n monday: /^mo(n(day)?)?/i,\n tuesday: /^tu(e(s(day)?)?)?/i,\n wednesday: /^we(d(n(esday)?)?)?/i,\n thursday: /^th(u(r(sday)?)?)?/i,\n friday: /^fr(i(day)?)?/i,\n saturday: /^sa(t(urday)?)?/i,\n sunday: /^su(n(day)?)?/i,\n january: /^jan(uary)?/i,\n february: /^feb(ruary)?/i,\n march: /^mar(ch)?/i,\n april: /^apr(il)?/i,\n may: /^may/i,\n june: /^june?/i,\n july: /^july?/i,\n august: /^aug(ust)?/i,\n september: /^sep(t(ember)?)?/i,\n october: /^oct(ober)?/i,\n november: /^nov(ember)?/i,\n december: /^dec(ember)?/i,\n comma: /^(,\\s*|(and|or)\\s*)+/i,\n },\n};\nexport default ENGLISH;\n//# sourceMappingURL=i18n.js.map","import ENGLISH from './i18n';\nimport { RRule } from '../rrule';\nimport { isArray, isNumber, isPresent } from '../helpers';\n// =============================================================================\n// Helper functions\n// =============================================================================\n/**\n * Return true if a value is in an array\n */\nvar contains = function (arr, val) {\n return arr.indexOf(val) !== -1;\n};\nvar defaultGetText = function (id) { return id.toString(); };\nvar defaultDateFormatter = function (year, month, day) { return \"\".concat(month, \" \").concat(day, \", \").concat(year); };\n/**\n *\n * @param {RRule} rrule\n * Optional:\n * @param {Function} gettext function\n * @param {Object} language definition\n * @constructor\n */\nvar ToText = /** @class */ (function () {\n function ToText(rrule, gettext, language, dateFormatter) {\n if (gettext === void 0) { gettext = defaultGetText; }\n if (language === void 0) { language = ENGLISH; }\n if (dateFormatter === void 0) { dateFormatter = defaultDateFormatter; }\n this.text = [];\n this.language = language || ENGLISH;\n this.gettext = gettext;\n this.dateFormatter = dateFormatter;\n this.rrule = rrule;\n this.options = rrule.options;\n this.origOptions = rrule.origOptions;\n if (this.origOptions.bymonthday) {\n var bymonthday = [].concat(this.options.bymonthday);\n var bynmonthday = [].concat(this.options.bynmonthday);\n bymonthday.sort(function (a, b) { return a - b; });\n bynmonthday.sort(function (a, b) { return b - a; });\n // 1, 2, 3, .., -5, -4, -3, ..\n this.bymonthday = bymonthday.concat(bynmonthday);\n if (!this.bymonthday.length)\n this.bymonthday = null;\n }\n if (isPresent(this.origOptions.byweekday)) {\n var byweekday = !isArray(this.origOptions.byweekday)\n ? [this.origOptions.byweekday]\n : this.origOptions.byweekday;\n var days = String(byweekday);\n this.byweekday = {\n allWeeks: byweekday.filter(function (weekday) {\n return !weekday.n;\n }),\n someWeeks: byweekday.filter(function (weekday) {\n return Boolean(weekday.n);\n }),\n isWeekdays: days.indexOf('MO') !== -1 &&\n days.indexOf('TU') !== -1 &&\n days.indexOf('WE') !== -1 &&\n days.indexOf('TH') !== -1 &&\n days.indexOf('FR') !== -1 &&\n days.indexOf('SA') === -1 &&\n days.indexOf('SU') === -1,\n isEveryDay: days.indexOf('MO') !== -1 &&\n days.indexOf('TU') !== -1 &&\n days.indexOf('WE') !== -1 &&\n days.indexOf('TH') !== -1 &&\n days.indexOf('FR') !== -1 &&\n days.indexOf('SA') !== -1 &&\n days.indexOf('SU') !== -1,\n };\n var sortWeekDays = function (a, b) {\n return a.weekday - b.weekday;\n };\n this.byweekday.allWeeks.sort(sortWeekDays);\n this.byweekday.someWeeks.sort(sortWeekDays);\n if (!this.byweekday.allWeeks.length)\n this.byweekday.allWeeks = null;\n if (!this.byweekday.someWeeks.length)\n this.byweekday.someWeeks = null;\n }\n else {\n this.byweekday = null;\n }\n }\n /**\n * Test whether the rrule can be fully converted to text.\n *\n * @param {RRule} rrule\n * @return {Boolean}\n */\n ToText.isFullyConvertible = function (rrule) {\n var canConvert = true;\n if (!(rrule.options.freq in ToText.IMPLEMENTED))\n return false;\n if (rrule.origOptions.until && rrule.origOptions.count)\n return false;\n for (var key in rrule.origOptions) {\n if (contains(['dtstart', 'tzid', 'wkst', 'freq'], key))\n return true;\n if (!contains(ToText.IMPLEMENTED[rrule.options.freq], key))\n return false;\n }\n return canConvert;\n };\n ToText.prototype.isFullyConvertible = function () {\n return ToText.isFullyConvertible(this.rrule);\n };\n /**\n * Perform the conversion. Only some of the frequencies are supported.\n * If some of the rrule's options aren't supported, they'll\n * be omitted from the output an \"(~ approximate)\" will be appended.\n *\n * @return {*}\n */\n ToText.prototype.toString = function () {\n var gettext = this.gettext;\n if (!(this.options.freq in ToText.IMPLEMENTED)) {\n return gettext('RRule error: Unable to fully convert this rrule to text');\n }\n this.text = [gettext('every')];\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this[RRule.FREQUENCIES[this.options.freq]]();\n if (this.options.until) {\n this.add(gettext('until'));\n var until = this.options.until;\n this.add(this.dateFormatter(until.getUTCFullYear(), this.language.monthNames[until.getUTCMonth()], until.getUTCDate()));\n }\n else if (this.options.count) {\n this.add(gettext('for'))\n .add(this.options.count.toString())\n .add(this.plural(this.options.count) ? gettext('times') : gettext('time'));\n }\n if (!this.isFullyConvertible())\n this.add(gettext('(~ approximate)'));\n return this.text.join('');\n };\n ToText.prototype.HOURLY = function () {\n var gettext = this.gettext;\n if (this.options.interval !== 1)\n this.add(this.options.interval.toString());\n this.add(this.plural(this.options.interval) ? gettext('hours') : gettext('hour'));\n };\n ToText.prototype.MINUTELY = function () {\n var gettext = this.gettext;\n if (this.options.interval !== 1)\n this.add(this.options.interval.toString());\n this.add(this.plural(this.options.interval)\n ? gettext('minutes')\n : gettext('minute'));\n };\n ToText.prototype.DAILY = function () {\n var gettext = this.gettext;\n if (this.options.interval !== 1)\n this.add(this.options.interval.toString());\n if (this.byweekday && this.byweekday.isWeekdays) {\n this.add(this.plural(this.options.interval)\n ? gettext('weekdays')\n : gettext('weekday'));\n }\n else {\n this.add(this.plural(this.options.interval) ? gettext('days') : gettext('day'));\n }\n if (this.origOptions.bymonth) {\n this.add(gettext('in'));\n this._bymonth();\n }\n if (this.bymonthday) {\n this._bymonthday();\n }\n else if (this.byweekday) {\n this._byweekday();\n }\n else if (this.origOptions.byhour) {\n this._byhour();\n }\n };\n ToText.prototype.WEEKLY = function () {\n var gettext = this.gettext;\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString()).add(this.plural(this.options.interval) ? gettext('weeks') : gettext('week'));\n }\n if (this.byweekday && this.byweekday.isWeekdays) {\n if (this.options.interval === 1) {\n this.add(this.plural(this.options.interval)\n ? gettext('weekdays')\n : gettext('weekday'));\n }\n else {\n this.add(gettext('on')).add(gettext('weekdays'));\n }\n }\n else if (this.byweekday && this.byweekday.isEveryDay) {\n this.add(this.plural(this.options.interval) ? gettext('days') : gettext('day'));\n }\n else {\n if (this.options.interval === 1)\n this.add(gettext('week'));\n if (this.origOptions.bymonth) {\n this.add(gettext('in'));\n this._bymonth();\n }\n if (this.bymonthday) {\n this._bymonthday();\n }\n else if (this.byweekday) {\n this._byweekday();\n }\n if (this.origOptions.byhour) {\n this._byhour();\n }\n }\n };\n ToText.prototype.MONTHLY = function () {\n var gettext = this.gettext;\n if (this.origOptions.bymonth) {\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString()).add(gettext('months'));\n if (this.plural(this.options.interval))\n this.add(gettext('in'));\n }\n else {\n // this.add(gettext('MONTH'))\n }\n this._bymonth();\n }\n else {\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString());\n }\n this.add(this.plural(this.options.interval)\n ? gettext('months')\n : gettext('month'));\n }\n if (this.bymonthday) {\n this._bymonthday();\n }\n else if (this.byweekday && this.byweekday.isWeekdays) {\n this.add(gettext('on')).add(gettext('weekdays'));\n }\n else if (this.byweekday) {\n this._byweekday();\n }\n };\n ToText.prototype.YEARLY = function () {\n var gettext = this.gettext;\n if (this.origOptions.bymonth) {\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString());\n this.add(gettext('years'));\n }\n else {\n // this.add(gettext('YEAR'))\n }\n this._bymonth();\n }\n else {\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString());\n }\n this.add(this.plural(this.options.interval) ? gettext('years') : gettext('year'));\n }\n if (this.bymonthday) {\n this._bymonthday();\n }\n else if (this.byweekday) {\n this._byweekday();\n }\n if (this.options.byyearday) {\n this.add(gettext('on the'))\n .add(this.list(this.options.byyearday, this.nth, gettext('and')))\n .add(gettext('day'));\n }\n if (this.options.byweekno) {\n this.add(gettext('in'))\n .add(this.plural(this.options.byweekno.length)\n ? gettext('weeks')\n : gettext('week'))\n .add(this.list(this.options.byweekno, undefined, gettext('and')));\n }\n };\n ToText.prototype._bymonthday = function () {\n var gettext = this.gettext;\n if (this.byweekday && this.byweekday.allWeeks) {\n this.add(gettext('on'))\n .add(this.list(this.byweekday.allWeeks, this.weekdaytext, gettext('or')))\n .add(gettext('the'))\n .add(this.list(this.bymonthday, this.nth, gettext('or')));\n }\n else {\n this.add(gettext('on the')).add(this.list(this.bymonthday, this.nth, gettext('and')));\n }\n // this.add(gettext('DAY'))\n };\n ToText.prototype._byweekday = function () {\n var gettext = this.gettext;\n if (this.byweekday.allWeeks && !this.byweekday.isWeekdays) {\n this.add(gettext('on')).add(this.list(this.byweekday.allWeeks, this.weekdaytext));\n }\n if (this.byweekday.someWeeks) {\n if (this.byweekday.allWeeks)\n this.add(gettext('and'));\n this.add(gettext('on the')).add(this.list(this.byweekday.someWeeks, this.weekdaytext, gettext('and')));\n }\n };\n ToText.prototype._byhour = function () {\n var gettext = this.gettext;\n this.add(gettext('at')).add(this.list(this.origOptions.byhour, undefined, gettext('and')));\n };\n ToText.prototype._bymonth = function () {\n this.add(this.list(this.options.bymonth, this.monthtext, this.gettext('and')));\n };\n ToText.prototype.nth = function (n) {\n n = parseInt(n.toString(), 10);\n var nth;\n var gettext = this.gettext;\n if (n === -1)\n return gettext('last');\n var npos = Math.abs(n);\n switch (npos) {\n case 1:\n case 21:\n case 31:\n nth = npos + gettext('st');\n break;\n case 2:\n case 22:\n nth = npos + gettext('nd');\n break;\n case 3:\n case 23:\n nth = npos + gettext('rd');\n break;\n default:\n nth = npos + gettext('th');\n }\n return n < 0 ? nth + ' ' + gettext('last') : nth;\n };\n ToText.prototype.monthtext = function (m) {\n return this.language.monthNames[m - 1];\n };\n ToText.prototype.weekdaytext = function (wday) {\n var weekday = isNumber(wday) ? (wday + 1) % 7 : wday.getJsWeekday();\n return ((wday.n ? this.nth(wday.n) + ' ' : '') +\n this.language.dayNames[weekday]);\n };\n ToText.prototype.plural = function (n) {\n return n % 100 !== 1;\n };\n ToText.prototype.add = function (s) {\n this.text.push(' ');\n this.text.push(s);\n return this;\n };\n ToText.prototype.list = function (arr, callback, finalDelim, delim) {\n var _this = this;\n if (delim === void 0) { delim = ','; }\n if (!isArray(arr)) {\n arr = [arr];\n }\n var delimJoin = function (array, delimiter, finalDelimiter) {\n var list = '';\n for (var i = 0; i < array.length; i++) {\n if (i !== 0) {\n if (i === array.length - 1) {\n list += ' ' + finalDelimiter + ' ';\n }\n else {\n list += delimiter + ' ';\n }\n }\n list += array[i];\n }\n return list;\n };\n callback =\n callback ||\n function (o) {\n return o.toString();\n };\n var realCallback = function (arg) {\n return callback && callback.call(_this, arg);\n };\n if (finalDelim) {\n return delimJoin(arr.map(realCallback), delim, finalDelim);\n }\n else {\n return arr.map(realCallback).join(delim + ' ');\n }\n };\n return ToText;\n}());\nexport default ToText;\n//# sourceMappingURL=totext.js.map","import ENGLISH from './i18n';\nimport { RRule } from '../rrule';\n// =============================================================================\n// Parser\n// =============================================================================\nvar Parser = /** @class */ (function () {\n function Parser(rules) {\n this.done = true;\n this.rules = rules;\n }\n Parser.prototype.start = function (text) {\n this.text = text;\n this.done = false;\n return this.nextSymbol();\n };\n Parser.prototype.isDone = function () {\n return this.done && this.symbol === null;\n };\n Parser.prototype.nextSymbol = function () {\n var best;\n var bestSymbol;\n this.symbol = null;\n this.value = null;\n do {\n if (this.done)\n return false;\n var rule = void 0;\n best = null;\n for (var name_1 in this.rules) {\n rule = this.rules[name_1];\n var match = rule.exec(this.text);\n if (match) {\n if (best === null || match[0].length > best[0].length) {\n best = match;\n bestSymbol = name_1;\n }\n }\n }\n if (best != null) {\n this.text = this.text.substr(best[0].length);\n if (this.text === '')\n this.done = true;\n }\n if (best == null) {\n this.done = true;\n this.symbol = null;\n this.value = null;\n return;\n }\n } while (bestSymbol === 'SKIP');\n this.symbol = bestSymbol;\n this.value = best;\n return true;\n };\n Parser.prototype.accept = function (name) {\n if (this.symbol === name) {\n if (this.value) {\n var v = this.value;\n this.nextSymbol();\n return v;\n }\n this.nextSymbol();\n return true;\n }\n return false;\n };\n Parser.prototype.acceptNumber = function () {\n return this.accept('number');\n };\n Parser.prototype.expect = function (name) {\n if (this.accept(name))\n return true;\n throw new Error('expected ' + name + ' but found ' + this.symbol);\n };\n return Parser;\n}());\nexport default function parseText(text, language) {\n if (language === void 0) { language = ENGLISH; }\n var options = {};\n var ttr = new Parser(language.tokens);\n if (!ttr.start(text))\n return null;\n S();\n return options;\n function S() {\n // every [n]\n ttr.expect('every');\n var n = ttr.acceptNumber();\n if (n)\n options.interval = parseInt(n[0], 10);\n if (ttr.isDone())\n throw new Error('Unexpected end');\n switch (ttr.symbol) {\n case 'day(s)':\n options.freq = RRule.DAILY;\n if (ttr.nextSymbol()) {\n AT();\n F();\n }\n break;\n // FIXME Note: every 2 weekdays != every two weeks on weekdays.\n // DAILY on weekdays is not a valid rule\n case 'weekday(s)':\n options.freq = RRule.WEEKLY;\n options.byweekday = [RRule.MO, RRule.TU, RRule.WE, RRule.TH, RRule.FR];\n ttr.nextSymbol();\n AT();\n F();\n break;\n case 'week(s)':\n options.freq = RRule.WEEKLY;\n if (ttr.nextSymbol()) {\n ON();\n AT();\n F();\n }\n break;\n case 'hour(s)':\n options.freq = RRule.HOURLY;\n if (ttr.nextSymbol()) {\n ON();\n F();\n }\n break;\n case 'minute(s)':\n options.freq = RRule.MINUTELY;\n if (ttr.nextSymbol()) {\n ON();\n F();\n }\n break;\n case 'month(s)':\n options.freq = RRule.MONTHLY;\n if (ttr.nextSymbol()) {\n ON();\n F();\n }\n break;\n case 'year(s)':\n options.freq = RRule.YEARLY;\n if (ttr.nextSymbol()) {\n ON();\n F();\n }\n break;\n case 'monday':\n case 'tuesday':\n case 'wednesday':\n case 'thursday':\n case 'friday':\n case 'saturday':\n case 'sunday':\n options.freq = RRule.WEEKLY;\n var key = ttr.symbol\n .substr(0, 2)\n .toUpperCase();\n options.byweekday = [RRule[key]];\n if (!ttr.nextSymbol())\n return;\n // TODO check for duplicates\n while (ttr.accept('comma')) {\n if (ttr.isDone())\n throw new Error('Unexpected end');\n var wkd = decodeWKD();\n if (!wkd) {\n throw new Error('Unexpected symbol ' + ttr.symbol + ', expected weekday');\n }\n options.byweekday.push(RRule[wkd]);\n ttr.nextSymbol();\n }\n AT();\n MDAYs();\n F();\n break;\n case 'january':\n case 'february':\n case 'march':\n case 'april':\n case 'may':\n case 'june':\n case 'july':\n case 'august':\n case 'september':\n case 'october':\n case 'november':\n case 'december':\n options.freq = RRule.YEARLY;\n options.bymonth = [decodeM()];\n if (!ttr.nextSymbol())\n return;\n // TODO check for duplicates\n while (ttr.accept('comma')) {\n if (ttr.isDone())\n throw new Error('Unexpected end');\n var m = decodeM();\n if (!m) {\n throw new Error('Unexpected symbol ' + ttr.symbol + ', expected month');\n }\n options.bymonth.push(m);\n ttr.nextSymbol();\n }\n ON();\n F();\n break;\n default:\n throw new Error('Unknown symbol');\n }\n }\n function ON() {\n var on = ttr.accept('on');\n var the = ttr.accept('the');\n if (!(on || the))\n return;\n do {\n var nth = decodeNTH();\n var wkd = decodeWKD();\n var m = decodeM();\n // nth | \n if (nth) {\n // ttr.nextSymbol()\n if (wkd) {\n ttr.nextSymbol();\n if (!options.byweekday)\n options.byweekday = [];\n options.byweekday.push(RRule[wkd].nth(nth));\n }\n else {\n if (!options.bymonthday)\n options.bymonthday = [];\n options.bymonthday.push(nth);\n ttr.accept('day(s)');\n }\n // \n }\n else if (wkd) {\n ttr.nextSymbol();\n if (!options.byweekday)\n options.byweekday = [];\n options.byweekday.push(RRule[wkd]);\n }\n else if (ttr.symbol === 'weekday(s)') {\n ttr.nextSymbol();\n if (!options.byweekday) {\n options.byweekday = [RRule.MO, RRule.TU, RRule.WE, RRule.TH, RRule.FR];\n }\n }\n else if (ttr.symbol === 'week(s)') {\n ttr.nextSymbol();\n var n = ttr.acceptNumber();\n if (!n) {\n throw new Error('Unexpected symbol ' + ttr.symbol + ', expected week number');\n }\n options.byweekno = [parseInt(n[0], 10)];\n while (ttr.accept('comma')) {\n n = ttr.acceptNumber();\n if (!n) {\n throw new Error('Unexpected symbol ' + ttr.symbol + '; expected monthday');\n }\n options.byweekno.push(parseInt(n[0], 10));\n }\n }\n else if (m) {\n ttr.nextSymbol();\n if (!options.bymonth)\n options.bymonth = [];\n options.bymonth.push(m);\n }\n else {\n return;\n }\n } while (ttr.accept('comma') || ttr.accept('the') || ttr.accept('on'));\n }\n function AT() {\n var at = ttr.accept('at');\n if (!at)\n return;\n do {\n var n = ttr.acceptNumber();\n if (!n) {\n throw new Error('Unexpected symbol ' + ttr.symbol + ', expected hour');\n }\n options.byhour = [parseInt(n[0], 10)];\n while (ttr.accept('comma')) {\n n = ttr.acceptNumber();\n if (!n) {\n throw new Error('Unexpected symbol ' + ttr.symbol + '; expected hour');\n }\n options.byhour.push(parseInt(n[0], 10));\n }\n } while (ttr.accept('comma') || ttr.accept('at'));\n }\n function decodeM() {\n switch (ttr.symbol) {\n case 'january':\n return 1;\n case 'february':\n return 2;\n case 'march':\n return 3;\n case 'april':\n return 4;\n case 'may':\n return 5;\n case 'june':\n return 6;\n case 'july':\n return 7;\n case 'august':\n return 8;\n case 'september':\n return 9;\n case 'october':\n return 10;\n case 'november':\n return 11;\n case 'december':\n return 12;\n default:\n return false;\n }\n }\n function decodeWKD() {\n switch (ttr.symbol) {\n case 'monday':\n case 'tuesday':\n case 'wednesday':\n case 'thursday':\n case 'friday':\n case 'saturday':\n case 'sunday':\n return ttr.symbol.substr(0, 2).toUpperCase();\n default:\n return false;\n }\n }\n function decodeNTH() {\n switch (ttr.symbol) {\n case 'last':\n ttr.nextSymbol();\n return -1;\n case 'first':\n ttr.nextSymbol();\n return 1;\n case 'second':\n ttr.nextSymbol();\n return ttr.accept('last') ? -2 : 2;\n case 'third':\n ttr.nextSymbol();\n return ttr.accept('last') ? -3 : 3;\n case 'nth':\n var v = parseInt(ttr.value[1], 10);\n if (v < -366 || v > 366)\n throw new Error('Nth out of range: ' + v);\n ttr.nextSymbol();\n return ttr.accept('last') ? -v : v;\n default:\n return false;\n }\n }\n function MDAYs() {\n ttr.accept('on');\n ttr.accept('the');\n var nth = decodeNTH();\n if (!nth)\n return;\n options.bymonthday = [nth];\n ttr.nextSymbol();\n while (ttr.accept('comma')) {\n nth = decodeNTH();\n if (!nth) {\n throw new Error('Unexpected symbol ' + ttr.symbol + '; expected monthday');\n }\n options.bymonthday.push(nth);\n ttr.nextSymbol();\n }\n }\n function F() {\n if (ttr.symbol === 'until') {\n var date = Date.parse(ttr.text);\n if (!date)\n throw new Error('Cannot parse until date:' + ttr.text);\n options.until = new Date(date);\n }\n else if (ttr.accept('for')) {\n options.count = parseInt(ttr.value[0], 10);\n ttr.expect('number');\n // ttr.expect('times')\n }\n }\n}\n//# sourceMappingURL=parsetext.js.map","export var Frequency;\n(function (Frequency) {\n Frequency[Frequency[\"YEARLY\"] = 0] = \"YEARLY\";\n Frequency[Frequency[\"MONTHLY\"] = 1] = \"MONTHLY\";\n Frequency[Frequency[\"WEEKLY\"] = 2] = \"WEEKLY\";\n Frequency[Frequency[\"DAILY\"] = 3] = \"DAILY\";\n Frequency[Frequency[\"HOURLY\"] = 4] = \"HOURLY\";\n Frequency[Frequency[\"MINUTELY\"] = 5] = \"MINUTELY\";\n Frequency[Frequency[\"SECONDLY\"] = 6] = \"SECONDLY\";\n})(Frequency || (Frequency = {}));\nexport function freqIsDailyOrGreater(freq) {\n return freq < Frequency.HOURLY;\n}\n//# sourceMappingURL=types.js.map","import ToText from './totext';\nimport parseText from './parsetext';\nimport { RRule } from '../rrule';\nimport { Frequency } from '../types';\nimport ENGLISH from './i18n';\n/* !\n * rrule.js - Library for working with recurrence rules for calendar dates.\n * https://github.com/jakubroztocil/rrule\n *\n * Copyright 2010, Jakub Roztocil and Lars Schoning\n * Licenced under the BSD licence.\n * https://github.com/jakubroztocil/rrule/blob/master/LICENCE\n *\n */\n/**\n *\n * Implementation of RRule.fromText() and RRule::toText().\n *\n *\n * On the client side, this file needs to be included\n * when those functions are used.\n *\n */\n// =============================================================================\n// fromText\n// =============================================================================\n/**\n * Will be able to convert some of the below described rules from\n * text format to a rule object.\n *\n *\n * RULES\n *\n * Every ([n])\n * day(s)\n * | [weekday], ..., (and) [weekday]\n * | weekday(s)\n * | week(s)\n * | month(s)\n * | [month], ..., (and) [month]\n * | year(s)\n *\n *\n * Plus 0, 1, or multiple of these:\n *\n * on [weekday], ..., (or) [weekday] the [monthday], [monthday], ... (or) [monthday]\n *\n * on [weekday], ..., (and) [weekday]\n *\n * on the [monthday], [monthday], ... (and) [monthday] (day of the month)\n *\n * on the [nth-weekday], ..., (and) [nth-weekday] (of the month/year)\n *\n *\n * Plus 0 or 1 of these:\n *\n * for [n] time(s)\n *\n * until [date]\n *\n * Plus (.)\n *\n *\n * Definitely no supported for parsing:\n *\n * (for year):\n * in week(s) [n], ..., (and) [n]\n *\n * on the [yearday], ..., (and) [n] day of the year\n * on day [yearday], ..., (and) [n]\n *\n *\n * NON-TERMINALS\n *\n * [n]: 1, 2 ..., one, two, three ..\n * [month]: January, February, March, April, May, ... December\n * [weekday]: Monday, ... Sunday\n * [nth-weekday]: first [weekday], 2nd [weekday], ... last [weekday], ...\n * [monthday]: first, 1., 2., 1st, 2nd, second, ... 31st, last day, 2nd last day, ..\n * [date]:\n * - [month] (0-31(,) ([year])),\n * - (the) 0-31.(1-12.([year])),\n * - (the) 0-31/(1-12/([year])),\n * - [weekday]\n *\n * [year]: 0000, 0001, ... 01, 02, ..\n *\n * Definitely not supported for parsing:\n *\n * [yearday]: first, 1., 2., 1st, 2nd, second, ... 366th, last day, 2nd last day, ..\n *\n * @param {String} text\n * @return {Object, Boolean} the rule, or null.\n */\nvar fromText = function (text, language) {\n if (language === void 0) { language = ENGLISH; }\n return new RRule(parseText(text, language) || undefined);\n};\nvar common = [\n 'count',\n 'until',\n 'interval',\n 'byweekday',\n 'bymonthday',\n 'bymonth',\n];\nToText.IMPLEMENTED = [];\nToText.IMPLEMENTED[Frequency.HOURLY] = common;\nToText.IMPLEMENTED[Frequency.MINUTELY] = common;\nToText.IMPLEMENTED[Frequency.DAILY] = ['byhour'].concat(common);\nToText.IMPLEMENTED[Frequency.WEEKLY] = common;\nToText.IMPLEMENTED[Frequency.MONTHLY] = common;\nToText.IMPLEMENTED[Frequency.YEARLY] = ['byweekno', 'byyearday'].concat(common);\n// =============================================================================\n// Export\n// =============================================================================\nvar toText = function (rrule, gettext, language, dateFormatter) {\n return new ToText(rrule, gettext, language, dateFormatter).toString();\n};\nvar isFullyConvertible = ToText.isFullyConvertible;\nexport { fromText, parseText, isFullyConvertible, toText };\n//# sourceMappingURL=index.js.map","import { __extends } from \"tslib\";\nimport { Frequency } from './types';\nimport { pymod, divmod, empty, includes } from './helpers';\nimport { getWeekday, MAXYEAR, monthRange } from './dateutil';\nvar Time = /** @class */ (function () {\n function Time(hour, minute, second, millisecond) {\n this.hour = hour;\n this.minute = minute;\n this.second = second;\n this.millisecond = millisecond || 0;\n }\n Time.prototype.getHours = function () {\n return this.hour;\n };\n Time.prototype.getMinutes = function () {\n return this.minute;\n };\n Time.prototype.getSeconds = function () {\n return this.second;\n };\n Time.prototype.getMilliseconds = function () {\n return this.millisecond;\n };\n Time.prototype.getTime = function () {\n return ((this.hour * 60 * 60 + this.minute * 60 + this.second) * 1000 +\n this.millisecond);\n };\n return Time;\n}());\nexport { Time };\nvar DateTime = /** @class */ (function (_super) {\n __extends(DateTime, _super);\n function DateTime(year, month, day, hour, minute, second, millisecond) {\n var _this = _super.call(this, hour, minute, second, millisecond) || this;\n _this.year = year;\n _this.month = month;\n _this.day = day;\n return _this;\n }\n DateTime.fromDate = function (date) {\n return new this(date.getUTCFullYear(), date.getUTCMonth() + 1, date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), date.valueOf() % 1000);\n };\n DateTime.prototype.getWeekday = function () {\n return getWeekday(new Date(this.getTime()));\n };\n DateTime.prototype.getTime = function () {\n return new Date(Date.UTC(this.year, this.month - 1, this.day, this.hour, this.minute, this.second, this.millisecond)).getTime();\n };\n DateTime.prototype.getDay = function () {\n return this.day;\n };\n DateTime.prototype.getMonth = function () {\n return this.month;\n };\n DateTime.prototype.getYear = function () {\n return this.year;\n };\n DateTime.prototype.addYears = function (years) {\n this.year += years;\n };\n DateTime.prototype.addMonths = function (months) {\n this.month += months;\n if (this.month > 12) {\n var yearDiv = Math.floor(this.month / 12);\n var monthMod = pymod(this.month, 12);\n this.month = monthMod;\n this.year += yearDiv;\n if (this.month === 0) {\n this.month = 12;\n --this.year;\n }\n }\n };\n DateTime.prototype.addWeekly = function (days, wkst) {\n if (wkst > this.getWeekday()) {\n this.day += -(this.getWeekday() + 1 + (6 - wkst)) + days * 7;\n }\n else {\n this.day += -(this.getWeekday() - wkst) + days * 7;\n }\n this.fixDay();\n };\n DateTime.prototype.addDaily = function (days) {\n this.day += days;\n this.fixDay();\n };\n DateTime.prototype.addHours = function (hours, filtered, byhour) {\n if (filtered) {\n // Jump to one iteration before next day\n this.hour += Math.floor((23 - this.hour) / hours) * hours;\n }\n for (;;) {\n this.hour += hours;\n var _a = divmod(this.hour, 24), dayDiv = _a.div, hourMod = _a.mod;\n if (dayDiv) {\n this.hour = hourMod;\n this.addDaily(dayDiv);\n }\n if (empty(byhour) || includes(byhour, this.hour))\n break;\n }\n };\n DateTime.prototype.addMinutes = function (minutes, filtered, byhour, byminute) {\n if (filtered) {\n // Jump to one iteration before next day\n this.minute +=\n Math.floor((1439 - (this.hour * 60 + this.minute)) / minutes) * minutes;\n }\n for (;;) {\n this.minute += minutes;\n var _a = divmod(this.minute, 60), hourDiv = _a.div, minuteMod = _a.mod;\n if (hourDiv) {\n this.minute = minuteMod;\n this.addHours(hourDiv, false, byhour);\n }\n if ((empty(byhour) || includes(byhour, this.hour)) &&\n (empty(byminute) || includes(byminute, this.minute))) {\n break;\n }\n }\n };\n DateTime.prototype.addSeconds = function (seconds, filtered, byhour, byminute, bysecond) {\n if (filtered) {\n // Jump to one iteration before next day\n this.second +=\n Math.floor((86399 - (this.hour * 3600 + this.minute * 60 + this.second)) /\n seconds) * seconds;\n }\n for (;;) {\n this.second += seconds;\n var _a = divmod(this.second, 60), minuteDiv = _a.div, secondMod = _a.mod;\n if (minuteDiv) {\n this.second = secondMod;\n this.addMinutes(minuteDiv, false, byhour, byminute);\n }\n if ((empty(byhour) || includes(byhour, this.hour)) &&\n (empty(byminute) || includes(byminute, this.minute)) &&\n (empty(bysecond) || includes(bysecond, this.second))) {\n break;\n }\n }\n };\n DateTime.prototype.fixDay = function () {\n if (this.day <= 28) {\n return;\n }\n var daysinmonth = monthRange(this.year, this.month - 1)[1];\n if (this.day <= daysinmonth) {\n return;\n }\n while (this.day > daysinmonth) {\n this.day -= daysinmonth;\n ++this.month;\n if (this.month === 13) {\n this.month = 1;\n ++this.year;\n if (this.year > MAXYEAR) {\n return;\n }\n }\n daysinmonth = monthRange(this.year, this.month - 1)[1];\n }\n };\n DateTime.prototype.add = function (options, filtered) {\n var freq = options.freq, interval = options.interval, wkst = options.wkst, byhour = options.byhour, byminute = options.byminute, bysecond = options.bysecond;\n switch (freq) {\n case Frequency.YEARLY:\n return this.addYears(interval);\n case Frequency.MONTHLY:\n return this.addMonths(interval);\n case Frequency.WEEKLY:\n return this.addWeekly(interval, wkst);\n case Frequency.DAILY:\n return this.addDaily(interval);\n case Frequency.HOURLY:\n return this.addHours(interval, filtered, byhour);\n case Frequency.MINUTELY:\n return this.addMinutes(interval, filtered, byhour, byminute);\n case Frequency.SECONDLY:\n return this.addSeconds(interval, filtered, byhour, byminute, bysecond);\n }\n };\n return DateTime;\n}(Time));\nexport { DateTime };\n//# sourceMappingURL=datetime.js.map","import { __assign } from \"tslib\";\nimport { freqIsDailyOrGreater } from './types';\nimport { includes, notEmpty, isPresent, isNumber, isArray, isWeekdayStr, } from './helpers';\nimport { RRule, defaultKeys, DEFAULT_OPTIONS } from './rrule';\nimport { getWeekday, isDate, isValidDate } from './dateutil';\nimport { Weekday } from './weekday';\nimport { Time } from './datetime';\nexport function initializeOptions(options) {\n var invalid = [];\n var keys = Object.keys(options);\n // Shallow copy for options and origOptions and check for invalid\n for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {\n var key = keys_1[_i];\n if (!includes(defaultKeys, key))\n invalid.push(key);\n if (isDate(options[key]) && !isValidDate(options[key])) {\n invalid.push(key);\n }\n }\n if (invalid.length) {\n throw new Error('Invalid options: ' + invalid.join(', '));\n }\n return __assign({}, options);\n}\nexport function parseOptions(options) {\n var opts = __assign(__assign({}, DEFAULT_OPTIONS), initializeOptions(options));\n if (isPresent(opts.byeaster))\n opts.freq = RRule.YEARLY;\n if (!(isPresent(opts.freq) && RRule.FREQUENCIES[opts.freq])) {\n throw new Error(\"Invalid frequency: \".concat(opts.freq, \" \").concat(options.freq));\n }\n if (!opts.dtstart)\n opts.dtstart = new Date(new Date().setMilliseconds(0));\n if (!isPresent(opts.wkst)) {\n opts.wkst = RRule.MO.weekday;\n }\n else if (isNumber(opts.wkst)) {\n // cool, just keep it like that\n }\n else {\n opts.wkst = opts.wkst.weekday;\n }\n if (isPresent(opts.bysetpos)) {\n if (isNumber(opts.bysetpos))\n opts.bysetpos = [opts.bysetpos];\n for (var i = 0; i < opts.bysetpos.length; i++) {\n var v = opts.bysetpos[i];\n if (v === 0 || !(v >= -366 && v <= 366)) {\n throw new Error('bysetpos must be between 1 and 366,' + ' or between -366 and -1');\n }\n }\n }\n if (!(Boolean(opts.byweekno) ||\n notEmpty(opts.byweekno) ||\n notEmpty(opts.byyearday) ||\n Boolean(opts.bymonthday) ||\n notEmpty(opts.bymonthday) ||\n isPresent(opts.byweekday) ||\n isPresent(opts.byeaster))) {\n switch (opts.freq) {\n case RRule.YEARLY:\n if (!opts.bymonth)\n opts.bymonth = opts.dtstart.getUTCMonth() + 1;\n opts.bymonthday = opts.dtstart.getUTCDate();\n break;\n case RRule.MONTHLY:\n opts.bymonthday = opts.dtstart.getUTCDate();\n break;\n case RRule.WEEKLY:\n opts.byweekday = [getWeekday(opts.dtstart)];\n break;\n }\n }\n // bymonth\n if (isPresent(opts.bymonth) && !isArray(opts.bymonth)) {\n opts.bymonth = [opts.bymonth];\n }\n // byyearday\n if (isPresent(opts.byyearday) &&\n !isArray(opts.byyearday) &&\n isNumber(opts.byyearday)) {\n opts.byyearday = [opts.byyearday];\n }\n // bymonthday\n if (!isPresent(opts.bymonthday)) {\n opts.bymonthday = [];\n opts.bynmonthday = [];\n }\n else if (isArray(opts.bymonthday)) {\n var bymonthday = [];\n var bynmonthday = [];\n for (var i = 0; i < opts.bymonthday.length; i++) {\n var v = opts.bymonthday[i];\n if (v > 0) {\n bymonthday.push(v);\n }\n else if (v < 0) {\n bynmonthday.push(v);\n }\n }\n opts.bymonthday = bymonthday;\n opts.bynmonthday = bynmonthday;\n }\n else if (opts.bymonthday < 0) {\n opts.bynmonthday = [opts.bymonthday];\n opts.bymonthday = [];\n }\n else {\n opts.bynmonthday = [];\n opts.bymonthday = [opts.bymonthday];\n }\n // byweekno\n if (isPresent(opts.byweekno) && !isArray(opts.byweekno)) {\n opts.byweekno = [opts.byweekno];\n }\n // byweekday / bynweekday\n if (!isPresent(opts.byweekday)) {\n opts.bynweekday = null;\n }\n else if (isNumber(opts.byweekday)) {\n opts.byweekday = [opts.byweekday];\n opts.bynweekday = null;\n }\n else if (isWeekdayStr(opts.byweekday)) {\n opts.byweekday = [Weekday.fromStr(opts.byweekday).weekday];\n opts.bynweekday = null;\n }\n else if (opts.byweekday instanceof Weekday) {\n if (!opts.byweekday.n || opts.freq > RRule.MONTHLY) {\n opts.byweekday = [opts.byweekday.weekday];\n opts.bynweekday = null;\n }\n else {\n opts.bynweekday = [[opts.byweekday.weekday, opts.byweekday.n]];\n opts.byweekday = null;\n }\n }\n else {\n var byweekday = [];\n var bynweekday = [];\n for (var i = 0; i < opts.byweekday.length; i++) {\n var wday = opts.byweekday[i];\n if (isNumber(wday)) {\n byweekday.push(wday);\n continue;\n }\n else if (isWeekdayStr(wday)) {\n byweekday.push(Weekday.fromStr(wday).weekday);\n continue;\n }\n if (!wday.n || opts.freq > RRule.MONTHLY) {\n byweekday.push(wday.weekday);\n }\n else {\n bynweekday.push([wday.weekday, wday.n]);\n }\n }\n opts.byweekday = notEmpty(byweekday) ? byweekday : null;\n opts.bynweekday = notEmpty(bynweekday) ? bynweekday : null;\n }\n // byhour\n if (!isPresent(opts.byhour)) {\n opts.byhour = opts.freq < RRule.HOURLY ? [opts.dtstart.getUTCHours()] : null;\n }\n else if (isNumber(opts.byhour)) {\n opts.byhour = [opts.byhour];\n }\n // byminute\n if (!isPresent(opts.byminute)) {\n opts.byminute =\n opts.freq < RRule.MINUTELY ? [opts.dtstart.getUTCMinutes()] : null;\n }\n else if (isNumber(opts.byminute)) {\n opts.byminute = [opts.byminute];\n }\n // bysecond\n if (!isPresent(opts.bysecond)) {\n opts.bysecond =\n opts.freq < RRule.SECONDLY ? [opts.dtstart.getUTCSeconds()] : null;\n }\n else if (isNumber(opts.bysecond)) {\n opts.bysecond = [opts.bysecond];\n }\n return { parsedOptions: opts };\n}\nexport function buildTimeset(opts) {\n var millisecondModulo = opts.dtstart.getTime() % 1000;\n if (!freqIsDailyOrGreater(opts.freq)) {\n return [];\n }\n var timeset = [];\n opts.byhour.forEach(function (hour) {\n opts.byminute.forEach(function (minute) {\n opts.bysecond.forEach(function (second) {\n timeset.push(new Time(hour, minute, second, millisecondModulo));\n });\n });\n });\n return timeset;\n}\n//# sourceMappingURL=parseoptions.js.map","import { __assign } from \"tslib\";\nimport { Frequency } from './types';\nimport { Weekday } from './weekday';\nimport { untilStringToDate } from './dateutil';\nimport { Days } from './rrule';\nexport function parseString(rfcString) {\n var options = rfcString\n .split('\\n')\n .map(parseLine)\n .filter(function (x) { return x !== null; });\n return __assign(__assign({}, options[0]), options[1]);\n}\nexport function parseDtstart(line) {\n var options = {};\n var dtstartWithZone = /DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\\s]+)/i.exec(line);\n if (!dtstartWithZone) {\n return options;\n }\n var tzid = dtstartWithZone[1], dtstart = dtstartWithZone[2];\n if (tzid) {\n options.tzid = tzid;\n }\n options.dtstart = untilStringToDate(dtstart);\n return options;\n}\nfunction parseLine(rfcString) {\n rfcString = rfcString.replace(/^\\s+|\\s+$/, '');\n if (!rfcString.length)\n return null;\n var header = /^([A-Z]+?)[:;]/.exec(rfcString.toUpperCase());\n if (!header) {\n return parseRrule(rfcString);\n }\n var key = header[1];\n switch (key.toUpperCase()) {\n case 'RRULE':\n case 'EXRULE':\n return parseRrule(rfcString);\n case 'DTSTART':\n return parseDtstart(rfcString);\n default:\n throw new Error(\"Unsupported RFC prop \".concat(key, \" in \").concat(rfcString));\n }\n}\nfunction parseRrule(line) {\n var strippedLine = line.replace(/^RRULE:/i, '');\n var options = parseDtstart(strippedLine);\n var attrs = line.replace(/^(?:RRULE|EXRULE):/i, '').split(';');\n attrs.forEach(function (attr) {\n var _a = attr.split('='), key = _a[0], value = _a[1];\n switch (key.toUpperCase()) {\n case 'FREQ':\n options.freq = Frequency[value.toUpperCase()];\n break;\n case 'WKST':\n options.wkst = Days[value.toUpperCase()];\n break;\n case 'COUNT':\n case 'INTERVAL':\n case 'BYSETPOS':\n case 'BYMONTH':\n case 'BYMONTHDAY':\n case 'BYYEARDAY':\n case 'BYWEEKNO':\n case 'BYHOUR':\n case 'BYMINUTE':\n case 'BYSECOND':\n var num = parseNumber(value);\n var optionKey = key.toLowerCase();\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n options[optionKey] = num;\n break;\n case 'BYWEEKDAY':\n case 'BYDAY':\n options.byweekday = parseWeekday(value);\n break;\n case 'DTSTART':\n case 'TZID':\n // for backwards compatibility\n var dtstart = parseDtstart(line);\n options.tzid = dtstart.tzid;\n options.dtstart = dtstart.dtstart;\n break;\n case 'UNTIL':\n options.until = untilStringToDate(value);\n break;\n case 'BYEASTER':\n options.byeaster = Number(value);\n break;\n default:\n throw new Error(\"Unknown RRULE property '\" + key + \"'\");\n }\n });\n return options;\n}\nfunction parseNumber(value) {\n if (value.indexOf(',') !== -1) {\n var values = value.split(',');\n return values.map(parseIndividualNumber);\n }\n return parseIndividualNumber(value);\n}\nfunction parseIndividualNumber(value) {\n if (/^[+-]?\\d+$/.test(value)) {\n return Number(value);\n }\n return value;\n}\nfunction parseWeekday(value) {\n var days = value.split(',');\n return days.map(function (day) {\n if (day.length === 2) {\n // MO, TU, ...\n return Days[day]; // wday instanceof Weekday\n }\n // -1MO, +3FR, 1SO, 13TU ...\n var parts = day.match(/^([+-]?\\d{1,2})([A-Z]{2})$/);\n if (!parts || parts.length < 3) {\n throw new SyntaxError(\"Invalid weekday string: \".concat(day));\n }\n var n = Number(parts[1]);\n var wdaypart = parts[2];\n var wday = Days[wdaypart].weekday;\n return new Weekday(wday, n);\n });\n}\n//# sourceMappingURL=parsestring.js.map","import { dateInTimeZone, timeToUntilString } from './dateutil';\nvar DateWithZone = /** @class */ (function () {\n function DateWithZone(date, tzid) {\n if (isNaN(date.getTime())) {\n throw new RangeError('Invalid date passed to DateWithZone');\n }\n this.date = date;\n this.tzid = tzid;\n }\n Object.defineProperty(DateWithZone.prototype, \"isUTC\", {\n get: function () {\n return !this.tzid || this.tzid.toUpperCase() === 'UTC';\n },\n enumerable: false,\n configurable: true\n });\n DateWithZone.prototype.toString = function () {\n var datestr = timeToUntilString(this.date.getTime(), this.isUTC);\n if (!this.isUTC) {\n return \";TZID=\".concat(this.tzid, \":\").concat(datestr);\n }\n return \":\".concat(datestr);\n };\n DateWithZone.prototype.getTime = function () {\n return this.date.getTime();\n };\n DateWithZone.prototype.rezonedDate = function () {\n if (this.isUTC) {\n return this.date;\n }\n return dateInTimeZone(this.date, this.tzid);\n };\n return DateWithZone;\n}());\nexport { DateWithZone };\n//# sourceMappingURL=datewithzone.js.map","import { RRule, DEFAULT_OPTIONS } from './rrule';\nimport { includes, isPresent, isArray, isNumber, toArray } from './helpers';\nimport { Weekday } from './weekday';\nimport { timeToUntilString } from './dateutil';\nimport { DateWithZone } from './datewithzone';\nexport function optionsToString(options) {\n var rrule = [];\n var dtstart = '';\n var keys = Object.keys(options);\n var defaultKeys = Object.keys(DEFAULT_OPTIONS);\n for (var i = 0; i < keys.length; i++) {\n if (keys[i] === 'tzid')\n continue;\n if (!includes(defaultKeys, keys[i]))\n continue;\n var key = keys[i].toUpperCase();\n var value = options[keys[i]];\n var outValue = '';\n if (!isPresent(value) || (isArray(value) && !value.length))\n continue;\n switch (key) {\n case 'FREQ':\n outValue = RRule.FREQUENCIES[options.freq];\n break;\n case 'WKST':\n if (isNumber(value)) {\n outValue = new Weekday(value).toString();\n }\n else {\n outValue = value.toString();\n }\n break;\n case 'BYWEEKDAY':\n /*\n NOTE: BYWEEKDAY is a special case.\n RRule() deconstructs the rule.options.byweekday array\n into an array of Weekday arguments.\n On the other hand, rule.origOptions is an array of Weekdays.\n We need to handle both cases here.\n It might be worth change RRule to keep the Weekdays.\n \n Also, BYWEEKDAY (used by RRule) vs. BYDAY (RFC)\n \n */\n key = 'BYDAY';\n outValue = toArray(value)\n .map(function (wday) {\n if (wday instanceof Weekday) {\n return wday;\n }\n if (isArray(wday)) {\n return new Weekday(wday[0], wday[1]);\n }\n return new Weekday(wday);\n })\n .toString();\n break;\n case 'DTSTART':\n dtstart = buildDtstart(value, options.tzid);\n break;\n case 'UNTIL':\n outValue = timeToUntilString(value, !options.tzid);\n break;\n default:\n if (isArray(value)) {\n var strValues = [];\n for (var j = 0; j < value.length; j++) {\n strValues[j] = String(value[j]);\n }\n outValue = strValues.toString();\n }\n else {\n outValue = String(value);\n }\n }\n if (outValue) {\n rrule.push([key, outValue]);\n }\n }\n var rules = rrule\n .map(function (_a) {\n var key = _a[0], value = _a[1];\n return \"\".concat(key, \"=\").concat(value.toString());\n })\n .join(';');\n var ruleString = '';\n if (rules !== '') {\n ruleString = \"RRULE:\".concat(rules);\n }\n return [dtstart, ruleString].filter(function (x) { return !!x; }).join('\\n');\n}\nfunction buildDtstart(dtstart, tzid) {\n if (!dtstart) {\n return '';\n }\n return 'DTSTART' + new DateWithZone(new Date(dtstart), tzid).toString();\n}\n//# sourceMappingURL=optionstostring.js.map","import IterResult from './iterresult';\nimport { clone, cloneDates } from './dateutil';\nimport { isArray } from './helpers';\nfunction argsMatch(left, right) {\n if (Array.isArray(left)) {\n if (!Array.isArray(right))\n return false;\n if (left.length !== right.length)\n return false;\n return left.every(function (date, i) { return date.getTime() === right[i].getTime(); });\n }\n if (left instanceof Date) {\n return right instanceof Date && left.getTime() === right.getTime();\n }\n return left === right;\n}\nvar Cache = /** @class */ (function () {\n function Cache() {\n this.all = false;\n this.before = [];\n this.after = [];\n this.between = [];\n }\n /**\n * @param {String} what - all/before/after/between\n * @param {Array,Date} value - an array of dates, one date, or null\n * @param {Object?} args - _iter arguments\n */\n Cache.prototype._cacheAdd = function (what, value, args) {\n if (value) {\n value = value instanceof Date ? clone(value) : cloneDates(value);\n }\n if (what === 'all') {\n this.all = value;\n }\n else {\n args._value = value;\n this[what].push(args);\n }\n };\n /**\n * @return false - not in the cache\n * @return null - cached, but zero occurrences (before/after)\n * @return Date - cached (before/after)\n * @return [] - cached, but zero occurrences (all/between)\n * @return [Date1, DateN] - cached (all/between)\n */\n Cache.prototype._cacheGet = function (what, args) {\n var cached = false;\n var argsKeys = args ? Object.keys(args) : [];\n var findCacheDiff = function (item) {\n for (var i = 0; i < argsKeys.length; i++) {\n var key = argsKeys[i];\n if (!argsMatch(args[key], item[key])) {\n return true;\n }\n }\n return false;\n };\n var cachedObject = this[what];\n if (what === 'all') {\n cached = this.all;\n }\n else if (isArray(cachedObject)) {\n // Let's see whether we've already called the\n // 'what' method with the same 'args'\n for (var i = 0; i < cachedObject.length; i++) {\n var item = cachedObject[i];\n if (argsKeys.length && findCacheDiff(item))\n continue;\n cached = item._value;\n break;\n }\n }\n if (!cached && this.all) {\n // Not in the cache, but we already know all the occurrences,\n // so we can find the correct dates from the cached ones.\n var iterResult = new IterResult(what, args);\n for (var i = 0; i < this.all.length; i++) {\n if (!iterResult.accept(this.all[i]))\n break;\n }\n cached = iterResult.getValue();\n this._cacheAdd(what, cached, args);\n }\n return isArray(cached)\n ? cloneDates(cached)\n : cached instanceof Date\n ? clone(cached)\n : cached;\n };\n return Cache;\n}());\nexport { Cache };\n//# sourceMappingURL=cache.js.map","import { __spreadArray } from \"tslib\";\nimport { range, repeat } from './helpers';\n// =============================================================================\n// Date masks\n// =============================================================================\n// Every mask is 7 days longer to handle cross-year weekly periods.\nvar M365MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], repeat(1, 31), true), repeat(2, 28), true), repeat(3, 31), true), repeat(4, 30), true), repeat(5, 31), true), repeat(6, 30), true), repeat(7, 31), true), repeat(8, 31), true), repeat(9, 30), true), repeat(10, 31), true), repeat(11, 30), true), repeat(12, 31), true), repeat(1, 7), true);\nvar M366MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], repeat(1, 31), true), repeat(2, 29), true), repeat(3, 31), true), repeat(4, 30), true), repeat(5, 31), true), repeat(6, 30), true), repeat(7, 31), true), repeat(8, 31), true), repeat(9, 30), true), repeat(10, 31), true), repeat(11, 30), true), repeat(12, 31), true), repeat(1, 7), true);\nvar M28 = range(1, 29);\nvar M29 = range(1, 30);\nvar M30 = range(1, 31);\nvar M31 = range(1, 32);\nvar MDAY366MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], M31, true), M29, true), M31, true), M30, true), M31, true), M30, true), M31, true), M31, true), M30, true), M31, true), M30, true), M31, true), M31.slice(0, 7), true);\nvar MDAY365MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], M31, true), M28, true), M31, true), M30, true), M31, true), M30, true), M31, true), M31, true), M30, true), M31, true), M30, true), M31, true), M31.slice(0, 7), true);\nvar NM28 = range(-28, 0);\nvar NM29 = range(-29, 0);\nvar NM30 = range(-30, 0);\nvar NM31 = range(-31, 0);\nvar NMDAY366MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], NM31, true), NM29, true), NM31, true), NM30, true), NM31, true), NM30, true), NM31, true), NM31, true), NM30, true), NM31, true), NM30, true), NM31, true), NM31.slice(0, 7), true);\nvar NMDAY365MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], NM31, true), NM28, true), NM31, true), NM30, true), NM31, true), NM30, true), NM31, true), NM31, true), NM30, true), NM31, true), NM30, true), NM31, true), NM31.slice(0, 7), true);\nvar M366RANGE = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366];\nvar M365RANGE = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365];\nvar WDAYMASK = (function () {\n var wdaymask = [];\n for (var i = 0; i < 55; i++)\n wdaymask = wdaymask.concat(range(7));\n return wdaymask;\n})();\nexport { WDAYMASK, M365MASK, M365RANGE, M366MASK, M366RANGE, MDAY365MASK, MDAY366MASK, NMDAY365MASK, NMDAY366MASK, };\n//# sourceMappingURL=masks.js.map","import { __assign } from \"tslib\";\nimport { datetime, getWeekday, isLeapYear, toOrdinal } from '../dateutil';\nimport { empty, repeat, pymod, includes } from '../helpers';\nimport { M365MASK, MDAY365MASK, NMDAY365MASK, WDAYMASK, M365RANGE, M366MASK, MDAY366MASK, NMDAY366MASK, M366RANGE, } from '../masks';\nexport function rebuildYear(year, options) {\n var firstyday = datetime(year, 1, 1);\n var yearlen = isLeapYear(year) ? 366 : 365;\n var nextyearlen = isLeapYear(year + 1) ? 366 : 365;\n var yearordinal = toOrdinal(firstyday);\n var yearweekday = getWeekday(firstyday);\n var result = __assign(__assign({ yearlen: yearlen, nextyearlen: nextyearlen, yearordinal: yearordinal, yearweekday: yearweekday }, baseYearMasks(year)), { wnomask: null });\n if (empty(options.byweekno)) {\n return result;\n }\n result.wnomask = repeat(0, yearlen + 7);\n var firstwkst;\n var wyearlen;\n var no1wkst = (firstwkst = pymod(7 - yearweekday + options.wkst, 7));\n if (no1wkst >= 4) {\n no1wkst = 0;\n // Number of days in the year, plus the days we got\n // from last year.\n wyearlen = result.yearlen + pymod(yearweekday - options.wkst, 7);\n }\n else {\n // Number of days in the year, minus the days we\n // left in last year.\n wyearlen = yearlen - no1wkst;\n }\n var div = Math.floor(wyearlen / 7);\n var mod = pymod(wyearlen, 7);\n var numweeks = Math.floor(div + mod / 4);\n for (var j = 0; j < options.byweekno.length; j++) {\n var n = options.byweekno[j];\n if (n < 0) {\n n += numweeks + 1;\n }\n if (!(n > 0 && n <= numweeks)) {\n continue;\n }\n var i = void 0;\n if (n > 1) {\n i = no1wkst + (n - 1) * 7;\n if (no1wkst !== firstwkst) {\n i -= 7 - firstwkst;\n }\n }\n else {\n i = no1wkst;\n }\n for (var k = 0; k < 7; k++) {\n result.wnomask[i] = 1;\n i++;\n if (result.wdaymask[i] === options.wkst)\n break;\n }\n }\n if (includes(options.byweekno, 1)) {\n // Check week number 1 of next year as well\n // orig-TODO : Check -numweeks for next year.\n var i = no1wkst + numweeks * 7;\n if (no1wkst !== firstwkst)\n i -= 7 - firstwkst;\n if (i < yearlen) {\n // If week starts in next year, we\n // don't care about it.\n for (var j = 0; j < 7; j++) {\n result.wnomask[i] = 1;\n i += 1;\n if (result.wdaymask[i] === options.wkst)\n break;\n }\n }\n }\n if (no1wkst) {\n // Check last week number of last year as\n // well. If no1wkst is 0, either the year\n // started on week start, or week number 1\n // got days from last year, so there are no\n // days from last year's last week number in\n // this year.\n var lnumweeks = void 0;\n if (!includes(options.byweekno, -1)) {\n var lyearweekday = getWeekday(datetime(year - 1, 1, 1));\n var lno1wkst = pymod(7 - lyearweekday.valueOf() + options.wkst, 7);\n var lyearlen = isLeapYear(year - 1) ? 366 : 365;\n var weekst = void 0;\n if (lno1wkst >= 4) {\n lno1wkst = 0;\n weekst = lyearlen + pymod(lyearweekday - options.wkst, 7);\n }\n else {\n weekst = yearlen - no1wkst;\n }\n lnumweeks = Math.floor(52 + pymod(weekst, 7) / 4);\n }\n else {\n lnumweeks = -1;\n }\n if (includes(options.byweekno, lnumweeks)) {\n for (var i = 0; i < no1wkst; i++)\n result.wnomask[i] = 1;\n }\n }\n return result;\n}\nfunction baseYearMasks(year) {\n var yearlen = isLeapYear(year) ? 366 : 365;\n var firstyday = datetime(year, 1, 1);\n var wday = getWeekday(firstyday);\n if (yearlen === 365) {\n return {\n mmask: M365MASK,\n mdaymask: MDAY365MASK,\n nmdaymask: NMDAY365MASK,\n wdaymask: WDAYMASK.slice(wday),\n mrange: M365RANGE,\n };\n }\n return {\n mmask: M366MASK,\n mdaymask: MDAY366MASK,\n nmdaymask: NMDAY366MASK,\n wdaymask: WDAYMASK.slice(wday),\n mrange: M366RANGE,\n };\n}\n//# sourceMappingURL=yearinfo.js.map","import { RRule } from '../rrule';\nimport { empty, repeat, pymod } from '../helpers';\nexport function rebuildMonth(year, month, yearlen, mrange, wdaymask, options) {\n var result = {\n lastyear: year,\n lastmonth: month,\n nwdaymask: [],\n };\n var ranges = [];\n if (options.freq === RRule.YEARLY) {\n if (empty(options.bymonth)) {\n ranges = [[0, yearlen]];\n }\n else {\n for (var j = 0; j < options.bymonth.length; j++) {\n month = options.bymonth[j];\n ranges.push(mrange.slice(month - 1, month + 1));\n }\n }\n }\n else if (options.freq === RRule.MONTHLY) {\n ranges = [mrange.slice(month - 1, month + 1)];\n }\n if (empty(ranges)) {\n return result;\n }\n // Weekly frequency won't get here, so we may not\n // care about cross-year weekly periods.\n result.nwdaymask = repeat(0, yearlen);\n for (var j = 0; j < ranges.length; j++) {\n var rang = ranges[j];\n var first = rang[0];\n var last = rang[1] - 1;\n for (var k = 0; k < options.bynweekday.length; k++) {\n var i = void 0;\n var _a = options.bynweekday[k], wday = _a[0], n = _a[1];\n if (n < 0) {\n i = last + (n + 1) * 7;\n i -= pymod(wdaymask[i] - wday, 7);\n }\n else {\n i = first + (n - 1) * 7;\n i += pymod(7 - wdaymask[i] + wday, 7);\n }\n if (first <= i && i <= last)\n result.nwdaymask[i] = 1;\n }\n }\n return result;\n}\n//# sourceMappingURL=monthinfo.js.map","export function easter(y, offset) {\n if (offset === void 0) { offset = 0; }\n var a = y % 19;\n var b = Math.floor(y / 100);\n var c = y % 100;\n var d = Math.floor(b / 4);\n var e = b % 4;\n var f = Math.floor((b + 8) / 25);\n var g = Math.floor((b - f + 1) / 3);\n var h = Math.floor(19 * a + b - d - g + 15) % 30;\n var i = Math.floor(c / 4);\n var k = c % 4;\n var l = Math.floor(32 + 2 * e + 2 * i - h - k) % 7;\n var m = Math.floor((a + 11 * h + 22 * l) / 451);\n var month = Math.floor((h + l - 7 * m + 114) / 31);\n var day = ((h + l - 7 * m + 114) % 31) + 1;\n var date = Date.UTC(y, month - 1, day + offset);\n var yearStart = Date.UTC(y, 0, 1);\n return [Math.ceil((date - yearStart) / (1000 * 60 * 60 * 24))];\n}\n//# sourceMappingURL=easter.js.map","import { notEmpty, repeat, range, isPresent } from '../helpers';\nimport { Frequency } from '../types';\nimport { rebuildYear } from './yearinfo';\nimport { rebuildMonth } from './monthinfo';\nimport { easter } from './easter';\nimport { Time } from '../datetime';\nimport { datetime, sort, toOrdinal } from '../dateutil';\n// =============================================================================\n// Iterinfo\n// =============================================================================\nvar Iterinfo = /** @class */ (function () {\n // eslint-disable-next-line no-empty-function\n function Iterinfo(options) {\n this.options = options;\n }\n Iterinfo.prototype.rebuild = function (year, month) {\n var options = this.options;\n if (year !== this.lastyear) {\n this.yearinfo = rebuildYear(year, options);\n }\n if (notEmpty(options.bynweekday) &&\n (month !== this.lastmonth || year !== this.lastyear)) {\n var _a = this.yearinfo, yearlen = _a.yearlen, mrange = _a.mrange, wdaymask = _a.wdaymask;\n this.monthinfo = rebuildMonth(year, month, yearlen, mrange, wdaymask, options);\n }\n if (isPresent(options.byeaster)) {\n this.eastermask = easter(year, options.byeaster);\n }\n };\n Object.defineProperty(Iterinfo.prototype, \"lastyear\", {\n get: function () {\n return this.monthinfo ? this.monthinfo.lastyear : null;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"lastmonth\", {\n get: function () {\n return this.monthinfo ? this.monthinfo.lastmonth : null;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"yearlen\", {\n get: function () {\n return this.yearinfo.yearlen;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"yearordinal\", {\n get: function () {\n return this.yearinfo.yearordinal;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"mrange\", {\n get: function () {\n return this.yearinfo.mrange;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"wdaymask\", {\n get: function () {\n return this.yearinfo.wdaymask;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"mmask\", {\n get: function () {\n return this.yearinfo.mmask;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"wnomask\", {\n get: function () {\n return this.yearinfo.wnomask;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"nwdaymask\", {\n get: function () {\n return this.monthinfo ? this.monthinfo.nwdaymask : [];\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"nextyearlen\", {\n get: function () {\n return this.yearinfo.nextyearlen;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"mdaymask\", {\n get: function () {\n return this.yearinfo.mdaymask;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"nmdaymask\", {\n get: function () {\n return this.yearinfo.nmdaymask;\n },\n enumerable: false,\n configurable: true\n });\n Iterinfo.prototype.ydayset = function () {\n return [range(this.yearlen), 0, this.yearlen];\n };\n Iterinfo.prototype.mdayset = function (_, month) {\n var start = this.mrange[month - 1];\n var end = this.mrange[month];\n var set = repeat(null, this.yearlen);\n for (var i = start; i < end; i++)\n set[i] = i;\n return [set, start, end];\n };\n Iterinfo.prototype.wdayset = function (year, month, day) {\n // We need to handle cross-year weeks here.\n var set = repeat(null, this.yearlen + 7);\n var i = toOrdinal(datetime(year, month, day)) - this.yearordinal;\n var start = i;\n for (var j = 0; j < 7; j++) {\n set[i] = i;\n ++i;\n if (this.wdaymask[i] === this.options.wkst)\n break;\n }\n return [set, start, i];\n };\n Iterinfo.prototype.ddayset = function (year, month, day) {\n var set = repeat(null, this.yearlen);\n var i = toOrdinal(datetime(year, month, day)) - this.yearordinal;\n set[i] = i;\n return [set, i, i + 1];\n };\n Iterinfo.prototype.htimeset = function (hour, _, second, millisecond) {\n var _this = this;\n var set = [];\n this.options.byminute.forEach(function (minute) {\n set = set.concat(_this.mtimeset(hour, minute, second, millisecond));\n });\n sort(set);\n return set;\n };\n Iterinfo.prototype.mtimeset = function (hour, minute, _, millisecond) {\n var set = this.options.bysecond.map(function (second) { return new Time(hour, minute, second, millisecond); });\n sort(set);\n return set;\n };\n Iterinfo.prototype.stimeset = function (hour, minute, second, millisecond) {\n return [new Time(hour, minute, second, millisecond)];\n };\n Iterinfo.prototype.getdayset = function (freq) {\n switch (freq) {\n case Frequency.YEARLY:\n return this.ydayset.bind(this);\n case Frequency.MONTHLY:\n return this.mdayset.bind(this);\n case Frequency.WEEKLY:\n return this.wdayset.bind(this);\n case Frequency.DAILY:\n return this.ddayset.bind(this);\n default:\n return this.ddayset.bind(this);\n }\n };\n Iterinfo.prototype.gettimeset = function (freq) {\n switch (freq) {\n case Frequency.HOURLY:\n return this.htimeset.bind(this);\n case Frequency.MINUTELY:\n return this.mtimeset.bind(this);\n case Frequency.SECONDLY:\n return this.stimeset.bind(this);\n }\n };\n return Iterinfo;\n}());\nexport default Iterinfo;\n//# sourceMappingURL=index.js.map","import { combine, fromOrdinal, sort } from '../dateutil';\nimport { pymod, isPresent, includes } from '../helpers';\nexport function buildPoslist(bysetpos, timeset, start, end, ii, dayset) {\n var poslist = [];\n for (var j = 0; j < bysetpos.length; j++) {\n var daypos = void 0;\n var timepos = void 0;\n var pos = bysetpos[j];\n if (pos < 0) {\n daypos = Math.floor(pos / timeset.length);\n timepos = pymod(pos, timeset.length);\n }\n else {\n daypos = Math.floor((pos - 1) / timeset.length);\n timepos = pymod(pos - 1, timeset.length);\n }\n var tmp = [];\n for (var k = start; k < end; k++) {\n var val = dayset[k];\n if (!isPresent(val))\n continue;\n tmp.push(val);\n }\n var i = void 0;\n if (daypos < 0) {\n i = tmp.slice(daypos)[0];\n }\n else {\n i = tmp[daypos];\n }\n var time = timeset[timepos];\n var date = fromOrdinal(ii.yearordinal + i);\n var res = combine(date, time);\n // XXX: can this ever be in the array?\n // - compare the actual date instead?\n if (!includes(poslist, res))\n poslist.push(res);\n }\n sort(poslist);\n return poslist;\n}\n//# sourceMappingURL=poslist.js.map","import { freqIsDailyOrGreater } from '../types';\nimport { combine, fromOrdinal, MAXYEAR } from '../dateutil';\nimport Iterinfo from '../iterinfo/index';\nimport { RRule } from '../rrule';\nimport { buildTimeset } from '../parseoptions';\nimport { notEmpty, includes, isPresent } from '../helpers';\nimport { DateWithZone } from '../datewithzone';\nimport { buildPoslist } from './poslist';\nimport { DateTime } from '../datetime';\nexport function iter(iterResult, options) {\n var dtstart = options.dtstart, freq = options.freq, interval = options.interval, until = options.until, bysetpos = options.bysetpos;\n var count = options.count;\n if (count === 0 || interval === 0) {\n return emitResult(iterResult);\n }\n var counterDate = DateTime.fromDate(dtstart);\n var ii = new Iterinfo(options);\n ii.rebuild(counterDate.year, counterDate.month);\n var timeset = makeTimeset(ii, counterDate, options);\n for (;;) {\n var _a = ii.getdayset(freq)(counterDate.year, counterDate.month, counterDate.day), dayset = _a[0], start = _a[1], end = _a[2];\n var filtered = removeFilteredDays(dayset, start, end, ii, options);\n if (notEmpty(bysetpos)) {\n var poslist = buildPoslist(bysetpos, timeset, start, end, ii, dayset);\n for (var j = 0; j < poslist.length; j++) {\n var res = poslist[j];\n if (until && res > until) {\n return emitResult(iterResult);\n }\n if (res >= dtstart) {\n var rezonedDate = rezoneIfNeeded(res, options);\n if (!iterResult.accept(rezonedDate)) {\n return emitResult(iterResult);\n }\n if (count) {\n --count;\n if (!count) {\n return emitResult(iterResult);\n }\n }\n }\n }\n }\n else {\n for (var j = start; j < end; j++) {\n var currentDay = dayset[j];\n if (!isPresent(currentDay)) {\n continue;\n }\n var date = fromOrdinal(ii.yearordinal + currentDay);\n for (var k = 0; k < timeset.length; k++) {\n var time = timeset[k];\n var res = combine(date, time);\n if (until && res > until) {\n return emitResult(iterResult);\n }\n if (res >= dtstart) {\n var rezonedDate = rezoneIfNeeded(res, options);\n if (!iterResult.accept(rezonedDate)) {\n return emitResult(iterResult);\n }\n if (count) {\n --count;\n if (!count) {\n return emitResult(iterResult);\n }\n }\n }\n }\n }\n }\n if (options.interval === 0) {\n return emitResult(iterResult);\n }\n // Handle frequency and interval\n counterDate.add(options, filtered);\n if (counterDate.year > MAXYEAR) {\n return emitResult(iterResult);\n }\n if (!freqIsDailyOrGreater(freq)) {\n timeset = ii.gettimeset(freq)(counterDate.hour, counterDate.minute, counterDate.second, 0);\n }\n ii.rebuild(counterDate.year, counterDate.month);\n }\n}\nfunction isFiltered(ii, currentDay, options) {\n var bymonth = options.bymonth, byweekno = options.byweekno, byweekday = options.byweekday, byeaster = options.byeaster, bymonthday = options.bymonthday, bynmonthday = options.bynmonthday, byyearday = options.byyearday;\n return ((notEmpty(bymonth) && !includes(bymonth, ii.mmask[currentDay])) ||\n (notEmpty(byweekno) && !ii.wnomask[currentDay]) ||\n (notEmpty(byweekday) && !includes(byweekday, ii.wdaymask[currentDay])) ||\n (notEmpty(ii.nwdaymask) && !ii.nwdaymask[currentDay]) ||\n (byeaster !== null && !includes(ii.eastermask, currentDay)) ||\n ((notEmpty(bymonthday) || notEmpty(bynmonthday)) &&\n !includes(bymonthday, ii.mdaymask[currentDay]) &&\n !includes(bynmonthday, ii.nmdaymask[currentDay])) ||\n (notEmpty(byyearday) &&\n ((currentDay < ii.yearlen &&\n !includes(byyearday, currentDay + 1) &&\n !includes(byyearday, -ii.yearlen + currentDay)) ||\n (currentDay >= ii.yearlen &&\n !includes(byyearday, currentDay + 1 - ii.yearlen) &&\n !includes(byyearday, -ii.nextyearlen + currentDay - ii.yearlen)))));\n}\nfunction rezoneIfNeeded(date, options) {\n return new DateWithZone(date, options.tzid).rezonedDate();\n}\nfunction emitResult(iterResult) {\n return iterResult.getValue();\n}\nfunction removeFilteredDays(dayset, start, end, ii, options) {\n var filtered = false;\n for (var dayCounter = start; dayCounter < end; dayCounter++) {\n var currentDay = dayset[dayCounter];\n filtered = isFiltered(ii, currentDay, options);\n if (filtered)\n dayset[currentDay] = null;\n }\n return filtered;\n}\nfunction makeTimeset(ii, counterDate, options) {\n var freq = options.freq, byhour = options.byhour, byminute = options.byminute, bysecond = options.bysecond;\n if (freqIsDailyOrGreater(freq)) {\n return buildTimeset(options);\n }\n if ((freq >= RRule.HOURLY &&\n notEmpty(byhour) &&\n !includes(byhour, counterDate.hour)) ||\n (freq >= RRule.MINUTELY &&\n notEmpty(byminute) &&\n !includes(byminute, counterDate.minute)) ||\n (freq >= RRule.SECONDLY &&\n notEmpty(bysecond) &&\n !includes(bysecond, counterDate.second))) {\n return [];\n }\n return ii.gettimeset(freq)(counterDate.hour, counterDate.minute, counterDate.second, counterDate.millisecond);\n}\n//# sourceMappingURL=index.js.map","import { isValidDate } from './dateutil';\nimport IterResult from './iterresult';\nimport CallbackIterResult from './callbackiterresult';\nimport { fromText, parseText, toText, isFullyConvertible } from './nlp/index';\nimport { Frequency, } from './types';\nimport { parseOptions, initializeOptions } from './parseoptions';\nimport { parseString } from './parsestring';\nimport { optionsToString } from './optionstostring';\nimport { Cache } from './cache';\nimport { Weekday } from './weekday';\nimport { iter } from './iter/index';\n// =============================================================================\n// RRule\n// =============================================================================\nexport var Days = {\n MO: new Weekday(0),\n TU: new Weekday(1),\n WE: new Weekday(2),\n TH: new Weekday(3),\n FR: new Weekday(4),\n SA: new Weekday(5),\n SU: new Weekday(6),\n};\nexport var DEFAULT_OPTIONS = {\n freq: Frequency.YEARLY,\n dtstart: null,\n interval: 1,\n wkst: Days.MO,\n count: null,\n until: null,\n tzid: null,\n bysetpos: null,\n bymonth: null,\n bymonthday: null,\n bynmonthday: null,\n byyearday: null,\n byweekno: null,\n byweekday: null,\n bynweekday: null,\n byhour: null,\n byminute: null,\n bysecond: null,\n byeaster: null,\n};\nexport var defaultKeys = Object.keys(DEFAULT_OPTIONS);\n/**\n *\n * @param {Options?} options - see \n * - The only required option is `freq`, one of RRule.YEARLY, RRule.MONTHLY, ...\n * @constructor\n */\nvar RRule = /** @class */ (function () {\n function RRule(options, noCache) {\n if (options === void 0) { options = {}; }\n if (noCache === void 0) { noCache = false; }\n // RFC string\n this._cache = noCache ? null : new Cache();\n // used by toString()\n this.origOptions = initializeOptions(options);\n var parsedOptions = parseOptions(options).parsedOptions;\n this.options = parsedOptions;\n }\n RRule.parseText = function (text, language) {\n return parseText(text, language);\n };\n RRule.fromText = function (text, language) {\n return fromText(text, language);\n };\n RRule.fromString = function (str) {\n return new RRule(RRule.parseString(str) || undefined);\n };\n RRule.prototype._iter = function (iterResult) {\n return iter(iterResult, this.options);\n };\n RRule.prototype._cacheGet = function (what, args) {\n if (!this._cache)\n return false;\n return this._cache._cacheGet(what, args);\n };\n RRule.prototype._cacheAdd = function (what, value, args) {\n if (!this._cache)\n return;\n return this._cache._cacheAdd(what, value, args);\n };\n /**\n * @param {Function} iterator - optional function that will be called\n * on each date that is added. It can return false\n * to stop the iteration.\n * @return Array containing all recurrences.\n */\n RRule.prototype.all = function (iterator) {\n if (iterator) {\n return this._iter(new CallbackIterResult('all', {}, iterator));\n }\n var result = this._cacheGet('all');\n if (result === false) {\n result = this._iter(new IterResult('all', {}));\n this._cacheAdd('all', result);\n }\n return result;\n };\n /**\n * Returns all the occurrences of the rrule between after and before.\n * The inc keyword defines what happens if after and/or before are\n * themselves occurrences. With inc == True, they will be included in the\n * list, if they are found in the recurrence set.\n *\n * @return Array\n */\n RRule.prototype.between = function (after, before, inc, iterator) {\n if (inc === void 0) { inc = false; }\n if (!isValidDate(after) || !isValidDate(before)) {\n throw new Error('Invalid date passed in to RRule.between');\n }\n var args = {\n before: before,\n after: after,\n inc: inc,\n };\n if (iterator) {\n return this._iter(new CallbackIterResult('between', args, iterator));\n }\n var result = this._cacheGet('between', args);\n if (result === false) {\n result = this._iter(new IterResult('between', args));\n this._cacheAdd('between', result, args);\n }\n return result;\n };\n /**\n * Returns the last recurrence before the given datetime instance.\n * The inc keyword defines what happens if dt is an occurrence.\n * With inc == True, if dt itself is an occurrence, it will be returned.\n *\n * @return Date or null\n */\n RRule.prototype.before = function (dt, inc) {\n if (inc === void 0) { inc = false; }\n if (!isValidDate(dt)) {\n throw new Error('Invalid date passed in to RRule.before');\n }\n var args = { dt: dt, inc: inc };\n var result = this._cacheGet('before', args);\n if (result === false) {\n result = this._iter(new IterResult('before', args));\n this._cacheAdd('before', result, args);\n }\n return result;\n };\n /**\n * Returns the first recurrence after the given datetime instance.\n * The inc keyword defines what happens if dt is an occurrence.\n * With inc == True, if dt itself is an occurrence, it will be returned.\n *\n * @return Date or null\n */\n RRule.prototype.after = function (dt, inc) {\n if (inc === void 0) { inc = false; }\n if (!isValidDate(dt)) {\n throw new Error('Invalid date passed in to RRule.after');\n }\n var args = { dt: dt, inc: inc };\n var result = this._cacheGet('after', args);\n if (result === false) {\n result = this._iter(new IterResult('after', args));\n this._cacheAdd('after', result, args);\n }\n return result;\n };\n /**\n * Returns the number of recurrences in this set. It will have go trough\n * the whole recurrence, if this hasn't been done before.\n */\n RRule.prototype.count = function () {\n return this.all().length;\n };\n /**\n * Converts the rrule into its string representation\n *\n * @see \n * @return String\n */\n RRule.prototype.toString = function () {\n return optionsToString(this.origOptions);\n };\n /**\n * Will convert all rules described in nlp:ToText\n * to text.\n */\n RRule.prototype.toText = function (gettext, language, dateFormatter) {\n return toText(this, gettext, language, dateFormatter);\n };\n RRule.prototype.isFullyConvertibleToText = function () {\n return isFullyConvertible(this);\n };\n /**\n * @return a RRule instance with the same freq and options\n * as this one (cache is not cloned)\n */\n RRule.prototype.clone = function () {\n return new RRule(this.origOptions);\n };\n // RRule class 'constants'\n RRule.FREQUENCIES = [\n 'YEARLY',\n 'MONTHLY',\n 'WEEKLY',\n 'DAILY',\n 'HOURLY',\n 'MINUTELY',\n 'SECONDLY',\n ];\n RRule.YEARLY = Frequency.YEARLY;\n RRule.MONTHLY = Frequency.MONTHLY;\n RRule.WEEKLY = Frequency.WEEKLY;\n RRule.DAILY = Frequency.DAILY;\n RRule.HOURLY = Frequency.HOURLY;\n RRule.MINUTELY = Frequency.MINUTELY;\n RRule.SECONDLY = Frequency.SECONDLY;\n RRule.MO = Days.MO;\n RRule.TU = Days.TU;\n RRule.WE = Days.WE;\n RRule.TH = Days.TH;\n RRule.FR = Days.FR;\n RRule.SA = Days.SA;\n RRule.SU = Days.SU;\n RRule.parseString = parseString;\n RRule.optionsToString = optionsToString;\n return RRule;\n}());\nexport { RRule };\n//# sourceMappingURL=rrule.js.map","import { DateWithZone } from './datewithzone';\nimport { iter } from './iter';\nimport { sort } from './dateutil';\nexport function iterSet(iterResult, _rrule, _exrule, _rdate, _exdate, tzid) {\n var _exdateHash = {};\n var _accept = iterResult.accept;\n function evalExdate(after, before) {\n _exrule.forEach(function (rrule) {\n rrule.between(after, before, true).forEach(function (date) {\n _exdateHash[Number(date)] = true;\n });\n });\n }\n _exdate.forEach(function (date) {\n var zonedDate = new DateWithZone(date, tzid).rezonedDate();\n _exdateHash[Number(zonedDate)] = true;\n });\n iterResult.accept = function (date) {\n var dt = Number(date);\n if (isNaN(dt))\n return _accept.call(this, date);\n if (!_exdateHash[dt]) {\n evalExdate(new Date(dt - 1), new Date(dt + 1));\n if (!_exdateHash[dt]) {\n _exdateHash[dt] = true;\n return _accept.call(this, date);\n }\n }\n return true;\n };\n if (iterResult.method === 'between') {\n evalExdate(iterResult.args.after, iterResult.args.before);\n iterResult.accept = function (date) {\n var dt = Number(date);\n if (!_exdateHash[dt]) {\n _exdateHash[dt] = true;\n return _accept.call(this, date);\n }\n return true;\n };\n }\n for (var i = 0; i < _rdate.length; i++) {\n var zonedDate = new DateWithZone(_rdate[i], tzid).rezonedDate();\n if (!iterResult.accept(new Date(zonedDate.getTime())))\n break;\n }\n _rrule.forEach(function (rrule) {\n iter(iterResult, rrule.options);\n });\n var res = iterResult._result;\n sort(res);\n switch (iterResult.method) {\n case 'all':\n case 'between':\n return res;\n case 'before':\n return ((res.length && res[res.length - 1]) || null);\n case 'after':\n default:\n return ((res.length && res[0]) || null);\n }\n}\n//# sourceMappingURL=iterset.js.map","import { __assign } from \"tslib\";\nimport { RRule } from './rrule';\nimport { RRuleSet } from './rruleset';\nimport { untilStringToDate } from './dateutil';\nimport { includes, split } from './helpers';\nimport { parseString, parseDtstart } from './parsestring';\n/**\n * RRuleStr\n * To parse a set of rrule strings\n */\nvar DEFAULT_OPTIONS = {\n dtstart: null,\n cache: false,\n unfold: false,\n forceset: false,\n compatible: false,\n tzid: null,\n};\nexport function parseInput(s, options) {\n var rrulevals = [];\n var rdatevals = [];\n var exrulevals = [];\n var exdatevals = [];\n var parsedDtstart = parseDtstart(s);\n var dtstart = parsedDtstart.dtstart;\n var tzid = parsedDtstart.tzid;\n var lines = splitIntoLines(s, options.unfold);\n lines.forEach(function (line) {\n var _a;\n if (!line)\n return;\n var _b = breakDownLine(line), name = _b.name, parms = _b.parms, value = _b.value;\n switch (name.toUpperCase()) {\n case 'RRULE':\n if (parms.length) {\n throw new Error(\"unsupported RRULE parm: \".concat(parms.join(',')));\n }\n rrulevals.push(parseString(line));\n break;\n case 'RDATE':\n var _c = (_a = /RDATE(?:;TZID=([^:=]+))?/i.exec(line)) !== null && _a !== void 0 ? _a : [], rdateTzid = _c[1];\n if (rdateTzid && !tzid) {\n tzid = rdateTzid;\n }\n rdatevals = rdatevals.concat(parseRDate(value, parms));\n break;\n case 'EXRULE':\n if (parms.length) {\n throw new Error(\"unsupported EXRULE parm: \".concat(parms.join(',')));\n }\n exrulevals.push(parseString(value));\n break;\n case 'EXDATE':\n exdatevals = exdatevals.concat(parseRDate(value, parms));\n break;\n case 'DTSTART':\n break;\n default:\n throw new Error('unsupported property: ' + name);\n }\n });\n return {\n dtstart: dtstart,\n tzid: tzid,\n rrulevals: rrulevals,\n rdatevals: rdatevals,\n exrulevals: exrulevals,\n exdatevals: exdatevals,\n };\n}\nfunction buildRule(s, options) {\n var _a = parseInput(s, options), rrulevals = _a.rrulevals, rdatevals = _a.rdatevals, exrulevals = _a.exrulevals, exdatevals = _a.exdatevals, dtstart = _a.dtstart, tzid = _a.tzid;\n var noCache = options.cache === false;\n if (options.compatible) {\n options.forceset = true;\n options.unfold = true;\n }\n if (options.forceset ||\n rrulevals.length > 1 ||\n rdatevals.length ||\n exrulevals.length ||\n exdatevals.length) {\n var rset_1 = new RRuleSet(noCache);\n rset_1.dtstart(dtstart);\n rset_1.tzid(tzid || undefined);\n rrulevals.forEach(function (val) {\n rset_1.rrule(new RRule(groomRruleOptions(val, dtstart, tzid), noCache));\n });\n rdatevals.forEach(function (date) {\n rset_1.rdate(date);\n });\n exrulevals.forEach(function (val) {\n rset_1.exrule(new RRule(groomRruleOptions(val, dtstart, tzid), noCache));\n });\n exdatevals.forEach(function (date) {\n rset_1.exdate(date);\n });\n if (options.compatible && options.dtstart)\n rset_1.rdate(dtstart);\n return rset_1;\n }\n var val = rrulevals[0] || {};\n return new RRule(groomRruleOptions(val, val.dtstart || options.dtstart || dtstart, val.tzid || options.tzid || tzid), noCache);\n}\nexport function rrulestr(s, options) {\n if (options === void 0) { options = {}; }\n return buildRule(s, initializeOptions(options));\n}\nfunction groomRruleOptions(val, dtstart, tzid) {\n return __assign(__assign({}, val), { dtstart: dtstart, tzid: tzid });\n}\nfunction initializeOptions(options) {\n var invalid = [];\n var keys = Object.keys(options);\n var defaultKeys = Object.keys(DEFAULT_OPTIONS);\n keys.forEach(function (key) {\n if (!includes(defaultKeys, key))\n invalid.push(key);\n });\n if (invalid.length) {\n throw new Error('Invalid options: ' + invalid.join(', '));\n }\n return __assign(__assign({}, DEFAULT_OPTIONS), options);\n}\nfunction extractName(line) {\n if (line.indexOf(':') === -1) {\n return {\n name: 'RRULE',\n value: line,\n };\n }\n var _a = split(line, ':', 1), name = _a[0], value = _a[1];\n return {\n name: name,\n value: value,\n };\n}\nfunction breakDownLine(line) {\n var _a = extractName(line), name = _a.name, value = _a.value;\n var parms = name.split(';');\n if (!parms)\n throw new Error('empty property name');\n return {\n name: parms[0].toUpperCase(),\n parms: parms.slice(1),\n value: value,\n };\n}\nfunction splitIntoLines(s, unfold) {\n if (unfold === void 0) { unfold = false; }\n s = s && s.trim();\n if (!s)\n throw new Error('Invalid empty string');\n // More info about 'unfold' option\n // Go head to http://www.ietf.org/rfc/rfc2445.txt\n if (!unfold) {\n return s.split(/\\s/);\n }\n var lines = s.split('\\n');\n var i = 0;\n while (i < lines.length) {\n // TODO\n var line = (lines[i] = lines[i].replace(/\\s+$/g, ''));\n if (!line) {\n lines.splice(i, 1);\n }\n else if (i > 0 && line[0] === ' ') {\n lines[i - 1] += line.slice(1);\n lines.splice(i, 1);\n }\n else {\n i += 1;\n }\n }\n return lines;\n}\nfunction validateDateParm(parms) {\n parms.forEach(function (parm) {\n if (!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(parm)) {\n throw new Error('unsupported RDATE/EXDATE parm: ' + parm);\n }\n });\n}\nfunction parseRDate(rdateval, parms) {\n validateDateParm(parms);\n return rdateval.split(',').map(function (datestr) { return untilStringToDate(datestr); });\n}\n//# sourceMappingURL=rrulestr.js.map","import { __extends } from \"tslib\";\nimport { RRule } from './rrule';\nimport { sort, timeToUntilString } from './dateutil';\nimport { includes } from './helpers';\nimport { iterSet } from './iterset';\nimport { rrulestr } from './rrulestr';\nimport { optionsToString } from './optionstostring';\nfunction createGetterSetter(fieldName) {\n var _this = this;\n return function (field) {\n if (field !== undefined) {\n _this[\"_\".concat(fieldName)] = field;\n }\n if (_this[\"_\".concat(fieldName)] !== undefined) {\n return _this[\"_\".concat(fieldName)];\n }\n for (var i = 0; i < _this._rrule.length; i++) {\n var field_1 = _this._rrule[i].origOptions[fieldName];\n if (field_1) {\n return field_1;\n }\n }\n };\n}\nvar RRuleSet = /** @class */ (function (_super) {\n __extends(RRuleSet, _super);\n /**\n *\n * @param {Boolean?} noCache\n * The same stratagy as RRule on cache, default to false\n * @constructor\n */\n function RRuleSet(noCache) {\n if (noCache === void 0) { noCache = false; }\n var _this = _super.call(this, {}, noCache) || this;\n _this.dtstart = createGetterSetter.apply(_this, ['dtstart']);\n _this.tzid = createGetterSetter.apply(_this, ['tzid']);\n _this._rrule = [];\n _this._rdate = [];\n _this._exrule = [];\n _this._exdate = [];\n return _this;\n }\n RRuleSet.prototype._iter = function (iterResult) {\n return iterSet(iterResult, this._rrule, this._exrule, this._rdate, this._exdate, this.tzid());\n };\n /**\n * Adds an RRule to the set\n *\n * @param {RRule}\n */\n RRuleSet.prototype.rrule = function (rrule) {\n _addRule(rrule, this._rrule);\n };\n /**\n * Adds an EXRULE to the set\n *\n * @param {RRule}\n */\n RRuleSet.prototype.exrule = function (rrule) {\n _addRule(rrule, this._exrule);\n };\n /**\n * Adds an RDate to the set\n *\n * @param {Date}\n */\n RRuleSet.prototype.rdate = function (date) {\n _addDate(date, this._rdate);\n };\n /**\n * Adds an EXDATE to the set\n *\n * @param {Date}\n */\n RRuleSet.prototype.exdate = function (date) {\n _addDate(date, this._exdate);\n };\n /**\n * Get list of included rrules in this recurrence set.\n *\n * @return List of rrules\n */\n RRuleSet.prototype.rrules = function () {\n return this._rrule.map(function (e) { return rrulestr(e.toString()); });\n };\n /**\n * Get list of excluded rrules in this recurrence set.\n *\n * @return List of exrules\n */\n RRuleSet.prototype.exrules = function () {\n return this._exrule.map(function (e) { return rrulestr(e.toString()); });\n };\n /**\n * Get list of included datetimes in this recurrence set.\n *\n * @return List of rdates\n */\n RRuleSet.prototype.rdates = function () {\n return this._rdate.map(function (e) { return new Date(e.getTime()); });\n };\n /**\n * Get list of included datetimes in this recurrence set.\n *\n * @return List of exdates\n */\n RRuleSet.prototype.exdates = function () {\n return this._exdate.map(function (e) { return new Date(e.getTime()); });\n };\n RRuleSet.prototype.valueOf = function () {\n var result = [];\n if (!this._rrule.length && this._dtstart) {\n result = result.concat(optionsToString({ dtstart: this._dtstart }));\n }\n this._rrule.forEach(function (rrule) {\n result = result.concat(rrule.toString().split('\\n'));\n });\n this._exrule.forEach(function (exrule) {\n result = result.concat(exrule\n .toString()\n .split('\\n')\n .map(function (line) { return line.replace(/^RRULE:/, 'EXRULE:'); })\n .filter(function (line) { return !/^DTSTART/.test(line); }));\n });\n if (this._rdate.length) {\n result.push(rdatesToString('RDATE', this._rdate, this.tzid()));\n }\n if (this._exdate.length) {\n result.push(rdatesToString('EXDATE', this._exdate, this.tzid()));\n }\n return result;\n };\n /**\n * to generate recurrence field such as:\n * DTSTART:19970902T010000Z\n * RRULE:FREQ=YEARLY;COUNT=2;BYDAY=TU\n * RRULE:FREQ=YEARLY;COUNT=1;BYDAY=TH\n */\n RRuleSet.prototype.toString = function () {\n return this.valueOf().join('\\n');\n };\n /**\n * Create a new RRuleSet Object completely base on current instance\n */\n RRuleSet.prototype.clone = function () {\n var rrs = new RRuleSet(!!this._cache);\n this._rrule.forEach(function (rule) { return rrs.rrule(rule.clone()); });\n this._exrule.forEach(function (rule) { return rrs.exrule(rule.clone()); });\n this._rdate.forEach(function (date) { return rrs.rdate(new Date(date.getTime())); });\n this._exdate.forEach(function (date) { return rrs.exdate(new Date(date.getTime())); });\n return rrs;\n };\n return RRuleSet;\n}(RRule));\nexport { RRuleSet };\nfunction _addRule(rrule, collection) {\n if (!(rrule instanceof RRule)) {\n throw new TypeError(String(rrule) + ' is not RRule instance');\n }\n if (!includes(collection.map(String), String(rrule))) {\n collection.push(rrule);\n }\n}\nfunction _addDate(date, collection) {\n if (!(date instanceof Date)) {\n throw new TypeError(String(date) + ' is not Date instance');\n }\n if (!includes(collection.map(Number), Number(date))) {\n collection.push(date);\n sort(collection);\n }\n}\nfunction rdatesToString(param, rdates, tzid) {\n var isUTC = !tzid || tzid.toUpperCase() === 'UTC';\n var header = isUTC ? \"\".concat(param, \":\") : \"\".concat(param, \";TZID=\").concat(tzid, \":\");\n var dateString = rdates\n .map(function (rdate) { return timeToUntilString(rdate.valueOf(), isUTC); })\n .join(',');\n return \"\".concat(header).concat(dateString);\n}\n//# sourceMappingURL=rruleset.js.map","import { RRule, rrulestr } from 'rrule';\r\n\r\nexport default function (scheduler) {\r\n\r\n\tfunction clearMilliseconds(date) {\r\n\t\treturn new Date(\r\n\t\t\tdate.getFullYear(),\r\n\t\t\tdate.getMonth(),\r\n\t\t\tdate.getDate(),\r\n\t\t\tdate.getHours(),\r\n\t\t\tdate.getMinutes(),\r\n\t\t\tdate.getSeconds(),\r\n\t\t\t0\r\n\t\t);\r\n\t}\r\n\r\n\tfunction isDeletedOccurrence(event) {\r\n\t\treturn !!event.deleted;\r\n\t}\r\n\r\n\tfunction isSeries(event) {\r\n\t\treturn !!event.rrule && !event.recurring_event_id;\r\n\t}\r\n\r\n\tfunction clearRecurringProperties(event) {\r\n\t\tevent.rrule = \"\";\r\n\t\tevent.original_start = null;\r\n\t\tevent.recurring_event_id = null;\r\n\t\tevent.duration = null;\r\n\t\tevent.deleted = null;\r\n\t}\r\n\r\n\tfunction createException(ev) {\r\n\t\tlet id = ev.id.split(\"#\");\r\n\r\n\t\tlet nid = scheduler.uid();\r\n\t\tscheduler._not_render = true;\r\n\t\tlet nev = scheduler._copy_event(ev);\r\n\t\tnev.id = nid;\r\n\t\tnev.recurring_event_id = id[0];\r\n\r\n\t\tlet timestamp = id[1];\r\n\r\n\t\tnev.original_start = new Date(Number(timestamp));\r\n\r\n\t\tscheduler._add_rec_marker(nev, timestamp);\r\n\t\tscheduler.addEvent(nev);\r\n\t\tscheduler._not_render = false;\r\n\t}\r\n\r\n\tscheduler._rec_temp = [];\r\n\tscheduler._rec_markers_pull = {};\r\n\tscheduler._rec_markers = {};\r\n\tscheduler._add_rec_marker = function (ev, time) {\r\n\t\tev._pid_time = time;\r\n\t\tthis._rec_markers[ev.id] = ev;\r\n\t\tif (!this._rec_markers_pull[ev.event_pid]) this._rec_markers_pull[ev.event_pid] = {};\r\n\t\tthis._rec_markers_pull[ev.event_pid][time] = ev;\r\n\t};\r\n\tscheduler._get_rec_marker = function (time, id) {\r\n\t\tlet ch = this._rec_markers_pull[id];\r\n\t\tif (ch) return ch[time];\r\n\t\treturn null;\r\n\t};\r\n\tscheduler._get_rec_markers = function (id) {\r\n\t\treturn (this._rec_markers_pull[id] || []);\r\n\t};\r\n\r\n\t(function () {\r\n\t\tvar old_add_event = scheduler.addEvent;\r\n\t\tscheduler.addEvent = function (start_date, end_date, text, id, extra_data) {\r\n\t\t\tvar ev_id = old_add_event.apply(this, arguments);\r\n\r\n\t\t\tif (ev_id && scheduler.getEvent(ev_id)) {\r\n\t\t\t\tvar ev = scheduler.getEvent(ev_id);\r\n\r\n\t\t\t\tif (ev.start_date) {\r\n\t\t\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t\t\t}\r\n\t\t\t\tif (ev.end_date) {\r\n\t\t\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn ev_id;\r\n\t\t};\r\n\t})();\r\n\r\n\tscheduler.attachEvent(\"onEventLoading\", function (event) {\r\n\r\n\t\tif (event.original_start) {\r\n\t\t\tevent.original_start = scheduler.templates.parse_date(event.original_start);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventIdChange\", function (id, new_id) {\r\n\t\tif (this._ignore_call) return;\r\n\t\tthis._ignore_call = true;\r\n\r\n\t\tif (scheduler._rec_markers[id]) {\r\n\t\t\t//important for for correct work of scheduler.getEvents(from, to) and collision detection\r\n\t\t\tscheduler._rec_markers[new_id] = scheduler._rec_markers[id];\r\n\t\t\tdelete scheduler._rec_markers[id];\r\n\t\t}\r\n\r\n\t\tif (scheduler._rec_markers_pull[id]) {\r\n\t\t\tscheduler._rec_markers_pull[new_id] = scheduler._rec_markers_pull[id];\r\n\t\t\tdelete scheduler._rec_markers_pull[id];\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < this._rec_temp.length; i++) {\r\n\t\t\tvar tev = this._rec_temp[i];\r\n\t\t\tif (tev.recurring_event_id == id) {\r\n\t\t\t\ttev.recurring_event_id = new_id;\r\n\t\t\t\tthis.changeEventId(tev.id, new_id + \"#\" + tev.id.split(\"#\")[1]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (var i in this._rec_markers) {\r\n\t\t\tvar tev = this._rec_markers[i];\r\n\t\t\tif (tev.recurring_event_id == id) {\r\n\t\t\t\ttev.recurring_event_id = new_id;\r\n\t\t\t\ttev._pid_changed = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar el = scheduler._rec_markers[new_id];\r\n\t\tif (el && el._pid_changed) {\r\n\t\t\tdelete el._pid_changed;\r\n\t\t\tsetTimeout(function () {\r\n\t\t\t\tif (scheduler.$destroyed) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tscheduler.callEvent(\"onEventChanged\", [new_id, scheduler.getEvent(new_id)]);\r\n\t\t\t}, 1);\r\n\t\t}\r\n\r\n\t\tdelete this._ignore_call;\r\n\t});\r\n\r\n\tfunction deleteEventFromSeries(idTimestamp, ev) {\r\n\t\tlet id = idTimestamp;\r\n\t\tidTimestamp = id.split(\"#\");\r\n\t\tlet nid = scheduler.uid();\r\n\t\tlet tid = (idTimestamp[1]) ? idTimestamp[1] : (ev._pid_time);\r\n\t\tlet nev = scheduler._copy_event(ev);\r\n\t\tnev.id = nid;\r\n\t\tnev.recurring_event_id = ev.recurring_event_id || idTimestamp[0];\r\n\t\tnev.original_start = new Date(Number(tid));\r\n\t\tnev.deleted = true;\r\n\t\tscheduler.addEvent(nev);\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function (id) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (this._is_virtual_event(id) || (this._is_modified_occurence(ev) && !isDeletedOccurrence(ev))) {\r\n\t\t\tdeleteEventFromSeries(id, ev);\r\n\t\t} else {\r\n\t\t\tif (isSeries(ev) && this._lightbox_id)\r\n\t\t\t\tthis._roll_back_dates(ev);\r\n\r\n\r\n\t\t\tvar sub = this._get_rec_markers(id);\r\n\t\t\tfor (var i in sub) {\r\n\t\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\t\tid = sub[i].id;\r\n\t\t\t\t\tif (this.getEvent(id))\r\n\t\t\t\t\t\tthis.deleteEvent(id, true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function (id, ev) {\r\n\t\tif (!this._is_virtual_event(id) && this._is_modified_occurence(ev)) {\r\n\t\t\tif (!scheduler._events[id]) {\r\n\t\t\t\tev.deleted = true;\r\n\t\t\t\tthis.setEvent(id, ev);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\", function (id, event) {\r\n\t\tif (this._loading) return true;\r\n\r\n\t\tvar ev = this.getEvent(id);\r\n\r\n\t\tif (this._is_virtual_event(id)) {\r\n\t\t\tcreateException(ev);\r\n\r\n\t\t} else {\r\n\t\t\tif (ev.start_date) {\r\n\t\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t\t}\r\n\t\t\tif (ev.end_date) {\r\n\t\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t\t}\r\n\r\n\t\t\tif (isSeries(ev) && this._lightbox_id) {\r\n\t\t\t\tthis._roll_back_dates(ev);\r\n\t\t\t\t//scheduler.recurrings.rollbackDates(ev);\r\n\t\t\t}\r\n\r\n\t\t\tvar sub = this._get_rec_markers(id);\r\n\t\t\tfor (var i in sub) {\r\n\t\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\t\tdelete this._rec_markers[sub[i].id];\r\n\t\t\t\t\tthis.deleteEvent(sub[i].id, true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tdelete this._rec_markers_pull[id];\r\n\r\n\t\t\t// it's possible that after editing event is no longer exists, in such case we need to remove _select_id flag\r\n\t\t\tvar isEventFound = false;\r\n\t\t\tfor (var k = 0; k < this._rendered.length; k++) {\r\n\t\t\t\tif (this._rendered[k].getAttribute(this.config.event_attribute) == id)\r\n\t\t\t\t\tisEventFound = true;\r\n\t\t\t}\r\n\t\t\tif (!isEventFound)\r\n\t\t\t\tthis._select_id = null;\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventAdded\", function (id) {\r\n\t\tif (!this._loading) {\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif (isSeries(ev)) {\r\n\t\t\t\tthis._roll_back_dates(ev);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventSave\", function (id, data, is_new_event) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (isSeries(ev))\r\n\t\t\tthis._select_id = null;\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventCreated\", function (id) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (!isSeries(ev)) {\r\n\t\t\tclearRecurringProperties(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventCancel\", function (id) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (isSeries(ev)) {\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t\t// a bit expensive, but we need to be sure that event re-rendered, because view can be corrupted by resize , during edit process\r\n\t\t\tthis.render_view_data();\r\n\t\t}\r\n\t});\r\n\tscheduler._roll_back_dates = function (ev) {\r\n\t\t//// !!!!! calc temp properties\r\n\t\tif (ev.start_date) {\r\n\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t}\r\n\t\tif (ev.end_date) {\r\n\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t}\r\n\r\n\t\tev.duration = Math.round((ev.end_date.valueOf() - ev.start_date.valueOf()) / 1000);\r\n\t\tev.end_date = ev._end_date;\r\n\t\tif (ev._start_date) {\r\n\t\t\tev.start_date.setMonth(0);\r\n\t\t\tev.start_date.setDate(ev._start_date.getDate());\r\n\t\t\tev.start_date.setMonth(ev._start_date.getMonth());\r\n\t\t\tev.start_date.setFullYear(ev._start_date.getFullYear());\r\n\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._is_virtual_event = function (id) {\r\n\t\treturn id.toString().indexOf(\"#\") != -1;\r\n\t};\r\n\tscheduler._is_modified_occurence = function (ev) {\r\n\t\treturn (ev.recurring_event_id && ev.recurring_event_id != \"0\");\r\n\t};\r\n\r\n\tscheduler.showLightbox_rec = scheduler.showLightbox;\r\n\tscheduler.showLightbox = function (id) {\r\n\t\tvar locale = this.locale;\r\n\t\tvar c = scheduler.config.lightbox_recurring;\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tvar pid = ev.recurring_event_id;\r\n\t\tvar isVirtual = this._is_virtual_event(id);\r\n\t\tif (isVirtual)\r\n\t\t\tpid = id.split(\"#\")[0];\r\n\r\n\t\t// show series\r\n\t\tvar showSeries = function (id) {\r\n\t\t\tvar event = scheduler.getEvent(id);\r\n\t\t\tevent._end_date = event.end_date;\r\n\t\t\tevent.end_date = new Date(event.start_date.valueOf() + event.duration * 1000);\r\n\t\t\treturn scheduler.showLightbox_rec(id); // editing series\r\n\t\t};\r\n\r\n\t\tif ((pid || pid * 1 === 0) && isSeries(ev)) {\r\n\t\t\t// direct API call on series id\r\n\t\t\treturn showSeries(id);\r\n\t\t}\r\n\t\tif (!pid || pid === '0' || ((!locale.labels.confirm_recurring || c == 'instance') || (c == 'series' && !isVirtual))) {\r\n\t\t\t// editing instance or non recurring event\r\n\t\t\treturn this.showLightbox_rec(id);\r\n\t\t}\r\n\t\tif (c == 'ask') {\r\n\t\t\tvar that = this;\r\n\t\t\tscheduler.modalbox({\r\n\t\t\t\ttext: locale.labels.confirm_recurring,\r\n\t\t\t\ttitle: locale.labels.title_confirm_recurring,\r\n\t\t\t\twidth: \"500px\",\r\n\t\t\t\tposition: \"middle\",\r\n\t\t\t\tbuttons: [locale.labels.button_edit_series, locale.labels.button_edit_occurrence, locale.labels.icon_cancel],\r\n\t\t\t\tcallback: function (index) {\r\n\t\t\t\t\tswitch (+index) {\r\n\t\t\t\t\t\tcase 0:\r\n\t\t\t\t\t\t\treturn showSeries(pid);\r\n\t\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\t\treturn that.showLightbox_rec(id);\r\n\t\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tshowSeries(pid);\r\n\t\t}\r\n\t};\r\n\r\n\tfunction groupExceptions() {\r\n\t\tconst exceptions = {};\r\n\t\tfor (const i in scheduler._events) {\r\n\t\t\tconst ev = scheduler._events[i];\r\n\t\t\tif (ev.recurring_event_id) {\r\n\t\t\t\tif (!exceptions[ev.recurring_event_id]) {\r\n\t\t\t\t\texceptions[ev.recurring_event_id] = {};\r\n\t\t\t\t}\r\n\t\t\t\texceptions[ev.recurring_event_id][ev.original_start.valueOf()] = ev;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn exceptions;\r\n\t}\r\n\r\n\tscheduler.get_visible_events_rec = scheduler.get_visible_events;\r\n\tscheduler.get_visible_events = function (only_timed) {\r\n\t\tfor (var i = 0; i < this._rec_temp.length; i++)\r\n\t\t\tdelete this._events[this._rec_temp[i].id];\r\n\t\tthis._rec_temp = [];\r\n\r\n\t\tconst exceptions = groupExceptions();\r\n\t\tvar stack = this.get_visible_events_rec(only_timed);\r\n\t\tvar out = [];\r\n\t\tfor (var i = 0; i < stack.length; i++) {\r\n\t\t\tif (stack[i].deleted || stack[i].recurring_event_id) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif (isSeries(stack[i])) {\r\n\t\t\t\tthis.repeat_date(stack[i], out, undefined, undefined, undefined, undefined, exceptions);\r\n\t\t\t} else {\r\n\t\t\t\tout.push(stack[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn out;\r\n\t};\r\n\r\n\t(function () {\r\n\t\tvar old = scheduler.isOneDayEvent;\r\n\t\tscheduler.isOneDayEvent = function (ev) {\r\n\t\t\tif (isSeries(ev)) return true;\r\n\t\t\treturn old.call(this, ev);\r\n\t\t};\r\n\t\tvar old_update_event = scheduler.updateEvent;\r\n\t\tscheduler.updateEvent = function (id) {\r\n\t\t\tvar ev = scheduler.getEvent(id);\r\n\r\n\t\t\tif (ev && isSeries(ev) && !this._is_virtual_event(id)) {\r\n\t\t\t\tscheduler.update_view();\r\n\t\t\t} else {\r\n\t\t\t\told_update_event.call(this, id);\r\n\t\t\t}\r\n\t\t};\r\n\t})();\r\n\r\n\tconst toIcalString = scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\");\r\n\r\n\tscheduler.repeat_date = function (ev, stack, non_render, from, to, maxCount, exceptions) {\r\n\t\tif (!ev.rrule) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tlet seriesExceptions = exceptions ? exceptions[ev.id] : groupExceptions()[ev.id];\r\n\t\tif (!seriesExceptions) {\r\n\t\t\tseriesExceptions = {};\r\n\t\t}\r\n\r\n\t\tif (!from) {\r\n\t\t\tfrom = scheduler._min_date;\r\n\t\t}\r\n\t\tif (!to) {\r\n\t\t\tto = scheduler._max_date;\r\n\t\t}\r\n\r\n\t\tconst utcStart = new Date(Date.UTC(ev.start_date.getFullYear(), ev.start_date.getMonth(), ev.start_date.getDate(), ev.start_date.getHours(), ev.start_date.getMinutes(), ev.start_date.getSeconds()));\r\n\t\tlet parsedRRule;\r\n\t\tif (maxCount){\r\n\t\t\t// for getRecDates() method\r\n\t\t\tparsedRRule = rrulestr(`RRULE:${ev.rrule};UNTIL=${toIcalString(ev.end_date)};COUNT=${maxCount}`, { dtstart: utcStart });\r\n\t\t} else {\r\n\t\t\tparsedRRule = rrulestr(`RRULE:${ev.rrule};UNTIL=${toIcalString(ev.end_date)}`, { dtstart: utcStart/*ev.start_date*/ });\r\n\t\t}\r\n\t\t// `from` is already in UTC from `dtstart: utcStart`\r\n\t\tconst utcTo = new Date(Date.UTC(to.getFullYear(), to.getMonth(), to.getDate(), to.getHours(), to.getMinutes(), to.getSeconds())); \r\n\t\tconst repeatedDates = parsedRRule.between(from, utcTo).map(date => {\r\n\t\t\tconst adjustedDate = new Date(date);\r\n\t\t\tadjustedDate.setHours(ev.start_date.getHours());\r\n\t\t\tadjustedDate.setMinutes(ev.start_date.getMinutes());\r\n\t\t\tadjustedDate.setSeconds(ev.start_date.getSeconds());\r\n\t\t\treturn adjustedDate;\r\n\t\t});\r\n\t\tlet visibleCount = 0;\r\n\r\n\t\tconst eventDuration = ev.duration;\r\n\r\n\t\tfor (let i = 0; i < repeatedDates.length; i++) {\r\n\t\t\tif (maxCount && visibleCount >= maxCount) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tconst date = repeatedDates[i];\r\n\r\n\t\t\tlet exception = seriesExceptions[date.valueOf()];\r\n\t\t\tif (exception) {\r\n\t\t\t\tif (exception.deleted) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvisibleCount++;\r\n\t\t\t\t\tstack.push(exception);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tconst copy = scheduler._copy_event(ev);\r\n\t\t\t\t//copy._timed = ev._timed;\r\n\t\t\t\tcopy.text = ev.text;\r\n\t\t\t\tcopy.start_date = date;\r\n\t\t\t\tcopy.id = ev.id + \"#\" + Math.ceil(date.valueOf());\r\n\t\t\t\tcopy.end_date = new Date(date.valueOf() + eventDuration * 1000);\r\n\t\t\t\tcopy.end_date = scheduler._fix_daylight_saving_date(copy.start_date, copy.end_date, ev, date, copy.end_date);\r\n\t\t\t\tcopy._timed = scheduler.isOneDayEvent(copy);\r\n\r\n\r\n\r\n\t\t\t\tif (!copy._timed && !scheduler._table_view && !scheduler.config.multi_day) continue;\r\n\t\t\t\tstack.push(copy);\r\n\r\n\t\t\t\tif (!non_render) {\r\n\t\t\t\t\tscheduler._events[copy.id] = copy;\r\n\t\t\t\t\tscheduler._rec_temp.push(copy);\r\n\t\t\t\t}\r\n\t\t\t\tvisibleCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//GS-2534: case when exceptions have different dates\r\n\t\tif (seriesExceptions && repeatedDates.length == 0 ){\r\n\t\t\tfor (let a in seriesExceptions){\r\n\t\t\t\tlet exception = seriesExceptions[a];\r\n\t\t\t\tif (exception) {\r\n\t\t\t\t\tif(exception.deleted){\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\telse if (from && to && exception.start_date < to && exception.end_date > from) {\r\n\t\t\t\t\t\tstack.push(exception);\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t} \r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._fix_daylight_saving_date = function (start_date, end_date, ev, counter, default_date) {\r\n\t\tvar shift = start_date.getTimezoneOffset() - end_date.getTimezoneOffset();\r\n\t\tif (shift) {\r\n\t\t\tif (shift > 0) {\r\n\t\t\t\t// e.g. 24h -> 23h\r\n\t\t\t\treturn new Date(counter.valueOf() + ev.duration * 1000 - shift * 60 * 1000);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t// e.g. 24h -> 25h\r\n\t\t\t\treturn new Date(end_date.valueOf() - shift * 60 * 1000);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new Date(default_date.valueOf());\r\n\t};\r\n\tscheduler.getRecDates = function (id, max) {\r\n\t\tvar ev = typeof id == \"object\" ? id : scheduler.getEvent(id);\r\n\t\tvar recurrings = [];\r\n\t\tmax = max || 100;\r\n\r\n\t\tif (!isSeries(ev)) {\r\n\t\t\treturn [\r\n\t\t\t\t{ start_date: ev.start_date, end_date: ev.end_date }\r\n\t\t\t];\r\n\t\t}\r\n\t\tif (ev.deleted) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tscheduler.repeat_date(ev, recurrings, true, ev.start_date, ev.end_date, max);\r\n\r\n\t\tvar result = [];\r\n\t\tfor (var i = 0; i < recurrings.length; i++) {\r\n\t\t\tif (!recurrings[i].deleted) {\r\n\t\t\t\tresult.push({ start_date: recurrings[i].start_date, end_date: recurrings[i].end_date });\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t};\r\n\tscheduler.getEvents = function (from, to) {\r\n\t\tvar result = [];\r\n\t\tconst exceptions = groupExceptions();\r\n\t\tfor (var a in this._events) {\r\n\t\t\tvar ev = this._events[a];\r\n\t\t\tif (ev.recurring_event_id) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif (from && to && ev.start_date < to && ev.end_date > from) {\r\n\t\t\t\tif (isSeries(ev)) {\r\n\t\t\t\t\tvar sev = [];\r\n\t\t\t\t\tthis.repeat_date(ev, sev, true, from, to, undefined, exceptions);\r\n\t\t\t\t\tsev.forEach(function(occurence){\r\n\t\t\t\t\t\tif (occurence.start_date < to && occurence.end_date > from) {\r\n\t\t\t\t\t\t\tresult.push(occurence);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t// if it's virtual event we can skip it\r\n\t\t\t\t} else if (!this._is_virtual_event(ev.id)) {\r\n\t\t\t\t\tresult.push(ev);\r\n\t\t\t\t}\r\n\t\t\t} else if (!from && !to && !this._is_virtual_event(ev.id)) {\r\n\t\t\t\tresult.push(ev);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t};\r\n\r\n\t//drop secondary attributes\r\n\tscheduler._copy_dummy = function (ev) {\r\n\t\tvar start_date = new Date(this.start_date);\r\n\t\tvar end_date = new Date(this.end_date);\r\n\t\tthis.start_date = start_date;\r\n\t\tthis.end_date = end_date;\r\n\t\tthis.duration = this.rrule = null;\r\n\t};\r\n\r\n\tscheduler.config.include_end_by = false;\r\n\tscheduler.config.lightbox_recurring = 'ask'; // series, instance\r\n\tscheduler.config.recurring_workdays = [RRule.MO.weekday,RRule.TU.weekday,RRule.WE.weekday,RRule.TH.weekday,RRule.FR.weekday];\r\n\tscheduler.config.repeat_date = \"%m.%d.%Y\";\r\n\tscheduler.config.lightbox.sections = [\r\n\t\t{ name: \"description\", map_to: \"text\", type: \"textarea\", focus: true },\r\n\t\t{ name: \"recurring\", type: \"recurring\", map_to: \"rec_type\" },\r\n\t\t{ name: \"time\", height: 72, type: \"time\", map_to: \"auto\" }\r\n\t];\r\n\r\n\tscheduler.attachEvent(\"onClearAll\", function () {\r\n\t\tscheduler._rec_markers = {}; //clear recurring events data\r\n\t\tscheduler._rec_markers_pull = {};\r\n\t\tscheduler._rec_temp = [];\r\n\t});\r\n\r\n\r\n\tfunction getTopLevelOption(rruleObj, untilDate) {\r\n\t\tconst options = rruleObj.options;\r\n\t\tconst until = options.until || untilDate;\r\n\r\n\t\tconst hasEndCondition = options.count || (until && until.getFullYear() !== 9999);\r\n\r\n\t\tif (hasEndCondition) {\r\n\t\t\treturn 'CUSTOM';\r\n\t\t}\r\n\r\n\t\tif (options.freq === RRule.DAILY && options.interval === 1 && !options.byweekday) {\r\n\t\t\treturn 'DAILY';\r\n\t\t} else if (options.freq === RRule.WEEKLY && options.interval === 1 && !options.byweekday) {\r\n\t\t\treturn 'WEEKLY';\r\n\t\t} else if (options.freq === RRule.MONTHLY && options.interval === 1 && !options.bysetpos) {\r\n\t\t\treturn 'MONTHLY';\r\n\t\t} else if (options.freq === RRule.YEARLY && options.interval === 1 && !options.bysetpos) {\r\n\t\t\treturn 'YEARLY';\r\n\t\t} else if (options.freq === RRule.DAILY && options.byweekday && options.byweekday.length === scheduler.config.recurring_workdays.length &&\r\n\t\t\toptions.byweekday.includes(RRule.MO) &&\r\n\t\t\toptions.byweekday.includes(RRule.TU) &&\r\n\t\t\toptions.byweekday.includes(RRule.WE) &&\r\n\t\t\toptions.byweekday.includes(RRule.TH) &&\r\n\t\t\toptions.byweekday.includes(RRule.FR)) {\r\n\t\t\treturn 'WORKDAYS';\r\n\t\t} else {\r\n\t\t\treturn 'CUSTOM';\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction getWeekdayOfMonth(date) {\r\n\t\tconst dayOfWeek = date.getDay();\r\n\t\tconst dayOfMonth = date.getDate();\r\n\t\tconst dayNumber = Math.ceil(dayOfMonth / 7);\r\n\t\treturn { dayOfWeek, dayNumber };\r\n\t}\r\n\r\n\r\n\tconst jsDaysToRRULEDays = {\r\n\t\t0: \"SU\",\r\n\t\t1: \"MO\",\r\n\t\t2: \"TU\",\r\n\t\t3: \"WE\",\r\n\t\t4: \"TH\",\r\n\t\t5: \"FR\",\r\n\t\t6: \"SA\"\r\n\t};\r\n\tconst RruleDayNumsToJs = {\r\n\t\t0: 1,\r\n\t\t1: 2,\r\n\t\t2: 3,\r\n\t\t3: 4,\r\n\t\t4: 5,\r\n\t\t5: 6,\r\n\t\t6: 0\r\n\t};\r\n\r\n\tfunction fillCustomDaily(node, rule) {\r\n\t\tnode.querySelector(\"[name='repeat_interval_value']\").value = (rule ? rule.interval : 1) || 1;\r\n\t}\r\n\r\n\tfunction fillCustomWeekly(node, rule, event) {\r\n\t\tnode.querySelector(\"[name='repeat_interval_value']\").value = (rule ? rule.interval : 1) || 1;\r\n\r\n\t\tconst dayCheckboxes = node.querySelectorAll(`.dhx_form_repeat_custom_week input`);\r\n\t\tdayCheckboxes.forEach((ch) => ch.checked = false);\r\n\t\tif (rule && rule.byweekday) {\r\n\t\t\trule.byweekday.forEach((day) => {\r\n\t\t\t\tconst dayNum = RruleDayNumsToJs[day.weekday];\r\n\t\t\t\tconst dayLabel = jsDaysToRRULEDays[dayNum];\r\n\t\t\t\tnode.querySelector(`.dhx_form_repeat_custom_week input[value=\"${dayLabel}\"]`).checked = true;\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tconst dayLabel = jsDaysToRRULEDays[event.start_date.getDay()];\r\n\t\t\tnode.querySelector(`.dhx_form_repeat_custom_week input[value=\"${dayLabel}\"]`).checked = true;\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tfunction fillCustomMonthly(node, rule, event) {\r\n\t\tnode.querySelector(\"[name='repeat_interval_value']\").value = (rule ? rule.interval : 1) || 1;\r\n\r\n\t\tconst dateOfMonth = node.querySelector(`.dhx_form_repeat_custom_month [value=\"month_date\"]`);\r\n\t\tconst nthWeekDayOfMonth = node.querySelector(`.dhx_form_repeat_custom_month [value=\"month_nth_weekday\"]`);\r\n\t\tdateOfMonth.innerText = scheduler.templates.repeat_monthly_date(event.start_date, event);\r\n\t\tnthWeekDayOfMonth.innerText = scheduler.templates.repeat_monthly_weekday(event.start_date, event);\r\n\r\n\t\tif (!rule || (rule.bysetpos && !(rule.byweekday && rule.byweekday.length))) {\r\n\t\t\tnode.querySelector(`[name=\"dhx_custom_month_option\"]`).value = \"month_date\";\r\n\t\t} else {\r\n\t\t\tnode.querySelector(`[name=\"dhx_custom_month_option\"]`).value = \"month_nth_weekday\";\r\n\t\t}\r\n\t}\r\n\r\n\tfunction formatDayNumber(date){\r\n\t\tswitch (date) {\r\n\t\t\tcase 1:\r\n\t\t\tcase 31:\r\n\t\t\t\treturn `${date}st`;\r\n\t\t\tcase 2:\r\n\t\t\t\treturn `${date}nd`;\r\n\t\t\tcase 3:\r\n\t\t\t\treturn `${date}rd`;\r\n\t\t\tdefault:\r\n\t\t\t\treturn `${date}th`;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.templates.repeat_monthly_date = function(startDate, event) {\r\n\t\tconst date = startDate.getDate();\r\n\t\treturn `Every ${formatDayNumber(date)}`;\r\n\t};\r\n\tscheduler.templates.repeat_monthly_weekday = function(startDate, event) {\r\n\t\tconst nthDayOfMonth = getWeekdayOfMonth(startDate);\r\n\t\treturn `Every ${formatDayNumber(nthDayOfMonth.dayNumber)} ${scheduler.locale.date.day_full[nthDayOfMonth.dayOfWeek]}`;\r\n\t};\r\n\t\r\n\tscheduler.templates.repeat_yearly_month_date = function(startDate, event) {\r\n\t\tconst date = startDate.getDate();\r\n\t\tconst monthLabel = scheduler.locale.date.month_full[startDate.getMonth()];\r\n\t\treturn `Every ${formatDayNumber(date)} day of ${monthLabel}`;\r\n\t};\r\n\tscheduler.templates.repeat_yearly_month_weekday = function(startDate, event) {\r\n\t\tconst nthDayOfMonth = getWeekdayOfMonth(startDate);\r\n\t\tconst monthLabel = scheduler.locale.date.month_full[startDate.getMonth()];\r\n\t\treturn `Every ${formatDayNumber(nthDayOfMonth.dayNumber)} ${scheduler.locale.date.day_full[nthDayOfMonth.dayOfWeek]} of ${monthLabel}`;\r\n\t};\r\n\r\n\tfunction fillCustomYearly(node, rule, event) {\r\n\t\tconst dateOfYear = node.querySelector(`.dhx_form_repeat_custom_year [value=\"month_date\"]`);\r\n\t\tconst nthWeekDayOfYear = node.querySelector(`.dhx_form_repeat_custom_year [value=\"month_nth_weekday\"]`);\r\n\t\tdateOfYear.innerText = scheduler.templates.repeat_yearly_month_date(event.start_date, event);\r\n\t\tnthWeekDayOfYear.innerText = scheduler.templates.repeat_yearly_month_weekday(event.start_date, event);\r\n\r\n\t\tif (!rule || (rule.bysetpos && !(rule.byweekday && rule.byweekday.length))) {\r\n\t\t\tnode.querySelector(`[name=\"dhx_custom_year_option\"]`).value = \"month_date\";\r\n\t\t} else {\r\n\t\t\tnode.querySelector(`[name=\"dhx_custom_year_option\"]`).value = \"month_nth_weekday\";\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fillEndRule(node, rule, event) {\r\n\t\tconst countInput = node.querySelector(`.dhx_form_repeat_ends_extra [name=\"dhx_form_repeat_ends_after\"]`);\r\n\t\tconst ondateInput = node.querySelector(`.dhx_form_repeat_ends_extra [name=\"dhx_form_repeat_ends_ondate\"]`);\r\n\t\tconst endOptionSelect = node.querySelector(`[name='dhx_custom_repeat_ends']`);\r\n\t\tcountInput.value = 1;\r\n\r\n\t\tlet formatter = scheduler.date.date_to_str(\"%Y-%m-%d\");\r\n\t\tif (!scheduler.config.repeat_date_of_end) {\r\n\t\t\tscheduler.config.repeat_date_of_end = formatter(scheduler.date.add(scheduler._currentDate(), 30, \"day\"));\r\n\t\t}\r\n\t\tondateInput.value = scheduler.config.repeat_date_of_end;\r\n\r\n\t\tif (rule && rule.count) {\r\n\t\t\tendOptionSelect.value = \"AFTER\";\r\n\t\t\tcountInput.value = rule.count;\r\n\t\t} else if (event._end_date && event._end_date.getFullYear() !== 9999) {\r\n\t\t\tendOptionSelect.value = \"ON\";\r\n\t\t\tondateInput.value = formatter(event._end_date);\r\n\t\t} else {\r\n\t\t\tendOptionSelect.value = \"NEVER\";\r\n\t\t}\r\n\t\tendOptionSelect.dispatchEvent(new Event(\"change\"));\r\n\t}\r\n\r\n\tconst getRecValue = {\r\n\t\tMONTHLY: function (dates) {\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.MONTHLY,\r\n\t\t\t\tinterval: 1,\r\n\t\t\t\tbymonthday: dates.start.getDate()\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tWEEKLY: function (dates) {\r\n\t\t\tlet day = dates.start.getDay() - 1;\r\n\t\t\tif (day == -1) day = 6;\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.WEEKLY,\r\n\t\t\t\tinterval: 1,\r\n\t\t\t\tbyweekday: [day]\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tDAILY: function (dates) {\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.DAILY,\r\n\t\t\t\tinterval: 1\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tYEARLY: function (dates) {\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.YEARLY,\r\n\t\t\t\tbymonth: dates.start.getMonth() + 1,\r\n\t\t\t\tinterval: 1,\r\n\t\t\t\tbymonthday: dates.start.getDate()\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tWORKDAYS: function (dates) {\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.WEEKLY,\r\n\t\t\t\tinterval: 1,\r\n\t\t\t\tbyweekday: scheduler.config.recurring_workdays\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tCUSTOM: function (dates, node) {\r\n\t\t\tconst rrule = {};\r\n\t\t\tconst freq = node.querySelector(`[name=\"repeat_interval_unit\"]`).value;\r\n\t\t\tconst interval = Math.max(1, node.querySelector(`[name=\"repeat_interval_value\"]`).value);\r\n\t\t\tconst monthRepeat = node.querySelector(`[name=\"dhx_custom_month_option\"]`).value;\r\n\t\t\tconst yearRepeat = node.querySelector(`[name=\"dhx_custom_year_option\"]`).value;\r\n\r\n\t\t\trrule.interval = interval;\r\n\t\t\tlet days;\r\n\t\t\tlet day;\r\n\r\n\t\t\tswitch (freq) {\r\n\t\t\t\tcase \"DAILY\":\r\n\t\t\t\t\trrule.freq = RRule.DAILY;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"WEEKLY\": \r\n\t\t\t\t\trrule.freq = RRule.WEEKLY;\r\n\t\t\t\t\tdays = [];\r\n\t\t\t\t\tnode.querySelectorAll(`.dhx_form_repeat_custom_week [name=\"week_day\"]`).forEach((ch) => {\r\n\t\t\t\t\t\tif(ch.checked){\r\n\t\t\t\t\t\t\tdays.push(ch.value);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\trrule.byweekday = days.map((day) => {\r\n\t\t\t\t\t\tswitch (day) {\r\n\t\t\t\t\t\t\tcase \"MO\":\r\n\t\t\t\t\t\t\t\treturn RRule.MO.weekday;\r\n\t\t\t\t\t\t\tcase \"TU\":\r\n\t\t\t\t\t\t\t\treturn RRule.TU.weekday;\r\n\t\t\t\t\t\t\tcase \"WE\":\r\n\t\t\t\t\t\t\t\treturn RRule.WE.weekday;\r\n\t\t\t\t\t\t\tcase \"TH\":\r\n\t\t\t\t\t\t\t\treturn RRule.TH.weekday;\r\n\t\t\t\t\t\t\tcase \"FR\":\r\n\t\t\t\t\t\t\t\treturn RRule.FR.weekday;\r\n\t\t\t\t\t\t\tcase \"SA\":\r\n\t\t\t\t\t\t\t\treturn RRule.SA.weekday;\r\n\t\t\t\t\t\t\tcase \"SU\":\r\n\t\t\t\t\t\t\t\treturn RRule.SU.weekday;\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"MONTHLY\":\r\n\t\t\t\t\trrule.freq = RRule.MONTHLY;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (monthRepeat === \"month_date\") {\r\n\t\t\t\t\t\trrule.bymonthday = dates.start.getDate();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tday = dates.start.getDay() - 1;\r\n\t\t\t\t\t\tif (day == -1) day = 6;\r\n\t\t\t\t\t\trrule.byweekday = [day];\r\n\t\t\t\t\t\trrule.bysetpos = getWeekdayOfMonth(dates.start).dayNumber;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"YEARLY\":\r\n\t\t\t\t\trrule.freq = RRule.YEARLY;\r\n\t\t\t\t\trrule.bymonth = dates.start.getMonth() + 1;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (yearRepeat == \"month_date\") {\r\n\t\t\t\t\t\trrule.bymonthday = dates.start.getDate();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tday = dates.start.getDay() - 1;\r\n\t\t\t\t\t\tif (day == -1) day = 6;\r\n\t\t\t\t\t\trrule.byweekday = [day];\r\n\t\t\t\t\t\trrule.bysetpos = getWeekdayOfMonth(dates.start).dayNumber;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tconst formatFunc = scheduler.date.str_to_date(\"%Y-%m-%d\");\r\n\t\t\tlet until = new Date(9999, 1, 1);\r\n\t\t\tconst endRule = node.querySelector(`[name=\"dhx_custom_repeat_ends\"]`);\r\n\t\t\tif(endRule.value === \"ON\"){\r\n\t\t\t\tuntil = formatFunc(node.querySelector(`[name=\"dhx_form_repeat_ends_ondate\"]`).value);\r\n\t\t\t} else if(endRule.value === \"AFTER\") {\r\n\t\t\t\trrule.count = Math.max(1, node.querySelector(`[name=\"dhx_form_repeat_ends_after\"]`).value);\r\n\t\t\t}\r\n\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tNEVER: function () {\r\n\t\t}\r\n\t};\r\n\r\n\tfunction fillInDefaults(node, rule, event) {\r\n\t\tfillCustomDaily(node, rule, event);\r\n\t\tfillCustomWeekly(node, rule, event);\r\n\t\tfillCustomMonthly(node, rule, event);\r\n\t\tfillCustomYearly(node, rule, event);\r\n\t\tfillEndRule(node, rule, event);\r\n\t}\r\n\tscheduler.form_blocks[\"recurring\"] = {\r\n\t\trender: function (sns) {\r\n\t\t\tif (sns.form) {\r\n\t\t\t\tlet rec = scheduler.form_blocks[\"recurring\"];\r\n\t\t\t\tlet form = rec._get_node(sns.form);\r\n\t\t\t\tlet html = rec._outer_html(form);\r\n\t\t\t\tform.style.display = 'none';\r\n\t\t\t\treturn html;\r\n\t\t\t}\r\n\t\t\tlet loc = scheduler.locale.labels;\r\n\r\n\t\t\treturn `
\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t
\r\n\r\n\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t
\r\n\r\n\t\t\t
\r\n\t\t\t\t
${loc.repeat_ends}
\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\r\n\t\t
\r\n\t
`;\r\n\t\t},\r\n\r\n\t\r\n\t\t_init_set_value: function (node, value, event) {\r\n\t\t\tscheduler.form_blocks[\"recurring\"]._ds = { start: event.start_date, end: event.end_date };\r\n\t\t\tfunction hide(node) {\r\n\t\t\t\tnode.classList.add(\"dhx_hidden\");\r\n\t\t\t}\r\n\t\t\tfunction show(node) {\r\n\t\t\t\tnode.classList.remove(\"dhx_hidden\");\r\n\t\t\t}\r\n\t\t\tfunction onRepeatOptionChange(value) {\r\n\t\t\t\tconst repeat = node.querySelector(\".dhx_form_repeat_custom\");\r\n\t\t\t\tif (value === \"CUSTOM\") {\r\n\t\t\t\t\tshow(repeat);\r\n\t\t\t\t} else {\r\n\t\t\t\t\thide(repeat);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction onCustomRepeatIntervalChange(value) {\r\n\t\t\t\tconst nodes = {\r\n\t\t\t\t\tweekly: node.querySelector(\".dhx_form_repeat_custom_week\"),\r\n\t\t\t\t\tmonthly: node.querySelector(\".dhx_form_repeat_custom_month\"),\r\n\t\t\t\t\tyearly: node.querySelector(\".dhx_form_repeat_custom_year\")\r\n\t\t\t\t};\r\n\t\t\t\tswitch (value) {\r\n\t\t\t\t\tcase \"DAILY\":\r\n\t\t\t\t\t\thide(nodes.weekly);\r\n\t\t\t\t\t\thide(nodes.monthly);\r\n\t\t\t\t\t\thide(nodes.yearly);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"WEEKLY\":\r\n\t\t\t\t\t\tshow(nodes.weekly);\r\n\t\t\t\t\t\thide(nodes.monthly);\r\n\t\t\t\t\t\thide(nodes.yearly);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"MONTHLY\":\r\n\t\t\t\t\t\thide(nodes.weekly);\r\n\t\t\t\t\t\tshow(nodes.monthly);\r\n\t\t\t\t\t\thide(nodes.yearly);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"YEARLY\":\r\n\t\t\t\t\t\thide(nodes.weekly);\r\n\t\t\t\t\t\thide(nodes.monthly);\r\n\t\t\t\t\t\tshow(nodes.yearly);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction onCustomRepeatEndRule(value) {\r\n\t\t\t\tconst nodes = {\r\n\t\t\t\t\tafter: node.querySelector(\".dhx_form_repeat_ends_extra .dhx_form_repeat_ends_after\"),\r\n\t\t\t\t\ton: node.querySelector(\".dhx_form_repeat_ends_extra .dhx_form_repeat_ends_on\")\r\n\t\t\t\t};\r\n\t\t\t\tswitch (value) {\r\n\t\t\t\t\tcase \"NEVER\":\r\n\t\t\t\t\t\thide(nodes.after);\r\n\t\t\t\t\t\thide(nodes.on);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"AFTER\":\r\n\t\t\t\t\t\tshow(nodes.after);\r\n\t\t\t\t\t\thide(nodes.on);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"ON\":\r\n\t\t\t\t\t\thide(nodes.after);\r\n\t\t\t\t\t\tshow(nodes.on);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// repeat section change\r\n\t\t\tnode.querySelector(\".dhx_form_repeat_pattern select\").addEventListener(\"change\", function () {\r\n\t\t\t\tonRepeatOptionChange(this.value);\r\n\t\t\t});\r\n\r\n\t\t\t// custom repeat interval change\r\n\t\t\tnode.querySelector(\".dhx_form_repeat_custom_interval [name='repeat_interval_unit']\").addEventListener(\"change\", function () {\r\n\t\t\t\tonCustomRepeatIntervalChange(this.value);\r\n\t\t\t});\r\n\r\n\t\t\t// custom repeat end rule\r\n\t\t\tnode.querySelector(\".dhx_form_repeat_ends [name='dhx_custom_repeat_ends']\").addEventListener(\"change\", function () {\r\n\t\t\t\tonCustomRepeatEndRule(this.value);\r\n\t\t\t});\r\n\r\n\t\t\tscheduler._lightbox._rec_init_done = true;\r\n\t\t},\r\n\t\tbutton_click: function(){},\r\n\t\tset_value: function (node, value, ev) {\r\n\t\t\tlet rf = scheduler.form_blocks[\"recurring\"];\r\n\t\t\tif (!scheduler._lightbox._rec_init_done)\r\n\t\t\t\trf._init_set_value(node, value, ev);\r\n\t\t\tnode.open = !ev.rrule;\r\n\r\n\t\t\tnode.blocked = this._is_modified_occurence(ev);\r\n\r\n\t\t\tlet ds = rf._ds;\r\n\t\t\tds.start = ev.start_date;\r\n\t\t\tds.end = ev._end_date;\r\n\r\n\t\t\tif (ev.rrule) {\r\n\t\t\t\tconst rruleset = rrulestr(ev.rrule);\r\n\t\t\t\tfillInDefaults(node, rruleset.origOptions, ev);\r\n\t\t\t\tconst topOption = getTopLevelOption(rruleset, ev._end_date);\r\n\t\t\t\tnode.querySelector(\".dhx_form_repeat_pattern select\").value = topOption;\r\n\t\t\t\tif(topOption === \"CUSTOM\"){\r\n\t\t\t\t\tlet customFreq;\r\n\t\t\t\t\tswitch (rruleset.origOptions.freq) {\r\n\t\t\t\t\t\tcase RRule.DAILY:\r\n\t\t\t\t\t\t\tcustomFreq = \"DAILY\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase RRule.WEEKLY:\r\n\t\t\t\t\t\t\tcustomFreq = \"WEEKLY\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase RRule.MONTHLY:\r\n\t\t\t\t\t\t\tcustomFreq = \"MONTHLY\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase RRule.YEARLY:\r\n\t\t\t\t\t\t\tcustomFreq = \"YEARLY\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(customFreq){\r\n\t\t\t\t\t\tnode.querySelector(`[name=\"repeat_interval_unit\"]`).value = customFreq;\r\n\t\t\t\t\t\tnode.querySelector(`[name=\"repeat_interval_unit\"]`).dispatchEvent(new Event(\"change\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t//\trepeat_interval_unit\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tfillInDefaults(node, null, ev);\r\n\t\t\t\tnode.querySelector(\".dhx_form_repeat_pattern select\").value = \"NEVER\";\r\n\t\t\t}\r\n\t\t\tnode.querySelector(\".dhx_form_repeat_pattern select\").dispatchEvent(new Event(\"change\"));\r\n\r\n\t\t},\r\n\t\tget_value: function (node, ev) {\r\n\t\t\t\r\n\t\t\tif(!node.blocked && node.querySelector(\".dhx_form_repeat_pattern select\").value !== \"NEVER\") {\r\n\t\t\t\tlet ds = scheduler.form_blocks[\"recurring\"]._ds;\r\n\t\t\t\tlet actual_dates = {};\r\n\r\n\t\t\t\tlet timeControl = getTimeSection();\r\n\r\n\t\t\t\ttimeControl.getValue(actual_dates);\r\n\t\t\t\tds.start = actual_dates.start_date;\r\n\t\t\t\tconst pattern = node.querySelector(\".dhx_form_repeat_pattern select\").value;\r\n\t\t\t\tconst recurrence = getRecValue[pattern](ds, node);\r\n\t\t\t\tev.rrule = new RRule(recurrence.rrule).toString().replace(\"RRULE:\", \"\");\r\n\t\t\t\tds.end = recurrence.until;\r\n\r\n\t\t\t\tev.duration = Math.floor((actual_dates.end_date - actual_dates.start_date) / 1000);\r\n\r\n\t\t\t\tif (ds._start) {\r\n\t\t\t\t\tev.start_date = new Date(ds.start);\r\n\t\t\t\t\tev._start_date = new Date(ds.start);\r\n\t\t\t\t\tds._start = false;\r\n\t\t\t\t} else\r\n\t\t\t\t\tev._start_date = null;\r\n\r\n\t\t\t\tev._end_date = ds.end;\r\n\t\t\t}else{\r\n\t\t\t\tev.rrule = ev.rrule = \"\";\r\n\t\t\t\tev._end_date = ev.end_date;\r\n\t\t\t}\r\n\r\n\t\t\treturn ev.rrule;\r\n\t\t},\r\n\r\n\t\tfocus: function (node) {\r\n\t\t}\r\n\t};\r\n\r\n\tfunction getTimeSection() {\r\n\t\tlet timeControl = scheduler.formSection('time');\r\n\t\tif (!timeControl) {\r\n\t\t\ttimeControl = getFirstSectionOfType('time');\r\n\t\t}\r\n\t\tif (!timeControl) {\r\n\t\t\ttimeControl = getFirstSectionOfType('calendar_time');\r\n\t\t}\r\n\r\n\r\n\t\tif (!timeControl) {\r\n\t\t\tthrow new Error([\"Can't calculate the recurring rule, the Recurring form block can't find the Time control. Make sure you have the time control in 'scheduler.config.lightbox.sections' config.\",\r\n\t\t\t\t\"You can use either the default time control https://docs.dhtmlx.com/scheduler/time.html, or the datepicker https://docs.dhtmlx.com/scheduler/minicalendar.html, or a custom control. \",\r\n\t\t\t\t\"In the latter case, make sure the control is named \\\"time\\\":\",\r\n\t\t\t\t\"\",\r\n\t\t\t\t\"scheduler.config.lightbox.sections = [\",\r\n\t\t\t\t\"{name:\\\"time\\\", height:72, type:\\\"YOU CONTROL\\\", map_to:\\\"auto\\\" }];\"]\r\n\t\t\t\t.join(\"\\n\"));\r\n\t\t}\r\n\r\n\t\treturn timeControl;\r\n\t}\r\n\r\n\tfunction getFirstSectionOfType(type) {\r\n\t\tfor (let i = 0; i < scheduler.config.lightbox.sections.length; i++) {\r\n\t\t\tlet section = scheduler.config.lightbox.sections[i];\r\n\t\t\tif (section.type === type) {\r\n\t\t\t\treturn scheduler.formSection(section.name);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.occurrence_timestamp_in_utc = false;\r\nscheduler.config.recurring_workdays = [1,2,3,4,5];\r\nscheduler.form_blocks[\"recurring\"] = {\r\n\t_get_node : function(node){\r\n\t\tif (typeof node == \"string\"){\r\n\t\t\tlet element = scheduler._lightbox.querySelector(`#${node}`);\r\n\t\t\tif(!element){\r\n\t\t\t\t// form is detached from lightbox \r\n\t\t\t\t// search globally, won't work in LWC\r\n\t\t\t\telement = document.getElementById(node);\r\n\t\t\t}\r\n\t\t\tnode = element;\r\n\t\t}\r\n\t\tif (node.style.display == 'none')\r\n\t\t\tnode.style.display = \"\";\r\n\t\treturn node;\r\n\t},\r\n\t_outer_html: function(node){\r\n\t\treturn node.outerHTML || getOuterHTML(node);\r\n\r\n\t\t//probably not needed, FF v10- only\r\n\t\tfunction getOuterHTML(n){\r\n\t\t\tvar div = document.createElement('div'), h;\r\n\t\t\tdiv.appendChild( n.cloneNode(true) );\r\n\t\t\th = div.innerHTML;\r\n\t\t\tdiv = null;\r\n\t\t\treturn h;\r\n\t\t}\r\n\t},\r\n\trender:function(sns) {\r\n\t\tif(sns.form){\r\n\t\t\tvar rec = scheduler.form_blocks[\"recurring\"];\r\n\t\t\tvar form = rec._get_node(sns.form);\r\n\t\t\tvar html = rec._outer_html(form);\r\n\t\t\tform.style.display = 'none';\r\n\t\t\treturn html;\r\n\t\t}\r\n\t\tvar loc = scheduler.locale.labels;\r\n\t\treturn '
'+\r\n\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t''+loc.repeat_text_week_count+'
'+\r\n\t\t\t\t\t\t\t\t' '+\r\n\t\t\t\t\t\t\t\t\t' '+\r\n\t\t\t\t\t\t\t\t\t\t' '+\r\n\t\t\t\t\t\t\t\t\t\t' '+\r\n\t\t\t\t\t\t\t\t\t\t' '+\r\n\t\t\t\t\t\t\t\t\t\t' '+\r\n\t\t\t\t\t\t\t\t\t' '+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t\t''+\r\n\t\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t\t''+\r\n\t\t\t\t\t\t\t\t\t''+\r\n\t\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t''+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t''+\r\n\t\t\t\t\t\t\t\t''+\r\n\t\t\t\t\t\t\t\tloc.select_year_day2+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t''+loc.repeat_text_occurences_count+'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t'
'+\r\n\t\t\t\t'
'+\r\n\t\t\t\t'
';\r\n\t},\r\n\t_ds: {},\r\n\t_get_form_node: function(els, name, value){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return null;\r\n\t\tif(col.nodeName) return col;\r\n\r\n\t\tif(col.length){\r\n\t\t\tfor(var i=0; i < col.length; i++){\r\n\t\t\t\tif(col[i].value == value)\r\n\t\t\t\t\treturn col[i];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\t_get_node_value: function(els, name, multiselect){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return \"\";\r\n\t\tif(col.length){\r\n\t\t\tif(multiselect){\r\n\t\t\t\tvar res = [];\r\n\t\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\t\tif (col[i].checked) res.push(col[i].value);\r\n\r\n\t\t\t\treturn res;\r\n\t\t\t}else{\r\n\t\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\t\tif (col[i].checked) return col[i].value;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(col.value)\r\n\t\t\treturn !multiselect ? col.value : [col.value];\r\n\t},\r\n\r\n\t_get_node_numeric_value: function(els, name){\r\n\t\tvar value = scheduler.form_blocks[\"recurring\"]._get_node_value(els, name);\r\n\t\treturn ((value * 1) || 0);\r\n\t},\r\n\r\n\t_set_node_value: function(els, name, value){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return;\r\n\r\n\t\tif(col.name == name){\r\n\t\t\tcol.value = value;\r\n\t\t}else if(col.length){\r\n\t\t\tvar hash_value = typeof value == \"object\";\r\n\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\tif (hash_value || col[i].value == value){\r\n\t\t\t\t\tcol[i].checked = hash_value ? !!value[col[i].value] : !!value;\r\n\t\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_init_set_value:function(node, value, ev) {\r\n\t\tvar block = scheduler.form_blocks[\"recurring\"];\r\n\t\tvar get_value = block._get_node_value;\r\n\t\tvar set_value = block._set_node_value;\r\n\t\tscheduler.form_blocks[\"recurring\"]._ds = {start:ev.start_date, end:ev._end_date};\r\n\r\n\t\tvar str_date_format = scheduler.date.str_to_date(scheduler.config.repeat_date, false, true);\r\n\t\tvar str_date = function(str_date) {\r\n\t\t\tvar date = str_date_format(str_date);\r\n\t\t\tif (scheduler.config.include_end_by)\r\n\t\t\t\tdate = scheduler.date.add(date, 1, 'day');\r\n\t\t\treturn date;\r\n\t\t};\r\n\r\n\t\tvar date_str = scheduler.date.date_to_str(scheduler.config.repeat_date);\r\n\r\n\t\tvar top = node.getElementsByTagName(\"FORM\")[0];\r\n\t\tvar els = {};\r\n\r\n\t\tfunction register_els(inps) {\r\n\t\t\tfor (var i = 0; i < inps.length; i++) {\r\n\t\t\t\tvar inp = inps[i];\r\n\r\n\t\t\t\tif(inp.name){\r\n\t\t\t\t\tif(!els[inp.name]){\r\n\t\t\t\t\t\tels[inp.name] = inp;\r\n\t\t\t\t\t}else if(els[inp.name].nodeType){\r\n\t\t\t\t\t\tvar node = els[inp.name];\r\n\t\t\t\t\t\tels[inp.name] = [node, inp];\r\n\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tels[inp.name].push(inp);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tregister_els(top.getElementsByTagName(\"INPUT\"));\r\n\t\tregister_els(top.getElementsByTagName(\"SELECT\"));\r\n\r\n\t\tif (!scheduler.config.repeat_date_of_end) {\r\n\t\t\tvar formatter = scheduler.date.date_to_str(scheduler.config.repeat_date);\r\n\t\t\tscheduler.config.repeat_date_of_end = formatter(scheduler.date.add(scheduler._currentDate(), 30, \"day\"));\r\n\t\t}\r\n\t\tset_value(els, \"date_of_end\", scheduler.config.repeat_date_of_end);\r\n\r\n\t\tvar $ = function(a) {\r\n\t\t\treturn scheduler._lightbox.querySelector(`#${a}`) || { style:{} };//return fake object if node not found\r\n\t\t};\r\n\r\n\t\tfunction change_current_view() {\r\n\t\t\t$(\"dhx_repeat_day\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_week\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_month\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_year\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_\" + this.value).style.display = \"\";\r\n\t\t\tscheduler.setLightboxSize();\r\n\t\t}\r\n\r\n\t\tfunction get_repeat_code(dates) {\r\n\t\t\tvar code = [get_value(els, \"repeat\")];\r\n\t\t\tget_rcode[code[0]](code, dates);\r\n\r\n\t\t\twhile (code.length < 5) code.push(\"\");\r\n\t\t\tvar repeat = \"\";\r\n\r\n\t\t\tvar end = get_end_rule(els);\r\n\r\n\t\t\tif (end == \"no\") {\r\n\t\t\t\tdates.end = new Date(9999, 1, 1);\r\n\t\t\t\trepeat = \"no\";\r\n\t\t\t}\r\n\t\t\telse if (end == \"date_of_end\") {\r\n\t\t\t\tdates.end = str_date(get_value(els, \"date_of_end\"));\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tscheduler.transpose_type(code.join(\"_\"));\r\n\t\t\t\trepeat = Math.max(1, get_value(els, \"occurences_count\"));\r\n\r\n\t\t\t\tvar transp = 0;\r\n\r\n\t\t\t\t//var transp = ((code[0] == \"week\" && code[4] && code[4].toString().indexOf(scheduler.config.start_on_monday ? 1 : 0) == -1) ? 1 : 0);\r\n\r\n\t\t\t\t// which is equal to following code, seems to produce extra instance, not clear why needed\r\n\r\n\t\t\t\t/*if(code[0] == \"week\"){\r\n\t\t\t\t\tvar days = code[4] || \"\";\r\n\t\t\t\t\tif(scheduler.config.start_on_monday){\r\n\t\t\t\t\t\tif(days.indexOf(1) == -1)\r\n\t\t\t\t\t\ttransp = 1;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(days.indexOf(0) == -1)\r\n\t\t\t\t\t\ttransp = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}*/\r\n\r\n\t\t\t//\tdates.end = scheduler.date.add(new Date(dates.start), repeat + transp, code.join(\"_\"));\r\n\r\n\t\t\t\tdates.end = scheduler.date[\"add_\" + code.join(\"_\")](new Date(dates.start), repeat + transp, {start_date: dates.start}) || dates.start;\r\n\t\t\t}\r\n\r\n\t\t\treturn code.join(\"_\") + \"#\" + repeat;\r\n\t\t}\r\n\t\tfunction get_end_rule(els){\r\n\t\t\tvar end = els[\"end\"];\r\n\t\t\tif(end.length){\r\n\t\t\t\tfor(var i =0; i < end.length; i++){\r\n\t\t\t\t\tif(end[i].checked){\r\n\t\t\t\t\t\tif(end[i].value && end[i].value != \"on\"){//seems to be default value:var input = document.createElement(\"input\"); input.type = \"radio\"; input.value\r\n\t\t\t\t\t\t\treturn end[i].value;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif(!i){\r\n\t\t\t\t\t\t\t\treturn \"no\";\r\n\t\t\t\t\t\t\t}else if(i == 2){\r\n\t\t\t\t\t\t\t\treturn \"date_of_end\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\treturn \"occurences_count\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(end.value)\r\n\t\t\t\t\treturn end.value;\r\n\t\t\t}\r\n\t\t\treturn \"no\";\r\n\t\t}\r\n\t\tfunction set_end_rule(els, value){\r\n\t\t\tvar end = els[\"end\"];\r\n\r\n\t\t\tif(end.length){\r\n\t\t\t\tvar has_values = !!end[0].value && end[0].value != \"on\";\r\n\t\t\t\tif(has_values){\r\n\t\t\t\t\tfor(var i =0; i < end.length; i++){\r\n\t\t\t\t\t\tif(end[i].value == value)\r\n\t\t\t\t\t\t\tend[i].checked = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar ind = 0;\r\n\t\t\t\t\tswitch(value){\r\n\t\t\t\t\t\tcase \"no\":\r\n\t\t\t\t\t\t\tind = 0;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"date_of_end\":\r\n\t\t\t\t\t\t\tind = 2;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tind = 1;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend[ind].checked = true;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tend.value = value;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tscheduler.form_blocks[\"recurring\"]._get_repeat_code = get_repeat_code;\r\n\t\tvar get_rcode = {\r\n\t\t\tmonth:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tif (get_value(els, \"month_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_count\")));\r\n\t\t\t\t\tdates.start.setDate(get_value(els, \"month_day\"));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_count2\")));\r\n\t\t\t\t\tcode.push( get_value(els, \"month_day2\"));\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_week2\")));\r\n\t\t\t\t\tif (!scheduler.config.repeat_precise){\r\n\t\t\t\t\t\tdates.start.setDate(1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tdates._start = true;\r\n\t\t\t},\r\n\t\t\tweek:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"week_count\")));\r\n\t\t\t\tcode.push(\"\");\r\n\t\t\t\tcode.push(\"\");\r\n\t\t\t\tvar t = [];\r\n\r\n\t\t\t\tvar col = get_value(els, \"week_day\", true);\r\n\t\t\t\t//var col = els[\"week_day\"];\r\n\t\t\t\tvar day = dates.start.getDay();\r\n\t\t\t\tvar start_exists = false;\r\n\r\n\t\t\t\tfor (var i = 0; i < col.length; i++){\r\n\t\t\t\t\tt.push(col[i]);\r\n\t\t\t\t\tstart_exists = start_exists || col[i] == day;\r\n\t\t\t\t}\r\n\t\t\t\tif (!t.length){\r\n\t\t\t\t\tt.push(day);\r\n\t\t\t\t\tstart_exists = true;\r\n\t\t\t\t}\r\n\t\t\t\tt.sort();\r\n\r\n\r\n\t\t\t\tif (!scheduler.config.repeat_precise){\r\n\t\t\t\t\tdates.start = scheduler.date.week_start(dates.start);\r\n\t\t\t\t\tdates._start = true;\r\n\t\t\t\t} else if (!start_exists){\r\n\t\t\t\t\tscheduler.transpose_day_week(dates.start, t, 1, 7);\r\n\t\t\t\t\tdates._start = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcode.push(t.join(\",\"));\r\n\t\t\t},\r\n\t\t\tday:function(code) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tif (get_value(els, \"day_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"day_count\")));\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcode.push(\"week\");\r\n\t\t\t\t\tcode.push(1);\r\n\t\t\t\t\tcode.push(\"\");\r\n\t\t\t\t\tcode.push(\"\");\r\n\t\t\t\t\tcode.push(scheduler.config.recurring_workdays.join(\",\"));\r\n\t\t\t\t\tcode.splice(0, 1);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tyear:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\r\n\t\t\t\tif (get_value(els, \"year_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(\"1\");\r\n\t\t\t\t\tdates.start.setMonth(0);\r\n\t\t\t\t\tdates.start.setDate(get_value(els, \"year_day\"));\r\n\t\t\t\t\tdates.start.setMonth(get_value(els, \"year_month\"));\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcode.push(\"1\");\r\n\t\t\t\t\tcode.push(get_value(els, \"year_day2\"));\r\n\t\t\t\t\tcode.push(get_value(els, \"year_week2\"));\r\n\t\t\t\t\tdates.start.setDate(1);\r\n\t\t\t\t\tdates.start.setMonth(get_value(els, \"year_month2\"));\r\n\t\t\t\t}\r\n\t\t\t\tdates._start = true;\r\n\t\t\t}\r\n\t\t};\r\n\t\tvar set_rcode = {\r\n\t\t\tweek:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\t\tset_value(els, \"week_count\", code[1]);\r\n\r\n\t\t\t\tvar t = code[4].split(\",\");\r\n\t\t\t\tvar d = {};\r\n\t\t\t\tfor (var i = 0; i < t.length; i++) d[t[i]] = true;\r\n\r\n\t\t\t\tset_value(els, \"week_day\", d);\r\n\r\n\t\t\t\t//for (var i = 0; i < col.length; i++)\r\n\t\t\t\t//\tcol[i].checked = (!!d[col[i].value]);\r\n\t\t\t},\r\n\t\t\tmonth:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\r\n\t\t\t\tif (code[2] === \"\") {\r\n\t\t\t\t\tset_value(els, \"month_type\", \"d\");\r\n\t\t\t\t\tset_value(els, \"month_count\", code[1]);\r\n\t\t\t\t\tset_value(els, \"month_day\", dates.start.getDate());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tset_value(els, \"month_type\", \"w\");\r\n\t\t\t\t\tset_value(els, \"month_count2\", code[1]);\r\n\t\t\t\t\tset_value(els, \"month_week2\", code[3]);\r\n\t\t\t\t\tset_value(els, \"month_day2\", code[2]);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tday:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\t\tset_value(els, \"day_type\", \"d\");\r\n\t\t\t\tset_value(els, \"day_count\", code[1]);\r\n\t\t\t},\r\n\t\t\tyear:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\r\n\t\t\t\tif (code[2] === \"\") {\r\n\t\t\t\t\tset_value(els, \"year_type\", \"d\");\r\n\t\t\t\t\tset_value(els, \"year_day\", dates.start.getDate());\r\n\t\t\t\t\tset_value(els, \"year_month\", dates.start.getMonth());\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tset_value(els, \"year_type\", \"w\");\r\n\t\t\t\t\tset_value(els, \"year_week2\", code[3]);\r\n\t\t\t\t\tset_value(els, \"year_day2\", code[2]);\r\n\t\t\t\t\tset_value(els, \"year_month2\", dates.start.getMonth());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfunction set_repeat_code(code, dates) {\r\n\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\tvar data = code.split(\"#\");\r\n\t\t\tcode = data[0].split(\"_\");\r\n\t\t\tset_rcode[code[0]](code, dates);\r\n\r\n\t\t\tswitch (data[1]) {\r\n\t\t\t\tcase \"no\":\r\n\t\t\t\t\tset_end_rule(els, \"no\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"\":\r\n\t\t\t\t\tset_end_rule(els, \"date_of_end\");\r\n\r\n\t\t\t\t\tvar end_date = dates.end;\r\n\t\t\t\t\tif (scheduler.config.include_end_by){\r\n\t\t\t\t\t\tend_date = scheduler.date.add(end_date, -1, 'day');\r\n\t\t\t\t\t}\r\n\t\t\t\t\tset_value(els, \"date_of_end\", date_str(end_date));\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tset_end_rule(els, \"occurences_count\");\r\n\t\t\t\t\tset_value(els, \"occurences_count\", data[1]);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tset_value(els, \"repeat\", code[0]);\r\n\t\t\t//e.checked = true;\r\n\r\n\t\t\tvar node = scheduler.form_blocks[\"recurring\"]._get_form_node(els, \"repeat\", code[0]);\r\n\t\t\tif(node.nodeName == \"SELECT\"/* && node.onchange*/){\r\n\t\t\t//\tnode.onchange();\r\n\t\t\t\tnode.dispatchEvent(new Event('change'));\r\n\t\t\t\tnode.dispatchEvent(new MouseEvent('click'));\r\n\t\t\t}else{\r\n\t\t\t\tnode.dispatchEvent(new MouseEvent('click'));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tscheduler.form_blocks[\"recurring\"]._set_repeat_code = set_repeat_code;\r\n\r\n\t\tfor (var i = 0; i < top.elements.length; i++) {\r\n\t\t\tvar el = top.elements[i];\r\n\t\t\tswitch (el.name) {\r\n\t\t\t\tcase \"repeat\":\r\n\t\t\t\t\tif (el.nodeName == \"SELECT\" && !el.$_eventAttached) {\r\n\t\t\t\t\t\tel.$_eventAttached = true;\r\n\t\t\t\t\t\tel.addEventListener(\"change\", change_current_view);\r\n\t\t\t\t\t} else if(!el.$_eventAttached){\r\n\t\t\t\t\t\tel.$_eventAttached = true;\r\n\t\t\t\t\t\tel.addEventListener(\"click\", change_current_view);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._lightbox._rec_init_done = true;\r\n\t},\r\n\tset_value:function(node, value, ev) {\r\n\t\tvar rf = scheduler.form_blocks[\"recurring\"];\r\n\t\tif (!scheduler._lightbox._rec_init_done)\r\n\t\t\trf._init_set_value(node, value, ev);\r\n\t\tnode.open = !ev.rec_type;\r\n\r\n\t\tnode.blocked = this._is_modified_occurence(ev);\r\n\r\n\t\tvar ds = rf._ds;\r\n\t\tds.start = ev.start_date;\r\n\t\tds.end = ev._end_date;\r\n\r\n\t\trf._toggle_block();\r\n\r\n\t\tif (value)\r\n\t\t\trf._set_repeat_code(value, ds);\r\n\t},\r\n\tget_value:function(node, ev) {\r\n\t\tif (node.open) {\r\n\t\t\tvar ds = scheduler.form_blocks[\"recurring\"]._ds;\r\n\t\t\tvar actual_dates = {};\r\n\r\n\t\t\tvar timeControl = getTimeSection();\r\n\r\n\t\t\ttimeControl.getValue(actual_dates);\r\n\t\t\tds.start = actual_dates.start_date;\r\n\t\t\tev.rec_type = scheduler.form_blocks[\"recurring\"]._get_repeat_code(ds);\r\n\t\t\tif (ds._start) {\r\n\t\t\t\tev.start_date = new Date(ds.start);\r\n\t\t\t\tev._start_date = new Date(ds.start);\r\n\t\t\t\tds._start = false;\r\n\t\t\t} else\r\n\t\t\t\tev._start_date = null;\r\n\r\n\t\t\tev._end_date = ds.end;\r\n\t\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\t\t} else {\r\n\t\t\tev.rec_type = ev.rec_pattern = \"\";\r\n\t\t\tev._end_date = ev.end_date;\r\n\t\t}\r\n\t\treturn ev.rec_type;\r\n\t},\r\n\t_get_button: function(){\r\n\t\tvar node = getRecurringSection().header;\r\n\t\treturn node.firstChild.firstChild;\r\n\t},\r\n\t_get_form: function(){\r\n\t\treturn getRecurringSection().node;\r\n\t},\r\n\topen:function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form();\r\n\t\tif(!cont.open)\r\n\t\t\tblock._toggle_block();\r\n\t},\r\n\tclose: function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form();\r\n\r\n\t\tif(cont.open)\r\n\t\t\tblock._toggle_block();\r\n\t},\r\n\t_toggle_block: function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form(),\r\n\t\t\tel = block._get_button();\r\n\t\tif (!cont.open && !cont.blocked) {\r\n\t\t\tcont.style.height = \"auto\";//reset to default value\r\n\t\t\tif(el){\r\n\t\t\t\tel.style.backgroundPosition = \"-5px 0px\";\r\n\t\t\t\tel.nextSibling.innerHTML = scheduler.locale.labels.button_recurring_open;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tcont.style.height = \"0px\";\r\n\t\t\tif(el){\r\n\t\t\t\tel.style.backgroundPosition = \"-5px 20px\";\r\n\t\t\t\tel.nextSibling.innerHTML = scheduler.locale.labels.button_recurring;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcont.open = !cont.open;\r\n\r\n\t\tscheduler.setLightboxSize();\r\n\t},\r\n\tfocus:function(node) {\r\n\t},\r\n\tbutton_click:function(node, button, event) {\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\t\tvar cont = block._get_form();\r\n\t\tif (!cont.blocked)\r\n\t\t\tscheduler.form_blocks.recurring._toggle_block();\r\n\t}\r\n};\r\n\r\nfunction getTimeSection(){\r\n\tvar timeControl = scheduler.formSection('time');\r\n\tif(!timeControl){\r\n\t\ttimeControl = getFirstSectionOfType('time');\r\n\t}\r\n\tif(!timeControl){\r\n\t\ttimeControl = getFirstSectionOfType('calendar_time');\r\n\t}\r\n\r\n\t\r\n\tif (!timeControl) {\r\n\t\tthrow new Error([\"Can't calculate the recurring rule, the Recurring form block can't find the Time control. Make sure you have the time control in 'scheduler.config.lightbox.sections' config.\",\r\n\"You can use either the default time control https://docs.dhtmlx.com/scheduler/time.html, or the datepicker https://docs.dhtmlx.com/scheduler/minicalendar.html, or a custom control. \",\r\n\"In the latter case, make sure the control is named \\\"time\\\":\",\r\n\"\",\r\n\"scheduler.config.lightbox.sections = [\",\r\n\"{name:\\\"time\\\", height:72, type:\\\"YOU CONTROL\\\", map_to:\\\"auto\\\" }];\"]\r\n.join(\"\\n\"));\r\n\t}\r\n\r\n\treturn timeControl;\r\n}\r\n\r\nfunction getRecurringSection(){\r\n\tvar recurringSection = scheduler.formSection('recurring');\r\n\tif(!recurringSection){\r\n\t\trecurringSection = getFirstSectionOfType('recurring');\r\n\t}\r\n\r\n\tif (!recurringSection) {\r\n\t\tthrow new Error([\"Can't locate the Recurring form section.\",\r\n\t\t\"Make sure that you have the recurring control on the lightbox configuration https://docs.dhtmlx.com/scheduler/recurring_events.html#recurringlightbox \",\r\n\t\t\"and that the recurring control has name \\\"recurring\\\":\",\r\n\"\",\r\n\"scheduler.config.lightbox.sections = [\",\r\n\"\t{name:\\\"recurring\\\", ... }\",\r\n\"];\"].join(\"\\n\"));\r\n\r\n\t}\r\n\r\n\treturn recurringSection;\r\n}\r\n\r\nfunction getFirstSectionOfType(type){\r\n\tfor(var i = 0; i < scheduler.config.lightbox.sections.length; i++){\r\n\t\tvar section = scheduler.config.lightbox.sections[i];\r\n\t\tif(section.type === type){\r\n\t\t\treturn scheduler.formSection(section.name);\r\n\t\t}\r\n\t}\r\n\treturn null;\r\n}\r\n\r\n//problem may occur if we will have two repeating events in the same moment of time\r\nscheduler._rec_markers = {};\r\nscheduler._rec_markers_pull = {};\r\nscheduler._add_rec_marker = function(ev, time) {\r\n\tev._pid_time = time;\r\n\tthis._rec_markers[ev.id] = ev;\r\n\tif (!this._rec_markers_pull[ev.event_pid]) this._rec_markers_pull[ev.event_pid] = {};\r\n\tthis._rec_markers_pull[ev.event_pid][time] = ev;\r\n};\r\nscheduler._get_rec_marker = function(time, id) {\r\n\tvar ch = this._rec_markers_pull[id];\r\n\tif (ch) return ch[time];\r\n\treturn null;\r\n};\r\nscheduler._get_rec_markers = function(id) {\r\n\treturn (this._rec_markers_pull[id] || []);\r\n};\r\n\r\nfunction clearMilliseconds(date){\r\n//\treturn date;\r\n\treturn new Date(\r\n\t\tdate.getFullYear(), \r\n\t\tdate.getMonth(), \r\n\t\tdate.getDate(), \r\n\t\tdate.getHours(), \r\n\t\tdate.getMinutes(),\r\n\t\tdate.getSeconds(),\r\n\t\t0\r\n\t);\r\n}\r\n\r\nscheduler._rec_temp = [];\r\n(function() {\r\n\tvar old_add_event = scheduler.addEvent;\r\n\tscheduler.addEvent = function(start_date, end_date, text, id, extra_data) {\r\n\t\tvar ev_id = old_add_event.apply(this, arguments);\r\n\r\n\t\tif (ev_id && scheduler.getEvent(ev_id)) {\r\n\t\t\tvar ev = scheduler.getEvent(ev_id);\r\n\t\t\t\r\n\t\t\tif(ev.start_date){\r\n\t\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t\t}\r\n\t\t\tif(ev.end_date){\r\n\t\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t\t}\r\n\t\t\tif (this._is_modified_occurence(ev))\r\n\t\t\t\tscheduler._add_rec_marker(ev, ev.event_length * 1000);\r\n\t\t\tif (ev.rec_type)\r\n\t\t\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\t\t}\r\n\t\treturn ev_id;\r\n\t};\r\n})();\r\n\r\nscheduler.attachEvent(\"onEventIdChange\", function(id, new_id) {\r\n\tif (this._ignore_call) return;\r\n\tthis._ignore_call = true;\r\n\r\n\tif(scheduler._rec_markers[id]){\r\n\t\t//important for for correct work of scheduler.getEvents(from, to) and collision detection\r\n\t\tscheduler._rec_markers[new_id] = scheduler._rec_markers[id];\r\n\t\tdelete scheduler._rec_markers[id];\r\n\t}\r\n\r\n\tif(scheduler._rec_markers_pull[id]){\r\n\t\tscheduler._rec_markers_pull[new_id] = scheduler._rec_markers_pull[id];\r\n\t\tdelete scheduler._rec_markers_pull[id];\r\n\t}\r\n\r\n\tfor (var i = 0; i < this._rec_temp.length; i++) {\r\n\t\tvar tev = this._rec_temp[i];\r\n\t\tif (tev.event_pid == id) {\r\n\t\t\ttev.event_pid = new_id;\r\n\t\t\tthis.changeEventId(tev.id, new_id + \"#\" + tev.id.split(\"#\")[1]);\r\n\t\t}\r\n\t}\r\n\r\n\tfor(var i in this._rec_markers){\r\n\t\tvar tev = this._rec_markers[i];\r\n\t\tif(tev.event_pid == id){\r\n\t\t\ttev.event_pid = new_id;\r\n\t\t\ttev._pid_changed = true;\r\n\t\t}\r\n\t}\r\n\r\n\tvar el = scheduler._rec_markers[new_id];\r\n\tif(el && el._pid_changed) {\r\n\t\tdelete el._pid_changed;\r\n\t\tsetTimeout(function() {\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler.callEvent(\"onEventChanged\", [new_id, scheduler.getEvent(new_id)]);\r\n\t\t}, 1);\r\n\t}\r\n\r\n\tdelete this._ignore_call;\r\n});\r\nscheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (this._is_virtual_event(id) || (this._is_modified_occurence(ev) && ev.rec_type && ev.rec_type != 'none')) {\r\n\t\tid = id.split(\"#\");\r\n\t\tvar nid = this.uid();\r\n\t\tvar tid = (id[1]) ? id[1] : Math.round(ev._pid_time / 1000);\r\n\r\n\t\tvar nev = this._copy_event(ev);\r\n\t\tnev.id = nid;\r\n\t\tnev.event_pid = ev.event_pid || id[0];\r\n\t\tvar timestamp = tid;\r\n\t\tnev.event_length = timestamp;\r\n\t\tnev.rec_type = nev.rec_pattern = \"none\";\r\n\t\tthis.addEvent(nev);\r\n\r\n\t\tthis._add_rec_marker(nev, timestamp * 1000);\r\n\t} else {\r\n\t\tif (ev.rec_type && this._lightbox_id)\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\tvar sub = this._get_rec_markers(id);\r\n\t\tfor (var i in sub) {\r\n\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\tid = sub[i].id;\r\n\t\t\t\tif (this.getEvent(id))\r\n\t\t\t\t\tthis.deleteEvent(id, true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventDeleted\", function(id, ev){\r\n\tif(!this._is_virtual_event(id) && this._is_modified_occurence(ev)){\r\n\t\tif(!scheduler._events[id]){\r\n\t\t\tev.rec_type = ev.rec_pattern = \"none\";\r\n\t\t\tthis.setEvent(id, ev);\r\n\t\t}\r\n\t}\r\n});\r\nscheduler.attachEvent(\"onEventChanged\", function(id, event) {\r\n\tif (this._loading) return true;\r\n\r\n\tvar ev = this.getEvent(id);\r\n\r\n\tif (this._is_virtual_event(id)) {\r\n\t\tvar id = id.split(\"#\");\r\n\t\tvar nid = this.uid();\r\n\t\tthis._not_render = true;\r\n\r\n\t\tvar nev = this._copy_event(event);\r\n\t\tnev.id = nid;\r\n\t\tnev.event_pid = id[0];\r\n\t\tvar timestamp = id[1];\r\n\t\tnev.event_length = timestamp;\r\n\t\tnev.rec_type = nev.rec_pattern = \"\";\r\n\r\n\t\tthis._add_rec_marker(nev, timestamp * 1000);\r\n\t\tthis.addEvent(nev);\r\n\r\n\t\tthis._not_render = false;\r\n\r\n\t} else {\r\n\t\tif(ev.start_date){\r\n\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t}\r\n\t\tif(ev.end_date){\r\n\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t}\r\n\r\n\t\tif (ev.rec_type && this._lightbox_id){\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t}\r\n\t\tvar sub = this._get_rec_markers(id);\r\n\t\tfor (var i in sub) {\r\n\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\tdelete this._rec_markers[sub[i].id];\r\n\t\t\t\tthis.deleteEvent(sub[i].id, true);\r\n\t\t\t}\r\n\t\t}\r\n\t\tdelete this._rec_markers_pull[id];\r\n\r\n\t\t// it's possible that after editing event is no longer exists, in such case we need to remove _select_id flag\r\n\t\tvar isEventFound = false;\r\n\t\tfor (var k = 0; k < this._rendered.length; k++) {\r\n\t\t\tif (this._rendered[k].getAttribute(this.config.event_attribute) == id)\r\n\t\t\t\tisEventFound = true;\r\n\t\t}\r\n\t\tif (!isEventFound)\r\n\t\t\tthis._select_id = null;\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventAdded\", function(id) {\r\n\tif (!this._loading) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (ev.rec_type && !ev.event_length){\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventSave\", function(id, data, is_new_event) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (!ev.rec_type && data.rec_type && !this._is_virtual_event(id))\r\n\t\tthis._select_id = null;\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventCreated\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (!ev.rec_type)\r\n\t\tev.rec_type = ev.rec_pattern = ev.event_length = ev.event_pid = \"\";\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventCancel\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (ev.rec_type) {\r\n\t\tthis._roll_back_dates(ev);\r\n\t\t// a bit expensive, but we need to be sure that event re-rendered, because view can be corrupted by resize , during edit process\r\n\t\tthis.render_view_data();\r\n\t}\r\n});\r\nscheduler._roll_back_dates = function(ev) {\r\n\tif(ev.start_date){\r\n\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t}\r\n\tif(ev.end_date){\r\n\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t}\r\n\tev.event_length = Math.round((ev.end_date.valueOf() - ev.start_date.valueOf()) / 1000);\r\n\tev.end_date = ev._end_date;\r\n\tif (ev._start_date) {\r\n\t\tev.start_date.setMonth(0);\r\n\t\tev.start_date.setDate(ev._start_date.getDate());\r\n\t\tev.start_date.setMonth(ev._start_date.getMonth());\r\n\t\tev.start_date.setFullYear(ev._start_date.getFullYear());\r\n\r\n\t}\r\n};\r\n\r\nscheduler._is_virtual_event = function(id){\r\n\treturn id.toString().indexOf(\"#\") != -1;\r\n};\r\nscheduler._is_modified_occurence = function(ev){\r\n\treturn (ev.event_pid && ev.event_pid != \"0\");\r\n};\r\n\r\nscheduler.showLightbox_rec = scheduler.showLightbox;\r\nscheduler.showLightbox = function(id) {\r\n\tvar locale = this.locale;\r\n\tvar c = scheduler.config.lightbox_recurring;\r\n\tvar ev = this.getEvent(id);\r\n\tvar pid = ev.event_pid;\r\n\tvar isVirtual = this._is_virtual_event(id);\r\n\tif (isVirtual)\r\n\t\tpid = id.split(\"#\")[0];\r\n\r\n\t// show series\r\n\tvar showSeries = function(id) {\r\n\t\tvar event = scheduler.getEvent(id);\r\n\t\tevent._end_date = event.end_date;\r\n\t\tevent.end_date = new Date(event.start_date.valueOf() + event.event_length * 1000);\r\n\t\treturn scheduler.showLightbox_rec(id); // editing series\r\n\t};\r\n\r\n\tif ( (pid || pid*1 === 0) && ev.rec_type) {\r\n\t\t// direct API call on series id\r\n\t\treturn showSeries(id);\r\n\t}\r\n\tif ( !pid || pid === '0' || ( (!locale.labels.confirm_recurring || c == 'instance') || (c == 'series' && !isVirtual)) ) {\r\n\t\t// editing instance or non recurring event\r\n\t\treturn this.showLightbox_rec(id);\r\n\t}\r\n\tif (c == 'ask') {\r\n\t\tvar that = this;\r\n\t\tscheduler.modalbox({\r\n\t\t\ttext: locale.labels.confirm_recurring,\r\n\t\t\ttitle: locale.labels.title_confirm_recurring,\r\n\t\t\twidth: \"500px\",\r\n\t\t\tposition: \"middle\",\r\n\t\t\tbuttons:[locale.labels.button_edit_series, locale.labels.button_edit_occurrence, locale.labels.icon_cancel],\r\n\t\t\tcallback: function(index) {\r\n\t\t\t\tswitch(+index) {\r\n\t\t\t\t\tcase 0:\r\n\t\t\t\t\t\treturn showSeries(pid);\r\n\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\treturn that.showLightbox_rec(id);\r\n\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\tshowSeries(pid);\r\n\t}\r\n};\r\n\r\n\r\nscheduler.get_visible_events_rec = scheduler.get_visible_events;\r\nscheduler.get_visible_events = function(only_timed) {\r\n\tfor (var i = 0; i < this._rec_temp.length; i++)\r\n\t\tdelete this._events[this._rec_temp[i].id];\r\n\tthis._rec_temp = [];\r\n\r\n\tvar stack = this.get_visible_events_rec(only_timed);\r\n\tvar out = [];\r\n\tfor (var i = 0; i < stack.length; i++) {\r\n\t\tif (stack[i].rec_type) {\r\n\t\t\t//deleted element of series\r\n\t\t\tif (stack[i].rec_pattern != \"none\")\r\n\t\t\t\tthis.repeat_date(stack[i], out);\r\n\t\t}\r\n\t\telse out.push(stack[i]);\r\n\t}\r\n\treturn out;\r\n};\r\n\r\n\r\n(function() {\r\n\tvar old = scheduler.isOneDayEvent;\r\n\tscheduler.isOneDayEvent = function(ev) {\r\n\t\tif (ev.rec_type) return true;\r\n\t\treturn old.call(this, ev);\r\n\t};\r\n\tvar old_update_event = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id) {\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif(ev && ev.rec_type){\r\n\t\t\t//rec_type can be changed without the lightbox,\r\n\t\t\t// make sure rec_pattern updated as well\r\n\t\t\tev.rec_pattern = (ev.rec_type || \"\").split(\"#\")[0];\r\n\t\t}\r\n\t\tif (ev && ev.rec_type && !this._is_virtual_event(id)) {\r\n\t\t\tscheduler.update_view();\r\n\t\t} else {\r\n\t\t\told_update_event.call(this, id);\r\n\t\t}\r\n\t};\r\n})();\r\n\r\nscheduler.transponse_size = {\r\n\tday:1, week:7, month:1, year:12\r\n};\r\nscheduler.date.day_week = function(sd, day, week) {\r\n\tsd.setDate(1);\r\n\tvar originalMonth = scheduler.date.month_start(new Date(sd));\r\n\tweek = (week - 1) * 7;\r\n\tvar cday = sd.getDay();\r\n\tvar nday = day * 1 + week - cday + 1;\r\n\tsd.setDate(nday <= week ? (nday + 7) : nday);\r\n\tvar newMonth = scheduler.date.month_start(new Date(sd));\r\n\tif(originalMonth.valueOf() !== newMonth.valueOf()){\r\n\t\treturn false;\r\n\t}\r\n\treturn true;\r\n};\r\nscheduler.transpose_day_week = function(sd, list, cor, size, cor2) {\r\n\tvar cday = (sd.getDay() || (scheduler.config.start_on_monday ? 7 : 0)) - cor;\r\n\tfor (var i = 0; i < list.length; i++) {\r\n\t\tif (list[i] > cday)\r\n\t\t\treturn sd.setDate(sd.getDate() + list[i] * 1 - cday - (size ? cor : cor2));\r\n\t}\r\n\tthis.transpose_day_week(sd, list, cor + size, null, cor);\r\n};\r\nscheduler.transpose_type = function(type) {\r\n\tvar transposeRecurring = \"transpose_\" + type;\r\n\tif (!this.date[transposeRecurring]) {\r\n\t\tvar recurringParts = type.split(\"_\");\r\n\t\tvar dayDurationMs = 60 * 60 * 24 * 1000;\r\n\t\tvar addRecurring = \"add_\" + type;\r\n\t\tvar recurringStepDays = this.transponse_size[recurringParts[0]] * recurringParts[1];\r\n\r\n\t\tif (recurringParts[0] == \"day\" || recurringParts[0] == \"week\") {\r\n\t\t\tvar weekDays = null;\r\n\t\t\tif (recurringParts[4]) {\r\n\t\t\t\tweekDays = recurringParts[4].split(\",\");\r\n\t\t\t\tif (scheduler.config.start_on_monday) {\r\n\t\t\t\t\tfor (var i = 0; i < weekDays.length; i++)\r\n\t\t\t\t\t\tweekDays[i] = (weekDays[i] * 1) || 7;\r\n\t\t\t\t\tweekDays.sort();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.date[transposeRecurring] = function(nd, td) {\r\n\t\t\t\tvar delta = Math.floor((td.valueOf() - nd.valueOf()) / (dayDurationMs * recurringStepDays));\r\n\t\t\t\tif (delta > 0)\r\n\t\t\t\t\tnd.setDate(nd.getDate() + delta * recurringStepDays);\r\n\t\t\t\tif (weekDays)\r\n\t\t\t\t\tscheduler.transpose_day_week(nd, weekDays, 1, recurringStepDays);\r\n\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t\tthis.date[addRecurring] = function(sd, inc) {\r\n\t\t\t\tvar nd = new Date(sd.valueOf());\r\n\t\t\t\tif (weekDays) {\r\n\t\t\t\t\tfor (var count = 0; count < inc; count++)\r\n\t\t\t\t\t\tscheduler.transpose_day_week(nd, weekDays, 0, recurringStepDays);\r\n\t\t\t\t} else\r\n\t\t\t\t\tnd.setDate(nd.getDate() + inc * recurringStepDays);\r\n\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t}\r\n\t\telse if (recurringParts[0] == \"month\" || recurringParts[0] == \"year\") {\r\n\t\t\tthis.date[transposeRecurring] = function(nd, td, seriesInstance) {\r\n\t\t\t\tvar delta = Math.ceil(((td.getFullYear() * 12 + td.getMonth() * 1 + 1) - (nd.getFullYear() * 12 + nd.getMonth() * 1 + 1)) / (recurringStepDays) - 1);\r\n\r\n\t\t\t\tif (delta >= 0){\r\n\t\t\t\t\tnd.setDate(1);\r\n\t\t\t\t\tnd.setMonth(nd.getMonth() + delta * recurringStepDays);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn scheduler.date[addRecurring](nd, 0, seriesInstance);\r\n\t\t\t\t//if (str[3]){\r\n\t\t\t\t//\tscheduler.date.day_week(nd, str[2], str[3]);\r\n\t\t\t\t//}\r\n\t\t\t};\r\n\t\t\tthis.date[addRecurring] = function(sd, inc, seriesInstance, currentCount) {\r\n\t\t\t\tif(!currentCount){\r\n\t\t\t\t\tcurrentCount = 1;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcurrentCount++;\r\n\t\t\t\t}\r\n\t\t\t\tvar maxCount = 12;\r\n\t\t\t\tif(currentCount > maxCount){\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar nd = new Date(sd.valueOf());\r\n\t\t\t\tnd.setDate(1);\r\n\r\n\r\n\t\t\t\tnd.setMonth(nd.getMonth() + inc * recurringStepDays);\r\n\t\t\t\tvar origMonth = nd.getMonth();\r\n\t\t\t\tvar origYear = nd.getFullYear();\r\n\t\t\t\tnd.setDate(seriesInstance.start_date.getDate());\r\n\t\t\t\tif (recurringParts[3]){\r\n\t\t\t\t\tscheduler.date.day_week(nd, recurringParts[2], recurringParts[3]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar correctOverflowInstances = scheduler.config.recurring_overflow_instances;\r\n\t\t\t\tif(nd.getMonth() != origMonth && correctOverflowInstances != \"none\"){\r\n\t\t\t\t\t// no such day in a month\r\n\t\t\t\t\tif(correctOverflowInstances === \"lastDay\"){\r\n\t\t\t\t\t\t// return either last day of the month\r\n\t\t\t\t\t\tnd = new Date(origYear, origMonth + 1, 0, nd.getHours(), nd.getMinutes(), nd.getSeconds(), nd.getMilliseconds());\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t// or go to the next instance\r\n\t\t\t\t\t\tnd = scheduler.date[addRecurring](new Date(origYear, origMonth + 1, 0), inc||1, seriesInstance, currentCount);\r\n\t\t\t\t\t\t// if next instance is not possible (e.g. 'repeat on 40th day of the month') null will be returned\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.repeat_date = function(ev, stack, non_render, from, to, maxCount) {\r\n\r\n\tfrom = from || this._min_date;\r\n\tto = to || this._max_date;\r\n\tvar max = maxCount || -1;\r\n\tvar td = new Date(ev.start_date.valueOf());\r\n\r\n\tvar startHour = td.getHours();\r\n\r\n\tvar visibleCount = 0;\r\n\r\n\tif (!ev.rec_pattern && ev.rec_type)\r\n\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\r\n\tthis.transpose_type(ev.rec_pattern);\r\n\ttd = scheduler.date[\"transpose_\" + ev.rec_pattern](td, from, ev);\r\n\twhile ( td && (\r\n\t\ttd < ev.start_date ||\r\n\t\tscheduler._fix_daylight_saving_date(td,from,ev,td,new Date(td.valueOf() + ev.event_length * 1000)).valueOf() <= from.valueOf() ||\r\n\t\ttd.valueOf() + ev.event_length * 1000 <= from.valueOf())){\r\n\t\t\ttd = this.date[\"add_\" + ev.rec_pattern](td, 1, ev);\r\n\r\n\t}\r\n\twhile (td && (td < to && td < ev.end_date && (max < 0 || visibleCount < max))) {\r\n\t\ttd.setHours(startHour);\r\n\r\n\t\tvar timestamp = (scheduler.config.occurrence_timestamp_in_utc) ? Date.UTC(td.getFullYear(), td.getMonth(), td.getDate(), td.getHours(), td.getMinutes(), td.getSeconds()) : td.valueOf();\r\n\t\tvar ch = this._get_rec_marker(timestamp, ev.id);\r\n\t\tif (!ch) { // unmodified element of series\r\n\t\t\tvar ted = new Date(td.valueOf() + ev.event_length * 1000);\r\n\t\t\tvar copy = this._copy_event(ev);\r\n\t\t\t//copy._timed = ev._timed;\r\n\t\t\tcopy.text = ev.text;\r\n\t\t\tcopy.start_date = td;\r\n\t\t\tcopy.event_pid = ev.id;\r\n\t\t\tcopy.id = ev.id + \"#\" + Math.round(timestamp / 1000);\r\n\t\t\tcopy.end_date = ted;\r\n\r\n\t\t\tcopy.end_date = scheduler._fix_daylight_saving_date(copy.start_date, copy.end_date, ev, td, copy.end_date);\r\n\r\n\t\t\tcopy._timed = this.isOneDayEvent(copy);\r\n\r\n\t\t\tif (!copy._timed && !this._table_view && !this.config.multi_day) return;\r\n\t\t\tstack.push(copy);\r\n\r\n\t\t\tif (!non_render) {\r\n\t\t\t\tthis._events[copy.id] = copy;\r\n\t\t\t\tthis._rec_temp.push(copy);\r\n\t\t\t}\r\n\r\n\t\t\tvisibleCount++;\r\n\r\n\t\t} else\r\n\t\tif (non_render){\r\n\t\t\tif(ch.rec_type != \"none\"){\r\n\t\t\t\tvisibleCount++;\r\n\t\t\t}\r\n\t\t\tstack.push(ch);\r\n\t\t}\r\n\r\n\t\ttd = this.date[\"add_\" + ev.rec_pattern](td, 1, ev);\r\n\t//\tif(!scheduler.date[\"validate_add_\" + ev.rec_pattern](td, 1, ev.rec_pattern)){\r\n\t///\t\talert(\"detect add\")\r\n\t//\t}\r\n\t}\r\n};\r\nscheduler._fix_daylight_saving_date = function(start_date, end_date, ev, counter, default_date) {\r\n\tvar shift = start_date.getTimezoneOffset() - end_date.getTimezoneOffset();\r\n\tif (shift) {\r\n\t\tif (shift > 0) {\r\n\t\t\t// e.g. 24h -> 23h\r\n\t\t\treturn new Date(counter.valueOf() + ev.event_length * 1000 - shift * 60 * 1000);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// e.g. 24h -> 25h\r\n\t\t\treturn new Date(end_date.valueOf() - shift * 60 * 1000);\r\n\t\t}\r\n\t}\r\n\treturn new Date(default_date.valueOf());\r\n};\r\nscheduler.getRecDates = function(id, max) {\r\n\tvar ev = typeof id == \"object\" ? id : scheduler.getEvent(id);\r\n\tvar recurrings = [];\r\n\tmax = max || 100;\r\n\r\n\tif (!ev.rec_type) {\r\n\t\treturn [\r\n\t\t\t{ start_date: ev.start_date, end_date: ev.end_date }\r\n\t\t];\r\n\t}\r\n\tif (ev.rec_type == \"none\") {\r\n\t\treturn [];\r\n\t}\r\n\r\n\tscheduler.repeat_date(ev, recurrings, true, ev.start_date, ev.end_date, max);\r\n\r\n\tvar result = [];\r\n\tfor(var i = 0; i < recurrings.length; i++){\r\n\t\tif(recurrings[i].rec_type != \"none\"){\r\n\t\t\tresult.push({start_date: recurrings[i].start_date, end_date: recurrings[i].end_date});\r\n\t\t}\r\n\t}\r\n\r\n\treturn result;\r\n};\r\nscheduler.getEvents = function(from, to) {\r\n\tvar result = [];\r\n\tfor (var a in this._events) {\r\n\t\tvar ev = this._events[a];\r\n\t\tif (ev && ev.start_date < to && ev.end_date > from) {\r\n\t\t\tif (ev.rec_pattern) {\r\n\t\t\t\tif (ev.rec_pattern == \"none\") continue;\r\n\t\t\t\tvar sev = [];\r\n\t\t\t\tthis.repeat_date(ev, sev, true, from, to);\r\n\t\t\t\tfor (var i = 0; i < sev.length; i++) {\r\n\t\t\t\t\t// if event is in rec_markers then it will be checked by himself, here need to skip it\r\n\t\t\t\t\tif (!sev[i].rec_pattern && sev[i].start_date < to && sev[i].end_date > from && !this._rec_markers[sev[i].id]) {\r\n\t\t\t\t\t\tresult.push(sev[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if (!this._is_virtual_event(ev.id)) { // if it's virtual event we can skip it\r\n\t\t\t\tresult.push(ev);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n};\r\n\r\nscheduler.config.repeat_date = \"%m.%d.%Y\";\r\nscheduler.config.lightbox.sections = [\r\n\t{name:\"description\", map_to:\"text\", type:\"textarea\" , focus:true},\r\n\t{name:\"recurring\", type:\"recurring\", map_to:\"rec_type\", button:\"recurring\"},\r\n\t{name:\"time\", height:72, type:\"time\", map_to:\"auto\"}\r\n];\r\n\r\n\r\n//drop secondary attributes\r\nscheduler._copy_dummy = function(ev) {\r\n\tvar start_date = new Date(this.start_date);\r\n\tvar end_date = new Date(this.end_date);\r\n\tthis.start_date = start_date;\r\n\tthis.end_date = end_date;\r\n\tthis.event_length = this.event_pid = this.rec_pattern = this.rec_type = null;\r\n};\r\n\r\nscheduler.config.include_end_by = false;\r\nscheduler.config.lightbox_recurring = 'ask'; // series, instance\r\n\r\nscheduler.attachEvent(\"onClearAll\", function(){\r\n\tscheduler._rec_markers = {}; //clear recurring events data\r\n\tscheduler._rec_markers_pull = {};\r\n\tscheduler._rec_temp = [];\r\n});\r\n\r\n}","import getSerializator from '../core/common/get_serializable_events';\r\nexport default function(scheduler){\r\n\r\n\t\r\nconst getSerializableData = getSerializator(scheduler);\r\n\r\n//redefine this method, if you want to provide a custom set of attributes for serialization\r\nscheduler.data_attributes=function(){\r\n\tvar attrs = [];\r\n\tvar format = scheduler._helpers.formatDate;\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\t\tfor (var name in ev)\r\n\t\t\tif (name.substr(0,1) !=\"_\")\r\n\t\t\t\tattrs.push([name,((name == \"start_date\" || name == \"end_date\")?format:null)]);\r\n\t\tbreak;\r\n\t}\r\n\treturn attrs;\r\n};\r\n\r\nscheduler.toXML = function(header){\r\n\tvar xml = [];\r\n\tvar attrs = this.data_attributes();\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\r\n\t\txml.push(\"\");\r\n\t\tfor (var i=0; i < attrs.length; i++)\r\n\t\t\txml.push(\"<\"+attrs[i][0]+\">\");\r\n\r\n\t\txml.push(\"\");\r\n\t}\r\n\treturn (header||\"\")+\"\"+xml.join(\"\\n\")+\"\";\r\n};\r\n\r\nscheduler._serialize_json_value = function(value){\r\n\tif(value === null || typeof value === \"boolean\"){\r\n\t\tvalue = \"\" + value;\r\n\t}else{\r\n\t\tif(!value && value !== 0){\r\n\t\t\tvalue = \"\";\r\n\t\t}\r\n\t\tvalue = '\"' + value.toString().\r\n\t\t\treplace(/\\n/g,\"\").\r\n\t\t\treplace(/\\\\/g,\"\\\\\\\\\").\r\n\t\t\treplace(/\"/g, '\\\\\"') + '\"';\r\n\t}\r\n\treturn value;\r\n};\r\n\r\n\r\n\r\nscheduler.toJSON = function(){\r\n\treturn JSON.stringify(this.serialize());\r\n};\r\n\r\n\r\nscheduler.toICal = function(header){\r\n\tvar start = \"BEGIN:VCALENDAR\\nVERSION:2.0\\nPRODID:-//dhtmlXScheduler//NONSGML v2.2//EN\\nDESCRIPTION:\";\r\n\tvar end = \"END:VCALENDAR\";\r\n\tvar format = scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\");\r\n\tvar full_day_format = scheduler.date.date_to_str(\"%Y%m%d\");\r\n\r\n\tvar ical = [];\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\r\n\r\n\t\tical.push(\"BEGIN:VEVENT\");\r\n\t\tif (!ev._timed || (!ev.start_date.getHours() && !ev.start_date.getMinutes()))\r\n\t\t\tical.push(\"DTSTART:\"+full_day_format(ev.start_date));\r\n\t\telse\r\n\t\t\tical.push(\"DTSTART:\"+format(ev.start_date));\r\n\t\tif (!ev._timed || (!ev.end_date.getHours() && !ev.end_date.getMinutes()))\r\n\t\t\tical.push(\"DTEND:\"+full_day_format(ev.end_date));\r\n\t\telse\r\n\t\t\tical.push(\"DTEND:\"+format(ev.end_date));\r\n\t\tical.push(\"SUMMARY:\"+ev.text);\r\n\t\tical.push(\"END:VEVENT\");\r\n\t}\r\n\treturn start+(header||\"\")+\"\\n\"+ical.join(\"\\n\")+\"\\n\"+end;\r\n};\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Timeline\", scheduler.assert);\r\n}","interface IViewPosition{\r\n\ttop: number;\r\n\tleft: number;\r\n}\r\n\r\ninterface IViewBox extends IViewPosition{\r\n\twidth: number;\r\n\theight: number;\r\n\tbottom: number;\r\n\tright: number;\r\n}\r\n\r\nexport class Tooltip {\r\n\tprivate _root: HTMLElement;\r\n\tprivate _tooltipNode: HTMLElement | null;\r\n\tprivate _scheduler: any;\r\n\r\n\tconstructor(scheduler: any){\r\n\t\tthis._scheduler = scheduler;\r\n\t}\r\n\r\n\tgetNode() : HTMLElement {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tif (!this._tooltipNode){\r\n\t\t\tthis._tooltipNode = document.createElement(\"div\");\r\n\t\t\tthis._tooltipNode.className = \"dhtmlXTooltip scheduler_tooltip tooltip\";\r\n\r\n\t\t\tscheduler._waiAria.tooltipAttr(this._tooltipNode);\r\n\t\t}\r\n\t\tif(scheduler.config.rtl){\r\n\t\t\tthis._tooltipNode.classList.add(\"dhtmlXTooltip_rtl\");\r\n\t\t} else{\r\n\t\t\tthis._tooltipNode.classList.remove(\"dhtmlXTooltip_rtl\");\r\n\t\t}\r\n\t\treturn this._tooltipNode;\r\n\t}\r\n\r\n\tsetViewport(node: HTMLElement):Tooltip{\r\n\t\tthis._root = node;\r\n\t\treturn this;\r\n\t}\r\n\r\n\tshow(left: number, top: number): Tooltip;\r\n\tshow(event: MouseEvent): Tooltip;\r\n\tshow(left: number | MouseEvent, top?: number): Tooltip {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tconst container = document.body;\r\n\t\tconst node = this.getNode();\r\n\r\n\t\tif(!domHelpers.isChildOf(node, container)){\r\n\t\t\tthis.hide();\r\n\t\t\tcontainer.appendChild(node);\r\n\t\t}\r\n\r\n\t\tif (this._isLikeMouseEvent(left)) {\r\n\t\t\tconst position = this._calculateTooltipPosition(left as MouseEvent);\r\n\t\t\ttop = position.top;\r\n\t\t\tleft = position.left;\r\n\t\t}\r\n\r\n\t\tnode.style.top = top + \"px\";\r\n\t\tnode.style.left = left + \"px\";\r\n\r\n\t\tscheduler._waiAria.tooltipVisibleAttr(node);\r\n\t\treturn this;\r\n\t}\r\n\thide() : Tooltip{\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst node = this.getNode();\r\n\t\tif(node && node.parentNode){\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t}\r\n\t\tscheduler._waiAria.tooltipHiddenAttr(node);\r\n\t\treturn this;\r\n\t}\r\n\r\n\tsetContent(html: string) : Tooltip{\r\n\t\tconst node = this.getNode();\r\n\t\tnode.innerHTML = html;\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// it is for salesforce, because it proxies event to it own events\r\n\tprivate _isLikeMouseEvent(event: any): boolean {\r\n\t\tif (!event || typeof event !== \"object\") {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn \"clientX\" in event && \"clientY\" in event;\r\n\t}\r\n\r\n\tprivate _getViewPort() : HTMLElement {\r\n\t\treturn this._root || document.body;\r\n\t}\r\n\r\n\r\n\tprivate _calculateTooltipPosition(event: MouseEvent): IViewPosition{\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\t// top/left coordinates inside the viewport by mouse position\r\n\t\tconst viewport = this._getViewPortSize();\r\n\t\tconst tooltipNode = this.getNode();\r\n\t\tconst tooltip: IViewBox = {\r\n\t\t\ttop:0,\r\n\t\t\tleft: 0,\r\n\t\t\twidth: tooltipNode.offsetWidth,\r\n\t\t\theight: tooltipNode.offsetHeight,\r\n\t\t\tbottom: 0,\r\n\t\t\tright: 0\r\n\t\t};\r\n\r\n\t\tconst offsetX = scheduler.config.tooltip_offset_x;\r\n\t\tconst offsetY = scheduler.config.tooltip_offset_y;\r\n\r\n\t\tconst container = document.body;\r\n\t\tconst mouse = domHelpers.getRelativeEventPosition(event, container);\r\n\t\tconst containerPos = domHelpers.getNodePosition(container);\r\n\t\tmouse.y += containerPos.y; // to fix margin collapsing\r\n\r\n\t\ttooltip.top = mouse.y;\r\n\t\ttooltip.left = mouse.x;\r\n\t\ttooltip.top += offsetY;\r\n\t\ttooltip.left += offsetX;\r\n\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\ttooltip.right = tooltip.left + tooltip.width;\r\n\r\n\t\tconst scrollTop = window.scrollY + container.scrollTop; // to fix margin collapsing\r\n\t\t// edge cases when the tooltip element can be partially hidden by edges of the viewport\r\n\t\tif(tooltip.top < viewport.top - scrollTop){\r\n\t\t\ttooltip.top = viewport.top;\r\n\t\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\t}else if(tooltip.bottom > viewport.bottom){\r\n\t\t\ttooltip.bottom = viewport.bottom;\r\n\t\t\ttooltip.top = tooltip.bottom - tooltip.height;\r\n\t\t}\r\n\r\n\t\tif(tooltip.left < viewport.left){\r\n\t\t\ttooltip.left = viewport.left;\r\n\t\t\ttooltip.right = viewport.left + tooltip.width;\r\n\t\t}else if(tooltip.right > viewport.right){\r\n\t\t\ttooltip.right = viewport.right;\r\n\t\t\ttooltip.left = tooltip.right - tooltip.width;\r\n\t\t}\r\n\r\n\t\tif(mouse.x >= tooltip.left && mouse.x <= tooltip.right) {\r\n\t\t\ttooltip.left = mouse.x - tooltip.width - offsetX;\r\n\t\t\ttooltip.right = tooltip.left + tooltip.width;\r\n\t\t}\r\n\r\n\t\tif(mouse.y >= tooltip.top && mouse.y <= tooltip.bottom) {\r\n\t\t\ttooltip.top = mouse.y - tooltip.height - offsetY;\r\n\t\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\t}\r\n\r\n\t\treturn tooltip;\r\n\t}\r\n\r\n\tprivate _getViewPortSize() : IViewBox {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tconst container = this._getViewPort();\r\n\t\tlet viewport = container;\r\n\t\tlet scrollTop = window.scrollY + document.body.scrollTop;\r\n\t\tlet scrollLeft = window.scrollX + document.body.scrollLeft;\r\n\t\tlet pos;\r\n\t\t// support for the initial tooltip mode where the tooltip element was attached to the data area of scheduler\r\n\t\tif(container === scheduler.$event_data){\r\n\t\t\tviewport = scheduler.$event;\r\n\t\t\tscrollTop = 0;\r\n\t\t\tscrollLeft = 0;\r\n\t\t\tpos = domHelpers.getNodePosition(scheduler.$event);\r\n\t\t}else{\r\n\t\t\tpos = domHelpers.getNodePosition(viewport);\r\n\t\t}\r\n\t\treturn {\r\n\t\t\tleft:pos.x + scrollLeft,\r\n\t\t\ttop: pos.y + scrollTop,\r\n\t\t\twidth: pos.width,\r\n\t\t\theight: pos.height,\r\n\t\t\tbottom: pos.y + pos.height + scrollTop,\r\n\t\t\tright: pos.x + pos.width + scrollLeft\r\n\t\t};\r\n\t}\r\n}\r\n","import * as utils from \"../../core/utils/utils\";\r\nimport { Tooltip } from \"./tooltip\";\r\n\r\ninterface ITrackerTarget {\r\n\tselector: string;\r\n\tonmouseenter: (event: MouseEvent, node: HTMLElement) => void;\r\n\tonmousemove: (event: MouseEvent, node: HTMLElement) => void;\r\n\tonmouseleave: (event: MouseEvent, node: HTMLElement) => void;\r\n\tglobal: boolean;\r\n}\r\n\r\ninterface ITooltipConfig {\r\n\tselector: string;\r\n\thtml: (event: MouseEvent, node: HTMLElement) => string;\r\n\tglobal: boolean;\r\n}\r\n\r\nexport class TooltipManager{\r\n\ttooltip: Tooltip;\r\n\tprotected _domEvents: any;\r\n\tprivate _listeners: object = {};\r\n\tprivate _scheduler: any;\r\n\tprivate delayShow: any;\r\n\tprivate delayHide: any;\r\n\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.tooltip = new Tooltip(scheduler);\r\n\t\tthis._scheduler = scheduler;\r\n\t\tthis._domEvents = scheduler._createDomEventScope();\r\n\t\tthis._initDelayedFunctions();\r\n\t}\r\n\r\n\tdestructor(): void{\r\n\t\tthis.tooltip.hide();\r\n\t\tthis._domEvents.detachAll();\r\n\t}\r\n\thideTooltip(): void{\r\n\t\tthis.delayHide();\r\n\t}\r\n\tattach(config: ITrackerTarget): void {\r\n\t\tlet root = document.body;\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tif(!config.global){\r\n\t\t\troot = scheduler.$root;\r\n\t\t}\r\n\r\n\t\tlet watchableTarget = null;\r\n\t\tconst handler = (event) => {\r\n\t\t\tconst eventTarget = domHelpers.getTargetNode(event);\r\n\t\t\tconst targetNode = domHelpers.closest(eventTarget, config.selector);\r\n\t\t\tif(domHelpers.isChildOf(eventTarget, this.tooltip.getNode())){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tconst doOnMouseEnter = () => {\r\n\t\t\t\twatchableTarget = targetNode;\r\n\t\t\t\tconfig.onmouseenter(event, targetNode);\r\n\t\t\t};\r\n\t\t\t// GS-2377: to show tooltip after touch and hide it when touch is outside the events\r\n\t\t\tif (scheduler._mobile && scheduler.config.touch_tooltip){\r\n\t\t\t\tif(targetNode){\r\n\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tconfig.onmouseleave(event, targetNode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(watchableTarget){\r\n\t\t\t\tif(targetNode && targetNode === watchableTarget){\r\n\t\t\t\t\tconfig.onmousemove(event, targetNode);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconfig.onmouseleave(event, watchableTarget);\r\n\t\t\t\t\twatchableTarget = null;\r\n\r\n\t\t\t\t\tif(targetNode && targetNode !== watchableTarget){\r\n\t\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(targetNode){\r\n\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.detach(config.selector);\r\n\t\tthis._domEvents.attach(root, \"mousemove\", handler);\r\n\t\tthis._listeners[config.selector] = {\r\n\t\t\tnode: root,\r\n\t\t\thandler\r\n\t\t};\r\n\t}\r\n\r\n\tdetach(selector: string): void {\r\n\t\tconst listener = this._listeners[selector];\r\n\t\tif(listener){\r\n\t\t\tthis._domEvents.detach(listener.node, \"mousemove\", listener.handler);\r\n\t\t}\r\n\t}\r\n\r\n\ttooltipFor(config: ITooltipConfig): void {\r\n\t\tconst cloneDomEvent = (event: MouseEvent) => {\r\n\t\t\tlet clone = event;\r\n\t\t\t// making events survive timeout in ie\r\n\t\t\t// tslint:disable-next-line no-string-literal\r\n\t\t\tif(document[\"createEventObject\"] && !document.createEvent){\r\n\t\t\t\t// tslint:disable-next-line no-string-literal\r\n\t\t\t\tclone = document[\"createEventObject\"](event);\r\n\t\t\t}\r\n\t\t\treturn clone;\r\n\t\t};\r\n\t\tthis._initDelayedFunctions();\r\n\t\tthis.attach({\r\n\t\t\tselector: config.selector,\r\n\t\t\tglobal: config.global,\r\n\t\t\tonmouseenter:(event: MouseEvent, node: HTMLElement) => {\r\n\t\t\t\tconst html = config.html(event, node);\r\n\t\t\t\tif(html){\r\n\t\t\t\t\tthis.delayShow(cloneDomEvent(event), html);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonmousemove:(event: MouseEvent, node: HTMLElement) => {\r\n\t\t\t\tconst html = config.html(event, node);\r\n\t\t\t\tif(html){\r\n\t\t\t\t\tthis.delayShow(cloneDomEvent(event), html);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\t\t\tthis.delayHide();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonmouseleave:() => {\r\n\t\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\t\tthis.delayHide();\r\n\t\t\t},\r\n\t\t});\r\n\t}\r\n\r\n\tprivate _initDelayedFunctions(){\r\n\t\tconst scheduler = this._scheduler;\r\n\t\t// reset delayed functions in order to apply current values of tooltip_timeout\r\n\t\tif(this.delayShow){\r\n\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t}\r\n\t\tif(this.delayHide){\r\n\t\t\tthis.delayHide.$cancelTimeout();\r\n\t\t}\r\n\t\tthis.tooltip.hide();\r\n\t\t\r\n\t\tthis.delayShow = (utils as any).default.delay((event: MouseEvent, html: string) => {\r\n\t\t\tif(scheduler.callEvent(\"onBeforeTooltip\", [event]) === false) {\r\n\t\t\t\tthis.tooltip.hide();\r\n\t\t\t} else {\r\n\t\t\t\tthis.tooltip.setContent(html);\r\n\t\t\t\tthis.tooltip.show(event);\r\n\t\t\t}\r\n\t\t}, scheduler.config.tooltip_timeout || 1);\r\n\r\n\t\tthis.delayHide = (utils as any).default.delay(() => {\r\n\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\tthis.tooltip.hide();\r\n\t\t}, scheduler.config.tooltip_hide_timeout || 1);\r\n\t}\r\n\r\n}","import { TooltipManager } from \"./tooltipManager\";\r\n\r\nexport default function (scheduler: any) {\r\n\r\n\tscheduler.config.tooltip_timeout = 30;\r\n\tscheduler.config.tooltip_offset_y = 20;\r\n\tscheduler.config.tooltip_offset_x = 10;\r\n\tscheduler.config.tooltip_hide_timeout = 30;\r\n\r\n\tconst tooltipManager = new TooltipManager(scheduler);\r\n\r\n\tscheduler.ext.tooltips = tooltipManager;\r\n\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function () {\r\n\r\n\t\ttooltipManager.tooltipFor({\r\n\t\t\tselector: \"[\" + scheduler.config.event_attribute + \"]\",\r\n\t\t\thtml: (event: MouseEvent) => {\r\n\t\t\t\tif (scheduler._mobile && !scheduler.config.touch_tooltip) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst targetEventId = scheduler._locate_event(event.target);\r\n\t\t\t\tif (scheduler.getEvent(targetEventId)) {\r\n\t\t\t\t\tconst event = scheduler.getEvent(targetEventId);\r\n\t\t\t\t\treturn scheduler.templates.tooltip_text(event.start_date, event.end_date, event);\r\n\t\t\t\t}\r\n\t\t\t\treturn null;\r\n\t\t\t},\r\n\t\t\tglobal: false\r\n\t\t});\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function () {\r\n\t\ttooltipManager.destructor();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onLightbox\", function () {\r\n\t\ttooltipManager.hideTooltip();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeDrag\", function() {\r\n\t\t// GS-2377: don't hide tooltip on mobile device when ontouchstart event occurs\r\n\t\tif (scheduler._mobile && scheduler.config.touch_tooltip) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\ttooltipManager.hideTooltip();\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function() {\r\n\t\ttooltipManager.hideTooltip();\r\n\t\treturn true;\r\n\t});\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Tree Timeline\", scheduler.assert);\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Units\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\nscheduler._get_url_nav = function(){\r\n\tvar p = {};\r\n\tvar data = (document.location.hash || \"\").replace(\"#\", \"\").split(\",\");\r\n\tfor (var i = 0; i < data.length; i++) {\r\n\t\tvar s = data[i].split(\"=\");\r\n\t\tif (s.length == 2)\r\n\t\t\tp[s[0]] = s[1];\r\n\t}\r\n\treturn p;\r\n};\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function () {\r\n\tvar first = true;\r\n\tvar s2d = scheduler.date.str_to_date(\"%Y-%m-%d\");\r\n\tvar d2s = scheduler.date.date_to_str(\"%Y-%m-%d\");\r\n\tvar select_event = scheduler._get_url_nav().event || null;\r\n\r\n\tscheduler.attachEvent(\"onAfterEventDisplay\", function(ev){\r\n\t\tselect_event = null;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function (om, od, m, d) {\r\n\t\tif (first) {\r\n\t\t\tfirst = false;\r\n\t\t\tvar p = scheduler._get_url_nav();\r\n\r\n\t\t\tif (p.event){\r\n\t\t\t\ttry{\r\n\t\t\t\t\tif(scheduler.getEvent(p.event)){\r\n\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\tshowEvent(p.event);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tvar handler = scheduler.attachEvent(\"onXLE\", function(){\r\n\t\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\t\tshowEvent(p.event);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\tscheduler.detachEvent(handler);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (e){}\r\n\t\t\t}\r\n\r\n\t\t\tif (p.date || p.mode) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthis.setCurrentView((p.date ? s2d(p.date) : null), (p.mode || null));\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\t//assuming that mode is not available anymore\r\n\t\t\t\t\tthis.setCurrentView((p.date ? s2d(p.date) : null), m);\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar values = [\r\n\t\t\t\"date=\" + d2s(d || od),\r\n\t\t\t\"mode=\" + (m || om)\r\n\t\t];\r\n\r\n\t\tif(select_event){\r\n\t\t\tvalues.push(\"event=\" + select_event);\r\n\t\t}\r\n\r\n\t\tvar text = \"#\" + values.join(\",\");\r\n\t\tdocument.location.hash = text;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tfunction showEvent(e){\r\n\t\tif(scheduler.$destroyed){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tselect_event = e;\r\n\t\tif(scheduler.getEvent(e)){\r\n\t\t\tscheduler.showEvent(e);\r\n\t\t}\r\n\t}\r\n});\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Week Agenda\", scheduler.assert);\r\n}","export default function(scheduler){\r\nscheduler.attachEvent(\"onLightBox\",function(){\r\n\tif (this._cover){\r\n\t\ttry{\r\n\t\t\tthis._cover.style.height = this.expanded ? \"100%\" : ((document.body.parentNode||document.body).scrollHeight+\"px\");\r\n\t\t} catch(e) {\r\n\r\n\t\t}\r\n\t}\r\n});\r\n\r\nscheduler.form_blocks.select.set_value=function(node,value,ev){\r\n\tif (typeof value == \"undefined\" || value === \"\")\r\n\t\tvalue = (node.firstChild.options[0]||{}).value;\r\n\tnode.firstChild.value=value||\"\";\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\t// scheduler.config.year_x = 4;\r\n\t// scheduler.config.year_y = 3;\r\n\t// scheduler.xy.year_top = 0;\r\n\r\n\tscheduler.templates.year_date = function(date) {\r\n\t\treturn scheduler.date.date_to_str(scheduler.locale.labels.year_tab + \" %Y\")(date);\r\n\t};\r\n\tscheduler.templates.year_month = scheduler.date.date_to_str(\"%F\");\r\n\tscheduler.templates.year_scale_date = scheduler.date.date_to_str(\"%D\");\r\n\tscheduler.templates.year_tooltip = function(s, e, ev) {\r\n\t\treturn ev.text;\r\n\t};\r\n\r\n\tconst isYearMode = function() {\r\n\t\treturn scheduler._mode == \"year\";\r\n\t};\r\n\t\r\n\tconst getCellDate = function(node){\r\n\t\tvar day = scheduler.$domHelpers.closest(node, \"[data-cell-date]\");\r\n\t\tif(!day || !day.hasAttribute(\"data-cell-date\")) return null;\r\n\t\treturn scheduler.templates.parse_date(day.getAttribute(\"data-cell-date\"));\r\n\t};\r\n\r\n\t// dbl click hook for scheduler._on_dbl_click\r\n\tscheduler.dblclick_dhx_year_grid= function(e) {\r\n\t\tif (isYearMode()) {\r\n\t\t\tconst target = e.target;\r\n\t\t\tif(scheduler.$domHelpers.closest(target, \".dhx_before\") || scheduler.$domHelpers.closest(target, \".dhx_after\")){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tconst date = getCellDate(target);\r\n\t\t\t\r\n\t\t\tif(date){\r\n\t\t\t\tconst start = date;\r\n\t\t\t\tconst end = this.date.add(start, 1, \"day\");\r\n\t\t\t\tif (!this.config.readonly && this.config.dblclick_create){\r\n\t\t\t\t\tthis.addEventNow(start.valueOf(), end.valueOf(), e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\t\r\n\tscheduler.attachEvent(\"onEventIdChange\", function(){\r\n\t\tif (isYearMode())\r\n\t\t\tthis.year_view(true);\r\n\t});\r\n\r\n\r\n\tvar old = scheduler.render_data;\r\n\tscheduler.render_data = function(evs) {\r\n\t\tif (!isYearMode()) return old.apply(this, arguments);\r\n\t\tfor (var i = 0; i < evs.length; i++)\r\n\t\t\tthis._year_render_event(evs[i]);\r\n\t};\r\n\r\n\tvar clear = scheduler.clear_view;\r\n\tscheduler.clear_view = function() {\r\n\t\tif (!isYearMode()) return clear.apply(this, arguments);\r\n\t\tvar dates = scheduler._year_marked_cells,\r\n\t\t\tdiv = null;\r\n\t\tfor (var date in dates) {\r\n\t\t\tif (dates.hasOwnProperty(date)) {\r\n\t\t\t\tdiv = dates[date];\r\n\t\t\t\tdiv.classList.remove(\"dhx_year_event\", \"dhx_cal_datepicker_event\");\r\n\t\t\t\t// div.className = \"dhx_month_head\";\r\n\t\t\t\t// div.removeAttribute(\"date\");\r\n\t\t\t\t// div.removeAttribute(\"data-year-date\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._year_marked_cells = {};\r\n\t};\r\n\r\n\tscheduler._hideToolTip = function() {\r\n\t\tif (this._tooltip) {\r\n\t\t\tthis._tooltip.style.display = \"none\";\r\n\t\t\tthis._tooltip.date = new Date(9999, 1, 1);\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._showToolTip = function(date, pos, e, src) {\r\n\t\tif (this._tooltip) {\r\n\t\t\tif (this._tooltip.date.valueOf() == date.valueOf()) return;\r\n\t\t\tthis._tooltip.innerHTML = \"\";\r\n\t\t} else {\r\n\t\t\tvar t = this._tooltip = document.createElement(\"div\");\r\n\t\t\tt.className = \"dhx_year_tooltip\";\r\n\t\t\tif (this.config.rtl) t.className += \" dhx_tooltip_rtl\";\r\n\t\t\tdocument.body.appendChild(t);\r\n\t\t\tt.addEventListener(\"click\", scheduler._click.dhx_cal_data);\r\n\t\t\tt.addEventListener(\"click\", function(e){\r\n\t\t\t\tif(e.target.closest(`[${scheduler.config.event_attribute}]`)){\r\n\t\t\t\t\tconst id = e.target.closest(`[${scheduler.config.event_attribute}]`).getAttribute(scheduler.config.event_attribute);\r\n\t\t\t\t\tscheduler.showLightbox(id);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\tvar evs = this.getEvents(date, this.date.add(date, 1, \"day\"));\r\n\t\tvar html = \"\";\r\n\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tif(!this.filter_event(ev.id, ev))\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\t\t\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\t\t\thtml += \"
\";\r\n\t\t\thtml += \"
\" + (evs[i]._timed ? this.templates.event_date(evs[i].start_date) : \"\") + \"
\";\r\n\t\t\thtml += \"
 
\";\r\n\t\t\thtml += this.templates.year_tooltip(evs[i].start_date, evs[i].end_date, evs[i]) + \"
\";\r\n\t\t}\r\n\r\n\t\tthis._tooltip.style.display = \"\";\r\n\t\tthis._tooltip.style.top = \"0px\";\r\n\r\n\r\n\t\tif (document.body.offsetWidth - pos.left - this._tooltip.offsetWidth < 0)\r\n\t\t\tthis._tooltip.style.left = pos.left - this._tooltip.offsetWidth + \"px\";\r\n\t\telse\r\n\t\t\tthis._tooltip.style.left = pos.left + src.offsetWidth + \"px\";\r\n\r\n\t\tthis._tooltip.date = date;\r\n\t\tthis._tooltip.innerHTML = html;\r\n\r\n\t\tif (document.body.offsetHeight - pos.top - this._tooltip.offsetHeight < 0)\r\n\t\t\tthis._tooltip.style.top = pos.top - this._tooltip.offsetHeight + src.offsetHeight + \"px\";\r\n\t\telse\r\n\t\t\tthis._tooltip.style.top = pos.top + \"px\";\r\n\t};\r\n\r\n\tscheduler._year_view_tooltip_handler = function(e){\r\n\t\tif (!isYearMode()) return;\r\n\r\n\t\tvar src = e.target || e.srcElement;\r\n\t\tif (src.tagName.toLowerCase() == 'a') // fix for active links extension (it adds links to the date in the cell)\r\n\t\t\tsrc = src.parentNode;\r\n\t\tif (scheduler._getClassName(src).indexOf(\"dhx_year_event\") != -1)\r\n\t\t\tscheduler._showToolTip(scheduler.templates.parse_date(src.getAttribute(\"data-year-date\")), scheduler.$domHelpers.getOffset(src), e, src);\r\n\t\telse\r\n\t\t\tscheduler._hideToolTip();\r\n\t};\r\n\tscheduler._init_year_tooltip = function() {\r\n\t\tscheduler._detachDomEvent(scheduler._els[\"dhx_cal_data\"][0], \"mouseover\", scheduler._year_view_tooltip_handler);\r\n\t\tscheduler.event(scheduler._els[\"dhx_cal_data\"][0], \"mouseover\", scheduler._year_view_tooltip_handler);\r\n\t};\r\n\r\n\tscheduler._get_year_cell = function(d) {\r\n\t\tvar dateString = scheduler.templates.format_date(d);\r\n\t\tvar cells = this.$root.querySelectorAll(`.dhx_cal_data .dhx_cal_datepicker_date[data-cell-date=\"${dateString}\"]`);\r\n\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\tif(!scheduler.$domHelpers.closest(cells[i], \".dhx_after, .dhx_before\")){\r\n\t\t\t\treturn cells[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t};\r\n\r\n\tscheduler._year_marked_cells = {};\r\n\tscheduler._mark_year_date = function(date, event) {\r\n\t\tvar dateString = scheduler.templates.format_date(date);\r\n\t\tvar cell = this._get_year_cell(date);\r\n\t\tif (!cell) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar ev_class = this.templates.event_class(event.start_date, event.end_date, event);\r\n\t\tif (!scheduler._year_marked_cells[dateString]) {\r\n\t\t\tcell.classList.add(\"dhx_year_event\", \"dhx_cal_datepicker_event\");// = \"dhx_month_head dhx_year_event\";\r\n\t\t\tcell.setAttribute(\"data-year-date\", dateString);\r\n\t\t\tcell.setAttribute(\"date\", dateString);\r\n\t\t\tscheduler._year_marked_cells[dateString] = cell;\r\n\t\t}\r\n\t\tif(ev_class){\r\n\t\t\tcell.classList.add(ev_class);\r\n\t\t}\r\n\t};\r\n\tscheduler._unmark_year_date = function(date) {\r\n\t\tvar cell = this._get_year_cell(date);\r\n\t\tif (!cell) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcell.classList.remove(\"dhx_year_event\", \"dhx_cal_datepicker_event\");\r\n//\t\tcell.className = \"dhx_month_head\";\r\n\t};\r\n\tscheduler._year_render_event = function(event) {\r\n\t\tvar date = event.start_date;\r\n\t\tif (date.valueOf() < this._min_date.valueOf()){\r\n\t\t\tdate = this._min_date;\r\n\t\t} else {\r\n\t\t\tdate = this.date.date_part(new Date(date));\r\n\t\t}\r\n\r\n\t\twhile (date < event.end_date) {\r\n\t\t\tthis._mark_year_date(date, event);\r\n\t\t\tdate = this.date.add(date, 1, \"day\");\r\n\t\t\tif (date.valueOf() >= this._max_date.valueOf())\r\n\t\t\t\treturn;\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.year_view = function(mode) {\r\n\r\n\t\tscheduler.set_sizes();\r\n\r\n\t\tscheduler._table_view = mode;\r\n\r\n\t\tif (this._load_mode && this._load()) return;\r\n\r\n\t\tif (mode) {\r\n\t\t\tscheduler._init_year_tooltip();\r\n\t\t\tscheduler._reset_year_scale();\r\n\t\t\tif (scheduler._load_mode && scheduler._load()){\r\n\t\t\t\tscheduler._render_wait = true;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tscheduler.render_view_data();\r\n\t\t} else {\r\n\t\t\tscheduler._hideToolTip();\r\n\t\t}\r\n\t};\r\n\tscheduler._reset_year_scale = function() {\r\n\t\tthis._cols = [];\r\n\t\tthis._colsS = {};\r\n\t\tvar week_starts = []; //start day of first week in each month\r\n\t\tvar dataArea = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tvar c = this.config;\r\n\t\tdataArea.scrollTop = 0; //fix flickering in FF\r\n\t\tdataArea.innerHTML = \"\";\r\n\r\n\t\tvar dy = Math.floor((parseInt(dataArea.style.height) - scheduler.xy.year_top) / c.year_y);\r\n\t\tif (dy < 190) {\r\n\t\t\tdy = 190;\r\n\t\t}\r\n\r\n\t\tvar week_template = document.createElement(\"div\");\r\n\t\tvar dummy_date = this.date.week_start(scheduler._currentDate());\r\n\r\n\t\tthis._process_ignores(dummy_date, 7, \"day\", 1);\r\n\r\n\t\tfor (var i = 0; i < 7; i++) {\r\n\t\t\tif(!(this._ignores && this._ignores[i])) {\r\n\t\t\t\tthis._cols[i] = 'var(--dhx-scheduler-datepicker-cell-size)';\r\n\t\t\t\tthis._render_x_header(i, 0, dummy_date, week_template);\r\n\r\n\t\t\t}\r\n\t\t\tdummy_date = this.date.add(dummy_date, 1, \"day\");\r\n\t\t}\r\n\t\tweek_template.lastChild.className += \" dhx_scale_bar_last\";\r\n\r\n\t\tfor(var i = 0; i < week_template.childNodes.length; i++){\r\n\t\t\tthis._waiAria.yearHeadCell(week_template.childNodes[i]);\r\n\t\t}\r\n\r\n\t\tvar sd = this.date[this._mode + \"_start\"](this.date.copy(this._date));\r\n\t\tvar ssd = sd;\r\n\t\tvar yearBox = null;\r\n\t\tconst wrapper = document.createElement(\"div\");\r\n\t\twrapper.classList.add(\"dhx_year_wrapper\");\r\n\t\tfor (var i = 0; i < c.year_y; i++){\r\n\t\t\tfor (var j = 0; j < c.year_x; j++) {\r\n\t\t\t\tyearBox = document.createElement(\"div\");\r\n\t\t\t\tyearBox.className = \"dhx_year_box\";\r\n\r\n\t\t\t\tyearBox.setAttribute(\"date\", this._helpers.formatDate(sd));\r\n\t\t\t\tyearBox.setAttribute(\"data-month-date\", this._helpers.formatDate(sd));\r\n\t\t\t\tyearBox.innerHTML = \"
\" + week_template.innerHTML + \"
\";\r\n\r\n\t\t\t\tvar header = yearBox.querySelector(\".dhx_year_month\");\r\n\t\t\t\tvar grid = yearBox.querySelector(\".dhx_year_grid\");\r\n\t\t\t\tvar body = yearBox.querySelector(\".dhx_year_body\");\r\n\r\n\t\t\t\tvar headerId = scheduler.uid();\r\n\t\t\t\tthis._waiAria.yearHeader(header, headerId);\r\n\t\t\t\tthis._waiAria.yearGrid(grid, headerId);\r\n\r\n\r\n\t\t\t\theader.innerHTML = this.templates.year_month(sd);\r\n\r\n\r\n\r\n\t\t\t\tvar dd = this.date.week_start(sd);\r\n\t\t\t\tthis._reset_month_scale(body, sd, dd, 6);\r\n\r\n\t\t\t\tvar days = body.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var day = 0; day < days.length; day++){\r\n\t\t\t\t\tthis._waiAria.yearDayCell(days[day]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\twrapper.appendChild(yearBox);\r\n\r\n\t\t\t\tweek_starts[i * c.year_x + j] = (sd.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;\r\n\t\t\t\tsd = this.date.add(sd, 1, \"month\");\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdataArea.appendChild(wrapper);\r\n\r\n\t\tvar dateElement = this._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML = this.templates[this._mode + \"_date\"](ssd, sd, this._mode);\r\n\t\t}\r\n\r\n\t\tthis.week_starts = week_starts;\r\n\t\tweek_starts._month = ssd.getMonth();\r\n\t\tthis._min_date = ssd;\r\n\t\tthis._max_date = sd;\r\n\t};\r\n\r\n\tscheduler._reset_year_scale = function(){\r\n\r\n\t\tvar dataArea = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tdataArea.scrollTop = 0; //fix flickering in FF\r\n\t\tdataArea.innerHTML = \"\";\r\n\r\n\t\tlet yearStart = this.date.year_start(new Date(this._date));\r\n\t\t\r\n\t\tthis._min_date = this.date.week_start(new Date(yearStart));\r\n\r\n\t\tconst wrapper = document.createElement(\"div\");\r\n\t\twrapper.classList.add(\"dhx_year_wrapper\");\r\n\r\n\t\tlet currentDate = yearStart;\r\n\t\tfor(let i = 0; i < 12; i++){\r\n\t\t\tlet yearBox = document.createElement(\"div\");\r\n\t\t\tyearBox.className = \"dhx_year_box\";\r\n\r\n\t\t\tyearBox.setAttribute(\"date\", this._helpers.formatDate(currentDate));\r\n\t\t\tyearBox.setAttribute(\"data-month-date\", this._helpers.formatDate(currentDate));\r\n\t\t\tyearBox.innerHTML = `
${this.templates.year_month(currentDate)}
\r\n\t\t\t
`;\r\n\r\n\t\t\tconst yearGrid = yearBox.querySelector(\".dhx_year_grid\");\r\n\t\t\tconst datepicker = scheduler._createDatePicker(null, {\r\n\t\t\t\tdate: currentDate,\r\n\t\t\t\tminWeeks: 6\r\n\t\t\t});\r\n\t\t\tdatepicker._renderDayGrid(yearGrid);\r\n\t\t\tdatepicker.destructor();\r\n\r\n\t\t\twrapper.appendChild(yearBox);\r\n\r\n\t\t\tcurrentDate = this.date.add(currentDate, 1, \"month\");\r\n\r\n\t\t}\r\n\t\tdataArea.appendChild(wrapper);\r\n\r\n\t\tlet lastDate = this.date.add(yearStart, 1, \"year\");\r\n\t\tif(lastDate.valueOf() != this.date.week_start(new Date(lastDate)).valueOf()){\r\n\t\t\tlastDate = this.date.week_start(new Date(lastDate));\r\n\t\t\tlastDate = this.date.add(lastDate, 1, \"week\");\r\n\t\t}\r\n\t\tthis._max_date = lastDate;\r\n\t\tvar dateElement = this._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML = this.templates[this._mode + \"_date\"](yearStart, lastDate, this._mode);\r\n\t\t}\r\n\t};\r\n\r\n\tvar getActionData = scheduler.getActionData;\r\n\tscheduler.getActionData = function(n_ev) {\r\n\t\tif(!isYearMode()){\r\n\t\t\treturn getActionData.apply(scheduler, arguments);\r\n\t\t}\r\n\t\t\r\n\t\tvar date = getCellDate(n_ev.target);\r\n\t\treturn {\r\n\t\t\tdate:date,\r\n\t\t\tsection:null\r\n\t\t};\r\n\t};\r\n\r\n\tvar locateEvent = scheduler._locate_event;\r\n\tscheduler._locate_event = function(node) {\r\n\t\tvar id = locateEvent.apply(scheduler, arguments);\r\n\t\tif(!id){\r\n\t\t\t\r\n\t\t\tvar date = getCellDate(node);\r\n\t\t\tif(!date) return null;\r\n\t\t\tvar evs = scheduler.getEvents(date, scheduler.date.add(date, 1, \"day\"));\r\n\t\t\tif(!evs.length) return null;\r\n\r\n\t\t\t//can be multiple events in the cell, return any single one\r\n\t\t\tid = evs[0].id;\r\n\t\t}\r\n\t\treturn id;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tscheduler._hideToolTip();\r\n\t});\r\n}","export default function(scheduler){\r\n\r\n\r\n(function(){\r\n\r\nfunction defaults(obj, std){\r\n\tfor (var key in std)\r\n\t\tif (!obj[key])\r\n\t\t\tobj[key] = std[key];\r\n\treturn obj;\r\n}\r\n\r\nfunction getElementSizes(element, scheduler) {\r\n\tvar sizes = {};\r\n\telement = scheduler._els[element];\r\n\tif (element && element[0]) {\r\n\t\tsizes.x = element[0].scrollWidth;\r\n\t\tsizes.y = element[0].scrollHeight;\r\n\t} else {\r\n\t\tsizes.x = 0;\r\n\t\tsizes.y = 0;\r\n\t}\r\n\treturn sizes;\r\n}\r\n\r\n//compatibility for new versions of scheduler\r\nif(!window.dhtmlxAjax){\r\n\twindow.dhtmlxAjax = {\r\n\t\tpost: function(url, data, callback){\r\n\t\t\treturn window.dhx4.ajax.post(url, data, callback);\r\n\t\t},\r\n\t\tget: function(url, callback){\r\n\t\t\treturn window.ajax.get(url, callback);\r\n\t\t}\r\n\t};\r\n}\r\n\r\nfunction add_export_methods(scheduler){\r\n\r\n\tscheduler.exportToPDF = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.pdf\",\r\n\t\t\tformat:\"A4\",\r\n\t\t\torientation:\"landscape\",\r\n\t\t\tdpi:96,\r\n\t\t\tzoom:1,\r\n\t\t\trtl: scheduler.config.rtl\r\n\t\t});\r\n\t\tconfig.html = this._export_html(config);\r\n\t\tconfig.mode = this.getState().mode;\r\n\t\tthis._send_to_export(config, \"pdf\");\r\n\t};\r\n\r\n\tscheduler.exportToPNG = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.png\",\r\n\t\t\tformat:\"A4\",\r\n\t\t\torientation:\"landscape\",\r\n\t\t\tdpi:96,\r\n\t\t\tzoom:1,\r\n\t\t\trtl: scheduler.config.rtl\r\n\t\t});\r\n\t\tconfig.html = this._export_html(config);\r\n\t\tconfig.mode = this.getState().mode;\r\n\t\tthis._send_to_export(config, \"png\");\r\n\t};\r\n\r\n\tscheduler.exportToICal = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.ical\",\r\n\t\t\tdata:this._serialize_plain(null, config)\r\n\t\t});\r\n\t\tthis._send_to_export(config, \"ical\");\r\n\t};\r\n\r\n\tscheduler.exportToExcel = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.xlsx\",\r\n\t\t\ttitle:\"Events\",\r\n\t\t\tdata:this._serialize_plain( this.templates.xml_format, config),\r\n\t\t\tcolumns:this._serialize_columns()\r\n\t\t});\r\n\t\tthis._send_to_export(config, \"excel\");\r\n\t};\r\n\r\n\tscheduler._ajax_to_export = function(data, type, callback){\r\n\t\tdelete data.callback;\r\n\t\tvar url = data.server || \"https://export.dhtmlx.com/scheduler\";\r\n\r\n\t\twindow.dhtmlxAjax.post(url,\r\n\t\t\t\"type=\"+type+\"&store=1&data=\"+encodeURIComponent(JSON.stringify(data)),\r\n\t\t\tfunction(loader){\r\n\t\t\t\tvar fail = loader.xmlDoc.status > 400;\r\n\t\t\t\tvar info = null;\r\n\r\n\t\t\t\tif (!fail){\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\tinfo = JSON.parse(loader.xmlDoc.responseText);\r\n\t\t\t\t\t}catch(e){}\r\n\t\t\t\t}\r\n\t\t\t\tcallback(info);\r\n\t\t\t}\r\n\t\t);\r\n\t};\r\n\r\n\tscheduler._plain_export_copy = function(source, format){\r\n\t\tvar target = {};\r\n\t\tfor (var key in source)\r\n\t\t\ttarget[key] = source[key];\r\n\r\n\t\ttarget.start_date = format(target.start_date);\r\n\t\ttarget.end_date = format(target.end_date);\r\n\t\ttarget.$text = this.templates.event_text(source.start_date, source.end_date, source);\r\n\r\n\t\treturn target;\r\n\t};\r\n\r\n\tscheduler._serialize_plain = function(format, config){\r\n\t\tformat = format || scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\", true);\r\n\r\n\t\tvar events;\r\n\t\tif (config && config.start && config.end)\r\n\t\t\tevents = scheduler.getEvents(config.start, config.end);\r\n\t\telse\r\n\t\t\tevents = scheduler.getEvents();\r\n\r\n\t\tvar data = [];\r\n\t\tfor (var i = 0; i< events.length; i++)\r\n\t\t\tdata[i] = this._plain_export_copy(events[i], format);\r\n\r\n\t\treturn data;\r\n\t};\r\n\r\n\tscheduler._serialize_columns = function(){\r\n\t\treturn [\r\n\t\t\t{ id:\"start_date\", header:\"Start Date\", width:30 },\r\n\t\t\t{ id:\"end_date\", header:\"End Date\", width:30 },\r\n\t\t\t{ id:\"$text\", header:\"Text\", width:100 }\r\n\t\t];\r\n\t};\r\n\r\n\tscheduler._send_to_export = function(data, type){\r\n\t\tif(!data.version){\r\n\t\t\tdata.version = scheduler.version;\r\n\t\t}\r\n\r\n\t\tif(!data.skin){\r\n\t\t\tdata.skin = scheduler.skin;\r\n\t\t}\r\n\r\n\t\tif (data.callback)\r\n\t\t\t\treturn scheduler._ajax_to_export(data, type, data.callback);\r\n\r\n\t\tvar form = this._create_hidden_form();\r\n\r\n\t\tform.firstChild.action = data.server || \"https://export.dhtmlx.com/scheduler\";\r\n\t\tform.firstChild.childNodes[0].value = JSON.stringify(data);\r\n\t\tform.firstChild.childNodes[1].value = type;\r\n\t\tform.firstChild.submit();\r\n\t};\r\n\r\n\tscheduler._create_hidden_form = function(){\r\n\t\tif (!this._hidden_export_form){\r\n\t\t\tvar t = this._hidden_export_form = document.createElement(\"div\");\r\n\t\t\tt.style.display = \"none\";\r\n\t\t\tt.innerHTML = \"
\";\r\n\t\t\tdocument.body.appendChild(t);\r\n\t\t}\r\n\t\treturn this._hidden_export_form;\r\n\t};\r\n\r\n\tscheduler._get_export_size = function(format, orientation, zoom, dpi, header, footer, scales) {\r\n\r\n\t\tdpi = parseInt(dpi)/25.4 || 4;\r\n\r\n\t\tvar sizes = {\r\n\t\t\t\"A5\":{ x:148, y:210 },\r\n\t\t\t\"A4\":{ x:210, y:297 },\r\n\t\t\t\"A3\":{ x:297, y:420 },\r\n\t\t\t\"A2\":{ x:420, y:594 },\r\n\t\t\t\"A1\":{ x:594, y:841 },\r\n\t\t\t\"A0\":{ x:841, y:1189 }\r\n\t\t};\r\n\r\n\t\tvar dataX = getElementSizes(\"dhx_cal_data\", this).x;\r\n\t\tvar dataY = getElementSizes(\"dhx_cal_data\", this).y;\r\n\t\tvar headY = getElementSizes(\"dhx_cal_header\", this).y;\r\n\t\tvar multY = getElementSizes(\"dhx_multi_day\", this).y;\r\n\r\n\t\tvar cSize = {\r\n\t\t\ty: dataY + headY + multY\r\n\t\t};\r\n\r\n\t\tif (format === \"full\") {\r\n\t\t\tcSize.x = dataX;\r\n\t\t} else {\r\n\t\t\tcSize.x = Math.floor( (orientation === \"landscape\" ? sizes[format].y : sizes[format].x) * dpi );\r\n\t\t}\r\n\r\n\t\tif (scales) {\r\n\t\t\tcSize.x *= (parseFloat(scales.x) || 1);\r\n\t\t\tcSize.y *= (parseFloat(scales.y) || 1);\r\n\t\t}\r\n\r\n\t\treturn cSize;\r\n\t};\r\n\r\n\tfunction getTimeline() {\r\n\t\tvar mode = scheduler.getState().mode;\r\n\t\tif (scheduler.matrix && scheduler.matrix[mode]) {\r\n\t\t\treturn scheduler.matrix[mode];\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\r\n\tfunction getInitialSizes() {\r\n\t\tvar smartRendering = undefined,\r\n\t\t\tscrollable = undefined;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (timeline) {\r\n\t\t\tscrollable = timeline.scrollable;\r\n\t\t\tsmartRendering = timeline.smart_rendering;\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tnav_height: scheduler.xy.nav_height,\r\n\t\t\tscroll_width: scheduler.xy.scroll_width,\r\n\t\t\tstyle_width: scheduler._obj.style.width,\r\n\t\t\tstyle_height: scheduler._obj.style.height,\r\n\t\t\ttimeline_scrollable: scrollable,\r\n\t\t\ttimeline_smart_rendering: smartRendering\r\n\t\t};\r\n\t}\r\n\r\n\tfunction setExportSizes(size, initialSizes) {\r\n\t\tscheduler._obj.style.width = size.x + \"px\";\r\n\t\tscheduler._obj.style.height = size.y + \"px\";\r\n\r\n\t\tscheduler.xy.nav_height = 0;\r\n\t\tscheduler.xy.scroll_width = 0;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (initialSizes.timeline_scrollable || initialSizes.timeline_smart_rendering) {\r\n\r\n\t\t\ttimeline.scrollable = false;\r\n\t\t\ttimeline.smart_rendering = false;\r\n\t\t}\r\n\t}\r\n\r\n\tfunction setInitialSizes(initialSizes) {\r\n\t\tscheduler.xy.scroll_width = initialSizes.scroll_width;\r\n\t\tscheduler.xy.nav_height = initialSizes.nav_height;\r\n\t\tscheduler._obj.style.width = initialSizes.style_width;\r\n\t\tscheduler._obj.style.height = initialSizes.style_height;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (initialSizes.timeline_scrollable || initialSizes.timeline_smart_rendering) {\r\n\t\t\ttimeline.scrollable = initialSizes.timeline_scrollable;\r\n\t\t\ttimeline.smart_rendering = initialSizes.timeline_smart_rendering;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler._export_html = function (obj) {\r\n\t\tvar initialSizes = getInitialSizes();\r\n\t\tvar size = scheduler._get_export_size(obj.format, obj.orientation, obj.zoom, obj.dpi, obj.header, obj.footer, obj.scales);\r\n\r\n\t\tvar html = \"\";\r\n\t\ttry {\r\n\t\t\tsetExportSizes(size, initialSizes);\r\n\t\t\tscheduler.setCurrentView();\r\n\t\t\thtml = scheduler._obj.innerHTML;\r\n\t\t} catch (e) {\r\n\r\n\t\t\t// eslint-disable-next-line no-console\r\n\t\t\tconsole.error(e);\r\n\t\t} finally {\r\n\t\t\tsetInitialSizes(initialSizes);\r\n\t\t\tscheduler.setCurrentView();\r\n\t\t}\r\n\r\n\t\treturn html;\r\n\t};\r\n\r\n}\r\n\r\nadd_export_methods(scheduler);\r\n\r\n\r\n})();\r\n\r\n}","import active_links from \"./active_links\";\r\nimport agenda_legacy from \"./agenda_legacy_view\";\r\nimport agenda_view from \"./agenda\";\r\nimport all_timed from \"./all_timed\";\r\nimport collision from \"./collision\";\r\nimport container_autoresize from \"./container_autoresize\";\r\nimport cookie from \"./cookie\";\r\nimport daytimeline_restricted from \"./restricted_extensions/daytimeline\";\r\nimport drag_between_restricted from \"./restricted_extensions/drag_between\";\r\nimport editors from \"./editors\";\r\nimport expand from \"./expand\";\r\nimport grid_view from \"./restricted_extensions/grid_view\";\r\nimport html_templates from \"./html_templates\";\r\nimport key_nav from \"./key_nav\";\r\nimport layer from \"./layer\";\r\nimport limit from \"./limit\";\r\nimport map_view from \"./map_view\";\r\nimport minical from \"./minical\";\r\nimport monthheight from \"./monthheight\";\r\nimport multisection_restricted from \"./restricted_extensions/multisection\";\r\nimport multiselect from \"./multiselect\";\r\nimport multisource from \"./multisource\";\r\nimport mvc from \"./mvc\";\r\nimport outerdrag from \"./outerdrag\";\r\nimport pdf from \"./pdf\";\r\nimport quick_info from \"./quick_info\";\r\nimport readonly from \"./readonly\";\r\nimport recurring from \"./recurring\";\r\nimport recurring_legacy from \"./recurring_legacy\";\r\nimport serialize from \"./serialize\";\r\nimport timeline_restricted from \"./restricted_extensions/timeline\";\r\nimport tooltip from \"./tooltip\";\r\nimport treetimeline_restricted from \"./restricted_extensions/treetimeline\";\r\nimport units_restricted from \"./restricted_extensions/units\";\r\nimport url from \"./url\";\r\nimport week_agenda_restricted from \"./restricted_extensions/week_agenda\";\r\nimport wp from \"./wp\";\r\nimport year_view from \"./year_view\";\r\nimport export_api from \"./export_api\";\r\n\r\nexport default {\r\n\tactive_links,\r\n\tagenda_legacy,\r\n\tagenda_view,\r\n\tall_timed,\r\n\tcollision,\r\n\tcontainer_autoresize,\r\n\tcookie,\r\n\tdaytimeline: daytimeline_restricted,\r\n\tdrag_between: drag_between_restricted,\r\n\teditors,\r\n\texpand,\r\n\texport_api,\r\n\tgrid_view,\r\n\thtml_templates,\r\n\tkey_nav,\r\n\tlayer,\r\n\tlimit,\r\n\tmap_view,\r\n\tminical,\r\n\tmonthheight,\r\n\tmultisection: multisection_restricted,\r\n\tmultiselect,\r\n\tmultisource,\r\n\tmvc,\r\n\touterdrag,\r\n\tpdf,\r\n\tquick_info,\r\n\treadonly,\r\n\trecurring,\r\n\trecurring_legacy,\r\n\tserialize,\r\n\ttimeline: timeline_restricted,\r\n\ttooltip,\r\n\ttreetimeline: treetimeline_restricted,\r\n\tunits: units_restricted,\r\n\turl,\r\n\tweek_agenda: week_agenda_restricted,\r\n\twp,\r\n\tyear_view\r\n};","import SchedulerFactory from \"./scheduler_factory\";\r\nimport gplExtensions from \"./ext/extensions_gpl\";\r\n\r\nconst factory = new SchedulerFactory(gplExtensions);\r\n\r\nconst scheduler = factory.getSchedulerInstance();\r\nconst Scheduler = {\r\n\tplugin: scheduler.bind(factory.plugin, factory)\r\n};\r\n\r\nwindow.scheduler = scheduler;\r\nwindow.Scheduler = Scheduler;\r\n\r\nif(!window.$dhx) {\r\n\twindow.$dhx = {};\r\n}\r\n\r\nwindow.$dhx.scheduler = scheduler;\r\nwindow.$dhx.Scheduler = Scheduler;\r\n\r\nexport default scheduler;export { scheduler, Scheduler };"],"names":["dhtmlxHook","dhtmlx","attaches","attachScheduler","day","mode","tabs","scheduler","obj","document","createElement","id","this","_genStr","innerHTML","body","appendChild","firstChild","attachObject","vs","av","sched","schedId","setSizes","updateView","destructor","init","_viewRestore","globalScope","window","global","global$1","dragHighlightPos","dndMarkers","dragStarted","eventNode","event","isEnabled","config","drag_highlight","markTimespan","checkViewName","viewName","viewObj","getView","layout","checkSectionPropertyName","y_property","map_to","setRequiredStylesToMarker","style","top","left","marginLeft","createMarkerConfig","configSettings","sectionId","sections","markerObject","start_date","end_date","css","html","date","add","createViewMarker","settings","markerConfigs","getMonthViewMarkers","getTimelineAndUnitsViewMarkers","getColumnViewMarkers","forEach","cfg","push","columnViewMarkersArray","eventNodes","$container","querySelectorAll","event_attribute","i","length","eventNodeClone","cloneNode","startDate","Date","getAttribute","endDate","dates","monthViewMarkersArray","weekDates","currDate","valueOf","week_start","cells","unitMarkersArray","sectionPropertyName","multisection","String","split","section_delimiter","formatedSections","map","element","elems","attachEvent","e","getEvent","target","closest","getState","cascade_event_display","unselect","getActionData","section","unmarkTimespan","undoDelete","ev","deletedEvent","copy","undo_deleted","new_event","message","text","expire","type","callback","undoBtn","addEvent","render","limitPlugin","mark_now","display_marked_timespans","overwrite_marked_timespans","dhx_time_block","default_timespan_type","fix_options","options","days","zones","get_resulting_options","blockTime","addMarkedTimespan","unblockTime","deleteMarkedTimespan","checkInMarkedTimespan","timespan_type","on_overlap","res","temp_start_date","temp_end_date","timespans","_marked_timespans","date_part","day_value","day_index","getDay","getZones","eventStart","_get_zone_minutes","eventEnd","getDate","markerStart","markerEnd","checkLimitViolation","check_limits","s","c","evs","rec_type","_end_date","seriesEnd","limit_start","limit_end","recEventInLimits","complete_res","p","_timed","isOneDayEvent","allow","_drag_id","_drag_mode","setHours","setMinutes","checkEvent","callEvent","_get_blocked_zones","property","timeline_zones","blocked_timeline_zones","_get_relevant_blocked_zones","_add_timespan_zones","resultZones","concat","containers","_props","matrix","container","view","view_config","linker","_mark_now","hide","dhx_now_time","_els","now","_currentDate","_remove_mark_now","_max_date","_min_date","getHours","first_hour","last_hour","locate_holder_day","_append_mark_now","zone_start","_table_view","_mode","start_index","end_index","units_l","size","position","r_divs","t_day","t_div","_render_marked_timespan","els","div","parent","parentNode","removeChild","getMinutes","_prepare_timespan_options","r_configs","temp_configs","Array","t_days","slice","cloned_config","_lame_clone","apply","undefined","min","max","invert_zones","invertZones","uid","view_key","hasOwnProperty","ids","t_config","_lame_copy","k","c_config","t_sd","t_ed","zone_end","_get_dates_by_index","index","start","end","start_day","delta","t_date","_get_css_classes_by_config","css_classes","join","_get_block_by_config","block","area","blocks","min_date","max_date","date_to_display","min_day","areas","_scales","sday","_cols","_ignores","block_proto","className","height","width","order","inner_index","locate_holder","Math","all_hours_height","hour_size_px","hour_ms","round","_mark_timespans","data","divs","_on_scale_add_marker","len","childNodes","_getClassName","indexOf","configuration","Error","rebuild_els","get_elements","timespans_ids","_marked_timespans_ids","timespan_types","_marked_timespans_types","_addMarkerTimespanConfig","unit_id","timespans_view","day_configs","_array","configs","current_zones","resulting_zones","c_zone_start","c_zone_end","isLast","offset","splice","_subtract_timespan_zones","is_modified","_delete_marked_timespan_by_id","parent_array","_delete_marked_timespan_by_config","viewspans","_delete_marked_timespans_list","d","dayConfig","day_timespans","d_t","related_zones","arguments","types","t","typedConfig","_get_types_to_render","common","specific","types_to_render","_get_configs_to_render","units","_get_unit_index","unit","_date","dx","day_ind","unitsPerDay","floor","key","unit_zones","unit_types","global_data","day_types","dblclick_dhx_marked_timespan","src","dblclick_create","addEventNow","createMethod","methods","isActive","disableMethod","methodName","dummyMethod","restoreMethod","disableMethods","methodsHash","call","restoreMethods","batchUpdatePayload","console","error","$stateProvider","registerProvider","batch_update","batchUpdate","noRedraw","call_dp","_dp","updateMode","dp_mode","setUpdateMode","calls","setModeDate","needRender","needUpdateView","repaintEvents","rememberModeDate","setCurrentView","render_data","render_view_data","updateEvent","sendData","initPlugins","limit","uidSeed","isArray","pop","isStringObject","Function","prototype","toString","constructor","isNumberObject","isBooleanObject","isDate","getFullYear","getMonth","defined","delay","timeout","timer","result","$cancelTimeout","$pending","args","setTimeout","clearTimeout","$execute","utils","mixin","source","force","f","object","Number","Boolean","varType","Object","StateService","stateProviders","name","provider","method","internal","unregisterProvider","assert","check","show_errors","log","extend","commonViews","agenda","grid","timeline","week_agenda","year","anythingElse","requiredExtensions","_commonErrorMessages","unknownView","relatedDoc","relatedExtension","collapsedContainer","createTimelineView","createUnitsView","createGridView","renderCalendar","exportToPNG","exportToPDF","dhtmlxError","catchError","a","b","responseText","ajax_error","alert","classes","cssClass","classList","itemTypes","rows_container","row","setAttribute","fix_tab_position","$firstTab","$lastTab","$segmentedTab","button","builtInButton","spacer","minicalendarButton","minicalendarDiv","click","$_eventAttached","isCalendarVisible","destroyCalendar","navigation","handler","calendar","html_element","findRenderer","renderer","rows","cols","renderElement","value","align","justifyContent","prepareConfig","renderLayout","fragment","createDocumentFragment","items","next","_init_nav_bar","navBar","querySelector","_update_nav_bar","previousHeight","heightChanged","configChanged","newHeight","xy","nav_height","unset_actions","set_actions","display","isAttachedNode","root","getWindowSize","w","innerWidth","documentElement","clientWidth","h","innerHeight","clientHeight","equals","listenWindowResize","oldSize","resizeDelay","$destroyed","newSize","triggerSchedulerResize","$root","watchNodeResize","offsetHeight","previousWidth","offsetWidth","lowlevelResizeWatcher","addResizeListener","containerStyles","getComputedStyle","getPropertyValue","resizeWatcher","tabIndex","wai_aria_attributes","salesforce_environment","contentWindow","EventHost","_silent_mode","listeners","createEventStorage","handlers","eventStorage","combinedResult","handlerResult","handlerId","once","originalHandler","removeEvent","clear","makeEventable","eventHost","eventName","toLowerCase","thisObject","bind","innerId","attachAll","eventArguments","handlerName","detachEvent","list","eventId","detachAllEvents","eventable","nav_bar","_detachDomEvent","el","removeEventListener","_init_once","scheduler_resize_listener","navbar","header","dataArea","hasSchedulerMarkup","createDefaultHeader","views","nav","_grid","names","optionalViews","_obj","getElementById","wai_aria_application_role","JSON","stringify","rtl","_skin_init","_scroll","init_templates","_init_touch_events","set_sizes","$initialized","min_event_height","bar_height","scale_width","scroll_width","scale_height","month_scale_height","menu_width","margin_top","margin_left","editor_width","month_head_height","event_header_height","keys","edit_save","edit_cancel","functor","_x","scale_x","materialScalePlaceholder","_is_material_skin","insertBefore","set_xy","offsetTop","_lightbox","_setLbPosition","_data_width","right","node","x","y","prepareValue","val","prepared","isNaN","direction","getElementsByTagName","class_name","attr_value","label","locale","labels","_waiAria","labelAttr","domEventsScope","_createDomEventScope","detachAll","_click","attach","preventDefault","_temp_touch_block","_on_mouse_move","_ignore_next_click","_on_mouse_down","_on_mouse_up","_on_dbl_click","returnValue","_locate_event","select","_select_id","_close_not_saved","editStop","previousSelection","editor_id","_edit_id","lightbox_id","_lightbox_id","_new_event","select_id","expanded","drag_id","drag_mode","dhx_cal_data","cancelBubble","readonly","icon","mask","buttons","replace","dhx_cal_prev_button","dhx_cal_next_button","dummy","step","def_step","dhx_cal_today_button","dhx_cal_tab","deprecated_name","substring","search","delete","confirm_deleting","_dhtmlx_confirm","title","title_confirm_deleting","deleteEvent","ok","icon_delete","edit","save","details","showLightbox","form","cancel","opts","confirm","base","_isObject","_isDate","duration","event_duration","time_step","start_hour","setTime","_loading","_drag_event","details_on_dblclick","viewHandler","_get_column_index","x_pos","column","_week_indexes_from_pos","pos","ceil","_mouse_coords","$env","isIE","pageX","pageY","clientX","scrollLeft","clientLeft","clientY","scrollTop","clientTop","_colsS","$domHelpers","getAbsoluteLeft","getAbsoluteTop","dy","heights","_ignores_detected","preserve_length","_event_length","_get_real_event_length","x_step","x_unit","timestamp","confirmationText","confirm_closing","title_confirm_closing","positive_closing","_drag_pos","_correct_shift","back","getTimezoneOffset","_is_pos_changed","old_pos","new_pos","diff","old_val","new_val","acc","abs","d_pos","has_moved","_correct_drag_start_date","_start_correction","_end_correction","_get_fictional_event_length","_correct_drag_end_date","mousedownPos","_get_date_from_pos","_drag_start","fields","timeStep","custom","time_part","_dragEventBody","_move_event_shift","resize_date","_drag_from_start","resize_from_start","end_day_start","end_day_date","firstHour","lastHour","maxY","precisePos","minDate","maxDate","preciseDate","cursor","shift","new_end","new_start","limit_drag_out","all_timed","_get_section_view","_get_event_sday","_allow_dnd","update_render","sx","update_view","for_rendered","r","srcElement","classname","drag_event_body","fullClass","_get_private_properties","_clear_temporary_properties","clean","flagged_event","initial","current_state","_mobile","moved","_dhx_changed","is_new","edit_on_create","details_on_create","_trigger_dyn_loading","_load_mode","_load","_render_wait","_reset_ignores","_reset_scale","isViewExists","templates","_set_aria_buttons_attrs","buttonGroups","group","j","prev","headerButtonsAttributes","icon_form","icon_edit","oldClass","newClass","dhx_multi_day","prev_scroll","preserve_scroll","multidayScroll","_dy_shift","tab","headerToggleState","remove","_render_x_header","offset_top","head","left_border","columnHeaderText","dayHeaderAttr","_get_columns_num","from","to","count","count_n","_get_timeunit_start","_get_view_end","dd","ed","_calc_scale_sizes","summ","_process_ignores","realcount","_set_scale_col_size","_render_scales","data_area","sd","today","parseInt","scales","cls","firstHalf","slotDate","format_date","htmlContent","time_slot_text","time_slot_class","secondHalf","week_date_class","dayColumnAttr","day_start","_getNavDateElement","str","drag_resize","drag_move","navBarDateStr","scaleElement","navBarDateAttr","_reset_month_scale","_reset_hours_scale","multi_day","c1","visibility","totalWidth","col_length","hiddenWidth","c2","cc","content","hour_scale","hourScaleAttr","scroll_hour","now_date","n","preserve","ignore","ign_date","_render_month_scale","view_start","cd","tdwidths","cell_width","getCellHeight","cellheight","table","cell","month_date_class","body_class","head_class","monthCellAttr","cellHead","month_day","cellBody","bf1","parse_date","getLabel","lightbox","updateCollection","list_name","collection","serverList","resetLightbox","hideCover","cache","create","n_ev","_focus","focus","getDaysDifference","differenceInTime","getTime","differenceInDays","eventLength","startColumnIndex","endColumnIndex","_get_date_index","last_column","excludedDuration","intervalStart","intervalEnd","leftCellCutOffStart","leftCellCutOffEnd","rightCellCutOffStart","rightCellCutOffEnd","ev_length","dir","per_day","fd","start_slot","end_slot","_get_section_property","_is_initialized","state","_is_lightbox_open","defaultDomEvents","addEventListener","eventRemove","createEventScope","domEvents","eventScope","capture","detach","staticArray","_eventRemoveAll","_trim","func","trim","htmlTags","RegExp","extraSpaces","stripHTMLLite","htmlText","singleQuotes","escapeQuotes","getAttributeString","attr","attributes","setAttributes","values","day_date","role","getHeaderCellAttr","dateString","eventAttr","_eventCommonAttr","event_text","$dataprocessor_class","setEventBarAttr","_getAttributes","attributeSetter","arg","eventBarAttrString","agendaHeadAttrString","agendaHeadDateString","agendaHeadDescriptionString","agendaDataAttrString","agendaEventAttrString","attrs","agendaDetailsBtnString","icon_details","gridAttrString","gridRowAttrString","gridCellAttrString","mapAttrString","mapRowAttrString","mapDetailsBtnString","minicalHeader","headerId","minicalGrid","minicalRow","minicalDayCell","selected","minicalHeadCell","weekAgendaDayCell","weekAgendaEvent","lightboxHiddenAttr","lightboxVisibleAttr","lightboxSectionButtonAttrString","tabindex","yearHeader","yearGrid","yearHeadCell","yearRow","yearDayCell","lightboxAttr","lightboxButtonAttrString","buttonName","eventMenuAttrString","iconName","lightboxHeader","headerText","lightboxSelectAttrString","time_option","month","hour","minute","messageButtonAttrString","buttonLabel","messageInfoAttr","messageModalAttr","quickInfoAttr","quickInfoHeaderAttrString","quickInfoHeader","quickInfoButtonAttrString","tooltipAttr","tooltipVisibleAttr","tooltipHiddenAttr","isDisabled","payload","elementPosition","elem","bottom","getBoundingClientRect","box","docElem","pageYOffset","pageXOffset","offsetLeft","offsetParent","getRelativeEventPosition","getNodePosition","getClassName","baseVal","getTargetNode","trg","tagName","shadowRoot","composedPath","locateCss","strict","ind","charAt","isVisible","currentStyle","hiddenSection","recurringSection","hasNonNegativeTabIndex","hasHref","canHaveHref","nodeName","loLowerCase","canDisable","input","textarea","hasAttribute","getFocusableNodes","nodes","nodesArray","$position","sort","isValid","isShadowDomSupported","createShadowRoot","attachShadow","getActiveElement","activeElement","getSelection","focusNode","getRootNode","ShadowRoot","host","hasShadowParent","dom_helpers","htmlObject","getOffset","getOffsetSum","getOffsetRect","test","navigator","userAgent","dummyBox","selector","insertAfter","newNode","referenceNode","nextSibling","isChildOf","child","contains","Element","matches","msMatchesSelector","webkitMatchesSelector","parentElement","nodeType","isWindowAwailable","env","isOpera","isChrome","isKHTML","isFF","isIPad","isEdge","isNode","clearAll","serialize$1","serialized","encodeURIComponent","Promise","createConfig","url","async","headers","serialize","ajax","serializeRequestParams","parse","DOMParser","parseFromString","ActiveXObject","loadXML","xmltop","tagname","xhr","status","xml","responseXML","xpath","xpathExp","docObj","selectNodes","first","col","ownerDocument","evaluate","XPathResult","ANY_TYPE","iterateNext","query","_call","get","onLoad","getSync","put","postData","del","post","postSync","resolve","reject","XMLHttpRequest","isQt","match","readyState","xmlDoc","filePath","open","setRequestHeader","toUpperCase","send","urlSeparator","$ajax","generateStringToDate","format","utc","splt","code","csp_date_to_str","to_fixed","getUTCDate","getUTCMonth","getUTCFullYear","day_short","getUTCDay","day_full","month_short","month_full","getUTCHours","getUTCMinutes","getUTCSeconds","getSeconds","getUTCISOWeek","getISOWeek","csp_str_to_date","set","temp","month_short_hash","month_full_hash","UTC","cspEnabled","checkIfCSPEnabled","useCsp","csp","old","setSeconds","setMilliseconds","start_on_monday","month_start","setDate","year_start","setMonth","_add_days","inc","ndate","datesDiff","rest","hours","setYear","num","date_to_str","str_to_date","exactFormat","stringToDateMethod","parseExactFormat","yyyyMMddhhIIss","MMddyyyyhhIIss","ddMMyyyyhhIIss","ISO8601","isYMDDate","datestr","isMDYDate","isDMYDate","isISO8601","parseYMD","parseMDY","parseDMY","parse_exact_format","nday","first_thursday","year_number","ordinal_date","week_number","convert_to_utc","default_date","month_date","load_date","week_date","hour_date","date_format","api_date","displayed_event_color","displayed_event_text_color","wide_form","day_column_padding","use_select_menu_space","drag_create","resize_month_events","resize_month_timed","responsive_lightbox","separate_short_events","cascade_event_count","cascade_event_margin","multi_day_height_limit","drag_lightbox","server_utc","touch","touch_tip","touch_drag","touch_swipe_dates","quick_info_detached","icons_edit","icons_select","buttons_left","buttons_right","highlight_displayed_event","delay_render","timeline_swap_resize","$initial","_helpers","parseDate","xml_date","formatDate","xml_format","d1","d2","day_scale_date","month_scale_date","week_scale_date","time_picker","event_date","load_format","event_header","event_class","event_bar_date","event_bar_text","month_events_link","drag_marker_class","drag_marker_content","tooltip_date_format","tooltip_text","calendar_month","calendar_scale_date","calendar_date","calendar_time","_events","_loaded","clear_view","extra_data","event_updated","silent","setEvent","hash","_rendered","changeEventId","new_id","create_getter","create_setter","_changed","is_visible_events","clear_event","in_visible_range","evFirstHour","evLastHour","end_dates_visible","hidden_duration","checkEndDate","get_visible_events","only_timed","stack","filter_event","filter","_is_main_area_event","hold","full","_not_render","_recalculate_timed","tvs","tvd","_rendered_location","buffer","renderedLocation","_view_month_day","_render_month_link","toRender","_sday","_eday","curr","_sweek","getEvents","_get_event_bar_pos","widt","x2","_pre_render_events","render_event_bar","max_evs","max_month_events","_sorder","real","render_event","_get_first_visible_cell","hb","h_old","_pre_render_events_line","_pre_render_events_table","monthRows","cellHeight","cHeight","unshift","scrollHeight","scroll_fix","scale_settings","sum_width","row_heights","full_multi_day_height","used_multi_day_height","used_multi_day_height_css","multi_day_section","multi_day_icon","overflowY","datePart","_get_event_mapped_end_date","ev_duration","_min_mapped_duration","evs_originals","sh","eh","_inner","t_ev","t_end_date","slot_index","sorderSet","_is_sorder","_max_sorder","max_count","_count","_copy_event","_time_order","_is_any_multiday_cell_visible","isAnyCellVisible","checkDate","noCells","lastDayEnd","cellIndex","weekCellIndex","out","weeks","chunks_info","first_chunk","last_chunk","chunk_info","locate_s","locate_e","_length","stack_line","_first_chunk","_last_chunk","_copy_dummy","_y_from_date","sm","_calc_event_y","min_height","em","parentWidth","menu","menu_offset","pos_y","ev_count","ev_sorder","margin","_render_v_bar","_text_style","parentPosition","zIndex","color","setProperty","tplClass","cssText","_editor","shiftKey","keyCode","icons","icons_str","ariaAttr","currentIcon","textColor","highlightEventPosition","contentA","contentB","cs","cse","boxWidth","renderEvent","inner_html","footer_class","_drag_resize","past","_get_dnd_order","ev_height","max_height","_orig_sorder","evTop","columns","y_event_offset","resize_handle","resizable","left_chunk","right_chunk","resize_left","resize_right","timed","bg_color","style_text","_edit_stop_event","getRenderedEvent","rendered_events","rendered_event","showEvent","original_color","original_text_color","restoreOriginalColors","getSectionTop","posFromDate","_smartRenderingEnabled","scrollTo","_append_drag_marker","m","zone","scale","lastChild","previousSibling","_update_marker_position","_parsers","canParse","topElement","loader","csrfToken","security_key","arr","itms","itm","nodeValue","ud","udx","_xmlNodeToJSON","_userdata","_init_event","json","err","events","dhx_security","collections","collections_loaded","option","option_key","ical","c_start","c_end","incoming","event_r","e_start","e_end","exec","param","param_r","parse_param","substr","dh","dm","utcMark","dn","getSerializator","_load_url","prevent_cache","ajaxCallback","response","on_load","lf","cache_line","temp_to","xmlLoaded","jsonLoader","iCalLoader","foundParser","parser","_process","_process_loading","_after_call","_tagvalue","_init_date","getSerializableData","createSerializator","dataset","allEvents","exportedEvent","exportValue","rawValue","load","setLoadMode","array","show_loading","_y","_lightbox_controls","formSection","getLightbox","getValue","form_blocks","get_value","setValue","set_value","get_template_control","control","get_select_control","get_textarea_control","get_time_control","defaults","template","time","sns","placeholder","_get_input","_dhx_onchange","onchange","time_format","_time_format_order","dt","last","limit_time_select","selectBoxClass","range","start_year","end_year","year_range","tdate","_time_values","ariaAttrs","full_day","_full_day","checked","disabled","_fill_lightbox_select","auto_end_date","_update_lightbox_select","time_values","direct_value","fixed_value","value_found","t_v","selectedIndex","original","getLightboxRoot","cspEnvironment","salesforceEnvironment","showCover","show_cover","_cover","_fill_lightbox","lightbox_header","headerContent","headerDate","headerTitle","current_sns","_get_lightbox_section_node","default_value","_lightbox_out","_empty_lightbox","hide_lightbox","endLightbox","hide_cover","_move_while_dnd","_finish_dnd","save_lightbox","startLightbox","_custom_lightbox","_temp_lightbox","cancel_lightbox","hideLightbox","_init_lightbox_events","buttonTarget","sectionButton","button_click","action","readonly_active","setLightboxSize","_init_dnd_events","_dnd_start_lb","dhx_unselectable","lb","_lb_start","_ready_to_dnd","recurring","_lightbox_template","label_name","ds","t_ds","_bindLightboxLabels","labelBlock","inputBlock","fallback","inputId","old_id","mobile","MSStream","platform","maxTouchPoints","touchEventsSupported","createEvent","_touch_events","touches","PointerEvent","pointerEnabled","pointerType","msPointerEnabled","MSPOINTER_TYPE_MOUSE","accessor","tracker","scroll_mode","action_mode","dblclicktime","attachTouchEvent","passive","check_direction_swipe","s_ev","e_ev","max_dy","scrollable","doMouseMove","dnd","original_render","_update_global_tip","drag_cancel","_pointerDragId","pointerId","fake_event","_block_next_stop","actTask","fakeTask","sourceTask","_show_global_tip","_hide_global_tip","toptip","_global_tip","drag_to_create","drag_to_move","getRootView","tag","hooks","didInsert","cmp","_addThemeClass","skin","_skin_settings","_skin_xy","lightbox_additional_height","checkIfMaterialSkin","themeNameFromFile","links","href","_build_skin_info","monitorThemeChange","styles","themeVar","isCssVarTheme","themeName","cssValues","oldMaterialTheme","_theme_info","theme","cssVarTheme","themeVariables","calculatedMaterial","probe","cachedBorderBoxValue","checkIfBorderBoxStyling","boxSizing","refreshAfterLoad","_border_box_events","oldStyling","newStyling","_configure","setSkin","flatSkinHourScale","monitorIntervalId","clearInterval","setInterval","csstheme","_old_month_day","old_month_day","reorderTabs","specialTabs","tabName","find","firstTab","reverse","jQuery","$","counter","fn","dhx_scheduler","each","Scheduler","getSchedulerInstance","comp","update_view_timer","curr_view_timer","lazy_setCurrentView","self","oldDate","oldMode","updateFlags","lazy_updateView","ars","DataProcessorEvents","dp","$scheduler","$dp","_dataProcessorHandlers","_validId","setUpdated","z","_in_progress","_invalid","updatedRows","_waitMode","_update_callback","upd","setUserData","action_param","_add_rec_marker","extendScheduler","_is_virtual_event","getUserData","_set_event_text_style","rec_pattern","_dp_change_event_id","_dp_hook_delete","setDp","DataProcessor","serverProcessorURL","serverProcessor","autoUpdate","_tMode","_headers","_payload","post_delim","messages","updated","inserted","deleted","invalid","invalid_cell","enableUTFencoding","setTransactionMode","total","_tSend","_endnm","_serializeAsJson","_router","router","escape","_utf","setDataColumns","_columns","getSyncState","enableDataNames","enablePartialDataSend","master","rowId","findRow","existing","set_invalid","is_invalid","markRow","_methods","getActionByState","checkBeforeUpdate","sendAllData","_beforeSendData","_getRowData","_sendData","_serializeAsJSON","serialize_one","pref","_applyPayload","dataToSend","_onResolvedCreateUpdate","resultState","sid","tid","afterUpdateCallback","routerMode","actionPromise","update","then","catch","queryParams","afterUpdate","urlParams","_user","_cleanupArgumentsBeforeSend","preprocessedData","_cleanupItemBeforeSend","valid","_forEachUpdatedRow","_getAllData","has_one","pattern","defineAction","_uActions","btag","marker","correct","originalSid","_errorResponse","cleanUpdate","_setDefaultTransactionMode","_serverProcessor","that","finalizeUpdate","atag","_initialized","_dp_init","dataProcessorEvents","_dataprocessor","setOnAfterUpdate","setOnBeforeUpdateHandler","setAutoUpdate","interval","user","_need_update","_update_busy","xml_node","afterAutoUpdate","fullSync","intervalId","loadUpdate","getUpdates","_getXmlNodeValue","version","vers","updates","processedData","updatedItem","output","item","processedItem","prop","_prepareItemForJson","_prepareItemForForm","_prepareDataItem","dataItem","createDataProcessor","tMode","boxAttribute","_dhx_msg_cfg","usercall","modalBox","modal_key","which","messageBox","keyboard","domHelpers","modality","cover","classValue","buttonAriaAttrs","buttonCss","info","timers","pull","getFirstDefined","_boxStructure","contentId","inner","message_ok","message_cancel","btn","_createBox","hidden","alertPopup","confirmPopup","boxPopup","box_params","params","alertBox","confirmBox","focusable","subtype","seed","hideAll","popups","modalbox","ar","day_tab","week_tab","month_tab","icon_save","icon_cancel","section_description","section_time","confirm_recurring","section_recurring","button_recurring","button_recurring_open","button_edit_series","button_edit_occurrence","grid_tab","repeat_radio_day","repeat_radio_week","repeat_radio_month","repeat_radio_year","repeat_radio_day_type","repeat_text_day_count","repeat_radio_day_type2","repeat_week","repeat_text_week_count","repeat_radio_month_type","repeat_radio_month_start","repeat_text_month_day","repeat_text_month_count","repeat_text_month_count2_before","repeat_text_month_count2_after","repeat_year_label","select_year_day2","repeat_text_year_day","select_year_month","repeat_radio_end","repeat_text_occurences_count","repeat_radio_end2","repeat_radio_end3","repeat_never","repeat_daily","repeat_workdays","repeat_weekly","repeat_monthly","repeat_yearly","repeat_custom","repeat_freq_day","repeat_freq_week","repeat_freq_month","repeat_freq_year","repeat_on_date","repeat_ends","month_for_recurring","day_for_recurring","be","agenda_tab","description","year_tab","week_agenda_tab","ca","cn","da","de","en","es","fi","fr","he","hu","it","jp","LocaleManager","_locales","nb","nl","no","pl","pt","ro","ru","si","sk","sv","tr","ua","i18nFactory","DatePicker","modes","currentRange","eventDates","currentModeIndex","onStateChangeHandlers","_domEvents","onStateChange","oldState","newState","_notifyStateChange","newDate","setFullYear","setState","_toggleMode","newIndex","backwardArrow","monthLabel","innerText","toLocaleString","startYear","forwardArrow","_adjustDate","_renderCalendarHeader","dataContainer","_renderDayGrid","_renderMonthGrid","_renderYearGrid","daysOfWeekContainer","currentDate","labelFormat","dayElement","currWeek","minWeeks","minSchedulerDate","maxSchedulerDate","eventDaysTable","reduce","dayStart","_renderDayGridHeader","firstDate","monthStart","monthEnd","lastDate","currentCalDate","_weeksBetween","dayGridContainer","dateCell","wrapper","months","formatLabel","monthElement","doneArea","doneBtn","yearElement","factoryMethod","extensionManager","stateProvider","common_errors","schedulerCore","wai_aria","dom","_createDatePicker","_getFocusableNodes","_locate_css","messageApi","event_highlight","dhtmlx_suite_hooks","skins","jquery","dataProcessorExtend","connector","i18n","addLocale","setLocale","localeObject","getLocale","dhx_save_btn","dhx_cancel_btn","dhx_delete_btn","addPlugins","ext","activePlugins","plugins","extensionList","getExtensionList","treetimeline","daytimeline","outerdrag","legacy","plugin","getExtension","dependencies","priorities","extension","dep","dependencyName","orderA","orderB","ExtensionsManager","_extensions","SchedulerFactory","extensions","_seed","_schedulerPlugins","_bundledExtensions","_extensionsManager","initConfig","_internal_id","$syncFactory","_initFromConfig","calendars","addCalendar","active_links","active_link_view","_active_link_click","s_d","do_wrapper","fullname","week_x","d_s","agenda_legacy","add_agenda_legacy","agenda_legacy_time","agenda_legacy_text","agenda_legacy_date","agenda_legacy_start","old_dblclick_dhx_cal_data","dblclick_dhx_cal_data","fill_agenda_tab","old_render_view_data","_agendaScrollTop","set_full_view","l","rowAttr","dateHeader","descriptionHeader","tableAttr","ev_class","agendaDetailsButtonAttr","agenda_time","agenda_text","agenda_area","v_border","dateElement","agenda_date","agenda_legacy_view","agenda_start","agenda_end","agenda_view","add_agenda","dayDateToStr","dayDowToStr","agenda_day","eventsInDays","anyEvents","renderEmptyView","renderDay","calendarEvent","renderOneEvent","selectedId","bg","all_timed_month","is_event_short","_safe_copy","proto","event_pid","isPrototypeOf","event_length","old_prerender_events_line","old_prerender_events_table","prerender_events","ce","_virtual","isOvernightEvent","getNextDay","setDateTime","event_changed","re","redraw","next_day","old_get_visible_events","old_mode","old_date","oldUpdate","fullRedrawNeeded","collision","temp_section","before","collision_limit","_setTempSection","event_id","checked_mode","checkCollision","edited_ev","rrule","recurring_event_id","_roll_back_dates","_check_sections_collision","second","evs_dates","getRecDates","tevs","concurrent","_pid_time","single","container_autoresize","month_day_min_height","min_grid_size","min_map_size","old_pre_render_event","active","total_height","multiday_height","evl","_h_fix","navHeight","headerHeight","checked_divs","updateContainterHeight","is_repaint","checked_div","maxHeight","rows_length","year_y","week_agenda_scale_height","cur_height","eventsContainer","g","_gridView","y_unit","getSectionHeight","scrollWidth","getScrollSize","callUpdate","conditionalUpdateContainerHeight","asyncRepaint","requestAnimationFrame","autosizeEnabled","$original_scroll_width","$original_section_autoheight","section_autoheight","cookie","setCookie","cookie_param","getCookie","getCookieName","_get_url_nav","urlNavigationPlugin","schedulerCookie","unescape","newMode","old_load","notImplemented","daytimeline_restricted","drag_between_restricted","editors","cached_options","resetCombo","_combo","DOMParent","combo","unload","DOMelem","dhx_globalImgPath","image_path","dhtmlXCombo","options_height","setOptionHeight","enableFilteringMode","filtering","script_path","all_options","single_option","addOption","getIndexByValue","selectOption","selected_id","disable","setComboValue","getSelectedValue","getSelectedText","vertical","radiobuttons","checked_value","isChecked","check_html","label_html","checkbox","unchecked_value","expand","fullscreen","toggleIcon","_position","_width","_height","_overflow","overflow","_maximize","collapse","directions","prev_margin","grid_view","html_templates","all","keyboard_shortcuts","$keyboardNavigation","shortcuts","createCommand","modifiers","alt","ctrl","meta","shortcut","commands","expr","getExpressions","words","getWords","command","commandKeys","specialKeys","charCodeAt","getCommandFromEvent","domEvent","altKey","ctrlKey","metaKey","printableKey","fromCharCode","getHashFromEvent","getHash","parts","junctionChar","term","combinationChar","backspace","enter","esc","space","up","down","home","pageup","pagedown","insert","plus","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10","f11","f12","eventhandler","EventHandler","_handlers","findHandler","doAction","unbind","bindAll","initKeys","trap_modal_focus","trapFocus","currentFocus","currentIndex","nextIndex","nextItem","renderMultiple","currentStart","currentEnd","TimeSlot","_modes","_getMode","renderVerticalMarker","renderTimelineMarker","renderYearMarker","renderMonthMarker","weekAgenda","renderWeekAgendaMarker","renderAgendaMarker","dayColumns","addWaiAriaLabel","addDataAttributes","dateToStr","dateTimeLabel","sectionObject","markerDate","_wrapDiv","_get_year_cell","opacity","view_opts","round_position","_trace_x","_is_column_visible","start_pos","end_pos","set_date_part","_timeline_getX","tempStart","tempEnd","_section_height","_isRender","renderMonthCell","weekNumber","dayIndex","datatable","lineHeight","scheduler_node","SchedulerNode","_compose","getDefaultNode","getMode","blur","enable","removeAttribute","_compareEvents","_pickEvent","startId","eventElement","Event","getNode","nextEventHandler","activeNode","dispatcher","nextEvent","currEvent","visibleDates","nextEv","setActiveNode","prevEventHandler","HeaderCell","getNodes","_key_nav_copy_paste","nav_node","KeyNavNode","moveTo","compareTo","canStringifyThis","canStringifyThat","header_cell","defaultCell","_getSection","_getNodes","defaultElement","isScrolledIntoView","eventBox","viewPort","idSelector","inlineEditor","getInlineEditor","isMultisectionEvent","keepScrollPosition","_moveToSlot","slot","nextSlot","time_slot","movingDate","getDefaultDate","key_nav_step","_getDefaultSection","visibleTime","nowTime","showNowTime","findVisibleColumn","clone","timeslot","_getMultisectionView","_getNextSection","isInRange","defaultSlot","DataArea","smart_rendering","_pasteDate","_pasteSection","addMonthDate","nextMonthSlot","_alignTimeSlot","nextTimelineSlot","newPos","nextUnitsSlot","optionsCount","nextDaySlot","_moveDate","isBeforeLastHour","isStartDate","minutes","isAfterFirstHour","isInVisibleDayTime","oldStart","toNextDay","testEnd","nextWeekAgendaSlot","nextAgendaSlot","isDateVisible","nextDateColumn","current","tempSlot","extendSlot","extendUnitsSlot","extendTimelineSlot","extendMonthSlot","extendDaySlot","extendWeekAgendaSlot","extendGenericSlot","allowedDirections","moveDate","newDates","extendSlotDates","oldSlot","newSlot","dateDirection","scrollSlot","minical_button","MinicalButton","globalNode","MinicalCell","minical_cell","_getGrid","_getNode","enabled","newRow","newCol","modals","modalsStack","isModal","afterPopup","startModal","endModal","isTopModal","currentTarget","traceLightbox","_keyNavMessagePopup","focusElement","backupFocus","core","getActiveNode","setDefaultNode","focusGlobalNode","blurNode","editor","keyDownHandler","defaultPrevented","schedulerNode","_timeout","key_nav_legacy","_temp_key_scope","key_nav","isCopy","trackMousePosition","mousePointer","keyNavPointer","elementFromPoint","clear_event_after","copyEvent","_make_pasted_event","_do_paste","is_copy","modified_ev","original_ev","_is_key_nav_active","getSelectedEvent","_buffer_event","new_ev","scheduler_handlers","attachSchedulerHandlers","focusHandler","waitCall","reFocusActiveNode","mousedownHandler","dataAreaClick","listOfScales","arrOfScales","some","focusEvent","evNode","prevState","lastStart","lastEnd","lastSection","minical_handlers","_minicalendars","isMinical","minicalendars","patchMinicalendar","focusMinical","minicalClick","rowIndex","td","renderMinical","cal","added","destroyMinical","_def_count","addShortcut","scope","scopeObject","getScope","getShortcutHandler","removeShortcut","disp","scopes","minicalButton","minicalDate","timeSlot","searchMap","attachOnce","isSchedulerSelected","changeState","layer","layers","validId","_clearUpdateFlag","_cloneObj","_dataprocessors","_layers_zindex","initial_layer_zindex","isDefault","defaultLayer","showLayer","tlayer","toggleLayer","hideLayer","visible","getLayer","layer_name","native_event_object","noMenu","_evs_layer","_t_render_view_data","evs_layer","borderBox","borderBoxWidth","headerWidth","bodyWidth","footerWidth","bodyHeight","new_zIndex","filter_agenda","limit_view","_temp_limit_scope","om","od","nm","nd","isBlocked","date_end","resetDate","is_new_event","data_copy","native_object","_mark_now_timer","GoogleMapAdapter","_markers","zoom","zoom_after_resolve","initial_zoom","lat","lng","setCenter","setZoom","error_position","google","maps","trigger","mapOptions","center","initial_position","mapId","scrollwheel","mapTypeId","Map","__gm","messageOverlay","outerContainer","setOptions","addListener","geocoder","Geocoder","point","latLng","geocode","results","GeocoderStatus","OK","geometry","location","event_location","formatted_address","clearInstanceListeners","AdvancedMarkerElement","importLibrary","mapView","createMarker","setMap","infoWindow","close","InfoWindow","maxWidth","info_window_max_width","setContent","map_info_content","anchor","markerInfo","setVisible","setPosition","latlng","LatLng","clearEventMarkers","latitude","longitude","string","address","OpenStreetMapAdapter","openPopup","closeTooltip","setView","mapWrapper","L","tileLayer","addTo","on","fetch","country","myIcon","iconUrl","iconSize","shadowSize","iconAnchor","shadowAnchor","popupConfig","minWidth","markerPopup","popup","tooltip","markerConfig","bindPopup","bindTooltip","removeLayer","setLatLng","resolveAddress","lon","MapboxAdapter","getPopup","isOpen","togglePopup","mapboxgl","accessToken","lngLat","features","place_name","Popup","focusAfterOpen","setMaxWidth","setHTML","Marker","setLngLat","setPopup","map_view","mapAdapter","eventHandlerIds","adapters","googleMap","openStreetMaps","mapbox","createAdapter","map_view_provider","currentAdapter","_latLngUpdate","_eventLocationChanged","map_settings","resolve_user_location","resolve_event_location","view_provider","map_initial_position","map_error_position","map_date_width","map_icon_width","map_description_width","add_map","map_date","map_time","map_text","map_start","setupMapView","attachSchedulerEvents","addEventWithLocation","coordinates","removeEventMarker","addEventMarker","setUserLocation","adapter","geolocation","getCurrentPosition","coords","dblclick_dhx_map_area","unmodifiedEvent","updateEventMarker","newIdEvent","onEventClick","detachSchedulerEvents","map_initial_zoom","map_zoom_after_resolve","map_infowindow_max_width","map_resolve_user_location","map_type","map_resolve_event_location","fill_map_tab","map_end","mapContainer","_setMapSize","destroy","initialize","elem_id","marginRight","marginTop","_selected_event_id","ariaButtonAttr","_updateEventLocation","_delay","ret","_event_resolve_delay","minical","minicalDomEvents","minicalendar","mark_events","_synced_minicalendars","_prev","is_refresh","cont","tpos","_get_def_cont","_render_calendar","$dom","cellRoot","dateAttribute","unmarkCalendar","markCalendar","_last_date","conf","markedDates","_markCalendarCurrentDate","sync","_on_xle_handler","refreshOnLoad","updateCalendar","_created","_locateCalendar","weekNum","dat","dayCell","_week_template","week_template","dummy_date","_mini_cal_arrows","previous","ts","temp2","temp3","temp4","temp5","temp6","temp7","temp8","padding","weekHeader","move_minicalendar_date","css_classnames","css_texts","diffs","arrow","dayHeaders","dayCells","inputs","selects","inp","number","new_date","_update_minical_select","isFulldayEvent","_attach_action","_round_minutes","linkCalendar","datediff","dateNew","month_end","noHighlight","monthheight","old_s","multisection_restricted","multiselect","parseXMLOptions","parseJSONOptions","_result","_children","_mark_inputs","_ids","delimiter","script_url","divLoading","multisource","backup","mvc","use_id","sanitize","update_timer","_start_ext_load","_finish_ext_load","_get_id","model","cid","backbone","toJSON","changes","queue","add_from_queue","Backbone","Collection","dragger","dhtmlDragAndDropObject","stopDrag","last_event","on_drop","sourceHtmlObject","dhtmlObject","targetHtmlObject","targetHtml","action_data","event_data","view_options","_locate_cell_timeline","addDragLanding","_drag","_dragIn","shtmlObject","_dragOut","DragControl","addDrop","onDrop","sourceDhtmlx","getMaster","onDragIn","pdf","html_regexp","newline_regexp","clean_html","x_norm","parseFloat","colsWidth","x_norm_event","is_left","dhx_cal_header","y_norm","get_style","de_day","de_week","xml_start","xml_end","xml_top","profile","footer","xml_body_header","dhx_cal_date","xh","xml_month_scale","xml_month","yh","xhs","second_scale","top_width","top_col","xml_body","colors","week_starts","_month","text_color","zx","zdx","left_norm","zy","zdy","e_type","dets","week","dy_copy","toXML","original_date","original_mode","temp_date","getPDFData","send_xml","submit","to_pdf","schedulersToPdf","objects","toPDF","toPDFRange","quick_info","show_quick_info","clickedElementPosition","_$quickInfoHandler","getPositionInsideScheduler","showQuickInfo","hiding_function","hideQuickInfo","quick_info_title","quick_info_content","quick_info_date","_quick_info_box_id","_get_event_counter_part","_quick_info_box","_init_quick_info","_fill_quick_data","_show_quick_info","cssTimeToMs","milliseconds","forced","qi","_x_scroll","dataPos","ontransitionend","fitQIInsideWindow","quickInfoPopup","popupRect","containerRect","offsetBottom","_quick_info_onscroll_handler","$testmode","_qi_button_click","domEv","titleContent","titleDate","main","mainContent","originalRecurringSetValue","original_left_buttons","original_right_buttons","readonly_form","forbidden_buttons","button_arrays","forbidden_button","button_array","txt_replace","txts","txtt","originalForm","readonlyForm","_lightbox_r","ALL_WEEKDAYS","Weekday","weekday","fromStr","nth","other","getJsWeekday","isPresent","isNumber","isWeekdayStr","includes","rang","repeat","times","toArray","padStart","targetLength","padString","sep","splits","pymod","divmod","mod","empty","notEmpty","datetime","MONTH_DAYS","ONE_DAY","MAXYEAR","ORDINAL_BASE","PY_WEEKDAYS","isLeapYear","isValidDate","daysBetween","date1","date2","date1ms","date2ms","differencems","toOrdinal","fromOrdinal","ordinal","getMonthDays","getWeekday","monthRange","combine","getMilliseconds","dolly","cloneDates","clones","timeToUntilString","untilStringToDate","until","bits","dateTZtoISO8601","timeZone","dateStr","dateInTimeZone","localTimeZone","Intl","DateTimeFormat","resolvedOptions","dateInLocalTZ","dateInTargetTZ","tzOffset","IterResult","after","accept","tooEarly","tooLate","extendStatics","setPrototypeOf","__proto__","__extends","TypeError","__","__assign","assign","__spreadArray","pack","SuppressedError","suppressed","CallbackIterResult","_super","iterator","_this","ENGLISH","dayNames","monthNames","tokens","SKIP","numberAsText","every","at","the","third","for","monday","tuesday","wednesday","thursday","friday","saturday","sunday","january","february","march","april","may","june","july","august","september","october","november","december","comma","defaultGetText","defaultDateFormatter","ToText","gettext","language","dateFormatter","origOptions","bymonthday","bynmonthday","byweekday","allWeeks","someWeeks","isWeekdays","isEveryDay","sortWeekDays","isFullyConvertible","canConvert","freq","IMPLEMENTED","RRule","FREQUENCIES","plural","HOURLY","MINUTELY","DAILY","bymonth","_bymonth","_bymonthday","_byweekday","byhour","_byhour","WEEKLY","MONTHLY","YEARLY","byyearday","byweekno","weekdaytext","monthtext","npos","wday","finalDelim","delim","delimJoin","finalDelimiter","o","realCallback","Parser","rules","done","nextSymbol","isDone","symbol","best","bestSymbol","rule","name_1","v","acceptNumber","expect","parseText","ttr","S","AT","F","MO","TU","WE","TH","FR","ON","wkd","decodeWKD","MDAYs","decodeM","decodeNTH","Frequency","freqIsDailyOrGreater","fromText","toText","Time","millisecond","DateTime","fromDate","getYear","addYears","years","addMonths","yearDiv","monthMod","addWeekly","wkst","fixDay","addDaily","addHours","filtered","_a","dayDiv","hourMod","addMinutes","byminute","hourDiv","minuteMod","addSeconds","seconds","bysecond","minuteDiv","secondMod","daysinmonth","SECONDLY","initializeOptions","_i","keys_1","defaultKeys","parseOptions","DEFAULT_OPTIONS","byeaster","dtstart","bysetpos","bynweekday","parsedOptions","buildTimeset","millisecondModulo","timeset","parseString","rfcString","parseLine","parseDtstart","line","dtstartWithZone","tzid","parseRrule","strippedLine","Days","parseNumber","optionKey","parseWeekday","parseIndividualNumber","SyntaxError","wdaypart","DateWithZone","RangeError","defineProperty","enumerable","configurable","isUTC","rezonedDate","optionsToString","outValue","buildDtstart","strValues","ruleString","argsMatch","Cache","between","_cacheAdd","what","_value","_cacheGet","cached","argsKeys","findCacheDiff","cachedObject","iterResult","M365MASK","M366MASK","M28","M29","M30","M31","MDAY366MASK","MDAY365MASK","NM28","NM29","NM30","NM31","NMDAY366MASK","NMDAY365MASK","M366RANGE","M365RANGE","WDAYMASK","wdaymask","rebuildYear","firstyday","yearlen","nextyearlen","yearordinal","yearweekday","baseYearMasks","wnomask","firstwkst","wyearlen","no1wkst","numweeks","lnumweeks","lyearweekday","lno1wkst","lyearlen","weekst","mmask","mdaymask","nmdaymask","mrange","rebuildMonth","lastyear","lastmonth","nwdaymask","ranges","easter","yearStart","Iterinfo","rebuild","yearinfo","monthinfo","eastermask","ydayset","mdayset","_","wdayset","ddayset","htimeset","mtimeset","stimeset","getdayset","gettimeset","buildPoslist","ii","dayset","poslist","daypos","timepos","tmp","iter","emitResult","counterDate","makeTimeset","removeFilteredDays","rezoneIfNeeded","currentDay","isFiltered","dayCounter","SA","SU","noCache","_cache","fromString","_iter","isFullyConvertibleToText","iterSet","_rrule","_exrule","_rdate","_exdate","_exdateHash","_accept","evalExdate","zonedDate","unfold","forceset","compatible","parseInput","rrulevals","rdatevals","exrulevals","exdatevals","parsedDtstart","lines","splitIntoLines","_b","breakDownLine","parms","_c","rdateTzid","parseRDate","buildRule","rset_1","RRuleSet","groomRruleOptions","rdate","exrule","exdate","rrulestr","extractName","validateDateParm","parm","rdateval","createGetterSetter","fieldName","field","field_1","_addRule","_addDate","rrules","exrules","rdates","exdates","_dtstart","rdatesToString","rrs","clearMilliseconds","isDeletedOccurrence","isSeries","clearRecurringProperties","original_start","createException","nid","nev","_rec_temp","_rec_markers_pull","_rec_markers","_get_rec_marker","ch","_get_rec_markers","old_add_event","ev_id","_ignore_call","tev","_pid_changed","deleteEventFromSeries","idTimestamp","_is_modified_occurence","sub","isEventFound","_start_date","showLightbox_rec","lightbox_recurring","pid","isVirtual","showSeries","title_confirm_recurring","groupExceptions","exceptions","get_visible_events_rec","repeat_date","old_update_event","toIcalString","non_render","maxCount","seriesExceptions","utcStart","parsedRRule","utcTo","repeatedDates","adjustedDate","visibleCount","eventDuration","exception","_fix_daylight_saving_date","recurrings","sev","occurence","include_end_by","recurring_workdays","getTopLevelOption","rruleObj","untilDate","hasEndCondition","getWeekdayOfMonth","dayOfWeek","dayOfMonth","dayNumber","jsDaysToRRULEDays","RruleDayNumsToJs","fillCustomDaily","fillCustomWeekly","dayCheckboxes","dayNum","dayLabel","fillCustomMonthly","dateOfMonth","nthWeekDayOfMonth","repeat_monthly_date","repeat_monthly_weekday","formatDayNumber","nthDayOfMonth","repeat_yearly_month_date","repeat_yearly_month_weekday","fillCustomYearly","dateOfYear","nthWeekDayOfYear","fillEndRule","countInput","ondateInput","endOptionSelect","formatter","repeat_date_of_end","dispatchEvent","getRecValue","WORKDAYS","CUSTOM","monthRepeat","yearRepeat","formatFunc","endRule","NEVER","fillInDefaults","rec","_get_node","_outer_html","loc","_init_set_value","_ds","show","onRepeatOptionChange","onCustomRepeatIntervalChange","weekly","monthly","yearly","onCustomRepeatEndRule","_rec_init_done","rf","blocked","rruleset","topOption","customFreq","actual_dates","timeControl","getTimeSection","recurrence","_start","getFirstSectionOfType","recurring_legacy","occurrence_timestamp_in_utc","outerHTML","getOuterHTML","_get_form_node","_get_node_value","_get_node_numeric_value","_set_node_value","hash_value","str_date_format","str_date","date_str","register_els","inps","change_current_view","get_repeat_code","get_rcode","get_end_rule","transpose_type","transp","set_end_rule","has_values","_get_repeat_code","get_numeric_value","repeat_precise","start_exists","transpose_day_week","set_rcode","set_repeat_code","MouseEvent","_set_repeat_code","elements","_toggle_block","_get_button","getRecurringSection","_get_form","backgroundPosition","transponse_size","day_week","originalMonth","cday","newMonth","cor","cor2","transposeRecurring","recurringParts","dayDurationMs","addRecurring","recurringStepDays","weekDays","seriesInstance","currentCount","origMonth","origYear","correctOverflowInstances","recurring_overflow_instances","startHour","ted","data_attributes","all_events","_serialize_json_value","toICal","full_day_format","timeline_restricted","Tooltip","_scheduler","_tooltipNode","_root","_isLikeMouseEvent","_calculateTooltipPosition","viewport","_getViewPortSize","tooltipNode","offsetX","tooltip_offset_x","offsetY","tooltip_offset_y","mouse","containerPos","scrollY","_getViewPort","scrollX","$event_data","$event","TooltipManager","_listeners","_initDelayedFunctions","hideTooltip","delayHide","watchableTarget","eventTarget","targetNode","doOnMouseEnter","onmouseenter","touch_tooltip","onmouseleave","onmousemove","listener","cloneDomEvent","delayShow","utils.default","tooltip_timeout","tooltip_hide_timeout","tooltipManager","tooltips","tooltipFor","targetEventId","treetimeline_restricted","units_restricted","s2d","d2s","select_event","week_agenda_restricted","wp","year_view","year_date","year_month","year_scale_date","year_tooltip","isYearMode","getCellDate","dblclick_dhx_year_grid","_year_render_event","_year_marked_cells","_hideToolTip","_tooltip","_showToolTip","_year_view_tooltip_handler","_init_year_tooltip","_mark_year_date","_unmark_year_date","_reset_year_scale","year_top","ssd","yearBox","year_x","datepicker","locateEvent","export_api","std","getElementSizes","sizes","dhtmlxAjax","dhx4","add_export_methods","orientation","dpi","_export_html","_send_to_export","exportToICal","_serialize_plain","exportToExcel","_serialize_columns","_ajax_to_export","server","fail","_plain_export_copy","$text","_create_hidden_form","_hidden_export_form","_get_export_size","A5","A4","A3","A2","A1","A0","dataX","dataY","headY","multY","cSize","getTimeline","getInitialSizes","smartRendering","style_width","style_height","timeline_scrollable","timeline_smart_rendering","setExportSizes","initialSizes","setInitialSizes","gplExtensions","drag_between","factory","$dhx"],"mappings":"AACe,SAAAA;AAEf,MAAWC,OAAAA,UAAU,eAAeA,OAAOC,UAAU;AACpDD,WAAOC,SAASC,kBAAkB,SAAUC,KAAKC,MAAMC,MAAMC,YAC5D;AAAA,UAAID,OAAOA,QAAQ;AACnB,UAAIE,MAAMC,SAASC,cAAc,KAAA;AACjCF,UAAIG,KAAK,iBAAiBC,KAAKC,QAAQ,EAAA;AACvCL,UAAIM,YAAY,cAAcN,IAAIG,KAAK,qPAAqPL,OAAO;AACnSG,eAASM,KAAKC,YAAYR,IAAIS,UAAAA;AAE9BL,WAAKM,aAAaV,IAAIG,IAAI,OAAO,IAAA;AAEjCC,WAAKO,GAAGP,KAAKQ,EAAIC,EAAAA,QAAQd;AACzBK,WAAKO,GAAGP,KAAKQ,EAAIE,EAAAA,UAAUd,IAAIG;AAC/BJ,MAAAA,WAAUgB,WAAWhB,WAAUiB;AAC/BjB,MAAAA,WAAUkB,aAAa;;AACvBlB,MAAAA,WAAUmB,KAAKlB,IAAIG,IAAIP,KAAKC,IAAAA;AAE5B,aAAOO,KAAKO,GAAGP,KAAKe,aAAgBN,CAAAA,EAAAA;AAAAA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ACVl5B,SACA7oB,cAAc2kD,yBACdt2G,OAAOu2G,kBACPtjF,KACAzsB,aAAamwG,wBACbC,IACAC,UAAAA;AC5ED,MAAMsE,UAAU,IAAIzoD,iBAAiBuoD,aAAAA;AAEhC,MAAChwH,YAAYkwH,QAAQlgE;AACrB,MAACD,cAAY,EACjB+W,QAAQ9mE,UAAUkjB,KAAKgtG,QAAQppD,QAAQopD,OAGxC5uH,EAAAA;AAAAA,OAAOtB,YAAYA;AACnBsB,OAAOyuD,YAAYA;AAEnB,KAAIzuD,OAAO6uH,MAAM;AAChB7uH,SAAO6uH,OAAO;AACf;AAEA7uH,OAAO6uH,KAAKnwH,YAAYA;AACxBsB,OAAO6uH,KAAKpgE,YAAYA;","x_google_ignoreList":[126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153]} \ No newline at end of file +{"version":3,"file":"dhtmlxscheduler.es.js","sources":["../../sources/dhtmlx_hook.js","../../sources/global.js","../../sources/plugins/drag_highlight_pos.js","../../sources/plugins/undo_delete.js","../../sources/plugins/limit.js","../../sources/plugins/batch_update.js","../../sources/plugins/index.js","../../sources/core/utils/utils.js","../../sources/core/state.js","../../sources/core/common/assert.js","../../sources/core/common_errors.js","../../sources/core/connector.js","../../sources/core/nav_bar.js","../../sources/core/scheduler_resize_listener.js","../../sources/utils/eventable.js","../../sources/core/scheduler.js","../../sources/core/utils/event.js","../../sources/core/utils/scoped_event.js","../../sources/core/common.js","../../sources/core/wai_aria.js","../../sources/core/utils/dom_helpers.js","../../sources/utils/env.js","../../sources/core/destructor.js","../../sources/core/common/url_serialize.js","../../sources/core/utils/ajax.js","../../sources/core/base.js","../../sources/core/config.js","../../sources/core/event.js","../../sources/core/event_highlight.js","../../sources/core/loaders/xml.js","../../sources/core/loaders/json.js","../../sources/core/loaders/ical.js","../../sources/core/common/get_serializable_events.js","../../sources/core/load.js","../../sources/core/lightbox.js","../../sources/core/touch.js","../../sources/core/dhtmlx/dhtmlx_suite_hooks.js","../../sources/core/skins.js","../../sources/core/jquery.js","../../sources/core/delay_render.js","../../sources/core/dataprocessor/dataprocessor_hooks.js","../../sources/core/dataprocessor/dataprocessor.js","../../sources/core/message.js","../../sources/locale/locale_ar.js","../../sources/locale/locale_be.js","../../sources/locale/locale_ca.js","../../sources/locale/locale_cn.js","../../sources/locale/locale_cs.js","../../sources/locale/locale_da.js","../../sources/locale/locale_de.js","../../sources/locale/locale_el.js","../../sources/locale/locale_en.js","../../sources/locale/locale_es.js","../../sources/locale/locale_fi.js","../../sources/locale/locale_fr.js","../../sources/locale/locale_he.js","../../sources/locale/locale_hu.js","../../sources/locale/locale_id.js","../../sources/locale/locale_it.js","../../sources/locale/locale_jp.js","../../sources/locale/locale_manager.js","../../sources/locale/locale_nb.js","../../sources/locale/locale_nl.js","../../sources/locale/locale_no.js","../../sources/locale/locale_pl.js","../../sources/locale/locale_pt.js","../../sources/locale/locale_ro.js","../../sources/locale/locale_ru.js","../../sources/locale/locale_si.js","../../sources/locale/locale_sk.js","../../sources/locale/locale_sv.js","../../sources/locale/locale_tr.js","../../sources/locale/locale_ua.js","../../sources/locale/index.js","../../sources/core/datepicker.js","../../sources/scheduler_factory_method.js","../../sources/ext/extension_manager.js","../../sources/scheduler_factory.js","../../sources/ext/active_links.js","../../sources/ext/agenda_legacy_view.js","../../sources/ext/agenda.js","../../sources/ext/all_timed.js","../../sources/ext/collision.js","../../sources/ext/container_autoresize.js","../../sources/ext/cookie.js","../../sources/ext/restricted_extensions/not_implemented_extension.js","../../sources/ext/restricted_extensions/daytimeline.js","../../sources/ext/restricted_extensions/drag_between.js","../../sources/ext/editors.js","../../sources/ext/expand.js","../../sources/ext/restricted_extensions/grid_view.js","../../sources/ext/html_templates.js","../../sources/ext/keyboard_navigation/common/keyboard_shortcuts.js","../../sources/ext/keyboard_navigation/common/eventhandler.js","../../sources/ext/keyboard_navigation/common/trap_modal_focus.js","../../sources/ext/keyboard_navigation/marker.js","../../sources/ext/keyboard_navigation/elements/scheduler_node.js","../../sources/ext/keyboard_navigation/elements/nav_node.js","../../sources/ext/keyboard_navigation/elements/header_cell.js","../../sources/ext/keyboard_navigation/elements/event.js","../../sources/ext/keyboard_navigation/elements/time_slot.js","../../sources/ext/keyboard_navigation/elements/minical_button.js","../../sources/ext/keyboard_navigation/elements/minical_cell.js","../../sources/ext/keyboard_navigation/elements/data_area.js","../../sources/ext/keyboard_navigation/modals.js","../../sources/ext/keyboard_navigation/core.js","../../sources/ext/keyboard_navigation/key_nav_legacy.js","../../sources/ext/keyboard_navigation/scheduler_handlers.js","../../sources/ext/keyboard_navigation/minical_handlers.js","../../sources/ext/key_nav.js","../../sources/ext/layer.js","../../sources/ext/limit.js","../../sources/ext/map_view/gMapAdapter.ts","../../sources/ext/map_view/osmMapAdapter.ts","../../sources/ext/map_view/mapboxAdapter.ts","../../sources/ext/map_view/index.ts","../../sources/ext/minical.js","../../sources/ext/monthheight.js","../../sources/ext/restricted_extensions/multisection.js","../../sources/ext/multiselect.js","../../sources/ext/multisource.js","../../sources/ext/mvc.js","../../sources/ext/outerdrag.js","../../sources/ext/pdf.js","../../sources/ext/quick_info.js","../../sources/ext/readonly.js","../../node_modules/rrule/dist/esm/weekday.js","../../node_modules/rrule/dist/esm/helpers.js","../../node_modules/rrule/dist/esm/dateutil.js","../../node_modules/rrule/dist/esm/iterresult.js","../../node_modules/rrule/node_modules/tslib/tslib.es6.mjs","../../node_modules/rrule/dist/esm/callbackiterresult.js","../../node_modules/rrule/dist/esm/nlp/i18n.js","../../node_modules/rrule/dist/esm/nlp/totext.js","../../node_modules/rrule/dist/esm/nlp/parsetext.js","../../node_modules/rrule/dist/esm/types.js","../../node_modules/rrule/dist/esm/nlp/index.js","../../node_modules/rrule/dist/esm/datetime.js","../../node_modules/rrule/dist/esm/parseoptions.js","../../node_modules/rrule/dist/esm/parsestring.js","../../node_modules/rrule/dist/esm/datewithzone.js","../../node_modules/rrule/dist/esm/optionstostring.js","../../node_modules/rrule/dist/esm/cache.js","../../node_modules/rrule/dist/esm/masks.js","../../node_modules/rrule/dist/esm/iterinfo/yearinfo.js","../../node_modules/rrule/dist/esm/iterinfo/monthinfo.js","../../node_modules/rrule/dist/esm/iterinfo/easter.js","../../node_modules/rrule/dist/esm/iterinfo/index.js","../../node_modules/rrule/dist/esm/iter/poslist.js","../../node_modules/rrule/dist/esm/iter/index.js","../../node_modules/rrule/dist/esm/rrule.js","../../node_modules/rrule/dist/esm/iterset.js","../../node_modules/rrule/dist/esm/rrulestr.js","../../node_modules/rrule/dist/esm/rruleset.js","../../sources/ext/recurring.js","../../sources/ext/recurring_legacy.js","../../sources/ext/serialize.js","../../sources/ext/restricted_extensions/timeline.js","../../sources/ext/tooltip/tooltip.ts","../../sources/ext/tooltip/tooltipManager.ts","../../sources/ext/tooltip/index.ts","../../sources/ext/restricted_extensions/treetimeline.js","../../sources/ext/restricted_extensions/units.js","../../sources/ext/url.js","../../sources/ext/restricted_extensions/week_agenda.js","../../sources/ext/wp.js","../../sources/ext/year_view.js","../../sources/ext/export_api/index.js","../../sources/ext/extensions_gpl.js","../../sources/dhtmlxscheduler.gpl.js"],"sourcesContent":["\r\nexport default function(){\r\n/* global dhtmlx */\r\nif (typeof dhtmlx != \"undefined\" && dhtmlx.attaches) {\r\n\tdhtmlx.attaches.attachScheduler = function (day, mode, tabs, scheduler) {\r\n\t\tvar tabs = tabs || '
';\r\n\t\tvar obj = document.createElement(\"DIV\");\r\n\t\tobj.id = \"dhxSchedObj_\" + this._genStr(12);\r\n\t\tobj.innerHTML = '
' + tabs + '
';\r\n\t\tdocument.body.appendChild(obj.firstChild);\r\n\r\n\t\tthis.attachObject(obj.id, false, true);\r\n\r\n\t\tthis.vs[this.av].sched = scheduler;\r\n\t\tthis.vs[this.av].schedId = obj.id;\r\n\t\tscheduler.setSizes = scheduler.updateView;\r\n\t\tscheduler.destructor = function () { };\r\n\t\tscheduler.init(obj.id, day, mode);\r\n\r\n\t\treturn this.vs[this._viewRestore()].sched;\r\n\t};\r\n}\r\n\r\n}","\r\n/* eslint-disable no-restricted-globals */\r\nvar globalScope;\r\nif(typeof window !== \"undefined\"){\r\n\tglobalScope = window;\r\n}else{\r\n\tglobalScope = global;\r\n}\r\n/* eslint-enable no-restricted-globals */\r\n\r\nexport default globalScope;","export default function dragHighlightPos(scheduler){\r\n let dndMarkers = [];\r\n let dragStarted = false;\r\n let eventNode = null;\r\n let event = null;\r\n\r\n function isEnabled() { \r\n return scheduler.config.drag_highlight && scheduler.markTimespan;\r\n }\r\n\r\n function checkViewName(viewName){\r\n const viewObj = scheduler.getView(viewName);\r\n if(viewObj){\r\n return viewObj.layout;\r\n }\r\n return viewName;\r\n }\r\n\r\n function checkSectionPropertyName(viewName){\r\n const viewObj = scheduler.getView(viewName);\r\n if(viewObj.y_property){\r\n return viewObj.y_property;\r\n }\r\n if(viewObj.map_to){\r\n return viewObj.map_to;\r\n }\r\n }\r\n\r\n function setRequiredStylesToMarker(eventNode, layout){\r\n switch (layout) {\r\n case \"month\":\r\n eventNode.style.top = \"\";\r\n eventNode.style.left = \"\";\r\n break;\r\n case \"timeline\":\r\n eventNode.style.left = \"\";\r\n eventNode.style.marginLeft = \"1px\";\r\n break;\r\n default:\r\n eventNode.style.top = \"\";\r\n break;\r\n }\r\n }\r\n \r\n function createMarkerConfig(configSettings){\r\n const { event, layout, viewName, sectionId, eventNode } = configSettings;\r\n setRequiredStylesToMarker(eventNode, layout);\r\n const sections = {};\r\n let markerObject = {\r\n start_date: event.start_date,\r\n end_date: event.end_date,\r\n css: \"dhx_scheduler_dnd_marker\",\r\n html: eventNode\r\n };\r\n if (layout == \"timeline\" || layout == \"month\" ){\r\n // we need to set end date less than 24 hours of the views to avoid receiving multiple marktimespans\r\n markerObject = {...markerObject, end_date: scheduler.date.add(event.start_date, 1, 'minute')};\r\n }\r\n if (sectionId){\r\n sections[viewName] = sectionId;\r\n markerObject.sections = sections;\r\n }\r\n return markerObject;\r\n }\r\n\r\n function createViewMarker(settings){\r\n const { layout } = settings;\r\n let markerConfigs;\r\n switch (layout) {\r\n case \"month\": \r\n markerConfigs = getMonthViewMarkers(settings);\r\n break;\r\n case 'timeline':\r\n case 'units':\r\n markerConfigs = getTimelineAndUnitsViewMarkers(settings);\r\n break;\r\n default: \r\n markerConfigs = getColumnViewMarkers(settings);\r\n break;\r\n }\r\n markerConfigs.forEach((cfg) => {\r\n dndMarkers.push(scheduler.markTimespan(cfg));\r\n });\r\n }\r\n\r\n function getColumnViewMarkers(settings){\r\n const {event, layout, viewName, sectionId} = settings;\r\n let columnViewMarkersArray = [];\r\n let eventNodes = scheduler.$container.querySelectorAll(`[${scheduler.config.event_attribute}='${event.id}']:not(.dhx_cal_select_menu):not(.dhx_drag_marker)`);\r\n if(eventNodes){\r\n for (let i = 0; i < eventNodes.length; i++) {\r\n let eventNodeClone = eventNodes[i].cloneNode(true);\r\n let startDate = new Date(+eventNodeClone.getAttribute(\"data-bar-start\"));\r\n let endDate = new Date(+eventNodeClone.getAttribute(\"data-bar-end\"));\r\n let dates = {start_date: startDate, end_date: endDate};\r\n const configSettings = {\r\n event: dates, \r\n layout, \r\n viewName, \r\n sectionId, \r\n eventNode:eventNodeClone\r\n };\r\n columnViewMarkersArray.push(createMarkerConfig(configSettings));\r\n }\t\r\n }\r\n return columnViewMarkersArray;\r\n }\r\n\r\n function getMonthViewMarkers(settings){\r\n let monthViewMarkersArray = [];\r\n const {event, layout, viewName, sectionId} = settings;\r\n const weekDates = [];\r\n let currDate = new Date(event.start_date);\r\n while(currDate.valueOf() < event.end_date.valueOf()){\r\n let obj = {start_date: currDate};\r\n weekDates.push(obj);\r\n currDate = scheduler.date.week_start(scheduler.date.add(currDate, 1, \"week\"));\r\n }\r\n let cells = scheduler.$container.querySelectorAll(`[${scheduler.config.event_attribute}='${event.id}']`);\r\n for (let i = 0; i < cells.length; i++) {\r\n const configSettings = {\r\n event: weekDates[i], \r\n layout, \r\n viewName, \r\n sectionId, \r\n eventNode: cells[i].cloneNode(true)\r\n };\r\n monthViewMarkersArray.push(createMarkerConfig(configSettings));\r\n }\r\n return monthViewMarkersArray;\r\n }\r\n\r\n function getTimelineAndUnitsViewMarkers(settings){\r\n let unitMarkersArray = [];\r\n const {event, layout, viewName, eventNode} = settings;\r\n let sectionPropertyName = checkSectionPropertyName(viewName);\r\n if (sectionPropertyName){\r\n const sections = String(event[sectionPropertyName]).split(scheduler.config.section_delimiter);\r\n const formatedSections = sections.map(element => String(element));\r\n const elems = [];\r\n for (let i = 0; i < formatedSections.length; i++) {\r\n elems[i] = eventNode.cloneNode(true);\r\n const configSettings = {\r\n event, \r\n layout, \r\n viewName, \r\n sectionId: formatedSections[i],\r\n eventNode: elems[i]\r\n };\r\n unitMarkersArray.push(createMarkerConfig(configSettings));\r\n }\r\n }\r\n return unitMarkersArray;\r\n }\r\n \r\n scheduler.attachEvent(\"onBeforeDrag\", function (id, mode, e){\r\n if (isEnabled()) {\r\n dragStarted = true;\r\n event = scheduler.getEvent(id);\r\n eventNode = e.target.closest(`[${scheduler.config.event_attribute}]`);\r\n const viewName = scheduler.getState().mode;\r\n const layout = checkViewName(viewName);\r\n // to avoid incorrect eventNode and marker creation when scheduler.config.cascade_event_display included\r\n if (layout == \"units\" && scheduler.config.cascade_event_display ) {\r\n scheduler.unselect(id);\r\n eventNode = e.target.closest(`[${scheduler.config.event_attribute}]`);\r\n }\r\n }\r\n return true;\r\n });\r\n\r\n scheduler.attachEvent(\"onEventDrag\", function (id, mode, e){\r\n if(dragStarted && isEnabled()){\r\n dragStarted = false;// insert element only once after dnd start\r\n const viewName = scheduler.getState().mode;\r\n const layout = checkViewName(viewName);\r\n const sectionId = scheduler.getActionData(e).section;\r\n if (event) {\r\n const settings = {\r\n event, \r\n layout, \r\n viewName, \r\n sectionId, \r\n eventNode\r\n };\r\n createViewMarker(settings);\r\n }\r\n }\r\n });\r\n\r\n scheduler.attachEvent(\"onDragEnd\", function(id, mode, e){\r\n for (let i = 0; i < dndMarkers.length; i++) {\r\n scheduler.unmarkTimespan(dndMarkers[i]);\r\n }\r\n dndMarkers = [];\r\n eventNode = null;\r\n event = null;\r\n });\r\n}","export default function undoDelete(scheduler) {\r\n\tscheduler.attachEvent(\"onEventDeleted\", function (id, ev) {\r\n\t\tlet deletedEvent = scheduler.copy(ev);\r\n\t\tif (scheduler.config.undo_deleted && !scheduler.getState().new_event) {\r\n\t\t\tscheduler.message({\r\n\t\t\t\ttext: `
\r\n Event deleted\r\n \r\n
`,\r\n\t\t\t\texpire: 10000,\r\n\t\t\t\ttype: \"popup_after_delete\",\r\n\t\t\t\tcallback: function (e) {\r\n\t\t\t\t\tlet undoBtn = e.target.closest(\r\n\t\t\t\t\t\t`[data-deleted-event-id=\"${ev.id}\"]`\r\n\t\t\t\t\t);\r\n\t\t\t\t\tif (undoBtn) {\r\n\t\t\t\t\t\tscheduler.addEvent(deletedEvent);\r\n\t\t\t\t\t\tscheduler.render();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t});\r\n}\r\n","export default function limitPlugin(scheduler){\r\n\r\n\r\n\tscheduler.config.mark_now = true;\r\n\tscheduler.config.display_marked_timespans = true;\r\n\tscheduler.config.overwrite_marked_timespans = true;\r\n\r\n\r\n\tvar dhx_time_block = \"dhx_time_block\";\r\n\tvar default_timespan_type = \"default\";\r\n\tvar fix_options = function(options, days, zones) {\r\n\t\tif (days instanceof Date && zones instanceof Date) {\r\n\t\t\toptions.start_date = days;\r\n\t\t\toptions.end_date = zones;\r\n\t\t} else {\r\n\t\t\toptions.days = days;\r\n\t\t\toptions.zones = zones;\r\n\t\t}\r\n\t\treturn options;\r\n\t};\r\n\tvar get_resulting_options = function(days, zones, sections) {\r\n\t\tvar options = (typeof days == \"object\") ? days : { days: days };\r\n\t\toptions.type = dhx_time_block;\r\n\t\toptions.css = \"\";\r\n\t\tif (zones) {\r\n\t\t\tif (sections)\r\n\t\t\t\toptions.sections = sections;\r\n\t\t\toptions = fix_options(options, days, zones);\r\n\t\t}\r\n\t\treturn options;\r\n\t};\r\n\tscheduler.blockTime = function(days, zones, sections){\r\n\t\tvar options = get_resulting_options(days, zones, sections);\r\n\t\treturn scheduler.addMarkedTimespan(options);\r\n\t};\r\n\tscheduler.unblockTime = function(days, zones, sections) {\r\n\t\tzones = zones || \"fullday\";\r\n\t\tvar options = get_resulting_options(days, zones, sections);\r\n\t\treturn scheduler.deleteMarkedTimespan(options);\r\n\t};\r\n\r\n\tscheduler.checkInMarkedTimespan = function(ev, timespan_type, on_overlap){\r\n\t\ttimespan_type = timespan_type || default_timespan_type;\r\n\r\n\t\tvar res = true;\r\n\t\tvar temp_start_date = new Date(ev.start_date.valueOf());\r\n\t\tvar temp_end_date = scheduler.date.add(temp_start_date, 1, \"day\");\r\n\t\tvar timespans = scheduler._marked_timespans;\r\n\t\tfor (; temp_start_date < ev.end_date; temp_start_date = scheduler.date.date_part(temp_end_date), temp_end_date = scheduler.date.add(temp_start_date, 1, \"day\") ) {\r\n\t\t\tvar day_value = +scheduler.date.date_part( new Date(temp_start_date) ); // the first part of event not necessarily contains only date part\r\n\t\t\tvar day_index = temp_start_date.getDay();\r\n\r\n\t\t\tvar zones = getZones(ev, timespans, day_index, day_value, timespan_type);\r\n\t\t\tif (zones){\r\n\t\t\t\tfor (var i = 0; i < zones.length; i+=2) {\r\n\r\n\t\t\t\t\t// they may change for new event if it passes limit zone\r\n\t\t\t\t\tvar eventStart = scheduler._get_zone_minutes(temp_start_date);\r\n\t\t\t\t\tvar eventEnd = ( ev.end_date>temp_end_date || ev.end_date.getDate() != temp_start_date.getDate() ) ? 1440 : scheduler._get_zone_minutes(ev.end_date);\r\n\r\n\t\t\t\t\tvar markerStart = zones[i];\r\n\t\t\t\t\tvar markerEnd = zones[i+1];\r\n\t\t\t\t\tif (markerStarteventStart) {\r\n\t\t\t\t\t\tif(typeof on_overlap == \"function\"){\r\n\t\t\t\t\t\t\t//handler allows to cancel overlapping\r\n\t\t\t\t\t\t\t//actually needed only to keep default behavior of limits\r\n\t\t\t\t\t\t\tres = on_overlap(ev, eventStart, eventEnd, markerStart, markerEnd);//event object, event start/end minutes in 'zones' format, zone start/end minutes\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tres = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(!res)\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn !res;\r\n\t};\r\n\tscheduler.checkLimitViolation = function(event){\r\n\t\tif(!event)\r\n\t\t\treturn true;\r\n\t\tif (!scheduler.config.check_limits)\r\n\t\t\treturn true;\r\n\t\tvar s = scheduler;\r\n\t\tvar c = s.config;\r\n\t\tvar evs = [];\r\n\t\tif ((event.rec_type && event._end_date) || (event.rrule)) {\r\n\t\t\tconst seriesEnd = event._end_date || event.end_date;\r\n\t\t\t// GS-2482 need to take into account that a part of recurring events might be outside the limits\r\n\t\t\tif ((c.limit_start && c.limit_end)) {\r\n\t\t\t\tvar recEventInLimits = seriesEnd.valueOf() >= c.limit_start.valueOf() && event.start_date.valueOf() <= c.limit_end.valueOf();\r\n\t\t\t\treturn recEventInLimits;\r\n\t\t\t} else return true;\r\n\t\t} else {\r\n\t\t\tevs = [event];\r\n\t\t}\r\n\r\n\t\tvar complete_res = true;\r\n\t\tfor (var p=0; p= c.limit_start.valueOf() && ev.end_date.valueOf() <= c.limit_end.valueOf()) : true;\r\n\t\t\tif (res){\r\n\t\t\t\tres = !scheduler.checkInMarkedTimespan(ev, dhx_time_block, function(event, eventStart, eventEnd, markerStart, markerEnd){\r\n\t\t\t\t\t//try crop event to allow placing\r\n\t\t\t\t\tvar allow = true;\r\n\t\t\t\t\tif (eventStart<=markerEnd && eventStart >= markerStart){\r\n\t\t\t\t\t\tif (markerEnd == 24*60 || eventEnd <= markerEnd){\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(event._timed && s._drag_id && s._drag_mode == \"new-size\"){\r\n\t\t\t\t\t\t\tevent.start_date.setHours(0);\r\n\t\t\t\t\t\t\tevent.start_date.setMinutes(markerEnd);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ((eventEnd >= markerStart && eventEnd <= markerEnd) || (eventStart < markerStart && eventEnd > markerEnd)){\r\n\t\t\t\t\t\tif(event._timed && s._drag_id && s._drag_mode == \"new-size\"){\r\n\t\t\t\t\t\t\tevent.end_date.setHours(0);\r\n\t\t\t\t\t\t\tevent.end_date.setMinutes(markerStart);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn allow;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\tif (!res) {\r\n\t\t\t\tres = (s.checkEvent(\"onLimitViolation\")) ? s.callEvent(\"onLimitViolation\",[ev.id, ev]) : res;\r\n\t\t\t}\r\n\t\t\tcomplete_res = complete_res && res;\r\n\t\t}\r\n\t\tif(!complete_res){\r\n\t\t\ts._drag_id = null;\r\n\t\t\ts._drag_mode = null;\r\n\t\t}\r\n\t\treturn complete_res;\r\n\r\n\r\n\t};\r\n\tscheduler._get_blocked_zones = function(timespans, property, day_index, day_value, timespan_type){\r\n\t\tvar zones =[];\r\n\t\tif (timespans && timespans[property]) {\r\n\t\t\tvar timeline_zones = timespans[property];\r\n\t\t\tvar blocked_timeline_zones = this._get_relevant_blocked_zones(day_index, day_value, timeline_zones, timespan_type);\r\n\t\t\tfor (var i=0; i this._min_date && now.getHours() >= cfg.first_hour && now.getHours() 1) {\r\n\t\t\t\t\tif(view.size && view.options.length){\r\n\t\t\t\t\t\tday_index = ((view.position+ day_index) / view.options.length) * view.size;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstart_index = day_index;\r\n\t\t\t\t\tend_index = day_index + units_l;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tstart_index = 0;\r\n\t\t\t\t\tend_index = start_index + units_l;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar r_divs = [];\r\n\r\n\t\t\t\tfor (var i = start_index; i < end_index; i++) {\r\n\t\t\t\t\tvar t_day = i; // as each unit is actually considered +1 day\r\n\t\t\t\t\toptions.days = t_day;\r\n\t\t\t\t\tvar t_div = scheduler._render_marked_timespan(options, null, t_day)[0];\r\n\t\t\t\t\tr_divs.push(t_div);\r\n\t\t\t\t}\r\n\t\t\t\treturn r_divs;\r\n\t\t\t} else { // day/week views\r\n\t\t\t\toptions.days = day_index;\r\n\t\t\t\treturn scheduler._render_marked_timespan(options, null, day_index);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\toptions.days = +scheduler.date.date_part(now);\r\n\t\t\t\treturn scheduler._render_marked_timespan(options, null, null);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tscheduler._remove_mark_now = function() {\r\n\t\tvar dhx_now_time = 'dhx_now_time';\r\n\t\tvar els = this._els[dhx_now_time];\r\n\t\tfor (var i=0; i config.start_date) || (config.days !== undefined && config.zones)) && !config.type )\r\n\t\t\treturn r_configs; // incorrect config was provided\r\n\r\n\t\tvar min = 0;\r\n\t\tvar max = 24*60;\r\n\t\tif (config.zones == \"fullday\")\r\n\t\t\tconfig.zones = [min, max];\r\n\t\tif (config.zones && config.invert_zones) {\r\n\t\t\tconfig.zones = scheduler.invertZones(config.zones);\r\n\t\t}\r\n\r\n\t\tconfig.id = scheduler.uid();\r\n\t\tconfig.css = config.css||\"\";\r\n\t\tconfig.type = config.type||default_timespan_type;\r\n\r\n\t\tvar sections = config.sections;\r\n\t\tif (sections) {\r\n\t\t\tfor (var view_key in sections) {\r\n\t\t\t\tif (sections.hasOwnProperty(view_key)) {\r\n\t\t\t\t\tvar ids = sections[view_key];\r\n\t\t\t\t\tif (!(ids instanceof Array))\r\n\t\t\t\t\t\tids = [ids];\r\n\t\t\t\t\tfor (var i=0; i t_sd) ? scheduler._get_zone_minutes(start_date) : min;\r\n\t\t\t\t\tvar zone_end = ( end_date > t_ed || end_date.getDate() != t_sd.getDate() ) ? max : scheduler._get_zone_minutes(end_date);\r\n\t\t\t\t\tt_config.zones = [zone_start, zone_end];\r\n\t\t\t\t\tr_configs.push(t_config);\r\n\r\n\t\t\t\t\tt_sd = t_ed;\r\n\t\t\t\t\tt_ed = scheduler.date.add(t_ed, 1, \"day\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (c_config.days instanceof Date)\r\n\t\t\t\t\tc_config.days = (scheduler.date.date_part(c_config.days)).valueOf();\r\n\t\t\t\tc_config.zones = config.zones.slice();\r\n\t\t\t\tr_configs.push(c_config);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn r_configs;\r\n\t};\r\n\tscheduler._get_dates_by_index = function(index, start, end) {\r\n\t\tvar dates = [];\r\n\t\tstart = scheduler.date.date_part(new Date(start||scheduler._min_date));\r\n\t\tend = new Date(end||scheduler._max_date);\r\n\t\tvar start_day = start.getDay();\r\n\t\tvar delta = (index-start_day >= 0) ? (index-start_day) : (7-start.getDay()+index);\r\n\t\tvar t_date = scheduler.date.add(start, delta, \"day\");\r\n\t\tfor (; t_date < end; t_date = scheduler.date.add(t_date, 1, \"week\")) {\r\n\t\t\tdates.push(t_date);\r\n\t\t}\r\n\t\treturn dates;\r\n\t};\r\n\tscheduler._get_css_classes_by_config = function(config) {\r\n\t\tvar css_classes = [];\r\n\t\tif (config.type == dhx_time_block) {\r\n\t\t\tcss_classes.push(dhx_time_block);\r\n\t\t\tif (config.css)\r\n\t\t\t\tcss_classes.push(dhx_time_block+\"_reset\");\r\n\t\t}\r\n\t\tcss_classes.push(\"dhx_marked_timespan\", config.css);\r\n\t\treturn css_classes.join(\" \");\r\n\t};\r\n\tscheduler._get_block_by_config = function(config) {\r\n\t\tvar block = document.createElement(\"div\");\r\n\t\tif (config.html) {\r\n\t\t\tif (typeof config.html == \"string\")\r\n\t\t\t\tblock.innerHTML = config.html;\r\n\t\t\telse\r\n\t\t\t\tblock.appendChild(config.html);\r\n\t\t}\r\n\t\treturn block;\r\n\t};\r\n\tscheduler._render_marked_timespan = function(options, area, day) {\r\n\t\tvar blocks = []; // resulting block which will be rendered and returned\r\n\t\tvar c = scheduler.config;\r\n\t\tvar min_date = this._min_date;\r\n\t\tvar max_date = this._max_date;\r\n\t\tvar day_value = false; // if timespan for specific date should be displayed\r\n\r\n\t\tif (!c.display_marked_timespans)\r\n\t\t\treturn blocks;\r\n\r\n\t\t// in case of markTimespan\r\n\t\tif (!day && day !== 0) {\r\n\t\t\tif (options.days < 7)\r\n\t\t\t\tday = options.days;\r\n\t\t\telse {\r\n\t\t\t\tvar date_to_display = new Date(options.days);\r\n\t\t\t\tday_value = +date_to_display;\r\n\r\n\t\t\t\t// in case of markTimespan date could be not in the viewing range, need to return\r\n\t\t\t\tif ( !(+max_date > +date_to_display && +min_date <= +date_to_display) )\r\n\t\t\t\t\treturn blocks;\r\n\r\n\t\t\t\tday = date_to_display.getDay();\r\n\t\t\t}\r\n\r\n\t\t\t// convert day default index (Sun - 0, Sat - 6) to index of hourscales (depends on week_start and config.start_on_monday)\r\n\t\t\tvar min_day = min_date.getDay();\r\n\t\t\tif (min_day > day) {\r\n\t\t\t\tday = 7 - (min_day-day);\r\n\t\t\t} else {\r\n\t\t\t\tday = day - min_day;\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar zones = options.zones;\r\n\t\tvar css_classes = scheduler._get_css_classes_by_config(options);\r\n\r\n\t\tif (scheduler._table_view && scheduler._mode == \"month\") {\r\n\t\t\tvar areas = [];\r\n\t\t\tvar days = [];\r\n\r\n\r\n\t\t\tif (!area) {\r\n\t\t\t\tdays = (day_value) ? [day_value] : scheduler._get_dates_by_index(day);\r\n\t\t\t\tfor (var i=0; i < days.length; i++) {\r\n\t\t\t\t\tareas.push( this._scales[days[i]] );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tareas.push(area);\r\n\t\t\t\tdays.push(day);\r\n\t\t\t}\r\n\r\n\t\t\tfor (var i=0; i < areas.length; i++) {\r\n\t\t\t\tarea = areas[i];\r\n\t\t\t\tday = days[i];\r\n\r\n\t\t\t\tvar sday = this.locate_holder_day(day, false) % this._cols.length;\r\n\r\n\t\t\t\tif(this._ignores[sday]) continue;\r\n\r\n\t\t\t\tvar block_proto = scheduler._get_block_by_config(options);\r\n\t\t\t\tblock_proto.className = css_classes;\r\n\t\t\t\tblock_proto.style.top = \"0px\";\r\n\t\t\t\tblock_proto.style.height = \"100%\";\r\n\t\t\t\t\r\n\t\t\t\tfor (var k=0; k < zones.length; k+=2) {\r\n\t\t\t\t\tvar start = zones[i];\r\n\t\t\t\t\tvar end = zones[i+1];\r\n\t\t\t\t\tif (end <= start)\r\n\t\t\t\t\t\treturn [];\r\n\r\n\t\t\t\t\tvar block = block_proto.cloneNode(true);\r\n\r\n\t\t\t\t\tblock.style.left = \"0px\";\r\n\t\t\t\t\tblock.style.width = \"100%\";\r\n\r\n\t\t\t\t\tarea.appendChild(block);\r\n\t\t\t\t\tblocks.push(block);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvar index = day;\r\n\r\n\t\t\tif(this._ignores[this.locate_holder_day(day, false)]) return blocks;\r\n\r\n\t\t\tif (this._props && this._props[this._mode] && options.sections && options.sections[this._mode]) {\r\n\t\t\t\tvar view = this._props[this._mode];\r\n\t\t\t\tindex = view.order[options.sections[this._mode]];\r\n\r\n\t\t\t\tvar inner_index = view.order[options.sections[this._mode]];\r\n\t\t\t\tif(!(view.days > 1)){\r\n\t\t\t\t\tindex = inner_index;\r\n\t\t\t\t\tif (view.size && (index > view.position+view.size)) {\r\n\t\t\t\t\t\tindex = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar units_l = view.size || view.options.length;\r\n\t\t\t\t\tindex = index*units_l + inner_index;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tarea = area ? area : scheduler.locate_holder(index);\r\n\r\n\t\t\tfor (var i = 0; i < zones.length; i+=2){\r\n\t\t\t\tvar start = Math.max(zones[i], c.first_hour*60);\r\n\t\t\t\tvar end = Math.min(zones[i+1], c.last_hour*60);\r\n\t\t\t\tif (end <= start) {\r\n\t\t\t\t\tif (i+2 < zones.length)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\treturn [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar block = scheduler._get_block_by_config(options);\r\n\t\t\t\tblock.className = css_classes;\r\n\r\n\t\t\t\t// +1 for working with section which really takes up whole height (as % would be == 0)\r\n\t\t\t\tvar all_hours_height = this.config.hour_size_px*24 + 1;\r\n\t\t\t\tvar hour_ms = 60*60*1000;\r\n\t\t\t\tblock.style.top = (Math.round((start*60*1000-this.config.first_hour*hour_ms)*this.config.hour_size_px/hour_ms) % all_hours_height) + \"px\";\r\n\t\t\t\tblock.style.height = Math.max((Math.round(((end-start)*60*1000)*this.config.hour_size_px/hour_ms)) % all_hours_height, 1)+\"px\";\r\n\r\n\t\t\t\tarea.appendChild(block);\r\n\t\t\t\tblocks.push(block);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn blocks;\r\n\t};\r\n\r\n\tscheduler._mark_timespans = function(){\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\t\tvar divs = [];\r\n\t\tif (scheduler._table_view && scheduler._mode == \"month\"){\r\n\t\t\tfor (var day in this._scales) {\r\n\t\t\t\tvar date = new Date(+day);\r\n\t\t\t\tdivs.push.apply(divs, scheduler._on_scale_add_marker(this._scales[day],date));\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\t//manually trigger rendering of configs for each column\r\n\t\t\tvar date = new Date(scheduler._min_date);\r\n\t\t\tfor (var i = 0, len = data.childNodes.length; i < len; i++) {\r\n\t\t\t\tvar area = data.childNodes[i];\r\n\t\t\t\tif (area.firstChild && scheduler._getClassName(area.firstChild).indexOf(\"dhx_scale_hour\") > -1) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdivs.push.apply(divs, scheduler._on_scale_add_marker(area, date));\r\n\t\t\t\tdate = scheduler.date.add(date, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn divs;\r\n\t};\r\n\r\n\t// just marks timespan, will be cleaned after refresh\r\n\tscheduler.markTimespan = function(configuration) {\r\n\t\tif(!this._els){\r\n\t\t\tthrow new Error(\"`scheduler.markTimespan` can't be used before scheduler initialization. Place `scheduler.markTimespan` call after `scheduler.init`.\");\r\n\t\t}\r\n\r\n\r\n\t\tvar rebuild_els = false;\r\n\t\tif(!this._els[\"dhx_cal_data\"]){\r\n\t\t\tscheduler.get_elements();\r\n\t\t\trebuild_els = true;\r\n\t\t}\r\n\r\n\r\n\t\t// backup regular marked timespans\r\n\t\tvar timespans_ids = scheduler._marked_timespans_ids,\r\n\t\t\ttimespan_types = scheduler._marked_timespans_types,\r\n\t\t\ttimespans = scheduler._marked_timespans;\r\n\r\n\t\tscheduler.deleteMarkedTimespan();\r\n\r\n\t\t//add block to configs\r\n\t\tscheduler.addMarkedTimespan(configuration);\r\n\r\n\t\tvar divs = scheduler._mark_timespans();\r\n\r\n\t\tif(rebuild_els)\r\n\t\t\tscheduler._els = [];\r\n\r\n\t\t// restore timespan config\r\n\t\tscheduler._marked_timespans_ids = timespans_ids;\r\n\t\tscheduler._marked_timespans_types = timespan_types;\r\n\t\tscheduler._marked_timespans = timespans;\r\n\r\n\t\treturn divs;\r\n\t};\r\n\tscheduler.unmarkTimespan = function(divs) {\r\n\t\tif (!divs)\r\n\t\t\treturn;\r\n\t\tfor (var i=0; i c_zone_end && zone_start <= c_zone_end) || (zone_start < c_zone_start && zone_end >= c_zone_start)) {\r\n\t\t\t\t\tresulting_zones[i] = Math.min(c_zone_start, zone_start);\r\n\t\t\t\t\tresulting_zones[i+1] = Math.max(c_zone_end, zone_end);\r\n\t\t\t\t\ti -= 2;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!isLast) // do nothing, maybe next current zone will match or will be last\r\n\t\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\t\tvar offset = (c_zone_start > zone_start)?0:2;\r\n\t\t\t\t\tresulting_zones.splice(i+offset, 0, zone_start, zone_end); // last current zone, need to add another\r\n\t\t\t\t}\r\n\t\t\t\tzones.splice(k--,2); // zone was merged or added, need to exclude it\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn resulting_zones;\r\n\t};\r\n\tscheduler._subtract_timespan_zones = function(current_zones, zones) {\r\n\t\tvar resulting_zones = current_zones.slice();\r\n\t\tfor (var i=0; i c_zone_start && zone_start < c_zone_end) {\r\n\t\t\t\t\tvar is_modified = false;\r\n\t\t\t\t\tif (c_zone_start >= zone_start && c_zone_end <= zone_end) {\r\n\t\t\t\t\t\tresulting_zones.splice(i, 2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (c_zone_start < zone_start) {\r\n\t\t\t\t\t\tresulting_zones.splice(i, 2, c_zone_start, zone_start);\r\n\t\t\t\t\t\tis_modified = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (c_zone_end > zone_end) {\r\n\t\t\t\t\t\tresulting_zones.splice( (is_modified)?(i+2):i, (is_modified)?0:2, zone_end, c_zone_end);\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti -= 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn resulting_zones;\r\n\t};\r\n\tscheduler.invertZones = function(zones) {\r\n\t\treturn scheduler._subtract_timespan_zones([0, 1440], zones.slice());\r\n\t};\r\n\tscheduler._delete_marked_timespan_by_id = function(id) {\r\n\t\tvar configs = scheduler._marked_timespans_ids[id];\r\n\t\tif (configs) {\r\n\t\t\tfor (var i=0; i 1)){\r\n\t\t\t\tday = scheduler.date.date_part(new Date(this._date)); // for units view actually only 1 day is displayed yet the day variable will change, need to use this._date for all calls\r\n\t\t\t}else{\r\n\t\t\t\tvar dx = 24*60*60*1000;\r\n\t\t\t\tvar day_ind = Math.round((day - scheduler._min_date)/dx);\r\n\t\t\t\tvar unitsPerDay = view.size || units.length;\r\n\t\t\t\tday = scheduler.date.add(scheduler._min_date, Math.floor(day_ind/unitsPerDay), \"day\"); // to the \"same\" day for all sections\r\n\t\t\t\tday = scheduler.date.date_part(day);\r\n\t\t\t}\r\n\t\t\tday_index = day.getDay();\r\n\t\t\tday_value = day.valueOf();\r\n\r\n\t\t\tif (timespans[mode] && timespans[mode][unit.key]) {\r\n\t\t\t\tvar unit_zones = timespans[mode][unit.key];\r\n\t\t\t\tvar unit_types = scheduler._get_types_to_render(unit_zones[day_index], unit_zones[day_value]);\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(unit_types));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar global_data = timespans[\"global\"];\r\n\r\n\t\tif(scheduler.config.overwrite_marked_timespans){\r\n\t\t\tvar day_types = global_data[day_value]||global_data[day_index];\r\n\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(day_types));\r\n\t\t} else {\r\n\t\t\tif(global_data[day_value]){\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(global_data[day_value]));\r\n\t\t\t}\r\n\t\t\tif(global_data[day_index]){\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(global_data[day_index]));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (var i=0; i {\r\n\t\t\tif(date){\r\n\t\t\t\tcalls.setModeDate.date = date;\r\n\t\t\t}\r\n\t\t\tif(mode){\r\n\t\t\t\tcalls.setModeDate.mode = mode;\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tvar methods = {\r\n\t\t\trender:(date, mode) => {calls.needRender = true; rememberModeDate(date, mode);},\r\n\t\t\tsetCurrentView:(date, mode) => {calls.needRender = true; rememberModeDate(date, mode);},\r\n\t\t\tupdateView:(date, mode) => {calls.needUpdateView = true; rememberModeDate(date, mode);},\r\n\t\t\trender_data:() => calls.needRender = true,\r\n\t\t\trender_view_data:(evs) => { \r\n\t\t\t\tif(evs && evs.length){\r\n\t\t\t\t\tevs.forEach((e) => calls.repaintEvents[e.id] = true);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcalls.needRender = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tdisableMethods.call(this, methods);\r\n\r\n\t\tisActive = true;\r\n\t\tthis.callEvent(\"onBeforeBatchUpdate\", []);\r\n\r\n\t\tbatchUpdatePayload(callback);\r\n\r\n\t\tthis.callEvent(\"onAfterBatchUpdate\", []);\r\n\r\n\t\trestoreMethods.call(this);\r\n\r\n\t\tisActive = false;\r\n\t\tif(!noRedraw){\r\n\t\t\tif(calls.needRender){\r\n\t\t\t\tscheduler.render(calls.setModeDate.date, calls.setModeDate.mode);\r\n\t\t\t}else if(calls.needUpdateView){\r\n\t\t\t\tscheduler.updateView(calls.setModeDate.date, calls.setModeDate.mode);\r\n\t\t\t}else{\r\n\t\t\t\tfor(const i in calls.repaintEvents){\r\n\t\t\t\t\tscheduler.updateEvent(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (call_dp) {\r\n\t\t\tthis._dp.setUpdateMode(dp_mode);\r\n\t\t\tthis._dp.sendData();\r\n\t\t}\r\n\t};\r\n}\r\n\r\nexport default function(scheduler){\r\n\tscheduler.batchUpdate = createMethod(scheduler);\r\n}","import dragHighlightPos from \"./drag_highlight_pos\";\r\nimport undoDelete from \"./undo_delete\";\r\nimport limit from \"./limit\";\r\nimport batchUpdate from \"./batch_update\";\r\n\r\nexport default function initPlugins(scheduler){\r\n undoDelete(scheduler);\r\n dragHighlightPos(scheduler);\r\n limit(scheduler);\r\n batchUpdate(scheduler);\r\n}","var uidSeed = Date.now();\r\nfunction uid () {\r\n\treturn uidSeed++;\r\n}\r\n\r\n// iframe-safe array type check instead of using instanceof\r\nfunction isArray(obj){\r\n\tif(Array.isArray){\r\n\t\treturn Array.isArray(obj);\r\n\t}else{\r\n\t\t// close enough\r\n\t\treturn (obj && obj.length !== undefined && obj.pop && obj.push);\r\n\t}\r\n}\r\n\r\n// non-primitive string object, e.g. new String(\"abc\")\r\nfunction isStringObject(obj){\r\n\treturn obj && typeof obj === \"object\" && \r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function String() { [native code] }\";\r\n}\r\n\r\n// non-primitive number object, e.g. new Number(5)\r\nfunction isNumberObject(obj){\r\n\treturn obj && typeof obj === \"object\" && \r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function Number() { [native code] }\";\r\n}\r\n\r\n// non-primitive number object, e.g. new Boolean(true)\r\nfunction isBooleanObject(obj){\r\n\treturn obj && typeof obj === \"object\" &&\r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function Boolean() { [native code] }\";\r\n}\r\n\r\nfunction isDate(obj) {\r\n\tif (obj && typeof obj === \"object\") {\r\n\t\treturn !!(obj.getFullYear && obj.getMonth && obj.getDate);\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\nfunction defined(obj) {\r\n\treturn typeof(obj) != \"undefined\";\r\n}\r\n\r\nfunction delay (callback, timeout){\r\n\tvar timer;\r\n\r\n\tvar result = function() {\r\n\t\tresult.$cancelTimeout();\r\n\t\tresult.$pending = true;\r\n\t\tvar args = Array.prototype.slice.call(arguments);\r\n\t\ttimer = setTimeout(function(){\r\n\t\t\tcallback.apply(this, args);\r\n\t\t\tresult.$pending = false;\r\n\t\t}, timeout);\r\n\t};\r\n\r\n\tresult.$pending = false;\r\n\tresult.$cancelTimeout = function(){\r\n\t\tclearTimeout(timer);\r\n\t\tresult.$pending = false;\r\n\t};\r\n\tresult.$execute = function(){\r\n\t\tvar args = Array.prototype.slice.call(arguments);\r\n\t\tcallback.apply(this, args);\r\n\t\tresult.$cancelTimeout();\r\n\t};\r\n\r\n\treturn result;\r\n}\r\n\r\nexport default {\r\n\tuid: uid,\r\n\tmixin: function mixin (target, source, force){\r\n\t\tfor (var f in source)\r\n\t\t\tif (((target[f] === undefined) || force)) target[f]=source[f];\r\n\t\treturn target;\r\n\t},\r\n\tcopy: function copy(object) {\r\n\t\tvar i, result; // iterator, types array, result\r\n\t\r\n\t\tif (object && typeof object == \"object\") {\r\n\t\r\n\t\t\tswitch (true){\r\n\t\t\t\tcase (isDate(object)):\r\n\t\t\t\t\tresult = new Date(object);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isArray(object)):\r\n\t\t\t\t\tresult = new Array(object.length);\r\n\t\t\t\t\tfor(i = 0; i < object.length; i++){\r\n\t\t\t\t\t\tresult[i] = copy(object[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isStringObject(object)):\r\n\t\t\t\t\tresult = new String(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isNumberObject(object)):\r\n\t\t\t\t\tresult = new Number(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isBooleanObject(object)):\r\n\t\t\t\t\tresult = new Boolean(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tresult = {};\r\n\t\t\t\t\tfor (i in object) {\r\n\t\t\t\t\t\tconst varType = typeof object[i];\r\n\r\n\t\t\t\t\t\tif (varType === \"string\" || varType === \"number\" || varType === \"boolean\" ) {\r\n\t\t\t\t\t\t\tresult[i] = object[i];\r\n\t\t\t\t\t\t} else if(isDate(object[i])){\r\n\t\t\t\t\t\t\tresult[i] = new Date(object[i]);\r\n\t\t\t\t\t\t}else if (Object.prototype.hasOwnProperty.apply(object, [i]))\r\n\t\t\t\t\t\t\tresult[i] = copy(object[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result || object;\r\n\t},\r\n\tdefined,\r\n\tisDate,\r\n\tdelay\r\n};\r\n","import utils from \"./utils/utils\";\r\n\r\nconst StateService = (function(){\r\n\tconst stateProviders = {};\r\n\r\n\tfunction getState(name){\r\n\t\tconst provider = stateProviders[name];\r\n\t\tif(provider){\r\n\t\t\treturn stateProviders[name].method();\r\n\t\t}else{\r\n\t\t\tconst res = {};\r\n\t\t\tfor(const i in stateProviders){\r\n\t\t\t\tif(!stateProviders[i].internal)\r\n\t\t\t\t\tutils.mixin(res, stateProviders[i].method(), true);\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\t\t}\r\n\t}\r\n\r\n\tfunction registerProvider(name, provider, internal){\r\n\t\tstateProviders[name] = { method: provider, internal: internal};\r\n\t}\r\n\r\n\tfunction unregisterProvider(name){\r\n\t\tdelete stateProviders[name];\r\n\t}\r\n\r\n\treturn {\r\n\t\tgetState: getState,\r\n\t\tregisterProvider: registerProvider,\r\n\t\tunregisterProvider: unregisterProvider\r\n\t};\r\n});\r\n\r\nexport default StateService;\r\n\r\n","export default function(scheduler){\r\n\treturn function assert(check, message){\r\n\t\tif (!check){\r\n\t\t\tif(scheduler.config.show_errors && scheduler.callEvent(\"onError\",[message]) !== false) {\r\n\t\t\t\tif (scheduler.message) {\r\n\t\t\t\t\tscheduler.message({type: \"error\", text: message, expire: -1});\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// eslint-disable-next-line\r\n\t\t\t\t\tconsole.log(message);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// eslint-disable-next-line no-debugger\r\n\t\t\t\tdebugger;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n}","export default function extend(scheduler) {\r\n\r\nvar commonViews = {\r\n\tagenda: \"https://docs.dhtmlx.com/scheduler/agenda_view.html\",\r\n\tgrid: \"https://docs.dhtmlx.com/scheduler/grid_view.html\",\r\n\tmap: \"https://docs.dhtmlx.com/scheduler/map_view.html\",\r\n\tunit: \"https://docs.dhtmlx.com/scheduler/units_view.html\",\r\n\ttimeline: \"https://docs.dhtmlx.com/scheduler/timeline_view.html\",\r\n\tweek_agenda: \"https://docs.dhtmlx.com/scheduler/weekagenda_view.html\",\r\n\tyear: \"https://docs.dhtmlx.com/scheduler/year_view.html\",\r\n\tanythingElse: \"https://docs.dhtmlx.com/scheduler/views.html\"\r\n};\r\n\r\nvar requiredExtensions = {\r\n\tagenda: \"ext/dhtmlxscheduler_agenda_view.js\",\r\n\tgrid: \"ext/dhtmlxscheduler_grid_view.js\",\r\n\tmap: \"ext/dhtmlxscheduler_map_view.js\",\r\n\tunit: \"ext/dhtmlxscheduler_units.js\",\r\n\ttimeline: \"ext/dhtmlxscheduler_timeline.js, ext/dhtmlxscheduler_treetimeline.js, ext/dhtmlxscheduler_daytimeline.js\",\r\n\tweek_agenda: \"ext/dhtmlxscheduler_week_agenda.js\",\r\n\tyear: \"ext/dhtmlxscheduler_year_view.js\",\r\n\tlimit: \"ext/dhtmlxscheduler_limit.js\"\r\n};\r\n\r\nscheduler._commonErrorMessages = {\r\n\tunknownView: function(view){\r\n\t\tvar relatedDoc = \"Related docs: \" + (commonViews[view] || commonViews.anythingElse); \r\n\t\tvar relatedExtension = requiredExtensions[view] ? (\"You're probably missing \" + requiredExtensions[view] + \".\") : \"\";\r\n\t\treturn (\r\n\t\t\t\"`\"+view+\"` view is not defined. \\n\" +\r\n\t\t\t\"Please check parameters you pass to `scheduler.init` or `scheduler.setCurrentView` in your code and ensure you've imported appropriate extensions. \\n\" + \r\n\t\t\trelatedDoc + \"\\n\" + (relatedExtension ? (relatedExtension + \"\\n\") : \"\"));\r\n\t},\r\n\tcollapsedContainer: function(div){\r\n\t\treturn \"Scheduler container height is set to *100%* but the rendered height is zero and the scheduler is not visible. \\n\"+\r\n\t\t\"Make sure that the container has some initial height or use different units. For example:\\n\" +\r\n\t\t\"
\\n\";\r\n\t}\r\n};\r\n\r\nscheduler.createTimelineView = function() {\r\n\tthrow new Error(\"scheduler.createTimelineView is not implemented. Be sure to add the required extension: \" + requiredExtensions.timeline + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.timeline);\r\n};\r\n\r\nscheduler.createUnitsView = function() {\r\n\tthrow new Error(\"scheduler.createUnitsView is not implemented. Be sure to add the required extension: \" + requiredExtensions.unit + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.unit);\r\n};\r\n\r\nscheduler.createGridView = function() {\r\n\tthrow new Error(\"scheduler.createGridView is not implemented. Be sure to add the required extension: \" + requiredExtensions.grid + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.grid);\r\n};\r\n\r\nscheduler.addMarkedTimespan = function() {\r\n\tthrow new Error(\"scheduler.addMarkedTimespan is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_limit.js\" + \r\n\t\"\\n\" +\r\n\t\"Related docs: https://docs.dhtmlx.com/scheduler/limits.html\");\r\n};\r\n\r\nscheduler.renderCalendar = function() {\r\n\tthrow new Error(\"scheduler.renderCalendar is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_minical.js\" + \r\n\t\"\\n\" +\r\n\t\"https://docs.dhtmlx.com/scheduler/minicalendar.html\");\r\n};\r\n\r\nscheduler.exportToPNG = function() {\r\n\tthrow new Error([\r\n\t\t\"scheduler.exportToPNG is not implemented.\",\r\n\t\t\"This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/png.html\",\r\n\t\t\"Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml\"\r\n\t].join(\"\\n\"));\r\n};\r\n\r\nscheduler.exportToPDF = function() {\r\n\tthrow new Error([\r\n\t\t\"scheduler.exportToPDF is not implemented.\",\r\n\t\t\"This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/pdf.html\",\r\n\t\t\"Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml\"\r\n\t].join(\"\\n\"));\r\n};\r\n\r\n\r\n}","import global from \"../global\";\r\n\r\nexport default function extend(scheduler) {\r\n/*\r\nif (global.dataProcessor && !dataProcessor.prototype.init_original){\r\n\tdataProcessor.prototype.init_original=dataProcessor.prototype.init;\r\n\tdataProcessor.prototype.init=function(obj){\r\n\t\tthis.init_original(obj);\r\n\t\tobj._dataprocessor=this;\r\n\r\n\t\tthis.setTransactionMode(\"POST\",true);\r\n\t\tthis.serverProcessor+=(this.serverProcessor.indexOf(\"?\")!=-1?\"&\":\"?\")+\"editing=true\";\r\n\t};\r\n}*/\r\n\r\nscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\tif(typeof dhtmlxError !== \"undefined\") {\r\n\t\twindow.dhtmlxError.catchError(\"LoadXML\", function(a, b, c){\r\n\t\t\tvar message = c[0].responseText;\r\n\r\n\t\t\tswitch (scheduler.config.ajax_error){\r\n\t\t\t\tcase \"alert\":\r\n\t\t\t\t\tglobal.alert(message);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"console\":\r\n\t\t\t\t\tglobal.console.log(message);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n});\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nfunction div(className){\r\n\tvar element = document.createElement(\"div\");\r\n\tvar classes = (className || \"\").split(\" \");\r\n\tclasses.forEach(function(cssClass){\r\n\t\telement.classList.add(cssClass);\r\n\t});\r\n\treturn element;\r\n}\r\nvar itemTypes = {\r\n\trows_container: function(){\r\n\t\treturn div(\"dhx_cal_navbar_rows_container\");\r\n\t},\r\n\trow: function(){\r\n\t\treturn div(\"dhx_cal_navbar_row\");\r\n\t},\r\n\tview: function (config) {\r\n\t\tvar element = div(\"dhx_cal_tab\");\r\n\t\telement.setAttribute(\"name\", config.view + \"_tab\");\r\n\t\telement.setAttribute(\"data-tab\", config.view);\r\n\t\t// element.setAttribute(\"data-viewname\", config.view); // FIXME: need to remove? not used anywhere\r\n\t\tif(scheduler.config.fix_tab_position){\r\n\t\t\tif(config.$firstTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_first\");\r\n\t\t\t}else if(config.$lastTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_last\");\r\n\t\t\t} else if(config.view !== \"week\") {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_standalone\");\r\n\t\t\t}\r\n\r\n\t\t\tif(config.$segmentedTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn element;\r\n\t},\r\n\tdate: function () {\r\n\t\treturn div(\"dhx_cal_date\");\r\n\t},\r\n\tbutton: function (config) {\r\n\t\treturn div(\"dhx_cal_nav_button dhx_cal_nav_button_custom dhx_cal_tab\");\r\n\t},\r\n\tbuiltInButton: function (config){\r\n\t\treturn div(\"dhx_cal_\" + config.view + \"_button dhx_cal_nav_button\");\r\n\t},\r\n\tspacer: function () {\r\n\t\treturn div(\"dhx_cal_line_spacer\");\r\n\t},\r\n\tminicalendarButton: function(config){\r\n\t\tvar minicalendarDiv = div('dhx_minical_icon');\r\n\t\tif(!config.click && !minicalendarDiv.$_eventAttached){\r\n\t\t\t\r\n\t\t\tscheduler.event(minicalendarDiv, \"click\", function () {\r\n\t\t\t\tif (scheduler.isCalendarVisible()) {\r\n\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tscheduler.renderCalendar({\r\n\t\t\t\t\t\tposition: this,\r\n\t\t\t\t\t\tdate: scheduler.getState().date,\r\n\t\t\t\t\t\tnavigation: true,\r\n\t\t\t\t\t\thandler: function (date, calendar) {\r\n\t\t\t\t\t\t\tscheduler.setCurrentView(date);\r\n\t\t\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn minicalendarDiv;\r\n\t},\r\n\thtml_element: function (config) {\r\n\t\treturn div(\"dhx_cal_nav_content\");\r\n\t}\r\n};\r\n\r\nfunction findRenderer(config) {\r\n\tvar renderer;\r\n\tif (config.view) {\r\n\t\tswitch (config.view){\r\n\t\t\tcase \"today\":\r\n\t\t\tcase \"next\":\r\n\t\t\tcase \"prev\":\r\n\t\t\t\trenderer = itemTypes.builtInButton;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"date\":\r\n\t\t\t\trenderer = itemTypes.date;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"spacer\":\r\n\t\t\t\trenderer = itemTypes.spacer;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"button\":\r\n\t\t\t\trenderer = itemTypes.button;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"minicalendar\":\r\n\t\t\t\trenderer = itemTypes.minicalendarButton;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\trenderer = itemTypes.view;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t} else if(config.rows) {\r\n\t\trenderer = itemTypes.rows_container;\r\n\t} else if(config.cols) {\r\n\t\trenderer = itemTypes.row;\r\n\t}\r\n\treturn renderer;\r\n}\r\n\r\nfunction renderElement(config){\r\n\tvar renderer = findRenderer(config);\r\n\tif(!renderer){\r\n\t\treturn;\r\n\t}\r\n\tvar element = renderer(config);\r\n\tif(config.css){\r\n\t\telement.classList.add(config.css);\r\n\t}\r\n\tif(config.width){\r\n\t\tvar value = config.width;\r\n\t\tif(value === value * 1){\r\n\t\t\tvalue += \"px\";\r\n\t\t}\r\n\t\telement.style.width = value;\r\n\t}\r\n\tif(config.height){\r\n\t\tvar value = config.height;\r\n\t\tif(value === value * 1){\r\n\t\t\tvalue += \"px\";\r\n\t\t}\r\n\t\telement.style.height = value;\r\n\t}\r\n\tif (config.click) {\r\n\t\tscheduler.event(element, \"click\", config.click);\r\n\t}\r\n\tif (config.html) {\r\n\t\telement.innerHTML = config.html;\r\n\t}\r\n\r\n\tif (config.align) {\r\n\t\tvar value = \"\";\r\n\t\tif (config.align == \"right\") {\r\n\t\t\tvalue = \"flex-end\";\r\n\t\t} else if(config.align == \"left\") {\r\n\t\t\tvalue = \"flex-start\";\r\n\t\t}\r\n\t\telement.style.justifyContent = value;\r\n\t}\r\n\treturn element;\r\n}\r\n\r\nfunction prepareConfig(config) {\r\n\tif (typeof config === \"string\") {\r\n\t\tconfig = {\r\n\t\t\tview: config\r\n\t\t};\r\n\t}\r\n\tif (!config.view && !config.rows && !config.cols) {\r\n\t\tconfig.view = \"button\";\r\n\t}\r\n\treturn config;\r\n}\r\n\r\nfunction renderLayout(config) {\r\n\tvar fragment = document.createDocumentFragment();\r\n\tvar items;\r\n\tif(Array.isArray(config)){\r\n\t\titems = config;\r\n\t}else{\r\n\t\titems = [config];\r\n\t}\r\n\r\n\tfor (var i = 0; i < items.length; i++) {\r\n\t\tvar view = prepareConfig(items[i]);\r\n\r\n\t\tif(view.view === \"day\" && items[i + 1]){\r\n\t\t\tvar next = prepareConfig(items[i + 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"month\"){\r\n\t\t\t\tview.$firstTab = true;\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(view.view === \"week\" && items[i - 1]){\r\n\t\t\tvar next = prepareConfig(items[i + 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"month\"){\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(view.view === \"month\" && items[i - 1]){\r\n\t\t\tvar next = prepareConfig(items[i - 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"day\"){\r\n\t\t\t\tview.$lastTab = true;\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar element = renderElement(view);\r\n\r\n\t\tfragment.appendChild(element);\r\n\t\tif(view.cols || view.rows){\r\n\t\t\telement.appendChild(renderLayout(view.cols || view.rows));\r\n\t\t}\r\n\t}\r\n\treturn fragment;\r\n}\r\n\r\nscheduler._init_nav_bar = function (items) {\r\n\tvar navBar = this.$container.querySelector(\".dhx_cal_navline\");\r\n\tif (!navBar){\r\n\t\tnavBar = document.createElement(\"div\");\r\n\t\tnavBar.className = \"dhx_cal_navline dhx_cal_navline_flex\";\r\n\t\tscheduler._update_nav_bar(items, navBar);\r\n\t\treturn navBar;\r\n\t}\r\n\treturn navBar;\r\n};\r\n\r\nvar previousNavbar = null;\r\nvar previousHeight = null;\r\nscheduler._update_nav_bar = function (config, container) {\r\n\r\n\tif(!config){\r\n\t\treturn;\r\n\t}\r\n\tvar heightChanged = false;\r\n\tvar configChanged = false;\r\n\r\n\tvar newHeight = config.height || scheduler.xy.nav_height;\r\n\r\n\tif(previousHeight === null ||\r\n\t\t\t(previousHeight !== newHeight)){\r\n\t\theightChanged = true;\r\n\t}\r\n\tif(!previousNavbar || JSON.stringify(config) !== previousNavbar){\r\n\t\tconfigChanged = true;\r\n\t}\r\n\r\n\tif(heightChanged){\r\n\t\tscheduler.xy.nav_height = newHeight;\r\n\t}\r\n\tif(configChanged){\r\n\t\tcontainer.innerHTML = \"\";\r\n\t\tcontainer.appendChild(renderLayout(config));\r\n\t}\r\n\r\n\tif(heightChanged || configChanged){\r\n\t\tscheduler.unset_actions();\r\n\t\tscheduler._els = [];\r\n\t\tscheduler.get_elements();\r\n\t\tscheduler.set_actions();\r\n\t}\r\n\r\n\tif(newHeight === 0){\r\n\t\tcontainer.style.display = \"none\";\r\n\t}else{\r\n\t\tcontainer.style.display = \"\";\r\n\t}\r\n\r\n\tpreviousHeight = newHeight;\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\tfunction isAttachedNode(container){\r\n\t\tvar root = document.body;\r\n\t\r\n\t\twhile(container && container != root){\r\n\t\t\tcontainer = container.parentNode;\r\n\t\t}\r\n\t\r\n\t\treturn !!(root == container);\r\n\t}\r\n\t\r\n\tfunction getWindowSize(window){\r\n\t\treturn {\r\n\t\t\tw : window.innerWidth || document.documentElement.clientWidth,\r\n\t\t\th : window.innerHeight || document.documentElement.clientHeight\r\n\t\t};\r\n\t}\r\n\tfunction equals(a,b){\r\n\t\treturn a.w == b.w && a.h == b.h;\r\n\t}\r\n\t\r\n\tfunction listenWindowResize(scheduler, window){\r\n\t\tvar oldSize = getWindowSize(window);\r\n\t\tvar resizeDelay;\r\n\t\tscheduler.event(window, \"resize\", function(){\r\n\t\t\tclearTimeout(resizeDelay);\r\n\t\t\tresizeDelay = setTimeout(function(){\r\n\r\n\t\t\t\tif (!isAttachedNode(scheduler.$container) || scheduler.$destroyed){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tvar newSize = getWindowSize(window);\r\n\t\t\t\t// element may be resized by container-autoresize exteinsion\r\n\t\t\t\t// check if the size is actually changed in order to not to get endless loop\r\n\t\t\t\tif (!equals(oldSize, newSize)) {\r\n\t\t\t\t\toldSize = newSize;\r\n\t\t\t\t\ttriggerSchedulerResize(scheduler);\r\n\t\t\t\t}\r\n\t\t\t}, 150);\r\n\t\t});\r\n\t}\r\n\t\r\n\tfunction triggerSchedulerResize(scheduler){\r\n\t\tif(scheduler.$destroyed || !scheduler.$root || !isAttachedNode(scheduler.$root)){\r\n\t\t\treturn;\t\r\n\t\t}\r\n\t\tif (scheduler.callEvent(\"onSchedulerResize\", [])) {\r\n\t\t\tscheduler.updateView();\r\n\t\t\tscheduler.callEvent(\"onAfterSchedulerResize\", []);\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction watchNodeResize(scheduler){\r\n\t\tvar previousHeight = scheduler.$root.offsetHeight;\r\n\t\tvar previousWidth = scheduler.$root.offsetWidth;\r\n\t\t\r\n\t\tfunction lowlevelResizeWatcher(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(scheduler.$root){\r\n\t\t\t\tif (scheduler.$root.offsetHeight != previousHeight ||\r\n\t\t\t\t\tscheduler.$root.offsetWidth != previousWidth){\r\n\t\t\t\t\ttriggerSchedulerResize(scheduler);\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\tpreviousHeight = scheduler.$root.offsetHeight;\r\n\t\t\t\tpreviousWidth = scheduler.$root.offsetWidth;\r\n\t\t\t}\r\n\t\r\n\t\t\tsetTimeout(lowlevelResizeWatcher, 200);\r\n\t\t}\r\n\t\t\r\n\t\tlowlevelResizeWatcher();\r\n\t}\r\n\t\r\n\tfunction addResizeListener(scheduler){\r\n\t\tvar root = scheduler.$container;\r\n\t\tvar containerStyles = window.getComputedStyle(root);\r\n\t\tif(containerStyles.getPropertyValue(\"position\") == \"static\"){\r\n\t\t\troot.style.position = \"relative\";\r\n\t\t}\r\n\t\r\n\t\tvar resizeWatcher = document.createElement('iframe');\r\n\t\tresizeWatcher.className = \"scheduler_container_resize_watcher\";\r\n\t\tresizeWatcher.tabIndex = -1;\r\n\t\tif(scheduler.config.wai_aria_attributes){\r\n\t\t\tresizeWatcher.setAttribute(\"role\", \"none\");\r\n\t\t\tresizeWatcher.setAttribute(\"aria-hidden\", true);\r\n\t\t}\r\n\t\r\n\t\t// in some environments (namely, in SalesForce) iframe.contentWindow is not available\r\n\t\tvar salesforce_environment = !!window[\"Sfdc\"] || !!window[\"$A\"] || window[\"Aura\"];\r\n\t\tif(salesforce_environment){\r\n\t\t\twatchNodeResize(scheduler);\r\n\t\t} else {\r\n\t\t\troot.appendChild(resizeWatcher);\r\n\t\t\tif (resizeWatcher.contentWindow) {\r\n\t\t\t\tlistenWindowResize(scheduler, resizeWatcher.contentWindow);\r\n\t\t\t} else {\r\n\t\t\t\t// if so - ditch the iframe and fallback to listening the main window resize\r\n\t\t\t\troot.removeChild(resizeWatcher);\r\n\t\t\t\tlistenWindowResize(scheduler, window);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\taddResizeListener(scheduler);\r\n\r\n}","class EventHost {\r\n\tconstructor(){\r\n\t\tthis._silent_mode = false;\r\n\t\tthis.listeners = {};\r\n\t}\r\n\t_silentStart(){\r\n\t\tthis._silent_mode = true;\r\n\t}\r\n\t_silentEnd() {\r\n\t\tthis._silent_mode = false;\r\n\t}\r\n}\r\n\r\nconst createEventStorage = function(obj) {\r\n\tlet handlers = {};\r\n\tlet index = 0;\r\n\tconst eventStorage = function(){\r\n\t\tlet combinedResult = true;\r\n\t\tfor(const i in handlers){\r\n\t\t\tconst handlerResult = handlers[i].apply(obj, arguments);\r\n\t\t\tcombinedResult=combinedResult && handlerResult;\r\n\t\t}\r\n\t\treturn combinedResult;\r\n\t};\r\n\teventStorage.addEvent=function(handler, settings){\r\n\t\tif (typeof (handler) == \"function\"){\r\n\t\t\tlet handlerId;\r\n\t\t\tif(settings && settings.id){\r\n\t\t\t\thandlerId = settings.id;\r\n\t\t\t}else{\r\n\t\t\t\thandlerId = index;\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\r\n\t\t\tif(settings && settings.once){\r\n\t\t\t\tconst originalHandler = handler;\r\n\t\t\t\thandler = function(){\r\n\t\t\t\t\toriginalHandler();\r\n\t\t\t\t\teventStorage.removeEvent(handlerId);\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\thandlers[handlerId] = handler;\r\n\t\t\treturn handlerId;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\teventStorage.removeEvent=function(id){\r\n\t\tdelete handlers[id];\r\n\t};\r\n\r\n\teventStorage.clear = function(){\r\n\t\thandlers = {};\r\n\t};\r\n\r\n\treturn eventStorage;\r\n};\r\n\r\nfunction makeEventable(obj){\r\n\r\n\tconst eventHost = new EventHost();\r\n\tobj.attachEvent=function(eventName, handler, settings){\r\n\t\teventName = 'ev_'+eventName.toLowerCase();\r\n\t\tif (!eventHost.listeners[eventName]){\r\n\t\t\teventHost.listeners[eventName] = createEventStorage(this);\r\n\t\t}\r\n\r\n\t\tif(settings && settings.thisObject){\r\n\t\t\thandler = handler.bind(settings.thisObject);\r\n\t\t}\r\n\r\n\t\tconst innerId = eventHost.listeners[eventName].addEvent(handler, settings);\r\n\r\n\t\tlet handlerId = (eventName+':'+innerId); //return ID (ev_eventname:1)\r\n\t\tif(settings && settings.id){\r\n\t\t\thandlerId = settings.id;\r\n\t\t}\r\n\t\treturn handlerId;\r\n\t};\r\n\r\n\tobj.attachAll = function(callback){\r\n\t\tthis.attachEvent('listen_all', callback);\r\n\t};\r\n\r\n\tobj.callEvent=function(name, eventArguments){\r\n\t\tif (eventHost._silent_mode) return true;\r\n\r\n\t\tconst handlerName = 'ev_'+name.toLowerCase();\r\n\r\n\t\tconst listeners = eventHost.listeners;\r\n\t\tif (listeners['ev_listen_all']){\r\n\t\t\tlisteners['ev_listen_all'].apply(this, [name].concat(eventArguments));\r\n\t\t}\r\n\r\n\t\tif (listeners[handlerName])\r\n\t\t\treturn listeners[handlerName].apply(this, eventArguments);\r\n\t\treturn true;\r\n\t};\r\n\r\n\tobj.checkEvent=function(name){\r\n\t\tconst listeners = eventHost.listeners;\r\n\t\treturn (!!listeners['ev_'+name.toLowerCase()]);\r\n\t};\r\n\r\n\tobj.detachEvent=function(id){\r\n\t\tif (id){\r\n\t\t\tlet listeners = eventHost.listeners;\r\n\t\t\tfor(const i in listeners){\r\n\t\t\t\tlisteners[i].removeEvent(id); //remove event\r\n\t\t\t}\r\n\r\n\t\t\tconst list = id.split(':');//get EventName and ID\r\n\t\t\tlisteners = eventHost.listeners;\r\n\t\t\tif(list.length === 2){\r\n\t\t\t\tconst eventName = list[0];\r\n\t\t\t\tconst eventId = list[1];\r\n\t\t\t\tif(listeners[eventName]){\r\n\t\t\t\t\tlisteners[eventName].removeEvent(eventId); //remove event\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tobj.detachAllEvents = function(){\r\n\t\tfor (const name in eventHost.listeners) {\r\n\t\t\teventHost.listeners[name].clear();\r\n\t\t}\r\n\t};\r\n\r\n}\r\n\r\nexport default makeEventable;","\r\nimport nav_bar from \"./nav_bar\";\r\nimport scheduler_resize_listener from \"./scheduler_resize_listener\";\r\nimport eventable from \"../utils/eventable\";\r\n\r\n\r\nexport default function extend(scheduler) {\r\n\r\neventable(scheduler);\r\n\r\nnav_bar(scheduler);\r\n\r\nscheduler._detachDomEvent = function(el, event, handler){\r\n\tif (el.removeEventListener){\r\n\t\tel.removeEventListener(event, handler, false);\r\n\r\n\t}else if (el.detachEvent){\r\n\t\tel.detachEvent(\"on\"+event, handler);\r\n\t}\r\n};\r\n\r\n\r\nscheduler._init_once = function(){\r\n\tscheduler_resize_listener(scheduler);\r\n\r\n\tscheduler._init_once = function(){};\r\n};\r\n\r\nconst layout = {\r\n\t\"navbar\": {\r\n\t\trender: function (config) {\r\n\t\t\treturn scheduler._init_nav_bar(config);\r\n\t\t}\r\n\t},\r\n\t\"header\": {\r\n\t\trender: function (config) {\r\n\t\t\tconst element = document.createElement(\"div\");\r\n\t\t\telement.className = \"dhx_cal_header\";\r\n\t\t\treturn element;\r\n\t\t}\r\n\t},\r\n\t\"dataArea\": {\r\n\t\trender: function (config) {\r\n\t\t\tconst element = document.createElement(\"div\");\r\n\t\t\telement.className = \"dhx_cal_data\";\r\n\t\t\treturn element;\r\n\t\t}\r\n\t},\r\n\t\"html_element\": {\r\n\t\trender: function (config) {\r\n\t\t\treturn config.html;\r\n\t\t}\r\n\t}\r\n};\r\n\r\nfunction hasSchedulerMarkup(element){\r\n\treturn !!(\r\n\t\telement.querySelector(\".dhx_cal_header\") &&\r\n\t\telement.querySelector(\".dhx_cal_data\") &&\r\n\t\telement.querySelector(\".dhx_cal_navline\")\r\n\t\t);\r\n}\r\n\r\nfunction createDefaultHeader(scheduler){\r\n\tconst views = [\r\n\t\t\"day\",\r\n\t\t\"week\",\r\n\t\t\"month\"\r\n\t];\r\n\tconst date = [\r\n\t\t\"date\"\r\n\t];\r\n\tconst nav = [\r\n\t\t\"prev\",\r\n\t\t\"today\",\r\n\t\t\"next\"\r\n\t];\r\n\r\n\tif(scheduler.matrix){\r\n\t\tfor(const i in scheduler.matrix){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\tif(scheduler._props){\r\n\t\tfor(const i in scheduler._props){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\r\n\tif(scheduler._grid && scheduler._grid.names){\r\n\t\tfor(const i in scheduler._grid.names){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\r\n\tconst optionalViews = [\r\n\t\t\"map\",\r\n\t\t\"agenda\",\r\n\t\t\"week_agenda\",\r\n\t\t\"year\"\r\n\t];\r\n\r\n\toptionalViews.forEach(function(viewName){\r\n\t\tif(scheduler[viewName + \"_view\"]){\r\n\t\t\tviews.push(viewName);\r\n\t\t}\r\n\t});\r\n\r\n\treturn views.concat(date).concat(nav);\r\n}\r\n\r\nscheduler.init=function(id,date,mode){\r\n\tif(this.$destroyed){\r\n\t\treturn; // not have errors when try to reinit destroyed scheduler\r\n\t}\r\n\tdate=date||(scheduler._currentDate());\r\n\tmode=mode||\"week\";\r\n\r\n\tif(this._obj){\r\n\t\tthis.unset_actions();\r\n\t}\r\n\r\n\tthis._obj=(typeof id == \"string\")?document.getElementById(id):id;\r\n\tthis.$container = this._obj;\r\n\tthis.$root = this._obj;\r\n\r\n\tif(!this.$container.offsetHeight && this.$container.offsetWidth && this.$container.style.height === \"100%\"){\r\n\t\t// scheduler container has zero height and non-zero width\r\n\t\twindow.console.error(scheduler._commonErrorMessages.collapsedContainer(), this.$container);\r\n\t}\r\n\r\n\tif(this.config.wai_aria_attributes && this.config.wai_aria_application_role){\r\n\t\tthis.$container.setAttribute(\"role\", \"application\");\r\n\t}\r\n\r\n\tif(!this.config.header && !hasSchedulerMarkup(this.$container)){\r\n\t\t// if no header config and no required markup - use the default header\r\n\t\t// so the scheduler could be initialized in an empty div\r\n\t\tthis.config.header = createDefaultHeader(this);\r\n\t\twindow.console.log([// jshint ignore:line\r\n\t\t\t\"Required DOM elements are missing from the scheduler container and **scheduler.config.header** is not specified.\",\r\n\t\t\t\"Using a default header configuration: \",\r\n\t\t\t\"scheduler.config.header = \" + JSON.stringify(this.config.header, null, 2),\r\n\t\t\t\"Check this article for the details: https://docs.dhtmlx.com/scheduler/initialization.html\"\r\n\t\t].join(\"\\n\"));// jshint ignore:line\r\n\t}\r\n\r\n\tif (this.config.header) {\r\n\t\tthis.$container.innerHTML = \"\";\r\n\t\tthis.$container.classList.add(\"dhx_cal_container\");\r\n\t\tif(this.config.header.height){\r\n\t\t\tthis.xy.nav_height = this.config.header.height;\r\n\t\t}\r\n\t\tthis.$container.appendChild(layout.navbar.render(this.config.header));\r\n\t\tthis.$container.appendChild(layout.header.render());\r\n\t\tthis.$container.appendChild(layout.dataArea.render());\r\n\t} else {\r\n\t\t// if no header config provided - make sure scheduler container has all necessary elements\r\n\t\tif(!hasSchedulerMarkup(this.$container)){\r\n\t\t\tthrow new Error([\r\n\t\t\t\t\"Required DOM elements are missing from the scheduler container.\",\r\n\t\t\t\t\"Be sure to either specify them manually in the markup: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviamarkup\",\r\n\t\t\t\t\"Or to use **scheduler.config.header** setting so they could be created automatically: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviaheaderconfig\"\r\n\t\t\t].join(\"\\n\"));\r\n\t\t}\r\n\t}\r\n\r\n\tif (this.config.rtl) this.$container.className += \" dhx_cal_container_rtl\";\r\n\r\n\t//hook for terrace skin\r\n\tif (this._skin_init)\r\n\t\tscheduler._skin_init();\r\n\r\n\tscheduler.date.init();\r\n\r\n\tthis._scroll=true;\r\n\r\n\tthis._els=[];\r\n\tthis.get_elements();\r\n\tthis.init_templates();\r\n\tthis.set_actions();\r\n\r\n\tthis._init_once();\r\n\tthis._init_touch_events();\r\n\r\n\tthis.set_sizes();\r\n\tscheduler.callEvent('onSchedulerReady', []);\r\n\tscheduler.$initialized = true;\r\n\tthis.setCurrentView(date,mode);\r\n\r\n};\r\n\r\nscheduler.xy={\r\n\tmin_event_height:20,\r\n\tbar_height: 24,\r\n\tscale_width:50,\r\n\tscroll_width:18,\r\n\tscale_height:20,\r\n\tmonth_scale_height:20,\r\n\tmenu_width:25,\r\n\tmargin_top:0,\r\n\tmargin_left:0,\r\n\teditor_width:140,\r\n\tmonth_head_height:22,\r\n\tevent_header_height: 14\r\n};\r\nscheduler.keys={\r\n\tedit_save:13,\r\n\tedit_cancel:27\r\n};\r\n\r\nscheduler.bind = function bind(functor, object){\r\n\tif(functor.bind)\r\n\t\treturn functor.bind(object);\r\n\telse\r\n\t\treturn function(){ return functor.apply(object,arguments); };\r\n};\r\n\r\nscheduler.set_sizes=function(){\r\n\r\n\tvar w = this._x = this._obj.clientWidth-this.xy.margin_left;\r\n\r\n\t//not-table mode always has scroll - need to be fixed in future\r\n\tvar scale_x=this._table_view?0:(this.xy.scale_width+this.xy.scroll_width);\r\n\r\n\tvar materialScalePlaceholder = this.$container.querySelector(\".dhx_cal_scale_placeholder\");\r\n\tif(scheduler._is_material_skin()){\r\n\t\tif(!materialScalePlaceholder) {\r\n\t\t\tmaterialScalePlaceholder = document.createElement(\"div\");\r\n\t\t\tmaterialScalePlaceholder.className = \"dhx_cal_scale_placeholder\";\r\n\t\t\tthis.$container.insertBefore(materialScalePlaceholder, this._els[\"dhx_cal_header\"][0]);\r\n\t\t}\r\n\t\tmaterialScalePlaceholder.style.display = \"block\";\r\n\r\n\t\tthis.set_xy(materialScalePlaceholder,w,this.xy.scale_height + 1,0, this._els[\"dhx_cal_header\"][0].offsetTop);\r\n\r\n\t}else{\r\n\t\tif(materialScalePlaceholder){\r\n\t\t\tmaterialScalePlaceholder.parentNode.removeChild(materialScalePlaceholder);\r\n\t\t}\r\n\t}\r\n\r\n\tif (this._lightbox) {\r\n\t\tif (scheduler.$container.offsetWidth < 1200) {\r\n\t\t} else {\r\n\t\t\tthis._setLbPosition(document.querySelector(\".dhx_cal_light\"));\r\n\t\t}\r\n\t}\r\n\r\n\tthis._data_width = w-scale_x;\r\n\r\n\tthis._els[\"dhx_cal_navline\"][0].style.width = w + \"px\";\r\n\tconst header = this._els[\"dhx_cal_header\"][0];\r\n\tthis.set_xy(header, this._data_width, this.xy.scale_height);\r\n\t// this._els[\"dhx_cal_header\"][0].style.marginLeft = `${scheduler.xy.scale_width}px`;\r\n\theader.style.left = ``;\r\n\theader.style.right = ``;\r\n\tif(!this._table_view){\r\n\t\tif(this.config.rtl){\r\n\t\t\theader.style.right = `${this.xy.scale_width}px`;\r\n\t\t}else{\r\n\t\t\theader.style.left = `${this.xy.scale_width}px`;\r\n\t\t}\r\n\t} else {\r\n\t\tif(!this.config.rtl){\r\n\t\t\theader.style.left = `-1px`;\r\n\t\t} else {\r\n\t\t\theader.style.right = `-1px`;\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.set_xy=function(node,w,h,x,y){\r\n\tfunction prepareValue(val){\r\n\t\tlet prepared = val;\r\n\t\tif(!isNaN(Number(prepared))){\r\n\t\t\tprepared = Math.max(0,prepared) + \"px\";\r\n\t\t}\r\n\t\treturn prepared;\r\n\t}\r\n\r\n\tvar direction = 'left';\r\n\r\n\tif(w !== undefined) {\r\n\t\tnode.style.width = prepareValue(w);\r\n\t}\r\n\r\n\tif(h !== undefined){\r\n\t\tnode.style.height = prepareValue(h);\r\n\t}\r\n\r\n\tif (arguments.length>3){\r\n\r\n\t\tif(x !== undefined){\r\n\t\t\tif (this.config.rtl) direction = 'right';\r\n\t\t\tnode.style[direction]=x+\"px\";\r\n\t\t}\r\n\t\tif(y !== undefined){\r\n\t\t\tnode.style.top=y+\"px\";\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.get_elements=function(){\r\n\t//get all child elements as named hash\r\n\tconst els=this._obj.getElementsByTagName(\"DIV\");\r\n\tfor (let i=0; i < els.length; i++){\r\n\t\tlet class_name= scheduler._getClassName(els[i]);\r\n\t\tconst attr_value = els[i].getAttribute(\"data-tab\") || els[i].getAttribute(\"name\") || \"\";\r\n\t\tif (class_name) class_name = class_name.split(\" \")[0];\r\n\t\tif (!this._els[class_name]) this._els[class_name]=[];\r\n\t\tthis._els[class_name].push(els[i]);\r\n\r\n\t\t//check if name need to be changed\r\n\t\t// scheduler.locale.labels[attr_value+\"_tab\"] - to fix getting labels for data-tab\r\n\t\tlet label = scheduler.locale.labels[attr_value+\"_tab\"] || scheduler.locale.labels[attr_value||class_name];\r\n\t\tif (typeof label !== \"string\" && attr_value && !els[i].innerHTML)\r\n\t\t\tlabel = attr_value.split(\"_\")[0];\r\n\t\tif (label) {\r\n\t\t\tthis._waiAria.labelAttr(els[i], label);\r\n\t\t\tels[i].innerHTML = label;\r\n\t\t}\r\n\t}\r\n};\r\n\r\n\r\nconst domEventsScope = scheduler._createDomEventScope();\r\n\r\nscheduler.unset_actions = function(){\r\n\tdomEventsScope.detachAll();\r\n};\r\n\r\nscheduler.set_actions=function(){\r\n\tfor (const a in this._els){\r\n\t\tif (this._click[a]){\r\n\t\t\tfor (let i=0; i < this._els[a].length; i++){\r\n\t\t\t\tconst element = this._els[a][i];\r\n\t\t\t\tconst handler = this._click[a].bind(element);\r\n\t\t\t\tdomEventsScope.attach(element, \"click\", handler);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tdomEventsScope.attach(this._obj, \"selectstart\", function(e){\r\n\t\te.preventDefault();\r\n\t\treturn false;\r\n\t});\r\n\t//this._obj.onselectstart=function(e){ return false; };\r\n\tdomEventsScope.attach(this._obj, \"mousemove\", function(e){\r\n\t\tif (!scheduler._temp_touch_block)\r\n\t\t\tscheduler._on_mouse_move(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"mousedown\", function(e){\r\n\t\tif (!scheduler._ignore_next_click)\r\n\t\t\tscheduler._on_mouse_down(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"mouseup\", function(e){\r\n\t\tif (!scheduler._ignore_next_click)\r\n\t\t\tscheduler._on_mouse_up(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"dblclick\", function(e){\r\n\t\tscheduler._on_dbl_click(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"contextmenu\", function(event) {\r\n\t\tif(scheduler.checkEvent(\"onContextMenu\")){\r\n\t\t\t// block the default browser context menu \r\n\t\t\tevent.preventDefault();\r\n\t\t}\r\n\r\n\t\tconst returnValue = scheduler.callEvent(\"onContextMenu\", [scheduler._locate_event(event.target), event]);\r\n\t\treturn returnValue;\r\n\t});\r\n};\r\nscheduler.select=function(id){\r\n\tif (this._select_id==id) return;\r\n\tscheduler._close_not_saved();\r\n\tthis.editStop(false);\r\n\tif(this._select_id){\r\n\t\tthis.unselect();\r\n\t}\r\n\tthis._select_id = id;\r\n\tthis.updateEvent(id);\r\n\tthis.callEvent(\"onEventSelected\", [id]);\r\n};\r\nscheduler.unselect=function(id){\r\n\tif (id && id!=this._select_id) {\r\n\t\treturn;\r\n\t}\r\n\tconst previousSelection = this._select_id;\r\n\tthis._select_id = null;\r\n\tif (previousSelection && this.getEvent(previousSelection)) {\r\n\t\tthis.updateEvent(previousSelection);\r\n\t}\r\n\tthis.callEvent(\"onEventUnselected\", [previousSelection]);\r\n};\r\nscheduler.$stateProvider.registerProvider(\"global\", (function(){\r\n\treturn {\r\n\t\tmode: this._mode,\r\n\t\tdate: new Date(this._date),\r\n\t\tmin_date: new Date(this._min_date),\r\n\t\tmax_date: new Date(this._max_date),\r\n\t\teditor_id: this._edit_id,\r\n\t\tlightbox_id: this._lightbox_id,\r\n\t\tnew_event: this._new_event,\r\n\t\tselect_id: this._select_id,\r\n\t\texpanded: this.expanded,\r\n\t\tdrag_id: this._drag_id,\r\n\t\tdrag_mode: this._drag_mode\r\n\t};\r\n}).bind(scheduler));\r\n\r\nscheduler._click={\r\n\tdhx_cal_data:function(e){\r\n\t\t//in case of touch disable click processing\r\n\t\tif (scheduler._ignore_next_click){\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\r\n\t\tconst id = scheduler._locate_event(e.target);\r\n\r\n\t\tif (!id) {\r\n\t\t\tscheduler.callEvent(\"onEmptyClick\",[scheduler.getActionData(e).date, e]);\r\n\t\t} else {\r\n\t\t\tif ( !scheduler.callEvent(\"onClick\",[id,e]) || scheduler.config.readonly ) return;\r\n\t\t}\r\n\r\n\t\tif (id && scheduler.config.select) {\r\n\r\n\t\t\tscheduler.select(id);\r\n\t\t\tconst icon = e.target.closest(\".dhx_menu_icon\");\r\n\r\n\t\t\tconst mask = scheduler._getClassName(icon);\r\n\t\t\tif (mask.indexOf(\"_icon\")!=-1)\r\n\t\t\t\tscheduler._click.buttons[mask.split(\" \")[1].replace(\"icon_\",\"\")](id);\r\n\t\t} else{\r\n\t\t\tscheduler._close_not_saved();\r\n\t\t\tif (scheduler.getState().select_id && new Date().valueOf()-(scheduler._new_event||0) > 500){\r\n\t\t\t\tscheduler.unselect();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tdhx_cal_prev_button:function(){\r\n\t\tscheduler._click.dhx_cal_next_button(0,-1);\r\n\t},\r\n\tdhx_cal_next_button:function(dummy,step){\r\n\t\tlet def_step = 1;\r\n\t\tif (scheduler.config.rtl){\r\n\t\t\tstep = -step;\r\n\t\t\tdef_step = -def_step;\r\n\t\t}\r\n\t\tscheduler.setCurrentView(scheduler.date.add( //next line changes scheduler._date , but seems it has not side-effects\r\n\t\t\tscheduler.date[scheduler._mode+\"_start\"](new Date(scheduler._date)),(step||def_step),scheduler._mode));\r\n\t},\r\n\tdhx_cal_today_button:function(){\r\n\t\tif (scheduler.callEvent(\"onBeforeTodayDisplayed\", [])) {\r\n\t\t\tscheduler.setCurrentView(scheduler._currentDate());\r\n\t\t}\r\n\t},\r\n\tdhx_cal_tab:function(){\r\n\t\tconst name = this.getAttribute(\"data-tab\");\r\n\t\tconst deprecated_name = this.getAttribute(\"name\");\r\n\t\tconst mode = name || deprecated_name.substring(0, deprecated_name.search(\"_tab\"));\r\n\t\tscheduler.setCurrentView(scheduler._date,mode);\r\n\t},\r\n\tbuttons:{\r\n\t\t\"delete\":function(id){\r\n\t\t\tconst c = scheduler.locale.labels.confirm_deleting;\r\n\t\t\tscheduler._dhtmlx_confirm({message: c, title: scheduler.locale.labels.title_confirm_deleting, callback:function(){ scheduler.deleteEvent(id); },\r\n\t\t\tconfig: {ok: scheduler.locale.labels.icon_delete}\r\n\t\t});\r\n\t\t},\r\n\t\tedit:function(id){ scheduler.edit(id); },\r\n\t\tsave:function(id){ scheduler.editStop(true); },\r\n\t\tdetails:function(id){ scheduler.showLightbox(id); },\r\n\t\tform:function(id){ scheduler.showLightbox(id); },\r\n\t\tcancel:function(id){ scheduler.editStop(false); }\r\n\t}\r\n};\r\nscheduler._dhtmlx_confirm = function({message, title, callback, config}) {\r\n\tif (!message)\r\n\t\treturn callback();\r\n\r\n\tconfig = config || {};\r\n\tconst opts = { ...config, text: message };\r\n\tif (title) {\r\n\t\topts.title = title;\r\n\t}\r\n\tif (callback) {\r\n\t\topts.callback = function(result) {\r\n\t\t\tif (result) {\r\n\t\t\t\tcallback();\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\tscheduler.confirm(opts);\r\n};\r\nscheduler.addEventNow=function(start,end,e){\r\n\tlet base = {};\r\n\tif (scheduler._isObject(start) && !scheduler._isDate(start)){\r\n\t\tbase = start;\r\n\t\tstart = null;\r\n\t}\r\n\r\n\tconst duration = (this.config.event_duration||this.config.time_step)*60000;\r\n\tif (!start) start = base.start_date||Math.round((scheduler._currentDate()).valueOf()/duration)*duration;\r\n\tlet start_date = new Date(start);\r\n\tif (!end){\r\n\t\tlet start_hour = this.config.first_hour;\r\n\t\tif (start_hour > start_date.getHours()){\r\n\t\t\tstart_date.setHours(start_hour);\r\n\t\t\tstart = start_date.valueOf();\r\n\t\t}\r\n\t\tend = start.valueOf()+duration;\r\n\t}\r\n\tlet end_date = new Date(end);\r\n\r\n\t// scheduler.addEventNow(new Date(), new Date()) + collision though get_visible events defect (such event was not retrieved)\r\n\tif(start_date.valueOf() == end_date.valueOf())\r\n\t\tend_date.setTime(end_date.valueOf()+duration);\r\n\tbase.start_date = base.start_date||start_date;\r\n\tbase.end_date = base.end_date||end_date;\r\n\tbase.text = base.text||this.locale.labels.new_event;\r\n\tbase.id = this._drag_id = base.id || this.uid();\r\n\tthis._drag_mode=\"new-size\";\r\n\tthis._loading=true;\r\n\tconst eventId = this.addEvent(base);\r\n\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\tthis._loading=false;\r\n\r\n\tthis._drag_event={}; //dummy , to trigger correct event updating logic\r\n\tthis._on_mouse_up(e);\r\n\treturn eventId;\r\n};\r\nscheduler._on_dbl_click=function(e,src){\r\n\tsrc = src || e.target;\r\n\tif (this.config.readonly) return;\r\n\tconst name = scheduler._getClassName(src).split(\" \")[0];\r\n\tswitch(name){\r\n\t\tcase \"dhx_scale_holder\":\r\n\t\tcase \"dhx_scale_holder_now\":\r\n\t\tcase \"dhx_month_body\":\r\n\t\tcase \"dhx_wa_day_data\":\r\n\t\t\tif (!scheduler.config.dblclick_create) break;\r\n\t\t\tthis.addEventNow(this.getActionData(e).date,null,e);\r\n\t\t\tbreak;\r\n\t\tcase \"dhx_cal_event\":\r\n\t\tcase \"dhx_wa_ev_body\":\r\n\t\tcase \"dhx_agenda_line\":\r\n\t\tcase \"dhx_cal_agenda_event_line\":\r\n\t\tcase \"dhx_grid_event\":\r\n\t\tcase \"dhx_cal_event_line\":\r\n\t\tcase \"dhx_cal_event_clear\": {\r\n\t\t\tconst id = this._locate_event(src);\r\n\t\t\tif (!this.callEvent(\"onDblClick\",[id,e])) return;\r\n\t\t\tif (this.config.details_on_dblclick || this._table_view || !this.getEvent(id)._timed || !this.config.select)\r\n\t\t\t\tthis.showLightbox(id);\r\n\t\t\telse\r\n\t\t\t\tthis.edit(id);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcase \"dhx_time_block\":\r\n\t\tcase \"dhx_cal_container\":\r\n\t\t\treturn;\r\n\t\tdefault: {\r\n\t\t\tconst viewHandler = this[\"dblclick_\"+name];\r\n\t\t\tif (viewHandler) {\r\n\t\t\t\tviewHandler.call(this,e);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif (src.parentNode && src != this)\r\n\t\t\t\t\treturn scheduler._on_dbl_click(e,src.parentNode);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n};\r\n//column index by mouse x-coordinate\r\nscheduler._get_column_index = function(x_pos){\r\n\tlet column = 0;\r\n\tif (this._cols){\r\n\t\tlet width = 0;\r\n\t\tlet i = 0;\r\n\t\twhile (width + this._cols[i] < x_pos && i < this._cols.length){\r\n\t\t\twidth += this._cols[i];\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tcolumn = i + (this._cols[i] ? ((x_pos - width)/ this._cols[i]) : 0);\r\n\r\n\t\tif (this._ignores){\r\n\t\t\tif(column >= this._cols.length){\r\n\t\t\t\twhile(column >= 1 && this._ignores[Math.floor(column)]){\r\n\t\t\t\t\tcolumn--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n\treturn column;\r\n};\r\n\r\n//transform mouse coordinates to day-time indexes of week based view\r\nscheduler._week_indexes_from_pos = function(pos){\r\n\t//\"get position\" can be invoked before columns are loaded into the units view(e.g. by onMouseMove handler in key_nav.js)\r\n\tif(!this._cols){\r\n\t\treturn pos;\r\n\t}else{\r\n\t\tconst column = this._get_column_index(pos.x);\r\n\r\n\t\tpos.x=Math.min(this._cols.length-1, Math.max(0,Math.ceil(column)-1));\r\n\t\tpos.y=Math.max(0,Math.ceil(pos.y*60/(this.config.time_step*this.config.hour_size_px))-1)+this.config.first_hour*(60/this.config.time_step);\r\n\t\treturn pos;\r\n\t}\r\n};\r\n\r\nscheduler._mouse_coords=function(ev){\r\n\tlet pos;\r\n\tconst body = document.body;\r\n\tconst documentElement = document.documentElement;\r\n\tif (!this.$env.isIE && (ev.pageX || ev.pageY))\r\n\t\tpos={x:ev.pageX, y:ev.pageY};\r\n\telse pos={\r\n\t\tx:ev.clientX + (body.scrollLeft||documentElement.scrollLeft||0) - body.clientLeft,\r\n\t\ty:ev.clientY + (body.scrollTop||documentElement.scrollTop||0) - body.clientTop\r\n\t};\r\n\t//apply layout\r\n\tif (this.config.rtl && this._colsS) {\r\n\t\tpos.x = this.$container.querySelector(\".dhx_cal_data\").offsetWidth - pos.x;\r\n\t\tpos.x += this.$domHelpers.getAbsoluteLeft(this._obj);\r\n\t\tif (this._mode !== \"month\") {\r\n\t\t\tpos.x -= this.xy.scale_width;\r\n\t\t}\r\n\t} else {\r\n\t\tpos.x-=this.$domHelpers.getAbsoluteLeft(this._obj)+(this._table_view?0:this.xy.scale_width);\r\n\t}\r\n\r\n\tconst dataArea = this.$container.querySelector(\".dhx_cal_data\");\r\n\t//pos.y-=this.$domHelpers.getAbsoluteTop(this._obj)+this.xy.nav_height+(this._dy_shift||0)+this.xy.scale_height-this._els[\"dhx_cal_data\"][0].scrollTop;\r\n\tpos.y-=this.$domHelpers.getAbsoluteTop(dataArea)-this._els[\"dhx_cal_data\"][0].scrollTop;\r\n\tpos.ev = ev;\r\n\tconst handler = this[\"mouse_\"+this._mode];\r\n\tif (handler){\r\n\t\tpos = handler.call(this,pos);\r\n\t}else{\r\n\t\t//transform to date\r\n\t\tif (!this._table_view) {\r\n\t\t\tpos = this._week_indexes_from_pos(pos);\r\n\t\t} else {\r\n\t\t\tconst column = this._get_column_index(pos.x);\r\n\t\t\tif (!this._cols || !this._colsS) // agenda/map views\r\n\t\t\t\treturn pos;\r\n\t\t\tlet dy=0;\r\n\t\t\tfor (dy=1; dy < this._colsS.heights.length; dy++)\r\n\t\t\t\tif (this._colsS.heights[dy]>pos.y) break;\r\n\r\n\t\t\tpos.y=Math.ceil( (Math.max(0, column)+Math.max(0,dy-1)*7)*24*60/this.config.time_step );\r\n\r\n\t\t\tif (scheduler._drag_mode || this._mode == \"month\")\r\n\t\t\t\tpos.y=(Math.max(0,Math.ceil(column)-1)+Math.max(0,dy-1)*7)*24*60/this.config.time_step;\r\n\r\n\t\t\t//we care about ignored days only during event moving in month view\r\n\t\t\tif (this._drag_mode == \"move\"){\r\n\t\t\t\tif (scheduler._ignores_detected && scheduler.config.preserve_length){\r\n\t\t\t\t\tpos._ignores = true;\r\n\t\t\t\t\t//get real lengtn of event\r\n\t\t\t\t\tif (!this._drag_event._event_length)\r\n\t\t\t\t\t\tthis._drag_event._event_length = this._get_real_event_length(this._drag_event.start_date, this._drag_event.end_date, { x_step:1, x_unit:\"day\"});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tpos.x=0;\r\n\t\t}\r\n\t}\r\n\tpos.timestamp = +new Date();\r\n\treturn pos;\r\n};\r\nscheduler._close_not_saved=function(){\r\n\tif (new Date().valueOf()-(scheduler._new_event||0) > 500 && scheduler._edit_id){\r\n\t\tconst confirmationText=scheduler.locale.labels.confirm_closing;\r\n\r\n\t\tscheduler._dhtmlx_confirm({\r\n\t\t\tmessage: confirmationText, \r\n\t\t\ttitle: scheduler.locale.labels.title_confirm_closing, \r\n\t\t\tcallback: function() { \r\n\t\t\t\tscheduler.editStop(scheduler.config.positive_closing);\r\n\t\t\t}\r\n\t\t});\r\n\t\tif(confirmationText){\r\n\t\t\tthis._drag_id = this._drag_pos = this._drag_mode = null;\r\n\t\t}\r\n\t}\r\n};\r\nscheduler._correct_shift=function(start, back){\r\n\treturn start-=((new Date(scheduler._min_date)).getTimezoneOffset()-(new Date(start)).getTimezoneOffset())*60000*(back?-1:1);\r\n};\r\n\r\nscheduler._is_pos_changed = function(old_pos, new_pos){\r\n\tfunction diff(old_val, new_val, acc){\r\n\t\treturn !!(Math.abs(old_val - new_val) > acc);\r\n\t}\r\n\r\n\tif(!(old_pos && this._drag_pos)){\r\n\t\treturn true;\r\n\t}\r\n\tconst delay = 100;\r\n\tconst d_pos = 5;\r\n\r\n\t// start drag only if passed some time since mouse down, or if mouse position changed sufficiently\r\n\treturn !!(this._drag_pos.has_moved || !this._drag_pos.timestamp || (new_pos.timestamp - this._drag_pos.timestamp > delay) || diff(old_pos.ev.clientX, new_pos.ev.clientX, d_pos) || diff(old_pos.ev.clientY, new_pos.ev.clientY, d_pos));\r\n};\r\n\r\nscheduler._correct_drag_start_date = function(start){\r\n\tlet obj;\r\n\tif (scheduler.matrix)\r\n\t\tobj = scheduler.matrix[scheduler._mode];\r\n\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\tstart = new Date(start);\r\n\tlet len = 1;\r\n\tif(obj._start_correction || obj._end_correction)\r\n\t\tlen = (obj.last_hour||0)*60 - (start.getHours()*60+start.getMinutes()) || 1;\r\n\r\n\treturn start*1 + (scheduler._get_fictional_event_length(start, len, obj) - len);\r\n};\r\nscheduler._correct_drag_end_date = function(start, duration){\r\n\tlet obj;\r\n\tif (scheduler.matrix) {\r\n\t\tobj = scheduler.matrix[scheduler._mode];\r\n\t}\r\n\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\tconst end = start*1 + scheduler._get_fictional_event_length(start, duration, obj);\r\n\treturn new Date(end*1 - (scheduler._get_fictional_event_length(end, -1, obj, -1) + 1));\r\n};\r\n\r\nscheduler._on_mouse_move=function(e){\r\n\tif (this._drag_mode){\r\n\t\tvar pos=this._mouse_coords(e);\r\n\t\tif (this._is_pos_changed(this._drag_pos, pos)){\r\n\t\t\tvar start, end;\r\n\t\t\tif (this._edit_id!=this._drag_id)\r\n\t\t\t\tthis._close_not_saved();\r\n\r\n\t\t\tif(!this._drag_mode)\r\n\t\t\t\treturn;\r\n\r\n\t\t\tvar mousedownPos = null;\r\n\t\t\tif(this._drag_pos && !this._drag_pos.has_moved){\r\n\t\t\t\tmousedownPos = this._drag_pos;\r\n\t\t\t\tmousedownPos.has_moved = true;\r\n\t\t\t}\r\n\r\n\t\t\tthis._drag_pos = pos;\r\n\r\n\t\t\tthis._drag_pos.has_moved = true;\r\n\r\n\t\t\tif (this._drag_mode==\"create\"){\r\n\r\n\t\t\t\t// use mouse down position as a starting point for drag-create\r\n\t\t\t\tif(mousedownPos){\r\n\t\t\t\t\tpos = mousedownPos;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._close_not_saved();\r\n\t\t\t\tthis.unselect(this._select_id);\r\n\t\t\t\tthis._loading=true; //will be ignored by dataprocessor\r\n\r\n\t\t\t\tstart = this._get_date_from_pos(pos).valueOf();\r\n\r\n\t\t\t\tif (!this._drag_start) {\r\n\t\t\t\t\tvar res = this.callEvent(\"onBeforeEventCreated\", [e, this._drag_id]);\r\n\t\t\t\t\tif (!res){\r\n\t\t\t\t\t\tthis._loading=false;\r\n\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis._loading=false;\r\n\t\t\t\t\tthis._drag_start=start;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tend = start;\r\n\t\t\t\tif (end == this._drag_start) {\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar start_date = new Date(this._drag_start);\r\n\t\t\t\tvar end_date = new Date(end);\r\n\t\t\t\tif ( (this._mode == \"day\" || this._mode == \"week\") &&\r\n\t\t\t\t\t(start_date.getHours() == end_date.getHours() &&\r\n\t\t\t\t\tstart_date.getMinutes() == end_date.getMinutes()) ) {\r\n\t\t\t\t\t\tend_date = new Date(this._drag_start+1000);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\tthis._drag_id=this.uid();\r\n\t\t\t\tthis.addEvent(start_date, end_date, this.locale.labels.new_event, this._drag_id, pos.fields);\r\n\r\n\t\t\t\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\t\t\t\tthis._loading=false;\r\n\t\t\t\tthis._drag_mode=\"new-size\";\r\n\r\n\t\t\t}\r\n\r\n\t\t\tvar timeStep = this.config.time_step;\r\n\t\t\tvar ev=this.getEvent(this._drag_id);\r\n\t\t\tvar obj;\r\n\t\t\tif (scheduler.matrix)\r\n\t\t\t\tobj = scheduler.matrix[scheduler._mode];\r\n\t\t\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\t\t\tif (this._drag_mode==\"move\"){\r\n\t\t\t\tstart = this._min_date.valueOf()+(pos.y*this.config.time_step+pos.x*24*60)*60000;\r\n\t\t\t\tif (!pos.custom && this._table_view) {\r\n\t\t\t\t\tstart += this.date.time_part(ev.start_date) * 1000;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!this._table_view && this._dragEventBody && this._drag_event._move_event_shift === undefined) {\r\n\t\t\t\t\tthis._drag_event._move_event_shift = start - ev.start_date;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (this._drag_event._move_event_shift) {\r\n\t\t\t\t\tstart -= this._drag_event._move_event_shift;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstart = this._correct_shift(start);\r\n\r\n\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view && obj){\r\n\r\n\t\t\t\t\tstart = scheduler._correct_drag_start_date(start);\r\n\t\t\t\t\tend = scheduler._correct_drag_end_date(start,this._drag_event._event_length);\r\n\r\n\t\t\t\t} else\r\n\t\t\t\t\tend = ev.end_date.valueOf()-(ev.start_date.valueOf()-start);\r\n\t\t\t} else { // resize\r\n\t\t\t\tstart = ev.start_date.valueOf();\r\n\t\t\t\tend = ev.end_date.valueOf();\r\n\t\t\t\tif (this._table_view) {\r\n\t\t\t\t\tvar resize_date = this._min_date.valueOf()+pos.y*this.config.time_step*60000 + (pos.custom?0:24*60*60000);\r\n\t\t\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\t\t\tresize_date = this._correct_shift(resize_date, false);\r\n\t\t\t\t\t\tif( this._drag_from_start ) {\r\n\t\t\t\t\t\t\tvar day = 24*60*60000;\r\n\t\t\t\t\t\t\tif( resize_date <= scheduler.date.date_part(new Date(end+day-1)).valueOf() ) // to get end time as 23:59:59 and then the day start\r\n\t\t\t\t\t\t\t\tstart = resize_date - day;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tend = resize_date;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif(this.config.preserve_length) {\r\n\t\t\t\t\t\t\tif (pos.resize_from_start) {\r\n\t\t\t\t\t\t\t\tstart = scheduler._correct_drag_start_date(resize_date);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tend = scheduler._correct_drag_end_date(resize_date, 0);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tif (pos.resize_from_start) {\r\n\t\t\t\t\t\t\t\tstart = resize_date;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tend = resize_date;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar end_day_start = this.date.date_part(new Date(ev.end_date.valueOf() - 1)).valueOf();\r\n\t\t\t\t\tvar end_day_date = new Date(end_day_start);\r\n\t\t\t\t\tvar firstHour = this.config.first_hour;\r\n\t\t\t\t\tvar lastHour = this.config.last_hour;\r\n\t\t\t\t\tvar maxY = (lastHour - firstHour) * (60/timeStep);\r\n\r\n\t\t\t\t\tthis.config.time_step = 1;\r\n\t\t\t\t\tvar precisePos = this._mouse_coords(e);\r\n\t\t\t\t\tthis.config.time_step = timeStep;\r\n\r\n\t\t\t\t\tvar minDate = pos.y*timeStep*60000;\r\n\t\t\t\t\tvar maxDate = Math.min(pos.y + 1, maxY)*timeStep*60000;\r\n\t\t\t\t\tvar preciseDate = precisePos.y*60000;\r\n\r\n\t\t\t\t\t// rounding end date to the closest time step\r\n\t\t\t\t\tif(Math.abs(minDate - preciseDate) > Math.abs(maxDate - preciseDate)){\r\n\t\t\t\t\t\tend = end_day_start + maxDate;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tend = end_day_start + minDate;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = end + ((new Date(end)).getTimezoneOffset() - end_day_date.getTimezoneOffset()) * 60000;\r\n\t\t\t\t\tthis._els[\"dhx_cal_data\"][0].style.cursor=\"s-resize\";\r\n\t\t\t\t\tif (this._mode == \"week\" || this._mode == \"day\")\r\n\t\t\t\t\t\tend = this._correct_shift(end);\r\n\t\t\t\t}\r\n\t\t\t\tif (this._drag_mode == \"new-size\") {\r\n\t\t\t\t\tif (end <= this._drag_start){\r\n\t\t\t\t\t\tvar shift = pos.shift||((this._table_view && !pos.custom)?24*60*60000:0);\r\n\t\t\t\t\t\tstart = end-(pos.shift?0:shift);\r\n\t\t\t\t\t\tend = this._drag_start+(shift||(timeStep*60000));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tstart = this._drag_start;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (end<=start)\r\n\t\t\t\t\t\tend=start+timeStep*60000;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar new_end = new Date(end-1);\r\n\t\t\tvar new_start = new Date(start);\r\n\t\t\t//deny drag out of visible scheduler scale in timeline view\r\n\t\t\tif(this._drag_mode==\"move\" && scheduler.config.limit_drag_out &&\r\n\t\t\t\t(+new_start < +scheduler._min_date || +end > +scheduler._max_date)){\r\n\r\n\t\t\t\tif(+ev.start_date < +scheduler._min_date || +ev.end_date > +scheduler._max_date){\r\n\t\t\t\t\t// not move event if it's already outside time scale\r\n\t\t\t\t\tnew_start = new Date(ev.start_date);\r\n\t\t\t\t\tend = new Date(ev.end_date);\r\n\t\t\t\t}else{\r\n\r\n\t\t\t\t\tvar duration = end - new_start;\r\n\r\n\t\t\t\t\tif(+new_start < +scheduler._min_date){\r\n\t\t\t\t\t\tnew_start = new Date(scheduler._min_date);\r\n\t\t\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view){\r\n\t\t\t\t\t\t\tnew_start = new Date(scheduler._correct_drag_start_date(new_start));\r\n\t\t\t\t\t\t\tif(obj._start_correction)\r\n\t\t\t\t\t\t\t\tnew_start = new Date(new_start.valueOf() + obj._start_correction);\r\n\t\t\t\t\t\t\tend = new Date(new_start*1 + this._get_fictional_event_length(new_start, this._drag_event._event_length, obj));\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tend = new Date(+new_start + duration);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tend = new Date(scheduler._max_date);\r\n\r\n\t\t\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view){\r\n\t\t\t\t\t\t\tif(obj._end_correction)\r\n\t\t\t\t\t\t\t\tend = new Date(end.valueOf() - obj._end_correction);\r\n\t\t\t\t\t\t\tend = new Date(end*1 - this._get_fictional_event_length(end, 0, obj, true));\r\n\t\t\t\t\t\t\tnew_start = new Date(end*1 - this._get_fictional_event_length(end, this._drag_event._event_length, obj, true));\r\n\t\t\t\t\t\t\tif(this._ignores_detected){\r\n\t\t\t\t\t\t\t\tnew_start = scheduler.date.add(new_start, obj.x_step, obj.x_unit);\r\n\t\t\t\t\t\t\t\tend = new Date(end*1 - this._get_fictional_event_length(end, 0, obj, true));\r\n\t\t\t\t\t\t\t\tend = scheduler.date.add(end, obj.x_step, obj.x_unit);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tnew_start = new Date(+end - duration);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\tvar new_end = new Date(end-1);\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\t// fix event dates when resized to bottom of the column (day/week views)\r\n\t\t\tif(!this._table_view && this._dragEventBody &&\r\n\t\t\t\t!scheduler.config.all_timed &&\r\n\t\t\t\t((!scheduler._get_section_view() && pos.x != this._get_event_sday({start_date: new Date(start), end_date:new Date(start)})) || new Date(start).getHours() < this.config.first_hour)){\r\n\t\t\t\tvar duration = end - new_start;\r\n\t\t\t\tif (this._drag_mode == \"move\") {\r\n\t\t\t\t\tvar day = this._min_date.valueOf() + (pos.x * 24 * 60) * 60000;\r\n\t\t\t\t\tnew_start = new Date(day);\r\n\t\t\t\t\tnew_start.setHours(this.config.first_hour);\r\n\t\t\t\t\tend = new Date(new_start.valueOf() + duration);\r\n\t\t\t\t\tnew_end = new Date(end-1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// fix event dates when resized to bottom of the column (day/week views)\r\n\t\t\tif(!this._table_view &&\r\n\t\t\t\t!scheduler.config.all_timed &&\r\n\t\t\t\t((!scheduler.getView() && pos.x != this._get_event_sday({start_date: new Date(end), end_date:new Date(end)})) || new Date(end).getHours() >= this.config.last_hour)){\r\n\t\t\t\tvar duration = end - new_start;\r\n\t\t\t\tvar day = this._min_date.valueOf()+(pos.x*24*60)*60000;\r\n\t\t\t\tend = scheduler.date.date_part(new Date(day));\r\n\t\t\t\tend.setHours(this.config.last_hour);\r\n\t\t\t\tnew_end = new Date(end-1);\r\n\t\t\t\tif(this._drag_mode == \"move\"){\r\n\t\t\t\t\tnew_start = new Date(+end - duration);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//prevent out-of-borders situation for day|week view\r\n\t\t\tif ( this._table_view || (new_end.getDate()==new_start.getDate() && new_end.getHours()=ed)\r\n\t\t\t\tcls += ' dhx_after';\r\n\t\t\telse if (sd.valueOf()==cd.valueOf())\r\n\t\t\t\tcls += ' dhx_now';\r\n\r\n\t\t\tif (this._ignores_detected && this._ignores[j]){\r\n\t\t\t\tcls += \" dhx_scale_ignore\";\r\n\t\t\t}\r\n\r\n\t\t\tcell.className = cls + \" \" + this.templates.month_date_class(sd, cd);\r\n\r\n\t\t\tcell.setAttribute(\"data-cell-date\", scheduler.templates.format_date(sd));\r\n\t\t\tvar body_class = \"dhx_month_body\";\r\n\t\t\tvar head_class = \"dhx_month_head\";\r\n\t\t\tif (j === 0 && this.config.left_border) {\r\n\t\t\t\tbody_class += \" dhx_month_body_border\";\r\n\t\t\t\thead_class += \" dhx_month_head_border\";\r\n\t\t\t}\r\n\t\t\tif (!this._ignores_detected || !this._ignores[j]){\r\n\t\t\t\tcell.style.width = tdwidths[j];\r\n\t\t\t\tthis._waiAria.monthCellAttr(cell, sd);\r\n\r\n\t\t\t\tvar cellHead = document.createElement(\"div\");\r\n\t\t\t\tcellHead.style.height = scheduler.xy.month_head_height + \"px\";\r\n\t\t\t\tcellHead.className = head_class;\r\n\t\t\t\tcellHead.innerHTML = this.templates.month_day(sd);\r\n\t\t\t\tcell.appendChild(cellHead);\r\n\r\n\t\t\t\tvar cellBody = document.createElement(\"div\");\r\n\t\t\t\tcellBody.className = body_class;\r\n\t\t\t\t// cellBody.style.height = row_height + \"px\";\r\n\t\t\t\t// cellBody.style.width = tdwidths[j];\r\n\t\t\t\tcell.appendChild(cellBody);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tcell.appendChild(document.createElement(\"div\"));\r\n\t\t\t\tcell.appendChild(document.createElement(\"div\"));\r\n\t\t\t}\r\n\t\t\trendered_dates.push(sd);\r\n\t\t\tvar bf1 = sd.getDate();\r\n\t\t\tsd=this.date.add(sd,1,\"day\");\r\n\t\t\tif (sd.getDate() - bf1 > 1)\r\n\t\t\t\tsd = new Date(sd.getFullYear(), sd.getMonth(), bf1 + 1, 12, 0);\r\n\t\t}\r\n\r\n\t\tscheduler._colsS.heights[i] = cellheight;\r\n\t\tcellheight += getCellHeight(i);\r\n\t}\r\n\r\n\tthis._min_date = view_start;\r\n\tthis._max_date = sd;\r\n\r\n\tdiv.innerHTML = \"\";\r\n\tdiv.appendChild(table);\r\n\r\n\tthis._scales = {};\r\n\tvar cells = div.querySelectorAll('[data-cell-date]');\r\n\tcells.forEach((cell) => {\r\n\t\tconst date = scheduler.templates.parse_date(cell.getAttribute(\"data-cell-date\"));\r\n\t\tconst body = cell.querySelector(\".dhx_month_body\");\r\n\t\tthis._scales[+date] = body;\r\n\t\tthis.callEvent(\"onScaleAdd\", [this._scales[+date], date]);\r\n\t});\r\n\r\n\treturn this._max_date;\r\n};\r\n\r\nscheduler._reset_month_scale=function(b,dd,sd,rows){\r\n\t//recalculates rows height and redraws month layout\r\n\tvar ed=scheduler.date.add(dd,1,\"month\");\r\n\r\n\t//trim time part for comparison reasons\r\n\tvar cd = scheduler._currentDate();\r\n\tthis.date.date_part(cd);\r\n\tthis.date.date_part(sd);\r\n\r\n\trows = rows || Math.ceil(Math.round((ed.valueOf()-sd.valueOf()) / (60*60*24*1000) ) / 7);\r\n\r\n\tvar height = (Math.floor(b.clientHeight/rows) - this.xy.month_head_height);\r\n\r\n\tthis._colsS.height = height + this.xy.month_head_height;\r\n\tthis._colsS.heights = [];\r\n\r\n\treturn scheduler._render_month_scale(b, dd, sd, rows);\r\n\r\n};\r\n\r\nscheduler.getView = function (viewName) {\r\n\tif (!viewName) {\r\n\t\tviewName = scheduler.getState().mode;\r\n\t}\r\n\tif (scheduler.matrix && scheduler.matrix[viewName]) {\r\n\t\treturn scheduler.matrix[viewName];\r\n\t}\r\n\r\n\tif (scheduler._props && scheduler._props[viewName]) {\r\n\t\treturn scheduler._props[viewName];\r\n\t}\r\n\r\n\treturn null;\r\n};\r\n\r\nscheduler.getLabel = function(property, key) {\r\n\tvar sections = this.config.lightbox.sections;\r\n\tfor (var i=0; i scheduler.getState().max_date.valueOf()){\r\n\t\t\tendColumnIndex += getDaysDifference(endDate, scheduler.getState().max_date);\r\n\t\t}\r\n\t} else{\r\n\t\tendColumnIndex = Math.round(eventLength/60/60/1000/24);\r\n\t}\r\n\r\n\tvar last_column = true;\r\n\twhile (startColumnIndex < endColumnIndex){\r\n\t\tvar check = scheduler.date.add(endDate, -config.x_step, config.x_unit);\r\n\t\tif (ignore && ignore(endDate) && (!last_column || (last_column && ignore(check) ))){\r\n\t\t\teventLength -= (endDate-check);\r\n\r\n\t\t}else{\r\n\t\t\tlet excludedDuration = 0;\r\n\t\t\tconst intervalStart = new Date(Math.max(check.valueOf(), startDate.valueOf()));\r\n\t\t\tconst intervalEnd = endDate;\r\n\t\t\tconst leftCellCutOffStart = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.first_hour);\r\n\t\t\tconst leftCellCutOffEnd = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.last_hour||24);\r\n\t\t\tconst rightCellCutOffStart = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.first_hour);\r\n\t\t\tconst rightCellCutOffEnd = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.last_hour||24);\r\n\r\n\t\t\tif(intervalEnd.valueOf() > rightCellCutOffEnd.valueOf()){\r\n\t\t\t\texcludedDuration += intervalEnd - rightCellCutOffEnd;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalEnd.valueOf() > rightCellCutOffStart.valueOf()){\r\n\t\t\t\texcludedDuration += config._start_correction;\r\n\t\t\t} else {\r\n\t\t\t\texcludedDuration += intervalEnd.getHours()*60*60*1000 + intervalEnd.getMinutes()*60*1000;\r\n\t\t\t}\r\n\t\t\t// GS-2580: if the end date of the events is quals to the last_hour config, need to include that date\r\n\t\t\tif(intervalStart.valueOf() <= leftCellCutOffEnd.valueOf()){\r\n\t\t\t\texcludedDuration += config._end_correction;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalStart.valueOf() < leftCellCutOffStart.valueOf()){\r\n\t\t\t\texcludedDuration += (leftCellCutOffStart.valueOf() - intervalStart.valueOf());\r\n\t\t\t}\r\n\t\t\t\r\n\r\n\t\t\teventLength -= excludedDuration;\r\n\t\t\tlast_column = false;\r\n\t\t}\r\n\t\tendDate = check;\r\n\t\tendColumnIndex--;\r\n\t}\r\n\treturn eventLength;\r\n};\r\nscheduler._get_fictional_event_length=function(end_date, ev_length, obj, back){\r\n\tvar sd = new Date(end_date);\r\n\tvar dir = back ? -1 : 1;\r\n\r\n\t//get difference caused by first|last hour\r\n\tif (obj._start_correction || obj._end_correction){\r\n\t\tvar today;\r\n\t\tif (back)\r\n\t\t\ttoday = (sd.getHours()*60+sd.getMinutes()) - (obj.first_hour||0)*60;\r\n\t\telse\r\n\t\t\ttoday = (obj.last_hour||0)*60 - (sd.getHours()*60+sd.getMinutes());\r\n\t\tvar per_day = (obj.last_hour - obj.first_hour)*60;\r\n\t\tvar days = Math.ceil( (ev_length / (60*1000) - today ) / per_day);\r\n\t\tif(days < 0) days = 0;\r\n\t\tev_length += days * (24*60 - per_day) * 60 * 1000;\r\n\t}\r\n\r\n\tvar fd = new Date(end_date*1+ev_length*dir);\r\n\tvar ignore = this[\"ignore_\"+this._mode];\r\n\r\n\tvar start_slot = 0,\r\n\t\tend_slot;\r\n\tif (obj.render){\r\n\t\tstart_slot = this._get_date_index(obj, sd);\r\n\t\tend_slot = this._get_date_index(obj, fd);\r\n\t} else{\r\n\t\tend_slot = Math.round(ev_length/60/60/1000/24);\r\n\t}\r\n\r\n\twhile (start_slot*dir <= end_slot*dir){\r\n\t\tvar check = scheduler.date.add(sd, obj.x_step*dir, obj.x_unit);\r\n\t\tif (ignore && ignore(sd)){\r\n\t\t\tev_length += (check-sd)*dir;\r\n\t\t\tend_slot += dir;\r\n\t\t}\r\n\r\n\t\tsd = check;\r\n\t\tstart_slot+=dir;\r\n\t}\r\n\r\n\treturn ev_length;\r\n};\r\n\r\nscheduler._get_section_view = function(){\r\n\treturn this.getView();\r\n};\r\n\r\nscheduler._get_section_property = function(){\r\n\tif(this.matrix && this.matrix[this._mode]){\r\n\t\treturn this.matrix[this._mode].y_property;\r\n\t}else if(this._props && this._props[this._mode]){\r\n\t\treturn this._props[this._mode].map_to;\r\n\t}\r\n\treturn null;\r\n};\r\n\r\nscheduler._is_initialized = function(){\r\n\tvar state = this.getState();\r\n\treturn (this._obj && state.date && state.mode);\r\n};\r\nscheduler._is_lightbox_open = function(){\r\n\tvar state = this.getState();\r\n\treturn state.lightbox_id !== null && state.lightbox_id !== undefined;\r\n};\r\n\r\n}","export default {\r\n\tevent: function (el, event, handler){\r\n\t\tif (el.addEventListener)\r\n\t\t\tel.addEventListener(event, handler, false);\r\n\t\r\n\t\telse if (el.attachEvent)\r\n\t\t\tel.attachEvent(\"on\"+event, handler);\r\n\t},\r\n\teventRemove: function (el, event, handler){\r\n\t\tif (el.removeEventListener)\r\n\t\t\tel.removeEventListener(event, handler, false);\r\n\t\r\n\t\telse if (el.detachEvent)\r\n\t\t\tel.detachEvent(\"on\"+event, handler);\r\n\t}\r\n};","import defaultDomEvents from './event';\r\n\r\nexport default function(){\r\n\r\n\tvar domEvents = function (addEvent, removeEvent) {\r\n\t\taddEvent = addEvent || defaultDomEvents.event;\r\n\t\tremoveEvent = removeEvent || defaultDomEvents.eventRemove;\r\n\t\tvar handlers = [];\r\n\t\tvar eventScope = {\r\n\t\t\tattach: function(el, event, callback, capture){\r\n\t\t\t\thandlers.push({element: el, event:event, callback: callback, capture: capture});\r\n\t\t\t\taddEvent(el, event, callback, capture);\r\n\t\t\t},\r\n\t\t\tdetach: function(el, event, callback, capture){\r\n\t\t\t\tremoveEvent(el, event, callback, capture);\r\n\t\t\t\tfor(var i = 0; i < handlers.length; i++){\r\n\t\t\t\t\tvar handler = handlers[i];\r\n\t\t\t\t\tif (handler.element === el && handler.event === event && handler.callback === callback && handler.capture === capture) {\r\n\t\t\t\t\t\thandlers.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tdetachAll: function () {\r\n\t\t\t\tvar staticArray = handlers.slice();\r\n\t\t\t\t// original handlers array can be spliced on every iteration\r\n\t\t\t\tfor (var i = 0; i < staticArray.length; i++){\r\n\t\t\t\t\tvar handler = staticArray[i];\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, handler.capture);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, undefined);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, false);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, true);\r\n\t\t\t\t}\r\n\t\t\t\thandlers.splice(0, handlers.length);\r\n\t\t\t},\r\n\t\t\textend: function(){\r\n\t\t\t\treturn domEvents(this.event, this.eventRemove);\r\n\t\t\t}\r\n\t\t};\r\n\t\treturn eventScope;\r\n\t};\r\n\t\r\n\treturn domEvents();\r\n}","import createEventScope from './utils/scoped_event';\r\n\r\nexport default function extend(scheduler) {\r\n\r\n\r\nvar domEvents = createEventScope();\r\n\r\nscheduler.event = domEvents.attach;\r\nscheduler.eventRemove = domEvents.detach;\r\nscheduler._eventRemoveAll = domEvents.detachAll;\r\nscheduler._createDomEventScope = domEvents.extend;\r\n\r\n\r\nscheduler._trim = function(str){\r\n\tvar func = String.prototype.trim || function(){ return this.replace(/^\\s+|\\s+$/g, \"\"); };\r\n\treturn func.apply(str);\r\n};\r\n\r\nscheduler._isDate = function(obj){\r\n\tif (obj && typeof obj == \"object\") {\r\n\t\treturn !!(obj.getFullYear && obj.getMonth && obj.getDate);\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n};\r\n\r\nscheduler._isObject = function(obj){\r\n\treturn (obj && typeof obj == \"object\");\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n(function(){\r\n\r\n\t// eslint-disable-next-line no-control-regex\r\n\tvar htmlTags = new RegExp(\"<(?:.|\\n)*?>\", \"gm\");\r\n\tvar extraSpaces = new RegExp(\" +\", \"gm\");\r\n\r\n\tfunction stripHTMLLite(htmlText){\r\n\t\treturn (htmlText + \"\")\r\n\t\t\t.replace(htmlTags, \" \").\r\n\t\t\treplace(extraSpaces, \" \");\r\n\t}\r\n\r\n\tvar singleQuotes = new RegExp(\"'\", \"gm\");\r\n\tfunction escapeQuotes(text){\r\n\t\treturn (text + \"\").replace(singleQuotes, \"'\");\r\n\t}\r\n\r\n\tscheduler._waiAria = {\r\n\t\tgetAttributeString: function(attr){\r\n\t\t\tvar attributes = [\" \"];\r\n\t\t\tfor(var i in attr){\r\n\t\t\t\tif(typeof attr[i] != \"function\" && typeof attr[i] != \"object\") {\r\n\t\t\t\t\tvar text = escapeQuotes(stripHTMLLite(attr[i]));\r\n\t\t\t\t\tattributes.push(i + \"='\" + text + \"'\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tattributes.push(\" \");\r\n\t\t\treturn attributes.join(\" \");\r\n\t\t},\r\n\t\tsetAttributes: function(div, values){\r\n\t\t\tfor(var i in values){\r\n\t\t\t\tdiv.setAttribute(i, stripHTMLLite(values[i]));\r\n\t\t\t}\r\n\t\t\treturn div;\r\n\t\t},\r\n\r\n\t\tlabelAttr: function(div, content){\r\n\t\t\treturn this.setAttributes(div, {\"aria-label\": content});\r\n\t\t},\r\n\t\tlabel: function(label){\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": label});\r\n\t\t},\r\n\r\n\t\t// day/week/units\r\n\r\n\t\thourScaleAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\r\n\t\t},\r\n\t\tmonthCellAttr: function(div, date){\r\n\t\t\tthis.labelAttr(div, scheduler.templates.day_date(date));\r\n\t\t},\r\n\r\n\t\tnavBarDateAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\t\t},\r\n\t\tdayHeaderAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\t\t},\r\n\r\n\t\tdayColumnAttr: function(div, date){\r\n\t\t\tthis.dayHeaderAttr(div, scheduler.templates.day_date(date));\r\n\t\t},\r\n\r\n\t\theaderButtonsAttributes: function(div, label){\r\n\t\t\treturn this.setAttributes(div, {\"role\":\"button\", \"aria-label\":label});\r\n\t\t},\r\n\r\n\t\theaderToggleState: function(div, isActive){\r\n\t\t\treturn this.setAttributes(div, {\"aria-pressed\": isActive ? \"true\" : \"false\"});\r\n\t\t},\r\n\r\n\r\n\t\tgetHeaderCellAttr:function(dateString){\r\n\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": dateString});\r\n\t\t},\r\n\r\n\r\n\t\teventAttr: function(event, div){\r\n\t\t\tthis._eventCommonAttr(event, div);\r\n\t\t},\r\n\r\n\r\n\t\t_eventCommonAttr: function(event, div){\r\n\t\t\tdiv.setAttribute(\"aria-label\", stripHTMLLite(scheduler.templates.event_text(event.start_date, event.end_date, event)));\r\n\r\n\t\t\tif(scheduler.config.readonly){\r\n\t\t\t\tdiv.setAttribute(\"aria-readonly\", true);\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif(event.$dataprocessor_class){\r\n\t\t\t\tdiv.setAttribute(\"aria-busy\", true);\r\n\t\t\t}\r\n\r\n\r\n\t\t\tdiv.setAttribute(\"aria-selected\",\r\n\t\t\t\t(scheduler.getState().select_id == event.id) ? \"true\" : \"false\");\r\n\t\t},\r\n\r\n\t\tsetEventBarAttr: function(event, div){\r\n\t\t\tthis._eventCommonAttr(event, div);\r\n\t\t},\r\n\r\n\t\t_getAttributes: function(attributeSetter, arg){\r\n\t\t\tvar result = {\r\n\t\t\t\tsetAttribute:function(name, value){\r\n\t\t\t\t\tthis[name] = value;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\tattributeSetter.apply(this, [arg, result]);\r\n\t\t\treturn result;\r\n\r\n\t\t},\r\n\r\n\t\teventBarAttrString: function(event){\r\n\t\t\treturn this.getAttributeString(this._getAttributes(this.setEventBarAttr, event));\r\n\t\t},\r\n\r\n\r\n\r\n\t\tagendaHeadAttrString :function(){\r\n\t\t\treturn this.getAttributeString({role: \"row\"});\r\n\t\t},\r\n\t\tagendaHeadDateString :function(label){\r\n\t\t\treturn this.getAttributeString({role: \"columnheader\", \"aria-label\": label});\r\n\t\t},\r\n\t\tagendaHeadDescriptionString :function(label){\r\n\t\t\treturn this.agendaHeadDateString(label);\r\n\t\t},\r\n\t\tagendaDataAttrString: function(){\r\n\t\t\treturn this.getAttributeString({role: \"grid\"});\r\n\t\t},\r\n\t\tagendaEventAttrString: function(event){\r\n\t\t\tvar attrs = this._getAttributes(this._eventCommonAttr, event);\r\n\r\n\t\t\tattrs[\"role\"] = \"row\";\r\n\r\n\t\t\treturn this.getAttributeString(attrs);\r\n\r\n\t\t},\r\n\t\tagendaDetailsBtnString: function(){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels.icon_details});\r\n\t\t},\r\n\r\n\r\n\t\tgridAttrString: function(){\r\n\t\t\treturn this.getAttributeString({role: \"grid\"});\r\n\t\t},\r\n\r\n\t\tgridRowAttrString: function(event){\r\n\t\t\treturn this.agendaEventAttrString(event);\r\n\t\t},\r\n\r\n\t\tgridCellAttrString: function(event, column, value){\r\n\t\t\treturn this.getAttributeString({\"role\":\"gridcell\", \"aria-label\": [\r\n\t\t\t\t(column.label === undefined ? column.id : column.label),\r\n\t\t\t\t\": \",\r\n\t\t\t\tvalue\r\n\t\t\t]});\r\n\t\t},\r\n\r\n\t\tmapAttrString: function(){\r\n\t\t\treturn this.gridAttrString();\r\n\t\t},\r\n\t\tmapRowAttrString: function(event){\r\n\t\t\treturn this.gridRowAttrString(event);\r\n\t\t},\r\n\t\tmapDetailsBtnString: function(){\r\n\t\t\treturn this.agendaDetailsBtnString();\r\n\t\t},\r\n\r\n\t\tminicalHeader: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"id\":headerId+\"\",\r\n\t\t\t\t\"aria-live\":\"assertice\",\r\n\t\t\t\t\"aria-atomic\":\"true\"\r\n\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalGrid: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"aria-labelledby\":headerId+\"\",\r\n\t\t\t\t\"role\":\"grid\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalRow: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"row\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalDayCell: function(div, date){\r\n\t\t\tvar selected = (date.valueOf() < scheduler._max_date.valueOf() && date.valueOf() >= scheduler._min_date.valueOf());\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"gridcell\",\r\n\t\t\t\t\"aria-label\": scheduler.templates.day_date(date),\r\n\t\t\t\t\"aria-selected\": selected ? \"true\" : \"false\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalHeadCell: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"columnheader\"\r\n\t\t\t});\r\n\t\t},\r\n\r\n\r\n\t\tweekAgendaDayCell: function(div, date){\r\n\t\t\tvar header = div.querySelector(\".dhx_wa_scale_bar\");\r\n\t\t\tvar content = div.querySelector(\".dhx_wa_day_data\");\r\n\t\t\tvar headerId = scheduler.uid() + \"\";\r\n\t\t\tthis.setAttributes(header, { \"id\": headerId});\r\n\t\t\tthis.setAttributes(content, { \"aria-labelledby\": headerId});\r\n\r\n\t\t},\r\n\t\tweekAgendaEvent: function(div, event){\r\n\t\t\tthis.eventAttr(event, div);\r\n\t\t},\r\n\r\n\t\tlightboxHiddenAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t},\r\n\r\n\t\tlightboxVisibleAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"false\");\r\n\t\t},\r\n\r\n\t\tlightboxSectionButtonAttrString: function(label){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":label, \"tabindex\":\"0\"});\r\n\t\t},\r\n\r\n\t\tyearHeader: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"id\":headerId+\"\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tyearGrid: function(div, headerId){\r\n\t\t\tthis.minicalGrid(div, headerId);\r\n\t\t},\r\n\t\tyearHeadCell: function(div){\r\n\t\t\treturn this.minicalHeadCell(div);\r\n\t\t},\r\n\t\tyearRow: function(div){\r\n\t\t\treturn this.minicalRow(div);\r\n\t\t},\r\n\t\tyearDayCell: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"gridcell\"\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\tlightboxAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t\tdiv.firstChild.setAttribute(\"role\", \"heading\");\r\n\t\t},\r\n\r\n\t\tlightboxButtonAttrString:function(buttonName){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels[buttonName], \"tabindex\":\"0\"});\r\n\t\t},\r\n\t\teventMenuAttrString: function(iconName){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels[iconName]});\r\n\t\t},\r\n\t\tlightboxHeader: function(div, headerText){\r\n\t\t\tdiv.setAttribute(\"aria-label\", headerText);\r\n\t\t},\r\n\r\n\t\tlightboxSelectAttrString: function(time_option){\r\n\t\t\tvar label = \"\";\r\n\r\n\t\t\tswitch (time_option) {\r\n\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.year;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%m\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.month;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%d\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.day;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%H:%i\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.hour + \" \" + scheduler.locale.labels.minute;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": label});\r\n\t\t},\r\n\r\n\r\n\t\tmessageButtonAttrString: function(buttonLabel){\r\n\t\t\treturn \"tabindex='0' role='button' aria-label='\"+buttonLabel+\"'\";\r\n\t\t},\r\n\r\n\t\tmessageInfoAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"alert\");\r\n\t\t\t//div.setAttribute(\"tabindex\", \"-1\");\r\n\t\t},\r\n\r\n\t\tmessageModalAttr: function(div, uid){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t\tif(uid){\r\n\t\t\t\tdiv.setAttribute(\"aria-labelledby\", uid);\r\n\t\t\t}\r\n\r\n\t\t\t//\tdiv.setAttribute(\"tabindex\", \"-1\");\r\n\t\t},\r\n\r\n\t\tquickInfoAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t},\r\n\r\n\t\tquickInfoHeaderAttrString: function(){\r\n\t\t\treturn \" role='heading' \";\r\n\t\t},\r\n\r\n\t\tquickInfoHeader: function(div, header){\r\n\t\t\tdiv.setAttribute(\"aria-label\", header);\r\n\t\t},\r\n\r\n\t\tquickInfoButtonAttrString: function(label){\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"role\":\"button\", \"aria-label\":label, \"tabindex\":\"0\"});\r\n\t\t},\r\n\r\n\t\ttooltipAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"tooltip\");\r\n\t\t},\r\n\r\n\t\ttooltipVisibleAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"false\");\r\n\t\t},\r\n\r\n\t\ttooltipHiddenAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t}\r\n\t};\r\n\r\n\tfunction isDisabled(){\r\n\t\treturn !scheduler.config.wai_aria_attributes;\r\n\t}\r\n\r\n\tfor(var i in scheduler._waiAria){\r\n\t\tscheduler._waiAria[i] = (function(payload){\r\n\t\t\treturn function(){\r\n\t\t\t\tif(isDisabled()){\r\n\t\t\t\t\treturn \" \";\r\n\t\t\t\t}\r\n\t\t\t\treturn payload.apply(this, arguments);\r\n\t\t\t};\r\n\t\t})(scheduler._waiAria[i]);\r\n\t}\r\n\r\n\r\n})();\r\n\r\n}","//returns position of html element on the page\r\nfunction elementPosition(elem) {\r\n\tvar top=0, left=0, right=0, bottom=0;\r\n\tif (elem.getBoundingClientRect) { //HTML5 method\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\t\tvar body = document.body;\r\n\t\tvar docElem = (document.documentElement ||\r\n\t\t\tdocument.body.parentNode ||\r\n\t\t\tdocument.body);\r\n\r\n\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\t\ttop = box.top + scrollTop - clientTop;\r\n\t\tleft = box.left + scrollLeft - clientLeft;\r\n\r\n\t\tright = document.body.offsetWidth - box.right;\r\n\t\tbottom = document.body.offsetHeight - box.bottom;\r\n\t} else { //fallback to naive approach\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop,10);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft,10);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\r\n\t\tright = document.body.offsetWidth - elem.offsetWidth - left;\r\n\t\tbottom = document.body.offsetHeight - elem.offsetHeight - top;\r\n\t}\r\n\treturn { y: Math.round(top), x: Math.round(left), width:elem.offsetWidth, height:elem.offsetHeight, right: Math.round(right), bottom: Math.round(bottom) };\r\n}\r\n\r\n/*\r\nevent position relatively to DOM element\r\n */\r\nfunction getRelativeEventPosition(ev, node){\r\n\tvar d = document.documentElement;\r\n\tvar box = elementPosition(node);\r\n\r\n\treturn {\r\n\t\tx: ev.clientX - d.clientLeft - box.x + node.scrollLeft,\r\n\t\ty: ev.clientY - d.clientTop - box.y + node.scrollTop\r\n\t};\r\n}\r\n\r\nfunction getNodePosition(elem) {\r\n\tvar top=0, left=0, right=0, bottom=0;\r\n\tif (elem.getBoundingClientRect) { //HTML5 method\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\t\tvar body = document.body;\r\n\t\tvar docElem = (document.documentElement ||\r\n\t\t\tdocument.body.parentNode ||\r\n\t\t\tdocument.body);\r\n\r\n\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\t\ttop = box.top + scrollTop - clientTop;\r\n\t\tleft = box.left + scrollLeft - clientLeft;\r\n\r\n\t\tright = document.body.offsetWidth - box.right;\r\n\t\tbottom = document.body.offsetHeight - box.bottom;\r\n\t} else { //fallback to naive approach\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop,10);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft,10);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\r\n\t\tright = document.body.offsetWidth - elem.offsetWidth - left;\r\n\t\tbottom = document.body.offsetHeight - elem.offsetHeight - top;\r\n\t}\r\n\treturn { y: Math.round(top), x: Math.round(left), width:elem.offsetWidth, height:elem.offsetHeight, right: Math.round(right), bottom: Math.round(bottom) };\r\n}\r\n\r\nfunction getClassName(node){\r\n\tif(!node) return \"\";\r\n\r\n\tvar className = node.className || \"\";\r\n\tif(className.baseVal)//'className' exist but not a string - IE svg element in DOM\r\n\t\tclassName = className.baseVal;\r\n\r\n\tif(!className.indexOf)\r\n\t\tclassName = '';\r\n\r\n\treturn className || \"\";\r\n}\r\n\r\nfunction getTargetNode(e) {\r\n\tvar trg;\r\n\tif (e.tagName)\r\n\t\ttrg = e;\r\n\telse {\r\n\t\te = e || window.event;\r\n\t\ttrg = e.target || e.srcElement;\r\n\t\tif (trg.shadowRoot && e.composedPath) {\r\n\t\t\ttrg = e.composedPath()[0];\r\n\t\t}\r\n\t}\r\n\treturn trg;\r\n}\r\n\r\nfunction locateCss(e, classname, strict){\r\n\tif(strict === undefined)\r\n\t\tstrict = true;\r\n\r\n\tvar trg = e.target || e.srcElement;\r\n\tvar css = '';\r\n\r\n\twhile (trg){\r\n\t\tcss = getClassName(trg);\r\n\r\n\t\tif(css){\r\n\t\t\tvar ind = css.indexOf(classname);\r\n\t\t\tif (ind >= 0){\r\n\t\t\t\tif (!strict)\r\n\t\t\t\t\treturn trg;\r\n\r\n\t\t\t\t//check that we have exact match\r\n\t\t\t\tvar left = (ind === 0) || (!((css.charAt(ind - 1)||\"\").trim()));\r\n\t\t\t\tvar right = ((ind + classname.length >= css.length)) || (!((css.charAt(ind + classname.length)).trim()));\r\n\r\n\t\t\t\tif (left && right)\r\n\t\t\t\t\treturn trg;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttrg=trg.parentNode;\r\n\t}\r\n\treturn null;\r\n}\r\n\r\n\r\n// get focusable nodes\r\nfunction isVisible(node){\r\n\tvar display = false,\r\n\t\tvisibility = false;\r\n\tif(window.getComputedStyle){\r\n\t\tvar style = window.getComputedStyle(node, null);\r\n\t\tdisplay = style[\"display\"];\r\n\t\tvisibility = style[\"visibility\"];\r\n\t}else if(node.currentStyle){\r\n\t\tdisplay = node.currentStyle[\"display\"];\r\n\t\tvisibility = node.currentStyle[\"visibility\"];\r\n\t}\r\n\r\n\tvar hiddenSection = false;\r\n\tvar recurringSection = locateCss({target:node}, \"dhx_form_repeat\", false);\r\n\tif(recurringSection){\r\n\t\thiddenSection = !!(recurringSection.style.height == \"0px\");\r\n\t}\r\n\thiddenSection = hiddenSection || !(node.offsetHeight);\r\n\r\n\treturn (display != \"none\" && visibility != \"hidden\" && !hiddenSection);\r\n}\r\n\r\nfunction hasNonNegativeTabIndex(node){\r\n\treturn !isNaN(node.getAttribute(\"tabindex\")) && (node.getAttribute(\"tabindex\")*1 >= 0);\r\n}\r\n\r\nfunction hasHref(node){\r\n\tvar canHaveHref = {\"a\": true, \"area\": true};\r\n\tif(canHaveHref[node.nodeName.loLowerCase()]){\r\n\t\treturn !!node.getAttribute(\"href\");\r\n\t}\r\n\treturn true;\r\n}\r\n\r\nfunction isEnabled(node){\r\n\tvar canDisable = {\"input\":true, \"select\":true, \"textarea\":true, \"button\":true, \"object\":true};\r\n\tif(canDisable[node.nodeName.toLowerCase()]){\r\n\t\treturn !node.hasAttribute(\"disabled\");\r\n\t}\r\n\r\n\treturn true;\r\n}\r\n\r\n\r\nfunction getFocusableNodes(root){\r\n\tvar nodes = root.querySelectorAll([\r\n\t\t\"a[href]\",\r\n\t\t\"area[href]\",\r\n\t\t\"input\",\r\n\t\t\"select\",\r\n\t\t\"textarea\",\r\n\t\t\"button\",\r\n\t\t\"iframe\",\r\n\t\t\"object\",\r\n\t\t\"embed\",\r\n\t\t\"[tabindex]\",\r\n\t\t\"[contenteditable]\"\r\n\t].join(\", \"));\r\n\r\n\tvar nodesArray = Array.prototype.slice.call(nodes, 0);\r\n\t\r\n\tfor(var i = 0; i < nodesArray.length; i++){\r\n\t\tnodesArray[i].$position = i;\r\n\t\t// we remember original nodes order, \r\n\t\t// so when we sort them by tabindex we ensure order of nodes with same tabindex is preserved, \r\n\t\t// since some browsers do unstable sort\r\n\t}\r\n\t\r\n\tnodesArray.sort(function(a, b) {\r\n\t\tif(a.tabIndex === 0 && b.tabIndex !== 0){\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\tif(a.tabIndex !== 0 && b.tabIndex === 0){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\t\r\n\t\tif (a.tabIndex === b.tabIndex){\r\n\t\t\t// ensure we do stable sort\r\n\t\t\treturn a.$position - b.$position;\r\n\t\t}\r\n\t\tif (a.tabIndex < b.tabIndex) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn 1;\r\n\t});\r\n\t\r\n\tfor(var i = 0; i < nodesArray.length; i++){\r\n\t\tvar node = nodesArray[i];\r\n\t\tvar isValid = (hasNonNegativeTabIndex(node) || isEnabled(node) || hasHref(node)) && isVisible(node);\r\n\t\tif(!isValid){\r\n\t\t\tnodesArray.splice(i, 1);\r\n\t\t\ti--;\r\n\t\t}\r\n\t}\r\n\treturn nodesArray;\r\n}\r\n\r\n\r\nfunction isShadowDomSupported() {\r\n\treturn document.head.createShadowRoot || document.head.attachShadow;\r\n}\r\n\r\n/**\r\n * Returns element that has the browser focus, or null if no element has focus.\r\n * Works with shadow DOM, so it's prefereed to use this function instead of document.activeElement directly.\r\n * @returns HTMLElement\r\n */\r\nfunction getActiveElement(){\r\n\tvar activeElement = document.activeElement;\r\n\tif (activeElement.shadowRoot) {\r\n\t\tactiveElement = activeElement.shadowRoot.activeElement;\r\n\t}\r\n\tif (activeElement === document.body && document.getSelection) {\r\n\t\tactiveElement = document.getSelection().focusNode || document.body;\r\n\t}\r\n\r\n\treturn activeElement;\r\n}\r\n\r\n/**\r\n * Returns document.body or the host node of the ShadowRoot, if the element is attached to ShadowDom\r\n * @param {HTMLElement} element \r\n * @returns HTMLElement\r\n */\r\nfunction getRootNode(element) {\r\n\tif (!element) {\r\n\t\treturn document.body;\r\n\t}\r\n\tif (!isShadowDomSupported()) {\r\n\t\treturn document.body;\r\n\t}\r\n\twhile (element.parentNode && (element = element.parentNode)) {\r\n\t\tif (element instanceof ShadowRoot) {\r\n\t\t\treturn element.host;\r\n\t\t}\r\n\t}\r\n\treturn document.body;\r\n}\r\n\r\nfunction hasShadowParent(element) {\r\n\treturn !!getRootNode(element);\r\n}\r\n\r\nexport default {\r\n\t/**\r\n\t * @desc: Calculate absolute position of html object\r\n\t * @type: private\r\n\t * @param: htmlObject - html object\r\n\t * @topic: 0\r\n\t */\r\n\tgetAbsoluteLeft: function getAbsoluteLeft(htmlObject){\r\n\t\treturn this.getOffset(htmlObject).left;\r\n\t},\r\n\t/**\r\n\t * @desc: Calculate absolute position of html object\r\n\t * @type: private\r\n\t * @param: htmlObject - html object\r\n\t * @topic: 0\r\n\t */\r\n\tgetAbsoluteTop: function getAbsoluteTop(htmlObject){\r\n\t\treturn this.getOffset(htmlObject).top;\r\n\t},\r\n\r\n\tgetOffsetSum: function getOffsetSum(elem) {\r\n\t\tvar top=0, left=0;\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\t\treturn {top: top, left: left};\r\n\t},\r\n\r\n\tgetOffsetRect: function getOffsetRect(elem) {\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\r\n\t\tvar top = 0,\r\n\t\t\tleft = 0;\r\n\r\n\t\t// https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#Mobile_Tablet_or_Desktop\r\n\t\tif (!/Mobi/.test(navigator.userAgent)) {\r\n\t\t\tvar body = document.body;\r\n\t\t\tvar docElem = document.documentElement;\r\n\t\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\r\n\t\t\ttop = box.top + scrollTop - clientTop;\r\n\t\t\tleft = box.left + scrollLeft - clientLeft;\r\n\t\t}else {\r\n\t\t\t// incorrect left coordinate on mobile zoom\r\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=489206\r\n\r\n\t\t\tvar dummy = document.createElement(\"div\");\r\n\t\t\tdummy.style.position=\"absolute\";\r\n\t\t\tdummy.style.left=\"0px\";\r\n\t\t\tdummy.style.top=\"0px\";\r\n\t\t\tdummy.style.width=\"1px\";\r\n\t\t\tdummy.style.height = \"1px\";\r\n\r\n\t\t\tdocument.body.appendChild(dummy);\r\n\t\t\tvar dummyBox = dummy.getBoundingClientRect();\r\n\t\t\ttop = box.top - dummyBox.top;\r\n\t\t\tleft = box.left - dummyBox.left;\r\n\r\n\t\t\tdummy.parentNode.removeChild(dummy);\r\n\t\t}\r\n\r\n\t\treturn { top: Math.round(top), left: Math.round(left) };\r\n\t},\r\n\r\n\tgetOffset: function getOffset(elem) {\r\n\t\tif (elem.getBoundingClientRect) {\r\n\t\t\treturn this.getOffsetRect(elem);\r\n\t\t} else {\r\n\t\t\treturn this.getOffsetSum(elem);\r\n\t\t}\r\n\t},\r\n\r\n\tclosest: function(element, selector){\r\n\t\tif(!element || !selector){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn closest(element, selector);\r\n\t},\r\n\tinsertAfter: function(newNode, referenceNode){\r\n\t\tif(referenceNode.nextSibling){\r\n\t\t\treferenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);\r\n\t\t}else{\r\n\t\t\treferenceNode.parentNode.appendChild(newNode);\r\n\t\t}\r\n\t},\r\n\tremove: function(node) {\r\n\t\tif (node && node.parentNode) {\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t}\r\n\t},\r\n\tisChildOf: function(child, parent) {\r\n\t\treturn parent.contains(child);\r\n\t},\r\n\tgetFocusableNodes,\r\n\tgetClassName,\r\n\tlocateCss,\r\n\tgetRootNode,\r\n\thasShadowParent,\r\n\tisShadowDomSupported,\r\n\tgetActiveElement,\r\n\tgetRelativeEventPosition,\r\n\tgetTargetNode,\r\n\tgetNodePosition\r\n};\r\n\r\nvar closest;\r\nif(Element.prototype.closest){\r\n\tclosest = function(element, selector){\r\n\t\treturn element.closest(selector);\r\n\t};\r\n}else{\r\n\tvar matches = Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\r\n\tclosest = function(element, selector) {\r\n\t\tvar el = element;\r\n\t\tdo {\r\n\t\t\tif (matches.call(el, selector)){\r\n\t\t\t\treturn el;\r\n\t\t\t}\r\n\t\t\tel = el.parentElement || el.parentNode;\r\n\t\t} while (el !== null && el.nodeType === 1);\r\n\t\treturn null;\r\n\t};\r\n}\r\n","/* eslint-disable no-restricted-globals */\r\nvar isWindowAwailable = typeof window !== \"undefined\";\r\n\r\n/* eslint-enable no-restricted-globals */\r\n\r\nexport default {\r\n\tisIE: isWindowAwailable && (navigator.userAgent.indexOf(\"MSIE\") >= 0 || navigator.userAgent.indexOf(\"Trident\") >= 0),\r\n\tisOpera: isWindowAwailable && (navigator.userAgent.indexOf(\"Opera\") >= 0),\r\n\tisChrome: isWindowAwailable && (navigator.userAgent.indexOf(\"Chrome\") >= 0),\r\n\tisKHTML: isWindowAwailable && (navigator.userAgent.indexOf(\"Safari\") >= 0 || navigator.userAgent.indexOf(\"Konqueror\") >= 0),\r\n\tisFF: isWindowAwailable && (navigator.userAgent.indexOf(\"Firefox\") >= 0),\r\n\tisIPad: isWindowAwailable && (navigator.userAgent.search(/iPad/gi) >= 0),\r\n\tisEdge: isWindowAwailable && (navigator.userAgent.indexOf(\"Edge\")!=-1),\r\n\tisNode: (!isWindowAwailable || typeof navigator == \"undefined\")\r\n};","export default function extend(scheduler) {\r\n\r\nscheduler.destructor = function(){\r\n\tscheduler.callEvent(\"onDestroy\", []);\r\n\tthis.clearAll();\r\n\r\n\tif(this.$container){\r\n\t\t// FIXME: clear container or remove container\r\n\t\tthis.$container.innerHTML = \"\";\r\n\t\t// scheduler.$domHelpers.remove(this.$container);\r\n\t}\r\n\r\n\tif(this._eventRemoveAll){\r\n\t\tthis._eventRemoveAll();\r\n\t}\r\n\r\n\tif(this.resetLightbox){\r\n\t\tthis.resetLightbox();\r\n\t}\r\n\r\n\tif(this._dp && this._dp.destructor){\r\n\t\tthis._dp.destructor();\r\n\t}\r\n\r\n\t// detachAllEvents should be called last, because in components may be attached events\r\n\tthis.detachAllEvents();\r\n\r\n\tfor(var i in this){\r\n\t\tif(i.indexOf(\"$\") === 0){\r\n\t\t\tdelete this[i];\r\n\t\t}\r\n\t}\r\n\tscheduler.$destroyed = true;\r\n};\r\n\r\n}","export default function(data) {\r\n\tif (typeof data === \"string\" || typeof data === \"number\") {\r\n\t\treturn data;\r\n\t}\r\n\tvar result = \"\";\r\n\tfor (var key in data) {\r\n\t\tvar serialized = \"\";\r\n\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\tif (typeof data[key] === \"string\") {\r\n\t\t\t\tserialized = encodeURIComponent(data[key]);\r\n\t\t\t} else if (typeof data[key] === \"number\") {\r\n\t\t\t\tserialized = data[key];\r\n\t\t\t} else {\r\n\t\t\t\tserialized = encodeURIComponent(JSON.stringify(data[key]));\r\n\t\t\t}\r\n\t\t\tserialized = key + \"=\" + serialized;\r\n\r\n\t\t\tif (result.length) {\r\n\t\t\t\tserialized = \"&\" + serialized;\r\n\t\t\t}\r\n\t\t\tresult += serialized;\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n}","import serialize from \"../common/url_serialize.js\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler.Promise = window.Promise; \r\n\r\nfunction createConfig(method, args) {\r\n\tvar result = {\r\n\t\tmethod: method\r\n\t};\r\n\r\n\tif (args.length === 0) {\r\n\t\tthrow new Error(\"Arguments list of query is wrong.\");\r\n\t}\r\n\tif (args.length === 1) {\r\n\t\tif (typeof args[0] === \"string\") {\r\n\t\t\tresult.url = args[0];\r\n\t\t\tresult.async = true;\r\n\t\t} else {\r\n\t\t\tresult.url = args[0].url;\r\n\t\t\tresult.async = (args[0].async || true);\r\n\t\t\tresult.callback = args[0].callback;\r\n\t\t\tresult.headers = args[0].headers;\r\n\t\t}\r\n\t\tif (method === \"POST\" || \"PUT\") {\r\n\t\t\tif (args[0].data) {\r\n\t\t\t\tif (typeof args[0].data !== \"string\") {\r\n\t\t\t\t\tresult.data = serialize(args[0].data);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult.data = args[0].data;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tresult.data = \"\";\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n\tresult.url = args[0];\r\n\tswitch(method) {\r\n\t\tcase \"GET\":\r\n\t\tcase \"DELETE\":\r\n\t\t\tresult.callback = args[1];\r\n\t\t\tresult.headers = args[2];\r\n\t\tbreak;\r\n\t\tcase \"POST\":\r\n\t\tcase \"PUT\":\r\n\t\t\tif (args[1]) {\r\n\t\t\t\tif (typeof args[1] !== \"string\") {\r\n\t\t\t\t\tresult.data = serialize(args[1]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult.data = args[1];\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tresult.data = \"\";\r\n\t\t\t}\r\n\t\t\tresult.callback = args[2];\r\n\t\t\tresult.headers = args[3];\r\n\t\tbreak;\r\n\t}\r\n\treturn result;\r\n}\r\nscheduler.ajax = {\r\n\t// if false - dhxr param will added to prevent caching on client side (default),\r\n\t// if true - do not add extra params\r\n\tcache: true,\r\n\r\n\t// default method for load/loadStruct, post/get allowed\r\n\tmethod: \"get\",\r\n\r\n\tserializeRequestParams: serialize,\r\n\tparse: function(data) {\r\n\t\tif (typeof data !== \"string\") return data;\r\n\r\n\t\tvar obj;\r\n\t\tdata = data.replace(/^[\\s]+/,\"\");\r\n\t\tif (typeof DOMParser !== \"undefined\" && !scheduler.$env.isIE) { // ff,ie9\r\n\t\t\tobj = (new DOMParser()).parseFromString(data, \"text/xml\");\r\n\t\t} else if (typeof window.ActiveXObject !== \"undefined\") {\r\n\t\t\tobj = new window.ActiveXObject(\"Microsoft.XMLDOM\");\r\n\t\t\tobj.async = \"false\";\r\n\t\t\tobj.loadXML(data);\r\n\t\t}\r\n\t\treturn obj;\r\n\t},\r\n\txmltop: function(tagname, xhr, obj) {\r\n\t\tif (typeof xhr.status == \"undefined\" || xhr.status < 400) {\r\n\t\t\tvar xml = (!xhr.responseXML) ? this.parse(xhr.responseText || xhr) : (xhr.responseXML || xhr);\r\n\t\t\tif (xml && xml.documentElement !== null && !xml.getElementsByTagName(\"parsererror\").length) {\r\n\t\t\t\treturn xml.getElementsByTagName(tagname)[0];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (obj !== -1) scheduler.callEvent(\"onLoadXMLError\",[\"Incorrect XML\", arguments[1], obj]);\r\n\t\treturn document.createElement(\"DIV\");\r\n\t},\r\n\txpath: function(xpathExp, docObj) {\r\n\t\tif (!docObj.nodeName) docObj = docObj.responseXML || docObj;\r\n\t\tif (scheduler.$env.isIE) {\r\n\t\t\treturn docObj.selectNodes(xpathExp)||[];\r\n\t\t} else {\r\n\t\t\tvar rows = [];\r\n\t\t\tvar first;\r\n\t\t\tvar col = (docObj.ownerDocument||docObj).evaluate(xpathExp, docObj, null, XPathResult.ANY_TYPE, null);\r\n\r\n\t\t\twhile (true){\r\n\t\t\t\tfirst = col.iterateNext();\r\n\t\t\t\tif(first){\r\n\t\t\t\t\trows.push(first);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn rows;\r\n\t\t}\r\n\t},\r\n\tquery: function(config) {\r\n\t\treturn this._call(\r\n\t\t\t(config.method || \"GET\"),\r\n\t\t\tconfig.url,\r\n\t\t\tconfig.data || \"\",\r\n\t\t\t(config.async || true),\r\n\t\t\tconfig.callback,\r\n\t\t\tconfig.headers\r\n\t\t);\r\n\t},\r\n\tget: function(url, onLoad, headers) {\r\n\t\tvar config = createConfig(\"GET\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tgetSync: function(url, headers) {\r\n\t\tvar config = createConfig(\"GET\", arguments);\r\n\t\tconfig.async = false;\r\n\t\treturn this.query(config);\r\n\t},\r\n\tput: function(url, postData, onLoad, headers) {\r\n\t\tvar config = createConfig(\"PUT\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tdel: function(url, onLoad, headers) {\r\n\t\t/**\r\n\t\t * https://tools.ietf.org/html/rfc7231#section-4.3.5\r\n\t\t * A payload within a DELETE request message has no defined semantics;\r\n\t\t * sending a payload body on a DELETE request might cause some existing\r\n\t\t * implementations to reject the request.\r\n\t\t */\r\n\t\tvar config = createConfig(\"DELETE\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tpost: function(url, postData, onLoad, headers) {\r\n\t\tif (arguments.length == 1) {\r\n\t\t\tpostData = \"\";\r\n\t\t} else if (arguments.length == 2 && typeof(postData) == \"function\") {\r\n\t\t\tonLoad = postData;\r\n\t\t\tpostData = \"\";\r\n\t\t}\r\n\t\tvar config = createConfig(\"POST\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tpostSync: function(url, postData, headers) {\r\n\t\tpostData = (postData === null ? \"\" : String(postData));\r\n\r\n\t\tvar config = createConfig(\"POST\", arguments);\r\n\t\tconfig.async = false;\r\n\t\treturn this.query(config);\r\n\t},\r\n\t_call: function(method, url, postData, async, onLoad, headers) {\r\n\t\treturn new scheduler.Promise((function(resolve, reject) {\r\n\t\t\tvar t = (typeof XMLHttpRequest !== undefined && !scheduler.$env.isIE ? new XMLHttpRequest() : new window.ActiveXObject(\"Microsoft.XMLHTTP\"));\r\n\t\t\tvar isQt = (navigator.userAgent.match(/AppleWebKit/) !== null && navigator.userAgent.match(/Qt/) !== null && navigator.userAgent.match(/Safari/) !== null);\r\n\r\n\t\t\tif (!!async) {\r\n\t\t\t\tt.addEventListener(\"readystatechange\", function() {\r\n\t\t\t\t\tif ((t.readyState == 4) || (isQt && t.readyState == 3)) { // what for long response and status 404?\r\n\t\t\t\t\t\tif (t.status != 200 || t.responseText === \"\")\r\n\t\t\t\t\t\t\tif (!scheduler.callEvent(\"onAjaxError\", [t])) return;\r\n\r\n\t\t\t\t\t\tsetTimeout(function() {\r\n\t\t\t\t\t\t\tif (typeof(onLoad) == \"function\") {\r\n\t\t\t\t\t\t\t\tonLoad.apply(window, [{xmlDoc:t, filePath:url}]); // dhtmlx-compat, response.xmlDoc.responseXML/responseText\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tresolve(t);\r\n\t\t\t\t\t\t\tif (typeof(onLoad) == \"function\") {\r\n\t\t\t\t\t\t\t\tonLoad = null;\r\n\t\t\t\t\t\t\t\tt = null;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}, 0);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (method == \"GET\" && !this.cache) {\r\n\t\t\t\turl += (url.indexOf(\"?\")>=0?\"&\":\"?\")+\"dhxr\"+new Date().getTime()+\"=1\";\r\n\t\t\t}\r\n\r\n\t\t\tt.open(method, url, async);\r\n\r\n\t\t\tif (headers){\r\n\t\t\t\tfor (var key in headers)\r\n\t\t\t\t\tt.setRequestHeader(key, headers[key]);\r\n\t\t\t} else if (method.toUpperCase() == \"POST\" || method == \"PUT\" || method == \"DELETE\") {\r\n\t\t\t\tt.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\r\n\t\t\t} else if (method == \"GET\") {\r\n\t\t\t\tpostData = null;\r\n\t\t\t}\r\n\r\n\t\t\tt.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\r\n\r\n\t\t\tt.send(postData);\r\n\r\n\t\t\tif (!async) return {xmlDoc:t, filePath:url}; // dhtmlx-compat, response.xmlDoc.responseXML/responseText\r\n\t\t}.bind(this)));\r\n\t},\r\n\turlSeparator: function(str){\r\n\t\tif (str.indexOf(\"?\") != -1)\r\n\t\t\treturn \"&\";\r\n\t\telse\r\n\t\t\treturn \"?\";\r\n\t}\r\n};\r\n\r\nscheduler.$ajax = scheduler.ajax; // for old\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nvar generateStringToDate = function (format, utc) {\r\n\tvar splt = \"var temp=date.match(/[a-zA-Z]+|[0-9]+/g);\";\r\n\tvar mask = format.match(/%[a-zA-Z]/g);\r\n\tfor (var i = 0; i < mask.length; i++) {\r\n\t\tswitch (mask[i]) {\r\n\t\t\tcase \"%j\":\r\n\t\t\tcase \"%d\": splt += \"set[2]=temp[\" + i + \"]||1;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%n\":\r\n\t\t\tcase \"%m\": splt += \"set[1]=(temp[\" + i + \"]||1)-1;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%y\": splt += \"set[0]=temp[\" + i + \"]*1+(temp[\" + i + \"]>50?1900:2000);\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%g\":\r\n\t\t\tcase \"%G\":\r\n\t\t\tcase \"%h\":\r\n\t\t\tcase \"%H\":\r\n\t\t\t\tsplt += \"set[3]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%i\":\r\n\t\t\t\tsplt += \"set[4]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%Y\": splt += \"set[0]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%a\":\r\n\t\t\tcase \"%A\": splt += \"set[3]=set[3]%12+((temp[\" + i + \"]||'').toLowerCase()=='am'?0:12);\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%s\": splt += \"set[5]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%M\": splt += \"set[1]=this.locale.date.month_short_hash[temp[\" + i + \"]]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%F\": splt += \"set[1]=this.locale.date.month_full_hash[temp[\" + i + \"]]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\tvar code = \"set[0],set[1],set[2],set[3],set[4],set[5]\";\r\n\tif (utc) code = \" Date.UTC(\" + code + \")\";\r\n\treturn new Function(\"date\", \"var set=[0,0,1,0,0,0]; \" + splt + \" return new Date(\" + code + \");\");\r\n};\r\nvar csp_date_to_str = function (format, utc) {\r\n\treturn function(date) {\r\n\t\treturn format.replace(/%[a-zA-Z]/g, function (a) {\r\n\t\t\tswitch (a) {\r\n\t\t\t\tcase \"%d\": return utc ? scheduler.date.to_fixed(date.getUTCDate()) : scheduler.date.to_fixed(date.getDate());\r\n\t\t\t\tcase \"%m\": return utc ? scheduler.date.to_fixed((date.getUTCMonth() + 1)) : scheduler.date.to_fixed((date.getMonth() + 1));\r\n\t\t\t\tcase \"%j\": return utc ? date.getUTCDate() : date.getDate();\r\n\t\t\t\tcase \"%n\": return utc ? (date.getUTCMonth() + 1) : (date.getMonth() + 1);\r\n\t\t\t\tcase \"%y\": return utc ? scheduler.date.to_fixed(date.getUTCFullYear() % 100) : scheduler.date.to_fixed(date.getFullYear() % 100);\r\n\t\t\t\tcase \"%Y\": return utc ? date.getUTCFullYear() : date.getFullYear();\r\n\t\t\t\tcase \"%D\": return utc ? scheduler.locale.date.day_short[date.getUTCDay()] : scheduler.locale.date.day_short[date.getDay()];\r\n\t\t\t\tcase \"%l\": return utc ? scheduler.locale.date.day_full[date.getUTCDay()] : scheduler.locale.date.day_full[date.getDay()];\r\n\t\t\t\tcase \"%M\": return utc ? scheduler.locale.date.month_short[date.getUTCMonth()] : scheduler.locale.date.month_short[date.getMonth()];\r\n\t\t\t\tcase \"%F\": return utc ? scheduler.locale.date.month_full[date.getUTCMonth()] : scheduler.locale.date.month_full[date.getMonth()];\r\n\t\t\t\tcase \"%h\": return utc ? scheduler.date.to_fixed((date.getUTCHours() + 11) % 12 + 1) : scheduler.date.to_fixed((date.getHours() + 11) % 12 + 1);\r\n\t\t\t\tcase \"%g\": return utc ? ((date.getUTCHours() + 11) % 12 + 1) : ((date.getHours() + 11) % 12 + 1);\r\n\t\t\t\tcase \"%G\": return utc ? date.getUTCHours() : date.getHours();\r\n\t\t\t\tcase \"%H\": return utc ? scheduler.date.to_fixed(date.getUTCHours()) : scheduler.date.to_fixed(date.getHours());\r\n\t\t\t\tcase \"%i\": return utc ? scheduler.date.to_fixed(date.getUTCMinutes()) : scheduler.date.to_fixed(date.getMinutes());\r\n\t\t\t\tcase \"%a\": return utc ? (date.getUTCHours() > 11 ? \"pm\" : \"am\") : (date.getHours() > 11 ? \"pm\" : \"am\");\r\n\t\t\t\tcase \"%A\": return utc ? (date.getUTCHours() > 11 ? \"PM\" : \"AM\") : (date.getHours() > 11 ? \"PM\" : \"AM\");\r\n\t\t\t\tcase \"%s\": return utc ? scheduler.date.to_fixed(date.getUTCSeconds()) : scheduler.date.to_fixed(date.getSeconds());\r\n\t\t\t\tcase \"%W\": return utc ? scheduler.date.to_fixed(scheduler.date.getUTCISOWeek(date)) : scheduler.date.to_fixed(scheduler.date.getISOWeek(date));\r\n\t\t\t\tdefault: return a;\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n};\r\nvar csp_str_to_date = function (format, utc) {\r\n\tconst mask = format.match(/%[a-zA-Z]/g);\r\n\treturn function (date){\r\n\t\tvar set = [0, 0, 1, 0, 0, 0];\r\n\t\tvar temp = date.match(/[a-zA-Z]+|[0-9]+/g);\r\n\r\n\t\tfor (var i = 0; i < mask.length; i++) {\r\n\t\t\tswitch (mask[i]) {\r\n\t\t\t\tcase \"%j\":\r\n\t\t\t\tcase \"%d\":\r\n\t\t\t\t\tset[2] = temp[i] || 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%n\":\r\n\t\t\t\tcase \"%m\":\r\n\t\t\t\t\tset[1] = (temp[i] || 1) - 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%y\":\r\n\t\t\t\t\tset[0] = temp[i] * 1 + (temp[i] > 50 ? 1900 : 2000);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%g\":\r\n\t\t\t\tcase \"%G\":\r\n\t\t\t\tcase \"%h\":\r\n\t\t\t\tcase \"%H\":\r\n\t\t\t\t\tset[3] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%i\":\r\n\t\t\t\t\tset[4] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\tset[0] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%a\":\r\n\t\t\t\tcase \"%A\":\r\n\t\t\t\t\tset[3] = set[3] % 12 + ((temp[i] || '').toLowerCase() == 'am' ? 0 : 12);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%s\":\r\n\t\t\t\t\tset[5] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%M\":\r\n\t\t\t\t\tset[1] = scheduler.locale.date.month_short_hash[temp[i]] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%F\":\r\n\t\t\t\t\tset[1] = scheduler.locale.date.month_full_hash[temp[i]] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (utc) {\r\n\t\t\treturn new Date(Date.UTC(set[0], set[1], set[2], set[3], set[4], set[5]));\r\n\t\t}\r\n\r\n\t\treturn new Date(set[0], set[1], set[2], set[3], set[4], set[5]);\r\n\t};\r\n};\r\n\r\nlet cspEnabled = undefined;\r\nfunction checkIfCSPEnabled(){\r\n\ttry {\r\n\t\tnew Function(\"cspEnabled = false;\");\r\n\t\tcspEnabled = false;\r\n\t} catch(e) {\r\n\t\tcspEnabled = true;\r\n\t}\r\n\treturn cspEnabled;\r\n}\r\n\r\nfunction useCsp() {\r\n\tvar result = false;\r\n\tif (scheduler.config.csp === \"auto\") {\r\n\t\tif(cspEnabled === undefined){\r\n\t\t\tcspEnabled = checkIfCSPEnabled();\r\n\t\t}\r\n\t\tresult = cspEnabled;\r\n\t} else {\r\n\t\tresult = scheduler.config.csp;\r\n\t}\r\n\treturn result;\r\n}\r\nscheduler.date = {\r\n\tinit:function(){\r\n\t\tvar s = scheduler.locale.date.month_short;\r\n\t\tvar t = scheduler.locale.date.month_short_hash = {};\r\n\t\tfor (var i = 0; i < s.length; i++)\r\n\t\t\tt[s[i]]=i;\r\n\r\n\t\tvar s = scheduler.locale.date.month_full;\r\n\t\tvar t = scheduler.locale.date.month_full_hash = {};\r\n\t\tfor (var i = 0; i < s.length; i++)\r\n\t\t\tt[s[i]]=i;\r\n\t},\r\n\tdate_part:function(date){\r\n\t\tvar old = new Date(date);\r\n\t\tdate.setHours(0);\r\n\t\tdate.setMinutes(0);\r\n\t\tdate.setSeconds(0);\r\n\t\tdate.setMilliseconds(0);\r\n\t\tif (date.getHours() && //shift to yesterday on dst\r\n\t\t\t(date.getDate() < old.getDate() || date.getMonth() < old.getMonth() || date.getFullYear() < old.getFullYear()) )\r\n\t\t\tdate.setTime(date.getTime() + 60 * 60 * 1000 * (24 - date.getHours()));\r\n\t\treturn date;\r\n\t},\r\n\ttime_part:function(date){\r\n\t\treturn (date.valueOf()/1000 - date.getTimezoneOffset()*60)%86400;\r\n\t},\r\n\tweek_start:function(date){\r\n\t\tvar shift=date.getDay();\r\n\t\tif (scheduler.config.start_on_monday){\r\n\t\t\tif (shift===0) shift=6;\r\n\t\t\telse shift--;\r\n\t\t}\r\n\t\treturn this.date_part(this.add(date,-1*shift,\"day\"));\r\n\t},\r\n\tmonth_start:function(date){\r\n\t\tdate.setDate(1);\r\n\t\treturn this.date_part(date);\r\n\t},\r\n\tyear_start:function(date){\r\n\t\tdate.setMonth(0);\r\n\t\treturn this.month_start(date);\r\n\t},\r\n\tday_start:function(date){\r\n\t\treturn this.date_part(date);\r\n\t},\r\n\t_add_days:function(date, inc){\r\n\t\tvar ndate = new Date(date.valueOf());\r\n\r\n\t\tndate.setDate(ndate.getDate() + inc);\r\n\r\n\t\t// Workaround for Safari/iOS timezone bug, ref:OKZ-149693\r\n\t\tif(inc == Math.round(inc) && inc > 0){\r\n\t\t\tvar datesDiff = +ndate - +date,\r\n\t\t\t\trest = datesDiff % (24*60*60*1000);\r\n\t\t\tif(rest && date.getTimezoneOffset() == ndate.getTimezoneOffset()){\r\n\t\t\t\tvar hours = rest / (60* 60 * 1000);\r\n\t\t\t\tndate.setTime(ndate.getTime() + (24 - hours) * 60 * 60 * 1000);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (inc >= 0 && (!date.getHours() && ndate.getHours()) &&//shift to yesterday on dst\r\n\t\t\t(ndate.getDate() < date.getDate() || ndate.getMonth() < date.getMonth() || ndate.getFullYear() < date.getFullYear()) )\r\n\t\t\tndate.setTime(ndate.getTime() + 60 * 60 * 1000 * (24 - ndate.getHours()));\r\n\t\treturn ndate;\r\n\t},\r\n\tadd:function(date,inc,mode){\r\n\t\tvar ndate=new Date(date.valueOf());\r\n\t\tswitch(mode){\r\n\t\t\tcase \"day\":\r\n\t\t\t\tndate = scheduler.date._add_days(ndate, inc);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"week\":\r\n\t\t\t\tndate = scheduler.date._add_days(ndate, inc * 7);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"month\": ndate.setMonth(ndate.getMonth()+inc); break;\r\n\t\t\tcase \"year\": ndate.setYear(ndate.getFullYear()+inc); break;\r\n\t\t\tcase \"hour\":\r\n\t\t\t\t/*\r\n\t\t\t\t setHour(getHour() + inc) and setMinutes gives weird result when is applied on a Daylight Saving time switch\r\n\t\t\t\t setTime seems working as expected\r\n\t\t\t\t*/\r\n\t\t\t\tndate.setTime(ndate.getTime() + inc * 60 * 60 * 1000);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"minute\":\r\n\t\t\t\tndate.setTime(ndate.getTime() + inc * 60 * 1000);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\treturn scheduler.date[\"add_\"+mode](date,inc,mode);\r\n\t\t}\r\n\t\treturn ndate;\r\n\t},\r\n\tto_fixed:function(num){\r\n\t\tif (num<10)\treturn \"0\"+num;\r\n\t\treturn num;\r\n\t},\r\n\tcopy:function(date){\r\n\t\treturn new Date(date.valueOf());\r\n\t},\r\n\tdate_to_str:function(format,utc){\r\n\t\tif (useCsp()) {\r\n\t\t\treturn csp_date_to_str(format,utc);\r\n\t\t}\r\n\r\n\t\tformat=format.replace(/%[a-zA-Z]/g,function(a){\r\n\t\t\tswitch(a){\r\n\t\t\t\tcase \"%d\": return \"\\\"+this.date.to_fixed(date.getDate())+\\\"\";\r\n\t\t\t\tcase \"%m\": return \"\\\"+this.date.to_fixed((date.getMonth()+1))+\\\"\";\r\n\t\t\t\tcase \"%j\": return \"\\\"+date.getDate()+\\\"\";\r\n\t\t\t\tcase \"%n\": return \"\\\"+(date.getMonth()+1)+\\\"\";\r\n\t\t\t\tcase \"%y\": return \"\\\"+this.date.to_fixed(date.getFullYear()%100)+\\\"\";\r\n\t\t\t\tcase \"%Y\": return \"\\\"+date.getFullYear()+\\\"\";\r\n\t\t\t\tcase \"%D\": return \"\\\"+this.locale.date.day_short[date.getDay()]+\\\"\";\r\n\t\t\t\tcase \"%l\": return \"\\\"+this.locale.date.day_full[date.getDay()]+\\\"\";\r\n\t\t\t\tcase \"%M\": return \"\\\"+this.locale.date.month_short[date.getMonth()]+\\\"\";\r\n\t\t\t\tcase \"%F\": return \"\\\"+this.locale.date.month_full[date.getMonth()]+\\\"\";\r\n\t\t\t\tcase \"%h\": return \"\\\"+this.date.to_fixed((date.getHours()+11)%12+1)+\\\"\";\r\n\t\t\t\tcase \"%g\": return \"\\\"+((date.getHours()+11)%12+1)+\\\"\";\r\n\t\t\t\tcase \"%G\": return \"\\\"+date.getHours()+\\\"\";\r\n\t\t\t\tcase \"%H\": return \"\\\"+this.date.to_fixed(date.getHours())+\\\"\";\r\n\t\t\t\tcase \"%i\": return \"\\\"+this.date.to_fixed(date.getMinutes())+\\\"\";\r\n\t\t\t\tcase \"%a\": return \"\\\"+(date.getHours()>11?\\\"pm\\\":\\\"am\\\")+\\\"\";\r\n\t\t\t\tcase \"%A\": return \"\\\"+(date.getHours()>11?\\\"PM\\\":\\\"AM\\\")+\\\"\";\r\n\t\t\t\tcase \"%s\": return \"\\\"+this.date.to_fixed(date.getSeconds())+\\\"\";\r\n\t\t\t\tcase \"%W\": return \"\\\"+this.date.to_fixed(this.date.getISOWeek(date))+\\\"\";\r\n\t\t\t\tdefault: return a;\r\n\t\t\t}\r\n\t\t});\r\n\t\tif (utc) format=format.replace(/date\\.get/g,\"date.getUTC\");\r\n\t\tvar func = new Function(\"date\",\"return \\\"\"+format+\"\\\";\");\r\n\r\n\t\treturn func.bind(scheduler);\r\n\t},\r\n\tstr_to_date:function(format, utc, exactFormat){\r\n\t\tvar stringToDateMethod = useCsp() ? csp_str_to_date : generateStringToDate;\r\n\t\tvar parseExactFormat = stringToDateMethod(format, utc);\r\n\t\t// eslint-disable-next-line\r\n\t\tvar yyyyMMddhhIIss = /^[0-9]{4}(\\-|\\/)[0-9]{2}(\\-|\\/)[0-9]{2} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/;\r\n\r\n\t\t// MM/dd/yyyy - default old format for xml-date\r\n\t\t// eslint-disable-next-line\r\n\t\tvar MMddyyyyhhIIss = /^[0-9]{2}\\/[0-9]{2}\\/[0-9]{4} ?(([0-9]{1,2}:[0-9]{2})(:[0-9]{1,2})?)?$/;\r\n\t\t// dd-MM-yyyy - default old format for api-date\r\n\t\t// eslint-disable-next-line\r\n\t\tvar ddMMyyyyhhIIss = /^[0-9]{2}\\-[0-9]{2}\\-[0-9]{4} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/;\r\n\t\t// eslint-disable-next-line\r\n\t\tvar ISO8601 = /^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$/;\r\n\r\n\t\tvar isYMDDate = function (datestr) {\r\n\t\t\treturn yyyyMMddhhIIss.test(String(datestr));\r\n\t\t};\r\n\r\n\t\tvar isMDYDate = function (datestr) {\r\n\t\t\treturn MMddyyyyhhIIss.test(String(datestr));\r\n\t\t};\r\n\t\tvar isDMYDate = function (datestr) {\r\n\t\t\treturn ddMMyyyyhhIIss.test(String(datestr));\r\n\t\t};\r\n\t\tvar isISO8601 = function (datestr) {\r\n\t\t\treturn ISO8601.test(datestr);\r\n\t\t};\r\n\r\n\t\tvar parseYMD = stringToDateMethod(\"%Y-%m-%d %H:%i:%s\", utc);\r\n\t\tvar parseMDY = stringToDateMethod(\"%m/%d/%Y %H:%i:%s\", utc);\r\n\t\tvar parseDMY = stringToDateMethod(\"%d-%m-%Y %H:%i:%s\", utc);\r\n\r\n\t\treturn function (dateString) {\r\n\r\n\t\t\tif (!exactFormat && !scheduler.config.parse_exact_format) {\r\n\t\t\t\tif (dateString && dateString.getISOWeek) {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t} else if (typeof dateString === \"number\") {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t} else if (isYMDDate(dateString)) {\r\n\t\t\t\t\treturn parseYMD(dateString);\r\n\t\t\t\t} else if (isMDYDate(dateString)) {\r\n\t\t\t\t\treturn parseMDY(dateString);\r\n\t\t\t\t} else if (isDMYDate(dateString)) {\r\n\t\t\t\t\treturn parseDMY(dateString);\r\n\t\t\t\t} else if (isISO8601(dateString)) {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn parseExactFormat.call(scheduler, dateString);\r\n\t\t};\r\n\t},\r\n\tgetISOWeek: function(ndate) {\r\n\t\tif(!ndate) return false;\r\n\t\tndate = this.date_part(new Date(ndate));\r\n\t\tvar nday = ndate.getDay();\r\n\t\tif (nday === 0) {\r\n\t\t\tnday = 7;\r\n\t\t}\r\n\t\tvar first_thursday = new Date(ndate.valueOf());\r\n\t\tfirst_thursday.setDate(ndate.getDate() + (4 - nday));\r\n\t\tvar year_number = first_thursday.getFullYear(); // year of the first Thursday\r\n\t\tvar ordinal_date = Math.round( (first_thursday.getTime() - new Date(year_number, 0, 1).getTime()) / 86400000); //ordinal date of the first Thursday - 1 (so not really ordinal date)\r\n\t\tvar week_number = 1 + Math.floor( ordinal_date / 7);\r\n\t\treturn week_number;\r\n\t},\r\n\tgetUTCISOWeek: function(ndate){\r\n\t\treturn this.getISOWeek(this.convert_to_utc(ndate));\r\n\t},\r\n\tconvert_to_utc: function(date) {\r\n\t\treturn new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds());\r\n\t}\r\n};\r\n\r\n}\r\n\r\n","export default function extend(scheduler) {\r\n\r\n/*\r\n%e\tDay of the month without leading zeros (01..31)\r\n%d\tDay of the month, 2 digits with leading zeros (01..31)\r\n%j\tDay of the year, 3 digits with leading zeros (001..366)\r\n%a\tA textual representation of a day, two letters\r\n%W\tA full textual representation of the day of the week\r\n\r\n%c\tNumeric representation of a month, without leading zeros (0..12)\r\n%m\tNumeric representation of a month, with leading zeros (00..12)\r\n%b\tA short textual representation of a month, three letters (Jan..Dec)\r\n%M\tA full textual representation of a month, such as January or March (January..December)\r\n\r\n%y\tA two digit representation of a year (93..03)\r\n%Y\tA full numeric representation of a year, 4 digits (1993..03)\r\n*/\r\n\r\nscheduler.config={\r\n\tdefault_date: \"%j %M %Y\",\r\n\tmonth_date: \"%F %Y\",\r\n\tload_date: \"%Y-%m-%d\",\r\n\tweek_date: \"%l\",\r\n\tday_date: \"%D %j\",\r\n\thour_date: \"%H:%i\",\r\n\tmonth_day: \"%d\",\r\n\t//xml_date: \"%m/%d/%Y %H:%i\",\r\n\tdate_format: \"%Y-%m-%d %H:%i\",\r\n\tapi_date: \"%d-%m-%Y %H:%i\",\r\n\tparse_exact_format: false,\r\n\tpreserve_length:true,\r\n\ttime_step: 5,\r\n\tdisplayed_event_color: \"#ff4a4a\",\r\n\tdisplayed_event_text_color: \"#ffef80\",\r\n\twide_form: 0,\r\n\tday_column_padding: 8,\r\n\tuse_select_menu_space: true,\r\n\tfix_tab_position: true,\r\n\tstart_on_monday: true,\r\n\tfirst_hour: 0,\r\n\tlast_hour: 24,\r\n\treadonly: false,\r\n\tdrag_resize: true,\r\n\tdrag_move: true,\r\n\tdrag_create: true,\r\n\tdrag_event_body: true,\r\n\tdblclick_create: true,\r\n\tdetails_on_dblclick: true,\r\n\tedit_on_create: true,\r\n\tdetails_on_create: true,\r\n\theader: null,\r\n\thour_size_px: 44,\r\n\tresize_month_events:false,\r\n\tresize_month_timed:false,\r\n\tresponsive_lightbox: false,\r\n\tseparate_short_events: true,\r\n\trtl:false,\r\n\r\n\tcascade_event_display: false,\r\n\tcascade_event_count: 4,\r\n\tcascade_event_margin: 30,\r\n\r\n\tmulti_day:true,\r\n\tmulti_day_height_limit: 200,\r\n\r\n\tdrag_lightbox: true,\r\n\tpreserve_scroll: true,\r\n\tselect: true,\r\n\tundo_deleted: true,\r\n\tserver_utc: false,\r\n\ttouch:true,\r\n\ttouch_tip:true,\r\n\ttouch_drag:500,\r\n\ttouch_swipe_dates: false,\r\n\tquick_info_detached:true,\r\n\r\n\tpositive_closing: false,\r\n\t//header_datepicker: true,\r\n\tdrag_highlight: true,\r\n\tlimit_drag_out: false,\r\n\ticons_edit: [\"icon_save\", \"icon_cancel\"],\r\n\ticons_select: [\"icon_details\", \"icon_edit\", \"icon_delete\"],\r\n\tbuttons_left: [\"dhx_save_btn\", \"dhx_cancel_btn\"],\r\n\tbuttons_right: [\"dhx_delete_btn\"],\r\n\tlightbox: {\r\n\t\tsections: [\r\n\t\t\t{name: \"description\", map_to: \"text\", type: \"textarea\", focus: true},\r\n\t\t\t{name: \"time\", height: 72, type: \"time\", map_to: \"auto\"}\r\n\t\t]\r\n\t},\r\n\thighlight_displayed_event: true,\r\n\tleft_border: false,\r\n\r\n\tajax_error: \"alert\",//\"ignore\"|\"console\"\r\n\tdelay_render: 0,\r\n\ttimeline_swap_resize: true,\r\n\twai_aria_attributes: true,\r\n\twai_aria_application_role: true,\r\n\r\n\tcsp: \"auto\",\r\n\tevent_attribute: \"data-event-id\",\r\n\tshow_errors: true\r\n};\r\n\r\nscheduler.config.buttons_left.$initial = scheduler.config.buttons_left.join();\r\nscheduler.config.buttons_right.$initial = scheduler.config.buttons_right.join();\r\n\r\nscheduler._helpers = {\r\n\tparseDate: function parseDate(date) {\r\n\t\tvar parse = scheduler.templates.xml_date || scheduler.templates.parse_date;\r\n\t\treturn parse(date);\r\n\t},\r\n\tformatDate: function formatDate(date) {\r\n\t\tvar format = scheduler.templates.xml_format || scheduler.templates.format_date;\r\n\t\treturn format(date);\r\n\t}\r\n};\r\n\r\nscheduler.templates={};\r\nscheduler.init_templates=function(){\r\n\r\n\r\n\r\n\tvar d=scheduler.date.date_to_str;\r\n\tvar c=scheduler.config;\r\n\tvar f = function(a,b){\r\n\t\tfor (var c in b)\r\n\t\t\tif (!a[c]) a[c]=b[c];\r\n\t};\r\n\tf(scheduler.templates,{\r\n\t\tday_date:d(c.default_date),\r\n\t\tmonth_date:d(c.month_date),\r\n\t\tweek_date:function(d1,d2){\r\n\t\t\tif(c.rtl) {\r\n\t\t\t\treturn scheduler.templates.day_date(scheduler.date.add(d2,-1,\"day\"))+\" – \"+scheduler.templates.day_date(d1);\r\n\t\t\t} \r\n\t\t\treturn scheduler.templates.day_date(d1)+\" – \"+scheduler.templates.day_date(scheduler.date.add(d2,-1,\"day\"));\r\n\t\t},\r\n\t\tday_scale_date:d(c.default_date),\r\n\t\ttime_slot_text: function(date){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\ttime_slot_class: function(date){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\r\n\t\tmonth_scale_date:d(c.week_date),\r\n\t\tweek_scale_date:d(c.day_date),\r\n\t\thour_scale:d(c.hour_date),\r\n\t\ttime_picker:d(c.hour_date),\r\n\t\tevent_date:d(c.hour_date),\r\n\t\tmonth_day:d(c.month_day),\r\n\r\n\t\tload_format: d(c.load_date),\r\n\t//\txml_date:scheduler.date.str_to_date(c.xml_date,c.server_utc),\r\n\t//\txml_format:d(c.date_format,c.server_utc),\r\n\t\tformat_date: d(c.date_format, c.server_utc),\r\n\t\tparse_date:scheduler.date.str_to_date(c.date_format,c.server_utc),\r\n\t\tapi_date:scheduler.date.str_to_date(c.api_date, false, false),\r\n\t\tevent_header:function(start,end,ev){\r\n\r\n\t\t\tif(ev._mode === \"small\" || ev._mode === \"smallest\"){\r\n\t\t\t\treturn scheduler.templates.event_date(start);\r\n\t\t\t}else{\r\n\t\t\t\treturn scheduler.templates.event_date(start)+\" - \"+scheduler.templates.event_date(end);\r\n\t\t\t}\r\n\t\t},\r\n\t\tevent_text:function(start,end,ev){\r\n\t\t\treturn ev.text;\r\n\t\t},\r\n\t\tevent_class:function(start,end,ev){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tmonth_date_class:function(d){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tweek_date_class:function(d){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tevent_bar_date:function(start,end,ev) {\r\n\t\t\treturn scheduler.templates.event_date(start);\r\n\t\t},\r\n\t\tevent_bar_text:function(start,end,ev){\r\n\t\t\treturn ev.text;\r\n\t\t},\r\n\t\tmonth_events_link : function(date, count){\r\n\t\t\treturn \"View more(\"+count+\" events)\";\r\n\t\t},\r\n\t\tdrag_marker_class : function(start, end, event){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tdrag_marker_content : function(start, end, event){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\t/* Could be redifined */\r\n\t\ttooltip_date_format: scheduler.date.date_to_str(\"%Y-%m-%d %H:%i\"),\r\n\t\ttooltip_text: function(start, end, event) {\r\n\t\t\treturn \"Event: \" + event.text + \"
Start date: \" + scheduler.templates.tooltip_date_format(start) + \"
End date: \" + scheduler.templates.tooltip_date_format(end);\r\n\t\t},\r\n\r\n\t\tcalendar_month: d(\"%F %Y\"),\r\n\t\tcalendar_scale_date: d(\"%D\"),\r\n\t\tcalendar_date: d(\"%d\"),\r\n\t\tcalendar_time: d(\"%d-%m-%Y\")\r\n\r\n\t});\r\n\tthis.callEvent(\"onTemplatesReady\",[]);\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler._events = {};\r\nscheduler.clearAll = function() {\r\n\tthis._events = {};\r\n\tthis._loaded = {};\r\n\r\n\tthis._edit_id = null;\r\n\tthis._select_id = null;\r\n\tthis._drag_id = null;\r\n\tthis._drag_mode = null;\r\n\tthis._drag_pos = null;\r\n\tthis._new_event = null;\r\n\r\n\tthis.clear_view();\r\n\tthis.callEvent(\"onClearAll\", []);\r\n};\r\nscheduler.addEvent = function(start_date, end_date, text, id, extra_data) {\r\n\tif (!arguments.length)\r\n\t\treturn this.addEventNow();\r\n\tvar ev = start_date;\r\n\tif (arguments.length != 1) {\r\n\t\tev = extra_data || {};\r\n\t\tev.start_date = start_date;\r\n\t\tev.end_date = end_date;\r\n\t\tev.text = text;\r\n\t\tev.id = id;\r\n\t}\r\n\tev.id = ev.id || scheduler.uid();\r\n\tev.text = ev.text || \"\";\r\n\r\n\tif (typeof ev.start_date == \"string\") ev.start_date = this.templates.api_date(ev.start_date);\r\n\tif (typeof ev.end_date == \"string\") ev.end_date = this.templates.api_date(ev.end_date);\r\n\tvar d = (this.config.event_duration || this.config.time_step) * 60000;\r\n\tif (ev.start_date.valueOf() == ev.end_date.valueOf())\r\n\t\tev.end_date.setTime(ev.end_date.valueOf() + d);\r\n\r\n\tev.start_date.setMilliseconds(0);\r\n\tev.end_date.setMilliseconds(0);\r\n\r\n\tev._timed = this.isOneDayEvent(ev);\r\n\r\n\tvar is_new = !this._events[ev.id];\r\n\tthis._events[ev.id] = ev;\r\n\tthis.event_updated(ev);\r\n\tif (!this._loading)\r\n\t\tthis.callEvent(is_new ? \"onEventAdded\" : \"onEventChanged\", [ev.id, ev]);\r\n\treturn ev.id;\r\n};\r\nscheduler.deleteEvent = function(id, silent) {\r\n\tvar ev = this._events[id];\r\n\tif (!silent && (!this.callEvent(\"onBeforeEventDelete\", [id, ev]) || !this.callEvent(\"onConfirmedBeforeEventDelete\", [id, ev])))\r\n\t\treturn;\r\n\tif (ev) {\r\n\t\tif(scheduler.getState().select_id == id){\r\n\t\t\tscheduler.unselect();\r\n\t\t}\r\n\t\tdelete this._events[id];\r\n\t\tthis.event_updated(ev);\r\n\r\n\t\tif(this._drag_id == ev.id){\r\n\t\t\tthis._drag_id = null;\r\n\t\t\tthis._drag_mode=null;\r\n\t\t\tthis._drag_pos=null;\r\n\t\t}\r\n\t}\r\n\r\n\tthis.callEvent(\"onEventDeleted\", [id, ev]);\r\n};\r\nscheduler.getEvent = function(id) {\r\n\treturn this._events[id];\r\n};\r\nscheduler.setEvent = function(id, hash) {\r\n\tif(!hash.id)\r\n\t\thash.id = id;\r\n\r\n\tthis._events[id] = hash;\r\n};\r\nscheduler.for_rendered = function(id, method) {\r\n\tfor (var i = this._rendered.length - 1; i >= 0; i--)\r\n\t\tif (this._rendered[i].getAttribute(this.config.event_attribute) == id)\r\n\t\t\tmethod(this._rendered[i], i);\r\n};\r\nscheduler.changeEventId = function(id, new_id) {\r\n\tif (id == new_id) return;\r\n\tvar ev = this._events[id];\r\n\tif (ev) {\r\n\t\tev.id = new_id;\r\n\t\tthis._events[new_id] = ev;\r\n\t\tdelete this._events[id];\r\n\t}\r\n\tthis.for_rendered(id, function(r) {\r\n\t\tr.setAttribute(\"event_id\", new_id); // for backward compatibility\r\n\t\tr.setAttribute(scheduler.config.event_attribute, new_id);\r\n\t});\r\n\tif (this._select_id == id) this._select_id = new_id;\r\n\tif (this._edit_id == id) this._edit_id = new_id;\r\n\t//if (this._drag_id==id) this._drag_id=new_id;\r\n\tthis.callEvent(\"onEventIdChange\", [id, new_id]);\r\n};\r\n\r\n(function() {\r\n\tvar attrs = [\"text\", \"Text\", \"start_date\", \"StartDate\", \"end_date\", \"EndDate\"];\r\n\tvar create_getter = function(name) {\r\n\t\treturn function(id) { return (scheduler.getEvent(id))[name]; };\r\n\t};\r\n\tvar create_setter = function(name) {\r\n\t\treturn function(id, value) {\r\n\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\tev[name] = value;\r\n\t\t\tev._changed = true;\r\n\t\t\tev._timed = this.isOneDayEvent(ev);\r\n\t\t\tscheduler.event_updated(ev, true);\r\n\t\t};\r\n\t};\r\n\tfor (var i = 0; i < attrs.length; i += 2) {\r\n\t\tscheduler[\"getEvent\" + attrs[i + 1]] = create_getter(attrs[i]);\r\n\t\tscheduler[\"setEvent\" + attrs[i + 1]] = create_setter(attrs[i]);\r\n\t}\r\n})();\r\n\r\nscheduler.event_updated = function(ev, force) {\r\n\tif (this.is_visible_events(ev))\r\n\t\tthis.render_view_data();\r\n\telse\r\n\t\tthis.clear_event(ev.id);\r\n};\r\nscheduler.is_visible_events = function(ev) {\r\n\tif(!this._min_date || !this._max_date){\r\n\t\treturn false;\r\n\t}\r\n\r\n\t//if in displayed dates\r\n\tvar in_visible_range = (ev.start_date.valueOf() < this._max_date.valueOf() && this._min_date.valueOf() < ev.end_date.valueOf());\r\n\r\n\tif(in_visible_range){\r\n\r\n\t\t//end dates are not between last/first hours\r\n\t\tvar evFirstHour = ev.start_date.getHours(),\r\n\t\t\tevLastHour = ev.end_date.getHours() + (ev.end_date.getMinutes()/60),\r\n\t\t\tlastHour = this.config.last_hour,\r\n\t\t\tfirstHour = this.config.first_hour;\r\n\r\n\t\tvar end_dates_visible = (this._table_view || !((evLastHour > lastHour || evLastHour <= firstHour) && (evFirstHour >= lastHour || evFirstHour < firstHour)));\r\n\r\n\t\tif(end_dates_visible){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\r\n\t\t\t//event is bigger than area hidden between last/first hours\r\n\t\t\tvar event_duration = (ev.end_date.valueOf() - ev.start_date.valueOf()) / (1000*60*60),//hours\r\n\t\t\t\thidden_duration = 24 - (this.config.last_hour - this.config.first_hour);\r\n\r\n\t\t\treturn !!((event_duration > hidden_duration) || (evFirstHour < lastHour && evLastHour > firstHour));\r\n\r\n\t\t}\r\n\t}else{\r\n\t\treturn false;\r\n\t}\r\n};\r\nscheduler.isOneDayEvent = function(ev) {\r\n\t// decrease by one ms so events that ends on midnight on the next day were still considered one day events\r\n\t// e.g. (09-02-2018 19:00 - 10-02-2018 00:00)\r\n\t// events >= 24h long are considered multiday\r\n\tvar checkEndDate = new Date(ev.end_date.valueOf() - 1);\r\n\treturn (\r\n\t\tev.start_date.getFullYear() === checkEndDate.getFullYear() &&\r\n\t\tev.start_date.getMonth() === checkEndDate.getMonth() &&\r\n\t\tev.start_date.getDate() === checkEndDate.getDate()\r\n\t) && ((ev.end_date.valueOf() - ev.start_date.valueOf()) < (1000 * 60 * 60 * 24));\r\n};\r\n\r\nscheduler.get_visible_events = function(only_timed) {\r\n\t//not the best strategy for sure\r\n\tvar stack = [];\r\n\r\n\tfor (var id in this._events)\r\n\t\tif (this.is_visible_events(this._events[id]))\r\n\t\t\tif (!only_timed || this._events[id]._timed)\r\n\t\t\t\tif (this.filter_event(id, this._events[id]))\r\n\t\t\t\t\tstack.push(this._events[id]);\r\n\r\n\treturn stack;\r\n};\r\nscheduler.filter_event = function(id, ev) {\r\n\tvar filter = this[\"filter_\" + this._mode];\r\n\treturn (filter) ? filter(id, ev) : true;\r\n};\r\nscheduler._is_main_area_event = function(ev){\r\n\treturn !!ev._timed;\r\n};\r\nscheduler.render_view_data = function(evs, hold) {\r\n\tvar full = false;\r\n\tif (!evs) {\r\n\t\tfull = true;\r\n\t\tif (this._not_render) {\r\n\t\t\tthis._render_wait = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._render_wait = false;\r\n\r\n\t\tthis.clear_view();\r\n\t\tevs = this.get_visible_events(!(this._table_view || this.config.multi_day));\r\n\t}\r\n\tfor(var i= 0, len = evs.length; i < len; i++){\r\n\t\tthis._recalculate_timed(evs[i]);\r\n\t}\r\n\r\n\tif (this.config.multi_day && !this._table_view) {\r\n\r\n\t\tvar tvs = [];\r\n\t\tvar tvd = [];\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tif (this._is_main_area_event(evs[i]))\r\n\t\t\t\ttvs.push(evs[i]);\r\n\t\t\telse\r\n\t\t\t\ttvd.push(evs[i]);\r\n\t\t}\r\n\r\n\t\tif(!this._els['dhx_multi_day']){\r\n\t\t\tvar message = scheduler._commonErrorMessages.unknownView(this._mode);\r\n\t\t\tthrow new Error(message);\r\n\t\t}\r\n\r\n\t\t// multiday events\r\n\t\tthis._rendered_location = this._els['dhx_multi_day'][0];\r\n\t\tthis._table_view = true;\r\n\t\tthis.render_data(tvd, hold);\r\n\t\tthis._table_view = false;\r\n\r\n\t\t// normal events\r\n\t\tthis._rendered_location = this._els['dhx_cal_data'][0];\r\n\t\tthis._table_view = false;\r\n\t\tthis.render_data(tvs, hold);\r\n\r\n\t} else {\r\n\t\tvar buffer = document.createDocumentFragment();\r\n\t\tvar renderedLocation = this._els['dhx_cal_data'][0];\r\n\t\tthis._rendered_location = buffer;\r\n\t\tthis.render_data(evs, hold);\r\n\t\trenderedLocation.appendChild(buffer);\r\n\t\tthis._rendered_location = renderedLocation;\r\n\r\n\t}\r\n\r\n\tif(full){\r\n\t\tthis.callEvent(\"onDataRender\", []);\r\n\t}\r\n};\r\n\r\n\r\nscheduler._view_month_day = function(e){\r\n\tvar date = scheduler.getActionData(e).date;\r\n\tif(!scheduler.callEvent(\"onViewMoreClick\", [date]))\r\n\t\treturn;\r\n\tscheduler.setCurrentView(date, \"day\");\r\n};\r\n\r\nscheduler._render_month_link = function(ev){\r\n\tvar parent = this._rendered_location;\r\n\tvar toRender = this._lame_clone(ev);\r\n\r\n\t//render links in each cell of multiday events\r\n\tfor(var d = ev._sday; d < ev._eday; d++){\r\n\r\n\t\ttoRender._sday = d;\r\n\t\ttoRender._eday = d+1;\r\n\r\n\t\tvar date = scheduler.date;\r\n\t\tvar curr = scheduler._min_date;\r\n\t\tcurr = date.add(curr, toRender._sweek, \"week\");\r\n\t\tcurr = date.add(curr, toRender._sday, \"day\");\r\n\t\tvar count = scheduler.getEvents(curr, date.add(curr, 1, \"day\")).length;\r\n\r\n\t\tvar pos = this._get_event_bar_pos(toRender);\r\n\t\tvar widt = (pos.x2 - pos.x);\r\n\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tscheduler.event(el, \"click\", function(e){scheduler._view_month_day(e);});\r\n\t\tel.className = \"dhx_month_link\";\r\n\t\tel.style.top = pos.y + \"px\";\r\n\t\tel.style.left = pos.x + \"px\";\r\n\t\tel.style.width = widt + \"px\";\r\n\t\tel.innerHTML = scheduler.templates.month_events_link(curr, count);\r\n\t\tthis._rendered.push(el);\r\n\r\n\t\tparent.appendChild(el);\r\n\t}\r\n};\r\n\r\nscheduler._recalculate_timed = function(id){\r\n\tif(!id) return;\r\n\tvar ev;\r\n\tif(typeof(id) != \"object\")\r\n\t\tev = this._events[id];\r\n\telse\r\n\t\tev = id;\r\n\tif(!ev) return;\r\n\tev._timed = scheduler.isOneDayEvent(ev);\r\n};\r\nscheduler.attachEvent(\"onEventChanged\", scheduler._recalculate_timed);\r\nscheduler.attachEvent(\"onEventAdded\", scheduler._recalculate_timed);\r\n\r\nscheduler.render_data = function(evs, hold) {\r\n\tevs = this._pre_render_events(evs, hold);\r\n\tvar containers = {};\r\n\tfor (var i = 0; i < evs.length; i++)\r\n\t\tif (this._table_view){\r\n\t\t\tif(scheduler._mode != 'month'){\r\n\t\t\t\tthis.render_event_bar(evs[i]);//may be multiday section on other views\r\n\t\t\t}else{\r\n\r\n\t\t\t\tvar max_evs = scheduler.config.max_month_events;\r\n\t\t\t\tif(max_evs !== max_evs*1 || evs[i]._sorder < max_evs){\r\n\t\t\t\t\t//of max number events per month cell is set and event can be rendered\r\n\t\t\t\t\tthis.render_event_bar(evs[i]);\r\n\t\t\t\t}else if(max_evs !== undefined && evs[i]._sorder == max_evs){\r\n\t\t\t\t\t//render 'view more' links\r\n\t\t\t\t\tscheduler._render_month_link(evs[i]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//do not render events with ordinal number > maximum events per cell\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t}else{\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tvar parent = scheduler.locate_holder(ev._sday);\r\n\t\t\tif (!parent) continue; //attempt to render non-visible event\r\n\r\n\t\t\tif(!containers[ev._sday]){\r\n\t\t\t\tcontainers[ev._sday] = {\r\n\t\t\t\t\treal: parent,\r\n\t\t\t\t\tbuffer: document.createDocumentFragment(),\r\n\t\t\t\t\twidth: parent.clientWidth\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\tvar container = containers[ev._sday];\r\n\t\t\tthis.render_event(ev, container.buffer, container.width);\r\n\t\t}\r\n\r\n\t\tfor(var i in containers){\r\n\t\t\tvar container = containers[i];\r\n\t\t\tif(container.real && container.buffer){\r\n\t\t\t\tcontainer.real.appendChild(container.buffer);\r\n\t\t\t}\r\n\t\t}\r\n};\r\n\r\nscheduler._get_first_visible_cell = function(cells) {\r\n\tfor (var i = 0; i < cells.length; i++) {\r\n\t\tif ((cells[i].className || \"\").indexOf(\"dhx_scale_ignore\") == -1) {\r\n\t\t\treturn cells[i];\r\n\t\t}\r\n\t}\r\n\t// if no visible cell found, return cells[0] to be more tolerant, since it's the original logic\r\n\treturn cells[0];\r\n};\r\n\r\nscheduler._pre_render_events = function(evs, hold) {\r\n\tvar hb = this.xy.bar_height;\r\n\tvar h_old = this._colsS.heights;\r\n\tvar h = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0];\r\n\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\r\n\tif (!this._table_view) {\r\n\t\tevs = this._pre_render_events_line(evs, hold); //ignore long events for now\r\n\t}\r\n\telse {\r\n\t\tevs = this._pre_render_events_table(evs, hold);\r\n\t}\r\n\tif (this._table_view) {\r\n\t\tif (hold)\r\n\t\t\tthis._colsS.heights = h_old;\r\n\t\telse {\r\n\t\t\tvar monthRows = data.querySelectorAll(\".dhx_cal_month_row\");\r\n\t\t\tif (monthRows.length) {\r\n\t\t\t\tfor (var i = 0; i < monthRows.length; i++) {\r\n\t\t\t\t\th[i]++;\r\n\t\t\t\t\tvar cells = monthRows[i].querySelectorAll(\".dhx_cal_month_cell\");\r\n\t\t\t\t\tvar cellHeight = this._colsS.height - this.xy.month_head_height;\r\n\t\t\t\t\tif ((h[i]) * hb > cellHeight) { // 22 - height of cell's header\r\n\t\t\t\t\t\t//we have overflow, update heights\r\n\r\n\t\t\t\t\t\tvar cHeight = cellHeight;\r\n\t\t\t\t\t\tif(this.config.max_month_events*1 !== this.config.max_month_events || h[i] <= this.config.max_month_events){\r\n\t\t\t\t\t\t\tcHeight = h[i] * hb;\r\n\t\t\t\t\t\t}else if( (this.config.max_month_events + 1) * hb > cellHeight){\r\n\t\t\t\t\t\t\tcHeight = (this.config.max_month_events + 1) * hb;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tmonthRows[i].style.height = (cHeight + this.xy.month_head_height) + \"px\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\th[i] = (h[i - 1] || 0) + scheduler._get_first_visible_cell(cells).offsetHeight;\r\n\t\t\t\t}\r\n\t\t\t\th.unshift(0);\r\n\t\t\t\tconst dataArea = this.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tif (dataArea.offsetHeight < dataArea.scrollHeight && !scheduler._colsS.scroll_fix && scheduler.xy.scroll_width) {\r\n\r\n\t\t\t\t\tvar scale_settings = scheduler._colsS,\r\n\t\t\t\t\t\tsum_width = scale_settings[scale_settings.col_length],\r\n\t\t\t\t\t\trow_heights = scale_settings.heights.slice();\r\n\r\n\t\t\t\t\tsum_width -= (scheduler.xy.scroll_width || 0);\r\n\t\t\t\t\tthis._calc_scale_sizes(sum_width, this._min_date, this._max_date);\r\n\t\t\t\t\tscheduler._colsS.heights = row_heights;\r\n\r\n\t\t\t\t\tthis.set_xy(this._els[\"dhx_cal_header\"][0], sum_width/*, this.xy.scale_height*/);\r\n\t\t\t\t\tscheduler._render_scales(this._els[\"dhx_cal_header\"][0]);\r\n\t\t\t\t\tscheduler._render_month_scale(this._els[\"dhx_cal_data\"][0], this._get_timeunit_start(), this._min_date);\r\n\r\n\t\t\t\t\tscale_settings.scroll_fix = true;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (!evs.length && this._els[\"dhx_multi_day\"][0].style.visibility == \"visible\")\r\n\t\t\t\t\th[0] = -1;\r\n\t\t\t\tif (evs.length || h[0] == -1) {\r\n\t\t\t\t\t//shift days to have space for multiday events\r\n\t\t\t\t\t//var childs = evl.parentNode.childNodes;\r\n\r\n\t\t\t\t\t// +1 so multiday events would have 2px from top and 2px from bottom by default\r\n\t\t\t\t\tvar full_multi_day_height = (h[0] + 1) * hb + 4;\r\n\r\n\t\t\t\t\tvar used_multi_day_height = full_multi_day_height;\r\n\t\t\t\t\tvar used_multi_day_height_css = full_multi_day_height + \"px\";\r\n\t\t\t\t\tif (this.config.multi_day_height_limit) {\r\n\t\t\t\t\t\tused_multi_day_height = Math.min(full_multi_day_height, this.config.multi_day_height_limit) ;\r\n\t\t\t\t\t\tused_multi_day_height_css = used_multi_day_height + \"px\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar multi_day_section = this._els[\"dhx_multi_day\"][0];\r\n\t\t\t\t\tmulti_day_section.style.height = used_multi_day_height_css;\r\n\t\t\t\t\tmulti_day_section.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\tmulti_day_section.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\r\n\t\t\t\t\t// icon\r\n\t\t\t\t\tvar multi_day_icon = this._els[\"dhx_multi_day\"][1];\r\n\t\t\t\t\tmulti_day_icon.style.height = used_multi_day_height_css;\r\n\t\t\t\t\tmulti_day_icon.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\tmulti_day_icon.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\t\t\t\t\tmulti_day_icon.className = h[0] ? \"dhx_multi_day_icon\" : \"dhx_multi_day_icon_small\";\r\n\t\t\t\t\tthis._dy_shift = (h[0] + 1) * hb;\r\n\t\t\t\t\tif(this.config.multi_day_height_limit){\r\n\t\t\t\t\t\tthis._dy_shift = Math.min(this.config.multi_day_height_limit, this._dy_shift);\r\n\t\t\t\t\t}\r\n\t\t\t\t\th[0] = 0;\r\n\r\n\t\t\t\t\tif (used_multi_day_height != full_multi_day_height) {\r\n\r\n\t\t\t\t\t\tmulti_day_section.style.overflowY = \"auto\";\r\n\t\t\t\t\t//\tmulti_day_section.style.width = (parseInt(this._els[\"dhx_cal_navline\"][0].style.width)) + \"px\";\r\n\r\n\t\t\t\t\t\tmulti_day_icon.style.position = \"fixed\";\r\n\t\t\t\t\t\tmulti_day_icon.style.top = \"\";\r\n\t\t\t\t\t\tmulti_day_icon.style.left = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn evs;\r\n};\r\nscheduler._get_event_sday = function(ev) {\r\n\t// get day in current view\r\n\t// use rounding for 23 or 25 hour days on DST\r\n\tvar datePart = this.date.day_start(new Date(ev.start_date));\r\n\treturn Math.round((datePart.valueOf() - this._min_date.valueOf()) / (24 * 60 * 60 * 1000));\r\n};\r\nscheduler._get_event_mapped_end_date = function(ev) {\r\n\tvar end_date = ev.end_date;\r\n\tif (this.config.separate_short_events) {\r\n\t\tvar ev_duration = (ev.end_date - ev.start_date) / 60000; // minutes\r\n\t\tif (ev_duration < this._min_mapped_duration) {\r\n\t\t\tend_date = this.date.add(end_date, this._min_mapped_duration - ev_duration, \"minute\");\r\n\t\t}\r\n\t}\r\n\treturn end_date;\r\n};\r\nscheduler._pre_render_events_line = function(evs, hold){\r\n\tevs.sort(function(a, b) {\r\n\t\tif (a.start_date.valueOf() == b.start_date.valueOf())\r\n\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\treturn a.start_date > b.start_date ? 1 : -1;\r\n\t});\r\n\tvar days = []; //events by weeks\r\n\tvar evs_originals = [];\r\n\r\n\tthis._min_mapped_duration = Math.floor(this.xy.min_event_height * 60 / this.config.hour_size_px); // values could change along the way\r\n\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tvar ev = evs[i];\r\n\r\n\t\t//check date overflow\r\n\t\tvar sd = ev.start_date;\r\n\t\tvar ed = ev.end_date;\r\n\t\t//check scale overflow\r\n\t\tvar sh = sd.getHours();\r\n\t\tvar eh = ed.getHours();\r\n\t\tev._sday = this._get_event_sday(ev); // sday based on event start_date\r\n\t\tif (this._ignores[ev._sday]){\r\n\t\t\t//ignore event\r\n\t\t\tevs.splice(i,1);\r\n\t\t\ti--;\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tif (!days[ev._sday]) days[ev._sday] = [];\r\n\r\n\t\tif (!hold) {\r\n\t\t\tev._inner = false;\r\n\r\n\t\t\tvar stack = days[ev._sday];\r\n\r\n\t\t\twhile (stack.length) {\r\n\t\t\t\tvar t_ev = stack[stack.length - 1];\r\n\t\t\t\tvar t_end_date = this._get_event_mapped_end_date(t_ev);\r\n\t\t\t\tif (t_end_date.valueOf() <= ev.start_date.valueOf()) {\r\n\t\t\t\t\tstack.splice(stack.length - 1, 1);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar slot_index = stack.length;\r\n\t\t\tvar sorderSet = false;\r\n\t\t\tfor (var j = 0; j < stack.length; j++) {\r\n\t\t\t\tvar t_ev = stack[j];\r\n\t\t\t\tvar t_end_date = this._get_event_mapped_end_date(t_ev);\r\n\t\t\t\tif (t_end_date.valueOf() <= ev.start_date.valueOf()) {\r\n\t\t\t\t\tsorderSet = true;\r\n\t\t\t\t\tev._sorder = t_ev._sorder;\r\n\t\t\t\t\tslot_index = j;\r\n\t\t\t\t\tev._inner = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (stack.length)\r\n\t\t\t\tstack[stack.length - 1]._inner = true;\r\n\r\n\t\t\tif (!sorderSet) {\r\n\t\t\t\tif (stack.length) {\r\n\t\t\t\t\tif (stack.length <= stack[stack.length - 1]._sorder) {\r\n\t\t\t\t\t\tif (!stack[stack.length - 1]._sorder)\r\n\t\t\t\t\t\t\tev._sorder = 0;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tfor (j = 0; j < stack.length; j++) {\r\n\t\t\t\t\t\t\t\tvar _is_sorder = false;\r\n\t\t\t\t\t\t\t\tfor (var k = 0; k < stack.length; k++) {\r\n\t\t\t\t\t\t\t\t\tif (stack[k]._sorder == j) {\r\n\t\t\t\t\t\t\t\t\t\t_is_sorder = true;\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (!_is_sorder) {\r\n\t\t\t\t\t\t\t\t\tev._sorder = j;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\tev._inner = true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvar _max_sorder = stack[0]._sorder;\r\n\t\t\t\t\t\tfor (j = 1; j < stack.length; j++) {\r\n\t\t\t\t\t\t\tif (stack[j]._sorder > _max_sorder)\r\n\t\t\t\t\t\t\t\t_max_sorder = stack[j]._sorder;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tev._sorder = _max_sorder + 1;\r\n\t\t\t\t\t\tev._inner = false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else\r\n\t\t\t\t\tev._sorder = 0;\r\n\t\t\t}\r\n\r\n\t\t\tstack.splice(slot_index, slot_index == stack.length ? 0 : 1, ev);\r\n\r\n\t\t\tif (stack.length > (stack.max_count || 0)) {\r\n\t\t\t\tstack.max_count = stack.length;\r\n\t\t\t\tev._count = stack.length;\r\n\t\t\t} else {\r\n\t\t\t\tev._count = (ev._count) ? ev._count : 1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (sh < this.config.first_hour || eh >= this.config.last_hour) {\r\n\t\t\t// Need to create copy of event as we will be changing it's start/end date\r\n\t\t\t// e.g. first_hour = 11 and event.start_date hours = 9. Need to preserve that info\r\n\t\t\tevs_originals.push(ev);\r\n\t\t\tevs[i] = ev = this._copy_event(ev);\r\n\r\n\t\t\tif (sh < this.config.first_hour) {\r\n\t\t\t\tev.start_date.setHours(this.config.first_hour);\r\n\t\t\t\tev.start_date.setMinutes(0);\r\n\t\t\t}\r\n\t\t\tif (eh >= this.config.last_hour) {\r\n\t\t\t\tev.end_date.setMinutes(0);\r\n\t\t\t\tev.end_date.setHours(this.config.last_hour);\r\n\t\t\t}\r\n\r\n\t\t\tif (ev.start_date > ev.end_date || sh == this.config.last_hour) {\r\n\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (!hold) {\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tevs[i]._count = days[evs[i]._sday].max_count;\r\n\t\t}\r\n\t\tfor (var i = 0; i < evs_originals.length; i++)\r\n\t\t\tevs_originals[i]._count = days[evs_originals[i]._sday].max_count;\r\n\t}\r\n\r\n\treturn evs;\r\n};\r\nscheduler._time_order = function(evs) {\r\n\tevs.sort(function(a, b) {\r\n\t\tif (a.start_date.valueOf() == b.start_date.valueOf()) {\r\n\t\t\tif (a._timed && !b._timed) return 1;\r\n\t\t\tif (!a._timed && b._timed) return -1;\r\n\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\t}\r\n\t\treturn a.start_date > b.start_date ? 1 : -1;\r\n\t});\r\n};\r\n\r\nscheduler._is_any_multiday_cell_visible = function(from, to, event){\r\n\tvar cols = this._cols.length;\r\n\tvar isAnyCellVisible = false;\r\n\tvar checkDate = from;\r\n\tvar noCells = true;\r\n\tvar lastDayEnd = new Date(to);\r\n\tif(scheduler.date.day_start(new Date(to)).valueOf() != to.valueOf()){\r\n\t\tlastDayEnd = scheduler.date.day_start(lastDayEnd);\r\n\t\tlastDayEnd = scheduler.date.add(lastDayEnd, 1, \"day\");\r\n\t}\r\n\twhile(checkDate < lastDayEnd){\r\n\t\tnoCells = false;\r\n\t\tvar cellIndex = this.locate_holder_day(checkDate, false, event);\r\n\t\tvar weekCellIndex = cellIndex % cols;\r\n\t\tif(!this._ignores[weekCellIndex]){\r\n\t\t\tisAnyCellVisible = true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcheckDate = scheduler.date.add(checkDate, 1, \"day\");\r\n\t}\r\n\treturn noCells || isAnyCellVisible;\r\n};\r\n\r\nscheduler._pre_render_events_table = function(evs, hold) { // max - max height of week slot\r\n\tthis._time_order(evs);\r\n\tvar out = [];\r\n\tvar weeks = [\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[]\r\n\t]; //events by weeks\r\n\tvar max = this._colsS.heights;\r\n\tvar start_date;\r\n\tvar cols = this._cols.length;\r\n\tvar chunks_info = {};\r\n\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tvar ev = evs[i];\r\n\t\tvar id = ev.id;\r\n\t\tif (!chunks_info[id]) {\r\n\t\t\tchunks_info[id] = {\r\n\t\t\t\tfirst_chunk: true,\r\n\t\t\t\tlast_chunk: true\r\n\t\t\t};\r\n\t\t}\r\n\t\tvar chunk_info = chunks_info[id];\r\n\t\tvar sd = (start_date || ev.start_date);\r\n\t\tvar ed = ev.end_date;\r\n\t\t//trim events which are crossing through current view\r\n\t\tif (sd < this._min_date) {\r\n\t\t\tchunk_info.first_chunk = false;\r\n\t\t\tsd = this._min_date;\r\n\t\t}\r\n\t\tif (ed > this._max_date) {\r\n\t\t\tchunk_info.last_chunk = false;\r\n\t\t\ted = this._max_date;\r\n\t\t}\r\n\r\n\t\tvar locate_s = this.locate_holder_day(sd, false, ev);\r\n\t\tev._sday = locate_s % cols;\r\n\t\t//skip single day events for ignored dates\r\n\t\tif (this._ignores[ev._sday] && ev._timed) continue;\r\n\r\n\t\tvar locate_e = this.locate_holder_day(ed, true, ev) || cols;\r\n\t\tev._eday = (locate_e % cols) || cols; //cols used to fill full week, when event end on monday\r\n\t\tev._length = locate_e - locate_s;\r\n\t\t//3600000 - compensate 1 hour during winter|summer time shift\r\n\t\tev._sweek = Math.floor((this._correct_shift(sd.valueOf(), 1) - this._min_date.valueOf()) / (60 * 60 * 1000 * 24 * cols));\r\n\r\n\t\tvar isAnyCellVisible = scheduler._is_any_multiday_cell_visible(sd, ed, ev);\r\n\r\n\t\tif(!isAnyCellVisible){\r\n\t\t\tstart_date = null;\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\t//current slot\r\n\t\tvar stack = weeks[ev._sweek];\r\n\t\t//check order position\r\n\t\tvar stack_line;\r\n\r\n\t\tfor (stack_line = 0; stack_line < stack.length; stack_line++)\r\n\t\t\tif (stack[stack_line]._eday <= ev._sday)\r\n\t\t\t\tbreak;\r\n\r\n\t\tif (!ev._sorder || !hold) {\r\n\t\t\tev._sorder = stack_line;\r\n\t\t}\r\n\r\n\t\tif (ev._sday + ev._length <= cols) {\r\n\t\t\tstart_date = null;\r\n\t\t\tout.push(ev);\r\n\t\t\tstack[stack_line] = ev;\r\n\t\t\t//get max height of slot\r\n\t\t\tmax[ev._sweek] = stack.length - 1;\r\n\t\t\tev._first_chunk = chunk_info.first_chunk;\r\n\t\t\tev._last_chunk = chunk_info.last_chunk;\r\n\t\t} else { // split long event in chunks\r\n\t\t\tvar copy = this._copy_event(ev);\r\n\t\t\tcopy.id = ev.id;\r\n\t\t\tcopy._length = cols - ev._sday;\r\n\t\t\tcopy._eday = cols;\r\n\t\t\tcopy._sday = ev._sday;\r\n\t\t\tcopy._sweek = ev._sweek;\r\n\t\t\tcopy._sorder = ev._sorder;\r\n\t\t\tcopy.end_date = this.date.add(sd, copy._length, \"day\");\r\n\t\t\tcopy._first_chunk = chunk_info.first_chunk;\r\n\t\t\tif (chunk_info.first_chunk) {\r\n\t\t\t\tchunk_info.first_chunk = false;\r\n\t\t\t}\r\n\r\n\t\t\tout.push(copy);\r\n\t\t\tstack[stack_line] = copy;\r\n\t\t\tstart_date = copy.end_date;\r\n\t\t\t//get max height of slot\r\n\t\t\tmax[ev._sweek] = stack.length - 1;\r\n\t\t\ti--;\r\n\t\t\tcontinue; //repeat same step\r\n\t\t}\r\n\t}\r\n\treturn out;\r\n};\r\nscheduler._copy_dummy = function() {\r\n\tvar a = new Date(this.start_date);\r\n\tvar b = new Date(this.end_date);\r\n\tthis.start_date = a;\r\n\tthis.end_date = b;\r\n};\r\nscheduler._copy_event = function(ev) {\r\n\tthis._copy_dummy.prototype = ev;\r\n\treturn new this._copy_dummy();\r\n\t//return {start_date:ev.start_date, end_date:ev.end_date, text:ev.text, id:ev.id}\r\n};\r\nscheduler._rendered = [];\r\nscheduler.clear_view = function() {\r\n\tfor (var i = 0; i < this._rendered.length; i++) {\r\n\t\tvar obj = this._rendered[i];\r\n\t\tif (obj.parentNode) obj.parentNode.removeChild(obj);\r\n\t}\r\n\tthis._rendered = [];\r\n};\r\nscheduler.updateEvent = function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tthis.clear_event(id);\r\n\r\n\tif (ev && this.is_visible_events(ev) && this.filter_event(id, ev) && (this._table_view || this.config.multi_day || ev._timed)) {\r\n\t\tif (this.config.update_render){\r\n\t\t\tthis.render_view_data();\r\n\t\t}else{\r\n\t\t\tif(this.getState().mode == \"month\" && !this.getState().drag_id && !this.isOneDayEvent(ev)){\r\n\t\t\t\tthis.render_view_data();\r\n\t\t\t}else{\r\n\t\t\t\tthis.render_view_data([ev], true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.clear_event = function(id) {\r\n\tthis.for_rendered(id, function(node, i) {\r\n\t\tif (node.parentNode)\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\tscheduler._rendered.splice(i, 1);\r\n\t});\r\n};\r\nscheduler._y_from_date = function(date){\r\n\tvar sm = date.getHours() * 60 + date.getMinutes();\r\n\treturn ((Math.round((sm * 60 * 1000 - this.config.first_hour * 60 * 60 * 1000) * this.config.hour_size_px / (60 * 60 * 1000))) % (this.config.hour_size_px * 24)); //42px/hour\r\n};\r\nscheduler._calc_event_y = function(ev, min_height){\r\n\tmin_height = min_height || 0;\r\n\tvar sm = ev.start_date.getHours() * 60 + ev.start_date.getMinutes();\r\n\tvar em = (ev.end_date.getHours() * 60 + ev.end_date.getMinutes()) || (scheduler.config.last_hour * 60);\r\n\tvar top = this._y_from_date(ev.start_date);\r\n\r\n\tvar height = Math.max(min_height, (em - sm) * this.config.hour_size_px / 60); //42px/hour\r\n\treturn {\r\n\t\ttop: top,\r\n\t\theight: height\r\n\t};\r\n};\r\nscheduler.render_event = function(ev, buffer, parentWidth) {\r\n\tvar menu = scheduler.xy.menu_width;\r\n\tvar menu_offset = (this.config.use_select_menu_space) ? 0 : menu;\r\n\tif (ev._sday < 0) return; //can occur in case of recurring event during time shift\r\n\r\n\tvar parent = scheduler.locate_holder(ev._sday);\r\n\tif (!parent) return; //attempt to render non-visible event\r\n\r\n\tbuffer = buffer || parent;\r\n\r\n\tvar pos_y = this._calc_event_y(ev, scheduler.xy.min_event_height);\r\n\tvar top = pos_y.top,\r\n\t\theight = pos_y.height;\r\n\r\n\tvar ev_count = ev._count || 1;\r\n\tvar ev_sorder = ev._sorder || 0;\r\n\r\n\tparentWidth = parentWidth || parent.clientWidth;\r\n\tif(this.config.day_column_padding){\r\n\t\tparentWidth -= this.config.day_column_padding;\r\n\t}\r\n\r\n\tvar width = Math.floor((parentWidth - menu_offset) / ev_count);\r\n\tvar left = ev_sorder * width + 1;\r\n\tif (!ev._inner) width = width * (ev_count - ev_sorder);\r\n\tif (this.config.cascade_event_display) {\r\n\t\tvar limit = this.config.cascade_event_count;\r\n\t\tvar margin = this.config.cascade_event_margin;\r\n\t\tleft = ev_sorder % limit * margin;\r\n\t\tvar right = (ev._inner) ? (ev_count - ev_sorder - 1) % limit * margin / 2 : 0;\r\n\t\twidth = Math.floor(parentWidth - menu_offset - left - right);\r\n\t}\r\n\r\n\tif(height < 30){\r\n\t\tev._mode = \"smallest\";\r\n\t}else if(height < 42){\r\n\t\tev._mode = \"small\";\r\n\t}else{\r\n\t\tev._mode = null;\r\n\t}\r\n\r\n\tvar d = this._render_v_bar(ev, menu_offset + left, top, width, height, ev._text_style, scheduler.templates.event_header(ev.start_date, ev.end_date, ev), scheduler.templates.event_text(ev.start_date, ev.end_date, ev));\r\n\t\r\n\tif(ev._mode === \"smallest\"){\r\n\t\td.classList.add(\"dhx_cal_event--xsmall\");\r\n\t}else if (ev._mode === \"small\"){\r\n\t\td.classList.add(\"dhx_cal_event--small\");\r\n\t}\r\n\r\n\tthis._waiAria.eventAttr(ev, d);\r\n\tthis._rendered.push(d);\r\n\tbuffer.appendChild(d);\r\n\r\n\tvar parentPosition = parseInt( this.config.rtl ? parent.style.right : parent.style.left, 10);\r\n\r\n\tleft = left + parentPosition + menu_offset;\r\n\r\n\tif (this._edit_id == ev.id) {\r\n\r\n\t\td.style.zIndex = 1; //fix overlapping issue\r\n\t\twidth = Math.max(width, scheduler.xy.editor_width);\r\n\t\td = document.createElement(\"div\");\r\n\t\td.setAttribute(\"event_id\", ev.id); // for backward compatibility\r\n\t\td.setAttribute(this.config.event_attribute, ev.id);\r\n\r\n\t\tthis._waiAria.eventAttr(ev, d);\r\n\r\n\t\td.className = \"dhx_cal_event dhx_cal_editor\";\r\n\t\tif (this.config.rtl) left++;\r\n\t\tthis.set_xy(d, width, height, left, top);\r\n\r\n\r\n\t\tif(ev.color){\r\n\t\t\td.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tvar tplClass = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\r\n\t\tif(tplClass){\r\n\t\t\td.className += \" \" + tplClass;\r\n\t\t}\r\n\t\tvar d2 = document.createElement(\"div\");\r\n\t\td2.style.cssText += \"overflow:hidden;height:100%\";\r\n\r\n\t\td.appendChild(d2);\r\n\t\tthis._els[\"dhx_cal_data\"][0].appendChild(d);\r\n\t\tthis._rendered.push(d);\r\n\r\n\t\td2.innerHTML = \"\";\r\n\t\tthis._editor = d2.querySelector(\"textarea\");\r\n\t\t\r\n\t\tscheduler.event(this._editor, \"keydown\", function(e) {\r\n\t\t\tif (e.shiftKey) return true;\r\n\t\t\tvar code = e.keyCode;\r\n\t\t\tif (code == scheduler.keys.edit_save) scheduler.editStop(true);\r\n\t\t\tif (code == scheduler.keys.edit_cancel) scheduler.editStop(false);\r\n\r\n\t\t\tif(code == scheduler.keys.edit_save || code == scheduler.keys.edit_cancel){\r\n\t\t\t\tif(e.preventDefault) e.preventDefault();\r\n\t\t\t}\r\n\t\t});\r\n\t\tscheduler.event(this._editor, \"selectstart\", function (e) {\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn true;\r\n\t\t});\r\n\t\tscheduler._focus(this._editor, true);\r\n\t\t//IE and opera can add x-scroll during focusing\r\n\t\tthis._els[\"dhx_cal_data\"][0].scrollLeft = 0;\r\n\t}\r\n\tif (this.xy.menu_width !== 0 && this._select_id == ev.id) {\r\n\r\n\t\tif (this.config.cascade_event_display && this._drag_mode)\r\n\t\t\td.style.zIndex = 1; //fix overlapping issue for cascade view in case of dnd of selected event\r\n\t\tvar icons = this.config[\"icons_\" + ((this._edit_id == ev.id) ? \"edit\" : \"select\")];\r\n\t\tvar icons_str = \"\";\r\n\r\n\t\tvar ariaAttr;\r\n\r\n\t\tfor (var i = 0; i < icons.length; i++) {\r\n\t\t\tconst currentIcon = icons[i];\r\n\t\t\tariaAttr = this._waiAria.eventMenuAttrString(currentIcon);\r\n\t\t\ticons_str += `
`;\r\n\t\t}\r\n\t\tvar obj = this._render_v_bar(ev, left - menu - 1, top, menu, null, \"\", \"
\", icons_str, true);\r\n\r\n\t\tif(ev.color){\r\n\t\t\tobj.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tobj.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\t//obj.style.left = left - menu + 1;\r\n\t\tthis._els[\"dhx_cal_data\"][0].appendChild(obj);\r\n\t\tthis._rendered.push(obj);\r\n\t}\r\n\tif(this.config.drag_highlight && this._drag_id == ev.id){\r\n\t\tthis.highlightEventPosition(ev);\r\n\t}\r\n};\r\nscheduler._render_v_bar = function (ev, x, y, w, h, style, contentA, contentB, bottom) {\r\n\tvar d = document.createElement(\"div\");\r\n\tvar id = ev.id;\r\n\tvar cs = (bottom) ? \"dhx_cal_event dhx_cal_select_menu\" : \"dhx_cal_event\";\r\n\r\n\tvar state = scheduler.getState();\r\n\tif(state.drag_id == ev.id){\r\n\t\tcs += \" dhx_cal_event_drag\";\r\n\t}\r\n\r\n\tif(state.select_id == ev.id){\r\n\t\tcs += \" dhx_cal_event_selected\";\r\n\t}\r\n\r\n\tvar cse = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\tif (cse) cs = cs + \" \" + cse;\r\n\r\n\tif(this.config.cascade_event_display) {\r\n\t\tcs += \" dhx_cal_event_cascade\";\r\n\t}\r\n\r\n\tvar boxWidth = w - 1;\r\n\tvar html = `
\r\n\t\t\t\t
`;\r\n\r\n\td.innerHTML = html;\r\n\r\n\tvar container = d.cloneNode(true).firstChild;\r\n\r\n\tif (!bottom && scheduler.renderEvent(container, ev, w, h, contentA, contentB)) {\r\n\t\tif(ev.color){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\treturn container;\r\n\t} else {\r\n\t\tcontainer = d.firstChild;\r\n\t\tif(ev.color){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\tvar inner_html = '
 
';\r\n\t\tinner_html += '
' + contentA + '
';\r\n\t\tinner_html += '
' + contentB + '
'; // +2 css specific, moved from render_event\r\n\r\n\t\tvar footer_class = \"dhx_event_resize dhx_footer\";\r\n\t\tif (bottom || ev._drag_resize === false)\r\n\t\t\tfooter_class = \"dhx_resize_denied \" + footer_class;\r\n\r\n\t\tinner_html += '
';\r\n\r\n\t\tcontainer.innerHTML = inner_html;\r\n\t}\r\n\r\n\treturn container;\r\n};\r\nscheduler.renderEvent = function(){\r\n\treturn false;\r\n};\r\nscheduler.locate_holder = function(day) {\r\n\tif (this._mode == \"day\") return this._els[\"dhx_cal_data\"][0].firstChild; //dirty\r\n\treturn this._els[\"dhx_cal_data\"][0].childNodes[day];\r\n};\r\nscheduler.locate_holder_day = function(date, past) {\r\n\tvar day = Math.floor((this._correct_shift(date, 1) - this._min_date) / (60 * 60 * 24 * 1000));\r\n\t//when locating end data of event , we need to use next day if time part was defined\r\n\tif (past && this.date.time_part(date)) day++;\r\n\treturn day;\r\n};\r\n\r\n\r\n\r\nscheduler._get_dnd_order = function(order, ev_height, max_height){\r\n\tif(!this._drag_event)\r\n\t\treturn order;\r\n\tif(!this._drag_event._orig_sorder)\r\n\t\tthis._drag_event._orig_sorder = order;\r\n\telse\r\n\t\torder = this._drag_event._orig_sorder;\r\n\r\n\tvar evTop = ev_height * order;\r\n\twhile((evTop + ev_height) > max_height){\r\n\t\torder--;\r\n\t\tevTop -= ev_height;\r\n\t}\r\n\torder = Math.max(order, 0);\r\n\treturn order;\r\n};\r\n//scheduler._get_event_bar_pos = function(sday, eday, week, drag){\r\nscheduler._get_event_bar_pos = function(ev){\r\n\tvar rtl = this.config.rtl;\r\n\tvar columns = this._colsS;\r\n\tvar x = columns[ev._sday];\r\n\tvar x2 = columns[ev._eday];\r\n\tif (rtl) {\r\n\t\tx = columns[columns.col_length] - columns[ev._eday] + columns[0];\r\n\t\tx2 = columns[columns.col_length] - columns[ev._sday] + columns[0];\r\n\t}\r\n\r\n\tif (x2 == x) x2 = columns[ev._eday + 1];\r\n\tvar hb = this.xy.bar_height;\r\n\r\n\tvar order = ev._sorder;\r\n\tif(ev.id == this._drag_id){\r\n\t\tvar cellHeight = columns.heights[ev._sweek + 1] - columns.heights[ev._sweek]- this.xy.month_head_height;//22 for month head height\r\n\t\torder = scheduler._get_dnd_order(order, hb, cellHeight);\r\n\t}\r\n\tvar y_event_offset = order * hb;\r\n\tvar y = columns.heights[ev._sweek] + (columns.height ? (this.xy.month_scale_height + 2) : 2 ) + y_event_offset;\r\n\treturn {x:x, x2:x2, y:y};\r\n};\r\n\r\nscheduler.render_event_bar = function (ev) {\r\n\tvar parent = this._rendered_location;\r\n\tvar pos = this._get_event_bar_pos(ev);\r\n\tvar y = pos.y;\r\n\tvar x = pos.x;\r\n\tvar x2 = pos.x2;\r\n\t// resize for month mutliday events\r\n\tvar resize_handle = \"\";\r\n\r\n\t//events in ignored dates\r\n\r\n\tif (!x2) return;\r\n\r\n\tvar resizable = scheduler.config.resize_month_events && this._mode == \"month\" &&\r\n\t\t(!ev._timed || scheduler.config.resize_month_timed);\r\n\r\n\tvar d = document.createElement(\"div\");\r\n\tvar left_chunk = (ev.hasOwnProperty(\"_first_chunk\") && ev._first_chunk),\r\n\t\tright_chunk = (ev.hasOwnProperty(\"_last_chunk\") && ev._last_chunk);\r\n\r\n\tvar resize_left = resizable && (ev._timed || left_chunk);\r\n\tvar resize_right = resizable && (ev._timed || right_chunk);\r\n\r\n\tvar timed = true;\r\n\tvar cs = \"dhx_cal_event_clear\";\r\n\tif (!ev._timed || resizable) {\r\n\t\ttimed = false;\r\n\t\tcs = \"dhx_cal_event_line\";\r\n\t}\r\n\tif(left_chunk){\r\n\t\tcs += \" dhx_cal_event_line_start\";\r\n\t}\r\n\tif(right_chunk){\r\n\t\tcs += \" dhx_cal_event_line_end\";\r\n\t}\r\n\tif(resize_left){\r\n\t\tresize_handle += \"
\";\r\n\t}\r\n\tif(resize_right){\r\n\t\tresize_handle += \"
\";\r\n\t}\r\n\r\n\tvar cse = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\tif (cse){\r\n\t\tcs += \" \" + cse;\r\n\t}\r\n\r\n\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\tvar style_text = [\r\n\t\t\"position:absolute\",\r\n\t\t\"top:\" + y + \"px\",\r\n\t\t\"left:\" + x + \"px\",\r\n\t\t\"width:\" + (x2 - x - (timed ? 1 : 0)) + \"px\",\r\n\t\t\"height:\" + (this.xy.bar_height - 2) + \"px\",\r\n\t\tcolor,\r\n\t\tbg_color,\r\n\t\t(ev._text_style || \"\")\r\n\t].join(\";\");\r\n\r\n\tvar html = \"
\";\r\n\tif (resizable) {\r\n\t\thtml += resize_handle;\r\n\t}\r\n\tif(scheduler.getState().mode == \"month\"){\r\n\t\tev = scheduler.getEvent(ev.id); // ev at this point could be a part (row in a month view) of a larger event\r\n\t}\r\n\r\n\tif (ev._timed){\r\n\t\thtml += `${scheduler.templates.event_bar_date(ev.start_date, ev.end_date, ev)}`;\r\n\t}\r\n\r\n\thtml += \"
\";\r\n\thtml += scheduler.templates.event_bar_text(ev.start_date, ev.end_date, ev) + '
';\r\n\thtml += \"
\";\r\n\thtml += '
';\r\n\r\n\td.innerHTML = html;\r\n\r\n\tthis._rendered.push(d.firstChild);\r\n\tparent.appendChild(d.firstChild);\r\n};\r\n\r\nscheduler._locate_event = function(node) {\r\n\tvar id = null;\r\n\twhile (node && !id && node.getAttribute) {\r\n\t\tid = node.getAttribute(this.config.event_attribute);\r\n\t\tnode = node.parentNode;\r\n\t}\r\n\treturn id;\r\n};\r\n\r\nscheduler.edit = function(id) {\r\n\tif (this._edit_id == id) return;\r\n\tthis.editStop(false, id);\r\n\tthis._edit_id = id;\r\n\tthis.updateEvent(id);\r\n};\r\nscheduler.editStop = function(mode, id) {\r\n\tif (id && this._edit_id == id) return;\r\n\tvar ev = this.getEvent(this._edit_id);\r\n\tif (ev) {\r\n\t\tif (mode) ev.text = this._editor.value;\r\n\t\tthis._edit_id = null;\r\n\t\tthis._editor = null;\r\n\t\tthis.updateEvent(ev.id);\r\n\t\tthis._edit_stop_event(ev, mode);\r\n\t}\r\n};\r\nscheduler._edit_stop_event = function(ev, mode) {\r\n\tif (this._new_event) {\r\n\t\tif (!mode) {\r\n\t\t\tif (ev) // in case of custom lightbox user can already delete event\r\n\t\t\t\tthis.deleteEvent(ev.id, true);\r\n\t\t} else {\r\n\t\t\tthis.callEvent(\"onEventAdded\", [ev.id, ev]);\r\n\t\t}\r\n\t\tthis._new_event = null;\r\n\t} else {\r\n\t\tif (mode){\r\n\t\t\tthis.callEvent(\"onEventChanged\", [ev.id, ev]);\r\n\t\t}\r\n\t}\r\n};\r\n\r\nscheduler.getEvents = function(from, to) {\r\n\tvar result = [];\r\n\tfor (var a in this._events) {\r\n\t\tvar ev = this._events[a];\r\n\t\tif (ev && ( (!from && !to) || (ev.start_date < to && ev.end_date > from) ))\r\n\t\t\tresult.push(ev);\r\n\t}\r\n\treturn result;\r\n};\r\nscheduler.getRenderedEvent = function(id) {\r\n\tif (!id)\r\n\t\treturn;\r\n\tvar rendered_events = scheduler._rendered;\r\n\tfor (var i=0; i -1){\r\n\t\t\t\t\tsection = section.split(scheduler.config.section_delimiter)[0];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar top = timeline.getSectionTop(section);\r\n\t\t\tvar left = timeline.posFromDate(event.start_date);\r\n\t\t\tvar container = scheduler.$container.querySelector(\".dhx_timeline_data_wrapper\");\r\n\t\t\tleft = left - (container.offsetWidth - timeline.dx) / 2;\r\n\t\t\ttop = top - container.offsetHeight / 2 + timeline.dy/2;\r\n\r\n\t\t\tif (timeline._smartRenderingEnabled()) {\r\n\t\t\t\tvar handlerId = timeline.attachEvent(\"onScroll\", function(){\r\n\t\t\t\t\trestoreOriginalColors();\r\n\t\t\t\t\ttimeline.detachEvent(handlerId);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\ttimeline.scrollTo({\r\n\t\t\t\tleft: left,\r\n\t\t\t\ttop: top\r\n\t\t\t});\r\n\t\t\tif (!timeline._smartRenderingEnabled()) {\r\n\t\t\t\trestoreOriginalColors();\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\trestoreOriginalColors();\r\n\t}\r\n\r\n\tscheduler.callEvent(\"onAfterEventDisplay\", [ev, mode]);\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._append_drag_marker = function(m){\r\n\tif(m.parentNode) return;\r\n\tvar zone = scheduler._els[\"dhx_cal_data\"][0];\r\n\r\n\tvar scale = zone.lastChild;\r\n\tvar className = scheduler._getClassName(scale);\r\n\tif(className.indexOf(\"dhx_scale_holder\") < 0 && scale.previousSibling){\r\n\t\tscale = scale.previousSibling;\r\n\t}\r\n\r\n\tclassName = scheduler._getClassName(scale);\r\n\tif (scale && className.indexOf(\"dhx_scale_holder\") === 0) {\r\n\t\tscale.appendChild(m);\r\n\t}\r\n};\r\n\r\nscheduler._update_marker_position = function(m, event){\r\n\tvar size = scheduler._calc_event_y(event, 0);\r\n\tm.style.top = size.top + \"px\";\r\n\tm.style.height = size.height + \"px\";\r\n};\r\n\r\nscheduler.highlightEventPosition = function(event){\r\n\tvar m = document.createElement(\"div\");\r\n\r\n\tm.setAttribute(\"event_id\", event.id); // for backward compatibility\r\n\tm.setAttribute(this.config.event_attribute, event.id);\r\n\tthis._rendered.push(m);\r\n\tthis._update_marker_position(m, event);\r\n\r\n\tvar css = this.templates.drag_marker_class(event.start_date, event.end_date, event);\r\n\tvar html = this.templates.drag_marker_content(event.start_date, event.end_date, event);\r\n\tm.className = \"dhx_drag_marker\";\r\n\tif(css)\r\n\t\tm.className += \" \" + css;\r\n\tif(html)\r\n\t\tm.innerHTML = html;\r\n\tthis._append_drag_marker(m);\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._parsers.xml = {\r\n\tcanParse: function(data, xhr){\r\n\t\t// IE returns non-empty responseXML type regardless of actual data type\r\n\t\tif(xhr.responseXML && xhr.responseXML.firstChild){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\ttry{\r\n\t\t\tvar xmlDoc = scheduler.ajax.parse(xhr.responseText);\r\n\t\t\tvar topElement = scheduler.ajax.xmltop(\"data\", xmlDoc);\r\n\t\t\tif(topElement && topElement.tagName === \"data\"){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}catch (e){\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\tparse: function(loader) {\r\n\t\tvar xml;\r\n\r\n\t\tif (!loader.xmlDoc.responseXML) { //from a string\r\n\t\t\tloader.xmlDoc.responseXML = scheduler.ajax.parse(loader.xmlDoc.responseText);\r\n\t\t}\r\n\t\r\n\t\txml = scheduler.ajax.xmltop(\"data\", loader.xmlDoc);\r\n\t\tif (xml.tagName != \"data\") return null;//not an xml\r\n\t\tvar csrfToken = xml.getAttribute(\"dhx_security\");\r\n\t\tif (csrfToken) {\r\n\t\t\tif (window.dhtmlx) {\r\n\t\t\t\twindow.dhtmlx.security_key = csrfToken;\r\n\t\t\t}\r\n\t\t\tscheduler.security_key = csrfToken;\r\n\t\t}\r\n\t\r\n\t\tvar opts = scheduler.ajax.xpath(\"//coll_options\", loader.xmlDoc);\r\n\t\tfor (var i = 0; i < opts.length; i++) {\r\n\t\t\tvar bind = opts[i].getAttribute(\"for\");\r\n\t\t\tvar arr = scheduler.serverList[bind];\r\n\t\t\tif (!arr) {\r\n\t\t\t\tscheduler.serverList[bind] = arr = [];\r\n\t\t\t}\r\n\t\t\tarr.splice(0, arr.length);\t//clear old options\r\n\t\t\tvar itms = scheduler.ajax.xpath(\".//item\", opts[i]);\r\n\t\t\tfor (var j = 0; j < itms.length; j++) {\r\n\t\t\t\tvar itm = itms[j];\r\n\t\t\t\tvar attrs = itm.attributes;\r\n\t\t\t\tvar obj = { key: itms[j].getAttribute(\"value\"), label: itms[j].getAttribute(\"label\")};\r\n\t\t\t\tfor (var k = 0; k < attrs.length; k++) {\r\n\t\t\t\t\tvar attr = attrs[k];\r\n\t\t\t\t\tif (attr.nodeName == \"value\" || attr.nodeName == \"label\")\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\tobj[attr.nodeName] = attr.nodeValue;\r\n\t\t\t\t}\r\n\t\t\t\tarr.push(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (opts.length)\r\n\t\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\t\r\n\t\tvar ud = scheduler.ajax.xpath(\"//userdata\", loader.xmlDoc);\r\n\t\tfor (var i = 0; i < ud.length; i++) {\r\n\t\t\tvar udx = scheduler._xmlNodeToJSON(ud[i]);\r\n\t\t\tscheduler._userdata[udx.name] = udx.text;\r\n\t\t}\r\n\t\r\n\t\tvar evs = [];\r\n\t\txml = scheduler.ajax.xpath(\"//event\", loader.xmlDoc);\r\n\t\r\n\t\tfor (var i = 0; i < xml.length; i++) {\r\n\t\t\tvar ev = evs[i] = scheduler._xmlNodeToJSON(xml[i]);\r\n\t\t\tscheduler._init_event(ev);\r\n\t\t}\r\n\t\treturn evs;\r\n\t}\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler.json = scheduler._parsers.json = {\r\n\tcanParse: function(data){\r\n\t\tif(data && typeof data === \"object\"){\r\n\t\t\treturn true;\r\n\t\t} else if(typeof data === \"string\"){\r\n\t\t\ttry {\r\n\t\t\t\tvar result = JSON.parse(data);\r\n\t\t\t\treturn Object.prototype.toString.call(result) === '[object Object]' || \r\n\t\t\t\t\t\tObject.prototype.toString.call(result) === '[object Array]';\r\n\t\t\t} catch (err) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\tparse: function(data) {\r\n\t\tvar events = [];\r\n\r\n\t\tif (typeof data == \"string\") {\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\t\tif (Object.prototype.toString.call(data) === '[object Array]') {\r\n\t\t\tevents = data;\r\n\t\t} else {\r\n\t\t\tif(data){\r\n\t\t\t\tif(data.events){\r\n\t\t\t\t\tevents = data.events;\r\n\t\t\t\t}else if(data.data){\r\n\t\t\t\t\tevents = data.data;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tevents = events || [];\r\n\r\n\t\tif (data.dhx_security) {\r\n\t\t\tif (window.dhtmlx) {\r\n\t\t\t\twindow.dhtmlx.security_key = data.dhx_security;\r\n\t\t\t}\r\n\t\t\tscheduler.security_key = data.dhx_security;\r\n\t\t}\r\n\r\n\t\tvar collections = (data && data.collections) ? data.collections : {};\r\n\t\tvar collections_loaded = false;\r\n\t\tfor (var key in collections) {\r\n\t\t\tif (collections.hasOwnProperty(key)) {\r\n\t\t\t\tcollections_loaded = true;\r\n\t\t\t\tvar collection = collections[key];\r\n\t\t\t\tvar arr = scheduler.serverList[key];\r\n\t\t\t\tif (!arr) {\r\n\t\t\t\t\tscheduler.serverList[key] = arr = [];\r\n\t\t\t\t}\r\n\t\t\t\tarr.splice(0, arr.length); //clear old options\r\n\t\t\t\tfor (var j = 0; j < collection.length; j++) {\r\n\t\t\t\t\tvar option = collection[j];\r\n\t\t\t\t\tvar obj = { key: option.value, label: option.label }; // resulting option object\r\n\t\t\t\t\tfor (var option_key in option) {\r\n\t\t\t\t\t\tif (option.hasOwnProperty(option_key)) {\r\n\t\t\t\t\t\t\tif (option_key == \"value\" || option_key == \"label\")\r\n\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\tobj[option_key] = option[option_key]; // obj['value'] = option['value']\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tarr.push(obj);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (collections_loaded)\r\n\t\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\r\n\t\tvar evs = [];\r\n\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\tvar event = events[i];\r\n\t\t\tscheduler._init_event(event);\r\n\t\t\tevs.push(event);\r\n\t\t}\r\n\t\treturn evs;\r\n\t}\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler.ical = scheduler._parsers.ical = {\r\n\tcanParse: function(data){\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\treturn new RegExp(\"^BEGIN:VCALENDAR\").test(data);\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n\tparse:function(str){\r\n\t\tvar data = str.match(RegExp(this.c_start+\"[^\\f]*\"+this.c_end,\"\"));\r\n\t\tif (!data.length) return;\r\n\r\n\t\t// mpl: handle bad unfolding\r\n\t\tdata[0]=data[0].replace(/[\\r\\n]+ /g,\"\");\r\n\r\n\t\t//unfolding \r\n\t\tdata[0]=data[0].replace(/[\\r\\n]+(?=[a-z \\t])/g,\" \");\r\n\t\t//drop property\r\n\t\tdata[0]=data[0].replace(/;[^:\\r\\n]*:/g,\":\");\r\n\t\t\r\n\t\t\r\n\t\tvar incoming=[];\r\n\t\tvar match;\r\n\t\tvar event_r = RegExp(\"(?:\"+this.e_start+\")([^\\f]*?)(?:\"+this.e_end+\")\",\"g\");\r\n\t\twhile ((match=event_r.exec(data)) !== null){\r\n\t\t\tvar e={};\r\n\t\t\tvar param;\r\n\t\t\tvar param_r = /[^\\r\\n]+[\\r\\n]+/g;\r\n\t\t\twhile ((param=param_r.exec(match[1])) !== null)\r\n\t\t\t\tthis.parse_param(param.toString(),e);\r\n\t\t\tif (e.uid && !e.id) e.id = e.uid; //fallback to UID, when ID is not defined\r\n\t\t\tincoming.push(e);\t\r\n\t\t}\r\n\t\treturn incoming;\r\n\t},\r\n\tparse_param:function(str,obj){\r\n\t\tvar d = str.indexOf(\":\"); \r\n\t\t\tif (d==-1) return;\r\n\t\t\r\n\t\tvar name = str.substr(0,d).toLowerCase();\r\n\t\tvar value = str.substr(d+1).replace(/\\\\,/g,\",\").replace(/[\\r\\n]+$/,\"\");\r\n\t\tif (name==\"summary\")\r\n\t\t\tname=\"text\";\r\n\t\telse if (name==\"dtstart\"){\r\n\t\t\tname = \"start_date\";\r\n\t\t\tvalue = this.parse_date(value,0,0);\r\n\t\t}\r\n\t\telse if (name==\"dtend\"){\r\n\t\t\tname = \"end_date\";\r\n\t\t\tvalue = this.parse_date(value,0,0);\r\n\t\t}\r\n\t\tobj[name]=value;\r\n\t},\r\n\tparse_date:function(value,dh,dm){\r\n\t\tvar t = value.split(\"T\");\r\n\r\n\t\tvar utcMark = false;\r\n\t\tif (t[1]){\r\n\t\t\tdh=t[1].substr(0,2);\r\n\t\t\tdm=t[1].substr(2,2);\r\n\t\t\tutcMark = !!(t[1][6] == \"Z\");\r\n\t\t}\r\n\t\tvar dy = t[0].substr(0,4);\r\n\t\tvar dn = parseInt(t[0].substr(4,2),10)-1;\r\n\t\tvar dd = t[0].substr(6,2);\r\n\r\n\t\tif(scheduler.config.server_utc || utcMark){\r\n\t\t\treturn new Date(Date.UTC(dy,dn,dd,dh,dm)) ;\r\n\t\t}else{\r\n\t\t\treturn new Date(dy,dn,dd,dh,dm);\r\n\t\t}\r\n\t},\r\n\tc_start:\"BEGIN:VCALENDAR\",\r\n\te_start:\"BEGIN:VEVENT\",\r\n\te_end:\"END:VEVENT\",\r\n\tc_end:\"END:VCALENDAR\"\t\r\n};\r\n\r\n}","export default function(scheduler){\r\n\treturn (function(){\r\n\t\tvar res = {};\r\n\t\tfor (var a in this._events){\r\n\t\t\tvar ev = this._events[a];\r\n\t\t\tif (ev.id.toString().indexOf(\"#\") == -1){\r\n\t\t\t\tres[ev.id] = ev;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t}).bind(scheduler);\r\n}","import xmlLoaded from \"./loaders/xml\";\r\nimport jsonLoader from \"./loaders/json\";\r\nimport iCalLoader from \"./loaders/ical\";\r\nimport createSerializator from \"../core/common/get_serializable_events\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler._loaded = {};\r\nscheduler._load = function(url, from) {\r\n\turl = url || this._load_url;\r\n\r\n\tif(!url){\r\n\t\t//if scheduler.setLoadMode is called before scheduler.init, initial rendering will invoke data loading while url is undefined\r\n\t\treturn;\r\n\t}\r\n\r\n\turl += (url.indexOf(\"?\") == -1 ? \"?\" : \"&\") + \"timeshift=\" + (new Date()).getTimezoneOffset();\r\n\tif (this.config.prevent_cache) url += \"&uid=\" + this.uid();\r\n\tvar to;\r\n\tfrom = from || this._date;\r\n\tfunction ajaxCallback(response) {\r\n\t\tscheduler.on_load(response);\r\n\t\tscheduler.callEvent(\"onLoadEnd\", []);\r\n\t}\r\n\tif (this._load_mode) {\r\n\t\tvar lf = this.templates.load_format;\r\n\r\n\t\tfrom = this.date[this._load_mode + \"_start\"](new Date(from.valueOf()));\r\n\t\twhile (from > this._min_date) from = this.date.add(from, -1, this._load_mode);\r\n\t\tto = from;\r\n\r\n\t\tvar cache_line = true;\r\n\t\twhile (to < this._max_date) {\r\n\t\t\tto = this.date.add(to, 1, this._load_mode);\r\n\t\t\tif (this._loaded[lf(from)] && cache_line)\r\n\t\t\t\tfrom = this.date.add(from, 1, this._load_mode); else cache_line = false;\r\n\t\t}\r\n\r\n\t\tvar temp_to = to;\r\n\t\tdo {\r\n\t\t\tto = temp_to;\r\n\t\t\ttemp_to = this.date.add(to, -1, this._load_mode);\r\n\t\t} while (temp_to > from && this._loaded[lf(temp_to)]);\r\n\r\n\t\tif (to <= from)\r\n\t\t\treturn false; //already loaded\r\n\r\n\t\tscheduler.ajax.get(url + \"&from=\" + lf(from) + \"&to=\" + lf(to), ajaxCallback);\r\n\r\n\t\twhile (from < to) {\r\n\t\t\tthis._loaded[lf(from)] = true;\r\n\t\t\tfrom = this.date.add(from, 1, this._load_mode);\r\n\t\t}\r\n\t} else {\r\n\t\tscheduler.ajax.get(url, ajaxCallback);\r\n\t}\r\n\r\n\t// TODO: remove onXLS\r\n\tthis.callEvent(\"onXLS\", []);\r\n\tthis.callEvent(\"onLoadStart\", []);\r\n\treturn true;\r\n};\r\n\r\nscheduler._parsers = {};\r\n\r\n\r\nxmlLoaded(scheduler);\r\njsonLoader(scheduler);\r\niCalLoader(scheduler);\r\n\r\nscheduler.on_load = function (loader) {\r\n\tthis.callEvent(\"onBeforeParse\", []);\r\n\r\n\tvar evs;\r\n\tvar error = false;\r\n\r\n\tvar foundParser = false;\r\n\tfor(var i in this._parsers){\r\n\t\tvar parser = this._parsers[i];\r\n\t\tif(parser.canParse(loader.xmlDoc.responseText, loader.xmlDoc)){\r\n\t\t\ttry{\r\n\t\t\t\tvar param = loader.xmlDoc.responseText;\r\n\t\t\t\tif(i === \"xml\"){\r\n\t\t\t\t\tparam = loader;\r\n\t\t\t\t}\r\n\t\t\t\tevs = parser.parse(param);\r\n\t\t\t\tif(!evs){\r\n\t\t\t\t\terror = true;\r\n\t\t\t\t}\r\n\t\t\t}catch(e){\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\t\t\tfoundParser = true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif(!foundParser){\r\n\t\tif(this._process && this[this._process]){\r\n\t\t\ttry{\r\n\t\t\t\tevs = this[this._process].parse(loader.xmlDoc.responseText);\r\n\t\t\t}catch (e){\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\terror = true;\r\n\t\t}\r\n\t}\r\n\r\n\tif(error || (loader.xmlDoc.status && loader.xmlDoc.status >= 400)){\r\n\t\tthis.callEvent(\"onLoadError\", [loader.xmlDoc]);\r\n\t\tevs = [];\r\n\t}\r\n\r\n\tthis._process_loading(evs);\r\n\r\n\t// TODO: remove onXLE\r\n\tthis.callEvent(\"onXLE\", []);\r\n\tthis.callEvent(\"onParse\", []);\r\n};\r\nscheduler._process_loading = function(evs) {\r\n\tthis._loading = true;\r\n\tthis._not_render = true;\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tif (!this.callEvent(\"onEventLoading\", [evs[i]])) continue;\r\n\t\tthis.addEvent(evs[i]);\r\n\t}\r\n\tthis._not_render = false;\r\n\tif (this._render_wait) this.render_view_data();\r\n\r\n\tthis._loading = false;\r\n\tif (this._after_call) this._after_call();\r\n\tthis._after_call = null;\r\n};\r\nscheduler._init_event = function(event) {\r\n\tevent.text = (event.text || event._tagvalue) || \"\";\r\n\tevent.start_date = scheduler._init_date(event.start_date);\r\n\tevent.end_date = scheduler._init_date(event.end_date);\r\n};\r\n\r\nscheduler._init_date = function(date){\r\n\tif(!date)\r\n\t\treturn null;\r\n\tif (typeof date == \"string\") {\r\n\t\treturn scheduler._helpers.parseDate(date);\r\n\t}\r\n\telse return new Date(date);\r\n};\r\n\r\nconst getSerializableData = createSerializator(scheduler);\r\nscheduler.serialize = function(){\r\n\tconst dataset = [];\r\n\tconst allEvents = getSerializableData();\r\n\tfor (var a in allEvents){\r\n\t\t\r\n\t\tconst exportedEvent = {};\r\n\t\tvar ev = allEvents[a];\r\n\r\n\t\tfor(var key in ev){\r\n\t\t\tif (key.charAt(0) == \"$\" || key.charAt(0) == \"_\"){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tlet exportValue;\r\n\t\t\tconst rawValue = ev[key];\r\n\t\t\tif(scheduler.utils.isDate(rawValue)){\r\n\t\t\t\texportValue = scheduler.defined(scheduler.templates.xml_format) ? scheduler.templates.xml_format(rawValue) : scheduler.templates.format_date(rawValue);\r\n\t\t\t}else{\r\n\t\t\t\texportValue = rawValue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\texportedEvent[key] = exportValue;\r\n\t\t}\r\n\r\n\t\tdataset.push(exportedEvent);\r\n\t}\r\n\treturn dataset;\r\n};\r\n\r\n/*\r\nscheduler.json = {};\r\nscheduler.json.parse = function(data) {\r\n\r\n\tvar events = [];\r\n\r\n\tif (typeof data == \"string\") {\r\n\t\tdata = JSON.parse(data);\r\n\t}\r\n\tif (Object.prototype.toString.call(data) === '[object Array]') {\r\n\t\tevents = data;\r\n\t} else {\r\n\t\tif(data){\r\n\t\t\tif(data.events){\r\n\t\t\t\tevents = data.events;\r\n\t\t\t}else if(data.data){\r\n\t\t\t\tevents = data.data;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tevents = events || [];\r\n\r\n\tif (data.dhx_security) {\r\n\t\tif (window.dhtmlx) {\r\n\t\t\twindow.dhtmlx.security_key = data.dhx_security;\r\n\t\t}\r\n\t\tscheduler.security_key = data.dhx_security;\r\n\t}\r\n\r\n\tvar collections = (data && data.collections) ? data.collections : {};\r\n\tvar collections_loaded = false;\r\n\tfor (var key in collections) {\r\n\t\tif (collections.hasOwnProperty(key)) {\r\n\t\t\tcollections_loaded = true;\r\n\t\t\tvar collection = collections[key];\r\n\t\t\tvar arr = scheduler.serverList[key];\r\n\t\t\tif (!arr) {\r\n\t\t\t\tscheduler.serverList[key] = arr = [];\r\n\t\t\t}\r\n\t\t\tarr.splice(0, arr.length); //clear old options\r\n\t\t\tfor (var j = 0; j < collection.length; j++) {\r\n\t\t\t\tvar option = collection[j];\r\n\t\t\t\tvar obj = { key: option.value, label: option.label }; // resulting option object\r\n\t\t\t\tfor (var option_key in option) {\r\n\t\t\t\t\tif (option.hasOwnProperty(option_key)) {\r\n\t\t\t\t\t\tif (option_key == \"value\" || option_key == \"label\")\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\tobj[option_key] = option[option_key]; // obj['value'] = option['value']\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tarr.push(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (collections_loaded)\r\n\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\r\n\tvar evs = [];\r\n\tfor (var i = 0; i < events.length; i++) {\r\n\t\tvar event = events[i];\r\n\t\tscheduler._init_event(event);\r\n\t\tevs.push(event);\r\n\t}\r\n\treturn evs;\r\n};*/\r\nscheduler.parse = function(data, type) {\r\n\tthis._process = type;\r\n\tthis.on_load({xmlDoc: {responseText: data}});\r\n};\r\nscheduler.load = function(url, call) {\r\n\tif (typeof call == \"string\") {\r\n\t\tthis._process = call;\r\n\t\tcall = arguments[2];\r\n\t}\r\n\r\n\tthis._load_url = url;\r\n\tthis._after_call = call;\r\n\tthis._load(url, this._date);\r\n};\r\n//possible values - day,week,month,year,all\r\nscheduler.setLoadMode = function(mode) {\r\n\tif (mode == \"all\") mode = \"\";\r\n\tthis._load_mode = mode;\r\n};\r\n\r\nscheduler.serverList = function(name, array) {\r\n\tif (array) {\r\n\t\tthis.serverList[name] = array.slice(0);\r\n\t\treturn this.serverList[name];\r\n\t}\r\n\tthis.serverList[name] = (this.serverList[name] || []);\r\n\treturn this.serverList[name];\r\n};\r\nscheduler._userdata = {};\r\n\r\nscheduler._xmlNodeToJSON = function(node) {\r\n\tvar t = {};\r\n\tfor (var i = 0; i < node.attributes.length; i++)\r\n\t\tt[node.attributes[i].name] = node.attributes[i].value;\r\n\r\n\tfor (var i = 0; i < node.childNodes.length; i++) {\r\n\t\tvar child = node.childNodes[i];\r\n\t\tif (child.nodeType == 1)\r\n\t\t\tt[child.tagName] = child.firstChild ? child.firstChild.nodeValue : \"\";\r\n\t}\r\n\r\n\tif (!t.text) t.text = node.firstChild ? node.firstChild.nodeValue : \"\";\r\n\r\n\treturn t;\r\n};\r\nscheduler.attachEvent(\"onXLS\", function() {\r\n\tif (this.config.show_loading === true) {\r\n\t\tvar t;\r\n\t\tt = this.config.show_loading = document.createElement(\"div\");\r\n\t\tt.className = 'dhx_loading';\r\n\t\tt.style.left = Math.round((this._x - 128) / 2) + \"px\";\r\n\t\tt.style.top = Math.round((this._y - 15) / 2) + \"px\";\r\n\t\tthis._obj.appendChild(t);\r\n\t}\r\n});\r\nscheduler.attachEvent(\"onXLE\", function() {\r\n\tvar t = this.config.show_loading;\r\n\tif (t && typeof t == \"object\") {\r\n\t\tif(t.parentNode) {\r\n\t\t\tt.parentNode.removeChild(t);\r\n\t\t}\r\n\t\tthis.config.show_loading = true;\r\n\t}\r\n});\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler._lightbox_controls = {};\r\nscheduler.formSection = function(name){\r\n\tvar config = this.config.lightbox.sections;\r\n\tvar i = 0;\r\n\tfor (i; i < config.length; i++) {\r\n\t\tif (config[i].name == name) {\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif (i === config.length) {\r\n\t\t// GS-1662 section not found, should exit here instead of throwing an error\r\n\t\treturn null;\r\n\t}\r\n\r\n\tvar section = config[i];\r\n\tif (!scheduler._lightbox) {\r\n\t\tscheduler.getLightbox();\r\n\t}\r\n\tvar header = scheduler._lightbox.querySelector(`#${section.id}`);\r\n\tvar node = header.nextSibling;\r\n\r\n\tvar result = {\r\n\t\tsection: section,\r\n\t\theader: header,\r\n\t\tnode: node,\r\n\t\tgetValue:function(ev){\r\n\t\t\treturn scheduler.form_blocks[section.type].get_value(node, (ev||{}), section);\r\n\t\t},\r\n\t\tsetValue:function(value, ev){\r\n\t\t\treturn scheduler.form_blocks[section.type].set_value(node, value, (ev||{}), section);\r\n\t\t}\r\n\t};\r\n\r\n\tvar handler = scheduler._lightbox_controls[\"get_\"+section.type+\"_control\"];\r\n\treturn handler?handler(result):result;\r\n};\r\nscheduler._lightbox_controls.get_template_control = function(result) {\r\n\tresult.control = result.node;\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_select_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('select')[0];\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_textarea_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('textarea')[0];\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_time_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('select'); // array\r\n\treturn result;\r\n};\r\n\r\nscheduler._lightbox_controls.defaults = {\r\n\ttemplate: {\r\n\t\theight:30\r\n\t},\r\n\ttextarea: {\r\n\t\theight: 200\r\n\t},\r\n\tselect: {\r\n\t\theight: 23\r\n\t},\r\n\ttime: {\r\n\t\theight: 20\r\n\t}\r\n};\r\n\r\n\r\nscheduler.form_blocks={\r\n\ttemplate:{\r\n\t\trender: function(sns){\r\n\t\t\treturn \"
\";\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,config){\r\n\t\t\tnode.innerHTML = value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev,config){\r\n\t\t\treturn node.innerHTML||\"\";\r\n\t\t},\r\n\t\tfocus: function(node){\r\n\t\t}\r\n\t},\r\n\ttextarea:{\r\n\t\trender:function(sns){\r\n\t\t\tconst placeholder = sns.placeholder ? `placeholder='${sns.placeholder}'` : \"\";\r\n\t\t\treturn `
`;\r\n\t\t},\r\n\t\tset_value:function(node,value,ev){\r\n\t\t\tscheduler.form_blocks.textarea._get_input(node).value=value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev){\r\n\t\t\treturn scheduler.form_blocks.textarea._get_input(node).value;\r\n\t\t},\r\n\t\tfocus:function(node){\r\n\t\t\tvar a = scheduler.form_blocks.textarea._get_input(node);\r\n\t\t\tscheduler._focus(a, true);\r\n\t\t},\r\n\t\t_get_input: function(node){\r\n\t\t\treturn node.getElementsByTagName(\"textarea\")[0];\r\n\t\t}\r\n\t},\r\n\tselect:{\r\n\t\trender:function(sns){\r\n\t\t\t//var defaults = scheduler._lightbox_controls.defaults.select;\r\n\t\t\tvar html=\"
\";\r\n\t\t\treturn html;\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,sns){\r\n\t\t\tvar select = node.firstChild;\r\n\t\t\tif (!select._dhx_onchange && sns.onchange) {\r\n\t\t\t\tscheduler.event(select, \"change\", sns.onchange);\r\n\t\t\t\tselect._dhx_onchange = true;\r\n\t\t\t}\r\n\t\t\tif (typeof value == \"undefined\")\r\n\t\t\t\tvalue = (select.options[0]||{}).value;\r\n\t\t\tselect.value=value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev){\r\n\t\t\treturn node.firstChild.value;\r\n\t\t},\r\n\t\tfocus:function(node){\r\n\t\t\tvar a=node.firstChild; scheduler._focus(a, true);\r\n\t\t}\r\n\t},\r\n\ttime:{\r\n\t\trender:function(sns) {\r\n\t\t\tif (!sns.time_format) {\r\n\t\t\t\t// default order\r\n\t\t\t\tsns.time_format = [\"%H:%i\", \"%d\", \"%m\", \"%Y\"];\r\n\t\t\t}\r\n\t\t\t// map: default order => real one\r\n\t\t\tsns._time_format_order = {};\r\n\t\t\tvar time_format = sns.time_format;\r\n\r\n\t\t\tvar cfg = scheduler.config;\r\n\t\t\tvar dt = scheduler.date.date_part(scheduler._currentDate());\r\n\t\t\tvar last = 24*60, first = 0;\r\n\t\t\tif(scheduler.config.limit_time_select){\r\n\t\t\t\tlast = 60*cfg.last_hour+1;\r\n\t\t\t\tfirst = 60*cfg.first_hour;\r\n\t\t\t\tdt.setHours(cfg.first_hour);\r\n\t\t\t}\r\n\t\t\tvar html = \"\";\r\n\r\n\t\t\tfor (var p = 0; p < time_format.length; p++) {\r\n\t\t\t\tvar time_option = time_format[p];\r\n\r\n\t\t\t\t// adding spaces between selects\r\n\t\t\t\tif (p > 0) {\r\n\t\t\t\t\thtml += \" \";\r\n\t\t\t\t}\r\n\t\t\t\tvar selectBoxClass = \"\";\r\n\t\t\t\tvar options = \"\";\r\n\t\t\t\tswitch (time_option) {\r\n\t\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_year_select\";\r\n\t\t\t\t\t\tsns._time_format_order[3] = p;\r\n\t\t\t\t\t\t//year\r\n\t\t\t\t\t\tvar range;\r\n\t\t\t\t\t\tvar start_year;\r\n\t\t\t\t\t\tvar end_year;\r\n\t\t\t\t\t\tif(sns.year_range){\r\n\t\t\t\t\t\t\tif (!isNaN(sns.year_range)) {\r\n\t\t\t\t\t\t\t\trange = sns.year_range;\r\n\t\t\t\t\t\t\t} else if (sns.year_range.push) {\r\n\t\t\t\t\t\t\t\t// if\r\n\t\t\t\t\t\t\t\tstart_year = sns.year_range[0];\r\n\t\t\t\t\t\t\t\tend_year = sns.year_range[1];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\trange = range || 10;\r\n\t\t\t\t\t\tvar offset = offset || Math.floor(range / 2);\r\n\t\t\t\t\t\tstart_year = start_year || dt.getFullYear() - offset;\r\n\t\t\t\t\t\tend_year = end_year || start_year + range;\r\n\r\n\t\t\t\t\t\tfor (var i = start_year; i < end_year; i++)\r\n\t\t\t\t\t\t\toptions += \"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%m\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_month_select\";\r\n\t\t\t\t\t\tsns._time_format_order[2] = p;\r\n\t\t\t\t\t\t//month\r\n\t\t\t\t\t\tfor (var i=0; i < 12; i++)\r\n\t\t\t\t\t\t\toptions+=\"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%d\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_day_select\";\r\n\t\t\t\t\t\tsns._time_format_order[1] = p;\r\n\t\t\t\t\t\t//days\r\n\t\t\t\t\t\tfor (var i=1; i < 32; i++)\r\n\t\t\t\t\t\t\toptions+=\"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%H:%i\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_time_select\";\r\n\t\t\t\t\t\tsns._time_format_order[0] = p;\r\n\t\t\t\t\t\t//hours\r\n\t\t\t\t\t\tvar i = first;\r\n\t\t\t\t\t\tvar tdate = dt.getDate();\r\n\t\t\t\t\t\tsns._time_values = [];\r\n\r\n\t\t\t\t\t\twhile(i\"+time+\"\";\r\n\t\t\t\t\t\t\tsns._time_values.push(i);\r\n\t\t\t\t\t\t\tdt.setTime(dt.valueOf()+this.config.time_step*60*1000);\r\n\t\t\t\t\t\t\tvar diff = (dt.getDate()!=tdate)?1:0; // moved or not to the next day\r\n\t\t\t\t\t\t\ti=diff*24*60+dt.getHours()*60+dt.getMinutes();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(options){\r\n\r\n\t\t\t\t\tvar ariaAttrs = scheduler._waiAria.lightboxSelectAttrString(time_option);\r\n\t\t\t\t\tvar readonly = sns.readonly ? \"disabled='disabled'\" : \"\";\r\n\t\t\t\t\thtml += \" \";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//var defaults = scheduler._lightbox_controls.defaults.select;\r\n\r\n\t\t\treturn \"
\"+html+\"  –  \"+html+\"
\";\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,config){\r\n\t\t\tvar cfg = scheduler.config;\r\n\t\t\tvar s=node.getElementsByTagName(\"select\");\r\n\t\t\tvar map = config._time_format_order;\r\n\t\t\tvar start_date, end_date;\r\n\r\n\t\t\tif(cfg.full_day) {\r\n\t\t\t\tif (!node._full_day){\r\n\t\t\t\t\tvar html = \"\";\r\n\t\t\t\t\tif (!scheduler.config.wide_form)\r\n\t\t\t\t\t\thtml = node.previousSibling.innerHTML+html;\r\n\t\t\t\t\tnode.previousSibling.innerHTML=html;\r\n\t\t\t\t\tnode._full_day=true;\r\n\t\t\t\t}\r\n\t\t\t\tvar input=node.previousSibling.getElementsByTagName(\"input\")[0];\r\n\t\t\t\tinput.checked = (scheduler.date.time_part(ev.start_date)===0 && scheduler.date.time_part(ev.end_date)===0);\r\n\r\n\t\t\t\ts[map[0]].disabled=input.checked;\r\n\t\t\t\ts[ map[0] + s.length/2 ].disabled=input.checked;\r\n\r\n\t\t\t\tif(!input.$_eventAttached){\r\n\t\t\t\t\tinput.$_eventAttached = true;\r\n\r\n\t\t\t\t\t\tscheduler.event(input, \"click\", function(){\r\n\t\t\t\t\t\tif(input.checked) {\r\n\t\t\t\t\t\t\tvar obj = {};\r\n\t\t\t\t\t\t\tscheduler.form_blocks.time.get_value(node,obj,config);\r\n\r\n\t\t\t\t\t\t\tstart_date = scheduler.date.date_part(obj.start_date);\r\n\t\t\t\t\t\t\tend_date = scheduler.date.date_part(obj.end_date);\r\n\r\n\t\t\t\t\t\t\tif (+end_date == +start_date || (+end_date >= +start_date && (ev.end_date.getHours() !== 0 || ev.end_date.getMinutes() !== 0)))\r\n\t\t\t\t\t\t\t\tend_date = scheduler.date.add(end_date, 1, \"day\");\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tstart_date = null;\r\n\t\t\t\t\t\t\tend_date = null;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\ts[map[0]].disabled=input.checked;\r\n\t\t\t\t\t\ts[ map[0] + s.length/2 ].disabled=input.checked;\r\n\r\n\t\t\t\t\t\t_fill_lightbox_select(s,0,start_date||ev.start_date);\r\n\t\t\t\t\t\t_fill_lightbox_select(s,4,end_date||ev.end_date);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(cfg.auto_end_date && cfg.event_duration) {\r\n\t\t\t\tvar _update_lightbox_select = function () {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (!(cfg.auto_end_date && cfg.event_duration)){\r\n\t\t\t\t\t\t// setting may be disabled after the handler is attached\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstart_date = new Date(s[map[3]].value,s[map[2]].value,s[map[1]].value,0,s[map[0]].value);\r\n\t\t\t\t\tend_date = new Date(start_date.getTime() + (scheduler.config.event_duration * 60 * 1000));\r\n\t\t\t\t\t_fill_lightbox_select(s, 4, end_date);\r\n\t\t\t\t};\r\n\t\t\t\tfor(var i=0; i<4; i++) {\r\n\t\t\t\t\tif(!s[i].$_eventAttached) {\r\n\t\t\t\t\t\ts[i].$_eventAttached = true;\r\n\t\t\t\t\t\tscheduler.event(s[i], \"change\", _update_lightbox_select);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction _fill_lightbox_select(s,i,d) {\r\n\t\t\t\tvar time_values = config._time_values;\r\n\t\t\t\tvar direct_value = d.getHours()*60+d.getMinutes();\r\n\t\t\t\tvar fixed_value = direct_value;\r\n\t\t\t\tvar value_found = false;\r\n\t\t\t\tfor (var k=0; k\";\r\n\t\tvar ariaAttr = \"\";\r\n\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\tariaAttr = this._waiAria.lightboxButtonAttrString(buttons[i]);\r\n\t\t\thtml += \"
\" + scheduler.locale.labels[buttons[i]] + \"
\";\r\n\t\t}\r\n\r\n\t\tbuttons = this.config.buttons_right;\r\n\t\tvar rtl = scheduler.config.rtl;\r\n\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\tariaAttr = this._waiAria.lightboxButtonAttrString(buttons[i]);\r\n\r\n\t\t\thtml += \"
\";\r\n\r\n\t\t\thtml += \"
\" + scheduler.locale.labels[buttons[i]] + \"
\";\r\n\t\t}\r\n\t\thtml += \"\";\r\n\t\thtml+=\"\";\r\n\t\td.innerHTML=html;\r\n\t\tif (scheduler.config.drag_lightbox){\r\n\t\t\tscheduler.event(d.firstChild, \"mousedown\", scheduler._ready_to_dnd);\r\n\t\t\tscheduler.event(d.firstChild, \"selectstart\", function(e){ \r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn false; \r\n\t\t\t});\r\n\t\t\td.firstChild.style.cursor = \"move\";\r\n\t\t\tscheduler._init_dnd_events();\r\n\r\n\t\t}\r\n\r\n\t\tthis._waiAria.lightboxAttr(d);\r\n\r\n\t\tthis.show_cover();\r\n\t\tthis._cover.insertBefore(d,this._cover.firstChild);\r\n\t\t\r\n\t\tthis._lightbox=d;\r\n\r\n\t\tvar sns=this.config.lightbox.sections;\r\n\t\thtml=\"\";\r\n\t\tfor (var i=0; i < sns.length; i++) {\r\n\t\t\tvar block=this.form_blocks[sns[i].type];\r\n\t\t\tif (!block) continue; //ignore incorrect blocks\r\n\t\t\tsns[i].id=\"area_\"+this.uid();\r\n\t\t\tvar button = \"\";\r\n\t\t\tif (sns[i].button){\r\n\t\t\t\tvar ariaAttr = scheduler._waiAria.lightboxSectionButtonAttrString(this.locale.labels[\"button_\"+sns[i].button]);\r\n\t\t\t\tbutton = \"
\"+this.locale.labels[\"button_\"+sns[i].button]+\"
\";\r\n\t\t\t}\r\n\r\n\t\t\tif (this.config.wide_form){\r\n\t\t\t\thtml+=\"
\";\r\n\t\t\t}\r\n\r\n\t\t\tvar label_name = this.locale.labels[\"section_\"+sns[i].name];\r\n\t\t\tif(typeof label_name !== \"string\"){\r\n\t\t\t\tlabel_name = sns[i].name;\r\n\t\t\t}\r\n\t\t\thtml+=\"
\"+button+ \"
\"+block.render.call(this,sns[i]);\r\n\t\t\thtml+=\"
\";\r\n\t\t}\r\n\r\n\t\tvar ds=d.getElementsByTagName(\"div\");\r\n\t\tfor (var i=0; i
 \r\n
\r\n
\r\n\r\n
`;\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._init_touch_events = function(){\r\n\tvar mobile = this.config.touch &&\r\n\t\t( ((navigator.userAgent.indexOf(\"Mobile\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"iPad\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"Android\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"Touch\")!=-1)) && !window.MSStream) ||\r\n\t\t\t((navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1));\r\n\r\n\tif(mobile){\r\n\t\tthis.xy.scroll_width = 0;\r\n\t\tthis._mobile = true;\r\n\t}\r\n\r\n\tif(this.config.touch){\r\n\r\n\t\tvar touchEventsSupported = true;\r\n\t\ttry {\r\n\t\t\tdocument.createEvent(\"TouchEvent\");\r\n\t\t} catch (e) {\r\n\t\t\ttouchEventsSupported = false;\r\n\t\t}\r\n\r\n\t\tif (touchEventsSupported) {\r\n\t\t\tthis._touch_events([\"touchmove\", \"touchstart\", \"touchend\"], function (ev) {\r\n\t\t\t\tif (ev.touches && ev.touches.length > 1) return null;\r\n\t\t\t\tif (ev.touches[0])\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\ttarget: ev.target,\r\n\t\t\t\t\t\tpageX: ev.touches[0].pageX,\r\n\t\t\t\t\t\tpageY: ev.touches[0].pageY,\r\n\t\t\t\t\t\tclientX: ev.touches[0].clientX,\r\n\t\t\t\t\t\tclientY: ev.touches[0].clientY\r\n\t\t\t\t\t};\r\n\t\t\t\telse\r\n\t\t\t\t\treturn ev;\r\n\t\t\t}, function () {\r\n\t\t\t\treturn false;\r\n\t\t\t});\r\n\t\t} else if (window.PointerEvent || window.navigator.pointerEnabled) {\r\n\t\t\tthis._touch_events([\"pointermove\", \"pointerdown\", \"pointerup\"], function (ev) {\r\n\t\t\t\tif (ev.pointerType == \"mouse\") return null;\r\n\t\t\t\treturn ev;\r\n\t\t\t}, function (ev) {\r\n\t\t\t\treturn (!ev || (ev.pointerType == \"mouse\" ));\r\n\t\t\t});\r\n\t\t} else if (window.navigator.msPointerEnabled) {\r\n\t\t\tthis._touch_events([\"MSPointerMove\", \"MSPointerDown\", \"MSPointerUp\"], function (ev) {\r\n\t\t\t\tif (ev.pointerType == ev.MSPOINTER_TYPE_MOUSE) return null;\r\n\t\t\t\treturn ev;\r\n\t\t\t}, function (ev) {\r\n\t\t\t\treturn (!ev || ev.pointerType == ev.MSPOINTER_TYPE_MOUSE);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n};\r\n\r\nscheduler._touch_events = function(names, accessor, ignore){\r\n\t//webkit on android need to be handled separately\r\n\t//var a_webkit = (navigator.userAgent.indexOf(\"Android\")!=-1) && (navigator.userAgent.indexOf(\"WebKit\")!=-1);\r\n\tvar source, tracker, timer, drag_mode, scroll_mode, action_mode;\r\n\tvar dblclicktime = 0;\r\n\r\n\tfunction attachTouchEvent(element, name, callback){\r\n\t\t//touch gestures must be disabled when ligthbox is opened\r\n\t\tscheduler.event(element, name, function(e){\r\n\t\t\tif(scheduler._is_lightbox_open()){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tif (ignore(e)) return;\r\n\t\t\t\treturn callback(e);\r\n\t\t\t}\r\n\t\t}, { passive: false });\r\n\t}\r\n\r\n\tfunction check_direction_swipe(s_ev, e_ev, step, max_dy){\r\n\t\tif (!s_ev || !e_ev) return false;\r\n\r\n\t\tvar t = s_ev.target;\r\n\t\twhile(t && t != scheduler._obj){\r\n\t\t\tt = t.parentNode;\r\n\t\t}\r\n\t\tif(t != scheduler._obj){\r\n\t\t\t//swipe outside scheduler\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// ignore swipe in horizontal timeline\r\n\t\tif(scheduler.matrix && scheduler.matrix[scheduler.getState().mode]){\r\n\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\tif(timeline.scrollable){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar dy = Math.abs(s_ev.pageY - e_ev.pageY);\r\n\t\tvar dx = Math.abs(s_ev.pageX - e_ev.pageX);\r\n\t\tif (dy < max_dy && dx>step && (!dy || (dx/dy > 3))){\r\n\t\t\tif (s_ev.pageX > e_ev.pageX) {\r\n\t\t\t\tscheduler._click.dhx_cal_next_button();\r\n\t\t\t}else {\r\n\t\t\t\tscheduler._click.dhx_cal_prev_button();\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\tfunction doMouseMove(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tvar dnd = scheduler.getState().drag_mode,\r\n\t\t\ttimeline = scheduler.matrix ? scheduler.matrix[scheduler._mode] : false;\r\n\r\n\t\tvar original_render = scheduler.render_view_data;\r\n\t\tif(dnd == 'create' && timeline){\r\n\t\t\t//suppress full redraw of timeline on creating event\r\n\t\t\tscheduler.render_view_data = function() {\r\n\t\t\t\tvar id = scheduler.getState().drag_id;\r\n\t\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\t\tvar property = timeline.y_property;\r\n\r\n\t\t\t\tvar evs = scheduler.getEvents(ev.start_date, ev.end_date);\r\n\t\t\t\tfor(var i = 0; i < evs.length; i++){\r\n\t\t\t\t\tif(evs[i][property] != ev[property]){\r\n\t\t\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tev._sorder = evs.length - 1;\r\n\t\t\t\tev._count = evs.length;\r\n\r\n\t\t\t\tthis.render_data([ev], scheduler.getState().mode);\r\n\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\tscheduler._on_mouse_move(e);\r\n\r\n\t\tif(dnd == 'create' && timeline){\r\n\t\t\tscheduler.render_view_data = original_render;\r\n\t\t}\r\n\r\n\t\tif (e.preventDefault)\r\n\t\t\te.preventDefault();\r\n\t\te.cancelBubble = true;\r\n\t\treturn false;\r\n\t}\r\n\r\n\t// touchmove\r\n\tattachTouchEvent(document.body, names[0], function(e){\r\n\t\tif (ignore(e)) return;\r\n\r\n\t\tvar acc = accessor(e);\r\n\t\tif(!acc) return;\r\n\t\tif (drag_mode){\r\n\t\t\tdoMouseMove(acc);\r\n\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._update_global_tip();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//if (tracker && a_webkit){\r\n\t\t//\tcheck_direction_swipe(tracker, accessor(e), 0);\r\n\t\t//}\r\n\r\n\t\ttracker = accessor(e);\r\n\t\t//ignore common and scrolling moves\r\n\t\tif (!action_mode) return;\r\n\r\n\t\t//multitouch\r\n\t\tif (!tracker){\r\n\t\t\tscroll_mode = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//target changed - probably in scroll mode\r\n\r\n\t\tif (source.target != tracker.target || (Math.abs(source.pageX - tracker.pageX) > 5) || (Math.abs(source.pageY - tracker.pageY) > 5)){\r\n\t\t\tscroll_mode = true;\r\n\t\t\tclearTimeout(timer);\r\n\t\t}\r\n\r\n\t});\r\n\r\n\t//attachTouchEvent(this._els[\"dhx_cal_data\"][0], \"scroll\", drag_cancel);\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], \"touchcancel\", drag_cancel);\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], \"contextmenu\", function(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tif (action_mode){\r\n\t\t\tif (e && e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t});\r\n\r\n\t// touchstart\r\n\tattachTouchEvent(this._obj, names[1], function(e){\r\n\t\t// block pull-to-refresh\r\n\t\tif(document && document.body){\r\n\t\t\tdocument.body.classList.add(\"dhx_cal_touch_active\");\r\n\t\t}\r\n\r\n\t\tif (ignore(e)) return;\r\n\t\tscheduler._pointerDragId = e.pointerId;\r\n\r\n\t\tvar fake_event;\r\n\t\tdrag_mode = scroll_mode = false;\r\n\t\taction_mode = true;\r\n\t\tfake_event = tracker = accessor(e);\r\n\r\n\t\tif (!fake_event){\r\n\t\t\tscroll_mode = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//dbl click\r\n\t\tvar now = new Date();\r\n\r\n\t\tif (!scroll_mode && !drag_mode && now - dblclicktime < 250){\r\n\t\t\tscheduler._click.dhx_cal_data(fake_event);\r\n\t\t\twindow.setTimeout(function(){\r\n\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t//fake_event.type = \"dblclick\";\r\n\t\t\t\tscheduler._on_dbl_click(fake_event);\r\n\t\t\t}, 50);\r\n\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._block_next_stop = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tdblclicktime = now;\r\n\r\n\t\t//drag\r\n\r\n\t\tif (scroll_mode || drag_mode || !scheduler.config.touch_drag)\r\n\t\t\treturn;\r\n\r\n\t\tvar actTask = scheduler._locate_event(document.activeElement);\r\n\t\tvar fakeTask = scheduler._locate_event(fake_event.target);\r\n\t\tvar sourceTask = source? scheduler._locate_event(source.target) : null;\r\n\r\n\t\tif(actTask && fakeTask && actTask == fakeTask && actTask != sourceTask)\r\n\t\t{\r\n\t\t\tif(e.preventDefault) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\tscheduler._click.dhx_cal_data(fake_event);\r\n\t\t\tsource = fake_event;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//there is no target\r\n\t\ttimer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tdrag_mode = true;\r\n\t\t\tvar target = source.target;\r\n\t\t\tvar className = scheduler._getClassName(target);\r\n\t\t\tif (target && className.indexOf(\"dhx_body\") != -1)\r\n\t\t\t\ttarget = target.previousSibling;\r\n\r\n\t\t\tscheduler._on_mouse_down(source, target);\r\n\t\t\tif (scheduler._drag_mode && scheduler._drag_mode != \"create\"){\r\n\t\t\t\tscheduler.for_rendered(scheduler._drag_id, function(node, i) {\r\n\t\t\t\t\tnode.style.display='none';\r\n\t\t\t\t\tscheduler._rendered.splice(i, 1);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (scheduler.config.touch_tip) {\r\n\t\t\t\tscheduler._show_global_tip();\r\n\t\t\t}\r\n\t\t\tscheduler.updateEvent(scheduler._drag_id);\r\n\t\t},scheduler.config.touch_drag);\r\n\r\n\t\tsource = fake_event;\r\n\t});\r\n\tfunction drag_cancel(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tscheduler._hide_global_tip();\r\n\t\tif (drag_mode){\r\n\t\t\tscheduler._on_mouse_up( accessor(e) );\r\n\t\t\tscheduler._temp_touch_block = false;\r\n\t\t}\r\n\t\tscheduler._drag_id = null;\r\n\t\tscheduler._drag_mode=null;\r\n\t\tscheduler._drag_pos=null;\r\n\t\tscheduler._pointerDragId = null;\r\n\t\tclearTimeout(timer);\r\n\t\tdrag_mode = action_mode = false;\r\n\t\tscroll_mode = true;\r\n\t}\r\n\r\n\t// touch end\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], names[2], function(e){\r\n\t\tif(document && document.body){\r\n\t\t\tdocument.body.classList.remove(\"dhx_cal_touch_active\");\r\n\t\t}\r\n\r\n\t\tif (ignore(e)) return;\r\n\r\n\t\tif(scheduler.config.touch_swipe_dates){\r\n\t\t\tif (!drag_mode && check_direction_swipe(source, tracker, 200, 100)) {\r\n\t\t\t\tscheduler._block_next_stop = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (drag_mode) {\r\n\t\t\tscheduler._ignore_next_click = true;\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\t}, 100);\r\n\t\t}\r\n\r\n\t\tdrag_cancel(e);\r\n\t\tif (scheduler._block_next_stop){\r\n\t\t\tscheduler._block_next_stop = false;\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler.event(document.body, names[2], drag_cancel);\r\n};\r\n\r\nscheduler._show_global_tip = function(){\r\n\tscheduler._hide_global_tip();\r\n\r\n\tvar toptip = scheduler._global_tip = document.createElement(\"div\");\r\n\ttoptip.className='dhx_global_tip';\r\n\r\n\tscheduler._update_global_tip(1);\r\n\r\n\tdocument.body.appendChild(toptip);\r\n};\r\nscheduler._update_global_tip = function(init){\r\n\tvar toptip = scheduler._global_tip;\r\n\tif (toptip){\r\n\t\tvar time = \"\";\r\n\t\tif (scheduler._drag_id && !init){\r\n\t\t\tvar ev = scheduler.getEvent(scheduler._drag_id);\r\n\t\t\tif (ev)\r\n\t\t\t\ttime = \"
\" + (ev._timed ? scheduler.templates.event_header(ev.start_date, ev.end_date, ev):scheduler.templates.day_date(ev.start_date, ev.end_date, ev)) + \"
\";\r\n\t\t}\r\n\r\n\t\tif (scheduler._drag_mode == \"create\" || scheduler._drag_mode == \"new-size\")\r\n\t\t\ttoptip.innerHTML = (scheduler.locale.labels.drag_to_create || \"Drag to create\")+time;\r\n\t\telse\r\n\t\t\ttoptip.innerHTML = (scheduler.locale.labels.drag_to_move || \"Drag to move\")+time;\r\n\t}\r\n};\r\nscheduler._hide_global_tip = function(){\r\n\tvar toptip = scheduler._global_tip;\r\n\tif (toptip && toptip.parentNode){\r\n\t\ttoptip.parentNode.removeChild(toptip);\r\n\t\tscheduler._global_tip = 0;\r\n\t}\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler.getRootView = function() {\r\n\treturn {\r\n\t\tview: {\r\n\t\t\trender: function(){\r\n\t\t\t\treturn {\r\n\t\t\t\t\ttag: \"div\",\r\n\t\t\t\t\ttype: 1,\r\n\t\t\t\t\tattrs: {\r\n\t\t\t\t\t\tstyle: \"width:100%;height:100%;\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\thooks: {\r\n\t\t\t\t\t\t\"didInsert\": function(){\r\n\t\t\t\t\t\t\tscheduler.setCurrentView();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tbody: [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tel: this.el,\r\n\t\t\t\t\t\t\ttype: 1\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t};\r\n\t\t\t},\r\n\t\t\tinit: function(){\r\n\t\t\t\tvar container = document.createElement(\"DIV\");\r\n\t\t\t\tcontainer.id = \"scheduler_\"+ scheduler.uid();\r\n\t\t\t\tcontainer.style.width = \"100%\";\r\n\t\t\t\tcontainer.style.height = \"100%\";\r\n\t\t\t\tcontainer.classList.add(\"dhx_cal_container\");\r\n\t\t\t\tcontainer.cmp = \"grid\";\r\n\t\t\t\tcontainer.innerHTML = '
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
';\r\n\t\t\t\tscheduler.init(container);\r\n\r\n\t\t\t\tthis.el = container;\r\n\t\t\t}\r\n\t\t},\r\n\t\ttype: 4\r\n\t};\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._addThemeClass = function(){\r\n\tdocument.documentElement.setAttribute(\"data-scheduler-theme\", scheduler.skin);\r\n};\r\n\r\nscheduler._skin_settings = {\r\n\tfix_tab_position: [1,0],\r\n\tuse_select_menu_space: [1,0],\r\n\twide_form: [1,0],\r\n\r\n\thour_size_px: [44,42],\r\n\tdisplayed_event_color: [\"#ff4a4a\", \"ffc5ab\"],\r\n\tdisplayed_event_text_color: [\"#ffef80\", \"7e2727\"]\r\n};\r\n\r\nscheduler._skin_xy = {\r\n\tlightbox_additional_height: [90,50],\r\n\tnav_height: [59,22],\r\n\tbar_height: [24,20]\r\n};\r\n\r\n// material skin uses a different box sizing model than other skins, and also requires some post-processing.\r\n// In order to render events correctly, we need to know which box sizing model is used\r\n// We can detect it by styles applied, taking into account that styles may be loaded after scheduler is rendered\r\n\r\nscheduler._is_material_skin = function(){\r\n\tif(!scheduler.skin){\r\n\t\treturn checkIfMaterialSkin();\r\n\t}else{\r\n\t\treturn ((scheduler.skin + \"\").indexOf(\"material\") > -1);\r\n\t}\r\n};\r\n\r\nfunction themeNameFromFile(){\r\n\tvar links = document.getElementsByTagName(\"link\");\r\n\tfor (var i = 0; i < links.length; i++) {\r\n\t\tvar res = links[i].href.match(\"dhtmlxscheduler_([a-z]+).css\");\r\n\t\tif (res){\r\n\t\t\treturn res[1];\r\n\t\t}\r\n\t}\r\n}\r\n\r\nscheduler._build_skin_info = function() {\r\n\tmonitorThemeChange();\r\n\tconst styles = getComputedStyle(this.$container);\r\n\tconst themeVar = styles.getPropertyValue(\"--dhx-scheduler-theme\");\r\n\r\n\tlet isCssVarTheme = !!themeVar;\r\n\tlet themeName;\r\n\tlet cssValues = {};\r\n\tlet oldMaterialTheme = false;\r\n\r\n\tif(isCssVarTheme){\r\n\t\tthemeName = themeVar;\r\n\t\tfor(let i in scheduler.xy){\r\n\t\t\tcssValues[i] = styles.getPropertyValue(`--dhx-scheduler-xy-${i}`);\r\n\t\t}\r\n\r\n\t\tcssValues.hour_size_px = styles.getPropertyValue(`--dhx-scheduler-config-hour_size_px`);\r\n\t\tcssValues.wide_form = styles.getPropertyValue(`--dhx-scheduler-config-form_wide`);\r\n\r\n\t}else{\r\n\t\tthemeName = themeNameFromFile();\r\n\t\toldMaterialTheme = scheduler._is_material_skin();\r\n\t}\r\n\r\n\r\n\tscheduler._theme_info = {\r\n\t\ttheme: themeName,\r\n\t\tcssVarTheme: isCssVarTheme,\r\n\t\toldMaterialTheme: oldMaterialTheme,\r\n\t\tvalues: cssValues\r\n\t};\r\n\r\n\tif(scheduler._theme_info.cssVarTheme){\r\n\t\tconst themeVariables = this._theme_info.values;\r\n\t\tfor(let i in scheduler.xy){\r\n\t\t\tif(!isNaN(parseInt(themeVariables[i]))){\r\n\t\t\t\tscheduler.xy[i] = parseInt(themeVariables[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n\r\nvar calculatedMaterial;\r\nfunction checkIfMaterialSkin(){\r\n\tif(calculatedMaterial === undefined){\r\n\t\tvar probe = document.createElement(\"div\");\r\n\t\tprobe.style.position = \"absolute\";\r\n\t\tprobe.style.left = \"-9999px\";\r\n\t\tprobe.style.top = \"-9999px\";\r\n\t\tprobe.innerHTML = \"
\" +\r\n\t\t\t\"
\" +\r\n\t\t\t\"
\"+\r\n\t\t\"
\";\r\n\t\tdocument.body.appendChild(probe);\r\n\t\tvar styles = window.getComputedStyle(probe.querySelector(\".dhx_cal_scale_placeholder\"));\r\n\t\tvar position = styles.getPropertyValue('position');\r\n\t\tif(position === \"absolute\"){\r\n\t\t\t// page has skins for placeholder element from material skin\r\n\t\t\tcalculatedMaterial = true;\r\n\t\t}else{\r\n\t\t\tcalculatedMaterial = false;\r\n\t\t}\r\n\r\n\t\tsetTimeout(function(){\r\n\t\t\tcalculatedMaterial = null;\r\n\t\t\tif(probe && probe.parentNode){\r\n\t\t\t\tprobe.parentNode.removeChild(probe);\r\n\t\t\t}\r\n\t\t}, 500);\r\n\t}\r\n\treturn calculatedMaterial;\r\n}\r\n\r\nvar cachedBorderBoxValue;\r\nfunction checkIfBorderBoxStyling(){\r\n\tif(scheduler._is_material_skin()){\r\n\t\treturn true;\r\n\t}else{\r\n\t\tif(cachedBorderBoxValue === undefined){\r\n\t\t\tvar probe = document.createElement(\"div\");\r\n\t\t\tprobe.style.position = \"absolute\";\r\n\t\t\tprobe.style.left = \"-9999px\";\r\n\t\t\tprobe.style.top = \"-9999px\";\r\n\t\t\tprobe.innerHTML = \"
\" +\r\n\t\t\t\t\"
\" +\r\n\t\t\t\t\t\"
\"+\r\n\t\t\t\t\"
\"+\r\n\t\t\t\"
\";\r\n\r\n\t\t\tdocument.body.appendChild(probe);\r\n\t\t\tvar styles = window.getComputedStyle(probe.querySelector(\".dhx_body\"));\r\n\t\t\tvar boxSizing = styles.getPropertyValue('box-sizing');\r\n\t\t\tdocument.body.removeChild(probe);\r\n\t\t\tcachedBorderBoxValue = !!(boxSizing === \"border-box\");\r\n\r\n\t\t\tif(!cachedBorderBoxValue){\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tcachedBorderBoxValue = undefined;\r\n\t\t\t\t}, 1000);// recalculate in case scheduler initialized before skin is loaded\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn cachedBorderBoxValue;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction refreshAfterLoad(){\r\n\tif(scheduler._is_material_skin() || scheduler._border_box_events()){\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar oldStyling = cachedBorderBoxValue;\r\n\tcachedBorderBoxValue = undefined;\r\n\tcalculatedMaterial = undefined;\r\n\tvar newStyling = checkIfBorderBoxStyling();\r\n\r\n\t// if box styling model changed - means scheduler was rendered before stylesheet was loaded or parsed inline\r\n\t// repaint scheduler in order to apply new styles\r\n\tif(oldStyling !== newStyling && scheduler.$container && scheduler.getState().mode){\r\n\t\tscheduler.setCurrentView();\r\n\t}\r\n}\r\nscheduler.event(window, 'DOMContentLoaded', refreshAfterLoad);\r\nscheduler.event(window, 'load', refreshAfterLoad);\r\n\r\nscheduler._border_box_events = function(){\r\n\treturn checkIfBorderBoxStyling();\r\n};\r\n\r\nscheduler._configure = function(col, data, skin){\r\n\tfor (var key in data)\r\n\t\tif (typeof col[key] == \"undefined\")\r\n\t\t\tcol[key] = data[key][skin];\r\n};\r\n\r\nscheduler.setSkin = function(value){\r\n\tthis.skin = value;\r\n\tscheduler._addThemeClass();\r\n\tif(scheduler.$container){\r\n\t\tthis._skin_init();\r\n\t\tthis.render();\r\n\t}\r\n\t\r\n\t//\r\n};\r\n\r\nfunction flatSkinHourScale(date){\r\n\tvar min = date.getMinutes();\r\n\tmin = min < 10 ? \"0\"+min : min;\r\n\tvar html = \"\"+ date.getHours() +\"\"+\r\n\t\t\" \"+ min +\"\";\r\n\treturn html;\r\n}\r\n\r\nlet monitorIntervalId = null;\r\nfunction monitorThemeChange(){\r\n\tconst container = scheduler.$container;\r\n\t\r\n\tclearInterval(monitorIntervalId);\r\n\tif(container){\r\n\t\tmonitorIntervalId = setInterval(() => {\r\n\t\t\tconst csstheme = getComputedStyle(container).getPropertyValue('--dhx-scheduler-theme');\r\n\t\t\tif(csstheme && csstheme !== scheduler.skin){\r\n\t\t\t\tscheduler.setSkin(csstheme);\r\n\t\t\t}\r\n\r\n\t\t}, 100);\r\n\t}\r\n}\r\nscheduler.attachEvent(\"onDestroy\", function(){\r\n\tclearInterval(monitorIntervalId);\r\n});\r\n\r\nscheduler._skin_init = function(){\r\n\tthis._build_skin_info();\r\n\r\n\tif (!this.skin){\r\n\t\tthis.skin = this._theme_info.theme;\r\n\t}\r\n\tscheduler._addThemeClass();\r\n\tif (scheduler.skin === \"flat\"){\r\n\t\t// scheduler.xy.scale_height = 35;\r\n\t\tscheduler.templates.hour_scale = flatSkinHourScale;\r\n\t}else if (scheduler.templates.hour_scale === flatSkinHourScale){\r\n\t\tscheduler.templates.hour_scale = scheduler.date.date_to_str(scheduler.config.hour_date);\r\n\t}\r\n\r\n\r\n\r\n\t//scheduler._lightbox_template=\"
 
\";\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\r\n\t\tvar date_to_str = scheduler.date.date_to_str(\"%d\");\r\n\t\tif(!scheduler.templates._old_month_day){\r\n\t\t\tscheduler.templates._old_month_day = scheduler.templates.month_day;\r\n\t\t}\r\n\t\tvar old_month_day = scheduler.templates._old_month_day;\r\n\t\tscheduler.templates.month_day = function(date) {\r\n\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\tvar label = date_to_str(date);\r\n\t\t\t\tif (date.getDate() == 1) {\r\n\t\t\t\t\tlabel = scheduler.locale.date.month_full[date.getMonth()] + \" \" + label;\r\n\t\t\t\t}\r\n\t\t\t\tif (+date == +scheduler.date.date_part(this._currentDate())) {\r\n\t\t\t\t\tlabel = scheduler.locale.labels.dhx_cal_today_button + \" \" + label;\r\n\t\t\t\t}\r\n\t\t\t\treturn label;\r\n\t\t\t} else {\r\n\t\t\t\treturn old_month_day.call(this, date);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t// tab classes\r\n\t\tif(scheduler.config.fix_tab_position){\r\n\t\t\tconst tabs = scheduler._els[\"dhx_cal_navline\"][0].querySelectorAll('[data-tab]');\r\n\t\t\ttabs.forEach((tab) => {\r\n\t\t\t\tconst view = tab.getAttribute(\"data-tab\") || tab.getAttribute(\"name\");\r\n\r\n\t\t\t\tswitch (view) {\r\n\t\t\t\t\tcase \"day\":\r\n\t\t\t\t\tcase \"day_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_first\");\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"week\":\r\n\t\t\t\t\tcase \"week_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"month\":\r\n\t\t\t\t\tcase \"month_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_last\");\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_standalone\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\treorderTabs(scheduler._els[\"dhx_cal_navline\"][0]);\r\n\r\n\t\t}\r\n\t}, {once: true});\r\n\r\n\tfunction reorderTabs(container) {\r\n\t\t// segmented tabs should go first\r\n\r\n\t\tif(scheduler.config.header){\r\n\t\t\treturn;\r\n\t\t\t// don't reorder tabs if header is defined via config\r\n\t\t}\r\n\t\tconst tabs = Array.from(container.querySelectorAll('.dhx_cal_tab'));\r\n\t\r\n\t\t// segmented tabs\r\n\t\tconst order = ['day', 'week', 'month'];\r\n\t\r\n\t\tconst specialTabs = order.map(tabName => \r\n\t\t\ttabs.find(tab => tab.getAttribute('data-tab') === tabName)\r\n\t\t).filter(tab => tab !== undefined);\r\n\t\r\n\t\tlet firstTab = tabs.length > 0 ? tabs[0] : null;\r\n\r\n\t\tspecialTabs.reverse().forEach(tab => {\r\n\t\t\tcontainer.insertBefore(tab, firstTab);\r\n\t\t\tfirstTab = tab;\r\n\t\t});\r\n\t}\r\n\r\n\t// scheduler._skin_init = function(){\r\n\t// \tthis._build_skin_info();\r\n\t// \tthis.skin = this._theme_info.theme;\r\n\t// };\r\n};\r\n\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nif (window.jQuery){\r\n\r\n(function( $ ){\r\n\tvar counter = 0;\r\n\tvar methods = [];\r\n\t$.fn.dhx_scheduler = function(config){\r\n\t\tif (typeof(config) === 'string') {\r\n\t\t\tif (methods[config] ) {\r\n\t\t\t\treturn methods[config].apply(this, []);\r\n\t\t\t}else {\r\n\t\t\t\t$.error('Method ' + config + ' does not exist on jQuery.dhx_scheduler');\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvar views = [];\r\n\t\t\tthis.each(function() {\r\n\t\t\t\tif (this && this.getAttribute){\r\n\t\t\t\t\tif (!this.getAttribute(\"dhxscheduler\")){\r\n\t\t\t\t\t\tvar name = \"scheduler\";\r\n\t\t\t\t\t\tif (counter){\r\n\t\t\t\t\t\t\tname = \"scheduler\" + (counter+1);\r\n\t\t\t\t\t\t\twindow[name] = Scheduler.getSchedulerInstance();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tvar comp = window[name];\r\n\r\n\t\t\t\t\t\tthis.setAttribute(\"dhxscheduler\", name);\r\n\t\t\t\t\t\tfor (var key in config)\r\n\t\t\t\t\t\t\tif (key!=\"data\")\r\n\t\t\t\t\t\t\t\tcomp.config[key] = config[key];\r\n\r\n\t\t\t\t\t\tif (!this.getElementsByTagName(\"div\").length){\r\n\t\t\t\t\t\t\tthis.innerHTML = '
';\r\n\t\t\t\t\t\t\tthis.className += \" dhx_cal_container\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcomp.init(this, comp.config.date, comp.config.mode);\r\n\t\t\t\t\t\tif (config.data)\r\n\t\t\t\t\t\t\tcomp.parse(config.data);\r\n\r\n\t\t\t\t\t\tviews.push(comp);\r\n\t\t\t\t\t\tcounter++;\r\n\t\t\t\t\t} else\r\n\t\t\t\t\t\tviews.push(window[this.getAttribute(\"dhxscheduler\")]);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif (views.length === 1) return views[0];\r\n\t\t\treturn views;\r\n\t\t}\r\n\t};\r\n\r\n\r\n\r\n\r\n})(window.jQuery);\r\n\r\n}\r\n\r\n}","import global from \"../global\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\n(function(){\r\n\r\n\tvar setCurrentView = scheduler.setCurrentView,\r\n\t\tupdateView = scheduler.updateView;\r\n\tvar update_view_timer = null,\r\n\t\tcurr_view_timer = null;\r\n\r\n\tvar lazy_setCurrentView = function(date, mode){\r\n\t\tvar self = this;\r\n\t\tglobal.clearTimeout(curr_view_timer);\r\n\t\tglobal.clearTimeout(update_view_timer);\r\n\r\n\t\tvar oldDate = self._date,\r\n\t\t\toldMode = self._mode;\r\n\t\tupdateFlags(this, date, mode);\r\n\r\n\t\tcurr_view_timer = setTimeout(function(){\r\n\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif (!self.callEvent(\"onBeforeViewChange\", [oldMode, oldDate, mode || self._mode, date || self._date])){\r\n\t\t\t\tupdateFlags(self, oldDate, oldMode);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tupdateView.call(self, date, mode);\r\n\t\t\tself.callEvent(\"onViewChange\", [self._mode, self._date]);\r\n\r\n\t\t\tglobal.clearTimeout(update_view_timer);\r\n\t\t\tcurr_view_timer = 0;\r\n\t\t}, scheduler.config.delay_render);\r\n\t};\r\n\tvar lazy_updateView = function(date, mode){\r\n\t\tvar self = this,\r\n\t\t\tars = arguments;\r\n\r\n\t\tupdateFlags(this, date, mode);\r\n\r\n\t\tglobal.clearTimeout(update_view_timer);\r\n\t\tupdate_view_timer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif(curr_view_timer)\r\n\t\t\t\treturn;\r\n\r\n\t\t\tupdateView.apply(self, ars);\r\n\t\t}, scheduler.config.delay_render);\r\n\t};\r\n\tfunction updateFlags(scheduler, date, mode){\r\n\t\tif(date)\r\n\t\t\tscheduler._date = date;\r\n\t\tif(mode)\r\n\t\t\tscheduler._mode = mode;\r\n\r\n\t}\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\tif(scheduler.config.delay_render){\r\n\t\t\tscheduler.setCurrentView = lazy_setCurrentView;\r\n\t\t\tscheduler.updateView = lazy_updateView;\r\n\t\t}else{\r\n\t\t\tscheduler.setCurrentView = setCurrentView;\r\n\t\t\tscheduler.updateView = updateView;\r\n\t\t}\r\n\t});\r\n\r\n})();\r\n\r\n}","export default function DataProcessorEvents(scheduler, dp){\r\n\tthis.$scheduler = scheduler;\r\n\tthis.$dp = dp;\r\n\tthis._dataProcessorHandlers = [];\r\n\r\n\tthis.attach = function () {\r\n\t\tvar dp = this.$dp;\r\n\t\tvar scheduler = this.$scheduler;\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onEventAdded\", function(id) {\r\n\t\t\tif (!this._loading && this._validId(id))\r\n\t\t\tdp.setUpdated(id,true,\"inserted\");\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function(id) {\r\n\t\t\tif (!this._validId(id)) return;\r\n\t\t\tvar z=dp.getState(id);\r\n\r\n\t\t\tif (z==\"inserted\" || this._new_event) { dp.setUpdated(id,false); return true; }\r\n\t\t\tif (z==\"deleted\") return false;\r\n\t\t\tif (z==\"true_deleted\") return true;\r\n\r\n\t\t\tdp.setUpdated(id,true,\"deleted\");\r\n\t\t\treturn false;\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onEventChanged\", function(id) { \r\n\t\t\tif (!this._loading && this._validId(id))\r\n\t\t\tdp.setUpdated(id,true,\"updated\");\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onClearAll\", function() { \r\n\t\t\t// clear dataprocessor state when scheduler is reset\r\n\t\t\tdp._in_progress={};\r\n\t\t\tdp._invalid={};\r\n\t\t\tdp.updatedRows = [];\r\n\t\t\tdp._waitMode = 0;\r\n\t\t}));\r\n\r\n\t\tdp.attachEvent(\"insertCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"updateCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"deleteCallback\", function(upd, id) {\r\n\t\t\tif (scheduler.getEvent(id)){\r\n\t\t\t\tscheduler.setUserData(id, this.action_param, \"true_deleted\");\r\n\t\t\t\tscheduler.deleteEvent(id);\r\n\t\t\t} else if (scheduler._add_rec_marker)\r\n\t\t\t\tscheduler._update_callback(upd, id);\r\n\t\t});\r\n\t};\r\n\r\n\tthis.detach = function () {\r\n\t\tfor (var key in this._dataProcessorHandlers) {\r\n\t\t\tvar handler = this._dataProcessorHandlers[key];\r\n\t\t\tthis.$scheduler.detachEvent(handler);\r\n\t\t}\r\n\t\tthis._dataProcessorHandlers = [];\r\n\t};\r\n}\r\n\r\nexport function extendScheduler(scheduler, dp){\r\n\tscheduler._validId=function(id){\r\n\t\tif(this._is_virtual_event){\r\n\t\t\treturn !this._is_virtual_event(id);\r\n\t\t}\r\n\t\treturn true;\r\n\t};\r\n\tscheduler.setUserData=function(id,name,value){\r\n\t\tif (id){\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif(ev) ev[name]=value;\r\n\t\t}else{\r\n\t\t\tthis._userdata[name]=value;\r\n\t\t}\r\n\t};\r\n\tscheduler.getUserData=function(id,name){\r\n\t\tif (id){\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif(ev)\r\n\t\t\t\treturn ev[name];\r\n\t\t\telse\r\n\t\t\t\treturn null;\r\n\t\t}else{\r\n\t\t\treturn this._userdata[name];\r\n\t\t}\r\n\t};\r\n\tscheduler._set_event_text_style=function(id,style){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\t\tthis.for_rendered(id,function(r){\r\n\t\t\tr.style.cssText+=\";\"+style;\r\n\t\t});\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tev[\"_text_style\"]=style;\r\n\t\tthis.event_updated(ev);\r\n\t};\r\n\tscheduler._update_callback = function(upd,id){\r\n\t\tvar data = scheduler._xmlNodeToJSON(upd.firstChild);\r\n\t\t//fix for updates of recurring events\r\n\t\tif (data.rec_type == \"none\") data.rec_pattern = \"none\";\r\n\t\tdata.text = data.text||data._tagvalue;\r\n\t\tdata.start_date = scheduler._helpers.parseDate(data.start_date);\r\n\t\tdata.end_date = scheduler._helpers.parseDate(data.end_date);\r\n\t\tscheduler.addEvent(data);\r\n\t\tif (scheduler._add_rec_marker)\r\n\t\t\tscheduler.setCurrentView();\r\n\t};\r\n\tscheduler._dp_change_event_id = function(id, new_id){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\t\tscheduler.changeEventId(id, new_id);\r\n\t};\r\n\tscheduler._dp_hook_delete = function(id, new_id){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\r\n\t\tif(new_id && id != new_id){\r\n\t\t\tif(this.getUserData(id, dp.action_param) == \"true_deleted\")\r\n\t\t\t\tthis.setUserData(id, dp.action_param, \"updated\");\r\n\r\n\t\t\tthis.changeEventId(id, new_id);\r\n\t\t}\r\n\t\treturn this.deleteEvent(new_id, true);\r\n\t};\r\n\r\n\tscheduler.setDp = function() {\r\n\t\tthis._dp = dp;\r\n\t};\r\n\tscheduler.setDp();\r\n}","import DataProcessorEvents from \"./dataprocessor_hooks\";\r\nimport { extendScheduler } from \"./dataprocessor_hooks\";\r\nimport eventable from \"../../utils/eventable\";\r\nimport global from \"../../global\";\r\n\r\n/**\r\n *\t@desc: constructor, data processor object\r\n *\t@param: serverProcessorURL - url used for update\r\n *\t@type: public\r\n */\r\nexport function DataProcessor(serverProcessorURL){\r\n\tthis.serverProcessor = serverProcessorURL;\r\n\tthis.action_param = \"!nativeeditor_status\";\r\n\r\n\tthis.object = null;\r\n\tthis.updatedRows = []; // ids of updated rows\r\n\r\n\tthis.autoUpdate = true;\r\n\tthis.updateMode = \"cell\";\r\n\tthis._tMode = \"GET\";\r\n\tthis._headers = null;\r\n\tthis._payload = null;\r\n\tthis.post_delim = \"_\";\r\n\r\n\tthis._waitMode = 0;\r\n\tthis._in_progress = {};\r\n\tthis._invalid = {};\r\n\tthis.messages = [];\r\n\r\n\tthis.styles = {\r\n\t\tupdated: \"font-weight:bold;\",\r\n\t\tinserted: \"font-weight:bold;\",\r\n\t\tdeleted: \"text-decoration : line-through;\",\r\n\t\tinvalid: \"background-color:FFE0E0;\",\r\n\t\tinvalid_cell: \"border-bottom:2px solid red;\",\r\n\t\terror: \"color:red;\",\r\n\t\tclear: \"font-weight:normal;text-decoration:none;\"\r\n\t};\r\n\tthis.enableUTFencoding(true);\r\n\teventable(this); // TODO: need to update\r\n\r\n\treturn this;\r\n}\r\nDataProcessor.prototype = {\r\n\tsetTransactionMode: function (mode, total) {\r\n\t\tif (typeof mode == \"object\") {\r\n\t\t\tthis._tMode = mode.mode || this._tMode;\r\n\r\n\t\t\tif (mode.headers !== undefined) {\r\n\t\t\t\tthis._headers = mode.headers;\r\n\t\t\t}\r\n\r\n\t\t\tif (mode.payload !== undefined) {\r\n\t\t\t\tthis._payload = mode.payload;\r\n\t\t\t}\r\n\t\t\tthis._tSend = !!total;\r\n\t\t} else {\r\n\t\t\tthis._tMode = mode;\r\n\t\t\tthis._tSend = total;\r\n\t\t}\r\n\r\n\t\tif (this._tMode == \"REST\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t}\r\n\r\n\t\tif (this._tMode === \"JSON\" || this._tMode === \"REST-JSON\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t\tthis._serializeAsJson = true;\r\n\t\t\tthis._headers = this._headers || {};\r\n\t\t\tthis._headers[\"Content-Type\"] = \"application/json\";\r\n\t\t}else{\r\n\t\t\tif(this._headers && !this._headers[\"Content-Type\"]){\r\n\t\t\t\tthis._headers[\"Content-Type\"] = \"application/x-www-form-urlencoded\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (this._tMode === \"CUSTOM\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t\tthis._router = mode.router;\r\n\t\t}\r\n\t},\r\n\tescape: function (data) {\r\n\t\tif (this._utf)\r\n\t\t\treturn encodeURIComponent(data);\r\n\t\telse\r\n\t\t\treturn escape(data);\r\n\t},\r\n\t/**\r\n\t *\t@desc: allows to set escaping mode\r\n\t *\t@param: true - utf based escaping, simple - use current page encoding\r\n\t *\t@type: public\r\n\t */\r\n\tenableUTFencoding: function (mode) {\r\n\t\tthis._utf = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: allows to define, which column may trigger update\r\n\t *\t@param: val - array or list of true/false values\r\n\t *\t@type: public\r\n\t */\r\n\tsetDataColumns: function (val) {\r\n\t\tthis._columns = (typeof val == \"string\") ? val.split(\",\") : val;\r\n\t},\r\n\t/**\r\n\t *\t@desc: get state of updating\r\n\t *\t@returns: true - all in sync with server, false - some items not updated yet.\r\n\t *\t@type: public\r\n\t */\r\n\tgetSyncState: function () {\r\n\t\treturn !this.updatedRows.length;\r\n\t},\r\n\t/**\r\n\t *\t@desc: enable/disable named field for data syncing, will use column ids for grid\r\n\t *\t@param: mode - true/false\r\n\t *\t@type: public\r\n\t */\r\n\tenableDataNames: function (mode) {\r\n\t\tthis._endnm = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: enable/disable mode , when only changed fields and row id send to the server side, instead of all fields in default mode\r\n\t *\t@param: mode - true/false\r\n\t *\t@type: public\r\n\t */\r\n\tenablePartialDataSend: function (mode) {\r\n\t\tthis._changed = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: set if rows should be send to server automatically\r\n\t *\t@param: mode - \"row\" - based on row selection changed, \"cell\" - based on cell editing finished, \"off\" - manual data sending\r\n\t *\t@type: public\r\n\t */\r\n\tsetUpdateMode: function (mode, dnd) {\r\n\t\tthis.autoUpdate = (mode == \"cell\");\r\n\t\tthis.updateMode = mode;\r\n\t\tthis.dnd = dnd;\r\n\t},\r\n\tignore: function (code, master) {\r\n\t\tthis._silent_mode = true;\r\n\t\tcode.call(master || window);\r\n\t\tthis._silent_mode = false;\r\n\t},\r\n\t/**\r\n\t *\t@desc: mark row as updated/normal. check mandatory fields,initiate autoupdate (if turned on)\r\n\t *\t@param: rowId - id of row to set update-status for\r\n\t *\t@param: state - true for \"updated\", false for \"not updated\"\r\n\t *\t@param: mode - update mode name\r\n\t *\t@type: public\r\n\t */\r\n\tsetUpdated: function (rowId, state, mode) {\r\n\t\tif (this._silent_mode) return;\r\n\t\tvar ind = this.findRow(rowId);\r\n\r\n\t\tmode = mode || \"updated\";\r\n\t\tvar existing = this.$scheduler.getUserData(rowId, this.action_param);\r\n\t\tif (existing && mode == \"updated\") mode = existing;\r\n\t\tif (state) {\r\n\t\t\tthis.set_invalid(rowId, false); //clear previous error flag\r\n\t\t\tthis.updatedRows[ind] = rowId;\r\n\t\t\tthis.$scheduler.setUserData(rowId, this.action_param, mode);\r\n\t\t\tif (this._in_progress[rowId])\r\n\t\t\t\tthis._in_progress[rowId] = \"wait\";\r\n\t\t} else {\r\n\t\t\tif (!this.is_invalid(rowId)) {\r\n\t\t\t\tthis.updatedRows.splice(ind, 1);\r\n\t\t\t\tthis.$scheduler.setUserData(rowId, this.action_param, \"\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.markRow(rowId, state, mode);\r\n\t\tif (state && this.autoUpdate) this.sendData(rowId);\r\n\t},\r\n\r\n\tmarkRow: function (id, state, mode) {\r\n\t\tvar str = \"\";\r\n\t\tvar invalid = this.is_invalid(id);\r\n\t\tif (invalid) {\r\n\t\t\tstr = this.styles[invalid];\r\n\t\t\tstate = true;\r\n\t\t}\r\n\t\tif (this.callEvent(\"onRowMark\", [id, state, mode, invalid])) {\r\n\t\t\t//default logic\r\n\t\t\tstr = this.styles[state ? mode : \"clear\"] + str;\r\n\r\n\t\t\tthis.$scheduler[this._methods[0]](id, str);\r\n\r\n\t\t\tif (invalid && invalid.details) {\r\n\t\t\t\tstr += this.styles[invalid + \"_cell\"];\r\n\t\t\t\tfor (var i = 0; i < invalid.details.length; i++)\r\n\t\t\t\t\tif (invalid.details[i])\r\n\t\t\t\t\t\tthis.$scheduler[this._methods[1]](id, i, str);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tgetActionByState: function(state) {\r\n\t\tif (state === \"inserted\") {\r\n\t\t\treturn \"create\";\r\n\t\t}\r\n\t\tif (state === \"updated\") {\r\n\t\t\treturn \"update\";\r\n\t\t}\r\n\t\tif (state === \"deleted\") {\r\n\t\t\treturn \"delete\";\r\n\t\t}\r\n\t\treturn \"update\";\r\n\t},\r\n\r\n\tgetState: function (id) {\r\n\t\treturn this.$scheduler.getUserData(id, this.action_param);\r\n\t},\r\n\tis_invalid: function (id) {\r\n\t\treturn this._invalid[id];\r\n\t},\r\n\tset_invalid: function (id, mode, details) {\r\n\t\tif (details) mode = {\r\n\t\t\tvalue: mode, details: details, toString: function () {\r\n\t\t\t\treturn this.value.toString();\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis._invalid[id] = mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: check mandatory fields and varify values of cells, initiate update (if specified)\r\n\t *\t@param: rowId - id of row to set update-status for\r\n\t *\t@type: public\r\n\t */\r\n\tcheckBeforeUpdate: function (rowId) {\r\n\t\treturn true;\r\n\t},\r\n\t/**\r\n\t *\t@desc: send row(s) values to server\r\n\t *\t@param: rowId - id of row which data to send. If not specified, then all \"updated\" rows will be send\r\n\t *\t@type: public\r\n\t */\r\n\tsendData: function (rowId) {\r\n\t\tif (this.$scheduler.editStop) this.$scheduler.editStop();\r\n\r\n\t\tif (typeof rowId == \"undefined\" || this._tSend) return this.sendAllData();\r\n\t\tif (this._in_progress[rowId]) return false;\r\n\r\n\t\tthis.messages = [];\r\n\t\tif (!this.checkBeforeUpdate(rowId) && this.callEvent(\"onValidationError\", [rowId, this.messages])) return false;\r\n\t\tthis._beforeSendData(this._getRowData(rowId), rowId);\r\n\t},\r\n\t_beforeSendData: function (data, rowId) {\r\n\t\tif (!this.callEvent(\"onBeforeUpdate\", [rowId, this.getState(rowId), data])) return false;\r\n\t\tthis._sendData(data, rowId);\r\n\t},\r\n\tserialize: function (data, id) {\r\n\t\tif (this._serializeAsJson) {\r\n\t\t\treturn this._serializeAsJSON(data);\r\n\t\t}\r\n\r\n\t\tif (typeof data == \"string\")\r\n\t\t\treturn data;\r\n\t\tif (typeof id != \"undefined\")\r\n\t\t\treturn this.serialize_one(data, \"\");\r\n\t\telse {\r\n\t\t\tvar stack = [];\r\n\t\t\tvar keys = [];\r\n\t\t\tfor (var key in data)\r\n\t\t\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\t\t\tstack.push(this.serialize_one(data[key], key + this.post_delim));\r\n\t\t\t\t\tkeys.push(key);\r\n\t\t\t\t}\r\n\t\t\tstack.push(\"ids=\" + this.escape(keys.join(\",\")));\r\n\t\t\tif (this.$scheduler.security_key)\r\n\t\t\t\tstack.push(\"dhx_security=\" + (this.$scheduler.security_key));\r\n\t\t\treturn stack.join(\"&\");\r\n\t\t}\r\n\t},\r\n\tserialize_one: function (data, pref) {\r\n\t\tif (typeof data == \"string\")\r\n\t\t\treturn data;\r\n\t\tvar stack = [];\r\n\t\tvar serialized = \"\";\r\n\t\tfor (var key in data)\r\n\t\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\t\tif ((key == \"id\" || key == this.action_param) && this._tMode == \"REST\") continue;\r\n\t\t\t\tif (typeof data[key] === \"string\" || typeof data[key] === \"number\") {\r\n\t\t\t\t\tserialized = data[key];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tserialized = JSON.stringify(data[key]);\r\n\t\t\t\t}\r\n\t\t\t\tstack.push(this.escape((pref || \"\") + key) + \"=\" + this.escape(serialized));\r\n\t\t\t}\r\n\t\treturn stack.join(\"&\");\r\n\t},\r\n\t_applyPayload: function (url) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tif (this._payload)\r\n\t\t\tfor (var key in this._payload)\r\n\t\t\t\turl = url + ajax.urlSeparator(url) + this.escape(key) + \"=\" + this.escape(this._payload[key]);\r\n\t\treturn url;\r\n\t},\r\n\t_sendData: function (dataToSend, rowId) {\r\n\t\tif (!dataToSend) {\r\n\t\t\treturn; // nothing to send\r\n\t\t}\r\n\t\tif (!this.callEvent(\"onBeforeDataSending\", rowId ? [rowId, this.getState(rowId), dataToSend] : [null, null, dataToSend])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (rowId) {\r\n\t\t\tthis._in_progress[rowId] = (new Date()).valueOf();\r\n\t\t}\r\n\r\n\t\tvar self = this;\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\r\n\t\tif (this._tMode === \"CUSTOM\") {\r\n\t\t\tvar state = this.getState(rowId);\r\n\t\t\tvar action = this.getActionByState(state);\r\n\t\t\tvar _onResolvedCreateUpdate = function (tag) {\r\n\t\t\t\tvar resultState = state;\r\n\t\t\t\tif(tag && tag.responseText && tag.setRequestHeader){\r\n\t\t\t\t\tif(tag.status !== 200){\r\n\t\t\t\t\t\tresultState = \"error\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\ttag = JSON.parse(tag.responseText);\r\n\t\t\t\t\t} catch (e){}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tresultState = resultState || \"updated\";\r\n\t\t\t\tvar sid = rowId;\r\n\t\t\t\tvar tid = rowId;\r\n\r\n\t\t\t\tif (tag) {\r\n\t\t\t\t\tresultState = tag.action || resultState;\r\n\t\t\t\t\tsid = tag.sid || sid;\r\n\t\t\t\t\ttid = tag.id || tag.tid || tid;\r\n\t\t\t\t}\r\n\t\t\t\tself.afterUpdateCallback(sid, tid, resultState, tag);\r\n\t\t\t};\r\n\r\n\t\t\tconst routerMode = \"event\";\r\n\t\t\tvar actionPromise;\r\n\t\t\tif (this._router instanceof Function) {\r\n\t\t\t\tactionPromise = this._router(routerMode, action, dataToSend, rowId);\r\n\t\t\t} else {\r\n\t\t\t\tswitch (state) {\r\n\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].create(dataToSend);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].delete(rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].update(dataToSend, rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(actionPromise){\r\n\t\t\t\t// neither promise nor {tid: newId} response object\r\n\t\t\t\tif(!actionPromise.then &&\r\n\t\t\t\t\t(actionPromise.id === undefined && actionPromise.tid === undefined && actionPromise.action === undefined)){\r\n\t\t\t\t\tthrow new Error(\"Incorrect router return value. A Promise or a response object is expected\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(actionPromise.then){\r\n\t\t\t\t\tactionPromise.then(_onResolvedCreateUpdate).catch(function(error) {\r\n\t\t\t\t\t\tif(error && error.action){\r\n\t\t\t\t\t\t\t_onResolvedCreateUpdate(error);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t_onResolvedCreateUpdate({ action: \"error\", value: error});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// custom method may return a response object in case of sync action\r\n\t\t\t\t\t_onResolvedCreateUpdate(actionPromise);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t_onResolvedCreateUpdate(null);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar queryParams = {\r\n\t\t\tcallback: function(xml) {\r\n\t\t\t\tvar ids = [];\r\n\r\n\t\t\t\tif (rowId) {\r\n\t\t\t\t\tids.push(rowId);\r\n\t\t\t\t} else if (dataToSend) {\r\n\t\t\t\t\tfor (var key in dataToSend) {\r\n\t\t\t\t\t\tids.push(key);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.afterUpdate(self, xml, ids);\r\n\t\t\t},\r\n\t\t\theaders: self._headers\r\n\t\t};\r\n\r\n\t\tvar urlParams = this.serverProcessor + (this._user ? (ajax.urlSeparator(this.serverProcessor) + [\"dhx_user=\" + this._user, \"dhx_version=\" + this.$scheduler.getUserData(0, \"version\")].join(\"&\")) : \"\");\r\n\t\tvar url = this._applyPayload(urlParams);\r\n\t\tvar data;\r\n\r\n\t\tswitch (this._tMode) {\r\n\t\t\tcase \"GET\":\r\n\t\t\t\tdata = this._cleanupArgumentsBeforeSend(dataToSend);\r\n\t\t\t\tqueryParams.url = url + ajax.urlSeparator(url) + this.serialize(data, rowId);\r\n\t\t\t\tqueryParams.method = \"GET\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"POST\":\r\n\t\t\t\tdata = this._cleanupArgumentsBeforeSend(dataToSend);\r\n\t\t\t\tqueryParams.url = url;\r\n\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\tqueryParams.data = this.serialize(data, rowId);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"JSON\":\r\n\t\t\t\tdata = {};\r\n\t\t\t\tvar preprocessedData = this._cleanupItemBeforeSend(dataToSend);\r\n\t\t\t\tfor (var key in preprocessedData) {\r\n\t\t\t\t\tif (key === this.action_param || key === \"id\" || key === \"gr_id\") {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdata[key] = preprocessedData[key];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tqueryParams.url = url;\r\n\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\tqueryParams.data = JSON.stringify({\r\n\t\t\t\t\tid: rowId,\r\n\t\t\t\t\taction: dataToSend[this.action_param],\r\n\t\t\t\t\tdata: data\r\n\t\t\t\t});\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"REST\":\r\n\t\t\tcase \"REST-JSON\":\r\n\t\t\t\turl = urlParams.replace(/(&|\\?)editing=true/, \"\");\r\n\t\t\t\tdata = \"\";\r\n\r\n\t\t\t\tswitch (this.getState(rowId)) {\r\n\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\t\t\tqueryParams.data = this.serialize(dataToSend, rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\tqueryParams.method = \"DELETE\";\r\n\t\t\t\t\t\turl = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + rowId;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tqueryParams.method = \"PUT\";\r\n\t\t\t\t\t\tqueryParams.data = this.serialize(dataToSend, rowId);\r\n\t\t\t\t\t\turl = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + rowId;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tqueryParams.url = this._applyPayload(url);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tthis._waitMode++;\r\n\t\treturn ajax.query(queryParams);\r\n\t},\r\n\tsendAllData: function () {\r\n\t\tif (!this.updatedRows.length || this.updateMode === \"off\") { // FIXME: need to leave checking 'this.updateMode === \"off\"'?\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.messages = [];\r\n\t\tvar valid = true;\r\n\r\n\t\tthis._forEachUpdatedRow(function(rowId) {\r\n\t\t\tvalid = valid && this.checkBeforeUpdate(rowId);\r\n\t\t});\r\n\r\n\t\tif (!valid && !this.callEvent(\"onValidationError\", [\"\", this.messages])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (this._tSend) {\r\n\t\t\tthis._sendData(this._getAllData());\r\n\t\t} else {\r\n\t\t\tthis._forEachUpdatedRow(function(rowId) {\r\n\t\t\t\tif (!this._in_progress[rowId]) {\r\n\t\t\t\t\tif (this.is_invalid(rowId)) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis._beforeSendData(this._getRowData(rowId), rowId);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\t_getAllData: function (rowId) {\r\n\t\tvar out = {};\r\n\t\tvar has_one = false;\r\n\t\tthis._forEachUpdatedRow(function(id) {\r\n\t\t\tif (this._in_progress[id] || this.is_invalid(id)){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar row = this._getRowData(id);\r\n\t\t\tif (!this.callEvent(\"onBeforeUpdate\", [id, this.getState(id), row])) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tout[id] = row;\r\n\t\t\thas_one = true;\r\n\t\t\tthis._in_progress[id] = (new Date()).valueOf();\r\n\t\t});\r\n\t\treturn has_one ? out : null;\r\n\t},\r\n\r\n\tfindRow: function (pattern) {\r\n\t\tvar i = 0;\r\n\t\tfor (i = 0; i < this.updatedRows.length; i++)\r\n\t\t\tif (pattern == this.updatedRows[i]) break;\r\n\t\treturn i;\r\n\t},\r\n\r\n\t/**\r\n\t *\t@desc: define custom actions\r\n\t *\t@param: name - name of action, same as value of action attribute\r\n\t *\t@param: handler - custom function, which receives a XMl response content for action\r\n\t *\t@type: private\r\n\t */\r\n\tdefineAction: function (name, handler) {\r\n\t\tif (!this._uActions) this._uActions = {};\r\n\t\tthis._uActions[name] = handler;\r\n\t},\r\n\r\n\t/**\r\n\t *\t @desc: used in combination with setOnBeforeUpdateHandler to create custom client-server transport system\r\n\t *\t @param: sid - id of item before update\r\n\t *\t @param: tid - id of item after up0ate\r\n\t *\t @param: action - action name\r\n\t *\t @type: public\r\n\t *\t @topic: 0\r\n\t */\r\n\tafterUpdateCallback: function (sid, tid, action, btag) {\r\n\t\tif(!this.$scheduler){\r\n\t\t\t// destructor has been called before the callback\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar marker = sid;\r\n\t\tvar correct = (action !== \"error\" && action !== \"invalid\");\r\n\t\tif (!correct) {\r\n\t\t\tthis.set_invalid(sid, action);\r\n\t\t}\r\n\t\tif ((this._uActions) && (this._uActions[action]) && (!this._uActions[action](btag))) {\r\n\t\t\treturn (delete this._in_progress[marker]);\r\n\t\t}\r\n\r\n\t\tif (this._in_progress[marker] !== \"wait\") {\r\n\t\t\tthis.setUpdated(sid, false);\r\n\t\t}\r\n\r\n\t\tvar originalSid = sid;\r\n\r\n\t\tswitch (action) {\r\n\t\t\tcase \"inserted\":\r\n\t\t\tcase \"insert\":\r\n\t\t\t\tif (tid != sid) {\r\n\t\t\t\t\tthis.setUpdated(sid, false);\r\n\t\t\t\t\tthis.$scheduler[this._methods[2]](sid, tid);\r\n\t\t\t\t\tsid = tid;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"delete\":\r\n\t\t\tcase \"deleted\":\r\n\t\t\t\tthis.$scheduler.setUserData(sid, this.action_param, \"true_deleted\");\r\n\t\t\t\tthis.$scheduler[this._methods[3]](sid, tid);\r\n\t\t\t\tdelete this._in_progress[marker];\r\n\t\t\t\treturn this.callEvent(\"onAfterUpdate\", [sid, action, tid, btag]);\r\n\t\t}\r\n\r\n\t\tif (this._in_progress[marker] !== \"wait\") {\r\n\t\t\tif (correct) {\r\n\t\t\t\tthis.$scheduler.setUserData(sid, this.action_param, \"\");\r\n\t\t\t}\r\n\t\t\tdelete this._in_progress[marker];\r\n\t\t} else {\r\n\t\t\tdelete this._in_progress[marker];\r\n\t\t\tthis.setUpdated(tid, true, this.$scheduler.getUserData(sid, this.action_param));\r\n\t\t}\r\n\r\n\t\tthis.callEvent(\"onAfterUpdate\", [originalSid, action, tid, btag]);\r\n\t},\r\n\r\n\t_errorResponse: function (xml, id){\r\n\t\tif(this.$scheduler && this.$scheduler.callEvent){\r\n\t\t\tthis.$scheduler.callEvent(\"onSaveError\", [id, xml.xmlDoc]);\r\n\t\t}\r\n\t\treturn this.cleanUpdate(id);\r\n\t},\r\n\r\n\t_setDefaultTransactionMode: function () {\r\n\t\tif (this.serverProcessor) {\r\n\t\t\tthis.setTransactionMode(\"POST\", true);\r\n\t\t\tthis.serverProcessor += (this.serverProcessor.indexOf(\"?\") !== -1 ? \"&\" : \"?\") + \"editing=true\";\r\n\t\t\tthis._serverProcessor = this.serverProcessor;\r\n\t\t}\r\n\t},\r\n\t\r\n\t/**\r\n\t *\t@desc: response from server\r\n\t *\t@param: xml - XMLLoader object with response XML\r\n\t *\t@type: private\r\n\t */\r\n\tafterUpdate: function (that, xml, id) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\r\n\t\tif (xml.xmlDoc.status !== 200){\r\n\t\t\tthis._errorResponse(xml, id);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// try to use json first\r\n\t\tvar tag;\r\n\t\ttry {\r\n\t\t\ttag = JSON.parse(xml.xmlDoc.responseText);\r\n\t\t} catch (e) {\r\n\t\t\t// empty response also can be processed by json handler\r\n\t\t\tif (!xml.xmlDoc.responseText.length) {\r\n\t\t\t\ttag = {};\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (tag) {\r\n\t\t\tvar action = tag.action || this.getState(id) || \"updated\";\r\n\t\t\tvar sid = tag.sid || id[0];\r\n\t\t\tvar tid = tag.tid || id[0];\r\n\t\t\tthat.afterUpdateCallback(sid, tid, action, tag);\r\n\t\t\tthat.finalizeUpdate();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// xml response\r\n\t\tvar top = ajax.xmltop(\"data\", xml.xmlDoc); // fix incorrect content type in IE\r\n\t\tif (!top) {\r\n\t\t\treturn this._errorResponse(xml, id);\r\n\t\t}\r\n\t\tvar atag = ajax.xpath(\"//data/action\", top);\r\n\t\tif (!atag.length) {\r\n\t\t\treturn this._errorResponse(xml, id);\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < atag.length; i++) {\r\n\t\t\tvar btag = atag[i];\r\n\t\t\tvar action = btag.getAttribute(\"type\");\r\n\t\t\tvar sid = btag.getAttribute(\"sid\");\r\n\t\t\tvar tid = btag.getAttribute(\"tid\");\r\n\r\n\t\t\tthat.afterUpdateCallback(sid, tid, action, btag);\r\n\t\t}\r\n\t\tthat.finalizeUpdate();\r\n\t},\r\n\tcleanUpdate: function (id) {\r\n\t\tif (id)\r\n\t\t\tfor (var i = 0; i < id.length; i++)\r\n\t\t\t\tdelete this._in_progress[id[i]];\r\n\t},\r\n\tfinalizeUpdate: function () {\r\n\t\tif (this._waitMode) this._waitMode--;\r\n\r\n\t\tthis.callEvent(\"onAfterUpdateFinish\", []);\r\n\t\tif (!this.updatedRows.length)\r\n\t\t\tthis.callEvent(\"onFullSync\", []);\r\n\t},\r\n\r\n\t/**\r\n\t *\t@desc: initializes data-processor\r\n\t *\t@param: scheduler - dhtmlxScheduler object to attach this data-processor to\r\n\t *\t@type: public\r\n\t */\r\n\tinit: function (scheduler) {\r\n\t\tif (this._initialized) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.$scheduler = scheduler;\r\n\t\tif (this.$scheduler._dp_init) {\r\n\t\t\tthis.$scheduler._dp_init(this);\r\n\t\t}\r\n\r\n\t\tthis._setDefaultTransactionMode();\r\n\r\n\t\tthis._methods=this._methods||[\"_set_event_text_style\",\"\",\"_dp_change_event_id\",\"_dp_hook_delete\"];\r\n\t\textendScheduler(this.$scheduler, this);\r\n\t\tvar dataProcessorEvents = new DataProcessorEvents(this.$scheduler, this);\r\n\t\tdataProcessorEvents.attach();\r\n\t\tthis.attachEvent(\"onDestroy\", function() {\r\n\t\t\tdelete this._getRowData;\r\n\r\n\t\t\tdelete this.$scheduler._dp;\r\n\t\t\tdelete this.$scheduler._dataprocessor;\r\n\t\t\tdelete this.$scheduler._set_event_text_style;\r\n\t\t\tdelete this.$scheduler._dp_change_event_id;\r\n\t\t\tdelete this.$scheduler._dp_hook_delete;\r\n\t\t\tdelete this.$scheduler;\r\n\t\t\tdataProcessorEvents.detach();\r\n\t\t});\r\n\t\tthis.$scheduler.callEvent(\"onDataProcessorReady\", [this]);\r\n\t\tthis._initialized = true;\r\n\r\n\t\tscheduler._dataprocessor=this;\r\n\t},\r\n\r\n\tsetOnAfterUpdate: function (ev) {\r\n\t\tthis.attachEvent(\"onAfterUpdate\", ev);\r\n\t},\r\n\tsetOnBeforeUpdateHandler: function (func) {\r\n\t\tthis.attachEvent(\"onBeforeDataSending\", func);\r\n\t},\r\n\r\n\t/* starts autoupdate mode\r\n\t\t@param interval time interval for sending update requests\r\n\t*/\r\n\tsetAutoUpdate: function (interval, user) {\r\n\t\tinterval = interval || 2000;\r\n\r\n\t\tthis._user = user || (new Date()).valueOf();\r\n\t\tthis._need_update = false;\r\n\t\t//this._loader = null;\r\n\t\tthis._update_busy = false;\r\n\r\n\t\tthis.attachEvent(\"onAfterUpdate\", function (sid, action, tid, xml_node) {\r\n\t\t\tthis.afterAutoUpdate(sid, action, tid, xml_node);\r\n\t\t});\r\n\t\tthis.attachEvent(\"onFullSync\", function () {\r\n\t\t\tthis.fullSync();\r\n\t\t});\r\n\r\n\t\tvar self = this;\r\n\t\tlet intervalId = global.setInterval(function () {\r\n\t\t\tself.loadUpdate();\r\n\t\t}, interval);\r\n\t\tthis.attachEvent(\"onDestroy\", function(){\r\n\t\t\tclearInterval(intervalId);\r\n\t\t});\r\n\t},\r\n\r\n\t/* process updating request answer\r\n\t\tif status == collision version is deprecated\r\n\t\tset flag for autoupdating immediately\r\n\t*/\r\n\tafterAutoUpdate: function (sid, action, tid, xml_node) {\r\n\t\tif (action == 'collision') {\r\n\t\t\tthis._need_update = true;\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t},\r\n\r\n\t/* callback function for onFillSync event\r\n\t\tcall update function if it's need\r\n\t*/\r\n\tfullSync: function () {\r\n\t\tif (this._need_update) {\r\n\t\t\tthis._need_update = false;\r\n\t\t\tthis.loadUpdate();\r\n\t\t}\r\n\t\treturn true;\r\n\t},\r\n\r\n\t/* sends query to the server and call callback function\r\n\t*/\r\n\tgetUpdates: function (url, callback) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tif (this._update_busy)\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\tthis._update_busy = true;\r\n\r\n\t\tajax.get(url, callback);\r\n\t},\r\n\r\n\t/* returns xml node value\r\n\t\t@param node\r\n\t\t\txml node\r\n\t*/\r\n\t_getXmlNodeValue: function(node) {\r\n\t\tif (node.firstChild) {\r\n\t\t\treturn node.firstChild.nodeValue;\r\n\t\t}\r\n\t\treturn \"\";\r\n\t},\r\n\r\n\t/* loads updates and processes them\r\n\t*/\r\n\tloadUpdate: function () {\r\n\t\tvar self = this;\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tvar version = this.$scheduler.getUserData(0, \"version\");\r\n\t\tvar url = this.serverProcessor + ajax.urlSeparator(this.serverProcessor) + [\"dhx_user=\" + this._user, \"dhx_version=\" + version].join(\"&\");\r\n\t\turl = url.replace(\"editing=true&\", \"\");\r\n\t\tthis.getUpdates(url, function (xml) {\r\n\t\t\tvar vers = ajax.xpath(\"//userdata\", xml);\r\n\t\t\tself.$scheduler.setUserData(0, \"version\", self._getXmlNodeValue(vers[0]));\r\n\r\n\t\t\tvar updates = ajax.xpath(\"//update\", xml);\r\n\t\t\tif (updates.length) {\r\n\t\t\t\tself._silent_mode = true;\r\n\r\n\t\t\t\tfor (var i = 0; i < updates.length; i++) {\r\n\t\t\t\t\tvar status = updates[i].getAttribute(\"status\");\r\n\t\t\t\t\tvar id = updates[i].getAttribute(\"id\");\r\n\t\t\t\t\tvar parent = updates[i].getAttribute(\"parent\");\r\n\t\t\t\t\tswitch (status) {\r\n\t\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"insertCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"updated\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"updateCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"deleteCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tself._silent_mode = false;\r\n\t\t\t}\r\n\t\t\tself._update_busy = false;\r\n\t\t\tself = null;\r\n\t\t});\r\n\t},\r\n\r\n\tdestructor: function() {\r\n\t\tthis.callEvent(\"onDestroy\", []);\r\n\t\tthis.detachAllEvents();\r\n\r\n\t\tthis.updatedRows = [];\r\n\t\tthis._in_progress = {};\r\n\t\tthis._invalid = {};\r\n\t\tthis._headers = null;\r\n\t\tthis._payload = null;\r\n\t\tdelete this._initialized;\r\n\t},\r\n\r\n\turl: function(url) {\r\n\t\tthis.serverProcessor = this._serverProcessor = url;\r\n\t},\r\n\r\n\t_serializeAsJSON: function(data) {\r\n\t\tif (typeof data === \"string\") {\r\n\t\t\treturn data;\r\n\t\t}\r\n\r\n\t\tvar copy = this.$scheduler.utils.copy(data);\r\n\t\tif (this._tMode === \"REST-JSON\") {\r\n\t\t\tdelete copy.id;\r\n\t\t\tdelete copy[this.action_param];\r\n\t\t}\r\n\r\n\t\treturn JSON.stringify(copy);\r\n\t},\r\n\r\n\t// GET/POST/JSON modes of the dataProcessor didn't send the whole data items in 'delete' requests\r\n\t// clear extra info from the data in order not to change the request format\r\n\t_cleanupArgumentsBeforeSend: function(dataToSend) {\r\n\t\tvar processedData;\r\n\t\tif(dataToSend[this.action_param] === undefined){// hash of updated items, and not an individual item\r\n\t\t\tprocessedData = {};\r\n\t\t\tfor(var i in dataToSend) {\r\n\t\t\t\tprocessedData[i] = this._cleanupArgumentsBeforeSend(dataToSend[i]);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tprocessedData = this._cleanupItemBeforeSend(dataToSend);\r\n\t\t}\r\n\t\treturn processedData;\r\n\t},\r\n\t_cleanupItemBeforeSend: function(updatedItem) {\r\n\t\tvar output = null;\r\n\t\tif(updatedItem){\r\n\t\t\tif(updatedItem[this.action_param] === \"deleted\"){\r\n\t\t\t\toutput = {};\r\n\t\t\t\toutput.id = updatedItem.id;\r\n\t\t\t\toutput[this.action_param] = updatedItem[this.action_param];\r\n\t\t\t}else{\r\n\t\t\t\toutput = updatedItem;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn output;\r\n\t},\r\n\r\n\t_forEachUpdatedRow: function(code) {\r\n\t\tvar updatedRows = this.updatedRows.slice();\r\n\t\tfor (var i = 0; i < updatedRows.length; i++) {\r\n\t\t\tvar rowId = updatedRows[i];\r\n\t\t\tif (this.$scheduler.getUserData(rowId, this.action_param)) {\r\n\t\t\t\tcode.call(this, rowId);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\t_prepareItemForJson(item){\r\n\t\tconst processedItem = {};\r\n\t\tconst scheduler = this.$scheduler;\r\n\t\tconst copy = scheduler.utils.copy(item);\r\n\t\tfor (let i in copy) {\r\n\t\t\tlet prop = copy[i];\r\n\t\t\tif (i.indexOf(\"_\") === 0) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} else if (prop){\r\n\t\t\t\tif(prop.getUTCFullYear){\r\n\t\t\t\t\tprocessedItem[i] = scheduler._helpers.formatDate(prop);\r\n\t\t\t\t} else if(typeof prop == \"object\") {\r\n\t\t\t\t\tprocessedItem[i] = this._prepareItemForJson(prop);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprocessedItem[i] = prop; \r\n\t\t\t\t}\r\n\t\t\t} else if (prop !== undefined){\r\n\t\t\t\tprocessedItem[i] = prop; \r\n\t\t\t}\r\n\t\t}\r\n\t\tprocessedItem[this.action_param] = scheduler.getUserData(item.id, this.action_param);\r\n\t\treturn processedItem;\r\n\t},\r\n\t_prepareItemForForm(item){\r\n\t\tconst processedItem = {};\r\n\t\tconst scheduler = this.$scheduler;\r\n\t\tconst copy = scheduler.utils.copy(item);\r\n\t\tfor (var i in copy) {\r\n\t\t\tlet prop = copy[i];\r\n\t\t\tif (i.indexOf(\"_\") === 0) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} else if (prop) {\r\n\t\t\t\tif(prop.getUTCFullYear){\r\n\t\t\t\t\tprocessedItem[i] = scheduler._helpers.formatDate(prop);\r\n\t\t\t\t} else if(typeof prop == \"object\") {\r\n\t\t\t\t\tprocessedItem[i] = this._prepareItemForForm(prop);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprocessedItem[i] = prop;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tprocessedItem[i] = \"\"; // for all falthy values\r\n\t\t\t}\r\n\t\t}\r\n\t\tprocessedItem[this.action_param] = scheduler.getUserData(item.id, this.action_param);\r\n\t\treturn processedItem;\r\n\t},\r\n\t_prepareDataItem: function(item) {\r\n\t\tif(this._serializeAsJson){\r\n\t\t\treturn this._prepareItemForJson(item);\r\n\t\t}else {\r\n\t\t\treturn this._prepareItemForForm(item);\r\n\t\t}\r\n\t},\r\n\t_getRowData: function(id) {\r\n\t\tvar dataItem = this.$scheduler.getEvent(id);\r\n\t\tif (!dataItem) {\r\n\t\t\tdataItem = { id: id };\r\n\t\t}\r\n\t\treturn this._prepareDataItem(dataItem);\r\n\t}\r\n};\r\n\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler.createDataProcessor = function(config) {\r\n\tvar router;\r\n\tvar tMode;\r\n\tif (config instanceof Function) {\r\n\t\trouter = config;\r\n\t} else if (config.hasOwnProperty(\"router\")) {\r\n\t\trouter = config.router;\r\n\t} else if(config.hasOwnProperty(\"event\")){\r\n\t\trouter = config;\r\n\t}\r\n\r\n\tif (router) {\r\n\t\ttMode = \"CUSTOM\";\r\n\t} else {\r\n\t\ttMode = config.mode || \"REST-JSON\";\r\n\t}\r\n\r\n\tvar dp = new DataProcessor(config.url);\r\n\tdp.init(scheduler);\r\n\tdp.setTransactionMode({\r\n\t\tmode: tMode,\r\n\t\trouter: router\r\n\t}, config.batchUpdate); // FIXME: config.batchUpdate where it is explained?\r\n\treturn dp;\r\n};\r\n\r\nscheduler.DataProcessor = DataProcessor;\r\n\r\n}\r\n\r\n//var dataProcessor = global.dataProcessor = DataProcessor; // for old","import utils from \"./utils/utils\";\r\nimport domHelpers from \"./utils/dom_helpers\";\r\n\r\n\r\nexport default function(scheduler) {\r\n\r\n\tvar boxAttribute = \"data-dhxbox\";\r\n\r\n\tvar _dhx_msg_cfg = null;\r\n\r\n\tfunction callback(config, result) {\r\n\t\tvar usercall = config.callback;\r\n\t\tmodalBox.hide(config.box);\r\n\r\n\t\t_dhx_msg_cfg = config.box = null;\r\n\tif (usercall)\r\n\t\t\tusercall(result);\r\n\t}\r\n\r\n\tfunction modal_key(event) {\r\n\t\tif (_dhx_msg_cfg) {\r\n\r\n\t\t\tvar code = event.which || event.keyCode;\r\n\t\t\tvar preventDefault = false;\r\n\r\n\t\t\tif (messageBox.keyboard) {\r\n\t\t\t\tif (code == 13 || code == 32) {\r\n\t\t\t\t\t// default behavior is to confirm/submit popup on space/enter\r\n\t\t\t\t\t// if browser focus is set on button element - do button click instead of default behavior\r\n\t\t\t\t\tvar target = event.target || event.srcElement;\r\n\t\t\t\t\tif (domHelpers.getClassName(target).indexOf(\"scheduler_popup_button\") > -1 && target.click) {\r\n\t\t\t\t\t\ttarget.click();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcallback(_dhx_msg_cfg, true);\r\n\t\t\t\t\t\tpreventDefault = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (code == 27) {\r\n\t\t\t\t\tcallback(_dhx_msg_cfg, false);\r\n\t\t\t\t\tpreventDefault = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (preventDefault) {\r\n\t\t\t\tif (event.preventDefault){\r\n\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t}\r\n\t\t\t\treturn !(event.cancelBubble = true);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.event(document, \"keydown\", modal_key, true);\r\n\r\n\tfunction modality(mode) {\r\n\t\tif (!modality.cover) {\r\n\t\t\tmodality.cover = document.createElement(\"div\");\r\n\t\t\t//necessary for IE only\r\n\t\t\tscheduler.event(modality.cover, \"keydown\", modal_key);\r\n\t\t\tmodality.cover.className = \"dhx_modal_cover\";\r\n\t\t\tdocument.body.appendChild(modality.cover);\r\n\t\t}\r\n\r\n\t\tmodality.cover.style.display = mode ? \"inline-block\" : \"none\";\r\n\t}\r\n\r\n\tfunction button(text, classValue, result) {\r\n\t\tvar buttonAriaAttrs = scheduler._waiAria.messageButtonAttrString(text);\r\n\t\tvar name = (classValue || \"\").toLowerCase().replace(/ /g, \"_\");\r\n\t\tvar buttonCss = `scheduler_${name}_button dhtmlx_${name}_button`; \r\n\t\treturn `
${text}
`;\r\n\t}\r\n\r\n\tfunction info(text) {\r\n\t\tif (!messageBox.area) {\r\n\t\t\tmessageBox.area = document.createElement(\"div\");\r\n\t\t\tmessageBox.area.className = \"scheduler_message_area dhtmlx_message_area\";\r\n\t\t\tmessageBox.area.style[messageBox.position] = \"5px\";\r\n\t\t\tdocument.body.appendChild(messageBox.area);\r\n\t\t}\r\n\r\n\t\tmessageBox.hide(text.id);\r\n\t\tvar message = document.createElement(\"div\");\r\n\t\tmessage.innerHTML = \"
\" + text.text + \"
\";\r\n\t\tmessage.className = \"scheduler-info dhtmlx-info scheduler-\" + text.type + \" dhtmlx-\" + text.type;\r\n\t\tscheduler.event(message, \"click\",function (e) {\r\n if(text.callback) {\r\n text.callback.call(this, e);\r\n }\r\n\t\t\tmessageBox.hide(text.id);\r\n\t\t\ttext = null;\r\n\t\t});\r\n\r\n\t\tscheduler._waiAria.messageInfoAttr(message);\r\n\r\n\t\tif (messageBox.position == \"bottom\" && messageBox.area.firstChild)\r\n\t\t\tmessageBox.area.insertBefore(message, messageBox.area.firstChild);\r\n\t\telse\r\n\t\t\tmessageBox.area.appendChild(message);\r\n\r\n\t\tif (text.expire > 0)\r\n\t\t\tmessageBox.timers[text.id] = window.setTimeout(function () {\r\n\t\t\t\t// GS-1213: We need that when Scheduler is destroyed\r\n\t\t\t\tif (messageBox) messageBox.hide(text.id);\r\n\t\t\t}, text.expire);\r\n\r\n\t\tmessageBox.pull[text.id] = message;\r\n\t\tmessage = null;\r\n\r\n\t\treturn text.id;\r\n\t}\r\n\r\n\tfunction getFirstDefined() {\r\n\t\tvar values = [].slice.apply(arguments, [0]);\r\n\r\n\t\tfor (var i = 0; i < values.length; i++) {\r\n\t\t\tif (values[i]) {\r\n\t\t\t\treturn values[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tfunction _boxStructure(config, ok, cancel) {\r\n\t\tvar box = document.createElement(\"div\");\r\n\r\n\t\tvar contentId = utils.uid();\r\n\t\tscheduler._waiAria.messageModalAttr(box, contentId);\r\n\r\n\r\n\t\tbox.className = \" scheduler_modal_box dhtmlx_modal_box scheduler-\" + config.type + \" dhtmlx-\" + config.type;\r\n\t\tbox.setAttribute(boxAttribute, 1);\r\n\r\n\t\tvar inner = '';\r\n\r\n\t\tif (config.width)\r\n\t\t\tbox.style.width = config.width;\r\n\t\tif (config.height)\r\n\t\t\tbox.style.height = config.height;\r\n\t\tif (config.title)\r\n\t\t\tinner += '
' + config.title + '
';\r\n\t\tinner += '
' + (config.content ? '' : config.text) + '
';\r\n\t\tif (ok)\r\n\t\t\tinner += button(getFirstDefined(config.ok, scheduler.locale.labels.message_ok, \"OK\"), \"ok\", true);\r\n\t\tif (cancel)\r\n\t\t\tinner += button(getFirstDefined(config.cancel, scheduler.locale.labels.message_cancel, \"Cancel\"), \"cancel\", false);\r\n\r\n\t\tif (config.buttons) {\r\n\t\t\tfor (var i = 0; i < config.buttons.length; i++) {\r\n\t\t\t\tvar btn = config.buttons[i];\r\n\t\t\t\tif (typeof btn == \"object\") {\r\n\t\t\t\t\t// Support { label:\"Save\", css:\"main_button\", value:\"save\" }\r\n\t\t\t\t\tvar label = btn.label;\r\n\t\t\t\t\tvar css = btn.css || (\"scheduler_\" + btn.label.toLowerCase() + \"_button dhtmlx_\" + btn.label.toLowerCase() + \"_button\");\r\n\t\t\t\t\tvar value = btn.value || i;\r\n\t\t\t\t\tinner += button(label, css, value);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tinner += button(btn, btn, i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tinner += '
';\r\n\t\tbox.innerHTML = inner;\r\n\r\n\t\tif (config.content) {\r\n\t\t\tvar node = config.content;\r\n\t\t\tif (typeof node == \"string\")\r\n\t\t\t\tnode = document.getElementById(node);\r\n\t\t\tif (node.style.display == 'none')\r\n\t\t\t\tnode.style.display = \"\";\r\n\t\t\tbox.childNodes[config.title ? 1 : 0].appendChild(node);\r\n\t\t}\r\n\r\n\t\tscheduler.event(box, \"click\", function (event) {\r\n\t\t\tvar source = event.target || event.srcElement;\r\n\t\t\tif (!source.className) source = source.parentNode;\r\n\t\t\tif (domHelpers.closest(source, \".scheduler_popup_button\")) {\r\n\t\t\t\tvar result = source.getAttribute(\"data-result\");\r\n\t\t\t\tresult = (result == \"true\") || (result == \"false\" ? false : result);\r\n\t\t\t\tcallback(config, result);\r\n\t\t\t}\r\n\t\t});\r\n\t\tconfig.box = box;\r\n\t\tif (ok || cancel)\r\n\t\t\t_dhx_msg_cfg = config;\r\n\r\n\t\treturn box;\r\n\t}\r\n\r\n\tfunction _createBox(config, ok, cancel) {\r\n\t\tvar box = config.tagName ? config : _boxStructure(config, ok, cancel);\r\n\r\n\t\tif (!config.hidden)\r\n\t\t\tmodality(true);\r\n\t\tdocument.body.appendChild(box);\r\n\t\tvar x = Math.abs(Math.floor(((window.innerWidth || document.documentElement.offsetWidth) - box.offsetWidth) / 2));\r\n\t\tvar y = Math.abs(Math.floor(((window.innerHeight || document.documentElement.offsetHeight) - box.offsetHeight) / 2));\r\n\t\tif (config.position == \"top\")\r\n\t\t\tbox.style.top = \"-3px\";\r\n\t\telse\r\n\t\t\tbox.style.top = y + 'px';\r\n\t\tbox.style.left = x + 'px';\r\n\t\t//necessary for IE only\r\n\t\tscheduler.event(box, \"keydown\", modal_key);\r\n\r\n\t\tmodalBox.focus(box);\r\n\r\n\t\tif (config.hidden)\r\n\t\t\tmodalBox.hide(box);\r\n\r\n\t\tscheduler.callEvent(\"onMessagePopup\", [box]);\r\n\t\treturn box;\r\n\t}\r\n\r\n\tfunction alertPopup(config) {\r\n\t\treturn _createBox(config, true, false);\r\n\t}\r\n\r\n\tfunction confirmPopup(config) {\r\n\t\treturn _createBox(config, true, true);\r\n\t}\r\n\r\n\tfunction boxPopup(config) {\r\n\t\treturn _createBox(config);\r\n\t}\r\n\r\n\tfunction box_params(text, type, callback) {\r\n\t\tif (typeof text != \"object\") {\r\n\t\t\tif (typeof type == \"function\") {\r\n\t\t\t\tcallback = type;\r\n\t\t\t\ttype = \"\";\r\n\t\t\t}\r\n\t\t\ttext = {text: text, type: type, callback: callback};\r\n\t\t}\r\n\t\treturn text;\r\n\t}\r\n\r\n\tfunction params(text, type, expire, id, callback) {\r\n\t\tif (typeof text != \"object\")\r\n\t\t\ttext = {text: text, type: type, expire: expire, id: id, callback: callback};\r\n\t\ttext.id = text.id || utils.uid();\r\n\t\ttext.expire = text.expire || messageBox.expire;\r\n\t\treturn text;\r\n\t}\r\n\r\n\tvar alertBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"confirm\";\r\n\t\treturn alertPopup(text);\r\n\t};\r\n\tvar confirmBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"alert\";\r\n\t\treturn confirmPopup(text);\r\n\t};\r\n\tvar modalBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"alert\";\r\n\t\treturn boxPopup(text);\r\n\t};\r\n\tmodalBox.hide = function (node) {\r\n\t\twhile (node && node.getAttribute && !node.getAttribute(boxAttribute))\r\n\t\t\tnode = node.parentNode;\r\n\t\tif (node) {\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t\tmodality(false);\r\n\r\n\t\t\tscheduler.callEvent(\"onAfterMessagePopup\", [node]);\r\n\t\t}\r\n\t};\r\n\r\n\tmodalBox.focus = function (node) {\r\n\t\tsetTimeout(function () {\r\n\t\t\tvar focusable = domHelpers.getFocusableNodes(node);\r\n\t\t\tif (focusable.length) {\r\n\t\t\t\tif (focusable[0].focus) focusable[0].focus();\r\n\t\t\t}\r\n\t\t}, 1);\r\n\t};\r\n\r\n\tvar messageBox = function (text, type, expire, id) {\r\n\t\ttext = params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"info\";\r\n\r\n\t\tvar subtype = text.type.split(\"-\")[0];\r\n\t\tswitch (subtype) {\r\n\t\t\tcase \"alert\":\r\n\t\t\t\treturn alertPopup(text);\r\n\t\t\tcase \"confirm\":\r\n\t\t\t\treturn confirmPopup(text);\r\n\t\t\tcase \"modalbox\":\r\n\t\t\t\treturn boxPopup(text);\r\n\t\t\tdefault:\r\n\t\t\t\treturn info(text);\r\n\t\t}\r\n\t};\r\n\r\n\tmessageBox.seed = (new Date()).valueOf();\r\n\tmessageBox.uid = utils.uid;\r\n\tmessageBox.expire = 4000;\r\n\tmessageBox.keyboard = true;\r\n\tmessageBox.position = \"top\";\r\n\tmessageBox.pull = {};\r\n\tmessageBox.timers = {};\r\n\r\n\tmessageBox.hideAll = function () {\r\n\t\tfor (var key in messageBox.pull)\r\n\t\t\tmessageBox.hide(key);\r\n\t};\r\n\tmessageBox.hide = function (id) {\r\n\t\tvar obj = messageBox.pull[id];\r\n\t\tif (obj && obj.parentNode) {\r\n\t\t\twindow.setTimeout(function () {\r\n\t\t\t\tobj.parentNode.removeChild(obj);\r\n\t\t\t\tobj = null;\r\n\t\t\t}, 2000);\r\n\t\t\tobj.className += \" hidden\";\r\n\r\n\t\t\tif (messageBox.timers[id])\r\n\t\t\t\twindow.clearTimeout(messageBox.timers[id]);\r\n\t\t\tdelete messageBox.pull[id];\r\n\t\t}\r\n\t};\r\n\r\n\tvar popups = [];\r\n\tscheduler.attachEvent(\"onMessagePopup\", function(box){\r\n\t\tpopups.push(box);\r\n\t});\r\n\tscheduler.attachEvent(\"onAfterMessagePopup\", function(box){\r\n\t\tfor(var i = 0; i < popups.length; i++){\r\n\t\t\tif(popups[i] === box){\r\n\t\t\t\tpopups.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tif(modality.cover && modality.cover.parentNode){\r\n\t\t\tmodality.cover.parentNode.removeChild(modality.cover);\r\n\t\t}\r\n\r\n\t\tfor(var i = 0; i < popups.length; i++){\r\n\t\t\tif(popups[i].parentNode){\r\n\t\t\t\tpopups[i].parentNode.removeChild(popups[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tpopups = null;\r\n\r\n\t\tif(messageBox.area && messageBox.area.parentNode){\r\n\t\t\tmessageBox.area.parentNode.removeChild(messageBox.area);\r\n\t\t}\r\n\t\tmessageBox = null;\r\n\t});\r\n\r\n\treturn {\r\n\t\talert: alertBox,\r\n\t\tconfirm: confirmBox,\r\n\t\tmessage: messageBox,\r\n\t\tmodalbox: modalBox\r\n\t};\r\n}","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"كانون الثاني\", \"شباط\", \"آذار\", \"نيسان\", \"أيار\", \"حزيران\", \"تموز\", \"آب\", \"أيلول\", \"تشرين الأول\", \"تشرين الثاني\", \"كانون الأول\"],\r\n\t\tmonth_short: [\"يناير\", \"فبراير\", \"مارس\", \"أبريل\", \"مايو\", \"يونيو\", \"يوليو\", \"أغسطس\", \"سبتمبر\", \"أكتوبر\", \"نوفمبر\", \"ديسمبر\"],\r\n\t\tday_full: [\"الأحد\", \"الأثنين\", \"ألثلاثاء\", \"الأربعاء\", \"ألحميس\", \"ألجمعة\", \"السبت\"],\r\n\t\tday_short: [\"احد\", \"اثنين\", \"ثلاثاء\", \"اربعاء\", \"خميس\", \"جمعة\", \"سبت\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"اليوم\",\r\n\t\tday_tab: \"يوم\",\r\n\t\tweek_tab: \"أسبوع\",\r\n\t\tmonth_tab: \"شهر\",\r\n\t\tnew_event: \"حدث جديد\",\r\n\t\ticon_save: \"اخزن\",\r\n\t\ticon_cancel: \"الغاء\",\r\n\t\ticon_details: \"تفاصيل\",\r\n\t\ticon_edit: \"تحرير\",\r\n\t\ticon_delete: \"حذف\",\r\n\t\tconfirm_closing: \"التغييرات سوف تضيع, هل انت متأكد؟\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"الحدث سيتم حذفها نهائيا ، هل أنت متأكد؟\",\r\n\t\tsection_description: \"الوصف\",\r\n\t\tsection_time: \"الفترة الزمنية\",\r\n\t\tfull_day: \"طوال اليوم\",\r\n\r\n\t\tconfirm_recurring: \"هل تريد تحرير مجموعة كاملة من الأحداث المتكررة؟\",\r\n\t\tsection_recurring: \"تكرار الحدث\",\r\n\t\tbutton_recurring: \"تعطيل\",\r\n\t\tbutton_recurring_open: \"تمكين\",\r\n\t\tbutton_edit_series: \"تحرير سلسلة\",\r\n\t\tbutton_edit_occurrence: \"تعديل نسخة\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"جدول\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create: \"Drag to create\",\r\n\t\tdrag_to_move: \"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour: \"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"يومي\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"أسبوعي\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"شهري\",\r\n\t\trepeat_radio_year: \"سنوي\",\r\n\t\trepeat_radio_day_type: \"كل\",\r\n\t\trepeat_text_day_count: \"يوم\",\r\n\t\trepeat_radio_day_type2: \"كل يوم عمل\",\r\n\t\trepeat_week: \" تكرار كل\",\r\n\t\trepeat_text_week_count: \"أسبوع في الأيام التالية:\",\r\n\t\trepeat_radio_month_type: \"تكرار\",\r\n\t\trepeat_radio_month_start: \"في\",\r\n\t\trepeat_text_month_day: \"يوم كل\",\r\n\t\trepeat_text_month_count: \"شهر\",\r\n\t\trepeat_text_month_count2_before: \"كل\",\r\n\t\trepeat_text_month_count2_after: \"شهر\",\r\n\t\trepeat_year_label: \"في\",\r\n\t\tselect_year_day2: \"من\",\r\n\t\trepeat_text_year_day: \"يوم\",\r\n\t\tselect_year_month: \"شهر\",\r\n\t\trepeat_radio_end: \"بدون تاريخ انتهاء\",\r\n\t\trepeat_text_occurences_count: \"تكرارات\",\r\n\t\trepeat_radio_end2: \"بعد\",\r\n\t\trepeat_radio_end3: \"ينتهي في\",\r\n\r\n\t\trepeat_never: \"أبداً\",\r\n\t\trepeat_daily: \"كل يوم\",\r\n\t\trepeat_workdays: \"كل يوم عمل\",\r\n\t\trepeat_weekly: \"كل أسبوع\",\r\n\t\trepeat_monthly: \"كل شهر\",\r\n\t\trepeat_yearly: \"كل سنة\",\r\n\t\trepeat_custom: \"تخصيص\",\r\n\t\trepeat_freq_day: \"يوم\",\r\n\t\trepeat_freq_week: \"أسبوع\",\r\n\t\trepeat_freq_month: \"شهر\",\r\n\t\trepeat_freq_year: \"سنة\",\r\n\t\trepeat_on_date: \"في التاريخ\",\r\n\t\trepeat_ends: \"ينتهي\",\r\n\r\n\t\tmonth_for_recurring: [\"يناير\", \"فبراير\", \"مارس\", \"أبريل\", \"مايو\", \"يونيو\", \"يوليو\", \"أغسطس\", \"سبتمبر\", \"أكتوبر\", \"نوفمبر\", \"ديسمبر\"],\r\n\t\tday_for_recurring: [\"الأحد\", \"الإثنين\", \"الثلاثاء\", \"الأربعاء\", \"الخميس\", \"الجمعة\", \"السبت\"]\r\n\t}\r\n};\r\n\r\n\r\n","/*\r\n Translation by Sofya Morozova\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Студзень\", \"Люты\", \"Сакавік\", \"Красавік\", \"Maй\", \"Чэрвень\", \"Ліпень\", \"Жнівень\", \"Верасень\", \"Кастрычнік\", \"Лістапад\", \"Снежань\"],\r\n\t\tmonth_short: [\"Студз\", \"Лют\", \"Сак\", \"Крас\", \"Maй\", \"Чэр\", \"Ліп\", \"Жнів\", \"Вер\", \"Каст\", \"Ліст\", \"Снеж\"],\r\n\t\tday_full: [ \"Нядзеля\", \"Панядзелак\", \"Аўторак\", \"Серада\", \"Чацвер\", \"Пятніца\", \"Субота\"],\r\n\t\tday_short: [\"Нд\", \"Пн\", \"Аўт\", \"Ср\", \"Чцв\", \"Пт\", \"Сб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сёння\",\r\n\t\tday_tab: \"Дзень\",\r\n\t\tweek_tab: \"Тыдзень\",\r\n\t\tmonth_tab: \"Месяц\",\r\n\t\tnew_event: \"Новая падзея\",\r\n\t\ticon_save: \"Захаваць\",\r\n\t\ticon_cancel: \"Адмяніць\",\r\n\t\ticon_details: \"Дэталі\",\r\n\t\ticon_edit: \"Змяніць\",\r\n\t\ticon_delete: \"Выдаліць\",\r\n\t\tconfirm_closing: \"\", //Унесеныя змены будуць страчаны, працягнуць?\r\n\t\tconfirm_deleting: \"Падзея будзе выдалена незваротна, працягнуць?\",\r\n\t\tsection_description: \"Апісанне\",\r\n\t\tsection_time: \"Перыяд часу\",\r\n\t\tfull_day: \"Увесь дзень\",\r\n\r\n\t\tconfirm_recurring: \"Вы хочаце змяніць усю серыю паўтаральных падзей?\",\r\n\t\tsection_recurring: \"Паўтарэнне\",\r\n\t\tbutton_recurring: \"Адключана\",\r\n\t\tbutton_recurring_open: \"Уключана\",\r\n\t\tbutton_edit_series: \"Рэдагаваць серыю\",\r\n\t\tbutton_edit_occurrence: \"Рэдагаваць асобнік\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Спіс\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Апісанне\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Год\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Спіс\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Спic\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Дзень\",\r\n\t\trepeat_radio_week: \"Тыдзень\",\r\n\t\trepeat_radio_month: \"Месяц\",\r\n\t\trepeat_radio_year: \"Год\",\r\n\t\trepeat_radio_day_type: \"Кожны\",\r\n\t\trepeat_text_day_count: \"дзень\",\r\n\t\trepeat_radio_day_type2: \"Кожны працоўны дзень\",\r\n\t\trepeat_week: \" Паўтараць кожны\",\r\n\t\trepeat_text_week_count: \"тыдзень\",\r\n\t\trepeat_radio_month_type: \"Паўтараць\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" чысла кожнага\",\r\n\t\trepeat_text_month_count: \"месяцу\",\r\n\t\trepeat_text_month_count2_before: \"кожны \",\r\n\t\trepeat_text_month_count2_after: \"месяц\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"дзень\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без даты заканчэння\",\r\n\t\trepeat_text_occurences_count: \"паўтораў\",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\trepeat_radio_end3: \"Да \",\r\n\r\n\t\trepeat_never: \"Ніколі\",\r\n\t\trepeat_daily: \"Кожны дзень\",\r\n\t\trepeat_workdays: \"Кожны працоўны дзень\",\r\n\t\trepeat_weekly: \"Кожны тыдзень\",\r\n\t\trepeat_monthly: \"Кожны месяц\",\r\n\t\trepeat_yearly: \"Кожны год\",\r\n\t\trepeat_custom: \"Наладжвальны\",\r\n\t\trepeat_freq_day: \"Дзень\",\r\n\t\trepeat_freq_week: \"Тыдзень\",\r\n\t\trepeat_freq_month: \"Месяц\",\r\n\t\trepeat_freq_year: \"Год\",\r\n\t\trepeat_on_date: \"На дату\",\r\n\t\trepeat_ends: \"Заканчваецца\",\r\n\r\n\t\tmonth_for_recurring: [\"Студзеня\", \"Лютага\", \"Сакавіка\", \"Красавіка\", \"Мая\", \"Чэрвеня\", \"Ліпeня\", \"Жніўня\", \"Верасня\", \"Кастрычніка\", \"Лістапада\", \"Снежня\"],\r\n\t\tday_for_recurring: [\"Нядзелю\", \"Панядзелак\", \"Аўторак\", \"Сераду\", \"Чацвер\", \"Пятніцу\", \"Суботу\"]\r\n\t}\r\n};\r\n","/*\r\n @Traducido por Vicente Adria Bohigues - vicenteadria@hotmail.com\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Gener\", \"Febrer\", \"Març\", \"Abril\", \"Maig\", \"Juny\", \"Juliol\", \"Agost\", \"Setembre\", \"Octubre\", \"Novembre\", \"Desembre\"],\r\n\t\tmonth_short: [\"Gen\", \"Feb\", \"Mar\", \"Abr\", \"Mai\", \"Jun\", \"Jul\", \"Ago\", \"Set\", \"Oct\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Diumenge\", \"Dilluns\", \"Dimarts\", \"Dimecres\", \"Dijous\", \"Divendres\", \"Dissabte\"],\r\n\t\tday_short: [\"Dg\", \"Dl\", \"Dm\", \"Dc\", \"Dj\", \"Dv\", \"Ds\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hui\",\r\n\t\tday_tab: \"Dia\",\r\n\t\tweek_tab: \"Setmana\",\r\n\t\tmonth_tab: \"Mes\",\r\n\t\tnew_event: \"Nou esdeveniment\",\r\n\t\ticon_save: \"Guardar\",\r\n\t\ticon_cancel: \"Cancel·lar\",\r\n\t\ticon_details: \"Detalls\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Esborrar\",\r\n\t\tconfirm_closing: \"\", //\"Els seus canvis es perdràn, continuar ?\"\r\n\t\tconfirm_deleting: \"L'esdeveniment s'esborrarà definitivament, continuar ?\",\r\n\t\tsection_description: \"Descripció\",\r\n\t\tsection_time: \"Periode de temps\",\r\n\t\tfull_day: \"Tot el dia\",\r\n\r\n\t\tconfirm_recurring: \"¿Desitja modificar el conjunt d'esdeveniments repetits?\",\r\n\t\tsection_recurring: \"Repeteixca l'esdeveniment\",\r\n\t\tbutton_recurring: \"Impedit\",\r\n\t\tbutton_recurring_open: \"Permés\",\r\n\t\tbutton_edit_series: \"Edit sèrie\",\r\n\t\tbutton_edit_occurrence: \"Edita Instància\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descripció\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Any\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Taula\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create: \"Drag to create\",\r\n\t\tdrag_to_move: \"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour: \"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diari\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Setmanal\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Mensual\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia\",\r\n\t\trepeat_radio_day_type2: \"Cada dia laborable\",\r\n\t\trepeat_week: \" Repetir cada\",\r\n\t\trepeat_text_week_count: \"setmana els dies següents:\",\r\n\t\trepeat_radio_month_type: \"Repetir\",\r\n\t\trepeat_radio_month_start: \"El\",\r\n\t\trepeat_text_month_day: \"dia cada\",\r\n\t\trepeat_text_month_count: \"mes\",\r\n\t\trepeat_text_month_count2_before: \"cada\",\r\n\t\trepeat_text_month_count2_after: \"mes\",\r\n\t\trepeat_year_label: \"El\",\r\n\t\tselect_year_day2: \"de\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mes\",\r\n\t\trepeat_radio_end: \"Sense data de finalització\",\r\n\t\trepeat_text_occurences_count: \"ocurrències\",\r\n\t\trepeat_radio_end2: \"Després\",\r\n\t\trepeat_radio_end3: \"Finalitzar el\",\r\n\r\n\t\trepeat_never: \"Mai\",\r\n\t\trepeat_daily: \"Cada dia\",\r\n\t\trepeat_workdays: \"Cada dia laborable\",\r\n\t\trepeat_weekly: \"Cada setmana\",\r\n\t\trepeat_monthly: \"Cada mes\",\r\n\t\trepeat_yearly: \"Cada any\",\r\n\t\trepeat_custom: \"Personalitzat\",\r\n\t\trepeat_freq_day: \"Dia\",\r\n\t\trepeat_freq_week: \"Setmana\",\r\n\t\trepeat_freq_month: \"Mes\",\r\n\t\trepeat_freq_year: \"Any\",\r\n\t\trepeat_on_date: \"En la data\",\r\n\t\trepeat_ends: \"Finalitza\",\r\n\r\n\t\tmonth_for_recurring: [\"Gener\", \"Febrer\", \"Març\", \"Abril\", \"Maig\", \"Juny\", \"Juliol\", \"Agost\", \"Setembre\", \"Octubre\", \"Novembre\", \"Desembre\"],\r\n\t\tday_for_recurring: [\"Diumenge\", \"Dilluns\", \"Dimarts\", \"Dimecres\", \"Dijous\", \"Divendres\", \"Dissabte\"]\r\n\t}\r\n};","/*\r\nTranslation by FreezeSoul\r\n*/\r\n//scheduler.config.day_date=\"%M %d日 %D\";\r\n//scheduler.config.default_date=\"%Y年 %M %d日\";\r\n//scheduler.config.month_date=\"%Y年 %M\";\r\n\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"一月\", \"二月\", \"三月\", \"四月\", \"五月\", \"六月\", \"七月\", \"八月\", \"九月\", \"十月\", \"十一月\", \"十二月\"],\r\n\t\tmonth_short: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_full: [\"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\"],\r\n\t\tday_short: [\"日\", \"一\", \"二\", \"三\", \"四\", \"五\", \"六\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"今天\",\r\n\t\tday_tab: \"日\",\r\n\t\tweek_tab: \"周\",\r\n\t\tmonth_tab: \"月\",\r\n\t\tnew_event: \"新建日程\",\r\n\t\ticon_save: \"保存\",\r\n\t\ticon_cancel: \"关闭\",\r\n\t\ticon_details: \"详细\",\r\n\t\ticon_edit: \"编辑\",\r\n\t\ticon_delete: \"删除\",\r\n\t\tconfirm_closing: \"请确认是否撤销修改!\", //Your changes will be lost, are your sure?\r\n\t\tconfirm_deleting: \"是否删除日程?\",\r\n\t\tsection_description: \"描述\",\r\n\t\tsection_time: \"时间范围\",\r\n\t\tfull_day: \"整天\",\r\n\r\n\t\tconfirm_recurring:\"请确认是否将日程设为重复模式?\",\r\n\t\tsection_recurring:\"重复周期\",\r\n\t\tbutton_recurring:\"禁用\",\r\n\t\tbutton_recurring_open:\"启用\",\r\n\t\tbutton_edit_series: \"编辑系列\",\r\n\t\tbutton_edit_occurrence: \"编辑实例\",\r\n\t\t\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"议程\",\r\n\t\tdate:\"日期\",\r\n\t\tdescription:\"说明\",\r\n\t\t\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"今年\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"议程\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab:\"电网\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"按天\",\r\n\t\trepeat_radio_week: \"按周\",\r\n\t\trepeat_radio_month: \"按月\",\r\n\t\trepeat_radio_year: \"按年\",\r\n\t\trepeat_radio_day_type: \"每\",\r\n\t\trepeat_text_day_count: \"天\",\r\n\t\trepeat_radio_day_type2: \"每个工作日\",\r\n\t\trepeat_week: \" 重复 每\",\r\n\t\trepeat_text_week_count: \"星期的:\",\r\n\t\trepeat_radio_month_type: \"重复\",\r\n\t\trepeat_radio_month_start: \"在\",\r\n\t\trepeat_text_month_day: \"日 每\",\r\n\t\trepeat_text_month_count: \"月\",\r\n\t\trepeat_text_month_count2_before: \"每\",\r\n\t\trepeat_text_month_count2_after: \"月\",\r\n\t\trepeat_year_label: \"在\",\r\n\t\tselect_year_day2: \"的\",\r\n\t\trepeat_text_year_day: \"日\",\r\n\t\tselect_year_month: \"月\",\r\n\t\trepeat_radio_end: \"无结束日期\",\r\n\t\trepeat_text_occurences_count: \"次结束\",\r\n\t\trepeat_radio_end2: \"重复\",\r\n\t\trepeat_radio_end3: \"结束于\",\r\n\t\t\r\n\t\trepeat_never: \"从不\",\r\n\t\trepeat_daily: \"每天\",\r\n\t\trepeat_workdays: \"每个工作日\",\r\n\t\trepeat_weekly: \"每周\",\r\n\t\trepeat_monthly: \"每月\",\r\n\t\trepeat_yearly: \"每年\",\r\n\t\trepeat_custom: \"自定义\",\r\n\t\trepeat_freq_day: \"天\",\r\n\t\trepeat_freq_week: \"周\",\r\n\t\trepeat_freq_month: \"月\",\r\n\t\trepeat_freq_year: \"年\",\r\n\t\trepeat_on_date: \"在日期\",\r\n\t\trepeat_ends: \"结束\",\r\n\r\n\t\tmonth_for_recurring: [\"一月\", \"二月\", \"三月\", \"四月\", \"五月\", \"六月\", \"七月\", \"八月\", \"九月\", \"十月\", \"十一月\", \"十二月\"],\r\n\t\tday_for_recurring: [\"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Leden\", \"Únor\", \"Březen\", \"Duben\", \"Květen\", \"Červen\", \"Červenec\", \"Srpen\", \"Září\", \"Říjen\", \"Listopad\", \"Prosinec\"],\r\n\t\tmonth_short: [\"Led\", \"Ún\", \"Bře\", \"Dub\", \"Kvě\", \"Čer\", \"Čec\", \"Srp\", \"Září\", \"Říj\", \"List\", \"Pro\"],\r\n\t\tday_full: [\"Neděle\", \"Pondělí\", \"Úterý\", \"Středa\", \"Čtvrtek\", \"Pátek\", \"Sobota\"],\r\n\t\tday_short: [\"Ne\", \"Po\", \"Út\", \"St\", \"Čt\", \"Pá\", \"So\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dnes\",\r\n\t\tday_tab: \"Den\",\r\n\t\tweek_tab: \"Týden\",\r\n\t\tmonth_tab: \"Měsíc\",\r\n\t\tnew_event: \"Nová událost\",\r\n\t\ticon_save: \"Uložit\",\r\n\t\ticon_cancel: \"Zpět\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edituj\",\r\n\t\ticon_delete: \"Smazat\",\r\n\t\tconfirm_closing: \"\", //Vaše změny budou ztraceny, opravdu ?\r\n\t\tconfirm_deleting: \"Událost bude trvale smazána, opravdu?\",\r\n\t\tsection_description: \"Poznámky\",\r\n\t\tsection_time: \"Doba platnosti\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Přejete si upravit celou řadu opakovaných událostí?\",\r\n\t\tsection_recurring: \"Opakování události\",\r\n\t\tbutton_recurring: \"Vypnuto\",\r\n\t\tbutton_recurring_open: \"Zapnuto\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Upravit instance\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Program\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Poznámka\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\t\tfull_day: \"Full day\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Program\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Mřížka\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Denně\",\r\n\t\trepeat_radio_week: \"Týdně\",\r\n\t\trepeat_radio_month: \"Měsíčně\",\r\n\t\trepeat_radio_year: \"Ročně\",\r\n\t\trepeat_radio_day_type: \"každý\",\r\n\t\trepeat_text_day_count: \"Den\",\r\n\t\trepeat_radio_day_type2: \"pracovní dny\",\r\n\t\trepeat_week: \"Opakuje každých\",\r\n\t\trepeat_text_week_count: \"Týdnů na:\",\r\n\t\trepeat_radio_month_type: \"u každého\",\r\n\t\trepeat_radio_month_start: \"na\",\r\n\t\trepeat_text_month_day: \"Den každého\",\r\n\t\trepeat_text_month_count: \"Měsíc\",\r\n\t\trepeat_text_month_count2_before: \"každý\",\r\n\t\trepeat_text_month_count2_after: \"Měsíc\",\r\n\t\trepeat_year_label: \"na\",\r\n\t\tselect_year_day2: \"v\",\r\n\t\trepeat_text_year_day: \"Den v\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"bez data ukončení\",\r\n\t\trepeat_text_occurences_count: \"Události\",\r\n\t\trepeat_radio_end2: \"po\",\r\n\t\trepeat_radio_end3: \"Konec\",\r\n\r\n\t\trepeat_never: \"Nikdy\",\r\n\t\trepeat_daily: \"Každý den\",\r\n\t\trepeat_workdays: \"Každý pracovní den\",\r\n\t\trepeat_weekly: \"Každý týden\",\r\n\t\trepeat_monthly: \"Každý měsíc\",\r\n\t\trepeat_yearly: \"Každý rok\",\r\n\t\trepeat_custom: \"Vlastní\",\r\n\t\trepeat_freq_day: \"Den\",\r\n\t\trepeat_freq_week: \"Týden\",\r\n\t\trepeat_freq_month: \"Měsíc\",\r\n\t\trepeat_freq_year: \"Rok\",\r\n\t\trepeat_on_date: \"Na datum\",\r\n\t\trepeat_ends: \"Končí\",\r\n\r\n\t\tmonth_for_recurring: [\"Leden\", \"Únor\", \"Březen\", \"Duben\", \"Květen\", \"Červen\", \"Červenec\", \"Srpen\", \"Září\", \"Říjen\", \"Listopad\", \"Prosinec\"],\r\n\t\tday_for_recurring: [\"Neděle \", \"Pondělí\", \"Úterý\", \"Středa\", \"Čtvrtek\", \"Pátek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Marts\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Man\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uge\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny begivenhed\",\r\n\t\ticon_save: \"Gem\",\r\n\t\ticon_cancel: \"Fortryd\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Tilret\",\r\n\t\ticon_delete: \"Slet\",\r\n\t\tconfirm_closing: \"Dine rettelser vil gå tabt.. Er dy sikker?\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Bigivenheden vil blive slettet permanent. Er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du tilrette hele serien af gentagne begivenheder?\",\r\n\t\tsection_recurring: \"Gentag begivenhed\",\r\n\t\tbutton_recurring: \"Frakoblet\",\r\n\t\tbutton_recurring_open: \"Tilkoblet\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Rediger en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dagsorden\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dagsorden\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\",\r\n\t\trepeat_radio_week: \"Ugenlig\",\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"På hver arbejdsdag\",\r\n\t\trepeat_week: \" Gentager sig hver\",\r\n\t\trepeat_text_week_count: \"uge på følgende dage:\",\r\n\t\trepeat_radio_month_type: \"Hver den\",\r\n\t\trepeat_radio_month_start: \"Den\",\r\n\t\trepeat_text_month_day: \" i hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"Den\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Ingen slutdato\",\r\n\t\trepeat_text_occurences_count: \"gentagelse\",\r\n\t\trepeat_radio_end2: \"Efter\",\r\n\t\trepeat_radio_end3: \"Slut\",\r\n\r\n\t\trepeat_never: \"Aldrig\",\r\n\t\trepeat_daily: \"Hver dag\",\r\n\t\trepeat_workdays: \"Hver hverdag\",\r\n\t\trepeat_weekly: \"Hver uge\",\r\n\t\trepeat_monthly: \"Hver måned\",\r\n\t\trepeat_yearly: \"Hvert år\",\r\n\t\trepeat_custom: \"Brugerdefineret\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Uge\",\r\n\t\trepeat_freq_month: \"Måned\",\r\n\t\trepeat_freq_year: \"År\",\r\n\t\trepeat_on_date: \"På dato\",\r\n\t\trepeat_ends: \"Slutter\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"März\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Dezember\"],\r\n\t\tday_for_recurring: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\" Januar\", \" Februar\", \" März \", \" April\", \" Mai\", \" Juni\", \" Juli\", \" August\", \" September \", \" Oktober\", \" November \", \" Dezember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mär\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dez\"],\r\n\t\tday_full: [ \"Sonntag\", \"Montag\", \"Dienstag\", \" Mittwoch\", \" Donnerstag\", \"Freitag\", \"Samstag\"],\r\n\t\tday_short: [\"So\", \"Mo\", \"Di\", \"Mi\", \"Do\", \"Fr\", \"Sa\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Heute\",\r\n\t\tday_tab: \"Tag\",\r\n\t\tweek_tab: \"Woche\",\r\n\t\tmonth_tab: \"Monat\",\r\n\t\tnew_event: \"neuer Eintrag\",\r\n\t\ticon_save: \"Speichern\",\r\n\t\ticon_cancel: \"Abbrechen\",\r\n\t\ticon_details: \"Details\",\r\n\t\ticon_edit: \"Ändern\",\r\n\t\ticon_delete: \"Löschen\",\r\n\t\tconfirm_closing: \"\", //\"Ihre Veränderungen werden verloren sein, wollen Sie ergänzen? \"\r\n\t\tconfirm_deleting: \"Der Eintrag wird gelöscht\",\r\n\t\tsection_description: \"Beschreibung\",\r\n\t\tsection_time: \"Zeitspanne\",\r\n\t\tfull_day: \"Ganzer Tag\",\r\n\r\n\t\tconfirm_recurring: \"Wollen Sie alle Einträge bearbeiten oder nur diesen einzelnen Eintrag?\",\r\n\t\tsection_recurring: \"Wiederholung\",\r\n\t\tbutton_recurring: \"Aus\",\r\n\t\tbutton_recurring_open: \"An\",\r\n\t\tbutton_edit_series: \"Bearbeiten Sie die Serie\",\r\n\t\tbutton_edit_occurrence: \"Bearbeiten Sie eine Kopie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Beschreibung\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Jahre\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Täglich\",\r\n\t\trepeat_radio_week: \"Wöchentlich\",\r\n\t\trepeat_radio_month: \"Monatlich\",\r\n\t\trepeat_radio_year: \"Jährlich\",\r\n\t\trepeat_radio_day_type: \"jeden\",\r\n\t\trepeat_text_day_count: \"Tag\",\r\n\t\trepeat_radio_day_type2: \"an jedem Arbeitstag\",\r\n\t\trepeat_week: \" Wiederholt sich jede\",\r\n\t\trepeat_text_week_count: \"Woche am:\",\r\n\t\trepeat_radio_month_type: \"an jedem\",\r\n\t\trepeat_radio_month_start: \"am\",\r\n\t\trepeat_text_month_day: \"Tag eines jeden\",\r\n\t\trepeat_text_month_count: \"Monats\",\r\n\t\trepeat_text_month_count2_before: \"jeden\",\r\n\t\trepeat_text_month_count2_after: \"Monats\",\r\n\t\trepeat_year_label: \"am\",\r\n\t\tselect_year_day2: \"im\",\r\n\t\trepeat_text_year_day: \"Tag im\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"kein Enddatum\",\r\n\t\trepeat_text_occurences_count: \"Ereignissen\",\r\n\t\trepeat_radio_end3: \"Schluß\",\r\n\t\trepeat_radio_end2: \"nach\",\r\n\r\n\t\trepeat_never: \"Nie\",\r\n\t\trepeat_daily: \"Jeden Tag\",\r\n\t\trepeat_workdays: \"Jeden Werktag\",\r\n\t\trepeat_weekly: \"Jede Woche\",\r\n\t\trepeat_monthly: \"Jeden Monat\",\r\n\t\trepeat_yearly: \"Jedes Jahr\",\r\n\t\trepeat_custom: \"Benutzerdefiniert\",\r\n\t\trepeat_freq_day: \"Tag\",\r\n\t\trepeat_freq_week: \"Woche\",\r\n\t\trepeat_freq_month: \"Monat\",\r\n\t\trepeat_freq_year: \"Jahr\",\r\n\t\trepeat_on_date: \"Am Datum\",\r\n\t\trepeat_ends: \"Endet\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"März\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Dezember\"],\r\n\t\tday_for_recurring: [\"Sonntag\", \"Montag\", \"Dienstag\", \"Mittwoch\", \"Donnerstag\", \"Freitag\", \"Samstag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Ιανουάριος\", \"Φεβρουάριος\", \"Μάρτιος\", \"Απρίλιος\", \"Μάϊος\", \"Ιούνιος\", \"Ιούλιος\", \"Αύγουστος\", \"Σεπτέμβριος\", \"Οκτώβριος\", \"Νοέμβριος\", \"Δεκέμβριος\"],\r\n\t\tmonth_short: [\"ΙΑΝ\", \"ΦΕΒ\", \"ΜΑΡ\", \"ΑΠΡ\", \"ΜΑΙ\", \"ΙΟΥΝ\", \"ΙΟΥΛ\", \"ΑΥΓ\", \"ΣΕΠ\", \"ΟΚΤ\", \"ΝΟΕ\", \"ΔΕΚ\"],\r\n\t\tday_full: [\"Κυριακή\", \"Δευτέρα\", \"Τρίτη\", \"Τετάρτη\", \"Πέμπτη\", \"Παρασκευή\", \"Σάββατο\"],\r\n\t\tday_short: [\"ΚΥ\", \"ΔΕ\", \"ΤΡ\", \"ΤΕ\", \"ΠΕ\", \"ΠΑ\", \"ΣΑ\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Σήμερα\",\r\n\t\tday_tab: \"Ημέρα\",\r\n\t\tweek_tab: \"Εβδομάδα\",\r\n\t\tmonth_tab: \"Μήνας\",\r\n\t\tnew_event: \"Νέο έργο\",\r\n\t\ticon_save: \"Αποθήκευση\",\r\n\t\ticon_cancel: \"Άκυρο\",\r\n\t\ticon_details: \"Λεπτομέρειες\",\r\n\t\ticon_edit: \"Επεξεργασία\",\r\n\t\ticon_delete: \"Διαγραφή\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Το έργο θα διαγραφεί οριστικά. Θέλετε να συνεχίσετε;\",\r\n\t\tsection_description: \"Περιγραφή\",\r\n\t\tsection_time: \"Χρονική περίοδος\",\r\n\t\tfull_day: \"Πλήρης Ημέρα\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Θέλετε να επεξεργασθείτε ολόκληρη την ομάδα των επαναλαμβανόμενων έργων;\",\r\n\t\tsection_recurring: \"Επαναλαμβανόμενο έργο\",\r\n\t\tbutton_recurring: \"Ανενεργό\",\r\n\t\tbutton_recurring_open: \"Ενεργό\",\r\n\t\tbutton_edit_series: \"Επεξεργαστείτε τη σειρά\",\r\n\t\tbutton_edit_occurrence: \"Επεξεργασία ένα αντίγραφο\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Ημερήσια Διάταξη\",\r\n\t\tdate: \"Ημερομηνία\",\r\n\t\tdescription: \"Περιγραφή\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Έτος\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Ημερήσια Διάταξη\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Πλέγμα\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Ημερησίως\",\r\n\t\trepeat_radio_week: \"Εβδομαδιαίως\",\r\n\t\trepeat_radio_month: \"Μηνιαίως\",\r\n\t\trepeat_radio_year: \"Ετησίως\",\r\n\t\trepeat_radio_day_type: \"Κάθε\",\r\n\t\trepeat_text_day_count: \"ημέρα\",\r\n\t\trepeat_radio_day_type2: \"Κάθε εργάσιμη\",\r\n\t\trepeat_week: \" Επανάληψη κάθε\",\r\n\t\trepeat_text_week_count: \"εβδομάδα τις επόμενες ημέρες:\",\r\n\t\trepeat_radio_month_type: \"Επανάληψη\",\r\n\t\trepeat_radio_month_start: \"Την\",\r\n\t\trepeat_text_month_day: \"ημέρα κάθε\",\r\n\t\trepeat_text_month_count: \"μήνα\",\r\n\t\trepeat_text_month_count2_before: \"κάθε\",\r\n\t\trepeat_text_month_count2_after: \"μήνα\",\r\n\t\trepeat_year_label: \"Την\",\r\n\t\tselect_year_day2: \"του\",\r\n\t\trepeat_text_year_day: \"ημέρα\",\r\n\t\tselect_year_month: \"μήνα\",\r\n\t\trepeat_radio_end: \"Χωρίς ημερομηνία λήξεως\",\r\n\t\trepeat_text_occurences_count: \"επαναλήψεις\",\r\n\t\trepeat_radio_end3: \"Λήγει την\",\r\n\t\trepeat_radio_end2: \"Μετά από\",\r\n\r\n\t\trepeat_never: \"Ποτέ\",\r\n\t\trepeat_daily: \"Κάθε μέρα\",\r\n\t\trepeat_workdays: \"Κάθε εργάσιμη μέρα\",\r\n\t\trepeat_weekly: \"Κάθε εβδομάδα\",\r\n\t\trepeat_monthly: \"Κάθε μήνα\",\r\n\t\trepeat_yearly: \"Κάθε χρόνο\",\r\n\t\trepeat_custom: \"Προσαρμοσμένο\",\r\n\t\trepeat_freq_day: \"Ημέρα\",\r\n\t\trepeat_freq_week: \"Εβδομάδα\",\r\n\t\trepeat_freq_month: \"Μήνας\",\r\n\t\trepeat_freq_year: \"Χρόνος\",\r\n\t\trepeat_on_date: \"Σε ημερομηνία\",\r\n\t\trepeat_ends: \"Λήγει\",\r\n\r\n\t\tmonth_for_recurring: [\"Ιανουάριος\", \"Φεβρουάριος\", \"Μάρτιος\", \"Απρίλιος\", \"Μάϊος\", \"Ιούνιος\", \"Ιούλιος\", \"Αύγουστος\", \"Σεπτέμβριος\", \"Οκτώβριος\", \"Νοέμβριος\", \"Δεκέμβριος\"],\r\n\t\tday_for_recurring: [\"Κυριακή\", \"Δευτέρα\", \"Τρίτη\", \"Τετάρτη\", \"Πέμπτη\", \"Παρασκευή\", \"Σάββατο\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate:{\r\n\t\tmonth_full:[\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\r\n\t\tmonth_short:[\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n\t\tday_full:[\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\r\n\t\tday_short:[\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"]\r\n\t},\r\n\tlabels:{\r\n\t\tdhx_cal_today_button:\"Today\",\r\n\t\tday_tab:\"Day\",\r\n\t\tweek_tab:\"Week\",\r\n\t\tmonth_tab:\"Month\",\r\n\t\tnew_event:\"New event\",\r\n\t\ticon_save:\"Save\",\r\n\t\ticon_cancel:\"Cancel\",\r\n\t\ticon_details:\"Details\",\r\n\t\ticon_edit:\"Edit\",\r\n\t\ticon_delete:\"Delete\",\r\n\t\tconfirm_closing:\"\",//Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting:\"Event will be deleted permanently, are you sure?\",\r\n\t\tsection_description:\"Description\",\r\n\t\tsection_time:\"Time period\",\r\n\t\tfull_day:\"Full day\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring:\"Do you want to edit the whole set of repeated events?\",\r\n\t\tsection_recurring:\"Repeat event\",\r\n\t\tbutton_recurring:\"Disabled\",\r\n\t\tbutton_recurring_open:\"Enabled\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Edit occurrence\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"Agenda\",\r\n\t\tdate:\"Date\",\r\n\t\tdescription:\"Description\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"Year\",\r\n\r\n\t\t/* week agenda extension */\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daily\",//name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Weekly\",//name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Monthly\",\r\n\t\trepeat_radio_year: \"Yearly\",\r\n\t\trepeat_radio_day_type: \"Every\",\r\n\t\trepeat_text_day_count: \"day\",\r\n\t\trepeat_radio_day_type2: \"Every workday\",\r\n\t\trepeat_week: \" Repeat every\",\r\n\t\trepeat_text_week_count: \"week next days:\",\r\n\t\trepeat_radio_month_type: \"Repeat\",\r\n\t\trepeat_radio_month_start: \"On\",\r\n\t\trepeat_text_month_day: \"day every\",\r\n\t\trepeat_text_month_count: \"month\",\r\n\t\trepeat_text_month_count2_before: \"every\",\r\n\t\trepeat_text_month_count2_after: \"month\",\r\n\t\trepeat_year_label: \"On\",\r\n\t\tselect_year_day2: \"of\",\r\n\t\trepeat_text_year_day: \"day\",\r\n\t\tselect_year_month: \"month\",\r\n\t\trepeat_radio_end: \"No end date\",\r\n\t\trepeat_text_occurences_count: \"occurrences\",\r\n\t\trepeat_radio_end2: \"After\",\r\n\t\trepeat_radio_end3: \"End by\",\r\n\r\n\t\trepeat_never: \"Never\",\r\n\t\trepeat_daily: \"Every day\",\r\n\t\trepeat_workdays: \"Every weekday\",\r\n\t\trepeat_weekly: \"Every week\",\r\n\t\trepeat_monthly: \"Every month\",\r\n\t\trepeat_yearly: \"Every year\",\r\n\t\trepeat_custom: \"Custom\",\r\n\t\trepeat_freq_day: \"Day\",\r\n\t\trepeat_freq_week: \"Week\",\r\n\t\trepeat_freq_month: \"Month\",\r\n\t\trepeat_freq_year: \"Year\",\r\n\t\trepeat_on_date: \"On date\",\r\n\t\trepeat_ends: \"Ends\",\r\n\r\n\t\tmonth_for_recurring: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"]//\r\n\t}\r\n};\r\n\r\n","/*\r\n @Autor Manuel Fernandez Panzuela - www.mfernandez.es\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Enero\", \"Febrero\", \"Marzo\", \"Abril\", \"Mayo\", \"Junio\", \"Julio\", \"Agosto\", \"Septiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"],\r\n\t\tmonth_short: [\"Ene\", \"Feb\", \"Mar\", \"Abr\", \"May\", \"Jun\", \"Jul\", \"Ago\", \"Sep\", \"Oct\", \"Nov\", \"Dic\"],\r\n\t\tday_full: [\"Domingo\", \"Lunes\", \"Martes\", \"Miércoles\", \"Jueves\", \"Viernes\", \"Sábado\"],\r\n\t\tday_short: [\"Dom\", \"Lun\", \"Mar\", \"Mié\", \"Jue\", \"Vie\", \"Sáb\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hoy\",\r\n\t\tday_tab: \"Día\",\r\n\t\tweek_tab: \"Semana\",\r\n\t\tmonth_tab: \"Mes\",\r\n\t\tnew_event: \"Nuevo evento\",\r\n\t\ticon_save: \"Guardar\",\r\n\t\ticon_cancel: \"Cancelar\",\r\n\t\ticon_details: \"Detalles\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Eliminar\",\r\n\t\tconfirm_closing: \"\", //\"Sus cambios se perderán, continuar ?\"\r\n\t\tconfirm_deleting: \"El evento se borrará definitivamente, ¿continuar?\",\r\n\t\tsection_description: \"Descripción\",\r\n\t\tsection_time: \"Período\",\r\n\t\tfull_day: \"Todo el día\",\r\n\r\n\t\tconfirm_recurring: \"¿Desea modificar el conjunto de eventos repetidos?\",\r\n\t\tsection_recurring: \"Repita el evento\",\r\n\t\tbutton_recurring: \"Impedido\",\r\n\t\tbutton_recurring_open: \"Permitido\",\r\n\t\tbutton_edit_series: \"Editar la serie\",\r\n\t\tbutton_edit_occurrence: \"Editar este evento\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Día\",\r\n\t\tdate: \"Fecha\",\r\n\t\tdescription: \"Descripción\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Año\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Día\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Reja\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diariamente\",\r\n\t\trepeat_radio_week: \"Semanalmente\",\r\n\t\trepeat_radio_month: \"Mensualmente\",\r\n\t\trepeat_radio_year: \"Anualmente\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia\",\r\n\t\trepeat_radio_day_type2: \"Cada jornada de trabajo\",\r\n\t\trepeat_week: \" Repetir cada\",\r\n\t\trepeat_text_week_count: \"semana:\",\r\n\t\trepeat_radio_month_type: \"Repita\",\r\n\t\trepeat_radio_month_start: \"El\",\r\n\t\trepeat_text_month_day: \"dia cada \",\r\n\t\trepeat_text_month_count: \"mes\",\r\n\t\trepeat_text_month_count2_before: \"cada\",\r\n\t\trepeat_text_month_count2_after: \"mes\",\r\n\t\trepeat_year_label: \"El\",\r\n\t\tselect_year_day2: \"del\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mes\",\r\n\t\trepeat_radio_end: \"Sin fecha de finalización\",\r\n\t\trepeat_text_occurences_count: \"ocurrencias\",\r\n\t\trepeat_radio_end3: \"Fin\",\r\n\t\trepeat_radio_end2: \"Después de\",\r\n\r\n\t\trepeat_never: \"Nunca\",\r\n\t\trepeat_daily: \"Cada día\",\r\n\t\trepeat_workdays: \"Cada día laborable\",\r\n\t\trepeat_weekly: \"Cada semana\",\r\n\t\trepeat_monthly: \"Cada mes\",\r\n\t\trepeat_yearly: \"Cada año\",\r\n\t\trepeat_custom: \"Personalizado\",\r\n\t\trepeat_freq_day: \"Día\",\r\n\t\trepeat_freq_week: \"Semana\",\r\n\t\trepeat_freq_month: \"Mes\",\r\n\t\trepeat_freq_year: \"Año\",\r\n\t\trepeat_on_date: \"En la fecha\",\r\n\t\trepeat_ends: \"Termina\",\r\n\r\n\t\tmonth_for_recurring: [\"Enero\", \"Febrero\", \"Маrzo\", \"Аbril\", \"Mayo\", \"Junio\", \"Julio\", \"Аgosto\", \"Setiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"],\r\n\t\tday_for_recurring: [\"Domingo\", \"Lunes\", \"Martes\", \"Miércoles\", \"Jeuves\", \"Viernes\", \"Sabado\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Tammikuu\", \"Helmikuu\", \"Maaliskuu\", \"Huhtikuu\", \"Toukokuu\", \"Kesäkuu\", \"Heinäkuu\", \"Elokuu\", \"Syyskuu\", \"Lokakuu\", \"Marraskuu\", \"Joulukuu\"],\r\n\t\tmonth_short: [\"Tam\", \"Hel\", \"Maa\", \"Huh\", \"Tou\", \"Kes\", \"Hei\", \"Elo\", \"Syy\", \"Lok\", \"Mar\", \"Jou\"],\r\n\t\tday_full: [\"Sunnuntai\", \"Maanantai\", \"Tiistai\", \"Keskiviikko\", \"Torstai\", \"Perjantai\", \"Lauantai\"],\r\n\t\tday_short: [\"Su\", \"Ma\", \"Ti\", \"Ke\", \"To\", \"Pe\", \"La\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Tänään\",\r\n\t\tday_tab: \"Päivä\",\r\n\t\tweek_tab: \"Viikko\",\r\n\t\tmonth_tab: \"Kuukausi\",\r\n\t\tnew_event: \"Uusi tapahtuma\",\r\n\t\ticon_save: \"Tallenna\",\r\n\t\ticon_cancel: \"Peru\",\r\n\t\ticon_details: \"Tiedot\",\r\n\t\ticon_edit: \"Muokkaa\",\r\n\t\ticon_delete: \"Poista\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Haluatko varmasti poistaa tapahtuman?\",\r\n\t\tsection_description: \"Kuvaus\",\r\n\t\tsection_time: \"Aikajakso\",\r\n\t\tfull_day: \"Koko päivä\",\r\n\r\n\t\tconfirm_recurring: \"Haluatko varmasti muokata toistuvan tapahtuman kaikkia jaksoja?\",\r\n\t\tsection_recurring: \"Toista tapahtuma\",\r\n\t\tbutton_recurring: \"Ei käytössä\",\r\n\t\tbutton_recurring_open: \"Käytössä\",\r\n\t\tbutton_edit_series: \"Muokkaa sarja\",\r\n\t\tbutton_edit_occurrence: \"Muokkaa kopio\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Esityslista\",\r\n\t\tdate: \"Päivämäärä\",\r\n\t\tdescription: \"Kuvaus\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Vuoden\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Esityslista\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Ritilä\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Luo uusi vetämällä\",\r\n\t\tdrag_to_move:\"Siirrä vetämällä\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Päivittäin\",\r\n\t\trepeat_radio_week: \"Viikoittain\",\r\n\t\trepeat_radio_month: \"Kuukausittain\",\r\n\t\trepeat_radio_year: \"Vuosittain\",\r\n\t\trepeat_radio_day_type: \"Joka\",\r\n\t\trepeat_text_day_count: \"päivä\",\r\n\t\trepeat_radio_day_type2: \"Joka arkipäivä\",\r\n\t\trepeat_week: \"Toista joka\",\r\n\t\trepeat_text_week_count: \"viikko näinä päivinä:\",\r\n\t\trepeat_radio_month_type: \"Toista\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \"päivänä joka\",\r\n\t\trepeat_text_month_count: \"kuukausi\",\r\n\t\trepeat_text_month_count2_before: \"joka\",\r\n\t\trepeat_text_month_count2_after: \"kuukausi\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"päivä\",\r\n\t\tselect_year_month: \"kuukausi\",\r\n\t\trepeat_radio_end: \"Ei loppumisaikaa\",\r\n\t\trepeat_text_occurences_count: \"Toiston jälkeen\",\r\n\t\trepeat_radio_end3: \"Loppuu\",\r\n\t\trepeat_radio_end2: \"\",\r\n\r\n\t\trepeat_never: \"Ei koskaan\",\r\n\t\trepeat_daily: \"Joka päivä\",\r\n\t\trepeat_workdays: \"Joka arkipäivä\",\r\n\t\trepeat_weekly: \"Joka viikko\",\r\n\t\trepeat_monthly: \"Joka kuukausi\",\r\n\t\trepeat_yearly: \"Joka vuosi\",\r\n\t\trepeat_custom: \"Mukautettu\",\r\n\t\trepeat_freq_day: \"Päivä\",\r\n\t\trepeat_freq_week: \"Viikko\",\r\n\t\trepeat_freq_month: \"Kuukausi\",\r\n\t\trepeat_freq_year: \"Vuosi\",\r\n\t\trepeat_on_date: \"Tiettynä päivänä\",\r\n\t\trepeat_ends: \"Päättyy\",\r\n\r\n\t\tmonth_for_recurring: [\"Tammikuu\", \"Helmikuu\", \"Maaliskuu\", \"Huhtikuu\", \"Toukokuu\", \"Kesäkuu\", \"Heinäkuu\", \"Elokuu\", \"Syyskuu\", \"Lokakuu\", \"Marraskuu\", \"Joulukuu\"],\r\n\t\tday_for_recurring: [\"Sunnuntai\", \"Maanantai\", \"Tiistai\", \"Keskiviikko\", \"Torstai\", \"Perjantai\", \"Lauantai\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Janvier\", \"Février\", \"Mars\", \"Avril\", \"Mai\", \"Juin\", \"Juillet\", \"Août\", \"Septembre\", \"Octobre\", \"Novembre\", \"Décembre\"],\r\n\t\tmonth_short: [\"Jan\", \"Fév\", \"Mar\", \"Avr\", \"Mai\", \"Juin\", \"Juil\", \"Aoû\", \"Sep\", \"Oct\", \"Nov\", \"Déc\"],\r\n\t\tday_full: [\"Dimanche\", \"Lundi\", \"Mardi\", \"Mercredi\", \"Jeudi\", \"Vendredi\", \"Samedi\"],\r\n\t\tday_short: [\"Dim\", \"Lun\", \"Mar\", \"Mer\", \"Jeu\", \"Ven\", \"Sam\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Aujourd'hui\",\r\n\t\tday_tab: \"Jour\",\r\n\t\tweek_tab: \"Semaine\",\r\n\t\tmonth_tab: \"Mois\",\r\n\t\tnew_event: \"Nouvel événement\",\r\n\t\ticon_save: \"Enregistrer\",\r\n\t\ticon_cancel: \"Annuler\",\r\n\t\ticon_details: \"Détails\",\r\n\t\ticon_edit: \"Modifier\",\r\n\t\ticon_delete: \"Effacer\",\r\n\t\tconfirm_closing: \"\", //Vos modifications seront perdus, êtes-vous sûr ?\r\n\t\tconfirm_deleting: \"L'événement sera effacé sans appel, êtes-vous sûr ?\",\r\n\t\tsection_description: \"Description\",\r\n\t\tsection_time: \"Période\",\r\n\t\tfull_day: \"Journée complète\",\r\n\r\n\t\tconfirm_recurring: \"Voulez-vous éditer toute une série d'évènements répétés?\",\r\n\t\tsection_recurring: \"Périodicité\",\r\n\t\tbutton_recurring: \"Désactivé\",\r\n\t\tbutton_recurring_open: \"Activé\",\r\n\t\tbutton_edit_series: \"Modifier la série\",\r\n\t\tbutton_edit_occurrence: \"Modifier une copie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Jour\",\r\n\t\tdate: \"Date\",\r\n\t\tdescription: \"Description\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Année\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Jour\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grille\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Quotidienne\",\r\n\t\trepeat_radio_week: \"Hebdomadaire\",\r\n\t\trepeat_radio_month: \"Mensuelle\",\r\n\t\trepeat_radio_year: \"Annuelle\",\r\n\t\trepeat_radio_day_type: \"Chaque\",\r\n\t\trepeat_text_day_count: \"jour\",\r\n\t\trepeat_radio_day_type2: \"Chaque journée de travail\",\r\n\t\trepeat_week: \" Répéter toutes les\",\r\n\t\trepeat_text_week_count: \"semaine:\",\r\n\t\trepeat_radio_month_type: \"Répéter\",\r\n\t\trepeat_radio_month_start: \"Le\",\r\n\t\trepeat_text_month_day: \"jour chaque\",\r\n\t\trepeat_text_month_count: \"mois\",\r\n\t\trepeat_text_month_count2_before: \"chaque\",\r\n\t\trepeat_text_month_count2_after: \"mois\",\r\n\t\trepeat_year_label: \"Le\",\r\n\t\tselect_year_day2: \"du\",\r\n\t\trepeat_text_year_day: \"jour\",\r\n\t\tselect_year_month: \"mois\",\r\n\t\trepeat_radio_end: \"Pas de date d"achèvement\",\r\n\t\trepeat_text_occurences_count: \"occurrences\",\r\n\t\trepeat_radio_end3: \"Fin\",\r\n\t\trepeat_radio_end2: \"Après\",\r\n\r\n\t\trepeat_never: \"Jamais\",\r\n\t\trepeat_daily: \"Chaque jour\",\r\n\t\trepeat_workdays: \"Chaque jour ouvrable\",\r\n\t\trepeat_weekly: \"Chaque semaine\",\r\n\t\trepeat_monthly: \"Chaque mois\",\r\n\t\trepeat_yearly: \"Chaque année\",\r\n\t\trepeat_custom: \"Personnalisé\",\r\n\t\trepeat_freq_day: \"Jour\",\r\n\t\trepeat_freq_week: \"Semaine\",\r\n\t\trepeat_freq_month: \"Mois\",\r\n\t\trepeat_freq_year: \"Année\",\r\n\t\trepeat_on_date: \"À la date\",\r\n\t\trepeat_ends: \"Se termine\",\r\n\r\n\t\tmonth_for_recurring: [\"Janvier\", \"Février\", \"Mars\", \"Avril\", \"Mai\", \"Juin\", \"Juillet\", \"Août\", \"Septembre\", \"Octobre\", \"Novembre\", \"Décembre\"],\r\n\t\tday_for_recurring: [\"Dimanche\", \"Lundi\", \"Mardi\", \"Mercredi\", \"Jeudi\", \"Vendredi\", \"Samedi\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"ינואר\", \"פברואר\", \"מרץ\", \"אפריל\", \"מאי\", \"יוני\", \"יולי\", \"אוגוסט\", \"ספטמבר\", \"אוקטובר\", \"נובמבר\", \"דצמבר\"],\r\n\t\tmonth_short: [\"ינו\", \"פבר\", \"מרץ\", \"אפר\", \"מאי\", \"יונ\", \"יול\", \"אוג\", \"ספט\", \"אוק\", \"נוב\", \"דצמ\"],\r\n\t\tday_full: [\"ראשון\", \"שני\", \"שלישי\", \"רביעי\", \"חמישי\", \"שישי\", \"שבת\"],\r\n\t\tday_short: [\"א\", \"ב\", \"ג\", \"ד\", \"ה\", \"ו\", \"ש\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"היום\",\r\n\t\tday_tab: \"יום\",\r\n\t\tweek_tab: \"שבוע\",\r\n\t\tmonth_tab: \"חודש\",\r\n\t\tnew_event: \"ארוע חדש\",\r\n\t\ticon_save: \"שמור\",\r\n\t\ticon_cancel: \"בטל\",\r\n\t\ticon_details: \"פרטים\",\r\n\t\ticon_edit: \"ערוך\",\r\n\t\ticon_delete: \"מחק\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"ארוע ימחק סופית.להמשיך?\",\r\n\t\tsection_description: \"תיאור\",\r\n\t\tsection_time: \"תקופה\",\r\n\r\n\t\tconfirm_recurring: \"האם ברצונך לשנות כל סדרת ארועים מתמשכים?\",\r\n\t\tsection_recurring: \"להעתיק ארוע\",\r\n\t\tbutton_recurring: \"לא פעיל\",\r\n\t\tbutton_recurring_open: \"פעיל\",\r\n\t\tfull_day: \"יום שלם\",\r\n\t\tbutton_edit_series: \"ערוך את הסדרה\",\r\n\t\tbutton_edit_occurrence: \"עריכת עותק\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"סדר יום\",\r\n\t\tdate: \"תאריך\",\r\n\t\tdescription: \"תיאור\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"לשנה\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"סדר יום\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"סורג\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"גרור כדי להזיז\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"בטל\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"הבא\",\r\n\t\tprev: \"הקודם\",\r\n\t\tyear: \"שנה\",\r\n\t\tmonth: \"חודש\",\r\n\t\tday: \"יום\",\r\n\t\thour:\"שעה\",\r\n\t\tminute: \"דקה\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"יומי\",\r\n\t\trepeat_radio_week: \"שבועי\",\r\n\t\trepeat_radio_month: \"חודשי\",\r\n\t\trepeat_radio_year: \"שנתי\",\r\n\t\trepeat_radio_day_type: \"חזור כל\",\r\n\t\trepeat_text_day_count: \"ימים\",\r\n\t\trepeat_radio_day_type2: \"חזור כל יום עבודה\",\r\n\t\trepeat_week: \" חזור כל\",\r\n\t\trepeat_text_week_count: \"שבוע לפי ימים:\",\r\n\t\trepeat_radio_month_type: \"חזור כל\",\r\n\t\trepeat_radio_month_start: \"כל\",\r\n\t\trepeat_text_month_day: \"ימים כל\",\r\n\t\trepeat_text_month_count: \"חודשים\",\r\n\t\trepeat_text_month_count2_before: \"חזור כל\",\r\n\t\trepeat_text_month_count2_after: \"חודש\",\r\n\t\trepeat_year_label: \"כל\",\r\n\t\tselect_year_day2: \"בחודש\",\r\n\t\trepeat_text_year_day: \"ימים\",\r\n\t\tselect_year_month: \"חודש\",\r\n\t\trepeat_radio_end: \"לעולם לא מסתיים\",\r\n\t\trepeat_text_occurences_count: \"אירועים\",\r\n\t\trepeat_radio_end3: \"מסתיים ב\",\r\n\t\trepeat_radio_end2: \"אחרי\",\r\n\r\n\t\trepeat_never: \"אף פעם\",\r\n\t\trepeat_daily: \"כל יום\",\r\n\t\trepeat_workdays: \"כל יום עבודה\",\r\n\t\trepeat_weekly: \"כל שבוע\",\r\n\t\trepeat_monthly: \"כל חודש\",\r\n\t\trepeat_yearly: \"כל שנה\",\r\n\t\trepeat_custom: \"מותאם אישית\",\r\n\t\trepeat_freq_day: \"יום\",\r\n\t\trepeat_freq_week: \"שבוע\",\r\n\t\trepeat_freq_month: \"חודש\",\r\n\t\trepeat_freq_year: \"שנה\",\r\n\t\trepeat_on_date: \"בתאריך\",\r\n\t\trepeat_ends: \"מסתיים\",\r\n\r\n\t\tmonth_for_recurring: [\"ינואר\", \"פברואר\", \"מרץ\", \"אפריל\", \"מאי\", \"יוני\", \"יולי\", \"אוגוסט\", \"ספטמבר\", \"אוקטובר\", \"נובמבר\", \"דצמבר\"],\r\n\t\tday_for_recurring: [\"ראשון\", \"שני\", \"שלישי\", \"רביעי\", \"חמישי\", \"שישי\", \"שבת\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Január\", \"Február\", \"Március\", \"Április\", \"Május\", \"Június\", \"Július\", \"Augusztus\", \"Szeptember\", \"Október\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Már\", \"Ápr\", \"Máj\", \"Jún\", \"Júl\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Vasárnap\", \"Hétfõ\", \"Kedd\", \"Szerda\", \"Csütörtök\", \"Péntek\", \"szombat\"],\r\n\t\tday_short: [\"Va\", \"Hé\", \"Ke\", \"Sze\", \"Csü\", \"Pé\", \"Szo\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Ma\",\r\n\t\tday_tab: \"Nap\",\r\n\t\tweek_tab: \"Hét\",\r\n\t\tmonth_tab: \"Hónap\",\r\n\t\tnew_event: \"Új esemény\",\r\n\t\ticon_save: \"Mentés\",\r\n\t\ticon_cancel: \"Mégse\",\r\n\t\ticon_details: \"Részletek\",\r\n\t\ticon_edit: \"Szerkesztés\",\r\n\t\ticon_delete: \"Törlés\",\r\n\t\tconfirm_closing: \"\", //A változások elvesznek, biztosan folytatja? \"\r\n\t\tconfirm_deleting: \"Az esemény törölve lesz, biztosan folytatja?\",\r\n\t\tsection_description: \"Leírás\",\r\n\t\tsection_time: \"Idõszak\",\r\n\t\tfull_day: \"Egesz napos\",\r\n\r\n\t\t/*ismétlõdõ események*/\r\n\t\tconfirm_recurring: \"Biztosan szerkeszteni akarod az összes ismétlõdõ esemény beállítását?\",\r\n\t\tsection_recurring: \"Esemény ismétlése\",\r\n\t\tbutton_recurring: \"Tiltás\",\r\n\t\tbutton_recurring_open: \"Engedélyezés\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Szerkesztés bíróság\",\r\n\r\n\t\t/*napirendi nézet*/\r\n\t\tagenda_tab: \"Napirend\",\r\n\t\tdate: \"Dátum\",\r\n\t\tdescription: \"Leírás\",\r\n\r\n\t\t/*éves nézet*/\r\n\t\tyear_tab: \"Év\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Napi\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Heti\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Havi\",\r\n\t\trepeat_radio_year: \"Éves\",\r\n\t\trepeat_radio_day_type: \"Minden\",\r\n\t\trepeat_text_day_count: \"nap\",\r\n\t\trepeat_radio_day_type2: \"Minden munkanap\",\r\n\t\trepeat_week: \" Ismételje meg minden\",\r\n\t\trepeat_text_week_count: \"héten a következő napokon:\",\r\n\t\trepeat_radio_month_type: \"Ismétlés\",\r\n\t\trepeat_radio_month_start: \"Ekkor\",\r\n\t\trepeat_text_month_day: \"nap minden\",\r\n\t\trepeat_text_month_count: \"hónapban\",\r\n\t\trepeat_text_month_count2_before: \"minden\",\r\n\t\trepeat_text_month_count2_after: \"hónapban\",\r\n\t\trepeat_year_label: \"Ekkor\",\r\n\t\tselect_year_day2: \"-án/-én\",\r\n\t\trepeat_text_year_day: \"nap\",\r\n\t\tselect_year_month: \"hónap\",\r\n\t\trepeat_radio_end: \"Nincs befejezési dátum\",\r\n\t\trepeat_text_occurences_count: \"esemény\",\r\n\t\trepeat_radio_end2: \"Után\",\r\n\t\trepeat_radio_end3: \"Befejező dátum\",\r\n\r\n\t\trepeat_never: \"Soha\",\r\n\t\trepeat_daily: \"Minden nap\",\r\n\t\trepeat_workdays: \"Minden munkanap\",\r\n\t\trepeat_weekly: \"Minden héten\",\r\n\t\trepeat_monthly: \"Minden hónapban\",\r\n\t\trepeat_yearly: \"Minden évben\",\r\n\t\trepeat_custom: \"Egyedi\",\r\n\t\trepeat_freq_day: \"Nap\",\r\n\t\trepeat_freq_week: \"Hét\",\r\n\t\trepeat_freq_month: \"Hónap\",\r\n\t\trepeat_freq_year: \"Év\",\r\n\t\trepeat_on_date: \"Dátum szerint\",\r\n\t\trepeat_ends: \"Befejeződik\",\r\n\r\n\t\tmonth_for_recurring: [\"Január\", \"Február\", \"Március\", \"Április\", \"Május\", \"Június\", \"Július\", \"Augusztus\", \"Szeptember\", \"Október\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Vasárnap\", \"Hétfő\", \"Kedd\", \"Szerda\", \"Csütörtök\", \"Péntek\", \"Szombat\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Maret\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Agustus\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mei\", \"Jun\", \"Jul\", \"Ags\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Minggu\", \"Senin\", \"Selasa\", \"Rabu\", \"Kamis\", \"Jumat\", \"Sabtu\"],\r\n\t\tday_short: [\"Ming\", \"Sen\", \"Sel\", \"Rab\", \"Kam\", \"Jum\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hari Ini\",\r\n\t\tday_tab: \"Hari\",\r\n\t\tweek_tab: \"Minggu\",\r\n\t\tmonth_tab: \"Bulan\",\r\n\t\tnew_event: \"Acara Baru\",\r\n\t\ticon_save: \"Simpan\",\r\n\t\ticon_cancel: \"Batal\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edit\",\r\n\t\ticon_delete: \"Hapus\",\r\n\t\tconfirm_closing: \"\", /*Perubahan tidak akan disimpan ?*/\r\n\t\tconfirm_deleting: \"Acara akan dihapus\",\r\n\t\tsection_description: \"Keterangan\",\r\n\t\tsection_time: \"Periode\",\r\n\t\tfull_day: \"Hari penuh\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Apakah acara ini akan berulang?\",\r\n\t\tsection_recurring: \"Acara Rutin\",\r\n\t\tbutton_recurring: \"Tidak Difungsikan\",\r\n\t\tbutton_recurring_open: \"Difungsikan\",\r\n\t\tbutton_edit_series: \"Mengedit seri\",\r\n\t\tbutton_edit_occurrence: \"Mengedit salinan\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Tanggal\",\r\n\t\tdescription: \"Keterangan\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Tahun\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabel\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Harian\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Mingguan\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Bulanan\",\r\n\t\trepeat_radio_year: \"Tahunan\",\r\n\t\trepeat_radio_day_type: \"Setiap\",\r\n\t\trepeat_text_day_count: \"hari\",\r\n\t\trepeat_radio_day_type2: \"Setiap hari kerja\",\r\n\t\trepeat_week: \" Ulangi setiap\",\r\n\t\trepeat_text_week_count: \"minggu pada hari berikut:\",\r\n\t\trepeat_radio_month_type: \"Ulangi\",\r\n\t\trepeat_radio_month_start: \"Pada\",\r\n\t\trepeat_text_month_day: \"hari setiap\",\r\n\t\trepeat_text_month_count: \"bulan\",\r\n\t\trepeat_text_month_count2_before: \"setiap\",\r\n\t\trepeat_text_month_count2_after: \"bulan\",\r\n\t\trepeat_year_label: \"Pada\",\r\n\t\tselect_year_day2: \"dari\",\r\n\t\trepeat_text_year_day: \"hari\",\r\n\t\tselect_year_month: \"bulan\",\r\n\t\trepeat_radio_end: \"Tanpa tanggal akhir\",\r\n\t\trepeat_text_occurences_count: \"kejadian\",\r\n\t\trepeat_radio_end2: \"Setelah\",\r\n\t\trepeat_radio_end3: \"Berakhir pada\",\r\n\r\n\t\trepeat_never: \"Tidak pernah\",\r\n\t\trepeat_daily: \"Setiap hari\",\r\n\t\trepeat_workdays: \"Setiap hari kerja\",\r\n\t\trepeat_weekly: \"Setiap minggu\",\r\n\t\trepeat_monthly: \"Setiap bulan\",\r\n\t\trepeat_yearly: \"Setiap tahun\",\r\n\t\trepeat_custom: \"Kustom\",\r\n\t\trepeat_freq_day: \"Hari\",\r\n\t\trepeat_freq_week: \"Minggu\",\r\n\t\trepeat_freq_month: \"Bulan\",\r\n\t\trepeat_freq_year: \"Tahun\",\r\n\t\trepeat_on_date: \"Pada tanggal\",\r\n\t\trepeat_ends: \"Berakhir\",\r\n\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Maret\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Agustus\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tday_for_recurring: [\"Minggu\", \"Senin\", \"Selasa\", \"Rabu\", \"Kamis\", \"Jumat\", \"Sabtu\"]\r\n\t}\r\n};","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Gennaio\", \"Febbraio\", \"Marzo\", \"Aprile\", \"Maggio\", \"Giugno\", \"Luglio\", \"Agosto\", \"Settembre\", \"Ottobre\", \"Novembre\", \"Dicembre\"],\r\n\t\tmonth_short: [\"Gen\", \"Feb\", \"Mar\", \"Apr\", \"Mag\", \"Giu\", \"Lug\", \"Ago\", \"Set\", \"Ott\", \"Nov\", \"Dic\"],\r\n\t\tday_full: [\"Domenica\", \"Lunedì\", \"Martedì\", \"Mercoledì\", \"Giovedì\", \"Venerdì\", \"Sabato\"],\r\n\t\tday_short: [\"Dom\", \"Lun\", \"Mar\", \"Mer\", \"Gio\", \"Ven\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Oggi\",\r\n\t\tday_tab: \"Giorno\",\r\n\t\tweek_tab: \"Settimana\",\r\n\t\tmonth_tab: \"Mese\",\r\n\t\tnew_event: \"Nuovo evento\",\r\n\t\ticon_save: \"Salva\",\r\n\t\ticon_cancel: \"Chiudi\",\r\n\t\ticon_details: \"Dettagli\",\r\n\t\ticon_edit: \"Modifica\",\r\n\t\ticon_delete: \"Elimina\",\r\n\t\tconfirm_closing: \"\", //Le modifiche apportate saranno perse, siete sicuri?\r\n\t\tconfirm_deleting: \"L'evento sarà eliminato, siete sicuri?\",\r\n\t\tsection_description: \"Descrizione\",\r\n\t\tsection_time: \"Periodo di tempo\",\r\n\t\tfull_day: \"Intera giornata\",\r\n\r\n\t\tconfirm_recurring: \"Vuoi modificare l'intera serie di eventi?\",\r\n\t\tsection_recurring: \"Ripetere l'evento\",\r\n\t\tbutton_recurring: \"Disattivato\",\r\n\t\tbutton_recurring_open: \"Attivato\",\r\n\t\tbutton_edit_series: \"Modificare la serie\",\r\n\t\tbutton_edit_occurrence: \"Modificare una copia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descrizione\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Anno\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Griglia\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Quotidiano\",\r\n\t\trepeat_radio_week: \"Settimanale\",\r\n\t\trepeat_radio_month: \"Mensile\",\r\n\t\trepeat_radio_year: \"Annuale\",\r\n\t\trepeat_radio_day_type: \"Ogni\",\r\n\t\trepeat_text_day_count: \"giorno\",\r\n\t\trepeat_radio_day_type2: \"Ogni giornata lavorativa\",\r\n\t\trepeat_week: \" Ripetere ogni\",\r\n\t\trepeat_text_week_count: \"settimana:\",\r\n\t\trepeat_radio_month_type: \"Ripetere\",\r\n\t\trepeat_radio_month_start: \"Il\",\r\n\t\trepeat_text_month_day: \"giorno ogni\",\r\n\t\trepeat_text_month_count: \"mese\",\r\n\t\trepeat_text_month_count2_before: \"ogni\",\r\n\t\trepeat_text_month_count2_after: \"mese\",\r\n\t\trepeat_year_label: \"Il\",\r\n\t\tselect_year_day2: \"del\",\r\n\t\trepeat_text_year_day: \"giorno\",\r\n\t\tselect_year_month: \"mese\",\r\n\t\trepeat_radio_end: \"Senza data finale\",\r\n\t\trepeat_text_occurences_count: \"occorenze\",\r\n\t\trepeat_radio_end3: \"Fine\",\r\n\t\trepeat_radio_end2: \"Dopo\",\r\n\r\n\t\trepeat_never: \"Mai\",\r\n\t\trepeat_daily: \"Ogni giorno\",\r\n\t\trepeat_workdays: \"Ogni giorno feriale\",\r\n\t\trepeat_weekly: \"Ogni settimana\",\r\n\t\trepeat_monthly: \"Ogni mese\",\r\n\t\trepeat_yearly: \"Ogni anno\",\r\n\t\trepeat_custom: \"Personalizzato\",\r\n\t\trepeat_freq_day: \"Giorno\",\r\n\t\trepeat_freq_week: \"Settimana\",\r\n\t\trepeat_freq_month: \"Mese\",\r\n\t\trepeat_freq_year: \"Anno\",\r\n\t\trepeat_on_date: \"Alla data\",\r\n\t\trepeat_ends: \"Finisce\",\r\n\r\n\t\tmonth_for_recurring: [\"Gennaio\", \"Febbraio\", \"Marzo\", \"Aprile\", \"Maggio\", \"Jiugno\", \"Luglio\", \"Agosto\", \"Settembre\", \"Ottobre\", \"Novembre\", \"Dicembre\"],\r\n\t\tday_for_recurring: [\"Domenica\", \"Lunedì\", \"Martedì\", \"Mercoledì\", \"Jovedì\", \"Venerdì\", \"Sabato\"]\r\n\t}\r\n};\r\n","/*\r\n Translation by Genexus Japan Inc.\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tmonth_short: [ \"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_full: [\"日曜日\", \"月曜日\", \"火曜日\", \"水曜日\", \"木曜日\", \"金曜日\", \"土曜日\"],\r\n\t\tday_short: [\"日\", \"月\", \"火\", \"水\", \"木\", \"金\", \"土\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"今日\",\r\n\t\tday_tab: \"日\",\r\n\t\tweek_tab: \"週\",\r\n\t\tmonth_tab: \"月\",\r\n\t\tnew_event: \"新イベント\",\r\n\t\ticon_save: \"保存\",\r\n\t\ticon_cancel: \"キャンセル\",\r\n\t\ticon_details: \"詳細\",\r\n\t\ticon_edit: \"編集\",\r\n\t\ticon_delete: \"削除\",\r\n\t\tconfirm_closing: \"\", //変更が取り消されます、宜しいですか?\r\n\t\tconfirm_deleting: \"イベント完全に削除されます、宜しいですか?\",\r\n\t\tsection_description: \"デスクリプション\",\r\n\t\tsection_time: \"期間\",\r\n\t\tconfirm_recurring: \"繰り返されているイベントを全て編集しますか?\",\r\n\t\tsection_recurring: \"イベントを繰り返す\",\r\n\t\tbutton_recurring: \"無効\",\r\n\t\tbutton_recurring_open: \"有効\",\r\n\t\tfull_day: \"終日\",\r\n\t\tbutton_edit_series: \"シリーズを編集します\",\r\n\t\tbutton_edit_occurrence: \"コピーを編集\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"議題は\",\r\n\t\tdate: \"日付\",\r\n\t\tdescription: \"説明\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"今年\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"議題は\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"グリッド\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"毎日\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"毎週\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"毎月\",\r\n\t\trepeat_radio_year: \"毎年\",\r\n\t\trepeat_radio_day_type: \"毎\",\r\n\t\trepeat_text_day_count: \"日\",\r\n\t\trepeat_radio_day_type2: \"毎営業日\",\r\n\t\trepeat_week: \" 繰り返し毎\",\r\n\t\trepeat_text_week_count: \"週 次の日:\",\r\n\t\trepeat_radio_month_type: \"繰り返し\",\r\n\t\trepeat_radio_month_start: \"オン\",\r\n\t\trepeat_text_month_day: \"日毎\",\r\n\t\trepeat_text_month_count: \"月\",\r\n\t\trepeat_text_month_count2_before: \"毎\",\r\n\t\trepeat_text_month_count2_after: \"月\",\r\n\t\trepeat_year_label: \"オン\",\r\n\t\tselect_year_day2: \"の\",\r\n\t\trepeat_text_year_day: \"日\",\r\n\t\tselect_year_month: \"月\",\r\n\t\trepeat_radio_end: \"終了日なし\",\r\n\t\trepeat_text_occurences_count: \"回数\",\r\n\t\trepeat_radio_end2: \"後\",\r\n\t\trepeat_radio_end3: \"終了日まで\",\r\n\r\n\t\trepeat_never: \"決して\",\r\n\t\trepeat_daily: \"毎日\",\r\n\t\trepeat_workdays: \"毎営業日\",\r\n\t\trepeat_weekly: \"毎週\",\r\n\t\trepeat_monthly: \"毎月\",\r\n\t\trepeat_yearly: \"毎年\",\r\n\t\trepeat_custom: \"カスタム\",\r\n\t\trepeat_freq_day: \"日\",\r\n\t\trepeat_freq_week: \"週\",\r\n\t\trepeat_freq_month: \"月\",\r\n\t\trepeat_freq_year: \"年\",\r\n\t\trepeat_on_date: \"日にち\",\r\n\t\trepeat_ends: \"終了\",\r\n\r\n\t\tmonth_for_recurring: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_for_recurring: [\"日曜日\", \"月曜日\", \"火曜日\", \"水曜日\", \"木曜日\", \"金曜日\", \"土曜日\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default class LocaleManager{\r\n\tconstructor(config){\r\n\t\tthis._locales = {};\r\n\t\tfor(const i in config){\r\n\t\t\tthis._locales[i] = config[i];\r\n\t\t}\r\n\t}\r\n\r\n\taddLocale(name, locale) {\r\n\t\tthis._locales[name] = locale;\r\n\t}\r\n\r\n\tgetLocale(name) {\r\n\t\treturn this._locales[name];\r\n\t}\r\n}","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Mon\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"I dag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uke\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny hendelse\",\r\n\t\ticon_save: \"Lagre\",\r\n\t\ticon_cancel: \"Avbryt\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Rediger\",\r\n\t\ticon_delete: \"Slett\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Hendelsen vil bli slettet permanent. Er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du forandre hele dette settet av repeterende hendelser?\",\r\n\t\tsection_recurring: \"Repeter hendelsen\",\r\n\t\tbutton_recurring: \"Av\",\r\n\t\tbutton_recurring_open: \"På\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Redigere en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\",\r\n\t\trepeat_radio_week: \"Ukentlig\",\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Alle hverdager\",\r\n\t\trepeat_week: \" Gjentas hver\",\r\n\t\trepeat_text_week_count: \"uke på:\",\r\n\t\trepeat_radio_month_type: \"På hver\",\r\n\t\trepeat_radio_month_start: \"På\",\r\n\t\trepeat_text_month_day: \"dag hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"på\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Ingen sluttdato\",\r\n\t\trepeat_text_occurences_count: \"forekomst\",\r\n\t\trepeat_radio_end3: \"Stop den\",\r\n\t\trepeat_radio_end2: \"Etter\",\r\n\r\n\t\trepeat_never: \"Aldri\",\r\n\t\trepeat_daily: \"Hver dag\",\r\n\t\trepeat_workdays: \"Hver ukedag\",\r\n\t\trepeat_weekly: \"Hver uke\",\r\n\t\trepeat_monthly: \"Hver måned\",\r\n\t\trepeat_yearly: \"Hvert år\",\r\n\t\trepeat_custom: \"Tilpasset\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Uke\",\r\n\t\trepeat_freq_month: \"Måned\",\r\n\t\trepeat_freq_year: \"År\",\r\n\t\trepeat_on_date: \"På dato\",\r\n\t\trepeat_ends: \"Slutter\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tday_for_recurring: [\"Sondag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Maart\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Augustus\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"mrt\", \"Apr\", \"Mei\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Zondag\", \"Maandag\", \"Dinsdag\", \"Woensdag\", \"Donderdag\", \"Vrijdag\", \"Zaterdag\"],\r\n\t\tday_short: [\"Zo\", \"Ma\", \"Di\", \"Wo\", \"Do\", \"Vr\", \"Za\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Vandaag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Week\",\r\n\t\tmonth_tab: \"Maand\",\r\n\t\tnew_event: \"Nieuw item\",\r\n\t\ticon_save: \"Opslaan\",\r\n\t\ticon_cancel: \"Annuleren\",\r\n\t\ticon_details: \"Details\",\r\n\t\ticon_edit: \"Bewerken\",\r\n\t\ticon_delete: \"Verwijderen\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Item zal permanent worden verwijderd, doorgaan?\",\r\n\t\tsection_description: \"Beschrijving\",\r\n\t\tsection_time: \"Tijd periode\",\r\n\t\tfull_day: \"Hele dag\",\r\n\r\n\t\tconfirm_recurring: \"Wilt u alle terugkerende items bijwerken?\",\r\n\t\tsection_recurring: \"Item herhalen\",\r\n\t\tbutton_recurring: \"Uit\",\r\n\t\tbutton_recurring_open: \"Aan\",\r\n\t\tbutton_edit_series: \"Bewerk de serie\",\r\n\t\tbutton_edit_occurrence: \"Bewerk een kopie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Omschrijving\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Jaar\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabel\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dagelijks\",\r\n\t\trepeat_radio_week: \"Wekelijks\",\r\n\t\trepeat_radio_month: \"Maandelijks\",\r\n\t\trepeat_radio_year: \"Jaarlijks\",\r\n\t\trepeat_radio_day_type: \"Elke\",\r\n\t\trepeat_text_day_count: \"dag(en)\",\r\n\t\trepeat_radio_day_type2: \"Elke werkdag\",\r\n\t\trepeat_week: \" Herhaal elke\",\r\n\t\trepeat_text_week_count: \"week op de volgende dagen:\",\r\n\t\trepeat_radio_month_type: \"Herhaal\",\r\n\t\trepeat_radio_month_start: \"Op\",\r\n\t\trepeat_text_month_day: \"dag iedere\",\r\n\t\trepeat_text_month_count: \"maanden\",\r\n\t\trepeat_text_month_count2_before: \"iedere\",\r\n\t\trepeat_text_month_count2_after: \"maanden\",\r\n\t\trepeat_year_label: \"Op\",\r\n\t\tselect_year_day2: \"van\",\r\n\t\trepeat_text_year_day: \"dag\",\r\n\t\tselect_year_month: \"maand\",\r\n\t\trepeat_radio_end: \"Geen eind datum\",\r\n\t\trepeat_text_occurences_count: \"keren\",\r\n\t\trepeat_radio_end3: \"Eindigd per\",\r\n\t\trepeat_radio_end2: \"Na\",\r\n\r\n\t\trepeat_never: \"Nooit\",\r\n\t\trepeat_daily: \"Elke dag\",\r\n\t\trepeat_workdays: \"Elke werkdag\",\r\n\t\trepeat_weekly: \"Elke week\",\r\n\t\trepeat_monthly: \"Elke maand\",\r\n\t\trepeat_yearly: \"Elk jaar\",\r\n\t\trepeat_custom: \"Aangepast\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Week\",\r\n\t\trepeat_freq_month: \"Maand\",\r\n\t\trepeat_freq_year: \"Jaar\",\r\n\t\trepeat_on_date: \"Op datum\",\r\n\t\trepeat_ends: \"Eindigt\",\r\n\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Maart\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Augustus\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Zondag\", \"Maandag\", \"Dinsdag\", \"Woensdag\", \"Donderdag\", \"Vrijdag\", \"Zaterdag\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Man\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uke\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny\",\r\n\t\ticon_save: \"Lagre\",\r\n\t\ticon_cancel: \"Avbryt\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Endre\",\r\n\t\ticon_delete: \"Slett\",\r\n\t\tconfirm_closing: \"Endringer blir ikke lagret, er du sikker?\", //Endringer blir ikke lagret, er du sikker?\r\n\t\tconfirm_deleting: \"Oppføringen vil bli slettet, er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\t\tfull_day: \"Full dag\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du endre hele settet med repeterende oppføringer?\",\r\n\t\tsection_recurring: \"Repeterende oppføring\",\r\n\t\tbutton_recurring: \"Ikke aktiv\",\r\n\t\tbutton_recurring_open: \"Aktiv\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Redigere en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Ukentlig\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Hver arbeidsdag\",\r\n\t\trepeat_week: \" Gjenta hver\",\r\n\t\trepeat_text_week_count: \"uke neste dager:\",\r\n\t\trepeat_radio_month_type: \"Gjenta\",\r\n\t\trepeat_radio_month_start: \"På\",\r\n\t\trepeat_text_month_day: \"dag hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"På\",\r\n\t\tselect_year_day2: \"av\",\r\n\t\trepeat_text_year_day: \"dag\",\r\n\t\tselect_year_month: \"måned\",\r\n\t\trepeat_radio_end: \"Ingen sluttdato\",\r\n\t\trepeat_text_occurences_count: \"forekomster\",\r\n\t\trepeat_radio_end2: \"Etter\",\r\n\t\trepeat_radio_end3: \"Slutt innen\",\r\n\r\n\t\trepeat_never: \"Aldri\",\r\n\t\trepeat_daily: \"Hver dag\",\r\n\t\trepeat_workdays: \"Hver ukedag\",\r\n\t\trepeat_weekly: \"Hver uke\",\r\n\t\trepeat_monthly: \"Hver måned\",\r\n\t\trepeat_yearly: \"Hvert år\",\r\n\t\trepeat_custom: \"Tilpasset\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Uke\",\r\n\t\trepeat_freq_month: \"Måned\",\r\n\t\trepeat_freq_year: \"År\",\r\n\t\trepeat_on_date: \"På dato\",\r\n\t\trepeat_ends: \"Slutter\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tday_for_recurring: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Styczeń\", \"Luty\", \"Marzec\", \"Kwiecień\", \"Maj\", \"Czerwiec\", \"Lipiec\", \"Sierpień\", \"Wrzesień\", \"Październik\", \"Listopad\", \"Grudzień\"],\r\n\t\tmonth_short: [\"Sty\", \"Lut\", \"Mar\", \"Kwi\", \"Maj\", \"Cze\", \"Lip\", \"Sie\", \"Wrz\", \"Paź\", \"Lis\", \"Gru\"],\r\n\t\tday_full: [\"Niedziela\", \"Poniedziałek\", \"Wtorek\", \"Środa\", \"Czwartek\", \"Piątek\", \"Sobota\"],\r\n\t\tday_short: [\"Nie\", \"Pon\", \"Wto\", \"Śro\", \"Czw\", \"Pią\", \"Sob\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dziś\",\r\n\t\tday_tab: \"Dzień\",\r\n\t\tweek_tab: \"Tydzień\",\r\n\t\tmonth_tab: \"Miesiąc\",\r\n\t\tnew_event: \"Nowe zdarzenie\",\r\n\t\ticon_save: \"Zapisz\",\r\n\t\ticon_cancel: \"Anuluj\",\r\n\t\ticon_details: \"Szczegóły\",\r\n\t\ticon_edit: \"Edytuj\",\r\n\t\ticon_delete: \"Usuń\",\r\n\t\tconfirm_closing: \"\", //Zmiany zostaną usunięte, jesteś pewien?\r\n\t\tconfirm_deleting: \"Zdarzenie zostanie usunięte na zawsze, kontynuować?\",\r\n\t\tsection_description: \"Opis\",\r\n\t\tsection_time: \"Okres czasu\",\r\n\t\tfull_day: \"Cały dzień\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Czy chcesz edytować cały zbiór powtarzających się zdarzeń?\",\r\n\t\tsection_recurring: \"Powtórz zdarzenie\",\r\n\t\tbutton_recurring: \"Nieaktywne\",\r\n\t\tbutton_recurring_open: \"Aktywne\",\r\n\t\tbutton_edit_series: \"Edytuj serię\",\r\n\t\tbutton_edit_occurrence: \"Edytuj kopię\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Opis\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabela\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Codziennie\",\r\n\t\trepeat_radio_week: \"Co tydzie\",\r\n\t\trepeat_radio_month: \"Co miesic\",\r\n\t\trepeat_radio_year: \"Co rok\",\r\n\t\trepeat_radio_day_type: \"Kadego\",\r\n\t\trepeat_text_day_count: \"dnia\",\r\n\t\trepeat_radio_day_type2: \"Kadego dnia roboczego\",\r\n\t\trepeat_week: \" Powtarzaj kadego\",\r\n\t\trepeat_text_week_count: \"tygodnia w dni:\",\r\n\t\trepeat_radio_month_type: \"Powtrz\",\r\n\t\trepeat_radio_month_start: \"W\",\r\n\t\trepeat_text_month_day: \"dnia kadego\",\r\n\t\trepeat_text_month_count: \"miesica\",\r\n\t\trepeat_text_month_count2_before: \"kadego\",\r\n\t\trepeat_text_month_count2_after: \"miesica\",\r\n\t\trepeat_year_label: \"W\",\r\n\t\tselect_year_day2: \"miesica\",\r\n\t\trepeat_text_year_day: \"dnia miesica\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Bez daty kocowej\",\r\n\t\trepeat_text_occurences_count: \"wystpieniu/ach\",\r\n\t\trepeat_radio_end3: \"Zakocz w\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\r\n\t\trepeat_never: \"Nigdy\",\r\n\t\trepeat_daily: \"Codziennie\",\r\n\t\trepeat_workdays: \"Każdy dzień roboczy\",\r\n\t\trepeat_weekly: \"Co tydzień\",\r\n\t\trepeat_monthly: \"Co miesiąc\",\r\n\t\trepeat_yearly: \"Co rok\",\r\n\t\trepeat_custom: \"Niestandardowy\",\r\n\t\trepeat_freq_day: \"Dzień\",\r\n\t\trepeat_freq_week: \"Tydzień\",\r\n\t\trepeat_freq_month: \"Miesiąc\",\r\n\t\trepeat_freq_year: \"Rok\",\r\n\t\trepeat_on_date: \"W dniu\",\r\n\t\trepeat_ends: \"Kończy się\",\r\n\r\n\t\tmonth_for_recurring: [\"Stycznia\", \"Lutego\", \"Marca\", \"Kwietnia\", \"Maja\", \"Czerwca\", \"Lipca\", \"Sierpnia\", \"Wrzenia\", \"Padziernka\", \"Listopada\", \"Grudnia\"],\r\n\t\tday_for_recurring: [\"Niedziela\", \"Poniedziaek\", \"Wtorek\", \"roda\", \"Czwartek\", \"Pitek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","/*\r\n\r\n TRANSLATION BY MATTHEUS PIROVANI RORIZ GONЗALVES\r\n\r\n mattheusroriz@hotmail.com / mattheus.pirovani@gmail.com /\r\n\r\n www.atrixian.com.br\r\n\r\n */\r\n\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Janeiro\", \"Fevereiro\", \"Março\", \"Abril\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"],\r\n\t\tmonth_short: [\"Jan\", \"Fev\", \"Mar\", \"Abr\", \"Mai\", \"Jun\", \"Jul\", \"Ago\", \"Set\", \"Out\", \"Nov\", \"Dez\"],\r\n\t\tday_full: [\"Domingo\", \"Segunda\", \"Terça\", \"Quarta\", \"Quinta\", \"Sexta\", \"Sábado\"],\r\n\t\tday_short: [\"Dom\", \"Seg\", \"Ter\", \"Qua\", \"Qui\", \"Sex\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hoje\",\r\n\t\tday_tab: \"Dia\",\r\n\t\tweek_tab: \"Semana\",\r\n\t\tmonth_tab: \"Mês\",\r\n\t\tnew_event: \"Novo evento\",\r\n\t\ticon_save: \"Salvar\",\r\n\t\ticon_cancel: \"Cancelar\",\r\n\t\ticon_details: \"Detalhes\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Deletar\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Tem certeza que deseja excluir?\",\r\n\t\tsection_description: \"Descrição\",\r\n\t\tsection_time: \"Período de tempo\",\r\n\t\tfull_day: \"Dia inteiro\",\r\n\r\n\t\tconfirm_recurring: \"Deseja editar todos esses eventos repetidos?\",\r\n\t\tsection_recurring: \"Repetir evento\",\r\n\t\tbutton_recurring: \"Desabilitar\",\r\n\t\tbutton_recurring_open: \"Habilitar\",\r\n\t\tbutton_edit_series: \"Editar a série\",\r\n\t\tbutton_edit_occurrence: \"Editar uma cópia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dia\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descrição\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Ano\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dia\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grade\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diário\",\r\n\t\trepeat_radio_week: \"Semanal\",\r\n\t\trepeat_radio_month: \"Mensal\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia(s)\",\r\n\t\trepeat_radio_day_type2: \"Cada trabalho diário\",\r\n\t\trepeat_week: \" Repita cada\",\r\n\t\trepeat_text_week_count: \"semana:\",\r\n\t\trepeat_radio_month_type: \"Repetir\",\r\n\t\trepeat_radio_month_start: \"Em\",\r\n\t\trepeat_text_month_day: \"todo dia\",\r\n\t\trepeat_text_month_count: \"mês\",\r\n\t\trepeat_text_month_count2_before: \"todo\",\r\n\t\trepeat_text_month_count2_after: \"mês\",\r\n\t\trepeat_year_label: \"Em\",\r\n\t\tselect_year_day2: \"of\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mês\",\r\n\t\trepeat_radio_end: \"Sem data final\",\r\n\t\trepeat_text_occurences_count: \"ocorrências\",\r\n\t\trepeat_radio_end3: \"Fim\",\r\n\t\trepeat_radio_end2: \"Depois\",\r\n\r\n\t\trepeat_never: \"Nunca\",\r\n\t\trepeat_daily: \"Todos os dias\",\r\n\t\trepeat_workdays: \"Todos os dias úteis\",\r\n\t\trepeat_weekly: \"Toda semana\",\r\n\t\trepeat_monthly: \"Todo mês\",\r\n\t\trepeat_yearly: \"Todo ano\",\r\n\t\trepeat_custom: \"Personalizado\",\r\n\t\trepeat_freq_day: \"Dia\",\r\n\t\trepeat_freq_week: \"Semana\",\r\n\t\trepeat_freq_month: \"Mês\",\r\n\t\trepeat_freq_year: \"Ano\",\r\n\t\trepeat_on_date: \"Na data\",\r\n\t\trepeat_ends: \"Termina\",\r\n\r\n\t\tmonth_for_recurring: [\"Janeiro\", \"Fevereiro\", \"Março\", \"Abril\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"],\r\n\t\tday_for_recurring: [\"Domingo\", \"Segunda\", \"Terça\", \"Quarta\", \"Quinta\", \"Sexta\", \"Sábado\"]\r\n\t}\r\n};\r\n\r\n\r\n","/*\r\n\tTraducere de Ovidiu Lixandru: http://www.madball.ro\r\n */\r\n\r\nexport default {\r\n\tdate:{\r\n\t\tmonth_full:[\"Ianuarie\", \"Februarie\", \"Martie\", \"Aprilie\", \"Mai\", \"Iunie\", \"Iulie\", \"August\", \"Septembrie\", \"Octombrie\", \"November\", \"December\"],\r\n\t\tmonth_short:[\"Ian\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Iun\", \"Iul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n\t\tday_full:[\"Duminica\", \"Luni\", \"Marti\", \"Miercuri\", \"Joi\", \"Vineri\", \"Sambata\"],\r\n\t\tday_short:[\"Du\", \"Lu\", \"Ma\", \"Mi\", \"Jo\", \"Vi\", \"Sa\"]\r\n\t},\r\n\tlabels:{\r\n\t\tdhx_cal_today_button:\"Astazi\",\r\n\t\tday_tab:\"Zi\",\r\n\t\tweek_tab:\"Saptamana\",\r\n\t\tmonth_tab:\"Luna\",\r\n\t\tnew_event:\"Eveniment nou\",\r\n\t\ticon_save:\"Salveaza\",\r\n\t\ticon_cancel:\"Anuleaza\",\r\n\t\ticon_details:\"Detalii\",\r\n\t\ticon_edit:\"Editeaza\",\r\n\t\ticon_delete:\"Sterge\",\r\n\t\tconfirm_closing:\"Schimbarile nu vor fi salvate, esti sigur?\",//Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting:\"Evenimentul va fi sters permanent, esti sigur?\",\r\n\t\tsection_description:\"Descriere\",\r\n\t\tsection_time:\"Interval\",\r\n\t\tfull_day:\"Toata ziua\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring:\"Vrei sa editezi toata seria de evenimente repetate?\",\r\n\t\tsection_recurring:\"Repetare\",\r\n\t\tbutton_recurring:\"Dezactivata\",\r\n\t\tbutton_recurring_open:\"Activata\",\r\n\t\tbutton_edit_series: \"Editeaza serie\",\r\n\t\tbutton_edit_occurrence: \"Editeaza doar intrare\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"Agenda\",\r\n\t\tdate:\"Data\",\r\n\t\tdescription:\"Descriere\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"An\",\r\n\r\n\t\t/* week agenda extension */\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Lista\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Zilnic\",\r\n\t\trepeat_radio_week: \"Saptamanal\",\r\n\t\trepeat_radio_month: \"Lunar\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"La fiecare\",\r\n\t\trepeat_text_day_count: \"zi(le)\",\r\n\t\trepeat_radio_day_type2: \"Fiecare zi lucratoare\",\r\n\t\trepeat_week: \" Repeta la fiecare\",\r\n\t\trepeat_text_week_count: \"saptamana in urmatoarele zile:\",\r\n\t\trepeat_radio_month_type: \"Repeta in\",\r\n\t\trepeat_radio_month_start: \"In a\",\r\n\t\trepeat_text_month_day: \"zi la fiecare\",\r\n\t\trepeat_text_month_count: \"luni\",\r\n\t\trepeat_text_month_count2_before: \"la fiecare\",\r\n\t\trepeat_text_month_count2_after: \"luni\",\r\n\t\trepeat_year_label: \"In\",\r\n\t\tselect_year_day2: \"a lunii\",\r\n\t\trepeat_text_year_day: \"zi a lunii\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Fara data de sfarsit\",\r\n\t\trepeat_text_occurences_count: \"evenimente\",\r\n\t\trepeat_radio_end3: \"La data\",\r\n\t\trepeat_radio_end2: \"Dupa\",\r\n\r\n\t\trepeat_never: \"Niciodată\",\r\n\t\trepeat_daily: \"În fiecare zi\",\r\n\t\trepeat_workdays: \"În fiecare zi lucrătoare\",\r\n\t\trepeat_weekly: \"În fiecare săptămână\",\r\n\t\trepeat_monthly: \"În fiecare lună\",\r\n\t\trepeat_yearly: \"În fiecare an\",\r\n\t\trepeat_custom: \"Personalizat\",\r\n\t\trepeat_freq_day: \"Zi\",\r\n\t\trepeat_freq_week: \"Săptămână\",\r\n\t\trepeat_freq_month: \"Lună\",\r\n\t\trepeat_freq_year: \"An\",\r\n\t\trepeat_on_date: \"La data\",\r\n\t\trepeat_ends: \"Se termină\",\r\n\r\n\t\tmonth_for_recurring: [\"Ianuarie\", \"Februarie\", \"Martie\", \"Aprilie\", \"Mai\", \"Iunie\", \"Iulie\", \"August\", \"Septembrie\", \"Octombrie\", \"Noiembrie\", \"Decembrie\"],\r\n\t\tday_for_recurring: [\"Duminica\", \"Luni\", \"Marti\", \"Miercuri\", \"Joi\", \"Vineri\", \"Sambata\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Январь\", \"Февраль\", \"Март\", \"Апрель\", \"Maй\", \"Июнь\", \"Июль\", \"Август\", \"Сентябрь\", \"Oктябрь\", \"Ноябрь\", \"Декабрь\"],\r\n\t\tmonth_short: [\"Янв\", \"Фев\", \"Maр\", \"Aпр\", \"Maй\", \"Июн\", \"Июл\", \"Aвг\", \"Сен\", \"Окт\", \"Ноя\", \"Дек\"],\r\n\t\tday_full: [ \"Воскресенье\", \"Понедельник\", \"Вторник\", \"Среда\", \"Четверг\", \"Пятница\", \"Суббота\"],\r\n\t\tday_short: [\"Вс\", \"Пн\", \"Вт\", \"Ср\", \"Чт\", \"Пт\", \"Сб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сегодня\",\r\n\t\tday_tab: \"День\",\r\n\t\tweek_tab: \"Неделя\",\r\n\t\tmonth_tab: \"Месяц\",\r\n\t\tnew_event: \"Новое событие\",\r\n\t\ticon_save: \"Сохранить\",\r\n\t\ticon_cancel: \"Отменить\",\r\n\t\ticon_details: \"Детали\",\r\n\t\ticon_edit: \"Изменить\",\r\n\t\ticon_delete: \"Удалить\",\r\n\t\tconfirm_closing: \"\", //Ваши изменения будут потеряны, продолжить?\r\n\t\tconfirm_deleting: \"Событие будет удалено безвозвратно, продолжить?\",\r\n\t\tsection_description: \"Описание\",\r\n\t\tsection_time: \"Период времени\",\r\n\t\tfull_day: \"Весь день\",\r\n\r\n\t\tconfirm_recurring: \"Вы хотите изменить всю серию повторяющихся событий?\",\r\n\t\tsection_recurring: \"Повторение\",\r\n\t\tbutton_recurring: \"Отключено\",\r\n\t\tbutton_recurring_open: \"Включено\",\r\n\t\tbutton_edit_series: \"Редактировать серию\",\r\n\t\tbutton_edit_occurrence: \"Редактировать экземпляр\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Список\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Описание\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Год\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Список\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Таблица\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"День\",\r\n\t\trepeat_radio_week: \"Неделя\",\r\n\t\trepeat_radio_month: \"Месяц\",\r\n\t\trepeat_radio_year: \"Год\",\r\n\t\trepeat_radio_day_type: \"Каждый\",\r\n\t\trepeat_text_day_count: \"день\",\r\n\t\trepeat_radio_day_type2: \"Каждый рабочий день\",\r\n\t\trepeat_week: \" Повторять каждую\",\r\n\t\trepeat_text_week_count: \"неделю , в:\",\r\n\t\trepeat_radio_month_type: \"Повторять\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" числа каждый \",\r\n\t\trepeat_text_month_count: \"месяц\",\r\n\t\trepeat_text_month_count2_before: \"каждый \",\r\n\t\trepeat_text_month_count2_after: \"месяц\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"день\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без даты окончания\",\r\n\t\trepeat_text_occurences_count: \"повторений\",\r\n\t\trepeat_radio_end3: \"До \",\r\n\t\trepeat_radio_end2: \"\",\r\n\r\n\t\trepeat_never: \"Никогда\",\r\n\t\trepeat_daily: \"Каждый день\",\r\n\t\trepeat_workdays: \"Каждый будний день\",\r\n\t\trepeat_weekly: \"Каждую неделю\",\r\n\t\trepeat_monthly: \"Каждый месяц\",\r\n\t\trepeat_yearly: \"Каждый год\",\r\n\t\trepeat_custom: \"Настроить\",\r\n\t\trepeat_freq_day: \"День\",\r\n\t\trepeat_freq_week: \"Неделя\",\r\n\t\trepeat_freq_month: \"Месяц\",\r\n\t\trepeat_freq_year: \"Год\",\r\n\t\trepeat_on_date: \"В дату\",\r\n\t\trepeat_ends: \"Заканчивается\",\r\n\r\n\t\tmonth_for_recurring: [\"Января\", \"Февраля\", \"Марта\", \"Апреля\", \"Мая\", \"Июня\", \"Июля\", \"Августа\", \"Сентября\", \"Октября\", \"Ноября\", \"Декабря\"],\r\n\t\tday_for_recurring: [\"Воскресенье\", \"Понедельник\", \"Вторник\", \"Среду\", \"Четверг\", \"Пятницу\", \"Субботу\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Marec\", \"April\", \"Maj\", \"Junij\", \"Julij\", \"Avgust\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Nedelja\", \"Ponedeljek\", \"Torek\", \"Sreda\", \"Četrtek\", \"Petek\", \"Sobota\"],\r\n\t\tday_short: [\"Ned\", \"Pon\", \"Tor\", \"Sre\", \"Čet\", \"Pet\", \"Sob\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Danes\",\r\n\t\tday_tab: \"Dan\",\r\n\t\tweek_tab: \"Teden\",\r\n\t\tmonth_tab: \"Mesec\",\r\n\t\tnew_event: \"Nov dogodek\",\r\n\t\ticon_save: \"Shrani\",\r\n\t\ticon_cancel: \"Prekliči\",\r\n\t\ticon_details: \"Podrobnosti\",\r\n\t\ticon_edit: \"Uredi\",\r\n\t\ticon_delete: \"Izbriši\",\r\n\t\tconfirm_closing: \"\", //Spremembe ne bodo shranjene. Želite nadaljevati ?\r\n\t\tconfirm_deleting: \"Dogodek bo izbrisan. Želite nadaljevati?\",\r\n\t\tsection_description: \"Opis\",\r\n\t\tsection_time: \"Časovni okvir\",\r\n\t\tfull_day: \"Ves dan\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Želite urediti celoten set ponavljajočih dogodkov?\",\r\n\t\tsection_recurring: \"Ponovi dogodek\",\r\n\t\tbutton_recurring: \"Onemogočeno\",\r\n\t\tbutton_recurring_open: \"Omogočeno\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Edit occurrence\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Zadeva\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Opis\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Leto\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Zadeva\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Miza\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dnevno\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Tedensko\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Mesečno\",\r\n\t\trepeat_radio_year: \"Letno\",\r\n\t\trepeat_radio_day_type: \"Vsak\",\r\n\t\trepeat_text_day_count: \"dan\",\r\n\t\trepeat_radio_day_type2: \"Vsak delovni dan\",\r\n\t\trepeat_week: \" Ponavljaj vsak\",\r\n\t\trepeat_text_week_count: \"teden na naslednje dni:\",\r\n\t\trepeat_radio_month_type: \"Ponavljaj\",\r\n\t\trepeat_radio_month_start: \"Na\",\r\n\t\trepeat_text_month_day: \"dan vsak\",\r\n\t\trepeat_text_month_count: \"mesec\",\r\n\t\trepeat_text_month_count2_before: \"vsak\",\r\n\t\trepeat_text_month_count2_after: \"mesec\",\r\n\t\trepeat_year_label: \"Na\",\r\n\t\tselect_year_day2: \"od\",\r\n\t\trepeat_text_year_day: \"dan\",\r\n\t\tselect_year_month: \"mesec\",\r\n\t\trepeat_radio_end: \"Brez končnega datuma\",\r\n\t\trepeat_text_occurences_count: \"pojavitve\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\t\trepeat_radio_end3: \"Končaj do\",\r\n\r\n\t\trepeat_never: \"Nikoli\",\r\n\t\trepeat_daily: \"Vsak dan\",\r\n\t\trepeat_workdays: \"Vsak delovni dan\",\r\n\t\trepeat_weekly: \"Vsak teden\",\r\n\t\trepeat_monthly: \"Vsak mesec\",\r\n\t\trepeat_yearly: \"Vsako leto\",\r\n\t\trepeat_custom: \"Po meri\",\r\n\t\trepeat_freq_day: \"Dan\",\r\n\t\trepeat_freq_week: \"Teden\",\r\n\t\trepeat_freq_month: \"Mesec\",\r\n\t\trepeat_freq_year: \"Leto\",\r\n\t\trepeat_on_date: \"Na datum\",\r\n\t\trepeat_ends: \"Konča se\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"Marec\", \"April\", \"Maj\", \"Junij\", \"Julij\", \"Avgust\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Nedelja\", \"Ponedeljek\", \"Torek\", \"Sreda\", \"Četrtek\", \"Petek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Január\", \"Február\", \"Marec\", \"Apríl\", \"Máj\", \"Jún\", \"Júl\", \"August\", \"September\", \"Október\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Máj\", \"Jún\", \"Júl\", \"Aug\", \"Sept\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Nedeľa\", \"Pondelok\", \"Utorok\", \"Streda\", \"Štvrtok\", \"Piatok\", \"Sobota\"],\r\n\t\tday_short: [\"Ne\", \"Po\", \"Ut\", \"St\", \"Št\", \"Pi\", \"So\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dnes\",\r\n\t\tday_tab: \"Deň\",\r\n\t\tweek_tab: \"Týždeň\",\r\n\t\tmonth_tab: \"Mesiac\",\r\n\t\tnew_event: \"Nová udalosť\",\r\n\t\ticon_save: \"Uložiť\",\r\n\t\ticon_cancel: \"Späť\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edituj\",\r\n\t\ticon_delete: \"Zmazať\",\r\n\t\tconfirm_closing: \"Vaše zmeny nebudú uložené. Skutočne?\", //Vaše změny budou ztraceny, opravdu ?\r\n\t\tconfirm_deleting: \"Udalosť bude natrvalo vymazaná. Skutočne?\",\r\n\t\tsection_description: \"Poznámky\",\r\n\t\tsection_time: \"Doba platnosti\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Prajete si upraviť celú radu opakovaných udalostí?\",\r\n\t\tsection_recurring: \"Opakovanie udalosti\",\r\n\t\tbutton_recurring: \"Vypnuté\",\r\n\t\tbutton_recurring_open: \"Zapnuté\",\r\n\t\tbutton_edit_series: \"Upraviť opakovania\",\r\n\t\tbutton_edit_occurrence: \"Upraviť inštancie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Program\",\r\n\t\tdate: \"Dátum\",\r\n\t\tdescription: \"Poznámka\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\t\tfull_day: \"Celý deň\", // Full day\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Program\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Mriežka\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Denne\",\r\n\t\trepeat_radio_week: \"Týždenne\",\r\n\t\trepeat_radio_month: \"Mesaène\",\r\n\t\trepeat_radio_year: \"Roène\",\r\n\t\trepeat_radio_day_type: \"Každý\",\r\n\t\trepeat_text_day_count: \"deò\",\r\n\t\trepeat_radio_day_type2: \"Každý prac. deò\",\r\n\t\trepeat_week: \"Opakova každý\",\r\n\t\trepeat_text_week_count: \"týždeò v dòoch:\",\r\n\t\trepeat_radio_month_type: \"Opakova\",\r\n\t\trepeat_radio_month_start: \"On\",\r\n\t\trepeat_text_month_day: \"deò každý\",\r\n\t\trepeat_text_month_count: \"mesiac\",\r\n\t\trepeat_text_month_count2_before: \"každý\",\r\n\t\trepeat_text_month_count2_after: \"mesiac\",\r\n\t\trepeat_year_label: \"On\",\r\n\t\tselect_year_day2: \"poèas\",\r\n\t\trepeat_text_year_day: \"deò\",\r\n\t\tselect_year_month: \"mesiac\",\r\n\t\trepeat_radio_end: \"Bez dátumu ukonèenia\",\r\n\t\trepeat_text_occurences_count: \"udalostiach\",\r\n\t\trepeat_radio_end3: \"Ukonèi\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\r\n\t\trepeat_never: \"Nikdy\",\r\n\t\trepeat_daily: \"Každý deň\",\r\n\t\trepeat_workdays: \"Každý pracovný deň\",\r\n\t\trepeat_weekly: \"Každý týždeň\",\r\n\t\trepeat_monthly: \"Každý mesiac\",\r\n\t\trepeat_yearly: \"Každý rok\",\r\n\t\trepeat_custom: \"Vlastné\",\r\n\t\trepeat_freq_day: \"Deň\",\r\n\t\trepeat_freq_week: \"Týždeň\",\r\n\t\trepeat_freq_month: \"Mesiac\",\r\n\t\trepeat_freq_year: \"Rok\",\r\n\t\trepeat_on_date: \"Na dátum\",\r\n\t\trepeat_ends: \"Koniec\",\r\n\r\n\t\tmonth_for_recurring: [\"Január\", \"Február\", \"Marec\", \"Apríl\", \"Máj\", \"Jún\", \"Júl\", \"August\", \"September\", \"Október\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Nede¾a\", \"Pondelok\", \"Utorok\", \"Streda\", \"Štvrtok\", \"Piatok\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Mars\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"Augusti\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Söndag\", \"Måndag\", \"Tisdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lördag\"],\r\n\t\tday_short: [\"Sön\", \"Mån\", \"Tis\", \"Ons\", \"Tor\", \"Fre\", \"Lör\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Vecka\",\r\n\t\tmonth_tab: \"Månad\",\r\n\t\tnew_event: \"Ny händelse\",\r\n\t\ticon_save: \"Spara\",\r\n\t\ticon_cancel: \"Ångra\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Ändra\",\r\n\t\ticon_delete: \"Ta bort\",\r\n\t\tconfirm_closing: \"\", //Dina förändingar kommer gå förlorade, är du säker?\r\n\t\tconfirm_deleting: \"Är du säker på att du vill ta bort händelsen permanent?\",\r\n\t\tsection_description: \"Beskrivning\",\r\n\t\tsection_time: \"Tid\",\r\n\t\tfull_day: \"Hela dagen\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vill du redigera hela serien med repeterande händelser?\",\r\n\t\tsection_recurring: \"Upprepa händelse\",\r\n\t\tbutton_recurring: \"Inaktiverat\",\r\n\t\tbutton_recurring_open: \"Aktiverat\",\r\n\t\tbutton_edit_series: \"Redigera serien\",\r\n\t\tbutton_edit_occurrence: \"Redigera en kopia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dagordning\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Beskrivning\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dagordning\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Galler\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Dra för att skapa ny\",\r\n\t\tdrag_to_move:\"Dra för att flytta\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dagligen\",\r\n\t\trepeat_radio_week: \"Veckovis\",\r\n\t\trepeat_radio_month: \"Månadsvis\",\r\n\t\trepeat_radio_year: \"Årligen\",\r\n\t\trepeat_radio_day_type: \"Var\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Varje arbetsdag\",\r\n\t\trepeat_week: \" Upprepa var\",\r\n\t\trepeat_text_week_count: \"vecka dessa dagar:\",\r\n\t\trepeat_radio_month_type: \"Upprepa\",\r\n\t\trepeat_radio_month_start: \"Den\",\r\n\t\trepeat_text_month_day: \"dagen var\",\r\n\t\trepeat_text_month_count: \"månad\",\r\n\t\trepeat_text_month_count2_before: \"var\",\r\n\t\trepeat_text_month_count2_after: \"månad\",\r\n\t\trepeat_year_label: \"Den\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"månad\",\r\n\t\trepeat_radio_end: \"Inget slutdatum\",\r\n\t\trepeat_text_occurences_count: \"upprepningar\",\r\n\t\trepeat_radio_end3: \"Sluta efter\",\r\n\t\trepeat_radio_end2: \"Efter\",\r\n\r\n\t\trepeat_never: \"Aldrig\",\r\n\t\trepeat_daily: \"Varje dag\",\r\n\t\trepeat_workdays: \"Varje vardag\",\r\n\t\trepeat_weekly: \"Varje vecka\",\r\n\t\trepeat_monthly: \"Varje månad\",\r\n\t\trepeat_yearly: \"Varje år\",\r\n\t\trepeat_custom: \"Anpassad\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Vecka\",\r\n\t\trepeat_freq_month: \"Månad\",\r\n\t\trepeat_freq_year: \"År\",\r\n\t\trepeat_on_date: \"På datum\",\r\n\t\trepeat_ends: \"Slutar\",\r\n\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Mars\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"Augusti\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Söndag\", \"Måndag\", \"Tisdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lördag\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Ocak\", \"Þubat\", \"Mart\", \"Nisan\", \"Mayýs\", \"Haziran\", \"Temmuz\", \"Aðustos\", \"Eylül\", \"Ekim\", \"Kasým\", \"Aralýk\"],\r\n\t\tmonth_short: [\"Oca\", \"Þub\", \"Mar\", \"Nis\", \"May\", \"Haz\", \"Tem\", \"Aðu\", \"Eyl\", \"Eki\", \"Kas\", \"Ara\"],\r\n\t\tday_full: [\"Pazar\", \"Pazartes,\", \"Salý\", \"Çarþamba\", \"Perþembe\", \"Cuma\", \"Cumartesi\"],\r\n\t\tday_short: [\"Paz\", \"Pts\", \"Sal\", \"Çar\", \"Per\", \"Cum\", \"Cts\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Bugün\",\r\n\t\tday_tab: \"Gün\",\r\n\t\tweek_tab: \"Hafta\",\r\n\t\tmonth_tab: \"Ay\",\r\n\t\tnew_event: \"Uygun\",\r\n\t\ticon_save: \"Kaydet\",\r\n\t\ticon_cancel: \"Ýptal\",\r\n\t\ticon_details: \"Detaylar\",\r\n\t\ticon_edit: \"Düzenle\",\r\n\t\ticon_delete: \"Sil\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Etkinlik silinecek, devam?\",\r\n\t\tsection_description: \"Açýklama\",\r\n\t\tsection_time: \"Zaman aralýðý\",\r\n\t\tfull_day: \"Tam gün\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Tüm tekrar eden etkinlikler silinecek, devam?\",\r\n\t\tsection_recurring: \"Etkinliði tekrarla\",\r\n\t\tbutton_recurring: \"Pasif\",\r\n\t\tbutton_recurring_open: \"Aktif\",\r\n\t\tbutton_edit_series: \"Dizi düzenleme\",\r\n\t\tbutton_edit_occurrence: \"Bir kopyasını düzenleyin\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Ajanda\",\r\n\t\tdate: \"Tarih\",\r\n\t\tdescription: \"Açýklama\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Yýl\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Ajanda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Izgara\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Günlük\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Haftalık\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Aylık\",\r\n\t\trepeat_radio_year: \"Yıllık\",\r\n\t\trepeat_radio_day_type: \"Her\",\r\n\t\trepeat_text_day_count: \"gün\",\r\n\t\trepeat_radio_day_type2: \"Her iş günü\",\r\n\t\trepeat_week: \" Tekrar her\",\r\n\t\trepeat_text_week_count: \"hafta şu günlerde:\",\r\n\t\trepeat_radio_month_type: \"Tekrar et\",\r\n\t\trepeat_radio_month_start: \"Tarihinde\",\r\n\t\trepeat_text_month_day: \"gün her\",\r\n\t\trepeat_text_month_count: \"ay\",\r\n\t\trepeat_text_month_count2_before: \"her\",\r\n\t\trepeat_text_month_count2_after: \"ay\",\r\n\t\trepeat_year_label: \"Tarihinde\",\r\n\t\tselect_year_day2: \"ayın\",\r\n\t\trepeat_text_year_day: \"günü\",\r\n\t\tselect_year_month: \"ay\",\r\n\t\trepeat_radio_end: \"Bitiş tarihi yok\",\r\n\t\trepeat_text_occurences_count: \"olay\",\r\n\t\trepeat_radio_end2: \"Sonra\",\r\n\t\trepeat_radio_end3: \"Tarihinde bitir\",\r\n\r\n\t\trepeat_never: \"Asla\",\r\n\t\trepeat_daily: \"Her gün\",\r\n\t\trepeat_workdays: \"Her iş günü\",\r\n\t\trepeat_weekly: \"Her hafta\",\r\n\t\trepeat_monthly: \"Her ay\",\r\n\t\trepeat_yearly: \"Her yıl\",\r\n\t\trepeat_custom: \"Özel\",\r\n\t\trepeat_freq_day: \"Gün\",\r\n\t\trepeat_freq_week: \"Hafta\",\r\n\t\trepeat_freq_month: \"Ay\",\r\n\t\trepeat_freq_year: \"Yıl\",\r\n\t\trepeat_on_date: \"Tarihinde\",\r\n\t\trepeat_ends: \"Biter\",\r\n\r\n\t\tmonth_for_recurring: [\"Ocak\", \"Şubat\", \"Mart\", \"Nisan\", \"Mayıs\", \"Haziran\", \"Temmuz\", \"Ağustos\", \"Eylül\", \"Ekim\", \"Kasım\", \"Aralık\"],\r\n\t\tday_for_recurring: [\"Pazar\", \"Pazartesi\", \"Salı\", \"Çarşamba\", \"Perşembe\", \"Cuma\", \"Cumartesi\"]\r\n\t}\r\n};","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Січень\", \"Лютий\", \"Березень\", \"Квітень\", \"Травень\", \"Червень\", \"Липень\", \"Серпень\", \"Вересень\", \"Жовтень\", \"Листопад\", \"Грудень\"],\r\n\t\tmonth_short: [\"Січ\", \"Лют\", \"Бер\", \"Кві\", \"Тра\", \"Чер\", \"Лип\", \"Сер\", \"Вер\", \"Жов\", \"Лис\", \"Гру\"],\r\n\t\tday_full: [\"Неділя\", \"Понеділок\", \"Вівторок\", \"Середа\", \"Четвер\", \"П'ятниця\", \"Субота\"],\r\n\t\tday_short: [\"Нед\", \"Пон\", \"Вів\", \"Сер\", \"Чет\", \"Птн\", \"Суб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сьогодні\",\r\n\t\tday_tab: \"День\",\r\n\t\tweek_tab: \"Тиждень\",\r\n\t\tmonth_tab: \"Місяць\",\r\n\t\tnew_event: \"Нова подія\",\r\n\t\ticon_save: \"Зберегти\",\r\n\t\ticon_cancel: \"Відміна\",\r\n\t\ticon_details: \"Деталі\",\r\n\t\ticon_edit: \"Редагувати\",\r\n\t\ticon_delete: \"Вилучити\",\r\n\t\tconfirm_closing: \"\", //Ваші зміни втратяться. Ви впевнені ?\r\n\t\tconfirm_deleting: \"Подія вилучиться назавжди. Ви впевнені?\",\r\n\t\tsection_description: \"Опис\",\r\n\t\tsection_time: \"Часовий проміжок\",\r\n\t\tfull_day: \"Весь день\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Хочете редагувати весь перелік повторюваних подій?\",\r\n\t\tsection_recurring: \"Повторювана подія\",\r\n\t\tbutton_recurring: \"Відключено\",\r\n\t\tbutton_recurring_open: \"Включено\",\r\n\t\tbutton_edit_series: \"Редагувати серію\",\r\n\t\tbutton_edit_occurrence: \"Редагувати примірник\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Перелік\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Опис\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Рік\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Перелік\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Таблиця\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"День\",\r\n\t\trepeat_radio_week: \"Тиждень\",\r\n\t\trepeat_radio_month: \"Місяць\",\r\n\t\trepeat_radio_year: \"Рік\",\r\n\t\trepeat_radio_day_type: \"Кожний\",\r\n\t\trepeat_text_day_count: \"день\",\r\n\t\trepeat_radio_day_type2: \"Кожний робочий день\",\r\n\t\trepeat_week: \" Повторювати кожен\",\r\n\t\trepeat_text_week_count: \"тиждень , по:\",\r\n\t\trepeat_radio_month_type: \"Повторювати\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" числа кожний \",\r\n\t\trepeat_text_month_count: \"місяць\",\r\n\t\trepeat_text_month_count2_before: \"кожен \",\r\n\t\trepeat_text_month_count2_after: \"місяць\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"день\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без дати закінчення\",\r\n\t\trepeat_text_occurences_count: \"повторень\",\r\n\t\trepeat_radio_end3: \"До \",\r\n\t\trepeat_radio_end2: \"\",\r\n\r\n\t\trepeat_never: \"Ніколи\",\r\n\t\trepeat_daily: \"Щодня\",\r\n\t\trepeat_workdays: \"Щодня в робочі дні\",\r\n\t\trepeat_weekly: \"Щотижня\",\r\n\t\trepeat_monthly: \"Щомісяця\",\r\n\t\trepeat_yearly: \"Щороку\",\r\n\t\trepeat_custom: \"Налаштоване\",\r\n\t\trepeat_freq_day: \"День\",\r\n\t\trepeat_freq_week: \"Тиждень\",\r\n\t\trepeat_freq_month: \"Місяць\",\r\n\t\trepeat_freq_year: \"Рік\",\r\n\t\trepeat_on_date: \"На дату\",\r\n\t\trepeat_ends: \"Закінчується\",\r\n\r\n\t\tmonth_for_recurring: [\"січня\", \"лютого\", \"березня\", \"квітня\", \"травня\", \"червня\", \"липня\", \"серпня\", \"вересня\", \"жовтня\", \"листопада\", \"грудня\"],\r\n\t\tday_for_recurring: [\"Неділям\", \"Понеділкам\", \"Вівторкам\", \"Середам\", \"Четвергам\", \"П'ятницям\", \"Суботам\"]\r\n\t}\r\n};\r\n","import ar from \"./locale_ar\";\r\nimport be from \"./locale_be\";\r\nimport ca from \"./locale_ca\";\r\nimport cn from \"./locale_cn\";\r\nimport cs from \"./locale_cs\";\r\nimport da from \"./locale_da\";\r\nimport de from \"./locale_de\";\r\nimport el from \"./locale_el\";\r\nimport en from \"./locale_en\";\r\nimport es from \"./locale_es\";\r\nimport fi from \"./locale_fi\";\r\nimport fr from \"./locale_fr\";\r\nimport he from \"./locale_he\";\r\nimport hu from \"./locale_hu\";\r\nimport id from \"./locale_id\";\r\nimport it from \"./locale_it\";\r\nimport jp from \"./locale_jp\";\r\n\r\nimport LocaleManager from \"./locale_manager\";\r\n\r\nimport nb from \"./locale_nb\";\r\nimport nl from \"./locale_nl\";\r\nimport no from \"./locale_no\";\r\nimport pl from \"./locale_pl\";\r\nimport pt from \"./locale_pt\";\r\nimport ro from \"./locale_ro\";\r\nimport ru from \"./locale_ru\";\r\nimport si from \"./locale_si\";\r\nimport sk from \"./locale_sk\";\r\nimport sv from \"./locale_sv\";\r\nimport tr from \"./locale_tr\";\r\nimport ua from \"./locale_ua\";\r\n\r\nexport default function(){\r\n\treturn new LocaleManager({\r\n\t\ten,\r\n\t\tar,\r\n\t\tbe,\r\n\t\tca,\r\n\t\tcn,\r\n\t\tcs,\r\n\t\tda,\r\n\t\tde,\r\n\t\tel,\r\n\t\tes,\r\n\t\tfi,\r\n\t\tfr,\r\n\t\the,\r\n\t\thu,\r\n\t\tid,\r\n\t\tit,\r\n\t\tjp,\r\n\t\tnb,\r\n\t\tnl,\r\n\t\tno,\r\n\t\tpl,\r\n\t\tpt,\r\n\t\tro,\r\n\t\tru,\r\n\t\tsi,\r\n\t\tsk,\r\n\t\tsv,\r\n\t\ttr,\r\n\t\tua\r\n\t});\r\n}","import eventable from \"../utils/eventable\";\r\n\r\nexport class DatePicker {\r\n\tconstructor(scheduler, container, state = {}) {\r\n\t\tthis.state = {\r\n\t\t\tdate: new Date(),\r\n\t\t\tmodes: ['days', 'months', 'years'],\r\n\t\t\tcurrentRange: [],\r\n\t\t\teventDates: [],\r\n\t\t\tfilterDays: null,\r\n\t\t\tcurrentModeIndex: 0,\r\n\t\t\t...state\r\n\t\t};\r\n\t\tthis.container = null;\r\n\t\tthis.element = null;\r\n\t\tthis.onStateChangeHandlers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t\tthis._domEvents = scheduler._createDomEventScope();\r\n\t\tthis.state = this.getState();\r\n\t\teventable(this);\r\n\t\tif(container){\r\n\r\n\t\t\tthis.container = container;\r\n\t\t\tthis.render(this.container);\r\n\t\t}\r\n\r\n\t\tthis.onStateChange((oldState, newState) => {\r\n\t\t\tthis.callEvent(\"onStateChange\", [newState, oldState]);\r\n\t\t});\r\n\t}\r\n\r\n\tgetState() {\r\n\t\treturn { \r\n\t\t\t...this.state,\r\n\t\t\tmode: this.state.modes[this.state.currentModeIndex]\r\n\t\t};\r\n\t}\r\n\r\n\tsetState(newState) {\r\n\t\tconst oldState = { ...this.state };\r\n\t\tif(newState.mode){\r\n\t\t\tnewState.currentModeIndex = this.state.modes.indexOf(newState.mode);\r\n\t\t}\r\n\t\tthis.state = { ...this.state, ...newState };\r\n\r\n\t\tthis._notifyStateChange(oldState, this.state);\r\n\r\n\t\tif (this.container) {\r\n\t\t\tthis.render(this.container);\r\n\t\t}\r\n\t}\r\n\r\n\tonStateChange(handler) {\r\n\t\tthis.onStateChangeHandlers.push(handler);\r\n\r\n\t\t// function to remove the handler\r\n\t\treturn () => {\r\n\t\t\tconst index = this.onStateChangeHandlers.indexOf(handler);\r\n\t\t\tif (index !== -1) {\r\n\t\t\t\tthis.onStateChangeHandlers.splice(index, 1);\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\r\n\t_notifyStateChange(oldState, newState) {\r\n\t\tthis.onStateChangeHandlers.forEach(handler => handler(oldState, newState));\r\n\t}\r\n\r\n\t_adjustDate(direction) {\r\n\r\n\t\tconst {mode, date} = this.getState();\r\n\t\tconst newDate = new Date(date);\r\n\t\tif (mode === 'days') {\r\n\t\t\tnewDate.setMonth(date.getMonth() + direction);\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tnewDate.setFullYear(date.getFullYear() + direction);\r\n\t\t} else {\r\n\t\t\tnewDate.setFullYear(date.getFullYear() + direction * 10);\r\n\t\t}\r\n\t\tthis.setState({ date: newDate });\r\n\t}\r\n\r\n\t_toggleMode() {\r\n\t\tconst newIndex = (this.state.currentModeIndex + 1) % this.state.modes.length;\r\n\t\tthis.setState({ currentModeIndex: newIndex });\r\n\t}\r\n\r\n\t_renderCalendarHeader(container) {\r\n\t\tconst {mode, date} = this.getState();\r\n\r\n\t\tconst header = document.createElement('div');\r\n\t\theader.classList.add('dhx_cal_datepicker_header');\r\n\r\n\t\tconst backwardArrow = document.createElement('button');\r\n\r\n\t\tbackwardArrow.classList.add(\"dhx_cal_datepicker_arrow\", \"scheduler_icon\", \"arrow_left\");\r\n\t\theader.appendChild(backwardArrow);\r\n\r\n\t\tconst monthLabel = document.createElement('div');\r\n\t\tmonthLabel.classList.add('dhx_cal_datepicker_title');\r\n\r\n\t\tif (mode === 'days') {\r\n\t\t\tmonthLabel.innerText = date.toLocaleString('default', { month: 'long' }) + ' ' + date.getFullYear();\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tmonthLabel.innerText = date.getFullYear();\r\n\t\t} else {\r\n\t\t\tconst startYear = Math.floor(date.getFullYear() / 10) * 10;\r\n\t\t\tmonthLabel.innerText = `${startYear} - ${startYear + 9}`;\r\n\t\t}\r\n\r\n\t\tthis._domEvents.attach(monthLabel, \"click\", this._toggleMode.bind(this));\r\n\t\theader.appendChild(monthLabel);\r\n\r\n\t\tconst forwardArrow = document.createElement('button');\r\n\r\n\t\tforwardArrow.classList.add(\"dhx_cal_datepicker_arrow\", \"scheduler_icon\", \"arrow_right\");\r\n\t\theader.appendChild(forwardArrow);\r\n\r\n\t\tcontainer.appendChild(header);\r\n\r\n\t\tthis._domEvents.attach(backwardArrow, \"click\", this._adjustDate.bind(this, -1));\r\n\t\tthis._domEvents.attach(forwardArrow, \"click\", this._adjustDate.bind(this, 1));\r\n\t}\r\n\r\n\trender(container) {\r\n\t\tthis._domEvents.detachAll();\r\n\t\tthis.container = container || this.container; \r\n\t\tthis.container.innerHTML = '';\r\n\r\n\t\tif(!this.element){\r\n\t\t\tthis.element = document.createElement(\"div\");\r\n\t\t\tthis.element.classList.add(\"dhx_cal_datepicker\");\r\n\t\t}\r\n\t\tthis.element.innerHTML = '';\r\n\t\tthis.container.appendChild(this.element);\r\n\r\n\t\tthis._renderCalendarHeader(this.element);\r\n\t\tconst dataContainer = document.createElement(\"div\");\r\n\t\tdataContainer.classList.add(\"dhx_cal_datepicker_data\");\r\n\t\tthis.element.appendChild(dataContainer);\r\n\r\n\t\tconst {mode} = this.getState();\r\n\t\tif (mode === 'days') {\r\n\t\t\tthis._renderDayGrid(dataContainer);\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tthis._renderMonthGrid(dataContainer);\r\n\t\t} else {\r\n\t\t\tthis._renderYearGrid(dataContainer);\r\n\t\t}\r\n\t}\r\n\r\n\t_renderDayGridHeader(daysOfWeekContainer) {\r\n\t\tconst {date, filterDays} = this.getState();\r\n\t\tconst scheduler = this.scheduler;\r\n\r\n\t\tlet currentDate = scheduler.date.week_start(new Date(date));\r\n\t\tconst maxDate = scheduler.date.add(scheduler.date.week_start(new Date(date)), 1, 'week');\r\n\r\n\t\tdaysOfWeekContainer.classList.add('dhx_cal_datepicker_days');\r\n\r\n\t\tconst labelFormat = scheduler.date.date_to_str(\"%D\");\r\n\r\n\t\twhile (currentDate.valueOf() < maxDate.valueOf()) {\r\n\t\t\tif(!(filterDays && filterDays(currentDate))){\r\n\t\t\t\tconst label = labelFormat(currentDate);\r\n\r\n\t\t\t\tconst dayElement = document.createElement('div');\r\n\t\t\t\tdayElement.setAttribute(\"data-day\", currentDate.getDay());\r\n\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_dayname');\r\n\t\t\t\tdayElement.innerText = label;\r\n\t\t\t\tdaysOfWeekContainer.appendChild(dayElement);\r\n\t\t\t}\r\n\r\n\t\t\tcurrentDate = scheduler.date.add(currentDate, 1, 'day');\r\n\t\t}\r\n\t}\r\n\r\n\t_weeksBetween(min, max) {\r\n\t\tconst scheduler = this.scheduler;\r\n\t\tlet weeks = 0;\r\n\t\tlet currWeek = new Date(min);\r\n\t\twhile(currWeek.valueOf() < max.valueOf()){\r\n\t\t\tweeks += 1;\r\n\t\t\tcurrWeek = scheduler.date.week_start(scheduler.date.add(currWeek, 1, \"week\"));\r\n\t\t}\r\n\t\treturn weeks;\r\n\t}\r\n\r\n\t_renderDayGrid(container) {\r\n\t\tconst {date, currentRange, eventDates, minWeeks, filterDays} = this.getState();\r\n\r\n\t\tlet minSchedulerDate = currentRange[0];\r\n\t\tlet maxSchedulerDate = currentRange[1];\r\n\r\n\t\tconst eventDaysTable = eventDates.reduce((acc, date) => {\r\n\t\t\tconst dayStart = this.scheduler.date.day_start(new Date(date));\r\n\t\t\tacc[dayStart.valueOf()] = true;\r\n\t\t\treturn acc;\r\n\t\t}, {});\r\n\r\n\r\n\t\t// Render Days of the Week\r\n\t\tconst daysOfWeekContainer = document.createElement('div');\r\n\t\tthis._renderDayGridHeader(daysOfWeekContainer);\r\n\t\tconst weekLength = daysOfWeekContainer.children.length;\r\n\t\tcontainer.appendChild(daysOfWeekContainer);\r\n\t\tif(weekLength !== 7){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-week-length\", weekLength);\r\n\t\t}\r\n\r\n\t\tconst scheduler = this.scheduler;\r\n\t\tconst firstDate = scheduler.date.week_start(scheduler.date.month_start(new Date(date)));\r\n\t\tconst monthStart = scheduler.date.month_start(new Date(date));\r\n\t\tconst monthEnd = scheduler.date.add(scheduler.date.month_start(new Date(date)), 1, 'month');\r\n\t\tlet lastDate = scheduler.date.add(scheduler.date.month_start(new Date(date)), 1, 'month');\r\n\t\tconst currentCalDate = scheduler.date.date_part(scheduler._currentDate());\r\n\t\tif(lastDate.getDay() !== 0){\r\n\t\t\tlastDate = scheduler.date.add(scheduler.date.week_start(lastDate), 1, \"week\");\r\n\t\t}\r\n\r\n\t\tlet weeks = this._weeksBetween(firstDate, lastDate);\r\n\t\tif(minWeeks && weeks < minWeeks){\r\n\t\t\tlastDate = scheduler.date.add(lastDate, (minWeeks - weeks), \"week\");\r\n\t\t}\r\n\r\n\t\tlet currDate = firstDate;\r\n\r\n\t\tconst dayGridContainer = document.createElement('div');\r\n\t\tdayGridContainer.classList.add('dhx_cal_datepicker_days');\r\n\r\n\t\tthis._domEvents.attach(dayGridContainer, \"click\", (event) => {\r\n\t\t\tconst dateCell = event.target.closest(\"[data-cell-date]\");\r\n\t\t\tconst date = new Date(dateCell.getAttribute(\"data-cell-date\"));\r\n\t\t\tthis.callEvent(\"onDateClick\", [date, event]);\r\n\t\t});\r\n\r\n\t\twhile(currDate.valueOf() < lastDate.valueOf()){\r\n\t\t\tif(!(filterDays && filterDays(currDate))){\r\n\r\n\t\t\t\tconst dayElement = document.createElement('div');\r\n\t\t\t\tdayElement.setAttribute(\"data-cell-date\", scheduler.templates.format_date(currDate));\r\n\t\t\t\tdayElement.setAttribute(\"data-day\", currDate.getDay());\r\n\t\t\t\tdayElement.innerHTML = currDate.getDate();\r\n\r\n\t\t\t\tif(currDate.valueOf() < monthStart.valueOf()){\r\n\t\t\t\t\tdayElement.classList.add('dhx_before');\r\n\t\t\t\t}else if(currDate.valueOf() >= monthEnd.valueOf()){\t\r\n\t\t\t\t\tdayElement.classList.add('dhx_after');\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(currDate.getDay() === 0 || currDate.getDay() === 6){\r\n\t\t\t\t\tdayElement.classList.add(\"dhx_cal_datepicker_weekend\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(currDate.valueOf() == currentCalDate.valueOf()){\r\n\t\t\t\t\tdayElement.classList.add(\"dhx_now\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(minSchedulerDate && maxSchedulerDate){\r\n\t\t\t\t\tif(currDate.valueOf() >= minSchedulerDate.valueOf() && currDate.valueOf() < maxSchedulerDate.valueOf()){\r\n\t\t\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(eventDaysTable[currDate.valueOf()]){\r\n\t\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_event');\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_date');\r\n\r\n\t\t\t\tdayGridContainer.appendChild(dayElement);\r\n\t\t\t}\r\n\t\t\tcurrDate = scheduler.date.add(currDate, 1, 'day');\r\n\t\t}\r\n\r\n\t\tcontainer.appendChild(dayGridContainer);\r\n\r\n\t}\r\n\r\n\t_renderMonthGrid(container) {\r\n\t\tconst {date} = this.getState();\r\n\r\n\t\tconst wrapper = document.createElement('div');\r\n\t\twrapper.classList.add(\"dhx_cal_datepicker_months\");\r\n\r\n\t\tconst months = [];\r\n\t\tfor(let i = 0; i < 12; i++){\r\n\t\t\tmonths.push(new Date(date.getFullYear(), i, 1));\r\n\t\t}\r\n\r\n\t\tconst formatLabel = this.scheduler.date.date_to_str(\"%M\");\r\n\t\tmonths.forEach(month => {\r\n\t\t\tconst monthElement = document.createElement('div');\r\n\t\t\tmonthElement.classList.add('dhx_cal_datepicker_month');\r\n\t\t\tif(date.getMonth() === month.getMonth()){\r\n\t\t\t\tmonthElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t}\r\n\t\t\tmonthElement.setAttribute(\"data-month\", month.getMonth());\r\n\t\t\tmonthElement.innerHTML = formatLabel(month);\r\n\t\t\tthis._domEvents.attach(monthElement, \"click\", () => {\r\n\t\t\t\tconst newDate = new Date(month);\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tdate: newDate,\r\n\t\t\t\t\tmode: 'days'\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\twrapper.appendChild(monthElement);\r\n\t\t});\r\n\t\tcontainer.appendChild(wrapper);\r\n\r\n\t\tconst doneArea = document.createElement(\"div\");\r\n\t\tdoneArea.classList.add(\"dhx_cal_datepicker_done\");\r\n\t\tconst doneBtn = document.createElement(\"button\");\r\n\t\tdoneBtn.innerText = \"Done\";\r\n\t\tdoneBtn.classList.add(\"dhx_cal_datepicker_done_btn\");\r\n\t\tthis._domEvents.attach(doneBtn, \"click\", () => {\r\n\t\t\tthis.setState({\r\n\t\t\t\tmode: 'days'\r\n\t\t\t});\r\n\t\t});\r\n\t\tdoneArea.appendChild(doneBtn);\r\n\t\tcontainer.appendChild(doneArea);\r\n\t}\r\n\r\n\t_renderYearGrid(container) {\r\n\t\tconst {date} = this.getState();\r\n\t\tconst startYear = Math.floor(date.getFullYear() / 10) * 10;\r\n\t\t\r\n\t\tconst wrapper = document.createElement('div');\r\n\t\twrapper.classList.add(\"dhx_cal_datepicker_years\");\r\n\t\tfor (let i = startYear - 1; i <= startYear + 10; i++) {\r\n\t\t\tconst yearElement = document.createElement('div');\r\n\t\t\tyearElement.innerText = i;\r\n\t\t\tyearElement.classList.add('dhx_cal_datepicker_year');\r\n\t\t\tyearElement.setAttribute(\"data-year\", i);\r\n\t\t\tif(date.getFullYear() === i){\r\n\t\t\t\tyearElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t}\r\n\t\t\tthis._domEvents.attach(yearElement, \"click\", () => {\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tdate: new Date(i, date.getMonth(), 1),\r\n\t\t\t\t\tmode: 'months'\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\twrapper.appendChild(yearElement);\r\n\t\t\t\r\n\t\t}\r\n\t\tcontainer.appendChild(wrapper);\r\n\r\n\t\tconst doneArea = document.createElement(\"div\");\r\n\t\tdoneArea.classList.add(\"dhx_cal_datepicker_done\");\r\n\t\tconst doneBtn = document.createElement(\"button\");\r\n\t\tdoneBtn.innerText = \"Done\";\r\n\t\tdoneBtn.classList.add(\"dhx_cal_datepicker_done_btn\");\r\n\t\tthis._domEvents.attach(doneBtn, \"click\", () => {\r\n\t\t\tthis.setState({\r\n\t\t\t\tmode: 'months'\r\n\t\t\t});\r\n\t\t});\r\n\t\tdoneArea.appendChild(doneBtn);\r\n\t\tcontainer.appendChild(doneArea);\r\n\t}\r\n\r\n\tdestructor(){\r\n\t\tthis.onStateChangeHandlers = [];\r\n\t\tif(this.element){\r\n\t\t\tthis.element.innerHTML = '';\r\n\t\t\tthis.element.remove();\r\n\t\t}\r\n\r\n\t\tthis._domEvents.detachAll();\r\n\t\tthis.callEvent(\"onDestroy\", []);\r\n\t\tthis.detachAllEvents();\r\n\r\n\t\tthis.scheduler = null;\r\n\t}\r\n}","// import \"./css/dhtmlxscheduler_terrace\";\r\n// import \"./css/dhtmlxscheduler_material\";\r\n// import \"./css/dhtmlxscheduler_material_nofont\";\r\n// import \"./css/dhtmlxscheduler_flat\";\r\n// import \"./css/dhtmlxscheduler_contrast_black\";\r\n// import \"./css/dhtmlxscheduler_contrast_white\";\r\n\r\nimport addPlugins from \"./plugins\";\r\nimport stateProvider from \"./core/state\";\r\nimport assert from \"./core/common/assert\";\r\nimport common_errors from \"./core/common_errors\";\r\nimport connector from \"./core/connector\";\r\nimport schedulerCore from \"./core/scheduler\";\r\nimport common from \"./core/common\";\r\nimport wai_aria from \"./core/wai_aria\";\r\nimport utils from \"./core/utils/utils\";\r\nimport dom_helpers from \"./core/utils/dom_helpers\";\r\nimport env from \"./utils/env\";\r\nimport destructor from \"./core/destructor\";\r\nimport ajax from \"./core/utils/ajax\";\r\nimport base from \"./core/base\";\r\nimport config from \"./core/config\";\r\nimport event from \"./core/event\";\r\nimport event_highlight from \"./core/event_highlight\";\r\nimport load from \"./core/load\";\r\nimport lightbox from \"./core/lightbox\";\r\nimport touch from \"./core/touch\";\r\nimport dhtmlx_suite_hooks from \"./core/dhtmlx/dhtmlx_suite_hooks\";\r\nimport skins from \"./core/skins\";\r\nimport jquery from \"./core/jquery\";\r\nimport delay_render from \"./core/delay_render\";\r\nimport dataProcessorExtend from \"./core/dataprocessor/dataprocessor\";\r\nimport message from \"./core/message\";\r\nimport i18nFactory from \"./locale\";\r\n\r\nimport voidFirst from \"./publish_helpers/void_script_first\";\r\nimport voidSecond from \"./publish_helpers/void_script_second\";\r\nimport voidThird from \"./publish_helpers/void_script_third\";\r\n\r\n//import datepickerHeader from \"./core/clickable_header\";\r\n\r\nimport { DatePicker } from \"./core/datepicker\";\r\n\r\nexport default function(extensionManager) {\r\n\r\n\tconst scheduler = { version: VERSION };\r\n\t\r\n\tscheduler.$stateProvider = stateProvider();\r\n\r\n\tscheduler.getState = scheduler.$stateProvider.getState;\r\n\tcommon_errors(scheduler);\r\n\tcommon(scheduler);\r\n\tschedulerCore(scheduler);\r\n\twai_aria(scheduler);\r\n\t//utils(scheduler);\r\n\r\n\tscheduler.utils = utils;\r\n\tscheduler.$domHelpers = dom_helpers;\r\n\tscheduler.utils.dom = dom_helpers;\r\n\tscheduler.uid = utils.uid;\r\n\tscheduler.mixin = utils.mixin;\r\n\tscheduler.defined = utils.defined;\r\n\tscheduler.assert = assert(scheduler);\r\n\tscheduler.copy = utils.copy;\r\n\r\n\tscheduler._createDatePicker = function(container, config){\r\n\t\treturn new DatePicker(scheduler, container, config);\r\n\t};\r\n\r\n\t//datepickerHeader(scheduler);\r\n\r\n\r\n\t//old api compatibility\r\n\tscheduler._getFocusableNodes = dom_helpers.getFocusableNodes;\r\n\tscheduler._getClassName = dom_helpers.getClassName;\r\n\tscheduler._locate_css = dom_helpers.locateCss;\r\n\r\n\tconst messageApi = message(scheduler);\r\n\tscheduler.utils.mixin(scheduler, messageApi);\r\n\r\n\tscheduler.env = scheduler.$env = env;\r\n\tscheduler.Promise = window.Promise;\r\n\tdestructor(scheduler);\r\n\tajax(scheduler);\r\n\tvoidFirst(scheduler);\r\n\tbase(scheduler);\r\n\tconfig(scheduler);\r\n\tevent(scheduler);\r\n\tevent_highlight(scheduler);\r\n\tload(scheduler);\r\n\tlightbox(scheduler);\r\n\ttouch(scheduler);\r\n\tdhtmlx_suite_hooks(scheduler);\r\n\tvoidSecond(scheduler);\r\n\tskins(scheduler);\r\n\tjquery(scheduler);\r\n\tdelay_render(scheduler);\r\n\tdataProcessorExtend(scheduler);\r\n\tvoidThird(scheduler);\r\n\tconnector(scheduler);\r\n\tconst i18n = i18nFactory();\r\n\tscheduler.i18n = {\r\n\t\taddLocale: i18n.addLocale,\r\n\t\tsetLocale: function(locale){\r\n\t\t\tif(typeof locale === \"string\"){\r\n\t\t\t\tvar localeObject = i18n.getLocale(locale);\r\n\t\t\t\tif(!localeObject){\r\n\t\t\t\t\tlocaleObject = i18n.getLocale(\"en\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler.locale = localeObject;\r\n\t\t\t}else if(locale){\r\n\t\t\t\tif(!scheduler.locale){\r\n\t\t\t\t\tscheduler.locale = locale;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfor(var i in locale){\r\n\t\t\t\t\t\tif(locale[i] && typeof locale[i] === \"object\"){\r\n\t\t\t\t\t\t\tif(!scheduler.locale[i]){\r\n\t\t\t\t\t\t\t\tscheduler.locale[i] = {};\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tscheduler.mixin(scheduler.locale[i], locale[i], true);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tscheduler.locale[i] = locale[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar labels = scheduler.locale.labels;\r\n\t\t\tlabels.dhx_save_btn \t= labels.icon_save;\r\n\t\t\tlabels.dhx_cancel_btn \t= labels.icon_cancel;\r\n\t\t\tlabels.dhx_delete_btn \t= labels.icon_delete;\r\n\r\n\t\t\tif(scheduler.$container){\r\n\t\t\t\tscheduler.get_elements();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t},\r\n\t\tgetLocale: i18n.getLocale\r\n\t};\r\n\tscheduler.i18n.setLocale(\"en\");\r\n\taddPlugins(scheduler);\r\n\tscheduler.ext = {};\r\n\r\n\tconst activePlugins = {};\r\n\tscheduler.plugins = function(config){\r\n\t\tconst extensionList = getExtensionList(config, {\r\n\t\t\t\ttreetimeline: [\"timeline\"],\r\n\t\t\t\tdaytimeline: [\"timeline\"],\r\n\t\t\t\touterdrag: [\"legacy\"]\r\n\t\t\t}, {\r\n\t\t\t\tlegacy: 1,\r\n\t\t\t\tlimit: 1,\r\n\t\t\t\ttimeline: 2,\r\n\t\t\t\tdaytimeline: 3,\r\n\t\t\t\ttreetimeline: 3,\r\n\t\t\t\touterdrag:6\r\n\t\t\t});\r\n\r\n\t\textensionList.forEach(function(name){\r\n\t\t\tif(!activePlugins[name]){\r\n\t\t\t\tconst plugin = extensionManager.getExtension(name);\r\n\t\t\t\tif(plugin){\r\n\t\t\t\t\tplugin(scheduler);\r\n\t\t\t\t\tactivePlugins[name] = true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthrow new Error(\"unknown plugin \" + name);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n\r\n\tfunction getExtensionList(config, dependencies, priorities){\r\n\t\tconst result = [];\r\n\r\n\t\tfor(const i in config){\r\n\t\t\tif(config[i]){\r\n\t\t\t\tconst extension = i.toLowerCase();\r\n\t\t\t\tif(dependencies[extension]){\r\n\t\t\t\t\tdependencies[extension].forEach(function(dep){\r\n\t\t\t\t\t\tconst dependencyName = dep.toLowerCase();\r\n\t\t\t\t\t\tif(!config[dependencyName]){\r\n\t\t\t\t\t\t\tresult.push(dependencyName);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\tresult.push(extension);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tresult.sort(function(a, b){\r\n\t\t\tconst orderA = priorities[a] || 0;\r\n\t\t\tconst orderB = priorities[b] || 0;\r\n\t\t\tif(orderA > orderB){\r\n\t\t\t\treturn 1;\r\n\t\t\t}else if(orderA < orderB){\r\n\t\t\t\treturn -1;\r\n\t\t\t}else{\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\treturn scheduler;\r\n\r\n}","export default class ExtensionsManager{\r\n\tconstructor(config){\r\n\t\tthis._extensions = {};\r\n\t\tfor(const i in config){\r\n\t\t\tthis._extensions[i] = config[i];\r\n\t\t}\r\n\t}\r\n\r\n\taddExtension(name, ext) {\r\n\t\tthis._extensions[name] = ext;\r\n\t}\r\n\r\n\tgetExtension(name) {\r\n\t\treturn this._extensions[name];\r\n\t}\r\n}","\r\n\r\nimport dhtmlxHook from \"./dhtmlx_hook\";\r\nimport \"./css/theme.less\";\r\ndhtmlxHook();\r\n\r\nimport global from \"./global\";\r\n\r\nimport factoryMethod from \"./scheduler_factory_method\";\r\nimport ExtensionsManager from \"./ext/extension_manager\";\r\n\r\nclass SchedulerFactory {\r\n\r\n\tconstructor (extensions) {\r\n\t\tthis._seed = 0;\r\n\t\tthis._schedulerPlugins = [];\r\n\t\tthis._bundledExtensions = extensions;\r\n\t\tthis._extensionsManager = new ExtensionsManager(extensions);\r\n\t}\r\n\r\n\tplugin(code) {\r\n\t\tthis._schedulerPlugins.push(code);\r\n\r\n\t\tif(global.scheduler){\r\n\t\t\tcode(global.scheduler);\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetSchedulerInstance(initConfig) {\r\n\t\tvar scheduler = factoryMethod(this._extensionsManager);\r\n\r\n\t\tfor (var i = 0; i < this._schedulerPlugins.length; i++) {\r\n\t\t\tthis._schedulerPlugins[i](scheduler);\r\n\t\t}\r\n\t\tscheduler._internal_id = this._seed++;\r\n\t\r\n\t\tif (this.$syncFactory){\r\n\t\t\tthis.$syncFactory(scheduler);\r\n\t\t}\r\n\r\n\t\tif(initConfig){\r\n\t\t\tthis._initFromConfig(scheduler, initConfig);\r\n\t\t}\r\n\r\n\t\treturn scheduler;\r\n\t}\r\n\r\n\t_initFromConfig(scheduler, initConfig){\r\n\t\tif(initConfig.plugins){\r\n\t\t\tscheduler.plugins(initConfig.plugins);\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.config){\r\n\t\t\tscheduler.mixin(scheduler.config, initConfig.config, true);\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.templates){\r\n\t\t\tscheduler.attachEvent(\"onTemplatesReady\", function(){\r\n\t\t\t\tscheduler.mixin(scheduler.templates, initConfig.templates, true);\r\n\t\t\t}, {once: true});\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.events){\r\n\t\t\tfor(const event in initConfig.events){\r\n\t\t\t\tscheduler.attachEvent(event, initConfig.events[event]);\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.locale){\r\n\t\t\tscheduler.i18n.setLocale(initConfig.locale);\r\n\t\t}\r\n\t\r\n\t\tif(Array.isArray(initConfig.calendars)){\r\n\t\t\tinitConfig.calendars.forEach(function(calendar){\r\n\t\t\t\tscheduler.addCalendar(calendar);\r\n\t\t\t});\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.container){\r\n\t\t\tscheduler.init(initConfig.container);\r\n\t\t} else {\r\n\t\t\tscheduler.init();\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.data){\r\n\t\t\tif(typeof initConfig.data === \"string\"){\r\n\t\t\t\tscheduler.load(initConfig.data);\r\n\t\t\t}else{\r\n\t\t\t\tscheduler.parse(initConfig.data);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\r\n}\r\n\r\nexport default SchedulerFactory;","export default function(scheduler){\r\n\r\nscheduler.config.active_link_view = \"day\";\r\nscheduler._active_link_click = function(e){\r\n\tvar start = e.target;\r\n\tvar to = start.getAttribute(\"data-link-date\");\r\n\tvar s_d = scheduler.date.str_to_date(scheduler.config.api_date, false, true);\r\n\tif (to) {\r\n\t\tscheduler.setCurrentView(s_d(to), scheduler.config.active_link_view);\r\n\t\tif (e && e.preventDefault)\r\n\t\t\te.preventDefault();\r\n\t\treturn false;\r\n\t}\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar do_wrapper = function(key, fullname){\r\n\t\tfullname = fullname || (key+\"_scale_date\");\r\n\r\n\t\tif(!scheduler.templates['_active_links_old_'+ fullname]){\r\n\t\t\tscheduler.templates['_active_links_old_'+ fullname] = scheduler.templates[fullname];\r\n\t\t}\r\n\t\tvar week_x = scheduler.templates['_active_links_old_'+ fullname];\r\n\t\tvar d_s = scheduler.date.date_to_str(scheduler.config.api_date);\r\n\t\tscheduler.templates[fullname] = function(date) {\r\n\t\t\treturn \"\" + week_x(date) + \"\";\r\n\t\t};\r\n\t};\r\n\r\n\tdo_wrapper(\"week\");\r\n\tdo_wrapper(\"\", \"month_day\");\r\n\tif (this.matrix){\r\n\t\tfor (var key in this.matrix)\r\n\t\t\tdo_wrapper(key);\r\n\t}\r\n\r\n\tthis._detachDomEvent(this._obj, \"click\", scheduler._active_link_click);\r\n\tscheduler.event(this._obj, \"click\", scheduler._active_link_click);\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.date.add_agenda_legacy = function(date){\r\n\treturn scheduler.date.add(date, 1, \"year\");\r\n};\r\n\r\nscheduler.templates.agenda_legacy_time = function(start,end,ev){\r\n\tif (ev._timed)\r\n\t\treturn this.day_date(ev.start_date, ev.end_date, ev)+\" \"+this.event_date(start);\r\n\telse\r\n\t\treturn scheduler.templates.day_date(start)+\" – \"+scheduler.templates.day_date(end);\r\n};\r\nscheduler.templates.agenda_legacy_text = function(start,end,event){\r\n\treturn event.text;\r\n};\r\nscheduler.templates.agenda_legacy_date = function(){ return \"\"; };\r\n\r\nscheduler.date.agenda_legacy_start=function(){ return scheduler.date.date_part(scheduler._currentDate()); };\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function() {\r\n\tvar old_dblclick_dhx_cal_data = scheduler.dblclick_dhx_cal_data;\r\n\tscheduler.dblclick_dhx_cal_data = function() {\r\n\t\tif (this._mode == \"agenda_legacy\") {\r\n\t\t\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\t\t\tthis.addEventNow();\r\n\t\t} else {\r\n\t\t\tif (old_dblclick_dhx_cal_data)\r\n\t\t\t\treturn old_dblclick_dhx_cal_data.apply(this, arguments);\r\n\t\t}\r\n\t};\r\n\r\n\r\n\tvar old = scheduler.render_data;\r\n\tscheduler.render_data=function(evs){\r\n\t\tif (this._mode == \"agenda_legacy\")\r\n\t\t\tfill_agenda_tab();\r\n\t\telse\r\n\t\t\treturn old.apply(this,arguments);\r\n\t};\r\n\r\n\tvar old_render_view_data = scheduler.render_view_data;\r\n\tscheduler.render_view_data = function(){\r\n\t\tif(this._mode == \"agenda_legacy\") {\r\n\t\t\tscheduler._agendaScrollTop = scheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop;\r\n\t\t\tscheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop = 0;\r\n\t\t}\r\n\t\treturn old_render_view_data.apply(this,arguments);\r\n\t};\r\n\r\n\r\n\r\n\tfunction set_full_view(mode){\r\n\t\tif (mode){\r\n\t\t\tvar l = scheduler.locale.labels;\r\n\r\n\t\t\tvar rowAttr = scheduler._waiAria.agendaHeadAttrString();\r\n\t\t\tvar dateHeader = scheduler._waiAria.agendaHeadDateString(l.date);\r\n\t\t\tvar descriptionHeader = scheduler._waiAria.agendaHeadDescriptionString(l.description);\r\n\r\n\t\t\tscheduler._els[\"dhx_cal_header\"][0].innerHTML=\"
\" +\r\n\t\t\t\t\"
\"+l.date+\"
\" +\r\n\t\t\t\t\"\"+l.description+\"\" +\r\n\t\t\t\t\"
\";\r\n\t\t\tscheduler._table_view=true;\r\n\t\t\tscheduler.set_sizes();\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fill_agenda_tab(){\r\n\t\t//select events for which data need to be printed\r\n\r\n\t\tvar events = scheduler.get_visible_events();\r\n\t\tevents.sort(function(a,b){ return a.start_date>b.start_date?1:-1;});\r\n\r\n\t\tvar tableAttr = scheduler._waiAria.agendaDataAttrString();\r\n\t\tvar agendaEventAttrString;\r\n\t\t//generate html for the view\r\n\t\tvar html=\"
\";\r\n\t\tfor (var i=0; i
\"+\r\n\t\t\t\t\t(scheduler.config.rtl ? scheduler.templates.agenda_time(ev.end_date,ev.start_date, ev):scheduler.templates.agenda_time(ev.start_date, ev.end_date,ev))+\r\n\t\t\t\t\t\"
\";\r\n\t\t\thtml+=`
\r\n\t\t\t\r\n\t\t\t
`;\r\n\t\t\thtml+=\"\"+scheduler.templates.agenda_text(ev.start_date, ev.end_date, ev)+\"
\";\r\n\t\t}\r\n\t\thtml+=\"
\";\r\n\r\n\t\t//render html\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop = scheduler._agendaScrollTop||0;\r\n\r\n\t\t// setting up dhx_v_border size\r\n\t\tvar agenda_area = scheduler._els[\"dhx_cal_data\"][0].childNodes[0];\r\n\t\tvar v_border = agenda_area.childNodes[agenda_area.childNodes.length-1];\r\n\t\tv_border.style.height = (agenda_area.offsetHeight < scheduler._els[\"dhx_cal_data\"][0].offsetHeight) ? \"100%\" : (agenda_area.offsetHeight+\"px\");\r\n\r\n\t\tvar t=scheduler._els[\"dhx_cal_data\"][0].firstChild.childNodes;\r\n\r\n\t\tvar dateElement = scheduler._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML=scheduler.templates.agenda_date(scheduler._min_date, scheduler._max_date, scheduler._mode);\r\n\t\t}\r\n\r\n\t\tscheduler._rendered=[];\r\n\t\tfor (var i=0; i < t.length-1; i++)\r\n\t\t\tscheduler._rendered[i]=t[i];\r\n\r\n\t}\r\n\r\n\tscheduler.agenda_legacy_view=function(mode){\r\n\t\tscheduler._min_date = scheduler.config.agenda_start||scheduler.date.agenda_legacy_start(scheduler._date);\r\n\t\tscheduler._max_date = scheduler.config.agenda_end||scheduler.date.add_agenda_legacy(scheduler._min_date, 1);\r\n\r\n\t\tset_full_view(mode);\r\n\t\tif (mode){\r\n\t\t\tscheduler._cols = null;\r\n\t\t\tscheduler._colsS = null;\r\n\t\t\tscheduler._table_view = true;\r\n\t\t\t//agenda tab activated\r\n\t\t\tfill_agenda_tab();\r\n\t\t} else {\r\n\t\t\tscheduler._table_view = false;\r\n\t\t\t//agenda tab de-activated\r\n\t\t}\r\n\t};\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.date.add_agenda = function(date, inc){\r\n\t\treturn scheduler.date.add(date, 1*inc, \"month\");\r\n\t};\r\n\t\r\n\tscheduler.templates.agenda_time = function(start,end,ev){\r\n\t\tif (ev._timed){\r\n\t\t\treturn `${this.event_date(start)} - ${this.event_date(end)}`;\r\n\t\t}else{\r\n\t\t\treturn scheduler.locale.labels.full_day;\r\n\t\t}\r\n\t};\r\n\tscheduler.templates.agenda_text = function(start,end,ev){\r\n\t\treturn ev.text;\r\n\t};\r\n\r\n\tconst dayDateToStr = scheduler.date.date_to_str(\"%F %j\");\r\n\tconst dayDowToStr = scheduler.date.date_to_str(\"%l\");\r\n\r\n\tscheduler.templates.agenda_day = function(date){ \r\n\t\treturn `
${dayDateToStr(date)}
\r\n\t\t
${dayDowToStr(date)}
`;\r\n\t};\r\n\tscheduler.templates.agenda_date = function(start, end){ \r\n\t\treturn scheduler.templates.month_date(scheduler.getState().date); \r\n\t};\r\n\t\r\n\tscheduler.date.agenda_start=function(date){\r\n\t\treturn scheduler.date.month_start(new Date(date));\r\n\t};\r\n\r\n\tlet scrollTop = 0;\r\n\t\r\n\tscheduler.attachEvent(\"onTemplatesReady\",function() {\r\n\t\tvar old_dblclick_dhx_cal_data = scheduler.dblclick_dhx_cal_data;\r\n\t\tscheduler.dblclick_dhx_cal_data = function() {\r\n\t\t\tif (this._mode == \"agenda\") {\r\n\t\t\t\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\t\t\t\tthis.addEventNow();\r\n\t\t\t} else {\r\n\t\t\t\tif (old_dblclick_dhx_cal_data)\r\n\t\t\t\t\treturn old_dblclick_dhx_cal_data.apply(this, arguments);\r\n\t\t\t}\r\n\t\t};\r\n\t\r\n\t\r\n\t\tvar old = scheduler.render_data;\r\n\t\tscheduler.render_data=function(evs){\r\n\t\t\tif (this._mode == \"agenda\")\r\n\t\t\t\tfill_agenda_tab();\r\n\t\t\telse\r\n\t\t\t\treturn old.apply(this,arguments);\r\n\t\t};\r\n\t\r\n\t\tvar old_render_view_data = scheduler.render_view_data;\r\n\t\tscheduler.render_view_data = function(){\r\n\t\t\tif(this._mode == \"agenda\") {\r\n\t\t\t\tscrollTop = scheduler._els[\"dhx_cal_data\"][0].scrollTop;\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = 0;\r\n\t\t\t}\r\n\t\t\treturn old_render_view_data.apply(this,arguments);\r\n\t\t};\r\n\r\n\t\tfunction fill_agenda_tab(){\r\n\t\t\tconst events = scheduler.get_visible_events();\r\n\t\t\tevents.sort(function(a,b){ return a.start_date>b.start_date?1:-1;});\r\n\r\n\t\t\tconst eventsInDays = {};\r\n\t\t\tlet currDate = scheduler.getState().min_date;\r\n\t\t\tconst maxDate = scheduler.getState().max_date;\r\n\t\t\twhile(currDate.valueOf() < maxDate.valueOf()){\r\n\t\t\t\teventsInDays[currDate.valueOf()] = [];\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\r\n\t\t\tlet anyEvents = false;\r\n\r\n\t\t\tevents.forEach((ev) => {\r\n\t\t\t\tlet eventStart = scheduler.date.day_start(new Date(ev.start_date)); \r\n\t\t\t\twhile (eventStart.valueOf() < ev.end_date.valueOf()) {\r\n\t\t\t\t\tif (eventsInDays[eventStart.valueOf()]) {\r\n\t\t\t\t\t\teventsInDays[eventStart.valueOf()].push(ev);\r\n\t\t\t\t\t\tanyEvents = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\teventStart = scheduler.date.day_start(scheduler.date.add(eventStart, 1, \"day\"));\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(!anyEvents){\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = renderEmptyView();\r\n\t\t\t}else{\r\n\t\t\t\tlet html = \"\";\r\n\t\t\t\tfor(let day in eventsInDays){\r\n\t\t\t\t\tif(scheduler.ignore_agenda && scheduler.ignore_agenda(new Date(day*1))){\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\thtml += renderDay(new Date(day*1), eventsInDays[day]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = scrollTop;\r\n\t\t\t\r\n\t\t\tlet t = scheduler._els[\"dhx_cal_data\"][0].querySelectorAll(\".dhx_cal_agenda_event_line\");\r\n\t\t\tscheduler._rendered = [];\r\n\t\t\tfor (var i = 0; i < t.length - 1; i++) {\r\n\t\t\t\tscheduler._rendered[i] = t[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\r\n\r\n\t\tfunction renderEmptyView(){\r\n\t\t\treturn `
${scheduler.locale.labels.agenda_tab}
`;\r\n\t\t}\r\n\r\n\t\tfunction renderDay(day, events) {\r\n\t\t\tif(!events.length){\r\n\t\t\t\treturn \"\";\r\n\t\t\t}\r\n\t\t\tlet html = `\r\n
\r\n\t
${scheduler.templates.agenda_day(day)}
\r\n\t
\r\n`;\r\n\r\n\t\t\tevents.forEach((calendarEvent) => {\r\n\t\t\t\thtml += renderOneEvent(day, calendarEvent);\r\n\t\t\t});\r\n\r\n\t\t\thtml += `
`;\r\n\t\t\treturn html;\r\n\t\t}\r\n\r\n\t\tfunction renderOneEvent(day, calendarEvent){\r\n\t\t\tconst dates = scheduler.templates.agenda_time(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\t\t\tconst selectedId = scheduler.getState().select_id;\r\n\t\t\tconst cls = scheduler.templates.event_class(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\t\t\tconst description = scheduler.templates.agenda_text(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\r\n\t\t\tlet style = \"\";\r\n\t\t\tif(calendarEvent.color || calendarEvent.textColor){\r\n\t\t\t\tconst bg = (calendarEvent.color ? (\"--dhx-scheduler-event-background:\" + calendarEvent.color + \";\") : \"\");\r\n\t\t\t\tconst color = (calendarEvent.textColor ? (\"--dhx-scheduler-event-color:\" + calendarEvent.textColor + \";\") : \"\");\r\n\t\t\t\tstyle = ` style=\"${bg}${color}\" `;\r\n\t\t\t}\r\n\r\n\t\t\treturn `
\r\n\t
\r\n\t
${dates}
\r\n\t
${description}
\r\n
`;\r\n\t\t}\r\n\t\r\n\t\tscheduler.agenda_view=function(mode){\r\n\t\t\tif (mode){\r\n\t\t\t\tscheduler._min_date = scheduler.config.agenda_start || scheduler.date.agenda_start(scheduler._date);\r\n\t\t\t\tscheduler._max_date = scheduler.config.agenda_end || scheduler.date.add_agenda(scheduler._min_date, 1);\r\n\t\t\t\tscheduler._cols = null;\r\n\t\t\t\tscheduler._colsS = null;\r\n\t\t\t\tscheduler._table_view = true;\r\n\r\n\t\t\t\tconst dateHeader = scheduler._getNavDateElement();\r\n\t\t\t\tdateHeader.innerHTML = scheduler.templates.agenda_date(scheduler._date);\r\n\t\t\t\t//agenda tab activated\r\n\t\t\t\tfill_agenda_tab();\r\n\t\t\t} else {\r\n\t\t\t\tscheduler._table_view = false;\r\n\t\t\t\t//agenda tab de-activated\r\n\t\t\t}\r\n\t\t};\r\n\t});\r\n\r\n\t// scheduler.attachEvent(\"onEventSelected\", function(id){\r\n\t// \tconst oldSelected = scheduler.$container.querySelectorAll(\".dhx_cal_agenda_event_line_selected\");\r\n\t// \toldSelected.forEach((el) => {\r\n\t// \t\tel.classList.remove(\"dhx_cal_agenda_event_line_selected\");\r\n\t// \t});\r\n\r\n\t// \tconst selected = scheduler.$container.querySelector(`[${scheduler.config.event_attribute}=\"${id}\"]`);\r\n\t// \tif(selected){\r\n\t// \t\tselected.classList.add(\"dhx_cal_agenda_event_line_selected\");\r\n\t// \t}\r\n\t// });\r\n\t\r\n\t\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.config.all_timed = \"short\";\r\n\tscheduler.config.all_timed_month = false;\r\n\r\n\tvar is_event_short = function (ev) {\r\n\t\tif(!((ev.end_date - ev.start_date)/(1000*60*60) >= 24)){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t// short event shouldn't disappear to multiday area during dnd-resize\r\n\t\tif(scheduler._drag_mode == \"resize\" && scheduler._drag_id == ev.id){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn \tfalse;\r\n\t};\r\n\r\n\t// copy of usual events and recurring instances;\r\n\t// regular copy causes problems with recurrings which have series event as a prototype\r\n\tscheduler._safe_copy = function(event){\r\n\t\tvar proto = null,\r\n\t\t\tcopy = scheduler._copy_event(event);\r\n\t\tif(event.event_pid){\r\n\t\t\tproto = scheduler.getEvent(event.event_pid);\r\n\t\t}\r\n\r\n\t\tif (proto && proto.isPrototypeOf(event)) {\r\n\t\t\tdelete copy.event_length;\r\n\t\t\tdelete copy.event_pid;\r\n\t\t\tdelete copy.rec_pattern;\r\n\t\t\tdelete copy.rec_type;\r\n\t\t}\r\n\r\n\t\treturn copy;\r\n\t};\r\n\r\n\tvar old_prerender_events_line = scheduler._pre_render_events_line;\r\n\tvar old_prerender_events_table = scheduler._pre_render_events_table;\r\n\r\n\tvar prerender_events = function (evs, hold) {\r\n\t\tif (!this._table_view) {\r\n\t\t\treturn old_prerender_events_line.call(this, evs, hold);\r\n\t\t}\r\n\r\n\t\treturn old_prerender_events_table.call(this, evs, hold);\r\n\t};\r\n\r\n\tscheduler._pre_render_events_line = scheduler._pre_render_events_table = function(evs, hold){\r\n\t\tif (!this.config.all_timed ||\r\n\t\t\t(this._table_view && this._mode != \"month\") ||\r\n\t\t\t(this._mode == \"month\" && !this.config.all_timed_month))\r\n\t\t\treturn prerender_events.call(this, evs, hold);\r\n\r\n\t\tfor (var i=0; i < evs.length; i++) {\r\n\t\t\tvar ev=evs[i];\r\n\r\n\t\t\tif (ev._timed)\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tif (this.config.all_timed == \"short\") {\r\n\t\t\t\tif (!is_event_short(ev)) {\r\n\t\t\t\t\tif (this._mode != \"month\") {\r\n\t\t\t\t\t\tevs.splice(i--, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar ce = this._safe_copy(ev); // current event (event for one specific day) is copy of original with modified dates\r\n\t\t\tif(!ev._virtual){\r\n\t\t\t\tce._first_chunk = true;\r\n\t\t\t}else{\r\n\t\t\t\tce._first_chunk = false;\r\n\t\t\t}\r\n\t\t\tce._drag_resize = false;\r\n\t\t\tce._virtual = true;\r\n\t\t\tce.start_date = new Date(ce.start_date); // as lame copy doesn't copy date objects\r\n\r\n\t\t\tif (!isOvernightEvent(ev)) {\r\n\t\t\t\tce.end_date = new Date(ev.end_date);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tce.end_date = getNextDay(ce.start_date);\r\n\t\t\t\tif (this.config.last_hour != 24) { // if specific last_hour was set (e.g. 20)\r\n\t\t\t\t\tce.end_date = setDateTime(ce.start_date, this.config.last_hour);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar event_changed = false;\r\n\t\t\tif (ce.start_date < this._max_date && ce.end_date > this._min_date && ce.start_date < ce.end_date) {\r\n\t\t\t\tevs[i] = ce; // adding another event in collection\r\n\t\t\t\tevent_changed = true;\r\n\t\t\t}\r\n\t\t//\tif (ce.start_date > ce.end_date) {\r\n\t\t//\t\tevs.splice(i--,1);\r\n\t\t//\t}\r\n\r\n\t\t\tvar re = this._safe_copy(ev); // remaining event, copy of original with modified start_date (making range more narrow)\r\n\t\t\tre._virtual = true;\r\n\t\t\tre.end_date = new Date(re.end_date);\r\n\t\t\tif (re.start_date < this._min_date)\r\n\t\t\t\tre.start_date = setDateTime(this._min_date, this.config.first_hour);// as we are starting only with whole hours\r\n\t\t\telse\r\n\t\t\t\tre.start_date = setDateTime(getNextDay(ev.start_date), this.config.first_hour);\r\n\r\n\t\t\tif (re.start_date < this._max_date && re.start_date < re.end_date) {\r\n\t\t\t\tif (event_changed){\r\n\t\t\t\t\tevs.splice(i+1,0,re);//insert part\r\n\t\t\t\t}else {\r\n\t\t\t\t\tevs[i--] = re;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tre._last_chunk = false;\r\n\t\t\t}else{\r\n\t\t\t\tce._last_chunk = true;\r\n\t\t\t\tce._drag_resize = true;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// in case of all_timed pre_render is not applied to the original event\r\n\t\t// so we need to force redraw in case of dnd\r\n\t\tvar redraw = (this._drag_mode == 'move')?false:hold;\r\n\t\treturn prerender_events.call(this, evs, redraw);\r\n\r\n\r\n\t\tfunction isOvernightEvent(ev){\r\n\t\t\tvar next_day = getNextDay(ev.start_date);\r\n\t\t\treturn (+ev.end_date > +next_day);\r\n\t\t}\r\n\t\tfunction getNextDay(date){\r\n\t\t\tvar next_day = scheduler.date.add(date, 1, \"day\");\r\n\t\t\tnext_day = scheduler.date.date_part(next_day);\r\n\t\t\treturn next_day;\r\n\t\t}\r\n\t\tfunction setDateTime(date, hours){\r\n\t\t\tvar val = scheduler.date.date_part(new Date(date));\r\n\t\t\tval.setHours(hours);\r\n\t\t\treturn val;\r\n\t\t}\r\n\t};\r\n\tvar old_get_visible_events = scheduler.get_visible_events;\r\n\tscheduler.get_visible_events = function(only_timed){\r\n\t\tif (!(this.config.all_timed && this.config.multi_day))\r\n\t\t\treturn old_get_visible_events.call(this, only_timed);\r\n\t\treturn old_get_visible_events.call(this, false); // only timed = false\r\n\t};\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function (old_mode, old_date, mode, date) {\r\n\t\tscheduler._allow_dnd = (mode == \"day\" || mode == \"week\" || scheduler.getView(mode));\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler._is_main_area_event = function(ev){\r\n\t\treturn !!(ev._timed || this.config.all_timed === true || (this.config.all_timed == \"short\" && is_event_short(ev)) );\r\n\t};\r\n\r\n\tvar oldUpdate = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id){\r\n\t\t// full redraw(update_render=true) messes events order while dnd.\r\n\t\t// individual redraw(update_render=false) of multiday event, which happens on select/unselect, expands event to full width of the cell and can be fixes only with full redraw.\r\n\t\t// so for now full redraw is always enabled for not-dnd updates\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tvar fullRedrawNeeded;\r\n\t\tvar initial;\r\n\t\tif(ev) {\r\n\t\t\tfullRedrawNeeded = (scheduler.config.all_timed && !(scheduler.isOneDayEvent(scheduler._events[id]) || scheduler.getState().drag_id));\r\n\t\t\tif (fullRedrawNeeded) {\r\n\t\t\t\tinitial = scheduler.config.update_render;\r\n\t\t\t\tscheduler.config.update_render = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\toldUpdate.apply(scheduler, arguments);\r\n\r\n\t\tif(ev) {\r\n\t\t\tif (fullRedrawNeeded) {\r\n\t\t\t\tscheduler.config.update_render = initial;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\r\nvar temp_section;\r\nvar before;\r\n\r\nscheduler.config.collision_limit = 1;\r\n\r\nfunction _setTempSection(event_id) { // for custom views (matrix, timeline, units)\r\n\tvar checked_mode = scheduler._get_section_view();\r\n\tif(checked_mode && event_id){\r\n\t\ttemp_section = scheduler.getEvent(event_id)[scheduler._get_section_property()];\r\n\t}\r\n}\r\n\r\nscheduler.attachEvent(\"onBeforeDrag\",function(id){\r\n\t_setTempSection(id);\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onBeforeLightbox\",function(id){\r\n\tvar ev = scheduler.getEvent(id);\r\n\tbefore = [ev.start_date, ev.end_date];\r\n\t_setTempSection(id);\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventChanged\",function(id){\r\n\tif (!id || !scheduler.getEvent(id)) return true;\r\n\tvar ev = scheduler.getEvent(id);\r\n\tif (!scheduler.checkCollision(ev)){\r\n\t\tif (!before) return false;\r\n\t\tev.start_date = before[0];\r\n\t\tev.end_date = before[1];\r\n\t\tev._timed=this.isOneDayEvent(ev);\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onBeforeEventChanged\",function(ev,e,is_new){\r\n\treturn scheduler.checkCollision(ev);\r\n});\r\nscheduler.attachEvent(\"onEventAdded\",function(id,ev) {\r\n\tvar result = scheduler.checkCollision(ev);\r\n\tif (!result)\r\n\t\tscheduler.deleteEvent(id);\r\n});\r\nscheduler.attachEvent(\"onEventSave\",function(id, edited_ev, is_new){\r\n\tedited_ev = scheduler._lame_clone(edited_ev);\r\n\tedited_ev.id = id;\r\n\r\n\t//lightbox may not have 'time' section\r\n\tif(!(edited_ev.start_date && edited_ev.end_date)){\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tedited_ev.start_date = new Date(ev.start_date);\r\n\t\tedited_ev.end_date = new Date(ev.end_date);\r\n\t}\r\n\r\n\tif((edited_ev.rrule && !edited_ev.recurring_event_id) || edited_ev.rec_type){\r\n\t\tscheduler._roll_back_dates(edited_ev);\r\n\t}\r\n\treturn scheduler.checkCollision(edited_ev); // in case user creates event on one date but then edited it another\r\n});\r\n\r\nscheduler._check_sections_collision = function(first, second){\r\n\tvar map_to = scheduler._get_section_property();\r\n\tif (first[map_to] == second[map_to] && first.id != second.id)\r\n\t\treturn true;\r\n\treturn false;\r\n};\r\n\r\nscheduler.checkCollision = function(ev) {\r\n\tvar evs = [];\r\n\tvar collision_limit = scheduler.config.collision_limit;\r\n\r\n\tif (ev.rrule || ev.rec_type) {\r\n\t\tvar evs_dates = scheduler.getRecDates(ev);\r\n\t\tfor(var k=0; k= collision_limit) {\r\n\r\n\t\t\tsingle = false;\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tif ( evs.length >= collision_limit )\r\n\t\t\tsingle = false;\r\n\t}\r\n\tif (!single) {\r\n\t\tvar res = !scheduler.callEvent(\"onEventCollision\",[ev,evs]);\r\n\t\tif (!res) {\r\n\t\t\tev[map_to] = temp_section||ev[map_to]; // from _setTempSection for custom views\r\n\t\t}\r\n\t\treturn res;\r\n\t}\r\n\treturn single;\r\n\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.config.container_autoresize = true;\r\n\tscheduler.config.month_day_min_height = 90;\r\n\tscheduler.config.min_grid_size = 25;\r\n\tscheduler.config.min_map_size = 400;\r\n\r\n\tvar old_pre_render_event = scheduler._pre_render_events;\r\n\r\n\t//need for temporary disabling without modifying public config\r\n\tvar active = true;\r\n\tvar total_height = 0;\r\n\tvar multiday_height = 0;\r\n\r\n\tscheduler._pre_render_events = function(evs, hold) {\r\n\t\tif (!(scheduler.config.container_autoresize && active)) {\r\n\t\t\treturn old_pre_render_event.apply(this, arguments);\r\n\t\t}\r\n\r\n\t\tvar hb = this.xy.bar_height;\r\n\t\tvar h_old = this._colsS.heights;\r\n\t\tvar h = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0];\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tif (!this._table_view)\r\n\t\t\tevs = this._pre_render_events_line(evs, hold); //ignore long events for now\r\n\t\telse\r\n\t\t\tevs = this._pre_render_events_table(evs, hold);\r\n\r\n\t\tif (this._table_view) {\r\n\t\t\tif (hold){\r\n\t\t\t\tthis._colsS.heights = h_old;\r\n\t\t\t} else {\r\n\t\t\t\tvar evl = data.firstChild;\r\n\t\t\t\tconst rows = evl.querySelectorAll(\".dhx_cal_month_row\");\r\n\t\t\t\tif (rows && rows.length) {\r\n\t\t\t\t\tfor (var i = 0; i < rows.length; i++) {\r\n\t\t\t\t\t\th[i]++;\r\n\r\n\t\t\t\t\t\tif ((h[i]) * hb > this._colsS.height - this.xy.month_head_height) { // 22 - height of cell's header\r\n\t\t\t\t\t\t\t//we have overflow, update heights\r\n\t\t\t\t\t\t\tvar cells = rows[i].querySelectorAll(\".dhx_cal_month_cell\");\r\n\r\n\t\t\t\t\t\t\tvar cHeight = this._colsS.height - this.xy.month_head_height;\r\n\t\t\t\t\t\t\tif(this.config.max_month_events*1 !== this.config.max_month_events || h[i] <= this.config.max_month_events){\r\n\t\t\t\t\t\t\t\tcHeight = h[i] * hb;\r\n\t\t\t\t\t\t\t}else if( (this.config.max_month_events + 1) * hb > this._colsS.height - this.xy.month_head_height){\r\n\t\t\t\t\t\t\t\tcHeight = (this.config.max_month_events + 1) * hb;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\trows[i].style.height = (cHeight + this.xy.month_head_height) + \"px\";\r\n\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\tfor (var j = 0; j < cells.length; j++) {\r\n\t\t\t\t\t\t\t\tcells[j].childNodes[1].style.height = cHeight + \"px\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\th[i] = (h[i - 1] || 0) + cells[0].offsetHeight;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\th[i] = (h[i - 1] || 0) + rows[i].querySelectorAll(\".dhx_cal_month_cell\")[0].offsetHeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t\th.unshift(0);\r\n\t\t\t\t\tif (evl.parentNode.offsetHeight < evl.parentNode.scrollHeight && !evl._h_fix) {\r\n\t\t\t\t\t\t//we have v-scroll, decrease last day cell\r\n\r\n\t\t\t\t\t\t// NO CHECK SHOULD BE MADE ON VERTICAL SCROLL\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!evs.length && this._els[\"dhx_multi_day\"][0].style.visibility == \"visible\")\r\n\t\t\t\t\t\th[0] = -1;\r\n\t\t\t\t\tif (evs.length || h[0] == -1) {\r\n\t\t\t\t\t\t//shift days to have space for multiday events\r\n\t\t\t\t\t\t//var childs = evl.parentNode.childNodes;\r\n\t\t\t\t\t\tvar dh = ((h[0] + 1) * hb + 1); // +1 so multiday events would have 2px from top and 2px from bottom by default\r\n\t\t\t\t\t\tif(multiday_height != dh + 1) {\r\n\t\t\t\t\t\t\tthis._obj.style.height = (total_height - multiday_height + dh - 1) + \"px\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tdh += \"px\";\r\n\t\t\t\t\t\tconst navHeight = this._els[\"dhx_cal_navline\"][0].offsetHeight;\r\n\t\t\t\t\t\tconst headerHeight = this._els[\"dhx_cal_header\"][0].offsetHeight;\r\n\t\t\t\t\t\tdata.style.height = (this._obj.offsetHeight - navHeight - headerHeight - (this.xy.margin_top || 0)) + 'px';\r\n\t\t\t\t\t\tvar last = this._els[\"dhx_multi_day\"][0];\r\n\t\t\t\t\t\tlast.style.height = dh;\r\n\t\t\t\t\t\tlast.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\t\tlast.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\t\t\t\t\t\tlast = this._els[\"dhx_multi_day\"][1];\r\n\t\t\t\t\t\tlast.style.height = dh;\r\n\t\t\t\t\t\tlast.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\t\tlast.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\r\n\t\t\t\t\t\tlast.className = h[0] ? \"dhx_multi_day_icon\" : \"dhx_multi_day_icon_small\";\r\n\t\t\t\t\t\tthis._dy_shift = (h[0] + 1) * hb;\r\n\t\t\t\t\t\th[0] = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn evs;\r\n\t};\r\n\r\n\tvar checked_divs = [\"dhx_cal_navline\", \"dhx_cal_header\", \"dhx_multi_day\", \"dhx_cal_data\"];\r\n\tvar updateContainterHeight = function(is_repaint) {\r\n\t\ttotal_height = 0;\r\n\t\tfor (var i = 0; i < checked_divs.length; i++) {\r\n\r\n\t\t\tvar className = checked_divs[i];\r\n\t\t\tvar checked_div = (scheduler._els[className]) ? scheduler._els[className][0] : null;\r\n\t\t\tvar height = 0;\r\n\t\t\tswitch (className) {\r\n\t\t\t\tcase \"dhx_cal_navline\":\r\n\t\t\t\tcase \"dhx_cal_header\":\r\n\t\t\t\t\theight = checked_div.offsetHeight;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"dhx_multi_day\":\r\n\t\t\t\t\theight = (checked_div) ? checked_div.offsetHeight - 1 : 0;\r\n\t\t\t\t\tmultiday_height = height;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"dhx_cal_data\":\r\n\t\t\t\t\tvar mode = scheduler.getState().mode;\r\n\r\n\t\t\t\t\tif(checked_div.childNodes[1] && mode != \"month\") {\r\n\t\t\t\t\t\tlet maxHeight = 0;\r\n\t\t\t\t\t\tfor(let i = 0; i < checked_div.childNodes.length; i++){\r\n\t\t\t\t\t\t\tif(checked_div.childNodes[i].offsetHeight > maxHeight){\r\n\t\t\t\t\t\t\t\tmaxHeight = checked_div.childNodes[i].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\theight = maxHeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\theight = Math.max(checked_div.offsetHeight - 1, checked_div.scrollHeight);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (mode == \"month\") {\r\n\t\t\t\t\t\tif (scheduler.config.month_day_min_height && !is_repaint) {\r\n\t\t\t\t\t\t\tvar rows_length = checked_div.querySelectorAll(\".dhx_cal_month_row\").length;\r\n\t\t\t\t\t\t\theight = rows_length * scheduler.config.month_day_min_height;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (is_repaint) {\r\n\t\t\t\t\t\t\tchecked_div.style.height = height + \"px\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (mode == \"year\"){\r\n\t\t\t\t\t\theight = 190 * scheduler.config.year_y;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(mode == \"agenda\"){\r\n\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\tif(checked_div.childNodes && checked_div.childNodes.length){\r\n\t\t\t\t\t\t\tfor(var j = 0; j < checked_div.childNodes.length; j++){\r\n\t\t\t\t\t\t\t\theight += checked_div.childNodes[j].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(height + 2 < scheduler.config.min_grid_size){\r\n\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (mode == \"week_agenda\"){\r\n\t\t\t\t\t\tvar min_height = scheduler.xy.week_agenda_scale_height + scheduler.config.min_grid_size,\r\n\t\t\t\t\t\t\tcur_height;\r\n\r\n\t\t\t\t\t\tvar column;\r\n\t\t\t\t\t\tfor(var k = 0; k < checked_div.childNodes.length; k++){\r\n\t\t\t\t\t\t\tcolumn = checked_div.childNodes[k];\r\n\t\t\t\t\t\t\tfor(var j = 0; j < column.childNodes.length; j++) {\r\n\t\t\t\t\t\t\t\tvar innerHeight = 0,\r\n\t\t\t\t\t\t\t\t\teventsContainer = column.childNodes[j].childNodes[1];\r\n\r\n\t\t\t\t\t\t\t\tfor(var g =0; g < eventsContainer.childNodes.length; g++){\r\n\t\t\t\t\t\t\t\t\tinnerHeight += eventsContainer.childNodes[g].offsetHeight;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tcur_height = innerHeight + scheduler.xy.week_agenda_scale_height;\r\n\t\t\t\t\t\t\t\tcur_height = (k == 1 && (j == 2 || j == 3)) ? cur_height * 2 : cur_height; // for last two cells;\r\n\r\n\t\t\t\t\t\t\t\tif (cur_height > min_height) {\r\n\t\t\t\t\t\t\t\t\tmin_height = cur_height;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\theight = min_height * 3;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(mode == \"map\") {\r\n\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\tvar evs = checked_div.querySelectorAll(\".dhx_map_line\");\r\n\r\n\t\t\t\t\t\tfor (var j = 0; j < evs.length; j++) {\r\n\t\t\t\t\t\t\theight += evs[j].offsetHeight;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (height + 2 < scheduler.config.min_map_size) {\r\n\t\t\t\t\t\t\theight = scheduler.config.min_map_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(scheduler._gridView) {\r\n\t\t\t\t\t\theight = 0;\r\n\r\n\t\t\t\t\t\tif (checked_div.childNodes[1].childNodes[0].childNodes && checked_div.childNodes[1].childNodes[0].childNodes.length) {\r\n\t\t\t\t\t\t\tvar evs = checked_div.childNodes[1].childNodes[0].childNodes[0].childNodes;\r\n\r\n\t\t\t\t\t\t\tfor (var j = 0; j < evs.length; j++) {\r\n\t\t\t\t\t\t\t\theight += evs[j].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\theight += 2;\r\n\r\n\t\t\t\t\t\t\tif(height < scheduler.config.min_grid_size){\r\n\t\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (scheduler.matrix && scheduler.matrix[mode]) {\r\n\t\t\t\t\t\tif (is_repaint) {\r\n\t\t\t\t\t\t\theight += 0;\r\n\t\t\t\t\t\t\tchecked_div.style.height = height + \"px\";\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\t\tvar cfg = scheduler.matrix[mode];\r\n\t\t\t\t\t\t\tvar rows = cfg.y_unit;\r\n\t\t\t\t\t\t\tfor(var r=0; r < rows.length; r++){\r\n\t\t\t\t\t\t\t\theight += cfg.getSectionHeight(rows[r].key);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// Check and add extra height to avoid events hiding by the horizontal scrollbar\r\n\t\t\t\t\t\t\tif(scheduler.$container.clientWidth != scheduler.$container.scrollWidth){\r\n\t\t\t\t\t\t\t\theight += getScrollSize();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\theight -= 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (mode == \"day\" || mode == \"week\" || (scheduler._props && scheduler._props[mode])) {\r\n\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\theight += 1;\r\n\t\t\ttotal_height += height;\r\n\t\t}\r\n\t\tscheduler._obj.style.height = (total_height) + \"px\";\r\n\r\n\t\tif (!is_repaint)\r\n\t\t\tscheduler.updateView();\r\n\t};\r\n\r\n\tfunction callUpdate(){\r\n\t\tactive = false;\r\n\t\tscheduler.callEvent(\"onAfterSchedulerResize\", []);\r\n\t\tactive = true;\r\n\t}\r\n\r\n\tvar conditionalUpdateContainerHeight = function() {\r\n\t\tif(!(scheduler.config.container_autoresize && active))\r\n\t\t\treturn true;\r\n\r\n\t\tvar mode = scheduler.getState().mode;\r\n\r\n\t\tif(!mode) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tvar asyncRepaint = window.requestAnimationFrame || window.setTimeout;\r\n\t\tvar scrollTop = document.documentElement.scrollTop;\r\n\r\n\t\tasyncRepaint(function() {\r\n\t\t\tif(scheduler.$destroyed || !scheduler.$initialized){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tupdateContainterHeight();\r\n\t\t});\r\n\r\n\t\tif ( (scheduler.matrix && scheduler.matrix[mode]) || mode == \"month\") {\r\n\t\t\tasyncRepaint(function() {\r\n\t\t\t\tif(scheduler.$destroyed || !scheduler.$initialized){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tupdateContainterHeight(true);\r\n\t\t\t\tdocument.documentElement.scrollTop = scrollTop;\r\n\t\t\t\tcallUpdate();\r\n\t\t\t}, 1);\r\n\t\t}else{\r\n\t\t\tcallUpdate();\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function(){\r\n\t\tvar autosizeEnabled = scheduler.config.container_autoresize;\r\n\t\tif(!scheduler.xy.$original_scroll_width){\r\n\t\t\tscheduler.xy.$original_scroll_width = scheduler.xy.scroll_width;\r\n\t\t}\r\n\r\n\t\tscheduler.xy.scroll_width = autosizeEnabled ? 0 : scheduler.xy.$original_scroll_width;\r\n\r\n\t\tif(scheduler.matrix){\r\n\t\t\tfor(var i in scheduler.matrix){\r\n\t\t\t\tvar timeline = scheduler.matrix[i];\r\n\t\t\t\tif(!timeline.$original_section_autoheight){\r\n\t\t\t\t\ttimeline.$original_section_autoheight = timeline.section_autoheight;\r\n\t\t\t\t}\r\n\t\t\t\tif(autosizeEnabled){\r\n\t\t\t\t\ttimeline.section_autoheight = false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\ttimeline.section_autoheight = timeline.$original_section_autoheight;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onXLE\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventChanged\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventCreated\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventAdded\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventDeleted\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onAfterSchedulerResize\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onClearAll\", conditionalUpdateContainerHeight);\r\n\r\n\t//disable container autoresize when expanded\r\n\tscheduler.attachEvent(\"onBeforeExpand\", function(){\r\n\t\tactive = false;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeCollapse\", function(){\r\n\t\tactive = true;\r\n\t\treturn true;\r\n\t});\r\n\t// helper function\r\n\tfunction getScrollSize() {\r\n\t\tvar div = document.createElement(\"div\");\r\n\t\tdiv.style.cssText = \"visibility:hidden;position:absolute;left:-1000px;width:100px;padding:0px;margin:0px;height:110px;min-height:100px;overflow-y:scroll;\";\r\n\r\n\t\tdocument.body.appendChild(div);\r\n\t\tvar size = div.offsetWidth - div.clientWidth;\r\n\t\tdocument.body.removeChild(div);\r\n\t\treturn size;\r\n\t}\r\n\r\n\r\n}","export default function(scheduler){\r\n\tfunction setCookie(name,cookie_param,value) {\r\n\t\tvar str = name + \"=\" + value + (cookie_param?(\"; \"+cookie_param):\"\");\r\n\t\tdocument.cookie = str;\r\n\t}\r\n\tfunction getCookie(name) {\r\n\t\tvar search = name + \"=\";\r\n\t\tif (document.cookie.length > 0) {\r\n\t\t\tvar offset = document.cookie.indexOf(search);\r\n\t\t\tif (offset != -1) {\r\n\t\t\t\toffset += search.length;\r\n\t\t\t\tvar end = document.cookie.indexOf(\";\", offset);\r\n\t\t\t\tif (end == -1)\r\n\t\t\t\t\tend = document.cookie.length;\r\n\t\t\t\treturn document.cookie.substring(offset, end);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}\r\n\r\n\tfunction getCookieName(scheduler) {\r\n\t\treturn (scheduler._obj.id || \"scheduler\") + \"_settings\";\r\n\t}\r\n\r\n\tvar first = true;\r\n\tscheduler.attachEvent(\"onBeforeViewChange\",function(oldMode,oldDate,mode,date){\r\n\t\t// if Url plugin is enabled - explicit url values should have more priority than cookies\r\n\t\tif (first && scheduler._get_url_nav){\r\n\t\t\tvar urlNavigationPlugin = scheduler._get_url_nav();\r\n\t\t\tif(urlNavigationPlugin.date || urlNavigationPlugin.mode || urlNavigationPlugin.event){\r\n\t\t\t\tfirst = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar cookie = getCookieName(scheduler);\r\n\r\n\t\tif (first){\r\n\t\t\tfirst = false;\r\n\t\t\tvar schedulerCookie = getCookie(cookie);\r\n\t\t\tif (schedulerCookie){\r\n\r\n\t\t\t\tif(!scheduler._min_date){\r\n\t\t\t\t\t//otherwise scheduler will have incorrect date until timeout\r\n\t\t\t\t\t//it can cause js error with 'onMouseMove' handler of key_nav.js\r\n\t\t\t\t\tscheduler._min_date = date;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tschedulerCookie = unescape(schedulerCookie).split(\"@\");\r\n\t\t\t\tschedulerCookie[0] = this._helpers.parseDate(schedulerCookie[0]);\r\n\t\t\t\tvar view = this.isViewExists(schedulerCookie[1]) ? schedulerCookie[1] : mode,\r\n\t\t\t\t\tdate = !isNaN(+schedulerCookie[0]) ? schedulerCookie[0] : date;\r\n\r\n\t\t\t\twindow.setTimeout(function(){\r\n\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tscheduler.setCurrentView(date,view);\r\n\t\t\t\t},1);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", function (newMode , newDate){\r\n\t\tvar cookie = getCookieName(scheduler);\r\n\t\tvar text = escape(this._helpers.formatDate(newDate)+\"@\"+(newMode));\r\n\t\tsetCookie(cookie,\"expires=Sun, 31 Jan 9999 22:00:00 GMT\",text);\r\n\t});\r\n\r\n\t// As we are blocking first render above there could be a problem in case of dynamic loading and rendering of visible data in general ('from'/'to' won't be defined)\r\n\tvar old_load = scheduler._load;\r\n\tscheduler._load = function() {\r\n\t\tvar args = arguments;\r\n\r\n\t\tif (!scheduler._date) {\r\n\t\t\tvar that = this;\r\n\t\t\twindow.setTimeout(function() {\r\n\t\t\t\told_load.apply(that, args);\r\n\t\t\t},1);\r\n\t\t} else {\r\n\t\t\told_load.apply(this, args);\r\n\t\t}\r\n\t};\r\n}","export default {\r\n\talert: (extension, assert) => {\r\n\t\tassert(false, `The ${extension} extension is not included in this version of dhtmlxScheduler.
\r\n\t\tYou may need a Professional version of the component.
\r\n\t\tContact us at https://dhtmlx.com/docs/contact.shtml if you have any questions.`);\r\n\t}\r\n};","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Day Timeline\", scheduler.assert);\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Drag Between\", scheduler.assert);\r\n}","export default function(scheduler){\r\n/* global dhtmlXCombo */\r\nscheduler.form_blocks['combo']={\r\n\trender:function(sns) {\r\n\t\tif (!sns.cached_options)\r\n\t\t\tsns.cached_options = {};\r\n\t\tvar res = '';\r\n\t\tres += \"
\";\r\n\t\treturn res;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\t(function(){\r\n\t\t\tresetCombo();\r\n\t\t\tvar id = scheduler.attachEvent(\"onAfterLightbox\",function(){\r\n\t\t\t\t// otherwise destructor will never be called after form reset(e.g. in readonly event mode)\r\n\t\t\t\tresetCombo();\r\n\t\t\t\tscheduler.detachEvent(id);\r\n\t\t\t});\r\n\t\t\tfunction resetCombo(){\r\n\t\t\t\tif(node._combo && node._combo.DOMParent) {\r\n\t\t\t\t\tvar combo = node._combo;\r\n\t\t\t\t\tif(combo.unload){\r\n\t\t\t\t\t\tcombo.unload();\r\n\t\t\t\t\t}else if(combo.destructor){\r\n\t\t\t\t\t\tcombo.destructor();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// dhtmlxCombo 4.1.0 bug\r\n\t\t\t\t\tcombo.DOMParent = combo.DOMelem = null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})();\r\n\t\twindow.dhx_globalImgPath = config.image_path||'/';\r\n\t\tnode._combo = new dhtmlXCombo(node, config.name, node.offsetWidth-8);\r\n\t\tif (config.onchange)\r\n\t\t\tnode._combo.attachEvent(\"onChange\", config.onchange);\r\n\r\n\t\tif (config.options_height)\r\n\t\t\tnode._combo.setOptionHeight(config.options_height);\r\n\t\tvar combo = node._combo;\r\n\t\tcombo.enableFilteringMode(config.filtering, config.script_path||null, !!config.cache);\r\n\r\n\t\tif (!config.script_path) { // script-side filtration is used\r\n\t\t\tvar all_options = [];\r\n\t\t\tfor (var i = 0; i < config.options.length; i++) {\r\n\t\t\t\tvar option = config.options[i];\r\n\t\t\t\tvar single_option = [\r\n\t\t\t\t\toption.key,\r\n\t\t\t\t\toption.label,\r\n\t\t\t\t\toption.css\r\n\t\t\t\t];\r\n\t\t\t\tall_options.push(single_option);\r\n\t\t\t}\r\n\t\t\tcombo.addOption(all_options);\r\n\t\t\tif (ev[config.map_to]) {\r\n\t\t\t\tvar index = combo.getIndexByValue(ev[config.map_to]);\r\n\t\t\t\tcombo.selectOption(index);\r\n\t\t\t}\r\n\t\t} else { // server-side filtration is used\r\n\t\t\tvar selected_id = ev[config.map_to];\r\n\t\t\tif (selected_id) {\r\n\t\t\t\tif (config.cached_options[selected_id]) {\r\n\t\t\t\t\tcombo.addOption(selected_id, config.cached_options[selected_id]);\r\n\t\t\t\t\tcombo.disable(1);\r\n\t\t\t\t\tcombo.selectOption(0);\r\n\t\t\t\t\tcombo.disable(0);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tscheduler.ajax.get(config.script_path+\"?id=\"+selected_id+\"&uid=\"+scheduler.uid(), function(result){\r\n\t\t\t\t\t\tvar responseText = result.xmlDoc.responseText;\r\n\t\t\t\t\t\tvar label;\r\n\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\tvar res = JSON.parse(responseText);\r\n\t\t\t\t\t\t\tlabel = res.options[0].text;\r\n\t\t\t\t\t\t}catch(e){\r\n\t\t\t\t\t\t\tvar option = scheduler.ajax.xpath(\"//option\", result.xmlDoc)[0];\r\n\t\t\t\t\t\t\tlabel = option.childNodes[0].nodeValue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tconfig.cached_options[selected_id] = label;\r\n\t\t\t\t\t\tcombo.addOption(selected_id, label);\r\n\t\t\t\t\t\tcombo.disable(1);\r\n\t\t\t\t\t\tcombo.selectOption(0);\r\n\t\t\t\t\t\tcombo.disable(0);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tcombo.setComboValue(\"\");\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config) {\r\n\t\tvar selected_id = node._combo.getSelectedValue(); // value = key\r\n\t\tif (config.script_path) {\r\n\t\t\tconfig.cached_options[selected_id] = node._combo.getSelectedText();\r\n\t\t}\r\n\t\treturn selected_id;\r\n\t},\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\nscheduler.form_blocks['radio']={\r\n\trender:function(sns) {\r\n\t\tvar res = '';\r\n\t\tres += `
`;\r\n\t\tfor (var i=0; i\"+\" \"+sns.options[i].label+\"\";\r\n\t\t}\r\n\t\tres += \"
\";\r\n\r\n\t\treturn res;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\tvar radiobuttons = node.getElementsByTagName('input');\r\n\t\tfor (var i = 0; i < radiobuttons.length; i++) {\r\n\t\t\tradiobuttons[i].checked = false;\r\n\t\t\tvar checked_value = ev[config.map_to]||value;\r\n\t\t\tif (radiobuttons[i].value == checked_value) {\r\n\t\t\t\tradiobuttons[i].checked = true;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tvar radiobuttons = node.getElementsByTagName('input');\r\n\t\tfor(var i=0; i
';\r\n\t\telse\r\n\t\t\treturn '';\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\tnode=scheduler._lightbox.querySelector(`#${config.id}`);\r\n\t\tvar id = scheduler.uid();\r\n\t\tvar isChecked = (typeof config.checked_value != \"undefined\") ? value == config.checked_value : !!value;\r\n\t\tnode.className += \" dhx_cal_checkbox\";\r\n\t\tvar check_html = \"\";\r\n\t\tvar label_html = \"\";\r\n\t\tif (scheduler.config.wide_form){\r\n\t\t\tnode.innerHTML = label_html;\r\n\t\t\tnode.nextSibling.innerHTML=check_html;\r\n\t\t} else\r\n\t\t\tnode.innerHTML=check_html+label_html;\r\n\r\n\t\tif (config.handler) {\r\n\t\t\tvar checkbox = node.getElementsByTagName('input')[0];\r\n\t\t\tif(checkbox.$_eventAttached){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tcheckbox.$_eventAttached = true;\r\n\t\t\tscheduler.event(checkbox, \"click\", config.handler);\r\n\t\t\t//checkbox.onclick = config.handler;\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tnode=scheduler._lightbox.querySelector(`#${config.id}`);\r\n\t\tvar checkbox = node.getElementsByTagName('input')[0]; // moved to the header\r\n\t\tif (!checkbox)\r\n\t\t\tcheckbox = node.nextSibling.getElementsByTagName('input')[0];\r\n\t\treturn (checkbox.checked)?(config.checked_value||true):(config.unchecked_value||false);\r\n\t},\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.ext.fullscreen = {\r\n\ttoggleIcon: null\r\n};\r\n\r\nscheduler.expand = function() {\r\n\tif(!scheduler.callEvent(\"onBeforeExpand\", []))\r\n\t\treturn;\r\n\tvar t = scheduler._obj;\r\n\tdo {\r\n\t\tt._position = t.style.position || \"\";\r\n\t\tt.style.position = \"static\";\r\n\t} while ((t = t.parentNode) && t.style);\r\n\tt = scheduler._obj;\r\n\tt.style.position = \"absolute\";\r\n\tt._width = t.style.width;\r\n\tt._height = t.style.height;\r\n\tt.style.width = t.style.height = \"100%\";\r\n\tt.style.top = t.style.left = \"0px\";\r\n\r\n\tvar top = document.body;\r\n\ttop.scrollTop = 0;\r\n\r\n\ttop = top.parentNode;\r\n\tif (top)\r\n\t\ttop.scrollTop = 0;\r\n\tdocument.body._overflow = document.body.style.overflow || \"\";\r\n\tdocument.body.style.overflow = \"hidden\";\r\n\tscheduler._maximize();\r\n\tscheduler.callEvent(\"onExpand\", []);\r\n};\r\nscheduler.collapse = function() {\r\n\tif(!scheduler.callEvent(\"onBeforeCollapse\", []))\r\n\t\treturn;\r\n\tvar t = scheduler._obj;\r\n\tdo {\r\n\t\tt.style.position = t._position;\r\n\t} while ((t = t.parentNode) && t.style);\r\n\tt = scheduler._obj;\r\n\tt.style.width = t._width;\r\n\tt.style.height = t._height;\r\n\tdocument.body.style.overflow = document.body._overflow;\r\n\tscheduler._maximize();\r\n\tscheduler.callEvent(\"onCollapse\", []);\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar t = document.createElement(\"div\");\r\n\tt.className = \"dhx_expand_icon\";\r\n\tscheduler.ext.fullscreen.toggleIcon = t;\r\n\tt.innerHTML = `\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t`;\r\n\tscheduler._obj.appendChild(t);\r\n\tscheduler.event(t, \"click\", function() {\r\n\t\tif (!scheduler.expanded)\r\n\t\t\tscheduler.expand(); else\r\n\t\t\tscheduler.collapse();\r\n\t});\r\n});\r\nscheduler._maximize = function() {\r\n\tthis.expanded = !this.expanded;\r\n\tif(this.expanded){\r\n\t\tthis.ext.fullscreen.toggleIcon.classList.add(\"dhx_expand_icon--expanded\");\r\n\t\t\r\n\t}else{\r\n\t\tthis.ext.fullscreen.toggleIcon.classList.remove(\"dhx_expand_icon--expanded\");\r\n\t}\r\n\t\r\n\t//scheduler.ext.fullscreen.toggleIcon.style.backgroundPosition = \"0 \" + (this.expanded ? \"0\" : \"18\") + \"px\";\r\n\r\n\tvar directions = ['left', 'top'];\r\n\tfor (var i = 0; i < directions.length; i++) {\r\n\t\t//var margin = scheduler.xy['margin_' + directions[i]];\r\n\t\tvar prev_margin = scheduler['_prev_margin_' + directions[i]];\r\n\t\tif (scheduler.xy['margin_' + directions[i]]) {\r\n\t\t\tscheduler['_prev_margin_' + directions[i]] = scheduler.xy['margin_' + directions[i]];\r\n\t\t\tscheduler.xy['margin_' + directions[i]] = 0;\r\n\t\t} else {\r\n\t\t\tif (prev_margin) {\r\n\t\t\t\tscheduler.xy['margin_' + directions[i]] = scheduler['_prev_margin_' + directions[i]];\r\n\t\t\t\tdelete scheduler['_prev_margin_' + directions[i]];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.setCurrentView();\r\n};\r\n\r\n\r\n}\r\n","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Grid\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\tvar els = document.body.getElementsByTagName(\"DIV\");\r\n\tfor (var i=0; i < els.length; i++) {\r\n\t\tvar cs = els[i].className||\"\";\r\n\t\tcs = cs.split(\":\");\r\n\t\tif (cs.length == 2 && cs[0] == \"template\"){\r\n\t\t\tvar code = \"return \\\"\"+(els[i].innerHTML||\"\").replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g,\"\\\\\\\"\").replace(/[\\n\\r]+/g,\"\")+\"\\\";\";\r\n\t\t\tcode = unescape(code).replace(/\\{event\\.([a-z]+)\\}/g,function(all,mask){\r\n\t\t\t\treturn '\"+ev.'+mask+'+\"';\r\n\t\t\t});\r\n\t\t\tscheduler.templates[cs[1]]=Function(\"start\",\"end\",\"ev\",code);\r\n\t\t\tels[i].style.display='none';\r\n\t\t}\r\n\t}\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.shortcuts = {\r\n\tcreateCommand: function(){\r\n\t\treturn {\r\n\t\t\tmodifiers:{\r\n\t\t\t\t\"shift\": false,\r\n\t\t\t\t\"alt\": false,\r\n\t\t\t\t\"ctrl\": false,\r\n\t\t\t\t\"meta\": false\r\n\t\t\t},\r\n\t\t\tkeyCode: null\r\n\t\t};\r\n\t},\r\n\tparse: function(shortcut){\r\n\t\tvar commands = [];\r\n\r\n\t\tvar expr = this.getExpressions(this.trim(shortcut));\r\n\t\tfor(var i = 0; i < expr.length; i++){\r\n\t\t\tvar words = this.getWords(expr[i]);\r\n\r\n\t\t\tvar command = this.createCommand();\r\n\r\n\t\t\tfor(var j = 0; j < words.length; j++){\r\n\t\t\t\tif(this.commandKeys[words[j]]){\r\n\t\t\t\t\tcommand.modifiers[words[j]] = true;\r\n\t\t\t\t}else if(this.specialKeys[words[j]]){\r\n\t\t\t\t\tcommand.keyCode = this.specialKeys[words[j]];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcommand.keyCode = words[j].charCodeAt(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tcommands.push(command);\r\n\t\t}\r\n\t\treturn commands;\r\n\t},\r\n\r\n\tgetCommandFromEvent: function(domEvent){\r\n\t\tvar command = this.createCommand();\r\n\t\tcommand.modifiers.shift = !!domEvent.shiftKey;\r\n\t\tcommand.modifiers.alt = !!domEvent.altKey;\r\n\t\tcommand.modifiers.ctrl = !!domEvent.ctrlKey;\r\n\t\tcommand.modifiers.meta = !!domEvent.metaKey;\r\n\t\tcommand.keyCode = domEvent.which || domEvent.keyCode;\r\n\r\n\t\tif(command.keyCode >= 96 && command.keyCode <= 105){\r\n\t\t\t// numpad keys 96-105 -> 48-57\r\n\t\t\tcommand.keyCode -= 48;//convert numpad number code to regular number code\r\n\t\t}\r\n\r\n\t\tvar printableKey = String.fromCharCode(command.keyCode );\r\n\t\tif(printableKey){\r\n\t\t\tcommand.keyCode = printableKey.toLowerCase().charCodeAt(0);\r\n\t\t}\r\n\t\treturn command;\r\n\t},\r\n\r\n\tgetHashFromEvent: function(domEvent){\r\n\t\treturn this.getHash(this.getCommandFromEvent(domEvent));\r\n\t},\r\n\r\n\tgetHash: function(command){\r\n\t\tvar parts = [];\r\n\t\tfor(var i in command.modifiers){\r\n\t\t\tif(command.modifiers[i]){\r\n\t\t\t\tparts.push(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tparts.push(command.keyCode);\r\n\r\n\t\treturn parts.join(this.junctionChar);\r\n\t},\r\n\r\n\tgetExpressions: function(shortcut){\r\n\t\treturn shortcut.split(this.junctionChar);\r\n\t},\r\n\tgetWords: function(term){\r\n\t\treturn term.split(this.combinationChar);\r\n\t},\r\n\ttrim: function(shortcut){\r\n\t\treturn shortcut.replace(/\\s/g, \"\");\r\n\t},\r\n\tjunctionChar:\",\",\r\n\tcombinationChar:\"+\",\r\n\tcommandKeys:{\r\n\t\t\"shift\": 16,\r\n\t\t\"alt\": 18,\r\n\t\t\"ctrl\": 17,\r\n\t\t\"meta\": true\r\n\t},\r\n\tspecialKeys:{\r\n\t\t\"backspace\": 8,\r\n\t\t\"tab\": 9,\r\n\t\t\"enter\": 13,\r\n\t\t\"esc\": 27,\r\n\t\t\"space\": 32,\r\n\t\t\"up\": 38,\r\n\t\t\"down\": 40,\r\n\t\t\"left\": 37,\r\n\t\t\"right\": 39,\r\n\t\t\"home\": 36,\r\n\t\t\"end\": 35,\r\n\t\t\"pageup\": 33,\r\n\t\t\"pagedown\": 34,\r\n\t\t\"delete\": 46,\r\n\t\t\"insert\": 45,\r\n\t\t\"plus\":107,\r\n\t\t\"f1\": 112,\r\n\t\t\"f2\": 113,\r\n\t\t\"f3\": 114,\r\n\t\t\"f4\": 115,\r\n\t\t\"f5\": 116,\r\n\t\t\"f6\": 117,\r\n\t\t\"f7\": 118,\r\n\t\t\"f8\": 119,\r\n\t\t\"f9\": 120,\r\n\t\t\"f10\": 121,\r\n\t\t\"f11\": 122,\r\n\t\t\"f12\": 123\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.EventHandler = {\r\n\t_handlers: null,\r\n\tfindHandler: function(command){\r\n\t\tif(!this._handlers) this._handlers = {};\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\t\tvar hash = shortcuts.getHash(command);\r\n\r\n\t\treturn this._handlers[hash];\r\n\t},\r\n\r\n\tdoAction: function(command, e){\r\n\t\tvar handler = this.findHandler(command);\r\n\t\tif(handler){\r\n\t\t\thandler.call(this, e);\r\n\r\n\t\t\tif (e.preventDefault) e.preventDefault();\r\n\t\t\telse e.returnValue = false;\r\n\r\n\t\t}\r\n\t},\r\n\tbind: function(shortcut, handler){\r\n\t\tif(!this._handlers) this._handlers = {};\r\n\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\r\n\t\tvar commands = shortcuts.parse(shortcut);\r\n\t\tfor(var i = 0; i < commands.length; i++){\r\n\t\t\tthis._handlers[shortcuts.getHash(commands[i])] = handler;\r\n\t\t}\r\n\t},\r\n\tunbind: function(shortcut){\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\r\n\t\tvar commands = shortcuts.parse(shortcut);\r\n\t\tfor(var i = 0; i < commands.length; i++){\r\n\t\t\tif(this._handlers[shortcuts.getHash(commands[i])]){\r\n\t\t\t\tdelete this._handlers[shortcuts.getHash(commands[i])];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tbindAll: function(map){\r\n\t\tfor(var i in map){\r\n\t\t\tthis.bind(i, map[i]);\r\n\t\t}\r\n\t},\r\n\tinitKeys: function(){\r\n\t\tif(!this._handlers)\r\n\t\t\tthis._handlers = {};\r\n\t\tif(this.keys){\r\n\t\t\tthis.bindAll(this.keys);\r\n\t\t}\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n(function(){\r\n\tscheduler.$keyboardNavigation.getFocusableNodes = scheduler._getFocusableNodes;\r\n\r\n\tscheduler.$keyboardNavigation.trapFocus = function trapFocus(root, e){\r\n\t\tif(e.keyCode != 9) return false;\r\n\r\n\t\tvar focusable = scheduler.$keyboardNavigation.getFocusableNodes(root);\r\n\t\tvar currentFocus = document.activeElement;\r\n\t\tvar currentIndex = -1;\r\n\t\tfor(var i = 0; i < focusable.length; i++){\r\n\t\t\tif(focusable[i] == currentFocus){\r\n\t\t\t\tcurrentIndex = i;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar nextIndex, nextItem;\r\n\t\tif(e.shiftKey){\r\n\r\n\t\t\t// back tab\r\n\t\t\t// go to the last element if we focused on the first\r\n\t\t\tnextIndex = (currentIndex <= 0) ? (focusable.length - 1) : (currentIndex - 1);\r\n\r\n\t\t\tnextItem = focusable[nextIndex];\r\n\t\t\tif(nextItem){\r\n\t\t\t\tnextItem.focus();\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\t// forward tab\r\n\t\t\t// forward tab from last element should go back to the first element\r\n\t\t\tnextIndex = (currentIndex >= focusable.length - 1) ? 0 : (currentIndex + 1);\r\n\t\t\tnextItem = focusable[nextIndex];\r\n\t\t\tif(nextItem){\r\n\t\t\t\tnextItem.focus();\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t};\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.marker = {\r\n\tclear: function(){\r\n\t\tvar divs = scheduler.$container.querySelectorAll(\".dhx_focus_slot\");\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tdivs[i].parentNode.removeChild(divs[i]);\r\n\t\t}\r\n\t},\r\n\tcreateElement: function(){\r\n\t\tvar element = document.createElement(\"div\");\r\n\t\telement.setAttribute(\"tabindex\", -1);\r\n\t\telement.className = \"dhx_focus_slot\";\r\n\t\treturn element;\r\n\t},\r\n\r\n\trenderMultiple: function(start, end, method){\r\n\t\tvar divs = [];\r\n\t\tvar currentStart = new Date(start);\r\n\t\tvar currentEnd = new Date(Math.min(end.valueOf(), scheduler.date.add(scheduler.date.day_start(new Date(start)), 1, \"day\").valueOf()));\r\n\t\twhile(currentStart.valueOf() < end.valueOf()){\r\n\r\n\t\t\tdivs = divs.concat(method.call(this, currentStart, new Date(Math.min(currentEnd.valueOf(), end.valueOf()))));\r\n\t\t\tcurrentStart = scheduler.date.day_start(scheduler.date.add(currentStart, 1, \"day\"));\r\n\r\n\t\t\tcurrentEnd = scheduler.date.day_start(scheduler.date.add(currentStart, 1, \"day\"));\r\n\t\t\tcurrentEnd = new Date(Math.min(currentEnd.valueOf(), end.valueOf()));\r\n\t\t}\r\n\r\n\t\treturn divs;\r\n\t},\r\n\r\n\r\n\trender: function(start, end, section){\r\n\t\tthis.clear();\r\n\t\tvar divs = [];\r\n\r\n\t\tvar modes = scheduler.$keyboardNavigation.TimeSlot.prototype._modes;\r\n\t\tvar view = scheduler.$keyboardNavigation.TimeSlot.prototype._getMode();\r\n\t\tswitch (view){\r\n\t\t\tcase modes.units:\r\n\t\t\t\tdivs = this.renderVerticalMarker(start, end, section);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.timeline:\r\n\t\t\t\tdivs = this.renderTimelineMarker(start, end, section);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.year:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderYearMarker));\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.month:\r\n\t\t\t\tdivs = this.renderMonthMarker(start, end);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.weekAgenda:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderWeekAgendaMarker));\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.list:\r\n\t\t\t\tdivs = this.renderAgendaMarker(start, end);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.dayColumns:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderVerticalMarker));\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tthis.addWaiAriaLabel(divs, start, end, section);\r\n\t\tthis.addDataAttributes(divs, start, end, section);\r\n\r\n\t\tfor(var i = divs.length - 1; i >= 0; i--){\r\n\t\t\tif(divs[i].offsetWidth){\r\n\t\t\t\treturn divs[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t},\r\n\r\n\taddDataAttributes: function(divs, start, end, section){\r\n\t\tvar dateToStr = scheduler.date.date_to_str(scheduler.config.api_date);\r\n\r\n\t\tvar from = dateToStr(start),\r\n\t\t\tto = dateToStr(end);\r\n\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tdivs[i].setAttribute(\"data-start-date\", from);\r\n\t\t\tdivs[i].setAttribute(\"data-end-date\", to);\r\n\t\t\tif(section){\r\n\t\t\t\tdivs[i].setAttribute(\"data-section\", section);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\taddWaiAriaLabel: function(divs, start, end, section){\r\n\t\tvar label = \"\";\r\n\t\tvar state = scheduler.getState();\r\n\t\tvar mode = state.mode;\r\n\r\n\t\tvar dateTimeLabel = false;\r\n\r\n\t\tlabel += scheduler.templates.day_date(start);\r\n\r\n\t\tif((scheduler.date.day_start(new Date(start)).valueOf() != start.valueOf())){\r\n\t\t\tlabel += \" \" + scheduler.templates.hour_scale(start);\r\n\t\t\tdateTimeLabel = true;\r\n\t\t}\r\n\r\n\t\tif((scheduler.date.day_start(new Date(start)).valueOf() != scheduler.date.day_start(new Date(end)).valueOf())){\r\n\r\n\t\t\tlabel += \" - \" + scheduler.templates.day_date(end);\r\n\t\t\tif(dateTimeLabel || (scheduler.date.day_start(new Date(end)).valueOf() != end.valueOf())){\r\n\t\t\t\tlabel += \" \" + scheduler.templates.hour_scale(end);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(section){\r\n\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\t\t\t\tconst timeline = scheduler.matrix[mode];\r\n\t\t\t\tconst sectionObject = timeline.y_unit[timeline.order[section]];\r\n\t\t\t\tlabel += \", \" + scheduler.templates[mode + \"_scale_label\"](sectionObject.key, sectionObject.label, sectionObject);\r\n\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\tconst units = scheduler._props[mode];\r\n\t\t\t\tconst sectionObject = units.options[units.order[section]];\r\n\r\n\t\t\t\tlabel += \", \" + scheduler.templates[mode + \"_scale_text\"](sectionObject.key, sectionObject.label, sectionObject);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tscheduler._waiAria.setAttributes(divs[i], {\r\n\t\t\t\t\"aria-label\": label,\r\n\t\t\t\t\"aria-live\": \"polite\"\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\trenderWeekAgendaMarker: function(start_date, end_date){\r\n\t\tvar divs = scheduler.$container.querySelectorAll(\".dhx_wa_day_cont .dhx_wa_scale_bar\");\r\n\r\n\t\tvar currDate = scheduler.date.week_start(new Date(scheduler.getState().min_date));\r\n\r\n\t\tvar index = -1;\r\n\t\tvar markerDate = scheduler.date.day_start(new Date(start_date));\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tindex++;\r\n\t\t\tif(scheduler.date.day_start(new Date(currDate)).valueOf() == markerDate.valueOf()){\r\n\t\t\t\tbreak;\r\n\t\t\t}else{\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(index != -1) return this._wrapDiv(divs[index]);\r\n\t\treturn [];\r\n\t},\r\n\r\n\t_wrapDiv: function(cell){\r\n\t\tvar marker = this.createElement();\r\n\t\tmarker.style.top = cell.offsetTop + \"px\";\r\n\t\tmarker.style.left = cell.offsetLeft + \"px\";\r\n\t\tmarker.style.width = cell.offsetWidth + \"px\";\r\n\t\tmarker.style.height = cell.offsetHeight + \"px\";\r\n\t\tcell.appendChild(marker);\r\n\t\treturn [marker];\r\n\t},\r\n\trenderYearMarker: function(start_date, end_date){\r\n\t\tvar cell = scheduler._get_year_cell(start_date);\r\n\t\tcell.style.position = \"relative\";\r\n\t\tvar marker = this.createElement();\r\n\t\tmarker.style.top = \"0px\";\r\n\t\tmarker.style.left = \"0px\";\r\n\t\tmarker.style.width = \"100%\";\r\n\t\tmarker.style.height = \"100%\";\r\n\t\tcell.appendChild(marker);\r\n\t\treturn [marker];\r\n\t},\r\n\r\n\trenderAgendaMarker: function(start_date, end_date){\r\n\t\tvar block = this.createElement();\r\n\t\tblock.style.height = \"1px\";\r\n\t\tblock.style.width = \"100%\";\r\n\t\tblock.style.opacity = 1;\r\n\t\tblock.style.top = \"0px\";\r\n\t\tblock.style.left = \"0px\";\r\n\t\tscheduler.$container.querySelector(\".dhx_cal_data\").appendChild(block);\r\n\t\treturn [block];\r\n\t},\r\n\r\n\trenderTimelineMarker: function(start_date, end_date, section){\r\n\t\tvar view_opts = scheduler._lame_copy({}, scheduler.matrix[scheduler._mode]);\r\n\t\tvar areas = view_opts._scales;\r\n\t\t//timespans must always use actual position, not rounded\r\n\t\tview_opts.round_position = false;\r\n\t\tvar blocks = [];\r\n\r\n\t\tvar min_date = start_date ? new Date(start_date) : scheduler._min_date;\r\n\t\tvar max_date = end_date ? new Date(end_date) : scheduler._max_date;\r\n\r\n\t\tif(min_date.valueOf() < scheduler._min_date.valueOf())\r\n\t\t\tmin_date = new Date(scheduler._min_date);\r\n\t\tif(max_date.valueOf() > scheduler._max_date.valueOf())\r\n\t\t\tmax_date = new Date(scheduler._max_date);\r\n\r\n\t\tif(!view_opts._trace_x) return blocks;\r\n\r\n\t\tfor(var i = 0; i < view_opts._trace_x.length; i++){\r\n\t\t\tif(scheduler._is_column_visible(view_opts._trace_x[i]))\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\tif(i == view_opts._trace_x.length)\r\n\t\t\treturn blocks;\r\n\r\n\t\tvar area = areas[section];\r\n\r\n\t\tif (!(min_date < end_date && max_date > start_date))\r\n\t\t\treturn blocks;\r\n\r\n\t\tvar block = this.createElement();\r\n\r\n\t\tlet start_pos;\r\n\t\tlet end_pos;\r\n\r\n\t\tfunction set_date_part(source, target) {\r\n\t\t\t// reset to start of the month in order to prevent month change when target is on 31th day, and source month has only 30 days\r\n\t\t\ttarget.setDate(1);\r\n\r\n\t\t\ttarget.setFullYear(source.getFullYear());\r\n\t\t\ttarget.setMonth(source.getMonth());\r\n\t\t\ttarget.setDate(source.getDate());\r\n\t\t}\r\n\r\n\t\tif(!scheduler.getView().days){\r\n\t\t\tstart_pos = scheduler._timeline_getX({start_date: start_date}, false, view_opts);\r\n\t\t\tend_pos = scheduler._timeline_getX({start_date: end_date}, false, view_opts);\r\n\t\t}else{\r\n\t\t\t// daytimeline\r\n\t\t\tconst tempStart = new Date(start_date);\r\n\t\t\tset_date_part(scheduler._min_date, tempStart);\r\n\t\t\tconst tempEnd = new Date(end_date);\r\n\t\t\tset_date_part(scheduler._min_date, tempEnd);\r\n\t\t\tstart_pos = scheduler._timeline_getX({start_date: tempStart}, false, view_opts);\r\n\t\t\tend_pos = scheduler._timeline_getX({start_date: tempEnd}, false, view_opts);\r\n\t\t}\r\n\r\n\t\tvar height = ((view_opts._section_height[section]-1) || (view_opts.dy - 1));\r\n\r\n\t\tvar top = 0;\r\n\t\tif (scheduler._isRender('cell')){\r\n\t\t\ttop = area.offsetTop;\r\n\t\t\tstart_pos += view_opts.dx;\r\n\t\t\tend_pos += view_opts.dx;\r\n\t\t\tarea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t}else{\r\n\r\n\t\t}\r\n\t\tvar width = Math.max(1, end_pos - start_pos - 1);\r\n\t\tlet direction = \"left\";\r\n\t\tif(scheduler.config.rtl){\r\n\t\t\tdirection = \"right\";\r\n\t\t}\r\n\t\tblock.style.cssText = `height:${height}px; ${direction}:${start_pos}px; width:${width}px; top:${top}px;`;\r\n\r\n\t\tif(area){\r\n\t\t\tarea.appendChild(block);\r\n\t\t\tblocks.push(block);\r\n\t\t}\r\n\r\n\t\treturn blocks;\r\n\t},\r\n\r\n\trenderMonthCell: function(date){\r\n\t\tvar cells = scheduler.$container.querySelectorAll(\".dhx_month_head\");\r\n\r\n\t\tvar divs = [];\r\n\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\tdivs.push(cells[i].parentNode);\r\n\t\t}\r\n\r\n\t\tvar firstDate = scheduler.date.week_start(new Date(scheduler.getState().min_date));\r\n\r\n\t\tvar index = -1;\r\n\t\tvar weekNumber = 0;\r\n\t\tvar dayIndex = -1;\r\n\t\tvar currDate = firstDate;\r\n\t\tvar markerDate = scheduler.date.day_start(new Date(date));\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tindex++;\r\n\r\n\t\t\tif(dayIndex == 6){\r\n\t\t\t\tweekNumber++;\r\n\t\t\t\tdayIndex = 0;\r\n\t\t\t}else{\r\n\t\t\t\tdayIndex++;\r\n\t\t\t}\r\n\r\n\t\t\tif(scheduler.date.day_start(new Date(currDate)).valueOf() == markerDate.valueOf()){\r\n\t\t\t\tbreak;\r\n\t\t\t}else{\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(index == -1){\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tvar left = scheduler._colsS[dayIndex];\r\n\t\tvar top = scheduler._colsS.heights[weekNumber];\r\n\r\n\t\tvar div = this.createElement();\r\n\t\tdiv.style.top = top + \"px\";\r\n\t\tdiv.style.left = left + \"px\";\r\n\t\tdiv.style.width = scheduler._cols[dayIndex] + \"px\";\r\n\t\tdiv.style.height = ((scheduler._colsS.heights[weekNumber + 1] - top) || scheduler._colsS.height) + \"px\" ;\r\n\r\n\r\n\t\tvar container = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\r\n\t\tvar datatable = container.querySelector(\".dhx_cal_month_table\");\r\n\t\tif(datatable.nextSibling){\r\n\t\t\tcontainer.insertBefore(div, datatable.nextSibling);\r\n\t\t}else{\r\n\t\t\tcontainer.appendChild(div);\r\n\t\t}\r\n\t\treturn div;\r\n\t},\r\n\trenderMonthMarker: function(start_date, end_date){\r\n\t\tvar res = [];\r\n\t\tvar currentDate = start_date;\r\n\t\twhile(currentDate.valueOf() < end_date.valueOf()){\r\n\t\t\tres.push(this.renderMonthCell(currentDate));\r\n\t\t\tcurrentDate = scheduler.date.add(currentDate, 1, \"day\");\r\n\t\t}\r\n\t\treturn res;\r\n\t},\r\n\r\n\trenderVerticalMarker: function(start_date, end_date, section){\r\n\t\tvar index = scheduler.locate_holder_day(start_date);\r\n\r\n\t\tvar divs = [];\r\n\t\tvar area = null;\r\n\r\n\t\tvar c = scheduler.config;\r\n\t\tif(scheduler._ignores[index]) return divs;\r\n\r\n\t\tif (scheduler._props && scheduler._props[scheduler._mode] && section) {\r\n\t\t\tvar view = scheduler._props[scheduler._mode];\r\n\t\t\tindex = view.order[section];\r\n\r\n\t\t\tvar inner_index = view.order[section];\r\n\t\t\tif(!(view.days > 1)){\r\n\t\t\t\tindex = inner_index;\r\n\t\t\t\tif (view.size && (index > view.position+view.size)) {\r\n\t\t\t\t\tindex = 0;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t//var units_l = view.size || view.options.length;\r\n\r\n\t\t\t\tindex = scheduler.locate_holder_day(start_date) + inner_index;\r\n\t\t\t\t//index = index*units_l + inner_index;\r\n\t\t\t}\r\n\t\t}\r\n\t\tarea = scheduler.locate_holder(index);\r\n\t\tif(!area || area.querySelector(\".dhx_scale_hour\")){\r\n\t\t\t// hour scale instead of date column\r\n\t\t\treturn document.createElement(\"div\");\r\n\t\t}\r\n\r\n\t\tvar start = Math.max((start_date.getHours()*60 + start_date.getMinutes()), c.first_hour*60);\r\n\r\n\r\n\t\tvar end = Math.min((end_date.getHours()*60 + end_date.getMinutes()), c.last_hour*60);\r\n\t\tif(!end && (scheduler.date.day_start(new Date(end_date)).valueOf() > scheduler.date.day_start(new Date(start_date)).valueOf())){\r\n\t\t\tend = c.last_hour*60;\r\n\t\t}\r\n\r\n\t\tif (end <= start) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tvar block = this.createElement();\r\n\r\n\t\t// +1 for working with section which really takes up whole height (as % would be == 0)\r\n\t\tvar all_hours_height = scheduler.config.hour_size_px*c.last_hour + 1;\r\n\t\tvar hour_ms = 60*60*1000;\r\n\t\tblock.style.top = (Math.round((start*60*1000-scheduler.config.first_hour*hour_ms)*scheduler.config.hour_size_px/hour_ms) % all_hours_height) + \"px\";\r\n\t\tblock.style.lineHeight = block.style.height = Math.max((Math.round(((end-start)*60*1000)*scheduler.config.hour_size_px/hour_ms)) % all_hours_height, 1)+\"px\";\r\n\t\tblock.style.width = \"100%\";\r\n\t\tarea.appendChild(block);\r\n\t\tdivs.push(block);\r\n\t\treturn divs[0];\r\n\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode = function(){};\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.EventHandler,\r\n\t{\r\n\t\tgetDefaultNode: function(){\r\n\t\t\tvar node = new scheduler.$keyboardNavigation.TimeSlot();\r\n\r\n\t\t\tif(!node.isValid()){\r\n\t\t\t\tnode = node.fallback();\r\n\t\t\t}\r\n\t\t\treturn node;\r\n\t\t},\r\n\r\n\t\t_modes:{\r\n\t\t\tmonth: \"month\",\r\n\t\t\tyear: \"year\",\r\n\t\t\tdayColumns: \"dayColumns\",\r\n\t\t\ttimeline:\"timeline\",\r\n\t\t\tunits:\"units\",\r\n\t\t\tweekAgenda: \"weekAgenda\",\r\n\t\t\tlist: \"list\"\r\n\t\t},\r\n\t\tgetMode: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tvar mode = state.mode;\r\n\t\t\tif((scheduler.matrix && scheduler.matrix[mode])){\r\n\t\t\t\treturn this._modes.timeline;\r\n\t\t\t} else if((scheduler._props && scheduler._props[mode])){\r\n\t\t\t\treturn this._modes.units;\r\n\t\t\t}else if(mode == \"month\"){\r\n\t\t\t\treturn this._modes.month;\r\n\t\t\t}else if(mode == \"year\"){\r\n\t\t\t\treturn this._modes.year;\r\n\t\t\t}else if(mode == \"week_agenda\"){\r\n\t\t\t\treturn this._modes.weekAgenda;\r\n\t\t\t}else if(mode == \"map\" || mode == \"agenda\" || (scheduler._grid && scheduler[\"grid_\" + mode])){\r\n\t\t\t\treturn this._modes.list;\r\n\t\t\t}else{\r\n\t\t\t\treturn this._modes.dayColumns;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.focus();\r\n\t\t},\r\n\r\n\t\tblur: function(){\r\n\r\n\t\t},\r\n\r\n\t\tdisable: function(){\r\n\t\t\tscheduler.$container.setAttribute(\"tabindex\", \"0\");\r\n\t\t},\r\n\t\tenable: function(){\r\n\t\t\tif(scheduler.$container)\r\n\t\t\t\tscheduler.$container.removeAttribute(\"tabindex\");\r\n\t\t},\r\n\t\tisEnabled: function(){\r\n\t\t\treturn scheduler.$container.hasAttribute(\"tabindex\");\r\n\t\t},\r\n\r\n\r\n\t\t_compareEvents: function(a, b){\r\n\t\t\tif (a.start_date.valueOf() == b.start_date.valueOf())\r\n\t\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\t\treturn a.start_date.valueOf() > b.start_date.valueOf() ? 1 : -1;\r\n\t\t},\r\n\r\n\t\t_pickEvent: function(from, to, startId, reverse){\r\n\t\t\tvar range = scheduler.getState();\r\n\t\t\tfrom = new Date(Math.max(range.min_date.valueOf(), from.valueOf()));\r\n\t\t\tto = new Date(Math.min(range.max_date.valueOf(), to.valueOf()));\r\n\r\n\t\t\tvar evs = scheduler.getEvents(from, to);\r\n\t\t\tevs.sort(this._compareEvents);\r\n\t\t\tif(reverse){\r\n\t\t\t\tevs = evs.reverse();\r\n\t\t\t}\r\n\r\n\t\t\tvar trim = !!startId;\r\n\t\t\tfor(var i =0; i < evs.length && trim; i++){\r\n\t\t\t\tif(evs[i].id == startId){\r\n\t\t\t\t\ttrim = false;\r\n\t\t\t\t}\r\n\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\r\n\t\t\tfor(var i = 0; i < evs.length; i++){\r\n\t\t\t\tvar eventElement = new scheduler.$keyboardNavigation.Event(evs[i].id);\r\n\t\t\t\tif(eventElement.getNode())\r\n\t\t\t\t\treturn evs[i];\r\n\t\t\t}\r\n\r\n\t\t\treturn null;\r\n\t\t},\r\n\r\n\t\tnextEventHandler: function(id){\r\n\t\t\tvar activeNode = scheduler.$keyboardNavigation.dispatcher.activeNode;\r\n\r\n\t\t\tvar startId = id || (activeNode && activeNode.eventId);\r\n\r\n\t\t\tvar nextEvent = null;\r\n\t\t\tif(startId && scheduler.getEvent(startId)){\r\n\t\t\t\tvar currEvent = scheduler.getEvent(startId);\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tcurrEvent.start_date,\r\n\t\t\t\t\tscheduler.date.add(currEvent.start_date, 1, \"year\"),\r\n\t\t\t\t\tcurrEvent.id,\r\n\t\t\t\t\tfalse\r\n\t\t\t\t);\r\n\r\n\t\t\t}\r\n\t\t\tif(!nextEvent && !id){\r\n\t\t\t\tvar visibleDates = scheduler.getState();\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tvisibleDates.min_date,\r\n\t\t\t\t\tscheduler.date.add(visibleDates.min_date, 1, \"year\"),\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\tfalse\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tif(nextEvent){\r\n\r\n\t\t\t\tvar nextEv = new scheduler.$keyboardNavigation.Event(nextEvent.id);\r\n\t\t\t\tif(!nextEv.isValid()){// not visible event\r\n\t\t\t\t\tthis.nextEventHandler(nextEvent.id);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(activeNode){activeNode.blur();}\r\n\t\t\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(nextEv);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tprevEventHandler: function(id){\r\n\t\t\tvar activeNode = scheduler.$keyboardNavigation.dispatcher.activeNode;\r\n\r\n\t\t\tvar startId = id || (activeNode && activeNode.eventId);\r\n\r\n\t\t\tvar nextEvent = null;\r\n\t\t\tif(startId && scheduler.getEvent(startId)){\r\n\t\t\t\tvar currEvent = scheduler.getEvent(startId);\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tscheduler.date.add(currEvent.end_date, -1, \"year\"),\r\n\t\t\t\t\tcurrEvent.end_date,\r\n\t\t\t\t\tcurrEvent.id,\r\n\t\t\t\t\ttrue\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\tif(!nextEvent && !id){\r\n\t\t\t\tvar visibleDates = scheduler.getState();\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tscheduler.date.add(visibleDates.max_date, -1, \"year\"),\r\n\t\t\t\t\tvisibleDates.max_date,\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\ttrue\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tif(nextEvent){\r\n\t\t\t\tvar nextEv = new scheduler.$keyboardNavigation.Event(nextEvent.id);\r\n\t\t\t\tif(!nextEv.isValid()){// not visible event\r\n\t\t\t\t\tthis.prevEventHandler(nextEvent.id);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(activeNode){activeNode.blur();}\r\n\t\t\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(nextEv);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\r\n\t\t\t\"alt+1, alt+2, alt+3, alt+4, alt+5, alt+6, alt+7, alt+8, alt+9\": function(e){\r\n\t\t\t\tvar tabs = scheduler.$keyboardNavigation.HeaderCell.prototype.getNodes(\".dhx_cal_navline .dhx_cal_tab\");\r\n\t\t\t\tvar key = e.key;\r\n\t\t\t\tif(key === undefined){\r\n\t\t\t\t\tkey = e.keyCode - 48;\r\n\t\t\t\t}\r\n\t\t\t\tif(tabs[key*1 - 1]){\r\n\t\t\t\t\ttabs[key*1 - 1].click();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+left,meta+left\": function(e){\r\n\t\t\t\tscheduler._click.dhx_cal_prev_button();\r\n\t\t\t},\r\n\t\t\t\"ctrl+right,meta+right\": function(e){\r\n\t\t\t\tscheduler._click.dhx_cal_next_button();\r\n\t\t\t},\r\n\t\t\t\"ctrl+up,meta+up\":function(e){\r\n\t\t\t\tvar dataArea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tdataArea.scrollTop -= 20;\r\n\t\t\t},\r\n\t\t\t\"ctrl+down,meta+down\": function(e){\r\n\t\t\t\tvar dataArea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tdataArea.scrollTop += 20;\r\n\t\t\t},\r\n\r\n\r\n\t\t\t\"e\": function(){\r\n\t\t\t\tthis.nextEventHandler();\r\n\t\t\t},\r\n\r\n\t\t\t\"home\": function(){\r\n\t\t\t\tscheduler.setCurrentView(new Date());\r\n\t\t\t},\r\n\r\n\t\t\t\"shift+e\": function(){\r\n\t\t\t\tthis.prevEventHandler();\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+enter,meta+enter\": function(){\r\n\t\t\t\tscheduler.addEventNow({start_date: new Date(scheduler.getState().date)});\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+c,meta+c\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t},\r\n\t\t\t\"ctrl+v,meta+v\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t},\r\n\t\t\t\"ctrl+x,meta+x\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode.prototype.bindAll(scheduler.$keyboardNavigation.SchedulerNode.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.KeyNavNode = function(){};\r\n\r\nscheduler.$keyboardNavigation.KeyNavNode.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.EventHandler,\r\n\t{\r\n\t\tisValid: function(){\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\treturn null;\r\n\t\t},\r\n\r\n\t\tmoveTo: function (element) {\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(element);\r\n\t\t},\r\n\r\n\t\tcompareTo: function(b){\r\n\t\t\t// good enough comparison of two random objects\r\n\t\t\tif(!b) return false;\r\n\t\t\tfor(var i in this){\r\n\t\t\t\tif(!!this[i] != !!b[i]) return false;\r\n\r\n\t\t\t\tvar canStringifyThis = !!(this[i] && this[i].toString);\r\n\t\t\t\tvar canStringifyThat = !!(b[i] && b[i].toString);\r\n\t\t\t\tif(canStringifyThat != canStringifyThis) return false;\r\n\t\t\t\tif(!(canStringifyThat && canStringifyThis)) {\r\n\t\t\t\t\tif(b[i] != this[i]) return false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(b[i].toString() != this[i].toString())\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\tgetNode: function(){},\r\n\t\tfocus: function(){\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif(node){\r\n\t\t\t\tnode.setAttribute(\"tabindex\", \"-1\");\r\n\t\t\t\t//node.className += \" scheduler_focused\";\r\n\t\t\t\tif(node.focus) node.focus();\r\n\t\t\t}\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif(node){\r\n\t\t\t\tnode.setAttribute(\"tabindex\", \"-1\");\r\n\t\t\t\t//node.className = (node.className || \"\").replace(/ ?scheduler_focused/g, \"\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.HeaderCell = function(index){\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.HeaderCell.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\tgetNode: function(index){\r\n\t\t\tindex = index || this.index || 0;\r\n\t\t\tvar nodes = this.getNodes();\r\n\t\t\tif(nodes[index]) return nodes[index];\r\n\t\t},\r\n\r\n\t\tgetNodes: function(selector){\r\n\t\t\tselector = selector || [\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_prev_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_next_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_today_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_tab\"\r\n\t\t\t\t].join(\", \");\r\n\r\n\t\t\tvar nodes = Array.prototype.slice.call(scheduler.$container.querySelectorAll(selector));\r\n\t\t\tnodes.sort(function(a, b){\r\n\t\t\t\treturn a.offsetLeft - b.offsetLeft;\r\n\t\t\t});\r\n\t\t\treturn nodes;\r\n\t\t},\r\n\r\n\t\t_handlers:null,\r\n\r\n\t\tisValid: function(){\r\n\t\t\treturn !!this.getNode(this.index);\r\n\t\t},\r\n\t\tfallback:function(){\r\n\t\t\tvar defaultCell = this.getNode(0);\r\n\t\t\tif(!defaultCell){\r\n\t\t\t\tdefaultCell = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}\r\n\t\t\treturn defaultCell;\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tvar newIndex = this.index - 1;\r\n\t\t\t\tif(newIndex < 0){\r\n\t\t\t\t\tnewIndex = this.getNodes().length - 1;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.HeaderCell(newIndex));\r\n\r\n\t\t\t},\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tvar newIndex = this.index + 1;\r\n\t\t\t\tif(newIndex >= this.getNodes().length){\r\n\t\t\t\t\tnewIndex = 0;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.HeaderCell(newIndex));\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t},\r\n\r\n\t\t\t\"enter\": function(){\r\n\t\t\t\tvar node = this.getNode();\r\n\t\t\t\tif(node){\r\n\t\t\t\t\tnode.click();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.HeaderCell.prototype.bindAll(scheduler.$keyboardNavigation.HeaderCell.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.Event = function(id){\r\n\tthis.eventId = null;\r\n\tif(scheduler.getEvent(id)){\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tthis.start = new Date(ev.start_date);\r\n\t\tthis.end = new Date(ev.end_date);\r\n\r\n\t\tthis.section = this._getSection(ev);\r\n\t\tthis.eventId = id;\r\n\t}\r\n};\r\n\r\nscheduler.$keyboardNavigation.Event.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\t_getNodes: function(){\r\n\t\t\treturn Array.prototype.slice.call(scheduler.$container.querySelectorAll(\"[\"+scheduler.config.event_attribute+\"]\"));\r\n\t\t},\r\n\r\n\t\t_modes: scheduler.$keyboardNavigation.SchedulerNode.prototype._modes,\r\n\r\n\t\tgetMode: scheduler.$keyboardNavigation.SchedulerNode.prototype.getMode,\r\n\r\n\t\t_handlers: null,\r\n\t\tisValid: function(){\r\n\t\t\treturn !!(scheduler.getEvent(this.eventId) && this.getNode());\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\tvar eventNode = this._getNodes()[0];\r\n\t\t\tvar defaultElement = null;\r\n\t\t\tif(!eventNode || !(scheduler._locate_event(eventNode))){\r\n\t\t\t\tdefaultElement = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}else{\r\n\t\t\t\tvar id = scheduler._locate_event(eventNode);\r\n\t\t\t\tdefaultElement = new scheduler.$keyboardNavigation.Event(id);\r\n\t\t\t}\r\n\r\n\t\t\treturn defaultElement;\r\n\t\t},\r\n\r\n\t\tisScrolledIntoView: function (el) {\r\n\t\t\tvar eventBox = el.getBoundingClientRect();\r\n\t\t\tvar viewPort = scheduler.$container.querySelector(\".dhx_cal_data\").getBoundingClientRect();\r\n\t\t\t\r\n\t\t\tif(eventBox.bottom < viewPort.top || eventBox.top > viewPort.bottom){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\tgetNode: function(){\r\n\r\n\t\t\tvar idSelector = \"[\"+scheduler.config.event_attribute+\"='\"+this.eventId+\"']\";\r\n\r\n\t\t\tvar inlineEditor = scheduler.$keyboardNavigation.dispatcher.getInlineEditor(this.eventId);\r\n\t\t\tif(inlineEditor){// is inline editor visible\r\n\t\t\t\treturn inlineEditor;\r\n\t\t\t}else{\r\n\t\t\t\tif(scheduler.isMultisectionEvent && scheduler.isMultisectionEvent(scheduler.getEvent(this.eventId))){\r\n\t\t\t\t\tvar nodes = scheduler.$container.querySelectorAll(idSelector);\r\n\t\t\t\t\tfor(var i = 0; i < nodes.length; i++){\r\n\t\t\t\t\t\tif(this.isScrolledIntoView(nodes[i])){\r\n\t\t\t\t\t\t\treturn nodes[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn nodes[0];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn scheduler.$container.querySelector(idSelector);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tvar event = scheduler.getEvent(this.eventId);\r\n\r\n\t\t\tvar calendar = scheduler.getState();\r\n\t\t\tif(event.start_date.valueOf() > calendar.max_date.valueOf() || event.end_date.valueOf() <= calendar.min_date.valueOf()){\r\n\t\t\t\tscheduler.setCurrentView(event.start_date);\r\n\t\t\t}\r\n\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif (this.isScrolledIntoView(node)) {\r\n\t\t\t\tscheduler.$keyboardNavigation.dispatcher.keepScrollPosition((function(){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\t\t}).bind(this));\r\n\t\t\t} else {\r\n\t\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\t}\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\r\n\r\n\t\t_getSection: function(ev){\r\n\t\t\tvar section = null;\r\n\t\t\tvar mode = scheduler.getState().mode;\r\n\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\t\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\t\tsection = ev[timeline.y_property];\r\n\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\tvar unit = scheduler._props[mode];\r\n\t\t\t\tsection = ev[unit.map_to];\r\n\t\t\t}\r\n\t\t\treturn section;\r\n\t\t},\r\n\t\t_moveToSlot: function(dir){\r\n\t\t\tvar ev = scheduler.getEvent(this.eventId);\r\n\t\t\tif(ev){\r\n\t\t\t\tvar section =this._getSection(ev);\r\n\t\t\t\tvar slot = new scheduler.$keyboardNavigation.TimeSlot(ev.start_date, null, section);\r\n\t\t\t\tthis.moveTo(slot.nextSlot(slot, dir));\r\n\t\t\t}else{\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tthis._moveToSlot(\"left\");\r\n\t\t\t},\r\n\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tthis._moveToSlot(\"right\");\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\t\t\t\tif(this.getMode() == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis._moveToSlot(\"down\");\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"space\": function(){\r\n\t\t\t\tvar node = this.getNode();\r\n\t\t\t\tif(node && node.click){\r\n\t\t\t\t\tnode.click();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"up\": function () {\r\n\t\t\t\tif(this.getMode() == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis._moveToSlot(\"up\");\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"delete\": function(){\r\n\t\t\t\tif(scheduler.getEvent(this.eventId)) {\r\n\t\t\t\t\tscheduler._click.buttons[\"delete\"](this.eventId);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t// open lightbox\r\n\t\t\t\"enter\": function () {\r\n\t\t\t\tif(scheduler.getEvent(this.eventId)) {\r\n\t\t\t\t\tscheduler.showLightbox(this.eventId);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\nscheduler.$keyboardNavigation.Event.prototype.bindAll(scheduler.$keyboardNavigation.Event.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.TimeSlot = function(from, to, section, movingDate){\r\n\tvar state = scheduler.getState();\r\n\tvar timeline = scheduler.matrix && scheduler.matrix[state.mode];\r\n\r\n\tif(!from){\r\n\t\tfrom = this.getDefaultDate();\r\n\t}\r\n\r\n\tif(!to){\r\n\r\n\t\tif(timeline){\r\n\t\t\tto = scheduler.date.add(from, timeline.x_step, timeline.x_unit);\r\n\t\t}else{\r\n\t\t\tto = scheduler.date.add(from, scheduler.config.key_nav_step, \"minute\");\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tthis.section = section || this._getDefaultSection();\r\n\tthis.start_date = new Date(from);\r\n\tthis.end_date = new Date(to);\r\n\tthis.movingDate = movingDate || null;\r\n};\r\n\r\nscheduler.$keyboardNavigation.TimeSlot.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\t_handlers:null,\r\n\r\n\t\tgetDefaultDate: function(){\r\n\t\t\tvar from;\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar visibleTime = new Date(state.date);\r\n\t\t\tvisibleTime.setSeconds(0);\r\n\t\t\tvisibleTime.setMilliseconds(0);\r\n\r\n\t\t\tvar nowTime = new Date();\r\n\t\t\tnowTime.setSeconds(0);\r\n\t\t\tnowTime.setMilliseconds(0);\r\n\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[state.mode];\r\n\t\t\tvar showNowTime = false;\r\n\t\t\tif(visibleTime.valueOf() === nowTime.valueOf()){\r\n\t\t\t\tshowNowTime = true;\r\n\t\t\t}\r\n\r\n\t\t\tif(timeline){\r\n\t\t\t\tif(showNowTime){\r\n\t\t\t\t\tif(timeline.x_unit === \"day\"){\r\n\t\t\t\t\t\tnowTime.setHours(0);\r\n\t\t\t\t\t\tnowTime.setMinutes(0);\r\n\t\t\t\t\t}else if(timeline.x_unit === \"hour\"){\r\n\t\t\t\t\t\tnowTime.setMinutes(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfrom = nowTime;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfrom = scheduler.date[timeline.name + \"_start\"](new Date(state.date));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfrom = this.findVisibleColumn(from);\r\n\t\t\t}else{\r\n\t\t\t\tfrom = new Date(scheduler.getState().min_date);\r\n\t\t\t\tif(showNowTime){\r\n\t\t\t\t\tfrom = nowTime;\r\n\t\t\t\t}\r\n\t\t\t\tfrom = this.findVisibleColumn(from);\r\n\t\t\t\tif(!showNowTime){\r\n\t\t\t\t\tfrom.setHours(scheduler.config.first_hour);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(!scheduler._table_view){\r\n\t\t\t\t\tvar dataContainer = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\t\tif(dataContainer.scrollTop){\r\n\t\t\t\t\t\tfrom.setHours(scheduler.config.first_hour + Math.ceil(dataContainer.scrollTop / scheduler.config.hour_size_px));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn from;\r\n\t\t},\r\n\r\n\t\tclone: function(timeslot){\r\n\t\t\treturn new scheduler.$keyboardNavigation.TimeSlot(timeslot.start_date, timeslot.end_date, timeslot.section, timeslot.movingDate);\r\n\t\t},\r\n\t\t_getMultisectionView: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view;\r\n\t\t\tif(scheduler._props && scheduler._props[state.mode]) {\r\n\t\t\t\tview = scheduler._props[state.mode];\r\n\t\t\t}else if(scheduler.matrix && scheduler.matrix[state.mode]){\r\n\t\t\t\tview = scheduler.matrix[state.mode];\r\n\t\t\t}\r\n\t\t\treturn view;\r\n\t\t},\r\n\r\n\t\t_getDefaultSection: function(){\r\n\t\t\tvar section = null;\r\n\t\t\tvar view = this._getMultisectionView();\r\n\t\t\tif(view && !section){\r\n\t\t\t\tsection = this._getNextSection();\r\n\t\t\t}\r\n\t\t\treturn section;\r\n\t\t},\r\n\r\n\t\t_getNextSection: function(sectionId, dir){\r\n\t\t\tvar view = this._getMultisectionView();\r\n\t\t\tvar currentIndex = view.order[sectionId];\r\n\t\t\tvar nextIndex = currentIndex;\r\n\t\t\tif(currentIndex !== undefined){\r\n\t\t\t\tnextIndex = currentIndex + dir;\r\n\t\t\t}else{\r\n\t\t\t\tnextIndex = (view.size && view.position) ? view.position : 0;\r\n\t\t\t}\r\n\r\n\t\t\tif(nextIndex < 0){\r\n\t\t\t\tnextIndex = 0;\r\n\t\t\t}\r\n\t\t\tvar options = view.options || view.y_unit;\r\n\r\n\t\t\tif(nextIndex >= options.length){\r\n\t\t\t\tnextIndex = options.length - 1;\r\n\t\t\t}\r\n\t\t\t//nextIndex = nextIndex < 0 ? nextIndex = (view.options || view.y_unit).length -1 : nextIndex;\r\n\r\n\t\t\tif(options[nextIndex]){\r\n\t\t\t\treturn options[nextIndex].key;\r\n\t\t\t}else{\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar isInRange = !(this.start_date.valueOf() < state.min_date.valueOf() || this.start_date.valueOf() >= state.max_date.valueOf());\r\n\r\n\t\t\tif(!isInRange) return false;\r\n\r\n\r\n\t\t\tif(!this.isVisible(this.start_date, this.end_date)) return false;\r\n\r\n\t\t\tvar view = this._getMultisectionView();\r\n\r\n\t\t\tif(view){\r\n\t\t\t\treturn (view.order[this.section] !== undefined);\r\n\t\t\t}else{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\tfallback:function(){\r\n\r\n\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(!defaultSlot.isValid()){\r\n\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t}else{\r\n\t\t\t\treturn defaultSlot;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tgetNodes: function(){\r\n\t\t\treturn Array.prototype.slice.call(scheduler.$container.querySelectorAll(\".dhx_focus_slot\"));\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\treturn this.getNodes()[0];\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tif(this.section && scheduler.getView() && scheduler.getView().smart_rendering && scheduler.getView().scrollTo && !scheduler.$container.querySelector(`[data-section-id=\"${this.section}\"]`)){\r\n\t\t\t\tscheduler.getView().scrollTo({section: this.section});\r\n\t\t\t}\r\n\t\t\tscheduler.$keyboardNavigation.marker.render(this.start_date, this.end_date, this.section);\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\tscheduler.$keyboardNavigation._pasteDate = this.start_date;\r\n\t\t\tscheduler.$keyboardNavigation._pasteSection = this.section;\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t\tscheduler.$keyboardNavigation.marker.clear();\r\n\t\t},\r\n\r\n\t\t_modes: scheduler.$keyboardNavigation.SchedulerNode.prototype._modes,\r\n\r\n\t\t_getMode: scheduler.$keyboardNavigation.SchedulerNode.prototype.getMode,\r\n\r\n\t\taddMonthDate: function(date, dir, extend){\r\n\t\t\tvar res;\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tres = scheduler.date.add(date, -1, \"week\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tres = scheduler.date.add(date, 1, \"week\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tres = scheduler.date.day_start(scheduler.date.add(date, -1, \"day\"));\r\n\t\t\t\t\tres = this.findVisibleColumn(res, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tres = scheduler.date.day_start(scheduler.date.add(date, 1, \"day\"));\r\n\t\t\t\t\tres = this.findVisibleColumn(res, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tres = scheduler.date.day_start(new Date(date));\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tif(date.valueOf() < state.min_date.valueOf() || (!extend && date.valueOf() >= state.max_date.valueOf())){\r\n\t\t\t\tres = new Date(state.min_date);\r\n\t\t\t}\r\n\r\n\t\t\treturn res;\r\n\t\t},\r\n\r\n\t\tnextMonthSlot: function(slot, dir, extend){\r\n\r\n\t\t\tvar start, end;\r\n\t\t\tstart = this.addMonthDate(slot.start_date, dir, extend);\r\n\r\n\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\tend = new Date(start);\r\n\t\t\tend.setHours(scheduler.config.last_hour);\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\r\n\t\t_alignTimeSlot: function(date, minDate, unit, step){\r\n\t\t\tvar currentDate = new Date(minDate);\r\n\t\t\twhile(currentDate.valueOf() < date.valueOf()){\r\n\t\t\t\tcurrentDate = scheduler.date.add(currentDate, step, unit);\r\n\t\t\t}\r\n\r\n\t\t\tif(currentDate.valueOf() > date.valueOf()){\r\n\t\t\t\tcurrentDate = scheduler.date.add(currentDate, -step, unit);\r\n\t\t\t}\r\n\r\n\t\t\treturn currentDate;\r\n\t\t},\r\n\r\n\t\tnextTimelineSlot: function(slot, dir, extend){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view = scheduler.matrix[state.mode];\r\n\r\n\t\t\tvar startDate = this._alignTimeSlot(slot.start_date, scheduler.date[view.name + \"_start\"](new Date(slot.start_date)), view.x_unit, view.x_step);\r\n\t\t\tvar endDate = this._alignTimeSlot(slot.end_date, scheduler.date[view.name + \"_start\"](new Date(slot.end_date)), view.x_unit, view.x_step);\r\n\r\n\t\t\tif(endDate.valueOf() <= startDate.valueOf()){\r\n\t\t\t\tendDate = scheduler.date.add(startDate, view.x_step, view.x_unit);\r\n\t\t\t}\r\n\t\t\tvar newPos = this.clone(slot);\r\n\t\t\tnewPos.start_date = startDate;\r\n\t\t\tnewPos.end_date = endDate;\r\n\t\t\tnewPos.section = slot.section || this._getNextSection();\r\n\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tnewPos.section = this._getNextSection(slot.section, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tnewPos.section = this._getNextSection(slot.section, +1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tnewPos.start_date = this.findVisibleColumn(scheduler.date.add(newPos.start_date, -view.x_step, view.x_unit), -1);\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tnewPos.start_date = this.findVisibleColumn(scheduler.date.add(newPos.start_date, view.x_step, view.x_unit), 1);\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(newPos.start_date.valueOf() < state.min_date.valueOf() || newPos.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tif(extend && newPos.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\t\tnewPos.start_date = new Date(state.max_date);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tnewPos.start_date = scheduler.date[state.mode + \"_start\"](scheduler.date.add(state.date, dir == \"left\" ? -1 : 1, state.mode));\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn newPos;\r\n\t\t},\r\n\r\n\t\tnextUnitsSlot: function(slot, dir, extend){\r\n\t\t\tvar newPos = this.clone(slot);\r\n\t\t\tnewPos.section = slot.section || this._getNextSection();\r\n\r\n\t\t\tvar section = slot.section || this._getNextSection();\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view = scheduler._props[state.mode];\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tsection = this._getNextSection(slot.section, -1);\r\n\t\t\t\t\tvar optionsCount = view.size ? (view.size - 1) : view.options.length;\r\n\r\n\t\t\t\t\tif(view.days > 1 && (view.order[section] == optionsCount - 1)){\r\n\t\t\t\t\t\tif(scheduler.date.add(slot.start_date, -1, \"day\").valueOf() >= state.min_date.valueOf()){\r\n\t\t\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tsection = this._getNextSection(slot.section, 1);\r\n\t\t\t\t\tif(view.days > 1 && !view.order[section]){\r\n\t\t\t\t\t\tif(scheduler.date.add(slot.start_date, 1, \"day\").valueOf() < state.max_date.valueOf()){\r\n\t\t\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\tsection = slot.section;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tnewPos.section = section;\r\n\t\t\treturn newPos;\r\n\t\t},\r\n\r\n\t\t_moveDate: function(oldDate, dir){\r\n\t\t\tvar newDate = this.findVisibleColumn(scheduler.date.add(oldDate, dir, \"day\"), dir);\r\n\t\t\tnewDate.setHours(oldDate.getHours());\r\n\t\t\tnewDate.setMinutes(oldDate.getMinutes());\r\n\t\t\treturn newDate;\r\n\t\t},\r\n\r\n\t\tisBeforeLastHour: function(date, isStartDate){\r\n\t\t\tvar minutes = date.getMinutes(),\r\n\t\t\t\thours = date.getHours(),\r\n\t\t\t\tlast_hour = scheduler.config.last_hour;\r\n\t\t\treturn (hours < last_hour || (!isStartDate && ((last_hour == 24 || hours == last_hour) && !minutes)));\r\n\t\t},\r\n\t\tisAfterFirstHour: function(date, isStartDate){\r\n\t\t\tvar minutes = date.getMinutes(),\r\n\t\t\t\thours = date.getHours(),\r\n\t\t\t\tfirst_hour = scheduler.config.first_hour,\r\n\t\t\t\tlast_hour = scheduler.config.last_hour;\r\n\t\t\treturn (hours >= first_hour || (!isStartDate && (!minutes && ((!hours && last_hour == 24) || (hours == last_hour)))));\r\n\t\t},\r\n\t\tisInVisibleDayTime: function(date, isStartDate){\r\n\t\t\treturn (this.isBeforeLastHour(date, isStartDate) && this.isAfterFirstHour(date, isStartDate));\r\n\t\t},\r\n\r\n\t\tnextDaySlot: function(slot, dir, extend){\r\n\t\t\tvar start, end;\r\n\r\n\t\t\tvar key_nav_step = scheduler.config.key_nav_step;\r\n\r\n\t\t\tvar date = this._alignTimeSlot(slot.start_date, scheduler.date.day_start(new Date(slot.start_date)), \"minute\", key_nav_step);\r\n\r\n\r\n\t\t\tvar oldStart = slot.start_date;\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tstart = scheduler.date.add(date, -key_nav_step, \"minute\");\r\n\r\n\t\t\t\t\tif(!this.isInVisibleDayTime(start, true)){\r\n\t\t\t\t\t\tif (!extend || this.isInVisibleDayTime(oldStart, true)) {\r\n\r\n\t\t\t\t\t\t\tvar toNextDay = true;\r\n\t\t\t\t\t\t\tif(extend && scheduler.date.date_part(new Date(start)).valueOf() != scheduler.date.date_part(new Date(oldStart)).valueOf())\r\n\t\t\t\t\t\t\t\ttoNextDay = false;\r\n\t\t\t\t\t\t\tif(toNextDay)\r\n\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, -1, \"day\"), -1);\r\n\r\n\t\t\t\t\t\t\tstart.setHours(scheduler.config.last_hour);\r\n\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\tstart = scheduler.date.add(start, -key_nav_step, \"minute\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tstart = scheduler.date.add(date, key_nav_step, \"minute\");\r\n\r\n\t\t\t\t\tvar testEnd = extend ? start : scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tif(!this.isInVisibleDayTime(testEnd, false)){\r\n\t\t\t\t\t\tif(!extend || this.isInVisibleDayTime(oldStart, false)) {\r\n\t\t\t\t\t\t\tif (!extend) {\r\n\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, 1, \"day\"), 1);\r\n\t\t\t\t\t\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tvar toNextDay = true;\r\n\t\t\t\t\t\t\t\tif (scheduler.date.date_part(new Date(oldStart)).valueOf() == oldStart.valueOf()) {\r\n\t\t\t\t\t\t\t\t\ttoNextDay = false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (toNextDay) {\r\n\t\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, 1, \"day\"), 1);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\t\tstart = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tstart = this._moveDate(slot.start_date, -1);\r\n\t\t\t\t\tend = this._moveDate(slot.end_date, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tstart = this._moveDate(slot.start_date, 1);\r\n\t\t\t\t\tend = this._moveDate(slot.end_date, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tstart = date;\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\t\tnextWeekAgendaSlot: function(slot, dir){\r\n\t\t\tvar start, end;\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tstart = scheduler.date.day_start(scheduler.date.add(slot.start_date, -1, \"day\"));\r\n\t\t\t\t\tstart = this.findVisibleColumn(start, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tstart = scheduler.date.day_start(scheduler.date.add(slot.start_date, 1, \"day\"));\r\n\t\t\t\t\tstart = this.findVisibleColumn(start, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tstart = scheduler.date.day_start(slot.start_date);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif(slot.start_date.valueOf() < state.min_date.valueOf() || slot.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tstart = new Date(state.min_date);\r\n\r\n\t\t\t}\r\n\t\t\tend = new Date(start);\r\n\t\t\tend.setHours(scheduler.config.last_hour);\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\t\tnextAgendaSlot: function(slot, dir){\r\n\t\t\treturn {start_date: slot.start_date, end_date: slot.end_date};\r\n\t\t},\r\n\r\n\r\n\t\tisDateVisible: function(date){\r\n\t\t\tif(!scheduler._ignores_detected)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[scheduler.getState().mode];\r\n\r\n\t\t\tvar index;\r\n\t\t\tif(timeline){\r\n\t\t\t\tindex = scheduler._get_date_index(timeline, date);\r\n\t\t\t}else{\r\n\t\t\t\tindex = scheduler.locate_holder_day(date);\r\n\t\t\t}\r\n\r\n\t\t\treturn !scheduler._ignores[index];\r\n\t\t},\r\n\r\n\t\tfindVisibleColumn: function(start, dir){\r\n\t\t\tvar date = start;\r\n\t\t\tdir = dir || 1;\r\n\t\t\tvar range = scheduler.getState();\r\n\r\n\t\t\twhile(!this.isDateVisible(date) && ((dir > 0 && date.valueOf() <= range.max_date.valueOf()) || (dir < 0 && date.valueOf() >= range.min_date.valueOf()))){\r\n\t\t\t\tdate = this.nextDateColumn(date, dir);\r\n\t\t\t}\r\n\r\n\t\t\treturn date;\r\n\t\t},\r\n\r\n\t\tnextDateColumn: function(start, dir){\r\n\t\t\tdir = dir || 1;\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[scheduler.getState().mode];\r\n\r\n\t\t\tvar date;\r\n\t\t\tif(timeline){\r\n\t\t\t\tdate = scheduler.date.add(start, dir * timeline.x_step, timeline.x_unit);\r\n\t\t\t}else{\r\n\t\t\t\tdate = scheduler.date.day_start(scheduler.date.add(start, dir, \"day\"));\r\n\t\t\t}\r\n\r\n\t\t\treturn date;\r\n\t\t},\r\n\r\n\t\tisVisible:function(from, to){\r\n\t\t\tif(!scheduler._ignores_detected)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tvar current = new Date(from);\r\n\r\n\t\t\twhile(current.valueOf() < to.valueOf()){\r\n\t\t\t\tif(this.isDateVisible(current)) return true;\r\n\t\t\t\tcurrent = this.nextDateColumn(current);\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t},\r\n\r\n\t\tnextSlot: function(slot, dir, view, extend){\r\n\t\t\tvar next;\r\n\t\t\tview = view || this._getMode();\r\n\r\n\t\t\tvar tempSlot = scheduler.$keyboardNavigation.TimeSlot.prototype.clone(slot);\r\n\r\n\t\t\tswitch (view){\r\n\t\t\t\tcase this._modes.units:\r\n\t\t\t\t\tnext = this.nextUnitsSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.timeline:\r\n\t\t\t\t\tnext = this.nextTimelineSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.year:\r\n\t\t\t\t\tnext = this.nextMonthSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.month:\r\n\t\t\t\t\tnext = this.nextMonthSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.weekAgenda:\r\n\t\t\t\t\tnext = this.nextWeekAgendaSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.list:\r\n\t\t\t\t\tnext = this.nextAgendaSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.dayColumns:\r\n\t\t\t\t\tnext = this.nextDaySlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(next.start_date.valueOf() >= next.end_date.valueOf()){\r\n\t\t\t\tnext = this.nextSlot(next, dir, view);\r\n\t\t\t}\r\n\r\n\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(next);\r\n\r\n\t\t},\r\n\r\n\t\textendSlot: function(slot, dir){\r\n\t\t\tvar view = this._getMode();\r\n\t\t\tvar next;\r\n\t\t\tswitch (view){\r\n\t\t\t\tcase this._modes.units:\r\n\t\t\t\t\tif(dir == \"left\" || dir == \"right\"){\r\n\t\t\t\t\t\tnext = this.nextUnitsSlot(slot, dir);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnext = this.extendUnitsSlot(slot, dir);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.timeline:\r\n\t\t\t\t\tif(dir == \"down\" || dir == \"up\"){\r\n\t\t\t\t\t\tnext = this.nextTimelineSlot(slot, dir);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnext = this.extendTimelineSlot(slot, dir);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.year:\r\n\t\t\t\t\tnext = this.extendMonthSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.month:\r\n\t\t\t\t\tnext = this.extendMonthSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.dayColumns:\r\n\t\t\t\t\tnext = this.extendDaySlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.weekAgenda:\r\n\t\t\t\t\tnext = this.extendWeekAgendaSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnext = slot;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tvar range = scheduler.getState();\r\n\t\t\tif(next.start_date.valueOf() < range.min_date.valueOf()){\r\n\t\t\t\tnext.start_date = this.findVisibleColumn(range.min_date);\r\n\t\t\t\tnext.start_date.setHours(scheduler.config.first_hour);\r\n\t\t\t}\r\n\r\n\t\t\tif(next.end_date.valueOf() > range.max_date.valueOf()){\r\n\t\t\t//\tnext.end_date = new Date(slot.end_date);\r\n\t\t\t\tnext.end_date = this.findVisibleColumn(range.max_date, -1);\r\n\t\t\t}\r\n\r\n\r\n\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(next);\r\n\t\t},\r\n\r\n\t\textendTimelineSlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"timeline\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\textendWeekAgendaSlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"weekAgenda\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\textendGenericSlot: function(allowedDirections, slot, direction, type){\r\n\t\t\tvar next;\r\n\t\t\tvar moveDate = slot.movingDate;\r\n\r\n\t\t\tif(!moveDate){\r\n\t\t\t\tmoveDate = allowedDirections[direction];\r\n\t\t\t}\r\n\r\n\t\t\tif(!moveDate || !allowedDirections[direction]){\r\n\t\t\t\treturn slot;\r\n\t\t\t}\r\n\r\n\t\t\tif(direction){\r\n\t\t\t\tnext = this.nextSlot({start_date: slot[moveDate], section: slot.section}, direction, type, true);\r\n\r\n\t\t\t\tif(next.start_date.valueOf() == slot.start_date.valueOf()){\r\n\t\t\t\t\tnext = this.nextSlot({start_date: next.start_date, section:next.section}, direction, type, true);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tnext.movingDate = moveDate;\r\n\t\t\t}else{\r\n\t\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(slot);\r\n\t\t\t}\r\n\r\n\t\t\tvar newDates = this.extendSlotDates(slot, next, next.movingDate);\r\n\r\n\t\t\tif(newDates.end_date.valueOf() <= newDates.start_date.valueOf()){\r\n\t\t\t\tnext.movingDate = next.movingDate == \"end_date\" ? \"start_date\" : \"end_date\";\r\n\t\t\t}\r\n\t\t\tnewDates = this.extendSlotDates(slot, next, next.movingDate);\r\n\r\n\t\t\tnext.start_date = newDates.start_date;\r\n\t\t\tnext.end_date = newDates.end_date;\r\n\t\t\treturn next;\r\n\t\t},\r\n\r\n\t\textendSlotDates: function(oldSlot, newSlot, dateDirection){\r\n\t\t\tvar res = {start_date:null, end_date:null};\r\n\r\n\t\t\tif(dateDirection == \"start_date\"){\r\n\t\t\t\tres.start_date = newSlot.start_date;\r\n\t\t\t\tres.end_date = oldSlot.end_date;\r\n\t\t\t}else{\r\n\t\t\t\tres.start_date = oldSlot.start_date;\r\n\t\t\t\tres.end_date = newSlot.start_date;\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\r\n\t\t},\r\n\r\n\t\textendMonthSlot: function(slot, direction){\r\n\t\t\tvar slot = this.extendGenericSlot({\r\n\t\t\t\t\t\"up\":\"start_date\",\r\n\t\t\t\t\t\"down\":\"end_date\",\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"month\"\r\n\t\t\t);\r\n\r\n\t\t\tslot.start_date.setHours(scheduler.config.first_hour);\r\n\t\t\tslot.end_date = scheduler.date.add(slot.end_date, -1, \"day\");\r\n\t\t\tslot.end_date.setHours(scheduler.config.last_hour);\r\n\t\t\treturn slot;\r\n\t\t},\r\n\r\n\t\textendUnitsSlot: function(slot, direction){\r\n\t\t\tvar next;\r\n\r\n\t\t\tswitch (direction){\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tnext = this.extendDaySlot(slot, direction);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnext = slot;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tnext.section = slot.section;\r\n\t\t\treturn next;\r\n\t\t},\r\n\t\textendDaySlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\t\"up\":\"start_date\",\r\n\t\t\t\t\t\"down\":\"end_date\",\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"dayColumns\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\tscrollSlot: function(dir){\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tvar slot = this.nextSlot(this, dir);\r\n\t\t\tif(slot.start_date.valueOf() < state.min_date.valueOf() || slot.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tscheduler.setCurrentView(new Date(slot.start_date));\r\n\t\t\t}\r\n\r\n\t\t\tthis.moveTo(slot);\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tthis.scrollSlot(\"left\");\r\n\t\t\t},\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tthis.scrollSlot(\"right\");\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\r\n\t\t\t\tvar mode = this._getMode();\r\n\t\t\t\tif(mode == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.scrollSlot(\"down\");\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"up\": function () {\r\n\t\t\t\tvar mode = this._getMode();\r\n\t\t\t\tif(mode == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.scrollSlot(\"up\");\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"shift+down\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"down\"));\r\n\t\t\t},\r\n\t\t\t\"shift+up\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"up\"));\r\n\t\t\t},\r\n\t\t\t\"shift+right\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"right\"));\r\n\t\t\t},\r\n\t\t\t\"shift+left\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"left\"));\r\n\t\t\t},\r\n\r\n\r\n\t\t\t\"enter\": function(){\r\n\t\t\t\tvar obj = {start_date: new Date(this.start_date), end_date: new Date(this.end_date)};\r\n\r\n\t\t\t\tvar mode = scheduler.getState().mode;\r\n\t\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\r\n\t\t\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\t\t\tobj[timeline.y_property] = this.section;\r\n\t\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\t\tvar unit = scheduler._props[mode];\r\n\t\t\t\t\tobj[unit.map_to] = this.section;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler.addEventNow(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.TimeSlot.prototype.bindAll(scheduler.$keyboardNavigation.TimeSlot.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.MinicalButton = function(div, index){\r\n\tthis.container = div;\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.MinicalButton.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar container = this.container;\r\n\t\t\treturn !!container.offsetWidth;// valid if container is visible\r\n\t\t},\r\n\r\n\t\tfallback: function(){\r\n\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(defaultSlot.isValid()){\r\n\t\t\t\treturn defaultSlot;\r\n\t\t\t}else{\r\n\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t}\r\n\t\t},\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.globalNode.disable();\r\n\t\t\tthis.container.removeAttribute(\"tabindex\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tthis.container.setAttribute(\"tabindex\", \"0\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\tif(!this.index){\r\n\t\t\t\treturn this.container.querySelector(\".dhx_cal_prev_button\");\r\n\t\t\t}else{\r\n\t\t\t\treturn this.container.querySelector(\".dhx_cal_next_button\");\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"right\": function(e){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, this.index ? 0 : 1));\r\n\t\t\t},\r\n\t\t\t\"left\": function(e){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, this.index ? 0 : 1));\r\n\t\t\t},\r\n\t\t\t\"down\": function(){\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, 0, 0);\r\n\t\t\t\tif(next && !next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"enter\": function(e){\r\n\t\t\t\tthis.getNode().click();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.MinicalButton.prototype.bindAll(scheduler.$keyboardNavigation.MinicalButton.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.MinicalCell = function(div, row, col){\r\n\tthis.container = div;\r\n\tthis.row = row || 0;\r\n\tthis.col = col || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.MinicalCell.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar grid = this._getGrid();\r\n\t\t\treturn !!(grid[this.row] && grid[this.row][this.col]);\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\tvar row = this.row;\r\n\t\t\tvar col = this.col;\r\n\t\t\tvar grid = this._getGrid();\r\n\t\t\tif(!grid[row]){\r\n\t\t\t\trow = 0;\r\n\t\t\t}\r\n\t\t\tvar dir = true;\r\n\t\t\tif(row > grid.length / 2){\r\n\t\t\t\tdir = false;\r\n\t\t\t}\r\n\r\n\t\t\tif(!grid[row]){\r\n\t\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t\tif(defaultSlot.isValid()){\r\n\t\t\t\t\treturn defaultSlot;\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(dir){\r\n\t\t\t\tfor(var c = col; grid[row] && c < grid[row].length; c++){\r\n\t\t\t\t\tif(!grid[row][c] && c == grid[row].length - 1){\r\n\t\t\t\t\t\trow++;\r\n\t\t\t\t\t\tcol = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(grid[row][c]){\r\n\t\t\t\t\t\treturn new scheduler.$keyboardNavigation.MinicalCell(this.container, row, c);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tfor(var c = col; grid[row] && c < grid[row].length; c--){\r\n\t\t\t\t\tif(!grid[row][c] && !c){\r\n\t\t\t\t\t\trow--;\r\n\t\t\t\t\t\tcol = grid[row].length - 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(grid[row][c]){\r\n\t\t\t\t\t\treturn new scheduler.$keyboardNavigation.MinicalCell(this.container, row, c);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn new scheduler.$keyboardNavigation.MinicalButton(this.container, 0);\r\n\t\t},\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.globalNode.disable();\r\n\r\n\t\t\tthis.container.removeAttribute(\"tabindex\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tthis.container.setAttribute(\"tabindex\", \"0\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\t\t_getNode: function(row, col){\r\n\t\t\treturn this.container.querySelector(\".dhx_year_body tr:nth-child(\"+(row + 1) + \") td:nth-child(\"+(col + 1)+\")\");\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\treturn this._getNode(this.row, this.col);\r\n\t\t},\r\n\r\n\t\t_getGrid: function(){\r\n\t\t\tvar rows = this.container.querySelectorAll(\".dhx_year_body tr\");\r\n\t\t\tvar grid = [];\r\n\t\t\tfor(var i = 0; i < rows.length; i++){\r\n\t\t\t\tgrid[i] = [];\r\n\t\t\t\tvar row = rows[i];\r\n\t\t\t\tvar cells = row.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var c = 0; c < cells.length; c++){\r\n\t\t\t\t\tvar cell = cells[c];\r\n\t\t\t\t\tvar enabled = true;\r\n\t\t\t\t\tvar css = scheduler._getClassName(cell);\r\n\t\t\t\t\tif(css.indexOf(\"dhx_after\") > -1 || css.indexOf(\"dhx_before\") > -1 || css.indexOf(\"dhx_scale_ignore\") > -1){\r\n\t\t\t\t\t\tenabled = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tgrid[i][c] = enabled;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn grid;\r\n\t\t},\r\n\r\n\r\n\t\tkeys: {\r\n\t\t\t\"right\": function(e){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row;\r\n\t\t\t\tvar newCol = this.col + 1;\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tif(grid[newRow + 1]){\r\n\t\t\t\t\t\tnewRow = newRow + 1;\r\n\t\t\t\t\t\tnewCol = 0;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnewCol = this.col;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"left\": function(e){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row;\r\n\t\t\t\tvar newCol = this.col - 1;\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tif(grid[newRow - 1]){\r\n\t\t\t\t\t\tnewRow = newRow - 1;\r\n\t\t\t\t\t\tnewCol = grid[newRow].length - 1;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnewCol = this.col;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"down\": function(){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row + 1;\r\n\t\t\t\tvar newCol = this.col;\r\n\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tnewRow = this.row;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"up\": function(){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row - 1;\r\n\t\t\t\tvar newCol = this.col;\r\n\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tvar index = 0;\r\n\t\t\t\t\tif(this.col > grid[this.row].length / 2){\r\n\t\t\t\t\t\tindex = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, index));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.moveTo(next);\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\t\t\t\"enter\": function(e){\r\n\t\t\t\tthis.getNode().querySelector(\".dhx_month_head\").click();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.MinicalCell.prototype.bindAll(scheduler.$keyboardNavigation.MinicalCell.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.DataArea = function(index){\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.DataArea.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\tgetNode: function(index){\r\n\t\t\treturn scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t},\r\n\r\n\t\t_handlers:null,\r\n\r\n\t\tisValid: function(){\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tfallback:function(){\r\n\t\t\treturn this;\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"up,down,right,left\":function(){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.DataArea.prototype.bindAll(scheduler.$keyboardNavigation.DataArea.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\n\r\n\r\n(function(){\r\n\tvar modalsStack = [];\r\n\r\n\tfunction isModal(){\r\n\t\treturn !!(modalsStack.length);\r\n\t}\r\n\r\n\tfunction isChildOf(child, parent){\r\n\t\twhile(child && child != parent){\r\n\t\t\tchild = child.parentNode;\r\n\t\t}\r\n\r\n\t\treturn !!(child == parent);\r\n\t}\r\n\r\n\tfunction afterPopup(box){\r\n\t\tsetTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif(!isModal() && !(isChildOf(document.activeElement, scheduler.$container))) {\r\n\t\t\t\tscheduler.focus();\r\n\t\t\t}\r\n\t\t}, 1);\r\n\t}\r\n\tfunction startModal(box){\r\n\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\tscheduler.event(box, \"keydown\", trapFocus);\r\n\t\tmodalsStack.push(box);\r\n\t\t//scheduler.$keyboardNavigation.dispatcher.disable();\r\n\t}\r\n\r\n\tfunction endModal(){\r\n\t\tvar box = modalsStack.pop();\r\n\t\tif(box) {\r\n\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t}\r\n\t\tafterPopup(box);\r\n\r\n\t}\r\n\r\n\tfunction isTopModal(box){\r\n\t//\tif(dhtmlx._modalsStack.length){\r\n\t//\t\treturn box == dhtmlx._modalsStack[dhtmlx._modalsStack.length - 1];\r\n\t//\t}else{\r\n\t\t\treturn box == modalsStack[modalsStack.length - 1];\r\n\t//\t}\r\n\r\n\t}\r\n\r\n\tfunction trapFocus(event){\r\n\t\tvar event = event || window.event;\r\n\t\tvar target = event.currentTarget;\r\n\t\tif(!isTopModal(target)) return;\r\n\r\n\t\tscheduler.$keyboardNavigation.trapFocus(target, event);\r\n\t}\r\n\r\n\tfunction traceLightbox(){\r\n\t\tstartModal(scheduler.getLightbox());\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onLightbox\", traceLightbox);\r\n\tscheduler.attachEvent(\"onAfterLightbox\", endModal);\r\n\r\n\tscheduler.attachEvent(\"onAfterQuickInfo\", function(){afterPopup();});\r\n\r\n\tif(!scheduler._keyNavMessagePopup) {\r\n\t\tscheduler._keyNavMessagePopup = true;\r\n\r\n\t\tvar focusElement = null;\r\n\t\tvar backupFocus = null;\r\n\t\tconst modalsStack = [];\r\n\t\tscheduler.attachEvent(\"onMessagePopup\", function(box){\r\n\t\t\tfocusElement = document.activeElement;\r\n\t\t\tbackupFocus = focusElement;\r\n\r\n\t\t\twhile(backupFocus && scheduler._getClassName(backupFocus).indexOf(\"dhx_cal_data\") < 0){\r\n\t\t\t\tbackupFocus = backupFocus.parentNode;\r\n\t\t\t}\r\n\t\t\tif(backupFocus){\r\n\t\t\t\tbackupFocus = backupFocus.parentNode;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t\tscheduler.event(box, \"keydown\", trapFocus);\r\n\t\t\tmodalsStack.push(box);\r\n\t\t});\r\n\r\n\r\n\t\tscheduler.attachEvent(\"onAfterMessagePopup\", function () {\r\n\t\t\tvar box = modalsStack.pop();\r\n\t\t\tif(box) {\r\n\t\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t\t}\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tvar currentTarget = document.activeElement;\r\n\t\t\t\twhile(currentTarget && scheduler._getClassName(currentTarget).indexOf(\"dhx_cal_light\") < 0){\r\n\t\t\t\t\tcurrentTarget = currentTarget.parentNode;\r\n\t\t\t\t}\r\n\t\t\t\tif(currentTarget)\r\n\t\t\t\t\treturn;\r\n\r\n\r\n\t\t\t\tif(focusElement && focusElement.parentNode){\r\n\t\t\t\t\tfocusElement.focus();\r\n\r\n\t\t\t\t}else if(backupFocus && backupFocus.parentNode){\r\n\t\t\t\t\tbackupFocus.focus();\r\n\t\t\t\t}\r\n\t\t\t\tfocusElement = null;\r\n\t\t\t\tbackupFocus = null;\r\n\r\n\t\t\t}, 1);\r\n\t\t});\r\n\t}\r\n\r\n\tscheduler.$keyboardNavigation.isModal = isModal;\r\n\r\n\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.dispatcher = {\r\n\tisActive: false,\r\n\tactiveNode: null,\r\n\tglobalNode: new scheduler.$keyboardNavigation.SchedulerNode(),\r\n\r\n\tkeepScrollPosition: function (callback) {\r\n\t\tvar top, left;\r\n\r\n\t\tvar scrollable = scheduler.$container.querySelector(\".dhx_timeline_scrollable_data\");\r\n\t\tif(!scrollable){\r\n\t\t\tscrollable = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t}\r\n\r\n\t\tif(scrollable){\r\n\t\t\ttop = scrollable.scrollTop;\r\n\t\t\tleft = scrollable.scrollLeft;\r\n\t\t}\r\n\r\n\t\tcallback();\r\n\r\n\t\tif(scrollable){\r\n\t\t\tscrollable.scrollTop = top;\r\n\t\t\tscrollable.scrollLeft = left;\r\n\t\t}\r\n\t},\r\n\tenable: function(){\r\n\t\tif(!scheduler.$container){\r\n\t\t\t// do nothing if not initialized\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.isActive = true;\r\n\t\tvar self = this;\r\n\t\tthis.keepScrollPosition(function () {\r\n\t\t\tself.globalNode.enable();\r\n\t\t\tself.setActiveNode(self.getActiveNode());\r\n\t\t});\r\n\t},\r\n\r\n\tdisable: function(){\r\n\t\tthis.isActive = false;\r\n\t\tthis.globalNode.disable();\r\n\t},\r\n\r\n\tisEnabled: function(){\r\n\t\treturn !!this.isActive;\r\n\t},\r\n\r\n\tgetDefaultNode: function(){\r\n\t\treturn this.globalNode.getDefaultNode();\r\n\t},\r\n\r\n\tsetDefaultNode: function() {\r\n\t\tthis.setActiveNode(this.getDefaultNode());\r\n\t},\r\n\r\n\tgetActiveNode: function(){\r\n\t\tvar node = this.activeNode;\r\n\t\tif(node && !node.isValid()){\r\n\t\t\tnode = node.fallback();\r\n\t\t}\r\n\t\treturn node;\r\n\t},\r\n\r\n\tfocusGlobalNode: function(){\r\n\t\tthis.blurNode(this.globalNode);\r\n\t\tthis.focusNode(this.globalNode);\r\n\t},\r\n\r\n\tsetActiveNode: function(el){\r\n\t\tif(!el || !el.isValid())\r\n\t\t\treturn;\r\n\r\n\t\tif(this.activeNode){\r\n\t\t\tif(this.activeNode.compareTo(el)){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(this.isEnabled()){\r\n\t\t\tthis.blurNode(this.activeNode);\r\n\t\t\tthis.activeNode = el;\r\n\t\t\tthis.focusNode(this.activeNode);\r\n\t\t}\r\n\t},\r\n\r\n\tfocusNode: function(el){\r\n\t\tif(el && el.focus){\r\n\t\t\tel.focus();\r\n\t\t\tif(el.getNode && document.activeElement != el.getNode()){\r\n\t\t\t\tthis.setActiveNode(new scheduler.$keyboardNavigation.DataArea());\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tblurNode: function(el){\r\n\t\tif(el && el.blur){\r\n\t\t\tel.blur();\r\n\t\t}\r\n\t},\r\n\r\n\tgetInlineEditor: function(id){\r\n\t\tvar editor = scheduler.$container.querySelector(\".dhx_cal_editor[\"+scheduler.config.event_attribute+\"='\"+id+\"'] textarea\");\r\n\t\tif(editor && editor.offsetWidth){\r\n\t\t\t// if exists and visible\r\n\t\t\treturn editor;\r\n\t\t}\r\n\t\treturn null;\r\n\t},\r\n\r\n\tkeyDownHandler: function (e) {\r\n\r\n\t\tif(e.defaultPrevented){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar activeElement = this.getActiveNode();\r\n\r\n\t\tif(scheduler.$keyboardNavigation.isModal() &&\r\n\t\t\t!(activeElement && activeElement.container && scheduler.utils.dom.locateCss({target:activeElement.container}, \"dhx_minical_popup\", false)))\r\n\t\t\treturn;\r\n\r\n\t\tif(scheduler.getState().editor_id && this.getInlineEditor(scheduler.getState().editor_id))\r\n\t\t\treturn;\r\n\r\n\t\tif (!this.isEnabled())\r\n\t\t\treturn;\r\n\r\n\t\te = e || window.event;\r\n\r\n\t\tvar schedulerNode = this.globalNode;\r\n\r\n\t\tvar command = scheduler.$keyboardNavigation.shortcuts.getCommandFromEvent(e);\r\n\r\n\t\tif(!activeElement){\r\n\t\t\tthis.setDefaultNode();\r\n\t\t}else if(activeElement.findHandler(command)){\r\n\t\t\tactiveElement.doAction(command, e);\r\n\t\t}else if(schedulerNode.findHandler(command)){\r\n\t\t\tschedulerNode.doAction(command, e);\r\n\t\t}\r\n\r\n\t},\r\n\r\n\t_timeout: null,\r\n\tdelay: function(callback, delay){\r\n\r\n\t\tclearTimeout(this._timeout);\r\n\t\tthis._timeout = setTimeout(callback, delay || 1);\r\n\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n//Initial idea and implementation by Steve MC\r\nscheduler._temp_key_scope = function (){\r\n\r\n\tscheduler.config.key_nav = true;\r\n\r\n\tscheduler.$keyboardNavigation._pasteDate = null; // used for copy and paste operations\r\n\tscheduler.$keyboardNavigation._pasteSection = null; // used for copy and paste operations\r\n\tvar isCopy = null;\r\n\r\n\tvar pos = {};\r\n\r\n\tif(!document.body){\r\n\t\tscheduler.event(window, \"load\", function(){\r\n\t\t\tscheduler.event(document.body, \"mousemove\", trackMousePosition);\r\n\t\t});\r\n\t}else{\r\n\t\tscheduler.event(document.body, \"mousemove\", trackMousePosition);\r\n\t}\r\n\r\n\tfunction trackMousePosition(event){\r\n\t\tevent = event || window.event;\r\n\t\tpos.x = event.clientX;\r\n\t\tpos.y = event.clientY;\r\n\t}\r\n\tfunction currentTarget(){\r\n\r\n\t\tvar mousePointer = false;\r\n\t\tvar keyNavPointer = false;\r\n\r\n\t\tvar target = document.elementFromPoint(pos.x, pos.y);\r\n\t\twhile(target && target != scheduler._obj){\r\n\t\t\ttarget = target.parentNode;\r\n\t\t}\r\n\t\tmousePointer = !!(target == scheduler._obj);\r\n\r\n\t\tkeyNavPointer = scheduler.$keyboardNavigation.dispatcher.isEnabled();\r\n\r\n\t\treturn mousePointer || keyNavPointer;\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onMouseMove\", function(id,e){\r\n\t\tvar state = scheduler.getState();\r\n\r\n\t\t// make sure scheduler is fully initialized before calling scheduler.getActionData\r\n\t\tif(!(state.mode && state.min_date)){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar position = scheduler.getActionData(e);\r\n\t\tscheduler.$keyboardNavigation._pasteDate = position.date;\r\n\t\tscheduler.$keyboardNavigation._pasteSection = position.section;\r\n\t});\r\n\r\n\tfunction clear_event_after(ev){\r\n\t\tdelete ev.rec_type; delete ev.rec_pattern;\r\n\t\tdelete ev.event_pid; delete ev.event_length;\r\n\t}\r\n\r\n\tfunction copyEvent(ev){\r\n\t\treturn scheduler._lame_copy({}, ev);\r\n\t}\r\n\r\n\tscheduler._make_pasted_event = function(ev){\r\n\t\tvar date = scheduler.$keyboardNavigation._pasteDate;\r\n\t\tvar section = scheduler.$keyboardNavigation._pasteSection;\r\n\r\n\t\tvar event_duration = ev.end_date-ev.start_date;\r\n\r\n\t\tvar copy = copyEvent(ev);\r\n\t\tclear_event_after(copy);\r\n\t\tcopy.start_date = new Date(date);\r\n\t\tcopy.end_date = new Date(copy.start_date.valueOf() + event_duration);\r\n\r\n\t\tif(section){\r\n\t\t\tvar property = scheduler._get_section_property();\r\n\t\t\t// GS-2527: if the event has multiple sections, it will be inserted into the initial sections.\r\n\t\t\tif(scheduler.config.multisection && ev[property] && scheduler.isMultisectionEvent && scheduler.isMultisectionEvent(ev)) \r\n\t\t\t\tcopy[property] = ev[property]; // save initial set of resources for multisection view\r\n\t\t\telse\r\n\t\t\t\tcopy[property] = section;\r\n\t\t}\r\n\t\treturn copy;\r\n\t};\r\n\tscheduler._do_paste = function(is_copy, modified_ev, original_ev){\r\n\t\tif(scheduler.callEvent(\"onBeforeEventPasted\", [is_copy, modified_ev, original_ev]) === false){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tscheduler.addEvent(modified_ev);\r\n\t\tscheduler.callEvent(\"onEventPasted\", [is_copy, modified_ev, original_ev]);\r\n\t};\r\n\r\n\tscheduler._is_key_nav_active = function(){\r\n\t\tif(this._is_initialized() && !this._is_lightbox_open() && this.config.key_nav){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\r\n\tfunction getSelectedEvent(){\r\n\t\tvar node = scheduler.$keyboardNavigation.dispatcher.getActiveNode();\r\n\t\tif(node && node.eventId) return node.eventId;\r\n\t\treturn scheduler._select_id;\r\n\t}\r\n\r\n\tscheduler.event(document, \"keydown\", function(e){\r\n\t\t// compatibility fix - scheduler focus on ctrl+v on mouse hover\r\n\t\tif(((e.ctrlKey || e.metaKey) && e.keyCode == 86) && scheduler._buffer_event && !scheduler.$keyboardNavigation.dispatcher.isEnabled()) {\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.isActive = currentTarget();\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler._key_nav_copy_paste = function(e){\r\n\t\tif(!scheduler._is_key_nav_active()) return true;\r\n\r\n\t\tif (e.keyCode == 37 || e.keyCode == 39) { // Left, Right arrows\r\n\t\t\te.cancelBubble = true;\r\n\r\n\t\t\tvar next = scheduler.date.add(scheduler._date,(e.keyCode == 37 ? -1 : 1 ),scheduler._mode);\r\n\t\t\tscheduler.setCurrentView(next);\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tvar select_id = getSelectedEvent();\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 67) { // CTRL+C\r\n\t\t\tif (select_id) {\r\n\t\t\t\tscheduler._buffer_event = copyEvent(scheduler.getEvent(select_id));\r\n\t\t\t\tisCopy = true;\r\n\t\t\t\tscheduler.callEvent(\"onEventCopied\", [scheduler.getEvent(select_id)]);\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 88) { // CTRL+X\r\n\t\t\tif (select_id) {\r\n\t\t\t\tisCopy = false;\r\n\t\t\t\tvar ev = scheduler._buffer_event = copyEvent(scheduler.getEvent(select_id));\r\n\r\n\t\t\t\tscheduler.updateEvent(ev.id);\r\n\t\t\t\tscheduler.callEvent(\"onEventCut\", [ev]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 86 && currentTarget(e)) { // CTRL+V\r\n\t\t\tvar ev = scheduler._buffer_event ? scheduler.getEvent(scheduler._buffer_event.id) : scheduler._buffer_event;\r\n\t\t\tev = ev || scheduler._buffer_event;\r\n\r\n\t\t\tif (ev) {\r\n\t\t\t\tvar new_ev = scheduler._make_pasted_event(ev);\r\n\t\t\t\tif (isCopy) {\r\n\t\t\t\t\tnew_ev.id = scheduler.uid();\r\n\t\t\t\t\tscheduler._do_paste(isCopy, new_ev, ev);\r\n\t\t\t\t}\r\n\t\t\t\telse { // cut operation\r\n\t\t\t\t\tvar res = scheduler.callEvent(\"onBeforeEventChanged\",[new_ev, e, false, ev]);\r\n\t\t\t\t\tif (res) {\r\n\t\t\t\t\t\tscheduler._do_paste(isCopy, new_ev, ev);\r\n\t\t\t\t\t\tisCopy = true; // switch to copy after first paste operation\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t};\r\n};\r\nscheduler._temp_key_scope();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.attachSchedulerHandlers = function(){\r\n\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\tvar keyDownHandler = function(e){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\r\n\t\treturn dispatcher.keyDownHandler(e);\r\n\t};\r\n\r\n\tvar focusHandler = function () {\r\n\t\tdispatcher.keepScrollPosition(function () {\r\n\t\t\tdispatcher.focusGlobalNode();\r\n\t\t});\r\n\t};\r\n\r\n\tvar waitCall;\r\n\tscheduler.attachEvent(\"onDataRender\", function(){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\t\tif(!(dispatcher.isEnabled() && !scheduler.getState().editor_id)) return;\r\n\r\n\t\tclearTimeout(waitCall);\r\n\t\twaitCall = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif(!dispatcher.isEnabled())\r\n\t\t\t\tdispatcher.enable();\r\n\t\t\treFocusActiveNode();\r\n\t\t});\r\n\t});\r\n\r\n\tvar reFocusActiveNode = function(){\r\n\t\tif(!dispatcher.isEnabled())\r\n\t\t\treturn;\r\n\r\n\t\tvar activeNode = dispatcher.getActiveNode();\r\n\t\tif(!activeNode)\r\n\t\t\treturn;\r\n\r\n\t\tif(!activeNode.isValid()){\r\n\t\t\tactiveNode = activeNode.fallback();\r\n\t\t}\r\n\r\n\t\tif(!activeNode || activeNode instanceof scheduler.$keyboardNavigation.MinicalButton || activeNode instanceof scheduler.$keyboardNavigation.MinicalCell)\r\n\t\t\treturn;\r\n\r\n\t\tdispatcher.keepScrollPosition(function () {\r\n\t\t\tactiveNode.focus(true);\r\n\t\t});\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\tvar container = scheduler.$container;\r\n\t\tscheduler.eventRemove(document, \"keydown\", keyDownHandler);\r\n\t\tscheduler.eventRemove(container, \"mousedown\", mousedownHandler);\r\n\t\tscheduler.eventRemove(container, \"focus\", focusHandler);\r\n\r\n\r\n\t\tif(scheduler.config.key_nav){\r\n\r\n\t\t\tscheduler.event(document, \"keydown\", keyDownHandler);\r\n\t\t\tscheduler.event(container, \"mousedown\", mousedownHandler);\r\n\t\t\tscheduler.event(container, \"focus\", focusHandler);\r\n\r\n\t\t\tcontainer.setAttribute(\"tabindex\", \"0\");\r\n\r\n\t\t}else{\r\n\t\t\tcontainer.removeAttribute(\"tabindex\");\r\n\t\t}\r\n\t});\r\n\r\n\tfunction mousedownHandler(e){\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\r\n\t\tconst view = scheduler.getView();\r\n\t\tlet dataAreaClick = false;\r\n\t\tif (scheduler.getState().mode === \"month\") {\r\n\t\t\tdataAreaClick = scheduler.$keyboardNavigation.isChildOf(e.target || e.srcElement, scheduler.$container.querySelector(\".dhx_cal_month_table\"));\r\n\t\t} else if (view && view.layout === \"timeline\") {\r\n\t\t\tdataAreaClick = scheduler.$keyboardNavigation.isChildOf(e.target || e.srcElement, scheduler.$container.querySelector(\".dhx_timeline_data_col\"));\r\n\t\t} else {\r\n\t\t\tconst listOfScales = scheduler.$container.querySelectorAll(\".dhx_scale_holder\");\r\n\t\t\tconst arrOfScales = Array.from(listOfScales);\r\n\t\t\tdataAreaClick = arrOfScales.some(scale => scale === e.target.parentNode);\r\n\t\t}\r\n\r\n\t\tvar pos = scheduler.getActionData(e);\r\n\r\n\t\tvar focusNode;\r\n\t\tif(scheduler._locate_event(e.target || e.srcElement)){\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.Event(scheduler._locate_event(e.target || e.srcElement));\r\n\t\t}else if(dataAreaClick){\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(pos.date && dataAreaClick){\r\n\t\t\t\tfocusNode = focusNode.nextSlot(new scheduler.$keyboardNavigation.TimeSlot(pos.date, null, pos.section));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(focusNode) {\r\n\t\t\tif (!dispatcher.isEnabled()) {\r\n\t\t\t\tdispatcher.activeNode = focusNode;\r\n\r\n\t\t\t} else {\r\n\t\t\t\tif (pos.date && dataAreaClick) {\r\n\t\t\t\t\tdispatcher.delay(function () {\r\n\t\t\t\t\t\tdispatcher.setActiveNode(focusNode);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction focusEvent(evNode){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\t\tif(!dispatcher.isEnabled()) return;\r\n\r\n\r\n\t\tvar prevState = evNode;\r\n\t\tvar focusNode = new scheduler.$keyboardNavigation.Event(prevState.eventId);\r\n\t\tif(!focusNode.isValid()){\r\n\t\t\tvar lastStart = focusNode.start || prevState.start;\r\n\t\t\tvar lastEnd = focusNode.end || prevState.end;\r\n\t\t\tvar lastSection = focusNode.section || prevState.section;\r\n\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot(lastStart, lastEnd, lastSection);\r\n\t\t\tif(!focusNode.isValid()){\r\n\t\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdispatcher.setActiveNode(focusNode);\r\n\t\tvar node = dispatcher.getActiveNode();\r\n\t\tif(node && node.getNode && document.activeElement != node.getNode()){\r\n\t\t\tdispatcher.focusNode(dispatcher.getActiveNode());\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tvar updateEvent = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id){\r\n\t\tvar res = updateEvent.apply(this, arguments);\r\n\t\tif(scheduler.config.key_nav && dispatcher.isEnabled()){\r\n\t\t\tif(scheduler.getState().select_id == id){\r\n\t\t\t\tvar element = new scheduler.$keyboardNavigation.Event(id);\r\n\r\n\t\t\t\tif(!scheduler.getState().lightbox_id){\r\n\t\t\t\t\tfocusEvent(element);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onEventDeleted\", function(id) {\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\t\tif(dispatcher.isEnabled()){\r\n\t\t\tvar activeNode = dispatcher.getActiveNode();\r\n\t\t\tif(activeNode.eventId == id){\r\n\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onClearAll\", function(){\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\t\tif(dispatcher.isEnabled()){\r\n\t\t\tif(dispatcher.getActiveNode() instanceof scheduler.$keyboardNavigation.Event){\r\n\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation._minicalendars = [];\r\n\r\nscheduler.$keyboardNavigation.isMinical = function(node){\r\n\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\tif(this.isChildOf(node, minicalendars[i]))\r\n\t\t\treturn true;\r\n\t}\r\n\treturn false;\r\n};\r\n\r\nscheduler.$keyboardNavigation.isChildOf = function(child, parent){\r\n\twhile(child && child !== parent){\r\n\t\tchild = child.parentNode;\r\n\t}\r\n\r\n\treturn !!(child === parent);\r\n};\r\n\r\nscheduler.$keyboardNavigation.patchMinicalendar = function(){\r\n\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\tfunction focusMinical(e){\r\n\t\tvar target = e.target;\r\n\r\n\t\tdispatcher.enable();\r\n\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.MinicalButton(target, 0));\r\n\t}\r\n\r\n\tfunction minicalClick(e){\r\n\t\tvar target = e.target || e.srcElement;\r\n\r\n\t\tvar prev = scheduler.utils.dom.locateCss(e, \"dhx_cal_prev_button\", false);\r\n\t\tvar next = scheduler.utils.dom.locateCss(e, \"dhx_cal_next_button\", false);\r\n\t\tvar cell = scheduler.utils.dom.locateCss(e, \"dhx_year_body\", false);\r\n\r\n\t\tvar rowIndex = 0;\r\n\t\tvar cellIndex = 0;\r\n\t\tif(cell){\r\n\t\t\tvar tr;\r\n\t\t\tvar td;\r\n\t\t\tvar current = target;\r\n\t\t\twhile(current && current.tagName.toLowerCase() != \"td\"){\r\n\t\t\t\tcurrent = current.parentNode;\r\n\t\t\t}\r\n\t\t\tif(current){\r\n\t\t\t\ttd = current;\r\n\t\t\t\ttr = td.parentNode;\r\n\t\t\t}\r\n\r\n\t\t\tif(tr && td){\r\n\t\t\t\tvar rows = tr.parentNode.querySelectorAll(\"tr\");\r\n\t\t\t\tfor(var i = 0; i < rows.length; i++){\r\n\t\t\t\t\tif(rows[i] == tr){\r\n\t\t\t\t\t\trowIndex = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tvar cells = tr.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\t\t\tif(cells[i] == td){\r\n\t\t\t\t\t\tcellIndex = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar root = e.currentTarget;\r\n\t\tdispatcher.delay(function(){\r\n\t\t\tif(prev || next || cell){\r\n\r\n\t\t\t\tvar element;\r\n\t\t\t\tif(prev){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalButton(root, 0);\r\n\t\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.MinicalButton(root, 0));\r\n\t\t\t\t}else if(next){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalButton(root, 1);\r\n\t\t\t\t}else if(cell){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalCell(root, rowIndex, cellIndex);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(element){\r\n\r\n\t\t\t\t\tdispatcher.enable();\r\n\t\t\t\t\tif(element.isValid()){\r\n\t\t\t\t\t\tdispatcher.activeNode = null;\r\n\t\t\t\t\t\tdispatcher.setActiveNode(element);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t}\r\n\r\n\tif(scheduler.renderCalendar){\r\n\t\tvar renderMinical = scheduler.renderCalendar;\r\n\t\tscheduler.renderCalendar = function(){\r\n\t\t\tvar cal = renderMinical.apply(this, arguments);\r\n\t\t\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\r\n\t\t\tscheduler.eventRemove(cal, \"click\", minicalClick);\r\n\t\t\tscheduler.event(cal, \"click\", minicalClick);\r\n\r\n\t\t\tscheduler.eventRemove(cal, \"focus\", focusMinical);\r\n\t\t\tscheduler.event(cal, \"focus\", focusMinical);\r\n\r\n\t\t\tvar added = false;\r\n\t\t\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\t\t\tif(minicalendars[i] == cal){\r\n\t\t\t\t\tadded = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(!added)\r\n\t\t\t\tminicalendars.push(cal);\r\n\r\n\t\t\tif(dispatcher.isEnabled()){\r\n\t\t\t\tvar node = dispatcher.getActiveNode();\r\n\t\t\t\tif(node && node.container == cal){\r\n\t\t\t\t\tdispatcher.focusNode(node);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcal.setAttribute(\"tabindex\", \"0\");\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tcal.setAttribute(\"tabindex\", \"0\");\r\n\t\t\t}\r\n\t\t\treturn cal;\r\n\t\t};\r\n\t}\r\n\r\n\tif(scheduler.destroyCalendar){\r\n\t\tvar destroyMinical = scheduler.destroyCalendar;\r\n\t\tscheduler.destroyCalendar = function(cal, force){\r\n\t\t\tcal = cal || (scheduler._def_count ? scheduler._def_count.firstChild : null);\r\n\t\t\tvar res = destroyMinical.apply(this, arguments);\r\n\r\n\t\t\tif(!cal || !cal.parentNode){\r\n\t\t\t\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\t\t\t\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\t\t\t\tif(minicalendars[i] == cal){\r\n\t\t\t\t\t\tscheduler.eventRemove(minicalendars[i], \"focus\", focusMinical);\r\n\t\t\t\t\t\tminicalendars.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn res;\r\n\t\t};\r\n\t}\r\n};\r\n\r\n}","import keyboard_shortcuts from \"./keyboard_navigation/common/keyboard_shortcuts\";\r\nimport eventhandler from \"./keyboard_navigation/common/eventhandler\";\r\nimport trap_modal_focus from \"./keyboard_navigation/common/trap_modal_focus\";\r\nimport marker from \"./keyboard_navigation/marker\";\r\nimport scheduler_node from \"./keyboard_navigation/elements/scheduler_node\";\r\nimport nav_node from \"./keyboard_navigation/elements/nav_node\";\r\nimport header_cell from \"./keyboard_navigation/elements/header_cell\";\r\nimport event from \"./keyboard_navigation/elements/event\";\r\nimport time_slot from \"./keyboard_navigation/elements/time_slot\";\r\nimport minical_button from \"./keyboard_navigation/elements/minical_button\";\r\nimport minical_cell from \"./keyboard_navigation/elements/minical_cell\";\r\nimport data_area from \"./keyboard_navigation/elements/data_area\";\r\nimport modals from \"./keyboard_navigation/modals\";\r\nimport core from \"./keyboard_navigation/core\";\r\nimport key_nav_legacy from \"./keyboard_navigation/key_nav_legacy\";\r\n\r\n\r\nimport scheduler_handlers from \"./keyboard_navigation/scheduler_handlers\";\r\nimport minical_handlers from \"./keyboard_navigation/minical_handlers\";\r\n\r\nexport default function(scheduler){\r\n\t\tscheduler.config.key_nav = true;\r\n\t\tscheduler.config.key_nav_step = 30;\r\n\t\tscheduler.addShortcut = function(shortcut, handler, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tscopeObject.prototype.bind(shortcut, handler);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.getShortcutHandler = function(shortcut, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tvar commands = scheduler.$keyboardNavigation.shortcuts.parse(shortcut);\r\n\t\t\t\tif(commands.length){\r\n\t\t\t\t\treturn scopeObject.prototype.findHandler(commands[0]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.removeShortcut = function(shortcut, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tscopeObject.prototype.unbind(shortcut);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.focus = function(){\r\n\t\t\tif(!scheduler.config.key_nav){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar disp = scheduler.$keyboardNavigation.dispatcher;\r\n\t\t\tdisp.enable();\r\n\t\t\tvar activeNode = disp.getActiveNode();\r\n\t\t\tif(!activeNode || activeNode instanceof scheduler.$keyboardNavigation.MinicalButton || activeNode instanceof scheduler.$keyboardNavigation.MinicalCell){\r\n\t\t\t\tdisp.setDefaultNode();\r\n\t\t\t}else{\r\n\t\t\t\tdisp.focusNode(disp.getActiveNode());\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfunction getScope(mode){\r\n\t\t\tvar scopes = {\r\n\t\t\t\t\"minicalButton\":scheduler.$keyboardNavigation.MinicalButton,\r\n\t\t\t\t\"minicalDate\":scheduler.$keyboardNavigation.MinicalCell,\r\n\t\t\t\t\"scheduler\":scheduler.$keyboardNavigation.SchedulerNode,\r\n\t\t\t\t\"dataArea\": scheduler.$keyboardNavigation.DataArea,\r\n\t\t\t\t\"timeSlot\": scheduler.$keyboardNavigation.TimeSlot,\r\n\t\t\t\t\"event\": scheduler.$keyboardNavigation.Event\r\n\t\t\t};\r\n\r\n\t\t\tvar searchMap = {};\r\n\t\t\tfor(var i in scopes)\r\n\t\t\t\tsearchMap[i.toLowerCase()] = scopes[i];\r\n\r\n\t\t\tmode = (mode + \"\").toLowerCase();\r\n\r\n\t\t\treturn searchMap[mode] || scopes.scheduler;\r\n\t\t}\r\n\r\n\t\tscheduler.$keyboardNavigation = {};\r\n\r\n\t\tscheduler._compose = function(){\r\n\t\t\tvar parts = Array.prototype.slice.call(arguments, 0);\r\n\t\t\tvar res = {};\r\n\t\t\tfor(var i = 0; i < parts.length; i++){\r\n\t\t\t\tvar obj = parts[i];\r\n\t\t\t\tif(typeof obj == \"function\"){\r\n\t\t\t\t\tobj = new obj();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor(var p in obj){\r\n\t\t\t\t\tres[p] = obj[p];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\t\t};\r\n\r\n\t\tkeyboard_shortcuts(scheduler);\r\n\t\teventhandler(scheduler);\r\n\t\ttrap_modal_focus(scheduler);\r\n\t\tmarker(scheduler);\r\n\t\tscheduler_node(scheduler);\r\n\t\tnav_node(scheduler);\r\n\t\theader_cell(scheduler);\r\n\t\tevent(scheduler);\r\n\t\ttime_slot(scheduler);\r\n\t\tminical_button(scheduler);\r\n\t\tminical_cell(scheduler);\r\n\t\tdata_area(scheduler);\r\n\t\tmodals(scheduler);\r\n\t\tcore(scheduler);\r\n\t\tkey_nav_legacy(scheduler);\r\n\r\n\t\t(function(){\r\n\t\t\tscheduler_handlers(scheduler);\r\n\t\t\tminical_handlers(scheduler);\r\n\r\n\t\t\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\t\t\tscheduler.$keyboardNavigation.attachSchedulerHandlers();\r\n\r\n\t\t\tif(scheduler.renderCalendar){\r\n\t\t\t\t// if minical ext loaded before key nav ext - patch it now\r\n\t\t\t\tscheduler.$keyboardNavigation.patchMinicalendar();\r\n\t\t\t}else{\r\n\t\t\t\t// otherwise - wait until everything is loaded and try again\r\n\t\t\t\tvar attachOnce = scheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\t\t\t\tscheduler.detachEvent(attachOnce);\r\n\t\t\t\t\tscheduler.$keyboardNavigation.patchMinicalendar();\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\tfunction isSchedulerSelected(){\r\n\t\t\t\tif(!scheduler.config.key_nav) return;\r\n\r\n\t\t\t\tvar enable;\r\n\t\t\t\tvar focusElement = document.activeElement;\r\n\t\t\t\t// halt key nav when focus is outside scheduler or in quick info popup\r\n\t\t\t\tif(!focusElement || scheduler.utils.dom.locateCss(focusElement, \"dhx_cal_quick_info\", false)){\r\n\t\t\t\t\tenable = false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tenable = scheduler.$keyboardNavigation.isChildOf(focusElement, scheduler.$container) || scheduler.$keyboardNavigation.isMinical(focusElement);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn enable;\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\tfunction changeState(enable){\r\n\t\t\t\tif(enable && !dispatcher.isEnabled()){\r\n\t\t\t\t\tdispatcher.enable();\r\n\t\t\t\t}else if(!enable && dispatcher.isEnabled()){\r\n\t\t\t\t\tdispatcher.disable();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tconst intervalId = setInterval(function(){\r\n\t\t\t\tif(!scheduler.$container || !scheduler.$keyboardNavigation.isChildOf(scheduler.$container, document.body)){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar enable = isSchedulerSelected();\r\n\r\n\t\t\t\tif(enable){\r\n\t\t\t\t\tchangeState(enable);\r\n\t\t\t\t}else if(!enable && dispatcher.isEnabled()){\r\n\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// doublecheck in case checking is done in handler before focus element is repainted\r\n\t\t\t\t\t\tif(scheduler.config.key_nav){\r\n\t\t\t\t\t\t\tchangeState(isSchedulerSelected());\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tscheduler.$container.removeAttribute(\"tabindex\");\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}, 100);\r\n\t\t\t\t}\r\n\t\t\t}, 500);\r\n\t\t\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\t\t\tclearInterval(intervalId);\r\n\t\t\t});\r\n\t\t})();\r\n\t}\r\n\r\n\r\n","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\r\n\tthis.layers.sort(function(a, b){\r\n\t\treturn a.zIndex - b.zIndex;\r\n\t});\r\n\r\n\tscheduler._dp_init=function(dp){\r\n\t\tdp._methods=[\"_set_event_text_style\",\"\",\"changeEventId\",\"deleteEvent\"];\r\n\r\n\t\tthis.attachEvent(\"onEventAdded\",function(id){\r\n\t\t\tif (!this._loading && this.validId(id) && this.getEvent(id) && this.getEvent(id).layer == dp.layer)\r\n\t\t\t\tdp.setUpdated(id,true,\"inserted\");\r\n\t\t});\r\n\t\tthis.attachEvent(\"onBeforeEventDelete\",function(id){\r\n\t\t\tif(this.getEvent(id) && this.getEvent(id).layer == dp.layer) {\r\n\t\t\t\tif (!this.validId(id)) return;\r\n\t\t\t\tvar z=dp.getState(id);\r\n\r\n\t\t\t\tif (z==\"inserted\" || this._new_event) { dp.setUpdated(id,false);\t\treturn true; }\r\n\t\t\t\tif (z==\"deleted\") return false;\r\n\t\t\t\tif (z==\"true_deleted\") return true;\r\n\r\n\t\t\t\tdp.setUpdated(id,true,\"deleted\");\r\n\t\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\telse return true;\r\n\t\t});\r\n\t\tthis.attachEvent(\"onEventChanged\",function(id){\r\n\t\t\tif (!this._loading && this.validId(id) && this.getEvent(id) && this.getEvent(id).layer == dp.layer)\r\n\t\t\t\tdp.setUpdated(id,true,\"updated\");\r\n\t\t});\r\n\r\n\t\tdp._getRowData=function(id,pref){\r\n\t\t\tvar ev=this.obj.getEvent(id);\r\n\t\t\tvar data = {};\r\n\r\n\t\t\tfor (var a in ev){\r\n\t\t\t\tif (a.indexOf(\"_\")===0) continue;\r\n\t\t\t\tif (ev[a] && ev[a].getUTCFullYear) //not very good, but will work\r\n\t\t\t\t\tdata[a] = this.obj._helpers.formatDate(ev[a]);\r\n\t\t\t\telse\r\n\t\t\t\t\tdata[a] = ev[a];\r\n\t\t\t}\r\n\t\t\treturn data;\r\n\t\t};\r\n\t\tdp._clearUpdateFlag=function(){};\r\n\r\n\t\tdp.attachEvent(\"insertCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"updateCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"deleteCallback\", function(upd, id) {\r\n\t\t\tthis.obj.setUserData(id, this.action_param, \"true_deleted\");\r\n\t\t\tthis.obj.deleteEvent(id);\r\n\t\t});\r\n\t};\r\n\r\n\t(function() {\r\n var _cloneObj = function(obj){\r\n if(obj === null || typeof(obj) != 'object')\r\n return obj;\r\n var temp = new obj.constructor();\r\n for(var key in obj)\r\n temp[key] = _cloneObj(obj[key]);\r\n return temp;\r\n };\r\n\r\n\t\tscheduler._dataprocessors = [];\r\n\t\tscheduler._layers_zindex = {};\r\n\t\tfor(var i=0; i= scheduler.config.collision_limit);\r\n\t});\r\n\r\n\tscheduler.addEvent=function(start_date,end_date,text,id,extra_data){\r\n\t\tvar ev=start_date;\r\n\t\tif (arguments.length!=1){\r\n\t\t\tev=extra_data||{};\r\n\t\t\tev.start_date=start_date;\r\n\t\t\tev.end_date=end_date;\r\n\t\t\tev.text=text;\r\n\t\t\tev.id=id;\r\n\t\t\tev.layer = this.defaultLayer;\r\n\t\t}\r\n\t\tev.id = ev.id||scheduler.uid();\r\n\t\tev.text = ev.text||\"\";\r\n\r\n\r\n\t\tif (typeof ev.start_date == \"string\") ev.start_date=this.templates.api_date(ev.start_date);\r\n\t\tif (typeof ev.end_date == \"string\") ev.end_date=this.templates.api_date(ev.end_date);\r\n\t\tev._timed=this.isOneDayEvent(ev);\r\n\r\n\t\tvar is_new=!this._events[ev.id];\r\n\t\tthis._events[ev.id]=ev;\r\n\t\tthis.event_updated(ev);\r\n\t\tif (!this._loading)\r\n\t\t\tthis.callEvent(is_new?\"onEventAdded\":\"onEventChanged\",[ev.id,ev]);\r\n\t};\r\n\r\n\tthis._evs_layer = {};\r\n\tfor (var i = 0; i < this.layers.length; i++) { // array in object for each layer\r\n\t\tthis._evs_layer[this.layers[i].name] = [];\r\n\t}\r\n\r\n\tscheduler.addEventNow=function(start,end,e){\r\n\t\tvar base = {};\r\n\t\tif (typeof start == \"object\"){\r\n\t\t\tbase = start;\r\n\t\t\tstart = null;\r\n\t\t}\r\n\r\n\t\tvar d = (this.config.event_duration||this.config.time_step)*60000;\r\n\t\tif (!start) start = Math.round((scheduler._currentDate()).valueOf()/d)*d;\r\n\t\tvar start_date = new Date(start);\r\n\t\tif (!end){\r\n\t\t\tvar start_hour = this.config.first_hour;\r\n\t\t\tif (start_hour > start_date.getHours()){\r\n\t\t\t\tstart_date.setHours(start_hour);\r\n\t\t\t\tstart = start_date.valueOf();\r\n\t\t\t}\r\n\t\t\tend = start+d;\r\n\t\t}\r\n\r\n\r\n\t\tbase.start_date = base.start_date||start_date;\r\n\t\tbase.end_date = base.end_date||new Date(end);\r\n\t\tbase.text = base.text||this.locale.labels.new_event;\r\n\t\tbase.id = this._drag_id = this.uid();\r\n\t\tbase.layer = this.defaultLayer;\r\n\t\tthis._drag_mode=\"new-size\";\r\n\r\n\t\tthis._loading=true;\r\n\t\tthis.addEvent(base);\r\n\t\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\t\tthis._loading=false;\r\n\r\n\t\tthis._drag_event={}; //dummy , to trigger correct event updating logic\r\n\t\tthis._on_mouse_up(e);\r\n\t};\r\n\r\n\tscheduler._t_render_view_data = function(events) { // helper\r\n\t\tif (this.config.multi_day && !this._table_view) {\r\n\t\t\tvar tvs = [];\r\n\t\t\tvar tvd = [];\r\n\t\t\tfor (var k = 0; k < events.length; k++) {\r\n\t\t\t\tif (events[k]._timed)\r\n\t\t\t\t\ttvs.push(events[k]);\r\n\t\t\t\telse\r\n\t\t\t\t\ttvd.push(events[k]);\r\n\t\t\t}\r\n\t\t\tthis._table_view = true;\r\n\t\t\tthis.render_data(tvd);\r\n\t\t\tthis._table_view = false;\r\n\t\t\tthis.render_data(tvs);\r\n\t\t}\r\n\t\telse\r\n\t\t\tthis.render_data(events);\r\n\t};\r\n\r\n\tscheduler.render_view_data = function(){\r\n\t\tif (this._not_render) {\r\n\t\t\tthis._render_wait = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._render_wait = false;\r\n\r\n\t\tthis.clear_view();\r\n\r\n\t\tthis._evs_layer = {};\r\n\t\tfor (var i = 0; i < this.layers.length; i++) { // array in object for each layer\r\n\t\t\tthis._evs_layer[this.layers[i].name] = [];\r\n\t\t}\r\n\r\n\t\tvar evs = this.get_visible_events();\r\n\t\tfor (var i = 0; i < evs.length; i++) { // filling layer arrays with events\r\n\t\t\tif(this._evs_layer[evs[i].layer])\r\n\t\t\t\tthis._evs_layer[evs[i].layer].push(evs[i]);\r\n\t\t}\r\n\r\n\t\tif(this._mode == 'month') { // old logic is used\r\n\t\t\tvar tevs = [];\r\n\t\t\tfor (var i = 0; i < this.layers.length; i++) {\r\n\t\t\t\tif (this.layers[i].visible)\r\n\t\t\t\t\ttevs = tevs.concat(this._evs_layer[this.layers[i].name]);\r\n\t\t\t}\r\n\t\t\tthis._t_render_view_data(tevs);\r\n\t\t}\r\n\t\telse { // week, day; should use new logic\r\n\t\t\tfor (var i = 0; i < this.layers.length; i++) {\r\n\t\t\t\tif (this.layers[i].visible) {\r\n\t\t\t\t\tvar evs_layer = this._evs_layer[this.layers[i].name];\r\n\t\t\t\t\tthis._t_render_view_data(evs_layer);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._render_v_bar=function(ev,x,y,w,h,style,contentA,contentB,bottom){\r\n\t\tvar id = ev.id;\r\n\r\n\t\tif(contentA.indexOf('
';\r\n\t\thtml+='
 
';\r\n\t\thtml+='
'+contentA+'
';\r\n\t\thtml+='
'+contentB+'
';\r\n\t\thtml+='
';\r\n\r\n\t\td.innerHTML=html;\r\n\t\td.style.zIndex = 100;\r\n\t\treturn d.firstChild;\r\n\t};\r\n\r\n\tscheduler.render_event_bar=function(ev){\r\n\t\tvar parent=this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tvar x=this._colsS[ev._sday];\r\n\t\tvar x2=this._colsS[ev._eday];\r\n\t\tif (x2==x) x2=this._colsS[ev._eday+1];\r\n\t\tvar hb = this.xy.bar_height;\r\n\r\n\t\tvar y=this._colsS.heights[ev._sweek]+(this._colsS.height?(this.xy.month_scale_height+2):2)+ev._sorder*hb;\r\n\r\n\t\tvar d=document.createElement(\"div\");\r\n\t\tvar cs = ev._timed?\"dhx_cal_event_clear\":\"dhx_cal_event_line\";\r\n\t\tvar cse = (scheduler.templates['event_class_'+ev.layer])?scheduler.templates['event_class_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_class(ev.start_date,ev.end_date,ev);\r\n\t\tif (cse) cs=cs+\" \"+cse;\r\n\r\n\t\tvar html='
';\r\n\r\n\t\tif (ev._timed)\r\n\t\t\thtml+=(scheduler.templates['event_bar_date_'+ev.layer])?scheduler.templates['event_bar_date_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_bar_date(ev.start_date,ev.end_date,ev);\r\n\t\thtml+=( (scheduler.templates['event_bar_text_'+ev.layer])?scheduler.templates['event_bar_text_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_bar_text(ev.start_date,ev.end_date,ev) + '
)');\r\n\t\thtml+='
';\r\n\r\n\t\td.innerHTML=html;\r\n\r\n\t\tthis._rendered.push(d.firstChild);\r\n\t\tparent.appendChild(d.firstChild);\r\n\t};\r\n\r\n\tscheduler.render_event=function(ev){\r\n\t\tvar menu = scheduler.xy.menu_width;\r\n\t\tif(scheduler.getLayer(ev.layer).noMenu)\r\n\t\t\tmenu = 0;\r\n\r\n\t\tif (ev._sday<0) return; //can occur in case of recurring event during time shift\r\n\t\tvar parent=scheduler.locate_holder(ev._sday);\r\n\t\tif (!parent) return; //attempt to render non-visible event\r\n\t\tvar sm = ev.start_date.getHours()*60+ev.start_date.getMinutes();\r\n\t\tvar em = (ev.end_date.getHours()*60+ev.end_date.getMinutes())||(scheduler.config.last_hour*60);\r\n\r\n\t\tvar top = (Math.round((sm*60*1000-this.config.first_hour*60*60*1000)*this.config.hour_size_px/(60*60*1000)))%(this.config.hour_size_px*24)+1; //42px/hour\r\n\t\tvar height = Math.max(scheduler.xy.min_event_height,(em-sm)*this.config.hour_size_px/60)+1; //42px/hour\r\n\t\t\r\n\t\tvar width=Math.floor((parent.clientWidth-menu)/ev._count);\r\n\t\tvar left=ev._sorder*width+1;\r\n\t\tif (!ev._inner) width=width*(ev._count-ev._sorder);\r\n\r\n\r\n\r\n\t\tvar d=this._render_v_bar(ev.id,menu+left,top,width,height,ev._text_style,scheduler.templates.event_header(ev.start_date,ev.end_date,ev),scheduler.templates.event_text(ev.start_date,ev.end_date,ev));\r\n\r\n\t\tthis._rendered.push(d);\r\n\t\tparent.appendChild(d);\r\n\r\n\t\tleft=left+parseInt(parent.style.left,10)+menu;\r\n\r\n\t\ttop+=this._dy_shift; //corrupt top, to include possible multi-day shift\r\n\t\td.style.zIndex = this._layers_zindex[ev.layer];\r\n\r\n\t\tif (this._edit_id==ev.id){\r\n\t\t\td.style.zIndex = parseInt(d.style.zIndex)+1; //fix overlapping issue\r\n\t\t\tvar new_zIndex = d.style.zIndex;\r\n\t\t\twidth=Math.max(width-4,scheduler.xy.editor_width);\r\n\t\t\tvar d=document.createElement(\"div\");\r\n\t\t\td.setAttribute(\"event_id\",ev.id); // for backward compatibility\r\n\t\t\td.setAttribute(this.config.event_attribute,ev.id);\r\n\t\t\tthis.set_xy(d,width,height-20,left,top+14);\r\n\t\t\td.className=\"dhx_cal_editor\";\r\n\t\t\td.style.zIndex = new_zIndex;\r\n\t\t\tvar d2=document.createElement(\"div\");\r\n\t\t\tthis.set_xy(d2,width-6,height-26);\r\n\t\t\td2.style.cssText+=\";margin:2px 2px 2px 2px;overflow:hidden;\";\r\n\r\n\r\n\t\t\td2.style.zIndex = new_zIndex;\r\n\t\t\td.appendChild(d2);\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].appendChild(d);\r\n\t\t\tthis._rendered.push(d);\r\n\r\n\t\t\td2.innerHTML=\"\";\r\n\r\n\t\t\tthis._editor=d2.firstChild;\r\n\t\t\tthis._editor.addEventListener(\"keypress\", function(e){\r\n\t\t\t\tif (e.shiftKey) return true;\r\n\t\t\t\tvar code= e.keyCode;\r\n\t\t\t\tif (code==scheduler.keys.edit_save) scheduler.editStop(true);\r\n\t\t\t\tif (code==scheduler.keys.edit_cancel) scheduler.editStop(false);\r\n\t\t\t});\r\n\t\t\tthis._editor.addEventListener(\"selectstart\", function(e){ e.cancelBubble=true; return true; });\r\n\t\t\td2.firstChild.focus();\r\n\t\t\t//IE and opera can add x-scroll during focusing\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].scrollLeft=0;\r\n\t\t\td2.firstChild.select();\r\n\t\t}\r\n\t\tif (this._select_id==ev.id){\r\n\t\t\td.style.zIndex = parseInt(d.style.zIndex)+1; //fix overlapping issue\r\n\t\t\tvar icons=this.config[\"icons_\"+((this._edit_id==ev.id)?\"edit\":\"select\")];\r\n\t\t\tvar icons_str=\"\";\r\n\t\t\tfor (var i=0; i
\";\r\n\t\t\tvar obj = this._render_v_bar(ev.id,left-menu+1,top,menu,icons.length*20+26,\"\",\"
\",icons_str,true);\r\n\t\t\tobj.style.left=left-menu+1;\r\n\t\t\tobj.style.zIndex = d.style.zIndex;\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].appendChild(obj);\r\n\t\t\tthis._rendered.push(obj);\r\n\t\t}\r\n\r\n\t};\r\n\r\n scheduler.filter_agenda = function(id, event) {\r\n var layer = scheduler.getLayer(event.layer);\r\n return (layer && layer.visible);\r\n };\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.limit_start = null;\r\nscheduler.config.limit_end = null;\r\nscheduler.config.limit_view = false;\r\nscheduler.config.check_limits = true;\r\n\r\nscheduler._temp_limit_scope = function(){\r\n\tvar before = null;\r\n\tvar dhx_time_block = \"dhx_time_block\";\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\",function(om,od,nm,nd){\r\n\r\n\t\tfunction isBlocked(date, mode){\r\n\t\t\tvar limit_start = scheduler.config.limit_start,\r\n\t\t\t\tlimit_end = scheduler.config.limit_end,\r\n\t\t\t\tdate_end = scheduler.date.add(date,1,mode);\r\n\r\n\t\t\treturn (date.valueOf() > limit_end.valueOf() || date_end <= limit_start.valueOf());\r\n\t\t}\r\n\r\n\t\tif (scheduler.config.limit_view){\r\n\t\t\tnd = nd||od; nm = nm||om;\r\n\t\t\tif (isBlocked(nd, nm) && !(od.valueOf() == nd.valueOf())){\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar resetDate = !isBlocked(od, nm) ? od : scheduler.config.limit_start;\r\n\r\n\t\t\t\t\tscheduler.setCurrentView(!isBlocked(resetDate, nm) ? resetDate : null, nm);\r\n\t\t\t\t},1);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onMouseDown\", function(classname) {\r\n\t\treturn !(classname == dhx_time_block);\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeDrag\",function(id){\r\n\t\tif (!id) return true;\r\n\t\treturn scheduler.checkLimitViolation(scheduler.getEvent(id));\r\n\t});\r\n\tscheduler.attachEvent(\"onClick\", function (event_id, native_event_object){\r\n\t\treturn scheduler.checkLimitViolation(scheduler.getEvent(event_id));\r\n });\r\n\tscheduler.attachEvent(\"onBeforeLightbox\",function(id){\r\n\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tbefore = [ev.start_date, ev.end_date];\r\n\t\treturn scheduler.checkLimitViolation(ev);\r\n\t});\r\n\tscheduler.attachEvent(\"onEventSave\", function(id, data, is_new_event) {\r\n\r\n\t\t//lightbox may not have 'time' section\r\n\t\tif(!(data.start_date && data.end_date)){\r\n\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\tdata.start_date = new Date(ev.start_date);\r\n\t\t\tdata.end_date = new Date(ev.end_date);\r\n\t\t}\r\n\r\n\t\tif(data.rec_type){\r\n\t\t\t//_roll_back_dates modifies start_date of recurring event, need to check limits after modification\r\n\t\t\t// use a copy to keep original event unchanged\r\n\t\t\tvar data_copy = scheduler._lame_clone(data);\r\n\t\t\tscheduler._roll_back_dates(data_copy);\r\n\t\t\treturn scheduler.checkLimitViolation(data_copy);\r\n\t\t}\r\n\t\treturn scheduler.checkLimitViolation(data);\r\n\t});\r\n\tscheduler.attachEvent(\"onEventAdded\",function(id){\r\n\t\tif (!id) return true;\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif (!scheduler.checkLimitViolation(ev) && scheduler.config.limit_start && scheduler.config.limit_end) {\r\n\t\t\t//if newly created event is outside of limited time - crop it, leaving only allowed time\r\n\t\t\tif (ev.start_date < scheduler.config.limit_start) {\r\n\t\t\t\tev.start_date = new Date(scheduler.config.limit_start);\r\n\t\t\t}\r\n\t\t\tif (ev.start_date.valueOf() >= scheduler.config.limit_end.valueOf()) {\r\n\t\t\t\tev.start_date = this.date.add(scheduler.config.limit_end, -1, \"day\");\r\n\t\t\t}\r\n\t\t\tif (ev.end_date < scheduler.config.limit_start) {\r\n\t\t\t\tev.end_date = new Date(scheduler.config.limit_start);\r\n\t\t\t}\r\n\t\t\tif (ev.end_date.valueOf() >= scheduler.config.limit_end.valueOf()) {\r\n\t\t\t\tev.end_date = this.date.add(scheduler.config.limit_end, -1, \"day\");\r\n\t\t\t}\r\n\t\t\tif (ev.start_date.valueOf() >= ev.end_date.valueOf()) {\r\n\t\t\t\tev.end_date = this.date.add(ev.start_date, (this.config.event_duration||this.config.time_step), \"minute\");\r\n\t\t\t}\r\n\t\t\tev._timed=this.isOneDayEvent(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\",function(id){\r\n\t\tif (!id) return true;\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif (!scheduler.checkLimitViolation(ev)){\r\n\t\t\tif (!before) return false;\r\n\t\t\tev.start_date = before[0];\r\n\t\t\tev.end_date = before[1];\r\n\t\t\tev._timed=this.isOneDayEvent(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeEventChanged\",function(ev, native_object, is_new){\r\n\t\treturn scheduler.checkLimitViolation(ev);\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeEventCreated\", function(ev) { // native event\r\n\t\tvar start_date = scheduler.getActionData(ev).date;\r\n\t\tvar event = {\r\n\t\t\t_timed: true,\r\n\t\t\tstart_date: start_date,\r\n\t\t\tend_date: scheduler.date.add(start_date, scheduler.config.time_step, \"minute\")\r\n\t\t};\r\n\t\treturn scheduler.checkLimitViolation(event);\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", function(){\r\n\t\tscheduler._mark_now();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onAfterSchedulerResize\", function(){\r\n\t\twindow.setTimeout(function(){ \r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler._mark_now(); \r\n\t\t}, 1);\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\t\tscheduler._mark_now_timer = window.setInterval(function() {\r\n\t\t\tif(!scheduler._is_initialized())\r\n\t\t\t\treturn;\r\n\t\t\tscheduler._mark_now();\r\n\t\t}, 60000);\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tclearInterval(scheduler._mark_now_timer);\r\n\t});\r\n\r\n};\r\nscheduler._temp_limit_scope();\r\n\r\n\r\n}","import { IMapAdapter, ICalendarEvent, IMapSettings, IMapPosition} from \"./types\";\r\ndeclare let google: any;\r\n\r\nexport class GoogleMapAdapter implements IMapAdapter {\r\n\tprivate map: any;\r\n\tprivate scheduler: any;\r\n\tprivate settings: IMapSettings;\r\n\tprivate _markers: any[];\r\n\tprivate infoWindow: any;\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.map = null;\r\n\t\tthis._markers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t}\r\n\tonEventClick(event: ICalendarEvent): void {\r\n\t\tif (this._markers && this._markers.length > 0) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\t\tif (event.id == this._markers[i].event.id) {\r\n\t\t\t\t\tlet zoom = this.settings.zoom_after_resolve || this.settings.initial_zoom;\r\n\t\t\t\t\tif (event.lat && event.lng){\r\n\t\t\t\t\t\tthis.map.setCenter({\r\n\t\t\t\t\t\t\tlat: event.lat, \r\n\t\t\t\t\t\t\tlng: event.lng,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tthis.map.setZoom(zoom);\r\n\t\t\t\t\t} else {\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.map.setCenter({\r\n\t\t\t\t\t\t\tlat: this.settings.error_position.lat, \r\n\t\t\t\t\t\t\tlng: this.settings.error_position.lng,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tthis.map.setZoom(zoom);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tgoogle.maps.event.trigger(this._markers[i].marker, 'click');\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t} \r\n\t}\r\n\r\n\tinitialize(container: HTMLElement, options: IMapSettings): void {\r\n\t\tthis.settings = options;\r\n\t\tlet scheduler = this.scheduler;\r\n\t\tlet mapOptions = {\r\n\t\t\tcenter: { lat: options.initial_position.lat, lng: options.initial_position.lng },\r\n\t\t\tzoom: options.initial_zoom,\r\n\t\t\tmapId: container.id,\r\n\t\t\tscrollwheel: true,\r\n\t\t\tmapTypeId: options.type\r\n\t\t}\r\n\t\t// we need to reuse the google map to avoid leak memory\r\n\t\tif (this.map === null) {\r\n\t\t\tthis.map = new google.maps.Map(container, mapOptions);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tlet map = this.map;\r\n\t\t\tcontainer.appendChild(this.map.__gm.messageOverlay);\r\n\t\t\tcontainer.appendChild(this.map.__gm.outerContainer);\r\n\t\t\tsetTimeout(function() {\r\n\t\t\t\tmap.setOptions({container: container.id});\r\n\t\t\t}, 500);\r\n\t\t}\r\n\t\tgoogle.maps.event.addListener(this.map, \"dblclick\", function(event) {\r\n\t\t\tconst geocoder = new google.maps.Geocoder();\r\n\t\r\n\t\t\tif (!scheduler.config.readonly && scheduler.config.dblclick_create) {\r\n\t\t\t\tlet point = event.latLng;\r\n\t\t\t\tgeocoder.geocode(\r\n\t\t\t\t\t{ 'latLng': point },\r\n\t\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\t\tif (status == google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\t\tpoint = results[0].geometry.location;\r\n\t\t\t\t\t\t\tscheduler.addEventNow({\r\n\t\t\t\t\t\t\t\tlat: point.lat(),\r\n\t\t\t\t\t\t\t\tlng: point.lng(),\r\n\t\t\t\t\t\t\t\tevent_location: results[0].formatted_address,\r\n\t\t\t\t\t\t\t\tstart_date: scheduler.getState().date,\r\n\t\t\t\t\t\t\t\tend_date: scheduler.date.add(scheduler.getState().date, scheduler.config.time_step, \"minute\")\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tconsole.error('Geocode was not successful for the following reason: ' + status);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tdestroy(container: HTMLElement): void {\r\n\t\tgoogle.maps.event.clearInstanceListeners(window);\r\n\t\tgoogle.maps.event.clearInstanceListeners(document);\r\n\t\tgoogle.maps.event.clearInstanceListeners(container);\r\n\t\twhile (container.firstChild) {\r\n\t\t\tcontainer.firstChild.remove();\r\n\t\t}\r\n\t\tcontainer.innerHTML = \"\";\r\n\t}\r\n\r\n\tasync addEventMarker(event: ICalendarEvent): Promise {\r\n\t\tlet config = {\r\n\t\t\ttitle: event.text,\r\n\t\t\tposition: {},\r\n\t\t\tmap: {}\r\n\t\t}\r\n\t\t\r\n\t\tif (event.lat && event.lng) {\r\n\t\t\tconfig.position = { lat: event.lat, lng: event.lng };\r\n\t\t} else {\r\n\t\t\tconfig.position = { lat: this.settings.error_position.lat, lng: this.settings.error_position.lng }\r\n\t\t}\r\n\t\tconst { AdvancedMarkerElement } = await google.maps.importLibrary(\"marker\");\r\n\t\tlet marker;\r\n\t\tif (this.scheduler.ext.mapView.createMarker) {\r\n\t\t\tconfig.map = this.map;\r\n\t\t\tmarker = this.scheduler.ext.mapView.createMarker(config);\r\n\t\t} else {\r\n\t\t\tmarker = new AdvancedMarkerElement(config);\r\n\t\t\tmarker.map = this.map;\r\n\t\t}\r\n\t\tmarker.setMap(this.map);\r\n\t\t//case for markeks which were deleted with DataProcessor\r\n\t\tif (event[\"!nativeeditor_status\"] == \"true_deleted\"){\r\n\t\t\tmarker.setMap(null);\r\n\t\t}\r\n\t\tgoogle.maps.event.addListener(marker, \"click\", () => {\r\n\t\t\tif (this.infoWindow) {\r\n\t\t\t\tthis.infoWindow.close();\r\n\t\t\t}\r\n\t\t\tthis.infoWindow = new google.maps.InfoWindow({maxWidth: this.settings.info_window_max_width});\r\n\t\t\tthis.infoWindow.setContent(this.scheduler.templates.map_info_content(event));\r\n\t\t\tthis.infoWindow.open({\r\n\t\t\t\tanchor: marker,\r\n\t\t\t\tmap: this.map,\r\n\t\t\t});\r\n\t\t});\r\n\t\tlet markerInfo = {event, ...config, marker};\r\n\t\tthis._markers.push(markerInfo);\r\n\t}\r\n\r\n\tremoveEventMarker(eventId: string): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif (eventId == this._markers[i].event.id) {\r\n\t\t\t\tthis._markers[i].marker.setVisible(false);\r\n\t\t\t\tthis._markers[i].marker.setMap(null);\r\n\t\t\t\tthis._markers[i].marker.setPosition(null);\r\n\t\t\t\tthis._markers[i].marker = null;\r\n\t\t\t\tthis._markers.splice(i,1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tupdateEventMarker(event: ICalendarEvent): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif(this._markers[i].event.id == event.id) {\r\n\t\t\t\tthis._markers[i].event = event;\r\n\t\t\t\tthis._markers[i].position.lat = event.lat;\r\n\t\t\t\tthis._markers[i].position.lng = event.lng;\r\n\t\t\t\tthis._markers[i].text = event.text;\r\n\t\t\t\tlet latlng = new google.maps.LatLng(event.lat, event.lng);\r\n\t\t\t\tthis._markers[i].marker.setPosition(latlng);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tclearEventMarkers(): void {\r\n\t\tif (this._markers.length > 0) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\t\tthis._markers[i].marker.setMap(null);\r\n\t\t\t}\r\n\t\t\tthis._markers = [];\r\n\t\t}\r\n\t}\r\n\r\n\tsetView(latitude: number, longitude: number, zoom: number): void {\r\n\t\tthis.map.setCenter({\r\n\t\t\tlat: latitude, \r\n\t\t\tlng: longitude,\r\n\t\t});\r\n\t\tthis.map.setZoom(zoom);\r\n\t}\r\n\r\n\tasync resolveAddress(string: string): Promise {\r\n\t\tconst geocoder = new google.maps.Geocoder();\r\n\t\tlet position: any = await new Promise((resolve) => {\r\n\t\t\tgeocoder.geocode(\r\n\t\t\t\t{ 'address': string },\r\n\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\tif (status == google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\tresolve({\r\n\t\t\t\t\t\t lat: results[0].geometry.location.lat(),\r\n\t\t\t\t\t\t lng: results[0].geometry.location.lng()\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tconsole.error('Geocode was not successful for the following reason: ' + status);\r\n\t\t\t\t\t\tresolve({});\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t});\r\n\t\treturn position;\r\n\t}\r\n\t\r\n}","import { IMapAdapter, ICalendarEvent, IMapSettings, IMapPosition} from \"./types\";\r\n\r\ndeclare let L: any\r\n\r\nexport class OpenStreetMapAdapter implements IMapAdapter {\r\n\tprivate map: any;\r\n\tprivate scheduler: any;\r\n\tprivate _markers: any[];\r\n\tprivate settings: IMapSettings;\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.map = null;\r\n\t\tthis._markers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t}\r\n\tonEventClick(event: ICalendarEvent): void {\r\n\t\tif (this._markers && this._markers.length > 0) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\t\tif (event.id == this._markers[i].event.id) {\r\n\t\t\t\t\tthis._markers[i].marker.openPopup();\r\n\t\t\t\t\tthis._markers[i].marker.closeTooltip();\r\n\t\t\t\t\tif (event.lat && event.lng) {\r\n\t\t\t\t\t\tthis.setView(event.lat, event.lng, this.settings.zoom_after_resolve || this.settings.initial_zoom);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.setView(this.settings.error_position.lat, this.settings.error_position.lng, this.settings.zoom_after_resolve || this.settings.initial_zoom);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t} \r\n\t}\r\n\r\n\tinitialize(container: HTMLElement, options: IMapSettings): void {\r\n\t\tlet scheduler = this.scheduler;\r\n\t\tlet mapWrapper = document.createElement('div');\r\n\t\tmapWrapper.className = 'mapWrapper';\r\n\t\tmapWrapper.id = 'mapWrapper';\r\n\t\tmapWrapper.style.width = container.style.width;\r\n\t\tmapWrapper.style.height = container.style.height;\r\n\t\tcontainer.appendChild(mapWrapper);\r\n\r\n\t\tlet map = L.map(mapWrapper, {\r\n\t\t\tcenter: L.latLng(options.initial_position.lat, options.initial_position.lng),\r\n\t\t\tzoom: options.initial_zoom,\r\n\t\t\tkeyboard: false // need to set false, due to bug with moving window\r\n\t\t});\r\n\t\tL.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(map);\r\n\t\tmap.on(\"dblclick\", async function(e){\r\n\t\t\tconst settings = {\r\n\t\t\t\t\"method\": \"GET\",\r\n\t\t\t\theaders: {\r\n\t\t\t\t\t\"Accept-Language\": \"en\",\r\n\t\t\t\t},\r\n\t\t\t};\r\n\t\t\tlet response = await fetch(`https://nominatim.openstreetmap.org/reverse?lat=${e.latlng.lat}&lon=${e.latlng.lng}&format=json`, settings).then(response => response.json());\r\n\t\t\tif (response.address) {\r\n\t\t\t\tlet address = response.address.country;\r\n\t\t\t\tscheduler.addEventNow({\r\n\t\t\t\t\tlat: e.latlng.lat,\r\n\t\t\t\t\tlng: e.latlng.lng,\r\n\t\t\t\t\tevent_location: address,\r\n\t\t\t\t\tstart_date: scheduler.getState().date,\r\n\t\t\t\t\tend_date: scheduler.date.add(scheduler.getState().date, scheduler.config.time_step, \"minute\")\r\n\t\t\t\t});\r\n\t\t\t} else {\r\n\t\t\t\tconsole.error(\"unable recieve a position of the event\", response.error);\r\n\t\t\t}\r\n\t\t});\r\n\t\tthis.map = map;\r\n\t\tthis.settings = options;\r\n\t}\r\n\r\n\tdestroy(container: HTMLElement): void {\r\n\t\tthis.map.remove();\r\n\t\twhile (container.firstChild) {\r\n\t\t\tcontainer.firstChild.remove();\r\n\t\t}\r\n\t\tcontainer.innerHTML = \"\";\r\n\t}\r\n\r\n\taddEventMarker(event: ICalendarEvent): void {\r\n\t\tconst myIcon = L.icon({\r\n\t\t\ticonUrl: 'https://unpkg.com/leaflet@1.0.3/dist/images/marker-icon.png',\r\n\t\t\ticonSize: [25, 41],\r\n\t\t\tshadowSize: [30, 65],\r\n\t\t\ticonAnchor: [12, 41],\r\n\t\t\tshadowAnchor: [7, 65]\r\n\t\t});\r\n\t\tlet popupConfig = {\r\n\t\t\tminWidth: 180,\r\n\t\t\tmaxWidth: this.settings.info_window_max_width,\r\n\t\t}\r\n\t\tconst markerPopup = L.popup(popupConfig).setContent(this.scheduler.templates.map_info_content(event));\r\n\t\tconst tooltip = L.tooltip().setContent(event.text);\r\n\r\n\t\tlet markerConfig = [\r\n\t\t\tevent.lat,\r\n\t\t\tevent.lng\r\n\t\t]\r\n\t\t\r\n\t\tif (!event.lat || !event.lng) {\r\n\t\t\tmarkerConfig = [this.settings.error_position.lat, this.settings.error_position.lng];\r\n\t\t}\r\n\t\tconst marker = L.marker(markerConfig, {\r\n\t\t\ticon: myIcon\r\n\t\t}).bindPopup(markerPopup).bindTooltip(tooltip).addTo(this.map);\r\n\t\tconst markerInfo = {event, marker};\r\n\t\tthis._markers.push(markerInfo);\t\t\r\n\t}\r\n\r\n\tremoveEventMarker(eventId: string): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif (eventId == this._markers[i].event.id) {\r\n\t\t\t\tthis.map.removeLayer(this._markers[i].marker);\r\n\t\t\t\tthis._markers.splice(i,1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tupdateEventMarker(event: ICalendarEvent): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif(this._markers[i].event.id == event.id) {\r\n\t\t\t\tthis._markers[i].event = event;\r\n\t\t\t\tif (!event.lat || !event.lng){\r\n\t\t\t\t\tthis._markers[i].marker.setLatLng([this.settings.error_position.lat, this.settings.error_position.lng]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis._markers[i].marker.setLatLng([event.lat, event.lng]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tclearEventMarkers(): void {\r\n\t\tif(this._markers) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\t\tthis.map.removeLayer(this._markers[i].marker); \r\n\t\t\t}\r\n\t\t\tthis._markers = [];\r\n\t\t}\r\n\t}\r\n\r\n\tsetView(latitude: number, longitude: number, zoom: number): void {\r\n\t\tthis.map.setView([latitude, longitude], zoom);\r\n\t}\r\n\r\n\tasync resolveAddress(string: string): Promise {\r\n\t\tconst settings = {\r\n\t\t\t\"method\": \"GET\",\r\n\t\t\theaders: {\r\n\t\t\t\t\"Accept-Language\": \"en\",\r\n\t\t\t},\r\n\t\t};\r\n\t\tlet position:any = {};\r\n\t\tlet response = await fetch(`https://nominatim.openstreetmap.org/search?q=${string}&format=json`, settings).then(response => response.json());\r\n\t\tif (response && response.length) {\r\n\t\t\tposition.lat = +response[0].lat;\r\n\t\t\tposition.lng = +response[0].lon;\r\n\t\t} else {\r\n\t\t\tconsole.error(`Unable recieve a position of the event's location: ${string}`);\r\n\t\t}\r\n\t\treturn position;\r\n\t}\r\n}","import { IMapAdapter, ICalendarEvent, IMapSettings, IMapPosition} from \"./types\";\r\n\r\ndeclare let mapboxgl: any;\r\ndeclare let MapboxGeocoder: any;\r\n\r\nexport class MapboxAdapter implements IMapAdapter {\r\n\tprivate map: any;\r\n\tprivate scheduler: any;\r\n\tprivate settings: IMapSettings;\r\n\tprivate _markers: any[];\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.map = null;\r\n\t\tthis._markers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t}\r\n\tonEventClick(event: ICalendarEvent): void {\r\n\t\tif (this._markers && this._markers.length > 0) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n const popup = this._markers[i].marker.getPopup();\r\n if (popup.isOpen()){\r\n popup.remove();\r\n }\r\n\t\t\t\tif (event.id == this._markers[i].event.id) {\r\n\t\t\t\t\tthis._markers[i].marker.togglePopup();\r\n\t\t\t\t\tif (event.lat && event.lng) {\r\n\t\t\t\t\t\tthis.setView(event.lat, event.lng, this.settings.zoom_after_resolve || this.settings.initial_zoom);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.setView(this.settings.error_position.lat, this.settings.error_position.lng, this.settings.zoom_after_resolve || this.settings.initial_zoom);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t} \r\n\t}\r\n\r\n\tinitialize(container: HTMLElement, options: IMapSettings): void {\r\n let scheduler = this.scheduler;\r\n\r\n\t\tmapboxgl.accessToken = options.accessToken;\r\n const map = new mapboxgl.Map({\r\n container: container, \r\n center: [options.initial_position.lng, options.initial_position.lat], \r\n zoom: options.initial_zoom + 1, // problems with coordinates if zoom = 1\r\n });\r\n map.on(\"dblclick\",async function(e){\r\n\t\t\tlet response = await fetch(`https://api.mapbox.com/geocoding/v5/mapbox.places/${e.lngLat.lng},${ e.lngLat.lat}.json?access_token=${options.accessToken}`).then(response => response.json());\r\n\t\t\tif (response.features){\r\n\t\t\t\tlet address = response.features[0].place_name;\r\n\t\t\t\tscheduler.addEventNow({\r\n\t\t\t\t\tlat: e.lngLat.lat,\r\n\t\t\t\t\tlng: e.lngLat.lng,\r\n\t\t\t\t\tevent_location: address,\r\n\t\t\t\t\tstart_date: scheduler.getState().date,\r\n\t\t\t\t\tend_date: scheduler.date.add(scheduler.getState().date, scheduler.config.time_step, \"minute\")\r\n\t\t\t\t});\r\n\t\t\t} else {\r\n\t\t\t\tconsole.error(\"unable recieve a position of the event\");\r\n\t\t\t}\r\n\t\t});\r\n this.map = map;\r\n this.settings = options;\r\n\t}\r\n\r\n\tdestroy(container: HTMLElement): void {\r\n\t\tthis.map.remove();\r\n while (container.firstChild) {\r\n\t\t\tcontainer.firstChild.remove();\r\n\t\t}\r\n container.innerHTML = \"\";\r\n\t}\r\n\r\n\taddEventMarker(event: ICalendarEvent): void {\r\n let config = [\r\n\t\t\tevent.lng,\r\n\t\t\tevent.lat\r\n\t\t]\r\n\t\t\r\n\t\tif (!event.lat || !event.lng) {\r\n\t\t\tconfig = [this.settings.error_position.lng, this.settings.error_position.lat];\r\n\t\t} \r\n\r\n\t\tconst popup = new mapboxgl.Popup({ offset: 25, focusAfterOpen: false})\r\n .setMaxWidth(`${this.settings.info_window_max_width}px`) \r\n .setHTML(this.scheduler.templates.map_info_content(event));\r\n const marker = new mapboxgl.Marker()\r\n .setLngLat(config)\r\n .setPopup(popup)\r\n .addTo(this.map);\r\n const markerInfo = {event, marker}; \r\n this._markers.push(markerInfo);\r\n\t}\r\n\r\n\tremoveEventMarker(eventId: string): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif (eventId == this._markers[i].event.id) {\r\n\t\t\t\tthis._markers[i].marker.remove();\r\n this._markers.splice(i,1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tupdateEventMarker(event: ICalendarEvent): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif(this._markers[i].event.id == event.id) {\r\n\t\t\t\tthis._markers[i].event = event;\r\n\t\t\t\tif (!event.lat || !event.lng){\r\n\t\t\t\t\tthis._markers[i].marker.setLngLat([this.settings.error_position.lng, this.settings.error_position.lat]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis._markers[i].marker.setLngLat([event.lng, event.lat]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tclearEventMarkers(): void {\r\n\t\tfor (let i = 0; i {\r\n\t\tlet response = await fetch(`https://api.mapbox.com/geocoding/v5/mapbox.places/${string}.json?access_token=${this.settings.accessToken}`).then(response => response.json());\r\n\t\tlet position:any = {};\r\n\t\tif (response && response.features.length) {\r\n\t\t\tposition.lng = response.features[0].center[0];\r\n\t\t\tposition.lat = response.features[0].center[1];\r\n\t\t} else {\r\n\t\t\tconsole.error(`Unable recieve a position of the event's location: ${string}`);\r\n\t\t}\r\n\t\treturn position;\r\n\t}\r\n}","import { GoogleMapAdapter } from \"./gMapAdapter\";\r\nimport { OpenStreetMapAdapter } from \"./osmMapAdapter\";\r\nimport { MapboxAdapter } from \"./mapboxAdapter\";\r\nimport { IMapAdapter, ICalendarEvent, IMapSettings } from \"./types\";\r\n\r\ndeclare let google: any;\r\n\r\nexport default function(scheduler: any){\r\n\t\r\nlet mapAdapter: IMapAdapter | null = null;\r\nlet eventHandlerIds: number[] = [];\r\nconst adapters: { [name:string]: IMapAdapter } = {\r\n\tgoogleMap: new GoogleMapAdapter(scheduler),\r\n\topenStreetMaps: new OpenStreetMapAdapter(scheduler),\r\n\tmapbox: new MapboxAdapter(scheduler)\r\n}\r\n\r\nif(!scheduler.ext){\r\n\tscheduler.ext = {};\r\n}\r\nscheduler.ext.mapView = {\r\n\tcreateAdapter: function():IMapAdapter{\r\n\t\treturn adapters[scheduler.config.map_view_provider];\r\n\t},\r\n\tcreateMarker: function(config){\r\n\t\treturn new google.maps.Marker(config);\r\n\t},\r\n\tcurrentAdapter: null,\r\n\tadapters\r\n};\r\nscheduler._latLngUpdate = false; // flag for updating events which don't have event.lat and event.lng\r\nscheduler._eventLocationChanged = false; // flag for checking if the location of the event is changed\r\nscheduler.config.map_view_provider = \"googleMap\";\r\nscheduler.config.map_settings = {\r\n\tinitial_position: {\r\n\t lat: 48.724,\r\n\t lng: 8.215\r\n\t},\r\n\terror_position: {\r\n\t lat: 15,\r\n\t lng: 15\r\n\t},\r\n\tinitial_zoom: 1,\r\n\tzoom_after_resolve: 15,\r\n\tinfo_window_max_width: 300,\r\n\tresolve_user_location: true,\r\n\tresolve_event_location: true,\r\n\tview_provider: \"googleMap\"\r\n}\r\nif (scheduler.config.map_initial_position) {\r\n\tscheduler.config.map_settings.initial_position = {\r\n\t\tlat: scheduler.config.map_initial_position.lat(),\r\n\t\tlng: scheduler.config.map_initial_position.lng(), \r\n\t};\r\n}\r\n\r\nif (scheduler.config.map_error_position) {\r\n\tscheduler.config.map_settings.error_position = {\r\n\t\tlat: scheduler.config.map_error_position.lat(),\r\n\t\tlng: scheduler.config.map_error_position.lng(), \r\n\t};\r\n}\r\n\r\nscheduler.xy.map_date_width = 188; // date column width\r\nscheduler.xy.map_icon_width = 25; // event details icon width\r\nscheduler.xy.map_description_width = 400; // description column width\r\nscheduler.date.add_map = function(date, inc, mode) {\r\n\treturn (new Date(date.valueOf()));\r\n};\r\nscheduler.templates.map_date = function(dd, ed, mode) {\r\n\treturn '';\r\n};\r\nscheduler.templates.map_time = function(start, end, ev) {\r\n\tif (scheduler.config.rtl && !ev._timed) {\r\n\t\treturn scheduler.templates.day_date(end) + \" – \" + scheduler.templates.day_date(start);\r\n\t} else if (ev._timed) {\r\n\t\treturn this.day_date(ev.start_date, ev.end_date, ev) + \" \" + this.event_date(start);\r\n\t} else {\r\n\t\treturn scheduler.templates.day_date(start) + \" – \" + scheduler.templates.day_date(end);\r\n\t}\r\n};\r\nscheduler.templates.map_text = function(start, end, ev) {\r\n\treturn ev.text;\r\n};\r\nscheduler.templates.map_info_content = function(event){\r\n return `
Event's text: ${event.text}\r\n\t\t\t\t
Location: ${event.event_location}
\r\n\t\t\t\t
Starts: ${scheduler.templates.tooltip_date_format(event.start_date)}
\r\n\t\t\t\t
Ends: ${scheduler.templates.tooltip_date_format(event.end_date)}
\r\n\t\t\t
`;\r\n};\r\nscheduler.date.map_start = function(d) {\r\n\treturn d;\r\n};\r\n\r\nfunction setupMapView(scheduler) {\r\n\t// Initialization logic, possibly including creation of a new mapAdapter\r\n\tmapAdapter = scheduler.ext.mapView.createAdapter();\r\n\tattachSchedulerEvents();\r\n}\r\nasync function addEventWithLocation(event: ICalendarEvent, mapAdapter: IMapAdapter){\r\n\tlet coordinates = await mapAdapter.resolveAddress(event.event_location);\r\n\tevent.lat = coordinates.lat;\r\n\tevent.lng = coordinates.lng;\r\n\tmapAdapter.removeEventMarker(String(event.id));\r\n\tmapAdapter.addEventMarker(event);\r\n\treturn event;\r\n}\r\nfunction setUserLocation(options: IMapSettings, adapter: IMapAdapter): void{\r\n\tif (options.resolve_user_location) {\r\n\t\tif (navigator.geolocation) {\r\n\t\t\tnavigator.geolocation.getCurrentPosition(function(position) {\r\n\t\t\t\tadapter.setView(position.coords.latitude, position.coords.longitude, options.zoom_after_resolve || options.initial_zoom);\r\n\t\t\t});\r\n\t\t}\r\n\t} else {\r\n\t\tadapter.setView(options.initial_position.lat, options.initial_position.lng, options.initial_zoom);\r\n\t}\r\n}\r\nscheduler.dblclick_dhx_map_area = function(e) {\r\n\tlet eventNode = e.target.closest(`[${scheduler.config.event_attribute}]`);\r\n\tif (eventNode){\r\n\t\tlet eventId = eventNode.getAttribute(`${scheduler.config.event_attribute}`);\r\n\t\tscheduler.showLightbox(eventId);\r\n\t}\r\n\tif (!this.config.readonly && this.config.dblclick_create && !eventNode) {\r\n\t\tthis.addEventNow({\r\n\t\t\tstart_date: scheduler.config.map_start,\r\n\t\t\tend_date: scheduler.date.add( scheduler.config.map_start, scheduler.config.time_step, \"minute\"),\r\n\t\t});\r\n\t}\t\r\n};\r\n\r\nfunction attachSchedulerEvents() { \r\n eventHandlerIds.push(\r\n\tscheduler.attachEvent(\"onEventSave\",function(id,ev,is_new){\r\n\t\tlet unmodifiedEvent = scheduler.getEvent(id);\r\n\t\tif (unmodifiedEvent && unmodifiedEvent.event_location != ev.event_location) {\r\n\t\t\tscheduler._eventLocationChanged = true;\r\n\t\t}\r\n\t\treturn true;\r\n\t}),\r\n scheduler.attachEvent(\"onEventChanged\", (id, event) => {\r\n\t\tconst {start_date, end_date} = event;\r\n\t\tconst {min_date, max_date} = scheduler.getState();\r\n\t\tif(start_date.valueOf() < max_date.valueOf() && end_date.valueOf() > min_date.valueOf()){\r\n\t\t\tif (mapAdapter) {\r\n\t\t\t\tif (scheduler.config.map_settings.resolve_event_location && event.event_location && !scheduler._latLngUpdate ) {\r\n\t\t\t\t \taddEventWithLocation(event, mapAdapter);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmapAdapter.updateEventMarker(event);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._latLngUpdate = false;\r\n\t\treturn true;\r\n }),\r\n\tscheduler.attachEvent(\"onEventIdChange\", function(old_id,new_id){\r\n\t\tlet newIdEvent = scheduler.getEvent(new_id);\r\n\t\tmapAdapter?.removeEventMarker(old_id);\r\n\t\tmapAdapter?.addEventMarker(newIdEvent);\r\n\t}),\r\n scheduler.attachEvent(\"onEventAdded\", (id, event) => {\r\n\t\tconst {start_date, end_date} = event;\r\n\t\tconst {min_date, max_date} = scheduler.getState();\r\n\t\tif(start_date.valueOf() < max_date.valueOf() && end_date.valueOf() > min_date.valueOf()){\r\n \t\tif (mapAdapter) {\r\n\t\t\t\tif (scheduler.config.map_settings.resolve_event_location && event.event_location && scheduler._eventLocationChanged) {\r\n\t\t\t\t\taddEventWithLocation(event, mapAdapter);\r\n\t\t\t\t\tscheduler._eventLocationChanged = false;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmapAdapter.addEventMarker(event);\r\n\t\t\t\t\tmapAdapter.onEventClick(event);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n }),\r\n scheduler.attachEvent(\"onClick\", function (id, e){\r\n\t\tconst event = scheduler.getEvent(id);\r\n\t\tif (mapAdapter && event) mapAdapter.onEventClick(event);\r\n\t\treturn false;\r\n }),\r\n scheduler.attachEvent(\"onBeforeEventDelete\", (id, event) => {\r\n\t\tif (mapAdapter) {\r\n\t\t\tmapAdapter.removeEventMarker(id);\r\n\t\t}\r\n\t\treturn true;\r\n })\r\n );\r\n}\r\nfunction detachSchedulerEvents() {\r\n\teventHandlerIds.forEach(id => scheduler.detachEvent(id));\r\n\teventHandlerIds = [];\r\n}\r\n\r\nscheduler.attachEvent(\"onSchedulerReady\", function() {\r\n\r\n\tif(scheduler.config.map_initial_zoom !== undefined){\r\n\t\tscheduler.config.map_settings.initial_zoom = scheduler.config.map_initial_zoom;\r\n\t}\r\n\tif(scheduler.config.map_zoom_after_resolve !== undefined){\r\n\t\tscheduler.config.map_settings.zoom_after_resolve = scheduler.config.map_zoom_after_resolve;\r\n\t}\r\n\tif(scheduler.config.map_infowindow_max_width !== undefined){\r\n\t\tscheduler.config.map_settings.info_window_max_width = scheduler.config.map_infowindow_max_width;\r\n\t}\r\n\tif(scheduler.config.map_resolve_user_location !== undefined){\r\n\t\tscheduler.config.map_settings.resolve_user_location = scheduler.config.map_resolve_user_location;\r\n\t}\r\n\tif(scheduler.config.map_view_provider !== undefined){\r\n\t\tscheduler.config.map_settings.view_provider = scheduler.config.map_view_provider;\r\n\t}\r\n\tif(scheduler.config.map_type !== undefined){\r\n\t\tscheduler.config.map_settings.type = scheduler.config.map_type;\r\n\t}\r\n\tif(scheduler.config.map_resolve_event_location !== undefined){\r\n\t\tscheduler.config.map_settings.resolve_event_location = scheduler.config.map_resolve_event_location;\r\n\t}\r\n\tscheduler.ext.mapView.currentAdapter = scheduler.config.map_view_provider;\r\n\r\n\tlet map = document.createElement('div');\r\n\tmap.className = 'mapContainer';\r\n\tmap.id = 'mapContainer';\r\n\tmap.style.display = \"none\";\r\n\tmap.style.zIndex = \"1\";\r\n\tscheduler._obj.appendChild(map);\r\n\r\n\tconst old = scheduler.render_data;\r\n\tscheduler.render_data = function(evs, hold) {\r\n\t\tif (this._mode == \"map\") {\r\n\t\t\tfill_map_tab();\r\n\t\t\tlet events = scheduler.get_visible_events();\r\n\t\t\tif (mapAdapter) {\r\n\t\t\t\tmapAdapter.clearEventMarkers();\r\n\t\t\t\tevents.forEach((event) => mapAdapter?.addEventMarker(event));\r\n\t\t\t}\r\n\t\t} else\r\n\t\t\treturn old.apply(this, arguments);\r\n\t};\r\n\r\n\tscheduler.map_view = function(mode) {\r\n\t\tscheduler._els.dhx_cal_data[0].style.width = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\tscheduler._min_date = scheduler.config.map_start || (scheduler._currentDate());\r\n\t\tscheduler._max_date = scheduler.config.map_end || scheduler.date.add(scheduler._currentDate(), 1, \"year\");\r\n\t\tscheduler._table_view = true;\r\n\t\tset_full_view(mode);\r\n\t\tlet mapContainer = document.getElementById('mapContainer');\r\n\t\t_setMapSize('mapContainer');\r\n\r\n\t\t// creating the new logic\r\n\t\tif (mode && mapContainer) {\r\n\t\t\tmap.style.display = 'block';\r\n\t\t\tfill_map_tab();\r\n\t\t\t// case to display several maps and has the opportunity to switch between them\r\n\t\t\tif (scheduler.config.map_view_provider == scheduler.ext.mapView.currentAdapter) {\r\n\t\t\t\tmapAdapter?.destroy(mapContainer);\r\n\t\t\t\tsetupMapView(scheduler);\r\n\t\t\t\tmapAdapter?.initialize(mapContainer, scheduler.config.map_settings);\r\n\t\t\t} else {\r\n\t\t\t\tmapAdapter?.destroy(mapContainer);\r\n\t\t\t\tsetupMapView(scheduler);\r\n\t\t\t\tmapAdapter?.initialize(mapContainer, scheduler.config.map_settings);\r\n\t\t\t \tscheduler.ext.mapView.currentAdapter = scheduler.config.map_view_provider;\r\n\t\t\t}\r\n\t\t\tif(mapAdapter) {\r\n\t\t\t\tsetUserLocation(scheduler.config.map_settings, mapAdapter);\r\n\t\t\t}\t\r\n\t\t} else {\r\n\t\t\tmap.style.display = 'none';\r\n\t\t\tscheduler._els.dhx_cal_data[0].style.width = \"100%\";\r\n\t\t \tif (mapAdapter && mapContainer ) {\r\n\t\t\t\tmapAdapter.destroy(mapContainer);\r\n\t\t\t\tmapAdapter = null;\r\n\t\t\t\tscheduler.ext.mapView.currentAdapter = scheduler.config.map_view_provider;\r\n\t\t }\r\n\t\t \tdetachSchedulerEvents();\r\n\t\t}\r\n\t};\r\n\r\n\tfunction _setMapSize(elem_id) { //input - map's div id\r\n\t\tlet map = document.getElementById(elem_id);\r\n\t\tif (map) {\r\n\t\t\tconst nav_height = scheduler.$container.querySelector(\".dhx_cal_navline\").offsetHeight;\r\n\t\t\tlet height = scheduler.$container.querySelector(\".dhx_cal_data\").offsetHeight + scheduler.$container.querySelector(\".dhx_cal_header\").offsetHeight;\r\n\t\t\tif (height < 0)\r\n\t\t\t\theight = 0;\r\n\t\t\tlet width = scheduler._x - scheduler.xy.map_date_width - scheduler.xy.map_description_width - 1;\r\n\t\t\tif (width < 0)\r\n\t\t\t\twidth = 0;\r\n\t\t\tmap.style.height = height + 'px';\r\n\t\t\tmap.style.width = width + 'px';\r\n\t\t\tmap.style.position = \"absolute\";\r\n\t\t\tmap.style.top = nav_height + \"px\";\r\n\t\t\tif (scheduler.config.rtl) {\r\n\t\t\t\tmap.style.marginRight = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\t\t} else {\r\n\t\t\t\tmap.style.marginLeft = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\t\t}\r\n\t\t\tmap.style.marginTop = (scheduler.xy.nav_height + 2) + 'px';\r\n\t\t}\r\n\t}\t\r\n\tfunction fill_map_tab() {\r\n\t\t//select events for which data need to be printed\r\n\t\tlet events = scheduler.get_visible_events();\r\n\t\tevents.sort(function(a, b) {\r\n\t\t\tif(a.start_date.valueOf()==b.start_date.valueOf())\r\n\t\t\t\treturn a.id>b.id?1:-1;\r\n\t\t\treturn a.start_date>b.start_date?1:-1;\r\n\t\t});\r\n\r\n\t\t//generate html for the view\r\n\t\tlet ariaAttr = scheduler._waiAria.mapAttrString();\r\n\r\n\t\tlet html = \"
\";\r\n\t\tfor (let i = 0; i < events.length; i++) {\r\n\t\t\tlet ev = events[i];\r\n\t\t\tlet event_class = (ev.id == scheduler._selected_event_id) ? 'dhx_map_line highlight' : 'dhx_map_line';\r\n\t\t\tlet bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\t\t\tlet color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\t\t\tlet ariaAttr = scheduler._waiAria.mapRowAttrString(ev);\r\n\t\t\tlet ariaButtonAttr = scheduler._waiAria.mapDetailsBtnString();\r\n\r\n\t\t\thtml += \"
\" + scheduler.templates.map_time(ev.start_date, ev.end_date, ev) + \"
\";\r\n\t\t\thtml += `
\r\n\t\t\t\r\n\t\t\t
`;\r\n\t\t\thtml += \"
\" + scheduler.templates.map_text(ev.start_date, ev.end_date, ev) + \"
\"; // -25 = icon size 20 and padding 5\r\n\t\t}\r\n\t\thtml += \"
\";\r\n\r\n\t\t//render html\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = 0; //fix flickering in FF\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t//\tscheduler._els[\"dhx_cal_data\"][0].style.width = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\r\n\t\tlet t = scheduler._els[\"dhx_cal_data\"][0].firstChild.childNodes;\r\n\r\n\t\tlet dateElement = scheduler._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML=scheduler.templates[scheduler._mode + \"_date\"](scheduler._min_date, scheduler._max_date, scheduler._mode);\r\n\t\t}\r\n\r\n\t\tscheduler._rendered = [];\r\n\t\tfor (let i = 0; i < t.length - 2; i++) {\r\n\t\t\tscheduler._rendered[i] = t[i];\r\n\t\t}\r\n\t}\r\n\tfunction set_full_view(mode) {\r\n\t\tif (mode) {\r\n\t\t\tconst l = scheduler.locale.labels;\r\n\t\t\tscheduler._els[\"dhx_cal_header\"][0].innerHTML = \"
\" + l.date + \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"
\" + l.description + \"
\";\r\n\t\t\tscheduler._table_view = true;\r\n\t\t\tscheduler.set_sizes();\r\n\t\t}\r\n\t}\r\n\t\r\n\tscheduler.attachEvent(\"onLocationError\", function (id){\r\n\t\talert(\"Location can't be found\");\r\n\t\treturn google.maps.LatLng(51.477840, -0.001492); \r\n\t\t//the coordinates of the Greenwich Royal Observatory\r\n\t})\r\n\tlet _updateEventLocation = async function(event) {\r\n\t\tif (mapAdapter){\r\n\t\t\tconst coordinates = await mapAdapter.resolveAddress(event.event_location);\r\n\t\t\tif (coordinates.lat && coordinates.lng) {\r\n\t\t\t\tevent.lat = +coordinates.lat;\r\n\t\t\t\tevent.lng = +coordinates.lng;\r\n\t\t\t} else {\r\n\t\t\t\tscheduler.callEvent(\"onLocationError\", [event.id]);\r\n\t\t\t\tevent.lng = scheduler.config.map_settings.error_position.lng;\r\n\t\t\t\tevent.lat = scheduler.config.map_settings.error_position.lat;\r\n\t\t\t}\r\n\t\t\tscheduler._latLngUpdate = true;\r\n\t\t\tscheduler.callEvent(\"onEventChanged\", [event.id, event]);\r\n\t\t}\r\n\t};\r\n\tlet _delay = function(method, object, params, delay) {\r\n\t\tsetTimeout(function() {\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tlet ret = method.apply(object, params);\r\n\t\t\tmethod = object = params = null;\r\n\t\t\treturn ret;\r\n\t\t}, delay || 1);\r\n\t};\r\n\tscheduler._event_resolve_delay = 1500;\r\n\tscheduler.attachEvent(\"onEventLoading\", function(event) {\r\n\t\tif (event.lat && event.lng) {\r\n\t\t\tevent.lat = +event.lat;\r\n\t\t\tevent.lng = +event.lng;\r\n\t\t}\r\n\t\tif (scheduler.config.map_settings.resolve_event_location && event.event_location && !event.lat && !event.lng) { // don't delete !event.lat && !event.lng as location could change\r\n\t\t\tscheduler._event_resolve_delay += 1500;\r\n\t\t\t_delay(_updateEventLocation, this, [event], scheduler._event_resolve_delay);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n})\r\n\r\n}","export default function(scheduler){\r\n\r\nconst minicalDomEvents = scheduler._createDomEventScope();\r\n\t\r\n\r\nscheduler.config.minicalendar = {\r\n\tmark_events: true\r\n};\r\nscheduler._synced_minicalendars = [];\r\nscheduler.renderCalendar = function(obj, _prev, is_refresh) {\r\n\tvar cal = null;\r\n\tvar date = obj.date || (scheduler._currentDate());\r\n\tif (typeof date == \"string\")\r\n\t\tdate = this.templates.api_date(date);\r\n\r\n\tif (!_prev) {\r\n\t\tvar cont = obj.container;\r\n\t\tvar pos = obj.position;\r\n\r\n\t\tif (typeof cont == \"string\")\r\n\t\t\tcont = document.getElementById(cont);\r\n\r\n\t\tif (typeof pos == \"string\")\r\n\t\t\tpos = document.getElementById(pos);\r\n\t\tif (pos && (typeof pos.left == \"undefined\" && typeof pos.right == \"undefined\")) {\r\n\t\t\tvar tpos = scheduler.$domHelpers.getOffset(pos);\r\n\t\t\tpos = {\r\n\t\t\t\ttop: tpos.top + pos.offsetHeight,\r\n\t\t\t\tleft: tpos.left\r\n\t\t\t};\r\n\t\t}\r\n\t\tif (!cont)\r\n\t\t\tcont = scheduler._get_def_cont(pos);\r\n\r\n\t\tcal = this._render_calendar(cont, date, obj);\r\n\t\r\n\t\tif (!cal.$_eventAttached) {\r\n\t\t\tcal.$_eventAttached = true;\r\n\t\t\tminicalDomEvents.attach(cal, \"click\", (function(e) {\r\n\t\t\t\tvar src = e.target || e.srcElement;\r\n\r\n\t\t\t\tvar $dom = scheduler.$domHelpers;\r\n\t\t\t\tif ($dom.closest(src, \".dhx_month_head\")) {\r\n\t\t\t\t\tif (!$dom.closest(src, \".dhx_after\") && !$dom.closest(src, \".dhx_before\")) {\r\n\r\n\t\t\t\t\t\tvar cellRoot = $dom.closest(src, \"[data-cell-date]\");\r\n\t\t\t\t\t\tvar dateAttribute = cellRoot.getAttribute(\"data-cell-date\");\r\n\t\t\t\t\t\tvar newDate = scheduler.templates.parse_date(dateAttribute);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tscheduler.unmarkCalendar(this);\r\n\t\t\t\t\t\tscheduler.markCalendar(this, newDate, \"dhx_calendar_click\");\r\n\t\t\t\t\t\tthis._last_date = newDate;\r\n\t\t\t\t\t\tif (this.conf.handler) this.conf.handler.call(scheduler, newDate, this);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}).bind(cal));\r\n\t\t}\r\n\t\r\n\t} else {\r\n\t\tcal = this._render_calendar(_prev.parentNode, date, obj, _prev);\r\n\t\tscheduler.unmarkCalendar(cal);\r\n\t}\r\n\r\n\tif (scheduler.config.minicalendar.mark_events) {\r\n\t\tvar start = scheduler.date.month_start(date);\r\n\t\tvar end = scheduler.date.add(start, 1, \"month\");\r\n\t\tvar evs = this.getEvents(start, end);\r\n\t\tvar filter = this[\"filter_\" + this._mode];\r\n\t\tvar markedDates = {};\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tif (filter && !filter(ev.id, ev))\r\n\t\t\t\tcontinue;\r\n\t\t\tvar d = ev.start_date;\r\n\t\t\tif (d.valueOf() < start.valueOf())\r\n\t\t\t\td = start;\r\n\t\t\td = scheduler.date.date_part(new Date(d.valueOf()));\r\n\t\t\twhile (d < ev.end_date) {\r\n\t\t\t\tif(!markedDates[+d]) {\r\n\t\t\t\t\tmarkedDates[+d] = true;\r\n\t\t\t\t\tthis.markCalendar(cal, d, \"dhx_year_event\");\r\n\t\t\t\t}\r\n\t\t\t\td = this.date.add(d, 1, \"day\");\r\n\t\t\t\tif (d.valueOf() >= end.valueOf())\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tthis._markCalendarCurrentDate(cal);\r\n\r\n\tcal.conf = obj;\r\n\tif (obj.sync && !is_refresh)\r\n\t\tthis._synced_minicalendars.push(cal);\r\n\r\n\tif(!cal.conf._on_xle_handler){\r\n\t\tcal.conf._on_xle_handler = scheduler.attachEvent(\"onXLE\", function refreshOnLoad(){\r\n\t\t\tscheduler.updateCalendar(cal, cal.conf.date);\r\n\t\t});\r\n\t}\r\n\r\n\tif(this.config.wai_aria_attributes && this.config.wai_aria_application_role){\r\n\t\tcal.setAttribute(\"role\", \"application\");\r\n\t}\r\n\r\n\treturn cal;\r\n};\r\nscheduler._get_def_cont = function(pos) {\r\n\tif (!this._def_count) {\r\n\t\tthis._def_count = document.createElement(\"div\");\r\n\t\tthis._def_count.className = \"dhx_minical_popup\";\r\n\t\tscheduler.event(this._def_count, \"click\", function(e) { e.cancelBubble = true; });\r\n\t\tdocument.body.appendChild(this._def_count);\r\n\t}\r\n\r\n\tif(pos.left){\r\n\t\tthis._def_count.style.left = pos.left + \"px\";\r\n\t}\r\n\tif(pos.right){\r\n\t\tthis._def_count.style.right = pos.right + \"px\";\r\n\t}\r\n\tif(pos.top){\r\n\t\tthis._def_count.style.top = pos.top + \"px\";\r\n\t}\r\n\tif(pos.bottom){\r\n\t\tthis._def_count.style.bottom = pos.bottom + \"px\";\r\n\t}\r\n\r\n\tthis._def_count._created = new Date();\r\n\r\n\treturn this._def_count;\r\n};\r\nscheduler._locateCalendar = function(cal, date) {\r\n\tif (typeof date == \"string\")\r\n\t\tdate = scheduler.templates.api_date(date);\r\n\r\n\tif(+date > +cal._max_date || +date < +cal._min_date)\r\n\t\treturn null;\r\n\r\n\tvar table = cal.querySelector(\".dhx_year_body\").childNodes[0];\r\n\r\n\tvar weekNum = 0;\r\n\tvar dat = new Date(cal._min_date);\r\n\twhile(+this.date.add(dat, 1, \"week\") <= +date){\r\n\t\tdat = this.date.add(dat, 1, \"week\");\r\n\t\tweekNum++;\r\n\t}\r\n\r\n\tvar sm = scheduler.config.start_on_monday;\r\n\tvar day = (date.getDay() || (sm ? 7 : 0)) - (sm ? 1 : 0);\r\n\r\n\tconst dayCell = table.querySelector(`.dhx_cal_month_row:nth-child(${weekNum + 1}) .dhx_cal_month_cell:nth-child(${day + 1})`);\r\n\tif(dayCell) {\r\n\t\treturn dayCell.firstChild;\r\n\t} else {\r\n\t\treturn null;\r\n\t}\r\n};\r\nscheduler.markCalendar = function(cal, date, css) {\r\n\tvar div = this._locateCalendar(cal, date);\r\n\tif(!div)\r\n\t\treturn;\r\n\r\n\tdiv.className += \" \" + css;\r\n};\r\nscheduler.unmarkCalendar = function(cal, date, css) {\r\n\tdate = date || cal._last_date;\r\n\tcss = css || \"dhx_calendar_click\";\r\n\tif (!date) return;\r\n\tvar el = this._locateCalendar(cal, date);\r\n\tif(!el)\r\n\t\treturn;\r\n\tel.className = (el.className || \"\").replace(RegExp(css, \"g\"));\r\n};\r\nscheduler._week_template = function(width) {\r\n\tvar summ = (width || 250);\r\n\tvar left = 0;\r\n\r\n\tvar week_template = document.createElement(\"div\");\r\n\tvar dummy_date = this.date.week_start(scheduler._currentDate());\r\n\tfor (var i = 0; i < 7; i++) {\r\n\t\tthis._cols[i] = Math.floor(summ / (7 - i));\r\n\t\tthis._render_x_header(i, left, dummy_date, week_template);\r\n\t\tdummy_date = this.date.add(dummy_date, 1, \"day\");\r\n\t\tsumm -= this._cols[i];\r\n\t\tleft += this._cols[i];\r\n\t}\r\n\tweek_template.lastChild.className += \" dhx_scale_bar_last\";\r\n\treturn week_template;\r\n};\r\nscheduler.updateCalendar = function(obj, sd) {\r\n\tobj.conf.date = sd;\r\n\tthis.renderCalendar(obj.conf, obj, true);\r\n};\r\nscheduler._mini_cal_arrows = [\" \", \" \"];\r\nscheduler._render_calendar = function(obj, sd, conf, previous) {\r\n\t/*store*/\r\n\tvar ts = scheduler.templates;\r\n\tvar temp = this._cols;\r\n\tthis._cols = [];\r\n\tvar temp2 = this._mode;\r\n\tthis._mode = \"calendar\";\r\n\tvar temp3 = this._colsS;\r\n\tthis._colsS = {height: 0};\r\n\tvar temp4 = new Date(this._min_date);\r\n\tvar temp5 = new Date(this._max_date);\r\n\tvar temp6 = new Date(scheduler._date);\r\n\tvar temp7 = ts.month_day;\r\n\tvar temp8 = this._ignores_detected; this._ignores_detected = 0;\r\n\tts.month_day = ts.calendar_date;\r\n\r\n\tsd = this.date.month_start(sd);\r\n\tvar week_template = this._week_template(obj.offsetWidth - 1 - this.config.minicalendar.padding );\r\n\r\n\tvar d;\r\n\tif (previous){\r\n\t\td = previous;\r\n\t} else {\r\n\t\td = document.createElement(\"div\");\r\n\t\td.className = \"dhx_cal_container dhx_mini_calendar\";\r\n\t}\r\n\td.setAttribute(\"date\", this._helpers.formatDate(sd));\r\n\td.innerHTML = \"
\" +\r\n\t\t\t\"
\" : \"'>\") +\r\n\t\t\t\"
\"+(week_template ? week_template.innerHTML : \"\")+\"
\" +\r\n\t\t\t\"
\" +\r\n\t\t\"
\";\r\n\tvar header = d.querySelector(\".dhx_year_month\");\r\n\tvar weekHeader = d.querySelector(\".dhx_year_week\");\r\n\tvar body = d.querySelector(\".dhx_year_body\");\r\n\r\n\theader.innerHTML = this.templates.calendar_month(sd);\r\n\tif (conf.navigation) {\r\n\t\tvar move_minicalendar_date = function(calendar, diff) {\r\n\t\t\tvar date = scheduler.date.add(calendar._date, diff, \"month\");\r\n\t\t\tscheduler.updateCalendar(calendar, date);\r\n\t\t\tif (scheduler._date.getMonth() == calendar._date.getMonth() && scheduler._date.getFullYear() == calendar._date.getFullYear()) {\r\n\t\t\t\tscheduler._markCalendarCurrentDate(calendar);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tvar css_classnames = [\"dhx_cal_prev_button\", \"dhx_cal_next_button\"];\r\n\t\tvar css_texts = [\"left:1px;top:4px;position:absolute;\", \"left:auto; right:1px;top:4px;position:absolute;\"];\r\n\t\tvar diffs = [-1, 1];\r\n\t\tvar handler = function(diff) {\r\n\t\t\treturn function() {\t\r\n\t\t\t\tif (conf.sync) {\r\n\t\t\t\t\tvar calendars = scheduler._synced_minicalendars;\r\n\t\t\t\t\tfor (var k = 0; k < calendars.length; k++) {\r\n\t\t\t\t\t\tmove_minicalendar_date(calendars[k], diff);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (scheduler.config.rtl) {\r\n\t\t\t\t\t\tdiff = -diff;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmove_minicalendar_date(d, diff);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t};\r\n\t\tvar labels = [scheduler.locale.labels.prev, scheduler.locale.labels.next];\r\n\t\tfor (var j = 0; j < 2; j++) {\r\n\t\t\tvar arrow = document.createElement(\"div\");\r\n\t\t\t//var diff = diffs[j];\r\n\t\t\tarrow.className = css_classnames[j];\r\n\r\n\t\t\tscheduler._waiAria.headerButtonsAttributes(arrow, labels[j]);\r\n\r\n\t\t\tarrow.style.cssText = css_texts[j];\r\n\t\t\tarrow.innerHTML = this._mini_cal_arrows[j];\r\n\t\t\theader.appendChild(arrow);\r\n\t\t\tminicalDomEvents.attach(arrow, \"click\", handler(diffs[j]));\r\n\t\t}\r\n\t}\r\n\td._date = new Date(sd);\r\n\r\n\td.week_start = (sd.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;\r\n\r\n\tvar dd = d._min_date = this.date.week_start(sd);\r\n\td._max_date = this.date.add(d._min_date, 6, \"week\");\r\n\r\n\tthis._reset_month_scale(body, sd, dd, 6);\r\n\r\n\tif (!previous)\r\n\t\tobj.appendChild(d);\r\n\r\n\tweekHeader.style.height = (weekHeader.childNodes[0].offsetHeight - 1) + \"px\"; // dhx_year_week should have height property so that day dates would get correct position. dhx_year_week height = height of it's child (with the day name)\r\n\r\n\tvar headerId = scheduler.uid();\r\n\tscheduler._waiAria.minicalHeader(header, headerId);\r\n\tscheduler._waiAria.minicalGrid(d.querySelector(\".dhx_year_grid\"), headerId);\r\n\tscheduler._waiAria.minicalRow(weekHeader);\r\n\r\n\tvar dayHeaders = weekHeader.querySelectorAll(\".dhx_scale_bar\");\r\n\tfor(var i = 0; i < dayHeaders.length; i++){\r\n\t\tscheduler._waiAria.minicalHeadCell(dayHeaders[i]);\r\n\t}\r\n\tvar dayCells = body.querySelectorAll(\".dhx_cal_month_cell\");\r\n\tvar firstDate = new Date(dd);\r\n\tfor(var i = 0; i < dayCells.length; i++){\r\n\r\n\t\tscheduler._waiAria.minicalDayCell(dayCells[i], new Date(firstDate));\r\n\t\tfirstDate = scheduler.date.add(firstDate, 1, \"day\");\r\n\t}\r\n\r\n\tscheduler._waiAria.minicalHeader(header, headerId);\r\n\r\n\t/*restore*/\r\n\tthis._cols = temp;\r\n\tthis._mode = temp2;\r\n\tthis._colsS = temp3;\r\n\tthis._min_date = temp4;\r\n\tthis._max_date = temp5;\r\n\tscheduler._date = temp6;\r\n\tts.month_day = temp7;\r\n\tthis._ignores_detected = temp8;\r\n\treturn d;\r\n};\r\nscheduler.destroyCalendar = function(cal, force) {\r\n\tif (!cal && this._def_count && this._def_count.firstChild) {\r\n\t\tif (force || (new Date()).valueOf() - this._def_count._created.valueOf() > 500)\r\n\t\t\tcal = this._def_count.firstChild;\r\n\t}\r\n\tif (!cal) return;\r\n\tminicalDomEvents.detachAll();\r\n\t//cal.onclick = null;\r\n\tcal.innerHTML = \"\";\r\n\tif (cal.parentNode)\r\n\t\tcal.parentNode.removeChild(cal);\r\n\tif (this._def_count)\r\n\t\tthis._def_count.style.top = \"-1000px\";\r\n\r\n\tif(cal.conf && cal.conf._on_xle_handler)\r\n\t\tscheduler.detachEvent(cal.conf._on_xle_handler);\r\n};\r\nscheduler.isCalendarVisible = function() {\r\n\tif (this._def_count && parseInt(this._def_count.style.top, 10) > 0)\r\n\t\treturn this._def_count;\r\n\treturn false;\r\n};\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tscheduler.event(document.body, \"click\", function() { scheduler.destroyCalendar(); });\r\n}, {once: true});\r\n\r\n\r\n\r\nscheduler.form_blocks.calendar_time = {\r\n\trender: function(sns) {\r\n\t\tvar html = \"\";\r\n\r\n\t\tvar cfg = scheduler.config;\r\n\t\tvar dt = this.date.date_part(scheduler._currentDate());\r\n\r\n\t\tvar last = 24 * 60, first = 0;\r\n\t\tif (cfg.limit_time_select) {\r\n\t\t\tfirst = 60 * cfg.first_hour;\r\n\t\t\tlast = 60 * cfg.last_hour + 1; // to include \"17:00\" option if time select is limited\r\n\t\t}\r\n\t\tdt.setHours(first / 60);\r\n\r\n\t\tsns._time_values = [];\r\n\t\thtml += \" \";\r\n\r\n\t\t//var full_day = scheduler.config.full_day;\r\n\r\n\t\treturn \"
\" + html + \"  –  \" + html + \"
\";\r\n\t},\r\n\tset_value: function(node, value, ev, config) {\r\n\r\n\t\tvar inputs = node.getElementsByTagName(\"input\");\r\n\t\tvar selects = node.getElementsByTagName(\"select\");\r\n\t\tvar start_date,\r\n\t\t\tend_date;\r\n\r\n\t\tvar _init_once = function(inp, date, number) {\r\n\t\t\tscheduler.event(inp, \"click\", function() {\r\n\t\t\t\tscheduler.destroyCalendar(null, true);\r\n\t\t\t\tscheduler.renderCalendar({\r\n\t\t\t\t\tposition: inp,\r\n\t\t\t\t\tdate: new Date(this._date),\r\n\t\t\t\t\tnavigation: true,\r\n\t\t\t\t\thandler: function(new_date) {\r\n\t\t\t\t\t\tinp.value = scheduler.templates.calendar_time(new_date);\r\n\t\t\t\t\t\tinp._date = new Date(new_date);\r\n\t\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t\t\tif (scheduler.config.event_duration && scheduler.config.auto_end_date && number === 0) { //first element = start date\r\n\t\t\t\t\t\t\t_update_minical_select();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t};\r\n\r\n\t\tif (scheduler.config.full_day) {\r\n\t\t\tif (!node._full_day) {\r\n\t\t\t\tvar html = \"\";\r\n\t\t\t\tif (!scheduler.config.wide_form)\r\n\t\t\t\t\thtml = node.previousSibling.innerHTML + html;\r\n\t\t\t\tnode.previousSibling.innerHTML = html;\r\n\t\t\t\tnode._full_day = true;\r\n\t\t\t}\r\n\t\t\tvar input = node.previousSibling.getElementsByTagName(\"input\")[0];\r\n\r\n\t\t\tvar isFulldayEvent = (scheduler.date.time_part(ev.start_date) === 0 && scheduler.date.time_part(ev.end_date) === 0);\r\n\t\t\tinput.checked = isFulldayEvent;\r\n\r\n\t\t\tselects[0].disabled = input.checked;\r\n\t\t\tselects[1].disabled = input.checked;\r\n\r\n\t\t\tif (!input.$_eventAttached) {\r\n\t\t\t\tinput.$_eventAttached = true;\r\n\t\t\t\tscheduler.event(input, \"click\", function() {\r\n\t\t\t\t\tif (input.checked === true) {\r\n\t\t\t\t\t\tvar obj = {};\r\n\t\t\t\t\t\tscheduler.form_blocks.calendar_time.get_value(node, obj);\r\n\r\n\t\t\t\t\t\tstart_date = scheduler.date.date_part(obj.start_date);\r\n\t\t\t\t\t\tend_date = scheduler.date.date_part(obj.end_date);\r\n\r\n\t\t\t\t\t\tif (+end_date == +start_date || (+end_date >= +start_date && (ev.end_date.getHours() !== 0 || ev.end_date.getMinutes() !== 0)))\r\n\t\t\t\t\t\t\tend_date = scheduler.date.add(end_date, 1, \"day\");\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tstart_date = null;\r\n\t\t\t\t\t\tend_date = null;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar start = start_date || ev.start_date;\r\n\t\t\t\t\tvar end = end_date || ev.end_date;\r\n\t\t\t\t\t_attach_action(inputs[0], start);\r\n\t\t\t\t\t_attach_action(inputs[1], end);\r\n\t\t\t\t\tselects[0].value = start.getHours() * 60 + start.getMinutes();\r\n\t\t\t\t\tselects[1].value = end.getHours() * 60 + end.getMinutes();\r\n\r\n\t\t\t\t\tselects[0].disabled = input.checked;\r\n\t\t\t\t\tselects[1].disabled = input.checked;\r\n\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (scheduler.config.event_duration && scheduler.config.auto_end_date) {\r\n\r\n\t\t\tvar _update_minical_select = function () {\r\n\t\t\t\tif (!(scheduler.config.auto_end_date && scheduler.config.event_duration)){\r\n\t\t\t\t\t// setting may be disabled after the handler is attached\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tstart_date = scheduler.date.add(inputs[0]._date, selects[0].value, \"minute\");\r\n\t\t\t\tend_date = new Date(start_date.getTime() + (scheduler.config.event_duration * 60 * 1000));\r\n\r\n\t\t\t\tinputs[1].value = scheduler.templates.calendar_time(end_date);\r\n\t\t\t\tinputs[1]._date = scheduler.date.date_part(new Date(end_date));\r\n\r\n\t\t\t\tselects[1].value = end_date.getHours() * 60 + end_date.getMinutes();\r\n\t\t\t};\r\n\r\n\t\t\tif(!selects[0].$_eventAttached){\r\n\t\t\t\tselects[0].addEventListener(\"change\", _update_minical_select); // only update on first select should trigger update so user could define other end date if he wishes too\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction _attach_action(inp, date, number) {\r\n\t\t\t_init_once(inp, date, number);\r\n\t\t\tinp.value = scheduler.templates.calendar_time(date);\r\n\t\t\tinp._date = scheduler.date.date_part(new Date(date));\r\n\t\t}\r\n\r\n\t\t_attach_action(inputs[0], ev.start_date, 0);\r\n\t\t_attach_action(inputs[1], ev.end_date, 1);\r\n\t\t_init_once = function() {};\r\n\r\n\t\tfunction _round_minutes(date) {\r\n\t\t\tvar time_values = config._time_values;\r\n\t\t\tvar direct_value = date.getHours() * 60 + date.getMinutes();\r\n\t\t\tvar fixed_value = direct_value;\r\n\t\t\tvar value_found = false;\r\n\r\n\t\t\tfor (var k = 0; k < time_values.length; k++) {\r\n\t\t\t\tvar t_v = time_values[k];\r\n\t\t\t\tif (t_v === direct_value) {\r\n\t\t\t\t\tvalue_found = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif (t_v < direct_value)\r\n\t\t\t\t\tfixed_value = t_v;\r\n\t\t\t}\r\n\r\n\t\t\tif(!(value_found || fixed_value))\r\n\t\t\t\treturn -1;\r\n\r\n\t\t\treturn (value_found) ? direct_value : fixed_value;\r\n\t\t}\r\n\r\n\t\tselects[0].value = _round_minutes(ev.start_date);\r\n\t\tselects[1].value = _round_minutes(ev.end_date);\r\n\r\n\t},\r\n\tget_value: function(node, ev) {\r\n\t\tvar inputs = node.getElementsByTagName(\"input\");\r\n\t\tvar selects = node.getElementsByTagName(\"select\");\r\n\r\n\t\tev.start_date = scheduler.date.add(inputs[0]._date, selects[0].value, \"minute\");\r\n\t\tev.end_date = scheduler.date.add(inputs[1]._date, selects[1].value, \"minute\");\r\n\r\n\t\tif (ev.end_date <= ev.start_date)\r\n\t\t\tev.end_date = scheduler.date.add(ev.start_date, scheduler.config.time_step, \"minute\");\r\n\t\treturn {\r\n\t\t\tstart_date: new Date(ev.start_date),\r\n\t\t\tend_date: new Date(ev.end_date)\r\n\t\t};\r\n\t},\r\n\tfocus: function(node) {\r\n\t}\r\n};\r\nscheduler.linkCalendar = function(calendar, datediff) {\r\n\tvar action = function() {\r\n\t\tvar date = scheduler._date;\r\n\t\tvar dateNew = new Date(date.valueOf());\r\n\t\tif (datediff) dateNew = datediff(dateNew);\r\n\t\tdateNew.setDate(1);\r\n\t\tscheduler.updateCalendar(calendar, dateNew);\r\n\t\treturn true;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", action);\r\n\tscheduler.attachEvent(\"onXLE\", action);\r\n\tscheduler.attachEvent(\"onEventAdded\", action);\r\n\tscheduler.attachEvent(\"onEventChanged\", action);\r\n\tscheduler.attachEvent(\"onEventDeleted\", action);\r\n\taction();\r\n};\r\n\r\nscheduler._markCalendarCurrentDate = function(calendar) {\r\n\tvar state = scheduler.getState();\r\n\tvar from = state.min_date;\r\n\tvar to = state.max_date;\r\n\tvar mode = state.mode;\r\n\r\n\tvar month_start = scheduler.date.month_start(new Date(calendar._date));\r\n\tvar month_end = scheduler.date.add(month_start, 1, \"month\");\r\n\r\n\tvar noHighlight = {\r\n\t\t\"month\":true,\r\n\t\t\"year\":true,\r\n\t\t\"agenda\":true,\r\n\t\t\"grid\":true\r\n\t};\r\n\t// no need to highlight current dates for a large range views - agenda, year, etc.\r\n\tif(noHighlight[mode] || (from.valueOf() <= month_start.valueOf() && to.valueOf() >= month_end.valueOf())){\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar current = from;\r\n\twhile(current.valueOf() < to.valueOf()){\r\n\t\tif (month_start.valueOf() <= current.valueOf() && month_end > current) {\r\n\t\t\tscheduler.markCalendar(calendar, current, \"dhx_calendar_click\");\r\n\t\t}\r\n\t\tcurrent = scheduler.date.add(current, 1, \"day\");\r\n\t}\r\n};\r\n\r\nscheduler.attachEvent(\"onEventCancel\", function(){\r\n\tscheduler.destroyCalendar(null, true);\r\n});\r\n\r\nscheduler.attachEvent(\"onDestroy\", function(){\r\n\tscheduler.destroyCalendar();\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\tscheduler.xy.scroll_width = 0;\r\n\r\n\tvar old = scheduler.render_view_data;\r\n\tscheduler.render_view_data=function(){\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\t\tdata.firstChild._h_fix = true;\r\n\r\n\t\told.apply(scheduler,arguments);\r\n\r\n\r\n\r\n\t\tvar height = parseInt(data.style.height);\r\n\t\tdata.style.height=\"1px\";\r\n\t\tdata.style.height=data.scrollHeight+\"px\";\r\n\r\n\t\tthis._obj.style.height = this._obj.clientHeight + data.scrollHeight - height + \"px\";\r\n\t};\r\n\r\n\tvar old_s=scheduler._reset_month_scale;\r\n\tscheduler._reset_month_scale=function(a,b,c,d){\r\n\t\tvar dummy = {clientHeight:100};\r\n\t\told_s.apply(scheduler,[dummy,b,c,d]);\r\n\t\ta.innerHTML = dummy.innerHTML;\r\n\t};\r\n\r\n});\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Multisection\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\n\r\nfunction parseXMLOptions(loader, config){\r\n\tvar items = scheduler.ajax.xpath(\"//data/item\", loader.xmlDoc);\r\n\tvar ids = {};\r\n\tfor (var i = 0; i < items.length; i++) {\r\n\t\tids[items[i].getAttribute(config.map_to)] = true;\r\n\t}\r\n\treturn ids;\r\n}\r\n\r\nfunction parseJSONOptions(loader, config){\r\n\ttry{\r\n\t\tvar items = JSON.parse(loader.xmlDoc.responseText);\r\n\t\tvar ids = {};\r\n\t\tfor (var i = 0; i < items.length; i++) {\r\n\t\t\tvar option = items[i];\r\n\r\n\t\t\tids[option.value || option.key || option.id] = true;\r\n\t\t}\r\n\t\treturn ids;\r\n\t}catch(e){\r\n\t\treturn null;\r\n\t}\r\n}\r\n\r\nscheduler.form_blocks[\"multiselect\"]={\r\n\trender:function(sns) {\r\n\t\tvar css = \"dhx_multi_select_control dhx_multi_select_\"+sns.name;\r\n\t\tif(!!sns.vertical){\r\n\t\t\tcss += \" dhx_multi_select_control_vertical\";\r\n\t\t}\r\n\r\n\t\tvar _result = \"
\";\r\n\t\tfor (var i=0; i\"+sns.options[i].label+\"\";\r\n\t\t}\r\n\t\t_result += \"
\";\r\n\t\treturn _result;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\r\n\t\tvar _children = node.getElementsByTagName('input');\r\n\t\tfor(var i=0;i<_children.length;i++) {\r\n\t\t\t_children[i].checked = false; //unchecking all inputs on the form\r\n\t\t}\r\n\r\n\t\tfunction _mark_inputs(ids) { // ids = [ 0: undefined, 1: undefined, 2: true, 'custom_name': false ... ]\r\n\t\t\tvar _children = node.getElementsByTagName('input');\r\n\t\t\tfor(var i=0;i<_children.length; i++) {\r\n\t\t\t\t_children[i].checked = !! ids[_children[i].value];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar _ids = {};\r\n\t\tif (ev[config.map_to]) {\r\n\t\t\tvar results = (ev[config.map_to] + \"\").split(config.delimiter || scheduler.config.section_delimiter || \",\");\r\n\t\t\tfor (var i = 0; i < results.length; i++) {\r\n\t\t\t\t_ids[results[i]] = true;\r\n\t\t\t}\r\n\t\t\t_mark_inputs(_ids);\r\n\t\t} else {\r\n\t\t\tif (scheduler._new_event || !config.script_url)\r\n\t\t\t\treturn;\r\n\t\t\tvar divLoading = document.createElement('div');\r\n\t\t\tdivLoading.className = 'dhx_loading';\r\n\t\t\tdivLoading.style.cssText = \"position: absolute; top: 40%; left: 40%;\";\r\n\t\t\tnode.appendChild(divLoading);\r\n\r\n\t\t\tvar url = [\r\n\t\t\t\tconfig.script_url,\r\n\t\t\t\t(config.script_url.indexOf(\"?\") == -1 ? \"?\" : \"&\"),\r\n\t\t\t\t'dhx_crosslink_' + config.map_to + '=' + ev.id + '&uid=' + scheduler.uid()\r\n\t\t\t].join(\"\");\r\n\r\n\t\t\tscheduler.ajax.get(url, function(loader) {\r\n\t\t\t\tvar options = parseJSONOptions(loader, config);\r\n\t\t\t\tif(!options){\r\n\t\t\t\t\toptions = parseXMLOptions(loader, config);\r\n\t\t\t\t}\r\n\t\t\t\t_mark_inputs(options);\r\n\t\t\t\tnode.removeChild(divLoading);\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tvar _result = [];\r\n\t\tvar _children = node.getElementsByTagName(\"input\");\r\n\t\tfor(var i=0;i<_children.length;i++) {\r\n\t\t\tif(_children[i].checked)\r\n\t\t\t\t_result.push(_children[i].value);\r\n\t\t}\r\n\t\treturn _result.join(config.delimiter || scheduler.config.section_delimiter || \",\");\r\n\t},\r\n\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\r\n\tfunction backup(obj){\r\n\t\tvar t = function(){};\r\n\t\tt.prototype = obj;\r\n\t\treturn t;\r\n\t}\r\n\r\n\tvar old = scheduler._load;\r\n\tscheduler._load=function(url,from){\r\n\t\turl=url||this._load_url;\r\n\t\tif (typeof url == \"object\"){\r\n\t\t\tvar t = backup(this._loaded);\r\n\t\t\tfor (var i=0; i < url.length; i++) {\r\n\t\t\t\tthis._loaded=new t();\r\n\t\t\t\told.call(this,url[i],from);\r\n\t\t\t}\r\n\t\t} else\r\n\t\t\told.apply(this,arguments);\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\t/* global Backbone */\r\n\tvar cfg = {\r\n\t\tuse_id : false\r\n\t};\r\n\r\n\t//remove private properties\r\n\tfunction sanitize(ev){\r\n\t\tvar obj = {};\r\n\t\tfor (var key in ev)\r\n\t\t\tif (key.indexOf(\"_\") !== 0)\r\n\t\t\t\tobj[key] = ev[key];\r\n\r\n\t\tif (!cfg.use_id)\r\n\t\t\tdelete obj.id;\r\n\r\n\t\treturn obj;\r\n\t}\r\n\r\n\tvar update_timer;\r\n\tfunction update_view(){\r\n\t\tclearTimeout(update_timer);\r\n\t\tupdate_timer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler.updateView();\r\n\t\t},1);\r\n\t}\r\n\r\n\tfunction _start_ext_load(cal){\r\n\t\tcal._loading = true;\r\n\t\tcal._not_render = true;\r\n\r\n\t\tcal.callEvent(\"onXLS\", []);\r\n\t}\r\n\tfunction _finish_ext_load(cal){\r\n\t\tcal._not_render = false;\r\n\t\tif (cal._render_wait)\r\n\t\t\tcal.render_view_data();\r\n\t\tcal._loading = false;\r\n\r\n\t\tcal.callEvent(\"onXLE\", []);\r\n\t}\r\n\r\n\r\n\tfunction _get_id(model){\r\n\t\treturn cfg.use_id ? model.id : model.cid;\r\n\t}\r\n\r\nscheduler.backbone = function(events, config){\r\n\tif (config) cfg = config;\r\n\r\n\tevents.bind(\"change\", function(model, info){\r\n\t\tvar cid = _get_id(model);\r\n\t\tvar ev = scheduler._events[cid] = model.toJSON();\r\n\t\tev.id = cid;\r\n\r\n\t\tscheduler._init_event(ev);\r\n\t\tupdate_view();\r\n\t});\r\n\tevents.bind(\"remove\", function(model, changes){\r\n\t\tvar cid = _get_id(model);\r\n\t\tif (scheduler._events[cid])\r\n\t\t\tscheduler.deleteEvent(cid);\r\n\t});\r\n\r\n\tvar queue = [];\r\n\tfunction add_from_queue(){\r\n\t\tif(scheduler.$destroyed){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (queue.length){\r\n\t\t\tscheduler.parse(queue, \"json\");\r\n\t\t\tqueue = [];\r\n\t\t}\r\n\t}\r\n\r\n\tevents.bind(\"add\", function(model, changes){\r\n\t\tvar cid = _get_id(model);\r\n\t\tif (!scheduler._events[cid]){\r\n\t\t\tvar ev = model.toJSON();\r\n\t\t\tev.id = cid;\r\n\t\t\tscheduler._init_event(ev);\r\n\r\n\t\t\tqueue.push(ev);\r\n\t\t\tif (queue.length == 1)\r\n\t\t\t\tsetTimeout(add_from_queue,1);\r\n\t\t}\r\n\t});\r\n\r\n\tevents.bind(\"request\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_start_ext_load(scheduler);\r\n\t});\r\n\tevents.bind(\"sync\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_finish_ext_load(scheduler);\r\n\t});\r\n\tevents.bind(\"error\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_finish_ext_load(scheduler);\r\n\t});\r\n\r\n\r\n\tscheduler.attachEvent(\"onEventCreated\", function(id){\r\n\t\tvar ev = new events.model(scheduler.getEvent(id));\r\n\t\tscheduler._events[id] = ev.toJSON();\r\n\t\tscheduler._events[id].id = id;\r\n\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventAdded\", function(id){\r\n\t\tif (!events.get(id)){\r\n\t\t\tvar data = sanitize(scheduler.getEvent(id));\r\n\t\t\tvar model = new events.model(data);\r\n\r\n\t\t\tvar cid = _get_id(model);\r\n\t\t\tif (cid != id)\r\n\t\t\t\tthis.changeEventId(id, cid);\r\n\t\t\tevents.add(model);\r\n\t\t\tevents.trigger(\"scheduler:add\", model);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\", function(id){\r\n\t\tvar ev = events.get(id);\r\n\t\tvar upd = sanitize(scheduler.getEvent(id));\r\n\r\n\t\tev.set(upd);\r\n\t\tevents.trigger(\"scheduler:change\", ev);\r\n\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function(id){\r\n\t\tvar model = events.get(id);\r\n\t\tif (model){\r\n\t\t\tevents.trigger(\"scheduler:remove\", model);\r\n\t\t\tevents.remove(id);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\t/* global dhtmlDragAndDropObject, dhtmlx */\r\n// lame old code doesn't provide raw event object\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\t\tvar dragger = (new dhtmlDragAndDropObject());\r\n\t\tvar old = dragger.stopDrag;\r\n\t\tvar last_event;\r\n\t\tdragger.stopDrag = function(e) {\r\n\t\t\tlast_event = e;\r\n\t\t\treturn old.apply(this, arguments);\r\n\t\t};\r\n\r\n\t\tfunction on_drop(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml) {\r\n\r\n\t\t\tif (scheduler.checkEvent(\"onBeforeExternalDragIn\") && !scheduler.callEvent(\"onBeforeExternalDragIn\", [sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml, last_event]))\r\n\t\t\t\treturn;\r\n\r\n\t\t\tvar temp = scheduler.attachEvent(\"onEventCreated\", function (id) {\r\n\t\t\t\tif (!scheduler.callEvent(\"onExternalDragIn\", [id, sourceHtmlObject, last_event])) {\r\n\t\t\t\t\tthis._drag_mode = this._drag_id = null;\r\n\t\t\t\t\tthis.deleteEvent(id);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tvar action_data = scheduler.getActionData(last_event);\r\n\t\t\tvar event_data = {\r\n\t\t\t\tstart_date: new Date(action_data.date)\r\n\t\t\t};\r\n\r\n\t\t\t// custom views, need to assign section id, fix dates\r\n\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\tvar view_options = scheduler.matrix[scheduler._mode];\r\n\t\t\t\tevent_data[view_options.y_property] = action_data.section;\r\n\r\n\t\t\t\tvar pos = scheduler._locate_cell_timeline(last_event);\r\n\t\t\t\tevent_data.start_date = view_options._trace_x[pos.x];\r\n\t\t\t\tevent_data.end_date = scheduler.date.add(event_data.start_date, view_options.x_step, view_options.x_unit);\r\n\t\t\t}\r\n\t\t\tif (scheduler._props && scheduler._props[scheduler._mode]) {\r\n\t\t\t\tevent_data[scheduler._props[scheduler._mode].map_to] = action_data.section;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler.addEventNow(event_data);\r\n\r\n\t\t\tscheduler.detachEvent(temp);\r\n\t\t}\r\n\r\n\t\tdragger.addDragLanding(scheduler._els[\"dhx_cal_data\"][0], {\r\n\t\t\t_drag: function(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml) {\r\n\t\t\t\ton_drop(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml);\r\n\t\t\t},\r\n\t\t\t_dragIn: function(htmlObject, shtmlObject) {\r\n\t\t\t\treturn htmlObject;\r\n\t\t\t},\r\n\t\t\t_dragOut: function(htmlObject) {\r\n\t\t\t\treturn this;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(dhtmlx.DragControl) {\r\n\t\t\tdhtmlx.DragControl.addDrop(scheduler._els[\"dhx_cal_data\"][0], {\r\n\t\t\t\tonDrop: function (source, target, d, e) {\r\n\t\t\t\t\tvar sourceDhtmlx = dhtmlx.DragControl.getMaster(source);\r\n\t\t\t\t\tlast_event = e;\r\n\t\t\t\t\ton_drop(source, sourceDhtmlx, target, e.target || e.srcElement);\r\n\t\t\t\t},\r\n\r\n\t\t\t\tonDragIn: function (source, target, e) {\r\n\t\t\t\t\treturn target;\r\n\t\t\t\t}\r\n\t\t\t}, true);\r\n\t\t}\r\n\t});\r\n\r\n}","export default function(scheduler){\r\n\r\n\tvar dx, dy,\r\n\t\thtml_regexp = new RegExp(\"<[^>]*>\", \"g\"),\r\n\t\tnewline_regexp = new RegExp(\"]*>\", \"g\");\r\n\r\n\tfunction clean_html(val) {\r\n\t\treturn val.replace(newline_regexp, \"\\n\").replace(html_regexp, \"\");\r\n\t}\r\n\r\n\tfunction x_norm(x, offset) {\r\n\t\tx = parseFloat(x);\r\n\t\toffset = parseFloat(offset);\r\n\t\tif (!isNaN(offset)) x -= offset;\r\n\r\n\t\tvar w = colsWidth(x);\r\n\t\tx = x - w.width + w.cols*dx;\r\n\t\treturn isNaN(x)?\"auto\":(100*x/(dx));\r\n\t}\r\n\r\n\tfunction x_norm_event(x, offset, is_left) {\r\n\t\tx = parseFloat(x);\r\n\t\toffset = parseFloat(offset);\r\n\t\tif (!isNaN(offset) && is_left) x -= offset;\r\n\r\n\t\tvar w = colsWidth(x);\r\n\t\tx = x - w.width + w.cols*dx;\r\n\t\treturn isNaN(x)?\"auto\":(100*x/(dx-(!isNaN(offset)?offset:0)));\r\n\t}\r\n\tfunction colsWidth(width) {\r\n\t\tvar r = 0;\r\n\t\tvar header = scheduler._els.dhx_cal_header[0].childNodes;\r\n\t\tvar els = header[1] ? header[1].childNodes : header[0].childNodes;\r\n\t\tfor (var i = 0; i < els.length; i++) {\r\n\t\t\tvar el = els[i].style ? els[i] : els[i].parentNode;\r\n\t\t\tvar w = parseFloat(el.style.width);\r\n\t\t\tif (width > w){\r\n\t\t\t\twidth -= (w+1);\r\n\t\t\t\tr+=(w+1);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\treturn { width: r, cols: i };\r\n\t}\r\n\r\n\tfunction y_norm(y) {\r\n\t\ty = parseFloat(y);\r\n\t\tif (isNaN(y)) return \"auto\";\r\n\t\treturn 100 * y / dy;\r\n\t}\r\n\r\n\tfunction get_style(node, style){\r\n\t\treturn (window.getComputedStyle?(window.getComputedStyle(node, null)[style]):(node.currentStyle?node.currentStyle[style]:null))||\"\";\r\n\t}\r\n\r\n\tfunction de_day(node, n) {\r\n\t\tvar x = parseInt(node.style.left, 10);\r\n\r\n\t\tfor (var dx = 0; dx < scheduler._cols.length; dx++) {\r\n\t\t\tx -= scheduler._cols[dx];\r\n\t\t\tif (x < 0) return dx;\r\n\t\t}\r\n\t\treturn n;\r\n\t}\r\n\r\n\tfunction de_week(node, n) {\r\n\t\tvar y = parseInt(node.style.top, 10);\r\n\t\tfor (var dy = 0; dy < scheduler._colsS.heights.length; dy++)\r\n\t\t\tif (scheduler._colsS.heights[dy] > y) return dy;\r\n\t\treturn n;\r\n\t}\r\n\r\n\tfunction xml_start(tag) {\r\n\t\treturn tag ? \"<\"+tag+\">\" : \"\";\r\n\t}\r\n\tfunction xml_end(tag) {\r\n\t\treturn tag ? \"\" : \"\";\r\n\t}\r\n\r\n\tfunction xml_top(tag, profile, header, footer) {\r\n\t\tvar xml = \"<\"+tag+\" profile='\" + profile + \"'\";\r\n\t\tif (header)\r\n\t\t\txml += \" header='\" + header + \"'\";\r\n\t\tif (footer)\r\n\t\t\txml += \" footer='\" + footer + \"'\";\r\n\t\txml += \">\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_body_header() {\r\n\t\tvar xml = \"\";\r\n\t\t// detects if current mode is timeline\r\n\t\tvar mode = scheduler._mode;\r\n\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode])\r\n\t\t\tmode = (scheduler.matrix[scheduler._mode].render == \"cell\") ? \"matrix\" : \"timeline\";\r\n\t\txml += \"\";\r\n\r\n\t\tif (scheduler._mode == \"week_agenda\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_data[0].getElementsByTagName(\"DIV\");\r\n\t\t\tfor (var i = 0; i < xh.length; i++)\r\n\t\t\t\tif (xh[i].className == \"dhx_wa_scale_bar\")\r\n\t\t\t\t\txml += \"\" + clean_html(xh[i].innerHTML) + \"\";\r\n\t\t} else if (scheduler._mode == \"agenda\" || scheduler._mode == \"map\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_header[0].childNodes[0].childNodes;\r\n\r\n\t\t\txml += \"\" + clean_html(xh[0].innerHTML) + \"\" + clean_html(xh[1].innerHTML) + \"\";\r\n\t\t} else if (scheduler._mode == \"year\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_data[0].childNodes;\r\n\t\t\tfor (var i = 0; i < xh.length; i++) {\r\n\t\t\t\txml += \"\";\r\n\t\t\t\txml += xml_month_scale(xh[i].querySelector(\".dhx_year_week\").childNodes);\r\n\t\t\t\txml += xml_month(xh[i].querySelector(\".dhx_year_body\"));\r\n\t\t\t\txml += \"\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\txml += \"\";\r\n\t\t\tvar xh = scheduler._els.dhx_cal_header[0].childNodes;\r\n\t\t\txml += xml_month_scale(xh);\r\n\t\t\txml += \"\";\r\n\r\n\t\t\tvar yh = scheduler._els.dhx_cal_data[0];\r\n\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tfor (var i = 0; i < yh.firstChild.rows.length; i++) {\r\n\t\t\t\t\tvar el = yh.firstChild.rows[i];\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t}\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tdy = yh.firstChild.rows[0].cells[0].offsetHeight;\r\n\t\t\t} else if (yh.firstChild.tagName == \"TABLE\") {\r\n\t\t\t\txml += xml_month(yh);\r\n\t\t\t} else {\r\n\t\t\t\tyh = yh.childNodes[yh.childNodes.length - 1];\r\n\t\t\t\twhile (yh.className.indexOf(\"dhx_scale_holder\") == -1)\r\n\t\t\t\t\tyh = yh.previousSibling;\r\n\t\t\t\tyh = yh.childNodes;\r\n\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tfor (var i = 0; i < yh.length; i++)\r\n\t\t\t\t\txml += \"\\n\";\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tdy = yh[0].offsetHeight;\r\n\t\t\t}\r\n\t\t}\r\n\t\txml += \"\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_month(yh) {\r\n\t\tvar xml = \"\";\r\n\t\tvar r = yh.querySelectorAll(\"tr\");\r\n\t\tfor (var i = 0; i < r.length; i++) {\r\n\t\t\tvar days = [];\r\n\t\t\tvar cells = r[i].querySelectorAll(\"td\");\r\n\r\n\t\t\tfor (var j = 0; j < cells.length; j++)\r\n\t\t\t\tdays.push(cells[j].querySelector(\".dhx_month_head\").innerHTML);\r\n\r\n\t\t\txml += \"\\n\";\r\n\t\t\tdy = cells[0].offsetHeight;\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_month_scale(xh) {\r\n\t\tvar xhs,\r\n\t\t\txml = \"\";\r\n\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\tif (scheduler.matrix[scheduler._mode].second_scale)\r\n\t\t\t\txhs = xh[1].childNodes;\r\n\r\n\t\t\txh = xh[0].childNodes;\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < xh.length; i++)\r\n\t\t\txml += \"\\n\";\r\n\t\tdx = xh[0].offsetWidth;\r\n\r\n\t\tif (xhs) {\r\n\t\t\tvar width = 0;\r\n\t\t\tvar top_width = xh[0].offsetWidth;\r\n\t\t\tvar top_col = 1;\r\n\t\t\tfor (var i = 0; i < xhs.length; i++) {\r\n\t\t\t\txml += \"\\n\";\r\n\t\t\t\twidth += xhs[i].offsetWidth;\r\n\t\t\t\tif (width >= top_width) {\r\n\t\t\t\t\ttop_width += (xh[top_col] ? xh[top_col].offsetWidth : 0);\r\n\t\t\t\t\ttop_col++;\r\n\t\t\t\t}\r\n\t\t\t\tdx = xhs[0].offsetWidth;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_body(colors) {\r\n\t\tvar xml = \"\";\r\n\t\tvar evs = scheduler._rendered;\r\n\t\tvar matrix = scheduler.matrix && scheduler.matrix[scheduler._mode];\r\n\r\n\t\tif (scheduler._mode == \"agenda\" || scheduler._mode == \"map\") {\r\n\r\n\t\t\tfor (var i = 0; i < evs.length; i++)\r\n xml += \"\";\r\n\r\n\t\t} else if (scheduler._mode == \"week_agenda\") {\r\n\r\n\t\t\tfor (var i = 0; i < evs.length; i++)\r\n\t\t\t\txml += \"\" + clean_html(evs[i].innerHTML) + \"\";\r\n\r\n\t\t} else if (scheduler._mode == \"year\") {\r\n\r\n\t\t\tvar evs = scheduler.get_visible_events();\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar d = evs[i].start_date;\r\n\t\t\t\tif (d.valueOf() < scheduler._min_date.valueOf())\r\n\t\t\t\t\td = scheduler._min_date;\r\n\r\n\t\t\t\twhile (d < evs[i].end_date) {\r\n\t\t\t\t\tvar m = d.getMonth() + 12 * (d.getFullYear() - scheduler._min_date.getFullYear()) - scheduler.week_starts._month;\r\n\t\t\t\t\tvar day = scheduler.week_starts[m] + d.getDate() - 1;\r\n\t\t\t\t\tvar text_color = colors ? get_style(scheduler._get_year_cell(d), \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(scheduler._get_year_cell(d), \"backgroundColor\") : \"\";\r\n\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t\td = scheduler.date.add(d, 1, \"day\");\r\n\t\t\t\t\tif (d.valueOf() >= scheduler._max_date.valueOf())\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (matrix && matrix.render == \"cell\") {\r\n\t\t\tvar evs = scheduler._els.dhx_cal_data[0].getElementsByTagName(\"TD\");\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar text_color = colors ? get_style(evs[i], \"color\") : \"\";\r\n\t\t\t\tvar bg_color = colors ? get_style(evs[i], \"backgroundColor\") : \"\";\r\n\t\t\t\txml += \"\\n\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar zx, zdx;\r\n\t\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\t\t// logic for timeline view\r\n\t\t\t\t\tzx = x_norm(evs[i].style.left);\r\n\t\t\t\t\tzdx = x_norm(evs[i].offsetWidth)-1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// we should use specific logic for day/week/units view\r\n\t\t\t\t\tvar left_norm = scheduler.config.use_select_menu_space ? 0 : 26;\r\n\t\t\t\t\tzx = x_norm_event(evs[i].style.left, left_norm, true);\r\n\t\t\t\t\tzdx = x_norm_event(evs[i].style.width, left_norm)-1;\r\n\t\t\t\t}\r\n\t\t\t\tif (isNaN(zdx * 1)) continue;\r\n\t\t\t\tvar zy = y_norm(evs[i].style.top);\r\n\t\t\t\tvar zdy = y_norm(evs[i].style.height);\r\n\r\n\t\t\t\tvar e_type = evs[i].className.split(\" \")[0].replace(\"dhx_cal_\", \"\");\r\n\t\t\t\tif (e_type === 'dhx_tooltip_line') continue;\r\n\r\n\t\t\t\tvar dets = scheduler.getEvent(evs[i].getAttribute(scheduler.config.event_attribute));\r\n if (!dets) continue;\r\n\t\t\t\tvar day = dets._sday;\r\n\t\t\t\tvar week = dets._sweek;\r\n\t\t\t\tvar length = dets._length || 0;\r\n\r\n\t\t\t\tif (scheduler._mode == \"month\") {\r\n\t\t\t\t\tzdy = parseInt(evs[i].offsetHeight, 10);\r\n\t\t\t\t\tzy = parseInt(evs[i].style.top, 10) - scheduler.xy.month_head_height;\r\n\r\n\t\t\t\t\tday = de_day(evs[i], day);\r\n\t\t\t\t\tweek = de_week(evs[i], week);\r\n\t\t\t\t} else if (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\t\tday = 0;\r\n\t\t\t\t\tvar el = evs[i].parentNode.parentNode.parentNode;\r\n\t\t\t\t\tweek = el.rowIndex;\r\n\t\t\t\t\tvar dy_copy = dy;\r\n\t\t\t\t\tdy = evs[i].parentNode.offsetHeight;\r\n\t\t\t\t\tzy = y_norm(evs[i].style.top);\r\n\t\t\t\t\tzy -= zy * 0.2;\r\n\t\t\t\t\tdy = dy_copy;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (evs[i].parentNode == scheduler._els.dhx_cal_data[0]) continue;\r\n\t\t\t\t\tvar parent = scheduler._els[\"dhx_cal_data\"][0].childNodes[0];\r\n\t\t\t\t\tvar offset = parseFloat(parent.className.indexOf(\"dhx_scale_holder\") != -1 ? parent.style.left : 0);\r\n\t\t\t\t\tzx += x_norm(evs[i].parentNode.style.left, offset);\r\n\t\t\t\t}\r\n\r\n\t\t\t\txml += \"\\n\";\r\n\r\n\t\t\t\tif (e_type == \"event\") {\r\n\t\t\t\t\txml += \"
\";\r\n\t\t\t\t\tvar text_color = colors ? get_style(evs[i].childNodes[2], \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(evs[i].childNodes[2], \"backgroundColor\") : \"\";\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar text_color = colors ? get_style(evs[i], \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(evs[i], \"backgroundColor\") : \"\";\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t}\r\n\t\t\t\txml += \"
\";\r\n\t\t\t}\r\n\t\t\t}\r\n\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction toXML(start, end, view, mode, header, footer){\r\n\t\tvar colors = false;\r\n\t\tif (mode == \"fullcolor\") {\r\n\t\t\tcolors = true;\r\n\t\t\tmode = \"color\";\r\n\t\t}\r\n\r\n\t\tmode = mode || \"color\";\r\n\r\n\t\tvar xml = \"\";\r\n\t\tif (start) {\r\n\r\n\t\t\tvar original_date = scheduler._date;\r\n\t\t\tvar original_mode = scheduler._mode;\r\n\t\t\tend = scheduler.date[view+\"_start\"](end);\r\n\t\t\tend = scheduler.date[\"get_\"+view+\"_end\"] ? scheduler.date[\"get_\"+view+\"_end\"](end) : scheduler.date.add(end, 1, view);\r\n\r\n\t\t\txml = xml_top(\"pages\", mode, header, footer);\r\n\t\t\tfor (var temp_date = new Date(start); +temp_date < +end; temp_date = this.date.add(temp_date, 1, view)) {\r\n\t\t\t\tthis.setCurrentView(temp_date, view);\r\n\t\t\t\txml += xml_start(\"page\") + xml_body_header().replace(\"\\u2013\", \"-\") + xml_body(colors) + xml_end(\"page\");\r\n\t\t\t}\r\n\t\t\txml += xml_end(\"pages\");\r\n\r\n\t\t\tthis.setCurrentView(original_date, original_mode);\r\n\t\t} else {\r\n\t\t\txml = xml_top(\"data\", mode, header, footer) + xml_body_header().replace(\"\\u2013\", \"-\") + xml_body(colors) + xml_end(\"data\");\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\tscheduler.getPDFData = toXML;\r\n\tfunction send_xml(xml, url){\r\n\t\tvar uid = scheduler.uid();\r\n\t\tvar d = document.createElement(\"div\");\r\n\t\td.style.display = \"none\";\r\n\t\tdocument.body.appendChild(d);\r\n\r\n\t\td.innerHTML = '
';\r\n\t\tdocument.getElementById(uid).firstChild.value = encodeURIComponent(xml);\r\n\t\tdocument.getElementById(uid).submit();\r\n\t\td.parentNode.removeChild(d);\r\n\t}\r\n\r\n\tfunction to_pdf(start, end, view, url, mode, header, footer) {\r\n\t\tvar xml = \"\";\r\n\t\tif(typeof mode == \"object\"){\r\n\t\t\txml = schedulersToPdf(mode);\r\n\t\t}else{\r\n\t\t\txml = toXML.apply(this, [start, end, view, mode, header, footer]);\r\n\t\t}\r\n\r\n\t\tsend_xml(xml, url);\r\n\t}\r\n\r\n\tfunction schedulersToPdf(objects){\r\n\t\tvar xml = \"\";\r\n\t\tfor(var i=0; i < objects.length; i++){\r\n\t\t\txml += objects[i].source.getPDFData(objects[i].start, objects[i].end, objects[i].view, objects[i].mode, objects[i].header, objects[i].footer);\r\n\t\t}\r\n\t\txml += \"\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\t/*\r\n\t * scheduler.toPDF(url, mode, header, footer) - for a single scheduler\r\n\t * scheduler.toPDF(url, [scheduler1, scheduler2,...]) - for multiple schedulers\r\n\t * example:\r\n\t * scheduler.toPDF(\"generate.ashx\", [\r\n\t * { source: scheduler1, mode: \"color\" },\r\n\t * { source: scheduler2, mode: \"gray\", view:\"week\", start:new Date(2013, 06, 1), end:new Date(2013, 06, 28) },\r\n\t * { source: scheduler3 }\r\n\t * ]);\r\n\t *\r\n\t */\r\n\tscheduler.toPDF = function(url, mode, header, footer) {\r\n\t\treturn to_pdf.apply(this, [null, null, null, url, mode, header, footer]);\r\n\t};\r\n\tscheduler.toPDFRange = function(start, end, view, url, mode, header, footer) {\r\n\t\tif (typeof start == \"string\") {\r\n\t\t\tstart = scheduler.templates.api_date(start);\r\n\t\t\tend = scheduler.templates.api_date(end);\r\n\t\t}\r\n\r\n\t\treturn to_pdf.apply(this, arguments);\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.icons_select = [\"icon_form\", \"icon_delete\"];\r\nscheduler.config.details_on_create = true;\r\nscheduler.config.show_quick_info = true;\r\nscheduler.xy.menu_width = 0;\r\n\r\n\r\n\r\nlet clickedElementPosition = null;\r\nscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\tconst container = scheduler.$container;\r\n\tif(container._$quickInfoHandler){\r\n\t\treturn;\r\n\t}else{\r\n\t\tcontainer._$quickInfoHandler = true;\r\n\t\t// store coordinates of clicked segment of an event\r\n\t\t// in case multi section events or multi-line month events\r\n\t\tscheduler.event(container, \"mousedown\", function(e){\r\n\t\t\tconst eventElement = e.target.closest(`[${scheduler.config.event_attribute}]`);\r\n\t\t\tif (eventElement) {\r\n\t\t\t\tclickedElementPosition = {\r\n\t\t\t\t\tid: eventElement.getAttribute(scheduler.config.event_attribute),\r\n\t\t\t\t\tposition: getPositionInsideScheduler(eventElement)\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t});\r\n\t\tscheduler.attachEvent(\"onDestroy\", () => {\r\n\t\t\tdelete container._$quickInfoHandler;\r\n\t\t});\r\n\t}\r\n});\r\n\r\nscheduler.attachEvent(\"onClick\", function(id){\r\n\tif(!scheduler.config.show_quick_info){\r\n\t\treturn;\r\n\t}\r\n\tscheduler.showQuickInfo(id);\r\n\treturn true;\r\n});\r\n\r\n(function(){\r\n\t// pass `force` argument in order to hide quick info synchronously\r\n\t// so it won't affect showQuickInfo call that can follow\r\n\tvar events = [\"onEmptyClick\", \"onViewChange\", \"onLightbox\", \"onBeforeEventDelete\", \"onBeforeDrag\"];\r\n\tvar hiding_function = function(){\r\n\t\tscheduler.hideQuickInfo(true);\r\n\t\treturn true;\r\n\t};\r\n\tfor (var i=0; i window.innerWidth){\r\n\t\t\tleft = window.innerWidth - width;\r\n\t\t}\r\n\t\tleft = Math.max(0, left);\r\n\r\n\t\tqi.style.left = left + \"px\";\r\n\t\tqi.style.top = pos.top - (pos.dy?height:-pos.height) + \"px\";\r\n\t} else {\r\n\r\n\t\tconst dataPos = scheduler.$container.querySelector('.dhx_cal_data').offsetTop;\r\n\t\tqi.style.top = dataPos + 20 + \"px\";\r\n\t\tif (pos.dx == 1){\r\n\t\t\tqi.style.right = \"auto\";\r\n\t\t\tqi.style.left = -width + \"px\";\r\n\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tqi.style.left = \"-10px\";\r\n\t\t\t},1);\r\n\t\t} else {\r\n\t\t\tqi.style.left = \"auto\";\r\n\t\t\tqi.style.right = -width + \"px\";\r\n\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tqi.style.right = \"-10px\";\r\n\t\t\t},1);\r\n\t\t}\r\n\t\tqi.className = qi.className.replace(\" dhx_qi_left\",\"\").replace(\" dhx_qi_right\",\"\")+\" dhx_qi_\"+(pos.dx==1?\"left\":\"right\");\r\n\t}\r\n\r\n\tqi.ontransitionend = () => {\r\n\t\tfitQIInsideWindow(qi);\r\n\t\tqi.ontransitionend = null;\r\n\t};\r\n\tsetTimeout(() => {\r\n\t\tfitQIInsideWindow(qi);\r\n\t}, 1);\r\n};\r\n\r\nfunction fitQIInsideWindow(quickInfoPopup){\r\n\tconst popupRect = quickInfoPopup.getBoundingClientRect();\r\n\tconst containerRect = scheduler.$container.getBoundingClientRect();\r\n\r\n\t// calculate the bottom offset of the Quick Info relative to the scheduler container\r\n\tconst offsetBottom = containerRect.bottom - popupRect.bottom;\r\n\r\n\t// If the popup extends outside the scheduler container, adjust its top position\r\n\tif (offsetBottom < 0) {\r\n\t\tquickInfoPopup.style.top = `${parseFloat(quickInfoPopup.style.top) + offsetBottom}px`;\r\n\t}\r\n}\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function(){\r\n\tscheduler.hideQuickInfo();\r\n\tif(this._quick_info_box){\r\n\t\tvar box = this._quick_info_box;\r\n\t\tif(box.parentNode){\r\n\t\t\tbox.parentNode.removeChild(box);\r\n\t\t}\r\n\t\tthis._quick_info_box = null;\r\n\t}\r\n});\r\nscheduler._quick_info_onscroll_handler = function(e){\r\n\tscheduler.hideQuickInfo();\r\n};\r\nscheduler._init_quick_info = function(){\r\n\tif (!this._quick_info_box){\r\n\r\n\r\n\t\tvar qi = this._quick_info_box = document.createElement(\"div\");\r\n\r\n\t\tthis._waiAria.quickInfoAttr(qi);\r\n\r\n\t\tqi.className = \"dhx_cal_quick_info\";\r\n\t\tif (scheduler.$testmode)\r\n\t\t\tqi.className += \" dhx_no_animate\";\r\n\t\tif (scheduler.config.rtl) qi.className += \" dhx_quick_info_rtl\";\r\n\t//title\r\n\t\tvar ariaAttr = this._waiAria.quickInfoHeaderAttrString();\r\n\t\tvar html = `\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t\t
\r\n\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t\t
`;\r\n\r\n\t//buttons\r\n\t\thtml += \"
\";\r\n\t\tvar buttons = scheduler.config.icons_select;\r\n\t\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\t\tvar ariaAttr = this._waiAria.quickInfoButtonAttrString(this.locale.labels[buttons[i]]);\r\n\t\t\t\thtml += `
\r\n\t\t\t\t
${scheduler.locale.labels[buttons[i]]}
`;\r\n\t\t\t}\r\n\t\t// }\r\n\t\thtml += \"
\";\r\n\r\n\t\tqi.innerHTML = html;\r\n\t\tscheduler.event(qi, \"click\", function(ev){\r\n\t\t\tscheduler._qi_button_click(ev.target || ev.srcElement);\r\n\t\t});\r\n\t\tif (scheduler.config.quick_info_detached){\r\n\t\t\tscheduler._detachDomEvent(scheduler._els[\"dhx_cal_data\"][0], \"scroll\", scheduler._quick_info_onscroll_handler);\r\n\t\t\tscheduler.event(scheduler._els[\"dhx_cal_data\"][0], \"scroll\", scheduler._quick_info_onscroll_handler);\r\n\t\t}\r\n\t}\r\n\r\n\treturn this._quick_info_box;\r\n};\r\n\r\nscheduler._qi_button_click = function(node){\r\n\tvar box = scheduler._quick_info_box;\r\n\tif (!node || node == box) return;\r\n\r\n\tif(node.closest(\".dhx_cal_qi_close_btn\")){\r\n\t\tscheduler.hideQuickInfo();\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar mask = scheduler._getClassName(node);\r\n\tif (mask.indexOf(\"_icon\")!=-1){\r\n\t\tvar id = scheduler._quick_info_box_id;\r\n\t\tscheduler._click.buttons[mask.split(\" \")[1].replace(\"icon_\",\"\")](id);\r\n\t} else\r\n\t\tscheduler._qi_button_click(node.parentNode);\r\n};\r\n\r\nfunction getPositionInsideScheduler(element){\r\n\tlet left = 0;\r\n\tlet top = 0;\r\n\r\n\tlet node = element;\r\n\twhile (node && node != scheduler._obj){\r\n\t\tleft += node.offsetLeft;\r\n\t\ttop += node.offsetTop-node.scrollTop;\r\n\t\tnode = node.offsetParent;\r\n\t}\r\n\tif(node){\r\n\t\tlet dx = (left + element.offsetWidth/2) > (scheduler._x/2) ? 1 : 0;\r\n\t\tlet dy = (top + element.offsetHeight/2) > (scheduler._y/2) ? 1 : 0;\r\n\r\n\t\treturn { left:left, top:top, dx:dx, dy:dy,\r\n\t\t\twidth:element.offsetWidth, height:element.offsetHeight };\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\nscheduler._get_event_counter_part = function(id){\r\n\tvar domEv = scheduler.getRenderedEvent(id);\r\n\treturn getPositionInsideScheduler(domEv);\r\n};\r\n\r\nscheduler._fill_quick_data = function(id){\r\n\tvar ev = scheduler.getEvent(id);\r\n\tvar qi = scheduler._quick_info_box;\r\n\r\n\tscheduler._quick_info_box_id = id;\r\n\r\n//title content\r\n\r\n\tvar header = {\r\n\t\tcontent: scheduler.templates.quick_info_title(ev.start_date, ev.end_date, ev),\r\n\t\tdate: scheduler.templates.quick_info_date(ev.start_date, ev.end_date, ev)\r\n\t};\r\n\tvar titleContent = qi.querySelector(\".dhx_cal_qi_tcontent\");\r\n\ttitleContent.innerHTML = `${header.content}`;\r\n\tvar titleDate = qi.querySelector(\".dhx_cal_qi_tdate\");\r\n\ttitleDate.innerHTML = header.date;\r\n\r\n\tscheduler._waiAria.quickInfoHeader(qi, [header.content, header.date].join(\" \"));\r\n\r\n//main content\r\n\tvar main = qi.querySelector(\".dhx_cal_qi_content\");\r\n\tconst mainContent = scheduler.templates.quick_info_content(ev.start_date, ev.end_date, ev);\r\n\tif(mainContent){\r\n\t\tmain.classList.remove(\"dhx_hidden\");\r\n\t\tmain.innerHTML = mainContent;\r\n\t}else{\r\n\t\tmain.classList.add(\"dhx_hidden\");\r\n\t}\r\n};\r\n\r\n\r\n}","export default function(scheduler){\r\n\t\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar originalRecurringSetValue;\r\n\tif (scheduler.form_blocks.recurring) {\r\n\t\toriginalRecurringSetValue = scheduler.form_blocks.recurring.set_value;\r\n\t}\r\n\tvar original_left_buttons = scheduler.config.buttons_left.slice();\r\n\tvar original_right_buttons = scheduler.config.buttons_right.slice();\r\n\r\n\tscheduler.attachEvent(\"onBeforeLightbox\", function(id) {\r\n\t\tif (this.config.readonly_form || this.getEvent(id).readonly) {\r\n\t\t\tthis.config.readonly_active = true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.config.readonly_active = false;\r\n\t\t\tscheduler.config.buttons_left = original_left_buttons.slice();\r\n\t\t\tscheduler.config.buttons_right = original_right_buttons.slice();\r\n\t\r\n\t\t\t// initial value\r\n\t\t\tif(scheduler.form_blocks.recurring) {\r\n\t\t\t\tscheduler.form_blocks.recurring.set_value = originalRecurringSetValue;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar sns = this.config.lightbox.sections;\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\tfor (var i = 0; i < sns.length; i++) {\r\n\t\t\t\tif (sns[i].type == 'recurring') {\r\n\t\t\t\t\tif (this.config.readonly_active && scheduler.form_blocks.recurring) {\r\n\t\t\t\t\t\tscheduler.form_blocks.recurring.set_value = function(node, value, ev) {\r\n\t\t\t\t\t\t\tvar wrapper = scheduler.$domHelpers.closest(node, \".dhx_wrap_section\");\r\n\t\t\t\t\t\t\tvar style = \"none\";\r\n\t\t\t\t\t\t\twrapper.querySelector('.dhx_cal_lsection').display = style;\r\n\t\t\t\t\t\t\twrapper.querySelector('.dhx_form_repeat').display = style;\r\n\t\t\t\t\t\t\twrapper.style.display = style;\r\n\r\n\t\t\t\t\t\t\tscheduler.setLightboxSize();\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar forbidden_buttons = [\"dhx_delete_btn\", \"dhx_save_btn\"];\r\n\t\t\tvar button_arrays = [scheduler.config.buttons_left, scheduler.config.buttons_right];\r\n\t\t\tfor (var i = 0; i < forbidden_buttons.length; i++) {\r\n\t\t\t\tvar forbidden_button = forbidden_buttons[i];\r\n\t\t\t\tfor (var k = 0; k < button_arrays.length; k++) {\r\n\t\t\t\t\tvar button_array = button_arrays[k];\r\n\t\t\t\t\tvar index = -1;\r\n\t\t\t\t\tfor (var p = 0; p < button_array.length; p++) {\r\n\t\t\t\t\t\tif (button_array[p] == forbidden_button) {\r\n\t\t\t\t\t\t\tindex = p;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (index != -1) {\r\n\t\t\t\t\t\tbutton_array.splice(index, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.resetLightbox();\r\n\r\n\t\treturn true;\r\n\t});\r\n\r\n\tfunction txt_replace(tag, d, n, text) {\r\n\t\tvar txts = d.getElementsByTagName(tag);\r\n\t\tvar txtt = n.getElementsByTagName(tag);\r\n\t\tfor (var i = txtt.length - 1; i >= 0; i--) {\r\n\t\t\tvar n = txtt[i];\r\n\t\t\tif (!text){\r\n\t\t\t\tn.disabled = true;\r\n\t\t\t\t//radio and checkboxes loses state after .cloneNode in IE\r\n\t\t\t\tif(d.checked)\r\n\t\t\t\t\tn.checked = true;\r\n\t\t\t}else {\r\n\t\t\t\tvar t = document.createElement(\"span\");\r\n\t\t\t\tt.className = \"dhx_text_disabled\";\r\n\t\t\t\tt.innerHTML = text(txts[i]);\r\n\t\t\t\tn.parentNode.insertBefore(t, n);\r\n\t\t\t\tn.parentNode.removeChild(n);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tvar old = scheduler._fill_lightbox;\r\n\tscheduler._fill_lightbox = function() {\r\n\r\n\t\tvar lb = this.getLightbox();\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\tlb.style.visibility = 'hidden';\r\n\t\t\t// lightbox should have actual sizes before rendering controls\r\n\t\t\t// currently only matters for dhtmlxCombo\r\n\t\t\tlb.style.display = 'block';\r\n\t\t}\r\n\t\tvar res = old.apply(this, arguments);\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\t//reset visibility and display\r\n\t\t\tlb.style.visibility = '';\r\n\t\t\tlb.style.display = 'none';\r\n\t\t}\r\n\r\n\t\tif (this.config.readonly_active) {\r\n\r\n\t\t\tvar originalForm = this.getLightbox();\r\n\t\t\tvar readonlyForm = this._lightbox_r = originalForm.cloneNode(true);\r\n\t\t\treadonlyForm.id = scheduler.uid();\r\n\t\t\treadonlyForm.className += \" dhx_cal_light_readonly\";\r\n\t\t\ttxt_replace(\"textarea\", originalForm, readonlyForm, function(a) {\r\n\t\t\t\treturn a.value;\r\n\t\t\t});\r\n\t\t\ttxt_replace(\"input\", originalForm, readonlyForm, false);\r\n\t\t\ttxt_replace(\"select\", originalForm, readonlyForm, function(a) {\r\n\t\t\t\tif(!a.options.length) return \"\";\r\n\t\t\t\treturn a.options[Math.max((a.selectedIndex || 0), 0)].text;\r\n\t\t\t});\r\n\r\n\t\t\toriginalForm.parentNode.insertBefore(readonlyForm, originalForm);\r\n\r\n\t\t\tthis.showCover(readonlyForm);\r\n\t\t\tif (scheduler._lightbox)\r\n\t\t\t\tscheduler._lightbox.parentNode.removeChild(scheduler._lightbox);\r\n\t\t\tthis._lightbox = readonlyForm;\r\n\r\n\t\t\tif (scheduler.config.drag_lightbox)\r\n\t\t\t\tscheduler.event(readonlyForm.firstChild, \"mousedown\", scheduler._ready_to_dnd);\r\n\t\t\t\t\r\n\t\t\tscheduler._init_lightbox_events();\r\n\t\t\tthis.setLightboxSize();\r\n\t\t}\r\n\t\treturn res;\r\n\t};\r\n\r\n\tvar hold = scheduler.hide_lightbox;\r\n\tscheduler.hide_lightbox = function() {\r\n\t\tif (this._lightbox_r) {\r\n\t\t\tthis._lightbox_r.parentNode.removeChild(this._lightbox_r);\r\n\t\t\tthis._lightbox_r = this._lightbox = null;\r\n\t\t}\r\n\r\n\t\treturn hold.apply(this, arguments);\r\n\t};\r\n});\r\n\r\n\r\n}","// =============================================================================\n// Weekday\n// =============================================================================\nexport var ALL_WEEKDAYS = [\n 'MO',\n 'TU',\n 'WE',\n 'TH',\n 'FR',\n 'SA',\n 'SU',\n];\nvar Weekday = /** @class */ (function () {\n function Weekday(weekday, n) {\n if (n === 0)\n throw new Error(\"Can't create weekday with n == 0\");\n this.weekday = weekday;\n this.n = n;\n }\n Weekday.fromStr = function (str) {\n return new Weekday(ALL_WEEKDAYS.indexOf(str));\n };\n // __call__ - Cannot call the object directly, do it through\n // e.g. RRule.TH.nth(-1) instead,\n Weekday.prototype.nth = function (n) {\n return this.n === n ? this : new Weekday(this.weekday, n);\n };\n // __eq__\n Weekday.prototype.equals = function (other) {\n return this.weekday === other.weekday && this.n === other.n;\n };\n // __repr__\n Weekday.prototype.toString = function () {\n var s = ALL_WEEKDAYS[this.weekday];\n if (this.n)\n s = (this.n > 0 ? '+' : '') + String(this.n) + s;\n return s;\n };\n Weekday.prototype.getJsWeekday = function () {\n return this.weekday === 6 ? 0 : this.weekday + 1;\n };\n return Weekday;\n}());\nexport { Weekday };\n//# sourceMappingURL=weekday.js.map","// =============================================================================\n// Helper functions\n// =============================================================================\nimport { ALL_WEEKDAYS } from './weekday';\nexport var isPresent = function (value) {\n return value !== null && value !== undefined;\n};\nexport var isNumber = function (value) {\n return typeof value === 'number';\n};\nexport var isWeekdayStr = function (value) {\n return typeof value === 'string' && ALL_WEEKDAYS.includes(value);\n};\nexport var isArray = Array.isArray;\n/**\n * Simplified version of python's range()\n */\nexport var range = function (start, end) {\n if (end === void 0) { end = start; }\n if (arguments.length === 1) {\n end = start;\n start = 0;\n }\n var rang = [];\n for (var i = start; i < end; i++)\n rang.push(i);\n return rang;\n};\nexport var clone = function (array) {\n return [].concat(array);\n};\nexport var repeat = function (value, times) {\n var i = 0;\n var array = [];\n if (isArray(value)) {\n for (; i < times; i++)\n array[i] = [].concat(value);\n }\n else {\n for (; i < times; i++)\n array[i] = value;\n }\n return array;\n};\nexport var toArray = function (item) {\n if (isArray(item)) {\n return item;\n }\n return [item];\n};\nexport function padStart(item, targetLength, padString) {\n if (padString === void 0) { padString = ' '; }\n var str = String(item);\n targetLength = targetLength >> 0;\n if (str.length > targetLength) {\n return String(str);\n }\n targetLength = targetLength - str.length;\n if (targetLength > padString.length) {\n padString += repeat(padString, targetLength / padString.length);\n }\n return padString.slice(0, targetLength) + String(str);\n}\n/**\n * Python like split\n */\nexport var split = function (str, sep, num) {\n var splits = str.split(sep);\n return num\n ? splits.slice(0, num).concat([splits.slice(num).join(sep)])\n : splits;\n};\n/**\n * closure/goog/math/math.js:modulo\n * Copyright 2006 The Closure Library Authors.\n * The % operator in JavaScript returns the remainder of a / b, but differs from\n * some other languages in that the result will have the same sign as the\n * dividend. For example, -1 % 8 == -1, whereas in some other languages\n * (such as Python) the result would be 7. This function emulates the more\n * correct modulo behavior, which is useful for certain applications such as\n * calculating an offset index in a circular list.\n *\n * @param {number} a The dividend.\n * @param {number} b The divisor.\n * @return {number} a % b where the result is between 0 and b (either 0 <= x < b\n * or b < x <= 0, depending on the sign of b).\n */\nexport var pymod = function (a, b) {\n var r = a % b;\n // If r and b differ in sign, add b to wrap the result to the correct sign.\n return r * b < 0 ? r + b : r;\n};\n/**\n * @see: \n */\nexport var divmod = function (a, b) {\n return { div: Math.floor(a / b), mod: pymod(a, b) };\n};\nexport var empty = function (obj) {\n return !isPresent(obj) || obj.length === 0;\n};\n/**\n * Python-like boolean\n *\n * @return {Boolean} value of an object/primitive, taking into account\n * the fact that in Python an empty list's/tuple's\n * boolean value is False, whereas in JS it's true\n */\nexport var notEmpty = function (obj) {\n return !empty(obj);\n};\n/**\n * Return true if a value is in an array\n */\nexport var includes = function (arr, val) {\n return notEmpty(arr) && arr.indexOf(val) !== -1;\n};\n//# sourceMappingURL=helpers.js.map","import { padStart } from './helpers';\nexport var datetime = function (y, m, d, h, i, s) {\n if (h === void 0) { h = 0; }\n if (i === void 0) { i = 0; }\n if (s === void 0) { s = 0; }\n return new Date(Date.UTC(y, m - 1, d, h, i, s));\n};\n/**\n * General date-related utilities.\n * Also handles several incompatibilities between JavaScript and Python\n *\n */\nexport var MONTH_DAYS = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n/**\n * Number of milliseconds of one day\n */\nexport var ONE_DAY = 1000 * 60 * 60 * 24;\n/**\n * @see: \n */\nexport var MAXYEAR = 9999;\n/**\n * Python uses 1-Jan-1 as the base for calculating ordinals but we don't\n * want to confuse the JS engine with milliseconds > Number.MAX_NUMBER,\n * therefore we use 1-Jan-1970 instead\n */\nexport var ORDINAL_BASE = datetime(1970, 1, 1);\n/**\n * Python: MO-SU: 0 - 6\n * JS: SU-SAT 0 - 6\n */\nexport var PY_WEEKDAYS = [6, 0, 1, 2, 3, 4, 5];\n/**\n * py_date.timetuple()[7]\n */\nexport var getYearDay = function (date) {\n var dateNoTime = new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate());\n return (Math.ceil((dateNoTime.valueOf() - new Date(date.getUTCFullYear(), 0, 1).valueOf()) /\n ONE_DAY) + 1);\n};\nexport var isLeapYear = function (year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n};\nexport var isDate = function (value) {\n return value instanceof Date;\n};\nexport var isValidDate = function (value) {\n return isDate(value) && !isNaN(value.getTime());\n};\n/**\n * @return {Number} the date's timezone offset in ms\n */\nexport var tzOffset = function (date) {\n return date.getTimezoneOffset() * 60 * 1000;\n};\n/**\n * @see: \n */\nexport var daysBetween = function (date1, date2) {\n // The number of milliseconds in one day\n // Convert both dates to milliseconds\n var date1ms = date1.getTime();\n var date2ms = date2.getTime();\n // Calculate the difference in milliseconds\n var differencems = date1ms - date2ms;\n // Convert back to days and return\n return Math.round(differencems / ONE_DAY);\n};\n/**\n * @see: \n */\nexport var toOrdinal = function (date) {\n return daysBetween(date, ORDINAL_BASE);\n};\n/**\n * @see - \n */\nexport var fromOrdinal = function (ordinal) {\n return new Date(ORDINAL_BASE.getTime() + ordinal * ONE_DAY);\n};\nexport var getMonthDays = function (date) {\n var month = date.getUTCMonth();\n return month === 1 && isLeapYear(date.getUTCFullYear())\n ? 29\n : MONTH_DAYS[month];\n};\n/**\n * @return {Number} python-like weekday\n */\nexport var getWeekday = function (date) {\n return PY_WEEKDAYS[date.getUTCDay()];\n};\n/**\n * @see: \n */\nexport var monthRange = function (year, month) {\n var date = datetime(year, month + 1, 1);\n return [getWeekday(date), getMonthDays(date)];\n};\n/**\n * @see: \n */\nexport var combine = function (date, time) {\n time = time || date;\n return new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), time.getHours(), time.getMinutes(), time.getSeconds(), time.getMilliseconds()));\n};\nexport var clone = function (date) {\n var dolly = new Date(date.getTime());\n return dolly;\n};\nexport var cloneDates = function (dates) {\n var clones = [];\n for (var i = 0; i < dates.length; i++) {\n clones.push(clone(dates[i]));\n }\n return clones;\n};\n/**\n * Sorts an array of Date or Time objects\n */\nexport var sort = function (dates) {\n dates.sort(function (a, b) {\n return a.getTime() - b.getTime();\n });\n};\nexport var timeToUntilString = function (time, utc) {\n if (utc === void 0) { utc = true; }\n var date = new Date(time);\n return [\n padStart(date.getUTCFullYear().toString(), 4, '0'),\n padStart(date.getUTCMonth() + 1, 2, '0'),\n padStart(date.getUTCDate(), 2, '0'),\n 'T',\n padStart(date.getUTCHours(), 2, '0'),\n padStart(date.getUTCMinutes(), 2, '0'),\n padStart(date.getUTCSeconds(), 2, '0'),\n utc ? 'Z' : '',\n ].join('');\n};\nexport var untilStringToDate = function (until) {\n var re = /^(\\d{4})(\\d{2})(\\d{2})(T(\\d{2})(\\d{2})(\\d{2})Z?)?$/;\n var bits = re.exec(until);\n if (!bits)\n throw new Error(\"Invalid UNTIL value: \".concat(until));\n return new Date(Date.UTC(parseInt(bits[1], 10), parseInt(bits[2], 10) - 1, parseInt(bits[3], 10), parseInt(bits[5], 10) || 0, parseInt(bits[6], 10) || 0, parseInt(bits[7], 10) || 0));\n};\nvar dateTZtoISO8601 = function (date, timeZone) {\n // date format for sv-SE is almost ISO8601\n var dateStr = date.toLocaleString('sv-SE', { timeZone: timeZone });\n // '2023-02-07 10:41:36'\n return dateStr.replace(' ', 'T') + 'Z';\n};\nexport var dateInTimeZone = function (date, timeZone) {\n var localTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;\n // Date constructor can only reliably parse dates in ISO8601 format\n var dateInLocalTZ = new Date(dateTZtoISO8601(date, localTimeZone));\n var dateInTargetTZ = new Date(dateTZtoISO8601(date, timeZone !== null && timeZone !== void 0 ? timeZone : 'UTC'));\n var tzOffset = dateInTargetTZ.getTime() - dateInLocalTZ.getTime();\n return new Date(date.getTime() - tzOffset);\n};\n//# sourceMappingURL=dateutil.js.map","/**\n * This class helps us to emulate python's generators, sorta.\n */\nvar IterResult = /** @class */ (function () {\n function IterResult(method, args) {\n this.minDate = null;\n this.maxDate = null;\n this._result = [];\n this.total = 0;\n this.method = method;\n this.args = args;\n if (method === 'between') {\n this.maxDate = args.inc\n ? args.before\n : new Date(args.before.getTime() - 1);\n this.minDate = args.inc ? args.after : new Date(args.after.getTime() + 1);\n }\n else if (method === 'before') {\n this.maxDate = args.inc ? args.dt : new Date(args.dt.getTime() - 1);\n }\n else if (method === 'after') {\n this.minDate = args.inc ? args.dt : new Date(args.dt.getTime() + 1);\n }\n }\n /**\n * Possibly adds a date into the result.\n *\n * @param {Date} date - the date isn't necessarly added to the result\n * list (if it is too late/too early)\n * @return {Boolean} true if it makes sense to continue the iteration\n * false if we're done.\n */\n IterResult.prototype.accept = function (date) {\n ++this.total;\n var tooEarly = this.minDate && date < this.minDate;\n var tooLate = this.maxDate && date > this.maxDate;\n if (this.method === 'between') {\n if (tooEarly)\n return true;\n if (tooLate)\n return false;\n }\n else if (this.method === 'before') {\n if (tooLate)\n return false;\n }\n else if (this.method === 'after') {\n if (tooEarly)\n return true;\n this.add(date);\n return false;\n }\n return this.add(date);\n };\n /**\n *\n * @param {Date} date that is part of the result.\n * @return {Boolean} whether we are interested in more values.\n */\n IterResult.prototype.add = function (date) {\n this._result.push(date);\n return true;\n };\n /**\n * 'before' and 'after' return only one date, whereas 'all'\n * and 'between' an array.\n *\n * @return {Date,Array?}\n */\n IterResult.prototype.getValue = function () {\n var res = this._result;\n switch (this.method) {\n case 'all':\n case 'between':\n return res;\n case 'before':\n case 'after':\n default:\n return (res.length ? res[res.length - 1] : null);\n }\n };\n IterResult.prototype.clone = function () {\n return new IterResult(this.method, this.args);\n };\n return IterResult;\n}());\nexport default IterResult;\n//# sourceMappingURL=iterresult.js.map","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol */\n\nvar 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 (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(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\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n function next() {\n while (env.stack.length) {\n var rec = env.stack.pop();\n try {\n var result = rec.dispose && rec.dispose.call(rec.value);\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n catch (e) {\n fail(e);\n }\n }\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n};\n","import { __extends } from \"tslib\";\nimport IterResult from './iterresult';\n/**\n * IterResult subclass that calls a callback function on each add,\n * and stops iterating when the callback returns false.\n */\nvar CallbackIterResult = /** @class */ (function (_super) {\n __extends(CallbackIterResult, _super);\n function CallbackIterResult(method, args, iterator) {\n var _this = _super.call(this, method, args) || this;\n _this.iterator = iterator;\n return _this;\n }\n CallbackIterResult.prototype.add = function (date) {\n if (this.iterator(date, this._result.length)) {\n this._result.push(date);\n return true;\n }\n return false;\n };\n return CallbackIterResult;\n}(IterResult));\nexport default CallbackIterResult;\n//# sourceMappingURL=callbackiterresult.js.map","// =============================================================================\n// i18n\n// =============================================================================\nvar ENGLISH = {\n dayNames: [\n 'Sunday',\n 'Monday',\n 'Tuesday',\n 'Wednesday',\n 'Thursday',\n 'Friday',\n 'Saturday',\n ],\n monthNames: [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n ],\n tokens: {\n SKIP: /^[ \\r\\n\\t]+|^\\.$/,\n number: /^[1-9][0-9]*/,\n numberAsText: /^(one|two|three)/i,\n every: /^every/i,\n 'day(s)': /^days?/i,\n 'weekday(s)': /^weekdays?/i,\n 'week(s)': /^weeks?/i,\n 'hour(s)': /^hours?/i,\n 'minute(s)': /^minutes?/i,\n 'month(s)': /^months?/i,\n 'year(s)': /^years?/i,\n on: /^(on|in)/i,\n at: /^(at)/i,\n the: /^the/i,\n first: /^first/i,\n second: /^second/i,\n third: /^third/i,\n nth: /^([1-9][0-9]*)(\\.|th|nd|rd|st)/i,\n last: /^last/i,\n for: /^for/i,\n 'time(s)': /^times?/i,\n until: /^(un)?til/i,\n monday: /^mo(n(day)?)?/i,\n tuesday: /^tu(e(s(day)?)?)?/i,\n wednesday: /^we(d(n(esday)?)?)?/i,\n thursday: /^th(u(r(sday)?)?)?/i,\n friday: /^fr(i(day)?)?/i,\n saturday: /^sa(t(urday)?)?/i,\n sunday: /^su(n(day)?)?/i,\n january: /^jan(uary)?/i,\n february: /^feb(ruary)?/i,\n march: /^mar(ch)?/i,\n april: /^apr(il)?/i,\n may: /^may/i,\n june: /^june?/i,\n july: /^july?/i,\n august: /^aug(ust)?/i,\n september: /^sep(t(ember)?)?/i,\n october: /^oct(ober)?/i,\n november: /^nov(ember)?/i,\n december: /^dec(ember)?/i,\n comma: /^(,\\s*|(and|or)\\s*)+/i,\n },\n};\nexport default ENGLISH;\n//# sourceMappingURL=i18n.js.map","import ENGLISH from './i18n';\nimport { RRule } from '../rrule';\nimport { isArray, isNumber, isPresent } from '../helpers';\n// =============================================================================\n// Helper functions\n// =============================================================================\n/**\n * Return true if a value is in an array\n */\nvar contains = function (arr, val) {\n return arr.indexOf(val) !== -1;\n};\nvar defaultGetText = function (id) { return id.toString(); };\nvar defaultDateFormatter = function (year, month, day) { return \"\".concat(month, \" \").concat(day, \", \").concat(year); };\n/**\n *\n * @param {RRule} rrule\n * Optional:\n * @param {Function} gettext function\n * @param {Object} language definition\n * @constructor\n */\nvar ToText = /** @class */ (function () {\n function ToText(rrule, gettext, language, dateFormatter) {\n if (gettext === void 0) { gettext = defaultGetText; }\n if (language === void 0) { language = ENGLISH; }\n if (dateFormatter === void 0) { dateFormatter = defaultDateFormatter; }\n this.text = [];\n this.language = language || ENGLISH;\n this.gettext = gettext;\n this.dateFormatter = dateFormatter;\n this.rrule = rrule;\n this.options = rrule.options;\n this.origOptions = rrule.origOptions;\n if (this.origOptions.bymonthday) {\n var bymonthday = [].concat(this.options.bymonthday);\n var bynmonthday = [].concat(this.options.bynmonthday);\n bymonthday.sort(function (a, b) { return a - b; });\n bynmonthday.sort(function (a, b) { return b - a; });\n // 1, 2, 3, .., -5, -4, -3, ..\n this.bymonthday = bymonthday.concat(bynmonthday);\n if (!this.bymonthday.length)\n this.bymonthday = null;\n }\n if (isPresent(this.origOptions.byweekday)) {\n var byweekday = !isArray(this.origOptions.byweekday)\n ? [this.origOptions.byweekday]\n : this.origOptions.byweekday;\n var days = String(byweekday);\n this.byweekday = {\n allWeeks: byweekday.filter(function (weekday) {\n return !weekday.n;\n }),\n someWeeks: byweekday.filter(function (weekday) {\n return Boolean(weekday.n);\n }),\n isWeekdays: days.indexOf('MO') !== -1 &&\n days.indexOf('TU') !== -1 &&\n days.indexOf('WE') !== -1 &&\n days.indexOf('TH') !== -1 &&\n days.indexOf('FR') !== -1 &&\n days.indexOf('SA') === -1 &&\n days.indexOf('SU') === -1,\n isEveryDay: days.indexOf('MO') !== -1 &&\n days.indexOf('TU') !== -1 &&\n days.indexOf('WE') !== -1 &&\n days.indexOf('TH') !== -1 &&\n days.indexOf('FR') !== -1 &&\n days.indexOf('SA') !== -1 &&\n days.indexOf('SU') !== -1,\n };\n var sortWeekDays = function (a, b) {\n return a.weekday - b.weekday;\n };\n this.byweekday.allWeeks.sort(sortWeekDays);\n this.byweekday.someWeeks.sort(sortWeekDays);\n if (!this.byweekday.allWeeks.length)\n this.byweekday.allWeeks = null;\n if (!this.byweekday.someWeeks.length)\n this.byweekday.someWeeks = null;\n }\n else {\n this.byweekday = null;\n }\n }\n /**\n * Test whether the rrule can be fully converted to text.\n *\n * @param {RRule} rrule\n * @return {Boolean}\n */\n ToText.isFullyConvertible = function (rrule) {\n var canConvert = true;\n if (!(rrule.options.freq in ToText.IMPLEMENTED))\n return false;\n if (rrule.origOptions.until && rrule.origOptions.count)\n return false;\n for (var key in rrule.origOptions) {\n if (contains(['dtstart', 'tzid', 'wkst', 'freq'], key))\n return true;\n if (!contains(ToText.IMPLEMENTED[rrule.options.freq], key))\n return false;\n }\n return canConvert;\n };\n ToText.prototype.isFullyConvertible = function () {\n return ToText.isFullyConvertible(this.rrule);\n };\n /**\n * Perform the conversion. Only some of the frequencies are supported.\n * If some of the rrule's options aren't supported, they'll\n * be omitted from the output an \"(~ approximate)\" will be appended.\n *\n * @return {*}\n */\n ToText.prototype.toString = function () {\n var gettext = this.gettext;\n if (!(this.options.freq in ToText.IMPLEMENTED)) {\n return gettext('RRule error: Unable to fully convert this rrule to text');\n }\n this.text = [gettext('every')];\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this[RRule.FREQUENCIES[this.options.freq]]();\n if (this.options.until) {\n this.add(gettext('until'));\n var until = this.options.until;\n this.add(this.dateFormatter(until.getUTCFullYear(), this.language.monthNames[until.getUTCMonth()], until.getUTCDate()));\n }\n else if (this.options.count) {\n this.add(gettext('for'))\n .add(this.options.count.toString())\n .add(this.plural(this.options.count) ? gettext('times') : gettext('time'));\n }\n if (!this.isFullyConvertible())\n this.add(gettext('(~ approximate)'));\n return this.text.join('');\n };\n ToText.prototype.HOURLY = function () {\n var gettext = this.gettext;\n if (this.options.interval !== 1)\n this.add(this.options.interval.toString());\n this.add(this.plural(this.options.interval) ? gettext('hours') : gettext('hour'));\n };\n ToText.prototype.MINUTELY = function () {\n var gettext = this.gettext;\n if (this.options.interval !== 1)\n this.add(this.options.interval.toString());\n this.add(this.plural(this.options.interval)\n ? gettext('minutes')\n : gettext('minute'));\n };\n ToText.prototype.DAILY = function () {\n var gettext = this.gettext;\n if (this.options.interval !== 1)\n this.add(this.options.interval.toString());\n if (this.byweekday && this.byweekday.isWeekdays) {\n this.add(this.plural(this.options.interval)\n ? gettext('weekdays')\n : gettext('weekday'));\n }\n else {\n this.add(this.plural(this.options.interval) ? gettext('days') : gettext('day'));\n }\n if (this.origOptions.bymonth) {\n this.add(gettext('in'));\n this._bymonth();\n }\n if (this.bymonthday) {\n this._bymonthday();\n }\n else if (this.byweekday) {\n this._byweekday();\n }\n else if (this.origOptions.byhour) {\n this._byhour();\n }\n };\n ToText.prototype.WEEKLY = function () {\n var gettext = this.gettext;\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString()).add(this.plural(this.options.interval) ? gettext('weeks') : gettext('week'));\n }\n if (this.byweekday && this.byweekday.isWeekdays) {\n if (this.options.interval === 1) {\n this.add(this.plural(this.options.interval)\n ? gettext('weekdays')\n : gettext('weekday'));\n }\n else {\n this.add(gettext('on')).add(gettext('weekdays'));\n }\n }\n else if (this.byweekday && this.byweekday.isEveryDay) {\n this.add(this.plural(this.options.interval) ? gettext('days') : gettext('day'));\n }\n else {\n if (this.options.interval === 1)\n this.add(gettext('week'));\n if (this.origOptions.bymonth) {\n this.add(gettext('in'));\n this._bymonth();\n }\n if (this.bymonthday) {\n this._bymonthday();\n }\n else if (this.byweekday) {\n this._byweekday();\n }\n if (this.origOptions.byhour) {\n this._byhour();\n }\n }\n };\n ToText.prototype.MONTHLY = function () {\n var gettext = this.gettext;\n if (this.origOptions.bymonth) {\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString()).add(gettext('months'));\n if (this.plural(this.options.interval))\n this.add(gettext('in'));\n }\n else {\n // this.add(gettext('MONTH'))\n }\n this._bymonth();\n }\n else {\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString());\n }\n this.add(this.plural(this.options.interval)\n ? gettext('months')\n : gettext('month'));\n }\n if (this.bymonthday) {\n this._bymonthday();\n }\n else if (this.byweekday && this.byweekday.isWeekdays) {\n this.add(gettext('on')).add(gettext('weekdays'));\n }\n else if (this.byweekday) {\n this._byweekday();\n }\n };\n ToText.prototype.YEARLY = function () {\n var gettext = this.gettext;\n if (this.origOptions.bymonth) {\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString());\n this.add(gettext('years'));\n }\n else {\n // this.add(gettext('YEAR'))\n }\n this._bymonth();\n }\n else {\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString());\n }\n this.add(this.plural(this.options.interval) ? gettext('years') : gettext('year'));\n }\n if (this.bymonthday) {\n this._bymonthday();\n }\n else if (this.byweekday) {\n this._byweekday();\n }\n if (this.options.byyearday) {\n this.add(gettext('on the'))\n .add(this.list(this.options.byyearday, this.nth, gettext('and')))\n .add(gettext('day'));\n }\n if (this.options.byweekno) {\n this.add(gettext('in'))\n .add(this.plural(this.options.byweekno.length)\n ? gettext('weeks')\n : gettext('week'))\n .add(this.list(this.options.byweekno, undefined, gettext('and')));\n }\n };\n ToText.prototype._bymonthday = function () {\n var gettext = this.gettext;\n if (this.byweekday && this.byweekday.allWeeks) {\n this.add(gettext('on'))\n .add(this.list(this.byweekday.allWeeks, this.weekdaytext, gettext('or')))\n .add(gettext('the'))\n .add(this.list(this.bymonthday, this.nth, gettext('or')));\n }\n else {\n this.add(gettext('on the')).add(this.list(this.bymonthday, this.nth, gettext('and')));\n }\n // this.add(gettext('DAY'))\n };\n ToText.prototype._byweekday = function () {\n var gettext = this.gettext;\n if (this.byweekday.allWeeks && !this.byweekday.isWeekdays) {\n this.add(gettext('on')).add(this.list(this.byweekday.allWeeks, this.weekdaytext));\n }\n if (this.byweekday.someWeeks) {\n if (this.byweekday.allWeeks)\n this.add(gettext('and'));\n this.add(gettext('on the')).add(this.list(this.byweekday.someWeeks, this.weekdaytext, gettext('and')));\n }\n };\n ToText.prototype._byhour = function () {\n var gettext = this.gettext;\n this.add(gettext('at')).add(this.list(this.origOptions.byhour, undefined, gettext('and')));\n };\n ToText.prototype._bymonth = function () {\n this.add(this.list(this.options.bymonth, this.monthtext, this.gettext('and')));\n };\n ToText.prototype.nth = function (n) {\n n = parseInt(n.toString(), 10);\n var nth;\n var gettext = this.gettext;\n if (n === -1)\n return gettext('last');\n var npos = Math.abs(n);\n switch (npos) {\n case 1:\n case 21:\n case 31:\n nth = npos + gettext('st');\n break;\n case 2:\n case 22:\n nth = npos + gettext('nd');\n break;\n case 3:\n case 23:\n nth = npos + gettext('rd');\n break;\n default:\n nth = npos + gettext('th');\n }\n return n < 0 ? nth + ' ' + gettext('last') : nth;\n };\n ToText.prototype.monthtext = function (m) {\n return this.language.monthNames[m - 1];\n };\n ToText.prototype.weekdaytext = function (wday) {\n var weekday = isNumber(wday) ? (wday + 1) % 7 : wday.getJsWeekday();\n return ((wday.n ? this.nth(wday.n) + ' ' : '') +\n this.language.dayNames[weekday]);\n };\n ToText.prototype.plural = function (n) {\n return n % 100 !== 1;\n };\n ToText.prototype.add = function (s) {\n this.text.push(' ');\n this.text.push(s);\n return this;\n };\n ToText.prototype.list = function (arr, callback, finalDelim, delim) {\n var _this = this;\n if (delim === void 0) { delim = ','; }\n if (!isArray(arr)) {\n arr = [arr];\n }\n var delimJoin = function (array, delimiter, finalDelimiter) {\n var list = '';\n for (var i = 0; i < array.length; i++) {\n if (i !== 0) {\n if (i === array.length - 1) {\n list += ' ' + finalDelimiter + ' ';\n }\n else {\n list += delimiter + ' ';\n }\n }\n list += array[i];\n }\n return list;\n };\n callback =\n callback ||\n function (o) {\n return o.toString();\n };\n var realCallback = function (arg) {\n return callback && callback.call(_this, arg);\n };\n if (finalDelim) {\n return delimJoin(arr.map(realCallback), delim, finalDelim);\n }\n else {\n return arr.map(realCallback).join(delim + ' ');\n }\n };\n return ToText;\n}());\nexport default ToText;\n//# sourceMappingURL=totext.js.map","import ENGLISH from './i18n';\nimport { RRule } from '../rrule';\n// =============================================================================\n// Parser\n// =============================================================================\nvar Parser = /** @class */ (function () {\n function Parser(rules) {\n this.done = true;\n this.rules = rules;\n }\n Parser.prototype.start = function (text) {\n this.text = text;\n this.done = false;\n return this.nextSymbol();\n };\n Parser.prototype.isDone = function () {\n return this.done && this.symbol === null;\n };\n Parser.prototype.nextSymbol = function () {\n var best;\n var bestSymbol;\n this.symbol = null;\n this.value = null;\n do {\n if (this.done)\n return false;\n var rule = void 0;\n best = null;\n for (var name_1 in this.rules) {\n rule = this.rules[name_1];\n var match = rule.exec(this.text);\n if (match) {\n if (best === null || match[0].length > best[0].length) {\n best = match;\n bestSymbol = name_1;\n }\n }\n }\n if (best != null) {\n this.text = this.text.substr(best[0].length);\n if (this.text === '')\n this.done = true;\n }\n if (best == null) {\n this.done = true;\n this.symbol = null;\n this.value = null;\n return;\n }\n } while (bestSymbol === 'SKIP');\n this.symbol = bestSymbol;\n this.value = best;\n return true;\n };\n Parser.prototype.accept = function (name) {\n if (this.symbol === name) {\n if (this.value) {\n var v = this.value;\n this.nextSymbol();\n return v;\n }\n this.nextSymbol();\n return true;\n }\n return false;\n };\n Parser.prototype.acceptNumber = function () {\n return this.accept('number');\n };\n Parser.prototype.expect = function (name) {\n if (this.accept(name))\n return true;\n throw new Error('expected ' + name + ' but found ' + this.symbol);\n };\n return Parser;\n}());\nexport default function parseText(text, language) {\n if (language === void 0) { language = ENGLISH; }\n var options = {};\n var ttr = new Parser(language.tokens);\n if (!ttr.start(text))\n return null;\n S();\n return options;\n function S() {\n // every [n]\n ttr.expect('every');\n var n = ttr.acceptNumber();\n if (n)\n options.interval = parseInt(n[0], 10);\n if (ttr.isDone())\n throw new Error('Unexpected end');\n switch (ttr.symbol) {\n case 'day(s)':\n options.freq = RRule.DAILY;\n if (ttr.nextSymbol()) {\n AT();\n F();\n }\n break;\n // FIXME Note: every 2 weekdays != every two weeks on weekdays.\n // DAILY on weekdays is not a valid rule\n case 'weekday(s)':\n options.freq = RRule.WEEKLY;\n options.byweekday = [RRule.MO, RRule.TU, RRule.WE, RRule.TH, RRule.FR];\n ttr.nextSymbol();\n AT();\n F();\n break;\n case 'week(s)':\n options.freq = RRule.WEEKLY;\n if (ttr.nextSymbol()) {\n ON();\n AT();\n F();\n }\n break;\n case 'hour(s)':\n options.freq = RRule.HOURLY;\n if (ttr.nextSymbol()) {\n ON();\n F();\n }\n break;\n case 'minute(s)':\n options.freq = RRule.MINUTELY;\n if (ttr.nextSymbol()) {\n ON();\n F();\n }\n break;\n case 'month(s)':\n options.freq = RRule.MONTHLY;\n if (ttr.nextSymbol()) {\n ON();\n F();\n }\n break;\n case 'year(s)':\n options.freq = RRule.YEARLY;\n if (ttr.nextSymbol()) {\n ON();\n F();\n }\n break;\n case 'monday':\n case 'tuesday':\n case 'wednesday':\n case 'thursday':\n case 'friday':\n case 'saturday':\n case 'sunday':\n options.freq = RRule.WEEKLY;\n var key = ttr.symbol\n .substr(0, 2)\n .toUpperCase();\n options.byweekday = [RRule[key]];\n if (!ttr.nextSymbol())\n return;\n // TODO check for duplicates\n while (ttr.accept('comma')) {\n if (ttr.isDone())\n throw new Error('Unexpected end');\n var wkd = decodeWKD();\n if (!wkd) {\n throw new Error('Unexpected symbol ' + ttr.symbol + ', expected weekday');\n }\n options.byweekday.push(RRule[wkd]);\n ttr.nextSymbol();\n }\n AT();\n MDAYs();\n F();\n break;\n case 'january':\n case 'february':\n case 'march':\n case 'april':\n case 'may':\n case 'june':\n case 'july':\n case 'august':\n case 'september':\n case 'october':\n case 'november':\n case 'december':\n options.freq = RRule.YEARLY;\n options.bymonth = [decodeM()];\n if (!ttr.nextSymbol())\n return;\n // TODO check for duplicates\n while (ttr.accept('comma')) {\n if (ttr.isDone())\n throw new Error('Unexpected end');\n var m = decodeM();\n if (!m) {\n throw new Error('Unexpected symbol ' + ttr.symbol + ', expected month');\n }\n options.bymonth.push(m);\n ttr.nextSymbol();\n }\n ON();\n F();\n break;\n default:\n throw new Error('Unknown symbol');\n }\n }\n function ON() {\n var on = ttr.accept('on');\n var the = ttr.accept('the');\n if (!(on || the))\n return;\n do {\n var nth = decodeNTH();\n var wkd = decodeWKD();\n var m = decodeM();\n // nth | \n if (nth) {\n // ttr.nextSymbol()\n if (wkd) {\n ttr.nextSymbol();\n if (!options.byweekday)\n options.byweekday = [];\n options.byweekday.push(RRule[wkd].nth(nth));\n }\n else {\n if (!options.bymonthday)\n options.bymonthday = [];\n options.bymonthday.push(nth);\n ttr.accept('day(s)');\n }\n // \n }\n else if (wkd) {\n ttr.nextSymbol();\n if (!options.byweekday)\n options.byweekday = [];\n options.byweekday.push(RRule[wkd]);\n }\n else if (ttr.symbol === 'weekday(s)') {\n ttr.nextSymbol();\n if (!options.byweekday) {\n options.byweekday = [RRule.MO, RRule.TU, RRule.WE, RRule.TH, RRule.FR];\n }\n }\n else if (ttr.symbol === 'week(s)') {\n ttr.nextSymbol();\n var n = ttr.acceptNumber();\n if (!n) {\n throw new Error('Unexpected symbol ' + ttr.symbol + ', expected week number');\n }\n options.byweekno = [parseInt(n[0], 10)];\n while (ttr.accept('comma')) {\n n = ttr.acceptNumber();\n if (!n) {\n throw new Error('Unexpected symbol ' + ttr.symbol + '; expected monthday');\n }\n options.byweekno.push(parseInt(n[0], 10));\n }\n }\n else if (m) {\n ttr.nextSymbol();\n if (!options.bymonth)\n options.bymonth = [];\n options.bymonth.push(m);\n }\n else {\n return;\n }\n } while (ttr.accept('comma') || ttr.accept('the') || ttr.accept('on'));\n }\n function AT() {\n var at = ttr.accept('at');\n if (!at)\n return;\n do {\n var n = ttr.acceptNumber();\n if (!n) {\n throw new Error('Unexpected symbol ' + ttr.symbol + ', expected hour');\n }\n options.byhour = [parseInt(n[0], 10)];\n while (ttr.accept('comma')) {\n n = ttr.acceptNumber();\n if (!n) {\n throw new Error('Unexpected symbol ' + ttr.symbol + '; expected hour');\n }\n options.byhour.push(parseInt(n[0], 10));\n }\n } while (ttr.accept('comma') || ttr.accept('at'));\n }\n function decodeM() {\n switch (ttr.symbol) {\n case 'january':\n return 1;\n case 'february':\n return 2;\n case 'march':\n return 3;\n case 'april':\n return 4;\n case 'may':\n return 5;\n case 'june':\n return 6;\n case 'july':\n return 7;\n case 'august':\n return 8;\n case 'september':\n return 9;\n case 'october':\n return 10;\n case 'november':\n return 11;\n case 'december':\n return 12;\n default:\n return false;\n }\n }\n function decodeWKD() {\n switch (ttr.symbol) {\n case 'monday':\n case 'tuesday':\n case 'wednesday':\n case 'thursday':\n case 'friday':\n case 'saturday':\n case 'sunday':\n return ttr.symbol.substr(0, 2).toUpperCase();\n default:\n return false;\n }\n }\n function decodeNTH() {\n switch (ttr.symbol) {\n case 'last':\n ttr.nextSymbol();\n return -1;\n case 'first':\n ttr.nextSymbol();\n return 1;\n case 'second':\n ttr.nextSymbol();\n return ttr.accept('last') ? -2 : 2;\n case 'third':\n ttr.nextSymbol();\n return ttr.accept('last') ? -3 : 3;\n case 'nth':\n var v = parseInt(ttr.value[1], 10);\n if (v < -366 || v > 366)\n throw new Error('Nth out of range: ' + v);\n ttr.nextSymbol();\n return ttr.accept('last') ? -v : v;\n default:\n return false;\n }\n }\n function MDAYs() {\n ttr.accept('on');\n ttr.accept('the');\n var nth = decodeNTH();\n if (!nth)\n return;\n options.bymonthday = [nth];\n ttr.nextSymbol();\n while (ttr.accept('comma')) {\n nth = decodeNTH();\n if (!nth) {\n throw new Error('Unexpected symbol ' + ttr.symbol + '; expected monthday');\n }\n options.bymonthday.push(nth);\n ttr.nextSymbol();\n }\n }\n function F() {\n if (ttr.symbol === 'until') {\n var date = Date.parse(ttr.text);\n if (!date)\n throw new Error('Cannot parse until date:' + ttr.text);\n options.until = new Date(date);\n }\n else if (ttr.accept('for')) {\n options.count = parseInt(ttr.value[0], 10);\n ttr.expect('number');\n // ttr.expect('times')\n }\n }\n}\n//# sourceMappingURL=parsetext.js.map","export var Frequency;\n(function (Frequency) {\n Frequency[Frequency[\"YEARLY\"] = 0] = \"YEARLY\";\n Frequency[Frequency[\"MONTHLY\"] = 1] = \"MONTHLY\";\n Frequency[Frequency[\"WEEKLY\"] = 2] = \"WEEKLY\";\n Frequency[Frequency[\"DAILY\"] = 3] = \"DAILY\";\n Frequency[Frequency[\"HOURLY\"] = 4] = \"HOURLY\";\n Frequency[Frequency[\"MINUTELY\"] = 5] = \"MINUTELY\";\n Frequency[Frequency[\"SECONDLY\"] = 6] = \"SECONDLY\";\n})(Frequency || (Frequency = {}));\nexport function freqIsDailyOrGreater(freq) {\n return freq < Frequency.HOURLY;\n}\n//# sourceMappingURL=types.js.map","import ToText from './totext';\nimport parseText from './parsetext';\nimport { RRule } from '../rrule';\nimport { Frequency } from '../types';\nimport ENGLISH from './i18n';\n/* !\n * rrule.js - Library for working with recurrence rules for calendar dates.\n * https://github.com/jakubroztocil/rrule\n *\n * Copyright 2010, Jakub Roztocil and Lars Schoning\n * Licenced under the BSD licence.\n * https://github.com/jakubroztocil/rrule/blob/master/LICENCE\n *\n */\n/**\n *\n * Implementation of RRule.fromText() and RRule::toText().\n *\n *\n * On the client side, this file needs to be included\n * when those functions are used.\n *\n */\n// =============================================================================\n// fromText\n// =============================================================================\n/**\n * Will be able to convert some of the below described rules from\n * text format to a rule object.\n *\n *\n * RULES\n *\n * Every ([n])\n * day(s)\n * | [weekday], ..., (and) [weekday]\n * | weekday(s)\n * | week(s)\n * | month(s)\n * | [month], ..., (and) [month]\n * | year(s)\n *\n *\n * Plus 0, 1, or multiple of these:\n *\n * on [weekday], ..., (or) [weekday] the [monthday], [monthday], ... (or) [monthday]\n *\n * on [weekday], ..., (and) [weekday]\n *\n * on the [monthday], [monthday], ... (and) [monthday] (day of the month)\n *\n * on the [nth-weekday], ..., (and) [nth-weekday] (of the month/year)\n *\n *\n * Plus 0 or 1 of these:\n *\n * for [n] time(s)\n *\n * until [date]\n *\n * Plus (.)\n *\n *\n * Definitely no supported for parsing:\n *\n * (for year):\n * in week(s) [n], ..., (and) [n]\n *\n * on the [yearday], ..., (and) [n] day of the year\n * on day [yearday], ..., (and) [n]\n *\n *\n * NON-TERMINALS\n *\n * [n]: 1, 2 ..., one, two, three ..\n * [month]: January, February, March, April, May, ... December\n * [weekday]: Monday, ... Sunday\n * [nth-weekday]: first [weekday], 2nd [weekday], ... last [weekday], ...\n * [monthday]: first, 1., 2., 1st, 2nd, second, ... 31st, last day, 2nd last day, ..\n * [date]:\n * - [month] (0-31(,) ([year])),\n * - (the) 0-31.(1-12.([year])),\n * - (the) 0-31/(1-12/([year])),\n * - [weekday]\n *\n * [year]: 0000, 0001, ... 01, 02, ..\n *\n * Definitely not supported for parsing:\n *\n * [yearday]: first, 1., 2., 1st, 2nd, second, ... 366th, last day, 2nd last day, ..\n *\n * @param {String} text\n * @return {Object, Boolean} the rule, or null.\n */\nvar fromText = function (text, language) {\n if (language === void 0) { language = ENGLISH; }\n return new RRule(parseText(text, language) || undefined);\n};\nvar common = [\n 'count',\n 'until',\n 'interval',\n 'byweekday',\n 'bymonthday',\n 'bymonth',\n];\nToText.IMPLEMENTED = [];\nToText.IMPLEMENTED[Frequency.HOURLY] = common;\nToText.IMPLEMENTED[Frequency.MINUTELY] = common;\nToText.IMPLEMENTED[Frequency.DAILY] = ['byhour'].concat(common);\nToText.IMPLEMENTED[Frequency.WEEKLY] = common;\nToText.IMPLEMENTED[Frequency.MONTHLY] = common;\nToText.IMPLEMENTED[Frequency.YEARLY] = ['byweekno', 'byyearday'].concat(common);\n// =============================================================================\n// Export\n// =============================================================================\nvar toText = function (rrule, gettext, language, dateFormatter) {\n return new ToText(rrule, gettext, language, dateFormatter).toString();\n};\nvar isFullyConvertible = ToText.isFullyConvertible;\nexport { fromText, parseText, isFullyConvertible, toText };\n//# sourceMappingURL=index.js.map","import { __extends } from \"tslib\";\nimport { Frequency } from './types';\nimport { pymod, divmod, empty, includes } from './helpers';\nimport { getWeekday, MAXYEAR, monthRange } from './dateutil';\nvar Time = /** @class */ (function () {\n function Time(hour, minute, second, millisecond) {\n this.hour = hour;\n this.minute = minute;\n this.second = second;\n this.millisecond = millisecond || 0;\n }\n Time.prototype.getHours = function () {\n return this.hour;\n };\n Time.prototype.getMinutes = function () {\n return this.minute;\n };\n Time.prototype.getSeconds = function () {\n return this.second;\n };\n Time.prototype.getMilliseconds = function () {\n return this.millisecond;\n };\n Time.prototype.getTime = function () {\n return ((this.hour * 60 * 60 + this.minute * 60 + this.second) * 1000 +\n this.millisecond);\n };\n return Time;\n}());\nexport { Time };\nvar DateTime = /** @class */ (function (_super) {\n __extends(DateTime, _super);\n function DateTime(year, month, day, hour, minute, second, millisecond) {\n var _this = _super.call(this, hour, minute, second, millisecond) || this;\n _this.year = year;\n _this.month = month;\n _this.day = day;\n return _this;\n }\n DateTime.fromDate = function (date) {\n return new this(date.getUTCFullYear(), date.getUTCMonth() + 1, date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), date.valueOf() % 1000);\n };\n DateTime.prototype.getWeekday = function () {\n return getWeekday(new Date(this.getTime()));\n };\n DateTime.prototype.getTime = function () {\n return new Date(Date.UTC(this.year, this.month - 1, this.day, this.hour, this.minute, this.second, this.millisecond)).getTime();\n };\n DateTime.prototype.getDay = function () {\n return this.day;\n };\n DateTime.prototype.getMonth = function () {\n return this.month;\n };\n DateTime.prototype.getYear = function () {\n return this.year;\n };\n DateTime.prototype.addYears = function (years) {\n this.year += years;\n };\n DateTime.prototype.addMonths = function (months) {\n this.month += months;\n if (this.month > 12) {\n var yearDiv = Math.floor(this.month / 12);\n var monthMod = pymod(this.month, 12);\n this.month = monthMod;\n this.year += yearDiv;\n if (this.month === 0) {\n this.month = 12;\n --this.year;\n }\n }\n };\n DateTime.prototype.addWeekly = function (days, wkst) {\n if (wkst > this.getWeekday()) {\n this.day += -(this.getWeekday() + 1 + (6 - wkst)) + days * 7;\n }\n else {\n this.day += -(this.getWeekday() - wkst) + days * 7;\n }\n this.fixDay();\n };\n DateTime.prototype.addDaily = function (days) {\n this.day += days;\n this.fixDay();\n };\n DateTime.prototype.addHours = function (hours, filtered, byhour) {\n if (filtered) {\n // Jump to one iteration before next day\n this.hour += Math.floor((23 - this.hour) / hours) * hours;\n }\n for (;;) {\n this.hour += hours;\n var _a = divmod(this.hour, 24), dayDiv = _a.div, hourMod = _a.mod;\n if (dayDiv) {\n this.hour = hourMod;\n this.addDaily(dayDiv);\n }\n if (empty(byhour) || includes(byhour, this.hour))\n break;\n }\n };\n DateTime.prototype.addMinutes = function (minutes, filtered, byhour, byminute) {\n if (filtered) {\n // Jump to one iteration before next day\n this.minute +=\n Math.floor((1439 - (this.hour * 60 + this.minute)) / minutes) * minutes;\n }\n for (;;) {\n this.minute += minutes;\n var _a = divmod(this.minute, 60), hourDiv = _a.div, minuteMod = _a.mod;\n if (hourDiv) {\n this.minute = minuteMod;\n this.addHours(hourDiv, false, byhour);\n }\n if ((empty(byhour) || includes(byhour, this.hour)) &&\n (empty(byminute) || includes(byminute, this.minute))) {\n break;\n }\n }\n };\n DateTime.prototype.addSeconds = function (seconds, filtered, byhour, byminute, bysecond) {\n if (filtered) {\n // Jump to one iteration before next day\n this.second +=\n Math.floor((86399 - (this.hour * 3600 + this.minute * 60 + this.second)) /\n seconds) * seconds;\n }\n for (;;) {\n this.second += seconds;\n var _a = divmod(this.second, 60), minuteDiv = _a.div, secondMod = _a.mod;\n if (minuteDiv) {\n this.second = secondMod;\n this.addMinutes(minuteDiv, false, byhour, byminute);\n }\n if ((empty(byhour) || includes(byhour, this.hour)) &&\n (empty(byminute) || includes(byminute, this.minute)) &&\n (empty(bysecond) || includes(bysecond, this.second))) {\n break;\n }\n }\n };\n DateTime.prototype.fixDay = function () {\n if (this.day <= 28) {\n return;\n }\n var daysinmonth = monthRange(this.year, this.month - 1)[1];\n if (this.day <= daysinmonth) {\n return;\n }\n while (this.day > daysinmonth) {\n this.day -= daysinmonth;\n ++this.month;\n if (this.month === 13) {\n this.month = 1;\n ++this.year;\n if (this.year > MAXYEAR) {\n return;\n }\n }\n daysinmonth = monthRange(this.year, this.month - 1)[1];\n }\n };\n DateTime.prototype.add = function (options, filtered) {\n var freq = options.freq, interval = options.interval, wkst = options.wkst, byhour = options.byhour, byminute = options.byminute, bysecond = options.bysecond;\n switch (freq) {\n case Frequency.YEARLY:\n return this.addYears(interval);\n case Frequency.MONTHLY:\n return this.addMonths(interval);\n case Frequency.WEEKLY:\n return this.addWeekly(interval, wkst);\n case Frequency.DAILY:\n return this.addDaily(interval);\n case Frequency.HOURLY:\n return this.addHours(interval, filtered, byhour);\n case Frequency.MINUTELY:\n return this.addMinutes(interval, filtered, byhour, byminute);\n case Frequency.SECONDLY:\n return this.addSeconds(interval, filtered, byhour, byminute, bysecond);\n }\n };\n return DateTime;\n}(Time));\nexport { DateTime };\n//# sourceMappingURL=datetime.js.map","import { __assign } from \"tslib\";\nimport { freqIsDailyOrGreater } from './types';\nimport { includes, notEmpty, isPresent, isNumber, isArray, isWeekdayStr, } from './helpers';\nimport { RRule, defaultKeys, DEFAULT_OPTIONS } from './rrule';\nimport { getWeekday, isDate, isValidDate } from './dateutil';\nimport { Weekday } from './weekday';\nimport { Time } from './datetime';\nexport function initializeOptions(options) {\n var invalid = [];\n var keys = Object.keys(options);\n // Shallow copy for options and origOptions and check for invalid\n for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {\n var key = keys_1[_i];\n if (!includes(defaultKeys, key))\n invalid.push(key);\n if (isDate(options[key]) && !isValidDate(options[key])) {\n invalid.push(key);\n }\n }\n if (invalid.length) {\n throw new Error('Invalid options: ' + invalid.join(', '));\n }\n return __assign({}, options);\n}\nexport function parseOptions(options) {\n var opts = __assign(__assign({}, DEFAULT_OPTIONS), initializeOptions(options));\n if (isPresent(opts.byeaster))\n opts.freq = RRule.YEARLY;\n if (!(isPresent(opts.freq) && RRule.FREQUENCIES[opts.freq])) {\n throw new Error(\"Invalid frequency: \".concat(opts.freq, \" \").concat(options.freq));\n }\n if (!opts.dtstart)\n opts.dtstart = new Date(new Date().setMilliseconds(0));\n if (!isPresent(opts.wkst)) {\n opts.wkst = RRule.MO.weekday;\n }\n else if (isNumber(opts.wkst)) {\n // cool, just keep it like that\n }\n else {\n opts.wkst = opts.wkst.weekday;\n }\n if (isPresent(opts.bysetpos)) {\n if (isNumber(opts.bysetpos))\n opts.bysetpos = [opts.bysetpos];\n for (var i = 0; i < opts.bysetpos.length; i++) {\n var v = opts.bysetpos[i];\n if (v === 0 || !(v >= -366 && v <= 366)) {\n throw new Error('bysetpos must be between 1 and 366,' + ' or between -366 and -1');\n }\n }\n }\n if (!(Boolean(opts.byweekno) ||\n notEmpty(opts.byweekno) ||\n notEmpty(opts.byyearday) ||\n Boolean(opts.bymonthday) ||\n notEmpty(opts.bymonthday) ||\n isPresent(opts.byweekday) ||\n isPresent(opts.byeaster))) {\n switch (opts.freq) {\n case RRule.YEARLY:\n if (!opts.bymonth)\n opts.bymonth = opts.dtstart.getUTCMonth() + 1;\n opts.bymonthday = opts.dtstart.getUTCDate();\n break;\n case RRule.MONTHLY:\n opts.bymonthday = opts.dtstart.getUTCDate();\n break;\n case RRule.WEEKLY:\n opts.byweekday = [getWeekday(opts.dtstart)];\n break;\n }\n }\n // bymonth\n if (isPresent(opts.bymonth) && !isArray(opts.bymonth)) {\n opts.bymonth = [opts.bymonth];\n }\n // byyearday\n if (isPresent(opts.byyearday) &&\n !isArray(opts.byyearday) &&\n isNumber(opts.byyearday)) {\n opts.byyearday = [opts.byyearday];\n }\n // bymonthday\n if (!isPresent(opts.bymonthday)) {\n opts.bymonthday = [];\n opts.bynmonthday = [];\n }\n else if (isArray(opts.bymonthday)) {\n var bymonthday = [];\n var bynmonthday = [];\n for (var i = 0; i < opts.bymonthday.length; i++) {\n var v = opts.bymonthday[i];\n if (v > 0) {\n bymonthday.push(v);\n }\n else if (v < 0) {\n bynmonthday.push(v);\n }\n }\n opts.bymonthday = bymonthday;\n opts.bynmonthday = bynmonthday;\n }\n else if (opts.bymonthday < 0) {\n opts.bynmonthday = [opts.bymonthday];\n opts.bymonthday = [];\n }\n else {\n opts.bynmonthday = [];\n opts.bymonthday = [opts.bymonthday];\n }\n // byweekno\n if (isPresent(opts.byweekno) && !isArray(opts.byweekno)) {\n opts.byweekno = [opts.byweekno];\n }\n // byweekday / bynweekday\n if (!isPresent(opts.byweekday)) {\n opts.bynweekday = null;\n }\n else if (isNumber(opts.byweekday)) {\n opts.byweekday = [opts.byweekday];\n opts.bynweekday = null;\n }\n else if (isWeekdayStr(opts.byweekday)) {\n opts.byweekday = [Weekday.fromStr(opts.byweekday).weekday];\n opts.bynweekday = null;\n }\n else if (opts.byweekday instanceof Weekday) {\n if (!opts.byweekday.n || opts.freq > RRule.MONTHLY) {\n opts.byweekday = [opts.byweekday.weekday];\n opts.bynweekday = null;\n }\n else {\n opts.bynweekday = [[opts.byweekday.weekday, opts.byweekday.n]];\n opts.byweekday = null;\n }\n }\n else {\n var byweekday = [];\n var bynweekday = [];\n for (var i = 0; i < opts.byweekday.length; i++) {\n var wday = opts.byweekday[i];\n if (isNumber(wday)) {\n byweekday.push(wday);\n continue;\n }\n else if (isWeekdayStr(wday)) {\n byweekday.push(Weekday.fromStr(wday).weekday);\n continue;\n }\n if (!wday.n || opts.freq > RRule.MONTHLY) {\n byweekday.push(wday.weekday);\n }\n else {\n bynweekday.push([wday.weekday, wday.n]);\n }\n }\n opts.byweekday = notEmpty(byweekday) ? byweekday : null;\n opts.bynweekday = notEmpty(bynweekday) ? bynweekday : null;\n }\n // byhour\n if (!isPresent(opts.byhour)) {\n opts.byhour = opts.freq < RRule.HOURLY ? [opts.dtstart.getUTCHours()] : null;\n }\n else if (isNumber(opts.byhour)) {\n opts.byhour = [opts.byhour];\n }\n // byminute\n if (!isPresent(opts.byminute)) {\n opts.byminute =\n opts.freq < RRule.MINUTELY ? [opts.dtstart.getUTCMinutes()] : null;\n }\n else if (isNumber(opts.byminute)) {\n opts.byminute = [opts.byminute];\n }\n // bysecond\n if (!isPresent(opts.bysecond)) {\n opts.bysecond =\n opts.freq < RRule.SECONDLY ? [opts.dtstart.getUTCSeconds()] : null;\n }\n else if (isNumber(opts.bysecond)) {\n opts.bysecond = [opts.bysecond];\n }\n return { parsedOptions: opts };\n}\nexport function buildTimeset(opts) {\n var millisecondModulo = opts.dtstart.getTime() % 1000;\n if (!freqIsDailyOrGreater(opts.freq)) {\n return [];\n }\n var timeset = [];\n opts.byhour.forEach(function (hour) {\n opts.byminute.forEach(function (minute) {\n opts.bysecond.forEach(function (second) {\n timeset.push(new Time(hour, minute, second, millisecondModulo));\n });\n });\n });\n return timeset;\n}\n//# sourceMappingURL=parseoptions.js.map","import { __assign } from \"tslib\";\nimport { Frequency } from './types';\nimport { Weekday } from './weekday';\nimport { untilStringToDate } from './dateutil';\nimport { Days } from './rrule';\nexport function parseString(rfcString) {\n var options = rfcString\n .split('\\n')\n .map(parseLine)\n .filter(function (x) { return x !== null; });\n return __assign(__assign({}, options[0]), options[1]);\n}\nexport function parseDtstart(line) {\n var options = {};\n var dtstartWithZone = /DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\\s]+)/i.exec(line);\n if (!dtstartWithZone) {\n return options;\n }\n var tzid = dtstartWithZone[1], dtstart = dtstartWithZone[2];\n if (tzid) {\n options.tzid = tzid;\n }\n options.dtstart = untilStringToDate(dtstart);\n return options;\n}\nfunction parseLine(rfcString) {\n rfcString = rfcString.replace(/^\\s+|\\s+$/, '');\n if (!rfcString.length)\n return null;\n var header = /^([A-Z]+?)[:;]/.exec(rfcString.toUpperCase());\n if (!header) {\n return parseRrule(rfcString);\n }\n var key = header[1];\n switch (key.toUpperCase()) {\n case 'RRULE':\n case 'EXRULE':\n return parseRrule(rfcString);\n case 'DTSTART':\n return parseDtstart(rfcString);\n default:\n throw new Error(\"Unsupported RFC prop \".concat(key, \" in \").concat(rfcString));\n }\n}\nfunction parseRrule(line) {\n var strippedLine = line.replace(/^RRULE:/i, '');\n var options = parseDtstart(strippedLine);\n var attrs = line.replace(/^(?:RRULE|EXRULE):/i, '').split(';');\n attrs.forEach(function (attr) {\n var _a = attr.split('='), key = _a[0], value = _a[1];\n switch (key.toUpperCase()) {\n case 'FREQ':\n options.freq = Frequency[value.toUpperCase()];\n break;\n case 'WKST':\n options.wkst = Days[value.toUpperCase()];\n break;\n case 'COUNT':\n case 'INTERVAL':\n case 'BYSETPOS':\n case 'BYMONTH':\n case 'BYMONTHDAY':\n case 'BYYEARDAY':\n case 'BYWEEKNO':\n case 'BYHOUR':\n case 'BYMINUTE':\n case 'BYSECOND':\n var num = parseNumber(value);\n var optionKey = key.toLowerCase();\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n options[optionKey] = num;\n break;\n case 'BYWEEKDAY':\n case 'BYDAY':\n options.byweekday = parseWeekday(value);\n break;\n case 'DTSTART':\n case 'TZID':\n // for backwards compatibility\n var dtstart = parseDtstart(line);\n options.tzid = dtstart.tzid;\n options.dtstart = dtstart.dtstart;\n break;\n case 'UNTIL':\n options.until = untilStringToDate(value);\n break;\n case 'BYEASTER':\n options.byeaster = Number(value);\n break;\n default:\n throw new Error(\"Unknown RRULE property '\" + key + \"'\");\n }\n });\n return options;\n}\nfunction parseNumber(value) {\n if (value.indexOf(',') !== -1) {\n var values = value.split(',');\n return values.map(parseIndividualNumber);\n }\n return parseIndividualNumber(value);\n}\nfunction parseIndividualNumber(value) {\n if (/^[+-]?\\d+$/.test(value)) {\n return Number(value);\n }\n return value;\n}\nfunction parseWeekday(value) {\n var days = value.split(',');\n return days.map(function (day) {\n if (day.length === 2) {\n // MO, TU, ...\n return Days[day]; // wday instanceof Weekday\n }\n // -1MO, +3FR, 1SO, 13TU ...\n var parts = day.match(/^([+-]?\\d{1,2})([A-Z]{2})$/);\n if (!parts || parts.length < 3) {\n throw new SyntaxError(\"Invalid weekday string: \".concat(day));\n }\n var n = Number(parts[1]);\n var wdaypart = parts[2];\n var wday = Days[wdaypart].weekday;\n return new Weekday(wday, n);\n });\n}\n//# sourceMappingURL=parsestring.js.map","import { dateInTimeZone, timeToUntilString } from './dateutil';\nvar DateWithZone = /** @class */ (function () {\n function DateWithZone(date, tzid) {\n if (isNaN(date.getTime())) {\n throw new RangeError('Invalid date passed to DateWithZone');\n }\n this.date = date;\n this.tzid = tzid;\n }\n Object.defineProperty(DateWithZone.prototype, \"isUTC\", {\n get: function () {\n return !this.tzid || this.tzid.toUpperCase() === 'UTC';\n },\n enumerable: false,\n configurable: true\n });\n DateWithZone.prototype.toString = function () {\n var datestr = timeToUntilString(this.date.getTime(), this.isUTC);\n if (!this.isUTC) {\n return \";TZID=\".concat(this.tzid, \":\").concat(datestr);\n }\n return \":\".concat(datestr);\n };\n DateWithZone.prototype.getTime = function () {\n return this.date.getTime();\n };\n DateWithZone.prototype.rezonedDate = function () {\n if (this.isUTC) {\n return this.date;\n }\n return dateInTimeZone(this.date, this.tzid);\n };\n return DateWithZone;\n}());\nexport { DateWithZone };\n//# sourceMappingURL=datewithzone.js.map","import { RRule, DEFAULT_OPTIONS } from './rrule';\nimport { includes, isPresent, isArray, isNumber, toArray } from './helpers';\nimport { Weekday } from './weekday';\nimport { timeToUntilString } from './dateutil';\nimport { DateWithZone } from './datewithzone';\nexport function optionsToString(options) {\n var rrule = [];\n var dtstart = '';\n var keys = Object.keys(options);\n var defaultKeys = Object.keys(DEFAULT_OPTIONS);\n for (var i = 0; i < keys.length; i++) {\n if (keys[i] === 'tzid')\n continue;\n if (!includes(defaultKeys, keys[i]))\n continue;\n var key = keys[i].toUpperCase();\n var value = options[keys[i]];\n var outValue = '';\n if (!isPresent(value) || (isArray(value) && !value.length))\n continue;\n switch (key) {\n case 'FREQ':\n outValue = RRule.FREQUENCIES[options.freq];\n break;\n case 'WKST':\n if (isNumber(value)) {\n outValue = new Weekday(value).toString();\n }\n else {\n outValue = value.toString();\n }\n break;\n case 'BYWEEKDAY':\n /*\n NOTE: BYWEEKDAY is a special case.\n RRule() deconstructs the rule.options.byweekday array\n into an array of Weekday arguments.\n On the other hand, rule.origOptions is an array of Weekdays.\n We need to handle both cases here.\n It might be worth change RRule to keep the Weekdays.\n \n Also, BYWEEKDAY (used by RRule) vs. BYDAY (RFC)\n \n */\n key = 'BYDAY';\n outValue = toArray(value)\n .map(function (wday) {\n if (wday instanceof Weekday) {\n return wday;\n }\n if (isArray(wday)) {\n return new Weekday(wday[0], wday[1]);\n }\n return new Weekday(wday);\n })\n .toString();\n break;\n case 'DTSTART':\n dtstart = buildDtstart(value, options.tzid);\n break;\n case 'UNTIL':\n outValue = timeToUntilString(value, !options.tzid);\n break;\n default:\n if (isArray(value)) {\n var strValues = [];\n for (var j = 0; j < value.length; j++) {\n strValues[j] = String(value[j]);\n }\n outValue = strValues.toString();\n }\n else {\n outValue = String(value);\n }\n }\n if (outValue) {\n rrule.push([key, outValue]);\n }\n }\n var rules = rrule\n .map(function (_a) {\n var key = _a[0], value = _a[1];\n return \"\".concat(key, \"=\").concat(value.toString());\n })\n .join(';');\n var ruleString = '';\n if (rules !== '') {\n ruleString = \"RRULE:\".concat(rules);\n }\n return [dtstart, ruleString].filter(function (x) { return !!x; }).join('\\n');\n}\nfunction buildDtstart(dtstart, tzid) {\n if (!dtstart) {\n return '';\n }\n return 'DTSTART' + new DateWithZone(new Date(dtstart), tzid).toString();\n}\n//# sourceMappingURL=optionstostring.js.map","import IterResult from './iterresult';\nimport { clone, cloneDates } from './dateutil';\nimport { isArray } from './helpers';\nfunction argsMatch(left, right) {\n if (Array.isArray(left)) {\n if (!Array.isArray(right))\n return false;\n if (left.length !== right.length)\n return false;\n return left.every(function (date, i) { return date.getTime() === right[i].getTime(); });\n }\n if (left instanceof Date) {\n return right instanceof Date && left.getTime() === right.getTime();\n }\n return left === right;\n}\nvar Cache = /** @class */ (function () {\n function Cache() {\n this.all = false;\n this.before = [];\n this.after = [];\n this.between = [];\n }\n /**\n * @param {String} what - all/before/after/between\n * @param {Array,Date} value - an array of dates, one date, or null\n * @param {Object?} args - _iter arguments\n */\n Cache.prototype._cacheAdd = function (what, value, args) {\n if (value) {\n value = value instanceof Date ? clone(value) : cloneDates(value);\n }\n if (what === 'all') {\n this.all = value;\n }\n else {\n args._value = value;\n this[what].push(args);\n }\n };\n /**\n * @return false - not in the cache\n * @return null - cached, but zero occurrences (before/after)\n * @return Date - cached (before/after)\n * @return [] - cached, but zero occurrences (all/between)\n * @return [Date1, DateN] - cached (all/between)\n */\n Cache.prototype._cacheGet = function (what, args) {\n var cached = false;\n var argsKeys = args ? Object.keys(args) : [];\n var findCacheDiff = function (item) {\n for (var i = 0; i < argsKeys.length; i++) {\n var key = argsKeys[i];\n if (!argsMatch(args[key], item[key])) {\n return true;\n }\n }\n return false;\n };\n var cachedObject = this[what];\n if (what === 'all') {\n cached = this.all;\n }\n else if (isArray(cachedObject)) {\n // Let's see whether we've already called the\n // 'what' method with the same 'args'\n for (var i = 0; i < cachedObject.length; i++) {\n var item = cachedObject[i];\n if (argsKeys.length && findCacheDiff(item))\n continue;\n cached = item._value;\n break;\n }\n }\n if (!cached && this.all) {\n // Not in the cache, but we already know all the occurrences,\n // so we can find the correct dates from the cached ones.\n var iterResult = new IterResult(what, args);\n for (var i = 0; i < this.all.length; i++) {\n if (!iterResult.accept(this.all[i]))\n break;\n }\n cached = iterResult.getValue();\n this._cacheAdd(what, cached, args);\n }\n return isArray(cached)\n ? cloneDates(cached)\n : cached instanceof Date\n ? clone(cached)\n : cached;\n };\n return Cache;\n}());\nexport { Cache };\n//# sourceMappingURL=cache.js.map","import { __spreadArray } from \"tslib\";\nimport { range, repeat } from './helpers';\n// =============================================================================\n// Date masks\n// =============================================================================\n// Every mask is 7 days longer to handle cross-year weekly periods.\nvar M365MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], repeat(1, 31), true), repeat(2, 28), true), repeat(3, 31), true), repeat(4, 30), true), repeat(5, 31), true), repeat(6, 30), true), repeat(7, 31), true), repeat(8, 31), true), repeat(9, 30), true), repeat(10, 31), true), repeat(11, 30), true), repeat(12, 31), true), repeat(1, 7), true);\nvar M366MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], repeat(1, 31), true), repeat(2, 29), true), repeat(3, 31), true), repeat(4, 30), true), repeat(5, 31), true), repeat(6, 30), true), repeat(7, 31), true), repeat(8, 31), true), repeat(9, 30), true), repeat(10, 31), true), repeat(11, 30), true), repeat(12, 31), true), repeat(1, 7), true);\nvar M28 = range(1, 29);\nvar M29 = range(1, 30);\nvar M30 = range(1, 31);\nvar M31 = range(1, 32);\nvar MDAY366MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], M31, true), M29, true), M31, true), M30, true), M31, true), M30, true), M31, true), M31, true), M30, true), M31, true), M30, true), M31, true), M31.slice(0, 7), true);\nvar MDAY365MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], M31, true), M28, true), M31, true), M30, true), M31, true), M30, true), M31, true), M31, true), M30, true), M31, true), M30, true), M31, true), M31.slice(0, 7), true);\nvar NM28 = range(-28, 0);\nvar NM29 = range(-29, 0);\nvar NM30 = range(-30, 0);\nvar NM31 = range(-31, 0);\nvar NMDAY366MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], NM31, true), NM29, true), NM31, true), NM30, true), NM31, true), NM30, true), NM31, true), NM31, true), NM30, true), NM31, true), NM30, true), NM31, true), NM31.slice(0, 7), true);\nvar NMDAY365MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], NM31, true), NM28, true), NM31, true), NM30, true), NM31, true), NM30, true), NM31, true), NM31, true), NM30, true), NM31, true), NM30, true), NM31, true), NM31.slice(0, 7), true);\nvar M366RANGE = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366];\nvar M365RANGE = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365];\nvar WDAYMASK = (function () {\n var wdaymask = [];\n for (var i = 0; i < 55; i++)\n wdaymask = wdaymask.concat(range(7));\n return wdaymask;\n})();\nexport { WDAYMASK, M365MASK, M365RANGE, M366MASK, M366RANGE, MDAY365MASK, MDAY366MASK, NMDAY365MASK, NMDAY366MASK, };\n//# sourceMappingURL=masks.js.map","import { __assign } from \"tslib\";\nimport { datetime, getWeekday, isLeapYear, toOrdinal } from '../dateutil';\nimport { empty, repeat, pymod, includes } from '../helpers';\nimport { M365MASK, MDAY365MASK, NMDAY365MASK, WDAYMASK, M365RANGE, M366MASK, MDAY366MASK, NMDAY366MASK, M366RANGE, } from '../masks';\nexport function rebuildYear(year, options) {\n var firstyday = datetime(year, 1, 1);\n var yearlen = isLeapYear(year) ? 366 : 365;\n var nextyearlen = isLeapYear(year + 1) ? 366 : 365;\n var yearordinal = toOrdinal(firstyday);\n var yearweekday = getWeekday(firstyday);\n var result = __assign(__assign({ yearlen: yearlen, nextyearlen: nextyearlen, yearordinal: yearordinal, yearweekday: yearweekday }, baseYearMasks(year)), { wnomask: null });\n if (empty(options.byweekno)) {\n return result;\n }\n result.wnomask = repeat(0, yearlen + 7);\n var firstwkst;\n var wyearlen;\n var no1wkst = (firstwkst = pymod(7 - yearweekday + options.wkst, 7));\n if (no1wkst >= 4) {\n no1wkst = 0;\n // Number of days in the year, plus the days we got\n // from last year.\n wyearlen = result.yearlen + pymod(yearweekday - options.wkst, 7);\n }\n else {\n // Number of days in the year, minus the days we\n // left in last year.\n wyearlen = yearlen - no1wkst;\n }\n var div = Math.floor(wyearlen / 7);\n var mod = pymod(wyearlen, 7);\n var numweeks = Math.floor(div + mod / 4);\n for (var j = 0; j < options.byweekno.length; j++) {\n var n = options.byweekno[j];\n if (n < 0) {\n n += numweeks + 1;\n }\n if (!(n > 0 && n <= numweeks)) {\n continue;\n }\n var i = void 0;\n if (n > 1) {\n i = no1wkst + (n - 1) * 7;\n if (no1wkst !== firstwkst) {\n i -= 7 - firstwkst;\n }\n }\n else {\n i = no1wkst;\n }\n for (var k = 0; k < 7; k++) {\n result.wnomask[i] = 1;\n i++;\n if (result.wdaymask[i] === options.wkst)\n break;\n }\n }\n if (includes(options.byweekno, 1)) {\n // Check week number 1 of next year as well\n // orig-TODO : Check -numweeks for next year.\n var i = no1wkst + numweeks * 7;\n if (no1wkst !== firstwkst)\n i -= 7 - firstwkst;\n if (i < yearlen) {\n // If week starts in next year, we\n // don't care about it.\n for (var j = 0; j < 7; j++) {\n result.wnomask[i] = 1;\n i += 1;\n if (result.wdaymask[i] === options.wkst)\n break;\n }\n }\n }\n if (no1wkst) {\n // Check last week number of last year as\n // well. If no1wkst is 0, either the year\n // started on week start, or week number 1\n // got days from last year, so there are no\n // days from last year's last week number in\n // this year.\n var lnumweeks = void 0;\n if (!includes(options.byweekno, -1)) {\n var lyearweekday = getWeekday(datetime(year - 1, 1, 1));\n var lno1wkst = pymod(7 - lyearweekday.valueOf() + options.wkst, 7);\n var lyearlen = isLeapYear(year - 1) ? 366 : 365;\n var weekst = void 0;\n if (lno1wkst >= 4) {\n lno1wkst = 0;\n weekst = lyearlen + pymod(lyearweekday - options.wkst, 7);\n }\n else {\n weekst = yearlen - no1wkst;\n }\n lnumweeks = Math.floor(52 + pymod(weekst, 7) / 4);\n }\n else {\n lnumweeks = -1;\n }\n if (includes(options.byweekno, lnumweeks)) {\n for (var i = 0; i < no1wkst; i++)\n result.wnomask[i] = 1;\n }\n }\n return result;\n}\nfunction baseYearMasks(year) {\n var yearlen = isLeapYear(year) ? 366 : 365;\n var firstyday = datetime(year, 1, 1);\n var wday = getWeekday(firstyday);\n if (yearlen === 365) {\n return {\n mmask: M365MASK,\n mdaymask: MDAY365MASK,\n nmdaymask: NMDAY365MASK,\n wdaymask: WDAYMASK.slice(wday),\n mrange: M365RANGE,\n };\n }\n return {\n mmask: M366MASK,\n mdaymask: MDAY366MASK,\n nmdaymask: NMDAY366MASK,\n wdaymask: WDAYMASK.slice(wday),\n mrange: M366RANGE,\n };\n}\n//# sourceMappingURL=yearinfo.js.map","import { RRule } from '../rrule';\nimport { empty, repeat, pymod } from '../helpers';\nexport function rebuildMonth(year, month, yearlen, mrange, wdaymask, options) {\n var result = {\n lastyear: year,\n lastmonth: month,\n nwdaymask: [],\n };\n var ranges = [];\n if (options.freq === RRule.YEARLY) {\n if (empty(options.bymonth)) {\n ranges = [[0, yearlen]];\n }\n else {\n for (var j = 0; j < options.bymonth.length; j++) {\n month = options.bymonth[j];\n ranges.push(mrange.slice(month - 1, month + 1));\n }\n }\n }\n else if (options.freq === RRule.MONTHLY) {\n ranges = [mrange.slice(month - 1, month + 1)];\n }\n if (empty(ranges)) {\n return result;\n }\n // Weekly frequency won't get here, so we may not\n // care about cross-year weekly periods.\n result.nwdaymask = repeat(0, yearlen);\n for (var j = 0; j < ranges.length; j++) {\n var rang = ranges[j];\n var first = rang[0];\n var last = rang[1] - 1;\n for (var k = 0; k < options.bynweekday.length; k++) {\n var i = void 0;\n var _a = options.bynweekday[k], wday = _a[0], n = _a[1];\n if (n < 0) {\n i = last + (n + 1) * 7;\n i -= pymod(wdaymask[i] - wday, 7);\n }\n else {\n i = first + (n - 1) * 7;\n i += pymod(7 - wdaymask[i] + wday, 7);\n }\n if (first <= i && i <= last)\n result.nwdaymask[i] = 1;\n }\n }\n return result;\n}\n//# sourceMappingURL=monthinfo.js.map","export function easter(y, offset) {\n if (offset === void 0) { offset = 0; }\n var a = y % 19;\n var b = Math.floor(y / 100);\n var c = y % 100;\n var d = Math.floor(b / 4);\n var e = b % 4;\n var f = Math.floor((b + 8) / 25);\n var g = Math.floor((b - f + 1) / 3);\n var h = Math.floor(19 * a + b - d - g + 15) % 30;\n var i = Math.floor(c / 4);\n var k = c % 4;\n var l = Math.floor(32 + 2 * e + 2 * i - h - k) % 7;\n var m = Math.floor((a + 11 * h + 22 * l) / 451);\n var month = Math.floor((h + l - 7 * m + 114) / 31);\n var day = ((h + l - 7 * m + 114) % 31) + 1;\n var date = Date.UTC(y, month - 1, day + offset);\n var yearStart = Date.UTC(y, 0, 1);\n return [Math.ceil((date - yearStart) / (1000 * 60 * 60 * 24))];\n}\n//# sourceMappingURL=easter.js.map","import { notEmpty, repeat, range, isPresent } from '../helpers';\nimport { Frequency } from '../types';\nimport { rebuildYear } from './yearinfo';\nimport { rebuildMonth } from './monthinfo';\nimport { easter } from './easter';\nimport { Time } from '../datetime';\nimport { datetime, sort, toOrdinal } from '../dateutil';\n// =============================================================================\n// Iterinfo\n// =============================================================================\nvar Iterinfo = /** @class */ (function () {\n // eslint-disable-next-line no-empty-function\n function Iterinfo(options) {\n this.options = options;\n }\n Iterinfo.prototype.rebuild = function (year, month) {\n var options = this.options;\n if (year !== this.lastyear) {\n this.yearinfo = rebuildYear(year, options);\n }\n if (notEmpty(options.bynweekday) &&\n (month !== this.lastmonth || year !== this.lastyear)) {\n var _a = this.yearinfo, yearlen = _a.yearlen, mrange = _a.mrange, wdaymask = _a.wdaymask;\n this.monthinfo = rebuildMonth(year, month, yearlen, mrange, wdaymask, options);\n }\n if (isPresent(options.byeaster)) {\n this.eastermask = easter(year, options.byeaster);\n }\n };\n Object.defineProperty(Iterinfo.prototype, \"lastyear\", {\n get: function () {\n return this.monthinfo ? this.monthinfo.lastyear : null;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"lastmonth\", {\n get: function () {\n return this.monthinfo ? this.monthinfo.lastmonth : null;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"yearlen\", {\n get: function () {\n return this.yearinfo.yearlen;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"yearordinal\", {\n get: function () {\n return this.yearinfo.yearordinal;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"mrange\", {\n get: function () {\n return this.yearinfo.mrange;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"wdaymask\", {\n get: function () {\n return this.yearinfo.wdaymask;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"mmask\", {\n get: function () {\n return this.yearinfo.mmask;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"wnomask\", {\n get: function () {\n return this.yearinfo.wnomask;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"nwdaymask\", {\n get: function () {\n return this.monthinfo ? this.monthinfo.nwdaymask : [];\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"nextyearlen\", {\n get: function () {\n return this.yearinfo.nextyearlen;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"mdaymask\", {\n get: function () {\n return this.yearinfo.mdaymask;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"nmdaymask\", {\n get: function () {\n return this.yearinfo.nmdaymask;\n },\n enumerable: false,\n configurable: true\n });\n Iterinfo.prototype.ydayset = function () {\n return [range(this.yearlen), 0, this.yearlen];\n };\n Iterinfo.prototype.mdayset = function (_, month) {\n var start = this.mrange[month - 1];\n var end = this.mrange[month];\n var set = repeat(null, this.yearlen);\n for (var i = start; i < end; i++)\n set[i] = i;\n return [set, start, end];\n };\n Iterinfo.prototype.wdayset = function (year, month, day) {\n // We need to handle cross-year weeks here.\n var set = repeat(null, this.yearlen + 7);\n var i = toOrdinal(datetime(year, month, day)) - this.yearordinal;\n var start = i;\n for (var j = 0; j < 7; j++) {\n set[i] = i;\n ++i;\n if (this.wdaymask[i] === this.options.wkst)\n break;\n }\n return [set, start, i];\n };\n Iterinfo.prototype.ddayset = function (year, month, day) {\n var set = repeat(null, this.yearlen);\n var i = toOrdinal(datetime(year, month, day)) - this.yearordinal;\n set[i] = i;\n return [set, i, i + 1];\n };\n Iterinfo.prototype.htimeset = function (hour, _, second, millisecond) {\n var _this = this;\n var set = [];\n this.options.byminute.forEach(function (minute) {\n set = set.concat(_this.mtimeset(hour, minute, second, millisecond));\n });\n sort(set);\n return set;\n };\n Iterinfo.prototype.mtimeset = function (hour, minute, _, millisecond) {\n var set = this.options.bysecond.map(function (second) { return new Time(hour, minute, second, millisecond); });\n sort(set);\n return set;\n };\n Iterinfo.prototype.stimeset = function (hour, minute, second, millisecond) {\n return [new Time(hour, minute, second, millisecond)];\n };\n Iterinfo.prototype.getdayset = function (freq) {\n switch (freq) {\n case Frequency.YEARLY:\n return this.ydayset.bind(this);\n case Frequency.MONTHLY:\n return this.mdayset.bind(this);\n case Frequency.WEEKLY:\n return this.wdayset.bind(this);\n case Frequency.DAILY:\n return this.ddayset.bind(this);\n default:\n return this.ddayset.bind(this);\n }\n };\n Iterinfo.prototype.gettimeset = function (freq) {\n switch (freq) {\n case Frequency.HOURLY:\n return this.htimeset.bind(this);\n case Frequency.MINUTELY:\n return this.mtimeset.bind(this);\n case Frequency.SECONDLY:\n return this.stimeset.bind(this);\n }\n };\n return Iterinfo;\n}());\nexport default Iterinfo;\n//# sourceMappingURL=index.js.map","import { combine, fromOrdinal, sort } from '../dateutil';\nimport { pymod, isPresent, includes } from '../helpers';\nexport function buildPoslist(bysetpos, timeset, start, end, ii, dayset) {\n var poslist = [];\n for (var j = 0; j < bysetpos.length; j++) {\n var daypos = void 0;\n var timepos = void 0;\n var pos = bysetpos[j];\n if (pos < 0) {\n daypos = Math.floor(pos / timeset.length);\n timepos = pymod(pos, timeset.length);\n }\n else {\n daypos = Math.floor((pos - 1) / timeset.length);\n timepos = pymod(pos - 1, timeset.length);\n }\n var tmp = [];\n for (var k = start; k < end; k++) {\n var val = dayset[k];\n if (!isPresent(val))\n continue;\n tmp.push(val);\n }\n var i = void 0;\n if (daypos < 0) {\n i = tmp.slice(daypos)[0];\n }\n else {\n i = tmp[daypos];\n }\n var time = timeset[timepos];\n var date = fromOrdinal(ii.yearordinal + i);\n var res = combine(date, time);\n // XXX: can this ever be in the array?\n // - compare the actual date instead?\n if (!includes(poslist, res))\n poslist.push(res);\n }\n sort(poslist);\n return poslist;\n}\n//# sourceMappingURL=poslist.js.map","import { freqIsDailyOrGreater } from '../types';\nimport { combine, fromOrdinal, MAXYEAR } from '../dateutil';\nimport Iterinfo from '../iterinfo/index';\nimport { RRule } from '../rrule';\nimport { buildTimeset } from '../parseoptions';\nimport { notEmpty, includes, isPresent } from '../helpers';\nimport { DateWithZone } from '../datewithzone';\nimport { buildPoslist } from './poslist';\nimport { DateTime } from '../datetime';\nexport function iter(iterResult, options) {\n var dtstart = options.dtstart, freq = options.freq, interval = options.interval, until = options.until, bysetpos = options.bysetpos;\n var count = options.count;\n if (count === 0 || interval === 0) {\n return emitResult(iterResult);\n }\n var counterDate = DateTime.fromDate(dtstart);\n var ii = new Iterinfo(options);\n ii.rebuild(counterDate.year, counterDate.month);\n var timeset = makeTimeset(ii, counterDate, options);\n for (;;) {\n var _a = ii.getdayset(freq)(counterDate.year, counterDate.month, counterDate.day), dayset = _a[0], start = _a[1], end = _a[2];\n var filtered = removeFilteredDays(dayset, start, end, ii, options);\n if (notEmpty(bysetpos)) {\n var poslist = buildPoslist(bysetpos, timeset, start, end, ii, dayset);\n for (var j = 0; j < poslist.length; j++) {\n var res = poslist[j];\n if (until && res > until) {\n return emitResult(iterResult);\n }\n if (res >= dtstart) {\n var rezonedDate = rezoneIfNeeded(res, options);\n if (!iterResult.accept(rezonedDate)) {\n return emitResult(iterResult);\n }\n if (count) {\n --count;\n if (!count) {\n return emitResult(iterResult);\n }\n }\n }\n }\n }\n else {\n for (var j = start; j < end; j++) {\n var currentDay = dayset[j];\n if (!isPresent(currentDay)) {\n continue;\n }\n var date = fromOrdinal(ii.yearordinal + currentDay);\n for (var k = 0; k < timeset.length; k++) {\n var time = timeset[k];\n var res = combine(date, time);\n if (until && res > until) {\n return emitResult(iterResult);\n }\n if (res >= dtstart) {\n var rezonedDate = rezoneIfNeeded(res, options);\n if (!iterResult.accept(rezonedDate)) {\n return emitResult(iterResult);\n }\n if (count) {\n --count;\n if (!count) {\n return emitResult(iterResult);\n }\n }\n }\n }\n }\n }\n if (options.interval === 0) {\n return emitResult(iterResult);\n }\n // Handle frequency and interval\n counterDate.add(options, filtered);\n if (counterDate.year > MAXYEAR) {\n return emitResult(iterResult);\n }\n if (!freqIsDailyOrGreater(freq)) {\n timeset = ii.gettimeset(freq)(counterDate.hour, counterDate.minute, counterDate.second, 0);\n }\n ii.rebuild(counterDate.year, counterDate.month);\n }\n}\nfunction isFiltered(ii, currentDay, options) {\n var bymonth = options.bymonth, byweekno = options.byweekno, byweekday = options.byweekday, byeaster = options.byeaster, bymonthday = options.bymonthday, bynmonthday = options.bynmonthday, byyearday = options.byyearday;\n return ((notEmpty(bymonth) && !includes(bymonth, ii.mmask[currentDay])) ||\n (notEmpty(byweekno) && !ii.wnomask[currentDay]) ||\n (notEmpty(byweekday) && !includes(byweekday, ii.wdaymask[currentDay])) ||\n (notEmpty(ii.nwdaymask) && !ii.nwdaymask[currentDay]) ||\n (byeaster !== null && !includes(ii.eastermask, currentDay)) ||\n ((notEmpty(bymonthday) || notEmpty(bynmonthday)) &&\n !includes(bymonthday, ii.mdaymask[currentDay]) &&\n !includes(bynmonthday, ii.nmdaymask[currentDay])) ||\n (notEmpty(byyearday) &&\n ((currentDay < ii.yearlen &&\n !includes(byyearday, currentDay + 1) &&\n !includes(byyearday, -ii.yearlen + currentDay)) ||\n (currentDay >= ii.yearlen &&\n !includes(byyearday, currentDay + 1 - ii.yearlen) &&\n !includes(byyearday, -ii.nextyearlen + currentDay - ii.yearlen)))));\n}\nfunction rezoneIfNeeded(date, options) {\n return new DateWithZone(date, options.tzid).rezonedDate();\n}\nfunction emitResult(iterResult) {\n return iterResult.getValue();\n}\nfunction removeFilteredDays(dayset, start, end, ii, options) {\n var filtered = false;\n for (var dayCounter = start; dayCounter < end; dayCounter++) {\n var currentDay = dayset[dayCounter];\n filtered = isFiltered(ii, currentDay, options);\n if (filtered)\n dayset[currentDay] = null;\n }\n return filtered;\n}\nfunction makeTimeset(ii, counterDate, options) {\n var freq = options.freq, byhour = options.byhour, byminute = options.byminute, bysecond = options.bysecond;\n if (freqIsDailyOrGreater(freq)) {\n return buildTimeset(options);\n }\n if ((freq >= RRule.HOURLY &&\n notEmpty(byhour) &&\n !includes(byhour, counterDate.hour)) ||\n (freq >= RRule.MINUTELY &&\n notEmpty(byminute) &&\n !includes(byminute, counterDate.minute)) ||\n (freq >= RRule.SECONDLY &&\n notEmpty(bysecond) &&\n !includes(bysecond, counterDate.second))) {\n return [];\n }\n return ii.gettimeset(freq)(counterDate.hour, counterDate.minute, counterDate.second, counterDate.millisecond);\n}\n//# sourceMappingURL=index.js.map","import { isValidDate } from './dateutil';\nimport IterResult from './iterresult';\nimport CallbackIterResult from './callbackiterresult';\nimport { fromText, parseText, toText, isFullyConvertible } from './nlp/index';\nimport { Frequency, } from './types';\nimport { parseOptions, initializeOptions } from './parseoptions';\nimport { parseString } from './parsestring';\nimport { optionsToString } from './optionstostring';\nimport { Cache } from './cache';\nimport { Weekday } from './weekday';\nimport { iter } from './iter/index';\n// =============================================================================\n// RRule\n// =============================================================================\nexport var Days = {\n MO: new Weekday(0),\n TU: new Weekday(1),\n WE: new Weekday(2),\n TH: new Weekday(3),\n FR: new Weekday(4),\n SA: new Weekday(5),\n SU: new Weekday(6),\n};\nexport var DEFAULT_OPTIONS = {\n freq: Frequency.YEARLY,\n dtstart: null,\n interval: 1,\n wkst: Days.MO,\n count: null,\n until: null,\n tzid: null,\n bysetpos: null,\n bymonth: null,\n bymonthday: null,\n bynmonthday: null,\n byyearday: null,\n byweekno: null,\n byweekday: null,\n bynweekday: null,\n byhour: null,\n byminute: null,\n bysecond: null,\n byeaster: null,\n};\nexport var defaultKeys = Object.keys(DEFAULT_OPTIONS);\n/**\n *\n * @param {Options?} options - see \n * - The only required option is `freq`, one of RRule.YEARLY, RRule.MONTHLY, ...\n * @constructor\n */\nvar RRule = /** @class */ (function () {\n function RRule(options, noCache) {\n if (options === void 0) { options = {}; }\n if (noCache === void 0) { noCache = false; }\n // RFC string\n this._cache = noCache ? null : new Cache();\n // used by toString()\n this.origOptions = initializeOptions(options);\n var parsedOptions = parseOptions(options).parsedOptions;\n this.options = parsedOptions;\n }\n RRule.parseText = function (text, language) {\n return parseText(text, language);\n };\n RRule.fromText = function (text, language) {\n return fromText(text, language);\n };\n RRule.fromString = function (str) {\n return new RRule(RRule.parseString(str) || undefined);\n };\n RRule.prototype._iter = function (iterResult) {\n return iter(iterResult, this.options);\n };\n RRule.prototype._cacheGet = function (what, args) {\n if (!this._cache)\n return false;\n return this._cache._cacheGet(what, args);\n };\n RRule.prototype._cacheAdd = function (what, value, args) {\n if (!this._cache)\n return;\n return this._cache._cacheAdd(what, value, args);\n };\n /**\n * @param {Function} iterator - optional function that will be called\n * on each date that is added. It can return false\n * to stop the iteration.\n * @return Array containing all recurrences.\n */\n RRule.prototype.all = function (iterator) {\n if (iterator) {\n return this._iter(new CallbackIterResult('all', {}, iterator));\n }\n var result = this._cacheGet('all');\n if (result === false) {\n result = this._iter(new IterResult('all', {}));\n this._cacheAdd('all', result);\n }\n return result;\n };\n /**\n * Returns all the occurrences of the rrule between after and before.\n * The inc keyword defines what happens if after and/or before are\n * themselves occurrences. With inc == True, they will be included in the\n * list, if they are found in the recurrence set.\n *\n * @return Array\n */\n RRule.prototype.between = function (after, before, inc, iterator) {\n if (inc === void 0) { inc = false; }\n if (!isValidDate(after) || !isValidDate(before)) {\n throw new Error('Invalid date passed in to RRule.between');\n }\n var args = {\n before: before,\n after: after,\n inc: inc,\n };\n if (iterator) {\n return this._iter(new CallbackIterResult('between', args, iterator));\n }\n var result = this._cacheGet('between', args);\n if (result === false) {\n result = this._iter(new IterResult('between', args));\n this._cacheAdd('between', result, args);\n }\n return result;\n };\n /**\n * Returns the last recurrence before the given datetime instance.\n * The inc keyword defines what happens if dt is an occurrence.\n * With inc == True, if dt itself is an occurrence, it will be returned.\n *\n * @return Date or null\n */\n RRule.prototype.before = function (dt, inc) {\n if (inc === void 0) { inc = false; }\n if (!isValidDate(dt)) {\n throw new Error('Invalid date passed in to RRule.before');\n }\n var args = { dt: dt, inc: inc };\n var result = this._cacheGet('before', args);\n if (result === false) {\n result = this._iter(new IterResult('before', args));\n this._cacheAdd('before', result, args);\n }\n return result;\n };\n /**\n * Returns the first recurrence after the given datetime instance.\n * The inc keyword defines what happens if dt is an occurrence.\n * With inc == True, if dt itself is an occurrence, it will be returned.\n *\n * @return Date or null\n */\n RRule.prototype.after = function (dt, inc) {\n if (inc === void 0) { inc = false; }\n if (!isValidDate(dt)) {\n throw new Error('Invalid date passed in to RRule.after');\n }\n var args = { dt: dt, inc: inc };\n var result = this._cacheGet('after', args);\n if (result === false) {\n result = this._iter(new IterResult('after', args));\n this._cacheAdd('after', result, args);\n }\n return result;\n };\n /**\n * Returns the number of recurrences in this set. It will have go trough\n * the whole recurrence, if this hasn't been done before.\n */\n RRule.prototype.count = function () {\n return this.all().length;\n };\n /**\n * Converts the rrule into its string representation\n *\n * @see \n * @return String\n */\n RRule.prototype.toString = function () {\n return optionsToString(this.origOptions);\n };\n /**\n * Will convert all rules described in nlp:ToText\n * to text.\n */\n RRule.prototype.toText = function (gettext, language, dateFormatter) {\n return toText(this, gettext, language, dateFormatter);\n };\n RRule.prototype.isFullyConvertibleToText = function () {\n return isFullyConvertible(this);\n };\n /**\n * @return a RRule instance with the same freq and options\n * as this one (cache is not cloned)\n */\n RRule.prototype.clone = function () {\n return new RRule(this.origOptions);\n };\n // RRule class 'constants'\n RRule.FREQUENCIES = [\n 'YEARLY',\n 'MONTHLY',\n 'WEEKLY',\n 'DAILY',\n 'HOURLY',\n 'MINUTELY',\n 'SECONDLY',\n ];\n RRule.YEARLY = Frequency.YEARLY;\n RRule.MONTHLY = Frequency.MONTHLY;\n RRule.WEEKLY = Frequency.WEEKLY;\n RRule.DAILY = Frequency.DAILY;\n RRule.HOURLY = Frequency.HOURLY;\n RRule.MINUTELY = Frequency.MINUTELY;\n RRule.SECONDLY = Frequency.SECONDLY;\n RRule.MO = Days.MO;\n RRule.TU = Days.TU;\n RRule.WE = Days.WE;\n RRule.TH = Days.TH;\n RRule.FR = Days.FR;\n RRule.SA = Days.SA;\n RRule.SU = Days.SU;\n RRule.parseString = parseString;\n RRule.optionsToString = optionsToString;\n return RRule;\n}());\nexport { RRule };\n//# sourceMappingURL=rrule.js.map","import { DateWithZone } from './datewithzone';\nimport { iter } from './iter';\nimport { sort } from './dateutil';\nexport function iterSet(iterResult, _rrule, _exrule, _rdate, _exdate, tzid) {\n var _exdateHash = {};\n var _accept = iterResult.accept;\n function evalExdate(after, before) {\n _exrule.forEach(function (rrule) {\n rrule.between(after, before, true).forEach(function (date) {\n _exdateHash[Number(date)] = true;\n });\n });\n }\n _exdate.forEach(function (date) {\n var zonedDate = new DateWithZone(date, tzid).rezonedDate();\n _exdateHash[Number(zonedDate)] = true;\n });\n iterResult.accept = function (date) {\n var dt = Number(date);\n if (isNaN(dt))\n return _accept.call(this, date);\n if (!_exdateHash[dt]) {\n evalExdate(new Date(dt - 1), new Date(dt + 1));\n if (!_exdateHash[dt]) {\n _exdateHash[dt] = true;\n return _accept.call(this, date);\n }\n }\n return true;\n };\n if (iterResult.method === 'between') {\n evalExdate(iterResult.args.after, iterResult.args.before);\n iterResult.accept = function (date) {\n var dt = Number(date);\n if (!_exdateHash[dt]) {\n _exdateHash[dt] = true;\n return _accept.call(this, date);\n }\n return true;\n };\n }\n for (var i = 0; i < _rdate.length; i++) {\n var zonedDate = new DateWithZone(_rdate[i], tzid).rezonedDate();\n if (!iterResult.accept(new Date(zonedDate.getTime())))\n break;\n }\n _rrule.forEach(function (rrule) {\n iter(iterResult, rrule.options);\n });\n var res = iterResult._result;\n sort(res);\n switch (iterResult.method) {\n case 'all':\n case 'between':\n return res;\n case 'before':\n return ((res.length && res[res.length - 1]) || null);\n case 'after':\n default:\n return ((res.length && res[0]) || null);\n }\n}\n//# sourceMappingURL=iterset.js.map","import { __assign } from \"tslib\";\nimport { RRule } from './rrule';\nimport { RRuleSet } from './rruleset';\nimport { untilStringToDate } from './dateutil';\nimport { includes, split } from './helpers';\nimport { parseString, parseDtstart } from './parsestring';\n/**\n * RRuleStr\n * To parse a set of rrule strings\n */\nvar DEFAULT_OPTIONS = {\n dtstart: null,\n cache: false,\n unfold: false,\n forceset: false,\n compatible: false,\n tzid: null,\n};\nexport function parseInput(s, options) {\n var rrulevals = [];\n var rdatevals = [];\n var exrulevals = [];\n var exdatevals = [];\n var parsedDtstart = parseDtstart(s);\n var dtstart = parsedDtstart.dtstart;\n var tzid = parsedDtstart.tzid;\n var lines = splitIntoLines(s, options.unfold);\n lines.forEach(function (line) {\n var _a;\n if (!line)\n return;\n var _b = breakDownLine(line), name = _b.name, parms = _b.parms, value = _b.value;\n switch (name.toUpperCase()) {\n case 'RRULE':\n if (parms.length) {\n throw new Error(\"unsupported RRULE parm: \".concat(parms.join(',')));\n }\n rrulevals.push(parseString(line));\n break;\n case 'RDATE':\n var _c = (_a = /RDATE(?:;TZID=([^:=]+))?/i.exec(line)) !== null && _a !== void 0 ? _a : [], rdateTzid = _c[1];\n if (rdateTzid && !tzid) {\n tzid = rdateTzid;\n }\n rdatevals = rdatevals.concat(parseRDate(value, parms));\n break;\n case 'EXRULE':\n if (parms.length) {\n throw new Error(\"unsupported EXRULE parm: \".concat(parms.join(',')));\n }\n exrulevals.push(parseString(value));\n break;\n case 'EXDATE':\n exdatevals = exdatevals.concat(parseRDate(value, parms));\n break;\n case 'DTSTART':\n break;\n default:\n throw new Error('unsupported property: ' + name);\n }\n });\n return {\n dtstart: dtstart,\n tzid: tzid,\n rrulevals: rrulevals,\n rdatevals: rdatevals,\n exrulevals: exrulevals,\n exdatevals: exdatevals,\n };\n}\nfunction buildRule(s, options) {\n var _a = parseInput(s, options), rrulevals = _a.rrulevals, rdatevals = _a.rdatevals, exrulevals = _a.exrulevals, exdatevals = _a.exdatevals, dtstart = _a.dtstart, tzid = _a.tzid;\n var noCache = options.cache === false;\n if (options.compatible) {\n options.forceset = true;\n options.unfold = true;\n }\n if (options.forceset ||\n rrulevals.length > 1 ||\n rdatevals.length ||\n exrulevals.length ||\n exdatevals.length) {\n var rset_1 = new RRuleSet(noCache);\n rset_1.dtstart(dtstart);\n rset_1.tzid(tzid || undefined);\n rrulevals.forEach(function (val) {\n rset_1.rrule(new RRule(groomRruleOptions(val, dtstart, tzid), noCache));\n });\n rdatevals.forEach(function (date) {\n rset_1.rdate(date);\n });\n exrulevals.forEach(function (val) {\n rset_1.exrule(new RRule(groomRruleOptions(val, dtstart, tzid), noCache));\n });\n exdatevals.forEach(function (date) {\n rset_1.exdate(date);\n });\n if (options.compatible && options.dtstart)\n rset_1.rdate(dtstart);\n return rset_1;\n }\n var val = rrulevals[0] || {};\n return new RRule(groomRruleOptions(val, val.dtstart || options.dtstart || dtstart, val.tzid || options.tzid || tzid), noCache);\n}\nexport function rrulestr(s, options) {\n if (options === void 0) { options = {}; }\n return buildRule(s, initializeOptions(options));\n}\nfunction groomRruleOptions(val, dtstart, tzid) {\n return __assign(__assign({}, val), { dtstart: dtstart, tzid: tzid });\n}\nfunction initializeOptions(options) {\n var invalid = [];\n var keys = Object.keys(options);\n var defaultKeys = Object.keys(DEFAULT_OPTIONS);\n keys.forEach(function (key) {\n if (!includes(defaultKeys, key))\n invalid.push(key);\n });\n if (invalid.length) {\n throw new Error('Invalid options: ' + invalid.join(', '));\n }\n return __assign(__assign({}, DEFAULT_OPTIONS), options);\n}\nfunction extractName(line) {\n if (line.indexOf(':') === -1) {\n return {\n name: 'RRULE',\n value: line,\n };\n }\n var _a = split(line, ':', 1), name = _a[0], value = _a[1];\n return {\n name: name,\n value: value,\n };\n}\nfunction breakDownLine(line) {\n var _a = extractName(line), name = _a.name, value = _a.value;\n var parms = name.split(';');\n if (!parms)\n throw new Error('empty property name');\n return {\n name: parms[0].toUpperCase(),\n parms: parms.slice(1),\n value: value,\n };\n}\nfunction splitIntoLines(s, unfold) {\n if (unfold === void 0) { unfold = false; }\n s = s && s.trim();\n if (!s)\n throw new Error('Invalid empty string');\n // More info about 'unfold' option\n // Go head to http://www.ietf.org/rfc/rfc2445.txt\n if (!unfold) {\n return s.split(/\\s/);\n }\n var lines = s.split('\\n');\n var i = 0;\n while (i < lines.length) {\n // TODO\n var line = (lines[i] = lines[i].replace(/\\s+$/g, ''));\n if (!line) {\n lines.splice(i, 1);\n }\n else if (i > 0 && line[0] === ' ') {\n lines[i - 1] += line.slice(1);\n lines.splice(i, 1);\n }\n else {\n i += 1;\n }\n }\n return lines;\n}\nfunction validateDateParm(parms) {\n parms.forEach(function (parm) {\n if (!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(parm)) {\n throw new Error('unsupported RDATE/EXDATE parm: ' + parm);\n }\n });\n}\nfunction parseRDate(rdateval, parms) {\n validateDateParm(parms);\n return rdateval.split(',').map(function (datestr) { return untilStringToDate(datestr); });\n}\n//# sourceMappingURL=rrulestr.js.map","import { __extends } from \"tslib\";\nimport { RRule } from './rrule';\nimport { sort, timeToUntilString } from './dateutil';\nimport { includes } from './helpers';\nimport { iterSet } from './iterset';\nimport { rrulestr } from './rrulestr';\nimport { optionsToString } from './optionstostring';\nfunction createGetterSetter(fieldName) {\n var _this = this;\n return function (field) {\n if (field !== undefined) {\n _this[\"_\".concat(fieldName)] = field;\n }\n if (_this[\"_\".concat(fieldName)] !== undefined) {\n return _this[\"_\".concat(fieldName)];\n }\n for (var i = 0; i < _this._rrule.length; i++) {\n var field_1 = _this._rrule[i].origOptions[fieldName];\n if (field_1) {\n return field_1;\n }\n }\n };\n}\nvar RRuleSet = /** @class */ (function (_super) {\n __extends(RRuleSet, _super);\n /**\n *\n * @param {Boolean?} noCache\n * The same stratagy as RRule on cache, default to false\n * @constructor\n */\n function RRuleSet(noCache) {\n if (noCache === void 0) { noCache = false; }\n var _this = _super.call(this, {}, noCache) || this;\n _this.dtstart = createGetterSetter.apply(_this, ['dtstart']);\n _this.tzid = createGetterSetter.apply(_this, ['tzid']);\n _this._rrule = [];\n _this._rdate = [];\n _this._exrule = [];\n _this._exdate = [];\n return _this;\n }\n RRuleSet.prototype._iter = function (iterResult) {\n return iterSet(iterResult, this._rrule, this._exrule, this._rdate, this._exdate, this.tzid());\n };\n /**\n * Adds an RRule to the set\n *\n * @param {RRule}\n */\n RRuleSet.prototype.rrule = function (rrule) {\n _addRule(rrule, this._rrule);\n };\n /**\n * Adds an EXRULE to the set\n *\n * @param {RRule}\n */\n RRuleSet.prototype.exrule = function (rrule) {\n _addRule(rrule, this._exrule);\n };\n /**\n * Adds an RDate to the set\n *\n * @param {Date}\n */\n RRuleSet.prototype.rdate = function (date) {\n _addDate(date, this._rdate);\n };\n /**\n * Adds an EXDATE to the set\n *\n * @param {Date}\n */\n RRuleSet.prototype.exdate = function (date) {\n _addDate(date, this._exdate);\n };\n /**\n * Get list of included rrules in this recurrence set.\n *\n * @return List of rrules\n */\n RRuleSet.prototype.rrules = function () {\n return this._rrule.map(function (e) { return rrulestr(e.toString()); });\n };\n /**\n * Get list of excluded rrules in this recurrence set.\n *\n * @return List of exrules\n */\n RRuleSet.prototype.exrules = function () {\n return this._exrule.map(function (e) { return rrulestr(e.toString()); });\n };\n /**\n * Get list of included datetimes in this recurrence set.\n *\n * @return List of rdates\n */\n RRuleSet.prototype.rdates = function () {\n return this._rdate.map(function (e) { return new Date(e.getTime()); });\n };\n /**\n * Get list of included datetimes in this recurrence set.\n *\n * @return List of exdates\n */\n RRuleSet.prototype.exdates = function () {\n return this._exdate.map(function (e) { return new Date(e.getTime()); });\n };\n RRuleSet.prototype.valueOf = function () {\n var result = [];\n if (!this._rrule.length && this._dtstart) {\n result = result.concat(optionsToString({ dtstart: this._dtstart }));\n }\n this._rrule.forEach(function (rrule) {\n result = result.concat(rrule.toString().split('\\n'));\n });\n this._exrule.forEach(function (exrule) {\n result = result.concat(exrule\n .toString()\n .split('\\n')\n .map(function (line) { return line.replace(/^RRULE:/, 'EXRULE:'); })\n .filter(function (line) { return !/^DTSTART/.test(line); }));\n });\n if (this._rdate.length) {\n result.push(rdatesToString('RDATE', this._rdate, this.tzid()));\n }\n if (this._exdate.length) {\n result.push(rdatesToString('EXDATE', this._exdate, this.tzid()));\n }\n return result;\n };\n /**\n * to generate recurrence field such as:\n * DTSTART:19970902T010000Z\n * RRULE:FREQ=YEARLY;COUNT=2;BYDAY=TU\n * RRULE:FREQ=YEARLY;COUNT=1;BYDAY=TH\n */\n RRuleSet.prototype.toString = function () {\n return this.valueOf().join('\\n');\n };\n /**\n * Create a new RRuleSet Object completely base on current instance\n */\n RRuleSet.prototype.clone = function () {\n var rrs = new RRuleSet(!!this._cache);\n this._rrule.forEach(function (rule) { return rrs.rrule(rule.clone()); });\n this._exrule.forEach(function (rule) { return rrs.exrule(rule.clone()); });\n this._rdate.forEach(function (date) { return rrs.rdate(new Date(date.getTime())); });\n this._exdate.forEach(function (date) { return rrs.exdate(new Date(date.getTime())); });\n return rrs;\n };\n return RRuleSet;\n}(RRule));\nexport { RRuleSet };\nfunction _addRule(rrule, collection) {\n if (!(rrule instanceof RRule)) {\n throw new TypeError(String(rrule) + ' is not RRule instance');\n }\n if (!includes(collection.map(String), String(rrule))) {\n collection.push(rrule);\n }\n}\nfunction _addDate(date, collection) {\n if (!(date instanceof Date)) {\n throw new TypeError(String(date) + ' is not Date instance');\n }\n if (!includes(collection.map(Number), Number(date))) {\n collection.push(date);\n sort(collection);\n }\n}\nfunction rdatesToString(param, rdates, tzid) {\n var isUTC = !tzid || tzid.toUpperCase() === 'UTC';\n var header = isUTC ? \"\".concat(param, \":\") : \"\".concat(param, \";TZID=\").concat(tzid, \":\");\n var dateString = rdates\n .map(function (rdate) { return timeToUntilString(rdate.valueOf(), isUTC); })\n .join(',');\n return \"\".concat(header).concat(dateString);\n}\n//# sourceMappingURL=rruleset.js.map","import { RRule, rrulestr } from 'rrule';\r\n\r\nexport default function (scheduler) {\r\n\r\n\tfunction clearMilliseconds(date) {\r\n\t\treturn new Date(\r\n\t\t\tdate.getFullYear(),\r\n\t\t\tdate.getMonth(),\r\n\t\t\tdate.getDate(),\r\n\t\t\tdate.getHours(),\r\n\t\t\tdate.getMinutes(),\r\n\t\t\tdate.getSeconds(),\r\n\t\t\t0\r\n\t\t);\r\n\t}\r\n\r\n\tfunction isDeletedOccurrence(event) {\r\n\t\treturn !!event.deleted;\r\n\t}\r\n\r\n\tfunction isSeries(event) {\r\n\t\treturn !!event.rrule && !event.recurring_event_id;\r\n\t}\r\n\r\n\tfunction clearRecurringProperties(event) {\r\n\t\tevent.rrule = \"\";\r\n\t\tevent.original_start = null;\r\n\t\tevent.recurring_event_id = null;\r\n\t\tevent.duration = null;\r\n\t\tevent.deleted = null;\r\n\t}\r\n\r\n\tfunction createException(ev) {\r\n\t\tlet id = ev.id.split(\"#\");\r\n\r\n\t\tlet nid = scheduler.uid();\r\n\t\tscheduler._not_render = true;\r\n\t\tlet nev = scheduler._copy_event(ev);\r\n\t\tnev.id = nid;\r\n\t\tnev.recurring_event_id = id[0];\r\n\r\n\t\tlet timestamp = id[1];\r\n\r\n\t\tnev.original_start = new Date(Number(timestamp));\r\n\r\n\t\tscheduler._add_rec_marker(nev, timestamp);\r\n\t\tscheduler.addEvent(nev);\r\n\t\tscheduler._not_render = false;\r\n\t}\r\n\r\n\tfunction toUTCDate(date){\r\n\t\treturn new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(),date.getSeconds()));\r\n\t}\r\n\r\n\tfunction setUTCPartsToDate(d) {\r\n\t\treturn new Date(\r\n\t\t\td.getUTCFullYear(),\r\n\t\t\td.getUTCMonth(),\r\n\t\t\td.getUTCDate(),\r\n\t\t\td.getUTCHours(),\r\n\t\t\td.getUTCMinutes(),\r\n\t\t\td.getUTCSeconds()\r\n\t\t);\r\n\t}\r\n\r\n\tscheduler._rec_temp = [];\r\n\tscheduler._rec_markers_pull = {};\r\n\tscheduler._rec_markers = {};\r\n\tscheduler._add_rec_marker = function (ev, time) {\r\n\t\tev._pid_time = time;\r\n\t\tthis._rec_markers[ev.id] = ev;\r\n\t\tif (!this._rec_markers_pull[ev.event_pid]) this._rec_markers_pull[ev.event_pid] = {};\r\n\t\tthis._rec_markers_pull[ev.event_pid][time] = ev;\r\n\t};\r\n\tscheduler._get_rec_marker = function (time, id) {\r\n\t\tlet ch = this._rec_markers_pull[id];\r\n\t\tif (ch) return ch[time];\r\n\t\treturn null;\r\n\t};\r\n\tscheduler._get_rec_markers = function (id) {\r\n\t\treturn (this._rec_markers_pull[id] || []);\r\n\t};\r\n\r\n\t(function () {\r\n\t\tvar old_add_event = scheduler.addEvent;\r\n\t\tscheduler.addEvent = function (start_date, end_date, text, id, extra_data) {\r\n\t\t\tvar ev_id = old_add_event.apply(this, arguments);\r\n\r\n\t\t\tif (ev_id && scheduler.getEvent(ev_id)) {\r\n\t\t\t\tvar ev = scheduler.getEvent(ev_id);\r\n\r\n\t\t\t\tif (ev.start_date) {\r\n\t\t\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t\t\t}\r\n\t\t\t\tif (ev.end_date) {\r\n\t\t\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn ev_id;\r\n\t\t};\r\n\t})();\r\n\r\n\tscheduler.attachEvent(\"onEventLoading\", function (event) {\r\n\r\n\t\tif (event.original_start) {\r\n\t\t\tevent.original_start = scheduler.templates.parse_date(event.original_start);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventIdChange\", function (id, new_id) {\r\n\t\tif (this._ignore_call) return;\r\n\t\tthis._ignore_call = true;\r\n\r\n\t\tif (scheduler._rec_markers[id]) {\r\n\t\t\t//important for for correct work of scheduler.getEvents(from, to) and collision detection\r\n\t\t\tscheduler._rec_markers[new_id] = scheduler._rec_markers[id];\r\n\t\t\tdelete scheduler._rec_markers[id];\r\n\t\t}\r\n\r\n\t\tif (scheduler._rec_markers_pull[id]) {\r\n\t\t\tscheduler._rec_markers_pull[new_id] = scheduler._rec_markers_pull[id];\r\n\t\t\tdelete scheduler._rec_markers_pull[id];\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < this._rec_temp.length; i++) {\r\n\t\t\tvar tev = this._rec_temp[i];\r\n\t\t\tif (tev.recurring_event_id == id) {\r\n\t\t\t\ttev.recurring_event_id = new_id;\r\n\t\t\t\tthis.changeEventId(tev.id, new_id + \"#\" + tev.id.split(\"#\")[1]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (var i in this._rec_markers) {\r\n\t\t\tvar tev = this._rec_markers[i];\r\n\t\t\tif (tev.recurring_event_id == id) {\r\n\t\t\t\ttev.recurring_event_id = new_id;\r\n\t\t\t\ttev._pid_changed = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar el = scheduler._rec_markers[new_id];\r\n\t\tif (el && el._pid_changed) {\r\n\t\t\tdelete el._pid_changed;\r\n\t\t\tsetTimeout(function () {\r\n\t\t\t\tif (scheduler.$destroyed) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tscheduler.callEvent(\"onEventChanged\", [new_id, scheduler.getEvent(new_id)]);\r\n\t\t\t}, 1);\r\n\t\t}\r\n\r\n\t\tdelete this._ignore_call;\r\n\t});\r\n\r\n\tfunction deleteEventFromSeries(idTimestamp, ev) {\r\n\t\tlet id = idTimestamp;\r\n\t\tidTimestamp = id.split(\"#\");\r\n\t\tlet nid = scheduler.uid();\r\n\t\tlet tid = (idTimestamp[1]) ? idTimestamp[1] : (ev._pid_time);\r\n\t\tlet nev = scheduler._copy_event(ev);\r\n\t\tnev.id = nid;\r\n\t\tnev.recurring_event_id = ev.recurring_event_id || idTimestamp[0];\r\n\t\tnev.original_start = new Date(Number(tid));\r\n\t\tnev.deleted = true;\r\n\t\tscheduler.addEvent(nev);\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function (id) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (this._is_virtual_event(id) || (this._is_modified_occurence(ev) && !isDeletedOccurrence(ev))) {\r\n\t\t\tdeleteEventFromSeries(id, ev);\r\n\t\t} else {\r\n\t\t\tif (isSeries(ev) && this._lightbox_id)\r\n\t\t\t\tthis._roll_back_dates(ev);\r\n\r\n\r\n\t\t\tvar sub = this._get_rec_markers(id);\r\n\t\t\tfor (var i in sub) {\r\n\t\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\t\tid = sub[i].id;\r\n\t\t\t\t\tif (this.getEvent(id))\r\n\t\t\t\t\t\tthis.deleteEvent(id, true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function (id, ev) {\r\n\t\tif (!this._is_virtual_event(id) && this._is_modified_occurence(ev)) {\r\n\t\t\tif (!scheduler._events[id]) {\r\n\t\t\t\tev.deleted = true;\r\n\t\t\t\tthis.setEvent(id, ev);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\", function (id, event) {\r\n\t\tif (this._loading) return true;\r\n\r\n\t\tvar ev = this.getEvent(id);\r\n\r\n\t\tif (this._is_virtual_event(id)) {\r\n\t\t\tcreateException(ev);\r\n\r\n\t\t} else {\r\n\t\t\tif (ev.start_date) {\r\n\t\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t\t}\r\n\t\t\tif (ev.end_date) {\r\n\t\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t\t}\r\n\r\n\t\t\tif (isSeries(ev) && this._lightbox_id) {\r\n\t\t\t\tthis._roll_back_dates(ev);\r\n\t\t\t\t//scheduler.recurrings.rollbackDates(ev);\r\n\t\t\t}\r\n\r\n\t\t\tvar sub = this._get_rec_markers(id);\r\n\t\t\tfor (var i in sub) {\r\n\t\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\t\tdelete this._rec_markers[sub[i].id];\r\n\t\t\t\t\tthis.deleteEvent(sub[i].id, true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tdelete this._rec_markers_pull[id];\r\n\r\n\t\t\t// it's possible that after editing event is no longer exists, in such case we need to remove _select_id flag\r\n\t\t\tvar isEventFound = false;\r\n\t\t\tfor (var k = 0; k < this._rendered.length; k++) {\r\n\t\t\t\tif (this._rendered[k].getAttribute(this.config.event_attribute) == id)\r\n\t\t\t\t\tisEventFound = true;\r\n\t\t\t}\r\n\t\t\tif (!isEventFound)\r\n\t\t\t\tthis._select_id = null;\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventAdded\", function (id) {\r\n\t\tif (!this._loading) {\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif (isSeries(ev)) {\r\n\t\t\t\tthis._roll_back_dates(ev);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventSave\", function (id, data, is_new_event) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (isSeries(ev))\r\n\t\t\tthis._select_id = null;\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventCreated\", function (id) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (!isSeries(ev)) {\r\n\t\t\tclearRecurringProperties(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventCancel\", function (id) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (isSeries(ev)) {\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t\t// a bit expensive, but we need to be sure that event re-rendered, because view can be corrupted by resize , during edit process\r\n\t\t\tthis.render_view_data();\r\n\t\t}\r\n\t});\r\n\tscheduler._roll_back_dates = function (ev) {\r\n\t\t//// !!!!! calc temp properties\r\n\t\tif (ev.start_date) {\r\n\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t}\r\n\t\tif (ev.end_date) {\r\n\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t}\r\n\r\n\t\tev.duration = Math.round((ev.end_date.valueOf() - ev.start_date.valueOf()) / 1000);\r\n\t\tev.end_date = ev._end_date;\r\n\t\tif (ev._start_date) {\r\n\t\t\tev.start_date.setMonth(0);\r\n\t\t\tev.start_date.setDate(ev._start_date.getDate());\r\n\t\t\tev.start_date.setMonth(ev._start_date.getMonth());\r\n\t\t\tev.start_date.setFullYear(ev._start_date.getFullYear());\r\n\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._is_virtual_event = function (id) {\r\n\t\treturn id.toString().indexOf(\"#\") != -1;\r\n\t};\r\n\tscheduler._is_modified_occurence = function (ev) {\r\n\t\treturn (ev.recurring_event_id && ev.recurring_event_id != \"0\");\r\n\t};\r\n\r\n\tscheduler.showLightbox_rec = scheduler.showLightbox;\r\n\tscheduler.showLightbox = function (id) {\r\n\t\tvar locale = this.locale;\r\n\t\tvar c = scheduler.config.lightbox_recurring;\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tvar pid = ev.recurring_event_id;\r\n\t\tvar isVirtual = this._is_virtual_event(id);\r\n\t\tif (isVirtual)\r\n\t\t\tpid = id.split(\"#\")[0];\r\n\r\n\t\t// show series\r\n\t\tvar showSeries = function (id) {\r\n\t\t\tvar event = scheduler.getEvent(id);\r\n\t\t\tevent._end_date = event.end_date;\r\n\t\t\tevent.end_date = new Date(event.start_date.valueOf() + event.duration * 1000);\r\n\t\t\treturn scheduler.showLightbox_rec(id); // editing series\r\n\t\t};\r\n\r\n\t\tif ((pid || pid * 1 === 0) && isSeries(ev)) {\r\n\t\t\t// direct API call on series id\r\n\t\t\treturn showSeries(id);\r\n\t\t}\r\n\t\tif (!pid || pid === '0' || ((!locale.labels.confirm_recurring || c == 'instance') || (c == 'series' && !isVirtual))) {\r\n\t\t\t// editing instance or non recurring event\r\n\t\t\treturn this.showLightbox_rec(id);\r\n\t\t}\r\n\t\tif (c == 'ask') {\r\n\t\t\tvar that = this;\r\n\t\t\tscheduler.modalbox({\r\n\t\t\t\ttext: locale.labels.confirm_recurring,\r\n\t\t\t\ttitle: locale.labels.title_confirm_recurring,\r\n\t\t\t\twidth: \"500px\",\r\n\t\t\t\tposition: \"middle\",\r\n\t\t\t\tbuttons: [locale.labels.button_edit_series, locale.labels.button_edit_occurrence, locale.labels.icon_cancel],\r\n\t\t\t\tcallback: function (index) {\r\n\t\t\t\t\tswitch (+index) {\r\n\t\t\t\t\t\tcase 0:\r\n\t\t\t\t\t\t\treturn showSeries(pid);\r\n\t\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\t\treturn that.showLightbox_rec(id);\r\n\t\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tshowSeries(pid);\r\n\t\t}\r\n\t};\r\n\r\n\tfunction groupExceptions() {\r\n\t\tconst exceptions = {};\r\n\t\tfor (const i in scheduler._events) {\r\n\t\t\tconst ev = scheduler._events[i];\r\n\t\t\tif (ev.recurring_event_id) {\r\n\t\t\t\tif (!exceptions[ev.recurring_event_id]) {\r\n\t\t\t\t\texceptions[ev.recurring_event_id] = {};\r\n\t\t\t\t}\r\n\t\t\t\texceptions[ev.recurring_event_id][ev.original_start.valueOf()] = ev;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn exceptions;\r\n\t}\r\n\r\n\tscheduler.get_visible_events_rec = scheduler.get_visible_events;\r\n\tscheduler.get_visible_events = function (only_timed) {\r\n\t\tfor (var i = 0; i < this._rec_temp.length; i++)\r\n\t\t\tdelete this._events[this._rec_temp[i].id];\r\n\t\tthis._rec_temp = [];\r\n\r\n\t\tconst exceptions = groupExceptions();\r\n\t\tvar stack = this.get_visible_events_rec(only_timed);\r\n\t\tvar out = [];\r\n\t\tfor (var i = 0; i < stack.length; i++) {\r\n\t\t\tif (stack[i].deleted || stack[i].recurring_event_id) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif (isSeries(stack[i])) {\r\n\t\t\t\tthis.repeat_date(stack[i], out, undefined, undefined, undefined, undefined, exceptions);\r\n\t\t\t} else {\r\n\t\t\t\tout.push(stack[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn out;\r\n\t};\r\n\r\n\t(function () {\r\n\t\tvar old = scheduler.isOneDayEvent;\r\n\t\tscheduler.isOneDayEvent = function (ev) {\r\n\t\t\tif (isSeries(ev)) return true;\r\n\t\t\treturn old.call(this, ev);\r\n\t\t};\r\n\t\tvar old_update_event = scheduler.updateEvent;\r\n\t\tscheduler.updateEvent = function (id) {\r\n\t\t\tvar ev = scheduler.getEvent(id);\r\n\r\n\t\t\tif (ev && isSeries(ev) && !this._is_virtual_event(id)) {\r\n\t\t\t\tscheduler.update_view();\r\n\t\t\t} else {\r\n\t\t\t\told_update_event.call(this, id);\r\n\t\t\t}\r\n\t\t};\r\n\t})();\r\n\r\n\tconst toIcalString = scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\");\r\n\r\n\tscheduler.repeat_date = function (ev, stack, non_render, from, to, maxCount, exceptions) {\r\n\t\tif (!ev.rrule) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tlet seriesExceptions = exceptions ? exceptions[ev.id] : groupExceptions()[ev.id];\r\n\t\tif (!seriesExceptions) {\r\n\t\t\tseriesExceptions = {};\r\n\t\t}\r\n\r\n\t\t// GS-2596: from and to should be in UTC, \r\n\t\t// need to remove one sec to not be included in repeatedDates array\r\n\t\tfrom = toUTCDate(from || new Date(scheduler._min_date.valueOf() - 1000));\r\n\t\tto = toUTCDate(to || new Date(scheduler._max_date.valueOf() - 1000));\r\n\r\n\t\t\r\n\t\tconst utcStart = toUTCDate(ev.start_date);\r\n\t\tlet parsedRRule;\r\n\t\tif (maxCount){\r\n\t\t\t// for getRecDates() method\r\n\t\t\tparsedRRule = rrulestr(`RRULE:${ev.rrule};UNTIL=${toIcalString(ev.end_date)};COUNT=${maxCount}`, { dtstart: utcStart });\r\n\t\t} else {\r\n\t\t\tparsedRRule = rrulestr(`RRULE:${ev.rrule};UNTIL=${toIcalString(ev.end_date)}`, { dtstart: utcStart });\r\n\t\t}\r\n\t\t//GS-2596: third parameter, includes dates that match with arguments\r\n\t\tconst repeatedDates = parsedRRule.between(from, to, true).map(date => {\r\n\t\t\tconst adjustedDate = setUTCPartsToDate(date);\r\n\t\t\tadjustedDate.setHours(ev.start_date.getHours());\r\n\t\t\tadjustedDate.setMinutes(ev.start_date.getMinutes());\r\n\t\t\tadjustedDate.setSeconds(ev.start_date.getSeconds());\r\n\t\t\treturn adjustedDate;\r\n\t\t});\r\n\t\tlet visibleCount = 0;\r\n\r\n\t\tconst eventDuration = ev.duration;\r\n\r\n\t\tfor (let i = 0; i < repeatedDates.length; i++) {\r\n\t\t\tif (maxCount && visibleCount >= maxCount) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tconst date = repeatedDates[i];\r\n\r\n\t\t\tlet exception = seriesExceptions[date.valueOf()];\r\n\t\t\tif (exception) {\r\n\t\t\t\tif (exception.deleted) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvisibleCount++;\r\n\t\t\t\t\tstack.push(exception);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tconst copy = scheduler._copy_event(ev);\r\n\t\t\t\t//copy._timed = ev._timed;\r\n\t\t\t\tcopy.text = ev.text;\r\n\t\t\t\tcopy.start_date = date;\r\n\t\t\t\tcopy.id = ev.id + \"#\" + Math.ceil(date.valueOf());\r\n\t\t\t\tcopy.end_date = new Date(date.valueOf() + eventDuration * 1000);\r\n\t\t\t\tcopy.end_date = scheduler._fix_daylight_saving_date(copy.start_date, copy.end_date, ev, date, copy.end_date);\r\n\t\t\t\tcopy._timed = scheduler.isOneDayEvent(copy);\r\n\r\n\r\n\r\n\t\t\t\tif (!copy._timed && !scheduler._table_view && !scheduler.config.multi_day) continue;\r\n\t\t\t\tstack.push(copy);\r\n\r\n\t\t\t\tif (!non_render) {\r\n\t\t\t\t\tscheduler._events[copy.id] = copy;\r\n\t\t\t\t\tscheduler._rec_temp.push(copy);\r\n\t\t\t\t}\r\n\t\t\t\tvisibleCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//GS-2534: case when exceptions have different dates\r\n\t\tif (seriesExceptions && repeatedDates.length == 0 ){\r\n\t\t\tfor (let a in seriesExceptions){\r\n\t\t\t\tlet exception = seriesExceptions[a];\r\n\t\t\t\tif (exception) {\r\n\t\t\t\t\tif(exception.deleted){\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\telse if (from && to && exception.start_date < to && exception.end_date > from) {\r\n\t\t\t\t\t\tstack.push(exception);\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t} \r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._fix_daylight_saving_date = function (start_date, end_date, ev, counter, default_date) {\r\n\t\tvar shift = start_date.getTimezoneOffset() - end_date.getTimezoneOffset();\r\n\t\tif (shift) {\r\n\t\t\tif (shift > 0) {\r\n\t\t\t\t// e.g. 24h -> 23h\r\n\t\t\t\treturn new Date(counter.valueOf() + ev.duration * 1000 - shift * 60 * 1000);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t// e.g. 24h -> 25h\r\n\t\t\t\treturn new Date(end_date.valueOf() - shift * 60 * 1000);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new Date(default_date.valueOf());\r\n\t};\r\n\tscheduler.getRecDates = function (id, max) {\r\n\t\tvar ev = typeof id == \"object\" ? id : scheduler.getEvent(id);\r\n\t\tvar recurrings = [];\r\n\t\tmax = max || 100;\r\n\r\n\t\tif (!isSeries(ev)) {\r\n\t\t\treturn [\r\n\t\t\t\t{ start_date: ev.start_date, end_date: ev.end_date }\r\n\t\t\t];\r\n\t\t}\r\n\t\tif (ev.deleted) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tscheduler.repeat_date(ev, recurrings, true, ev.start_date, ev.end_date, max);\r\n\r\n\t\tvar result = [];\r\n\t\tfor (var i = 0; i < recurrings.length; i++) {\r\n\t\t\tif (!recurrings[i].deleted) {\r\n\t\t\t\tresult.push({ start_date: recurrings[i].start_date, end_date: recurrings[i].end_date });\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t};\r\n\tscheduler.getEvents = function (from, to) {\r\n\t\tvar result = [];\r\n\t\tconst exceptions = groupExceptions();\r\n\t\tfor (var a in this._events) {\r\n\t\t\tvar ev = this._events[a];\r\n\t\t\tif (ev.recurring_event_id) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif (from && to && ev.start_date < to && ev.end_date > from) {\r\n\t\t\t\tif (isSeries(ev)) {\r\n\t\t\t\t\tvar sev = [];\r\n\t\t\t\t\tthis.repeat_date(ev, sev, true, from, to, undefined, exceptions);\r\n\t\t\t\t\tsev.forEach(function(occurence){\r\n\t\t\t\t\t\tif (occurence.start_date < to && occurence.end_date > from) {\r\n\t\t\t\t\t\t\tresult.push(occurence);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t// if it's virtual event we can skip it\r\n\t\t\t\t} else if (!this._is_virtual_event(ev.id)) {\r\n\t\t\t\t\tresult.push(ev);\r\n\t\t\t\t}\r\n\t\t\t} else if (!from && !to && !this._is_virtual_event(ev.id)) {\r\n\t\t\t\tresult.push(ev);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t};\r\n\r\n\t//drop secondary attributes\r\n\tscheduler._copy_dummy = function (ev) {\r\n\t\tvar start_date = new Date(this.start_date);\r\n\t\tvar end_date = new Date(this.end_date);\r\n\t\tthis.start_date = start_date;\r\n\t\tthis.end_date = end_date;\r\n\t\tthis.duration = this.rrule = null;\r\n\t};\r\n\r\n\tscheduler.config.include_end_by = false;\r\n\tscheduler.config.lightbox_recurring = 'ask'; // series, instance\r\n\tscheduler.config.recurring_workdays = [RRule.MO.weekday,RRule.TU.weekday,RRule.WE.weekday,RRule.TH.weekday,RRule.FR.weekday];\r\n\tscheduler.config.repeat_date = \"%m.%d.%Y\";\r\n\tscheduler.config.lightbox.sections = [\r\n\t\t{ name: \"description\", map_to: \"text\", type: \"textarea\", focus: true },\r\n\t\t{ name: \"recurring\", type: \"recurring\", map_to: \"rec_type\" },\r\n\t\t{ name: \"time\", height: 72, type: \"time\", map_to: \"auto\" }\r\n\t];\r\n\r\n\tscheduler.attachEvent(\"onClearAll\", function () {\r\n\t\tscheduler._rec_markers = {}; //clear recurring events data\r\n\t\tscheduler._rec_markers_pull = {};\r\n\t\tscheduler._rec_temp = [];\r\n\t});\r\n\r\n\r\n\tfunction getTopLevelOption(rruleObj, untilDate) {\r\n\t\tconst options = rruleObj.options;\r\n\t\tconst until = options.until || untilDate;\r\n\r\n\t\tconst hasEndCondition = options.count || (until && until.getFullYear() !== 9999);\r\n\r\n\t\tif (hasEndCondition) {\r\n\t\t\treturn 'CUSTOM';\r\n\t\t}\r\n\r\n\t\tif (options.freq === RRule.DAILY && options.interval === 1 && !options.byweekday) {\r\n\t\t\treturn 'DAILY';\r\n\t\t} else if (options.freq === RRule.WEEKLY && options.interval === 1 && !options.byweekday) {\r\n\t\t\treturn 'WEEKLY';\r\n\t\t} else if (options.freq === RRule.MONTHLY && options.interval === 1 && !options.bysetpos) {\r\n\t\t\treturn 'MONTHLY';\r\n\t\t} else if (options.freq === RRule.YEARLY && options.interval === 1 && !options.bysetpos) {\r\n\t\t\treturn 'YEARLY';\r\n\t\t} else if (options.freq === RRule.DAILY && options.byweekday && options.byweekday.length === scheduler.config.recurring_workdays.length &&\r\n\t\t\toptions.byweekday.includes(RRule.MO) &&\r\n\t\t\toptions.byweekday.includes(RRule.TU) &&\r\n\t\t\toptions.byweekday.includes(RRule.WE) &&\r\n\t\t\toptions.byweekday.includes(RRule.TH) &&\r\n\t\t\toptions.byweekday.includes(RRule.FR)) {\r\n\t\t\treturn 'WORKDAYS';\r\n\t\t} else {\r\n\t\t\treturn 'CUSTOM';\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction getWeekdayOfMonth(date) {\r\n\t\tconst dayOfWeek = date.getDay();\r\n\t\tconst dayOfMonth = date.getDate();\r\n\t\tconst dayNumber = Math.ceil(dayOfMonth / 7);\r\n\t\treturn { dayOfWeek, dayNumber };\r\n\t}\r\n\r\n\r\n\tconst jsDaysToRRULEDays = {\r\n\t\t0: \"SU\",\r\n\t\t1: \"MO\",\r\n\t\t2: \"TU\",\r\n\t\t3: \"WE\",\r\n\t\t4: \"TH\",\r\n\t\t5: \"FR\",\r\n\t\t6: \"SA\"\r\n\t};\r\n\tconst RruleDayNumsToJs = {\r\n\t\t0: 1,\r\n\t\t1: 2,\r\n\t\t2: 3,\r\n\t\t3: 4,\r\n\t\t4: 5,\r\n\t\t5: 6,\r\n\t\t6: 0\r\n\t};\r\n\r\n\tfunction fillCustomDaily(node, rule) {\r\n\t\tnode.querySelector(\"[name='repeat_interval_value']\").value = (rule ? rule.interval : 1) || 1;\r\n\t}\r\n\r\n\tfunction fillCustomWeekly(node, rule, event) {\r\n\t\tnode.querySelector(\"[name='repeat_interval_value']\").value = (rule ? rule.interval : 1) || 1;\r\n\r\n\t\tconst dayCheckboxes = node.querySelectorAll(`.dhx_form_repeat_custom_week input`);\r\n\t\tdayCheckboxes.forEach((ch) => ch.checked = false);\r\n\t\tif (rule && rule.byweekday) {\r\n\t\t\trule.byweekday.forEach((day) => {\r\n\t\t\t\tconst dayNum = RruleDayNumsToJs[day.weekday];\r\n\t\t\t\tconst dayLabel = jsDaysToRRULEDays[dayNum];\r\n\t\t\t\tnode.querySelector(`.dhx_form_repeat_custom_week input[value=\"${dayLabel}\"]`).checked = true;\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tconst dayLabel = jsDaysToRRULEDays[event.start_date.getDay()];\r\n\t\t\tnode.querySelector(`.dhx_form_repeat_custom_week input[value=\"${dayLabel}\"]`).checked = true;\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tfunction fillCustomMonthly(node, rule, event) {\r\n\t\tnode.querySelector(\"[name='repeat_interval_value']\").value = (rule ? rule.interval : 1) || 1;\r\n\r\n\t\tconst dateOfMonth = node.querySelector(`.dhx_form_repeat_custom_month [value=\"month_date\"]`);\r\n\t\tconst nthWeekDayOfMonth = node.querySelector(`.dhx_form_repeat_custom_month [value=\"month_nth_weekday\"]`);\r\n\t\tdateOfMonth.innerText = scheduler.templates.repeat_monthly_date(event.start_date, event);\r\n\t\tnthWeekDayOfMonth.innerText = scheduler.templates.repeat_monthly_weekday(event.start_date, event);\r\n\r\n\t\tif (!rule || (rule.bysetpos && !(rule.byweekday && rule.byweekday.length))) {\r\n\t\t\tnode.querySelector(`[name=\"dhx_custom_month_option\"]`).value = \"month_date\";\r\n\t\t} else {\r\n\t\t\tnode.querySelector(`[name=\"dhx_custom_month_option\"]`).value = \"month_nth_weekday\";\r\n\t\t}\r\n\t}\r\n\r\n\tfunction formatDayNumber(date){\r\n\t\tswitch (date) {\r\n\t\t\tcase 1:\r\n\t\t\tcase 31:\r\n\t\t\t\treturn `${date}st`;\r\n\t\t\tcase 2:\r\n\t\t\t\treturn `${date}nd`;\r\n\t\t\tcase 3:\r\n\t\t\t\treturn `${date}rd`;\r\n\t\t\tdefault:\r\n\t\t\t\treturn `${date}th`;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.templates.repeat_monthly_date = function(startDate, event) {\r\n\t\tconst date = startDate.getDate();\r\n\t\treturn `Every ${formatDayNumber(date)}`;\r\n\t};\r\n\tscheduler.templates.repeat_monthly_weekday = function(startDate, event) {\r\n\t\tconst nthDayOfMonth = getWeekdayOfMonth(startDate);\r\n\t\treturn `Every ${formatDayNumber(nthDayOfMonth.dayNumber)} ${scheduler.locale.date.day_full[nthDayOfMonth.dayOfWeek]}`;\r\n\t};\r\n\t\r\n\tscheduler.templates.repeat_yearly_month_date = function(startDate, event) {\r\n\t\tconst date = startDate.getDate();\r\n\t\tconst monthLabel = scheduler.locale.date.month_full[startDate.getMonth()];\r\n\t\treturn `Every ${formatDayNumber(date)} day of ${monthLabel}`;\r\n\t};\r\n\tscheduler.templates.repeat_yearly_month_weekday = function(startDate, event) {\r\n\t\tconst nthDayOfMonth = getWeekdayOfMonth(startDate);\r\n\t\tconst monthLabel = scheduler.locale.date.month_full[startDate.getMonth()];\r\n\t\treturn `Every ${formatDayNumber(nthDayOfMonth.dayNumber)} ${scheduler.locale.date.day_full[nthDayOfMonth.dayOfWeek]} of ${monthLabel}`;\r\n\t};\r\n\r\n\tfunction fillCustomYearly(node, rule, event) {\r\n\t\tconst dateOfYear = node.querySelector(`.dhx_form_repeat_custom_year [value=\"month_date\"]`);\r\n\t\tconst nthWeekDayOfYear = node.querySelector(`.dhx_form_repeat_custom_year [value=\"month_nth_weekday\"]`);\r\n\t\tdateOfYear.innerText = scheduler.templates.repeat_yearly_month_date(event.start_date, event);\r\n\t\tnthWeekDayOfYear.innerText = scheduler.templates.repeat_yearly_month_weekday(event.start_date, event);\r\n\r\n\t\tif (!rule || (rule.bysetpos && !(rule.byweekday && rule.byweekday.length))) {\r\n\t\t\tnode.querySelector(`[name=\"dhx_custom_year_option\"]`).value = \"month_date\";\r\n\t\t} else {\r\n\t\t\tnode.querySelector(`[name=\"dhx_custom_year_option\"]`).value = \"month_nth_weekday\";\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fillEndRule(node, rule, event) {\r\n\t\tconst countInput = node.querySelector(`.dhx_form_repeat_ends_extra [name=\"dhx_form_repeat_ends_after\"]`);\r\n\t\tconst ondateInput = node.querySelector(`.dhx_form_repeat_ends_extra [name=\"dhx_form_repeat_ends_ondate\"]`);\r\n\t\tconst endOptionSelect = node.querySelector(`[name='dhx_custom_repeat_ends']`);\r\n\t\tcountInput.value = 1;\r\n\r\n\t\tlet formatter = scheduler.date.date_to_str(\"%Y-%m-%d\");\r\n\t\tif (!scheduler.config.repeat_date_of_end) {\r\n\t\t\tscheduler.config.repeat_date_of_end = formatter(scheduler.date.add(scheduler._currentDate(), 30, \"day\"));\r\n\t\t}\r\n\t\tondateInput.value = scheduler.config.repeat_date_of_end;\r\n\r\n\t\tif (rule && rule.count) {\r\n\t\t\tendOptionSelect.value = \"AFTER\";\r\n\t\t\tcountInput.value = rule.count;\r\n\t\t} else if (event._end_date && event._end_date.getFullYear() !== 9999) {\r\n\t\t\tendOptionSelect.value = \"ON\";\r\n\t\t\tondateInput.value = formatter(event._end_date);\r\n\t\t} else {\r\n\t\t\tendOptionSelect.value = \"NEVER\";\r\n\t\t}\r\n\t\tendOptionSelect.dispatchEvent(new Event(\"change\"));\r\n\t}\r\n\r\n\tconst getRecValue = {\r\n\t\tMONTHLY: function (dates) {\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.MONTHLY,\r\n\t\t\t\tinterval: 1,\r\n\t\t\t\tbymonthday: dates.start.getDate()\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tWEEKLY: function (dates) {\r\n\t\t\tlet day = dates.start.getDay() - 1;\r\n\t\t\tif (day == -1) day = 6;\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.WEEKLY,\r\n\t\t\t\tinterval: 1,\r\n\t\t\t\tbyweekday: [day]\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tDAILY: function (dates) {\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.DAILY,\r\n\t\t\t\tinterval: 1\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tYEARLY: function (dates) {\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.YEARLY,\r\n\t\t\t\tbymonth: dates.start.getMonth() + 1,\r\n\t\t\t\tinterval: 1,\r\n\t\t\t\tbymonthday: dates.start.getDate()\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tWORKDAYS: function (dates) {\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.WEEKLY,\r\n\t\t\t\tinterval: 1,\r\n\t\t\t\tbyweekday: scheduler.config.recurring_workdays\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tCUSTOM: function (dates, node) {\r\n\t\t\tconst rrule = {};\r\n\t\t\tconst freq = node.querySelector(`[name=\"repeat_interval_unit\"]`).value;\r\n\t\t\tconst interval = Math.max(1, node.querySelector(`[name=\"repeat_interval_value\"]`).value);\r\n\t\t\tconst monthRepeat = node.querySelector(`[name=\"dhx_custom_month_option\"]`).value;\r\n\t\t\tconst yearRepeat = node.querySelector(`[name=\"dhx_custom_year_option\"]`).value;\r\n\r\n\t\t\trrule.interval = interval;\r\n\t\t\tlet days;\r\n\t\t\tlet day;\r\n\r\n\t\t\tswitch (freq) {\r\n\t\t\t\tcase \"DAILY\":\r\n\t\t\t\t\trrule.freq = RRule.DAILY;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"WEEKLY\": \r\n\t\t\t\t\trrule.freq = RRule.WEEKLY;\r\n\t\t\t\t\tdays = [];\r\n\t\t\t\t\tnode.querySelectorAll(`.dhx_form_repeat_custom_week [name=\"week_day\"]`).forEach((ch) => {\r\n\t\t\t\t\t\tif(ch.checked){\r\n\t\t\t\t\t\t\tdays.push(ch.value);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\trrule.byweekday = days.map((day) => {\r\n\t\t\t\t\t\tswitch (day) {\r\n\t\t\t\t\t\t\tcase \"MO\":\r\n\t\t\t\t\t\t\t\treturn RRule.MO.weekday;\r\n\t\t\t\t\t\t\tcase \"TU\":\r\n\t\t\t\t\t\t\t\treturn RRule.TU.weekday;\r\n\t\t\t\t\t\t\tcase \"WE\":\r\n\t\t\t\t\t\t\t\treturn RRule.WE.weekday;\r\n\t\t\t\t\t\t\tcase \"TH\":\r\n\t\t\t\t\t\t\t\treturn RRule.TH.weekday;\r\n\t\t\t\t\t\t\tcase \"FR\":\r\n\t\t\t\t\t\t\t\treturn RRule.FR.weekday;\r\n\t\t\t\t\t\t\tcase \"SA\":\r\n\t\t\t\t\t\t\t\treturn RRule.SA.weekday;\r\n\t\t\t\t\t\t\tcase \"SU\":\r\n\t\t\t\t\t\t\t\treturn RRule.SU.weekday;\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"MONTHLY\":\r\n\t\t\t\t\trrule.freq = RRule.MONTHLY;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (monthRepeat === \"month_date\") {\r\n\t\t\t\t\t\trrule.bymonthday = dates.start.getDate();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tday = dates.start.getDay() - 1;\r\n\t\t\t\t\t\tif (day == -1) day = 6;\r\n\t\t\t\t\t\trrule.byweekday = [day];\r\n\t\t\t\t\t\trrule.bysetpos = getWeekdayOfMonth(dates.start).dayNumber;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"YEARLY\":\r\n\t\t\t\t\trrule.freq = RRule.YEARLY;\r\n\t\t\t\t\trrule.bymonth = dates.start.getMonth() + 1;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (yearRepeat == \"month_date\") {\r\n\t\t\t\t\t\trrule.bymonthday = dates.start.getDate();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tday = dates.start.getDay() - 1;\r\n\t\t\t\t\t\tif (day == -1) day = 6;\r\n\t\t\t\t\t\trrule.byweekday = [day];\r\n\t\t\t\t\t\trrule.bysetpos = getWeekdayOfMonth(dates.start).dayNumber;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tconst formatFunc = scheduler.date.str_to_date(\"%Y-%m-%d\");\r\n\t\t\tlet until = new Date(9999, 1, 1);\r\n\t\t\tconst endRule = node.querySelector(`[name=\"dhx_custom_repeat_ends\"]`);\r\n\t\t\tif(endRule.value === \"ON\"){\r\n\t\t\t\tuntil = formatFunc(node.querySelector(`[name=\"dhx_form_repeat_ends_ondate\"]`).value);\r\n\t\t\t} else if(endRule.value === \"AFTER\") {\r\n\t\t\t\trrule.count = Math.max(1, node.querySelector(`[name=\"dhx_form_repeat_ends_after\"]`).value);\r\n\t\t\t}\r\n\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tNEVER: function () {\r\n\t\t}\r\n\t};\r\n\r\n\tfunction fillInDefaults(node, rule, event) {\r\n\t\tfillCustomDaily(node, rule, event);\r\n\t\tfillCustomWeekly(node, rule, event);\r\n\t\tfillCustomMonthly(node, rule, event);\r\n\t\tfillCustomYearly(node, rule, event);\r\n\t\tfillEndRule(node, rule, event);\r\n\t}\r\n\tscheduler.form_blocks[\"recurring\"] = {\r\n\t\trender: function (sns) {\r\n\t\t\tif (sns.form) {\r\n\t\t\t\tlet rec = scheduler.form_blocks[\"recurring\"];\r\n\t\t\t\tlet form = rec._get_node(sns.form);\r\n\t\t\t\tlet html = rec._outer_html(form);\r\n\t\t\t\tform.style.display = 'none';\r\n\t\t\t\treturn html;\r\n\t\t\t}\r\n\t\t\tlet loc = scheduler.locale.labels;\r\n\r\n\t\t\treturn `
\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t
\r\n\r\n\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t
\r\n\r\n\t\t\t
\r\n\t\t\t\t
${loc.repeat_ends}
\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\r\n\t\t
\r\n\t
`;\r\n\t\t},\r\n\r\n\t\r\n\t\t_init_set_value: function (node, value, event) {\r\n\t\t\tscheduler.form_blocks[\"recurring\"]._ds = { start: event.start_date, end: event.end_date };\r\n\t\t\tfunction hide(node) {\r\n\t\t\t\tnode.classList.add(\"dhx_hidden\");\r\n\t\t\t}\r\n\t\t\tfunction show(node) {\r\n\t\t\t\tnode.classList.remove(\"dhx_hidden\");\r\n\t\t\t}\r\n\t\t\tfunction onRepeatOptionChange(value) {\r\n\t\t\t\tconst repeat = node.querySelector(\".dhx_form_repeat_custom\");\r\n\t\t\t\tif (value === \"CUSTOM\") {\r\n\t\t\t\t\tshow(repeat);\r\n\t\t\t\t} else {\r\n\t\t\t\t\thide(repeat);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction onCustomRepeatIntervalChange(value) {\r\n\t\t\t\tconst nodes = {\r\n\t\t\t\t\tweekly: node.querySelector(\".dhx_form_repeat_custom_week\"),\r\n\t\t\t\t\tmonthly: node.querySelector(\".dhx_form_repeat_custom_month\"),\r\n\t\t\t\t\tyearly: node.querySelector(\".dhx_form_repeat_custom_year\")\r\n\t\t\t\t};\r\n\t\t\t\tswitch (value) {\r\n\t\t\t\t\tcase \"DAILY\":\r\n\t\t\t\t\t\thide(nodes.weekly);\r\n\t\t\t\t\t\thide(nodes.monthly);\r\n\t\t\t\t\t\thide(nodes.yearly);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"WEEKLY\":\r\n\t\t\t\t\t\tshow(nodes.weekly);\r\n\t\t\t\t\t\thide(nodes.monthly);\r\n\t\t\t\t\t\thide(nodes.yearly);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"MONTHLY\":\r\n\t\t\t\t\t\thide(nodes.weekly);\r\n\t\t\t\t\t\tshow(nodes.monthly);\r\n\t\t\t\t\t\thide(nodes.yearly);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"YEARLY\":\r\n\t\t\t\t\t\thide(nodes.weekly);\r\n\t\t\t\t\t\thide(nodes.monthly);\r\n\t\t\t\t\t\tshow(nodes.yearly);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction onCustomRepeatEndRule(value) {\r\n\t\t\t\tconst nodes = {\r\n\t\t\t\t\tafter: node.querySelector(\".dhx_form_repeat_ends_extra .dhx_form_repeat_ends_after\"),\r\n\t\t\t\t\ton: node.querySelector(\".dhx_form_repeat_ends_extra .dhx_form_repeat_ends_on\")\r\n\t\t\t\t};\r\n\t\t\t\tswitch (value) {\r\n\t\t\t\t\tcase \"NEVER\":\r\n\t\t\t\t\t\thide(nodes.after);\r\n\t\t\t\t\t\thide(nodes.on);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"AFTER\":\r\n\t\t\t\t\t\tshow(nodes.after);\r\n\t\t\t\t\t\thide(nodes.on);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"ON\":\r\n\t\t\t\t\t\thide(nodes.after);\r\n\t\t\t\t\t\tshow(nodes.on);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// repeat section change\r\n\t\t\tnode.querySelector(\".dhx_form_repeat_pattern select\").addEventListener(\"change\", function () {\r\n\t\t\t\tonRepeatOptionChange(this.value);\r\n\t\t\t});\r\n\r\n\t\t\t// custom repeat interval change\r\n\t\t\tnode.querySelector(\".dhx_form_repeat_custom_interval [name='repeat_interval_unit']\").addEventListener(\"change\", function () {\r\n\t\t\t\tonCustomRepeatIntervalChange(this.value);\r\n\t\t\t});\r\n\r\n\t\t\t// custom repeat end rule\r\n\t\t\tnode.querySelector(\".dhx_form_repeat_ends [name='dhx_custom_repeat_ends']\").addEventListener(\"change\", function () {\r\n\t\t\t\tonCustomRepeatEndRule(this.value);\r\n\t\t\t});\r\n\r\n\t\t\tscheduler._lightbox._rec_init_done = true;\r\n\t\t},\r\n\t\tbutton_click: function(){},\r\n\t\tset_value: function (node, value, ev) {\r\n\t\t\tlet rf = scheduler.form_blocks[\"recurring\"];\r\n\t\t\tif (!scheduler._lightbox._rec_init_done)\r\n\t\t\t\trf._init_set_value(node, value, ev);\r\n\t\t\tnode.open = !ev.rrule;\r\n\r\n\t\t\tnode.blocked = this._is_modified_occurence(ev);\r\n\r\n\t\t\tlet ds = rf._ds;\r\n\t\t\tds.start = ev.start_date;\r\n\t\t\tds.end = ev._end_date;\r\n\r\n\t\t\tif (ev.rrule) {\r\n\t\t\t\tconst rruleset = rrulestr(ev.rrule);\r\n\t\t\t\tfillInDefaults(node, rruleset.origOptions, ev);\r\n\t\t\t\tconst topOption = getTopLevelOption(rruleset, ev._end_date);\r\n\t\t\t\tnode.querySelector(\".dhx_form_repeat_pattern select\").value = topOption;\r\n\t\t\t\tif(topOption === \"CUSTOM\"){\r\n\t\t\t\t\tlet customFreq;\r\n\t\t\t\t\tswitch (rruleset.origOptions.freq) {\r\n\t\t\t\t\t\tcase RRule.DAILY:\r\n\t\t\t\t\t\t\tcustomFreq = \"DAILY\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase RRule.WEEKLY:\r\n\t\t\t\t\t\t\tcustomFreq = \"WEEKLY\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase RRule.MONTHLY:\r\n\t\t\t\t\t\t\tcustomFreq = \"MONTHLY\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase RRule.YEARLY:\r\n\t\t\t\t\t\t\tcustomFreq = \"YEARLY\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(customFreq){\r\n\t\t\t\t\t\tnode.querySelector(`[name=\"repeat_interval_unit\"]`).value = customFreq;\r\n\t\t\t\t\t\tnode.querySelector(`[name=\"repeat_interval_unit\"]`).dispatchEvent(new Event(\"change\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t//\trepeat_interval_unit\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tfillInDefaults(node, null, ev);\r\n\t\t\t\tnode.querySelector(\".dhx_form_repeat_pattern select\").value = \"NEVER\";\r\n\t\t\t}\r\n\t\t\tnode.querySelector(\".dhx_form_repeat_pattern select\").dispatchEvent(new Event(\"change\"));\r\n\r\n\t\t},\r\n\t\tget_value: function (node, ev) {\r\n\t\t\t\r\n\t\t\tif(!node.blocked && node.querySelector(\".dhx_form_repeat_pattern select\").value !== \"NEVER\") {\r\n\t\t\t\tlet ds = scheduler.form_blocks[\"recurring\"]._ds;\r\n\t\t\t\tlet actual_dates = {};\r\n\r\n\t\t\t\tlet timeControl = getTimeSection();\r\n\r\n\t\t\t\ttimeControl.getValue(actual_dates);\r\n\t\t\t\tds.start = actual_dates.start_date;\r\n\t\t\t\tconst pattern = node.querySelector(\".dhx_form_repeat_pattern select\").value;\r\n\t\t\t\tconst recurrence = getRecValue[pattern](ds, node);\r\n\t\t\t\tev.rrule = new RRule(recurrence.rrule).toString().replace(\"RRULE:\", \"\");\r\n\t\t\t\tds.end = recurrence.until;\r\n\r\n\t\t\t\tev.duration = Math.floor((actual_dates.end_date - actual_dates.start_date) / 1000);\r\n\r\n\t\t\t\tif (ds._start) {\r\n\t\t\t\t\tev.start_date = new Date(ds.start);\r\n\t\t\t\t\tev._start_date = new Date(ds.start);\r\n\t\t\t\t\tds._start = false;\r\n\t\t\t\t} else\r\n\t\t\t\t\tev._start_date = null;\r\n\r\n\t\t\t\tev._end_date = ds.end;\r\n\t\t\t}else{\r\n\t\t\t\tev.rrule = ev.rrule = \"\";\r\n\t\t\t\tev._end_date = ev.end_date;\r\n\t\t\t}\r\n\r\n\t\t\treturn ev.rrule;\r\n\t\t},\r\n\r\n\t\tfocus: function (node) {\r\n\t\t}\r\n\t};\r\n\r\n\tfunction getTimeSection() {\r\n\t\tlet timeControl = scheduler.formSection('time');\r\n\t\tif (!timeControl) {\r\n\t\t\ttimeControl = getFirstSectionOfType('time');\r\n\t\t}\r\n\t\tif (!timeControl) {\r\n\t\t\ttimeControl = getFirstSectionOfType('calendar_time');\r\n\t\t}\r\n\r\n\r\n\t\tif (!timeControl) {\r\n\t\t\tthrow new Error([\"Can't calculate the recurring rule, the Recurring form block can't find the Time control. Make sure you have the time control in 'scheduler.config.lightbox.sections' config.\",\r\n\t\t\t\t\"You can use either the default time control https://docs.dhtmlx.com/scheduler/time.html, or the datepicker https://docs.dhtmlx.com/scheduler/minicalendar.html, or a custom control. \",\r\n\t\t\t\t\"In the latter case, make sure the control is named \\\"time\\\":\",\r\n\t\t\t\t\"\",\r\n\t\t\t\t\"scheduler.config.lightbox.sections = [\",\r\n\t\t\t\t\"{name:\\\"time\\\", height:72, type:\\\"YOU CONTROL\\\", map_to:\\\"auto\\\" }];\"]\r\n\t\t\t\t.join(\"\\n\"));\r\n\t\t}\r\n\r\n\t\treturn timeControl;\r\n\t}\r\n\r\n\tfunction getFirstSectionOfType(type) {\r\n\t\tfor (let i = 0; i < scheduler.config.lightbox.sections.length; i++) {\r\n\t\t\tlet section = scheduler.config.lightbox.sections[i];\r\n\t\t\tif (section.type === type) {\r\n\t\t\t\treturn scheduler.formSection(section.name);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.occurrence_timestamp_in_utc = false;\r\nscheduler.config.recurring_workdays = [1,2,3,4,5];\r\nscheduler.form_blocks[\"recurring\"] = {\r\n\t_get_node : function(node){\r\n\t\tif (typeof node == \"string\"){\r\n\t\t\tlet element = scheduler._lightbox.querySelector(`#${node}`);\r\n\t\t\tif(!element){\r\n\t\t\t\t// form is detached from lightbox \r\n\t\t\t\t// search globally, won't work in LWC\r\n\t\t\t\telement = document.getElementById(node);\r\n\t\t\t}\r\n\t\t\tnode = element;\r\n\t\t}\r\n\t\tif (node.style.display == 'none')\r\n\t\t\tnode.style.display = \"\";\r\n\t\treturn node;\r\n\t},\r\n\t_outer_html: function(node){\r\n\t\treturn node.outerHTML || getOuterHTML(node);\r\n\r\n\t\t//probably not needed, FF v10- only\r\n\t\tfunction getOuterHTML(n){\r\n\t\t\tvar div = document.createElement('div'), h;\r\n\t\t\tdiv.appendChild( n.cloneNode(true) );\r\n\t\t\th = div.innerHTML;\r\n\t\t\tdiv = null;\r\n\t\t\treturn h;\r\n\t\t}\r\n\t},\r\n\trender:function(sns) {\r\n\t\tif(sns.form){\r\n\t\t\tvar rec = scheduler.form_blocks[\"recurring\"];\r\n\t\t\tvar form = rec._get_node(sns.form);\r\n\t\t\tvar html = rec._outer_html(form);\r\n\t\t\tform.style.display = 'none';\r\n\t\t\treturn html;\r\n\t\t}\r\n\t\tvar loc = scheduler.locale.labels;\r\n\t\treturn '
'+\r\n\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t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\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t''+loc.repeat_text_occurences_count+'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t'
'+\r\n\t\t\t\t'
'+\r\n\t\t\t\t'
';\r\n\t},\r\n\t_ds: {},\r\n\t_get_form_node: function(els, name, value){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return null;\r\n\t\tif(col.nodeName) return col;\r\n\r\n\t\tif(col.length){\r\n\t\t\tfor(var i=0; i < col.length; i++){\r\n\t\t\t\tif(col[i].value == value)\r\n\t\t\t\t\treturn col[i];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\t_get_node_value: function(els, name, multiselect){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return \"\";\r\n\t\tif(col.length){\r\n\t\t\tif(multiselect){\r\n\t\t\t\tvar res = [];\r\n\t\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\t\tif (col[i].checked) res.push(col[i].value);\r\n\r\n\t\t\t\treturn res;\r\n\t\t\t}else{\r\n\t\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\t\tif (col[i].checked) return col[i].value;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(col.value)\r\n\t\t\treturn !multiselect ? col.value : [col.value];\r\n\t},\r\n\r\n\t_get_node_numeric_value: function(els, name){\r\n\t\tvar value = scheduler.form_blocks[\"recurring\"]._get_node_value(els, name);\r\n\t\treturn ((value * 1) || 0);\r\n\t},\r\n\r\n\t_set_node_value: function(els, name, value){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return;\r\n\r\n\t\tif(col.name == name){\r\n\t\t\tcol.value = value;\r\n\t\t}else if(col.length){\r\n\t\t\tvar hash_value = typeof value == \"object\";\r\n\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\tif (hash_value || col[i].value == value){\r\n\t\t\t\t\tcol[i].checked = hash_value ? !!value[col[i].value] : !!value;\r\n\t\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_init_set_value:function(node, value, ev) {\r\n\t\tvar block = scheduler.form_blocks[\"recurring\"];\r\n\t\tvar get_value = block._get_node_value;\r\n\t\tvar set_value = block._set_node_value;\r\n\t\tscheduler.form_blocks[\"recurring\"]._ds = {start:ev.start_date, end:ev._end_date};\r\n\r\n\t\tvar str_date_format = scheduler.date.str_to_date(scheduler.config.repeat_date, false, true);\r\n\t\tvar str_date = function(str_date) {\r\n\t\t\tvar date = str_date_format(str_date);\r\n\t\t\tif (scheduler.config.include_end_by)\r\n\t\t\t\tdate = scheduler.date.add(date, 1, 'day');\r\n\t\t\treturn date;\r\n\t\t};\r\n\r\n\t\tvar date_str = scheduler.date.date_to_str(scheduler.config.repeat_date);\r\n\r\n\t\tvar top = node.getElementsByTagName(\"FORM\")[0];\r\n\t\tvar els = {};\r\n\r\n\t\tfunction register_els(inps) {\r\n\t\t\tfor (var i = 0; i < inps.length; i++) {\r\n\t\t\t\tvar inp = inps[i];\r\n\r\n\t\t\t\tif(inp.name){\r\n\t\t\t\t\tif(!els[inp.name]){\r\n\t\t\t\t\t\tels[inp.name] = inp;\r\n\t\t\t\t\t}else if(els[inp.name].nodeType){\r\n\t\t\t\t\t\tvar node = els[inp.name];\r\n\t\t\t\t\t\tels[inp.name] = [node, inp];\r\n\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tels[inp.name].push(inp);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tregister_els(top.getElementsByTagName(\"INPUT\"));\r\n\t\tregister_els(top.getElementsByTagName(\"SELECT\"));\r\n\r\n\t\tif (!scheduler.config.repeat_date_of_end) {\r\n\t\t\tvar formatter = scheduler.date.date_to_str(scheduler.config.repeat_date);\r\n\t\t\tscheduler.config.repeat_date_of_end = formatter(scheduler.date.add(scheduler._currentDate(), 30, \"day\"));\r\n\t\t}\r\n\t\tset_value(els, \"date_of_end\", scheduler.config.repeat_date_of_end);\r\n\r\n\t\tvar $ = function(a) {\r\n\t\t\treturn scheduler._lightbox.querySelector(`#${a}`) || { style:{} };//return fake object if node not found\r\n\t\t};\r\n\r\n\t\tfunction change_current_view() {\r\n\t\t\t$(\"dhx_repeat_day\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_week\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_month\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_year\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_\" + this.value).style.display = \"\";\r\n\t\t\tscheduler.setLightboxSize();\r\n\t\t}\r\n\r\n\t\tfunction get_repeat_code(dates) {\r\n\t\t\tvar code = [get_value(els, \"repeat\")];\r\n\t\t\tget_rcode[code[0]](code, dates);\r\n\r\n\t\t\twhile (code.length < 5) code.push(\"\");\r\n\t\t\tvar repeat = \"\";\r\n\r\n\t\t\tvar end = get_end_rule(els);\r\n\r\n\t\t\tif (end == \"no\") {\r\n\t\t\t\tdates.end = new Date(9999, 1, 1);\r\n\t\t\t\trepeat = \"no\";\r\n\t\t\t}\r\n\t\t\telse if (end == \"date_of_end\") {\r\n\t\t\t\tdates.end = str_date(get_value(els, \"date_of_end\"));\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tscheduler.transpose_type(code.join(\"_\"));\r\n\t\t\t\trepeat = Math.max(1, get_value(els, \"occurences_count\"));\r\n\r\n\t\t\t\tvar transp = 0;\r\n\r\n\t\t\t\t//var transp = ((code[0] == \"week\" && code[4] && code[4].toString().indexOf(scheduler.config.start_on_monday ? 1 : 0) == -1) ? 1 : 0);\r\n\r\n\t\t\t\t// which is equal to following code, seems to produce extra instance, not clear why needed\r\n\r\n\t\t\t\t/*if(code[0] == \"week\"){\r\n\t\t\t\t\tvar days = code[4] || \"\";\r\n\t\t\t\t\tif(scheduler.config.start_on_monday){\r\n\t\t\t\t\t\tif(days.indexOf(1) == -1)\r\n\t\t\t\t\t\ttransp = 1;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(days.indexOf(0) == -1)\r\n\t\t\t\t\t\ttransp = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}*/\r\n\r\n\t\t\t//\tdates.end = scheduler.date.add(new Date(dates.start), repeat + transp, code.join(\"_\"));\r\n\r\n\t\t\t\tdates.end = scheduler.date[\"add_\" + code.join(\"_\")](new Date(dates.start), repeat + transp, {start_date: dates.start}) || dates.start;\r\n\t\t\t}\r\n\r\n\t\t\treturn code.join(\"_\") + \"#\" + repeat;\r\n\t\t}\r\n\t\tfunction get_end_rule(els){\r\n\t\t\tvar end = els[\"end\"];\r\n\t\t\tif(end.length){\r\n\t\t\t\tfor(var i =0; i < end.length; i++){\r\n\t\t\t\t\tif(end[i].checked){\r\n\t\t\t\t\t\tif(end[i].value && end[i].value != \"on\"){//seems to be default value:var input = document.createElement(\"input\"); input.type = \"radio\"; input.value\r\n\t\t\t\t\t\t\treturn end[i].value;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif(!i){\r\n\t\t\t\t\t\t\t\treturn \"no\";\r\n\t\t\t\t\t\t\t}else if(i == 2){\r\n\t\t\t\t\t\t\t\treturn \"date_of_end\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\treturn \"occurences_count\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(end.value)\r\n\t\t\t\t\treturn end.value;\r\n\t\t\t}\r\n\t\t\treturn \"no\";\r\n\t\t}\r\n\t\tfunction set_end_rule(els, value){\r\n\t\t\tvar end = els[\"end\"];\r\n\r\n\t\t\tif(end.length){\r\n\t\t\t\tvar has_values = !!end[0].value && end[0].value != \"on\";\r\n\t\t\t\tif(has_values){\r\n\t\t\t\t\tfor(var i =0; i < end.length; i++){\r\n\t\t\t\t\t\tif(end[i].value == value)\r\n\t\t\t\t\t\t\tend[i].checked = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar ind = 0;\r\n\t\t\t\t\tswitch(value){\r\n\t\t\t\t\t\tcase \"no\":\r\n\t\t\t\t\t\t\tind = 0;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"date_of_end\":\r\n\t\t\t\t\t\t\tind = 2;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tind = 1;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend[ind].checked = true;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tend.value = value;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tscheduler.form_blocks[\"recurring\"]._get_repeat_code = get_repeat_code;\r\n\t\tvar get_rcode = {\r\n\t\t\tmonth:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tif (get_value(els, \"month_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_count\")));\r\n\t\t\t\t\tdates.start.setDate(get_value(els, \"month_day\"));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_count2\")));\r\n\t\t\t\t\tcode.push( get_value(els, \"month_day2\"));\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_week2\")));\r\n\t\t\t\t\tif (!scheduler.config.repeat_precise){\r\n\t\t\t\t\t\tdates.start.setDate(1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tdates._start = true;\r\n\t\t\t},\r\n\t\t\tweek:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"week_count\")));\r\n\t\t\t\tcode.push(\"\");\r\n\t\t\t\tcode.push(\"\");\r\n\t\t\t\tvar t = [];\r\n\r\n\t\t\t\tvar col = get_value(els, \"week_day\", true);\r\n\t\t\t\t//var col = els[\"week_day\"];\r\n\t\t\t\tvar day = dates.start.getDay();\r\n\t\t\t\tvar start_exists = false;\r\n\r\n\t\t\t\tfor (var i = 0; i < col.length; i++){\r\n\t\t\t\t\tt.push(col[i]);\r\n\t\t\t\t\tstart_exists = start_exists || col[i] == day;\r\n\t\t\t\t}\r\n\t\t\t\tif (!t.length){\r\n\t\t\t\t\tt.push(day);\r\n\t\t\t\t\tstart_exists = true;\r\n\t\t\t\t}\r\n\t\t\t\tt.sort();\r\n\r\n\r\n\t\t\t\tif (!scheduler.config.repeat_precise){\r\n\t\t\t\t\tdates.start = scheduler.date.week_start(dates.start);\r\n\t\t\t\t\tdates._start = true;\r\n\t\t\t\t} else if (!start_exists){\r\n\t\t\t\t\tscheduler.transpose_day_week(dates.start, t, 1, 7);\r\n\t\t\t\t\tdates._start = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcode.push(t.join(\",\"));\r\n\t\t\t},\r\n\t\t\tday:function(code) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tif (get_value(els, \"day_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"day_count\")));\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcode.push(\"week\");\r\n\t\t\t\t\tcode.push(1);\r\n\t\t\t\t\tcode.push(\"\");\r\n\t\t\t\t\tcode.push(\"\");\r\n\t\t\t\t\tcode.push(scheduler.config.recurring_workdays.join(\",\"));\r\n\t\t\t\t\tcode.splice(0, 1);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tyear:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\r\n\t\t\t\tif (get_value(els, \"year_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(\"1\");\r\n\t\t\t\t\tdates.start.setMonth(0);\r\n\t\t\t\t\tdates.start.setDate(get_value(els, \"year_day\"));\r\n\t\t\t\t\tdates.start.setMonth(get_value(els, \"year_month\"));\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcode.push(\"1\");\r\n\t\t\t\t\tcode.push(get_value(els, \"year_day2\"));\r\n\t\t\t\t\tcode.push(get_value(els, \"year_week2\"));\r\n\t\t\t\t\tdates.start.setDate(1);\r\n\t\t\t\t\tdates.start.setMonth(get_value(els, \"year_month2\"));\r\n\t\t\t\t}\r\n\t\t\t\tdates._start = true;\r\n\t\t\t}\r\n\t\t};\r\n\t\tvar set_rcode = {\r\n\t\t\tweek:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\t\tset_value(els, \"week_count\", code[1]);\r\n\r\n\t\t\t\tvar t = code[4].split(\",\");\r\n\t\t\t\tvar d = {};\r\n\t\t\t\tfor (var i = 0; i < t.length; i++) d[t[i]] = true;\r\n\r\n\t\t\t\tset_value(els, \"week_day\", d);\r\n\r\n\t\t\t\t//for (var i = 0; i < col.length; i++)\r\n\t\t\t\t//\tcol[i].checked = (!!d[col[i].value]);\r\n\t\t\t},\r\n\t\t\tmonth:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\r\n\t\t\t\tif (code[2] === \"\") {\r\n\t\t\t\t\tset_value(els, \"month_type\", \"d\");\r\n\t\t\t\t\tset_value(els, \"month_count\", code[1]);\r\n\t\t\t\t\tset_value(els, \"month_day\", dates.start.getDate());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tset_value(els, \"month_type\", \"w\");\r\n\t\t\t\t\tset_value(els, \"month_count2\", code[1]);\r\n\t\t\t\t\tset_value(els, \"month_week2\", code[3]);\r\n\t\t\t\t\tset_value(els, \"month_day2\", code[2]);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tday:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\t\tset_value(els, \"day_type\", \"d\");\r\n\t\t\t\tset_value(els, \"day_count\", code[1]);\r\n\t\t\t},\r\n\t\t\tyear:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\r\n\t\t\t\tif (code[2] === \"\") {\r\n\t\t\t\t\tset_value(els, \"year_type\", \"d\");\r\n\t\t\t\t\tset_value(els, \"year_day\", dates.start.getDate());\r\n\t\t\t\t\tset_value(els, \"year_month\", dates.start.getMonth());\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tset_value(els, \"year_type\", \"w\");\r\n\t\t\t\t\tset_value(els, \"year_week2\", code[3]);\r\n\t\t\t\t\tset_value(els, \"year_day2\", code[2]);\r\n\t\t\t\t\tset_value(els, \"year_month2\", dates.start.getMonth());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfunction set_repeat_code(code, dates) {\r\n\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\tvar data = code.split(\"#\");\r\n\t\t\tcode = data[0].split(\"_\");\r\n\t\t\tset_rcode[code[0]](code, dates);\r\n\r\n\t\t\tswitch (data[1]) {\r\n\t\t\t\tcase \"no\":\r\n\t\t\t\t\tset_end_rule(els, \"no\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"\":\r\n\t\t\t\t\tset_end_rule(els, \"date_of_end\");\r\n\r\n\t\t\t\t\tvar end_date = dates.end;\r\n\t\t\t\t\tif (scheduler.config.include_end_by){\r\n\t\t\t\t\t\tend_date = scheduler.date.add(end_date, -1, 'day');\r\n\t\t\t\t\t}\r\n\t\t\t\t\tset_value(els, \"date_of_end\", date_str(end_date));\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tset_end_rule(els, \"occurences_count\");\r\n\t\t\t\t\tset_value(els, \"occurences_count\", data[1]);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tset_value(els, \"repeat\", code[0]);\r\n\t\t\t//e.checked = true;\r\n\r\n\t\t\tvar node = scheduler.form_blocks[\"recurring\"]._get_form_node(els, \"repeat\", code[0]);\r\n\t\t\tif(node.nodeName == \"SELECT\"/* && node.onchange*/){\r\n\t\t\t//\tnode.onchange();\r\n\t\t\t\tnode.dispatchEvent(new Event('change'));\r\n\t\t\t\tnode.dispatchEvent(new MouseEvent('click'));\r\n\t\t\t}else{\r\n\t\t\t\tnode.dispatchEvent(new MouseEvent('click'));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tscheduler.form_blocks[\"recurring\"]._set_repeat_code = set_repeat_code;\r\n\r\n\t\tfor (var i = 0; i < top.elements.length; i++) {\r\n\t\t\tvar el = top.elements[i];\r\n\t\t\tswitch (el.name) {\r\n\t\t\t\tcase \"repeat\":\r\n\t\t\t\t\tif (el.nodeName == \"SELECT\" && !el.$_eventAttached) {\r\n\t\t\t\t\t\tel.$_eventAttached = true;\r\n\t\t\t\t\t\tel.addEventListener(\"change\", change_current_view);\r\n\t\t\t\t\t} else if(!el.$_eventAttached){\r\n\t\t\t\t\t\tel.$_eventAttached = true;\r\n\t\t\t\t\t\tel.addEventListener(\"click\", change_current_view);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._lightbox._rec_init_done = true;\r\n\t},\r\n\tset_value:function(node, value, ev) {\r\n\t\tvar rf = scheduler.form_blocks[\"recurring\"];\r\n\t\tif (!scheduler._lightbox._rec_init_done)\r\n\t\t\trf._init_set_value(node, value, ev);\r\n\t\tnode.open = !ev.rec_type;\r\n\r\n\t\tnode.blocked = this._is_modified_occurence(ev);\r\n\r\n\t\tvar ds = rf._ds;\r\n\t\tds.start = ev.start_date;\r\n\t\tds.end = ev._end_date;\r\n\r\n\t\trf._toggle_block();\r\n\r\n\t\tif (value)\r\n\t\t\trf._set_repeat_code(value, ds);\r\n\t},\r\n\tget_value:function(node, ev) {\r\n\t\tif (node.open) {\r\n\t\t\tvar ds = scheduler.form_blocks[\"recurring\"]._ds;\r\n\t\t\tvar actual_dates = {};\r\n\r\n\t\t\tvar timeControl = getTimeSection();\r\n\r\n\t\t\ttimeControl.getValue(actual_dates);\r\n\t\t\tds.start = actual_dates.start_date;\r\n\t\t\tev.rec_type = scheduler.form_blocks[\"recurring\"]._get_repeat_code(ds);\r\n\t\t\tif (ds._start) {\r\n\t\t\t\tev.start_date = new Date(ds.start);\r\n\t\t\t\tev._start_date = new Date(ds.start);\r\n\t\t\t\tds._start = false;\r\n\t\t\t} else\r\n\t\t\t\tev._start_date = null;\r\n\r\n\t\t\tev._end_date = ds.end;\r\n\t\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\t\t} else {\r\n\t\t\tev.rec_type = ev.rec_pattern = \"\";\r\n\t\t\tev._end_date = ev.end_date;\r\n\t\t}\r\n\t\treturn ev.rec_type;\r\n\t},\r\n\t_get_button: function(){\r\n\t\tvar node = getRecurringSection().header;\r\n\t\treturn node.firstChild.firstChild;\r\n\t},\r\n\t_get_form: function(){\r\n\t\treturn getRecurringSection().node;\r\n\t},\r\n\topen:function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form();\r\n\t\tif(!cont.open)\r\n\t\t\tblock._toggle_block();\r\n\t},\r\n\tclose: function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form();\r\n\r\n\t\tif(cont.open)\r\n\t\t\tblock._toggle_block();\r\n\t},\r\n\t_toggle_block: function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form(),\r\n\t\t\tel = block._get_button();\r\n\t\tif (!cont.open && !cont.blocked) {\r\n\t\t\tcont.style.height = \"auto\";//reset to default value\r\n\t\t\tif(el){\r\n\t\t\t\tel.style.backgroundPosition = \"-5px 0px\";\r\n\t\t\t\tel.nextSibling.innerHTML = scheduler.locale.labels.button_recurring_open;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tcont.style.height = \"0px\";\r\n\t\t\tif(el){\r\n\t\t\t\tel.style.backgroundPosition = \"-5px 20px\";\r\n\t\t\t\tel.nextSibling.innerHTML = scheduler.locale.labels.button_recurring;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcont.open = !cont.open;\r\n\r\n\t\tscheduler.setLightboxSize();\r\n\t},\r\n\tfocus:function(node) {\r\n\t},\r\n\tbutton_click:function(node, button, event) {\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\t\tvar cont = block._get_form();\r\n\t\tif (!cont.blocked)\r\n\t\t\tscheduler.form_blocks.recurring._toggle_block();\r\n\t}\r\n};\r\n\r\nfunction getTimeSection(){\r\n\tvar timeControl = scheduler.formSection('time');\r\n\tif(!timeControl){\r\n\t\ttimeControl = getFirstSectionOfType('time');\r\n\t}\r\n\tif(!timeControl){\r\n\t\ttimeControl = getFirstSectionOfType('calendar_time');\r\n\t}\r\n\r\n\t\r\n\tif (!timeControl) {\r\n\t\tthrow new Error([\"Can't calculate the recurring rule, the Recurring form block can't find the Time control. Make sure you have the time control in 'scheduler.config.lightbox.sections' config.\",\r\n\"You can use either the default time control https://docs.dhtmlx.com/scheduler/time.html, or the datepicker https://docs.dhtmlx.com/scheduler/minicalendar.html, or a custom control. \",\r\n\"In the latter case, make sure the control is named \\\"time\\\":\",\r\n\"\",\r\n\"scheduler.config.lightbox.sections = [\",\r\n\"{name:\\\"time\\\", height:72, type:\\\"YOU CONTROL\\\", map_to:\\\"auto\\\" }];\"]\r\n.join(\"\\n\"));\r\n\t}\r\n\r\n\treturn timeControl;\r\n}\r\n\r\nfunction getRecurringSection(){\r\n\tvar recurringSection = scheduler.formSection('recurring');\r\n\tif(!recurringSection){\r\n\t\trecurringSection = getFirstSectionOfType('recurring');\r\n\t}\r\n\r\n\tif (!recurringSection) {\r\n\t\tthrow new Error([\"Can't locate the Recurring form section.\",\r\n\t\t\"Make sure that you have the recurring control on the lightbox configuration https://docs.dhtmlx.com/scheduler/recurring_events.html#recurringlightbox \",\r\n\t\t\"and that the recurring control has name \\\"recurring\\\":\",\r\n\"\",\r\n\"scheduler.config.lightbox.sections = [\",\r\n\"\t{name:\\\"recurring\\\", ... }\",\r\n\"];\"].join(\"\\n\"));\r\n\r\n\t}\r\n\r\n\treturn recurringSection;\r\n}\r\n\r\nfunction getFirstSectionOfType(type){\r\n\tfor(var i = 0; i < scheduler.config.lightbox.sections.length; i++){\r\n\t\tvar section = scheduler.config.lightbox.sections[i];\r\n\t\tif(section.type === type){\r\n\t\t\treturn scheduler.formSection(section.name);\r\n\t\t}\r\n\t}\r\n\treturn null;\r\n}\r\n\r\n//problem may occur if we will have two repeating events in the same moment of time\r\nscheduler._rec_markers = {};\r\nscheduler._rec_markers_pull = {};\r\nscheduler._add_rec_marker = function(ev, time) {\r\n\tev._pid_time = time;\r\n\tthis._rec_markers[ev.id] = ev;\r\n\tif (!this._rec_markers_pull[ev.event_pid]) this._rec_markers_pull[ev.event_pid] = {};\r\n\tthis._rec_markers_pull[ev.event_pid][time] = ev;\r\n};\r\nscheduler._get_rec_marker = function(time, id) {\r\n\tvar ch = this._rec_markers_pull[id];\r\n\tif (ch) return ch[time];\r\n\treturn null;\r\n};\r\nscheduler._get_rec_markers = function(id) {\r\n\treturn (this._rec_markers_pull[id] || []);\r\n};\r\n\r\nfunction clearMilliseconds(date){\r\n//\treturn date;\r\n\treturn new Date(\r\n\t\tdate.getFullYear(), \r\n\t\tdate.getMonth(), \r\n\t\tdate.getDate(), \r\n\t\tdate.getHours(), \r\n\t\tdate.getMinutes(),\r\n\t\tdate.getSeconds(),\r\n\t\t0\r\n\t);\r\n}\r\n\r\nscheduler._rec_temp = [];\r\n(function() {\r\n\tvar old_add_event = scheduler.addEvent;\r\n\tscheduler.addEvent = function(start_date, end_date, text, id, extra_data) {\r\n\t\tvar ev_id = old_add_event.apply(this, arguments);\r\n\r\n\t\tif (ev_id && scheduler.getEvent(ev_id)) {\r\n\t\t\tvar ev = scheduler.getEvent(ev_id);\r\n\t\t\t\r\n\t\t\tif(ev.start_date){\r\n\t\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t\t}\r\n\t\t\tif(ev.end_date){\r\n\t\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t\t}\r\n\t\t\tif (this._is_modified_occurence(ev))\r\n\t\t\t\tscheduler._add_rec_marker(ev, ev.event_length * 1000);\r\n\t\t\tif (ev.rec_type)\r\n\t\t\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\t\t}\r\n\t\treturn ev_id;\r\n\t};\r\n})();\r\n\r\nscheduler.attachEvent(\"onEventIdChange\", function(id, new_id) {\r\n\tif (this._ignore_call) return;\r\n\tthis._ignore_call = true;\r\n\r\n\tif(scheduler._rec_markers[id]){\r\n\t\t//important for for correct work of scheduler.getEvents(from, to) and collision detection\r\n\t\tscheduler._rec_markers[new_id] = scheduler._rec_markers[id];\r\n\t\tdelete scheduler._rec_markers[id];\r\n\t}\r\n\r\n\tif(scheduler._rec_markers_pull[id]){\r\n\t\tscheduler._rec_markers_pull[new_id] = scheduler._rec_markers_pull[id];\r\n\t\tdelete scheduler._rec_markers_pull[id];\r\n\t}\r\n\r\n\tfor (var i = 0; i < this._rec_temp.length; i++) {\r\n\t\tvar tev = this._rec_temp[i];\r\n\t\tif (tev.event_pid == id) {\r\n\t\t\ttev.event_pid = new_id;\r\n\t\t\tthis.changeEventId(tev.id, new_id + \"#\" + tev.id.split(\"#\")[1]);\r\n\t\t}\r\n\t}\r\n\r\n\tfor(var i in this._rec_markers){\r\n\t\tvar tev = this._rec_markers[i];\r\n\t\tif(tev.event_pid == id){\r\n\t\t\ttev.event_pid = new_id;\r\n\t\t\ttev._pid_changed = true;\r\n\t\t}\r\n\t}\r\n\r\n\tvar el = scheduler._rec_markers[new_id];\r\n\tif(el && el._pid_changed) {\r\n\t\tdelete el._pid_changed;\r\n\t\tsetTimeout(function() {\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler.callEvent(\"onEventChanged\", [new_id, scheduler.getEvent(new_id)]);\r\n\t\t}, 1);\r\n\t}\r\n\r\n\tdelete this._ignore_call;\r\n});\r\nscheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (this._is_virtual_event(id) || (this._is_modified_occurence(ev) && ev.rec_type && ev.rec_type != 'none')) {\r\n\t\tid = id.split(\"#\");\r\n\t\tvar nid = this.uid();\r\n\t\tvar tid = (id[1]) ? id[1] : Math.round(ev._pid_time / 1000);\r\n\r\n\t\tvar nev = this._copy_event(ev);\r\n\t\tnev.id = nid;\r\n\t\tnev.event_pid = ev.event_pid || id[0];\r\n\t\tvar timestamp = tid;\r\n\t\tnev.event_length = timestamp;\r\n\t\tnev.rec_type = nev.rec_pattern = \"none\";\r\n\t\tthis.addEvent(nev);\r\n\r\n\t\tthis._add_rec_marker(nev, timestamp * 1000);\r\n\t} else {\r\n\t\tif (ev.rec_type && this._lightbox_id)\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\tvar sub = this._get_rec_markers(id);\r\n\t\tfor (var i in sub) {\r\n\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\tid = sub[i].id;\r\n\t\t\t\tif (this.getEvent(id))\r\n\t\t\t\t\tthis.deleteEvent(id, true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventDeleted\", function(id, ev){\r\n\tif(!this._is_virtual_event(id) && this._is_modified_occurence(ev)){\r\n\t\tif(!scheduler._events[id]){\r\n\t\t\tev.rec_type = ev.rec_pattern = \"none\";\r\n\t\t\tthis.setEvent(id, ev);\r\n\t\t}\r\n\t}\r\n});\r\nscheduler.attachEvent(\"onEventChanged\", function(id, event) {\r\n\tif (this._loading) return true;\r\n\r\n\tvar ev = this.getEvent(id);\r\n\r\n\tif (this._is_virtual_event(id)) {\r\n\t\tvar id = id.split(\"#\");\r\n\t\tvar nid = this.uid();\r\n\t\tthis._not_render = true;\r\n\r\n\t\tvar nev = this._copy_event(event);\r\n\t\tnev.id = nid;\r\n\t\tnev.event_pid = id[0];\r\n\t\tvar timestamp = id[1];\r\n\t\tnev.event_length = timestamp;\r\n\t\tnev.rec_type = nev.rec_pattern = \"\";\r\n\r\n\t\tthis._add_rec_marker(nev, timestamp * 1000);\r\n\t\tthis.addEvent(nev);\r\n\r\n\t\tthis._not_render = false;\r\n\r\n\t} else {\r\n\t\tif(ev.start_date){\r\n\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t}\r\n\t\tif(ev.end_date){\r\n\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t}\r\n\r\n\t\tif (ev.rec_type && this._lightbox_id){\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t}\r\n\t\tvar sub = this._get_rec_markers(id);\r\n\t\tfor (var i in sub) {\r\n\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\tdelete this._rec_markers[sub[i].id];\r\n\t\t\t\tthis.deleteEvent(sub[i].id, true);\r\n\t\t\t}\r\n\t\t}\r\n\t\tdelete this._rec_markers_pull[id];\r\n\r\n\t\t// it's possible that after editing event is no longer exists, in such case we need to remove _select_id flag\r\n\t\tvar isEventFound = false;\r\n\t\tfor (var k = 0; k < this._rendered.length; k++) {\r\n\t\t\tif (this._rendered[k].getAttribute(this.config.event_attribute) == id)\r\n\t\t\t\tisEventFound = true;\r\n\t\t}\r\n\t\tif (!isEventFound)\r\n\t\t\tthis._select_id = null;\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventAdded\", function(id) {\r\n\tif (!this._loading) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (ev.rec_type && !ev.event_length){\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventSave\", function(id, data, is_new_event) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (!ev.rec_type && data.rec_type && !this._is_virtual_event(id))\r\n\t\tthis._select_id = null;\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventCreated\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (!ev.rec_type)\r\n\t\tev.rec_type = ev.rec_pattern = ev.event_length = ev.event_pid = \"\";\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventCancel\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (ev.rec_type) {\r\n\t\tthis._roll_back_dates(ev);\r\n\t\t// a bit expensive, but we need to be sure that event re-rendered, because view can be corrupted by resize , during edit process\r\n\t\tthis.render_view_data();\r\n\t}\r\n});\r\nscheduler._roll_back_dates = function(ev) {\r\n\tif(ev.start_date){\r\n\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t}\r\n\tif(ev.end_date){\r\n\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t}\r\n\tev.event_length = Math.round((ev.end_date.valueOf() - ev.start_date.valueOf()) / 1000);\r\n\tev.end_date = ev._end_date;\r\n\tif (ev._start_date) {\r\n\t\tev.start_date.setMonth(0);\r\n\t\tev.start_date.setDate(ev._start_date.getDate());\r\n\t\tev.start_date.setMonth(ev._start_date.getMonth());\r\n\t\tev.start_date.setFullYear(ev._start_date.getFullYear());\r\n\r\n\t}\r\n};\r\n\r\nscheduler._is_virtual_event = function(id){\r\n\treturn id.toString().indexOf(\"#\") != -1;\r\n};\r\nscheduler._is_modified_occurence = function(ev){\r\n\treturn (ev.event_pid && ev.event_pid != \"0\");\r\n};\r\n\r\nscheduler.showLightbox_rec = scheduler.showLightbox;\r\nscheduler.showLightbox = function(id) {\r\n\tvar locale = this.locale;\r\n\tvar c = scheduler.config.lightbox_recurring;\r\n\tvar ev = this.getEvent(id);\r\n\tvar pid = ev.event_pid;\r\n\tvar isVirtual = this._is_virtual_event(id);\r\n\tif (isVirtual)\r\n\t\tpid = id.split(\"#\")[0];\r\n\r\n\t// show series\r\n\tvar showSeries = function(id) {\r\n\t\tvar event = scheduler.getEvent(id);\r\n\t\tevent._end_date = event.end_date;\r\n\t\tevent.end_date = new Date(event.start_date.valueOf() + event.event_length * 1000);\r\n\t\treturn scheduler.showLightbox_rec(id); // editing series\r\n\t};\r\n\r\n\tif ( (pid || pid*1 === 0) && ev.rec_type) {\r\n\t\t// direct API call on series id\r\n\t\treturn showSeries(id);\r\n\t}\r\n\tif ( !pid || pid === '0' || ( (!locale.labels.confirm_recurring || c == 'instance') || (c == 'series' && !isVirtual)) ) {\r\n\t\t// editing instance or non recurring event\r\n\t\treturn this.showLightbox_rec(id);\r\n\t}\r\n\tif (c == 'ask') {\r\n\t\tvar that = this;\r\n\t\tscheduler.modalbox({\r\n\t\t\ttext: locale.labels.confirm_recurring,\r\n\t\t\ttitle: locale.labels.title_confirm_recurring,\r\n\t\t\twidth: \"500px\",\r\n\t\t\tposition: \"middle\",\r\n\t\t\tbuttons:[locale.labels.button_edit_series, locale.labels.button_edit_occurrence, locale.labels.icon_cancel],\r\n\t\t\tcallback: function(index) {\r\n\t\t\t\tswitch(+index) {\r\n\t\t\t\t\tcase 0:\r\n\t\t\t\t\t\treturn showSeries(pid);\r\n\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\treturn that.showLightbox_rec(id);\r\n\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\tshowSeries(pid);\r\n\t}\r\n};\r\n\r\n\r\nscheduler.get_visible_events_rec = scheduler.get_visible_events;\r\nscheduler.get_visible_events = function(only_timed) {\r\n\tfor (var i = 0; i < this._rec_temp.length; i++)\r\n\t\tdelete this._events[this._rec_temp[i].id];\r\n\tthis._rec_temp = [];\r\n\r\n\tvar stack = this.get_visible_events_rec(only_timed);\r\n\tvar out = [];\r\n\tfor (var i = 0; i < stack.length; i++) {\r\n\t\tif (stack[i].rec_type) {\r\n\t\t\t//deleted element of series\r\n\t\t\tif (stack[i].rec_pattern != \"none\")\r\n\t\t\t\tthis.repeat_date(stack[i], out);\r\n\t\t}\r\n\t\telse out.push(stack[i]);\r\n\t}\r\n\treturn out;\r\n};\r\n\r\n\r\n(function() {\r\n\tvar old = scheduler.isOneDayEvent;\r\n\tscheduler.isOneDayEvent = function(ev) {\r\n\t\tif (ev.rec_type) return true;\r\n\t\treturn old.call(this, ev);\r\n\t};\r\n\tvar old_update_event = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id) {\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif(ev && ev.rec_type){\r\n\t\t\t//rec_type can be changed without the lightbox,\r\n\t\t\t// make sure rec_pattern updated as well\r\n\t\t\tev.rec_pattern = (ev.rec_type || \"\").split(\"#\")[0];\r\n\t\t}\r\n\t\tif (ev && ev.rec_type && !this._is_virtual_event(id)) {\r\n\t\t\tscheduler.update_view();\r\n\t\t} else {\r\n\t\t\told_update_event.call(this, id);\r\n\t\t}\r\n\t};\r\n})();\r\n\r\nscheduler.transponse_size = {\r\n\tday:1, week:7, month:1, year:12\r\n};\r\nscheduler.date.day_week = function(sd, day, week) {\r\n\tsd.setDate(1);\r\n\tvar originalMonth = scheduler.date.month_start(new Date(sd));\r\n\tweek = (week - 1) * 7;\r\n\tvar cday = sd.getDay();\r\n\tvar nday = day * 1 + week - cday + 1;\r\n\tsd.setDate(nday <= week ? (nday + 7) : nday);\r\n\tvar newMonth = scheduler.date.month_start(new Date(sd));\r\n\tif(originalMonth.valueOf() !== newMonth.valueOf()){\r\n\t\treturn false;\r\n\t}\r\n\treturn true;\r\n};\r\nscheduler.transpose_day_week = function(sd, list, cor, size, cor2) {\r\n\tvar cday = (sd.getDay() || (scheduler.config.start_on_monday ? 7 : 0)) - cor;\r\n\tfor (var i = 0; i < list.length; i++) {\r\n\t\tif (list[i] > cday)\r\n\t\t\treturn sd.setDate(sd.getDate() + list[i] * 1 - cday - (size ? cor : cor2));\r\n\t}\r\n\tthis.transpose_day_week(sd, list, cor + size, null, cor);\r\n};\r\nscheduler.transpose_type = function(type) {\r\n\tvar transposeRecurring = \"transpose_\" + type;\r\n\tif (!this.date[transposeRecurring]) {\r\n\t\tvar recurringParts = type.split(\"_\");\r\n\t\tvar dayDurationMs = 60 * 60 * 24 * 1000;\r\n\t\tvar addRecurring = \"add_\" + type;\r\n\t\tvar recurringStepDays = this.transponse_size[recurringParts[0]] * recurringParts[1];\r\n\r\n\t\tif (recurringParts[0] == \"day\" || recurringParts[0] == \"week\") {\r\n\t\t\tvar weekDays = null;\r\n\t\t\tif (recurringParts[4]) {\r\n\t\t\t\tweekDays = recurringParts[4].split(\",\");\r\n\t\t\t\tif (scheduler.config.start_on_monday) {\r\n\t\t\t\t\tfor (var i = 0; i < weekDays.length; i++)\r\n\t\t\t\t\t\tweekDays[i] = (weekDays[i] * 1) || 7;\r\n\t\t\t\t\tweekDays.sort();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.date[transposeRecurring] = function(nd, td) {\r\n\t\t\t\tvar delta = Math.floor((td.valueOf() - nd.valueOf()) / (dayDurationMs * recurringStepDays));\r\n\t\t\t\tif (delta > 0)\r\n\t\t\t\t\tnd.setDate(nd.getDate() + delta * recurringStepDays);\r\n\t\t\t\tif (weekDays)\r\n\t\t\t\t\tscheduler.transpose_day_week(nd, weekDays, 1, recurringStepDays);\r\n\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t\tthis.date[addRecurring] = function(sd, inc) {\r\n\t\t\t\tvar nd = new Date(sd.valueOf());\r\n\t\t\t\tif (weekDays) {\r\n\t\t\t\t\tfor (var count = 0; count < inc; count++)\r\n\t\t\t\t\t\tscheduler.transpose_day_week(nd, weekDays, 0, recurringStepDays);\r\n\t\t\t\t} else\r\n\t\t\t\t\tnd.setDate(nd.getDate() + inc * recurringStepDays);\r\n\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t}\r\n\t\telse if (recurringParts[0] == \"month\" || recurringParts[0] == \"year\") {\r\n\t\t\tthis.date[transposeRecurring] = function(nd, td, seriesInstance) {\r\n\t\t\t\tvar delta = Math.ceil(((td.getFullYear() * 12 + td.getMonth() * 1 + 1) - (nd.getFullYear() * 12 + nd.getMonth() * 1 + 1)) / (recurringStepDays) - 1);\r\n\r\n\t\t\t\tif (delta >= 0){\r\n\t\t\t\t\tnd.setDate(1);\r\n\t\t\t\t\tnd.setMonth(nd.getMonth() + delta * recurringStepDays);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn scheduler.date[addRecurring](nd, 0, seriesInstance);\r\n\t\t\t\t//if (str[3]){\r\n\t\t\t\t//\tscheduler.date.day_week(nd, str[2], str[3]);\r\n\t\t\t\t//}\r\n\t\t\t};\r\n\t\t\tthis.date[addRecurring] = function(sd, inc, seriesInstance, currentCount) {\r\n\t\t\t\tif(!currentCount){\r\n\t\t\t\t\tcurrentCount = 1;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcurrentCount++;\r\n\t\t\t\t}\r\n\t\t\t\tvar maxCount = 12;\r\n\t\t\t\tif(currentCount > maxCount){\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar nd = new Date(sd.valueOf());\r\n\t\t\t\tnd.setDate(1);\r\n\r\n\r\n\t\t\t\tnd.setMonth(nd.getMonth() + inc * recurringStepDays);\r\n\t\t\t\tvar origMonth = nd.getMonth();\r\n\t\t\t\tvar origYear = nd.getFullYear();\r\n\t\t\t\tnd.setDate(seriesInstance.start_date.getDate());\r\n\t\t\t\tif (recurringParts[3]){\r\n\t\t\t\t\tscheduler.date.day_week(nd, recurringParts[2], recurringParts[3]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar correctOverflowInstances = scheduler.config.recurring_overflow_instances;\r\n\t\t\t\tif(nd.getMonth() != origMonth && correctOverflowInstances != \"none\"){\r\n\t\t\t\t\t// no such day in a month\r\n\t\t\t\t\tif(correctOverflowInstances === \"lastDay\"){\r\n\t\t\t\t\t\t// return either last day of the month\r\n\t\t\t\t\t\tnd = new Date(origYear, origMonth + 1, 0, nd.getHours(), nd.getMinutes(), nd.getSeconds(), nd.getMilliseconds());\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t// or go to the next instance\r\n\t\t\t\t\t\tnd = scheduler.date[addRecurring](new Date(origYear, origMonth + 1, 0), inc||1, seriesInstance, currentCount);\r\n\t\t\t\t\t\t// if next instance is not possible (e.g. 'repeat on 40th day of the month') null will be returned\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.repeat_date = function(ev, stack, non_render, from, to, maxCount) {\r\n\r\n\tfrom = from || this._min_date;\r\n\tto = to || this._max_date;\r\n\tvar max = maxCount || -1;\r\n\tvar td = new Date(ev.start_date.valueOf());\r\n\r\n\tvar startHour = td.getHours();\r\n\r\n\tvar visibleCount = 0;\r\n\r\n\tif (!ev.rec_pattern && ev.rec_type)\r\n\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\r\n\tthis.transpose_type(ev.rec_pattern);\r\n\ttd = scheduler.date[\"transpose_\" + ev.rec_pattern](td, from, ev);\r\n\twhile ( td && (\r\n\t\ttd < ev.start_date ||\r\n\t\tscheduler._fix_daylight_saving_date(td,from,ev,td,new Date(td.valueOf() + ev.event_length * 1000)).valueOf() <= from.valueOf() ||\r\n\t\ttd.valueOf() + ev.event_length * 1000 <= from.valueOf())){\r\n\t\t\ttd = this.date[\"add_\" + ev.rec_pattern](td, 1, ev);\r\n\r\n\t}\r\n\twhile (td && (td < to && td < ev.end_date && (max < 0 || visibleCount < max))) {\r\n\t\ttd.setHours(startHour);\r\n\r\n\t\tvar timestamp = (scheduler.config.occurrence_timestamp_in_utc) ? Date.UTC(td.getFullYear(), td.getMonth(), td.getDate(), td.getHours(), td.getMinutes(), td.getSeconds()) : td.valueOf();\r\n\t\tvar ch = this._get_rec_marker(timestamp, ev.id);\r\n\t\tif (!ch) { // unmodified element of series\r\n\t\t\tvar ted = new Date(td.valueOf() + ev.event_length * 1000);\r\n\t\t\tvar copy = this._copy_event(ev);\r\n\t\t\t//copy._timed = ev._timed;\r\n\t\t\tcopy.text = ev.text;\r\n\t\t\tcopy.start_date = td;\r\n\t\t\tcopy.event_pid = ev.id;\r\n\t\t\tcopy.id = ev.id + \"#\" + Math.round(timestamp / 1000);\r\n\t\t\tcopy.end_date = ted;\r\n\r\n\t\t\tcopy.end_date = scheduler._fix_daylight_saving_date(copy.start_date, copy.end_date, ev, td, copy.end_date);\r\n\r\n\t\t\tcopy._timed = this.isOneDayEvent(copy);\r\n\r\n\t\t\tif (!copy._timed && !this._table_view && !this.config.multi_day) return;\r\n\t\t\tstack.push(copy);\r\n\r\n\t\t\tif (!non_render) {\r\n\t\t\t\tthis._events[copy.id] = copy;\r\n\t\t\t\tthis._rec_temp.push(copy);\r\n\t\t\t}\r\n\r\n\t\t\tvisibleCount++;\r\n\r\n\t\t} else\r\n\t\tif (non_render){\r\n\t\t\tif(ch.rec_type != \"none\"){\r\n\t\t\t\tvisibleCount++;\r\n\t\t\t}\r\n\t\t\tstack.push(ch);\r\n\t\t}\r\n\r\n\t\ttd = this.date[\"add_\" + ev.rec_pattern](td, 1, ev);\r\n\t//\tif(!scheduler.date[\"validate_add_\" + ev.rec_pattern](td, 1, ev.rec_pattern)){\r\n\t///\t\talert(\"detect add\")\r\n\t//\t}\r\n\t}\r\n};\r\nscheduler._fix_daylight_saving_date = function(start_date, end_date, ev, counter, default_date) {\r\n\tvar shift = start_date.getTimezoneOffset() - end_date.getTimezoneOffset();\r\n\tif (shift) {\r\n\t\tif (shift > 0) {\r\n\t\t\t// e.g. 24h -> 23h\r\n\t\t\treturn new Date(counter.valueOf() + ev.event_length * 1000 - shift * 60 * 1000);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// e.g. 24h -> 25h\r\n\t\t\treturn new Date(end_date.valueOf() - shift * 60 * 1000);\r\n\t\t}\r\n\t}\r\n\treturn new Date(default_date.valueOf());\r\n};\r\nscheduler.getRecDates = function(id, max) {\r\n\tvar ev = typeof id == \"object\" ? id : scheduler.getEvent(id);\r\n\tvar recurrings = [];\r\n\tmax = max || 100;\r\n\r\n\tif (!ev.rec_type) {\r\n\t\treturn [\r\n\t\t\t{ start_date: ev.start_date, end_date: ev.end_date }\r\n\t\t];\r\n\t}\r\n\tif (ev.rec_type == \"none\") {\r\n\t\treturn [];\r\n\t}\r\n\r\n\tscheduler.repeat_date(ev, recurrings, true, ev.start_date, ev.end_date, max);\r\n\r\n\tvar result = [];\r\n\tfor(var i = 0; i < recurrings.length; i++){\r\n\t\tif(recurrings[i].rec_type != \"none\"){\r\n\t\t\tresult.push({start_date: recurrings[i].start_date, end_date: recurrings[i].end_date});\r\n\t\t}\r\n\t}\r\n\r\n\treturn result;\r\n};\r\nscheduler.getEvents = function(from, to) {\r\n\tvar result = [];\r\n\tfor (var a in this._events) {\r\n\t\tvar ev = this._events[a];\r\n\t\tif (ev && ev.start_date < to && ev.end_date > from) {\r\n\t\t\tif (ev.rec_pattern) {\r\n\t\t\t\tif (ev.rec_pattern == \"none\") continue;\r\n\t\t\t\tvar sev = [];\r\n\t\t\t\tthis.repeat_date(ev, sev, true, from, to);\r\n\t\t\t\tfor (var i = 0; i < sev.length; i++) {\r\n\t\t\t\t\t// if event is in rec_markers then it will be checked by himself, here need to skip it\r\n\t\t\t\t\tif (!sev[i].rec_pattern && sev[i].start_date < to && sev[i].end_date > from && !this._rec_markers[sev[i].id]) {\r\n\t\t\t\t\t\tresult.push(sev[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if (!this._is_virtual_event(ev.id)) { // if it's virtual event we can skip it\r\n\t\t\t\tresult.push(ev);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n};\r\n\r\nscheduler.config.repeat_date = \"%m.%d.%Y\";\r\nscheduler.config.lightbox.sections = [\r\n\t{name:\"description\", map_to:\"text\", type:\"textarea\" , focus:true},\r\n\t{name:\"recurring\", type:\"recurring\", map_to:\"rec_type\", button:\"recurring\"},\r\n\t{name:\"time\", height:72, type:\"time\", map_to:\"auto\"}\r\n];\r\n\r\n\r\n//drop secondary attributes\r\nscheduler._copy_dummy = function(ev) {\r\n\tvar start_date = new Date(this.start_date);\r\n\tvar end_date = new Date(this.end_date);\r\n\tthis.start_date = start_date;\r\n\tthis.end_date = end_date;\r\n\tthis.event_length = this.event_pid = this.rec_pattern = this.rec_type = null;\r\n};\r\n\r\nscheduler.config.include_end_by = false;\r\nscheduler.config.lightbox_recurring = 'ask'; // series, instance\r\n\r\nscheduler.attachEvent(\"onClearAll\", function(){\r\n\tscheduler._rec_markers = {}; //clear recurring events data\r\n\tscheduler._rec_markers_pull = {};\r\n\tscheduler._rec_temp = [];\r\n});\r\n\r\n}","import getSerializator from '../core/common/get_serializable_events';\r\nexport default function(scheduler){\r\n\r\n\t\r\nconst getSerializableData = getSerializator(scheduler);\r\n\r\n//redefine this method, if you want to provide a custom set of attributes for serialization\r\nscheduler.data_attributes=function(){\r\n\tvar attrs = [];\r\n\tvar format = scheduler._helpers.formatDate;\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\t\tfor (var name in ev)\r\n\t\t\tif (name.substr(0,1) !=\"_\")\r\n\t\t\t\tattrs.push([name,((name == \"start_date\" || name == \"end_date\")?format:null)]);\r\n\t\tbreak;\r\n\t}\r\n\treturn attrs;\r\n};\r\n\r\nscheduler.toXML = function(header){\r\n\tvar xml = [];\r\n\tvar attrs = this.data_attributes();\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\r\n\t\txml.push(\"\");\r\n\t\tfor (var i=0; i < attrs.length; i++)\r\n\t\t\txml.push(\"<\"+attrs[i][0]+\">\");\r\n\r\n\t\txml.push(\"\");\r\n\t}\r\n\treturn (header||\"\")+\"\"+xml.join(\"\\n\")+\"\";\r\n};\r\n\r\nscheduler._serialize_json_value = function(value){\r\n\tif(value === null || typeof value === \"boolean\"){\r\n\t\tvalue = \"\" + value;\r\n\t}else{\r\n\t\tif(!value && value !== 0){\r\n\t\t\tvalue = \"\";\r\n\t\t}\r\n\t\tvalue = '\"' + value.toString().\r\n\t\t\treplace(/\\n/g,\"\").\r\n\t\t\treplace(/\\\\/g,\"\\\\\\\\\").\r\n\t\t\treplace(/\"/g, '\\\\\"') + '\"';\r\n\t}\r\n\treturn value;\r\n};\r\n\r\n\r\n\r\nscheduler.toJSON = function(){\r\n\treturn JSON.stringify(this.serialize());\r\n};\r\n\r\n\r\nscheduler.toICal = function(header){\r\n\tvar start = \"BEGIN:VCALENDAR\\nVERSION:2.0\\nPRODID:-//dhtmlXScheduler//NONSGML v2.2//EN\\nDESCRIPTION:\";\r\n\tvar end = \"END:VCALENDAR\";\r\n\tvar format = scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\");\r\n\tvar full_day_format = scheduler.date.date_to_str(\"%Y%m%d\");\r\n\r\n\tvar ical = [];\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\r\n\r\n\t\tical.push(\"BEGIN:VEVENT\");\r\n\t\tif (!ev._timed || (!ev.start_date.getHours() && !ev.start_date.getMinutes()))\r\n\t\t\tical.push(\"DTSTART:\"+full_day_format(ev.start_date));\r\n\t\telse\r\n\t\t\tical.push(\"DTSTART:\"+format(ev.start_date));\r\n\t\tif (!ev._timed || (!ev.end_date.getHours() && !ev.end_date.getMinutes()))\r\n\t\t\tical.push(\"DTEND:\"+full_day_format(ev.end_date));\r\n\t\telse\r\n\t\t\tical.push(\"DTEND:\"+format(ev.end_date));\r\n\t\tical.push(\"SUMMARY:\"+ev.text);\r\n\t\tical.push(\"END:VEVENT\");\r\n\t}\r\n\treturn start+(header||\"\")+\"\\n\"+ical.join(\"\\n\")+\"\\n\"+end;\r\n};\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Timeline\", scheduler.assert);\r\n}","interface IViewPosition{\r\n\ttop: number;\r\n\tleft: number;\r\n}\r\n\r\ninterface IViewBox extends IViewPosition{\r\n\twidth: number;\r\n\theight: number;\r\n\tbottom: number;\r\n\tright: number;\r\n}\r\n\r\nexport class Tooltip {\r\n\tprivate _root: HTMLElement;\r\n\tprivate _tooltipNode: HTMLElement | null;\r\n\tprivate _scheduler: any;\r\n\r\n\tconstructor(scheduler: any){\r\n\t\tthis._scheduler = scheduler;\r\n\t}\r\n\r\n\tgetNode() : HTMLElement {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tif (!this._tooltipNode){\r\n\t\t\tthis._tooltipNode = document.createElement(\"div\");\r\n\t\t\tthis._tooltipNode.className = \"dhtmlXTooltip scheduler_tooltip tooltip\";\r\n\r\n\t\t\tscheduler._waiAria.tooltipAttr(this._tooltipNode);\r\n\t\t}\r\n\t\tif(scheduler.config.rtl){\r\n\t\t\tthis._tooltipNode.classList.add(\"dhtmlXTooltip_rtl\");\r\n\t\t} else{\r\n\t\t\tthis._tooltipNode.classList.remove(\"dhtmlXTooltip_rtl\");\r\n\t\t}\r\n\t\treturn this._tooltipNode;\r\n\t}\r\n\r\n\tsetViewport(node: HTMLElement):Tooltip{\r\n\t\tthis._root = node;\r\n\t\treturn this;\r\n\t}\r\n\r\n\tshow(left: number, top: number): Tooltip;\r\n\tshow(event: MouseEvent): Tooltip;\r\n\tshow(left: number | MouseEvent, top?: number): Tooltip {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tconst container = document.body;\r\n\t\tconst node = this.getNode();\r\n\r\n\t\tif(!domHelpers.isChildOf(node, container)){\r\n\t\t\tthis.hide();\r\n\t\t\tcontainer.appendChild(node);\r\n\t\t}\r\n\r\n\t\tif (this._isLikeMouseEvent(left)) {\r\n\t\t\tconst position = this._calculateTooltipPosition(left as MouseEvent);\r\n\t\t\ttop = position.top;\r\n\t\t\tleft = position.left;\r\n\t\t}\r\n\r\n\t\tnode.style.top = top + \"px\";\r\n\t\tnode.style.left = left + \"px\";\r\n\r\n\t\tscheduler._waiAria.tooltipVisibleAttr(node);\r\n\t\treturn this;\r\n\t}\r\n\thide() : Tooltip{\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst node = this.getNode();\r\n\t\tif(node && node.parentNode){\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t}\r\n\t\tscheduler._waiAria.tooltipHiddenAttr(node);\r\n\t\treturn this;\r\n\t}\r\n\r\n\tsetContent(html: string) : Tooltip{\r\n\t\tconst node = this.getNode();\r\n\t\tnode.innerHTML = html;\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// it is for salesforce, because it proxies event to it own events\r\n\tprivate _isLikeMouseEvent(event: any): boolean {\r\n\t\tif (!event || typeof event !== \"object\") {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn \"clientX\" in event && \"clientY\" in event;\r\n\t}\r\n\r\n\tprivate _getViewPort() : HTMLElement {\r\n\t\treturn this._root || document.body;\r\n\t}\r\n\r\n\r\n\tprivate _calculateTooltipPosition(event: MouseEvent): IViewPosition{\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\t// top/left coordinates inside the viewport by mouse position\r\n\t\tconst viewport = this._getViewPortSize();\r\n\t\tconst tooltipNode = this.getNode();\r\n\t\tconst tooltip: IViewBox = {\r\n\t\t\ttop:0,\r\n\t\t\tleft: 0,\r\n\t\t\twidth: tooltipNode.offsetWidth,\r\n\t\t\theight: tooltipNode.offsetHeight,\r\n\t\t\tbottom: 0,\r\n\t\t\tright: 0\r\n\t\t};\r\n\r\n\t\tconst offsetX = scheduler.config.tooltip_offset_x;\r\n\t\tconst offsetY = scheduler.config.tooltip_offset_y;\r\n\r\n\t\tconst container = document.body;\r\n\t\tconst mouse = domHelpers.getRelativeEventPosition(event, container);\r\n\t\tconst containerPos = domHelpers.getNodePosition(container);\r\n\t\tmouse.y += containerPos.y; // to fix margin collapsing\r\n\r\n\t\ttooltip.top = mouse.y;\r\n\t\ttooltip.left = mouse.x;\r\n\t\ttooltip.top += offsetY;\r\n\t\ttooltip.left += offsetX;\r\n\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\ttooltip.right = tooltip.left + tooltip.width;\r\n\r\n\t\tconst scrollTop = window.scrollY + container.scrollTop; // to fix margin collapsing\r\n\t\t// edge cases when the tooltip element can be partially hidden by edges of the viewport\r\n\t\tif(tooltip.top < viewport.top - scrollTop){\r\n\t\t\ttooltip.top = viewport.top;\r\n\t\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\t}else if(tooltip.bottom > viewport.bottom){\r\n\t\t\ttooltip.bottom = viewport.bottom;\r\n\t\t\ttooltip.top = tooltip.bottom - tooltip.height;\r\n\t\t}\r\n\r\n\t\tif(tooltip.left < viewport.left){\r\n\t\t\ttooltip.left = viewport.left;\r\n\t\t\ttooltip.right = viewport.left + tooltip.width;\r\n\t\t}else if(tooltip.right > viewport.right){\r\n\t\t\ttooltip.right = viewport.right;\r\n\t\t\ttooltip.left = tooltip.right - tooltip.width;\r\n\t\t}\r\n\r\n\t\tif(mouse.x >= tooltip.left && mouse.x <= tooltip.right) {\r\n\t\t\ttooltip.left = mouse.x - tooltip.width - offsetX;\r\n\t\t\ttooltip.right = tooltip.left + tooltip.width;\r\n\t\t}\r\n\r\n\t\tif(mouse.y >= tooltip.top && mouse.y <= tooltip.bottom) {\r\n\t\t\ttooltip.top = mouse.y - tooltip.height - offsetY;\r\n\t\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\t}\r\n\r\n\t\treturn tooltip;\r\n\t}\r\n\r\n\tprivate _getViewPortSize() : IViewBox {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tconst container = this._getViewPort();\r\n\t\tlet viewport = container;\r\n\t\tlet scrollTop = window.scrollY + document.body.scrollTop;\r\n\t\tlet scrollLeft = window.scrollX + document.body.scrollLeft;\r\n\t\tlet pos;\r\n\t\t// support for the initial tooltip mode where the tooltip element was attached to the data area of scheduler\r\n\t\tif(container === scheduler.$event_data){\r\n\t\t\tviewport = scheduler.$event;\r\n\t\t\tscrollTop = 0;\r\n\t\t\tscrollLeft = 0;\r\n\t\t\tpos = domHelpers.getNodePosition(scheduler.$event);\r\n\t\t}else{\r\n\t\t\tpos = domHelpers.getNodePosition(viewport);\r\n\t\t}\r\n\t\treturn {\r\n\t\t\tleft:pos.x + scrollLeft,\r\n\t\t\ttop: pos.y + scrollTop,\r\n\t\t\twidth: pos.width,\r\n\t\t\theight: pos.height,\r\n\t\t\tbottom: pos.y + pos.height + scrollTop,\r\n\t\t\tright: pos.x + pos.width + scrollLeft\r\n\t\t};\r\n\t}\r\n}\r\n","import * as utils from \"../../core/utils/utils\";\r\nimport { Tooltip } from \"./tooltip\";\r\n\r\ninterface ITrackerTarget {\r\n\tselector: string;\r\n\tonmouseenter: (event: MouseEvent, node: HTMLElement) => void;\r\n\tonmousemove: (event: MouseEvent, node: HTMLElement) => void;\r\n\tonmouseleave: (event: MouseEvent, node: HTMLElement) => void;\r\n\tglobal: boolean;\r\n}\r\n\r\ninterface ITooltipConfig {\r\n\tselector: string;\r\n\thtml: (event: MouseEvent, node: HTMLElement) => string;\r\n\tglobal: boolean;\r\n}\r\n\r\nexport class TooltipManager{\r\n\ttooltip: Tooltip;\r\n\tprotected _domEvents: any;\r\n\tprivate _listeners: object = {};\r\n\tprivate _scheduler: any;\r\n\tprivate delayShow: any;\r\n\tprivate delayHide: any;\r\n\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.tooltip = new Tooltip(scheduler);\r\n\t\tthis._scheduler = scheduler;\r\n\t\tthis._domEvents = scheduler._createDomEventScope();\r\n\t\tthis._initDelayedFunctions();\r\n\t}\r\n\r\n\tdestructor(): void{\r\n\t\tthis.tooltip.hide();\r\n\t\tthis._domEvents.detachAll();\r\n\t}\r\n\thideTooltip(): void{\r\n\t\tthis.delayHide();\r\n\t}\r\n\tattach(config: ITrackerTarget): void {\r\n\t\tlet root = document.body;\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tif(!config.global){\r\n\t\t\troot = scheduler.$root;\r\n\t\t}\r\n\r\n\t\tlet watchableTarget = null;\r\n\t\tconst handler = (event) => {\r\n\t\t\tconst eventTarget = domHelpers.getTargetNode(event);\r\n\t\t\tconst targetNode = domHelpers.closest(eventTarget, config.selector);\r\n\t\t\tif(domHelpers.isChildOf(eventTarget, this.tooltip.getNode())){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tconst doOnMouseEnter = () => {\r\n\t\t\t\twatchableTarget = targetNode;\r\n\t\t\t\tconfig.onmouseenter(event, targetNode);\r\n\t\t\t};\r\n\t\t\t// GS-2377: to show tooltip after touch and hide it when touch is outside the events\r\n\t\t\tif (scheduler._mobile && scheduler.config.touch_tooltip){\r\n\t\t\t\tif(targetNode){\r\n\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tconfig.onmouseleave(event, targetNode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(watchableTarget){\r\n\t\t\t\tif(targetNode && targetNode === watchableTarget){\r\n\t\t\t\t\tconfig.onmousemove(event, targetNode);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconfig.onmouseleave(event, watchableTarget);\r\n\t\t\t\t\twatchableTarget = null;\r\n\r\n\t\t\t\t\tif(targetNode && targetNode !== watchableTarget){\r\n\t\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(targetNode){\r\n\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.detach(config.selector);\r\n\t\tthis._domEvents.attach(root, \"mousemove\", handler);\r\n\t\tthis._listeners[config.selector] = {\r\n\t\t\tnode: root,\r\n\t\t\thandler\r\n\t\t};\r\n\t}\r\n\r\n\tdetach(selector: string): void {\r\n\t\tconst listener = this._listeners[selector];\r\n\t\tif(listener){\r\n\t\t\tthis._domEvents.detach(listener.node, \"mousemove\", listener.handler);\r\n\t\t}\r\n\t}\r\n\r\n\ttooltipFor(config: ITooltipConfig): void {\r\n\t\tconst cloneDomEvent = (event: MouseEvent) => {\r\n\t\t\tlet clone = event;\r\n\t\t\t// making events survive timeout in ie\r\n\t\t\t// tslint:disable-next-line no-string-literal\r\n\t\t\tif(document[\"createEventObject\"] && !document.createEvent){\r\n\t\t\t\t// tslint:disable-next-line no-string-literal\r\n\t\t\t\tclone = document[\"createEventObject\"](event);\r\n\t\t\t}\r\n\t\t\treturn clone;\r\n\t\t};\r\n\t\tthis._initDelayedFunctions();\r\n\t\tthis.attach({\r\n\t\t\tselector: config.selector,\r\n\t\t\tglobal: config.global,\r\n\t\t\tonmouseenter:(event: MouseEvent, node: HTMLElement) => {\r\n\t\t\t\tconst html = config.html(event, node);\r\n\t\t\t\tif(html){\r\n\t\t\t\t\tthis.delayShow(cloneDomEvent(event), html);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonmousemove:(event: MouseEvent, node: HTMLElement) => {\r\n\t\t\t\tconst html = config.html(event, node);\r\n\t\t\t\tif(html){\r\n\t\t\t\t\tthis.delayShow(cloneDomEvent(event), html);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\t\t\tthis.delayHide();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonmouseleave:() => {\r\n\t\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\t\tthis.delayHide();\r\n\t\t\t},\r\n\t\t});\r\n\t}\r\n\r\n\tprivate _initDelayedFunctions(){\r\n\t\tconst scheduler = this._scheduler;\r\n\t\t// reset delayed functions in order to apply current values of tooltip_timeout\r\n\t\tif(this.delayShow){\r\n\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t}\r\n\t\tif(this.delayHide){\r\n\t\t\tthis.delayHide.$cancelTimeout();\r\n\t\t}\r\n\t\tthis.tooltip.hide();\r\n\t\t\r\n\t\tthis.delayShow = (utils as any).default.delay((event: MouseEvent, html: string) => {\r\n\t\t\tif(scheduler.callEvent(\"onBeforeTooltip\", [event]) === false) {\r\n\t\t\t\tthis.tooltip.hide();\r\n\t\t\t} else {\r\n\t\t\t\tthis.tooltip.setContent(html);\r\n\t\t\t\tthis.tooltip.show(event);\r\n\t\t\t}\r\n\t\t}, scheduler.config.tooltip_timeout || 1);\r\n\r\n\t\tthis.delayHide = (utils as any).default.delay(() => {\r\n\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\tthis.tooltip.hide();\r\n\t\t}, scheduler.config.tooltip_hide_timeout || 1);\r\n\t}\r\n\r\n}","import { TooltipManager } from \"./tooltipManager\";\r\n\r\nexport default function (scheduler: any) {\r\n\r\n\tscheduler.config.tooltip_timeout = 30;\r\n\tscheduler.config.tooltip_offset_y = 20;\r\n\tscheduler.config.tooltip_offset_x = 10;\r\n\tscheduler.config.tooltip_hide_timeout = 30;\r\n\r\n\tconst tooltipManager = new TooltipManager(scheduler);\r\n\r\n\tscheduler.ext.tooltips = tooltipManager;\r\n\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function () {\r\n\r\n\t\ttooltipManager.tooltipFor({\r\n\t\t\tselector: \"[\" + scheduler.config.event_attribute + \"]\",\r\n\t\t\thtml: (event: MouseEvent) => {\r\n\t\t\t\tif (scheduler._mobile && !scheduler.config.touch_tooltip) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst targetEventId = scheduler._locate_event(event.target);\r\n\t\t\t\tif (scheduler.getEvent(targetEventId)) {\r\n\t\t\t\t\tconst event = scheduler.getEvent(targetEventId);\r\n\t\t\t\t\treturn scheduler.templates.tooltip_text(event.start_date, event.end_date, event);\r\n\t\t\t\t}\r\n\t\t\t\treturn null;\r\n\t\t\t},\r\n\t\t\tglobal: false\r\n\t\t});\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function () {\r\n\t\ttooltipManager.destructor();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onLightbox\", function () {\r\n\t\ttooltipManager.hideTooltip();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeDrag\", function() {\r\n\t\t// GS-2377: don't hide tooltip on mobile device when ontouchstart event occurs\r\n\t\tif (scheduler._mobile && scheduler.config.touch_tooltip) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\ttooltipManager.hideTooltip();\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function() {\r\n\t\ttooltipManager.hideTooltip();\r\n\t\treturn true;\r\n\t});\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Tree Timeline\", scheduler.assert);\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Units\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\nscheduler._get_url_nav = function(){\r\n\tvar p = {};\r\n\tvar data = (document.location.hash || \"\").replace(\"#\", \"\").split(\",\");\r\n\tfor (var i = 0; i < data.length; i++) {\r\n\t\tvar s = data[i].split(\"=\");\r\n\t\tif (s.length == 2)\r\n\t\t\tp[s[0]] = s[1];\r\n\t}\r\n\treturn p;\r\n};\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function () {\r\n\tvar first = true;\r\n\tvar s2d = scheduler.date.str_to_date(\"%Y-%m-%d\");\r\n\tvar d2s = scheduler.date.date_to_str(\"%Y-%m-%d\");\r\n\tvar select_event = scheduler._get_url_nav().event || null;\r\n\r\n\tscheduler.attachEvent(\"onAfterEventDisplay\", function(ev){\r\n\t\tselect_event = null;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function (om, od, m, d) {\r\n\t\tif (first) {\r\n\t\t\tfirst = false;\r\n\t\t\tvar p = scheduler._get_url_nav();\r\n\r\n\t\t\tif (p.event){\r\n\t\t\t\ttry{\r\n\t\t\t\t\tif(scheduler.getEvent(p.event)){\r\n\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\tshowEvent(p.event);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tvar handler = scheduler.attachEvent(\"onXLE\", function(){\r\n\t\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\t\tshowEvent(p.event);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\tscheduler.detachEvent(handler);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (e){}\r\n\t\t\t}\r\n\r\n\t\t\tif (p.date || p.mode) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthis.setCurrentView((p.date ? s2d(p.date) : null), (p.mode || null));\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\t//assuming that mode is not available anymore\r\n\t\t\t\t\tthis.setCurrentView((p.date ? s2d(p.date) : null), m);\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar values = [\r\n\t\t\t\"date=\" + d2s(d || od),\r\n\t\t\t\"mode=\" + (m || om)\r\n\t\t];\r\n\r\n\t\tif(select_event){\r\n\t\t\tvalues.push(\"event=\" + select_event);\r\n\t\t}\r\n\r\n\t\tvar text = \"#\" + values.join(\",\");\r\n\t\tdocument.location.hash = text;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tfunction showEvent(e){\r\n\t\tif(scheduler.$destroyed){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tselect_event = e;\r\n\t\tif(scheduler.getEvent(e)){\r\n\t\t\tscheduler.showEvent(e);\r\n\t\t}\r\n\t}\r\n});\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Week Agenda\", scheduler.assert);\r\n}","export default function(scheduler){\r\nscheduler.attachEvent(\"onLightBox\",function(){\r\n\tif (this._cover){\r\n\t\ttry{\r\n\t\t\tthis._cover.style.height = this.expanded ? \"100%\" : ((document.body.parentNode||document.body).scrollHeight+\"px\");\r\n\t\t} catch(e) {\r\n\r\n\t\t}\r\n\t}\r\n});\r\n\r\nscheduler.form_blocks.select.set_value=function(node,value,ev){\r\n\tif (typeof value == \"undefined\" || value === \"\")\r\n\t\tvalue = (node.firstChild.options[0]||{}).value;\r\n\tnode.firstChild.value=value||\"\";\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\t// scheduler.config.year_x = 4;\r\n\t// scheduler.config.year_y = 3;\r\n\t// scheduler.xy.year_top = 0;\r\n\r\n\tscheduler.templates.year_date = function(date) {\r\n\t\treturn scheduler.date.date_to_str(scheduler.locale.labels.year_tab + \" %Y\")(date);\r\n\t};\r\n\tscheduler.templates.year_month = scheduler.date.date_to_str(\"%F\");\r\n\tscheduler.templates.year_scale_date = scheduler.date.date_to_str(\"%D\");\r\n\tscheduler.templates.year_tooltip = function(s, e, ev) {\r\n\t\treturn ev.text;\r\n\t};\r\n\r\n\tconst isYearMode = function() {\r\n\t\treturn scheduler._mode == \"year\";\r\n\t};\r\n\t\r\n\tconst getCellDate = function(node){\r\n\t\tvar day = scheduler.$domHelpers.closest(node, \"[data-cell-date]\");\r\n\t\tif(!day || !day.hasAttribute(\"data-cell-date\")) return null;\r\n\t\treturn scheduler.templates.parse_date(day.getAttribute(\"data-cell-date\"));\r\n\t};\r\n\r\n\t// dbl click hook for scheduler._on_dbl_click\r\n\tscheduler.dblclick_dhx_year_grid= function(e) {\r\n\t\tif (isYearMode()) {\r\n\t\t\tconst target = e.target;\r\n\t\t\tif(scheduler.$domHelpers.closest(target, \".dhx_before\") || scheduler.$domHelpers.closest(target, \".dhx_after\")){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tconst date = getCellDate(target);\r\n\t\t\t\r\n\t\t\tif(date){\r\n\t\t\t\tconst start = date;\r\n\t\t\t\tconst end = this.date.add(start, 1, \"day\");\r\n\t\t\t\tif (!this.config.readonly && this.config.dblclick_create){\r\n\t\t\t\t\tthis.addEventNow(start.valueOf(), end.valueOf(), e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\t\r\n\tscheduler.attachEvent(\"onEventIdChange\", function(){\r\n\t\tif (isYearMode())\r\n\t\t\tthis.year_view(true);\r\n\t});\r\n\r\n\r\n\tvar old = scheduler.render_data;\r\n\tscheduler.render_data = function(evs) {\r\n\t\tif (!isYearMode()) return old.apply(this, arguments);\r\n\t\tfor (var i = 0; i < evs.length; i++)\r\n\t\t\tthis._year_render_event(evs[i]);\r\n\t};\r\n\r\n\tvar clear = scheduler.clear_view;\r\n\tscheduler.clear_view = function() {\r\n\t\tif (!isYearMode()) return clear.apply(this, arguments);\r\n\t\tvar dates = scheduler._year_marked_cells,\r\n\t\t\tdiv = null;\r\n\t\tfor (var date in dates) {\r\n\t\t\tif (dates.hasOwnProperty(date)) {\r\n\t\t\t\tdiv = dates[date];\r\n\t\t\t\tdiv.classList.remove(\"dhx_year_event\", \"dhx_cal_datepicker_event\");\r\n\t\t\t\t// div.className = \"dhx_month_head\";\r\n\t\t\t\t// div.removeAttribute(\"date\");\r\n\t\t\t\t// div.removeAttribute(\"data-year-date\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._year_marked_cells = {};\r\n\t};\r\n\r\n\tscheduler._hideToolTip = function() {\r\n\t\tif (this._tooltip) {\r\n\t\t\tthis._tooltip.style.display = \"none\";\r\n\t\t\tthis._tooltip.date = new Date(9999, 1, 1);\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._showToolTip = function(date, pos, e, src) {\r\n\t\tif (this._tooltip) {\r\n\t\t\tif (this._tooltip.date.valueOf() == date.valueOf()) return;\r\n\t\t\tthis._tooltip.innerHTML = \"\";\r\n\t\t} else {\r\n\t\t\tvar t = this._tooltip = document.createElement(\"div\");\r\n\t\t\tt.className = \"dhx_year_tooltip\";\r\n\t\t\tif (this.config.rtl) t.className += \" dhx_tooltip_rtl\";\r\n\t\t\tdocument.body.appendChild(t);\r\n\t\t\tt.addEventListener(\"click\", scheduler._click.dhx_cal_data);\r\n\t\t\tt.addEventListener(\"click\", function(e){\r\n\t\t\t\tif(e.target.closest(`[${scheduler.config.event_attribute}]`)){\r\n\t\t\t\t\tconst id = e.target.closest(`[${scheduler.config.event_attribute}]`).getAttribute(scheduler.config.event_attribute);\r\n\t\t\t\t\tscheduler.showLightbox(id);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\tvar evs = this.getEvents(date, this.date.add(date, 1, \"day\"));\r\n\t\tvar html = \"\";\r\n\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tif(!this.filter_event(ev.id, ev))\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\t\t\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\t\t\thtml += \"
\";\r\n\t\t\thtml += \"
\" + (evs[i]._timed ? this.templates.event_date(evs[i].start_date) : \"\") + \"
\";\r\n\t\t\thtml += \"
 
\";\r\n\t\t\thtml += this.templates.year_tooltip(evs[i].start_date, evs[i].end_date, evs[i]) + \"
\";\r\n\t\t}\r\n\r\n\t\tthis._tooltip.style.display = \"\";\r\n\t\tthis._tooltip.style.top = \"0px\";\r\n\r\n\r\n\t\tif (document.body.offsetWidth - pos.left - this._tooltip.offsetWidth < 0)\r\n\t\t\tthis._tooltip.style.left = pos.left - this._tooltip.offsetWidth + \"px\";\r\n\t\telse\r\n\t\t\tthis._tooltip.style.left = pos.left + src.offsetWidth + \"px\";\r\n\r\n\t\tthis._tooltip.date = date;\r\n\t\tthis._tooltip.innerHTML = html;\r\n\r\n\t\tif (document.body.offsetHeight - pos.top - this._tooltip.offsetHeight < 0)\r\n\t\t\tthis._tooltip.style.top = pos.top - this._tooltip.offsetHeight + src.offsetHeight + \"px\";\r\n\t\telse\r\n\t\t\tthis._tooltip.style.top = pos.top + \"px\";\r\n\t};\r\n\r\n\tscheduler._year_view_tooltip_handler = function(e){\r\n\t\tif (!isYearMode()) return;\r\n\r\n\t\tvar src = e.target || e.srcElement;\r\n\t\tif (src.tagName.toLowerCase() == 'a') // fix for active links extension (it adds links to the date in the cell)\r\n\t\t\tsrc = src.parentNode;\r\n\t\tif (scheduler._getClassName(src).indexOf(\"dhx_year_event\") != -1)\r\n\t\t\tscheduler._showToolTip(scheduler.templates.parse_date(src.getAttribute(\"data-year-date\")), scheduler.$domHelpers.getOffset(src), e, src);\r\n\t\telse\r\n\t\t\tscheduler._hideToolTip();\r\n\t};\r\n\tscheduler._init_year_tooltip = function() {\r\n\t\tscheduler._detachDomEvent(scheduler._els[\"dhx_cal_data\"][0], \"mouseover\", scheduler._year_view_tooltip_handler);\r\n\t\tscheduler.event(scheduler._els[\"dhx_cal_data\"][0], \"mouseover\", scheduler._year_view_tooltip_handler);\r\n\t};\r\n\r\n\tscheduler._get_year_cell = function(d) {\r\n\t\tvar dateString = scheduler.templates.format_date(d);\r\n\t\tvar cells = this.$root.querySelectorAll(`.dhx_cal_data .dhx_cal_datepicker_date[data-cell-date=\"${dateString}\"]`);\r\n\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\tif(!scheduler.$domHelpers.closest(cells[i], \".dhx_after, .dhx_before\")){\r\n\t\t\t\treturn cells[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t};\r\n\r\n\tscheduler._year_marked_cells = {};\r\n\tscheduler._mark_year_date = function(date, event) {\r\n\t\tvar dateString = scheduler.templates.format_date(date);\r\n\t\tvar cell = this._get_year_cell(date);\r\n\t\tif (!cell) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar ev_class = this.templates.event_class(event.start_date, event.end_date, event);\r\n\t\tif (!scheduler._year_marked_cells[dateString]) {\r\n\t\t\tcell.classList.add(\"dhx_year_event\", \"dhx_cal_datepicker_event\");// = \"dhx_month_head dhx_year_event\";\r\n\t\t\tcell.setAttribute(\"data-year-date\", dateString);\r\n\t\t\tcell.setAttribute(\"date\", dateString);\r\n\t\t\tscheduler._year_marked_cells[dateString] = cell;\r\n\t\t}\r\n\t\tif(ev_class){\r\n\t\t\tcell.classList.add(ev_class);\r\n\t\t}\r\n\t};\r\n\tscheduler._unmark_year_date = function(date) {\r\n\t\tvar cell = this._get_year_cell(date);\r\n\t\tif (!cell) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcell.classList.remove(\"dhx_year_event\", \"dhx_cal_datepicker_event\");\r\n//\t\tcell.className = \"dhx_month_head\";\r\n\t};\r\n\tscheduler._year_render_event = function(event) {\r\n\t\tvar date = event.start_date;\r\n\t\tif (date.valueOf() < this._min_date.valueOf()){\r\n\t\t\tdate = this._min_date;\r\n\t\t} else {\r\n\t\t\tdate = this.date.date_part(new Date(date));\r\n\t\t}\r\n\r\n\t\twhile (date < event.end_date) {\r\n\t\t\tthis._mark_year_date(date, event);\r\n\t\t\tdate = this.date.add(date, 1, \"day\");\r\n\t\t\tif (date.valueOf() >= this._max_date.valueOf())\r\n\t\t\t\treturn;\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.year_view = function(mode) {\r\n\r\n\t\tscheduler.set_sizes();\r\n\r\n\t\tscheduler._table_view = mode;\r\n\r\n\t\tif (this._load_mode && this._load()) return;\r\n\r\n\t\tif (mode) {\r\n\t\t\tscheduler._init_year_tooltip();\r\n\t\t\tscheduler._reset_year_scale();\r\n\t\t\tif (scheduler._load_mode && scheduler._load()){\r\n\t\t\t\tscheduler._render_wait = true;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tscheduler.render_view_data();\r\n\t\t} else {\r\n\t\t\tscheduler._hideToolTip();\r\n\t\t}\r\n\t};\r\n\tscheduler._reset_year_scale = function() {\r\n\t\tthis._cols = [];\r\n\t\tthis._colsS = {};\r\n\t\tvar week_starts = []; //start day of first week in each month\r\n\t\tvar dataArea = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tvar c = this.config;\r\n\t\tdataArea.scrollTop = 0; //fix flickering in FF\r\n\t\tdataArea.innerHTML = \"\";\r\n\r\n\t\tvar dy = Math.floor((parseInt(dataArea.style.height) - scheduler.xy.year_top) / c.year_y);\r\n\t\tif (dy < 190) {\r\n\t\t\tdy = 190;\r\n\t\t}\r\n\r\n\t\tvar week_template = document.createElement(\"div\");\r\n\t\tvar dummy_date = this.date.week_start(scheduler._currentDate());\r\n\r\n\t\tthis._process_ignores(dummy_date, 7, \"day\", 1);\r\n\r\n\t\tfor (var i = 0; i < 7; i++) {\r\n\t\t\tif(!(this._ignores && this._ignores[i])) {\r\n\t\t\t\tthis._cols[i] = 'var(--dhx-scheduler-datepicker-cell-size)';\r\n\t\t\t\tthis._render_x_header(i, 0, dummy_date, week_template);\r\n\r\n\t\t\t}\r\n\t\t\tdummy_date = this.date.add(dummy_date, 1, \"day\");\r\n\t\t}\r\n\t\tweek_template.lastChild.className += \" dhx_scale_bar_last\";\r\n\r\n\t\tfor(var i = 0; i < week_template.childNodes.length; i++){\r\n\t\t\tthis._waiAria.yearHeadCell(week_template.childNodes[i]);\r\n\t\t}\r\n\r\n\t\tvar sd = this.date[this._mode + \"_start\"](this.date.copy(this._date));\r\n\t\tvar ssd = sd;\r\n\t\tvar yearBox = null;\r\n\t\tconst wrapper = document.createElement(\"div\");\r\n\t\twrapper.classList.add(\"dhx_year_wrapper\");\r\n\t\tfor (var i = 0; i < c.year_y; i++){\r\n\t\t\tfor (var j = 0; j < c.year_x; j++) {\r\n\t\t\t\tyearBox = document.createElement(\"div\");\r\n\t\t\t\tyearBox.className = \"dhx_year_box\";\r\n\r\n\t\t\t\tyearBox.setAttribute(\"date\", this._helpers.formatDate(sd));\r\n\t\t\t\tyearBox.setAttribute(\"data-month-date\", this._helpers.formatDate(sd));\r\n\t\t\t\tyearBox.innerHTML = \"
\" + week_template.innerHTML + \"
\";\r\n\r\n\t\t\t\tvar header = yearBox.querySelector(\".dhx_year_month\");\r\n\t\t\t\tvar grid = yearBox.querySelector(\".dhx_year_grid\");\r\n\t\t\t\tvar body = yearBox.querySelector(\".dhx_year_body\");\r\n\r\n\t\t\t\tvar headerId = scheduler.uid();\r\n\t\t\t\tthis._waiAria.yearHeader(header, headerId);\r\n\t\t\t\tthis._waiAria.yearGrid(grid, headerId);\r\n\r\n\r\n\t\t\t\theader.innerHTML = this.templates.year_month(sd);\r\n\r\n\r\n\r\n\t\t\t\tvar dd = this.date.week_start(sd);\r\n\t\t\t\tthis._reset_month_scale(body, sd, dd, 6);\r\n\r\n\t\t\t\tvar days = body.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var day = 0; day < days.length; day++){\r\n\t\t\t\t\tthis._waiAria.yearDayCell(days[day]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\twrapper.appendChild(yearBox);\r\n\r\n\t\t\t\tweek_starts[i * c.year_x + j] = (sd.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;\r\n\t\t\t\tsd = this.date.add(sd, 1, \"month\");\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdataArea.appendChild(wrapper);\r\n\r\n\t\tvar dateElement = this._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML = this.templates[this._mode + \"_date\"](ssd, sd, this._mode);\r\n\t\t}\r\n\r\n\t\tthis.week_starts = week_starts;\r\n\t\tweek_starts._month = ssd.getMonth();\r\n\t\tthis._min_date = ssd;\r\n\t\tthis._max_date = sd;\r\n\t};\r\n\r\n\tscheduler._reset_year_scale = function(){\r\n\r\n\t\tvar dataArea = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tdataArea.scrollTop = 0; //fix flickering in FF\r\n\t\tdataArea.innerHTML = \"\";\r\n\r\n\t\tlet yearStart = this.date.year_start(new Date(this._date));\r\n\t\t\r\n\t\tthis._min_date = this.date.week_start(new Date(yearStart));\r\n\r\n\t\tconst wrapper = document.createElement(\"div\");\r\n\t\twrapper.classList.add(\"dhx_year_wrapper\");\r\n\r\n\t\tlet currentDate = yearStart;\r\n\t\tfor(let i = 0; i < 12; i++){\r\n\t\t\tlet yearBox = document.createElement(\"div\");\r\n\t\t\tyearBox.className = \"dhx_year_box\";\r\n\r\n\t\t\tyearBox.setAttribute(\"date\", this._helpers.formatDate(currentDate));\r\n\t\t\tyearBox.setAttribute(\"data-month-date\", this._helpers.formatDate(currentDate));\r\n\t\t\tyearBox.innerHTML = `
${this.templates.year_month(currentDate)}
\r\n\t\t\t
`;\r\n\r\n\t\t\tconst yearGrid = yearBox.querySelector(\".dhx_year_grid\");\r\n\t\t\tconst datepicker = scheduler._createDatePicker(null, {\r\n\t\t\t\tdate: currentDate,\r\n\t\t\t\tfilterDays: scheduler.ignore_year,\r\n\t\t\t\tminWeeks: 6\r\n\t\t\t});\r\n\t\t\tdatepicker._renderDayGrid(yearGrid);\r\n\t\t\tdatepicker.destructor();\r\n\r\n\t\t\twrapper.appendChild(yearBox);\r\n\r\n\t\t\tcurrentDate = this.date.add(currentDate, 1, \"month\");\r\n\r\n\t\t}\r\n\t\tdataArea.appendChild(wrapper);\r\n\r\n\t\tlet lastDate = this.date.add(yearStart, 1, \"year\");\r\n\t\tif(lastDate.valueOf() != this.date.week_start(new Date(lastDate)).valueOf()){\r\n\t\t\tlastDate = this.date.week_start(new Date(lastDate));\r\n\t\t\tlastDate = this.date.add(lastDate, 1, \"week\");\r\n\t\t}\r\n\t\tthis._max_date = lastDate;\r\n\t\tvar dateElement = this._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML = this.templates[this._mode + \"_date\"](yearStart, lastDate, this._mode);\r\n\t\t}\r\n\t};\r\n\r\n\tvar getActionData = scheduler.getActionData;\r\n\tscheduler.getActionData = function(n_ev) {\r\n\t\tif(!isYearMode()){\r\n\t\t\treturn getActionData.apply(scheduler, arguments);\r\n\t\t}\r\n\t\t\r\n\t\tvar date = getCellDate(n_ev.target);\r\n\t\treturn {\r\n\t\t\tdate:date,\r\n\t\t\tsection:null\r\n\t\t};\r\n\t};\r\n\r\n\tvar locateEvent = scheduler._locate_event;\r\n\tscheduler._locate_event = function(node) {\r\n\t\tvar id = locateEvent.apply(scheduler, arguments);\r\n\t\tif(!id){\r\n\t\t\t\r\n\t\t\tvar date = getCellDate(node);\r\n\t\t\tif(!date) return null;\r\n\t\t\tvar evs = scheduler.getEvents(date, scheduler.date.add(date, 1, \"day\"));\r\n\t\t\tif(!evs.length) return null;\r\n\r\n\t\t\t//can be multiple events in the cell, return any single one\r\n\t\t\tid = evs[0].id;\r\n\t\t}\r\n\t\treturn id;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tscheduler._hideToolTip();\r\n\t});\r\n}","export default function(scheduler){\r\n\r\n\r\n(function(){\r\n\r\nfunction defaults(obj, std){\r\n\tfor (var key in std)\r\n\t\tif (!obj[key])\r\n\t\t\tobj[key] = std[key];\r\n\treturn obj;\r\n}\r\n\r\nfunction getElementSizes(element, scheduler) {\r\n\tvar sizes = {};\r\n\telement = scheduler._els[element];\r\n\tif (element && element[0]) {\r\n\t\tsizes.x = element[0].scrollWidth;\r\n\t\tsizes.y = element[0].scrollHeight;\r\n\t} else {\r\n\t\tsizes.x = 0;\r\n\t\tsizes.y = 0;\r\n\t}\r\n\treturn sizes;\r\n}\r\n\r\n//compatibility for new versions of scheduler\r\nif(!window.dhtmlxAjax){\r\n\twindow.dhtmlxAjax = {\r\n\t\tpost: function(url, data, callback){\r\n\t\t\treturn window.dhx4.ajax.post(url, data, callback);\r\n\t\t},\r\n\t\tget: function(url, callback){\r\n\t\t\treturn window.ajax.get(url, callback);\r\n\t\t}\r\n\t};\r\n}\r\n\r\nfunction add_export_methods(scheduler){\r\n\r\n\tscheduler.exportToPDF = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.pdf\",\r\n\t\t\tformat:\"A4\",\r\n\t\t\torientation:\"landscape\",\r\n\t\t\tdpi:96,\r\n\t\t\tzoom:1,\r\n\t\t\trtl: scheduler.config.rtl\r\n\t\t});\r\n\t\tconfig.html = this._export_html(config);\r\n\t\tconfig.mode = this.getState().mode;\r\n\t\tthis._send_to_export(config, \"pdf\");\r\n\t};\r\n\r\n\tscheduler.exportToPNG = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.png\",\r\n\t\t\tformat:\"A4\",\r\n\t\t\torientation:\"landscape\",\r\n\t\t\tdpi:96,\r\n\t\t\tzoom:1,\r\n\t\t\trtl: scheduler.config.rtl\r\n\t\t});\r\n\t\tconfig.html = this._export_html(config);\r\n\t\tconfig.mode = this.getState().mode;\r\n\t\tthis._send_to_export(config, \"png\");\r\n\t};\r\n\r\n\tscheduler.exportToICal = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.ical\",\r\n\t\t\tdata:this._serialize_plain(null, config)\r\n\t\t});\r\n\t\tthis._send_to_export(config, \"ical\");\r\n\t};\r\n\r\n\tscheduler.exportToExcel = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.xlsx\",\r\n\t\t\ttitle:\"Events\",\r\n\t\t\tdata:this._serialize_plain( this.templates.xml_format, config),\r\n\t\t\tcolumns:this._serialize_columns()\r\n\t\t});\r\n\t\tthis._send_to_export(config, \"excel\");\r\n\t};\r\n\r\n\tscheduler._ajax_to_export = function(data, type, callback){\r\n\t\tdelete data.callback;\r\n\t\tvar url = data.server || \"https://export.dhtmlx.com/scheduler\";\r\n\r\n\t\twindow.dhtmlxAjax.post(url,\r\n\t\t\t\"type=\"+type+\"&store=1&data=\"+encodeURIComponent(JSON.stringify(data)),\r\n\t\t\tfunction(loader){\r\n\t\t\t\tvar fail = loader.xmlDoc.status > 400;\r\n\t\t\t\tvar info = null;\r\n\r\n\t\t\t\tif (!fail){\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\tinfo = JSON.parse(loader.xmlDoc.responseText);\r\n\t\t\t\t\t}catch(e){}\r\n\t\t\t\t}\r\n\t\t\t\tcallback(info);\r\n\t\t\t}\r\n\t\t);\r\n\t};\r\n\r\n\tscheduler._plain_export_copy = function(source, format){\r\n\t\tvar target = {};\r\n\t\tfor (var key in source)\r\n\t\t\ttarget[key] = source[key];\r\n\r\n\t\ttarget.start_date = format(target.start_date);\r\n\t\ttarget.end_date = format(target.end_date);\r\n\t\ttarget.$text = this.templates.event_text(source.start_date, source.end_date, source);\r\n\r\n\t\treturn target;\r\n\t};\r\n\r\n\tscheduler._serialize_plain = function(format, config){\r\n\t\tformat = format || scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\", true);\r\n\r\n\t\tvar events;\r\n\t\tif (config && config.start && config.end)\r\n\t\t\tevents = scheduler.getEvents(config.start, config.end);\r\n\t\telse\r\n\t\t\tevents = scheduler.getEvents();\r\n\r\n\t\tvar data = [];\r\n\t\tfor (var i = 0; i< events.length; i++)\r\n\t\t\tdata[i] = this._plain_export_copy(events[i], format);\r\n\r\n\t\treturn data;\r\n\t};\r\n\r\n\tscheduler._serialize_columns = function(){\r\n\t\treturn [\r\n\t\t\t{ id:\"start_date\", header:\"Start Date\", width:30 },\r\n\t\t\t{ id:\"end_date\", header:\"End Date\", width:30 },\r\n\t\t\t{ id:\"$text\", header:\"Text\", width:100 }\r\n\t\t];\r\n\t};\r\n\r\n\tscheduler._send_to_export = function(data, type){\r\n\t\tif(!data.version){\r\n\t\t\tdata.version = scheduler.version;\r\n\t\t}\r\n\r\n\t\tif(!data.skin){\r\n\t\t\tdata.skin = scheduler.skin;\r\n\t\t}\r\n\r\n\t\tif (data.callback)\r\n\t\t\t\treturn scheduler._ajax_to_export(data, type, data.callback);\r\n\r\n\t\tvar form = this._create_hidden_form();\r\n\r\n\t\tform.firstChild.action = data.server || \"https://export.dhtmlx.com/scheduler\";\r\n\t\tform.firstChild.childNodes[0].value = JSON.stringify(data);\r\n\t\tform.firstChild.childNodes[1].value = type;\r\n\t\tform.firstChild.submit();\r\n\t};\r\n\r\n\tscheduler._create_hidden_form = function(){\r\n\t\tif (!this._hidden_export_form){\r\n\t\t\tvar t = this._hidden_export_form = document.createElement(\"div\");\r\n\t\t\tt.style.display = \"none\";\r\n\t\t\tt.innerHTML = \"
\";\r\n\t\t\tdocument.body.appendChild(t);\r\n\t\t}\r\n\t\treturn this._hidden_export_form;\r\n\t};\r\n\r\n\tscheduler._get_export_size = function(format, orientation, zoom, dpi, header, footer, scales) {\r\n\r\n\t\tdpi = parseInt(dpi)/25.4 || 4;\r\n\r\n\t\tvar sizes = {\r\n\t\t\t\"A5\":{ x:148, y:210 },\r\n\t\t\t\"A4\":{ x:210, y:297 },\r\n\t\t\t\"A3\":{ x:297, y:420 },\r\n\t\t\t\"A2\":{ x:420, y:594 },\r\n\t\t\t\"A1\":{ x:594, y:841 },\r\n\t\t\t\"A0\":{ x:841, y:1189 }\r\n\t\t};\r\n\r\n\t\tvar dataX = getElementSizes(\"dhx_cal_data\", this).x;\r\n\t\tvar dataY = getElementSizes(\"dhx_cal_data\", this).y;\r\n\t\tvar headY = getElementSizes(\"dhx_cal_header\", this).y;\r\n\t\tvar multY = getElementSizes(\"dhx_multi_day\", this).y;\r\n\r\n\t\tvar cSize = {\r\n\t\t\ty: dataY + headY + multY\r\n\t\t};\r\n\r\n\t\tif (format === \"full\") {\r\n\t\t\tcSize.x = dataX;\r\n\t\t} else {\r\n\t\t\tcSize.x = Math.floor( (orientation === \"landscape\" ? sizes[format].y : sizes[format].x) * dpi );\r\n\t\t}\r\n\r\n\t\tif (scales) {\r\n\t\t\tcSize.x *= (parseFloat(scales.x) || 1);\r\n\t\t\tcSize.y *= (parseFloat(scales.y) || 1);\r\n\t\t}\r\n\r\n\t\treturn cSize;\r\n\t};\r\n\r\n\tfunction getTimeline() {\r\n\t\tvar mode = scheduler.getState().mode;\r\n\t\tif (scheduler.matrix && scheduler.matrix[mode]) {\r\n\t\t\treturn scheduler.matrix[mode];\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\r\n\tfunction getInitialSizes() {\r\n\t\tvar smartRendering = undefined,\r\n\t\t\tscrollable = undefined;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (timeline) {\r\n\t\t\tscrollable = timeline.scrollable;\r\n\t\t\tsmartRendering = timeline.smart_rendering;\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tnav_height: scheduler.xy.nav_height,\r\n\t\t\tscroll_width: scheduler.xy.scroll_width,\r\n\t\t\tstyle_width: scheduler._obj.style.width,\r\n\t\t\tstyle_height: scheduler._obj.style.height,\r\n\t\t\ttimeline_scrollable: scrollable,\r\n\t\t\ttimeline_smart_rendering: smartRendering\r\n\t\t};\r\n\t}\r\n\r\n\tfunction setExportSizes(size, initialSizes) {\r\n\t\tscheduler._obj.style.width = size.x + \"px\";\r\n\t\tscheduler._obj.style.height = size.y + \"px\";\r\n\r\n\t\tscheduler.xy.nav_height = 0;\r\n\t\tscheduler.xy.scroll_width = 0;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (initialSizes.timeline_scrollable || initialSizes.timeline_smart_rendering) {\r\n\r\n\t\t\ttimeline.scrollable = false;\r\n\t\t\ttimeline.smart_rendering = false;\r\n\t\t}\r\n\t}\r\n\r\n\tfunction setInitialSizes(initialSizes) {\r\n\t\tscheduler.xy.scroll_width = initialSizes.scroll_width;\r\n\t\tscheduler.xy.nav_height = initialSizes.nav_height;\r\n\t\tscheduler._obj.style.width = initialSizes.style_width;\r\n\t\tscheduler._obj.style.height = initialSizes.style_height;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (initialSizes.timeline_scrollable || initialSizes.timeline_smart_rendering) {\r\n\t\t\ttimeline.scrollable = initialSizes.timeline_scrollable;\r\n\t\t\ttimeline.smart_rendering = initialSizes.timeline_smart_rendering;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler._export_html = function (obj) {\r\n\t\tvar initialSizes = getInitialSizes();\r\n\t\tvar size = scheduler._get_export_size(obj.format, obj.orientation, obj.zoom, obj.dpi, obj.header, obj.footer, obj.scales);\r\n\r\n\t\tvar html = \"\";\r\n\t\ttry {\r\n\t\t\tsetExportSizes(size, initialSizes);\r\n\t\t\tscheduler.setCurrentView();\r\n\t\t\thtml = scheduler._obj.innerHTML;\r\n\t\t} catch (e) {\r\n\r\n\t\t\t// eslint-disable-next-line no-console\r\n\t\t\tconsole.error(e);\r\n\t\t} finally {\r\n\t\t\tsetInitialSizes(initialSizes);\r\n\t\t\tscheduler.setCurrentView();\r\n\t\t}\r\n\r\n\t\treturn html;\r\n\t};\r\n\r\n}\r\n\r\nadd_export_methods(scheduler);\r\n\r\n\r\n})();\r\n\r\n}","import active_links from \"./active_links\";\r\nimport agenda_legacy from \"./agenda_legacy_view\";\r\nimport agenda_view from \"./agenda\";\r\nimport all_timed from \"./all_timed\";\r\nimport collision from \"./collision\";\r\nimport container_autoresize from \"./container_autoresize\";\r\nimport cookie from \"./cookie\";\r\nimport daytimeline_restricted from \"./restricted_extensions/daytimeline\";\r\nimport drag_between_restricted from \"./restricted_extensions/drag_between\";\r\nimport editors from \"./editors\";\r\nimport expand from \"./expand\";\r\nimport grid_view from \"./restricted_extensions/grid_view\";\r\nimport html_templates from \"./html_templates\";\r\nimport key_nav from \"./key_nav\";\r\nimport layer from \"./layer\";\r\nimport limit from \"./limit\";\r\nimport map_view from \"./map_view\";\r\nimport minical from \"./minical\";\r\nimport monthheight from \"./monthheight\";\r\nimport multisection_restricted from \"./restricted_extensions/multisection\";\r\nimport multiselect from \"./multiselect\";\r\nimport multisource from \"./multisource\";\r\nimport mvc from \"./mvc\";\r\nimport outerdrag from \"./outerdrag\";\r\nimport pdf from \"./pdf\";\r\nimport quick_info from \"./quick_info\";\r\nimport readonly from \"./readonly\";\r\nimport recurring from \"./recurring\";\r\nimport recurring_legacy from \"./recurring_legacy\";\r\nimport serialize from \"./serialize\";\r\nimport timeline_restricted from \"./restricted_extensions/timeline\";\r\nimport tooltip from \"./tooltip\";\r\nimport treetimeline_restricted from \"./restricted_extensions/treetimeline\";\r\nimport units_restricted from \"./restricted_extensions/units\";\r\nimport url from \"./url\";\r\nimport week_agenda_restricted from \"./restricted_extensions/week_agenda\";\r\nimport wp from \"./wp\";\r\nimport year_view from \"./year_view\";\r\nimport export_api from \"./export_api\";\r\n\r\nexport default {\r\n\tactive_links,\r\n\tagenda_legacy,\r\n\tagenda_view,\r\n\tall_timed,\r\n\tcollision,\r\n\tcontainer_autoresize,\r\n\tcookie,\r\n\tdaytimeline: daytimeline_restricted,\r\n\tdrag_between: drag_between_restricted,\r\n\teditors,\r\n\texpand,\r\n\texport_api,\r\n\tgrid_view,\r\n\thtml_templates,\r\n\tkey_nav,\r\n\tlayer,\r\n\tlimit,\r\n\tmap_view,\r\n\tminical,\r\n\tmonthheight,\r\n\tmultisection: multisection_restricted,\r\n\tmultiselect,\r\n\tmultisource,\r\n\tmvc,\r\n\touterdrag,\r\n\tpdf,\r\n\tquick_info,\r\n\treadonly,\r\n\trecurring,\r\n\trecurring_legacy,\r\n\tserialize,\r\n\ttimeline: timeline_restricted,\r\n\ttooltip,\r\n\ttreetimeline: treetimeline_restricted,\r\n\tunits: units_restricted,\r\n\turl,\r\n\tweek_agenda: week_agenda_restricted,\r\n\twp,\r\n\tyear_view\r\n};","import SchedulerFactory from \"./scheduler_factory\";\r\nimport gplExtensions from \"./ext/extensions_gpl\";\r\n\r\nconst factory = new SchedulerFactory(gplExtensions);\r\n\r\nconst scheduler = factory.getSchedulerInstance();\r\nconst Scheduler = {\r\n\tplugin: scheduler.bind(factory.plugin, factory)\r\n};\r\n\r\nwindow.scheduler = scheduler;\r\nwindow.Scheduler = Scheduler;\r\n\r\nif(!window.$dhx) {\r\n\twindow.$dhx = {};\r\n}\r\n\r\nwindow.$dhx.scheduler = scheduler;\r\nwindow.$dhx.Scheduler = Scheduler;\r\n\r\nexport default scheduler;export { scheduler, Scheduler };"],"names":["dhtmlxHook","dhtmlx","attaches","attachScheduler","day","mode","tabs","scheduler","obj","document","createElement","id","this","_genStr","innerHTML","body","appendChild","firstChild","attachObject","vs","av","sched","schedId","setSizes","updateView","destructor","init","_viewRestore","globalScope","window","global","global$1","dragHighlightPos","dndMarkers","dragStarted","eventNode","event","isEnabled","config","drag_highlight","markTimespan","checkViewName","viewName","viewObj","getView","layout","checkSectionPropertyName","y_property","map_to","setRequiredStylesToMarker","style","top","left","marginLeft","createMarkerConfig","configSettings","sectionId","sections","markerObject","start_date","end_date","css","html","date","add","createViewMarker","settings","markerConfigs","getMonthViewMarkers","getTimelineAndUnitsViewMarkers","getColumnViewMarkers","forEach","cfg","push","columnViewMarkersArray","eventNodes","$container","querySelectorAll","event_attribute","i","length","eventNodeClone","cloneNode","startDate","Date","getAttribute","endDate","dates","monthViewMarkersArray","weekDates","currDate","valueOf","week_start","cells","unitMarkersArray","sectionPropertyName","String","split","section_delimiter","formatedSections","map","element","elems","attachEvent","e","getEvent","target","closest","getState","cascade_event_display","unselect","getActionData","section","unmarkTimespan","undoDelete","ev","deletedEvent","copy","undo_deleted","new_event","message","text","expire","type","callback","undoBtn","addEvent","render","limitPlugin","mark_now","display_marked_timespans","overwrite_marked_timespans","dhx_time_block","default_timespan_type","fix_options","options","days","zones","get_resulting_options","blockTime","addMarkedTimespan","unblockTime","deleteMarkedTimespan","checkInMarkedTimespan","timespan_type","on_overlap","res","temp_start_date","temp_end_date","timespans","_marked_timespans","date_part","day_value","day_index","getDay","getZones","eventStart","_get_zone_minutes","eventEnd","getDate","markerStart","markerEnd","checkLimitViolation","check_limits","s","c","evs","rec_type","_end_date","seriesEnd","limit_start","limit_end","recEventInLimits","complete_res","p","_timed","isOneDayEvent","allow","_drag_id","_drag_mode","setHours","setMinutes","checkEvent","callEvent","_get_blocked_zones","property","timeline_zones","blocked_timeline_zones","_get_relevant_blocked_zones","_add_timespan_zones","resultZones","concat","containers","_props","matrix","container","view","view_config","linker","_mark_now","hide","dhx_now_time","_els","now","_currentDate","_remove_mark_now","_max_date","_min_date","getHours","first_hour","last_hour","locate_holder_day","_append_mark_now","zone_start","_table_view","_mode","start_index","end_index","units_l","size","position","r_divs","t_day","t_div","_render_marked_timespan","els","div","parent","parentNode","removeChild","getMinutes","_prepare_timespan_options","r_configs","temp_configs","Array","t_days","slice","cloned_config","_lame_clone","apply","undefined","min","max","invert_zones","invertZones","uid","view_key","hasOwnProperty","ids","t_config","_lame_copy","k","c_config","t_sd","t_ed","zone_end","_get_dates_by_index","index","start","end","start_day","delta","t_date","_get_css_classes_by_config","css_classes","join","_get_block_by_config","block","area","blocks","min_date","max_date","date_to_display","min_day","areas","_scales","sday","_cols","_ignores","block_proto","className","height","width","order","inner_index","locate_holder","Math","all_hours_height","hour_size_px","hour_ms","round","_mark_timespans","data","divs","_on_scale_add_marker","len","childNodes","_getClassName","indexOf","configuration","Error","rebuild_els","get_elements","timespans_ids","_marked_timespans_ids","timespan_types","_marked_timespans_types","_addMarkerTimespanConfig","unit_id","timespans_view","day_configs","_array","configs","current_zones","resulting_zones","c_zone_start","c_zone_end","isLast","offset","splice","_subtract_timespan_zones","is_modified","_delete_marked_timespan_by_id","parent_array","_delete_marked_timespan_by_config","viewspans","_delete_marked_timespans_list","d","dayConfig","day_timespans","d_t","related_zones","arguments","types","t","typedConfig","_get_types_to_render","common","specific","types_to_render","_get_configs_to_render","units","_get_unit_index","unit","_date","dx","day_ind","unitsPerDay","floor","key","unit_zones","unit_types","global_data","day_types","dblclick_dhx_marked_timespan","src","dblclick_create","addEventNow","createMethod","methods","isActive","disableMethod","methodName","dummyMethod","restoreMethod","disableMethods","methodsHash","call","restoreMethods","batchUpdatePayload","console","error","$stateProvider","registerProvider","batch_update","batchUpdate","noRedraw","call_dp","_dp","updateMode","dp_mode","setUpdateMode","calls","setModeDate","needRender","needUpdateView","repaintEvents","rememberModeDate","setCurrentView","render_data","render_view_data","updateEvent","sendData","initPlugins","limit","uidSeed","isArray","pop","isStringObject","Function","prototype","toString","constructor","isNumberObject","isBooleanObject","isDate","getFullYear","getMonth","defined","delay","timeout","timer","result","$cancelTimeout","$pending","args","setTimeout","clearTimeout","$execute","utils","mixin","source","force","f","object","Number","Boolean","varType","Object","StateService","stateProviders","name","provider","method","internal","unregisterProvider","assert","check","show_errors","log","extend","commonViews","agenda","grid","timeline","week_agenda","year","anythingElse","requiredExtensions","_commonErrorMessages","unknownView","relatedDoc","relatedExtension","collapsedContainer","createTimelineView","createUnitsView","createGridView","renderCalendar","exportToPNG","exportToPDF","dhtmlxError","catchError","a","b","responseText","ajax_error","alert","classes","cssClass","classList","itemTypes","rows_container","row","setAttribute","fix_tab_position","$firstTab","$lastTab","$segmentedTab","button","builtInButton","spacer","minicalendarButton","minicalendarDiv","click","$_eventAttached","isCalendarVisible","destroyCalendar","navigation","handler","calendar","html_element","findRenderer","renderer","rows","cols","renderElement","value","align","justifyContent","prepareConfig","renderLayout","fragment","createDocumentFragment","items","next","_init_nav_bar","navBar","querySelector","_update_nav_bar","previousHeight","heightChanged","configChanged","newHeight","xy","nav_height","unset_actions","set_actions","display","isAttachedNode","root","getWindowSize","w","innerWidth","documentElement","clientWidth","h","innerHeight","clientHeight","equals","listenWindowResize","oldSize","resizeDelay","$destroyed","newSize","triggerSchedulerResize","$root","watchNodeResize","offsetHeight","previousWidth","offsetWidth","lowlevelResizeWatcher","addResizeListener","containerStyles","getComputedStyle","getPropertyValue","resizeWatcher","tabIndex","wai_aria_attributes","salesforce_environment","contentWindow","EventHost","_silent_mode","listeners","createEventStorage","handlers","eventStorage","combinedResult","handlerResult","handlerId","once","originalHandler","removeEvent","clear","makeEventable","eventHost","eventName","toLowerCase","thisObject","bind","innerId","attachAll","eventArguments","handlerName","detachEvent","list","eventId","detachAllEvents","eventable","nav_bar","_detachDomEvent","el","removeEventListener","_init_once","scheduler_resize_listener","navbar","header","dataArea","hasSchedulerMarkup","createDefaultHeader","views","nav","_grid","names","optionalViews","_obj","getElementById","wai_aria_application_role","JSON","stringify","rtl","_skin_init","_scroll","init_templates","_init_touch_events","set_sizes","$initialized","min_event_height","bar_height","scale_width","scroll_width","scale_height","month_scale_height","menu_width","margin_top","margin_left","editor_width","month_head_height","event_header_height","keys","edit_save","edit_cancel","functor","_x","scale_x","materialScalePlaceholder","_is_material_skin","insertBefore","set_xy","offsetTop","_lightbox","_setLbPosition","_data_width","right","node","x","y","prepareValue","val","prepared","isNaN","direction","getElementsByTagName","class_name","attr_value","label","locale","labels","_waiAria","labelAttr","domEventsScope","_createDomEventScope","detachAll","_click","attach","preventDefault","_temp_touch_block","_on_mouse_move","_ignore_next_click","_on_mouse_down","_on_mouse_up","_on_dbl_click","returnValue","_locate_event","select","_select_id","_close_not_saved","editStop","previousSelection","editor_id","_edit_id","lightbox_id","_lightbox_id","_new_event","select_id","expanded","drag_id","drag_mode","dhx_cal_data","cancelBubble","readonly","icon","mask","buttons","replace","dhx_cal_prev_button","dhx_cal_next_button","dummy","step","def_step","dhx_cal_today_button","dhx_cal_tab","deprecated_name","substring","search","delete","confirm_deleting","_dhtmlx_confirm","title","title_confirm_deleting","deleteEvent","ok","icon_delete","edit","save","details","showLightbox","form","cancel","opts","confirm","base","_isObject","_isDate","duration","event_duration","time_step","start_hour","setTime","_loading","_drag_event","details_on_dblclick","viewHandler","_get_column_index","x_pos","column","_week_indexes_from_pos","pos","ceil","_mouse_coords","$env","isIE","pageX","pageY","clientX","scrollLeft","clientLeft","clientY","scrollTop","clientTop","_colsS","$domHelpers","getAbsoluteLeft","getAbsoluteTop","dy","heights","_ignores_detected","preserve_length","_event_length","_get_real_event_length","x_step","x_unit","timestamp","confirmationText","confirm_closing","title_confirm_closing","positive_closing","_drag_pos","_correct_shift","back","getTimezoneOffset","_is_pos_changed","old_pos","new_pos","diff","old_val","new_val","acc","abs","d_pos","has_moved","_correct_drag_start_date","_start_correction","_end_correction","_get_fictional_event_length","_correct_drag_end_date","mousedownPos","_get_date_from_pos","_drag_start","fields","timeStep","custom","time_part","_dragEventBody","_move_event_shift","resize_date","_drag_from_start","resize_from_start","end_day_start","end_day_date","firstHour","lastHour","maxY","precisePos","minDate","maxDate","preciseDate","cursor","shift","new_end","new_start","limit_drag_out","all_timed","_get_section_view","_get_event_sday","_allow_dnd","update_render","sx","update_view","for_rendered","r","srcElement","classname","drag_event_body","fullClass","_get_private_properties","_clear_temporary_properties","clean","flagged_event","initial","current_state","_mobile","moved","_dhx_changed","is_new","edit_on_create","details_on_create","_trigger_dyn_loading","_load_mode","_load","_render_wait","_reset_ignores","_reset_scale","isViewExists","templates","_set_aria_buttons_attrs","buttonGroups","group","j","prev","headerButtonsAttributes","icon_form","icon_edit","oldClass","newClass","dhx_multi_day","prev_scroll","preserve_scroll","multidayScroll","_dy_shift","tab","headerToggleState","remove","_render_x_header","offset_top","head","left_border","columnHeaderText","dayHeaderAttr","_get_columns_num","from","to","count","count_n","_get_timeunit_start","_get_view_end","dd","ed","_calc_scale_sizes","summ","_process_ignores","realcount","_set_scale_col_size","_render_scales","data_area","sd","today","parseInt","scales","cls","firstHalf","slotDate","format_date","htmlContent","time_slot_text","time_slot_class","secondHalf","week_date_class","dayColumnAttr","day_start","_getNavDateElement","str","drag_resize","drag_move","navBarDateStr","scaleElement","navBarDateAttr","_reset_month_scale","_reset_hours_scale","multi_day","c1","visibility","totalWidth","col_length","hiddenWidth","c2","cc","content","hour_scale","hourScaleAttr","scroll_hour","now_date","n","preserve","ignore","ign_date","_render_month_scale","view_start","cd","tdwidths","cell_width","getCellHeight","cellheight","table","cell","month_date_class","body_class","head_class","monthCellAttr","cellHead","month_day","cellBody","bf1","parse_date","getLabel","lightbox","updateCollection","list_name","collection","serverList","resetLightbox","hideCover","cache","create","n_ev","_focus","focus","getDaysDifference","differenceInTime","getTime","differenceInDays","eventLength","startColumnIndex","endColumnIndex","_get_date_index","last_column","excludedDuration","intervalStart","intervalEnd","leftCellCutOffStart","leftCellCutOffEnd","rightCellCutOffStart","rightCellCutOffEnd","ev_length","dir","per_day","fd","start_slot","end_slot","_get_section_property","_is_initialized","state","_is_lightbox_open","defaultDomEvents","addEventListener","eventRemove","createEventScope","domEvents","eventScope","capture","detach","staticArray","_eventRemoveAll","_trim","func","trim","htmlTags","RegExp","extraSpaces","stripHTMLLite","htmlText","singleQuotes","escapeQuotes","getAttributeString","attr","attributes","setAttributes","values","day_date","role","getHeaderCellAttr","dateString","eventAttr","_eventCommonAttr","event_text","$dataprocessor_class","setEventBarAttr","_getAttributes","attributeSetter","arg","eventBarAttrString","agendaHeadAttrString","agendaHeadDateString","agendaHeadDescriptionString","agendaDataAttrString","agendaEventAttrString","attrs","agendaDetailsBtnString","icon_details","gridAttrString","gridRowAttrString","gridCellAttrString","mapAttrString","mapRowAttrString","mapDetailsBtnString","minicalHeader","headerId","minicalGrid","minicalRow","minicalDayCell","selected","minicalHeadCell","weekAgendaDayCell","weekAgendaEvent","lightboxHiddenAttr","lightboxVisibleAttr","lightboxSectionButtonAttrString","tabindex","yearHeader","yearGrid","yearHeadCell","yearRow","yearDayCell","lightboxAttr","lightboxButtonAttrString","buttonName","eventMenuAttrString","iconName","lightboxHeader","headerText","lightboxSelectAttrString","time_option","month","hour","minute","messageButtonAttrString","buttonLabel","messageInfoAttr","messageModalAttr","quickInfoAttr","quickInfoHeaderAttrString","quickInfoHeader","quickInfoButtonAttrString","tooltipAttr","tooltipVisibleAttr","tooltipHiddenAttr","isDisabled","payload","elementPosition","elem","bottom","getBoundingClientRect","box","docElem","pageYOffset","pageXOffset","offsetLeft","offsetParent","getRelativeEventPosition","getNodePosition","getClassName","baseVal","getTargetNode","trg","tagName","shadowRoot","composedPath","locateCss","strict","ind","charAt","isVisible","currentStyle","hiddenSection","recurringSection","hasNonNegativeTabIndex","hasHref","canHaveHref","nodeName","loLowerCase","canDisable","input","textarea","hasAttribute","getFocusableNodes","nodes","nodesArray","$position","sort","isValid","isShadowDomSupported","createShadowRoot","attachShadow","getActiveElement","activeElement","getSelection","focusNode","getRootNode","ShadowRoot","host","hasShadowParent","dom_helpers","htmlObject","getOffset","getOffsetSum","getOffsetRect","test","navigator","userAgent","dummyBox","selector","insertAfter","newNode","referenceNode","nextSibling","isChildOf","child","contains","Element","matches","msMatchesSelector","webkitMatchesSelector","parentElement","nodeType","isWindowAwailable","env","isOpera","isChrome","isKHTML","isFF","isIPad","isEdge","isNode","clearAll","serialize$1","serialized","encodeURIComponent","Promise","createConfig","url","async","headers","serialize","ajax","serializeRequestParams","parse","DOMParser","parseFromString","ActiveXObject","loadXML","xmltop","tagname","xhr","status","xml","responseXML","xpath","xpathExp","docObj","selectNodes","first","col","ownerDocument","evaluate","XPathResult","ANY_TYPE","iterateNext","query","_call","get","onLoad","getSync","put","postData","del","post","postSync","resolve","reject","XMLHttpRequest","isQt","match","readyState","xmlDoc","filePath","open","setRequestHeader","toUpperCase","send","urlSeparator","$ajax","generateStringToDate","format","utc","splt","code","csp_date_to_str","to_fixed","getUTCDate","getUTCMonth","getUTCFullYear","day_short","getUTCDay","day_full","month_short","month_full","getUTCHours","getUTCMinutes","getUTCSeconds","getSeconds","getUTCISOWeek","getISOWeek","csp_str_to_date","set","temp","month_short_hash","month_full_hash","UTC","cspEnabled","checkIfCSPEnabled","useCsp","csp","old","setSeconds","setMilliseconds","start_on_monday","month_start","setDate","year_start","setMonth","_add_days","inc","ndate","datesDiff","rest","hours","setYear","num","date_to_str","str_to_date","exactFormat","stringToDateMethod","parseExactFormat","yyyyMMddhhIIss","MMddyyyyhhIIss","ddMMyyyyhhIIss","ISO8601","isYMDDate","datestr","isMDYDate","isDMYDate","isISO8601","parseYMD","parseMDY","parseDMY","parse_exact_format","nday","first_thursday","year_number","ordinal_date","week_number","convert_to_utc","default_date","month_date","load_date","week_date","hour_date","date_format","api_date","displayed_event_color","displayed_event_text_color","wide_form","day_column_padding","use_select_menu_space","drag_create","resize_month_events","resize_month_timed","responsive_lightbox","separate_short_events","cascade_event_count","cascade_event_margin","multi_day_height_limit","drag_lightbox","server_utc","touch","touch_tip","touch_drag","touch_swipe_dates","quick_info_detached","icons_edit","icons_select","buttons_left","buttons_right","highlight_displayed_event","delay_render","timeline_swap_resize","$initial","_helpers","parseDate","xml_date","formatDate","xml_format","d1","d2","day_scale_date","month_scale_date","week_scale_date","time_picker","event_date","load_format","event_header","event_class","event_bar_date","event_bar_text","month_events_link","drag_marker_class","drag_marker_content","tooltip_date_format","tooltip_text","calendar_month","calendar_scale_date","calendar_date","calendar_time","_events","_loaded","clear_view","extra_data","event_updated","silent","setEvent","hash","_rendered","changeEventId","new_id","create_getter","create_setter","_changed","is_visible_events","clear_event","in_visible_range","evFirstHour","evLastHour","end_dates_visible","hidden_duration","checkEndDate","get_visible_events","only_timed","stack","filter_event","filter","_is_main_area_event","hold","full","_not_render","_recalculate_timed","tvs","tvd","_rendered_location","buffer","renderedLocation","_view_month_day","_render_month_link","toRender","_sday","_eday","curr","_sweek","getEvents","_get_event_bar_pos","widt","x2","_pre_render_events","render_event_bar","max_evs","max_month_events","_sorder","real","render_event","_get_first_visible_cell","hb","h_old","_pre_render_events_line","_pre_render_events_table","monthRows","cellHeight","cHeight","unshift","scrollHeight","scroll_fix","scale_settings","sum_width","row_heights","full_multi_day_height","used_multi_day_height","used_multi_day_height_css","multi_day_section","multi_day_icon","overflowY","datePart","_get_event_mapped_end_date","ev_duration","_min_mapped_duration","evs_originals","sh","eh","_inner","t_ev","t_end_date","slot_index","sorderSet","_is_sorder","_max_sorder","max_count","_count","_copy_event","_time_order","_is_any_multiday_cell_visible","isAnyCellVisible","checkDate","noCells","lastDayEnd","cellIndex","weekCellIndex","out","weeks","chunks_info","first_chunk","last_chunk","chunk_info","locate_s","locate_e","_length","stack_line","_first_chunk","_last_chunk","_copy_dummy","_y_from_date","sm","_calc_event_y","min_height","em","parentWidth","menu","menu_offset","pos_y","ev_count","ev_sorder","margin","_render_v_bar","_text_style","parentPosition","zIndex","color","setProperty","tplClass","cssText","_editor","shiftKey","keyCode","icons","icons_str","ariaAttr","currentIcon","textColor","highlightEventPosition","contentA","contentB","cs","cse","boxWidth","renderEvent","inner_html","footer_class","_drag_resize","past","_get_dnd_order","ev_height","max_height","_orig_sorder","evTop","columns","y_event_offset","resize_handle","resizable","left_chunk","right_chunk","resize_left","resize_right","timed","bg_color","style_text","_edit_stop_event","getRenderedEvent","rendered_events","rendered_event","showEvent","original_color","original_text_color","restoreOriginalColors","getSectionTop","posFromDate","_smartRenderingEnabled","scrollTo","_append_drag_marker","m","zone","scale","lastChild","previousSibling","_update_marker_position","_parsers","canParse","topElement","loader","csrfToken","security_key","arr","itms","itm","nodeValue","ud","udx","_xmlNodeToJSON","_userdata","_init_event","json","err","events","dhx_security","collections","collections_loaded","option","option_key","ical","c_start","c_end","incoming","event_r","e_start","e_end","exec","param","param_r","parse_param","substr","dh","dm","utcMark","dn","getSerializator","_load_url","prevent_cache","ajaxCallback","response","on_load","lf","cache_line","temp_to","xmlLoaded","jsonLoader","iCalLoader","foundParser","parser","_process","_process_loading","_after_call","_tagvalue","_init_date","getSerializableData","createSerializator","dataset","allEvents","exportedEvent","exportValue","rawValue","load","setLoadMode","array","show_loading","_y","_lightbox_controls","formSection","getLightbox","getValue","form_blocks","get_value","setValue","set_value","get_template_control","control","get_select_control","get_textarea_control","get_time_control","defaults","template","time","sns","placeholder","_get_input","_dhx_onchange","onchange","time_format","_time_format_order","dt","last","limit_time_select","selectBoxClass","range","start_year","end_year","year_range","tdate","_time_values","ariaAttrs","full_day","_full_day","checked","disabled","_fill_lightbox_select","auto_end_date","_update_lightbox_select","time_values","direct_value","fixed_value","value_found","t_v","selectedIndex","original","getLightboxRoot","cspEnvironment","salesforceEnvironment","showCover","show_cover","_cover","_fill_lightbox","lightbox_header","headerContent","headerDate","headerTitle","current_sns","_get_lightbox_section_node","default_value","_lightbox_out","_empty_lightbox","hide_lightbox","endLightbox","hide_cover","_move_while_dnd","_finish_dnd","save_lightbox","startLightbox","_custom_lightbox","_temp_lightbox","cancel_lightbox","hideLightbox","_init_lightbox_events","buttonTarget","sectionButton","button_click","action","readonly_active","setLightboxSize","_init_dnd_events","_dnd_start_lb","dhx_unselectable","lb","_lb_start","_ready_to_dnd","recurring","_lightbox_template","label_name","ds","t_ds","_bindLightboxLabels","labelBlock","inputBlock","fallback","inputId","old_id","mobile","MSStream","platform","maxTouchPoints","touchEventsSupported","createEvent","_touch_events","touches","PointerEvent","pointerEnabled","pointerType","msPointerEnabled","MSPOINTER_TYPE_MOUSE","accessor","tracker","scroll_mode","action_mode","dblclicktime","attachTouchEvent","passive","check_direction_swipe","s_ev","e_ev","max_dy","scrollable","doMouseMove","dnd","original_render","_update_global_tip","drag_cancel","_pointerDragId","pointerId","fake_event","_block_next_stop","actTask","fakeTask","sourceTask","_show_global_tip","_hide_global_tip","toptip","_global_tip","drag_to_create","drag_to_move","getRootView","tag","hooks","didInsert","cmp","_addThemeClass","skin","_skin_settings","_skin_xy","lightbox_additional_height","checkIfMaterialSkin","themeNameFromFile","links","href","_build_skin_info","monitorThemeChange","styles","themeVar","isCssVarTheme","themeName","cssValues","oldMaterialTheme","_theme_info","theme","cssVarTheme","themeVariables","calculatedMaterial","probe","cachedBorderBoxValue","checkIfBorderBoxStyling","boxSizing","refreshAfterLoad","_border_box_events","oldStyling","newStyling","_configure","setSkin","flatSkinHourScale","monitorIntervalId","clearInterval","setInterval","csstheme","_old_month_day","old_month_day","reorderTabs","specialTabs","tabName","find","firstTab","reverse","jQuery","$","counter","fn","dhx_scheduler","each","Scheduler","getSchedulerInstance","comp","update_view_timer","curr_view_timer","lazy_setCurrentView","self","oldDate","oldMode","updateFlags","lazy_updateView","ars","DataProcessorEvents","dp","$scheduler","$dp","_dataProcessorHandlers","_validId","setUpdated","z","_in_progress","_invalid","updatedRows","_waitMode","_update_callback","upd","setUserData","action_param","_add_rec_marker","extendScheduler","_is_virtual_event","getUserData","_set_event_text_style","rec_pattern","_dp_change_event_id","_dp_hook_delete","setDp","DataProcessor","serverProcessorURL","serverProcessor","autoUpdate","_tMode","_headers","_payload","post_delim","messages","updated","inserted","deleted","invalid","invalid_cell","enableUTFencoding","setTransactionMode","total","_tSend","_endnm","_serializeAsJson","_router","router","escape","_utf","setDataColumns","_columns","getSyncState","enableDataNames","enablePartialDataSend","master","rowId","findRow","existing","set_invalid","is_invalid","markRow","_methods","getActionByState","checkBeforeUpdate","sendAllData","_beforeSendData","_getRowData","_sendData","_serializeAsJSON","serialize_one","pref","_applyPayload","dataToSend","_onResolvedCreateUpdate","resultState","sid","tid","afterUpdateCallback","routerMode","actionPromise","update","then","catch","queryParams","afterUpdate","urlParams","_user","_cleanupArgumentsBeforeSend","preprocessedData","_cleanupItemBeforeSend","valid","_forEachUpdatedRow","_getAllData","has_one","pattern","defineAction","_uActions","btag","marker","correct","originalSid","_errorResponse","cleanUpdate","_setDefaultTransactionMode","_serverProcessor","that","finalizeUpdate","atag","_initialized","_dp_init","dataProcessorEvents","_dataprocessor","setOnAfterUpdate","setOnBeforeUpdateHandler","setAutoUpdate","interval","user","_need_update","_update_busy","xml_node","afterAutoUpdate","fullSync","intervalId","loadUpdate","getUpdates","_getXmlNodeValue","version","vers","updates","processedData","updatedItem","output","item","processedItem","prop","_prepareItemForJson","_prepareItemForForm","_prepareDataItem","dataItem","createDataProcessor","tMode","boxAttribute","_dhx_msg_cfg","usercall","modalBox","modal_key","which","messageBox","keyboard","domHelpers","modality","cover","classValue","buttonAriaAttrs","buttonCss","info","timers","pull","getFirstDefined","_boxStructure","contentId","inner","message_ok","message_cancel","btn","_createBox","hidden","alertPopup","confirmPopup","boxPopup","box_params","params","alertBox","confirmBox","focusable","subtype","seed","hideAll","popups","modalbox","ar","day_tab","week_tab","month_tab","icon_save","icon_cancel","section_description","section_time","confirm_recurring","section_recurring","button_recurring","button_recurring_open","button_edit_series","button_edit_occurrence","grid_tab","repeat_radio_day","repeat_radio_week","repeat_radio_month","repeat_radio_year","repeat_radio_day_type","repeat_text_day_count","repeat_radio_day_type2","repeat_week","repeat_text_week_count","repeat_radio_month_type","repeat_radio_month_start","repeat_text_month_day","repeat_text_month_count","repeat_text_month_count2_before","repeat_text_month_count2_after","repeat_year_label","select_year_day2","repeat_text_year_day","select_year_month","repeat_radio_end","repeat_text_occurences_count","repeat_radio_end2","repeat_radio_end3","repeat_never","repeat_daily","repeat_workdays","repeat_weekly","repeat_monthly","repeat_yearly","repeat_custom","repeat_freq_day","repeat_freq_week","repeat_freq_month","repeat_freq_year","repeat_on_date","repeat_ends","month_for_recurring","day_for_recurring","be","agenda_tab","description","year_tab","week_agenda_tab","ca","cn","da","de","en","es","fi","fr","he","hu","it","jp","LocaleManager","_locales","nb","nl","no","pl","pt","ro","ru","si","sk","sv","tr","ua","i18nFactory","DatePicker","modes","currentRange","eventDates","filterDays","currentModeIndex","onStateChangeHandlers","_domEvents","onStateChange","oldState","newState","_notifyStateChange","newDate","setFullYear","setState","newIndex","backwardArrow","monthLabel","innerText","toLocaleString","startYear","_toggleMode","forwardArrow","_adjustDate","_renderCalendarHeader","dataContainer","_renderDayGrid","_renderMonthGrid","_renderYearGrid","daysOfWeekContainer","currentDate","labelFormat","dayElement","currWeek","minWeeks","minSchedulerDate","maxSchedulerDate","eventDaysTable","reduce","dayStart","_renderDayGridHeader","weekLength","children","firstDate","monthStart","monthEnd","lastDate","currentCalDate","_weeksBetween","dayGridContainer","dateCell","wrapper","months","formatLabel","monthElement","doneArea","doneBtn","yearElement","factoryMethod","extensionManager","stateProvider","common_errors","schedulerCore","wai_aria","dom","_createDatePicker","_getFocusableNodes","_locate_css","messageApi","event_highlight","dhtmlx_suite_hooks","skins","jquery","dataProcessorExtend","connector","i18n","addLocale","setLocale","localeObject","getLocale","dhx_save_btn","dhx_cancel_btn","dhx_delete_btn","addPlugins","ext","activePlugins","plugins","extensionList","getExtensionList","treetimeline","daytimeline","outerdrag","legacy","plugin","getExtension","dependencies","priorities","extension","dep","dependencyName","orderA","orderB","ExtensionsManager","_extensions","SchedulerFactory","extensions","_seed","_schedulerPlugins","_bundledExtensions","_extensionsManager","initConfig","_internal_id","$syncFactory","_initFromConfig","calendars","addCalendar","active_links","active_link_view","_active_link_click","s_d","do_wrapper","fullname","week_x","d_s","agenda_legacy","add_agenda_legacy","agenda_legacy_time","agenda_legacy_text","agenda_legacy_date","agenda_legacy_start","old_dblclick_dhx_cal_data","dblclick_dhx_cal_data","fill_agenda_tab","old_render_view_data","_agendaScrollTop","set_full_view","l","rowAttr","dateHeader","descriptionHeader","tableAttr","ev_class","agendaDetailsButtonAttr","agenda_time","agenda_text","agenda_area","v_border","dateElement","agenda_date","agenda_legacy_view","agenda_start","agenda_end","agenda_view","add_agenda","dayDateToStr","dayDowToStr","agenda_day","eventsInDays","anyEvents","renderEmptyView","ignore_agenda","renderDay","calendarEvent","renderOneEvent","selectedId","bg","all_timed_month","is_event_short","_safe_copy","proto","event_pid","isPrototypeOf","event_length","old_prerender_events_line","old_prerender_events_table","prerender_events","ce","_virtual","isOvernightEvent","getNextDay","setDateTime","event_changed","re","redraw","next_day","old_get_visible_events","old_mode","old_date","oldUpdate","fullRedrawNeeded","collision","temp_section","before","collision_limit","_setTempSection","event_id","checked_mode","checkCollision","edited_ev","rrule","recurring_event_id","_roll_back_dates","_check_sections_collision","second","evs_dates","getRecDates","tevs","concurrent","_pid_time","single","container_autoresize","month_day_min_height","min_grid_size","min_map_size","old_pre_render_event","active","total_height","multiday_height","evl","_h_fix","navHeight","headerHeight","checked_divs","updateContainterHeight","is_repaint","checked_div","maxHeight","rows_length","year_y","week_agenda_scale_height","cur_height","eventsContainer","g","_gridView","y_unit","getSectionHeight","scrollWidth","getScrollSize","callUpdate","conditionalUpdateContainerHeight","asyncRepaint","requestAnimationFrame","autosizeEnabled","$original_scroll_width","$original_section_autoheight","section_autoheight","cookie","setCookie","cookie_param","getCookie","getCookieName","_get_url_nav","urlNavigationPlugin","schedulerCookie","unescape","newMode","old_load","notImplemented","daytimeline_restricted","drag_between_restricted","editors","cached_options","resetCombo","_combo","DOMParent","combo","unload","DOMelem","dhx_globalImgPath","image_path","dhtmlXCombo","options_height","setOptionHeight","enableFilteringMode","filtering","script_path","all_options","single_option","addOption","getIndexByValue","selectOption","selected_id","disable","setComboValue","getSelectedValue","getSelectedText","vertical","radiobuttons","checked_value","isChecked","check_html","label_html","checkbox","unchecked_value","expand","fullscreen","toggleIcon","_position","_width","_height","_overflow","overflow","_maximize","collapse","directions","prev_margin","grid_view","html_templates","all","keyboard_shortcuts","$keyboardNavigation","shortcuts","createCommand","modifiers","alt","ctrl","meta","shortcut","commands","expr","getExpressions","words","getWords","command","commandKeys","specialKeys","charCodeAt","getCommandFromEvent","domEvent","altKey","ctrlKey","metaKey","printableKey","fromCharCode","getHashFromEvent","getHash","parts","junctionChar","term","combinationChar","backspace","enter","esc","space","up","down","home","pageup","pagedown","insert","plus","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10","f11","f12","eventhandler","EventHandler","_handlers","findHandler","doAction","unbind","bindAll","initKeys","trap_modal_focus","trapFocus","currentFocus","currentIndex","nextIndex","nextItem","renderMultiple","currentStart","currentEnd","TimeSlot","_modes","_getMode","renderVerticalMarker","renderTimelineMarker","renderYearMarker","renderMonthMarker","weekAgenda","renderWeekAgendaMarker","renderAgendaMarker","dayColumns","addWaiAriaLabel","addDataAttributes","dateToStr","dateTimeLabel","sectionObject","markerDate","_wrapDiv","_get_year_cell","opacity","view_opts","round_position","_trace_x","_is_column_visible","start_pos","end_pos","set_date_part","_timeline_getX","tempStart","tempEnd","_section_height","_isRender","renderMonthCell","weekNumber","dayIndex","datatable","lineHeight","scheduler_node","SchedulerNode","_compose","getDefaultNode","getMode","blur","enable","removeAttribute","_compareEvents","_pickEvent","startId","eventElement","Event","getNode","nextEventHandler","activeNode","dispatcher","nextEvent","currEvent","visibleDates","nextEv","setActiveNode","prevEventHandler","HeaderCell","getNodes","_key_nav_copy_paste","nav_node","KeyNavNode","moveTo","compareTo","canStringifyThis","canStringifyThat","header_cell","defaultCell","_getSection","_getNodes","defaultElement","isScrolledIntoView","eventBox","viewPort","idSelector","inlineEditor","getInlineEditor","isMultisectionEvent","keepScrollPosition","_moveToSlot","slot","nextSlot","time_slot","movingDate","getDefaultDate","key_nav_step","_getDefaultSection","visibleTime","nowTime","showNowTime","findVisibleColumn","clone","timeslot","_getMultisectionView","_getNextSection","isInRange","defaultSlot","DataArea","smart_rendering","_pasteDate","_pasteSection","addMonthDate","nextMonthSlot","_alignTimeSlot","nextTimelineSlot","newPos","nextUnitsSlot","optionsCount","nextDaySlot","_moveDate","isBeforeLastHour","isStartDate","minutes","isAfterFirstHour","isInVisibleDayTime","oldStart","toNextDay","testEnd","nextWeekAgendaSlot","nextAgendaSlot","isDateVisible","nextDateColumn","current","tempSlot","extendSlot","extendUnitsSlot","extendTimelineSlot","extendMonthSlot","extendDaySlot","extendWeekAgendaSlot","extendGenericSlot","allowedDirections","moveDate","newDates","extendSlotDates","oldSlot","newSlot","dateDirection","scrollSlot","minical_button","MinicalButton","globalNode","MinicalCell","minical_cell","_getGrid","_getNode","enabled","newRow","newCol","modals","modalsStack","isModal","afterPopup","startModal","endModal","isTopModal","currentTarget","traceLightbox","_keyNavMessagePopup","focusElement","backupFocus","core","getActiveNode","setDefaultNode","focusGlobalNode","blurNode","editor","keyDownHandler","defaultPrevented","schedulerNode","_timeout","key_nav_legacy","_temp_key_scope","key_nav","isCopy","trackMousePosition","mousePointer","keyNavPointer","elementFromPoint","clear_event_after","copyEvent","_make_pasted_event","multisection","_do_paste","is_copy","modified_ev","original_ev","_is_key_nav_active","getSelectedEvent","_buffer_event","new_ev","scheduler_handlers","attachSchedulerHandlers","focusHandler","waitCall","reFocusActiveNode","mousedownHandler","dataAreaClick","listOfScales","arrOfScales","some","focusEvent","evNode","prevState","lastStart","lastEnd","lastSection","minical_handlers","_minicalendars","isMinical","minicalendars","patchMinicalendar","focusMinical","minicalClick","rowIndex","td","renderMinical","cal","added","destroyMinical","_def_count","addShortcut","scope","scopeObject","getScope","getShortcutHandler","removeShortcut","disp","scopes","minicalButton","minicalDate","timeSlot","searchMap","attachOnce","isSchedulerSelected","changeState","layer","layers","validId","_clearUpdateFlag","_cloneObj","_dataprocessors","_layers_zindex","initial_layer_zindex","isDefault","defaultLayer","showLayer","tlayer","toggleLayer","hideLayer","visible","getLayer","layer_name","native_event_object","noMenu","_evs_layer","_t_render_view_data","evs_layer","borderBox","borderBoxWidth","headerWidth","bodyWidth","footerWidth","bodyHeight","new_zIndex","filter_agenda","limit_view","_temp_limit_scope","om","od","nm","nd","isBlocked","date_end","resetDate","is_new_event","data_copy","native_object","_mark_now_timer","GoogleMapAdapter","_markers","zoom","zoom_after_resolve","initial_zoom","lat","lng","setCenter","setZoom","error_position","google","maps","trigger","mapOptions","center","initial_position","mapId","scrollwheel","mapTypeId","Map","__gm","messageOverlay","outerContainer","setOptions","addListener","geocoder","Geocoder","point","latLng","geocode","results","GeocoderStatus","OK","geometry","location","event_location","formatted_address","clearInstanceListeners","addEventMarker","AdvancedMarkerElement","importLibrary","mapView","createMarker","setMap","infoWindow","close","InfoWindow","maxWidth","info_window_max_width","setContent","map_info_content","anchor","markerInfo","setVisible","setPosition","latlng","LatLng","latitude","longitude","resolveAddress","string","address","OpenStreetMapAdapter","openPopup","closeTooltip","setView","mapWrapper","L","tileLayer","addTo","on","fetch","country","myIcon","iconUrl","iconSize","shadowSize","iconAnchor","shadowAnchor","popupConfig","minWidth","markerPopup","popup","tooltip","markerConfig","bindPopup","bindTooltip","removeLayer","setLatLng","clearEventMarkers","lon","MapboxAdapter","getPopup","isOpen","togglePopup","mapboxgl","accessToken","lngLat","features","place_name","Popup","focusAfterOpen","setMaxWidth","setHTML","Marker","setLngLat","setPopup","map_view","mapAdapter","eventHandlerIds","adapters","googleMap","openStreetMaps","mapbox","createAdapter","map_view_provider","currentAdapter","_latLngUpdate","_eventLocationChanged","map_settings","resolve_user_location","resolve_event_location","view_provider","map_initial_position","map_error_position","map_date_width","map_icon_width","map_description_width","add_map","map_date","map_time","map_text","map_start","setupMapView","attachSchedulerEvents","addEventWithLocation","coordinates","removeEventMarker","setUserLocation","adapter","geolocation","getCurrentPosition","coords","dblclick_dhx_map_area","unmodifiedEvent","updateEventMarker","newIdEvent","onEventClick","detachSchedulerEvents","map_initial_zoom","map_zoom_after_resolve","map_infowindow_max_width","map_resolve_user_location","map_type","map_resolve_event_location","fill_map_tab","map_end","mapContainer","_setMapSize","destroy","initialize","elem_id","marginRight","marginTop","_selected_event_id","ariaButtonAttr","_updateEventLocation","_delay","ret","_event_resolve_delay","minical","minicalDomEvents","minicalendar","mark_events","_synced_minicalendars","_prev","is_refresh","cont","tpos","_get_def_cont","_render_calendar","$dom","cellRoot","dateAttribute","unmarkCalendar","markCalendar","_last_date","conf","markedDates","_markCalendarCurrentDate","sync","_on_xle_handler","refreshOnLoad","updateCalendar","_created","_locateCalendar","weekNum","dat","dayCell","_week_template","week_template","dummy_date","_mini_cal_arrows","previous","ts","temp2","temp3","temp4","temp5","temp6","temp7","temp8","padding","weekHeader","move_minicalendar_date","css_classnames","css_texts","diffs","arrow","dayHeaders","dayCells","inputs","selects","inp","number","new_date","_update_minical_select","isFulldayEvent","_attach_action","_round_minutes","linkCalendar","datediff","dateNew","month_end","noHighlight","monthheight","old_s","multisection_restricted","multiselect","parseXMLOptions","parseJSONOptions","_result","_children","_mark_inputs","_ids","delimiter","script_url","divLoading","multisource","backup","mvc","use_id","sanitize","update_timer","_start_ext_load","_finish_ext_load","_get_id","model","cid","backbone","toJSON","changes","queue","add_from_queue","Backbone","Collection","dragger","dhtmlDragAndDropObject","stopDrag","last_event","on_drop","sourceHtmlObject","dhtmlObject","targetHtmlObject","targetHtml","action_data","event_data","view_options","_locate_cell_timeline","addDragLanding","_drag","_dragIn","shtmlObject","_dragOut","DragControl","addDrop","onDrop","sourceDhtmlx","getMaster","onDragIn","pdf","html_regexp","newline_regexp","clean_html","x_norm","parseFloat","colsWidth","x_norm_event","is_left","dhx_cal_header","y_norm","get_style","de_day","de_week","xml_start","xml_end","xml_top","profile","footer","xml_body_header","dhx_cal_date","xh","xml_month_scale","xml_month","yh","xhs","second_scale","top_width","top_col","xml_body","colors","week_starts","_month","text_color","zx","zdx","left_norm","zy","zdy","e_type","dets","week","dy_copy","toXML","original_date","original_mode","temp_date","getPDFData","send_xml","submit","to_pdf","schedulersToPdf","objects","toPDF","toPDFRange","quick_info","show_quick_info","clickedElementPosition","_$quickInfoHandler","getPositionInsideScheduler","showQuickInfo","hiding_function","hideQuickInfo","quick_info_title","quick_info_content","quick_info_date","_quick_info_box_id","_get_event_counter_part","_quick_info_box","_init_quick_info","_fill_quick_data","_show_quick_info","cssTimeToMs","milliseconds","forced","qi","_x_scroll","dataPos","ontransitionend","fitQIInsideWindow","quickInfoPopup","popupRect","containerRect","offsetBottom","_quick_info_onscroll_handler","$testmode","_qi_button_click","domEv","titleContent","titleDate","main","mainContent","originalRecurringSetValue","original_left_buttons","original_right_buttons","readonly_form","forbidden_buttons","button_arrays","forbidden_button","button_array","txt_replace","txts","txtt","originalForm","readonlyForm","_lightbox_r","ALL_WEEKDAYS","Weekday","weekday","fromStr","nth","other","getJsWeekday","isPresent","isNumber","isWeekdayStr","includes","rang","repeat","times","toArray","padStart","targetLength","padString","sep","splits","pymod","divmod","mod","empty","notEmpty","datetime","MONTH_DAYS","ONE_DAY","MAXYEAR","ORDINAL_BASE","PY_WEEKDAYS","isLeapYear","isValidDate","daysBetween","date1","date2","date1ms","date2ms","differencems","toOrdinal","fromOrdinal","ordinal","getMonthDays","getWeekday","monthRange","combine","getMilliseconds","dolly","cloneDates","clones","timeToUntilString","untilStringToDate","until","bits","dateTZtoISO8601","timeZone","dateStr","dateInTimeZone","localTimeZone","Intl","DateTimeFormat","resolvedOptions","dateInLocalTZ","dateInTargetTZ","tzOffset","IterResult","after","accept","tooEarly","tooLate","extendStatics","setPrototypeOf","__proto__","__extends","TypeError","__","__assign","assign","__spreadArray","pack","SuppressedError","suppressed","CallbackIterResult","_super","iterator","_this","ENGLISH","dayNames","monthNames","tokens","SKIP","numberAsText","every","at","the","third","for","monday","tuesday","wednesday","thursday","friday","saturday","sunday","january","february","march","april","may","june","july","august","september","october","november","december","comma","defaultGetText","defaultDateFormatter","ToText","gettext","language","dateFormatter","origOptions","bymonthday","bynmonthday","byweekday","allWeeks","someWeeks","isWeekdays","isEveryDay","sortWeekDays","isFullyConvertible","canConvert","freq","IMPLEMENTED","RRule","FREQUENCIES","plural","HOURLY","MINUTELY","DAILY","bymonth","_bymonth","_bymonthday","_byweekday","byhour","_byhour","WEEKLY","MONTHLY","YEARLY","byyearday","byweekno","weekdaytext","monthtext","npos","wday","finalDelim","delim","delimJoin","finalDelimiter","o","realCallback","Parser","rules","done","nextSymbol","isDone","symbol","best","bestSymbol","rule","name_1","v","acceptNumber","expect","parseText","ttr","S","AT","F","MO","TU","WE","TH","FR","ON","wkd","decodeWKD","MDAYs","decodeM","decodeNTH","Frequency","freqIsDailyOrGreater","fromText","toText","Time","millisecond","DateTime","fromDate","getYear","addYears","years","addMonths","yearDiv","monthMod","addWeekly","wkst","fixDay","addDaily","addHours","filtered","_a","dayDiv","hourMod","addMinutes","byminute","hourDiv","minuteMod","addSeconds","seconds","bysecond","minuteDiv","secondMod","daysinmonth","SECONDLY","initializeOptions","_i","keys_1","defaultKeys","parseOptions","DEFAULT_OPTIONS","byeaster","dtstart","bysetpos","bynweekday","parsedOptions","buildTimeset","millisecondModulo","timeset","parseString","rfcString","parseLine","parseDtstart","line","dtstartWithZone","tzid","parseRrule","strippedLine","Days","parseNumber","optionKey","parseWeekday","parseIndividualNumber","SyntaxError","wdaypart","DateWithZone","RangeError","defineProperty","enumerable","configurable","isUTC","rezonedDate","optionsToString","outValue","buildDtstart","strValues","ruleString","argsMatch","Cache","between","_cacheAdd","what","_value","_cacheGet","cached","argsKeys","findCacheDiff","cachedObject","iterResult","M365MASK","M366MASK","M28","M29","M30","M31","MDAY366MASK","MDAY365MASK","NM28","NM29","NM30","NM31","NMDAY366MASK","NMDAY365MASK","M366RANGE","M365RANGE","WDAYMASK","wdaymask","rebuildYear","firstyday","yearlen","nextyearlen","yearordinal","yearweekday","baseYearMasks","wnomask","firstwkst","wyearlen","no1wkst","numweeks","lnumweeks","lyearweekday","lno1wkst","lyearlen","weekst","mmask","mdaymask","nmdaymask","mrange","rebuildMonth","lastyear","lastmonth","nwdaymask","ranges","easter","yearStart","Iterinfo","rebuild","yearinfo","monthinfo","eastermask","ydayset","mdayset","_","wdayset","ddayset","htimeset","mtimeset","stimeset","getdayset","gettimeset","buildPoslist","ii","dayset","poslist","daypos","timepos","tmp","iter","emitResult","counterDate","makeTimeset","removeFilteredDays","rezoneIfNeeded","currentDay","isFiltered","dayCounter","SA","SU","noCache","_cache","fromString","_iter","isFullyConvertibleToText","iterSet","_rrule","_exrule","_rdate","_exdate","_exdateHash","_accept","evalExdate","zonedDate","unfold","forceset","compatible","parseInput","rrulevals","rdatevals","exrulevals","exdatevals","parsedDtstart","lines","splitIntoLines","_b","breakDownLine","parms","_c","rdateTzid","parseRDate","buildRule","rset_1","RRuleSet","groomRruleOptions","rdate","exrule","exdate","rrulestr","extractName","validateDateParm","parm","rdateval","createGetterSetter","fieldName","field","field_1","_addRule","_addDate","rrules","exrules","rdates","exdates","_dtstart","rdatesToString","rrs","clearMilliseconds","isDeletedOccurrence","isSeries","clearRecurringProperties","original_start","createException","nid","nev","toUTCDate","setUTCPartsToDate","_rec_temp","_rec_markers_pull","_rec_markers","_get_rec_marker","ch","_get_rec_markers","old_add_event","ev_id","_ignore_call","tev","_pid_changed","deleteEventFromSeries","idTimestamp","_is_modified_occurence","sub","isEventFound","_start_date","showLightbox_rec","lightbox_recurring","pid","isVirtual","showSeries","title_confirm_recurring","groupExceptions","exceptions","get_visible_events_rec","repeat_date","old_update_event","toIcalString","non_render","maxCount","seriesExceptions","utcStart","parsedRRule","repeatedDates","adjustedDate","visibleCount","eventDuration","exception","_fix_daylight_saving_date","recurrings","sev","occurence","include_end_by","recurring_workdays","getTopLevelOption","rruleObj","untilDate","hasEndCondition","getWeekdayOfMonth","dayOfWeek","dayOfMonth","dayNumber","jsDaysToRRULEDays","RruleDayNumsToJs","fillCustomDaily","fillCustomWeekly","dayCheckboxes","dayNum","dayLabel","fillCustomMonthly","dateOfMonth","nthWeekDayOfMonth","repeat_monthly_date","repeat_monthly_weekday","formatDayNumber","nthDayOfMonth","repeat_yearly_month_date","repeat_yearly_month_weekday","fillCustomYearly","dateOfYear","nthWeekDayOfYear","fillEndRule","countInput","ondateInput","endOptionSelect","formatter","repeat_date_of_end","dispatchEvent","getRecValue","WORKDAYS","CUSTOM","monthRepeat","yearRepeat","formatFunc","endRule","NEVER","fillInDefaults","rec","_get_node","_outer_html","loc","_init_set_value","_ds","show","onRepeatOptionChange","onCustomRepeatIntervalChange","weekly","monthly","yearly","onCustomRepeatEndRule","_rec_init_done","rf","blocked","rruleset","topOption","customFreq","actual_dates","timeControl","getTimeSection","recurrence","_start","getFirstSectionOfType","recurring_legacy","occurrence_timestamp_in_utc","outerHTML","getOuterHTML","_get_form_node","_get_node_value","_get_node_numeric_value","_set_node_value","hash_value","str_date_format","str_date","date_str","register_els","inps","change_current_view","get_repeat_code","get_rcode","get_end_rule","transpose_type","transp","set_end_rule","has_values","_get_repeat_code","get_numeric_value","repeat_precise","start_exists","transpose_day_week","set_rcode","set_repeat_code","MouseEvent","_set_repeat_code","elements","_toggle_block","_get_button","getRecurringSection","_get_form","backgroundPosition","transponse_size","day_week","originalMonth","cday","newMonth","cor","cor2","transposeRecurring","recurringParts","dayDurationMs","addRecurring","recurringStepDays","weekDays","seriesInstance","currentCount","origMonth","origYear","correctOverflowInstances","recurring_overflow_instances","startHour","ted","data_attributes","all_events","_serialize_json_value","toICal","full_day_format","timeline_restricted","Tooltip","_scheduler","_tooltipNode","_root","_isLikeMouseEvent","_calculateTooltipPosition","viewport","_getViewPortSize","tooltipNode","offsetX","tooltip_offset_x","offsetY","tooltip_offset_y","mouse","containerPos","scrollY","_getViewPort","scrollX","$event_data","$event","TooltipManager","_listeners","_initDelayedFunctions","hideTooltip","delayHide","watchableTarget","eventTarget","targetNode","doOnMouseEnter","onmouseenter","touch_tooltip","onmouseleave","onmousemove","listener","cloneDomEvent","delayShow","utils.default","tooltip_timeout","tooltip_hide_timeout","tooltipManager","tooltips","tooltipFor","targetEventId","treetimeline_restricted","units_restricted","s2d","d2s","select_event","week_agenda_restricted","wp","year_view","year_date","year_month","year_scale_date","year_tooltip","isYearMode","getCellDate","dblclick_dhx_year_grid","_year_render_event","_year_marked_cells","_hideToolTip","_tooltip","_showToolTip","_year_view_tooltip_handler","_init_year_tooltip","_mark_year_date","_unmark_year_date","_reset_year_scale","year_top","ssd","yearBox","year_x","datepicker","ignore_year","locateEvent","export_api","std","getElementSizes","sizes","dhtmlxAjax","dhx4","add_export_methods","orientation","dpi","_export_html","_send_to_export","exportToICal","_serialize_plain","exportToExcel","_serialize_columns","_ajax_to_export","server","fail","_plain_export_copy","$text","_create_hidden_form","_hidden_export_form","_get_export_size","A5","A4","A3","A2","A1","A0","dataX","dataY","headY","multY","cSize","getTimeline","getInitialSizes","smartRendering","style_width","style_height","timeline_scrollable","timeline_smart_rendering","setExportSizes","initialSizes","setInitialSizes","gplExtensions","drag_between","factory","$dhx"],"mappings":";;;;;;;;;AACe,SAAAA;AAEf,MAAWC,OAAAA,UAAU,eAAeA,OAAOC,UAAU;AACpDD,WAAOC,SAASC,kBAAkB,SAAUC,KAAKC,MAAMC,MAAMC;AAC5D,UAAID,OAAOA,QAAQ;AACnB,UAAIE,MAAMC,SAASC,cAAc,KACjCF;AAAAA,UAAIG,KAAK,iBAAiBC,KAAKC,QAAQ,EACvCL;AAAAA,UAAIM,YAAY,cAAcN,IAAIG,KAAK,qPAAqPL,OAAO;AACnSG,eAASM,KAAKC,YAAYR,IAAIS,UAE9BL;AAAAA,WAAKM,aAAaV,IAAIG,IAAI,OAAO,IAEjCC;AAAAA,WAAKO,GAAGP,KAAKQ,EAAAA,EAAIC,QAAQd;AACzBK,WAAKO,GAAGP,KAAKQ,IAAIE,UAAUd,IAAIG;AAC/BJ,MAAAA,WAAUgB,WAAWhB,WAAUiB;AAC/BjB,MAAAA,WAAUkB,aAAa,WAAA;AAAA;AACvBlB,MAAAA,WAAUmB,KAAKlB,IAAIG,IAAIP,KAAKC,IAE5B;AAAA,aAAOO,KAAKO,GAAGP,KAAKe,gBAAgBN;AAAAA,IACtC;AAAA,EACA;AAEA;;ACrBA,IAAIO;AACJ,IAAA,OAAUC,WAAW,aAAY;AAChCD,gBAAcC;AACf,OAAK;AACJD,gBAAcE;AACf;AAGA,MAAAC,WAAeH;ACVA,SAASI,iBAAiBzB,YACrC;AAAA,MAAI0B,aAAa,CAAA;AACjB,MAAIC,cAAc;AAClB,MAAIC,YAAY;AAChB,MAAIC,SAAQ;AAEZ,WAASC,aAAAA;AACL,WAAO9B,WAAU+B,OAAOC,kBAAkBhC,WAAUiC;AAAAA,EACvD;AAED,WAASC,cAAcC,U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AU,IAAI7oD,iBAAiB2oD;AAEhC,MAACtwH,YAAYwwH,QAAQzgE,qBACrB;AAAA,MAACD,cAAY,EACjBkX,QAAQhnE,UAAUijB,KAAKutG,QAAQxpD,QAAQwpD,OAAAA,EAAAA;AAGxClvH,OAAOtB,YAAYA;AACnBsB,OAAOwuD,YAAYA;AAEnB,IAAIxuD,CAAAA,OAAOmvH,MAAM;AAChBnvH,SAAOmvH,OAAO;AACf;AAEAnvH,OAAOmvH,KAAKzwH,YAAYA;AACxBsB,OAAOmvH,KAAK3gE,YAAYA;","x_google_ignoreList":[126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153]} \ No newline at end of file diff --git a/codebase/sources/dhtmlxscheduler.js b/codebase/sources/dhtmlxscheduler.js index ea87263..0b4350e 100644 --- a/codebase/sources/dhtmlxscheduler.js +++ b/codebase/sources/dhtmlxscheduler.js @@ -1,7 +1,16 @@ (function(global2, factory) { typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.dhtmlxscheduler = {})); })(this, function(exports2) { - "use strict"; + "use strict";/** @license + +dhtmlxScheduler v.7.1.3 Standard + +To use dhtmlxScheduler in non-GPL projects (and get Pro version of the product), please obtain Commercial/Enterprise or Ultimate license on our site https://dhtmlx.com/docs/products/dhtmlxScheduler/#licensing or contact us at sales@dhtmlx.com + +(c) XB Software Ltd. + +*/ + function dhtmlxHook() { if (typeof dhtmlx != "undefined" && dhtmlx.attaches) { dhtmlx.attaches.attachScheduler = function(day, mode, tabs, scheduler2) { @@ -138,7 +147,7 @@ let unitMarkersArray = []; const { event: event3, layout, viewName, eventNode: eventNode2 } = settings; let sectionPropertyName = checkSectionPropertyName(viewName); - if (scheduler2.config.multisection && sectionPropertyName) { + if (sectionPropertyName) { const sections = String(event3[sectionPropertyName]).split(scheduler2.config.section_delimiter); const formatedSections = sections.map((element) => String(element)); const elems = []; @@ -3193,7 +3202,7 @@ } else { excludedDuration += intervalEnd.getHours() * 60 * 60 * 1e3 + intervalEnd.getMinutes() * 60 * 1e3; } - if (intervalStart.valueOf() < leftCellCutOffEnd.valueOf()) { + if (intervalStart.valueOf() <= leftCellCutOffEnd.valueOf()) { excludedDuration += config._end_correction; } if (intervalStart.valueOf() < leftCellCutOffStart.valueOf()) { @@ -8481,7 +8490,7 @@ } class DatePicker { constructor(scheduler2, container, state = {}) { - this.state = { date: /* @__PURE__ */ new Date(), modes: ["days", "months", "years"], currentRange: [], eventDates: [], currentModeIndex: 0, ...state }; + this.state = { date: /* @__PURE__ */ new Date(), modes: ["days", "months", "years"], currentRange: [], eventDates: [], filterDays: null, currentModeIndex: 0, ...state }; this.container = null; this.element = null; this.onStateChangeHandlers = []; @@ -8589,19 +8598,21 @@ } } _renderDayGridHeader(daysOfWeekContainer) { - const { date } = this.getState(); + const { date, filterDays } = this.getState(); const scheduler2 = this.scheduler; let currentDate = scheduler2.date.week_start(new Date(date)); const maxDate = scheduler2.date.add(scheduler2.date.week_start(new Date(date)), 1, "week"); daysOfWeekContainer.classList.add("dhx_cal_datepicker_days"); const labelFormat = scheduler2.date.date_to_str("%D"); while (currentDate.valueOf() < maxDate.valueOf()) { - const label = labelFormat(currentDate); - const dayElement = document.createElement("div"); - dayElement.setAttribute("data-day", currentDate.getDay()); - dayElement.classList.add("dhx_cal_datepicker_dayname"); - dayElement.innerText = label; - daysOfWeekContainer.appendChild(dayElement); + if (!(filterDays && filterDays(currentDate))) { + const label = labelFormat(currentDate); + const dayElement = document.createElement("div"); + dayElement.setAttribute("data-day", currentDate.getDay()); + dayElement.classList.add("dhx_cal_datepicker_dayname"); + dayElement.innerText = label; + daysOfWeekContainer.appendChild(dayElement); + } currentDate = scheduler2.date.add(currentDate, 1, "day"); } } @@ -8616,7 +8627,7 @@ return weeks; } _renderDayGrid(container) { - const { date, currentRange, eventDates, minWeeks } = this.getState(); + const { date, currentRange, eventDates, minWeeks, filterDays } = this.getState(); let minSchedulerDate = currentRange[0]; let maxSchedulerDate = currentRange[1]; const eventDaysTable = eventDates.reduce((acc, date2) => { @@ -8626,7 +8637,11 @@ }, {}); const daysOfWeekContainer = document.createElement("div"); this._renderDayGridHeader(daysOfWeekContainer); + const weekLength = daysOfWeekContainer.children.length; container.appendChild(daysOfWeekContainer); + if (weekLength !== 7) { + container.style.setProperty("--dhx-scheduler-week-length", weekLength); + } const scheduler2 = this.scheduler; const firstDate = scheduler2.date.week_start(scheduler2.date.month_start(new Date(date))); const monthStart = scheduler2.date.month_start(new Date(date)); @@ -8649,31 +8664,33 @@ this.callEvent("onDateClick", [date2, event2]); }); while (currDate.valueOf() < lastDate.valueOf()) { - const dayElement = document.createElement("div"); - dayElement.setAttribute("data-cell-date", scheduler2.templates.format_date(currDate)); - dayElement.setAttribute("data-day", currDate.getDay()); - dayElement.innerHTML = currDate.getDate(); - if (currDate.valueOf() < monthStart.valueOf()) { - dayElement.classList.add("dhx_before"); - } else if (currDate.valueOf() >= monthEnd.valueOf()) { - dayElement.classList.add("dhx_after"); - } - if (currDate.getDay() === 0 || currDate.getDay() === 6) { - dayElement.classList.add("dhx_cal_datepicker_weekend"); - } - if (currDate.valueOf() == currentCalDate.valueOf()) { - dayElement.classList.add("dhx_now"); - } - if (minSchedulerDate && maxSchedulerDate) { - if (currDate.valueOf() >= minSchedulerDate.valueOf() && currDate.valueOf() < maxSchedulerDate.valueOf()) { - dayElement.classList.add("dhx_cal_datepicker_current"); + if (!(filterDays && filterDays(currDate))) { + const dayElement = document.createElement("div"); + dayElement.setAttribute("data-cell-date", scheduler2.templates.format_date(currDate)); + dayElement.setAttribute("data-day", currDate.getDay()); + dayElement.innerHTML = currDate.getDate(); + if (currDate.valueOf() < monthStart.valueOf()) { + dayElement.classList.add("dhx_before"); + } else if (currDate.valueOf() >= monthEnd.valueOf()) { + dayElement.classList.add("dhx_after"); + } + if (currDate.getDay() === 0 || currDate.getDay() === 6) { + dayElement.classList.add("dhx_cal_datepicker_weekend"); + } + if (currDate.valueOf() == currentCalDate.valueOf()) { + dayElement.classList.add("dhx_now"); + } + if (minSchedulerDate && maxSchedulerDate) { + if (currDate.valueOf() >= minSchedulerDate.valueOf() && currDate.valueOf() < maxSchedulerDate.valueOf()) { + dayElement.classList.add("dhx_cal_datepicker_current"); + } } + if (eventDaysTable[currDate.valueOf()]) { + dayElement.classList.add("dhx_cal_datepicker_event"); + } + dayElement.classList.add("dhx_cal_datepicker_date"); + dayGridContainer.appendChild(dayElement); } - if (eventDaysTable[currDate.valueOf()]) { - dayElement.classList.add("dhx_cal_datepicker_event"); - } - dayElement.classList.add("dhx_cal_datepicker_date"); - dayGridContainer.appendChild(dayElement); currDate = scheduler2.date.add(currDate, 1, "day"); } container.appendChild(dayGridContainer); @@ -8756,7 +8773,7 @@ } } function factoryMethod(extensionManager) { - const scheduler2 = { version: "7.1.2" }; + const scheduler2 = { version: "7.1.3" }; scheduler2.$stateProvider = StateService(); scheduler2.getState = scheduler2.$stateProvider.getState; extend$n(scheduler2); @@ -9181,6 +9198,9 @@ } else { let html = ""; for (let day in eventsInDays) { + if (scheduler2.ignore_agenda && scheduler2.ignore_agenda(new Date(day * 1))) { + continue; + } html += renderDay(new Date(day * 1), eventsInDays[day]); } scheduler2._els["dhx_cal_data"][0].innerHTML = html; @@ -9200,7 +9220,7 @@ return ""; } let html = ` -
+
${scheduler2.templates.agenda_day(day)}
`; @@ -13939,6 +13959,9 @@ end_date = scheduler2.date.date_part(obj.end_date); if (+end_date == +start_date || +end_date >= +start_date && (ev.end_date.getHours() !== 0 || ev.end_date.getMinutes() !== 0)) end_date = scheduler2.date.add(end_date, 1, "day"); + } else { + start_date = null; + end_date = null; } var start = start_date || ev.start_date; var end = end_date || ev.end_date; @@ -17686,6 +17709,12 @@ scheduler2.addEvent(nev); scheduler2._not_render = false; } + function toUTCDate(date) { + return new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds())); + } + function setUTCPartsToDate(d) { + return new Date(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate(), d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds()); + } scheduler2._rec_temp = []; scheduler2._rec_markers_pull = {}; scheduler2._rec_markers = {}; @@ -17984,22 +18013,17 @@ if (!seriesExceptions) { seriesExceptions = {}; } - if (!from) { - from = scheduler2._min_date; - } - if (!to) { - to = scheduler2._max_date; - } - const utcStart = new Date(Date.UTC(ev.start_date.getFullYear(), ev.start_date.getMonth(), ev.start_date.getDate(), ev.start_date.getHours(), ev.start_date.getMinutes(), ev.start_date.getSeconds())); + from = toUTCDate(from || new Date(scheduler2._min_date.valueOf() - 1e3)); + to = toUTCDate(to || new Date(scheduler2._max_date.valueOf() - 1e3)); + const utcStart = toUTCDate(ev.start_date); let parsedRRule; if (maxCount) { parsedRRule = rrulestr(`RRULE:${ev.rrule};UNTIL=${toIcalString(ev.end_date)};COUNT=${maxCount}`, { dtstart: utcStart }); } else { parsedRRule = rrulestr(`RRULE:${ev.rrule};UNTIL=${toIcalString(ev.end_date)}`, { dtstart: utcStart }); } - const utcTo = new Date(Date.UTC(to.getFullYear(), to.getMonth(), to.getDate(), to.getHours(), to.getMinutes(), to.getSeconds())); - const repeatedDates = parsedRRule.between(from, utcTo).map((date) => { - const adjustedDate = new Date(date); + const repeatedDates = parsedRRule.between(from, to, true).map((date) => { + const adjustedDate = setUTCPartsToDate(date); adjustedDate.setHours(ev.start_date.getHours()); adjustedDate.setMinutes(ev.start_date.getMinutes()); adjustedDate.setSeconds(ev.start_date.getSeconds()); @@ -20259,7 +20283,7 @@ yearBox.innerHTML = `
${this.templates.year_month(currentDate)}
`; const yearGrid = yearBox.querySelector(".dhx_year_grid"); - const datepicker = scheduler2._createDatePicker(null, { date: currentDate, minWeeks: 6 }); + const datepicker = scheduler2._createDatePicker(null, { date: currentDate, filterDays: scheduler2.ignore_year, minWeeks: 6 }); datepicker._renderDayGrid(yearGrid); datepicker.destructor(); wrapper.appendChild(yearBox); diff --git a/codebase/sources/dhtmlxscheduler.js.map b/codebase/sources/dhtmlxscheduler.js.map index c7de866..a7f671a 100644 --- a/codebase/sources/dhtmlxscheduler.js.map +++ b/codebase/sources/dhtmlxscheduler.js.map @@ -1 +1 @@ -{"version":3,"file":"dhtmlxscheduler.js","sources":["../../sources/dhtmlx_hook.js","../../sources/global.js","../../sources/plugins/drag_highlight_pos.js","../../sources/plugins/undo_delete.js","../../sources/plugins/limit.js","../../sources/plugins/batch_update.js","../../sources/plugins/index.js","../../sources/core/utils/utils.js","../../sources/core/state.js","../../sources/core/common/assert.js","../../sources/core/common_errors.js","../../sources/core/connector.js","../../sources/core/nav_bar.js","../../sources/core/scheduler_resize_listener.js","../../sources/utils/eventable.js","../../sources/core/scheduler.js","../../sources/core/utils/event.js","../../sources/core/utils/scoped_event.js","../../sources/core/common.js","../../sources/core/wai_aria.js","../../sources/core/utils/dom_helpers.js","../../sources/utils/env.js","../../sources/core/destructor.js","../../sources/core/common/url_serialize.js","../../sources/core/utils/ajax.js","../../sources/core/base.js","../../sources/core/config.js","../../sources/core/event.js","../../sources/core/event_highlight.js","../../sources/core/loaders/xml.js","../../sources/core/loaders/json.js","../../sources/core/loaders/ical.js","../../sources/core/common/get_serializable_events.js","../../sources/core/load.js","../../sources/core/lightbox.js","../../sources/core/touch.js","../../sources/core/dhtmlx/dhtmlx_suite_hooks.js","../../sources/core/skins.js","../../sources/core/jquery.js","../../sources/core/delay_render.js","../../sources/core/dataprocessor/dataprocessor_hooks.js","../../sources/core/dataprocessor/dataprocessor.js","../../sources/core/message.js","../../sources/locale/locale_ar.js","../../sources/locale/locale_be.js","../../sources/locale/locale_ca.js","../../sources/locale/locale_cn.js","../../sources/locale/locale_cs.js","../../sources/locale/locale_da.js","../../sources/locale/locale_de.js","../../sources/locale/locale_el.js","../../sources/locale/locale_en.js","../../sources/locale/locale_es.js","../../sources/locale/locale_fi.js","../../sources/locale/locale_fr.js","../../sources/locale/locale_he.js","../../sources/locale/locale_hu.js","../../sources/locale/locale_id.js","../../sources/locale/locale_it.js","../../sources/locale/locale_jp.js","../../sources/locale/locale_manager.js","../../sources/locale/locale_nb.js","../../sources/locale/locale_nl.js","../../sources/locale/locale_no.js","../../sources/locale/locale_pl.js","../../sources/locale/locale_pt.js","../../sources/locale/locale_ro.js","../../sources/locale/locale_ru.js","../../sources/locale/locale_si.js","../../sources/locale/locale_sk.js","../../sources/locale/locale_sv.js","../../sources/locale/locale_tr.js","../../sources/locale/locale_ua.js","../../sources/locale/index.js","../../sources/core/datepicker.js","../../sources/scheduler_factory_method.js","../../sources/ext/extension_manager.js","../../sources/scheduler_factory.js","../../sources/ext/active_links.js","../../sources/ext/agenda_legacy_view.js","../../sources/ext/agenda.js","../../sources/ext/all_timed.js","../../sources/ext/collision.js","../../sources/ext/container_autoresize.js","../../sources/ext/cookie.js","../../sources/ext/restricted_extensions/not_implemented_extension.js","../../sources/ext/restricted_extensions/daytimeline.js","../../sources/ext/restricted_extensions/drag_between.js","../../sources/ext/editors.js","../../sources/ext/expand.js","../../sources/ext/restricted_extensions/grid_view.js","../../sources/ext/html_templates.js","../../sources/ext/keyboard_navigation/common/keyboard_shortcuts.js","../../sources/ext/keyboard_navigation/common/eventhandler.js","../../sources/ext/keyboard_navigation/common/trap_modal_focus.js","../../sources/ext/keyboard_navigation/marker.js","../../sources/ext/keyboard_navigation/elements/scheduler_node.js","../../sources/ext/keyboard_navigation/elements/nav_node.js","../../sources/ext/keyboard_navigation/elements/header_cell.js","../../sources/ext/keyboard_navigation/elements/event.js","../../sources/ext/keyboard_navigation/elements/time_slot.js","../../sources/ext/keyboard_navigation/elements/minical_button.js","../../sources/ext/keyboard_navigation/elements/minical_cell.js","../../sources/ext/keyboard_navigation/elements/data_area.js","../../sources/ext/keyboard_navigation/modals.js","../../sources/ext/keyboard_navigation/core.js","../../sources/ext/keyboard_navigation/key_nav_legacy.js","../../sources/ext/keyboard_navigation/scheduler_handlers.js","../../sources/ext/keyboard_navigation/minical_handlers.js","../../sources/ext/key_nav.js","../../sources/ext/layer.js","../../sources/ext/limit.js","../../sources/ext/map_view/gMapAdapter.ts","../../sources/ext/map_view/osmMapAdapter.ts","../../sources/ext/map_view/mapboxAdapter.ts","../../sources/ext/map_view/index.ts","../../sources/ext/minical.js","../../sources/ext/monthheight.js","../../sources/ext/restricted_extensions/multisection.js","../../sources/ext/multiselect.js","../../sources/ext/multisource.js","../../sources/ext/mvc.js","../../sources/ext/outerdrag.js","../../sources/ext/pdf.js","../../sources/ext/quick_info.js","../../sources/ext/readonly.js","../../node_modules/rrule/dist/esm/weekday.js","../../node_modules/rrule/dist/esm/helpers.js","../../node_modules/rrule/dist/esm/dateutil.js","../../node_modules/rrule/dist/esm/iterresult.js","../../node_modules/rrule/node_modules/tslib/tslib.es6.mjs","../../node_modules/rrule/dist/esm/callbackiterresult.js","../../node_modules/rrule/dist/esm/nlp/i18n.js","../../node_modules/rrule/dist/esm/nlp/totext.js","../../node_modules/rrule/dist/esm/nlp/parsetext.js","../../node_modules/rrule/dist/esm/types.js","../../node_modules/rrule/dist/esm/nlp/index.js","../../node_modules/rrule/dist/esm/datetime.js","../../node_modules/rrule/dist/esm/parseoptions.js","../../node_modules/rrule/dist/esm/parsestring.js","../../node_modules/rrule/dist/esm/datewithzone.js","../../node_modules/rrule/dist/esm/optionstostring.js","../../node_modules/rrule/dist/esm/cache.js","../../node_modules/rrule/dist/esm/masks.js","../../node_modules/rrule/dist/esm/iterinfo/yearinfo.js","../../node_modules/rrule/dist/esm/iterinfo/monthinfo.js","../../node_modules/rrule/dist/esm/iterinfo/easter.js","../../node_modules/rrule/dist/esm/iterinfo/index.js","../../node_modules/rrule/dist/esm/iter/poslist.js","../../node_modules/rrule/dist/esm/iter/index.js","../../node_modules/rrule/dist/esm/rrule.js","../../node_modules/rrule/dist/esm/iterset.js","../../node_modules/rrule/dist/esm/rrulestr.js","../../node_modules/rrule/dist/esm/rruleset.js","../../sources/ext/recurring.js","../../sources/ext/recurring_legacy.js","../../sources/ext/serialize.js","../../sources/ext/restricted_extensions/timeline.js","../../sources/ext/tooltip/tooltip.ts","../../sources/ext/tooltip/tooltipManager.ts","../../sources/ext/tooltip/index.ts","../../sources/ext/restricted_extensions/treetimeline.js","../../sources/ext/restricted_extensions/units.js","../../sources/ext/url.js","../../sources/ext/restricted_extensions/week_agenda.js","../../sources/ext/wp.js","../../sources/ext/year_view.js","../../sources/ext/export_api/index.js","../../sources/ext/extensions_gpl.js","../../sources/dhtmlxscheduler.gpl.js"],"sourcesContent":["\r\nexport default function(){\r\n/* global dhtmlx */\r\nif (typeof dhtmlx != \"undefined\" && dhtmlx.attaches) {\r\n\tdhtmlx.attaches.attachScheduler = function (day, mode, tabs, scheduler) {\r\n\t\tvar tabs = tabs || '
';\r\n\t\tvar obj = document.createElement(\"DIV\");\r\n\t\tobj.id = \"dhxSchedObj_\" + this._genStr(12);\r\n\t\tobj.innerHTML = '
' + tabs + '
';\r\n\t\tdocument.body.appendChild(obj.firstChild);\r\n\r\n\t\tthis.attachObject(obj.id, false, true);\r\n\r\n\t\tthis.vs[this.av].sched = scheduler;\r\n\t\tthis.vs[this.av].schedId = obj.id;\r\n\t\tscheduler.setSizes = scheduler.updateView;\r\n\t\tscheduler.destructor = function () { };\r\n\t\tscheduler.init(obj.id, day, mode);\r\n\r\n\t\treturn this.vs[this._viewRestore()].sched;\r\n\t};\r\n}\r\n\r\n}","\r\n/* eslint-disable no-restricted-globals */\r\nvar globalScope;\r\nif(typeof window !== \"undefined\"){\r\n\tglobalScope = window;\r\n}else{\r\n\tglobalScope = global;\r\n}\r\n/* eslint-enable no-restricted-globals */\r\n\r\nexport default globalScope;","export default function dragHighlightPos(scheduler){\r\n let dndMarkers = [];\r\n let dragStarted = false;\r\n let eventNode = null;\r\n let event = null;\r\n\r\n function isEnabled() { \r\n return scheduler.config.drag_highlight && scheduler.markTimespan;\r\n }\r\n\r\n function checkViewName(viewName){\r\n const viewObj = scheduler.getView(viewName);\r\n if(viewObj){\r\n return viewObj.layout;\r\n }\r\n return viewName;\r\n }\r\n\r\n function checkSectionPropertyName(viewName){\r\n const viewObj = scheduler.getView(viewName);\r\n if(viewObj.y_property){\r\n return viewObj.y_property;\r\n }\r\n if(viewObj.map_to){\r\n return viewObj.map_to;\r\n }\r\n }\r\n\r\n function setRequiredStylesToMarker(eventNode, layout){\r\n switch (layout) {\r\n case \"month\":\r\n eventNode.style.top = \"\";\r\n eventNode.style.left = \"\";\r\n break;\r\n case \"timeline\":\r\n eventNode.style.left = \"\";\r\n eventNode.style.marginLeft = \"1px\";\r\n break;\r\n default:\r\n eventNode.style.top = \"\";\r\n break;\r\n }\r\n }\r\n \r\n function createMarkerConfig(configSettings){\r\n const { event, layout, viewName, sectionId, eventNode } = configSettings;\r\n setRequiredStylesToMarker(eventNode, layout);\r\n const sections = {};\r\n let markerObject = {\r\n start_date: event.start_date,\r\n end_date: event.end_date,\r\n css: \"dhx_scheduler_dnd_marker\",\r\n html: eventNode\r\n };\r\n if (layout == \"timeline\" || layout == \"month\" ){\r\n // we need to set end date less than 24 hours of the views to avoid receiving multiple marktimespans\r\n markerObject = {...markerObject, end_date: scheduler.date.add(event.start_date, 1, 'minute')};\r\n }\r\n if (sectionId){\r\n sections[viewName] = sectionId;\r\n markerObject.sections = sections;\r\n }\r\n return markerObject;\r\n }\r\n\r\n function createViewMarker(settings){\r\n const { layout } = settings;\r\n let markerConfigs;\r\n switch (layout) {\r\n case \"month\": \r\n markerConfigs = getMonthViewMarkers(settings);\r\n break;\r\n case 'timeline':\r\n case 'units':\r\n markerConfigs = getTimelineAndUnitsViewMarkers(settings);\r\n break;\r\n default: \r\n markerConfigs = getColumnViewMarkers(settings);\r\n break;\r\n }\r\n markerConfigs.forEach((cfg) => {\r\n dndMarkers.push(scheduler.markTimespan(cfg));\r\n });\r\n }\r\n\r\n function getColumnViewMarkers(settings){\r\n const {event, layout, viewName, sectionId} = settings;\r\n let columnViewMarkersArray = [];\r\n let eventNodes = scheduler.$container.querySelectorAll(`[${scheduler.config.event_attribute}='${event.id}']:not(.dhx_cal_select_menu):not(.dhx_drag_marker)`);\r\n if(eventNodes){\r\n for (let i = 0; i < eventNodes.length; i++) {\r\n let eventNodeClone = eventNodes[i].cloneNode(true);\r\n let startDate = new Date(+eventNodeClone.getAttribute(\"data-bar-start\"));\r\n let endDate = new Date(+eventNodeClone.getAttribute(\"data-bar-end\"));\r\n let dates = {start_date: startDate, end_date: endDate};\r\n const configSettings = {\r\n event: dates, \r\n layout, \r\n viewName, \r\n sectionId, \r\n eventNode:eventNodeClone\r\n };\r\n columnViewMarkersArray.push(createMarkerConfig(configSettings));\r\n }\t\r\n }\r\n return columnViewMarkersArray;\r\n }\r\n\r\n function getMonthViewMarkers(settings){\r\n let monthViewMarkersArray = [];\r\n const {event, layout, viewName, sectionId} = settings;\r\n const weekDates = [];\r\n let currDate = new Date(event.start_date);\r\n while(currDate.valueOf() < event.end_date.valueOf()){\r\n let obj = {start_date: currDate};\r\n weekDates.push(obj);\r\n currDate = scheduler.date.week_start(scheduler.date.add(currDate, 1, \"week\"));\r\n }\r\n let cells = scheduler.$container.querySelectorAll(`[${scheduler.config.event_attribute}='${event.id}']`);\r\n for (let i = 0; i < cells.length; i++) {\r\n const configSettings = {\r\n event: weekDates[i], \r\n layout, \r\n viewName, \r\n sectionId, \r\n eventNode: cells[i].cloneNode(true)\r\n };\r\n monthViewMarkersArray.push(createMarkerConfig(configSettings));\r\n }\r\n return monthViewMarkersArray;\r\n }\r\n\r\n function getTimelineAndUnitsViewMarkers(settings){\r\n let unitMarkersArray = [];\r\n const {event, layout, viewName, eventNode} = settings;\r\n let sectionPropertyName = checkSectionPropertyName(viewName);\r\n if (scheduler.config.multisection && sectionPropertyName){\r\n const sections = String(event[sectionPropertyName]).split(scheduler.config.section_delimiter);\r\n const formatedSections = sections.map(element => String(element));\r\n const elems = [];\r\n for (let i = 0; i < formatedSections.length; i++) {\r\n elems[i] = eventNode.cloneNode(true);\r\n const configSettings = {\r\n event, \r\n layout, \r\n viewName, \r\n sectionId: formatedSections[i],\r\n eventNode: elems[i]\r\n };\r\n unitMarkersArray.push(createMarkerConfig(configSettings));\r\n }\r\n }\r\n return unitMarkersArray;\r\n }\r\n \r\n scheduler.attachEvent(\"onBeforeDrag\", function (id, mode, e){\r\n if (isEnabled()) {\r\n dragStarted = true;\r\n event = scheduler.getEvent(id);\r\n eventNode = e.target.closest(`[${scheduler.config.event_attribute}]`);\r\n const viewName = scheduler.getState().mode;\r\n const layout = checkViewName(viewName);\r\n // to avoid incorrect eventNode and marker creation when scheduler.config.cascade_event_display included\r\n if (layout == \"units\" && scheduler.config.cascade_event_display ) {\r\n scheduler.unselect(id);\r\n eventNode = e.target.closest(`[${scheduler.config.event_attribute}]`);\r\n }\r\n }\r\n return true;\r\n });\r\n\r\n scheduler.attachEvent(\"onEventDrag\", function (id, mode, e){\r\n if(dragStarted && isEnabled()){\r\n dragStarted = false;// insert element only once after dnd start\r\n const viewName = scheduler.getState().mode;\r\n const layout = checkViewName(viewName);\r\n const sectionId = scheduler.getActionData(e).section;\r\n if (event) {\r\n const settings = {\r\n event, \r\n layout, \r\n viewName, \r\n sectionId, \r\n eventNode\r\n };\r\n createViewMarker(settings);\r\n }\r\n }\r\n });\r\n\r\n scheduler.attachEvent(\"onDragEnd\", function(id, mode, e){\r\n for (let i = 0; i < dndMarkers.length; i++) {\r\n scheduler.unmarkTimespan(dndMarkers[i]);\r\n }\r\n dndMarkers = [];\r\n eventNode = null;\r\n event = null;\r\n });\r\n}","export default function undoDelete(scheduler) {\r\n\tscheduler.attachEvent(\"onEventDeleted\", function (id, ev) {\r\n\t\tlet deletedEvent = scheduler.copy(ev);\r\n\t\tif (scheduler.config.undo_deleted && !scheduler.getState().new_event) {\r\n\t\t\tscheduler.message({\r\n\t\t\t\ttext: `
\r\n Event deleted\r\n \r\n
`,\r\n\t\t\t\texpire: 10000,\r\n\t\t\t\ttype: \"popup_after_delete\",\r\n\t\t\t\tcallback: function (e) {\r\n\t\t\t\t\tlet undoBtn = e.target.closest(\r\n\t\t\t\t\t\t`[data-deleted-event-id=\"${ev.id}\"]`\r\n\t\t\t\t\t);\r\n\t\t\t\t\tif (undoBtn) {\r\n\t\t\t\t\t\tscheduler.addEvent(deletedEvent);\r\n\t\t\t\t\t\tscheduler.render();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t});\r\n}\r\n","export default function limitPlugin(scheduler){\r\n\r\n\r\n\tscheduler.config.mark_now = true;\r\n\tscheduler.config.display_marked_timespans = true;\r\n\tscheduler.config.overwrite_marked_timespans = true;\r\n\r\n\r\n\tvar dhx_time_block = \"dhx_time_block\";\r\n\tvar default_timespan_type = \"default\";\r\n\tvar fix_options = function(options, days, zones) {\r\n\t\tif (days instanceof Date && zones instanceof Date) {\r\n\t\t\toptions.start_date = days;\r\n\t\t\toptions.end_date = zones;\r\n\t\t} else {\r\n\t\t\toptions.days = days;\r\n\t\t\toptions.zones = zones;\r\n\t\t}\r\n\t\treturn options;\r\n\t};\r\n\tvar get_resulting_options = function(days, zones, sections) {\r\n\t\tvar options = (typeof days == \"object\") ? days : { days: days };\r\n\t\toptions.type = dhx_time_block;\r\n\t\toptions.css = \"\";\r\n\t\tif (zones) {\r\n\t\t\tif (sections)\r\n\t\t\t\toptions.sections = sections;\r\n\t\t\toptions = fix_options(options, days, zones);\r\n\t\t}\r\n\t\treturn options;\r\n\t};\r\n\tscheduler.blockTime = function(days, zones, sections){\r\n\t\tvar options = get_resulting_options(days, zones, sections);\r\n\t\treturn scheduler.addMarkedTimespan(options);\r\n\t};\r\n\tscheduler.unblockTime = function(days, zones, sections) {\r\n\t\tzones = zones || \"fullday\";\r\n\t\tvar options = get_resulting_options(days, zones, sections);\r\n\t\treturn scheduler.deleteMarkedTimespan(options);\r\n\t};\r\n\r\n\tscheduler.checkInMarkedTimespan = function(ev, timespan_type, on_overlap){\r\n\t\ttimespan_type = timespan_type || default_timespan_type;\r\n\r\n\t\tvar res = true;\r\n\t\tvar temp_start_date = new Date(ev.start_date.valueOf());\r\n\t\tvar temp_end_date = scheduler.date.add(temp_start_date, 1, \"day\");\r\n\t\tvar timespans = scheduler._marked_timespans;\r\n\t\tfor (; temp_start_date < ev.end_date; temp_start_date = scheduler.date.date_part(temp_end_date), temp_end_date = scheduler.date.add(temp_start_date, 1, \"day\") ) {\r\n\t\t\tvar day_value = +scheduler.date.date_part( new Date(temp_start_date) ); // the first part of event not necessarily contains only date part\r\n\t\t\tvar day_index = temp_start_date.getDay();\r\n\r\n\t\t\tvar zones = getZones(ev, timespans, day_index, day_value, timespan_type);\r\n\t\t\tif (zones){\r\n\t\t\t\tfor (var i = 0; i < zones.length; i+=2) {\r\n\r\n\t\t\t\t\t// they may change for new event if it passes limit zone\r\n\t\t\t\t\tvar eventStart = scheduler._get_zone_minutes(temp_start_date);\r\n\t\t\t\t\tvar eventEnd = ( ev.end_date>temp_end_date || ev.end_date.getDate() != temp_start_date.getDate() ) ? 1440 : scheduler._get_zone_minutes(ev.end_date);\r\n\r\n\t\t\t\t\tvar markerStart = zones[i];\r\n\t\t\t\t\tvar markerEnd = zones[i+1];\r\n\t\t\t\t\tif (markerStarteventStart) {\r\n\t\t\t\t\t\tif(typeof on_overlap == \"function\"){\r\n\t\t\t\t\t\t\t//handler allows to cancel overlapping\r\n\t\t\t\t\t\t\t//actually needed only to keep default behavior of limits\r\n\t\t\t\t\t\t\tres = on_overlap(ev, eventStart, eventEnd, markerStart, markerEnd);//event object, event start/end minutes in 'zones' format, zone start/end minutes\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tres = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(!res)\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn !res;\r\n\t};\r\n\tscheduler.checkLimitViolation = function(event){\r\n\t\tif(!event)\r\n\t\t\treturn true;\r\n\t\tif (!scheduler.config.check_limits)\r\n\t\t\treturn true;\r\n\t\tvar s = scheduler;\r\n\t\tvar c = s.config;\r\n\t\tvar evs = [];\r\n\t\tif ((event.rec_type && event._end_date) || (event.rrule)) {\r\n\t\t\tconst seriesEnd = event._end_date || event.end_date;\r\n\t\t\t// GS-2482 need to take into account that a part of recurring events might be outside the limits\r\n\t\t\tif ((c.limit_start && c.limit_end)) {\r\n\t\t\t\tvar recEventInLimits = seriesEnd.valueOf() >= c.limit_start.valueOf() && event.start_date.valueOf() <= c.limit_end.valueOf();\r\n\t\t\t\treturn recEventInLimits;\r\n\t\t\t} else return true;\r\n\t\t} else {\r\n\t\t\tevs = [event];\r\n\t\t}\r\n\r\n\t\tvar complete_res = true;\r\n\t\tfor (var p=0; p= c.limit_start.valueOf() && ev.end_date.valueOf() <= c.limit_end.valueOf()) : true;\r\n\t\t\tif (res){\r\n\t\t\t\tres = !scheduler.checkInMarkedTimespan(ev, dhx_time_block, function(event, eventStart, eventEnd, markerStart, markerEnd){\r\n\t\t\t\t\t//try crop event to allow placing\r\n\t\t\t\t\tvar allow = true;\r\n\t\t\t\t\tif (eventStart<=markerEnd && eventStart >= markerStart){\r\n\t\t\t\t\t\tif (markerEnd == 24*60 || eventEnd <= markerEnd){\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(event._timed && s._drag_id && s._drag_mode == \"new-size\"){\r\n\t\t\t\t\t\t\tevent.start_date.setHours(0);\r\n\t\t\t\t\t\t\tevent.start_date.setMinutes(markerEnd);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ((eventEnd >= markerStart && eventEnd <= markerEnd) || (eventStart < markerStart && eventEnd > markerEnd)){\r\n\t\t\t\t\t\tif(event._timed && s._drag_id && s._drag_mode == \"new-size\"){\r\n\t\t\t\t\t\t\tevent.end_date.setHours(0);\r\n\t\t\t\t\t\t\tevent.end_date.setMinutes(markerStart);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn allow;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\tif (!res) {\r\n\t\t\t\tres = (s.checkEvent(\"onLimitViolation\")) ? s.callEvent(\"onLimitViolation\",[ev.id, ev]) : res;\r\n\t\t\t}\r\n\t\t\tcomplete_res = complete_res && res;\r\n\t\t}\r\n\t\tif(!complete_res){\r\n\t\t\ts._drag_id = null;\r\n\t\t\ts._drag_mode = null;\r\n\t\t}\r\n\t\treturn complete_res;\r\n\r\n\r\n\t};\r\n\tscheduler._get_blocked_zones = function(timespans, property, day_index, day_value, timespan_type){\r\n\t\tvar zones =[];\r\n\t\tif (timespans && timespans[property]) {\r\n\t\t\tvar timeline_zones = timespans[property];\r\n\t\t\tvar blocked_timeline_zones = this._get_relevant_blocked_zones(day_index, day_value, timeline_zones, timespan_type);\r\n\t\t\tfor (var i=0; i this._min_date && now.getHours() >= cfg.first_hour && now.getHours() 1) {\r\n\t\t\t\t\tif(view.size && view.options.length){\r\n\t\t\t\t\t\tday_index = ((view.position+ day_index) / view.options.length) * view.size;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstart_index = day_index;\r\n\t\t\t\t\tend_index = day_index + units_l;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tstart_index = 0;\r\n\t\t\t\t\tend_index = start_index + units_l;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar r_divs = [];\r\n\r\n\t\t\t\tfor (var i = start_index; i < end_index; i++) {\r\n\t\t\t\t\tvar t_day = i; // as each unit is actually considered +1 day\r\n\t\t\t\t\toptions.days = t_day;\r\n\t\t\t\t\tvar t_div = scheduler._render_marked_timespan(options, null, t_day)[0];\r\n\t\t\t\t\tr_divs.push(t_div);\r\n\t\t\t\t}\r\n\t\t\t\treturn r_divs;\r\n\t\t\t} else { // day/week views\r\n\t\t\t\toptions.days = day_index;\r\n\t\t\t\treturn scheduler._render_marked_timespan(options, null, day_index);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\toptions.days = +scheduler.date.date_part(now);\r\n\t\t\t\treturn scheduler._render_marked_timespan(options, null, null);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tscheduler._remove_mark_now = function() {\r\n\t\tvar dhx_now_time = 'dhx_now_time';\r\n\t\tvar els = this._els[dhx_now_time];\r\n\t\tfor (var i=0; i config.start_date) || (config.days !== undefined && config.zones)) && !config.type )\r\n\t\t\treturn r_configs; // incorrect config was provided\r\n\r\n\t\tvar min = 0;\r\n\t\tvar max = 24*60;\r\n\t\tif (config.zones == \"fullday\")\r\n\t\t\tconfig.zones = [min, max];\r\n\t\tif (config.zones && config.invert_zones) {\r\n\t\t\tconfig.zones = scheduler.invertZones(config.zones);\r\n\t\t}\r\n\r\n\t\tconfig.id = scheduler.uid();\r\n\t\tconfig.css = config.css||\"\";\r\n\t\tconfig.type = config.type||default_timespan_type;\r\n\r\n\t\tvar sections = config.sections;\r\n\t\tif (sections) {\r\n\t\t\tfor (var view_key in sections) {\r\n\t\t\t\tif (sections.hasOwnProperty(view_key)) {\r\n\t\t\t\t\tvar ids = sections[view_key];\r\n\t\t\t\t\tif (!(ids instanceof Array))\r\n\t\t\t\t\t\tids = [ids];\r\n\t\t\t\t\tfor (var i=0; i t_sd) ? scheduler._get_zone_minutes(start_date) : min;\r\n\t\t\t\t\tvar zone_end = ( end_date > t_ed || end_date.getDate() != t_sd.getDate() ) ? max : scheduler._get_zone_minutes(end_date);\r\n\t\t\t\t\tt_config.zones = [zone_start, zone_end];\r\n\t\t\t\t\tr_configs.push(t_config);\r\n\r\n\t\t\t\t\tt_sd = t_ed;\r\n\t\t\t\t\tt_ed = scheduler.date.add(t_ed, 1, \"day\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (c_config.days instanceof Date)\r\n\t\t\t\t\tc_config.days = (scheduler.date.date_part(c_config.days)).valueOf();\r\n\t\t\t\tc_config.zones = config.zones.slice();\r\n\t\t\t\tr_configs.push(c_config);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn r_configs;\r\n\t};\r\n\tscheduler._get_dates_by_index = function(index, start, end) {\r\n\t\tvar dates = [];\r\n\t\tstart = scheduler.date.date_part(new Date(start||scheduler._min_date));\r\n\t\tend = new Date(end||scheduler._max_date);\r\n\t\tvar start_day = start.getDay();\r\n\t\tvar delta = (index-start_day >= 0) ? (index-start_day) : (7-start.getDay()+index);\r\n\t\tvar t_date = scheduler.date.add(start, delta, \"day\");\r\n\t\tfor (; t_date < end; t_date = scheduler.date.add(t_date, 1, \"week\")) {\r\n\t\t\tdates.push(t_date);\r\n\t\t}\r\n\t\treturn dates;\r\n\t};\r\n\tscheduler._get_css_classes_by_config = function(config) {\r\n\t\tvar css_classes = [];\r\n\t\tif (config.type == dhx_time_block) {\r\n\t\t\tcss_classes.push(dhx_time_block);\r\n\t\t\tif (config.css)\r\n\t\t\t\tcss_classes.push(dhx_time_block+\"_reset\");\r\n\t\t}\r\n\t\tcss_classes.push(\"dhx_marked_timespan\", config.css);\r\n\t\treturn css_classes.join(\" \");\r\n\t};\r\n\tscheduler._get_block_by_config = function(config) {\r\n\t\tvar block = document.createElement(\"div\");\r\n\t\tif (config.html) {\r\n\t\t\tif (typeof config.html == \"string\")\r\n\t\t\t\tblock.innerHTML = config.html;\r\n\t\t\telse\r\n\t\t\t\tblock.appendChild(config.html);\r\n\t\t}\r\n\t\treturn block;\r\n\t};\r\n\tscheduler._render_marked_timespan = function(options, area, day) {\r\n\t\tvar blocks = []; // resulting block which will be rendered and returned\r\n\t\tvar c = scheduler.config;\r\n\t\tvar min_date = this._min_date;\r\n\t\tvar max_date = this._max_date;\r\n\t\tvar day_value = false; // if timespan for specific date should be displayed\r\n\r\n\t\tif (!c.display_marked_timespans)\r\n\t\t\treturn blocks;\r\n\r\n\t\t// in case of markTimespan\r\n\t\tif (!day && day !== 0) {\r\n\t\t\tif (options.days < 7)\r\n\t\t\t\tday = options.days;\r\n\t\t\telse {\r\n\t\t\t\tvar date_to_display = new Date(options.days);\r\n\t\t\t\tday_value = +date_to_display;\r\n\r\n\t\t\t\t// in case of markTimespan date could be not in the viewing range, need to return\r\n\t\t\t\tif ( !(+max_date > +date_to_display && +min_date <= +date_to_display) )\r\n\t\t\t\t\treturn blocks;\r\n\r\n\t\t\t\tday = date_to_display.getDay();\r\n\t\t\t}\r\n\r\n\t\t\t// convert day default index (Sun - 0, Sat - 6) to index of hourscales (depends on week_start and config.start_on_monday)\r\n\t\t\tvar min_day = min_date.getDay();\r\n\t\t\tif (min_day > day) {\r\n\t\t\t\tday = 7 - (min_day-day);\r\n\t\t\t} else {\r\n\t\t\t\tday = day - min_day;\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar zones = options.zones;\r\n\t\tvar css_classes = scheduler._get_css_classes_by_config(options);\r\n\r\n\t\tif (scheduler._table_view && scheduler._mode == \"month\") {\r\n\t\t\tvar areas = [];\r\n\t\t\tvar days = [];\r\n\r\n\r\n\t\t\tif (!area) {\r\n\t\t\t\tdays = (day_value) ? [day_value] : scheduler._get_dates_by_index(day);\r\n\t\t\t\tfor (var i=0; i < days.length; i++) {\r\n\t\t\t\t\tareas.push( this._scales[days[i]] );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tareas.push(area);\r\n\t\t\t\tdays.push(day);\r\n\t\t\t}\r\n\r\n\t\t\tfor (var i=0; i < areas.length; i++) {\r\n\t\t\t\tarea = areas[i];\r\n\t\t\t\tday = days[i];\r\n\r\n\t\t\t\tvar sday = this.locate_holder_day(day, false) % this._cols.length;\r\n\r\n\t\t\t\tif(this._ignores[sday]) continue;\r\n\r\n\t\t\t\tvar block_proto = scheduler._get_block_by_config(options);\r\n\t\t\t\tblock_proto.className = css_classes;\r\n\t\t\t\tblock_proto.style.top = \"0px\";\r\n\t\t\t\tblock_proto.style.height = \"100%\";\r\n\t\t\t\t\r\n\t\t\t\tfor (var k=0; k < zones.length; k+=2) {\r\n\t\t\t\t\tvar start = zones[i];\r\n\t\t\t\t\tvar end = zones[i+1];\r\n\t\t\t\t\tif (end <= start)\r\n\t\t\t\t\t\treturn [];\r\n\r\n\t\t\t\t\tvar block = block_proto.cloneNode(true);\r\n\r\n\t\t\t\t\tblock.style.left = \"0px\";\r\n\t\t\t\t\tblock.style.width = \"100%\";\r\n\r\n\t\t\t\t\tarea.appendChild(block);\r\n\t\t\t\t\tblocks.push(block);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvar index = day;\r\n\r\n\t\t\tif(this._ignores[this.locate_holder_day(day, false)]) return blocks;\r\n\r\n\t\t\tif (this._props && this._props[this._mode] && options.sections && options.sections[this._mode]) {\r\n\t\t\t\tvar view = this._props[this._mode];\r\n\t\t\t\tindex = view.order[options.sections[this._mode]];\r\n\r\n\t\t\t\tvar inner_index = view.order[options.sections[this._mode]];\r\n\t\t\t\tif(!(view.days > 1)){\r\n\t\t\t\t\tindex = inner_index;\r\n\t\t\t\t\tif (view.size && (index > view.position+view.size)) {\r\n\t\t\t\t\t\tindex = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar units_l = view.size || view.options.length;\r\n\t\t\t\t\tindex = index*units_l + inner_index;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tarea = area ? area : scheduler.locate_holder(index);\r\n\r\n\t\t\tfor (var i = 0; i < zones.length; i+=2){\r\n\t\t\t\tvar start = Math.max(zones[i], c.first_hour*60);\r\n\t\t\t\tvar end = Math.min(zones[i+1], c.last_hour*60);\r\n\t\t\t\tif (end <= start) {\r\n\t\t\t\t\tif (i+2 < zones.length)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\treturn [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar block = scheduler._get_block_by_config(options);\r\n\t\t\t\tblock.className = css_classes;\r\n\r\n\t\t\t\t// +1 for working with section which really takes up whole height (as % would be == 0)\r\n\t\t\t\tvar all_hours_height = this.config.hour_size_px*24 + 1;\r\n\t\t\t\tvar hour_ms = 60*60*1000;\r\n\t\t\t\tblock.style.top = (Math.round((start*60*1000-this.config.first_hour*hour_ms)*this.config.hour_size_px/hour_ms) % all_hours_height) + \"px\";\r\n\t\t\t\tblock.style.height = Math.max((Math.round(((end-start)*60*1000)*this.config.hour_size_px/hour_ms)) % all_hours_height, 1)+\"px\";\r\n\r\n\t\t\t\tarea.appendChild(block);\r\n\t\t\t\tblocks.push(block);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn blocks;\r\n\t};\r\n\r\n\tscheduler._mark_timespans = function(){\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\t\tvar divs = [];\r\n\t\tif (scheduler._table_view && scheduler._mode == \"month\"){\r\n\t\t\tfor (var day in this._scales) {\r\n\t\t\t\tvar date = new Date(+day);\r\n\t\t\t\tdivs.push.apply(divs, scheduler._on_scale_add_marker(this._scales[day],date));\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\t//manually trigger rendering of configs for each column\r\n\t\t\tvar date = new Date(scheduler._min_date);\r\n\t\t\tfor (var i = 0, len = data.childNodes.length; i < len; i++) {\r\n\t\t\t\tvar area = data.childNodes[i];\r\n\t\t\t\tif (area.firstChild && scheduler._getClassName(area.firstChild).indexOf(\"dhx_scale_hour\") > -1) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdivs.push.apply(divs, scheduler._on_scale_add_marker(area, date));\r\n\t\t\t\tdate = scheduler.date.add(date, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn divs;\r\n\t};\r\n\r\n\t// just marks timespan, will be cleaned after refresh\r\n\tscheduler.markTimespan = function(configuration) {\r\n\t\tif(!this._els){\r\n\t\t\tthrow new Error(\"`scheduler.markTimespan` can't be used before scheduler initialization. Place `scheduler.markTimespan` call after `scheduler.init`.\");\r\n\t\t}\r\n\r\n\r\n\t\tvar rebuild_els = false;\r\n\t\tif(!this._els[\"dhx_cal_data\"]){\r\n\t\t\tscheduler.get_elements();\r\n\t\t\trebuild_els = true;\r\n\t\t}\r\n\r\n\r\n\t\t// backup regular marked timespans\r\n\t\tvar timespans_ids = scheduler._marked_timespans_ids,\r\n\t\t\ttimespan_types = scheduler._marked_timespans_types,\r\n\t\t\ttimespans = scheduler._marked_timespans;\r\n\r\n\t\tscheduler.deleteMarkedTimespan();\r\n\r\n\t\t//add block to configs\r\n\t\tscheduler.addMarkedTimespan(configuration);\r\n\r\n\t\tvar divs = scheduler._mark_timespans();\r\n\r\n\t\tif(rebuild_els)\r\n\t\t\tscheduler._els = [];\r\n\r\n\t\t// restore timespan config\r\n\t\tscheduler._marked_timespans_ids = timespans_ids;\r\n\t\tscheduler._marked_timespans_types = timespan_types;\r\n\t\tscheduler._marked_timespans = timespans;\r\n\r\n\t\treturn divs;\r\n\t};\r\n\tscheduler.unmarkTimespan = function(divs) {\r\n\t\tif (!divs)\r\n\t\t\treturn;\r\n\t\tfor (var i=0; i c_zone_end && zone_start <= c_zone_end) || (zone_start < c_zone_start && zone_end >= c_zone_start)) {\r\n\t\t\t\t\tresulting_zones[i] = Math.min(c_zone_start, zone_start);\r\n\t\t\t\t\tresulting_zones[i+1] = Math.max(c_zone_end, zone_end);\r\n\t\t\t\t\ti -= 2;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!isLast) // do nothing, maybe next current zone will match or will be last\r\n\t\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\t\tvar offset = (c_zone_start > zone_start)?0:2;\r\n\t\t\t\t\tresulting_zones.splice(i+offset, 0, zone_start, zone_end); // last current zone, need to add another\r\n\t\t\t\t}\r\n\t\t\t\tzones.splice(k--,2); // zone was merged or added, need to exclude it\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn resulting_zones;\r\n\t};\r\n\tscheduler._subtract_timespan_zones = function(current_zones, zones) {\r\n\t\tvar resulting_zones = current_zones.slice();\r\n\t\tfor (var i=0; i c_zone_start && zone_start < c_zone_end) {\r\n\t\t\t\t\tvar is_modified = false;\r\n\t\t\t\t\tif (c_zone_start >= zone_start && c_zone_end <= zone_end) {\r\n\t\t\t\t\t\tresulting_zones.splice(i, 2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (c_zone_start < zone_start) {\r\n\t\t\t\t\t\tresulting_zones.splice(i, 2, c_zone_start, zone_start);\r\n\t\t\t\t\t\tis_modified = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (c_zone_end > zone_end) {\r\n\t\t\t\t\t\tresulting_zones.splice( (is_modified)?(i+2):i, (is_modified)?0:2, zone_end, c_zone_end);\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti -= 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn resulting_zones;\r\n\t};\r\n\tscheduler.invertZones = function(zones) {\r\n\t\treturn scheduler._subtract_timespan_zones([0, 1440], zones.slice());\r\n\t};\r\n\tscheduler._delete_marked_timespan_by_id = function(id) {\r\n\t\tvar configs = scheduler._marked_timespans_ids[id];\r\n\t\tif (configs) {\r\n\t\t\tfor (var i=0; i 1)){\r\n\t\t\t\tday = scheduler.date.date_part(new Date(this._date)); // for units view actually only 1 day is displayed yet the day variable will change, need to use this._date for all calls\r\n\t\t\t}else{\r\n\t\t\t\tvar dx = 24*60*60*1000;\r\n\t\t\t\tvar day_ind = Math.round((day - scheduler._min_date)/dx);\r\n\t\t\t\tvar unitsPerDay = view.size || units.length;\r\n\t\t\t\tday = scheduler.date.add(scheduler._min_date, Math.floor(day_ind/unitsPerDay), \"day\"); // to the \"same\" day for all sections\r\n\t\t\t\tday = scheduler.date.date_part(day);\r\n\t\t\t}\r\n\t\t\tday_index = day.getDay();\r\n\t\t\tday_value = day.valueOf();\r\n\r\n\t\t\tif (timespans[mode] && timespans[mode][unit.key]) {\r\n\t\t\t\tvar unit_zones = timespans[mode][unit.key];\r\n\t\t\t\tvar unit_types = scheduler._get_types_to_render(unit_zones[day_index], unit_zones[day_value]);\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(unit_types));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar global_data = timespans[\"global\"];\r\n\r\n\t\tif(scheduler.config.overwrite_marked_timespans){\r\n\t\t\tvar day_types = global_data[day_value]||global_data[day_index];\r\n\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(day_types));\r\n\t\t} else {\r\n\t\t\tif(global_data[day_value]){\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(global_data[day_value]));\r\n\t\t\t}\r\n\t\t\tif(global_data[day_index]){\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(global_data[day_index]));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (var i=0; i {\r\n\t\t\tif(date){\r\n\t\t\t\tcalls.setModeDate.date = date;\r\n\t\t\t}\r\n\t\t\tif(mode){\r\n\t\t\t\tcalls.setModeDate.mode = mode;\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tvar methods = {\r\n\t\t\trender:(date, mode) => {calls.needRender = true; rememberModeDate(date, mode);},\r\n\t\t\tsetCurrentView:(date, mode) => {calls.needRender = true; rememberModeDate(date, mode);},\r\n\t\t\tupdateView:(date, mode) => {calls.needUpdateView = true; rememberModeDate(date, mode);},\r\n\t\t\trender_data:() => calls.needRender = true,\r\n\t\t\trender_view_data:(evs) => { \r\n\t\t\t\tif(evs && evs.length){\r\n\t\t\t\t\tevs.forEach((e) => calls.repaintEvents[e.id] = true);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcalls.needRender = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tdisableMethods.call(this, methods);\r\n\r\n\t\tisActive = true;\r\n\t\tthis.callEvent(\"onBeforeBatchUpdate\", []);\r\n\r\n\t\tbatchUpdatePayload(callback);\r\n\r\n\t\tthis.callEvent(\"onAfterBatchUpdate\", []);\r\n\r\n\t\trestoreMethods.call(this);\r\n\r\n\t\tisActive = false;\r\n\t\tif(!noRedraw){\r\n\t\t\tif(calls.needRender){\r\n\t\t\t\tscheduler.render(calls.setModeDate.date, calls.setModeDate.mode);\r\n\t\t\t}else if(calls.needUpdateView){\r\n\t\t\t\tscheduler.updateView(calls.setModeDate.date, calls.setModeDate.mode);\r\n\t\t\t}else{\r\n\t\t\t\tfor(const i in calls.repaintEvents){\r\n\t\t\t\t\tscheduler.updateEvent(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (call_dp) {\r\n\t\t\tthis._dp.setUpdateMode(dp_mode);\r\n\t\t\tthis._dp.sendData();\r\n\t\t}\r\n\t};\r\n}\r\n\r\nexport default function(scheduler){\r\n\tscheduler.batchUpdate = createMethod(scheduler);\r\n}","import dragHighlightPos from \"./drag_highlight_pos\";\r\nimport undoDelete from \"./undo_delete\";\r\nimport limit from \"./limit\";\r\nimport batchUpdate from \"./batch_update\";\r\n\r\nexport default function initPlugins(scheduler){\r\n undoDelete(scheduler);\r\n dragHighlightPos(scheduler);\r\n limit(scheduler);\r\n batchUpdate(scheduler);\r\n}","var uidSeed = Date.now();\r\nfunction uid () {\r\n\treturn uidSeed++;\r\n}\r\n\r\n// iframe-safe array type check instead of using instanceof\r\nfunction isArray(obj){\r\n\tif(Array.isArray){\r\n\t\treturn Array.isArray(obj);\r\n\t}else{\r\n\t\t// close enough\r\n\t\treturn (obj && obj.length !== undefined && obj.pop && obj.push);\r\n\t}\r\n}\r\n\r\n// non-primitive string object, e.g. new String(\"abc\")\r\nfunction isStringObject(obj){\r\n\treturn obj && typeof obj === \"object\" && \r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function String() { [native code] }\";\r\n}\r\n\r\n// non-primitive number object, e.g. new Number(5)\r\nfunction isNumberObject(obj){\r\n\treturn obj && typeof obj === \"object\" && \r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function Number() { [native code] }\";\r\n}\r\n\r\n// non-primitive number object, e.g. new Boolean(true)\r\nfunction isBooleanObject(obj){\r\n\treturn obj && typeof obj === \"object\" &&\r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function Boolean() { [native code] }\";\r\n}\r\n\r\nfunction isDate(obj) {\r\n\tif (obj && typeof obj === \"object\") {\r\n\t\treturn !!(obj.getFullYear && obj.getMonth && obj.getDate);\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\nfunction defined(obj) {\r\n\treturn typeof(obj) != \"undefined\";\r\n}\r\n\r\nfunction delay (callback, timeout){\r\n\tvar timer;\r\n\r\n\tvar result = function() {\r\n\t\tresult.$cancelTimeout();\r\n\t\tresult.$pending = true;\r\n\t\tvar args = Array.prototype.slice.call(arguments);\r\n\t\ttimer = setTimeout(function(){\r\n\t\t\tcallback.apply(this, args);\r\n\t\t\tresult.$pending = false;\r\n\t\t}, timeout);\r\n\t};\r\n\r\n\tresult.$pending = false;\r\n\tresult.$cancelTimeout = function(){\r\n\t\tclearTimeout(timer);\r\n\t\tresult.$pending = false;\r\n\t};\r\n\tresult.$execute = function(){\r\n\t\tvar args = Array.prototype.slice.call(arguments);\r\n\t\tcallback.apply(this, args);\r\n\t\tresult.$cancelTimeout();\r\n\t};\r\n\r\n\treturn result;\r\n}\r\n\r\nexport default {\r\n\tuid: uid,\r\n\tmixin: function mixin (target, source, force){\r\n\t\tfor (var f in source)\r\n\t\t\tif (((target[f] === undefined) || force)) target[f]=source[f];\r\n\t\treturn target;\r\n\t},\r\n\tcopy: function copy(object) {\r\n\t\tvar i, result; // iterator, types array, result\r\n\t\r\n\t\tif (object && typeof object == \"object\") {\r\n\t\r\n\t\t\tswitch (true){\r\n\t\t\t\tcase (isDate(object)):\r\n\t\t\t\t\tresult = new Date(object);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isArray(object)):\r\n\t\t\t\t\tresult = new Array(object.length);\r\n\t\t\t\t\tfor(i = 0; i < object.length; i++){\r\n\t\t\t\t\t\tresult[i] = copy(object[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isStringObject(object)):\r\n\t\t\t\t\tresult = new String(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isNumberObject(object)):\r\n\t\t\t\t\tresult = new Number(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isBooleanObject(object)):\r\n\t\t\t\t\tresult = new Boolean(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tresult = {};\r\n\t\t\t\t\tfor (i in object) {\r\n\t\t\t\t\t\tconst varType = typeof object[i];\r\n\r\n\t\t\t\t\t\tif (varType === \"string\" || varType === \"number\" || varType === \"boolean\" ) {\r\n\t\t\t\t\t\t\tresult[i] = object[i];\r\n\t\t\t\t\t\t} else if(isDate(object[i])){\r\n\t\t\t\t\t\t\tresult[i] = new Date(object[i]);\r\n\t\t\t\t\t\t}else if (Object.prototype.hasOwnProperty.apply(object, [i]))\r\n\t\t\t\t\t\t\tresult[i] = copy(object[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result || object;\r\n\t},\r\n\tdefined,\r\n\tisDate,\r\n\tdelay\r\n};\r\n","import utils from \"./utils/utils\";\r\n\r\nconst StateService = (function(){\r\n\tconst stateProviders = {};\r\n\r\n\tfunction getState(name){\r\n\t\tconst provider = stateProviders[name];\r\n\t\tif(provider){\r\n\t\t\treturn stateProviders[name].method();\r\n\t\t}else{\r\n\t\t\tconst res = {};\r\n\t\t\tfor(const i in stateProviders){\r\n\t\t\t\tif(!stateProviders[i].internal)\r\n\t\t\t\t\tutils.mixin(res, stateProviders[i].method(), true);\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\t\t}\r\n\t}\r\n\r\n\tfunction registerProvider(name, provider, internal){\r\n\t\tstateProviders[name] = { method: provider, internal: internal};\r\n\t}\r\n\r\n\tfunction unregisterProvider(name){\r\n\t\tdelete stateProviders[name];\r\n\t}\r\n\r\n\treturn {\r\n\t\tgetState: getState,\r\n\t\tregisterProvider: registerProvider,\r\n\t\tunregisterProvider: unregisterProvider\r\n\t};\r\n});\r\n\r\nexport default StateService;\r\n\r\n","export default function(scheduler){\r\n\treturn function assert(check, message){\r\n\t\tif (!check){\r\n\t\t\tif(scheduler.config.show_errors && scheduler.callEvent(\"onError\",[message]) !== false) {\r\n\t\t\t\tif (scheduler.message) {\r\n\t\t\t\t\tscheduler.message({type: \"error\", text: message, expire: -1});\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// eslint-disable-next-line\r\n\t\t\t\t\tconsole.log(message);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// eslint-disable-next-line no-debugger\r\n\t\t\t\tdebugger;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n}","export default function extend(scheduler) {\r\n\r\nvar commonViews = {\r\n\tagenda: \"https://docs.dhtmlx.com/scheduler/agenda_view.html\",\r\n\tgrid: \"https://docs.dhtmlx.com/scheduler/grid_view.html\",\r\n\tmap: \"https://docs.dhtmlx.com/scheduler/map_view.html\",\r\n\tunit: \"https://docs.dhtmlx.com/scheduler/units_view.html\",\r\n\ttimeline: \"https://docs.dhtmlx.com/scheduler/timeline_view.html\",\r\n\tweek_agenda: \"https://docs.dhtmlx.com/scheduler/weekagenda_view.html\",\r\n\tyear: \"https://docs.dhtmlx.com/scheduler/year_view.html\",\r\n\tanythingElse: \"https://docs.dhtmlx.com/scheduler/views.html\"\r\n};\r\n\r\nvar requiredExtensions = {\r\n\tagenda: \"ext/dhtmlxscheduler_agenda_view.js\",\r\n\tgrid: \"ext/dhtmlxscheduler_grid_view.js\",\r\n\tmap: \"ext/dhtmlxscheduler_map_view.js\",\r\n\tunit: \"ext/dhtmlxscheduler_units.js\",\r\n\ttimeline: \"ext/dhtmlxscheduler_timeline.js, ext/dhtmlxscheduler_treetimeline.js, ext/dhtmlxscheduler_daytimeline.js\",\r\n\tweek_agenda: \"ext/dhtmlxscheduler_week_agenda.js\",\r\n\tyear: \"ext/dhtmlxscheduler_year_view.js\",\r\n\tlimit: \"ext/dhtmlxscheduler_limit.js\"\r\n};\r\n\r\nscheduler._commonErrorMessages = {\r\n\tunknownView: function(view){\r\n\t\tvar relatedDoc = \"Related docs: \" + (commonViews[view] || commonViews.anythingElse); \r\n\t\tvar relatedExtension = requiredExtensions[view] ? (\"You're probably missing \" + requiredExtensions[view] + \".\") : \"\";\r\n\t\treturn (\r\n\t\t\t\"`\"+view+\"` view is not defined. \\n\" +\r\n\t\t\t\"Please check parameters you pass to `scheduler.init` or `scheduler.setCurrentView` in your code and ensure you've imported appropriate extensions. \\n\" + \r\n\t\t\trelatedDoc + \"\\n\" + (relatedExtension ? (relatedExtension + \"\\n\") : \"\"));\r\n\t},\r\n\tcollapsedContainer: function(div){\r\n\t\treturn \"Scheduler container height is set to *100%* but the rendered height is zero and the scheduler is not visible. \\n\"+\r\n\t\t\"Make sure that the container has some initial height or use different units. For example:\\n\" +\r\n\t\t\"
\\n\";\r\n\t}\r\n};\r\n\r\nscheduler.createTimelineView = function() {\r\n\tthrow new Error(\"scheduler.createTimelineView is not implemented. Be sure to add the required extension: \" + requiredExtensions.timeline + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.timeline);\r\n};\r\n\r\nscheduler.createUnitsView = function() {\r\n\tthrow new Error(\"scheduler.createUnitsView is not implemented. Be sure to add the required extension: \" + requiredExtensions.unit + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.unit);\r\n};\r\n\r\nscheduler.createGridView = function() {\r\n\tthrow new Error(\"scheduler.createGridView is not implemented. Be sure to add the required extension: \" + requiredExtensions.grid + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.grid);\r\n};\r\n\r\nscheduler.addMarkedTimespan = function() {\r\n\tthrow new Error(\"scheduler.addMarkedTimespan is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_limit.js\" + \r\n\t\"\\n\" +\r\n\t\"Related docs: https://docs.dhtmlx.com/scheduler/limits.html\");\r\n};\r\n\r\nscheduler.renderCalendar = function() {\r\n\tthrow new Error(\"scheduler.renderCalendar is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_minical.js\" + \r\n\t\"\\n\" +\r\n\t\"https://docs.dhtmlx.com/scheduler/minicalendar.html\");\r\n};\r\n\r\nscheduler.exportToPNG = function() {\r\n\tthrow new Error([\r\n\t\t\"scheduler.exportToPNG is not implemented.\",\r\n\t\t\"This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/png.html\",\r\n\t\t\"Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml\"\r\n\t].join(\"\\n\"));\r\n};\r\n\r\nscheduler.exportToPDF = function() {\r\n\tthrow new Error([\r\n\t\t\"scheduler.exportToPDF is not implemented.\",\r\n\t\t\"This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/pdf.html\",\r\n\t\t\"Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml\"\r\n\t].join(\"\\n\"));\r\n};\r\n\r\n\r\n}","import global from \"../global\";\r\n\r\nexport default function extend(scheduler) {\r\n/*\r\nif (global.dataProcessor && !dataProcessor.prototype.init_original){\r\n\tdataProcessor.prototype.init_original=dataProcessor.prototype.init;\r\n\tdataProcessor.prototype.init=function(obj){\r\n\t\tthis.init_original(obj);\r\n\t\tobj._dataprocessor=this;\r\n\r\n\t\tthis.setTransactionMode(\"POST\",true);\r\n\t\tthis.serverProcessor+=(this.serverProcessor.indexOf(\"?\")!=-1?\"&\":\"?\")+\"editing=true\";\r\n\t};\r\n}*/\r\n\r\nscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\tif(typeof dhtmlxError !== \"undefined\") {\r\n\t\twindow.dhtmlxError.catchError(\"LoadXML\", function(a, b, c){\r\n\t\t\tvar message = c[0].responseText;\r\n\r\n\t\t\tswitch (scheduler.config.ajax_error){\r\n\t\t\t\tcase \"alert\":\r\n\t\t\t\t\tglobal.alert(message);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"console\":\r\n\t\t\t\t\tglobal.console.log(message);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n});\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nfunction div(className){\r\n\tvar element = document.createElement(\"div\");\r\n\tvar classes = (className || \"\").split(\" \");\r\n\tclasses.forEach(function(cssClass){\r\n\t\telement.classList.add(cssClass);\r\n\t});\r\n\treturn element;\r\n}\r\nvar itemTypes = {\r\n\trows_container: function(){\r\n\t\treturn div(\"dhx_cal_navbar_rows_container\");\r\n\t},\r\n\trow: function(){\r\n\t\treturn div(\"dhx_cal_navbar_row\");\r\n\t},\r\n\tview: function (config) {\r\n\t\tvar element = div(\"dhx_cal_tab\");\r\n\t\telement.setAttribute(\"name\", config.view + \"_tab\");\r\n\t\telement.setAttribute(\"data-tab\", config.view);\r\n\t\t// element.setAttribute(\"data-viewname\", config.view); // FIXME: need to remove? not used anywhere\r\n\t\tif(scheduler.config.fix_tab_position){\r\n\t\t\tif(config.$firstTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_first\");\r\n\t\t\t}else if(config.$lastTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_last\");\r\n\t\t\t} else if(config.view !== \"week\") {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_standalone\");\r\n\t\t\t}\r\n\r\n\t\t\tif(config.$segmentedTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn element;\r\n\t},\r\n\tdate: function () {\r\n\t\treturn div(\"dhx_cal_date\");\r\n\t},\r\n\tbutton: function (config) {\r\n\t\treturn div(\"dhx_cal_nav_button dhx_cal_nav_button_custom dhx_cal_tab\");\r\n\t},\r\n\tbuiltInButton: function (config){\r\n\t\treturn div(\"dhx_cal_\" + config.view + \"_button dhx_cal_nav_button\");\r\n\t},\r\n\tspacer: function () {\r\n\t\treturn div(\"dhx_cal_line_spacer\");\r\n\t},\r\n\tminicalendarButton: function(config){\r\n\t\tvar minicalendarDiv = div('dhx_minical_icon');\r\n\t\tif(!config.click && !minicalendarDiv.$_eventAttached){\r\n\t\t\t\r\n\t\t\tscheduler.event(minicalendarDiv, \"click\", function () {\r\n\t\t\t\tif (scheduler.isCalendarVisible()) {\r\n\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tscheduler.renderCalendar({\r\n\t\t\t\t\t\tposition: this,\r\n\t\t\t\t\t\tdate: scheduler.getState().date,\r\n\t\t\t\t\t\tnavigation: true,\r\n\t\t\t\t\t\thandler: function (date, calendar) {\r\n\t\t\t\t\t\t\tscheduler.setCurrentView(date);\r\n\t\t\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn minicalendarDiv;\r\n\t},\r\n\thtml_element: function (config) {\r\n\t\treturn div(\"dhx_cal_nav_content\");\r\n\t}\r\n};\r\n\r\nfunction findRenderer(config) {\r\n\tvar renderer;\r\n\tif (config.view) {\r\n\t\tswitch (config.view){\r\n\t\t\tcase \"today\":\r\n\t\t\tcase \"next\":\r\n\t\t\tcase \"prev\":\r\n\t\t\t\trenderer = itemTypes.builtInButton;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"date\":\r\n\t\t\t\trenderer = itemTypes.date;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"spacer\":\r\n\t\t\t\trenderer = itemTypes.spacer;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"button\":\r\n\t\t\t\trenderer = itemTypes.button;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"minicalendar\":\r\n\t\t\t\trenderer = itemTypes.minicalendarButton;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\trenderer = itemTypes.view;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t} else if(config.rows) {\r\n\t\trenderer = itemTypes.rows_container;\r\n\t} else if(config.cols) {\r\n\t\trenderer = itemTypes.row;\r\n\t}\r\n\treturn renderer;\r\n}\r\n\r\nfunction renderElement(config){\r\n\tvar renderer = findRenderer(config);\r\n\tif(!renderer){\r\n\t\treturn;\r\n\t}\r\n\tvar element = renderer(config);\r\n\tif(config.css){\r\n\t\telement.classList.add(config.css);\r\n\t}\r\n\tif(config.width){\r\n\t\tvar value = config.width;\r\n\t\tif(value === value * 1){\r\n\t\t\tvalue += \"px\";\r\n\t\t}\r\n\t\telement.style.width = value;\r\n\t}\r\n\tif(config.height){\r\n\t\tvar value = config.height;\r\n\t\tif(value === value * 1){\r\n\t\t\tvalue += \"px\";\r\n\t\t}\r\n\t\telement.style.height = value;\r\n\t}\r\n\tif (config.click) {\r\n\t\tscheduler.event(element, \"click\", config.click);\r\n\t}\r\n\tif (config.html) {\r\n\t\telement.innerHTML = config.html;\r\n\t}\r\n\r\n\tif (config.align) {\r\n\t\tvar value = \"\";\r\n\t\tif (config.align == \"right\") {\r\n\t\t\tvalue = \"flex-end\";\r\n\t\t} else if(config.align == \"left\") {\r\n\t\t\tvalue = \"flex-start\";\r\n\t\t}\r\n\t\telement.style.justifyContent = value;\r\n\t}\r\n\treturn element;\r\n}\r\n\r\nfunction prepareConfig(config) {\r\n\tif (typeof config === \"string\") {\r\n\t\tconfig = {\r\n\t\t\tview: config\r\n\t\t};\r\n\t}\r\n\tif (!config.view && !config.rows && !config.cols) {\r\n\t\tconfig.view = \"button\";\r\n\t}\r\n\treturn config;\r\n}\r\n\r\nfunction renderLayout(config) {\r\n\tvar fragment = document.createDocumentFragment();\r\n\tvar items;\r\n\tif(Array.isArray(config)){\r\n\t\titems = config;\r\n\t}else{\r\n\t\titems = [config];\r\n\t}\r\n\r\n\tfor (var i = 0; i < items.length; i++) {\r\n\t\tvar view = prepareConfig(items[i]);\r\n\r\n\t\tif(view.view === \"day\" && items[i + 1]){\r\n\t\t\tvar next = prepareConfig(items[i + 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"month\"){\r\n\t\t\t\tview.$firstTab = true;\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(view.view === \"week\" && items[i - 1]){\r\n\t\t\tvar next = prepareConfig(items[i + 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"month\"){\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(view.view === \"month\" && items[i - 1]){\r\n\t\t\tvar next = prepareConfig(items[i - 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"day\"){\r\n\t\t\t\tview.$lastTab = true;\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar element = renderElement(view);\r\n\r\n\t\tfragment.appendChild(element);\r\n\t\tif(view.cols || view.rows){\r\n\t\t\telement.appendChild(renderLayout(view.cols || view.rows));\r\n\t\t}\r\n\t}\r\n\treturn fragment;\r\n}\r\n\r\nscheduler._init_nav_bar = function (items) {\r\n\tvar navBar = this.$container.querySelector(\".dhx_cal_navline\");\r\n\tif (!navBar){\r\n\t\tnavBar = document.createElement(\"div\");\r\n\t\tnavBar.className = \"dhx_cal_navline dhx_cal_navline_flex\";\r\n\t\tscheduler._update_nav_bar(items, navBar);\r\n\t\treturn navBar;\r\n\t}\r\n\treturn navBar;\r\n};\r\n\r\nvar previousNavbar = null;\r\nvar previousHeight = null;\r\nscheduler._update_nav_bar = function (config, container) {\r\n\r\n\tif(!config){\r\n\t\treturn;\r\n\t}\r\n\tvar heightChanged = false;\r\n\tvar configChanged = false;\r\n\r\n\tvar newHeight = config.height || scheduler.xy.nav_height;\r\n\r\n\tif(previousHeight === null ||\r\n\t\t\t(previousHeight !== newHeight)){\r\n\t\theightChanged = true;\r\n\t}\r\n\tif(!previousNavbar || JSON.stringify(config) !== previousNavbar){\r\n\t\tconfigChanged = true;\r\n\t}\r\n\r\n\tif(heightChanged){\r\n\t\tscheduler.xy.nav_height = newHeight;\r\n\t}\r\n\tif(configChanged){\r\n\t\tcontainer.innerHTML = \"\";\r\n\t\tcontainer.appendChild(renderLayout(config));\r\n\t}\r\n\r\n\tif(heightChanged || configChanged){\r\n\t\tscheduler.unset_actions();\r\n\t\tscheduler._els = [];\r\n\t\tscheduler.get_elements();\r\n\t\tscheduler.set_actions();\r\n\t}\r\n\r\n\tif(newHeight === 0){\r\n\t\tcontainer.style.display = \"none\";\r\n\t}else{\r\n\t\tcontainer.style.display = \"\";\r\n\t}\r\n\r\n\tpreviousHeight = newHeight;\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\tfunction isAttachedNode(container){\r\n\t\tvar root = document.body;\r\n\t\r\n\t\twhile(container && container != root){\r\n\t\t\tcontainer = container.parentNode;\r\n\t\t}\r\n\t\r\n\t\treturn !!(root == container);\r\n\t}\r\n\t\r\n\tfunction getWindowSize(window){\r\n\t\treturn {\r\n\t\t\tw : window.innerWidth || document.documentElement.clientWidth,\r\n\t\t\th : window.innerHeight || document.documentElement.clientHeight\r\n\t\t};\r\n\t}\r\n\tfunction equals(a,b){\r\n\t\treturn a.w == b.w && a.h == b.h;\r\n\t}\r\n\t\r\n\tfunction listenWindowResize(scheduler, window){\r\n\t\tvar oldSize = getWindowSize(window);\r\n\t\tvar resizeDelay;\r\n\t\tscheduler.event(window, \"resize\", function(){\r\n\t\t\tclearTimeout(resizeDelay);\r\n\t\t\tresizeDelay = setTimeout(function(){\r\n\r\n\t\t\t\tif (!isAttachedNode(scheduler.$container) || scheduler.$destroyed){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tvar newSize = getWindowSize(window);\r\n\t\t\t\t// element may be resized by container-autoresize exteinsion\r\n\t\t\t\t// check if the size is actually changed in order to not to get endless loop\r\n\t\t\t\tif (!equals(oldSize, newSize)) {\r\n\t\t\t\t\toldSize = newSize;\r\n\t\t\t\t\ttriggerSchedulerResize(scheduler);\r\n\t\t\t\t}\r\n\t\t\t}, 150);\r\n\t\t});\r\n\t}\r\n\t\r\n\tfunction triggerSchedulerResize(scheduler){\r\n\t\tif(scheduler.$destroyed || !scheduler.$root || !isAttachedNode(scheduler.$root)){\r\n\t\t\treturn;\t\r\n\t\t}\r\n\t\tif (scheduler.callEvent(\"onSchedulerResize\", [])) {\r\n\t\t\tscheduler.updateView();\r\n\t\t\tscheduler.callEvent(\"onAfterSchedulerResize\", []);\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction watchNodeResize(scheduler){\r\n\t\tvar previousHeight = scheduler.$root.offsetHeight;\r\n\t\tvar previousWidth = scheduler.$root.offsetWidth;\r\n\t\t\r\n\t\tfunction lowlevelResizeWatcher(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(scheduler.$root){\r\n\t\t\t\tif (scheduler.$root.offsetHeight != previousHeight ||\r\n\t\t\t\t\tscheduler.$root.offsetWidth != previousWidth){\r\n\t\t\t\t\ttriggerSchedulerResize(scheduler);\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\tpreviousHeight = scheduler.$root.offsetHeight;\r\n\t\t\t\tpreviousWidth = scheduler.$root.offsetWidth;\r\n\t\t\t}\r\n\t\r\n\t\t\tsetTimeout(lowlevelResizeWatcher, 200);\r\n\t\t}\r\n\t\t\r\n\t\tlowlevelResizeWatcher();\r\n\t}\r\n\t\r\n\tfunction addResizeListener(scheduler){\r\n\t\tvar root = scheduler.$container;\r\n\t\tvar containerStyles = window.getComputedStyle(root);\r\n\t\tif(containerStyles.getPropertyValue(\"position\") == \"static\"){\r\n\t\t\troot.style.position = \"relative\";\r\n\t\t}\r\n\t\r\n\t\tvar resizeWatcher = document.createElement('iframe');\r\n\t\tresizeWatcher.className = \"scheduler_container_resize_watcher\";\r\n\t\tresizeWatcher.tabIndex = -1;\r\n\t\tif(scheduler.config.wai_aria_attributes){\r\n\t\t\tresizeWatcher.setAttribute(\"role\", \"none\");\r\n\t\t\tresizeWatcher.setAttribute(\"aria-hidden\", true);\r\n\t\t}\r\n\t\r\n\t\t// in some environments (namely, in SalesForce) iframe.contentWindow is not available\r\n\t\tvar salesforce_environment = !!window[\"Sfdc\"] || !!window[\"$A\"] || window[\"Aura\"];\r\n\t\tif(salesforce_environment){\r\n\t\t\twatchNodeResize(scheduler);\r\n\t\t} else {\r\n\t\t\troot.appendChild(resizeWatcher);\r\n\t\t\tif (resizeWatcher.contentWindow) {\r\n\t\t\t\tlistenWindowResize(scheduler, resizeWatcher.contentWindow);\r\n\t\t\t} else {\r\n\t\t\t\t// if so - ditch the iframe and fallback to listening the main window resize\r\n\t\t\t\troot.removeChild(resizeWatcher);\r\n\t\t\t\tlistenWindowResize(scheduler, window);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\taddResizeListener(scheduler);\r\n\r\n}","class EventHost {\r\n\tconstructor(){\r\n\t\tthis._silent_mode = false;\r\n\t\tthis.listeners = {};\r\n\t}\r\n\t_silentStart(){\r\n\t\tthis._silent_mode = true;\r\n\t}\r\n\t_silentEnd() {\r\n\t\tthis._silent_mode = false;\r\n\t}\r\n}\r\n\r\nconst createEventStorage = function(obj) {\r\n\tlet handlers = {};\r\n\tlet index = 0;\r\n\tconst eventStorage = function(){\r\n\t\tlet combinedResult = true;\r\n\t\tfor(const i in handlers){\r\n\t\t\tconst handlerResult = handlers[i].apply(obj, arguments);\r\n\t\t\tcombinedResult=combinedResult && handlerResult;\r\n\t\t}\r\n\t\treturn combinedResult;\r\n\t};\r\n\teventStorage.addEvent=function(handler, settings){\r\n\t\tif (typeof (handler) == \"function\"){\r\n\t\t\tlet handlerId;\r\n\t\t\tif(settings && settings.id){\r\n\t\t\t\thandlerId = settings.id;\r\n\t\t\t}else{\r\n\t\t\t\thandlerId = index;\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\r\n\t\t\tif(settings && settings.once){\r\n\t\t\t\tconst originalHandler = handler;\r\n\t\t\t\thandler = function(){\r\n\t\t\t\t\toriginalHandler();\r\n\t\t\t\t\teventStorage.removeEvent(handlerId);\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\thandlers[handlerId] = handler;\r\n\t\t\treturn handlerId;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\teventStorage.removeEvent=function(id){\r\n\t\tdelete handlers[id];\r\n\t};\r\n\r\n\teventStorage.clear = function(){\r\n\t\thandlers = {};\r\n\t};\r\n\r\n\treturn eventStorage;\r\n};\r\n\r\nfunction makeEventable(obj){\r\n\r\n\tconst eventHost = new EventHost();\r\n\tobj.attachEvent=function(eventName, handler, settings){\r\n\t\teventName = 'ev_'+eventName.toLowerCase();\r\n\t\tif (!eventHost.listeners[eventName]){\r\n\t\t\teventHost.listeners[eventName] = createEventStorage(this);\r\n\t\t}\r\n\r\n\t\tif(settings && settings.thisObject){\r\n\t\t\thandler = handler.bind(settings.thisObject);\r\n\t\t}\r\n\r\n\t\tconst innerId = eventHost.listeners[eventName].addEvent(handler, settings);\r\n\r\n\t\tlet handlerId = (eventName+':'+innerId); //return ID (ev_eventname:1)\r\n\t\tif(settings && settings.id){\r\n\t\t\thandlerId = settings.id;\r\n\t\t}\r\n\t\treturn handlerId;\r\n\t};\r\n\r\n\tobj.attachAll = function(callback){\r\n\t\tthis.attachEvent('listen_all', callback);\r\n\t};\r\n\r\n\tobj.callEvent=function(name, eventArguments){\r\n\t\tif (eventHost._silent_mode) return true;\r\n\r\n\t\tconst handlerName = 'ev_'+name.toLowerCase();\r\n\r\n\t\tconst listeners = eventHost.listeners;\r\n\t\tif (listeners['ev_listen_all']){\r\n\t\t\tlisteners['ev_listen_all'].apply(this, [name].concat(eventArguments));\r\n\t\t}\r\n\r\n\t\tif (listeners[handlerName])\r\n\t\t\treturn listeners[handlerName].apply(this, eventArguments);\r\n\t\treturn true;\r\n\t};\r\n\r\n\tobj.checkEvent=function(name){\r\n\t\tconst listeners = eventHost.listeners;\r\n\t\treturn (!!listeners['ev_'+name.toLowerCase()]);\r\n\t};\r\n\r\n\tobj.detachEvent=function(id){\r\n\t\tif (id){\r\n\t\t\tlet listeners = eventHost.listeners;\r\n\t\t\tfor(const i in listeners){\r\n\t\t\t\tlisteners[i].removeEvent(id); //remove event\r\n\t\t\t}\r\n\r\n\t\t\tconst list = id.split(':');//get EventName and ID\r\n\t\t\tlisteners = eventHost.listeners;\r\n\t\t\tif(list.length === 2){\r\n\t\t\t\tconst eventName = list[0];\r\n\t\t\t\tconst eventId = list[1];\r\n\t\t\t\tif(listeners[eventName]){\r\n\t\t\t\t\tlisteners[eventName].removeEvent(eventId); //remove event\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tobj.detachAllEvents = function(){\r\n\t\tfor (const name in eventHost.listeners) {\r\n\t\t\teventHost.listeners[name].clear();\r\n\t\t}\r\n\t};\r\n\r\n}\r\n\r\nexport default makeEventable;","\r\nimport nav_bar from \"./nav_bar\";\r\nimport scheduler_resize_listener from \"./scheduler_resize_listener\";\r\nimport eventable from \"../utils/eventable\";\r\n\r\n\r\nexport default function extend(scheduler) {\r\n\r\neventable(scheduler);\r\n\r\nnav_bar(scheduler);\r\n\r\nscheduler._detachDomEvent = function(el, event, handler){\r\n\tif (el.removeEventListener){\r\n\t\tel.removeEventListener(event, handler, false);\r\n\r\n\t}else if (el.detachEvent){\r\n\t\tel.detachEvent(\"on\"+event, handler);\r\n\t}\r\n};\r\n\r\n\r\nscheduler._init_once = function(){\r\n\tscheduler_resize_listener(scheduler);\r\n\r\n\tscheduler._init_once = function(){};\r\n};\r\n\r\nconst layout = {\r\n\t\"navbar\": {\r\n\t\trender: function (config) {\r\n\t\t\treturn scheduler._init_nav_bar(config);\r\n\t\t}\r\n\t},\r\n\t\"header\": {\r\n\t\trender: function (config) {\r\n\t\t\tconst element = document.createElement(\"div\");\r\n\t\t\telement.className = \"dhx_cal_header\";\r\n\t\t\treturn element;\r\n\t\t}\r\n\t},\r\n\t\"dataArea\": {\r\n\t\trender: function (config) {\r\n\t\t\tconst element = document.createElement(\"div\");\r\n\t\t\telement.className = \"dhx_cal_data\";\r\n\t\t\treturn element;\r\n\t\t}\r\n\t},\r\n\t\"html_element\": {\r\n\t\trender: function (config) {\r\n\t\t\treturn config.html;\r\n\t\t}\r\n\t}\r\n};\r\n\r\nfunction hasSchedulerMarkup(element){\r\n\treturn !!(\r\n\t\telement.querySelector(\".dhx_cal_header\") &&\r\n\t\telement.querySelector(\".dhx_cal_data\") &&\r\n\t\telement.querySelector(\".dhx_cal_navline\")\r\n\t\t);\r\n}\r\n\r\nfunction createDefaultHeader(scheduler){\r\n\tconst views = [\r\n\t\t\"day\",\r\n\t\t\"week\",\r\n\t\t\"month\"\r\n\t];\r\n\tconst date = [\r\n\t\t\"date\"\r\n\t];\r\n\tconst nav = [\r\n\t\t\"prev\",\r\n\t\t\"today\",\r\n\t\t\"next\"\r\n\t];\r\n\r\n\tif(scheduler.matrix){\r\n\t\tfor(const i in scheduler.matrix){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\tif(scheduler._props){\r\n\t\tfor(const i in scheduler._props){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\r\n\tif(scheduler._grid && scheduler._grid.names){\r\n\t\tfor(const i in scheduler._grid.names){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\r\n\tconst optionalViews = [\r\n\t\t\"map\",\r\n\t\t\"agenda\",\r\n\t\t\"week_agenda\",\r\n\t\t\"year\"\r\n\t];\r\n\r\n\toptionalViews.forEach(function(viewName){\r\n\t\tif(scheduler[viewName + \"_view\"]){\r\n\t\t\tviews.push(viewName);\r\n\t\t}\r\n\t});\r\n\r\n\treturn views.concat(date).concat(nav);\r\n}\r\n\r\nscheduler.init=function(id,date,mode){\r\n\tif(this.$destroyed){\r\n\t\treturn; // not have errors when try to reinit destroyed scheduler\r\n\t}\r\n\tdate=date||(scheduler._currentDate());\r\n\tmode=mode||\"week\";\r\n\r\n\tif(this._obj){\r\n\t\tthis.unset_actions();\r\n\t}\r\n\r\n\tthis._obj=(typeof id == \"string\")?document.getElementById(id):id;\r\n\tthis.$container = this._obj;\r\n\tthis.$root = this._obj;\r\n\r\n\tif(!this.$container.offsetHeight && this.$container.offsetWidth && this.$container.style.height === \"100%\"){\r\n\t\t// scheduler container has zero height and non-zero width\r\n\t\twindow.console.error(scheduler._commonErrorMessages.collapsedContainer(), this.$container);\r\n\t}\r\n\r\n\tif(this.config.wai_aria_attributes && this.config.wai_aria_application_role){\r\n\t\tthis.$container.setAttribute(\"role\", \"application\");\r\n\t}\r\n\r\n\tif(!this.config.header && !hasSchedulerMarkup(this.$container)){\r\n\t\t// if no header config and no required markup - use the default header\r\n\t\t// so the scheduler could be initialized in an empty div\r\n\t\tthis.config.header = createDefaultHeader(this);\r\n\t\twindow.console.log([// jshint ignore:line\r\n\t\t\t\"Required DOM elements are missing from the scheduler container and **scheduler.config.header** is not specified.\",\r\n\t\t\t\"Using a default header configuration: \",\r\n\t\t\t\"scheduler.config.header = \" + JSON.stringify(this.config.header, null, 2),\r\n\t\t\t\"Check this article for the details: https://docs.dhtmlx.com/scheduler/initialization.html\"\r\n\t\t].join(\"\\n\"));// jshint ignore:line\r\n\t}\r\n\r\n\tif (this.config.header) {\r\n\t\tthis.$container.innerHTML = \"\";\r\n\t\tthis.$container.classList.add(\"dhx_cal_container\");\r\n\t\tif(this.config.header.height){\r\n\t\t\tthis.xy.nav_height = this.config.header.height;\r\n\t\t}\r\n\t\tthis.$container.appendChild(layout.navbar.render(this.config.header));\r\n\t\tthis.$container.appendChild(layout.header.render());\r\n\t\tthis.$container.appendChild(layout.dataArea.render());\r\n\t} else {\r\n\t\t// if no header config provided - make sure scheduler container has all necessary elements\r\n\t\tif(!hasSchedulerMarkup(this.$container)){\r\n\t\t\tthrow new Error([\r\n\t\t\t\t\"Required DOM elements are missing from the scheduler container.\",\r\n\t\t\t\t\"Be sure to either specify them manually in the markup: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviamarkup\",\r\n\t\t\t\t\"Or to use **scheduler.config.header** setting so they could be created automatically: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviaheaderconfig\"\r\n\t\t\t].join(\"\\n\"));\r\n\t\t}\r\n\t}\r\n\r\n\tif (this.config.rtl) this.$container.className += \" dhx_cal_container_rtl\";\r\n\r\n\t//hook for terrace skin\r\n\tif (this._skin_init)\r\n\t\tscheduler._skin_init();\r\n\r\n\tscheduler.date.init();\r\n\r\n\tthis._scroll=true;\r\n\r\n\tthis._els=[];\r\n\tthis.get_elements();\r\n\tthis.init_templates();\r\n\tthis.set_actions();\r\n\r\n\tthis._init_once();\r\n\tthis._init_touch_events();\r\n\r\n\tthis.set_sizes();\r\n\tscheduler.callEvent('onSchedulerReady', []);\r\n\tscheduler.$initialized = true;\r\n\tthis.setCurrentView(date,mode);\r\n\r\n};\r\n\r\nscheduler.xy={\r\n\tmin_event_height:20,\r\n\tbar_height: 24,\r\n\tscale_width:50,\r\n\tscroll_width:18,\r\n\tscale_height:20,\r\n\tmonth_scale_height:20,\r\n\tmenu_width:25,\r\n\tmargin_top:0,\r\n\tmargin_left:0,\r\n\teditor_width:140,\r\n\tmonth_head_height:22,\r\n\tevent_header_height: 14\r\n};\r\nscheduler.keys={\r\n\tedit_save:13,\r\n\tedit_cancel:27\r\n};\r\n\r\nscheduler.bind = function bind(functor, object){\r\n\tif(functor.bind)\r\n\t\treturn functor.bind(object);\r\n\telse\r\n\t\treturn function(){ return functor.apply(object,arguments); };\r\n};\r\n\r\nscheduler.set_sizes=function(){\r\n\r\n\tvar w = this._x = this._obj.clientWidth-this.xy.margin_left;\r\n\r\n\t//not-table mode always has scroll - need to be fixed in future\r\n\tvar scale_x=this._table_view?0:(this.xy.scale_width+this.xy.scroll_width);\r\n\r\n\tvar materialScalePlaceholder = this.$container.querySelector(\".dhx_cal_scale_placeholder\");\r\n\tif(scheduler._is_material_skin()){\r\n\t\tif(!materialScalePlaceholder) {\r\n\t\t\tmaterialScalePlaceholder = document.createElement(\"div\");\r\n\t\t\tmaterialScalePlaceholder.className = \"dhx_cal_scale_placeholder\";\r\n\t\t\tthis.$container.insertBefore(materialScalePlaceholder, this._els[\"dhx_cal_header\"][0]);\r\n\t\t}\r\n\t\tmaterialScalePlaceholder.style.display = \"block\";\r\n\r\n\t\tthis.set_xy(materialScalePlaceholder,w,this.xy.scale_height + 1,0, this._els[\"dhx_cal_header\"][0].offsetTop);\r\n\r\n\t}else{\r\n\t\tif(materialScalePlaceholder){\r\n\t\t\tmaterialScalePlaceholder.parentNode.removeChild(materialScalePlaceholder);\r\n\t\t}\r\n\t}\r\n\r\n\tif (this._lightbox) {\r\n\t\tif (scheduler.$container.offsetWidth < 1200) {\r\n\t\t} else {\r\n\t\t\tthis._setLbPosition(document.querySelector(\".dhx_cal_light\"));\r\n\t\t}\r\n\t}\r\n\r\n\tthis._data_width = w-scale_x;\r\n\r\n\tthis._els[\"dhx_cal_navline\"][0].style.width = w + \"px\";\r\n\tconst header = this._els[\"dhx_cal_header\"][0];\r\n\tthis.set_xy(header, this._data_width, this.xy.scale_height);\r\n\t// this._els[\"dhx_cal_header\"][0].style.marginLeft = `${scheduler.xy.scale_width}px`;\r\n\theader.style.left = ``;\r\n\theader.style.right = ``;\r\n\tif(!this._table_view){\r\n\t\tif(this.config.rtl){\r\n\t\t\theader.style.right = `${this.xy.scale_width}px`;\r\n\t\t}else{\r\n\t\t\theader.style.left = `${this.xy.scale_width}px`;\r\n\t\t}\r\n\t} else {\r\n\t\tif(!this.config.rtl){\r\n\t\t\theader.style.left = `-1px`;\r\n\t\t} else {\r\n\t\t\theader.style.right = `-1px`;\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.set_xy=function(node,w,h,x,y){\r\n\tfunction prepareValue(val){\r\n\t\tlet prepared = val;\r\n\t\tif(!isNaN(Number(prepared))){\r\n\t\t\tprepared = Math.max(0,prepared) + \"px\";\r\n\t\t}\r\n\t\treturn prepared;\r\n\t}\r\n\r\n\tvar direction = 'left';\r\n\r\n\tif(w !== undefined) {\r\n\t\tnode.style.width = prepareValue(w);\r\n\t}\r\n\r\n\tif(h !== undefined){\r\n\t\tnode.style.height = prepareValue(h);\r\n\t}\r\n\r\n\tif (arguments.length>3){\r\n\r\n\t\tif(x !== undefined){\r\n\t\t\tif (this.config.rtl) direction = 'right';\r\n\t\t\tnode.style[direction]=x+\"px\";\r\n\t\t}\r\n\t\tif(y !== undefined){\r\n\t\t\tnode.style.top=y+\"px\";\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.get_elements=function(){\r\n\t//get all child elements as named hash\r\n\tconst els=this._obj.getElementsByTagName(\"DIV\");\r\n\tfor (let i=0; i < els.length; i++){\r\n\t\tlet class_name= scheduler._getClassName(els[i]);\r\n\t\tconst attr_value = els[i].getAttribute(\"data-tab\") || els[i].getAttribute(\"name\") || \"\";\r\n\t\tif (class_name) class_name = class_name.split(\" \")[0];\r\n\t\tif (!this._els[class_name]) this._els[class_name]=[];\r\n\t\tthis._els[class_name].push(els[i]);\r\n\r\n\t\t//check if name need to be changed\r\n\t\t// scheduler.locale.labels[attr_value+\"_tab\"] - to fix getting labels for data-tab\r\n\t\tlet label = scheduler.locale.labels[attr_value+\"_tab\"] || scheduler.locale.labels[attr_value||class_name];\r\n\t\tif (typeof label !== \"string\" && attr_value && !els[i].innerHTML)\r\n\t\t\tlabel = attr_value.split(\"_\")[0];\r\n\t\tif (label) {\r\n\t\t\tthis._waiAria.labelAttr(els[i], label);\r\n\t\t\tels[i].innerHTML = label;\r\n\t\t}\r\n\t}\r\n};\r\n\r\n\r\nconst domEventsScope = scheduler._createDomEventScope();\r\n\r\nscheduler.unset_actions = function(){\r\n\tdomEventsScope.detachAll();\r\n};\r\n\r\nscheduler.set_actions=function(){\r\n\tfor (const a in this._els){\r\n\t\tif (this._click[a]){\r\n\t\t\tfor (let i=0; i < this._els[a].length; i++){\r\n\t\t\t\tconst element = this._els[a][i];\r\n\t\t\t\tconst handler = this._click[a].bind(element);\r\n\t\t\t\tdomEventsScope.attach(element, \"click\", handler);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tdomEventsScope.attach(this._obj, \"selectstart\", function(e){\r\n\t\te.preventDefault();\r\n\t\treturn false;\r\n\t});\r\n\t//this._obj.onselectstart=function(e){ return false; };\r\n\tdomEventsScope.attach(this._obj, \"mousemove\", function(e){\r\n\t\tif (!scheduler._temp_touch_block)\r\n\t\t\tscheduler._on_mouse_move(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"mousedown\", function(e){\r\n\t\tif (!scheduler._ignore_next_click)\r\n\t\t\tscheduler._on_mouse_down(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"mouseup\", function(e){\r\n\t\tif (!scheduler._ignore_next_click)\r\n\t\t\tscheduler._on_mouse_up(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"dblclick\", function(e){\r\n\t\tscheduler._on_dbl_click(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"contextmenu\", function(event) {\r\n\t\tif(scheduler.checkEvent(\"onContextMenu\")){\r\n\t\t\t// block the default browser context menu \r\n\t\t\tevent.preventDefault();\r\n\t\t}\r\n\r\n\t\tconst returnValue = scheduler.callEvent(\"onContextMenu\", [scheduler._locate_event(event.target), event]);\r\n\t\treturn returnValue;\r\n\t});\r\n};\r\nscheduler.select=function(id){\r\n\tif (this._select_id==id) return;\r\n\tscheduler._close_not_saved();\r\n\tthis.editStop(false);\r\n\tif(this._select_id){\r\n\t\tthis.unselect();\r\n\t}\r\n\tthis._select_id = id;\r\n\tthis.updateEvent(id);\r\n\tthis.callEvent(\"onEventSelected\", [id]);\r\n};\r\nscheduler.unselect=function(id){\r\n\tif (id && id!=this._select_id) {\r\n\t\treturn;\r\n\t}\r\n\tconst previousSelection = this._select_id;\r\n\tthis._select_id = null;\r\n\tif (previousSelection && this.getEvent(previousSelection)) {\r\n\t\tthis.updateEvent(previousSelection);\r\n\t}\r\n\tthis.callEvent(\"onEventUnselected\", [previousSelection]);\r\n};\r\nscheduler.$stateProvider.registerProvider(\"global\", (function(){\r\n\treturn {\r\n\t\tmode: this._mode,\r\n\t\tdate: new Date(this._date),\r\n\t\tmin_date: new Date(this._min_date),\r\n\t\tmax_date: new Date(this._max_date),\r\n\t\teditor_id: this._edit_id,\r\n\t\tlightbox_id: this._lightbox_id,\r\n\t\tnew_event: this._new_event,\r\n\t\tselect_id: this._select_id,\r\n\t\texpanded: this.expanded,\r\n\t\tdrag_id: this._drag_id,\r\n\t\tdrag_mode: this._drag_mode\r\n\t};\r\n}).bind(scheduler));\r\n\r\nscheduler._click={\r\n\tdhx_cal_data:function(e){\r\n\t\t//in case of touch disable click processing\r\n\t\tif (scheduler._ignore_next_click){\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\r\n\t\tconst id = scheduler._locate_event(e.target);\r\n\r\n\t\tif (!id) {\r\n\t\t\tscheduler.callEvent(\"onEmptyClick\",[scheduler.getActionData(e).date, e]);\r\n\t\t} else {\r\n\t\t\tif ( !scheduler.callEvent(\"onClick\",[id,e]) || scheduler.config.readonly ) return;\r\n\t\t}\r\n\r\n\t\tif (id && scheduler.config.select) {\r\n\r\n\t\t\tscheduler.select(id);\r\n\t\t\tconst icon = e.target.closest(\".dhx_menu_icon\");\r\n\r\n\t\t\tconst mask = scheduler._getClassName(icon);\r\n\t\t\tif (mask.indexOf(\"_icon\")!=-1)\r\n\t\t\t\tscheduler._click.buttons[mask.split(\" \")[1].replace(\"icon_\",\"\")](id);\r\n\t\t} else{\r\n\t\t\tscheduler._close_not_saved();\r\n\t\t\tif (scheduler.getState().select_id && new Date().valueOf()-(scheduler._new_event||0) > 500){\r\n\t\t\t\tscheduler.unselect();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tdhx_cal_prev_button:function(){\r\n\t\tscheduler._click.dhx_cal_next_button(0,-1);\r\n\t},\r\n\tdhx_cal_next_button:function(dummy,step){\r\n\t\tlet def_step = 1;\r\n\t\tif (scheduler.config.rtl){\r\n\t\t\tstep = -step;\r\n\t\t\tdef_step = -def_step;\r\n\t\t}\r\n\t\tscheduler.setCurrentView(scheduler.date.add( //next line changes scheduler._date , but seems it has not side-effects\r\n\t\t\tscheduler.date[scheduler._mode+\"_start\"](new Date(scheduler._date)),(step||def_step),scheduler._mode));\r\n\t},\r\n\tdhx_cal_today_button:function(){\r\n\t\tif (scheduler.callEvent(\"onBeforeTodayDisplayed\", [])) {\r\n\t\t\tscheduler.setCurrentView(scheduler._currentDate());\r\n\t\t}\r\n\t},\r\n\tdhx_cal_tab:function(){\r\n\t\tconst name = this.getAttribute(\"data-tab\");\r\n\t\tconst deprecated_name = this.getAttribute(\"name\");\r\n\t\tconst mode = name || deprecated_name.substring(0, deprecated_name.search(\"_tab\"));\r\n\t\tscheduler.setCurrentView(scheduler._date,mode);\r\n\t},\r\n\tbuttons:{\r\n\t\t\"delete\":function(id){\r\n\t\t\tconst c = scheduler.locale.labels.confirm_deleting;\r\n\t\t\tscheduler._dhtmlx_confirm({message: c, title: scheduler.locale.labels.title_confirm_deleting, callback:function(){ scheduler.deleteEvent(id); },\r\n\t\t\tconfig: {ok: scheduler.locale.labels.icon_delete}\r\n\t\t});\r\n\t\t},\r\n\t\tedit:function(id){ scheduler.edit(id); },\r\n\t\tsave:function(id){ scheduler.editStop(true); },\r\n\t\tdetails:function(id){ scheduler.showLightbox(id); },\r\n\t\tform:function(id){ scheduler.showLightbox(id); },\r\n\t\tcancel:function(id){ scheduler.editStop(false); }\r\n\t}\r\n};\r\nscheduler._dhtmlx_confirm = function({message, title, callback, config}) {\r\n\tif (!message)\r\n\t\treturn callback();\r\n\r\n\tconfig = config || {};\r\n\tconst opts = { ...config, text: message };\r\n\tif (title) {\r\n\t\topts.title = title;\r\n\t}\r\n\tif (callback) {\r\n\t\topts.callback = function(result) {\r\n\t\t\tif (result) {\r\n\t\t\t\tcallback();\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\tscheduler.confirm(opts);\r\n};\r\nscheduler.addEventNow=function(start,end,e){\r\n\tlet base = {};\r\n\tif (scheduler._isObject(start) && !scheduler._isDate(start)){\r\n\t\tbase = start;\r\n\t\tstart = null;\r\n\t}\r\n\r\n\tconst duration = (this.config.event_duration||this.config.time_step)*60000;\r\n\tif (!start) start = base.start_date||Math.round((scheduler._currentDate()).valueOf()/duration)*duration;\r\n\tlet start_date = new Date(start);\r\n\tif (!end){\r\n\t\tlet start_hour = this.config.first_hour;\r\n\t\tif (start_hour > start_date.getHours()){\r\n\t\t\tstart_date.setHours(start_hour);\r\n\t\t\tstart = start_date.valueOf();\r\n\t\t}\r\n\t\tend = start.valueOf()+duration;\r\n\t}\r\n\tlet end_date = new Date(end);\r\n\r\n\t// scheduler.addEventNow(new Date(), new Date()) + collision though get_visible events defect (such event was not retrieved)\r\n\tif(start_date.valueOf() == end_date.valueOf())\r\n\t\tend_date.setTime(end_date.valueOf()+duration);\r\n\tbase.start_date = base.start_date||start_date;\r\n\tbase.end_date = base.end_date||end_date;\r\n\tbase.text = base.text||this.locale.labels.new_event;\r\n\tbase.id = this._drag_id = base.id || this.uid();\r\n\tthis._drag_mode=\"new-size\";\r\n\tthis._loading=true;\r\n\tconst eventId = this.addEvent(base);\r\n\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\tthis._loading=false;\r\n\r\n\tthis._drag_event={}; //dummy , to trigger correct event updating logic\r\n\tthis._on_mouse_up(e);\r\n\treturn eventId;\r\n};\r\nscheduler._on_dbl_click=function(e,src){\r\n\tsrc = src || e.target;\r\n\tif (this.config.readonly) return;\r\n\tconst name = scheduler._getClassName(src).split(\" \")[0];\r\n\tswitch(name){\r\n\t\tcase \"dhx_scale_holder\":\r\n\t\tcase \"dhx_scale_holder_now\":\r\n\t\tcase \"dhx_month_body\":\r\n\t\tcase \"dhx_wa_day_data\":\r\n\t\t\tif (!scheduler.config.dblclick_create) break;\r\n\t\t\tthis.addEventNow(this.getActionData(e).date,null,e);\r\n\t\t\tbreak;\r\n\t\tcase \"dhx_cal_event\":\r\n\t\tcase \"dhx_wa_ev_body\":\r\n\t\tcase \"dhx_agenda_line\":\r\n\t\tcase \"dhx_cal_agenda_event_line\":\r\n\t\tcase \"dhx_grid_event\":\r\n\t\tcase \"dhx_cal_event_line\":\r\n\t\tcase \"dhx_cal_event_clear\": {\r\n\t\t\tconst id = this._locate_event(src);\r\n\t\t\tif (!this.callEvent(\"onDblClick\",[id,e])) return;\r\n\t\t\tif (this.config.details_on_dblclick || this._table_view || !this.getEvent(id)._timed || !this.config.select)\r\n\t\t\t\tthis.showLightbox(id);\r\n\t\t\telse\r\n\t\t\t\tthis.edit(id);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcase \"dhx_time_block\":\r\n\t\tcase \"dhx_cal_container\":\r\n\t\t\treturn;\r\n\t\tdefault: {\r\n\t\t\tconst viewHandler = this[\"dblclick_\"+name];\r\n\t\t\tif (viewHandler) {\r\n\t\t\t\tviewHandler.call(this,e);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif (src.parentNode && src != this)\r\n\t\t\t\t\treturn scheduler._on_dbl_click(e,src.parentNode);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n};\r\n//column index by mouse x-coordinate\r\nscheduler._get_column_index = function(x_pos){\r\n\tlet column = 0;\r\n\tif (this._cols){\r\n\t\tlet width = 0;\r\n\t\tlet i = 0;\r\n\t\twhile (width + this._cols[i] < x_pos && i < this._cols.length){\r\n\t\t\twidth += this._cols[i];\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tcolumn = i + (this._cols[i] ? ((x_pos - width)/ this._cols[i]) : 0);\r\n\r\n\t\tif (this._ignores){\r\n\t\t\tif(column >= this._cols.length){\r\n\t\t\t\twhile(column >= 1 && this._ignores[Math.floor(column)]){\r\n\t\t\t\t\tcolumn--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n\treturn column;\r\n};\r\n\r\n//transform mouse coordinates to day-time indexes of week based view\r\nscheduler._week_indexes_from_pos = function(pos){\r\n\t//\"get position\" can be invoked before columns are loaded into the units view(e.g. by onMouseMove handler in key_nav.js)\r\n\tif(!this._cols){\r\n\t\treturn pos;\r\n\t}else{\r\n\t\tconst column = this._get_column_index(pos.x);\r\n\r\n\t\tpos.x=Math.min(this._cols.length-1, Math.max(0,Math.ceil(column)-1));\r\n\t\tpos.y=Math.max(0,Math.ceil(pos.y*60/(this.config.time_step*this.config.hour_size_px))-1)+this.config.first_hour*(60/this.config.time_step);\r\n\t\treturn pos;\r\n\t}\r\n};\r\n\r\nscheduler._mouse_coords=function(ev){\r\n\tlet pos;\r\n\tconst body = document.body;\r\n\tconst documentElement = document.documentElement;\r\n\tif (!this.$env.isIE && (ev.pageX || ev.pageY))\r\n\t\tpos={x:ev.pageX, y:ev.pageY};\r\n\telse pos={\r\n\t\tx:ev.clientX + (body.scrollLeft||documentElement.scrollLeft||0) - body.clientLeft,\r\n\t\ty:ev.clientY + (body.scrollTop||documentElement.scrollTop||0) - body.clientTop\r\n\t};\r\n\t//apply layout\r\n\tif (this.config.rtl && this._colsS) {\r\n\t\tpos.x = this.$container.querySelector(\".dhx_cal_data\").offsetWidth - pos.x;\r\n\t\tpos.x += this.$domHelpers.getAbsoluteLeft(this._obj);\r\n\t\tif (this._mode !== \"month\") {\r\n\t\t\tpos.x -= this.xy.scale_width;\r\n\t\t}\r\n\t} else {\r\n\t\tpos.x-=this.$domHelpers.getAbsoluteLeft(this._obj)+(this._table_view?0:this.xy.scale_width);\r\n\t}\r\n\r\n\tconst dataArea = this.$container.querySelector(\".dhx_cal_data\");\r\n\t//pos.y-=this.$domHelpers.getAbsoluteTop(this._obj)+this.xy.nav_height+(this._dy_shift||0)+this.xy.scale_height-this._els[\"dhx_cal_data\"][0].scrollTop;\r\n\tpos.y-=this.$domHelpers.getAbsoluteTop(dataArea)-this._els[\"dhx_cal_data\"][0].scrollTop;\r\n\tpos.ev = ev;\r\n\tconst handler = this[\"mouse_\"+this._mode];\r\n\tif (handler){\r\n\t\tpos = handler.call(this,pos);\r\n\t}else{\r\n\t\t//transform to date\r\n\t\tif (!this._table_view) {\r\n\t\t\tpos = this._week_indexes_from_pos(pos);\r\n\t\t} else {\r\n\t\t\tconst column = this._get_column_index(pos.x);\r\n\t\t\tif (!this._cols || !this._colsS) // agenda/map views\r\n\t\t\t\treturn pos;\r\n\t\t\tlet dy=0;\r\n\t\t\tfor (dy=1; dy < this._colsS.heights.length; dy++)\r\n\t\t\t\tif (this._colsS.heights[dy]>pos.y) break;\r\n\r\n\t\t\tpos.y=Math.ceil( (Math.max(0, column)+Math.max(0,dy-1)*7)*24*60/this.config.time_step );\r\n\r\n\t\t\tif (scheduler._drag_mode || this._mode == \"month\")\r\n\t\t\t\tpos.y=(Math.max(0,Math.ceil(column)-1)+Math.max(0,dy-1)*7)*24*60/this.config.time_step;\r\n\r\n\t\t\t//we care about ignored days only during event moving in month view\r\n\t\t\tif (this._drag_mode == \"move\"){\r\n\t\t\t\tif (scheduler._ignores_detected && scheduler.config.preserve_length){\r\n\t\t\t\t\tpos._ignores = true;\r\n\t\t\t\t\t//get real lengtn of event\r\n\t\t\t\t\tif (!this._drag_event._event_length)\r\n\t\t\t\t\t\tthis._drag_event._event_length = this._get_real_event_length(this._drag_event.start_date, this._drag_event.end_date, { x_step:1, x_unit:\"day\"});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tpos.x=0;\r\n\t\t}\r\n\t}\r\n\tpos.timestamp = +new Date();\r\n\treturn pos;\r\n};\r\nscheduler._close_not_saved=function(){\r\n\tif (new Date().valueOf()-(scheduler._new_event||0) > 500 && scheduler._edit_id){\r\n\t\tconst confirmationText=scheduler.locale.labels.confirm_closing;\r\n\r\n\t\tscheduler._dhtmlx_confirm({\r\n\t\t\tmessage: confirmationText, \r\n\t\t\ttitle: scheduler.locale.labels.title_confirm_closing, \r\n\t\t\tcallback: function() { \r\n\t\t\t\tscheduler.editStop(scheduler.config.positive_closing);\r\n\t\t\t}\r\n\t\t});\r\n\t\tif(confirmationText){\r\n\t\t\tthis._drag_id = this._drag_pos = this._drag_mode = null;\r\n\t\t}\r\n\t}\r\n};\r\nscheduler._correct_shift=function(start, back){\r\n\treturn start-=((new Date(scheduler._min_date)).getTimezoneOffset()-(new Date(start)).getTimezoneOffset())*60000*(back?-1:1);\r\n};\r\n\r\nscheduler._is_pos_changed = function(old_pos, new_pos){\r\n\tfunction diff(old_val, new_val, acc){\r\n\t\treturn !!(Math.abs(old_val - new_val) > acc);\r\n\t}\r\n\r\n\tif(!(old_pos && this._drag_pos)){\r\n\t\treturn true;\r\n\t}\r\n\tconst delay = 100;\r\n\tconst d_pos = 5;\r\n\r\n\t// start drag only if passed some time since mouse down, or if mouse position changed sufficiently\r\n\treturn !!(this._drag_pos.has_moved || !this._drag_pos.timestamp || (new_pos.timestamp - this._drag_pos.timestamp > delay) || diff(old_pos.ev.clientX, new_pos.ev.clientX, d_pos) || diff(old_pos.ev.clientY, new_pos.ev.clientY, d_pos));\r\n};\r\n\r\nscheduler._correct_drag_start_date = function(start){\r\n\tlet obj;\r\n\tif (scheduler.matrix)\r\n\t\tobj = scheduler.matrix[scheduler._mode];\r\n\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\tstart = new Date(start);\r\n\tlet len = 1;\r\n\tif(obj._start_correction || obj._end_correction)\r\n\t\tlen = (obj.last_hour||0)*60 - (start.getHours()*60+start.getMinutes()) || 1;\r\n\r\n\treturn start*1 + (scheduler._get_fictional_event_length(start, len, obj) - len);\r\n};\r\nscheduler._correct_drag_end_date = function(start, duration){\r\n\tlet obj;\r\n\tif (scheduler.matrix) {\r\n\t\tobj = scheduler.matrix[scheduler._mode];\r\n\t}\r\n\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\tconst end = start*1 + scheduler._get_fictional_event_length(start, duration, obj);\r\n\treturn new Date(end*1 - (scheduler._get_fictional_event_length(end, -1, obj, -1) + 1));\r\n};\r\n\r\nscheduler._on_mouse_move=function(e){\r\n\tif (this._drag_mode){\r\n\t\tvar pos=this._mouse_coords(e);\r\n\t\tif (this._is_pos_changed(this._drag_pos, pos)){\r\n\t\t\tvar start, end;\r\n\t\t\tif (this._edit_id!=this._drag_id)\r\n\t\t\t\tthis._close_not_saved();\r\n\r\n\t\t\tif(!this._drag_mode)\r\n\t\t\t\treturn;\r\n\r\n\t\t\tvar mousedownPos = null;\r\n\t\t\tif(this._drag_pos && !this._drag_pos.has_moved){\r\n\t\t\t\tmousedownPos = this._drag_pos;\r\n\t\t\t\tmousedownPos.has_moved = true;\r\n\t\t\t}\r\n\r\n\t\t\tthis._drag_pos = pos;\r\n\r\n\t\t\tthis._drag_pos.has_moved = true;\r\n\r\n\t\t\tif (this._drag_mode==\"create\"){\r\n\r\n\t\t\t\t// use mouse down position as a starting point for drag-create\r\n\t\t\t\tif(mousedownPos){\r\n\t\t\t\t\tpos = mousedownPos;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._close_not_saved();\r\n\t\t\t\tthis.unselect(this._select_id);\r\n\t\t\t\tthis._loading=true; //will be ignored by dataprocessor\r\n\r\n\t\t\t\tstart = this._get_date_from_pos(pos).valueOf();\r\n\r\n\t\t\t\tif (!this._drag_start) {\r\n\t\t\t\t\tvar res = this.callEvent(\"onBeforeEventCreated\", [e, this._drag_id]);\r\n\t\t\t\t\tif (!res){\r\n\t\t\t\t\t\tthis._loading=false;\r\n\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis._loading=false;\r\n\t\t\t\t\tthis._drag_start=start;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tend = start;\r\n\t\t\t\tif (end == this._drag_start) {\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar start_date = new Date(this._drag_start);\r\n\t\t\t\tvar end_date = new Date(end);\r\n\t\t\t\tif ( (this._mode == \"day\" || this._mode == \"week\") &&\r\n\t\t\t\t\t(start_date.getHours() == end_date.getHours() &&\r\n\t\t\t\t\tstart_date.getMinutes() == end_date.getMinutes()) ) {\r\n\t\t\t\t\t\tend_date = new Date(this._drag_start+1000);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\tthis._drag_id=this.uid();\r\n\t\t\t\tthis.addEvent(start_date, end_date, this.locale.labels.new_event, this._drag_id, pos.fields);\r\n\r\n\t\t\t\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\t\t\t\tthis._loading=false;\r\n\t\t\t\tthis._drag_mode=\"new-size\";\r\n\r\n\t\t\t}\r\n\r\n\t\t\tvar timeStep = this.config.time_step;\r\n\t\t\tvar ev=this.getEvent(this._drag_id);\r\n\t\t\tvar obj;\r\n\t\t\tif (scheduler.matrix)\r\n\t\t\t\tobj = scheduler.matrix[scheduler._mode];\r\n\t\t\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\t\t\tif (this._drag_mode==\"move\"){\r\n\t\t\t\tstart = this._min_date.valueOf()+(pos.y*this.config.time_step+pos.x*24*60)*60000;\r\n\t\t\t\tif (!pos.custom && this._table_view) {\r\n\t\t\t\t\tstart += this.date.time_part(ev.start_date) * 1000;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!this._table_view && this._dragEventBody && this._drag_event._move_event_shift === undefined) {\r\n\t\t\t\t\tthis._drag_event._move_event_shift = start - ev.start_date;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (this._drag_event._move_event_shift) {\r\n\t\t\t\t\tstart -= this._drag_event._move_event_shift;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstart = this._correct_shift(start);\r\n\r\n\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view && obj){\r\n\r\n\t\t\t\t\tstart = scheduler._correct_drag_start_date(start);\r\n\t\t\t\t\tend = scheduler._correct_drag_end_date(start,this._drag_event._event_length);\r\n\r\n\t\t\t\t} else\r\n\t\t\t\t\tend = ev.end_date.valueOf()-(ev.start_date.valueOf()-start);\r\n\t\t\t} else { // resize\r\n\t\t\t\tstart = ev.start_date.valueOf();\r\n\t\t\t\tend = ev.end_date.valueOf();\r\n\t\t\t\tif (this._table_view) {\r\n\t\t\t\t\tvar resize_date = this._min_date.valueOf()+pos.y*this.config.time_step*60000 + (pos.custom?0:24*60*60000);\r\n\t\t\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\t\t\tresize_date = this._correct_shift(resize_date, false);\r\n\t\t\t\t\t\tif( this._drag_from_start ) {\r\n\t\t\t\t\t\t\tvar day = 24*60*60000;\r\n\t\t\t\t\t\t\tif( resize_date <= scheduler.date.date_part(new Date(end+day-1)).valueOf() ) // to get end time as 23:59:59 and then the day start\r\n\t\t\t\t\t\t\t\tstart = resize_date - day;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tend = resize_date;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif(this.config.preserve_length) {\r\n\t\t\t\t\t\t\tif (pos.resize_from_start) {\r\n\t\t\t\t\t\t\t\tstart = scheduler._correct_drag_start_date(resize_date);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tend = scheduler._correct_drag_end_date(resize_date, 0);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tif (pos.resize_from_start) {\r\n\t\t\t\t\t\t\t\tstart = resize_date;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tend = resize_date;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar end_day_start = this.date.date_part(new Date(ev.end_date.valueOf() - 1)).valueOf();\r\n\t\t\t\t\tvar end_day_date = new Date(end_day_start);\r\n\t\t\t\t\tvar firstHour = this.config.first_hour;\r\n\t\t\t\t\tvar lastHour = this.config.last_hour;\r\n\t\t\t\t\tvar maxY = (lastHour - firstHour) * (60/timeStep);\r\n\r\n\t\t\t\t\tthis.config.time_step = 1;\r\n\t\t\t\t\tvar precisePos = this._mouse_coords(e);\r\n\t\t\t\t\tthis.config.time_step = timeStep;\r\n\r\n\t\t\t\t\tvar minDate = pos.y*timeStep*60000;\r\n\t\t\t\t\tvar maxDate = Math.min(pos.y + 1, maxY)*timeStep*60000;\r\n\t\t\t\t\tvar preciseDate = precisePos.y*60000;\r\n\r\n\t\t\t\t\t// rounding end date to the closest time step\r\n\t\t\t\t\tif(Math.abs(minDate - preciseDate) > Math.abs(maxDate - preciseDate)){\r\n\t\t\t\t\t\tend = end_day_start + maxDate;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tend = end_day_start + minDate;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = end + ((new Date(end)).getTimezoneOffset() - end_day_date.getTimezoneOffset()) * 60000;\r\n\t\t\t\t\tthis._els[\"dhx_cal_data\"][0].style.cursor=\"s-resize\";\r\n\t\t\t\t\tif (this._mode == \"week\" || this._mode == \"day\")\r\n\t\t\t\t\t\tend = this._correct_shift(end);\r\n\t\t\t\t}\r\n\t\t\t\tif (this._drag_mode == \"new-size\") {\r\n\t\t\t\t\tif (end <= this._drag_start){\r\n\t\t\t\t\t\tvar shift = pos.shift||((this._table_view && !pos.custom)?24*60*60000:0);\r\n\t\t\t\t\t\tstart = end-(pos.shift?0:shift);\r\n\t\t\t\t\t\tend = this._drag_start+(shift||(timeStep*60000));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tstart = this._drag_start;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (end<=start)\r\n\t\t\t\t\t\tend=start+timeStep*60000;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar new_end = new Date(end-1);\r\n\t\t\tvar new_start = new Date(start);\r\n\t\t\t//deny drag out of visible scheduler scale in timeline view\r\n\t\t\tif(this._drag_mode==\"move\" && scheduler.config.limit_drag_out &&\r\n\t\t\t\t(+new_start < +scheduler._min_date || +end > +scheduler._max_date)){\r\n\r\n\t\t\t\tif(+ev.start_date < +scheduler._min_date || +ev.end_date > +scheduler._max_date){\r\n\t\t\t\t\t// not move event if it's already outside time scale\r\n\t\t\t\t\tnew_start = new Date(ev.start_date);\r\n\t\t\t\t\tend = new Date(ev.end_date);\r\n\t\t\t\t}else{\r\n\r\n\t\t\t\t\tvar duration = end - new_start;\r\n\r\n\t\t\t\t\tif(+new_start < +scheduler._min_date){\r\n\t\t\t\t\t\tnew_start = new Date(scheduler._min_date);\r\n\t\t\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view){\r\n\t\t\t\t\t\t\tnew_start = new Date(scheduler._correct_drag_start_date(new_start));\r\n\t\t\t\t\t\t\tif(obj._start_correction)\r\n\t\t\t\t\t\t\t\tnew_start = new Date(new_start.valueOf() + obj._start_correction);\r\n\t\t\t\t\t\t\tend = new Date(new_start*1 + this._get_fictional_event_length(new_start, this._drag_event._event_length, obj));\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tend = new Date(+new_start + duration);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tend = new Date(scheduler._max_date);\r\n\r\n\t\t\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view){\r\n\t\t\t\t\t\t\tif(obj._end_correction)\r\n\t\t\t\t\t\t\t\tend = new Date(end.valueOf() - obj._end_correction);\r\n\t\t\t\t\t\t\tend = new Date(end*1 - this._get_fictional_event_length(end, 0, obj, true));\r\n\t\t\t\t\t\t\tnew_start = new Date(end*1 - this._get_fictional_event_length(end, this._drag_event._event_length, obj, true));\r\n\t\t\t\t\t\t\tif(this._ignores_detected){\r\n\t\t\t\t\t\t\t\tnew_start = scheduler.date.add(new_start, obj.x_step, obj.x_unit);\r\n\t\t\t\t\t\t\t\tend = new Date(end*1 - this._get_fictional_event_length(end, 0, obj, true));\r\n\t\t\t\t\t\t\t\tend = scheduler.date.add(end, obj.x_step, obj.x_unit);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tnew_start = new Date(+end - duration);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\tvar new_end = new Date(end-1);\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\t// fix event dates when resized to bottom of the column (day/week views)\r\n\t\t\tif(!this._table_view && this._dragEventBody &&\r\n\t\t\t\t!scheduler.config.all_timed &&\r\n\t\t\t\t((!scheduler._get_section_view() && pos.x != this._get_event_sday({start_date: new Date(start), end_date:new Date(start)})) || new Date(start).getHours() < this.config.first_hour)){\r\n\t\t\t\tvar duration = end - new_start;\r\n\t\t\t\tif (this._drag_mode == \"move\") {\r\n\t\t\t\t\tvar day = this._min_date.valueOf() + (pos.x * 24 * 60) * 60000;\r\n\t\t\t\t\tnew_start = new Date(day);\r\n\t\t\t\t\tnew_start.setHours(this.config.first_hour);\r\n\t\t\t\t\tend = new Date(new_start.valueOf() + duration);\r\n\t\t\t\t\tnew_end = new Date(end-1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// fix event dates when resized to bottom of the column (day/week views)\r\n\t\t\tif(!this._table_view &&\r\n\t\t\t\t!scheduler.config.all_timed &&\r\n\t\t\t\t((!scheduler.getView() && pos.x != this._get_event_sday({start_date: new Date(end), end_date:new Date(end)})) || new Date(end).getHours() >= this.config.last_hour)){\r\n\t\t\t\tvar duration = end - new_start;\r\n\t\t\t\tvar day = this._min_date.valueOf()+(pos.x*24*60)*60000;\r\n\t\t\t\tend = scheduler.date.date_part(new Date(day));\r\n\t\t\t\tend.setHours(this.config.last_hour);\r\n\t\t\t\tnew_end = new Date(end-1);\r\n\t\t\t\tif(this._drag_mode == \"move\"){\r\n\t\t\t\t\tnew_start = new Date(+end - duration);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//prevent out-of-borders situation for day|week view\r\n\t\t\tif ( this._table_view || (new_end.getDate()==new_start.getDate() && new_end.getHours()=ed)\r\n\t\t\t\tcls += ' dhx_after';\r\n\t\t\telse if (sd.valueOf()==cd.valueOf())\r\n\t\t\t\tcls += ' dhx_now';\r\n\r\n\t\t\tif (this._ignores_detected && this._ignores[j]){\r\n\t\t\t\tcls += \" dhx_scale_ignore\";\r\n\t\t\t}\r\n\r\n\t\t\tcell.className = cls + \" \" + this.templates.month_date_class(sd, cd);\r\n\r\n\t\t\tcell.setAttribute(\"data-cell-date\", scheduler.templates.format_date(sd));\r\n\t\t\tvar body_class = \"dhx_month_body\";\r\n\t\t\tvar head_class = \"dhx_month_head\";\r\n\t\t\tif (j === 0 && this.config.left_border) {\r\n\t\t\t\tbody_class += \" dhx_month_body_border\";\r\n\t\t\t\thead_class += \" dhx_month_head_border\";\r\n\t\t\t}\r\n\t\t\tif (!this._ignores_detected || !this._ignores[j]){\r\n\t\t\t\tcell.style.width = tdwidths[j];\r\n\t\t\t\tthis._waiAria.monthCellAttr(cell, sd);\r\n\r\n\t\t\t\tvar cellHead = document.createElement(\"div\");\r\n\t\t\t\tcellHead.style.height = scheduler.xy.month_head_height + \"px\";\r\n\t\t\t\tcellHead.className = head_class;\r\n\t\t\t\tcellHead.innerHTML = this.templates.month_day(sd);\r\n\t\t\t\tcell.appendChild(cellHead);\r\n\r\n\t\t\t\tvar cellBody = document.createElement(\"div\");\r\n\t\t\t\tcellBody.className = body_class;\r\n\t\t\t\t// cellBody.style.height = row_height + \"px\";\r\n\t\t\t\t// cellBody.style.width = tdwidths[j];\r\n\t\t\t\tcell.appendChild(cellBody);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tcell.appendChild(document.createElement(\"div\"));\r\n\t\t\t\tcell.appendChild(document.createElement(\"div\"));\r\n\t\t\t}\r\n\t\t\trendered_dates.push(sd);\r\n\t\t\tvar bf1 = sd.getDate();\r\n\t\t\tsd=this.date.add(sd,1,\"day\");\r\n\t\t\tif (sd.getDate() - bf1 > 1)\r\n\t\t\t\tsd = new Date(sd.getFullYear(), sd.getMonth(), bf1 + 1, 12, 0);\r\n\t\t}\r\n\r\n\t\tscheduler._colsS.heights[i] = cellheight;\r\n\t\tcellheight += getCellHeight(i);\r\n\t}\r\n\r\n\tthis._min_date = view_start;\r\n\tthis._max_date = sd;\r\n\r\n\tdiv.innerHTML = \"\";\r\n\tdiv.appendChild(table);\r\n\r\n\tthis._scales = {};\r\n\tvar cells = div.querySelectorAll('[data-cell-date]');\r\n\tcells.forEach((cell) => {\r\n\t\tconst date = scheduler.templates.parse_date(cell.getAttribute(\"data-cell-date\"));\r\n\t\tconst body = cell.querySelector(\".dhx_month_body\");\r\n\t\tthis._scales[+date] = body;\r\n\t\tthis.callEvent(\"onScaleAdd\", [this._scales[+date], date]);\r\n\t});\r\n\r\n\treturn this._max_date;\r\n};\r\n\r\nscheduler._reset_month_scale=function(b,dd,sd,rows){\r\n\t//recalculates rows height and redraws month layout\r\n\tvar ed=scheduler.date.add(dd,1,\"month\");\r\n\r\n\t//trim time part for comparison reasons\r\n\tvar cd = scheduler._currentDate();\r\n\tthis.date.date_part(cd);\r\n\tthis.date.date_part(sd);\r\n\r\n\trows = rows || Math.ceil(Math.round((ed.valueOf()-sd.valueOf()) / (60*60*24*1000) ) / 7);\r\n\r\n\tvar height = (Math.floor(b.clientHeight/rows) - this.xy.month_head_height);\r\n\r\n\tthis._colsS.height = height + this.xy.month_head_height;\r\n\tthis._colsS.heights = [];\r\n\r\n\treturn scheduler._render_month_scale(b, dd, sd, rows);\r\n\r\n};\r\n\r\nscheduler.getView = function (viewName) {\r\n\tif (!viewName) {\r\n\t\tviewName = scheduler.getState().mode;\r\n\t}\r\n\tif (scheduler.matrix && scheduler.matrix[viewName]) {\r\n\t\treturn scheduler.matrix[viewName];\r\n\t}\r\n\r\n\tif (scheduler._props && scheduler._props[viewName]) {\r\n\t\treturn scheduler._props[viewName];\r\n\t}\r\n\r\n\treturn null;\r\n};\r\n\r\nscheduler.getLabel = function(property, key) {\r\n\tvar sections = this.config.lightbox.sections;\r\n\tfor (var i=0; i scheduler.getState().max_date.valueOf()){\r\n\t\t\tendColumnIndex += getDaysDifference(endDate, scheduler.getState().max_date);\r\n\t\t}\r\n\t} else{\r\n\t\tendColumnIndex = Math.round(eventLength/60/60/1000/24);\r\n\t}\r\n\r\n\tvar last_column = true;\r\n\twhile (startColumnIndex < endColumnIndex){\r\n\t\tvar check = scheduler.date.add(endDate, -config.x_step, config.x_unit);\r\n\t\tif (ignore && ignore(endDate) && (!last_column || (last_column && ignore(check) ))){\r\n\t\t\teventLength -= (endDate-check);\r\n\r\n\t\t}else{\r\n\t\t\tlet excludedDuration = 0;\r\n\t\t\tconst intervalStart = new Date(Math.max(check.valueOf(), startDate.valueOf()));\r\n\t\t\tconst intervalEnd = endDate;\r\n\t\t\tconst leftCellCutOffStart = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.first_hour);\r\n\t\t\tconst leftCellCutOffEnd = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.last_hour||24);\r\n\t\t\tconst rightCellCutOffStart = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.first_hour);\r\n\t\t\tconst rightCellCutOffEnd = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.last_hour||24);\r\n\r\n\t\t\tif(intervalEnd.valueOf() > rightCellCutOffEnd.valueOf()){\r\n\t\t\t\texcludedDuration += intervalEnd - rightCellCutOffEnd;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalEnd.valueOf() > rightCellCutOffStart.valueOf()){\r\n\t\t\t\texcludedDuration += config._start_correction;\r\n\t\t\t} else {\r\n\t\t\t\texcludedDuration += intervalEnd.getHours()*60*60*1000 + intervalEnd.getMinutes()*60*1000;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalStart.valueOf() < leftCellCutOffEnd.valueOf()){\r\n\t\t\t\texcludedDuration += config._end_correction;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalStart.valueOf() < leftCellCutOffStart.valueOf()){\r\n\t\t\t\texcludedDuration += (leftCellCutOffStart.valueOf() - intervalStart.valueOf());\r\n\t\t\t}\r\n\t\t\t\r\n\r\n\t\t\teventLength -= excludedDuration;\r\n\t\t\tlast_column = false;\r\n\t\t}\r\n\t\tendDate = check;\r\n\t\tendColumnIndex--;\r\n\t}\r\n\treturn eventLength;\r\n};\r\nscheduler._get_fictional_event_length=function(end_date, ev_length, obj, back){\r\n\tvar sd = new Date(end_date);\r\n\tvar dir = back ? -1 : 1;\r\n\r\n\t//get difference caused by first|last hour\r\n\tif (obj._start_correction || obj._end_correction){\r\n\t\tvar today;\r\n\t\tif (back)\r\n\t\t\ttoday = (sd.getHours()*60+sd.getMinutes()) - (obj.first_hour||0)*60;\r\n\t\telse\r\n\t\t\ttoday = (obj.last_hour||0)*60 - (sd.getHours()*60+sd.getMinutes());\r\n\t\tvar per_day = (obj.last_hour - obj.first_hour)*60;\r\n\t\tvar days = Math.ceil( (ev_length / (60*1000) - today ) / per_day);\r\n\t\tif(days < 0) days = 0;\r\n\t\tev_length += days * (24*60 - per_day) * 60 * 1000;\r\n\t}\r\n\r\n\tvar fd = new Date(end_date*1+ev_length*dir);\r\n\tvar ignore = this[\"ignore_\"+this._mode];\r\n\r\n\tvar start_slot = 0,\r\n\t\tend_slot;\r\n\tif (obj.render){\r\n\t\tstart_slot = this._get_date_index(obj, sd);\r\n\t\tend_slot = this._get_date_index(obj, fd);\r\n\t} else{\r\n\t\tend_slot = Math.round(ev_length/60/60/1000/24);\r\n\t}\r\n\r\n\twhile (start_slot*dir <= end_slot*dir){\r\n\t\tvar check = scheduler.date.add(sd, obj.x_step*dir, obj.x_unit);\r\n\t\tif (ignore && ignore(sd)){\r\n\t\t\tev_length += (check-sd)*dir;\r\n\t\t\tend_slot += dir;\r\n\t\t}\r\n\r\n\t\tsd = check;\r\n\t\tstart_slot+=dir;\r\n\t}\r\n\r\n\treturn ev_length;\r\n};\r\n\r\nscheduler._get_section_view = function(){\r\n\treturn this.getView();\r\n};\r\n\r\nscheduler._get_section_property = function(){\r\n\tif(this.matrix && this.matrix[this._mode]){\r\n\t\treturn this.matrix[this._mode].y_property;\r\n\t}else if(this._props && this._props[this._mode]){\r\n\t\treturn this._props[this._mode].map_to;\r\n\t}\r\n\treturn null;\r\n};\r\n\r\nscheduler._is_initialized = function(){\r\n\tvar state = this.getState();\r\n\treturn (this._obj && state.date && state.mode);\r\n};\r\nscheduler._is_lightbox_open = function(){\r\n\tvar state = this.getState();\r\n\treturn state.lightbox_id !== null && state.lightbox_id !== undefined;\r\n};\r\n\r\n}","export default {\r\n\tevent: function (el, event, handler){\r\n\t\tif (el.addEventListener)\r\n\t\t\tel.addEventListener(event, handler, false);\r\n\t\r\n\t\telse if (el.attachEvent)\r\n\t\t\tel.attachEvent(\"on\"+event, handler);\r\n\t},\r\n\teventRemove: function (el, event, handler){\r\n\t\tif (el.removeEventListener)\r\n\t\t\tel.removeEventListener(event, handler, false);\r\n\t\r\n\t\telse if (el.detachEvent)\r\n\t\t\tel.detachEvent(\"on\"+event, handler);\r\n\t}\r\n};","import defaultDomEvents from './event';\r\n\r\nexport default function(){\r\n\r\n\tvar domEvents = function (addEvent, removeEvent) {\r\n\t\taddEvent = addEvent || defaultDomEvents.event;\r\n\t\tremoveEvent = removeEvent || defaultDomEvents.eventRemove;\r\n\t\tvar handlers = [];\r\n\t\tvar eventScope = {\r\n\t\t\tattach: function(el, event, callback, capture){\r\n\t\t\t\thandlers.push({element: el, event:event, callback: callback, capture: capture});\r\n\t\t\t\taddEvent(el, event, callback, capture);\r\n\t\t\t},\r\n\t\t\tdetach: function(el, event, callback, capture){\r\n\t\t\t\tremoveEvent(el, event, callback, capture);\r\n\t\t\t\tfor(var i = 0; i < handlers.length; i++){\r\n\t\t\t\t\tvar handler = handlers[i];\r\n\t\t\t\t\tif (handler.element === el && handler.event === event && handler.callback === callback && handler.capture === capture) {\r\n\t\t\t\t\t\thandlers.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tdetachAll: function () {\r\n\t\t\t\tvar staticArray = handlers.slice();\r\n\t\t\t\t// original handlers array can be spliced on every iteration\r\n\t\t\t\tfor (var i = 0; i < staticArray.length; i++){\r\n\t\t\t\t\tvar handler = staticArray[i];\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, handler.capture);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, undefined);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, false);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, true);\r\n\t\t\t\t}\r\n\t\t\t\thandlers.splice(0, handlers.length);\r\n\t\t\t},\r\n\t\t\textend: function(){\r\n\t\t\t\treturn domEvents(this.event, this.eventRemove);\r\n\t\t\t}\r\n\t\t};\r\n\t\treturn eventScope;\r\n\t};\r\n\t\r\n\treturn domEvents();\r\n}","import createEventScope from './utils/scoped_event';\r\n\r\nexport default function extend(scheduler) {\r\n\r\n\r\nvar domEvents = createEventScope();\r\n\r\nscheduler.event = domEvents.attach;\r\nscheduler.eventRemove = domEvents.detach;\r\nscheduler._eventRemoveAll = domEvents.detachAll;\r\nscheduler._createDomEventScope = domEvents.extend;\r\n\r\n\r\nscheduler._trim = function(str){\r\n\tvar func = String.prototype.trim || function(){ return this.replace(/^\\s+|\\s+$/g, \"\"); };\r\n\treturn func.apply(str);\r\n};\r\n\r\nscheduler._isDate = function(obj){\r\n\tif (obj && typeof obj == \"object\") {\r\n\t\treturn !!(obj.getFullYear && obj.getMonth && obj.getDate);\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n};\r\n\r\nscheduler._isObject = function(obj){\r\n\treturn (obj && typeof obj == \"object\");\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n(function(){\r\n\r\n\t// eslint-disable-next-line no-control-regex\r\n\tvar htmlTags = new RegExp(\"<(?:.|\\n)*?>\", \"gm\");\r\n\tvar extraSpaces = new RegExp(\" +\", \"gm\");\r\n\r\n\tfunction stripHTMLLite(htmlText){\r\n\t\treturn (htmlText + \"\")\r\n\t\t\t.replace(htmlTags, \" \").\r\n\t\t\treplace(extraSpaces, \" \");\r\n\t}\r\n\r\n\tvar singleQuotes = new RegExp(\"'\", \"gm\");\r\n\tfunction escapeQuotes(text){\r\n\t\treturn (text + \"\").replace(singleQuotes, \"'\");\r\n\t}\r\n\r\n\tscheduler._waiAria = {\r\n\t\tgetAttributeString: function(attr){\r\n\t\t\tvar attributes = [\" \"];\r\n\t\t\tfor(var i in attr){\r\n\t\t\t\tif(typeof attr[i] != \"function\" && typeof attr[i] != \"object\") {\r\n\t\t\t\t\tvar text = escapeQuotes(stripHTMLLite(attr[i]));\r\n\t\t\t\t\tattributes.push(i + \"='\" + text + \"'\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tattributes.push(\" \");\r\n\t\t\treturn attributes.join(\" \");\r\n\t\t},\r\n\t\tsetAttributes: function(div, values){\r\n\t\t\tfor(var i in values){\r\n\t\t\t\tdiv.setAttribute(i, stripHTMLLite(values[i]));\r\n\t\t\t}\r\n\t\t\treturn div;\r\n\t\t},\r\n\r\n\t\tlabelAttr: function(div, content){\r\n\t\t\treturn this.setAttributes(div, {\"aria-label\": content});\r\n\t\t},\r\n\t\tlabel: function(label){\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": label});\r\n\t\t},\r\n\r\n\t\t// day/week/units\r\n\r\n\t\thourScaleAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\r\n\t\t},\r\n\t\tmonthCellAttr: function(div, date){\r\n\t\t\tthis.labelAttr(div, scheduler.templates.day_date(date));\r\n\t\t},\r\n\r\n\t\tnavBarDateAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\t\t},\r\n\t\tdayHeaderAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\t\t},\r\n\r\n\t\tdayColumnAttr: function(div, date){\r\n\t\t\tthis.dayHeaderAttr(div, scheduler.templates.day_date(date));\r\n\t\t},\r\n\r\n\t\theaderButtonsAttributes: function(div, label){\r\n\t\t\treturn this.setAttributes(div, {\"role\":\"button\", \"aria-label\":label});\r\n\t\t},\r\n\r\n\t\theaderToggleState: function(div, isActive){\r\n\t\t\treturn this.setAttributes(div, {\"aria-pressed\": isActive ? \"true\" : \"false\"});\r\n\t\t},\r\n\r\n\r\n\t\tgetHeaderCellAttr:function(dateString){\r\n\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": dateString});\r\n\t\t},\r\n\r\n\r\n\t\teventAttr: function(event, div){\r\n\t\t\tthis._eventCommonAttr(event, div);\r\n\t\t},\r\n\r\n\r\n\t\t_eventCommonAttr: function(event, div){\r\n\t\t\tdiv.setAttribute(\"aria-label\", stripHTMLLite(scheduler.templates.event_text(event.start_date, event.end_date, event)));\r\n\r\n\t\t\tif(scheduler.config.readonly){\r\n\t\t\t\tdiv.setAttribute(\"aria-readonly\", true);\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif(event.$dataprocessor_class){\r\n\t\t\t\tdiv.setAttribute(\"aria-busy\", true);\r\n\t\t\t}\r\n\r\n\r\n\t\t\tdiv.setAttribute(\"aria-selected\",\r\n\t\t\t\t(scheduler.getState().select_id == event.id) ? \"true\" : \"false\");\r\n\t\t},\r\n\r\n\t\tsetEventBarAttr: function(event, div){\r\n\t\t\tthis._eventCommonAttr(event, div);\r\n\t\t},\r\n\r\n\t\t_getAttributes: function(attributeSetter, arg){\r\n\t\t\tvar result = {\r\n\t\t\t\tsetAttribute:function(name, value){\r\n\t\t\t\t\tthis[name] = value;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\tattributeSetter.apply(this, [arg, result]);\r\n\t\t\treturn result;\r\n\r\n\t\t},\r\n\r\n\t\teventBarAttrString: function(event){\r\n\t\t\treturn this.getAttributeString(this._getAttributes(this.setEventBarAttr, event));\r\n\t\t},\r\n\r\n\r\n\r\n\t\tagendaHeadAttrString :function(){\r\n\t\t\treturn this.getAttributeString({role: \"row\"});\r\n\t\t},\r\n\t\tagendaHeadDateString :function(label){\r\n\t\t\treturn this.getAttributeString({role: \"columnheader\", \"aria-label\": label});\r\n\t\t},\r\n\t\tagendaHeadDescriptionString :function(label){\r\n\t\t\treturn this.agendaHeadDateString(label);\r\n\t\t},\r\n\t\tagendaDataAttrString: function(){\r\n\t\t\treturn this.getAttributeString({role: \"grid\"});\r\n\t\t},\r\n\t\tagendaEventAttrString: function(event){\r\n\t\t\tvar attrs = this._getAttributes(this._eventCommonAttr, event);\r\n\r\n\t\t\tattrs[\"role\"] = \"row\";\r\n\r\n\t\t\treturn this.getAttributeString(attrs);\r\n\r\n\t\t},\r\n\t\tagendaDetailsBtnString: function(){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels.icon_details});\r\n\t\t},\r\n\r\n\r\n\t\tgridAttrString: function(){\r\n\t\t\treturn this.getAttributeString({role: \"grid\"});\r\n\t\t},\r\n\r\n\t\tgridRowAttrString: function(event){\r\n\t\t\treturn this.agendaEventAttrString(event);\r\n\t\t},\r\n\r\n\t\tgridCellAttrString: function(event, column, value){\r\n\t\t\treturn this.getAttributeString({\"role\":\"gridcell\", \"aria-label\": [\r\n\t\t\t\t(column.label === undefined ? column.id : column.label),\r\n\t\t\t\t\": \",\r\n\t\t\t\tvalue\r\n\t\t\t]});\r\n\t\t},\r\n\r\n\t\tmapAttrString: function(){\r\n\t\t\treturn this.gridAttrString();\r\n\t\t},\r\n\t\tmapRowAttrString: function(event){\r\n\t\t\treturn this.gridRowAttrString(event);\r\n\t\t},\r\n\t\tmapDetailsBtnString: function(){\r\n\t\t\treturn this.agendaDetailsBtnString();\r\n\t\t},\r\n\r\n\t\tminicalHeader: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"id\":headerId+\"\",\r\n\t\t\t\t\"aria-live\":\"assertice\",\r\n\t\t\t\t\"aria-atomic\":\"true\"\r\n\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalGrid: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"aria-labelledby\":headerId+\"\",\r\n\t\t\t\t\"role\":\"grid\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalRow: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"row\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalDayCell: function(div, date){\r\n\t\t\tvar selected = (date.valueOf() < scheduler._max_date.valueOf() && date.valueOf() >= scheduler._min_date.valueOf());\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"gridcell\",\r\n\t\t\t\t\"aria-label\": scheduler.templates.day_date(date),\r\n\t\t\t\t\"aria-selected\": selected ? \"true\" : \"false\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalHeadCell: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"columnheader\"\r\n\t\t\t});\r\n\t\t},\r\n\r\n\r\n\t\tweekAgendaDayCell: function(div, date){\r\n\t\t\tvar header = div.querySelector(\".dhx_wa_scale_bar\");\r\n\t\t\tvar content = div.querySelector(\".dhx_wa_day_data\");\r\n\t\t\tvar headerId = scheduler.uid() + \"\";\r\n\t\t\tthis.setAttributes(header, { \"id\": headerId});\r\n\t\t\tthis.setAttributes(content, { \"aria-labelledby\": headerId});\r\n\r\n\t\t},\r\n\t\tweekAgendaEvent: function(div, event){\r\n\t\t\tthis.eventAttr(event, div);\r\n\t\t},\r\n\r\n\t\tlightboxHiddenAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t},\r\n\r\n\t\tlightboxVisibleAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"false\");\r\n\t\t},\r\n\r\n\t\tlightboxSectionButtonAttrString: function(label){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":label, \"tabindex\":\"0\"});\r\n\t\t},\r\n\r\n\t\tyearHeader: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"id\":headerId+\"\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tyearGrid: function(div, headerId){\r\n\t\t\tthis.minicalGrid(div, headerId);\r\n\t\t},\r\n\t\tyearHeadCell: function(div){\r\n\t\t\treturn this.minicalHeadCell(div);\r\n\t\t},\r\n\t\tyearRow: function(div){\r\n\t\t\treturn this.minicalRow(div);\r\n\t\t},\r\n\t\tyearDayCell: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"gridcell\"\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\tlightboxAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t\tdiv.firstChild.setAttribute(\"role\", \"heading\");\r\n\t\t},\r\n\r\n\t\tlightboxButtonAttrString:function(buttonName){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels[buttonName], \"tabindex\":\"0\"});\r\n\t\t},\r\n\t\teventMenuAttrString: function(iconName){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels[iconName]});\r\n\t\t},\r\n\t\tlightboxHeader: function(div, headerText){\r\n\t\t\tdiv.setAttribute(\"aria-label\", headerText);\r\n\t\t},\r\n\r\n\t\tlightboxSelectAttrString: function(time_option){\r\n\t\t\tvar label = \"\";\r\n\r\n\t\t\tswitch (time_option) {\r\n\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.year;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%m\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.month;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%d\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.day;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%H:%i\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.hour + \" \" + scheduler.locale.labels.minute;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": label});\r\n\t\t},\r\n\r\n\r\n\t\tmessageButtonAttrString: function(buttonLabel){\r\n\t\t\treturn \"tabindex='0' role='button' aria-label='\"+buttonLabel+\"'\";\r\n\t\t},\r\n\r\n\t\tmessageInfoAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"alert\");\r\n\t\t\t//div.setAttribute(\"tabindex\", \"-1\");\r\n\t\t},\r\n\r\n\t\tmessageModalAttr: function(div, uid){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t\tif(uid){\r\n\t\t\t\tdiv.setAttribute(\"aria-labelledby\", uid);\r\n\t\t\t}\r\n\r\n\t\t\t//\tdiv.setAttribute(\"tabindex\", \"-1\");\r\n\t\t},\r\n\r\n\t\tquickInfoAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t},\r\n\r\n\t\tquickInfoHeaderAttrString: function(){\r\n\t\t\treturn \" role='heading' \";\r\n\t\t},\r\n\r\n\t\tquickInfoHeader: function(div, header){\r\n\t\t\tdiv.setAttribute(\"aria-label\", header);\r\n\t\t},\r\n\r\n\t\tquickInfoButtonAttrString: function(label){\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"role\":\"button\", \"aria-label\":label, \"tabindex\":\"0\"});\r\n\t\t},\r\n\r\n\t\ttooltipAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"tooltip\");\r\n\t\t},\r\n\r\n\t\ttooltipVisibleAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"false\");\r\n\t\t},\r\n\r\n\t\ttooltipHiddenAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t}\r\n\t};\r\n\r\n\tfunction isDisabled(){\r\n\t\treturn !scheduler.config.wai_aria_attributes;\r\n\t}\r\n\r\n\tfor(var i in scheduler._waiAria){\r\n\t\tscheduler._waiAria[i] = (function(payload){\r\n\t\t\treturn function(){\r\n\t\t\t\tif(isDisabled()){\r\n\t\t\t\t\treturn \" \";\r\n\t\t\t\t}\r\n\t\t\t\treturn payload.apply(this, arguments);\r\n\t\t\t};\r\n\t\t})(scheduler._waiAria[i]);\r\n\t}\r\n\r\n\r\n})();\r\n\r\n}","//returns position of html element on the page\r\nfunction elementPosition(elem) {\r\n\tvar top=0, left=0, right=0, bottom=0;\r\n\tif (elem.getBoundingClientRect) { //HTML5 method\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\t\tvar body = document.body;\r\n\t\tvar docElem = (document.documentElement ||\r\n\t\t\tdocument.body.parentNode ||\r\n\t\t\tdocument.body);\r\n\r\n\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\t\ttop = box.top + scrollTop - clientTop;\r\n\t\tleft = box.left + scrollLeft - clientLeft;\r\n\r\n\t\tright = document.body.offsetWidth - box.right;\r\n\t\tbottom = document.body.offsetHeight - box.bottom;\r\n\t} else { //fallback to naive approach\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop,10);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft,10);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\r\n\t\tright = document.body.offsetWidth - elem.offsetWidth - left;\r\n\t\tbottom = document.body.offsetHeight - elem.offsetHeight - top;\r\n\t}\r\n\treturn { y: Math.round(top), x: Math.round(left), width:elem.offsetWidth, height:elem.offsetHeight, right: Math.round(right), bottom: Math.round(bottom) };\r\n}\r\n\r\n/*\r\nevent position relatively to DOM element\r\n */\r\nfunction getRelativeEventPosition(ev, node){\r\n\tvar d = document.documentElement;\r\n\tvar box = elementPosition(node);\r\n\r\n\treturn {\r\n\t\tx: ev.clientX - d.clientLeft - box.x + node.scrollLeft,\r\n\t\ty: ev.clientY - d.clientTop - box.y + node.scrollTop\r\n\t};\r\n}\r\n\r\nfunction getNodePosition(elem) {\r\n\tvar top=0, left=0, right=0, bottom=0;\r\n\tif (elem.getBoundingClientRect) { //HTML5 method\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\t\tvar body = document.body;\r\n\t\tvar docElem = (document.documentElement ||\r\n\t\t\tdocument.body.parentNode ||\r\n\t\t\tdocument.body);\r\n\r\n\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\t\ttop = box.top + scrollTop - clientTop;\r\n\t\tleft = box.left + scrollLeft - clientLeft;\r\n\r\n\t\tright = document.body.offsetWidth - box.right;\r\n\t\tbottom = document.body.offsetHeight - box.bottom;\r\n\t} else { //fallback to naive approach\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop,10);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft,10);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\r\n\t\tright = document.body.offsetWidth - elem.offsetWidth - left;\r\n\t\tbottom = document.body.offsetHeight - elem.offsetHeight - top;\r\n\t}\r\n\treturn { y: Math.round(top), x: Math.round(left), width:elem.offsetWidth, height:elem.offsetHeight, right: Math.round(right), bottom: Math.round(bottom) };\r\n}\r\n\r\nfunction getClassName(node){\r\n\tif(!node) return \"\";\r\n\r\n\tvar className = node.className || \"\";\r\n\tif(className.baseVal)//'className' exist but not a string - IE svg element in DOM\r\n\t\tclassName = className.baseVal;\r\n\r\n\tif(!className.indexOf)\r\n\t\tclassName = '';\r\n\r\n\treturn className || \"\";\r\n}\r\n\r\nfunction getTargetNode(e) {\r\n\tvar trg;\r\n\tif (e.tagName)\r\n\t\ttrg = e;\r\n\telse {\r\n\t\te = e || window.event;\r\n\t\ttrg = e.target || e.srcElement;\r\n\t\tif (trg.shadowRoot && e.composedPath) {\r\n\t\t\ttrg = e.composedPath()[0];\r\n\t\t}\r\n\t}\r\n\treturn trg;\r\n}\r\n\r\nfunction locateCss(e, classname, strict){\r\n\tif(strict === undefined)\r\n\t\tstrict = true;\r\n\r\n\tvar trg = e.target || e.srcElement;\r\n\tvar css = '';\r\n\r\n\twhile (trg){\r\n\t\tcss = getClassName(trg);\r\n\r\n\t\tif(css){\r\n\t\t\tvar ind = css.indexOf(classname);\r\n\t\t\tif (ind >= 0){\r\n\t\t\t\tif (!strict)\r\n\t\t\t\t\treturn trg;\r\n\r\n\t\t\t\t//check that we have exact match\r\n\t\t\t\tvar left = (ind === 0) || (!((css.charAt(ind - 1)||\"\").trim()));\r\n\t\t\t\tvar right = ((ind + classname.length >= css.length)) || (!((css.charAt(ind + classname.length)).trim()));\r\n\r\n\t\t\t\tif (left && right)\r\n\t\t\t\t\treturn trg;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttrg=trg.parentNode;\r\n\t}\r\n\treturn null;\r\n}\r\n\r\n\r\n// get focusable nodes\r\nfunction isVisible(node){\r\n\tvar display = false,\r\n\t\tvisibility = false;\r\n\tif(window.getComputedStyle){\r\n\t\tvar style = window.getComputedStyle(node, null);\r\n\t\tdisplay = style[\"display\"];\r\n\t\tvisibility = style[\"visibility\"];\r\n\t}else if(node.currentStyle){\r\n\t\tdisplay = node.currentStyle[\"display\"];\r\n\t\tvisibility = node.currentStyle[\"visibility\"];\r\n\t}\r\n\r\n\tvar hiddenSection = false;\r\n\tvar recurringSection = locateCss({target:node}, \"dhx_form_repeat\", false);\r\n\tif(recurringSection){\r\n\t\thiddenSection = !!(recurringSection.style.height == \"0px\");\r\n\t}\r\n\thiddenSection = hiddenSection || !(node.offsetHeight);\r\n\r\n\treturn (display != \"none\" && visibility != \"hidden\" && !hiddenSection);\r\n}\r\n\r\nfunction hasNonNegativeTabIndex(node){\r\n\treturn !isNaN(node.getAttribute(\"tabindex\")) && (node.getAttribute(\"tabindex\")*1 >= 0);\r\n}\r\n\r\nfunction hasHref(node){\r\n\tvar canHaveHref = {\"a\": true, \"area\": true};\r\n\tif(canHaveHref[node.nodeName.loLowerCase()]){\r\n\t\treturn !!node.getAttribute(\"href\");\r\n\t}\r\n\treturn true;\r\n}\r\n\r\nfunction isEnabled(node){\r\n\tvar canDisable = {\"input\":true, \"select\":true, \"textarea\":true, \"button\":true, \"object\":true};\r\n\tif(canDisable[node.nodeName.toLowerCase()]){\r\n\t\treturn !node.hasAttribute(\"disabled\");\r\n\t}\r\n\r\n\treturn true;\r\n}\r\n\r\n\r\nfunction getFocusableNodes(root){\r\n\tvar nodes = root.querySelectorAll([\r\n\t\t\"a[href]\",\r\n\t\t\"area[href]\",\r\n\t\t\"input\",\r\n\t\t\"select\",\r\n\t\t\"textarea\",\r\n\t\t\"button\",\r\n\t\t\"iframe\",\r\n\t\t\"object\",\r\n\t\t\"embed\",\r\n\t\t\"[tabindex]\",\r\n\t\t\"[contenteditable]\"\r\n\t].join(\", \"));\r\n\r\n\tvar nodesArray = Array.prototype.slice.call(nodes, 0);\r\n\t\r\n\tfor(var i = 0; i < nodesArray.length; i++){\r\n\t\tnodesArray[i].$position = i;\r\n\t\t// we remember original nodes order, \r\n\t\t// so when we sort them by tabindex we ensure order of nodes with same tabindex is preserved, \r\n\t\t// since some browsers do unstable sort\r\n\t}\r\n\t\r\n\tnodesArray.sort(function(a, b) {\r\n\t\tif(a.tabIndex === 0 && b.tabIndex !== 0){\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\tif(a.tabIndex !== 0 && b.tabIndex === 0){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\t\r\n\t\tif (a.tabIndex === b.tabIndex){\r\n\t\t\t// ensure we do stable sort\r\n\t\t\treturn a.$position - b.$position;\r\n\t\t}\r\n\t\tif (a.tabIndex < b.tabIndex) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn 1;\r\n\t});\r\n\t\r\n\tfor(var i = 0; i < nodesArray.length; i++){\r\n\t\tvar node = nodesArray[i];\r\n\t\tvar isValid = (hasNonNegativeTabIndex(node) || isEnabled(node) || hasHref(node)) && isVisible(node);\r\n\t\tif(!isValid){\r\n\t\t\tnodesArray.splice(i, 1);\r\n\t\t\ti--;\r\n\t\t}\r\n\t}\r\n\treturn nodesArray;\r\n}\r\n\r\n\r\nfunction isShadowDomSupported() {\r\n\treturn document.head.createShadowRoot || document.head.attachShadow;\r\n}\r\n\r\n/**\r\n * Returns element that has the browser focus, or null if no element has focus.\r\n * Works with shadow DOM, so it's prefereed to use this function instead of document.activeElement directly.\r\n * @returns HTMLElement\r\n */\r\nfunction getActiveElement(){\r\n\tvar activeElement = document.activeElement;\r\n\tif (activeElement.shadowRoot) {\r\n\t\tactiveElement = activeElement.shadowRoot.activeElement;\r\n\t}\r\n\tif (activeElement === document.body && document.getSelection) {\r\n\t\tactiveElement = document.getSelection().focusNode || document.body;\r\n\t}\r\n\r\n\treturn activeElement;\r\n}\r\n\r\n/**\r\n * Returns document.body or the host node of the ShadowRoot, if the element is attached to ShadowDom\r\n * @param {HTMLElement} element \r\n * @returns HTMLElement\r\n */\r\nfunction getRootNode(element) {\r\n\tif (!element) {\r\n\t\treturn document.body;\r\n\t}\r\n\tif (!isShadowDomSupported()) {\r\n\t\treturn document.body;\r\n\t}\r\n\twhile (element.parentNode && (element = element.parentNode)) {\r\n\t\tif (element instanceof ShadowRoot) {\r\n\t\t\treturn element.host;\r\n\t\t}\r\n\t}\r\n\treturn document.body;\r\n}\r\n\r\nfunction hasShadowParent(element) {\r\n\treturn !!getRootNode(element);\r\n}\r\n\r\nexport default {\r\n\t/**\r\n\t * @desc: Calculate absolute position of html object\r\n\t * @type: private\r\n\t * @param: htmlObject - html object\r\n\t * @topic: 0\r\n\t */\r\n\tgetAbsoluteLeft: function getAbsoluteLeft(htmlObject){\r\n\t\treturn this.getOffset(htmlObject).left;\r\n\t},\r\n\t/**\r\n\t * @desc: Calculate absolute position of html object\r\n\t * @type: private\r\n\t * @param: htmlObject - html object\r\n\t * @topic: 0\r\n\t */\r\n\tgetAbsoluteTop: function getAbsoluteTop(htmlObject){\r\n\t\treturn this.getOffset(htmlObject).top;\r\n\t},\r\n\r\n\tgetOffsetSum: function getOffsetSum(elem) {\r\n\t\tvar top=0, left=0;\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\t\treturn {top: top, left: left};\r\n\t},\r\n\r\n\tgetOffsetRect: function getOffsetRect(elem) {\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\r\n\t\tvar top = 0,\r\n\t\t\tleft = 0;\r\n\r\n\t\t// https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#Mobile_Tablet_or_Desktop\r\n\t\tif (!/Mobi/.test(navigator.userAgent)) {\r\n\t\t\tvar body = document.body;\r\n\t\t\tvar docElem = document.documentElement;\r\n\t\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\r\n\t\t\ttop = box.top + scrollTop - clientTop;\r\n\t\t\tleft = box.left + scrollLeft - clientLeft;\r\n\t\t}else {\r\n\t\t\t// incorrect left coordinate on mobile zoom\r\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=489206\r\n\r\n\t\t\tvar dummy = document.createElement(\"div\");\r\n\t\t\tdummy.style.position=\"absolute\";\r\n\t\t\tdummy.style.left=\"0px\";\r\n\t\t\tdummy.style.top=\"0px\";\r\n\t\t\tdummy.style.width=\"1px\";\r\n\t\t\tdummy.style.height = \"1px\";\r\n\r\n\t\t\tdocument.body.appendChild(dummy);\r\n\t\t\tvar dummyBox = dummy.getBoundingClientRect();\r\n\t\t\ttop = box.top - dummyBox.top;\r\n\t\t\tleft = box.left - dummyBox.left;\r\n\r\n\t\t\tdummy.parentNode.removeChild(dummy);\r\n\t\t}\r\n\r\n\t\treturn { top: Math.round(top), left: Math.round(left) };\r\n\t},\r\n\r\n\tgetOffset: function getOffset(elem) {\r\n\t\tif (elem.getBoundingClientRect) {\r\n\t\t\treturn this.getOffsetRect(elem);\r\n\t\t} else {\r\n\t\t\treturn this.getOffsetSum(elem);\r\n\t\t}\r\n\t},\r\n\r\n\tclosest: function(element, selector){\r\n\t\tif(!element || !selector){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn closest(element, selector);\r\n\t},\r\n\tinsertAfter: function(newNode, referenceNode){\r\n\t\tif(referenceNode.nextSibling){\r\n\t\t\treferenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);\r\n\t\t}else{\r\n\t\t\treferenceNode.parentNode.appendChild(newNode);\r\n\t\t}\r\n\t},\r\n\tremove: function(node) {\r\n\t\tif (node && node.parentNode) {\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t}\r\n\t},\r\n\tisChildOf: function(child, parent) {\r\n\t\treturn parent.contains(child);\r\n\t},\r\n\tgetFocusableNodes,\r\n\tgetClassName,\r\n\tlocateCss,\r\n\tgetRootNode,\r\n\thasShadowParent,\r\n\tisShadowDomSupported,\r\n\tgetActiveElement,\r\n\tgetRelativeEventPosition,\r\n\tgetTargetNode,\r\n\tgetNodePosition\r\n};\r\n\r\nvar closest;\r\nif(Element.prototype.closest){\r\n\tclosest = function(element, selector){\r\n\t\treturn element.closest(selector);\r\n\t};\r\n}else{\r\n\tvar matches = Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\r\n\tclosest = function(element, selector) {\r\n\t\tvar el = element;\r\n\t\tdo {\r\n\t\t\tif (matches.call(el, selector)){\r\n\t\t\t\treturn el;\r\n\t\t\t}\r\n\t\t\tel = el.parentElement || el.parentNode;\r\n\t\t} while (el !== null && el.nodeType === 1);\r\n\t\treturn null;\r\n\t};\r\n}\r\n","/* eslint-disable no-restricted-globals */\r\nvar isWindowAwailable = typeof window !== \"undefined\";\r\n\r\n/* eslint-enable no-restricted-globals */\r\n\r\nexport default {\r\n\tisIE: isWindowAwailable && (navigator.userAgent.indexOf(\"MSIE\") >= 0 || navigator.userAgent.indexOf(\"Trident\") >= 0),\r\n\tisOpera: isWindowAwailable && (navigator.userAgent.indexOf(\"Opera\") >= 0),\r\n\tisChrome: isWindowAwailable && (navigator.userAgent.indexOf(\"Chrome\") >= 0),\r\n\tisKHTML: isWindowAwailable && (navigator.userAgent.indexOf(\"Safari\") >= 0 || navigator.userAgent.indexOf(\"Konqueror\") >= 0),\r\n\tisFF: isWindowAwailable && (navigator.userAgent.indexOf(\"Firefox\") >= 0),\r\n\tisIPad: isWindowAwailable && (navigator.userAgent.search(/iPad/gi) >= 0),\r\n\tisEdge: isWindowAwailable && (navigator.userAgent.indexOf(\"Edge\")!=-1),\r\n\tisNode: (!isWindowAwailable || typeof navigator == \"undefined\")\r\n};","export default function extend(scheduler) {\r\n\r\nscheduler.destructor = function(){\r\n\tscheduler.callEvent(\"onDestroy\", []);\r\n\tthis.clearAll();\r\n\r\n\tif(this.$container){\r\n\t\t// FIXME: clear container or remove container\r\n\t\tthis.$container.innerHTML = \"\";\r\n\t\t// scheduler.$domHelpers.remove(this.$container);\r\n\t}\r\n\r\n\tif(this._eventRemoveAll){\r\n\t\tthis._eventRemoveAll();\r\n\t}\r\n\r\n\tif(this.resetLightbox){\r\n\t\tthis.resetLightbox();\r\n\t}\r\n\r\n\tif(this._dp && this._dp.destructor){\r\n\t\tthis._dp.destructor();\r\n\t}\r\n\r\n\t// detachAllEvents should be called last, because in components may be attached events\r\n\tthis.detachAllEvents();\r\n\r\n\tfor(var i in this){\r\n\t\tif(i.indexOf(\"$\") === 0){\r\n\t\t\tdelete this[i];\r\n\t\t}\r\n\t}\r\n\tscheduler.$destroyed = true;\r\n};\r\n\r\n}","export default function(data) {\r\n\tif (typeof data === \"string\" || typeof data === \"number\") {\r\n\t\treturn data;\r\n\t}\r\n\tvar result = \"\";\r\n\tfor (var key in data) {\r\n\t\tvar serialized = \"\";\r\n\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\tif (typeof data[key] === \"string\") {\r\n\t\t\t\tserialized = encodeURIComponent(data[key]);\r\n\t\t\t} else if (typeof data[key] === \"number\") {\r\n\t\t\t\tserialized = data[key];\r\n\t\t\t} else {\r\n\t\t\t\tserialized = encodeURIComponent(JSON.stringify(data[key]));\r\n\t\t\t}\r\n\t\t\tserialized = key + \"=\" + serialized;\r\n\r\n\t\t\tif (result.length) {\r\n\t\t\t\tserialized = \"&\" + serialized;\r\n\t\t\t}\r\n\t\t\tresult += serialized;\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n}","import serialize from \"../common/url_serialize.js\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler.Promise = window.Promise; \r\n\r\nfunction createConfig(method, args) {\r\n\tvar result = {\r\n\t\tmethod: method\r\n\t};\r\n\r\n\tif (args.length === 0) {\r\n\t\tthrow new Error(\"Arguments list of query is wrong.\");\r\n\t}\r\n\tif (args.length === 1) {\r\n\t\tif (typeof args[0] === \"string\") {\r\n\t\t\tresult.url = args[0];\r\n\t\t\tresult.async = true;\r\n\t\t} else {\r\n\t\t\tresult.url = args[0].url;\r\n\t\t\tresult.async = (args[0].async || true);\r\n\t\t\tresult.callback = args[0].callback;\r\n\t\t\tresult.headers = args[0].headers;\r\n\t\t}\r\n\t\tif (method === \"POST\" || \"PUT\") {\r\n\t\t\tif (args[0].data) {\r\n\t\t\t\tif (typeof args[0].data !== \"string\") {\r\n\t\t\t\t\tresult.data = serialize(args[0].data);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult.data = args[0].data;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tresult.data = \"\";\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n\tresult.url = args[0];\r\n\tswitch(method) {\r\n\t\tcase \"GET\":\r\n\t\tcase \"DELETE\":\r\n\t\t\tresult.callback = args[1];\r\n\t\t\tresult.headers = args[2];\r\n\t\tbreak;\r\n\t\tcase \"POST\":\r\n\t\tcase \"PUT\":\r\n\t\t\tif (args[1]) {\r\n\t\t\t\tif (typeof args[1] !== \"string\") {\r\n\t\t\t\t\tresult.data = serialize(args[1]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult.data = args[1];\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tresult.data = \"\";\r\n\t\t\t}\r\n\t\t\tresult.callback = args[2];\r\n\t\t\tresult.headers = args[3];\r\n\t\tbreak;\r\n\t}\r\n\treturn result;\r\n}\r\nscheduler.ajax = {\r\n\t// if false - dhxr param will added to prevent caching on client side (default),\r\n\t// if true - do not add extra params\r\n\tcache: true,\r\n\r\n\t// default method for load/loadStruct, post/get allowed\r\n\tmethod: \"get\",\r\n\r\n\tserializeRequestParams: serialize,\r\n\tparse: function(data) {\r\n\t\tif (typeof data !== \"string\") return data;\r\n\r\n\t\tvar obj;\r\n\t\tdata = data.replace(/^[\\s]+/,\"\");\r\n\t\tif (typeof DOMParser !== \"undefined\" && !scheduler.$env.isIE) { // ff,ie9\r\n\t\t\tobj = (new DOMParser()).parseFromString(data, \"text/xml\");\r\n\t\t} else if (typeof window.ActiveXObject !== \"undefined\") {\r\n\t\t\tobj = new window.ActiveXObject(\"Microsoft.XMLDOM\");\r\n\t\t\tobj.async = \"false\";\r\n\t\t\tobj.loadXML(data);\r\n\t\t}\r\n\t\treturn obj;\r\n\t},\r\n\txmltop: function(tagname, xhr, obj) {\r\n\t\tif (typeof xhr.status == \"undefined\" || xhr.status < 400) {\r\n\t\t\tvar xml = (!xhr.responseXML) ? this.parse(xhr.responseText || xhr) : (xhr.responseXML || xhr);\r\n\t\t\tif (xml && xml.documentElement !== null && !xml.getElementsByTagName(\"parsererror\").length) {\r\n\t\t\t\treturn xml.getElementsByTagName(tagname)[0];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (obj !== -1) scheduler.callEvent(\"onLoadXMLError\",[\"Incorrect XML\", arguments[1], obj]);\r\n\t\treturn document.createElement(\"DIV\");\r\n\t},\r\n\txpath: function(xpathExp, docObj) {\r\n\t\tif (!docObj.nodeName) docObj = docObj.responseXML || docObj;\r\n\t\tif (scheduler.$env.isIE) {\r\n\t\t\treturn docObj.selectNodes(xpathExp)||[];\r\n\t\t} else {\r\n\t\t\tvar rows = [];\r\n\t\t\tvar first;\r\n\t\t\tvar col = (docObj.ownerDocument||docObj).evaluate(xpathExp, docObj, null, XPathResult.ANY_TYPE, null);\r\n\r\n\t\t\twhile (true){\r\n\t\t\t\tfirst = col.iterateNext();\r\n\t\t\t\tif(first){\r\n\t\t\t\t\trows.push(first);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn rows;\r\n\t\t}\r\n\t},\r\n\tquery: function(config) {\r\n\t\treturn this._call(\r\n\t\t\t(config.method || \"GET\"),\r\n\t\t\tconfig.url,\r\n\t\t\tconfig.data || \"\",\r\n\t\t\t(config.async || true),\r\n\t\t\tconfig.callback,\r\n\t\t\tconfig.headers\r\n\t\t);\r\n\t},\r\n\tget: function(url, onLoad, headers) {\r\n\t\tvar config = createConfig(\"GET\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tgetSync: function(url, headers) {\r\n\t\tvar config = createConfig(\"GET\", arguments);\r\n\t\tconfig.async = false;\r\n\t\treturn this.query(config);\r\n\t},\r\n\tput: function(url, postData, onLoad, headers) {\r\n\t\tvar config = createConfig(\"PUT\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tdel: function(url, onLoad, headers) {\r\n\t\t/**\r\n\t\t * https://tools.ietf.org/html/rfc7231#section-4.3.5\r\n\t\t * A payload within a DELETE request message has no defined semantics;\r\n\t\t * sending a payload body on a DELETE request might cause some existing\r\n\t\t * implementations to reject the request.\r\n\t\t */\r\n\t\tvar config = createConfig(\"DELETE\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tpost: function(url, postData, onLoad, headers) {\r\n\t\tif (arguments.length == 1) {\r\n\t\t\tpostData = \"\";\r\n\t\t} else if (arguments.length == 2 && typeof(postData) == \"function\") {\r\n\t\t\tonLoad = postData;\r\n\t\t\tpostData = \"\";\r\n\t\t}\r\n\t\tvar config = createConfig(\"POST\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tpostSync: function(url, postData, headers) {\r\n\t\tpostData = (postData === null ? \"\" : String(postData));\r\n\r\n\t\tvar config = createConfig(\"POST\", arguments);\r\n\t\tconfig.async = false;\r\n\t\treturn this.query(config);\r\n\t},\r\n\t_call: function(method, url, postData, async, onLoad, headers) {\r\n\t\treturn new scheduler.Promise((function(resolve, reject) {\r\n\t\t\tvar t = (typeof XMLHttpRequest !== undefined && !scheduler.$env.isIE ? new XMLHttpRequest() : new window.ActiveXObject(\"Microsoft.XMLHTTP\"));\r\n\t\t\tvar isQt = (navigator.userAgent.match(/AppleWebKit/) !== null && navigator.userAgent.match(/Qt/) !== null && navigator.userAgent.match(/Safari/) !== null);\r\n\r\n\t\t\tif (!!async) {\r\n\t\t\t\tt.addEventListener(\"readystatechange\", function() {\r\n\t\t\t\t\tif ((t.readyState == 4) || (isQt && t.readyState == 3)) { // what for long response and status 404?\r\n\t\t\t\t\t\tif (t.status != 200 || t.responseText === \"\")\r\n\t\t\t\t\t\t\tif (!scheduler.callEvent(\"onAjaxError\", [t])) return;\r\n\r\n\t\t\t\t\t\tsetTimeout(function() {\r\n\t\t\t\t\t\t\tif (typeof(onLoad) == \"function\") {\r\n\t\t\t\t\t\t\t\tonLoad.apply(window, [{xmlDoc:t, filePath:url}]); // dhtmlx-compat, response.xmlDoc.responseXML/responseText\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tresolve(t);\r\n\t\t\t\t\t\t\tif (typeof(onLoad) == \"function\") {\r\n\t\t\t\t\t\t\t\tonLoad = null;\r\n\t\t\t\t\t\t\t\tt = null;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}, 0);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (method == \"GET\" && !this.cache) {\r\n\t\t\t\turl += (url.indexOf(\"?\")>=0?\"&\":\"?\")+\"dhxr\"+new Date().getTime()+\"=1\";\r\n\t\t\t}\r\n\r\n\t\t\tt.open(method, url, async);\r\n\r\n\t\t\tif (headers){\r\n\t\t\t\tfor (var key in headers)\r\n\t\t\t\t\tt.setRequestHeader(key, headers[key]);\r\n\t\t\t} else if (method.toUpperCase() == \"POST\" || method == \"PUT\" || method == \"DELETE\") {\r\n\t\t\t\tt.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\r\n\t\t\t} else if (method == \"GET\") {\r\n\t\t\t\tpostData = null;\r\n\t\t\t}\r\n\r\n\t\t\tt.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\r\n\r\n\t\t\tt.send(postData);\r\n\r\n\t\t\tif (!async) return {xmlDoc:t, filePath:url}; // dhtmlx-compat, response.xmlDoc.responseXML/responseText\r\n\t\t}.bind(this)));\r\n\t},\r\n\turlSeparator: function(str){\r\n\t\tif (str.indexOf(\"?\") != -1)\r\n\t\t\treturn \"&\";\r\n\t\telse\r\n\t\t\treturn \"?\";\r\n\t}\r\n};\r\n\r\nscheduler.$ajax = scheduler.ajax; // for old\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nvar generateStringToDate = function (format, utc) {\r\n\tvar splt = \"var temp=date.match(/[a-zA-Z]+|[0-9]+/g);\";\r\n\tvar mask = format.match(/%[a-zA-Z]/g);\r\n\tfor (var i = 0; i < mask.length; i++) {\r\n\t\tswitch (mask[i]) {\r\n\t\t\tcase \"%j\":\r\n\t\t\tcase \"%d\": splt += \"set[2]=temp[\" + i + \"]||1;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%n\":\r\n\t\t\tcase \"%m\": splt += \"set[1]=(temp[\" + i + \"]||1)-1;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%y\": splt += \"set[0]=temp[\" + i + \"]*1+(temp[\" + i + \"]>50?1900:2000);\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%g\":\r\n\t\t\tcase \"%G\":\r\n\t\t\tcase \"%h\":\r\n\t\t\tcase \"%H\":\r\n\t\t\t\tsplt += \"set[3]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%i\":\r\n\t\t\t\tsplt += \"set[4]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%Y\": splt += \"set[0]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%a\":\r\n\t\t\tcase \"%A\": splt += \"set[3]=set[3]%12+((temp[\" + i + \"]||'').toLowerCase()=='am'?0:12);\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%s\": splt += \"set[5]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%M\": splt += \"set[1]=this.locale.date.month_short_hash[temp[\" + i + \"]]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%F\": splt += \"set[1]=this.locale.date.month_full_hash[temp[\" + i + \"]]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\tvar code = \"set[0],set[1],set[2],set[3],set[4],set[5]\";\r\n\tif (utc) code = \" Date.UTC(\" + code + \")\";\r\n\treturn new Function(\"date\", \"var set=[0,0,1,0,0,0]; \" + splt + \" return new Date(\" + code + \");\");\r\n};\r\nvar csp_date_to_str = function (format, utc) {\r\n\treturn function(date) {\r\n\t\treturn format.replace(/%[a-zA-Z]/g, function (a) {\r\n\t\t\tswitch (a) {\r\n\t\t\t\tcase \"%d\": return utc ? scheduler.date.to_fixed(date.getUTCDate()) : scheduler.date.to_fixed(date.getDate());\r\n\t\t\t\tcase \"%m\": return utc ? scheduler.date.to_fixed((date.getUTCMonth() + 1)) : scheduler.date.to_fixed((date.getMonth() + 1));\r\n\t\t\t\tcase \"%j\": return utc ? date.getUTCDate() : date.getDate();\r\n\t\t\t\tcase \"%n\": return utc ? (date.getUTCMonth() + 1) : (date.getMonth() + 1);\r\n\t\t\t\tcase \"%y\": return utc ? scheduler.date.to_fixed(date.getUTCFullYear() % 100) : scheduler.date.to_fixed(date.getFullYear() % 100);\r\n\t\t\t\tcase \"%Y\": return utc ? date.getUTCFullYear() : date.getFullYear();\r\n\t\t\t\tcase \"%D\": return utc ? scheduler.locale.date.day_short[date.getUTCDay()] : scheduler.locale.date.day_short[date.getDay()];\r\n\t\t\t\tcase \"%l\": return utc ? scheduler.locale.date.day_full[date.getUTCDay()] : scheduler.locale.date.day_full[date.getDay()];\r\n\t\t\t\tcase \"%M\": return utc ? scheduler.locale.date.month_short[date.getUTCMonth()] : scheduler.locale.date.month_short[date.getMonth()];\r\n\t\t\t\tcase \"%F\": return utc ? scheduler.locale.date.month_full[date.getUTCMonth()] : scheduler.locale.date.month_full[date.getMonth()];\r\n\t\t\t\tcase \"%h\": return utc ? scheduler.date.to_fixed((date.getUTCHours() + 11) % 12 + 1) : scheduler.date.to_fixed((date.getHours() + 11) % 12 + 1);\r\n\t\t\t\tcase \"%g\": return utc ? ((date.getUTCHours() + 11) % 12 + 1) : ((date.getHours() + 11) % 12 + 1);\r\n\t\t\t\tcase \"%G\": return utc ? date.getUTCHours() : date.getHours();\r\n\t\t\t\tcase \"%H\": return utc ? scheduler.date.to_fixed(date.getUTCHours()) : scheduler.date.to_fixed(date.getHours());\r\n\t\t\t\tcase \"%i\": return utc ? scheduler.date.to_fixed(date.getUTCMinutes()) : scheduler.date.to_fixed(date.getMinutes());\r\n\t\t\t\tcase \"%a\": return utc ? (date.getUTCHours() > 11 ? \"pm\" : \"am\") : (date.getHours() > 11 ? \"pm\" : \"am\");\r\n\t\t\t\tcase \"%A\": return utc ? (date.getUTCHours() > 11 ? \"PM\" : \"AM\") : (date.getHours() > 11 ? \"PM\" : \"AM\");\r\n\t\t\t\tcase \"%s\": return utc ? scheduler.date.to_fixed(date.getUTCSeconds()) : scheduler.date.to_fixed(date.getSeconds());\r\n\t\t\t\tcase \"%W\": return utc ? scheduler.date.to_fixed(scheduler.date.getUTCISOWeek(date)) : scheduler.date.to_fixed(scheduler.date.getISOWeek(date));\r\n\t\t\t\tdefault: return a;\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n};\r\nvar csp_str_to_date = function (format, utc) {\r\n\tconst mask = format.match(/%[a-zA-Z]/g);\r\n\treturn function (date){\r\n\t\tvar set = [0, 0, 1, 0, 0, 0];\r\n\t\tvar temp = date.match(/[a-zA-Z]+|[0-9]+/g);\r\n\r\n\t\tfor (var i = 0; i < mask.length; i++) {\r\n\t\t\tswitch (mask[i]) {\r\n\t\t\t\tcase \"%j\":\r\n\t\t\t\tcase \"%d\":\r\n\t\t\t\t\tset[2] = temp[i] || 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%n\":\r\n\t\t\t\tcase \"%m\":\r\n\t\t\t\t\tset[1] = (temp[i] || 1) - 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%y\":\r\n\t\t\t\t\tset[0] = temp[i] * 1 + (temp[i] > 50 ? 1900 : 2000);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%g\":\r\n\t\t\t\tcase \"%G\":\r\n\t\t\t\tcase \"%h\":\r\n\t\t\t\tcase \"%H\":\r\n\t\t\t\t\tset[3] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%i\":\r\n\t\t\t\t\tset[4] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\tset[0] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%a\":\r\n\t\t\t\tcase \"%A\":\r\n\t\t\t\t\tset[3] = set[3] % 12 + ((temp[i] || '').toLowerCase() == 'am' ? 0 : 12);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%s\":\r\n\t\t\t\t\tset[5] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%M\":\r\n\t\t\t\t\tset[1] = scheduler.locale.date.month_short_hash[temp[i]] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%F\":\r\n\t\t\t\t\tset[1] = scheduler.locale.date.month_full_hash[temp[i]] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (utc) {\r\n\t\t\treturn new Date(Date.UTC(set[0], set[1], set[2], set[3], set[4], set[5]));\r\n\t\t}\r\n\r\n\t\treturn new Date(set[0], set[1], set[2], set[3], set[4], set[5]);\r\n\t};\r\n};\r\n\r\nlet cspEnabled = undefined;\r\nfunction checkIfCSPEnabled(){\r\n\ttry {\r\n\t\tnew Function(\"cspEnabled = false;\");\r\n\t\tcspEnabled = false;\r\n\t} catch(e) {\r\n\t\tcspEnabled = true;\r\n\t}\r\n\treturn cspEnabled;\r\n}\r\n\r\nfunction useCsp() {\r\n\tvar result = false;\r\n\tif (scheduler.config.csp === \"auto\") {\r\n\t\tif(cspEnabled === undefined){\r\n\t\t\tcspEnabled = checkIfCSPEnabled();\r\n\t\t}\r\n\t\tresult = cspEnabled;\r\n\t} else {\r\n\t\tresult = scheduler.config.csp;\r\n\t}\r\n\treturn result;\r\n}\r\nscheduler.date = {\r\n\tinit:function(){\r\n\t\tvar s = scheduler.locale.date.month_short;\r\n\t\tvar t = scheduler.locale.date.month_short_hash = {};\r\n\t\tfor (var i = 0; i < s.length; i++)\r\n\t\t\tt[s[i]]=i;\r\n\r\n\t\tvar s = scheduler.locale.date.month_full;\r\n\t\tvar t = scheduler.locale.date.month_full_hash = {};\r\n\t\tfor (var i = 0; i < s.length; i++)\r\n\t\t\tt[s[i]]=i;\r\n\t},\r\n\tdate_part:function(date){\r\n\t\tvar old = new Date(date);\r\n\t\tdate.setHours(0);\r\n\t\tdate.setMinutes(0);\r\n\t\tdate.setSeconds(0);\r\n\t\tdate.setMilliseconds(0);\r\n\t\tif (date.getHours() && //shift to yesterday on dst\r\n\t\t\t(date.getDate() < old.getDate() || date.getMonth() < old.getMonth() || date.getFullYear() < old.getFullYear()) )\r\n\t\t\tdate.setTime(date.getTime() + 60 * 60 * 1000 * (24 - date.getHours()));\r\n\t\treturn date;\r\n\t},\r\n\ttime_part:function(date){\r\n\t\treturn (date.valueOf()/1000 - date.getTimezoneOffset()*60)%86400;\r\n\t},\r\n\tweek_start:function(date){\r\n\t\tvar shift=date.getDay();\r\n\t\tif (scheduler.config.start_on_monday){\r\n\t\t\tif (shift===0) shift=6;\r\n\t\t\telse shift--;\r\n\t\t}\r\n\t\treturn this.date_part(this.add(date,-1*shift,\"day\"));\r\n\t},\r\n\tmonth_start:function(date){\r\n\t\tdate.setDate(1);\r\n\t\treturn this.date_part(date);\r\n\t},\r\n\tyear_start:function(date){\r\n\t\tdate.setMonth(0);\r\n\t\treturn this.month_start(date);\r\n\t},\r\n\tday_start:function(date){\r\n\t\treturn this.date_part(date);\r\n\t},\r\n\t_add_days:function(date, inc){\r\n\t\tvar ndate = new Date(date.valueOf());\r\n\r\n\t\tndate.setDate(ndate.getDate() + inc);\r\n\r\n\t\t// Workaround for Safari/iOS timezone bug, ref:OKZ-149693\r\n\t\tif(inc == Math.round(inc) && inc > 0){\r\n\t\t\tvar datesDiff = +ndate - +date,\r\n\t\t\t\trest = datesDiff % (24*60*60*1000);\r\n\t\t\tif(rest && date.getTimezoneOffset() == ndate.getTimezoneOffset()){\r\n\t\t\t\tvar hours = rest / (60* 60 * 1000);\r\n\t\t\t\tndate.setTime(ndate.getTime() + (24 - hours) * 60 * 60 * 1000);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (inc >= 0 && (!date.getHours() && ndate.getHours()) &&//shift to yesterday on dst\r\n\t\t\t(ndate.getDate() < date.getDate() || ndate.getMonth() < date.getMonth() || ndate.getFullYear() < date.getFullYear()) )\r\n\t\t\tndate.setTime(ndate.getTime() + 60 * 60 * 1000 * (24 - ndate.getHours()));\r\n\t\treturn ndate;\r\n\t},\r\n\tadd:function(date,inc,mode){\r\n\t\tvar ndate=new Date(date.valueOf());\r\n\t\tswitch(mode){\r\n\t\t\tcase \"day\":\r\n\t\t\t\tndate = scheduler.date._add_days(ndate, inc);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"week\":\r\n\t\t\t\tndate = scheduler.date._add_days(ndate, inc * 7);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"month\": ndate.setMonth(ndate.getMonth()+inc); break;\r\n\t\t\tcase \"year\": ndate.setYear(ndate.getFullYear()+inc); break;\r\n\t\t\tcase \"hour\":\r\n\t\t\t\t/*\r\n\t\t\t\t setHour(getHour() + inc) and setMinutes gives weird result when is applied on a Daylight Saving time switch\r\n\t\t\t\t setTime seems working as expected\r\n\t\t\t\t*/\r\n\t\t\t\tndate.setTime(ndate.getTime() + inc * 60 * 60 * 1000);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"minute\":\r\n\t\t\t\tndate.setTime(ndate.getTime() + inc * 60 * 1000);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\treturn scheduler.date[\"add_\"+mode](date,inc,mode);\r\n\t\t}\r\n\t\treturn ndate;\r\n\t},\r\n\tto_fixed:function(num){\r\n\t\tif (num<10)\treturn \"0\"+num;\r\n\t\treturn num;\r\n\t},\r\n\tcopy:function(date){\r\n\t\treturn new Date(date.valueOf());\r\n\t},\r\n\tdate_to_str:function(format,utc){\r\n\t\tif (useCsp()) {\r\n\t\t\treturn csp_date_to_str(format,utc);\r\n\t\t}\r\n\r\n\t\tformat=format.replace(/%[a-zA-Z]/g,function(a){\r\n\t\t\tswitch(a){\r\n\t\t\t\tcase \"%d\": return \"\\\"+this.date.to_fixed(date.getDate())+\\\"\";\r\n\t\t\t\tcase \"%m\": return \"\\\"+this.date.to_fixed((date.getMonth()+1))+\\\"\";\r\n\t\t\t\tcase \"%j\": return \"\\\"+date.getDate()+\\\"\";\r\n\t\t\t\tcase \"%n\": return \"\\\"+(date.getMonth()+1)+\\\"\";\r\n\t\t\t\tcase \"%y\": return \"\\\"+this.date.to_fixed(date.getFullYear()%100)+\\\"\";\r\n\t\t\t\tcase \"%Y\": return \"\\\"+date.getFullYear()+\\\"\";\r\n\t\t\t\tcase \"%D\": return \"\\\"+this.locale.date.day_short[date.getDay()]+\\\"\";\r\n\t\t\t\tcase \"%l\": return \"\\\"+this.locale.date.day_full[date.getDay()]+\\\"\";\r\n\t\t\t\tcase \"%M\": return \"\\\"+this.locale.date.month_short[date.getMonth()]+\\\"\";\r\n\t\t\t\tcase \"%F\": return \"\\\"+this.locale.date.month_full[date.getMonth()]+\\\"\";\r\n\t\t\t\tcase \"%h\": return \"\\\"+this.date.to_fixed((date.getHours()+11)%12+1)+\\\"\";\r\n\t\t\t\tcase \"%g\": return \"\\\"+((date.getHours()+11)%12+1)+\\\"\";\r\n\t\t\t\tcase \"%G\": return \"\\\"+date.getHours()+\\\"\";\r\n\t\t\t\tcase \"%H\": return \"\\\"+this.date.to_fixed(date.getHours())+\\\"\";\r\n\t\t\t\tcase \"%i\": return \"\\\"+this.date.to_fixed(date.getMinutes())+\\\"\";\r\n\t\t\t\tcase \"%a\": return \"\\\"+(date.getHours()>11?\\\"pm\\\":\\\"am\\\")+\\\"\";\r\n\t\t\t\tcase \"%A\": return \"\\\"+(date.getHours()>11?\\\"PM\\\":\\\"AM\\\")+\\\"\";\r\n\t\t\t\tcase \"%s\": return \"\\\"+this.date.to_fixed(date.getSeconds())+\\\"\";\r\n\t\t\t\tcase \"%W\": return \"\\\"+this.date.to_fixed(this.date.getISOWeek(date))+\\\"\";\r\n\t\t\t\tdefault: return a;\r\n\t\t\t}\r\n\t\t});\r\n\t\tif (utc) format=format.replace(/date\\.get/g,\"date.getUTC\");\r\n\t\tvar func = new Function(\"date\",\"return \\\"\"+format+\"\\\";\");\r\n\r\n\t\treturn func.bind(scheduler);\r\n\t},\r\n\tstr_to_date:function(format, utc, exactFormat){\r\n\t\tvar stringToDateMethod = useCsp() ? csp_str_to_date : generateStringToDate;\r\n\t\tvar parseExactFormat = stringToDateMethod(format, utc);\r\n\t\t// eslint-disable-next-line\r\n\t\tvar yyyyMMddhhIIss = /^[0-9]{4}(\\-|\\/)[0-9]{2}(\\-|\\/)[0-9]{2} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/;\r\n\r\n\t\t// MM/dd/yyyy - default old format for xml-date\r\n\t\t// eslint-disable-next-line\r\n\t\tvar MMddyyyyhhIIss = /^[0-9]{2}\\/[0-9]{2}\\/[0-9]{4} ?(([0-9]{1,2}:[0-9]{2})(:[0-9]{1,2})?)?$/;\r\n\t\t// dd-MM-yyyy - default old format for api-date\r\n\t\t// eslint-disable-next-line\r\n\t\tvar ddMMyyyyhhIIss = /^[0-9]{2}\\-[0-9]{2}\\-[0-9]{4} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/;\r\n\t\t// eslint-disable-next-line\r\n\t\tvar ISO8601 = /^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$/;\r\n\r\n\t\tvar isYMDDate = function (datestr) {\r\n\t\t\treturn yyyyMMddhhIIss.test(String(datestr));\r\n\t\t};\r\n\r\n\t\tvar isMDYDate = function (datestr) {\r\n\t\t\treturn MMddyyyyhhIIss.test(String(datestr));\r\n\t\t};\r\n\t\tvar isDMYDate = function (datestr) {\r\n\t\t\treturn ddMMyyyyhhIIss.test(String(datestr));\r\n\t\t};\r\n\t\tvar isISO8601 = function (datestr) {\r\n\t\t\treturn ISO8601.test(datestr);\r\n\t\t};\r\n\r\n\t\tvar parseYMD = stringToDateMethod(\"%Y-%m-%d %H:%i:%s\", utc);\r\n\t\tvar parseMDY = stringToDateMethod(\"%m/%d/%Y %H:%i:%s\", utc);\r\n\t\tvar parseDMY = stringToDateMethod(\"%d-%m-%Y %H:%i:%s\", utc);\r\n\r\n\t\treturn function (dateString) {\r\n\r\n\t\t\tif (!exactFormat && !scheduler.config.parse_exact_format) {\r\n\t\t\t\tif (dateString && dateString.getISOWeek) {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t} else if (typeof dateString === \"number\") {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t} else if (isYMDDate(dateString)) {\r\n\t\t\t\t\treturn parseYMD(dateString);\r\n\t\t\t\t} else if (isMDYDate(dateString)) {\r\n\t\t\t\t\treturn parseMDY(dateString);\r\n\t\t\t\t} else if (isDMYDate(dateString)) {\r\n\t\t\t\t\treturn parseDMY(dateString);\r\n\t\t\t\t} else if (isISO8601(dateString)) {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn parseExactFormat.call(scheduler, dateString);\r\n\t\t};\r\n\t},\r\n\tgetISOWeek: function(ndate) {\r\n\t\tif(!ndate) return false;\r\n\t\tndate = this.date_part(new Date(ndate));\r\n\t\tvar nday = ndate.getDay();\r\n\t\tif (nday === 0) {\r\n\t\t\tnday = 7;\r\n\t\t}\r\n\t\tvar first_thursday = new Date(ndate.valueOf());\r\n\t\tfirst_thursday.setDate(ndate.getDate() + (4 - nday));\r\n\t\tvar year_number = first_thursday.getFullYear(); // year of the first Thursday\r\n\t\tvar ordinal_date = Math.round( (first_thursday.getTime() - new Date(year_number, 0, 1).getTime()) / 86400000); //ordinal date of the first Thursday - 1 (so not really ordinal date)\r\n\t\tvar week_number = 1 + Math.floor( ordinal_date / 7);\r\n\t\treturn week_number;\r\n\t},\r\n\tgetUTCISOWeek: function(ndate){\r\n\t\treturn this.getISOWeek(this.convert_to_utc(ndate));\r\n\t},\r\n\tconvert_to_utc: function(date) {\r\n\t\treturn new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds());\r\n\t}\r\n};\r\n\r\n}\r\n\r\n","export default function extend(scheduler) {\r\n\r\n/*\r\n%e\tDay of the month without leading zeros (01..31)\r\n%d\tDay of the month, 2 digits with leading zeros (01..31)\r\n%j\tDay of the year, 3 digits with leading zeros (001..366)\r\n%a\tA textual representation of a day, two letters\r\n%W\tA full textual representation of the day of the week\r\n\r\n%c\tNumeric representation of a month, without leading zeros (0..12)\r\n%m\tNumeric representation of a month, with leading zeros (00..12)\r\n%b\tA short textual representation of a month, three letters (Jan..Dec)\r\n%M\tA full textual representation of a month, such as January or March (January..December)\r\n\r\n%y\tA two digit representation of a year (93..03)\r\n%Y\tA full numeric representation of a year, 4 digits (1993..03)\r\n*/\r\n\r\nscheduler.config={\r\n\tdefault_date: \"%j %M %Y\",\r\n\tmonth_date: \"%F %Y\",\r\n\tload_date: \"%Y-%m-%d\",\r\n\tweek_date: \"%l\",\r\n\tday_date: \"%D %j\",\r\n\thour_date: \"%H:%i\",\r\n\tmonth_day: \"%d\",\r\n\t//xml_date: \"%m/%d/%Y %H:%i\",\r\n\tdate_format: \"%Y-%m-%d %H:%i\",\r\n\tapi_date: \"%d-%m-%Y %H:%i\",\r\n\tparse_exact_format: false,\r\n\tpreserve_length:true,\r\n\ttime_step: 5,\r\n\tdisplayed_event_color: \"#ff4a4a\",\r\n\tdisplayed_event_text_color: \"#ffef80\",\r\n\twide_form: 0,\r\n\tday_column_padding: 8,\r\n\tuse_select_menu_space: true,\r\n\tfix_tab_position: true,\r\n\tstart_on_monday: true,\r\n\tfirst_hour: 0,\r\n\tlast_hour: 24,\r\n\treadonly: false,\r\n\tdrag_resize: true,\r\n\tdrag_move: true,\r\n\tdrag_create: true,\r\n\tdrag_event_body: true,\r\n\tdblclick_create: true,\r\n\tdetails_on_dblclick: true,\r\n\tedit_on_create: true,\r\n\tdetails_on_create: true,\r\n\theader: null,\r\n\thour_size_px: 44,\r\n\tresize_month_events:false,\r\n\tresize_month_timed:false,\r\n\tresponsive_lightbox: false,\r\n\tseparate_short_events: true,\r\n\trtl:false,\r\n\r\n\tcascade_event_display: false,\r\n\tcascade_event_count: 4,\r\n\tcascade_event_margin: 30,\r\n\r\n\tmulti_day:true,\r\n\tmulti_day_height_limit: 200,\r\n\r\n\tdrag_lightbox: true,\r\n\tpreserve_scroll: true,\r\n\tselect: true,\r\n\tundo_deleted: true,\r\n\tserver_utc: false,\r\n\ttouch:true,\r\n\ttouch_tip:true,\r\n\ttouch_drag:500,\r\n\ttouch_swipe_dates: false,\r\n\tquick_info_detached:true,\r\n\r\n\tpositive_closing: false,\r\n\t//header_datepicker: true,\r\n\tdrag_highlight: true,\r\n\tlimit_drag_out: false,\r\n\ticons_edit: [\"icon_save\", \"icon_cancel\"],\r\n\ticons_select: [\"icon_details\", \"icon_edit\", \"icon_delete\"],\r\n\tbuttons_left: [\"dhx_save_btn\", \"dhx_cancel_btn\"],\r\n\tbuttons_right: [\"dhx_delete_btn\"],\r\n\tlightbox: {\r\n\t\tsections: [\r\n\t\t\t{name: \"description\", map_to: \"text\", type: \"textarea\", focus: true},\r\n\t\t\t{name: \"time\", height: 72, type: \"time\", map_to: \"auto\"}\r\n\t\t]\r\n\t},\r\n\thighlight_displayed_event: true,\r\n\tleft_border: false,\r\n\r\n\tajax_error: \"alert\",//\"ignore\"|\"console\"\r\n\tdelay_render: 0,\r\n\ttimeline_swap_resize: true,\r\n\twai_aria_attributes: true,\r\n\twai_aria_application_role: true,\r\n\r\n\tcsp: \"auto\",\r\n\tevent_attribute: \"data-event-id\",\r\n\tshow_errors: true\r\n};\r\n\r\nscheduler.config.buttons_left.$initial = scheduler.config.buttons_left.join();\r\nscheduler.config.buttons_right.$initial = scheduler.config.buttons_right.join();\r\n\r\nscheduler._helpers = {\r\n\tparseDate: function parseDate(date) {\r\n\t\tvar parse = scheduler.templates.xml_date || scheduler.templates.parse_date;\r\n\t\treturn parse(date);\r\n\t},\r\n\tformatDate: function formatDate(date) {\r\n\t\tvar format = scheduler.templates.xml_format || scheduler.templates.format_date;\r\n\t\treturn format(date);\r\n\t}\r\n};\r\n\r\nscheduler.templates={};\r\nscheduler.init_templates=function(){\r\n\r\n\r\n\r\n\tvar d=scheduler.date.date_to_str;\r\n\tvar c=scheduler.config;\r\n\tvar f = function(a,b){\r\n\t\tfor (var c in b)\r\n\t\t\tif (!a[c]) a[c]=b[c];\r\n\t};\r\n\tf(scheduler.templates,{\r\n\t\tday_date:d(c.default_date),\r\n\t\tmonth_date:d(c.month_date),\r\n\t\tweek_date:function(d1,d2){\r\n\t\t\tif(c.rtl) {\r\n\t\t\t\treturn scheduler.templates.day_date(scheduler.date.add(d2,-1,\"day\"))+\" – \"+scheduler.templates.day_date(d1);\r\n\t\t\t} \r\n\t\t\treturn scheduler.templates.day_date(d1)+\" – \"+scheduler.templates.day_date(scheduler.date.add(d2,-1,\"day\"));\r\n\t\t},\r\n\t\tday_scale_date:d(c.default_date),\r\n\t\ttime_slot_text: function(date){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\ttime_slot_class: function(date){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\r\n\t\tmonth_scale_date:d(c.week_date),\r\n\t\tweek_scale_date:d(c.day_date),\r\n\t\thour_scale:d(c.hour_date),\r\n\t\ttime_picker:d(c.hour_date),\r\n\t\tevent_date:d(c.hour_date),\r\n\t\tmonth_day:d(c.month_day),\r\n\r\n\t\tload_format: d(c.load_date),\r\n\t//\txml_date:scheduler.date.str_to_date(c.xml_date,c.server_utc),\r\n\t//\txml_format:d(c.date_format,c.server_utc),\r\n\t\tformat_date: d(c.date_format, c.server_utc),\r\n\t\tparse_date:scheduler.date.str_to_date(c.date_format,c.server_utc),\r\n\t\tapi_date:scheduler.date.str_to_date(c.api_date, false, false),\r\n\t\tevent_header:function(start,end,ev){\r\n\r\n\t\t\tif(ev._mode === \"small\" || ev._mode === \"smallest\"){\r\n\t\t\t\treturn scheduler.templates.event_date(start);\r\n\t\t\t}else{\r\n\t\t\t\treturn scheduler.templates.event_date(start)+\" - \"+scheduler.templates.event_date(end);\r\n\t\t\t}\r\n\t\t},\r\n\t\tevent_text:function(start,end,ev){\r\n\t\t\treturn ev.text;\r\n\t\t},\r\n\t\tevent_class:function(start,end,ev){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tmonth_date_class:function(d){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tweek_date_class:function(d){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tevent_bar_date:function(start,end,ev) {\r\n\t\t\treturn scheduler.templates.event_date(start);\r\n\t\t},\r\n\t\tevent_bar_text:function(start,end,ev){\r\n\t\t\treturn ev.text;\r\n\t\t},\r\n\t\tmonth_events_link : function(date, count){\r\n\t\t\treturn \"View more(\"+count+\" events)\";\r\n\t\t},\r\n\t\tdrag_marker_class : function(start, end, event){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tdrag_marker_content : function(start, end, event){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\t/* Could be redifined */\r\n\t\ttooltip_date_format: scheduler.date.date_to_str(\"%Y-%m-%d %H:%i\"),\r\n\t\ttooltip_text: function(start, end, event) {\r\n\t\t\treturn \"Event: \" + event.text + \"
Start date: \" + scheduler.templates.tooltip_date_format(start) + \"
End date: \" + scheduler.templates.tooltip_date_format(end);\r\n\t\t},\r\n\r\n\t\tcalendar_month: d(\"%F %Y\"),\r\n\t\tcalendar_scale_date: d(\"%D\"),\r\n\t\tcalendar_date: d(\"%d\"),\r\n\t\tcalendar_time: d(\"%d-%m-%Y\")\r\n\r\n\t});\r\n\tthis.callEvent(\"onTemplatesReady\",[]);\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler._events = {};\r\nscheduler.clearAll = function() {\r\n\tthis._events = {};\r\n\tthis._loaded = {};\r\n\r\n\tthis._edit_id = null;\r\n\tthis._select_id = null;\r\n\tthis._drag_id = null;\r\n\tthis._drag_mode = null;\r\n\tthis._drag_pos = null;\r\n\tthis._new_event = null;\r\n\r\n\tthis.clear_view();\r\n\tthis.callEvent(\"onClearAll\", []);\r\n};\r\nscheduler.addEvent = function(start_date, end_date, text, id, extra_data) {\r\n\tif (!arguments.length)\r\n\t\treturn this.addEventNow();\r\n\tvar ev = start_date;\r\n\tif (arguments.length != 1) {\r\n\t\tev = extra_data || {};\r\n\t\tev.start_date = start_date;\r\n\t\tev.end_date = end_date;\r\n\t\tev.text = text;\r\n\t\tev.id = id;\r\n\t}\r\n\tev.id = ev.id || scheduler.uid();\r\n\tev.text = ev.text || \"\";\r\n\r\n\tif (typeof ev.start_date == \"string\") ev.start_date = this.templates.api_date(ev.start_date);\r\n\tif (typeof ev.end_date == \"string\") ev.end_date = this.templates.api_date(ev.end_date);\r\n\tvar d = (this.config.event_duration || this.config.time_step) * 60000;\r\n\tif (ev.start_date.valueOf() == ev.end_date.valueOf())\r\n\t\tev.end_date.setTime(ev.end_date.valueOf() + d);\r\n\r\n\tev.start_date.setMilliseconds(0);\r\n\tev.end_date.setMilliseconds(0);\r\n\r\n\tev._timed = this.isOneDayEvent(ev);\r\n\r\n\tvar is_new = !this._events[ev.id];\r\n\tthis._events[ev.id] = ev;\r\n\tthis.event_updated(ev);\r\n\tif (!this._loading)\r\n\t\tthis.callEvent(is_new ? \"onEventAdded\" : \"onEventChanged\", [ev.id, ev]);\r\n\treturn ev.id;\r\n};\r\nscheduler.deleteEvent = function(id, silent) {\r\n\tvar ev = this._events[id];\r\n\tif (!silent && (!this.callEvent(\"onBeforeEventDelete\", [id, ev]) || !this.callEvent(\"onConfirmedBeforeEventDelete\", [id, ev])))\r\n\t\treturn;\r\n\tif (ev) {\r\n\t\tif(scheduler.getState().select_id == id){\r\n\t\t\tscheduler.unselect();\r\n\t\t}\r\n\t\tdelete this._events[id];\r\n\t\tthis.event_updated(ev);\r\n\r\n\t\tif(this._drag_id == ev.id){\r\n\t\t\tthis._drag_id = null;\r\n\t\t\tthis._drag_mode=null;\r\n\t\t\tthis._drag_pos=null;\r\n\t\t}\r\n\t}\r\n\r\n\tthis.callEvent(\"onEventDeleted\", [id, ev]);\r\n};\r\nscheduler.getEvent = function(id) {\r\n\treturn this._events[id];\r\n};\r\nscheduler.setEvent = function(id, hash) {\r\n\tif(!hash.id)\r\n\t\thash.id = id;\r\n\r\n\tthis._events[id] = hash;\r\n};\r\nscheduler.for_rendered = function(id, method) {\r\n\tfor (var i = this._rendered.length - 1; i >= 0; i--)\r\n\t\tif (this._rendered[i].getAttribute(this.config.event_attribute) == id)\r\n\t\t\tmethod(this._rendered[i], i);\r\n};\r\nscheduler.changeEventId = function(id, new_id) {\r\n\tif (id == new_id) return;\r\n\tvar ev = this._events[id];\r\n\tif (ev) {\r\n\t\tev.id = new_id;\r\n\t\tthis._events[new_id] = ev;\r\n\t\tdelete this._events[id];\r\n\t}\r\n\tthis.for_rendered(id, function(r) {\r\n\t\tr.setAttribute(\"event_id\", new_id); // for backward compatibility\r\n\t\tr.setAttribute(scheduler.config.event_attribute, new_id);\r\n\t});\r\n\tif (this._select_id == id) this._select_id = new_id;\r\n\tif (this._edit_id == id) this._edit_id = new_id;\r\n\t//if (this._drag_id==id) this._drag_id=new_id;\r\n\tthis.callEvent(\"onEventIdChange\", [id, new_id]);\r\n};\r\n\r\n(function() {\r\n\tvar attrs = [\"text\", \"Text\", \"start_date\", \"StartDate\", \"end_date\", \"EndDate\"];\r\n\tvar create_getter = function(name) {\r\n\t\treturn function(id) { return (scheduler.getEvent(id))[name]; };\r\n\t};\r\n\tvar create_setter = function(name) {\r\n\t\treturn function(id, value) {\r\n\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\tev[name] = value;\r\n\t\t\tev._changed = true;\r\n\t\t\tev._timed = this.isOneDayEvent(ev);\r\n\t\t\tscheduler.event_updated(ev, true);\r\n\t\t};\r\n\t};\r\n\tfor (var i = 0; i < attrs.length; i += 2) {\r\n\t\tscheduler[\"getEvent\" + attrs[i + 1]] = create_getter(attrs[i]);\r\n\t\tscheduler[\"setEvent\" + attrs[i + 1]] = create_setter(attrs[i]);\r\n\t}\r\n})();\r\n\r\nscheduler.event_updated = function(ev, force) {\r\n\tif (this.is_visible_events(ev))\r\n\t\tthis.render_view_data();\r\n\telse\r\n\t\tthis.clear_event(ev.id);\r\n};\r\nscheduler.is_visible_events = function(ev) {\r\n\tif(!this._min_date || !this._max_date){\r\n\t\treturn false;\r\n\t}\r\n\r\n\t//if in displayed dates\r\n\tvar in_visible_range = (ev.start_date.valueOf() < this._max_date.valueOf() && this._min_date.valueOf() < ev.end_date.valueOf());\r\n\r\n\tif(in_visible_range){\r\n\r\n\t\t//end dates are not between last/first hours\r\n\t\tvar evFirstHour = ev.start_date.getHours(),\r\n\t\t\tevLastHour = ev.end_date.getHours() + (ev.end_date.getMinutes()/60),\r\n\t\t\tlastHour = this.config.last_hour,\r\n\t\t\tfirstHour = this.config.first_hour;\r\n\r\n\t\tvar end_dates_visible = (this._table_view || !((evLastHour > lastHour || evLastHour <= firstHour) && (evFirstHour >= lastHour || evFirstHour < firstHour)));\r\n\r\n\t\tif(end_dates_visible){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\r\n\t\t\t//event is bigger than area hidden between last/first hours\r\n\t\t\tvar event_duration = (ev.end_date.valueOf() - ev.start_date.valueOf()) / (1000*60*60),//hours\r\n\t\t\t\thidden_duration = 24 - (this.config.last_hour - this.config.first_hour);\r\n\r\n\t\t\treturn !!((event_duration > hidden_duration) || (evFirstHour < lastHour && evLastHour > firstHour));\r\n\r\n\t\t}\r\n\t}else{\r\n\t\treturn false;\r\n\t}\r\n};\r\nscheduler.isOneDayEvent = function(ev) {\r\n\t// decrease by one ms so events that ends on midnight on the next day were still considered one day events\r\n\t// e.g. (09-02-2018 19:00 - 10-02-2018 00:00)\r\n\t// events >= 24h long are considered multiday\r\n\tvar checkEndDate = new Date(ev.end_date.valueOf() - 1);\r\n\treturn (\r\n\t\tev.start_date.getFullYear() === checkEndDate.getFullYear() &&\r\n\t\tev.start_date.getMonth() === checkEndDate.getMonth() &&\r\n\t\tev.start_date.getDate() === checkEndDate.getDate()\r\n\t) && ((ev.end_date.valueOf() - ev.start_date.valueOf()) < (1000 * 60 * 60 * 24));\r\n};\r\n\r\nscheduler.get_visible_events = function(only_timed) {\r\n\t//not the best strategy for sure\r\n\tvar stack = [];\r\n\r\n\tfor (var id in this._events)\r\n\t\tif (this.is_visible_events(this._events[id]))\r\n\t\t\tif (!only_timed || this._events[id]._timed)\r\n\t\t\t\tif (this.filter_event(id, this._events[id]))\r\n\t\t\t\t\tstack.push(this._events[id]);\r\n\r\n\treturn stack;\r\n};\r\nscheduler.filter_event = function(id, ev) {\r\n\tvar filter = this[\"filter_\" + this._mode];\r\n\treturn (filter) ? filter(id, ev) : true;\r\n};\r\nscheduler._is_main_area_event = function(ev){\r\n\treturn !!ev._timed;\r\n};\r\nscheduler.render_view_data = function(evs, hold) {\r\n\tvar full = false;\r\n\tif (!evs) {\r\n\t\tfull = true;\r\n\t\tif (this._not_render) {\r\n\t\t\tthis._render_wait = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._render_wait = false;\r\n\r\n\t\tthis.clear_view();\r\n\t\tevs = this.get_visible_events(!(this._table_view || this.config.multi_day));\r\n\t}\r\n\tfor(var i= 0, len = evs.length; i < len; i++){\r\n\t\tthis._recalculate_timed(evs[i]);\r\n\t}\r\n\r\n\tif (this.config.multi_day && !this._table_view) {\r\n\r\n\t\tvar tvs = [];\r\n\t\tvar tvd = [];\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tif (this._is_main_area_event(evs[i]))\r\n\t\t\t\ttvs.push(evs[i]);\r\n\t\t\telse\r\n\t\t\t\ttvd.push(evs[i]);\r\n\t\t}\r\n\r\n\t\tif(!this._els['dhx_multi_day']){\r\n\t\t\tvar message = scheduler._commonErrorMessages.unknownView(this._mode);\r\n\t\t\tthrow new Error(message);\r\n\t\t}\r\n\r\n\t\t// multiday events\r\n\t\tthis._rendered_location = this._els['dhx_multi_day'][0];\r\n\t\tthis._table_view = true;\r\n\t\tthis.render_data(tvd, hold);\r\n\t\tthis._table_view = false;\r\n\r\n\t\t// normal events\r\n\t\tthis._rendered_location = this._els['dhx_cal_data'][0];\r\n\t\tthis._table_view = false;\r\n\t\tthis.render_data(tvs, hold);\r\n\r\n\t} else {\r\n\t\tvar buffer = document.createDocumentFragment();\r\n\t\tvar renderedLocation = this._els['dhx_cal_data'][0];\r\n\t\tthis._rendered_location = buffer;\r\n\t\tthis.render_data(evs, hold);\r\n\t\trenderedLocation.appendChild(buffer);\r\n\t\tthis._rendered_location = renderedLocation;\r\n\r\n\t}\r\n\r\n\tif(full){\r\n\t\tthis.callEvent(\"onDataRender\", []);\r\n\t}\r\n};\r\n\r\n\r\nscheduler._view_month_day = function(e){\r\n\tvar date = scheduler.getActionData(e).date;\r\n\tif(!scheduler.callEvent(\"onViewMoreClick\", [date]))\r\n\t\treturn;\r\n\tscheduler.setCurrentView(date, \"day\");\r\n};\r\n\r\nscheduler._render_month_link = function(ev){\r\n\tvar parent = this._rendered_location;\r\n\tvar toRender = this._lame_clone(ev);\r\n\r\n\t//render links in each cell of multiday events\r\n\tfor(var d = ev._sday; d < ev._eday; d++){\r\n\r\n\t\ttoRender._sday = d;\r\n\t\ttoRender._eday = d+1;\r\n\r\n\t\tvar date = scheduler.date;\r\n\t\tvar curr = scheduler._min_date;\r\n\t\tcurr = date.add(curr, toRender._sweek, \"week\");\r\n\t\tcurr = date.add(curr, toRender._sday, \"day\");\r\n\t\tvar count = scheduler.getEvents(curr, date.add(curr, 1, \"day\")).length;\r\n\r\n\t\tvar pos = this._get_event_bar_pos(toRender);\r\n\t\tvar widt = (pos.x2 - pos.x);\r\n\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tscheduler.event(el, \"click\", function(e){scheduler._view_month_day(e);});\r\n\t\tel.className = \"dhx_month_link\";\r\n\t\tel.style.top = pos.y + \"px\";\r\n\t\tel.style.left = pos.x + \"px\";\r\n\t\tel.style.width = widt + \"px\";\r\n\t\tel.innerHTML = scheduler.templates.month_events_link(curr, count);\r\n\t\tthis._rendered.push(el);\r\n\r\n\t\tparent.appendChild(el);\r\n\t}\r\n};\r\n\r\nscheduler._recalculate_timed = function(id){\r\n\tif(!id) return;\r\n\tvar ev;\r\n\tif(typeof(id) != \"object\")\r\n\t\tev = this._events[id];\r\n\telse\r\n\t\tev = id;\r\n\tif(!ev) return;\r\n\tev._timed = scheduler.isOneDayEvent(ev);\r\n};\r\nscheduler.attachEvent(\"onEventChanged\", scheduler._recalculate_timed);\r\nscheduler.attachEvent(\"onEventAdded\", scheduler._recalculate_timed);\r\n\r\nscheduler.render_data = function(evs, hold) {\r\n\tevs = this._pre_render_events(evs, hold);\r\n\tvar containers = {};\r\n\tfor (var i = 0; i < evs.length; i++)\r\n\t\tif (this._table_view){\r\n\t\t\tif(scheduler._mode != 'month'){\r\n\t\t\t\tthis.render_event_bar(evs[i]);//may be multiday section on other views\r\n\t\t\t}else{\r\n\r\n\t\t\t\tvar max_evs = scheduler.config.max_month_events;\r\n\t\t\t\tif(max_evs !== max_evs*1 || evs[i]._sorder < max_evs){\r\n\t\t\t\t\t//of max number events per month cell is set and event can be rendered\r\n\t\t\t\t\tthis.render_event_bar(evs[i]);\r\n\t\t\t\t}else if(max_evs !== undefined && evs[i]._sorder == max_evs){\r\n\t\t\t\t\t//render 'view more' links\r\n\t\t\t\t\tscheduler._render_month_link(evs[i]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//do not render events with ordinal number > maximum events per cell\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t}else{\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tvar parent = scheduler.locate_holder(ev._sday);\r\n\t\t\tif (!parent) continue; //attempt to render non-visible event\r\n\r\n\t\t\tif(!containers[ev._sday]){\r\n\t\t\t\tcontainers[ev._sday] = {\r\n\t\t\t\t\treal: parent,\r\n\t\t\t\t\tbuffer: document.createDocumentFragment(),\r\n\t\t\t\t\twidth: parent.clientWidth\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\tvar container = containers[ev._sday];\r\n\t\t\tthis.render_event(ev, container.buffer, container.width);\r\n\t\t}\r\n\r\n\t\tfor(var i in containers){\r\n\t\t\tvar container = containers[i];\r\n\t\t\tif(container.real && container.buffer){\r\n\t\t\t\tcontainer.real.appendChild(container.buffer);\r\n\t\t\t}\r\n\t\t}\r\n};\r\n\r\nscheduler._get_first_visible_cell = function(cells) {\r\n\tfor (var i = 0; i < cells.length; i++) {\r\n\t\tif ((cells[i].className || \"\").indexOf(\"dhx_scale_ignore\") == -1) {\r\n\t\t\treturn cells[i];\r\n\t\t}\r\n\t}\r\n\t// if no visible cell found, return cells[0] to be more tolerant, since it's the original logic\r\n\treturn cells[0];\r\n};\r\n\r\nscheduler._pre_render_events = function(evs, hold) {\r\n\tvar hb = this.xy.bar_height;\r\n\tvar h_old = this._colsS.heights;\r\n\tvar h = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0];\r\n\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\r\n\tif (!this._table_view) {\r\n\t\tevs = this._pre_render_events_line(evs, hold); //ignore long events for now\r\n\t}\r\n\telse {\r\n\t\tevs = this._pre_render_events_table(evs, hold);\r\n\t}\r\n\tif (this._table_view) {\r\n\t\tif (hold)\r\n\t\t\tthis._colsS.heights = h_old;\r\n\t\telse {\r\n\t\t\tvar monthRows = data.querySelectorAll(\".dhx_cal_month_row\");\r\n\t\t\tif (monthRows.length) {\r\n\t\t\t\tfor (var i = 0; i < monthRows.length; i++) {\r\n\t\t\t\t\th[i]++;\r\n\t\t\t\t\tvar cells = monthRows[i].querySelectorAll(\".dhx_cal_month_cell\");\r\n\t\t\t\t\tvar cellHeight = this._colsS.height - this.xy.month_head_height;\r\n\t\t\t\t\tif ((h[i]) * hb > cellHeight) { // 22 - height of cell's header\r\n\t\t\t\t\t\t//we have overflow, update heights\r\n\r\n\t\t\t\t\t\tvar cHeight = cellHeight;\r\n\t\t\t\t\t\tif(this.config.max_month_events*1 !== this.config.max_month_events || h[i] <= this.config.max_month_events){\r\n\t\t\t\t\t\t\tcHeight = h[i] * hb;\r\n\t\t\t\t\t\t}else if( (this.config.max_month_events + 1) * hb > cellHeight){\r\n\t\t\t\t\t\t\tcHeight = (this.config.max_month_events + 1) * hb;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tmonthRows[i].style.height = (cHeight + this.xy.month_head_height) + \"px\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\th[i] = (h[i - 1] || 0) + scheduler._get_first_visible_cell(cells).offsetHeight;\r\n\t\t\t\t}\r\n\t\t\t\th.unshift(0);\r\n\t\t\t\tconst dataArea = this.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tif (dataArea.offsetHeight < dataArea.scrollHeight && !scheduler._colsS.scroll_fix && scheduler.xy.scroll_width) {\r\n\r\n\t\t\t\t\tvar scale_settings = scheduler._colsS,\r\n\t\t\t\t\t\tsum_width = scale_settings[scale_settings.col_length],\r\n\t\t\t\t\t\trow_heights = scale_settings.heights.slice();\r\n\r\n\t\t\t\t\tsum_width -= (scheduler.xy.scroll_width || 0);\r\n\t\t\t\t\tthis._calc_scale_sizes(sum_width, this._min_date, this._max_date);\r\n\t\t\t\t\tscheduler._colsS.heights = row_heights;\r\n\r\n\t\t\t\t\tthis.set_xy(this._els[\"dhx_cal_header\"][0], sum_width/*, this.xy.scale_height*/);\r\n\t\t\t\t\tscheduler._render_scales(this._els[\"dhx_cal_header\"][0]);\r\n\t\t\t\t\tscheduler._render_month_scale(this._els[\"dhx_cal_data\"][0], this._get_timeunit_start(), this._min_date);\r\n\r\n\t\t\t\t\tscale_settings.scroll_fix = true;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (!evs.length && this._els[\"dhx_multi_day\"][0].style.visibility == \"visible\")\r\n\t\t\t\t\th[0] = -1;\r\n\t\t\t\tif (evs.length || h[0] == -1) {\r\n\t\t\t\t\t//shift days to have space for multiday events\r\n\t\t\t\t\t//var childs = evl.parentNode.childNodes;\r\n\r\n\t\t\t\t\t// +1 so multiday events would have 2px from top and 2px from bottom by default\r\n\t\t\t\t\tvar full_multi_day_height = (h[0] + 1) * hb + 4;\r\n\r\n\t\t\t\t\tvar used_multi_day_height = full_multi_day_height;\r\n\t\t\t\t\tvar used_multi_day_height_css = full_multi_day_height + \"px\";\r\n\t\t\t\t\tif (this.config.multi_day_height_limit) {\r\n\t\t\t\t\t\tused_multi_day_height = Math.min(full_multi_day_height, this.config.multi_day_height_limit) ;\r\n\t\t\t\t\t\tused_multi_day_height_css = used_multi_day_height + \"px\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar multi_day_section = this._els[\"dhx_multi_day\"][0];\r\n\t\t\t\t\tmulti_day_section.style.height = used_multi_day_height_css;\r\n\t\t\t\t\tmulti_day_section.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\tmulti_day_section.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\r\n\t\t\t\t\t// icon\r\n\t\t\t\t\tvar multi_day_icon = this._els[\"dhx_multi_day\"][1];\r\n\t\t\t\t\tmulti_day_icon.style.height = used_multi_day_height_css;\r\n\t\t\t\t\tmulti_day_icon.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\tmulti_day_icon.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\t\t\t\t\tmulti_day_icon.className = h[0] ? \"dhx_multi_day_icon\" : \"dhx_multi_day_icon_small\";\r\n\t\t\t\t\tthis._dy_shift = (h[0] + 1) * hb;\r\n\t\t\t\t\tif(this.config.multi_day_height_limit){\r\n\t\t\t\t\t\tthis._dy_shift = Math.min(this.config.multi_day_height_limit, this._dy_shift);\r\n\t\t\t\t\t}\r\n\t\t\t\t\th[0] = 0;\r\n\r\n\t\t\t\t\tif (used_multi_day_height != full_multi_day_height) {\r\n\r\n\t\t\t\t\t\tmulti_day_section.style.overflowY = \"auto\";\r\n\t\t\t\t\t//\tmulti_day_section.style.width = (parseInt(this._els[\"dhx_cal_navline\"][0].style.width)) + \"px\";\r\n\r\n\t\t\t\t\t\tmulti_day_icon.style.position = \"fixed\";\r\n\t\t\t\t\t\tmulti_day_icon.style.top = \"\";\r\n\t\t\t\t\t\tmulti_day_icon.style.left = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn evs;\r\n};\r\nscheduler._get_event_sday = function(ev) {\r\n\t// get day in current view\r\n\t// use rounding for 23 or 25 hour days on DST\r\n\tvar datePart = this.date.day_start(new Date(ev.start_date));\r\n\treturn Math.round((datePart.valueOf() - this._min_date.valueOf()) / (24 * 60 * 60 * 1000));\r\n};\r\nscheduler._get_event_mapped_end_date = function(ev) {\r\n\tvar end_date = ev.end_date;\r\n\tif (this.config.separate_short_events) {\r\n\t\tvar ev_duration = (ev.end_date - ev.start_date) / 60000; // minutes\r\n\t\tif (ev_duration < this._min_mapped_duration) {\r\n\t\t\tend_date = this.date.add(end_date, this._min_mapped_duration - ev_duration, \"minute\");\r\n\t\t}\r\n\t}\r\n\treturn end_date;\r\n};\r\nscheduler._pre_render_events_line = function(evs, hold){\r\n\tevs.sort(function(a, b) {\r\n\t\tif (a.start_date.valueOf() == b.start_date.valueOf())\r\n\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\treturn a.start_date > b.start_date ? 1 : -1;\r\n\t});\r\n\tvar days = []; //events by weeks\r\n\tvar evs_originals = [];\r\n\r\n\tthis._min_mapped_duration = Math.floor(this.xy.min_event_height * 60 / this.config.hour_size_px); // values could change along the way\r\n\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tvar ev = evs[i];\r\n\r\n\t\t//check date overflow\r\n\t\tvar sd = ev.start_date;\r\n\t\tvar ed = ev.end_date;\r\n\t\t//check scale overflow\r\n\t\tvar sh = sd.getHours();\r\n\t\tvar eh = ed.getHours();\r\n\t\tev._sday = this._get_event_sday(ev); // sday based on event start_date\r\n\t\tif (this._ignores[ev._sday]){\r\n\t\t\t//ignore event\r\n\t\t\tevs.splice(i,1);\r\n\t\t\ti--;\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tif (!days[ev._sday]) days[ev._sday] = [];\r\n\r\n\t\tif (!hold) {\r\n\t\t\tev._inner = false;\r\n\r\n\t\t\tvar stack = days[ev._sday];\r\n\r\n\t\t\twhile (stack.length) {\r\n\t\t\t\tvar t_ev = stack[stack.length - 1];\r\n\t\t\t\tvar t_end_date = this._get_event_mapped_end_date(t_ev);\r\n\t\t\t\tif (t_end_date.valueOf() <= ev.start_date.valueOf()) {\r\n\t\t\t\t\tstack.splice(stack.length - 1, 1);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar slot_index = stack.length;\r\n\t\t\tvar sorderSet = false;\r\n\t\t\tfor (var j = 0; j < stack.length; j++) {\r\n\t\t\t\tvar t_ev = stack[j];\r\n\t\t\t\tvar t_end_date = this._get_event_mapped_end_date(t_ev);\r\n\t\t\t\tif (t_end_date.valueOf() <= ev.start_date.valueOf()) {\r\n\t\t\t\t\tsorderSet = true;\r\n\t\t\t\t\tev._sorder = t_ev._sorder;\r\n\t\t\t\t\tslot_index = j;\r\n\t\t\t\t\tev._inner = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (stack.length)\r\n\t\t\t\tstack[stack.length - 1]._inner = true;\r\n\r\n\t\t\tif (!sorderSet) {\r\n\t\t\t\tif (stack.length) {\r\n\t\t\t\t\tif (stack.length <= stack[stack.length - 1]._sorder) {\r\n\t\t\t\t\t\tif (!stack[stack.length - 1]._sorder)\r\n\t\t\t\t\t\t\tev._sorder = 0;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tfor (j = 0; j < stack.length; j++) {\r\n\t\t\t\t\t\t\t\tvar _is_sorder = false;\r\n\t\t\t\t\t\t\t\tfor (var k = 0; k < stack.length; k++) {\r\n\t\t\t\t\t\t\t\t\tif (stack[k]._sorder == j) {\r\n\t\t\t\t\t\t\t\t\t\t_is_sorder = true;\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (!_is_sorder) {\r\n\t\t\t\t\t\t\t\t\tev._sorder = j;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\tev._inner = true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvar _max_sorder = stack[0]._sorder;\r\n\t\t\t\t\t\tfor (j = 1; j < stack.length; j++) {\r\n\t\t\t\t\t\t\tif (stack[j]._sorder > _max_sorder)\r\n\t\t\t\t\t\t\t\t_max_sorder = stack[j]._sorder;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tev._sorder = _max_sorder + 1;\r\n\t\t\t\t\t\tev._inner = false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else\r\n\t\t\t\t\tev._sorder = 0;\r\n\t\t\t}\r\n\r\n\t\t\tstack.splice(slot_index, slot_index == stack.length ? 0 : 1, ev);\r\n\r\n\t\t\tif (stack.length > (stack.max_count || 0)) {\r\n\t\t\t\tstack.max_count = stack.length;\r\n\t\t\t\tev._count = stack.length;\r\n\t\t\t} else {\r\n\t\t\t\tev._count = (ev._count) ? ev._count : 1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (sh < this.config.first_hour || eh >= this.config.last_hour) {\r\n\t\t\t// Need to create copy of event as we will be changing it's start/end date\r\n\t\t\t// e.g. first_hour = 11 and event.start_date hours = 9. Need to preserve that info\r\n\t\t\tevs_originals.push(ev);\r\n\t\t\tevs[i] = ev = this._copy_event(ev);\r\n\r\n\t\t\tif (sh < this.config.first_hour) {\r\n\t\t\t\tev.start_date.setHours(this.config.first_hour);\r\n\t\t\t\tev.start_date.setMinutes(0);\r\n\t\t\t}\r\n\t\t\tif (eh >= this.config.last_hour) {\r\n\t\t\t\tev.end_date.setMinutes(0);\r\n\t\t\t\tev.end_date.setHours(this.config.last_hour);\r\n\t\t\t}\r\n\r\n\t\t\tif (ev.start_date > ev.end_date || sh == this.config.last_hour) {\r\n\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (!hold) {\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tevs[i]._count = days[evs[i]._sday].max_count;\r\n\t\t}\r\n\t\tfor (var i = 0; i < evs_originals.length; i++)\r\n\t\t\tevs_originals[i]._count = days[evs_originals[i]._sday].max_count;\r\n\t}\r\n\r\n\treturn evs;\r\n};\r\nscheduler._time_order = function(evs) {\r\n\tevs.sort(function(a, b) {\r\n\t\tif (a.start_date.valueOf() == b.start_date.valueOf()) {\r\n\t\t\tif (a._timed && !b._timed) return 1;\r\n\t\t\tif (!a._timed && b._timed) return -1;\r\n\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\t}\r\n\t\treturn a.start_date > b.start_date ? 1 : -1;\r\n\t});\r\n};\r\n\r\nscheduler._is_any_multiday_cell_visible = function(from, to, event){\r\n\tvar cols = this._cols.length;\r\n\tvar isAnyCellVisible = false;\r\n\tvar checkDate = from;\r\n\tvar noCells = true;\r\n\tvar lastDayEnd = new Date(to);\r\n\tif(scheduler.date.day_start(new Date(to)).valueOf() != to.valueOf()){\r\n\t\tlastDayEnd = scheduler.date.day_start(lastDayEnd);\r\n\t\tlastDayEnd = scheduler.date.add(lastDayEnd, 1, \"day\");\r\n\t}\r\n\twhile(checkDate < lastDayEnd){\r\n\t\tnoCells = false;\r\n\t\tvar cellIndex = this.locate_holder_day(checkDate, false, event);\r\n\t\tvar weekCellIndex = cellIndex % cols;\r\n\t\tif(!this._ignores[weekCellIndex]){\r\n\t\t\tisAnyCellVisible = true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcheckDate = scheduler.date.add(checkDate, 1, \"day\");\r\n\t}\r\n\treturn noCells || isAnyCellVisible;\r\n};\r\n\r\nscheduler._pre_render_events_table = function(evs, hold) { // max - max height of week slot\r\n\tthis._time_order(evs);\r\n\tvar out = [];\r\n\tvar weeks = [\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[]\r\n\t]; //events by weeks\r\n\tvar max = this._colsS.heights;\r\n\tvar start_date;\r\n\tvar cols = this._cols.length;\r\n\tvar chunks_info = {};\r\n\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tvar ev = evs[i];\r\n\t\tvar id = ev.id;\r\n\t\tif (!chunks_info[id]) {\r\n\t\t\tchunks_info[id] = {\r\n\t\t\t\tfirst_chunk: true,\r\n\t\t\t\tlast_chunk: true\r\n\t\t\t};\r\n\t\t}\r\n\t\tvar chunk_info = chunks_info[id];\r\n\t\tvar sd = (start_date || ev.start_date);\r\n\t\tvar ed = ev.end_date;\r\n\t\t//trim events which are crossing through current view\r\n\t\tif (sd < this._min_date) {\r\n\t\t\tchunk_info.first_chunk = false;\r\n\t\t\tsd = this._min_date;\r\n\t\t}\r\n\t\tif (ed > this._max_date) {\r\n\t\t\tchunk_info.last_chunk = false;\r\n\t\t\ted = this._max_date;\r\n\t\t}\r\n\r\n\t\tvar locate_s = this.locate_holder_day(sd, false, ev);\r\n\t\tev._sday = locate_s % cols;\r\n\t\t//skip single day events for ignored dates\r\n\t\tif (this._ignores[ev._sday] && ev._timed) continue;\r\n\r\n\t\tvar locate_e = this.locate_holder_day(ed, true, ev) || cols;\r\n\t\tev._eday = (locate_e % cols) || cols; //cols used to fill full week, when event end on monday\r\n\t\tev._length = locate_e - locate_s;\r\n\t\t//3600000 - compensate 1 hour during winter|summer time shift\r\n\t\tev._sweek = Math.floor((this._correct_shift(sd.valueOf(), 1) - this._min_date.valueOf()) / (60 * 60 * 1000 * 24 * cols));\r\n\r\n\t\tvar isAnyCellVisible = scheduler._is_any_multiday_cell_visible(sd, ed, ev);\r\n\r\n\t\tif(!isAnyCellVisible){\r\n\t\t\tstart_date = null;\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\t//current slot\r\n\t\tvar stack = weeks[ev._sweek];\r\n\t\t//check order position\r\n\t\tvar stack_line;\r\n\r\n\t\tfor (stack_line = 0; stack_line < stack.length; stack_line++)\r\n\t\t\tif (stack[stack_line]._eday <= ev._sday)\r\n\t\t\t\tbreak;\r\n\r\n\t\tif (!ev._sorder || !hold) {\r\n\t\t\tev._sorder = stack_line;\r\n\t\t}\r\n\r\n\t\tif (ev._sday + ev._length <= cols) {\r\n\t\t\tstart_date = null;\r\n\t\t\tout.push(ev);\r\n\t\t\tstack[stack_line] = ev;\r\n\t\t\t//get max height of slot\r\n\t\t\tmax[ev._sweek] = stack.length - 1;\r\n\t\t\tev._first_chunk = chunk_info.first_chunk;\r\n\t\t\tev._last_chunk = chunk_info.last_chunk;\r\n\t\t} else { // split long event in chunks\r\n\t\t\tvar copy = this._copy_event(ev);\r\n\t\t\tcopy.id = ev.id;\r\n\t\t\tcopy._length = cols - ev._sday;\r\n\t\t\tcopy._eday = cols;\r\n\t\t\tcopy._sday = ev._sday;\r\n\t\t\tcopy._sweek = ev._sweek;\r\n\t\t\tcopy._sorder = ev._sorder;\r\n\t\t\tcopy.end_date = this.date.add(sd, copy._length, \"day\");\r\n\t\t\tcopy._first_chunk = chunk_info.first_chunk;\r\n\t\t\tif (chunk_info.first_chunk) {\r\n\t\t\t\tchunk_info.first_chunk = false;\r\n\t\t\t}\r\n\r\n\t\t\tout.push(copy);\r\n\t\t\tstack[stack_line] = copy;\r\n\t\t\tstart_date = copy.end_date;\r\n\t\t\t//get max height of slot\r\n\t\t\tmax[ev._sweek] = stack.length - 1;\r\n\t\t\ti--;\r\n\t\t\tcontinue; //repeat same step\r\n\t\t}\r\n\t}\r\n\treturn out;\r\n};\r\nscheduler._copy_dummy = function() {\r\n\tvar a = new Date(this.start_date);\r\n\tvar b = new Date(this.end_date);\r\n\tthis.start_date = a;\r\n\tthis.end_date = b;\r\n};\r\nscheduler._copy_event = function(ev) {\r\n\tthis._copy_dummy.prototype = ev;\r\n\treturn new this._copy_dummy();\r\n\t//return {start_date:ev.start_date, end_date:ev.end_date, text:ev.text, id:ev.id}\r\n};\r\nscheduler._rendered = [];\r\nscheduler.clear_view = function() {\r\n\tfor (var i = 0; i < this._rendered.length; i++) {\r\n\t\tvar obj = this._rendered[i];\r\n\t\tif (obj.parentNode) obj.parentNode.removeChild(obj);\r\n\t}\r\n\tthis._rendered = [];\r\n};\r\nscheduler.updateEvent = function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tthis.clear_event(id);\r\n\r\n\tif (ev && this.is_visible_events(ev) && this.filter_event(id, ev) && (this._table_view || this.config.multi_day || ev._timed)) {\r\n\t\tif (this.config.update_render){\r\n\t\t\tthis.render_view_data();\r\n\t\t}else{\r\n\t\t\tif(this.getState().mode == \"month\" && !this.getState().drag_id && !this.isOneDayEvent(ev)){\r\n\t\t\t\tthis.render_view_data();\r\n\t\t\t}else{\r\n\t\t\t\tthis.render_view_data([ev], true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.clear_event = function(id) {\r\n\tthis.for_rendered(id, function(node, i) {\r\n\t\tif (node.parentNode)\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\tscheduler._rendered.splice(i, 1);\r\n\t});\r\n};\r\nscheduler._y_from_date = function(date){\r\n\tvar sm = date.getHours() * 60 + date.getMinutes();\r\n\treturn ((Math.round((sm * 60 * 1000 - this.config.first_hour * 60 * 60 * 1000) * this.config.hour_size_px / (60 * 60 * 1000))) % (this.config.hour_size_px * 24)); //42px/hour\r\n};\r\nscheduler._calc_event_y = function(ev, min_height){\r\n\tmin_height = min_height || 0;\r\n\tvar sm = ev.start_date.getHours() * 60 + ev.start_date.getMinutes();\r\n\tvar em = (ev.end_date.getHours() * 60 + ev.end_date.getMinutes()) || (scheduler.config.last_hour * 60);\r\n\tvar top = this._y_from_date(ev.start_date);\r\n\r\n\tvar height = Math.max(min_height, (em - sm) * this.config.hour_size_px / 60); //42px/hour\r\n\treturn {\r\n\t\ttop: top,\r\n\t\theight: height\r\n\t};\r\n};\r\nscheduler.render_event = function(ev, buffer, parentWidth) {\r\n\tvar menu = scheduler.xy.menu_width;\r\n\tvar menu_offset = (this.config.use_select_menu_space) ? 0 : menu;\r\n\tif (ev._sday < 0) return; //can occur in case of recurring event during time shift\r\n\r\n\tvar parent = scheduler.locate_holder(ev._sday);\r\n\tif (!parent) return; //attempt to render non-visible event\r\n\r\n\tbuffer = buffer || parent;\r\n\r\n\tvar pos_y = this._calc_event_y(ev, scheduler.xy.min_event_height);\r\n\tvar top = pos_y.top,\r\n\t\theight = pos_y.height;\r\n\r\n\tvar ev_count = ev._count || 1;\r\n\tvar ev_sorder = ev._sorder || 0;\r\n\r\n\tparentWidth = parentWidth || parent.clientWidth;\r\n\tif(this.config.day_column_padding){\r\n\t\tparentWidth -= this.config.day_column_padding;\r\n\t}\r\n\r\n\tvar width = Math.floor((parentWidth - menu_offset) / ev_count);\r\n\tvar left = ev_sorder * width + 1;\r\n\tif (!ev._inner) width = width * (ev_count - ev_sorder);\r\n\tif (this.config.cascade_event_display) {\r\n\t\tvar limit = this.config.cascade_event_count;\r\n\t\tvar margin = this.config.cascade_event_margin;\r\n\t\tleft = ev_sorder % limit * margin;\r\n\t\tvar right = (ev._inner) ? (ev_count - ev_sorder - 1) % limit * margin / 2 : 0;\r\n\t\twidth = Math.floor(parentWidth - menu_offset - left - right);\r\n\t}\r\n\r\n\tif(height < 30){\r\n\t\tev._mode = \"smallest\";\r\n\t}else if(height < 42){\r\n\t\tev._mode = \"small\";\r\n\t}else{\r\n\t\tev._mode = null;\r\n\t}\r\n\r\n\tvar d = this._render_v_bar(ev, menu_offset + left, top, width, height, ev._text_style, scheduler.templates.event_header(ev.start_date, ev.end_date, ev), scheduler.templates.event_text(ev.start_date, ev.end_date, ev));\r\n\t\r\n\tif(ev._mode === \"smallest\"){\r\n\t\td.classList.add(\"dhx_cal_event--xsmall\");\r\n\t}else if (ev._mode === \"small\"){\r\n\t\td.classList.add(\"dhx_cal_event--small\");\r\n\t}\r\n\r\n\tthis._waiAria.eventAttr(ev, d);\r\n\tthis._rendered.push(d);\r\n\tbuffer.appendChild(d);\r\n\r\n\tvar parentPosition = parseInt( this.config.rtl ? parent.style.right : parent.style.left, 10);\r\n\r\n\tleft = left + parentPosition + menu_offset;\r\n\r\n\tif (this._edit_id == ev.id) {\r\n\r\n\t\td.style.zIndex = 1; //fix overlapping issue\r\n\t\twidth = Math.max(width, scheduler.xy.editor_width);\r\n\t\td = document.createElement(\"div\");\r\n\t\td.setAttribute(\"event_id\", ev.id); // for backward compatibility\r\n\t\td.setAttribute(this.config.event_attribute, ev.id);\r\n\r\n\t\tthis._waiAria.eventAttr(ev, d);\r\n\r\n\t\td.className = \"dhx_cal_event dhx_cal_editor\";\r\n\t\tif (this.config.rtl) left++;\r\n\t\tthis.set_xy(d, width, height, left, top);\r\n\r\n\r\n\t\tif(ev.color){\r\n\t\t\td.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tvar tplClass = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\r\n\t\tif(tplClass){\r\n\t\t\td.className += \" \" + tplClass;\r\n\t\t}\r\n\t\tvar d2 = document.createElement(\"div\");\r\n\t\td2.style.cssText += \"overflow:hidden;height:100%\";\r\n\r\n\t\td.appendChild(d2);\r\n\t\tthis._els[\"dhx_cal_data\"][0].appendChild(d);\r\n\t\tthis._rendered.push(d);\r\n\r\n\t\td2.innerHTML = \"\";\r\n\t\tthis._editor = d2.querySelector(\"textarea\");\r\n\t\t\r\n\t\tscheduler.event(this._editor, \"keydown\", function(e) {\r\n\t\t\tif (e.shiftKey) return true;\r\n\t\t\tvar code = e.keyCode;\r\n\t\t\tif (code == scheduler.keys.edit_save) scheduler.editStop(true);\r\n\t\t\tif (code == scheduler.keys.edit_cancel) scheduler.editStop(false);\r\n\r\n\t\t\tif(code == scheduler.keys.edit_save || code == scheduler.keys.edit_cancel){\r\n\t\t\t\tif(e.preventDefault) e.preventDefault();\r\n\t\t\t}\r\n\t\t});\r\n\t\tscheduler.event(this._editor, \"selectstart\", function (e) {\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn true;\r\n\t\t});\r\n\t\tscheduler._focus(this._editor, true);\r\n\t\t//IE and opera can add x-scroll during focusing\r\n\t\tthis._els[\"dhx_cal_data\"][0].scrollLeft = 0;\r\n\t}\r\n\tif (this.xy.menu_width !== 0 && this._select_id == ev.id) {\r\n\r\n\t\tif (this.config.cascade_event_display && this._drag_mode)\r\n\t\t\td.style.zIndex = 1; //fix overlapping issue for cascade view in case of dnd of selected event\r\n\t\tvar icons = this.config[\"icons_\" + ((this._edit_id == ev.id) ? \"edit\" : \"select\")];\r\n\t\tvar icons_str = \"\";\r\n\r\n\t\tvar ariaAttr;\r\n\r\n\t\tfor (var i = 0; i < icons.length; i++) {\r\n\t\t\tconst currentIcon = icons[i];\r\n\t\t\tariaAttr = this._waiAria.eventMenuAttrString(currentIcon);\r\n\t\t\ticons_str += `
`;\r\n\t\t}\r\n\t\tvar obj = this._render_v_bar(ev, left - menu - 1, top, menu, null, \"\", \"
\", icons_str, true);\r\n\r\n\t\tif(ev.color){\r\n\t\t\tobj.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tobj.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\t//obj.style.left = left - menu + 1;\r\n\t\tthis._els[\"dhx_cal_data\"][0].appendChild(obj);\r\n\t\tthis._rendered.push(obj);\r\n\t}\r\n\tif(this.config.drag_highlight && this._drag_id == ev.id){\r\n\t\tthis.highlightEventPosition(ev);\r\n\t}\r\n};\r\nscheduler._render_v_bar = function (ev, x, y, w, h, style, contentA, contentB, bottom) {\r\n\tvar d = document.createElement(\"div\");\r\n\tvar id = ev.id;\r\n\tvar cs = (bottom) ? \"dhx_cal_event dhx_cal_select_menu\" : \"dhx_cal_event\";\r\n\r\n\tvar state = scheduler.getState();\r\n\tif(state.drag_id == ev.id){\r\n\t\tcs += \" dhx_cal_event_drag\";\r\n\t}\r\n\r\n\tif(state.select_id == ev.id){\r\n\t\tcs += \" dhx_cal_event_selected\";\r\n\t}\r\n\r\n\tvar cse = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\tif (cse) cs = cs + \" \" + cse;\r\n\r\n\tif(this.config.cascade_event_display) {\r\n\t\tcs += \" dhx_cal_event_cascade\";\r\n\t}\r\n\r\n\tvar boxWidth = w - 1;\r\n\tvar html = `
\r\n\t\t\t\t
`;\r\n\r\n\td.innerHTML = html;\r\n\r\n\tvar container = d.cloneNode(true).firstChild;\r\n\r\n\tif (!bottom && scheduler.renderEvent(container, ev, w, h, contentA, contentB)) {\r\n\t\tif(ev.color){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\treturn container;\r\n\t} else {\r\n\t\tcontainer = d.firstChild;\r\n\t\tif(ev.color){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\tvar inner_html = '
 
';\r\n\t\tinner_html += '
' + contentA + '
';\r\n\t\tinner_html += '
' + contentB + '
'; // +2 css specific, moved from render_event\r\n\r\n\t\tvar footer_class = \"dhx_event_resize dhx_footer\";\r\n\t\tif (bottom || ev._drag_resize === false)\r\n\t\t\tfooter_class = \"dhx_resize_denied \" + footer_class;\r\n\r\n\t\tinner_html += '
';\r\n\r\n\t\tcontainer.innerHTML = inner_html;\r\n\t}\r\n\r\n\treturn container;\r\n};\r\nscheduler.renderEvent = function(){\r\n\treturn false;\r\n};\r\nscheduler.locate_holder = function(day) {\r\n\tif (this._mode == \"day\") return this._els[\"dhx_cal_data\"][0].firstChild; //dirty\r\n\treturn this._els[\"dhx_cal_data\"][0].childNodes[day];\r\n};\r\nscheduler.locate_holder_day = function(date, past) {\r\n\tvar day = Math.floor((this._correct_shift(date, 1) - this._min_date) / (60 * 60 * 24 * 1000));\r\n\t//when locating end data of event , we need to use next day if time part was defined\r\n\tif (past && this.date.time_part(date)) day++;\r\n\treturn day;\r\n};\r\n\r\n\r\n\r\nscheduler._get_dnd_order = function(order, ev_height, max_height){\r\n\tif(!this._drag_event)\r\n\t\treturn order;\r\n\tif(!this._drag_event._orig_sorder)\r\n\t\tthis._drag_event._orig_sorder = order;\r\n\telse\r\n\t\torder = this._drag_event._orig_sorder;\r\n\r\n\tvar evTop = ev_height * order;\r\n\twhile((evTop + ev_height) > max_height){\r\n\t\torder--;\r\n\t\tevTop -= ev_height;\r\n\t}\r\n\torder = Math.max(order, 0);\r\n\treturn order;\r\n};\r\n//scheduler._get_event_bar_pos = function(sday, eday, week, drag){\r\nscheduler._get_event_bar_pos = function(ev){\r\n\tvar rtl = this.config.rtl;\r\n\tvar columns = this._colsS;\r\n\tvar x = columns[ev._sday];\r\n\tvar x2 = columns[ev._eday];\r\n\tif (rtl) {\r\n\t\tx = columns[columns.col_length] - columns[ev._eday] + columns[0];\r\n\t\tx2 = columns[columns.col_length] - columns[ev._sday] + columns[0];\r\n\t}\r\n\r\n\tif (x2 == x) x2 = columns[ev._eday + 1];\r\n\tvar hb = this.xy.bar_height;\r\n\r\n\tvar order = ev._sorder;\r\n\tif(ev.id == this._drag_id){\r\n\t\tvar cellHeight = columns.heights[ev._sweek + 1] - columns.heights[ev._sweek]- this.xy.month_head_height;//22 for month head height\r\n\t\torder = scheduler._get_dnd_order(order, hb, cellHeight);\r\n\t}\r\n\tvar y_event_offset = order * hb;\r\n\tvar y = columns.heights[ev._sweek] + (columns.height ? (this.xy.month_scale_height + 2) : 2 ) + y_event_offset;\r\n\treturn {x:x, x2:x2, y:y};\r\n};\r\n\r\nscheduler.render_event_bar = function (ev) {\r\n\tvar parent = this._rendered_location;\r\n\tvar pos = this._get_event_bar_pos(ev);\r\n\tvar y = pos.y;\r\n\tvar x = pos.x;\r\n\tvar x2 = pos.x2;\r\n\t// resize for month mutliday events\r\n\tvar resize_handle = \"\";\r\n\r\n\t//events in ignored dates\r\n\r\n\tif (!x2) return;\r\n\r\n\tvar resizable = scheduler.config.resize_month_events && this._mode == \"month\" &&\r\n\t\t(!ev._timed || scheduler.config.resize_month_timed);\r\n\r\n\tvar d = document.createElement(\"div\");\r\n\tvar left_chunk = (ev.hasOwnProperty(\"_first_chunk\") && ev._first_chunk),\r\n\t\tright_chunk = (ev.hasOwnProperty(\"_last_chunk\") && ev._last_chunk);\r\n\r\n\tvar resize_left = resizable && (ev._timed || left_chunk);\r\n\tvar resize_right = resizable && (ev._timed || right_chunk);\r\n\r\n\tvar timed = true;\r\n\tvar cs = \"dhx_cal_event_clear\";\r\n\tif (!ev._timed || resizable) {\r\n\t\ttimed = false;\r\n\t\tcs = \"dhx_cal_event_line\";\r\n\t}\r\n\tif(left_chunk){\r\n\t\tcs += \" dhx_cal_event_line_start\";\r\n\t}\r\n\tif(right_chunk){\r\n\t\tcs += \" dhx_cal_event_line_end\";\r\n\t}\r\n\tif(resize_left){\r\n\t\tresize_handle += \"
\";\r\n\t}\r\n\tif(resize_right){\r\n\t\tresize_handle += \"
\";\r\n\t}\r\n\r\n\tvar cse = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\tif (cse){\r\n\t\tcs += \" \" + cse;\r\n\t}\r\n\r\n\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\tvar style_text = [\r\n\t\t\"position:absolute\",\r\n\t\t\"top:\" + y + \"px\",\r\n\t\t\"left:\" + x + \"px\",\r\n\t\t\"width:\" + (x2 - x - (timed ? 1 : 0)) + \"px\",\r\n\t\t\"height:\" + (this.xy.bar_height - 2) + \"px\",\r\n\t\tcolor,\r\n\t\tbg_color,\r\n\t\t(ev._text_style || \"\")\r\n\t].join(\";\");\r\n\r\n\tvar html = \"
\";\r\n\tif (resizable) {\r\n\t\thtml += resize_handle;\r\n\t}\r\n\tif(scheduler.getState().mode == \"month\"){\r\n\t\tev = scheduler.getEvent(ev.id); // ev at this point could be a part (row in a month view) of a larger event\r\n\t}\r\n\r\n\tif (ev._timed){\r\n\t\thtml += `${scheduler.templates.event_bar_date(ev.start_date, ev.end_date, ev)}`;\r\n\t}\r\n\r\n\thtml += \"
\";\r\n\thtml += scheduler.templates.event_bar_text(ev.start_date, ev.end_date, ev) + '
';\r\n\thtml += \"
\";\r\n\thtml += '
';\r\n\r\n\td.innerHTML = html;\r\n\r\n\tthis._rendered.push(d.firstChild);\r\n\tparent.appendChild(d.firstChild);\r\n};\r\n\r\nscheduler._locate_event = function(node) {\r\n\tvar id = null;\r\n\twhile (node && !id && node.getAttribute) {\r\n\t\tid = node.getAttribute(this.config.event_attribute);\r\n\t\tnode = node.parentNode;\r\n\t}\r\n\treturn id;\r\n};\r\n\r\nscheduler.edit = function(id) {\r\n\tif (this._edit_id == id) return;\r\n\tthis.editStop(false, id);\r\n\tthis._edit_id = id;\r\n\tthis.updateEvent(id);\r\n};\r\nscheduler.editStop = function(mode, id) {\r\n\tif (id && this._edit_id == id) return;\r\n\tvar ev = this.getEvent(this._edit_id);\r\n\tif (ev) {\r\n\t\tif (mode) ev.text = this._editor.value;\r\n\t\tthis._edit_id = null;\r\n\t\tthis._editor = null;\r\n\t\tthis.updateEvent(ev.id);\r\n\t\tthis._edit_stop_event(ev, mode);\r\n\t}\r\n};\r\nscheduler._edit_stop_event = function(ev, mode) {\r\n\tif (this._new_event) {\r\n\t\tif (!mode) {\r\n\t\t\tif (ev) // in case of custom lightbox user can already delete event\r\n\t\t\t\tthis.deleteEvent(ev.id, true);\r\n\t\t} else {\r\n\t\t\tthis.callEvent(\"onEventAdded\", [ev.id, ev]);\r\n\t\t}\r\n\t\tthis._new_event = null;\r\n\t} else {\r\n\t\tif (mode){\r\n\t\t\tthis.callEvent(\"onEventChanged\", [ev.id, ev]);\r\n\t\t}\r\n\t}\r\n};\r\n\r\nscheduler.getEvents = function(from, to) {\r\n\tvar result = [];\r\n\tfor (var a in this._events) {\r\n\t\tvar ev = this._events[a];\r\n\t\tif (ev && ( (!from && !to) || (ev.start_date < to && ev.end_date > from) ))\r\n\t\t\tresult.push(ev);\r\n\t}\r\n\treturn result;\r\n};\r\nscheduler.getRenderedEvent = function(id) {\r\n\tif (!id)\r\n\t\treturn;\r\n\tvar rendered_events = scheduler._rendered;\r\n\tfor (var i=0; i -1){\r\n\t\t\t\t\tsection = section.split(scheduler.config.section_delimiter)[0];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar top = timeline.getSectionTop(section);\r\n\t\t\tvar left = timeline.posFromDate(event.start_date);\r\n\t\t\tvar container = scheduler.$container.querySelector(\".dhx_timeline_data_wrapper\");\r\n\t\t\tleft = left - (container.offsetWidth - timeline.dx) / 2;\r\n\t\t\ttop = top - container.offsetHeight / 2 + timeline.dy/2;\r\n\r\n\t\t\tif (timeline._smartRenderingEnabled()) {\r\n\t\t\t\tvar handlerId = timeline.attachEvent(\"onScroll\", function(){\r\n\t\t\t\t\trestoreOriginalColors();\r\n\t\t\t\t\ttimeline.detachEvent(handlerId);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\ttimeline.scrollTo({\r\n\t\t\t\tleft: left,\r\n\t\t\t\ttop: top\r\n\t\t\t});\r\n\t\t\tif (!timeline._smartRenderingEnabled()) {\r\n\t\t\t\trestoreOriginalColors();\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\trestoreOriginalColors();\r\n\t}\r\n\r\n\tscheduler.callEvent(\"onAfterEventDisplay\", [ev, mode]);\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._append_drag_marker = function(m){\r\n\tif(m.parentNode) return;\r\n\tvar zone = scheduler._els[\"dhx_cal_data\"][0];\r\n\r\n\tvar scale = zone.lastChild;\r\n\tvar className = scheduler._getClassName(scale);\r\n\tif(className.indexOf(\"dhx_scale_holder\") < 0 && scale.previousSibling){\r\n\t\tscale = scale.previousSibling;\r\n\t}\r\n\r\n\tclassName = scheduler._getClassName(scale);\r\n\tif (scale && className.indexOf(\"dhx_scale_holder\") === 0) {\r\n\t\tscale.appendChild(m);\r\n\t}\r\n};\r\n\r\nscheduler._update_marker_position = function(m, event){\r\n\tvar size = scheduler._calc_event_y(event, 0);\r\n\tm.style.top = size.top + \"px\";\r\n\tm.style.height = size.height + \"px\";\r\n};\r\n\r\nscheduler.highlightEventPosition = function(event){\r\n\tvar m = document.createElement(\"div\");\r\n\r\n\tm.setAttribute(\"event_id\", event.id); // for backward compatibility\r\n\tm.setAttribute(this.config.event_attribute, event.id);\r\n\tthis._rendered.push(m);\r\n\tthis._update_marker_position(m, event);\r\n\r\n\tvar css = this.templates.drag_marker_class(event.start_date, event.end_date, event);\r\n\tvar html = this.templates.drag_marker_content(event.start_date, event.end_date, event);\r\n\tm.className = \"dhx_drag_marker\";\r\n\tif(css)\r\n\t\tm.className += \" \" + css;\r\n\tif(html)\r\n\t\tm.innerHTML = html;\r\n\tthis._append_drag_marker(m);\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._parsers.xml = {\r\n\tcanParse: function(data, xhr){\r\n\t\t// IE returns non-empty responseXML type regardless of actual data type\r\n\t\tif(xhr.responseXML && xhr.responseXML.firstChild){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\ttry{\r\n\t\t\tvar xmlDoc = scheduler.ajax.parse(xhr.responseText);\r\n\t\t\tvar topElement = scheduler.ajax.xmltop(\"data\", xmlDoc);\r\n\t\t\tif(topElement && topElement.tagName === \"data\"){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}catch (e){\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\tparse: function(loader) {\r\n\t\tvar xml;\r\n\r\n\t\tif (!loader.xmlDoc.responseXML) { //from a string\r\n\t\t\tloader.xmlDoc.responseXML = scheduler.ajax.parse(loader.xmlDoc.responseText);\r\n\t\t}\r\n\t\r\n\t\txml = scheduler.ajax.xmltop(\"data\", loader.xmlDoc);\r\n\t\tif (xml.tagName != \"data\") return null;//not an xml\r\n\t\tvar csrfToken = xml.getAttribute(\"dhx_security\");\r\n\t\tif (csrfToken) {\r\n\t\t\tif (window.dhtmlx) {\r\n\t\t\t\twindow.dhtmlx.security_key = csrfToken;\r\n\t\t\t}\r\n\t\t\tscheduler.security_key = csrfToken;\r\n\t\t}\r\n\t\r\n\t\tvar opts = scheduler.ajax.xpath(\"//coll_options\", loader.xmlDoc);\r\n\t\tfor (var i = 0; i < opts.length; i++) {\r\n\t\t\tvar bind = opts[i].getAttribute(\"for\");\r\n\t\t\tvar arr = scheduler.serverList[bind];\r\n\t\t\tif (!arr) {\r\n\t\t\t\tscheduler.serverList[bind] = arr = [];\r\n\t\t\t}\r\n\t\t\tarr.splice(0, arr.length);\t//clear old options\r\n\t\t\tvar itms = scheduler.ajax.xpath(\".//item\", opts[i]);\r\n\t\t\tfor (var j = 0; j < itms.length; j++) {\r\n\t\t\t\tvar itm = itms[j];\r\n\t\t\t\tvar attrs = itm.attributes;\r\n\t\t\t\tvar obj = { key: itms[j].getAttribute(\"value\"), label: itms[j].getAttribute(\"label\")};\r\n\t\t\t\tfor (var k = 0; k < attrs.length; k++) {\r\n\t\t\t\t\tvar attr = attrs[k];\r\n\t\t\t\t\tif (attr.nodeName == \"value\" || attr.nodeName == \"label\")\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\tobj[attr.nodeName] = attr.nodeValue;\r\n\t\t\t\t}\r\n\t\t\t\tarr.push(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (opts.length)\r\n\t\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\t\r\n\t\tvar ud = scheduler.ajax.xpath(\"//userdata\", loader.xmlDoc);\r\n\t\tfor (var i = 0; i < ud.length; i++) {\r\n\t\t\tvar udx = scheduler._xmlNodeToJSON(ud[i]);\r\n\t\t\tscheduler._userdata[udx.name] = udx.text;\r\n\t\t}\r\n\t\r\n\t\tvar evs = [];\r\n\t\txml = scheduler.ajax.xpath(\"//event\", loader.xmlDoc);\r\n\t\r\n\t\tfor (var i = 0; i < xml.length; i++) {\r\n\t\t\tvar ev = evs[i] = scheduler._xmlNodeToJSON(xml[i]);\r\n\t\t\tscheduler._init_event(ev);\r\n\t\t}\r\n\t\treturn evs;\r\n\t}\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler.json = scheduler._parsers.json = {\r\n\tcanParse: function(data){\r\n\t\tif(data && typeof data === \"object\"){\r\n\t\t\treturn true;\r\n\t\t} else if(typeof data === \"string\"){\r\n\t\t\ttry {\r\n\t\t\t\tvar result = JSON.parse(data);\r\n\t\t\t\treturn Object.prototype.toString.call(result) === '[object Object]' || \r\n\t\t\t\t\t\tObject.prototype.toString.call(result) === '[object Array]';\r\n\t\t\t} catch (err) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\tparse: function(data) {\r\n\t\tvar events = [];\r\n\r\n\t\tif (typeof data == \"string\") {\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\t\tif (Object.prototype.toString.call(data) === '[object Array]') {\r\n\t\t\tevents = data;\r\n\t\t} else {\r\n\t\t\tif(data){\r\n\t\t\t\tif(data.events){\r\n\t\t\t\t\tevents = data.events;\r\n\t\t\t\t}else if(data.data){\r\n\t\t\t\t\tevents = data.data;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tevents = events || [];\r\n\r\n\t\tif (data.dhx_security) {\r\n\t\t\tif (window.dhtmlx) {\r\n\t\t\t\twindow.dhtmlx.security_key = data.dhx_security;\r\n\t\t\t}\r\n\t\t\tscheduler.security_key = data.dhx_security;\r\n\t\t}\r\n\r\n\t\tvar collections = (data && data.collections) ? data.collections : {};\r\n\t\tvar collections_loaded = false;\r\n\t\tfor (var key in collections) {\r\n\t\t\tif (collections.hasOwnProperty(key)) {\r\n\t\t\t\tcollections_loaded = true;\r\n\t\t\t\tvar collection = collections[key];\r\n\t\t\t\tvar arr = scheduler.serverList[key];\r\n\t\t\t\tif (!arr) {\r\n\t\t\t\t\tscheduler.serverList[key] = arr = [];\r\n\t\t\t\t}\r\n\t\t\t\tarr.splice(0, arr.length); //clear old options\r\n\t\t\t\tfor (var j = 0; j < collection.length; j++) {\r\n\t\t\t\t\tvar option = collection[j];\r\n\t\t\t\t\tvar obj = { key: option.value, label: option.label }; // resulting option object\r\n\t\t\t\t\tfor (var option_key in option) {\r\n\t\t\t\t\t\tif (option.hasOwnProperty(option_key)) {\r\n\t\t\t\t\t\t\tif (option_key == \"value\" || option_key == \"label\")\r\n\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\tobj[option_key] = option[option_key]; // obj['value'] = option['value']\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tarr.push(obj);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (collections_loaded)\r\n\t\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\r\n\t\tvar evs = [];\r\n\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\tvar event = events[i];\r\n\t\t\tscheduler._init_event(event);\r\n\t\t\tevs.push(event);\r\n\t\t}\r\n\t\treturn evs;\r\n\t}\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler.ical = scheduler._parsers.ical = {\r\n\tcanParse: function(data){\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\treturn new RegExp(\"^BEGIN:VCALENDAR\").test(data);\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n\tparse:function(str){\r\n\t\tvar data = str.match(RegExp(this.c_start+\"[^\\f]*\"+this.c_end,\"\"));\r\n\t\tif (!data.length) return;\r\n\r\n\t\t// mpl: handle bad unfolding\r\n\t\tdata[0]=data[0].replace(/[\\r\\n]+ /g,\"\");\r\n\r\n\t\t//unfolding \r\n\t\tdata[0]=data[0].replace(/[\\r\\n]+(?=[a-z \\t])/g,\" \");\r\n\t\t//drop property\r\n\t\tdata[0]=data[0].replace(/;[^:\\r\\n]*:/g,\":\");\r\n\t\t\r\n\t\t\r\n\t\tvar incoming=[];\r\n\t\tvar match;\r\n\t\tvar event_r = RegExp(\"(?:\"+this.e_start+\")([^\\f]*?)(?:\"+this.e_end+\")\",\"g\");\r\n\t\twhile ((match=event_r.exec(data)) !== null){\r\n\t\t\tvar e={};\r\n\t\t\tvar param;\r\n\t\t\tvar param_r = /[^\\r\\n]+[\\r\\n]+/g;\r\n\t\t\twhile ((param=param_r.exec(match[1])) !== null)\r\n\t\t\t\tthis.parse_param(param.toString(),e);\r\n\t\t\tif (e.uid && !e.id) e.id = e.uid; //fallback to UID, when ID is not defined\r\n\t\t\tincoming.push(e);\t\r\n\t\t}\r\n\t\treturn incoming;\r\n\t},\r\n\tparse_param:function(str,obj){\r\n\t\tvar d = str.indexOf(\":\"); \r\n\t\t\tif (d==-1) return;\r\n\t\t\r\n\t\tvar name = str.substr(0,d).toLowerCase();\r\n\t\tvar value = str.substr(d+1).replace(/\\\\,/g,\",\").replace(/[\\r\\n]+$/,\"\");\r\n\t\tif (name==\"summary\")\r\n\t\t\tname=\"text\";\r\n\t\telse if (name==\"dtstart\"){\r\n\t\t\tname = \"start_date\";\r\n\t\t\tvalue = this.parse_date(value,0,0);\r\n\t\t}\r\n\t\telse if (name==\"dtend\"){\r\n\t\t\tname = \"end_date\";\r\n\t\t\tvalue = this.parse_date(value,0,0);\r\n\t\t}\r\n\t\tobj[name]=value;\r\n\t},\r\n\tparse_date:function(value,dh,dm){\r\n\t\tvar t = value.split(\"T\");\r\n\r\n\t\tvar utcMark = false;\r\n\t\tif (t[1]){\r\n\t\t\tdh=t[1].substr(0,2);\r\n\t\t\tdm=t[1].substr(2,2);\r\n\t\t\tutcMark = !!(t[1][6] == \"Z\");\r\n\t\t}\r\n\t\tvar dy = t[0].substr(0,4);\r\n\t\tvar dn = parseInt(t[0].substr(4,2),10)-1;\r\n\t\tvar dd = t[0].substr(6,2);\r\n\r\n\t\tif(scheduler.config.server_utc || utcMark){\r\n\t\t\treturn new Date(Date.UTC(dy,dn,dd,dh,dm)) ;\r\n\t\t}else{\r\n\t\t\treturn new Date(dy,dn,dd,dh,dm);\r\n\t\t}\r\n\t},\r\n\tc_start:\"BEGIN:VCALENDAR\",\r\n\te_start:\"BEGIN:VEVENT\",\r\n\te_end:\"END:VEVENT\",\r\n\tc_end:\"END:VCALENDAR\"\t\r\n};\r\n\r\n}","export default function(scheduler){\r\n\treturn (function(){\r\n\t\tvar res = {};\r\n\t\tfor (var a in this._events){\r\n\t\t\tvar ev = this._events[a];\r\n\t\t\tif (ev.id.toString().indexOf(\"#\") == -1){\r\n\t\t\t\tres[ev.id] = ev;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t}).bind(scheduler);\r\n}","import xmlLoaded from \"./loaders/xml\";\r\nimport jsonLoader from \"./loaders/json\";\r\nimport iCalLoader from \"./loaders/ical\";\r\nimport createSerializator from \"../core/common/get_serializable_events\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler._loaded = {};\r\nscheduler._load = function(url, from) {\r\n\turl = url || this._load_url;\r\n\r\n\tif(!url){\r\n\t\t//if scheduler.setLoadMode is called before scheduler.init, initial rendering will invoke data loading while url is undefined\r\n\t\treturn;\r\n\t}\r\n\r\n\turl += (url.indexOf(\"?\") == -1 ? \"?\" : \"&\") + \"timeshift=\" + (new Date()).getTimezoneOffset();\r\n\tif (this.config.prevent_cache) url += \"&uid=\" + this.uid();\r\n\tvar to;\r\n\tfrom = from || this._date;\r\n\tfunction ajaxCallback(response) {\r\n\t\tscheduler.on_load(response);\r\n\t\tscheduler.callEvent(\"onLoadEnd\", []);\r\n\t}\r\n\tif (this._load_mode) {\r\n\t\tvar lf = this.templates.load_format;\r\n\r\n\t\tfrom = this.date[this._load_mode + \"_start\"](new Date(from.valueOf()));\r\n\t\twhile (from > this._min_date) from = this.date.add(from, -1, this._load_mode);\r\n\t\tto = from;\r\n\r\n\t\tvar cache_line = true;\r\n\t\twhile (to < this._max_date) {\r\n\t\t\tto = this.date.add(to, 1, this._load_mode);\r\n\t\t\tif (this._loaded[lf(from)] && cache_line)\r\n\t\t\t\tfrom = this.date.add(from, 1, this._load_mode); else cache_line = false;\r\n\t\t}\r\n\r\n\t\tvar temp_to = to;\r\n\t\tdo {\r\n\t\t\tto = temp_to;\r\n\t\t\ttemp_to = this.date.add(to, -1, this._load_mode);\r\n\t\t} while (temp_to > from && this._loaded[lf(temp_to)]);\r\n\r\n\t\tif (to <= from)\r\n\t\t\treturn false; //already loaded\r\n\r\n\t\tscheduler.ajax.get(url + \"&from=\" + lf(from) + \"&to=\" + lf(to), ajaxCallback);\r\n\r\n\t\twhile (from < to) {\r\n\t\t\tthis._loaded[lf(from)] = true;\r\n\t\t\tfrom = this.date.add(from, 1, this._load_mode);\r\n\t\t}\r\n\t} else {\r\n\t\tscheduler.ajax.get(url, ajaxCallback);\r\n\t}\r\n\r\n\t// TODO: remove onXLS\r\n\tthis.callEvent(\"onXLS\", []);\r\n\tthis.callEvent(\"onLoadStart\", []);\r\n\treturn true;\r\n};\r\n\r\nscheduler._parsers = {};\r\n\r\n\r\nxmlLoaded(scheduler);\r\njsonLoader(scheduler);\r\niCalLoader(scheduler);\r\n\r\nscheduler.on_load = function (loader) {\r\n\tthis.callEvent(\"onBeforeParse\", []);\r\n\r\n\tvar evs;\r\n\tvar error = false;\r\n\r\n\tvar foundParser = false;\r\n\tfor(var i in this._parsers){\r\n\t\tvar parser = this._parsers[i];\r\n\t\tif(parser.canParse(loader.xmlDoc.responseText, loader.xmlDoc)){\r\n\t\t\ttry{\r\n\t\t\t\tvar param = loader.xmlDoc.responseText;\r\n\t\t\t\tif(i === \"xml\"){\r\n\t\t\t\t\tparam = loader;\r\n\t\t\t\t}\r\n\t\t\t\tevs = parser.parse(param);\r\n\t\t\t\tif(!evs){\r\n\t\t\t\t\terror = true;\r\n\t\t\t\t}\r\n\t\t\t}catch(e){\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\t\t\tfoundParser = true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif(!foundParser){\r\n\t\tif(this._process && this[this._process]){\r\n\t\t\ttry{\r\n\t\t\t\tevs = this[this._process].parse(loader.xmlDoc.responseText);\r\n\t\t\t}catch (e){\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\terror = true;\r\n\t\t}\r\n\t}\r\n\r\n\tif(error || (loader.xmlDoc.status && loader.xmlDoc.status >= 400)){\r\n\t\tthis.callEvent(\"onLoadError\", [loader.xmlDoc]);\r\n\t\tevs = [];\r\n\t}\r\n\r\n\tthis._process_loading(evs);\r\n\r\n\t// TODO: remove onXLE\r\n\tthis.callEvent(\"onXLE\", []);\r\n\tthis.callEvent(\"onParse\", []);\r\n};\r\nscheduler._process_loading = function(evs) {\r\n\tthis._loading = true;\r\n\tthis._not_render = true;\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tif (!this.callEvent(\"onEventLoading\", [evs[i]])) continue;\r\n\t\tthis.addEvent(evs[i]);\r\n\t}\r\n\tthis._not_render = false;\r\n\tif (this._render_wait) this.render_view_data();\r\n\r\n\tthis._loading = false;\r\n\tif (this._after_call) this._after_call();\r\n\tthis._after_call = null;\r\n};\r\nscheduler._init_event = function(event) {\r\n\tevent.text = (event.text || event._tagvalue) || \"\";\r\n\tevent.start_date = scheduler._init_date(event.start_date);\r\n\tevent.end_date = scheduler._init_date(event.end_date);\r\n};\r\n\r\nscheduler._init_date = function(date){\r\n\tif(!date)\r\n\t\treturn null;\r\n\tif (typeof date == \"string\") {\r\n\t\treturn scheduler._helpers.parseDate(date);\r\n\t}\r\n\telse return new Date(date);\r\n};\r\n\r\nconst getSerializableData = createSerializator(scheduler);\r\nscheduler.serialize = function(){\r\n\tconst dataset = [];\r\n\tconst allEvents = getSerializableData();\r\n\tfor (var a in allEvents){\r\n\t\t\r\n\t\tconst exportedEvent = {};\r\n\t\tvar ev = allEvents[a];\r\n\r\n\t\tfor(var key in ev){\r\n\t\t\tif (key.charAt(0) == \"$\" || key.charAt(0) == \"_\"){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tlet exportValue;\r\n\t\t\tconst rawValue = ev[key];\r\n\t\t\tif(scheduler.utils.isDate(rawValue)){\r\n\t\t\t\texportValue = scheduler.defined(scheduler.templates.xml_format) ? scheduler.templates.xml_format(rawValue) : scheduler.templates.format_date(rawValue);\r\n\t\t\t}else{\r\n\t\t\t\texportValue = rawValue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\texportedEvent[key] = exportValue;\r\n\t\t}\r\n\r\n\t\tdataset.push(exportedEvent);\r\n\t}\r\n\treturn dataset;\r\n};\r\n\r\n/*\r\nscheduler.json = {};\r\nscheduler.json.parse = function(data) {\r\n\r\n\tvar events = [];\r\n\r\n\tif (typeof data == \"string\") {\r\n\t\tdata = JSON.parse(data);\r\n\t}\r\n\tif (Object.prototype.toString.call(data) === '[object Array]') {\r\n\t\tevents = data;\r\n\t} else {\r\n\t\tif(data){\r\n\t\t\tif(data.events){\r\n\t\t\t\tevents = data.events;\r\n\t\t\t}else if(data.data){\r\n\t\t\t\tevents = data.data;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tevents = events || [];\r\n\r\n\tif (data.dhx_security) {\r\n\t\tif (window.dhtmlx) {\r\n\t\t\twindow.dhtmlx.security_key = data.dhx_security;\r\n\t\t}\r\n\t\tscheduler.security_key = data.dhx_security;\r\n\t}\r\n\r\n\tvar collections = (data && data.collections) ? data.collections : {};\r\n\tvar collections_loaded = false;\r\n\tfor (var key in collections) {\r\n\t\tif (collections.hasOwnProperty(key)) {\r\n\t\t\tcollections_loaded = true;\r\n\t\t\tvar collection = collections[key];\r\n\t\t\tvar arr = scheduler.serverList[key];\r\n\t\t\tif (!arr) {\r\n\t\t\t\tscheduler.serverList[key] = arr = [];\r\n\t\t\t}\r\n\t\t\tarr.splice(0, arr.length); //clear old options\r\n\t\t\tfor (var j = 0; j < collection.length; j++) {\r\n\t\t\t\tvar option = collection[j];\r\n\t\t\t\tvar obj = { key: option.value, label: option.label }; // resulting option object\r\n\t\t\t\tfor (var option_key in option) {\r\n\t\t\t\t\tif (option.hasOwnProperty(option_key)) {\r\n\t\t\t\t\t\tif (option_key == \"value\" || option_key == \"label\")\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\tobj[option_key] = option[option_key]; // obj['value'] = option['value']\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tarr.push(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (collections_loaded)\r\n\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\r\n\tvar evs = [];\r\n\tfor (var i = 0; i < events.length; i++) {\r\n\t\tvar event = events[i];\r\n\t\tscheduler._init_event(event);\r\n\t\tevs.push(event);\r\n\t}\r\n\treturn evs;\r\n};*/\r\nscheduler.parse = function(data, type) {\r\n\tthis._process = type;\r\n\tthis.on_load({xmlDoc: {responseText: data}});\r\n};\r\nscheduler.load = function(url, call) {\r\n\tif (typeof call == \"string\") {\r\n\t\tthis._process = call;\r\n\t\tcall = arguments[2];\r\n\t}\r\n\r\n\tthis._load_url = url;\r\n\tthis._after_call = call;\r\n\tthis._load(url, this._date);\r\n};\r\n//possible values - day,week,month,year,all\r\nscheduler.setLoadMode = function(mode) {\r\n\tif (mode == \"all\") mode = \"\";\r\n\tthis._load_mode = mode;\r\n};\r\n\r\nscheduler.serverList = function(name, array) {\r\n\tif (array) {\r\n\t\tthis.serverList[name] = array.slice(0);\r\n\t\treturn this.serverList[name];\r\n\t}\r\n\tthis.serverList[name] = (this.serverList[name] || []);\r\n\treturn this.serverList[name];\r\n};\r\nscheduler._userdata = {};\r\n\r\nscheduler._xmlNodeToJSON = function(node) {\r\n\tvar t = {};\r\n\tfor (var i = 0; i < node.attributes.length; i++)\r\n\t\tt[node.attributes[i].name] = node.attributes[i].value;\r\n\r\n\tfor (var i = 0; i < node.childNodes.length; i++) {\r\n\t\tvar child = node.childNodes[i];\r\n\t\tif (child.nodeType == 1)\r\n\t\t\tt[child.tagName] = child.firstChild ? child.firstChild.nodeValue : \"\";\r\n\t}\r\n\r\n\tif (!t.text) t.text = node.firstChild ? node.firstChild.nodeValue : \"\";\r\n\r\n\treturn t;\r\n};\r\nscheduler.attachEvent(\"onXLS\", function() {\r\n\tif (this.config.show_loading === true) {\r\n\t\tvar t;\r\n\t\tt = this.config.show_loading = document.createElement(\"div\");\r\n\t\tt.className = 'dhx_loading';\r\n\t\tt.style.left = Math.round((this._x - 128) / 2) + \"px\";\r\n\t\tt.style.top = Math.round((this._y - 15) / 2) + \"px\";\r\n\t\tthis._obj.appendChild(t);\r\n\t}\r\n});\r\nscheduler.attachEvent(\"onXLE\", function() {\r\n\tvar t = this.config.show_loading;\r\n\tif (t && typeof t == \"object\") {\r\n\t\tif(t.parentNode) {\r\n\t\t\tt.parentNode.removeChild(t);\r\n\t\t}\r\n\t\tthis.config.show_loading = true;\r\n\t}\r\n});\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler._lightbox_controls = {};\r\nscheduler.formSection = function(name){\r\n\tvar config = this.config.lightbox.sections;\r\n\tvar i = 0;\r\n\tfor (i; i < config.length; i++) {\r\n\t\tif (config[i].name == name) {\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif (i === config.length) {\r\n\t\t// GS-1662 section not found, should exit here instead of throwing an error\r\n\t\treturn null;\r\n\t}\r\n\r\n\tvar section = config[i];\r\n\tif (!scheduler._lightbox) {\r\n\t\tscheduler.getLightbox();\r\n\t}\r\n\tvar header = scheduler._lightbox.querySelector(`#${section.id}`);\r\n\tvar node = header.nextSibling;\r\n\r\n\tvar result = {\r\n\t\tsection: section,\r\n\t\theader: header,\r\n\t\tnode: node,\r\n\t\tgetValue:function(ev){\r\n\t\t\treturn scheduler.form_blocks[section.type].get_value(node, (ev||{}), section);\r\n\t\t},\r\n\t\tsetValue:function(value, ev){\r\n\t\t\treturn scheduler.form_blocks[section.type].set_value(node, value, (ev||{}), section);\r\n\t\t}\r\n\t};\r\n\r\n\tvar handler = scheduler._lightbox_controls[\"get_\"+section.type+\"_control\"];\r\n\treturn handler?handler(result):result;\r\n};\r\nscheduler._lightbox_controls.get_template_control = function(result) {\r\n\tresult.control = result.node;\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_select_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('select')[0];\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_textarea_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('textarea')[0];\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_time_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('select'); // array\r\n\treturn result;\r\n};\r\n\r\nscheduler._lightbox_controls.defaults = {\r\n\ttemplate: {\r\n\t\theight:30\r\n\t},\r\n\ttextarea: {\r\n\t\theight: 200\r\n\t},\r\n\tselect: {\r\n\t\theight: 23\r\n\t},\r\n\ttime: {\r\n\t\theight: 20\r\n\t}\r\n};\r\n\r\n\r\nscheduler.form_blocks={\r\n\ttemplate:{\r\n\t\trender: function(sns){\r\n\t\t\treturn \"
\";\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,config){\r\n\t\t\tnode.innerHTML = value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev,config){\r\n\t\t\treturn node.innerHTML||\"\";\r\n\t\t},\r\n\t\tfocus: function(node){\r\n\t\t}\r\n\t},\r\n\ttextarea:{\r\n\t\trender:function(sns){\r\n\t\t\tconst placeholder = sns.placeholder ? `placeholder='${sns.placeholder}'` : \"\";\r\n\t\t\treturn `
`;\r\n\t\t},\r\n\t\tset_value:function(node,value,ev){\r\n\t\t\tscheduler.form_blocks.textarea._get_input(node).value=value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev){\r\n\t\t\treturn scheduler.form_blocks.textarea._get_input(node).value;\r\n\t\t},\r\n\t\tfocus:function(node){\r\n\t\t\tvar a = scheduler.form_blocks.textarea._get_input(node);\r\n\t\t\tscheduler._focus(a, true);\r\n\t\t},\r\n\t\t_get_input: function(node){\r\n\t\t\treturn node.getElementsByTagName(\"textarea\")[0];\r\n\t\t}\r\n\t},\r\n\tselect:{\r\n\t\trender:function(sns){\r\n\t\t\t//var defaults = scheduler._lightbox_controls.defaults.select;\r\n\t\t\tvar html=\"
\";\r\n\t\t\treturn html;\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,sns){\r\n\t\t\tvar select = node.firstChild;\r\n\t\t\tif (!select._dhx_onchange && sns.onchange) {\r\n\t\t\t\tscheduler.event(select, \"change\", sns.onchange);\r\n\t\t\t\tselect._dhx_onchange = true;\r\n\t\t\t}\r\n\t\t\tif (typeof value == \"undefined\")\r\n\t\t\t\tvalue = (select.options[0]||{}).value;\r\n\t\t\tselect.value=value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev){\r\n\t\t\treturn node.firstChild.value;\r\n\t\t},\r\n\t\tfocus:function(node){\r\n\t\t\tvar a=node.firstChild; scheduler._focus(a, true);\r\n\t\t}\r\n\t},\r\n\ttime:{\r\n\t\trender:function(sns) {\r\n\t\t\tif (!sns.time_format) {\r\n\t\t\t\t// default order\r\n\t\t\t\tsns.time_format = [\"%H:%i\", \"%d\", \"%m\", \"%Y\"];\r\n\t\t\t}\r\n\t\t\t// map: default order => real one\r\n\t\t\tsns._time_format_order = {};\r\n\t\t\tvar time_format = sns.time_format;\r\n\r\n\t\t\tvar cfg = scheduler.config;\r\n\t\t\tvar dt = scheduler.date.date_part(scheduler._currentDate());\r\n\t\t\tvar last = 24*60, first = 0;\r\n\t\t\tif(scheduler.config.limit_time_select){\r\n\t\t\t\tlast = 60*cfg.last_hour+1;\r\n\t\t\t\tfirst = 60*cfg.first_hour;\r\n\t\t\t\tdt.setHours(cfg.first_hour);\r\n\t\t\t}\r\n\t\t\tvar html = \"\";\r\n\r\n\t\t\tfor (var p = 0; p < time_format.length; p++) {\r\n\t\t\t\tvar time_option = time_format[p];\r\n\r\n\t\t\t\t// adding spaces between selects\r\n\t\t\t\tif (p > 0) {\r\n\t\t\t\t\thtml += \" \";\r\n\t\t\t\t}\r\n\t\t\t\tvar selectBoxClass = \"\";\r\n\t\t\t\tvar options = \"\";\r\n\t\t\t\tswitch (time_option) {\r\n\t\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_year_select\";\r\n\t\t\t\t\t\tsns._time_format_order[3] = p;\r\n\t\t\t\t\t\t//year\r\n\t\t\t\t\t\tvar range;\r\n\t\t\t\t\t\tvar start_year;\r\n\t\t\t\t\t\tvar end_year;\r\n\t\t\t\t\t\tif(sns.year_range){\r\n\t\t\t\t\t\t\tif (!isNaN(sns.year_range)) {\r\n\t\t\t\t\t\t\t\trange = sns.year_range;\r\n\t\t\t\t\t\t\t} else if (sns.year_range.push) {\r\n\t\t\t\t\t\t\t\t// if\r\n\t\t\t\t\t\t\t\tstart_year = sns.year_range[0];\r\n\t\t\t\t\t\t\t\tend_year = sns.year_range[1];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\trange = range || 10;\r\n\t\t\t\t\t\tvar offset = offset || Math.floor(range / 2);\r\n\t\t\t\t\t\tstart_year = start_year || dt.getFullYear() - offset;\r\n\t\t\t\t\t\tend_year = end_year || start_year + range;\r\n\r\n\t\t\t\t\t\tfor (var i = start_year; i < end_year; i++)\r\n\t\t\t\t\t\t\toptions += \"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%m\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_month_select\";\r\n\t\t\t\t\t\tsns._time_format_order[2] = p;\r\n\t\t\t\t\t\t//month\r\n\t\t\t\t\t\tfor (var i=0; i < 12; i++)\r\n\t\t\t\t\t\t\toptions+=\"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%d\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_day_select\";\r\n\t\t\t\t\t\tsns._time_format_order[1] = p;\r\n\t\t\t\t\t\t//days\r\n\t\t\t\t\t\tfor (var i=1; i < 32; i++)\r\n\t\t\t\t\t\t\toptions+=\"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%H:%i\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_time_select\";\r\n\t\t\t\t\t\tsns._time_format_order[0] = p;\r\n\t\t\t\t\t\t//hours\r\n\t\t\t\t\t\tvar i = first;\r\n\t\t\t\t\t\tvar tdate = dt.getDate();\r\n\t\t\t\t\t\tsns._time_values = [];\r\n\r\n\t\t\t\t\t\twhile(i\"+time+\"\";\r\n\t\t\t\t\t\t\tsns._time_values.push(i);\r\n\t\t\t\t\t\t\tdt.setTime(dt.valueOf()+this.config.time_step*60*1000);\r\n\t\t\t\t\t\t\tvar diff = (dt.getDate()!=tdate)?1:0; // moved or not to the next day\r\n\t\t\t\t\t\t\ti=diff*24*60+dt.getHours()*60+dt.getMinutes();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(options){\r\n\r\n\t\t\t\t\tvar ariaAttrs = scheduler._waiAria.lightboxSelectAttrString(time_option);\r\n\t\t\t\t\tvar readonly = sns.readonly ? \"disabled='disabled'\" : \"\";\r\n\t\t\t\t\thtml += \" \";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//var defaults = scheduler._lightbox_controls.defaults.select;\r\n\r\n\t\t\treturn \"
\"+html+\"  –  \"+html+\"
\";\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,config){\r\n\t\t\tvar cfg = scheduler.config;\r\n\t\t\tvar s=node.getElementsByTagName(\"select\");\r\n\t\t\tvar map = config._time_format_order;\r\n\t\t\tvar start_date, end_date;\r\n\r\n\t\t\tif(cfg.full_day) {\r\n\t\t\t\tif (!node._full_day){\r\n\t\t\t\t\tvar html = \"\";\r\n\t\t\t\t\tif (!scheduler.config.wide_form)\r\n\t\t\t\t\t\thtml = node.previousSibling.innerHTML+html;\r\n\t\t\t\t\tnode.previousSibling.innerHTML=html;\r\n\t\t\t\t\tnode._full_day=true;\r\n\t\t\t\t}\r\n\t\t\t\tvar input=node.previousSibling.getElementsByTagName(\"input\")[0];\r\n\t\t\t\tinput.checked = (scheduler.date.time_part(ev.start_date)===0 && scheduler.date.time_part(ev.end_date)===0);\r\n\r\n\t\t\t\ts[map[0]].disabled=input.checked;\r\n\t\t\t\ts[ map[0] + s.length/2 ].disabled=input.checked;\r\n\r\n\t\t\t\tif(!input.$_eventAttached){\r\n\t\t\t\t\tinput.$_eventAttached = true;\r\n\r\n\t\t\t\t\t\tscheduler.event(input, \"click\", function(){\r\n\t\t\t\t\t\tif(input.checked) {\r\n\t\t\t\t\t\t\tvar obj = {};\r\n\t\t\t\t\t\t\tscheduler.form_blocks.time.get_value(node,obj,config);\r\n\r\n\t\t\t\t\t\t\tstart_date = scheduler.date.date_part(obj.start_date);\r\n\t\t\t\t\t\t\tend_date = scheduler.date.date_part(obj.end_date);\r\n\r\n\t\t\t\t\t\t\tif (+end_date == +start_date || (+end_date >= +start_date && (ev.end_date.getHours() !== 0 || ev.end_date.getMinutes() !== 0)))\r\n\t\t\t\t\t\t\t\tend_date = scheduler.date.add(end_date, 1, \"day\");\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tstart_date = null;\r\n\t\t\t\t\t\t\tend_date = null;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\ts[map[0]].disabled=input.checked;\r\n\t\t\t\t\t\ts[ map[0] + s.length/2 ].disabled=input.checked;\r\n\r\n\t\t\t\t\t\t_fill_lightbox_select(s,0,start_date||ev.start_date);\r\n\t\t\t\t\t\t_fill_lightbox_select(s,4,end_date||ev.end_date);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(cfg.auto_end_date && cfg.event_duration) {\r\n\t\t\t\tvar _update_lightbox_select = function () {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (!(cfg.auto_end_date && cfg.event_duration)){\r\n\t\t\t\t\t\t// setting may be disabled after the handler is attached\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstart_date = new Date(s[map[3]].value,s[map[2]].value,s[map[1]].value,0,s[map[0]].value);\r\n\t\t\t\t\tend_date = new Date(start_date.getTime() + (scheduler.config.event_duration * 60 * 1000));\r\n\t\t\t\t\t_fill_lightbox_select(s, 4, end_date);\r\n\t\t\t\t};\r\n\t\t\t\tfor(var i=0; i<4; i++) {\r\n\t\t\t\t\tif(!s[i].$_eventAttached) {\r\n\t\t\t\t\t\ts[i].$_eventAttached = true;\r\n\t\t\t\t\t\tscheduler.event(s[i], \"change\", _update_lightbox_select);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction _fill_lightbox_select(s,i,d) {\r\n\t\t\t\tvar time_values = config._time_values;\r\n\t\t\t\tvar direct_value = d.getHours()*60+d.getMinutes();\r\n\t\t\t\tvar fixed_value = direct_value;\r\n\t\t\t\tvar value_found = false;\r\n\t\t\t\tfor (var k=0; k\";\r\n\t\tvar ariaAttr = \"\";\r\n\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\tariaAttr = this._waiAria.lightboxButtonAttrString(buttons[i]);\r\n\t\t\thtml += \"
\" + scheduler.locale.labels[buttons[i]] + \"
\";\r\n\t\t}\r\n\r\n\t\tbuttons = this.config.buttons_right;\r\n\t\tvar rtl = scheduler.config.rtl;\r\n\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\tariaAttr = this._waiAria.lightboxButtonAttrString(buttons[i]);\r\n\r\n\t\t\thtml += \"
\";\r\n\r\n\t\t\thtml += \"
\" + scheduler.locale.labels[buttons[i]] + \"
\";\r\n\t\t}\r\n\t\thtml += \"
\";\r\n\t\thtml+=\"
\";\r\n\t\td.innerHTML=html;\r\n\t\tif (scheduler.config.drag_lightbox){\r\n\t\t\tscheduler.event(d.firstChild, \"mousedown\", scheduler._ready_to_dnd);\r\n\t\t\tscheduler.event(d.firstChild, \"selectstart\", function(e){ \r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn false; \r\n\t\t\t});\r\n\t\t\td.firstChild.style.cursor = \"move\";\r\n\t\t\tscheduler._init_dnd_events();\r\n\r\n\t\t}\r\n\r\n\t\tthis._waiAria.lightboxAttr(d);\r\n\r\n\t\tthis.show_cover();\r\n\t\tthis._cover.insertBefore(d,this._cover.firstChild);\r\n\t\t\r\n\t\tthis._lightbox=d;\r\n\r\n\t\tvar sns=this.config.lightbox.sections;\r\n\t\thtml=\"\";\r\n\t\tfor (var i=0; i < sns.length; i++) {\r\n\t\t\tvar block=this.form_blocks[sns[i].type];\r\n\t\t\tif (!block) continue; //ignore incorrect blocks\r\n\t\t\tsns[i].id=\"area_\"+this.uid();\r\n\t\t\tvar button = \"\";\r\n\t\t\tif (sns[i].button){\r\n\t\t\t\tvar ariaAttr = scheduler._waiAria.lightboxSectionButtonAttrString(this.locale.labels[\"button_\"+sns[i].button]);\r\n\t\t\t\tbutton = \"
\"+this.locale.labels[\"button_\"+sns[i].button]+\"
\";\r\n\t\t\t}\r\n\r\n\t\t\tif (this.config.wide_form){\r\n\t\t\t\thtml+=\"
\";\r\n\t\t\t}\r\n\r\n\t\t\tvar label_name = this.locale.labels[\"section_\"+sns[i].name];\r\n\t\t\tif(typeof label_name !== \"string\"){\r\n\t\t\t\tlabel_name = sns[i].name;\r\n\t\t\t}\r\n\t\t\thtml+=\"
\"+button+ \"
\"+block.render.call(this,sns[i]);\r\n\t\t\thtml+=\"
\";\r\n\t\t}\r\n\r\n\t\tvar ds=d.getElementsByTagName(\"div\");\r\n\t\tfor (var i=0; i
 \r\n
\r\n
\r\n\r\n
`;\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._init_touch_events = function(){\r\n\tvar mobile = this.config.touch &&\r\n\t\t( ((navigator.userAgent.indexOf(\"Mobile\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"iPad\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"Android\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"Touch\")!=-1)) && !window.MSStream) ||\r\n\t\t\t((navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1));\r\n\r\n\tif(mobile){\r\n\t\tthis.xy.scroll_width = 0;\r\n\t\tthis._mobile = true;\r\n\t}\r\n\r\n\tif(this.config.touch){\r\n\r\n\t\tvar touchEventsSupported = true;\r\n\t\ttry {\r\n\t\t\tdocument.createEvent(\"TouchEvent\");\r\n\t\t} catch (e) {\r\n\t\t\ttouchEventsSupported = false;\r\n\t\t}\r\n\r\n\t\tif (touchEventsSupported) {\r\n\t\t\tthis._touch_events([\"touchmove\", \"touchstart\", \"touchend\"], function (ev) {\r\n\t\t\t\tif (ev.touches && ev.touches.length > 1) return null;\r\n\t\t\t\tif (ev.touches[0])\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\ttarget: ev.target,\r\n\t\t\t\t\t\tpageX: ev.touches[0].pageX,\r\n\t\t\t\t\t\tpageY: ev.touches[0].pageY,\r\n\t\t\t\t\t\tclientX: ev.touches[0].clientX,\r\n\t\t\t\t\t\tclientY: ev.touches[0].clientY\r\n\t\t\t\t\t};\r\n\t\t\t\telse\r\n\t\t\t\t\treturn ev;\r\n\t\t\t}, function () {\r\n\t\t\t\treturn false;\r\n\t\t\t});\r\n\t\t} else if (window.PointerEvent || window.navigator.pointerEnabled) {\r\n\t\t\tthis._touch_events([\"pointermove\", \"pointerdown\", \"pointerup\"], function (ev) {\r\n\t\t\t\tif (ev.pointerType == \"mouse\") return null;\r\n\t\t\t\treturn ev;\r\n\t\t\t}, function (ev) {\r\n\t\t\t\treturn (!ev || (ev.pointerType == \"mouse\" ));\r\n\t\t\t});\r\n\t\t} else if (window.navigator.msPointerEnabled) {\r\n\t\t\tthis._touch_events([\"MSPointerMove\", \"MSPointerDown\", \"MSPointerUp\"], function (ev) {\r\n\t\t\t\tif (ev.pointerType == ev.MSPOINTER_TYPE_MOUSE) return null;\r\n\t\t\t\treturn ev;\r\n\t\t\t}, function (ev) {\r\n\t\t\t\treturn (!ev || ev.pointerType == ev.MSPOINTER_TYPE_MOUSE);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n};\r\n\r\nscheduler._touch_events = function(names, accessor, ignore){\r\n\t//webkit on android need to be handled separately\r\n\t//var a_webkit = (navigator.userAgent.indexOf(\"Android\")!=-1) && (navigator.userAgent.indexOf(\"WebKit\")!=-1);\r\n\tvar source, tracker, timer, drag_mode, scroll_mode, action_mode;\r\n\tvar dblclicktime = 0;\r\n\r\n\tfunction attachTouchEvent(element, name, callback){\r\n\t\t//touch gestures must be disabled when ligthbox is opened\r\n\t\tscheduler.event(element, name, function(e){\r\n\t\t\tif(scheduler._is_lightbox_open()){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tif (ignore(e)) return;\r\n\t\t\t\treturn callback(e);\r\n\t\t\t}\r\n\t\t}, { passive: false });\r\n\t}\r\n\r\n\tfunction check_direction_swipe(s_ev, e_ev, step, max_dy){\r\n\t\tif (!s_ev || !e_ev) return false;\r\n\r\n\t\tvar t = s_ev.target;\r\n\t\twhile(t && t != scheduler._obj){\r\n\t\t\tt = t.parentNode;\r\n\t\t}\r\n\t\tif(t != scheduler._obj){\r\n\t\t\t//swipe outside scheduler\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// ignore swipe in horizontal timeline\r\n\t\tif(scheduler.matrix && scheduler.matrix[scheduler.getState().mode]){\r\n\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\tif(timeline.scrollable){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar dy = Math.abs(s_ev.pageY - e_ev.pageY);\r\n\t\tvar dx = Math.abs(s_ev.pageX - e_ev.pageX);\r\n\t\tif (dy < max_dy && dx>step && (!dy || (dx/dy > 3))){\r\n\t\t\tif (s_ev.pageX > e_ev.pageX) {\r\n\t\t\t\tscheduler._click.dhx_cal_next_button();\r\n\t\t\t}else {\r\n\t\t\t\tscheduler._click.dhx_cal_prev_button();\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\tfunction doMouseMove(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tvar dnd = scheduler.getState().drag_mode,\r\n\t\t\ttimeline = scheduler.matrix ? scheduler.matrix[scheduler._mode] : false;\r\n\r\n\t\tvar original_render = scheduler.render_view_data;\r\n\t\tif(dnd == 'create' && timeline){\r\n\t\t\t//suppress full redraw of timeline on creating event\r\n\t\t\tscheduler.render_view_data = function() {\r\n\t\t\t\tvar id = scheduler.getState().drag_id;\r\n\t\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\t\tvar property = timeline.y_property;\r\n\r\n\t\t\t\tvar evs = scheduler.getEvents(ev.start_date, ev.end_date);\r\n\t\t\t\tfor(var i = 0; i < evs.length; i++){\r\n\t\t\t\t\tif(evs[i][property] != ev[property]){\r\n\t\t\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tev._sorder = evs.length - 1;\r\n\t\t\t\tev._count = evs.length;\r\n\r\n\t\t\t\tthis.render_data([ev], scheduler.getState().mode);\r\n\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\tscheduler._on_mouse_move(e);\r\n\r\n\t\tif(dnd == 'create' && timeline){\r\n\t\t\tscheduler.render_view_data = original_render;\r\n\t\t}\r\n\r\n\t\tif (e.preventDefault)\r\n\t\t\te.preventDefault();\r\n\t\te.cancelBubble = true;\r\n\t\treturn false;\r\n\t}\r\n\r\n\t// touchmove\r\n\tattachTouchEvent(document.body, names[0], function(e){\r\n\t\tif (ignore(e)) return;\r\n\r\n\t\tvar acc = accessor(e);\r\n\t\tif(!acc) return;\r\n\t\tif (drag_mode){\r\n\t\t\tdoMouseMove(acc);\r\n\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._update_global_tip();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//if (tracker && a_webkit){\r\n\t\t//\tcheck_direction_swipe(tracker, accessor(e), 0);\r\n\t\t//}\r\n\r\n\t\ttracker = accessor(e);\r\n\t\t//ignore common and scrolling moves\r\n\t\tif (!action_mode) return;\r\n\r\n\t\t//multitouch\r\n\t\tif (!tracker){\r\n\t\t\tscroll_mode = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//target changed - probably in scroll mode\r\n\r\n\t\tif (source.target != tracker.target || (Math.abs(source.pageX - tracker.pageX) > 5) || (Math.abs(source.pageY - tracker.pageY) > 5)){\r\n\t\t\tscroll_mode = true;\r\n\t\t\tclearTimeout(timer);\r\n\t\t}\r\n\r\n\t});\r\n\r\n\t//attachTouchEvent(this._els[\"dhx_cal_data\"][0], \"scroll\", drag_cancel);\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], \"touchcancel\", drag_cancel);\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], \"contextmenu\", function(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tif (action_mode){\r\n\t\t\tif (e && e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t});\r\n\r\n\t// touchstart\r\n\tattachTouchEvent(this._obj, names[1], function(e){\r\n\t\t// block pull-to-refresh\r\n\t\tif(document && document.body){\r\n\t\t\tdocument.body.classList.add(\"dhx_cal_touch_active\");\r\n\t\t}\r\n\r\n\t\tif (ignore(e)) return;\r\n\t\tscheduler._pointerDragId = e.pointerId;\r\n\r\n\t\tvar fake_event;\r\n\t\tdrag_mode = scroll_mode = false;\r\n\t\taction_mode = true;\r\n\t\tfake_event = tracker = accessor(e);\r\n\r\n\t\tif (!fake_event){\r\n\t\t\tscroll_mode = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//dbl click\r\n\t\tvar now = new Date();\r\n\r\n\t\tif (!scroll_mode && !drag_mode && now - dblclicktime < 250){\r\n\t\t\tscheduler._click.dhx_cal_data(fake_event);\r\n\t\t\twindow.setTimeout(function(){\r\n\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t//fake_event.type = \"dblclick\";\r\n\t\t\t\tscheduler._on_dbl_click(fake_event);\r\n\t\t\t}, 50);\r\n\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._block_next_stop = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tdblclicktime = now;\r\n\r\n\t\t//drag\r\n\r\n\t\tif (scroll_mode || drag_mode || !scheduler.config.touch_drag)\r\n\t\t\treturn;\r\n\r\n\t\tvar actTask = scheduler._locate_event(document.activeElement);\r\n\t\tvar fakeTask = scheduler._locate_event(fake_event.target);\r\n\t\tvar sourceTask = source? scheduler._locate_event(source.target) : null;\r\n\r\n\t\tif(actTask && fakeTask && actTask == fakeTask && actTask != sourceTask)\r\n\t\t{\r\n\t\t\tif(e.preventDefault) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\tscheduler._click.dhx_cal_data(fake_event);\r\n\t\t\tsource = fake_event;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//there is no target\r\n\t\ttimer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tdrag_mode = true;\r\n\t\t\tvar target = source.target;\r\n\t\t\tvar className = scheduler._getClassName(target);\r\n\t\t\tif (target && className.indexOf(\"dhx_body\") != -1)\r\n\t\t\t\ttarget = target.previousSibling;\r\n\r\n\t\t\tscheduler._on_mouse_down(source, target);\r\n\t\t\tif (scheduler._drag_mode && scheduler._drag_mode != \"create\"){\r\n\t\t\t\tscheduler.for_rendered(scheduler._drag_id, function(node, i) {\r\n\t\t\t\t\tnode.style.display='none';\r\n\t\t\t\t\tscheduler._rendered.splice(i, 1);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (scheduler.config.touch_tip) {\r\n\t\t\t\tscheduler._show_global_tip();\r\n\t\t\t}\r\n\t\t\tscheduler.updateEvent(scheduler._drag_id);\r\n\t\t},scheduler.config.touch_drag);\r\n\r\n\t\tsource = fake_event;\r\n\t});\r\n\tfunction drag_cancel(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tscheduler._hide_global_tip();\r\n\t\tif (drag_mode){\r\n\t\t\tscheduler._on_mouse_up( accessor(e) );\r\n\t\t\tscheduler._temp_touch_block = false;\r\n\t\t}\r\n\t\tscheduler._drag_id = null;\r\n\t\tscheduler._drag_mode=null;\r\n\t\tscheduler._drag_pos=null;\r\n\t\tscheduler._pointerDragId = null;\r\n\t\tclearTimeout(timer);\r\n\t\tdrag_mode = action_mode = false;\r\n\t\tscroll_mode = true;\r\n\t}\r\n\r\n\t// touch end\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], names[2], function(e){\r\n\t\tif(document && document.body){\r\n\t\t\tdocument.body.classList.remove(\"dhx_cal_touch_active\");\r\n\t\t}\r\n\r\n\t\tif (ignore(e)) return;\r\n\r\n\t\tif(scheduler.config.touch_swipe_dates){\r\n\t\t\tif (!drag_mode && check_direction_swipe(source, tracker, 200, 100)) {\r\n\t\t\t\tscheduler._block_next_stop = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (drag_mode) {\r\n\t\t\tscheduler._ignore_next_click = true;\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\t}, 100);\r\n\t\t}\r\n\r\n\t\tdrag_cancel(e);\r\n\t\tif (scheduler._block_next_stop){\r\n\t\t\tscheduler._block_next_stop = false;\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler.event(document.body, names[2], drag_cancel);\r\n};\r\n\r\nscheduler._show_global_tip = function(){\r\n\tscheduler._hide_global_tip();\r\n\r\n\tvar toptip = scheduler._global_tip = document.createElement(\"div\");\r\n\ttoptip.className='dhx_global_tip';\r\n\r\n\tscheduler._update_global_tip(1);\r\n\r\n\tdocument.body.appendChild(toptip);\r\n};\r\nscheduler._update_global_tip = function(init){\r\n\tvar toptip = scheduler._global_tip;\r\n\tif (toptip){\r\n\t\tvar time = \"\";\r\n\t\tif (scheduler._drag_id && !init){\r\n\t\t\tvar ev = scheduler.getEvent(scheduler._drag_id);\r\n\t\t\tif (ev)\r\n\t\t\t\ttime = \"
\" + (ev._timed ? scheduler.templates.event_header(ev.start_date, ev.end_date, ev):scheduler.templates.day_date(ev.start_date, ev.end_date, ev)) + \"
\";\r\n\t\t}\r\n\r\n\t\tif (scheduler._drag_mode == \"create\" || scheduler._drag_mode == \"new-size\")\r\n\t\t\ttoptip.innerHTML = (scheduler.locale.labels.drag_to_create || \"Drag to create\")+time;\r\n\t\telse\r\n\t\t\ttoptip.innerHTML = (scheduler.locale.labels.drag_to_move || \"Drag to move\")+time;\r\n\t}\r\n};\r\nscheduler._hide_global_tip = function(){\r\n\tvar toptip = scheduler._global_tip;\r\n\tif (toptip && toptip.parentNode){\r\n\t\ttoptip.parentNode.removeChild(toptip);\r\n\t\tscheduler._global_tip = 0;\r\n\t}\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler.getRootView = function() {\r\n\treturn {\r\n\t\tview: {\r\n\t\t\trender: function(){\r\n\t\t\t\treturn {\r\n\t\t\t\t\ttag: \"div\",\r\n\t\t\t\t\ttype: 1,\r\n\t\t\t\t\tattrs: {\r\n\t\t\t\t\t\tstyle: \"width:100%;height:100%;\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\thooks: {\r\n\t\t\t\t\t\t\"didInsert\": function(){\r\n\t\t\t\t\t\t\tscheduler.setCurrentView();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tbody: [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tel: this.el,\r\n\t\t\t\t\t\t\ttype: 1\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t};\r\n\t\t\t},\r\n\t\t\tinit: function(){\r\n\t\t\t\tvar container = document.createElement(\"DIV\");\r\n\t\t\t\tcontainer.id = \"scheduler_\"+ scheduler.uid();\r\n\t\t\t\tcontainer.style.width = \"100%\";\r\n\t\t\t\tcontainer.style.height = \"100%\";\r\n\t\t\t\tcontainer.classList.add(\"dhx_cal_container\");\r\n\t\t\t\tcontainer.cmp = \"grid\";\r\n\t\t\t\tcontainer.innerHTML = '
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
';\r\n\t\t\t\tscheduler.init(container);\r\n\r\n\t\t\t\tthis.el = container;\r\n\t\t\t}\r\n\t\t},\r\n\t\ttype: 4\r\n\t};\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._addThemeClass = function(){\r\n\tdocument.documentElement.setAttribute(\"data-scheduler-theme\", scheduler.skin);\r\n};\r\n\r\nscheduler._skin_settings = {\r\n\tfix_tab_position: [1,0],\r\n\tuse_select_menu_space: [1,0],\r\n\twide_form: [1,0],\r\n\r\n\thour_size_px: [44,42],\r\n\tdisplayed_event_color: [\"#ff4a4a\", \"ffc5ab\"],\r\n\tdisplayed_event_text_color: [\"#ffef80\", \"7e2727\"]\r\n};\r\n\r\nscheduler._skin_xy = {\r\n\tlightbox_additional_height: [90,50],\r\n\tnav_height: [59,22],\r\n\tbar_height: [24,20]\r\n};\r\n\r\n// material skin uses a different box sizing model than other skins, and also requires some post-processing.\r\n// In order to render events correctly, we need to know which box sizing model is used\r\n// We can detect it by styles applied, taking into account that styles may be loaded after scheduler is rendered\r\n\r\nscheduler._is_material_skin = function(){\r\n\tif(!scheduler.skin){\r\n\t\treturn checkIfMaterialSkin();\r\n\t}else{\r\n\t\treturn ((scheduler.skin + \"\").indexOf(\"material\") > -1);\r\n\t}\r\n};\r\n\r\nfunction themeNameFromFile(){\r\n\tvar links = document.getElementsByTagName(\"link\");\r\n\tfor (var i = 0; i < links.length; i++) {\r\n\t\tvar res = links[i].href.match(\"dhtmlxscheduler_([a-z]+).css\");\r\n\t\tif (res){\r\n\t\t\treturn res[1];\r\n\t\t}\r\n\t}\r\n}\r\n\r\nscheduler._build_skin_info = function() {\r\n\tmonitorThemeChange();\r\n\tconst styles = getComputedStyle(this.$container);\r\n\tconst themeVar = styles.getPropertyValue(\"--dhx-scheduler-theme\");\r\n\r\n\tlet isCssVarTheme = !!themeVar;\r\n\tlet themeName;\r\n\tlet cssValues = {};\r\n\tlet oldMaterialTheme = false;\r\n\r\n\tif(isCssVarTheme){\r\n\t\tthemeName = themeVar;\r\n\t\tfor(let i in scheduler.xy){\r\n\t\t\tcssValues[i] = styles.getPropertyValue(`--dhx-scheduler-xy-${i}`);\r\n\t\t}\r\n\r\n\t\tcssValues.hour_size_px = styles.getPropertyValue(`--dhx-scheduler-config-hour_size_px`);\r\n\t\tcssValues.wide_form = styles.getPropertyValue(`--dhx-scheduler-config-form_wide`);\r\n\r\n\t}else{\r\n\t\tthemeName = themeNameFromFile();\r\n\t\toldMaterialTheme = scheduler._is_material_skin();\r\n\t}\r\n\r\n\r\n\tscheduler._theme_info = {\r\n\t\ttheme: themeName,\r\n\t\tcssVarTheme: isCssVarTheme,\r\n\t\toldMaterialTheme: oldMaterialTheme,\r\n\t\tvalues: cssValues\r\n\t};\r\n\r\n\tif(scheduler._theme_info.cssVarTheme){\r\n\t\tconst themeVariables = this._theme_info.values;\r\n\t\tfor(let i in scheduler.xy){\r\n\t\t\tif(!isNaN(parseInt(themeVariables[i]))){\r\n\t\t\t\tscheduler.xy[i] = parseInt(themeVariables[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n\r\nvar calculatedMaterial;\r\nfunction checkIfMaterialSkin(){\r\n\tif(calculatedMaterial === undefined){\r\n\t\tvar probe = document.createElement(\"div\");\r\n\t\tprobe.style.position = \"absolute\";\r\n\t\tprobe.style.left = \"-9999px\";\r\n\t\tprobe.style.top = \"-9999px\";\r\n\t\tprobe.innerHTML = \"
\" +\r\n\t\t\t\"
\" +\r\n\t\t\t\"
\"+\r\n\t\t\"
\";\r\n\t\tdocument.body.appendChild(probe);\r\n\t\tvar styles = window.getComputedStyle(probe.querySelector(\".dhx_cal_scale_placeholder\"));\r\n\t\tvar position = styles.getPropertyValue('position');\r\n\t\tif(position === \"absolute\"){\r\n\t\t\t// page has skins for placeholder element from material skin\r\n\t\t\tcalculatedMaterial = true;\r\n\t\t}else{\r\n\t\t\tcalculatedMaterial = false;\r\n\t\t}\r\n\r\n\t\tsetTimeout(function(){\r\n\t\t\tcalculatedMaterial = null;\r\n\t\t\tif(probe && probe.parentNode){\r\n\t\t\t\tprobe.parentNode.removeChild(probe);\r\n\t\t\t}\r\n\t\t}, 500);\r\n\t}\r\n\treturn calculatedMaterial;\r\n}\r\n\r\nvar cachedBorderBoxValue;\r\nfunction checkIfBorderBoxStyling(){\r\n\tif(scheduler._is_material_skin()){\r\n\t\treturn true;\r\n\t}else{\r\n\t\tif(cachedBorderBoxValue === undefined){\r\n\t\t\tvar probe = document.createElement(\"div\");\r\n\t\t\tprobe.style.position = \"absolute\";\r\n\t\t\tprobe.style.left = \"-9999px\";\r\n\t\t\tprobe.style.top = \"-9999px\";\r\n\t\t\tprobe.innerHTML = \"
\" +\r\n\t\t\t\t\"
\" +\r\n\t\t\t\t\t\"
\"+\r\n\t\t\t\t\"
\"+\r\n\t\t\t\"
\";\r\n\r\n\t\t\tdocument.body.appendChild(probe);\r\n\t\t\tvar styles = window.getComputedStyle(probe.querySelector(\".dhx_body\"));\r\n\t\t\tvar boxSizing = styles.getPropertyValue('box-sizing');\r\n\t\t\tdocument.body.removeChild(probe);\r\n\t\t\tcachedBorderBoxValue = !!(boxSizing === \"border-box\");\r\n\r\n\t\t\tif(!cachedBorderBoxValue){\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tcachedBorderBoxValue = undefined;\r\n\t\t\t\t}, 1000);// recalculate in case scheduler initialized before skin is loaded\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn cachedBorderBoxValue;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction refreshAfterLoad(){\r\n\tif(scheduler._is_material_skin() || scheduler._border_box_events()){\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar oldStyling = cachedBorderBoxValue;\r\n\tcachedBorderBoxValue = undefined;\r\n\tcalculatedMaterial = undefined;\r\n\tvar newStyling = checkIfBorderBoxStyling();\r\n\r\n\t// if box styling model changed - means scheduler was rendered before stylesheet was loaded or parsed inline\r\n\t// repaint scheduler in order to apply new styles\r\n\tif(oldStyling !== newStyling && scheduler.$container && scheduler.getState().mode){\r\n\t\tscheduler.setCurrentView();\r\n\t}\r\n}\r\nscheduler.event(window, 'DOMContentLoaded', refreshAfterLoad);\r\nscheduler.event(window, 'load', refreshAfterLoad);\r\n\r\nscheduler._border_box_events = function(){\r\n\treturn checkIfBorderBoxStyling();\r\n};\r\n\r\nscheduler._configure = function(col, data, skin){\r\n\tfor (var key in data)\r\n\t\tif (typeof col[key] == \"undefined\")\r\n\t\t\tcol[key] = data[key][skin];\r\n};\r\n\r\nscheduler.setSkin = function(value){\r\n\tthis.skin = value;\r\n\tscheduler._addThemeClass();\r\n\tif(scheduler.$container){\r\n\t\tthis._skin_init();\r\n\t\tthis.render();\r\n\t}\r\n\t\r\n\t//\r\n};\r\n\r\nfunction flatSkinHourScale(date){\r\n\tvar min = date.getMinutes();\r\n\tmin = min < 10 ? \"0\"+min : min;\r\n\tvar html = \"\"+ date.getHours() +\"\"+\r\n\t\t\" \"+ min +\"\";\r\n\treturn html;\r\n}\r\n\r\nlet monitorIntervalId = null;\r\nfunction monitorThemeChange(){\r\n\tconst container = scheduler.$container;\r\n\t\r\n\tclearInterval(monitorIntervalId);\r\n\tif(container){\r\n\t\tmonitorIntervalId = setInterval(() => {\r\n\t\t\tconst csstheme = getComputedStyle(container).getPropertyValue('--dhx-scheduler-theme');\r\n\t\t\tif(csstheme && csstheme !== scheduler.skin){\r\n\t\t\t\tscheduler.setSkin(csstheme);\r\n\t\t\t}\r\n\r\n\t\t}, 100);\r\n\t}\r\n}\r\nscheduler.attachEvent(\"onDestroy\", function(){\r\n\tclearInterval(monitorIntervalId);\r\n});\r\n\r\nscheduler._skin_init = function(){\r\n\tthis._build_skin_info();\r\n\r\n\tif (!this.skin){\r\n\t\tthis.skin = this._theme_info.theme;\r\n\t}\r\n\tscheduler._addThemeClass();\r\n\tif (scheduler.skin === \"flat\"){\r\n\t\t// scheduler.xy.scale_height = 35;\r\n\t\tscheduler.templates.hour_scale = flatSkinHourScale;\r\n\t}else if (scheduler.templates.hour_scale === flatSkinHourScale){\r\n\t\tscheduler.templates.hour_scale = scheduler.date.date_to_str(scheduler.config.hour_date);\r\n\t}\r\n\r\n\r\n\r\n\t//scheduler._lightbox_template=\"
 
\";\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\r\n\t\tvar date_to_str = scheduler.date.date_to_str(\"%d\");\r\n\t\tif(!scheduler.templates._old_month_day){\r\n\t\t\tscheduler.templates._old_month_day = scheduler.templates.month_day;\r\n\t\t}\r\n\t\tvar old_month_day = scheduler.templates._old_month_day;\r\n\t\tscheduler.templates.month_day = function(date) {\r\n\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\tvar label = date_to_str(date);\r\n\t\t\t\tif (date.getDate() == 1) {\r\n\t\t\t\t\tlabel = scheduler.locale.date.month_full[date.getMonth()] + \" \" + label;\r\n\t\t\t\t}\r\n\t\t\t\tif (+date == +scheduler.date.date_part(this._currentDate())) {\r\n\t\t\t\t\tlabel = scheduler.locale.labels.dhx_cal_today_button + \" \" + label;\r\n\t\t\t\t}\r\n\t\t\t\treturn label;\r\n\t\t\t} else {\r\n\t\t\t\treturn old_month_day.call(this, date);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t// tab classes\r\n\t\tif(scheduler.config.fix_tab_position){\r\n\t\t\tconst tabs = scheduler._els[\"dhx_cal_navline\"][0].querySelectorAll('[data-tab]');\r\n\t\t\ttabs.forEach((tab) => {\r\n\t\t\t\tconst view = tab.getAttribute(\"data-tab\") || tab.getAttribute(\"name\");\r\n\r\n\t\t\t\tswitch (view) {\r\n\t\t\t\t\tcase \"day\":\r\n\t\t\t\t\tcase \"day_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_first\");\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"week\":\r\n\t\t\t\t\tcase \"week_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"month\":\r\n\t\t\t\t\tcase \"month_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_last\");\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_standalone\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\treorderTabs(scheduler._els[\"dhx_cal_navline\"][0]);\r\n\r\n\t\t}\r\n\t}, {once: true});\r\n\r\n\tfunction reorderTabs(container) {\r\n\t\t// segmented tabs should go first\r\n\r\n\t\tif(scheduler.config.header){\r\n\t\t\treturn;\r\n\t\t\t// don't reorder tabs if header is defined via config\r\n\t\t}\r\n\t\tconst tabs = Array.from(container.querySelectorAll('.dhx_cal_tab'));\r\n\t\r\n\t\t// segmented tabs\r\n\t\tconst order = ['day', 'week', 'month'];\r\n\t\r\n\t\tconst specialTabs = order.map(tabName => \r\n\t\t\ttabs.find(tab => tab.getAttribute('data-tab') === tabName)\r\n\t\t).filter(tab => tab !== undefined);\r\n\t\r\n\t\tlet firstTab = tabs.length > 0 ? tabs[0] : null;\r\n\r\n\t\tspecialTabs.reverse().forEach(tab => {\r\n\t\t\tcontainer.insertBefore(tab, firstTab);\r\n\t\t\tfirstTab = tab;\r\n\t\t});\r\n\t}\r\n\r\n\t// scheduler._skin_init = function(){\r\n\t// \tthis._build_skin_info();\r\n\t// \tthis.skin = this._theme_info.theme;\r\n\t// };\r\n};\r\n\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nif (window.jQuery){\r\n\r\n(function( $ ){\r\n\tvar counter = 0;\r\n\tvar methods = [];\r\n\t$.fn.dhx_scheduler = function(config){\r\n\t\tif (typeof(config) === 'string') {\r\n\t\t\tif (methods[config] ) {\r\n\t\t\t\treturn methods[config].apply(this, []);\r\n\t\t\t}else {\r\n\t\t\t\t$.error('Method ' + config + ' does not exist on jQuery.dhx_scheduler');\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvar views = [];\r\n\t\t\tthis.each(function() {\r\n\t\t\t\tif (this && this.getAttribute){\r\n\t\t\t\t\tif (!this.getAttribute(\"dhxscheduler\")){\r\n\t\t\t\t\t\tvar name = \"scheduler\";\r\n\t\t\t\t\t\tif (counter){\r\n\t\t\t\t\t\t\tname = \"scheduler\" + (counter+1);\r\n\t\t\t\t\t\t\twindow[name] = Scheduler.getSchedulerInstance();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tvar comp = window[name];\r\n\r\n\t\t\t\t\t\tthis.setAttribute(\"dhxscheduler\", name);\r\n\t\t\t\t\t\tfor (var key in config)\r\n\t\t\t\t\t\t\tif (key!=\"data\")\r\n\t\t\t\t\t\t\t\tcomp.config[key] = config[key];\r\n\r\n\t\t\t\t\t\tif (!this.getElementsByTagName(\"div\").length){\r\n\t\t\t\t\t\t\tthis.innerHTML = '
';\r\n\t\t\t\t\t\t\tthis.className += \" dhx_cal_container\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcomp.init(this, comp.config.date, comp.config.mode);\r\n\t\t\t\t\t\tif (config.data)\r\n\t\t\t\t\t\t\tcomp.parse(config.data);\r\n\r\n\t\t\t\t\t\tviews.push(comp);\r\n\t\t\t\t\t\tcounter++;\r\n\t\t\t\t\t} else\r\n\t\t\t\t\t\tviews.push(window[this.getAttribute(\"dhxscheduler\")]);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif (views.length === 1) return views[0];\r\n\t\t\treturn views;\r\n\t\t}\r\n\t};\r\n\r\n\r\n\r\n\r\n})(window.jQuery);\r\n\r\n}\r\n\r\n}","import global from \"../global\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\n(function(){\r\n\r\n\tvar setCurrentView = scheduler.setCurrentView,\r\n\t\tupdateView = scheduler.updateView;\r\n\tvar update_view_timer = null,\r\n\t\tcurr_view_timer = null;\r\n\r\n\tvar lazy_setCurrentView = function(date, mode){\r\n\t\tvar self = this;\r\n\t\tglobal.clearTimeout(curr_view_timer);\r\n\t\tglobal.clearTimeout(update_view_timer);\r\n\r\n\t\tvar oldDate = self._date,\r\n\t\t\toldMode = self._mode;\r\n\t\tupdateFlags(this, date, mode);\r\n\r\n\t\tcurr_view_timer = setTimeout(function(){\r\n\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif (!self.callEvent(\"onBeforeViewChange\", [oldMode, oldDate, mode || self._mode, date || self._date])){\r\n\t\t\t\tupdateFlags(self, oldDate, oldMode);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tupdateView.call(self, date, mode);\r\n\t\t\tself.callEvent(\"onViewChange\", [self._mode, self._date]);\r\n\r\n\t\t\tglobal.clearTimeout(update_view_timer);\r\n\t\t\tcurr_view_timer = 0;\r\n\t\t}, scheduler.config.delay_render);\r\n\t};\r\n\tvar lazy_updateView = function(date, mode){\r\n\t\tvar self = this,\r\n\t\t\tars = arguments;\r\n\r\n\t\tupdateFlags(this, date, mode);\r\n\r\n\t\tglobal.clearTimeout(update_view_timer);\r\n\t\tupdate_view_timer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif(curr_view_timer)\r\n\t\t\t\treturn;\r\n\r\n\t\t\tupdateView.apply(self, ars);\r\n\t\t}, scheduler.config.delay_render);\r\n\t};\r\n\tfunction updateFlags(scheduler, date, mode){\r\n\t\tif(date)\r\n\t\t\tscheduler._date = date;\r\n\t\tif(mode)\r\n\t\t\tscheduler._mode = mode;\r\n\r\n\t}\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\tif(scheduler.config.delay_render){\r\n\t\t\tscheduler.setCurrentView = lazy_setCurrentView;\r\n\t\t\tscheduler.updateView = lazy_updateView;\r\n\t\t}else{\r\n\t\t\tscheduler.setCurrentView = setCurrentView;\r\n\t\t\tscheduler.updateView = updateView;\r\n\t\t}\r\n\t});\r\n\r\n})();\r\n\r\n}","export default function DataProcessorEvents(scheduler, dp){\r\n\tthis.$scheduler = scheduler;\r\n\tthis.$dp = dp;\r\n\tthis._dataProcessorHandlers = [];\r\n\r\n\tthis.attach = function () {\r\n\t\tvar dp = this.$dp;\r\n\t\tvar scheduler = this.$scheduler;\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onEventAdded\", function(id) {\r\n\t\t\tif (!this._loading && this._validId(id))\r\n\t\t\tdp.setUpdated(id,true,\"inserted\");\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function(id) {\r\n\t\t\tif (!this._validId(id)) return;\r\n\t\t\tvar z=dp.getState(id);\r\n\r\n\t\t\tif (z==\"inserted\" || this._new_event) { dp.setUpdated(id,false); return true; }\r\n\t\t\tif (z==\"deleted\") return false;\r\n\t\t\tif (z==\"true_deleted\") return true;\r\n\r\n\t\t\tdp.setUpdated(id,true,\"deleted\");\r\n\t\t\treturn false;\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onEventChanged\", function(id) { \r\n\t\t\tif (!this._loading && this._validId(id))\r\n\t\t\tdp.setUpdated(id,true,\"updated\");\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onClearAll\", function() { \r\n\t\t\t// clear dataprocessor state when scheduler is reset\r\n\t\t\tdp._in_progress={};\r\n\t\t\tdp._invalid={};\r\n\t\t\tdp.updatedRows = [];\r\n\t\t\tdp._waitMode = 0;\r\n\t\t}));\r\n\r\n\t\tdp.attachEvent(\"insertCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"updateCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"deleteCallback\", function(upd, id) {\r\n\t\t\tif (scheduler.getEvent(id)){\r\n\t\t\t\tscheduler.setUserData(id, this.action_param, \"true_deleted\");\r\n\t\t\t\tscheduler.deleteEvent(id);\r\n\t\t\t} else if (scheduler._add_rec_marker)\r\n\t\t\t\tscheduler._update_callback(upd, id);\r\n\t\t});\r\n\t};\r\n\r\n\tthis.detach = function () {\r\n\t\tfor (var key in this._dataProcessorHandlers) {\r\n\t\t\tvar handler = this._dataProcessorHandlers[key];\r\n\t\t\tthis.$scheduler.detachEvent(handler);\r\n\t\t}\r\n\t\tthis._dataProcessorHandlers = [];\r\n\t};\r\n}\r\n\r\nexport function extendScheduler(scheduler, dp){\r\n\tscheduler._validId=function(id){\r\n\t\tif(this._is_virtual_event){\r\n\t\t\treturn !this._is_virtual_event(id);\r\n\t\t}\r\n\t\treturn true;\r\n\t};\r\n\tscheduler.setUserData=function(id,name,value){\r\n\t\tif (id){\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif(ev) ev[name]=value;\r\n\t\t}else{\r\n\t\t\tthis._userdata[name]=value;\r\n\t\t}\r\n\t};\r\n\tscheduler.getUserData=function(id,name){\r\n\t\tif (id){\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif(ev)\r\n\t\t\t\treturn ev[name];\r\n\t\t\telse\r\n\t\t\t\treturn null;\r\n\t\t}else{\r\n\t\t\treturn this._userdata[name];\r\n\t\t}\r\n\t};\r\n\tscheduler._set_event_text_style=function(id,style){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\t\tthis.for_rendered(id,function(r){\r\n\t\t\tr.style.cssText+=\";\"+style;\r\n\t\t});\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tev[\"_text_style\"]=style;\r\n\t\tthis.event_updated(ev);\r\n\t};\r\n\tscheduler._update_callback = function(upd,id){\r\n\t\tvar data = scheduler._xmlNodeToJSON(upd.firstChild);\r\n\t\t//fix for updates of recurring events\r\n\t\tif (data.rec_type == \"none\") data.rec_pattern = \"none\";\r\n\t\tdata.text = data.text||data._tagvalue;\r\n\t\tdata.start_date = scheduler._helpers.parseDate(data.start_date);\r\n\t\tdata.end_date = scheduler._helpers.parseDate(data.end_date);\r\n\t\tscheduler.addEvent(data);\r\n\t\tif (scheduler._add_rec_marker)\r\n\t\t\tscheduler.setCurrentView();\r\n\t};\r\n\tscheduler._dp_change_event_id = function(id, new_id){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\t\tscheduler.changeEventId(id, new_id);\r\n\t};\r\n\tscheduler._dp_hook_delete = function(id, new_id){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\r\n\t\tif(new_id && id != new_id){\r\n\t\t\tif(this.getUserData(id, dp.action_param) == \"true_deleted\")\r\n\t\t\t\tthis.setUserData(id, dp.action_param, \"updated\");\r\n\r\n\t\t\tthis.changeEventId(id, new_id);\r\n\t\t}\r\n\t\treturn this.deleteEvent(new_id, true);\r\n\t};\r\n\r\n\tscheduler.setDp = function() {\r\n\t\tthis._dp = dp;\r\n\t};\r\n\tscheduler.setDp();\r\n}","import DataProcessorEvents from \"./dataprocessor_hooks\";\r\nimport { extendScheduler } from \"./dataprocessor_hooks\";\r\nimport eventable from \"../../utils/eventable\";\r\nimport global from \"../../global\";\r\n\r\n/**\r\n *\t@desc: constructor, data processor object\r\n *\t@param: serverProcessorURL - url used for update\r\n *\t@type: public\r\n */\r\nexport function DataProcessor(serverProcessorURL){\r\n\tthis.serverProcessor = serverProcessorURL;\r\n\tthis.action_param = \"!nativeeditor_status\";\r\n\r\n\tthis.object = null;\r\n\tthis.updatedRows = []; // ids of updated rows\r\n\r\n\tthis.autoUpdate = true;\r\n\tthis.updateMode = \"cell\";\r\n\tthis._tMode = \"GET\";\r\n\tthis._headers = null;\r\n\tthis._payload = null;\r\n\tthis.post_delim = \"_\";\r\n\r\n\tthis._waitMode = 0;\r\n\tthis._in_progress = {};\r\n\tthis._invalid = {};\r\n\tthis.messages = [];\r\n\r\n\tthis.styles = {\r\n\t\tupdated: \"font-weight:bold;\",\r\n\t\tinserted: \"font-weight:bold;\",\r\n\t\tdeleted: \"text-decoration : line-through;\",\r\n\t\tinvalid: \"background-color:FFE0E0;\",\r\n\t\tinvalid_cell: \"border-bottom:2px solid red;\",\r\n\t\terror: \"color:red;\",\r\n\t\tclear: \"font-weight:normal;text-decoration:none;\"\r\n\t};\r\n\tthis.enableUTFencoding(true);\r\n\teventable(this); // TODO: need to update\r\n\r\n\treturn this;\r\n}\r\nDataProcessor.prototype = {\r\n\tsetTransactionMode: function (mode, total) {\r\n\t\tif (typeof mode == \"object\") {\r\n\t\t\tthis._tMode = mode.mode || this._tMode;\r\n\r\n\t\t\tif (mode.headers !== undefined) {\r\n\t\t\t\tthis._headers = mode.headers;\r\n\t\t\t}\r\n\r\n\t\t\tif (mode.payload !== undefined) {\r\n\t\t\t\tthis._payload = mode.payload;\r\n\t\t\t}\r\n\t\t\tthis._tSend = !!total;\r\n\t\t} else {\r\n\t\t\tthis._tMode = mode;\r\n\t\t\tthis._tSend = total;\r\n\t\t}\r\n\r\n\t\tif (this._tMode == \"REST\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t}\r\n\r\n\t\tif (this._tMode === \"JSON\" || this._tMode === \"REST-JSON\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t\tthis._serializeAsJson = true;\r\n\t\t\tthis._headers = this._headers || {};\r\n\t\t\tthis._headers[\"Content-Type\"] = \"application/json\";\r\n\t\t}else{\r\n\t\t\tif(this._headers && !this._headers[\"Content-Type\"]){\r\n\t\t\t\tthis._headers[\"Content-Type\"] = \"application/x-www-form-urlencoded\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (this._tMode === \"CUSTOM\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t\tthis._router = mode.router;\r\n\t\t}\r\n\t},\r\n\tescape: function (data) {\r\n\t\tif (this._utf)\r\n\t\t\treturn encodeURIComponent(data);\r\n\t\telse\r\n\t\t\treturn escape(data);\r\n\t},\r\n\t/**\r\n\t *\t@desc: allows to set escaping mode\r\n\t *\t@param: true - utf based escaping, simple - use current page encoding\r\n\t *\t@type: public\r\n\t */\r\n\tenableUTFencoding: function (mode) {\r\n\t\tthis._utf = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: allows to define, which column may trigger update\r\n\t *\t@param: val - array or list of true/false values\r\n\t *\t@type: public\r\n\t */\r\n\tsetDataColumns: function (val) {\r\n\t\tthis._columns = (typeof val == \"string\") ? val.split(\",\") : val;\r\n\t},\r\n\t/**\r\n\t *\t@desc: get state of updating\r\n\t *\t@returns: true - all in sync with server, false - some items not updated yet.\r\n\t *\t@type: public\r\n\t */\r\n\tgetSyncState: function () {\r\n\t\treturn !this.updatedRows.length;\r\n\t},\r\n\t/**\r\n\t *\t@desc: enable/disable named field for data syncing, will use column ids for grid\r\n\t *\t@param: mode - true/false\r\n\t *\t@type: public\r\n\t */\r\n\tenableDataNames: function (mode) {\r\n\t\tthis._endnm = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: enable/disable mode , when only changed fields and row id send to the server side, instead of all fields in default mode\r\n\t *\t@param: mode - true/false\r\n\t *\t@type: public\r\n\t */\r\n\tenablePartialDataSend: function (mode) {\r\n\t\tthis._changed = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: set if rows should be send to server automatically\r\n\t *\t@param: mode - \"row\" - based on row selection changed, \"cell\" - based on cell editing finished, \"off\" - manual data sending\r\n\t *\t@type: public\r\n\t */\r\n\tsetUpdateMode: function (mode, dnd) {\r\n\t\tthis.autoUpdate = (mode == \"cell\");\r\n\t\tthis.updateMode = mode;\r\n\t\tthis.dnd = dnd;\r\n\t},\r\n\tignore: function (code, master) {\r\n\t\tthis._silent_mode = true;\r\n\t\tcode.call(master || window);\r\n\t\tthis._silent_mode = false;\r\n\t},\r\n\t/**\r\n\t *\t@desc: mark row as updated/normal. check mandatory fields,initiate autoupdate (if turned on)\r\n\t *\t@param: rowId - id of row to set update-status for\r\n\t *\t@param: state - true for \"updated\", false for \"not updated\"\r\n\t *\t@param: mode - update mode name\r\n\t *\t@type: public\r\n\t */\r\n\tsetUpdated: function (rowId, state, mode) {\r\n\t\tif (this._silent_mode) return;\r\n\t\tvar ind = this.findRow(rowId);\r\n\r\n\t\tmode = mode || \"updated\";\r\n\t\tvar existing = this.$scheduler.getUserData(rowId, this.action_param);\r\n\t\tif (existing && mode == \"updated\") mode = existing;\r\n\t\tif (state) {\r\n\t\t\tthis.set_invalid(rowId, false); //clear previous error flag\r\n\t\t\tthis.updatedRows[ind] = rowId;\r\n\t\t\tthis.$scheduler.setUserData(rowId, this.action_param, mode);\r\n\t\t\tif (this._in_progress[rowId])\r\n\t\t\t\tthis._in_progress[rowId] = \"wait\";\r\n\t\t} else {\r\n\t\t\tif (!this.is_invalid(rowId)) {\r\n\t\t\t\tthis.updatedRows.splice(ind, 1);\r\n\t\t\t\tthis.$scheduler.setUserData(rowId, this.action_param, \"\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.markRow(rowId, state, mode);\r\n\t\tif (state && this.autoUpdate) this.sendData(rowId);\r\n\t},\r\n\r\n\tmarkRow: function (id, state, mode) {\r\n\t\tvar str = \"\";\r\n\t\tvar invalid = this.is_invalid(id);\r\n\t\tif (invalid) {\r\n\t\t\tstr = this.styles[invalid];\r\n\t\t\tstate = true;\r\n\t\t}\r\n\t\tif (this.callEvent(\"onRowMark\", [id, state, mode, invalid])) {\r\n\t\t\t//default logic\r\n\t\t\tstr = this.styles[state ? mode : \"clear\"] + str;\r\n\r\n\t\t\tthis.$scheduler[this._methods[0]](id, str);\r\n\r\n\t\t\tif (invalid && invalid.details) {\r\n\t\t\t\tstr += this.styles[invalid + \"_cell\"];\r\n\t\t\t\tfor (var i = 0; i < invalid.details.length; i++)\r\n\t\t\t\t\tif (invalid.details[i])\r\n\t\t\t\t\t\tthis.$scheduler[this._methods[1]](id, i, str);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tgetActionByState: function(state) {\r\n\t\tif (state === \"inserted\") {\r\n\t\t\treturn \"create\";\r\n\t\t}\r\n\t\tif (state === \"updated\") {\r\n\t\t\treturn \"update\";\r\n\t\t}\r\n\t\tif (state === \"deleted\") {\r\n\t\t\treturn \"delete\";\r\n\t\t}\r\n\t\treturn \"update\";\r\n\t},\r\n\r\n\tgetState: function (id) {\r\n\t\treturn this.$scheduler.getUserData(id, this.action_param);\r\n\t},\r\n\tis_invalid: function (id) {\r\n\t\treturn this._invalid[id];\r\n\t},\r\n\tset_invalid: function (id, mode, details) {\r\n\t\tif (details) mode = {\r\n\t\t\tvalue: mode, details: details, toString: function () {\r\n\t\t\t\treturn this.value.toString();\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis._invalid[id] = mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: check mandatory fields and varify values of cells, initiate update (if specified)\r\n\t *\t@param: rowId - id of row to set update-status for\r\n\t *\t@type: public\r\n\t */\r\n\tcheckBeforeUpdate: function (rowId) {\r\n\t\treturn true;\r\n\t},\r\n\t/**\r\n\t *\t@desc: send row(s) values to server\r\n\t *\t@param: rowId - id of row which data to send. If not specified, then all \"updated\" rows will be send\r\n\t *\t@type: public\r\n\t */\r\n\tsendData: function (rowId) {\r\n\t\tif (this.$scheduler.editStop) this.$scheduler.editStop();\r\n\r\n\t\tif (typeof rowId == \"undefined\" || this._tSend) return this.sendAllData();\r\n\t\tif (this._in_progress[rowId]) return false;\r\n\r\n\t\tthis.messages = [];\r\n\t\tif (!this.checkBeforeUpdate(rowId) && this.callEvent(\"onValidationError\", [rowId, this.messages])) return false;\r\n\t\tthis._beforeSendData(this._getRowData(rowId), rowId);\r\n\t},\r\n\t_beforeSendData: function (data, rowId) {\r\n\t\tif (!this.callEvent(\"onBeforeUpdate\", [rowId, this.getState(rowId), data])) return false;\r\n\t\tthis._sendData(data, rowId);\r\n\t},\r\n\tserialize: function (data, id) {\r\n\t\tif (this._serializeAsJson) {\r\n\t\t\treturn this._serializeAsJSON(data);\r\n\t\t}\r\n\r\n\t\tif (typeof data == \"string\")\r\n\t\t\treturn data;\r\n\t\tif (typeof id != \"undefined\")\r\n\t\t\treturn this.serialize_one(data, \"\");\r\n\t\telse {\r\n\t\t\tvar stack = [];\r\n\t\t\tvar keys = [];\r\n\t\t\tfor (var key in data)\r\n\t\t\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\t\t\tstack.push(this.serialize_one(data[key], key + this.post_delim));\r\n\t\t\t\t\tkeys.push(key);\r\n\t\t\t\t}\r\n\t\t\tstack.push(\"ids=\" + this.escape(keys.join(\",\")));\r\n\t\t\tif (this.$scheduler.security_key)\r\n\t\t\t\tstack.push(\"dhx_security=\" + (this.$scheduler.security_key));\r\n\t\t\treturn stack.join(\"&\");\r\n\t\t}\r\n\t},\r\n\tserialize_one: function (data, pref) {\r\n\t\tif (typeof data == \"string\")\r\n\t\t\treturn data;\r\n\t\tvar stack = [];\r\n\t\tvar serialized = \"\";\r\n\t\tfor (var key in data)\r\n\t\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\t\tif ((key == \"id\" || key == this.action_param) && this._tMode == \"REST\") continue;\r\n\t\t\t\tif (typeof data[key] === \"string\" || typeof data[key] === \"number\") {\r\n\t\t\t\t\tserialized = data[key];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tserialized = JSON.stringify(data[key]);\r\n\t\t\t\t}\r\n\t\t\t\tstack.push(this.escape((pref || \"\") + key) + \"=\" + this.escape(serialized));\r\n\t\t\t}\r\n\t\treturn stack.join(\"&\");\r\n\t},\r\n\t_applyPayload: function (url) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tif (this._payload)\r\n\t\t\tfor (var key in this._payload)\r\n\t\t\t\turl = url + ajax.urlSeparator(url) + this.escape(key) + \"=\" + this.escape(this._payload[key]);\r\n\t\treturn url;\r\n\t},\r\n\t_sendData: function (dataToSend, rowId) {\r\n\t\tif (!dataToSend) {\r\n\t\t\treturn; // nothing to send\r\n\t\t}\r\n\t\tif (!this.callEvent(\"onBeforeDataSending\", rowId ? [rowId, this.getState(rowId), dataToSend] : [null, null, dataToSend])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (rowId) {\r\n\t\t\tthis._in_progress[rowId] = (new Date()).valueOf();\r\n\t\t}\r\n\r\n\t\tvar self = this;\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\r\n\t\tif (this._tMode === \"CUSTOM\") {\r\n\t\t\tvar state = this.getState(rowId);\r\n\t\t\tvar action = this.getActionByState(state);\r\n\t\t\tvar _onResolvedCreateUpdate = function (tag) {\r\n\t\t\t\tvar resultState = state;\r\n\t\t\t\tif(tag && tag.responseText && tag.setRequestHeader){\r\n\t\t\t\t\tif(tag.status !== 200){\r\n\t\t\t\t\t\tresultState = \"error\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\ttag = JSON.parse(tag.responseText);\r\n\t\t\t\t\t} catch (e){}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tresultState = resultState || \"updated\";\r\n\t\t\t\tvar sid = rowId;\r\n\t\t\t\tvar tid = rowId;\r\n\r\n\t\t\t\tif (tag) {\r\n\t\t\t\t\tresultState = tag.action || resultState;\r\n\t\t\t\t\tsid = tag.sid || sid;\r\n\t\t\t\t\ttid = tag.id || tag.tid || tid;\r\n\t\t\t\t}\r\n\t\t\t\tself.afterUpdateCallback(sid, tid, resultState, tag);\r\n\t\t\t};\r\n\r\n\t\t\tconst routerMode = \"event\";\r\n\t\t\tvar actionPromise;\r\n\t\t\tif (this._router instanceof Function) {\r\n\t\t\t\tactionPromise = this._router(routerMode, action, dataToSend, rowId);\r\n\t\t\t} else {\r\n\t\t\t\tswitch (state) {\r\n\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].create(dataToSend);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].delete(rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].update(dataToSend, rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(actionPromise){\r\n\t\t\t\t// neither promise nor {tid: newId} response object\r\n\t\t\t\tif(!actionPromise.then &&\r\n\t\t\t\t\t(actionPromise.id === undefined && actionPromise.tid === undefined && actionPromise.action === undefined)){\r\n\t\t\t\t\tthrow new Error(\"Incorrect router return value. A Promise or a response object is expected\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(actionPromise.then){\r\n\t\t\t\t\tactionPromise.then(_onResolvedCreateUpdate).catch(function(error) {\r\n\t\t\t\t\t\tif(error && error.action){\r\n\t\t\t\t\t\t\t_onResolvedCreateUpdate(error);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t_onResolvedCreateUpdate({ action: \"error\", value: error});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// custom method may return a response object in case of sync action\r\n\t\t\t\t\t_onResolvedCreateUpdate(actionPromise);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t_onResolvedCreateUpdate(null);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar queryParams = {\r\n\t\t\tcallback: function(xml) {\r\n\t\t\t\tvar ids = [];\r\n\r\n\t\t\t\tif (rowId) {\r\n\t\t\t\t\tids.push(rowId);\r\n\t\t\t\t} else if (dataToSend) {\r\n\t\t\t\t\tfor (var key in dataToSend) {\r\n\t\t\t\t\t\tids.push(key);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.afterUpdate(self, xml, ids);\r\n\t\t\t},\r\n\t\t\theaders: self._headers\r\n\t\t};\r\n\r\n\t\tvar urlParams = this.serverProcessor + (this._user ? (ajax.urlSeparator(this.serverProcessor) + [\"dhx_user=\" + this._user, \"dhx_version=\" + this.$scheduler.getUserData(0, \"version\")].join(\"&\")) : \"\");\r\n\t\tvar url = this._applyPayload(urlParams);\r\n\t\tvar data;\r\n\r\n\t\tswitch (this._tMode) {\r\n\t\t\tcase \"GET\":\r\n\t\t\t\tdata = this._cleanupArgumentsBeforeSend(dataToSend);\r\n\t\t\t\tqueryParams.url = url + ajax.urlSeparator(url) + this.serialize(data, rowId);\r\n\t\t\t\tqueryParams.method = \"GET\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"POST\":\r\n\t\t\t\tdata = this._cleanupArgumentsBeforeSend(dataToSend);\r\n\t\t\t\tqueryParams.url = url;\r\n\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\tqueryParams.data = this.serialize(data, rowId);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"JSON\":\r\n\t\t\t\tdata = {};\r\n\t\t\t\tvar preprocessedData = this._cleanupItemBeforeSend(dataToSend);\r\n\t\t\t\tfor (var key in preprocessedData) {\r\n\t\t\t\t\tif (key === this.action_param || key === \"id\" || key === \"gr_id\") {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdata[key] = preprocessedData[key];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tqueryParams.url = url;\r\n\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\tqueryParams.data = JSON.stringify({\r\n\t\t\t\t\tid: rowId,\r\n\t\t\t\t\taction: dataToSend[this.action_param],\r\n\t\t\t\t\tdata: data\r\n\t\t\t\t});\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"REST\":\r\n\t\t\tcase \"REST-JSON\":\r\n\t\t\t\turl = urlParams.replace(/(&|\\?)editing=true/, \"\");\r\n\t\t\t\tdata = \"\";\r\n\r\n\t\t\t\tswitch (this.getState(rowId)) {\r\n\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\t\t\tqueryParams.data = this.serialize(dataToSend, rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\tqueryParams.method = \"DELETE\";\r\n\t\t\t\t\t\turl = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + rowId;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tqueryParams.method = \"PUT\";\r\n\t\t\t\t\t\tqueryParams.data = this.serialize(dataToSend, rowId);\r\n\t\t\t\t\t\turl = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + rowId;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tqueryParams.url = this._applyPayload(url);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tthis._waitMode++;\r\n\t\treturn ajax.query(queryParams);\r\n\t},\r\n\tsendAllData: function () {\r\n\t\tif (!this.updatedRows.length || this.updateMode === \"off\") { // FIXME: need to leave checking 'this.updateMode === \"off\"'?\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.messages = [];\r\n\t\tvar valid = true;\r\n\r\n\t\tthis._forEachUpdatedRow(function(rowId) {\r\n\t\t\tvalid = valid && this.checkBeforeUpdate(rowId);\r\n\t\t});\r\n\r\n\t\tif (!valid && !this.callEvent(\"onValidationError\", [\"\", this.messages])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (this._tSend) {\r\n\t\t\tthis._sendData(this._getAllData());\r\n\t\t} else {\r\n\t\t\tthis._forEachUpdatedRow(function(rowId) {\r\n\t\t\t\tif (!this._in_progress[rowId]) {\r\n\t\t\t\t\tif (this.is_invalid(rowId)) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis._beforeSendData(this._getRowData(rowId), rowId);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\t_getAllData: function (rowId) {\r\n\t\tvar out = {};\r\n\t\tvar has_one = false;\r\n\t\tthis._forEachUpdatedRow(function(id) {\r\n\t\t\tif (this._in_progress[id] || this.is_invalid(id)){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar row = this._getRowData(id);\r\n\t\t\tif (!this.callEvent(\"onBeforeUpdate\", [id, this.getState(id), row])) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tout[id] = row;\r\n\t\t\thas_one = true;\r\n\t\t\tthis._in_progress[id] = (new Date()).valueOf();\r\n\t\t});\r\n\t\treturn has_one ? out : null;\r\n\t},\r\n\r\n\tfindRow: function (pattern) {\r\n\t\tvar i = 0;\r\n\t\tfor (i = 0; i < this.updatedRows.length; i++)\r\n\t\t\tif (pattern == this.updatedRows[i]) break;\r\n\t\treturn i;\r\n\t},\r\n\r\n\t/**\r\n\t *\t@desc: define custom actions\r\n\t *\t@param: name - name of action, same as value of action attribute\r\n\t *\t@param: handler - custom function, which receives a XMl response content for action\r\n\t *\t@type: private\r\n\t */\r\n\tdefineAction: function (name, handler) {\r\n\t\tif (!this._uActions) this._uActions = {};\r\n\t\tthis._uActions[name] = handler;\r\n\t},\r\n\r\n\t/**\r\n\t *\t @desc: used in combination with setOnBeforeUpdateHandler to create custom client-server transport system\r\n\t *\t @param: sid - id of item before update\r\n\t *\t @param: tid - id of item after up0ate\r\n\t *\t @param: action - action name\r\n\t *\t @type: public\r\n\t *\t @topic: 0\r\n\t */\r\n\tafterUpdateCallback: function (sid, tid, action, btag) {\r\n\t\tif(!this.$scheduler){\r\n\t\t\t// destructor has been called before the callback\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar marker = sid;\r\n\t\tvar correct = (action !== \"error\" && action !== \"invalid\");\r\n\t\tif (!correct) {\r\n\t\t\tthis.set_invalid(sid, action);\r\n\t\t}\r\n\t\tif ((this._uActions) && (this._uActions[action]) && (!this._uActions[action](btag))) {\r\n\t\t\treturn (delete this._in_progress[marker]);\r\n\t\t}\r\n\r\n\t\tif (this._in_progress[marker] !== \"wait\") {\r\n\t\t\tthis.setUpdated(sid, false);\r\n\t\t}\r\n\r\n\t\tvar originalSid = sid;\r\n\r\n\t\tswitch (action) {\r\n\t\t\tcase \"inserted\":\r\n\t\t\tcase \"insert\":\r\n\t\t\t\tif (tid != sid) {\r\n\t\t\t\t\tthis.setUpdated(sid, false);\r\n\t\t\t\t\tthis.$scheduler[this._methods[2]](sid, tid);\r\n\t\t\t\t\tsid = tid;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"delete\":\r\n\t\t\tcase \"deleted\":\r\n\t\t\t\tthis.$scheduler.setUserData(sid, this.action_param, \"true_deleted\");\r\n\t\t\t\tthis.$scheduler[this._methods[3]](sid, tid);\r\n\t\t\t\tdelete this._in_progress[marker];\r\n\t\t\t\treturn this.callEvent(\"onAfterUpdate\", [sid, action, tid, btag]);\r\n\t\t}\r\n\r\n\t\tif (this._in_progress[marker] !== \"wait\") {\r\n\t\t\tif (correct) {\r\n\t\t\t\tthis.$scheduler.setUserData(sid, this.action_param, \"\");\r\n\t\t\t}\r\n\t\t\tdelete this._in_progress[marker];\r\n\t\t} else {\r\n\t\t\tdelete this._in_progress[marker];\r\n\t\t\tthis.setUpdated(tid, true, this.$scheduler.getUserData(sid, this.action_param));\r\n\t\t}\r\n\r\n\t\tthis.callEvent(\"onAfterUpdate\", [originalSid, action, tid, btag]);\r\n\t},\r\n\r\n\t_errorResponse: function (xml, id){\r\n\t\tif(this.$scheduler && this.$scheduler.callEvent){\r\n\t\t\tthis.$scheduler.callEvent(\"onSaveError\", [id, xml.xmlDoc]);\r\n\t\t}\r\n\t\treturn this.cleanUpdate(id);\r\n\t},\r\n\r\n\t_setDefaultTransactionMode: function () {\r\n\t\tif (this.serverProcessor) {\r\n\t\t\tthis.setTransactionMode(\"POST\", true);\r\n\t\t\tthis.serverProcessor += (this.serverProcessor.indexOf(\"?\") !== -1 ? \"&\" : \"?\") + \"editing=true\";\r\n\t\t\tthis._serverProcessor = this.serverProcessor;\r\n\t\t}\r\n\t},\r\n\t\r\n\t/**\r\n\t *\t@desc: response from server\r\n\t *\t@param: xml - XMLLoader object with response XML\r\n\t *\t@type: private\r\n\t */\r\n\tafterUpdate: function (that, xml, id) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\r\n\t\tif (xml.xmlDoc.status !== 200){\r\n\t\t\tthis._errorResponse(xml, id);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// try to use json first\r\n\t\tvar tag;\r\n\t\ttry {\r\n\t\t\ttag = JSON.parse(xml.xmlDoc.responseText);\r\n\t\t} catch (e) {\r\n\t\t\t// empty response also can be processed by json handler\r\n\t\t\tif (!xml.xmlDoc.responseText.length) {\r\n\t\t\t\ttag = {};\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (tag) {\r\n\t\t\tvar action = tag.action || this.getState(id) || \"updated\";\r\n\t\t\tvar sid = tag.sid || id[0];\r\n\t\t\tvar tid = tag.tid || id[0];\r\n\t\t\tthat.afterUpdateCallback(sid, tid, action, tag);\r\n\t\t\tthat.finalizeUpdate();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// xml response\r\n\t\tvar top = ajax.xmltop(\"data\", xml.xmlDoc); // fix incorrect content type in IE\r\n\t\tif (!top) {\r\n\t\t\treturn this._errorResponse(xml, id);\r\n\t\t}\r\n\t\tvar atag = ajax.xpath(\"//data/action\", top);\r\n\t\tif (!atag.length) {\r\n\t\t\treturn this._errorResponse(xml, id);\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < atag.length; i++) {\r\n\t\t\tvar btag = atag[i];\r\n\t\t\tvar action = btag.getAttribute(\"type\");\r\n\t\t\tvar sid = btag.getAttribute(\"sid\");\r\n\t\t\tvar tid = btag.getAttribute(\"tid\");\r\n\r\n\t\t\tthat.afterUpdateCallback(sid, tid, action, btag);\r\n\t\t}\r\n\t\tthat.finalizeUpdate();\r\n\t},\r\n\tcleanUpdate: function (id) {\r\n\t\tif (id)\r\n\t\t\tfor (var i = 0; i < id.length; i++)\r\n\t\t\t\tdelete this._in_progress[id[i]];\r\n\t},\r\n\tfinalizeUpdate: function () {\r\n\t\tif (this._waitMode) this._waitMode--;\r\n\r\n\t\tthis.callEvent(\"onAfterUpdateFinish\", []);\r\n\t\tif (!this.updatedRows.length)\r\n\t\t\tthis.callEvent(\"onFullSync\", []);\r\n\t},\r\n\r\n\t/**\r\n\t *\t@desc: initializes data-processor\r\n\t *\t@param: scheduler - dhtmlxScheduler object to attach this data-processor to\r\n\t *\t@type: public\r\n\t */\r\n\tinit: function (scheduler) {\r\n\t\tif (this._initialized) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.$scheduler = scheduler;\r\n\t\tif (this.$scheduler._dp_init) {\r\n\t\t\tthis.$scheduler._dp_init(this);\r\n\t\t}\r\n\r\n\t\tthis._setDefaultTransactionMode();\r\n\r\n\t\tthis._methods=this._methods||[\"_set_event_text_style\",\"\",\"_dp_change_event_id\",\"_dp_hook_delete\"];\r\n\t\textendScheduler(this.$scheduler, this);\r\n\t\tvar dataProcessorEvents = new DataProcessorEvents(this.$scheduler, this);\r\n\t\tdataProcessorEvents.attach();\r\n\t\tthis.attachEvent(\"onDestroy\", function() {\r\n\t\t\tdelete this._getRowData;\r\n\r\n\t\t\tdelete this.$scheduler._dp;\r\n\t\t\tdelete this.$scheduler._dataprocessor;\r\n\t\t\tdelete this.$scheduler._set_event_text_style;\r\n\t\t\tdelete this.$scheduler._dp_change_event_id;\r\n\t\t\tdelete this.$scheduler._dp_hook_delete;\r\n\t\t\tdelete this.$scheduler;\r\n\t\t\tdataProcessorEvents.detach();\r\n\t\t});\r\n\t\tthis.$scheduler.callEvent(\"onDataProcessorReady\", [this]);\r\n\t\tthis._initialized = true;\r\n\r\n\t\tscheduler._dataprocessor=this;\r\n\t},\r\n\r\n\tsetOnAfterUpdate: function (ev) {\r\n\t\tthis.attachEvent(\"onAfterUpdate\", ev);\r\n\t},\r\n\tsetOnBeforeUpdateHandler: function (func) {\r\n\t\tthis.attachEvent(\"onBeforeDataSending\", func);\r\n\t},\r\n\r\n\t/* starts autoupdate mode\r\n\t\t@param interval time interval for sending update requests\r\n\t*/\r\n\tsetAutoUpdate: function (interval, user) {\r\n\t\tinterval = interval || 2000;\r\n\r\n\t\tthis._user = user || (new Date()).valueOf();\r\n\t\tthis._need_update = false;\r\n\t\t//this._loader = null;\r\n\t\tthis._update_busy = false;\r\n\r\n\t\tthis.attachEvent(\"onAfterUpdate\", function (sid, action, tid, xml_node) {\r\n\t\t\tthis.afterAutoUpdate(sid, action, tid, xml_node);\r\n\t\t});\r\n\t\tthis.attachEvent(\"onFullSync\", function () {\r\n\t\t\tthis.fullSync();\r\n\t\t});\r\n\r\n\t\tvar self = this;\r\n\t\tlet intervalId = global.setInterval(function () {\r\n\t\t\tself.loadUpdate();\r\n\t\t}, interval);\r\n\t\tthis.attachEvent(\"onDestroy\", function(){\r\n\t\t\tclearInterval(intervalId);\r\n\t\t});\r\n\t},\r\n\r\n\t/* process updating request answer\r\n\t\tif status == collision version is deprecated\r\n\t\tset flag for autoupdating immediately\r\n\t*/\r\n\tafterAutoUpdate: function (sid, action, tid, xml_node) {\r\n\t\tif (action == 'collision') {\r\n\t\t\tthis._need_update = true;\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t},\r\n\r\n\t/* callback function for onFillSync event\r\n\t\tcall update function if it's need\r\n\t*/\r\n\tfullSync: function () {\r\n\t\tif (this._need_update) {\r\n\t\t\tthis._need_update = false;\r\n\t\t\tthis.loadUpdate();\r\n\t\t}\r\n\t\treturn true;\r\n\t},\r\n\r\n\t/* sends query to the server and call callback function\r\n\t*/\r\n\tgetUpdates: function (url, callback) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tif (this._update_busy)\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\tthis._update_busy = true;\r\n\r\n\t\tajax.get(url, callback);\r\n\t},\r\n\r\n\t/* returns xml node value\r\n\t\t@param node\r\n\t\t\txml node\r\n\t*/\r\n\t_getXmlNodeValue: function(node) {\r\n\t\tif (node.firstChild) {\r\n\t\t\treturn node.firstChild.nodeValue;\r\n\t\t}\r\n\t\treturn \"\";\r\n\t},\r\n\r\n\t/* loads updates and processes them\r\n\t*/\r\n\tloadUpdate: function () {\r\n\t\tvar self = this;\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tvar version = this.$scheduler.getUserData(0, \"version\");\r\n\t\tvar url = this.serverProcessor + ajax.urlSeparator(this.serverProcessor) + [\"dhx_user=\" + this._user, \"dhx_version=\" + version].join(\"&\");\r\n\t\turl = url.replace(\"editing=true&\", \"\");\r\n\t\tthis.getUpdates(url, function (xml) {\r\n\t\t\tvar vers = ajax.xpath(\"//userdata\", xml);\r\n\t\t\tself.$scheduler.setUserData(0, \"version\", self._getXmlNodeValue(vers[0]));\r\n\r\n\t\t\tvar updates = ajax.xpath(\"//update\", xml);\r\n\t\t\tif (updates.length) {\r\n\t\t\t\tself._silent_mode = true;\r\n\r\n\t\t\t\tfor (var i = 0; i < updates.length; i++) {\r\n\t\t\t\t\tvar status = updates[i].getAttribute(\"status\");\r\n\t\t\t\t\tvar id = updates[i].getAttribute(\"id\");\r\n\t\t\t\t\tvar parent = updates[i].getAttribute(\"parent\");\r\n\t\t\t\t\tswitch (status) {\r\n\t\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"insertCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"updated\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"updateCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"deleteCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tself._silent_mode = false;\r\n\t\t\t}\r\n\t\t\tself._update_busy = false;\r\n\t\t\tself = null;\r\n\t\t});\r\n\t},\r\n\r\n\tdestructor: function() {\r\n\t\tthis.callEvent(\"onDestroy\", []);\r\n\t\tthis.detachAllEvents();\r\n\r\n\t\tthis.updatedRows = [];\r\n\t\tthis._in_progress = {};\r\n\t\tthis._invalid = {};\r\n\t\tthis._headers = null;\r\n\t\tthis._payload = null;\r\n\t\tdelete this._initialized;\r\n\t},\r\n\r\n\turl: function(url) {\r\n\t\tthis.serverProcessor = this._serverProcessor = url;\r\n\t},\r\n\r\n\t_serializeAsJSON: function(data) {\r\n\t\tif (typeof data === \"string\") {\r\n\t\t\treturn data;\r\n\t\t}\r\n\r\n\t\tvar copy = this.$scheduler.utils.copy(data);\r\n\t\tif (this._tMode === \"REST-JSON\") {\r\n\t\t\tdelete copy.id;\r\n\t\t\tdelete copy[this.action_param];\r\n\t\t}\r\n\r\n\t\treturn JSON.stringify(copy);\r\n\t},\r\n\r\n\t// GET/POST/JSON modes of the dataProcessor didn't send the whole data items in 'delete' requests\r\n\t// clear extra info from the data in order not to change the request format\r\n\t_cleanupArgumentsBeforeSend: function(dataToSend) {\r\n\t\tvar processedData;\r\n\t\tif(dataToSend[this.action_param] === undefined){// hash of updated items, and not an individual item\r\n\t\t\tprocessedData = {};\r\n\t\t\tfor(var i in dataToSend) {\r\n\t\t\t\tprocessedData[i] = this._cleanupArgumentsBeforeSend(dataToSend[i]);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tprocessedData = this._cleanupItemBeforeSend(dataToSend);\r\n\t\t}\r\n\t\treturn processedData;\r\n\t},\r\n\t_cleanupItemBeforeSend: function(updatedItem) {\r\n\t\tvar output = null;\r\n\t\tif(updatedItem){\r\n\t\t\tif(updatedItem[this.action_param] === \"deleted\"){\r\n\t\t\t\toutput = {};\r\n\t\t\t\toutput.id = updatedItem.id;\r\n\t\t\t\toutput[this.action_param] = updatedItem[this.action_param];\r\n\t\t\t}else{\r\n\t\t\t\toutput = updatedItem;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn output;\r\n\t},\r\n\r\n\t_forEachUpdatedRow: function(code) {\r\n\t\tvar updatedRows = this.updatedRows.slice();\r\n\t\tfor (var i = 0; i < updatedRows.length; i++) {\r\n\t\t\tvar rowId = updatedRows[i];\r\n\t\t\tif (this.$scheduler.getUserData(rowId, this.action_param)) {\r\n\t\t\t\tcode.call(this, rowId);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\t_prepareItemForJson(item){\r\n\t\tconst processedItem = {};\r\n\t\tconst scheduler = this.$scheduler;\r\n\t\tconst copy = scheduler.utils.copy(item);\r\n\t\tfor (let i in copy) {\r\n\t\t\tlet prop = copy[i];\r\n\t\t\tif (i.indexOf(\"_\") === 0) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} else if (prop){\r\n\t\t\t\tif(prop.getUTCFullYear){\r\n\t\t\t\t\tprocessedItem[i] = scheduler._helpers.formatDate(prop);\r\n\t\t\t\t} else if(typeof prop == \"object\") {\r\n\t\t\t\t\tprocessedItem[i] = this._prepareItemForJson(prop);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprocessedItem[i] = prop; \r\n\t\t\t\t}\r\n\t\t\t} else if (prop !== undefined){\r\n\t\t\t\tprocessedItem[i] = prop; \r\n\t\t\t}\r\n\t\t}\r\n\t\tprocessedItem[this.action_param] = scheduler.getUserData(item.id, this.action_param);\r\n\t\treturn processedItem;\r\n\t},\r\n\t_prepareItemForForm(item){\r\n\t\tconst processedItem = {};\r\n\t\tconst scheduler = this.$scheduler;\r\n\t\tconst copy = scheduler.utils.copy(item);\r\n\t\tfor (var i in copy) {\r\n\t\t\tlet prop = copy[i];\r\n\t\t\tif (i.indexOf(\"_\") === 0) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} else if (prop) {\r\n\t\t\t\tif(prop.getUTCFullYear){\r\n\t\t\t\t\tprocessedItem[i] = scheduler._helpers.formatDate(prop);\r\n\t\t\t\t} else if(typeof prop == \"object\") {\r\n\t\t\t\t\tprocessedItem[i] = this._prepareItemForForm(prop);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprocessedItem[i] = prop;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tprocessedItem[i] = \"\"; // for all falthy values\r\n\t\t\t}\r\n\t\t}\r\n\t\tprocessedItem[this.action_param] = scheduler.getUserData(item.id, this.action_param);\r\n\t\treturn processedItem;\r\n\t},\r\n\t_prepareDataItem: function(item) {\r\n\t\tif(this._serializeAsJson){\r\n\t\t\treturn this._prepareItemForJson(item);\r\n\t\t}else {\r\n\t\t\treturn this._prepareItemForForm(item);\r\n\t\t}\r\n\t},\r\n\t_getRowData: function(id) {\r\n\t\tvar dataItem = this.$scheduler.getEvent(id);\r\n\t\tif (!dataItem) {\r\n\t\t\tdataItem = { id: id };\r\n\t\t}\r\n\t\treturn this._prepareDataItem(dataItem);\r\n\t}\r\n};\r\n\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler.createDataProcessor = function(config) {\r\n\tvar router;\r\n\tvar tMode;\r\n\tif (config instanceof Function) {\r\n\t\trouter = config;\r\n\t} else if (config.hasOwnProperty(\"router\")) {\r\n\t\trouter = config.router;\r\n\t} else if(config.hasOwnProperty(\"event\")){\r\n\t\trouter = config;\r\n\t}\r\n\r\n\tif (router) {\r\n\t\ttMode = \"CUSTOM\";\r\n\t} else {\r\n\t\ttMode = config.mode || \"REST-JSON\";\r\n\t}\r\n\r\n\tvar dp = new DataProcessor(config.url);\r\n\tdp.init(scheduler);\r\n\tdp.setTransactionMode({\r\n\t\tmode: tMode,\r\n\t\trouter: router\r\n\t}, config.batchUpdate); // FIXME: config.batchUpdate where it is explained?\r\n\treturn dp;\r\n};\r\n\r\nscheduler.DataProcessor = DataProcessor;\r\n\r\n}\r\n\r\n//var dataProcessor = global.dataProcessor = DataProcessor; // for old","import utils from \"./utils/utils\";\r\nimport domHelpers from \"./utils/dom_helpers\";\r\n\r\n\r\nexport default function(scheduler) {\r\n\r\n\tvar boxAttribute = \"data-dhxbox\";\r\n\r\n\tvar _dhx_msg_cfg = null;\r\n\r\n\tfunction callback(config, result) {\r\n\t\tvar usercall = config.callback;\r\n\t\tmodalBox.hide(config.box);\r\n\r\n\t\t_dhx_msg_cfg = config.box = null;\r\n\tif (usercall)\r\n\t\t\tusercall(result);\r\n\t}\r\n\r\n\tfunction modal_key(event) {\r\n\t\tif (_dhx_msg_cfg) {\r\n\r\n\t\t\tvar code = event.which || event.keyCode;\r\n\t\t\tvar preventDefault = false;\r\n\r\n\t\t\tif (messageBox.keyboard) {\r\n\t\t\t\tif (code == 13 || code == 32) {\r\n\t\t\t\t\t// default behavior is to confirm/submit popup on space/enter\r\n\t\t\t\t\t// if browser focus is set on button element - do button click instead of default behavior\r\n\t\t\t\t\tvar target = event.target || event.srcElement;\r\n\t\t\t\t\tif (domHelpers.getClassName(target).indexOf(\"scheduler_popup_button\") > -1 && target.click) {\r\n\t\t\t\t\t\ttarget.click();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcallback(_dhx_msg_cfg, true);\r\n\t\t\t\t\t\tpreventDefault = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (code == 27) {\r\n\t\t\t\t\tcallback(_dhx_msg_cfg, false);\r\n\t\t\t\t\tpreventDefault = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (preventDefault) {\r\n\t\t\t\tif (event.preventDefault){\r\n\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t}\r\n\t\t\t\treturn !(event.cancelBubble = true);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.event(document, \"keydown\", modal_key, true);\r\n\r\n\tfunction modality(mode) {\r\n\t\tif (!modality.cover) {\r\n\t\t\tmodality.cover = document.createElement(\"div\");\r\n\t\t\t//necessary for IE only\r\n\t\t\tscheduler.event(modality.cover, \"keydown\", modal_key);\r\n\t\t\tmodality.cover.className = \"dhx_modal_cover\";\r\n\t\t\tdocument.body.appendChild(modality.cover);\r\n\t\t}\r\n\r\n\t\tmodality.cover.style.display = mode ? \"inline-block\" : \"none\";\r\n\t}\r\n\r\n\tfunction button(text, classValue, result) {\r\n\t\tvar buttonAriaAttrs = scheduler._waiAria.messageButtonAttrString(text);\r\n\t\tvar name = (classValue || \"\").toLowerCase().replace(/ /g, \"_\");\r\n\t\tvar buttonCss = `scheduler_${name}_button dhtmlx_${name}_button`; \r\n\t\treturn `
${text}
`;\r\n\t}\r\n\r\n\tfunction info(text) {\r\n\t\tif (!messageBox.area) {\r\n\t\t\tmessageBox.area = document.createElement(\"div\");\r\n\t\t\tmessageBox.area.className = \"scheduler_message_area dhtmlx_message_area\";\r\n\t\t\tmessageBox.area.style[messageBox.position] = \"5px\";\r\n\t\t\tdocument.body.appendChild(messageBox.area);\r\n\t\t}\r\n\r\n\t\tmessageBox.hide(text.id);\r\n\t\tvar message = document.createElement(\"div\");\r\n\t\tmessage.innerHTML = \"
\" + text.text + \"
\";\r\n\t\tmessage.className = \"scheduler-info dhtmlx-info scheduler-\" + text.type + \" dhtmlx-\" + text.type;\r\n\t\tscheduler.event(message, \"click\",function (e) {\r\n if(text.callback) {\r\n text.callback.call(this, e);\r\n }\r\n\t\t\tmessageBox.hide(text.id);\r\n\t\t\ttext = null;\r\n\t\t});\r\n\r\n\t\tscheduler._waiAria.messageInfoAttr(message);\r\n\r\n\t\tif (messageBox.position == \"bottom\" && messageBox.area.firstChild)\r\n\t\t\tmessageBox.area.insertBefore(message, messageBox.area.firstChild);\r\n\t\telse\r\n\t\t\tmessageBox.area.appendChild(message);\r\n\r\n\t\tif (text.expire > 0)\r\n\t\t\tmessageBox.timers[text.id] = window.setTimeout(function () {\r\n\t\t\t\t// GS-1213: We need that when Scheduler is destroyed\r\n\t\t\t\tif (messageBox) messageBox.hide(text.id);\r\n\t\t\t}, text.expire);\r\n\r\n\t\tmessageBox.pull[text.id] = message;\r\n\t\tmessage = null;\r\n\r\n\t\treturn text.id;\r\n\t}\r\n\r\n\tfunction getFirstDefined() {\r\n\t\tvar values = [].slice.apply(arguments, [0]);\r\n\r\n\t\tfor (var i = 0; i < values.length; i++) {\r\n\t\t\tif (values[i]) {\r\n\t\t\t\treturn values[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tfunction _boxStructure(config, ok, cancel) {\r\n\t\tvar box = document.createElement(\"div\");\r\n\r\n\t\tvar contentId = utils.uid();\r\n\t\tscheduler._waiAria.messageModalAttr(box, contentId);\r\n\r\n\r\n\t\tbox.className = \" scheduler_modal_box dhtmlx_modal_box scheduler-\" + config.type + \" dhtmlx-\" + config.type;\r\n\t\tbox.setAttribute(boxAttribute, 1);\r\n\r\n\t\tvar inner = '';\r\n\r\n\t\tif (config.width)\r\n\t\t\tbox.style.width = config.width;\r\n\t\tif (config.height)\r\n\t\t\tbox.style.height = config.height;\r\n\t\tif (config.title)\r\n\t\t\tinner += '
' + config.title + '
';\r\n\t\tinner += '
' + (config.content ? '' : config.text) + '
';\r\n\t\tif (ok)\r\n\t\t\tinner += button(getFirstDefined(config.ok, scheduler.locale.labels.message_ok, \"OK\"), \"ok\", true);\r\n\t\tif (cancel)\r\n\t\t\tinner += button(getFirstDefined(config.cancel, scheduler.locale.labels.message_cancel, \"Cancel\"), \"cancel\", false);\r\n\r\n\t\tif (config.buttons) {\r\n\t\t\tfor (var i = 0; i < config.buttons.length; i++) {\r\n\t\t\t\tvar btn = config.buttons[i];\r\n\t\t\t\tif (typeof btn == \"object\") {\r\n\t\t\t\t\t// Support { label:\"Save\", css:\"main_button\", value:\"save\" }\r\n\t\t\t\t\tvar label = btn.label;\r\n\t\t\t\t\tvar css = btn.css || (\"scheduler_\" + btn.label.toLowerCase() + \"_button dhtmlx_\" + btn.label.toLowerCase() + \"_button\");\r\n\t\t\t\t\tvar value = btn.value || i;\r\n\t\t\t\t\tinner += button(label, css, value);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tinner += button(btn, btn, i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tinner += '
';\r\n\t\tbox.innerHTML = inner;\r\n\r\n\t\tif (config.content) {\r\n\t\t\tvar node = config.content;\r\n\t\t\tif (typeof node == \"string\")\r\n\t\t\t\tnode = document.getElementById(node);\r\n\t\t\tif (node.style.display == 'none')\r\n\t\t\t\tnode.style.display = \"\";\r\n\t\t\tbox.childNodes[config.title ? 1 : 0].appendChild(node);\r\n\t\t}\r\n\r\n\t\tscheduler.event(box, \"click\", function (event) {\r\n\t\t\tvar source = event.target || event.srcElement;\r\n\t\t\tif (!source.className) source = source.parentNode;\r\n\t\t\tif (domHelpers.closest(source, \".scheduler_popup_button\")) {\r\n\t\t\t\tvar result = source.getAttribute(\"data-result\");\r\n\t\t\t\tresult = (result == \"true\") || (result == \"false\" ? false : result);\r\n\t\t\t\tcallback(config, result);\r\n\t\t\t}\r\n\t\t});\r\n\t\tconfig.box = box;\r\n\t\tif (ok || cancel)\r\n\t\t\t_dhx_msg_cfg = config;\r\n\r\n\t\treturn box;\r\n\t}\r\n\r\n\tfunction _createBox(config, ok, cancel) {\r\n\t\tvar box = config.tagName ? config : _boxStructure(config, ok, cancel);\r\n\r\n\t\tif (!config.hidden)\r\n\t\t\tmodality(true);\r\n\t\tdocument.body.appendChild(box);\r\n\t\tvar x = Math.abs(Math.floor(((window.innerWidth || document.documentElement.offsetWidth) - box.offsetWidth) / 2));\r\n\t\tvar y = Math.abs(Math.floor(((window.innerHeight || document.documentElement.offsetHeight) - box.offsetHeight) / 2));\r\n\t\tif (config.position == \"top\")\r\n\t\t\tbox.style.top = \"-3px\";\r\n\t\telse\r\n\t\t\tbox.style.top = y + 'px';\r\n\t\tbox.style.left = x + 'px';\r\n\t\t//necessary for IE only\r\n\t\tscheduler.event(box, \"keydown\", modal_key);\r\n\r\n\t\tmodalBox.focus(box);\r\n\r\n\t\tif (config.hidden)\r\n\t\t\tmodalBox.hide(box);\r\n\r\n\t\tscheduler.callEvent(\"onMessagePopup\", [box]);\r\n\t\treturn box;\r\n\t}\r\n\r\n\tfunction alertPopup(config) {\r\n\t\treturn _createBox(config, true, false);\r\n\t}\r\n\r\n\tfunction confirmPopup(config) {\r\n\t\treturn _createBox(config, true, true);\r\n\t}\r\n\r\n\tfunction boxPopup(config) {\r\n\t\treturn _createBox(config);\r\n\t}\r\n\r\n\tfunction box_params(text, type, callback) {\r\n\t\tif (typeof text != \"object\") {\r\n\t\t\tif (typeof type == \"function\") {\r\n\t\t\t\tcallback = type;\r\n\t\t\t\ttype = \"\";\r\n\t\t\t}\r\n\t\t\ttext = {text: text, type: type, callback: callback};\r\n\t\t}\r\n\t\treturn text;\r\n\t}\r\n\r\n\tfunction params(text, type, expire, id, callback) {\r\n\t\tif (typeof text != \"object\")\r\n\t\t\ttext = {text: text, type: type, expire: expire, id: id, callback: callback};\r\n\t\ttext.id = text.id || utils.uid();\r\n\t\ttext.expire = text.expire || messageBox.expire;\r\n\t\treturn text;\r\n\t}\r\n\r\n\tvar alertBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"confirm\";\r\n\t\treturn alertPopup(text);\r\n\t};\r\n\tvar confirmBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"alert\";\r\n\t\treturn confirmPopup(text);\r\n\t};\r\n\tvar modalBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"alert\";\r\n\t\treturn boxPopup(text);\r\n\t};\r\n\tmodalBox.hide = function (node) {\r\n\t\twhile (node && node.getAttribute && !node.getAttribute(boxAttribute))\r\n\t\t\tnode = node.parentNode;\r\n\t\tif (node) {\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t\tmodality(false);\r\n\r\n\t\t\tscheduler.callEvent(\"onAfterMessagePopup\", [node]);\r\n\t\t}\r\n\t};\r\n\r\n\tmodalBox.focus = function (node) {\r\n\t\tsetTimeout(function () {\r\n\t\t\tvar focusable = domHelpers.getFocusableNodes(node);\r\n\t\t\tif (focusable.length) {\r\n\t\t\t\tif (focusable[0].focus) focusable[0].focus();\r\n\t\t\t}\r\n\t\t}, 1);\r\n\t};\r\n\r\n\tvar messageBox = function (text, type, expire, id) {\r\n\t\ttext = params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"info\";\r\n\r\n\t\tvar subtype = text.type.split(\"-\")[0];\r\n\t\tswitch (subtype) {\r\n\t\t\tcase \"alert\":\r\n\t\t\t\treturn alertPopup(text);\r\n\t\t\tcase \"confirm\":\r\n\t\t\t\treturn confirmPopup(text);\r\n\t\t\tcase \"modalbox\":\r\n\t\t\t\treturn boxPopup(text);\r\n\t\t\tdefault:\r\n\t\t\t\treturn info(text);\r\n\t\t}\r\n\t};\r\n\r\n\tmessageBox.seed = (new Date()).valueOf();\r\n\tmessageBox.uid = utils.uid;\r\n\tmessageBox.expire = 4000;\r\n\tmessageBox.keyboard = true;\r\n\tmessageBox.position = \"top\";\r\n\tmessageBox.pull = {};\r\n\tmessageBox.timers = {};\r\n\r\n\tmessageBox.hideAll = function () {\r\n\t\tfor (var key in messageBox.pull)\r\n\t\t\tmessageBox.hide(key);\r\n\t};\r\n\tmessageBox.hide = function (id) {\r\n\t\tvar obj = messageBox.pull[id];\r\n\t\tif (obj && obj.parentNode) {\r\n\t\t\twindow.setTimeout(function () {\r\n\t\t\t\tobj.parentNode.removeChild(obj);\r\n\t\t\t\tobj = null;\r\n\t\t\t}, 2000);\r\n\t\t\tobj.className += \" hidden\";\r\n\r\n\t\t\tif (messageBox.timers[id])\r\n\t\t\t\twindow.clearTimeout(messageBox.timers[id]);\r\n\t\t\tdelete messageBox.pull[id];\r\n\t\t}\r\n\t};\r\n\r\n\tvar popups = [];\r\n\tscheduler.attachEvent(\"onMessagePopup\", function(box){\r\n\t\tpopups.push(box);\r\n\t});\r\n\tscheduler.attachEvent(\"onAfterMessagePopup\", function(box){\r\n\t\tfor(var i = 0; i < popups.length; i++){\r\n\t\t\tif(popups[i] === box){\r\n\t\t\t\tpopups.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tif(modality.cover && modality.cover.parentNode){\r\n\t\t\tmodality.cover.parentNode.removeChild(modality.cover);\r\n\t\t}\r\n\r\n\t\tfor(var i = 0; i < popups.length; i++){\r\n\t\t\tif(popups[i].parentNode){\r\n\t\t\t\tpopups[i].parentNode.removeChild(popups[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tpopups = null;\r\n\r\n\t\tif(messageBox.area && messageBox.area.parentNode){\r\n\t\t\tmessageBox.area.parentNode.removeChild(messageBox.area);\r\n\t\t}\r\n\t\tmessageBox = null;\r\n\t});\r\n\r\n\treturn {\r\n\t\talert: alertBox,\r\n\t\tconfirm: confirmBox,\r\n\t\tmessage: messageBox,\r\n\t\tmodalbox: modalBox\r\n\t};\r\n}","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"كانون الثاني\", \"شباط\", \"آذار\", \"نيسان\", \"أيار\", \"حزيران\", \"تموز\", \"آب\", \"أيلول\", \"تشرين الأول\", \"تشرين الثاني\", \"كانون الأول\"],\r\n\t\tmonth_short: [\"يناير\", \"فبراير\", \"مارس\", \"أبريل\", \"مايو\", \"يونيو\", \"يوليو\", \"أغسطس\", \"سبتمبر\", \"أكتوبر\", \"نوفمبر\", \"ديسمبر\"],\r\n\t\tday_full: [\"الأحد\", \"الأثنين\", \"ألثلاثاء\", \"الأربعاء\", \"ألحميس\", \"ألجمعة\", \"السبت\"],\r\n\t\tday_short: [\"احد\", \"اثنين\", \"ثلاثاء\", \"اربعاء\", \"خميس\", \"جمعة\", \"سبت\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"اليوم\",\r\n\t\tday_tab: \"يوم\",\r\n\t\tweek_tab: \"أسبوع\",\r\n\t\tmonth_tab: \"شهر\",\r\n\t\tnew_event: \"حدث جديد\",\r\n\t\ticon_save: \"اخزن\",\r\n\t\ticon_cancel: \"الغاء\",\r\n\t\ticon_details: \"تفاصيل\",\r\n\t\ticon_edit: \"تحرير\",\r\n\t\ticon_delete: \"حذف\",\r\n\t\tconfirm_closing: \"التغييرات سوف تضيع, هل انت متأكد؟\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"الحدث سيتم حذفها نهائيا ، هل أنت متأكد؟\",\r\n\t\tsection_description: \"الوصف\",\r\n\t\tsection_time: \"الفترة الزمنية\",\r\n\t\tfull_day: \"طوال اليوم\",\r\n\r\n\t\tconfirm_recurring: \"هل تريد تحرير مجموعة كاملة من الأحداث المتكررة؟\",\r\n\t\tsection_recurring: \"تكرار الحدث\",\r\n\t\tbutton_recurring: \"تعطيل\",\r\n\t\tbutton_recurring_open: \"تمكين\",\r\n\t\tbutton_edit_series: \"تحرير سلسلة\",\r\n\t\tbutton_edit_occurrence: \"تعديل نسخة\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"جدول\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create: \"Drag to create\",\r\n\t\tdrag_to_move: \"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour: \"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"يومي\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"أسبوعي\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"شهري\",\r\n\t\trepeat_radio_year: \"سنوي\",\r\n\t\trepeat_radio_day_type: \"كل\",\r\n\t\trepeat_text_day_count: \"يوم\",\r\n\t\trepeat_radio_day_type2: \"كل يوم عمل\",\r\n\t\trepeat_week: \" تكرار كل\",\r\n\t\trepeat_text_week_count: \"أسبوع في الأيام التالية:\",\r\n\t\trepeat_radio_month_type: \"تكرار\",\r\n\t\trepeat_radio_month_start: \"في\",\r\n\t\trepeat_text_month_day: \"يوم كل\",\r\n\t\trepeat_text_month_count: \"شهر\",\r\n\t\trepeat_text_month_count2_before: \"كل\",\r\n\t\trepeat_text_month_count2_after: \"شهر\",\r\n\t\trepeat_year_label: \"في\",\r\n\t\tselect_year_day2: \"من\",\r\n\t\trepeat_text_year_day: \"يوم\",\r\n\t\tselect_year_month: \"شهر\",\r\n\t\trepeat_radio_end: \"بدون تاريخ انتهاء\",\r\n\t\trepeat_text_occurences_count: \"تكرارات\",\r\n\t\trepeat_radio_end2: \"بعد\",\r\n\t\trepeat_radio_end3: \"ينتهي في\",\r\n\r\n\t\trepeat_never: \"أبداً\",\r\n\t\trepeat_daily: \"كل يوم\",\r\n\t\trepeat_workdays: \"كل يوم عمل\",\r\n\t\trepeat_weekly: \"كل أسبوع\",\r\n\t\trepeat_monthly: \"كل شهر\",\r\n\t\trepeat_yearly: \"كل سنة\",\r\n\t\trepeat_custom: \"تخصيص\",\r\n\t\trepeat_freq_day: \"يوم\",\r\n\t\trepeat_freq_week: \"أسبوع\",\r\n\t\trepeat_freq_month: \"شهر\",\r\n\t\trepeat_freq_year: \"سنة\",\r\n\t\trepeat_on_date: \"في التاريخ\",\r\n\t\trepeat_ends: \"ينتهي\",\r\n\r\n\t\tmonth_for_recurring: [\"يناير\", \"فبراير\", \"مارس\", \"أبريل\", \"مايو\", \"يونيو\", \"يوليو\", \"أغسطس\", \"سبتمبر\", \"أكتوبر\", \"نوفمبر\", \"ديسمبر\"],\r\n\t\tday_for_recurring: [\"الأحد\", \"الإثنين\", \"الثلاثاء\", \"الأربعاء\", \"الخميس\", \"الجمعة\", \"السبت\"]\r\n\t}\r\n};\r\n\r\n\r\n","/*\r\n Translation by Sofya Morozova\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Студзень\", \"Люты\", \"Сакавік\", \"Красавік\", \"Maй\", \"Чэрвень\", \"Ліпень\", \"Жнівень\", \"Верасень\", \"Кастрычнік\", \"Лістапад\", \"Снежань\"],\r\n\t\tmonth_short: [\"Студз\", \"Лют\", \"Сак\", \"Крас\", \"Maй\", \"Чэр\", \"Ліп\", \"Жнів\", \"Вер\", \"Каст\", \"Ліст\", \"Снеж\"],\r\n\t\tday_full: [ \"Нядзеля\", \"Панядзелак\", \"Аўторак\", \"Серада\", \"Чацвер\", \"Пятніца\", \"Субота\"],\r\n\t\tday_short: [\"Нд\", \"Пн\", \"Аўт\", \"Ср\", \"Чцв\", \"Пт\", \"Сб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сёння\",\r\n\t\tday_tab: \"Дзень\",\r\n\t\tweek_tab: \"Тыдзень\",\r\n\t\tmonth_tab: \"Месяц\",\r\n\t\tnew_event: \"Новая падзея\",\r\n\t\ticon_save: \"Захаваць\",\r\n\t\ticon_cancel: \"Адмяніць\",\r\n\t\ticon_details: \"Дэталі\",\r\n\t\ticon_edit: \"Змяніць\",\r\n\t\ticon_delete: \"Выдаліць\",\r\n\t\tconfirm_closing: \"\", //Унесеныя змены будуць страчаны, працягнуць?\r\n\t\tconfirm_deleting: \"Падзея будзе выдалена незваротна, працягнуць?\",\r\n\t\tsection_description: \"Апісанне\",\r\n\t\tsection_time: \"Перыяд часу\",\r\n\t\tfull_day: \"Увесь дзень\",\r\n\r\n\t\tconfirm_recurring: \"Вы хочаце змяніць усю серыю паўтаральных падзей?\",\r\n\t\tsection_recurring: \"Паўтарэнне\",\r\n\t\tbutton_recurring: \"Адключана\",\r\n\t\tbutton_recurring_open: \"Уключана\",\r\n\t\tbutton_edit_series: \"Рэдагаваць серыю\",\r\n\t\tbutton_edit_occurrence: \"Рэдагаваць асобнік\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Спіс\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Апісанне\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Год\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Спіс\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Спic\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Дзень\",\r\n\t\trepeat_radio_week: \"Тыдзень\",\r\n\t\trepeat_radio_month: \"Месяц\",\r\n\t\trepeat_radio_year: \"Год\",\r\n\t\trepeat_radio_day_type: \"Кожны\",\r\n\t\trepeat_text_day_count: \"дзень\",\r\n\t\trepeat_radio_day_type2: \"Кожны працоўны дзень\",\r\n\t\trepeat_week: \" Паўтараць кожны\",\r\n\t\trepeat_text_week_count: \"тыдзень\",\r\n\t\trepeat_radio_month_type: \"Паўтараць\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" чысла кожнага\",\r\n\t\trepeat_text_month_count: \"месяцу\",\r\n\t\trepeat_text_month_count2_before: \"кожны \",\r\n\t\trepeat_text_month_count2_after: \"месяц\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"дзень\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без даты заканчэння\",\r\n\t\trepeat_text_occurences_count: \"паўтораў\",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\trepeat_radio_end3: \"Да \",\r\n\r\n\t\trepeat_never: \"Ніколі\",\r\n\t\trepeat_daily: \"Кожны дзень\",\r\n\t\trepeat_workdays: \"Кожны працоўны дзень\",\r\n\t\trepeat_weekly: \"Кожны тыдзень\",\r\n\t\trepeat_monthly: \"Кожны месяц\",\r\n\t\trepeat_yearly: \"Кожны год\",\r\n\t\trepeat_custom: \"Наладжвальны\",\r\n\t\trepeat_freq_day: \"Дзень\",\r\n\t\trepeat_freq_week: \"Тыдзень\",\r\n\t\trepeat_freq_month: \"Месяц\",\r\n\t\trepeat_freq_year: \"Год\",\r\n\t\trepeat_on_date: \"На дату\",\r\n\t\trepeat_ends: \"Заканчваецца\",\r\n\r\n\t\tmonth_for_recurring: [\"Студзеня\", \"Лютага\", \"Сакавіка\", \"Красавіка\", \"Мая\", \"Чэрвеня\", \"Ліпeня\", \"Жніўня\", \"Верасня\", \"Кастрычніка\", \"Лістапада\", \"Снежня\"],\r\n\t\tday_for_recurring: [\"Нядзелю\", \"Панядзелак\", \"Аўторак\", \"Сераду\", \"Чацвер\", \"Пятніцу\", \"Суботу\"]\r\n\t}\r\n};\r\n","/*\r\n @Traducido por Vicente Adria Bohigues - vicenteadria@hotmail.com\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Gener\", \"Febrer\", \"Març\", \"Abril\", \"Maig\", \"Juny\", \"Juliol\", \"Agost\", \"Setembre\", \"Octubre\", \"Novembre\", \"Desembre\"],\r\n\t\tmonth_short: [\"Gen\", \"Feb\", \"Mar\", \"Abr\", \"Mai\", \"Jun\", \"Jul\", \"Ago\", \"Set\", \"Oct\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Diumenge\", \"Dilluns\", \"Dimarts\", \"Dimecres\", \"Dijous\", \"Divendres\", \"Dissabte\"],\r\n\t\tday_short: [\"Dg\", \"Dl\", \"Dm\", \"Dc\", \"Dj\", \"Dv\", \"Ds\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hui\",\r\n\t\tday_tab: \"Dia\",\r\n\t\tweek_tab: \"Setmana\",\r\n\t\tmonth_tab: \"Mes\",\r\n\t\tnew_event: \"Nou esdeveniment\",\r\n\t\ticon_save: \"Guardar\",\r\n\t\ticon_cancel: \"Cancel·lar\",\r\n\t\ticon_details: \"Detalls\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Esborrar\",\r\n\t\tconfirm_closing: \"\", //\"Els seus canvis es perdràn, continuar ?\"\r\n\t\tconfirm_deleting: \"L'esdeveniment s'esborrarà definitivament, continuar ?\",\r\n\t\tsection_description: \"Descripció\",\r\n\t\tsection_time: \"Periode de temps\",\r\n\t\tfull_day: \"Tot el dia\",\r\n\r\n\t\tconfirm_recurring: \"¿Desitja modificar el conjunt d'esdeveniments repetits?\",\r\n\t\tsection_recurring: \"Repeteixca l'esdeveniment\",\r\n\t\tbutton_recurring: \"Impedit\",\r\n\t\tbutton_recurring_open: \"Permés\",\r\n\t\tbutton_edit_series: \"Edit sèrie\",\r\n\t\tbutton_edit_occurrence: \"Edita Instància\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descripció\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Any\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Taula\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create: \"Drag to create\",\r\n\t\tdrag_to_move: \"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour: \"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diari\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Setmanal\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Mensual\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia\",\r\n\t\trepeat_radio_day_type2: \"Cada dia laborable\",\r\n\t\trepeat_week: \" Repetir cada\",\r\n\t\trepeat_text_week_count: \"setmana els dies següents:\",\r\n\t\trepeat_radio_month_type: \"Repetir\",\r\n\t\trepeat_radio_month_start: \"El\",\r\n\t\trepeat_text_month_day: \"dia cada\",\r\n\t\trepeat_text_month_count: \"mes\",\r\n\t\trepeat_text_month_count2_before: \"cada\",\r\n\t\trepeat_text_month_count2_after: \"mes\",\r\n\t\trepeat_year_label: \"El\",\r\n\t\tselect_year_day2: \"de\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mes\",\r\n\t\trepeat_radio_end: \"Sense data de finalització\",\r\n\t\trepeat_text_occurences_count: \"ocurrències\",\r\n\t\trepeat_radio_end2: \"Després\",\r\n\t\trepeat_radio_end3: \"Finalitzar el\",\r\n\r\n\t\trepeat_never: \"Mai\",\r\n\t\trepeat_daily: \"Cada dia\",\r\n\t\trepeat_workdays: \"Cada dia laborable\",\r\n\t\trepeat_weekly: \"Cada setmana\",\r\n\t\trepeat_monthly: \"Cada mes\",\r\n\t\trepeat_yearly: \"Cada any\",\r\n\t\trepeat_custom: \"Personalitzat\",\r\n\t\trepeat_freq_day: \"Dia\",\r\n\t\trepeat_freq_week: \"Setmana\",\r\n\t\trepeat_freq_month: \"Mes\",\r\n\t\trepeat_freq_year: \"Any\",\r\n\t\trepeat_on_date: \"En la data\",\r\n\t\trepeat_ends: \"Finalitza\",\r\n\r\n\t\tmonth_for_recurring: [\"Gener\", \"Febrer\", \"Març\", \"Abril\", \"Maig\", \"Juny\", \"Juliol\", \"Agost\", \"Setembre\", \"Octubre\", \"Novembre\", \"Desembre\"],\r\n\t\tday_for_recurring: [\"Diumenge\", \"Dilluns\", \"Dimarts\", \"Dimecres\", \"Dijous\", \"Divendres\", \"Dissabte\"]\r\n\t}\r\n};","/*\r\nTranslation by FreezeSoul\r\n*/\r\n//scheduler.config.day_date=\"%M %d日 %D\";\r\n//scheduler.config.default_date=\"%Y年 %M %d日\";\r\n//scheduler.config.month_date=\"%Y年 %M\";\r\n\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"一月\", \"二月\", \"三月\", \"四月\", \"五月\", \"六月\", \"七月\", \"八月\", \"九月\", \"十月\", \"十一月\", \"十二月\"],\r\n\t\tmonth_short: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_full: [\"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\"],\r\n\t\tday_short: [\"日\", \"一\", \"二\", \"三\", \"四\", \"五\", \"六\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"今天\",\r\n\t\tday_tab: \"日\",\r\n\t\tweek_tab: \"周\",\r\n\t\tmonth_tab: \"月\",\r\n\t\tnew_event: \"新建日程\",\r\n\t\ticon_save: \"保存\",\r\n\t\ticon_cancel: \"关闭\",\r\n\t\ticon_details: \"详细\",\r\n\t\ticon_edit: \"编辑\",\r\n\t\ticon_delete: \"删除\",\r\n\t\tconfirm_closing: \"请确认是否撤销修改!\", //Your changes will be lost, are your sure?\r\n\t\tconfirm_deleting: \"是否删除日程?\",\r\n\t\tsection_description: \"描述\",\r\n\t\tsection_time: \"时间范围\",\r\n\t\tfull_day: \"整天\",\r\n\r\n\t\tconfirm_recurring:\"请确认是否将日程设为重复模式?\",\r\n\t\tsection_recurring:\"重复周期\",\r\n\t\tbutton_recurring:\"禁用\",\r\n\t\tbutton_recurring_open:\"启用\",\r\n\t\tbutton_edit_series: \"编辑系列\",\r\n\t\tbutton_edit_occurrence: \"编辑实例\",\r\n\t\t\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"议程\",\r\n\t\tdate:\"日期\",\r\n\t\tdescription:\"说明\",\r\n\t\t\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"今年\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"议程\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab:\"电网\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"按天\",\r\n\t\trepeat_radio_week: \"按周\",\r\n\t\trepeat_radio_month: \"按月\",\r\n\t\trepeat_radio_year: \"按年\",\r\n\t\trepeat_radio_day_type: \"每\",\r\n\t\trepeat_text_day_count: \"天\",\r\n\t\trepeat_radio_day_type2: \"每个工作日\",\r\n\t\trepeat_week: \" 重复 每\",\r\n\t\trepeat_text_week_count: \"星期的:\",\r\n\t\trepeat_radio_month_type: \"重复\",\r\n\t\trepeat_radio_month_start: \"在\",\r\n\t\trepeat_text_month_day: \"日 每\",\r\n\t\trepeat_text_month_count: \"月\",\r\n\t\trepeat_text_month_count2_before: \"每\",\r\n\t\trepeat_text_month_count2_after: \"月\",\r\n\t\trepeat_year_label: \"在\",\r\n\t\tselect_year_day2: \"的\",\r\n\t\trepeat_text_year_day: \"日\",\r\n\t\tselect_year_month: \"月\",\r\n\t\trepeat_radio_end: \"无结束日期\",\r\n\t\trepeat_text_occurences_count: \"次结束\",\r\n\t\trepeat_radio_end2: \"重复\",\r\n\t\trepeat_radio_end3: \"结束于\",\r\n\t\t\r\n\t\trepeat_never: \"从不\",\r\n\t\trepeat_daily: \"每天\",\r\n\t\trepeat_workdays: \"每个工作日\",\r\n\t\trepeat_weekly: \"每周\",\r\n\t\trepeat_monthly: \"每月\",\r\n\t\trepeat_yearly: \"每年\",\r\n\t\trepeat_custom: \"自定义\",\r\n\t\trepeat_freq_day: \"天\",\r\n\t\trepeat_freq_week: \"周\",\r\n\t\trepeat_freq_month: \"月\",\r\n\t\trepeat_freq_year: \"年\",\r\n\t\trepeat_on_date: \"在日期\",\r\n\t\trepeat_ends: \"结束\",\r\n\r\n\t\tmonth_for_recurring: [\"一月\", \"二月\", \"三月\", \"四月\", \"五月\", \"六月\", \"七月\", \"八月\", \"九月\", \"十月\", \"十一月\", \"十二月\"],\r\n\t\tday_for_recurring: [\"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Leden\", \"Únor\", \"Březen\", \"Duben\", \"Květen\", \"Červen\", \"Červenec\", \"Srpen\", \"Září\", \"Říjen\", \"Listopad\", \"Prosinec\"],\r\n\t\tmonth_short: [\"Led\", \"Ún\", \"Bře\", \"Dub\", \"Kvě\", \"Čer\", \"Čec\", \"Srp\", \"Září\", \"Říj\", \"List\", \"Pro\"],\r\n\t\tday_full: [\"Neděle\", \"Pondělí\", \"Úterý\", \"Středa\", \"Čtvrtek\", \"Pátek\", \"Sobota\"],\r\n\t\tday_short: [\"Ne\", \"Po\", \"Út\", \"St\", \"Čt\", \"Pá\", \"So\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dnes\",\r\n\t\tday_tab: \"Den\",\r\n\t\tweek_tab: \"Týden\",\r\n\t\tmonth_tab: \"Měsíc\",\r\n\t\tnew_event: \"Nová událost\",\r\n\t\ticon_save: \"Uložit\",\r\n\t\ticon_cancel: \"Zpět\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edituj\",\r\n\t\ticon_delete: \"Smazat\",\r\n\t\tconfirm_closing: \"\", //Vaše změny budou ztraceny, opravdu ?\r\n\t\tconfirm_deleting: \"Událost bude trvale smazána, opravdu?\",\r\n\t\tsection_description: \"Poznámky\",\r\n\t\tsection_time: \"Doba platnosti\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Přejete si upravit celou řadu opakovaných událostí?\",\r\n\t\tsection_recurring: \"Opakování události\",\r\n\t\tbutton_recurring: \"Vypnuto\",\r\n\t\tbutton_recurring_open: \"Zapnuto\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Upravit instance\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Program\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Poznámka\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\t\tfull_day: \"Full day\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Program\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Mřížka\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Denně\",\r\n\t\trepeat_radio_week: \"Týdně\",\r\n\t\trepeat_radio_month: \"Měsíčně\",\r\n\t\trepeat_radio_year: \"Ročně\",\r\n\t\trepeat_radio_day_type: \"každý\",\r\n\t\trepeat_text_day_count: \"Den\",\r\n\t\trepeat_radio_day_type2: \"pracovní dny\",\r\n\t\trepeat_week: \"Opakuje každých\",\r\n\t\trepeat_text_week_count: \"Týdnů na:\",\r\n\t\trepeat_radio_month_type: \"u každého\",\r\n\t\trepeat_radio_month_start: \"na\",\r\n\t\trepeat_text_month_day: \"Den každého\",\r\n\t\trepeat_text_month_count: \"Měsíc\",\r\n\t\trepeat_text_month_count2_before: \"každý\",\r\n\t\trepeat_text_month_count2_after: \"Měsíc\",\r\n\t\trepeat_year_label: \"na\",\r\n\t\tselect_year_day2: \"v\",\r\n\t\trepeat_text_year_day: \"Den v\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"bez data ukončení\",\r\n\t\trepeat_text_occurences_count: \"Události\",\r\n\t\trepeat_radio_end2: \"po\",\r\n\t\trepeat_radio_end3: \"Konec\",\r\n\r\n\t\trepeat_never: \"Nikdy\",\r\n\t\trepeat_daily: \"Každý den\",\r\n\t\trepeat_workdays: \"Každý pracovní den\",\r\n\t\trepeat_weekly: \"Každý týden\",\r\n\t\trepeat_monthly: \"Každý měsíc\",\r\n\t\trepeat_yearly: \"Každý rok\",\r\n\t\trepeat_custom: \"Vlastní\",\r\n\t\trepeat_freq_day: \"Den\",\r\n\t\trepeat_freq_week: \"Týden\",\r\n\t\trepeat_freq_month: \"Měsíc\",\r\n\t\trepeat_freq_year: \"Rok\",\r\n\t\trepeat_on_date: \"Na datum\",\r\n\t\trepeat_ends: \"Končí\",\r\n\r\n\t\tmonth_for_recurring: [\"Leden\", \"Únor\", \"Březen\", \"Duben\", \"Květen\", \"Červen\", \"Červenec\", \"Srpen\", \"Září\", \"Říjen\", \"Listopad\", \"Prosinec\"],\r\n\t\tday_for_recurring: [\"Neděle \", \"Pondělí\", \"Úterý\", \"Středa\", \"Čtvrtek\", \"Pátek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Marts\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Man\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uge\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny begivenhed\",\r\n\t\ticon_save: \"Gem\",\r\n\t\ticon_cancel: \"Fortryd\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Tilret\",\r\n\t\ticon_delete: \"Slet\",\r\n\t\tconfirm_closing: \"Dine rettelser vil gå tabt.. Er dy sikker?\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Bigivenheden vil blive slettet permanent. Er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du tilrette hele serien af gentagne begivenheder?\",\r\n\t\tsection_recurring: \"Gentag begivenhed\",\r\n\t\tbutton_recurring: \"Frakoblet\",\r\n\t\tbutton_recurring_open: \"Tilkoblet\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Rediger en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dagsorden\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dagsorden\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\",\r\n\t\trepeat_radio_week: \"Ugenlig\",\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"På hver arbejdsdag\",\r\n\t\trepeat_week: \" Gentager sig hver\",\r\n\t\trepeat_text_week_count: \"uge på følgende dage:\",\r\n\t\trepeat_radio_month_type: \"Hver den\",\r\n\t\trepeat_radio_month_start: \"Den\",\r\n\t\trepeat_text_month_day: \" i hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"Den\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Ingen slutdato\",\r\n\t\trepeat_text_occurences_count: \"gentagelse\",\r\n\t\trepeat_radio_end2: \"Efter\",\r\n\t\trepeat_radio_end3: \"Slut\",\r\n\r\n\t\trepeat_never: \"Aldrig\",\r\n\t\trepeat_daily: \"Hver dag\",\r\n\t\trepeat_workdays: \"Hver hverdag\",\r\n\t\trepeat_weekly: \"Hver uge\",\r\n\t\trepeat_monthly: \"Hver måned\",\r\n\t\trepeat_yearly: \"Hvert år\",\r\n\t\trepeat_custom: \"Brugerdefineret\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Uge\",\r\n\t\trepeat_freq_month: \"Måned\",\r\n\t\trepeat_freq_year: \"År\",\r\n\t\trepeat_on_date: \"På dato\",\r\n\t\trepeat_ends: \"Slutter\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"März\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Dezember\"],\r\n\t\tday_for_recurring: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\" Januar\", \" Februar\", \" März \", \" April\", \" Mai\", \" Juni\", \" Juli\", \" August\", \" September \", \" Oktober\", \" November \", \" Dezember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mär\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dez\"],\r\n\t\tday_full: [ \"Sonntag\", \"Montag\", \"Dienstag\", \" Mittwoch\", \" Donnerstag\", \"Freitag\", \"Samstag\"],\r\n\t\tday_short: [\"So\", \"Mo\", \"Di\", \"Mi\", \"Do\", \"Fr\", \"Sa\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Heute\",\r\n\t\tday_tab: \"Tag\",\r\n\t\tweek_tab: \"Woche\",\r\n\t\tmonth_tab: \"Monat\",\r\n\t\tnew_event: \"neuer Eintrag\",\r\n\t\ticon_save: \"Speichern\",\r\n\t\ticon_cancel: \"Abbrechen\",\r\n\t\ticon_details: \"Details\",\r\n\t\ticon_edit: \"Ändern\",\r\n\t\ticon_delete: \"Löschen\",\r\n\t\tconfirm_closing: \"\", //\"Ihre Veränderungen werden verloren sein, wollen Sie ergänzen? \"\r\n\t\tconfirm_deleting: \"Der Eintrag wird gelöscht\",\r\n\t\tsection_description: \"Beschreibung\",\r\n\t\tsection_time: \"Zeitspanne\",\r\n\t\tfull_day: \"Ganzer Tag\",\r\n\r\n\t\tconfirm_recurring: \"Wollen Sie alle Einträge bearbeiten oder nur diesen einzelnen Eintrag?\",\r\n\t\tsection_recurring: \"Wiederholung\",\r\n\t\tbutton_recurring: \"Aus\",\r\n\t\tbutton_recurring_open: \"An\",\r\n\t\tbutton_edit_series: \"Bearbeiten Sie die Serie\",\r\n\t\tbutton_edit_occurrence: \"Bearbeiten Sie eine Kopie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Beschreibung\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Jahre\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Täglich\",\r\n\t\trepeat_radio_week: \"Wöchentlich\",\r\n\t\trepeat_radio_month: \"Monatlich\",\r\n\t\trepeat_radio_year: \"Jährlich\",\r\n\t\trepeat_radio_day_type: \"jeden\",\r\n\t\trepeat_text_day_count: \"Tag\",\r\n\t\trepeat_radio_day_type2: \"an jedem Arbeitstag\",\r\n\t\trepeat_week: \" Wiederholt sich jede\",\r\n\t\trepeat_text_week_count: \"Woche am:\",\r\n\t\trepeat_radio_month_type: \"an jedem\",\r\n\t\trepeat_radio_month_start: \"am\",\r\n\t\trepeat_text_month_day: \"Tag eines jeden\",\r\n\t\trepeat_text_month_count: \"Monats\",\r\n\t\trepeat_text_month_count2_before: \"jeden\",\r\n\t\trepeat_text_month_count2_after: \"Monats\",\r\n\t\trepeat_year_label: \"am\",\r\n\t\tselect_year_day2: \"im\",\r\n\t\trepeat_text_year_day: \"Tag im\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"kein Enddatum\",\r\n\t\trepeat_text_occurences_count: \"Ereignissen\",\r\n\t\trepeat_radio_end3: \"Schluß\",\r\n\t\trepeat_radio_end2: \"nach\",\r\n\r\n\t\trepeat_never: \"Nie\",\r\n\t\trepeat_daily: \"Jeden Tag\",\r\n\t\trepeat_workdays: \"Jeden Werktag\",\r\n\t\trepeat_weekly: \"Jede Woche\",\r\n\t\trepeat_monthly: \"Jeden Monat\",\r\n\t\trepeat_yearly: \"Jedes Jahr\",\r\n\t\trepeat_custom: \"Benutzerdefiniert\",\r\n\t\trepeat_freq_day: \"Tag\",\r\n\t\trepeat_freq_week: \"Woche\",\r\n\t\trepeat_freq_month: \"Monat\",\r\n\t\trepeat_freq_year: \"Jahr\",\r\n\t\trepeat_on_date: \"Am Datum\",\r\n\t\trepeat_ends: \"Endet\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"März\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Dezember\"],\r\n\t\tday_for_recurring: [\"Sonntag\", \"Montag\", \"Dienstag\", \"Mittwoch\", \"Donnerstag\", \"Freitag\", \"Samstag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Ιανουάριος\", \"Φεβρουάριος\", \"Μάρτιος\", \"Απρίλιος\", \"Μάϊος\", \"Ιούνιος\", \"Ιούλιος\", \"Αύγουστος\", \"Σεπτέμβριος\", \"Οκτώβριος\", \"Νοέμβριος\", \"Δεκέμβριος\"],\r\n\t\tmonth_short: [\"ΙΑΝ\", \"ΦΕΒ\", \"ΜΑΡ\", \"ΑΠΡ\", \"ΜΑΙ\", \"ΙΟΥΝ\", \"ΙΟΥΛ\", \"ΑΥΓ\", \"ΣΕΠ\", \"ΟΚΤ\", \"ΝΟΕ\", \"ΔΕΚ\"],\r\n\t\tday_full: [\"Κυριακή\", \"Δευτέρα\", \"Τρίτη\", \"Τετάρτη\", \"Πέμπτη\", \"Παρασκευή\", \"Σάββατο\"],\r\n\t\tday_short: [\"ΚΥ\", \"ΔΕ\", \"ΤΡ\", \"ΤΕ\", \"ΠΕ\", \"ΠΑ\", \"ΣΑ\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Σήμερα\",\r\n\t\tday_tab: \"Ημέρα\",\r\n\t\tweek_tab: \"Εβδομάδα\",\r\n\t\tmonth_tab: \"Μήνας\",\r\n\t\tnew_event: \"Νέο έργο\",\r\n\t\ticon_save: \"Αποθήκευση\",\r\n\t\ticon_cancel: \"Άκυρο\",\r\n\t\ticon_details: \"Λεπτομέρειες\",\r\n\t\ticon_edit: \"Επεξεργασία\",\r\n\t\ticon_delete: \"Διαγραφή\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Το έργο θα διαγραφεί οριστικά. Θέλετε να συνεχίσετε;\",\r\n\t\tsection_description: \"Περιγραφή\",\r\n\t\tsection_time: \"Χρονική περίοδος\",\r\n\t\tfull_day: \"Πλήρης Ημέρα\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Θέλετε να επεξεργασθείτε ολόκληρη την ομάδα των επαναλαμβανόμενων έργων;\",\r\n\t\tsection_recurring: \"Επαναλαμβανόμενο έργο\",\r\n\t\tbutton_recurring: \"Ανενεργό\",\r\n\t\tbutton_recurring_open: \"Ενεργό\",\r\n\t\tbutton_edit_series: \"Επεξεργαστείτε τη σειρά\",\r\n\t\tbutton_edit_occurrence: \"Επεξεργασία ένα αντίγραφο\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Ημερήσια Διάταξη\",\r\n\t\tdate: \"Ημερομηνία\",\r\n\t\tdescription: \"Περιγραφή\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Έτος\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Ημερήσια Διάταξη\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Πλέγμα\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Ημερησίως\",\r\n\t\trepeat_radio_week: \"Εβδομαδιαίως\",\r\n\t\trepeat_radio_month: \"Μηνιαίως\",\r\n\t\trepeat_radio_year: \"Ετησίως\",\r\n\t\trepeat_radio_day_type: \"Κάθε\",\r\n\t\trepeat_text_day_count: \"ημέρα\",\r\n\t\trepeat_radio_day_type2: \"Κάθε εργάσιμη\",\r\n\t\trepeat_week: \" Επανάληψη κάθε\",\r\n\t\trepeat_text_week_count: \"εβδομάδα τις επόμενες ημέρες:\",\r\n\t\trepeat_radio_month_type: \"Επανάληψη\",\r\n\t\trepeat_radio_month_start: \"Την\",\r\n\t\trepeat_text_month_day: \"ημέρα κάθε\",\r\n\t\trepeat_text_month_count: \"μήνα\",\r\n\t\trepeat_text_month_count2_before: \"κάθε\",\r\n\t\trepeat_text_month_count2_after: \"μήνα\",\r\n\t\trepeat_year_label: \"Την\",\r\n\t\tselect_year_day2: \"του\",\r\n\t\trepeat_text_year_day: \"ημέρα\",\r\n\t\tselect_year_month: \"μήνα\",\r\n\t\trepeat_radio_end: \"Χωρίς ημερομηνία λήξεως\",\r\n\t\trepeat_text_occurences_count: \"επαναλήψεις\",\r\n\t\trepeat_radio_end3: \"Λήγει την\",\r\n\t\trepeat_radio_end2: \"Μετά από\",\r\n\r\n\t\trepeat_never: \"Ποτέ\",\r\n\t\trepeat_daily: \"Κάθε μέρα\",\r\n\t\trepeat_workdays: \"Κάθε εργάσιμη μέρα\",\r\n\t\trepeat_weekly: \"Κάθε εβδομάδα\",\r\n\t\trepeat_monthly: \"Κάθε μήνα\",\r\n\t\trepeat_yearly: \"Κάθε χρόνο\",\r\n\t\trepeat_custom: \"Προσαρμοσμένο\",\r\n\t\trepeat_freq_day: \"Ημέρα\",\r\n\t\trepeat_freq_week: \"Εβδομάδα\",\r\n\t\trepeat_freq_month: \"Μήνας\",\r\n\t\trepeat_freq_year: \"Χρόνος\",\r\n\t\trepeat_on_date: \"Σε ημερομηνία\",\r\n\t\trepeat_ends: \"Λήγει\",\r\n\r\n\t\tmonth_for_recurring: [\"Ιανουάριος\", \"Φεβρουάριος\", \"Μάρτιος\", \"Απρίλιος\", \"Μάϊος\", \"Ιούνιος\", \"Ιούλιος\", \"Αύγουστος\", \"Σεπτέμβριος\", \"Οκτώβριος\", \"Νοέμβριος\", \"Δεκέμβριος\"],\r\n\t\tday_for_recurring: [\"Κυριακή\", \"Δευτέρα\", \"Τρίτη\", \"Τετάρτη\", \"Πέμπτη\", \"Παρασκευή\", \"Σάββατο\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate:{\r\n\t\tmonth_full:[\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\r\n\t\tmonth_short:[\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n\t\tday_full:[\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\r\n\t\tday_short:[\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"]\r\n\t},\r\n\tlabels:{\r\n\t\tdhx_cal_today_button:\"Today\",\r\n\t\tday_tab:\"Day\",\r\n\t\tweek_tab:\"Week\",\r\n\t\tmonth_tab:\"Month\",\r\n\t\tnew_event:\"New event\",\r\n\t\ticon_save:\"Save\",\r\n\t\ticon_cancel:\"Cancel\",\r\n\t\ticon_details:\"Details\",\r\n\t\ticon_edit:\"Edit\",\r\n\t\ticon_delete:\"Delete\",\r\n\t\tconfirm_closing:\"\",//Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting:\"Event will be deleted permanently, are you sure?\",\r\n\t\tsection_description:\"Description\",\r\n\t\tsection_time:\"Time period\",\r\n\t\tfull_day:\"Full day\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring:\"Do you want to edit the whole set of repeated events?\",\r\n\t\tsection_recurring:\"Repeat event\",\r\n\t\tbutton_recurring:\"Disabled\",\r\n\t\tbutton_recurring_open:\"Enabled\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Edit occurrence\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"Agenda\",\r\n\t\tdate:\"Date\",\r\n\t\tdescription:\"Description\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"Year\",\r\n\r\n\t\t/* week agenda extension */\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daily\",//name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Weekly\",//name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Monthly\",\r\n\t\trepeat_radio_year: \"Yearly\",\r\n\t\trepeat_radio_day_type: \"Every\",\r\n\t\trepeat_text_day_count: \"day\",\r\n\t\trepeat_radio_day_type2: \"Every workday\",\r\n\t\trepeat_week: \" Repeat every\",\r\n\t\trepeat_text_week_count: \"week next days:\",\r\n\t\trepeat_radio_month_type: \"Repeat\",\r\n\t\trepeat_radio_month_start: \"On\",\r\n\t\trepeat_text_month_day: \"day every\",\r\n\t\trepeat_text_month_count: \"month\",\r\n\t\trepeat_text_month_count2_before: \"every\",\r\n\t\trepeat_text_month_count2_after: \"month\",\r\n\t\trepeat_year_label: \"On\",\r\n\t\tselect_year_day2: \"of\",\r\n\t\trepeat_text_year_day: \"day\",\r\n\t\tselect_year_month: \"month\",\r\n\t\trepeat_radio_end: \"No end date\",\r\n\t\trepeat_text_occurences_count: \"occurrences\",\r\n\t\trepeat_radio_end2: \"After\",\r\n\t\trepeat_radio_end3: \"End by\",\r\n\r\n\t\trepeat_never: \"Never\",\r\n\t\trepeat_daily: \"Every day\",\r\n\t\trepeat_workdays: \"Every weekday\",\r\n\t\trepeat_weekly: \"Every week\",\r\n\t\trepeat_monthly: \"Every month\",\r\n\t\trepeat_yearly: \"Every year\",\r\n\t\trepeat_custom: \"Custom\",\r\n\t\trepeat_freq_day: \"Day\",\r\n\t\trepeat_freq_week: \"Week\",\r\n\t\trepeat_freq_month: \"Month\",\r\n\t\trepeat_freq_year: \"Year\",\r\n\t\trepeat_on_date: \"On date\",\r\n\t\trepeat_ends: \"Ends\",\r\n\r\n\t\tmonth_for_recurring: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"]//\r\n\t}\r\n};\r\n\r\n","/*\r\n @Autor Manuel Fernandez Panzuela - www.mfernandez.es\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Enero\", \"Febrero\", \"Marzo\", \"Abril\", \"Mayo\", \"Junio\", \"Julio\", \"Agosto\", \"Septiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"],\r\n\t\tmonth_short: [\"Ene\", \"Feb\", \"Mar\", \"Abr\", \"May\", \"Jun\", \"Jul\", \"Ago\", \"Sep\", \"Oct\", \"Nov\", \"Dic\"],\r\n\t\tday_full: [\"Domingo\", \"Lunes\", \"Martes\", \"Miércoles\", \"Jueves\", \"Viernes\", \"Sábado\"],\r\n\t\tday_short: [\"Dom\", \"Lun\", \"Mar\", \"Mié\", \"Jue\", \"Vie\", \"Sáb\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hoy\",\r\n\t\tday_tab: \"Día\",\r\n\t\tweek_tab: \"Semana\",\r\n\t\tmonth_tab: \"Mes\",\r\n\t\tnew_event: \"Nuevo evento\",\r\n\t\ticon_save: \"Guardar\",\r\n\t\ticon_cancel: \"Cancelar\",\r\n\t\ticon_details: \"Detalles\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Eliminar\",\r\n\t\tconfirm_closing: \"\", //\"Sus cambios se perderán, continuar ?\"\r\n\t\tconfirm_deleting: \"El evento se borrará definitivamente, ¿continuar?\",\r\n\t\tsection_description: \"Descripción\",\r\n\t\tsection_time: \"Período\",\r\n\t\tfull_day: \"Todo el día\",\r\n\r\n\t\tconfirm_recurring: \"¿Desea modificar el conjunto de eventos repetidos?\",\r\n\t\tsection_recurring: \"Repita el evento\",\r\n\t\tbutton_recurring: \"Impedido\",\r\n\t\tbutton_recurring_open: \"Permitido\",\r\n\t\tbutton_edit_series: \"Editar la serie\",\r\n\t\tbutton_edit_occurrence: \"Editar este evento\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Día\",\r\n\t\tdate: \"Fecha\",\r\n\t\tdescription: \"Descripción\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Año\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Día\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Reja\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diariamente\",\r\n\t\trepeat_radio_week: \"Semanalmente\",\r\n\t\trepeat_radio_month: \"Mensualmente\",\r\n\t\trepeat_radio_year: \"Anualmente\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia\",\r\n\t\trepeat_radio_day_type2: \"Cada jornada de trabajo\",\r\n\t\trepeat_week: \" Repetir cada\",\r\n\t\trepeat_text_week_count: \"semana:\",\r\n\t\trepeat_radio_month_type: \"Repita\",\r\n\t\trepeat_radio_month_start: \"El\",\r\n\t\trepeat_text_month_day: \"dia cada \",\r\n\t\trepeat_text_month_count: \"mes\",\r\n\t\trepeat_text_month_count2_before: \"cada\",\r\n\t\trepeat_text_month_count2_after: \"mes\",\r\n\t\trepeat_year_label: \"El\",\r\n\t\tselect_year_day2: \"del\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mes\",\r\n\t\trepeat_radio_end: \"Sin fecha de finalización\",\r\n\t\trepeat_text_occurences_count: \"ocurrencias\",\r\n\t\trepeat_radio_end3: \"Fin\",\r\n\t\trepeat_radio_end2: \"Después de\",\r\n\r\n\t\trepeat_never: \"Nunca\",\r\n\t\trepeat_daily: \"Cada día\",\r\n\t\trepeat_workdays: \"Cada día laborable\",\r\n\t\trepeat_weekly: \"Cada semana\",\r\n\t\trepeat_monthly: \"Cada mes\",\r\n\t\trepeat_yearly: \"Cada año\",\r\n\t\trepeat_custom: \"Personalizado\",\r\n\t\trepeat_freq_day: \"Día\",\r\n\t\trepeat_freq_week: \"Semana\",\r\n\t\trepeat_freq_month: \"Mes\",\r\n\t\trepeat_freq_year: \"Año\",\r\n\t\trepeat_on_date: \"En la fecha\",\r\n\t\trepeat_ends: \"Termina\",\r\n\r\n\t\tmonth_for_recurring: [\"Enero\", \"Febrero\", \"Маrzo\", \"Аbril\", \"Mayo\", \"Junio\", \"Julio\", \"Аgosto\", \"Setiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"],\r\n\t\tday_for_recurring: [\"Domingo\", \"Lunes\", \"Martes\", \"Miércoles\", \"Jeuves\", \"Viernes\", \"Sabado\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Tammikuu\", \"Helmikuu\", \"Maaliskuu\", \"Huhtikuu\", \"Toukokuu\", \"Kesäkuu\", \"Heinäkuu\", \"Elokuu\", \"Syyskuu\", \"Lokakuu\", \"Marraskuu\", \"Joulukuu\"],\r\n\t\tmonth_short: [\"Tam\", \"Hel\", \"Maa\", \"Huh\", \"Tou\", \"Kes\", \"Hei\", \"Elo\", \"Syy\", \"Lok\", \"Mar\", \"Jou\"],\r\n\t\tday_full: [\"Sunnuntai\", \"Maanantai\", \"Tiistai\", \"Keskiviikko\", \"Torstai\", \"Perjantai\", \"Lauantai\"],\r\n\t\tday_short: [\"Su\", \"Ma\", \"Ti\", \"Ke\", \"To\", \"Pe\", \"La\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Tänään\",\r\n\t\tday_tab: \"Päivä\",\r\n\t\tweek_tab: \"Viikko\",\r\n\t\tmonth_tab: \"Kuukausi\",\r\n\t\tnew_event: \"Uusi tapahtuma\",\r\n\t\ticon_save: \"Tallenna\",\r\n\t\ticon_cancel: \"Peru\",\r\n\t\ticon_details: \"Tiedot\",\r\n\t\ticon_edit: \"Muokkaa\",\r\n\t\ticon_delete: \"Poista\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Haluatko varmasti poistaa tapahtuman?\",\r\n\t\tsection_description: \"Kuvaus\",\r\n\t\tsection_time: \"Aikajakso\",\r\n\t\tfull_day: \"Koko päivä\",\r\n\r\n\t\tconfirm_recurring: \"Haluatko varmasti muokata toistuvan tapahtuman kaikkia jaksoja?\",\r\n\t\tsection_recurring: \"Toista tapahtuma\",\r\n\t\tbutton_recurring: \"Ei käytössä\",\r\n\t\tbutton_recurring_open: \"Käytössä\",\r\n\t\tbutton_edit_series: \"Muokkaa sarja\",\r\n\t\tbutton_edit_occurrence: \"Muokkaa kopio\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Esityslista\",\r\n\t\tdate: \"Päivämäärä\",\r\n\t\tdescription: \"Kuvaus\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Vuoden\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Esityslista\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Ritilä\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Luo uusi vetämällä\",\r\n\t\tdrag_to_move:\"Siirrä vetämällä\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Päivittäin\",\r\n\t\trepeat_radio_week: \"Viikoittain\",\r\n\t\trepeat_radio_month: \"Kuukausittain\",\r\n\t\trepeat_radio_year: \"Vuosittain\",\r\n\t\trepeat_radio_day_type: \"Joka\",\r\n\t\trepeat_text_day_count: \"päivä\",\r\n\t\trepeat_radio_day_type2: \"Joka arkipäivä\",\r\n\t\trepeat_week: \"Toista joka\",\r\n\t\trepeat_text_week_count: \"viikko näinä päivinä:\",\r\n\t\trepeat_radio_month_type: \"Toista\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \"päivänä joka\",\r\n\t\trepeat_text_month_count: \"kuukausi\",\r\n\t\trepeat_text_month_count2_before: \"joka\",\r\n\t\trepeat_text_month_count2_after: \"kuukausi\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"päivä\",\r\n\t\tselect_year_month: \"kuukausi\",\r\n\t\trepeat_radio_end: \"Ei loppumisaikaa\",\r\n\t\trepeat_text_occurences_count: \"Toiston jälkeen\",\r\n\t\trepeat_radio_end3: \"Loppuu\",\r\n\t\trepeat_radio_end2: \"\",\r\n\r\n\t\trepeat_never: \"Ei koskaan\",\r\n\t\trepeat_daily: \"Joka päivä\",\r\n\t\trepeat_workdays: \"Joka arkipäivä\",\r\n\t\trepeat_weekly: \"Joka viikko\",\r\n\t\trepeat_monthly: \"Joka kuukausi\",\r\n\t\trepeat_yearly: \"Joka vuosi\",\r\n\t\trepeat_custom: \"Mukautettu\",\r\n\t\trepeat_freq_day: \"Päivä\",\r\n\t\trepeat_freq_week: \"Viikko\",\r\n\t\trepeat_freq_month: \"Kuukausi\",\r\n\t\trepeat_freq_year: \"Vuosi\",\r\n\t\trepeat_on_date: \"Tiettynä päivänä\",\r\n\t\trepeat_ends: \"Päättyy\",\r\n\r\n\t\tmonth_for_recurring: [\"Tammikuu\", \"Helmikuu\", \"Maaliskuu\", \"Huhtikuu\", \"Toukokuu\", \"Kesäkuu\", \"Heinäkuu\", \"Elokuu\", \"Syyskuu\", \"Lokakuu\", \"Marraskuu\", \"Joulukuu\"],\r\n\t\tday_for_recurring: [\"Sunnuntai\", \"Maanantai\", \"Tiistai\", \"Keskiviikko\", \"Torstai\", \"Perjantai\", \"Lauantai\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Janvier\", \"Février\", \"Mars\", \"Avril\", \"Mai\", \"Juin\", \"Juillet\", \"Août\", \"Septembre\", \"Octobre\", \"Novembre\", \"Décembre\"],\r\n\t\tmonth_short: [\"Jan\", \"Fév\", \"Mar\", \"Avr\", \"Mai\", \"Juin\", \"Juil\", \"Aoû\", \"Sep\", \"Oct\", \"Nov\", \"Déc\"],\r\n\t\tday_full: [\"Dimanche\", \"Lundi\", \"Mardi\", \"Mercredi\", \"Jeudi\", \"Vendredi\", \"Samedi\"],\r\n\t\tday_short: [\"Dim\", \"Lun\", \"Mar\", \"Mer\", \"Jeu\", \"Ven\", \"Sam\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Aujourd'hui\",\r\n\t\tday_tab: \"Jour\",\r\n\t\tweek_tab: \"Semaine\",\r\n\t\tmonth_tab: \"Mois\",\r\n\t\tnew_event: \"Nouvel événement\",\r\n\t\ticon_save: \"Enregistrer\",\r\n\t\ticon_cancel: \"Annuler\",\r\n\t\ticon_details: \"Détails\",\r\n\t\ticon_edit: \"Modifier\",\r\n\t\ticon_delete: \"Effacer\",\r\n\t\tconfirm_closing: \"\", //Vos modifications seront perdus, êtes-vous sûr ?\r\n\t\tconfirm_deleting: \"L'événement sera effacé sans appel, êtes-vous sûr ?\",\r\n\t\tsection_description: \"Description\",\r\n\t\tsection_time: \"Période\",\r\n\t\tfull_day: \"Journée complète\",\r\n\r\n\t\tconfirm_recurring: \"Voulez-vous éditer toute une série d'évènements répétés?\",\r\n\t\tsection_recurring: \"Périodicité\",\r\n\t\tbutton_recurring: \"Désactivé\",\r\n\t\tbutton_recurring_open: \"Activé\",\r\n\t\tbutton_edit_series: \"Modifier la série\",\r\n\t\tbutton_edit_occurrence: \"Modifier une copie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Jour\",\r\n\t\tdate: \"Date\",\r\n\t\tdescription: \"Description\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Année\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Jour\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grille\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Quotidienne\",\r\n\t\trepeat_radio_week: \"Hebdomadaire\",\r\n\t\trepeat_radio_month: \"Mensuelle\",\r\n\t\trepeat_radio_year: \"Annuelle\",\r\n\t\trepeat_radio_day_type: \"Chaque\",\r\n\t\trepeat_text_day_count: \"jour\",\r\n\t\trepeat_radio_day_type2: \"Chaque journée de travail\",\r\n\t\trepeat_week: \" Répéter toutes les\",\r\n\t\trepeat_text_week_count: \"semaine:\",\r\n\t\trepeat_radio_month_type: \"Répéter\",\r\n\t\trepeat_radio_month_start: \"Le\",\r\n\t\trepeat_text_month_day: \"jour chaque\",\r\n\t\trepeat_text_month_count: \"mois\",\r\n\t\trepeat_text_month_count2_before: \"chaque\",\r\n\t\trepeat_text_month_count2_after: \"mois\",\r\n\t\trepeat_year_label: \"Le\",\r\n\t\tselect_year_day2: \"du\",\r\n\t\trepeat_text_year_day: \"jour\",\r\n\t\tselect_year_month: \"mois\",\r\n\t\trepeat_radio_end: \"Pas de date d"achèvement\",\r\n\t\trepeat_text_occurences_count: \"occurrences\",\r\n\t\trepeat_radio_end3: \"Fin\",\r\n\t\trepeat_radio_end2: \"Après\",\r\n\r\n\t\trepeat_never: \"Jamais\",\r\n\t\trepeat_daily: \"Chaque jour\",\r\n\t\trepeat_workdays: \"Chaque jour ouvrable\",\r\n\t\trepeat_weekly: \"Chaque semaine\",\r\n\t\trepeat_monthly: \"Chaque mois\",\r\n\t\trepeat_yearly: \"Chaque année\",\r\n\t\trepeat_custom: \"Personnalisé\",\r\n\t\trepeat_freq_day: \"Jour\",\r\n\t\trepeat_freq_week: \"Semaine\",\r\n\t\trepeat_freq_month: \"Mois\",\r\n\t\trepeat_freq_year: \"Année\",\r\n\t\trepeat_on_date: \"À la date\",\r\n\t\trepeat_ends: \"Se termine\",\r\n\r\n\t\tmonth_for_recurring: [\"Janvier\", \"Février\", \"Mars\", \"Avril\", \"Mai\", \"Juin\", \"Juillet\", \"Août\", \"Septembre\", \"Octobre\", \"Novembre\", \"Décembre\"],\r\n\t\tday_for_recurring: [\"Dimanche\", \"Lundi\", \"Mardi\", \"Mercredi\", \"Jeudi\", \"Vendredi\", \"Samedi\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"ינואר\", \"פברואר\", \"מרץ\", \"אפריל\", \"מאי\", \"יוני\", \"יולי\", \"אוגוסט\", \"ספטמבר\", \"אוקטובר\", \"נובמבר\", \"דצמבר\"],\r\n\t\tmonth_short: [\"ינו\", \"פבר\", \"מרץ\", \"אפר\", \"מאי\", \"יונ\", \"יול\", \"אוג\", \"ספט\", \"אוק\", \"נוב\", \"דצמ\"],\r\n\t\tday_full: [\"ראשון\", \"שני\", \"שלישי\", \"רביעי\", \"חמישי\", \"שישי\", \"שבת\"],\r\n\t\tday_short: [\"א\", \"ב\", \"ג\", \"ד\", \"ה\", \"ו\", \"ש\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"היום\",\r\n\t\tday_tab: \"יום\",\r\n\t\tweek_tab: \"שבוע\",\r\n\t\tmonth_tab: \"חודש\",\r\n\t\tnew_event: \"ארוע חדש\",\r\n\t\ticon_save: \"שמור\",\r\n\t\ticon_cancel: \"בטל\",\r\n\t\ticon_details: \"פרטים\",\r\n\t\ticon_edit: \"ערוך\",\r\n\t\ticon_delete: \"מחק\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"ארוע ימחק סופית.להמשיך?\",\r\n\t\tsection_description: \"תיאור\",\r\n\t\tsection_time: \"תקופה\",\r\n\r\n\t\tconfirm_recurring: \"האם ברצונך לשנות כל סדרת ארועים מתמשכים?\",\r\n\t\tsection_recurring: \"להעתיק ארוע\",\r\n\t\tbutton_recurring: \"לא פעיל\",\r\n\t\tbutton_recurring_open: \"פעיל\",\r\n\t\tfull_day: \"יום שלם\",\r\n\t\tbutton_edit_series: \"ערוך את הסדרה\",\r\n\t\tbutton_edit_occurrence: \"עריכת עותק\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"סדר יום\",\r\n\t\tdate: \"תאריך\",\r\n\t\tdescription: \"תיאור\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"לשנה\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"סדר יום\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"סורג\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"גרור כדי להזיז\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"בטל\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"הבא\",\r\n\t\tprev: \"הקודם\",\r\n\t\tyear: \"שנה\",\r\n\t\tmonth: \"חודש\",\r\n\t\tday: \"יום\",\r\n\t\thour:\"שעה\",\r\n\t\tminute: \"דקה\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"יומי\",\r\n\t\trepeat_radio_week: \"שבועי\",\r\n\t\trepeat_radio_month: \"חודשי\",\r\n\t\trepeat_radio_year: \"שנתי\",\r\n\t\trepeat_radio_day_type: \"חזור כל\",\r\n\t\trepeat_text_day_count: \"ימים\",\r\n\t\trepeat_radio_day_type2: \"חזור כל יום עבודה\",\r\n\t\trepeat_week: \" חזור כל\",\r\n\t\trepeat_text_week_count: \"שבוע לפי ימים:\",\r\n\t\trepeat_radio_month_type: \"חזור כל\",\r\n\t\trepeat_radio_month_start: \"כל\",\r\n\t\trepeat_text_month_day: \"ימים כל\",\r\n\t\trepeat_text_month_count: \"חודשים\",\r\n\t\trepeat_text_month_count2_before: \"חזור כל\",\r\n\t\trepeat_text_month_count2_after: \"חודש\",\r\n\t\trepeat_year_label: \"כל\",\r\n\t\tselect_year_day2: \"בחודש\",\r\n\t\trepeat_text_year_day: \"ימים\",\r\n\t\tselect_year_month: \"חודש\",\r\n\t\trepeat_radio_end: \"לעולם לא מסתיים\",\r\n\t\trepeat_text_occurences_count: \"אירועים\",\r\n\t\trepeat_radio_end3: \"מסתיים ב\",\r\n\t\trepeat_radio_end2: \"אחרי\",\r\n\r\n\t\trepeat_never: \"אף פעם\",\r\n\t\trepeat_daily: \"כל יום\",\r\n\t\trepeat_workdays: \"כל יום עבודה\",\r\n\t\trepeat_weekly: \"כל שבוע\",\r\n\t\trepeat_monthly: \"כל חודש\",\r\n\t\trepeat_yearly: \"כל שנה\",\r\n\t\trepeat_custom: \"מותאם אישית\",\r\n\t\trepeat_freq_day: \"יום\",\r\n\t\trepeat_freq_week: \"שבוע\",\r\n\t\trepeat_freq_month: \"חודש\",\r\n\t\trepeat_freq_year: \"שנה\",\r\n\t\trepeat_on_date: \"בתאריך\",\r\n\t\trepeat_ends: \"מסתיים\",\r\n\r\n\t\tmonth_for_recurring: [\"ינואר\", \"פברואר\", \"מרץ\", \"אפריל\", \"מאי\", \"יוני\", \"יולי\", \"אוגוסט\", \"ספטמבר\", \"אוקטובר\", \"נובמבר\", \"דצמבר\"],\r\n\t\tday_for_recurring: [\"ראשון\", \"שני\", \"שלישי\", \"רביעי\", \"חמישי\", \"שישי\", \"שבת\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Január\", \"Február\", \"Március\", \"Április\", \"Május\", \"Június\", \"Július\", \"Augusztus\", \"Szeptember\", \"Október\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Már\", \"Ápr\", \"Máj\", \"Jún\", \"Júl\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Vasárnap\", \"Hétfõ\", \"Kedd\", \"Szerda\", \"Csütörtök\", \"Péntek\", \"szombat\"],\r\n\t\tday_short: [\"Va\", \"Hé\", \"Ke\", \"Sze\", \"Csü\", \"Pé\", \"Szo\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Ma\",\r\n\t\tday_tab: \"Nap\",\r\n\t\tweek_tab: \"Hét\",\r\n\t\tmonth_tab: \"Hónap\",\r\n\t\tnew_event: \"Új esemény\",\r\n\t\ticon_save: \"Mentés\",\r\n\t\ticon_cancel: \"Mégse\",\r\n\t\ticon_details: \"Részletek\",\r\n\t\ticon_edit: \"Szerkesztés\",\r\n\t\ticon_delete: \"Törlés\",\r\n\t\tconfirm_closing: \"\", //A változások elvesznek, biztosan folytatja? \"\r\n\t\tconfirm_deleting: \"Az esemény törölve lesz, biztosan folytatja?\",\r\n\t\tsection_description: \"Leírás\",\r\n\t\tsection_time: \"Idõszak\",\r\n\t\tfull_day: \"Egesz napos\",\r\n\r\n\t\t/*ismétlõdõ események*/\r\n\t\tconfirm_recurring: \"Biztosan szerkeszteni akarod az összes ismétlõdõ esemény beállítását?\",\r\n\t\tsection_recurring: \"Esemény ismétlése\",\r\n\t\tbutton_recurring: \"Tiltás\",\r\n\t\tbutton_recurring_open: \"Engedélyezés\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Szerkesztés bíróság\",\r\n\r\n\t\t/*napirendi nézet*/\r\n\t\tagenda_tab: \"Napirend\",\r\n\t\tdate: \"Dátum\",\r\n\t\tdescription: \"Leírás\",\r\n\r\n\t\t/*éves nézet*/\r\n\t\tyear_tab: \"Év\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Napi\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Heti\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Havi\",\r\n\t\trepeat_radio_year: \"Éves\",\r\n\t\trepeat_radio_day_type: \"Minden\",\r\n\t\trepeat_text_day_count: \"nap\",\r\n\t\trepeat_radio_day_type2: \"Minden munkanap\",\r\n\t\trepeat_week: \" Ismételje meg minden\",\r\n\t\trepeat_text_week_count: \"héten a következő napokon:\",\r\n\t\trepeat_radio_month_type: \"Ismétlés\",\r\n\t\trepeat_radio_month_start: \"Ekkor\",\r\n\t\trepeat_text_month_day: \"nap minden\",\r\n\t\trepeat_text_month_count: \"hónapban\",\r\n\t\trepeat_text_month_count2_before: \"minden\",\r\n\t\trepeat_text_month_count2_after: \"hónapban\",\r\n\t\trepeat_year_label: \"Ekkor\",\r\n\t\tselect_year_day2: \"-án/-én\",\r\n\t\trepeat_text_year_day: \"nap\",\r\n\t\tselect_year_month: \"hónap\",\r\n\t\trepeat_radio_end: \"Nincs befejezési dátum\",\r\n\t\trepeat_text_occurences_count: \"esemény\",\r\n\t\trepeat_radio_end2: \"Után\",\r\n\t\trepeat_radio_end3: \"Befejező dátum\",\r\n\r\n\t\trepeat_never: \"Soha\",\r\n\t\trepeat_daily: \"Minden nap\",\r\n\t\trepeat_workdays: \"Minden munkanap\",\r\n\t\trepeat_weekly: \"Minden héten\",\r\n\t\trepeat_monthly: \"Minden hónapban\",\r\n\t\trepeat_yearly: \"Minden évben\",\r\n\t\trepeat_custom: \"Egyedi\",\r\n\t\trepeat_freq_day: \"Nap\",\r\n\t\trepeat_freq_week: \"Hét\",\r\n\t\trepeat_freq_month: \"Hónap\",\r\n\t\trepeat_freq_year: \"Év\",\r\n\t\trepeat_on_date: \"Dátum szerint\",\r\n\t\trepeat_ends: \"Befejeződik\",\r\n\r\n\t\tmonth_for_recurring: [\"Január\", \"Február\", \"Március\", \"Április\", \"Május\", \"Június\", \"Július\", \"Augusztus\", \"Szeptember\", \"Október\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Vasárnap\", \"Hétfő\", \"Kedd\", \"Szerda\", \"Csütörtök\", \"Péntek\", \"Szombat\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Maret\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Agustus\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mei\", \"Jun\", \"Jul\", \"Ags\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Minggu\", \"Senin\", \"Selasa\", \"Rabu\", \"Kamis\", \"Jumat\", \"Sabtu\"],\r\n\t\tday_short: [\"Ming\", \"Sen\", \"Sel\", \"Rab\", \"Kam\", \"Jum\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hari Ini\",\r\n\t\tday_tab: \"Hari\",\r\n\t\tweek_tab: \"Minggu\",\r\n\t\tmonth_tab: \"Bulan\",\r\n\t\tnew_event: \"Acara Baru\",\r\n\t\ticon_save: \"Simpan\",\r\n\t\ticon_cancel: \"Batal\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edit\",\r\n\t\ticon_delete: \"Hapus\",\r\n\t\tconfirm_closing: \"\", /*Perubahan tidak akan disimpan ?*/\r\n\t\tconfirm_deleting: \"Acara akan dihapus\",\r\n\t\tsection_description: \"Keterangan\",\r\n\t\tsection_time: \"Periode\",\r\n\t\tfull_day: \"Hari penuh\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Apakah acara ini akan berulang?\",\r\n\t\tsection_recurring: \"Acara Rutin\",\r\n\t\tbutton_recurring: \"Tidak Difungsikan\",\r\n\t\tbutton_recurring_open: \"Difungsikan\",\r\n\t\tbutton_edit_series: \"Mengedit seri\",\r\n\t\tbutton_edit_occurrence: \"Mengedit salinan\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Tanggal\",\r\n\t\tdescription: \"Keterangan\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Tahun\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabel\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Harian\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Mingguan\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Bulanan\",\r\n\t\trepeat_radio_year: \"Tahunan\",\r\n\t\trepeat_radio_day_type: \"Setiap\",\r\n\t\trepeat_text_day_count: \"hari\",\r\n\t\trepeat_radio_day_type2: \"Setiap hari kerja\",\r\n\t\trepeat_week: \" Ulangi setiap\",\r\n\t\trepeat_text_week_count: \"minggu pada hari berikut:\",\r\n\t\trepeat_radio_month_type: \"Ulangi\",\r\n\t\trepeat_radio_month_start: \"Pada\",\r\n\t\trepeat_text_month_day: \"hari setiap\",\r\n\t\trepeat_text_month_count: \"bulan\",\r\n\t\trepeat_text_month_count2_before: \"setiap\",\r\n\t\trepeat_text_month_count2_after: \"bulan\",\r\n\t\trepeat_year_label: \"Pada\",\r\n\t\tselect_year_day2: \"dari\",\r\n\t\trepeat_text_year_day: \"hari\",\r\n\t\tselect_year_month: \"bulan\",\r\n\t\trepeat_radio_end: \"Tanpa tanggal akhir\",\r\n\t\trepeat_text_occurences_count: \"kejadian\",\r\n\t\trepeat_radio_end2: \"Setelah\",\r\n\t\trepeat_radio_end3: \"Berakhir pada\",\r\n\r\n\t\trepeat_never: \"Tidak pernah\",\r\n\t\trepeat_daily: \"Setiap hari\",\r\n\t\trepeat_workdays: \"Setiap hari kerja\",\r\n\t\trepeat_weekly: \"Setiap minggu\",\r\n\t\trepeat_monthly: \"Setiap bulan\",\r\n\t\trepeat_yearly: \"Setiap tahun\",\r\n\t\trepeat_custom: \"Kustom\",\r\n\t\trepeat_freq_day: \"Hari\",\r\n\t\trepeat_freq_week: \"Minggu\",\r\n\t\trepeat_freq_month: \"Bulan\",\r\n\t\trepeat_freq_year: \"Tahun\",\r\n\t\trepeat_on_date: \"Pada tanggal\",\r\n\t\trepeat_ends: \"Berakhir\",\r\n\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Maret\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Agustus\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tday_for_recurring: [\"Minggu\", \"Senin\", \"Selasa\", \"Rabu\", \"Kamis\", \"Jumat\", \"Sabtu\"]\r\n\t}\r\n};","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Gennaio\", \"Febbraio\", \"Marzo\", \"Aprile\", \"Maggio\", \"Giugno\", \"Luglio\", \"Agosto\", \"Settembre\", \"Ottobre\", \"Novembre\", \"Dicembre\"],\r\n\t\tmonth_short: [\"Gen\", \"Feb\", \"Mar\", \"Apr\", \"Mag\", \"Giu\", \"Lug\", \"Ago\", \"Set\", \"Ott\", \"Nov\", \"Dic\"],\r\n\t\tday_full: [\"Domenica\", \"Lunedì\", \"Martedì\", \"Mercoledì\", \"Giovedì\", \"Venerdì\", \"Sabato\"],\r\n\t\tday_short: [\"Dom\", \"Lun\", \"Mar\", \"Mer\", \"Gio\", \"Ven\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Oggi\",\r\n\t\tday_tab: \"Giorno\",\r\n\t\tweek_tab: \"Settimana\",\r\n\t\tmonth_tab: \"Mese\",\r\n\t\tnew_event: \"Nuovo evento\",\r\n\t\ticon_save: \"Salva\",\r\n\t\ticon_cancel: \"Chiudi\",\r\n\t\ticon_details: \"Dettagli\",\r\n\t\ticon_edit: \"Modifica\",\r\n\t\ticon_delete: \"Elimina\",\r\n\t\tconfirm_closing: \"\", //Le modifiche apportate saranno perse, siete sicuri?\r\n\t\tconfirm_deleting: \"L'evento sarà eliminato, siete sicuri?\",\r\n\t\tsection_description: \"Descrizione\",\r\n\t\tsection_time: \"Periodo di tempo\",\r\n\t\tfull_day: \"Intera giornata\",\r\n\r\n\t\tconfirm_recurring: \"Vuoi modificare l'intera serie di eventi?\",\r\n\t\tsection_recurring: \"Ripetere l'evento\",\r\n\t\tbutton_recurring: \"Disattivato\",\r\n\t\tbutton_recurring_open: \"Attivato\",\r\n\t\tbutton_edit_series: \"Modificare la serie\",\r\n\t\tbutton_edit_occurrence: \"Modificare una copia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descrizione\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Anno\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Griglia\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Quotidiano\",\r\n\t\trepeat_radio_week: \"Settimanale\",\r\n\t\trepeat_radio_month: \"Mensile\",\r\n\t\trepeat_radio_year: \"Annuale\",\r\n\t\trepeat_radio_day_type: \"Ogni\",\r\n\t\trepeat_text_day_count: \"giorno\",\r\n\t\trepeat_radio_day_type2: \"Ogni giornata lavorativa\",\r\n\t\trepeat_week: \" Ripetere ogni\",\r\n\t\trepeat_text_week_count: \"settimana:\",\r\n\t\trepeat_radio_month_type: \"Ripetere\",\r\n\t\trepeat_radio_month_start: \"Il\",\r\n\t\trepeat_text_month_day: \"giorno ogni\",\r\n\t\trepeat_text_month_count: \"mese\",\r\n\t\trepeat_text_month_count2_before: \"ogni\",\r\n\t\trepeat_text_month_count2_after: \"mese\",\r\n\t\trepeat_year_label: \"Il\",\r\n\t\tselect_year_day2: \"del\",\r\n\t\trepeat_text_year_day: \"giorno\",\r\n\t\tselect_year_month: \"mese\",\r\n\t\trepeat_radio_end: \"Senza data finale\",\r\n\t\trepeat_text_occurences_count: \"occorenze\",\r\n\t\trepeat_radio_end3: \"Fine\",\r\n\t\trepeat_radio_end2: \"Dopo\",\r\n\r\n\t\trepeat_never: \"Mai\",\r\n\t\trepeat_daily: \"Ogni giorno\",\r\n\t\trepeat_workdays: \"Ogni giorno feriale\",\r\n\t\trepeat_weekly: \"Ogni settimana\",\r\n\t\trepeat_monthly: \"Ogni mese\",\r\n\t\trepeat_yearly: \"Ogni anno\",\r\n\t\trepeat_custom: \"Personalizzato\",\r\n\t\trepeat_freq_day: \"Giorno\",\r\n\t\trepeat_freq_week: \"Settimana\",\r\n\t\trepeat_freq_month: \"Mese\",\r\n\t\trepeat_freq_year: \"Anno\",\r\n\t\trepeat_on_date: \"Alla data\",\r\n\t\trepeat_ends: \"Finisce\",\r\n\r\n\t\tmonth_for_recurring: [\"Gennaio\", \"Febbraio\", \"Marzo\", \"Aprile\", \"Maggio\", \"Jiugno\", \"Luglio\", \"Agosto\", \"Settembre\", \"Ottobre\", \"Novembre\", \"Dicembre\"],\r\n\t\tday_for_recurring: [\"Domenica\", \"Lunedì\", \"Martedì\", \"Mercoledì\", \"Jovedì\", \"Venerdì\", \"Sabato\"]\r\n\t}\r\n};\r\n","/*\r\n Translation by Genexus Japan Inc.\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tmonth_short: [ \"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_full: [\"日曜日\", \"月曜日\", \"火曜日\", \"水曜日\", \"木曜日\", \"金曜日\", \"土曜日\"],\r\n\t\tday_short: [\"日\", \"月\", \"火\", \"水\", \"木\", \"金\", \"土\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"今日\",\r\n\t\tday_tab: \"日\",\r\n\t\tweek_tab: \"週\",\r\n\t\tmonth_tab: \"月\",\r\n\t\tnew_event: \"新イベント\",\r\n\t\ticon_save: \"保存\",\r\n\t\ticon_cancel: \"キャンセル\",\r\n\t\ticon_details: \"詳細\",\r\n\t\ticon_edit: \"編集\",\r\n\t\ticon_delete: \"削除\",\r\n\t\tconfirm_closing: \"\", //変更が取り消されます、宜しいですか?\r\n\t\tconfirm_deleting: \"イベント完全に削除されます、宜しいですか?\",\r\n\t\tsection_description: \"デスクリプション\",\r\n\t\tsection_time: \"期間\",\r\n\t\tconfirm_recurring: \"繰り返されているイベントを全て編集しますか?\",\r\n\t\tsection_recurring: \"イベントを繰り返す\",\r\n\t\tbutton_recurring: \"無効\",\r\n\t\tbutton_recurring_open: \"有効\",\r\n\t\tfull_day: \"終日\",\r\n\t\tbutton_edit_series: \"シリーズを編集します\",\r\n\t\tbutton_edit_occurrence: \"コピーを編集\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"議題は\",\r\n\t\tdate: \"日付\",\r\n\t\tdescription: \"説明\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"今年\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"議題は\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"グリッド\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"毎日\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"毎週\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"毎月\",\r\n\t\trepeat_radio_year: \"毎年\",\r\n\t\trepeat_radio_day_type: \"毎\",\r\n\t\trepeat_text_day_count: \"日\",\r\n\t\trepeat_radio_day_type2: \"毎営業日\",\r\n\t\trepeat_week: \" 繰り返し毎\",\r\n\t\trepeat_text_week_count: \"週 次の日:\",\r\n\t\trepeat_radio_month_type: \"繰り返し\",\r\n\t\trepeat_radio_month_start: \"オン\",\r\n\t\trepeat_text_month_day: \"日毎\",\r\n\t\trepeat_text_month_count: \"月\",\r\n\t\trepeat_text_month_count2_before: \"毎\",\r\n\t\trepeat_text_month_count2_after: \"月\",\r\n\t\trepeat_year_label: \"オン\",\r\n\t\tselect_year_day2: \"の\",\r\n\t\trepeat_text_year_day: \"日\",\r\n\t\tselect_year_month: \"月\",\r\n\t\trepeat_radio_end: \"終了日なし\",\r\n\t\trepeat_text_occurences_count: \"回数\",\r\n\t\trepeat_radio_end2: \"後\",\r\n\t\trepeat_radio_end3: \"終了日まで\",\r\n\r\n\t\trepeat_never: \"決して\",\r\n\t\trepeat_daily: \"毎日\",\r\n\t\trepeat_workdays: \"毎営業日\",\r\n\t\trepeat_weekly: \"毎週\",\r\n\t\trepeat_monthly: \"毎月\",\r\n\t\trepeat_yearly: \"毎年\",\r\n\t\trepeat_custom: \"カスタム\",\r\n\t\trepeat_freq_day: \"日\",\r\n\t\trepeat_freq_week: \"週\",\r\n\t\trepeat_freq_month: \"月\",\r\n\t\trepeat_freq_year: \"年\",\r\n\t\trepeat_on_date: \"日にち\",\r\n\t\trepeat_ends: \"終了\",\r\n\r\n\t\tmonth_for_recurring: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_for_recurring: [\"日曜日\", \"月曜日\", \"火曜日\", \"水曜日\", \"木曜日\", \"金曜日\", \"土曜日\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default class LocaleManager{\r\n\tconstructor(config){\r\n\t\tthis._locales = {};\r\n\t\tfor(const i in config){\r\n\t\t\tthis._locales[i] = config[i];\r\n\t\t}\r\n\t}\r\n\r\n\taddLocale(name, locale) {\r\n\t\tthis._locales[name] = locale;\r\n\t}\r\n\r\n\tgetLocale(name) {\r\n\t\treturn this._locales[name];\r\n\t}\r\n}","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Mon\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"I dag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uke\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny hendelse\",\r\n\t\ticon_save: \"Lagre\",\r\n\t\ticon_cancel: \"Avbryt\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Rediger\",\r\n\t\ticon_delete: \"Slett\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Hendelsen vil bli slettet permanent. Er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du forandre hele dette settet av repeterende hendelser?\",\r\n\t\tsection_recurring: \"Repeter hendelsen\",\r\n\t\tbutton_recurring: \"Av\",\r\n\t\tbutton_recurring_open: \"På\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Redigere en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\",\r\n\t\trepeat_radio_week: \"Ukentlig\",\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Alle hverdager\",\r\n\t\trepeat_week: \" Gjentas hver\",\r\n\t\trepeat_text_week_count: \"uke på:\",\r\n\t\trepeat_radio_month_type: \"På hver\",\r\n\t\trepeat_radio_month_start: \"På\",\r\n\t\trepeat_text_month_day: \"dag hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"på\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Ingen sluttdato\",\r\n\t\trepeat_text_occurences_count: \"forekomst\",\r\n\t\trepeat_radio_end3: \"Stop den\",\r\n\t\trepeat_radio_end2: \"Etter\",\r\n\r\n\t\trepeat_never: \"Aldri\",\r\n\t\trepeat_daily: \"Hver dag\",\r\n\t\trepeat_workdays: \"Hver ukedag\",\r\n\t\trepeat_weekly: \"Hver uke\",\r\n\t\trepeat_monthly: \"Hver måned\",\r\n\t\trepeat_yearly: \"Hvert år\",\r\n\t\trepeat_custom: \"Tilpasset\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Uke\",\r\n\t\trepeat_freq_month: \"Måned\",\r\n\t\trepeat_freq_year: \"År\",\r\n\t\trepeat_on_date: \"På dato\",\r\n\t\trepeat_ends: \"Slutter\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tday_for_recurring: [\"Sondag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Maart\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Augustus\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"mrt\", \"Apr\", \"Mei\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Zondag\", \"Maandag\", \"Dinsdag\", \"Woensdag\", \"Donderdag\", \"Vrijdag\", \"Zaterdag\"],\r\n\t\tday_short: [\"Zo\", \"Ma\", \"Di\", \"Wo\", \"Do\", \"Vr\", \"Za\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Vandaag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Week\",\r\n\t\tmonth_tab: \"Maand\",\r\n\t\tnew_event: \"Nieuw item\",\r\n\t\ticon_save: \"Opslaan\",\r\n\t\ticon_cancel: \"Annuleren\",\r\n\t\ticon_details: \"Details\",\r\n\t\ticon_edit: \"Bewerken\",\r\n\t\ticon_delete: \"Verwijderen\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Item zal permanent worden verwijderd, doorgaan?\",\r\n\t\tsection_description: \"Beschrijving\",\r\n\t\tsection_time: \"Tijd periode\",\r\n\t\tfull_day: \"Hele dag\",\r\n\r\n\t\tconfirm_recurring: \"Wilt u alle terugkerende items bijwerken?\",\r\n\t\tsection_recurring: \"Item herhalen\",\r\n\t\tbutton_recurring: \"Uit\",\r\n\t\tbutton_recurring_open: \"Aan\",\r\n\t\tbutton_edit_series: \"Bewerk de serie\",\r\n\t\tbutton_edit_occurrence: \"Bewerk een kopie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Omschrijving\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Jaar\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabel\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dagelijks\",\r\n\t\trepeat_radio_week: \"Wekelijks\",\r\n\t\trepeat_radio_month: \"Maandelijks\",\r\n\t\trepeat_radio_year: \"Jaarlijks\",\r\n\t\trepeat_radio_day_type: \"Elke\",\r\n\t\trepeat_text_day_count: \"dag(en)\",\r\n\t\trepeat_radio_day_type2: \"Elke werkdag\",\r\n\t\trepeat_week: \" Herhaal elke\",\r\n\t\trepeat_text_week_count: \"week op de volgende dagen:\",\r\n\t\trepeat_radio_month_type: \"Herhaal\",\r\n\t\trepeat_radio_month_start: \"Op\",\r\n\t\trepeat_text_month_day: \"dag iedere\",\r\n\t\trepeat_text_month_count: \"maanden\",\r\n\t\trepeat_text_month_count2_before: \"iedere\",\r\n\t\trepeat_text_month_count2_after: \"maanden\",\r\n\t\trepeat_year_label: \"Op\",\r\n\t\tselect_year_day2: \"van\",\r\n\t\trepeat_text_year_day: \"dag\",\r\n\t\tselect_year_month: \"maand\",\r\n\t\trepeat_radio_end: \"Geen eind datum\",\r\n\t\trepeat_text_occurences_count: \"keren\",\r\n\t\trepeat_radio_end3: \"Eindigd per\",\r\n\t\trepeat_radio_end2: \"Na\",\r\n\r\n\t\trepeat_never: \"Nooit\",\r\n\t\trepeat_daily: \"Elke dag\",\r\n\t\trepeat_workdays: \"Elke werkdag\",\r\n\t\trepeat_weekly: \"Elke week\",\r\n\t\trepeat_monthly: \"Elke maand\",\r\n\t\trepeat_yearly: \"Elk jaar\",\r\n\t\trepeat_custom: \"Aangepast\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Week\",\r\n\t\trepeat_freq_month: \"Maand\",\r\n\t\trepeat_freq_year: \"Jaar\",\r\n\t\trepeat_on_date: \"Op datum\",\r\n\t\trepeat_ends: \"Eindigt\",\r\n\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Maart\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Augustus\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Zondag\", \"Maandag\", \"Dinsdag\", \"Woensdag\", \"Donderdag\", \"Vrijdag\", \"Zaterdag\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Man\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uke\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny\",\r\n\t\ticon_save: \"Lagre\",\r\n\t\ticon_cancel: \"Avbryt\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Endre\",\r\n\t\ticon_delete: \"Slett\",\r\n\t\tconfirm_closing: \"Endringer blir ikke lagret, er du sikker?\", //Endringer blir ikke lagret, er du sikker?\r\n\t\tconfirm_deleting: \"Oppføringen vil bli slettet, er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\t\tfull_day: \"Full dag\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du endre hele settet med repeterende oppføringer?\",\r\n\t\tsection_recurring: \"Repeterende oppføring\",\r\n\t\tbutton_recurring: \"Ikke aktiv\",\r\n\t\tbutton_recurring_open: \"Aktiv\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Redigere en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Ukentlig\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Hver arbeidsdag\",\r\n\t\trepeat_week: \" Gjenta hver\",\r\n\t\trepeat_text_week_count: \"uke neste dager:\",\r\n\t\trepeat_radio_month_type: \"Gjenta\",\r\n\t\trepeat_radio_month_start: \"På\",\r\n\t\trepeat_text_month_day: \"dag hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"På\",\r\n\t\tselect_year_day2: \"av\",\r\n\t\trepeat_text_year_day: \"dag\",\r\n\t\tselect_year_month: \"måned\",\r\n\t\trepeat_radio_end: \"Ingen sluttdato\",\r\n\t\trepeat_text_occurences_count: \"forekomster\",\r\n\t\trepeat_radio_end2: \"Etter\",\r\n\t\trepeat_radio_end3: \"Slutt innen\",\r\n\r\n\t\trepeat_never: \"Aldri\",\r\n\t\trepeat_daily: \"Hver dag\",\r\n\t\trepeat_workdays: \"Hver ukedag\",\r\n\t\trepeat_weekly: \"Hver uke\",\r\n\t\trepeat_monthly: \"Hver måned\",\r\n\t\trepeat_yearly: \"Hvert år\",\r\n\t\trepeat_custom: \"Tilpasset\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Uke\",\r\n\t\trepeat_freq_month: \"Måned\",\r\n\t\trepeat_freq_year: \"År\",\r\n\t\trepeat_on_date: \"På dato\",\r\n\t\trepeat_ends: \"Slutter\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tday_for_recurring: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Styczeń\", \"Luty\", \"Marzec\", \"Kwiecień\", \"Maj\", \"Czerwiec\", \"Lipiec\", \"Sierpień\", \"Wrzesień\", \"Październik\", \"Listopad\", \"Grudzień\"],\r\n\t\tmonth_short: [\"Sty\", \"Lut\", \"Mar\", \"Kwi\", \"Maj\", \"Cze\", \"Lip\", \"Sie\", \"Wrz\", \"Paź\", \"Lis\", \"Gru\"],\r\n\t\tday_full: [\"Niedziela\", \"Poniedziałek\", \"Wtorek\", \"Środa\", \"Czwartek\", \"Piątek\", \"Sobota\"],\r\n\t\tday_short: [\"Nie\", \"Pon\", \"Wto\", \"Śro\", \"Czw\", \"Pią\", \"Sob\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dziś\",\r\n\t\tday_tab: \"Dzień\",\r\n\t\tweek_tab: \"Tydzień\",\r\n\t\tmonth_tab: \"Miesiąc\",\r\n\t\tnew_event: \"Nowe zdarzenie\",\r\n\t\ticon_save: \"Zapisz\",\r\n\t\ticon_cancel: \"Anuluj\",\r\n\t\ticon_details: \"Szczegóły\",\r\n\t\ticon_edit: \"Edytuj\",\r\n\t\ticon_delete: \"Usuń\",\r\n\t\tconfirm_closing: \"\", //Zmiany zostaną usunięte, jesteś pewien?\r\n\t\tconfirm_deleting: \"Zdarzenie zostanie usunięte na zawsze, kontynuować?\",\r\n\t\tsection_description: \"Opis\",\r\n\t\tsection_time: \"Okres czasu\",\r\n\t\tfull_day: \"Cały dzień\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Czy chcesz edytować cały zbiór powtarzających się zdarzeń?\",\r\n\t\tsection_recurring: \"Powtórz zdarzenie\",\r\n\t\tbutton_recurring: \"Nieaktywne\",\r\n\t\tbutton_recurring_open: \"Aktywne\",\r\n\t\tbutton_edit_series: \"Edytuj serię\",\r\n\t\tbutton_edit_occurrence: \"Edytuj kopię\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Opis\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabela\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Codziennie\",\r\n\t\trepeat_radio_week: \"Co tydzie\",\r\n\t\trepeat_radio_month: \"Co miesic\",\r\n\t\trepeat_radio_year: \"Co rok\",\r\n\t\trepeat_radio_day_type: \"Kadego\",\r\n\t\trepeat_text_day_count: \"dnia\",\r\n\t\trepeat_radio_day_type2: \"Kadego dnia roboczego\",\r\n\t\trepeat_week: \" Powtarzaj kadego\",\r\n\t\trepeat_text_week_count: \"tygodnia w dni:\",\r\n\t\trepeat_radio_month_type: \"Powtrz\",\r\n\t\trepeat_radio_month_start: \"W\",\r\n\t\trepeat_text_month_day: \"dnia kadego\",\r\n\t\trepeat_text_month_count: \"miesica\",\r\n\t\trepeat_text_month_count2_before: \"kadego\",\r\n\t\trepeat_text_month_count2_after: \"miesica\",\r\n\t\trepeat_year_label: \"W\",\r\n\t\tselect_year_day2: \"miesica\",\r\n\t\trepeat_text_year_day: \"dnia miesica\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Bez daty kocowej\",\r\n\t\trepeat_text_occurences_count: \"wystpieniu/ach\",\r\n\t\trepeat_radio_end3: \"Zakocz w\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\r\n\t\trepeat_never: \"Nigdy\",\r\n\t\trepeat_daily: \"Codziennie\",\r\n\t\trepeat_workdays: \"Każdy dzień roboczy\",\r\n\t\trepeat_weekly: \"Co tydzień\",\r\n\t\trepeat_monthly: \"Co miesiąc\",\r\n\t\trepeat_yearly: \"Co rok\",\r\n\t\trepeat_custom: \"Niestandardowy\",\r\n\t\trepeat_freq_day: \"Dzień\",\r\n\t\trepeat_freq_week: \"Tydzień\",\r\n\t\trepeat_freq_month: \"Miesiąc\",\r\n\t\trepeat_freq_year: \"Rok\",\r\n\t\trepeat_on_date: \"W dniu\",\r\n\t\trepeat_ends: \"Kończy się\",\r\n\r\n\t\tmonth_for_recurring: [\"Stycznia\", \"Lutego\", \"Marca\", \"Kwietnia\", \"Maja\", \"Czerwca\", \"Lipca\", \"Sierpnia\", \"Wrzenia\", \"Padziernka\", \"Listopada\", \"Grudnia\"],\r\n\t\tday_for_recurring: [\"Niedziela\", \"Poniedziaek\", \"Wtorek\", \"roda\", \"Czwartek\", \"Pitek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","/*\r\n\r\n TRANSLATION BY MATTHEUS PIROVANI RORIZ GONЗALVES\r\n\r\n mattheusroriz@hotmail.com / mattheus.pirovani@gmail.com /\r\n\r\n www.atrixian.com.br\r\n\r\n */\r\n\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Janeiro\", \"Fevereiro\", \"Março\", \"Abril\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"],\r\n\t\tmonth_short: [\"Jan\", \"Fev\", \"Mar\", \"Abr\", \"Mai\", \"Jun\", \"Jul\", \"Ago\", \"Set\", \"Out\", \"Nov\", \"Dez\"],\r\n\t\tday_full: [\"Domingo\", \"Segunda\", \"Terça\", \"Quarta\", \"Quinta\", \"Sexta\", \"Sábado\"],\r\n\t\tday_short: [\"Dom\", \"Seg\", \"Ter\", \"Qua\", \"Qui\", \"Sex\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hoje\",\r\n\t\tday_tab: \"Dia\",\r\n\t\tweek_tab: \"Semana\",\r\n\t\tmonth_tab: \"Mês\",\r\n\t\tnew_event: \"Novo evento\",\r\n\t\ticon_save: \"Salvar\",\r\n\t\ticon_cancel: \"Cancelar\",\r\n\t\ticon_details: \"Detalhes\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Deletar\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Tem certeza que deseja excluir?\",\r\n\t\tsection_description: \"Descrição\",\r\n\t\tsection_time: \"Período de tempo\",\r\n\t\tfull_day: \"Dia inteiro\",\r\n\r\n\t\tconfirm_recurring: \"Deseja editar todos esses eventos repetidos?\",\r\n\t\tsection_recurring: \"Repetir evento\",\r\n\t\tbutton_recurring: \"Desabilitar\",\r\n\t\tbutton_recurring_open: \"Habilitar\",\r\n\t\tbutton_edit_series: \"Editar a série\",\r\n\t\tbutton_edit_occurrence: \"Editar uma cópia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dia\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descrição\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Ano\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dia\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grade\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diário\",\r\n\t\trepeat_radio_week: \"Semanal\",\r\n\t\trepeat_radio_month: \"Mensal\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia(s)\",\r\n\t\trepeat_radio_day_type2: \"Cada trabalho diário\",\r\n\t\trepeat_week: \" Repita cada\",\r\n\t\trepeat_text_week_count: \"semana:\",\r\n\t\trepeat_radio_month_type: \"Repetir\",\r\n\t\trepeat_radio_month_start: \"Em\",\r\n\t\trepeat_text_month_day: \"todo dia\",\r\n\t\trepeat_text_month_count: \"mês\",\r\n\t\trepeat_text_month_count2_before: \"todo\",\r\n\t\trepeat_text_month_count2_after: \"mês\",\r\n\t\trepeat_year_label: \"Em\",\r\n\t\tselect_year_day2: \"of\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mês\",\r\n\t\trepeat_radio_end: \"Sem data final\",\r\n\t\trepeat_text_occurences_count: \"ocorrências\",\r\n\t\trepeat_radio_end3: \"Fim\",\r\n\t\trepeat_radio_end2: \"Depois\",\r\n\r\n\t\trepeat_never: \"Nunca\",\r\n\t\trepeat_daily: \"Todos os dias\",\r\n\t\trepeat_workdays: \"Todos os dias úteis\",\r\n\t\trepeat_weekly: \"Toda semana\",\r\n\t\trepeat_monthly: \"Todo mês\",\r\n\t\trepeat_yearly: \"Todo ano\",\r\n\t\trepeat_custom: \"Personalizado\",\r\n\t\trepeat_freq_day: \"Dia\",\r\n\t\trepeat_freq_week: \"Semana\",\r\n\t\trepeat_freq_month: \"Mês\",\r\n\t\trepeat_freq_year: \"Ano\",\r\n\t\trepeat_on_date: \"Na data\",\r\n\t\trepeat_ends: \"Termina\",\r\n\r\n\t\tmonth_for_recurring: [\"Janeiro\", \"Fevereiro\", \"Março\", \"Abril\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"],\r\n\t\tday_for_recurring: [\"Domingo\", \"Segunda\", \"Terça\", \"Quarta\", \"Quinta\", \"Sexta\", \"Sábado\"]\r\n\t}\r\n};\r\n\r\n\r\n","/*\r\n\tTraducere de Ovidiu Lixandru: http://www.madball.ro\r\n */\r\n\r\nexport default {\r\n\tdate:{\r\n\t\tmonth_full:[\"Ianuarie\", \"Februarie\", \"Martie\", \"Aprilie\", \"Mai\", \"Iunie\", \"Iulie\", \"August\", \"Septembrie\", \"Octombrie\", \"November\", \"December\"],\r\n\t\tmonth_short:[\"Ian\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Iun\", \"Iul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n\t\tday_full:[\"Duminica\", \"Luni\", \"Marti\", \"Miercuri\", \"Joi\", \"Vineri\", \"Sambata\"],\r\n\t\tday_short:[\"Du\", \"Lu\", \"Ma\", \"Mi\", \"Jo\", \"Vi\", \"Sa\"]\r\n\t},\r\n\tlabels:{\r\n\t\tdhx_cal_today_button:\"Astazi\",\r\n\t\tday_tab:\"Zi\",\r\n\t\tweek_tab:\"Saptamana\",\r\n\t\tmonth_tab:\"Luna\",\r\n\t\tnew_event:\"Eveniment nou\",\r\n\t\ticon_save:\"Salveaza\",\r\n\t\ticon_cancel:\"Anuleaza\",\r\n\t\ticon_details:\"Detalii\",\r\n\t\ticon_edit:\"Editeaza\",\r\n\t\ticon_delete:\"Sterge\",\r\n\t\tconfirm_closing:\"Schimbarile nu vor fi salvate, esti sigur?\",//Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting:\"Evenimentul va fi sters permanent, esti sigur?\",\r\n\t\tsection_description:\"Descriere\",\r\n\t\tsection_time:\"Interval\",\r\n\t\tfull_day:\"Toata ziua\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring:\"Vrei sa editezi toata seria de evenimente repetate?\",\r\n\t\tsection_recurring:\"Repetare\",\r\n\t\tbutton_recurring:\"Dezactivata\",\r\n\t\tbutton_recurring_open:\"Activata\",\r\n\t\tbutton_edit_series: \"Editeaza serie\",\r\n\t\tbutton_edit_occurrence: \"Editeaza doar intrare\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"Agenda\",\r\n\t\tdate:\"Data\",\r\n\t\tdescription:\"Descriere\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"An\",\r\n\r\n\t\t/* week agenda extension */\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Lista\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Zilnic\",\r\n\t\trepeat_radio_week: \"Saptamanal\",\r\n\t\trepeat_radio_month: \"Lunar\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"La fiecare\",\r\n\t\trepeat_text_day_count: \"zi(le)\",\r\n\t\trepeat_radio_day_type2: \"Fiecare zi lucratoare\",\r\n\t\trepeat_week: \" Repeta la fiecare\",\r\n\t\trepeat_text_week_count: \"saptamana in urmatoarele zile:\",\r\n\t\trepeat_radio_month_type: \"Repeta in\",\r\n\t\trepeat_radio_month_start: \"In a\",\r\n\t\trepeat_text_month_day: \"zi la fiecare\",\r\n\t\trepeat_text_month_count: \"luni\",\r\n\t\trepeat_text_month_count2_before: \"la fiecare\",\r\n\t\trepeat_text_month_count2_after: \"luni\",\r\n\t\trepeat_year_label: \"In\",\r\n\t\tselect_year_day2: \"a lunii\",\r\n\t\trepeat_text_year_day: \"zi a lunii\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Fara data de sfarsit\",\r\n\t\trepeat_text_occurences_count: \"evenimente\",\r\n\t\trepeat_radio_end3: \"La data\",\r\n\t\trepeat_radio_end2: \"Dupa\",\r\n\r\n\t\trepeat_never: \"Niciodată\",\r\n\t\trepeat_daily: \"În fiecare zi\",\r\n\t\trepeat_workdays: \"În fiecare zi lucrătoare\",\r\n\t\trepeat_weekly: \"În fiecare săptămână\",\r\n\t\trepeat_monthly: \"În fiecare lună\",\r\n\t\trepeat_yearly: \"În fiecare an\",\r\n\t\trepeat_custom: \"Personalizat\",\r\n\t\trepeat_freq_day: \"Zi\",\r\n\t\trepeat_freq_week: \"Săptămână\",\r\n\t\trepeat_freq_month: \"Lună\",\r\n\t\trepeat_freq_year: \"An\",\r\n\t\trepeat_on_date: \"La data\",\r\n\t\trepeat_ends: \"Se termină\",\r\n\r\n\t\tmonth_for_recurring: [\"Ianuarie\", \"Februarie\", \"Martie\", \"Aprilie\", \"Mai\", \"Iunie\", \"Iulie\", \"August\", \"Septembrie\", \"Octombrie\", \"Noiembrie\", \"Decembrie\"],\r\n\t\tday_for_recurring: [\"Duminica\", \"Luni\", \"Marti\", \"Miercuri\", \"Joi\", \"Vineri\", \"Sambata\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Январь\", \"Февраль\", \"Март\", \"Апрель\", \"Maй\", \"Июнь\", \"Июль\", \"Август\", \"Сентябрь\", \"Oктябрь\", \"Ноябрь\", \"Декабрь\"],\r\n\t\tmonth_short: [\"Янв\", \"Фев\", \"Maр\", \"Aпр\", \"Maй\", \"Июн\", \"Июл\", \"Aвг\", \"Сен\", \"Окт\", \"Ноя\", \"Дек\"],\r\n\t\tday_full: [ \"Воскресенье\", \"Понедельник\", \"Вторник\", \"Среда\", \"Четверг\", \"Пятница\", \"Суббота\"],\r\n\t\tday_short: [\"Вс\", \"Пн\", \"Вт\", \"Ср\", \"Чт\", \"Пт\", \"Сб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сегодня\",\r\n\t\tday_tab: \"День\",\r\n\t\tweek_tab: \"Неделя\",\r\n\t\tmonth_tab: \"Месяц\",\r\n\t\tnew_event: \"Новое событие\",\r\n\t\ticon_save: \"Сохранить\",\r\n\t\ticon_cancel: \"Отменить\",\r\n\t\ticon_details: \"Детали\",\r\n\t\ticon_edit: \"Изменить\",\r\n\t\ticon_delete: \"Удалить\",\r\n\t\tconfirm_closing: \"\", //Ваши изменения будут потеряны, продолжить?\r\n\t\tconfirm_deleting: \"Событие будет удалено безвозвратно, продолжить?\",\r\n\t\tsection_description: \"Описание\",\r\n\t\tsection_time: \"Период времени\",\r\n\t\tfull_day: \"Весь день\",\r\n\r\n\t\tconfirm_recurring: \"Вы хотите изменить всю серию повторяющихся событий?\",\r\n\t\tsection_recurring: \"Повторение\",\r\n\t\tbutton_recurring: \"Отключено\",\r\n\t\tbutton_recurring_open: \"Включено\",\r\n\t\tbutton_edit_series: \"Редактировать серию\",\r\n\t\tbutton_edit_occurrence: \"Редактировать экземпляр\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Список\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Описание\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Год\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Список\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Таблица\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"День\",\r\n\t\trepeat_radio_week: \"Неделя\",\r\n\t\trepeat_radio_month: \"Месяц\",\r\n\t\trepeat_radio_year: \"Год\",\r\n\t\trepeat_radio_day_type: \"Каждый\",\r\n\t\trepeat_text_day_count: \"день\",\r\n\t\trepeat_radio_day_type2: \"Каждый рабочий день\",\r\n\t\trepeat_week: \" Повторять каждую\",\r\n\t\trepeat_text_week_count: \"неделю , в:\",\r\n\t\trepeat_radio_month_type: \"Повторять\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" числа каждый \",\r\n\t\trepeat_text_month_count: \"месяц\",\r\n\t\trepeat_text_month_count2_before: \"каждый \",\r\n\t\trepeat_text_month_count2_after: \"месяц\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"день\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без даты окончания\",\r\n\t\trepeat_text_occurences_count: \"повторений\",\r\n\t\trepeat_radio_end3: \"До \",\r\n\t\trepeat_radio_end2: \"\",\r\n\r\n\t\trepeat_never: \"Никогда\",\r\n\t\trepeat_daily: \"Каждый день\",\r\n\t\trepeat_workdays: \"Каждый будний день\",\r\n\t\trepeat_weekly: \"Каждую неделю\",\r\n\t\trepeat_monthly: \"Каждый месяц\",\r\n\t\trepeat_yearly: \"Каждый год\",\r\n\t\trepeat_custom: \"Настроить\",\r\n\t\trepeat_freq_day: \"День\",\r\n\t\trepeat_freq_week: \"Неделя\",\r\n\t\trepeat_freq_month: \"Месяц\",\r\n\t\trepeat_freq_year: \"Год\",\r\n\t\trepeat_on_date: \"В дату\",\r\n\t\trepeat_ends: \"Заканчивается\",\r\n\r\n\t\tmonth_for_recurring: [\"Января\", \"Февраля\", \"Марта\", \"Апреля\", \"Мая\", \"Июня\", \"Июля\", \"Августа\", \"Сентября\", \"Октября\", \"Ноября\", \"Декабря\"],\r\n\t\tday_for_recurring: [\"Воскресенье\", \"Понедельник\", \"Вторник\", \"Среду\", \"Четверг\", \"Пятницу\", \"Субботу\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Marec\", \"April\", \"Maj\", \"Junij\", \"Julij\", \"Avgust\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Nedelja\", \"Ponedeljek\", \"Torek\", \"Sreda\", \"Četrtek\", \"Petek\", \"Sobota\"],\r\n\t\tday_short: [\"Ned\", \"Pon\", \"Tor\", \"Sre\", \"Čet\", \"Pet\", \"Sob\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Danes\",\r\n\t\tday_tab: \"Dan\",\r\n\t\tweek_tab: \"Teden\",\r\n\t\tmonth_tab: \"Mesec\",\r\n\t\tnew_event: \"Nov dogodek\",\r\n\t\ticon_save: \"Shrani\",\r\n\t\ticon_cancel: \"Prekliči\",\r\n\t\ticon_details: \"Podrobnosti\",\r\n\t\ticon_edit: \"Uredi\",\r\n\t\ticon_delete: \"Izbriši\",\r\n\t\tconfirm_closing: \"\", //Spremembe ne bodo shranjene. Želite nadaljevati ?\r\n\t\tconfirm_deleting: \"Dogodek bo izbrisan. Želite nadaljevati?\",\r\n\t\tsection_description: \"Opis\",\r\n\t\tsection_time: \"Časovni okvir\",\r\n\t\tfull_day: \"Ves dan\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Želite urediti celoten set ponavljajočih dogodkov?\",\r\n\t\tsection_recurring: \"Ponovi dogodek\",\r\n\t\tbutton_recurring: \"Onemogočeno\",\r\n\t\tbutton_recurring_open: \"Omogočeno\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Edit occurrence\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Zadeva\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Opis\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Leto\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Zadeva\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Miza\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dnevno\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Tedensko\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Mesečno\",\r\n\t\trepeat_radio_year: \"Letno\",\r\n\t\trepeat_radio_day_type: \"Vsak\",\r\n\t\trepeat_text_day_count: \"dan\",\r\n\t\trepeat_radio_day_type2: \"Vsak delovni dan\",\r\n\t\trepeat_week: \" Ponavljaj vsak\",\r\n\t\trepeat_text_week_count: \"teden na naslednje dni:\",\r\n\t\trepeat_radio_month_type: \"Ponavljaj\",\r\n\t\trepeat_radio_month_start: \"Na\",\r\n\t\trepeat_text_month_day: \"dan vsak\",\r\n\t\trepeat_text_month_count: \"mesec\",\r\n\t\trepeat_text_month_count2_before: \"vsak\",\r\n\t\trepeat_text_month_count2_after: \"mesec\",\r\n\t\trepeat_year_label: \"Na\",\r\n\t\tselect_year_day2: \"od\",\r\n\t\trepeat_text_year_day: \"dan\",\r\n\t\tselect_year_month: \"mesec\",\r\n\t\trepeat_radio_end: \"Brez končnega datuma\",\r\n\t\trepeat_text_occurences_count: \"pojavitve\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\t\trepeat_radio_end3: \"Končaj do\",\r\n\r\n\t\trepeat_never: \"Nikoli\",\r\n\t\trepeat_daily: \"Vsak dan\",\r\n\t\trepeat_workdays: \"Vsak delovni dan\",\r\n\t\trepeat_weekly: \"Vsak teden\",\r\n\t\trepeat_monthly: \"Vsak mesec\",\r\n\t\trepeat_yearly: \"Vsako leto\",\r\n\t\trepeat_custom: \"Po meri\",\r\n\t\trepeat_freq_day: \"Dan\",\r\n\t\trepeat_freq_week: \"Teden\",\r\n\t\trepeat_freq_month: \"Mesec\",\r\n\t\trepeat_freq_year: \"Leto\",\r\n\t\trepeat_on_date: \"Na datum\",\r\n\t\trepeat_ends: \"Konča se\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"Marec\", \"April\", \"Maj\", \"Junij\", \"Julij\", \"Avgust\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Nedelja\", \"Ponedeljek\", \"Torek\", \"Sreda\", \"Četrtek\", \"Petek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Január\", \"Február\", \"Marec\", \"Apríl\", \"Máj\", \"Jún\", \"Júl\", \"August\", \"September\", \"Október\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Máj\", \"Jún\", \"Júl\", \"Aug\", \"Sept\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Nedeľa\", \"Pondelok\", \"Utorok\", \"Streda\", \"Štvrtok\", \"Piatok\", \"Sobota\"],\r\n\t\tday_short: [\"Ne\", \"Po\", \"Ut\", \"St\", \"Št\", \"Pi\", \"So\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dnes\",\r\n\t\tday_tab: \"Deň\",\r\n\t\tweek_tab: \"Týždeň\",\r\n\t\tmonth_tab: \"Mesiac\",\r\n\t\tnew_event: \"Nová udalosť\",\r\n\t\ticon_save: \"Uložiť\",\r\n\t\ticon_cancel: \"Späť\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edituj\",\r\n\t\ticon_delete: \"Zmazať\",\r\n\t\tconfirm_closing: \"Vaše zmeny nebudú uložené. Skutočne?\", //Vaše změny budou ztraceny, opravdu ?\r\n\t\tconfirm_deleting: \"Udalosť bude natrvalo vymazaná. Skutočne?\",\r\n\t\tsection_description: \"Poznámky\",\r\n\t\tsection_time: \"Doba platnosti\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Prajete si upraviť celú radu opakovaných udalostí?\",\r\n\t\tsection_recurring: \"Opakovanie udalosti\",\r\n\t\tbutton_recurring: \"Vypnuté\",\r\n\t\tbutton_recurring_open: \"Zapnuté\",\r\n\t\tbutton_edit_series: \"Upraviť opakovania\",\r\n\t\tbutton_edit_occurrence: \"Upraviť inštancie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Program\",\r\n\t\tdate: \"Dátum\",\r\n\t\tdescription: \"Poznámka\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\t\tfull_day: \"Celý deň\", // Full day\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Program\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Mriežka\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Denne\",\r\n\t\trepeat_radio_week: \"Týždenne\",\r\n\t\trepeat_radio_month: \"Mesaène\",\r\n\t\trepeat_radio_year: \"Roène\",\r\n\t\trepeat_radio_day_type: \"Každý\",\r\n\t\trepeat_text_day_count: \"deò\",\r\n\t\trepeat_radio_day_type2: \"Každý prac. deò\",\r\n\t\trepeat_week: \"Opakova každý\",\r\n\t\trepeat_text_week_count: \"týždeò v dòoch:\",\r\n\t\trepeat_radio_month_type: \"Opakova\",\r\n\t\trepeat_radio_month_start: \"On\",\r\n\t\trepeat_text_month_day: \"deò každý\",\r\n\t\trepeat_text_month_count: \"mesiac\",\r\n\t\trepeat_text_month_count2_before: \"každý\",\r\n\t\trepeat_text_month_count2_after: \"mesiac\",\r\n\t\trepeat_year_label: \"On\",\r\n\t\tselect_year_day2: \"poèas\",\r\n\t\trepeat_text_year_day: \"deò\",\r\n\t\tselect_year_month: \"mesiac\",\r\n\t\trepeat_radio_end: \"Bez dátumu ukonèenia\",\r\n\t\trepeat_text_occurences_count: \"udalostiach\",\r\n\t\trepeat_radio_end3: \"Ukonèi\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\r\n\t\trepeat_never: \"Nikdy\",\r\n\t\trepeat_daily: \"Každý deň\",\r\n\t\trepeat_workdays: \"Každý pracovný deň\",\r\n\t\trepeat_weekly: \"Každý týždeň\",\r\n\t\trepeat_monthly: \"Každý mesiac\",\r\n\t\trepeat_yearly: \"Každý rok\",\r\n\t\trepeat_custom: \"Vlastné\",\r\n\t\trepeat_freq_day: \"Deň\",\r\n\t\trepeat_freq_week: \"Týždeň\",\r\n\t\trepeat_freq_month: \"Mesiac\",\r\n\t\trepeat_freq_year: \"Rok\",\r\n\t\trepeat_on_date: \"Na dátum\",\r\n\t\trepeat_ends: \"Koniec\",\r\n\r\n\t\tmonth_for_recurring: [\"Január\", \"Február\", \"Marec\", \"Apríl\", \"Máj\", \"Jún\", \"Júl\", \"August\", \"September\", \"Október\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Nede¾a\", \"Pondelok\", \"Utorok\", \"Streda\", \"Štvrtok\", \"Piatok\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Mars\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"Augusti\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Söndag\", \"Måndag\", \"Tisdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lördag\"],\r\n\t\tday_short: [\"Sön\", \"Mån\", \"Tis\", \"Ons\", \"Tor\", \"Fre\", \"Lör\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Vecka\",\r\n\t\tmonth_tab: \"Månad\",\r\n\t\tnew_event: \"Ny händelse\",\r\n\t\ticon_save: \"Spara\",\r\n\t\ticon_cancel: \"Ångra\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Ändra\",\r\n\t\ticon_delete: \"Ta bort\",\r\n\t\tconfirm_closing: \"\", //Dina förändingar kommer gå förlorade, är du säker?\r\n\t\tconfirm_deleting: \"Är du säker på att du vill ta bort händelsen permanent?\",\r\n\t\tsection_description: \"Beskrivning\",\r\n\t\tsection_time: \"Tid\",\r\n\t\tfull_day: \"Hela dagen\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vill du redigera hela serien med repeterande händelser?\",\r\n\t\tsection_recurring: \"Upprepa händelse\",\r\n\t\tbutton_recurring: \"Inaktiverat\",\r\n\t\tbutton_recurring_open: \"Aktiverat\",\r\n\t\tbutton_edit_series: \"Redigera serien\",\r\n\t\tbutton_edit_occurrence: \"Redigera en kopia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dagordning\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Beskrivning\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dagordning\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Galler\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Dra för att skapa ny\",\r\n\t\tdrag_to_move:\"Dra för att flytta\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dagligen\",\r\n\t\trepeat_radio_week: \"Veckovis\",\r\n\t\trepeat_radio_month: \"Månadsvis\",\r\n\t\trepeat_radio_year: \"Årligen\",\r\n\t\trepeat_radio_day_type: \"Var\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Varje arbetsdag\",\r\n\t\trepeat_week: \" Upprepa var\",\r\n\t\trepeat_text_week_count: \"vecka dessa dagar:\",\r\n\t\trepeat_radio_month_type: \"Upprepa\",\r\n\t\trepeat_radio_month_start: \"Den\",\r\n\t\trepeat_text_month_day: \"dagen var\",\r\n\t\trepeat_text_month_count: \"månad\",\r\n\t\trepeat_text_month_count2_before: \"var\",\r\n\t\trepeat_text_month_count2_after: \"månad\",\r\n\t\trepeat_year_label: \"Den\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"månad\",\r\n\t\trepeat_radio_end: \"Inget slutdatum\",\r\n\t\trepeat_text_occurences_count: \"upprepningar\",\r\n\t\trepeat_radio_end3: \"Sluta efter\",\r\n\t\trepeat_radio_end2: \"Efter\",\r\n\r\n\t\trepeat_never: \"Aldrig\",\r\n\t\trepeat_daily: \"Varje dag\",\r\n\t\trepeat_workdays: \"Varje vardag\",\r\n\t\trepeat_weekly: \"Varje vecka\",\r\n\t\trepeat_monthly: \"Varje månad\",\r\n\t\trepeat_yearly: \"Varje år\",\r\n\t\trepeat_custom: \"Anpassad\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Vecka\",\r\n\t\trepeat_freq_month: \"Månad\",\r\n\t\trepeat_freq_year: \"År\",\r\n\t\trepeat_on_date: \"På datum\",\r\n\t\trepeat_ends: \"Slutar\",\r\n\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Mars\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"Augusti\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Söndag\", \"Måndag\", \"Tisdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lördag\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Ocak\", \"Þubat\", \"Mart\", \"Nisan\", \"Mayýs\", \"Haziran\", \"Temmuz\", \"Aðustos\", \"Eylül\", \"Ekim\", \"Kasým\", \"Aralýk\"],\r\n\t\tmonth_short: [\"Oca\", \"Þub\", \"Mar\", \"Nis\", \"May\", \"Haz\", \"Tem\", \"Aðu\", \"Eyl\", \"Eki\", \"Kas\", \"Ara\"],\r\n\t\tday_full: [\"Pazar\", \"Pazartes,\", \"Salý\", \"Çarþamba\", \"Perþembe\", \"Cuma\", \"Cumartesi\"],\r\n\t\tday_short: [\"Paz\", \"Pts\", \"Sal\", \"Çar\", \"Per\", \"Cum\", \"Cts\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Bugün\",\r\n\t\tday_tab: \"Gün\",\r\n\t\tweek_tab: \"Hafta\",\r\n\t\tmonth_tab: \"Ay\",\r\n\t\tnew_event: \"Uygun\",\r\n\t\ticon_save: \"Kaydet\",\r\n\t\ticon_cancel: \"Ýptal\",\r\n\t\ticon_details: \"Detaylar\",\r\n\t\ticon_edit: \"Düzenle\",\r\n\t\ticon_delete: \"Sil\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Etkinlik silinecek, devam?\",\r\n\t\tsection_description: \"Açýklama\",\r\n\t\tsection_time: \"Zaman aralýðý\",\r\n\t\tfull_day: \"Tam gün\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Tüm tekrar eden etkinlikler silinecek, devam?\",\r\n\t\tsection_recurring: \"Etkinliði tekrarla\",\r\n\t\tbutton_recurring: \"Pasif\",\r\n\t\tbutton_recurring_open: \"Aktif\",\r\n\t\tbutton_edit_series: \"Dizi düzenleme\",\r\n\t\tbutton_edit_occurrence: \"Bir kopyasını düzenleyin\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Ajanda\",\r\n\t\tdate: \"Tarih\",\r\n\t\tdescription: \"Açýklama\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Yýl\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Ajanda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Izgara\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Günlük\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Haftalık\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Aylık\",\r\n\t\trepeat_radio_year: \"Yıllık\",\r\n\t\trepeat_radio_day_type: \"Her\",\r\n\t\trepeat_text_day_count: \"gün\",\r\n\t\trepeat_radio_day_type2: \"Her iş günü\",\r\n\t\trepeat_week: \" Tekrar her\",\r\n\t\trepeat_text_week_count: \"hafta şu günlerde:\",\r\n\t\trepeat_radio_month_type: \"Tekrar et\",\r\n\t\trepeat_radio_month_start: \"Tarihinde\",\r\n\t\trepeat_text_month_day: \"gün her\",\r\n\t\trepeat_text_month_count: \"ay\",\r\n\t\trepeat_text_month_count2_before: \"her\",\r\n\t\trepeat_text_month_count2_after: \"ay\",\r\n\t\trepeat_year_label: \"Tarihinde\",\r\n\t\tselect_year_day2: \"ayın\",\r\n\t\trepeat_text_year_day: \"günü\",\r\n\t\tselect_year_month: \"ay\",\r\n\t\trepeat_radio_end: \"Bitiş tarihi yok\",\r\n\t\trepeat_text_occurences_count: \"olay\",\r\n\t\trepeat_radio_end2: \"Sonra\",\r\n\t\trepeat_radio_end3: \"Tarihinde bitir\",\r\n\r\n\t\trepeat_never: \"Asla\",\r\n\t\trepeat_daily: \"Her gün\",\r\n\t\trepeat_workdays: \"Her iş günü\",\r\n\t\trepeat_weekly: \"Her hafta\",\r\n\t\trepeat_monthly: \"Her ay\",\r\n\t\trepeat_yearly: \"Her yıl\",\r\n\t\trepeat_custom: \"Özel\",\r\n\t\trepeat_freq_day: \"Gün\",\r\n\t\trepeat_freq_week: \"Hafta\",\r\n\t\trepeat_freq_month: \"Ay\",\r\n\t\trepeat_freq_year: \"Yıl\",\r\n\t\trepeat_on_date: \"Tarihinde\",\r\n\t\trepeat_ends: \"Biter\",\r\n\r\n\t\tmonth_for_recurring: [\"Ocak\", \"Şubat\", \"Mart\", \"Nisan\", \"Mayıs\", \"Haziran\", \"Temmuz\", \"Ağustos\", \"Eylül\", \"Ekim\", \"Kasım\", \"Aralık\"],\r\n\t\tday_for_recurring: [\"Pazar\", \"Pazartesi\", \"Salı\", \"Çarşamba\", \"Perşembe\", \"Cuma\", \"Cumartesi\"]\r\n\t}\r\n};","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Січень\", \"Лютий\", \"Березень\", \"Квітень\", \"Травень\", \"Червень\", \"Липень\", \"Серпень\", \"Вересень\", \"Жовтень\", \"Листопад\", \"Грудень\"],\r\n\t\tmonth_short: [\"Січ\", \"Лют\", \"Бер\", \"Кві\", \"Тра\", \"Чер\", \"Лип\", \"Сер\", \"Вер\", \"Жов\", \"Лис\", \"Гру\"],\r\n\t\tday_full: [\"Неділя\", \"Понеділок\", \"Вівторок\", \"Середа\", \"Четвер\", \"П'ятниця\", \"Субота\"],\r\n\t\tday_short: [\"Нед\", \"Пон\", \"Вів\", \"Сер\", \"Чет\", \"Птн\", \"Суб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сьогодні\",\r\n\t\tday_tab: \"День\",\r\n\t\tweek_tab: \"Тиждень\",\r\n\t\tmonth_tab: \"Місяць\",\r\n\t\tnew_event: \"Нова подія\",\r\n\t\ticon_save: \"Зберегти\",\r\n\t\ticon_cancel: \"Відміна\",\r\n\t\ticon_details: \"Деталі\",\r\n\t\ticon_edit: \"Редагувати\",\r\n\t\ticon_delete: \"Вилучити\",\r\n\t\tconfirm_closing: \"\", //Ваші зміни втратяться. Ви впевнені ?\r\n\t\tconfirm_deleting: \"Подія вилучиться назавжди. Ви впевнені?\",\r\n\t\tsection_description: \"Опис\",\r\n\t\tsection_time: \"Часовий проміжок\",\r\n\t\tfull_day: \"Весь день\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Хочете редагувати весь перелік повторюваних подій?\",\r\n\t\tsection_recurring: \"Повторювана подія\",\r\n\t\tbutton_recurring: \"Відключено\",\r\n\t\tbutton_recurring_open: \"Включено\",\r\n\t\tbutton_edit_series: \"Редагувати серію\",\r\n\t\tbutton_edit_occurrence: \"Редагувати примірник\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Перелік\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Опис\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Рік\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Перелік\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Таблиця\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"День\",\r\n\t\trepeat_radio_week: \"Тиждень\",\r\n\t\trepeat_radio_month: \"Місяць\",\r\n\t\trepeat_radio_year: \"Рік\",\r\n\t\trepeat_radio_day_type: \"Кожний\",\r\n\t\trepeat_text_day_count: \"день\",\r\n\t\trepeat_radio_day_type2: \"Кожний робочий день\",\r\n\t\trepeat_week: \" Повторювати кожен\",\r\n\t\trepeat_text_week_count: \"тиждень , по:\",\r\n\t\trepeat_radio_month_type: \"Повторювати\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" числа кожний \",\r\n\t\trepeat_text_month_count: \"місяць\",\r\n\t\trepeat_text_month_count2_before: \"кожен \",\r\n\t\trepeat_text_month_count2_after: \"місяць\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"день\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без дати закінчення\",\r\n\t\trepeat_text_occurences_count: \"повторень\",\r\n\t\trepeat_radio_end3: \"До \",\r\n\t\trepeat_radio_end2: \"\",\r\n\r\n\t\trepeat_never: \"Ніколи\",\r\n\t\trepeat_daily: \"Щодня\",\r\n\t\trepeat_workdays: \"Щодня в робочі дні\",\r\n\t\trepeat_weekly: \"Щотижня\",\r\n\t\trepeat_monthly: \"Щомісяця\",\r\n\t\trepeat_yearly: \"Щороку\",\r\n\t\trepeat_custom: \"Налаштоване\",\r\n\t\trepeat_freq_day: \"День\",\r\n\t\trepeat_freq_week: \"Тиждень\",\r\n\t\trepeat_freq_month: \"Місяць\",\r\n\t\trepeat_freq_year: \"Рік\",\r\n\t\trepeat_on_date: \"На дату\",\r\n\t\trepeat_ends: \"Закінчується\",\r\n\r\n\t\tmonth_for_recurring: [\"січня\", \"лютого\", \"березня\", \"квітня\", \"травня\", \"червня\", \"липня\", \"серпня\", \"вересня\", \"жовтня\", \"листопада\", \"грудня\"],\r\n\t\tday_for_recurring: [\"Неділям\", \"Понеділкам\", \"Вівторкам\", \"Середам\", \"Четвергам\", \"П'ятницям\", \"Суботам\"]\r\n\t}\r\n};\r\n","import ar from \"./locale_ar\";\r\nimport be from \"./locale_be\";\r\nimport ca from \"./locale_ca\";\r\nimport cn from \"./locale_cn\";\r\nimport cs from \"./locale_cs\";\r\nimport da from \"./locale_da\";\r\nimport de from \"./locale_de\";\r\nimport el from \"./locale_el\";\r\nimport en from \"./locale_en\";\r\nimport es from \"./locale_es\";\r\nimport fi from \"./locale_fi\";\r\nimport fr from \"./locale_fr\";\r\nimport he from \"./locale_he\";\r\nimport hu from \"./locale_hu\";\r\nimport id from \"./locale_id\";\r\nimport it from \"./locale_it\";\r\nimport jp from \"./locale_jp\";\r\n\r\nimport LocaleManager from \"./locale_manager\";\r\n\r\nimport nb from \"./locale_nb\";\r\nimport nl from \"./locale_nl\";\r\nimport no from \"./locale_no\";\r\nimport pl from \"./locale_pl\";\r\nimport pt from \"./locale_pt\";\r\nimport ro from \"./locale_ro\";\r\nimport ru from \"./locale_ru\";\r\nimport si from \"./locale_si\";\r\nimport sk from \"./locale_sk\";\r\nimport sv from \"./locale_sv\";\r\nimport tr from \"./locale_tr\";\r\nimport ua from \"./locale_ua\";\r\n\r\nexport default function(){\r\n\treturn new LocaleManager({\r\n\t\ten,\r\n\t\tar,\r\n\t\tbe,\r\n\t\tca,\r\n\t\tcn,\r\n\t\tcs,\r\n\t\tda,\r\n\t\tde,\r\n\t\tel,\r\n\t\tes,\r\n\t\tfi,\r\n\t\tfr,\r\n\t\the,\r\n\t\thu,\r\n\t\tid,\r\n\t\tit,\r\n\t\tjp,\r\n\t\tnb,\r\n\t\tnl,\r\n\t\tno,\r\n\t\tpl,\r\n\t\tpt,\r\n\t\tro,\r\n\t\tru,\r\n\t\tsi,\r\n\t\tsk,\r\n\t\tsv,\r\n\t\ttr,\r\n\t\tua\r\n\t});\r\n}","import eventable from \"../utils/eventable\";\r\n\r\nexport class DatePicker {\r\n\tconstructor(scheduler, container, state = {}) {\r\n\t\tthis.state = {\r\n\t\t\tdate: new Date(),\r\n\t\t\tmodes: ['days', 'months', 'years'],\r\n\t\t\tcurrentRange: [],\r\n\t\t\teventDates: [],\r\n\t\t\tcurrentModeIndex: 0,\r\n\t\t\t...state\r\n\t\t};\r\n\t\tthis.container = null;\r\n\t\tthis.element = null;\r\n\t\tthis.onStateChangeHandlers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t\tthis._domEvents = scheduler._createDomEventScope();\r\n\t\tthis.state = this.getState();\r\n\t\teventable(this);\r\n\t\tif(container){\r\n\r\n\t\t\tthis.container = container;\r\n\t\t\tthis.render(this.container);\r\n\t\t}\r\n\r\n\t\tthis.onStateChange((oldState, newState) => {\r\n\t\t\tthis.callEvent(\"onStateChange\", [newState, oldState]);\r\n\t\t});\r\n\t}\r\n\r\n\tgetState() {\r\n\t\treturn { \r\n\t\t\t...this.state,\r\n\t\t\tmode: this.state.modes[this.state.currentModeIndex]\r\n\t\t};\r\n\t}\r\n\r\n\tsetState(newState) {\r\n\t\tconst oldState = { ...this.state };\r\n\t\tif(newState.mode){\r\n\t\t\tnewState.currentModeIndex = this.state.modes.indexOf(newState.mode);\r\n\t\t}\r\n\t\tthis.state = { ...this.state, ...newState };\r\n\r\n\t\tthis._notifyStateChange(oldState, this.state);\r\n\r\n\t\tif (this.container) {\r\n\t\t\tthis.render(this.container);\r\n\t\t}\r\n\t}\r\n\r\n\tonStateChange(handler) {\r\n\t\tthis.onStateChangeHandlers.push(handler);\r\n\r\n\t\t// function to remove the handler\r\n\t\treturn () => {\r\n\t\t\tconst index = this.onStateChangeHandlers.indexOf(handler);\r\n\t\t\tif (index !== -1) {\r\n\t\t\t\tthis.onStateChangeHandlers.splice(index, 1);\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\r\n\t_notifyStateChange(oldState, newState) {\r\n\t\tthis.onStateChangeHandlers.forEach(handler => handler(oldState, newState));\r\n\t}\r\n\r\n\t_adjustDate(direction) {\r\n\r\n\t\tconst {mode, date} = this.getState();\r\n\t\tconst newDate = new Date(date);\r\n\t\tif (mode === 'days') {\r\n\t\t\tnewDate.setMonth(date.getMonth() + direction);\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tnewDate.setFullYear(date.getFullYear() + direction);\r\n\t\t} else {\r\n\t\t\tnewDate.setFullYear(date.getFullYear() + direction * 10);\r\n\t\t}\r\n\t\tthis.setState({ date: newDate });\r\n\t}\r\n\r\n\t_toggleMode() {\r\n\t\tconst newIndex = (this.state.currentModeIndex + 1) % this.state.modes.length;\r\n\t\tthis.setState({ currentModeIndex: newIndex });\r\n\t}\r\n\r\n\t_renderCalendarHeader(container) {\r\n\t\tconst {mode, date} = this.getState();\r\n\r\n\t\tconst header = document.createElement('div');\r\n\t\theader.classList.add('dhx_cal_datepicker_header');\r\n\r\n\t\tconst backwardArrow = document.createElement('button');\r\n\r\n\t\tbackwardArrow.classList.add(\"dhx_cal_datepicker_arrow\", \"scheduler_icon\", \"arrow_left\");\r\n\t\theader.appendChild(backwardArrow);\r\n\r\n\t\tconst monthLabel = document.createElement('div');\r\n\t\tmonthLabel.classList.add('dhx_cal_datepicker_title');\r\n\r\n\t\tif (mode === 'days') {\r\n\t\t\tmonthLabel.innerText = date.toLocaleString('default', { month: 'long' }) + ' ' + date.getFullYear();\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tmonthLabel.innerText = date.getFullYear();\r\n\t\t} else {\r\n\t\t\tconst startYear = Math.floor(date.getFullYear() / 10) * 10;\r\n\t\t\tmonthLabel.innerText = `${startYear} - ${startYear + 9}`;\r\n\t\t}\r\n\r\n\t\tthis._domEvents.attach(monthLabel, \"click\", this._toggleMode.bind(this));\r\n\t\theader.appendChild(monthLabel);\r\n\r\n\t\tconst forwardArrow = document.createElement('button');\r\n\r\n\t\tforwardArrow.classList.add(\"dhx_cal_datepicker_arrow\", \"scheduler_icon\", \"arrow_right\");\r\n\t\theader.appendChild(forwardArrow);\r\n\r\n\t\tcontainer.appendChild(header);\r\n\r\n\t\tthis._domEvents.attach(backwardArrow, \"click\", this._adjustDate.bind(this, -1));\r\n\t\tthis._domEvents.attach(forwardArrow, \"click\", this._adjustDate.bind(this, 1));\r\n\t}\r\n\r\n\trender(container) {\r\n\t\tthis._domEvents.detachAll();\r\n\t\tthis.container = container || this.container; \r\n\t\tthis.container.innerHTML = '';\r\n\r\n\t\tif(!this.element){\r\n\t\t\tthis.element = document.createElement(\"div\");\r\n\t\t\tthis.element.classList.add(\"dhx_cal_datepicker\");\r\n\t\t}\r\n\t\tthis.element.innerHTML = '';\r\n\t\tthis.container.appendChild(this.element);\r\n\r\n\t\tthis._renderCalendarHeader(this.element);\r\n\t\tconst dataContainer = document.createElement(\"div\");\r\n\t\tdataContainer.classList.add(\"dhx_cal_datepicker_data\");\r\n\t\tthis.element.appendChild(dataContainer);\r\n\r\n\t\tconst {mode} = this.getState();\r\n\t\tif (mode === 'days') {\r\n\t\t\tthis._renderDayGrid(dataContainer);\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tthis._renderMonthGrid(dataContainer);\r\n\t\t} else {\r\n\t\t\tthis._renderYearGrid(dataContainer);\r\n\t\t}\r\n\t}\r\n\r\n\t_renderDayGridHeader(daysOfWeekContainer) {\r\n\t\tconst {date} = this.getState();\r\n\t\tconst scheduler = this.scheduler;\r\n\r\n\t\tlet currentDate = scheduler.date.week_start(new Date(date));\r\n\t\tconst maxDate = scheduler.date.add(scheduler.date.week_start(new Date(date)), 1, 'week');\r\n\r\n\t\tdaysOfWeekContainer.classList.add('dhx_cal_datepicker_days');\r\n\r\n\t\tconst labelFormat = scheduler.date.date_to_str(\"%D\");\r\n\r\n\t\twhile (currentDate.valueOf() < maxDate.valueOf()) {\r\n\t\t\tconst label = labelFormat(currentDate);\r\n\r\n\t\t\tconst dayElement = document.createElement('div');\r\n\t\t\tdayElement.setAttribute(\"data-day\", currentDate.getDay());\r\n\t\t\tdayElement.classList.add('dhx_cal_datepicker_dayname');\r\n\t\t\tdayElement.innerText = label;\r\n\t\t\tdaysOfWeekContainer.appendChild(dayElement);\r\n\r\n\t\t\tcurrentDate = scheduler.date.add(currentDate, 1, 'day');\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t_weeksBetween(min, max) {\r\n\t\tconst scheduler = this.scheduler;\r\n\t\tlet weeks = 0;\r\n\t\tlet currWeek = new Date(min);\r\n\t\twhile(currWeek.valueOf() < max.valueOf()){\r\n\t\t\tweeks += 1;\r\n\t\t\tcurrWeek = scheduler.date.week_start(scheduler.date.add(currWeek, 1, \"week\"));\r\n\t\t}\r\n\t\treturn weeks;\r\n\t}\r\n\r\n\t_renderDayGrid(container) {\r\n\t\tconst {date, currentRange, eventDates, minWeeks} = this.getState();\r\n\r\n\t\tlet minSchedulerDate = currentRange[0];\r\n\t\tlet maxSchedulerDate = currentRange[1];\r\n\r\n\t\tconst eventDaysTable = eventDates.reduce((acc, date) => {\r\n\t\t\tconst dayStart = this.scheduler.date.day_start(new Date(date));\r\n\t\t\tacc[dayStart.valueOf()] = true;\r\n\t\t\treturn acc;\r\n\t\t}, {});\r\n\r\n\r\n\t\t// Render Days of the Week\r\n\t\tconst daysOfWeekContainer = document.createElement('div');\r\n\t\tthis._renderDayGridHeader(daysOfWeekContainer);\r\n\t\tcontainer.appendChild(daysOfWeekContainer);\r\n\r\n\t\tconst scheduler = this.scheduler;\r\n\t\tconst firstDate = scheduler.date.week_start(scheduler.date.month_start(new Date(date)));\r\n\t\tconst monthStart = scheduler.date.month_start(new Date(date));\r\n\t\tconst monthEnd = scheduler.date.add(scheduler.date.month_start(new Date(date)), 1, 'month');\r\n\t\tlet lastDate = scheduler.date.add(scheduler.date.month_start(new Date(date)), 1, 'month');\r\n\t\tconst currentCalDate = scheduler.date.date_part(scheduler._currentDate());\r\n\t\tif(lastDate.getDay() !== 0){\r\n\t\t\tlastDate = scheduler.date.add(scheduler.date.week_start(lastDate), 1, \"week\");\r\n\t\t}\r\n\r\n\t\tlet weeks = this._weeksBetween(firstDate, lastDate);\r\n\t\tif(minWeeks && weeks < minWeeks){\r\n\t\t\tlastDate = scheduler.date.add(lastDate, (minWeeks - weeks), \"week\");\r\n\t\t}\r\n\r\n\t\tlet currDate = firstDate;\r\n\r\n\t\tconst dayGridContainer = document.createElement('div');\r\n\t\tdayGridContainer.classList.add('dhx_cal_datepicker_days');\r\n\r\n\t\tthis._domEvents.attach(dayGridContainer, \"click\", (event) => {\r\n\t\t\tconst dateCell = event.target.closest(\"[data-cell-date]\");\r\n\t\t\tconst date = new Date(dateCell.getAttribute(\"data-cell-date\"));\r\n\t\t\tthis.callEvent(\"onDateClick\", [date, event]);\r\n\t\t});\r\n\r\n\t\twhile(currDate.valueOf() < lastDate.valueOf()){\r\n\t\t\tconst dayElement = document.createElement('div');\r\n\t\t\tdayElement.setAttribute(\"data-cell-date\", scheduler.templates.format_date(currDate));\r\n\t\t\tdayElement.setAttribute(\"data-day\", currDate.getDay());\r\n\t\t\tdayElement.innerHTML = currDate.getDate();\r\n\r\n\t\t\tif(currDate.valueOf() < monthStart.valueOf()){\r\n\t\t\t\tdayElement.classList.add('dhx_before');\r\n\t\t\t}else if(currDate.valueOf() >= monthEnd.valueOf()){\t\r\n\t\t\t\tdayElement.classList.add('dhx_after');\r\n\t\t\t}\r\n\r\n\t\t\tif(currDate.getDay() === 0 || currDate.getDay() === 6){\r\n\t\t\t\tdayElement.classList.add(\"dhx_cal_datepicker_weekend\");\r\n\t\t\t}\r\n\r\n\t\t\tif(currDate.valueOf() == currentCalDate.valueOf()){\r\n\t\t\t\tdayElement.classList.add(\"dhx_now\");\r\n\t\t\t}\r\n\r\n\t\t\tif(minSchedulerDate && maxSchedulerDate){\r\n\t\t\t\tif(currDate.valueOf() >= minSchedulerDate.valueOf() && currDate.valueOf() < maxSchedulerDate.valueOf()){\r\n\t\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(eventDaysTable[currDate.valueOf()]){\r\n\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_event');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdayElement.classList.add('dhx_cal_datepicker_date');\r\n\r\n\t\t\tdayGridContainer.appendChild(dayElement);\r\n\t\t\tcurrDate = scheduler.date.add(currDate, 1, 'day');\r\n\t\t}\r\n\r\n\t\tcontainer.appendChild(dayGridContainer);\r\n\r\n\t}\r\n\r\n\t_renderMonthGrid(container) {\r\n\t\tconst {date} = this.getState();\r\n\r\n\t\tconst wrapper = document.createElement('div');\r\n\t\twrapper.classList.add(\"dhx_cal_datepicker_months\");\r\n\r\n\t\tconst months = [];\r\n\t\tfor(let i = 0; i < 12; i++){\r\n\t\t\tmonths.push(new Date(date.getFullYear(), i, 1));\r\n\t\t}\r\n\r\n\t\tconst formatLabel = this.scheduler.date.date_to_str(\"%M\");\r\n\t\tmonths.forEach(month => {\r\n\t\t\tconst monthElement = document.createElement('div');\r\n\t\t\tmonthElement.classList.add('dhx_cal_datepicker_month');\r\n\t\t\tif(date.getMonth() === month.getMonth()){\r\n\t\t\t\tmonthElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t}\r\n\t\t\tmonthElement.setAttribute(\"data-month\", month.getMonth());\r\n\t\t\tmonthElement.innerHTML = formatLabel(month);\r\n\t\t\tthis._domEvents.attach(monthElement, \"click\", () => {\r\n\t\t\t\tconst newDate = new Date(month);\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tdate: newDate,\r\n\t\t\t\t\tmode: 'days'\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\twrapper.appendChild(monthElement);\r\n\t\t});\r\n\t\tcontainer.appendChild(wrapper);\r\n\r\n\t\tconst doneArea = document.createElement(\"div\");\r\n\t\tdoneArea.classList.add(\"dhx_cal_datepicker_done\");\r\n\t\tconst doneBtn = document.createElement(\"button\");\r\n\t\tdoneBtn.innerText = \"Done\";\r\n\t\tdoneBtn.classList.add(\"dhx_cal_datepicker_done_btn\");\r\n\t\tthis._domEvents.attach(doneBtn, \"click\", () => {\r\n\t\t\tthis.setState({\r\n\t\t\t\tmode: 'days'\r\n\t\t\t});\r\n\t\t});\r\n\t\tdoneArea.appendChild(doneBtn);\r\n\t\tcontainer.appendChild(doneArea);\r\n\t}\r\n\r\n\t_renderYearGrid(container) {\r\n\t\tconst {date} = this.getState();\r\n\t\tconst startYear = Math.floor(date.getFullYear() / 10) * 10;\r\n\t\t\r\n\t\tconst wrapper = document.createElement('div');\r\n\t\twrapper.classList.add(\"dhx_cal_datepicker_years\");\r\n\t\tfor (let i = startYear - 1; i <= startYear + 10; i++) {\r\n\t\t\tconst yearElement = document.createElement('div');\r\n\t\t\tyearElement.innerText = i;\r\n\t\t\tyearElement.classList.add('dhx_cal_datepicker_year');\r\n\t\t\tyearElement.setAttribute(\"data-year\", i);\r\n\t\t\tif(date.getFullYear() === i){\r\n\t\t\t\tyearElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t}\r\n\t\t\tthis._domEvents.attach(yearElement, \"click\", () => {\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tdate: new Date(i, date.getMonth(), 1),\r\n\t\t\t\t\tmode: 'months'\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\twrapper.appendChild(yearElement);\r\n\t\t\t\r\n\t\t}\r\n\t\tcontainer.appendChild(wrapper);\r\n\r\n\t\tconst doneArea = document.createElement(\"div\");\r\n\t\tdoneArea.classList.add(\"dhx_cal_datepicker_done\");\r\n\t\tconst doneBtn = document.createElement(\"button\");\r\n\t\tdoneBtn.innerText = \"Done\";\r\n\t\tdoneBtn.classList.add(\"dhx_cal_datepicker_done_btn\");\r\n\t\tthis._domEvents.attach(doneBtn, \"click\", () => {\r\n\t\t\tthis.setState({\r\n\t\t\t\tmode: 'months'\r\n\t\t\t});\r\n\t\t});\r\n\t\tdoneArea.appendChild(doneBtn);\r\n\t\tcontainer.appendChild(doneArea);\r\n\t}\r\n\r\n\tdestructor(){\r\n\t\tthis.onStateChangeHandlers = [];\r\n\t\tif(this.element){\r\n\t\t\tthis.element.innerHTML = '';\r\n\t\t\tthis.element.remove();\r\n\t\t}\r\n\r\n\t\tthis._domEvents.detachAll();\r\n\t\tthis.callEvent(\"onDestroy\", []);\r\n\t\tthis.detachAllEvents();\r\n\r\n\t\tthis.scheduler = null;\r\n\t}\r\n}","// import \"./css/dhtmlxscheduler_terrace\";\r\n// import \"./css/dhtmlxscheduler_material\";\r\n// import \"./css/dhtmlxscheduler_material_nofont\";\r\n// import \"./css/dhtmlxscheduler_flat\";\r\n// import \"./css/dhtmlxscheduler_contrast_black\";\r\n// import \"./css/dhtmlxscheduler_contrast_white\";\r\n\r\nimport addPlugins from \"./plugins\";\r\nimport stateProvider from \"./core/state\";\r\nimport assert from \"./core/common/assert\";\r\nimport common_errors from \"./core/common_errors\";\r\nimport connector from \"./core/connector\";\r\nimport schedulerCore from \"./core/scheduler\";\r\nimport common from \"./core/common\";\r\nimport wai_aria from \"./core/wai_aria\";\r\nimport utils from \"./core/utils/utils\";\r\nimport dom_helpers from \"./core/utils/dom_helpers\";\r\nimport env from \"./utils/env\";\r\nimport destructor from \"./core/destructor\";\r\nimport ajax from \"./core/utils/ajax\";\r\nimport base from \"./core/base\";\r\nimport config from \"./core/config\";\r\nimport event from \"./core/event\";\r\nimport event_highlight from \"./core/event_highlight\";\r\nimport load from \"./core/load\";\r\nimport lightbox from \"./core/lightbox\";\r\nimport touch from \"./core/touch\";\r\nimport dhtmlx_suite_hooks from \"./core/dhtmlx/dhtmlx_suite_hooks\";\r\nimport skins from \"./core/skins\";\r\nimport jquery from \"./core/jquery\";\r\nimport delay_render from \"./core/delay_render\";\r\nimport dataProcessorExtend from \"./core/dataprocessor/dataprocessor\";\r\nimport message from \"./core/message\";\r\nimport i18nFactory from \"./locale\";\r\n\r\nimport voidFirst from \"./publish_helpers/void_script_first\";\r\nimport voidSecond from \"./publish_helpers/void_script_second\";\r\nimport voidThird from \"./publish_helpers/void_script_third\";\r\n\r\n//import datepickerHeader from \"./core/clickable_header\";\r\n\r\nimport { DatePicker } from \"./core/datepicker\";\r\n\r\nexport default function(extensionManager) {\r\n\r\n\tconst scheduler = { version: VERSION };\r\n\t\r\n\tscheduler.$stateProvider = stateProvider();\r\n\r\n\tscheduler.getState = scheduler.$stateProvider.getState;\r\n\tcommon_errors(scheduler);\r\n\tcommon(scheduler);\r\n\tschedulerCore(scheduler);\r\n\twai_aria(scheduler);\r\n\t//utils(scheduler);\r\n\r\n\tscheduler.utils = utils;\r\n\tscheduler.$domHelpers = dom_helpers;\r\n\tscheduler.utils.dom = dom_helpers;\r\n\tscheduler.uid = utils.uid;\r\n\tscheduler.mixin = utils.mixin;\r\n\tscheduler.defined = utils.defined;\r\n\tscheduler.assert = assert(scheduler);\r\n\tscheduler.copy = utils.copy;\r\n\r\n\tscheduler._createDatePicker = function(container, config){\r\n\t\treturn new DatePicker(scheduler, container, config);\r\n\t};\r\n\r\n\t//datepickerHeader(scheduler);\r\n\r\n\r\n\t//old api compatibility\r\n\tscheduler._getFocusableNodes = dom_helpers.getFocusableNodes;\r\n\tscheduler._getClassName = dom_helpers.getClassName;\r\n\tscheduler._locate_css = dom_helpers.locateCss;\r\n\r\n\tconst messageApi = message(scheduler);\r\n\tscheduler.utils.mixin(scheduler, messageApi);\r\n\r\n\tscheduler.env = scheduler.$env = env;\r\n\tscheduler.Promise = window.Promise;\r\n\tdestructor(scheduler);\r\n\tajax(scheduler);\r\n\tvoidFirst(scheduler);\r\n\tbase(scheduler);\r\n\tconfig(scheduler);\r\n\tevent(scheduler);\r\n\tevent_highlight(scheduler);\r\n\tload(scheduler);\r\n\tlightbox(scheduler);\r\n\ttouch(scheduler);\r\n\tdhtmlx_suite_hooks(scheduler);\r\n\tvoidSecond(scheduler);\r\n\tskins(scheduler);\r\n\tjquery(scheduler);\r\n\tdelay_render(scheduler);\r\n\tdataProcessorExtend(scheduler);\r\n\tvoidThird(scheduler);\r\n\tconnector(scheduler);\r\n\tconst i18n = i18nFactory();\r\n\tscheduler.i18n = {\r\n\t\taddLocale: i18n.addLocale,\r\n\t\tsetLocale: function(locale){\r\n\t\t\tif(typeof locale === \"string\"){\r\n\t\t\t\tvar localeObject = i18n.getLocale(locale);\r\n\t\t\t\tif(!localeObject){\r\n\t\t\t\t\tlocaleObject = i18n.getLocale(\"en\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler.locale = localeObject;\r\n\t\t\t}else if(locale){\r\n\t\t\t\tif(!scheduler.locale){\r\n\t\t\t\t\tscheduler.locale = locale;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfor(var i in locale){\r\n\t\t\t\t\t\tif(locale[i] && typeof locale[i] === \"object\"){\r\n\t\t\t\t\t\t\tif(!scheduler.locale[i]){\r\n\t\t\t\t\t\t\t\tscheduler.locale[i] = {};\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tscheduler.mixin(scheduler.locale[i], locale[i], true);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tscheduler.locale[i] = locale[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar labels = scheduler.locale.labels;\r\n\t\t\tlabels.dhx_save_btn \t= labels.icon_save;\r\n\t\t\tlabels.dhx_cancel_btn \t= labels.icon_cancel;\r\n\t\t\tlabels.dhx_delete_btn \t= labels.icon_delete;\r\n\r\n\t\t\tif(scheduler.$container){\r\n\t\t\t\tscheduler.get_elements();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t},\r\n\t\tgetLocale: i18n.getLocale\r\n\t};\r\n\tscheduler.i18n.setLocale(\"en\");\r\n\taddPlugins(scheduler);\r\n\tscheduler.ext = {};\r\n\r\n\tconst activePlugins = {};\r\n\tscheduler.plugins = function(config){\r\n\t\tconst extensionList = getExtensionList(config, {\r\n\t\t\t\ttreetimeline: [\"timeline\"],\r\n\t\t\t\tdaytimeline: [\"timeline\"],\r\n\t\t\t\touterdrag: [\"legacy\"]\r\n\t\t\t}, {\r\n\t\t\t\tlegacy: 1,\r\n\t\t\t\tlimit: 1,\r\n\t\t\t\ttimeline: 2,\r\n\t\t\t\tdaytimeline: 3,\r\n\t\t\t\ttreetimeline: 3,\r\n\t\t\t\touterdrag:6\r\n\t\t\t});\r\n\r\n\t\textensionList.forEach(function(name){\r\n\t\t\tif(!activePlugins[name]){\r\n\t\t\t\tconst plugin = extensionManager.getExtension(name);\r\n\t\t\t\tif(plugin){\r\n\t\t\t\t\tplugin(scheduler);\r\n\t\t\t\t\tactivePlugins[name] = true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthrow new Error(\"unknown plugin \" + name);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n\r\n\tfunction getExtensionList(config, dependencies, priorities){\r\n\t\tconst result = [];\r\n\r\n\t\tfor(const i in config){\r\n\t\t\tif(config[i]){\r\n\t\t\t\tconst extension = i.toLowerCase();\r\n\t\t\t\tif(dependencies[extension]){\r\n\t\t\t\t\tdependencies[extension].forEach(function(dep){\r\n\t\t\t\t\t\tconst dependencyName = dep.toLowerCase();\r\n\t\t\t\t\t\tif(!config[dependencyName]){\r\n\t\t\t\t\t\t\tresult.push(dependencyName);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\tresult.push(extension);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tresult.sort(function(a, b){\r\n\t\t\tconst orderA = priorities[a] || 0;\r\n\t\t\tconst orderB = priorities[b] || 0;\r\n\t\t\tif(orderA > orderB){\r\n\t\t\t\treturn 1;\r\n\t\t\t}else if(orderA < orderB){\r\n\t\t\t\treturn -1;\r\n\t\t\t}else{\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\treturn scheduler;\r\n\r\n}","export default class ExtensionsManager{\r\n\tconstructor(config){\r\n\t\tthis._extensions = {};\r\n\t\tfor(const i in config){\r\n\t\t\tthis._extensions[i] = config[i];\r\n\t\t}\r\n\t}\r\n\r\n\taddExtension(name, ext) {\r\n\t\tthis._extensions[name] = ext;\r\n\t}\r\n\r\n\tgetExtension(name) {\r\n\t\treturn this._extensions[name];\r\n\t}\r\n}","\r\n\r\nimport dhtmlxHook from \"./dhtmlx_hook\";\r\nimport \"./css/theme.less\";\r\ndhtmlxHook();\r\n\r\nimport global from \"./global\";\r\n\r\nimport factoryMethod from \"./scheduler_factory_method\";\r\nimport ExtensionsManager from \"./ext/extension_manager\";\r\n\r\nclass SchedulerFactory {\r\n\r\n\tconstructor (extensions) {\r\n\t\tthis._seed = 0;\r\n\t\tthis._schedulerPlugins = [];\r\n\t\tthis._bundledExtensions = extensions;\r\n\t\tthis._extensionsManager = new ExtensionsManager(extensions);\r\n\t}\r\n\r\n\tplugin(code) {\r\n\t\tthis._schedulerPlugins.push(code);\r\n\r\n\t\tif(global.scheduler){\r\n\t\t\tcode(global.scheduler);\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetSchedulerInstance(initConfig) {\r\n\t\tvar scheduler = factoryMethod(this._extensionsManager);\r\n\r\n\t\tfor (var i = 0; i < this._schedulerPlugins.length; i++) {\r\n\t\t\tthis._schedulerPlugins[i](scheduler);\r\n\t\t}\r\n\t\tscheduler._internal_id = this._seed++;\r\n\t\r\n\t\tif (this.$syncFactory){\r\n\t\t\tthis.$syncFactory(scheduler);\r\n\t\t}\r\n\r\n\t\tif(initConfig){\r\n\t\t\tthis._initFromConfig(scheduler, initConfig);\r\n\t\t}\r\n\r\n\t\treturn scheduler;\r\n\t}\r\n\r\n\t_initFromConfig(scheduler, initConfig){\r\n\t\tif(initConfig.plugins){\r\n\t\t\tscheduler.plugins(initConfig.plugins);\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.config){\r\n\t\t\tscheduler.mixin(scheduler.config, initConfig.config, true);\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.templates){\r\n\t\t\tscheduler.attachEvent(\"onTemplatesReady\", function(){\r\n\t\t\t\tscheduler.mixin(scheduler.templates, initConfig.templates, true);\r\n\t\t\t}, {once: true});\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.events){\r\n\t\t\tfor(const event in initConfig.events){\r\n\t\t\t\tscheduler.attachEvent(event, initConfig.events[event]);\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.locale){\r\n\t\t\tscheduler.i18n.setLocale(initConfig.locale);\r\n\t\t}\r\n\t\r\n\t\tif(Array.isArray(initConfig.calendars)){\r\n\t\t\tinitConfig.calendars.forEach(function(calendar){\r\n\t\t\t\tscheduler.addCalendar(calendar);\r\n\t\t\t});\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.container){\r\n\t\t\tscheduler.init(initConfig.container);\r\n\t\t} else {\r\n\t\t\tscheduler.init();\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.data){\r\n\t\t\tif(typeof initConfig.data === \"string\"){\r\n\t\t\t\tscheduler.load(initConfig.data);\r\n\t\t\t}else{\r\n\t\t\t\tscheduler.parse(initConfig.data);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\r\n}\r\n\r\nexport default SchedulerFactory;","export default function(scheduler){\r\n\r\nscheduler.config.active_link_view = \"day\";\r\nscheduler._active_link_click = function(e){\r\n\tvar start = e.target;\r\n\tvar to = start.getAttribute(\"data-link-date\");\r\n\tvar s_d = scheduler.date.str_to_date(scheduler.config.api_date, false, true);\r\n\tif (to) {\r\n\t\tscheduler.setCurrentView(s_d(to), scheduler.config.active_link_view);\r\n\t\tif (e && e.preventDefault)\r\n\t\t\te.preventDefault();\r\n\t\treturn false;\r\n\t}\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar do_wrapper = function(key, fullname){\r\n\t\tfullname = fullname || (key+\"_scale_date\");\r\n\r\n\t\tif(!scheduler.templates['_active_links_old_'+ fullname]){\r\n\t\t\tscheduler.templates['_active_links_old_'+ fullname] = scheduler.templates[fullname];\r\n\t\t}\r\n\t\tvar week_x = scheduler.templates['_active_links_old_'+ fullname];\r\n\t\tvar d_s = scheduler.date.date_to_str(scheduler.config.api_date);\r\n\t\tscheduler.templates[fullname] = function(date) {\r\n\t\t\treturn \"\" + week_x(date) + \"\";\r\n\t\t};\r\n\t};\r\n\r\n\tdo_wrapper(\"week\");\r\n\tdo_wrapper(\"\", \"month_day\");\r\n\tif (this.matrix){\r\n\t\tfor (var key in this.matrix)\r\n\t\t\tdo_wrapper(key);\r\n\t}\r\n\r\n\tthis._detachDomEvent(this._obj, \"click\", scheduler._active_link_click);\r\n\tscheduler.event(this._obj, \"click\", scheduler._active_link_click);\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.date.add_agenda_legacy = function(date){\r\n\treturn scheduler.date.add(date, 1, \"year\");\r\n};\r\n\r\nscheduler.templates.agenda_legacy_time = function(start,end,ev){\r\n\tif (ev._timed)\r\n\t\treturn this.day_date(ev.start_date, ev.end_date, ev)+\" \"+this.event_date(start);\r\n\telse\r\n\t\treturn scheduler.templates.day_date(start)+\" – \"+scheduler.templates.day_date(end);\r\n};\r\nscheduler.templates.agenda_legacy_text = function(start,end,event){\r\n\treturn event.text;\r\n};\r\nscheduler.templates.agenda_legacy_date = function(){ return \"\"; };\r\n\r\nscheduler.date.agenda_legacy_start=function(){ return scheduler.date.date_part(scheduler._currentDate()); };\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function() {\r\n\tvar old_dblclick_dhx_cal_data = scheduler.dblclick_dhx_cal_data;\r\n\tscheduler.dblclick_dhx_cal_data = function() {\r\n\t\tif (this._mode == \"agenda_legacy\") {\r\n\t\t\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\t\t\tthis.addEventNow();\r\n\t\t} else {\r\n\t\t\tif (old_dblclick_dhx_cal_data)\r\n\t\t\t\treturn old_dblclick_dhx_cal_data.apply(this, arguments);\r\n\t\t}\r\n\t};\r\n\r\n\r\n\tvar old = scheduler.render_data;\r\n\tscheduler.render_data=function(evs){\r\n\t\tif (this._mode == \"agenda_legacy\")\r\n\t\t\tfill_agenda_tab();\r\n\t\telse\r\n\t\t\treturn old.apply(this,arguments);\r\n\t};\r\n\r\n\tvar old_render_view_data = scheduler.render_view_data;\r\n\tscheduler.render_view_data = function(){\r\n\t\tif(this._mode == \"agenda_legacy\") {\r\n\t\t\tscheduler._agendaScrollTop = scheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop;\r\n\t\t\tscheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop = 0;\r\n\t\t}\r\n\t\treturn old_render_view_data.apply(this,arguments);\r\n\t};\r\n\r\n\r\n\r\n\tfunction set_full_view(mode){\r\n\t\tif (mode){\r\n\t\t\tvar l = scheduler.locale.labels;\r\n\r\n\t\t\tvar rowAttr = scheduler._waiAria.agendaHeadAttrString();\r\n\t\t\tvar dateHeader = scheduler._waiAria.agendaHeadDateString(l.date);\r\n\t\t\tvar descriptionHeader = scheduler._waiAria.agendaHeadDescriptionString(l.description);\r\n\r\n\t\t\tscheduler._els[\"dhx_cal_header\"][0].innerHTML=\"
\" +\r\n\t\t\t\t\"
\"+l.date+\"
\" +\r\n\t\t\t\t\"\"+l.description+\"\" +\r\n\t\t\t\t\"
\";\r\n\t\t\tscheduler._table_view=true;\r\n\t\t\tscheduler.set_sizes();\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fill_agenda_tab(){\r\n\t\t//select events for which data need to be printed\r\n\r\n\t\tvar events = scheduler.get_visible_events();\r\n\t\tevents.sort(function(a,b){ return a.start_date>b.start_date?1:-1;});\r\n\r\n\t\tvar tableAttr = scheduler._waiAria.agendaDataAttrString();\r\n\t\tvar agendaEventAttrString;\r\n\t\t//generate html for the view\r\n\t\tvar html=\"
\";\r\n\t\tfor (var i=0; i
\"+\r\n\t\t\t\t\t(scheduler.config.rtl ? scheduler.templates.agenda_time(ev.end_date,ev.start_date, ev):scheduler.templates.agenda_time(ev.start_date, ev.end_date,ev))+\r\n\t\t\t\t\t\"
\";\r\n\t\t\thtml+=`
\r\n\t\t\t\r\n\t\t\t
`;\r\n\t\t\thtml+=\"\"+scheduler.templates.agenda_text(ev.start_date, ev.end_date, ev)+\"
\";\r\n\t\t}\r\n\t\thtml+=\"
\";\r\n\r\n\t\t//render html\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop = scheduler._agendaScrollTop||0;\r\n\r\n\t\t// setting up dhx_v_border size\r\n\t\tvar agenda_area = scheduler._els[\"dhx_cal_data\"][0].childNodes[0];\r\n\t\tvar v_border = agenda_area.childNodes[agenda_area.childNodes.length-1];\r\n\t\tv_border.style.height = (agenda_area.offsetHeight < scheduler._els[\"dhx_cal_data\"][0].offsetHeight) ? \"100%\" : (agenda_area.offsetHeight+\"px\");\r\n\r\n\t\tvar t=scheduler._els[\"dhx_cal_data\"][0].firstChild.childNodes;\r\n\r\n\t\tvar dateElement = scheduler._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML=scheduler.templates.agenda_date(scheduler._min_date, scheduler._max_date, scheduler._mode);\r\n\t\t}\r\n\r\n\t\tscheduler._rendered=[];\r\n\t\tfor (var i=0; i < t.length-1; i++)\r\n\t\t\tscheduler._rendered[i]=t[i];\r\n\r\n\t}\r\n\r\n\tscheduler.agenda_legacy_view=function(mode){\r\n\t\tscheduler._min_date = scheduler.config.agenda_start||scheduler.date.agenda_legacy_start(scheduler._date);\r\n\t\tscheduler._max_date = scheduler.config.agenda_end||scheduler.date.add_agenda_legacy(scheduler._min_date, 1);\r\n\r\n\t\tset_full_view(mode);\r\n\t\tif (mode){\r\n\t\t\tscheduler._cols = null;\r\n\t\t\tscheduler._colsS = null;\r\n\t\t\tscheduler._table_view = true;\r\n\t\t\t//agenda tab activated\r\n\t\t\tfill_agenda_tab();\r\n\t\t} else {\r\n\t\t\tscheduler._table_view = false;\r\n\t\t\t//agenda tab de-activated\r\n\t\t}\r\n\t};\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.date.add_agenda = function(date, inc){\r\n\t\treturn scheduler.date.add(date, 1*inc, \"month\");\r\n\t};\r\n\t\r\n\tscheduler.templates.agenda_time = function(start,end,ev){\r\n\t\tif (ev._timed){\r\n\t\t\treturn `${this.event_date(start)} - ${this.event_date(end)}`;\r\n\t\t}else{\r\n\t\t\treturn scheduler.locale.labels.full_day;\r\n\t\t}\r\n\t};\r\n\tscheduler.templates.agenda_text = function(start,end,ev){\r\n\t\treturn ev.text;\r\n\t};\r\n\r\n\tconst dayDateToStr = scheduler.date.date_to_str(\"%F %j\");\r\n\tconst dayDowToStr = scheduler.date.date_to_str(\"%l\");\r\n\r\n\tscheduler.templates.agenda_day = function(date){ \r\n\t\treturn `
${dayDateToStr(date)}
\r\n\t\t
${dayDowToStr(date)}
`;\r\n\t};\r\n\tscheduler.templates.agenda_date = function(start, end){ \r\n\t\treturn scheduler.templates.month_date(scheduler.getState().date); \r\n\t};\r\n\t\r\n\tscheduler.date.agenda_start=function(date){\r\n\t\treturn scheduler.date.month_start(new Date(date));\r\n\t};\r\n\r\n\tlet scrollTop = 0;\r\n\t\r\n\tscheduler.attachEvent(\"onTemplatesReady\",function() {\r\n\t\tvar old_dblclick_dhx_cal_data = scheduler.dblclick_dhx_cal_data;\r\n\t\tscheduler.dblclick_dhx_cal_data = function() {\r\n\t\t\tif (this._mode == \"agenda\") {\r\n\t\t\t\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\t\t\t\tthis.addEventNow();\r\n\t\t\t} else {\r\n\t\t\t\tif (old_dblclick_dhx_cal_data)\r\n\t\t\t\t\treturn old_dblclick_dhx_cal_data.apply(this, arguments);\r\n\t\t\t}\r\n\t\t};\r\n\t\r\n\t\r\n\t\tvar old = scheduler.render_data;\r\n\t\tscheduler.render_data=function(evs){\r\n\t\t\tif (this._mode == \"agenda\")\r\n\t\t\t\tfill_agenda_tab();\r\n\t\t\telse\r\n\t\t\t\treturn old.apply(this,arguments);\r\n\t\t};\r\n\t\r\n\t\tvar old_render_view_data = scheduler.render_view_data;\r\n\t\tscheduler.render_view_data = function(){\r\n\t\t\tif(this._mode == \"agenda\") {\r\n\t\t\t\tscrollTop = scheduler._els[\"dhx_cal_data\"][0].scrollTop;\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = 0;\r\n\t\t\t}\r\n\t\t\treturn old_render_view_data.apply(this,arguments);\r\n\t\t};\r\n\r\n\t\tfunction fill_agenda_tab(){\r\n\t\t\tconst events = scheduler.get_visible_events();\r\n\t\t\tevents.sort(function(a,b){ return a.start_date>b.start_date?1:-1;});\r\n\r\n\t\t\tconst eventsInDays = {};\r\n\t\t\tlet currDate = scheduler.getState().min_date;\r\n\t\t\tconst maxDate = scheduler.getState().max_date;\r\n\t\t\twhile(currDate.valueOf() < maxDate.valueOf()){\r\n\t\t\t\teventsInDays[currDate.valueOf()] = [];\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\r\n\t\t\tlet anyEvents = false;\r\n\r\n\t\t\tevents.forEach((ev) => {\r\n\t\t\t\tlet eventStart = scheduler.date.day_start(new Date(ev.start_date)); \r\n\t\t\t\twhile (eventStart.valueOf() < ev.end_date.valueOf()) {\r\n\t\t\t\t\tif (eventsInDays[eventStart.valueOf()]) {\r\n\t\t\t\t\t\teventsInDays[eventStart.valueOf()].push(ev);\r\n\t\t\t\t\t\tanyEvents = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\teventStart = scheduler.date.day_start(scheduler.date.add(eventStart, 1, \"day\"));\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(!anyEvents){\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = renderEmptyView();\r\n\t\t\t}else{\r\n\t\t\t\tlet html = \"\";\r\n\t\t\t\tfor(let day in eventsInDays){\r\n\t\t\t\t\thtml += renderDay(new Date(day*1), eventsInDays[day]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = scrollTop;\r\n\t\t\t\r\n\t\t\tlet t = scheduler._els[\"dhx_cal_data\"][0].querySelectorAll(\".dhx_cal_agenda_event_line\");\r\n\t\t\tscheduler._rendered = [];\r\n\t\t\tfor (var i = 0; i < t.length - 1; i++) {\r\n\t\t\t\tscheduler._rendered[i] = t[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\r\n\r\n\t\tfunction renderEmptyView(){\r\n\t\t\treturn `
${scheduler.locale.labels.agenda_tab}
`;\r\n\t\t}\r\n\r\n\t\tfunction renderDay(day, events) {\r\n\t\t\tif(!events.length){\r\n\t\t\t\treturn \"\";\r\n\t\t\t}\r\n\t\t\tlet html = `\r\n
\r\n\t
${scheduler.templates.agenda_day(day)}
\r\n\t
\r\n`;\r\n\r\n\t\t\tevents.forEach((calendarEvent) => {\r\n\t\t\t\thtml += renderOneEvent(day, calendarEvent);\r\n\t\t\t});\r\n\r\n\t\t\thtml += `
`;\r\n\t\t\treturn html;\r\n\t\t}\r\n\r\n\t\tfunction renderOneEvent(day, calendarEvent){\r\n\t\t\tconst dates = scheduler.templates.agenda_time(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\t\t\tconst selectedId = scheduler.getState().select_id;\r\n\t\t\tconst cls = scheduler.templates.event_class(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\t\t\tconst description = scheduler.templates.agenda_text(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\r\n\t\t\tlet style = \"\";\r\n\t\t\tif(calendarEvent.color || calendarEvent.textColor){\r\n\t\t\t\tconst bg = (calendarEvent.color ? (\"--dhx-scheduler-event-background:\" + calendarEvent.color + \";\") : \"\");\r\n\t\t\t\tconst color = (calendarEvent.textColor ? (\"--dhx-scheduler-event-color:\" + calendarEvent.textColor + \";\") : \"\");\r\n\t\t\t\tstyle = ` style=\"${bg}${color}\" `;\r\n\t\t\t}\r\n\r\n\t\t\treturn `
\r\n\t
\r\n\t
${dates}
\r\n\t
${description}
\r\n
`;\r\n\t\t}\r\n\t\r\n\t\tscheduler.agenda_view=function(mode){\r\n\t\t\tif (mode){\r\n\t\t\t\tscheduler._min_date = scheduler.config.agenda_start || scheduler.date.agenda_start(scheduler._date);\r\n\t\t\t\tscheduler._max_date = scheduler.config.agenda_end || scheduler.date.add_agenda(scheduler._min_date, 1);\r\n\t\t\t\tscheduler._cols = null;\r\n\t\t\t\tscheduler._colsS = null;\r\n\t\t\t\tscheduler._table_view = true;\r\n\r\n\t\t\t\tconst dateHeader = scheduler._getNavDateElement();\r\n\t\t\t\tdateHeader.innerHTML = scheduler.templates.agenda_date(scheduler._date);\r\n\t\t\t\t//agenda tab activated\r\n\t\t\t\tfill_agenda_tab();\r\n\t\t\t} else {\r\n\t\t\t\tscheduler._table_view = false;\r\n\t\t\t\t//agenda tab de-activated\r\n\t\t\t}\r\n\t\t};\r\n\t});\r\n\r\n\t// scheduler.attachEvent(\"onEventSelected\", function(id){\r\n\t// \tconst oldSelected = scheduler.$container.querySelectorAll(\".dhx_cal_agenda_event_line_selected\");\r\n\t// \toldSelected.forEach((el) => {\r\n\t// \t\tel.classList.remove(\"dhx_cal_agenda_event_line_selected\");\r\n\t// \t});\r\n\r\n\t// \tconst selected = scheduler.$container.querySelector(`[${scheduler.config.event_attribute}=\"${id}\"]`);\r\n\t// \tif(selected){\r\n\t// \t\tselected.classList.add(\"dhx_cal_agenda_event_line_selected\");\r\n\t// \t}\r\n\t// });\r\n\t\r\n\t\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.config.all_timed = \"short\";\r\n\tscheduler.config.all_timed_month = false;\r\n\r\n\tvar is_event_short = function (ev) {\r\n\t\tif(!((ev.end_date - ev.start_date)/(1000*60*60) >= 24)){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t// short event shouldn't disappear to multiday area during dnd-resize\r\n\t\tif(scheduler._drag_mode == \"resize\" && scheduler._drag_id == ev.id){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn \tfalse;\r\n\t};\r\n\r\n\t// copy of usual events and recurring instances;\r\n\t// regular copy causes problems with recurrings which have series event as a prototype\r\n\tscheduler._safe_copy = function(event){\r\n\t\tvar proto = null,\r\n\t\t\tcopy = scheduler._copy_event(event);\r\n\t\tif(event.event_pid){\r\n\t\t\tproto = scheduler.getEvent(event.event_pid);\r\n\t\t}\r\n\r\n\t\tif (proto && proto.isPrototypeOf(event)) {\r\n\t\t\tdelete copy.event_length;\r\n\t\t\tdelete copy.event_pid;\r\n\t\t\tdelete copy.rec_pattern;\r\n\t\t\tdelete copy.rec_type;\r\n\t\t}\r\n\r\n\t\treturn copy;\r\n\t};\r\n\r\n\tvar old_prerender_events_line = scheduler._pre_render_events_line;\r\n\tvar old_prerender_events_table = scheduler._pre_render_events_table;\r\n\r\n\tvar prerender_events = function (evs, hold) {\r\n\t\tif (!this._table_view) {\r\n\t\t\treturn old_prerender_events_line.call(this, evs, hold);\r\n\t\t}\r\n\r\n\t\treturn old_prerender_events_table.call(this, evs, hold);\r\n\t};\r\n\r\n\tscheduler._pre_render_events_line = scheduler._pre_render_events_table = function(evs, hold){\r\n\t\tif (!this.config.all_timed ||\r\n\t\t\t(this._table_view && this._mode != \"month\") ||\r\n\t\t\t(this._mode == \"month\" && !this.config.all_timed_month))\r\n\t\t\treturn prerender_events.call(this, evs, hold);\r\n\r\n\t\tfor (var i=0; i < evs.length; i++) {\r\n\t\t\tvar ev=evs[i];\r\n\r\n\t\t\tif (ev._timed)\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tif (this.config.all_timed == \"short\") {\r\n\t\t\t\tif (!is_event_short(ev)) {\r\n\t\t\t\t\tif (this._mode != \"month\") {\r\n\t\t\t\t\t\tevs.splice(i--, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar ce = this._safe_copy(ev); // current event (event for one specific day) is copy of original with modified dates\r\n\t\t\tif(!ev._virtual){\r\n\t\t\t\tce._first_chunk = true;\r\n\t\t\t}else{\r\n\t\t\t\tce._first_chunk = false;\r\n\t\t\t}\r\n\t\t\tce._drag_resize = false;\r\n\t\t\tce._virtual = true;\r\n\t\t\tce.start_date = new Date(ce.start_date); // as lame copy doesn't copy date objects\r\n\r\n\t\t\tif (!isOvernightEvent(ev)) {\r\n\t\t\t\tce.end_date = new Date(ev.end_date);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tce.end_date = getNextDay(ce.start_date);\r\n\t\t\t\tif (this.config.last_hour != 24) { // if specific last_hour was set (e.g. 20)\r\n\t\t\t\t\tce.end_date = setDateTime(ce.start_date, this.config.last_hour);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar event_changed = false;\r\n\t\t\tif (ce.start_date < this._max_date && ce.end_date > this._min_date && ce.start_date < ce.end_date) {\r\n\t\t\t\tevs[i] = ce; // adding another event in collection\r\n\t\t\t\tevent_changed = true;\r\n\t\t\t}\r\n\t\t//\tif (ce.start_date > ce.end_date) {\r\n\t\t//\t\tevs.splice(i--,1);\r\n\t\t//\t}\r\n\r\n\t\t\tvar re = this._safe_copy(ev); // remaining event, copy of original with modified start_date (making range more narrow)\r\n\t\t\tre._virtual = true;\r\n\t\t\tre.end_date = new Date(re.end_date);\r\n\t\t\tif (re.start_date < this._min_date)\r\n\t\t\t\tre.start_date = setDateTime(this._min_date, this.config.first_hour);// as we are starting only with whole hours\r\n\t\t\telse\r\n\t\t\t\tre.start_date = setDateTime(getNextDay(ev.start_date), this.config.first_hour);\r\n\r\n\t\t\tif (re.start_date < this._max_date && re.start_date < re.end_date) {\r\n\t\t\t\tif (event_changed){\r\n\t\t\t\t\tevs.splice(i+1,0,re);//insert part\r\n\t\t\t\t}else {\r\n\t\t\t\t\tevs[i--] = re;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tre._last_chunk = false;\r\n\t\t\t}else{\r\n\t\t\t\tce._last_chunk = true;\r\n\t\t\t\tce._drag_resize = true;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// in case of all_timed pre_render is not applied to the original event\r\n\t\t// so we need to force redraw in case of dnd\r\n\t\tvar redraw = (this._drag_mode == 'move')?false:hold;\r\n\t\treturn prerender_events.call(this, evs, redraw);\r\n\r\n\r\n\t\tfunction isOvernightEvent(ev){\r\n\t\t\tvar next_day = getNextDay(ev.start_date);\r\n\t\t\treturn (+ev.end_date > +next_day);\r\n\t\t}\r\n\t\tfunction getNextDay(date){\r\n\t\t\tvar next_day = scheduler.date.add(date, 1, \"day\");\r\n\t\t\tnext_day = scheduler.date.date_part(next_day);\r\n\t\t\treturn next_day;\r\n\t\t}\r\n\t\tfunction setDateTime(date, hours){\r\n\t\t\tvar val = scheduler.date.date_part(new Date(date));\r\n\t\t\tval.setHours(hours);\r\n\t\t\treturn val;\r\n\t\t}\r\n\t};\r\n\tvar old_get_visible_events = scheduler.get_visible_events;\r\n\tscheduler.get_visible_events = function(only_timed){\r\n\t\tif (!(this.config.all_timed && this.config.multi_day))\r\n\t\t\treturn old_get_visible_events.call(this, only_timed);\r\n\t\treturn old_get_visible_events.call(this, false); // only timed = false\r\n\t};\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function (old_mode, old_date, mode, date) {\r\n\t\tscheduler._allow_dnd = (mode == \"day\" || mode == \"week\" || scheduler.getView(mode));\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler._is_main_area_event = function(ev){\r\n\t\treturn !!(ev._timed || this.config.all_timed === true || (this.config.all_timed == \"short\" && is_event_short(ev)) );\r\n\t};\r\n\r\n\tvar oldUpdate = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id){\r\n\t\t// full redraw(update_render=true) messes events order while dnd.\r\n\t\t// individual redraw(update_render=false) of multiday event, which happens on select/unselect, expands event to full width of the cell and can be fixes only with full redraw.\r\n\t\t// so for now full redraw is always enabled for not-dnd updates\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tvar fullRedrawNeeded;\r\n\t\tvar initial;\r\n\t\tif(ev) {\r\n\t\t\tfullRedrawNeeded = (scheduler.config.all_timed && !(scheduler.isOneDayEvent(scheduler._events[id]) || scheduler.getState().drag_id));\r\n\t\t\tif (fullRedrawNeeded) {\r\n\t\t\t\tinitial = scheduler.config.update_render;\r\n\t\t\t\tscheduler.config.update_render = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\toldUpdate.apply(scheduler, arguments);\r\n\r\n\t\tif(ev) {\r\n\t\t\tif (fullRedrawNeeded) {\r\n\t\t\t\tscheduler.config.update_render = initial;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\r\nvar temp_section;\r\nvar before;\r\n\r\nscheduler.config.collision_limit = 1;\r\n\r\nfunction _setTempSection(event_id) { // for custom views (matrix, timeline, units)\r\n\tvar checked_mode = scheduler._get_section_view();\r\n\tif(checked_mode && event_id){\r\n\t\ttemp_section = scheduler.getEvent(event_id)[scheduler._get_section_property()];\r\n\t}\r\n}\r\n\r\nscheduler.attachEvent(\"onBeforeDrag\",function(id){\r\n\t_setTempSection(id);\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onBeforeLightbox\",function(id){\r\n\tvar ev = scheduler.getEvent(id);\r\n\tbefore = [ev.start_date, ev.end_date];\r\n\t_setTempSection(id);\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventChanged\",function(id){\r\n\tif (!id || !scheduler.getEvent(id)) return true;\r\n\tvar ev = scheduler.getEvent(id);\r\n\tif (!scheduler.checkCollision(ev)){\r\n\t\tif (!before) return false;\r\n\t\tev.start_date = before[0];\r\n\t\tev.end_date = before[1];\r\n\t\tev._timed=this.isOneDayEvent(ev);\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onBeforeEventChanged\",function(ev,e,is_new){\r\n\treturn scheduler.checkCollision(ev);\r\n});\r\nscheduler.attachEvent(\"onEventAdded\",function(id,ev) {\r\n\tvar result = scheduler.checkCollision(ev);\r\n\tif (!result)\r\n\t\tscheduler.deleteEvent(id);\r\n});\r\nscheduler.attachEvent(\"onEventSave\",function(id, edited_ev, is_new){\r\n\tedited_ev = scheduler._lame_clone(edited_ev);\r\n\tedited_ev.id = id;\r\n\r\n\t//lightbox may not have 'time' section\r\n\tif(!(edited_ev.start_date && edited_ev.end_date)){\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tedited_ev.start_date = new Date(ev.start_date);\r\n\t\tedited_ev.end_date = new Date(ev.end_date);\r\n\t}\r\n\r\n\tif((edited_ev.rrule && !edited_ev.recurring_event_id) || edited_ev.rec_type){\r\n\t\tscheduler._roll_back_dates(edited_ev);\r\n\t}\r\n\treturn scheduler.checkCollision(edited_ev); // in case user creates event on one date but then edited it another\r\n});\r\n\r\nscheduler._check_sections_collision = function(first, second){\r\n\tvar map_to = scheduler._get_section_property();\r\n\tif (first[map_to] == second[map_to] && first.id != second.id)\r\n\t\treturn true;\r\n\treturn false;\r\n};\r\n\r\nscheduler.checkCollision = function(ev) {\r\n\tvar evs = [];\r\n\tvar collision_limit = scheduler.config.collision_limit;\r\n\r\n\tif (ev.rrule || ev.rec_type) {\r\n\t\tvar evs_dates = scheduler.getRecDates(ev);\r\n\t\tfor(var k=0; k= collision_limit) {\r\n\r\n\t\t\tsingle = false;\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tif ( evs.length >= collision_limit )\r\n\t\t\tsingle = false;\r\n\t}\r\n\tif (!single) {\r\n\t\tvar res = !scheduler.callEvent(\"onEventCollision\",[ev,evs]);\r\n\t\tif (!res) {\r\n\t\t\tev[map_to] = temp_section||ev[map_to]; // from _setTempSection for custom views\r\n\t\t}\r\n\t\treturn res;\r\n\t}\r\n\treturn single;\r\n\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.config.container_autoresize = true;\r\n\tscheduler.config.month_day_min_height = 90;\r\n\tscheduler.config.min_grid_size = 25;\r\n\tscheduler.config.min_map_size = 400;\r\n\r\n\tvar old_pre_render_event = scheduler._pre_render_events;\r\n\r\n\t//need for temporary disabling without modifying public config\r\n\tvar active = true;\r\n\tvar total_height = 0;\r\n\tvar multiday_height = 0;\r\n\r\n\tscheduler._pre_render_events = function(evs, hold) {\r\n\t\tif (!(scheduler.config.container_autoresize && active)) {\r\n\t\t\treturn old_pre_render_event.apply(this, arguments);\r\n\t\t}\r\n\r\n\t\tvar hb = this.xy.bar_height;\r\n\t\tvar h_old = this._colsS.heights;\r\n\t\tvar h = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0];\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tif (!this._table_view)\r\n\t\t\tevs = this._pre_render_events_line(evs, hold); //ignore long events for now\r\n\t\telse\r\n\t\t\tevs = this._pre_render_events_table(evs, hold);\r\n\r\n\t\tif (this._table_view) {\r\n\t\t\tif (hold){\r\n\t\t\t\tthis._colsS.heights = h_old;\r\n\t\t\t} else {\r\n\t\t\t\tvar evl = data.firstChild;\r\n\t\t\t\tconst rows = evl.querySelectorAll(\".dhx_cal_month_row\");\r\n\t\t\t\tif (rows && rows.length) {\r\n\t\t\t\t\tfor (var i = 0; i < rows.length; i++) {\r\n\t\t\t\t\t\th[i]++;\r\n\r\n\t\t\t\t\t\tif ((h[i]) * hb > this._colsS.height - this.xy.month_head_height) { // 22 - height of cell's header\r\n\t\t\t\t\t\t\t//we have overflow, update heights\r\n\t\t\t\t\t\t\tvar cells = rows[i].querySelectorAll(\".dhx_cal_month_cell\");\r\n\r\n\t\t\t\t\t\t\tvar cHeight = this._colsS.height - this.xy.month_head_height;\r\n\t\t\t\t\t\t\tif(this.config.max_month_events*1 !== this.config.max_month_events || h[i] <= this.config.max_month_events){\r\n\t\t\t\t\t\t\t\tcHeight = h[i] * hb;\r\n\t\t\t\t\t\t\t}else if( (this.config.max_month_events + 1) * hb > this._colsS.height - this.xy.month_head_height){\r\n\t\t\t\t\t\t\t\tcHeight = (this.config.max_month_events + 1) * hb;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\trows[i].style.height = (cHeight + this.xy.month_head_height) + \"px\";\r\n\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\tfor (var j = 0; j < cells.length; j++) {\r\n\t\t\t\t\t\t\t\tcells[j].childNodes[1].style.height = cHeight + \"px\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\th[i] = (h[i - 1] || 0) + cells[0].offsetHeight;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\th[i] = (h[i - 1] || 0) + rows[i].querySelectorAll(\".dhx_cal_month_cell\")[0].offsetHeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t\th.unshift(0);\r\n\t\t\t\t\tif (evl.parentNode.offsetHeight < evl.parentNode.scrollHeight && !evl._h_fix) {\r\n\t\t\t\t\t\t//we have v-scroll, decrease last day cell\r\n\r\n\t\t\t\t\t\t// NO CHECK SHOULD BE MADE ON VERTICAL SCROLL\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!evs.length && this._els[\"dhx_multi_day\"][0].style.visibility == \"visible\")\r\n\t\t\t\t\t\th[0] = -1;\r\n\t\t\t\t\tif (evs.length || h[0] == -1) {\r\n\t\t\t\t\t\t//shift days to have space for multiday events\r\n\t\t\t\t\t\t//var childs = evl.parentNode.childNodes;\r\n\t\t\t\t\t\tvar dh = ((h[0] + 1) * hb + 1); // +1 so multiday events would have 2px from top and 2px from bottom by default\r\n\t\t\t\t\t\tif(multiday_height != dh + 1) {\r\n\t\t\t\t\t\t\tthis._obj.style.height = (total_height - multiday_height + dh - 1) + \"px\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tdh += \"px\";\r\n\t\t\t\t\t\tconst navHeight = this._els[\"dhx_cal_navline\"][0].offsetHeight;\r\n\t\t\t\t\t\tconst headerHeight = this._els[\"dhx_cal_header\"][0].offsetHeight;\r\n\t\t\t\t\t\tdata.style.height = (this._obj.offsetHeight - navHeight - headerHeight - (this.xy.margin_top || 0)) + 'px';\r\n\t\t\t\t\t\tvar last = this._els[\"dhx_multi_day\"][0];\r\n\t\t\t\t\t\tlast.style.height = dh;\r\n\t\t\t\t\t\tlast.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\t\tlast.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\t\t\t\t\t\tlast = this._els[\"dhx_multi_day\"][1];\r\n\t\t\t\t\t\tlast.style.height = dh;\r\n\t\t\t\t\t\tlast.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\t\tlast.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\r\n\t\t\t\t\t\tlast.className = h[0] ? \"dhx_multi_day_icon\" : \"dhx_multi_day_icon_small\";\r\n\t\t\t\t\t\tthis._dy_shift = (h[0] + 1) * hb;\r\n\t\t\t\t\t\th[0] = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn evs;\r\n\t};\r\n\r\n\tvar checked_divs = [\"dhx_cal_navline\", \"dhx_cal_header\", \"dhx_multi_day\", \"dhx_cal_data\"];\r\n\tvar updateContainterHeight = function(is_repaint) {\r\n\t\ttotal_height = 0;\r\n\t\tfor (var i = 0; i < checked_divs.length; i++) {\r\n\r\n\t\t\tvar className = checked_divs[i];\r\n\t\t\tvar checked_div = (scheduler._els[className]) ? scheduler._els[className][0] : null;\r\n\t\t\tvar height = 0;\r\n\t\t\tswitch (className) {\r\n\t\t\t\tcase \"dhx_cal_navline\":\r\n\t\t\t\tcase \"dhx_cal_header\":\r\n\t\t\t\t\theight = checked_div.offsetHeight;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"dhx_multi_day\":\r\n\t\t\t\t\theight = (checked_div) ? checked_div.offsetHeight - 1 : 0;\r\n\t\t\t\t\tmultiday_height = height;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"dhx_cal_data\":\r\n\t\t\t\t\tvar mode = scheduler.getState().mode;\r\n\r\n\t\t\t\t\tif(checked_div.childNodes[1] && mode != \"month\") {\r\n\t\t\t\t\t\tlet maxHeight = 0;\r\n\t\t\t\t\t\tfor(let i = 0; i < checked_div.childNodes.length; i++){\r\n\t\t\t\t\t\t\tif(checked_div.childNodes[i].offsetHeight > maxHeight){\r\n\t\t\t\t\t\t\t\tmaxHeight = checked_div.childNodes[i].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\theight = maxHeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\theight = Math.max(checked_div.offsetHeight - 1, checked_div.scrollHeight);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (mode == \"month\") {\r\n\t\t\t\t\t\tif (scheduler.config.month_day_min_height && !is_repaint) {\r\n\t\t\t\t\t\t\tvar rows_length = checked_div.querySelectorAll(\".dhx_cal_month_row\").length;\r\n\t\t\t\t\t\t\theight = rows_length * scheduler.config.month_day_min_height;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (is_repaint) {\r\n\t\t\t\t\t\t\tchecked_div.style.height = height + \"px\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (mode == \"year\"){\r\n\t\t\t\t\t\theight = 190 * scheduler.config.year_y;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(mode == \"agenda\"){\r\n\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\tif(checked_div.childNodes && checked_div.childNodes.length){\r\n\t\t\t\t\t\t\tfor(var j = 0; j < checked_div.childNodes.length; j++){\r\n\t\t\t\t\t\t\t\theight += checked_div.childNodes[j].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(height + 2 < scheduler.config.min_grid_size){\r\n\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (mode == \"week_agenda\"){\r\n\t\t\t\t\t\tvar min_height = scheduler.xy.week_agenda_scale_height + scheduler.config.min_grid_size,\r\n\t\t\t\t\t\t\tcur_height;\r\n\r\n\t\t\t\t\t\tvar column;\r\n\t\t\t\t\t\tfor(var k = 0; k < checked_div.childNodes.length; k++){\r\n\t\t\t\t\t\t\tcolumn = checked_div.childNodes[k];\r\n\t\t\t\t\t\t\tfor(var j = 0; j < column.childNodes.length; j++) {\r\n\t\t\t\t\t\t\t\tvar innerHeight = 0,\r\n\t\t\t\t\t\t\t\t\teventsContainer = column.childNodes[j].childNodes[1];\r\n\r\n\t\t\t\t\t\t\t\tfor(var g =0; g < eventsContainer.childNodes.length; g++){\r\n\t\t\t\t\t\t\t\t\tinnerHeight += eventsContainer.childNodes[g].offsetHeight;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tcur_height = innerHeight + scheduler.xy.week_agenda_scale_height;\r\n\t\t\t\t\t\t\t\tcur_height = (k == 1 && (j == 2 || j == 3)) ? cur_height * 2 : cur_height; // for last two cells;\r\n\r\n\t\t\t\t\t\t\t\tif (cur_height > min_height) {\r\n\t\t\t\t\t\t\t\t\tmin_height = cur_height;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\theight = min_height * 3;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(mode == \"map\") {\r\n\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\tvar evs = checked_div.querySelectorAll(\".dhx_map_line\");\r\n\r\n\t\t\t\t\t\tfor (var j = 0; j < evs.length; j++) {\r\n\t\t\t\t\t\t\theight += evs[j].offsetHeight;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (height + 2 < scheduler.config.min_map_size) {\r\n\t\t\t\t\t\t\theight = scheduler.config.min_map_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(scheduler._gridView) {\r\n\t\t\t\t\t\theight = 0;\r\n\r\n\t\t\t\t\t\tif (checked_div.childNodes[1].childNodes[0].childNodes && checked_div.childNodes[1].childNodes[0].childNodes.length) {\r\n\t\t\t\t\t\t\tvar evs = checked_div.childNodes[1].childNodes[0].childNodes[0].childNodes;\r\n\r\n\t\t\t\t\t\t\tfor (var j = 0; j < evs.length; j++) {\r\n\t\t\t\t\t\t\t\theight += evs[j].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\theight += 2;\r\n\r\n\t\t\t\t\t\t\tif(height < scheduler.config.min_grid_size){\r\n\t\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (scheduler.matrix && scheduler.matrix[mode]) {\r\n\t\t\t\t\t\tif (is_repaint) {\r\n\t\t\t\t\t\t\theight += 0;\r\n\t\t\t\t\t\t\tchecked_div.style.height = height + \"px\";\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\t\tvar cfg = scheduler.matrix[mode];\r\n\t\t\t\t\t\t\tvar rows = cfg.y_unit;\r\n\t\t\t\t\t\t\tfor(var r=0; r < rows.length; r++){\r\n\t\t\t\t\t\t\t\theight += cfg.getSectionHeight(rows[r].key);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// Check and add extra height to avoid events hiding by the horizontal scrollbar\r\n\t\t\t\t\t\t\tif(scheduler.$container.clientWidth != scheduler.$container.scrollWidth){\r\n\t\t\t\t\t\t\t\theight += getScrollSize();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\theight -= 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (mode == \"day\" || mode == \"week\" || (scheduler._props && scheduler._props[mode])) {\r\n\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\theight += 1;\r\n\t\t\ttotal_height += height;\r\n\t\t}\r\n\t\tscheduler._obj.style.height = (total_height) + \"px\";\r\n\r\n\t\tif (!is_repaint)\r\n\t\t\tscheduler.updateView();\r\n\t};\r\n\r\n\tfunction callUpdate(){\r\n\t\tactive = false;\r\n\t\tscheduler.callEvent(\"onAfterSchedulerResize\", []);\r\n\t\tactive = true;\r\n\t}\r\n\r\n\tvar conditionalUpdateContainerHeight = function() {\r\n\t\tif(!(scheduler.config.container_autoresize && active))\r\n\t\t\treturn true;\r\n\r\n\t\tvar mode = scheduler.getState().mode;\r\n\r\n\t\tif(!mode) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tvar asyncRepaint = window.requestAnimationFrame || window.setTimeout;\r\n\t\tvar scrollTop = document.documentElement.scrollTop;\r\n\r\n\t\tasyncRepaint(function() {\r\n\t\t\tif(scheduler.$destroyed || !scheduler.$initialized){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tupdateContainterHeight();\r\n\t\t});\r\n\r\n\t\tif ( (scheduler.matrix && scheduler.matrix[mode]) || mode == \"month\") {\r\n\t\t\tasyncRepaint(function() {\r\n\t\t\t\tif(scheduler.$destroyed || !scheduler.$initialized){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tupdateContainterHeight(true);\r\n\t\t\t\tdocument.documentElement.scrollTop = scrollTop;\r\n\t\t\t\tcallUpdate();\r\n\t\t\t}, 1);\r\n\t\t}else{\r\n\t\t\tcallUpdate();\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function(){\r\n\t\tvar autosizeEnabled = scheduler.config.container_autoresize;\r\n\t\tif(!scheduler.xy.$original_scroll_width){\r\n\t\t\tscheduler.xy.$original_scroll_width = scheduler.xy.scroll_width;\r\n\t\t}\r\n\r\n\t\tscheduler.xy.scroll_width = autosizeEnabled ? 0 : scheduler.xy.$original_scroll_width;\r\n\r\n\t\tif(scheduler.matrix){\r\n\t\t\tfor(var i in scheduler.matrix){\r\n\t\t\t\tvar timeline = scheduler.matrix[i];\r\n\t\t\t\tif(!timeline.$original_section_autoheight){\r\n\t\t\t\t\ttimeline.$original_section_autoheight = timeline.section_autoheight;\r\n\t\t\t\t}\r\n\t\t\t\tif(autosizeEnabled){\r\n\t\t\t\t\ttimeline.section_autoheight = false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\ttimeline.section_autoheight = timeline.$original_section_autoheight;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onXLE\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventChanged\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventCreated\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventAdded\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventDeleted\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onAfterSchedulerResize\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onClearAll\", conditionalUpdateContainerHeight);\r\n\r\n\t//disable container autoresize when expanded\r\n\tscheduler.attachEvent(\"onBeforeExpand\", function(){\r\n\t\tactive = false;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeCollapse\", function(){\r\n\t\tactive = true;\r\n\t\treturn true;\r\n\t});\r\n\t// helper function\r\n\tfunction getScrollSize() {\r\n\t\tvar div = document.createElement(\"div\");\r\n\t\tdiv.style.cssText = \"visibility:hidden;position:absolute;left:-1000px;width:100px;padding:0px;margin:0px;height:110px;min-height:100px;overflow-y:scroll;\";\r\n\r\n\t\tdocument.body.appendChild(div);\r\n\t\tvar size = div.offsetWidth - div.clientWidth;\r\n\t\tdocument.body.removeChild(div);\r\n\t\treturn size;\r\n\t}\r\n\r\n\r\n}","export default function(scheduler){\r\n\tfunction setCookie(name,cookie_param,value) {\r\n\t\tvar str = name + \"=\" + value + (cookie_param?(\"; \"+cookie_param):\"\");\r\n\t\tdocument.cookie = str;\r\n\t}\r\n\tfunction getCookie(name) {\r\n\t\tvar search = name + \"=\";\r\n\t\tif (document.cookie.length > 0) {\r\n\t\t\tvar offset = document.cookie.indexOf(search);\r\n\t\t\tif (offset != -1) {\r\n\t\t\t\toffset += search.length;\r\n\t\t\t\tvar end = document.cookie.indexOf(\";\", offset);\r\n\t\t\t\tif (end == -1)\r\n\t\t\t\t\tend = document.cookie.length;\r\n\t\t\t\treturn document.cookie.substring(offset, end);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}\r\n\r\n\tfunction getCookieName(scheduler) {\r\n\t\treturn (scheduler._obj.id || \"scheduler\") + \"_settings\";\r\n\t}\r\n\r\n\tvar first = true;\r\n\tscheduler.attachEvent(\"onBeforeViewChange\",function(oldMode,oldDate,mode,date){\r\n\t\t// if Url plugin is enabled - explicit url values should have more priority than cookies\r\n\t\tif (first && scheduler._get_url_nav){\r\n\t\t\tvar urlNavigationPlugin = scheduler._get_url_nav();\r\n\t\t\tif(urlNavigationPlugin.date || urlNavigationPlugin.mode || urlNavigationPlugin.event){\r\n\t\t\t\tfirst = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar cookie = getCookieName(scheduler);\r\n\r\n\t\tif (first){\r\n\t\t\tfirst = false;\r\n\t\t\tvar schedulerCookie = getCookie(cookie);\r\n\t\t\tif (schedulerCookie){\r\n\r\n\t\t\t\tif(!scheduler._min_date){\r\n\t\t\t\t\t//otherwise scheduler will have incorrect date until timeout\r\n\t\t\t\t\t//it can cause js error with 'onMouseMove' handler of key_nav.js\r\n\t\t\t\t\tscheduler._min_date = date;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tschedulerCookie = unescape(schedulerCookie).split(\"@\");\r\n\t\t\t\tschedulerCookie[0] = this._helpers.parseDate(schedulerCookie[0]);\r\n\t\t\t\tvar view = this.isViewExists(schedulerCookie[1]) ? schedulerCookie[1] : mode,\r\n\t\t\t\t\tdate = !isNaN(+schedulerCookie[0]) ? schedulerCookie[0] : date;\r\n\r\n\t\t\t\twindow.setTimeout(function(){\r\n\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tscheduler.setCurrentView(date,view);\r\n\t\t\t\t},1);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", function (newMode , newDate){\r\n\t\tvar cookie = getCookieName(scheduler);\r\n\t\tvar text = escape(this._helpers.formatDate(newDate)+\"@\"+(newMode));\r\n\t\tsetCookie(cookie,\"expires=Sun, 31 Jan 9999 22:00:00 GMT\",text);\r\n\t});\r\n\r\n\t// As we are blocking first render above there could be a problem in case of dynamic loading and rendering of visible data in general ('from'/'to' won't be defined)\r\n\tvar old_load = scheduler._load;\r\n\tscheduler._load = function() {\r\n\t\tvar args = arguments;\r\n\r\n\t\tif (!scheduler._date) {\r\n\t\t\tvar that = this;\r\n\t\t\twindow.setTimeout(function() {\r\n\t\t\t\told_load.apply(that, args);\r\n\t\t\t},1);\r\n\t\t} else {\r\n\t\t\told_load.apply(this, args);\r\n\t\t}\r\n\t};\r\n}","export default {\r\n\talert: (extension, assert) => {\r\n\t\tassert(false, `The ${extension} extension is not included in this version of dhtmlxScheduler.
\r\n\t\tYou may need a Professional version of the component.
\r\n\t\tContact us at https://dhtmlx.com/docs/contact.shtml if you have any questions.`);\r\n\t}\r\n};","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Day Timeline\", scheduler.assert);\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Drag Between\", scheduler.assert);\r\n}","export default function(scheduler){\r\n/* global dhtmlXCombo */\r\nscheduler.form_blocks['combo']={\r\n\trender:function(sns) {\r\n\t\tif (!sns.cached_options)\r\n\t\t\tsns.cached_options = {};\r\n\t\tvar res = '';\r\n\t\tres += \"
\";\r\n\t\treturn res;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\t(function(){\r\n\t\t\tresetCombo();\r\n\t\t\tvar id = scheduler.attachEvent(\"onAfterLightbox\",function(){\r\n\t\t\t\t// otherwise destructor will never be called after form reset(e.g. in readonly event mode)\r\n\t\t\t\tresetCombo();\r\n\t\t\t\tscheduler.detachEvent(id);\r\n\t\t\t});\r\n\t\t\tfunction resetCombo(){\r\n\t\t\t\tif(node._combo && node._combo.DOMParent) {\r\n\t\t\t\t\tvar combo = node._combo;\r\n\t\t\t\t\tif(combo.unload){\r\n\t\t\t\t\t\tcombo.unload();\r\n\t\t\t\t\t}else if(combo.destructor){\r\n\t\t\t\t\t\tcombo.destructor();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// dhtmlxCombo 4.1.0 bug\r\n\t\t\t\t\tcombo.DOMParent = combo.DOMelem = null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})();\r\n\t\twindow.dhx_globalImgPath = config.image_path||'/';\r\n\t\tnode._combo = new dhtmlXCombo(node, config.name, node.offsetWidth-8);\r\n\t\tif (config.onchange)\r\n\t\t\tnode._combo.attachEvent(\"onChange\", config.onchange);\r\n\r\n\t\tif (config.options_height)\r\n\t\t\tnode._combo.setOptionHeight(config.options_height);\r\n\t\tvar combo = node._combo;\r\n\t\tcombo.enableFilteringMode(config.filtering, config.script_path||null, !!config.cache);\r\n\r\n\t\tif (!config.script_path) { // script-side filtration is used\r\n\t\t\tvar all_options = [];\r\n\t\t\tfor (var i = 0; i < config.options.length; i++) {\r\n\t\t\t\tvar option = config.options[i];\r\n\t\t\t\tvar single_option = [\r\n\t\t\t\t\toption.key,\r\n\t\t\t\t\toption.label,\r\n\t\t\t\t\toption.css\r\n\t\t\t\t];\r\n\t\t\t\tall_options.push(single_option);\r\n\t\t\t}\r\n\t\t\tcombo.addOption(all_options);\r\n\t\t\tif (ev[config.map_to]) {\r\n\t\t\t\tvar index = combo.getIndexByValue(ev[config.map_to]);\r\n\t\t\t\tcombo.selectOption(index);\r\n\t\t\t}\r\n\t\t} else { // server-side filtration is used\r\n\t\t\tvar selected_id = ev[config.map_to];\r\n\t\t\tif (selected_id) {\r\n\t\t\t\tif (config.cached_options[selected_id]) {\r\n\t\t\t\t\tcombo.addOption(selected_id, config.cached_options[selected_id]);\r\n\t\t\t\t\tcombo.disable(1);\r\n\t\t\t\t\tcombo.selectOption(0);\r\n\t\t\t\t\tcombo.disable(0);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tscheduler.ajax.get(config.script_path+\"?id=\"+selected_id+\"&uid=\"+scheduler.uid(), function(result){\r\n\t\t\t\t\t\tvar responseText = result.xmlDoc.responseText;\r\n\t\t\t\t\t\tvar label;\r\n\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\tvar res = JSON.parse(responseText);\r\n\t\t\t\t\t\t\tlabel = res.options[0].text;\r\n\t\t\t\t\t\t}catch(e){\r\n\t\t\t\t\t\t\tvar option = scheduler.ajax.xpath(\"//option\", result.xmlDoc)[0];\r\n\t\t\t\t\t\t\tlabel = option.childNodes[0].nodeValue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tconfig.cached_options[selected_id] = label;\r\n\t\t\t\t\t\tcombo.addOption(selected_id, label);\r\n\t\t\t\t\t\tcombo.disable(1);\r\n\t\t\t\t\t\tcombo.selectOption(0);\r\n\t\t\t\t\t\tcombo.disable(0);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tcombo.setComboValue(\"\");\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config) {\r\n\t\tvar selected_id = node._combo.getSelectedValue(); // value = key\r\n\t\tif (config.script_path) {\r\n\t\t\tconfig.cached_options[selected_id] = node._combo.getSelectedText();\r\n\t\t}\r\n\t\treturn selected_id;\r\n\t},\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\nscheduler.form_blocks['radio']={\r\n\trender:function(sns) {\r\n\t\tvar res = '';\r\n\t\tres += `
`;\r\n\t\tfor (var i=0; i\"+\" \"+sns.options[i].label+\"\";\r\n\t\t}\r\n\t\tres += \"
\";\r\n\r\n\t\treturn res;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\tvar radiobuttons = node.getElementsByTagName('input');\r\n\t\tfor (var i = 0; i < radiobuttons.length; i++) {\r\n\t\t\tradiobuttons[i].checked = false;\r\n\t\t\tvar checked_value = ev[config.map_to]||value;\r\n\t\t\tif (radiobuttons[i].value == checked_value) {\r\n\t\t\t\tradiobuttons[i].checked = true;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tvar radiobuttons = node.getElementsByTagName('input');\r\n\t\tfor(var i=0; i
';\r\n\t\telse\r\n\t\t\treturn '';\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\tnode=scheduler._lightbox.querySelector(`#${config.id}`);\r\n\t\tvar id = scheduler.uid();\r\n\t\tvar isChecked = (typeof config.checked_value != \"undefined\") ? value == config.checked_value : !!value;\r\n\t\tnode.className += \" dhx_cal_checkbox\";\r\n\t\tvar check_html = \"\";\r\n\t\tvar label_html = \"\";\r\n\t\tif (scheduler.config.wide_form){\r\n\t\t\tnode.innerHTML = label_html;\r\n\t\t\tnode.nextSibling.innerHTML=check_html;\r\n\t\t} else\r\n\t\t\tnode.innerHTML=check_html+label_html;\r\n\r\n\t\tif (config.handler) {\r\n\t\t\tvar checkbox = node.getElementsByTagName('input')[0];\r\n\t\t\tif(checkbox.$_eventAttached){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tcheckbox.$_eventAttached = true;\r\n\t\t\tscheduler.event(checkbox, \"click\", config.handler);\r\n\t\t\t//checkbox.onclick = config.handler;\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tnode=scheduler._lightbox.querySelector(`#${config.id}`);\r\n\t\tvar checkbox = node.getElementsByTagName('input')[0]; // moved to the header\r\n\t\tif (!checkbox)\r\n\t\t\tcheckbox = node.nextSibling.getElementsByTagName('input')[0];\r\n\t\treturn (checkbox.checked)?(config.checked_value||true):(config.unchecked_value||false);\r\n\t},\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.ext.fullscreen = {\r\n\ttoggleIcon: null\r\n};\r\n\r\nscheduler.expand = function() {\r\n\tif(!scheduler.callEvent(\"onBeforeExpand\", []))\r\n\t\treturn;\r\n\tvar t = scheduler._obj;\r\n\tdo {\r\n\t\tt._position = t.style.position || \"\";\r\n\t\tt.style.position = \"static\";\r\n\t} while ((t = t.parentNode) && t.style);\r\n\tt = scheduler._obj;\r\n\tt.style.position = \"absolute\";\r\n\tt._width = t.style.width;\r\n\tt._height = t.style.height;\r\n\tt.style.width = t.style.height = \"100%\";\r\n\tt.style.top = t.style.left = \"0px\";\r\n\r\n\tvar top = document.body;\r\n\ttop.scrollTop = 0;\r\n\r\n\ttop = top.parentNode;\r\n\tif (top)\r\n\t\ttop.scrollTop = 0;\r\n\tdocument.body._overflow = document.body.style.overflow || \"\";\r\n\tdocument.body.style.overflow = \"hidden\";\r\n\tscheduler._maximize();\r\n\tscheduler.callEvent(\"onExpand\", []);\r\n};\r\nscheduler.collapse = function() {\r\n\tif(!scheduler.callEvent(\"onBeforeCollapse\", []))\r\n\t\treturn;\r\n\tvar t = scheduler._obj;\r\n\tdo {\r\n\t\tt.style.position = t._position;\r\n\t} while ((t = t.parentNode) && t.style);\r\n\tt = scheduler._obj;\r\n\tt.style.width = t._width;\r\n\tt.style.height = t._height;\r\n\tdocument.body.style.overflow = document.body._overflow;\r\n\tscheduler._maximize();\r\n\tscheduler.callEvent(\"onCollapse\", []);\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar t = document.createElement(\"div\");\r\n\tt.className = \"dhx_expand_icon\";\r\n\tscheduler.ext.fullscreen.toggleIcon = t;\r\n\tt.innerHTML = `\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t`;\r\n\tscheduler._obj.appendChild(t);\r\n\tscheduler.event(t, \"click\", function() {\r\n\t\tif (!scheduler.expanded)\r\n\t\t\tscheduler.expand(); else\r\n\t\t\tscheduler.collapse();\r\n\t});\r\n});\r\nscheduler._maximize = function() {\r\n\tthis.expanded = !this.expanded;\r\n\tif(this.expanded){\r\n\t\tthis.ext.fullscreen.toggleIcon.classList.add(\"dhx_expand_icon--expanded\");\r\n\t\t\r\n\t}else{\r\n\t\tthis.ext.fullscreen.toggleIcon.classList.remove(\"dhx_expand_icon--expanded\");\r\n\t}\r\n\t\r\n\t//scheduler.ext.fullscreen.toggleIcon.style.backgroundPosition = \"0 \" + (this.expanded ? \"0\" : \"18\") + \"px\";\r\n\r\n\tvar directions = ['left', 'top'];\r\n\tfor (var i = 0; i < directions.length; i++) {\r\n\t\t//var margin = scheduler.xy['margin_' + directions[i]];\r\n\t\tvar prev_margin = scheduler['_prev_margin_' + directions[i]];\r\n\t\tif (scheduler.xy['margin_' + directions[i]]) {\r\n\t\t\tscheduler['_prev_margin_' + directions[i]] = scheduler.xy['margin_' + directions[i]];\r\n\t\t\tscheduler.xy['margin_' + directions[i]] = 0;\r\n\t\t} else {\r\n\t\t\tif (prev_margin) {\r\n\t\t\t\tscheduler.xy['margin_' + directions[i]] = scheduler['_prev_margin_' + directions[i]];\r\n\t\t\t\tdelete scheduler['_prev_margin_' + directions[i]];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.setCurrentView();\r\n};\r\n\r\n\r\n}\r\n","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Grid\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\tvar els = document.body.getElementsByTagName(\"DIV\");\r\n\tfor (var i=0; i < els.length; i++) {\r\n\t\tvar cs = els[i].className||\"\";\r\n\t\tcs = cs.split(\":\");\r\n\t\tif (cs.length == 2 && cs[0] == \"template\"){\r\n\t\t\tvar code = \"return \\\"\"+(els[i].innerHTML||\"\").replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g,\"\\\\\\\"\").replace(/[\\n\\r]+/g,\"\")+\"\\\";\";\r\n\t\t\tcode = unescape(code).replace(/\\{event\\.([a-z]+)\\}/g,function(all,mask){\r\n\t\t\t\treturn '\"+ev.'+mask+'+\"';\r\n\t\t\t});\r\n\t\t\tscheduler.templates[cs[1]]=Function(\"start\",\"end\",\"ev\",code);\r\n\t\t\tels[i].style.display='none';\r\n\t\t}\r\n\t}\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.shortcuts = {\r\n\tcreateCommand: function(){\r\n\t\treturn {\r\n\t\t\tmodifiers:{\r\n\t\t\t\t\"shift\": false,\r\n\t\t\t\t\"alt\": false,\r\n\t\t\t\t\"ctrl\": false,\r\n\t\t\t\t\"meta\": false\r\n\t\t\t},\r\n\t\t\tkeyCode: null\r\n\t\t};\r\n\t},\r\n\tparse: function(shortcut){\r\n\t\tvar commands = [];\r\n\r\n\t\tvar expr = this.getExpressions(this.trim(shortcut));\r\n\t\tfor(var i = 0; i < expr.length; i++){\r\n\t\t\tvar words = this.getWords(expr[i]);\r\n\r\n\t\t\tvar command = this.createCommand();\r\n\r\n\t\t\tfor(var j = 0; j < words.length; j++){\r\n\t\t\t\tif(this.commandKeys[words[j]]){\r\n\t\t\t\t\tcommand.modifiers[words[j]] = true;\r\n\t\t\t\t}else if(this.specialKeys[words[j]]){\r\n\t\t\t\t\tcommand.keyCode = this.specialKeys[words[j]];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcommand.keyCode = words[j].charCodeAt(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tcommands.push(command);\r\n\t\t}\r\n\t\treturn commands;\r\n\t},\r\n\r\n\tgetCommandFromEvent: function(domEvent){\r\n\t\tvar command = this.createCommand();\r\n\t\tcommand.modifiers.shift = !!domEvent.shiftKey;\r\n\t\tcommand.modifiers.alt = !!domEvent.altKey;\r\n\t\tcommand.modifiers.ctrl = !!domEvent.ctrlKey;\r\n\t\tcommand.modifiers.meta = !!domEvent.metaKey;\r\n\t\tcommand.keyCode = domEvent.which || domEvent.keyCode;\r\n\r\n\t\tif(command.keyCode >= 96 && command.keyCode <= 105){\r\n\t\t\t// numpad keys 96-105 -> 48-57\r\n\t\t\tcommand.keyCode -= 48;//convert numpad number code to regular number code\r\n\t\t}\r\n\r\n\t\tvar printableKey = String.fromCharCode(command.keyCode );\r\n\t\tif(printableKey){\r\n\t\t\tcommand.keyCode = printableKey.toLowerCase().charCodeAt(0);\r\n\t\t}\r\n\t\treturn command;\r\n\t},\r\n\r\n\tgetHashFromEvent: function(domEvent){\r\n\t\treturn this.getHash(this.getCommandFromEvent(domEvent));\r\n\t},\r\n\r\n\tgetHash: function(command){\r\n\t\tvar parts = [];\r\n\t\tfor(var i in command.modifiers){\r\n\t\t\tif(command.modifiers[i]){\r\n\t\t\t\tparts.push(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tparts.push(command.keyCode);\r\n\r\n\t\treturn parts.join(this.junctionChar);\r\n\t},\r\n\r\n\tgetExpressions: function(shortcut){\r\n\t\treturn shortcut.split(this.junctionChar);\r\n\t},\r\n\tgetWords: function(term){\r\n\t\treturn term.split(this.combinationChar);\r\n\t},\r\n\ttrim: function(shortcut){\r\n\t\treturn shortcut.replace(/\\s/g, \"\");\r\n\t},\r\n\tjunctionChar:\",\",\r\n\tcombinationChar:\"+\",\r\n\tcommandKeys:{\r\n\t\t\"shift\": 16,\r\n\t\t\"alt\": 18,\r\n\t\t\"ctrl\": 17,\r\n\t\t\"meta\": true\r\n\t},\r\n\tspecialKeys:{\r\n\t\t\"backspace\": 8,\r\n\t\t\"tab\": 9,\r\n\t\t\"enter\": 13,\r\n\t\t\"esc\": 27,\r\n\t\t\"space\": 32,\r\n\t\t\"up\": 38,\r\n\t\t\"down\": 40,\r\n\t\t\"left\": 37,\r\n\t\t\"right\": 39,\r\n\t\t\"home\": 36,\r\n\t\t\"end\": 35,\r\n\t\t\"pageup\": 33,\r\n\t\t\"pagedown\": 34,\r\n\t\t\"delete\": 46,\r\n\t\t\"insert\": 45,\r\n\t\t\"plus\":107,\r\n\t\t\"f1\": 112,\r\n\t\t\"f2\": 113,\r\n\t\t\"f3\": 114,\r\n\t\t\"f4\": 115,\r\n\t\t\"f5\": 116,\r\n\t\t\"f6\": 117,\r\n\t\t\"f7\": 118,\r\n\t\t\"f8\": 119,\r\n\t\t\"f9\": 120,\r\n\t\t\"f10\": 121,\r\n\t\t\"f11\": 122,\r\n\t\t\"f12\": 123\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.EventHandler = {\r\n\t_handlers: null,\r\n\tfindHandler: function(command){\r\n\t\tif(!this._handlers) this._handlers = {};\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\t\tvar hash = shortcuts.getHash(command);\r\n\r\n\t\treturn this._handlers[hash];\r\n\t},\r\n\r\n\tdoAction: function(command, e){\r\n\t\tvar handler = this.findHandler(command);\r\n\t\tif(handler){\r\n\t\t\thandler.call(this, e);\r\n\r\n\t\t\tif (e.preventDefault) e.preventDefault();\r\n\t\t\telse e.returnValue = false;\r\n\r\n\t\t}\r\n\t},\r\n\tbind: function(shortcut, handler){\r\n\t\tif(!this._handlers) this._handlers = {};\r\n\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\r\n\t\tvar commands = shortcuts.parse(shortcut);\r\n\t\tfor(var i = 0; i < commands.length; i++){\r\n\t\t\tthis._handlers[shortcuts.getHash(commands[i])] = handler;\r\n\t\t}\r\n\t},\r\n\tunbind: function(shortcut){\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\r\n\t\tvar commands = shortcuts.parse(shortcut);\r\n\t\tfor(var i = 0; i < commands.length; i++){\r\n\t\t\tif(this._handlers[shortcuts.getHash(commands[i])]){\r\n\t\t\t\tdelete this._handlers[shortcuts.getHash(commands[i])];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tbindAll: function(map){\r\n\t\tfor(var i in map){\r\n\t\t\tthis.bind(i, map[i]);\r\n\t\t}\r\n\t},\r\n\tinitKeys: function(){\r\n\t\tif(!this._handlers)\r\n\t\t\tthis._handlers = {};\r\n\t\tif(this.keys){\r\n\t\t\tthis.bindAll(this.keys);\r\n\t\t}\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n(function(){\r\n\tscheduler.$keyboardNavigation.getFocusableNodes = scheduler._getFocusableNodes;\r\n\r\n\tscheduler.$keyboardNavigation.trapFocus = function trapFocus(root, e){\r\n\t\tif(e.keyCode != 9) return false;\r\n\r\n\t\tvar focusable = scheduler.$keyboardNavigation.getFocusableNodes(root);\r\n\t\tvar currentFocus = document.activeElement;\r\n\t\tvar currentIndex = -1;\r\n\t\tfor(var i = 0; i < focusable.length; i++){\r\n\t\t\tif(focusable[i] == currentFocus){\r\n\t\t\t\tcurrentIndex = i;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar nextIndex, nextItem;\r\n\t\tif(e.shiftKey){\r\n\r\n\t\t\t// back tab\r\n\t\t\t// go to the last element if we focused on the first\r\n\t\t\tnextIndex = (currentIndex <= 0) ? (focusable.length - 1) : (currentIndex - 1);\r\n\r\n\t\t\tnextItem = focusable[nextIndex];\r\n\t\t\tif(nextItem){\r\n\t\t\t\tnextItem.focus();\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\t// forward tab\r\n\t\t\t// forward tab from last element should go back to the first element\r\n\t\t\tnextIndex = (currentIndex >= focusable.length - 1) ? 0 : (currentIndex + 1);\r\n\t\t\tnextItem = focusable[nextIndex];\r\n\t\t\tif(nextItem){\r\n\t\t\t\tnextItem.focus();\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t};\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.marker = {\r\n\tclear: function(){\r\n\t\tvar divs = scheduler.$container.querySelectorAll(\".dhx_focus_slot\");\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tdivs[i].parentNode.removeChild(divs[i]);\r\n\t\t}\r\n\t},\r\n\tcreateElement: function(){\r\n\t\tvar element = document.createElement(\"div\");\r\n\t\telement.setAttribute(\"tabindex\", -1);\r\n\t\telement.className = \"dhx_focus_slot\";\r\n\t\treturn element;\r\n\t},\r\n\r\n\trenderMultiple: function(start, end, method){\r\n\t\tvar divs = [];\r\n\t\tvar currentStart = new Date(start);\r\n\t\tvar currentEnd = new Date(Math.min(end.valueOf(), scheduler.date.add(scheduler.date.day_start(new Date(start)), 1, \"day\").valueOf()));\r\n\t\twhile(currentStart.valueOf() < end.valueOf()){\r\n\r\n\t\t\tdivs = divs.concat(method.call(this, currentStart, new Date(Math.min(currentEnd.valueOf(), end.valueOf()))));\r\n\t\t\tcurrentStart = scheduler.date.day_start(scheduler.date.add(currentStart, 1, \"day\"));\r\n\r\n\t\t\tcurrentEnd = scheduler.date.day_start(scheduler.date.add(currentStart, 1, \"day\"));\r\n\t\t\tcurrentEnd = new Date(Math.min(currentEnd.valueOf(), end.valueOf()));\r\n\t\t}\r\n\r\n\t\treturn divs;\r\n\t},\r\n\r\n\r\n\trender: function(start, end, section){\r\n\t\tthis.clear();\r\n\t\tvar divs = [];\r\n\r\n\t\tvar modes = scheduler.$keyboardNavigation.TimeSlot.prototype._modes;\r\n\t\tvar view = scheduler.$keyboardNavigation.TimeSlot.prototype._getMode();\r\n\t\tswitch (view){\r\n\t\t\tcase modes.units:\r\n\t\t\t\tdivs = this.renderVerticalMarker(start, end, section);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.timeline:\r\n\t\t\t\tdivs = this.renderTimelineMarker(start, end, section);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.year:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderYearMarker));\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.month:\r\n\t\t\t\tdivs = this.renderMonthMarker(start, end);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.weekAgenda:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderWeekAgendaMarker));\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.list:\r\n\t\t\t\tdivs = this.renderAgendaMarker(start, end);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.dayColumns:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderVerticalMarker));\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tthis.addWaiAriaLabel(divs, start, end, section);\r\n\t\tthis.addDataAttributes(divs, start, end, section);\r\n\r\n\t\tfor(var i = divs.length - 1; i >= 0; i--){\r\n\t\t\tif(divs[i].offsetWidth){\r\n\t\t\t\treturn divs[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t},\r\n\r\n\taddDataAttributes: function(divs, start, end, section){\r\n\t\tvar dateToStr = scheduler.date.date_to_str(scheduler.config.api_date);\r\n\r\n\t\tvar from = dateToStr(start),\r\n\t\t\tto = dateToStr(end);\r\n\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tdivs[i].setAttribute(\"data-start-date\", from);\r\n\t\t\tdivs[i].setAttribute(\"data-end-date\", to);\r\n\t\t\tif(section){\r\n\t\t\t\tdivs[i].setAttribute(\"data-section\", section);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\taddWaiAriaLabel: function(divs, start, end, section){\r\n\t\tvar label = \"\";\r\n\t\tvar state = scheduler.getState();\r\n\t\tvar mode = state.mode;\r\n\r\n\t\tvar dateTimeLabel = false;\r\n\r\n\t\tlabel += scheduler.templates.day_date(start);\r\n\r\n\t\tif((scheduler.date.day_start(new Date(start)).valueOf() != start.valueOf())){\r\n\t\t\tlabel += \" \" + scheduler.templates.hour_scale(start);\r\n\t\t\tdateTimeLabel = true;\r\n\t\t}\r\n\r\n\t\tif((scheduler.date.day_start(new Date(start)).valueOf() != scheduler.date.day_start(new Date(end)).valueOf())){\r\n\r\n\t\t\tlabel += \" - \" + scheduler.templates.day_date(end);\r\n\t\t\tif(dateTimeLabel || (scheduler.date.day_start(new Date(end)).valueOf() != end.valueOf())){\r\n\t\t\t\tlabel += \" \" + scheduler.templates.hour_scale(end);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(section){\r\n\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\t\t\t\tconst timeline = scheduler.matrix[mode];\r\n\t\t\t\tconst sectionObject = timeline.y_unit[timeline.order[section]];\r\n\t\t\t\tlabel += \", \" + scheduler.templates[mode + \"_scale_label\"](sectionObject.key, sectionObject.label, sectionObject);\r\n\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\tconst units = scheduler._props[mode];\r\n\t\t\t\tconst sectionObject = units.options[units.order[section]];\r\n\r\n\t\t\t\tlabel += \", \" + scheduler.templates[mode + \"_scale_text\"](sectionObject.key, sectionObject.label, sectionObject);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tscheduler._waiAria.setAttributes(divs[i], {\r\n\t\t\t\t\"aria-label\": label,\r\n\t\t\t\t\"aria-live\": \"polite\"\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\trenderWeekAgendaMarker: function(start_date, end_date){\r\n\t\tvar divs = scheduler.$container.querySelectorAll(\".dhx_wa_day_cont .dhx_wa_scale_bar\");\r\n\r\n\t\tvar currDate = scheduler.date.week_start(new Date(scheduler.getState().min_date));\r\n\r\n\t\tvar index = -1;\r\n\t\tvar markerDate = scheduler.date.day_start(new Date(start_date));\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tindex++;\r\n\t\t\tif(scheduler.date.day_start(new Date(currDate)).valueOf() == markerDate.valueOf()){\r\n\t\t\t\tbreak;\r\n\t\t\t}else{\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(index != -1) return this._wrapDiv(divs[index]);\r\n\t\treturn [];\r\n\t},\r\n\r\n\t_wrapDiv: function(cell){\r\n\t\tvar marker = this.createElement();\r\n\t\tmarker.style.top = cell.offsetTop + \"px\";\r\n\t\tmarker.style.left = cell.offsetLeft + \"px\";\r\n\t\tmarker.style.width = cell.offsetWidth + \"px\";\r\n\t\tmarker.style.height = cell.offsetHeight + \"px\";\r\n\t\tcell.appendChild(marker);\r\n\t\treturn [marker];\r\n\t},\r\n\trenderYearMarker: function(start_date, end_date){\r\n\t\tvar cell = scheduler._get_year_cell(start_date);\r\n\t\tcell.style.position = \"relative\";\r\n\t\tvar marker = this.createElement();\r\n\t\tmarker.style.top = \"0px\";\r\n\t\tmarker.style.left = \"0px\";\r\n\t\tmarker.style.width = \"100%\";\r\n\t\tmarker.style.height = \"100%\";\r\n\t\tcell.appendChild(marker);\r\n\t\treturn [marker];\r\n\t},\r\n\r\n\trenderAgendaMarker: function(start_date, end_date){\r\n\t\tvar block = this.createElement();\r\n\t\tblock.style.height = \"1px\";\r\n\t\tblock.style.width = \"100%\";\r\n\t\tblock.style.opacity = 1;\r\n\t\tblock.style.top = \"0px\";\r\n\t\tblock.style.left = \"0px\";\r\n\t\tscheduler.$container.querySelector(\".dhx_cal_data\").appendChild(block);\r\n\t\treturn [block];\r\n\t},\r\n\r\n\trenderTimelineMarker: function(start_date, end_date, section){\r\n\t\tvar view_opts = scheduler._lame_copy({}, scheduler.matrix[scheduler._mode]);\r\n\t\tvar areas = view_opts._scales;\r\n\t\t//timespans must always use actual position, not rounded\r\n\t\tview_opts.round_position = false;\r\n\t\tvar blocks = [];\r\n\r\n\t\tvar min_date = start_date ? new Date(start_date) : scheduler._min_date;\r\n\t\tvar max_date = end_date ? new Date(end_date) : scheduler._max_date;\r\n\r\n\t\tif(min_date.valueOf() < scheduler._min_date.valueOf())\r\n\t\t\tmin_date = new Date(scheduler._min_date);\r\n\t\tif(max_date.valueOf() > scheduler._max_date.valueOf())\r\n\t\t\tmax_date = new Date(scheduler._max_date);\r\n\r\n\t\tif(!view_opts._trace_x) return blocks;\r\n\r\n\t\tfor(var i = 0; i < view_opts._trace_x.length; i++){\r\n\t\t\tif(scheduler._is_column_visible(view_opts._trace_x[i]))\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\tif(i == view_opts._trace_x.length)\r\n\t\t\treturn blocks;\r\n\r\n\t\tvar area = areas[section];\r\n\r\n\t\tif (!(min_date < end_date && max_date > start_date))\r\n\t\t\treturn blocks;\r\n\r\n\t\tvar block = this.createElement();\r\n\r\n\t\tlet start_pos;\r\n\t\tlet end_pos;\r\n\r\n\t\tfunction set_date_part(source, target) {\r\n\t\t\t// reset to start of the month in order to prevent month change when target is on 31th day, and source month has only 30 days\r\n\t\t\ttarget.setDate(1);\r\n\r\n\t\t\ttarget.setFullYear(source.getFullYear());\r\n\t\t\ttarget.setMonth(source.getMonth());\r\n\t\t\ttarget.setDate(source.getDate());\r\n\t\t}\r\n\r\n\t\tif(!scheduler.getView().days){\r\n\t\t\tstart_pos = scheduler._timeline_getX({start_date: start_date}, false, view_opts);\r\n\t\t\tend_pos = scheduler._timeline_getX({start_date: end_date}, false, view_opts);\r\n\t\t}else{\r\n\t\t\t// daytimeline\r\n\t\t\tconst tempStart = new Date(start_date);\r\n\t\t\tset_date_part(scheduler._min_date, tempStart);\r\n\t\t\tconst tempEnd = new Date(end_date);\r\n\t\t\tset_date_part(scheduler._min_date, tempEnd);\r\n\t\t\tstart_pos = scheduler._timeline_getX({start_date: tempStart}, false, view_opts);\r\n\t\t\tend_pos = scheduler._timeline_getX({start_date: tempEnd}, false, view_opts);\r\n\t\t}\r\n\r\n\t\tvar height = ((view_opts._section_height[section]-1) || (view_opts.dy - 1));\r\n\r\n\t\tvar top = 0;\r\n\t\tif (scheduler._isRender('cell')){\r\n\t\t\ttop = area.offsetTop;\r\n\t\t\tstart_pos += view_opts.dx;\r\n\t\t\tend_pos += view_opts.dx;\r\n\t\t\tarea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t}else{\r\n\r\n\t\t}\r\n\t\tvar width = Math.max(1, end_pos - start_pos - 1);\r\n\t\tlet direction = \"left\";\r\n\t\tif(scheduler.config.rtl){\r\n\t\t\tdirection = \"right\";\r\n\t\t}\r\n\t\tblock.style.cssText = `height:${height}px; ${direction}:${start_pos}px; width:${width}px; top:${top}px;`;\r\n\r\n\t\tif(area){\r\n\t\t\tarea.appendChild(block);\r\n\t\t\tblocks.push(block);\r\n\t\t}\r\n\r\n\t\treturn blocks;\r\n\t},\r\n\r\n\trenderMonthCell: function(date){\r\n\t\tvar cells = scheduler.$container.querySelectorAll(\".dhx_month_head\");\r\n\r\n\t\tvar divs = [];\r\n\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\tdivs.push(cells[i].parentNode);\r\n\t\t}\r\n\r\n\t\tvar firstDate = scheduler.date.week_start(new Date(scheduler.getState().min_date));\r\n\r\n\t\tvar index = -1;\r\n\t\tvar weekNumber = 0;\r\n\t\tvar dayIndex = -1;\r\n\t\tvar currDate = firstDate;\r\n\t\tvar markerDate = scheduler.date.day_start(new Date(date));\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tindex++;\r\n\r\n\t\t\tif(dayIndex == 6){\r\n\t\t\t\tweekNumber++;\r\n\t\t\t\tdayIndex = 0;\r\n\t\t\t}else{\r\n\t\t\t\tdayIndex++;\r\n\t\t\t}\r\n\r\n\t\t\tif(scheduler.date.day_start(new Date(currDate)).valueOf() == markerDate.valueOf()){\r\n\t\t\t\tbreak;\r\n\t\t\t}else{\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(index == -1){\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tvar left = scheduler._colsS[dayIndex];\r\n\t\tvar top = scheduler._colsS.heights[weekNumber];\r\n\r\n\t\tvar div = this.createElement();\r\n\t\tdiv.style.top = top + \"px\";\r\n\t\tdiv.style.left = left + \"px\";\r\n\t\tdiv.style.width = scheduler._cols[dayIndex] + \"px\";\r\n\t\tdiv.style.height = ((scheduler._colsS.heights[weekNumber + 1] - top) || scheduler._colsS.height) + \"px\" ;\r\n\r\n\r\n\t\tvar container = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\r\n\t\tvar datatable = container.querySelector(\".dhx_cal_month_table\");\r\n\t\tif(datatable.nextSibling){\r\n\t\t\tcontainer.insertBefore(div, datatable.nextSibling);\r\n\t\t}else{\r\n\t\t\tcontainer.appendChild(div);\r\n\t\t}\r\n\t\treturn div;\r\n\t},\r\n\trenderMonthMarker: function(start_date, end_date){\r\n\t\tvar res = [];\r\n\t\tvar currentDate = start_date;\r\n\t\twhile(currentDate.valueOf() < end_date.valueOf()){\r\n\t\t\tres.push(this.renderMonthCell(currentDate));\r\n\t\t\tcurrentDate = scheduler.date.add(currentDate, 1, \"day\");\r\n\t\t}\r\n\t\treturn res;\r\n\t},\r\n\r\n\trenderVerticalMarker: function(start_date, end_date, section){\r\n\t\tvar index = scheduler.locate_holder_day(start_date);\r\n\r\n\t\tvar divs = [];\r\n\t\tvar area = null;\r\n\r\n\t\tvar c = scheduler.config;\r\n\t\tif(scheduler._ignores[index]) return divs;\r\n\r\n\t\tif (scheduler._props && scheduler._props[scheduler._mode] && section) {\r\n\t\t\tvar view = scheduler._props[scheduler._mode];\r\n\t\t\tindex = view.order[section];\r\n\r\n\t\t\tvar inner_index = view.order[section];\r\n\t\t\tif(!(view.days > 1)){\r\n\t\t\t\tindex = inner_index;\r\n\t\t\t\tif (view.size && (index > view.position+view.size)) {\r\n\t\t\t\t\tindex = 0;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t//var units_l = view.size || view.options.length;\r\n\r\n\t\t\t\tindex = scheduler.locate_holder_day(start_date) + inner_index;\r\n\t\t\t\t//index = index*units_l + inner_index;\r\n\t\t\t}\r\n\t\t}\r\n\t\tarea = scheduler.locate_holder(index);\r\n\t\tif(!area || area.querySelector(\".dhx_scale_hour\")){\r\n\t\t\t// hour scale instead of date column\r\n\t\t\treturn document.createElement(\"div\");\r\n\t\t}\r\n\r\n\t\tvar start = Math.max((start_date.getHours()*60 + start_date.getMinutes()), c.first_hour*60);\r\n\r\n\r\n\t\tvar end = Math.min((end_date.getHours()*60 + end_date.getMinutes()), c.last_hour*60);\r\n\t\tif(!end && (scheduler.date.day_start(new Date(end_date)).valueOf() > scheduler.date.day_start(new Date(start_date)).valueOf())){\r\n\t\t\tend = c.last_hour*60;\r\n\t\t}\r\n\r\n\t\tif (end <= start) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tvar block = this.createElement();\r\n\r\n\t\t// +1 for working with section which really takes up whole height (as % would be == 0)\r\n\t\tvar all_hours_height = scheduler.config.hour_size_px*c.last_hour + 1;\r\n\t\tvar hour_ms = 60*60*1000;\r\n\t\tblock.style.top = (Math.round((start*60*1000-scheduler.config.first_hour*hour_ms)*scheduler.config.hour_size_px/hour_ms) % all_hours_height) + \"px\";\r\n\t\tblock.style.lineHeight = block.style.height = Math.max((Math.round(((end-start)*60*1000)*scheduler.config.hour_size_px/hour_ms)) % all_hours_height, 1)+\"px\";\r\n\t\tblock.style.width = \"100%\";\r\n\t\tarea.appendChild(block);\r\n\t\tdivs.push(block);\r\n\t\treturn divs[0];\r\n\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode = function(){};\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.EventHandler,\r\n\t{\r\n\t\tgetDefaultNode: function(){\r\n\t\t\tvar node = new scheduler.$keyboardNavigation.TimeSlot();\r\n\r\n\t\t\tif(!node.isValid()){\r\n\t\t\t\tnode = node.fallback();\r\n\t\t\t}\r\n\t\t\treturn node;\r\n\t\t},\r\n\r\n\t\t_modes:{\r\n\t\t\tmonth: \"month\",\r\n\t\t\tyear: \"year\",\r\n\t\t\tdayColumns: \"dayColumns\",\r\n\t\t\ttimeline:\"timeline\",\r\n\t\t\tunits:\"units\",\r\n\t\t\tweekAgenda: \"weekAgenda\",\r\n\t\t\tlist: \"list\"\r\n\t\t},\r\n\t\tgetMode: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tvar mode = state.mode;\r\n\t\t\tif((scheduler.matrix && scheduler.matrix[mode])){\r\n\t\t\t\treturn this._modes.timeline;\r\n\t\t\t} else if((scheduler._props && scheduler._props[mode])){\r\n\t\t\t\treturn this._modes.units;\r\n\t\t\t}else if(mode == \"month\"){\r\n\t\t\t\treturn this._modes.month;\r\n\t\t\t}else if(mode == \"year\"){\r\n\t\t\t\treturn this._modes.year;\r\n\t\t\t}else if(mode == \"week_agenda\"){\r\n\t\t\t\treturn this._modes.weekAgenda;\r\n\t\t\t}else if(mode == \"map\" || mode == \"agenda\" || (scheduler._grid && scheduler[\"grid_\" + mode])){\r\n\t\t\t\treturn this._modes.list;\r\n\t\t\t}else{\r\n\t\t\t\treturn this._modes.dayColumns;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.focus();\r\n\t\t},\r\n\r\n\t\tblur: function(){\r\n\r\n\t\t},\r\n\r\n\t\tdisable: function(){\r\n\t\t\tscheduler.$container.setAttribute(\"tabindex\", \"0\");\r\n\t\t},\r\n\t\tenable: function(){\r\n\t\t\tif(scheduler.$container)\r\n\t\t\t\tscheduler.$container.removeAttribute(\"tabindex\");\r\n\t\t},\r\n\t\tisEnabled: function(){\r\n\t\t\treturn scheduler.$container.hasAttribute(\"tabindex\");\r\n\t\t},\r\n\r\n\r\n\t\t_compareEvents: function(a, b){\r\n\t\t\tif (a.start_date.valueOf() == b.start_date.valueOf())\r\n\t\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\t\treturn a.start_date.valueOf() > b.start_date.valueOf() ? 1 : -1;\r\n\t\t},\r\n\r\n\t\t_pickEvent: function(from, to, startId, reverse){\r\n\t\t\tvar range = scheduler.getState();\r\n\t\t\tfrom = new Date(Math.max(range.min_date.valueOf(), from.valueOf()));\r\n\t\t\tto = new Date(Math.min(range.max_date.valueOf(), to.valueOf()));\r\n\r\n\t\t\tvar evs = scheduler.getEvents(from, to);\r\n\t\t\tevs.sort(this._compareEvents);\r\n\t\t\tif(reverse){\r\n\t\t\t\tevs = evs.reverse();\r\n\t\t\t}\r\n\r\n\t\t\tvar trim = !!startId;\r\n\t\t\tfor(var i =0; i < evs.length && trim; i++){\r\n\t\t\t\tif(evs[i].id == startId){\r\n\t\t\t\t\ttrim = false;\r\n\t\t\t\t}\r\n\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\r\n\t\t\tfor(var i = 0; i < evs.length; i++){\r\n\t\t\t\tvar eventElement = new scheduler.$keyboardNavigation.Event(evs[i].id);\r\n\t\t\t\tif(eventElement.getNode())\r\n\t\t\t\t\treturn evs[i];\r\n\t\t\t}\r\n\r\n\t\t\treturn null;\r\n\t\t},\r\n\r\n\t\tnextEventHandler: function(id){\r\n\t\t\tvar activeNode = scheduler.$keyboardNavigation.dispatcher.activeNode;\r\n\r\n\t\t\tvar startId = id || (activeNode && activeNode.eventId);\r\n\r\n\t\t\tvar nextEvent = null;\r\n\t\t\tif(startId && scheduler.getEvent(startId)){\r\n\t\t\t\tvar currEvent = scheduler.getEvent(startId);\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tcurrEvent.start_date,\r\n\t\t\t\t\tscheduler.date.add(currEvent.start_date, 1, \"year\"),\r\n\t\t\t\t\tcurrEvent.id,\r\n\t\t\t\t\tfalse\r\n\t\t\t\t);\r\n\r\n\t\t\t}\r\n\t\t\tif(!nextEvent && !id){\r\n\t\t\t\tvar visibleDates = scheduler.getState();\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tvisibleDates.min_date,\r\n\t\t\t\t\tscheduler.date.add(visibleDates.min_date, 1, \"year\"),\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\tfalse\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tif(nextEvent){\r\n\r\n\t\t\t\tvar nextEv = new scheduler.$keyboardNavigation.Event(nextEvent.id);\r\n\t\t\t\tif(!nextEv.isValid()){// not visible event\r\n\t\t\t\t\tthis.nextEventHandler(nextEvent.id);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(activeNode){activeNode.blur();}\r\n\t\t\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(nextEv);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tprevEventHandler: function(id){\r\n\t\t\tvar activeNode = scheduler.$keyboardNavigation.dispatcher.activeNode;\r\n\r\n\t\t\tvar startId = id || (activeNode && activeNode.eventId);\r\n\r\n\t\t\tvar nextEvent = null;\r\n\t\t\tif(startId && scheduler.getEvent(startId)){\r\n\t\t\t\tvar currEvent = scheduler.getEvent(startId);\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tscheduler.date.add(currEvent.end_date, -1, \"year\"),\r\n\t\t\t\t\tcurrEvent.end_date,\r\n\t\t\t\t\tcurrEvent.id,\r\n\t\t\t\t\ttrue\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\tif(!nextEvent && !id){\r\n\t\t\t\tvar visibleDates = scheduler.getState();\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tscheduler.date.add(visibleDates.max_date, -1, \"year\"),\r\n\t\t\t\t\tvisibleDates.max_date,\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\ttrue\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tif(nextEvent){\r\n\t\t\t\tvar nextEv = new scheduler.$keyboardNavigation.Event(nextEvent.id);\r\n\t\t\t\tif(!nextEv.isValid()){// not visible event\r\n\t\t\t\t\tthis.prevEventHandler(nextEvent.id);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(activeNode){activeNode.blur();}\r\n\t\t\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(nextEv);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\r\n\t\t\t\"alt+1, alt+2, alt+3, alt+4, alt+5, alt+6, alt+7, alt+8, alt+9\": function(e){\r\n\t\t\t\tvar tabs = scheduler.$keyboardNavigation.HeaderCell.prototype.getNodes(\".dhx_cal_navline .dhx_cal_tab\");\r\n\t\t\t\tvar key = e.key;\r\n\t\t\t\tif(key === undefined){\r\n\t\t\t\t\tkey = e.keyCode - 48;\r\n\t\t\t\t}\r\n\t\t\t\tif(tabs[key*1 - 1]){\r\n\t\t\t\t\ttabs[key*1 - 1].click();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+left,meta+left\": function(e){\r\n\t\t\t\tscheduler._click.dhx_cal_prev_button();\r\n\t\t\t},\r\n\t\t\t\"ctrl+right,meta+right\": function(e){\r\n\t\t\t\tscheduler._click.dhx_cal_next_button();\r\n\t\t\t},\r\n\t\t\t\"ctrl+up,meta+up\":function(e){\r\n\t\t\t\tvar dataArea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tdataArea.scrollTop -= 20;\r\n\t\t\t},\r\n\t\t\t\"ctrl+down,meta+down\": function(e){\r\n\t\t\t\tvar dataArea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tdataArea.scrollTop += 20;\r\n\t\t\t},\r\n\r\n\r\n\t\t\t\"e\": function(){\r\n\t\t\t\tthis.nextEventHandler();\r\n\t\t\t},\r\n\r\n\t\t\t\"home\": function(){\r\n\t\t\t\tscheduler.setCurrentView(new Date());\r\n\t\t\t},\r\n\r\n\t\t\t\"shift+e\": function(){\r\n\t\t\t\tthis.prevEventHandler();\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+enter,meta+enter\": function(){\r\n\t\t\t\tscheduler.addEventNow({start_date: new Date(scheduler.getState().date)});\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+c,meta+c\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t},\r\n\t\t\t\"ctrl+v,meta+v\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t},\r\n\t\t\t\"ctrl+x,meta+x\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode.prototype.bindAll(scheduler.$keyboardNavigation.SchedulerNode.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.KeyNavNode = function(){};\r\n\r\nscheduler.$keyboardNavigation.KeyNavNode.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.EventHandler,\r\n\t{\r\n\t\tisValid: function(){\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\treturn null;\r\n\t\t},\r\n\r\n\t\tmoveTo: function (element) {\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(element);\r\n\t\t},\r\n\r\n\t\tcompareTo: function(b){\r\n\t\t\t// good enough comparison of two random objects\r\n\t\t\tif(!b) return false;\r\n\t\t\tfor(var i in this){\r\n\t\t\t\tif(!!this[i] != !!b[i]) return false;\r\n\r\n\t\t\t\tvar canStringifyThis = !!(this[i] && this[i].toString);\r\n\t\t\t\tvar canStringifyThat = !!(b[i] && b[i].toString);\r\n\t\t\t\tif(canStringifyThat != canStringifyThis) return false;\r\n\t\t\t\tif(!(canStringifyThat && canStringifyThis)) {\r\n\t\t\t\t\tif(b[i] != this[i]) return false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(b[i].toString() != this[i].toString())\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\tgetNode: function(){},\r\n\t\tfocus: function(){\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif(node){\r\n\t\t\t\tnode.setAttribute(\"tabindex\", \"-1\");\r\n\t\t\t\t//node.className += \" scheduler_focused\";\r\n\t\t\t\tif(node.focus) node.focus();\r\n\t\t\t}\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif(node){\r\n\t\t\t\tnode.setAttribute(\"tabindex\", \"-1\");\r\n\t\t\t\t//node.className = (node.className || \"\").replace(/ ?scheduler_focused/g, \"\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.HeaderCell = function(index){\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.HeaderCell.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\tgetNode: function(index){\r\n\t\t\tindex = index || this.index || 0;\r\n\t\t\tvar nodes = this.getNodes();\r\n\t\t\tif(nodes[index]) return nodes[index];\r\n\t\t},\r\n\r\n\t\tgetNodes: function(selector){\r\n\t\t\tselector = selector || [\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_prev_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_next_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_today_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_tab\"\r\n\t\t\t\t].join(\", \");\r\n\r\n\t\t\tvar nodes = Array.prototype.slice.call(scheduler.$container.querySelectorAll(selector));\r\n\t\t\tnodes.sort(function(a, b){\r\n\t\t\t\treturn a.offsetLeft - b.offsetLeft;\r\n\t\t\t});\r\n\t\t\treturn nodes;\r\n\t\t},\r\n\r\n\t\t_handlers:null,\r\n\r\n\t\tisValid: function(){\r\n\t\t\treturn !!this.getNode(this.index);\r\n\t\t},\r\n\t\tfallback:function(){\r\n\t\t\tvar defaultCell = this.getNode(0);\r\n\t\t\tif(!defaultCell){\r\n\t\t\t\tdefaultCell = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}\r\n\t\t\treturn defaultCell;\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tvar newIndex = this.index - 1;\r\n\t\t\t\tif(newIndex < 0){\r\n\t\t\t\t\tnewIndex = this.getNodes().length - 1;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.HeaderCell(newIndex));\r\n\r\n\t\t\t},\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tvar newIndex = this.index + 1;\r\n\t\t\t\tif(newIndex >= this.getNodes().length){\r\n\t\t\t\t\tnewIndex = 0;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.HeaderCell(newIndex));\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t},\r\n\r\n\t\t\t\"enter\": function(){\r\n\t\t\t\tvar node = this.getNode();\r\n\t\t\t\tif(node){\r\n\t\t\t\t\tnode.click();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.HeaderCell.prototype.bindAll(scheduler.$keyboardNavigation.HeaderCell.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.Event = function(id){\r\n\tthis.eventId = null;\r\n\tif(scheduler.getEvent(id)){\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tthis.start = new Date(ev.start_date);\r\n\t\tthis.end = new Date(ev.end_date);\r\n\r\n\t\tthis.section = this._getSection(ev);\r\n\t\tthis.eventId = id;\r\n\t}\r\n};\r\n\r\nscheduler.$keyboardNavigation.Event.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\t_getNodes: function(){\r\n\t\t\treturn Array.prototype.slice.call(scheduler.$container.querySelectorAll(\"[\"+scheduler.config.event_attribute+\"]\"));\r\n\t\t},\r\n\r\n\t\t_modes: scheduler.$keyboardNavigation.SchedulerNode.prototype._modes,\r\n\r\n\t\tgetMode: scheduler.$keyboardNavigation.SchedulerNode.prototype.getMode,\r\n\r\n\t\t_handlers: null,\r\n\t\tisValid: function(){\r\n\t\t\treturn !!(scheduler.getEvent(this.eventId) && this.getNode());\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\tvar eventNode = this._getNodes()[0];\r\n\t\t\tvar defaultElement = null;\r\n\t\t\tif(!eventNode || !(scheduler._locate_event(eventNode))){\r\n\t\t\t\tdefaultElement = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}else{\r\n\t\t\t\tvar id = scheduler._locate_event(eventNode);\r\n\t\t\t\tdefaultElement = new scheduler.$keyboardNavigation.Event(id);\r\n\t\t\t}\r\n\r\n\t\t\treturn defaultElement;\r\n\t\t},\r\n\r\n\t\tisScrolledIntoView: function (el) {\r\n\t\t\tvar eventBox = el.getBoundingClientRect();\r\n\t\t\tvar viewPort = scheduler.$container.querySelector(\".dhx_cal_data\").getBoundingClientRect();\r\n\t\t\t\r\n\t\t\tif(eventBox.bottom < viewPort.top || eventBox.top > viewPort.bottom){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\tgetNode: function(){\r\n\r\n\t\t\tvar idSelector = \"[\"+scheduler.config.event_attribute+\"='\"+this.eventId+\"']\";\r\n\r\n\t\t\tvar inlineEditor = scheduler.$keyboardNavigation.dispatcher.getInlineEditor(this.eventId);\r\n\t\t\tif(inlineEditor){// is inline editor visible\r\n\t\t\t\treturn inlineEditor;\r\n\t\t\t}else{\r\n\t\t\t\tif(scheduler.isMultisectionEvent && scheduler.isMultisectionEvent(scheduler.getEvent(this.eventId))){\r\n\t\t\t\t\tvar nodes = scheduler.$container.querySelectorAll(idSelector);\r\n\t\t\t\t\tfor(var i = 0; i < nodes.length; i++){\r\n\t\t\t\t\t\tif(this.isScrolledIntoView(nodes[i])){\r\n\t\t\t\t\t\t\treturn nodes[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn nodes[0];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn scheduler.$container.querySelector(idSelector);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tvar event = scheduler.getEvent(this.eventId);\r\n\r\n\t\t\tvar calendar = scheduler.getState();\r\n\t\t\tif(event.start_date.valueOf() > calendar.max_date.valueOf() || event.end_date.valueOf() <= calendar.min_date.valueOf()){\r\n\t\t\t\tscheduler.setCurrentView(event.start_date);\r\n\t\t\t}\r\n\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif (this.isScrolledIntoView(node)) {\r\n\t\t\t\tscheduler.$keyboardNavigation.dispatcher.keepScrollPosition((function(){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\t\t}).bind(this));\r\n\t\t\t} else {\r\n\t\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\t}\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\r\n\r\n\t\t_getSection: function(ev){\r\n\t\t\tvar section = null;\r\n\t\t\tvar mode = scheduler.getState().mode;\r\n\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\t\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\t\tsection = ev[timeline.y_property];\r\n\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\tvar unit = scheduler._props[mode];\r\n\t\t\t\tsection = ev[unit.map_to];\r\n\t\t\t}\r\n\t\t\treturn section;\r\n\t\t},\r\n\t\t_moveToSlot: function(dir){\r\n\t\t\tvar ev = scheduler.getEvent(this.eventId);\r\n\t\t\tif(ev){\r\n\t\t\t\tvar section =this._getSection(ev);\r\n\t\t\t\tvar slot = new scheduler.$keyboardNavigation.TimeSlot(ev.start_date, null, section);\r\n\t\t\t\tthis.moveTo(slot.nextSlot(slot, dir));\r\n\t\t\t}else{\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tthis._moveToSlot(\"left\");\r\n\t\t\t},\r\n\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tthis._moveToSlot(\"right\");\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\t\t\t\tif(this.getMode() == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis._moveToSlot(\"down\");\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"space\": function(){\r\n\t\t\t\tvar node = this.getNode();\r\n\t\t\t\tif(node && node.click){\r\n\t\t\t\t\tnode.click();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"up\": function () {\r\n\t\t\t\tif(this.getMode() == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis._moveToSlot(\"up\");\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"delete\": function(){\r\n\t\t\t\tif(scheduler.getEvent(this.eventId)) {\r\n\t\t\t\t\tscheduler._click.buttons[\"delete\"](this.eventId);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t// open lightbox\r\n\t\t\t\"enter\": function () {\r\n\t\t\t\tif(scheduler.getEvent(this.eventId)) {\r\n\t\t\t\t\tscheduler.showLightbox(this.eventId);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\nscheduler.$keyboardNavigation.Event.prototype.bindAll(scheduler.$keyboardNavigation.Event.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.TimeSlot = function(from, to, section, movingDate){\r\n\tvar state = scheduler.getState();\r\n\tvar timeline = scheduler.matrix && scheduler.matrix[state.mode];\r\n\r\n\tif(!from){\r\n\t\tfrom = this.getDefaultDate();\r\n\t}\r\n\r\n\tif(!to){\r\n\r\n\t\tif(timeline){\r\n\t\t\tto = scheduler.date.add(from, timeline.x_step, timeline.x_unit);\r\n\t\t}else{\r\n\t\t\tto = scheduler.date.add(from, scheduler.config.key_nav_step, \"minute\");\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tthis.section = section || this._getDefaultSection();\r\n\tthis.start_date = new Date(from);\r\n\tthis.end_date = new Date(to);\r\n\tthis.movingDate = movingDate || null;\r\n};\r\n\r\nscheduler.$keyboardNavigation.TimeSlot.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\t_handlers:null,\r\n\r\n\t\tgetDefaultDate: function(){\r\n\t\t\tvar from;\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar visibleTime = new Date(state.date);\r\n\t\t\tvisibleTime.setSeconds(0);\r\n\t\t\tvisibleTime.setMilliseconds(0);\r\n\r\n\t\t\tvar nowTime = new Date();\r\n\t\t\tnowTime.setSeconds(0);\r\n\t\t\tnowTime.setMilliseconds(0);\r\n\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[state.mode];\r\n\t\t\tvar showNowTime = false;\r\n\t\t\tif(visibleTime.valueOf() === nowTime.valueOf()){\r\n\t\t\t\tshowNowTime = true;\r\n\t\t\t}\r\n\r\n\t\t\tif(timeline){\r\n\t\t\t\tif(showNowTime){\r\n\t\t\t\t\tif(timeline.x_unit === \"day\"){\r\n\t\t\t\t\t\tnowTime.setHours(0);\r\n\t\t\t\t\t\tnowTime.setMinutes(0);\r\n\t\t\t\t\t}else if(timeline.x_unit === \"hour\"){\r\n\t\t\t\t\t\tnowTime.setMinutes(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfrom = nowTime;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfrom = scheduler.date[timeline.name + \"_start\"](new Date(state.date));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfrom = this.findVisibleColumn(from);\r\n\t\t\t}else{\r\n\t\t\t\tfrom = new Date(scheduler.getState().min_date);\r\n\t\t\t\tif(showNowTime){\r\n\t\t\t\t\tfrom = nowTime;\r\n\t\t\t\t}\r\n\t\t\t\tfrom = this.findVisibleColumn(from);\r\n\t\t\t\tif(!showNowTime){\r\n\t\t\t\t\tfrom.setHours(scheduler.config.first_hour);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(!scheduler._table_view){\r\n\t\t\t\t\tvar dataContainer = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\t\tif(dataContainer.scrollTop){\r\n\t\t\t\t\t\tfrom.setHours(scheduler.config.first_hour + Math.ceil(dataContainer.scrollTop / scheduler.config.hour_size_px));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn from;\r\n\t\t},\r\n\r\n\t\tclone: function(timeslot){\r\n\t\t\treturn new scheduler.$keyboardNavigation.TimeSlot(timeslot.start_date, timeslot.end_date, timeslot.section, timeslot.movingDate);\r\n\t\t},\r\n\t\t_getMultisectionView: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view;\r\n\t\t\tif(scheduler._props && scheduler._props[state.mode]) {\r\n\t\t\t\tview = scheduler._props[state.mode];\r\n\t\t\t}else if(scheduler.matrix && scheduler.matrix[state.mode]){\r\n\t\t\t\tview = scheduler.matrix[state.mode];\r\n\t\t\t}\r\n\t\t\treturn view;\r\n\t\t},\r\n\r\n\t\t_getDefaultSection: function(){\r\n\t\t\tvar section = null;\r\n\t\t\tvar view = this._getMultisectionView();\r\n\t\t\tif(view && !section){\r\n\t\t\t\tsection = this._getNextSection();\r\n\t\t\t}\r\n\t\t\treturn section;\r\n\t\t},\r\n\r\n\t\t_getNextSection: function(sectionId, dir){\r\n\t\t\tvar view = this._getMultisectionView();\r\n\t\t\tvar currentIndex = view.order[sectionId];\r\n\t\t\tvar nextIndex = currentIndex;\r\n\t\t\tif(currentIndex !== undefined){\r\n\t\t\t\tnextIndex = currentIndex + dir;\r\n\t\t\t}else{\r\n\t\t\t\tnextIndex = (view.size && view.position) ? view.position : 0;\r\n\t\t\t}\r\n\r\n\t\t\tif(nextIndex < 0){\r\n\t\t\t\tnextIndex = 0;\r\n\t\t\t}\r\n\t\t\tvar options = view.options || view.y_unit;\r\n\r\n\t\t\tif(nextIndex >= options.length){\r\n\t\t\t\tnextIndex = options.length - 1;\r\n\t\t\t}\r\n\t\t\t//nextIndex = nextIndex < 0 ? nextIndex = (view.options || view.y_unit).length -1 : nextIndex;\r\n\r\n\t\t\tif(options[nextIndex]){\r\n\t\t\t\treturn options[nextIndex].key;\r\n\t\t\t}else{\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar isInRange = !(this.start_date.valueOf() < state.min_date.valueOf() || this.start_date.valueOf() >= state.max_date.valueOf());\r\n\r\n\t\t\tif(!isInRange) return false;\r\n\r\n\r\n\t\t\tif(!this.isVisible(this.start_date, this.end_date)) return false;\r\n\r\n\t\t\tvar view = this._getMultisectionView();\r\n\r\n\t\t\tif(view){\r\n\t\t\t\treturn (view.order[this.section] !== undefined);\r\n\t\t\t}else{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\tfallback:function(){\r\n\r\n\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(!defaultSlot.isValid()){\r\n\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t}else{\r\n\t\t\t\treturn defaultSlot;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tgetNodes: function(){\r\n\t\t\treturn Array.prototype.slice.call(scheduler.$container.querySelectorAll(\".dhx_focus_slot\"));\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\treturn this.getNodes()[0];\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tif(this.section && scheduler.getView() && scheduler.getView().smart_rendering && scheduler.getView().scrollTo && !scheduler.$container.querySelector(`[data-section-id=\"${this.section}\"]`)){\r\n\t\t\t\tscheduler.getView().scrollTo({section: this.section});\r\n\t\t\t}\r\n\t\t\tscheduler.$keyboardNavigation.marker.render(this.start_date, this.end_date, this.section);\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\tscheduler.$keyboardNavigation._pasteDate = this.start_date;\r\n\t\t\tscheduler.$keyboardNavigation._pasteSection = this.section;\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t\tscheduler.$keyboardNavigation.marker.clear();\r\n\t\t},\r\n\r\n\t\t_modes: scheduler.$keyboardNavigation.SchedulerNode.prototype._modes,\r\n\r\n\t\t_getMode: scheduler.$keyboardNavigation.SchedulerNode.prototype.getMode,\r\n\r\n\t\taddMonthDate: function(date, dir, extend){\r\n\t\t\tvar res;\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tres = scheduler.date.add(date, -1, \"week\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tres = scheduler.date.add(date, 1, \"week\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tres = scheduler.date.day_start(scheduler.date.add(date, -1, \"day\"));\r\n\t\t\t\t\tres = this.findVisibleColumn(res, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tres = scheduler.date.day_start(scheduler.date.add(date, 1, \"day\"));\r\n\t\t\t\t\tres = this.findVisibleColumn(res, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tres = scheduler.date.day_start(new Date(date));\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tif(date.valueOf() < state.min_date.valueOf() || (!extend && date.valueOf() >= state.max_date.valueOf())){\r\n\t\t\t\tres = new Date(state.min_date);\r\n\t\t\t}\r\n\r\n\t\t\treturn res;\r\n\t\t},\r\n\r\n\t\tnextMonthSlot: function(slot, dir, extend){\r\n\r\n\t\t\tvar start, end;\r\n\t\t\tstart = this.addMonthDate(slot.start_date, dir, extend);\r\n\r\n\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\tend = new Date(start);\r\n\t\t\tend.setHours(scheduler.config.last_hour);\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\r\n\t\t_alignTimeSlot: function(date, minDate, unit, step){\r\n\t\t\tvar currentDate = new Date(minDate);\r\n\t\t\twhile(currentDate.valueOf() < date.valueOf()){\r\n\t\t\t\tcurrentDate = scheduler.date.add(currentDate, step, unit);\r\n\t\t\t}\r\n\r\n\t\t\tif(currentDate.valueOf() > date.valueOf()){\r\n\t\t\t\tcurrentDate = scheduler.date.add(currentDate, -step, unit);\r\n\t\t\t}\r\n\r\n\t\t\treturn currentDate;\r\n\t\t},\r\n\r\n\t\tnextTimelineSlot: function(slot, dir, extend){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view = scheduler.matrix[state.mode];\r\n\r\n\t\t\tvar startDate = this._alignTimeSlot(slot.start_date, scheduler.date[view.name + \"_start\"](new Date(slot.start_date)), view.x_unit, view.x_step);\r\n\t\t\tvar endDate = this._alignTimeSlot(slot.end_date, scheduler.date[view.name + \"_start\"](new Date(slot.end_date)), view.x_unit, view.x_step);\r\n\r\n\t\t\tif(endDate.valueOf() <= startDate.valueOf()){\r\n\t\t\t\tendDate = scheduler.date.add(startDate, view.x_step, view.x_unit);\r\n\t\t\t}\r\n\t\t\tvar newPos = this.clone(slot);\r\n\t\t\tnewPos.start_date = startDate;\r\n\t\t\tnewPos.end_date = endDate;\r\n\t\t\tnewPos.section = slot.section || this._getNextSection();\r\n\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tnewPos.section = this._getNextSection(slot.section, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tnewPos.section = this._getNextSection(slot.section, +1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tnewPos.start_date = this.findVisibleColumn(scheduler.date.add(newPos.start_date, -view.x_step, view.x_unit), -1);\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tnewPos.start_date = this.findVisibleColumn(scheduler.date.add(newPos.start_date, view.x_step, view.x_unit), 1);\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(newPos.start_date.valueOf() < state.min_date.valueOf() || newPos.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tif(extend && newPos.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\t\tnewPos.start_date = new Date(state.max_date);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tnewPos.start_date = scheduler.date[state.mode + \"_start\"](scheduler.date.add(state.date, dir == \"left\" ? -1 : 1, state.mode));\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn newPos;\r\n\t\t},\r\n\r\n\t\tnextUnitsSlot: function(slot, dir, extend){\r\n\t\t\tvar newPos = this.clone(slot);\r\n\t\t\tnewPos.section = slot.section || this._getNextSection();\r\n\r\n\t\t\tvar section = slot.section || this._getNextSection();\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view = scheduler._props[state.mode];\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tsection = this._getNextSection(slot.section, -1);\r\n\t\t\t\t\tvar optionsCount = view.size ? (view.size - 1) : view.options.length;\r\n\r\n\t\t\t\t\tif(view.days > 1 && (view.order[section] == optionsCount - 1)){\r\n\t\t\t\t\t\tif(scheduler.date.add(slot.start_date, -1, \"day\").valueOf() >= state.min_date.valueOf()){\r\n\t\t\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tsection = this._getNextSection(slot.section, 1);\r\n\t\t\t\t\tif(view.days > 1 && !view.order[section]){\r\n\t\t\t\t\t\tif(scheduler.date.add(slot.start_date, 1, \"day\").valueOf() < state.max_date.valueOf()){\r\n\t\t\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\tsection = slot.section;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tnewPos.section = section;\r\n\t\t\treturn newPos;\r\n\t\t},\r\n\r\n\t\t_moveDate: function(oldDate, dir){\r\n\t\t\tvar newDate = this.findVisibleColumn(scheduler.date.add(oldDate, dir, \"day\"), dir);\r\n\t\t\tnewDate.setHours(oldDate.getHours());\r\n\t\t\tnewDate.setMinutes(oldDate.getMinutes());\r\n\t\t\treturn newDate;\r\n\t\t},\r\n\r\n\t\tisBeforeLastHour: function(date, isStartDate){\r\n\t\t\tvar minutes = date.getMinutes(),\r\n\t\t\t\thours = date.getHours(),\r\n\t\t\t\tlast_hour = scheduler.config.last_hour;\r\n\t\t\treturn (hours < last_hour || (!isStartDate && ((last_hour == 24 || hours == last_hour) && !minutes)));\r\n\t\t},\r\n\t\tisAfterFirstHour: function(date, isStartDate){\r\n\t\t\tvar minutes = date.getMinutes(),\r\n\t\t\t\thours = date.getHours(),\r\n\t\t\t\tfirst_hour = scheduler.config.first_hour,\r\n\t\t\t\tlast_hour = scheduler.config.last_hour;\r\n\t\t\treturn (hours >= first_hour || (!isStartDate && (!minutes && ((!hours && last_hour == 24) || (hours == last_hour)))));\r\n\t\t},\r\n\t\tisInVisibleDayTime: function(date, isStartDate){\r\n\t\t\treturn (this.isBeforeLastHour(date, isStartDate) && this.isAfterFirstHour(date, isStartDate));\r\n\t\t},\r\n\r\n\t\tnextDaySlot: function(slot, dir, extend){\r\n\t\t\tvar start, end;\r\n\r\n\t\t\tvar key_nav_step = scheduler.config.key_nav_step;\r\n\r\n\t\t\tvar date = this._alignTimeSlot(slot.start_date, scheduler.date.day_start(new Date(slot.start_date)), \"minute\", key_nav_step);\r\n\r\n\r\n\t\t\tvar oldStart = slot.start_date;\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tstart = scheduler.date.add(date, -key_nav_step, \"minute\");\r\n\r\n\t\t\t\t\tif(!this.isInVisibleDayTime(start, true)){\r\n\t\t\t\t\t\tif (!extend || this.isInVisibleDayTime(oldStart, true)) {\r\n\r\n\t\t\t\t\t\t\tvar toNextDay = true;\r\n\t\t\t\t\t\t\tif(extend && scheduler.date.date_part(new Date(start)).valueOf() != scheduler.date.date_part(new Date(oldStart)).valueOf())\r\n\t\t\t\t\t\t\t\ttoNextDay = false;\r\n\t\t\t\t\t\t\tif(toNextDay)\r\n\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, -1, \"day\"), -1);\r\n\r\n\t\t\t\t\t\t\tstart.setHours(scheduler.config.last_hour);\r\n\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\tstart = scheduler.date.add(start, -key_nav_step, \"minute\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tstart = scheduler.date.add(date, key_nav_step, \"minute\");\r\n\r\n\t\t\t\t\tvar testEnd = extend ? start : scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tif(!this.isInVisibleDayTime(testEnd, false)){\r\n\t\t\t\t\t\tif(!extend || this.isInVisibleDayTime(oldStart, false)) {\r\n\t\t\t\t\t\t\tif (!extend) {\r\n\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, 1, \"day\"), 1);\r\n\t\t\t\t\t\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tvar toNextDay = true;\r\n\t\t\t\t\t\t\t\tif (scheduler.date.date_part(new Date(oldStart)).valueOf() == oldStart.valueOf()) {\r\n\t\t\t\t\t\t\t\t\ttoNextDay = false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (toNextDay) {\r\n\t\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, 1, \"day\"), 1);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\t\tstart = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tstart = this._moveDate(slot.start_date, -1);\r\n\t\t\t\t\tend = this._moveDate(slot.end_date, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tstart = this._moveDate(slot.start_date, 1);\r\n\t\t\t\t\tend = this._moveDate(slot.end_date, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tstart = date;\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\t\tnextWeekAgendaSlot: function(slot, dir){\r\n\t\t\tvar start, end;\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tstart = scheduler.date.day_start(scheduler.date.add(slot.start_date, -1, \"day\"));\r\n\t\t\t\t\tstart = this.findVisibleColumn(start, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tstart = scheduler.date.day_start(scheduler.date.add(slot.start_date, 1, \"day\"));\r\n\t\t\t\t\tstart = this.findVisibleColumn(start, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tstart = scheduler.date.day_start(slot.start_date);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif(slot.start_date.valueOf() < state.min_date.valueOf() || slot.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tstart = new Date(state.min_date);\r\n\r\n\t\t\t}\r\n\t\t\tend = new Date(start);\r\n\t\t\tend.setHours(scheduler.config.last_hour);\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\t\tnextAgendaSlot: function(slot, dir){\r\n\t\t\treturn {start_date: slot.start_date, end_date: slot.end_date};\r\n\t\t},\r\n\r\n\r\n\t\tisDateVisible: function(date){\r\n\t\t\tif(!scheduler._ignores_detected)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[scheduler.getState().mode];\r\n\r\n\t\t\tvar index;\r\n\t\t\tif(timeline){\r\n\t\t\t\tindex = scheduler._get_date_index(timeline, date);\r\n\t\t\t}else{\r\n\t\t\t\tindex = scheduler.locate_holder_day(date);\r\n\t\t\t}\r\n\r\n\t\t\treturn !scheduler._ignores[index];\r\n\t\t},\r\n\r\n\t\tfindVisibleColumn: function(start, dir){\r\n\t\t\tvar date = start;\r\n\t\t\tdir = dir || 1;\r\n\t\t\tvar range = scheduler.getState();\r\n\r\n\t\t\twhile(!this.isDateVisible(date) && ((dir > 0 && date.valueOf() <= range.max_date.valueOf()) || (dir < 0 && date.valueOf() >= range.min_date.valueOf()))){\r\n\t\t\t\tdate = this.nextDateColumn(date, dir);\r\n\t\t\t}\r\n\r\n\t\t\treturn date;\r\n\t\t},\r\n\r\n\t\tnextDateColumn: function(start, dir){\r\n\t\t\tdir = dir || 1;\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[scheduler.getState().mode];\r\n\r\n\t\t\tvar date;\r\n\t\t\tif(timeline){\r\n\t\t\t\tdate = scheduler.date.add(start, dir * timeline.x_step, timeline.x_unit);\r\n\t\t\t}else{\r\n\t\t\t\tdate = scheduler.date.day_start(scheduler.date.add(start, dir, \"day\"));\r\n\t\t\t}\r\n\r\n\t\t\treturn date;\r\n\t\t},\r\n\r\n\t\tisVisible:function(from, to){\r\n\t\t\tif(!scheduler._ignores_detected)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tvar current = new Date(from);\r\n\r\n\t\t\twhile(current.valueOf() < to.valueOf()){\r\n\t\t\t\tif(this.isDateVisible(current)) return true;\r\n\t\t\t\tcurrent = this.nextDateColumn(current);\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t},\r\n\r\n\t\tnextSlot: function(slot, dir, view, extend){\r\n\t\t\tvar next;\r\n\t\t\tview = view || this._getMode();\r\n\r\n\t\t\tvar tempSlot = scheduler.$keyboardNavigation.TimeSlot.prototype.clone(slot);\r\n\r\n\t\t\tswitch (view){\r\n\t\t\t\tcase this._modes.units:\r\n\t\t\t\t\tnext = this.nextUnitsSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.timeline:\r\n\t\t\t\t\tnext = this.nextTimelineSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.year:\r\n\t\t\t\t\tnext = this.nextMonthSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.month:\r\n\t\t\t\t\tnext = this.nextMonthSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.weekAgenda:\r\n\t\t\t\t\tnext = this.nextWeekAgendaSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.list:\r\n\t\t\t\t\tnext = this.nextAgendaSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.dayColumns:\r\n\t\t\t\t\tnext = this.nextDaySlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(next.start_date.valueOf() >= next.end_date.valueOf()){\r\n\t\t\t\tnext = this.nextSlot(next, dir, view);\r\n\t\t\t}\r\n\r\n\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(next);\r\n\r\n\t\t},\r\n\r\n\t\textendSlot: function(slot, dir){\r\n\t\t\tvar view = this._getMode();\r\n\t\t\tvar next;\r\n\t\t\tswitch (view){\r\n\t\t\t\tcase this._modes.units:\r\n\t\t\t\t\tif(dir == \"left\" || dir == \"right\"){\r\n\t\t\t\t\t\tnext = this.nextUnitsSlot(slot, dir);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnext = this.extendUnitsSlot(slot, dir);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.timeline:\r\n\t\t\t\t\tif(dir == \"down\" || dir == \"up\"){\r\n\t\t\t\t\t\tnext = this.nextTimelineSlot(slot, dir);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnext = this.extendTimelineSlot(slot, dir);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.year:\r\n\t\t\t\t\tnext = this.extendMonthSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.month:\r\n\t\t\t\t\tnext = this.extendMonthSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.dayColumns:\r\n\t\t\t\t\tnext = this.extendDaySlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.weekAgenda:\r\n\t\t\t\t\tnext = this.extendWeekAgendaSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnext = slot;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tvar range = scheduler.getState();\r\n\t\t\tif(next.start_date.valueOf() < range.min_date.valueOf()){\r\n\t\t\t\tnext.start_date = this.findVisibleColumn(range.min_date);\r\n\t\t\t\tnext.start_date.setHours(scheduler.config.first_hour);\r\n\t\t\t}\r\n\r\n\t\t\tif(next.end_date.valueOf() > range.max_date.valueOf()){\r\n\t\t\t//\tnext.end_date = new Date(slot.end_date);\r\n\t\t\t\tnext.end_date = this.findVisibleColumn(range.max_date, -1);\r\n\t\t\t}\r\n\r\n\r\n\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(next);\r\n\t\t},\r\n\r\n\t\textendTimelineSlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"timeline\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\textendWeekAgendaSlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"weekAgenda\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\textendGenericSlot: function(allowedDirections, slot, direction, type){\r\n\t\t\tvar next;\r\n\t\t\tvar moveDate = slot.movingDate;\r\n\r\n\t\t\tif(!moveDate){\r\n\t\t\t\tmoveDate = allowedDirections[direction];\r\n\t\t\t}\r\n\r\n\t\t\tif(!moveDate || !allowedDirections[direction]){\r\n\t\t\t\treturn slot;\r\n\t\t\t}\r\n\r\n\t\t\tif(direction){\r\n\t\t\t\tnext = this.nextSlot({start_date: slot[moveDate], section: slot.section}, direction, type, true);\r\n\r\n\t\t\t\tif(next.start_date.valueOf() == slot.start_date.valueOf()){\r\n\t\t\t\t\tnext = this.nextSlot({start_date: next.start_date, section:next.section}, direction, type, true);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tnext.movingDate = moveDate;\r\n\t\t\t}else{\r\n\t\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(slot);\r\n\t\t\t}\r\n\r\n\t\t\tvar newDates = this.extendSlotDates(slot, next, next.movingDate);\r\n\r\n\t\t\tif(newDates.end_date.valueOf() <= newDates.start_date.valueOf()){\r\n\t\t\t\tnext.movingDate = next.movingDate == \"end_date\" ? \"start_date\" : \"end_date\";\r\n\t\t\t}\r\n\t\t\tnewDates = this.extendSlotDates(slot, next, next.movingDate);\r\n\r\n\t\t\tnext.start_date = newDates.start_date;\r\n\t\t\tnext.end_date = newDates.end_date;\r\n\t\t\treturn next;\r\n\t\t},\r\n\r\n\t\textendSlotDates: function(oldSlot, newSlot, dateDirection){\r\n\t\t\tvar res = {start_date:null, end_date:null};\r\n\r\n\t\t\tif(dateDirection == \"start_date\"){\r\n\t\t\t\tres.start_date = newSlot.start_date;\r\n\t\t\t\tres.end_date = oldSlot.end_date;\r\n\t\t\t}else{\r\n\t\t\t\tres.start_date = oldSlot.start_date;\r\n\t\t\t\tres.end_date = newSlot.start_date;\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\r\n\t\t},\r\n\r\n\t\textendMonthSlot: function(slot, direction){\r\n\t\t\tvar slot = this.extendGenericSlot({\r\n\t\t\t\t\t\"up\":\"start_date\",\r\n\t\t\t\t\t\"down\":\"end_date\",\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"month\"\r\n\t\t\t);\r\n\r\n\t\t\tslot.start_date.setHours(scheduler.config.first_hour);\r\n\t\t\tslot.end_date = scheduler.date.add(slot.end_date, -1, \"day\");\r\n\t\t\tslot.end_date.setHours(scheduler.config.last_hour);\r\n\t\t\treturn slot;\r\n\t\t},\r\n\r\n\t\textendUnitsSlot: function(slot, direction){\r\n\t\t\tvar next;\r\n\r\n\t\t\tswitch (direction){\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tnext = this.extendDaySlot(slot, direction);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnext = slot;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tnext.section = slot.section;\r\n\t\t\treturn next;\r\n\t\t},\r\n\t\textendDaySlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\t\"up\":\"start_date\",\r\n\t\t\t\t\t\"down\":\"end_date\",\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"dayColumns\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\tscrollSlot: function(dir){\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tvar slot = this.nextSlot(this, dir);\r\n\t\t\tif(slot.start_date.valueOf() < state.min_date.valueOf() || slot.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tscheduler.setCurrentView(new Date(slot.start_date));\r\n\t\t\t}\r\n\r\n\t\t\tthis.moveTo(slot);\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tthis.scrollSlot(\"left\");\r\n\t\t\t},\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tthis.scrollSlot(\"right\");\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\r\n\t\t\t\tvar mode = this._getMode();\r\n\t\t\t\tif(mode == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.scrollSlot(\"down\");\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"up\": function () {\r\n\t\t\t\tvar mode = this._getMode();\r\n\t\t\t\tif(mode == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.scrollSlot(\"up\");\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"shift+down\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"down\"));\r\n\t\t\t},\r\n\t\t\t\"shift+up\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"up\"));\r\n\t\t\t},\r\n\t\t\t\"shift+right\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"right\"));\r\n\t\t\t},\r\n\t\t\t\"shift+left\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"left\"));\r\n\t\t\t},\r\n\r\n\r\n\t\t\t\"enter\": function(){\r\n\t\t\t\tvar obj = {start_date: new Date(this.start_date), end_date: new Date(this.end_date)};\r\n\r\n\t\t\t\tvar mode = scheduler.getState().mode;\r\n\t\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\r\n\t\t\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\t\t\tobj[timeline.y_property] = this.section;\r\n\t\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\t\tvar unit = scheduler._props[mode];\r\n\t\t\t\t\tobj[unit.map_to] = this.section;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler.addEventNow(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.TimeSlot.prototype.bindAll(scheduler.$keyboardNavigation.TimeSlot.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.MinicalButton = function(div, index){\r\n\tthis.container = div;\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.MinicalButton.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar container = this.container;\r\n\t\t\treturn !!container.offsetWidth;// valid if container is visible\r\n\t\t},\r\n\r\n\t\tfallback: function(){\r\n\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(defaultSlot.isValid()){\r\n\t\t\t\treturn defaultSlot;\r\n\t\t\t}else{\r\n\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t}\r\n\t\t},\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.globalNode.disable();\r\n\t\t\tthis.container.removeAttribute(\"tabindex\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tthis.container.setAttribute(\"tabindex\", \"0\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\tif(!this.index){\r\n\t\t\t\treturn this.container.querySelector(\".dhx_cal_prev_button\");\r\n\t\t\t}else{\r\n\t\t\t\treturn this.container.querySelector(\".dhx_cal_next_button\");\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"right\": function(e){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, this.index ? 0 : 1));\r\n\t\t\t},\r\n\t\t\t\"left\": function(e){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, this.index ? 0 : 1));\r\n\t\t\t},\r\n\t\t\t\"down\": function(){\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, 0, 0);\r\n\t\t\t\tif(next && !next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"enter\": function(e){\r\n\t\t\t\tthis.getNode().click();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.MinicalButton.prototype.bindAll(scheduler.$keyboardNavigation.MinicalButton.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.MinicalCell = function(div, row, col){\r\n\tthis.container = div;\r\n\tthis.row = row || 0;\r\n\tthis.col = col || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.MinicalCell.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar grid = this._getGrid();\r\n\t\t\treturn !!(grid[this.row] && grid[this.row][this.col]);\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\tvar row = this.row;\r\n\t\t\tvar col = this.col;\r\n\t\t\tvar grid = this._getGrid();\r\n\t\t\tif(!grid[row]){\r\n\t\t\t\trow = 0;\r\n\t\t\t}\r\n\t\t\tvar dir = true;\r\n\t\t\tif(row > grid.length / 2){\r\n\t\t\t\tdir = false;\r\n\t\t\t}\r\n\r\n\t\t\tif(!grid[row]){\r\n\t\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t\tif(defaultSlot.isValid()){\r\n\t\t\t\t\treturn defaultSlot;\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(dir){\r\n\t\t\t\tfor(var c = col; grid[row] && c < grid[row].length; c++){\r\n\t\t\t\t\tif(!grid[row][c] && c == grid[row].length - 1){\r\n\t\t\t\t\t\trow++;\r\n\t\t\t\t\t\tcol = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(grid[row][c]){\r\n\t\t\t\t\t\treturn new scheduler.$keyboardNavigation.MinicalCell(this.container, row, c);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tfor(var c = col; grid[row] && c < grid[row].length; c--){\r\n\t\t\t\t\tif(!grid[row][c] && !c){\r\n\t\t\t\t\t\trow--;\r\n\t\t\t\t\t\tcol = grid[row].length - 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(grid[row][c]){\r\n\t\t\t\t\t\treturn new scheduler.$keyboardNavigation.MinicalCell(this.container, row, c);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn new scheduler.$keyboardNavigation.MinicalButton(this.container, 0);\r\n\t\t},\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.globalNode.disable();\r\n\r\n\t\t\tthis.container.removeAttribute(\"tabindex\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tthis.container.setAttribute(\"tabindex\", \"0\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\t\t_getNode: function(row, col){\r\n\t\t\treturn this.container.querySelector(\".dhx_year_body tr:nth-child(\"+(row + 1) + \") td:nth-child(\"+(col + 1)+\")\");\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\treturn this._getNode(this.row, this.col);\r\n\t\t},\r\n\r\n\t\t_getGrid: function(){\r\n\t\t\tvar rows = this.container.querySelectorAll(\".dhx_year_body tr\");\r\n\t\t\tvar grid = [];\r\n\t\t\tfor(var i = 0; i < rows.length; i++){\r\n\t\t\t\tgrid[i] = [];\r\n\t\t\t\tvar row = rows[i];\r\n\t\t\t\tvar cells = row.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var c = 0; c < cells.length; c++){\r\n\t\t\t\t\tvar cell = cells[c];\r\n\t\t\t\t\tvar enabled = true;\r\n\t\t\t\t\tvar css = scheduler._getClassName(cell);\r\n\t\t\t\t\tif(css.indexOf(\"dhx_after\") > -1 || css.indexOf(\"dhx_before\") > -1 || css.indexOf(\"dhx_scale_ignore\") > -1){\r\n\t\t\t\t\t\tenabled = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tgrid[i][c] = enabled;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn grid;\r\n\t\t},\r\n\r\n\r\n\t\tkeys: {\r\n\t\t\t\"right\": function(e){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row;\r\n\t\t\t\tvar newCol = this.col + 1;\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tif(grid[newRow + 1]){\r\n\t\t\t\t\t\tnewRow = newRow + 1;\r\n\t\t\t\t\t\tnewCol = 0;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnewCol = this.col;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"left\": function(e){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row;\r\n\t\t\t\tvar newCol = this.col - 1;\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tif(grid[newRow - 1]){\r\n\t\t\t\t\t\tnewRow = newRow - 1;\r\n\t\t\t\t\t\tnewCol = grid[newRow].length - 1;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnewCol = this.col;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"down\": function(){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row + 1;\r\n\t\t\t\tvar newCol = this.col;\r\n\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tnewRow = this.row;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"up\": function(){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row - 1;\r\n\t\t\t\tvar newCol = this.col;\r\n\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tvar index = 0;\r\n\t\t\t\t\tif(this.col > grid[this.row].length / 2){\r\n\t\t\t\t\t\tindex = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, index));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.moveTo(next);\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\t\t\t\"enter\": function(e){\r\n\t\t\t\tthis.getNode().querySelector(\".dhx_month_head\").click();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.MinicalCell.prototype.bindAll(scheduler.$keyboardNavigation.MinicalCell.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.DataArea = function(index){\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.DataArea.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\tgetNode: function(index){\r\n\t\t\treturn scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t},\r\n\r\n\t\t_handlers:null,\r\n\r\n\t\tisValid: function(){\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tfallback:function(){\r\n\t\t\treturn this;\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"up,down,right,left\":function(){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.DataArea.prototype.bindAll(scheduler.$keyboardNavigation.DataArea.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\n\r\n\r\n(function(){\r\n\tvar modalsStack = [];\r\n\r\n\tfunction isModal(){\r\n\t\treturn !!(modalsStack.length);\r\n\t}\r\n\r\n\tfunction isChildOf(child, parent){\r\n\t\twhile(child && child != parent){\r\n\t\t\tchild = child.parentNode;\r\n\t\t}\r\n\r\n\t\treturn !!(child == parent);\r\n\t}\r\n\r\n\tfunction afterPopup(box){\r\n\t\tsetTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif(!isModal() && !(isChildOf(document.activeElement, scheduler.$container))) {\r\n\t\t\t\tscheduler.focus();\r\n\t\t\t}\r\n\t\t}, 1);\r\n\t}\r\n\tfunction startModal(box){\r\n\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\tscheduler.event(box, \"keydown\", trapFocus);\r\n\t\tmodalsStack.push(box);\r\n\t\t//scheduler.$keyboardNavigation.dispatcher.disable();\r\n\t}\r\n\r\n\tfunction endModal(){\r\n\t\tvar box = modalsStack.pop();\r\n\t\tif(box) {\r\n\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t}\r\n\t\tafterPopup(box);\r\n\r\n\t}\r\n\r\n\tfunction isTopModal(box){\r\n\t//\tif(dhtmlx._modalsStack.length){\r\n\t//\t\treturn box == dhtmlx._modalsStack[dhtmlx._modalsStack.length - 1];\r\n\t//\t}else{\r\n\t\t\treturn box == modalsStack[modalsStack.length - 1];\r\n\t//\t}\r\n\r\n\t}\r\n\r\n\tfunction trapFocus(event){\r\n\t\tvar event = event || window.event;\r\n\t\tvar target = event.currentTarget;\r\n\t\tif(!isTopModal(target)) return;\r\n\r\n\t\tscheduler.$keyboardNavigation.trapFocus(target, event);\r\n\t}\r\n\r\n\tfunction traceLightbox(){\r\n\t\tstartModal(scheduler.getLightbox());\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onLightbox\", traceLightbox);\r\n\tscheduler.attachEvent(\"onAfterLightbox\", endModal);\r\n\r\n\tscheduler.attachEvent(\"onAfterQuickInfo\", function(){afterPopup();});\r\n\r\n\tif(!scheduler._keyNavMessagePopup) {\r\n\t\tscheduler._keyNavMessagePopup = true;\r\n\r\n\t\tvar focusElement = null;\r\n\t\tvar backupFocus = null;\r\n\t\tconst modalsStack = [];\r\n\t\tscheduler.attachEvent(\"onMessagePopup\", function(box){\r\n\t\t\tfocusElement = document.activeElement;\r\n\t\t\tbackupFocus = focusElement;\r\n\r\n\t\t\twhile(backupFocus && scheduler._getClassName(backupFocus).indexOf(\"dhx_cal_data\") < 0){\r\n\t\t\t\tbackupFocus = backupFocus.parentNode;\r\n\t\t\t}\r\n\t\t\tif(backupFocus){\r\n\t\t\t\tbackupFocus = backupFocus.parentNode;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t\tscheduler.event(box, \"keydown\", trapFocus);\r\n\t\t\tmodalsStack.push(box);\r\n\t\t});\r\n\r\n\r\n\t\tscheduler.attachEvent(\"onAfterMessagePopup\", function () {\r\n\t\t\tvar box = modalsStack.pop();\r\n\t\t\tif(box) {\r\n\t\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t\t}\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tvar currentTarget = document.activeElement;\r\n\t\t\t\twhile(currentTarget && scheduler._getClassName(currentTarget).indexOf(\"dhx_cal_light\") < 0){\r\n\t\t\t\t\tcurrentTarget = currentTarget.parentNode;\r\n\t\t\t\t}\r\n\t\t\t\tif(currentTarget)\r\n\t\t\t\t\treturn;\r\n\r\n\r\n\t\t\t\tif(focusElement && focusElement.parentNode){\r\n\t\t\t\t\tfocusElement.focus();\r\n\r\n\t\t\t\t}else if(backupFocus && backupFocus.parentNode){\r\n\t\t\t\t\tbackupFocus.focus();\r\n\t\t\t\t}\r\n\t\t\t\tfocusElement = null;\r\n\t\t\t\tbackupFocus = null;\r\n\r\n\t\t\t}, 1);\r\n\t\t});\r\n\t}\r\n\r\n\tscheduler.$keyboardNavigation.isModal = isModal;\r\n\r\n\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.dispatcher = {\r\n\tisActive: false,\r\n\tactiveNode: null,\r\n\tglobalNode: new scheduler.$keyboardNavigation.SchedulerNode(),\r\n\r\n\tkeepScrollPosition: function (callback) {\r\n\t\tvar top, left;\r\n\r\n\t\tvar scrollable = scheduler.$container.querySelector(\".dhx_timeline_scrollable_data\");\r\n\t\tif(!scrollable){\r\n\t\t\tscrollable = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t}\r\n\r\n\t\tif(scrollable){\r\n\t\t\ttop = scrollable.scrollTop;\r\n\t\t\tleft = scrollable.scrollLeft;\r\n\t\t}\r\n\r\n\t\tcallback();\r\n\r\n\t\tif(scrollable){\r\n\t\t\tscrollable.scrollTop = top;\r\n\t\t\tscrollable.scrollLeft = left;\r\n\t\t}\r\n\t},\r\n\tenable: function(){\r\n\t\tif(!scheduler.$container){\r\n\t\t\t// do nothing if not initialized\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.isActive = true;\r\n\t\tvar self = this;\r\n\t\tthis.keepScrollPosition(function () {\r\n\t\t\tself.globalNode.enable();\r\n\t\t\tself.setActiveNode(self.getActiveNode());\r\n\t\t});\r\n\t},\r\n\r\n\tdisable: function(){\r\n\t\tthis.isActive = false;\r\n\t\tthis.globalNode.disable();\r\n\t},\r\n\r\n\tisEnabled: function(){\r\n\t\treturn !!this.isActive;\r\n\t},\r\n\r\n\tgetDefaultNode: function(){\r\n\t\treturn this.globalNode.getDefaultNode();\r\n\t},\r\n\r\n\tsetDefaultNode: function() {\r\n\t\tthis.setActiveNode(this.getDefaultNode());\r\n\t},\r\n\r\n\tgetActiveNode: function(){\r\n\t\tvar node = this.activeNode;\r\n\t\tif(node && !node.isValid()){\r\n\t\t\tnode = node.fallback();\r\n\t\t}\r\n\t\treturn node;\r\n\t},\r\n\r\n\tfocusGlobalNode: function(){\r\n\t\tthis.blurNode(this.globalNode);\r\n\t\tthis.focusNode(this.globalNode);\r\n\t},\r\n\r\n\tsetActiveNode: function(el){\r\n\t\tif(!el || !el.isValid())\r\n\t\t\treturn;\r\n\r\n\t\tif(this.activeNode){\r\n\t\t\tif(this.activeNode.compareTo(el)){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(this.isEnabled()){\r\n\t\t\tthis.blurNode(this.activeNode);\r\n\t\t\tthis.activeNode = el;\r\n\t\t\tthis.focusNode(this.activeNode);\r\n\t\t}\r\n\t},\r\n\r\n\tfocusNode: function(el){\r\n\t\tif(el && el.focus){\r\n\t\t\tel.focus();\r\n\t\t\tif(el.getNode && document.activeElement != el.getNode()){\r\n\t\t\t\tthis.setActiveNode(new scheduler.$keyboardNavigation.DataArea());\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tblurNode: function(el){\r\n\t\tif(el && el.blur){\r\n\t\t\tel.blur();\r\n\t\t}\r\n\t},\r\n\r\n\tgetInlineEditor: function(id){\r\n\t\tvar editor = scheduler.$container.querySelector(\".dhx_cal_editor[\"+scheduler.config.event_attribute+\"='\"+id+\"'] textarea\");\r\n\t\tif(editor && editor.offsetWidth){\r\n\t\t\t// if exists and visible\r\n\t\t\treturn editor;\r\n\t\t}\r\n\t\treturn null;\r\n\t},\r\n\r\n\tkeyDownHandler: function (e) {\r\n\r\n\t\tif(e.defaultPrevented){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar activeElement = this.getActiveNode();\r\n\r\n\t\tif(scheduler.$keyboardNavigation.isModal() &&\r\n\t\t\t!(activeElement && activeElement.container && scheduler.utils.dom.locateCss({target:activeElement.container}, \"dhx_minical_popup\", false)))\r\n\t\t\treturn;\r\n\r\n\t\tif(scheduler.getState().editor_id && this.getInlineEditor(scheduler.getState().editor_id))\r\n\t\t\treturn;\r\n\r\n\t\tif (!this.isEnabled())\r\n\t\t\treturn;\r\n\r\n\t\te = e || window.event;\r\n\r\n\t\tvar schedulerNode = this.globalNode;\r\n\r\n\t\tvar command = scheduler.$keyboardNavigation.shortcuts.getCommandFromEvent(e);\r\n\r\n\t\tif(!activeElement){\r\n\t\t\tthis.setDefaultNode();\r\n\t\t}else if(activeElement.findHandler(command)){\r\n\t\t\tactiveElement.doAction(command, e);\r\n\t\t}else if(schedulerNode.findHandler(command)){\r\n\t\t\tschedulerNode.doAction(command, e);\r\n\t\t}\r\n\r\n\t},\r\n\r\n\t_timeout: null,\r\n\tdelay: function(callback, delay){\r\n\r\n\t\tclearTimeout(this._timeout);\r\n\t\tthis._timeout = setTimeout(callback, delay || 1);\r\n\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n//Initial idea and implementation by Steve MC\r\nscheduler._temp_key_scope = function (){\r\n\r\n\tscheduler.config.key_nav = true;\r\n\r\n\tscheduler.$keyboardNavigation._pasteDate = null; // used for copy and paste operations\r\n\tscheduler.$keyboardNavigation._pasteSection = null; // used for copy and paste operations\r\n\tvar isCopy = null;\r\n\r\n\tvar pos = {};\r\n\r\n\tif(!document.body){\r\n\t\tscheduler.event(window, \"load\", function(){\r\n\t\t\tscheduler.event(document.body, \"mousemove\", trackMousePosition);\r\n\t\t});\r\n\t}else{\r\n\t\tscheduler.event(document.body, \"mousemove\", trackMousePosition);\r\n\t}\r\n\r\n\tfunction trackMousePosition(event){\r\n\t\tevent = event || window.event;\r\n\t\tpos.x = event.clientX;\r\n\t\tpos.y = event.clientY;\r\n\t}\r\n\tfunction currentTarget(){\r\n\r\n\t\tvar mousePointer = false;\r\n\t\tvar keyNavPointer = false;\r\n\r\n\t\tvar target = document.elementFromPoint(pos.x, pos.y);\r\n\t\twhile(target && target != scheduler._obj){\r\n\t\t\ttarget = target.parentNode;\r\n\t\t}\r\n\t\tmousePointer = !!(target == scheduler._obj);\r\n\r\n\t\tkeyNavPointer = scheduler.$keyboardNavigation.dispatcher.isEnabled();\r\n\r\n\t\treturn mousePointer || keyNavPointer;\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onMouseMove\", function(id,e){\r\n\t\tvar state = scheduler.getState();\r\n\r\n\t\t// make sure scheduler is fully initialized before calling scheduler.getActionData\r\n\t\tif(!(state.mode && state.min_date)){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar position = scheduler.getActionData(e);\r\n\t\tscheduler.$keyboardNavigation._pasteDate = position.date;\r\n\t\tscheduler.$keyboardNavigation._pasteSection = position.section;\r\n\t});\r\n\r\n\tfunction clear_event_after(ev){\r\n\t\tdelete ev.rec_type; delete ev.rec_pattern;\r\n\t\tdelete ev.event_pid; delete ev.event_length;\r\n\t}\r\n\r\n\tfunction copyEvent(ev){\r\n\t\treturn scheduler._lame_copy({}, ev);\r\n\t}\r\n\r\n\tscheduler._make_pasted_event = function(ev){\r\n\t\tvar date = scheduler.$keyboardNavigation._pasteDate;\r\n\t\tvar section = scheduler.$keyboardNavigation._pasteSection;\r\n\r\n\t\tvar event_duration = ev.end_date-ev.start_date;\r\n\r\n\t\tvar copy = copyEvent(ev);\r\n\t\tclear_event_after(copy);\r\n\t\tcopy.start_date = new Date(date);\r\n\t\tcopy.end_date = new Date(copy.start_date.valueOf() + event_duration);\r\n\r\n\t\tif(section){\r\n\t\t\tvar property = scheduler._get_section_property();\r\n\t\t\t// GS-2527: if the event has multiple sections, it will be inserted into the initial sections.\r\n\t\t\tif(scheduler.config.multisection && ev[property] && scheduler.isMultisectionEvent && scheduler.isMultisectionEvent(ev)) \r\n\t\t\t\tcopy[property] = ev[property]; // save initial set of resources for multisection view\r\n\t\t\telse\r\n\t\t\t\tcopy[property] = section;\r\n\t\t}\r\n\t\treturn copy;\r\n\t};\r\n\tscheduler._do_paste = function(is_copy, modified_ev, original_ev){\r\n\t\tif(scheduler.callEvent(\"onBeforeEventPasted\", [is_copy, modified_ev, original_ev]) === false){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tscheduler.addEvent(modified_ev);\r\n\t\tscheduler.callEvent(\"onEventPasted\", [is_copy, modified_ev, original_ev]);\r\n\t};\r\n\r\n\tscheduler._is_key_nav_active = function(){\r\n\t\tif(this._is_initialized() && !this._is_lightbox_open() && this.config.key_nav){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\r\n\tfunction getSelectedEvent(){\r\n\t\tvar node = scheduler.$keyboardNavigation.dispatcher.getActiveNode();\r\n\t\tif(node && node.eventId) return node.eventId;\r\n\t\treturn scheduler._select_id;\r\n\t}\r\n\r\n\tscheduler.event(document, \"keydown\", function(e){\r\n\t\t// compatibility fix - scheduler focus on ctrl+v on mouse hover\r\n\t\tif(((e.ctrlKey || e.metaKey) && e.keyCode == 86) && scheduler._buffer_event && !scheduler.$keyboardNavigation.dispatcher.isEnabled()) {\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.isActive = currentTarget();\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler._key_nav_copy_paste = function(e){\r\n\t\tif(!scheduler._is_key_nav_active()) return true;\r\n\r\n\t\tif (e.keyCode == 37 || e.keyCode == 39) { // Left, Right arrows\r\n\t\t\te.cancelBubble = true;\r\n\r\n\t\t\tvar next = scheduler.date.add(scheduler._date,(e.keyCode == 37 ? -1 : 1 ),scheduler._mode);\r\n\t\t\tscheduler.setCurrentView(next);\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tvar select_id = getSelectedEvent();\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 67) { // CTRL+C\r\n\t\t\tif (select_id) {\r\n\t\t\t\tscheduler._buffer_event = copyEvent(scheduler.getEvent(select_id));\r\n\t\t\t\tisCopy = true;\r\n\t\t\t\tscheduler.callEvent(\"onEventCopied\", [scheduler.getEvent(select_id)]);\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 88) { // CTRL+X\r\n\t\t\tif (select_id) {\r\n\t\t\t\tisCopy = false;\r\n\t\t\t\tvar ev = scheduler._buffer_event = copyEvent(scheduler.getEvent(select_id));\r\n\r\n\t\t\t\tscheduler.updateEvent(ev.id);\r\n\t\t\t\tscheduler.callEvent(\"onEventCut\", [ev]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 86 && currentTarget(e)) { // CTRL+V\r\n\t\t\tvar ev = scheduler._buffer_event ? scheduler.getEvent(scheduler._buffer_event.id) : scheduler._buffer_event;\r\n\t\t\tev = ev || scheduler._buffer_event;\r\n\r\n\t\t\tif (ev) {\r\n\t\t\t\tvar new_ev = scheduler._make_pasted_event(ev);\r\n\t\t\t\tif (isCopy) {\r\n\t\t\t\t\tnew_ev.id = scheduler.uid();\r\n\t\t\t\t\tscheduler._do_paste(isCopy, new_ev, ev);\r\n\t\t\t\t}\r\n\t\t\t\telse { // cut operation\r\n\t\t\t\t\tvar res = scheduler.callEvent(\"onBeforeEventChanged\",[new_ev, e, false, ev]);\r\n\t\t\t\t\tif (res) {\r\n\t\t\t\t\t\tscheduler._do_paste(isCopy, new_ev, ev);\r\n\t\t\t\t\t\tisCopy = true; // switch to copy after first paste operation\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t};\r\n};\r\nscheduler._temp_key_scope();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.attachSchedulerHandlers = function(){\r\n\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\tvar keyDownHandler = function(e){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\r\n\t\treturn dispatcher.keyDownHandler(e);\r\n\t};\r\n\r\n\tvar focusHandler = function () {\r\n\t\tdispatcher.keepScrollPosition(function () {\r\n\t\t\tdispatcher.focusGlobalNode();\r\n\t\t});\r\n\t};\r\n\r\n\tvar waitCall;\r\n\tscheduler.attachEvent(\"onDataRender\", function(){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\t\tif(!(dispatcher.isEnabled() && !scheduler.getState().editor_id)) return;\r\n\r\n\t\tclearTimeout(waitCall);\r\n\t\twaitCall = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif(!dispatcher.isEnabled())\r\n\t\t\t\tdispatcher.enable();\r\n\t\t\treFocusActiveNode();\r\n\t\t});\r\n\t});\r\n\r\n\tvar reFocusActiveNode = function(){\r\n\t\tif(!dispatcher.isEnabled())\r\n\t\t\treturn;\r\n\r\n\t\tvar activeNode = dispatcher.getActiveNode();\r\n\t\tif(!activeNode)\r\n\t\t\treturn;\r\n\r\n\t\tif(!activeNode.isValid()){\r\n\t\t\tactiveNode = activeNode.fallback();\r\n\t\t}\r\n\r\n\t\tif(!activeNode || activeNode instanceof scheduler.$keyboardNavigation.MinicalButton || activeNode instanceof scheduler.$keyboardNavigation.MinicalCell)\r\n\t\t\treturn;\r\n\r\n\t\tdispatcher.keepScrollPosition(function () {\r\n\t\t\tactiveNode.focus(true);\r\n\t\t});\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\tvar container = scheduler.$container;\r\n\t\tscheduler.eventRemove(document, \"keydown\", keyDownHandler);\r\n\t\tscheduler.eventRemove(container, \"mousedown\", mousedownHandler);\r\n\t\tscheduler.eventRemove(container, \"focus\", focusHandler);\r\n\r\n\r\n\t\tif(scheduler.config.key_nav){\r\n\r\n\t\t\tscheduler.event(document, \"keydown\", keyDownHandler);\r\n\t\t\tscheduler.event(container, \"mousedown\", mousedownHandler);\r\n\t\t\tscheduler.event(container, \"focus\", focusHandler);\r\n\r\n\t\t\tcontainer.setAttribute(\"tabindex\", \"0\");\r\n\r\n\t\t}else{\r\n\t\t\tcontainer.removeAttribute(\"tabindex\");\r\n\t\t}\r\n\t});\r\n\r\n\tfunction mousedownHandler(e){\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\r\n\t\tconst view = scheduler.getView();\r\n\t\tlet dataAreaClick = false;\r\n\t\tif (scheduler.getState().mode === \"month\") {\r\n\t\t\tdataAreaClick = scheduler.$keyboardNavigation.isChildOf(e.target || e.srcElement, scheduler.$container.querySelector(\".dhx_cal_month_table\"));\r\n\t\t} else if (view && view.layout === \"timeline\") {\r\n\t\t\tdataAreaClick = scheduler.$keyboardNavigation.isChildOf(e.target || e.srcElement, scheduler.$container.querySelector(\".dhx_timeline_data_col\"));\r\n\t\t} else {\r\n\t\t\tconst listOfScales = scheduler.$container.querySelectorAll(\".dhx_scale_holder\");\r\n\t\t\tconst arrOfScales = Array.from(listOfScales);\r\n\t\t\tdataAreaClick = arrOfScales.some(scale => scale === e.target.parentNode);\r\n\t\t}\r\n\r\n\t\tvar pos = scheduler.getActionData(e);\r\n\r\n\t\tvar focusNode;\r\n\t\tif(scheduler._locate_event(e.target || e.srcElement)){\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.Event(scheduler._locate_event(e.target || e.srcElement));\r\n\t\t}else if(dataAreaClick){\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(pos.date && dataAreaClick){\r\n\t\t\t\tfocusNode = focusNode.nextSlot(new scheduler.$keyboardNavigation.TimeSlot(pos.date, null, pos.section));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(focusNode) {\r\n\t\t\tif (!dispatcher.isEnabled()) {\r\n\t\t\t\tdispatcher.activeNode = focusNode;\r\n\r\n\t\t\t} else {\r\n\t\t\t\tif (pos.date && dataAreaClick) {\r\n\t\t\t\t\tdispatcher.delay(function () {\r\n\t\t\t\t\t\tdispatcher.setActiveNode(focusNode);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction focusEvent(evNode){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\t\tif(!dispatcher.isEnabled()) return;\r\n\r\n\r\n\t\tvar prevState = evNode;\r\n\t\tvar focusNode = new scheduler.$keyboardNavigation.Event(prevState.eventId);\r\n\t\tif(!focusNode.isValid()){\r\n\t\t\tvar lastStart = focusNode.start || prevState.start;\r\n\t\t\tvar lastEnd = focusNode.end || prevState.end;\r\n\t\t\tvar lastSection = focusNode.section || prevState.section;\r\n\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot(lastStart, lastEnd, lastSection);\r\n\t\t\tif(!focusNode.isValid()){\r\n\t\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdispatcher.setActiveNode(focusNode);\r\n\t\tvar node = dispatcher.getActiveNode();\r\n\t\tif(node && node.getNode && document.activeElement != node.getNode()){\r\n\t\t\tdispatcher.focusNode(dispatcher.getActiveNode());\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tvar updateEvent = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id){\r\n\t\tvar res = updateEvent.apply(this, arguments);\r\n\t\tif(scheduler.config.key_nav && dispatcher.isEnabled()){\r\n\t\t\tif(scheduler.getState().select_id == id){\r\n\t\t\t\tvar element = new scheduler.$keyboardNavigation.Event(id);\r\n\r\n\t\t\t\tif(!scheduler.getState().lightbox_id){\r\n\t\t\t\t\tfocusEvent(element);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onEventDeleted\", function(id) {\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\t\tif(dispatcher.isEnabled()){\r\n\t\t\tvar activeNode = dispatcher.getActiveNode();\r\n\t\t\tif(activeNode.eventId == id){\r\n\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onClearAll\", function(){\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\t\tif(dispatcher.isEnabled()){\r\n\t\t\tif(dispatcher.getActiveNode() instanceof scheduler.$keyboardNavigation.Event){\r\n\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation._minicalendars = [];\r\n\r\nscheduler.$keyboardNavigation.isMinical = function(node){\r\n\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\tif(this.isChildOf(node, minicalendars[i]))\r\n\t\t\treturn true;\r\n\t}\r\n\treturn false;\r\n};\r\n\r\nscheduler.$keyboardNavigation.isChildOf = function(child, parent){\r\n\twhile(child && child !== parent){\r\n\t\tchild = child.parentNode;\r\n\t}\r\n\r\n\treturn !!(child === parent);\r\n};\r\n\r\nscheduler.$keyboardNavigation.patchMinicalendar = function(){\r\n\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\tfunction focusMinical(e){\r\n\t\tvar target = e.target;\r\n\r\n\t\tdispatcher.enable();\r\n\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.MinicalButton(target, 0));\r\n\t}\r\n\r\n\tfunction minicalClick(e){\r\n\t\tvar target = e.target || e.srcElement;\r\n\r\n\t\tvar prev = scheduler.utils.dom.locateCss(e, \"dhx_cal_prev_button\", false);\r\n\t\tvar next = scheduler.utils.dom.locateCss(e, \"dhx_cal_next_button\", false);\r\n\t\tvar cell = scheduler.utils.dom.locateCss(e, \"dhx_year_body\", false);\r\n\r\n\t\tvar rowIndex = 0;\r\n\t\tvar cellIndex = 0;\r\n\t\tif(cell){\r\n\t\t\tvar tr;\r\n\t\t\tvar td;\r\n\t\t\tvar current = target;\r\n\t\t\twhile(current && current.tagName.toLowerCase() != \"td\"){\r\n\t\t\t\tcurrent = current.parentNode;\r\n\t\t\t}\r\n\t\t\tif(current){\r\n\t\t\t\ttd = current;\r\n\t\t\t\ttr = td.parentNode;\r\n\t\t\t}\r\n\r\n\t\t\tif(tr && td){\r\n\t\t\t\tvar rows = tr.parentNode.querySelectorAll(\"tr\");\r\n\t\t\t\tfor(var i = 0; i < rows.length; i++){\r\n\t\t\t\t\tif(rows[i] == tr){\r\n\t\t\t\t\t\trowIndex = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tvar cells = tr.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\t\t\tif(cells[i] == td){\r\n\t\t\t\t\t\tcellIndex = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar root = e.currentTarget;\r\n\t\tdispatcher.delay(function(){\r\n\t\t\tif(prev || next || cell){\r\n\r\n\t\t\t\tvar element;\r\n\t\t\t\tif(prev){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalButton(root, 0);\r\n\t\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.MinicalButton(root, 0));\r\n\t\t\t\t}else if(next){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalButton(root, 1);\r\n\t\t\t\t}else if(cell){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalCell(root, rowIndex, cellIndex);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(element){\r\n\r\n\t\t\t\t\tdispatcher.enable();\r\n\t\t\t\t\tif(element.isValid()){\r\n\t\t\t\t\t\tdispatcher.activeNode = null;\r\n\t\t\t\t\t\tdispatcher.setActiveNode(element);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t}\r\n\r\n\tif(scheduler.renderCalendar){\r\n\t\tvar renderMinical = scheduler.renderCalendar;\r\n\t\tscheduler.renderCalendar = function(){\r\n\t\t\tvar cal = renderMinical.apply(this, arguments);\r\n\t\t\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\r\n\t\t\tscheduler.eventRemove(cal, \"click\", minicalClick);\r\n\t\t\tscheduler.event(cal, \"click\", minicalClick);\r\n\r\n\t\t\tscheduler.eventRemove(cal, \"focus\", focusMinical);\r\n\t\t\tscheduler.event(cal, \"focus\", focusMinical);\r\n\r\n\t\t\tvar added = false;\r\n\t\t\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\t\t\tif(minicalendars[i] == cal){\r\n\t\t\t\t\tadded = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(!added)\r\n\t\t\t\tminicalendars.push(cal);\r\n\r\n\t\t\tif(dispatcher.isEnabled()){\r\n\t\t\t\tvar node = dispatcher.getActiveNode();\r\n\t\t\t\tif(node && node.container == cal){\r\n\t\t\t\t\tdispatcher.focusNode(node);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcal.setAttribute(\"tabindex\", \"0\");\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tcal.setAttribute(\"tabindex\", \"0\");\r\n\t\t\t}\r\n\t\t\treturn cal;\r\n\t\t};\r\n\t}\r\n\r\n\tif(scheduler.destroyCalendar){\r\n\t\tvar destroyMinical = scheduler.destroyCalendar;\r\n\t\tscheduler.destroyCalendar = function(cal, force){\r\n\t\t\tcal = cal || (scheduler._def_count ? scheduler._def_count.firstChild : null);\r\n\t\t\tvar res = destroyMinical.apply(this, arguments);\r\n\r\n\t\t\tif(!cal || !cal.parentNode){\r\n\t\t\t\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\t\t\t\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\t\t\t\tif(minicalendars[i] == cal){\r\n\t\t\t\t\t\tscheduler.eventRemove(minicalendars[i], \"focus\", focusMinical);\r\n\t\t\t\t\t\tminicalendars.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn res;\r\n\t\t};\r\n\t}\r\n};\r\n\r\n}","import keyboard_shortcuts from \"./keyboard_navigation/common/keyboard_shortcuts\";\r\nimport eventhandler from \"./keyboard_navigation/common/eventhandler\";\r\nimport trap_modal_focus from \"./keyboard_navigation/common/trap_modal_focus\";\r\nimport marker from \"./keyboard_navigation/marker\";\r\nimport scheduler_node from \"./keyboard_navigation/elements/scheduler_node\";\r\nimport nav_node from \"./keyboard_navigation/elements/nav_node\";\r\nimport header_cell from \"./keyboard_navigation/elements/header_cell\";\r\nimport event from \"./keyboard_navigation/elements/event\";\r\nimport time_slot from \"./keyboard_navigation/elements/time_slot\";\r\nimport minical_button from \"./keyboard_navigation/elements/minical_button\";\r\nimport minical_cell from \"./keyboard_navigation/elements/minical_cell\";\r\nimport data_area from \"./keyboard_navigation/elements/data_area\";\r\nimport modals from \"./keyboard_navigation/modals\";\r\nimport core from \"./keyboard_navigation/core\";\r\nimport key_nav_legacy from \"./keyboard_navigation/key_nav_legacy\";\r\n\r\n\r\nimport scheduler_handlers from \"./keyboard_navigation/scheduler_handlers\";\r\nimport minical_handlers from \"./keyboard_navigation/minical_handlers\";\r\n\r\nexport default function(scheduler){\r\n\t\tscheduler.config.key_nav = true;\r\n\t\tscheduler.config.key_nav_step = 30;\r\n\t\tscheduler.addShortcut = function(shortcut, handler, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tscopeObject.prototype.bind(shortcut, handler);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.getShortcutHandler = function(shortcut, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tvar commands = scheduler.$keyboardNavigation.shortcuts.parse(shortcut);\r\n\t\t\t\tif(commands.length){\r\n\t\t\t\t\treturn scopeObject.prototype.findHandler(commands[0]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.removeShortcut = function(shortcut, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tscopeObject.prototype.unbind(shortcut);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.focus = function(){\r\n\t\t\tif(!scheduler.config.key_nav){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar disp = scheduler.$keyboardNavigation.dispatcher;\r\n\t\t\tdisp.enable();\r\n\t\t\tvar activeNode = disp.getActiveNode();\r\n\t\t\tif(!activeNode || activeNode instanceof scheduler.$keyboardNavigation.MinicalButton || activeNode instanceof scheduler.$keyboardNavigation.MinicalCell){\r\n\t\t\t\tdisp.setDefaultNode();\r\n\t\t\t}else{\r\n\t\t\t\tdisp.focusNode(disp.getActiveNode());\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfunction getScope(mode){\r\n\t\t\tvar scopes = {\r\n\t\t\t\t\"minicalButton\":scheduler.$keyboardNavigation.MinicalButton,\r\n\t\t\t\t\"minicalDate\":scheduler.$keyboardNavigation.MinicalCell,\r\n\t\t\t\t\"scheduler\":scheduler.$keyboardNavigation.SchedulerNode,\r\n\t\t\t\t\"dataArea\": scheduler.$keyboardNavigation.DataArea,\r\n\t\t\t\t\"timeSlot\": scheduler.$keyboardNavigation.TimeSlot,\r\n\t\t\t\t\"event\": scheduler.$keyboardNavigation.Event\r\n\t\t\t};\r\n\r\n\t\t\tvar searchMap = {};\r\n\t\t\tfor(var i in scopes)\r\n\t\t\t\tsearchMap[i.toLowerCase()] = scopes[i];\r\n\r\n\t\t\tmode = (mode + \"\").toLowerCase();\r\n\r\n\t\t\treturn searchMap[mode] || scopes.scheduler;\r\n\t\t}\r\n\r\n\t\tscheduler.$keyboardNavigation = {};\r\n\r\n\t\tscheduler._compose = function(){\r\n\t\t\tvar parts = Array.prototype.slice.call(arguments, 0);\r\n\t\t\tvar res = {};\r\n\t\t\tfor(var i = 0; i < parts.length; i++){\r\n\t\t\t\tvar obj = parts[i];\r\n\t\t\t\tif(typeof obj == \"function\"){\r\n\t\t\t\t\tobj = new obj();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor(var p in obj){\r\n\t\t\t\t\tres[p] = obj[p];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\t\t};\r\n\r\n\t\tkeyboard_shortcuts(scheduler);\r\n\t\teventhandler(scheduler);\r\n\t\ttrap_modal_focus(scheduler);\r\n\t\tmarker(scheduler);\r\n\t\tscheduler_node(scheduler);\r\n\t\tnav_node(scheduler);\r\n\t\theader_cell(scheduler);\r\n\t\tevent(scheduler);\r\n\t\ttime_slot(scheduler);\r\n\t\tminical_button(scheduler);\r\n\t\tminical_cell(scheduler);\r\n\t\tdata_area(scheduler);\r\n\t\tmodals(scheduler);\r\n\t\tcore(scheduler);\r\n\t\tkey_nav_legacy(scheduler);\r\n\r\n\t\t(function(){\r\n\t\t\tscheduler_handlers(scheduler);\r\n\t\t\tminical_handlers(scheduler);\r\n\r\n\t\t\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\t\t\tscheduler.$keyboardNavigation.attachSchedulerHandlers();\r\n\r\n\t\t\tif(scheduler.renderCalendar){\r\n\t\t\t\t// if minical ext loaded before key nav ext - patch it now\r\n\t\t\t\tscheduler.$keyboardNavigation.patchMinicalendar();\r\n\t\t\t}else{\r\n\t\t\t\t// otherwise - wait until everything is loaded and try again\r\n\t\t\t\tvar attachOnce = scheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\t\t\t\tscheduler.detachEvent(attachOnce);\r\n\t\t\t\t\tscheduler.$keyboardNavigation.patchMinicalendar();\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\tfunction isSchedulerSelected(){\r\n\t\t\t\tif(!scheduler.config.key_nav) return;\r\n\r\n\t\t\t\tvar enable;\r\n\t\t\t\tvar focusElement = document.activeElement;\r\n\t\t\t\t// halt key nav when focus is outside scheduler or in quick info popup\r\n\t\t\t\tif(!focusElement || scheduler.utils.dom.locateCss(focusElement, \"dhx_cal_quick_info\", false)){\r\n\t\t\t\t\tenable = false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tenable = scheduler.$keyboardNavigation.isChildOf(focusElement, scheduler.$container) || scheduler.$keyboardNavigation.isMinical(focusElement);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn enable;\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\tfunction changeState(enable){\r\n\t\t\t\tif(enable && !dispatcher.isEnabled()){\r\n\t\t\t\t\tdispatcher.enable();\r\n\t\t\t\t}else if(!enable && dispatcher.isEnabled()){\r\n\t\t\t\t\tdispatcher.disable();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tconst intervalId = setInterval(function(){\r\n\t\t\t\tif(!scheduler.$container || !scheduler.$keyboardNavigation.isChildOf(scheduler.$container, document.body)){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar enable = isSchedulerSelected();\r\n\r\n\t\t\t\tif(enable){\r\n\t\t\t\t\tchangeState(enable);\r\n\t\t\t\t}else if(!enable && dispatcher.isEnabled()){\r\n\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// doublecheck in case checking is done in handler before focus element is repainted\r\n\t\t\t\t\t\tif(scheduler.config.key_nav){\r\n\t\t\t\t\t\t\tchangeState(isSchedulerSelected());\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tscheduler.$container.removeAttribute(\"tabindex\");\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}, 100);\r\n\t\t\t\t}\r\n\t\t\t}, 500);\r\n\t\t\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\t\t\tclearInterval(intervalId);\r\n\t\t\t});\r\n\t\t})();\r\n\t}\r\n\r\n\r\n","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\r\n\tthis.layers.sort(function(a, b){\r\n\t\treturn a.zIndex - b.zIndex;\r\n\t});\r\n\r\n\tscheduler._dp_init=function(dp){\r\n\t\tdp._methods=[\"_set_event_text_style\",\"\",\"changeEventId\",\"deleteEvent\"];\r\n\r\n\t\tthis.attachEvent(\"onEventAdded\",function(id){\r\n\t\t\tif (!this._loading && this.validId(id) && this.getEvent(id) && this.getEvent(id).layer == dp.layer)\r\n\t\t\t\tdp.setUpdated(id,true,\"inserted\");\r\n\t\t});\r\n\t\tthis.attachEvent(\"onBeforeEventDelete\",function(id){\r\n\t\t\tif(this.getEvent(id) && this.getEvent(id).layer == dp.layer) {\r\n\t\t\t\tif (!this.validId(id)) return;\r\n\t\t\t\tvar z=dp.getState(id);\r\n\r\n\t\t\t\tif (z==\"inserted\" || this._new_event) { dp.setUpdated(id,false);\t\treturn true; }\r\n\t\t\t\tif (z==\"deleted\") return false;\r\n\t\t\t\tif (z==\"true_deleted\") return true;\r\n\r\n\t\t\t\tdp.setUpdated(id,true,\"deleted\");\r\n\t\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\telse return true;\r\n\t\t});\r\n\t\tthis.attachEvent(\"onEventChanged\",function(id){\r\n\t\t\tif (!this._loading && this.validId(id) && this.getEvent(id) && this.getEvent(id).layer == dp.layer)\r\n\t\t\t\tdp.setUpdated(id,true,\"updated\");\r\n\t\t});\r\n\r\n\t\tdp._getRowData=function(id,pref){\r\n\t\t\tvar ev=this.obj.getEvent(id);\r\n\t\t\tvar data = {};\r\n\r\n\t\t\tfor (var a in ev){\r\n\t\t\t\tif (a.indexOf(\"_\")===0) continue;\r\n\t\t\t\tif (ev[a] && ev[a].getUTCFullYear) //not very good, but will work\r\n\t\t\t\t\tdata[a] = this.obj._helpers.formatDate(ev[a]);\r\n\t\t\t\telse\r\n\t\t\t\t\tdata[a] = ev[a];\r\n\t\t\t}\r\n\t\t\treturn data;\r\n\t\t};\r\n\t\tdp._clearUpdateFlag=function(){};\r\n\r\n\t\tdp.attachEvent(\"insertCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"updateCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"deleteCallback\", function(upd, id) {\r\n\t\t\tthis.obj.setUserData(id, this.action_param, \"true_deleted\");\r\n\t\t\tthis.obj.deleteEvent(id);\r\n\t\t});\r\n\t};\r\n\r\n\t(function() {\r\n var _cloneObj = function(obj){\r\n if(obj === null || typeof(obj) != 'object')\r\n return obj;\r\n var temp = new obj.constructor();\r\n for(var key in obj)\r\n temp[key] = _cloneObj(obj[key]);\r\n return temp;\r\n };\r\n\r\n\t\tscheduler._dataprocessors = [];\r\n\t\tscheduler._layers_zindex = {};\r\n\t\tfor(var i=0; i= scheduler.config.collision_limit);\r\n\t});\r\n\r\n\tscheduler.addEvent=function(start_date,end_date,text,id,extra_data){\r\n\t\tvar ev=start_date;\r\n\t\tif (arguments.length!=1){\r\n\t\t\tev=extra_data||{};\r\n\t\t\tev.start_date=start_date;\r\n\t\t\tev.end_date=end_date;\r\n\t\t\tev.text=text;\r\n\t\t\tev.id=id;\r\n\t\t\tev.layer = this.defaultLayer;\r\n\t\t}\r\n\t\tev.id = ev.id||scheduler.uid();\r\n\t\tev.text = ev.text||\"\";\r\n\r\n\r\n\t\tif (typeof ev.start_date == \"string\") ev.start_date=this.templates.api_date(ev.start_date);\r\n\t\tif (typeof ev.end_date == \"string\") ev.end_date=this.templates.api_date(ev.end_date);\r\n\t\tev._timed=this.isOneDayEvent(ev);\r\n\r\n\t\tvar is_new=!this._events[ev.id];\r\n\t\tthis._events[ev.id]=ev;\r\n\t\tthis.event_updated(ev);\r\n\t\tif (!this._loading)\r\n\t\t\tthis.callEvent(is_new?\"onEventAdded\":\"onEventChanged\",[ev.id,ev]);\r\n\t};\r\n\r\n\tthis._evs_layer = {};\r\n\tfor (var i = 0; i < this.layers.length; i++) { // array in object for each layer\r\n\t\tthis._evs_layer[this.layers[i].name] = [];\r\n\t}\r\n\r\n\tscheduler.addEventNow=function(start,end,e){\r\n\t\tvar base = {};\r\n\t\tif (typeof start == \"object\"){\r\n\t\t\tbase = start;\r\n\t\t\tstart = null;\r\n\t\t}\r\n\r\n\t\tvar d = (this.config.event_duration||this.config.time_step)*60000;\r\n\t\tif (!start) start = Math.round((scheduler._currentDate()).valueOf()/d)*d;\r\n\t\tvar start_date = new Date(start);\r\n\t\tif (!end){\r\n\t\t\tvar start_hour = this.config.first_hour;\r\n\t\t\tif (start_hour > start_date.getHours()){\r\n\t\t\t\tstart_date.setHours(start_hour);\r\n\t\t\t\tstart = start_date.valueOf();\r\n\t\t\t}\r\n\t\t\tend = start+d;\r\n\t\t}\r\n\r\n\r\n\t\tbase.start_date = base.start_date||start_date;\r\n\t\tbase.end_date = base.end_date||new Date(end);\r\n\t\tbase.text = base.text||this.locale.labels.new_event;\r\n\t\tbase.id = this._drag_id = this.uid();\r\n\t\tbase.layer = this.defaultLayer;\r\n\t\tthis._drag_mode=\"new-size\";\r\n\r\n\t\tthis._loading=true;\r\n\t\tthis.addEvent(base);\r\n\t\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\t\tthis._loading=false;\r\n\r\n\t\tthis._drag_event={}; //dummy , to trigger correct event updating logic\r\n\t\tthis._on_mouse_up(e);\r\n\t};\r\n\r\n\tscheduler._t_render_view_data = function(events) { // helper\r\n\t\tif (this.config.multi_day && !this._table_view) {\r\n\t\t\tvar tvs = [];\r\n\t\t\tvar tvd = [];\r\n\t\t\tfor (var k = 0; k < events.length; k++) {\r\n\t\t\t\tif (events[k]._timed)\r\n\t\t\t\t\ttvs.push(events[k]);\r\n\t\t\t\telse\r\n\t\t\t\t\ttvd.push(events[k]);\r\n\t\t\t}\r\n\t\t\tthis._table_view = true;\r\n\t\t\tthis.render_data(tvd);\r\n\t\t\tthis._table_view = false;\r\n\t\t\tthis.render_data(tvs);\r\n\t\t}\r\n\t\telse\r\n\t\t\tthis.render_data(events);\r\n\t};\r\n\r\n\tscheduler.render_view_data = function(){\r\n\t\tif (this._not_render) {\r\n\t\t\tthis._render_wait = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._render_wait = false;\r\n\r\n\t\tthis.clear_view();\r\n\r\n\t\tthis._evs_layer = {};\r\n\t\tfor (var i = 0; i < this.layers.length; i++) { // array in object for each layer\r\n\t\t\tthis._evs_layer[this.layers[i].name] = [];\r\n\t\t}\r\n\r\n\t\tvar evs = this.get_visible_events();\r\n\t\tfor (var i = 0; i < evs.length; i++) { // filling layer arrays with events\r\n\t\t\tif(this._evs_layer[evs[i].layer])\r\n\t\t\t\tthis._evs_layer[evs[i].layer].push(evs[i]);\r\n\t\t}\r\n\r\n\t\tif(this._mode == 'month') { // old logic is used\r\n\t\t\tvar tevs = [];\r\n\t\t\tfor (var i = 0; i < this.layers.length; i++) {\r\n\t\t\t\tif (this.layers[i].visible)\r\n\t\t\t\t\ttevs = tevs.concat(this._evs_layer[this.layers[i].name]);\r\n\t\t\t}\r\n\t\t\tthis._t_render_view_data(tevs);\r\n\t\t}\r\n\t\telse { // week, day; should use new logic\r\n\t\t\tfor (var i = 0; i < this.layers.length; i++) {\r\n\t\t\t\tif (this.layers[i].visible) {\r\n\t\t\t\t\tvar evs_layer = this._evs_layer[this.layers[i].name];\r\n\t\t\t\t\tthis._t_render_view_data(evs_layer);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._render_v_bar=function(ev,x,y,w,h,style,contentA,contentB,bottom){\r\n\t\tvar id = ev.id;\r\n\r\n\t\tif(contentA.indexOf('
';\r\n\t\thtml+='
 
';\r\n\t\thtml+='
'+contentA+'
';\r\n\t\thtml+='
'+contentB+'
';\r\n\t\thtml+='
';\r\n\r\n\t\td.innerHTML=html;\r\n\t\td.style.zIndex = 100;\r\n\t\treturn d.firstChild;\r\n\t};\r\n\r\n\tscheduler.render_event_bar=function(ev){\r\n\t\tvar parent=this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tvar x=this._colsS[ev._sday];\r\n\t\tvar x2=this._colsS[ev._eday];\r\n\t\tif (x2==x) x2=this._colsS[ev._eday+1];\r\n\t\tvar hb = this.xy.bar_height;\r\n\r\n\t\tvar y=this._colsS.heights[ev._sweek]+(this._colsS.height?(this.xy.month_scale_height+2):2)+ev._sorder*hb;\r\n\r\n\t\tvar d=document.createElement(\"div\");\r\n\t\tvar cs = ev._timed?\"dhx_cal_event_clear\":\"dhx_cal_event_line\";\r\n\t\tvar cse = (scheduler.templates['event_class_'+ev.layer])?scheduler.templates['event_class_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_class(ev.start_date,ev.end_date,ev);\r\n\t\tif (cse) cs=cs+\" \"+cse;\r\n\r\n\t\tvar html='
';\r\n\r\n\t\tif (ev._timed)\r\n\t\t\thtml+=(scheduler.templates['event_bar_date_'+ev.layer])?scheduler.templates['event_bar_date_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_bar_date(ev.start_date,ev.end_date,ev);\r\n\t\thtml+=( (scheduler.templates['event_bar_text_'+ev.layer])?scheduler.templates['event_bar_text_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_bar_text(ev.start_date,ev.end_date,ev) + '
)');\r\n\t\thtml+='
';\r\n\r\n\t\td.innerHTML=html;\r\n\r\n\t\tthis._rendered.push(d.firstChild);\r\n\t\tparent.appendChild(d.firstChild);\r\n\t};\r\n\r\n\tscheduler.render_event=function(ev){\r\n\t\tvar menu = scheduler.xy.menu_width;\r\n\t\tif(scheduler.getLayer(ev.layer).noMenu)\r\n\t\t\tmenu = 0;\r\n\r\n\t\tif (ev._sday<0) return; //can occur in case of recurring event during time shift\r\n\t\tvar parent=scheduler.locate_holder(ev._sday);\r\n\t\tif (!parent) return; //attempt to render non-visible event\r\n\t\tvar sm = ev.start_date.getHours()*60+ev.start_date.getMinutes();\r\n\t\tvar em = (ev.end_date.getHours()*60+ev.end_date.getMinutes())||(scheduler.config.last_hour*60);\r\n\r\n\t\tvar top = (Math.round((sm*60*1000-this.config.first_hour*60*60*1000)*this.config.hour_size_px/(60*60*1000)))%(this.config.hour_size_px*24)+1; //42px/hour\r\n\t\tvar height = Math.max(scheduler.xy.min_event_height,(em-sm)*this.config.hour_size_px/60)+1; //42px/hour\r\n\t\t\r\n\t\tvar width=Math.floor((parent.clientWidth-menu)/ev._count);\r\n\t\tvar left=ev._sorder*width+1;\r\n\t\tif (!ev._inner) width=width*(ev._count-ev._sorder);\r\n\r\n\r\n\r\n\t\tvar d=this._render_v_bar(ev.id,menu+left,top,width,height,ev._text_style,scheduler.templates.event_header(ev.start_date,ev.end_date,ev),scheduler.templates.event_text(ev.start_date,ev.end_date,ev));\r\n\r\n\t\tthis._rendered.push(d);\r\n\t\tparent.appendChild(d);\r\n\r\n\t\tleft=left+parseInt(parent.style.left,10)+menu;\r\n\r\n\t\ttop+=this._dy_shift; //corrupt top, to include possible multi-day shift\r\n\t\td.style.zIndex = this._layers_zindex[ev.layer];\r\n\r\n\t\tif (this._edit_id==ev.id){\r\n\t\t\td.style.zIndex = parseInt(d.style.zIndex)+1; //fix overlapping issue\r\n\t\t\tvar new_zIndex = d.style.zIndex;\r\n\t\t\twidth=Math.max(width-4,scheduler.xy.editor_width);\r\n\t\t\tvar d=document.createElement(\"div\");\r\n\t\t\td.setAttribute(\"event_id\",ev.id); // for backward compatibility\r\n\t\t\td.setAttribute(this.config.event_attribute,ev.id);\r\n\t\t\tthis.set_xy(d,width,height-20,left,top+14);\r\n\t\t\td.className=\"dhx_cal_editor\";\r\n\t\t\td.style.zIndex = new_zIndex;\r\n\t\t\tvar d2=document.createElement(\"div\");\r\n\t\t\tthis.set_xy(d2,width-6,height-26);\r\n\t\t\td2.style.cssText+=\";margin:2px 2px 2px 2px;overflow:hidden;\";\r\n\r\n\r\n\t\t\td2.style.zIndex = new_zIndex;\r\n\t\t\td.appendChild(d2);\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].appendChild(d);\r\n\t\t\tthis._rendered.push(d);\r\n\r\n\t\t\td2.innerHTML=\"\";\r\n\r\n\t\t\tthis._editor=d2.firstChild;\r\n\t\t\tthis._editor.addEventListener(\"keypress\", function(e){\r\n\t\t\t\tif (e.shiftKey) return true;\r\n\t\t\t\tvar code= e.keyCode;\r\n\t\t\t\tif (code==scheduler.keys.edit_save) scheduler.editStop(true);\r\n\t\t\t\tif (code==scheduler.keys.edit_cancel) scheduler.editStop(false);\r\n\t\t\t});\r\n\t\t\tthis._editor.addEventListener(\"selectstart\", function(e){ e.cancelBubble=true; return true; });\r\n\t\t\td2.firstChild.focus();\r\n\t\t\t//IE and opera can add x-scroll during focusing\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].scrollLeft=0;\r\n\t\t\td2.firstChild.select();\r\n\t\t}\r\n\t\tif (this._select_id==ev.id){\r\n\t\t\td.style.zIndex = parseInt(d.style.zIndex)+1; //fix overlapping issue\r\n\t\t\tvar icons=this.config[\"icons_\"+((this._edit_id==ev.id)?\"edit\":\"select\")];\r\n\t\t\tvar icons_str=\"\";\r\n\t\t\tfor (var i=0; i
\";\r\n\t\t\tvar obj = this._render_v_bar(ev.id,left-menu+1,top,menu,icons.length*20+26,\"\",\"
\",icons_str,true);\r\n\t\t\tobj.style.left=left-menu+1;\r\n\t\t\tobj.style.zIndex = d.style.zIndex;\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].appendChild(obj);\r\n\t\t\tthis._rendered.push(obj);\r\n\t\t}\r\n\r\n\t};\r\n\r\n scheduler.filter_agenda = function(id, event) {\r\n var layer = scheduler.getLayer(event.layer);\r\n return (layer && layer.visible);\r\n };\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.limit_start = null;\r\nscheduler.config.limit_end = null;\r\nscheduler.config.limit_view = false;\r\nscheduler.config.check_limits = true;\r\n\r\nscheduler._temp_limit_scope = function(){\r\n\tvar before = null;\r\n\tvar dhx_time_block = \"dhx_time_block\";\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\",function(om,od,nm,nd){\r\n\r\n\t\tfunction isBlocked(date, mode){\r\n\t\t\tvar limit_start = scheduler.config.limit_start,\r\n\t\t\t\tlimit_end = scheduler.config.limit_end,\r\n\t\t\t\tdate_end = scheduler.date.add(date,1,mode);\r\n\r\n\t\t\treturn (date.valueOf() > limit_end.valueOf() || date_end <= limit_start.valueOf());\r\n\t\t}\r\n\r\n\t\tif (scheduler.config.limit_view){\r\n\t\t\tnd = nd||od; nm = nm||om;\r\n\t\t\tif (isBlocked(nd, nm) && !(od.valueOf() == nd.valueOf())){\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar resetDate = !isBlocked(od, nm) ? od : scheduler.config.limit_start;\r\n\r\n\t\t\t\t\tscheduler.setCurrentView(!isBlocked(resetDate, nm) ? resetDate : null, nm);\r\n\t\t\t\t},1);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onMouseDown\", function(classname) {\r\n\t\treturn !(classname == dhx_time_block);\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeDrag\",function(id){\r\n\t\tif (!id) return true;\r\n\t\treturn scheduler.checkLimitViolation(scheduler.getEvent(id));\r\n\t});\r\n\tscheduler.attachEvent(\"onClick\", function (event_id, native_event_object){\r\n\t\treturn scheduler.checkLimitViolation(scheduler.getEvent(event_id));\r\n });\r\n\tscheduler.attachEvent(\"onBeforeLightbox\",function(id){\r\n\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tbefore = [ev.start_date, ev.end_date];\r\n\t\treturn scheduler.checkLimitViolation(ev);\r\n\t});\r\n\tscheduler.attachEvent(\"onEventSave\", function(id, data, is_new_event) {\r\n\r\n\t\t//lightbox may not have 'time' section\r\n\t\tif(!(data.start_date && data.end_date)){\r\n\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\tdata.start_date = new Date(ev.start_date);\r\n\t\t\tdata.end_date = new Date(ev.end_date);\r\n\t\t}\r\n\r\n\t\tif(data.rec_type){\r\n\t\t\t//_roll_back_dates modifies start_date of recurring event, need to check limits after modification\r\n\t\t\t// use a copy to keep original event unchanged\r\n\t\t\tvar data_copy = scheduler._lame_clone(data);\r\n\t\t\tscheduler._roll_back_dates(data_copy);\r\n\t\t\treturn scheduler.checkLimitViolation(data_copy);\r\n\t\t}\r\n\t\treturn scheduler.checkLimitViolation(data);\r\n\t});\r\n\tscheduler.attachEvent(\"onEventAdded\",function(id){\r\n\t\tif (!id) return true;\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif (!scheduler.checkLimitViolation(ev) && scheduler.config.limit_start && scheduler.config.limit_end) {\r\n\t\t\t//if newly created event is outside of limited time - crop it, leaving only allowed time\r\n\t\t\tif (ev.start_date < scheduler.config.limit_start) {\r\n\t\t\t\tev.start_date = new Date(scheduler.config.limit_start);\r\n\t\t\t}\r\n\t\t\tif (ev.start_date.valueOf() >= scheduler.config.limit_end.valueOf()) {\r\n\t\t\t\tev.start_date = this.date.add(scheduler.config.limit_end, -1, \"day\");\r\n\t\t\t}\r\n\t\t\tif (ev.end_date < scheduler.config.limit_start) {\r\n\t\t\t\tev.end_date = new Date(scheduler.config.limit_start);\r\n\t\t\t}\r\n\t\t\tif (ev.end_date.valueOf() >= scheduler.config.limit_end.valueOf()) {\r\n\t\t\t\tev.end_date = this.date.add(scheduler.config.limit_end, -1, \"day\");\r\n\t\t\t}\r\n\t\t\tif (ev.start_date.valueOf() >= ev.end_date.valueOf()) {\r\n\t\t\t\tev.end_date = this.date.add(ev.start_date, (this.config.event_duration||this.config.time_step), \"minute\");\r\n\t\t\t}\r\n\t\t\tev._timed=this.isOneDayEvent(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\",function(id){\r\n\t\tif (!id) return true;\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif (!scheduler.checkLimitViolation(ev)){\r\n\t\t\tif (!before) return false;\r\n\t\t\tev.start_date = before[0];\r\n\t\t\tev.end_date = before[1];\r\n\t\t\tev._timed=this.isOneDayEvent(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeEventChanged\",function(ev, native_object, is_new){\r\n\t\treturn scheduler.checkLimitViolation(ev);\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeEventCreated\", function(ev) { // native event\r\n\t\tvar start_date = scheduler.getActionData(ev).date;\r\n\t\tvar event = {\r\n\t\t\t_timed: true,\r\n\t\t\tstart_date: start_date,\r\n\t\t\tend_date: scheduler.date.add(start_date, scheduler.config.time_step, \"minute\")\r\n\t\t};\r\n\t\treturn scheduler.checkLimitViolation(event);\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", function(){\r\n\t\tscheduler._mark_now();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onAfterSchedulerResize\", function(){\r\n\t\twindow.setTimeout(function(){ \r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler._mark_now(); \r\n\t\t}, 1);\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\t\tscheduler._mark_now_timer = window.setInterval(function() {\r\n\t\t\tif(!scheduler._is_initialized())\r\n\t\t\t\treturn;\r\n\t\t\tscheduler._mark_now();\r\n\t\t}, 60000);\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tclearInterval(scheduler._mark_now_timer);\r\n\t});\r\n\r\n};\r\nscheduler._temp_limit_scope();\r\n\r\n\r\n}","import { IMapAdapter, ICalendarEvent, IMapSettings, IMapPosition} from \"./types\";\r\ndeclare let google: any;\r\n\r\nexport class GoogleMapAdapter implements IMapAdapter {\r\n\tprivate map: any;\r\n\tprivate scheduler: any;\r\n\tprivate settings: IMapSettings;\r\n\tprivate _markers: any[];\r\n\tprivate infoWindow: any;\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.map = null;\r\n\t\tthis._markers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t}\r\n\tonEventClick(event: ICalendarEvent): void {\r\n\t\tif (this._markers && this._markers.length > 0) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\t\tif (event.id == this._markers[i].event.id) {\r\n\t\t\t\t\tlet zoom = this.settings.zoom_after_resolve || this.settings.initial_zoom;\r\n\t\t\t\t\tif (event.lat && event.lng){\r\n\t\t\t\t\t\tthis.map.setCenter({\r\n\t\t\t\t\t\t\tlat: event.lat, \r\n\t\t\t\t\t\t\tlng: event.lng,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tthis.map.setZoom(zoom);\r\n\t\t\t\t\t} else {\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.map.setCenter({\r\n\t\t\t\t\t\t\tlat: this.settings.error_position.lat, \r\n\t\t\t\t\t\t\tlng: this.settings.error_position.lng,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tthis.map.setZoom(zoom);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tgoogle.maps.event.trigger(this._markers[i].marker, 'click');\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t} \r\n\t}\r\n\r\n\tinitialize(container: HTMLElement, options: IMapSettings): void {\r\n\t\tthis.settings = options;\r\n\t\tlet scheduler = this.scheduler;\r\n\t\tlet mapOptions = {\r\n\t\t\tcenter: { lat: options.initial_position.lat, lng: options.initial_position.lng },\r\n\t\t\tzoom: options.initial_zoom,\r\n\t\t\tmapId: container.id,\r\n\t\t\tscrollwheel: true,\r\n\t\t\tmapTypeId: options.type\r\n\t\t}\r\n\t\t// we need to reuse the google map to avoid leak memory\r\n\t\tif (this.map === null) {\r\n\t\t\tthis.map = new google.maps.Map(container, mapOptions);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tlet map = this.map;\r\n\t\t\tcontainer.appendChild(this.map.__gm.messageOverlay);\r\n\t\t\tcontainer.appendChild(this.map.__gm.outerContainer);\r\n\t\t\tsetTimeout(function() {\r\n\t\t\t\tmap.setOptions({container: container.id});\r\n\t\t\t}, 500);\r\n\t\t}\r\n\t\tgoogle.maps.event.addListener(this.map, \"dblclick\", function(event) {\r\n\t\t\tconst geocoder = new google.maps.Geocoder();\r\n\t\r\n\t\t\tif (!scheduler.config.readonly && scheduler.config.dblclick_create) {\r\n\t\t\t\tlet point = event.latLng;\r\n\t\t\t\tgeocoder.geocode(\r\n\t\t\t\t\t{ 'latLng': point },\r\n\t\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\t\tif (status == google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\t\tpoint = results[0].geometry.location;\r\n\t\t\t\t\t\t\tscheduler.addEventNow({\r\n\t\t\t\t\t\t\t\tlat: point.lat(),\r\n\t\t\t\t\t\t\t\tlng: point.lng(),\r\n\t\t\t\t\t\t\t\tevent_location: results[0].formatted_address,\r\n\t\t\t\t\t\t\t\tstart_date: scheduler.getState().date,\r\n\t\t\t\t\t\t\t\tend_date: scheduler.date.add(scheduler.getState().date, scheduler.config.time_step, \"minute\")\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tconsole.error('Geocode was not successful for the following reason: ' + status);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tdestroy(container: HTMLElement): void {\r\n\t\tgoogle.maps.event.clearInstanceListeners(window);\r\n\t\tgoogle.maps.event.clearInstanceListeners(document);\r\n\t\tgoogle.maps.event.clearInstanceListeners(container);\r\n\t\twhile (container.firstChild) {\r\n\t\t\tcontainer.firstChild.remove();\r\n\t\t}\r\n\t\tcontainer.innerHTML = \"\";\r\n\t}\r\n\r\n\tasync addEventMarker(event: ICalendarEvent): Promise {\r\n\t\tlet config = {\r\n\t\t\ttitle: event.text,\r\n\t\t\tposition: {},\r\n\t\t\tmap: {}\r\n\t\t}\r\n\t\t\r\n\t\tif (event.lat && event.lng) {\r\n\t\t\tconfig.position = { lat: event.lat, lng: event.lng };\r\n\t\t} else {\r\n\t\t\tconfig.position = { lat: this.settings.error_position.lat, lng: this.settings.error_position.lng }\r\n\t\t}\r\n\t\tconst { AdvancedMarkerElement } = await google.maps.importLibrary(\"marker\");\r\n\t\tlet marker;\r\n\t\tif (this.scheduler.ext.mapView.createMarker) {\r\n\t\t\tconfig.map = this.map;\r\n\t\t\tmarker = this.scheduler.ext.mapView.createMarker(config);\r\n\t\t} else {\r\n\t\t\tmarker = new AdvancedMarkerElement(config);\r\n\t\t\tmarker.map = this.map;\r\n\t\t}\r\n\t\tmarker.setMap(this.map);\r\n\t\t//case for markeks which were deleted with DataProcessor\r\n\t\tif (event[\"!nativeeditor_status\"] == \"true_deleted\"){\r\n\t\t\tmarker.setMap(null);\r\n\t\t}\r\n\t\tgoogle.maps.event.addListener(marker, \"click\", () => {\r\n\t\t\tif (this.infoWindow) {\r\n\t\t\t\tthis.infoWindow.close();\r\n\t\t\t}\r\n\t\t\tthis.infoWindow = new google.maps.InfoWindow({maxWidth: this.settings.info_window_max_width});\r\n\t\t\tthis.infoWindow.setContent(this.scheduler.templates.map_info_content(event));\r\n\t\t\tthis.infoWindow.open({\r\n\t\t\t\tanchor: marker,\r\n\t\t\t\tmap: this.map,\r\n\t\t\t});\r\n\t\t});\r\n\t\tlet markerInfo = {event, ...config, marker};\r\n\t\tthis._markers.push(markerInfo);\r\n\t}\r\n\r\n\tremoveEventMarker(eventId: string): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif (eventId == this._markers[i].event.id) {\r\n\t\t\t\tthis._markers[i].marker.setVisible(false);\r\n\t\t\t\tthis._markers[i].marker.setMap(null);\r\n\t\t\t\tthis._markers[i].marker.setPosition(null);\r\n\t\t\t\tthis._markers[i].marker = null;\r\n\t\t\t\tthis._markers.splice(i,1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tupdateEventMarker(event: ICalendarEvent): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif(this._markers[i].event.id == event.id) {\r\n\t\t\t\tthis._markers[i].event = event;\r\n\t\t\t\tthis._markers[i].position.lat = event.lat;\r\n\t\t\t\tthis._markers[i].position.lng = event.lng;\r\n\t\t\t\tthis._markers[i].text = event.text;\r\n\t\t\t\tlet latlng = new google.maps.LatLng(event.lat, event.lng);\r\n\t\t\t\tthis._markers[i].marker.setPosition(latlng);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tclearEventMarkers(): void {\r\n\t\tif (this._markers.length > 0) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\t\tthis._markers[i].marker.setMap(null);\r\n\t\t\t}\r\n\t\t\tthis._markers = [];\r\n\t\t}\r\n\t}\r\n\r\n\tsetView(latitude: number, longitude: number, zoom: number): void {\r\n\t\tthis.map.setCenter({\r\n\t\t\tlat: latitude, \r\n\t\t\tlng: longitude,\r\n\t\t});\r\n\t\tthis.map.setZoom(zoom);\r\n\t}\r\n\r\n\tasync resolveAddress(string: string): Promise {\r\n\t\tconst geocoder = new google.maps.Geocoder();\r\n\t\tlet position: any = await new Promise((resolve) => {\r\n\t\t\tgeocoder.geocode(\r\n\t\t\t\t{ 'address': string },\r\n\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\tif (status == google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\tresolve({\r\n\t\t\t\t\t\t lat: results[0].geometry.location.lat(),\r\n\t\t\t\t\t\t lng: results[0].geometry.location.lng()\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tconsole.error('Geocode was not successful for the following reason: ' + status);\r\n\t\t\t\t\t\tresolve({});\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t});\r\n\t\treturn position;\r\n\t}\r\n\t\r\n}","import { IMapAdapter, ICalendarEvent, IMapSettings, IMapPosition} from \"./types\";\r\n\r\ndeclare let L: any\r\n\r\nexport class OpenStreetMapAdapter implements IMapAdapter {\r\n\tprivate map: any;\r\n\tprivate scheduler: any;\r\n\tprivate _markers: any[];\r\n\tprivate settings: IMapSettings;\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.map = null;\r\n\t\tthis._markers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t}\r\n\tonEventClick(event: ICalendarEvent): void {\r\n\t\tif (this._markers && this._markers.length > 0) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\t\tif (event.id == this._markers[i].event.id) {\r\n\t\t\t\t\tthis._markers[i].marker.openPopup();\r\n\t\t\t\t\tthis._markers[i].marker.closeTooltip();\r\n\t\t\t\t\tif (event.lat && event.lng) {\r\n\t\t\t\t\t\tthis.setView(event.lat, event.lng, this.settings.zoom_after_resolve || this.settings.initial_zoom);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.setView(this.settings.error_position.lat, this.settings.error_position.lng, this.settings.zoom_after_resolve || this.settings.initial_zoom);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t} \r\n\t}\r\n\r\n\tinitialize(container: HTMLElement, options: IMapSettings): void {\r\n\t\tlet scheduler = this.scheduler;\r\n\t\tlet mapWrapper = document.createElement('div');\r\n\t\tmapWrapper.className = 'mapWrapper';\r\n\t\tmapWrapper.id = 'mapWrapper';\r\n\t\tmapWrapper.style.width = container.style.width;\r\n\t\tmapWrapper.style.height = container.style.height;\r\n\t\tcontainer.appendChild(mapWrapper);\r\n\r\n\t\tlet map = L.map(mapWrapper, {\r\n\t\t\tcenter: L.latLng(options.initial_position.lat, options.initial_position.lng),\r\n\t\t\tzoom: options.initial_zoom,\r\n\t\t\tkeyboard: false // need to set false, due to bug with moving window\r\n\t\t});\r\n\t\tL.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(map);\r\n\t\tmap.on(\"dblclick\", async function(e){\r\n\t\t\tconst settings = {\r\n\t\t\t\t\"method\": \"GET\",\r\n\t\t\t\theaders: {\r\n\t\t\t\t\t\"Accept-Language\": \"en\",\r\n\t\t\t\t},\r\n\t\t\t};\r\n\t\t\tlet response = await fetch(`https://nominatim.openstreetmap.org/reverse?lat=${e.latlng.lat}&lon=${e.latlng.lng}&format=json`, settings).then(response => response.json());\r\n\t\t\tif (response.address) {\r\n\t\t\t\tlet address = response.address.country;\r\n\t\t\t\tscheduler.addEventNow({\r\n\t\t\t\t\tlat: e.latlng.lat,\r\n\t\t\t\t\tlng: e.latlng.lng,\r\n\t\t\t\t\tevent_location: address,\r\n\t\t\t\t\tstart_date: scheduler.getState().date,\r\n\t\t\t\t\tend_date: scheduler.date.add(scheduler.getState().date, scheduler.config.time_step, \"minute\")\r\n\t\t\t\t});\r\n\t\t\t} else {\r\n\t\t\t\tconsole.error(\"unable recieve a position of the event\", response.error);\r\n\t\t\t}\r\n\t\t});\r\n\t\tthis.map = map;\r\n\t\tthis.settings = options;\r\n\t}\r\n\r\n\tdestroy(container: HTMLElement): void {\r\n\t\tthis.map.remove();\r\n\t\twhile (container.firstChild) {\r\n\t\t\tcontainer.firstChild.remove();\r\n\t\t}\r\n\t\tcontainer.innerHTML = \"\";\r\n\t}\r\n\r\n\taddEventMarker(event: ICalendarEvent): void {\r\n\t\tconst myIcon = L.icon({\r\n\t\t\ticonUrl: 'https://unpkg.com/leaflet@1.0.3/dist/images/marker-icon.png',\r\n\t\t\ticonSize: [25, 41],\r\n\t\t\tshadowSize: [30, 65],\r\n\t\t\ticonAnchor: [12, 41],\r\n\t\t\tshadowAnchor: [7, 65]\r\n\t\t});\r\n\t\tlet popupConfig = {\r\n\t\t\tminWidth: 180,\r\n\t\t\tmaxWidth: this.settings.info_window_max_width,\r\n\t\t}\r\n\t\tconst markerPopup = L.popup(popupConfig).setContent(this.scheduler.templates.map_info_content(event));\r\n\t\tconst tooltip = L.tooltip().setContent(event.text);\r\n\r\n\t\tlet markerConfig = [\r\n\t\t\tevent.lat,\r\n\t\t\tevent.lng\r\n\t\t]\r\n\t\t\r\n\t\tif (!event.lat || !event.lng) {\r\n\t\t\tmarkerConfig = [this.settings.error_position.lat, this.settings.error_position.lng];\r\n\t\t}\r\n\t\tconst marker = L.marker(markerConfig, {\r\n\t\t\ticon: myIcon\r\n\t\t}).bindPopup(markerPopup).bindTooltip(tooltip).addTo(this.map);\r\n\t\tconst markerInfo = {event, marker};\r\n\t\tthis._markers.push(markerInfo);\t\t\r\n\t}\r\n\r\n\tremoveEventMarker(eventId: string): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif (eventId == this._markers[i].event.id) {\r\n\t\t\t\tthis.map.removeLayer(this._markers[i].marker);\r\n\t\t\t\tthis._markers.splice(i,1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tupdateEventMarker(event: ICalendarEvent): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif(this._markers[i].event.id == event.id) {\r\n\t\t\t\tthis._markers[i].event = event;\r\n\t\t\t\tif (!event.lat || !event.lng){\r\n\t\t\t\t\tthis._markers[i].marker.setLatLng([this.settings.error_position.lat, this.settings.error_position.lng]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis._markers[i].marker.setLatLng([event.lat, event.lng]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tclearEventMarkers(): void {\r\n\t\tif(this._markers) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\t\tthis.map.removeLayer(this._markers[i].marker); \r\n\t\t\t}\r\n\t\t\tthis._markers = [];\r\n\t\t}\r\n\t}\r\n\r\n\tsetView(latitude: number, longitude: number, zoom: number): void {\r\n\t\tthis.map.setView([latitude, longitude], zoom);\r\n\t}\r\n\r\n\tasync resolveAddress(string: string): Promise {\r\n\t\tconst settings = {\r\n\t\t\t\"method\": \"GET\",\r\n\t\t\theaders: {\r\n\t\t\t\t\"Accept-Language\": \"en\",\r\n\t\t\t},\r\n\t\t};\r\n\t\tlet position:any = {};\r\n\t\tlet response = await fetch(`https://nominatim.openstreetmap.org/search?q=${string}&format=json`, settings).then(response => response.json());\r\n\t\tif (response && response.length) {\r\n\t\t\tposition.lat = +response[0].lat;\r\n\t\t\tposition.lng = +response[0].lon;\r\n\t\t} else {\r\n\t\t\tconsole.error(`Unable recieve a position of the event's location: ${string}`);\r\n\t\t}\r\n\t\treturn position;\r\n\t}\r\n}","import { IMapAdapter, ICalendarEvent, IMapSettings, IMapPosition} from \"./types\";\r\n\r\ndeclare let mapboxgl: any;\r\ndeclare let MapboxGeocoder: any;\r\n\r\nexport class MapboxAdapter implements IMapAdapter {\r\n\tprivate map: any;\r\n\tprivate scheduler: any;\r\n\tprivate settings: IMapSettings;\r\n\tprivate _markers: any[];\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.map = null;\r\n\t\tthis._markers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t}\r\n\tonEventClick(event: ICalendarEvent): void {\r\n\t\tif (this._markers && this._markers.length > 0) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n const popup = this._markers[i].marker.getPopup();\r\n if (popup.isOpen()){\r\n popup.remove();\r\n }\r\n\t\t\t\tif (event.id == this._markers[i].event.id) {\r\n\t\t\t\t\tthis._markers[i].marker.togglePopup();\r\n\t\t\t\t\tif (event.lat && event.lng) {\r\n\t\t\t\t\t\tthis.setView(event.lat, event.lng, this.settings.zoom_after_resolve || this.settings.initial_zoom);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.setView(this.settings.error_position.lat, this.settings.error_position.lng, this.settings.zoom_after_resolve || this.settings.initial_zoom);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t} \r\n\t}\r\n\r\n\tinitialize(container: HTMLElement, options: IMapSettings): void {\r\n let scheduler = this.scheduler;\r\n\r\n\t\tmapboxgl.accessToken = options.accessToken;\r\n const map = new mapboxgl.Map({\r\n container: container, \r\n center: [options.initial_position.lng, options.initial_position.lat], \r\n zoom: options.initial_zoom + 1, // problems with coordinates if zoom = 1\r\n });\r\n map.on(\"dblclick\",async function(e){\r\n\t\t\tlet response = await fetch(`https://api.mapbox.com/geocoding/v5/mapbox.places/${e.lngLat.lng},${ e.lngLat.lat}.json?access_token=${options.accessToken}`).then(response => response.json());\r\n\t\t\tif (response.features){\r\n\t\t\t\tlet address = response.features[0].place_name;\r\n\t\t\t\tscheduler.addEventNow({\r\n\t\t\t\t\tlat: e.lngLat.lat,\r\n\t\t\t\t\tlng: e.lngLat.lng,\r\n\t\t\t\t\tevent_location: address,\r\n\t\t\t\t\tstart_date: scheduler.getState().date,\r\n\t\t\t\t\tend_date: scheduler.date.add(scheduler.getState().date, scheduler.config.time_step, \"minute\")\r\n\t\t\t\t});\r\n\t\t\t} else {\r\n\t\t\t\tconsole.error(\"unable recieve a position of the event\");\r\n\t\t\t}\r\n\t\t});\r\n this.map = map;\r\n this.settings = options;\r\n\t}\r\n\r\n\tdestroy(container: HTMLElement): void {\r\n\t\tthis.map.remove();\r\n while (container.firstChild) {\r\n\t\t\tcontainer.firstChild.remove();\r\n\t\t}\r\n container.innerHTML = \"\";\r\n\t}\r\n\r\n\taddEventMarker(event: ICalendarEvent): void {\r\n let config = [\r\n\t\t\tevent.lng,\r\n\t\t\tevent.lat\r\n\t\t]\r\n\t\t\r\n\t\tif (!event.lat || !event.lng) {\r\n\t\t\tconfig = [this.settings.error_position.lng, this.settings.error_position.lat];\r\n\t\t} \r\n\r\n\t\tconst popup = new mapboxgl.Popup({ offset: 25, focusAfterOpen: false})\r\n .setMaxWidth(`${this.settings.info_window_max_width}px`) \r\n .setHTML(this.scheduler.templates.map_info_content(event));\r\n const marker = new mapboxgl.Marker()\r\n .setLngLat(config)\r\n .setPopup(popup)\r\n .addTo(this.map);\r\n const markerInfo = {event, marker}; \r\n this._markers.push(markerInfo);\r\n\t}\r\n\r\n\tremoveEventMarker(eventId: string): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif (eventId == this._markers[i].event.id) {\r\n\t\t\t\tthis._markers[i].marker.remove();\r\n this._markers.splice(i,1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tupdateEventMarker(event: ICalendarEvent): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif(this._markers[i].event.id == event.id) {\r\n\t\t\t\tthis._markers[i].event = event;\r\n\t\t\t\tif (!event.lat || !event.lng){\r\n\t\t\t\t\tthis._markers[i].marker.setLngLat([this.settings.error_position.lng, this.settings.error_position.lat]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis._markers[i].marker.setLngLat([event.lng, event.lat]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tclearEventMarkers(): void {\r\n\t\tfor (let i = 0; i {\r\n\t\tlet response = await fetch(`https://api.mapbox.com/geocoding/v5/mapbox.places/${string}.json?access_token=${this.settings.accessToken}`).then(response => response.json());\r\n\t\tlet position:any = {};\r\n\t\tif (response && response.features.length) {\r\n\t\t\tposition.lng = response.features[0].center[0];\r\n\t\t\tposition.lat = response.features[0].center[1];\r\n\t\t} else {\r\n\t\t\tconsole.error(`Unable recieve a position of the event's location: ${string}`);\r\n\t\t}\r\n\t\treturn position;\r\n\t}\r\n}","import { GoogleMapAdapter } from \"./gMapAdapter\";\r\nimport { OpenStreetMapAdapter } from \"./osmMapAdapter\";\r\nimport { MapboxAdapter } from \"./mapboxAdapter\";\r\nimport { IMapAdapter, ICalendarEvent, IMapSettings } from \"./types\";\r\n\r\ndeclare let google: any;\r\n\r\nexport default function(scheduler: any){\r\n\t\r\nlet mapAdapter: IMapAdapter | null = null;\r\nlet eventHandlerIds: number[] = [];\r\nconst adapters: { [name:string]: IMapAdapter } = {\r\n\tgoogleMap: new GoogleMapAdapter(scheduler),\r\n\topenStreetMaps: new OpenStreetMapAdapter(scheduler),\r\n\tmapbox: new MapboxAdapter(scheduler)\r\n}\r\n\r\nif(!scheduler.ext){\r\n\tscheduler.ext = {};\r\n}\r\nscheduler.ext.mapView = {\r\n\tcreateAdapter: function():IMapAdapter{\r\n\t\treturn adapters[scheduler.config.map_view_provider];\r\n\t},\r\n\tcreateMarker: function(config){\r\n\t\treturn new google.maps.Marker(config);\r\n\t},\r\n\tcurrentAdapter: null,\r\n\tadapters\r\n};\r\nscheduler._latLngUpdate = false; // flag for updating events which don't have event.lat and event.lng\r\nscheduler._eventLocationChanged = false; // flag for checking if the location of the event is changed\r\nscheduler.config.map_view_provider = \"googleMap\";\r\nscheduler.config.map_settings = {\r\n\tinitial_position: {\r\n\t lat: 48.724,\r\n\t lng: 8.215\r\n\t},\r\n\terror_position: {\r\n\t lat: 15,\r\n\t lng: 15\r\n\t},\r\n\tinitial_zoom: 1,\r\n\tzoom_after_resolve: 15,\r\n\tinfo_window_max_width: 300,\r\n\tresolve_user_location: true,\r\n\tresolve_event_location: true,\r\n\tview_provider: \"googleMap\"\r\n}\r\nif (scheduler.config.map_initial_position) {\r\n\tscheduler.config.map_settings.initial_position = {\r\n\t\tlat: scheduler.config.map_initial_position.lat(),\r\n\t\tlng: scheduler.config.map_initial_position.lng(), \r\n\t};\r\n}\r\n\r\nif (scheduler.config.map_error_position) {\r\n\tscheduler.config.map_settings.error_position = {\r\n\t\tlat: scheduler.config.map_error_position.lat(),\r\n\t\tlng: scheduler.config.map_error_position.lng(), \r\n\t};\r\n}\r\n\r\nscheduler.xy.map_date_width = 188; // date column width\r\nscheduler.xy.map_icon_width = 25; // event details icon width\r\nscheduler.xy.map_description_width = 400; // description column width\r\nscheduler.date.add_map = function(date, inc, mode) {\r\n\treturn (new Date(date.valueOf()));\r\n};\r\nscheduler.templates.map_date = function(dd, ed, mode) {\r\n\treturn '';\r\n};\r\nscheduler.templates.map_time = function(start, end, ev) {\r\n\tif (scheduler.config.rtl && !ev._timed) {\r\n\t\treturn scheduler.templates.day_date(end) + \" – \" + scheduler.templates.day_date(start);\r\n\t} else if (ev._timed) {\r\n\t\treturn this.day_date(ev.start_date, ev.end_date, ev) + \" \" + this.event_date(start);\r\n\t} else {\r\n\t\treturn scheduler.templates.day_date(start) + \" – \" + scheduler.templates.day_date(end);\r\n\t}\r\n};\r\nscheduler.templates.map_text = function(start, end, ev) {\r\n\treturn ev.text;\r\n};\r\nscheduler.templates.map_info_content = function(event){\r\n return `
Event's text: ${event.text}\r\n\t\t\t\t
Location: ${event.event_location}
\r\n\t\t\t\t
Starts: ${scheduler.templates.tooltip_date_format(event.start_date)}
\r\n\t\t\t\t
Ends: ${scheduler.templates.tooltip_date_format(event.end_date)}
\r\n\t\t\t
`;\r\n};\r\nscheduler.date.map_start = function(d) {\r\n\treturn d;\r\n};\r\n\r\nfunction setupMapView(scheduler) {\r\n\t// Initialization logic, possibly including creation of a new mapAdapter\r\n\tmapAdapter = scheduler.ext.mapView.createAdapter();\r\n\tattachSchedulerEvents();\r\n}\r\nasync function addEventWithLocation(event: ICalendarEvent, mapAdapter: IMapAdapter){\r\n\tlet coordinates = await mapAdapter.resolveAddress(event.event_location);\r\n\tevent.lat = coordinates.lat;\r\n\tevent.lng = coordinates.lng;\r\n\tmapAdapter.removeEventMarker(String(event.id));\r\n\tmapAdapter.addEventMarker(event);\r\n\treturn event;\r\n}\r\nfunction setUserLocation(options: IMapSettings, adapter: IMapAdapter): void{\r\n\tif (options.resolve_user_location) {\r\n\t\tif (navigator.geolocation) {\r\n\t\t\tnavigator.geolocation.getCurrentPosition(function(position) {\r\n\t\t\t\tadapter.setView(position.coords.latitude, position.coords.longitude, options.zoom_after_resolve || options.initial_zoom);\r\n\t\t\t});\r\n\t\t}\r\n\t} else {\r\n\t\tadapter.setView(options.initial_position.lat, options.initial_position.lng, options.initial_zoom);\r\n\t}\r\n}\r\nscheduler.dblclick_dhx_map_area = function(e) {\r\n\tlet eventNode = e.target.closest(`[${scheduler.config.event_attribute}]`);\r\n\tif (eventNode){\r\n\t\tlet eventId = eventNode.getAttribute(`${scheduler.config.event_attribute}`);\r\n\t\tscheduler.showLightbox(eventId);\r\n\t}\r\n\tif (!this.config.readonly && this.config.dblclick_create && !eventNode) {\r\n\t\tthis.addEventNow({\r\n\t\t\tstart_date: scheduler.config.map_start,\r\n\t\t\tend_date: scheduler.date.add( scheduler.config.map_start, scheduler.config.time_step, \"minute\"),\r\n\t\t});\r\n\t}\t\r\n};\r\n\r\nfunction attachSchedulerEvents() { \r\n eventHandlerIds.push(\r\n\tscheduler.attachEvent(\"onEventSave\",function(id,ev,is_new){\r\n\t\tlet unmodifiedEvent = scheduler.getEvent(id);\r\n\t\tif (unmodifiedEvent && unmodifiedEvent.event_location != ev.event_location) {\r\n\t\t\tscheduler._eventLocationChanged = true;\r\n\t\t}\r\n\t\treturn true;\r\n\t}),\r\n scheduler.attachEvent(\"onEventChanged\", (id, event) => {\r\n\t\tconst {start_date, end_date} = event;\r\n\t\tconst {min_date, max_date} = scheduler.getState();\r\n\t\tif(start_date.valueOf() < max_date.valueOf() && end_date.valueOf() > min_date.valueOf()){\r\n\t\t\tif (mapAdapter) {\r\n\t\t\t\tif (scheduler.config.map_settings.resolve_event_location && event.event_location && !scheduler._latLngUpdate ) {\r\n\t\t\t\t \taddEventWithLocation(event, mapAdapter);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmapAdapter.updateEventMarker(event);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._latLngUpdate = false;\r\n\t\treturn true;\r\n }),\r\n\tscheduler.attachEvent(\"onEventIdChange\", function(old_id,new_id){\r\n\t\tlet newIdEvent = scheduler.getEvent(new_id);\r\n\t\tmapAdapter?.removeEventMarker(old_id);\r\n\t\tmapAdapter?.addEventMarker(newIdEvent);\r\n\t}),\r\n scheduler.attachEvent(\"onEventAdded\", (id, event) => {\r\n\t\tconst {start_date, end_date} = event;\r\n\t\tconst {min_date, max_date} = scheduler.getState();\r\n\t\tif(start_date.valueOf() < max_date.valueOf() && end_date.valueOf() > min_date.valueOf()){\r\n \t\tif (mapAdapter) {\r\n\t\t\t\tif (scheduler.config.map_settings.resolve_event_location && event.event_location && scheduler._eventLocationChanged) {\r\n\t\t\t\t\taddEventWithLocation(event, mapAdapter);\r\n\t\t\t\t\tscheduler._eventLocationChanged = false;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmapAdapter.addEventMarker(event);\r\n\t\t\t\t\tmapAdapter.onEventClick(event);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n }),\r\n scheduler.attachEvent(\"onClick\", function (id, e){\r\n\t\tconst event = scheduler.getEvent(id);\r\n\t\tif (mapAdapter && event) mapAdapter.onEventClick(event);\r\n\t\treturn false;\r\n }),\r\n scheduler.attachEvent(\"onBeforeEventDelete\", (id, event) => {\r\n\t\tif (mapAdapter) {\r\n\t\t\tmapAdapter.removeEventMarker(id);\r\n\t\t}\r\n\t\treturn true;\r\n })\r\n );\r\n}\r\nfunction detachSchedulerEvents() {\r\n\teventHandlerIds.forEach(id => scheduler.detachEvent(id));\r\n\teventHandlerIds = [];\r\n}\r\n\r\nscheduler.attachEvent(\"onSchedulerReady\", function() {\r\n\r\n\tif(scheduler.config.map_initial_zoom !== undefined){\r\n\t\tscheduler.config.map_settings.initial_zoom = scheduler.config.map_initial_zoom;\r\n\t}\r\n\tif(scheduler.config.map_zoom_after_resolve !== undefined){\r\n\t\tscheduler.config.map_settings.zoom_after_resolve = scheduler.config.map_zoom_after_resolve;\r\n\t}\r\n\tif(scheduler.config.map_infowindow_max_width !== undefined){\r\n\t\tscheduler.config.map_settings.info_window_max_width = scheduler.config.map_infowindow_max_width;\r\n\t}\r\n\tif(scheduler.config.map_resolve_user_location !== undefined){\r\n\t\tscheduler.config.map_settings.resolve_user_location = scheduler.config.map_resolve_user_location;\r\n\t}\r\n\tif(scheduler.config.map_view_provider !== undefined){\r\n\t\tscheduler.config.map_settings.view_provider = scheduler.config.map_view_provider;\r\n\t}\r\n\tif(scheduler.config.map_type !== undefined){\r\n\t\tscheduler.config.map_settings.type = scheduler.config.map_type;\r\n\t}\r\n\tif(scheduler.config.map_resolve_event_location !== undefined){\r\n\t\tscheduler.config.map_settings.resolve_event_location = scheduler.config.map_resolve_event_location;\r\n\t}\r\n\tscheduler.ext.mapView.currentAdapter = scheduler.config.map_view_provider;\r\n\r\n\tlet map = document.createElement('div');\r\n\tmap.className = 'mapContainer';\r\n\tmap.id = 'mapContainer';\r\n\tmap.style.display = \"none\";\r\n\tmap.style.zIndex = \"1\";\r\n\tscheduler._obj.appendChild(map);\r\n\r\n\tconst old = scheduler.render_data;\r\n\tscheduler.render_data = function(evs, hold) {\r\n\t\tif (this._mode == \"map\") {\r\n\t\t\tfill_map_tab();\r\n\t\t\tlet events = scheduler.get_visible_events();\r\n\t\t\tif (mapAdapter) {\r\n\t\t\t\tmapAdapter.clearEventMarkers();\r\n\t\t\t\tevents.forEach((event) => mapAdapter?.addEventMarker(event));\r\n\t\t\t}\r\n\t\t} else\r\n\t\t\treturn old.apply(this, arguments);\r\n\t};\r\n\r\n\tscheduler.map_view = function(mode) {\r\n\t\tscheduler._els.dhx_cal_data[0].style.width = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\tscheduler._min_date = scheduler.config.map_start || (scheduler._currentDate());\r\n\t\tscheduler._max_date = scheduler.config.map_end || scheduler.date.add(scheduler._currentDate(), 1, \"year\");\r\n\t\tscheduler._table_view = true;\r\n\t\tset_full_view(mode);\r\n\t\tlet mapContainer = document.getElementById('mapContainer');\r\n\t\t_setMapSize('mapContainer');\r\n\r\n\t\t// creating the new logic\r\n\t\tif (mode && mapContainer) {\r\n\t\t\tmap.style.display = 'block';\r\n\t\t\tfill_map_tab();\r\n\t\t\t// case to display several maps and has the opportunity to switch between them\r\n\t\t\tif (scheduler.config.map_view_provider == scheduler.ext.mapView.currentAdapter) {\r\n\t\t\t\tmapAdapter?.destroy(mapContainer);\r\n\t\t\t\tsetupMapView(scheduler);\r\n\t\t\t\tmapAdapter?.initialize(mapContainer, scheduler.config.map_settings);\r\n\t\t\t} else {\r\n\t\t\t\tmapAdapter?.destroy(mapContainer);\r\n\t\t\t\tsetupMapView(scheduler);\r\n\t\t\t\tmapAdapter?.initialize(mapContainer, scheduler.config.map_settings);\r\n\t\t\t \tscheduler.ext.mapView.currentAdapter = scheduler.config.map_view_provider;\r\n\t\t\t}\r\n\t\t\tif(mapAdapter) {\r\n\t\t\t\tsetUserLocation(scheduler.config.map_settings, mapAdapter);\r\n\t\t\t}\t\r\n\t\t} else {\r\n\t\t\tmap.style.display = 'none';\r\n\t\t\tscheduler._els.dhx_cal_data[0].style.width = \"100%\";\r\n\t\t \tif (mapAdapter && mapContainer ) {\r\n\t\t\t\tmapAdapter.destroy(mapContainer);\r\n\t\t\t\tmapAdapter = null;\r\n\t\t\t\tscheduler.ext.mapView.currentAdapter = scheduler.config.map_view_provider;\r\n\t\t }\r\n\t\t \tdetachSchedulerEvents();\r\n\t\t}\r\n\t};\r\n\r\n\tfunction _setMapSize(elem_id) { //input - map's div id\r\n\t\tlet map = document.getElementById(elem_id);\r\n\t\tif (map) {\r\n\t\t\tconst nav_height = scheduler.$container.querySelector(\".dhx_cal_navline\").offsetHeight;\r\n\t\t\tlet height = scheduler.$container.querySelector(\".dhx_cal_data\").offsetHeight + scheduler.$container.querySelector(\".dhx_cal_header\").offsetHeight;\r\n\t\t\tif (height < 0)\r\n\t\t\t\theight = 0;\r\n\t\t\tlet width = scheduler._x - scheduler.xy.map_date_width - scheduler.xy.map_description_width - 1;\r\n\t\t\tif (width < 0)\r\n\t\t\t\twidth = 0;\r\n\t\t\tmap.style.height = height + 'px';\r\n\t\t\tmap.style.width = width + 'px';\r\n\t\t\tmap.style.position = \"absolute\";\r\n\t\t\tmap.style.top = nav_height + \"px\";\r\n\t\t\tif (scheduler.config.rtl) {\r\n\t\t\t\tmap.style.marginRight = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\t\t} else {\r\n\t\t\t\tmap.style.marginLeft = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\t\t}\r\n\t\t\tmap.style.marginTop = (scheduler.xy.nav_height + 2) + 'px';\r\n\t\t}\r\n\t}\t\r\n\tfunction fill_map_tab() {\r\n\t\t//select events for which data need to be printed\r\n\t\tlet events = scheduler.get_visible_events();\r\n\t\tevents.sort(function(a, b) {\r\n\t\t\tif(a.start_date.valueOf()==b.start_date.valueOf())\r\n\t\t\t\treturn a.id>b.id?1:-1;\r\n\t\t\treturn a.start_date>b.start_date?1:-1;\r\n\t\t});\r\n\r\n\t\t//generate html for the view\r\n\t\tlet ariaAttr = scheduler._waiAria.mapAttrString();\r\n\r\n\t\tlet html = \"
\";\r\n\t\tfor (let i = 0; i < events.length; i++) {\r\n\t\t\tlet ev = events[i];\r\n\t\t\tlet event_class = (ev.id == scheduler._selected_event_id) ? 'dhx_map_line highlight' : 'dhx_map_line';\r\n\t\t\tlet bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\t\t\tlet color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\t\t\tlet ariaAttr = scheduler._waiAria.mapRowAttrString(ev);\r\n\t\t\tlet ariaButtonAttr = scheduler._waiAria.mapDetailsBtnString();\r\n\r\n\t\t\thtml += \"
\" + scheduler.templates.map_time(ev.start_date, ev.end_date, ev) + \"
\";\r\n\t\t\thtml += `
\r\n\t\t\t\r\n\t\t\t
`;\r\n\t\t\thtml += \"
\" + scheduler.templates.map_text(ev.start_date, ev.end_date, ev) + \"
\"; // -25 = icon size 20 and padding 5\r\n\t\t}\r\n\t\thtml += \"
\";\r\n\r\n\t\t//render html\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = 0; //fix flickering in FF\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t//\tscheduler._els[\"dhx_cal_data\"][0].style.width = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\r\n\t\tlet t = scheduler._els[\"dhx_cal_data\"][0].firstChild.childNodes;\r\n\r\n\t\tlet dateElement = scheduler._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML=scheduler.templates[scheduler._mode + \"_date\"](scheduler._min_date, scheduler._max_date, scheduler._mode);\r\n\t\t}\r\n\r\n\t\tscheduler._rendered = [];\r\n\t\tfor (let i = 0; i < t.length - 2; i++) {\r\n\t\t\tscheduler._rendered[i] = t[i];\r\n\t\t}\r\n\t}\r\n\tfunction set_full_view(mode) {\r\n\t\tif (mode) {\r\n\t\t\tconst l = scheduler.locale.labels;\r\n\t\t\tscheduler._els[\"dhx_cal_header\"][0].innerHTML = \"
\" + l.date + \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"
\" + l.description + \"
\";\r\n\t\t\tscheduler._table_view = true;\r\n\t\t\tscheduler.set_sizes();\r\n\t\t}\r\n\t}\r\n\t\r\n\tscheduler.attachEvent(\"onLocationError\", function (id){\r\n\t\talert(\"Location can't be found\");\r\n\t\treturn google.maps.LatLng(51.477840, -0.001492); \r\n\t\t//the coordinates of the Greenwich Royal Observatory\r\n\t})\r\n\tlet _updateEventLocation = async function(event) {\r\n\t\tif (mapAdapter){\r\n\t\t\tconst coordinates = await mapAdapter.resolveAddress(event.event_location);\r\n\t\t\tif (coordinates.lat && coordinates.lng) {\r\n\t\t\t\tevent.lat = +coordinates.lat;\r\n\t\t\t\tevent.lng = +coordinates.lng;\r\n\t\t\t} else {\r\n\t\t\t\tscheduler.callEvent(\"onLocationError\", [event.id]);\r\n\t\t\t\tevent.lng = scheduler.config.map_settings.error_position.lng;\r\n\t\t\t\tevent.lat = scheduler.config.map_settings.error_position.lat;\r\n\t\t\t}\r\n\t\t\tscheduler._latLngUpdate = true;\r\n\t\t\tscheduler.callEvent(\"onEventChanged\", [event.id, event]);\r\n\t\t}\r\n\t};\r\n\tlet _delay = function(method, object, params, delay) {\r\n\t\tsetTimeout(function() {\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tlet ret = method.apply(object, params);\r\n\t\t\tmethod = object = params = null;\r\n\t\t\treturn ret;\r\n\t\t}, delay || 1);\r\n\t};\r\n\tscheduler._event_resolve_delay = 1500;\r\n\tscheduler.attachEvent(\"onEventLoading\", function(event) {\r\n\t\tif (event.lat && event.lng) {\r\n\t\t\tevent.lat = +event.lat;\r\n\t\t\tevent.lng = +event.lng;\r\n\t\t}\r\n\t\tif (scheduler.config.map_settings.resolve_event_location && event.event_location && !event.lat && !event.lng) { // don't delete !event.lat && !event.lng as location could change\r\n\t\t\tscheduler._event_resolve_delay += 1500;\r\n\t\t\t_delay(_updateEventLocation, this, [event], scheduler._event_resolve_delay);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n})\r\n\r\n}","export default function(scheduler){\r\n\r\nconst minicalDomEvents = scheduler._createDomEventScope();\r\n\t\r\n\r\nscheduler.config.minicalendar = {\r\n\tmark_events: true\r\n};\r\nscheduler._synced_minicalendars = [];\r\nscheduler.renderCalendar = function(obj, _prev, is_refresh) {\r\n\tvar cal = null;\r\n\tvar date = obj.date || (scheduler._currentDate());\r\n\tif (typeof date == \"string\")\r\n\t\tdate = this.templates.api_date(date);\r\n\r\n\tif (!_prev) {\r\n\t\tvar cont = obj.container;\r\n\t\tvar pos = obj.position;\r\n\r\n\t\tif (typeof cont == \"string\")\r\n\t\t\tcont = document.getElementById(cont);\r\n\r\n\t\tif (typeof pos == \"string\")\r\n\t\t\tpos = document.getElementById(pos);\r\n\t\tif (pos && (typeof pos.left == \"undefined\" && typeof pos.right == \"undefined\")) {\r\n\t\t\tvar tpos = scheduler.$domHelpers.getOffset(pos);\r\n\t\t\tpos = {\r\n\t\t\t\ttop: tpos.top + pos.offsetHeight,\r\n\t\t\t\tleft: tpos.left\r\n\t\t\t};\r\n\t\t}\r\n\t\tif (!cont)\r\n\t\t\tcont = scheduler._get_def_cont(pos);\r\n\r\n\t\tcal = this._render_calendar(cont, date, obj);\r\n\t\r\n\t\tif (!cal.$_eventAttached) {\r\n\t\t\tcal.$_eventAttached = true;\r\n\t\t\tminicalDomEvents.attach(cal, \"click\", (function(e) {\r\n\t\t\t\tvar src = e.target || e.srcElement;\r\n\r\n\t\t\t\tvar $dom = scheduler.$domHelpers;\r\n\t\t\t\tif ($dom.closest(src, \".dhx_month_head\")) {\r\n\t\t\t\t\tif (!$dom.closest(src, \".dhx_after\") && !$dom.closest(src, \".dhx_before\")) {\r\n\r\n\t\t\t\t\t\tvar cellRoot = $dom.closest(src, \"[data-cell-date]\");\r\n\t\t\t\t\t\tvar dateAttribute = cellRoot.getAttribute(\"data-cell-date\");\r\n\t\t\t\t\t\tvar newDate = scheduler.templates.parse_date(dateAttribute);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tscheduler.unmarkCalendar(this);\r\n\t\t\t\t\t\tscheduler.markCalendar(this, newDate, \"dhx_calendar_click\");\r\n\t\t\t\t\t\tthis._last_date = newDate;\r\n\t\t\t\t\t\tif (this.conf.handler) this.conf.handler.call(scheduler, newDate, this);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}).bind(cal));\r\n\t\t}\r\n\t\r\n\t} else {\r\n\t\tcal = this._render_calendar(_prev.parentNode, date, obj, _prev);\r\n\t\tscheduler.unmarkCalendar(cal);\r\n\t}\r\n\r\n\tif (scheduler.config.minicalendar.mark_events) {\r\n\t\tvar start = scheduler.date.month_start(date);\r\n\t\tvar end = scheduler.date.add(start, 1, \"month\");\r\n\t\tvar evs = this.getEvents(start, end);\r\n\t\tvar filter = this[\"filter_\" + this._mode];\r\n\t\tvar markedDates = {};\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tif (filter && !filter(ev.id, ev))\r\n\t\t\t\tcontinue;\r\n\t\t\tvar d = ev.start_date;\r\n\t\t\tif (d.valueOf() < start.valueOf())\r\n\t\t\t\td = start;\r\n\t\t\td = scheduler.date.date_part(new Date(d.valueOf()));\r\n\t\t\twhile (d < ev.end_date) {\r\n\t\t\t\tif(!markedDates[+d]) {\r\n\t\t\t\t\tmarkedDates[+d] = true;\r\n\t\t\t\t\tthis.markCalendar(cal, d, \"dhx_year_event\");\r\n\t\t\t\t}\r\n\t\t\t\td = this.date.add(d, 1, \"day\");\r\n\t\t\t\tif (d.valueOf() >= end.valueOf())\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tthis._markCalendarCurrentDate(cal);\r\n\r\n\tcal.conf = obj;\r\n\tif (obj.sync && !is_refresh)\r\n\t\tthis._synced_minicalendars.push(cal);\r\n\r\n\tif(!cal.conf._on_xle_handler){\r\n\t\tcal.conf._on_xle_handler = scheduler.attachEvent(\"onXLE\", function refreshOnLoad(){\r\n\t\t\tscheduler.updateCalendar(cal, cal.conf.date);\r\n\t\t});\r\n\t}\r\n\r\n\tif(this.config.wai_aria_attributes && this.config.wai_aria_application_role){\r\n\t\tcal.setAttribute(\"role\", \"application\");\r\n\t}\r\n\r\n\treturn cal;\r\n};\r\nscheduler._get_def_cont = function(pos) {\r\n\tif (!this._def_count) {\r\n\t\tthis._def_count = document.createElement(\"div\");\r\n\t\tthis._def_count.className = \"dhx_minical_popup\";\r\n\t\tscheduler.event(this._def_count, \"click\", function(e) { e.cancelBubble = true; });\r\n\t\tdocument.body.appendChild(this._def_count);\r\n\t}\r\n\r\n\tif(pos.left){\r\n\t\tthis._def_count.style.left = pos.left + \"px\";\r\n\t}\r\n\tif(pos.right){\r\n\t\tthis._def_count.style.right = pos.right + \"px\";\r\n\t}\r\n\tif(pos.top){\r\n\t\tthis._def_count.style.top = pos.top + \"px\";\r\n\t}\r\n\tif(pos.bottom){\r\n\t\tthis._def_count.style.bottom = pos.bottom + \"px\";\r\n\t}\r\n\r\n\tthis._def_count._created = new Date();\r\n\r\n\treturn this._def_count;\r\n};\r\nscheduler._locateCalendar = function(cal, date) {\r\n\tif (typeof date == \"string\")\r\n\t\tdate = scheduler.templates.api_date(date);\r\n\r\n\tif(+date > +cal._max_date || +date < +cal._min_date)\r\n\t\treturn null;\r\n\r\n\tvar table = cal.querySelector(\".dhx_year_body\").childNodes[0];\r\n\r\n\tvar weekNum = 0;\r\n\tvar dat = new Date(cal._min_date);\r\n\twhile(+this.date.add(dat, 1, \"week\") <= +date){\r\n\t\tdat = this.date.add(dat, 1, \"week\");\r\n\t\tweekNum++;\r\n\t}\r\n\r\n\tvar sm = scheduler.config.start_on_monday;\r\n\tvar day = (date.getDay() || (sm ? 7 : 0)) - (sm ? 1 : 0);\r\n\r\n\tconst dayCell = table.querySelector(`.dhx_cal_month_row:nth-child(${weekNum + 1}) .dhx_cal_month_cell:nth-child(${day + 1})`);\r\n\tif(dayCell) {\r\n\t\treturn dayCell.firstChild;\r\n\t} else {\r\n\t\treturn null;\r\n\t}\r\n};\r\nscheduler.markCalendar = function(cal, date, css) {\r\n\tvar div = this._locateCalendar(cal, date);\r\n\tif(!div)\r\n\t\treturn;\r\n\r\n\tdiv.className += \" \" + css;\r\n};\r\nscheduler.unmarkCalendar = function(cal, date, css) {\r\n\tdate = date || cal._last_date;\r\n\tcss = css || \"dhx_calendar_click\";\r\n\tif (!date) return;\r\n\tvar el = this._locateCalendar(cal, date);\r\n\tif(!el)\r\n\t\treturn;\r\n\tel.className = (el.className || \"\").replace(RegExp(css, \"g\"));\r\n};\r\nscheduler._week_template = function(width) {\r\n\tvar summ = (width || 250);\r\n\tvar left = 0;\r\n\r\n\tvar week_template = document.createElement(\"div\");\r\n\tvar dummy_date = this.date.week_start(scheduler._currentDate());\r\n\tfor (var i = 0; i < 7; i++) {\r\n\t\tthis._cols[i] = Math.floor(summ / (7 - i));\r\n\t\tthis._render_x_header(i, left, dummy_date, week_template);\r\n\t\tdummy_date = this.date.add(dummy_date, 1, \"day\");\r\n\t\tsumm -= this._cols[i];\r\n\t\tleft += this._cols[i];\r\n\t}\r\n\tweek_template.lastChild.className += \" dhx_scale_bar_last\";\r\n\treturn week_template;\r\n};\r\nscheduler.updateCalendar = function(obj, sd) {\r\n\tobj.conf.date = sd;\r\n\tthis.renderCalendar(obj.conf, obj, true);\r\n};\r\nscheduler._mini_cal_arrows = [\" \", \" \"];\r\nscheduler._render_calendar = function(obj, sd, conf, previous) {\r\n\t/*store*/\r\n\tvar ts = scheduler.templates;\r\n\tvar temp = this._cols;\r\n\tthis._cols = [];\r\n\tvar temp2 = this._mode;\r\n\tthis._mode = \"calendar\";\r\n\tvar temp3 = this._colsS;\r\n\tthis._colsS = {height: 0};\r\n\tvar temp4 = new Date(this._min_date);\r\n\tvar temp5 = new Date(this._max_date);\r\n\tvar temp6 = new Date(scheduler._date);\r\n\tvar temp7 = ts.month_day;\r\n\tvar temp8 = this._ignores_detected; this._ignores_detected = 0;\r\n\tts.month_day = ts.calendar_date;\r\n\r\n\tsd = this.date.month_start(sd);\r\n\tvar week_template = this._week_template(obj.offsetWidth - 1 - this.config.minicalendar.padding );\r\n\r\n\tvar d;\r\n\tif (previous){\r\n\t\td = previous;\r\n\t} else {\r\n\t\td = document.createElement(\"div\");\r\n\t\td.className = \"dhx_cal_container dhx_mini_calendar\";\r\n\t}\r\n\td.setAttribute(\"date\", this._helpers.formatDate(sd));\r\n\td.innerHTML = \"
\" +\r\n\t\t\t\"
\" : \"'>\") +\r\n\t\t\t\"
\"+(week_template ? week_template.innerHTML : \"\")+\"
\" +\r\n\t\t\t\"
\" +\r\n\t\t\"
\";\r\n\tvar header = d.querySelector(\".dhx_year_month\");\r\n\tvar weekHeader = d.querySelector(\".dhx_year_week\");\r\n\tvar body = d.querySelector(\".dhx_year_body\");\r\n\r\n\theader.innerHTML = this.templates.calendar_month(sd);\r\n\tif (conf.navigation) {\r\n\t\tvar move_minicalendar_date = function(calendar, diff) {\r\n\t\t\tvar date = scheduler.date.add(calendar._date, diff, \"month\");\r\n\t\t\tscheduler.updateCalendar(calendar, date);\r\n\t\t\tif (scheduler._date.getMonth() == calendar._date.getMonth() && scheduler._date.getFullYear() == calendar._date.getFullYear()) {\r\n\t\t\t\tscheduler._markCalendarCurrentDate(calendar);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tvar css_classnames = [\"dhx_cal_prev_button\", \"dhx_cal_next_button\"];\r\n\t\tvar css_texts = [\"left:1px;top:4px;position:absolute;\", \"left:auto; right:1px;top:4px;position:absolute;\"];\r\n\t\tvar diffs = [-1, 1];\r\n\t\tvar handler = function(diff) {\r\n\t\t\treturn function() {\t\r\n\t\t\t\tif (conf.sync) {\r\n\t\t\t\t\tvar calendars = scheduler._synced_minicalendars;\r\n\t\t\t\t\tfor (var k = 0; k < calendars.length; k++) {\r\n\t\t\t\t\t\tmove_minicalendar_date(calendars[k], diff);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (scheduler.config.rtl) {\r\n\t\t\t\t\t\tdiff = -diff;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmove_minicalendar_date(d, diff);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t};\r\n\t\tvar labels = [scheduler.locale.labels.prev, scheduler.locale.labels.next];\r\n\t\tfor (var j = 0; j < 2; j++) {\r\n\t\t\tvar arrow = document.createElement(\"div\");\r\n\t\t\t//var diff = diffs[j];\r\n\t\t\tarrow.className = css_classnames[j];\r\n\r\n\t\t\tscheduler._waiAria.headerButtonsAttributes(arrow, labels[j]);\r\n\r\n\t\t\tarrow.style.cssText = css_texts[j];\r\n\t\t\tarrow.innerHTML = this._mini_cal_arrows[j];\r\n\t\t\theader.appendChild(arrow);\r\n\t\t\tminicalDomEvents.attach(arrow, \"click\", handler(diffs[j]));\r\n\t\t}\r\n\t}\r\n\td._date = new Date(sd);\r\n\r\n\td.week_start = (sd.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;\r\n\r\n\tvar dd = d._min_date = this.date.week_start(sd);\r\n\td._max_date = this.date.add(d._min_date, 6, \"week\");\r\n\r\n\tthis._reset_month_scale(body, sd, dd, 6);\r\n\r\n\tif (!previous)\r\n\t\tobj.appendChild(d);\r\n\r\n\tweekHeader.style.height = (weekHeader.childNodes[0].offsetHeight - 1) + \"px\"; // dhx_year_week should have height property so that day dates would get correct position. dhx_year_week height = height of it's child (with the day name)\r\n\r\n\tvar headerId = scheduler.uid();\r\n\tscheduler._waiAria.minicalHeader(header, headerId);\r\n\tscheduler._waiAria.minicalGrid(d.querySelector(\".dhx_year_grid\"), headerId);\r\n\tscheduler._waiAria.minicalRow(weekHeader);\r\n\r\n\tvar dayHeaders = weekHeader.querySelectorAll(\".dhx_scale_bar\");\r\n\tfor(var i = 0; i < dayHeaders.length; i++){\r\n\t\tscheduler._waiAria.minicalHeadCell(dayHeaders[i]);\r\n\t}\r\n\tvar dayCells = body.querySelectorAll(\".dhx_cal_month_cell\");\r\n\tvar firstDate = new Date(dd);\r\n\tfor(var i = 0; i < dayCells.length; i++){\r\n\r\n\t\tscheduler._waiAria.minicalDayCell(dayCells[i], new Date(firstDate));\r\n\t\tfirstDate = scheduler.date.add(firstDate, 1, \"day\");\r\n\t}\r\n\r\n\tscheduler._waiAria.minicalHeader(header, headerId);\r\n\r\n\t/*restore*/\r\n\tthis._cols = temp;\r\n\tthis._mode = temp2;\r\n\tthis._colsS = temp3;\r\n\tthis._min_date = temp4;\r\n\tthis._max_date = temp5;\r\n\tscheduler._date = temp6;\r\n\tts.month_day = temp7;\r\n\tthis._ignores_detected = temp8;\r\n\treturn d;\r\n};\r\nscheduler.destroyCalendar = function(cal, force) {\r\n\tif (!cal && this._def_count && this._def_count.firstChild) {\r\n\t\tif (force || (new Date()).valueOf() - this._def_count._created.valueOf() > 500)\r\n\t\t\tcal = this._def_count.firstChild;\r\n\t}\r\n\tif (!cal) return;\r\n\tminicalDomEvents.detachAll();\r\n\t//cal.onclick = null;\r\n\tcal.innerHTML = \"\";\r\n\tif (cal.parentNode)\r\n\t\tcal.parentNode.removeChild(cal);\r\n\tif (this._def_count)\r\n\t\tthis._def_count.style.top = \"-1000px\";\r\n\r\n\tif(cal.conf && cal.conf._on_xle_handler)\r\n\t\tscheduler.detachEvent(cal.conf._on_xle_handler);\r\n};\r\nscheduler.isCalendarVisible = function() {\r\n\tif (this._def_count && parseInt(this._def_count.style.top, 10) > 0)\r\n\t\treturn this._def_count;\r\n\treturn false;\r\n};\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tscheduler.event(document.body, \"click\", function() { scheduler.destroyCalendar(); });\r\n}, {once: true});\r\n\r\n\r\n\r\nscheduler.form_blocks.calendar_time = {\r\n\trender: function(sns) {\r\n\t\tvar html = \"\";\r\n\r\n\t\tvar cfg = scheduler.config;\r\n\t\tvar dt = this.date.date_part(scheduler._currentDate());\r\n\r\n\t\tvar last = 24 * 60, first = 0;\r\n\t\tif (cfg.limit_time_select) {\r\n\t\t\tfirst = 60 * cfg.first_hour;\r\n\t\t\tlast = 60 * cfg.last_hour + 1; // to include \"17:00\" option if time select is limited\r\n\t\t}\r\n\t\tdt.setHours(first / 60);\r\n\r\n\t\tsns._time_values = [];\r\n\t\thtml += \" \";\r\n\r\n\t\t//var full_day = scheduler.config.full_day;\r\n\r\n\t\treturn \"
\" + html + \"  –  \" + html + \"
\";\r\n\t},\r\n\tset_value: function(node, value, ev, config) {\r\n\r\n\t\tvar inputs = node.getElementsByTagName(\"input\");\r\n\t\tvar selects = node.getElementsByTagName(\"select\");\r\n\t\tvar start_date,\r\n\t\t\tend_date;\r\n\r\n\t\tvar _init_once = function(inp, date, number) {\r\n\t\t\tscheduler.event(inp, \"click\", function() {\r\n\t\t\t\tscheduler.destroyCalendar(null, true);\r\n\t\t\t\tscheduler.renderCalendar({\r\n\t\t\t\t\tposition: inp,\r\n\t\t\t\t\tdate: new Date(this._date),\r\n\t\t\t\t\tnavigation: true,\r\n\t\t\t\t\thandler: function(new_date) {\r\n\t\t\t\t\t\tinp.value = scheduler.templates.calendar_time(new_date);\r\n\t\t\t\t\t\tinp._date = new Date(new_date);\r\n\t\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t\t\tif (scheduler.config.event_duration && scheduler.config.auto_end_date && number === 0) { //first element = start date\r\n\t\t\t\t\t\t\t_update_minical_select();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t};\r\n\r\n\t\tif (scheduler.config.full_day) {\r\n\t\t\tif (!node._full_day) {\r\n\t\t\t\tvar html = \"\";\r\n\t\t\t\tif (!scheduler.config.wide_form)\r\n\t\t\t\t\thtml = node.previousSibling.innerHTML + html;\r\n\t\t\t\tnode.previousSibling.innerHTML = html;\r\n\t\t\t\tnode._full_day = true;\r\n\t\t\t}\r\n\t\t\tvar input = node.previousSibling.getElementsByTagName(\"input\")[0];\r\n\r\n\t\t\tvar isFulldayEvent = (scheduler.date.time_part(ev.start_date) === 0 && scheduler.date.time_part(ev.end_date) === 0);\r\n\t\t\tinput.checked = isFulldayEvent;\r\n\r\n\t\t\tselects[0].disabled = input.checked;\r\n\t\t\tselects[1].disabled = input.checked;\r\n\r\n\t\t\tif (!input.$_eventAttached) {\r\n\t\t\t\tinput.$_eventAttached = true;\r\n\t\t\t\tscheduler.event(input, \"click\", function() {\r\n\t\t\t\t\tif (input.checked === true) {\r\n\t\t\t\t\t\tvar obj = {};\r\n\t\t\t\t\t\tscheduler.form_blocks.calendar_time.get_value(node, obj);\r\n\r\n\t\t\t\t\t\tstart_date = scheduler.date.date_part(obj.start_date);\r\n\t\t\t\t\t\tend_date = scheduler.date.date_part(obj.end_date);\r\n\r\n\t\t\t\t\t\tif (+end_date == +start_date || (+end_date >= +start_date && (ev.end_date.getHours() !== 0 || ev.end_date.getMinutes() !== 0)))\r\n\t\t\t\t\t\t\tend_date = scheduler.date.add(end_date, 1, \"day\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar start = start_date || ev.start_date;\r\n\t\t\t\t\tvar end = end_date || ev.end_date;\r\n\t\t\t\t\t_attach_action(inputs[0], start);\r\n\t\t\t\t\t_attach_action(inputs[1], end);\r\n\t\t\t\t\tselects[0].value = start.getHours() * 60 + start.getMinutes();\r\n\t\t\t\t\tselects[1].value = end.getHours() * 60 + end.getMinutes();\r\n\r\n\t\t\t\t\tselects[0].disabled = input.checked;\r\n\t\t\t\t\tselects[1].disabled = input.checked;\r\n\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (scheduler.config.event_duration && scheduler.config.auto_end_date) {\r\n\r\n\t\t\tvar _update_minical_select = function () {\r\n\t\t\t\tif (!(scheduler.config.auto_end_date && scheduler.config.event_duration)){\r\n\t\t\t\t\t// setting may be disabled after the handler is attached\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tstart_date = scheduler.date.add(inputs[0]._date, selects[0].value, \"minute\");\r\n\t\t\t\tend_date = new Date(start_date.getTime() + (scheduler.config.event_duration * 60 * 1000));\r\n\r\n\t\t\t\tinputs[1].value = scheduler.templates.calendar_time(end_date);\r\n\t\t\t\tinputs[1]._date = scheduler.date.date_part(new Date(end_date));\r\n\r\n\t\t\t\tselects[1].value = end_date.getHours() * 60 + end_date.getMinutes();\r\n\t\t\t};\r\n\r\n\t\t\tif(!selects[0].$_eventAttached){\r\n\t\t\t\tselects[0].addEventListener(\"change\", _update_minical_select); // only update on first select should trigger update so user could define other end date if he wishes too\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction _attach_action(inp, date, number) {\r\n\t\t\t_init_once(inp, date, number);\r\n\t\t\tinp.value = scheduler.templates.calendar_time(date);\r\n\t\t\tinp._date = scheduler.date.date_part(new Date(date));\r\n\t\t}\r\n\r\n\t\t_attach_action(inputs[0], ev.start_date, 0);\r\n\t\t_attach_action(inputs[1], ev.end_date, 1);\r\n\t\t_init_once = function() {};\r\n\r\n\t\tfunction _round_minutes(date) {\r\n\t\t\tvar time_values = config._time_values;\r\n\t\t\tvar direct_value = date.getHours() * 60 + date.getMinutes();\r\n\t\t\tvar fixed_value = direct_value;\r\n\t\t\tvar value_found = false;\r\n\r\n\t\t\tfor (var k = 0; k < time_values.length; k++) {\r\n\t\t\t\tvar t_v = time_values[k];\r\n\t\t\t\tif (t_v === direct_value) {\r\n\t\t\t\t\tvalue_found = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif (t_v < direct_value)\r\n\t\t\t\t\tfixed_value = t_v;\r\n\t\t\t}\r\n\r\n\t\t\tif(!(value_found || fixed_value))\r\n\t\t\t\treturn -1;\r\n\r\n\t\t\treturn (value_found) ? direct_value : fixed_value;\r\n\t\t}\r\n\r\n\t\tselects[0].value = _round_minutes(ev.start_date);\r\n\t\tselects[1].value = _round_minutes(ev.end_date);\r\n\r\n\t},\r\n\tget_value: function(node, ev) {\r\n\t\tvar inputs = node.getElementsByTagName(\"input\");\r\n\t\tvar selects = node.getElementsByTagName(\"select\");\r\n\r\n\t\tev.start_date = scheduler.date.add(inputs[0]._date, selects[0].value, \"minute\");\r\n\t\tev.end_date = scheduler.date.add(inputs[1]._date, selects[1].value, \"minute\");\r\n\r\n\t\tif (ev.end_date <= ev.start_date)\r\n\t\t\tev.end_date = scheduler.date.add(ev.start_date, scheduler.config.time_step, \"minute\");\r\n\t\treturn {\r\n\t\t\tstart_date: new Date(ev.start_date),\r\n\t\t\tend_date: new Date(ev.end_date)\r\n\t\t};\r\n\t},\r\n\tfocus: function(node) {\r\n\t}\r\n};\r\nscheduler.linkCalendar = function(calendar, datediff) {\r\n\tvar action = function() {\r\n\t\tvar date = scheduler._date;\r\n\t\tvar dateNew = new Date(date.valueOf());\r\n\t\tif (datediff) dateNew = datediff(dateNew);\r\n\t\tdateNew.setDate(1);\r\n\t\tscheduler.updateCalendar(calendar, dateNew);\r\n\t\treturn true;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", action);\r\n\tscheduler.attachEvent(\"onXLE\", action);\r\n\tscheduler.attachEvent(\"onEventAdded\", action);\r\n\tscheduler.attachEvent(\"onEventChanged\", action);\r\n\tscheduler.attachEvent(\"onEventDeleted\", action);\r\n\taction();\r\n};\r\n\r\nscheduler._markCalendarCurrentDate = function(calendar) {\r\n\tvar state = scheduler.getState();\r\n\tvar from = state.min_date;\r\n\tvar to = state.max_date;\r\n\tvar mode = state.mode;\r\n\r\n\tvar month_start = scheduler.date.month_start(new Date(calendar._date));\r\n\tvar month_end = scheduler.date.add(month_start, 1, \"month\");\r\n\r\n\tvar noHighlight = {\r\n\t\t\"month\":true,\r\n\t\t\"year\":true,\r\n\t\t\"agenda\":true,\r\n\t\t\"grid\":true\r\n\t};\r\n\t// no need to highlight current dates for a large range views - agenda, year, etc.\r\n\tif(noHighlight[mode] || (from.valueOf() <= month_start.valueOf() && to.valueOf() >= month_end.valueOf())){\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar current = from;\r\n\twhile(current.valueOf() < to.valueOf()){\r\n\t\tif (month_start.valueOf() <= current.valueOf() && month_end > current) {\r\n\t\t\tscheduler.markCalendar(calendar, current, \"dhx_calendar_click\");\r\n\t\t}\r\n\t\tcurrent = scheduler.date.add(current, 1, \"day\");\r\n\t}\r\n};\r\n\r\nscheduler.attachEvent(\"onEventCancel\", function(){\r\n\tscheduler.destroyCalendar(null, true);\r\n});\r\n\r\nscheduler.attachEvent(\"onDestroy\", function(){\r\n\tscheduler.destroyCalendar();\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\tscheduler.xy.scroll_width = 0;\r\n\r\n\tvar old = scheduler.render_view_data;\r\n\tscheduler.render_view_data=function(){\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\t\tdata.firstChild._h_fix = true;\r\n\r\n\t\told.apply(scheduler,arguments);\r\n\r\n\r\n\r\n\t\tvar height = parseInt(data.style.height);\r\n\t\tdata.style.height=\"1px\";\r\n\t\tdata.style.height=data.scrollHeight+\"px\";\r\n\r\n\t\tthis._obj.style.height = this._obj.clientHeight + data.scrollHeight - height + \"px\";\r\n\t};\r\n\r\n\tvar old_s=scheduler._reset_month_scale;\r\n\tscheduler._reset_month_scale=function(a,b,c,d){\r\n\t\tvar dummy = {clientHeight:100};\r\n\t\told_s.apply(scheduler,[dummy,b,c,d]);\r\n\t\ta.innerHTML = dummy.innerHTML;\r\n\t};\r\n\r\n});\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Multisection\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\n\r\nfunction parseXMLOptions(loader, config){\r\n\tvar items = scheduler.ajax.xpath(\"//data/item\", loader.xmlDoc);\r\n\tvar ids = {};\r\n\tfor (var i = 0; i < items.length; i++) {\r\n\t\tids[items[i].getAttribute(config.map_to)] = true;\r\n\t}\r\n\treturn ids;\r\n}\r\n\r\nfunction parseJSONOptions(loader, config){\r\n\ttry{\r\n\t\tvar items = JSON.parse(loader.xmlDoc.responseText);\r\n\t\tvar ids = {};\r\n\t\tfor (var i = 0; i < items.length; i++) {\r\n\t\t\tvar option = items[i];\r\n\r\n\t\t\tids[option.value || option.key || option.id] = true;\r\n\t\t}\r\n\t\treturn ids;\r\n\t}catch(e){\r\n\t\treturn null;\r\n\t}\r\n}\r\n\r\nscheduler.form_blocks[\"multiselect\"]={\r\n\trender:function(sns) {\r\n\t\tvar css = \"dhx_multi_select_control dhx_multi_select_\"+sns.name;\r\n\t\tif(!!sns.vertical){\r\n\t\t\tcss += \" dhx_multi_select_control_vertical\";\r\n\t\t}\r\n\r\n\t\tvar _result = \"
\";\r\n\t\tfor (var i=0; i\"+sns.options[i].label+\"\";\r\n\t\t}\r\n\t\t_result += \"
\";\r\n\t\treturn _result;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\r\n\t\tvar _children = node.getElementsByTagName('input');\r\n\t\tfor(var i=0;i<_children.length;i++) {\r\n\t\t\t_children[i].checked = false; //unchecking all inputs on the form\r\n\t\t}\r\n\r\n\t\tfunction _mark_inputs(ids) { // ids = [ 0: undefined, 1: undefined, 2: true, 'custom_name': false ... ]\r\n\t\t\tvar _children = node.getElementsByTagName('input');\r\n\t\t\tfor(var i=0;i<_children.length; i++) {\r\n\t\t\t\t_children[i].checked = !! ids[_children[i].value];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar _ids = {};\r\n\t\tif (ev[config.map_to]) {\r\n\t\t\tvar results = (ev[config.map_to] + \"\").split(config.delimiter || scheduler.config.section_delimiter || \",\");\r\n\t\t\tfor (var i = 0; i < results.length; i++) {\r\n\t\t\t\t_ids[results[i]] = true;\r\n\t\t\t}\r\n\t\t\t_mark_inputs(_ids);\r\n\t\t} else {\r\n\t\t\tif (scheduler._new_event || !config.script_url)\r\n\t\t\t\treturn;\r\n\t\t\tvar divLoading = document.createElement('div');\r\n\t\t\tdivLoading.className = 'dhx_loading';\r\n\t\t\tdivLoading.style.cssText = \"position: absolute; top: 40%; left: 40%;\";\r\n\t\t\tnode.appendChild(divLoading);\r\n\r\n\t\t\tvar url = [\r\n\t\t\t\tconfig.script_url,\r\n\t\t\t\t(config.script_url.indexOf(\"?\") == -1 ? \"?\" : \"&\"),\r\n\t\t\t\t'dhx_crosslink_' + config.map_to + '=' + ev.id + '&uid=' + scheduler.uid()\r\n\t\t\t].join(\"\");\r\n\r\n\t\t\tscheduler.ajax.get(url, function(loader) {\r\n\t\t\t\tvar options = parseJSONOptions(loader, config);\r\n\t\t\t\tif(!options){\r\n\t\t\t\t\toptions = parseXMLOptions(loader, config);\r\n\t\t\t\t}\r\n\t\t\t\t_mark_inputs(options);\r\n\t\t\t\tnode.removeChild(divLoading);\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tvar _result = [];\r\n\t\tvar _children = node.getElementsByTagName(\"input\");\r\n\t\tfor(var i=0;i<_children.length;i++) {\r\n\t\t\tif(_children[i].checked)\r\n\t\t\t\t_result.push(_children[i].value);\r\n\t\t}\r\n\t\treturn _result.join(config.delimiter || scheduler.config.section_delimiter || \",\");\r\n\t},\r\n\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\r\n\tfunction backup(obj){\r\n\t\tvar t = function(){};\r\n\t\tt.prototype = obj;\r\n\t\treturn t;\r\n\t}\r\n\r\n\tvar old = scheduler._load;\r\n\tscheduler._load=function(url,from){\r\n\t\turl=url||this._load_url;\r\n\t\tif (typeof url == \"object\"){\r\n\t\t\tvar t = backup(this._loaded);\r\n\t\t\tfor (var i=0; i < url.length; i++) {\r\n\t\t\t\tthis._loaded=new t();\r\n\t\t\t\told.call(this,url[i],from);\r\n\t\t\t}\r\n\t\t} else\r\n\t\t\told.apply(this,arguments);\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\t/* global Backbone */\r\n\tvar cfg = {\r\n\t\tuse_id : false\r\n\t};\r\n\r\n\t//remove private properties\r\n\tfunction sanitize(ev){\r\n\t\tvar obj = {};\r\n\t\tfor (var key in ev)\r\n\t\t\tif (key.indexOf(\"_\") !== 0)\r\n\t\t\t\tobj[key] = ev[key];\r\n\r\n\t\tif (!cfg.use_id)\r\n\t\t\tdelete obj.id;\r\n\r\n\t\treturn obj;\r\n\t}\r\n\r\n\tvar update_timer;\r\n\tfunction update_view(){\r\n\t\tclearTimeout(update_timer);\r\n\t\tupdate_timer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler.updateView();\r\n\t\t},1);\r\n\t}\r\n\r\n\tfunction _start_ext_load(cal){\r\n\t\tcal._loading = true;\r\n\t\tcal._not_render = true;\r\n\r\n\t\tcal.callEvent(\"onXLS\", []);\r\n\t}\r\n\tfunction _finish_ext_load(cal){\r\n\t\tcal._not_render = false;\r\n\t\tif (cal._render_wait)\r\n\t\t\tcal.render_view_data();\r\n\t\tcal._loading = false;\r\n\r\n\t\tcal.callEvent(\"onXLE\", []);\r\n\t}\r\n\r\n\r\n\tfunction _get_id(model){\r\n\t\treturn cfg.use_id ? model.id : model.cid;\r\n\t}\r\n\r\nscheduler.backbone = function(events, config){\r\n\tif (config) cfg = config;\r\n\r\n\tevents.bind(\"change\", function(model, info){\r\n\t\tvar cid = _get_id(model);\r\n\t\tvar ev = scheduler._events[cid] = model.toJSON();\r\n\t\tev.id = cid;\r\n\r\n\t\tscheduler._init_event(ev);\r\n\t\tupdate_view();\r\n\t});\r\n\tevents.bind(\"remove\", function(model, changes){\r\n\t\tvar cid = _get_id(model);\r\n\t\tif (scheduler._events[cid])\r\n\t\t\tscheduler.deleteEvent(cid);\r\n\t});\r\n\r\n\tvar queue = [];\r\n\tfunction add_from_queue(){\r\n\t\tif(scheduler.$destroyed){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (queue.length){\r\n\t\t\tscheduler.parse(queue, \"json\");\r\n\t\t\tqueue = [];\r\n\t\t}\r\n\t}\r\n\r\n\tevents.bind(\"add\", function(model, changes){\r\n\t\tvar cid = _get_id(model);\r\n\t\tif (!scheduler._events[cid]){\r\n\t\t\tvar ev = model.toJSON();\r\n\t\t\tev.id = cid;\r\n\t\t\tscheduler._init_event(ev);\r\n\r\n\t\t\tqueue.push(ev);\r\n\t\t\tif (queue.length == 1)\r\n\t\t\t\tsetTimeout(add_from_queue,1);\r\n\t\t}\r\n\t});\r\n\r\n\tevents.bind(\"request\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_start_ext_load(scheduler);\r\n\t});\r\n\tevents.bind(\"sync\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_finish_ext_load(scheduler);\r\n\t});\r\n\tevents.bind(\"error\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_finish_ext_load(scheduler);\r\n\t});\r\n\r\n\r\n\tscheduler.attachEvent(\"onEventCreated\", function(id){\r\n\t\tvar ev = new events.model(scheduler.getEvent(id));\r\n\t\tscheduler._events[id] = ev.toJSON();\r\n\t\tscheduler._events[id].id = id;\r\n\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventAdded\", function(id){\r\n\t\tif (!events.get(id)){\r\n\t\t\tvar data = sanitize(scheduler.getEvent(id));\r\n\t\t\tvar model = new events.model(data);\r\n\r\n\t\t\tvar cid = _get_id(model);\r\n\t\t\tif (cid != id)\r\n\t\t\t\tthis.changeEventId(id, cid);\r\n\t\t\tevents.add(model);\r\n\t\t\tevents.trigger(\"scheduler:add\", model);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\", function(id){\r\n\t\tvar ev = events.get(id);\r\n\t\tvar upd = sanitize(scheduler.getEvent(id));\r\n\r\n\t\tev.set(upd);\r\n\t\tevents.trigger(\"scheduler:change\", ev);\r\n\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function(id){\r\n\t\tvar model = events.get(id);\r\n\t\tif (model){\r\n\t\t\tevents.trigger(\"scheduler:remove\", model);\r\n\t\t\tevents.remove(id);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\t/* global dhtmlDragAndDropObject, dhtmlx */\r\n// lame old code doesn't provide raw event object\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\t\tvar dragger = (new dhtmlDragAndDropObject());\r\n\t\tvar old = dragger.stopDrag;\r\n\t\tvar last_event;\r\n\t\tdragger.stopDrag = function(e) {\r\n\t\t\tlast_event = e;\r\n\t\t\treturn old.apply(this, arguments);\r\n\t\t};\r\n\r\n\t\tfunction on_drop(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml) {\r\n\r\n\t\t\tif (scheduler.checkEvent(\"onBeforeExternalDragIn\") && !scheduler.callEvent(\"onBeforeExternalDragIn\", [sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml, last_event]))\r\n\t\t\t\treturn;\r\n\r\n\t\t\tvar temp = scheduler.attachEvent(\"onEventCreated\", function (id) {\r\n\t\t\t\tif (!scheduler.callEvent(\"onExternalDragIn\", [id, sourceHtmlObject, last_event])) {\r\n\t\t\t\t\tthis._drag_mode = this._drag_id = null;\r\n\t\t\t\t\tthis.deleteEvent(id);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tvar action_data = scheduler.getActionData(last_event);\r\n\t\t\tvar event_data = {\r\n\t\t\t\tstart_date: new Date(action_data.date)\r\n\t\t\t};\r\n\r\n\t\t\t// custom views, need to assign section id, fix dates\r\n\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\tvar view_options = scheduler.matrix[scheduler._mode];\r\n\t\t\t\tevent_data[view_options.y_property] = action_data.section;\r\n\r\n\t\t\t\tvar pos = scheduler._locate_cell_timeline(last_event);\r\n\t\t\t\tevent_data.start_date = view_options._trace_x[pos.x];\r\n\t\t\t\tevent_data.end_date = scheduler.date.add(event_data.start_date, view_options.x_step, view_options.x_unit);\r\n\t\t\t}\r\n\t\t\tif (scheduler._props && scheduler._props[scheduler._mode]) {\r\n\t\t\t\tevent_data[scheduler._props[scheduler._mode].map_to] = action_data.section;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler.addEventNow(event_data);\r\n\r\n\t\t\tscheduler.detachEvent(temp);\r\n\t\t}\r\n\r\n\t\tdragger.addDragLanding(scheduler._els[\"dhx_cal_data\"][0], {\r\n\t\t\t_drag: function(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml) {\r\n\t\t\t\ton_drop(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml);\r\n\t\t\t},\r\n\t\t\t_dragIn: function(htmlObject, shtmlObject) {\r\n\t\t\t\treturn htmlObject;\r\n\t\t\t},\r\n\t\t\t_dragOut: function(htmlObject) {\r\n\t\t\t\treturn this;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(dhtmlx.DragControl) {\r\n\t\t\tdhtmlx.DragControl.addDrop(scheduler._els[\"dhx_cal_data\"][0], {\r\n\t\t\t\tonDrop: function (source, target, d, e) {\r\n\t\t\t\t\tvar sourceDhtmlx = dhtmlx.DragControl.getMaster(source);\r\n\t\t\t\t\tlast_event = e;\r\n\t\t\t\t\ton_drop(source, sourceDhtmlx, target, e.target || e.srcElement);\r\n\t\t\t\t},\r\n\r\n\t\t\t\tonDragIn: function (source, target, e) {\r\n\t\t\t\t\treturn target;\r\n\t\t\t\t}\r\n\t\t\t}, true);\r\n\t\t}\r\n\t});\r\n\r\n}","export default function(scheduler){\r\n\r\n\tvar dx, dy,\r\n\t\thtml_regexp = new RegExp(\"<[^>]*>\", \"g\"),\r\n\t\tnewline_regexp = new RegExp(\"]*>\", \"g\");\r\n\r\n\tfunction clean_html(val) {\r\n\t\treturn val.replace(newline_regexp, \"\\n\").replace(html_regexp, \"\");\r\n\t}\r\n\r\n\tfunction x_norm(x, offset) {\r\n\t\tx = parseFloat(x);\r\n\t\toffset = parseFloat(offset);\r\n\t\tif (!isNaN(offset)) x -= offset;\r\n\r\n\t\tvar w = colsWidth(x);\r\n\t\tx = x - w.width + w.cols*dx;\r\n\t\treturn isNaN(x)?\"auto\":(100*x/(dx));\r\n\t}\r\n\r\n\tfunction x_norm_event(x, offset, is_left) {\r\n\t\tx = parseFloat(x);\r\n\t\toffset = parseFloat(offset);\r\n\t\tif (!isNaN(offset) && is_left) x -= offset;\r\n\r\n\t\tvar w = colsWidth(x);\r\n\t\tx = x - w.width + w.cols*dx;\r\n\t\treturn isNaN(x)?\"auto\":(100*x/(dx-(!isNaN(offset)?offset:0)));\r\n\t}\r\n\tfunction colsWidth(width) {\r\n\t\tvar r = 0;\r\n\t\tvar header = scheduler._els.dhx_cal_header[0].childNodes;\r\n\t\tvar els = header[1] ? header[1].childNodes : header[0].childNodes;\r\n\t\tfor (var i = 0; i < els.length; i++) {\r\n\t\t\tvar el = els[i].style ? els[i] : els[i].parentNode;\r\n\t\t\tvar w = parseFloat(el.style.width);\r\n\t\t\tif (width > w){\r\n\t\t\t\twidth -= (w+1);\r\n\t\t\t\tr+=(w+1);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\treturn { width: r, cols: i };\r\n\t}\r\n\r\n\tfunction y_norm(y) {\r\n\t\ty = parseFloat(y);\r\n\t\tif (isNaN(y)) return \"auto\";\r\n\t\treturn 100 * y / dy;\r\n\t}\r\n\r\n\tfunction get_style(node, style){\r\n\t\treturn (window.getComputedStyle?(window.getComputedStyle(node, null)[style]):(node.currentStyle?node.currentStyle[style]:null))||\"\";\r\n\t}\r\n\r\n\tfunction de_day(node, n) {\r\n\t\tvar x = parseInt(node.style.left, 10);\r\n\r\n\t\tfor (var dx = 0; dx < scheduler._cols.length; dx++) {\r\n\t\t\tx -= scheduler._cols[dx];\r\n\t\t\tif (x < 0) return dx;\r\n\t\t}\r\n\t\treturn n;\r\n\t}\r\n\r\n\tfunction de_week(node, n) {\r\n\t\tvar y = parseInt(node.style.top, 10);\r\n\t\tfor (var dy = 0; dy < scheduler._colsS.heights.length; dy++)\r\n\t\t\tif (scheduler._colsS.heights[dy] > y) return dy;\r\n\t\treturn n;\r\n\t}\r\n\r\n\tfunction xml_start(tag) {\r\n\t\treturn tag ? \"<\"+tag+\">\" : \"\";\r\n\t}\r\n\tfunction xml_end(tag) {\r\n\t\treturn tag ? \"\" : \"\";\r\n\t}\r\n\r\n\tfunction xml_top(tag, profile, header, footer) {\r\n\t\tvar xml = \"<\"+tag+\" profile='\" + profile + \"'\";\r\n\t\tif (header)\r\n\t\t\txml += \" header='\" + header + \"'\";\r\n\t\tif (footer)\r\n\t\t\txml += \" footer='\" + footer + \"'\";\r\n\t\txml += \">\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_body_header() {\r\n\t\tvar xml = \"\";\r\n\t\t// detects if current mode is timeline\r\n\t\tvar mode = scheduler._mode;\r\n\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode])\r\n\t\t\tmode = (scheduler.matrix[scheduler._mode].render == \"cell\") ? \"matrix\" : \"timeline\";\r\n\t\txml += \"\";\r\n\r\n\t\tif (scheduler._mode == \"week_agenda\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_data[0].getElementsByTagName(\"DIV\");\r\n\t\t\tfor (var i = 0; i < xh.length; i++)\r\n\t\t\t\tif (xh[i].className == \"dhx_wa_scale_bar\")\r\n\t\t\t\t\txml += \"\" + clean_html(xh[i].innerHTML) + \"\";\r\n\t\t} else if (scheduler._mode == \"agenda\" || scheduler._mode == \"map\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_header[0].childNodes[0].childNodes;\r\n\r\n\t\t\txml += \"\" + clean_html(xh[0].innerHTML) + \"\" + clean_html(xh[1].innerHTML) + \"\";\r\n\t\t} else if (scheduler._mode == \"year\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_data[0].childNodes;\r\n\t\t\tfor (var i = 0; i < xh.length; i++) {\r\n\t\t\t\txml += \"\";\r\n\t\t\t\txml += xml_month_scale(xh[i].querySelector(\".dhx_year_week\").childNodes);\r\n\t\t\t\txml += xml_month(xh[i].querySelector(\".dhx_year_body\"));\r\n\t\t\t\txml += \"\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\txml += \"\";\r\n\t\t\tvar xh = scheduler._els.dhx_cal_header[0].childNodes;\r\n\t\t\txml += xml_month_scale(xh);\r\n\t\t\txml += \"\";\r\n\r\n\t\t\tvar yh = scheduler._els.dhx_cal_data[0];\r\n\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tfor (var i = 0; i < yh.firstChild.rows.length; i++) {\r\n\t\t\t\t\tvar el = yh.firstChild.rows[i];\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t}\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tdy = yh.firstChild.rows[0].cells[0].offsetHeight;\r\n\t\t\t} else if (yh.firstChild.tagName == \"TABLE\") {\r\n\t\t\t\txml += xml_month(yh);\r\n\t\t\t} else {\r\n\t\t\t\tyh = yh.childNodes[yh.childNodes.length - 1];\r\n\t\t\t\twhile (yh.className.indexOf(\"dhx_scale_holder\") == -1)\r\n\t\t\t\t\tyh = yh.previousSibling;\r\n\t\t\t\tyh = yh.childNodes;\r\n\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tfor (var i = 0; i < yh.length; i++)\r\n\t\t\t\t\txml += \"\\n\";\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tdy = yh[0].offsetHeight;\r\n\t\t\t}\r\n\t\t}\r\n\t\txml += \"\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_month(yh) {\r\n\t\tvar xml = \"\";\r\n\t\tvar r = yh.querySelectorAll(\"tr\");\r\n\t\tfor (var i = 0; i < r.length; i++) {\r\n\t\t\tvar days = [];\r\n\t\t\tvar cells = r[i].querySelectorAll(\"td\");\r\n\r\n\t\t\tfor (var j = 0; j < cells.length; j++)\r\n\t\t\t\tdays.push(cells[j].querySelector(\".dhx_month_head\").innerHTML);\r\n\r\n\t\t\txml += \"\\n\";\r\n\t\t\tdy = cells[0].offsetHeight;\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_month_scale(xh) {\r\n\t\tvar xhs,\r\n\t\t\txml = \"\";\r\n\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\tif (scheduler.matrix[scheduler._mode].second_scale)\r\n\t\t\t\txhs = xh[1].childNodes;\r\n\r\n\t\t\txh = xh[0].childNodes;\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < xh.length; i++)\r\n\t\t\txml += \"\\n\";\r\n\t\tdx = xh[0].offsetWidth;\r\n\r\n\t\tif (xhs) {\r\n\t\t\tvar width = 0;\r\n\t\t\tvar top_width = xh[0].offsetWidth;\r\n\t\t\tvar top_col = 1;\r\n\t\t\tfor (var i = 0; i < xhs.length; i++) {\r\n\t\t\t\txml += \"\\n\";\r\n\t\t\t\twidth += xhs[i].offsetWidth;\r\n\t\t\t\tif (width >= top_width) {\r\n\t\t\t\t\ttop_width += (xh[top_col] ? xh[top_col].offsetWidth : 0);\r\n\t\t\t\t\ttop_col++;\r\n\t\t\t\t}\r\n\t\t\t\tdx = xhs[0].offsetWidth;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_body(colors) {\r\n\t\tvar xml = \"\";\r\n\t\tvar evs = scheduler._rendered;\r\n\t\tvar matrix = scheduler.matrix && scheduler.matrix[scheduler._mode];\r\n\r\n\t\tif (scheduler._mode == \"agenda\" || scheduler._mode == \"map\") {\r\n\r\n\t\t\tfor (var i = 0; i < evs.length; i++)\r\n xml += \"\";\r\n\r\n\t\t} else if (scheduler._mode == \"week_agenda\") {\r\n\r\n\t\t\tfor (var i = 0; i < evs.length; i++)\r\n\t\t\t\txml += \"\" + clean_html(evs[i].innerHTML) + \"\";\r\n\r\n\t\t} else if (scheduler._mode == \"year\") {\r\n\r\n\t\t\tvar evs = scheduler.get_visible_events();\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar d = evs[i].start_date;\r\n\t\t\t\tif (d.valueOf() < scheduler._min_date.valueOf())\r\n\t\t\t\t\td = scheduler._min_date;\r\n\r\n\t\t\t\twhile (d < evs[i].end_date) {\r\n\t\t\t\t\tvar m = d.getMonth() + 12 * (d.getFullYear() - scheduler._min_date.getFullYear()) - scheduler.week_starts._month;\r\n\t\t\t\t\tvar day = scheduler.week_starts[m] + d.getDate() - 1;\r\n\t\t\t\t\tvar text_color = colors ? get_style(scheduler._get_year_cell(d), \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(scheduler._get_year_cell(d), \"backgroundColor\") : \"\";\r\n\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t\td = scheduler.date.add(d, 1, \"day\");\r\n\t\t\t\t\tif (d.valueOf() >= scheduler._max_date.valueOf())\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (matrix && matrix.render == \"cell\") {\r\n\t\t\tvar evs = scheduler._els.dhx_cal_data[0].getElementsByTagName(\"TD\");\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar text_color = colors ? get_style(evs[i], \"color\") : \"\";\r\n\t\t\t\tvar bg_color = colors ? get_style(evs[i], \"backgroundColor\") : \"\";\r\n\t\t\t\txml += \"\\n\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar zx, zdx;\r\n\t\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\t\t// logic for timeline view\r\n\t\t\t\t\tzx = x_norm(evs[i].style.left);\r\n\t\t\t\t\tzdx = x_norm(evs[i].offsetWidth)-1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// we should use specific logic for day/week/units view\r\n\t\t\t\t\tvar left_norm = scheduler.config.use_select_menu_space ? 0 : 26;\r\n\t\t\t\t\tzx = x_norm_event(evs[i].style.left, left_norm, true);\r\n\t\t\t\t\tzdx = x_norm_event(evs[i].style.width, left_norm)-1;\r\n\t\t\t\t}\r\n\t\t\t\tif (isNaN(zdx * 1)) continue;\r\n\t\t\t\tvar zy = y_norm(evs[i].style.top);\r\n\t\t\t\tvar zdy = y_norm(evs[i].style.height);\r\n\r\n\t\t\t\tvar e_type = evs[i].className.split(\" \")[0].replace(\"dhx_cal_\", \"\");\r\n\t\t\t\tif (e_type === 'dhx_tooltip_line') continue;\r\n\r\n\t\t\t\tvar dets = scheduler.getEvent(evs[i].getAttribute(scheduler.config.event_attribute));\r\n if (!dets) continue;\r\n\t\t\t\tvar day = dets._sday;\r\n\t\t\t\tvar week = dets._sweek;\r\n\t\t\t\tvar length = dets._length || 0;\r\n\r\n\t\t\t\tif (scheduler._mode == \"month\") {\r\n\t\t\t\t\tzdy = parseInt(evs[i].offsetHeight, 10);\r\n\t\t\t\t\tzy = parseInt(evs[i].style.top, 10) - scheduler.xy.month_head_height;\r\n\r\n\t\t\t\t\tday = de_day(evs[i], day);\r\n\t\t\t\t\tweek = de_week(evs[i], week);\r\n\t\t\t\t} else if (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\t\tday = 0;\r\n\t\t\t\t\tvar el = evs[i].parentNode.parentNode.parentNode;\r\n\t\t\t\t\tweek = el.rowIndex;\r\n\t\t\t\t\tvar dy_copy = dy;\r\n\t\t\t\t\tdy = evs[i].parentNode.offsetHeight;\r\n\t\t\t\t\tzy = y_norm(evs[i].style.top);\r\n\t\t\t\t\tzy -= zy * 0.2;\r\n\t\t\t\t\tdy = dy_copy;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (evs[i].parentNode == scheduler._els.dhx_cal_data[0]) continue;\r\n\t\t\t\t\tvar parent = scheduler._els[\"dhx_cal_data\"][0].childNodes[0];\r\n\t\t\t\t\tvar offset = parseFloat(parent.className.indexOf(\"dhx_scale_holder\") != -1 ? parent.style.left : 0);\r\n\t\t\t\t\tzx += x_norm(evs[i].parentNode.style.left, offset);\r\n\t\t\t\t}\r\n\r\n\t\t\t\txml += \"\\n\";\r\n\r\n\t\t\t\tif (e_type == \"event\") {\r\n\t\t\t\t\txml += \"
\";\r\n\t\t\t\t\tvar text_color = colors ? get_style(evs[i].childNodes[2], \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(evs[i].childNodes[2], \"backgroundColor\") : \"\";\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar text_color = colors ? get_style(evs[i], \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(evs[i], \"backgroundColor\") : \"\";\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t}\r\n\t\t\t\txml += \"
\";\r\n\t\t\t}\r\n\t\t\t}\r\n\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction toXML(start, end, view, mode, header, footer){\r\n\t\tvar colors = false;\r\n\t\tif (mode == \"fullcolor\") {\r\n\t\t\tcolors = true;\r\n\t\t\tmode = \"color\";\r\n\t\t}\r\n\r\n\t\tmode = mode || \"color\";\r\n\r\n\t\tvar xml = \"\";\r\n\t\tif (start) {\r\n\r\n\t\t\tvar original_date = scheduler._date;\r\n\t\t\tvar original_mode = scheduler._mode;\r\n\t\t\tend = scheduler.date[view+\"_start\"](end);\r\n\t\t\tend = scheduler.date[\"get_\"+view+\"_end\"] ? scheduler.date[\"get_\"+view+\"_end\"](end) : scheduler.date.add(end, 1, view);\r\n\r\n\t\t\txml = xml_top(\"pages\", mode, header, footer);\r\n\t\t\tfor (var temp_date = new Date(start); +temp_date < +end; temp_date = this.date.add(temp_date, 1, view)) {\r\n\t\t\t\tthis.setCurrentView(temp_date, view);\r\n\t\t\t\txml += xml_start(\"page\") + xml_body_header().replace(\"\\u2013\", \"-\") + xml_body(colors) + xml_end(\"page\");\r\n\t\t\t}\r\n\t\t\txml += xml_end(\"pages\");\r\n\r\n\t\t\tthis.setCurrentView(original_date, original_mode);\r\n\t\t} else {\r\n\t\t\txml = xml_top(\"data\", mode, header, footer) + xml_body_header().replace(\"\\u2013\", \"-\") + xml_body(colors) + xml_end(\"data\");\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\tscheduler.getPDFData = toXML;\r\n\tfunction send_xml(xml, url){\r\n\t\tvar uid = scheduler.uid();\r\n\t\tvar d = document.createElement(\"div\");\r\n\t\td.style.display = \"none\";\r\n\t\tdocument.body.appendChild(d);\r\n\r\n\t\td.innerHTML = '
';\r\n\t\tdocument.getElementById(uid).firstChild.value = encodeURIComponent(xml);\r\n\t\tdocument.getElementById(uid).submit();\r\n\t\td.parentNode.removeChild(d);\r\n\t}\r\n\r\n\tfunction to_pdf(start, end, view, url, mode, header, footer) {\r\n\t\tvar xml = \"\";\r\n\t\tif(typeof mode == \"object\"){\r\n\t\t\txml = schedulersToPdf(mode);\r\n\t\t}else{\r\n\t\t\txml = toXML.apply(this, [start, end, view, mode, header, footer]);\r\n\t\t}\r\n\r\n\t\tsend_xml(xml, url);\r\n\t}\r\n\r\n\tfunction schedulersToPdf(objects){\r\n\t\tvar xml = \"\";\r\n\t\tfor(var i=0; i < objects.length; i++){\r\n\t\t\txml += objects[i].source.getPDFData(objects[i].start, objects[i].end, objects[i].view, objects[i].mode, objects[i].header, objects[i].footer);\r\n\t\t}\r\n\t\txml += \"\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\t/*\r\n\t * scheduler.toPDF(url, mode, header, footer) - for a single scheduler\r\n\t * scheduler.toPDF(url, [scheduler1, scheduler2,...]) - for multiple schedulers\r\n\t * example:\r\n\t * scheduler.toPDF(\"generate.ashx\", [\r\n\t * { source: scheduler1, mode: \"color\" },\r\n\t * { source: scheduler2, mode: \"gray\", view:\"week\", start:new Date(2013, 06, 1), end:new Date(2013, 06, 28) },\r\n\t * { source: scheduler3 }\r\n\t * ]);\r\n\t *\r\n\t */\r\n\tscheduler.toPDF = function(url, mode, header, footer) {\r\n\t\treturn to_pdf.apply(this, [null, null, null, url, mode, header, footer]);\r\n\t};\r\n\tscheduler.toPDFRange = function(start, end, view, url, mode, header, footer) {\r\n\t\tif (typeof start == \"string\") {\r\n\t\t\tstart = scheduler.templates.api_date(start);\r\n\t\t\tend = scheduler.templates.api_date(end);\r\n\t\t}\r\n\r\n\t\treturn to_pdf.apply(this, arguments);\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.icons_select = [\"icon_form\", \"icon_delete\"];\r\nscheduler.config.details_on_create = true;\r\nscheduler.config.show_quick_info = true;\r\nscheduler.xy.menu_width = 0;\r\n\r\n\r\n\r\nlet clickedElementPosition = null;\r\nscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\tconst container = scheduler.$container;\r\n\tif(container._$quickInfoHandler){\r\n\t\treturn;\r\n\t}else{\r\n\t\tcontainer._$quickInfoHandler = true;\r\n\t\t// store coordinates of clicked segment of an event\r\n\t\t// in case multi section events or multi-line month events\r\n\t\tscheduler.event(container, \"mousedown\", function(e){\r\n\t\t\tconst eventElement = e.target.closest(`[${scheduler.config.event_attribute}]`);\r\n\t\t\tif (eventElement) {\r\n\t\t\t\tclickedElementPosition = {\r\n\t\t\t\t\tid: eventElement.getAttribute(scheduler.config.event_attribute),\r\n\t\t\t\t\tposition: getPositionInsideScheduler(eventElement)\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t});\r\n\t\tscheduler.attachEvent(\"onDestroy\", () => {\r\n\t\t\tdelete container._$quickInfoHandler;\r\n\t\t});\r\n\t}\r\n});\r\n\r\nscheduler.attachEvent(\"onClick\", function(id){\r\n\tif(!scheduler.config.show_quick_info){\r\n\t\treturn;\r\n\t}\r\n\tscheduler.showQuickInfo(id);\r\n\treturn true;\r\n});\r\n\r\n(function(){\r\n\t// pass `force` argument in order to hide quick info synchronously\r\n\t// so it won't affect showQuickInfo call that can follow\r\n\tvar events = [\"onEmptyClick\", \"onViewChange\", \"onLightbox\", \"onBeforeEventDelete\", \"onBeforeDrag\"];\r\n\tvar hiding_function = function(){\r\n\t\tscheduler.hideQuickInfo(true);\r\n\t\treturn true;\r\n\t};\r\n\tfor (var i=0; i window.innerWidth){\r\n\t\t\tleft = window.innerWidth - width;\r\n\t\t}\r\n\t\tleft = Math.max(0, left);\r\n\r\n\t\tqi.style.left = left + \"px\";\r\n\t\tqi.style.top = pos.top - (pos.dy?height:-pos.height) + \"px\";\r\n\t} else {\r\n\r\n\t\tconst dataPos = scheduler.$container.querySelector('.dhx_cal_data').offsetTop;\r\n\t\tqi.style.top = dataPos + 20 + \"px\";\r\n\t\tif (pos.dx == 1){\r\n\t\t\tqi.style.right = \"auto\";\r\n\t\t\tqi.style.left = -width + \"px\";\r\n\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tqi.style.left = \"-10px\";\r\n\t\t\t},1);\r\n\t\t} else {\r\n\t\t\tqi.style.left = \"auto\";\r\n\t\t\tqi.style.right = -width + \"px\";\r\n\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tqi.style.right = \"-10px\";\r\n\t\t\t},1);\r\n\t\t}\r\n\t\tqi.className = qi.className.replace(\" dhx_qi_left\",\"\").replace(\" dhx_qi_right\",\"\")+\" dhx_qi_\"+(pos.dx==1?\"left\":\"right\");\r\n\t}\r\n\r\n\tqi.ontransitionend = () => {\r\n\t\tfitQIInsideWindow(qi);\r\n\t\tqi.ontransitionend = null;\r\n\t};\r\n\tsetTimeout(() => {\r\n\t\tfitQIInsideWindow(qi);\r\n\t}, 1);\r\n};\r\n\r\nfunction fitQIInsideWindow(quickInfoPopup){\r\n\tconst popupRect = quickInfoPopup.getBoundingClientRect();\r\n\tconst containerRect = scheduler.$container.getBoundingClientRect();\r\n\r\n\t// calculate the bottom offset of the Quick Info relative to the scheduler container\r\n\tconst offsetBottom = containerRect.bottom - popupRect.bottom;\r\n\r\n\t// If the popup extends outside the scheduler container, adjust its top position\r\n\tif (offsetBottom < 0) {\r\n\t\tquickInfoPopup.style.top = `${parseFloat(quickInfoPopup.style.top) + offsetBottom}px`;\r\n\t}\r\n}\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function(){\r\n\tscheduler.hideQuickInfo();\r\n\tif(this._quick_info_box){\r\n\t\tvar box = this._quick_info_box;\r\n\t\tif(box.parentNode){\r\n\t\t\tbox.parentNode.removeChild(box);\r\n\t\t}\r\n\t\tthis._quick_info_box = null;\r\n\t}\r\n});\r\nscheduler._quick_info_onscroll_handler = function(e){\r\n\tscheduler.hideQuickInfo();\r\n};\r\nscheduler._init_quick_info = function(){\r\n\tif (!this._quick_info_box){\r\n\r\n\r\n\t\tvar qi = this._quick_info_box = document.createElement(\"div\");\r\n\r\n\t\tthis._waiAria.quickInfoAttr(qi);\r\n\r\n\t\tqi.className = \"dhx_cal_quick_info\";\r\n\t\tif (scheduler.$testmode)\r\n\t\t\tqi.className += \" dhx_no_animate\";\r\n\t\tif (scheduler.config.rtl) qi.className += \" dhx_quick_info_rtl\";\r\n\t//title\r\n\t\tvar ariaAttr = this._waiAria.quickInfoHeaderAttrString();\r\n\t\tvar html = `\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t\t
\r\n\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t\t
`;\r\n\r\n\t//buttons\r\n\t\thtml += \"
\";\r\n\t\tvar buttons = scheduler.config.icons_select;\r\n\t\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\t\tvar ariaAttr = this._waiAria.quickInfoButtonAttrString(this.locale.labels[buttons[i]]);\r\n\t\t\t\thtml += `
\r\n\t\t\t\t
${scheduler.locale.labels[buttons[i]]}
`;\r\n\t\t\t}\r\n\t\t// }\r\n\t\thtml += \"
\";\r\n\r\n\t\tqi.innerHTML = html;\r\n\t\tscheduler.event(qi, \"click\", function(ev){\r\n\t\t\tscheduler._qi_button_click(ev.target || ev.srcElement);\r\n\t\t});\r\n\t\tif (scheduler.config.quick_info_detached){\r\n\t\t\tscheduler._detachDomEvent(scheduler._els[\"dhx_cal_data\"][0], \"scroll\", scheduler._quick_info_onscroll_handler);\r\n\t\t\tscheduler.event(scheduler._els[\"dhx_cal_data\"][0], \"scroll\", scheduler._quick_info_onscroll_handler);\r\n\t\t}\r\n\t}\r\n\r\n\treturn this._quick_info_box;\r\n};\r\n\r\nscheduler._qi_button_click = function(node){\r\n\tvar box = scheduler._quick_info_box;\r\n\tif (!node || node == box) return;\r\n\r\n\tif(node.closest(\".dhx_cal_qi_close_btn\")){\r\n\t\tscheduler.hideQuickInfo();\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar mask = scheduler._getClassName(node);\r\n\tif (mask.indexOf(\"_icon\")!=-1){\r\n\t\tvar id = scheduler._quick_info_box_id;\r\n\t\tscheduler._click.buttons[mask.split(\" \")[1].replace(\"icon_\",\"\")](id);\r\n\t} else\r\n\t\tscheduler._qi_button_click(node.parentNode);\r\n};\r\n\r\nfunction getPositionInsideScheduler(element){\r\n\tlet left = 0;\r\n\tlet top = 0;\r\n\r\n\tlet node = element;\r\n\twhile (node && node != scheduler._obj){\r\n\t\tleft += node.offsetLeft;\r\n\t\ttop += node.offsetTop-node.scrollTop;\r\n\t\tnode = node.offsetParent;\r\n\t}\r\n\tif(node){\r\n\t\tlet dx = (left + element.offsetWidth/2) > (scheduler._x/2) ? 1 : 0;\r\n\t\tlet dy = (top + element.offsetHeight/2) > (scheduler._y/2) ? 1 : 0;\r\n\r\n\t\treturn { left:left, top:top, dx:dx, dy:dy,\r\n\t\t\twidth:element.offsetWidth, height:element.offsetHeight };\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\nscheduler._get_event_counter_part = function(id){\r\n\tvar domEv = scheduler.getRenderedEvent(id);\r\n\treturn getPositionInsideScheduler(domEv);\r\n};\r\n\r\nscheduler._fill_quick_data = function(id){\r\n\tvar ev = scheduler.getEvent(id);\r\n\tvar qi = scheduler._quick_info_box;\r\n\r\n\tscheduler._quick_info_box_id = id;\r\n\r\n//title content\r\n\r\n\tvar header = {\r\n\t\tcontent: scheduler.templates.quick_info_title(ev.start_date, ev.end_date, ev),\r\n\t\tdate: scheduler.templates.quick_info_date(ev.start_date, ev.end_date, ev)\r\n\t};\r\n\tvar titleContent = qi.querySelector(\".dhx_cal_qi_tcontent\");\r\n\ttitleContent.innerHTML = `${header.content}`;\r\n\tvar titleDate = qi.querySelector(\".dhx_cal_qi_tdate\");\r\n\ttitleDate.innerHTML = header.date;\r\n\r\n\tscheduler._waiAria.quickInfoHeader(qi, [header.content, header.date].join(\" \"));\r\n\r\n//main content\r\n\tvar main = qi.querySelector(\".dhx_cal_qi_content\");\r\n\tconst mainContent = scheduler.templates.quick_info_content(ev.start_date, ev.end_date, ev);\r\n\tif(mainContent){\r\n\t\tmain.classList.remove(\"dhx_hidden\");\r\n\t\tmain.innerHTML = mainContent;\r\n\t}else{\r\n\t\tmain.classList.add(\"dhx_hidden\");\r\n\t}\r\n};\r\n\r\n\r\n}","export default function(scheduler){\r\n\t\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar originalRecurringSetValue;\r\n\tif (scheduler.form_blocks.recurring) {\r\n\t\toriginalRecurringSetValue = scheduler.form_blocks.recurring.set_value;\r\n\t}\r\n\tvar original_left_buttons = scheduler.config.buttons_left.slice();\r\n\tvar original_right_buttons = scheduler.config.buttons_right.slice();\r\n\r\n\tscheduler.attachEvent(\"onBeforeLightbox\", function(id) {\r\n\t\tif (this.config.readonly_form || this.getEvent(id).readonly) {\r\n\t\t\tthis.config.readonly_active = true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.config.readonly_active = false;\r\n\t\t\tscheduler.config.buttons_left = original_left_buttons.slice();\r\n\t\t\tscheduler.config.buttons_right = original_right_buttons.slice();\r\n\t\r\n\t\t\t// initial value\r\n\t\t\tif(scheduler.form_blocks.recurring) {\r\n\t\t\t\tscheduler.form_blocks.recurring.set_value = originalRecurringSetValue;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar sns = this.config.lightbox.sections;\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\tfor (var i = 0; i < sns.length; i++) {\r\n\t\t\t\tif (sns[i].type == 'recurring') {\r\n\t\t\t\t\tif (this.config.readonly_active && scheduler.form_blocks.recurring) {\r\n\t\t\t\t\t\tscheduler.form_blocks.recurring.set_value = function(node, value, ev) {\r\n\t\t\t\t\t\t\tvar wrapper = scheduler.$domHelpers.closest(node, \".dhx_wrap_section\");\r\n\t\t\t\t\t\t\tvar style = \"none\";\r\n\t\t\t\t\t\t\twrapper.querySelector('.dhx_cal_lsection').display = style;\r\n\t\t\t\t\t\t\twrapper.querySelector('.dhx_form_repeat').display = style;\r\n\t\t\t\t\t\t\twrapper.style.display = style;\r\n\r\n\t\t\t\t\t\t\tscheduler.setLightboxSize();\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar forbidden_buttons = [\"dhx_delete_btn\", \"dhx_save_btn\"];\r\n\t\t\tvar button_arrays = [scheduler.config.buttons_left, scheduler.config.buttons_right];\r\n\t\t\tfor (var i = 0; i < forbidden_buttons.length; i++) {\r\n\t\t\t\tvar forbidden_button = forbidden_buttons[i];\r\n\t\t\t\tfor (var k = 0; k < button_arrays.length; k++) {\r\n\t\t\t\t\tvar button_array = button_arrays[k];\r\n\t\t\t\t\tvar index = -1;\r\n\t\t\t\t\tfor (var p = 0; p < button_array.length; p++) {\r\n\t\t\t\t\t\tif (button_array[p] == forbidden_button) {\r\n\t\t\t\t\t\t\tindex = p;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (index != -1) {\r\n\t\t\t\t\t\tbutton_array.splice(index, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.resetLightbox();\r\n\r\n\t\treturn true;\r\n\t});\r\n\r\n\tfunction txt_replace(tag, d, n, text) {\r\n\t\tvar txts = d.getElementsByTagName(tag);\r\n\t\tvar txtt = n.getElementsByTagName(tag);\r\n\t\tfor (var i = txtt.length - 1; i >= 0; i--) {\r\n\t\t\tvar n = txtt[i];\r\n\t\t\tif (!text){\r\n\t\t\t\tn.disabled = true;\r\n\t\t\t\t//radio and checkboxes loses state after .cloneNode in IE\r\n\t\t\t\tif(d.checked)\r\n\t\t\t\t\tn.checked = true;\r\n\t\t\t}else {\r\n\t\t\t\tvar t = document.createElement(\"span\");\r\n\t\t\t\tt.className = \"dhx_text_disabled\";\r\n\t\t\t\tt.innerHTML = text(txts[i]);\r\n\t\t\t\tn.parentNode.insertBefore(t, n);\r\n\t\t\t\tn.parentNode.removeChild(n);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tvar old = scheduler._fill_lightbox;\r\n\tscheduler._fill_lightbox = function() {\r\n\r\n\t\tvar lb = this.getLightbox();\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\tlb.style.visibility = 'hidden';\r\n\t\t\t// lightbox should have actual sizes before rendering controls\r\n\t\t\t// currently only matters for dhtmlxCombo\r\n\t\t\tlb.style.display = 'block';\r\n\t\t}\r\n\t\tvar res = old.apply(this, arguments);\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\t//reset visibility and display\r\n\t\t\tlb.style.visibility = '';\r\n\t\t\tlb.style.display = 'none';\r\n\t\t}\r\n\r\n\t\tif (this.config.readonly_active) {\r\n\r\n\t\t\tvar originalForm = this.getLightbox();\r\n\t\t\tvar readonlyForm = this._lightbox_r = originalForm.cloneNode(true);\r\n\t\t\treadonlyForm.id = scheduler.uid();\r\n\t\t\treadonlyForm.className += \" dhx_cal_light_readonly\";\r\n\t\t\ttxt_replace(\"textarea\", originalForm, readonlyForm, function(a) {\r\n\t\t\t\treturn a.value;\r\n\t\t\t});\r\n\t\t\ttxt_replace(\"input\", originalForm, readonlyForm, false);\r\n\t\t\ttxt_replace(\"select\", originalForm, readonlyForm, function(a) {\r\n\t\t\t\tif(!a.options.length) return \"\";\r\n\t\t\t\treturn a.options[Math.max((a.selectedIndex || 0), 0)].text;\r\n\t\t\t});\r\n\r\n\t\t\toriginalForm.parentNode.insertBefore(readonlyForm, originalForm);\r\n\r\n\t\t\tthis.showCover(readonlyForm);\r\n\t\t\tif (scheduler._lightbox)\r\n\t\t\t\tscheduler._lightbox.parentNode.removeChild(scheduler._lightbox);\r\n\t\t\tthis._lightbox = readonlyForm;\r\n\r\n\t\t\tif (scheduler.config.drag_lightbox)\r\n\t\t\t\tscheduler.event(readonlyForm.firstChild, \"mousedown\", scheduler._ready_to_dnd);\r\n\t\t\t\t\r\n\t\t\tscheduler._init_lightbox_events();\r\n\t\t\tthis.setLightboxSize();\r\n\t\t}\r\n\t\treturn res;\r\n\t};\r\n\r\n\tvar hold = scheduler.hide_lightbox;\r\n\tscheduler.hide_lightbox = function() {\r\n\t\tif (this._lightbox_r) {\r\n\t\t\tthis._lightbox_r.parentNode.removeChild(this._lightbox_r);\r\n\t\t\tthis._lightbox_r = this._lightbox = null;\r\n\t\t}\r\n\r\n\t\treturn hold.apply(this, arguments);\r\n\t};\r\n});\r\n\r\n\r\n}","// =============================================================================\n// Weekday\n// =============================================================================\nexport var ALL_WEEKDAYS = [\n 'MO',\n 'TU',\n 'WE',\n 'TH',\n 'FR',\n 'SA',\n 'SU',\n];\nvar Weekday = /** @class */ (function () {\n function Weekday(weekday, n) {\n if (n === 0)\n throw new Error(\"Can't create weekday with n == 0\");\n this.weekday = weekday;\n this.n = n;\n }\n Weekday.fromStr = function (str) {\n return new Weekday(ALL_WEEKDAYS.indexOf(str));\n };\n // __call__ - Cannot call the object directly, do it through\n // e.g. RRule.TH.nth(-1) instead,\n Weekday.prototype.nth = function (n) {\n return this.n === n ? this : new Weekday(this.weekday, n);\n };\n // __eq__\n Weekday.prototype.equals = function (other) {\n return this.weekday === other.weekday && this.n === other.n;\n };\n // __repr__\n Weekday.prototype.toString = function () {\n var s = ALL_WEEKDAYS[this.weekday];\n if (this.n)\n s = (this.n > 0 ? '+' : '') + String(this.n) + s;\n return s;\n };\n Weekday.prototype.getJsWeekday = function () {\n return this.weekday === 6 ? 0 : this.weekday + 1;\n };\n return Weekday;\n}());\nexport { Weekday };\n//# sourceMappingURL=weekday.js.map","// =============================================================================\n// Helper functions\n// =============================================================================\nimport { ALL_WEEKDAYS } from './weekday';\nexport var isPresent = function (value) {\n return value !== null && value !== undefined;\n};\nexport var isNumber = function (value) {\n return typeof value === 'number';\n};\nexport var isWeekdayStr = function (value) {\n return typeof value === 'string' && ALL_WEEKDAYS.includes(value);\n};\nexport var isArray = Array.isArray;\n/**\n * Simplified version of python's range()\n */\nexport var range = function (start, end) {\n if (end === void 0) { end = start; }\n if (arguments.length === 1) {\n end = start;\n start = 0;\n }\n var rang = [];\n for (var i = start; i < end; i++)\n rang.push(i);\n return rang;\n};\nexport var clone = function (array) {\n return [].concat(array);\n};\nexport var repeat = function (value, times) {\n var i = 0;\n var array = [];\n if (isArray(value)) {\n for (; i < times; i++)\n array[i] = [].concat(value);\n }\n else {\n for (; i < times; i++)\n array[i] = value;\n }\n return array;\n};\nexport var toArray = function (item) {\n if (isArray(item)) {\n return item;\n }\n return [item];\n};\nexport function padStart(item, targetLength, padString) {\n if (padString === void 0) { padString = ' '; }\n var str = String(item);\n targetLength = targetLength >> 0;\n if (str.length > targetLength) {\n return String(str);\n }\n targetLength = targetLength - str.length;\n if (targetLength > padString.length) {\n padString += repeat(padString, targetLength / padString.length);\n }\n return padString.slice(0, targetLength) + String(str);\n}\n/**\n * Python like split\n */\nexport var split = function (str, sep, num) {\n var splits = str.split(sep);\n return num\n ? splits.slice(0, num).concat([splits.slice(num).join(sep)])\n : splits;\n};\n/**\n * closure/goog/math/math.js:modulo\n * Copyright 2006 The Closure Library Authors.\n * The % operator in JavaScript returns the remainder of a / b, but differs from\n * some other languages in that the result will have the same sign as the\n * dividend. For example, -1 % 8 == -1, whereas in some other languages\n * (such as Python) the result would be 7. This function emulates the more\n * correct modulo behavior, which is useful for certain applications such as\n * calculating an offset index in a circular list.\n *\n * @param {number} a The dividend.\n * @param {number} b The divisor.\n * @return {number} a % b where the result is between 0 and b (either 0 <= x < b\n * or b < x <= 0, depending on the sign of b).\n */\nexport var pymod = function (a, b) {\n var r = a % b;\n // If r and b differ in sign, add b to wrap the result to the correct sign.\n return r * b < 0 ? r + b : r;\n};\n/**\n * @see: \n */\nexport var divmod = function (a, b) {\n return { div: Math.floor(a / b), mod: pymod(a, b) };\n};\nexport var empty = function (obj) {\n return !isPresent(obj) || obj.length === 0;\n};\n/**\n * Python-like boolean\n *\n * @return {Boolean} value of an object/primitive, taking into account\n * the fact that in Python an empty list's/tuple's\n * boolean value is False, whereas in JS it's true\n */\nexport var notEmpty = function (obj) {\n return !empty(obj);\n};\n/**\n * Return true if a value is in an array\n */\nexport var includes = function (arr, val) {\n return notEmpty(arr) && arr.indexOf(val) !== -1;\n};\n//# sourceMappingURL=helpers.js.map","import { padStart } from './helpers';\nexport var datetime = function (y, m, d, h, i, s) {\n if (h === void 0) { h = 0; }\n if (i === void 0) { i = 0; }\n if (s === void 0) { s = 0; }\n return new Date(Date.UTC(y, m - 1, d, h, i, s));\n};\n/**\n * General date-related utilities.\n * Also handles several incompatibilities between JavaScript and Python\n *\n */\nexport var MONTH_DAYS = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n/**\n * Number of milliseconds of one day\n */\nexport var ONE_DAY = 1000 * 60 * 60 * 24;\n/**\n * @see: \n */\nexport var MAXYEAR = 9999;\n/**\n * Python uses 1-Jan-1 as the base for calculating ordinals but we don't\n * want to confuse the JS engine with milliseconds > Number.MAX_NUMBER,\n * therefore we use 1-Jan-1970 instead\n */\nexport var ORDINAL_BASE = datetime(1970, 1, 1);\n/**\n * Python: MO-SU: 0 - 6\n * JS: SU-SAT 0 - 6\n */\nexport var PY_WEEKDAYS = [6, 0, 1, 2, 3, 4, 5];\n/**\n * py_date.timetuple()[7]\n */\nexport var getYearDay = function (date) {\n var dateNoTime = new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate());\n return (Math.ceil((dateNoTime.valueOf() - new Date(date.getUTCFullYear(), 0, 1).valueOf()) /\n ONE_DAY) + 1);\n};\nexport var isLeapYear = function (year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n};\nexport var isDate = function (value) {\n return value instanceof Date;\n};\nexport var isValidDate = function (value) {\n return isDate(value) && !isNaN(value.getTime());\n};\n/**\n * @return {Number} the date's timezone offset in ms\n */\nexport var tzOffset = function (date) {\n return date.getTimezoneOffset() * 60 * 1000;\n};\n/**\n * @see: \n */\nexport var daysBetween = function (date1, date2) {\n // The number of milliseconds in one day\n // Convert both dates to milliseconds\n var date1ms = date1.getTime();\n var date2ms = date2.getTime();\n // Calculate the difference in milliseconds\n var differencems = date1ms - date2ms;\n // Convert back to days and return\n return Math.round(differencems / ONE_DAY);\n};\n/**\n * @see: \n */\nexport var toOrdinal = function (date) {\n return daysBetween(date, ORDINAL_BASE);\n};\n/**\n * @see - \n */\nexport var fromOrdinal = function (ordinal) {\n return new Date(ORDINAL_BASE.getTime() + ordinal * ONE_DAY);\n};\nexport var getMonthDays = function (date) {\n var month = date.getUTCMonth();\n return month === 1 && isLeapYear(date.getUTCFullYear())\n ? 29\n : MONTH_DAYS[month];\n};\n/**\n * @return {Number} python-like weekday\n */\nexport var getWeekday = function (date) {\n return PY_WEEKDAYS[date.getUTCDay()];\n};\n/**\n * @see: \n */\nexport var monthRange = function (year, month) {\n var date = datetime(year, month + 1, 1);\n return [getWeekday(date), getMonthDays(date)];\n};\n/**\n * @see: \n */\nexport var combine = function (date, time) {\n time = time || date;\n return new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), time.getHours(), time.getMinutes(), time.getSeconds(), time.getMilliseconds()));\n};\nexport var clone = function (date) {\n var dolly = new Date(date.getTime());\n return dolly;\n};\nexport var cloneDates = function (dates) {\n var clones = [];\n for (var i = 0; i < dates.length; i++) {\n clones.push(clone(dates[i]));\n }\n return clones;\n};\n/**\n * Sorts an array of Date or Time objects\n */\nexport var sort = function (dates) {\n dates.sort(function (a, b) {\n return a.getTime() - b.getTime();\n });\n};\nexport var timeToUntilString = function (time, utc) {\n if (utc === void 0) { utc = true; }\n var date = new Date(time);\n return [\n padStart(date.getUTCFullYear().toString(), 4, '0'),\n padStart(date.getUTCMonth() + 1, 2, '0'),\n padStart(date.getUTCDate(), 2, '0'),\n 'T',\n padStart(date.getUTCHours(), 2, '0'),\n padStart(date.getUTCMinutes(), 2, '0'),\n padStart(date.getUTCSeconds(), 2, '0'),\n utc ? 'Z' : '',\n ].join('');\n};\nexport var untilStringToDate = function (until) {\n var re = /^(\\d{4})(\\d{2})(\\d{2})(T(\\d{2})(\\d{2})(\\d{2})Z?)?$/;\n var bits = re.exec(until);\n if (!bits)\n throw new Error(\"Invalid UNTIL value: \".concat(until));\n return new Date(Date.UTC(parseInt(bits[1], 10), parseInt(bits[2], 10) - 1, parseInt(bits[3], 10), parseInt(bits[5], 10) || 0, parseInt(bits[6], 10) || 0, parseInt(bits[7], 10) || 0));\n};\nvar dateTZtoISO8601 = function (date, timeZone) {\n // date format for sv-SE is almost ISO8601\n var dateStr = date.toLocaleString('sv-SE', { timeZone: timeZone });\n // '2023-02-07 10:41:36'\n return dateStr.replace(' ', 'T') + 'Z';\n};\nexport var dateInTimeZone = function (date, timeZone) {\n var localTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;\n // Date constructor can only reliably parse dates in ISO8601 format\n var dateInLocalTZ = new Date(dateTZtoISO8601(date, localTimeZone));\n var dateInTargetTZ = new Date(dateTZtoISO8601(date, timeZone !== null && timeZone !== void 0 ? timeZone : 'UTC'));\n var tzOffset = dateInTargetTZ.getTime() - dateInLocalTZ.getTime();\n return new Date(date.getTime() - tzOffset);\n};\n//# sourceMappingURL=dateutil.js.map","/**\n * This class helps us to emulate python's generators, sorta.\n */\nvar IterResult = /** @class */ (function () {\n function IterResult(method, args) {\n this.minDate = null;\n this.maxDate = null;\n this._result = [];\n this.total = 0;\n this.method = method;\n this.args = args;\n if (method === 'between') {\n this.maxDate = args.inc\n ? args.before\n : new Date(args.before.getTime() - 1);\n this.minDate = args.inc ? args.after : new Date(args.after.getTime() + 1);\n }\n else if (method === 'before') {\n this.maxDate = args.inc ? args.dt : new Date(args.dt.getTime() - 1);\n }\n else if (method === 'after') {\n this.minDate = args.inc ? args.dt : new Date(args.dt.getTime() + 1);\n }\n }\n /**\n * Possibly adds a date into the result.\n *\n * @param {Date} date - the date isn't necessarly added to the result\n * list (if it is too late/too early)\n * @return {Boolean} true if it makes sense to continue the iteration\n * false if we're done.\n */\n IterResult.prototype.accept = function (date) {\n ++this.total;\n var tooEarly = this.minDate && date < this.minDate;\n var tooLate = this.maxDate && date > this.maxDate;\n if (this.method === 'between') {\n if (tooEarly)\n return true;\n if (tooLate)\n return false;\n }\n else if (this.method === 'before') {\n if (tooLate)\n return false;\n }\n else if (this.method === 'after') {\n if (tooEarly)\n return true;\n this.add(date);\n return false;\n }\n return this.add(date);\n };\n /**\n *\n * @param {Date} date that is part of the result.\n * @return {Boolean} whether we are interested in more values.\n */\n IterResult.prototype.add = function (date) {\n this._result.push(date);\n return true;\n };\n /**\n * 'before' and 'after' return only one date, whereas 'all'\n * and 'between' an array.\n *\n * @return {Date,Array?}\n */\n IterResult.prototype.getValue = function () {\n var res = this._result;\n switch (this.method) {\n case 'all':\n case 'between':\n return res;\n case 'before':\n case 'after':\n default:\n return (res.length ? res[res.length - 1] : null);\n }\n };\n IterResult.prototype.clone = function () {\n return new IterResult(this.method, this.args);\n };\n return IterResult;\n}());\nexport default IterResult;\n//# sourceMappingURL=iterresult.js.map","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol */\n\nvar 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 (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(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\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n function next() {\n while (env.stack.length) {\n var rec = env.stack.pop();\n try {\n var result = rec.dispose && rec.dispose.call(rec.value);\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n catch (e) {\n fail(e);\n }\n }\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n};\n","import { __extends } from \"tslib\";\nimport IterResult from './iterresult';\n/**\n * IterResult subclass that calls a callback function on each add,\n * and stops iterating when the callback returns false.\n */\nvar CallbackIterResult = /** @class */ (function (_super) {\n __extends(CallbackIterResult, _super);\n function CallbackIterResult(method, args, iterator) {\n var _this = _super.call(this, method, args) || this;\n _this.iterator = iterator;\n return _this;\n }\n CallbackIterResult.prototype.add = function (date) {\n if (this.iterator(date, this._result.length)) {\n this._result.push(date);\n return true;\n }\n return false;\n };\n return CallbackIterResult;\n}(IterResult));\nexport default CallbackIterResult;\n//# sourceMappingURL=callbackiterresult.js.map","// =============================================================================\n// i18n\n// =============================================================================\nvar ENGLISH = {\n dayNames: [\n 'Sunday',\n 'Monday',\n 'Tuesday',\n 'Wednesday',\n 'Thursday',\n 'Friday',\n 'Saturday',\n ],\n monthNames: [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n ],\n tokens: {\n SKIP: /^[ \\r\\n\\t]+|^\\.$/,\n number: /^[1-9][0-9]*/,\n numberAsText: /^(one|two|three)/i,\n every: /^every/i,\n 'day(s)': /^days?/i,\n 'weekday(s)': /^weekdays?/i,\n 'week(s)': /^weeks?/i,\n 'hour(s)': /^hours?/i,\n 'minute(s)': /^minutes?/i,\n 'month(s)': /^months?/i,\n 'year(s)': /^years?/i,\n on: /^(on|in)/i,\n at: /^(at)/i,\n the: /^the/i,\n first: /^first/i,\n second: /^second/i,\n third: /^third/i,\n nth: /^([1-9][0-9]*)(\\.|th|nd|rd|st)/i,\n last: /^last/i,\n for: /^for/i,\n 'time(s)': /^times?/i,\n until: /^(un)?til/i,\n monday: /^mo(n(day)?)?/i,\n tuesday: /^tu(e(s(day)?)?)?/i,\n wednesday: /^we(d(n(esday)?)?)?/i,\n thursday: /^th(u(r(sday)?)?)?/i,\n friday: /^fr(i(day)?)?/i,\n saturday: /^sa(t(urday)?)?/i,\n sunday: /^su(n(day)?)?/i,\n january: /^jan(uary)?/i,\n february: /^feb(ruary)?/i,\n march: /^mar(ch)?/i,\n april: /^apr(il)?/i,\n may: /^may/i,\n june: /^june?/i,\n july: /^july?/i,\n august: /^aug(ust)?/i,\n september: /^sep(t(ember)?)?/i,\n october: /^oct(ober)?/i,\n november: /^nov(ember)?/i,\n december: /^dec(ember)?/i,\n comma: /^(,\\s*|(and|or)\\s*)+/i,\n },\n};\nexport default ENGLISH;\n//# sourceMappingURL=i18n.js.map","import ENGLISH from './i18n';\nimport { RRule } from '../rrule';\nimport { isArray, isNumber, isPresent } from '../helpers';\n// =============================================================================\n// Helper functions\n// =============================================================================\n/**\n * Return true if a value is in an array\n */\nvar contains = function (arr, val) {\n return arr.indexOf(val) !== -1;\n};\nvar defaultGetText = function (id) { return id.toString(); };\nvar defaultDateFormatter = function (year, month, day) { return \"\".concat(month, \" \").concat(day, \", \").concat(year); };\n/**\n *\n * @param {RRule} rrule\n * Optional:\n * @param {Function} gettext function\n * @param {Object} language definition\n * @constructor\n */\nvar ToText = /** @class */ (function () {\n function ToText(rrule, gettext, language, dateFormatter) {\n if (gettext === void 0) { gettext = defaultGetText; }\n if (language === void 0) { language = ENGLISH; }\n if (dateFormatter === void 0) { dateFormatter = defaultDateFormatter; }\n this.text = [];\n this.language = language || ENGLISH;\n this.gettext = gettext;\n this.dateFormatter = dateFormatter;\n this.rrule = rrule;\n this.options = rrule.options;\n this.origOptions = rrule.origOptions;\n if (this.origOptions.bymonthday) {\n var bymonthday = [].concat(this.options.bymonthday);\n var bynmonthday = [].concat(this.options.bynmonthday);\n bymonthday.sort(function (a, b) { return a - b; });\n bynmonthday.sort(function (a, b) { return b - a; });\n // 1, 2, 3, .., -5, -4, -3, ..\n this.bymonthday = bymonthday.concat(bynmonthday);\n if (!this.bymonthday.length)\n this.bymonthday = null;\n }\n if (isPresent(this.origOptions.byweekday)) {\n var byweekday = !isArray(this.origOptions.byweekday)\n ? [this.origOptions.byweekday]\n : this.origOptions.byweekday;\n var days = String(byweekday);\n this.byweekday = {\n allWeeks: byweekday.filter(function (weekday) {\n return !weekday.n;\n }),\n someWeeks: byweekday.filter(function (weekday) {\n return Boolean(weekday.n);\n }),\n isWeekdays: days.indexOf('MO') !== -1 &&\n days.indexOf('TU') !== -1 &&\n days.indexOf('WE') !== -1 &&\n days.indexOf('TH') !== -1 &&\n days.indexOf('FR') !== -1 &&\n days.indexOf('SA') === -1 &&\n days.indexOf('SU') === -1,\n isEveryDay: days.indexOf('MO') !== -1 &&\n days.indexOf('TU') !== -1 &&\n days.indexOf('WE') !== -1 &&\n days.indexOf('TH') !== -1 &&\n days.indexOf('FR') !== -1 &&\n days.indexOf('SA') !== -1 &&\n days.indexOf('SU') !== -1,\n };\n var sortWeekDays = function (a, b) {\n return a.weekday - b.weekday;\n };\n this.byweekday.allWeeks.sort(sortWeekDays);\n this.byweekday.someWeeks.sort(sortWeekDays);\n if (!this.byweekday.allWeeks.length)\n this.byweekday.allWeeks = null;\n if (!this.byweekday.someWeeks.length)\n this.byweekday.someWeeks = null;\n }\n else {\n this.byweekday = null;\n }\n }\n /**\n * Test whether the rrule can be fully converted to text.\n *\n * @param {RRule} rrule\n * @return {Boolean}\n */\n ToText.isFullyConvertible = function (rrule) {\n var canConvert = true;\n if (!(rrule.options.freq in ToText.IMPLEMENTED))\n return false;\n if (rrule.origOptions.until && rrule.origOptions.count)\n return false;\n for (var key in rrule.origOptions) {\n if (contains(['dtstart', 'tzid', 'wkst', 'freq'], key))\n return true;\n if (!contains(ToText.IMPLEMENTED[rrule.options.freq], key))\n return false;\n }\n return canConvert;\n };\n ToText.prototype.isFullyConvertible = function () {\n return ToText.isFullyConvertible(this.rrule);\n };\n /**\n * Perform the conversion. Only some of the frequencies are supported.\n * If some of the rrule's options aren't supported, they'll\n * be omitted from the output an \"(~ approximate)\" will be appended.\n *\n * @return {*}\n */\n ToText.prototype.toString = function () {\n var gettext = this.gettext;\n if (!(this.options.freq in ToText.IMPLEMENTED)) {\n return gettext('RRule error: Unable to fully convert this rrule to text');\n }\n this.text = [gettext('every')];\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this[RRule.FREQUENCIES[this.options.freq]]();\n if (this.options.until) {\n this.add(gettext('until'));\n var until = this.options.until;\n this.add(this.dateFormatter(until.getUTCFullYear(), this.language.monthNames[until.getUTCMonth()], until.getUTCDate()));\n }\n else if (this.options.count) {\n this.add(gettext('for'))\n .add(this.options.count.toString())\n .add(this.plural(this.options.count) ? gettext('times') : gettext('time'));\n }\n if (!this.isFullyConvertible())\n this.add(gettext('(~ approximate)'));\n return this.text.join('');\n };\n ToText.prototype.HOURLY = function () {\n var gettext = this.gettext;\n if (this.options.interval !== 1)\n this.add(this.options.interval.toString());\n this.add(this.plural(this.options.interval) ? gettext('hours') : gettext('hour'));\n };\n ToText.prototype.MINUTELY = function () {\n var gettext = this.gettext;\n if (this.options.interval !== 1)\n this.add(this.options.interval.toString());\n this.add(this.plural(this.options.interval)\n ? gettext('minutes')\n : gettext('minute'));\n };\n ToText.prototype.DAILY = function () {\n var gettext = this.gettext;\n if (this.options.interval !== 1)\n this.add(this.options.interval.toString());\n if (this.byweekday && this.byweekday.isWeekdays) {\n this.add(this.plural(this.options.interval)\n ? gettext('weekdays')\n : gettext('weekday'));\n }\n else {\n this.add(this.plural(this.options.interval) ? gettext('days') : gettext('day'));\n }\n if (this.origOptions.bymonth) {\n this.add(gettext('in'));\n this._bymonth();\n }\n if (this.bymonthday) {\n this._bymonthday();\n }\n else if (this.byweekday) {\n this._byweekday();\n }\n else if (this.origOptions.byhour) {\n this._byhour();\n }\n };\n ToText.prototype.WEEKLY = function () {\n var gettext = this.gettext;\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString()).add(this.plural(this.options.interval) ? gettext('weeks') : gettext('week'));\n }\n if (this.byweekday && this.byweekday.isWeekdays) {\n if (this.options.interval === 1) {\n this.add(this.plural(this.options.interval)\n ? gettext('weekdays')\n : gettext('weekday'));\n }\n else {\n this.add(gettext('on')).add(gettext('weekdays'));\n }\n }\n else if (this.byweekday && this.byweekday.isEveryDay) {\n this.add(this.plural(this.options.interval) ? gettext('days') : gettext('day'));\n }\n else {\n if (this.options.interval === 1)\n this.add(gettext('week'));\n if (this.origOptions.bymonth) {\n this.add(gettext('in'));\n this._bymonth();\n }\n if (this.bymonthday) {\n this._bymonthday();\n }\n else if (this.byweekday) {\n this._byweekday();\n }\n if (this.origOptions.byhour) {\n this._byhour();\n }\n }\n };\n ToText.prototype.MONTHLY = function () {\n var gettext = this.gettext;\n if (this.origOptions.bymonth) {\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString()).add(gettext('months'));\n if (this.plural(this.options.interval))\n this.add(gettext('in'));\n }\n else {\n // this.add(gettext('MONTH'))\n }\n this._bymonth();\n }\n else {\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString());\n }\n this.add(this.plural(this.options.interval)\n ? gettext('months')\n : gettext('month'));\n }\n if (this.bymonthday) {\n this._bymonthday();\n }\n else if (this.byweekday && this.byweekday.isWeekdays) {\n this.add(gettext('on')).add(gettext('weekdays'));\n }\n else if (this.byweekday) {\n this._byweekday();\n }\n };\n ToText.prototype.YEARLY = function () {\n var gettext = this.gettext;\n if (this.origOptions.bymonth) {\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString());\n this.add(gettext('years'));\n }\n else {\n // this.add(gettext('YEAR'))\n }\n this._bymonth();\n }\n else {\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString());\n }\n this.add(this.plural(this.options.interval) ? gettext('years') : gettext('year'));\n }\n if (this.bymonthday) {\n this._bymonthday();\n }\n else if (this.byweekday) {\n this._byweekday();\n }\n if (this.options.byyearday) {\n this.add(gettext('on the'))\n .add(this.list(this.options.byyearday, this.nth, gettext('and')))\n .add(gettext('day'));\n }\n if (this.options.byweekno) {\n this.add(gettext('in'))\n .add(this.plural(this.options.byweekno.length)\n ? gettext('weeks')\n : gettext('week'))\n .add(this.list(this.options.byweekno, undefined, gettext('and')));\n }\n };\n ToText.prototype._bymonthday = function () {\n var gettext = this.gettext;\n if (this.byweekday && this.byweekday.allWeeks) {\n this.add(gettext('on'))\n .add(this.list(this.byweekday.allWeeks, this.weekdaytext, gettext('or')))\n .add(gettext('the'))\n .add(this.list(this.bymonthday, this.nth, gettext('or')));\n }\n else {\n this.add(gettext('on the')).add(this.list(this.bymonthday, this.nth, gettext('and')));\n }\n // this.add(gettext('DAY'))\n };\n ToText.prototype._byweekday = function () {\n var gettext = this.gettext;\n if (this.byweekday.allWeeks && !this.byweekday.isWeekdays) {\n this.add(gettext('on')).add(this.list(this.byweekday.allWeeks, this.weekdaytext));\n }\n if (this.byweekday.someWeeks) {\n if (this.byweekday.allWeeks)\n this.add(gettext('and'));\n this.add(gettext('on the')).add(this.list(this.byweekday.someWeeks, this.weekdaytext, gettext('and')));\n }\n };\n ToText.prototype._byhour = function () {\n var gettext = this.gettext;\n this.add(gettext('at')).add(this.list(this.origOptions.byhour, undefined, gettext('and')));\n };\n ToText.prototype._bymonth = function () {\n this.add(this.list(this.options.bymonth, this.monthtext, this.gettext('and')));\n };\n ToText.prototype.nth = function (n) {\n n = parseInt(n.toString(), 10);\n var nth;\n var gettext = this.gettext;\n if (n === -1)\n return gettext('last');\n var npos = Math.abs(n);\n switch (npos) {\n case 1:\n case 21:\n case 31:\n nth = npos + gettext('st');\n break;\n case 2:\n case 22:\n nth = npos + gettext('nd');\n break;\n case 3:\n case 23:\n nth = npos + gettext('rd');\n break;\n default:\n nth = npos + gettext('th');\n }\n return n < 0 ? nth + ' ' + gettext('last') : nth;\n };\n ToText.prototype.monthtext = function (m) {\n return this.language.monthNames[m - 1];\n };\n ToText.prototype.weekdaytext = function (wday) {\n var weekday = isNumber(wday) ? (wday + 1) % 7 : wday.getJsWeekday();\n return ((wday.n ? this.nth(wday.n) + ' ' : '') +\n this.language.dayNames[weekday]);\n };\n ToText.prototype.plural = function (n) {\n return n % 100 !== 1;\n };\n ToText.prototype.add = function (s) {\n this.text.push(' ');\n this.text.push(s);\n return this;\n };\n ToText.prototype.list = function (arr, callback, finalDelim, delim) {\n var _this = this;\n if (delim === void 0) { delim = ','; }\n if (!isArray(arr)) {\n arr = [arr];\n }\n var delimJoin = function (array, delimiter, finalDelimiter) {\n var list = '';\n for (var i = 0; i < array.length; i++) {\n if (i !== 0) {\n if (i === array.length - 1) {\n list += ' ' + finalDelimiter + ' ';\n }\n else {\n list += delimiter + ' ';\n }\n }\n list += array[i];\n }\n return list;\n };\n callback =\n callback ||\n function (o) {\n return o.toString();\n };\n var realCallback = function (arg) {\n return callback && callback.call(_this, arg);\n };\n if (finalDelim) {\n return delimJoin(arr.map(realCallback), delim, finalDelim);\n }\n else {\n return arr.map(realCallback).join(delim + ' ');\n }\n };\n return ToText;\n}());\nexport default ToText;\n//# sourceMappingURL=totext.js.map","import ENGLISH from './i18n';\nimport { RRule } from '../rrule';\n// =============================================================================\n// Parser\n// =============================================================================\nvar Parser = /** @class */ (function () {\n function Parser(rules) {\n this.done = true;\n this.rules = rules;\n }\n Parser.prototype.start = function (text) {\n this.text = text;\n this.done = false;\n return this.nextSymbol();\n };\n Parser.prototype.isDone = function () {\n return this.done && this.symbol === null;\n };\n Parser.prototype.nextSymbol = function () {\n var best;\n var bestSymbol;\n this.symbol = null;\n this.value = null;\n do {\n if (this.done)\n return false;\n var rule = void 0;\n best = null;\n for (var name_1 in this.rules) {\n rule = this.rules[name_1];\n var match = rule.exec(this.text);\n if (match) {\n if (best === null || match[0].length > best[0].length) {\n best = match;\n bestSymbol = name_1;\n }\n }\n }\n if (best != null) {\n this.text = this.text.substr(best[0].length);\n if (this.text === '')\n this.done = true;\n }\n if (best == null) {\n this.done = true;\n this.symbol = null;\n this.value = null;\n return;\n }\n } while (bestSymbol === 'SKIP');\n this.symbol = bestSymbol;\n this.value = best;\n return true;\n };\n Parser.prototype.accept = function (name) {\n if (this.symbol === name) {\n if (this.value) {\n var v = this.value;\n this.nextSymbol();\n return v;\n }\n this.nextSymbol();\n return true;\n }\n return false;\n };\n Parser.prototype.acceptNumber = function () {\n return this.accept('number');\n };\n Parser.prototype.expect = function (name) {\n if (this.accept(name))\n return true;\n throw new Error('expected ' + name + ' but found ' + this.symbol);\n };\n return Parser;\n}());\nexport default function parseText(text, language) {\n if (language === void 0) { language = ENGLISH; }\n var options = {};\n var ttr = new Parser(language.tokens);\n if (!ttr.start(text))\n return null;\n S();\n return options;\n function S() {\n // every [n]\n ttr.expect('every');\n var n = ttr.acceptNumber();\n if (n)\n options.interval = parseInt(n[0], 10);\n if (ttr.isDone())\n throw new Error('Unexpected end');\n switch (ttr.symbol) {\n case 'day(s)':\n options.freq = RRule.DAILY;\n if (ttr.nextSymbol()) {\n AT();\n F();\n }\n break;\n // FIXME Note: every 2 weekdays != every two weeks on weekdays.\n // DAILY on weekdays is not a valid rule\n case 'weekday(s)':\n options.freq = RRule.WEEKLY;\n options.byweekday = [RRule.MO, RRule.TU, RRule.WE, RRule.TH, RRule.FR];\n ttr.nextSymbol();\n AT();\n F();\n break;\n case 'week(s)':\n options.freq = RRule.WEEKLY;\n if (ttr.nextSymbol()) {\n ON();\n AT();\n F();\n }\n break;\n case 'hour(s)':\n options.freq = RRule.HOURLY;\n if (ttr.nextSymbol()) {\n ON();\n F();\n }\n break;\n case 'minute(s)':\n options.freq = RRule.MINUTELY;\n if (ttr.nextSymbol()) {\n ON();\n F();\n }\n break;\n case 'month(s)':\n options.freq = RRule.MONTHLY;\n if (ttr.nextSymbol()) {\n ON();\n F();\n }\n break;\n case 'year(s)':\n options.freq = RRule.YEARLY;\n if (ttr.nextSymbol()) {\n ON();\n F();\n }\n break;\n case 'monday':\n case 'tuesday':\n case 'wednesday':\n case 'thursday':\n case 'friday':\n case 'saturday':\n case 'sunday':\n options.freq = RRule.WEEKLY;\n var key = ttr.symbol\n .substr(0, 2)\n .toUpperCase();\n options.byweekday = [RRule[key]];\n if (!ttr.nextSymbol())\n return;\n // TODO check for duplicates\n while (ttr.accept('comma')) {\n if (ttr.isDone())\n throw new Error('Unexpected end');\n var wkd = decodeWKD();\n if (!wkd) {\n throw new Error('Unexpected symbol ' + ttr.symbol + ', expected weekday');\n }\n options.byweekday.push(RRule[wkd]);\n ttr.nextSymbol();\n }\n AT();\n MDAYs();\n F();\n break;\n case 'january':\n case 'february':\n case 'march':\n case 'april':\n case 'may':\n case 'june':\n case 'july':\n case 'august':\n case 'september':\n case 'october':\n case 'november':\n case 'december':\n options.freq = RRule.YEARLY;\n options.bymonth = [decodeM()];\n if (!ttr.nextSymbol())\n return;\n // TODO check for duplicates\n while (ttr.accept('comma')) {\n if (ttr.isDone())\n throw new Error('Unexpected end');\n var m = decodeM();\n if (!m) {\n throw new Error('Unexpected symbol ' + ttr.symbol + ', expected month');\n }\n options.bymonth.push(m);\n ttr.nextSymbol();\n }\n ON();\n F();\n break;\n default:\n throw new Error('Unknown symbol');\n }\n }\n function ON() {\n var on = ttr.accept('on');\n var the = ttr.accept('the');\n if (!(on || the))\n return;\n do {\n var nth = decodeNTH();\n var wkd = decodeWKD();\n var m = decodeM();\n // nth | \n if (nth) {\n // ttr.nextSymbol()\n if (wkd) {\n ttr.nextSymbol();\n if (!options.byweekday)\n options.byweekday = [];\n options.byweekday.push(RRule[wkd].nth(nth));\n }\n else {\n if (!options.bymonthday)\n options.bymonthday = [];\n options.bymonthday.push(nth);\n ttr.accept('day(s)');\n }\n // \n }\n else if (wkd) {\n ttr.nextSymbol();\n if (!options.byweekday)\n options.byweekday = [];\n options.byweekday.push(RRule[wkd]);\n }\n else if (ttr.symbol === 'weekday(s)') {\n ttr.nextSymbol();\n if (!options.byweekday) {\n options.byweekday = [RRule.MO, RRule.TU, RRule.WE, RRule.TH, RRule.FR];\n }\n }\n else if (ttr.symbol === 'week(s)') {\n ttr.nextSymbol();\n var n = ttr.acceptNumber();\n if (!n) {\n throw new Error('Unexpected symbol ' + ttr.symbol + ', expected week number');\n }\n options.byweekno = [parseInt(n[0], 10)];\n while (ttr.accept('comma')) {\n n = ttr.acceptNumber();\n if (!n) {\n throw new Error('Unexpected symbol ' + ttr.symbol + '; expected monthday');\n }\n options.byweekno.push(parseInt(n[0], 10));\n }\n }\n else if (m) {\n ttr.nextSymbol();\n if (!options.bymonth)\n options.bymonth = [];\n options.bymonth.push(m);\n }\n else {\n return;\n }\n } while (ttr.accept('comma') || ttr.accept('the') || ttr.accept('on'));\n }\n function AT() {\n var at = ttr.accept('at');\n if (!at)\n return;\n do {\n var n = ttr.acceptNumber();\n if (!n) {\n throw new Error('Unexpected symbol ' + ttr.symbol + ', expected hour');\n }\n options.byhour = [parseInt(n[0], 10)];\n while (ttr.accept('comma')) {\n n = ttr.acceptNumber();\n if (!n) {\n throw new Error('Unexpected symbol ' + ttr.symbol + '; expected hour');\n }\n options.byhour.push(parseInt(n[0], 10));\n }\n } while (ttr.accept('comma') || ttr.accept('at'));\n }\n function decodeM() {\n switch (ttr.symbol) {\n case 'january':\n return 1;\n case 'february':\n return 2;\n case 'march':\n return 3;\n case 'april':\n return 4;\n case 'may':\n return 5;\n case 'june':\n return 6;\n case 'july':\n return 7;\n case 'august':\n return 8;\n case 'september':\n return 9;\n case 'october':\n return 10;\n case 'november':\n return 11;\n case 'december':\n return 12;\n default:\n return false;\n }\n }\n function decodeWKD() {\n switch (ttr.symbol) {\n case 'monday':\n case 'tuesday':\n case 'wednesday':\n case 'thursday':\n case 'friday':\n case 'saturday':\n case 'sunday':\n return ttr.symbol.substr(0, 2).toUpperCase();\n default:\n return false;\n }\n }\n function decodeNTH() {\n switch (ttr.symbol) {\n case 'last':\n ttr.nextSymbol();\n return -1;\n case 'first':\n ttr.nextSymbol();\n return 1;\n case 'second':\n ttr.nextSymbol();\n return ttr.accept('last') ? -2 : 2;\n case 'third':\n ttr.nextSymbol();\n return ttr.accept('last') ? -3 : 3;\n case 'nth':\n var v = parseInt(ttr.value[1], 10);\n if (v < -366 || v > 366)\n throw new Error('Nth out of range: ' + v);\n ttr.nextSymbol();\n return ttr.accept('last') ? -v : v;\n default:\n return false;\n }\n }\n function MDAYs() {\n ttr.accept('on');\n ttr.accept('the');\n var nth = decodeNTH();\n if (!nth)\n return;\n options.bymonthday = [nth];\n ttr.nextSymbol();\n while (ttr.accept('comma')) {\n nth = decodeNTH();\n if (!nth) {\n throw new Error('Unexpected symbol ' + ttr.symbol + '; expected monthday');\n }\n options.bymonthday.push(nth);\n ttr.nextSymbol();\n }\n }\n function F() {\n if (ttr.symbol === 'until') {\n var date = Date.parse(ttr.text);\n if (!date)\n throw new Error('Cannot parse until date:' + ttr.text);\n options.until = new Date(date);\n }\n else if (ttr.accept('for')) {\n options.count = parseInt(ttr.value[0], 10);\n ttr.expect('number');\n // ttr.expect('times')\n }\n }\n}\n//# sourceMappingURL=parsetext.js.map","export var Frequency;\n(function (Frequency) {\n Frequency[Frequency[\"YEARLY\"] = 0] = \"YEARLY\";\n Frequency[Frequency[\"MONTHLY\"] = 1] = \"MONTHLY\";\n Frequency[Frequency[\"WEEKLY\"] = 2] = \"WEEKLY\";\n Frequency[Frequency[\"DAILY\"] = 3] = \"DAILY\";\n Frequency[Frequency[\"HOURLY\"] = 4] = \"HOURLY\";\n Frequency[Frequency[\"MINUTELY\"] = 5] = \"MINUTELY\";\n Frequency[Frequency[\"SECONDLY\"] = 6] = \"SECONDLY\";\n})(Frequency || (Frequency = {}));\nexport function freqIsDailyOrGreater(freq) {\n return freq < Frequency.HOURLY;\n}\n//# sourceMappingURL=types.js.map","import ToText from './totext';\nimport parseText from './parsetext';\nimport { RRule } from '../rrule';\nimport { Frequency } from '../types';\nimport ENGLISH from './i18n';\n/* !\n * rrule.js - Library for working with recurrence rules for calendar dates.\n * https://github.com/jakubroztocil/rrule\n *\n * Copyright 2010, Jakub Roztocil and Lars Schoning\n * Licenced under the BSD licence.\n * https://github.com/jakubroztocil/rrule/blob/master/LICENCE\n *\n */\n/**\n *\n * Implementation of RRule.fromText() and RRule::toText().\n *\n *\n * On the client side, this file needs to be included\n * when those functions are used.\n *\n */\n// =============================================================================\n// fromText\n// =============================================================================\n/**\n * Will be able to convert some of the below described rules from\n * text format to a rule object.\n *\n *\n * RULES\n *\n * Every ([n])\n * day(s)\n * | [weekday], ..., (and) [weekday]\n * | weekday(s)\n * | week(s)\n * | month(s)\n * | [month], ..., (and) [month]\n * | year(s)\n *\n *\n * Plus 0, 1, or multiple of these:\n *\n * on [weekday], ..., (or) [weekday] the [monthday], [monthday], ... (or) [monthday]\n *\n * on [weekday], ..., (and) [weekday]\n *\n * on the [monthday], [monthday], ... (and) [monthday] (day of the month)\n *\n * on the [nth-weekday], ..., (and) [nth-weekday] (of the month/year)\n *\n *\n * Plus 0 or 1 of these:\n *\n * for [n] time(s)\n *\n * until [date]\n *\n * Plus (.)\n *\n *\n * Definitely no supported for parsing:\n *\n * (for year):\n * in week(s) [n], ..., (and) [n]\n *\n * on the [yearday], ..., (and) [n] day of the year\n * on day [yearday], ..., (and) [n]\n *\n *\n * NON-TERMINALS\n *\n * [n]: 1, 2 ..., one, two, three ..\n * [month]: January, February, March, April, May, ... December\n * [weekday]: Monday, ... Sunday\n * [nth-weekday]: first [weekday], 2nd [weekday], ... last [weekday], ...\n * [monthday]: first, 1., 2., 1st, 2nd, second, ... 31st, last day, 2nd last day, ..\n * [date]:\n * - [month] (0-31(,) ([year])),\n * - (the) 0-31.(1-12.([year])),\n * - (the) 0-31/(1-12/([year])),\n * - [weekday]\n *\n * [year]: 0000, 0001, ... 01, 02, ..\n *\n * Definitely not supported for parsing:\n *\n * [yearday]: first, 1., 2., 1st, 2nd, second, ... 366th, last day, 2nd last day, ..\n *\n * @param {String} text\n * @return {Object, Boolean} the rule, or null.\n */\nvar fromText = function (text, language) {\n if (language === void 0) { language = ENGLISH; }\n return new RRule(parseText(text, language) || undefined);\n};\nvar common = [\n 'count',\n 'until',\n 'interval',\n 'byweekday',\n 'bymonthday',\n 'bymonth',\n];\nToText.IMPLEMENTED = [];\nToText.IMPLEMENTED[Frequency.HOURLY] = common;\nToText.IMPLEMENTED[Frequency.MINUTELY] = common;\nToText.IMPLEMENTED[Frequency.DAILY] = ['byhour'].concat(common);\nToText.IMPLEMENTED[Frequency.WEEKLY] = common;\nToText.IMPLEMENTED[Frequency.MONTHLY] = common;\nToText.IMPLEMENTED[Frequency.YEARLY] = ['byweekno', 'byyearday'].concat(common);\n// =============================================================================\n// Export\n// =============================================================================\nvar toText = function (rrule, gettext, language, dateFormatter) {\n return new ToText(rrule, gettext, language, dateFormatter).toString();\n};\nvar isFullyConvertible = ToText.isFullyConvertible;\nexport { fromText, parseText, isFullyConvertible, toText };\n//# sourceMappingURL=index.js.map","import { __extends } from \"tslib\";\nimport { Frequency } from './types';\nimport { pymod, divmod, empty, includes } from './helpers';\nimport { getWeekday, MAXYEAR, monthRange } from './dateutil';\nvar Time = /** @class */ (function () {\n function Time(hour, minute, second, millisecond) {\n this.hour = hour;\n this.minute = minute;\n this.second = second;\n this.millisecond = millisecond || 0;\n }\n Time.prototype.getHours = function () {\n return this.hour;\n };\n Time.prototype.getMinutes = function () {\n return this.minute;\n };\n Time.prototype.getSeconds = function () {\n return this.second;\n };\n Time.prototype.getMilliseconds = function () {\n return this.millisecond;\n };\n Time.prototype.getTime = function () {\n return ((this.hour * 60 * 60 + this.minute * 60 + this.second) * 1000 +\n this.millisecond);\n };\n return Time;\n}());\nexport { Time };\nvar DateTime = /** @class */ (function (_super) {\n __extends(DateTime, _super);\n function DateTime(year, month, day, hour, minute, second, millisecond) {\n var _this = _super.call(this, hour, minute, second, millisecond) || this;\n _this.year = year;\n _this.month = month;\n _this.day = day;\n return _this;\n }\n DateTime.fromDate = function (date) {\n return new this(date.getUTCFullYear(), date.getUTCMonth() + 1, date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), date.valueOf() % 1000);\n };\n DateTime.prototype.getWeekday = function () {\n return getWeekday(new Date(this.getTime()));\n };\n DateTime.prototype.getTime = function () {\n return new Date(Date.UTC(this.year, this.month - 1, this.day, this.hour, this.minute, this.second, this.millisecond)).getTime();\n };\n DateTime.prototype.getDay = function () {\n return this.day;\n };\n DateTime.prototype.getMonth = function () {\n return this.month;\n };\n DateTime.prototype.getYear = function () {\n return this.year;\n };\n DateTime.prototype.addYears = function (years) {\n this.year += years;\n };\n DateTime.prototype.addMonths = function (months) {\n this.month += months;\n if (this.month > 12) {\n var yearDiv = Math.floor(this.month / 12);\n var monthMod = pymod(this.month, 12);\n this.month = monthMod;\n this.year += yearDiv;\n if (this.month === 0) {\n this.month = 12;\n --this.year;\n }\n }\n };\n DateTime.prototype.addWeekly = function (days, wkst) {\n if (wkst > this.getWeekday()) {\n this.day += -(this.getWeekday() + 1 + (6 - wkst)) + days * 7;\n }\n else {\n this.day += -(this.getWeekday() - wkst) + days * 7;\n }\n this.fixDay();\n };\n DateTime.prototype.addDaily = function (days) {\n this.day += days;\n this.fixDay();\n };\n DateTime.prototype.addHours = function (hours, filtered, byhour) {\n if (filtered) {\n // Jump to one iteration before next day\n this.hour += Math.floor((23 - this.hour) / hours) * hours;\n }\n for (;;) {\n this.hour += hours;\n var _a = divmod(this.hour, 24), dayDiv = _a.div, hourMod = _a.mod;\n if (dayDiv) {\n this.hour = hourMod;\n this.addDaily(dayDiv);\n }\n if (empty(byhour) || includes(byhour, this.hour))\n break;\n }\n };\n DateTime.prototype.addMinutes = function (minutes, filtered, byhour, byminute) {\n if (filtered) {\n // Jump to one iteration before next day\n this.minute +=\n Math.floor((1439 - (this.hour * 60 + this.minute)) / minutes) * minutes;\n }\n for (;;) {\n this.minute += minutes;\n var _a = divmod(this.minute, 60), hourDiv = _a.div, minuteMod = _a.mod;\n if (hourDiv) {\n this.minute = minuteMod;\n this.addHours(hourDiv, false, byhour);\n }\n if ((empty(byhour) || includes(byhour, this.hour)) &&\n (empty(byminute) || includes(byminute, this.minute))) {\n break;\n }\n }\n };\n DateTime.prototype.addSeconds = function (seconds, filtered, byhour, byminute, bysecond) {\n if (filtered) {\n // Jump to one iteration before next day\n this.second +=\n Math.floor((86399 - (this.hour * 3600 + this.minute * 60 + this.second)) /\n seconds) * seconds;\n }\n for (;;) {\n this.second += seconds;\n var _a = divmod(this.second, 60), minuteDiv = _a.div, secondMod = _a.mod;\n if (minuteDiv) {\n this.second = secondMod;\n this.addMinutes(minuteDiv, false, byhour, byminute);\n }\n if ((empty(byhour) || includes(byhour, this.hour)) &&\n (empty(byminute) || includes(byminute, this.minute)) &&\n (empty(bysecond) || includes(bysecond, this.second))) {\n break;\n }\n }\n };\n DateTime.prototype.fixDay = function () {\n if (this.day <= 28) {\n return;\n }\n var daysinmonth = monthRange(this.year, this.month - 1)[1];\n if (this.day <= daysinmonth) {\n return;\n }\n while (this.day > daysinmonth) {\n this.day -= daysinmonth;\n ++this.month;\n if (this.month === 13) {\n this.month = 1;\n ++this.year;\n if (this.year > MAXYEAR) {\n return;\n }\n }\n daysinmonth = monthRange(this.year, this.month - 1)[1];\n }\n };\n DateTime.prototype.add = function (options, filtered) {\n var freq = options.freq, interval = options.interval, wkst = options.wkst, byhour = options.byhour, byminute = options.byminute, bysecond = options.bysecond;\n switch (freq) {\n case Frequency.YEARLY:\n return this.addYears(interval);\n case Frequency.MONTHLY:\n return this.addMonths(interval);\n case Frequency.WEEKLY:\n return this.addWeekly(interval, wkst);\n case Frequency.DAILY:\n return this.addDaily(interval);\n case Frequency.HOURLY:\n return this.addHours(interval, filtered, byhour);\n case Frequency.MINUTELY:\n return this.addMinutes(interval, filtered, byhour, byminute);\n case Frequency.SECONDLY:\n return this.addSeconds(interval, filtered, byhour, byminute, bysecond);\n }\n };\n return DateTime;\n}(Time));\nexport { DateTime };\n//# sourceMappingURL=datetime.js.map","import { __assign } from \"tslib\";\nimport { freqIsDailyOrGreater } from './types';\nimport { includes, notEmpty, isPresent, isNumber, isArray, isWeekdayStr, } from './helpers';\nimport { RRule, defaultKeys, DEFAULT_OPTIONS } from './rrule';\nimport { getWeekday, isDate, isValidDate } from './dateutil';\nimport { Weekday } from './weekday';\nimport { Time } from './datetime';\nexport function initializeOptions(options) {\n var invalid = [];\n var keys = Object.keys(options);\n // Shallow copy for options and origOptions and check for invalid\n for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {\n var key = keys_1[_i];\n if (!includes(defaultKeys, key))\n invalid.push(key);\n if (isDate(options[key]) && !isValidDate(options[key])) {\n invalid.push(key);\n }\n }\n if (invalid.length) {\n throw new Error('Invalid options: ' + invalid.join(', '));\n }\n return __assign({}, options);\n}\nexport function parseOptions(options) {\n var opts = __assign(__assign({}, DEFAULT_OPTIONS), initializeOptions(options));\n if (isPresent(opts.byeaster))\n opts.freq = RRule.YEARLY;\n if (!(isPresent(opts.freq) && RRule.FREQUENCIES[opts.freq])) {\n throw new Error(\"Invalid frequency: \".concat(opts.freq, \" \").concat(options.freq));\n }\n if (!opts.dtstart)\n opts.dtstart = new Date(new Date().setMilliseconds(0));\n if (!isPresent(opts.wkst)) {\n opts.wkst = RRule.MO.weekday;\n }\n else if (isNumber(opts.wkst)) {\n // cool, just keep it like that\n }\n else {\n opts.wkst = opts.wkst.weekday;\n }\n if (isPresent(opts.bysetpos)) {\n if (isNumber(opts.bysetpos))\n opts.bysetpos = [opts.bysetpos];\n for (var i = 0; i < opts.bysetpos.length; i++) {\n var v = opts.bysetpos[i];\n if (v === 0 || !(v >= -366 && v <= 366)) {\n throw new Error('bysetpos must be between 1 and 366,' + ' or between -366 and -1');\n }\n }\n }\n if (!(Boolean(opts.byweekno) ||\n notEmpty(opts.byweekno) ||\n notEmpty(opts.byyearday) ||\n Boolean(opts.bymonthday) ||\n notEmpty(opts.bymonthday) ||\n isPresent(opts.byweekday) ||\n isPresent(opts.byeaster))) {\n switch (opts.freq) {\n case RRule.YEARLY:\n if (!opts.bymonth)\n opts.bymonth = opts.dtstart.getUTCMonth() + 1;\n opts.bymonthday = opts.dtstart.getUTCDate();\n break;\n case RRule.MONTHLY:\n opts.bymonthday = opts.dtstart.getUTCDate();\n break;\n case RRule.WEEKLY:\n opts.byweekday = [getWeekday(opts.dtstart)];\n break;\n }\n }\n // bymonth\n if (isPresent(opts.bymonth) && !isArray(opts.bymonth)) {\n opts.bymonth = [opts.bymonth];\n }\n // byyearday\n if (isPresent(opts.byyearday) &&\n !isArray(opts.byyearday) &&\n isNumber(opts.byyearday)) {\n opts.byyearday = [opts.byyearday];\n }\n // bymonthday\n if (!isPresent(opts.bymonthday)) {\n opts.bymonthday = [];\n opts.bynmonthday = [];\n }\n else if (isArray(opts.bymonthday)) {\n var bymonthday = [];\n var bynmonthday = [];\n for (var i = 0; i < opts.bymonthday.length; i++) {\n var v = opts.bymonthday[i];\n if (v > 0) {\n bymonthday.push(v);\n }\n else if (v < 0) {\n bynmonthday.push(v);\n }\n }\n opts.bymonthday = bymonthday;\n opts.bynmonthday = bynmonthday;\n }\n else if (opts.bymonthday < 0) {\n opts.bynmonthday = [opts.bymonthday];\n opts.bymonthday = [];\n }\n else {\n opts.bynmonthday = [];\n opts.bymonthday = [opts.bymonthday];\n }\n // byweekno\n if (isPresent(opts.byweekno) && !isArray(opts.byweekno)) {\n opts.byweekno = [opts.byweekno];\n }\n // byweekday / bynweekday\n if (!isPresent(opts.byweekday)) {\n opts.bynweekday = null;\n }\n else if (isNumber(opts.byweekday)) {\n opts.byweekday = [opts.byweekday];\n opts.bynweekday = null;\n }\n else if (isWeekdayStr(opts.byweekday)) {\n opts.byweekday = [Weekday.fromStr(opts.byweekday).weekday];\n opts.bynweekday = null;\n }\n else if (opts.byweekday instanceof Weekday) {\n if (!opts.byweekday.n || opts.freq > RRule.MONTHLY) {\n opts.byweekday = [opts.byweekday.weekday];\n opts.bynweekday = null;\n }\n else {\n opts.bynweekday = [[opts.byweekday.weekday, opts.byweekday.n]];\n opts.byweekday = null;\n }\n }\n else {\n var byweekday = [];\n var bynweekday = [];\n for (var i = 0; i < opts.byweekday.length; i++) {\n var wday = opts.byweekday[i];\n if (isNumber(wday)) {\n byweekday.push(wday);\n continue;\n }\n else if (isWeekdayStr(wday)) {\n byweekday.push(Weekday.fromStr(wday).weekday);\n continue;\n }\n if (!wday.n || opts.freq > RRule.MONTHLY) {\n byweekday.push(wday.weekday);\n }\n else {\n bynweekday.push([wday.weekday, wday.n]);\n }\n }\n opts.byweekday = notEmpty(byweekday) ? byweekday : null;\n opts.bynweekday = notEmpty(bynweekday) ? bynweekday : null;\n }\n // byhour\n if (!isPresent(opts.byhour)) {\n opts.byhour = opts.freq < RRule.HOURLY ? [opts.dtstart.getUTCHours()] : null;\n }\n else if (isNumber(opts.byhour)) {\n opts.byhour = [opts.byhour];\n }\n // byminute\n if (!isPresent(opts.byminute)) {\n opts.byminute =\n opts.freq < RRule.MINUTELY ? [opts.dtstart.getUTCMinutes()] : null;\n }\n else if (isNumber(opts.byminute)) {\n opts.byminute = [opts.byminute];\n }\n // bysecond\n if (!isPresent(opts.bysecond)) {\n opts.bysecond =\n opts.freq < RRule.SECONDLY ? [opts.dtstart.getUTCSeconds()] : null;\n }\n else if (isNumber(opts.bysecond)) {\n opts.bysecond = [opts.bysecond];\n }\n return { parsedOptions: opts };\n}\nexport function buildTimeset(opts) {\n var millisecondModulo = opts.dtstart.getTime() % 1000;\n if (!freqIsDailyOrGreater(opts.freq)) {\n return [];\n }\n var timeset = [];\n opts.byhour.forEach(function (hour) {\n opts.byminute.forEach(function (minute) {\n opts.bysecond.forEach(function (second) {\n timeset.push(new Time(hour, minute, second, millisecondModulo));\n });\n });\n });\n return timeset;\n}\n//# sourceMappingURL=parseoptions.js.map","import { __assign } from \"tslib\";\nimport { Frequency } from './types';\nimport { Weekday } from './weekday';\nimport { untilStringToDate } from './dateutil';\nimport { Days } from './rrule';\nexport function parseString(rfcString) {\n var options = rfcString\n .split('\\n')\n .map(parseLine)\n .filter(function (x) { return x !== null; });\n return __assign(__assign({}, options[0]), options[1]);\n}\nexport function parseDtstart(line) {\n var options = {};\n var dtstartWithZone = /DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\\s]+)/i.exec(line);\n if (!dtstartWithZone) {\n return options;\n }\n var tzid = dtstartWithZone[1], dtstart = dtstartWithZone[2];\n if (tzid) {\n options.tzid = tzid;\n }\n options.dtstart = untilStringToDate(dtstart);\n return options;\n}\nfunction parseLine(rfcString) {\n rfcString = rfcString.replace(/^\\s+|\\s+$/, '');\n if (!rfcString.length)\n return null;\n var header = /^([A-Z]+?)[:;]/.exec(rfcString.toUpperCase());\n if (!header) {\n return parseRrule(rfcString);\n }\n var key = header[1];\n switch (key.toUpperCase()) {\n case 'RRULE':\n case 'EXRULE':\n return parseRrule(rfcString);\n case 'DTSTART':\n return parseDtstart(rfcString);\n default:\n throw new Error(\"Unsupported RFC prop \".concat(key, \" in \").concat(rfcString));\n }\n}\nfunction parseRrule(line) {\n var strippedLine = line.replace(/^RRULE:/i, '');\n var options = parseDtstart(strippedLine);\n var attrs = line.replace(/^(?:RRULE|EXRULE):/i, '').split(';');\n attrs.forEach(function (attr) {\n var _a = attr.split('='), key = _a[0], value = _a[1];\n switch (key.toUpperCase()) {\n case 'FREQ':\n options.freq = Frequency[value.toUpperCase()];\n break;\n case 'WKST':\n options.wkst = Days[value.toUpperCase()];\n break;\n case 'COUNT':\n case 'INTERVAL':\n case 'BYSETPOS':\n case 'BYMONTH':\n case 'BYMONTHDAY':\n case 'BYYEARDAY':\n case 'BYWEEKNO':\n case 'BYHOUR':\n case 'BYMINUTE':\n case 'BYSECOND':\n var num = parseNumber(value);\n var optionKey = key.toLowerCase();\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n options[optionKey] = num;\n break;\n case 'BYWEEKDAY':\n case 'BYDAY':\n options.byweekday = parseWeekday(value);\n break;\n case 'DTSTART':\n case 'TZID':\n // for backwards compatibility\n var dtstart = parseDtstart(line);\n options.tzid = dtstart.tzid;\n options.dtstart = dtstart.dtstart;\n break;\n case 'UNTIL':\n options.until = untilStringToDate(value);\n break;\n case 'BYEASTER':\n options.byeaster = Number(value);\n break;\n default:\n throw new Error(\"Unknown RRULE property '\" + key + \"'\");\n }\n });\n return options;\n}\nfunction parseNumber(value) {\n if (value.indexOf(',') !== -1) {\n var values = value.split(',');\n return values.map(parseIndividualNumber);\n }\n return parseIndividualNumber(value);\n}\nfunction parseIndividualNumber(value) {\n if (/^[+-]?\\d+$/.test(value)) {\n return Number(value);\n }\n return value;\n}\nfunction parseWeekday(value) {\n var days = value.split(',');\n return days.map(function (day) {\n if (day.length === 2) {\n // MO, TU, ...\n return Days[day]; // wday instanceof Weekday\n }\n // -1MO, +3FR, 1SO, 13TU ...\n var parts = day.match(/^([+-]?\\d{1,2})([A-Z]{2})$/);\n if (!parts || parts.length < 3) {\n throw new SyntaxError(\"Invalid weekday string: \".concat(day));\n }\n var n = Number(parts[1]);\n var wdaypart = parts[2];\n var wday = Days[wdaypart].weekday;\n return new Weekday(wday, n);\n });\n}\n//# sourceMappingURL=parsestring.js.map","import { dateInTimeZone, timeToUntilString } from './dateutil';\nvar DateWithZone = /** @class */ (function () {\n function DateWithZone(date, tzid) {\n if (isNaN(date.getTime())) {\n throw new RangeError('Invalid date passed to DateWithZone');\n }\n this.date = date;\n this.tzid = tzid;\n }\n Object.defineProperty(DateWithZone.prototype, \"isUTC\", {\n get: function () {\n return !this.tzid || this.tzid.toUpperCase() === 'UTC';\n },\n enumerable: false,\n configurable: true\n });\n DateWithZone.prototype.toString = function () {\n var datestr = timeToUntilString(this.date.getTime(), this.isUTC);\n if (!this.isUTC) {\n return \";TZID=\".concat(this.tzid, \":\").concat(datestr);\n }\n return \":\".concat(datestr);\n };\n DateWithZone.prototype.getTime = function () {\n return this.date.getTime();\n };\n DateWithZone.prototype.rezonedDate = function () {\n if (this.isUTC) {\n return this.date;\n }\n return dateInTimeZone(this.date, this.tzid);\n };\n return DateWithZone;\n}());\nexport { DateWithZone };\n//# sourceMappingURL=datewithzone.js.map","import { RRule, DEFAULT_OPTIONS } from './rrule';\nimport { includes, isPresent, isArray, isNumber, toArray } from './helpers';\nimport { Weekday } from './weekday';\nimport { timeToUntilString } from './dateutil';\nimport { DateWithZone } from './datewithzone';\nexport function optionsToString(options) {\n var rrule = [];\n var dtstart = '';\n var keys = Object.keys(options);\n var defaultKeys = Object.keys(DEFAULT_OPTIONS);\n for (var i = 0; i < keys.length; i++) {\n if (keys[i] === 'tzid')\n continue;\n if (!includes(defaultKeys, keys[i]))\n continue;\n var key = keys[i].toUpperCase();\n var value = options[keys[i]];\n var outValue = '';\n if (!isPresent(value) || (isArray(value) && !value.length))\n continue;\n switch (key) {\n case 'FREQ':\n outValue = RRule.FREQUENCIES[options.freq];\n break;\n case 'WKST':\n if (isNumber(value)) {\n outValue = new Weekday(value).toString();\n }\n else {\n outValue = value.toString();\n }\n break;\n case 'BYWEEKDAY':\n /*\n NOTE: BYWEEKDAY is a special case.\n RRule() deconstructs the rule.options.byweekday array\n into an array of Weekday arguments.\n On the other hand, rule.origOptions is an array of Weekdays.\n We need to handle both cases here.\n It might be worth change RRule to keep the Weekdays.\n \n Also, BYWEEKDAY (used by RRule) vs. BYDAY (RFC)\n \n */\n key = 'BYDAY';\n outValue = toArray(value)\n .map(function (wday) {\n if (wday instanceof Weekday) {\n return wday;\n }\n if (isArray(wday)) {\n return new Weekday(wday[0], wday[1]);\n }\n return new Weekday(wday);\n })\n .toString();\n break;\n case 'DTSTART':\n dtstart = buildDtstart(value, options.tzid);\n break;\n case 'UNTIL':\n outValue = timeToUntilString(value, !options.tzid);\n break;\n default:\n if (isArray(value)) {\n var strValues = [];\n for (var j = 0; j < value.length; j++) {\n strValues[j] = String(value[j]);\n }\n outValue = strValues.toString();\n }\n else {\n outValue = String(value);\n }\n }\n if (outValue) {\n rrule.push([key, outValue]);\n }\n }\n var rules = rrule\n .map(function (_a) {\n var key = _a[0], value = _a[1];\n return \"\".concat(key, \"=\").concat(value.toString());\n })\n .join(';');\n var ruleString = '';\n if (rules !== '') {\n ruleString = \"RRULE:\".concat(rules);\n }\n return [dtstart, ruleString].filter(function (x) { return !!x; }).join('\\n');\n}\nfunction buildDtstart(dtstart, tzid) {\n if (!dtstart) {\n return '';\n }\n return 'DTSTART' + new DateWithZone(new Date(dtstart), tzid).toString();\n}\n//# sourceMappingURL=optionstostring.js.map","import IterResult from './iterresult';\nimport { clone, cloneDates } from './dateutil';\nimport { isArray } from './helpers';\nfunction argsMatch(left, right) {\n if (Array.isArray(left)) {\n if (!Array.isArray(right))\n return false;\n if (left.length !== right.length)\n return false;\n return left.every(function (date, i) { return date.getTime() === right[i].getTime(); });\n }\n if (left instanceof Date) {\n return right instanceof Date && left.getTime() === right.getTime();\n }\n return left === right;\n}\nvar Cache = /** @class */ (function () {\n function Cache() {\n this.all = false;\n this.before = [];\n this.after = [];\n this.between = [];\n }\n /**\n * @param {String} what - all/before/after/between\n * @param {Array,Date} value - an array of dates, one date, or null\n * @param {Object?} args - _iter arguments\n */\n Cache.prototype._cacheAdd = function (what, value, args) {\n if (value) {\n value = value instanceof Date ? clone(value) : cloneDates(value);\n }\n if (what === 'all') {\n this.all = value;\n }\n else {\n args._value = value;\n this[what].push(args);\n }\n };\n /**\n * @return false - not in the cache\n * @return null - cached, but zero occurrences (before/after)\n * @return Date - cached (before/after)\n * @return [] - cached, but zero occurrences (all/between)\n * @return [Date1, DateN] - cached (all/between)\n */\n Cache.prototype._cacheGet = function (what, args) {\n var cached = false;\n var argsKeys = args ? Object.keys(args) : [];\n var findCacheDiff = function (item) {\n for (var i = 0; i < argsKeys.length; i++) {\n var key = argsKeys[i];\n if (!argsMatch(args[key], item[key])) {\n return true;\n }\n }\n return false;\n };\n var cachedObject = this[what];\n if (what === 'all') {\n cached = this.all;\n }\n else if (isArray(cachedObject)) {\n // Let's see whether we've already called the\n // 'what' method with the same 'args'\n for (var i = 0; i < cachedObject.length; i++) {\n var item = cachedObject[i];\n if (argsKeys.length && findCacheDiff(item))\n continue;\n cached = item._value;\n break;\n }\n }\n if (!cached && this.all) {\n // Not in the cache, but we already know all the occurrences,\n // so we can find the correct dates from the cached ones.\n var iterResult = new IterResult(what, args);\n for (var i = 0; i < this.all.length; i++) {\n if (!iterResult.accept(this.all[i]))\n break;\n }\n cached = iterResult.getValue();\n this._cacheAdd(what, cached, args);\n }\n return isArray(cached)\n ? cloneDates(cached)\n : cached instanceof Date\n ? clone(cached)\n : cached;\n };\n return Cache;\n}());\nexport { Cache };\n//# sourceMappingURL=cache.js.map","import { __spreadArray } from \"tslib\";\nimport { range, repeat } from './helpers';\n// =============================================================================\n// Date masks\n// =============================================================================\n// Every mask is 7 days longer to handle cross-year weekly periods.\nvar M365MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], repeat(1, 31), true), repeat(2, 28), true), repeat(3, 31), true), repeat(4, 30), true), repeat(5, 31), true), repeat(6, 30), true), repeat(7, 31), true), repeat(8, 31), true), repeat(9, 30), true), repeat(10, 31), true), repeat(11, 30), true), repeat(12, 31), true), repeat(1, 7), true);\nvar M366MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], repeat(1, 31), true), repeat(2, 29), true), repeat(3, 31), true), repeat(4, 30), true), repeat(5, 31), true), repeat(6, 30), true), repeat(7, 31), true), repeat(8, 31), true), repeat(9, 30), true), repeat(10, 31), true), repeat(11, 30), true), repeat(12, 31), true), repeat(1, 7), true);\nvar M28 = range(1, 29);\nvar M29 = range(1, 30);\nvar M30 = range(1, 31);\nvar M31 = range(1, 32);\nvar MDAY366MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], M31, true), M29, true), M31, true), M30, true), M31, true), M30, true), M31, true), M31, true), M30, true), M31, true), M30, true), M31, true), M31.slice(0, 7), true);\nvar MDAY365MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], M31, true), M28, true), M31, true), M30, true), M31, true), M30, true), M31, true), M31, true), M30, true), M31, true), M30, true), M31, true), M31.slice(0, 7), true);\nvar NM28 = range(-28, 0);\nvar NM29 = range(-29, 0);\nvar NM30 = range(-30, 0);\nvar NM31 = range(-31, 0);\nvar NMDAY366MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], NM31, true), NM29, true), NM31, true), NM30, true), NM31, true), NM30, true), NM31, true), NM31, true), NM30, true), NM31, true), NM30, true), NM31, true), NM31.slice(0, 7), true);\nvar NMDAY365MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], NM31, true), NM28, true), NM31, true), NM30, true), NM31, true), NM30, true), NM31, true), NM31, true), NM30, true), NM31, true), NM30, true), NM31, true), NM31.slice(0, 7), true);\nvar M366RANGE = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366];\nvar M365RANGE = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365];\nvar WDAYMASK = (function () {\n var wdaymask = [];\n for (var i = 0; i < 55; i++)\n wdaymask = wdaymask.concat(range(7));\n return wdaymask;\n})();\nexport { WDAYMASK, M365MASK, M365RANGE, M366MASK, M366RANGE, MDAY365MASK, MDAY366MASK, NMDAY365MASK, NMDAY366MASK, };\n//# sourceMappingURL=masks.js.map","import { __assign } from \"tslib\";\nimport { datetime, getWeekday, isLeapYear, toOrdinal } from '../dateutil';\nimport { empty, repeat, pymod, includes } from '../helpers';\nimport { M365MASK, MDAY365MASK, NMDAY365MASK, WDAYMASK, M365RANGE, M366MASK, MDAY366MASK, NMDAY366MASK, M366RANGE, } from '../masks';\nexport function rebuildYear(year, options) {\n var firstyday = datetime(year, 1, 1);\n var yearlen = isLeapYear(year) ? 366 : 365;\n var nextyearlen = isLeapYear(year + 1) ? 366 : 365;\n var yearordinal = toOrdinal(firstyday);\n var yearweekday = getWeekday(firstyday);\n var result = __assign(__assign({ yearlen: yearlen, nextyearlen: nextyearlen, yearordinal: yearordinal, yearweekday: yearweekday }, baseYearMasks(year)), { wnomask: null });\n if (empty(options.byweekno)) {\n return result;\n }\n result.wnomask = repeat(0, yearlen + 7);\n var firstwkst;\n var wyearlen;\n var no1wkst = (firstwkst = pymod(7 - yearweekday + options.wkst, 7));\n if (no1wkst >= 4) {\n no1wkst = 0;\n // Number of days in the year, plus the days we got\n // from last year.\n wyearlen = result.yearlen + pymod(yearweekday - options.wkst, 7);\n }\n else {\n // Number of days in the year, minus the days we\n // left in last year.\n wyearlen = yearlen - no1wkst;\n }\n var div = Math.floor(wyearlen / 7);\n var mod = pymod(wyearlen, 7);\n var numweeks = Math.floor(div + mod / 4);\n for (var j = 0; j < options.byweekno.length; j++) {\n var n = options.byweekno[j];\n if (n < 0) {\n n += numweeks + 1;\n }\n if (!(n > 0 && n <= numweeks)) {\n continue;\n }\n var i = void 0;\n if (n > 1) {\n i = no1wkst + (n - 1) * 7;\n if (no1wkst !== firstwkst) {\n i -= 7 - firstwkst;\n }\n }\n else {\n i = no1wkst;\n }\n for (var k = 0; k < 7; k++) {\n result.wnomask[i] = 1;\n i++;\n if (result.wdaymask[i] === options.wkst)\n break;\n }\n }\n if (includes(options.byweekno, 1)) {\n // Check week number 1 of next year as well\n // orig-TODO : Check -numweeks for next year.\n var i = no1wkst + numweeks * 7;\n if (no1wkst !== firstwkst)\n i -= 7 - firstwkst;\n if (i < yearlen) {\n // If week starts in next year, we\n // don't care about it.\n for (var j = 0; j < 7; j++) {\n result.wnomask[i] = 1;\n i += 1;\n if (result.wdaymask[i] === options.wkst)\n break;\n }\n }\n }\n if (no1wkst) {\n // Check last week number of last year as\n // well. If no1wkst is 0, either the year\n // started on week start, or week number 1\n // got days from last year, so there are no\n // days from last year's last week number in\n // this year.\n var lnumweeks = void 0;\n if (!includes(options.byweekno, -1)) {\n var lyearweekday = getWeekday(datetime(year - 1, 1, 1));\n var lno1wkst = pymod(7 - lyearweekday.valueOf() + options.wkst, 7);\n var lyearlen = isLeapYear(year - 1) ? 366 : 365;\n var weekst = void 0;\n if (lno1wkst >= 4) {\n lno1wkst = 0;\n weekst = lyearlen + pymod(lyearweekday - options.wkst, 7);\n }\n else {\n weekst = yearlen - no1wkst;\n }\n lnumweeks = Math.floor(52 + pymod(weekst, 7) / 4);\n }\n else {\n lnumweeks = -1;\n }\n if (includes(options.byweekno, lnumweeks)) {\n for (var i = 0; i < no1wkst; i++)\n result.wnomask[i] = 1;\n }\n }\n return result;\n}\nfunction baseYearMasks(year) {\n var yearlen = isLeapYear(year) ? 366 : 365;\n var firstyday = datetime(year, 1, 1);\n var wday = getWeekday(firstyday);\n if (yearlen === 365) {\n return {\n mmask: M365MASK,\n mdaymask: MDAY365MASK,\n nmdaymask: NMDAY365MASK,\n wdaymask: WDAYMASK.slice(wday),\n mrange: M365RANGE,\n };\n }\n return {\n mmask: M366MASK,\n mdaymask: MDAY366MASK,\n nmdaymask: NMDAY366MASK,\n wdaymask: WDAYMASK.slice(wday),\n mrange: M366RANGE,\n };\n}\n//# sourceMappingURL=yearinfo.js.map","import { RRule } from '../rrule';\nimport { empty, repeat, pymod } from '../helpers';\nexport function rebuildMonth(year, month, yearlen, mrange, wdaymask, options) {\n var result = {\n lastyear: year,\n lastmonth: month,\n nwdaymask: [],\n };\n var ranges = [];\n if (options.freq === RRule.YEARLY) {\n if (empty(options.bymonth)) {\n ranges = [[0, yearlen]];\n }\n else {\n for (var j = 0; j < options.bymonth.length; j++) {\n month = options.bymonth[j];\n ranges.push(mrange.slice(month - 1, month + 1));\n }\n }\n }\n else if (options.freq === RRule.MONTHLY) {\n ranges = [mrange.slice(month - 1, month + 1)];\n }\n if (empty(ranges)) {\n return result;\n }\n // Weekly frequency won't get here, so we may not\n // care about cross-year weekly periods.\n result.nwdaymask = repeat(0, yearlen);\n for (var j = 0; j < ranges.length; j++) {\n var rang = ranges[j];\n var first = rang[0];\n var last = rang[1] - 1;\n for (var k = 0; k < options.bynweekday.length; k++) {\n var i = void 0;\n var _a = options.bynweekday[k], wday = _a[0], n = _a[1];\n if (n < 0) {\n i = last + (n + 1) * 7;\n i -= pymod(wdaymask[i] - wday, 7);\n }\n else {\n i = first + (n - 1) * 7;\n i += pymod(7 - wdaymask[i] + wday, 7);\n }\n if (first <= i && i <= last)\n result.nwdaymask[i] = 1;\n }\n }\n return result;\n}\n//# sourceMappingURL=monthinfo.js.map","export function easter(y, offset) {\n if (offset === void 0) { offset = 0; }\n var a = y % 19;\n var b = Math.floor(y / 100);\n var c = y % 100;\n var d = Math.floor(b / 4);\n var e = b % 4;\n var f = Math.floor((b + 8) / 25);\n var g = Math.floor((b - f + 1) / 3);\n var h = Math.floor(19 * a + b - d - g + 15) % 30;\n var i = Math.floor(c / 4);\n var k = c % 4;\n var l = Math.floor(32 + 2 * e + 2 * i - h - k) % 7;\n var m = Math.floor((a + 11 * h + 22 * l) / 451);\n var month = Math.floor((h + l - 7 * m + 114) / 31);\n var day = ((h + l - 7 * m + 114) % 31) + 1;\n var date = Date.UTC(y, month - 1, day + offset);\n var yearStart = Date.UTC(y, 0, 1);\n return [Math.ceil((date - yearStart) / (1000 * 60 * 60 * 24))];\n}\n//# sourceMappingURL=easter.js.map","import { notEmpty, repeat, range, isPresent } from '../helpers';\nimport { Frequency } from '../types';\nimport { rebuildYear } from './yearinfo';\nimport { rebuildMonth } from './monthinfo';\nimport { easter } from './easter';\nimport { Time } from '../datetime';\nimport { datetime, sort, toOrdinal } from '../dateutil';\n// =============================================================================\n// Iterinfo\n// =============================================================================\nvar Iterinfo = /** @class */ (function () {\n // eslint-disable-next-line no-empty-function\n function Iterinfo(options) {\n this.options = options;\n }\n Iterinfo.prototype.rebuild = function (year, month) {\n var options = this.options;\n if (year !== this.lastyear) {\n this.yearinfo = rebuildYear(year, options);\n }\n if (notEmpty(options.bynweekday) &&\n (month !== this.lastmonth || year !== this.lastyear)) {\n var _a = this.yearinfo, yearlen = _a.yearlen, mrange = _a.mrange, wdaymask = _a.wdaymask;\n this.monthinfo = rebuildMonth(year, month, yearlen, mrange, wdaymask, options);\n }\n if (isPresent(options.byeaster)) {\n this.eastermask = easter(year, options.byeaster);\n }\n };\n Object.defineProperty(Iterinfo.prototype, \"lastyear\", {\n get: function () {\n return this.monthinfo ? this.monthinfo.lastyear : null;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"lastmonth\", {\n get: function () {\n return this.monthinfo ? this.monthinfo.lastmonth : null;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"yearlen\", {\n get: function () {\n return this.yearinfo.yearlen;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"yearordinal\", {\n get: function () {\n return this.yearinfo.yearordinal;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"mrange\", {\n get: function () {\n return this.yearinfo.mrange;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"wdaymask\", {\n get: function () {\n return this.yearinfo.wdaymask;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"mmask\", {\n get: function () {\n return this.yearinfo.mmask;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"wnomask\", {\n get: function () {\n return this.yearinfo.wnomask;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"nwdaymask\", {\n get: function () {\n return this.monthinfo ? this.monthinfo.nwdaymask : [];\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"nextyearlen\", {\n get: function () {\n return this.yearinfo.nextyearlen;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"mdaymask\", {\n get: function () {\n return this.yearinfo.mdaymask;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"nmdaymask\", {\n get: function () {\n return this.yearinfo.nmdaymask;\n },\n enumerable: false,\n configurable: true\n });\n Iterinfo.prototype.ydayset = function () {\n return [range(this.yearlen), 0, this.yearlen];\n };\n Iterinfo.prototype.mdayset = function (_, month) {\n var start = this.mrange[month - 1];\n var end = this.mrange[month];\n var set = repeat(null, this.yearlen);\n for (var i = start; i < end; i++)\n set[i] = i;\n return [set, start, end];\n };\n Iterinfo.prototype.wdayset = function (year, month, day) {\n // We need to handle cross-year weeks here.\n var set = repeat(null, this.yearlen + 7);\n var i = toOrdinal(datetime(year, month, day)) - this.yearordinal;\n var start = i;\n for (var j = 0; j < 7; j++) {\n set[i] = i;\n ++i;\n if (this.wdaymask[i] === this.options.wkst)\n break;\n }\n return [set, start, i];\n };\n Iterinfo.prototype.ddayset = function (year, month, day) {\n var set = repeat(null, this.yearlen);\n var i = toOrdinal(datetime(year, month, day)) - this.yearordinal;\n set[i] = i;\n return [set, i, i + 1];\n };\n Iterinfo.prototype.htimeset = function (hour, _, second, millisecond) {\n var _this = this;\n var set = [];\n this.options.byminute.forEach(function (minute) {\n set = set.concat(_this.mtimeset(hour, minute, second, millisecond));\n });\n sort(set);\n return set;\n };\n Iterinfo.prototype.mtimeset = function (hour, minute, _, millisecond) {\n var set = this.options.bysecond.map(function (second) { return new Time(hour, minute, second, millisecond); });\n sort(set);\n return set;\n };\n Iterinfo.prototype.stimeset = function (hour, minute, second, millisecond) {\n return [new Time(hour, minute, second, millisecond)];\n };\n Iterinfo.prototype.getdayset = function (freq) {\n switch (freq) {\n case Frequency.YEARLY:\n return this.ydayset.bind(this);\n case Frequency.MONTHLY:\n return this.mdayset.bind(this);\n case Frequency.WEEKLY:\n return this.wdayset.bind(this);\n case Frequency.DAILY:\n return this.ddayset.bind(this);\n default:\n return this.ddayset.bind(this);\n }\n };\n Iterinfo.prototype.gettimeset = function (freq) {\n switch (freq) {\n case Frequency.HOURLY:\n return this.htimeset.bind(this);\n case Frequency.MINUTELY:\n return this.mtimeset.bind(this);\n case Frequency.SECONDLY:\n return this.stimeset.bind(this);\n }\n };\n return Iterinfo;\n}());\nexport default Iterinfo;\n//# sourceMappingURL=index.js.map","import { combine, fromOrdinal, sort } from '../dateutil';\nimport { pymod, isPresent, includes } from '../helpers';\nexport function buildPoslist(bysetpos, timeset, start, end, ii, dayset) {\n var poslist = [];\n for (var j = 0; j < bysetpos.length; j++) {\n var daypos = void 0;\n var timepos = void 0;\n var pos = bysetpos[j];\n if (pos < 0) {\n daypos = Math.floor(pos / timeset.length);\n timepos = pymod(pos, timeset.length);\n }\n else {\n daypos = Math.floor((pos - 1) / timeset.length);\n timepos = pymod(pos - 1, timeset.length);\n }\n var tmp = [];\n for (var k = start; k < end; k++) {\n var val = dayset[k];\n if (!isPresent(val))\n continue;\n tmp.push(val);\n }\n var i = void 0;\n if (daypos < 0) {\n i = tmp.slice(daypos)[0];\n }\n else {\n i = tmp[daypos];\n }\n var time = timeset[timepos];\n var date = fromOrdinal(ii.yearordinal + i);\n var res = combine(date, time);\n // XXX: can this ever be in the array?\n // - compare the actual date instead?\n if (!includes(poslist, res))\n poslist.push(res);\n }\n sort(poslist);\n return poslist;\n}\n//# sourceMappingURL=poslist.js.map","import { freqIsDailyOrGreater } from '../types';\nimport { combine, fromOrdinal, MAXYEAR } from '../dateutil';\nimport Iterinfo from '../iterinfo/index';\nimport { RRule } from '../rrule';\nimport { buildTimeset } from '../parseoptions';\nimport { notEmpty, includes, isPresent } from '../helpers';\nimport { DateWithZone } from '../datewithzone';\nimport { buildPoslist } from './poslist';\nimport { DateTime } from '../datetime';\nexport function iter(iterResult, options) {\n var dtstart = options.dtstart, freq = options.freq, interval = options.interval, until = options.until, bysetpos = options.bysetpos;\n var count = options.count;\n if (count === 0 || interval === 0) {\n return emitResult(iterResult);\n }\n var counterDate = DateTime.fromDate(dtstart);\n var ii = new Iterinfo(options);\n ii.rebuild(counterDate.year, counterDate.month);\n var timeset = makeTimeset(ii, counterDate, options);\n for (;;) {\n var _a = ii.getdayset(freq)(counterDate.year, counterDate.month, counterDate.day), dayset = _a[0], start = _a[1], end = _a[2];\n var filtered = removeFilteredDays(dayset, start, end, ii, options);\n if (notEmpty(bysetpos)) {\n var poslist = buildPoslist(bysetpos, timeset, start, end, ii, dayset);\n for (var j = 0; j < poslist.length; j++) {\n var res = poslist[j];\n if (until && res > until) {\n return emitResult(iterResult);\n }\n if (res >= dtstart) {\n var rezonedDate = rezoneIfNeeded(res, options);\n if (!iterResult.accept(rezonedDate)) {\n return emitResult(iterResult);\n }\n if (count) {\n --count;\n if (!count) {\n return emitResult(iterResult);\n }\n }\n }\n }\n }\n else {\n for (var j = start; j < end; j++) {\n var currentDay = dayset[j];\n if (!isPresent(currentDay)) {\n continue;\n }\n var date = fromOrdinal(ii.yearordinal + currentDay);\n for (var k = 0; k < timeset.length; k++) {\n var time = timeset[k];\n var res = combine(date, time);\n if (until && res > until) {\n return emitResult(iterResult);\n }\n if (res >= dtstart) {\n var rezonedDate = rezoneIfNeeded(res, options);\n if (!iterResult.accept(rezonedDate)) {\n return emitResult(iterResult);\n }\n if (count) {\n --count;\n if (!count) {\n return emitResult(iterResult);\n }\n }\n }\n }\n }\n }\n if (options.interval === 0) {\n return emitResult(iterResult);\n }\n // Handle frequency and interval\n counterDate.add(options, filtered);\n if (counterDate.year > MAXYEAR) {\n return emitResult(iterResult);\n }\n if (!freqIsDailyOrGreater(freq)) {\n timeset = ii.gettimeset(freq)(counterDate.hour, counterDate.minute, counterDate.second, 0);\n }\n ii.rebuild(counterDate.year, counterDate.month);\n }\n}\nfunction isFiltered(ii, currentDay, options) {\n var bymonth = options.bymonth, byweekno = options.byweekno, byweekday = options.byweekday, byeaster = options.byeaster, bymonthday = options.bymonthday, bynmonthday = options.bynmonthday, byyearday = options.byyearday;\n return ((notEmpty(bymonth) && !includes(bymonth, ii.mmask[currentDay])) ||\n (notEmpty(byweekno) && !ii.wnomask[currentDay]) ||\n (notEmpty(byweekday) && !includes(byweekday, ii.wdaymask[currentDay])) ||\n (notEmpty(ii.nwdaymask) && !ii.nwdaymask[currentDay]) ||\n (byeaster !== null && !includes(ii.eastermask, currentDay)) ||\n ((notEmpty(bymonthday) || notEmpty(bynmonthday)) &&\n !includes(bymonthday, ii.mdaymask[currentDay]) &&\n !includes(bynmonthday, ii.nmdaymask[currentDay])) ||\n (notEmpty(byyearday) &&\n ((currentDay < ii.yearlen &&\n !includes(byyearday, currentDay + 1) &&\n !includes(byyearday, -ii.yearlen + currentDay)) ||\n (currentDay >= ii.yearlen &&\n !includes(byyearday, currentDay + 1 - ii.yearlen) &&\n !includes(byyearday, -ii.nextyearlen + currentDay - ii.yearlen)))));\n}\nfunction rezoneIfNeeded(date, options) {\n return new DateWithZone(date, options.tzid).rezonedDate();\n}\nfunction emitResult(iterResult) {\n return iterResult.getValue();\n}\nfunction removeFilteredDays(dayset, start, end, ii, options) {\n var filtered = false;\n for (var dayCounter = start; dayCounter < end; dayCounter++) {\n var currentDay = dayset[dayCounter];\n filtered = isFiltered(ii, currentDay, options);\n if (filtered)\n dayset[currentDay] = null;\n }\n return filtered;\n}\nfunction makeTimeset(ii, counterDate, options) {\n var freq = options.freq, byhour = options.byhour, byminute = options.byminute, bysecond = options.bysecond;\n if (freqIsDailyOrGreater(freq)) {\n return buildTimeset(options);\n }\n if ((freq >= RRule.HOURLY &&\n notEmpty(byhour) &&\n !includes(byhour, counterDate.hour)) ||\n (freq >= RRule.MINUTELY &&\n notEmpty(byminute) &&\n !includes(byminute, counterDate.minute)) ||\n (freq >= RRule.SECONDLY &&\n notEmpty(bysecond) &&\n !includes(bysecond, counterDate.second))) {\n return [];\n }\n return ii.gettimeset(freq)(counterDate.hour, counterDate.minute, counterDate.second, counterDate.millisecond);\n}\n//# sourceMappingURL=index.js.map","import { isValidDate } from './dateutil';\nimport IterResult from './iterresult';\nimport CallbackIterResult from './callbackiterresult';\nimport { fromText, parseText, toText, isFullyConvertible } from './nlp/index';\nimport { Frequency, } from './types';\nimport { parseOptions, initializeOptions } from './parseoptions';\nimport { parseString } from './parsestring';\nimport { optionsToString } from './optionstostring';\nimport { Cache } from './cache';\nimport { Weekday } from './weekday';\nimport { iter } from './iter/index';\n// =============================================================================\n// RRule\n// =============================================================================\nexport var Days = {\n MO: new Weekday(0),\n TU: new Weekday(1),\n WE: new Weekday(2),\n TH: new Weekday(3),\n FR: new Weekday(4),\n SA: new Weekday(5),\n SU: new Weekday(6),\n};\nexport var DEFAULT_OPTIONS = {\n freq: Frequency.YEARLY,\n dtstart: null,\n interval: 1,\n wkst: Days.MO,\n count: null,\n until: null,\n tzid: null,\n bysetpos: null,\n bymonth: null,\n bymonthday: null,\n bynmonthday: null,\n byyearday: null,\n byweekno: null,\n byweekday: null,\n bynweekday: null,\n byhour: null,\n byminute: null,\n bysecond: null,\n byeaster: null,\n};\nexport var defaultKeys = Object.keys(DEFAULT_OPTIONS);\n/**\n *\n * @param {Options?} options - see \n * - The only required option is `freq`, one of RRule.YEARLY, RRule.MONTHLY, ...\n * @constructor\n */\nvar RRule = /** @class */ (function () {\n function RRule(options, noCache) {\n if (options === void 0) { options = {}; }\n if (noCache === void 0) { noCache = false; }\n // RFC string\n this._cache = noCache ? null : new Cache();\n // used by toString()\n this.origOptions = initializeOptions(options);\n var parsedOptions = parseOptions(options).parsedOptions;\n this.options = parsedOptions;\n }\n RRule.parseText = function (text, language) {\n return parseText(text, language);\n };\n RRule.fromText = function (text, language) {\n return fromText(text, language);\n };\n RRule.fromString = function (str) {\n return new RRule(RRule.parseString(str) || undefined);\n };\n RRule.prototype._iter = function (iterResult) {\n return iter(iterResult, this.options);\n };\n RRule.prototype._cacheGet = function (what, args) {\n if (!this._cache)\n return false;\n return this._cache._cacheGet(what, args);\n };\n RRule.prototype._cacheAdd = function (what, value, args) {\n if (!this._cache)\n return;\n return this._cache._cacheAdd(what, value, args);\n };\n /**\n * @param {Function} iterator - optional function that will be called\n * on each date that is added. It can return false\n * to stop the iteration.\n * @return Array containing all recurrences.\n */\n RRule.prototype.all = function (iterator) {\n if (iterator) {\n return this._iter(new CallbackIterResult('all', {}, iterator));\n }\n var result = this._cacheGet('all');\n if (result === false) {\n result = this._iter(new IterResult('all', {}));\n this._cacheAdd('all', result);\n }\n return result;\n };\n /**\n * Returns all the occurrences of the rrule between after and before.\n * The inc keyword defines what happens if after and/or before are\n * themselves occurrences. With inc == True, they will be included in the\n * list, if they are found in the recurrence set.\n *\n * @return Array\n */\n RRule.prototype.between = function (after, before, inc, iterator) {\n if (inc === void 0) { inc = false; }\n if (!isValidDate(after) || !isValidDate(before)) {\n throw new Error('Invalid date passed in to RRule.between');\n }\n var args = {\n before: before,\n after: after,\n inc: inc,\n };\n if (iterator) {\n return this._iter(new CallbackIterResult('between', args, iterator));\n }\n var result = this._cacheGet('between', args);\n if (result === false) {\n result = this._iter(new IterResult('between', args));\n this._cacheAdd('between', result, args);\n }\n return result;\n };\n /**\n * Returns the last recurrence before the given datetime instance.\n * The inc keyword defines what happens if dt is an occurrence.\n * With inc == True, if dt itself is an occurrence, it will be returned.\n *\n * @return Date or null\n */\n RRule.prototype.before = function (dt, inc) {\n if (inc === void 0) { inc = false; }\n if (!isValidDate(dt)) {\n throw new Error('Invalid date passed in to RRule.before');\n }\n var args = { dt: dt, inc: inc };\n var result = this._cacheGet('before', args);\n if (result === false) {\n result = this._iter(new IterResult('before', args));\n this._cacheAdd('before', result, args);\n }\n return result;\n };\n /**\n * Returns the first recurrence after the given datetime instance.\n * The inc keyword defines what happens if dt is an occurrence.\n * With inc == True, if dt itself is an occurrence, it will be returned.\n *\n * @return Date or null\n */\n RRule.prototype.after = function (dt, inc) {\n if (inc === void 0) { inc = false; }\n if (!isValidDate(dt)) {\n throw new Error('Invalid date passed in to RRule.after');\n }\n var args = { dt: dt, inc: inc };\n var result = this._cacheGet('after', args);\n if (result === false) {\n result = this._iter(new IterResult('after', args));\n this._cacheAdd('after', result, args);\n }\n return result;\n };\n /**\n * Returns the number of recurrences in this set. It will have go trough\n * the whole recurrence, if this hasn't been done before.\n */\n RRule.prototype.count = function () {\n return this.all().length;\n };\n /**\n * Converts the rrule into its string representation\n *\n * @see \n * @return String\n */\n RRule.prototype.toString = function () {\n return optionsToString(this.origOptions);\n };\n /**\n * Will convert all rules described in nlp:ToText\n * to text.\n */\n RRule.prototype.toText = function (gettext, language, dateFormatter) {\n return toText(this, gettext, language, dateFormatter);\n };\n RRule.prototype.isFullyConvertibleToText = function () {\n return isFullyConvertible(this);\n };\n /**\n * @return a RRule instance with the same freq and options\n * as this one (cache is not cloned)\n */\n RRule.prototype.clone = function () {\n return new RRule(this.origOptions);\n };\n // RRule class 'constants'\n RRule.FREQUENCIES = [\n 'YEARLY',\n 'MONTHLY',\n 'WEEKLY',\n 'DAILY',\n 'HOURLY',\n 'MINUTELY',\n 'SECONDLY',\n ];\n RRule.YEARLY = Frequency.YEARLY;\n RRule.MONTHLY = Frequency.MONTHLY;\n RRule.WEEKLY = Frequency.WEEKLY;\n RRule.DAILY = Frequency.DAILY;\n RRule.HOURLY = Frequency.HOURLY;\n RRule.MINUTELY = Frequency.MINUTELY;\n RRule.SECONDLY = Frequency.SECONDLY;\n RRule.MO = Days.MO;\n RRule.TU = Days.TU;\n RRule.WE = Days.WE;\n RRule.TH = Days.TH;\n RRule.FR = Days.FR;\n RRule.SA = Days.SA;\n RRule.SU = Days.SU;\n RRule.parseString = parseString;\n RRule.optionsToString = optionsToString;\n return RRule;\n}());\nexport { RRule };\n//# sourceMappingURL=rrule.js.map","import { DateWithZone } from './datewithzone';\nimport { iter } from './iter';\nimport { sort } from './dateutil';\nexport function iterSet(iterResult, _rrule, _exrule, _rdate, _exdate, tzid) {\n var _exdateHash = {};\n var _accept = iterResult.accept;\n function evalExdate(after, before) {\n _exrule.forEach(function (rrule) {\n rrule.between(after, before, true).forEach(function (date) {\n _exdateHash[Number(date)] = true;\n });\n });\n }\n _exdate.forEach(function (date) {\n var zonedDate = new DateWithZone(date, tzid).rezonedDate();\n _exdateHash[Number(zonedDate)] = true;\n });\n iterResult.accept = function (date) {\n var dt = Number(date);\n if (isNaN(dt))\n return _accept.call(this, date);\n if (!_exdateHash[dt]) {\n evalExdate(new Date(dt - 1), new Date(dt + 1));\n if (!_exdateHash[dt]) {\n _exdateHash[dt] = true;\n return _accept.call(this, date);\n }\n }\n return true;\n };\n if (iterResult.method === 'between') {\n evalExdate(iterResult.args.after, iterResult.args.before);\n iterResult.accept = function (date) {\n var dt = Number(date);\n if (!_exdateHash[dt]) {\n _exdateHash[dt] = true;\n return _accept.call(this, date);\n }\n return true;\n };\n }\n for (var i = 0; i < _rdate.length; i++) {\n var zonedDate = new DateWithZone(_rdate[i], tzid).rezonedDate();\n if (!iterResult.accept(new Date(zonedDate.getTime())))\n break;\n }\n _rrule.forEach(function (rrule) {\n iter(iterResult, rrule.options);\n });\n var res = iterResult._result;\n sort(res);\n switch (iterResult.method) {\n case 'all':\n case 'between':\n return res;\n case 'before':\n return ((res.length && res[res.length - 1]) || null);\n case 'after':\n default:\n return ((res.length && res[0]) || null);\n }\n}\n//# sourceMappingURL=iterset.js.map","import { __assign } from \"tslib\";\nimport { RRule } from './rrule';\nimport { RRuleSet } from './rruleset';\nimport { untilStringToDate } from './dateutil';\nimport { includes, split } from './helpers';\nimport { parseString, parseDtstart } from './parsestring';\n/**\n * RRuleStr\n * To parse a set of rrule strings\n */\nvar DEFAULT_OPTIONS = {\n dtstart: null,\n cache: false,\n unfold: false,\n forceset: false,\n compatible: false,\n tzid: null,\n};\nexport function parseInput(s, options) {\n var rrulevals = [];\n var rdatevals = [];\n var exrulevals = [];\n var exdatevals = [];\n var parsedDtstart = parseDtstart(s);\n var dtstart = parsedDtstart.dtstart;\n var tzid = parsedDtstart.tzid;\n var lines = splitIntoLines(s, options.unfold);\n lines.forEach(function (line) {\n var _a;\n if (!line)\n return;\n var _b = breakDownLine(line), name = _b.name, parms = _b.parms, value = _b.value;\n switch (name.toUpperCase()) {\n case 'RRULE':\n if (parms.length) {\n throw new Error(\"unsupported RRULE parm: \".concat(parms.join(',')));\n }\n rrulevals.push(parseString(line));\n break;\n case 'RDATE':\n var _c = (_a = /RDATE(?:;TZID=([^:=]+))?/i.exec(line)) !== null && _a !== void 0 ? _a : [], rdateTzid = _c[1];\n if (rdateTzid && !tzid) {\n tzid = rdateTzid;\n }\n rdatevals = rdatevals.concat(parseRDate(value, parms));\n break;\n case 'EXRULE':\n if (parms.length) {\n throw new Error(\"unsupported EXRULE parm: \".concat(parms.join(',')));\n }\n exrulevals.push(parseString(value));\n break;\n case 'EXDATE':\n exdatevals = exdatevals.concat(parseRDate(value, parms));\n break;\n case 'DTSTART':\n break;\n default:\n throw new Error('unsupported property: ' + name);\n }\n });\n return {\n dtstart: dtstart,\n tzid: tzid,\n rrulevals: rrulevals,\n rdatevals: rdatevals,\n exrulevals: exrulevals,\n exdatevals: exdatevals,\n };\n}\nfunction buildRule(s, options) {\n var _a = parseInput(s, options), rrulevals = _a.rrulevals, rdatevals = _a.rdatevals, exrulevals = _a.exrulevals, exdatevals = _a.exdatevals, dtstart = _a.dtstart, tzid = _a.tzid;\n var noCache = options.cache === false;\n if (options.compatible) {\n options.forceset = true;\n options.unfold = true;\n }\n if (options.forceset ||\n rrulevals.length > 1 ||\n rdatevals.length ||\n exrulevals.length ||\n exdatevals.length) {\n var rset_1 = new RRuleSet(noCache);\n rset_1.dtstart(dtstart);\n rset_1.tzid(tzid || undefined);\n rrulevals.forEach(function (val) {\n rset_1.rrule(new RRule(groomRruleOptions(val, dtstart, tzid), noCache));\n });\n rdatevals.forEach(function (date) {\n rset_1.rdate(date);\n });\n exrulevals.forEach(function (val) {\n rset_1.exrule(new RRule(groomRruleOptions(val, dtstart, tzid), noCache));\n });\n exdatevals.forEach(function (date) {\n rset_1.exdate(date);\n });\n if (options.compatible && options.dtstart)\n rset_1.rdate(dtstart);\n return rset_1;\n }\n var val = rrulevals[0] || {};\n return new RRule(groomRruleOptions(val, val.dtstart || options.dtstart || dtstart, val.tzid || options.tzid || tzid), noCache);\n}\nexport function rrulestr(s, options) {\n if (options === void 0) { options = {}; }\n return buildRule(s, initializeOptions(options));\n}\nfunction groomRruleOptions(val, dtstart, tzid) {\n return __assign(__assign({}, val), { dtstart: dtstart, tzid: tzid });\n}\nfunction initializeOptions(options) {\n var invalid = [];\n var keys = Object.keys(options);\n var defaultKeys = Object.keys(DEFAULT_OPTIONS);\n keys.forEach(function (key) {\n if (!includes(defaultKeys, key))\n invalid.push(key);\n });\n if (invalid.length) {\n throw new Error('Invalid options: ' + invalid.join(', '));\n }\n return __assign(__assign({}, DEFAULT_OPTIONS), options);\n}\nfunction extractName(line) {\n if (line.indexOf(':') === -1) {\n return {\n name: 'RRULE',\n value: line,\n };\n }\n var _a = split(line, ':', 1), name = _a[0], value = _a[1];\n return {\n name: name,\n value: value,\n };\n}\nfunction breakDownLine(line) {\n var _a = extractName(line), name = _a.name, value = _a.value;\n var parms = name.split(';');\n if (!parms)\n throw new Error('empty property name');\n return {\n name: parms[0].toUpperCase(),\n parms: parms.slice(1),\n value: value,\n };\n}\nfunction splitIntoLines(s, unfold) {\n if (unfold === void 0) { unfold = false; }\n s = s && s.trim();\n if (!s)\n throw new Error('Invalid empty string');\n // More info about 'unfold' option\n // Go head to http://www.ietf.org/rfc/rfc2445.txt\n if (!unfold) {\n return s.split(/\\s/);\n }\n var lines = s.split('\\n');\n var i = 0;\n while (i < lines.length) {\n // TODO\n var line = (lines[i] = lines[i].replace(/\\s+$/g, ''));\n if (!line) {\n lines.splice(i, 1);\n }\n else if (i > 0 && line[0] === ' ') {\n lines[i - 1] += line.slice(1);\n lines.splice(i, 1);\n }\n else {\n i += 1;\n }\n }\n return lines;\n}\nfunction validateDateParm(parms) {\n parms.forEach(function (parm) {\n if (!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(parm)) {\n throw new Error('unsupported RDATE/EXDATE parm: ' + parm);\n }\n });\n}\nfunction parseRDate(rdateval, parms) {\n validateDateParm(parms);\n return rdateval.split(',').map(function (datestr) { return untilStringToDate(datestr); });\n}\n//# sourceMappingURL=rrulestr.js.map","import { __extends } from \"tslib\";\nimport { RRule } from './rrule';\nimport { sort, timeToUntilString } from './dateutil';\nimport { includes } from './helpers';\nimport { iterSet } from './iterset';\nimport { rrulestr } from './rrulestr';\nimport { optionsToString } from './optionstostring';\nfunction createGetterSetter(fieldName) {\n var _this = this;\n return function (field) {\n if (field !== undefined) {\n _this[\"_\".concat(fieldName)] = field;\n }\n if (_this[\"_\".concat(fieldName)] !== undefined) {\n return _this[\"_\".concat(fieldName)];\n }\n for (var i = 0; i < _this._rrule.length; i++) {\n var field_1 = _this._rrule[i].origOptions[fieldName];\n if (field_1) {\n return field_1;\n }\n }\n };\n}\nvar RRuleSet = /** @class */ (function (_super) {\n __extends(RRuleSet, _super);\n /**\n *\n * @param {Boolean?} noCache\n * The same stratagy as RRule on cache, default to false\n * @constructor\n */\n function RRuleSet(noCache) {\n if (noCache === void 0) { noCache = false; }\n var _this = _super.call(this, {}, noCache) || this;\n _this.dtstart = createGetterSetter.apply(_this, ['dtstart']);\n _this.tzid = createGetterSetter.apply(_this, ['tzid']);\n _this._rrule = [];\n _this._rdate = [];\n _this._exrule = [];\n _this._exdate = [];\n return _this;\n }\n RRuleSet.prototype._iter = function (iterResult) {\n return iterSet(iterResult, this._rrule, this._exrule, this._rdate, this._exdate, this.tzid());\n };\n /**\n * Adds an RRule to the set\n *\n * @param {RRule}\n */\n RRuleSet.prototype.rrule = function (rrule) {\n _addRule(rrule, this._rrule);\n };\n /**\n * Adds an EXRULE to the set\n *\n * @param {RRule}\n */\n RRuleSet.prototype.exrule = function (rrule) {\n _addRule(rrule, this._exrule);\n };\n /**\n * Adds an RDate to the set\n *\n * @param {Date}\n */\n RRuleSet.prototype.rdate = function (date) {\n _addDate(date, this._rdate);\n };\n /**\n * Adds an EXDATE to the set\n *\n * @param {Date}\n */\n RRuleSet.prototype.exdate = function (date) {\n _addDate(date, this._exdate);\n };\n /**\n * Get list of included rrules in this recurrence set.\n *\n * @return List of rrules\n */\n RRuleSet.prototype.rrules = function () {\n return this._rrule.map(function (e) { return rrulestr(e.toString()); });\n };\n /**\n * Get list of excluded rrules in this recurrence set.\n *\n * @return List of exrules\n */\n RRuleSet.prototype.exrules = function () {\n return this._exrule.map(function (e) { return rrulestr(e.toString()); });\n };\n /**\n * Get list of included datetimes in this recurrence set.\n *\n * @return List of rdates\n */\n RRuleSet.prototype.rdates = function () {\n return this._rdate.map(function (e) { return new Date(e.getTime()); });\n };\n /**\n * Get list of included datetimes in this recurrence set.\n *\n * @return List of exdates\n */\n RRuleSet.prototype.exdates = function () {\n return this._exdate.map(function (e) { return new Date(e.getTime()); });\n };\n RRuleSet.prototype.valueOf = function () {\n var result = [];\n if (!this._rrule.length && this._dtstart) {\n result = result.concat(optionsToString({ dtstart: this._dtstart }));\n }\n this._rrule.forEach(function (rrule) {\n result = result.concat(rrule.toString().split('\\n'));\n });\n this._exrule.forEach(function (exrule) {\n result = result.concat(exrule\n .toString()\n .split('\\n')\n .map(function (line) { return line.replace(/^RRULE:/, 'EXRULE:'); })\n .filter(function (line) { return !/^DTSTART/.test(line); }));\n });\n if (this._rdate.length) {\n result.push(rdatesToString('RDATE', this._rdate, this.tzid()));\n }\n if (this._exdate.length) {\n result.push(rdatesToString('EXDATE', this._exdate, this.tzid()));\n }\n return result;\n };\n /**\n * to generate recurrence field such as:\n * DTSTART:19970902T010000Z\n * RRULE:FREQ=YEARLY;COUNT=2;BYDAY=TU\n * RRULE:FREQ=YEARLY;COUNT=1;BYDAY=TH\n */\n RRuleSet.prototype.toString = function () {\n return this.valueOf().join('\\n');\n };\n /**\n * Create a new RRuleSet Object completely base on current instance\n */\n RRuleSet.prototype.clone = function () {\n var rrs = new RRuleSet(!!this._cache);\n this._rrule.forEach(function (rule) { return rrs.rrule(rule.clone()); });\n this._exrule.forEach(function (rule) { return rrs.exrule(rule.clone()); });\n this._rdate.forEach(function (date) { return rrs.rdate(new Date(date.getTime())); });\n this._exdate.forEach(function (date) { return rrs.exdate(new Date(date.getTime())); });\n return rrs;\n };\n return RRuleSet;\n}(RRule));\nexport { RRuleSet };\nfunction _addRule(rrule, collection) {\n if (!(rrule instanceof RRule)) {\n throw new TypeError(String(rrule) + ' is not RRule instance');\n }\n if (!includes(collection.map(String), String(rrule))) {\n collection.push(rrule);\n }\n}\nfunction _addDate(date, collection) {\n if (!(date instanceof Date)) {\n throw new TypeError(String(date) + ' is not Date instance');\n }\n if (!includes(collection.map(Number), Number(date))) {\n collection.push(date);\n sort(collection);\n }\n}\nfunction rdatesToString(param, rdates, tzid) {\n var isUTC = !tzid || tzid.toUpperCase() === 'UTC';\n var header = isUTC ? \"\".concat(param, \":\") : \"\".concat(param, \";TZID=\").concat(tzid, \":\");\n var dateString = rdates\n .map(function (rdate) { return timeToUntilString(rdate.valueOf(), isUTC); })\n .join(',');\n return \"\".concat(header).concat(dateString);\n}\n//# sourceMappingURL=rruleset.js.map","import { RRule, rrulestr } from 'rrule';\r\n\r\nexport default function (scheduler) {\r\n\r\n\tfunction clearMilliseconds(date) {\r\n\t\treturn new Date(\r\n\t\t\tdate.getFullYear(),\r\n\t\t\tdate.getMonth(),\r\n\t\t\tdate.getDate(),\r\n\t\t\tdate.getHours(),\r\n\t\t\tdate.getMinutes(),\r\n\t\t\tdate.getSeconds(),\r\n\t\t\t0\r\n\t\t);\r\n\t}\r\n\r\n\tfunction isDeletedOccurrence(event) {\r\n\t\treturn !!event.deleted;\r\n\t}\r\n\r\n\tfunction isSeries(event) {\r\n\t\treturn !!event.rrule && !event.recurring_event_id;\r\n\t}\r\n\r\n\tfunction clearRecurringProperties(event) {\r\n\t\tevent.rrule = \"\";\r\n\t\tevent.original_start = null;\r\n\t\tevent.recurring_event_id = null;\r\n\t\tevent.duration = null;\r\n\t\tevent.deleted = null;\r\n\t}\r\n\r\n\tfunction createException(ev) {\r\n\t\tlet id = ev.id.split(\"#\");\r\n\r\n\t\tlet nid = scheduler.uid();\r\n\t\tscheduler._not_render = true;\r\n\t\tlet nev = scheduler._copy_event(ev);\r\n\t\tnev.id = nid;\r\n\t\tnev.recurring_event_id = id[0];\r\n\r\n\t\tlet timestamp = id[1];\r\n\r\n\t\tnev.original_start = new Date(Number(timestamp));\r\n\r\n\t\tscheduler._add_rec_marker(nev, timestamp);\r\n\t\tscheduler.addEvent(nev);\r\n\t\tscheduler._not_render = false;\r\n\t}\r\n\r\n\tscheduler._rec_temp = [];\r\n\tscheduler._rec_markers_pull = {};\r\n\tscheduler._rec_markers = {};\r\n\tscheduler._add_rec_marker = function (ev, time) {\r\n\t\tev._pid_time = time;\r\n\t\tthis._rec_markers[ev.id] = ev;\r\n\t\tif (!this._rec_markers_pull[ev.event_pid]) this._rec_markers_pull[ev.event_pid] = {};\r\n\t\tthis._rec_markers_pull[ev.event_pid][time] = ev;\r\n\t};\r\n\tscheduler._get_rec_marker = function (time, id) {\r\n\t\tlet ch = this._rec_markers_pull[id];\r\n\t\tif (ch) return ch[time];\r\n\t\treturn null;\r\n\t};\r\n\tscheduler._get_rec_markers = function (id) {\r\n\t\treturn (this._rec_markers_pull[id] || []);\r\n\t};\r\n\r\n\t(function () {\r\n\t\tvar old_add_event = scheduler.addEvent;\r\n\t\tscheduler.addEvent = function (start_date, end_date, text, id, extra_data) {\r\n\t\t\tvar ev_id = old_add_event.apply(this, arguments);\r\n\r\n\t\t\tif (ev_id && scheduler.getEvent(ev_id)) {\r\n\t\t\t\tvar ev = scheduler.getEvent(ev_id);\r\n\r\n\t\t\t\tif (ev.start_date) {\r\n\t\t\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t\t\t}\r\n\t\t\t\tif (ev.end_date) {\r\n\t\t\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn ev_id;\r\n\t\t};\r\n\t})();\r\n\r\n\tscheduler.attachEvent(\"onEventLoading\", function (event) {\r\n\r\n\t\tif (event.original_start) {\r\n\t\t\tevent.original_start = scheduler.templates.parse_date(event.original_start);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventIdChange\", function (id, new_id) {\r\n\t\tif (this._ignore_call) return;\r\n\t\tthis._ignore_call = true;\r\n\r\n\t\tif (scheduler._rec_markers[id]) {\r\n\t\t\t//important for for correct work of scheduler.getEvents(from, to) and collision detection\r\n\t\t\tscheduler._rec_markers[new_id] = scheduler._rec_markers[id];\r\n\t\t\tdelete scheduler._rec_markers[id];\r\n\t\t}\r\n\r\n\t\tif (scheduler._rec_markers_pull[id]) {\r\n\t\t\tscheduler._rec_markers_pull[new_id] = scheduler._rec_markers_pull[id];\r\n\t\t\tdelete scheduler._rec_markers_pull[id];\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < this._rec_temp.length; i++) {\r\n\t\t\tvar tev = this._rec_temp[i];\r\n\t\t\tif (tev.recurring_event_id == id) {\r\n\t\t\t\ttev.recurring_event_id = new_id;\r\n\t\t\t\tthis.changeEventId(tev.id, new_id + \"#\" + tev.id.split(\"#\")[1]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (var i in this._rec_markers) {\r\n\t\t\tvar tev = this._rec_markers[i];\r\n\t\t\tif (tev.recurring_event_id == id) {\r\n\t\t\t\ttev.recurring_event_id = new_id;\r\n\t\t\t\ttev._pid_changed = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar el = scheduler._rec_markers[new_id];\r\n\t\tif (el && el._pid_changed) {\r\n\t\t\tdelete el._pid_changed;\r\n\t\t\tsetTimeout(function () {\r\n\t\t\t\tif (scheduler.$destroyed) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tscheduler.callEvent(\"onEventChanged\", [new_id, scheduler.getEvent(new_id)]);\r\n\t\t\t}, 1);\r\n\t\t}\r\n\r\n\t\tdelete this._ignore_call;\r\n\t});\r\n\r\n\tfunction deleteEventFromSeries(idTimestamp, ev) {\r\n\t\tlet id = idTimestamp;\r\n\t\tidTimestamp = id.split(\"#\");\r\n\t\tlet nid = scheduler.uid();\r\n\t\tlet tid = (idTimestamp[1]) ? idTimestamp[1] : (ev._pid_time);\r\n\t\tlet nev = scheduler._copy_event(ev);\r\n\t\tnev.id = nid;\r\n\t\tnev.recurring_event_id = ev.recurring_event_id || idTimestamp[0];\r\n\t\tnev.original_start = new Date(Number(tid));\r\n\t\tnev.deleted = true;\r\n\t\tscheduler.addEvent(nev);\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function (id) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (this._is_virtual_event(id) || (this._is_modified_occurence(ev) && !isDeletedOccurrence(ev))) {\r\n\t\t\tdeleteEventFromSeries(id, ev);\r\n\t\t} else {\r\n\t\t\tif (isSeries(ev) && this._lightbox_id)\r\n\t\t\t\tthis._roll_back_dates(ev);\r\n\r\n\r\n\t\t\tvar sub = this._get_rec_markers(id);\r\n\t\t\tfor (var i in sub) {\r\n\t\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\t\tid = sub[i].id;\r\n\t\t\t\t\tif (this.getEvent(id))\r\n\t\t\t\t\t\tthis.deleteEvent(id, true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function (id, ev) {\r\n\t\tif (!this._is_virtual_event(id) && this._is_modified_occurence(ev)) {\r\n\t\t\tif (!scheduler._events[id]) {\r\n\t\t\t\tev.deleted = true;\r\n\t\t\t\tthis.setEvent(id, ev);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\", function (id, event) {\r\n\t\tif (this._loading) return true;\r\n\r\n\t\tvar ev = this.getEvent(id);\r\n\r\n\t\tif (this._is_virtual_event(id)) {\r\n\t\t\tcreateException(ev);\r\n\r\n\t\t} else {\r\n\t\t\tif (ev.start_date) {\r\n\t\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t\t}\r\n\t\t\tif (ev.end_date) {\r\n\t\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t\t}\r\n\r\n\t\t\tif (isSeries(ev) && this._lightbox_id) {\r\n\t\t\t\tthis._roll_back_dates(ev);\r\n\t\t\t\t//scheduler.recurrings.rollbackDates(ev);\r\n\t\t\t}\r\n\r\n\t\t\tvar sub = this._get_rec_markers(id);\r\n\t\t\tfor (var i in sub) {\r\n\t\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\t\tdelete this._rec_markers[sub[i].id];\r\n\t\t\t\t\tthis.deleteEvent(sub[i].id, true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tdelete this._rec_markers_pull[id];\r\n\r\n\t\t\t// it's possible that after editing event is no longer exists, in such case we need to remove _select_id flag\r\n\t\t\tvar isEventFound = false;\r\n\t\t\tfor (var k = 0; k < this._rendered.length; k++) {\r\n\t\t\t\tif (this._rendered[k].getAttribute(this.config.event_attribute) == id)\r\n\t\t\t\t\tisEventFound = true;\r\n\t\t\t}\r\n\t\t\tif (!isEventFound)\r\n\t\t\t\tthis._select_id = null;\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventAdded\", function (id) {\r\n\t\tif (!this._loading) {\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif (isSeries(ev)) {\r\n\t\t\t\tthis._roll_back_dates(ev);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventSave\", function (id, data, is_new_event) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (isSeries(ev))\r\n\t\t\tthis._select_id = null;\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventCreated\", function (id) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (!isSeries(ev)) {\r\n\t\t\tclearRecurringProperties(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventCancel\", function (id) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (isSeries(ev)) {\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t\t// a bit expensive, but we need to be sure that event re-rendered, because view can be corrupted by resize , during edit process\r\n\t\t\tthis.render_view_data();\r\n\t\t}\r\n\t});\r\n\tscheduler._roll_back_dates = function (ev) {\r\n\t\t//// !!!!! calc temp properties\r\n\t\tif (ev.start_date) {\r\n\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t}\r\n\t\tif (ev.end_date) {\r\n\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t}\r\n\r\n\t\tev.duration = Math.round((ev.end_date.valueOf() - ev.start_date.valueOf()) / 1000);\r\n\t\tev.end_date = ev._end_date;\r\n\t\tif (ev._start_date) {\r\n\t\t\tev.start_date.setMonth(0);\r\n\t\t\tev.start_date.setDate(ev._start_date.getDate());\r\n\t\t\tev.start_date.setMonth(ev._start_date.getMonth());\r\n\t\t\tev.start_date.setFullYear(ev._start_date.getFullYear());\r\n\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._is_virtual_event = function (id) {\r\n\t\treturn id.toString().indexOf(\"#\") != -1;\r\n\t};\r\n\tscheduler._is_modified_occurence = function (ev) {\r\n\t\treturn (ev.recurring_event_id && ev.recurring_event_id != \"0\");\r\n\t};\r\n\r\n\tscheduler.showLightbox_rec = scheduler.showLightbox;\r\n\tscheduler.showLightbox = function (id) {\r\n\t\tvar locale = this.locale;\r\n\t\tvar c = scheduler.config.lightbox_recurring;\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tvar pid = ev.recurring_event_id;\r\n\t\tvar isVirtual = this._is_virtual_event(id);\r\n\t\tif (isVirtual)\r\n\t\t\tpid = id.split(\"#\")[0];\r\n\r\n\t\t// show series\r\n\t\tvar showSeries = function (id) {\r\n\t\t\tvar event = scheduler.getEvent(id);\r\n\t\t\tevent._end_date = event.end_date;\r\n\t\t\tevent.end_date = new Date(event.start_date.valueOf() + event.duration * 1000);\r\n\t\t\treturn scheduler.showLightbox_rec(id); // editing series\r\n\t\t};\r\n\r\n\t\tif ((pid || pid * 1 === 0) && isSeries(ev)) {\r\n\t\t\t// direct API call on series id\r\n\t\t\treturn showSeries(id);\r\n\t\t}\r\n\t\tif (!pid || pid === '0' || ((!locale.labels.confirm_recurring || c == 'instance') || (c == 'series' && !isVirtual))) {\r\n\t\t\t// editing instance or non recurring event\r\n\t\t\treturn this.showLightbox_rec(id);\r\n\t\t}\r\n\t\tif (c == 'ask') {\r\n\t\t\tvar that = this;\r\n\t\t\tscheduler.modalbox({\r\n\t\t\t\ttext: locale.labels.confirm_recurring,\r\n\t\t\t\ttitle: locale.labels.title_confirm_recurring,\r\n\t\t\t\twidth: \"500px\",\r\n\t\t\t\tposition: \"middle\",\r\n\t\t\t\tbuttons: [locale.labels.button_edit_series, locale.labels.button_edit_occurrence, locale.labels.icon_cancel],\r\n\t\t\t\tcallback: function (index) {\r\n\t\t\t\t\tswitch (+index) {\r\n\t\t\t\t\t\tcase 0:\r\n\t\t\t\t\t\t\treturn showSeries(pid);\r\n\t\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\t\treturn that.showLightbox_rec(id);\r\n\t\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tshowSeries(pid);\r\n\t\t}\r\n\t};\r\n\r\n\tfunction groupExceptions() {\r\n\t\tconst exceptions = {};\r\n\t\tfor (const i in scheduler._events) {\r\n\t\t\tconst ev = scheduler._events[i];\r\n\t\t\tif (ev.recurring_event_id) {\r\n\t\t\t\tif (!exceptions[ev.recurring_event_id]) {\r\n\t\t\t\t\texceptions[ev.recurring_event_id] = {};\r\n\t\t\t\t}\r\n\t\t\t\texceptions[ev.recurring_event_id][ev.original_start.valueOf()] = ev;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn exceptions;\r\n\t}\r\n\r\n\tscheduler.get_visible_events_rec = scheduler.get_visible_events;\r\n\tscheduler.get_visible_events = function (only_timed) {\r\n\t\tfor (var i = 0; i < this._rec_temp.length; i++)\r\n\t\t\tdelete this._events[this._rec_temp[i].id];\r\n\t\tthis._rec_temp = [];\r\n\r\n\t\tconst exceptions = groupExceptions();\r\n\t\tvar stack = this.get_visible_events_rec(only_timed);\r\n\t\tvar out = [];\r\n\t\tfor (var i = 0; i < stack.length; i++) {\r\n\t\t\tif (stack[i].deleted || stack[i].recurring_event_id) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif (isSeries(stack[i])) {\r\n\t\t\t\tthis.repeat_date(stack[i], out, undefined, undefined, undefined, undefined, exceptions);\r\n\t\t\t} else {\r\n\t\t\t\tout.push(stack[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn out;\r\n\t};\r\n\r\n\t(function () {\r\n\t\tvar old = scheduler.isOneDayEvent;\r\n\t\tscheduler.isOneDayEvent = function (ev) {\r\n\t\t\tif (isSeries(ev)) return true;\r\n\t\t\treturn old.call(this, ev);\r\n\t\t};\r\n\t\tvar old_update_event = scheduler.updateEvent;\r\n\t\tscheduler.updateEvent = function (id) {\r\n\t\t\tvar ev = scheduler.getEvent(id);\r\n\r\n\t\t\tif (ev && isSeries(ev) && !this._is_virtual_event(id)) {\r\n\t\t\t\tscheduler.update_view();\r\n\t\t\t} else {\r\n\t\t\t\told_update_event.call(this, id);\r\n\t\t\t}\r\n\t\t};\r\n\t})();\r\n\r\n\tconst toIcalString = scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\");\r\n\r\n\tscheduler.repeat_date = function (ev, stack, non_render, from, to, maxCount, exceptions) {\r\n\t\tif (!ev.rrule) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tlet seriesExceptions = exceptions ? exceptions[ev.id] : groupExceptions()[ev.id];\r\n\t\tif (!seriesExceptions) {\r\n\t\t\tseriesExceptions = {};\r\n\t\t}\r\n\r\n\t\tif (!from) {\r\n\t\t\tfrom = scheduler._min_date;\r\n\t\t}\r\n\t\tif (!to) {\r\n\t\t\tto = scheduler._max_date;\r\n\t\t}\r\n\r\n\t\tconst utcStart = new Date(Date.UTC(ev.start_date.getFullYear(), ev.start_date.getMonth(), ev.start_date.getDate(), ev.start_date.getHours(), ev.start_date.getMinutes(), ev.start_date.getSeconds()));\r\n\t\tlet parsedRRule;\r\n\t\tif (maxCount){\r\n\t\t\t// for getRecDates() method\r\n\t\t\tparsedRRule = rrulestr(`RRULE:${ev.rrule};UNTIL=${toIcalString(ev.end_date)};COUNT=${maxCount}`, { dtstart: utcStart });\r\n\t\t} else {\r\n\t\t\tparsedRRule = rrulestr(`RRULE:${ev.rrule};UNTIL=${toIcalString(ev.end_date)}`, { dtstart: utcStart/*ev.start_date*/ });\r\n\t\t}\r\n\t\t// `from` is already in UTC from `dtstart: utcStart`\r\n\t\tconst utcTo = new Date(Date.UTC(to.getFullYear(), to.getMonth(), to.getDate(), to.getHours(), to.getMinutes(), to.getSeconds())); \r\n\t\tconst repeatedDates = parsedRRule.between(from, utcTo).map(date => {\r\n\t\t\tconst adjustedDate = new Date(date);\r\n\t\t\tadjustedDate.setHours(ev.start_date.getHours());\r\n\t\t\tadjustedDate.setMinutes(ev.start_date.getMinutes());\r\n\t\t\tadjustedDate.setSeconds(ev.start_date.getSeconds());\r\n\t\t\treturn adjustedDate;\r\n\t\t});\r\n\t\tlet visibleCount = 0;\r\n\r\n\t\tconst eventDuration = ev.duration;\r\n\r\n\t\tfor (let i = 0; i < repeatedDates.length; i++) {\r\n\t\t\tif (maxCount && visibleCount >= maxCount) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tconst date = repeatedDates[i];\r\n\r\n\t\t\tlet exception = seriesExceptions[date.valueOf()];\r\n\t\t\tif (exception) {\r\n\t\t\t\tif (exception.deleted) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvisibleCount++;\r\n\t\t\t\t\tstack.push(exception);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tconst copy = scheduler._copy_event(ev);\r\n\t\t\t\t//copy._timed = ev._timed;\r\n\t\t\t\tcopy.text = ev.text;\r\n\t\t\t\tcopy.start_date = date;\r\n\t\t\t\tcopy.id = ev.id + \"#\" + Math.ceil(date.valueOf());\r\n\t\t\t\tcopy.end_date = new Date(date.valueOf() + eventDuration * 1000);\r\n\t\t\t\tcopy.end_date = scheduler._fix_daylight_saving_date(copy.start_date, copy.end_date, ev, date, copy.end_date);\r\n\t\t\t\tcopy._timed = scheduler.isOneDayEvent(copy);\r\n\r\n\r\n\r\n\t\t\t\tif (!copy._timed && !scheduler._table_view && !scheduler.config.multi_day) continue;\r\n\t\t\t\tstack.push(copy);\r\n\r\n\t\t\t\tif (!non_render) {\r\n\t\t\t\t\tscheduler._events[copy.id] = copy;\r\n\t\t\t\t\tscheduler._rec_temp.push(copy);\r\n\t\t\t\t}\r\n\t\t\t\tvisibleCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//GS-2534: case when exceptions have different dates\r\n\t\tif (seriesExceptions && repeatedDates.length == 0 ){\r\n\t\t\tfor (let a in seriesExceptions){\r\n\t\t\t\tlet exception = seriesExceptions[a];\r\n\t\t\t\tif (exception) {\r\n\t\t\t\t\tif(exception.deleted){\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\telse if (from && to && exception.start_date < to && exception.end_date > from) {\r\n\t\t\t\t\t\tstack.push(exception);\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t} \r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._fix_daylight_saving_date = function (start_date, end_date, ev, counter, default_date) {\r\n\t\tvar shift = start_date.getTimezoneOffset() - end_date.getTimezoneOffset();\r\n\t\tif (shift) {\r\n\t\t\tif (shift > 0) {\r\n\t\t\t\t// e.g. 24h -> 23h\r\n\t\t\t\treturn new Date(counter.valueOf() + ev.duration * 1000 - shift * 60 * 1000);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t// e.g. 24h -> 25h\r\n\t\t\t\treturn new Date(end_date.valueOf() - shift * 60 * 1000);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new Date(default_date.valueOf());\r\n\t};\r\n\tscheduler.getRecDates = function (id, max) {\r\n\t\tvar ev = typeof id == \"object\" ? id : scheduler.getEvent(id);\r\n\t\tvar recurrings = [];\r\n\t\tmax = max || 100;\r\n\r\n\t\tif (!isSeries(ev)) {\r\n\t\t\treturn [\r\n\t\t\t\t{ start_date: ev.start_date, end_date: ev.end_date }\r\n\t\t\t];\r\n\t\t}\r\n\t\tif (ev.deleted) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tscheduler.repeat_date(ev, recurrings, true, ev.start_date, ev.end_date, max);\r\n\r\n\t\tvar result = [];\r\n\t\tfor (var i = 0; i < recurrings.length; i++) {\r\n\t\t\tif (!recurrings[i].deleted) {\r\n\t\t\t\tresult.push({ start_date: recurrings[i].start_date, end_date: recurrings[i].end_date });\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t};\r\n\tscheduler.getEvents = function (from, to) {\r\n\t\tvar result = [];\r\n\t\tconst exceptions = groupExceptions();\r\n\t\tfor (var a in this._events) {\r\n\t\t\tvar ev = this._events[a];\r\n\t\t\tif (ev.recurring_event_id) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif (from && to && ev.start_date < to && ev.end_date > from) {\r\n\t\t\t\tif (isSeries(ev)) {\r\n\t\t\t\t\tvar sev = [];\r\n\t\t\t\t\tthis.repeat_date(ev, sev, true, from, to, undefined, exceptions);\r\n\t\t\t\t\tsev.forEach(function(occurence){\r\n\t\t\t\t\t\tif (occurence.start_date < to && occurence.end_date > from) {\r\n\t\t\t\t\t\t\tresult.push(occurence);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t// if it's virtual event we can skip it\r\n\t\t\t\t} else if (!this._is_virtual_event(ev.id)) {\r\n\t\t\t\t\tresult.push(ev);\r\n\t\t\t\t}\r\n\t\t\t} else if (!from && !to && !this._is_virtual_event(ev.id)) {\r\n\t\t\t\tresult.push(ev);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t};\r\n\r\n\t//drop secondary attributes\r\n\tscheduler._copy_dummy = function (ev) {\r\n\t\tvar start_date = new Date(this.start_date);\r\n\t\tvar end_date = new Date(this.end_date);\r\n\t\tthis.start_date = start_date;\r\n\t\tthis.end_date = end_date;\r\n\t\tthis.duration = this.rrule = null;\r\n\t};\r\n\r\n\tscheduler.config.include_end_by = false;\r\n\tscheduler.config.lightbox_recurring = 'ask'; // series, instance\r\n\tscheduler.config.recurring_workdays = [RRule.MO.weekday,RRule.TU.weekday,RRule.WE.weekday,RRule.TH.weekday,RRule.FR.weekday];\r\n\tscheduler.config.repeat_date = \"%m.%d.%Y\";\r\n\tscheduler.config.lightbox.sections = [\r\n\t\t{ name: \"description\", map_to: \"text\", type: \"textarea\", focus: true },\r\n\t\t{ name: \"recurring\", type: \"recurring\", map_to: \"rec_type\" },\r\n\t\t{ name: \"time\", height: 72, type: \"time\", map_to: \"auto\" }\r\n\t];\r\n\r\n\tscheduler.attachEvent(\"onClearAll\", function () {\r\n\t\tscheduler._rec_markers = {}; //clear recurring events data\r\n\t\tscheduler._rec_markers_pull = {};\r\n\t\tscheduler._rec_temp = [];\r\n\t});\r\n\r\n\r\n\tfunction getTopLevelOption(rruleObj, untilDate) {\r\n\t\tconst options = rruleObj.options;\r\n\t\tconst until = options.until || untilDate;\r\n\r\n\t\tconst hasEndCondition = options.count || (until && until.getFullYear() !== 9999);\r\n\r\n\t\tif (hasEndCondition) {\r\n\t\t\treturn 'CUSTOM';\r\n\t\t}\r\n\r\n\t\tif (options.freq === RRule.DAILY && options.interval === 1 && !options.byweekday) {\r\n\t\t\treturn 'DAILY';\r\n\t\t} else if (options.freq === RRule.WEEKLY && options.interval === 1 && !options.byweekday) {\r\n\t\t\treturn 'WEEKLY';\r\n\t\t} else if (options.freq === RRule.MONTHLY && options.interval === 1 && !options.bysetpos) {\r\n\t\t\treturn 'MONTHLY';\r\n\t\t} else if (options.freq === RRule.YEARLY && options.interval === 1 && !options.bysetpos) {\r\n\t\t\treturn 'YEARLY';\r\n\t\t} else if (options.freq === RRule.DAILY && options.byweekday && options.byweekday.length === scheduler.config.recurring_workdays.length &&\r\n\t\t\toptions.byweekday.includes(RRule.MO) &&\r\n\t\t\toptions.byweekday.includes(RRule.TU) &&\r\n\t\t\toptions.byweekday.includes(RRule.WE) &&\r\n\t\t\toptions.byweekday.includes(RRule.TH) &&\r\n\t\t\toptions.byweekday.includes(RRule.FR)) {\r\n\t\t\treturn 'WORKDAYS';\r\n\t\t} else {\r\n\t\t\treturn 'CUSTOM';\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction getWeekdayOfMonth(date) {\r\n\t\tconst dayOfWeek = date.getDay();\r\n\t\tconst dayOfMonth = date.getDate();\r\n\t\tconst dayNumber = Math.ceil(dayOfMonth / 7);\r\n\t\treturn { dayOfWeek, dayNumber };\r\n\t}\r\n\r\n\r\n\tconst jsDaysToRRULEDays = {\r\n\t\t0: \"SU\",\r\n\t\t1: \"MO\",\r\n\t\t2: \"TU\",\r\n\t\t3: \"WE\",\r\n\t\t4: \"TH\",\r\n\t\t5: \"FR\",\r\n\t\t6: \"SA\"\r\n\t};\r\n\tconst RruleDayNumsToJs = {\r\n\t\t0: 1,\r\n\t\t1: 2,\r\n\t\t2: 3,\r\n\t\t3: 4,\r\n\t\t4: 5,\r\n\t\t5: 6,\r\n\t\t6: 0\r\n\t};\r\n\r\n\tfunction fillCustomDaily(node, rule) {\r\n\t\tnode.querySelector(\"[name='repeat_interval_value']\").value = (rule ? rule.interval : 1) || 1;\r\n\t}\r\n\r\n\tfunction fillCustomWeekly(node, rule, event) {\r\n\t\tnode.querySelector(\"[name='repeat_interval_value']\").value = (rule ? rule.interval : 1) || 1;\r\n\r\n\t\tconst dayCheckboxes = node.querySelectorAll(`.dhx_form_repeat_custom_week input`);\r\n\t\tdayCheckboxes.forEach((ch) => ch.checked = false);\r\n\t\tif (rule && rule.byweekday) {\r\n\t\t\trule.byweekday.forEach((day) => {\r\n\t\t\t\tconst dayNum = RruleDayNumsToJs[day.weekday];\r\n\t\t\t\tconst dayLabel = jsDaysToRRULEDays[dayNum];\r\n\t\t\t\tnode.querySelector(`.dhx_form_repeat_custom_week input[value=\"${dayLabel}\"]`).checked = true;\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tconst dayLabel = jsDaysToRRULEDays[event.start_date.getDay()];\r\n\t\t\tnode.querySelector(`.dhx_form_repeat_custom_week input[value=\"${dayLabel}\"]`).checked = true;\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tfunction fillCustomMonthly(node, rule, event) {\r\n\t\tnode.querySelector(\"[name='repeat_interval_value']\").value = (rule ? rule.interval : 1) || 1;\r\n\r\n\t\tconst dateOfMonth = node.querySelector(`.dhx_form_repeat_custom_month [value=\"month_date\"]`);\r\n\t\tconst nthWeekDayOfMonth = node.querySelector(`.dhx_form_repeat_custom_month [value=\"month_nth_weekday\"]`);\r\n\t\tdateOfMonth.innerText = scheduler.templates.repeat_monthly_date(event.start_date, event);\r\n\t\tnthWeekDayOfMonth.innerText = scheduler.templates.repeat_monthly_weekday(event.start_date, event);\r\n\r\n\t\tif (!rule || (rule.bysetpos && !(rule.byweekday && rule.byweekday.length))) {\r\n\t\t\tnode.querySelector(`[name=\"dhx_custom_month_option\"]`).value = \"month_date\";\r\n\t\t} else {\r\n\t\t\tnode.querySelector(`[name=\"dhx_custom_month_option\"]`).value = \"month_nth_weekday\";\r\n\t\t}\r\n\t}\r\n\r\n\tfunction formatDayNumber(date){\r\n\t\tswitch (date) {\r\n\t\t\tcase 1:\r\n\t\t\tcase 31:\r\n\t\t\t\treturn `${date}st`;\r\n\t\t\tcase 2:\r\n\t\t\t\treturn `${date}nd`;\r\n\t\t\tcase 3:\r\n\t\t\t\treturn `${date}rd`;\r\n\t\t\tdefault:\r\n\t\t\t\treturn `${date}th`;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.templates.repeat_monthly_date = function(startDate, event) {\r\n\t\tconst date = startDate.getDate();\r\n\t\treturn `Every ${formatDayNumber(date)}`;\r\n\t};\r\n\tscheduler.templates.repeat_monthly_weekday = function(startDate, event) {\r\n\t\tconst nthDayOfMonth = getWeekdayOfMonth(startDate);\r\n\t\treturn `Every ${formatDayNumber(nthDayOfMonth.dayNumber)} ${scheduler.locale.date.day_full[nthDayOfMonth.dayOfWeek]}`;\r\n\t};\r\n\t\r\n\tscheduler.templates.repeat_yearly_month_date = function(startDate, event) {\r\n\t\tconst date = startDate.getDate();\r\n\t\tconst monthLabel = scheduler.locale.date.month_full[startDate.getMonth()];\r\n\t\treturn `Every ${formatDayNumber(date)} day of ${monthLabel}`;\r\n\t};\r\n\tscheduler.templates.repeat_yearly_month_weekday = function(startDate, event) {\r\n\t\tconst nthDayOfMonth = getWeekdayOfMonth(startDate);\r\n\t\tconst monthLabel = scheduler.locale.date.month_full[startDate.getMonth()];\r\n\t\treturn `Every ${formatDayNumber(nthDayOfMonth.dayNumber)} ${scheduler.locale.date.day_full[nthDayOfMonth.dayOfWeek]} of ${monthLabel}`;\r\n\t};\r\n\r\n\tfunction fillCustomYearly(node, rule, event) {\r\n\t\tconst dateOfYear = node.querySelector(`.dhx_form_repeat_custom_year [value=\"month_date\"]`);\r\n\t\tconst nthWeekDayOfYear = node.querySelector(`.dhx_form_repeat_custom_year [value=\"month_nth_weekday\"]`);\r\n\t\tdateOfYear.innerText = scheduler.templates.repeat_yearly_month_date(event.start_date, event);\r\n\t\tnthWeekDayOfYear.innerText = scheduler.templates.repeat_yearly_month_weekday(event.start_date, event);\r\n\r\n\t\tif (!rule || (rule.bysetpos && !(rule.byweekday && rule.byweekday.length))) {\r\n\t\t\tnode.querySelector(`[name=\"dhx_custom_year_option\"]`).value = \"month_date\";\r\n\t\t} else {\r\n\t\t\tnode.querySelector(`[name=\"dhx_custom_year_option\"]`).value = \"month_nth_weekday\";\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fillEndRule(node, rule, event) {\r\n\t\tconst countInput = node.querySelector(`.dhx_form_repeat_ends_extra [name=\"dhx_form_repeat_ends_after\"]`);\r\n\t\tconst ondateInput = node.querySelector(`.dhx_form_repeat_ends_extra [name=\"dhx_form_repeat_ends_ondate\"]`);\r\n\t\tconst endOptionSelect = node.querySelector(`[name='dhx_custom_repeat_ends']`);\r\n\t\tcountInput.value = 1;\r\n\r\n\t\tlet formatter = scheduler.date.date_to_str(\"%Y-%m-%d\");\r\n\t\tif (!scheduler.config.repeat_date_of_end) {\r\n\t\t\tscheduler.config.repeat_date_of_end = formatter(scheduler.date.add(scheduler._currentDate(), 30, \"day\"));\r\n\t\t}\r\n\t\tondateInput.value = scheduler.config.repeat_date_of_end;\r\n\r\n\t\tif (rule && rule.count) {\r\n\t\t\tendOptionSelect.value = \"AFTER\";\r\n\t\t\tcountInput.value = rule.count;\r\n\t\t} else if (event._end_date && event._end_date.getFullYear() !== 9999) {\r\n\t\t\tendOptionSelect.value = \"ON\";\r\n\t\t\tondateInput.value = formatter(event._end_date);\r\n\t\t} else {\r\n\t\t\tendOptionSelect.value = \"NEVER\";\r\n\t\t}\r\n\t\tendOptionSelect.dispatchEvent(new Event(\"change\"));\r\n\t}\r\n\r\n\tconst getRecValue = {\r\n\t\tMONTHLY: function (dates) {\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.MONTHLY,\r\n\t\t\t\tinterval: 1,\r\n\t\t\t\tbymonthday: dates.start.getDate()\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tWEEKLY: function (dates) {\r\n\t\t\tlet day = dates.start.getDay() - 1;\r\n\t\t\tif (day == -1) day = 6;\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.WEEKLY,\r\n\t\t\t\tinterval: 1,\r\n\t\t\t\tbyweekday: [day]\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tDAILY: function (dates) {\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.DAILY,\r\n\t\t\t\tinterval: 1\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tYEARLY: function (dates) {\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.YEARLY,\r\n\t\t\t\tbymonth: dates.start.getMonth() + 1,\r\n\t\t\t\tinterval: 1,\r\n\t\t\t\tbymonthday: dates.start.getDate()\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tWORKDAYS: function (dates) {\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.WEEKLY,\r\n\t\t\t\tinterval: 1,\r\n\t\t\t\tbyweekday: scheduler.config.recurring_workdays\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tCUSTOM: function (dates, node) {\r\n\t\t\tconst rrule = {};\r\n\t\t\tconst freq = node.querySelector(`[name=\"repeat_interval_unit\"]`).value;\r\n\t\t\tconst interval = Math.max(1, node.querySelector(`[name=\"repeat_interval_value\"]`).value);\r\n\t\t\tconst monthRepeat = node.querySelector(`[name=\"dhx_custom_month_option\"]`).value;\r\n\t\t\tconst yearRepeat = node.querySelector(`[name=\"dhx_custom_year_option\"]`).value;\r\n\r\n\t\t\trrule.interval = interval;\r\n\t\t\tlet days;\r\n\t\t\tlet day;\r\n\r\n\t\t\tswitch (freq) {\r\n\t\t\t\tcase \"DAILY\":\r\n\t\t\t\t\trrule.freq = RRule.DAILY;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"WEEKLY\": \r\n\t\t\t\t\trrule.freq = RRule.WEEKLY;\r\n\t\t\t\t\tdays = [];\r\n\t\t\t\t\tnode.querySelectorAll(`.dhx_form_repeat_custom_week [name=\"week_day\"]`).forEach((ch) => {\r\n\t\t\t\t\t\tif(ch.checked){\r\n\t\t\t\t\t\t\tdays.push(ch.value);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\trrule.byweekday = days.map((day) => {\r\n\t\t\t\t\t\tswitch (day) {\r\n\t\t\t\t\t\t\tcase \"MO\":\r\n\t\t\t\t\t\t\t\treturn RRule.MO.weekday;\r\n\t\t\t\t\t\t\tcase \"TU\":\r\n\t\t\t\t\t\t\t\treturn RRule.TU.weekday;\r\n\t\t\t\t\t\t\tcase \"WE\":\r\n\t\t\t\t\t\t\t\treturn RRule.WE.weekday;\r\n\t\t\t\t\t\t\tcase \"TH\":\r\n\t\t\t\t\t\t\t\treturn RRule.TH.weekday;\r\n\t\t\t\t\t\t\tcase \"FR\":\r\n\t\t\t\t\t\t\t\treturn RRule.FR.weekday;\r\n\t\t\t\t\t\t\tcase \"SA\":\r\n\t\t\t\t\t\t\t\treturn RRule.SA.weekday;\r\n\t\t\t\t\t\t\tcase \"SU\":\r\n\t\t\t\t\t\t\t\treturn RRule.SU.weekday;\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"MONTHLY\":\r\n\t\t\t\t\trrule.freq = RRule.MONTHLY;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (monthRepeat === \"month_date\") {\r\n\t\t\t\t\t\trrule.bymonthday = dates.start.getDate();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tday = dates.start.getDay() - 1;\r\n\t\t\t\t\t\tif (day == -1) day = 6;\r\n\t\t\t\t\t\trrule.byweekday = [day];\r\n\t\t\t\t\t\trrule.bysetpos = getWeekdayOfMonth(dates.start).dayNumber;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"YEARLY\":\r\n\t\t\t\t\trrule.freq = RRule.YEARLY;\r\n\t\t\t\t\trrule.bymonth = dates.start.getMonth() + 1;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (yearRepeat == \"month_date\") {\r\n\t\t\t\t\t\trrule.bymonthday = dates.start.getDate();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tday = dates.start.getDay() - 1;\r\n\t\t\t\t\t\tif (day == -1) day = 6;\r\n\t\t\t\t\t\trrule.byweekday = [day];\r\n\t\t\t\t\t\trrule.bysetpos = getWeekdayOfMonth(dates.start).dayNumber;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tconst formatFunc = scheduler.date.str_to_date(\"%Y-%m-%d\");\r\n\t\t\tlet until = new Date(9999, 1, 1);\r\n\t\t\tconst endRule = node.querySelector(`[name=\"dhx_custom_repeat_ends\"]`);\r\n\t\t\tif(endRule.value === \"ON\"){\r\n\t\t\t\tuntil = formatFunc(node.querySelector(`[name=\"dhx_form_repeat_ends_ondate\"]`).value);\r\n\t\t\t} else if(endRule.value === \"AFTER\") {\r\n\t\t\t\trrule.count = Math.max(1, node.querySelector(`[name=\"dhx_form_repeat_ends_after\"]`).value);\r\n\t\t\t}\r\n\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tNEVER: function () {\r\n\t\t}\r\n\t};\r\n\r\n\tfunction fillInDefaults(node, rule, event) {\r\n\t\tfillCustomDaily(node, rule, event);\r\n\t\tfillCustomWeekly(node, rule, event);\r\n\t\tfillCustomMonthly(node, rule, event);\r\n\t\tfillCustomYearly(node, rule, event);\r\n\t\tfillEndRule(node, rule, event);\r\n\t}\r\n\tscheduler.form_blocks[\"recurring\"] = {\r\n\t\trender: function (sns) {\r\n\t\t\tif (sns.form) {\r\n\t\t\t\tlet rec = scheduler.form_blocks[\"recurring\"];\r\n\t\t\t\tlet form = rec._get_node(sns.form);\r\n\t\t\t\tlet html = rec._outer_html(form);\r\n\t\t\t\tform.style.display = 'none';\r\n\t\t\t\treturn html;\r\n\t\t\t}\r\n\t\t\tlet loc = scheduler.locale.labels;\r\n\r\n\t\t\treturn `
\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t
\r\n\r\n\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t
\r\n\r\n\t\t\t
\r\n\t\t\t\t
${loc.repeat_ends}
\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\r\n\t\t
\r\n\t
`;\r\n\t\t},\r\n\r\n\t\r\n\t\t_init_set_value: function (node, value, event) {\r\n\t\t\tscheduler.form_blocks[\"recurring\"]._ds = { start: event.start_date, end: event.end_date };\r\n\t\t\tfunction hide(node) {\r\n\t\t\t\tnode.classList.add(\"dhx_hidden\");\r\n\t\t\t}\r\n\t\t\tfunction show(node) {\r\n\t\t\t\tnode.classList.remove(\"dhx_hidden\");\r\n\t\t\t}\r\n\t\t\tfunction onRepeatOptionChange(value) {\r\n\t\t\t\tconst repeat = node.querySelector(\".dhx_form_repeat_custom\");\r\n\t\t\t\tif (value === \"CUSTOM\") {\r\n\t\t\t\t\tshow(repeat);\r\n\t\t\t\t} else {\r\n\t\t\t\t\thide(repeat);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction onCustomRepeatIntervalChange(value) {\r\n\t\t\t\tconst nodes = {\r\n\t\t\t\t\tweekly: node.querySelector(\".dhx_form_repeat_custom_week\"),\r\n\t\t\t\t\tmonthly: node.querySelector(\".dhx_form_repeat_custom_month\"),\r\n\t\t\t\t\tyearly: node.querySelector(\".dhx_form_repeat_custom_year\")\r\n\t\t\t\t};\r\n\t\t\t\tswitch (value) {\r\n\t\t\t\t\tcase \"DAILY\":\r\n\t\t\t\t\t\thide(nodes.weekly);\r\n\t\t\t\t\t\thide(nodes.monthly);\r\n\t\t\t\t\t\thide(nodes.yearly);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"WEEKLY\":\r\n\t\t\t\t\t\tshow(nodes.weekly);\r\n\t\t\t\t\t\thide(nodes.monthly);\r\n\t\t\t\t\t\thide(nodes.yearly);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"MONTHLY\":\r\n\t\t\t\t\t\thide(nodes.weekly);\r\n\t\t\t\t\t\tshow(nodes.monthly);\r\n\t\t\t\t\t\thide(nodes.yearly);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"YEARLY\":\r\n\t\t\t\t\t\thide(nodes.weekly);\r\n\t\t\t\t\t\thide(nodes.monthly);\r\n\t\t\t\t\t\tshow(nodes.yearly);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction onCustomRepeatEndRule(value) {\r\n\t\t\t\tconst nodes = {\r\n\t\t\t\t\tafter: node.querySelector(\".dhx_form_repeat_ends_extra .dhx_form_repeat_ends_after\"),\r\n\t\t\t\t\ton: node.querySelector(\".dhx_form_repeat_ends_extra .dhx_form_repeat_ends_on\")\r\n\t\t\t\t};\r\n\t\t\t\tswitch (value) {\r\n\t\t\t\t\tcase \"NEVER\":\r\n\t\t\t\t\t\thide(nodes.after);\r\n\t\t\t\t\t\thide(nodes.on);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"AFTER\":\r\n\t\t\t\t\t\tshow(nodes.after);\r\n\t\t\t\t\t\thide(nodes.on);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"ON\":\r\n\t\t\t\t\t\thide(nodes.after);\r\n\t\t\t\t\t\tshow(nodes.on);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// repeat section change\r\n\t\t\tnode.querySelector(\".dhx_form_repeat_pattern select\").addEventListener(\"change\", function () {\r\n\t\t\t\tonRepeatOptionChange(this.value);\r\n\t\t\t});\r\n\r\n\t\t\t// custom repeat interval change\r\n\t\t\tnode.querySelector(\".dhx_form_repeat_custom_interval [name='repeat_interval_unit']\").addEventListener(\"change\", function () {\r\n\t\t\t\tonCustomRepeatIntervalChange(this.value);\r\n\t\t\t});\r\n\r\n\t\t\t// custom repeat end rule\r\n\t\t\tnode.querySelector(\".dhx_form_repeat_ends [name='dhx_custom_repeat_ends']\").addEventListener(\"change\", function () {\r\n\t\t\t\tonCustomRepeatEndRule(this.value);\r\n\t\t\t});\r\n\r\n\t\t\tscheduler._lightbox._rec_init_done = true;\r\n\t\t},\r\n\t\tbutton_click: function(){},\r\n\t\tset_value: function (node, value, ev) {\r\n\t\t\tlet rf = scheduler.form_blocks[\"recurring\"];\r\n\t\t\tif (!scheduler._lightbox._rec_init_done)\r\n\t\t\t\trf._init_set_value(node, value, ev);\r\n\t\t\tnode.open = !ev.rrule;\r\n\r\n\t\t\tnode.blocked = this._is_modified_occurence(ev);\r\n\r\n\t\t\tlet ds = rf._ds;\r\n\t\t\tds.start = ev.start_date;\r\n\t\t\tds.end = ev._end_date;\r\n\r\n\t\t\tif (ev.rrule) {\r\n\t\t\t\tconst rruleset = rrulestr(ev.rrule);\r\n\t\t\t\tfillInDefaults(node, rruleset.origOptions, ev);\r\n\t\t\t\tconst topOption = getTopLevelOption(rruleset, ev._end_date);\r\n\t\t\t\tnode.querySelector(\".dhx_form_repeat_pattern select\").value = topOption;\r\n\t\t\t\tif(topOption === \"CUSTOM\"){\r\n\t\t\t\t\tlet customFreq;\r\n\t\t\t\t\tswitch (rruleset.origOptions.freq) {\r\n\t\t\t\t\t\tcase RRule.DAILY:\r\n\t\t\t\t\t\t\tcustomFreq = \"DAILY\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase RRule.WEEKLY:\r\n\t\t\t\t\t\t\tcustomFreq = \"WEEKLY\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase RRule.MONTHLY:\r\n\t\t\t\t\t\t\tcustomFreq = \"MONTHLY\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase RRule.YEARLY:\r\n\t\t\t\t\t\t\tcustomFreq = \"YEARLY\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(customFreq){\r\n\t\t\t\t\t\tnode.querySelector(`[name=\"repeat_interval_unit\"]`).value = customFreq;\r\n\t\t\t\t\t\tnode.querySelector(`[name=\"repeat_interval_unit\"]`).dispatchEvent(new Event(\"change\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t//\trepeat_interval_unit\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tfillInDefaults(node, null, ev);\r\n\t\t\t\tnode.querySelector(\".dhx_form_repeat_pattern select\").value = \"NEVER\";\r\n\t\t\t}\r\n\t\t\tnode.querySelector(\".dhx_form_repeat_pattern select\").dispatchEvent(new Event(\"change\"));\r\n\r\n\t\t},\r\n\t\tget_value: function (node, ev) {\r\n\t\t\t\r\n\t\t\tif(!node.blocked && node.querySelector(\".dhx_form_repeat_pattern select\").value !== \"NEVER\") {\r\n\t\t\t\tlet ds = scheduler.form_blocks[\"recurring\"]._ds;\r\n\t\t\t\tlet actual_dates = {};\r\n\r\n\t\t\t\tlet timeControl = getTimeSection();\r\n\r\n\t\t\t\ttimeControl.getValue(actual_dates);\r\n\t\t\t\tds.start = actual_dates.start_date;\r\n\t\t\t\tconst pattern = node.querySelector(\".dhx_form_repeat_pattern select\").value;\r\n\t\t\t\tconst recurrence = getRecValue[pattern](ds, node);\r\n\t\t\t\tev.rrule = new RRule(recurrence.rrule).toString().replace(\"RRULE:\", \"\");\r\n\t\t\t\tds.end = recurrence.until;\r\n\r\n\t\t\t\tev.duration = Math.floor((actual_dates.end_date - actual_dates.start_date) / 1000);\r\n\r\n\t\t\t\tif (ds._start) {\r\n\t\t\t\t\tev.start_date = new Date(ds.start);\r\n\t\t\t\t\tev._start_date = new Date(ds.start);\r\n\t\t\t\t\tds._start = false;\r\n\t\t\t\t} else\r\n\t\t\t\t\tev._start_date = null;\r\n\r\n\t\t\t\tev._end_date = ds.end;\r\n\t\t\t}else{\r\n\t\t\t\tev.rrule = ev.rrule = \"\";\r\n\t\t\t\tev._end_date = ev.end_date;\r\n\t\t\t}\r\n\r\n\t\t\treturn ev.rrule;\r\n\t\t},\r\n\r\n\t\tfocus: function (node) {\r\n\t\t}\r\n\t};\r\n\r\n\tfunction getTimeSection() {\r\n\t\tlet timeControl = scheduler.formSection('time');\r\n\t\tif (!timeControl) {\r\n\t\t\ttimeControl = getFirstSectionOfType('time');\r\n\t\t}\r\n\t\tif (!timeControl) {\r\n\t\t\ttimeControl = getFirstSectionOfType('calendar_time');\r\n\t\t}\r\n\r\n\r\n\t\tif (!timeControl) {\r\n\t\t\tthrow new Error([\"Can't calculate the recurring rule, the Recurring form block can't find the Time control. Make sure you have the time control in 'scheduler.config.lightbox.sections' config.\",\r\n\t\t\t\t\"You can use either the default time control https://docs.dhtmlx.com/scheduler/time.html, or the datepicker https://docs.dhtmlx.com/scheduler/minicalendar.html, or a custom control. \",\r\n\t\t\t\t\"In the latter case, make sure the control is named \\\"time\\\":\",\r\n\t\t\t\t\"\",\r\n\t\t\t\t\"scheduler.config.lightbox.sections = [\",\r\n\t\t\t\t\"{name:\\\"time\\\", height:72, type:\\\"YOU CONTROL\\\", map_to:\\\"auto\\\" }];\"]\r\n\t\t\t\t.join(\"\\n\"));\r\n\t\t}\r\n\r\n\t\treturn timeControl;\r\n\t}\r\n\r\n\tfunction getFirstSectionOfType(type) {\r\n\t\tfor (let i = 0; i < scheduler.config.lightbox.sections.length; i++) {\r\n\t\t\tlet section = scheduler.config.lightbox.sections[i];\r\n\t\t\tif (section.type === type) {\r\n\t\t\t\treturn scheduler.formSection(section.name);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.occurrence_timestamp_in_utc = false;\r\nscheduler.config.recurring_workdays = [1,2,3,4,5];\r\nscheduler.form_blocks[\"recurring\"] = {\r\n\t_get_node : function(node){\r\n\t\tif (typeof node == \"string\"){\r\n\t\t\tlet element = scheduler._lightbox.querySelector(`#${node}`);\r\n\t\t\tif(!element){\r\n\t\t\t\t// form is detached from lightbox \r\n\t\t\t\t// search globally, won't work in LWC\r\n\t\t\t\telement = document.getElementById(node);\r\n\t\t\t}\r\n\t\t\tnode = element;\r\n\t\t}\r\n\t\tif (node.style.display == 'none')\r\n\t\t\tnode.style.display = \"\";\r\n\t\treturn node;\r\n\t},\r\n\t_outer_html: function(node){\r\n\t\treturn node.outerHTML || getOuterHTML(node);\r\n\r\n\t\t//probably not needed, FF v10- only\r\n\t\tfunction getOuterHTML(n){\r\n\t\t\tvar div = document.createElement('div'), h;\r\n\t\t\tdiv.appendChild( n.cloneNode(true) );\r\n\t\t\th = div.innerHTML;\r\n\t\t\tdiv = null;\r\n\t\t\treturn h;\r\n\t\t}\r\n\t},\r\n\trender:function(sns) {\r\n\t\tif(sns.form){\r\n\t\t\tvar rec = scheduler.form_blocks[\"recurring\"];\r\n\t\t\tvar form = rec._get_node(sns.form);\r\n\t\t\tvar html = rec._outer_html(form);\r\n\t\t\tform.style.display = 'none';\r\n\t\t\treturn html;\r\n\t\t}\r\n\t\tvar loc = scheduler.locale.labels;\r\n\t\treturn '
'+\r\n\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
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\t\t\t\t\t\t''+\r\n\t\t\t\t\t\t\t\tloc.select_year_day2+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t''+loc.repeat_text_occurences_count+'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t'
'+\r\n\t\t\t\t'
'+\r\n\t\t\t\t'
';\r\n\t},\r\n\t_ds: {},\r\n\t_get_form_node: function(els, name, value){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return null;\r\n\t\tif(col.nodeName) return col;\r\n\r\n\t\tif(col.length){\r\n\t\t\tfor(var i=0; i < col.length; i++){\r\n\t\t\t\tif(col[i].value == value)\r\n\t\t\t\t\treturn col[i];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\t_get_node_value: function(els, name, multiselect){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return \"\";\r\n\t\tif(col.length){\r\n\t\t\tif(multiselect){\r\n\t\t\t\tvar res = [];\r\n\t\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\t\tif (col[i].checked) res.push(col[i].value);\r\n\r\n\t\t\t\treturn res;\r\n\t\t\t}else{\r\n\t\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\t\tif (col[i].checked) return col[i].value;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(col.value)\r\n\t\t\treturn !multiselect ? col.value : [col.value];\r\n\t},\r\n\r\n\t_get_node_numeric_value: function(els, name){\r\n\t\tvar value = scheduler.form_blocks[\"recurring\"]._get_node_value(els, name);\r\n\t\treturn ((value * 1) || 0);\r\n\t},\r\n\r\n\t_set_node_value: function(els, name, value){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return;\r\n\r\n\t\tif(col.name == name){\r\n\t\t\tcol.value = value;\r\n\t\t}else if(col.length){\r\n\t\t\tvar hash_value = typeof value == \"object\";\r\n\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\tif (hash_value || col[i].value == value){\r\n\t\t\t\t\tcol[i].checked = hash_value ? !!value[col[i].value] : !!value;\r\n\t\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_init_set_value:function(node, value, ev) {\r\n\t\tvar block = scheduler.form_blocks[\"recurring\"];\r\n\t\tvar get_value = block._get_node_value;\r\n\t\tvar set_value = block._set_node_value;\r\n\t\tscheduler.form_blocks[\"recurring\"]._ds = {start:ev.start_date, end:ev._end_date};\r\n\r\n\t\tvar str_date_format = scheduler.date.str_to_date(scheduler.config.repeat_date, false, true);\r\n\t\tvar str_date = function(str_date) {\r\n\t\t\tvar date = str_date_format(str_date);\r\n\t\t\tif (scheduler.config.include_end_by)\r\n\t\t\t\tdate = scheduler.date.add(date, 1, 'day');\r\n\t\t\treturn date;\r\n\t\t};\r\n\r\n\t\tvar date_str = scheduler.date.date_to_str(scheduler.config.repeat_date);\r\n\r\n\t\tvar top = node.getElementsByTagName(\"FORM\")[0];\r\n\t\tvar els = {};\r\n\r\n\t\tfunction register_els(inps) {\r\n\t\t\tfor (var i = 0; i < inps.length; i++) {\r\n\t\t\t\tvar inp = inps[i];\r\n\r\n\t\t\t\tif(inp.name){\r\n\t\t\t\t\tif(!els[inp.name]){\r\n\t\t\t\t\t\tels[inp.name] = inp;\r\n\t\t\t\t\t}else if(els[inp.name].nodeType){\r\n\t\t\t\t\t\tvar node = els[inp.name];\r\n\t\t\t\t\t\tels[inp.name] = [node, inp];\r\n\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tels[inp.name].push(inp);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tregister_els(top.getElementsByTagName(\"INPUT\"));\r\n\t\tregister_els(top.getElementsByTagName(\"SELECT\"));\r\n\r\n\t\tif (!scheduler.config.repeat_date_of_end) {\r\n\t\t\tvar formatter = scheduler.date.date_to_str(scheduler.config.repeat_date);\r\n\t\t\tscheduler.config.repeat_date_of_end = formatter(scheduler.date.add(scheduler._currentDate(), 30, \"day\"));\r\n\t\t}\r\n\t\tset_value(els, \"date_of_end\", scheduler.config.repeat_date_of_end);\r\n\r\n\t\tvar $ = function(a) {\r\n\t\t\treturn scheduler._lightbox.querySelector(`#${a}`) || { style:{} };//return fake object if node not found\r\n\t\t};\r\n\r\n\t\tfunction change_current_view() {\r\n\t\t\t$(\"dhx_repeat_day\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_week\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_month\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_year\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_\" + this.value).style.display = \"\";\r\n\t\t\tscheduler.setLightboxSize();\r\n\t\t}\r\n\r\n\t\tfunction get_repeat_code(dates) {\r\n\t\t\tvar code = [get_value(els, \"repeat\")];\r\n\t\t\tget_rcode[code[0]](code, dates);\r\n\r\n\t\t\twhile (code.length < 5) code.push(\"\");\r\n\t\t\tvar repeat = \"\";\r\n\r\n\t\t\tvar end = get_end_rule(els);\r\n\r\n\t\t\tif (end == \"no\") {\r\n\t\t\t\tdates.end = new Date(9999, 1, 1);\r\n\t\t\t\trepeat = \"no\";\r\n\t\t\t}\r\n\t\t\telse if (end == \"date_of_end\") {\r\n\t\t\t\tdates.end = str_date(get_value(els, \"date_of_end\"));\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tscheduler.transpose_type(code.join(\"_\"));\r\n\t\t\t\trepeat = Math.max(1, get_value(els, \"occurences_count\"));\r\n\r\n\t\t\t\tvar transp = 0;\r\n\r\n\t\t\t\t//var transp = ((code[0] == \"week\" && code[4] && code[4].toString().indexOf(scheduler.config.start_on_monday ? 1 : 0) == -1) ? 1 : 0);\r\n\r\n\t\t\t\t// which is equal to following code, seems to produce extra instance, not clear why needed\r\n\r\n\t\t\t\t/*if(code[0] == \"week\"){\r\n\t\t\t\t\tvar days = code[4] || \"\";\r\n\t\t\t\t\tif(scheduler.config.start_on_monday){\r\n\t\t\t\t\t\tif(days.indexOf(1) == -1)\r\n\t\t\t\t\t\ttransp = 1;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(days.indexOf(0) == -1)\r\n\t\t\t\t\t\ttransp = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}*/\r\n\r\n\t\t\t//\tdates.end = scheduler.date.add(new Date(dates.start), repeat + transp, code.join(\"_\"));\r\n\r\n\t\t\t\tdates.end = scheduler.date[\"add_\" + code.join(\"_\")](new Date(dates.start), repeat + transp, {start_date: dates.start}) || dates.start;\r\n\t\t\t}\r\n\r\n\t\t\treturn code.join(\"_\") + \"#\" + repeat;\r\n\t\t}\r\n\t\tfunction get_end_rule(els){\r\n\t\t\tvar end = els[\"end\"];\r\n\t\t\tif(end.length){\r\n\t\t\t\tfor(var i =0; i < end.length; i++){\r\n\t\t\t\t\tif(end[i].checked){\r\n\t\t\t\t\t\tif(end[i].value && end[i].value != \"on\"){//seems to be default value:var input = document.createElement(\"input\"); input.type = \"radio\"; input.value\r\n\t\t\t\t\t\t\treturn end[i].value;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif(!i){\r\n\t\t\t\t\t\t\t\treturn \"no\";\r\n\t\t\t\t\t\t\t}else if(i == 2){\r\n\t\t\t\t\t\t\t\treturn \"date_of_end\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\treturn \"occurences_count\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(end.value)\r\n\t\t\t\t\treturn end.value;\r\n\t\t\t}\r\n\t\t\treturn \"no\";\r\n\t\t}\r\n\t\tfunction set_end_rule(els, value){\r\n\t\t\tvar end = els[\"end\"];\r\n\r\n\t\t\tif(end.length){\r\n\t\t\t\tvar has_values = !!end[0].value && end[0].value != \"on\";\r\n\t\t\t\tif(has_values){\r\n\t\t\t\t\tfor(var i =0; i < end.length; i++){\r\n\t\t\t\t\t\tif(end[i].value == value)\r\n\t\t\t\t\t\t\tend[i].checked = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar ind = 0;\r\n\t\t\t\t\tswitch(value){\r\n\t\t\t\t\t\tcase \"no\":\r\n\t\t\t\t\t\t\tind = 0;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"date_of_end\":\r\n\t\t\t\t\t\t\tind = 2;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tind = 1;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend[ind].checked = true;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tend.value = value;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tscheduler.form_blocks[\"recurring\"]._get_repeat_code = get_repeat_code;\r\n\t\tvar get_rcode = {\r\n\t\t\tmonth:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tif (get_value(els, \"month_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_count\")));\r\n\t\t\t\t\tdates.start.setDate(get_value(els, \"month_day\"));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_count2\")));\r\n\t\t\t\t\tcode.push( get_value(els, \"month_day2\"));\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_week2\")));\r\n\t\t\t\t\tif (!scheduler.config.repeat_precise){\r\n\t\t\t\t\t\tdates.start.setDate(1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tdates._start = true;\r\n\t\t\t},\r\n\t\t\tweek:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"week_count\")));\r\n\t\t\t\tcode.push(\"\");\r\n\t\t\t\tcode.push(\"\");\r\n\t\t\t\tvar t = [];\r\n\r\n\t\t\t\tvar col = get_value(els, \"week_day\", true);\r\n\t\t\t\t//var col = els[\"week_day\"];\r\n\t\t\t\tvar day = dates.start.getDay();\r\n\t\t\t\tvar start_exists = false;\r\n\r\n\t\t\t\tfor (var i = 0; i < col.length; i++){\r\n\t\t\t\t\tt.push(col[i]);\r\n\t\t\t\t\tstart_exists = start_exists || col[i] == day;\r\n\t\t\t\t}\r\n\t\t\t\tif (!t.length){\r\n\t\t\t\t\tt.push(day);\r\n\t\t\t\t\tstart_exists = true;\r\n\t\t\t\t}\r\n\t\t\t\tt.sort();\r\n\r\n\r\n\t\t\t\tif (!scheduler.config.repeat_precise){\r\n\t\t\t\t\tdates.start = scheduler.date.week_start(dates.start);\r\n\t\t\t\t\tdates._start = true;\r\n\t\t\t\t} else if (!start_exists){\r\n\t\t\t\t\tscheduler.transpose_day_week(dates.start, t, 1, 7);\r\n\t\t\t\t\tdates._start = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcode.push(t.join(\",\"));\r\n\t\t\t},\r\n\t\t\tday:function(code) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tif (get_value(els, \"day_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"day_count\")));\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcode.push(\"week\");\r\n\t\t\t\t\tcode.push(1);\r\n\t\t\t\t\tcode.push(\"\");\r\n\t\t\t\t\tcode.push(\"\");\r\n\t\t\t\t\tcode.push(scheduler.config.recurring_workdays.join(\",\"));\r\n\t\t\t\t\tcode.splice(0, 1);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tyear:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\r\n\t\t\t\tif (get_value(els, \"year_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(\"1\");\r\n\t\t\t\t\tdates.start.setMonth(0);\r\n\t\t\t\t\tdates.start.setDate(get_value(els, \"year_day\"));\r\n\t\t\t\t\tdates.start.setMonth(get_value(els, \"year_month\"));\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcode.push(\"1\");\r\n\t\t\t\t\tcode.push(get_value(els, \"year_day2\"));\r\n\t\t\t\t\tcode.push(get_value(els, \"year_week2\"));\r\n\t\t\t\t\tdates.start.setDate(1);\r\n\t\t\t\t\tdates.start.setMonth(get_value(els, \"year_month2\"));\r\n\t\t\t\t}\r\n\t\t\t\tdates._start = true;\r\n\t\t\t}\r\n\t\t};\r\n\t\tvar set_rcode = {\r\n\t\t\tweek:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\t\tset_value(els, \"week_count\", code[1]);\r\n\r\n\t\t\t\tvar t = code[4].split(\",\");\r\n\t\t\t\tvar d = {};\r\n\t\t\t\tfor (var i = 0; i < t.length; i++) d[t[i]] = true;\r\n\r\n\t\t\t\tset_value(els, \"week_day\", d);\r\n\r\n\t\t\t\t//for (var i = 0; i < col.length; i++)\r\n\t\t\t\t//\tcol[i].checked = (!!d[col[i].value]);\r\n\t\t\t},\r\n\t\t\tmonth:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\r\n\t\t\t\tif (code[2] === \"\") {\r\n\t\t\t\t\tset_value(els, \"month_type\", \"d\");\r\n\t\t\t\t\tset_value(els, \"month_count\", code[1]);\r\n\t\t\t\t\tset_value(els, \"month_day\", dates.start.getDate());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tset_value(els, \"month_type\", \"w\");\r\n\t\t\t\t\tset_value(els, \"month_count2\", code[1]);\r\n\t\t\t\t\tset_value(els, \"month_week2\", code[3]);\r\n\t\t\t\t\tset_value(els, \"month_day2\", code[2]);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tday:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\t\tset_value(els, \"day_type\", \"d\");\r\n\t\t\t\tset_value(els, \"day_count\", code[1]);\r\n\t\t\t},\r\n\t\t\tyear:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\r\n\t\t\t\tif (code[2] === \"\") {\r\n\t\t\t\t\tset_value(els, \"year_type\", \"d\");\r\n\t\t\t\t\tset_value(els, \"year_day\", dates.start.getDate());\r\n\t\t\t\t\tset_value(els, \"year_month\", dates.start.getMonth());\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tset_value(els, \"year_type\", \"w\");\r\n\t\t\t\t\tset_value(els, \"year_week2\", code[3]);\r\n\t\t\t\t\tset_value(els, \"year_day2\", code[2]);\r\n\t\t\t\t\tset_value(els, \"year_month2\", dates.start.getMonth());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfunction set_repeat_code(code, dates) {\r\n\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\tvar data = code.split(\"#\");\r\n\t\t\tcode = data[0].split(\"_\");\r\n\t\t\tset_rcode[code[0]](code, dates);\r\n\r\n\t\t\tswitch (data[1]) {\r\n\t\t\t\tcase \"no\":\r\n\t\t\t\t\tset_end_rule(els, \"no\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"\":\r\n\t\t\t\t\tset_end_rule(els, \"date_of_end\");\r\n\r\n\t\t\t\t\tvar end_date = dates.end;\r\n\t\t\t\t\tif (scheduler.config.include_end_by){\r\n\t\t\t\t\t\tend_date = scheduler.date.add(end_date, -1, 'day');\r\n\t\t\t\t\t}\r\n\t\t\t\t\tset_value(els, \"date_of_end\", date_str(end_date));\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tset_end_rule(els, \"occurences_count\");\r\n\t\t\t\t\tset_value(els, \"occurences_count\", data[1]);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tset_value(els, \"repeat\", code[0]);\r\n\t\t\t//e.checked = true;\r\n\r\n\t\t\tvar node = scheduler.form_blocks[\"recurring\"]._get_form_node(els, \"repeat\", code[0]);\r\n\t\t\tif(node.nodeName == \"SELECT\"/* && node.onchange*/){\r\n\t\t\t//\tnode.onchange();\r\n\t\t\t\tnode.dispatchEvent(new Event('change'));\r\n\t\t\t\tnode.dispatchEvent(new MouseEvent('click'));\r\n\t\t\t}else{\r\n\t\t\t\tnode.dispatchEvent(new MouseEvent('click'));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tscheduler.form_blocks[\"recurring\"]._set_repeat_code = set_repeat_code;\r\n\r\n\t\tfor (var i = 0; i < top.elements.length; i++) {\r\n\t\t\tvar el = top.elements[i];\r\n\t\t\tswitch (el.name) {\r\n\t\t\t\tcase \"repeat\":\r\n\t\t\t\t\tif (el.nodeName == \"SELECT\" && !el.$_eventAttached) {\r\n\t\t\t\t\t\tel.$_eventAttached = true;\r\n\t\t\t\t\t\tel.addEventListener(\"change\", change_current_view);\r\n\t\t\t\t\t} else if(!el.$_eventAttached){\r\n\t\t\t\t\t\tel.$_eventAttached = true;\r\n\t\t\t\t\t\tel.addEventListener(\"click\", change_current_view);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._lightbox._rec_init_done = true;\r\n\t},\r\n\tset_value:function(node, value, ev) {\r\n\t\tvar rf = scheduler.form_blocks[\"recurring\"];\r\n\t\tif (!scheduler._lightbox._rec_init_done)\r\n\t\t\trf._init_set_value(node, value, ev);\r\n\t\tnode.open = !ev.rec_type;\r\n\r\n\t\tnode.blocked = this._is_modified_occurence(ev);\r\n\r\n\t\tvar ds = rf._ds;\r\n\t\tds.start = ev.start_date;\r\n\t\tds.end = ev._end_date;\r\n\r\n\t\trf._toggle_block();\r\n\r\n\t\tif (value)\r\n\t\t\trf._set_repeat_code(value, ds);\r\n\t},\r\n\tget_value:function(node, ev) {\r\n\t\tif (node.open) {\r\n\t\t\tvar ds = scheduler.form_blocks[\"recurring\"]._ds;\r\n\t\t\tvar actual_dates = {};\r\n\r\n\t\t\tvar timeControl = getTimeSection();\r\n\r\n\t\t\ttimeControl.getValue(actual_dates);\r\n\t\t\tds.start = actual_dates.start_date;\r\n\t\t\tev.rec_type = scheduler.form_blocks[\"recurring\"]._get_repeat_code(ds);\r\n\t\t\tif (ds._start) {\r\n\t\t\t\tev.start_date = new Date(ds.start);\r\n\t\t\t\tev._start_date = new Date(ds.start);\r\n\t\t\t\tds._start = false;\r\n\t\t\t} else\r\n\t\t\t\tev._start_date = null;\r\n\r\n\t\t\tev._end_date = ds.end;\r\n\t\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\t\t} else {\r\n\t\t\tev.rec_type = ev.rec_pattern = \"\";\r\n\t\t\tev._end_date = ev.end_date;\r\n\t\t}\r\n\t\treturn ev.rec_type;\r\n\t},\r\n\t_get_button: function(){\r\n\t\tvar node = getRecurringSection().header;\r\n\t\treturn node.firstChild.firstChild;\r\n\t},\r\n\t_get_form: function(){\r\n\t\treturn getRecurringSection().node;\r\n\t},\r\n\topen:function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form();\r\n\t\tif(!cont.open)\r\n\t\t\tblock._toggle_block();\r\n\t},\r\n\tclose: function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form();\r\n\r\n\t\tif(cont.open)\r\n\t\t\tblock._toggle_block();\r\n\t},\r\n\t_toggle_block: function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form(),\r\n\t\t\tel = block._get_button();\r\n\t\tif (!cont.open && !cont.blocked) {\r\n\t\t\tcont.style.height = \"auto\";//reset to default value\r\n\t\t\tif(el){\r\n\t\t\t\tel.style.backgroundPosition = \"-5px 0px\";\r\n\t\t\t\tel.nextSibling.innerHTML = scheduler.locale.labels.button_recurring_open;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tcont.style.height = \"0px\";\r\n\t\t\tif(el){\r\n\t\t\t\tel.style.backgroundPosition = \"-5px 20px\";\r\n\t\t\t\tel.nextSibling.innerHTML = scheduler.locale.labels.button_recurring;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcont.open = !cont.open;\r\n\r\n\t\tscheduler.setLightboxSize();\r\n\t},\r\n\tfocus:function(node) {\r\n\t},\r\n\tbutton_click:function(node, button, event) {\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\t\tvar cont = block._get_form();\r\n\t\tif (!cont.blocked)\r\n\t\t\tscheduler.form_blocks.recurring._toggle_block();\r\n\t}\r\n};\r\n\r\nfunction getTimeSection(){\r\n\tvar timeControl = scheduler.formSection('time');\r\n\tif(!timeControl){\r\n\t\ttimeControl = getFirstSectionOfType('time');\r\n\t}\r\n\tif(!timeControl){\r\n\t\ttimeControl = getFirstSectionOfType('calendar_time');\r\n\t}\r\n\r\n\t\r\n\tif (!timeControl) {\r\n\t\tthrow new Error([\"Can't calculate the recurring rule, the Recurring form block can't find the Time control. Make sure you have the time control in 'scheduler.config.lightbox.sections' config.\",\r\n\"You can use either the default time control https://docs.dhtmlx.com/scheduler/time.html, or the datepicker https://docs.dhtmlx.com/scheduler/minicalendar.html, or a custom control. \",\r\n\"In the latter case, make sure the control is named \\\"time\\\":\",\r\n\"\",\r\n\"scheduler.config.lightbox.sections = [\",\r\n\"{name:\\\"time\\\", height:72, type:\\\"YOU CONTROL\\\", map_to:\\\"auto\\\" }];\"]\r\n.join(\"\\n\"));\r\n\t}\r\n\r\n\treturn timeControl;\r\n}\r\n\r\nfunction getRecurringSection(){\r\n\tvar recurringSection = scheduler.formSection('recurring');\r\n\tif(!recurringSection){\r\n\t\trecurringSection = getFirstSectionOfType('recurring');\r\n\t}\r\n\r\n\tif (!recurringSection) {\r\n\t\tthrow new Error([\"Can't locate the Recurring form section.\",\r\n\t\t\"Make sure that you have the recurring control on the lightbox configuration https://docs.dhtmlx.com/scheduler/recurring_events.html#recurringlightbox \",\r\n\t\t\"and that the recurring control has name \\\"recurring\\\":\",\r\n\"\",\r\n\"scheduler.config.lightbox.sections = [\",\r\n\"\t{name:\\\"recurring\\\", ... }\",\r\n\"];\"].join(\"\\n\"));\r\n\r\n\t}\r\n\r\n\treturn recurringSection;\r\n}\r\n\r\nfunction getFirstSectionOfType(type){\r\n\tfor(var i = 0; i < scheduler.config.lightbox.sections.length; i++){\r\n\t\tvar section = scheduler.config.lightbox.sections[i];\r\n\t\tif(section.type === type){\r\n\t\t\treturn scheduler.formSection(section.name);\r\n\t\t}\r\n\t}\r\n\treturn null;\r\n}\r\n\r\n//problem may occur if we will have two repeating events in the same moment of time\r\nscheduler._rec_markers = {};\r\nscheduler._rec_markers_pull = {};\r\nscheduler._add_rec_marker = function(ev, time) {\r\n\tev._pid_time = time;\r\n\tthis._rec_markers[ev.id] = ev;\r\n\tif (!this._rec_markers_pull[ev.event_pid]) this._rec_markers_pull[ev.event_pid] = {};\r\n\tthis._rec_markers_pull[ev.event_pid][time] = ev;\r\n};\r\nscheduler._get_rec_marker = function(time, id) {\r\n\tvar ch = this._rec_markers_pull[id];\r\n\tif (ch) return ch[time];\r\n\treturn null;\r\n};\r\nscheduler._get_rec_markers = function(id) {\r\n\treturn (this._rec_markers_pull[id] || []);\r\n};\r\n\r\nfunction clearMilliseconds(date){\r\n//\treturn date;\r\n\treturn new Date(\r\n\t\tdate.getFullYear(), \r\n\t\tdate.getMonth(), \r\n\t\tdate.getDate(), \r\n\t\tdate.getHours(), \r\n\t\tdate.getMinutes(),\r\n\t\tdate.getSeconds(),\r\n\t\t0\r\n\t);\r\n}\r\n\r\nscheduler._rec_temp = [];\r\n(function() {\r\n\tvar old_add_event = scheduler.addEvent;\r\n\tscheduler.addEvent = function(start_date, end_date, text, id, extra_data) {\r\n\t\tvar ev_id = old_add_event.apply(this, arguments);\r\n\r\n\t\tif (ev_id && scheduler.getEvent(ev_id)) {\r\n\t\t\tvar ev = scheduler.getEvent(ev_id);\r\n\t\t\t\r\n\t\t\tif(ev.start_date){\r\n\t\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t\t}\r\n\t\t\tif(ev.end_date){\r\n\t\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t\t}\r\n\t\t\tif (this._is_modified_occurence(ev))\r\n\t\t\t\tscheduler._add_rec_marker(ev, ev.event_length * 1000);\r\n\t\t\tif (ev.rec_type)\r\n\t\t\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\t\t}\r\n\t\treturn ev_id;\r\n\t};\r\n})();\r\n\r\nscheduler.attachEvent(\"onEventIdChange\", function(id, new_id) {\r\n\tif (this._ignore_call) return;\r\n\tthis._ignore_call = true;\r\n\r\n\tif(scheduler._rec_markers[id]){\r\n\t\t//important for for correct work of scheduler.getEvents(from, to) and collision detection\r\n\t\tscheduler._rec_markers[new_id] = scheduler._rec_markers[id];\r\n\t\tdelete scheduler._rec_markers[id];\r\n\t}\r\n\r\n\tif(scheduler._rec_markers_pull[id]){\r\n\t\tscheduler._rec_markers_pull[new_id] = scheduler._rec_markers_pull[id];\r\n\t\tdelete scheduler._rec_markers_pull[id];\r\n\t}\r\n\r\n\tfor (var i = 0; i < this._rec_temp.length; i++) {\r\n\t\tvar tev = this._rec_temp[i];\r\n\t\tif (tev.event_pid == id) {\r\n\t\t\ttev.event_pid = new_id;\r\n\t\t\tthis.changeEventId(tev.id, new_id + \"#\" + tev.id.split(\"#\")[1]);\r\n\t\t}\r\n\t}\r\n\r\n\tfor(var i in this._rec_markers){\r\n\t\tvar tev = this._rec_markers[i];\r\n\t\tif(tev.event_pid == id){\r\n\t\t\ttev.event_pid = new_id;\r\n\t\t\ttev._pid_changed = true;\r\n\t\t}\r\n\t}\r\n\r\n\tvar el = scheduler._rec_markers[new_id];\r\n\tif(el && el._pid_changed) {\r\n\t\tdelete el._pid_changed;\r\n\t\tsetTimeout(function() {\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler.callEvent(\"onEventChanged\", [new_id, scheduler.getEvent(new_id)]);\r\n\t\t}, 1);\r\n\t}\r\n\r\n\tdelete this._ignore_call;\r\n});\r\nscheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (this._is_virtual_event(id) || (this._is_modified_occurence(ev) && ev.rec_type && ev.rec_type != 'none')) {\r\n\t\tid = id.split(\"#\");\r\n\t\tvar nid = this.uid();\r\n\t\tvar tid = (id[1]) ? id[1] : Math.round(ev._pid_time / 1000);\r\n\r\n\t\tvar nev = this._copy_event(ev);\r\n\t\tnev.id = nid;\r\n\t\tnev.event_pid = ev.event_pid || id[0];\r\n\t\tvar timestamp = tid;\r\n\t\tnev.event_length = timestamp;\r\n\t\tnev.rec_type = nev.rec_pattern = \"none\";\r\n\t\tthis.addEvent(nev);\r\n\r\n\t\tthis._add_rec_marker(nev, timestamp * 1000);\r\n\t} else {\r\n\t\tif (ev.rec_type && this._lightbox_id)\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\tvar sub = this._get_rec_markers(id);\r\n\t\tfor (var i in sub) {\r\n\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\tid = sub[i].id;\r\n\t\t\t\tif (this.getEvent(id))\r\n\t\t\t\t\tthis.deleteEvent(id, true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventDeleted\", function(id, ev){\r\n\tif(!this._is_virtual_event(id) && this._is_modified_occurence(ev)){\r\n\t\tif(!scheduler._events[id]){\r\n\t\t\tev.rec_type = ev.rec_pattern = \"none\";\r\n\t\t\tthis.setEvent(id, ev);\r\n\t\t}\r\n\t}\r\n});\r\nscheduler.attachEvent(\"onEventChanged\", function(id, event) {\r\n\tif (this._loading) return true;\r\n\r\n\tvar ev = this.getEvent(id);\r\n\r\n\tif (this._is_virtual_event(id)) {\r\n\t\tvar id = id.split(\"#\");\r\n\t\tvar nid = this.uid();\r\n\t\tthis._not_render = true;\r\n\r\n\t\tvar nev = this._copy_event(event);\r\n\t\tnev.id = nid;\r\n\t\tnev.event_pid = id[0];\r\n\t\tvar timestamp = id[1];\r\n\t\tnev.event_length = timestamp;\r\n\t\tnev.rec_type = nev.rec_pattern = \"\";\r\n\r\n\t\tthis._add_rec_marker(nev, timestamp * 1000);\r\n\t\tthis.addEvent(nev);\r\n\r\n\t\tthis._not_render = false;\r\n\r\n\t} else {\r\n\t\tif(ev.start_date){\r\n\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t}\r\n\t\tif(ev.end_date){\r\n\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t}\r\n\r\n\t\tif (ev.rec_type && this._lightbox_id){\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t}\r\n\t\tvar sub = this._get_rec_markers(id);\r\n\t\tfor (var i in sub) {\r\n\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\tdelete this._rec_markers[sub[i].id];\r\n\t\t\t\tthis.deleteEvent(sub[i].id, true);\r\n\t\t\t}\r\n\t\t}\r\n\t\tdelete this._rec_markers_pull[id];\r\n\r\n\t\t// it's possible that after editing event is no longer exists, in such case we need to remove _select_id flag\r\n\t\tvar isEventFound = false;\r\n\t\tfor (var k = 0; k < this._rendered.length; k++) {\r\n\t\t\tif (this._rendered[k].getAttribute(this.config.event_attribute) == id)\r\n\t\t\t\tisEventFound = true;\r\n\t\t}\r\n\t\tif (!isEventFound)\r\n\t\t\tthis._select_id = null;\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventAdded\", function(id) {\r\n\tif (!this._loading) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (ev.rec_type && !ev.event_length){\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventSave\", function(id, data, is_new_event) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (!ev.rec_type && data.rec_type && !this._is_virtual_event(id))\r\n\t\tthis._select_id = null;\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventCreated\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (!ev.rec_type)\r\n\t\tev.rec_type = ev.rec_pattern = ev.event_length = ev.event_pid = \"\";\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventCancel\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (ev.rec_type) {\r\n\t\tthis._roll_back_dates(ev);\r\n\t\t// a bit expensive, but we need to be sure that event re-rendered, because view can be corrupted by resize , during edit process\r\n\t\tthis.render_view_data();\r\n\t}\r\n});\r\nscheduler._roll_back_dates = function(ev) {\r\n\tif(ev.start_date){\r\n\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t}\r\n\tif(ev.end_date){\r\n\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t}\r\n\tev.event_length = Math.round((ev.end_date.valueOf() - ev.start_date.valueOf()) / 1000);\r\n\tev.end_date = ev._end_date;\r\n\tif (ev._start_date) {\r\n\t\tev.start_date.setMonth(0);\r\n\t\tev.start_date.setDate(ev._start_date.getDate());\r\n\t\tev.start_date.setMonth(ev._start_date.getMonth());\r\n\t\tev.start_date.setFullYear(ev._start_date.getFullYear());\r\n\r\n\t}\r\n};\r\n\r\nscheduler._is_virtual_event = function(id){\r\n\treturn id.toString().indexOf(\"#\") != -1;\r\n};\r\nscheduler._is_modified_occurence = function(ev){\r\n\treturn (ev.event_pid && ev.event_pid != \"0\");\r\n};\r\n\r\nscheduler.showLightbox_rec = scheduler.showLightbox;\r\nscheduler.showLightbox = function(id) {\r\n\tvar locale = this.locale;\r\n\tvar c = scheduler.config.lightbox_recurring;\r\n\tvar ev = this.getEvent(id);\r\n\tvar pid = ev.event_pid;\r\n\tvar isVirtual = this._is_virtual_event(id);\r\n\tif (isVirtual)\r\n\t\tpid = id.split(\"#\")[0];\r\n\r\n\t// show series\r\n\tvar showSeries = function(id) {\r\n\t\tvar event = scheduler.getEvent(id);\r\n\t\tevent._end_date = event.end_date;\r\n\t\tevent.end_date = new Date(event.start_date.valueOf() + event.event_length * 1000);\r\n\t\treturn scheduler.showLightbox_rec(id); // editing series\r\n\t};\r\n\r\n\tif ( (pid || pid*1 === 0) && ev.rec_type) {\r\n\t\t// direct API call on series id\r\n\t\treturn showSeries(id);\r\n\t}\r\n\tif ( !pid || pid === '0' || ( (!locale.labels.confirm_recurring || c == 'instance') || (c == 'series' && !isVirtual)) ) {\r\n\t\t// editing instance or non recurring event\r\n\t\treturn this.showLightbox_rec(id);\r\n\t}\r\n\tif (c == 'ask') {\r\n\t\tvar that = this;\r\n\t\tscheduler.modalbox({\r\n\t\t\ttext: locale.labels.confirm_recurring,\r\n\t\t\ttitle: locale.labels.title_confirm_recurring,\r\n\t\t\twidth: \"500px\",\r\n\t\t\tposition: \"middle\",\r\n\t\t\tbuttons:[locale.labels.button_edit_series, locale.labels.button_edit_occurrence, locale.labels.icon_cancel],\r\n\t\t\tcallback: function(index) {\r\n\t\t\t\tswitch(+index) {\r\n\t\t\t\t\tcase 0:\r\n\t\t\t\t\t\treturn showSeries(pid);\r\n\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\treturn that.showLightbox_rec(id);\r\n\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\tshowSeries(pid);\r\n\t}\r\n};\r\n\r\n\r\nscheduler.get_visible_events_rec = scheduler.get_visible_events;\r\nscheduler.get_visible_events = function(only_timed) {\r\n\tfor (var i = 0; i < this._rec_temp.length; i++)\r\n\t\tdelete this._events[this._rec_temp[i].id];\r\n\tthis._rec_temp = [];\r\n\r\n\tvar stack = this.get_visible_events_rec(only_timed);\r\n\tvar out = [];\r\n\tfor (var i = 0; i < stack.length; i++) {\r\n\t\tif (stack[i].rec_type) {\r\n\t\t\t//deleted element of series\r\n\t\t\tif (stack[i].rec_pattern != \"none\")\r\n\t\t\t\tthis.repeat_date(stack[i], out);\r\n\t\t}\r\n\t\telse out.push(stack[i]);\r\n\t}\r\n\treturn out;\r\n};\r\n\r\n\r\n(function() {\r\n\tvar old = scheduler.isOneDayEvent;\r\n\tscheduler.isOneDayEvent = function(ev) {\r\n\t\tif (ev.rec_type) return true;\r\n\t\treturn old.call(this, ev);\r\n\t};\r\n\tvar old_update_event = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id) {\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif(ev && ev.rec_type){\r\n\t\t\t//rec_type can be changed without the lightbox,\r\n\t\t\t// make sure rec_pattern updated as well\r\n\t\t\tev.rec_pattern = (ev.rec_type || \"\").split(\"#\")[0];\r\n\t\t}\r\n\t\tif (ev && ev.rec_type && !this._is_virtual_event(id)) {\r\n\t\t\tscheduler.update_view();\r\n\t\t} else {\r\n\t\t\told_update_event.call(this, id);\r\n\t\t}\r\n\t};\r\n})();\r\n\r\nscheduler.transponse_size = {\r\n\tday:1, week:7, month:1, year:12\r\n};\r\nscheduler.date.day_week = function(sd, day, week) {\r\n\tsd.setDate(1);\r\n\tvar originalMonth = scheduler.date.month_start(new Date(sd));\r\n\tweek = (week - 1) * 7;\r\n\tvar cday = sd.getDay();\r\n\tvar nday = day * 1 + week - cday + 1;\r\n\tsd.setDate(nday <= week ? (nday + 7) : nday);\r\n\tvar newMonth = scheduler.date.month_start(new Date(sd));\r\n\tif(originalMonth.valueOf() !== newMonth.valueOf()){\r\n\t\treturn false;\r\n\t}\r\n\treturn true;\r\n};\r\nscheduler.transpose_day_week = function(sd, list, cor, size, cor2) {\r\n\tvar cday = (sd.getDay() || (scheduler.config.start_on_monday ? 7 : 0)) - cor;\r\n\tfor (var i = 0; i < list.length; i++) {\r\n\t\tif (list[i] > cday)\r\n\t\t\treturn sd.setDate(sd.getDate() + list[i] * 1 - cday - (size ? cor : cor2));\r\n\t}\r\n\tthis.transpose_day_week(sd, list, cor + size, null, cor);\r\n};\r\nscheduler.transpose_type = function(type) {\r\n\tvar transposeRecurring = \"transpose_\" + type;\r\n\tif (!this.date[transposeRecurring]) {\r\n\t\tvar recurringParts = type.split(\"_\");\r\n\t\tvar dayDurationMs = 60 * 60 * 24 * 1000;\r\n\t\tvar addRecurring = \"add_\" + type;\r\n\t\tvar recurringStepDays = this.transponse_size[recurringParts[0]] * recurringParts[1];\r\n\r\n\t\tif (recurringParts[0] == \"day\" || recurringParts[0] == \"week\") {\r\n\t\t\tvar weekDays = null;\r\n\t\t\tif (recurringParts[4]) {\r\n\t\t\t\tweekDays = recurringParts[4].split(\",\");\r\n\t\t\t\tif (scheduler.config.start_on_monday) {\r\n\t\t\t\t\tfor (var i = 0; i < weekDays.length; i++)\r\n\t\t\t\t\t\tweekDays[i] = (weekDays[i] * 1) || 7;\r\n\t\t\t\t\tweekDays.sort();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.date[transposeRecurring] = function(nd, td) {\r\n\t\t\t\tvar delta = Math.floor((td.valueOf() - nd.valueOf()) / (dayDurationMs * recurringStepDays));\r\n\t\t\t\tif (delta > 0)\r\n\t\t\t\t\tnd.setDate(nd.getDate() + delta * recurringStepDays);\r\n\t\t\t\tif (weekDays)\r\n\t\t\t\t\tscheduler.transpose_day_week(nd, weekDays, 1, recurringStepDays);\r\n\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t\tthis.date[addRecurring] = function(sd, inc) {\r\n\t\t\t\tvar nd = new Date(sd.valueOf());\r\n\t\t\t\tif (weekDays) {\r\n\t\t\t\t\tfor (var count = 0; count < inc; count++)\r\n\t\t\t\t\t\tscheduler.transpose_day_week(nd, weekDays, 0, recurringStepDays);\r\n\t\t\t\t} else\r\n\t\t\t\t\tnd.setDate(nd.getDate() + inc * recurringStepDays);\r\n\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t}\r\n\t\telse if (recurringParts[0] == \"month\" || recurringParts[0] == \"year\") {\r\n\t\t\tthis.date[transposeRecurring] = function(nd, td, seriesInstance) {\r\n\t\t\t\tvar delta = Math.ceil(((td.getFullYear() * 12 + td.getMonth() * 1 + 1) - (nd.getFullYear() * 12 + nd.getMonth() * 1 + 1)) / (recurringStepDays) - 1);\r\n\r\n\t\t\t\tif (delta >= 0){\r\n\t\t\t\t\tnd.setDate(1);\r\n\t\t\t\t\tnd.setMonth(nd.getMonth() + delta * recurringStepDays);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn scheduler.date[addRecurring](nd, 0, seriesInstance);\r\n\t\t\t\t//if (str[3]){\r\n\t\t\t\t//\tscheduler.date.day_week(nd, str[2], str[3]);\r\n\t\t\t\t//}\r\n\t\t\t};\r\n\t\t\tthis.date[addRecurring] = function(sd, inc, seriesInstance, currentCount) {\r\n\t\t\t\tif(!currentCount){\r\n\t\t\t\t\tcurrentCount = 1;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcurrentCount++;\r\n\t\t\t\t}\r\n\t\t\t\tvar maxCount = 12;\r\n\t\t\t\tif(currentCount > maxCount){\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar nd = new Date(sd.valueOf());\r\n\t\t\t\tnd.setDate(1);\r\n\r\n\r\n\t\t\t\tnd.setMonth(nd.getMonth() + inc * recurringStepDays);\r\n\t\t\t\tvar origMonth = nd.getMonth();\r\n\t\t\t\tvar origYear = nd.getFullYear();\r\n\t\t\t\tnd.setDate(seriesInstance.start_date.getDate());\r\n\t\t\t\tif (recurringParts[3]){\r\n\t\t\t\t\tscheduler.date.day_week(nd, recurringParts[2], recurringParts[3]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar correctOverflowInstances = scheduler.config.recurring_overflow_instances;\r\n\t\t\t\tif(nd.getMonth() != origMonth && correctOverflowInstances != \"none\"){\r\n\t\t\t\t\t// no such day in a month\r\n\t\t\t\t\tif(correctOverflowInstances === \"lastDay\"){\r\n\t\t\t\t\t\t// return either last day of the month\r\n\t\t\t\t\t\tnd = new Date(origYear, origMonth + 1, 0, nd.getHours(), nd.getMinutes(), nd.getSeconds(), nd.getMilliseconds());\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t// or go to the next instance\r\n\t\t\t\t\t\tnd = scheduler.date[addRecurring](new Date(origYear, origMonth + 1, 0), inc||1, seriesInstance, currentCount);\r\n\t\t\t\t\t\t// if next instance is not possible (e.g. 'repeat on 40th day of the month') null will be returned\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.repeat_date = function(ev, stack, non_render, from, to, maxCount) {\r\n\r\n\tfrom = from || this._min_date;\r\n\tto = to || this._max_date;\r\n\tvar max = maxCount || -1;\r\n\tvar td = new Date(ev.start_date.valueOf());\r\n\r\n\tvar startHour = td.getHours();\r\n\r\n\tvar visibleCount = 0;\r\n\r\n\tif (!ev.rec_pattern && ev.rec_type)\r\n\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\r\n\tthis.transpose_type(ev.rec_pattern);\r\n\ttd = scheduler.date[\"transpose_\" + ev.rec_pattern](td, from, ev);\r\n\twhile ( td && (\r\n\t\ttd < ev.start_date ||\r\n\t\tscheduler._fix_daylight_saving_date(td,from,ev,td,new Date(td.valueOf() + ev.event_length * 1000)).valueOf() <= from.valueOf() ||\r\n\t\ttd.valueOf() + ev.event_length * 1000 <= from.valueOf())){\r\n\t\t\ttd = this.date[\"add_\" + ev.rec_pattern](td, 1, ev);\r\n\r\n\t}\r\n\twhile (td && (td < to && td < ev.end_date && (max < 0 || visibleCount < max))) {\r\n\t\ttd.setHours(startHour);\r\n\r\n\t\tvar timestamp = (scheduler.config.occurrence_timestamp_in_utc) ? Date.UTC(td.getFullYear(), td.getMonth(), td.getDate(), td.getHours(), td.getMinutes(), td.getSeconds()) : td.valueOf();\r\n\t\tvar ch = this._get_rec_marker(timestamp, ev.id);\r\n\t\tif (!ch) { // unmodified element of series\r\n\t\t\tvar ted = new Date(td.valueOf() + ev.event_length * 1000);\r\n\t\t\tvar copy = this._copy_event(ev);\r\n\t\t\t//copy._timed = ev._timed;\r\n\t\t\tcopy.text = ev.text;\r\n\t\t\tcopy.start_date = td;\r\n\t\t\tcopy.event_pid = ev.id;\r\n\t\t\tcopy.id = ev.id + \"#\" + Math.round(timestamp / 1000);\r\n\t\t\tcopy.end_date = ted;\r\n\r\n\t\t\tcopy.end_date = scheduler._fix_daylight_saving_date(copy.start_date, copy.end_date, ev, td, copy.end_date);\r\n\r\n\t\t\tcopy._timed = this.isOneDayEvent(copy);\r\n\r\n\t\t\tif (!copy._timed && !this._table_view && !this.config.multi_day) return;\r\n\t\t\tstack.push(copy);\r\n\r\n\t\t\tif (!non_render) {\r\n\t\t\t\tthis._events[copy.id] = copy;\r\n\t\t\t\tthis._rec_temp.push(copy);\r\n\t\t\t}\r\n\r\n\t\t\tvisibleCount++;\r\n\r\n\t\t} else\r\n\t\tif (non_render){\r\n\t\t\tif(ch.rec_type != \"none\"){\r\n\t\t\t\tvisibleCount++;\r\n\t\t\t}\r\n\t\t\tstack.push(ch);\r\n\t\t}\r\n\r\n\t\ttd = this.date[\"add_\" + ev.rec_pattern](td, 1, ev);\r\n\t//\tif(!scheduler.date[\"validate_add_\" + ev.rec_pattern](td, 1, ev.rec_pattern)){\r\n\t///\t\talert(\"detect add\")\r\n\t//\t}\r\n\t}\r\n};\r\nscheduler._fix_daylight_saving_date = function(start_date, end_date, ev, counter, default_date) {\r\n\tvar shift = start_date.getTimezoneOffset() - end_date.getTimezoneOffset();\r\n\tif (shift) {\r\n\t\tif (shift > 0) {\r\n\t\t\t// e.g. 24h -> 23h\r\n\t\t\treturn new Date(counter.valueOf() + ev.event_length * 1000 - shift * 60 * 1000);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// e.g. 24h -> 25h\r\n\t\t\treturn new Date(end_date.valueOf() - shift * 60 * 1000);\r\n\t\t}\r\n\t}\r\n\treturn new Date(default_date.valueOf());\r\n};\r\nscheduler.getRecDates = function(id, max) {\r\n\tvar ev = typeof id == \"object\" ? id : scheduler.getEvent(id);\r\n\tvar recurrings = [];\r\n\tmax = max || 100;\r\n\r\n\tif (!ev.rec_type) {\r\n\t\treturn [\r\n\t\t\t{ start_date: ev.start_date, end_date: ev.end_date }\r\n\t\t];\r\n\t}\r\n\tif (ev.rec_type == \"none\") {\r\n\t\treturn [];\r\n\t}\r\n\r\n\tscheduler.repeat_date(ev, recurrings, true, ev.start_date, ev.end_date, max);\r\n\r\n\tvar result = [];\r\n\tfor(var i = 0; i < recurrings.length; i++){\r\n\t\tif(recurrings[i].rec_type != \"none\"){\r\n\t\t\tresult.push({start_date: recurrings[i].start_date, end_date: recurrings[i].end_date});\r\n\t\t}\r\n\t}\r\n\r\n\treturn result;\r\n};\r\nscheduler.getEvents = function(from, to) {\r\n\tvar result = [];\r\n\tfor (var a in this._events) {\r\n\t\tvar ev = this._events[a];\r\n\t\tif (ev && ev.start_date < to && ev.end_date > from) {\r\n\t\t\tif (ev.rec_pattern) {\r\n\t\t\t\tif (ev.rec_pattern == \"none\") continue;\r\n\t\t\t\tvar sev = [];\r\n\t\t\t\tthis.repeat_date(ev, sev, true, from, to);\r\n\t\t\t\tfor (var i = 0; i < sev.length; i++) {\r\n\t\t\t\t\t// if event is in rec_markers then it will be checked by himself, here need to skip it\r\n\t\t\t\t\tif (!sev[i].rec_pattern && sev[i].start_date < to && sev[i].end_date > from && !this._rec_markers[sev[i].id]) {\r\n\t\t\t\t\t\tresult.push(sev[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if (!this._is_virtual_event(ev.id)) { // if it's virtual event we can skip it\r\n\t\t\t\tresult.push(ev);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n};\r\n\r\nscheduler.config.repeat_date = \"%m.%d.%Y\";\r\nscheduler.config.lightbox.sections = [\r\n\t{name:\"description\", map_to:\"text\", type:\"textarea\" , focus:true},\r\n\t{name:\"recurring\", type:\"recurring\", map_to:\"rec_type\", button:\"recurring\"},\r\n\t{name:\"time\", height:72, type:\"time\", map_to:\"auto\"}\r\n];\r\n\r\n\r\n//drop secondary attributes\r\nscheduler._copy_dummy = function(ev) {\r\n\tvar start_date = new Date(this.start_date);\r\n\tvar end_date = new Date(this.end_date);\r\n\tthis.start_date = start_date;\r\n\tthis.end_date = end_date;\r\n\tthis.event_length = this.event_pid = this.rec_pattern = this.rec_type = null;\r\n};\r\n\r\nscheduler.config.include_end_by = false;\r\nscheduler.config.lightbox_recurring = 'ask'; // series, instance\r\n\r\nscheduler.attachEvent(\"onClearAll\", function(){\r\n\tscheduler._rec_markers = {}; //clear recurring events data\r\n\tscheduler._rec_markers_pull = {};\r\n\tscheduler._rec_temp = [];\r\n});\r\n\r\n}","import getSerializator from '../core/common/get_serializable_events';\r\nexport default function(scheduler){\r\n\r\n\t\r\nconst getSerializableData = getSerializator(scheduler);\r\n\r\n//redefine this method, if you want to provide a custom set of attributes for serialization\r\nscheduler.data_attributes=function(){\r\n\tvar attrs = [];\r\n\tvar format = scheduler._helpers.formatDate;\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\t\tfor (var name in ev)\r\n\t\t\tif (name.substr(0,1) !=\"_\")\r\n\t\t\t\tattrs.push([name,((name == \"start_date\" || name == \"end_date\")?format:null)]);\r\n\t\tbreak;\r\n\t}\r\n\treturn attrs;\r\n};\r\n\r\nscheduler.toXML = function(header){\r\n\tvar xml = [];\r\n\tvar attrs = this.data_attributes();\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\r\n\t\txml.push(\"\");\r\n\t\tfor (var i=0; i < attrs.length; i++)\r\n\t\t\txml.push(\"<\"+attrs[i][0]+\">\");\r\n\r\n\t\txml.push(\"\");\r\n\t}\r\n\treturn (header||\"\")+\"\"+xml.join(\"\\n\")+\"\";\r\n};\r\n\r\nscheduler._serialize_json_value = function(value){\r\n\tif(value === null || typeof value === \"boolean\"){\r\n\t\tvalue = \"\" + value;\r\n\t}else{\r\n\t\tif(!value && value !== 0){\r\n\t\t\tvalue = \"\";\r\n\t\t}\r\n\t\tvalue = '\"' + value.toString().\r\n\t\t\treplace(/\\n/g,\"\").\r\n\t\t\treplace(/\\\\/g,\"\\\\\\\\\").\r\n\t\t\treplace(/\"/g, '\\\\\"') + '\"';\r\n\t}\r\n\treturn value;\r\n};\r\n\r\n\r\n\r\nscheduler.toJSON = function(){\r\n\treturn JSON.stringify(this.serialize());\r\n};\r\n\r\n\r\nscheduler.toICal = function(header){\r\n\tvar start = \"BEGIN:VCALENDAR\\nVERSION:2.0\\nPRODID:-//dhtmlXScheduler//NONSGML v2.2//EN\\nDESCRIPTION:\";\r\n\tvar end = \"END:VCALENDAR\";\r\n\tvar format = scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\");\r\n\tvar full_day_format = scheduler.date.date_to_str(\"%Y%m%d\");\r\n\r\n\tvar ical = [];\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\r\n\r\n\t\tical.push(\"BEGIN:VEVENT\");\r\n\t\tif (!ev._timed || (!ev.start_date.getHours() && !ev.start_date.getMinutes()))\r\n\t\t\tical.push(\"DTSTART:\"+full_day_format(ev.start_date));\r\n\t\telse\r\n\t\t\tical.push(\"DTSTART:\"+format(ev.start_date));\r\n\t\tif (!ev._timed || (!ev.end_date.getHours() && !ev.end_date.getMinutes()))\r\n\t\t\tical.push(\"DTEND:\"+full_day_format(ev.end_date));\r\n\t\telse\r\n\t\t\tical.push(\"DTEND:\"+format(ev.end_date));\r\n\t\tical.push(\"SUMMARY:\"+ev.text);\r\n\t\tical.push(\"END:VEVENT\");\r\n\t}\r\n\treturn start+(header||\"\")+\"\\n\"+ical.join(\"\\n\")+\"\\n\"+end;\r\n};\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Timeline\", scheduler.assert);\r\n}","interface IViewPosition{\r\n\ttop: number;\r\n\tleft: number;\r\n}\r\n\r\ninterface IViewBox extends IViewPosition{\r\n\twidth: number;\r\n\theight: number;\r\n\tbottom: number;\r\n\tright: number;\r\n}\r\n\r\nexport class Tooltip {\r\n\tprivate _root: HTMLElement;\r\n\tprivate _tooltipNode: HTMLElement | null;\r\n\tprivate _scheduler: any;\r\n\r\n\tconstructor(scheduler: any){\r\n\t\tthis._scheduler = scheduler;\r\n\t}\r\n\r\n\tgetNode() : HTMLElement {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tif (!this._tooltipNode){\r\n\t\t\tthis._tooltipNode = document.createElement(\"div\");\r\n\t\t\tthis._tooltipNode.className = \"dhtmlXTooltip scheduler_tooltip tooltip\";\r\n\r\n\t\t\tscheduler._waiAria.tooltipAttr(this._tooltipNode);\r\n\t\t}\r\n\t\tif(scheduler.config.rtl){\r\n\t\t\tthis._tooltipNode.classList.add(\"dhtmlXTooltip_rtl\");\r\n\t\t} else{\r\n\t\t\tthis._tooltipNode.classList.remove(\"dhtmlXTooltip_rtl\");\r\n\t\t}\r\n\t\treturn this._tooltipNode;\r\n\t}\r\n\r\n\tsetViewport(node: HTMLElement):Tooltip{\r\n\t\tthis._root = node;\r\n\t\treturn this;\r\n\t}\r\n\r\n\tshow(left: number, top: number): Tooltip;\r\n\tshow(event: MouseEvent): Tooltip;\r\n\tshow(left: number | MouseEvent, top?: number): Tooltip {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tconst container = document.body;\r\n\t\tconst node = this.getNode();\r\n\r\n\t\tif(!domHelpers.isChildOf(node, container)){\r\n\t\t\tthis.hide();\r\n\t\t\tcontainer.appendChild(node);\r\n\t\t}\r\n\r\n\t\tif (this._isLikeMouseEvent(left)) {\r\n\t\t\tconst position = this._calculateTooltipPosition(left as MouseEvent);\r\n\t\t\ttop = position.top;\r\n\t\t\tleft = position.left;\r\n\t\t}\r\n\r\n\t\tnode.style.top = top + \"px\";\r\n\t\tnode.style.left = left + \"px\";\r\n\r\n\t\tscheduler._waiAria.tooltipVisibleAttr(node);\r\n\t\treturn this;\r\n\t}\r\n\thide() : Tooltip{\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst node = this.getNode();\r\n\t\tif(node && node.parentNode){\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t}\r\n\t\tscheduler._waiAria.tooltipHiddenAttr(node);\r\n\t\treturn this;\r\n\t}\r\n\r\n\tsetContent(html: string) : Tooltip{\r\n\t\tconst node = this.getNode();\r\n\t\tnode.innerHTML = html;\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// it is for salesforce, because it proxies event to it own events\r\n\tprivate _isLikeMouseEvent(event: any): boolean {\r\n\t\tif (!event || typeof event !== \"object\") {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn \"clientX\" in event && \"clientY\" in event;\r\n\t}\r\n\r\n\tprivate _getViewPort() : HTMLElement {\r\n\t\treturn this._root || document.body;\r\n\t}\r\n\r\n\r\n\tprivate _calculateTooltipPosition(event: MouseEvent): IViewPosition{\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\t// top/left coordinates inside the viewport by mouse position\r\n\t\tconst viewport = this._getViewPortSize();\r\n\t\tconst tooltipNode = this.getNode();\r\n\t\tconst tooltip: IViewBox = {\r\n\t\t\ttop:0,\r\n\t\t\tleft: 0,\r\n\t\t\twidth: tooltipNode.offsetWidth,\r\n\t\t\theight: tooltipNode.offsetHeight,\r\n\t\t\tbottom: 0,\r\n\t\t\tright: 0\r\n\t\t};\r\n\r\n\t\tconst offsetX = scheduler.config.tooltip_offset_x;\r\n\t\tconst offsetY = scheduler.config.tooltip_offset_y;\r\n\r\n\t\tconst container = document.body;\r\n\t\tconst mouse = domHelpers.getRelativeEventPosition(event, container);\r\n\t\tconst containerPos = domHelpers.getNodePosition(container);\r\n\t\tmouse.y += containerPos.y; // to fix margin collapsing\r\n\r\n\t\ttooltip.top = mouse.y;\r\n\t\ttooltip.left = mouse.x;\r\n\t\ttooltip.top += offsetY;\r\n\t\ttooltip.left += offsetX;\r\n\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\ttooltip.right = tooltip.left + tooltip.width;\r\n\r\n\t\tconst scrollTop = window.scrollY + container.scrollTop; // to fix margin collapsing\r\n\t\t// edge cases when the tooltip element can be partially hidden by edges of the viewport\r\n\t\tif(tooltip.top < viewport.top - scrollTop){\r\n\t\t\ttooltip.top = viewport.top;\r\n\t\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\t}else if(tooltip.bottom > viewport.bottom){\r\n\t\t\ttooltip.bottom = viewport.bottom;\r\n\t\t\ttooltip.top = tooltip.bottom - tooltip.height;\r\n\t\t}\r\n\r\n\t\tif(tooltip.left < viewport.left){\r\n\t\t\ttooltip.left = viewport.left;\r\n\t\t\ttooltip.right = viewport.left + tooltip.width;\r\n\t\t}else if(tooltip.right > viewport.right){\r\n\t\t\ttooltip.right = viewport.right;\r\n\t\t\ttooltip.left = tooltip.right - tooltip.width;\r\n\t\t}\r\n\r\n\t\tif(mouse.x >= tooltip.left && mouse.x <= tooltip.right) {\r\n\t\t\ttooltip.left = mouse.x - tooltip.width - offsetX;\r\n\t\t\ttooltip.right = tooltip.left + tooltip.width;\r\n\t\t}\r\n\r\n\t\tif(mouse.y >= tooltip.top && mouse.y <= tooltip.bottom) {\r\n\t\t\ttooltip.top = mouse.y - tooltip.height - offsetY;\r\n\t\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\t}\r\n\r\n\t\treturn tooltip;\r\n\t}\r\n\r\n\tprivate _getViewPortSize() : IViewBox {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tconst container = this._getViewPort();\r\n\t\tlet viewport = container;\r\n\t\tlet scrollTop = window.scrollY + document.body.scrollTop;\r\n\t\tlet scrollLeft = window.scrollX + document.body.scrollLeft;\r\n\t\tlet pos;\r\n\t\t// support for the initial tooltip mode where the tooltip element was attached to the data area of scheduler\r\n\t\tif(container === scheduler.$event_data){\r\n\t\t\tviewport = scheduler.$event;\r\n\t\t\tscrollTop = 0;\r\n\t\t\tscrollLeft = 0;\r\n\t\t\tpos = domHelpers.getNodePosition(scheduler.$event);\r\n\t\t}else{\r\n\t\t\tpos = domHelpers.getNodePosition(viewport);\r\n\t\t}\r\n\t\treturn {\r\n\t\t\tleft:pos.x + scrollLeft,\r\n\t\t\ttop: pos.y + scrollTop,\r\n\t\t\twidth: pos.width,\r\n\t\t\theight: pos.height,\r\n\t\t\tbottom: pos.y + pos.height + scrollTop,\r\n\t\t\tright: pos.x + pos.width + scrollLeft\r\n\t\t};\r\n\t}\r\n}\r\n","import * as utils from \"../../core/utils/utils\";\r\nimport { Tooltip } from \"./tooltip\";\r\n\r\ninterface ITrackerTarget {\r\n\tselector: string;\r\n\tonmouseenter: (event: MouseEvent, node: HTMLElement) => void;\r\n\tonmousemove: (event: MouseEvent, node: HTMLElement) => void;\r\n\tonmouseleave: (event: MouseEvent, node: HTMLElement) => void;\r\n\tglobal: boolean;\r\n}\r\n\r\ninterface ITooltipConfig {\r\n\tselector: string;\r\n\thtml: (event: MouseEvent, node: HTMLElement) => string;\r\n\tglobal: boolean;\r\n}\r\n\r\nexport class TooltipManager{\r\n\ttooltip: Tooltip;\r\n\tprotected _domEvents: any;\r\n\tprivate _listeners: object = {};\r\n\tprivate _scheduler: any;\r\n\tprivate delayShow: any;\r\n\tprivate delayHide: any;\r\n\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.tooltip = new Tooltip(scheduler);\r\n\t\tthis._scheduler = scheduler;\r\n\t\tthis._domEvents = scheduler._createDomEventScope();\r\n\t\tthis._initDelayedFunctions();\r\n\t}\r\n\r\n\tdestructor(): void{\r\n\t\tthis.tooltip.hide();\r\n\t\tthis._domEvents.detachAll();\r\n\t}\r\n\thideTooltip(): void{\r\n\t\tthis.delayHide();\r\n\t}\r\n\tattach(config: ITrackerTarget): void {\r\n\t\tlet root = document.body;\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tif(!config.global){\r\n\t\t\troot = scheduler.$root;\r\n\t\t}\r\n\r\n\t\tlet watchableTarget = null;\r\n\t\tconst handler = (event) => {\r\n\t\t\tconst eventTarget = domHelpers.getTargetNode(event);\r\n\t\t\tconst targetNode = domHelpers.closest(eventTarget, config.selector);\r\n\t\t\tif(domHelpers.isChildOf(eventTarget, this.tooltip.getNode())){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tconst doOnMouseEnter = () => {\r\n\t\t\t\twatchableTarget = targetNode;\r\n\t\t\t\tconfig.onmouseenter(event, targetNode);\r\n\t\t\t};\r\n\t\t\t// GS-2377: to show tooltip after touch and hide it when touch is outside the events\r\n\t\t\tif (scheduler._mobile && scheduler.config.touch_tooltip){\r\n\t\t\t\tif(targetNode){\r\n\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tconfig.onmouseleave(event, targetNode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(watchableTarget){\r\n\t\t\t\tif(targetNode && targetNode === watchableTarget){\r\n\t\t\t\t\tconfig.onmousemove(event, targetNode);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconfig.onmouseleave(event, watchableTarget);\r\n\t\t\t\t\twatchableTarget = null;\r\n\r\n\t\t\t\t\tif(targetNode && targetNode !== watchableTarget){\r\n\t\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(targetNode){\r\n\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.detach(config.selector);\r\n\t\tthis._domEvents.attach(root, \"mousemove\", handler);\r\n\t\tthis._listeners[config.selector] = {\r\n\t\t\tnode: root,\r\n\t\t\thandler\r\n\t\t};\r\n\t}\r\n\r\n\tdetach(selector: string): void {\r\n\t\tconst listener = this._listeners[selector];\r\n\t\tif(listener){\r\n\t\t\tthis._domEvents.detach(listener.node, \"mousemove\", listener.handler);\r\n\t\t}\r\n\t}\r\n\r\n\ttooltipFor(config: ITooltipConfig): void {\r\n\t\tconst cloneDomEvent = (event: MouseEvent) => {\r\n\t\t\tlet clone = event;\r\n\t\t\t// making events survive timeout in ie\r\n\t\t\t// tslint:disable-next-line no-string-literal\r\n\t\t\tif(document[\"createEventObject\"] && !document.createEvent){\r\n\t\t\t\t// tslint:disable-next-line no-string-literal\r\n\t\t\t\tclone = document[\"createEventObject\"](event);\r\n\t\t\t}\r\n\t\t\treturn clone;\r\n\t\t};\r\n\t\tthis._initDelayedFunctions();\r\n\t\tthis.attach({\r\n\t\t\tselector: config.selector,\r\n\t\t\tglobal: config.global,\r\n\t\t\tonmouseenter:(event: MouseEvent, node: HTMLElement) => {\r\n\t\t\t\tconst html = config.html(event, node);\r\n\t\t\t\tif(html){\r\n\t\t\t\t\tthis.delayShow(cloneDomEvent(event), html);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonmousemove:(event: MouseEvent, node: HTMLElement) => {\r\n\t\t\t\tconst html = config.html(event, node);\r\n\t\t\t\tif(html){\r\n\t\t\t\t\tthis.delayShow(cloneDomEvent(event), html);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\t\t\tthis.delayHide();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonmouseleave:() => {\r\n\t\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\t\tthis.delayHide();\r\n\t\t\t},\r\n\t\t});\r\n\t}\r\n\r\n\tprivate _initDelayedFunctions(){\r\n\t\tconst scheduler = this._scheduler;\r\n\t\t// reset delayed functions in order to apply current values of tooltip_timeout\r\n\t\tif(this.delayShow){\r\n\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t}\r\n\t\tif(this.delayHide){\r\n\t\t\tthis.delayHide.$cancelTimeout();\r\n\t\t}\r\n\t\tthis.tooltip.hide();\r\n\t\t\r\n\t\tthis.delayShow = (utils as any).default.delay((event: MouseEvent, html: string) => {\r\n\t\t\tif(scheduler.callEvent(\"onBeforeTooltip\", [event]) === false) {\r\n\t\t\t\tthis.tooltip.hide();\r\n\t\t\t} else {\r\n\t\t\t\tthis.tooltip.setContent(html);\r\n\t\t\t\tthis.tooltip.show(event);\r\n\t\t\t}\r\n\t\t}, scheduler.config.tooltip_timeout || 1);\r\n\r\n\t\tthis.delayHide = (utils as any).default.delay(() => {\r\n\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\tthis.tooltip.hide();\r\n\t\t}, scheduler.config.tooltip_hide_timeout || 1);\r\n\t}\r\n\r\n}","import { TooltipManager } from \"./tooltipManager\";\r\n\r\nexport default function (scheduler: any) {\r\n\r\n\tscheduler.config.tooltip_timeout = 30;\r\n\tscheduler.config.tooltip_offset_y = 20;\r\n\tscheduler.config.tooltip_offset_x = 10;\r\n\tscheduler.config.tooltip_hide_timeout = 30;\r\n\r\n\tconst tooltipManager = new TooltipManager(scheduler);\r\n\r\n\tscheduler.ext.tooltips = tooltipManager;\r\n\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function () {\r\n\r\n\t\ttooltipManager.tooltipFor({\r\n\t\t\tselector: \"[\" + scheduler.config.event_attribute + \"]\",\r\n\t\t\thtml: (event: MouseEvent) => {\r\n\t\t\t\tif (scheduler._mobile && !scheduler.config.touch_tooltip) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst targetEventId = scheduler._locate_event(event.target);\r\n\t\t\t\tif (scheduler.getEvent(targetEventId)) {\r\n\t\t\t\t\tconst event = scheduler.getEvent(targetEventId);\r\n\t\t\t\t\treturn scheduler.templates.tooltip_text(event.start_date, event.end_date, event);\r\n\t\t\t\t}\r\n\t\t\t\treturn null;\r\n\t\t\t},\r\n\t\t\tglobal: false\r\n\t\t});\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function () {\r\n\t\ttooltipManager.destructor();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onLightbox\", function () {\r\n\t\ttooltipManager.hideTooltip();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeDrag\", function() {\r\n\t\t// GS-2377: don't hide tooltip on mobile device when ontouchstart event occurs\r\n\t\tif (scheduler._mobile && scheduler.config.touch_tooltip) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\ttooltipManager.hideTooltip();\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function() {\r\n\t\ttooltipManager.hideTooltip();\r\n\t\treturn true;\r\n\t});\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Tree Timeline\", scheduler.assert);\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Units\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\nscheduler._get_url_nav = function(){\r\n\tvar p = {};\r\n\tvar data = (document.location.hash || \"\").replace(\"#\", \"\").split(\",\");\r\n\tfor (var i = 0; i < data.length; i++) {\r\n\t\tvar s = data[i].split(\"=\");\r\n\t\tif (s.length == 2)\r\n\t\t\tp[s[0]] = s[1];\r\n\t}\r\n\treturn p;\r\n};\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function () {\r\n\tvar first = true;\r\n\tvar s2d = scheduler.date.str_to_date(\"%Y-%m-%d\");\r\n\tvar d2s = scheduler.date.date_to_str(\"%Y-%m-%d\");\r\n\tvar select_event = scheduler._get_url_nav().event || null;\r\n\r\n\tscheduler.attachEvent(\"onAfterEventDisplay\", function(ev){\r\n\t\tselect_event = null;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function (om, od, m, d) {\r\n\t\tif (first) {\r\n\t\t\tfirst = false;\r\n\t\t\tvar p = scheduler._get_url_nav();\r\n\r\n\t\t\tif (p.event){\r\n\t\t\t\ttry{\r\n\t\t\t\t\tif(scheduler.getEvent(p.event)){\r\n\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\tshowEvent(p.event);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tvar handler = scheduler.attachEvent(\"onXLE\", function(){\r\n\t\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\t\tshowEvent(p.event);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\tscheduler.detachEvent(handler);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (e){}\r\n\t\t\t}\r\n\r\n\t\t\tif (p.date || p.mode) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthis.setCurrentView((p.date ? s2d(p.date) : null), (p.mode || null));\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\t//assuming that mode is not available anymore\r\n\t\t\t\t\tthis.setCurrentView((p.date ? s2d(p.date) : null), m);\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar values = [\r\n\t\t\t\"date=\" + d2s(d || od),\r\n\t\t\t\"mode=\" + (m || om)\r\n\t\t];\r\n\r\n\t\tif(select_event){\r\n\t\t\tvalues.push(\"event=\" + select_event);\r\n\t\t}\r\n\r\n\t\tvar text = \"#\" + values.join(\",\");\r\n\t\tdocument.location.hash = text;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tfunction showEvent(e){\r\n\t\tif(scheduler.$destroyed){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tselect_event = e;\r\n\t\tif(scheduler.getEvent(e)){\r\n\t\t\tscheduler.showEvent(e);\r\n\t\t}\r\n\t}\r\n});\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Week Agenda\", scheduler.assert);\r\n}","export default function(scheduler){\r\nscheduler.attachEvent(\"onLightBox\",function(){\r\n\tif (this._cover){\r\n\t\ttry{\r\n\t\t\tthis._cover.style.height = this.expanded ? \"100%\" : ((document.body.parentNode||document.body).scrollHeight+\"px\");\r\n\t\t} catch(e) {\r\n\r\n\t\t}\r\n\t}\r\n});\r\n\r\nscheduler.form_blocks.select.set_value=function(node,value,ev){\r\n\tif (typeof value == \"undefined\" || value === \"\")\r\n\t\tvalue = (node.firstChild.options[0]||{}).value;\r\n\tnode.firstChild.value=value||\"\";\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\t// scheduler.config.year_x = 4;\r\n\t// scheduler.config.year_y = 3;\r\n\t// scheduler.xy.year_top = 0;\r\n\r\n\tscheduler.templates.year_date = function(date) {\r\n\t\treturn scheduler.date.date_to_str(scheduler.locale.labels.year_tab + \" %Y\")(date);\r\n\t};\r\n\tscheduler.templates.year_month = scheduler.date.date_to_str(\"%F\");\r\n\tscheduler.templates.year_scale_date = scheduler.date.date_to_str(\"%D\");\r\n\tscheduler.templates.year_tooltip = function(s, e, ev) {\r\n\t\treturn ev.text;\r\n\t};\r\n\r\n\tconst isYearMode = function() {\r\n\t\treturn scheduler._mode == \"year\";\r\n\t};\r\n\t\r\n\tconst getCellDate = function(node){\r\n\t\tvar day = scheduler.$domHelpers.closest(node, \"[data-cell-date]\");\r\n\t\tif(!day || !day.hasAttribute(\"data-cell-date\")) return null;\r\n\t\treturn scheduler.templates.parse_date(day.getAttribute(\"data-cell-date\"));\r\n\t};\r\n\r\n\t// dbl click hook for scheduler._on_dbl_click\r\n\tscheduler.dblclick_dhx_year_grid= function(e) {\r\n\t\tif (isYearMode()) {\r\n\t\t\tconst target = e.target;\r\n\t\t\tif(scheduler.$domHelpers.closest(target, \".dhx_before\") || scheduler.$domHelpers.closest(target, \".dhx_after\")){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tconst date = getCellDate(target);\r\n\t\t\t\r\n\t\t\tif(date){\r\n\t\t\t\tconst start = date;\r\n\t\t\t\tconst end = this.date.add(start, 1, \"day\");\r\n\t\t\t\tif (!this.config.readonly && this.config.dblclick_create){\r\n\t\t\t\t\tthis.addEventNow(start.valueOf(), end.valueOf(), e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\t\r\n\tscheduler.attachEvent(\"onEventIdChange\", function(){\r\n\t\tif (isYearMode())\r\n\t\t\tthis.year_view(true);\r\n\t});\r\n\r\n\r\n\tvar old = scheduler.render_data;\r\n\tscheduler.render_data = function(evs) {\r\n\t\tif (!isYearMode()) return old.apply(this, arguments);\r\n\t\tfor (var i = 0; i < evs.length; i++)\r\n\t\t\tthis._year_render_event(evs[i]);\r\n\t};\r\n\r\n\tvar clear = scheduler.clear_view;\r\n\tscheduler.clear_view = function() {\r\n\t\tif (!isYearMode()) return clear.apply(this, arguments);\r\n\t\tvar dates = scheduler._year_marked_cells,\r\n\t\t\tdiv = null;\r\n\t\tfor (var date in dates) {\r\n\t\t\tif (dates.hasOwnProperty(date)) {\r\n\t\t\t\tdiv = dates[date];\r\n\t\t\t\tdiv.classList.remove(\"dhx_year_event\", \"dhx_cal_datepicker_event\");\r\n\t\t\t\t// div.className = \"dhx_month_head\";\r\n\t\t\t\t// div.removeAttribute(\"date\");\r\n\t\t\t\t// div.removeAttribute(\"data-year-date\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._year_marked_cells = {};\r\n\t};\r\n\r\n\tscheduler._hideToolTip = function() {\r\n\t\tif (this._tooltip) {\r\n\t\t\tthis._tooltip.style.display = \"none\";\r\n\t\t\tthis._tooltip.date = new Date(9999, 1, 1);\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._showToolTip = function(date, pos, e, src) {\r\n\t\tif (this._tooltip) {\r\n\t\t\tif (this._tooltip.date.valueOf() == date.valueOf()) return;\r\n\t\t\tthis._tooltip.innerHTML = \"\";\r\n\t\t} else {\r\n\t\t\tvar t = this._tooltip = document.createElement(\"div\");\r\n\t\t\tt.className = \"dhx_year_tooltip\";\r\n\t\t\tif (this.config.rtl) t.className += \" dhx_tooltip_rtl\";\r\n\t\t\tdocument.body.appendChild(t);\r\n\t\t\tt.addEventListener(\"click\", scheduler._click.dhx_cal_data);\r\n\t\t\tt.addEventListener(\"click\", function(e){\r\n\t\t\t\tif(e.target.closest(`[${scheduler.config.event_attribute}]`)){\r\n\t\t\t\t\tconst id = e.target.closest(`[${scheduler.config.event_attribute}]`).getAttribute(scheduler.config.event_attribute);\r\n\t\t\t\t\tscheduler.showLightbox(id);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\tvar evs = this.getEvents(date, this.date.add(date, 1, \"day\"));\r\n\t\tvar html = \"\";\r\n\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tif(!this.filter_event(ev.id, ev))\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\t\t\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\t\t\thtml += \"
\";\r\n\t\t\thtml += \"
\" + (evs[i]._timed ? this.templates.event_date(evs[i].start_date) : \"\") + \"
\";\r\n\t\t\thtml += \"
 
\";\r\n\t\t\thtml += this.templates.year_tooltip(evs[i].start_date, evs[i].end_date, evs[i]) + \"
\";\r\n\t\t}\r\n\r\n\t\tthis._tooltip.style.display = \"\";\r\n\t\tthis._tooltip.style.top = \"0px\";\r\n\r\n\r\n\t\tif (document.body.offsetWidth - pos.left - this._tooltip.offsetWidth < 0)\r\n\t\t\tthis._tooltip.style.left = pos.left - this._tooltip.offsetWidth + \"px\";\r\n\t\telse\r\n\t\t\tthis._tooltip.style.left = pos.left + src.offsetWidth + \"px\";\r\n\r\n\t\tthis._tooltip.date = date;\r\n\t\tthis._tooltip.innerHTML = html;\r\n\r\n\t\tif (document.body.offsetHeight - pos.top - this._tooltip.offsetHeight < 0)\r\n\t\t\tthis._tooltip.style.top = pos.top - this._tooltip.offsetHeight + src.offsetHeight + \"px\";\r\n\t\telse\r\n\t\t\tthis._tooltip.style.top = pos.top + \"px\";\r\n\t};\r\n\r\n\tscheduler._year_view_tooltip_handler = function(e){\r\n\t\tif (!isYearMode()) return;\r\n\r\n\t\tvar src = e.target || e.srcElement;\r\n\t\tif (src.tagName.toLowerCase() == 'a') // fix for active links extension (it adds links to the date in the cell)\r\n\t\t\tsrc = src.parentNode;\r\n\t\tif (scheduler._getClassName(src).indexOf(\"dhx_year_event\") != -1)\r\n\t\t\tscheduler._showToolTip(scheduler.templates.parse_date(src.getAttribute(\"data-year-date\")), scheduler.$domHelpers.getOffset(src), e, src);\r\n\t\telse\r\n\t\t\tscheduler._hideToolTip();\r\n\t};\r\n\tscheduler._init_year_tooltip = function() {\r\n\t\tscheduler._detachDomEvent(scheduler._els[\"dhx_cal_data\"][0], \"mouseover\", scheduler._year_view_tooltip_handler);\r\n\t\tscheduler.event(scheduler._els[\"dhx_cal_data\"][0], \"mouseover\", scheduler._year_view_tooltip_handler);\r\n\t};\r\n\r\n\tscheduler._get_year_cell = function(d) {\r\n\t\tvar dateString = scheduler.templates.format_date(d);\r\n\t\tvar cells = this.$root.querySelectorAll(`.dhx_cal_data .dhx_cal_datepicker_date[data-cell-date=\"${dateString}\"]`);\r\n\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\tif(!scheduler.$domHelpers.closest(cells[i], \".dhx_after, .dhx_before\")){\r\n\t\t\t\treturn cells[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t};\r\n\r\n\tscheduler._year_marked_cells = {};\r\n\tscheduler._mark_year_date = function(date, event) {\r\n\t\tvar dateString = scheduler.templates.format_date(date);\r\n\t\tvar cell = this._get_year_cell(date);\r\n\t\tif (!cell) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar ev_class = this.templates.event_class(event.start_date, event.end_date, event);\r\n\t\tif (!scheduler._year_marked_cells[dateString]) {\r\n\t\t\tcell.classList.add(\"dhx_year_event\", \"dhx_cal_datepicker_event\");// = \"dhx_month_head dhx_year_event\";\r\n\t\t\tcell.setAttribute(\"data-year-date\", dateString);\r\n\t\t\tcell.setAttribute(\"date\", dateString);\r\n\t\t\tscheduler._year_marked_cells[dateString] = cell;\r\n\t\t}\r\n\t\tif(ev_class){\r\n\t\t\tcell.classList.add(ev_class);\r\n\t\t}\r\n\t};\r\n\tscheduler._unmark_year_date = function(date) {\r\n\t\tvar cell = this._get_year_cell(date);\r\n\t\tif (!cell) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcell.classList.remove(\"dhx_year_event\", \"dhx_cal_datepicker_event\");\r\n//\t\tcell.className = \"dhx_month_head\";\r\n\t};\r\n\tscheduler._year_render_event = function(event) {\r\n\t\tvar date = event.start_date;\r\n\t\tif (date.valueOf() < this._min_date.valueOf()){\r\n\t\t\tdate = this._min_date;\r\n\t\t} else {\r\n\t\t\tdate = this.date.date_part(new Date(date));\r\n\t\t}\r\n\r\n\t\twhile (date < event.end_date) {\r\n\t\t\tthis._mark_year_date(date, event);\r\n\t\t\tdate = this.date.add(date, 1, \"day\");\r\n\t\t\tif (date.valueOf() >= this._max_date.valueOf())\r\n\t\t\t\treturn;\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.year_view = function(mode) {\r\n\r\n\t\tscheduler.set_sizes();\r\n\r\n\t\tscheduler._table_view = mode;\r\n\r\n\t\tif (this._load_mode && this._load()) return;\r\n\r\n\t\tif (mode) {\r\n\t\t\tscheduler._init_year_tooltip();\r\n\t\t\tscheduler._reset_year_scale();\r\n\t\t\tif (scheduler._load_mode && scheduler._load()){\r\n\t\t\t\tscheduler._render_wait = true;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tscheduler.render_view_data();\r\n\t\t} else {\r\n\t\t\tscheduler._hideToolTip();\r\n\t\t}\r\n\t};\r\n\tscheduler._reset_year_scale = function() {\r\n\t\tthis._cols = [];\r\n\t\tthis._colsS = {};\r\n\t\tvar week_starts = []; //start day of first week in each month\r\n\t\tvar dataArea = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tvar c = this.config;\r\n\t\tdataArea.scrollTop = 0; //fix flickering in FF\r\n\t\tdataArea.innerHTML = \"\";\r\n\r\n\t\tvar dy = Math.floor((parseInt(dataArea.style.height) - scheduler.xy.year_top) / c.year_y);\r\n\t\tif (dy < 190) {\r\n\t\t\tdy = 190;\r\n\t\t}\r\n\r\n\t\tvar week_template = document.createElement(\"div\");\r\n\t\tvar dummy_date = this.date.week_start(scheduler._currentDate());\r\n\r\n\t\tthis._process_ignores(dummy_date, 7, \"day\", 1);\r\n\r\n\t\tfor (var i = 0; i < 7; i++) {\r\n\t\t\tif(!(this._ignores && this._ignores[i])) {\r\n\t\t\t\tthis._cols[i] = 'var(--dhx-scheduler-datepicker-cell-size)';\r\n\t\t\t\tthis._render_x_header(i, 0, dummy_date, week_template);\r\n\r\n\t\t\t}\r\n\t\t\tdummy_date = this.date.add(dummy_date, 1, \"day\");\r\n\t\t}\r\n\t\tweek_template.lastChild.className += \" dhx_scale_bar_last\";\r\n\r\n\t\tfor(var i = 0; i < week_template.childNodes.length; i++){\r\n\t\t\tthis._waiAria.yearHeadCell(week_template.childNodes[i]);\r\n\t\t}\r\n\r\n\t\tvar sd = this.date[this._mode + \"_start\"](this.date.copy(this._date));\r\n\t\tvar ssd = sd;\r\n\t\tvar yearBox = null;\r\n\t\tconst wrapper = document.createElement(\"div\");\r\n\t\twrapper.classList.add(\"dhx_year_wrapper\");\r\n\t\tfor (var i = 0; i < c.year_y; i++){\r\n\t\t\tfor (var j = 0; j < c.year_x; j++) {\r\n\t\t\t\tyearBox = document.createElement(\"div\");\r\n\t\t\t\tyearBox.className = \"dhx_year_box\";\r\n\r\n\t\t\t\tyearBox.setAttribute(\"date\", this._helpers.formatDate(sd));\r\n\t\t\t\tyearBox.setAttribute(\"data-month-date\", this._helpers.formatDate(sd));\r\n\t\t\t\tyearBox.innerHTML = \"
\" + week_template.innerHTML + \"
\";\r\n\r\n\t\t\t\tvar header = yearBox.querySelector(\".dhx_year_month\");\r\n\t\t\t\tvar grid = yearBox.querySelector(\".dhx_year_grid\");\r\n\t\t\t\tvar body = yearBox.querySelector(\".dhx_year_body\");\r\n\r\n\t\t\t\tvar headerId = scheduler.uid();\r\n\t\t\t\tthis._waiAria.yearHeader(header, headerId);\r\n\t\t\t\tthis._waiAria.yearGrid(grid, headerId);\r\n\r\n\r\n\t\t\t\theader.innerHTML = this.templates.year_month(sd);\r\n\r\n\r\n\r\n\t\t\t\tvar dd = this.date.week_start(sd);\r\n\t\t\t\tthis._reset_month_scale(body, sd, dd, 6);\r\n\r\n\t\t\t\tvar days = body.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var day = 0; day < days.length; day++){\r\n\t\t\t\t\tthis._waiAria.yearDayCell(days[day]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\twrapper.appendChild(yearBox);\r\n\r\n\t\t\t\tweek_starts[i * c.year_x + j] = (sd.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;\r\n\t\t\t\tsd = this.date.add(sd, 1, \"month\");\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdataArea.appendChild(wrapper);\r\n\r\n\t\tvar dateElement = this._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML = this.templates[this._mode + \"_date\"](ssd, sd, this._mode);\r\n\t\t}\r\n\r\n\t\tthis.week_starts = week_starts;\r\n\t\tweek_starts._month = ssd.getMonth();\r\n\t\tthis._min_date = ssd;\r\n\t\tthis._max_date = sd;\r\n\t};\r\n\r\n\tscheduler._reset_year_scale = function(){\r\n\r\n\t\tvar dataArea = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tdataArea.scrollTop = 0; //fix flickering in FF\r\n\t\tdataArea.innerHTML = \"\";\r\n\r\n\t\tlet yearStart = this.date.year_start(new Date(this._date));\r\n\t\t\r\n\t\tthis._min_date = this.date.week_start(new Date(yearStart));\r\n\r\n\t\tconst wrapper = document.createElement(\"div\");\r\n\t\twrapper.classList.add(\"dhx_year_wrapper\");\r\n\r\n\t\tlet currentDate = yearStart;\r\n\t\tfor(let i = 0; i < 12; i++){\r\n\t\t\tlet yearBox = document.createElement(\"div\");\r\n\t\t\tyearBox.className = \"dhx_year_box\";\r\n\r\n\t\t\tyearBox.setAttribute(\"date\", this._helpers.formatDate(currentDate));\r\n\t\t\tyearBox.setAttribute(\"data-month-date\", this._helpers.formatDate(currentDate));\r\n\t\t\tyearBox.innerHTML = `
${this.templates.year_month(currentDate)}
\r\n\t\t\t
`;\r\n\r\n\t\t\tconst yearGrid = yearBox.querySelector(\".dhx_year_grid\");\r\n\t\t\tconst datepicker = scheduler._createDatePicker(null, {\r\n\t\t\t\tdate: currentDate,\r\n\t\t\t\tminWeeks: 6\r\n\t\t\t});\r\n\t\t\tdatepicker._renderDayGrid(yearGrid);\r\n\t\t\tdatepicker.destructor();\r\n\r\n\t\t\twrapper.appendChild(yearBox);\r\n\r\n\t\t\tcurrentDate = this.date.add(currentDate, 1, \"month\");\r\n\r\n\t\t}\r\n\t\tdataArea.appendChild(wrapper);\r\n\r\n\t\tlet lastDate = this.date.add(yearStart, 1, \"year\");\r\n\t\tif(lastDate.valueOf() != this.date.week_start(new Date(lastDate)).valueOf()){\r\n\t\t\tlastDate = this.date.week_start(new Date(lastDate));\r\n\t\t\tlastDate = this.date.add(lastDate, 1, \"week\");\r\n\t\t}\r\n\t\tthis._max_date = lastDate;\r\n\t\tvar dateElement = this._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML = this.templates[this._mode + \"_date\"](yearStart, lastDate, this._mode);\r\n\t\t}\r\n\t};\r\n\r\n\tvar getActionData = scheduler.getActionData;\r\n\tscheduler.getActionData = function(n_ev) {\r\n\t\tif(!isYearMode()){\r\n\t\t\treturn getActionData.apply(scheduler, arguments);\r\n\t\t}\r\n\t\t\r\n\t\tvar date = getCellDate(n_ev.target);\r\n\t\treturn {\r\n\t\t\tdate:date,\r\n\t\t\tsection:null\r\n\t\t};\r\n\t};\r\n\r\n\tvar locateEvent = scheduler._locate_event;\r\n\tscheduler._locate_event = function(node) {\r\n\t\tvar id = locateEvent.apply(scheduler, arguments);\r\n\t\tif(!id){\r\n\t\t\t\r\n\t\t\tvar date = getCellDate(node);\r\n\t\t\tif(!date) return null;\r\n\t\t\tvar evs = scheduler.getEvents(date, scheduler.date.add(date, 1, \"day\"));\r\n\t\t\tif(!evs.length) return null;\r\n\r\n\t\t\t//can be multiple events in the cell, return any single one\r\n\t\t\tid = evs[0].id;\r\n\t\t}\r\n\t\treturn id;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tscheduler._hideToolTip();\r\n\t});\r\n}","export default function(scheduler){\r\n\r\n\r\n(function(){\r\n\r\nfunction defaults(obj, std){\r\n\tfor (var key in std)\r\n\t\tif (!obj[key])\r\n\t\t\tobj[key] = std[key];\r\n\treturn obj;\r\n}\r\n\r\nfunction getElementSizes(element, scheduler) {\r\n\tvar sizes = {};\r\n\telement = scheduler._els[element];\r\n\tif (element && element[0]) {\r\n\t\tsizes.x = element[0].scrollWidth;\r\n\t\tsizes.y = element[0].scrollHeight;\r\n\t} else {\r\n\t\tsizes.x = 0;\r\n\t\tsizes.y = 0;\r\n\t}\r\n\treturn sizes;\r\n}\r\n\r\n//compatibility for new versions of scheduler\r\nif(!window.dhtmlxAjax){\r\n\twindow.dhtmlxAjax = {\r\n\t\tpost: function(url, data, callback){\r\n\t\t\treturn window.dhx4.ajax.post(url, data, callback);\r\n\t\t},\r\n\t\tget: function(url, callback){\r\n\t\t\treturn window.ajax.get(url, callback);\r\n\t\t}\r\n\t};\r\n}\r\n\r\nfunction add_export_methods(scheduler){\r\n\r\n\tscheduler.exportToPDF = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.pdf\",\r\n\t\t\tformat:\"A4\",\r\n\t\t\torientation:\"landscape\",\r\n\t\t\tdpi:96,\r\n\t\t\tzoom:1,\r\n\t\t\trtl: scheduler.config.rtl\r\n\t\t});\r\n\t\tconfig.html = this._export_html(config);\r\n\t\tconfig.mode = this.getState().mode;\r\n\t\tthis._send_to_export(config, \"pdf\");\r\n\t};\r\n\r\n\tscheduler.exportToPNG = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.png\",\r\n\t\t\tformat:\"A4\",\r\n\t\t\torientation:\"landscape\",\r\n\t\t\tdpi:96,\r\n\t\t\tzoom:1,\r\n\t\t\trtl: scheduler.config.rtl\r\n\t\t});\r\n\t\tconfig.html = this._export_html(config);\r\n\t\tconfig.mode = this.getState().mode;\r\n\t\tthis._send_to_export(config, \"png\");\r\n\t};\r\n\r\n\tscheduler.exportToICal = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.ical\",\r\n\t\t\tdata:this._serialize_plain(null, config)\r\n\t\t});\r\n\t\tthis._send_to_export(config, \"ical\");\r\n\t};\r\n\r\n\tscheduler.exportToExcel = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.xlsx\",\r\n\t\t\ttitle:\"Events\",\r\n\t\t\tdata:this._serialize_plain( this.templates.xml_format, config),\r\n\t\t\tcolumns:this._serialize_columns()\r\n\t\t});\r\n\t\tthis._send_to_export(config, \"excel\");\r\n\t};\r\n\r\n\tscheduler._ajax_to_export = function(data, type, callback){\r\n\t\tdelete data.callback;\r\n\t\tvar url = data.server || \"https://export.dhtmlx.com/scheduler\";\r\n\r\n\t\twindow.dhtmlxAjax.post(url,\r\n\t\t\t\"type=\"+type+\"&store=1&data=\"+encodeURIComponent(JSON.stringify(data)),\r\n\t\t\tfunction(loader){\r\n\t\t\t\tvar fail = loader.xmlDoc.status > 400;\r\n\t\t\t\tvar info = null;\r\n\r\n\t\t\t\tif (!fail){\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\tinfo = JSON.parse(loader.xmlDoc.responseText);\r\n\t\t\t\t\t}catch(e){}\r\n\t\t\t\t}\r\n\t\t\t\tcallback(info);\r\n\t\t\t}\r\n\t\t);\r\n\t};\r\n\r\n\tscheduler._plain_export_copy = function(source, format){\r\n\t\tvar target = {};\r\n\t\tfor (var key in source)\r\n\t\t\ttarget[key] = source[key];\r\n\r\n\t\ttarget.start_date = format(target.start_date);\r\n\t\ttarget.end_date = format(target.end_date);\r\n\t\ttarget.$text = this.templates.event_text(source.start_date, source.end_date, source);\r\n\r\n\t\treturn target;\r\n\t};\r\n\r\n\tscheduler._serialize_plain = function(format, config){\r\n\t\tformat = format || scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\", true);\r\n\r\n\t\tvar events;\r\n\t\tif (config && config.start && config.end)\r\n\t\t\tevents = scheduler.getEvents(config.start, config.end);\r\n\t\telse\r\n\t\t\tevents = scheduler.getEvents();\r\n\r\n\t\tvar data = [];\r\n\t\tfor (var i = 0; i< events.length; i++)\r\n\t\t\tdata[i] = this._plain_export_copy(events[i], format);\r\n\r\n\t\treturn data;\r\n\t};\r\n\r\n\tscheduler._serialize_columns = function(){\r\n\t\treturn [\r\n\t\t\t{ id:\"start_date\", header:\"Start Date\", width:30 },\r\n\t\t\t{ id:\"end_date\", header:\"End Date\", width:30 },\r\n\t\t\t{ id:\"$text\", header:\"Text\", width:100 }\r\n\t\t];\r\n\t};\r\n\r\n\tscheduler._send_to_export = function(data, type){\r\n\t\tif(!data.version){\r\n\t\t\tdata.version = scheduler.version;\r\n\t\t}\r\n\r\n\t\tif(!data.skin){\r\n\t\t\tdata.skin = scheduler.skin;\r\n\t\t}\r\n\r\n\t\tif (data.callback)\r\n\t\t\t\treturn scheduler._ajax_to_export(data, type, data.callback);\r\n\r\n\t\tvar form = this._create_hidden_form();\r\n\r\n\t\tform.firstChild.action = data.server || \"https://export.dhtmlx.com/scheduler\";\r\n\t\tform.firstChild.childNodes[0].value = JSON.stringify(data);\r\n\t\tform.firstChild.childNodes[1].value = type;\r\n\t\tform.firstChild.submit();\r\n\t};\r\n\r\n\tscheduler._create_hidden_form = function(){\r\n\t\tif (!this._hidden_export_form){\r\n\t\t\tvar t = this._hidden_export_form = document.createElement(\"div\");\r\n\t\t\tt.style.display = \"none\";\r\n\t\t\tt.innerHTML = \"
\";\r\n\t\t\tdocument.body.appendChild(t);\r\n\t\t}\r\n\t\treturn this._hidden_export_form;\r\n\t};\r\n\r\n\tscheduler._get_export_size = function(format, orientation, zoom, dpi, header, footer, scales) {\r\n\r\n\t\tdpi = parseInt(dpi)/25.4 || 4;\r\n\r\n\t\tvar sizes = {\r\n\t\t\t\"A5\":{ x:148, y:210 },\r\n\t\t\t\"A4\":{ x:210, y:297 },\r\n\t\t\t\"A3\":{ x:297, y:420 },\r\n\t\t\t\"A2\":{ x:420, y:594 },\r\n\t\t\t\"A1\":{ x:594, y:841 },\r\n\t\t\t\"A0\":{ x:841, y:1189 }\r\n\t\t};\r\n\r\n\t\tvar dataX = getElementSizes(\"dhx_cal_data\", this).x;\r\n\t\tvar dataY = getElementSizes(\"dhx_cal_data\", this).y;\r\n\t\tvar headY = getElementSizes(\"dhx_cal_header\", this).y;\r\n\t\tvar multY = getElementSizes(\"dhx_multi_day\", this).y;\r\n\r\n\t\tvar cSize = {\r\n\t\t\ty: dataY + headY + multY\r\n\t\t};\r\n\r\n\t\tif (format === \"full\") {\r\n\t\t\tcSize.x = dataX;\r\n\t\t} else {\r\n\t\t\tcSize.x = Math.floor( (orientation === \"landscape\" ? sizes[format].y : sizes[format].x) * dpi );\r\n\t\t}\r\n\r\n\t\tif (scales) {\r\n\t\t\tcSize.x *= (parseFloat(scales.x) || 1);\r\n\t\t\tcSize.y *= (parseFloat(scales.y) || 1);\r\n\t\t}\r\n\r\n\t\treturn cSize;\r\n\t};\r\n\r\n\tfunction getTimeline() {\r\n\t\tvar mode = scheduler.getState().mode;\r\n\t\tif (scheduler.matrix && scheduler.matrix[mode]) {\r\n\t\t\treturn scheduler.matrix[mode];\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\r\n\tfunction getInitialSizes() {\r\n\t\tvar smartRendering = undefined,\r\n\t\t\tscrollable = undefined;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (timeline) {\r\n\t\t\tscrollable = timeline.scrollable;\r\n\t\t\tsmartRendering = timeline.smart_rendering;\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tnav_height: scheduler.xy.nav_height,\r\n\t\t\tscroll_width: scheduler.xy.scroll_width,\r\n\t\t\tstyle_width: scheduler._obj.style.width,\r\n\t\t\tstyle_height: scheduler._obj.style.height,\r\n\t\t\ttimeline_scrollable: scrollable,\r\n\t\t\ttimeline_smart_rendering: smartRendering\r\n\t\t};\r\n\t}\r\n\r\n\tfunction setExportSizes(size, initialSizes) {\r\n\t\tscheduler._obj.style.width = size.x + \"px\";\r\n\t\tscheduler._obj.style.height = size.y + \"px\";\r\n\r\n\t\tscheduler.xy.nav_height = 0;\r\n\t\tscheduler.xy.scroll_width = 0;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (initialSizes.timeline_scrollable || initialSizes.timeline_smart_rendering) {\r\n\r\n\t\t\ttimeline.scrollable = false;\r\n\t\t\ttimeline.smart_rendering = false;\r\n\t\t}\r\n\t}\r\n\r\n\tfunction setInitialSizes(initialSizes) {\r\n\t\tscheduler.xy.scroll_width = initialSizes.scroll_width;\r\n\t\tscheduler.xy.nav_height = initialSizes.nav_height;\r\n\t\tscheduler._obj.style.width = initialSizes.style_width;\r\n\t\tscheduler._obj.style.height = initialSizes.style_height;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (initialSizes.timeline_scrollable || initialSizes.timeline_smart_rendering) {\r\n\t\t\ttimeline.scrollable = initialSizes.timeline_scrollable;\r\n\t\t\ttimeline.smart_rendering = initialSizes.timeline_smart_rendering;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler._export_html = function (obj) {\r\n\t\tvar initialSizes = getInitialSizes();\r\n\t\tvar size = scheduler._get_export_size(obj.format, obj.orientation, obj.zoom, obj.dpi, obj.header, obj.footer, obj.scales);\r\n\r\n\t\tvar html = \"\";\r\n\t\ttry {\r\n\t\t\tsetExportSizes(size, initialSizes);\r\n\t\t\tscheduler.setCurrentView();\r\n\t\t\thtml = scheduler._obj.innerHTML;\r\n\t\t} catch (e) {\r\n\r\n\t\t\t// eslint-disable-next-line no-console\r\n\t\t\tconsole.error(e);\r\n\t\t} finally {\r\n\t\t\tsetInitialSizes(initialSizes);\r\n\t\t\tscheduler.setCurrentView();\r\n\t\t}\r\n\r\n\t\treturn html;\r\n\t};\r\n\r\n}\r\n\r\nadd_export_methods(scheduler);\r\n\r\n\r\n})();\r\n\r\n}","import active_links from \"./active_links\";\r\nimport agenda_legacy from \"./agenda_legacy_view\";\r\nimport agenda_view from \"./agenda\";\r\nimport all_timed from \"./all_timed\";\r\nimport collision from \"./collision\";\r\nimport container_autoresize from \"./container_autoresize\";\r\nimport cookie from \"./cookie\";\r\nimport daytimeline_restricted from \"./restricted_extensions/daytimeline\";\r\nimport drag_between_restricted from \"./restricted_extensions/drag_between\";\r\nimport editors from \"./editors\";\r\nimport expand from \"./expand\";\r\nimport grid_view from \"./restricted_extensions/grid_view\";\r\nimport html_templates from \"./html_templates\";\r\nimport key_nav from \"./key_nav\";\r\nimport layer from \"./layer\";\r\nimport limit from \"./limit\";\r\nimport map_view from \"./map_view\";\r\nimport minical from \"./minical\";\r\nimport monthheight from \"./monthheight\";\r\nimport multisection_restricted from \"./restricted_extensions/multisection\";\r\nimport multiselect from \"./multiselect\";\r\nimport multisource from \"./multisource\";\r\nimport mvc from \"./mvc\";\r\nimport outerdrag from \"./outerdrag\";\r\nimport pdf from \"./pdf\";\r\nimport quick_info from \"./quick_info\";\r\nimport readonly from \"./readonly\";\r\nimport recurring from \"./recurring\";\r\nimport recurring_legacy from \"./recurring_legacy\";\r\nimport serialize from \"./serialize\";\r\nimport timeline_restricted from \"./restricted_extensions/timeline\";\r\nimport tooltip from \"./tooltip\";\r\nimport treetimeline_restricted from \"./restricted_extensions/treetimeline\";\r\nimport units_restricted from \"./restricted_extensions/units\";\r\nimport url from \"./url\";\r\nimport week_agenda_restricted from \"./restricted_extensions/week_agenda\";\r\nimport wp from \"./wp\";\r\nimport year_view from \"./year_view\";\r\nimport export_api from \"./export_api\";\r\n\r\nexport default {\r\n\tactive_links,\r\n\tagenda_legacy,\r\n\tagenda_view,\r\n\tall_timed,\r\n\tcollision,\r\n\tcontainer_autoresize,\r\n\tcookie,\r\n\tdaytimeline: daytimeline_restricted,\r\n\tdrag_between: drag_between_restricted,\r\n\teditors,\r\n\texpand,\r\n\texport_api,\r\n\tgrid_view,\r\n\thtml_templates,\r\n\tkey_nav,\r\n\tlayer,\r\n\tlimit,\r\n\tmap_view,\r\n\tminical,\r\n\tmonthheight,\r\n\tmultisection: multisection_restricted,\r\n\tmultiselect,\r\n\tmultisource,\r\n\tmvc,\r\n\touterdrag,\r\n\tpdf,\r\n\tquick_info,\r\n\treadonly,\r\n\trecurring,\r\n\trecurring_legacy,\r\n\tserialize,\r\n\ttimeline: timeline_restricted,\r\n\ttooltip,\r\n\ttreetimeline: treetimeline_restricted,\r\n\tunits: units_restricted,\r\n\turl,\r\n\tweek_agenda: week_agenda_restricted,\r\n\twp,\r\n\tyear_view\r\n};","import SchedulerFactory from \"./scheduler_factory\";\r\nimport gplExtensions from \"./ext/extensions_gpl\";\r\n\r\nconst factory = new SchedulerFactory(gplExtensions);\r\n\r\nconst scheduler = factory.getSchedulerInstance();\r\nconst Scheduler = {\r\n\tplugin: scheduler.bind(factory.plugin, factory)\r\n};\r\n\r\nwindow.scheduler = scheduler;\r\nwindow.Scheduler = Scheduler;\r\n\r\nif(!window.$dhx) {\r\n\twindow.$dhx = {};\r\n}\r\n\r\nwindow.$dhx.scheduler = scheduler;\r\nwindow.$dhx.Scheduler = Scheduler;\r\n\r\nexport default scheduler;export { scheduler, Scheduler };"],"names":["dhtmlxHook","dhtmlx","attaches","attachScheduler","day","mode","tabs","scheduler","obj","document","createElement","id","this","_genStr","innerHTML","body","appendChild","firstChild","attachObject","vs","av","sched","schedId","setSizes","updateView","destructor","init","_viewRestore","globalScope","window","global","global$1","dragHighlightPos","dndMarkers","dragStarted","eventNode","event","isEnabled","config","drag_highlight","markTimespan","checkViewName","viewName","viewObj","getView","layout","checkSectionPropertyName","y_property","map_to","setRequiredStylesToMarker","style","top","left","marginLeft","createMarkerConfig","configSettings","sectionId","sections","markerObject","start_date","end_date","css","html","date","add","createViewMarker","settings","markerConfigs","getMonthViewMarkers","getTimelineAndUnitsViewMarkers","getColumnViewMarkers","forEach","cfg","push","columnViewMarkersArray","eventNodes","$container","querySelectorAll","event_attribute","i","length","eventNodeClone","cloneNode","startDate","Date","getAttribute","endDate","dates","monthViewMarkersArray","weekDates","currDate","valueOf","week_start","cells","unitMarkersArray","sectionPropertyName","multisection","String","split","section_delimiter","formatedSections","map","element","elems","attachEvent","e","getEvent","target","closest","getState","cascade_event_display","unselect","getActionData","section","unmarkTimespan","undoDelete","ev","deletedEvent","copy","undo_deleted","new_event","message","text","expire","type","callback","undoBtn","addEvent","render","limitPlugin","mark_now","display_marked_timespans","overwrite_marked_timespans","dhx_time_block","default_timespan_type","fix_options","options","days","zones","get_resulting_options","blockTime","addMarkedTimespan","unblockTime","deleteMarkedTimespan","checkInMarkedTimespan","timespan_type","on_overlap","res","temp_start_date","temp_end_date","timespans","_marked_timespans","date_part","day_value","day_index","getDay","getZones","eventStart","_get_zone_minutes","eventEnd","getDate","markerStart","markerEnd","checkLimitViolation","check_limits","s","c","evs","rec_type","_end_date","seriesEnd","limit_start","limit_end","recEventInLimits","complete_res","p","_timed","isOneDayEvent","allow","_drag_id","_drag_mode","setHours","setMinutes","checkEvent","callEvent","_get_blocked_zones","property","timeline_zones","blocked_timeline_zones","_get_relevant_blocked_zones","_add_timespan_zones","resultZones","concat","containers","_props","matrix","container","view","view_config","linker","_mark_now","hide","dhx_now_time","_els","now","_currentDate","_remove_mark_now","_max_date","_min_date","getHours","first_hour","last_hour","locate_holder_day","_append_mark_now","zone_start","_table_view","_mode","start_index","end_index","units_l","size","position","r_divs","t_day","t_div","_render_marked_timespan","els","div","parent","parentNode","removeChild","getMinutes","_prepare_timespan_options","r_configs","temp_configs","Array","t_days","slice","cloned_config","_lame_clone","apply","undefined","min","max","invert_zones","invertZones","uid","view_key","hasOwnProperty","ids","t_config","_lame_copy","k","c_config","t_sd","t_ed","zone_end","_get_dates_by_index","index","start","end","start_day","delta","t_date","_get_css_classes_by_config","css_classes","join","_get_block_by_config","block","area","blocks","min_date","max_date","date_to_display","min_day","areas","_scales","sday","_cols","_ignores","block_proto","className","height","width","order","inner_index","locate_holder","Math","all_hours_height","hour_size_px","hour_ms","round","_mark_timespans","data","divs","_on_scale_add_marker","len","childNodes","_getClassName","indexOf","configuration","Error","rebuild_els","get_elements","timespans_ids","_marked_timespans_ids","timespan_types","_marked_timespans_types","_addMarkerTimespanConfig","unit_id","timespans_view","day_configs","_array","configs","current_zones","resulting_zones","c_zone_start","c_zone_end","isLast","offset","splice","_subtract_timespan_zones","is_modified","_delete_marked_timespan_by_id","parent_array","_delete_marked_timespan_by_config","viewspans","_delete_marked_timespans_list","d","dayConfig","day_timespans","d_t","related_zones","arguments","types","t","typedConfig","_get_types_to_render","common","specific","types_to_render","_get_configs_to_render","units","_get_unit_index","unit","_date","dx","day_ind","unitsPerDay","floor","key","unit_zones","unit_types","global_data","day_types","dblclick_dhx_marked_timespan","src","dblclick_create","addEventNow","createMethod","methods","isActive","disableMethod","methodName","dummyMethod","restoreMethod","disableMethods","methodsHash","call","restoreMethods","batchUpdatePayload","console","error","$stateProvider","registerProvider","batch_update","batchUpdate","noRedraw","call_dp","_dp","updateMode","dp_mode","setUpdateMode","calls","setModeDate","needRender","needUpdateView","repaintEvents","rememberModeDate","setCurrentView","render_data","render_view_data","updateEvent","sendData","initPlugins","limit","uidSeed","isArray","pop","isStringObject","Function","prototype","toString","constructor","isNumberObject","isBooleanObject","isDate","getFullYear","getMonth","defined","delay","timeout","timer","result","$cancelTimeout","$pending","args","setTimeout","clearTimeout","$execute","utils","mixin","source","force","f","object","Number","Boolean","varType","Object","StateService","stateProviders","name","provider","method","internal","unregisterProvider","assert","check","show_errors","log","extend","commonViews","agenda","grid","timeline","week_agenda","year","anythingElse","requiredExtensions","_commonErrorMessages","unknownView","relatedDoc","relatedExtension","collapsedContainer","createTimelineView","createUnitsView","createGridView","renderCalendar","exportToPNG","exportToPDF","dhtmlxError","catchError","a","b","responseText","ajax_error","alert","classes","cssClass","classList","itemTypes","rows_container","row","setAttribute","fix_tab_position","$firstTab","$lastTab","$segmentedTab","button","builtInButton","spacer","minicalendarButton","minicalendarDiv","click","$_eventAttached","isCalendarVisible","destroyCalendar","navigation","handler","calendar","html_element","findRenderer","renderer","rows","cols","renderElement","value","align","justifyContent","prepareConfig","renderLayout","fragment","createDocumentFragment","items","next","_init_nav_bar","navBar","querySelector","_update_nav_bar","previousHeight","heightChanged","configChanged","newHeight","xy","nav_height","unset_actions","set_actions","display","isAttachedNode","root","getWindowSize","w","innerWidth","documentElement","clientWidth","h","innerHeight","clientHeight","equals","listenWindowResize","oldSize","resizeDelay","$destroyed","newSize","triggerSchedulerResize","$root","watchNodeResize","offsetHeight","previousWidth","offsetWidth","lowlevelResizeWatcher","addResizeListener","containerStyles","getComputedStyle","getPropertyValue","resizeWatcher","tabIndex","wai_aria_attributes","salesforce_environment","contentWindow","EventHost","_silent_mode","listeners","createEventStorage","handlers","eventStorage","combinedResult","handlerResult","handlerId","once","originalHandler","removeEvent","clear","makeEventable","eventHost","eventName","toLowerCase","thisObject","bind","innerId","attachAll","eventArguments","handlerName","detachEvent","list","eventId","detachAllEvents","extend$l","_detachDomEvent","el","removeEventListener","_init_once","scheduler_resize_listener","navbar","header","dataArea","hasSchedulerMarkup","createDefaultHeader","views","nav","_grid","names","optionalViews","_obj","getElementById","wai_aria_application_role","JSON","stringify","rtl","_skin_init","_scroll","init_templates","_init_touch_events","set_sizes","$initialized","min_event_height","bar_height","scale_width","scroll_width","scale_height","month_scale_height","menu_width","margin_top","margin_left","editor_width","month_head_height","event_header_height","keys","edit_save","edit_cancel","functor","_x","scale_x","materialScalePlaceholder","_is_material_skin","insertBefore","set_xy","offsetTop","_lightbox","_setLbPosition","_data_width","right","node","x","y","prepareValue","val","prepared","isNaN","direction","getElementsByTagName","class_name","attr_value","label","locale","labels","_waiAria","labelAttr","domEventsScope","_createDomEventScope","detachAll","_click","attach","preventDefault","_temp_touch_block","_on_mouse_move","_ignore_next_click","_on_mouse_down","_on_mouse_up","_on_dbl_click","returnValue","_locate_event","select","_select_id","_close_not_saved","editStop","previousSelection","editor_id","_edit_id","lightbox_id","_lightbox_id","_new_event","select_id","expanded","drag_id","drag_mode","dhx_cal_data","cancelBubble","readonly","icon","mask","buttons","replace","dhx_cal_prev_button","dhx_cal_next_button","dummy","step","def_step","dhx_cal_today_button","dhx_cal_tab","deprecated_name","substring","search","delete","confirm_deleting","_dhtmlx_confirm","title","title_confirm_deleting","deleteEvent","ok","icon_delete","edit","save","details","showLightbox","form","cancel","opts","confirm","base","_isObject","_isDate","duration","event_duration","time_step","start_hour","setTime","_loading","_drag_event","details_on_dblclick","viewHandler","_get_column_index","x_pos","column","_week_indexes_from_pos","pos","ceil","_mouse_coords","$env","isIE","pageX","pageY","clientX","scrollLeft","clientLeft","clientY","scrollTop","clientTop","_colsS","$domHelpers","getAbsoluteLeft","getAbsoluteTop","dy","heights","_ignores_detected","preserve_length","_event_length","_get_real_event_length","x_step","x_unit","timestamp","confirmationText","confirm_closing","title_confirm_closing","positive_closing","_drag_pos","_correct_shift","back","getTimezoneOffset","_is_pos_changed","old_pos","new_pos","diff","old_val","new_val","acc","abs","d_pos","has_moved","_correct_drag_start_date","_start_correction","_end_correction","_get_fictional_event_length","_correct_drag_end_date","mousedownPos","_get_date_from_pos","_drag_start","fields","timeStep","custom","time_part","_dragEventBody","_move_event_shift","resize_date","_drag_from_start","resize_from_start","end_day_start","end_day_date","firstHour","lastHour","maxY","precisePos","minDate","maxDate","preciseDate","cursor","shift","new_end","new_start","limit_drag_out","all_timed","_get_section_view","_get_event_sday","_allow_dnd","update_render","sx","update_view","for_rendered","r","srcElement","classname","drag_event_body","fullClass","_get_private_properties","_clear_temporary_properties","clean","flagged_event","initial","current_state","_mobile","moved","_dhx_changed","is_new","edit_on_create","details_on_create","_trigger_dyn_loading","_load_mode","_load","_render_wait","_reset_ignores","_reset_scale","isViewExists","templates","_set_aria_buttons_attrs","buttonGroups","group","j","prev","headerButtonsAttributes","icon_form","icon_edit","oldClass","newClass","dhx_multi_day","prev_scroll","preserve_scroll","multidayScroll","_dy_shift","tab","headerToggleState","remove","_render_x_header","offset_top","head","left_border","columnHeaderText","dayHeaderAttr","_get_columns_num","from","to","count","count_n","_get_timeunit_start","_get_view_end","dd","ed","_calc_scale_sizes","summ","_process_ignores","realcount","_set_scale_col_size","_render_scales","data_area","sd","today","parseInt","scales","cls","firstHalf","slotDate","format_date","htmlContent","time_slot_text","time_slot_class","secondHalf","week_date_class","dayColumnAttr","day_start","_getNavDateElement","str","drag_resize","drag_move","navBarDateStr","scaleElement","navBarDateAttr","_reset_month_scale","_reset_hours_scale","multi_day","c1","visibility","totalWidth","col_length","hiddenWidth","c2","cc","content","hour_scale","hourScaleAttr","scroll_hour","now_date","n","preserve","ignore","ign_date","_render_month_scale","view_start","cd","tdwidths","cell_width","getCellHeight","cellheight","table","cell","month_date_class","body_class","head_class","monthCellAttr","cellHead","month_day","cellBody","bf1","parse_date","getLabel","lightbox","updateCollection","list_name","collection","serverList","resetLightbox","hideCover","cache","create","n_ev","_focus","focus","getDaysDifference","differenceInTime","getTime","differenceInDays","eventLength","startColumnIndex","endColumnIndex","_get_date_index","last_column","excludedDuration","intervalStart","intervalEnd","leftCellCutOffStart","leftCellCutOffEnd","rightCellCutOffStart","rightCellCutOffEnd","ev_length","dir","per_day","fd","start_slot","end_slot","_get_section_property","_is_initialized","state","_is_lightbox_open","defaultDomEvents","addEventListener","eventRemove","createEventScope","domEvents","eventScope","capture","detach","staticArray","_eventRemoveAll","_trim","func","trim","htmlTags","RegExp","extraSpaces","stripHTMLLite","htmlText","singleQuotes","escapeQuotes","getAttributeString","attr","attributes","setAttributes","values","day_date","role","getHeaderCellAttr","dateString","eventAttr","_eventCommonAttr","event_text","$dataprocessor_class","setEventBarAttr","_getAttributes","attributeSetter","arg","eventBarAttrString","agendaHeadAttrString","agendaHeadDateString","agendaHeadDescriptionString","agendaDataAttrString","agendaEventAttrString","attrs","agendaDetailsBtnString","icon_details","gridAttrString","gridRowAttrString","gridCellAttrString","mapAttrString","mapRowAttrString","mapDetailsBtnString","minicalHeader","headerId","minicalGrid","minicalRow","minicalDayCell","selected","minicalHeadCell","weekAgendaDayCell","weekAgendaEvent","lightboxHiddenAttr","lightboxVisibleAttr","lightboxSectionButtonAttrString","tabindex","yearHeader","yearGrid","yearHeadCell","yearRow","yearDayCell","lightboxAttr","lightboxButtonAttrString","buttonName","eventMenuAttrString","iconName","lightboxHeader","headerText","lightboxSelectAttrString","time_option","month","hour","minute","messageButtonAttrString","buttonLabel","messageInfoAttr","messageModalAttr","quickInfoAttr","quickInfoHeaderAttrString","quickInfoHeader","quickInfoButtonAttrString","tooltipAttr","tooltipVisibleAttr","tooltipHiddenAttr","isDisabled","payload","elementPosition","elem","bottom","getBoundingClientRect","box","docElem","pageYOffset","pageXOffset","offsetLeft","offsetParent","getRelativeEventPosition","getNodePosition","getClassName","baseVal","getTargetNode","trg","tagName","shadowRoot","composedPath","locateCss","strict","ind","charAt","isVisible","currentStyle","hiddenSection","recurringSection","hasNonNegativeTabIndex","hasHref","canHaveHref","nodeName","loLowerCase","canDisable","input","textarea","hasAttribute","getFocusableNodes","nodes","nodesArray","$position","sort","isValid","isShadowDomSupported","createShadowRoot","attachShadow","getActiveElement","activeElement","getSelection","focusNode","getRootNode","ShadowRoot","host","hasShadowParent","dom_helpers","htmlObject","getOffset","getOffsetSum","getOffsetRect","test","navigator","userAgent","dummyBox","selector","insertAfter","newNode","referenceNode","nextSibling","isChildOf","child","contains","Element","matches","msMatchesSelector","webkitMatchesSelector","parentElement","nodeType","isWindowAwailable","env","isOpera","isChrome","isKHTML","isFF","isIPad","isEdge","isNode","clearAll","serialize$1","serialized","encodeURIComponent","Promise","createConfig","url","async","headers","serialize","ajax","serializeRequestParams","parse","DOMParser","parseFromString","ActiveXObject","loadXML","xmltop","tagname","xhr","status","xml","responseXML","xpath","xpathExp","docObj","selectNodes","first","col","ownerDocument","evaluate","XPathResult","ANY_TYPE","iterateNext","query","_call","get","onLoad","getSync","put","postData","del","post","postSync","resolve","reject","XMLHttpRequest","isQt","match","readyState","xmlDoc","filePath","open","setRequestHeader","toUpperCase","send","urlSeparator","$ajax","generateStringToDate","format","utc","splt","code","csp_date_to_str","to_fixed","getUTCDate","getUTCMonth","getUTCFullYear","day_short","getUTCDay","day_full","month_short","month_full","getUTCHours","getUTCMinutes","getUTCSeconds","getSeconds","getUTCISOWeek","getISOWeek","csp_str_to_date","set","temp","month_short_hash","month_full_hash","UTC","cspEnabled","checkIfCSPEnabled","useCsp","csp","old","setSeconds","setMilliseconds","start_on_monday","month_start","setDate","year_start","setMonth","_add_days","inc","ndate","datesDiff","rest","hours","setYear","num","date_to_str","str_to_date","exactFormat","stringToDateMethod","parseExactFormat","yyyyMMddhhIIss","MMddyyyyhhIIss","ddMMyyyyhhIIss","ISO8601","isYMDDate","datestr","isMDYDate","isDMYDate","isISO8601","parseYMD","parseMDY","parseDMY","parse_exact_format","nday","first_thursday","year_number","ordinal_date","week_number","convert_to_utc","default_date","month_date","load_date","week_date","hour_date","date_format","api_date","displayed_event_color","displayed_event_text_color","wide_form","day_column_padding","use_select_menu_space","drag_create","resize_month_events","resize_month_timed","responsive_lightbox","separate_short_events","cascade_event_count","cascade_event_margin","multi_day_height_limit","drag_lightbox","server_utc","touch","touch_tip","touch_drag","touch_swipe_dates","quick_info_detached","icons_edit","icons_select","buttons_left","buttons_right","highlight_displayed_event","delay_render","timeline_swap_resize","$initial","_helpers","parseDate","xml_date","formatDate","xml_format","d1","d2","day_scale_date","month_scale_date","week_scale_date","time_picker","event_date","load_format","event_header","event_class","event_bar_date","event_bar_text","month_events_link","drag_marker_class","drag_marker_content","tooltip_date_format","tooltip_text","calendar_month","calendar_scale_date","calendar_date","calendar_time","_events","_loaded","clear_view","extra_data","event_updated","silent","setEvent","hash","_rendered","changeEventId","new_id","create_getter","create_setter","_changed","is_visible_events","clear_event","in_visible_range","evFirstHour","evLastHour","end_dates_visible","hidden_duration","checkEndDate","get_visible_events","only_timed","stack","filter_event","filter","_is_main_area_event","hold","full","_not_render","_recalculate_timed","tvs","tvd","_rendered_location","buffer","renderedLocation","_view_month_day","_render_month_link","toRender","_sday","_eday","curr","_sweek","getEvents","_get_event_bar_pos","widt","x2","_pre_render_events","render_event_bar","max_evs","max_month_events","_sorder","real","render_event","_get_first_visible_cell","hb","h_old","_pre_render_events_line","_pre_render_events_table","monthRows","cellHeight","cHeight","unshift","scrollHeight","scroll_fix","scale_settings","sum_width","row_heights","full_multi_day_height","used_multi_day_height","used_multi_day_height_css","multi_day_section","multi_day_icon","overflowY","datePart","_get_event_mapped_end_date","ev_duration","_min_mapped_duration","evs_originals","sh","eh","_inner","t_ev","t_end_date","slot_index","sorderSet","_is_sorder","_max_sorder","max_count","_count","_copy_event","_time_order","_is_any_multiday_cell_visible","isAnyCellVisible","checkDate","noCells","lastDayEnd","cellIndex","weekCellIndex","out","weeks","chunks_info","first_chunk","last_chunk","chunk_info","locate_s","locate_e","_length","stack_line","_first_chunk","_last_chunk","_copy_dummy","_y_from_date","sm","_calc_event_y","min_height","em","parentWidth","menu","menu_offset","pos_y","ev_count","ev_sorder","margin","_render_v_bar","_text_style","parentPosition","zIndex","color","setProperty","tplClass","cssText","_editor","shiftKey","keyCode","icons","icons_str","ariaAttr","currentIcon","textColor","highlightEventPosition","contentA","contentB","cs","cse","boxWidth","renderEvent","inner_html","footer_class","_drag_resize","past","_get_dnd_order","ev_height","max_height","_orig_sorder","evTop","columns","y_event_offset","resize_handle","resizable","left_chunk","right_chunk","resize_left","resize_right","timed","bg_color","style_text","_edit_stop_event","getRenderedEvent","rendered_events","rendered_event","showEvent","original_color","original_text_color","restoreOriginalColors","getSectionTop","posFromDate","_smartRenderingEnabled","scrollTo","_append_drag_marker","m","zone","scale","lastChild","previousSibling","_update_marker_position","_parsers","canParse","topElement","loader","csrfToken","security_key","arr","itms","itm","nodeValue","ud","udx","_xmlNodeToJSON","_userdata","_init_event","json","err","events","dhx_security","collections","collections_loaded","option","option_key","ical","c_start","c_end","incoming","event_r","e_start","e_end","exec","param","param_r","parse_param","substr","dh","dm","utcMark","dn","getSerializator","_load_url","prevent_cache","ajaxCallback","response","on_load","lf","cache_line","temp_to","extend$a","extend$9","extend$8","foundParser","parser","_process","_process_loading","_after_call","_tagvalue","_init_date","getSerializableData","createSerializator","dataset","allEvents","exportedEvent","exportValue","rawValue","load","setLoadMode","array","show_loading","_y","_lightbox_controls","formSection","getLightbox","getValue","form_blocks","get_value","setValue","set_value","get_template_control","control","get_select_control","get_textarea_control","get_time_control","defaults","template","time","sns","placeholder","_get_input","_dhx_onchange","onchange","time_format","_time_format_order","dt","last","limit_time_select","selectBoxClass","range","start_year","end_year","year_range","tdate","_time_values","ariaAttrs","full_day","_full_day","checked","disabled","_fill_lightbox_select","auto_end_date","_update_lightbox_select","time_values","direct_value","fixed_value","value_found","t_v","selectedIndex","original","getLightboxRoot","cspEnvironment","salesforceEnvironment","showCover","show_cover","_cover","_fill_lightbox","lightbox_header","headerContent","headerDate","headerTitle","current_sns","_get_lightbox_section_node","default_value","_lightbox_out","_empty_lightbox","hide_lightbox","endLightbox","hide_cover","_move_while_dnd","_finish_dnd","save_lightbox","startLightbox","_custom_lightbox","_temp_lightbox","cancel_lightbox","hideLightbox","_init_lightbox_events","buttonTarget","sectionButton","button_click","action","readonly_active","setLightboxSize","_init_dnd_events","_dnd_start_lb","dhx_unselectable","lb","_lb_start","_ready_to_dnd","recurring","_lightbox_template","label_name","ds","t_ds","_bindLightboxLabels","labelBlock","inputBlock","fallback","inputId","old_id","mobile","MSStream","platform","maxTouchPoints","touchEventsSupported","createEvent","_touch_events","touches","PointerEvent","pointerEnabled","pointerType","msPointerEnabled","MSPOINTER_TYPE_MOUSE","accessor","tracker","scroll_mode","action_mode","dblclicktime","attachTouchEvent","passive","check_direction_swipe","s_ev","e_ev","max_dy","scrollable","doMouseMove","dnd","original_render","_update_global_tip","drag_cancel","_pointerDragId","pointerId","fake_event","_block_next_stop","actTask","fakeTask","sourceTask","_show_global_tip","_hide_global_tip","toptip","_global_tip","drag_to_create","drag_to_move","getRootView","tag","hooks","didInsert","cmp","_addThemeClass","skin","_skin_settings","_skin_xy","lightbox_additional_height","checkIfMaterialSkin","themeNameFromFile","links","href","_build_skin_info","monitorThemeChange","styles","themeVar","isCssVarTheme","themeName","cssValues","oldMaterialTheme","_theme_info","theme","cssVarTheme","themeVariables","calculatedMaterial","probe","cachedBorderBoxValue","checkIfBorderBoxStyling","boxSizing","refreshAfterLoad","_border_box_events","oldStyling","newStyling","_configure","setSkin","flatSkinHourScale","monitorIntervalId","clearInterval","setInterval","csstheme","_old_month_day","old_month_day","reorderTabs","specialTabs","tabName","find","firstTab","reverse","jQuery","$","counter","fn","dhx_scheduler","each","Scheduler","getSchedulerInstance","comp","update_view_timer","curr_view_timer","lazy_setCurrentView","self","oldDate","oldMode","updateFlags","lazy_updateView","ars","DataProcessorEvents","dp","$scheduler","$dp","_dataProcessorHandlers","_validId","setUpdated","z","_in_progress","_invalid","updatedRows","_waitMode","_update_callback","upd","setUserData","action_param","_add_rec_marker","extendScheduler","_is_virtual_event","getUserData","_set_event_text_style","rec_pattern","_dp_change_event_id","_dp_hook_delete","setDp","DataProcessor","serverProcessorURL","serverProcessor","autoUpdate","_tMode","_headers","_payload","post_delim","messages","updated","inserted","deleted","invalid","invalid_cell","enableUTFencoding","eventable","setTransactionMode","total","_tSend","_endnm","_serializeAsJson","_router","router","escape","_utf","setDataColumns","_columns","getSyncState","enableDataNames","enablePartialDataSend","master","rowId","findRow","existing","set_invalid","is_invalid","markRow","_methods","getActionByState","checkBeforeUpdate","sendAllData","_beforeSendData","_getRowData","_sendData","_serializeAsJSON","serialize_one","pref","_applyPayload","dataToSend","_onResolvedCreateUpdate","resultState","sid","tid","afterUpdateCallback","routerMode","actionPromise","update","then","catch","queryParams","afterUpdate","urlParams","_user","_cleanupArgumentsBeforeSend","preprocessedData","_cleanupItemBeforeSend","valid","_forEachUpdatedRow","_getAllData","has_one","pattern","defineAction","_uActions","btag","marker","correct","originalSid","_errorResponse","cleanUpdate","_setDefaultTransactionMode","_serverProcessor","that","finalizeUpdate","atag","_initialized","_dp_init","dataProcessorEvents","_dataprocessor","setOnAfterUpdate","setOnBeforeUpdateHandler","setAutoUpdate","interval","user","_need_update","_update_busy","xml_node","afterAutoUpdate","fullSync","intervalId","loadUpdate","getUpdates","_getXmlNodeValue","version","vers","updates","processedData","updatedItem","output","item","processedItem","prop","_prepareItemForJson","_prepareItemForForm","_prepareDataItem","dataItem","createDataProcessor","tMode","boxAttribute","_dhx_msg_cfg","usercall","modalBox","modal_key","which","messageBox","keyboard","domHelpers","modality","cover","classValue","buttonAriaAttrs","buttonCss","info","timers","pull","getFirstDefined","_boxStructure","contentId","inner","message_ok","message_cancel","btn","_createBox","hidden","alertPopup","confirmPopup","boxPopup","box_params","params","alertBox","confirmBox","focusable","subtype","seed","hideAll","popups","modalbox","ar","day_tab","week_tab","month_tab","icon_save","icon_cancel","section_description","section_time","confirm_recurring","section_recurring","button_recurring","button_recurring_open","button_edit_series","button_edit_occurrence","grid_tab","repeat_radio_day","repeat_radio_week","repeat_radio_month","repeat_radio_year","repeat_radio_day_type","repeat_text_day_count","repeat_radio_day_type2","repeat_week","repeat_text_week_count","repeat_radio_month_type","repeat_radio_month_start","repeat_text_month_day","repeat_text_month_count","repeat_text_month_count2_before","repeat_text_month_count2_after","repeat_year_label","select_year_day2","repeat_text_year_day","select_year_month","repeat_radio_end","repeat_text_occurences_count","repeat_radio_end2","repeat_radio_end3","repeat_never","repeat_daily","repeat_workdays","repeat_weekly","repeat_monthly","repeat_yearly","repeat_custom","repeat_freq_day","repeat_freq_week","repeat_freq_month","repeat_freq_year","repeat_on_date","repeat_ends","month_for_recurring","day_for_recurring","be","agenda_tab","description","year_tab","week_agenda_tab","ca","cn","da","de","en","es","fi","fr","he","hu","it","jp","LocaleManager","_locales","nb","nl","no","pl","pt","ro","ru","si","sk","sv","tr","ua","i18nFactory","DatePicker","modes","currentRange","eventDates","currentModeIndex","onStateChangeHandlers","_domEvents","onStateChange","oldState","newState","_notifyStateChange","newDate","setFullYear","setState","newIndex","backwardArrow","monthLabel","innerText","toLocaleString","startYear","_toggleMode","forwardArrow","_adjustDate","_renderCalendarHeader","dataContainer","_renderDayGrid","_renderMonthGrid","_renderYearGrid","daysOfWeekContainer","currentDate","labelFormat","dayElement","currWeek","minWeeks","minSchedulerDate","maxSchedulerDate","eventDaysTable","reduce","dayStart","_renderDayGridHeader","firstDate","monthStart","monthEnd","lastDate","currentCalDate","_weeksBetween","dayGridContainer","dateCell","wrapper","months","formatLabel","monthElement","doneArea","doneBtn","yearElement","factoryMethod","extensionManager","stateProvider","common_errors","schedulerCore","wai_aria","dom","_createDatePicker","_getFocusableNodes","_locate_css","messageApi","event_highlight","dhtmlx_suite_hooks","skins","jquery","dataProcessorExtend","connector","i18n","addLocale","setLocale","localeObject","getLocale","dhx_save_btn","dhx_cancel_btn","dhx_delete_btn","addPlugins","ext","activePlugins","plugins","extensionList","getExtensionList","treetimeline","daytimeline","outerdrag","legacy","plugin","getExtension","dependencies","priorities","extension","dep","dependencyName","orderA","orderB","ExtensionsManager","_extensions","SchedulerFactory","extensions","_seed","_schedulerPlugins","_bundledExtensions","_extensionsManager","initConfig","_internal_id","$syncFactory","_initFromConfig","calendars","addCalendar","active_links","active_link_view","_active_link_click","s_d","do_wrapper","fullname","week_x","d_s","agenda_legacy","add_agenda_legacy","agenda_legacy_time","agenda_legacy_text","agenda_legacy_date","agenda_legacy_start","old_dblclick_dhx_cal_data","dblclick_dhx_cal_data","fill_agenda_tab","old_render_view_data","_agendaScrollTop","set_full_view","l","rowAttr","dateHeader","descriptionHeader","tableAttr","ev_class","agendaDetailsButtonAttr","agenda_time","agenda_text","agenda_area","v_border","dateElement","agenda_date","agenda_legacy_view","agenda_start","agenda_end","agenda_view","add_agenda","dayDateToStr","dayDowToStr","agenda_day","eventsInDays","anyEvents","renderEmptyView","renderDay","calendarEvent","renderOneEvent","selectedId","bg","all_timed_month","is_event_short","_safe_copy","proto","event_pid","isPrototypeOf","event_length","old_prerender_events_line","old_prerender_events_table","prerender_events","ce","_virtual","isOvernightEvent","getNextDay","setDateTime","event_changed","re","redraw","next_day","old_get_visible_events","old_mode","old_date","oldUpdate","fullRedrawNeeded","collision","temp_section","before","collision_limit","_setTempSection","event_id","checked_mode","checkCollision","edited_ev","rrule","recurring_event_id","_roll_back_dates","_check_sections_collision","second","evs_dates","getRecDates","tevs","concurrent","_pid_time","single","container_autoresize","month_day_min_height","min_grid_size","min_map_size","old_pre_render_event","active","total_height","multiday_height","evl","_h_fix","navHeight","headerHeight","checked_divs","updateContainterHeight","is_repaint","checked_div","maxHeight","rows_length","year_y","week_agenda_scale_height","cur_height","eventsContainer","g","_gridView","y_unit","getSectionHeight","scrollWidth","getScrollSize","callUpdate","conditionalUpdateContainerHeight","asyncRepaint","requestAnimationFrame","autosizeEnabled","$original_scroll_width","$original_section_autoheight","section_autoheight","cookie","setCookie","cookie_param","getCookie","getCookieName","_get_url_nav","urlNavigationPlugin","schedulerCookie","unescape","newMode","old_load","notImplemented","daytimeline_restricted","drag_between_restricted","editors","cached_options","resetCombo","_combo","DOMParent","combo","unload","DOMelem","dhx_globalImgPath","image_path","dhtmlXCombo","options_height","setOptionHeight","enableFilteringMode","filtering","script_path","all_options","single_option","addOption","getIndexByValue","selectOption","selected_id","disable","setComboValue","getSelectedValue","getSelectedText","vertical","radiobuttons","checked_value","isChecked","check_html","label_html","checkbox","unchecked_value","expand","fullscreen","toggleIcon","_position","_width","_height","_overflow","overflow","_maximize","collapse","directions","prev_margin","grid_view","html_templates","all","keyboard_shortcuts","$keyboardNavigation","shortcuts","createCommand","modifiers","alt","ctrl","meta","shortcut","commands","expr","getExpressions","words","getWords","command","commandKeys","specialKeys","charCodeAt","getCommandFromEvent","domEvent","altKey","ctrlKey","metaKey","printableKey","fromCharCode","getHashFromEvent","getHash","parts","junctionChar","term","combinationChar","backspace","enter","esc","space","up","down","home","pageup","pagedown","insert","plus","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10","f11","f12","eventhandler","EventHandler","_handlers","findHandler","doAction","unbind","bindAll","initKeys","trap_modal_focus","trapFocus","currentFocus","currentIndex","nextIndex","nextItem","renderMultiple","currentStart","currentEnd","TimeSlot","_modes","_getMode","renderVerticalMarker","renderTimelineMarker","renderYearMarker","renderMonthMarker","weekAgenda","renderWeekAgendaMarker","renderAgendaMarker","dayColumns","addWaiAriaLabel","addDataAttributes","dateToStr","dateTimeLabel","sectionObject","markerDate","_wrapDiv","_get_year_cell","opacity","view_opts","round_position","_trace_x","_is_column_visible","start_pos","end_pos","set_date_part","_timeline_getX","tempStart","tempEnd","_section_height","_isRender","renderMonthCell","weekNumber","dayIndex","datatable","lineHeight","scheduler_node","SchedulerNode","_compose","getDefaultNode","getMode","blur","enable","removeAttribute","_compareEvents","_pickEvent","startId","eventElement","Event","getNode","nextEventHandler","activeNode","dispatcher","nextEvent","currEvent","visibleDates","nextEv","setActiveNode","prevEventHandler","HeaderCell","getNodes","_key_nav_copy_paste","nav_node","KeyNavNode","moveTo","compareTo","canStringifyThis","canStringifyThat","header_cell","defaultCell","_getSection","_getNodes","defaultElement","isScrolledIntoView","eventBox","viewPort","idSelector","inlineEditor","getInlineEditor","isMultisectionEvent","keepScrollPosition","_moveToSlot","slot","nextSlot","time_slot","movingDate","getDefaultDate","key_nav_step","_getDefaultSection","visibleTime","nowTime","showNowTime","findVisibleColumn","clone","timeslot","_getMultisectionView","_getNextSection","isInRange","defaultSlot","DataArea","smart_rendering","_pasteDate","_pasteSection","addMonthDate","nextMonthSlot","_alignTimeSlot","nextTimelineSlot","newPos","nextUnitsSlot","optionsCount","nextDaySlot","_moveDate","isBeforeLastHour","isStartDate","minutes","isAfterFirstHour","isInVisibleDayTime","oldStart","toNextDay","testEnd","nextWeekAgendaSlot","nextAgendaSlot","isDateVisible","nextDateColumn","current","tempSlot","extendSlot","extendUnitsSlot","extendTimelineSlot","extendMonthSlot","extendDaySlot","extendWeekAgendaSlot","extendGenericSlot","allowedDirections","moveDate","newDates","extendSlotDates","oldSlot","newSlot","dateDirection","scrollSlot","minical_button","MinicalButton","globalNode","MinicalCell","minical_cell","_getGrid","_getNode","enabled","newRow","newCol","modals","modalsStack","isModal","afterPopup","startModal","endModal","isTopModal","currentTarget","traceLightbox","_keyNavMessagePopup","focusElement","backupFocus","core","getActiveNode","setDefaultNode","focusGlobalNode","blurNode","editor","keyDownHandler","defaultPrevented","schedulerNode","_timeout","key_nav_legacy","_temp_key_scope","key_nav","isCopy","trackMousePosition","mousePointer","keyNavPointer","elementFromPoint","clear_event_after","copyEvent","_make_pasted_event","_do_paste","is_copy","modified_ev","original_ev","_is_key_nav_active","getSelectedEvent","_buffer_event","new_ev","scheduler_handlers","attachSchedulerHandlers","focusHandler","waitCall","reFocusActiveNode","mousedownHandler","dataAreaClick","listOfScales","arrOfScales","some","focusEvent","evNode","prevState","lastStart","lastEnd","lastSection","minical_handlers","_minicalendars","isMinical","minicalendars","patchMinicalendar","focusMinical","minicalClick","rowIndex","td","renderMinical","cal","added","destroyMinical","_def_count","addShortcut","scope","scopeObject","getScope","getShortcutHandler","removeShortcut","disp","scopes","minicalButton","minicalDate","timeSlot","searchMap","attachOnce","isSchedulerSelected","changeState","layer","layers","validId","_clearUpdateFlag","_cloneObj","_dataprocessors","_layers_zindex","initial_layer_zindex","isDefault","defaultLayer","showLayer","tlayer","toggleLayer","hideLayer","visible","getLayer","layer_name","native_event_object","noMenu","_evs_layer","_t_render_view_data","evs_layer","borderBox","borderBoxWidth","headerWidth","bodyWidth","footerWidth","bodyHeight","new_zIndex","filter_agenda","limit_view","_temp_limit_scope","om","od","nm","nd","isBlocked","date_end","resetDate","is_new_event","data_copy","native_object","_mark_now_timer","GoogleMapAdapter","_markers","zoom","zoom_after_resolve","initial_zoom","lat","lng","setCenter","setZoom","error_position","google","maps","trigger","mapOptions","center","initial_position","mapId","scrollwheel","mapTypeId","Map","__gm","messageOverlay","outerContainer","setOptions","addListener","geocoder","Geocoder","point","latLng","geocode","results","GeocoderStatus","OK","geometry","location","event_location","formatted_address","clearInstanceListeners","addEventMarker","AdvancedMarkerElement","importLibrary","mapView","createMarker","setMap","infoWindow","close","InfoWindow","maxWidth","info_window_max_width","setContent","map_info_content","anchor","markerInfo","setVisible","setPosition","latlng","LatLng","latitude","longitude","resolveAddress","string","address","OpenStreetMapAdapter","openPopup","closeTooltip","setView","mapWrapper","L","tileLayer","addTo","on","fetch","country","myIcon","iconUrl","iconSize","shadowSize","iconAnchor","shadowAnchor","popupConfig","minWidth","markerPopup","popup","tooltip","markerConfig","bindPopup","bindTooltip","removeLayer","setLatLng","clearEventMarkers","lon","MapboxAdapter","getPopup","isOpen","togglePopup","mapboxgl","accessToken","lngLat","features","place_name","Popup","focusAfterOpen","setMaxWidth","setHTML","Marker","setLngLat","setPopup","map_view","mapAdapter","eventHandlerIds","adapters","googleMap","openStreetMaps","mapbox","createAdapter","map_view_provider","currentAdapter","_latLngUpdate","_eventLocationChanged","map_settings","resolve_user_location","resolve_event_location","view_provider","map_initial_position","map_error_position","map_date_width","map_icon_width","map_description_width","add_map","map_date","map_time","map_text","map_start","setupMapView","attachSchedulerEvents","addEventWithLocation","coordinates","removeEventMarker","setUserLocation","adapter","geolocation","getCurrentPosition","coords","dblclick_dhx_map_area","unmodifiedEvent","updateEventMarker","newIdEvent","onEventClick","detachSchedulerEvents","map_initial_zoom","map_zoom_after_resolve","map_infowindow_max_width","map_resolve_user_location","map_type","map_resolve_event_location","fill_map_tab","map_end","mapContainer","_setMapSize","destroy","initialize","elem_id","marginRight","marginTop","_selected_event_id","ariaButtonAttr","_updateEventLocation","_delay","ret","_event_resolve_delay","minical","minicalDomEvents","minicalendar","mark_events","_synced_minicalendars","_prev","is_refresh","cont","tpos","_get_def_cont","_render_calendar","$dom","cellRoot","dateAttribute","unmarkCalendar","markCalendar","_last_date","conf","markedDates","_markCalendarCurrentDate","sync","_on_xle_handler","refreshOnLoad","updateCalendar","_created","_locateCalendar","weekNum","dat","dayCell","_week_template","week_template","dummy_date","_mini_cal_arrows","previous","ts","temp2","temp3","temp4","temp5","temp6","temp7","temp8","padding","weekHeader","move_minicalendar_date","css_classnames","css_texts","diffs","arrow","dayHeaders","dayCells","inputs","selects","inp","number","new_date","_update_minical_select","isFulldayEvent","_attach_action","_round_minutes","linkCalendar","datediff","dateNew","month_end","noHighlight","monthheight","old_s","multisection_restricted","multiselect","parseXMLOptions","parseJSONOptions","_result","_children","_mark_inputs","_ids","delimiter","script_url","divLoading","multisource","backup","mvc","use_id","sanitize","update_timer","_start_ext_load","_finish_ext_load","_get_id","model","cid","backbone","toJSON","changes","queue","add_from_queue","Backbone","Collection","dragger","dhtmlDragAndDropObject","stopDrag","last_event","on_drop","sourceHtmlObject","dhtmlObject","targetHtmlObject","targetHtml","action_data","event_data","view_options","_locate_cell_timeline","addDragLanding","_drag","_dragIn","shtmlObject","_dragOut","DragControl","addDrop","onDrop","sourceDhtmlx","getMaster","onDragIn","pdf","html_regexp","newline_regexp","clean_html","x_norm","parseFloat","colsWidth","x_norm_event","is_left","dhx_cal_header","y_norm","get_style","de_day","de_week","xml_start","xml_end","xml_top","profile","footer","xml_body_header","dhx_cal_date","xh","xml_month_scale","xml_month","yh","xhs","second_scale","top_width","top_col","xml_body","colors","week_starts","_month","text_color","zx","zdx","left_norm","zy","zdy","e_type","dets","week","dy_copy","toXML","original_date","original_mode","temp_date","getPDFData","send_xml","submit","to_pdf","schedulersToPdf","objects","toPDF","toPDFRange","quick_info","show_quick_info","clickedElementPosition","_$quickInfoHandler","getPositionInsideScheduler","showQuickInfo","hiding_function","hideQuickInfo","quick_info_title","quick_info_content","quick_info_date","_quick_info_box_id","_get_event_counter_part","_quick_info_box","_init_quick_info","_fill_quick_data","_show_quick_info","cssTimeToMs","milliseconds","forced","qi","_x_scroll","dataPos","ontransitionend","fitQIInsideWindow","quickInfoPopup","popupRect","containerRect","offsetBottom","_quick_info_onscroll_handler","$testmode","_qi_button_click","domEv","titleContent","titleDate","main","mainContent","originalRecurringSetValue","original_left_buttons","original_right_buttons","readonly_form","forbidden_buttons","button_arrays","forbidden_button","button_array","txt_replace","txts","txtt","originalForm","readonlyForm","_lightbox_r","ALL_WEEKDAYS","Weekday","weekday","fromStr","nth","other","getJsWeekday","isPresent","isNumber","isWeekdayStr","includes","rang","repeat","times","toArray","padStart","targetLength","padString","sep","splits","pymod","divmod","mod","empty","notEmpty","datetime","MONTH_DAYS","ONE_DAY","MAXYEAR","ORDINAL_BASE","PY_WEEKDAYS","isLeapYear","isValidDate","daysBetween","date1","date2","date1ms","date2ms","differencems","toOrdinal","fromOrdinal","ordinal","getMonthDays","getWeekday","monthRange","combine","getMilliseconds","dolly","cloneDates","clones","timeToUntilString","untilStringToDate","until","bits","dateTZtoISO8601","timeZone","dateStr","dateInTimeZone","localTimeZone","Intl","DateTimeFormat","resolvedOptions","dateInLocalTZ","dateInTargetTZ","tzOffset","IterResult","after","accept","tooEarly","tooLate","extendStatics","setPrototypeOf","__proto__","__extends","TypeError","__","__assign","assign","__spreadArray","pack","SuppressedError","suppressed","CallbackIterResult","_super","iterator","_this","ENGLISH","dayNames","monthNames","tokens","SKIP","numberAsText","every","at","the","third","for","monday","tuesday","wednesday","thursday","friday","saturday","sunday","january","february","march","april","may","june","july","august","september","october","november","december","comma","defaultGetText","defaultDateFormatter","ToText","gettext","language","dateFormatter","origOptions","bymonthday","bynmonthday","byweekday","allWeeks","someWeeks","isWeekdays","isEveryDay","sortWeekDays","isFullyConvertible","canConvert","freq","IMPLEMENTED","RRule","FREQUENCIES","plural","HOURLY","MINUTELY","DAILY","bymonth","_bymonth","_bymonthday","_byweekday","byhour","_byhour","WEEKLY","MONTHLY","YEARLY","byyearday","byweekno","weekdaytext","monthtext","npos","wday","finalDelim","delim","delimJoin","finalDelimiter","o","realCallback","Parser","rules","done","nextSymbol","isDone","symbol","best","bestSymbol","rule","name_1","v","acceptNumber","expect","parseText","ttr","S","AT","F","MO","TU","WE","TH","FR","ON","wkd","decodeWKD","MDAYs","decodeM","decodeNTH","Frequency","freqIsDailyOrGreater","fromText","toText","Time","millisecond","DateTime","fromDate","getYear","addYears","years","addMonths","yearDiv","monthMod","addWeekly","wkst","fixDay","addDaily","addHours","filtered","_a","dayDiv","hourMod","addMinutes","byminute","hourDiv","minuteMod","addSeconds","seconds","bysecond","minuteDiv","secondMod","daysinmonth","SECONDLY","initializeOptions","_i","keys_1","defaultKeys","parseOptions","DEFAULT_OPTIONS","byeaster","dtstart","bysetpos","bynweekday","parsedOptions","buildTimeset","millisecondModulo","timeset","parseString","rfcString","parseLine","parseDtstart","line","dtstartWithZone","tzid","parseRrule","strippedLine","Days","parseNumber","optionKey","parseWeekday","parseIndividualNumber","SyntaxError","wdaypart","DateWithZone","RangeError","defineProperty","enumerable","configurable","isUTC","rezonedDate","optionsToString","outValue","buildDtstart","strValues","ruleString","argsMatch","Cache","between","_cacheAdd","what","_value","_cacheGet","cached","argsKeys","findCacheDiff","cachedObject","iterResult","M365MASK","M366MASK","M28","M29","M30","M31","MDAY366MASK","MDAY365MASK","NM28","NM29","NM30","NM31","NMDAY366MASK","NMDAY365MASK","M366RANGE","M365RANGE","WDAYMASK","wdaymask","rebuildYear","firstyday","yearlen","nextyearlen","yearordinal","yearweekday","baseYearMasks","wnomask","firstwkst","wyearlen","no1wkst","numweeks","lnumweeks","lyearweekday","lno1wkst","lyearlen","weekst","mmask","mdaymask","nmdaymask","mrange","rebuildMonth","lastyear","lastmonth","nwdaymask","ranges","easter","yearStart","Iterinfo","rebuild","yearinfo","monthinfo","eastermask","ydayset","mdayset","_","wdayset","ddayset","htimeset","mtimeset","stimeset","getdayset","gettimeset","buildPoslist","ii","dayset","poslist","daypos","timepos","tmp","iter","emitResult","counterDate","makeTimeset","removeFilteredDays","rezoneIfNeeded","currentDay","isFiltered","dayCounter","SA","SU","noCache","_cache","fromString","_iter","isFullyConvertibleToText","iterSet","_rrule","_exrule","_rdate","_exdate","_exdateHash","_accept","evalExdate","zonedDate","unfold","forceset","compatible","parseInput","rrulevals","rdatevals","exrulevals","exdatevals","parsedDtstart","lines","splitIntoLines","_b","breakDownLine","parms","_c","rdateTzid","parseRDate","buildRule","rset_1","RRuleSet","groomRruleOptions","rdate","exrule","exdate","rrulestr","extractName","validateDateParm","parm","rdateval","createGetterSetter","fieldName","field","field_1","_addRule","_addDate","rrules","exrules","rdates","exdates","_dtstart","rdatesToString","rrs","clearMilliseconds","isDeletedOccurrence","isSeries","clearRecurringProperties","original_start","createException","nid","nev","_rec_temp","_rec_markers_pull","_rec_markers","_get_rec_marker","ch","_get_rec_markers","old_add_event","ev_id","_ignore_call","tev","_pid_changed","deleteEventFromSeries","idTimestamp","_is_modified_occurence","sub","isEventFound","_start_date","showLightbox_rec","lightbox_recurring","pid","isVirtual","showSeries","title_confirm_recurring","groupExceptions","exceptions","get_visible_events_rec","repeat_date","old_update_event","toIcalString","non_render","maxCount","seriesExceptions","utcStart","parsedRRule","utcTo","repeatedDates","adjustedDate","visibleCount","eventDuration","exception","_fix_daylight_saving_date","recurrings","sev","occurence","include_end_by","recurring_workdays","getTopLevelOption","rruleObj","untilDate","hasEndCondition","getWeekdayOfMonth","dayOfWeek","dayOfMonth","dayNumber","jsDaysToRRULEDays","RruleDayNumsToJs","fillCustomDaily","fillCustomWeekly","dayCheckboxes","dayNum","dayLabel","fillCustomMonthly","dateOfMonth","nthWeekDayOfMonth","repeat_monthly_date","repeat_monthly_weekday","formatDayNumber","nthDayOfMonth","repeat_yearly_month_date","repeat_yearly_month_weekday","fillCustomYearly","dateOfYear","nthWeekDayOfYear","fillEndRule","countInput","ondateInput","endOptionSelect","formatter","repeat_date_of_end","dispatchEvent","getRecValue","WORKDAYS","CUSTOM","monthRepeat","yearRepeat","formatFunc","endRule","NEVER","fillInDefaults","rec","_get_node","_outer_html","loc","_init_set_value","_ds","show","onRepeatOptionChange","onCustomRepeatIntervalChange","weekly","monthly","yearly","onCustomRepeatEndRule","_rec_init_done","rf","blocked","rruleset","topOption","customFreq","actual_dates","timeControl","getTimeSection","recurrence","_start","getFirstSectionOfType","recurring_legacy","occurrence_timestamp_in_utc","outerHTML","getOuterHTML","_get_form_node","_get_node_value","_get_node_numeric_value","_set_node_value","hash_value","str_date_format","str_date","date_str","register_els","inps","change_current_view","get_repeat_code","get_rcode","get_end_rule","transpose_type","transp","set_end_rule","has_values","_get_repeat_code","get_numeric_value","repeat_precise","start_exists","transpose_day_week","set_rcode","set_repeat_code","MouseEvent","_set_repeat_code","elements","_toggle_block","_get_button","getRecurringSection","_get_form","backgroundPosition","transponse_size","day_week","originalMonth","cday","newMonth","cor","cor2","transposeRecurring","recurringParts","dayDurationMs","addRecurring","recurringStepDays","weekDays","seriesInstance","currentCount","origMonth","origYear","correctOverflowInstances","recurring_overflow_instances","startHour","ted","data_attributes","all_events","_serialize_json_value","toICal","full_day_format","timeline_restricted","Tooltip","_scheduler","_tooltipNode","_root","_isLikeMouseEvent","_calculateTooltipPosition","viewport","_getViewPortSize","tooltipNode","offsetX","tooltip_offset_x","offsetY","tooltip_offset_y","mouse","containerPos","scrollY","_getViewPort","scrollX","$event_data","$event","TooltipManager","_listeners","_initDelayedFunctions","delayHide","watchableTarget","eventTarget","targetNode","doOnMouseEnter","onmouseenter","touch_tooltip","onmouseleave","onmousemove","listener","cloneDomEvent","delayShow","utils.default","tooltip_timeout","tooltip_hide_timeout","tooltipManager","tooltips","tooltipFor","targetEventId","hideTooltip","treetimeline_restricted","units_restricted","s2d","d2s","select_event","week_agenda_restricted","wp","year_view","year_date","year_month","year_scale_date","year_tooltip","isYearMode","getCellDate","dblclick_dhx_year_grid","_year_render_event","_year_marked_cells","_hideToolTip","_tooltip","_showToolTip","_year_view_tooltip_handler","_init_year_tooltip","_mark_year_date","_unmark_year_date","_reset_year_scale","year_top","ssd","yearBox","year_x","datepicker","locateEvent","export_api","std","getElementSizes","sizes","dhtmlxAjax","dhx4","add_export_methods","orientation","dpi","_export_html","_send_to_export","exportToICal","_serialize_plain","exportToExcel","_serialize_columns","_ajax_to_export","server","fail","_plain_export_copy","$text","_create_hidden_form","_hidden_export_form","_get_export_size","A5","A4","A3","A2","A1","A0","dataX","dataY","headY","multY","cSize","getTimeline","getInitialSizes","smartRendering","style_width","style_height","timeline_scrollable","timeline_smart_rendering","setExportSizes","initialSizes","setInitialSizes","gplExtensions","drag_between","factory","$dhx"],"mappings":";;;;AACe,WAAAA,aAEf;AAAA,QAAA,OAAWC,UAAU,eAAeA,OAAOC,UAAU;AACpDD,aAAOC,SAASC,kBAAkB,SAAUC,KAAKC,MAAMC,MAAMC,YAC5D;AAAA,YAAID,OAAOA,QAAQ;AACnB,YAAIE,MAAMC,SAASC,cAAc,KAAA;AACjCF,YAAIG,KAAK,iBAAiBC,KAAKC,QAAQ,EAAA;AACvCL,YAAIM,YAAY,cAAcN,IA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vH;AAAAA,YAAAA,WAAU8X;UACV;AAED,iBAAOvU;AAAAA,QACT;AAAA,MAEA;AAEAmqH,yBAAmB1tH,UAAAA;AAAAA,IAGlB,GAED;AAAA,EAAA;AC3Pe,QAAAgwH,gBAAA,EACd3nD,cACAQ,eACA4B,aACA/4C,WACAo7C,WACAoB,sBACAoC,QACA3J,aAAauK,wBACb++C,cAAc9+C,yBACdC,SACAkC,QACA85C,YACAl5C,WACAC,gBACAyP,SACA8D,OACAtvE,OACA44E,UACA+D,SACAiE,aACAvzF,cAAcyzF,yBACdC,aACAU,aACAE,KACAnzB,WACA21B,KACAuD,YACA91E,UACAg/B,WACA07D,kBACAx8E,WACA5sB,UAAUmtG,qBACVj5B,SACA9oB,cAAc2kD,yBACdt2G,OAAOu2G,kBACPvjF,KACAxsB,aAAamwG,wBACbC,IACAC,UAAAA;AC5ED,QAAMsE,UAAU,IAAIzoD,iBAAiBuoD,aAEhC;AAAA,QAAChwH,YAAYkwH,QAAQngE,qBAAAA;AACrB,QAACD,cAAY,EACjBgX,QAAQ9mE,UAAUkjB,KAAKgtG,QAAQppD,QAAQopD;AAGxC5uH,SAAOtB,YAAYA;AACnBsB,SAAOwuD,YAAYA;AAEnB,MAAA,CAAIxuD,OAAO6uH,MAAM;AAChB7uH,WAAO6uH,OAAO;EACf;AAEA7uH,SAAO6uH,KAAKnwH,YAAYA;AACxBsB,SAAO6uH,KAAKrgE,YAAYA;;;;;;","x_google_ignoreList":[126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153]} \ No newline at end of file +{"version":3,"file":"dhtmlxscheduler.js","sources":["../../sources/dhtmlx_hook.js","../../sources/global.js","../../sources/plugins/drag_highlight_pos.js","../../sources/plugins/undo_delete.js","../../sources/plugins/limit.js","../../sources/plugins/batch_update.js","../../sources/plugins/index.js","../../sources/core/utils/utils.js","../../sources/core/state.js","../../sources/core/common/assert.js","../../sources/core/common_errors.js","../../sources/core/connector.js","../../sources/core/nav_bar.js","../../sources/core/scheduler_resize_listener.js","../../sources/utils/eventable.js","../../sources/core/scheduler.js","../../sources/core/utils/event.js","../../sources/core/utils/scoped_event.js","../../sources/core/common.js","../../sources/core/wai_aria.js","../../sources/core/utils/dom_helpers.js","../../sources/utils/env.js","../../sources/core/destructor.js","../../sources/core/common/url_serialize.js","../../sources/core/utils/ajax.js","../../sources/core/base.js","../../sources/core/config.js","../../sources/core/event.js","../../sources/core/event_highlight.js","../../sources/core/loaders/xml.js","../../sources/core/loaders/json.js","../../sources/core/loaders/ical.js","../../sources/core/common/get_serializable_events.js","../../sources/core/load.js","../../sources/core/lightbox.js","../../sources/core/touch.js","../../sources/core/dhtmlx/dhtmlx_suite_hooks.js","../../sources/core/skins.js","../../sources/core/jquery.js","../../sources/core/delay_render.js","../../sources/core/dataprocessor/dataprocessor_hooks.js","../../sources/core/dataprocessor/dataprocessor.js","../../sources/core/message.js","../../sources/locale/locale_ar.js","../../sources/locale/locale_be.js","../../sources/locale/locale_ca.js","../../sources/locale/locale_cn.js","../../sources/locale/locale_cs.js","../../sources/locale/locale_da.js","../../sources/locale/locale_de.js","../../sources/locale/locale_el.js","../../sources/locale/locale_en.js","../../sources/locale/locale_es.js","../../sources/locale/locale_fi.js","../../sources/locale/locale_fr.js","../../sources/locale/locale_he.js","../../sources/locale/locale_hu.js","../../sources/locale/locale_id.js","../../sources/locale/locale_it.js","../../sources/locale/locale_jp.js","../../sources/locale/locale_manager.js","../../sources/locale/locale_nb.js","../../sources/locale/locale_nl.js","../../sources/locale/locale_no.js","../../sources/locale/locale_pl.js","../../sources/locale/locale_pt.js","../../sources/locale/locale_ro.js","../../sources/locale/locale_ru.js","../../sources/locale/locale_si.js","../../sources/locale/locale_sk.js","../../sources/locale/locale_sv.js","../../sources/locale/locale_tr.js","../../sources/locale/locale_ua.js","../../sources/locale/index.js","../../sources/core/datepicker.js","../../sources/scheduler_factory_method.js","../../sources/ext/extension_manager.js","../../sources/scheduler_factory.js","../../sources/ext/active_links.js","../../sources/ext/agenda_legacy_view.js","../../sources/ext/agenda.js","../../sources/ext/all_timed.js","../../sources/ext/collision.js","../../sources/ext/container_autoresize.js","../../sources/ext/cookie.js","../../sources/ext/restricted_extensions/not_implemented_extension.js","../../sources/ext/restricted_extensions/daytimeline.js","../../sources/ext/restricted_extensions/drag_between.js","../../sources/ext/editors.js","../../sources/ext/expand.js","../../sources/ext/restricted_extensions/grid_view.js","../../sources/ext/html_templates.js","../../sources/ext/keyboard_navigation/common/keyboard_shortcuts.js","../../sources/ext/keyboard_navigation/common/eventhandler.js","../../sources/ext/keyboard_navigation/common/trap_modal_focus.js","../../sources/ext/keyboard_navigation/marker.js","../../sources/ext/keyboard_navigation/elements/scheduler_node.js","../../sources/ext/keyboard_navigation/elements/nav_node.js","../../sources/ext/keyboard_navigation/elements/header_cell.js","../../sources/ext/keyboard_navigation/elements/event.js","../../sources/ext/keyboard_navigation/elements/time_slot.js","../../sources/ext/keyboard_navigation/elements/minical_button.js","../../sources/ext/keyboard_navigation/elements/minical_cell.js","../../sources/ext/keyboard_navigation/elements/data_area.js","../../sources/ext/keyboard_navigation/modals.js","../../sources/ext/keyboard_navigation/core.js","../../sources/ext/keyboard_navigation/key_nav_legacy.js","../../sources/ext/keyboard_navigation/scheduler_handlers.js","../../sources/ext/keyboard_navigation/minical_handlers.js","../../sources/ext/key_nav.js","../../sources/ext/layer.js","../../sources/ext/limit.js","../../sources/ext/map_view/gMapAdapter.ts","../../sources/ext/map_view/osmMapAdapter.ts","../../sources/ext/map_view/mapboxAdapter.ts","../../sources/ext/map_view/index.ts","../../sources/ext/minical.js","../../sources/ext/monthheight.js","../../sources/ext/restricted_extensions/multisection.js","../../sources/ext/multiselect.js","../../sources/ext/multisource.js","../../sources/ext/mvc.js","../../sources/ext/outerdrag.js","../../sources/ext/pdf.js","../../sources/ext/quick_info.js","../../sources/ext/readonly.js","../../node_modules/rrule/dist/esm/weekday.js","../../node_modules/rrule/dist/esm/helpers.js","../../node_modules/rrule/dist/esm/dateutil.js","../../node_modules/rrule/dist/esm/iterresult.js","../../node_modules/rrule/node_modules/tslib/tslib.es6.mjs","../../node_modules/rrule/dist/esm/callbackiterresult.js","../../node_modules/rrule/dist/esm/nlp/i18n.js","../../node_modules/rrule/dist/esm/nlp/totext.js","../../node_modules/rrule/dist/esm/nlp/parsetext.js","../../node_modules/rrule/dist/esm/types.js","../../node_modules/rrule/dist/esm/nlp/index.js","../../node_modules/rrule/dist/esm/datetime.js","../../node_modules/rrule/dist/esm/parseoptions.js","../../node_modules/rrule/dist/esm/parsestring.js","../../node_modules/rrule/dist/esm/datewithzone.js","../../node_modules/rrule/dist/esm/optionstostring.js","../../node_modules/rrule/dist/esm/cache.js","../../node_modules/rrule/dist/esm/masks.js","../../node_modules/rrule/dist/esm/iterinfo/yearinfo.js","../../node_modules/rrule/dist/esm/iterinfo/monthinfo.js","../../node_modules/rrule/dist/esm/iterinfo/easter.js","../../node_modules/rrule/dist/esm/iterinfo/index.js","../../node_modules/rrule/dist/esm/iter/poslist.js","../../node_modules/rrule/dist/esm/iter/index.js","../../node_modules/rrule/dist/esm/rrule.js","../../node_modules/rrule/dist/esm/iterset.js","../../node_modules/rrule/dist/esm/rrulestr.js","../../node_modules/rrule/dist/esm/rruleset.js","../../sources/ext/recurring.js","../../sources/ext/recurring_legacy.js","../../sources/ext/serialize.js","../../sources/ext/restricted_extensions/timeline.js","../../sources/ext/tooltip/tooltip.ts","../../sources/ext/tooltip/tooltipManager.ts","../../sources/ext/tooltip/index.ts","../../sources/ext/restricted_extensions/treetimeline.js","../../sources/ext/restricted_extensions/units.js","../../sources/ext/url.js","../../sources/ext/restricted_extensions/week_agenda.js","../../sources/ext/wp.js","../../sources/ext/year_view.js","../../sources/ext/export_api/index.js","../../sources/ext/extensions_gpl.js","../../sources/dhtmlxscheduler.gpl.js"],"sourcesContent":["\r\nexport default function(){\r\n/* global dhtmlx */\r\nif (typeof dhtmlx != \"undefined\" && dhtmlx.attaches) {\r\n\tdhtmlx.attaches.attachScheduler = function (day, mode, tabs, scheduler) {\r\n\t\tvar tabs = tabs || '
';\r\n\t\tvar obj = document.createElement(\"DIV\");\r\n\t\tobj.id = \"dhxSchedObj_\" + this._genStr(12);\r\n\t\tobj.innerHTML = '
' + tabs + '
';\r\n\t\tdocument.body.appendChild(obj.firstChild);\r\n\r\n\t\tthis.attachObject(obj.id, false, true);\r\n\r\n\t\tthis.vs[this.av].sched = scheduler;\r\n\t\tthis.vs[this.av].schedId = obj.id;\r\n\t\tscheduler.setSizes = scheduler.updateView;\r\n\t\tscheduler.destructor = function () { };\r\n\t\tscheduler.init(obj.id, day, mode);\r\n\r\n\t\treturn this.vs[this._viewRestore()].sched;\r\n\t};\r\n}\r\n\r\n}","\r\n/* eslint-disable no-restricted-globals */\r\nvar globalScope;\r\nif(typeof window !== \"undefined\"){\r\n\tglobalScope = window;\r\n}else{\r\n\tglobalScope = global;\r\n}\r\n/* eslint-enable no-restricted-globals */\r\n\r\nexport default globalScope;","export default function dragHighlightPos(scheduler){\r\n let dndMarkers = [];\r\n let dragStarted = false;\r\n let eventNode = null;\r\n let event = null;\r\n\r\n function isEnabled() { \r\n return scheduler.config.drag_highlight && scheduler.markTimespan;\r\n }\r\n\r\n function checkViewName(viewName){\r\n const viewObj = scheduler.getView(viewName);\r\n if(viewObj){\r\n return viewObj.layout;\r\n }\r\n return viewName;\r\n }\r\n\r\n function checkSectionPropertyName(viewName){\r\n const viewObj = scheduler.getView(viewName);\r\n if(viewObj.y_property){\r\n return viewObj.y_property;\r\n }\r\n if(viewObj.map_to){\r\n return viewObj.map_to;\r\n }\r\n }\r\n\r\n function setRequiredStylesToMarker(eventNode, layout){\r\n switch (layout) {\r\n case \"month\":\r\n eventNode.style.top = \"\";\r\n eventNode.style.left = \"\";\r\n break;\r\n case \"timeline\":\r\n eventNode.style.left = \"\";\r\n eventNode.style.marginLeft = \"1px\";\r\n break;\r\n default:\r\n eventNode.style.top = \"\";\r\n break;\r\n }\r\n }\r\n \r\n function createMarkerConfig(configSettings){\r\n const { event, layout, viewName, sectionId, eventNode } = configSettings;\r\n setRequiredStylesToMarker(eventNode, layout);\r\n const sections = {};\r\n let markerObject = {\r\n start_date: event.start_date,\r\n end_date: event.end_date,\r\n css: \"dhx_scheduler_dnd_marker\",\r\n html: eventNode\r\n };\r\n if (layout == \"timeline\" || layout == \"month\" ){\r\n // we need to set end date less than 24 hours of the views to avoid receiving multiple marktimespans\r\n markerObject = {...markerObject, end_date: scheduler.date.add(event.start_date, 1, 'minute')};\r\n }\r\n if (sectionId){\r\n sections[viewName] = sectionId;\r\n markerObject.sections = sections;\r\n }\r\n return markerObject;\r\n }\r\n\r\n function createViewMarker(settings){\r\n const { layout } = settings;\r\n let markerConfigs;\r\n switch (layout) {\r\n case \"month\": \r\n markerConfigs = getMonthViewMarkers(settings);\r\n break;\r\n case 'timeline':\r\n case 'units':\r\n markerConfigs = getTimelineAndUnitsViewMarkers(settings);\r\n break;\r\n default: \r\n markerConfigs = getColumnViewMarkers(settings);\r\n break;\r\n }\r\n markerConfigs.forEach((cfg) => {\r\n dndMarkers.push(scheduler.markTimespan(cfg));\r\n });\r\n }\r\n\r\n function getColumnViewMarkers(settings){\r\n const {event, layout, viewName, sectionId} = settings;\r\n let columnViewMarkersArray = [];\r\n let eventNodes = scheduler.$container.querySelectorAll(`[${scheduler.config.event_attribute}='${event.id}']:not(.dhx_cal_select_menu):not(.dhx_drag_marker)`);\r\n if(eventNodes){\r\n for (let i = 0; i < eventNodes.length; i++) {\r\n let eventNodeClone = eventNodes[i].cloneNode(true);\r\n let startDate = new Date(+eventNodeClone.getAttribute(\"data-bar-start\"));\r\n let endDate = new Date(+eventNodeClone.getAttribute(\"data-bar-end\"));\r\n let dates = {start_date: startDate, end_date: endDate};\r\n const configSettings = {\r\n event: dates, \r\n layout, \r\n viewName, \r\n sectionId, \r\n eventNode:eventNodeClone\r\n };\r\n columnViewMarkersArray.push(createMarkerConfig(configSettings));\r\n }\t\r\n }\r\n return columnViewMarkersArray;\r\n }\r\n\r\n function getMonthViewMarkers(settings){\r\n let monthViewMarkersArray = [];\r\n const {event, layout, viewName, sectionId} = settings;\r\n const weekDates = [];\r\n let currDate = new Date(event.start_date);\r\n while(currDate.valueOf() < event.end_date.valueOf()){\r\n let obj = {start_date: currDate};\r\n weekDates.push(obj);\r\n currDate = scheduler.date.week_start(scheduler.date.add(currDate, 1, \"week\"));\r\n }\r\n let cells = scheduler.$container.querySelectorAll(`[${scheduler.config.event_attribute}='${event.id}']`);\r\n for (let i = 0; i < cells.length; i++) {\r\n const configSettings = {\r\n event: weekDates[i], \r\n layout, \r\n viewName, \r\n sectionId, \r\n eventNode: cells[i].cloneNode(true)\r\n };\r\n monthViewMarkersArray.push(createMarkerConfig(configSettings));\r\n }\r\n return monthViewMarkersArray;\r\n }\r\n\r\n function getTimelineAndUnitsViewMarkers(settings){\r\n let unitMarkersArray = [];\r\n const {event, layout, viewName, eventNode} = settings;\r\n let sectionPropertyName = checkSectionPropertyName(viewName);\r\n if (sectionPropertyName){\r\n const sections = String(event[sectionPropertyName]).split(scheduler.config.section_delimiter);\r\n const formatedSections = sections.map(element => String(element));\r\n const elems = [];\r\n for (let i = 0; i < formatedSections.length; i++) {\r\n elems[i] = eventNode.cloneNode(true);\r\n const configSettings = {\r\n event, \r\n layout, \r\n viewName, \r\n sectionId: formatedSections[i],\r\n eventNode: elems[i]\r\n };\r\n unitMarkersArray.push(createMarkerConfig(configSettings));\r\n }\r\n }\r\n return unitMarkersArray;\r\n }\r\n \r\n scheduler.attachEvent(\"onBeforeDrag\", function (id, mode, e){\r\n if (isEnabled()) {\r\n dragStarted = true;\r\n event = scheduler.getEvent(id);\r\n eventNode = e.target.closest(`[${scheduler.config.event_attribute}]`);\r\n const viewName = scheduler.getState().mode;\r\n const layout = checkViewName(viewName);\r\n // to avoid incorrect eventNode and marker creation when scheduler.config.cascade_event_display included\r\n if (layout == \"units\" && scheduler.config.cascade_event_display ) {\r\n scheduler.unselect(id);\r\n eventNode = e.target.closest(`[${scheduler.config.event_attribute}]`);\r\n }\r\n }\r\n return true;\r\n });\r\n\r\n scheduler.attachEvent(\"onEventDrag\", function (id, mode, e){\r\n if(dragStarted && isEnabled()){\r\n dragStarted = false;// insert element only once after dnd start\r\n const viewName = scheduler.getState().mode;\r\n const layout = checkViewName(viewName);\r\n const sectionId = scheduler.getActionData(e).section;\r\n if (event) {\r\n const settings = {\r\n event, \r\n layout, \r\n viewName, \r\n sectionId, \r\n eventNode\r\n };\r\n createViewMarker(settings);\r\n }\r\n }\r\n });\r\n\r\n scheduler.attachEvent(\"onDragEnd\", function(id, mode, e){\r\n for (let i = 0; i < dndMarkers.length; i++) {\r\n scheduler.unmarkTimespan(dndMarkers[i]);\r\n }\r\n dndMarkers = [];\r\n eventNode = null;\r\n event = null;\r\n });\r\n}","export default function undoDelete(scheduler) {\r\n\tscheduler.attachEvent(\"onEventDeleted\", function (id, ev) {\r\n\t\tlet deletedEvent = scheduler.copy(ev);\r\n\t\tif (scheduler.config.undo_deleted && !scheduler.getState().new_event) {\r\n\t\t\tscheduler.message({\r\n\t\t\t\ttext: `
\r\n Event deleted\r\n \r\n
`,\r\n\t\t\t\texpire: 10000,\r\n\t\t\t\ttype: \"popup_after_delete\",\r\n\t\t\t\tcallback: function (e) {\r\n\t\t\t\t\tlet undoBtn = e.target.closest(\r\n\t\t\t\t\t\t`[data-deleted-event-id=\"${ev.id}\"]`\r\n\t\t\t\t\t);\r\n\t\t\t\t\tif (undoBtn) {\r\n\t\t\t\t\t\tscheduler.addEvent(deletedEvent);\r\n\t\t\t\t\t\tscheduler.render();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t});\r\n}\r\n","export default function limitPlugin(scheduler){\r\n\r\n\r\n\tscheduler.config.mark_now = true;\r\n\tscheduler.config.display_marked_timespans = true;\r\n\tscheduler.config.overwrite_marked_timespans = true;\r\n\r\n\r\n\tvar dhx_time_block = \"dhx_time_block\";\r\n\tvar default_timespan_type = \"default\";\r\n\tvar fix_options = function(options, days, zones) {\r\n\t\tif (days instanceof Date && zones instanceof Date) {\r\n\t\t\toptions.start_date = days;\r\n\t\t\toptions.end_date = zones;\r\n\t\t} else {\r\n\t\t\toptions.days = days;\r\n\t\t\toptions.zones = zones;\r\n\t\t}\r\n\t\treturn options;\r\n\t};\r\n\tvar get_resulting_options = function(days, zones, sections) {\r\n\t\tvar options = (typeof days == \"object\") ? days : { days: days };\r\n\t\toptions.type = dhx_time_block;\r\n\t\toptions.css = \"\";\r\n\t\tif (zones) {\r\n\t\t\tif (sections)\r\n\t\t\t\toptions.sections = sections;\r\n\t\t\toptions = fix_options(options, days, zones);\r\n\t\t}\r\n\t\treturn options;\r\n\t};\r\n\tscheduler.blockTime = function(days, zones, sections){\r\n\t\tvar options = get_resulting_options(days, zones, sections);\r\n\t\treturn scheduler.addMarkedTimespan(options);\r\n\t};\r\n\tscheduler.unblockTime = function(days, zones, sections) {\r\n\t\tzones = zones || \"fullday\";\r\n\t\tvar options = get_resulting_options(days, zones, sections);\r\n\t\treturn scheduler.deleteMarkedTimespan(options);\r\n\t};\r\n\r\n\tscheduler.checkInMarkedTimespan = function(ev, timespan_type, on_overlap){\r\n\t\ttimespan_type = timespan_type || default_timespan_type;\r\n\r\n\t\tvar res = true;\r\n\t\tvar temp_start_date = new Date(ev.start_date.valueOf());\r\n\t\tvar temp_end_date = scheduler.date.add(temp_start_date, 1, \"day\");\r\n\t\tvar timespans = scheduler._marked_timespans;\r\n\t\tfor (; temp_start_date < ev.end_date; temp_start_date = scheduler.date.date_part(temp_end_date), temp_end_date = scheduler.date.add(temp_start_date, 1, \"day\") ) {\r\n\t\t\tvar day_value = +scheduler.date.date_part( new Date(temp_start_date) ); // the first part of event not necessarily contains only date part\r\n\t\t\tvar day_index = temp_start_date.getDay();\r\n\r\n\t\t\tvar zones = getZones(ev, timespans, day_index, day_value, timespan_type);\r\n\t\t\tif (zones){\r\n\t\t\t\tfor (var i = 0; i < zones.length; i+=2) {\r\n\r\n\t\t\t\t\t// they may change for new event if it passes limit zone\r\n\t\t\t\t\tvar eventStart = scheduler._get_zone_minutes(temp_start_date);\r\n\t\t\t\t\tvar eventEnd = ( ev.end_date>temp_end_date || ev.end_date.getDate() != temp_start_date.getDate() ) ? 1440 : scheduler._get_zone_minutes(ev.end_date);\r\n\r\n\t\t\t\t\tvar markerStart = zones[i];\r\n\t\t\t\t\tvar markerEnd = zones[i+1];\r\n\t\t\t\t\tif (markerStarteventStart) {\r\n\t\t\t\t\t\tif(typeof on_overlap == \"function\"){\r\n\t\t\t\t\t\t\t//handler allows to cancel overlapping\r\n\t\t\t\t\t\t\t//actually needed only to keep default behavior of limits\r\n\t\t\t\t\t\t\tres = on_overlap(ev, eventStart, eventEnd, markerStart, markerEnd);//event object, event start/end minutes in 'zones' format, zone start/end minutes\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tres = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(!res)\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn !res;\r\n\t};\r\n\tscheduler.checkLimitViolation = function(event){\r\n\t\tif(!event)\r\n\t\t\treturn true;\r\n\t\tif (!scheduler.config.check_limits)\r\n\t\t\treturn true;\r\n\t\tvar s = scheduler;\r\n\t\tvar c = s.config;\r\n\t\tvar evs = [];\r\n\t\tif ((event.rec_type && event._end_date) || (event.rrule)) {\r\n\t\t\tconst seriesEnd = event._end_date || event.end_date;\r\n\t\t\t// GS-2482 need to take into account that a part of recurring events might be outside the limits\r\n\t\t\tif ((c.limit_start && c.limit_end)) {\r\n\t\t\t\tvar recEventInLimits = seriesEnd.valueOf() >= c.limit_start.valueOf() && event.start_date.valueOf() <= c.limit_end.valueOf();\r\n\t\t\t\treturn recEventInLimits;\r\n\t\t\t} else return true;\r\n\t\t} else {\r\n\t\t\tevs = [event];\r\n\t\t}\r\n\r\n\t\tvar complete_res = true;\r\n\t\tfor (var p=0; p= c.limit_start.valueOf() && ev.end_date.valueOf() <= c.limit_end.valueOf()) : true;\r\n\t\t\tif (res){\r\n\t\t\t\tres = !scheduler.checkInMarkedTimespan(ev, dhx_time_block, function(event, eventStart, eventEnd, markerStart, markerEnd){\r\n\t\t\t\t\t//try crop event to allow placing\r\n\t\t\t\t\tvar allow = true;\r\n\t\t\t\t\tif (eventStart<=markerEnd && eventStart >= markerStart){\r\n\t\t\t\t\t\tif (markerEnd == 24*60 || eventEnd <= markerEnd){\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(event._timed && s._drag_id && s._drag_mode == \"new-size\"){\r\n\t\t\t\t\t\t\tevent.start_date.setHours(0);\r\n\t\t\t\t\t\t\tevent.start_date.setMinutes(markerEnd);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ((eventEnd >= markerStart && eventEnd <= markerEnd) || (eventStart < markerStart && eventEnd > markerEnd)){\r\n\t\t\t\t\t\tif(event._timed && s._drag_id && s._drag_mode == \"new-size\"){\r\n\t\t\t\t\t\t\tevent.end_date.setHours(0);\r\n\t\t\t\t\t\t\tevent.end_date.setMinutes(markerStart);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tallow = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn allow;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\tif (!res) {\r\n\t\t\t\tres = (s.checkEvent(\"onLimitViolation\")) ? s.callEvent(\"onLimitViolation\",[ev.id, ev]) : res;\r\n\t\t\t}\r\n\t\t\tcomplete_res = complete_res && res;\r\n\t\t}\r\n\t\tif(!complete_res){\r\n\t\t\ts._drag_id = null;\r\n\t\t\ts._drag_mode = null;\r\n\t\t}\r\n\t\treturn complete_res;\r\n\r\n\r\n\t};\r\n\tscheduler._get_blocked_zones = function(timespans, property, day_index, day_value, timespan_type){\r\n\t\tvar zones =[];\r\n\t\tif (timespans && timespans[property]) {\r\n\t\t\tvar timeline_zones = timespans[property];\r\n\t\t\tvar blocked_timeline_zones = this._get_relevant_blocked_zones(day_index, day_value, timeline_zones, timespan_type);\r\n\t\t\tfor (var i=0; i this._min_date && now.getHours() >= cfg.first_hour && now.getHours() 1) {\r\n\t\t\t\t\tif(view.size && view.options.length){\r\n\t\t\t\t\t\tday_index = ((view.position+ day_index) / view.options.length) * view.size;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstart_index = day_index;\r\n\t\t\t\t\tend_index = day_index + units_l;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tstart_index = 0;\r\n\t\t\t\t\tend_index = start_index + units_l;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar r_divs = [];\r\n\r\n\t\t\t\tfor (var i = start_index; i < end_index; i++) {\r\n\t\t\t\t\tvar t_day = i; // as each unit is actually considered +1 day\r\n\t\t\t\t\toptions.days = t_day;\r\n\t\t\t\t\tvar t_div = scheduler._render_marked_timespan(options, null, t_day)[0];\r\n\t\t\t\t\tr_divs.push(t_div);\r\n\t\t\t\t}\r\n\t\t\t\treturn r_divs;\r\n\t\t\t} else { // day/week views\r\n\t\t\t\toptions.days = day_index;\r\n\t\t\t\treturn scheduler._render_marked_timespan(options, null, day_index);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\toptions.days = +scheduler.date.date_part(now);\r\n\t\t\t\treturn scheduler._render_marked_timespan(options, null, null);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tscheduler._remove_mark_now = function() {\r\n\t\tvar dhx_now_time = 'dhx_now_time';\r\n\t\tvar els = this._els[dhx_now_time];\r\n\t\tfor (var i=0; i config.start_date) || (config.days !== undefined && config.zones)) && !config.type )\r\n\t\t\treturn r_configs; // incorrect config was provided\r\n\r\n\t\tvar min = 0;\r\n\t\tvar max = 24*60;\r\n\t\tif (config.zones == \"fullday\")\r\n\t\t\tconfig.zones = [min, max];\r\n\t\tif (config.zones && config.invert_zones) {\r\n\t\t\tconfig.zones = scheduler.invertZones(config.zones);\r\n\t\t}\r\n\r\n\t\tconfig.id = scheduler.uid();\r\n\t\tconfig.css = config.css||\"\";\r\n\t\tconfig.type = config.type||default_timespan_type;\r\n\r\n\t\tvar sections = config.sections;\r\n\t\tif (sections) {\r\n\t\t\tfor (var view_key in sections) {\r\n\t\t\t\tif (sections.hasOwnProperty(view_key)) {\r\n\t\t\t\t\tvar ids = sections[view_key];\r\n\t\t\t\t\tif (!(ids instanceof Array))\r\n\t\t\t\t\t\tids = [ids];\r\n\t\t\t\t\tfor (var i=0; i t_sd) ? scheduler._get_zone_minutes(start_date) : min;\r\n\t\t\t\t\tvar zone_end = ( end_date > t_ed || end_date.getDate() != t_sd.getDate() ) ? max : scheduler._get_zone_minutes(end_date);\r\n\t\t\t\t\tt_config.zones = [zone_start, zone_end];\r\n\t\t\t\t\tr_configs.push(t_config);\r\n\r\n\t\t\t\t\tt_sd = t_ed;\r\n\t\t\t\t\tt_ed = scheduler.date.add(t_ed, 1, \"day\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (c_config.days instanceof Date)\r\n\t\t\t\t\tc_config.days = (scheduler.date.date_part(c_config.days)).valueOf();\r\n\t\t\t\tc_config.zones = config.zones.slice();\r\n\t\t\t\tr_configs.push(c_config);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn r_configs;\r\n\t};\r\n\tscheduler._get_dates_by_index = function(index, start, end) {\r\n\t\tvar dates = [];\r\n\t\tstart = scheduler.date.date_part(new Date(start||scheduler._min_date));\r\n\t\tend = new Date(end||scheduler._max_date);\r\n\t\tvar start_day = start.getDay();\r\n\t\tvar delta = (index-start_day >= 0) ? (index-start_day) : (7-start.getDay()+index);\r\n\t\tvar t_date = scheduler.date.add(start, delta, \"day\");\r\n\t\tfor (; t_date < end; t_date = scheduler.date.add(t_date, 1, \"week\")) {\r\n\t\t\tdates.push(t_date);\r\n\t\t}\r\n\t\treturn dates;\r\n\t};\r\n\tscheduler._get_css_classes_by_config = function(config) {\r\n\t\tvar css_classes = [];\r\n\t\tif (config.type == dhx_time_block) {\r\n\t\t\tcss_classes.push(dhx_time_block);\r\n\t\t\tif (config.css)\r\n\t\t\t\tcss_classes.push(dhx_time_block+\"_reset\");\r\n\t\t}\r\n\t\tcss_classes.push(\"dhx_marked_timespan\", config.css);\r\n\t\treturn css_classes.join(\" \");\r\n\t};\r\n\tscheduler._get_block_by_config = function(config) {\r\n\t\tvar block = document.createElement(\"div\");\r\n\t\tif (config.html) {\r\n\t\t\tif (typeof config.html == \"string\")\r\n\t\t\t\tblock.innerHTML = config.html;\r\n\t\t\telse\r\n\t\t\t\tblock.appendChild(config.html);\r\n\t\t}\r\n\t\treturn block;\r\n\t};\r\n\tscheduler._render_marked_timespan = function(options, area, day) {\r\n\t\tvar blocks = []; // resulting block which will be rendered and returned\r\n\t\tvar c = scheduler.config;\r\n\t\tvar min_date = this._min_date;\r\n\t\tvar max_date = this._max_date;\r\n\t\tvar day_value = false; // if timespan for specific date should be displayed\r\n\r\n\t\tif (!c.display_marked_timespans)\r\n\t\t\treturn blocks;\r\n\r\n\t\t// in case of markTimespan\r\n\t\tif (!day && day !== 0) {\r\n\t\t\tif (options.days < 7)\r\n\t\t\t\tday = options.days;\r\n\t\t\telse {\r\n\t\t\t\tvar date_to_display = new Date(options.days);\r\n\t\t\t\tday_value = +date_to_display;\r\n\r\n\t\t\t\t// in case of markTimespan date could be not in the viewing range, need to return\r\n\t\t\t\tif ( !(+max_date > +date_to_display && +min_date <= +date_to_display) )\r\n\t\t\t\t\treturn blocks;\r\n\r\n\t\t\t\tday = date_to_display.getDay();\r\n\t\t\t}\r\n\r\n\t\t\t// convert day default index (Sun - 0, Sat - 6) to index of hourscales (depends on week_start and config.start_on_monday)\r\n\t\t\tvar min_day = min_date.getDay();\r\n\t\t\tif (min_day > day) {\r\n\t\t\t\tday = 7 - (min_day-day);\r\n\t\t\t} else {\r\n\t\t\t\tday = day - min_day;\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar zones = options.zones;\r\n\t\tvar css_classes = scheduler._get_css_classes_by_config(options);\r\n\r\n\t\tif (scheduler._table_view && scheduler._mode == \"month\") {\r\n\t\t\tvar areas = [];\r\n\t\t\tvar days = [];\r\n\r\n\r\n\t\t\tif (!area) {\r\n\t\t\t\tdays = (day_value) ? [day_value] : scheduler._get_dates_by_index(day);\r\n\t\t\t\tfor (var i=0; i < days.length; i++) {\r\n\t\t\t\t\tareas.push( this._scales[days[i]] );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tareas.push(area);\r\n\t\t\t\tdays.push(day);\r\n\t\t\t}\r\n\r\n\t\t\tfor (var i=0; i < areas.length; i++) {\r\n\t\t\t\tarea = areas[i];\r\n\t\t\t\tday = days[i];\r\n\r\n\t\t\t\tvar sday = this.locate_holder_day(day, false) % this._cols.length;\r\n\r\n\t\t\t\tif(this._ignores[sday]) continue;\r\n\r\n\t\t\t\tvar block_proto = scheduler._get_block_by_config(options);\r\n\t\t\t\tblock_proto.className = css_classes;\r\n\t\t\t\tblock_proto.style.top = \"0px\";\r\n\t\t\t\tblock_proto.style.height = \"100%\";\r\n\t\t\t\t\r\n\t\t\t\tfor (var k=0; k < zones.length; k+=2) {\r\n\t\t\t\t\tvar start = zones[i];\r\n\t\t\t\t\tvar end = zones[i+1];\r\n\t\t\t\t\tif (end <= start)\r\n\t\t\t\t\t\treturn [];\r\n\r\n\t\t\t\t\tvar block = block_proto.cloneNode(true);\r\n\r\n\t\t\t\t\tblock.style.left = \"0px\";\r\n\t\t\t\t\tblock.style.width = \"100%\";\r\n\r\n\t\t\t\t\tarea.appendChild(block);\r\n\t\t\t\t\tblocks.push(block);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvar index = day;\r\n\r\n\t\t\tif(this._ignores[this.locate_holder_day(day, false)]) return blocks;\r\n\r\n\t\t\tif (this._props && this._props[this._mode] && options.sections && options.sections[this._mode]) {\r\n\t\t\t\tvar view = this._props[this._mode];\r\n\t\t\t\tindex = view.order[options.sections[this._mode]];\r\n\r\n\t\t\t\tvar inner_index = view.order[options.sections[this._mode]];\r\n\t\t\t\tif(!(view.days > 1)){\r\n\t\t\t\t\tindex = inner_index;\r\n\t\t\t\t\tif (view.size && (index > view.position+view.size)) {\r\n\t\t\t\t\t\tindex = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar units_l = view.size || view.options.length;\r\n\t\t\t\t\tindex = index*units_l + inner_index;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tarea = area ? area : scheduler.locate_holder(index);\r\n\r\n\t\t\tfor (var i = 0; i < zones.length; i+=2){\r\n\t\t\t\tvar start = Math.max(zones[i], c.first_hour*60);\r\n\t\t\t\tvar end = Math.min(zones[i+1], c.last_hour*60);\r\n\t\t\t\tif (end <= start) {\r\n\t\t\t\t\tif (i+2 < zones.length)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\treturn [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar block = scheduler._get_block_by_config(options);\r\n\t\t\t\tblock.className = css_classes;\r\n\r\n\t\t\t\t// +1 for working with section which really takes up whole height (as % would be == 0)\r\n\t\t\t\tvar all_hours_height = this.config.hour_size_px*24 + 1;\r\n\t\t\t\tvar hour_ms = 60*60*1000;\r\n\t\t\t\tblock.style.top = (Math.round((start*60*1000-this.config.first_hour*hour_ms)*this.config.hour_size_px/hour_ms) % all_hours_height) + \"px\";\r\n\t\t\t\tblock.style.height = Math.max((Math.round(((end-start)*60*1000)*this.config.hour_size_px/hour_ms)) % all_hours_height, 1)+\"px\";\r\n\r\n\t\t\t\tarea.appendChild(block);\r\n\t\t\t\tblocks.push(block);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn blocks;\r\n\t};\r\n\r\n\tscheduler._mark_timespans = function(){\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\t\tvar divs = [];\r\n\t\tif (scheduler._table_view && scheduler._mode == \"month\"){\r\n\t\t\tfor (var day in this._scales) {\r\n\t\t\t\tvar date = new Date(+day);\r\n\t\t\t\tdivs.push.apply(divs, scheduler._on_scale_add_marker(this._scales[day],date));\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\t//manually trigger rendering of configs for each column\r\n\t\t\tvar date = new Date(scheduler._min_date);\r\n\t\t\tfor (var i = 0, len = data.childNodes.length; i < len; i++) {\r\n\t\t\t\tvar area = data.childNodes[i];\r\n\t\t\t\tif (area.firstChild && scheduler._getClassName(area.firstChild).indexOf(\"dhx_scale_hour\") > -1) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdivs.push.apply(divs, scheduler._on_scale_add_marker(area, date));\r\n\t\t\t\tdate = scheduler.date.add(date, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn divs;\r\n\t};\r\n\r\n\t// just marks timespan, will be cleaned after refresh\r\n\tscheduler.markTimespan = function(configuration) {\r\n\t\tif(!this._els){\r\n\t\t\tthrow new Error(\"`scheduler.markTimespan` can't be used before scheduler initialization. Place `scheduler.markTimespan` call after `scheduler.init`.\");\r\n\t\t}\r\n\r\n\r\n\t\tvar rebuild_els = false;\r\n\t\tif(!this._els[\"dhx_cal_data\"]){\r\n\t\t\tscheduler.get_elements();\r\n\t\t\trebuild_els = true;\r\n\t\t}\r\n\r\n\r\n\t\t// backup regular marked timespans\r\n\t\tvar timespans_ids = scheduler._marked_timespans_ids,\r\n\t\t\ttimespan_types = scheduler._marked_timespans_types,\r\n\t\t\ttimespans = scheduler._marked_timespans;\r\n\r\n\t\tscheduler.deleteMarkedTimespan();\r\n\r\n\t\t//add block to configs\r\n\t\tscheduler.addMarkedTimespan(configuration);\r\n\r\n\t\tvar divs = scheduler._mark_timespans();\r\n\r\n\t\tif(rebuild_els)\r\n\t\t\tscheduler._els = [];\r\n\r\n\t\t// restore timespan config\r\n\t\tscheduler._marked_timespans_ids = timespans_ids;\r\n\t\tscheduler._marked_timespans_types = timespan_types;\r\n\t\tscheduler._marked_timespans = timespans;\r\n\r\n\t\treturn divs;\r\n\t};\r\n\tscheduler.unmarkTimespan = function(divs) {\r\n\t\tif (!divs)\r\n\t\t\treturn;\r\n\t\tfor (var i=0; i c_zone_end && zone_start <= c_zone_end) || (zone_start < c_zone_start && zone_end >= c_zone_start)) {\r\n\t\t\t\t\tresulting_zones[i] = Math.min(c_zone_start, zone_start);\r\n\t\t\t\t\tresulting_zones[i+1] = Math.max(c_zone_end, zone_end);\r\n\t\t\t\t\ti -= 2;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!isLast) // do nothing, maybe next current zone will match or will be last\r\n\t\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\t\tvar offset = (c_zone_start > zone_start)?0:2;\r\n\t\t\t\t\tresulting_zones.splice(i+offset, 0, zone_start, zone_end); // last current zone, need to add another\r\n\t\t\t\t}\r\n\t\t\t\tzones.splice(k--,2); // zone was merged or added, need to exclude it\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn resulting_zones;\r\n\t};\r\n\tscheduler._subtract_timespan_zones = function(current_zones, zones) {\r\n\t\tvar resulting_zones = current_zones.slice();\r\n\t\tfor (var i=0; i c_zone_start && zone_start < c_zone_end) {\r\n\t\t\t\t\tvar is_modified = false;\r\n\t\t\t\t\tif (c_zone_start >= zone_start && c_zone_end <= zone_end) {\r\n\t\t\t\t\t\tresulting_zones.splice(i, 2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (c_zone_start < zone_start) {\r\n\t\t\t\t\t\tresulting_zones.splice(i, 2, c_zone_start, zone_start);\r\n\t\t\t\t\t\tis_modified = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (c_zone_end > zone_end) {\r\n\t\t\t\t\t\tresulting_zones.splice( (is_modified)?(i+2):i, (is_modified)?0:2, zone_end, c_zone_end);\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti -= 2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn resulting_zones;\r\n\t};\r\n\tscheduler.invertZones = function(zones) {\r\n\t\treturn scheduler._subtract_timespan_zones([0, 1440], zones.slice());\r\n\t};\r\n\tscheduler._delete_marked_timespan_by_id = function(id) {\r\n\t\tvar configs = scheduler._marked_timespans_ids[id];\r\n\t\tif (configs) {\r\n\t\t\tfor (var i=0; i 1)){\r\n\t\t\t\tday = scheduler.date.date_part(new Date(this._date)); // for units view actually only 1 day is displayed yet the day variable will change, need to use this._date for all calls\r\n\t\t\t}else{\r\n\t\t\t\tvar dx = 24*60*60*1000;\r\n\t\t\t\tvar day_ind = Math.round((day - scheduler._min_date)/dx);\r\n\t\t\t\tvar unitsPerDay = view.size || units.length;\r\n\t\t\t\tday = scheduler.date.add(scheduler._min_date, Math.floor(day_ind/unitsPerDay), \"day\"); // to the \"same\" day for all sections\r\n\t\t\t\tday = scheduler.date.date_part(day);\r\n\t\t\t}\r\n\t\t\tday_index = day.getDay();\r\n\t\t\tday_value = day.valueOf();\r\n\r\n\t\t\tif (timespans[mode] && timespans[mode][unit.key]) {\r\n\t\t\t\tvar unit_zones = timespans[mode][unit.key];\r\n\t\t\t\tvar unit_types = scheduler._get_types_to_render(unit_zones[day_index], unit_zones[day_value]);\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(unit_types));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar global_data = timespans[\"global\"];\r\n\r\n\t\tif(scheduler.config.overwrite_marked_timespans){\r\n\t\t\tvar day_types = global_data[day_value]||global_data[day_index];\r\n\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(day_types));\r\n\t\t} else {\r\n\t\t\tif(global_data[day_value]){\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(global_data[day_value]));\r\n\t\t\t}\r\n\t\t\tif(global_data[day_index]){\r\n\t\t\t\tr_configs.push.apply(r_configs, scheduler._get_configs_to_render(global_data[day_index]));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (var i=0; i {\r\n\t\t\tif(date){\r\n\t\t\t\tcalls.setModeDate.date = date;\r\n\t\t\t}\r\n\t\t\tif(mode){\r\n\t\t\t\tcalls.setModeDate.mode = mode;\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tvar methods = {\r\n\t\t\trender:(date, mode) => {calls.needRender = true; rememberModeDate(date, mode);},\r\n\t\t\tsetCurrentView:(date, mode) => {calls.needRender = true; rememberModeDate(date, mode);},\r\n\t\t\tupdateView:(date, mode) => {calls.needUpdateView = true; rememberModeDate(date, mode);},\r\n\t\t\trender_data:() => calls.needRender = true,\r\n\t\t\trender_view_data:(evs) => { \r\n\t\t\t\tif(evs && evs.length){\r\n\t\t\t\t\tevs.forEach((e) => calls.repaintEvents[e.id] = true);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcalls.needRender = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tdisableMethods.call(this, methods);\r\n\r\n\t\tisActive = true;\r\n\t\tthis.callEvent(\"onBeforeBatchUpdate\", []);\r\n\r\n\t\tbatchUpdatePayload(callback);\r\n\r\n\t\tthis.callEvent(\"onAfterBatchUpdate\", []);\r\n\r\n\t\trestoreMethods.call(this);\r\n\r\n\t\tisActive = false;\r\n\t\tif(!noRedraw){\r\n\t\t\tif(calls.needRender){\r\n\t\t\t\tscheduler.render(calls.setModeDate.date, calls.setModeDate.mode);\r\n\t\t\t}else if(calls.needUpdateView){\r\n\t\t\t\tscheduler.updateView(calls.setModeDate.date, calls.setModeDate.mode);\r\n\t\t\t}else{\r\n\t\t\t\tfor(const i in calls.repaintEvents){\r\n\t\t\t\t\tscheduler.updateEvent(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (call_dp) {\r\n\t\t\tthis._dp.setUpdateMode(dp_mode);\r\n\t\t\tthis._dp.sendData();\r\n\t\t}\r\n\t};\r\n}\r\n\r\nexport default function(scheduler){\r\n\tscheduler.batchUpdate = createMethod(scheduler);\r\n}","import dragHighlightPos from \"./drag_highlight_pos\";\r\nimport undoDelete from \"./undo_delete\";\r\nimport limit from \"./limit\";\r\nimport batchUpdate from \"./batch_update\";\r\n\r\nexport default function initPlugins(scheduler){\r\n undoDelete(scheduler);\r\n dragHighlightPos(scheduler);\r\n limit(scheduler);\r\n batchUpdate(scheduler);\r\n}","var uidSeed = Date.now();\r\nfunction uid () {\r\n\treturn uidSeed++;\r\n}\r\n\r\n// iframe-safe array type check instead of using instanceof\r\nfunction isArray(obj){\r\n\tif(Array.isArray){\r\n\t\treturn Array.isArray(obj);\r\n\t}else{\r\n\t\t// close enough\r\n\t\treturn (obj && obj.length !== undefined && obj.pop && obj.push);\r\n\t}\r\n}\r\n\r\n// non-primitive string object, e.g. new String(\"abc\")\r\nfunction isStringObject(obj){\r\n\treturn obj && typeof obj === \"object\" && \r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function String() { [native code] }\";\r\n}\r\n\r\n// non-primitive number object, e.g. new Number(5)\r\nfunction isNumberObject(obj){\r\n\treturn obj && typeof obj === \"object\" && \r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function Number() { [native code] }\";\r\n}\r\n\r\n// non-primitive number object, e.g. new Boolean(true)\r\nfunction isBooleanObject(obj){\r\n\treturn obj && typeof obj === \"object\" &&\r\n\t\tFunction.prototype.toString.call(obj.constructor) === \"function Boolean() { [native code] }\";\r\n}\r\n\r\nfunction isDate(obj) {\r\n\tif (obj && typeof obj === \"object\") {\r\n\t\treturn !!(obj.getFullYear && obj.getMonth && obj.getDate);\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\nfunction defined(obj) {\r\n\treturn typeof(obj) != \"undefined\";\r\n}\r\n\r\nfunction delay (callback, timeout){\r\n\tvar timer;\r\n\r\n\tvar result = function() {\r\n\t\tresult.$cancelTimeout();\r\n\t\tresult.$pending = true;\r\n\t\tvar args = Array.prototype.slice.call(arguments);\r\n\t\ttimer = setTimeout(function(){\r\n\t\t\tcallback.apply(this, args);\r\n\t\t\tresult.$pending = false;\r\n\t\t}, timeout);\r\n\t};\r\n\r\n\tresult.$pending = false;\r\n\tresult.$cancelTimeout = function(){\r\n\t\tclearTimeout(timer);\r\n\t\tresult.$pending = false;\r\n\t};\r\n\tresult.$execute = function(){\r\n\t\tvar args = Array.prototype.slice.call(arguments);\r\n\t\tcallback.apply(this, args);\r\n\t\tresult.$cancelTimeout();\r\n\t};\r\n\r\n\treturn result;\r\n}\r\n\r\nexport default {\r\n\tuid: uid,\r\n\tmixin: function mixin (target, source, force){\r\n\t\tfor (var f in source)\r\n\t\t\tif (((target[f] === undefined) || force)) target[f]=source[f];\r\n\t\treturn target;\r\n\t},\r\n\tcopy: function copy(object) {\r\n\t\tvar i, result; // iterator, types array, result\r\n\t\r\n\t\tif (object && typeof object == \"object\") {\r\n\t\r\n\t\t\tswitch (true){\r\n\t\t\t\tcase (isDate(object)):\r\n\t\t\t\t\tresult = new Date(object);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isArray(object)):\r\n\t\t\t\t\tresult = new Array(object.length);\r\n\t\t\t\t\tfor(i = 0; i < object.length; i++){\r\n\t\t\t\t\t\tresult[i] = copy(object[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isStringObject(object)):\r\n\t\t\t\t\tresult = new String(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isNumberObject(object)):\r\n\t\t\t\t\tresult = new Number(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase (isBooleanObject(object)):\r\n\t\t\t\t\tresult = new Boolean(object);// jshint ignore:line\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tresult = {};\r\n\t\t\t\t\tfor (i in object) {\r\n\t\t\t\t\t\tconst varType = typeof object[i];\r\n\r\n\t\t\t\t\t\tif (varType === \"string\" || varType === \"number\" || varType === \"boolean\" ) {\r\n\t\t\t\t\t\t\tresult[i] = object[i];\r\n\t\t\t\t\t\t} else if(isDate(object[i])){\r\n\t\t\t\t\t\t\tresult[i] = new Date(object[i]);\r\n\t\t\t\t\t\t}else if (Object.prototype.hasOwnProperty.apply(object, [i]))\r\n\t\t\t\t\t\t\tresult[i] = copy(object[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result || object;\r\n\t},\r\n\tdefined,\r\n\tisDate,\r\n\tdelay\r\n};\r\n","import utils from \"./utils/utils\";\r\n\r\nconst StateService = (function(){\r\n\tconst stateProviders = {};\r\n\r\n\tfunction getState(name){\r\n\t\tconst provider = stateProviders[name];\r\n\t\tif(provider){\r\n\t\t\treturn stateProviders[name].method();\r\n\t\t}else{\r\n\t\t\tconst res = {};\r\n\t\t\tfor(const i in stateProviders){\r\n\t\t\t\tif(!stateProviders[i].internal)\r\n\t\t\t\t\tutils.mixin(res, stateProviders[i].method(), true);\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\t\t}\r\n\t}\r\n\r\n\tfunction registerProvider(name, provider, internal){\r\n\t\tstateProviders[name] = { method: provider, internal: internal};\r\n\t}\r\n\r\n\tfunction unregisterProvider(name){\r\n\t\tdelete stateProviders[name];\r\n\t}\r\n\r\n\treturn {\r\n\t\tgetState: getState,\r\n\t\tregisterProvider: registerProvider,\r\n\t\tunregisterProvider: unregisterProvider\r\n\t};\r\n});\r\n\r\nexport default StateService;\r\n\r\n","export default function(scheduler){\r\n\treturn function assert(check, message){\r\n\t\tif (!check){\r\n\t\t\tif(scheduler.config.show_errors && scheduler.callEvent(\"onError\",[message]) !== false) {\r\n\t\t\t\tif (scheduler.message) {\r\n\t\t\t\t\tscheduler.message({type: \"error\", text: message, expire: -1});\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// eslint-disable-next-line\r\n\t\t\t\t\tconsole.log(message);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// eslint-disable-next-line no-debugger\r\n\t\t\t\tdebugger;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n}","export default function extend(scheduler) {\r\n\r\nvar commonViews = {\r\n\tagenda: \"https://docs.dhtmlx.com/scheduler/agenda_view.html\",\r\n\tgrid: \"https://docs.dhtmlx.com/scheduler/grid_view.html\",\r\n\tmap: \"https://docs.dhtmlx.com/scheduler/map_view.html\",\r\n\tunit: \"https://docs.dhtmlx.com/scheduler/units_view.html\",\r\n\ttimeline: \"https://docs.dhtmlx.com/scheduler/timeline_view.html\",\r\n\tweek_agenda: \"https://docs.dhtmlx.com/scheduler/weekagenda_view.html\",\r\n\tyear: \"https://docs.dhtmlx.com/scheduler/year_view.html\",\r\n\tanythingElse: \"https://docs.dhtmlx.com/scheduler/views.html\"\r\n};\r\n\r\nvar requiredExtensions = {\r\n\tagenda: \"ext/dhtmlxscheduler_agenda_view.js\",\r\n\tgrid: \"ext/dhtmlxscheduler_grid_view.js\",\r\n\tmap: \"ext/dhtmlxscheduler_map_view.js\",\r\n\tunit: \"ext/dhtmlxscheduler_units.js\",\r\n\ttimeline: \"ext/dhtmlxscheduler_timeline.js, ext/dhtmlxscheduler_treetimeline.js, ext/dhtmlxscheduler_daytimeline.js\",\r\n\tweek_agenda: \"ext/dhtmlxscheduler_week_agenda.js\",\r\n\tyear: \"ext/dhtmlxscheduler_year_view.js\",\r\n\tlimit: \"ext/dhtmlxscheduler_limit.js\"\r\n};\r\n\r\nscheduler._commonErrorMessages = {\r\n\tunknownView: function(view){\r\n\t\tvar relatedDoc = \"Related docs: \" + (commonViews[view] || commonViews.anythingElse); \r\n\t\tvar relatedExtension = requiredExtensions[view] ? (\"You're probably missing \" + requiredExtensions[view] + \".\") : \"\";\r\n\t\treturn (\r\n\t\t\t\"`\"+view+\"` view is not defined. \\n\" +\r\n\t\t\t\"Please check parameters you pass to `scheduler.init` or `scheduler.setCurrentView` in your code and ensure you've imported appropriate extensions. \\n\" + \r\n\t\t\trelatedDoc + \"\\n\" + (relatedExtension ? (relatedExtension + \"\\n\") : \"\"));\r\n\t},\r\n\tcollapsedContainer: function(div){\r\n\t\treturn \"Scheduler container height is set to *100%* but the rendered height is zero and the scheduler is not visible. \\n\"+\r\n\t\t\"Make sure that the container has some initial height or use different units. For example:\\n\" +\r\n\t\t\"
\\n\";\r\n\t}\r\n};\r\n\r\nscheduler.createTimelineView = function() {\r\n\tthrow new Error(\"scheduler.createTimelineView is not implemented. Be sure to add the required extension: \" + requiredExtensions.timeline + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.timeline);\r\n};\r\n\r\nscheduler.createUnitsView = function() {\r\n\tthrow new Error(\"scheduler.createUnitsView is not implemented. Be sure to add the required extension: \" + requiredExtensions.unit + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.unit);\r\n};\r\n\r\nscheduler.createGridView = function() {\r\n\tthrow new Error(\"scheduler.createGridView is not implemented. Be sure to add the required extension: \" + requiredExtensions.grid + \r\n\t\"\\n\" +\r\n\t\"Related docs: \" + commonViews.grid);\r\n};\r\n\r\nscheduler.addMarkedTimespan = function() {\r\n\tthrow new Error(\"scheduler.addMarkedTimespan is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_limit.js\" + \r\n\t\"\\n\" +\r\n\t\"Related docs: https://docs.dhtmlx.com/scheduler/limits.html\");\r\n};\r\n\r\nscheduler.renderCalendar = function() {\r\n\tthrow new Error(\"scheduler.renderCalendar is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_minical.js\" + \r\n\t\"\\n\" +\r\n\t\"https://docs.dhtmlx.com/scheduler/minicalendar.html\");\r\n};\r\n\r\nscheduler.exportToPNG = function() {\r\n\tthrow new Error([\r\n\t\t\"scheduler.exportToPNG is not implemented.\",\r\n\t\t\"This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/png.html\",\r\n\t\t\"Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml\"\r\n\t].join(\"\\n\"));\r\n};\r\n\r\nscheduler.exportToPDF = function() {\r\n\tthrow new Error([\r\n\t\t\"scheduler.exportToPDF is not implemented.\",\r\n\t\t\"This feature requires an additional module, be sure to check the related doc here https://docs.dhtmlx.com/scheduler/pdf.html\",\r\n\t\t\"Licensing info: https://dhtmlx.com/docs/products/dhtmlxScheduler/export.shtml\"\r\n\t].join(\"\\n\"));\r\n};\r\n\r\n\r\n}","import global from \"../global\";\r\n\r\nexport default function extend(scheduler) {\r\n/*\r\nif (global.dataProcessor && !dataProcessor.prototype.init_original){\r\n\tdataProcessor.prototype.init_original=dataProcessor.prototype.init;\r\n\tdataProcessor.prototype.init=function(obj){\r\n\t\tthis.init_original(obj);\r\n\t\tobj._dataprocessor=this;\r\n\r\n\t\tthis.setTransactionMode(\"POST\",true);\r\n\t\tthis.serverProcessor+=(this.serverProcessor.indexOf(\"?\")!=-1?\"&\":\"?\")+\"editing=true\";\r\n\t};\r\n}*/\r\n\r\nscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\tif(typeof dhtmlxError !== \"undefined\") {\r\n\t\twindow.dhtmlxError.catchError(\"LoadXML\", function(a, b, c){\r\n\t\t\tvar message = c[0].responseText;\r\n\r\n\t\t\tswitch (scheduler.config.ajax_error){\r\n\t\t\t\tcase \"alert\":\r\n\t\t\t\t\tglobal.alert(message);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"console\":\r\n\t\t\t\t\tglobal.console.log(message);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n});\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nfunction div(className){\r\n\tvar element = document.createElement(\"div\");\r\n\tvar classes = (className || \"\").split(\" \");\r\n\tclasses.forEach(function(cssClass){\r\n\t\telement.classList.add(cssClass);\r\n\t});\r\n\treturn element;\r\n}\r\nvar itemTypes = {\r\n\trows_container: function(){\r\n\t\treturn div(\"dhx_cal_navbar_rows_container\");\r\n\t},\r\n\trow: function(){\r\n\t\treturn div(\"dhx_cal_navbar_row\");\r\n\t},\r\n\tview: function (config) {\r\n\t\tvar element = div(\"dhx_cal_tab\");\r\n\t\telement.setAttribute(\"name\", config.view + \"_tab\");\r\n\t\telement.setAttribute(\"data-tab\", config.view);\r\n\t\t// element.setAttribute(\"data-viewname\", config.view); // FIXME: need to remove? not used anywhere\r\n\t\tif(scheduler.config.fix_tab_position){\r\n\t\t\tif(config.$firstTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_first\");\r\n\t\t\t}else if(config.$lastTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_last\");\r\n\t\t\t} else if(config.view !== \"week\") {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_standalone\");\r\n\t\t\t}\r\n\r\n\t\t\tif(config.$segmentedTab) {\r\n\t\t\t\telement.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn element;\r\n\t},\r\n\tdate: function () {\r\n\t\treturn div(\"dhx_cal_date\");\r\n\t},\r\n\tbutton: function (config) {\r\n\t\treturn div(\"dhx_cal_nav_button dhx_cal_nav_button_custom dhx_cal_tab\");\r\n\t},\r\n\tbuiltInButton: function (config){\r\n\t\treturn div(\"dhx_cal_\" + config.view + \"_button dhx_cal_nav_button\");\r\n\t},\r\n\tspacer: function () {\r\n\t\treturn div(\"dhx_cal_line_spacer\");\r\n\t},\r\n\tminicalendarButton: function(config){\r\n\t\tvar minicalendarDiv = div('dhx_minical_icon');\r\n\t\tif(!config.click && !minicalendarDiv.$_eventAttached){\r\n\t\t\t\r\n\t\t\tscheduler.event(minicalendarDiv, \"click\", function () {\r\n\t\t\t\tif (scheduler.isCalendarVisible()) {\r\n\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tscheduler.renderCalendar({\r\n\t\t\t\t\t\tposition: this,\r\n\t\t\t\t\t\tdate: scheduler.getState().date,\r\n\t\t\t\t\t\tnavigation: true,\r\n\t\t\t\t\t\thandler: function (date, calendar) {\r\n\t\t\t\t\t\t\tscheduler.setCurrentView(date);\r\n\t\t\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn minicalendarDiv;\r\n\t},\r\n\thtml_element: function (config) {\r\n\t\treturn div(\"dhx_cal_nav_content\");\r\n\t}\r\n};\r\n\r\nfunction findRenderer(config) {\r\n\tvar renderer;\r\n\tif (config.view) {\r\n\t\tswitch (config.view){\r\n\t\t\tcase \"today\":\r\n\t\t\tcase \"next\":\r\n\t\t\tcase \"prev\":\r\n\t\t\t\trenderer = itemTypes.builtInButton;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"date\":\r\n\t\t\t\trenderer = itemTypes.date;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"spacer\":\r\n\t\t\t\trenderer = itemTypes.spacer;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"button\":\r\n\t\t\t\trenderer = itemTypes.button;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"minicalendar\":\r\n\t\t\t\trenderer = itemTypes.minicalendarButton;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\trenderer = itemTypes.view;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t} else if(config.rows) {\r\n\t\trenderer = itemTypes.rows_container;\r\n\t} else if(config.cols) {\r\n\t\trenderer = itemTypes.row;\r\n\t}\r\n\treturn renderer;\r\n}\r\n\r\nfunction renderElement(config){\r\n\tvar renderer = findRenderer(config);\r\n\tif(!renderer){\r\n\t\treturn;\r\n\t}\r\n\tvar element = renderer(config);\r\n\tif(config.css){\r\n\t\telement.classList.add(config.css);\r\n\t}\r\n\tif(config.width){\r\n\t\tvar value = config.width;\r\n\t\tif(value === value * 1){\r\n\t\t\tvalue += \"px\";\r\n\t\t}\r\n\t\telement.style.width = value;\r\n\t}\r\n\tif(config.height){\r\n\t\tvar value = config.height;\r\n\t\tif(value === value * 1){\r\n\t\t\tvalue += \"px\";\r\n\t\t}\r\n\t\telement.style.height = value;\r\n\t}\r\n\tif (config.click) {\r\n\t\tscheduler.event(element, \"click\", config.click);\r\n\t}\r\n\tif (config.html) {\r\n\t\telement.innerHTML = config.html;\r\n\t}\r\n\r\n\tif (config.align) {\r\n\t\tvar value = \"\";\r\n\t\tif (config.align == \"right\") {\r\n\t\t\tvalue = \"flex-end\";\r\n\t\t} else if(config.align == \"left\") {\r\n\t\t\tvalue = \"flex-start\";\r\n\t\t}\r\n\t\telement.style.justifyContent = value;\r\n\t}\r\n\treturn element;\r\n}\r\n\r\nfunction prepareConfig(config) {\r\n\tif (typeof config === \"string\") {\r\n\t\tconfig = {\r\n\t\t\tview: config\r\n\t\t};\r\n\t}\r\n\tif (!config.view && !config.rows && !config.cols) {\r\n\t\tconfig.view = \"button\";\r\n\t}\r\n\treturn config;\r\n}\r\n\r\nfunction renderLayout(config) {\r\n\tvar fragment = document.createDocumentFragment();\r\n\tvar items;\r\n\tif(Array.isArray(config)){\r\n\t\titems = config;\r\n\t}else{\r\n\t\titems = [config];\r\n\t}\r\n\r\n\tfor (var i = 0; i < items.length; i++) {\r\n\t\tvar view = prepareConfig(items[i]);\r\n\r\n\t\tif(view.view === \"day\" && items[i + 1]){\r\n\t\t\tvar next = prepareConfig(items[i + 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"month\"){\r\n\t\t\t\tview.$firstTab = true;\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(view.view === \"week\" && items[i - 1]){\r\n\t\t\tvar next = prepareConfig(items[i + 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"month\"){\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(view.view === \"month\" && items[i - 1]){\r\n\t\t\tvar next = prepareConfig(items[i - 1]);\r\n\t\t\tif(next.view === \"week\" || next.view === \"day\"){\r\n\t\t\t\tview.$lastTab = true;\r\n\t\t\t\tview.$segmentedTab = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar element = renderElement(view);\r\n\r\n\t\tfragment.appendChild(element);\r\n\t\tif(view.cols || view.rows){\r\n\t\t\telement.appendChild(renderLayout(view.cols || view.rows));\r\n\t\t}\r\n\t}\r\n\treturn fragment;\r\n}\r\n\r\nscheduler._init_nav_bar = function (items) {\r\n\tvar navBar = this.$container.querySelector(\".dhx_cal_navline\");\r\n\tif (!navBar){\r\n\t\tnavBar = document.createElement(\"div\");\r\n\t\tnavBar.className = \"dhx_cal_navline dhx_cal_navline_flex\";\r\n\t\tscheduler._update_nav_bar(items, navBar);\r\n\t\treturn navBar;\r\n\t}\r\n\treturn navBar;\r\n};\r\n\r\nvar previousNavbar = null;\r\nvar previousHeight = null;\r\nscheduler._update_nav_bar = function (config, container) {\r\n\r\n\tif(!config){\r\n\t\treturn;\r\n\t}\r\n\tvar heightChanged = false;\r\n\tvar configChanged = false;\r\n\r\n\tvar newHeight = config.height || scheduler.xy.nav_height;\r\n\r\n\tif(previousHeight === null ||\r\n\t\t\t(previousHeight !== newHeight)){\r\n\t\theightChanged = true;\r\n\t}\r\n\tif(!previousNavbar || JSON.stringify(config) !== previousNavbar){\r\n\t\tconfigChanged = true;\r\n\t}\r\n\r\n\tif(heightChanged){\r\n\t\tscheduler.xy.nav_height = newHeight;\r\n\t}\r\n\tif(configChanged){\r\n\t\tcontainer.innerHTML = \"\";\r\n\t\tcontainer.appendChild(renderLayout(config));\r\n\t}\r\n\r\n\tif(heightChanged || configChanged){\r\n\t\tscheduler.unset_actions();\r\n\t\tscheduler._els = [];\r\n\t\tscheduler.get_elements();\r\n\t\tscheduler.set_actions();\r\n\t}\r\n\r\n\tif(newHeight === 0){\r\n\t\tcontainer.style.display = \"none\";\r\n\t}else{\r\n\t\tcontainer.style.display = \"\";\r\n\t}\r\n\r\n\tpreviousHeight = newHeight;\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\tfunction isAttachedNode(container){\r\n\t\tvar root = document.body;\r\n\t\r\n\t\twhile(container && container != root){\r\n\t\t\tcontainer = container.parentNode;\r\n\t\t}\r\n\t\r\n\t\treturn !!(root == container);\r\n\t}\r\n\t\r\n\tfunction getWindowSize(window){\r\n\t\treturn {\r\n\t\t\tw : window.innerWidth || document.documentElement.clientWidth,\r\n\t\t\th : window.innerHeight || document.documentElement.clientHeight\r\n\t\t};\r\n\t}\r\n\tfunction equals(a,b){\r\n\t\treturn a.w == b.w && a.h == b.h;\r\n\t}\r\n\t\r\n\tfunction listenWindowResize(scheduler, window){\r\n\t\tvar oldSize = getWindowSize(window);\r\n\t\tvar resizeDelay;\r\n\t\tscheduler.event(window, \"resize\", function(){\r\n\t\t\tclearTimeout(resizeDelay);\r\n\t\t\tresizeDelay = setTimeout(function(){\r\n\r\n\t\t\t\tif (!isAttachedNode(scheduler.$container) || scheduler.$destroyed){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tvar newSize = getWindowSize(window);\r\n\t\t\t\t// element may be resized by container-autoresize exteinsion\r\n\t\t\t\t// check if the size is actually changed in order to not to get endless loop\r\n\t\t\t\tif (!equals(oldSize, newSize)) {\r\n\t\t\t\t\toldSize = newSize;\r\n\t\t\t\t\ttriggerSchedulerResize(scheduler);\r\n\t\t\t\t}\r\n\t\t\t}, 150);\r\n\t\t});\r\n\t}\r\n\t\r\n\tfunction triggerSchedulerResize(scheduler){\r\n\t\tif(scheduler.$destroyed || !scheduler.$root || !isAttachedNode(scheduler.$root)){\r\n\t\t\treturn;\t\r\n\t\t}\r\n\t\tif (scheduler.callEvent(\"onSchedulerResize\", [])) {\r\n\t\t\tscheduler.updateView();\r\n\t\t\tscheduler.callEvent(\"onAfterSchedulerResize\", []);\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction watchNodeResize(scheduler){\r\n\t\tvar previousHeight = scheduler.$root.offsetHeight;\r\n\t\tvar previousWidth = scheduler.$root.offsetWidth;\r\n\t\t\r\n\t\tfunction lowlevelResizeWatcher(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(scheduler.$root){\r\n\t\t\t\tif (scheduler.$root.offsetHeight != previousHeight ||\r\n\t\t\t\t\tscheduler.$root.offsetWidth != previousWidth){\r\n\t\t\t\t\ttriggerSchedulerResize(scheduler);\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\tpreviousHeight = scheduler.$root.offsetHeight;\r\n\t\t\t\tpreviousWidth = scheduler.$root.offsetWidth;\r\n\t\t\t}\r\n\t\r\n\t\t\tsetTimeout(lowlevelResizeWatcher, 200);\r\n\t\t}\r\n\t\t\r\n\t\tlowlevelResizeWatcher();\r\n\t}\r\n\t\r\n\tfunction addResizeListener(scheduler){\r\n\t\tvar root = scheduler.$container;\r\n\t\tvar containerStyles = window.getComputedStyle(root);\r\n\t\tif(containerStyles.getPropertyValue(\"position\") == \"static\"){\r\n\t\t\troot.style.position = \"relative\";\r\n\t\t}\r\n\t\r\n\t\tvar resizeWatcher = document.createElement('iframe');\r\n\t\tresizeWatcher.className = \"scheduler_container_resize_watcher\";\r\n\t\tresizeWatcher.tabIndex = -1;\r\n\t\tif(scheduler.config.wai_aria_attributes){\r\n\t\t\tresizeWatcher.setAttribute(\"role\", \"none\");\r\n\t\t\tresizeWatcher.setAttribute(\"aria-hidden\", true);\r\n\t\t}\r\n\t\r\n\t\t// in some environments (namely, in SalesForce) iframe.contentWindow is not available\r\n\t\tvar salesforce_environment = !!window[\"Sfdc\"] || !!window[\"$A\"] || window[\"Aura\"];\r\n\t\tif(salesforce_environment){\r\n\t\t\twatchNodeResize(scheduler);\r\n\t\t} else {\r\n\t\t\troot.appendChild(resizeWatcher);\r\n\t\t\tif (resizeWatcher.contentWindow) {\r\n\t\t\t\tlistenWindowResize(scheduler, resizeWatcher.contentWindow);\r\n\t\t\t} else {\r\n\t\t\t\t// if so - ditch the iframe and fallback to listening the main window resize\r\n\t\t\t\troot.removeChild(resizeWatcher);\r\n\t\t\t\tlistenWindowResize(scheduler, window);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\taddResizeListener(scheduler);\r\n\r\n}","class EventHost {\r\n\tconstructor(){\r\n\t\tthis._silent_mode = false;\r\n\t\tthis.listeners = {};\r\n\t}\r\n\t_silentStart(){\r\n\t\tthis._silent_mode = true;\r\n\t}\r\n\t_silentEnd() {\r\n\t\tthis._silent_mode = false;\r\n\t}\r\n}\r\n\r\nconst createEventStorage = function(obj) {\r\n\tlet handlers = {};\r\n\tlet index = 0;\r\n\tconst eventStorage = function(){\r\n\t\tlet combinedResult = true;\r\n\t\tfor(const i in handlers){\r\n\t\t\tconst handlerResult = handlers[i].apply(obj, arguments);\r\n\t\t\tcombinedResult=combinedResult && handlerResult;\r\n\t\t}\r\n\t\treturn combinedResult;\r\n\t};\r\n\teventStorage.addEvent=function(handler, settings){\r\n\t\tif (typeof (handler) == \"function\"){\r\n\t\t\tlet handlerId;\r\n\t\t\tif(settings && settings.id){\r\n\t\t\t\thandlerId = settings.id;\r\n\t\t\t}else{\r\n\t\t\t\thandlerId = index;\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\r\n\t\t\tif(settings && settings.once){\r\n\t\t\t\tconst originalHandler = handler;\r\n\t\t\t\thandler = function(){\r\n\t\t\t\t\toriginalHandler();\r\n\t\t\t\t\teventStorage.removeEvent(handlerId);\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\thandlers[handlerId] = handler;\r\n\t\t\treturn handlerId;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\teventStorage.removeEvent=function(id){\r\n\t\tdelete handlers[id];\r\n\t};\r\n\r\n\teventStorage.clear = function(){\r\n\t\thandlers = {};\r\n\t};\r\n\r\n\treturn eventStorage;\r\n};\r\n\r\nfunction makeEventable(obj){\r\n\r\n\tconst eventHost = new EventHost();\r\n\tobj.attachEvent=function(eventName, handler, settings){\r\n\t\teventName = 'ev_'+eventName.toLowerCase();\r\n\t\tif (!eventHost.listeners[eventName]){\r\n\t\t\teventHost.listeners[eventName] = createEventStorage(this);\r\n\t\t}\r\n\r\n\t\tif(settings && settings.thisObject){\r\n\t\t\thandler = handler.bind(settings.thisObject);\r\n\t\t}\r\n\r\n\t\tconst innerId = eventHost.listeners[eventName].addEvent(handler, settings);\r\n\r\n\t\tlet handlerId = (eventName+':'+innerId); //return ID (ev_eventname:1)\r\n\t\tif(settings && settings.id){\r\n\t\t\thandlerId = settings.id;\r\n\t\t}\r\n\t\treturn handlerId;\r\n\t};\r\n\r\n\tobj.attachAll = function(callback){\r\n\t\tthis.attachEvent('listen_all', callback);\r\n\t};\r\n\r\n\tobj.callEvent=function(name, eventArguments){\r\n\t\tif (eventHost._silent_mode) return true;\r\n\r\n\t\tconst handlerName = 'ev_'+name.toLowerCase();\r\n\r\n\t\tconst listeners = eventHost.listeners;\r\n\t\tif (listeners['ev_listen_all']){\r\n\t\t\tlisteners['ev_listen_all'].apply(this, [name].concat(eventArguments));\r\n\t\t}\r\n\r\n\t\tif (listeners[handlerName])\r\n\t\t\treturn listeners[handlerName].apply(this, eventArguments);\r\n\t\treturn true;\r\n\t};\r\n\r\n\tobj.checkEvent=function(name){\r\n\t\tconst listeners = eventHost.listeners;\r\n\t\treturn (!!listeners['ev_'+name.toLowerCase()]);\r\n\t};\r\n\r\n\tobj.detachEvent=function(id){\r\n\t\tif (id){\r\n\t\t\tlet listeners = eventHost.listeners;\r\n\t\t\tfor(const i in listeners){\r\n\t\t\t\tlisteners[i].removeEvent(id); //remove event\r\n\t\t\t}\r\n\r\n\t\t\tconst list = id.split(':');//get EventName and ID\r\n\t\t\tlisteners = eventHost.listeners;\r\n\t\t\tif(list.length === 2){\r\n\t\t\t\tconst eventName = list[0];\r\n\t\t\t\tconst eventId = list[1];\r\n\t\t\t\tif(listeners[eventName]){\r\n\t\t\t\t\tlisteners[eventName].removeEvent(eventId); //remove event\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tobj.detachAllEvents = function(){\r\n\t\tfor (const name in eventHost.listeners) {\r\n\t\t\teventHost.listeners[name].clear();\r\n\t\t}\r\n\t};\r\n\r\n}\r\n\r\nexport default makeEventable;","\r\nimport nav_bar from \"./nav_bar\";\r\nimport scheduler_resize_listener from \"./scheduler_resize_listener\";\r\nimport eventable from \"../utils/eventable\";\r\n\r\n\r\nexport default function extend(scheduler) {\r\n\r\neventable(scheduler);\r\n\r\nnav_bar(scheduler);\r\n\r\nscheduler._detachDomEvent = function(el, event, handler){\r\n\tif (el.removeEventListener){\r\n\t\tel.removeEventListener(event, handler, false);\r\n\r\n\t}else if (el.detachEvent){\r\n\t\tel.detachEvent(\"on\"+event, handler);\r\n\t}\r\n};\r\n\r\n\r\nscheduler._init_once = function(){\r\n\tscheduler_resize_listener(scheduler);\r\n\r\n\tscheduler._init_once = function(){};\r\n};\r\n\r\nconst layout = {\r\n\t\"navbar\": {\r\n\t\trender: function (config) {\r\n\t\t\treturn scheduler._init_nav_bar(config);\r\n\t\t}\r\n\t},\r\n\t\"header\": {\r\n\t\trender: function (config) {\r\n\t\t\tconst element = document.createElement(\"div\");\r\n\t\t\telement.className = \"dhx_cal_header\";\r\n\t\t\treturn element;\r\n\t\t}\r\n\t},\r\n\t\"dataArea\": {\r\n\t\trender: function (config) {\r\n\t\t\tconst element = document.createElement(\"div\");\r\n\t\t\telement.className = \"dhx_cal_data\";\r\n\t\t\treturn element;\r\n\t\t}\r\n\t},\r\n\t\"html_element\": {\r\n\t\trender: function (config) {\r\n\t\t\treturn config.html;\r\n\t\t}\r\n\t}\r\n};\r\n\r\nfunction hasSchedulerMarkup(element){\r\n\treturn !!(\r\n\t\telement.querySelector(\".dhx_cal_header\") &&\r\n\t\telement.querySelector(\".dhx_cal_data\") &&\r\n\t\telement.querySelector(\".dhx_cal_navline\")\r\n\t\t);\r\n}\r\n\r\nfunction createDefaultHeader(scheduler){\r\n\tconst views = [\r\n\t\t\"day\",\r\n\t\t\"week\",\r\n\t\t\"month\"\r\n\t];\r\n\tconst date = [\r\n\t\t\"date\"\r\n\t];\r\n\tconst nav = [\r\n\t\t\"prev\",\r\n\t\t\"today\",\r\n\t\t\"next\"\r\n\t];\r\n\r\n\tif(scheduler.matrix){\r\n\t\tfor(const i in scheduler.matrix){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\tif(scheduler._props){\r\n\t\tfor(const i in scheduler._props){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\r\n\tif(scheduler._grid && scheduler._grid.names){\r\n\t\tfor(const i in scheduler._grid.names){\r\n\t\t\tviews.push(i);\r\n\t\t}\r\n\t}\r\n\r\n\tconst optionalViews = [\r\n\t\t\"map\",\r\n\t\t\"agenda\",\r\n\t\t\"week_agenda\",\r\n\t\t\"year\"\r\n\t];\r\n\r\n\toptionalViews.forEach(function(viewName){\r\n\t\tif(scheduler[viewName + \"_view\"]){\r\n\t\t\tviews.push(viewName);\r\n\t\t}\r\n\t});\r\n\r\n\treturn views.concat(date).concat(nav);\r\n}\r\n\r\nscheduler.init=function(id,date,mode){\r\n\tif(this.$destroyed){\r\n\t\treturn; // not have errors when try to reinit destroyed scheduler\r\n\t}\r\n\tdate=date||(scheduler._currentDate());\r\n\tmode=mode||\"week\";\r\n\r\n\tif(this._obj){\r\n\t\tthis.unset_actions();\r\n\t}\r\n\r\n\tthis._obj=(typeof id == \"string\")?document.getElementById(id):id;\r\n\tthis.$container = this._obj;\r\n\tthis.$root = this._obj;\r\n\r\n\tif(!this.$container.offsetHeight && this.$container.offsetWidth && this.$container.style.height === \"100%\"){\r\n\t\t// scheduler container has zero height and non-zero width\r\n\t\twindow.console.error(scheduler._commonErrorMessages.collapsedContainer(), this.$container);\r\n\t}\r\n\r\n\tif(this.config.wai_aria_attributes && this.config.wai_aria_application_role){\r\n\t\tthis.$container.setAttribute(\"role\", \"application\");\r\n\t}\r\n\r\n\tif(!this.config.header && !hasSchedulerMarkup(this.$container)){\r\n\t\t// if no header config and no required markup - use the default header\r\n\t\t// so the scheduler could be initialized in an empty div\r\n\t\tthis.config.header = createDefaultHeader(this);\r\n\t\twindow.console.log([// jshint ignore:line\r\n\t\t\t\"Required DOM elements are missing from the scheduler container and **scheduler.config.header** is not specified.\",\r\n\t\t\t\"Using a default header configuration: \",\r\n\t\t\t\"scheduler.config.header = \" + JSON.stringify(this.config.header, null, 2),\r\n\t\t\t\"Check this article for the details: https://docs.dhtmlx.com/scheduler/initialization.html\"\r\n\t\t].join(\"\\n\"));// jshint ignore:line\r\n\t}\r\n\r\n\tif (this.config.header) {\r\n\t\tthis.$container.innerHTML = \"\";\r\n\t\tthis.$container.classList.add(\"dhx_cal_container\");\r\n\t\tif(this.config.header.height){\r\n\t\t\tthis.xy.nav_height = this.config.header.height;\r\n\t\t}\r\n\t\tthis.$container.appendChild(layout.navbar.render(this.config.header));\r\n\t\tthis.$container.appendChild(layout.header.render());\r\n\t\tthis.$container.appendChild(layout.dataArea.render());\r\n\t} else {\r\n\t\t// if no header config provided - make sure scheduler container has all necessary elements\r\n\t\tif(!hasSchedulerMarkup(this.$container)){\r\n\t\t\tthrow new Error([\r\n\t\t\t\t\"Required DOM elements are missing from the scheduler container.\",\r\n\t\t\t\t\"Be sure to either specify them manually in the markup: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviamarkup\",\r\n\t\t\t\t\"Or to use **scheduler.config.header** setting so they could be created automatically: https://docs.dhtmlx.com/scheduler/initialization.html#initializingschedulerviaheaderconfig\"\r\n\t\t\t].join(\"\\n\"));\r\n\t\t}\r\n\t}\r\n\r\n\tif (this.config.rtl) this.$container.className += \" dhx_cal_container_rtl\";\r\n\r\n\t//hook for terrace skin\r\n\tif (this._skin_init)\r\n\t\tscheduler._skin_init();\r\n\r\n\tscheduler.date.init();\r\n\r\n\tthis._scroll=true;\r\n\r\n\tthis._els=[];\r\n\tthis.get_elements();\r\n\tthis.init_templates();\r\n\tthis.set_actions();\r\n\r\n\tthis._init_once();\r\n\tthis._init_touch_events();\r\n\r\n\tthis.set_sizes();\r\n\tscheduler.callEvent('onSchedulerReady', []);\r\n\tscheduler.$initialized = true;\r\n\tthis.setCurrentView(date,mode);\r\n\r\n};\r\n\r\nscheduler.xy={\r\n\tmin_event_height:20,\r\n\tbar_height: 24,\r\n\tscale_width:50,\r\n\tscroll_width:18,\r\n\tscale_height:20,\r\n\tmonth_scale_height:20,\r\n\tmenu_width:25,\r\n\tmargin_top:0,\r\n\tmargin_left:0,\r\n\teditor_width:140,\r\n\tmonth_head_height:22,\r\n\tevent_header_height: 14\r\n};\r\nscheduler.keys={\r\n\tedit_save:13,\r\n\tedit_cancel:27\r\n};\r\n\r\nscheduler.bind = function bind(functor, object){\r\n\tif(functor.bind)\r\n\t\treturn functor.bind(object);\r\n\telse\r\n\t\treturn function(){ return functor.apply(object,arguments); };\r\n};\r\n\r\nscheduler.set_sizes=function(){\r\n\r\n\tvar w = this._x = this._obj.clientWidth-this.xy.margin_left;\r\n\r\n\t//not-table mode always has scroll - need to be fixed in future\r\n\tvar scale_x=this._table_view?0:(this.xy.scale_width+this.xy.scroll_width);\r\n\r\n\tvar materialScalePlaceholder = this.$container.querySelector(\".dhx_cal_scale_placeholder\");\r\n\tif(scheduler._is_material_skin()){\r\n\t\tif(!materialScalePlaceholder) {\r\n\t\t\tmaterialScalePlaceholder = document.createElement(\"div\");\r\n\t\t\tmaterialScalePlaceholder.className = \"dhx_cal_scale_placeholder\";\r\n\t\t\tthis.$container.insertBefore(materialScalePlaceholder, this._els[\"dhx_cal_header\"][0]);\r\n\t\t}\r\n\t\tmaterialScalePlaceholder.style.display = \"block\";\r\n\r\n\t\tthis.set_xy(materialScalePlaceholder,w,this.xy.scale_height + 1,0, this._els[\"dhx_cal_header\"][0].offsetTop);\r\n\r\n\t}else{\r\n\t\tif(materialScalePlaceholder){\r\n\t\t\tmaterialScalePlaceholder.parentNode.removeChild(materialScalePlaceholder);\r\n\t\t}\r\n\t}\r\n\r\n\tif (this._lightbox) {\r\n\t\tif (scheduler.$container.offsetWidth < 1200) {\r\n\t\t} else {\r\n\t\t\tthis._setLbPosition(document.querySelector(\".dhx_cal_light\"));\r\n\t\t}\r\n\t}\r\n\r\n\tthis._data_width = w-scale_x;\r\n\r\n\tthis._els[\"dhx_cal_navline\"][0].style.width = w + \"px\";\r\n\tconst header = this._els[\"dhx_cal_header\"][0];\r\n\tthis.set_xy(header, this._data_width, this.xy.scale_height);\r\n\t// this._els[\"dhx_cal_header\"][0].style.marginLeft = `${scheduler.xy.scale_width}px`;\r\n\theader.style.left = ``;\r\n\theader.style.right = ``;\r\n\tif(!this._table_view){\r\n\t\tif(this.config.rtl){\r\n\t\t\theader.style.right = `${this.xy.scale_width}px`;\r\n\t\t}else{\r\n\t\t\theader.style.left = `${this.xy.scale_width}px`;\r\n\t\t}\r\n\t} else {\r\n\t\tif(!this.config.rtl){\r\n\t\t\theader.style.left = `-1px`;\r\n\t\t} else {\r\n\t\t\theader.style.right = `-1px`;\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.set_xy=function(node,w,h,x,y){\r\n\tfunction prepareValue(val){\r\n\t\tlet prepared = val;\r\n\t\tif(!isNaN(Number(prepared))){\r\n\t\t\tprepared = Math.max(0,prepared) + \"px\";\r\n\t\t}\r\n\t\treturn prepared;\r\n\t}\r\n\r\n\tvar direction = 'left';\r\n\r\n\tif(w !== undefined) {\r\n\t\tnode.style.width = prepareValue(w);\r\n\t}\r\n\r\n\tif(h !== undefined){\r\n\t\tnode.style.height = prepareValue(h);\r\n\t}\r\n\r\n\tif (arguments.length>3){\r\n\r\n\t\tif(x !== undefined){\r\n\t\t\tif (this.config.rtl) direction = 'right';\r\n\t\t\tnode.style[direction]=x+\"px\";\r\n\t\t}\r\n\t\tif(y !== undefined){\r\n\t\t\tnode.style.top=y+\"px\";\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.get_elements=function(){\r\n\t//get all child elements as named hash\r\n\tconst els=this._obj.getElementsByTagName(\"DIV\");\r\n\tfor (let i=0; i < els.length; i++){\r\n\t\tlet class_name= scheduler._getClassName(els[i]);\r\n\t\tconst attr_value = els[i].getAttribute(\"data-tab\") || els[i].getAttribute(\"name\") || \"\";\r\n\t\tif (class_name) class_name = class_name.split(\" \")[0];\r\n\t\tif (!this._els[class_name]) this._els[class_name]=[];\r\n\t\tthis._els[class_name].push(els[i]);\r\n\r\n\t\t//check if name need to be changed\r\n\t\t// scheduler.locale.labels[attr_value+\"_tab\"] - to fix getting labels for data-tab\r\n\t\tlet label = scheduler.locale.labels[attr_value+\"_tab\"] || scheduler.locale.labels[attr_value||class_name];\r\n\t\tif (typeof label !== \"string\" && attr_value && !els[i].innerHTML)\r\n\t\t\tlabel = attr_value.split(\"_\")[0];\r\n\t\tif (label) {\r\n\t\t\tthis._waiAria.labelAttr(els[i], label);\r\n\t\t\tels[i].innerHTML = label;\r\n\t\t}\r\n\t}\r\n};\r\n\r\n\r\nconst domEventsScope = scheduler._createDomEventScope();\r\n\r\nscheduler.unset_actions = function(){\r\n\tdomEventsScope.detachAll();\r\n};\r\n\r\nscheduler.set_actions=function(){\r\n\tfor (const a in this._els){\r\n\t\tif (this._click[a]){\r\n\t\t\tfor (let i=0; i < this._els[a].length; i++){\r\n\t\t\t\tconst element = this._els[a][i];\r\n\t\t\t\tconst handler = this._click[a].bind(element);\r\n\t\t\t\tdomEventsScope.attach(element, \"click\", handler);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tdomEventsScope.attach(this._obj, \"selectstart\", function(e){\r\n\t\te.preventDefault();\r\n\t\treturn false;\r\n\t});\r\n\t//this._obj.onselectstart=function(e){ return false; };\r\n\tdomEventsScope.attach(this._obj, \"mousemove\", function(e){\r\n\t\tif (!scheduler._temp_touch_block)\r\n\t\t\tscheduler._on_mouse_move(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"mousedown\", function(e){\r\n\t\tif (!scheduler._ignore_next_click)\r\n\t\t\tscheduler._on_mouse_down(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"mouseup\", function(e){\r\n\t\tif (!scheduler._ignore_next_click)\r\n\t\t\tscheduler._on_mouse_up(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"dblclick\", function(e){\r\n\t\tscheduler._on_dbl_click(e);\r\n\t});\r\n\tdomEventsScope.attach(this._obj, \"contextmenu\", function(event) {\r\n\t\tif(scheduler.checkEvent(\"onContextMenu\")){\r\n\t\t\t// block the default browser context menu \r\n\t\t\tevent.preventDefault();\r\n\t\t}\r\n\r\n\t\tconst returnValue = scheduler.callEvent(\"onContextMenu\", [scheduler._locate_event(event.target), event]);\r\n\t\treturn returnValue;\r\n\t});\r\n};\r\nscheduler.select=function(id){\r\n\tif (this._select_id==id) return;\r\n\tscheduler._close_not_saved();\r\n\tthis.editStop(false);\r\n\tif(this._select_id){\r\n\t\tthis.unselect();\r\n\t}\r\n\tthis._select_id = id;\r\n\tthis.updateEvent(id);\r\n\tthis.callEvent(\"onEventSelected\", [id]);\r\n};\r\nscheduler.unselect=function(id){\r\n\tif (id && id!=this._select_id) {\r\n\t\treturn;\r\n\t}\r\n\tconst previousSelection = this._select_id;\r\n\tthis._select_id = null;\r\n\tif (previousSelection && this.getEvent(previousSelection)) {\r\n\t\tthis.updateEvent(previousSelection);\r\n\t}\r\n\tthis.callEvent(\"onEventUnselected\", [previousSelection]);\r\n};\r\nscheduler.$stateProvider.registerProvider(\"global\", (function(){\r\n\treturn {\r\n\t\tmode: this._mode,\r\n\t\tdate: new Date(this._date),\r\n\t\tmin_date: new Date(this._min_date),\r\n\t\tmax_date: new Date(this._max_date),\r\n\t\teditor_id: this._edit_id,\r\n\t\tlightbox_id: this._lightbox_id,\r\n\t\tnew_event: this._new_event,\r\n\t\tselect_id: this._select_id,\r\n\t\texpanded: this.expanded,\r\n\t\tdrag_id: this._drag_id,\r\n\t\tdrag_mode: this._drag_mode\r\n\t};\r\n}).bind(scheduler));\r\n\r\nscheduler._click={\r\n\tdhx_cal_data:function(e){\r\n\t\t//in case of touch disable click processing\r\n\t\tif (scheduler._ignore_next_click){\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\r\n\t\tconst id = scheduler._locate_event(e.target);\r\n\r\n\t\tif (!id) {\r\n\t\t\tscheduler.callEvent(\"onEmptyClick\",[scheduler.getActionData(e).date, e]);\r\n\t\t} else {\r\n\t\t\tif ( !scheduler.callEvent(\"onClick\",[id,e]) || scheduler.config.readonly ) return;\r\n\t\t}\r\n\r\n\t\tif (id && scheduler.config.select) {\r\n\r\n\t\t\tscheduler.select(id);\r\n\t\t\tconst icon = e.target.closest(\".dhx_menu_icon\");\r\n\r\n\t\t\tconst mask = scheduler._getClassName(icon);\r\n\t\t\tif (mask.indexOf(\"_icon\")!=-1)\r\n\t\t\t\tscheduler._click.buttons[mask.split(\" \")[1].replace(\"icon_\",\"\")](id);\r\n\t\t} else{\r\n\t\t\tscheduler._close_not_saved();\r\n\t\t\tif (scheduler.getState().select_id && new Date().valueOf()-(scheduler._new_event||0) > 500){\r\n\t\t\t\tscheduler.unselect();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tdhx_cal_prev_button:function(){\r\n\t\tscheduler._click.dhx_cal_next_button(0,-1);\r\n\t},\r\n\tdhx_cal_next_button:function(dummy,step){\r\n\t\tlet def_step = 1;\r\n\t\tif (scheduler.config.rtl){\r\n\t\t\tstep = -step;\r\n\t\t\tdef_step = -def_step;\r\n\t\t}\r\n\t\tscheduler.setCurrentView(scheduler.date.add( //next line changes scheduler._date , but seems it has not side-effects\r\n\t\t\tscheduler.date[scheduler._mode+\"_start\"](new Date(scheduler._date)),(step||def_step),scheduler._mode));\r\n\t},\r\n\tdhx_cal_today_button:function(){\r\n\t\tif (scheduler.callEvent(\"onBeforeTodayDisplayed\", [])) {\r\n\t\t\tscheduler.setCurrentView(scheduler._currentDate());\r\n\t\t}\r\n\t},\r\n\tdhx_cal_tab:function(){\r\n\t\tconst name = this.getAttribute(\"data-tab\");\r\n\t\tconst deprecated_name = this.getAttribute(\"name\");\r\n\t\tconst mode = name || deprecated_name.substring(0, deprecated_name.search(\"_tab\"));\r\n\t\tscheduler.setCurrentView(scheduler._date,mode);\r\n\t},\r\n\tbuttons:{\r\n\t\t\"delete\":function(id){\r\n\t\t\tconst c = scheduler.locale.labels.confirm_deleting;\r\n\t\t\tscheduler._dhtmlx_confirm({message: c, title: scheduler.locale.labels.title_confirm_deleting, callback:function(){ scheduler.deleteEvent(id); },\r\n\t\t\tconfig: {ok: scheduler.locale.labels.icon_delete}\r\n\t\t});\r\n\t\t},\r\n\t\tedit:function(id){ scheduler.edit(id); },\r\n\t\tsave:function(id){ scheduler.editStop(true); },\r\n\t\tdetails:function(id){ scheduler.showLightbox(id); },\r\n\t\tform:function(id){ scheduler.showLightbox(id); },\r\n\t\tcancel:function(id){ scheduler.editStop(false); }\r\n\t}\r\n};\r\nscheduler._dhtmlx_confirm = function({message, title, callback, config}) {\r\n\tif (!message)\r\n\t\treturn callback();\r\n\r\n\tconfig = config || {};\r\n\tconst opts = { ...config, text: message };\r\n\tif (title) {\r\n\t\topts.title = title;\r\n\t}\r\n\tif (callback) {\r\n\t\topts.callback = function(result) {\r\n\t\t\tif (result) {\r\n\t\t\t\tcallback();\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\tscheduler.confirm(opts);\r\n};\r\nscheduler.addEventNow=function(start,end,e){\r\n\tlet base = {};\r\n\tif (scheduler._isObject(start) && !scheduler._isDate(start)){\r\n\t\tbase = start;\r\n\t\tstart = null;\r\n\t}\r\n\r\n\tconst duration = (this.config.event_duration||this.config.time_step)*60000;\r\n\tif (!start) start = base.start_date||Math.round((scheduler._currentDate()).valueOf()/duration)*duration;\r\n\tlet start_date = new Date(start);\r\n\tif (!end){\r\n\t\tlet start_hour = this.config.first_hour;\r\n\t\tif (start_hour > start_date.getHours()){\r\n\t\t\tstart_date.setHours(start_hour);\r\n\t\t\tstart = start_date.valueOf();\r\n\t\t}\r\n\t\tend = start.valueOf()+duration;\r\n\t}\r\n\tlet end_date = new Date(end);\r\n\r\n\t// scheduler.addEventNow(new Date(), new Date()) + collision though get_visible events defect (such event was not retrieved)\r\n\tif(start_date.valueOf() == end_date.valueOf())\r\n\t\tend_date.setTime(end_date.valueOf()+duration);\r\n\tbase.start_date = base.start_date||start_date;\r\n\tbase.end_date = base.end_date||end_date;\r\n\tbase.text = base.text||this.locale.labels.new_event;\r\n\tbase.id = this._drag_id = base.id || this.uid();\r\n\tthis._drag_mode=\"new-size\";\r\n\tthis._loading=true;\r\n\tconst eventId = this.addEvent(base);\r\n\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\tthis._loading=false;\r\n\r\n\tthis._drag_event={}; //dummy , to trigger correct event updating logic\r\n\tthis._on_mouse_up(e);\r\n\treturn eventId;\r\n};\r\nscheduler._on_dbl_click=function(e,src){\r\n\tsrc = src || e.target;\r\n\tif (this.config.readonly) return;\r\n\tconst name = scheduler._getClassName(src).split(\" \")[0];\r\n\tswitch(name){\r\n\t\tcase \"dhx_scale_holder\":\r\n\t\tcase \"dhx_scale_holder_now\":\r\n\t\tcase \"dhx_month_body\":\r\n\t\tcase \"dhx_wa_day_data\":\r\n\t\t\tif (!scheduler.config.dblclick_create) break;\r\n\t\t\tthis.addEventNow(this.getActionData(e).date,null,e);\r\n\t\t\tbreak;\r\n\t\tcase \"dhx_cal_event\":\r\n\t\tcase \"dhx_wa_ev_body\":\r\n\t\tcase \"dhx_agenda_line\":\r\n\t\tcase \"dhx_cal_agenda_event_line\":\r\n\t\tcase \"dhx_grid_event\":\r\n\t\tcase \"dhx_cal_event_line\":\r\n\t\tcase \"dhx_cal_event_clear\": {\r\n\t\t\tconst id = this._locate_event(src);\r\n\t\t\tif (!this.callEvent(\"onDblClick\",[id,e])) return;\r\n\t\t\tif (this.config.details_on_dblclick || this._table_view || !this.getEvent(id)._timed || !this.config.select)\r\n\t\t\t\tthis.showLightbox(id);\r\n\t\t\telse\r\n\t\t\t\tthis.edit(id);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcase \"dhx_time_block\":\r\n\t\tcase \"dhx_cal_container\":\r\n\t\t\treturn;\r\n\t\tdefault: {\r\n\t\t\tconst viewHandler = this[\"dblclick_\"+name];\r\n\t\t\tif (viewHandler) {\r\n\t\t\t\tviewHandler.call(this,e);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif (src.parentNode && src != this)\r\n\t\t\t\t\treturn scheduler._on_dbl_click(e,src.parentNode);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n};\r\n//column index by mouse x-coordinate\r\nscheduler._get_column_index = function(x_pos){\r\n\tlet column = 0;\r\n\tif (this._cols){\r\n\t\tlet width = 0;\r\n\t\tlet i = 0;\r\n\t\twhile (width + this._cols[i] < x_pos && i < this._cols.length){\r\n\t\t\twidth += this._cols[i];\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tcolumn = i + (this._cols[i] ? ((x_pos - width)/ this._cols[i]) : 0);\r\n\r\n\t\tif (this._ignores){\r\n\t\t\tif(column >= this._cols.length){\r\n\t\t\t\twhile(column >= 1 && this._ignores[Math.floor(column)]){\r\n\t\t\t\t\tcolumn--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n\treturn column;\r\n};\r\n\r\n//transform mouse coordinates to day-time indexes of week based view\r\nscheduler._week_indexes_from_pos = function(pos){\r\n\t//\"get position\" can be invoked before columns are loaded into the units view(e.g. by onMouseMove handler in key_nav.js)\r\n\tif(!this._cols){\r\n\t\treturn pos;\r\n\t}else{\r\n\t\tconst column = this._get_column_index(pos.x);\r\n\r\n\t\tpos.x=Math.min(this._cols.length-1, Math.max(0,Math.ceil(column)-1));\r\n\t\tpos.y=Math.max(0,Math.ceil(pos.y*60/(this.config.time_step*this.config.hour_size_px))-1)+this.config.first_hour*(60/this.config.time_step);\r\n\t\treturn pos;\r\n\t}\r\n};\r\n\r\nscheduler._mouse_coords=function(ev){\r\n\tlet pos;\r\n\tconst body = document.body;\r\n\tconst documentElement = document.documentElement;\r\n\tif (!this.$env.isIE && (ev.pageX || ev.pageY))\r\n\t\tpos={x:ev.pageX, y:ev.pageY};\r\n\telse pos={\r\n\t\tx:ev.clientX + (body.scrollLeft||documentElement.scrollLeft||0) - body.clientLeft,\r\n\t\ty:ev.clientY + (body.scrollTop||documentElement.scrollTop||0) - body.clientTop\r\n\t};\r\n\t//apply layout\r\n\tif (this.config.rtl && this._colsS) {\r\n\t\tpos.x = this.$container.querySelector(\".dhx_cal_data\").offsetWidth - pos.x;\r\n\t\tpos.x += this.$domHelpers.getAbsoluteLeft(this._obj);\r\n\t\tif (this._mode !== \"month\") {\r\n\t\t\tpos.x -= this.xy.scale_width;\r\n\t\t}\r\n\t} else {\r\n\t\tpos.x-=this.$domHelpers.getAbsoluteLeft(this._obj)+(this._table_view?0:this.xy.scale_width);\r\n\t}\r\n\r\n\tconst dataArea = this.$container.querySelector(\".dhx_cal_data\");\r\n\t//pos.y-=this.$domHelpers.getAbsoluteTop(this._obj)+this.xy.nav_height+(this._dy_shift||0)+this.xy.scale_height-this._els[\"dhx_cal_data\"][0].scrollTop;\r\n\tpos.y-=this.$domHelpers.getAbsoluteTop(dataArea)-this._els[\"dhx_cal_data\"][0].scrollTop;\r\n\tpos.ev = ev;\r\n\tconst handler = this[\"mouse_\"+this._mode];\r\n\tif (handler){\r\n\t\tpos = handler.call(this,pos);\r\n\t}else{\r\n\t\t//transform to date\r\n\t\tif (!this._table_view) {\r\n\t\t\tpos = this._week_indexes_from_pos(pos);\r\n\t\t} else {\r\n\t\t\tconst column = this._get_column_index(pos.x);\r\n\t\t\tif (!this._cols || !this._colsS) // agenda/map views\r\n\t\t\t\treturn pos;\r\n\t\t\tlet dy=0;\r\n\t\t\tfor (dy=1; dy < this._colsS.heights.length; dy++)\r\n\t\t\t\tif (this._colsS.heights[dy]>pos.y) break;\r\n\r\n\t\t\tpos.y=Math.ceil( (Math.max(0, column)+Math.max(0,dy-1)*7)*24*60/this.config.time_step );\r\n\r\n\t\t\tif (scheduler._drag_mode || this._mode == \"month\")\r\n\t\t\t\tpos.y=(Math.max(0,Math.ceil(column)-1)+Math.max(0,dy-1)*7)*24*60/this.config.time_step;\r\n\r\n\t\t\t//we care about ignored days only during event moving in month view\r\n\t\t\tif (this._drag_mode == \"move\"){\r\n\t\t\t\tif (scheduler._ignores_detected && scheduler.config.preserve_length){\r\n\t\t\t\t\tpos._ignores = true;\r\n\t\t\t\t\t//get real lengtn of event\r\n\t\t\t\t\tif (!this._drag_event._event_length)\r\n\t\t\t\t\t\tthis._drag_event._event_length = this._get_real_event_length(this._drag_event.start_date, this._drag_event.end_date, { x_step:1, x_unit:\"day\"});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tpos.x=0;\r\n\t\t}\r\n\t}\r\n\tpos.timestamp = +new Date();\r\n\treturn pos;\r\n};\r\nscheduler._close_not_saved=function(){\r\n\tif (new Date().valueOf()-(scheduler._new_event||0) > 500 && scheduler._edit_id){\r\n\t\tconst confirmationText=scheduler.locale.labels.confirm_closing;\r\n\r\n\t\tscheduler._dhtmlx_confirm({\r\n\t\t\tmessage: confirmationText, \r\n\t\t\ttitle: scheduler.locale.labels.title_confirm_closing, \r\n\t\t\tcallback: function() { \r\n\t\t\t\tscheduler.editStop(scheduler.config.positive_closing);\r\n\t\t\t}\r\n\t\t});\r\n\t\tif(confirmationText){\r\n\t\t\tthis._drag_id = this._drag_pos = this._drag_mode = null;\r\n\t\t}\r\n\t}\r\n};\r\nscheduler._correct_shift=function(start, back){\r\n\treturn start-=((new Date(scheduler._min_date)).getTimezoneOffset()-(new Date(start)).getTimezoneOffset())*60000*(back?-1:1);\r\n};\r\n\r\nscheduler._is_pos_changed = function(old_pos, new_pos){\r\n\tfunction diff(old_val, new_val, acc){\r\n\t\treturn !!(Math.abs(old_val - new_val) > acc);\r\n\t}\r\n\r\n\tif(!(old_pos && this._drag_pos)){\r\n\t\treturn true;\r\n\t}\r\n\tconst delay = 100;\r\n\tconst d_pos = 5;\r\n\r\n\t// start drag only if passed some time since mouse down, or if mouse position changed sufficiently\r\n\treturn !!(this._drag_pos.has_moved || !this._drag_pos.timestamp || (new_pos.timestamp - this._drag_pos.timestamp > delay) || diff(old_pos.ev.clientX, new_pos.ev.clientX, d_pos) || diff(old_pos.ev.clientY, new_pos.ev.clientY, d_pos));\r\n};\r\n\r\nscheduler._correct_drag_start_date = function(start){\r\n\tlet obj;\r\n\tif (scheduler.matrix)\r\n\t\tobj = scheduler.matrix[scheduler._mode];\r\n\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\tstart = new Date(start);\r\n\tlet len = 1;\r\n\tif(obj._start_correction || obj._end_correction)\r\n\t\tlen = (obj.last_hour||0)*60 - (start.getHours()*60+start.getMinutes()) || 1;\r\n\r\n\treturn start*1 + (scheduler._get_fictional_event_length(start, len, obj) - len);\r\n};\r\nscheduler._correct_drag_end_date = function(start, duration){\r\n\tlet obj;\r\n\tif (scheduler.matrix) {\r\n\t\tobj = scheduler.matrix[scheduler._mode];\r\n\t}\r\n\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\tconst end = start*1 + scheduler._get_fictional_event_length(start, duration, obj);\r\n\treturn new Date(end*1 - (scheduler._get_fictional_event_length(end, -1, obj, -1) + 1));\r\n};\r\n\r\nscheduler._on_mouse_move=function(e){\r\n\tif (this._drag_mode){\r\n\t\tvar pos=this._mouse_coords(e);\r\n\t\tif (this._is_pos_changed(this._drag_pos, pos)){\r\n\t\t\tvar start, end;\r\n\t\t\tif (this._edit_id!=this._drag_id)\r\n\t\t\t\tthis._close_not_saved();\r\n\r\n\t\t\tif(!this._drag_mode)\r\n\t\t\t\treturn;\r\n\r\n\t\t\tvar mousedownPos = null;\r\n\t\t\tif(this._drag_pos && !this._drag_pos.has_moved){\r\n\t\t\t\tmousedownPos = this._drag_pos;\r\n\t\t\t\tmousedownPos.has_moved = true;\r\n\t\t\t}\r\n\r\n\t\t\tthis._drag_pos = pos;\r\n\r\n\t\t\tthis._drag_pos.has_moved = true;\r\n\r\n\t\t\tif (this._drag_mode==\"create\"){\r\n\r\n\t\t\t\t// use mouse down position as a starting point for drag-create\r\n\t\t\t\tif(mousedownPos){\r\n\t\t\t\t\tpos = mousedownPos;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._close_not_saved();\r\n\t\t\t\tthis.unselect(this._select_id);\r\n\t\t\t\tthis._loading=true; //will be ignored by dataprocessor\r\n\r\n\t\t\t\tstart = this._get_date_from_pos(pos).valueOf();\r\n\r\n\t\t\t\tif (!this._drag_start) {\r\n\t\t\t\t\tvar res = this.callEvent(\"onBeforeEventCreated\", [e, this._drag_id]);\r\n\t\t\t\t\tif (!res){\r\n\t\t\t\t\t\tthis._loading=false;\r\n\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis._loading=false;\r\n\t\t\t\t\tthis._drag_start=start;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tend = start;\r\n\t\t\t\tif (end == this._drag_start) {\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar start_date = new Date(this._drag_start);\r\n\t\t\t\tvar end_date = new Date(end);\r\n\t\t\t\tif ( (this._mode == \"day\" || this._mode == \"week\") &&\r\n\t\t\t\t\t(start_date.getHours() == end_date.getHours() &&\r\n\t\t\t\t\tstart_date.getMinutes() == end_date.getMinutes()) ) {\r\n\t\t\t\t\t\tend_date = new Date(this._drag_start+1000);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\tthis._drag_id=this.uid();\r\n\t\t\t\tthis.addEvent(start_date, end_date, this.locale.labels.new_event, this._drag_id, pos.fields);\r\n\r\n\t\t\t\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\t\t\t\tthis._loading=false;\r\n\t\t\t\tthis._drag_mode=\"new-size\";\r\n\r\n\t\t\t}\r\n\r\n\t\t\tvar timeStep = this.config.time_step;\r\n\t\t\tvar ev=this.getEvent(this._drag_id);\r\n\t\t\tvar obj;\r\n\t\t\tif (scheduler.matrix)\r\n\t\t\t\tobj = scheduler.matrix[scheduler._mode];\r\n\t\t\tobj = obj || { x_step:1, x_unit:\"day\" };\r\n\r\n\t\t\tif (this._drag_mode==\"move\"){\r\n\t\t\t\tstart = this._min_date.valueOf()+(pos.y*this.config.time_step+pos.x*24*60)*60000;\r\n\t\t\t\tif (!pos.custom && this._table_view) {\r\n\t\t\t\t\tstart += this.date.time_part(ev.start_date) * 1000;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!this._table_view && this._dragEventBody && this._drag_event._move_event_shift === undefined) {\r\n\t\t\t\t\tthis._drag_event._move_event_shift = start - ev.start_date;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (this._drag_event._move_event_shift) {\r\n\t\t\t\t\tstart -= this._drag_event._move_event_shift;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstart = this._correct_shift(start);\r\n\r\n\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view && obj){\r\n\r\n\t\t\t\t\tstart = scheduler._correct_drag_start_date(start);\r\n\t\t\t\t\tend = scheduler._correct_drag_end_date(start,this._drag_event._event_length);\r\n\r\n\t\t\t\t} else\r\n\t\t\t\t\tend = ev.end_date.valueOf()-(ev.start_date.valueOf()-start);\r\n\t\t\t} else { // resize\r\n\t\t\t\tstart = ev.start_date.valueOf();\r\n\t\t\t\tend = ev.end_date.valueOf();\r\n\t\t\t\tif (this._table_view) {\r\n\t\t\t\t\tvar resize_date = this._min_date.valueOf()+pos.y*this.config.time_step*60000 + (pos.custom?0:24*60*60000);\r\n\t\t\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\t\t\tresize_date = this._correct_shift(resize_date, false);\r\n\t\t\t\t\t\tif( this._drag_from_start ) {\r\n\t\t\t\t\t\t\tvar day = 24*60*60000;\r\n\t\t\t\t\t\t\tif( resize_date <= scheduler.date.date_part(new Date(end+day-1)).valueOf() ) // to get end time as 23:59:59 and then the day start\r\n\t\t\t\t\t\t\t\tstart = resize_date - day;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tend = resize_date;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif(this.config.preserve_length) {\r\n\t\t\t\t\t\t\tif (pos.resize_from_start) {\r\n\t\t\t\t\t\t\t\tstart = scheduler._correct_drag_start_date(resize_date);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tend = scheduler._correct_drag_end_date(resize_date, 0);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tif (pos.resize_from_start) {\r\n\t\t\t\t\t\t\t\tstart = resize_date;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tend = resize_date;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar end_day_start = this.date.date_part(new Date(ev.end_date.valueOf() - 1)).valueOf();\r\n\t\t\t\t\tvar end_day_date = new Date(end_day_start);\r\n\t\t\t\t\tvar firstHour = this.config.first_hour;\r\n\t\t\t\t\tvar lastHour = this.config.last_hour;\r\n\t\t\t\t\tvar maxY = (lastHour - firstHour) * (60/timeStep);\r\n\r\n\t\t\t\t\tthis.config.time_step = 1;\r\n\t\t\t\t\tvar precisePos = this._mouse_coords(e);\r\n\t\t\t\t\tthis.config.time_step = timeStep;\r\n\r\n\t\t\t\t\tvar minDate = pos.y*timeStep*60000;\r\n\t\t\t\t\tvar maxDate = Math.min(pos.y + 1, maxY)*timeStep*60000;\r\n\t\t\t\t\tvar preciseDate = precisePos.y*60000;\r\n\r\n\t\t\t\t\t// rounding end date to the closest time step\r\n\t\t\t\t\tif(Math.abs(minDate - preciseDate) > Math.abs(maxDate - preciseDate)){\r\n\t\t\t\t\t\tend = end_day_start + maxDate;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tend = end_day_start + minDate;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = end + ((new Date(end)).getTimezoneOffset() - end_day_date.getTimezoneOffset()) * 60000;\r\n\t\t\t\t\tthis._els[\"dhx_cal_data\"][0].style.cursor=\"s-resize\";\r\n\t\t\t\t\tif (this._mode == \"week\" || this._mode == \"day\")\r\n\t\t\t\t\t\tend = this._correct_shift(end);\r\n\t\t\t\t}\r\n\t\t\t\tif (this._drag_mode == \"new-size\") {\r\n\t\t\t\t\tif (end <= this._drag_start){\r\n\t\t\t\t\t\tvar shift = pos.shift||((this._table_view && !pos.custom)?24*60*60000:0);\r\n\t\t\t\t\t\tstart = end-(pos.shift?0:shift);\r\n\t\t\t\t\t\tend = this._drag_start+(shift||(timeStep*60000));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tstart = this._drag_start;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (end<=start)\r\n\t\t\t\t\t\tend=start+timeStep*60000;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar new_end = new Date(end-1);\r\n\t\t\tvar new_start = new Date(start);\r\n\t\t\t//deny drag out of visible scheduler scale in timeline view\r\n\t\t\tif(this._drag_mode==\"move\" && scheduler.config.limit_drag_out &&\r\n\t\t\t\t(+new_start < +scheduler._min_date || +end > +scheduler._max_date)){\r\n\r\n\t\t\t\tif(+ev.start_date < +scheduler._min_date || +ev.end_date > +scheduler._max_date){\r\n\t\t\t\t\t// not move event if it's already outside time scale\r\n\t\t\t\t\tnew_start = new Date(ev.start_date);\r\n\t\t\t\t\tend = new Date(ev.end_date);\r\n\t\t\t\t}else{\r\n\r\n\t\t\t\t\tvar duration = end - new_start;\r\n\r\n\t\t\t\t\tif(+new_start < +scheduler._min_date){\r\n\t\t\t\t\t\tnew_start = new Date(scheduler._min_date);\r\n\t\t\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view){\r\n\t\t\t\t\t\t\tnew_start = new Date(scheduler._correct_drag_start_date(new_start));\r\n\t\t\t\t\t\t\tif(obj._start_correction)\r\n\t\t\t\t\t\t\t\tnew_start = new Date(new_start.valueOf() + obj._start_correction);\r\n\t\t\t\t\t\t\tend = new Date(new_start*1 + this._get_fictional_event_length(new_start, this._drag_event._event_length, obj));\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tend = new Date(+new_start + duration);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tend = new Date(scheduler._max_date);\r\n\r\n\t\t\t\t\t\tif (pos._ignores && this.config.preserve_length && this._table_view){\r\n\t\t\t\t\t\t\tif(obj._end_correction)\r\n\t\t\t\t\t\t\t\tend = new Date(end.valueOf() - obj._end_correction);\r\n\t\t\t\t\t\t\tend = new Date(end*1 - this._get_fictional_event_length(end, 0, obj, true));\r\n\t\t\t\t\t\t\tnew_start = new Date(end*1 - this._get_fictional_event_length(end, this._drag_event._event_length, obj, true));\r\n\t\t\t\t\t\t\tif(this._ignores_detected){\r\n\t\t\t\t\t\t\t\tnew_start = scheduler.date.add(new_start, obj.x_step, obj.x_unit);\r\n\t\t\t\t\t\t\t\tend = new Date(end*1 - this._get_fictional_event_length(end, 0, obj, true));\r\n\t\t\t\t\t\t\t\tend = scheduler.date.add(end, obj.x_step, obj.x_unit);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tnew_start = new Date(+end - duration);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\tvar new_end = new Date(end-1);\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\t// fix event dates when resized to bottom of the column (day/week views)\r\n\t\t\tif(!this._table_view && this._dragEventBody &&\r\n\t\t\t\t!scheduler.config.all_timed &&\r\n\t\t\t\t((!scheduler._get_section_view() && pos.x != this._get_event_sday({start_date: new Date(start), end_date:new Date(start)})) || new Date(start).getHours() < this.config.first_hour)){\r\n\t\t\t\tvar duration = end - new_start;\r\n\t\t\t\tif (this._drag_mode == \"move\") {\r\n\t\t\t\t\tvar day = this._min_date.valueOf() + (pos.x * 24 * 60) * 60000;\r\n\t\t\t\t\tnew_start = new Date(day);\r\n\t\t\t\t\tnew_start.setHours(this.config.first_hour);\r\n\t\t\t\t\tend = new Date(new_start.valueOf() + duration);\r\n\t\t\t\t\tnew_end = new Date(end-1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// fix event dates when resized to bottom of the column (day/week views)\r\n\t\t\tif(!this._table_view &&\r\n\t\t\t\t!scheduler.config.all_timed &&\r\n\t\t\t\t((!scheduler.getView() && pos.x != this._get_event_sday({start_date: new Date(end), end_date:new Date(end)})) || new Date(end).getHours() >= this.config.last_hour)){\r\n\t\t\t\tvar duration = end - new_start;\r\n\t\t\t\tvar day = this._min_date.valueOf()+(pos.x*24*60)*60000;\r\n\t\t\t\tend = scheduler.date.date_part(new Date(day));\r\n\t\t\t\tend.setHours(this.config.last_hour);\r\n\t\t\t\tnew_end = new Date(end-1);\r\n\t\t\t\tif(this._drag_mode == \"move\"){\r\n\t\t\t\t\tnew_start = new Date(+end - duration);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//prevent out-of-borders situation for day|week view\r\n\t\t\tif ( this._table_view || (new_end.getDate()==new_start.getDate() && new_end.getHours()=ed)\r\n\t\t\t\tcls += ' dhx_after';\r\n\t\t\telse if (sd.valueOf()==cd.valueOf())\r\n\t\t\t\tcls += ' dhx_now';\r\n\r\n\t\t\tif (this._ignores_detected && this._ignores[j]){\r\n\t\t\t\tcls += \" dhx_scale_ignore\";\r\n\t\t\t}\r\n\r\n\t\t\tcell.className = cls + \" \" + this.templates.month_date_class(sd, cd);\r\n\r\n\t\t\tcell.setAttribute(\"data-cell-date\", scheduler.templates.format_date(sd));\r\n\t\t\tvar body_class = \"dhx_month_body\";\r\n\t\t\tvar head_class = \"dhx_month_head\";\r\n\t\t\tif (j === 0 && this.config.left_border) {\r\n\t\t\t\tbody_class += \" dhx_month_body_border\";\r\n\t\t\t\thead_class += \" dhx_month_head_border\";\r\n\t\t\t}\r\n\t\t\tif (!this._ignores_detected || !this._ignores[j]){\r\n\t\t\t\tcell.style.width = tdwidths[j];\r\n\t\t\t\tthis._waiAria.monthCellAttr(cell, sd);\r\n\r\n\t\t\t\tvar cellHead = document.createElement(\"div\");\r\n\t\t\t\tcellHead.style.height = scheduler.xy.month_head_height + \"px\";\r\n\t\t\t\tcellHead.className = head_class;\r\n\t\t\t\tcellHead.innerHTML = this.templates.month_day(sd);\r\n\t\t\t\tcell.appendChild(cellHead);\r\n\r\n\t\t\t\tvar cellBody = document.createElement(\"div\");\r\n\t\t\t\tcellBody.className = body_class;\r\n\t\t\t\t// cellBody.style.height = row_height + \"px\";\r\n\t\t\t\t// cellBody.style.width = tdwidths[j];\r\n\t\t\t\tcell.appendChild(cellBody);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tcell.appendChild(document.createElement(\"div\"));\r\n\t\t\t\tcell.appendChild(document.createElement(\"div\"));\r\n\t\t\t}\r\n\t\t\trendered_dates.push(sd);\r\n\t\t\tvar bf1 = sd.getDate();\r\n\t\t\tsd=this.date.add(sd,1,\"day\");\r\n\t\t\tif (sd.getDate() - bf1 > 1)\r\n\t\t\t\tsd = new Date(sd.getFullYear(), sd.getMonth(), bf1 + 1, 12, 0);\r\n\t\t}\r\n\r\n\t\tscheduler._colsS.heights[i] = cellheight;\r\n\t\tcellheight += getCellHeight(i);\r\n\t}\r\n\r\n\tthis._min_date = view_start;\r\n\tthis._max_date = sd;\r\n\r\n\tdiv.innerHTML = \"\";\r\n\tdiv.appendChild(table);\r\n\r\n\tthis._scales = {};\r\n\tvar cells = div.querySelectorAll('[data-cell-date]');\r\n\tcells.forEach((cell) => {\r\n\t\tconst date = scheduler.templates.parse_date(cell.getAttribute(\"data-cell-date\"));\r\n\t\tconst body = cell.querySelector(\".dhx_month_body\");\r\n\t\tthis._scales[+date] = body;\r\n\t\tthis.callEvent(\"onScaleAdd\", [this._scales[+date], date]);\r\n\t});\r\n\r\n\treturn this._max_date;\r\n};\r\n\r\nscheduler._reset_month_scale=function(b,dd,sd,rows){\r\n\t//recalculates rows height and redraws month layout\r\n\tvar ed=scheduler.date.add(dd,1,\"month\");\r\n\r\n\t//trim time part for comparison reasons\r\n\tvar cd = scheduler._currentDate();\r\n\tthis.date.date_part(cd);\r\n\tthis.date.date_part(sd);\r\n\r\n\trows = rows || Math.ceil(Math.round((ed.valueOf()-sd.valueOf()) / (60*60*24*1000) ) / 7);\r\n\r\n\tvar height = (Math.floor(b.clientHeight/rows) - this.xy.month_head_height);\r\n\r\n\tthis._colsS.height = height + this.xy.month_head_height;\r\n\tthis._colsS.heights = [];\r\n\r\n\treturn scheduler._render_month_scale(b, dd, sd, rows);\r\n\r\n};\r\n\r\nscheduler.getView = function (viewName) {\r\n\tif (!viewName) {\r\n\t\tviewName = scheduler.getState().mode;\r\n\t}\r\n\tif (scheduler.matrix && scheduler.matrix[viewName]) {\r\n\t\treturn scheduler.matrix[viewName];\r\n\t}\r\n\r\n\tif (scheduler._props && scheduler._props[viewName]) {\r\n\t\treturn scheduler._props[viewName];\r\n\t}\r\n\r\n\treturn null;\r\n};\r\n\r\nscheduler.getLabel = function(property, key) {\r\n\tvar sections = this.config.lightbox.sections;\r\n\tfor (var i=0; i scheduler.getState().max_date.valueOf()){\r\n\t\t\tendColumnIndex += getDaysDifference(endDate, scheduler.getState().max_date);\r\n\t\t}\r\n\t} else{\r\n\t\tendColumnIndex = Math.round(eventLength/60/60/1000/24);\r\n\t}\r\n\r\n\tvar last_column = true;\r\n\twhile (startColumnIndex < endColumnIndex){\r\n\t\tvar check = scheduler.date.add(endDate, -config.x_step, config.x_unit);\r\n\t\tif (ignore && ignore(endDate) && (!last_column || (last_column && ignore(check) ))){\r\n\t\t\teventLength -= (endDate-check);\r\n\r\n\t\t}else{\r\n\t\t\tlet excludedDuration = 0;\r\n\t\t\tconst intervalStart = new Date(Math.max(check.valueOf(), startDate.valueOf()));\r\n\t\t\tconst intervalEnd = endDate;\r\n\t\t\tconst leftCellCutOffStart = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.first_hour);\r\n\t\t\tconst leftCellCutOffEnd = new Date(intervalStart.getFullYear(), intervalStart.getMonth(), intervalStart.getDate(), config.last_hour||24);\r\n\t\t\tconst rightCellCutOffStart = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.first_hour);\r\n\t\t\tconst rightCellCutOffEnd = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate(), config.last_hour||24);\r\n\r\n\t\t\tif(intervalEnd.valueOf() > rightCellCutOffEnd.valueOf()){\r\n\t\t\t\texcludedDuration += intervalEnd - rightCellCutOffEnd;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalEnd.valueOf() > rightCellCutOffStart.valueOf()){\r\n\t\t\t\texcludedDuration += config._start_correction;\r\n\t\t\t} else {\r\n\t\t\t\texcludedDuration += intervalEnd.getHours()*60*60*1000 + intervalEnd.getMinutes()*60*1000;\r\n\t\t\t}\r\n\t\t\t// GS-2580: if the end date of the events is quals to the last_hour config, need to include that date\r\n\t\t\tif(intervalStart.valueOf() <= leftCellCutOffEnd.valueOf()){\r\n\t\t\t\texcludedDuration += config._end_correction;\r\n\t\t\t}\r\n\r\n\t\t\tif(intervalStart.valueOf() < leftCellCutOffStart.valueOf()){\r\n\t\t\t\texcludedDuration += (leftCellCutOffStart.valueOf() - intervalStart.valueOf());\r\n\t\t\t}\r\n\t\t\t\r\n\r\n\t\t\teventLength -= excludedDuration;\r\n\t\t\tlast_column = false;\r\n\t\t}\r\n\t\tendDate = check;\r\n\t\tendColumnIndex--;\r\n\t}\r\n\treturn eventLength;\r\n};\r\nscheduler._get_fictional_event_length=function(end_date, ev_length, obj, back){\r\n\tvar sd = new Date(end_date);\r\n\tvar dir = back ? -1 : 1;\r\n\r\n\t//get difference caused by first|last hour\r\n\tif (obj._start_correction || obj._end_correction){\r\n\t\tvar today;\r\n\t\tif (back)\r\n\t\t\ttoday = (sd.getHours()*60+sd.getMinutes()) - (obj.first_hour||0)*60;\r\n\t\telse\r\n\t\t\ttoday = (obj.last_hour||0)*60 - (sd.getHours()*60+sd.getMinutes());\r\n\t\tvar per_day = (obj.last_hour - obj.first_hour)*60;\r\n\t\tvar days = Math.ceil( (ev_length / (60*1000) - today ) / per_day);\r\n\t\tif(days < 0) days = 0;\r\n\t\tev_length += days * (24*60 - per_day) * 60 * 1000;\r\n\t}\r\n\r\n\tvar fd = new Date(end_date*1+ev_length*dir);\r\n\tvar ignore = this[\"ignore_\"+this._mode];\r\n\r\n\tvar start_slot = 0,\r\n\t\tend_slot;\r\n\tif (obj.render){\r\n\t\tstart_slot = this._get_date_index(obj, sd);\r\n\t\tend_slot = this._get_date_index(obj, fd);\r\n\t} else{\r\n\t\tend_slot = Math.round(ev_length/60/60/1000/24);\r\n\t}\r\n\r\n\twhile (start_slot*dir <= end_slot*dir){\r\n\t\tvar check = scheduler.date.add(sd, obj.x_step*dir, obj.x_unit);\r\n\t\tif (ignore && ignore(sd)){\r\n\t\t\tev_length += (check-sd)*dir;\r\n\t\t\tend_slot += dir;\r\n\t\t}\r\n\r\n\t\tsd = check;\r\n\t\tstart_slot+=dir;\r\n\t}\r\n\r\n\treturn ev_length;\r\n};\r\n\r\nscheduler._get_section_view = function(){\r\n\treturn this.getView();\r\n};\r\n\r\nscheduler._get_section_property = function(){\r\n\tif(this.matrix && this.matrix[this._mode]){\r\n\t\treturn this.matrix[this._mode].y_property;\r\n\t}else if(this._props && this._props[this._mode]){\r\n\t\treturn this._props[this._mode].map_to;\r\n\t}\r\n\treturn null;\r\n};\r\n\r\nscheduler._is_initialized = function(){\r\n\tvar state = this.getState();\r\n\treturn (this._obj && state.date && state.mode);\r\n};\r\nscheduler._is_lightbox_open = function(){\r\n\tvar state = this.getState();\r\n\treturn state.lightbox_id !== null && state.lightbox_id !== undefined;\r\n};\r\n\r\n}","export default {\r\n\tevent: function (el, event, handler){\r\n\t\tif (el.addEventListener)\r\n\t\t\tel.addEventListener(event, handler, false);\r\n\t\r\n\t\telse if (el.attachEvent)\r\n\t\t\tel.attachEvent(\"on\"+event, handler);\r\n\t},\r\n\teventRemove: function (el, event, handler){\r\n\t\tif (el.removeEventListener)\r\n\t\t\tel.removeEventListener(event, handler, false);\r\n\t\r\n\t\telse if (el.detachEvent)\r\n\t\t\tel.detachEvent(\"on\"+event, handler);\r\n\t}\r\n};","import defaultDomEvents from './event';\r\n\r\nexport default function(){\r\n\r\n\tvar domEvents = function (addEvent, removeEvent) {\r\n\t\taddEvent = addEvent || defaultDomEvents.event;\r\n\t\tremoveEvent = removeEvent || defaultDomEvents.eventRemove;\r\n\t\tvar handlers = [];\r\n\t\tvar eventScope = {\r\n\t\t\tattach: function(el, event, callback, capture){\r\n\t\t\t\thandlers.push({element: el, event:event, callback: callback, capture: capture});\r\n\t\t\t\taddEvent(el, event, callback, capture);\r\n\t\t\t},\r\n\t\t\tdetach: function(el, event, callback, capture){\r\n\t\t\t\tremoveEvent(el, event, callback, capture);\r\n\t\t\t\tfor(var i = 0; i < handlers.length; i++){\r\n\t\t\t\t\tvar handler = handlers[i];\r\n\t\t\t\t\tif (handler.element === el && handler.event === event && handler.callback === callback && handler.capture === capture) {\r\n\t\t\t\t\t\thandlers.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tdetachAll: function () {\r\n\t\t\t\tvar staticArray = handlers.slice();\r\n\t\t\t\t// original handlers array can be spliced on every iteration\r\n\t\t\t\tfor (var i = 0; i < staticArray.length; i++){\r\n\t\t\t\t\tvar handler = staticArray[i];\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, handler.capture);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, undefined);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, false);\r\n\t\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, true);\r\n\t\t\t\t}\r\n\t\t\t\thandlers.splice(0, handlers.length);\r\n\t\t\t},\r\n\t\t\textend: function(){\r\n\t\t\t\treturn domEvents(this.event, this.eventRemove);\r\n\t\t\t}\r\n\t\t};\r\n\t\treturn eventScope;\r\n\t};\r\n\t\r\n\treturn domEvents();\r\n}","import createEventScope from './utils/scoped_event';\r\n\r\nexport default function extend(scheduler) {\r\n\r\n\r\nvar domEvents = createEventScope();\r\n\r\nscheduler.event = domEvents.attach;\r\nscheduler.eventRemove = domEvents.detach;\r\nscheduler._eventRemoveAll = domEvents.detachAll;\r\nscheduler._createDomEventScope = domEvents.extend;\r\n\r\n\r\nscheduler._trim = function(str){\r\n\tvar func = String.prototype.trim || function(){ return this.replace(/^\\s+|\\s+$/g, \"\"); };\r\n\treturn func.apply(str);\r\n};\r\n\r\nscheduler._isDate = function(obj){\r\n\tif (obj && typeof obj == \"object\") {\r\n\t\treturn !!(obj.getFullYear && obj.getMonth && obj.getDate);\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n};\r\n\r\nscheduler._isObject = function(obj){\r\n\treturn (obj && typeof obj == \"object\");\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n(function(){\r\n\r\n\t// eslint-disable-next-line no-control-regex\r\n\tvar htmlTags = new RegExp(\"<(?:.|\\n)*?>\", \"gm\");\r\n\tvar extraSpaces = new RegExp(\" +\", \"gm\");\r\n\r\n\tfunction stripHTMLLite(htmlText){\r\n\t\treturn (htmlText + \"\")\r\n\t\t\t.replace(htmlTags, \" \").\r\n\t\t\treplace(extraSpaces, \" \");\r\n\t}\r\n\r\n\tvar singleQuotes = new RegExp(\"'\", \"gm\");\r\n\tfunction escapeQuotes(text){\r\n\t\treturn (text + \"\").replace(singleQuotes, \"'\");\r\n\t}\r\n\r\n\tscheduler._waiAria = {\r\n\t\tgetAttributeString: function(attr){\r\n\t\t\tvar attributes = [\" \"];\r\n\t\t\tfor(var i in attr){\r\n\t\t\t\tif(typeof attr[i] != \"function\" && typeof attr[i] != \"object\") {\r\n\t\t\t\t\tvar text = escapeQuotes(stripHTMLLite(attr[i]));\r\n\t\t\t\t\tattributes.push(i + \"='\" + text + \"'\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tattributes.push(\" \");\r\n\t\t\treturn attributes.join(\" \");\r\n\t\t},\r\n\t\tsetAttributes: function(div, values){\r\n\t\t\tfor(var i in values){\r\n\t\t\t\tdiv.setAttribute(i, stripHTMLLite(values[i]));\r\n\t\t\t}\r\n\t\t\treturn div;\r\n\t\t},\r\n\r\n\t\tlabelAttr: function(div, content){\r\n\t\t\treturn this.setAttributes(div, {\"aria-label\": content});\r\n\t\t},\r\n\t\tlabel: function(label){\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": label});\r\n\t\t},\r\n\r\n\t\t// day/week/units\r\n\r\n\t\thourScaleAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\r\n\t\t},\r\n\t\tmonthCellAttr: function(div, date){\r\n\t\t\tthis.labelAttr(div, scheduler.templates.day_date(date));\r\n\t\t},\r\n\r\n\t\tnavBarDateAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\t\t},\r\n\t\tdayHeaderAttr: function(div, content){\r\n\t\t\tthis.labelAttr(div, content);\r\n\t\t},\r\n\r\n\t\tdayColumnAttr: function(div, date){\r\n\t\t\tthis.dayHeaderAttr(div, scheduler.templates.day_date(date));\r\n\t\t},\r\n\r\n\t\theaderButtonsAttributes: function(div, label){\r\n\t\t\treturn this.setAttributes(div, {\"role\":\"button\", \"aria-label\":label});\r\n\t\t},\r\n\r\n\t\theaderToggleState: function(div, isActive){\r\n\t\t\treturn this.setAttributes(div, {\"aria-pressed\": isActive ? \"true\" : \"false\"});\r\n\t\t},\r\n\r\n\r\n\t\tgetHeaderCellAttr:function(dateString){\r\n\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": dateString});\r\n\t\t},\r\n\r\n\r\n\t\teventAttr: function(event, div){\r\n\t\t\tthis._eventCommonAttr(event, div);\r\n\t\t},\r\n\r\n\r\n\t\t_eventCommonAttr: function(event, div){\r\n\t\t\tdiv.setAttribute(\"aria-label\", stripHTMLLite(scheduler.templates.event_text(event.start_date, event.end_date, event)));\r\n\r\n\t\t\tif(scheduler.config.readonly){\r\n\t\t\t\tdiv.setAttribute(\"aria-readonly\", true);\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif(event.$dataprocessor_class){\r\n\t\t\t\tdiv.setAttribute(\"aria-busy\", true);\r\n\t\t\t}\r\n\r\n\r\n\t\t\tdiv.setAttribute(\"aria-selected\",\r\n\t\t\t\t(scheduler.getState().select_id == event.id) ? \"true\" : \"false\");\r\n\t\t},\r\n\r\n\t\tsetEventBarAttr: function(event, div){\r\n\t\t\tthis._eventCommonAttr(event, div);\r\n\t\t},\r\n\r\n\t\t_getAttributes: function(attributeSetter, arg){\r\n\t\t\tvar result = {\r\n\t\t\t\tsetAttribute:function(name, value){\r\n\t\t\t\t\tthis[name] = value;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\tattributeSetter.apply(this, [arg, result]);\r\n\t\t\treturn result;\r\n\r\n\t\t},\r\n\r\n\t\teventBarAttrString: function(event){\r\n\t\t\treturn this.getAttributeString(this._getAttributes(this.setEventBarAttr, event));\r\n\t\t},\r\n\r\n\r\n\r\n\t\tagendaHeadAttrString :function(){\r\n\t\t\treturn this.getAttributeString({role: \"row\"});\r\n\t\t},\r\n\t\tagendaHeadDateString :function(label){\r\n\t\t\treturn this.getAttributeString({role: \"columnheader\", \"aria-label\": label});\r\n\t\t},\r\n\t\tagendaHeadDescriptionString :function(label){\r\n\t\t\treturn this.agendaHeadDateString(label);\r\n\t\t},\r\n\t\tagendaDataAttrString: function(){\r\n\t\t\treturn this.getAttributeString({role: \"grid\"});\r\n\t\t},\r\n\t\tagendaEventAttrString: function(event){\r\n\t\t\tvar attrs = this._getAttributes(this._eventCommonAttr, event);\r\n\r\n\t\t\tattrs[\"role\"] = \"row\";\r\n\r\n\t\t\treturn this.getAttributeString(attrs);\r\n\r\n\t\t},\r\n\t\tagendaDetailsBtnString: function(){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels.icon_details});\r\n\t\t},\r\n\r\n\r\n\t\tgridAttrString: function(){\r\n\t\t\treturn this.getAttributeString({role: \"grid\"});\r\n\t\t},\r\n\r\n\t\tgridRowAttrString: function(event){\r\n\t\t\treturn this.agendaEventAttrString(event);\r\n\t\t},\r\n\r\n\t\tgridCellAttrString: function(event, column, value){\r\n\t\t\treturn this.getAttributeString({\"role\":\"gridcell\", \"aria-label\": [\r\n\t\t\t\t(column.label === undefined ? column.id : column.label),\r\n\t\t\t\t\": \",\r\n\t\t\t\tvalue\r\n\t\t\t]});\r\n\t\t},\r\n\r\n\t\tmapAttrString: function(){\r\n\t\t\treturn this.gridAttrString();\r\n\t\t},\r\n\t\tmapRowAttrString: function(event){\r\n\t\t\treturn this.gridRowAttrString(event);\r\n\t\t},\r\n\t\tmapDetailsBtnString: function(){\r\n\t\t\treturn this.agendaDetailsBtnString();\r\n\t\t},\r\n\r\n\t\tminicalHeader: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"id\":headerId+\"\",\r\n\t\t\t\t\"aria-live\":\"assertice\",\r\n\t\t\t\t\"aria-atomic\":\"true\"\r\n\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalGrid: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"aria-labelledby\":headerId+\"\",\r\n\t\t\t\t\"role\":\"grid\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalRow: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"row\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalDayCell: function(div, date){\r\n\t\t\tvar selected = (date.valueOf() < scheduler._max_date.valueOf() && date.valueOf() >= scheduler._min_date.valueOf());\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"gridcell\",\r\n\t\t\t\t\"aria-label\": scheduler.templates.day_date(date),\r\n\t\t\t\t\"aria-selected\": selected ? \"true\" : \"false\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tminicalHeadCell: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"columnheader\"\r\n\t\t\t});\r\n\t\t},\r\n\r\n\r\n\t\tweekAgendaDayCell: function(div, date){\r\n\t\t\tvar header = div.querySelector(\".dhx_wa_scale_bar\");\r\n\t\t\tvar content = div.querySelector(\".dhx_wa_day_data\");\r\n\t\t\tvar headerId = scheduler.uid() + \"\";\r\n\t\t\tthis.setAttributes(header, { \"id\": headerId});\r\n\t\t\tthis.setAttributes(content, { \"aria-labelledby\": headerId});\r\n\r\n\t\t},\r\n\t\tweekAgendaEvent: function(div, event){\r\n\t\t\tthis.eventAttr(event, div);\r\n\t\t},\r\n\r\n\t\tlightboxHiddenAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t},\r\n\r\n\t\tlightboxVisibleAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"false\");\r\n\t\t},\r\n\r\n\t\tlightboxSectionButtonAttrString: function(label){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":label, \"tabindex\":\"0\"});\r\n\t\t},\r\n\r\n\t\tyearHeader: function(div, headerId){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"id\":headerId+\"\"\r\n\t\t\t});\r\n\t\t},\r\n\t\tyearGrid: function(div, headerId){\r\n\t\t\tthis.minicalGrid(div, headerId);\r\n\t\t},\r\n\t\tyearHeadCell: function(div){\r\n\t\t\treturn this.minicalHeadCell(div);\r\n\t\t},\r\n\t\tyearRow: function(div){\r\n\t\t\treturn this.minicalRow(div);\r\n\t\t},\r\n\t\tyearDayCell: function(div){\r\n\t\t\tthis.setAttributes(div, {\r\n\t\t\t\t\"role\":\"gridcell\"\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\tlightboxAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t\tdiv.firstChild.setAttribute(\"role\", \"heading\");\r\n\t\t},\r\n\r\n\t\tlightboxButtonAttrString:function(buttonName){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels[buttonName], \"tabindex\":\"0\"});\r\n\t\t},\r\n\t\teventMenuAttrString: function(iconName){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":scheduler.locale.labels[iconName]});\r\n\t\t},\r\n\t\tlightboxHeader: function(div, headerText){\r\n\t\t\tdiv.setAttribute(\"aria-label\", headerText);\r\n\t\t},\r\n\r\n\t\tlightboxSelectAttrString: function(time_option){\r\n\t\t\tvar label = \"\";\r\n\r\n\t\t\tswitch (time_option) {\r\n\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.year;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%m\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.month;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%d\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.day;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%H:%i\":\r\n\t\t\t\t\tlabel = scheduler.locale.labels.hour + \" \" + scheduler.locale.labels.minute;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"aria-label\": label});\r\n\t\t},\r\n\r\n\r\n\t\tmessageButtonAttrString: function(buttonLabel){\r\n\t\t\treturn \"tabindex='0' role='button' aria-label='\"+buttonLabel+\"'\";\r\n\t\t},\r\n\r\n\t\tmessageInfoAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"alert\");\r\n\t\t\t//div.setAttribute(\"tabindex\", \"-1\");\r\n\t\t},\r\n\r\n\t\tmessageModalAttr: function(div, uid){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t\tif(uid){\r\n\t\t\t\tdiv.setAttribute(\"aria-labelledby\", uid);\r\n\t\t\t}\r\n\r\n\t\t\t//\tdiv.setAttribute(\"tabindex\", \"-1\");\r\n\t\t},\r\n\r\n\t\tquickInfoAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t},\r\n\r\n\t\tquickInfoHeaderAttrString: function(){\r\n\t\t\treturn \" role='heading' \";\r\n\t\t},\r\n\r\n\t\tquickInfoHeader: function(div, header){\r\n\t\t\tdiv.setAttribute(\"aria-label\", header);\r\n\t\t},\r\n\r\n\t\tquickInfoButtonAttrString: function(label){\r\n\t\t\treturn scheduler._waiAria.getAttributeString({\"role\":\"button\", \"aria-label\":label, \"tabindex\":\"0\"});\r\n\t\t},\r\n\r\n\t\ttooltipAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"tooltip\");\r\n\t\t},\r\n\r\n\t\ttooltipVisibleAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"false\");\r\n\t\t},\r\n\r\n\t\ttooltipHiddenAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t}\r\n\t};\r\n\r\n\tfunction isDisabled(){\r\n\t\treturn !scheduler.config.wai_aria_attributes;\r\n\t}\r\n\r\n\tfor(var i in scheduler._waiAria){\r\n\t\tscheduler._waiAria[i] = (function(payload){\r\n\t\t\treturn function(){\r\n\t\t\t\tif(isDisabled()){\r\n\t\t\t\t\treturn \" \";\r\n\t\t\t\t}\r\n\t\t\t\treturn payload.apply(this, arguments);\r\n\t\t\t};\r\n\t\t})(scheduler._waiAria[i]);\r\n\t}\r\n\r\n\r\n})();\r\n\r\n}","//returns position of html element on the page\r\nfunction elementPosition(elem) {\r\n\tvar top=0, left=0, right=0, bottom=0;\r\n\tif (elem.getBoundingClientRect) { //HTML5 method\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\t\tvar body = document.body;\r\n\t\tvar docElem = (document.documentElement ||\r\n\t\t\tdocument.body.parentNode ||\r\n\t\t\tdocument.body);\r\n\r\n\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\t\ttop = box.top + scrollTop - clientTop;\r\n\t\tleft = box.left + scrollLeft - clientLeft;\r\n\r\n\t\tright = document.body.offsetWidth - box.right;\r\n\t\tbottom = document.body.offsetHeight - box.bottom;\r\n\t} else { //fallback to naive approach\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop,10);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft,10);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\r\n\t\tright = document.body.offsetWidth - elem.offsetWidth - left;\r\n\t\tbottom = document.body.offsetHeight - elem.offsetHeight - top;\r\n\t}\r\n\treturn { y: Math.round(top), x: Math.round(left), width:elem.offsetWidth, height:elem.offsetHeight, right: Math.round(right), bottom: Math.round(bottom) };\r\n}\r\n\r\n/*\r\nevent position relatively to DOM element\r\n */\r\nfunction getRelativeEventPosition(ev, node){\r\n\tvar d = document.documentElement;\r\n\tvar box = elementPosition(node);\r\n\r\n\treturn {\r\n\t\tx: ev.clientX - d.clientLeft - box.x + node.scrollLeft,\r\n\t\ty: ev.clientY - d.clientTop - box.y + node.scrollTop\r\n\t};\r\n}\r\n\r\nfunction getNodePosition(elem) {\r\n\tvar top=0, left=0, right=0, bottom=0;\r\n\tif (elem.getBoundingClientRect) { //HTML5 method\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\t\tvar body = document.body;\r\n\t\tvar docElem = (document.documentElement ||\r\n\t\t\tdocument.body.parentNode ||\r\n\t\t\tdocument.body);\r\n\r\n\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\t\ttop = box.top + scrollTop - clientTop;\r\n\t\tleft = box.left + scrollLeft - clientLeft;\r\n\r\n\t\tright = document.body.offsetWidth - box.right;\r\n\t\tbottom = document.body.offsetHeight - box.bottom;\r\n\t} else { //fallback to naive approach\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop,10);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft,10);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\r\n\t\tright = document.body.offsetWidth - elem.offsetWidth - left;\r\n\t\tbottom = document.body.offsetHeight - elem.offsetHeight - top;\r\n\t}\r\n\treturn { y: Math.round(top), x: Math.round(left), width:elem.offsetWidth, height:elem.offsetHeight, right: Math.round(right), bottom: Math.round(bottom) };\r\n}\r\n\r\nfunction getClassName(node){\r\n\tif(!node) return \"\";\r\n\r\n\tvar className = node.className || \"\";\r\n\tif(className.baseVal)//'className' exist but not a string - IE svg element in DOM\r\n\t\tclassName = className.baseVal;\r\n\r\n\tif(!className.indexOf)\r\n\t\tclassName = '';\r\n\r\n\treturn className || \"\";\r\n}\r\n\r\nfunction getTargetNode(e) {\r\n\tvar trg;\r\n\tif (e.tagName)\r\n\t\ttrg = e;\r\n\telse {\r\n\t\te = e || window.event;\r\n\t\ttrg = e.target || e.srcElement;\r\n\t\tif (trg.shadowRoot && e.composedPath) {\r\n\t\t\ttrg = e.composedPath()[0];\r\n\t\t}\r\n\t}\r\n\treturn trg;\r\n}\r\n\r\nfunction locateCss(e, classname, strict){\r\n\tif(strict === undefined)\r\n\t\tstrict = true;\r\n\r\n\tvar trg = e.target || e.srcElement;\r\n\tvar css = '';\r\n\r\n\twhile (trg){\r\n\t\tcss = getClassName(trg);\r\n\r\n\t\tif(css){\r\n\t\t\tvar ind = css.indexOf(classname);\r\n\t\t\tif (ind >= 0){\r\n\t\t\t\tif (!strict)\r\n\t\t\t\t\treturn trg;\r\n\r\n\t\t\t\t//check that we have exact match\r\n\t\t\t\tvar left = (ind === 0) || (!((css.charAt(ind - 1)||\"\").trim()));\r\n\t\t\t\tvar right = ((ind + classname.length >= css.length)) || (!((css.charAt(ind + classname.length)).trim()));\r\n\r\n\t\t\t\tif (left && right)\r\n\t\t\t\t\treturn trg;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttrg=trg.parentNode;\r\n\t}\r\n\treturn null;\r\n}\r\n\r\n\r\n// get focusable nodes\r\nfunction isVisible(node){\r\n\tvar display = false,\r\n\t\tvisibility = false;\r\n\tif(window.getComputedStyle){\r\n\t\tvar style = window.getComputedStyle(node, null);\r\n\t\tdisplay = style[\"display\"];\r\n\t\tvisibility = style[\"visibility\"];\r\n\t}else if(node.currentStyle){\r\n\t\tdisplay = node.currentStyle[\"display\"];\r\n\t\tvisibility = node.currentStyle[\"visibility\"];\r\n\t}\r\n\r\n\tvar hiddenSection = false;\r\n\tvar recurringSection = locateCss({target:node}, \"dhx_form_repeat\", false);\r\n\tif(recurringSection){\r\n\t\thiddenSection = !!(recurringSection.style.height == \"0px\");\r\n\t}\r\n\thiddenSection = hiddenSection || !(node.offsetHeight);\r\n\r\n\treturn (display != \"none\" && visibility != \"hidden\" && !hiddenSection);\r\n}\r\n\r\nfunction hasNonNegativeTabIndex(node){\r\n\treturn !isNaN(node.getAttribute(\"tabindex\")) && (node.getAttribute(\"tabindex\")*1 >= 0);\r\n}\r\n\r\nfunction hasHref(node){\r\n\tvar canHaveHref = {\"a\": true, \"area\": true};\r\n\tif(canHaveHref[node.nodeName.loLowerCase()]){\r\n\t\treturn !!node.getAttribute(\"href\");\r\n\t}\r\n\treturn true;\r\n}\r\n\r\nfunction isEnabled(node){\r\n\tvar canDisable = {\"input\":true, \"select\":true, \"textarea\":true, \"button\":true, \"object\":true};\r\n\tif(canDisable[node.nodeName.toLowerCase()]){\r\n\t\treturn !node.hasAttribute(\"disabled\");\r\n\t}\r\n\r\n\treturn true;\r\n}\r\n\r\n\r\nfunction getFocusableNodes(root){\r\n\tvar nodes = root.querySelectorAll([\r\n\t\t\"a[href]\",\r\n\t\t\"area[href]\",\r\n\t\t\"input\",\r\n\t\t\"select\",\r\n\t\t\"textarea\",\r\n\t\t\"button\",\r\n\t\t\"iframe\",\r\n\t\t\"object\",\r\n\t\t\"embed\",\r\n\t\t\"[tabindex]\",\r\n\t\t\"[contenteditable]\"\r\n\t].join(\", \"));\r\n\r\n\tvar nodesArray = Array.prototype.slice.call(nodes, 0);\r\n\t\r\n\tfor(var i = 0; i < nodesArray.length; i++){\r\n\t\tnodesArray[i].$position = i;\r\n\t\t// we remember original nodes order, \r\n\t\t// so when we sort them by tabindex we ensure order of nodes with same tabindex is preserved, \r\n\t\t// since some browsers do unstable sort\r\n\t}\r\n\t\r\n\tnodesArray.sort(function(a, b) {\r\n\t\tif(a.tabIndex === 0 && b.tabIndex !== 0){\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\tif(a.tabIndex !== 0 && b.tabIndex === 0){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\t\r\n\t\tif (a.tabIndex === b.tabIndex){\r\n\t\t\t// ensure we do stable sort\r\n\t\t\treturn a.$position - b.$position;\r\n\t\t}\r\n\t\tif (a.tabIndex < b.tabIndex) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn 1;\r\n\t});\r\n\t\r\n\tfor(var i = 0; i < nodesArray.length; i++){\r\n\t\tvar node = nodesArray[i];\r\n\t\tvar isValid = (hasNonNegativeTabIndex(node) || isEnabled(node) || hasHref(node)) && isVisible(node);\r\n\t\tif(!isValid){\r\n\t\t\tnodesArray.splice(i, 1);\r\n\t\t\ti--;\r\n\t\t}\r\n\t}\r\n\treturn nodesArray;\r\n}\r\n\r\n\r\nfunction isShadowDomSupported() {\r\n\treturn document.head.createShadowRoot || document.head.attachShadow;\r\n}\r\n\r\n/**\r\n * Returns element that has the browser focus, or null if no element has focus.\r\n * Works with shadow DOM, so it's prefereed to use this function instead of document.activeElement directly.\r\n * @returns HTMLElement\r\n */\r\nfunction getActiveElement(){\r\n\tvar activeElement = document.activeElement;\r\n\tif (activeElement.shadowRoot) {\r\n\t\tactiveElement = activeElement.shadowRoot.activeElement;\r\n\t}\r\n\tif (activeElement === document.body && document.getSelection) {\r\n\t\tactiveElement = document.getSelection().focusNode || document.body;\r\n\t}\r\n\r\n\treturn activeElement;\r\n}\r\n\r\n/**\r\n * Returns document.body or the host node of the ShadowRoot, if the element is attached to ShadowDom\r\n * @param {HTMLElement} element \r\n * @returns HTMLElement\r\n */\r\nfunction getRootNode(element) {\r\n\tif (!element) {\r\n\t\treturn document.body;\r\n\t}\r\n\tif (!isShadowDomSupported()) {\r\n\t\treturn document.body;\r\n\t}\r\n\twhile (element.parentNode && (element = element.parentNode)) {\r\n\t\tif (element instanceof ShadowRoot) {\r\n\t\t\treturn element.host;\r\n\t\t}\r\n\t}\r\n\treturn document.body;\r\n}\r\n\r\nfunction hasShadowParent(element) {\r\n\treturn !!getRootNode(element);\r\n}\r\n\r\nexport default {\r\n\t/**\r\n\t * @desc: Calculate absolute position of html object\r\n\t * @type: private\r\n\t * @param: htmlObject - html object\r\n\t * @topic: 0\r\n\t */\r\n\tgetAbsoluteLeft: function getAbsoluteLeft(htmlObject){\r\n\t\treturn this.getOffset(htmlObject).left;\r\n\t},\r\n\t/**\r\n\t * @desc: Calculate absolute position of html object\r\n\t * @type: private\r\n\t * @param: htmlObject - html object\r\n\t * @topic: 0\r\n\t */\r\n\tgetAbsoluteTop: function getAbsoluteTop(htmlObject){\r\n\t\treturn this.getOffset(htmlObject).top;\r\n\t},\r\n\r\n\tgetOffsetSum: function getOffsetSum(elem) {\r\n\t\tvar top=0, left=0;\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\t\treturn {top: top, left: left};\r\n\t},\r\n\r\n\tgetOffsetRect: function getOffsetRect(elem) {\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\r\n\t\tvar top = 0,\r\n\t\t\tleft = 0;\r\n\r\n\t\t// https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#Mobile_Tablet_or_Desktop\r\n\t\tif (!/Mobi/.test(navigator.userAgent)) {\r\n\t\t\tvar body = document.body;\r\n\t\t\tvar docElem = document.documentElement;\r\n\t\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\r\n\t\t\ttop = box.top + scrollTop - clientTop;\r\n\t\t\tleft = box.left + scrollLeft - clientLeft;\r\n\t\t}else {\r\n\t\t\t// incorrect left coordinate on mobile zoom\r\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=489206\r\n\r\n\t\t\tvar dummy = document.createElement(\"div\");\r\n\t\t\tdummy.style.position=\"absolute\";\r\n\t\t\tdummy.style.left=\"0px\";\r\n\t\t\tdummy.style.top=\"0px\";\r\n\t\t\tdummy.style.width=\"1px\";\r\n\t\t\tdummy.style.height = \"1px\";\r\n\r\n\t\t\tdocument.body.appendChild(dummy);\r\n\t\t\tvar dummyBox = dummy.getBoundingClientRect();\r\n\t\t\ttop = box.top - dummyBox.top;\r\n\t\t\tleft = box.left - dummyBox.left;\r\n\r\n\t\t\tdummy.parentNode.removeChild(dummy);\r\n\t\t}\r\n\r\n\t\treturn { top: Math.round(top), left: Math.round(left) };\r\n\t},\r\n\r\n\tgetOffset: function getOffset(elem) {\r\n\t\tif (elem.getBoundingClientRect) {\r\n\t\t\treturn this.getOffsetRect(elem);\r\n\t\t} else {\r\n\t\t\treturn this.getOffsetSum(elem);\r\n\t\t}\r\n\t},\r\n\r\n\tclosest: function(element, selector){\r\n\t\tif(!element || !selector){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn closest(element, selector);\r\n\t},\r\n\tinsertAfter: function(newNode, referenceNode){\r\n\t\tif(referenceNode.nextSibling){\r\n\t\t\treferenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);\r\n\t\t}else{\r\n\t\t\treferenceNode.parentNode.appendChild(newNode);\r\n\t\t}\r\n\t},\r\n\tremove: function(node) {\r\n\t\tif (node && node.parentNode) {\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t}\r\n\t},\r\n\tisChildOf: function(child, parent) {\r\n\t\treturn parent.contains(child);\r\n\t},\r\n\tgetFocusableNodes,\r\n\tgetClassName,\r\n\tlocateCss,\r\n\tgetRootNode,\r\n\thasShadowParent,\r\n\tisShadowDomSupported,\r\n\tgetActiveElement,\r\n\tgetRelativeEventPosition,\r\n\tgetTargetNode,\r\n\tgetNodePosition\r\n};\r\n\r\nvar closest;\r\nif(Element.prototype.closest){\r\n\tclosest = function(element, selector){\r\n\t\treturn element.closest(selector);\r\n\t};\r\n}else{\r\n\tvar matches = Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\r\n\tclosest = function(element, selector) {\r\n\t\tvar el = element;\r\n\t\tdo {\r\n\t\t\tif (matches.call(el, selector)){\r\n\t\t\t\treturn el;\r\n\t\t\t}\r\n\t\t\tel = el.parentElement || el.parentNode;\r\n\t\t} while (el !== null && el.nodeType === 1);\r\n\t\treturn null;\r\n\t};\r\n}\r\n","/* eslint-disable no-restricted-globals */\r\nvar isWindowAwailable = typeof window !== \"undefined\";\r\n\r\n/* eslint-enable no-restricted-globals */\r\n\r\nexport default {\r\n\tisIE: isWindowAwailable && (navigator.userAgent.indexOf(\"MSIE\") >= 0 || navigator.userAgent.indexOf(\"Trident\") >= 0),\r\n\tisOpera: isWindowAwailable && (navigator.userAgent.indexOf(\"Opera\") >= 0),\r\n\tisChrome: isWindowAwailable && (navigator.userAgent.indexOf(\"Chrome\") >= 0),\r\n\tisKHTML: isWindowAwailable && (navigator.userAgent.indexOf(\"Safari\") >= 0 || navigator.userAgent.indexOf(\"Konqueror\") >= 0),\r\n\tisFF: isWindowAwailable && (navigator.userAgent.indexOf(\"Firefox\") >= 0),\r\n\tisIPad: isWindowAwailable && (navigator.userAgent.search(/iPad/gi) >= 0),\r\n\tisEdge: isWindowAwailable && (navigator.userAgent.indexOf(\"Edge\")!=-1),\r\n\tisNode: (!isWindowAwailable || typeof navigator == \"undefined\")\r\n};","export default function extend(scheduler) {\r\n\r\nscheduler.destructor = function(){\r\n\tscheduler.callEvent(\"onDestroy\", []);\r\n\tthis.clearAll();\r\n\r\n\tif(this.$container){\r\n\t\t// FIXME: clear container or remove container\r\n\t\tthis.$container.innerHTML = \"\";\r\n\t\t// scheduler.$domHelpers.remove(this.$container);\r\n\t}\r\n\r\n\tif(this._eventRemoveAll){\r\n\t\tthis._eventRemoveAll();\r\n\t}\r\n\r\n\tif(this.resetLightbox){\r\n\t\tthis.resetLightbox();\r\n\t}\r\n\r\n\tif(this._dp && this._dp.destructor){\r\n\t\tthis._dp.destructor();\r\n\t}\r\n\r\n\t// detachAllEvents should be called last, because in components may be attached events\r\n\tthis.detachAllEvents();\r\n\r\n\tfor(var i in this){\r\n\t\tif(i.indexOf(\"$\") === 0){\r\n\t\t\tdelete this[i];\r\n\t\t}\r\n\t}\r\n\tscheduler.$destroyed = true;\r\n};\r\n\r\n}","export default function(data) {\r\n\tif (typeof data === \"string\" || typeof data === \"number\") {\r\n\t\treturn data;\r\n\t}\r\n\tvar result = \"\";\r\n\tfor (var key in data) {\r\n\t\tvar serialized = \"\";\r\n\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\tif (typeof data[key] === \"string\") {\r\n\t\t\t\tserialized = encodeURIComponent(data[key]);\r\n\t\t\t} else if (typeof data[key] === \"number\") {\r\n\t\t\t\tserialized = data[key];\r\n\t\t\t} else {\r\n\t\t\t\tserialized = encodeURIComponent(JSON.stringify(data[key]));\r\n\t\t\t}\r\n\t\t\tserialized = key + \"=\" + serialized;\r\n\r\n\t\t\tif (result.length) {\r\n\t\t\t\tserialized = \"&\" + serialized;\r\n\t\t\t}\r\n\t\t\tresult += serialized;\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n}","import serialize from \"../common/url_serialize.js\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler.Promise = window.Promise; \r\n\r\nfunction createConfig(method, args) {\r\n\tvar result = {\r\n\t\tmethod: method\r\n\t};\r\n\r\n\tif (args.length === 0) {\r\n\t\tthrow new Error(\"Arguments list of query is wrong.\");\r\n\t}\r\n\tif (args.length === 1) {\r\n\t\tif (typeof args[0] === \"string\") {\r\n\t\t\tresult.url = args[0];\r\n\t\t\tresult.async = true;\r\n\t\t} else {\r\n\t\t\tresult.url = args[0].url;\r\n\t\t\tresult.async = (args[0].async || true);\r\n\t\t\tresult.callback = args[0].callback;\r\n\t\t\tresult.headers = args[0].headers;\r\n\t\t}\r\n\t\tif (method === \"POST\" || \"PUT\") {\r\n\t\t\tif (args[0].data) {\r\n\t\t\t\tif (typeof args[0].data !== \"string\") {\r\n\t\t\t\t\tresult.data = serialize(args[0].data);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult.data = args[0].data;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tresult.data = \"\";\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n\tresult.url = args[0];\r\n\tswitch(method) {\r\n\t\tcase \"GET\":\r\n\t\tcase \"DELETE\":\r\n\t\t\tresult.callback = args[1];\r\n\t\t\tresult.headers = args[2];\r\n\t\tbreak;\r\n\t\tcase \"POST\":\r\n\t\tcase \"PUT\":\r\n\t\t\tif (args[1]) {\r\n\t\t\t\tif (typeof args[1] !== \"string\") {\r\n\t\t\t\t\tresult.data = serialize(args[1]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult.data = args[1];\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tresult.data = \"\";\r\n\t\t\t}\r\n\t\t\tresult.callback = args[2];\r\n\t\t\tresult.headers = args[3];\r\n\t\tbreak;\r\n\t}\r\n\treturn result;\r\n}\r\nscheduler.ajax = {\r\n\t// if false - dhxr param will added to prevent caching on client side (default),\r\n\t// if true - do not add extra params\r\n\tcache: true,\r\n\r\n\t// default method for load/loadStruct, post/get allowed\r\n\tmethod: \"get\",\r\n\r\n\tserializeRequestParams: serialize,\r\n\tparse: function(data) {\r\n\t\tif (typeof data !== \"string\") return data;\r\n\r\n\t\tvar obj;\r\n\t\tdata = data.replace(/^[\\s]+/,\"\");\r\n\t\tif (typeof DOMParser !== \"undefined\" && !scheduler.$env.isIE) { // ff,ie9\r\n\t\t\tobj = (new DOMParser()).parseFromString(data, \"text/xml\");\r\n\t\t} else if (typeof window.ActiveXObject !== \"undefined\") {\r\n\t\t\tobj = new window.ActiveXObject(\"Microsoft.XMLDOM\");\r\n\t\t\tobj.async = \"false\";\r\n\t\t\tobj.loadXML(data);\r\n\t\t}\r\n\t\treturn obj;\r\n\t},\r\n\txmltop: function(tagname, xhr, obj) {\r\n\t\tif (typeof xhr.status == \"undefined\" || xhr.status < 400) {\r\n\t\t\tvar xml = (!xhr.responseXML) ? this.parse(xhr.responseText || xhr) : (xhr.responseXML || xhr);\r\n\t\t\tif (xml && xml.documentElement !== null && !xml.getElementsByTagName(\"parsererror\").length) {\r\n\t\t\t\treturn xml.getElementsByTagName(tagname)[0];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (obj !== -1) scheduler.callEvent(\"onLoadXMLError\",[\"Incorrect XML\", arguments[1], obj]);\r\n\t\treturn document.createElement(\"DIV\");\r\n\t},\r\n\txpath: function(xpathExp, docObj) {\r\n\t\tif (!docObj.nodeName) docObj = docObj.responseXML || docObj;\r\n\t\tif (scheduler.$env.isIE) {\r\n\t\t\treturn docObj.selectNodes(xpathExp)||[];\r\n\t\t} else {\r\n\t\t\tvar rows = [];\r\n\t\t\tvar first;\r\n\t\t\tvar col = (docObj.ownerDocument||docObj).evaluate(xpathExp, docObj, null, XPathResult.ANY_TYPE, null);\r\n\r\n\t\t\twhile (true){\r\n\t\t\t\tfirst = col.iterateNext();\r\n\t\t\t\tif(first){\r\n\t\t\t\t\trows.push(first);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn rows;\r\n\t\t}\r\n\t},\r\n\tquery: function(config) {\r\n\t\treturn this._call(\r\n\t\t\t(config.method || \"GET\"),\r\n\t\t\tconfig.url,\r\n\t\t\tconfig.data || \"\",\r\n\t\t\t(config.async || true),\r\n\t\t\tconfig.callback,\r\n\t\t\tconfig.headers\r\n\t\t);\r\n\t},\r\n\tget: function(url, onLoad, headers) {\r\n\t\tvar config = createConfig(\"GET\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tgetSync: function(url, headers) {\r\n\t\tvar config = createConfig(\"GET\", arguments);\r\n\t\tconfig.async = false;\r\n\t\treturn this.query(config);\r\n\t},\r\n\tput: function(url, postData, onLoad, headers) {\r\n\t\tvar config = createConfig(\"PUT\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tdel: function(url, onLoad, headers) {\r\n\t\t/**\r\n\t\t * https://tools.ietf.org/html/rfc7231#section-4.3.5\r\n\t\t * A payload within a DELETE request message has no defined semantics;\r\n\t\t * sending a payload body on a DELETE request might cause some existing\r\n\t\t * implementations to reject the request.\r\n\t\t */\r\n\t\tvar config = createConfig(\"DELETE\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tpost: function(url, postData, onLoad, headers) {\r\n\t\tif (arguments.length == 1) {\r\n\t\t\tpostData = \"\";\r\n\t\t} else if (arguments.length == 2 && typeof(postData) == \"function\") {\r\n\t\t\tonLoad = postData;\r\n\t\t\tpostData = \"\";\r\n\t\t}\r\n\t\tvar config = createConfig(\"POST\", arguments);\r\n\t\treturn this.query(config);\r\n\t},\r\n\tpostSync: function(url, postData, headers) {\r\n\t\tpostData = (postData === null ? \"\" : String(postData));\r\n\r\n\t\tvar config = createConfig(\"POST\", arguments);\r\n\t\tconfig.async = false;\r\n\t\treturn this.query(config);\r\n\t},\r\n\t_call: function(method, url, postData, async, onLoad, headers) {\r\n\t\treturn new scheduler.Promise((function(resolve, reject) {\r\n\t\t\tvar t = (typeof XMLHttpRequest !== undefined && !scheduler.$env.isIE ? new XMLHttpRequest() : new window.ActiveXObject(\"Microsoft.XMLHTTP\"));\r\n\t\t\tvar isQt = (navigator.userAgent.match(/AppleWebKit/) !== null && navigator.userAgent.match(/Qt/) !== null && navigator.userAgent.match(/Safari/) !== null);\r\n\r\n\t\t\tif (!!async) {\r\n\t\t\t\tt.addEventListener(\"readystatechange\", function() {\r\n\t\t\t\t\tif ((t.readyState == 4) || (isQt && t.readyState == 3)) { // what for long response and status 404?\r\n\t\t\t\t\t\tif (t.status != 200 || t.responseText === \"\")\r\n\t\t\t\t\t\t\tif (!scheduler.callEvent(\"onAjaxError\", [t])) return;\r\n\r\n\t\t\t\t\t\tsetTimeout(function() {\r\n\t\t\t\t\t\t\tif (typeof(onLoad) == \"function\") {\r\n\t\t\t\t\t\t\t\tonLoad.apply(window, [{xmlDoc:t, filePath:url}]); // dhtmlx-compat, response.xmlDoc.responseXML/responseText\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tresolve(t);\r\n\t\t\t\t\t\t\tif (typeof(onLoad) == \"function\") {\r\n\t\t\t\t\t\t\t\tonLoad = null;\r\n\t\t\t\t\t\t\t\tt = null;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}, 0);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (method == \"GET\" && !this.cache) {\r\n\t\t\t\turl += (url.indexOf(\"?\")>=0?\"&\":\"?\")+\"dhxr\"+new Date().getTime()+\"=1\";\r\n\t\t\t}\r\n\r\n\t\t\tt.open(method, url, async);\r\n\r\n\t\t\tif (headers){\r\n\t\t\t\tfor (var key in headers)\r\n\t\t\t\t\tt.setRequestHeader(key, headers[key]);\r\n\t\t\t} else if (method.toUpperCase() == \"POST\" || method == \"PUT\" || method == \"DELETE\") {\r\n\t\t\t\tt.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\r\n\t\t\t} else if (method == \"GET\") {\r\n\t\t\t\tpostData = null;\r\n\t\t\t}\r\n\r\n\t\t\tt.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\r\n\r\n\t\t\tt.send(postData);\r\n\r\n\t\t\tif (!async) return {xmlDoc:t, filePath:url}; // dhtmlx-compat, response.xmlDoc.responseXML/responseText\r\n\t\t}.bind(this)));\r\n\t},\r\n\turlSeparator: function(str){\r\n\t\tif (str.indexOf(\"?\") != -1)\r\n\t\t\treturn \"&\";\r\n\t\telse\r\n\t\t\treturn \"?\";\r\n\t}\r\n};\r\n\r\nscheduler.$ajax = scheduler.ajax; // for old\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nvar generateStringToDate = function (format, utc) {\r\n\tvar splt = \"var temp=date.match(/[a-zA-Z]+|[0-9]+/g);\";\r\n\tvar mask = format.match(/%[a-zA-Z]/g);\r\n\tfor (var i = 0; i < mask.length; i++) {\r\n\t\tswitch (mask[i]) {\r\n\t\t\tcase \"%j\":\r\n\t\t\tcase \"%d\": splt += \"set[2]=temp[\" + i + \"]||1;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%n\":\r\n\t\t\tcase \"%m\": splt += \"set[1]=(temp[\" + i + \"]||1)-1;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%y\": splt += \"set[0]=temp[\" + i + \"]*1+(temp[\" + i + \"]>50?1900:2000);\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%g\":\r\n\t\t\tcase \"%G\":\r\n\t\t\tcase \"%h\":\r\n\t\t\tcase \"%H\":\r\n\t\t\t\tsplt += \"set[3]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%i\":\r\n\t\t\t\tsplt += \"set[4]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%Y\": splt += \"set[0]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%a\":\r\n\t\t\tcase \"%A\": splt += \"set[3]=set[3]%12+((temp[\" + i + \"]||'').toLowerCase()=='am'?0:12);\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%s\": splt += \"set[5]=temp[\" + i + \"]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%M\": splt += \"set[1]=this.locale.date.month_short_hash[temp[\" + i + \"]]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%F\": splt += \"set[1]=this.locale.date.month_full_hash[temp[\" + i + \"]]||0;\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\tvar code = \"set[0],set[1],set[2],set[3],set[4],set[5]\";\r\n\tif (utc) code = \" Date.UTC(\" + code + \")\";\r\n\treturn new Function(\"date\", \"var set=[0,0,1,0,0,0]; \" + splt + \" return new Date(\" + code + \");\");\r\n};\r\nvar csp_date_to_str = function (format, utc) {\r\n\treturn function(date) {\r\n\t\treturn format.replace(/%[a-zA-Z]/g, function (a) {\r\n\t\t\tswitch (a) {\r\n\t\t\t\tcase \"%d\": return utc ? scheduler.date.to_fixed(date.getUTCDate()) : scheduler.date.to_fixed(date.getDate());\r\n\t\t\t\tcase \"%m\": return utc ? scheduler.date.to_fixed((date.getUTCMonth() + 1)) : scheduler.date.to_fixed((date.getMonth() + 1));\r\n\t\t\t\tcase \"%j\": return utc ? date.getUTCDate() : date.getDate();\r\n\t\t\t\tcase \"%n\": return utc ? (date.getUTCMonth() + 1) : (date.getMonth() + 1);\r\n\t\t\t\tcase \"%y\": return utc ? scheduler.date.to_fixed(date.getUTCFullYear() % 100) : scheduler.date.to_fixed(date.getFullYear() % 100);\r\n\t\t\t\tcase \"%Y\": return utc ? date.getUTCFullYear() : date.getFullYear();\r\n\t\t\t\tcase \"%D\": return utc ? scheduler.locale.date.day_short[date.getUTCDay()] : scheduler.locale.date.day_short[date.getDay()];\r\n\t\t\t\tcase \"%l\": return utc ? scheduler.locale.date.day_full[date.getUTCDay()] : scheduler.locale.date.day_full[date.getDay()];\r\n\t\t\t\tcase \"%M\": return utc ? scheduler.locale.date.month_short[date.getUTCMonth()] : scheduler.locale.date.month_short[date.getMonth()];\r\n\t\t\t\tcase \"%F\": return utc ? scheduler.locale.date.month_full[date.getUTCMonth()] : scheduler.locale.date.month_full[date.getMonth()];\r\n\t\t\t\tcase \"%h\": return utc ? scheduler.date.to_fixed((date.getUTCHours() + 11) % 12 + 1) : scheduler.date.to_fixed((date.getHours() + 11) % 12 + 1);\r\n\t\t\t\tcase \"%g\": return utc ? ((date.getUTCHours() + 11) % 12 + 1) : ((date.getHours() + 11) % 12 + 1);\r\n\t\t\t\tcase \"%G\": return utc ? date.getUTCHours() : date.getHours();\r\n\t\t\t\tcase \"%H\": return utc ? scheduler.date.to_fixed(date.getUTCHours()) : scheduler.date.to_fixed(date.getHours());\r\n\t\t\t\tcase \"%i\": return utc ? scheduler.date.to_fixed(date.getUTCMinutes()) : scheduler.date.to_fixed(date.getMinutes());\r\n\t\t\t\tcase \"%a\": return utc ? (date.getUTCHours() > 11 ? \"pm\" : \"am\") : (date.getHours() > 11 ? \"pm\" : \"am\");\r\n\t\t\t\tcase \"%A\": return utc ? (date.getUTCHours() > 11 ? \"PM\" : \"AM\") : (date.getHours() > 11 ? \"PM\" : \"AM\");\r\n\t\t\t\tcase \"%s\": return utc ? scheduler.date.to_fixed(date.getUTCSeconds()) : scheduler.date.to_fixed(date.getSeconds());\r\n\t\t\t\tcase \"%W\": return utc ? scheduler.date.to_fixed(scheduler.date.getUTCISOWeek(date)) : scheduler.date.to_fixed(scheduler.date.getISOWeek(date));\r\n\t\t\t\tdefault: return a;\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n};\r\nvar csp_str_to_date = function (format, utc) {\r\n\tconst mask = format.match(/%[a-zA-Z]/g);\r\n\treturn function (date){\r\n\t\tvar set = [0, 0, 1, 0, 0, 0];\r\n\t\tvar temp = date.match(/[a-zA-Z]+|[0-9]+/g);\r\n\r\n\t\tfor (var i = 0; i < mask.length; i++) {\r\n\t\t\tswitch (mask[i]) {\r\n\t\t\t\tcase \"%j\":\r\n\t\t\t\tcase \"%d\":\r\n\t\t\t\t\tset[2] = temp[i] || 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%n\":\r\n\t\t\t\tcase \"%m\":\r\n\t\t\t\t\tset[1] = (temp[i] || 1) - 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%y\":\r\n\t\t\t\t\tset[0] = temp[i] * 1 + (temp[i] > 50 ? 1900 : 2000);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%g\":\r\n\t\t\t\tcase \"%G\":\r\n\t\t\t\tcase \"%h\":\r\n\t\t\t\tcase \"%H\":\r\n\t\t\t\t\tset[3] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%i\":\r\n\t\t\t\t\tset[4] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\tset[0] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%a\":\r\n\t\t\t\tcase \"%A\":\r\n\t\t\t\t\tset[3] = set[3] % 12 + ((temp[i] || '').toLowerCase() == 'am' ? 0 : 12);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%s\":\r\n\t\t\t\t\tset[5] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%M\":\r\n\t\t\t\t\tset[1] = scheduler.locale.date.month_short_hash[temp[i]] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%F\":\r\n\t\t\t\t\tset[1] = scheduler.locale.date.month_full_hash[temp[i]] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (utc) {\r\n\t\t\treturn new Date(Date.UTC(set[0], set[1], set[2], set[3], set[4], set[5]));\r\n\t\t}\r\n\r\n\t\treturn new Date(set[0], set[1], set[2], set[3], set[4], set[5]);\r\n\t};\r\n};\r\n\r\nlet cspEnabled = undefined;\r\nfunction checkIfCSPEnabled(){\r\n\ttry {\r\n\t\tnew Function(\"cspEnabled = false;\");\r\n\t\tcspEnabled = false;\r\n\t} catch(e) {\r\n\t\tcspEnabled = true;\r\n\t}\r\n\treturn cspEnabled;\r\n}\r\n\r\nfunction useCsp() {\r\n\tvar result = false;\r\n\tif (scheduler.config.csp === \"auto\") {\r\n\t\tif(cspEnabled === undefined){\r\n\t\t\tcspEnabled = checkIfCSPEnabled();\r\n\t\t}\r\n\t\tresult = cspEnabled;\r\n\t} else {\r\n\t\tresult = scheduler.config.csp;\r\n\t}\r\n\treturn result;\r\n}\r\nscheduler.date = {\r\n\tinit:function(){\r\n\t\tvar s = scheduler.locale.date.month_short;\r\n\t\tvar t = scheduler.locale.date.month_short_hash = {};\r\n\t\tfor (var i = 0; i < s.length; i++)\r\n\t\t\tt[s[i]]=i;\r\n\r\n\t\tvar s = scheduler.locale.date.month_full;\r\n\t\tvar t = scheduler.locale.date.month_full_hash = {};\r\n\t\tfor (var i = 0; i < s.length; i++)\r\n\t\t\tt[s[i]]=i;\r\n\t},\r\n\tdate_part:function(date){\r\n\t\tvar old = new Date(date);\r\n\t\tdate.setHours(0);\r\n\t\tdate.setMinutes(0);\r\n\t\tdate.setSeconds(0);\r\n\t\tdate.setMilliseconds(0);\r\n\t\tif (date.getHours() && //shift to yesterday on dst\r\n\t\t\t(date.getDate() < old.getDate() || date.getMonth() < old.getMonth() || date.getFullYear() < old.getFullYear()) )\r\n\t\t\tdate.setTime(date.getTime() + 60 * 60 * 1000 * (24 - date.getHours()));\r\n\t\treturn date;\r\n\t},\r\n\ttime_part:function(date){\r\n\t\treturn (date.valueOf()/1000 - date.getTimezoneOffset()*60)%86400;\r\n\t},\r\n\tweek_start:function(date){\r\n\t\tvar shift=date.getDay();\r\n\t\tif (scheduler.config.start_on_monday){\r\n\t\t\tif (shift===0) shift=6;\r\n\t\t\telse shift--;\r\n\t\t}\r\n\t\treturn this.date_part(this.add(date,-1*shift,\"day\"));\r\n\t},\r\n\tmonth_start:function(date){\r\n\t\tdate.setDate(1);\r\n\t\treturn this.date_part(date);\r\n\t},\r\n\tyear_start:function(date){\r\n\t\tdate.setMonth(0);\r\n\t\treturn this.month_start(date);\r\n\t},\r\n\tday_start:function(date){\r\n\t\treturn this.date_part(date);\r\n\t},\r\n\t_add_days:function(date, inc){\r\n\t\tvar ndate = new Date(date.valueOf());\r\n\r\n\t\tndate.setDate(ndate.getDate() + inc);\r\n\r\n\t\t// Workaround for Safari/iOS timezone bug, ref:OKZ-149693\r\n\t\tif(inc == Math.round(inc) && inc > 0){\r\n\t\t\tvar datesDiff = +ndate - +date,\r\n\t\t\t\trest = datesDiff % (24*60*60*1000);\r\n\t\t\tif(rest && date.getTimezoneOffset() == ndate.getTimezoneOffset()){\r\n\t\t\t\tvar hours = rest / (60* 60 * 1000);\r\n\t\t\t\tndate.setTime(ndate.getTime() + (24 - hours) * 60 * 60 * 1000);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (inc >= 0 && (!date.getHours() && ndate.getHours()) &&//shift to yesterday on dst\r\n\t\t\t(ndate.getDate() < date.getDate() || ndate.getMonth() < date.getMonth() || ndate.getFullYear() < date.getFullYear()) )\r\n\t\t\tndate.setTime(ndate.getTime() + 60 * 60 * 1000 * (24 - ndate.getHours()));\r\n\t\treturn ndate;\r\n\t},\r\n\tadd:function(date,inc,mode){\r\n\t\tvar ndate=new Date(date.valueOf());\r\n\t\tswitch(mode){\r\n\t\t\tcase \"day\":\r\n\t\t\t\tndate = scheduler.date._add_days(ndate, inc);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"week\":\r\n\t\t\t\tndate = scheduler.date._add_days(ndate, inc * 7);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"month\": ndate.setMonth(ndate.getMonth()+inc); break;\r\n\t\t\tcase \"year\": ndate.setYear(ndate.getFullYear()+inc); break;\r\n\t\t\tcase \"hour\":\r\n\t\t\t\t/*\r\n\t\t\t\t setHour(getHour() + inc) and setMinutes gives weird result when is applied on a Daylight Saving time switch\r\n\t\t\t\t setTime seems working as expected\r\n\t\t\t\t*/\r\n\t\t\t\tndate.setTime(ndate.getTime() + inc * 60 * 60 * 1000);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"minute\":\r\n\t\t\t\tndate.setTime(ndate.getTime() + inc * 60 * 1000);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\treturn scheduler.date[\"add_\"+mode](date,inc,mode);\r\n\t\t}\r\n\t\treturn ndate;\r\n\t},\r\n\tto_fixed:function(num){\r\n\t\tif (num<10)\treturn \"0\"+num;\r\n\t\treturn num;\r\n\t},\r\n\tcopy:function(date){\r\n\t\treturn new Date(date.valueOf());\r\n\t},\r\n\tdate_to_str:function(format,utc){\r\n\t\tif (useCsp()) {\r\n\t\t\treturn csp_date_to_str(format,utc);\r\n\t\t}\r\n\r\n\t\tformat=format.replace(/%[a-zA-Z]/g,function(a){\r\n\t\t\tswitch(a){\r\n\t\t\t\tcase \"%d\": return \"\\\"+this.date.to_fixed(date.getDate())+\\\"\";\r\n\t\t\t\tcase \"%m\": return \"\\\"+this.date.to_fixed((date.getMonth()+1))+\\\"\";\r\n\t\t\t\tcase \"%j\": return \"\\\"+date.getDate()+\\\"\";\r\n\t\t\t\tcase \"%n\": return \"\\\"+(date.getMonth()+1)+\\\"\";\r\n\t\t\t\tcase \"%y\": return \"\\\"+this.date.to_fixed(date.getFullYear()%100)+\\\"\";\r\n\t\t\t\tcase \"%Y\": return \"\\\"+date.getFullYear()+\\\"\";\r\n\t\t\t\tcase \"%D\": return \"\\\"+this.locale.date.day_short[date.getDay()]+\\\"\";\r\n\t\t\t\tcase \"%l\": return \"\\\"+this.locale.date.day_full[date.getDay()]+\\\"\";\r\n\t\t\t\tcase \"%M\": return \"\\\"+this.locale.date.month_short[date.getMonth()]+\\\"\";\r\n\t\t\t\tcase \"%F\": return \"\\\"+this.locale.date.month_full[date.getMonth()]+\\\"\";\r\n\t\t\t\tcase \"%h\": return \"\\\"+this.date.to_fixed((date.getHours()+11)%12+1)+\\\"\";\r\n\t\t\t\tcase \"%g\": return \"\\\"+((date.getHours()+11)%12+1)+\\\"\";\r\n\t\t\t\tcase \"%G\": return \"\\\"+date.getHours()+\\\"\";\r\n\t\t\t\tcase \"%H\": return \"\\\"+this.date.to_fixed(date.getHours())+\\\"\";\r\n\t\t\t\tcase \"%i\": return \"\\\"+this.date.to_fixed(date.getMinutes())+\\\"\";\r\n\t\t\t\tcase \"%a\": return \"\\\"+(date.getHours()>11?\\\"pm\\\":\\\"am\\\")+\\\"\";\r\n\t\t\t\tcase \"%A\": return \"\\\"+(date.getHours()>11?\\\"PM\\\":\\\"AM\\\")+\\\"\";\r\n\t\t\t\tcase \"%s\": return \"\\\"+this.date.to_fixed(date.getSeconds())+\\\"\";\r\n\t\t\t\tcase \"%W\": return \"\\\"+this.date.to_fixed(this.date.getISOWeek(date))+\\\"\";\r\n\t\t\t\tdefault: return a;\r\n\t\t\t}\r\n\t\t});\r\n\t\tif (utc) format=format.replace(/date\\.get/g,\"date.getUTC\");\r\n\t\tvar func = new Function(\"date\",\"return \\\"\"+format+\"\\\";\");\r\n\r\n\t\treturn func.bind(scheduler);\r\n\t},\r\n\tstr_to_date:function(format, utc, exactFormat){\r\n\t\tvar stringToDateMethod = useCsp() ? csp_str_to_date : generateStringToDate;\r\n\t\tvar parseExactFormat = stringToDateMethod(format, utc);\r\n\t\t// eslint-disable-next-line\r\n\t\tvar yyyyMMddhhIIss = /^[0-9]{4}(\\-|\\/)[0-9]{2}(\\-|\\/)[0-9]{2} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/;\r\n\r\n\t\t// MM/dd/yyyy - default old format for xml-date\r\n\t\t// eslint-disable-next-line\r\n\t\tvar MMddyyyyhhIIss = /^[0-9]{2}\\/[0-9]{2}\\/[0-9]{4} ?(([0-9]{1,2}:[0-9]{2})(:[0-9]{1,2})?)?$/;\r\n\t\t// dd-MM-yyyy - default old format for api-date\r\n\t\t// eslint-disable-next-line\r\n\t\tvar ddMMyyyyhhIIss = /^[0-9]{2}\\-[0-9]{2}\\-[0-9]{4} ?(([0-9]{1,2}:[0-9]{1,2})(:[0-9]{1,2})?)?$/;\r\n\t\t// eslint-disable-next-line\r\n\t\tvar ISO8601 = /^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$/;\r\n\r\n\t\tvar isYMDDate = function (datestr) {\r\n\t\t\treturn yyyyMMddhhIIss.test(String(datestr));\r\n\t\t};\r\n\r\n\t\tvar isMDYDate = function (datestr) {\r\n\t\t\treturn MMddyyyyhhIIss.test(String(datestr));\r\n\t\t};\r\n\t\tvar isDMYDate = function (datestr) {\r\n\t\t\treturn ddMMyyyyhhIIss.test(String(datestr));\r\n\t\t};\r\n\t\tvar isISO8601 = function (datestr) {\r\n\t\t\treturn ISO8601.test(datestr);\r\n\t\t};\r\n\r\n\t\tvar parseYMD = stringToDateMethod(\"%Y-%m-%d %H:%i:%s\", utc);\r\n\t\tvar parseMDY = stringToDateMethod(\"%m/%d/%Y %H:%i:%s\", utc);\r\n\t\tvar parseDMY = stringToDateMethod(\"%d-%m-%Y %H:%i:%s\", utc);\r\n\r\n\t\treturn function (dateString) {\r\n\r\n\t\t\tif (!exactFormat && !scheduler.config.parse_exact_format) {\r\n\t\t\t\tif (dateString && dateString.getISOWeek) {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t} else if (typeof dateString === \"number\") {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t} else if (isYMDDate(dateString)) {\r\n\t\t\t\t\treturn parseYMD(dateString);\r\n\t\t\t\t} else if (isMDYDate(dateString)) {\r\n\t\t\t\t\treturn parseMDY(dateString);\r\n\t\t\t\t} else if (isDMYDate(dateString)) {\r\n\t\t\t\t\treturn parseDMY(dateString);\r\n\t\t\t\t} else if (isISO8601(dateString)) {\r\n\t\t\t\t\treturn new Date(dateString);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn parseExactFormat.call(scheduler, dateString);\r\n\t\t};\r\n\t},\r\n\tgetISOWeek: function(ndate) {\r\n\t\tif(!ndate) return false;\r\n\t\tndate = this.date_part(new Date(ndate));\r\n\t\tvar nday = ndate.getDay();\r\n\t\tif (nday === 0) {\r\n\t\t\tnday = 7;\r\n\t\t}\r\n\t\tvar first_thursday = new Date(ndate.valueOf());\r\n\t\tfirst_thursday.setDate(ndate.getDate() + (4 - nday));\r\n\t\tvar year_number = first_thursday.getFullYear(); // year of the first Thursday\r\n\t\tvar ordinal_date = Math.round( (first_thursday.getTime() - new Date(year_number, 0, 1).getTime()) / 86400000); //ordinal date of the first Thursday - 1 (so not really ordinal date)\r\n\t\tvar week_number = 1 + Math.floor( ordinal_date / 7);\r\n\t\treturn week_number;\r\n\t},\r\n\tgetUTCISOWeek: function(ndate){\r\n\t\treturn this.getISOWeek(this.convert_to_utc(ndate));\r\n\t},\r\n\tconvert_to_utc: function(date) {\r\n\t\treturn new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds());\r\n\t}\r\n};\r\n\r\n}\r\n\r\n","export default function extend(scheduler) {\r\n\r\n/*\r\n%e\tDay of the month without leading zeros (01..31)\r\n%d\tDay of the month, 2 digits with leading zeros (01..31)\r\n%j\tDay of the year, 3 digits with leading zeros (001..366)\r\n%a\tA textual representation of a day, two letters\r\n%W\tA full textual representation of the day of the week\r\n\r\n%c\tNumeric representation of a month, without leading zeros (0..12)\r\n%m\tNumeric representation of a month, with leading zeros (00..12)\r\n%b\tA short textual representation of a month, three letters (Jan..Dec)\r\n%M\tA full textual representation of a month, such as January or March (January..December)\r\n\r\n%y\tA two digit representation of a year (93..03)\r\n%Y\tA full numeric representation of a year, 4 digits (1993..03)\r\n*/\r\n\r\nscheduler.config={\r\n\tdefault_date: \"%j %M %Y\",\r\n\tmonth_date: \"%F %Y\",\r\n\tload_date: \"%Y-%m-%d\",\r\n\tweek_date: \"%l\",\r\n\tday_date: \"%D %j\",\r\n\thour_date: \"%H:%i\",\r\n\tmonth_day: \"%d\",\r\n\t//xml_date: \"%m/%d/%Y %H:%i\",\r\n\tdate_format: \"%Y-%m-%d %H:%i\",\r\n\tapi_date: \"%d-%m-%Y %H:%i\",\r\n\tparse_exact_format: false,\r\n\tpreserve_length:true,\r\n\ttime_step: 5,\r\n\tdisplayed_event_color: \"#ff4a4a\",\r\n\tdisplayed_event_text_color: \"#ffef80\",\r\n\twide_form: 0,\r\n\tday_column_padding: 8,\r\n\tuse_select_menu_space: true,\r\n\tfix_tab_position: true,\r\n\tstart_on_monday: true,\r\n\tfirst_hour: 0,\r\n\tlast_hour: 24,\r\n\treadonly: false,\r\n\tdrag_resize: true,\r\n\tdrag_move: true,\r\n\tdrag_create: true,\r\n\tdrag_event_body: true,\r\n\tdblclick_create: true,\r\n\tdetails_on_dblclick: true,\r\n\tedit_on_create: true,\r\n\tdetails_on_create: true,\r\n\theader: null,\r\n\thour_size_px: 44,\r\n\tresize_month_events:false,\r\n\tresize_month_timed:false,\r\n\tresponsive_lightbox: false,\r\n\tseparate_short_events: true,\r\n\trtl:false,\r\n\r\n\tcascade_event_display: false,\r\n\tcascade_event_count: 4,\r\n\tcascade_event_margin: 30,\r\n\r\n\tmulti_day:true,\r\n\tmulti_day_height_limit: 200,\r\n\r\n\tdrag_lightbox: true,\r\n\tpreserve_scroll: true,\r\n\tselect: true,\r\n\tundo_deleted: true,\r\n\tserver_utc: false,\r\n\ttouch:true,\r\n\ttouch_tip:true,\r\n\ttouch_drag:500,\r\n\ttouch_swipe_dates: false,\r\n\tquick_info_detached:true,\r\n\r\n\tpositive_closing: false,\r\n\t//header_datepicker: true,\r\n\tdrag_highlight: true,\r\n\tlimit_drag_out: false,\r\n\ticons_edit: [\"icon_save\", \"icon_cancel\"],\r\n\ticons_select: [\"icon_details\", \"icon_edit\", \"icon_delete\"],\r\n\tbuttons_left: [\"dhx_save_btn\", \"dhx_cancel_btn\"],\r\n\tbuttons_right: [\"dhx_delete_btn\"],\r\n\tlightbox: {\r\n\t\tsections: [\r\n\t\t\t{name: \"description\", map_to: \"text\", type: \"textarea\", focus: true},\r\n\t\t\t{name: \"time\", height: 72, type: \"time\", map_to: \"auto\"}\r\n\t\t]\r\n\t},\r\n\thighlight_displayed_event: true,\r\n\tleft_border: false,\r\n\r\n\tajax_error: \"alert\",//\"ignore\"|\"console\"\r\n\tdelay_render: 0,\r\n\ttimeline_swap_resize: true,\r\n\twai_aria_attributes: true,\r\n\twai_aria_application_role: true,\r\n\r\n\tcsp: \"auto\",\r\n\tevent_attribute: \"data-event-id\",\r\n\tshow_errors: true\r\n};\r\n\r\nscheduler.config.buttons_left.$initial = scheduler.config.buttons_left.join();\r\nscheduler.config.buttons_right.$initial = scheduler.config.buttons_right.join();\r\n\r\nscheduler._helpers = {\r\n\tparseDate: function parseDate(date) {\r\n\t\tvar parse = scheduler.templates.xml_date || scheduler.templates.parse_date;\r\n\t\treturn parse(date);\r\n\t},\r\n\tformatDate: function formatDate(date) {\r\n\t\tvar format = scheduler.templates.xml_format || scheduler.templates.format_date;\r\n\t\treturn format(date);\r\n\t}\r\n};\r\n\r\nscheduler.templates={};\r\nscheduler.init_templates=function(){\r\n\r\n\r\n\r\n\tvar d=scheduler.date.date_to_str;\r\n\tvar c=scheduler.config;\r\n\tvar f = function(a,b){\r\n\t\tfor (var c in b)\r\n\t\t\tif (!a[c]) a[c]=b[c];\r\n\t};\r\n\tf(scheduler.templates,{\r\n\t\tday_date:d(c.default_date),\r\n\t\tmonth_date:d(c.month_date),\r\n\t\tweek_date:function(d1,d2){\r\n\t\t\tif(c.rtl) {\r\n\t\t\t\treturn scheduler.templates.day_date(scheduler.date.add(d2,-1,\"day\"))+\" – \"+scheduler.templates.day_date(d1);\r\n\t\t\t} \r\n\t\t\treturn scheduler.templates.day_date(d1)+\" – \"+scheduler.templates.day_date(scheduler.date.add(d2,-1,\"day\"));\r\n\t\t},\r\n\t\tday_scale_date:d(c.default_date),\r\n\t\ttime_slot_text: function(date){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\ttime_slot_class: function(date){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\r\n\t\tmonth_scale_date:d(c.week_date),\r\n\t\tweek_scale_date:d(c.day_date),\r\n\t\thour_scale:d(c.hour_date),\r\n\t\ttime_picker:d(c.hour_date),\r\n\t\tevent_date:d(c.hour_date),\r\n\t\tmonth_day:d(c.month_day),\r\n\r\n\t\tload_format: d(c.load_date),\r\n\t//\txml_date:scheduler.date.str_to_date(c.xml_date,c.server_utc),\r\n\t//\txml_format:d(c.date_format,c.server_utc),\r\n\t\tformat_date: d(c.date_format, c.server_utc),\r\n\t\tparse_date:scheduler.date.str_to_date(c.date_format,c.server_utc),\r\n\t\tapi_date:scheduler.date.str_to_date(c.api_date, false, false),\r\n\t\tevent_header:function(start,end,ev){\r\n\r\n\t\t\tif(ev._mode === \"small\" || ev._mode === \"smallest\"){\r\n\t\t\t\treturn scheduler.templates.event_date(start);\r\n\t\t\t}else{\r\n\t\t\t\treturn scheduler.templates.event_date(start)+\" - \"+scheduler.templates.event_date(end);\r\n\t\t\t}\r\n\t\t},\r\n\t\tevent_text:function(start,end,ev){\r\n\t\t\treturn ev.text;\r\n\t\t},\r\n\t\tevent_class:function(start,end,ev){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tmonth_date_class:function(d){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tweek_date_class:function(d){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tevent_bar_date:function(start,end,ev) {\r\n\t\t\treturn scheduler.templates.event_date(start);\r\n\t\t},\r\n\t\tevent_bar_text:function(start,end,ev){\r\n\t\t\treturn ev.text;\r\n\t\t},\r\n\t\tmonth_events_link : function(date, count){\r\n\t\t\treturn \"View more(\"+count+\" events)\";\r\n\t\t},\r\n\t\tdrag_marker_class : function(start, end, event){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tdrag_marker_content : function(start, end, event){\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\t/* Could be redifined */\r\n\t\ttooltip_date_format: scheduler.date.date_to_str(\"%Y-%m-%d %H:%i\"),\r\n\t\ttooltip_text: function(start, end, event) {\r\n\t\t\treturn \"Event: \" + event.text + \"
Start date: \" + scheduler.templates.tooltip_date_format(start) + \"
End date: \" + scheduler.templates.tooltip_date_format(end);\r\n\t\t},\r\n\r\n\t\tcalendar_month: d(\"%F %Y\"),\r\n\t\tcalendar_scale_date: d(\"%D\"),\r\n\t\tcalendar_date: d(\"%d\"),\r\n\t\tcalendar_time: d(\"%d-%m-%Y\")\r\n\r\n\t});\r\n\tthis.callEvent(\"onTemplatesReady\",[]);\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler._events = {};\r\nscheduler.clearAll = function() {\r\n\tthis._events = {};\r\n\tthis._loaded = {};\r\n\r\n\tthis._edit_id = null;\r\n\tthis._select_id = null;\r\n\tthis._drag_id = null;\r\n\tthis._drag_mode = null;\r\n\tthis._drag_pos = null;\r\n\tthis._new_event = null;\r\n\r\n\tthis.clear_view();\r\n\tthis.callEvent(\"onClearAll\", []);\r\n};\r\nscheduler.addEvent = function(start_date, end_date, text, id, extra_data) {\r\n\tif (!arguments.length)\r\n\t\treturn this.addEventNow();\r\n\tvar ev = start_date;\r\n\tif (arguments.length != 1) {\r\n\t\tev = extra_data || {};\r\n\t\tev.start_date = start_date;\r\n\t\tev.end_date = end_date;\r\n\t\tev.text = text;\r\n\t\tev.id = id;\r\n\t}\r\n\tev.id = ev.id || scheduler.uid();\r\n\tev.text = ev.text || \"\";\r\n\r\n\tif (typeof ev.start_date == \"string\") ev.start_date = this.templates.api_date(ev.start_date);\r\n\tif (typeof ev.end_date == \"string\") ev.end_date = this.templates.api_date(ev.end_date);\r\n\tvar d = (this.config.event_duration || this.config.time_step) * 60000;\r\n\tif (ev.start_date.valueOf() == ev.end_date.valueOf())\r\n\t\tev.end_date.setTime(ev.end_date.valueOf() + d);\r\n\r\n\tev.start_date.setMilliseconds(0);\r\n\tev.end_date.setMilliseconds(0);\r\n\r\n\tev._timed = this.isOneDayEvent(ev);\r\n\r\n\tvar is_new = !this._events[ev.id];\r\n\tthis._events[ev.id] = ev;\r\n\tthis.event_updated(ev);\r\n\tif (!this._loading)\r\n\t\tthis.callEvent(is_new ? \"onEventAdded\" : \"onEventChanged\", [ev.id, ev]);\r\n\treturn ev.id;\r\n};\r\nscheduler.deleteEvent = function(id, silent) {\r\n\tvar ev = this._events[id];\r\n\tif (!silent && (!this.callEvent(\"onBeforeEventDelete\", [id, ev]) || !this.callEvent(\"onConfirmedBeforeEventDelete\", [id, ev])))\r\n\t\treturn;\r\n\tif (ev) {\r\n\t\tif(scheduler.getState().select_id == id){\r\n\t\t\tscheduler.unselect();\r\n\t\t}\r\n\t\tdelete this._events[id];\r\n\t\tthis.event_updated(ev);\r\n\r\n\t\tif(this._drag_id == ev.id){\r\n\t\t\tthis._drag_id = null;\r\n\t\t\tthis._drag_mode=null;\r\n\t\t\tthis._drag_pos=null;\r\n\t\t}\r\n\t}\r\n\r\n\tthis.callEvent(\"onEventDeleted\", [id, ev]);\r\n};\r\nscheduler.getEvent = function(id) {\r\n\treturn this._events[id];\r\n};\r\nscheduler.setEvent = function(id, hash) {\r\n\tif(!hash.id)\r\n\t\thash.id = id;\r\n\r\n\tthis._events[id] = hash;\r\n};\r\nscheduler.for_rendered = function(id, method) {\r\n\tfor (var i = this._rendered.length - 1; i >= 0; i--)\r\n\t\tif (this._rendered[i].getAttribute(this.config.event_attribute) == id)\r\n\t\t\tmethod(this._rendered[i], i);\r\n};\r\nscheduler.changeEventId = function(id, new_id) {\r\n\tif (id == new_id) return;\r\n\tvar ev = this._events[id];\r\n\tif (ev) {\r\n\t\tev.id = new_id;\r\n\t\tthis._events[new_id] = ev;\r\n\t\tdelete this._events[id];\r\n\t}\r\n\tthis.for_rendered(id, function(r) {\r\n\t\tr.setAttribute(\"event_id\", new_id); // for backward compatibility\r\n\t\tr.setAttribute(scheduler.config.event_attribute, new_id);\r\n\t});\r\n\tif (this._select_id == id) this._select_id = new_id;\r\n\tif (this._edit_id == id) this._edit_id = new_id;\r\n\t//if (this._drag_id==id) this._drag_id=new_id;\r\n\tthis.callEvent(\"onEventIdChange\", [id, new_id]);\r\n};\r\n\r\n(function() {\r\n\tvar attrs = [\"text\", \"Text\", \"start_date\", \"StartDate\", \"end_date\", \"EndDate\"];\r\n\tvar create_getter = function(name) {\r\n\t\treturn function(id) { return (scheduler.getEvent(id))[name]; };\r\n\t};\r\n\tvar create_setter = function(name) {\r\n\t\treturn function(id, value) {\r\n\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\tev[name] = value;\r\n\t\t\tev._changed = true;\r\n\t\t\tev._timed = this.isOneDayEvent(ev);\r\n\t\t\tscheduler.event_updated(ev, true);\r\n\t\t};\r\n\t};\r\n\tfor (var i = 0; i < attrs.length; i += 2) {\r\n\t\tscheduler[\"getEvent\" + attrs[i + 1]] = create_getter(attrs[i]);\r\n\t\tscheduler[\"setEvent\" + attrs[i + 1]] = create_setter(attrs[i]);\r\n\t}\r\n})();\r\n\r\nscheduler.event_updated = function(ev, force) {\r\n\tif (this.is_visible_events(ev))\r\n\t\tthis.render_view_data();\r\n\telse\r\n\t\tthis.clear_event(ev.id);\r\n};\r\nscheduler.is_visible_events = function(ev) {\r\n\tif(!this._min_date || !this._max_date){\r\n\t\treturn false;\r\n\t}\r\n\r\n\t//if in displayed dates\r\n\tvar in_visible_range = (ev.start_date.valueOf() < this._max_date.valueOf() && this._min_date.valueOf() < ev.end_date.valueOf());\r\n\r\n\tif(in_visible_range){\r\n\r\n\t\t//end dates are not between last/first hours\r\n\t\tvar evFirstHour = ev.start_date.getHours(),\r\n\t\t\tevLastHour = ev.end_date.getHours() + (ev.end_date.getMinutes()/60),\r\n\t\t\tlastHour = this.config.last_hour,\r\n\t\t\tfirstHour = this.config.first_hour;\r\n\r\n\t\tvar end_dates_visible = (this._table_view || !((evLastHour > lastHour || evLastHour <= firstHour) && (evFirstHour >= lastHour || evFirstHour < firstHour)));\r\n\r\n\t\tif(end_dates_visible){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\r\n\t\t\t//event is bigger than area hidden between last/first hours\r\n\t\t\tvar event_duration = (ev.end_date.valueOf() - ev.start_date.valueOf()) / (1000*60*60),//hours\r\n\t\t\t\thidden_duration = 24 - (this.config.last_hour - this.config.first_hour);\r\n\r\n\t\t\treturn !!((event_duration > hidden_duration) || (evFirstHour < lastHour && evLastHour > firstHour));\r\n\r\n\t\t}\r\n\t}else{\r\n\t\treturn false;\r\n\t}\r\n};\r\nscheduler.isOneDayEvent = function(ev) {\r\n\t// decrease by one ms so events that ends on midnight on the next day were still considered one day events\r\n\t// e.g. (09-02-2018 19:00 - 10-02-2018 00:00)\r\n\t// events >= 24h long are considered multiday\r\n\tvar checkEndDate = new Date(ev.end_date.valueOf() - 1);\r\n\treturn (\r\n\t\tev.start_date.getFullYear() === checkEndDate.getFullYear() &&\r\n\t\tev.start_date.getMonth() === checkEndDate.getMonth() &&\r\n\t\tev.start_date.getDate() === checkEndDate.getDate()\r\n\t) && ((ev.end_date.valueOf() - ev.start_date.valueOf()) < (1000 * 60 * 60 * 24));\r\n};\r\n\r\nscheduler.get_visible_events = function(only_timed) {\r\n\t//not the best strategy for sure\r\n\tvar stack = [];\r\n\r\n\tfor (var id in this._events)\r\n\t\tif (this.is_visible_events(this._events[id]))\r\n\t\t\tif (!only_timed || this._events[id]._timed)\r\n\t\t\t\tif (this.filter_event(id, this._events[id]))\r\n\t\t\t\t\tstack.push(this._events[id]);\r\n\r\n\treturn stack;\r\n};\r\nscheduler.filter_event = function(id, ev) {\r\n\tvar filter = this[\"filter_\" + this._mode];\r\n\treturn (filter) ? filter(id, ev) : true;\r\n};\r\nscheduler._is_main_area_event = function(ev){\r\n\treturn !!ev._timed;\r\n};\r\nscheduler.render_view_data = function(evs, hold) {\r\n\tvar full = false;\r\n\tif (!evs) {\r\n\t\tfull = true;\r\n\t\tif (this._not_render) {\r\n\t\t\tthis._render_wait = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._render_wait = false;\r\n\r\n\t\tthis.clear_view();\r\n\t\tevs = this.get_visible_events(!(this._table_view || this.config.multi_day));\r\n\t}\r\n\tfor(var i= 0, len = evs.length; i < len; i++){\r\n\t\tthis._recalculate_timed(evs[i]);\r\n\t}\r\n\r\n\tif (this.config.multi_day && !this._table_view) {\r\n\r\n\t\tvar tvs = [];\r\n\t\tvar tvd = [];\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tif (this._is_main_area_event(evs[i]))\r\n\t\t\t\ttvs.push(evs[i]);\r\n\t\t\telse\r\n\t\t\t\ttvd.push(evs[i]);\r\n\t\t}\r\n\r\n\t\tif(!this._els['dhx_multi_day']){\r\n\t\t\tvar message = scheduler._commonErrorMessages.unknownView(this._mode);\r\n\t\t\tthrow new Error(message);\r\n\t\t}\r\n\r\n\t\t// multiday events\r\n\t\tthis._rendered_location = this._els['dhx_multi_day'][0];\r\n\t\tthis._table_view = true;\r\n\t\tthis.render_data(tvd, hold);\r\n\t\tthis._table_view = false;\r\n\r\n\t\t// normal events\r\n\t\tthis._rendered_location = this._els['dhx_cal_data'][0];\r\n\t\tthis._table_view = false;\r\n\t\tthis.render_data(tvs, hold);\r\n\r\n\t} else {\r\n\t\tvar buffer = document.createDocumentFragment();\r\n\t\tvar renderedLocation = this._els['dhx_cal_data'][0];\r\n\t\tthis._rendered_location = buffer;\r\n\t\tthis.render_data(evs, hold);\r\n\t\trenderedLocation.appendChild(buffer);\r\n\t\tthis._rendered_location = renderedLocation;\r\n\r\n\t}\r\n\r\n\tif(full){\r\n\t\tthis.callEvent(\"onDataRender\", []);\r\n\t}\r\n};\r\n\r\n\r\nscheduler._view_month_day = function(e){\r\n\tvar date = scheduler.getActionData(e).date;\r\n\tif(!scheduler.callEvent(\"onViewMoreClick\", [date]))\r\n\t\treturn;\r\n\tscheduler.setCurrentView(date, \"day\");\r\n};\r\n\r\nscheduler._render_month_link = function(ev){\r\n\tvar parent = this._rendered_location;\r\n\tvar toRender = this._lame_clone(ev);\r\n\r\n\t//render links in each cell of multiday events\r\n\tfor(var d = ev._sday; d < ev._eday; d++){\r\n\r\n\t\ttoRender._sday = d;\r\n\t\ttoRender._eday = d+1;\r\n\r\n\t\tvar date = scheduler.date;\r\n\t\tvar curr = scheduler._min_date;\r\n\t\tcurr = date.add(curr, toRender._sweek, \"week\");\r\n\t\tcurr = date.add(curr, toRender._sday, \"day\");\r\n\t\tvar count = scheduler.getEvents(curr, date.add(curr, 1, \"day\")).length;\r\n\r\n\t\tvar pos = this._get_event_bar_pos(toRender);\r\n\t\tvar widt = (pos.x2 - pos.x);\r\n\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tscheduler.event(el, \"click\", function(e){scheduler._view_month_day(e);});\r\n\t\tel.className = \"dhx_month_link\";\r\n\t\tel.style.top = pos.y + \"px\";\r\n\t\tel.style.left = pos.x + \"px\";\r\n\t\tel.style.width = widt + \"px\";\r\n\t\tel.innerHTML = scheduler.templates.month_events_link(curr, count);\r\n\t\tthis._rendered.push(el);\r\n\r\n\t\tparent.appendChild(el);\r\n\t}\r\n};\r\n\r\nscheduler._recalculate_timed = function(id){\r\n\tif(!id) return;\r\n\tvar ev;\r\n\tif(typeof(id) != \"object\")\r\n\t\tev = this._events[id];\r\n\telse\r\n\t\tev = id;\r\n\tif(!ev) return;\r\n\tev._timed = scheduler.isOneDayEvent(ev);\r\n};\r\nscheduler.attachEvent(\"onEventChanged\", scheduler._recalculate_timed);\r\nscheduler.attachEvent(\"onEventAdded\", scheduler._recalculate_timed);\r\n\r\nscheduler.render_data = function(evs, hold) {\r\n\tevs = this._pre_render_events(evs, hold);\r\n\tvar containers = {};\r\n\tfor (var i = 0; i < evs.length; i++)\r\n\t\tif (this._table_view){\r\n\t\t\tif(scheduler._mode != 'month'){\r\n\t\t\t\tthis.render_event_bar(evs[i]);//may be multiday section on other views\r\n\t\t\t}else{\r\n\r\n\t\t\t\tvar max_evs = scheduler.config.max_month_events;\r\n\t\t\t\tif(max_evs !== max_evs*1 || evs[i]._sorder < max_evs){\r\n\t\t\t\t\t//of max number events per month cell is set and event can be rendered\r\n\t\t\t\t\tthis.render_event_bar(evs[i]);\r\n\t\t\t\t}else if(max_evs !== undefined && evs[i]._sorder == max_evs){\r\n\t\t\t\t\t//render 'view more' links\r\n\t\t\t\t\tscheduler._render_month_link(evs[i]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//do not render events with ordinal number > maximum events per cell\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t}else{\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tvar parent = scheduler.locate_holder(ev._sday);\r\n\t\t\tif (!parent) continue; //attempt to render non-visible event\r\n\r\n\t\t\tif(!containers[ev._sday]){\r\n\t\t\t\tcontainers[ev._sday] = {\r\n\t\t\t\t\treal: parent,\r\n\t\t\t\t\tbuffer: document.createDocumentFragment(),\r\n\t\t\t\t\twidth: parent.clientWidth\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\tvar container = containers[ev._sday];\r\n\t\t\tthis.render_event(ev, container.buffer, container.width);\r\n\t\t}\r\n\r\n\t\tfor(var i in containers){\r\n\t\t\tvar container = containers[i];\r\n\t\t\tif(container.real && container.buffer){\r\n\t\t\t\tcontainer.real.appendChild(container.buffer);\r\n\t\t\t}\r\n\t\t}\r\n};\r\n\r\nscheduler._get_first_visible_cell = function(cells) {\r\n\tfor (var i = 0; i < cells.length; i++) {\r\n\t\tif ((cells[i].className || \"\").indexOf(\"dhx_scale_ignore\") == -1) {\r\n\t\t\treturn cells[i];\r\n\t\t}\r\n\t}\r\n\t// if no visible cell found, return cells[0] to be more tolerant, since it's the original logic\r\n\treturn cells[0];\r\n};\r\n\r\nscheduler._pre_render_events = function(evs, hold) {\r\n\tvar hb = this.xy.bar_height;\r\n\tvar h_old = this._colsS.heights;\r\n\tvar h = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0];\r\n\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\r\n\tif (!this._table_view) {\r\n\t\tevs = this._pre_render_events_line(evs, hold); //ignore long events for now\r\n\t}\r\n\telse {\r\n\t\tevs = this._pre_render_events_table(evs, hold);\r\n\t}\r\n\tif (this._table_view) {\r\n\t\tif (hold)\r\n\t\t\tthis._colsS.heights = h_old;\r\n\t\telse {\r\n\t\t\tvar monthRows = data.querySelectorAll(\".dhx_cal_month_row\");\r\n\t\t\tif (monthRows.length) {\r\n\t\t\t\tfor (var i = 0; i < monthRows.length; i++) {\r\n\t\t\t\t\th[i]++;\r\n\t\t\t\t\tvar cells = monthRows[i].querySelectorAll(\".dhx_cal_month_cell\");\r\n\t\t\t\t\tvar cellHeight = this._colsS.height - this.xy.month_head_height;\r\n\t\t\t\t\tif ((h[i]) * hb > cellHeight) { // 22 - height of cell's header\r\n\t\t\t\t\t\t//we have overflow, update heights\r\n\r\n\t\t\t\t\t\tvar cHeight = cellHeight;\r\n\t\t\t\t\t\tif(this.config.max_month_events*1 !== this.config.max_month_events || h[i] <= this.config.max_month_events){\r\n\t\t\t\t\t\t\tcHeight = h[i] * hb;\r\n\t\t\t\t\t\t}else if( (this.config.max_month_events + 1) * hb > cellHeight){\r\n\t\t\t\t\t\t\tcHeight = (this.config.max_month_events + 1) * hb;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tmonthRows[i].style.height = (cHeight + this.xy.month_head_height) + \"px\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\th[i] = (h[i - 1] || 0) + scheduler._get_first_visible_cell(cells).offsetHeight;\r\n\t\t\t\t}\r\n\t\t\t\th.unshift(0);\r\n\t\t\t\tconst dataArea = this.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tif (dataArea.offsetHeight < dataArea.scrollHeight && !scheduler._colsS.scroll_fix && scheduler.xy.scroll_width) {\r\n\r\n\t\t\t\t\tvar scale_settings = scheduler._colsS,\r\n\t\t\t\t\t\tsum_width = scale_settings[scale_settings.col_length],\r\n\t\t\t\t\t\trow_heights = scale_settings.heights.slice();\r\n\r\n\t\t\t\t\tsum_width -= (scheduler.xy.scroll_width || 0);\r\n\t\t\t\t\tthis._calc_scale_sizes(sum_width, this._min_date, this._max_date);\r\n\t\t\t\t\tscheduler._colsS.heights = row_heights;\r\n\r\n\t\t\t\t\tthis.set_xy(this._els[\"dhx_cal_header\"][0], sum_width/*, this.xy.scale_height*/);\r\n\t\t\t\t\tscheduler._render_scales(this._els[\"dhx_cal_header\"][0]);\r\n\t\t\t\t\tscheduler._render_month_scale(this._els[\"dhx_cal_data\"][0], this._get_timeunit_start(), this._min_date);\r\n\r\n\t\t\t\t\tscale_settings.scroll_fix = true;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (!evs.length && this._els[\"dhx_multi_day\"][0].style.visibility == \"visible\")\r\n\t\t\t\t\th[0] = -1;\r\n\t\t\t\tif (evs.length || h[0] == -1) {\r\n\t\t\t\t\t//shift days to have space for multiday events\r\n\t\t\t\t\t//var childs = evl.parentNode.childNodes;\r\n\r\n\t\t\t\t\t// +1 so multiday events would have 2px from top and 2px from bottom by default\r\n\t\t\t\t\tvar full_multi_day_height = (h[0] + 1) * hb + 4;\r\n\r\n\t\t\t\t\tvar used_multi_day_height = full_multi_day_height;\r\n\t\t\t\t\tvar used_multi_day_height_css = full_multi_day_height + \"px\";\r\n\t\t\t\t\tif (this.config.multi_day_height_limit) {\r\n\t\t\t\t\t\tused_multi_day_height = Math.min(full_multi_day_height, this.config.multi_day_height_limit) ;\r\n\t\t\t\t\t\tused_multi_day_height_css = used_multi_day_height + \"px\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar multi_day_section = this._els[\"dhx_multi_day\"][0];\r\n\t\t\t\t\tmulti_day_section.style.height = used_multi_day_height_css;\r\n\t\t\t\t\tmulti_day_section.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\tmulti_day_section.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\r\n\t\t\t\t\t// icon\r\n\t\t\t\t\tvar multi_day_icon = this._els[\"dhx_multi_day\"][1];\r\n\t\t\t\t\tmulti_day_icon.style.height = used_multi_day_height_css;\r\n\t\t\t\t\tmulti_day_icon.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\tmulti_day_icon.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\t\t\t\t\tmulti_day_icon.className = h[0] ? \"dhx_multi_day_icon\" : \"dhx_multi_day_icon_small\";\r\n\t\t\t\t\tthis._dy_shift = (h[0] + 1) * hb;\r\n\t\t\t\t\tif(this.config.multi_day_height_limit){\r\n\t\t\t\t\t\tthis._dy_shift = Math.min(this.config.multi_day_height_limit, this._dy_shift);\r\n\t\t\t\t\t}\r\n\t\t\t\t\th[0] = 0;\r\n\r\n\t\t\t\t\tif (used_multi_day_height != full_multi_day_height) {\r\n\r\n\t\t\t\t\t\tmulti_day_section.style.overflowY = \"auto\";\r\n\t\t\t\t\t//\tmulti_day_section.style.width = (parseInt(this._els[\"dhx_cal_navline\"][0].style.width)) + \"px\";\r\n\r\n\t\t\t\t\t\tmulti_day_icon.style.position = \"fixed\";\r\n\t\t\t\t\t\tmulti_day_icon.style.top = \"\";\r\n\t\t\t\t\t\tmulti_day_icon.style.left = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn evs;\r\n};\r\nscheduler._get_event_sday = function(ev) {\r\n\t// get day in current view\r\n\t// use rounding for 23 or 25 hour days on DST\r\n\tvar datePart = this.date.day_start(new Date(ev.start_date));\r\n\treturn Math.round((datePart.valueOf() - this._min_date.valueOf()) / (24 * 60 * 60 * 1000));\r\n};\r\nscheduler._get_event_mapped_end_date = function(ev) {\r\n\tvar end_date = ev.end_date;\r\n\tif (this.config.separate_short_events) {\r\n\t\tvar ev_duration = (ev.end_date - ev.start_date) / 60000; // minutes\r\n\t\tif (ev_duration < this._min_mapped_duration) {\r\n\t\t\tend_date = this.date.add(end_date, this._min_mapped_duration - ev_duration, \"minute\");\r\n\t\t}\r\n\t}\r\n\treturn end_date;\r\n};\r\nscheduler._pre_render_events_line = function(evs, hold){\r\n\tevs.sort(function(a, b) {\r\n\t\tif (a.start_date.valueOf() == b.start_date.valueOf())\r\n\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\treturn a.start_date > b.start_date ? 1 : -1;\r\n\t});\r\n\tvar days = []; //events by weeks\r\n\tvar evs_originals = [];\r\n\r\n\tthis._min_mapped_duration = Math.floor(this.xy.min_event_height * 60 / this.config.hour_size_px); // values could change along the way\r\n\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tvar ev = evs[i];\r\n\r\n\t\t//check date overflow\r\n\t\tvar sd = ev.start_date;\r\n\t\tvar ed = ev.end_date;\r\n\t\t//check scale overflow\r\n\t\tvar sh = sd.getHours();\r\n\t\tvar eh = ed.getHours();\r\n\t\tev._sday = this._get_event_sday(ev); // sday based on event start_date\r\n\t\tif (this._ignores[ev._sday]){\r\n\t\t\t//ignore event\r\n\t\t\tevs.splice(i,1);\r\n\t\t\ti--;\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tif (!days[ev._sday]) days[ev._sday] = [];\r\n\r\n\t\tif (!hold) {\r\n\t\t\tev._inner = false;\r\n\r\n\t\t\tvar stack = days[ev._sday];\r\n\r\n\t\t\twhile (stack.length) {\r\n\t\t\t\tvar t_ev = stack[stack.length - 1];\r\n\t\t\t\tvar t_end_date = this._get_event_mapped_end_date(t_ev);\r\n\t\t\t\tif (t_end_date.valueOf() <= ev.start_date.valueOf()) {\r\n\t\t\t\t\tstack.splice(stack.length - 1, 1);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar slot_index = stack.length;\r\n\t\t\tvar sorderSet = false;\r\n\t\t\tfor (var j = 0; j < stack.length; j++) {\r\n\t\t\t\tvar t_ev = stack[j];\r\n\t\t\t\tvar t_end_date = this._get_event_mapped_end_date(t_ev);\r\n\t\t\t\tif (t_end_date.valueOf() <= ev.start_date.valueOf()) {\r\n\t\t\t\t\tsorderSet = true;\r\n\t\t\t\t\tev._sorder = t_ev._sorder;\r\n\t\t\t\t\tslot_index = j;\r\n\t\t\t\t\tev._inner = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (stack.length)\r\n\t\t\t\tstack[stack.length - 1]._inner = true;\r\n\r\n\t\t\tif (!sorderSet) {\r\n\t\t\t\tif (stack.length) {\r\n\t\t\t\t\tif (stack.length <= stack[stack.length - 1]._sorder) {\r\n\t\t\t\t\t\tif (!stack[stack.length - 1]._sorder)\r\n\t\t\t\t\t\t\tev._sorder = 0;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tfor (j = 0; j < stack.length; j++) {\r\n\t\t\t\t\t\t\t\tvar _is_sorder = false;\r\n\t\t\t\t\t\t\t\tfor (var k = 0; k < stack.length; k++) {\r\n\t\t\t\t\t\t\t\t\tif (stack[k]._sorder == j) {\r\n\t\t\t\t\t\t\t\t\t\t_is_sorder = true;\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (!_is_sorder) {\r\n\t\t\t\t\t\t\t\t\tev._sorder = j;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\tev._inner = true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvar _max_sorder = stack[0]._sorder;\r\n\t\t\t\t\t\tfor (j = 1; j < stack.length; j++) {\r\n\t\t\t\t\t\t\tif (stack[j]._sorder > _max_sorder)\r\n\t\t\t\t\t\t\t\t_max_sorder = stack[j]._sorder;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tev._sorder = _max_sorder + 1;\r\n\t\t\t\t\t\tev._inner = false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else\r\n\t\t\t\t\tev._sorder = 0;\r\n\t\t\t}\r\n\r\n\t\t\tstack.splice(slot_index, slot_index == stack.length ? 0 : 1, ev);\r\n\r\n\t\t\tif (stack.length > (stack.max_count || 0)) {\r\n\t\t\t\tstack.max_count = stack.length;\r\n\t\t\t\tev._count = stack.length;\r\n\t\t\t} else {\r\n\t\t\t\tev._count = (ev._count) ? ev._count : 1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (sh < this.config.first_hour || eh >= this.config.last_hour) {\r\n\t\t\t// Need to create copy of event as we will be changing it's start/end date\r\n\t\t\t// e.g. first_hour = 11 and event.start_date hours = 9. Need to preserve that info\r\n\t\t\tevs_originals.push(ev);\r\n\t\t\tevs[i] = ev = this._copy_event(ev);\r\n\r\n\t\t\tif (sh < this.config.first_hour) {\r\n\t\t\t\tev.start_date.setHours(this.config.first_hour);\r\n\t\t\t\tev.start_date.setMinutes(0);\r\n\t\t\t}\r\n\t\t\tif (eh >= this.config.last_hour) {\r\n\t\t\t\tev.end_date.setMinutes(0);\r\n\t\t\t\tev.end_date.setHours(this.config.last_hour);\r\n\t\t\t}\r\n\r\n\t\t\tif (ev.start_date > ev.end_date || sh == this.config.last_hour) {\r\n\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (!hold) {\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tevs[i]._count = days[evs[i]._sday].max_count;\r\n\t\t}\r\n\t\tfor (var i = 0; i < evs_originals.length; i++)\r\n\t\t\tevs_originals[i]._count = days[evs_originals[i]._sday].max_count;\r\n\t}\r\n\r\n\treturn evs;\r\n};\r\nscheduler._time_order = function(evs) {\r\n\tevs.sort(function(a, b) {\r\n\t\tif (a.start_date.valueOf() == b.start_date.valueOf()) {\r\n\t\t\tif (a._timed && !b._timed) return 1;\r\n\t\t\tif (!a._timed && b._timed) return -1;\r\n\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\t}\r\n\t\treturn a.start_date > b.start_date ? 1 : -1;\r\n\t});\r\n};\r\n\r\nscheduler._is_any_multiday_cell_visible = function(from, to, event){\r\n\tvar cols = this._cols.length;\r\n\tvar isAnyCellVisible = false;\r\n\tvar checkDate = from;\r\n\tvar noCells = true;\r\n\tvar lastDayEnd = new Date(to);\r\n\tif(scheduler.date.day_start(new Date(to)).valueOf() != to.valueOf()){\r\n\t\tlastDayEnd = scheduler.date.day_start(lastDayEnd);\r\n\t\tlastDayEnd = scheduler.date.add(lastDayEnd, 1, \"day\");\r\n\t}\r\n\twhile(checkDate < lastDayEnd){\r\n\t\tnoCells = false;\r\n\t\tvar cellIndex = this.locate_holder_day(checkDate, false, event);\r\n\t\tvar weekCellIndex = cellIndex % cols;\r\n\t\tif(!this._ignores[weekCellIndex]){\r\n\t\t\tisAnyCellVisible = true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcheckDate = scheduler.date.add(checkDate, 1, \"day\");\r\n\t}\r\n\treturn noCells || isAnyCellVisible;\r\n};\r\n\r\nscheduler._pre_render_events_table = function(evs, hold) { // max - max height of week slot\r\n\tthis._time_order(evs);\r\n\tvar out = [];\r\n\tvar weeks = [\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[],\r\n\t\t[]\r\n\t]; //events by weeks\r\n\tvar max = this._colsS.heights;\r\n\tvar start_date;\r\n\tvar cols = this._cols.length;\r\n\tvar chunks_info = {};\r\n\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tvar ev = evs[i];\r\n\t\tvar id = ev.id;\r\n\t\tif (!chunks_info[id]) {\r\n\t\t\tchunks_info[id] = {\r\n\t\t\t\tfirst_chunk: true,\r\n\t\t\t\tlast_chunk: true\r\n\t\t\t};\r\n\t\t}\r\n\t\tvar chunk_info = chunks_info[id];\r\n\t\tvar sd = (start_date || ev.start_date);\r\n\t\tvar ed = ev.end_date;\r\n\t\t//trim events which are crossing through current view\r\n\t\tif (sd < this._min_date) {\r\n\t\t\tchunk_info.first_chunk = false;\r\n\t\t\tsd = this._min_date;\r\n\t\t}\r\n\t\tif (ed > this._max_date) {\r\n\t\t\tchunk_info.last_chunk = false;\r\n\t\t\ted = this._max_date;\r\n\t\t}\r\n\r\n\t\tvar locate_s = this.locate_holder_day(sd, false, ev);\r\n\t\tev._sday = locate_s % cols;\r\n\t\t//skip single day events for ignored dates\r\n\t\tif (this._ignores[ev._sday] && ev._timed) continue;\r\n\r\n\t\tvar locate_e = this.locate_holder_day(ed, true, ev) || cols;\r\n\t\tev._eday = (locate_e % cols) || cols; //cols used to fill full week, when event end on monday\r\n\t\tev._length = locate_e - locate_s;\r\n\t\t//3600000 - compensate 1 hour during winter|summer time shift\r\n\t\tev._sweek = Math.floor((this._correct_shift(sd.valueOf(), 1) - this._min_date.valueOf()) / (60 * 60 * 1000 * 24 * cols));\r\n\r\n\t\tvar isAnyCellVisible = scheduler._is_any_multiday_cell_visible(sd, ed, ev);\r\n\r\n\t\tif(!isAnyCellVisible){\r\n\t\t\tstart_date = null;\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\t//current slot\r\n\t\tvar stack = weeks[ev._sweek];\r\n\t\t//check order position\r\n\t\tvar stack_line;\r\n\r\n\t\tfor (stack_line = 0; stack_line < stack.length; stack_line++)\r\n\t\t\tif (stack[stack_line]._eday <= ev._sday)\r\n\t\t\t\tbreak;\r\n\r\n\t\tif (!ev._sorder || !hold) {\r\n\t\t\tev._sorder = stack_line;\r\n\t\t}\r\n\r\n\t\tif (ev._sday + ev._length <= cols) {\r\n\t\t\tstart_date = null;\r\n\t\t\tout.push(ev);\r\n\t\t\tstack[stack_line] = ev;\r\n\t\t\t//get max height of slot\r\n\t\t\tmax[ev._sweek] = stack.length - 1;\r\n\t\t\tev._first_chunk = chunk_info.first_chunk;\r\n\t\t\tev._last_chunk = chunk_info.last_chunk;\r\n\t\t} else { // split long event in chunks\r\n\t\t\tvar copy = this._copy_event(ev);\r\n\t\t\tcopy.id = ev.id;\r\n\t\t\tcopy._length = cols - ev._sday;\r\n\t\t\tcopy._eday = cols;\r\n\t\t\tcopy._sday = ev._sday;\r\n\t\t\tcopy._sweek = ev._sweek;\r\n\t\t\tcopy._sorder = ev._sorder;\r\n\t\t\tcopy.end_date = this.date.add(sd, copy._length, \"day\");\r\n\t\t\tcopy._first_chunk = chunk_info.first_chunk;\r\n\t\t\tif (chunk_info.first_chunk) {\r\n\t\t\t\tchunk_info.first_chunk = false;\r\n\t\t\t}\r\n\r\n\t\t\tout.push(copy);\r\n\t\t\tstack[stack_line] = copy;\r\n\t\t\tstart_date = copy.end_date;\r\n\t\t\t//get max height of slot\r\n\t\t\tmax[ev._sweek] = stack.length - 1;\r\n\t\t\ti--;\r\n\t\t\tcontinue; //repeat same step\r\n\t\t}\r\n\t}\r\n\treturn out;\r\n};\r\nscheduler._copy_dummy = function() {\r\n\tvar a = new Date(this.start_date);\r\n\tvar b = new Date(this.end_date);\r\n\tthis.start_date = a;\r\n\tthis.end_date = b;\r\n};\r\nscheduler._copy_event = function(ev) {\r\n\tthis._copy_dummy.prototype = ev;\r\n\treturn new this._copy_dummy();\r\n\t//return {start_date:ev.start_date, end_date:ev.end_date, text:ev.text, id:ev.id}\r\n};\r\nscheduler._rendered = [];\r\nscheduler.clear_view = function() {\r\n\tfor (var i = 0; i < this._rendered.length; i++) {\r\n\t\tvar obj = this._rendered[i];\r\n\t\tif (obj.parentNode) obj.parentNode.removeChild(obj);\r\n\t}\r\n\tthis._rendered = [];\r\n};\r\nscheduler.updateEvent = function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tthis.clear_event(id);\r\n\r\n\tif (ev && this.is_visible_events(ev) && this.filter_event(id, ev) && (this._table_view || this.config.multi_day || ev._timed)) {\r\n\t\tif (this.config.update_render){\r\n\t\t\tthis.render_view_data();\r\n\t\t}else{\r\n\t\t\tif(this.getState().mode == \"month\" && !this.getState().drag_id && !this.isOneDayEvent(ev)){\r\n\t\t\t\tthis.render_view_data();\r\n\t\t\t}else{\r\n\t\t\t\tthis.render_view_data([ev], true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.clear_event = function(id) {\r\n\tthis.for_rendered(id, function(node, i) {\r\n\t\tif (node.parentNode)\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\tscheduler._rendered.splice(i, 1);\r\n\t});\r\n};\r\nscheduler._y_from_date = function(date){\r\n\tvar sm = date.getHours() * 60 + date.getMinutes();\r\n\treturn ((Math.round((sm * 60 * 1000 - this.config.first_hour * 60 * 60 * 1000) * this.config.hour_size_px / (60 * 60 * 1000))) % (this.config.hour_size_px * 24)); //42px/hour\r\n};\r\nscheduler._calc_event_y = function(ev, min_height){\r\n\tmin_height = min_height || 0;\r\n\tvar sm = ev.start_date.getHours() * 60 + ev.start_date.getMinutes();\r\n\tvar em = (ev.end_date.getHours() * 60 + ev.end_date.getMinutes()) || (scheduler.config.last_hour * 60);\r\n\tvar top = this._y_from_date(ev.start_date);\r\n\r\n\tvar height = Math.max(min_height, (em - sm) * this.config.hour_size_px / 60); //42px/hour\r\n\treturn {\r\n\t\ttop: top,\r\n\t\theight: height\r\n\t};\r\n};\r\nscheduler.render_event = function(ev, buffer, parentWidth) {\r\n\tvar menu = scheduler.xy.menu_width;\r\n\tvar menu_offset = (this.config.use_select_menu_space) ? 0 : menu;\r\n\tif (ev._sday < 0) return; //can occur in case of recurring event during time shift\r\n\r\n\tvar parent = scheduler.locate_holder(ev._sday);\r\n\tif (!parent) return; //attempt to render non-visible event\r\n\r\n\tbuffer = buffer || parent;\r\n\r\n\tvar pos_y = this._calc_event_y(ev, scheduler.xy.min_event_height);\r\n\tvar top = pos_y.top,\r\n\t\theight = pos_y.height;\r\n\r\n\tvar ev_count = ev._count || 1;\r\n\tvar ev_sorder = ev._sorder || 0;\r\n\r\n\tparentWidth = parentWidth || parent.clientWidth;\r\n\tif(this.config.day_column_padding){\r\n\t\tparentWidth -= this.config.day_column_padding;\r\n\t}\r\n\r\n\tvar width = Math.floor((parentWidth - menu_offset) / ev_count);\r\n\tvar left = ev_sorder * width + 1;\r\n\tif (!ev._inner) width = width * (ev_count - ev_sorder);\r\n\tif (this.config.cascade_event_display) {\r\n\t\tvar limit = this.config.cascade_event_count;\r\n\t\tvar margin = this.config.cascade_event_margin;\r\n\t\tleft = ev_sorder % limit * margin;\r\n\t\tvar right = (ev._inner) ? (ev_count - ev_sorder - 1) % limit * margin / 2 : 0;\r\n\t\twidth = Math.floor(parentWidth - menu_offset - left - right);\r\n\t}\r\n\r\n\tif(height < 30){\r\n\t\tev._mode = \"smallest\";\r\n\t}else if(height < 42){\r\n\t\tev._mode = \"small\";\r\n\t}else{\r\n\t\tev._mode = null;\r\n\t}\r\n\r\n\tvar d = this._render_v_bar(ev, menu_offset + left, top, width, height, ev._text_style, scheduler.templates.event_header(ev.start_date, ev.end_date, ev), scheduler.templates.event_text(ev.start_date, ev.end_date, ev));\r\n\t\r\n\tif(ev._mode === \"smallest\"){\r\n\t\td.classList.add(\"dhx_cal_event--xsmall\");\r\n\t}else if (ev._mode === \"small\"){\r\n\t\td.classList.add(\"dhx_cal_event--small\");\r\n\t}\r\n\r\n\tthis._waiAria.eventAttr(ev, d);\r\n\tthis._rendered.push(d);\r\n\tbuffer.appendChild(d);\r\n\r\n\tvar parentPosition = parseInt( this.config.rtl ? parent.style.right : parent.style.left, 10);\r\n\r\n\tleft = left + parentPosition + menu_offset;\r\n\r\n\tif (this._edit_id == ev.id) {\r\n\r\n\t\td.style.zIndex = 1; //fix overlapping issue\r\n\t\twidth = Math.max(width, scheduler.xy.editor_width);\r\n\t\td = document.createElement(\"div\");\r\n\t\td.setAttribute(\"event_id\", ev.id); // for backward compatibility\r\n\t\td.setAttribute(this.config.event_attribute, ev.id);\r\n\r\n\t\tthis._waiAria.eventAttr(ev, d);\r\n\r\n\t\td.className = \"dhx_cal_event dhx_cal_editor\";\r\n\t\tif (this.config.rtl) left++;\r\n\t\tthis.set_xy(d, width, height, left, top);\r\n\r\n\r\n\t\tif(ev.color){\r\n\t\t\td.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tvar tplClass = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\r\n\t\tif(tplClass){\r\n\t\t\td.className += \" \" + tplClass;\r\n\t\t}\r\n\t\tvar d2 = document.createElement(\"div\");\r\n\t\td2.style.cssText += \"overflow:hidden;height:100%\";\r\n\r\n\t\td.appendChild(d2);\r\n\t\tthis._els[\"dhx_cal_data\"][0].appendChild(d);\r\n\t\tthis._rendered.push(d);\r\n\r\n\t\td2.innerHTML = \"\";\r\n\t\tthis._editor = d2.querySelector(\"textarea\");\r\n\t\t\r\n\t\tscheduler.event(this._editor, \"keydown\", function(e) {\r\n\t\t\tif (e.shiftKey) return true;\r\n\t\t\tvar code = e.keyCode;\r\n\t\t\tif (code == scheduler.keys.edit_save) scheduler.editStop(true);\r\n\t\t\tif (code == scheduler.keys.edit_cancel) scheduler.editStop(false);\r\n\r\n\t\t\tif(code == scheduler.keys.edit_save || code == scheduler.keys.edit_cancel){\r\n\t\t\t\tif(e.preventDefault) e.preventDefault();\r\n\t\t\t}\r\n\t\t});\r\n\t\tscheduler.event(this._editor, \"selectstart\", function (e) {\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn true;\r\n\t\t});\r\n\t\tscheduler._focus(this._editor, true);\r\n\t\t//IE and opera can add x-scroll during focusing\r\n\t\tthis._els[\"dhx_cal_data\"][0].scrollLeft = 0;\r\n\t}\r\n\tif (this.xy.menu_width !== 0 && this._select_id == ev.id) {\r\n\r\n\t\tif (this.config.cascade_event_display && this._drag_mode)\r\n\t\t\td.style.zIndex = 1; //fix overlapping issue for cascade view in case of dnd of selected event\r\n\t\tvar icons = this.config[\"icons_\" + ((this._edit_id == ev.id) ? \"edit\" : \"select\")];\r\n\t\tvar icons_str = \"\";\r\n\r\n\t\tvar ariaAttr;\r\n\r\n\t\tfor (var i = 0; i < icons.length; i++) {\r\n\t\t\tconst currentIcon = icons[i];\r\n\t\t\tariaAttr = this._waiAria.eventMenuAttrString(currentIcon);\r\n\t\t\ticons_str += `
`;\r\n\t\t}\r\n\t\tvar obj = this._render_v_bar(ev, left - menu - 1, top, menu, null, \"\", \"
\", icons_str, true);\r\n\r\n\t\tif(ev.color){\r\n\t\t\tobj.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tobj.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\t//obj.style.left = left - menu + 1;\r\n\t\tthis._els[\"dhx_cal_data\"][0].appendChild(obj);\r\n\t\tthis._rendered.push(obj);\r\n\t}\r\n\tif(this.config.drag_highlight && this._drag_id == ev.id){\r\n\t\tthis.highlightEventPosition(ev);\r\n\t}\r\n};\r\nscheduler._render_v_bar = function (ev, x, y, w, h, style, contentA, contentB, bottom) {\r\n\tvar d = document.createElement(\"div\");\r\n\tvar id = ev.id;\r\n\tvar cs = (bottom) ? \"dhx_cal_event dhx_cal_select_menu\" : \"dhx_cal_event\";\r\n\r\n\tvar state = scheduler.getState();\r\n\tif(state.drag_id == ev.id){\r\n\t\tcs += \" dhx_cal_event_drag\";\r\n\t}\r\n\r\n\tif(state.select_id == ev.id){\r\n\t\tcs += \" dhx_cal_event_selected\";\r\n\t}\r\n\r\n\tvar cse = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\tif (cse) cs = cs + \" \" + cse;\r\n\r\n\tif(this.config.cascade_event_display) {\r\n\t\tcs += \" dhx_cal_event_cascade\";\r\n\t}\r\n\r\n\tvar boxWidth = w - 1;\r\n\tvar html = `
\r\n\t\t\t\t
`;\r\n\r\n\td.innerHTML = html;\r\n\r\n\tvar container = d.cloneNode(true).firstChild;\r\n\r\n\tif (!bottom && scheduler.renderEvent(container, ev, w, h, contentA, contentB)) {\r\n\t\tif(ev.color){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\treturn container;\r\n\t} else {\r\n\t\tcontainer = d.firstChild;\r\n\t\tif(ev.color){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-background\", ev.color);\r\n\t\t}\r\n\t\tif(ev.textColor){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-event-color\", ev.textColor);\r\n\t\t}\r\n\r\n\t\tvar inner_html = '
 
';\r\n\t\tinner_html += '
' + contentA + '
';\r\n\t\tinner_html += '
' + contentB + '
'; // +2 css specific, moved from render_event\r\n\r\n\t\tvar footer_class = \"dhx_event_resize dhx_footer\";\r\n\t\tif (bottom || ev._drag_resize === false)\r\n\t\t\tfooter_class = \"dhx_resize_denied \" + footer_class;\r\n\r\n\t\tinner_html += '
';\r\n\r\n\t\tcontainer.innerHTML = inner_html;\r\n\t}\r\n\r\n\treturn container;\r\n};\r\nscheduler.renderEvent = function(){\r\n\treturn false;\r\n};\r\nscheduler.locate_holder = function(day) {\r\n\tif (this._mode == \"day\") return this._els[\"dhx_cal_data\"][0].firstChild; //dirty\r\n\treturn this._els[\"dhx_cal_data\"][0].childNodes[day];\r\n};\r\nscheduler.locate_holder_day = function(date, past) {\r\n\tvar day = Math.floor((this._correct_shift(date, 1) - this._min_date) / (60 * 60 * 24 * 1000));\r\n\t//when locating end data of event , we need to use next day if time part was defined\r\n\tif (past && this.date.time_part(date)) day++;\r\n\treturn day;\r\n};\r\n\r\n\r\n\r\nscheduler._get_dnd_order = function(order, ev_height, max_height){\r\n\tif(!this._drag_event)\r\n\t\treturn order;\r\n\tif(!this._drag_event._orig_sorder)\r\n\t\tthis._drag_event._orig_sorder = order;\r\n\telse\r\n\t\torder = this._drag_event._orig_sorder;\r\n\r\n\tvar evTop = ev_height * order;\r\n\twhile((evTop + ev_height) > max_height){\r\n\t\torder--;\r\n\t\tevTop -= ev_height;\r\n\t}\r\n\torder = Math.max(order, 0);\r\n\treturn order;\r\n};\r\n//scheduler._get_event_bar_pos = function(sday, eday, week, drag){\r\nscheduler._get_event_bar_pos = function(ev){\r\n\tvar rtl = this.config.rtl;\r\n\tvar columns = this._colsS;\r\n\tvar x = columns[ev._sday];\r\n\tvar x2 = columns[ev._eday];\r\n\tif (rtl) {\r\n\t\tx = columns[columns.col_length] - columns[ev._eday] + columns[0];\r\n\t\tx2 = columns[columns.col_length] - columns[ev._sday] + columns[0];\r\n\t}\r\n\r\n\tif (x2 == x) x2 = columns[ev._eday + 1];\r\n\tvar hb = this.xy.bar_height;\r\n\r\n\tvar order = ev._sorder;\r\n\tif(ev.id == this._drag_id){\r\n\t\tvar cellHeight = columns.heights[ev._sweek + 1] - columns.heights[ev._sweek]- this.xy.month_head_height;//22 for month head height\r\n\t\torder = scheduler._get_dnd_order(order, hb, cellHeight);\r\n\t}\r\n\tvar y_event_offset = order * hb;\r\n\tvar y = columns.heights[ev._sweek] + (columns.height ? (this.xy.month_scale_height + 2) : 2 ) + y_event_offset;\r\n\treturn {x:x, x2:x2, y:y};\r\n};\r\n\r\nscheduler.render_event_bar = function (ev) {\r\n\tvar parent = this._rendered_location;\r\n\tvar pos = this._get_event_bar_pos(ev);\r\n\tvar y = pos.y;\r\n\tvar x = pos.x;\r\n\tvar x2 = pos.x2;\r\n\t// resize for month mutliday events\r\n\tvar resize_handle = \"\";\r\n\r\n\t//events in ignored dates\r\n\r\n\tif (!x2) return;\r\n\r\n\tvar resizable = scheduler.config.resize_month_events && this._mode == \"month\" &&\r\n\t\t(!ev._timed || scheduler.config.resize_month_timed);\r\n\r\n\tvar d = document.createElement(\"div\");\r\n\tvar left_chunk = (ev.hasOwnProperty(\"_first_chunk\") && ev._first_chunk),\r\n\t\tright_chunk = (ev.hasOwnProperty(\"_last_chunk\") && ev._last_chunk);\r\n\r\n\tvar resize_left = resizable && (ev._timed || left_chunk);\r\n\tvar resize_right = resizable && (ev._timed || right_chunk);\r\n\r\n\tvar timed = true;\r\n\tvar cs = \"dhx_cal_event_clear\";\r\n\tif (!ev._timed || resizable) {\r\n\t\ttimed = false;\r\n\t\tcs = \"dhx_cal_event_line\";\r\n\t}\r\n\tif(left_chunk){\r\n\t\tcs += \" dhx_cal_event_line_start\";\r\n\t}\r\n\tif(right_chunk){\r\n\t\tcs += \" dhx_cal_event_line_end\";\r\n\t}\r\n\tif(resize_left){\r\n\t\tresize_handle += \"
\";\r\n\t}\r\n\tif(resize_right){\r\n\t\tresize_handle += \"
\";\r\n\t}\r\n\r\n\tvar cse = scheduler.templates.event_class(ev.start_date, ev.end_date, ev);\r\n\tif (cse){\r\n\t\tcs += \" \" + cse;\r\n\t}\r\n\r\n\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\tvar style_text = [\r\n\t\t\"position:absolute\",\r\n\t\t\"top:\" + y + \"px\",\r\n\t\t\"left:\" + x + \"px\",\r\n\t\t\"width:\" + (x2 - x - (timed ? 1 : 0)) + \"px\",\r\n\t\t\"height:\" + (this.xy.bar_height - 2) + \"px\",\r\n\t\tcolor,\r\n\t\tbg_color,\r\n\t\t(ev._text_style || \"\")\r\n\t].join(\";\");\r\n\r\n\tvar html = \"
\";\r\n\tif (resizable) {\r\n\t\thtml += resize_handle;\r\n\t}\r\n\tif(scheduler.getState().mode == \"month\"){\r\n\t\tev = scheduler.getEvent(ev.id); // ev at this point could be a part (row in a month view) of a larger event\r\n\t}\r\n\r\n\tif (ev._timed){\r\n\t\thtml += `${scheduler.templates.event_bar_date(ev.start_date, ev.end_date, ev)}`;\r\n\t}\r\n\r\n\thtml += \"
\";\r\n\thtml += scheduler.templates.event_bar_text(ev.start_date, ev.end_date, ev) + '
';\r\n\thtml += \"
\";\r\n\thtml += '
';\r\n\r\n\td.innerHTML = html;\r\n\r\n\tthis._rendered.push(d.firstChild);\r\n\tparent.appendChild(d.firstChild);\r\n};\r\n\r\nscheduler._locate_event = function(node) {\r\n\tvar id = null;\r\n\twhile (node && !id && node.getAttribute) {\r\n\t\tid = node.getAttribute(this.config.event_attribute);\r\n\t\tnode = node.parentNode;\r\n\t}\r\n\treturn id;\r\n};\r\n\r\nscheduler.edit = function(id) {\r\n\tif (this._edit_id == id) return;\r\n\tthis.editStop(false, id);\r\n\tthis._edit_id = id;\r\n\tthis.updateEvent(id);\r\n};\r\nscheduler.editStop = function(mode, id) {\r\n\tif (id && this._edit_id == id) return;\r\n\tvar ev = this.getEvent(this._edit_id);\r\n\tif (ev) {\r\n\t\tif (mode) ev.text = this._editor.value;\r\n\t\tthis._edit_id = null;\r\n\t\tthis._editor = null;\r\n\t\tthis.updateEvent(ev.id);\r\n\t\tthis._edit_stop_event(ev, mode);\r\n\t}\r\n};\r\nscheduler._edit_stop_event = function(ev, mode) {\r\n\tif (this._new_event) {\r\n\t\tif (!mode) {\r\n\t\t\tif (ev) // in case of custom lightbox user can already delete event\r\n\t\t\t\tthis.deleteEvent(ev.id, true);\r\n\t\t} else {\r\n\t\t\tthis.callEvent(\"onEventAdded\", [ev.id, ev]);\r\n\t\t}\r\n\t\tthis._new_event = null;\r\n\t} else {\r\n\t\tif (mode){\r\n\t\t\tthis.callEvent(\"onEventChanged\", [ev.id, ev]);\r\n\t\t}\r\n\t}\r\n};\r\n\r\nscheduler.getEvents = function(from, to) {\r\n\tvar result = [];\r\n\tfor (var a in this._events) {\r\n\t\tvar ev = this._events[a];\r\n\t\tif (ev && ( (!from && !to) || (ev.start_date < to && ev.end_date > from) ))\r\n\t\t\tresult.push(ev);\r\n\t}\r\n\treturn result;\r\n};\r\nscheduler.getRenderedEvent = function(id) {\r\n\tif (!id)\r\n\t\treturn;\r\n\tvar rendered_events = scheduler._rendered;\r\n\tfor (var i=0; i -1){\r\n\t\t\t\t\tsection = section.split(scheduler.config.section_delimiter)[0];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar top = timeline.getSectionTop(section);\r\n\t\t\tvar left = timeline.posFromDate(event.start_date);\r\n\t\t\tvar container = scheduler.$container.querySelector(\".dhx_timeline_data_wrapper\");\r\n\t\t\tleft = left - (container.offsetWidth - timeline.dx) / 2;\r\n\t\t\ttop = top - container.offsetHeight / 2 + timeline.dy/2;\r\n\r\n\t\t\tif (timeline._smartRenderingEnabled()) {\r\n\t\t\t\tvar handlerId = timeline.attachEvent(\"onScroll\", function(){\r\n\t\t\t\t\trestoreOriginalColors();\r\n\t\t\t\t\ttimeline.detachEvent(handlerId);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\ttimeline.scrollTo({\r\n\t\t\t\tleft: left,\r\n\t\t\t\ttop: top\r\n\t\t\t});\r\n\t\t\tif (!timeline._smartRenderingEnabled()) {\r\n\t\t\t\trestoreOriginalColors();\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\trestoreOriginalColors();\r\n\t}\r\n\r\n\tscheduler.callEvent(\"onAfterEventDisplay\", [ev, mode]);\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._append_drag_marker = function(m){\r\n\tif(m.parentNode) return;\r\n\tvar zone = scheduler._els[\"dhx_cal_data\"][0];\r\n\r\n\tvar scale = zone.lastChild;\r\n\tvar className = scheduler._getClassName(scale);\r\n\tif(className.indexOf(\"dhx_scale_holder\") < 0 && scale.previousSibling){\r\n\t\tscale = scale.previousSibling;\r\n\t}\r\n\r\n\tclassName = scheduler._getClassName(scale);\r\n\tif (scale && className.indexOf(\"dhx_scale_holder\") === 0) {\r\n\t\tscale.appendChild(m);\r\n\t}\r\n};\r\n\r\nscheduler._update_marker_position = function(m, event){\r\n\tvar size = scheduler._calc_event_y(event, 0);\r\n\tm.style.top = size.top + \"px\";\r\n\tm.style.height = size.height + \"px\";\r\n};\r\n\r\nscheduler.highlightEventPosition = function(event){\r\n\tvar m = document.createElement(\"div\");\r\n\r\n\tm.setAttribute(\"event_id\", event.id); // for backward compatibility\r\n\tm.setAttribute(this.config.event_attribute, event.id);\r\n\tthis._rendered.push(m);\r\n\tthis._update_marker_position(m, event);\r\n\r\n\tvar css = this.templates.drag_marker_class(event.start_date, event.end_date, event);\r\n\tvar html = this.templates.drag_marker_content(event.start_date, event.end_date, event);\r\n\tm.className = \"dhx_drag_marker\";\r\n\tif(css)\r\n\t\tm.className += \" \" + css;\r\n\tif(html)\r\n\t\tm.innerHTML = html;\r\n\tthis._append_drag_marker(m);\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._parsers.xml = {\r\n\tcanParse: function(data, xhr){\r\n\t\t// IE returns non-empty responseXML type regardless of actual data type\r\n\t\tif(xhr.responseXML && xhr.responseXML.firstChild){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\ttry{\r\n\t\t\tvar xmlDoc = scheduler.ajax.parse(xhr.responseText);\r\n\t\t\tvar topElement = scheduler.ajax.xmltop(\"data\", xmlDoc);\r\n\t\t\tif(topElement && topElement.tagName === \"data\"){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}catch (e){\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\tparse: function(loader) {\r\n\t\tvar xml;\r\n\r\n\t\tif (!loader.xmlDoc.responseXML) { //from a string\r\n\t\t\tloader.xmlDoc.responseXML = scheduler.ajax.parse(loader.xmlDoc.responseText);\r\n\t\t}\r\n\t\r\n\t\txml = scheduler.ajax.xmltop(\"data\", loader.xmlDoc);\r\n\t\tif (xml.tagName != \"data\") return null;//not an xml\r\n\t\tvar csrfToken = xml.getAttribute(\"dhx_security\");\r\n\t\tif (csrfToken) {\r\n\t\t\tif (window.dhtmlx) {\r\n\t\t\t\twindow.dhtmlx.security_key = csrfToken;\r\n\t\t\t}\r\n\t\t\tscheduler.security_key = csrfToken;\r\n\t\t}\r\n\t\r\n\t\tvar opts = scheduler.ajax.xpath(\"//coll_options\", loader.xmlDoc);\r\n\t\tfor (var i = 0; i < opts.length; i++) {\r\n\t\t\tvar bind = opts[i].getAttribute(\"for\");\r\n\t\t\tvar arr = scheduler.serverList[bind];\r\n\t\t\tif (!arr) {\r\n\t\t\t\tscheduler.serverList[bind] = arr = [];\r\n\t\t\t}\r\n\t\t\tarr.splice(0, arr.length);\t//clear old options\r\n\t\t\tvar itms = scheduler.ajax.xpath(\".//item\", opts[i]);\r\n\t\t\tfor (var j = 0; j < itms.length; j++) {\r\n\t\t\t\tvar itm = itms[j];\r\n\t\t\t\tvar attrs = itm.attributes;\r\n\t\t\t\tvar obj = { key: itms[j].getAttribute(\"value\"), label: itms[j].getAttribute(\"label\")};\r\n\t\t\t\tfor (var k = 0; k < attrs.length; k++) {\r\n\t\t\t\t\tvar attr = attrs[k];\r\n\t\t\t\t\tif (attr.nodeName == \"value\" || attr.nodeName == \"label\")\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\tobj[attr.nodeName] = attr.nodeValue;\r\n\t\t\t\t}\r\n\t\t\t\tarr.push(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (opts.length)\r\n\t\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\t\r\n\t\tvar ud = scheduler.ajax.xpath(\"//userdata\", loader.xmlDoc);\r\n\t\tfor (var i = 0; i < ud.length; i++) {\r\n\t\t\tvar udx = scheduler._xmlNodeToJSON(ud[i]);\r\n\t\t\tscheduler._userdata[udx.name] = udx.text;\r\n\t\t}\r\n\t\r\n\t\tvar evs = [];\r\n\t\txml = scheduler.ajax.xpath(\"//event\", loader.xmlDoc);\r\n\t\r\n\t\tfor (var i = 0; i < xml.length; i++) {\r\n\t\t\tvar ev = evs[i] = scheduler._xmlNodeToJSON(xml[i]);\r\n\t\t\tscheduler._init_event(ev);\r\n\t\t}\r\n\t\treturn evs;\r\n\t}\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler.json = scheduler._parsers.json = {\r\n\tcanParse: function(data){\r\n\t\tif(data && typeof data === \"object\"){\r\n\t\t\treturn true;\r\n\t\t} else if(typeof data === \"string\"){\r\n\t\t\ttry {\r\n\t\t\t\tvar result = JSON.parse(data);\r\n\t\t\t\treturn Object.prototype.toString.call(result) === '[object Object]' || \r\n\t\t\t\t\t\tObject.prototype.toString.call(result) === '[object Array]';\r\n\t\t\t} catch (err) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\tparse: function(data) {\r\n\t\tvar events = [];\r\n\r\n\t\tif (typeof data == \"string\") {\r\n\t\t\tdata = JSON.parse(data);\r\n\t\t}\r\n\t\tif (Object.prototype.toString.call(data) === '[object Array]') {\r\n\t\t\tevents = data;\r\n\t\t} else {\r\n\t\t\tif(data){\r\n\t\t\t\tif(data.events){\r\n\t\t\t\t\tevents = data.events;\r\n\t\t\t\t}else if(data.data){\r\n\t\t\t\t\tevents = data.data;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tevents = events || [];\r\n\r\n\t\tif (data.dhx_security) {\r\n\t\t\tif (window.dhtmlx) {\r\n\t\t\t\twindow.dhtmlx.security_key = data.dhx_security;\r\n\t\t\t}\r\n\t\t\tscheduler.security_key = data.dhx_security;\r\n\t\t}\r\n\r\n\t\tvar collections = (data && data.collections) ? data.collections : {};\r\n\t\tvar collections_loaded = false;\r\n\t\tfor (var key in collections) {\r\n\t\t\tif (collections.hasOwnProperty(key)) {\r\n\t\t\t\tcollections_loaded = true;\r\n\t\t\t\tvar collection = collections[key];\r\n\t\t\t\tvar arr = scheduler.serverList[key];\r\n\t\t\t\tif (!arr) {\r\n\t\t\t\t\tscheduler.serverList[key] = arr = [];\r\n\t\t\t\t}\r\n\t\t\t\tarr.splice(0, arr.length); //clear old options\r\n\t\t\t\tfor (var j = 0; j < collection.length; j++) {\r\n\t\t\t\t\tvar option = collection[j];\r\n\t\t\t\t\tvar obj = { key: option.value, label: option.label }; // resulting option object\r\n\t\t\t\t\tfor (var option_key in option) {\r\n\t\t\t\t\t\tif (option.hasOwnProperty(option_key)) {\r\n\t\t\t\t\t\t\tif (option_key == \"value\" || option_key == \"label\")\r\n\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\tobj[option_key] = option[option_key]; // obj['value'] = option['value']\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tarr.push(obj);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (collections_loaded)\r\n\t\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\r\n\t\tvar evs = [];\r\n\t\tfor (var i = 0; i < events.length; i++) {\r\n\t\t\tvar event = events[i];\r\n\t\t\tscheduler._init_event(event);\r\n\t\t\tevs.push(event);\r\n\t\t}\r\n\t\treturn evs;\r\n\t}\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler.ical = scheduler._parsers.ical = {\r\n\tcanParse: function(data){\r\n\t\tif(typeof data === \"string\"){\r\n\t\t\treturn new RegExp(\"^BEGIN:VCALENDAR\").test(data);\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n\tparse:function(str){\r\n\t\tvar data = str.match(RegExp(this.c_start+\"[^\\f]*\"+this.c_end,\"\"));\r\n\t\tif (!data.length) return;\r\n\r\n\t\t// mpl: handle bad unfolding\r\n\t\tdata[0]=data[0].replace(/[\\r\\n]+ /g,\"\");\r\n\r\n\t\t//unfolding \r\n\t\tdata[0]=data[0].replace(/[\\r\\n]+(?=[a-z \\t])/g,\" \");\r\n\t\t//drop property\r\n\t\tdata[0]=data[0].replace(/;[^:\\r\\n]*:/g,\":\");\r\n\t\t\r\n\t\t\r\n\t\tvar incoming=[];\r\n\t\tvar match;\r\n\t\tvar event_r = RegExp(\"(?:\"+this.e_start+\")([^\\f]*?)(?:\"+this.e_end+\")\",\"g\");\r\n\t\twhile ((match=event_r.exec(data)) !== null){\r\n\t\t\tvar e={};\r\n\t\t\tvar param;\r\n\t\t\tvar param_r = /[^\\r\\n]+[\\r\\n]+/g;\r\n\t\t\twhile ((param=param_r.exec(match[1])) !== null)\r\n\t\t\t\tthis.parse_param(param.toString(),e);\r\n\t\t\tif (e.uid && !e.id) e.id = e.uid; //fallback to UID, when ID is not defined\r\n\t\t\tincoming.push(e);\t\r\n\t\t}\r\n\t\treturn incoming;\r\n\t},\r\n\tparse_param:function(str,obj){\r\n\t\tvar d = str.indexOf(\":\"); \r\n\t\t\tif (d==-1) return;\r\n\t\t\r\n\t\tvar name = str.substr(0,d).toLowerCase();\r\n\t\tvar value = str.substr(d+1).replace(/\\\\,/g,\",\").replace(/[\\r\\n]+$/,\"\");\r\n\t\tif (name==\"summary\")\r\n\t\t\tname=\"text\";\r\n\t\telse if (name==\"dtstart\"){\r\n\t\t\tname = \"start_date\";\r\n\t\t\tvalue = this.parse_date(value,0,0);\r\n\t\t}\r\n\t\telse if (name==\"dtend\"){\r\n\t\t\tname = \"end_date\";\r\n\t\t\tvalue = this.parse_date(value,0,0);\r\n\t\t}\r\n\t\tobj[name]=value;\r\n\t},\r\n\tparse_date:function(value,dh,dm){\r\n\t\tvar t = value.split(\"T\");\r\n\r\n\t\tvar utcMark = false;\r\n\t\tif (t[1]){\r\n\t\t\tdh=t[1].substr(0,2);\r\n\t\t\tdm=t[1].substr(2,2);\r\n\t\t\tutcMark = !!(t[1][6] == \"Z\");\r\n\t\t}\r\n\t\tvar dy = t[0].substr(0,4);\r\n\t\tvar dn = parseInt(t[0].substr(4,2),10)-1;\r\n\t\tvar dd = t[0].substr(6,2);\r\n\r\n\t\tif(scheduler.config.server_utc || utcMark){\r\n\t\t\treturn new Date(Date.UTC(dy,dn,dd,dh,dm)) ;\r\n\t\t}else{\r\n\t\t\treturn new Date(dy,dn,dd,dh,dm);\r\n\t\t}\r\n\t},\r\n\tc_start:\"BEGIN:VCALENDAR\",\r\n\te_start:\"BEGIN:VEVENT\",\r\n\te_end:\"END:VEVENT\",\r\n\tc_end:\"END:VCALENDAR\"\t\r\n};\r\n\r\n}","export default function(scheduler){\r\n\treturn (function(){\r\n\t\tvar res = {};\r\n\t\tfor (var a in this._events){\r\n\t\t\tvar ev = this._events[a];\r\n\t\t\tif (ev.id.toString().indexOf(\"#\") == -1){\r\n\t\t\t\tres[ev.id] = ev;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t}).bind(scheduler);\r\n}","import xmlLoaded from \"./loaders/xml\";\r\nimport jsonLoader from \"./loaders/json\";\r\nimport iCalLoader from \"./loaders/ical\";\r\nimport createSerializator from \"../core/common/get_serializable_events\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler._loaded = {};\r\nscheduler._load = function(url, from) {\r\n\turl = url || this._load_url;\r\n\r\n\tif(!url){\r\n\t\t//if scheduler.setLoadMode is called before scheduler.init, initial rendering will invoke data loading while url is undefined\r\n\t\treturn;\r\n\t}\r\n\r\n\turl += (url.indexOf(\"?\") == -1 ? \"?\" : \"&\") + \"timeshift=\" + (new Date()).getTimezoneOffset();\r\n\tif (this.config.prevent_cache) url += \"&uid=\" + this.uid();\r\n\tvar to;\r\n\tfrom = from || this._date;\r\n\tfunction ajaxCallback(response) {\r\n\t\tscheduler.on_load(response);\r\n\t\tscheduler.callEvent(\"onLoadEnd\", []);\r\n\t}\r\n\tif (this._load_mode) {\r\n\t\tvar lf = this.templates.load_format;\r\n\r\n\t\tfrom = this.date[this._load_mode + \"_start\"](new Date(from.valueOf()));\r\n\t\twhile (from > this._min_date) from = this.date.add(from, -1, this._load_mode);\r\n\t\tto = from;\r\n\r\n\t\tvar cache_line = true;\r\n\t\twhile (to < this._max_date) {\r\n\t\t\tto = this.date.add(to, 1, this._load_mode);\r\n\t\t\tif (this._loaded[lf(from)] && cache_line)\r\n\t\t\t\tfrom = this.date.add(from, 1, this._load_mode); else cache_line = false;\r\n\t\t}\r\n\r\n\t\tvar temp_to = to;\r\n\t\tdo {\r\n\t\t\tto = temp_to;\r\n\t\t\ttemp_to = this.date.add(to, -1, this._load_mode);\r\n\t\t} while (temp_to > from && this._loaded[lf(temp_to)]);\r\n\r\n\t\tif (to <= from)\r\n\t\t\treturn false; //already loaded\r\n\r\n\t\tscheduler.ajax.get(url + \"&from=\" + lf(from) + \"&to=\" + lf(to), ajaxCallback);\r\n\r\n\t\twhile (from < to) {\r\n\t\t\tthis._loaded[lf(from)] = true;\r\n\t\t\tfrom = this.date.add(from, 1, this._load_mode);\r\n\t\t}\r\n\t} else {\r\n\t\tscheduler.ajax.get(url, ajaxCallback);\r\n\t}\r\n\r\n\t// TODO: remove onXLS\r\n\tthis.callEvent(\"onXLS\", []);\r\n\tthis.callEvent(\"onLoadStart\", []);\r\n\treturn true;\r\n};\r\n\r\nscheduler._parsers = {};\r\n\r\n\r\nxmlLoaded(scheduler);\r\njsonLoader(scheduler);\r\niCalLoader(scheduler);\r\n\r\nscheduler.on_load = function (loader) {\r\n\tthis.callEvent(\"onBeforeParse\", []);\r\n\r\n\tvar evs;\r\n\tvar error = false;\r\n\r\n\tvar foundParser = false;\r\n\tfor(var i in this._parsers){\r\n\t\tvar parser = this._parsers[i];\r\n\t\tif(parser.canParse(loader.xmlDoc.responseText, loader.xmlDoc)){\r\n\t\t\ttry{\r\n\t\t\t\tvar param = loader.xmlDoc.responseText;\r\n\t\t\t\tif(i === \"xml\"){\r\n\t\t\t\t\tparam = loader;\r\n\t\t\t\t}\r\n\t\t\t\tevs = parser.parse(param);\r\n\t\t\t\tif(!evs){\r\n\t\t\t\t\terror = true;\r\n\t\t\t\t}\r\n\t\t\t}catch(e){\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\t\t\tfoundParser = true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif(!foundParser){\r\n\t\tif(this._process && this[this._process]){\r\n\t\t\ttry{\r\n\t\t\t\tevs = this[this._process].parse(loader.xmlDoc.responseText);\r\n\t\t\t}catch (e){\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\terror = true;\r\n\t\t}\r\n\t}\r\n\r\n\tif(error || (loader.xmlDoc.status && loader.xmlDoc.status >= 400)){\r\n\t\tthis.callEvent(\"onLoadError\", [loader.xmlDoc]);\r\n\t\tevs = [];\r\n\t}\r\n\r\n\tthis._process_loading(evs);\r\n\r\n\t// TODO: remove onXLE\r\n\tthis.callEvent(\"onXLE\", []);\r\n\tthis.callEvent(\"onParse\", []);\r\n};\r\nscheduler._process_loading = function(evs) {\r\n\tthis._loading = true;\r\n\tthis._not_render = true;\r\n\tfor (var i = 0; i < evs.length; i++) {\r\n\t\tif (!this.callEvent(\"onEventLoading\", [evs[i]])) continue;\r\n\t\tthis.addEvent(evs[i]);\r\n\t}\r\n\tthis._not_render = false;\r\n\tif (this._render_wait) this.render_view_data();\r\n\r\n\tthis._loading = false;\r\n\tif (this._after_call) this._after_call();\r\n\tthis._after_call = null;\r\n};\r\nscheduler._init_event = function(event) {\r\n\tevent.text = (event.text || event._tagvalue) || \"\";\r\n\tevent.start_date = scheduler._init_date(event.start_date);\r\n\tevent.end_date = scheduler._init_date(event.end_date);\r\n};\r\n\r\nscheduler._init_date = function(date){\r\n\tif(!date)\r\n\t\treturn null;\r\n\tif (typeof date == \"string\") {\r\n\t\treturn scheduler._helpers.parseDate(date);\r\n\t}\r\n\telse return new Date(date);\r\n};\r\n\r\nconst getSerializableData = createSerializator(scheduler);\r\nscheduler.serialize = function(){\r\n\tconst dataset = [];\r\n\tconst allEvents = getSerializableData();\r\n\tfor (var a in allEvents){\r\n\t\t\r\n\t\tconst exportedEvent = {};\r\n\t\tvar ev = allEvents[a];\r\n\r\n\t\tfor(var key in ev){\r\n\t\t\tif (key.charAt(0) == \"$\" || key.charAt(0) == \"_\"){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tlet exportValue;\r\n\t\t\tconst rawValue = ev[key];\r\n\t\t\tif(scheduler.utils.isDate(rawValue)){\r\n\t\t\t\texportValue = scheduler.defined(scheduler.templates.xml_format) ? scheduler.templates.xml_format(rawValue) : scheduler.templates.format_date(rawValue);\r\n\t\t\t}else{\r\n\t\t\t\texportValue = rawValue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\texportedEvent[key] = exportValue;\r\n\t\t}\r\n\r\n\t\tdataset.push(exportedEvent);\r\n\t}\r\n\treturn dataset;\r\n};\r\n\r\n/*\r\nscheduler.json = {};\r\nscheduler.json.parse = function(data) {\r\n\r\n\tvar events = [];\r\n\r\n\tif (typeof data == \"string\") {\r\n\t\tdata = JSON.parse(data);\r\n\t}\r\n\tif (Object.prototype.toString.call(data) === '[object Array]') {\r\n\t\tevents = data;\r\n\t} else {\r\n\t\tif(data){\r\n\t\t\tif(data.events){\r\n\t\t\t\tevents = data.events;\r\n\t\t\t}else if(data.data){\r\n\t\t\t\tevents = data.data;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tevents = events || [];\r\n\r\n\tif (data.dhx_security) {\r\n\t\tif (window.dhtmlx) {\r\n\t\t\twindow.dhtmlx.security_key = data.dhx_security;\r\n\t\t}\r\n\t\tscheduler.security_key = data.dhx_security;\r\n\t}\r\n\r\n\tvar collections = (data && data.collections) ? data.collections : {};\r\n\tvar collections_loaded = false;\r\n\tfor (var key in collections) {\r\n\t\tif (collections.hasOwnProperty(key)) {\r\n\t\t\tcollections_loaded = true;\r\n\t\t\tvar collection = collections[key];\r\n\t\t\tvar arr = scheduler.serverList[key];\r\n\t\t\tif (!arr) {\r\n\t\t\t\tscheduler.serverList[key] = arr = [];\r\n\t\t\t}\r\n\t\t\tarr.splice(0, arr.length); //clear old options\r\n\t\t\tfor (var j = 0; j < collection.length; j++) {\r\n\t\t\t\tvar option = collection[j];\r\n\t\t\t\tvar obj = { key: option.value, label: option.label }; // resulting option object\r\n\t\t\t\tfor (var option_key in option) {\r\n\t\t\t\t\tif (option.hasOwnProperty(option_key)) {\r\n\t\t\t\t\t\tif (option_key == \"value\" || option_key == \"label\")\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\tobj[option_key] = option[option_key]; // obj['value'] = option['value']\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tarr.push(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (collections_loaded)\r\n\t\tscheduler.callEvent(\"onOptionsLoad\", []);\r\n\r\n\tvar evs = [];\r\n\tfor (var i = 0; i < events.length; i++) {\r\n\t\tvar event = events[i];\r\n\t\tscheduler._init_event(event);\r\n\t\tevs.push(event);\r\n\t}\r\n\treturn evs;\r\n};*/\r\nscheduler.parse = function(data, type) {\r\n\tthis._process = type;\r\n\tthis.on_load({xmlDoc: {responseText: data}});\r\n};\r\nscheduler.load = function(url, call) {\r\n\tif (typeof call == \"string\") {\r\n\t\tthis._process = call;\r\n\t\tcall = arguments[2];\r\n\t}\r\n\r\n\tthis._load_url = url;\r\n\tthis._after_call = call;\r\n\tthis._load(url, this._date);\r\n};\r\n//possible values - day,week,month,year,all\r\nscheduler.setLoadMode = function(mode) {\r\n\tif (mode == \"all\") mode = \"\";\r\n\tthis._load_mode = mode;\r\n};\r\n\r\nscheduler.serverList = function(name, array) {\r\n\tif (array) {\r\n\t\tthis.serverList[name] = array.slice(0);\r\n\t\treturn this.serverList[name];\r\n\t}\r\n\tthis.serverList[name] = (this.serverList[name] || []);\r\n\treturn this.serverList[name];\r\n};\r\nscheduler._userdata = {};\r\n\r\nscheduler._xmlNodeToJSON = function(node) {\r\n\tvar t = {};\r\n\tfor (var i = 0; i < node.attributes.length; i++)\r\n\t\tt[node.attributes[i].name] = node.attributes[i].value;\r\n\r\n\tfor (var i = 0; i < node.childNodes.length; i++) {\r\n\t\tvar child = node.childNodes[i];\r\n\t\tif (child.nodeType == 1)\r\n\t\t\tt[child.tagName] = child.firstChild ? child.firstChild.nodeValue : \"\";\r\n\t}\r\n\r\n\tif (!t.text) t.text = node.firstChild ? node.firstChild.nodeValue : \"\";\r\n\r\n\treturn t;\r\n};\r\nscheduler.attachEvent(\"onXLS\", function() {\r\n\tif (this.config.show_loading === true) {\r\n\t\tvar t;\r\n\t\tt = this.config.show_loading = document.createElement(\"div\");\r\n\t\tt.className = 'dhx_loading';\r\n\t\tt.style.left = Math.round((this._x - 128) / 2) + \"px\";\r\n\t\tt.style.top = Math.round((this._y - 15) / 2) + \"px\";\r\n\t\tthis._obj.appendChild(t);\r\n\t}\r\n});\r\nscheduler.attachEvent(\"onXLE\", function() {\r\n\tvar t = this.config.show_loading;\r\n\tif (t && typeof t == \"object\") {\r\n\t\tif(t.parentNode) {\r\n\t\t\tt.parentNode.removeChild(t);\r\n\t\t}\r\n\t\tthis.config.show_loading = true;\r\n\t}\r\n});\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler._lightbox_controls = {};\r\nscheduler.formSection = function(name){\r\n\tvar config = this.config.lightbox.sections;\r\n\tvar i = 0;\r\n\tfor (i; i < config.length; i++) {\r\n\t\tif (config[i].name == name) {\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif (i === config.length) {\r\n\t\t// GS-1662 section not found, should exit here instead of throwing an error\r\n\t\treturn null;\r\n\t}\r\n\r\n\tvar section = config[i];\r\n\tif (!scheduler._lightbox) {\r\n\t\tscheduler.getLightbox();\r\n\t}\r\n\tvar header = scheduler._lightbox.querySelector(`#${section.id}`);\r\n\tvar node = header.nextSibling;\r\n\r\n\tvar result = {\r\n\t\tsection: section,\r\n\t\theader: header,\r\n\t\tnode: node,\r\n\t\tgetValue:function(ev){\r\n\t\t\treturn scheduler.form_blocks[section.type].get_value(node, (ev||{}), section);\r\n\t\t},\r\n\t\tsetValue:function(value, ev){\r\n\t\t\treturn scheduler.form_blocks[section.type].set_value(node, value, (ev||{}), section);\r\n\t\t}\r\n\t};\r\n\r\n\tvar handler = scheduler._lightbox_controls[\"get_\"+section.type+\"_control\"];\r\n\treturn handler?handler(result):result;\r\n};\r\nscheduler._lightbox_controls.get_template_control = function(result) {\r\n\tresult.control = result.node;\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_select_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('select')[0];\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_textarea_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('textarea')[0];\r\n\treturn result;\r\n};\r\nscheduler._lightbox_controls.get_time_control = function(result) {\r\n\tresult.control = result.node.getElementsByTagName('select'); // array\r\n\treturn result;\r\n};\r\n\r\nscheduler._lightbox_controls.defaults = {\r\n\ttemplate: {\r\n\t\theight:30\r\n\t},\r\n\ttextarea: {\r\n\t\theight: 200\r\n\t},\r\n\tselect: {\r\n\t\theight: 23\r\n\t},\r\n\ttime: {\r\n\t\theight: 20\r\n\t}\r\n};\r\n\r\n\r\nscheduler.form_blocks={\r\n\ttemplate:{\r\n\t\trender: function(sns){\r\n\t\t\treturn \"
\";\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,config){\r\n\t\t\tnode.innerHTML = value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev,config){\r\n\t\t\treturn node.innerHTML||\"\";\r\n\t\t},\r\n\t\tfocus: function(node){\r\n\t\t}\r\n\t},\r\n\ttextarea:{\r\n\t\trender:function(sns){\r\n\t\t\tconst placeholder = sns.placeholder ? `placeholder='${sns.placeholder}'` : \"\";\r\n\t\t\treturn `
`;\r\n\t\t},\r\n\t\tset_value:function(node,value,ev){\r\n\t\t\tscheduler.form_blocks.textarea._get_input(node).value=value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev){\r\n\t\t\treturn scheduler.form_blocks.textarea._get_input(node).value;\r\n\t\t},\r\n\t\tfocus:function(node){\r\n\t\t\tvar a = scheduler.form_blocks.textarea._get_input(node);\r\n\t\t\tscheduler._focus(a, true);\r\n\t\t},\r\n\t\t_get_input: function(node){\r\n\t\t\treturn node.getElementsByTagName(\"textarea\")[0];\r\n\t\t}\r\n\t},\r\n\tselect:{\r\n\t\trender:function(sns){\r\n\t\t\t//var defaults = scheduler._lightbox_controls.defaults.select;\r\n\t\t\tvar html=\"
\";\r\n\t\t\treturn html;\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,sns){\r\n\t\t\tvar select = node.firstChild;\r\n\t\t\tif (!select._dhx_onchange && sns.onchange) {\r\n\t\t\t\tscheduler.event(select, \"change\", sns.onchange);\r\n\t\t\t\tselect._dhx_onchange = true;\r\n\t\t\t}\r\n\t\t\tif (typeof value == \"undefined\")\r\n\t\t\t\tvalue = (select.options[0]||{}).value;\r\n\t\t\tselect.value=value||\"\";\r\n\t\t},\r\n\t\tget_value:function(node,ev){\r\n\t\t\treturn node.firstChild.value;\r\n\t\t},\r\n\t\tfocus:function(node){\r\n\t\t\tvar a=node.firstChild; scheduler._focus(a, true);\r\n\t\t}\r\n\t},\r\n\ttime:{\r\n\t\trender:function(sns) {\r\n\t\t\tif (!sns.time_format) {\r\n\t\t\t\t// default order\r\n\t\t\t\tsns.time_format = [\"%H:%i\", \"%d\", \"%m\", \"%Y\"];\r\n\t\t\t}\r\n\t\t\t// map: default order => real one\r\n\t\t\tsns._time_format_order = {};\r\n\t\t\tvar time_format = sns.time_format;\r\n\r\n\t\t\tvar cfg = scheduler.config;\r\n\t\t\tvar dt = scheduler.date.date_part(scheduler._currentDate());\r\n\t\t\tvar last = 24*60, first = 0;\r\n\t\t\tif(scheduler.config.limit_time_select){\r\n\t\t\t\tlast = 60*cfg.last_hour+1;\r\n\t\t\t\tfirst = 60*cfg.first_hour;\r\n\t\t\t\tdt.setHours(cfg.first_hour);\r\n\t\t\t}\r\n\t\t\tvar html = \"\";\r\n\r\n\t\t\tfor (var p = 0; p < time_format.length; p++) {\r\n\t\t\t\tvar time_option = time_format[p];\r\n\r\n\t\t\t\t// adding spaces between selects\r\n\t\t\t\tif (p > 0) {\r\n\t\t\t\t\thtml += \" \";\r\n\t\t\t\t}\r\n\t\t\t\tvar selectBoxClass = \"\";\r\n\t\t\t\tvar options = \"\";\r\n\t\t\t\tswitch (time_option) {\r\n\t\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_year_select\";\r\n\t\t\t\t\t\tsns._time_format_order[3] = p;\r\n\t\t\t\t\t\t//year\r\n\t\t\t\t\t\tvar range;\r\n\t\t\t\t\t\tvar start_year;\r\n\t\t\t\t\t\tvar end_year;\r\n\t\t\t\t\t\tif(sns.year_range){\r\n\t\t\t\t\t\t\tif (!isNaN(sns.year_range)) {\r\n\t\t\t\t\t\t\t\trange = sns.year_range;\r\n\t\t\t\t\t\t\t} else if (sns.year_range.push) {\r\n\t\t\t\t\t\t\t\t// if\r\n\t\t\t\t\t\t\t\tstart_year = sns.year_range[0];\r\n\t\t\t\t\t\t\t\tend_year = sns.year_range[1];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\trange = range || 10;\r\n\t\t\t\t\t\tvar offset = offset || Math.floor(range / 2);\r\n\t\t\t\t\t\tstart_year = start_year || dt.getFullYear() - offset;\r\n\t\t\t\t\t\tend_year = end_year || start_year + range;\r\n\r\n\t\t\t\t\t\tfor (var i = start_year; i < end_year; i++)\r\n\t\t\t\t\t\t\toptions += \"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%m\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_month_select\";\r\n\t\t\t\t\t\tsns._time_format_order[2] = p;\r\n\t\t\t\t\t\t//month\r\n\t\t\t\t\t\tfor (var i=0; i < 12; i++)\r\n\t\t\t\t\t\t\toptions+=\"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%d\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_day_select\";\r\n\t\t\t\t\t\tsns._time_format_order[1] = p;\r\n\t\t\t\t\t\t//days\r\n\t\t\t\t\t\tfor (var i=1; i < 32; i++)\r\n\t\t\t\t\t\t\toptions+=\"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"%H:%i\":\r\n\t\t\t\t\t\tselectBoxClass = \"dhx_lightbox_time_select\";\r\n\t\t\t\t\t\tsns._time_format_order[0] = p;\r\n\t\t\t\t\t\t//hours\r\n\t\t\t\t\t\tvar i = first;\r\n\t\t\t\t\t\tvar tdate = dt.getDate();\r\n\t\t\t\t\t\tsns._time_values = [];\r\n\r\n\t\t\t\t\t\twhile(i\"+time+\"\";\r\n\t\t\t\t\t\t\tsns._time_values.push(i);\r\n\t\t\t\t\t\t\tdt.setTime(dt.valueOf()+this.config.time_step*60*1000);\r\n\t\t\t\t\t\t\tvar diff = (dt.getDate()!=tdate)?1:0; // moved or not to the next day\r\n\t\t\t\t\t\t\ti=diff*24*60+dt.getHours()*60+dt.getMinutes();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(options){\r\n\r\n\t\t\t\t\tvar ariaAttrs = scheduler._waiAria.lightboxSelectAttrString(time_option);\r\n\t\t\t\t\tvar readonly = sns.readonly ? \"disabled='disabled'\" : \"\";\r\n\t\t\t\t\thtml += \" \";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//var defaults = scheduler._lightbox_controls.defaults.select;\r\n\r\n\t\t\treturn \"
\"+html+\"  –  \"+html+\"
\";\r\n\t\t},\r\n\t\tset_value:function(node,value,ev,config){\r\n\t\t\tvar cfg = scheduler.config;\r\n\t\t\tvar s=node.getElementsByTagName(\"select\");\r\n\t\t\tvar map = config._time_format_order;\r\n\t\t\tvar start_date, end_date;\r\n\r\n\t\t\tif(cfg.full_day) {\r\n\t\t\t\tif (!node._full_day){\r\n\t\t\t\t\tvar html = \"\";\r\n\t\t\t\t\tif (!scheduler.config.wide_form)\r\n\t\t\t\t\t\thtml = node.previousSibling.innerHTML+html;\r\n\t\t\t\t\tnode.previousSibling.innerHTML=html;\r\n\t\t\t\t\tnode._full_day=true;\r\n\t\t\t\t}\r\n\t\t\t\tvar input=node.previousSibling.getElementsByTagName(\"input\")[0];\r\n\t\t\t\tinput.checked = (scheduler.date.time_part(ev.start_date)===0 && scheduler.date.time_part(ev.end_date)===0);\r\n\r\n\t\t\t\ts[map[0]].disabled=input.checked;\r\n\t\t\t\ts[ map[0] + s.length/2 ].disabled=input.checked;\r\n\r\n\t\t\t\tif(!input.$_eventAttached){\r\n\t\t\t\t\tinput.$_eventAttached = true;\r\n\r\n\t\t\t\t\t\tscheduler.event(input, \"click\", function(){\r\n\t\t\t\t\t\tif(input.checked) {\r\n\t\t\t\t\t\t\tvar obj = {};\r\n\t\t\t\t\t\t\tscheduler.form_blocks.time.get_value(node,obj,config);\r\n\r\n\t\t\t\t\t\t\tstart_date = scheduler.date.date_part(obj.start_date);\r\n\t\t\t\t\t\t\tend_date = scheduler.date.date_part(obj.end_date);\r\n\r\n\t\t\t\t\t\t\tif (+end_date == +start_date || (+end_date >= +start_date && (ev.end_date.getHours() !== 0 || ev.end_date.getMinutes() !== 0)))\r\n\t\t\t\t\t\t\t\tend_date = scheduler.date.add(end_date, 1, \"day\");\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tstart_date = null;\r\n\t\t\t\t\t\t\tend_date = null;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\ts[map[0]].disabled=input.checked;\r\n\t\t\t\t\t\ts[ map[0] + s.length/2 ].disabled=input.checked;\r\n\r\n\t\t\t\t\t\t_fill_lightbox_select(s,0,start_date||ev.start_date);\r\n\t\t\t\t\t\t_fill_lightbox_select(s,4,end_date||ev.end_date);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(cfg.auto_end_date && cfg.event_duration) {\r\n\t\t\t\tvar _update_lightbox_select = function () {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (!(cfg.auto_end_date && cfg.event_duration)){\r\n\t\t\t\t\t\t// setting may be disabled after the handler is attached\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstart_date = new Date(s[map[3]].value,s[map[2]].value,s[map[1]].value,0,s[map[0]].value);\r\n\t\t\t\t\tend_date = new Date(start_date.getTime() + (scheduler.config.event_duration * 60 * 1000));\r\n\t\t\t\t\t_fill_lightbox_select(s, 4, end_date);\r\n\t\t\t\t};\r\n\t\t\t\tfor(var i=0; i<4; i++) {\r\n\t\t\t\t\tif(!s[i].$_eventAttached) {\r\n\t\t\t\t\t\ts[i].$_eventAttached = true;\r\n\t\t\t\t\t\tscheduler.event(s[i], \"change\", _update_lightbox_select);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction _fill_lightbox_select(s,i,d) {\r\n\t\t\t\tvar time_values = config._time_values;\r\n\t\t\t\tvar direct_value = d.getHours()*60+d.getMinutes();\r\n\t\t\t\tvar fixed_value = direct_value;\r\n\t\t\t\tvar value_found = false;\r\n\t\t\t\tfor (var k=0; k\";\r\n\t\tvar ariaAttr = \"\";\r\n\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\tariaAttr = this._waiAria.lightboxButtonAttrString(buttons[i]);\r\n\t\t\thtml += \"
\" + scheduler.locale.labels[buttons[i]] + \"
\";\r\n\t\t}\r\n\r\n\t\tbuttons = this.config.buttons_right;\r\n\t\tvar rtl = scheduler.config.rtl;\r\n\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\tariaAttr = this._waiAria.lightboxButtonAttrString(buttons[i]);\r\n\r\n\t\t\thtml += \"
\";\r\n\r\n\t\t\thtml += \"
\" + scheduler.locale.labels[buttons[i]] + \"
\";\r\n\t\t}\r\n\t\thtml += \"\";\r\n\t\thtml+=\"\";\r\n\t\td.innerHTML=html;\r\n\t\tif (scheduler.config.drag_lightbox){\r\n\t\t\tscheduler.event(d.firstChild, \"mousedown\", scheduler._ready_to_dnd);\r\n\t\t\tscheduler.event(d.firstChild, \"selectstart\", function(e){ \r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn false; \r\n\t\t\t});\r\n\t\t\td.firstChild.style.cursor = \"move\";\r\n\t\t\tscheduler._init_dnd_events();\r\n\r\n\t\t}\r\n\r\n\t\tthis._waiAria.lightboxAttr(d);\r\n\r\n\t\tthis.show_cover();\r\n\t\tthis._cover.insertBefore(d,this._cover.firstChild);\r\n\t\t\r\n\t\tthis._lightbox=d;\r\n\r\n\t\tvar sns=this.config.lightbox.sections;\r\n\t\thtml=\"\";\r\n\t\tfor (var i=0; i < sns.length; i++) {\r\n\t\t\tvar block=this.form_blocks[sns[i].type];\r\n\t\t\tif (!block) continue; //ignore incorrect blocks\r\n\t\t\tsns[i].id=\"area_\"+this.uid();\r\n\t\t\tvar button = \"\";\r\n\t\t\tif (sns[i].button){\r\n\t\t\t\tvar ariaAttr = scheduler._waiAria.lightboxSectionButtonAttrString(this.locale.labels[\"button_\"+sns[i].button]);\r\n\t\t\t\tbutton = \"
\"+this.locale.labels[\"button_\"+sns[i].button]+\"
\";\r\n\t\t\t}\r\n\r\n\t\t\tif (this.config.wide_form){\r\n\t\t\t\thtml+=\"
\";\r\n\t\t\t}\r\n\r\n\t\t\tvar label_name = this.locale.labels[\"section_\"+sns[i].name];\r\n\t\t\tif(typeof label_name !== \"string\"){\r\n\t\t\t\tlabel_name = sns[i].name;\r\n\t\t\t}\r\n\t\t\thtml+=\"
\"+button+ \"
\"+block.render.call(this,sns[i]);\r\n\t\t\thtml+=\"
\";\r\n\t\t}\r\n\r\n\t\tvar ds=d.getElementsByTagName(\"div\");\r\n\t\tfor (var i=0; i
 \r\n
\r\n
\r\n\r\n
`;\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._init_touch_events = function(){\r\n\tvar mobile = this.config.touch &&\r\n\t\t( ((navigator.userAgent.indexOf(\"Mobile\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"iPad\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"Android\")!=-1) ||\r\n\t\t\t(navigator.userAgent.indexOf(\"Touch\")!=-1)) && !window.MSStream) ||\r\n\t\t\t((navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1));\r\n\r\n\tif(mobile){\r\n\t\tthis.xy.scroll_width = 0;\r\n\t\tthis._mobile = true;\r\n\t}\r\n\r\n\tif(this.config.touch){\r\n\r\n\t\tvar touchEventsSupported = true;\r\n\t\ttry {\r\n\t\t\tdocument.createEvent(\"TouchEvent\");\r\n\t\t} catch (e) {\r\n\t\t\ttouchEventsSupported = false;\r\n\t\t}\r\n\r\n\t\tif (touchEventsSupported) {\r\n\t\t\tthis._touch_events([\"touchmove\", \"touchstart\", \"touchend\"], function (ev) {\r\n\t\t\t\tif (ev.touches && ev.touches.length > 1) return null;\r\n\t\t\t\tif (ev.touches[0])\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\ttarget: ev.target,\r\n\t\t\t\t\t\tpageX: ev.touches[0].pageX,\r\n\t\t\t\t\t\tpageY: ev.touches[0].pageY,\r\n\t\t\t\t\t\tclientX: ev.touches[0].clientX,\r\n\t\t\t\t\t\tclientY: ev.touches[0].clientY\r\n\t\t\t\t\t};\r\n\t\t\t\telse\r\n\t\t\t\t\treturn ev;\r\n\t\t\t}, function () {\r\n\t\t\t\treturn false;\r\n\t\t\t});\r\n\t\t} else if (window.PointerEvent || window.navigator.pointerEnabled) {\r\n\t\t\tthis._touch_events([\"pointermove\", \"pointerdown\", \"pointerup\"], function (ev) {\r\n\t\t\t\tif (ev.pointerType == \"mouse\") return null;\r\n\t\t\t\treturn ev;\r\n\t\t\t}, function (ev) {\r\n\t\t\t\treturn (!ev || (ev.pointerType == \"mouse\" ));\r\n\t\t\t});\r\n\t\t} else if (window.navigator.msPointerEnabled) {\r\n\t\t\tthis._touch_events([\"MSPointerMove\", \"MSPointerDown\", \"MSPointerUp\"], function (ev) {\r\n\t\t\t\tif (ev.pointerType == ev.MSPOINTER_TYPE_MOUSE) return null;\r\n\t\t\t\treturn ev;\r\n\t\t\t}, function (ev) {\r\n\t\t\t\treturn (!ev || ev.pointerType == ev.MSPOINTER_TYPE_MOUSE);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n};\r\n\r\nscheduler._touch_events = function(names, accessor, ignore){\r\n\t//webkit on android need to be handled separately\r\n\t//var a_webkit = (navigator.userAgent.indexOf(\"Android\")!=-1) && (navigator.userAgent.indexOf(\"WebKit\")!=-1);\r\n\tvar source, tracker, timer, drag_mode, scroll_mode, action_mode;\r\n\tvar dblclicktime = 0;\r\n\r\n\tfunction attachTouchEvent(element, name, callback){\r\n\t\t//touch gestures must be disabled when ligthbox is opened\r\n\t\tscheduler.event(element, name, function(e){\r\n\t\t\tif(scheduler._is_lightbox_open()){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\tif (ignore(e)) return;\r\n\t\t\t\treturn callback(e);\r\n\t\t\t}\r\n\t\t}, { passive: false });\r\n\t}\r\n\r\n\tfunction check_direction_swipe(s_ev, e_ev, step, max_dy){\r\n\t\tif (!s_ev || !e_ev) return false;\r\n\r\n\t\tvar t = s_ev.target;\r\n\t\twhile(t && t != scheduler._obj){\r\n\t\t\tt = t.parentNode;\r\n\t\t}\r\n\t\tif(t != scheduler._obj){\r\n\t\t\t//swipe outside scheduler\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// ignore swipe in horizontal timeline\r\n\t\tif(scheduler.matrix && scheduler.matrix[scheduler.getState().mode]){\r\n\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\tif(timeline.scrollable){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar dy = Math.abs(s_ev.pageY - e_ev.pageY);\r\n\t\tvar dx = Math.abs(s_ev.pageX - e_ev.pageX);\r\n\t\tif (dy < max_dy && dx>step && (!dy || (dx/dy > 3))){\r\n\t\t\tif (s_ev.pageX > e_ev.pageX) {\r\n\t\t\t\tscheduler._click.dhx_cal_next_button();\r\n\t\t\t}else {\r\n\t\t\t\tscheduler._click.dhx_cal_prev_button();\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\tfunction doMouseMove(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tvar dnd = scheduler.getState().drag_mode,\r\n\t\t\ttimeline = scheduler.matrix ? scheduler.matrix[scheduler._mode] : false;\r\n\r\n\t\tvar original_render = scheduler.render_view_data;\r\n\t\tif(dnd == 'create' && timeline){\r\n\t\t\t//suppress full redraw of timeline on creating event\r\n\t\t\tscheduler.render_view_data = function() {\r\n\t\t\t\tvar id = scheduler.getState().drag_id;\r\n\t\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\t\tvar property = timeline.y_property;\r\n\r\n\t\t\t\tvar evs = scheduler.getEvents(ev.start_date, ev.end_date);\r\n\t\t\t\tfor(var i = 0; i < evs.length; i++){\r\n\t\t\t\t\tif(evs[i][property] != ev[property]){\r\n\t\t\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tev._sorder = evs.length - 1;\r\n\t\t\t\tev._count = evs.length;\r\n\r\n\t\t\t\tthis.render_data([ev], scheduler.getState().mode);\r\n\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\tscheduler._on_mouse_move(e);\r\n\r\n\t\tif(dnd == 'create' && timeline){\r\n\t\t\tscheduler.render_view_data = original_render;\r\n\t\t}\r\n\r\n\t\tif (e.preventDefault)\r\n\t\t\te.preventDefault();\r\n\t\te.cancelBubble = true;\r\n\t\treturn false;\r\n\t}\r\n\r\n\t// touchmove\r\n\tattachTouchEvent(document.body, names[0], function(e){\r\n\t\tif (ignore(e)) return;\r\n\r\n\t\tvar acc = accessor(e);\r\n\t\tif(!acc) return;\r\n\t\tif (drag_mode){\r\n\t\t\tdoMouseMove(acc);\r\n\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._update_global_tip();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//if (tracker && a_webkit){\r\n\t\t//\tcheck_direction_swipe(tracker, accessor(e), 0);\r\n\t\t//}\r\n\r\n\t\ttracker = accessor(e);\r\n\t\t//ignore common and scrolling moves\r\n\t\tif (!action_mode) return;\r\n\r\n\t\t//multitouch\r\n\t\tif (!tracker){\r\n\t\t\tscroll_mode = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//target changed - probably in scroll mode\r\n\r\n\t\tif (source.target != tracker.target || (Math.abs(source.pageX - tracker.pageX) > 5) || (Math.abs(source.pageY - tracker.pageY) > 5)){\r\n\t\t\tscroll_mode = true;\r\n\t\t\tclearTimeout(timer);\r\n\t\t}\r\n\r\n\t});\r\n\r\n\t//attachTouchEvent(this._els[\"dhx_cal_data\"][0], \"scroll\", drag_cancel);\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], \"touchcancel\", drag_cancel);\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], \"contextmenu\", function(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tif (action_mode){\r\n\t\t\tif (e && e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t});\r\n\r\n\t// touchstart\r\n\tattachTouchEvent(this._obj, names[1], function(e){\r\n\t\t// block pull-to-refresh\r\n\t\tif(document && document.body){\r\n\t\t\tdocument.body.classList.add(\"dhx_cal_touch_active\");\r\n\t\t}\r\n\r\n\t\tif (ignore(e)) return;\r\n\t\tscheduler._pointerDragId = e.pointerId;\r\n\r\n\t\tvar fake_event;\r\n\t\tdrag_mode = scroll_mode = false;\r\n\t\taction_mode = true;\r\n\t\tfake_event = tracker = accessor(e);\r\n\r\n\t\tif (!fake_event){\r\n\t\t\tscroll_mode = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//dbl click\r\n\t\tvar now = new Date();\r\n\r\n\t\tif (!scroll_mode && !drag_mode && now - dblclicktime < 250){\r\n\t\t\tscheduler._click.dhx_cal_data(fake_event);\r\n\t\t\twindow.setTimeout(function(){\r\n\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t//fake_event.type = \"dblclick\";\r\n\t\t\t\tscheduler._on_dbl_click(fake_event);\r\n\t\t\t}, 50);\r\n\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._block_next_stop = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tdblclicktime = now;\r\n\r\n\t\t//drag\r\n\r\n\t\tif (scroll_mode || drag_mode || !scheduler.config.touch_drag)\r\n\t\t\treturn;\r\n\r\n\t\tvar actTask = scheduler._locate_event(document.activeElement);\r\n\t\tvar fakeTask = scheduler._locate_event(fake_event.target);\r\n\t\tvar sourceTask = source? scheduler._locate_event(source.target) : null;\r\n\r\n\t\tif(actTask && fakeTask && actTask == fakeTask && actTask != sourceTask)\r\n\t\t{\r\n\t\t\tif(e.preventDefault) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\te.cancelBubble = true;\r\n\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\tscheduler._click.dhx_cal_data(fake_event);\r\n\t\t\tsource = fake_event;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//there is no target\r\n\t\ttimer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tdrag_mode = true;\r\n\t\t\tvar target = source.target;\r\n\t\t\tvar className = scheduler._getClassName(target);\r\n\t\t\tif (target && className.indexOf(\"dhx_body\") != -1)\r\n\t\t\t\ttarget = target.previousSibling;\r\n\r\n\t\t\tscheduler._on_mouse_down(source, target);\r\n\t\t\tif (scheduler._drag_mode && scheduler._drag_mode != \"create\"){\r\n\t\t\t\tscheduler.for_rendered(scheduler._drag_id, function(node, i) {\r\n\t\t\t\t\tnode.style.display='none';\r\n\t\t\t\t\tscheduler._rendered.splice(i, 1);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (scheduler.config.touch_tip) {\r\n\t\t\t\tscheduler._show_global_tip();\r\n\t\t\t}\r\n\t\t\tscheduler.updateEvent(scheduler._drag_id);\r\n\t\t},scheduler.config.touch_drag);\r\n\r\n\t\tsource = fake_event;\r\n\t});\r\n\tfunction drag_cancel(e){\r\n\t\tif (ignore(e)) return;\r\n\t\tscheduler._hide_global_tip();\r\n\t\tif (drag_mode){\r\n\t\t\tscheduler._on_mouse_up( accessor(e) );\r\n\t\t\tscheduler._temp_touch_block = false;\r\n\t\t}\r\n\t\tscheduler._drag_id = null;\r\n\t\tscheduler._drag_mode=null;\r\n\t\tscheduler._drag_pos=null;\r\n\t\tscheduler._pointerDragId = null;\r\n\t\tclearTimeout(timer);\r\n\t\tdrag_mode = action_mode = false;\r\n\t\tscroll_mode = true;\r\n\t}\r\n\r\n\t// touch end\r\n\tattachTouchEvent(this._els[\"dhx_cal_data\"][0], names[2], function(e){\r\n\t\tif(document && document.body){\r\n\t\t\tdocument.body.classList.remove(\"dhx_cal_touch_active\");\r\n\t\t}\r\n\r\n\t\tif (ignore(e)) return;\r\n\r\n\t\tif(scheduler.config.touch_swipe_dates){\r\n\t\t\tif (!drag_mode && check_direction_swipe(source, tracker, 200, 100)) {\r\n\t\t\t\tscheduler._block_next_stop = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (drag_mode) {\r\n\t\t\tscheduler._ignore_next_click = true;\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tscheduler._ignore_next_click = false;\r\n\t\t\t}, 100);\r\n\t\t}\r\n\r\n\t\tdrag_cancel(e);\r\n\t\tif (scheduler._block_next_stop){\r\n\t\t\tscheduler._block_next_stop = false;\r\n\t\t\tif (e.preventDefault)\r\n\t\t\t\te.preventDefault();\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler.event(document.body, names[2], drag_cancel);\r\n};\r\n\r\nscheduler._show_global_tip = function(){\r\n\tscheduler._hide_global_tip();\r\n\r\n\tvar toptip = scheduler._global_tip = document.createElement(\"div\");\r\n\ttoptip.className='dhx_global_tip';\r\n\r\n\tscheduler._update_global_tip(1);\r\n\r\n\tdocument.body.appendChild(toptip);\r\n};\r\nscheduler._update_global_tip = function(init){\r\n\tvar toptip = scheduler._global_tip;\r\n\tif (toptip){\r\n\t\tvar time = \"\";\r\n\t\tif (scheduler._drag_id && !init){\r\n\t\t\tvar ev = scheduler.getEvent(scheduler._drag_id);\r\n\t\t\tif (ev)\r\n\t\t\t\ttime = \"
\" + (ev._timed ? scheduler.templates.event_header(ev.start_date, ev.end_date, ev):scheduler.templates.day_date(ev.start_date, ev.end_date, ev)) + \"
\";\r\n\t\t}\r\n\r\n\t\tif (scheduler._drag_mode == \"create\" || scheduler._drag_mode == \"new-size\")\r\n\t\t\ttoptip.innerHTML = (scheduler.locale.labels.drag_to_create || \"Drag to create\")+time;\r\n\t\telse\r\n\t\t\ttoptip.innerHTML = (scheduler.locale.labels.drag_to_move || \"Drag to move\")+time;\r\n\t}\r\n};\r\nscheduler._hide_global_tip = function(){\r\n\tvar toptip = scheduler._global_tip;\r\n\tif (toptip && toptip.parentNode){\r\n\t\ttoptip.parentNode.removeChild(toptip);\r\n\t\tscheduler._global_tip = 0;\r\n\t}\r\n};\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nscheduler.getRootView = function() {\r\n\treturn {\r\n\t\tview: {\r\n\t\t\trender: function(){\r\n\t\t\t\treturn {\r\n\t\t\t\t\ttag: \"div\",\r\n\t\t\t\t\ttype: 1,\r\n\t\t\t\t\tattrs: {\r\n\t\t\t\t\t\tstyle: \"width:100%;height:100%;\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\thooks: {\r\n\t\t\t\t\t\t\"didInsert\": function(){\r\n\t\t\t\t\t\t\tscheduler.setCurrentView();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tbody: [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tel: this.el,\r\n\t\t\t\t\t\t\ttype: 1\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t};\r\n\t\t\t},\r\n\t\t\tinit: function(){\r\n\t\t\t\tvar container = document.createElement(\"DIV\");\r\n\t\t\t\tcontainer.id = \"scheduler_\"+ scheduler.uid();\r\n\t\t\t\tcontainer.style.width = \"100%\";\r\n\t\t\t\tcontainer.style.height = \"100%\";\r\n\t\t\t\tcontainer.classList.add(\"dhx_cal_container\");\r\n\t\t\t\tcontainer.cmp = \"grid\";\r\n\t\t\t\tcontainer.innerHTML = '
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\t'
';\r\n\t\t\t\tscheduler.init(container);\r\n\r\n\t\t\t\tthis.el = container;\r\n\t\t\t}\r\n\t\t},\r\n\t\ttype: 4\r\n\t};\r\n};\r\n\r\n}","export default function extend(scheduler) {\r\n\r\n\r\nscheduler._addThemeClass = function(){\r\n\tdocument.documentElement.setAttribute(\"data-scheduler-theme\", scheduler.skin);\r\n};\r\n\r\nscheduler._skin_settings = {\r\n\tfix_tab_position: [1,0],\r\n\tuse_select_menu_space: [1,0],\r\n\twide_form: [1,0],\r\n\r\n\thour_size_px: [44,42],\r\n\tdisplayed_event_color: [\"#ff4a4a\", \"ffc5ab\"],\r\n\tdisplayed_event_text_color: [\"#ffef80\", \"7e2727\"]\r\n};\r\n\r\nscheduler._skin_xy = {\r\n\tlightbox_additional_height: [90,50],\r\n\tnav_height: [59,22],\r\n\tbar_height: [24,20]\r\n};\r\n\r\n// material skin uses a different box sizing model than other skins, and also requires some post-processing.\r\n// In order to render events correctly, we need to know which box sizing model is used\r\n// We can detect it by styles applied, taking into account that styles may be loaded after scheduler is rendered\r\n\r\nscheduler._is_material_skin = function(){\r\n\tif(!scheduler.skin){\r\n\t\treturn checkIfMaterialSkin();\r\n\t}else{\r\n\t\treturn ((scheduler.skin + \"\").indexOf(\"material\") > -1);\r\n\t}\r\n};\r\n\r\nfunction themeNameFromFile(){\r\n\tvar links = document.getElementsByTagName(\"link\");\r\n\tfor (var i = 0; i < links.length; i++) {\r\n\t\tvar res = links[i].href.match(\"dhtmlxscheduler_([a-z]+).css\");\r\n\t\tif (res){\r\n\t\t\treturn res[1];\r\n\t\t}\r\n\t}\r\n}\r\n\r\nscheduler._build_skin_info = function() {\r\n\tmonitorThemeChange();\r\n\tconst styles = getComputedStyle(this.$container);\r\n\tconst themeVar = styles.getPropertyValue(\"--dhx-scheduler-theme\");\r\n\r\n\tlet isCssVarTheme = !!themeVar;\r\n\tlet themeName;\r\n\tlet cssValues = {};\r\n\tlet oldMaterialTheme = false;\r\n\r\n\tif(isCssVarTheme){\r\n\t\tthemeName = themeVar;\r\n\t\tfor(let i in scheduler.xy){\r\n\t\t\tcssValues[i] = styles.getPropertyValue(`--dhx-scheduler-xy-${i}`);\r\n\t\t}\r\n\r\n\t\tcssValues.hour_size_px = styles.getPropertyValue(`--dhx-scheduler-config-hour_size_px`);\r\n\t\tcssValues.wide_form = styles.getPropertyValue(`--dhx-scheduler-config-form_wide`);\r\n\r\n\t}else{\r\n\t\tthemeName = themeNameFromFile();\r\n\t\toldMaterialTheme = scheduler._is_material_skin();\r\n\t}\r\n\r\n\r\n\tscheduler._theme_info = {\r\n\t\ttheme: themeName,\r\n\t\tcssVarTheme: isCssVarTheme,\r\n\t\toldMaterialTheme: oldMaterialTheme,\r\n\t\tvalues: cssValues\r\n\t};\r\n\r\n\tif(scheduler._theme_info.cssVarTheme){\r\n\t\tconst themeVariables = this._theme_info.values;\r\n\t\tfor(let i in scheduler.xy){\r\n\t\t\tif(!isNaN(parseInt(themeVariables[i]))){\r\n\t\t\t\tscheduler.xy[i] = parseInt(themeVariables[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n\r\nvar calculatedMaterial;\r\nfunction checkIfMaterialSkin(){\r\n\tif(calculatedMaterial === undefined){\r\n\t\tvar probe = document.createElement(\"div\");\r\n\t\tprobe.style.position = \"absolute\";\r\n\t\tprobe.style.left = \"-9999px\";\r\n\t\tprobe.style.top = \"-9999px\";\r\n\t\tprobe.innerHTML = \"
\" +\r\n\t\t\t\"
\" +\r\n\t\t\t\"
\"+\r\n\t\t\"
\";\r\n\t\tdocument.body.appendChild(probe);\r\n\t\tvar styles = window.getComputedStyle(probe.querySelector(\".dhx_cal_scale_placeholder\"));\r\n\t\tvar position = styles.getPropertyValue('position');\r\n\t\tif(position === \"absolute\"){\r\n\t\t\t// page has skins for placeholder element from material skin\r\n\t\t\tcalculatedMaterial = true;\r\n\t\t}else{\r\n\t\t\tcalculatedMaterial = false;\r\n\t\t}\r\n\r\n\t\tsetTimeout(function(){\r\n\t\t\tcalculatedMaterial = null;\r\n\t\t\tif(probe && probe.parentNode){\r\n\t\t\t\tprobe.parentNode.removeChild(probe);\r\n\t\t\t}\r\n\t\t}, 500);\r\n\t}\r\n\treturn calculatedMaterial;\r\n}\r\n\r\nvar cachedBorderBoxValue;\r\nfunction checkIfBorderBoxStyling(){\r\n\tif(scheduler._is_material_skin()){\r\n\t\treturn true;\r\n\t}else{\r\n\t\tif(cachedBorderBoxValue === undefined){\r\n\t\t\tvar probe = document.createElement(\"div\");\r\n\t\t\tprobe.style.position = \"absolute\";\r\n\t\t\tprobe.style.left = \"-9999px\";\r\n\t\t\tprobe.style.top = \"-9999px\";\r\n\t\t\tprobe.innerHTML = \"
\" +\r\n\t\t\t\t\"
\" +\r\n\t\t\t\t\t\"
\"+\r\n\t\t\t\t\"
\"+\r\n\t\t\t\"
\";\r\n\r\n\t\t\tdocument.body.appendChild(probe);\r\n\t\t\tvar styles = window.getComputedStyle(probe.querySelector(\".dhx_body\"));\r\n\t\t\tvar boxSizing = styles.getPropertyValue('box-sizing');\r\n\t\t\tdocument.body.removeChild(probe);\r\n\t\t\tcachedBorderBoxValue = !!(boxSizing === \"border-box\");\r\n\r\n\t\t\tif(!cachedBorderBoxValue){\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tcachedBorderBoxValue = undefined;\r\n\t\t\t\t}, 1000);// recalculate in case scheduler initialized before skin is loaded\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn cachedBorderBoxValue;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction refreshAfterLoad(){\r\n\tif(scheduler._is_material_skin() || scheduler._border_box_events()){\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar oldStyling = cachedBorderBoxValue;\r\n\tcachedBorderBoxValue = undefined;\r\n\tcalculatedMaterial = undefined;\r\n\tvar newStyling = checkIfBorderBoxStyling();\r\n\r\n\t// if box styling model changed - means scheduler was rendered before stylesheet was loaded or parsed inline\r\n\t// repaint scheduler in order to apply new styles\r\n\tif(oldStyling !== newStyling && scheduler.$container && scheduler.getState().mode){\r\n\t\tscheduler.setCurrentView();\r\n\t}\r\n}\r\nscheduler.event(window, 'DOMContentLoaded', refreshAfterLoad);\r\nscheduler.event(window, 'load', refreshAfterLoad);\r\n\r\nscheduler._border_box_events = function(){\r\n\treturn checkIfBorderBoxStyling();\r\n};\r\n\r\nscheduler._configure = function(col, data, skin){\r\n\tfor (var key in data)\r\n\t\tif (typeof col[key] == \"undefined\")\r\n\t\t\tcol[key] = data[key][skin];\r\n};\r\n\r\nscheduler.setSkin = function(value){\r\n\tthis.skin = value;\r\n\tscheduler._addThemeClass();\r\n\tif(scheduler.$container){\r\n\t\tthis._skin_init();\r\n\t\tthis.render();\r\n\t}\r\n\t\r\n\t//\r\n};\r\n\r\nfunction flatSkinHourScale(date){\r\n\tvar min = date.getMinutes();\r\n\tmin = min < 10 ? \"0\"+min : min;\r\n\tvar html = \"\"+ date.getHours() +\"\"+\r\n\t\t\" \"+ min +\"\";\r\n\treturn html;\r\n}\r\n\r\nlet monitorIntervalId = null;\r\nfunction monitorThemeChange(){\r\n\tconst container = scheduler.$container;\r\n\t\r\n\tclearInterval(monitorIntervalId);\r\n\tif(container){\r\n\t\tmonitorIntervalId = setInterval(() => {\r\n\t\t\tconst csstheme = getComputedStyle(container).getPropertyValue('--dhx-scheduler-theme');\r\n\t\t\tif(csstheme && csstheme !== scheduler.skin){\r\n\t\t\t\tscheduler.setSkin(csstheme);\r\n\t\t\t}\r\n\r\n\t\t}, 100);\r\n\t}\r\n}\r\nscheduler.attachEvent(\"onDestroy\", function(){\r\n\tclearInterval(monitorIntervalId);\r\n});\r\n\r\nscheduler._skin_init = function(){\r\n\tthis._build_skin_info();\r\n\r\n\tif (!this.skin){\r\n\t\tthis.skin = this._theme_info.theme;\r\n\t}\r\n\tscheduler._addThemeClass();\r\n\tif (scheduler.skin === \"flat\"){\r\n\t\t// scheduler.xy.scale_height = 35;\r\n\t\tscheduler.templates.hour_scale = flatSkinHourScale;\r\n\t}else if (scheduler.templates.hour_scale === flatSkinHourScale){\r\n\t\tscheduler.templates.hour_scale = scheduler.date.date_to_str(scheduler.config.hour_date);\r\n\t}\r\n\r\n\r\n\r\n\t//scheduler._lightbox_template=\"
 
\";\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\r\n\t\tvar date_to_str = scheduler.date.date_to_str(\"%d\");\r\n\t\tif(!scheduler.templates._old_month_day){\r\n\t\t\tscheduler.templates._old_month_day = scheduler.templates.month_day;\r\n\t\t}\r\n\t\tvar old_month_day = scheduler.templates._old_month_day;\r\n\t\tscheduler.templates.month_day = function(date) {\r\n\t\t\tif (this._mode == \"month\") {\r\n\t\t\t\tvar label = date_to_str(date);\r\n\t\t\t\tif (date.getDate() == 1) {\r\n\t\t\t\t\tlabel = scheduler.locale.date.month_full[date.getMonth()] + \" \" + label;\r\n\t\t\t\t}\r\n\t\t\t\tif (+date == +scheduler.date.date_part(this._currentDate())) {\r\n\t\t\t\t\tlabel = scheduler.locale.labels.dhx_cal_today_button + \" \" + label;\r\n\t\t\t\t}\r\n\t\t\t\treturn label;\r\n\t\t\t} else {\r\n\t\t\t\treturn old_month_day.call(this, date);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t// tab classes\r\n\t\tif(scheduler.config.fix_tab_position){\r\n\t\t\tconst tabs = scheduler._els[\"dhx_cal_navline\"][0].querySelectorAll('[data-tab]');\r\n\t\t\ttabs.forEach((tab) => {\r\n\t\t\t\tconst view = tab.getAttribute(\"data-tab\") || tab.getAttribute(\"name\");\r\n\r\n\t\t\t\tswitch (view) {\r\n\t\t\t\t\tcase \"day\":\r\n\t\t\t\t\tcase \"day_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_first\");\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"week\":\r\n\t\t\t\t\tcase \"week_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"month\":\r\n\t\t\t\t\tcase \"month_tab\":\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_last\");\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_segmented\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\ttab.classList.add(\"dhx_cal_tab_standalone\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\treorderTabs(scheduler._els[\"dhx_cal_navline\"][0]);\r\n\r\n\t\t}\r\n\t}, {once: true});\r\n\r\n\tfunction reorderTabs(container) {\r\n\t\t// segmented tabs should go first\r\n\r\n\t\tif(scheduler.config.header){\r\n\t\t\treturn;\r\n\t\t\t// don't reorder tabs if header is defined via config\r\n\t\t}\r\n\t\tconst tabs = Array.from(container.querySelectorAll('.dhx_cal_tab'));\r\n\t\r\n\t\t// segmented tabs\r\n\t\tconst order = ['day', 'week', 'month'];\r\n\t\r\n\t\tconst specialTabs = order.map(tabName => \r\n\t\t\ttabs.find(tab => tab.getAttribute('data-tab') === tabName)\r\n\t\t).filter(tab => tab !== undefined);\r\n\t\r\n\t\tlet firstTab = tabs.length > 0 ? tabs[0] : null;\r\n\r\n\t\tspecialTabs.reverse().forEach(tab => {\r\n\t\t\tcontainer.insertBefore(tab, firstTab);\r\n\t\t\tfirstTab = tab;\r\n\t\t});\r\n\t}\r\n\r\n\t// scheduler._skin_init = function(){\r\n\t// \tthis._build_skin_info();\r\n\t// \tthis.skin = this._theme_info.theme;\r\n\t// };\r\n};\r\n\r\n\r\n\r\n}","export default function extend(scheduler) {\r\n\r\nif (window.jQuery){\r\n\r\n(function( $ ){\r\n\tvar counter = 0;\r\n\tvar methods = [];\r\n\t$.fn.dhx_scheduler = function(config){\r\n\t\tif (typeof(config) === 'string') {\r\n\t\t\tif (methods[config] ) {\r\n\t\t\t\treturn methods[config].apply(this, []);\r\n\t\t\t}else {\r\n\t\t\t\t$.error('Method ' + config + ' does not exist on jQuery.dhx_scheduler');\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvar views = [];\r\n\t\t\tthis.each(function() {\r\n\t\t\t\tif (this && this.getAttribute){\r\n\t\t\t\t\tif (!this.getAttribute(\"dhxscheduler\")){\r\n\t\t\t\t\t\tvar name = \"scheduler\";\r\n\t\t\t\t\t\tif (counter){\r\n\t\t\t\t\t\t\tname = \"scheduler\" + (counter+1);\r\n\t\t\t\t\t\t\twindow[name] = Scheduler.getSchedulerInstance();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tvar comp = window[name];\r\n\r\n\t\t\t\t\t\tthis.setAttribute(\"dhxscheduler\", name);\r\n\t\t\t\t\t\tfor (var key in config)\r\n\t\t\t\t\t\t\tif (key!=\"data\")\r\n\t\t\t\t\t\t\t\tcomp.config[key] = config[key];\r\n\r\n\t\t\t\t\t\tif (!this.getElementsByTagName(\"div\").length){\r\n\t\t\t\t\t\t\tthis.innerHTML = '
';\r\n\t\t\t\t\t\t\tthis.className += \" dhx_cal_container\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcomp.init(this, comp.config.date, comp.config.mode);\r\n\t\t\t\t\t\tif (config.data)\r\n\t\t\t\t\t\t\tcomp.parse(config.data);\r\n\r\n\t\t\t\t\t\tviews.push(comp);\r\n\t\t\t\t\t\tcounter++;\r\n\t\t\t\t\t} else\r\n\t\t\t\t\t\tviews.push(window[this.getAttribute(\"dhxscheduler\")]);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif (views.length === 1) return views[0];\r\n\t\t\treturn views;\r\n\t\t}\r\n\t};\r\n\r\n\r\n\r\n\r\n})(window.jQuery);\r\n\r\n}\r\n\r\n}","import global from \"../global\";\r\n\r\nexport default function extend(scheduler) {\r\n\r\n(function(){\r\n\r\n\tvar setCurrentView = scheduler.setCurrentView,\r\n\t\tupdateView = scheduler.updateView;\r\n\tvar update_view_timer = null,\r\n\t\tcurr_view_timer = null;\r\n\r\n\tvar lazy_setCurrentView = function(date, mode){\r\n\t\tvar self = this;\r\n\t\tglobal.clearTimeout(curr_view_timer);\r\n\t\tglobal.clearTimeout(update_view_timer);\r\n\r\n\t\tvar oldDate = self._date,\r\n\t\t\toldMode = self._mode;\r\n\t\tupdateFlags(this, date, mode);\r\n\r\n\t\tcurr_view_timer = setTimeout(function(){\r\n\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif (!self.callEvent(\"onBeforeViewChange\", [oldMode, oldDate, mode || self._mode, date || self._date])){\r\n\t\t\t\tupdateFlags(self, oldDate, oldMode);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tupdateView.call(self, date, mode);\r\n\t\t\tself.callEvent(\"onViewChange\", [self._mode, self._date]);\r\n\r\n\t\t\tglobal.clearTimeout(update_view_timer);\r\n\t\t\tcurr_view_timer = 0;\r\n\t\t}, scheduler.config.delay_render);\r\n\t};\r\n\tvar lazy_updateView = function(date, mode){\r\n\t\tvar self = this,\r\n\t\t\tars = arguments;\r\n\r\n\t\tupdateFlags(this, date, mode);\r\n\r\n\t\tglobal.clearTimeout(update_view_timer);\r\n\t\tupdate_view_timer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif(curr_view_timer)\r\n\t\t\t\treturn;\r\n\r\n\t\t\tupdateView.apply(self, ars);\r\n\t\t}, scheduler.config.delay_render);\r\n\t};\r\n\tfunction updateFlags(scheduler, date, mode){\r\n\t\tif(date)\r\n\t\t\tscheduler._date = date;\r\n\t\tif(mode)\r\n\t\t\tscheduler._mode = mode;\r\n\r\n\t}\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\tif(scheduler.config.delay_render){\r\n\t\t\tscheduler.setCurrentView = lazy_setCurrentView;\r\n\t\t\tscheduler.updateView = lazy_updateView;\r\n\t\t}else{\r\n\t\t\tscheduler.setCurrentView = setCurrentView;\r\n\t\t\tscheduler.updateView = updateView;\r\n\t\t}\r\n\t});\r\n\r\n})();\r\n\r\n}","export default function DataProcessorEvents(scheduler, dp){\r\n\tthis.$scheduler = scheduler;\r\n\tthis.$dp = dp;\r\n\tthis._dataProcessorHandlers = [];\r\n\r\n\tthis.attach = function () {\r\n\t\tvar dp = this.$dp;\r\n\t\tvar scheduler = this.$scheduler;\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onEventAdded\", function(id) {\r\n\t\t\tif (!this._loading && this._validId(id))\r\n\t\t\tdp.setUpdated(id,true,\"inserted\");\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function(id) {\r\n\t\t\tif (!this._validId(id)) return;\r\n\t\t\tvar z=dp.getState(id);\r\n\r\n\t\t\tif (z==\"inserted\" || this._new_event) { dp.setUpdated(id,false); return true; }\r\n\t\t\tif (z==\"deleted\") return false;\r\n\t\t\tif (z==\"true_deleted\") return true;\r\n\r\n\t\t\tdp.setUpdated(id,true,\"deleted\");\r\n\t\t\treturn false;\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onEventChanged\", function(id) { \r\n\t\t\tif (!this._loading && this._validId(id))\r\n\t\t\tdp.setUpdated(id,true,\"updated\");\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(scheduler.attachEvent(\"onClearAll\", function() { \r\n\t\t\t// clear dataprocessor state when scheduler is reset\r\n\t\t\tdp._in_progress={};\r\n\t\t\tdp._invalid={};\r\n\t\t\tdp.updatedRows = [];\r\n\t\t\tdp._waitMode = 0;\r\n\t\t}));\r\n\r\n\t\tdp.attachEvent(\"insertCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"updateCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"deleteCallback\", function(upd, id) {\r\n\t\t\tif (scheduler.getEvent(id)){\r\n\t\t\t\tscheduler.setUserData(id, this.action_param, \"true_deleted\");\r\n\t\t\t\tscheduler.deleteEvent(id);\r\n\t\t\t} else if (scheduler._add_rec_marker)\r\n\t\t\t\tscheduler._update_callback(upd, id);\r\n\t\t});\r\n\t};\r\n\r\n\tthis.detach = function () {\r\n\t\tfor (var key in this._dataProcessorHandlers) {\r\n\t\t\tvar handler = this._dataProcessorHandlers[key];\r\n\t\t\tthis.$scheduler.detachEvent(handler);\r\n\t\t}\r\n\t\tthis._dataProcessorHandlers = [];\r\n\t};\r\n}\r\n\r\nexport function extendScheduler(scheduler, dp){\r\n\tscheduler._validId=function(id){\r\n\t\tif(this._is_virtual_event){\r\n\t\t\treturn !this._is_virtual_event(id);\r\n\t\t}\r\n\t\treturn true;\r\n\t};\r\n\tscheduler.setUserData=function(id,name,value){\r\n\t\tif (id){\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif(ev) ev[name]=value;\r\n\t\t}else{\r\n\t\t\tthis._userdata[name]=value;\r\n\t\t}\r\n\t};\r\n\tscheduler.getUserData=function(id,name){\r\n\t\tif (id){\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif(ev)\r\n\t\t\t\treturn ev[name];\r\n\t\t\telse\r\n\t\t\t\treturn null;\r\n\t\t}else{\r\n\t\t\treturn this._userdata[name];\r\n\t\t}\r\n\t};\r\n\tscheduler._set_event_text_style=function(id,style){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\t\tthis.for_rendered(id,function(r){\r\n\t\t\tr.style.cssText+=\";\"+style;\r\n\t\t});\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tev[\"_text_style\"]=style;\r\n\t\tthis.event_updated(ev);\r\n\t};\r\n\tscheduler._update_callback = function(upd,id){\r\n\t\tvar data = scheduler._xmlNodeToJSON(upd.firstChild);\r\n\t\t//fix for updates of recurring events\r\n\t\tif (data.rec_type == \"none\") data.rec_pattern = \"none\";\r\n\t\tdata.text = data.text||data._tagvalue;\r\n\t\tdata.start_date = scheduler._helpers.parseDate(data.start_date);\r\n\t\tdata.end_date = scheduler._helpers.parseDate(data.end_date);\r\n\t\tscheduler.addEvent(data);\r\n\t\tif (scheduler._add_rec_marker)\r\n\t\t\tscheduler.setCurrentView();\r\n\t};\r\n\tscheduler._dp_change_event_id = function(id, new_id){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\t\tscheduler.changeEventId(id, new_id);\r\n\t};\r\n\tscheduler._dp_hook_delete = function(id, new_id){\r\n\t\tif(!scheduler.getEvent(id))\r\n\t\t\treturn;\r\n\r\n\t\tif(new_id && id != new_id){\r\n\t\t\tif(this.getUserData(id, dp.action_param) == \"true_deleted\")\r\n\t\t\t\tthis.setUserData(id, dp.action_param, \"updated\");\r\n\r\n\t\t\tthis.changeEventId(id, new_id);\r\n\t\t}\r\n\t\treturn this.deleteEvent(new_id, true);\r\n\t};\r\n\r\n\tscheduler.setDp = function() {\r\n\t\tthis._dp = dp;\r\n\t};\r\n\tscheduler.setDp();\r\n}","import DataProcessorEvents from \"./dataprocessor_hooks\";\r\nimport { extendScheduler } from \"./dataprocessor_hooks\";\r\nimport eventable from \"../../utils/eventable\";\r\nimport global from \"../../global\";\r\n\r\n/**\r\n *\t@desc: constructor, data processor object\r\n *\t@param: serverProcessorURL - url used for update\r\n *\t@type: public\r\n */\r\nexport function DataProcessor(serverProcessorURL){\r\n\tthis.serverProcessor = serverProcessorURL;\r\n\tthis.action_param = \"!nativeeditor_status\";\r\n\r\n\tthis.object = null;\r\n\tthis.updatedRows = []; // ids of updated rows\r\n\r\n\tthis.autoUpdate = true;\r\n\tthis.updateMode = \"cell\";\r\n\tthis._tMode = \"GET\";\r\n\tthis._headers = null;\r\n\tthis._payload = null;\r\n\tthis.post_delim = \"_\";\r\n\r\n\tthis._waitMode = 0;\r\n\tthis._in_progress = {};\r\n\tthis._invalid = {};\r\n\tthis.messages = [];\r\n\r\n\tthis.styles = {\r\n\t\tupdated: \"font-weight:bold;\",\r\n\t\tinserted: \"font-weight:bold;\",\r\n\t\tdeleted: \"text-decoration : line-through;\",\r\n\t\tinvalid: \"background-color:FFE0E0;\",\r\n\t\tinvalid_cell: \"border-bottom:2px solid red;\",\r\n\t\terror: \"color:red;\",\r\n\t\tclear: \"font-weight:normal;text-decoration:none;\"\r\n\t};\r\n\tthis.enableUTFencoding(true);\r\n\teventable(this); // TODO: need to update\r\n\r\n\treturn this;\r\n}\r\nDataProcessor.prototype = {\r\n\tsetTransactionMode: function (mode, total) {\r\n\t\tif (typeof mode == \"object\") {\r\n\t\t\tthis._tMode = mode.mode || this._tMode;\r\n\r\n\t\t\tif (mode.headers !== undefined) {\r\n\t\t\t\tthis._headers = mode.headers;\r\n\t\t\t}\r\n\r\n\t\t\tif (mode.payload !== undefined) {\r\n\t\t\t\tthis._payload = mode.payload;\r\n\t\t\t}\r\n\t\t\tthis._tSend = !!total;\r\n\t\t} else {\r\n\t\t\tthis._tMode = mode;\r\n\t\t\tthis._tSend = total;\r\n\t\t}\r\n\r\n\t\tif (this._tMode == \"REST\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t}\r\n\r\n\t\tif (this._tMode === \"JSON\" || this._tMode === \"REST-JSON\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t\tthis._serializeAsJson = true;\r\n\t\t\tthis._headers = this._headers || {};\r\n\t\t\tthis._headers[\"Content-Type\"] = \"application/json\";\r\n\t\t}else{\r\n\t\t\tif(this._headers && !this._headers[\"Content-Type\"]){\r\n\t\t\t\tthis._headers[\"Content-Type\"] = \"application/x-www-form-urlencoded\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (this._tMode === \"CUSTOM\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._endnm = true;\r\n\t\t\tthis._router = mode.router;\r\n\t\t}\r\n\t},\r\n\tescape: function (data) {\r\n\t\tif (this._utf)\r\n\t\t\treturn encodeURIComponent(data);\r\n\t\telse\r\n\t\t\treturn escape(data);\r\n\t},\r\n\t/**\r\n\t *\t@desc: allows to set escaping mode\r\n\t *\t@param: true - utf based escaping, simple - use current page encoding\r\n\t *\t@type: public\r\n\t */\r\n\tenableUTFencoding: function (mode) {\r\n\t\tthis._utf = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: allows to define, which column may trigger update\r\n\t *\t@param: val - array or list of true/false values\r\n\t *\t@type: public\r\n\t */\r\n\tsetDataColumns: function (val) {\r\n\t\tthis._columns = (typeof val == \"string\") ? val.split(\",\") : val;\r\n\t},\r\n\t/**\r\n\t *\t@desc: get state of updating\r\n\t *\t@returns: true - all in sync with server, false - some items not updated yet.\r\n\t *\t@type: public\r\n\t */\r\n\tgetSyncState: function () {\r\n\t\treturn !this.updatedRows.length;\r\n\t},\r\n\t/**\r\n\t *\t@desc: enable/disable named field for data syncing, will use column ids for grid\r\n\t *\t@param: mode - true/false\r\n\t *\t@type: public\r\n\t */\r\n\tenableDataNames: function (mode) {\r\n\t\tthis._endnm = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: enable/disable mode , when only changed fields and row id send to the server side, instead of all fields in default mode\r\n\t *\t@param: mode - true/false\r\n\t *\t@type: public\r\n\t */\r\n\tenablePartialDataSend: function (mode) {\r\n\t\tthis._changed = !!mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: set if rows should be send to server automatically\r\n\t *\t@param: mode - \"row\" - based on row selection changed, \"cell\" - based on cell editing finished, \"off\" - manual data sending\r\n\t *\t@type: public\r\n\t */\r\n\tsetUpdateMode: function (mode, dnd) {\r\n\t\tthis.autoUpdate = (mode == \"cell\");\r\n\t\tthis.updateMode = mode;\r\n\t\tthis.dnd = dnd;\r\n\t},\r\n\tignore: function (code, master) {\r\n\t\tthis._silent_mode = true;\r\n\t\tcode.call(master || window);\r\n\t\tthis._silent_mode = false;\r\n\t},\r\n\t/**\r\n\t *\t@desc: mark row as updated/normal. check mandatory fields,initiate autoupdate (if turned on)\r\n\t *\t@param: rowId - id of row to set update-status for\r\n\t *\t@param: state - true for \"updated\", false for \"not updated\"\r\n\t *\t@param: mode - update mode name\r\n\t *\t@type: public\r\n\t */\r\n\tsetUpdated: function (rowId, state, mode) {\r\n\t\tif (this._silent_mode) return;\r\n\t\tvar ind = this.findRow(rowId);\r\n\r\n\t\tmode = mode || \"updated\";\r\n\t\tvar existing = this.$scheduler.getUserData(rowId, this.action_param);\r\n\t\tif (existing && mode == \"updated\") mode = existing;\r\n\t\tif (state) {\r\n\t\t\tthis.set_invalid(rowId, false); //clear previous error flag\r\n\t\t\tthis.updatedRows[ind] = rowId;\r\n\t\t\tthis.$scheduler.setUserData(rowId, this.action_param, mode);\r\n\t\t\tif (this._in_progress[rowId])\r\n\t\t\t\tthis._in_progress[rowId] = \"wait\";\r\n\t\t} else {\r\n\t\t\tif (!this.is_invalid(rowId)) {\r\n\t\t\t\tthis.updatedRows.splice(ind, 1);\r\n\t\t\t\tthis.$scheduler.setUserData(rowId, this.action_param, \"\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.markRow(rowId, state, mode);\r\n\t\tif (state && this.autoUpdate) this.sendData(rowId);\r\n\t},\r\n\r\n\tmarkRow: function (id, state, mode) {\r\n\t\tvar str = \"\";\r\n\t\tvar invalid = this.is_invalid(id);\r\n\t\tif (invalid) {\r\n\t\t\tstr = this.styles[invalid];\r\n\t\t\tstate = true;\r\n\t\t}\r\n\t\tif (this.callEvent(\"onRowMark\", [id, state, mode, invalid])) {\r\n\t\t\t//default logic\r\n\t\t\tstr = this.styles[state ? mode : \"clear\"] + str;\r\n\r\n\t\t\tthis.$scheduler[this._methods[0]](id, str);\r\n\r\n\t\t\tif (invalid && invalid.details) {\r\n\t\t\t\tstr += this.styles[invalid + \"_cell\"];\r\n\t\t\t\tfor (var i = 0; i < invalid.details.length; i++)\r\n\t\t\t\t\tif (invalid.details[i])\r\n\t\t\t\t\t\tthis.$scheduler[this._methods[1]](id, i, str);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tgetActionByState: function(state) {\r\n\t\tif (state === \"inserted\") {\r\n\t\t\treturn \"create\";\r\n\t\t}\r\n\t\tif (state === \"updated\") {\r\n\t\t\treturn \"update\";\r\n\t\t}\r\n\t\tif (state === \"deleted\") {\r\n\t\t\treturn \"delete\";\r\n\t\t}\r\n\t\treturn \"update\";\r\n\t},\r\n\r\n\tgetState: function (id) {\r\n\t\treturn this.$scheduler.getUserData(id, this.action_param);\r\n\t},\r\n\tis_invalid: function (id) {\r\n\t\treturn this._invalid[id];\r\n\t},\r\n\tset_invalid: function (id, mode, details) {\r\n\t\tif (details) mode = {\r\n\t\t\tvalue: mode, details: details, toString: function () {\r\n\t\t\t\treturn this.value.toString();\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis._invalid[id] = mode;\r\n\t},\r\n\t/**\r\n\t *\t@desc: check mandatory fields and varify values of cells, initiate update (if specified)\r\n\t *\t@param: rowId - id of row to set update-status for\r\n\t *\t@type: public\r\n\t */\r\n\tcheckBeforeUpdate: function (rowId) {\r\n\t\treturn true;\r\n\t},\r\n\t/**\r\n\t *\t@desc: send row(s) values to server\r\n\t *\t@param: rowId - id of row which data to send. If not specified, then all \"updated\" rows will be send\r\n\t *\t@type: public\r\n\t */\r\n\tsendData: function (rowId) {\r\n\t\tif (this.$scheduler.editStop) this.$scheduler.editStop();\r\n\r\n\t\tif (typeof rowId == \"undefined\" || this._tSend) return this.sendAllData();\r\n\t\tif (this._in_progress[rowId]) return false;\r\n\r\n\t\tthis.messages = [];\r\n\t\tif (!this.checkBeforeUpdate(rowId) && this.callEvent(\"onValidationError\", [rowId, this.messages])) return false;\r\n\t\tthis._beforeSendData(this._getRowData(rowId), rowId);\r\n\t},\r\n\t_beforeSendData: function (data, rowId) {\r\n\t\tif (!this.callEvent(\"onBeforeUpdate\", [rowId, this.getState(rowId), data])) return false;\r\n\t\tthis._sendData(data, rowId);\r\n\t},\r\n\tserialize: function (data, id) {\r\n\t\tif (this._serializeAsJson) {\r\n\t\t\treturn this._serializeAsJSON(data);\r\n\t\t}\r\n\r\n\t\tif (typeof data == \"string\")\r\n\t\t\treturn data;\r\n\t\tif (typeof id != \"undefined\")\r\n\t\t\treturn this.serialize_one(data, \"\");\r\n\t\telse {\r\n\t\t\tvar stack = [];\r\n\t\t\tvar keys = [];\r\n\t\t\tfor (var key in data)\r\n\t\t\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\t\t\tstack.push(this.serialize_one(data[key], key + this.post_delim));\r\n\t\t\t\t\tkeys.push(key);\r\n\t\t\t\t}\r\n\t\t\tstack.push(\"ids=\" + this.escape(keys.join(\",\")));\r\n\t\t\tif (this.$scheduler.security_key)\r\n\t\t\t\tstack.push(\"dhx_security=\" + (this.$scheduler.security_key));\r\n\t\t\treturn stack.join(\"&\");\r\n\t\t}\r\n\t},\r\n\tserialize_one: function (data, pref) {\r\n\t\tif (typeof data == \"string\")\r\n\t\t\treturn data;\r\n\t\tvar stack = [];\r\n\t\tvar serialized = \"\";\r\n\t\tfor (var key in data)\r\n\t\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\t\tif ((key == \"id\" || key == this.action_param) && this._tMode == \"REST\") continue;\r\n\t\t\t\tif (typeof data[key] === \"string\" || typeof data[key] === \"number\") {\r\n\t\t\t\t\tserialized = data[key];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tserialized = JSON.stringify(data[key]);\r\n\t\t\t\t}\r\n\t\t\t\tstack.push(this.escape((pref || \"\") + key) + \"=\" + this.escape(serialized));\r\n\t\t\t}\r\n\t\treturn stack.join(\"&\");\r\n\t},\r\n\t_applyPayload: function (url) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tif (this._payload)\r\n\t\t\tfor (var key in this._payload)\r\n\t\t\t\turl = url + ajax.urlSeparator(url) + this.escape(key) + \"=\" + this.escape(this._payload[key]);\r\n\t\treturn url;\r\n\t},\r\n\t_sendData: function (dataToSend, rowId) {\r\n\t\tif (!dataToSend) {\r\n\t\t\treturn; // nothing to send\r\n\t\t}\r\n\t\tif (!this.callEvent(\"onBeforeDataSending\", rowId ? [rowId, this.getState(rowId), dataToSend] : [null, null, dataToSend])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (rowId) {\r\n\t\t\tthis._in_progress[rowId] = (new Date()).valueOf();\r\n\t\t}\r\n\r\n\t\tvar self = this;\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\r\n\t\tif (this._tMode === \"CUSTOM\") {\r\n\t\t\tvar state = this.getState(rowId);\r\n\t\t\tvar action = this.getActionByState(state);\r\n\t\t\tvar _onResolvedCreateUpdate = function (tag) {\r\n\t\t\t\tvar resultState = state;\r\n\t\t\t\tif(tag && tag.responseText && tag.setRequestHeader){\r\n\t\t\t\t\tif(tag.status !== 200){\r\n\t\t\t\t\t\tresultState = \"error\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\ttag = JSON.parse(tag.responseText);\r\n\t\t\t\t\t} catch (e){}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tresultState = resultState || \"updated\";\r\n\t\t\t\tvar sid = rowId;\r\n\t\t\t\tvar tid = rowId;\r\n\r\n\t\t\t\tif (tag) {\r\n\t\t\t\t\tresultState = tag.action || resultState;\r\n\t\t\t\t\tsid = tag.sid || sid;\r\n\t\t\t\t\ttid = tag.id || tag.tid || tid;\r\n\t\t\t\t}\r\n\t\t\t\tself.afterUpdateCallback(sid, tid, resultState, tag);\r\n\t\t\t};\r\n\r\n\t\t\tconst routerMode = \"event\";\r\n\t\t\tvar actionPromise;\r\n\t\t\tif (this._router instanceof Function) {\r\n\t\t\t\tactionPromise = this._router(routerMode, action, dataToSend, rowId);\r\n\t\t\t} else {\r\n\t\t\t\tswitch (state) {\r\n\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].create(dataToSend);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].delete(rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tactionPromise = this._router[routerMode].update(dataToSend, rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(actionPromise){\r\n\t\t\t\t// neither promise nor {tid: newId} response object\r\n\t\t\t\tif(!actionPromise.then &&\r\n\t\t\t\t\t(actionPromise.id === undefined && actionPromise.tid === undefined && actionPromise.action === undefined)){\r\n\t\t\t\t\tthrow new Error(\"Incorrect router return value. A Promise or a response object is expected\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(actionPromise.then){\r\n\t\t\t\t\tactionPromise.then(_onResolvedCreateUpdate).catch(function(error) {\r\n\t\t\t\t\t\tif(error && error.action){\r\n\t\t\t\t\t\t\t_onResolvedCreateUpdate(error);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t_onResolvedCreateUpdate({ action: \"error\", value: error});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// custom method may return a response object in case of sync action\r\n\t\t\t\t\t_onResolvedCreateUpdate(actionPromise);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t_onResolvedCreateUpdate(null);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar queryParams = {\r\n\t\t\tcallback: function(xml) {\r\n\t\t\t\tvar ids = [];\r\n\r\n\t\t\t\tif (rowId) {\r\n\t\t\t\t\tids.push(rowId);\r\n\t\t\t\t} else if (dataToSend) {\r\n\t\t\t\t\tfor (var key in dataToSend) {\r\n\t\t\t\t\t\tids.push(key);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn self.afterUpdate(self, xml, ids);\r\n\t\t\t},\r\n\t\t\theaders: self._headers\r\n\t\t};\r\n\r\n\t\tvar urlParams = this.serverProcessor + (this._user ? (ajax.urlSeparator(this.serverProcessor) + [\"dhx_user=\" + this._user, \"dhx_version=\" + this.$scheduler.getUserData(0, \"version\")].join(\"&\")) : \"\");\r\n\t\tvar url = this._applyPayload(urlParams);\r\n\t\tvar data;\r\n\r\n\t\tswitch (this._tMode) {\r\n\t\t\tcase \"GET\":\r\n\t\t\t\tdata = this._cleanupArgumentsBeforeSend(dataToSend);\r\n\t\t\t\tqueryParams.url = url + ajax.urlSeparator(url) + this.serialize(data, rowId);\r\n\t\t\t\tqueryParams.method = \"GET\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"POST\":\r\n\t\t\t\tdata = this._cleanupArgumentsBeforeSend(dataToSend);\r\n\t\t\t\tqueryParams.url = url;\r\n\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\tqueryParams.data = this.serialize(data, rowId);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"JSON\":\r\n\t\t\t\tdata = {};\r\n\t\t\t\tvar preprocessedData = this._cleanupItemBeforeSend(dataToSend);\r\n\t\t\t\tfor (var key in preprocessedData) {\r\n\t\t\t\t\tif (key === this.action_param || key === \"id\" || key === \"gr_id\") {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdata[key] = preprocessedData[key];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tqueryParams.url = url;\r\n\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\tqueryParams.data = JSON.stringify({\r\n\t\t\t\t\tid: rowId,\r\n\t\t\t\t\taction: dataToSend[this.action_param],\r\n\t\t\t\t\tdata: data\r\n\t\t\t\t});\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"REST\":\r\n\t\t\tcase \"REST-JSON\":\r\n\t\t\t\turl = urlParams.replace(/(&|\\?)editing=true/, \"\");\r\n\t\t\t\tdata = \"\";\r\n\r\n\t\t\t\tswitch (this.getState(rowId)) {\r\n\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\t\t\tqueryParams.data = this.serialize(dataToSend, rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\tqueryParams.method = \"DELETE\";\r\n\t\t\t\t\t\turl = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + rowId;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tqueryParams.method = \"PUT\";\r\n\t\t\t\t\t\tqueryParams.data = this.serialize(dataToSend, rowId);\r\n\t\t\t\t\t\turl = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + rowId;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tqueryParams.url = this._applyPayload(url);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tthis._waitMode++;\r\n\t\treturn ajax.query(queryParams);\r\n\t},\r\n\tsendAllData: function () {\r\n\t\tif (!this.updatedRows.length || this.updateMode === \"off\") { // FIXME: need to leave checking 'this.updateMode === \"off\"'?\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.messages = [];\r\n\t\tvar valid = true;\r\n\r\n\t\tthis._forEachUpdatedRow(function(rowId) {\r\n\t\t\tvalid = valid && this.checkBeforeUpdate(rowId);\r\n\t\t});\r\n\r\n\t\tif (!valid && !this.callEvent(\"onValidationError\", [\"\", this.messages])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (this._tSend) {\r\n\t\t\tthis._sendData(this._getAllData());\r\n\t\t} else {\r\n\t\t\tthis._forEachUpdatedRow(function(rowId) {\r\n\t\t\t\tif (!this._in_progress[rowId]) {\r\n\t\t\t\t\tif (this.is_invalid(rowId)) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis._beforeSendData(this._getRowData(rowId), rowId);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\t_getAllData: function (rowId) {\r\n\t\tvar out = {};\r\n\t\tvar has_one = false;\r\n\t\tthis._forEachUpdatedRow(function(id) {\r\n\t\t\tif (this._in_progress[id] || this.is_invalid(id)){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar row = this._getRowData(id);\r\n\t\t\tif (!this.callEvent(\"onBeforeUpdate\", [id, this.getState(id), row])) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tout[id] = row;\r\n\t\t\thas_one = true;\r\n\t\t\tthis._in_progress[id] = (new Date()).valueOf();\r\n\t\t});\r\n\t\treturn has_one ? out : null;\r\n\t},\r\n\r\n\tfindRow: function (pattern) {\r\n\t\tvar i = 0;\r\n\t\tfor (i = 0; i < this.updatedRows.length; i++)\r\n\t\t\tif (pattern == this.updatedRows[i]) break;\r\n\t\treturn i;\r\n\t},\r\n\r\n\t/**\r\n\t *\t@desc: define custom actions\r\n\t *\t@param: name - name of action, same as value of action attribute\r\n\t *\t@param: handler - custom function, which receives a XMl response content for action\r\n\t *\t@type: private\r\n\t */\r\n\tdefineAction: function (name, handler) {\r\n\t\tif (!this._uActions) this._uActions = {};\r\n\t\tthis._uActions[name] = handler;\r\n\t},\r\n\r\n\t/**\r\n\t *\t @desc: used in combination with setOnBeforeUpdateHandler to create custom client-server transport system\r\n\t *\t @param: sid - id of item before update\r\n\t *\t @param: tid - id of item after up0ate\r\n\t *\t @param: action - action name\r\n\t *\t @type: public\r\n\t *\t @topic: 0\r\n\t */\r\n\tafterUpdateCallback: function (sid, tid, action, btag) {\r\n\t\tif(!this.$scheduler){\r\n\t\t\t// destructor has been called before the callback\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar marker = sid;\r\n\t\tvar correct = (action !== \"error\" && action !== \"invalid\");\r\n\t\tif (!correct) {\r\n\t\t\tthis.set_invalid(sid, action);\r\n\t\t}\r\n\t\tif ((this._uActions) && (this._uActions[action]) && (!this._uActions[action](btag))) {\r\n\t\t\treturn (delete this._in_progress[marker]);\r\n\t\t}\r\n\r\n\t\tif (this._in_progress[marker] !== \"wait\") {\r\n\t\t\tthis.setUpdated(sid, false);\r\n\t\t}\r\n\r\n\t\tvar originalSid = sid;\r\n\r\n\t\tswitch (action) {\r\n\t\t\tcase \"inserted\":\r\n\t\t\tcase \"insert\":\r\n\t\t\t\tif (tid != sid) {\r\n\t\t\t\t\tthis.setUpdated(sid, false);\r\n\t\t\t\t\tthis.$scheduler[this._methods[2]](sid, tid);\r\n\t\t\t\t\tsid = tid;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"delete\":\r\n\t\t\tcase \"deleted\":\r\n\t\t\t\tthis.$scheduler.setUserData(sid, this.action_param, \"true_deleted\");\r\n\t\t\t\tthis.$scheduler[this._methods[3]](sid, tid);\r\n\t\t\t\tdelete this._in_progress[marker];\r\n\t\t\t\treturn this.callEvent(\"onAfterUpdate\", [sid, action, tid, btag]);\r\n\t\t}\r\n\r\n\t\tif (this._in_progress[marker] !== \"wait\") {\r\n\t\t\tif (correct) {\r\n\t\t\t\tthis.$scheduler.setUserData(sid, this.action_param, \"\");\r\n\t\t\t}\r\n\t\t\tdelete this._in_progress[marker];\r\n\t\t} else {\r\n\t\t\tdelete this._in_progress[marker];\r\n\t\t\tthis.setUpdated(tid, true, this.$scheduler.getUserData(sid, this.action_param));\r\n\t\t}\r\n\r\n\t\tthis.callEvent(\"onAfterUpdate\", [originalSid, action, tid, btag]);\r\n\t},\r\n\r\n\t_errorResponse: function (xml, id){\r\n\t\tif(this.$scheduler && this.$scheduler.callEvent){\r\n\t\t\tthis.$scheduler.callEvent(\"onSaveError\", [id, xml.xmlDoc]);\r\n\t\t}\r\n\t\treturn this.cleanUpdate(id);\r\n\t},\r\n\r\n\t_setDefaultTransactionMode: function () {\r\n\t\tif (this.serverProcessor) {\r\n\t\t\tthis.setTransactionMode(\"POST\", true);\r\n\t\t\tthis.serverProcessor += (this.serverProcessor.indexOf(\"?\") !== -1 ? \"&\" : \"?\") + \"editing=true\";\r\n\t\t\tthis._serverProcessor = this.serverProcessor;\r\n\t\t}\r\n\t},\r\n\t\r\n\t/**\r\n\t *\t@desc: response from server\r\n\t *\t@param: xml - XMLLoader object with response XML\r\n\t *\t@type: private\r\n\t */\r\n\tafterUpdate: function (that, xml, id) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\r\n\t\tif (xml.xmlDoc.status !== 200){\r\n\t\t\tthis._errorResponse(xml, id);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// try to use json first\r\n\t\tvar tag;\r\n\t\ttry {\r\n\t\t\ttag = JSON.parse(xml.xmlDoc.responseText);\r\n\t\t} catch (e) {\r\n\t\t\t// empty response also can be processed by json handler\r\n\t\t\tif (!xml.xmlDoc.responseText.length) {\r\n\t\t\t\ttag = {};\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (tag) {\r\n\t\t\tvar action = tag.action || this.getState(id) || \"updated\";\r\n\t\t\tvar sid = tag.sid || id[0];\r\n\t\t\tvar tid = tag.tid || id[0];\r\n\t\t\tthat.afterUpdateCallback(sid, tid, action, tag);\r\n\t\t\tthat.finalizeUpdate();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// xml response\r\n\t\tvar top = ajax.xmltop(\"data\", xml.xmlDoc); // fix incorrect content type in IE\r\n\t\tif (!top) {\r\n\t\t\treturn this._errorResponse(xml, id);\r\n\t\t}\r\n\t\tvar atag = ajax.xpath(\"//data/action\", top);\r\n\t\tif (!atag.length) {\r\n\t\t\treturn this._errorResponse(xml, id);\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < atag.length; i++) {\r\n\t\t\tvar btag = atag[i];\r\n\t\t\tvar action = btag.getAttribute(\"type\");\r\n\t\t\tvar sid = btag.getAttribute(\"sid\");\r\n\t\t\tvar tid = btag.getAttribute(\"tid\");\r\n\r\n\t\t\tthat.afterUpdateCallback(sid, tid, action, btag);\r\n\t\t}\r\n\t\tthat.finalizeUpdate();\r\n\t},\r\n\tcleanUpdate: function (id) {\r\n\t\tif (id)\r\n\t\t\tfor (var i = 0; i < id.length; i++)\r\n\t\t\t\tdelete this._in_progress[id[i]];\r\n\t},\r\n\tfinalizeUpdate: function () {\r\n\t\tif (this._waitMode) this._waitMode--;\r\n\r\n\t\tthis.callEvent(\"onAfterUpdateFinish\", []);\r\n\t\tif (!this.updatedRows.length)\r\n\t\t\tthis.callEvent(\"onFullSync\", []);\r\n\t},\r\n\r\n\t/**\r\n\t *\t@desc: initializes data-processor\r\n\t *\t@param: scheduler - dhtmlxScheduler object to attach this data-processor to\r\n\t *\t@type: public\r\n\t */\r\n\tinit: function (scheduler) {\r\n\t\tif (this._initialized) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.$scheduler = scheduler;\r\n\t\tif (this.$scheduler._dp_init) {\r\n\t\t\tthis.$scheduler._dp_init(this);\r\n\t\t}\r\n\r\n\t\tthis._setDefaultTransactionMode();\r\n\r\n\t\tthis._methods=this._methods||[\"_set_event_text_style\",\"\",\"_dp_change_event_id\",\"_dp_hook_delete\"];\r\n\t\textendScheduler(this.$scheduler, this);\r\n\t\tvar dataProcessorEvents = new DataProcessorEvents(this.$scheduler, this);\r\n\t\tdataProcessorEvents.attach();\r\n\t\tthis.attachEvent(\"onDestroy\", function() {\r\n\t\t\tdelete this._getRowData;\r\n\r\n\t\t\tdelete this.$scheduler._dp;\r\n\t\t\tdelete this.$scheduler._dataprocessor;\r\n\t\t\tdelete this.$scheduler._set_event_text_style;\r\n\t\t\tdelete this.$scheduler._dp_change_event_id;\r\n\t\t\tdelete this.$scheduler._dp_hook_delete;\r\n\t\t\tdelete this.$scheduler;\r\n\t\t\tdataProcessorEvents.detach();\r\n\t\t});\r\n\t\tthis.$scheduler.callEvent(\"onDataProcessorReady\", [this]);\r\n\t\tthis._initialized = true;\r\n\r\n\t\tscheduler._dataprocessor=this;\r\n\t},\r\n\r\n\tsetOnAfterUpdate: function (ev) {\r\n\t\tthis.attachEvent(\"onAfterUpdate\", ev);\r\n\t},\r\n\tsetOnBeforeUpdateHandler: function (func) {\r\n\t\tthis.attachEvent(\"onBeforeDataSending\", func);\r\n\t},\r\n\r\n\t/* starts autoupdate mode\r\n\t\t@param interval time interval for sending update requests\r\n\t*/\r\n\tsetAutoUpdate: function (interval, user) {\r\n\t\tinterval = interval || 2000;\r\n\r\n\t\tthis._user = user || (new Date()).valueOf();\r\n\t\tthis._need_update = false;\r\n\t\t//this._loader = null;\r\n\t\tthis._update_busy = false;\r\n\r\n\t\tthis.attachEvent(\"onAfterUpdate\", function (sid, action, tid, xml_node) {\r\n\t\t\tthis.afterAutoUpdate(sid, action, tid, xml_node);\r\n\t\t});\r\n\t\tthis.attachEvent(\"onFullSync\", function () {\r\n\t\t\tthis.fullSync();\r\n\t\t});\r\n\r\n\t\tvar self = this;\r\n\t\tlet intervalId = global.setInterval(function () {\r\n\t\t\tself.loadUpdate();\r\n\t\t}, interval);\r\n\t\tthis.attachEvent(\"onDestroy\", function(){\r\n\t\t\tclearInterval(intervalId);\r\n\t\t});\r\n\t},\r\n\r\n\t/* process updating request answer\r\n\t\tif status == collision version is deprecated\r\n\t\tset flag for autoupdating immediately\r\n\t*/\r\n\tafterAutoUpdate: function (sid, action, tid, xml_node) {\r\n\t\tif (action == 'collision') {\r\n\t\t\tthis._need_update = true;\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t},\r\n\r\n\t/* callback function for onFillSync event\r\n\t\tcall update function if it's need\r\n\t*/\r\n\tfullSync: function () {\r\n\t\tif (this._need_update) {\r\n\t\t\tthis._need_update = false;\r\n\t\t\tthis.loadUpdate();\r\n\t\t}\r\n\t\treturn true;\r\n\t},\r\n\r\n\t/* sends query to the server and call callback function\r\n\t*/\r\n\tgetUpdates: function (url, callback) {\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tif (this._update_busy)\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\tthis._update_busy = true;\r\n\r\n\t\tajax.get(url, callback);\r\n\t},\r\n\r\n\t/* returns xml node value\r\n\t\t@param node\r\n\t\t\txml node\r\n\t*/\r\n\t_getXmlNodeValue: function(node) {\r\n\t\tif (node.firstChild) {\r\n\t\t\treturn node.firstChild.nodeValue;\r\n\t\t}\r\n\t\treturn \"\";\r\n\t},\r\n\r\n\t/* loads updates and processes them\r\n\t*/\r\n\tloadUpdate: function () {\r\n\t\tvar self = this;\r\n\t\tvar ajax = this.$scheduler.ajax;\r\n\t\tvar version = this.$scheduler.getUserData(0, \"version\");\r\n\t\tvar url = this.serverProcessor + ajax.urlSeparator(this.serverProcessor) + [\"dhx_user=\" + this._user, \"dhx_version=\" + version].join(\"&\");\r\n\t\turl = url.replace(\"editing=true&\", \"\");\r\n\t\tthis.getUpdates(url, function (xml) {\r\n\t\t\tvar vers = ajax.xpath(\"//userdata\", xml);\r\n\t\t\tself.$scheduler.setUserData(0, \"version\", self._getXmlNodeValue(vers[0]));\r\n\r\n\t\t\tvar updates = ajax.xpath(\"//update\", xml);\r\n\t\t\tif (updates.length) {\r\n\t\t\t\tself._silent_mode = true;\r\n\r\n\t\t\t\tfor (var i = 0; i < updates.length; i++) {\r\n\t\t\t\t\tvar status = updates[i].getAttribute(\"status\");\r\n\t\t\t\t\tvar id = updates[i].getAttribute(\"id\");\r\n\t\t\t\t\tvar parent = updates[i].getAttribute(\"parent\");\r\n\t\t\t\t\tswitch (status) {\r\n\t\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"insertCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"updated\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"updateCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"deleteCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tself._silent_mode = false;\r\n\t\t\t}\r\n\t\t\tself._update_busy = false;\r\n\t\t\tself = null;\r\n\t\t});\r\n\t},\r\n\r\n\tdestructor: function() {\r\n\t\tthis.callEvent(\"onDestroy\", []);\r\n\t\tthis.detachAllEvents();\r\n\r\n\t\tthis.updatedRows = [];\r\n\t\tthis._in_progress = {};\r\n\t\tthis._invalid = {};\r\n\t\tthis._headers = null;\r\n\t\tthis._payload = null;\r\n\t\tdelete this._initialized;\r\n\t},\r\n\r\n\turl: function(url) {\r\n\t\tthis.serverProcessor = this._serverProcessor = url;\r\n\t},\r\n\r\n\t_serializeAsJSON: function(data) {\r\n\t\tif (typeof data === \"string\") {\r\n\t\t\treturn data;\r\n\t\t}\r\n\r\n\t\tvar copy = this.$scheduler.utils.copy(data);\r\n\t\tif (this._tMode === \"REST-JSON\") {\r\n\t\t\tdelete copy.id;\r\n\t\t\tdelete copy[this.action_param];\r\n\t\t}\r\n\r\n\t\treturn JSON.stringify(copy);\r\n\t},\r\n\r\n\t// GET/POST/JSON modes of the dataProcessor didn't send the whole data items in 'delete' requests\r\n\t// clear extra info from the data in order not to change the request format\r\n\t_cleanupArgumentsBeforeSend: function(dataToSend) {\r\n\t\tvar processedData;\r\n\t\tif(dataToSend[this.action_param] === undefined){// hash of updated items, and not an individual item\r\n\t\t\tprocessedData = {};\r\n\t\t\tfor(var i in dataToSend) {\r\n\t\t\t\tprocessedData[i] = this._cleanupArgumentsBeforeSend(dataToSend[i]);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tprocessedData = this._cleanupItemBeforeSend(dataToSend);\r\n\t\t}\r\n\t\treturn processedData;\r\n\t},\r\n\t_cleanupItemBeforeSend: function(updatedItem) {\r\n\t\tvar output = null;\r\n\t\tif(updatedItem){\r\n\t\t\tif(updatedItem[this.action_param] === \"deleted\"){\r\n\t\t\t\toutput = {};\r\n\t\t\t\toutput.id = updatedItem.id;\r\n\t\t\t\toutput[this.action_param] = updatedItem[this.action_param];\r\n\t\t\t}else{\r\n\t\t\t\toutput = updatedItem;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn output;\r\n\t},\r\n\r\n\t_forEachUpdatedRow: function(code) {\r\n\t\tvar updatedRows = this.updatedRows.slice();\r\n\t\tfor (var i = 0; i < updatedRows.length; i++) {\r\n\t\t\tvar rowId = updatedRows[i];\r\n\t\t\tif (this.$scheduler.getUserData(rowId, this.action_param)) {\r\n\t\t\t\tcode.call(this, rowId);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\t_prepareItemForJson(item){\r\n\t\tconst processedItem = {};\r\n\t\tconst scheduler = this.$scheduler;\r\n\t\tconst copy = scheduler.utils.copy(item);\r\n\t\tfor (let i in copy) {\r\n\t\t\tlet prop = copy[i];\r\n\t\t\tif (i.indexOf(\"_\") === 0) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} else if (prop){\r\n\t\t\t\tif(prop.getUTCFullYear){\r\n\t\t\t\t\tprocessedItem[i] = scheduler._helpers.formatDate(prop);\r\n\t\t\t\t} else if(typeof prop == \"object\") {\r\n\t\t\t\t\tprocessedItem[i] = this._prepareItemForJson(prop);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprocessedItem[i] = prop; \r\n\t\t\t\t}\r\n\t\t\t} else if (prop !== undefined){\r\n\t\t\t\tprocessedItem[i] = prop; \r\n\t\t\t}\r\n\t\t}\r\n\t\tprocessedItem[this.action_param] = scheduler.getUserData(item.id, this.action_param);\r\n\t\treturn processedItem;\r\n\t},\r\n\t_prepareItemForForm(item){\r\n\t\tconst processedItem = {};\r\n\t\tconst scheduler = this.$scheduler;\r\n\t\tconst copy = scheduler.utils.copy(item);\r\n\t\tfor (var i in copy) {\r\n\t\t\tlet prop = copy[i];\r\n\t\t\tif (i.indexOf(\"_\") === 0) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} else if (prop) {\r\n\t\t\t\tif(prop.getUTCFullYear){\r\n\t\t\t\t\tprocessedItem[i] = scheduler._helpers.formatDate(prop);\r\n\t\t\t\t} else if(typeof prop == \"object\") {\r\n\t\t\t\t\tprocessedItem[i] = this._prepareItemForForm(prop);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprocessedItem[i] = prop;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tprocessedItem[i] = \"\"; // for all falthy values\r\n\t\t\t}\r\n\t\t}\r\n\t\tprocessedItem[this.action_param] = scheduler.getUserData(item.id, this.action_param);\r\n\t\treturn processedItem;\r\n\t},\r\n\t_prepareDataItem: function(item) {\r\n\t\tif(this._serializeAsJson){\r\n\t\t\treturn this._prepareItemForJson(item);\r\n\t\t}else {\r\n\t\t\treturn this._prepareItemForForm(item);\r\n\t\t}\r\n\t},\r\n\t_getRowData: function(id) {\r\n\t\tvar dataItem = this.$scheduler.getEvent(id);\r\n\t\tif (!dataItem) {\r\n\t\t\tdataItem = { id: id };\r\n\t\t}\r\n\t\treturn this._prepareDataItem(dataItem);\r\n\t}\r\n};\r\n\r\n\r\nexport default function extend(scheduler) {\r\n\r\nscheduler.createDataProcessor = function(config) {\r\n\tvar router;\r\n\tvar tMode;\r\n\tif (config instanceof Function) {\r\n\t\trouter = config;\r\n\t} else if (config.hasOwnProperty(\"router\")) {\r\n\t\trouter = config.router;\r\n\t} else if(config.hasOwnProperty(\"event\")){\r\n\t\trouter = config;\r\n\t}\r\n\r\n\tif (router) {\r\n\t\ttMode = \"CUSTOM\";\r\n\t} else {\r\n\t\ttMode = config.mode || \"REST-JSON\";\r\n\t}\r\n\r\n\tvar dp = new DataProcessor(config.url);\r\n\tdp.init(scheduler);\r\n\tdp.setTransactionMode({\r\n\t\tmode: tMode,\r\n\t\trouter: router\r\n\t}, config.batchUpdate); // FIXME: config.batchUpdate where it is explained?\r\n\treturn dp;\r\n};\r\n\r\nscheduler.DataProcessor = DataProcessor;\r\n\r\n}\r\n\r\n//var dataProcessor = global.dataProcessor = DataProcessor; // for old","import utils from \"./utils/utils\";\r\nimport domHelpers from \"./utils/dom_helpers\";\r\n\r\n\r\nexport default function(scheduler) {\r\n\r\n\tvar boxAttribute = \"data-dhxbox\";\r\n\r\n\tvar _dhx_msg_cfg = null;\r\n\r\n\tfunction callback(config, result) {\r\n\t\tvar usercall = config.callback;\r\n\t\tmodalBox.hide(config.box);\r\n\r\n\t\t_dhx_msg_cfg = config.box = null;\r\n\tif (usercall)\r\n\t\t\tusercall(result);\r\n\t}\r\n\r\n\tfunction modal_key(event) {\r\n\t\tif (_dhx_msg_cfg) {\r\n\r\n\t\t\tvar code = event.which || event.keyCode;\r\n\t\t\tvar preventDefault = false;\r\n\r\n\t\t\tif (messageBox.keyboard) {\r\n\t\t\t\tif (code == 13 || code == 32) {\r\n\t\t\t\t\t// default behavior is to confirm/submit popup on space/enter\r\n\t\t\t\t\t// if browser focus is set on button element - do button click instead of default behavior\r\n\t\t\t\t\tvar target = event.target || event.srcElement;\r\n\t\t\t\t\tif (domHelpers.getClassName(target).indexOf(\"scheduler_popup_button\") > -1 && target.click) {\r\n\t\t\t\t\t\ttarget.click();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcallback(_dhx_msg_cfg, true);\r\n\t\t\t\t\t\tpreventDefault = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (code == 27) {\r\n\t\t\t\t\tcallback(_dhx_msg_cfg, false);\r\n\t\t\t\t\tpreventDefault = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (preventDefault) {\r\n\t\t\t\tif (event.preventDefault){\r\n\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t}\r\n\t\t\t\treturn !(event.cancelBubble = true);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.event(document, \"keydown\", modal_key, true);\r\n\r\n\tfunction modality(mode) {\r\n\t\tif (!modality.cover) {\r\n\t\t\tmodality.cover = document.createElement(\"div\");\r\n\t\t\t//necessary for IE only\r\n\t\t\tscheduler.event(modality.cover, \"keydown\", modal_key);\r\n\t\t\tmodality.cover.className = \"dhx_modal_cover\";\r\n\t\t\tdocument.body.appendChild(modality.cover);\r\n\t\t}\r\n\r\n\t\tmodality.cover.style.display = mode ? \"inline-block\" : \"none\";\r\n\t}\r\n\r\n\tfunction button(text, classValue, result) {\r\n\t\tvar buttonAriaAttrs = scheduler._waiAria.messageButtonAttrString(text);\r\n\t\tvar name = (classValue || \"\").toLowerCase().replace(/ /g, \"_\");\r\n\t\tvar buttonCss = `scheduler_${name}_button dhtmlx_${name}_button`; \r\n\t\treturn `
${text}
`;\r\n\t}\r\n\r\n\tfunction info(text) {\r\n\t\tif (!messageBox.area) {\r\n\t\t\tmessageBox.area = document.createElement(\"div\");\r\n\t\t\tmessageBox.area.className = \"scheduler_message_area dhtmlx_message_area\";\r\n\t\t\tmessageBox.area.style[messageBox.position] = \"5px\";\r\n\t\t\tdocument.body.appendChild(messageBox.area);\r\n\t\t}\r\n\r\n\t\tmessageBox.hide(text.id);\r\n\t\tvar message = document.createElement(\"div\");\r\n\t\tmessage.innerHTML = \"
\" + text.text + \"
\";\r\n\t\tmessage.className = \"scheduler-info dhtmlx-info scheduler-\" + text.type + \" dhtmlx-\" + text.type;\r\n\t\tscheduler.event(message, \"click\",function (e) {\r\n if(text.callback) {\r\n text.callback.call(this, e);\r\n }\r\n\t\t\tmessageBox.hide(text.id);\r\n\t\t\ttext = null;\r\n\t\t});\r\n\r\n\t\tscheduler._waiAria.messageInfoAttr(message);\r\n\r\n\t\tif (messageBox.position == \"bottom\" && messageBox.area.firstChild)\r\n\t\t\tmessageBox.area.insertBefore(message, messageBox.area.firstChild);\r\n\t\telse\r\n\t\t\tmessageBox.area.appendChild(message);\r\n\r\n\t\tif (text.expire > 0)\r\n\t\t\tmessageBox.timers[text.id] = window.setTimeout(function () {\r\n\t\t\t\t// GS-1213: We need that when Scheduler is destroyed\r\n\t\t\t\tif (messageBox) messageBox.hide(text.id);\r\n\t\t\t}, text.expire);\r\n\r\n\t\tmessageBox.pull[text.id] = message;\r\n\t\tmessage = null;\r\n\r\n\t\treturn text.id;\r\n\t}\r\n\r\n\tfunction getFirstDefined() {\r\n\t\tvar values = [].slice.apply(arguments, [0]);\r\n\r\n\t\tfor (var i = 0; i < values.length; i++) {\r\n\t\t\tif (values[i]) {\r\n\t\t\t\treturn values[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tfunction _boxStructure(config, ok, cancel) {\r\n\t\tvar box = document.createElement(\"div\");\r\n\r\n\t\tvar contentId = utils.uid();\r\n\t\tscheduler._waiAria.messageModalAttr(box, contentId);\r\n\r\n\r\n\t\tbox.className = \" scheduler_modal_box dhtmlx_modal_box scheduler-\" + config.type + \" dhtmlx-\" + config.type;\r\n\t\tbox.setAttribute(boxAttribute, 1);\r\n\r\n\t\tvar inner = '';\r\n\r\n\t\tif (config.width)\r\n\t\t\tbox.style.width = config.width;\r\n\t\tif (config.height)\r\n\t\t\tbox.style.height = config.height;\r\n\t\tif (config.title)\r\n\t\t\tinner += '
' + config.title + '
';\r\n\t\tinner += '
' + (config.content ? '' : config.text) + '
';\r\n\t\tif (ok)\r\n\t\t\tinner += button(getFirstDefined(config.ok, scheduler.locale.labels.message_ok, \"OK\"), \"ok\", true);\r\n\t\tif (cancel)\r\n\t\t\tinner += button(getFirstDefined(config.cancel, scheduler.locale.labels.message_cancel, \"Cancel\"), \"cancel\", false);\r\n\r\n\t\tif (config.buttons) {\r\n\t\t\tfor (var i = 0; i < config.buttons.length; i++) {\r\n\t\t\t\tvar btn = config.buttons[i];\r\n\t\t\t\tif (typeof btn == \"object\") {\r\n\t\t\t\t\t// Support { label:\"Save\", css:\"main_button\", value:\"save\" }\r\n\t\t\t\t\tvar label = btn.label;\r\n\t\t\t\t\tvar css = btn.css || (\"scheduler_\" + btn.label.toLowerCase() + \"_button dhtmlx_\" + btn.label.toLowerCase() + \"_button\");\r\n\t\t\t\t\tvar value = btn.value || i;\r\n\t\t\t\t\tinner += button(label, css, value);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tinner += button(btn, btn, i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tinner += '
';\r\n\t\tbox.innerHTML = inner;\r\n\r\n\t\tif (config.content) {\r\n\t\t\tvar node = config.content;\r\n\t\t\tif (typeof node == \"string\")\r\n\t\t\t\tnode = document.getElementById(node);\r\n\t\t\tif (node.style.display == 'none')\r\n\t\t\t\tnode.style.display = \"\";\r\n\t\t\tbox.childNodes[config.title ? 1 : 0].appendChild(node);\r\n\t\t}\r\n\r\n\t\tscheduler.event(box, \"click\", function (event) {\r\n\t\t\tvar source = event.target || event.srcElement;\r\n\t\t\tif (!source.className) source = source.parentNode;\r\n\t\t\tif (domHelpers.closest(source, \".scheduler_popup_button\")) {\r\n\t\t\t\tvar result = source.getAttribute(\"data-result\");\r\n\t\t\t\tresult = (result == \"true\") || (result == \"false\" ? false : result);\r\n\t\t\t\tcallback(config, result);\r\n\t\t\t}\r\n\t\t});\r\n\t\tconfig.box = box;\r\n\t\tif (ok || cancel)\r\n\t\t\t_dhx_msg_cfg = config;\r\n\r\n\t\treturn box;\r\n\t}\r\n\r\n\tfunction _createBox(config, ok, cancel) {\r\n\t\tvar box = config.tagName ? config : _boxStructure(config, ok, cancel);\r\n\r\n\t\tif (!config.hidden)\r\n\t\t\tmodality(true);\r\n\t\tdocument.body.appendChild(box);\r\n\t\tvar x = Math.abs(Math.floor(((window.innerWidth || document.documentElement.offsetWidth) - box.offsetWidth) / 2));\r\n\t\tvar y = Math.abs(Math.floor(((window.innerHeight || document.documentElement.offsetHeight) - box.offsetHeight) / 2));\r\n\t\tif (config.position == \"top\")\r\n\t\t\tbox.style.top = \"-3px\";\r\n\t\telse\r\n\t\t\tbox.style.top = y + 'px';\r\n\t\tbox.style.left = x + 'px';\r\n\t\t//necessary for IE only\r\n\t\tscheduler.event(box, \"keydown\", modal_key);\r\n\r\n\t\tmodalBox.focus(box);\r\n\r\n\t\tif (config.hidden)\r\n\t\t\tmodalBox.hide(box);\r\n\r\n\t\tscheduler.callEvent(\"onMessagePopup\", [box]);\r\n\t\treturn box;\r\n\t}\r\n\r\n\tfunction alertPopup(config) {\r\n\t\treturn _createBox(config, true, false);\r\n\t}\r\n\r\n\tfunction confirmPopup(config) {\r\n\t\treturn _createBox(config, true, true);\r\n\t}\r\n\r\n\tfunction boxPopup(config) {\r\n\t\treturn _createBox(config);\r\n\t}\r\n\r\n\tfunction box_params(text, type, callback) {\r\n\t\tif (typeof text != \"object\") {\r\n\t\t\tif (typeof type == \"function\") {\r\n\t\t\t\tcallback = type;\r\n\t\t\t\ttype = \"\";\r\n\t\t\t}\r\n\t\t\ttext = {text: text, type: type, callback: callback};\r\n\t\t}\r\n\t\treturn text;\r\n\t}\r\n\r\n\tfunction params(text, type, expire, id, callback) {\r\n\t\tif (typeof text != \"object\")\r\n\t\t\ttext = {text: text, type: type, expire: expire, id: id, callback: callback};\r\n\t\ttext.id = text.id || utils.uid();\r\n\t\ttext.expire = text.expire || messageBox.expire;\r\n\t\treturn text;\r\n\t}\r\n\r\n\tvar alertBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"confirm\";\r\n\t\treturn alertPopup(text);\r\n\t};\r\n\tvar confirmBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"alert\";\r\n\t\treturn confirmPopup(text);\r\n\t};\r\n\tvar modalBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"alert\";\r\n\t\treturn boxPopup(text);\r\n\t};\r\n\tmodalBox.hide = function (node) {\r\n\t\twhile (node && node.getAttribute && !node.getAttribute(boxAttribute))\r\n\t\t\tnode = node.parentNode;\r\n\t\tif (node) {\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t\tmodality(false);\r\n\r\n\t\t\tscheduler.callEvent(\"onAfterMessagePopup\", [node]);\r\n\t\t}\r\n\t};\r\n\r\n\tmodalBox.focus = function (node) {\r\n\t\tsetTimeout(function () {\r\n\t\t\tvar focusable = domHelpers.getFocusableNodes(node);\r\n\t\t\tif (focusable.length) {\r\n\t\t\t\tif (focusable[0].focus) focusable[0].focus();\r\n\t\t\t}\r\n\t\t}, 1);\r\n\t};\r\n\r\n\tvar messageBox = function (text, type, expire, id) {\r\n\t\ttext = params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"info\";\r\n\r\n\t\tvar subtype = text.type.split(\"-\")[0];\r\n\t\tswitch (subtype) {\r\n\t\t\tcase \"alert\":\r\n\t\t\t\treturn alertPopup(text);\r\n\t\t\tcase \"confirm\":\r\n\t\t\t\treturn confirmPopup(text);\r\n\t\t\tcase \"modalbox\":\r\n\t\t\t\treturn boxPopup(text);\r\n\t\t\tdefault:\r\n\t\t\t\treturn info(text);\r\n\t\t}\r\n\t};\r\n\r\n\tmessageBox.seed = (new Date()).valueOf();\r\n\tmessageBox.uid = utils.uid;\r\n\tmessageBox.expire = 4000;\r\n\tmessageBox.keyboard = true;\r\n\tmessageBox.position = \"top\";\r\n\tmessageBox.pull = {};\r\n\tmessageBox.timers = {};\r\n\r\n\tmessageBox.hideAll = function () {\r\n\t\tfor (var key in messageBox.pull)\r\n\t\t\tmessageBox.hide(key);\r\n\t};\r\n\tmessageBox.hide = function (id) {\r\n\t\tvar obj = messageBox.pull[id];\r\n\t\tif (obj && obj.parentNode) {\r\n\t\t\twindow.setTimeout(function () {\r\n\t\t\t\tobj.parentNode.removeChild(obj);\r\n\t\t\t\tobj = null;\r\n\t\t\t}, 2000);\r\n\t\t\tobj.className += \" hidden\";\r\n\r\n\t\t\tif (messageBox.timers[id])\r\n\t\t\t\twindow.clearTimeout(messageBox.timers[id]);\r\n\t\t\tdelete messageBox.pull[id];\r\n\t\t}\r\n\t};\r\n\r\n\tvar popups = [];\r\n\tscheduler.attachEvent(\"onMessagePopup\", function(box){\r\n\t\tpopups.push(box);\r\n\t});\r\n\tscheduler.attachEvent(\"onAfterMessagePopup\", function(box){\r\n\t\tfor(var i = 0; i < popups.length; i++){\r\n\t\t\tif(popups[i] === box){\r\n\t\t\t\tpopups.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tif(modality.cover && modality.cover.parentNode){\r\n\t\t\tmodality.cover.parentNode.removeChild(modality.cover);\r\n\t\t}\r\n\r\n\t\tfor(var i = 0; i < popups.length; i++){\r\n\t\t\tif(popups[i].parentNode){\r\n\t\t\t\tpopups[i].parentNode.removeChild(popups[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tpopups = null;\r\n\r\n\t\tif(messageBox.area && messageBox.area.parentNode){\r\n\t\t\tmessageBox.area.parentNode.removeChild(messageBox.area);\r\n\t\t}\r\n\t\tmessageBox = null;\r\n\t});\r\n\r\n\treturn {\r\n\t\talert: alertBox,\r\n\t\tconfirm: confirmBox,\r\n\t\tmessage: messageBox,\r\n\t\tmodalbox: modalBox\r\n\t};\r\n}","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"كانون الثاني\", \"شباط\", \"آذار\", \"نيسان\", \"أيار\", \"حزيران\", \"تموز\", \"آب\", \"أيلول\", \"تشرين الأول\", \"تشرين الثاني\", \"كانون الأول\"],\r\n\t\tmonth_short: [\"يناير\", \"فبراير\", \"مارس\", \"أبريل\", \"مايو\", \"يونيو\", \"يوليو\", \"أغسطس\", \"سبتمبر\", \"أكتوبر\", \"نوفمبر\", \"ديسمبر\"],\r\n\t\tday_full: [\"الأحد\", \"الأثنين\", \"ألثلاثاء\", \"الأربعاء\", \"ألحميس\", \"ألجمعة\", \"السبت\"],\r\n\t\tday_short: [\"احد\", \"اثنين\", \"ثلاثاء\", \"اربعاء\", \"خميس\", \"جمعة\", \"سبت\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"اليوم\",\r\n\t\tday_tab: \"يوم\",\r\n\t\tweek_tab: \"أسبوع\",\r\n\t\tmonth_tab: \"شهر\",\r\n\t\tnew_event: \"حدث جديد\",\r\n\t\ticon_save: \"اخزن\",\r\n\t\ticon_cancel: \"الغاء\",\r\n\t\ticon_details: \"تفاصيل\",\r\n\t\ticon_edit: \"تحرير\",\r\n\t\ticon_delete: \"حذف\",\r\n\t\tconfirm_closing: \"التغييرات سوف تضيع, هل انت متأكد؟\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"الحدث سيتم حذفها نهائيا ، هل أنت متأكد؟\",\r\n\t\tsection_description: \"الوصف\",\r\n\t\tsection_time: \"الفترة الزمنية\",\r\n\t\tfull_day: \"طوال اليوم\",\r\n\r\n\t\tconfirm_recurring: \"هل تريد تحرير مجموعة كاملة من الأحداث المتكررة؟\",\r\n\t\tsection_recurring: \"تكرار الحدث\",\r\n\t\tbutton_recurring: \"تعطيل\",\r\n\t\tbutton_recurring_open: \"تمكين\",\r\n\t\tbutton_edit_series: \"تحرير سلسلة\",\r\n\t\tbutton_edit_occurrence: \"تعديل نسخة\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"جدول\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create: \"Drag to create\",\r\n\t\tdrag_to_move: \"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour: \"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"يومي\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"أسبوعي\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"شهري\",\r\n\t\trepeat_radio_year: \"سنوي\",\r\n\t\trepeat_radio_day_type: \"كل\",\r\n\t\trepeat_text_day_count: \"يوم\",\r\n\t\trepeat_radio_day_type2: \"كل يوم عمل\",\r\n\t\trepeat_week: \" تكرار كل\",\r\n\t\trepeat_text_week_count: \"أسبوع في الأيام التالية:\",\r\n\t\trepeat_radio_month_type: \"تكرار\",\r\n\t\trepeat_radio_month_start: \"في\",\r\n\t\trepeat_text_month_day: \"يوم كل\",\r\n\t\trepeat_text_month_count: \"شهر\",\r\n\t\trepeat_text_month_count2_before: \"كل\",\r\n\t\trepeat_text_month_count2_after: \"شهر\",\r\n\t\trepeat_year_label: \"في\",\r\n\t\tselect_year_day2: \"من\",\r\n\t\trepeat_text_year_day: \"يوم\",\r\n\t\tselect_year_month: \"شهر\",\r\n\t\trepeat_radio_end: \"بدون تاريخ انتهاء\",\r\n\t\trepeat_text_occurences_count: \"تكرارات\",\r\n\t\trepeat_radio_end2: \"بعد\",\r\n\t\trepeat_radio_end3: \"ينتهي في\",\r\n\r\n\t\trepeat_never: \"أبداً\",\r\n\t\trepeat_daily: \"كل يوم\",\r\n\t\trepeat_workdays: \"كل يوم عمل\",\r\n\t\trepeat_weekly: \"كل أسبوع\",\r\n\t\trepeat_monthly: \"كل شهر\",\r\n\t\trepeat_yearly: \"كل سنة\",\r\n\t\trepeat_custom: \"تخصيص\",\r\n\t\trepeat_freq_day: \"يوم\",\r\n\t\trepeat_freq_week: \"أسبوع\",\r\n\t\trepeat_freq_month: \"شهر\",\r\n\t\trepeat_freq_year: \"سنة\",\r\n\t\trepeat_on_date: \"في التاريخ\",\r\n\t\trepeat_ends: \"ينتهي\",\r\n\r\n\t\tmonth_for_recurring: [\"يناير\", \"فبراير\", \"مارس\", \"أبريل\", \"مايو\", \"يونيو\", \"يوليو\", \"أغسطس\", \"سبتمبر\", \"أكتوبر\", \"نوفمبر\", \"ديسمبر\"],\r\n\t\tday_for_recurring: [\"الأحد\", \"الإثنين\", \"الثلاثاء\", \"الأربعاء\", \"الخميس\", \"الجمعة\", \"السبت\"]\r\n\t}\r\n};\r\n\r\n\r\n","/*\r\n Translation by Sofya Morozova\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Студзень\", \"Люты\", \"Сакавік\", \"Красавік\", \"Maй\", \"Чэрвень\", \"Ліпень\", \"Жнівень\", \"Верасень\", \"Кастрычнік\", \"Лістапад\", \"Снежань\"],\r\n\t\tmonth_short: [\"Студз\", \"Лют\", \"Сак\", \"Крас\", \"Maй\", \"Чэр\", \"Ліп\", \"Жнів\", \"Вер\", \"Каст\", \"Ліст\", \"Снеж\"],\r\n\t\tday_full: [ \"Нядзеля\", \"Панядзелак\", \"Аўторак\", \"Серада\", \"Чацвер\", \"Пятніца\", \"Субота\"],\r\n\t\tday_short: [\"Нд\", \"Пн\", \"Аўт\", \"Ср\", \"Чцв\", \"Пт\", \"Сб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сёння\",\r\n\t\tday_tab: \"Дзень\",\r\n\t\tweek_tab: \"Тыдзень\",\r\n\t\tmonth_tab: \"Месяц\",\r\n\t\tnew_event: \"Новая падзея\",\r\n\t\ticon_save: \"Захаваць\",\r\n\t\ticon_cancel: \"Адмяніць\",\r\n\t\ticon_details: \"Дэталі\",\r\n\t\ticon_edit: \"Змяніць\",\r\n\t\ticon_delete: \"Выдаліць\",\r\n\t\tconfirm_closing: \"\", //Унесеныя змены будуць страчаны, працягнуць?\r\n\t\tconfirm_deleting: \"Падзея будзе выдалена незваротна, працягнуць?\",\r\n\t\tsection_description: \"Апісанне\",\r\n\t\tsection_time: \"Перыяд часу\",\r\n\t\tfull_day: \"Увесь дзень\",\r\n\r\n\t\tconfirm_recurring: \"Вы хочаце змяніць усю серыю паўтаральных падзей?\",\r\n\t\tsection_recurring: \"Паўтарэнне\",\r\n\t\tbutton_recurring: \"Адключана\",\r\n\t\tbutton_recurring_open: \"Уключана\",\r\n\t\tbutton_edit_series: \"Рэдагаваць серыю\",\r\n\t\tbutton_edit_occurrence: \"Рэдагаваць асобнік\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Спіс\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Апісанне\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Год\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Спіс\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Спic\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Дзень\",\r\n\t\trepeat_radio_week: \"Тыдзень\",\r\n\t\trepeat_radio_month: \"Месяц\",\r\n\t\trepeat_radio_year: \"Год\",\r\n\t\trepeat_radio_day_type: \"Кожны\",\r\n\t\trepeat_text_day_count: \"дзень\",\r\n\t\trepeat_radio_day_type2: \"Кожны працоўны дзень\",\r\n\t\trepeat_week: \" Паўтараць кожны\",\r\n\t\trepeat_text_week_count: \"тыдзень\",\r\n\t\trepeat_radio_month_type: \"Паўтараць\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" чысла кожнага\",\r\n\t\trepeat_text_month_count: \"месяцу\",\r\n\t\trepeat_text_month_count2_before: \"кожны \",\r\n\t\trepeat_text_month_count2_after: \"месяц\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"дзень\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без даты заканчэння\",\r\n\t\trepeat_text_occurences_count: \"паўтораў\",\r\n\t\trepeat_radio_end2: \"\",\r\n\t\trepeat_radio_end3: \"Да \",\r\n\r\n\t\trepeat_never: \"Ніколі\",\r\n\t\trepeat_daily: \"Кожны дзень\",\r\n\t\trepeat_workdays: \"Кожны працоўны дзень\",\r\n\t\trepeat_weekly: \"Кожны тыдзень\",\r\n\t\trepeat_monthly: \"Кожны месяц\",\r\n\t\trepeat_yearly: \"Кожны год\",\r\n\t\trepeat_custom: \"Наладжвальны\",\r\n\t\trepeat_freq_day: \"Дзень\",\r\n\t\trepeat_freq_week: \"Тыдзень\",\r\n\t\trepeat_freq_month: \"Месяц\",\r\n\t\trepeat_freq_year: \"Год\",\r\n\t\trepeat_on_date: \"На дату\",\r\n\t\trepeat_ends: \"Заканчваецца\",\r\n\r\n\t\tmonth_for_recurring: [\"Студзеня\", \"Лютага\", \"Сакавіка\", \"Красавіка\", \"Мая\", \"Чэрвеня\", \"Ліпeня\", \"Жніўня\", \"Верасня\", \"Кастрычніка\", \"Лістапада\", \"Снежня\"],\r\n\t\tday_for_recurring: [\"Нядзелю\", \"Панядзелак\", \"Аўторак\", \"Сераду\", \"Чацвер\", \"Пятніцу\", \"Суботу\"]\r\n\t}\r\n};\r\n","/*\r\n @Traducido por Vicente Adria Bohigues - vicenteadria@hotmail.com\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Gener\", \"Febrer\", \"Març\", \"Abril\", \"Maig\", \"Juny\", \"Juliol\", \"Agost\", \"Setembre\", \"Octubre\", \"Novembre\", \"Desembre\"],\r\n\t\tmonth_short: [\"Gen\", \"Feb\", \"Mar\", \"Abr\", \"Mai\", \"Jun\", \"Jul\", \"Ago\", \"Set\", \"Oct\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Diumenge\", \"Dilluns\", \"Dimarts\", \"Dimecres\", \"Dijous\", \"Divendres\", \"Dissabte\"],\r\n\t\tday_short: [\"Dg\", \"Dl\", \"Dm\", \"Dc\", \"Dj\", \"Dv\", \"Ds\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hui\",\r\n\t\tday_tab: \"Dia\",\r\n\t\tweek_tab: \"Setmana\",\r\n\t\tmonth_tab: \"Mes\",\r\n\t\tnew_event: \"Nou esdeveniment\",\r\n\t\ticon_save: \"Guardar\",\r\n\t\ticon_cancel: \"Cancel·lar\",\r\n\t\ticon_details: \"Detalls\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Esborrar\",\r\n\t\tconfirm_closing: \"\", //\"Els seus canvis es perdràn, continuar ?\"\r\n\t\tconfirm_deleting: \"L'esdeveniment s'esborrarà definitivament, continuar ?\",\r\n\t\tsection_description: \"Descripció\",\r\n\t\tsection_time: \"Periode de temps\",\r\n\t\tfull_day: \"Tot el dia\",\r\n\r\n\t\tconfirm_recurring: \"¿Desitja modificar el conjunt d'esdeveniments repetits?\",\r\n\t\tsection_recurring: \"Repeteixca l'esdeveniment\",\r\n\t\tbutton_recurring: \"Impedit\",\r\n\t\tbutton_recurring_open: \"Permés\",\r\n\t\tbutton_edit_series: \"Edit sèrie\",\r\n\t\tbutton_edit_occurrence: \"Edita Instància\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descripció\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Any\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Taula\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create: \"Drag to create\",\r\n\t\tdrag_to_move: \"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour: \"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diari\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Setmanal\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Mensual\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia\",\r\n\t\trepeat_radio_day_type2: \"Cada dia laborable\",\r\n\t\trepeat_week: \" Repetir cada\",\r\n\t\trepeat_text_week_count: \"setmana els dies següents:\",\r\n\t\trepeat_radio_month_type: \"Repetir\",\r\n\t\trepeat_radio_month_start: \"El\",\r\n\t\trepeat_text_month_day: \"dia cada\",\r\n\t\trepeat_text_month_count: \"mes\",\r\n\t\trepeat_text_month_count2_before: \"cada\",\r\n\t\trepeat_text_month_count2_after: \"mes\",\r\n\t\trepeat_year_label: \"El\",\r\n\t\tselect_year_day2: \"de\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mes\",\r\n\t\trepeat_radio_end: \"Sense data de finalització\",\r\n\t\trepeat_text_occurences_count: \"ocurrències\",\r\n\t\trepeat_radio_end2: \"Després\",\r\n\t\trepeat_radio_end3: \"Finalitzar el\",\r\n\r\n\t\trepeat_never: \"Mai\",\r\n\t\trepeat_daily: \"Cada dia\",\r\n\t\trepeat_workdays: \"Cada dia laborable\",\r\n\t\trepeat_weekly: \"Cada setmana\",\r\n\t\trepeat_monthly: \"Cada mes\",\r\n\t\trepeat_yearly: \"Cada any\",\r\n\t\trepeat_custom: \"Personalitzat\",\r\n\t\trepeat_freq_day: \"Dia\",\r\n\t\trepeat_freq_week: \"Setmana\",\r\n\t\trepeat_freq_month: \"Mes\",\r\n\t\trepeat_freq_year: \"Any\",\r\n\t\trepeat_on_date: \"En la data\",\r\n\t\trepeat_ends: \"Finalitza\",\r\n\r\n\t\tmonth_for_recurring: [\"Gener\", \"Febrer\", \"Març\", \"Abril\", \"Maig\", \"Juny\", \"Juliol\", \"Agost\", \"Setembre\", \"Octubre\", \"Novembre\", \"Desembre\"],\r\n\t\tday_for_recurring: [\"Diumenge\", \"Dilluns\", \"Dimarts\", \"Dimecres\", \"Dijous\", \"Divendres\", \"Dissabte\"]\r\n\t}\r\n};","/*\r\nTranslation by FreezeSoul\r\n*/\r\n//scheduler.config.day_date=\"%M %d日 %D\";\r\n//scheduler.config.default_date=\"%Y年 %M %d日\";\r\n//scheduler.config.month_date=\"%Y年 %M\";\r\n\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"一月\", \"二月\", \"三月\", \"四月\", \"五月\", \"六月\", \"七月\", \"八月\", \"九月\", \"十月\", \"十一月\", \"十二月\"],\r\n\t\tmonth_short: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_full: [\"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\"],\r\n\t\tday_short: [\"日\", \"一\", \"二\", \"三\", \"四\", \"五\", \"六\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"今天\",\r\n\t\tday_tab: \"日\",\r\n\t\tweek_tab: \"周\",\r\n\t\tmonth_tab: \"月\",\r\n\t\tnew_event: \"新建日程\",\r\n\t\ticon_save: \"保存\",\r\n\t\ticon_cancel: \"关闭\",\r\n\t\ticon_details: \"详细\",\r\n\t\ticon_edit: \"编辑\",\r\n\t\ticon_delete: \"删除\",\r\n\t\tconfirm_closing: \"请确认是否撤销修改!\", //Your changes will be lost, are your sure?\r\n\t\tconfirm_deleting: \"是否删除日程?\",\r\n\t\tsection_description: \"描述\",\r\n\t\tsection_time: \"时间范围\",\r\n\t\tfull_day: \"整天\",\r\n\r\n\t\tconfirm_recurring:\"请确认是否将日程设为重复模式?\",\r\n\t\tsection_recurring:\"重复周期\",\r\n\t\tbutton_recurring:\"禁用\",\r\n\t\tbutton_recurring_open:\"启用\",\r\n\t\tbutton_edit_series: \"编辑系列\",\r\n\t\tbutton_edit_occurrence: \"编辑实例\",\r\n\t\t\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"议程\",\r\n\t\tdate:\"日期\",\r\n\t\tdescription:\"说明\",\r\n\t\t\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"今年\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"议程\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab:\"电网\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"按天\",\r\n\t\trepeat_radio_week: \"按周\",\r\n\t\trepeat_radio_month: \"按月\",\r\n\t\trepeat_radio_year: \"按年\",\r\n\t\trepeat_radio_day_type: \"每\",\r\n\t\trepeat_text_day_count: \"天\",\r\n\t\trepeat_radio_day_type2: \"每个工作日\",\r\n\t\trepeat_week: \" 重复 每\",\r\n\t\trepeat_text_week_count: \"星期的:\",\r\n\t\trepeat_radio_month_type: \"重复\",\r\n\t\trepeat_radio_month_start: \"在\",\r\n\t\trepeat_text_month_day: \"日 每\",\r\n\t\trepeat_text_month_count: \"月\",\r\n\t\trepeat_text_month_count2_before: \"每\",\r\n\t\trepeat_text_month_count2_after: \"月\",\r\n\t\trepeat_year_label: \"在\",\r\n\t\tselect_year_day2: \"的\",\r\n\t\trepeat_text_year_day: \"日\",\r\n\t\tselect_year_month: \"月\",\r\n\t\trepeat_radio_end: \"无结束日期\",\r\n\t\trepeat_text_occurences_count: \"次结束\",\r\n\t\trepeat_radio_end2: \"重复\",\r\n\t\trepeat_radio_end3: \"结束于\",\r\n\t\t\r\n\t\trepeat_never: \"从不\",\r\n\t\trepeat_daily: \"每天\",\r\n\t\trepeat_workdays: \"每个工作日\",\r\n\t\trepeat_weekly: \"每周\",\r\n\t\trepeat_monthly: \"每月\",\r\n\t\trepeat_yearly: \"每年\",\r\n\t\trepeat_custom: \"自定义\",\r\n\t\trepeat_freq_day: \"天\",\r\n\t\trepeat_freq_week: \"周\",\r\n\t\trepeat_freq_month: \"月\",\r\n\t\trepeat_freq_year: \"年\",\r\n\t\trepeat_on_date: \"在日期\",\r\n\t\trepeat_ends: \"结束\",\r\n\r\n\t\tmonth_for_recurring: [\"一月\", \"二月\", \"三月\", \"四月\", \"五月\", \"六月\", \"七月\", \"八月\", \"九月\", \"十月\", \"十一月\", \"十二月\"],\r\n\t\tday_for_recurring: [\"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Leden\", \"Únor\", \"Březen\", \"Duben\", \"Květen\", \"Červen\", \"Červenec\", \"Srpen\", \"Září\", \"Říjen\", \"Listopad\", \"Prosinec\"],\r\n\t\tmonth_short: [\"Led\", \"Ún\", \"Bře\", \"Dub\", \"Kvě\", \"Čer\", \"Čec\", \"Srp\", \"Září\", \"Říj\", \"List\", \"Pro\"],\r\n\t\tday_full: [\"Neděle\", \"Pondělí\", \"Úterý\", \"Středa\", \"Čtvrtek\", \"Pátek\", \"Sobota\"],\r\n\t\tday_short: [\"Ne\", \"Po\", \"Út\", \"St\", \"Čt\", \"Pá\", \"So\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dnes\",\r\n\t\tday_tab: \"Den\",\r\n\t\tweek_tab: \"Týden\",\r\n\t\tmonth_tab: \"Měsíc\",\r\n\t\tnew_event: \"Nová událost\",\r\n\t\ticon_save: \"Uložit\",\r\n\t\ticon_cancel: \"Zpět\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edituj\",\r\n\t\ticon_delete: \"Smazat\",\r\n\t\tconfirm_closing: \"\", //Vaše změny budou ztraceny, opravdu ?\r\n\t\tconfirm_deleting: \"Událost bude trvale smazána, opravdu?\",\r\n\t\tsection_description: \"Poznámky\",\r\n\t\tsection_time: \"Doba platnosti\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Přejete si upravit celou řadu opakovaných událostí?\",\r\n\t\tsection_recurring: \"Opakování události\",\r\n\t\tbutton_recurring: \"Vypnuto\",\r\n\t\tbutton_recurring_open: \"Zapnuto\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Upravit instance\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Program\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Poznámka\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\t\tfull_day: \"Full day\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Program\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Mřížka\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Denně\",\r\n\t\trepeat_radio_week: \"Týdně\",\r\n\t\trepeat_radio_month: \"Měsíčně\",\r\n\t\trepeat_radio_year: \"Ročně\",\r\n\t\trepeat_radio_day_type: \"každý\",\r\n\t\trepeat_text_day_count: \"Den\",\r\n\t\trepeat_radio_day_type2: \"pracovní dny\",\r\n\t\trepeat_week: \"Opakuje každých\",\r\n\t\trepeat_text_week_count: \"Týdnů na:\",\r\n\t\trepeat_radio_month_type: \"u každého\",\r\n\t\trepeat_radio_month_start: \"na\",\r\n\t\trepeat_text_month_day: \"Den každého\",\r\n\t\trepeat_text_month_count: \"Měsíc\",\r\n\t\trepeat_text_month_count2_before: \"každý\",\r\n\t\trepeat_text_month_count2_after: \"Měsíc\",\r\n\t\trepeat_year_label: \"na\",\r\n\t\tselect_year_day2: \"v\",\r\n\t\trepeat_text_year_day: \"Den v\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"bez data ukončení\",\r\n\t\trepeat_text_occurences_count: \"Události\",\r\n\t\trepeat_radio_end2: \"po\",\r\n\t\trepeat_radio_end3: \"Konec\",\r\n\r\n\t\trepeat_never: \"Nikdy\",\r\n\t\trepeat_daily: \"Každý den\",\r\n\t\trepeat_workdays: \"Každý pracovní den\",\r\n\t\trepeat_weekly: \"Každý týden\",\r\n\t\trepeat_monthly: \"Každý měsíc\",\r\n\t\trepeat_yearly: \"Každý rok\",\r\n\t\trepeat_custom: \"Vlastní\",\r\n\t\trepeat_freq_day: \"Den\",\r\n\t\trepeat_freq_week: \"Týden\",\r\n\t\trepeat_freq_month: \"Měsíc\",\r\n\t\trepeat_freq_year: \"Rok\",\r\n\t\trepeat_on_date: \"Na datum\",\r\n\t\trepeat_ends: \"Končí\",\r\n\r\n\t\tmonth_for_recurring: [\"Leden\", \"Únor\", \"Březen\", \"Duben\", \"Květen\", \"Červen\", \"Červenec\", \"Srpen\", \"Září\", \"Říjen\", \"Listopad\", \"Prosinec\"],\r\n\t\tday_for_recurring: [\"Neděle \", \"Pondělí\", \"Úterý\", \"Středa\", \"Čtvrtek\", \"Pátek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Marts\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Man\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uge\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny begivenhed\",\r\n\t\ticon_save: \"Gem\",\r\n\t\ticon_cancel: \"Fortryd\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Tilret\",\r\n\t\ticon_delete: \"Slet\",\r\n\t\tconfirm_closing: \"Dine rettelser vil gå tabt.. Er dy sikker?\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Bigivenheden vil blive slettet permanent. Er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du tilrette hele serien af gentagne begivenheder?\",\r\n\t\tsection_recurring: \"Gentag begivenhed\",\r\n\t\tbutton_recurring: \"Frakoblet\",\r\n\t\tbutton_recurring_open: \"Tilkoblet\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Rediger en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dagsorden\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dagsorden\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\",\r\n\t\trepeat_radio_week: \"Ugenlig\",\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"På hver arbejdsdag\",\r\n\t\trepeat_week: \" Gentager sig hver\",\r\n\t\trepeat_text_week_count: \"uge på følgende dage:\",\r\n\t\trepeat_radio_month_type: \"Hver den\",\r\n\t\trepeat_radio_month_start: \"Den\",\r\n\t\trepeat_text_month_day: \" i hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"Den\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Ingen slutdato\",\r\n\t\trepeat_text_occurences_count: \"gentagelse\",\r\n\t\trepeat_radio_end2: \"Efter\",\r\n\t\trepeat_radio_end3: \"Slut\",\r\n\r\n\t\trepeat_never: \"Aldrig\",\r\n\t\trepeat_daily: \"Hver dag\",\r\n\t\trepeat_workdays: \"Hver hverdag\",\r\n\t\trepeat_weekly: \"Hver uge\",\r\n\t\trepeat_monthly: \"Hver måned\",\r\n\t\trepeat_yearly: \"Hvert år\",\r\n\t\trepeat_custom: \"Brugerdefineret\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Uge\",\r\n\t\trepeat_freq_month: \"Måned\",\r\n\t\trepeat_freq_year: \"År\",\r\n\t\trepeat_on_date: \"På dato\",\r\n\t\trepeat_ends: \"Slutter\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"März\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Dezember\"],\r\n\t\tday_for_recurring: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\" Januar\", \" Februar\", \" März \", \" April\", \" Mai\", \" Juni\", \" Juli\", \" August\", \" September \", \" Oktober\", \" November \", \" Dezember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mär\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dez\"],\r\n\t\tday_full: [ \"Sonntag\", \"Montag\", \"Dienstag\", \" Mittwoch\", \" Donnerstag\", \"Freitag\", \"Samstag\"],\r\n\t\tday_short: [\"So\", \"Mo\", \"Di\", \"Mi\", \"Do\", \"Fr\", \"Sa\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Heute\",\r\n\t\tday_tab: \"Tag\",\r\n\t\tweek_tab: \"Woche\",\r\n\t\tmonth_tab: \"Monat\",\r\n\t\tnew_event: \"neuer Eintrag\",\r\n\t\ticon_save: \"Speichern\",\r\n\t\ticon_cancel: \"Abbrechen\",\r\n\t\ticon_details: \"Details\",\r\n\t\ticon_edit: \"Ändern\",\r\n\t\ticon_delete: \"Löschen\",\r\n\t\tconfirm_closing: \"\", //\"Ihre Veränderungen werden verloren sein, wollen Sie ergänzen? \"\r\n\t\tconfirm_deleting: \"Der Eintrag wird gelöscht\",\r\n\t\tsection_description: \"Beschreibung\",\r\n\t\tsection_time: \"Zeitspanne\",\r\n\t\tfull_day: \"Ganzer Tag\",\r\n\r\n\t\tconfirm_recurring: \"Wollen Sie alle Einträge bearbeiten oder nur diesen einzelnen Eintrag?\",\r\n\t\tsection_recurring: \"Wiederholung\",\r\n\t\tbutton_recurring: \"Aus\",\r\n\t\tbutton_recurring_open: \"An\",\r\n\t\tbutton_edit_series: \"Bearbeiten Sie die Serie\",\r\n\t\tbutton_edit_occurrence: \"Bearbeiten Sie eine Kopie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Beschreibung\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Jahre\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Täglich\",\r\n\t\trepeat_radio_week: \"Wöchentlich\",\r\n\t\trepeat_radio_month: \"Monatlich\",\r\n\t\trepeat_radio_year: \"Jährlich\",\r\n\t\trepeat_radio_day_type: \"jeden\",\r\n\t\trepeat_text_day_count: \"Tag\",\r\n\t\trepeat_radio_day_type2: \"an jedem Arbeitstag\",\r\n\t\trepeat_week: \" Wiederholt sich jede\",\r\n\t\trepeat_text_week_count: \"Woche am:\",\r\n\t\trepeat_radio_month_type: \"an jedem\",\r\n\t\trepeat_radio_month_start: \"am\",\r\n\t\trepeat_text_month_day: \"Tag eines jeden\",\r\n\t\trepeat_text_month_count: \"Monats\",\r\n\t\trepeat_text_month_count2_before: \"jeden\",\r\n\t\trepeat_text_month_count2_after: \"Monats\",\r\n\t\trepeat_year_label: \"am\",\r\n\t\tselect_year_day2: \"im\",\r\n\t\trepeat_text_year_day: \"Tag im\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"kein Enddatum\",\r\n\t\trepeat_text_occurences_count: \"Ereignissen\",\r\n\t\trepeat_radio_end3: \"Schluß\",\r\n\t\trepeat_radio_end2: \"nach\",\r\n\r\n\t\trepeat_never: \"Nie\",\r\n\t\trepeat_daily: \"Jeden Tag\",\r\n\t\trepeat_workdays: \"Jeden Werktag\",\r\n\t\trepeat_weekly: \"Jede Woche\",\r\n\t\trepeat_monthly: \"Jeden Monat\",\r\n\t\trepeat_yearly: \"Jedes Jahr\",\r\n\t\trepeat_custom: \"Benutzerdefiniert\",\r\n\t\trepeat_freq_day: \"Tag\",\r\n\t\trepeat_freq_week: \"Woche\",\r\n\t\trepeat_freq_month: \"Monat\",\r\n\t\trepeat_freq_year: \"Jahr\",\r\n\t\trepeat_on_date: \"Am Datum\",\r\n\t\trepeat_ends: \"Endet\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"März\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Dezember\"],\r\n\t\tday_for_recurring: [\"Sonntag\", \"Montag\", \"Dienstag\", \"Mittwoch\", \"Donnerstag\", \"Freitag\", \"Samstag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Ιανουάριος\", \"Φεβρουάριος\", \"Μάρτιος\", \"Απρίλιος\", \"Μάϊος\", \"Ιούνιος\", \"Ιούλιος\", \"Αύγουστος\", \"Σεπτέμβριος\", \"Οκτώβριος\", \"Νοέμβριος\", \"Δεκέμβριος\"],\r\n\t\tmonth_short: [\"ΙΑΝ\", \"ΦΕΒ\", \"ΜΑΡ\", \"ΑΠΡ\", \"ΜΑΙ\", \"ΙΟΥΝ\", \"ΙΟΥΛ\", \"ΑΥΓ\", \"ΣΕΠ\", \"ΟΚΤ\", \"ΝΟΕ\", \"ΔΕΚ\"],\r\n\t\tday_full: [\"Κυριακή\", \"Δευτέρα\", \"Τρίτη\", \"Τετάρτη\", \"Πέμπτη\", \"Παρασκευή\", \"Σάββατο\"],\r\n\t\tday_short: [\"ΚΥ\", \"ΔΕ\", \"ΤΡ\", \"ΤΕ\", \"ΠΕ\", \"ΠΑ\", \"ΣΑ\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Σήμερα\",\r\n\t\tday_tab: \"Ημέρα\",\r\n\t\tweek_tab: \"Εβδομάδα\",\r\n\t\tmonth_tab: \"Μήνας\",\r\n\t\tnew_event: \"Νέο έργο\",\r\n\t\ticon_save: \"Αποθήκευση\",\r\n\t\ticon_cancel: \"Άκυρο\",\r\n\t\ticon_details: \"Λεπτομέρειες\",\r\n\t\ticon_edit: \"Επεξεργασία\",\r\n\t\ticon_delete: \"Διαγραφή\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Το έργο θα διαγραφεί οριστικά. Θέλετε να συνεχίσετε;\",\r\n\t\tsection_description: \"Περιγραφή\",\r\n\t\tsection_time: \"Χρονική περίοδος\",\r\n\t\tfull_day: \"Πλήρης Ημέρα\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Θέλετε να επεξεργασθείτε ολόκληρη την ομάδα των επαναλαμβανόμενων έργων;\",\r\n\t\tsection_recurring: \"Επαναλαμβανόμενο έργο\",\r\n\t\tbutton_recurring: \"Ανενεργό\",\r\n\t\tbutton_recurring_open: \"Ενεργό\",\r\n\t\tbutton_edit_series: \"Επεξεργαστείτε τη σειρά\",\r\n\t\tbutton_edit_occurrence: \"Επεξεργασία ένα αντίγραφο\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Ημερήσια Διάταξη\",\r\n\t\tdate: \"Ημερομηνία\",\r\n\t\tdescription: \"Περιγραφή\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Έτος\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Ημερήσια Διάταξη\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Πλέγμα\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Ημερησίως\",\r\n\t\trepeat_radio_week: \"Εβδομαδιαίως\",\r\n\t\trepeat_radio_month: \"Μηνιαίως\",\r\n\t\trepeat_radio_year: \"Ετησίως\",\r\n\t\trepeat_radio_day_type: \"Κάθε\",\r\n\t\trepeat_text_day_count: \"ημέρα\",\r\n\t\trepeat_radio_day_type2: \"Κάθε εργάσιμη\",\r\n\t\trepeat_week: \" Επανάληψη κάθε\",\r\n\t\trepeat_text_week_count: \"εβδομάδα τις επόμενες ημέρες:\",\r\n\t\trepeat_radio_month_type: \"Επανάληψη\",\r\n\t\trepeat_radio_month_start: \"Την\",\r\n\t\trepeat_text_month_day: \"ημέρα κάθε\",\r\n\t\trepeat_text_month_count: \"μήνα\",\r\n\t\trepeat_text_month_count2_before: \"κάθε\",\r\n\t\trepeat_text_month_count2_after: \"μήνα\",\r\n\t\trepeat_year_label: \"Την\",\r\n\t\tselect_year_day2: \"του\",\r\n\t\trepeat_text_year_day: \"ημέρα\",\r\n\t\tselect_year_month: \"μήνα\",\r\n\t\trepeat_radio_end: \"Χωρίς ημερομηνία λήξεως\",\r\n\t\trepeat_text_occurences_count: \"επαναλήψεις\",\r\n\t\trepeat_radio_end3: \"Λήγει την\",\r\n\t\trepeat_radio_end2: \"Μετά από\",\r\n\r\n\t\trepeat_never: \"Ποτέ\",\r\n\t\trepeat_daily: \"Κάθε μέρα\",\r\n\t\trepeat_workdays: \"Κάθε εργάσιμη μέρα\",\r\n\t\trepeat_weekly: \"Κάθε εβδομάδα\",\r\n\t\trepeat_monthly: \"Κάθε μήνα\",\r\n\t\trepeat_yearly: \"Κάθε χρόνο\",\r\n\t\trepeat_custom: \"Προσαρμοσμένο\",\r\n\t\trepeat_freq_day: \"Ημέρα\",\r\n\t\trepeat_freq_week: \"Εβδομάδα\",\r\n\t\trepeat_freq_month: \"Μήνας\",\r\n\t\trepeat_freq_year: \"Χρόνος\",\r\n\t\trepeat_on_date: \"Σε ημερομηνία\",\r\n\t\trepeat_ends: \"Λήγει\",\r\n\r\n\t\tmonth_for_recurring: [\"Ιανουάριος\", \"Φεβρουάριος\", \"Μάρτιος\", \"Απρίλιος\", \"Μάϊος\", \"Ιούνιος\", \"Ιούλιος\", \"Αύγουστος\", \"Σεπτέμβριος\", \"Οκτώβριος\", \"Νοέμβριος\", \"Δεκέμβριος\"],\r\n\t\tday_for_recurring: [\"Κυριακή\", \"Δευτέρα\", \"Τρίτη\", \"Τετάρτη\", \"Πέμπτη\", \"Παρασκευή\", \"Σάββατο\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate:{\r\n\t\tmonth_full:[\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\r\n\t\tmonth_short:[\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n\t\tday_full:[\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\r\n\t\tday_short:[\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"]\r\n\t},\r\n\tlabels:{\r\n\t\tdhx_cal_today_button:\"Today\",\r\n\t\tday_tab:\"Day\",\r\n\t\tweek_tab:\"Week\",\r\n\t\tmonth_tab:\"Month\",\r\n\t\tnew_event:\"New event\",\r\n\t\ticon_save:\"Save\",\r\n\t\ticon_cancel:\"Cancel\",\r\n\t\ticon_details:\"Details\",\r\n\t\ticon_edit:\"Edit\",\r\n\t\ticon_delete:\"Delete\",\r\n\t\tconfirm_closing:\"\",//Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting:\"Event will be deleted permanently, are you sure?\",\r\n\t\tsection_description:\"Description\",\r\n\t\tsection_time:\"Time period\",\r\n\t\tfull_day:\"Full day\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring:\"Do you want to edit the whole set of repeated events?\",\r\n\t\tsection_recurring:\"Repeat event\",\r\n\t\tbutton_recurring:\"Disabled\",\r\n\t\tbutton_recurring_open:\"Enabled\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Edit occurrence\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"Agenda\",\r\n\t\tdate:\"Date\",\r\n\t\tdescription:\"Description\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"Year\",\r\n\r\n\t\t/* week agenda extension */\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daily\",//name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Weekly\",//name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Monthly\",\r\n\t\trepeat_radio_year: \"Yearly\",\r\n\t\trepeat_radio_day_type: \"Every\",\r\n\t\trepeat_text_day_count: \"day\",\r\n\t\trepeat_radio_day_type2: \"Every workday\",\r\n\t\trepeat_week: \" Repeat every\",\r\n\t\trepeat_text_week_count: \"week next days:\",\r\n\t\trepeat_radio_month_type: \"Repeat\",\r\n\t\trepeat_radio_month_start: \"On\",\r\n\t\trepeat_text_month_day: \"day every\",\r\n\t\trepeat_text_month_count: \"month\",\r\n\t\trepeat_text_month_count2_before: \"every\",\r\n\t\trepeat_text_month_count2_after: \"month\",\r\n\t\trepeat_year_label: \"On\",\r\n\t\tselect_year_day2: \"of\",\r\n\t\trepeat_text_year_day: \"day\",\r\n\t\tselect_year_month: \"month\",\r\n\t\trepeat_radio_end: \"No end date\",\r\n\t\trepeat_text_occurences_count: \"occurrences\",\r\n\t\trepeat_radio_end2: \"After\",\r\n\t\trepeat_radio_end3: \"End by\",\r\n\r\n\t\trepeat_never: \"Never\",\r\n\t\trepeat_daily: \"Every day\",\r\n\t\trepeat_workdays: \"Every weekday\",\r\n\t\trepeat_weekly: \"Every week\",\r\n\t\trepeat_monthly: \"Every month\",\r\n\t\trepeat_yearly: \"Every year\",\r\n\t\trepeat_custom: \"Custom\",\r\n\t\trepeat_freq_day: \"Day\",\r\n\t\trepeat_freq_week: \"Week\",\r\n\t\trepeat_freq_month: \"Month\",\r\n\t\trepeat_freq_year: \"Year\",\r\n\t\trepeat_on_date: \"On date\",\r\n\t\trepeat_ends: \"Ends\",\r\n\r\n\t\tmonth_for_recurring: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"]//\r\n\t}\r\n};\r\n\r\n","/*\r\n @Autor Manuel Fernandez Panzuela - www.mfernandez.es\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Enero\", \"Febrero\", \"Marzo\", \"Abril\", \"Mayo\", \"Junio\", \"Julio\", \"Agosto\", \"Septiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"],\r\n\t\tmonth_short: [\"Ene\", \"Feb\", \"Mar\", \"Abr\", \"May\", \"Jun\", \"Jul\", \"Ago\", \"Sep\", \"Oct\", \"Nov\", \"Dic\"],\r\n\t\tday_full: [\"Domingo\", \"Lunes\", \"Martes\", \"Miércoles\", \"Jueves\", \"Viernes\", \"Sábado\"],\r\n\t\tday_short: [\"Dom\", \"Lun\", \"Mar\", \"Mié\", \"Jue\", \"Vie\", \"Sáb\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hoy\",\r\n\t\tday_tab: \"Día\",\r\n\t\tweek_tab: \"Semana\",\r\n\t\tmonth_tab: \"Mes\",\r\n\t\tnew_event: \"Nuevo evento\",\r\n\t\ticon_save: \"Guardar\",\r\n\t\ticon_cancel: \"Cancelar\",\r\n\t\ticon_details: \"Detalles\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Eliminar\",\r\n\t\tconfirm_closing: \"\", //\"Sus cambios se perderán, continuar ?\"\r\n\t\tconfirm_deleting: \"El evento se borrará definitivamente, ¿continuar?\",\r\n\t\tsection_description: \"Descripción\",\r\n\t\tsection_time: \"Período\",\r\n\t\tfull_day: \"Todo el día\",\r\n\r\n\t\tconfirm_recurring: \"¿Desea modificar el conjunto de eventos repetidos?\",\r\n\t\tsection_recurring: \"Repita el evento\",\r\n\t\tbutton_recurring: \"Impedido\",\r\n\t\tbutton_recurring_open: \"Permitido\",\r\n\t\tbutton_edit_series: \"Editar la serie\",\r\n\t\tbutton_edit_occurrence: \"Editar este evento\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Día\",\r\n\t\tdate: \"Fecha\",\r\n\t\tdescription: \"Descripción\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Año\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Día\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Reja\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diariamente\",\r\n\t\trepeat_radio_week: \"Semanalmente\",\r\n\t\trepeat_radio_month: \"Mensualmente\",\r\n\t\trepeat_radio_year: \"Anualmente\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia\",\r\n\t\trepeat_radio_day_type2: \"Cada jornada de trabajo\",\r\n\t\trepeat_week: \" Repetir cada\",\r\n\t\trepeat_text_week_count: \"semana:\",\r\n\t\trepeat_radio_month_type: \"Repita\",\r\n\t\trepeat_radio_month_start: \"El\",\r\n\t\trepeat_text_month_day: \"dia cada \",\r\n\t\trepeat_text_month_count: \"mes\",\r\n\t\trepeat_text_month_count2_before: \"cada\",\r\n\t\trepeat_text_month_count2_after: \"mes\",\r\n\t\trepeat_year_label: \"El\",\r\n\t\tselect_year_day2: \"del\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mes\",\r\n\t\trepeat_radio_end: \"Sin fecha de finalización\",\r\n\t\trepeat_text_occurences_count: \"ocurrencias\",\r\n\t\trepeat_radio_end3: \"Fin\",\r\n\t\trepeat_radio_end2: \"Después de\",\r\n\r\n\t\trepeat_never: \"Nunca\",\r\n\t\trepeat_daily: \"Cada día\",\r\n\t\trepeat_workdays: \"Cada día laborable\",\r\n\t\trepeat_weekly: \"Cada semana\",\r\n\t\trepeat_monthly: \"Cada mes\",\r\n\t\trepeat_yearly: \"Cada año\",\r\n\t\trepeat_custom: \"Personalizado\",\r\n\t\trepeat_freq_day: \"Día\",\r\n\t\trepeat_freq_week: \"Semana\",\r\n\t\trepeat_freq_month: \"Mes\",\r\n\t\trepeat_freq_year: \"Año\",\r\n\t\trepeat_on_date: \"En la fecha\",\r\n\t\trepeat_ends: \"Termina\",\r\n\r\n\t\tmonth_for_recurring: [\"Enero\", \"Febrero\", \"Маrzo\", \"Аbril\", \"Mayo\", \"Junio\", \"Julio\", \"Аgosto\", \"Setiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"],\r\n\t\tday_for_recurring: [\"Domingo\", \"Lunes\", \"Martes\", \"Miércoles\", \"Jeuves\", \"Viernes\", \"Sabado\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Tammikuu\", \"Helmikuu\", \"Maaliskuu\", \"Huhtikuu\", \"Toukokuu\", \"Kesäkuu\", \"Heinäkuu\", \"Elokuu\", \"Syyskuu\", \"Lokakuu\", \"Marraskuu\", \"Joulukuu\"],\r\n\t\tmonth_short: [\"Tam\", \"Hel\", \"Maa\", \"Huh\", \"Tou\", \"Kes\", \"Hei\", \"Elo\", \"Syy\", \"Lok\", \"Mar\", \"Jou\"],\r\n\t\tday_full: [\"Sunnuntai\", \"Maanantai\", \"Tiistai\", \"Keskiviikko\", \"Torstai\", \"Perjantai\", \"Lauantai\"],\r\n\t\tday_short: [\"Su\", \"Ma\", \"Ti\", \"Ke\", \"To\", \"Pe\", \"La\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Tänään\",\r\n\t\tday_tab: \"Päivä\",\r\n\t\tweek_tab: \"Viikko\",\r\n\t\tmonth_tab: \"Kuukausi\",\r\n\t\tnew_event: \"Uusi tapahtuma\",\r\n\t\ticon_save: \"Tallenna\",\r\n\t\ticon_cancel: \"Peru\",\r\n\t\ticon_details: \"Tiedot\",\r\n\t\ticon_edit: \"Muokkaa\",\r\n\t\ticon_delete: \"Poista\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Haluatko varmasti poistaa tapahtuman?\",\r\n\t\tsection_description: \"Kuvaus\",\r\n\t\tsection_time: \"Aikajakso\",\r\n\t\tfull_day: \"Koko päivä\",\r\n\r\n\t\tconfirm_recurring: \"Haluatko varmasti muokata toistuvan tapahtuman kaikkia jaksoja?\",\r\n\t\tsection_recurring: \"Toista tapahtuma\",\r\n\t\tbutton_recurring: \"Ei käytössä\",\r\n\t\tbutton_recurring_open: \"Käytössä\",\r\n\t\tbutton_edit_series: \"Muokkaa sarja\",\r\n\t\tbutton_edit_occurrence: \"Muokkaa kopio\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Esityslista\",\r\n\t\tdate: \"Päivämäärä\",\r\n\t\tdescription: \"Kuvaus\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Vuoden\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Esityslista\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Ritilä\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Luo uusi vetämällä\",\r\n\t\tdrag_to_move:\"Siirrä vetämällä\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Päivittäin\",\r\n\t\trepeat_radio_week: \"Viikoittain\",\r\n\t\trepeat_radio_month: \"Kuukausittain\",\r\n\t\trepeat_radio_year: \"Vuosittain\",\r\n\t\trepeat_radio_day_type: \"Joka\",\r\n\t\trepeat_text_day_count: \"päivä\",\r\n\t\trepeat_radio_day_type2: \"Joka arkipäivä\",\r\n\t\trepeat_week: \"Toista joka\",\r\n\t\trepeat_text_week_count: \"viikko näinä päivinä:\",\r\n\t\trepeat_radio_month_type: \"Toista\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \"päivänä joka\",\r\n\t\trepeat_text_month_count: \"kuukausi\",\r\n\t\trepeat_text_month_count2_before: \"joka\",\r\n\t\trepeat_text_month_count2_after: \"kuukausi\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"päivä\",\r\n\t\tselect_year_month: \"kuukausi\",\r\n\t\trepeat_radio_end: \"Ei loppumisaikaa\",\r\n\t\trepeat_text_occurences_count: \"Toiston jälkeen\",\r\n\t\trepeat_radio_end3: \"Loppuu\",\r\n\t\trepeat_radio_end2: \"\",\r\n\r\n\t\trepeat_never: \"Ei koskaan\",\r\n\t\trepeat_daily: \"Joka päivä\",\r\n\t\trepeat_workdays: \"Joka arkipäivä\",\r\n\t\trepeat_weekly: \"Joka viikko\",\r\n\t\trepeat_monthly: \"Joka kuukausi\",\r\n\t\trepeat_yearly: \"Joka vuosi\",\r\n\t\trepeat_custom: \"Mukautettu\",\r\n\t\trepeat_freq_day: \"Päivä\",\r\n\t\trepeat_freq_week: \"Viikko\",\r\n\t\trepeat_freq_month: \"Kuukausi\",\r\n\t\trepeat_freq_year: \"Vuosi\",\r\n\t\trepeat_on_date: \"Tiettynä päivänä\",\r\n\t\trepeat_ends: \"Päättyy\",\r\n\r\n\t\tmonth_for_recurring: [\"Tammikuu\", \"Helmikuu\", \"Maaliskuu\", \"Huhtikuu\", \"Toukokuu\", \"Kesäkuu\", \"Heinäkuu\", \"Elokuu\", \"Syyskuu\", \"Lokakuu\", \"Marraskuu\", \"Joulukuu\"],\r\n\t\tday_for_recurring: [\"Sunnuntai\", \"Maanantai\", \"Tiistai\", \"Keskiviikko\", \"Torstai\", \"Perjantai\", \"Lauantai\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Janvier\", \"Février\", \"Mars\", \"Avril\", \"Mai\", \"Juin\", \"Juillet\", \"Août\", \"Septembre\", \"Octobre\", \"Novembre\", \"Décembre\"],\r\n\t\tmonth_short: [\"Jan\", \"Fév\", \"Mar\", \"Avr\", \"Mai\", \"Juin\", \"Juil\", \"Aoû\", \"Sep\", \"Oct\", \"Nov\", \"Déc\"],\r\n\t\tday_full: [\"Dimanche\", \"Lundi\", \"Mardi\", \"Mercredi\", \"Jeudi\", \"Vendredi\", \"Samedi\"],\r\n\t\tday_short: [\"Dim\", \"Lun\", \"Mar\", \"Mer\", \"Jeu\", \"Ven\", \"Sam\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Aujourd'hui\",\r\n\t\tday_tab: \"Jour\",\r\n\t\tweek_tab: \"Semaine\",\r\n\t\tmonth_tab: \"Mois\",\r\n\t\tnew_event: \"Nouvel événement\",\r\n\t\ticon_save: \"Enregistrer\",\r\n\t\ticon_cancel: \"Annuler\",\r\n\t\ticon_details: \"Détails\",\r\n\t\ticon_edit: \"Modifier\",\r\n\t\ticon_delete: \"Effacer\",\r\n\t\tconfirm_closing: \"\", //Vos modifications seront perdus, êtes-vous sûr ?\r\n\t\tconfirm_deleting: \"L'événement sera effacé sans appel, êtes-vous sûr ?\",\r\n\t\tsection_description: \"Description\",\r\n\t\tsection_time: \"Période\",\r\n\t\tfull_day: \"Journée complète\",\r\n\r\n\t\tconfirm_recurring: \"Voulez-vous éditer toute une série d'évènements répétés?\",\r\n\t\tsection_recurring: \"Périodicité\",\r\n\t\tbutton_recurring: \"Désactivé\",\r\n\t\tbutton_recurring_open: \"Activé\",\r\n\t\tbutton_edit_series: \"Modifier la série\",\r\n\t\tbutton_edit_occurrence: \"Modifier une copie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Jour\",\r\n\t\tdate: \"Date\",\r\n\t\tdescription: \"Description\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Année\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Jour\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grille\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Quotidienne\",\r\n\t\trepeat_radio_week: \"Hebdomadaire\",\r\n\t\trepeat_radio_month: \"Mensuelle\",\r\n\t\trepeat_radio_year: \"Annuelle\",\r\n\t\trepeat_radio_day_type: \"Chaque\",\r\n\t\trepeat_text_day_count: \"jour\",\r\n\t\trepeat_radio_day_type2: \"Chaque journée de travail\",\r\n\t\trepeat_week: \" Répéter toutes les\",\r\n\t\trepeat_text_week_count: \"semaine:\",\r\n\t\trepeat_radio_month_type: \"Répéter\",\r\n\t\trepeat_radio_month_start: \"Le\",\r\n\t\trepeat_text_month_day: \"jour chaque\",\r\n\t\trepeat_text_month_count: \"mois\",\r\n\t\trepeat_text_month_count2_before: \"chaque\",\r\n\t\trepeat_text_month_count2_after: \"mois\",\r\n\t\trepeat_year_label: \"Le\",\r\n\t\tselect_year_day2: \"du\",\r\n\t\trepeat_text_year_day: \"jour\",\r\n\t\tselect_year_month: \"mois\",\r\n\t\trepeat_radio_end: \"Pas de date d"achèvement\",\r\n\t\trepeat_text_occurences_count: \"occurrences\",\r\n\t\trepeat_radio_end3: \"Fin\",\r\n\t\trepeat_radio_end2: \"Après\",\r\n\r\n\t\trepeat_never: \"Jamais\",\r\n\t\trepeat_daily: \"Chaque jour\",\r\n\t\trepeat_workdays: \"Chaque jour ouvrable\",\r\n\t\trepeat_weekly: \"Chaque semaine\",\r\n\t\trepeat_monthly: \"Chaque mois\",\r\n\t\trepeat_yearly: \"Chaque année\",\r\n\t\trepeat_custom: \"Personnalisé\",\r\n\t\trepeat_freq_day: \"Jour\",\r\n\t\trepeat_freq_week: \"Semaine\",\r\n\t\trepeat_freq_month: \"Mois\",\r\n\t\trepeat_freq_year: \"Année\",\r\n\t\trepeat_on_date: \"À la date\",\r\n\t\trepeat_ends: \"Se termine\",\r\n\r\n\t\tmonth_for_recurring: [\"Janvier\", \"Février\", \"Mars\", \"Avril\", \"Mai\", \"Juin\", \"Juillet\", \"Août\", \"Septembre\", \"Octobre\", \"Novembre\", \"Décembre\"],\r\n\t\tday_for_recurring: [\"Dimanche\", \"Lundi\", \"Mardi\", \"Mercredi\", \"Jeudi\", \"Vendredi\", \"Samedi\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"ינואר\", \"פברואר\", \"מרץ\", \"אפריל\", \"מאי\", \"יוני\", \"יולי\", \"אוגוסט\", \"ספטמבר\", \"אוקטובר\", \"נובמבר\", \"דצמבר\"],\r\n\t\tmonth_short: [\"ינו\", \"פבר\", \"מרץ\", \"אפר\", \"מאי\", \"יונ\", \"יול\", \"אוג\", \"ספט\", \"אוק\", \"נוב\", \"דצמ\"],\r\n\t\tday_full: [\"ראשון\", \"שני\", \"שלישי\", \"רביעי\", \"חמישי\", \"שישי\", \"שבת\"],\r\n\t\tday_short: [\"א\", \"ב\", \"ג\", \"ד\", \"ה\", \"ו\", \"ש\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"היום\",\r\n\t\tday_tab: \"יום\",\r\n\t\tweek_tab: \"שבוע\",\r\n\t\tmonth_tab: \"חודש\",\r\n\t\tnew_event: \"ארוע חדש\",\r\n\t\ticon_save: \"שמור\",\r\n\t\ticon_cancel: \"בטל\",\r\n\t\ticon_details: \"פרטים\",\r\n\t\ticon_edit: \"ערוך\",\r\n\t\ticon_delete: \"מחק\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"ארוע ימחק סופית.להמשיך?\",\r\n\t\tsection_description: \"תיאור\",\r\n\t\tsection_time: \"תקופה\",\r\n\r\n\t\tconfirm_recurring: \"האם ברצונך לשנות כל סדרת ארועים מתמשכים?\",\r\n\t\tsection_recurring: \"להעתיק ארוע\",\r\n\t\tbutton_recurring: \"לא פעיל\",\r\n\t\tbutton_recurring_open: \"פעיל\",\r\n\t\tfull_day: \"יום שלם\",\r\n\t\tbutton_edit_series: \"ערוך את הסדרה\",\r\n\t\tbutton_edit_occurrence: \"עריכת עותק\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"סדר יום\",\r\n\t\tdate: \"תאריך\",\r\n\t\tdescription: \"תיאור\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"לשנה\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"סדר יום\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"סורג\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"גרור כדי להזיז\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"בטל\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"הבא\",\r\n\t\tprev: \"הקודם\",\r\n\t\tyear: \"שנה\",\r\n\t\tmonth: \"חודש\",\r\n\t\tday: \"יום\",\r\n\t\thour:\"שעה\",\r\n\t\tminute: \"דקה\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"יומי\",\r\n\t\trepeat_radio_week: \"שבועי\",\r\n\t\trepeat_radio_month: \"חודשי\",\r\n\t\trepeat_radio_year: \"שנתי\",\r\n\t\trepeat_radio_day_type: \"חזור כל\",\r\n\t\trepeat_text_day_count: \"ימים\",\r\n\t\trepeat_radio_day_type2: \"חזור כל יום עבודה\",\r\n\t\trepeat_week: \" חזור כל\",\r\n\t\trepeat_text_week_count: \"שבוע לפי ימים:\",\r\n\t\trepeat_radio_month_type: \"חזור כל\",\r\n\t\trepeat_radio_month_start: \"כל\",\r\n\t\trepeat_text_month_day: \"ימים כל\",\r\n\t\trepeat_text_month_count: \"חודשים\",\r\n\t\trepeat_text_month_count2_before: \"חזור כל\",\r\n\t\trepeat_text_month_count2_after: \"חודש\",\r\n\t\trepeat_year_label: \"כל\",\r\n\t\tselect_year_day2: \"בחודש\",\r\n\t\trepeat_text_year_day: \"ימים\",\r\n\t\tselect_year_month: \"חודש\",\r\n\t\trepeat_radio_end: \"לעולם לא מסתיים\",\r\n\t\trepeat_text_occurences_count: \"אירועים\",\r\n\t\trepeat_radio_end3: \"מסתיים ב\",\r\n\t\trepeat_radio_end2: \"אחרי\",\r\n\r\n\t\trepeat_never: \"אף פעם\",\r\n\t\trepeat_daily: \"כל יום\",\r\n\t\trepeat_workdays: \"כל יום עבודה\",\r\n\t\trepeat_weekly: \"כל שבוע\",\r\n\t\trepeat_monthly: \"כל חודש\",\r\n\t\trepeat_yearly: \"כל שנה\",\r\n\t\trepeat_custom: \"מותאם אישית\",\r\n\t\trepeat_freq_day: \"יום\",\r\n\t\trepeat_freq_week: \"שבוע\",\r\n\t\trepeat_freq_month: \"חודש\",\r\n\t\trepeat_freq_year: \"שנה\",\r\n\t\trepeat_on_date: \"בתאריך\",\r\n\t\trepeat_ends: \"מסתיים\",\r\n\r\n\t\tmonth_for_recurring: [\"ינואר\", \"פברואר\", \"מרץ\", \"אפריל\", \"מאי\", \"יוני\", \"יולי\", \"אוגוסט\", \"ספטמבר\", \"אוקטובר\", \"נובמבר\", \"דצמבר\"],\r\n\t\tday_for_recurring: [\"ראשון\", \"שני\", \"שלישי\", \"רביעי\", \"חמישי\", \"שישי\", \"שבת\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Január\", \"Február\", \"Március\", \"Április\", \"Május\", \"Június\", \"Július\", \"Augusztus\", \"Szeptember\", \"Október\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Már\", \"Ápr\", \"Máj\", \"Jún\", \"Júl\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Vasárnap\", \"Hétfõ\", \"Kedd\", \"Szerda\", \"Csütörtök\", \"Péntek\", \"szombat\"],\r\n\t\tday_short: [\"Va\", \"Hé\", \"Ke\", \"Sze\", \"Csü\", \"Pé\", \"Szo\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Ma\",\r\n\t\tday_tab: \"Nap\",\r\n\t\tweek_tab: \"Hét\",\r\n\t\tmonth_tab: \"Hónap\",\r\n\t\tnew_event: \"Új esemény\",\r\n\t\ticon_save: \"Mentés\",\r\n\t\ticon_cancel: \"Mégse\",\r\n\t\ticon_details: \"Részletek\",\r\n\t\ticon_edit: \"Szerkesztés\",\r\n\t\ticon_delete: \"Törlés\",\r\n\t\tconfirm_closing: \"\", //A változások elvesznek, biztosan folytatja? \"\r\n\t\tconfirm_deleting: \"Az esemény törölve lesz, biztosan folytatja?\",\r\n\t\tsection_description: \"Leírás\",\r\n\t\tsection_time: \"Idõszak\",\r\n\t\tfull_day: \"Egesz napos\",\r\n\r\n\t\t/*ismétlõdõ események*/\r\n\t\tconfirm_recurring: \"Biztosan szerkeszteni akarod az összes ismétlõdõ esemény beállítását?\",\r\n\t\tsection_recurring: \"Esemény ismétlése\",\r\n\t\tbutton_recurring: \"Tiltás\",\r\n\t\tbutton_recurring_open: \"Engedélyezés\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Szerkesztés bíróság\",\r\n\r\n\t\t/*napirendi nézet*/\r\n\t\tagenda_tab: \"Napirend\",\r\n\t\tdate: \"Dátum\",\r\n\t\tdescription: \"Leírás\",\r\n\r\n\t\t/*éves nézet*/\r\n\t\tyear_tab: \"Év\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Napi\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Heti\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Havi\",\r\n\t\trepeat_radio_year: \"Éves\",\r\n\t\trepeat_radio_day_type: \"Minden\",\r\n\t\trepeat_text_day_count: \"nap\",\r\n\t\trepeat_radio_day_type2: \"Minden munkanap\",\r\n\t\trepeat_week: \" Ismételje meg minden\",\r\n\t\trepeat_text_week_count: \"héten a következő napokon:\",\r\n\t\trepeat_radio_month_type: \"Ismétlés\",\r\n\t\trepeat_radio_month_start: \"Ekkor\",\r\n\t\trepeat_text_month_day: \"nap minden\",\r\n\t\trepeat_text_month_count: \"hónapban\",\r\n\t\trepeat_text_month_count2_before: \"minden\",\r\n\t\trepeat_text_month_count2_after: \"hónapban\",\r\n\t\trepeat_year_label: \"Ekkor\",\r\n\t\tselect_year_day2: \"-án/-én\",\r\n\t\trepeat_text_year_day: \"nap\",\r\n\t\tselect_year_month: \"hónap\",\r\n\t\trepeat_radio_end: \"Nincs befejezési dátum\",\r\n\t\trepeat_text_occurences_count: \"esemény\",\r\n\t\trepeat_radio_end2: \"Után\",\r\n\t\trepeat_radio_end3: \"Befejező dátum\",\r\n\r\n\t\trepeat_never: \"Soha\",\r\n\t\trepeat_daily: \"Minden nap\",\r\n\t\trepeat_workdays: \"Minden munkanap\",\r\n\t\trepeat_weekly: \"Minden héten\",\r\n\t\trepeat_monthly: \"Minden hónapban\",\r\n\t\trepeat_yearly: \"Minden évben\",\r\n\t\trepeat_custom: \"Egyedi\",\r\n\t\trepeat_freq_day: \"Nap\",\r\n\t\trepeat_freq_week: \"Hét\",\r\n\t\trepeat_freq_month: \"Hónap\",\r\n\t\trepeat_freq_year: \"Év\",\r\n\t\trepeat_on_date: \"Dátum szerint\",\r\n\t\trepeat_ends: \"Befejeződik\",\r\n\r\n\t\tmonth_for_recurring: [\"Január\", \"Február\", \"Március\", \"Április\", \"Május\", \"Június\", \"Július\", \"Augusztus\", \"Szeptember\", \"Október\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Vasárnap\", \"Hétfő\", \"Kedd\", \"Szerda\", \"Csütörtök\", \"Péntek\", \"Szombat\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Maret\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Agustus\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mei\", \"Jun\", \"Jul\", \"Ags\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Minggu\", \"Senin\", \"Selasa\", \"Rabu\", \"Kamis\", \"Jumat\", \"Sabtu\"],\r\n\t\tday_short: [\"Ming\", \"Sen\", \"Sel\", \"Rab\", \"Kam\", \"Jum\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hari Ini\",\r\n\t\tday_tab: \"Hari\",\r\n\t\tweek_tab: \"Minggu\",\r\n\t\tmonth_tab: \"Bulan\",\r\n\t\tnew_event: \"Acara Baru\",\r\n\t\ticon_save: \"Simpan\",\r\n\t\ticon_cancel: \"Batal\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edit\",\r\n\t\ticon_delete: \"Hapus\",\r\n\t\tconfirm_closing: \"\", /*Perubahan tidak akan disimpan ?*/\r\n\t\tconfirm_deleting: \"Acara akan dihapus\",\r\n\t\tsection_description: \"Keterangan\",\r\n\t\tsection_time: \"Periode\",\r\n\t\tfull_day: \"Hari penuh\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Apakah acara ini akan berulang?\",\r\n\t\tsection_recurring: \"Acara Rutin\",\r\n\t\tbutton_recurring: \"Tidak Difungsikan\",\r\n\t\tbutton_recurring_open: \"Difungsikan\",\r\n\t\tbutton_edit_series: \"Mengedit seri\",\r\n\t\tbutton_edit_occurrence: \"Mengedit salinan\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Tanggal\",\r\n\t\tdescription: \"Keterangan\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Tahun\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabel\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Harian\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Mingguan\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Bulanan\",\r\n\t\trepeat_radio_year: \"Tahunan\",\r\n\t\trepeat_radio_day_type: \"Setiap\",\r\n\t\trepeat_text_day_count: \"hari\",\r\n\t\trepeat_radio_day_type2: \"Setiap hari kerja\",\r\n\t\trepeat_week: \" Ulangi setiap\",\r\n\t\trepeat_text_week_count: \"minggu pada hari berikut:\",\r\n\t\trepeat_radio_month_type: \"Ulangi\",\r\n\t\trepeat_radio_month_start: \"Pada\",\r\n\t\trepeat_text_month_day: \"hari setiap\",\r\n\t\trepeat_text_month_count: \"bulan\",\r\n\t\trepeat_text_month_count2_before: \"setiap\",\r\n\t\trepeat_text_month_count2_after: \"bulan\",\r\n\t\trepeat_year_label: \"Pada\",\r\n\t\tselect_year_day2: \"dari\",\r\n\t\trepeat_text_year_day: \"hari\",\r\n\t\tselect_year_month: \"bulan\",\r\n\t\trepeat_radio_end: \"Tanpa tanggal akhir\",\r\n\t\trepeat_text_occurences_count: \"kejadian\",\r\n\t\trepeat_radio_end2: \"Setelah\",\r\n\t\trepeat_radio_end3: \"Berakhir pada\",\r\n\r\n\t\trepeat_never: \"Tidak pernah\",\r\n\t\trepeat_daily: \"Setiap hari\",\r\n\t\trepeat_workdays: \"Setiap hari kerja\",\r\n\t\trepeat_weekly: \"Setiap minggu\",\r\n\t\trepeat_monthly: \"Setiap bulan\",\r\n\t\trepeat_yearly: \"Setiap tahun\",\r\n\t\trepeat_custom: \"Kustom\",\r\n\t\trepeat_freq_day: \"Hari\",\r\n\t\trepeat_freq_week: \"Minggu\",\r\n\t\trepeat_freq_month: \"Bulan\",\r\n\t\trepeat_freq_year: \"Tahun\",\r\n\t\trepeat_on_date: \"Pada tanggal\",\r\n\t\trepeat_ends: \"Berakhir\",\r\n\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Maret\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Agustus\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tday_for_recurring: [\"Minggu\", \"Senin\", \"Selasa\", \"Rabu\", \"Kamis\", \"Jumat\", \"Sabtu\"]\r\n\t}\r\n};","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Gennaio\", \"Febbraio\", \"Marzo\", \"Aprile\", \"Maggio\", \"Giugno\", \"Luglio\", \"Agosto\", \"Settembre\", \"Ottobre\", \"Novembre\", \"Dicembre\"],\r\n\t\tmonth_short: [\"Gen\", \"Feb\", \"Mar\", \"Apr\", \"Mag\", \"Giu\", \"Lug\", \"Ago\", \"Set\", \"Ott\", \"Nov\", \"Dic\"],\r\n\t\tday_full: [\"Domenica\", \"Lunedì\", \"Martedì\", \"Mercoledì\", \"Giovedì\", \"Venerdì\", \"Sabato\"],\r\n\t\tday_short: [\"Dom\", \"Lun\", \"Mar\", \"Mer\", \"Gio\", \"Ven\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Oggi\",\r\n\t\tday_tab: \"Giorno\",\r\n\t\tweek_tab: \"Settimana\",\r\n\t\tmonth_tab: \"Mese\",\r\n\t\tnew_event: \"Nuovo evento\",\r\n\t\ticon_save: \"Salva\",\r\n\t\ticon_cancel: \"Chiudi\",\r\n\t\ticon_details: \"Dettagli\",\r\n\t\ticon_edit: \"Modifica\",\r\n\t\ticon_delete: \"Elimina\",\r\n\t\tconfirm_closing: \"\", //Le modifiche apportate saranno perse, siete sicuri?\r\n\t\tconfirm_deleting: \"L'evento sarà eliminato, siete sicuri?\",\r\n\t\tsection_description: \"Descrizione\",\r\n\t\tsection_time: \"Periodo di tempo\",\r\n\t\tfull_day: \"Intera giornata\",\r\n\r\n\t\tconfirm_recurring: \"Vuoi modificare l'intera serie di eventi?\",\r\n\t\tsection_recurring: \"Ripetere l'evento\",\r\n\t\tbutton_recurring: \"Disattivato\",\r\n\t\tbutton_recurring_open: \"Attivato\",\r\n\t\tbutton_edit_series: \"Modificare la serie\",\r\n\t\tbutton_edit_occurrence: \"Modificare una copia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descrizione\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Anno\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Griglia\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Quotidiano\",\r\n\t\trepeat_radio_week: \"Settimanale\",\r\n\t\trepeat_radio_month: \"Mensile\",\r\n\t\trepeat_radio_year: \"Annuale\",\r\n\t\trepeat_radio_day_type: \"Ogni\",\r\n\t\trepeat_text_day_count: \"giorno\",\r\n\t\trepeat_radio_day_type2: \"Ogni giornata lavorativa\",\r\n\t\trepeat_week: \" Ripetere ogni\",\r\n\t\trepeat_text_week_count: \"settimana:\",\r\n\t\trepeat_radio_month_type: \"Ripetere\",\r\n\t\trepeat_radio_month_start: \"Il\",\r\n\t\trepeat_text_month_day: \"giorno ogni\",\r\n\t\trepeat_text_month_count: \"mese\",\r\n\t\trepeat_text_month_count2_before: \"ogni\",\r\n\t\trepeat_text_month_count2_after: \"mese\",\r\n\t\trepeat_year_label: \"Il\",\r\n\t\tselect_year_day2: \"del\",\r\n\t\trepeat_text_year_day: \"giorno\",\r\n\t\tselect_year_month: \"mese\",\r\n\t\trepeat_radio_end: \"Senza data finale\",\r\n\t\trepeat_text_occurences_count: \"occorenze\",\r\n\t\trepeat_radio_end3: \"Fine\",\r\n\t\trepeat_radio_end2: \"Dopo\",\r\n\r\n\t\trepeat_never: \"Mai\",\r\n\t\trepeat_daily: \"Ogni giorno\",\r\n\t\trepeat_workdays: \"Ogni giorno feriale\",\r\n\t\trepeat_weekly: \"Ogni settimana\",\r\n\t\trepeat_monthly: \"Ogni mese\",\r\n\t\trepeat_yearly: \"Ogni anno\",\r\n\t\trepeat_custom: \"Personalizzato\",\r\n\t\trepeat_freq_day: \"Giorno\",\r\n\t\trepeat_freq_week: \"Settimana\",\r\n\t\trepeat_freq_month: \"Mese\",\r\n\t\trepeat_freq_year: \"Anno\",\r\n\t\trepeat_on_date: \"Alla data\",\r\n\t\trepeat_ends: \"Finisce\",\r\n\r\n\t\tmonth_for_recurring: [\"Gennaio\", \"Febbraio\", \"Marzo\", \"Aprile\", \"Maggio\", \"Jiugno\", \"Luglio\", \"Agosto\", \"Settembre\", \"Ottobre\", \"Novembre\", \"Dicembre\"],\r\n\t\tday_for_recurring: [\"Domenica\", \"Lunedì\", \"Martedì\", \"Mercoledì\", \"Jovedì\", \"Venerdì\", \"Sabato\"]\r\n\t}\r\n};\r\n","/*\r\n Translation by Genexus Japan Inc.\r\n */\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tmonth_short: [ \"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_full: [\"日曜日\", \"月曜日\", \"火曜日\", \"水曜日\", \"木曜日\", \"金曜日\", \"土曜日\"],\r\n\t\tday_short: [\"日\", \"月\", \"火\", \"水\", \"木\", \"金\", \"土\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"今日\",\r\n\t\tday_tab: \"日\",\r\n\t\tweek_tab: \"週\",\r\n\t\tmonth_tab: \"月\",\r\n\t\tnew_event: \"新イベント\",\r\n\t\ticon_save: \"保存\",\r\n\t\ticon_cancel: \"キャンセル\",\r\n\t\ticon_details: \"詳細\",\r\n\t\ticon_edit: \"編集\",\r\n\t\ticon_delete: \"削除\",\r\n\t\tconfirm_closing: \"\", //変更が取り消されます、宜しいですか?\r\n\t\tconfirm_deleting: \"イベント完全に削除されます、宜しいですか?\",\r\n\t\tsection_description: \"デスクリプション\",\r\n\t\tsection_time: \"期間\",\r\n\t\tconfirm_recurring: \"繰り返されているイベントを全て編集しますか?\",\r\n\t\tsection_recurring: \"イベントを繰り返す\",\r\n\t\tbutton_recurring: \"無効\",\r\n\t\tbutton_recurring_open: \"有効\",\r\n\t\tfull_day: \"終日\",\r\n\t\tbutton_edit_series: \"シリーズを編集します\",\r\n\t\tbutton_edit_occurrence: \"コピーを編集\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"議題は\",\r\n\t\tdate: \"日付\",\r\n\t\tdescription: \"説明\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"今年\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"議題は\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"グリッド\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"毎日\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"毎週\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"毎月\",\r\n\t\trepeat_radio_year: \"毎年\",\r\n\t\trepeat_radio_day_type: \"毎\",\r\n\t\trepeat_text_day_count: \"日\",\r\n\t\trepeat_radio_day_type2: \"毎営業日\",\r\n\t\trepeat_week: \" 繰り返し毎\",\r\n\t\trepeat_text_week_count: \"週 次の日:\",\r\n\t\trepeat_radio_month_type: \"繰り返し\",\r\n\t\trepeat_radio_month_start: \"オン\",\r\n\t\trepeat_text_month_day: \"日毎\",\r\n\t\trepeat_text_month_count: \"月\",\r\n\t\trepeat_text_month_count2_before: \"毎\",\r\n\t\trepeat_text_month_count2_after: \"月\",\r\n\t\trepeat_year_label: \"オン\",\r\n\t\tselect_year_day2: \"の\",\r\n\t\trepeat_text_year_day: \"日\",\r\n\t\tselect_year_month: \"月\",\r\n\t\trepeat_radio_end: \"終了日なし\",\r\n\t\trepeat_text_occurences_count: \"回数\",\r\n\t\trepeat_radio_end2: \"後\",\r\n\t\trepeat_radio_end3: \"終了日まで\",\r\n\r\n\t\trepeat_never: \"決して\",\r\n\t\trepeat_daily: \"毎日\",\r\n\t\trepeat_workdays: \"毎営業日\",\r\n\t\trepeat_weekly: \"毎週\",\r\n\t\trepeat_monthly: \"毎月\",\r\n\t\trepeat_yearly: \"毎年\",\r\n\t\trepeat_custom: \"カスタム\",\r\n\t\trepeat_freq_day: \"日\",\r\n\t\trepeat_freq_week: \"週\",\r\n\t\trepeat_freq_month: \"月\",\r\n\t\trepeat_freq_year: \"年\",\r\n\t\trepeat_on_date: \"日にち\",\r\n\t\trepeat_ends: \"終了\",\r\n\r\n\t\tmonth_for_recurring: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_for_recurring: [\"日曜日\", \"月曜日\", \"火曜日\", \"水曜日\", \"木曜日\", \"金曜日\", \"土曜日\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default class LocaleManager{\r\n\tconstructor(config){\r\n\t\tthis._locales = {};\r\n\t\tfor(const i in config){\r\n\t\t\tthis._locales[i] = config[i];\r\n\t\t}\r\n\t}\r\n\r\n\taddLocale(name, locale) {\r\n\t\tthis._locales[name] = locale;\r\n\t}\r\n\r\n\tgetLocale(name) {\r\n\t\treturn this._locales[name];\r\n\t}\r\n}","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Mon\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"I dag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uke\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny hendelse\",\r\n\t\ticon_save: \"Lagre\",\r\n\t\ticon_cancel: \"Avbryt\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Rediger\",\r\n\t\ticon_delete: \"Slett\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Hendelsen vil bli slettet permanent. Er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du forandre hele dette settet av repeterende hendelser?\",\r\n\t\tsection_recurring: \"Repeter hendelsen\",\r\n\t\tbutton_recurring: \"Av\",\r\n\t\tbutton_recurring_open: \"På\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Redigere en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\",\r\n\t\trepeat_radio_week: \"Ukentlig\",\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Alle hverdager\",\r\n\t\trepeat_week: \" Gjentas hver\",\r\n\t\trepeat_text_week_count: \"uke på:\",\r\n\t\trepeat_radio_month_type: \"På hver\",\r\n\t\trepeat_radio_month_start: \"På\",\r\n\t\trepeat_text_month_day: \"dag hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"på\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Ingen sluttdato\",\r\n\t\trepeat_text_occurences_count: \"forekomst\",\r\n\t\trepeat_radio_end3: \"Stop den\",\r\n\t\trepeat_radio_end2: \"Etter\",\r\n\r\n\t\trepeat_never: \"Aldri\",\r\n\t\trepeat_daily: \"Hver dag\",\r\n\t\trepeat_workdays: \"Hver ukedag\",\r\n\t\trepeat_weekly: \"Hver uke\",\r\n\t\trepeat_monthly: \"Hver måned\",\r\n\t\trepeat_yearly: \"Hvert år\",\r\n\t\trepeat_custom: \"Tilpasset\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Uke\",\r\n\t\trepeat_freq_month: \"Måned\",\r\n\t\trepeat_freq_year: \"År\",\r\n\t\trepeat_on_date: \"På dato\",\r\n\t\trepeat_ends: \"Slutter\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tday_for_recurring: [\"Sondag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Maart\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Augustus\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"mrt\", \"Apr\", \"Mei\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Zondag\", \"Maandag\", \"Dinsdag\", \"Woensdag\", \"Donderdag\", \"Vrijdag\", \"Zaterdag\"],\r\n\t\tday_short: [\"Zo\", \"Ma\", \"Di\", \"Wo\", \"Do\", \"Vr\", \"Za\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Vandaag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Week\",\r\n\t\tmonth_tab: \"Maand\",\r\n\t\tnew_event: \"Nieuw item\",\r\n\t\ticon_save: \"Opslaan\",\r\n\t\ticon_cancel: \"Annuleren\",\r\n\t\ticon_details: \"Details\",\r\n\t\ticon_edit: \"Bewerken\",\r\n\t\ticon_delete: \"Verwijderen\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Item zal permanent worden verwijderd, doorgaan?\",\r\n\t\tsection_description: \"Beschrijving\",\r\n\t\tsection_time: \"Tijd periode\",\r\n\t\tfull_day: \"Hele dag\",\r\n\r\n\t\tconfirm_recurring: \"Wilt u alle terugkerende items bijwerken?\",\r\n\t\tsection_recurring: \"Item herhalen\",\r\n\t\tbutton_recurring: \"Uit\",\r\n\t\tbutton_recurring_open: \"Aan\",\r\n\t\tbutton_edit_series: \"Bewerk de serie\",\r\n\t\tbutton_edit_occurrence: \"Bewerk een kopie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Omschrijving\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Jaar\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabel\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dagelijks\",\r\n\t\trepeat_radio_week: \"Wekelijks\",\r\n\t\trepeat_radio_month: \"Maandelijks\",\r\n\t\trepeat_radio_year: \"Jaarlijks\",\r\n\t\trepeat_radio_day_type: \"Elke\",\r\n\t\trepeat_text_day_count: \"dag(en)\",\r\n\t\trepeat_radio_day_type2: \"Elke werkdag\",\r\n\t\trepeat_week: \" Herhaal elke\",\r\n\t\trepeat_text_week_count: \"week op de volgende dagen:\",\r\n\t\trepeat_radio_month_type: \"Herhaal\",\r\n\t\trepeat_radio_month_start: \"Op\",\r\n\t\trepeat_text_month_day: \"dag iedere\",\r\n\t\trepeat_text_month_count: \"maanden\",\r\n\t\trepeat_text_month_count2_before: \"iedere\",\r\n\t\trepeat_text_month_count2_after: \"maanden\",\r\n\t\trepeat_year_label: \"Op\",\r\n\t\tselect_year_day2: \"van\",\r\n\t\trepeat_text_year_day: \"dag\",\r\n\t\tselect_year_month: \"maand\",\r\n\t\trepeat_radio_end: \"Geen eind datum\",\r\n\t\trepeat_text_occurences_count: \"keren\",\r\n\t\trepeat_radio_end3: \"Eindigd per\",\r\n\t\trepeat_radio_end2: \"Na\",\r\n\r\n\t\trepeat_never: \"Nooit\",\r\n\t\trepeat_daily: \"Elke dag\",\r\n\t\trepeat_workdays: \"Elke werkdag\",\r\n\t\trepeat_weekly: \"Elke week\",\r\n\t\trepeat_monthly: \"Elke maand\",\r\n\t\trepeat_yearly: \"Elk jaar\",\r\n\t\trepeat_custom: \"Aangepast\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Week\",\r\n\t\trepeat_freq_month: \"Maand\",\r\n\t\trepeat_freq_year: \"Jaar\",\r\n\t\trepeat_on_date: \"Op datum\",\r\n\t\trepeat_ends: \"Eindigt\",\r\n\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Maart\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Augustus\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Zondag\", \"Maandag\", \"Dinsdag\", \"Woensdag\", \"Donderdag\", \"Vrijdag\", \"Zaterdag\"]\r\n\t}\r\n};\r\n\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Man\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Uke\",\r\n\t\tmonth_tab: \"Måned\",\r\n\t\tnew_event: \"Ny\",\r\n\t\ticon_save: \"Lagre\",\r\n\t\ticon_cancel: \"Avbryt\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Endre\",\r\n\t\ticon_delete: \"Slett\",\r\n\t\tconfirm_closing: \"Endringer blir ikke lagret, er du sikker?\", //Endringer blir ikke lagret, er du sikker?\r\n\t\tconfirm_deleting: \"Oppføringen vil bli slettet, er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\t\tfull_day: \"Full dag\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vil du endre hele settet med repeterende oppføringer?\",\r\n\t\tsection_recurring: \"Repeterende oppføring\",\r\n\t\tbutton_recurring: \"Ikke aktiv\",\r\n\t\tbutton_recurring_open: \"Aktiv\",\r\n\t\tbutton_edit_series: \"Rediger serien\",\r\n\t\tbutton_edit_occurrence: \"Redigere en kopi\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Dato\",\r\n\t\tdescription: \"Beskrivelse\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grid\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Daglig\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Ukentlig\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Månedlig\",\r\n\t\trepeat_radio_year: \"Årlig\",\r\n\t\trepeat_radio_day_type: \"Hver\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Hver arbeidsdag\",\r\n\t\trepeat_week: \" Gjenta hver\",\r\n\t\trepeat_text_week_count: \"uke neste dager:\",\r\n\t\trepeat_radio_month_type: \"Gjenta\",\r\n\t\trepeat_radio_month_start: \"På\",\r\n\t\trepeat_text_month_day: \"dag hver\",\r\n\t\trepeat_text_month_count: \"måned\",\r\n\t\trepeat_text_month_count2_before: \"hver\",\r\n\t\trepeat_text_month_count2_after: \"måned\",\r\n\t\trepeat_year_label: \"På\",\r\n\t\tselect_year_day2: \"av\",\r\n\t\trepeat_text_year_day: \"dag\",\r\n\t\tselect_year_month: \"måned\",\r\n\t\trepeat_radio_end: \"Ingen sluttdato\",\r\n\t\trepeat_text_occurences_count: \"forekomster\",\r\n\t\trepeat_radio_end2: \"Etter\",\r\n\t\trepeat_radio_end3: \"Slutt innen\",\r\n\r\n\t\trepeat_never: \"Aldri\",\r\n\t\trepeat_daily: \"Hver dag\",\r\n\t\trepeat_workdays: \"Hver ukedag\",\r\n\t\trepeat_weekly: \"Hver uke\",\r\n\t\trepeat_monthly: \"Hver måned\",\r\n\t\trepeat_yearly: \"Hvert år\",\r\n\t\trepeat_custom: \"Tilpasset\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Uke\",\r\n\t\trepeat_freq_month: \"Måned\",\r\n\t\trepeat_freq_year: \"År\",\r\n\t\trepeat_on_date: \"På dato\",\r\n\t\trepeat_ends: \"Slutter\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tday_for_recurring: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Styczeń\", \"Luty\", \"Marzec\", \"Kwiecień\", \"Maj\", \"Czerwiec\", \"Lipiec\", \"Sierpień\", \"Wrzesień\", \"Październik\", \"Listopad\", \"Grudzień\"],\r\n\t\tmonth_short: [\"Sty\", \"Lut\", \"Mar\", \"Kwi\", \"Maj\", \"Cze\", \"Lip\", \"Sie\", \"Wrz\", \"Paź\", \"Lis\", \"Gru\"],\r\n\t\tday_full: [\"Niedziela\", \"Poniedziałek\", \"Wtorek\", \"Środa\", \"Czwartek\", \"Piątek\", \"Sobota\"],\r\n\t\tday_short: [\"Nie\", \"Pon\", \"Wto\", \"Śro\", \"Czw\", \"Pią\", \"Sob\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dziś\",\r\n\t\tday_tab: \"Dzień\",\r\n\t\tweek_tab: \"Tydzień\",\r\n\t\tmonth_tab: \"Miesiąc\",\r\n\t\tnew_event: \"Nowe zdarzenie\",\r\n\t\ticon_save: \"Zapisz\",\r\n\t\ticon_cancel: \"Anuluj\",\r\n\t\ticon_details: \"Szczegóły\",\r\n\t\ticon_edit: \"Edytuj\",\r\n\t\ticon_delete: \"Usuń\",\r\n\t\tconfirm_closing: \"\", //Zmiany zostaną usunięte, jesteś pewien?\r\n\t\tconfirm_deleting: \"Zdarzenie zostanie usunięte na zawsze, kontynuować?\",\r\n\t\tsection_description: \"Opis\",\r\n\t\tsection_time: \"Okres czasu\",\r\n\t\tfull_day: \"Cały dzień\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Czy chcesz edytować cały zbiór powtarzających się zdarzeń?\",\r\n\t\tsection_recurring: \"Powtórz zdarzenie\",\r\n\t\tbutton_recurring: \"Nieaktywne\",\r\n\t\tbutton_recurring_open: \"Aktywne\",\r\n\t\tbutton_edit_series: \"Edytuj serię\",\r\n\t\tbutton_edit_occurrence: \"Edytuj kopię\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Agenda\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Opis\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Tabela\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Codziennie\",\r\n\t\trepeat_radio_week: \"Co tydzie\",\r\n\t\trepeat_radio_month: \"Co miesic\",\r\n\t\trepeat_radio_year: \"Co rok\",\r\n\t\trepeat_radio_day_type: \"Kadego\",\r\n\t\trepeat_text_day_count: \"dnia\",\r\n\t\trepeat_radio_day_type2: \"Kadego dnia roboczego\",\r\n\t\trepeat_week: \" Powtarzaj kadego\",\r\n\t\trepeat_text_week_count: \"tygodnia w dni:\",\r\n\t\trepeat_radio_month_type: \"Powtrz\",\r\n\t\trepeat_radio_month_start: \"W\",\r\n\t\trepeat_text_month_day: \"dnia kadego\",\r\n\t\trepeat_text_month_count: \"miesica\",\r\n\t\trepeat_text_month_count2_before: \"kadego\",\r\n\t\trepeat_text_month_count2_after: \"miesica\",\r\n\t\trepeat_year_label: \"W\",\r\n\t\tselect_year_day2: \"miesica\",\r\n\t\trepeat_text_year_day: \"dnia miesica\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Bez daty kocowej\",\r\n\t\trepeat_text_occurences_count: \"wystpieniu/ach\",\r\n\t\trepeat_radio_end3: \"Zakocz w\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\r\n\t\trepeat_never: \"Nigdy\",\r\n\t\trepeat_daily: \"Codziennie\",\r\n\t\trepeat_workdays: \"Każdy dzień roboczy\",\r\n\t\trepeat_weekly: \"Co tydzień\",\r\n\t\trepeat_monthly: \"Co miesiąc\",\r\n\t\trepeat_yearly: \"Co rok\",\r\n\t\trepeat_custom: \"Niestandardowy\",\r\n\t\trepeat_freq_day: \"Dzień\",\r\n\t\trepeat_freq_week: \"Tydzień\",\r\n\t\trepeat_freq_month: \"Miesiąc\",\r\n\t\trepeat_freq_year: \"Rok\",\r\n\t\trepeat_on_date: \"W dniu\",\r\n\t\trepeat_ends: \"Kończy się\",\r\n\r\n\t\tmonth_for_recurring: [\"Stycznia\", \"Lutego\", \"Marca\", \"Kwietnia\", \"Maja\", \"Czerwca\", \"Lipca\", \"Sierpnia\", \"Wrzenia\", \"Padziernka\", \"Listopada\", \"Grudnia\"],\r\n\t\tday_for_recurring: [\"Niedziela\", \"Poniedziaek\", \"Wtorek\", \"roda\", \"Czwartek\", \"Pitek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","/*\r\n\r\n TRANSLATION BY MATTHEUS PIROVANI RORIZ GONЗALVES\r\n\r\n mattheusroriz@hotmail.com / mattheus.pirovani@gmail.com /\r\n\r\n www.atrixian.com.br\r\n\r\n */\r\n\r\nexport default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Janeiro\", \"Fevereiro\", \"Março\", \"Abril\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"],\r\n\t\tmonth_short: [\"Jan\", \"Fev\", \"Mar\", \"Abr\", \"Mai\", \"Jun\", \"Jul\", \"Ago\", \"Set\", \"Out\", \"Nov\", \"Dez\"],\r\n\t\tday_full: [\"Domingo\", \"Segunda\", \"Terça\", \"Quarta\", \"Quinta\", \"Sexta\", \"Sábado\"],\r\n\t\tday_short: [\"Dom\", \"Seg\", \"Ter\", \"Qua\", \"Qui\", \"Sex\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Hoje\",\r\n\t\tday_tab: \"Dia\",\r\n\t\tweek_tab: \"Semana\",\r\n\t\tmonth_tab: \"Mês\",\r\n\t\tnew_event: \"Novo evento\",\r\n\t\ticon_save: \"Salvar\",\r\n\t\ticon_cancel: \"Cancelar\",\r\n\t\ticon_details: \"Detalhes\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Deletar\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Tem certeza que deseja excluir?\",\r\n\t\tsection_description: \"Descrição\",\r\n\t\tsection_time: \"Período de tempo\",\r\n\t\tfull_day: \"Dia inteiro\",\r\n\r\n\t\tconfirm_recurring: \"Deseja editar todos esses eventos repetidos?\",\r\n\t\tsection_recurring: \"Repetir evento\",\r\n\t\tbutton_recurring: \"Desabilitar\",\r\n\t\tbutton_recurring_open: \"Habilitar\",\r\n\t\tbutton_edit_series: \"Editar a série\",\r\n\t\tbutton_edit_occurrence: \"Editar uma cópia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dia\",\r\n\t\tdate: \"Data\",\r\n\t\tdescription: \"Descrição\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Ano\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dia\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Grade\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Diário\",\r\n\t\trepeat_radio_week: \"Semanal\",\r\n\t\trepeat_radio_month: \"Mensal\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"Cada\",\r\n\t\trepeat_text_day_count: \"dia(s)\",\r\n\t\trepeat_radio_day_type2: \"Cada trabalho diário\",\r\n\t\trepeat_week: \" Repita cada\",\r\n\t\trepeat_text_week_count: \"semana:\",\r\n\t\trepeat_radio_month_type: \"Repetir\",\r\n\t\trepeat_radio_month_start: \"Em\",\r\n\t\trepeat_text_month_day: \"todo dia\",\r\n\t\trepeat_text_month_count: \"mês\",\r\n\t\trepeat_text_month_count2_before: \"todo\",\r\n\t\trepeat_text_month_count2_after: \"mês\",\r\n\t\trepeat_year_label: \"Em\",\r\n\t\tselect_year_day2: \"of\",\r\n\t\trepeat_text_year_day: \"dia\",\r\n\t\tselect_year_month: \"mês\",\r\n\t\trepeat_radio_end: \"Sem data final\",\r\n\t\trepeat_text_occurences_count: \"ocorrências\",\r\n\t\trepeat_radio_end3: \"Fim\",\r\n\t\trepeat_radio_end2: \"Depois\",\r\n\r\n\t\trepeat_never: \"Nunca\",\r\n\t\trepeat_daily: \"Todos os dias\",\r\n\t\trepeat_workdays: \"Todos os dias úteis\",\r\n\t\trepeat_weekly: \"Toda semana\",\r\n\t\trepeat_monthly: \"Todo mês\",\r\n\t\trepeat_yearly: \"Todo ano\",\r\n\t\trepeat_custom: \"Personalizado\",\r\n\t\trepeat_freq_day: \"Dia\",\r\n\t\trepeat_freq_week: \"Semana\",\r\n\t\trepeat_freq_month: \"Mês\",\r\n\t\trepeat_freq_year: \"Ano\",\r\n\t\trepeat_on_date: \"Na data\",\r\n\t\trepeat_ends: \"Termina\",\r\n\r\n\t\tmonth_for_recurring: [\"Janeiro\", \"Fevereiro\", \"Março\", \"Abril\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"],\r\n\t\tday_for_recurring: [\"Domingo\", \"Segunda\", \"Terça\", \"Quarta\", \"Quinta\", \"Sexta\", \"Sábado\"]\r\n\t}\r\n};\r\n\r\n\r\n","/*\r\n\tTraducere de Ovidiu Lixandru: http://www.madball.ro\r\n */\r\n\r\nexport default {\r\n\tdate:{\r\n\t\tmonth_full:[\"Ianuarie\", \"Februarie\", \"Martie\", \"Aprilie\", \"Mai\", \"Iunie\", \"Iulie\", \"August\", \"Septembrie\", \"Octombrie\", \"November\", \"December\"],\r\n\t\tmonth_short:[\"Ian\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Iun\", \"Iul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n\t\tday_full:[\"Duminica\", \"Luni\", \"Marti\", \"Miercuri\", \"Joi\", \"Vineri\", \"Sambata\"],\r\n\t\tday_short:[\"Du\", \"Lu\", \"Ma\", \"Mi\", \"Jo\", \"Vi\", \"Sa\"]\r\n\t},\r\n\tlabels:{\r\n\t\tdhx_cal_today_button:\"Astazi\",\r\n\t\tday_tab:\"Zi\",\r\n\t\tweek_tab:\"Saptamana\",\r\n\t\tmonth_tab:\"Luna\",\r\n\t\tnew_event:\"Eveniment nou\",\r\n\t\ticon_save:\"Salveaza\",\r\n\t\ticon_cancel:\"Anuleaza\",\r\n\t\ticon_details:\"Detalii\",\r\n\t\ticon_edit:\"Editeaza\",\r\n\t\ticon_delete:\"Sterge\",\r\n\t\tconfirm_closing:\"Schimbarile nu vor fi salvate, esti sigur?\",//Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting:\"Evenimentul va fi sters permanent, esti sigur?\",\r\n\t\tsection_description:\"Descriere\",\r\n\t\tsection_time:\"Interval\",\r\n\t\tfull_day:\"Toata ziua\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring:\"Vrei sa editezi toata seria de evenimente repetate?\",\r\n\t\tsection_recurring:\"Repetare\",\r\n\t\tbutton_recurring:\"Dezactivata\",\r\n\t\tbutton_recurring_open:\"Activata\",\r\n\t\tbutton_edit_series: \"Editeaza serie\",\r\n\t\tbutton_edit_occurrence: \"Editeaza doar intrare\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab:\"Agenda\",\r\n\t\tdate:\"Data\",\r\n\t\tdescription:\"Descriere\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab:\"An\",\r\n\r\n\t\t/* week agenda extension */\r\n\t\tweek_agenda_tab: \"Agenda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Lista\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Zilnic\",\r\n\t\trepeat_radio_week: \"Saptamanal\",\r\n\t\trepeat_radio_month: \"Lunar\",\r\n\t\trepeat_radio_year: \"Anual\",\r\n\t\trepeat_radio_day_type: \"La fiecare\",\r\n\t\trepeat_text_day_count: \"zi(le)\",\r\n\t\trepeat_radio_day_type2: \"Fiecare zi lucratoare\",\r\n\t\trepeat_week: \" Repeta la fiecare\",\r\n\t\trepeat_text_week_count: \"saptamana in urmatoarele zile:\",\r\n\t\trepeat_radio_month_type: \"Repeta in\",\r\n\t\trepeat_radio_month_start: \"In a\",\r\n\t\trepeat_text_month_day: \"zi la fiecare\",\r\n\t\trepeat_text_month_count: \"luni\",\r\n\t\trepeat_text_month_count2_before: \"la fiecare\",\r\n\t\trepeat_text_month_count2_after: \"luni\",\r\n\t\trepeat_year_label: \"In\",\r\n\t\tselect_year_day2: \"a lunii\",\r\n\t\trepeat_text_year_day: \"zi a lunii\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Fara data de sfarsit\",\r\n\t\trepeat_text_occurences_count: \"evenimente\",\r\n\t\trepeat_radio_end3: \"La data\",\r\n\t\trepeat_radio_end2: \"Dupa\",\r\n\r\n\t\trepeat_never: \"Niciodată\",\r\n\t\trepeat_daily: \"În fiecare zi\",\r\n\t\trepeat_workdays: \"În fiecare zi lucrătoare\",\r\n\t\trepeat_weekly: \"În fiecare săptămână\",\r\n\t\trepeat_monthly: \"În fiecare lună\",\r\n\t\trepeat_yearly: \"În fiecare an\",\r\n\t\trepeat_custom: \"Personalizat\",\r\n\t\trepeat_freq_day: \"Zi\",\r\n\t\trepeat_freq_week: \"Săptămână\",\r\n\t\trepeat_freq_month: \"Lună\",\r\n\t\trepeat_freq_year: \"An\",\r\n\t\trepeat_on_date: \"La data\",\r\n\t\trepeat_ends: \"Se termină\",\r\n\r\n\t\tmonth_for_recurring: [\"Ianuarie\", \"Februarie\", \"Martie\", \"Aprilie\", \"Mai\", \"Iunie\", \"Iulie\", \"August\", \"Septembrie\", \"Octombrie\", \"Noiembrie\", \"Decembrie\"],\r\n\t\tday_for_recurring: [\"Duminica\", \"Luni\", \"Marti\", \"Miercuri\", \"Joi\", \"Vineri\", \"Sambata\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Январь\", \"Февраль\", \"Март\", \"Апрель\", \"Maй\", \"Июнь\", \"Июль\", \"Август\", \"Сентябрь\", \"Oктябрь\", \"Ноябрь\", \"Декабрь\"],\r\n\t\tmonth_short: [\"Янв\", \"Фев\", \"Maр\", \"Aпр\", \"Maй\", \"Июн\", \"Июл\", \"Aвг\", \"Сен\", \"Окт\", \"Ноя\", \"Дек\"],\r\n\t\tday_full: [ \"Воскресенье\", \"Понедельник\", \"Вторник\", \"Среда\", \"Четверг\", \"Пятница\", \"Суббота\"],\r\n\t\tday_short: [\"Вс\", \"Пн\", \"Вт\", \"Ср\", \"Чт\", \"Пт\", \"Сб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сегодня\",\r\n\t\tday_tab: \"День\",\r\n\t\tweek_tab: \"Неделя\",\r\n\t\tmonth_tab: \"Месяц\",\r\n\t\tnew_event: \"Новое событие\",\r\n\t\ticon_save: \"Сохранить\",\r\n\t\ticon_cancel: \"Отменить\",\r\n\t\ticon_details: \"Детали\",\r\n\t\ticon_edit: \"Изменить\",\r\n\t\ticon_delete: \"Удалить\",\r\n\t\tconfirm_closing: \"\", //Ваши изменения будут потеряны, продолжить?\r\n\t\tconfirm_deleting: \"Событие будет удалено безвозвратно, продолжить?\",\r\n\t\tsection_description: \"Описание\",\r\n\t\tsection_time: \"Период времени\",\r\n\t\tfull_day: \"Весь день\",\r\n\r\n\t\tconfirm_recurring: \"Вы хотите изменить всю серию повторяющихся событий?\",\r\n\t\tsection_recurring: \"Повторение\",\r\n\t\tbutton_recurring: \"Отключено\",\r\n\t\tbutton_recurring_open: \"Включено\",\r\n\t\tbutton_edit_series: \"Редактировать серию\",\r\n\t\tbutton_edit_occurrence: \"Редактировать экземпляр\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Список\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Описание\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Год\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Список\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Таблица\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"День\",\r\n\t\trepeat_radio_week: \"Неделя\",\r\n\t\trepeat_radio_month: \"Месяц\",\r\n\t\trepeat_radio_year: \"Год\",\r\n\t\trepeat_radio_day_type: \"Каждый\",\r\n\t\trepeat_text_day_count: \"день\",\r\n\t\trepeat_radio_day_type2: \"Каждый рабочий день\",\r\n\t\trepeat_week: \" Повторять каждую\",\r\n\t\trepeat_text_week_count: \"неделю , в:\",\r\n\t\trepeat_radio_month_type: \"Повторять\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" числа каждый \",\r\n\t\trepeat_text_month_count: \"месяц\",\r\n\t\trepeat_text_month_count2_before: \"каждый \",\r\n\t\trepeat_text_month_count2_after: \"месяц\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"день\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без даты окончания\",\r\n\t\trepeat_text_occurences_count: \"повторений\",\r\n\t\trepeat_radio_end3: \"До \",\r\n\t\trepeat_radio_end2: \"\",\r\n\r\n\t\trepeat_never: \"Никогда\",\r\n\t\trepeat_daily: \"Каждый день\",\r\n\t\trepeat_workdays: \"Каждый будний день\",\r\n\t\trepeat_weekly: \"Каждую неделю\",\r\n\t\trepeat_monthly: \"Каждый месяц\",\r\n\t\trepeat_yearly: \"Каждый год\",\r\n\t\trepeat_custom: \"Настроить\",\r\n\t\trepeat_freq_day: \"День\",\r\n\t\trepeat_freq_week: \"Неделя\",\r\n\t\trepeat_freq_month: \"Месяц\",\r\n\t\trepeat_freq_year: \"Год\",\r\n\t\trepeat_on_date: \"В дату\",\r\n\t\trepeat_ends: \"Заканчивается\",\r\n\r\n\t\tmonth_for_recurring: [\"Января\", \"Февраля\", \"Марта\", \"Апреля\", \"Мая\", \"Июня\", \"Июля\", \"Августа\", \"Сентября\", \"Октября\", \"Ноября\", \"Декабря\"],\r\n\t\tday_for_recurring: [\"Воскресенье\", \"Понедельник\", \"Вторник\", \"Среду\", \"Четверг\", \"Пятницу\", \"Субботу\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Marec\", \"April\", \"Maj\", \"Junij\", \"Julij\", \"Avgust\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Nedelja\", \"Ponedeljek\", \"Torek\", \"Sreda\", \"Četrtek\", \"Petek\", \"Sobota\"],\r\n\t\tday_short: [\"Ned\", \"Pon\", \"Tor\", \"Sre\", \"Čet\", \"Pet\", \"Sob\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Danes\",\r\n\t\tday_tab: \"Dan\",\r\n\t\tweek_tab: \"Teden\",\r\n\t\tmonth_tab: \"Mesec\",\r\n\t\tnew_event: \"Nov dogodek\",\r\n\t\ticon_save: \"Shrani\",\r\n\t\ticon_cancel: \"Prekliči\",\r\n\t\ticon_details: \"Podrobnosti\",\r\n\t\ticon_edit: \"Uredi\",\r\n\t\ticon_delete: \"Izbriši\",\r\n\t\tconfirm_closing: \"\", //Spremembe ne bodo shranjene. Želite nadaljevati ?\r\n\t\tconfirm_deleting: \"Dogodek bo izbrisan. Želite nadaljevati?\",\r\n\t\tsection_description: \"Opis\",\r\n\t\tsection_time: \"Časovni okvir\",\r\n\t\tfull_day: \"Ves dan\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Želite urediti celoten set ponavljajočih dogodkov?\",\r\n\t\tsection_recurring: \"Ponovi dogodek\",\r\n\t\tbutton_recurring: \"Onemogočeno\",\r\n\t\tbutton_recurring_open: \"Omogočeno\",\r\n\t\tbutton_edit_series: \"Edit series\",\r\n\t\tbutton_edit_occurrence: \"Edit occurrence\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Zadeva\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Opis\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Leto\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Zadeva\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Miza\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dnevno\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Tedensko\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Mesečno\",\r\n\t\trepeat_radio_year: \"Letno\",\r\n\t\trepeat_radio_day_type: \"Vsak\",\r\n\t\trepeat_text_day_count: \"dan\",\r\n\t\trepeat_radio_day_type2: \"Vsak delovni dan\",\r\n\t\trepeat_week: \" Ponavljaj vsak\",\r\n\t\trepeat_text_week_count: \"teden na naslednje dni:\",\r\n\t\trepeat_radio_month_type: \"Ponavljaj\",\r\n\t\trepeat_radio_month_start: \"Na\",\r\n\t\trepeat_text_month_day: \"dan vsak\",\r\n\t\trepeat_text_month_count: \"mesec\",\r\n\t\trepeat_text_month_count2_before: \"vsak\",\r\n\t\trepeat_text_month_count2_after: \"mesec\",\r\n\t\trepeat_year_label: \"Na\",\r\n\t\tselect_year_day2: \"od\",\r\n\t\trepeat_text_year_day: \"dan\",\r\n\t\tselect_year_month: \"mesec\",\r\n\t\trepeat_radio_end: \"Brez končnega datuma\",\r\n\t\trepeat_text_occurences_count: \"pojavitve\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\t\trepeat_radio_end3: \"Končaj do\",\r\n\r\n\t\trepeat_never: \"Nikoli\",\r\n\t\trepeat_daily: \"Vsak dan\",\r\n\t\trepeat_workdays: \"Vsak delovni dan\",\r\n\t\trepeat_weekly: \"Vsak teden\",\r\n\t\trepeat_monthly: \"Vsak mesec\",\r\n\t\trepeat_yearly: \"Vsako leto\",\r\n\t\trepeat_custom: \"Po meri\",\r\n\t\trepeat_freq_day: \"Dan\",\r\n\t\trepeat_freq_week: \"Teden\",\r\n\t\trepeat_freq_month: \"Mesec\",\r\n\t\trepeat_freq_year: \"Leto\",\r\n\t\trepeat_on_date: \"Na datum\",\r\n\t\trepeat_ends: \"Konča se\",\r\n\r\n\t\tmonth_for_recurring: [\"Januar\", \"Februar\", \"Marec\", \"April\", \"Maj\", \"Junij\", \"Julij\", \"Avgust\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Nedelja\", \"Ponedeljek\", \"Torek\", \"Sreda\", \"Četrtek\", \"Petek\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Január\", \"Február\", \"Marec\", \"Apríl\", \"Máj\", \"Jún\", \"Júl\", \"August\", \"September\", \"Október\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Máj\", \"Jún\", \"Júl\", \"Aug\", \"Sept\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Nedeľa\", \"Pondelok\", \"Utorok\", \"Streda\", \"Štvrtok\", \"Piatok\", \"Sobota\"],\r\n\t\tday_short: [\"Ne\", \"Po\", \"Ut\", \"St\", \"Št\", \"Pi\", \"So\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Dnes\",\r\n\t\tday_tab: \"Deň\",\r\n\t\tweek_tab: \"Týždeň\",\r\n\t\tmonth_tab: \"Mesiac\",\r\n\t\tnew_event: \"Nová udalosť\",\r\n\t\ticon_save: \"Uložiť\",\r\n\t\ticon_cancel: \"Späť\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edituj\",\r\n\t\ticon_delete: \"Zmazať\",\r\n\t\tconfirm_closing: \"Vaše zmeny nebudú uložené. Skutočne?\", //Vaše změny budou ztraceny, opravdu ?\r\n\t\tconfirm_deleting: \"Udalosť bude natrvalo vymazaná. Skutočne?\",\r\n\t\tsection_description: \"Poznámky\",\r\n\t\tsection_time: \"Doba platnosti\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Prajete si upraviť celú radu opakovaných udalostí?\",\r\n\t\tsection_recurring: \"Opakovanie udalosti\",\r\n\t\tbutton_recurring: \"Vypnuté\",\r\n\t\tbutton_recurring_open: \"Zapnuté\",\r\n\t\tbutton_edit_series: \"Upraviť opakovania\",\r\n\t\tbutton_edit_occurrence: \"Upraviť inštancie\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Program\",\r\n\t\tdate: \"Dátum\",\r\n\t\tdescription: \"Poznámka\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Rok\",\r\n\t\tfull_day: \"Celý deň\", // Full day\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Program\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Mriežka\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Denne\",\r\n\t\trepeat_radio_week: \"Týždenne\",\r\n\t\trepeat_radio_month: \"Mesaène\",\r\n\t\trepeat_radio_year: \"Roène\",\r\n\t\trepeat_radio_day_type: \"Každý\",\r\n\t\trepeat_text_day_count: \"deò\",\r\n\t\trepeat_radio_day_type2: \"Každý prac. deò\",\r\n\t\trepeat_week: \"Opakova každý\",\r\n\t\trepeat_text_week_count: \"týždeò v dòoch:\",\r\n\t\trepeat_radio_month_type: \"Opakova\",\r\n\t\trepeat_radio_month_start: \"On\",\r\n\t\trepeat_text_month_day: \"deò každý\",\r\n\t\trepeat_text_month_count: \"mesiac\",\r\n\t\trepeat_text_month_count2_before: \"každý\",\r\n\t\trepeat_text_month_count2_after: \"mesiac\",\r\n\t\trepeat_year_label: \"On\",\r\n\t\tselect_year_day2: \"poèas\",\r\n\t\trepeat_text_year_day: \"deò\",\r\n\t\tselect_year_month: \"mesiac\",\r\n\t\trepeat_radio_end: \"Bez dátumu ukonèenia\",\r\n\t\trepeat_text_occurences_count: \"udalostiach\",\r\n\t\trepeat_radio_end3: \"Ukonèi\",\r\n\t\trepeat_radio_end2: \"Po\",\r\n\r\n\t\trepeat_never: \"Nikdy\",\r\n\t\trepeat_daily: \"Každý deň\",\r\n\t\trepeat_workdays: \"Každý pracovný deň\",\r\n\t\trepeat_weekly: \"Každý týždeň\",\r\n\t\trepeat_monthly: \"Každý mesiac\",\r\n\t\trepeat_yearly: \"Každý rok\",\r\n\t\trepeat_custom: \"Vlastné\",\r\n\t\trepeat_freq_day: \"Deň\",\r\n\t\trepeat_freq_week: \"Týždeň\",\r\n\t\trepeat_freq_month: \"Mesiac\",\r\n\t\trepeat_freq_year: \"Rok\",\r\n\t\trepeat_on_date: \"Na dátum\",\r\n\t\trepeat_ends: \"Koniec\",\r\n\r\n\t\tmonth_for_recurring: [\"Január\", \"Február\", \"Marec\", \"Apríl\", \"Máj\", \"Jún\", \"Júl\", \"August\", \"September\", \"Október\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Nede¾a\", \"Pondelok\", \"Utorok\", \"Streda\", \"Štvrtok\", \"Piatok\", \"Sobota\"]\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Mars\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"Augusti\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Söndag\", \"Måndag\", \"Tisdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lördag\"],\r\n\t\tday_short: [\"Sön\", \"Mån\", \"Tis\", \"Ons\", \"Tor\", \"Fre\", \"Lör\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Idag\",\r\n\t\tday_tab: \"Dag\",\r\n\t\tweek_tab: \"Vecka\",\r\n\t\tmonth_tab: \"Månad\",\r\n\t\tnew_event: \"Ny händelse\",\r\n\t\ticon_save: \"Spara\",\r\n\t\ticon_cancel: \"Ångra\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Ändra\",\r\n\t\ticon_delete: \"Ta bort\",\r\n\t\tconfirm_closing: \"\", //Dina förändingar kommer gå förlorade, är du säker?\r\n\t\tconfirm_deleting: \"Är du säker på att du vill ta bort händelsen permanent?\",\r\n\t\tsection_description: \"Beskrivning\",\r\n\t\tsection_time: \"Tid\",\r\n\t\tfull_day: \"Hela dagen\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Vill du redigera hela serien med repeterande händelser?\",\r\n\t\tsection_recurring: \"Upprepa händelse\",\r\n\t\tbutton_recurring: \"Inaktiverat\",\r\n\t\tbutton_recurring_open: \"Aktiverat\",\r\n\t\tbutton_edit_series: \"Redigera serien\",\r\n\t\tbutton_edit_occurrence: \"Redigera en kopia\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Dagordning\",\r\n\t\tdate: \"Datum\",\r\n\t\tdescription: \"Beskrivning\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"År\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Dagordning\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Galler\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Dra för att skapa ny\",\r\n\t\tdrag_to_move:\"Dra för att flytta\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Dagligen\",\r\n\t\trepeat_radio_week: \"Veckovis\",\r\n\t\trepeat_radio_month: \"Månadsvis\",\r\n\t\trepeat_radio_year: \"Årligen\",\r\n\t\trepeat_radio_day_type: \"Var\",\r\n\t\trepeat_text_day_count: \"dag\",\r\n\t\trepeat_radio_day_type2: \"Varje arbetsdag\",\r\n\t\trepeat_week: \" Upprepa var\",\r\n\t\trepeat_text_week_count: \"vecka dessa dagar:\",\r\n\t\trepeat_radio_month_type: \"Upprepa\",\r\n\t\trepeat_radio_month_start: \"Den\",\r\n\t\trepeat_text_month_day: \"dagen var\",\r\n\t\trepeat_text_month_count: \"månad\",\r\n\t\trepeat_text_month_count2_before: \"var\",\r\n\t\trepeat_text_month_count2_after: \"månad\",\r\n\t\trepeat_year_label: \"Den\",\r\n\t\tselect_year_day2: \"i\",\r\n\t\trepeat_text_year_day: \"dag i\",\r\n\t\tselect_year_month: \"månad\",\r\n\t\trepeat_radio_end: \"Inget slutdatum\",\r\n\t\trepeat_text_occurences_count: \"upprepningar\",\r\n\t\trepeat_radio_end3: \"Sluta efter\",\r\n\t\trepeat_radio_end2: \"Efter\",\r\n\r\n\t\trepeat_never: \"Aldrig\",\r\n\t\trepeat_daily: \"Varje dag\",\r\n\t\trepeat_workdays: \"Varje vardag\",\r\n\t\trepeat_weekly: \"Varje vecka\",\r\n\t\trepeat_monthly: \"Varje månad\",\r\n\t\trepeat_yearly: \"Varje år\",\r\n\t\trepeat_custom: \"Anpassad\",\r\n\t\trepeat_freq_day: \"Dag\",\r\n\t\trepeat_freq_week: \"Vecka\",\r\n\t\trepeat_freq_month: \"Månad\",\r\n\t\trepeat_freq_year: \"År\",\r\n\t\trepeat_on_date: \"På datum\",\r\n\t\trepeat_ends: \"Slutar\",\r\n\r\n\t\tmonth_for_recurring: [\"Januari\", \"Februari\", \"Mars\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"Augusti\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tday_for_recurring: [\"Söndag\", \"Måndag\", \"Tisdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lördag\"]\r\n\t}\r\n};\r\n","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Ocak\", \"Þubat\", \"Mart\", \"Nisan\", \"Mayýs\", \"Haziran\", \"Temmuz\", \"Aðustos\", \"Eylül\", \"Ekim\", \"Kasým\", \"Aralýk\"],\r\n\t\tmonth_short: [\"Oca\", \"Þub\", \"Mar\", \"Nis\", \"May\", \"Haz\", \"Tem\", \"Aðu\", \"Eyl\", \"Eki\", \"Kas\", \"Ara\"],\r\n\t\tday_full: [\"Pazar\", \"Pazartes,\", \"Salý\", \"Çarþamba\", \"Perþembe\", \"Cuma\", \"Cumartesi\"],\r\n\t\tday_short: [\"Paz\", \"Pts\", \"Sal\", \"Çar\", \"Per\", \"Cum\", \"Cts\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Bugün\",\r\n\t\tday_tab: \"Gün\",\r\n\t\tweek_tab: \"Hafta\",\r\n\t\tmonth_tab: \"Ay\",\r\n\t\tnew_event: \"Uygun\",\r\n\t\ticon_save: \"Kaydet\",\r\n\t\ticon_cancel: \"Ýptal\",\r\n\t\ticon_details: \"Detaylar\",\r\n\t\ticon_edit: \"Düzenle\",\r\n\t\ticon_delete: \"Sil\",\r\n\t\tconfirm_closing: \"\", //Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Etkinlik silinecek, devam?\",\r\n\t\tsection_description: \"Açýklama\",\r\n\t\tsection_time: \"Zaman aralýðý\",\r\n\t\tfull_day: \"Tam gün\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Tüm tekrar eden etkinlikler silinecek, devam?\",\r\n\t\tsection_recurring: \"Etkinliði tekrarla\",\r\n\t\tbutton_recurring: \"Pasif\",\r\n\t\tbutton_recurring_open: \"Aktif\",\r\n\t\tbutton_edit_series: \"Dizi düzenleme\",\r\n\t\tbutton_edit_occurrence: \"Bir kopyasını düzenleyin\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Ajanda\",\r\n\t\tdate: \"Tarih\",\r\n\t\tdescription: \"Açýklama\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Yýl\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Ajanda\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Izgara\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"Günlük\", //name=\"repeat\" value=\"day\"\r\n\t\trepeat_radio_week: \"Haftalık\", //name=\"repeat\" value=\"week\r\n\t\trepeat_radio_month: \"Aylık\",\r\n\t\trepeat_radio_year: \"Yıllık\",\r\n\t\trepeat_radio_day_type: \"Her\",\r\n\t\trepeat_text_day_count: \"gün\",\r\n\t\trepeat_radio_day_type2: \"Her iş günü\",\r\n\t\trepeat_week: \" Tekrar her\",\r\n\t\trepeat_text_week_count: \"hafta şu günlerde:\",\r\n\t\trepeat_radio_month_type: \"Tekrar et\",\r\n\t\trepeat_radio_month_start: \"Tarihinde\",\r\n\t\trepeat_text_month_day: \"gün her\",\r\n\t\trepeat_text_month_count: \"ay\",\r\n\t\trepeat_text_month_count2_before: \"her\",\r\n\t\trepeat_text_month_count2_after: \"ay\",\r\n\t\trepeat_year_label: \"Tarihinde\",\r\n\t\tselect_year_day2: \"ayın\",\r\n\t\trepeat_text_year_day: \"günü\",\r\n\t\tselect_year_month: \"ay\",\r\n\t\trepeat_radio_end: \"Bitiş tarihi yok\",\r\n\t\trepeat_text_occurences_count: \"olay\",\r\n\t\trepeat_radio_end2: \"Sonra\",\r\n\t\trepeat_radio_end3: \"Tarihinde bitir\",\r\n\r\n\t\trepeat_never: \"Asla\",\r\n\t\trepeat_daily: \"Her gün\",\r\n\t\trepeat_workdays: \"Her iş günü\",\r\n\t\trepeat_weekly: \"Her hafta\",\r\n\t\trepeat_monthly: \"Her ay\",\r\n\t\trepeat_yearly: \"Her yıl\",\r\n\t\trepeat_custom: \"Özel\",\r\n\t\trepeat_freq_day: \"Gün\",\r\n\t\trepeat_freq_week: \"Hafta\",\r\n\t\trepeat_freq_month: \"Ay\",\r\n\t\trepeat_freq_year: \"Yıl\",\r\n\t\trepeat_on_date: \"Tarihinde\",\r\n\t\trepeat_ends: \"Biter\",\r\n\r\n\t\tmonth_for_recurring: [\"Ocak\", \"Şubat\", \"Mart\", \"Nisan\", \"Mayıs\", \"Haziran\", \"Temmuz\", \"Ağustos\", \"Eylül\", \"Ekim\", \"Kasım\", \"Aralık\"],\r\n\t\tday_for_recurring: [\"Pazar\", \"Pazartesi\", \"Salı\", \"Çarşamba\", \"Perşembe\", \"Cuma\", \"Cumartesi\"]\r\n\t}\r\n};","export default {\r\n\tdate: {\r\n\t\tmonth_full: [\"Січень\", \"Лютий\", \"Березень\", \"Квітень\", \"Травень\", \"Червень\", \"Липень\", \"Серпень\", \"Вересень\", \"Жовтень\", \"Листопад\", \"Грудень\"],\r\n\t\tmonth_short: [\"Січ\", \"Лют\", \"Бер\", \"Кві\", \"Тра\", \"Чер\", \"Лип\", \"Сер\", \"Вер\", \"Жов\", \"Лис\", \"Гру\"],\r\n\t\tday_full: [\"Неділя\", \"Понеділок\", \"Вівторок\", \"Середа\", \"Четвер\", \"П'ятниця\", \"Субота\"],\r\n\t\tday_short: [\"Нед\", \"Пон\", \"Вів\", \"Сер\", \"Чет\", \"Птн\", \"Суб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tdhx_cal_today_button: \"Сьогодні\",\r\n\t\tday_tab: \"День\",\r\n\t\tweek_tab: \"Тиждень\",\r\n\t\tmonth_tab: \"Місяць\",\r\n\t\tnew_event: \"Нова подія\",\r\n\t\ticon_save: \"Зберегти\",\r\n\t\ticon_cancel: \"Відміна\",\r\n\t\ticon_details: \"Деталі\",\r\n\t\ticon_edit: \"Редагувати\",\r\n\t\ticon_delete: \"Вилучити\",\r\n\t\tconfirm_closing: \"\", //Ваші зміни втратяться. Ви впевнені ?\r\n\t\tconfirm_deleting: \"Подія вилучиться назавжди. Ви впевнені?\",\r\n\t\tsection_description: \"Опис\",\r\n\t\tsection_time: \"Часовий проміжок\",\r\n\t\tfull_day: \"Весь день\",\r\n\r\n\t\t/*recurring events*/\r\n\t\tconfirm_recurring: \"Хочете редагувати весь перелік повторюваних подій?\",\r\n\t\tsection_recurring: \"Повторювана подія\",\r\n\t\tbutton_recurring: \"Відключено\",\r\n\t\tbutton_recurring_open: \"Включено\",\r\n\t\tbutton_edit_series: \"Редагувати серію\",\r\n\t\tbutton_edit_occurrence: \"Редагувати примірник\",\r\n\r\n\t\t/*agenda view extension*/\r\n\t\tagenda_tab: \"Перелік\",\r\n\t\tdate: \"Дата\",\r\n\t\tdescription: \"Опис\",\r\n\r\n\t\t/*year view extension*/\r\n\t\tyear_tab: \"Рік\",\r\n\r\n\t\t/*week agenda view extension*/\r\n\t\tweek_agenda_tab: \"Перелік\",\r\n\r\n\t\t/*grid view extension*/\r\n\t\tgrid_tab: \"Таблиця\",\r\n\r\n\t\t/* touch tooltip*/\r\n\t\tdrag_to_create:\"Drag to create\",\r\n\t\tdrag_to_move:\"Drag to move\",\r\n\r\n\t\t/* dhtmlx message default buttons */\r\n\t\tmessage_ok:\"OK\",\r\n\t\tmessage_cancel:\"Cancel\",\r\n\r\n\t\t/* wai aria labels for non-text controls */\r\n\t\tnext: \"Next\",\r\n\t\tprev: \"Previous\",\r\n\t\tyear: \"Year\",\r\n\t\tmonth: \"Month\",\r\n\t\tday: \"Day\",\r\n\t\thour:\"Hour\",\r\n\t\tminute: \"Minute\",\r\n\r\n\t\t/* recurring event components */\r\n\t\trepeat_radio_day: \"День\",\r\n\t\trepeat_radio_week: \"Тиждень\",\r\n\t\trepeat_radio_month: \"Місяць\",\r\n\t\trepeat_radio_year: \"Рік\",\r\n\t\trepeat_radio_day_type: \"Кожний\",\r\n\t\trepeat_text_day_count: \"день\",\r\n\t\trepeat_radio_day_type2: \"Кожний робочий день\",\r\n\t\trepeat_week: \" Повторювати кожен\",\r\n\t\trepeat_text_week_count: \"тиждень , по:\",\r\n\t\trepeat_radio_month_type: \"Повторювати\",\r\n\t\trepeat_radio_month_start: \"\",\r\n\t\trepeat_text_month_day: \" числа кожний \",\r\n\t\trepeat_text_month_count: \"місяць\",\r\n\t\trepeat_text_month_count2_before: \"кожен \",\r\n\t\trepeat_text_month_count2_after: \"місяць\",\r\n\t\trepeat_year_label: \"\",\r\n\t\tselect_year_day2: \"\",\r\n\t\trepeat_text_year_day: \"день\",\r\n\t\tselect_year_month: \"\",\r\n\t\trepeat_radio_end: \"Без дати закінчення\",\r\n\t\trepeat_text_occurences_count: \"повторень\",\r\n\t\trepeat_radio_end3: \"До \",\r\n\t\trepeat_radio_end2: \"\",\r\n\r\n\t\trepeat_never: \"Ніколи\",\r\n\t\trepeat_daily: \"Щодня\",\r\n\t\trepeat_workdays: \"Щодня в робочі дні\",\r\n\t\trepeat_weekly: \"Щотижня\",\r\n\t\trepeat_monthly: \"Щомісяця\",\r\n\t\trepeat_yearly: \"Щороку\",\r\n\t\trepeat_custom: \"Налаштоване\",\r\n\t\trepeat_freq_day: \"День\",\r\n\t\trepeat_freq_week: \"Тиждень\",\r\n\t\trepeat_freq_month: \"Місяць\",\r\n\t\trepeat_freq_year: \"Рік\",\r\n\t\trepeat_on_date: \"На дату\",\r\n\t\trepeat_ends: \"Закінчується\",\r\n\r\n\t\tmonth_for_recurring: [\"січня\", \"лютого\", \"березня\", \"квітня\", \"травня\", \"червня\", \"липня\", \"серпня\", \"вересня\", \"жовтня\", \"листопада\", \"грудня\"],\r\n\t\tday_for_recurring: [\"Неділям\", \"Понеділкам\", \"Вівторкам\", \"Середам\", \"Четвергам\", \"П'ятницям\", \"Суботам\"]\r\n\t}\r\n};\r\n","import ar from \"./locale_ar\";\r\nimport be from \"./locale_be\";\r\nimport ca from \"./locale_ca\";\r\nimport cn from \"./locale_cn\";\r\nimport cs from \"./locale_cs\";\r\nimport da from \"./locale_da\";\r\nimport de from \"./locale_de\";\r\nimport el from \"./locale_el\";\r\nimport en from \"./locale_en\";\r\nimport es from \"./locale_es\";\r\nimport fi from \"./locale_fi\";\r\nimport fr from \"./locale_fr\";\r\nimport he from \"./locale_he\";\r\nimport hu from \"./locale_hu\";\r\nimport id from \"./locale_id\";\r\nimport it from \"./locale_it\";\r\nimport jp from \"./locale_jp\";\r\n\r\nimport LocaleManager from \"./locale_manager\";\r\n\r\nimport nb from \"./locale_nb\";\r\nimport nl from \"./locale_nl\";\r\nimport no from \"./locale_no\";\r\nimport pl from \"./locale_pl\";\r\nimport pt from \"./locale_pt\";\r\nimport ro from \"./locale_ro\";\r\nimport ru from \"./locale_ru\";\r\nimport si from \"./locale_si\";\r\nimport sk from \"./locale_sk\";\r\nimport sv from \"./locale_sv\";\r\nimport tr from \"./locale_tr\";\r\nimport ua from \"./locale_ua\";\r\n\r\nexport default function(){\r\n\treturn new LocaleManager({\r\n\t\ten,\r\n\t\tar,\r\n\t\tbe,\r\n\t\tca,\r\n\t\tcn,\r\n\t\tcs,\r\n\t\tda,\r\n\t\tde,\r\n\t\tel,\r\n\t\tes,\r\n\t\tfi,\r\n\t\tfr,\r\n\t\the,\r\n\t\thu,\r\n\t\tid,\r\n\t\tit,\r\n\t\tjp,\r\n\t\tnb,\r\n\t\tnl,\r\n\t\tno,\r\n\t\tpl,\r\n\t\tpt,\r\n\t\tro,\r\n\t\tru,\r\n\t\tsi,\r\n\t\tsk,\r\n\t\tsv,\r\n\t\ttr,\r\n\t\tua\r\n\t});\r\n}","import eventable from \"../utils/eventable\";\r\n\r\nexport class DatePicker {\r\n\tconstructor(scheduler, container, state = {}) {\r\n\t\tthis.state = {\r\n\t\t\tdate: new Date(),\r\n\t\t\tmodes: ['days', 'months', 'years'],\r\n\t\t\tcurrentRange: [],\r\n\t\t\teventDates: [],\r\n\t\t\tfilterDays: null,\r\n\t\t\tcurrentModeIndex: 0,\r\n\t\t\t...state\r\n\t\t};\r\n\t\tthis.container = null;\r\n\t\tthis.element = null;\r\n\t\tthis.onStateChangeHandlers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t\tthis._domEvents = scheduler._createDomEventScope();\r\n\t\tthis.state = this.getState();\r\n\t\teventable(this);\r\n\t\tif(container){\r\n\r\n\t\t\tthis.container = container;\r\n\t\t\tthis.render(this.container);\r\n\t\t}\r\n\r\n\t\tthis.onStateChange((oldState, newState) => {\r\n\t\t\tthis.callEvent(\"onStateChange\", [newState, oldState]);\r\n\t\t});\r\n\t}\r\n\r\n\tgetState() {\r\n\t\treturn { \r\n\t\t\t...this.state,\r\n\t\t\tmode: this.state.modes[this.state.currentModeIndex]\r\n\t\t};\r\n\t}\r\n\r\n\tsetState(newState) {\r\n\t\tconst oldState = { ...this.state };\r\n\t\tif(newState.mode){\r\n\t\t\tnewState.currentModeIndex = this.state.modes.indexOf(newState.mode);\r\n\t\t}\r\n\t\tthis.state = { ...this.state, ...newState };\r\n\r\n\t\tthis._notifyStateChange(oldState, this.state);\r\n\r\n\t\tif (this.container) {\r\n\t\t\tthis.render(this.container);\r\n\t\t}\r\n\t}\r\n\r\n\tonStateChange(handler) {\r\n\t\tthis.onStateChangeHandlers.push(handler);\r\n\r\n\t\t// function to remove the handler\r\n\t\treturn () => {\r\n\t\t\tconst index = this.onStateChangeHandlers.indexOf(handler);\r\n\t\t\tif (index !== -1) {\r\n\t\t\t\tthis.onStateChangeHandlers.splice(index, 1);\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\r\n\t_notifyStateChange(oldState, newState) {\r\n\t\tthis.onStateChangeHandlers.forEach(handler => handler(oldState, newState));\r\n\t}\r\n\r\n\t_adjustDate(direction) {\r\n\r\n\t\tconst {mode, date} = this.getState();\r\n\t\tconst newDate = new Date(date);\r\n\t\tif (mode === 'days') {\r\n\t\t\tnewDate.setMonth(date.getMonth() + direction);\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tnewDate.setFullYear(date.getFullYear() + direction);\r\n\t\t} else {\r\n\t\t\tnewDate.setFullYear(date.getFullYear() + direction * 10);\r\n\t\t}\r\n\t\tthis.setState({ date: newDate });\r\n\t}\r\n\r\n\t_toggleMode() {\r\n\t\tconst newIndex = (this.state.currentModeIndex + 1) % this.state.modes.length;\r\n\t\tthis.setState({ currentModeIndex: newIndex });\r\n\t}\r\n\r\n\t_renderCalendarHeader(container) {\r\n\t\tconst {mode, date} = this.getState();\r\n\r\n\t\tconst header = document.createElement('div');\r\n\t\theader.classList.add('dhx_cal_datepicker_header');\r\n\r\n\t\tconst backwardArrow = document.createElement('button');\r\n\r\n\t\tbackwardArrow.classList.add(\"dhx_cal_datepicker_arrow\", \"scheduler_icon\", \"arrow_left\");\r\n\t\theader.appendChild(backwardArrow);\r\n\r\n\t\tconst monthLabel = document.createElement('div');\r\n\t\tmonthLabel.classList.add('dhx_cal_datepicker_title');\r\n\r\n\t\tif (mode === 'days') {\r\n\t\t\tmonthLabel.innerText = date.toLocaleString('default', { month: 'long' }) + ' ' + date.getFullYear();\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tmonthLabel.innerText = date.getFullYear();\r\n\t\t} else {\r\n\t\t\tconst startYear = Math.floor(date.getFullYear() / 10) * 10;\r\n\t\t\tmonthLabel.innerText = `${startYear} - ${startYear + 9}`;\r\n\t\t}\r\n\r\n\t\tthis._domEvents.attach(monthLabel, \"click\", this._toggleMode.bind(this));\r\n\t\theader.appendChild(monthLabel);\r\n\r\n\t\tconst forwardArrow = document.createElement('button');\r\n\r\n\t\tforwardArrow.classList.add(\"dhx_cal_datepicker_arrow\", \"scheduler_icon\", \"arrow_right\");\r\n\t\theader.appendChild(forwardArrow);\r\n\r\n\t\tcontainer.appendChild(header);\r\n\r\n\t\tthis._domEvents.attach(backwardArrow, \"click\", this._adjustDate.bind(this, -1));\r\n\t\tthis._domEvents.attach(forwardArrow, \"click\", this._adjustDate.bind(this, 1));\r\n\t}\r\n\r\n\trender(container) {\r\n\t\tthis._domEvents.detachAll();\r\n\t\tthis.container = container || this.container; \r\n\t\tthis.container.innerHTML = '';\r\n\r\n\t\tif(!this.element){\r\n\t\t\tthis.element = document.createElement(\"div\");\r\n\t\t\tthis.element.classList.add(\"dhx_cal_datepicker\");\r\n\t\t}\r\n\t\tthis.element.innerHTML = '';\r\n\t\tthis.container.appendChild(this.element);\r\n\r\n\t\tthis._renderCalendarHeader(this.element);\r\n\t\tconst dataContainer = document.createElement(\"div\");\r\n\t\tdataContainer.classList.add(\"dhx_cal_datepicker_data\");\r\n\t\tthis.element.appendChild(dataContainer);\r\n\r\n\t\tconst {mode} = this.getState();\r\n\t\tif (mode === 'days') {\r\n\t\t\tthis._renderDayGrid(dataContainer);\r\n\t\t} else if (mode === 'months') {\r\n\t\t\tthis._renderMonthGrid(dataContainer);\r\n\t\t} else {\r\n\t\t\tthis._renderYearGrid(dataContainer);\r\n\t\t}\r\n\t}\r\n\r\n\t_renderDayGridHeader(daysOfWeekContainer) {\r\n\t\tconst {date, filterDays} = this.getState();\r\n\t\tconst scheduler = this.scheduler;\r\n\r\n\t\tlet currentDate = scheduler.date.week_start(new Date(date));\r\n\t\tconst maxDate = scheduler.date.add(scheduler.date.week_start(new Date(date)), 1, 'week');\r\n\r\n\t\tdaysOfWeekContainer.classList.add('dhx_cal_datepicker_days');\r\n\r\n\t\tconst labelFormat = scheduler.date.date_to_str(\"%D\");\r\n\r\n\t\twhile (currentDate.valueOf() < maxDate.valueOf()) {\r\n\t\t\tif(!(filterDays && filterDays(currentDate))){\r\n\t\t\t\tconst label = labelFormat(currentDate);\r\n\r\n\t\t\t\tconst dayElement = document.createElement('div');\r\n\t\t\t\tdayElement.setAttribute(\"data-day\", currentDate.getDay());\r\n\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_dayname');\r\n\t\t\t\tdayElement.innerText = label;\r\n\t\t\t\tdaysOfWeekContainer.appendChild(dayElement);\r\n\t\t\t}\r\n\r\n\t\t\tcurrentDate = scheduler.date.add(currentDate, 1, 'day');\r\n\t\t}\r\n\t}\r\n\r\n\t_weeksBetween(min, max) {\r\n\t\tconst scheduler = this.scheduler;\r\n\t\tlet weeks = 0;\r\n\t\tlet currWeek = new Date(min);\r\n\t\twhile(currWeek.valueOf() < max.valueOf()){\r\n\t\t\tweeks += 1;\r\n\t\t\tcurrWeek = scheduler.date.week_start(scheduler.date.add(currWeek, 1, \"week\"));\r\n\t\t}\r\n\t\treturn weeks;\r\n\t}\r\n\r\n\t_renderDayGrid(container) {\r\n\t\tconst {date, currentRange, eventDates, minWeeks, filterDays} = this.getState();\r\n\r\n\t\tlet minSchedulerDate = currentRange[0];\r\n\t\tlet maxSchedulerDate = currentRange[1];\r\n\r\n\t\tconst eventDaysTable = eventDates.reduce((acc, date) => {\r\n\t\t\tconst dayStart = this.scheduler.date.day_start(new Date(date));\r\n\t\t\tacc[dayStart.valueOf()] = true;\r\n\t\t\treturn acc;\r\n\t\t}, {});\r\n\r\n\r\n\t\t// Render Days of the Week\r\n\t\tconst daysOfWeekContainer = document.createElement('div');\r\n\t\tthis._renderDayGridHeader(daysOfWeekContainer);\r\n\t\tconst weekLength = daysOfWeekContainer.children.length;\r\n\t\tcontainer.appendChild(daysOfWeekContainer);\r\n\t\tif(weekLength !== 7){\r\n\t\t\tcontainer.style.setProperty(\"--dhx-scheduler-week-length\", weekLength);\r\n\t\t}\r\n\r\n\t\tconst scheduler = this.scheduler;\r\n\t\tconst firstDate = scheduler.date.week_start(scheduler.date.month_start(new Date(date)));\r\n\t\tconst monthStart = scheduler.date.month_start(new Date(date));\r\n\t\tconst monthEnd = scheduler.date.add(scheduler.date.month_start(new Date(date)), 1, 'month');\r\n\t\tlet lastDate = scheduler.date.add(scheduler.date.month_start(new Date(date)), 1, 'month');\r\n\t\tconst currentCalDate = scheduler.date.date_part(scheduler._currentDate());\r\n\t\tif(lastDate.getDay() !== 0){\r\n\t\t\tlastDate = scheduler.date.add(scheduler.date.week_start(lastDate), 1, \"week\");\r\n\t\t}\r\n\r\n\t\tlet weeks = this._weeksBetween(firstDate, lastDate);\r\n\t\tif(minWeeks && weeks < minWeeks){\r\n\t\t\tlastDate = scheduler.date.add(lastDate, (minWeeks - weeks), \"week\");\r\n\t\t}\r\n\r\n\t\tlet currDate = firstDate;\r\n\r\n\t\tconst dayGridContainer = document.createElement('div');\r\n\t\tdayGridContainer.classList.add('dhx_cal_datepicker_days');\r\n\r\n\t\tthis._domEvents.attach(dayGridContainer, \"click\", (event) => {\r\n\t\t\tconst dateCell = event.target.closest(\"[data-cell-date]\");\r\n\t\t\tconst date = new Date(dateCell.getAttribute(\"data-cell-date\"));\r\n\t\t\tthis.callEvent(\"onDateClick\", [date, event]);\r\n\t\t});\r\n\r\n\t\twhile(currDate.valueOf() < lastDate.valueOf()){\r\n\t\t\tif(!(filterDays && filterDays(currDate))){\r\n\r\n\t\t\t\tconst dayElement = document.createElement('div');\r\n\t\t\t\tdayElement.setAttribute(\"data-cell-date\", scheduler.templates.format_date(currDate));\r\n\t\t\t\tdayElement.setAttribute(\"data-day\", currDate.getDay());\r\n\t\t\t\tdayElement.innerHTML = currDate.getDate();\r\n\r\n\t\t\t\tif(currDate.valueOf() < monthStart.valueOf()){\r\n\t\t\t\t\tdayElement.classList.add('dhx_before');\r\n\t\t\t\t}else if(currDate.valueOf() >= monthEnd.valueOf()){\t\r\n\t\t\t\t\tdayElement.classList.add('dhx_after');\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(currDate.getDay() === 0 || currDate.getDay() === 6){\r\n\t\t\t\t\tdayElement.classList.add(\"dhx_cal_datepicker_weekend\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(currDate.valueOf() == currentCalDate.valueOf()){\r\n\t\t\t\t\tdayElement.classList.add(\"dhx_now\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(minSchedulerDate && maxSchedulerDate){\r\n\t\t\t\t\tif(currDate.valueOf() >= minSchedulerDate.valueOf() && currDate.valueOf() < maxSchedulerDate.valueOf()){\r\n\t\t\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(eventDaysTable[currDate.valueOf()]){\r\n\t\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_event');\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tdayElement.classList.add('dhx_cal_datepicker_date');\r\n\r\n\t\t\t\tdayGridContainer.appendChild(dayElement);\r\n\t\t\t}\r\n\t\t\tcurrDate = scheduler.date.add(currDate, 1, 'day');\r\n\t\t}\r\n\r\n\t\tcontainer.appendChild(dayGridContainer);\r\n\r\n\t}\r\n\r\n\t_renderMonthGrid(container) {\r\n\t\tconst {date} = this.getState();\r\n\r\n\t\tconst wrapper = document.createElement('div');\r\n\t\twrapper.classList.add(\"dhx_cal_datepicker_months\");\r\n\r\n\t\tconst months = [];\r\n\t\tfor(let i = 0; i < 12; i++){\r\n\t\t\tmonths.push(new Date(date.getFullYear(), i, 1));\r\n\t\t}\r\n\r\n\t\tconst formatLabel = this.scheduler.date.date_to_str(\"%M\");\r\n\t\tmonths.forEach(month => {\r\n\t\t\tconst monthElement = document.createElement('div');\r\n\t\t\tmonthElement.classList.add('dhx_cal_datepicker_month');\r\n\t\t\tif(date.getMonth() === month.getMonth()){\r\n\t\t\t\tmonthElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t}\r\n\t\t\tmonthElement.setAttribute(\"data-month\", month.getMonth());\r\n\t\t\tmonthElement.innerHTML = formatLabel(month);\r\n\t\t\tthis._domEvents.attach(monthElement, \"click\", () => {\r\n\t\t\t\tconst newDate = new Date(month);\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tdate: newDate,\r\n\t\t\t\t\tmode: 'days'\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\twrapper.appendChild(monthElement);\r\n\t\t});\r\n\t\tcontainer.appendChild(wrapper);\r\n\r\n\t\tconst doneArea = document.createElement(\"div\");\r\n\t\tdoneArea.classList.add(\"dhx_cal_datepicker_done\");\r\n\t\tconst doneBtn = document.createElement(\"button\");\r\n\t\tdoneBtn.innerText = \"Done\";\r\n\t\tdoneBtn.classList.add(\"dhx_cal_datepicker_done_btn\");\r\n\t\tthis._domEvents.attach(doneBtn, \"click\", () => {\r\n\t\t\tthis.setState({\r\n\t\t\t\tmode: 'days'\r\n\t\t\t});\r\n\t\t});\r\n\t\tdoneArea.appendChild(doneBtn);\r\n\t\tcontainer.appendChild(doneArea);\r\n\t}\r\n\r\n\t_renderYearGrid(container) {\r\n\t\tconst {date} = this.getState();\r\n\t\tconst startYear = Math.floor(date.getFullYear() / 10) * 10;\r\n\t\t\r\n\t\tconst wrapper = document.createElement('div');\r\n\t\twrapper.classList.add(\"dhx_cal_datepicker_years\");\r\n\t\tfor (let i = startYear - 1; i <= startYear + 10; i++) {\r\n\t\t\tconst yearElement = document.createElement('div');\r\n\t\t\tyearElement.innerText = i;\r\n\t\t\tyearElement.classList.add('dhx_cal_datepicker_year');\r\n\t\t\tyearElement.setAttribute(\"data-year\", i);\r\n\t\t\tif(date.getFullYear() === i){\r\n\t\t\t\tyearElement.classList.add('dhx_cal_datepicker_current');\r\n\t\t\t}\r\n\t\t\tthis._domEvents.attach(yearElement, \"click\", () => {\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tdate: new Date(i, date.getMonth(), 1),\r\n\t\t\t\t\tmode: 'months'\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\twrapper.appendChild(yearElement);\r\n\t\t\t\r\n\t\t}\r\n\t\tcontainer.appendChild(wrapper);\r\n\r\n\t\tconst doneArea = document.createElement(\"div\");\r\n\t\tdoneArea.classList.add(\"dhx_cal_datepicker_done\");\r\n\t\tconst doneBtn = document.createElement(\"button\");\r\n\t\tdoneBtn.innerText = \"Done\";\r\n\t\tdoneBtn.classList.add(\"dhx_cal_datepicker_done_btn\");\r\n\t\tthis._domEvents.attach(doneBtn, \"click\", () => {\r\n\t\t\tthis.setState({\r\n\t\t\t\tmode: 'months'\r\n\t\t\t});\r\n\t\t});\r\n\t\tdoneArea.appendChild(doneBtn);\r\n\t\tcontainer.appendChild(doneArea);\r\n\t}\r\n\r\n\tdestructor(){\r\n\t\tthis.onStateChangeHandlers = [];\r\n\t\tif(this.element){\r\n\t\t\tthis.element.innerHTML = '';\r\n\t\t\tthis.element.remove();\r\n\t\t}\r\n\r\n\t\tthis._domEvents.detachAll();\r\n\t\tthis.callEvent(\"onDestroy\", []);\r\n\t\tthis.detachAllEvents();\r\n\r\n\t\tthis.scheduler = null;\r\n\t}\r\n}","// import \"./css/dhtmlxscheduler_terrace\";\r\n// import \"./css/dhtmlxscheduler_material\";\r\n// import \"./css/dhtmlxscheduler_material_nofont\";\r\n// import \"./css/dhtmlxscheduler_flat\";\r\n// import \"./css/dhtmlxscheduler_contrast_black\";\r\n// import \"./css/dhtmlxscheduler_contrast_white\";\r\n\r\nimport addPlugins from \"./plugins\";\r\nimport stateProvider from \"./core/state\";\r\nimport assert from \"./core/common/assert\";\r\nimport common_errors from \"./core/common_errors\";\r\nimport connector from \"./core/connector\";\r\nimport schedulerCore from \"./core/scheduler\";\r\nimport common from \"./core/common\";\r\nimport wai_aria from \"./core/wai_aria\";\r\nimport utils from \"./core/utils/utils\";\r\nimport dom_helpers from \"./core/utils/dom_helpers\";\r\nimport env from \"./utils/env\";\r\nimport destructor from \"./core/destructor\";\r\nimport ajax from \"./core/utils/ajax\";\r\nimport base from \"./core/base\";\r\nimport config from \"./core/config\";\r\nimport event from \"./core/event\";\r\nimport event_highlight from \"./core/event_highlight\";\r\nimport load from \"./core/load\";\r\nimport lightbox from \"./core/lightbox\";\r\nimport touch from \"./core/touch\";\r\nimport dhtmlx_suite_hooks from \"./core/dhtmlx/dhtmlx_suite_hooks\";\r\nimport skins from \"./core/skins\";\r\nimport jquery from \"./core/jquery\";\r\nimport delay_render from \"./core/delay_render\";\r\nimport dataProcessorExtend from \"./core/dataprocessor/dataprocessor\";\r\nimport message from \"./core/message\";\r\nimport i18nFactory from \"./locale\";\r\n\r\nimport voidFirst from \"./publish_helpers/void_script_first\";\r\nimport voidSecond from \"./publish_helpers/void_script_second\";\r\nimport voidThird from \"./publish_helpers/void_script_third\";\r\n\r\n//import datepickerHeader from \"./core/clickable_header\";\r\n\r\nimport { DatePicker } from \"./core/datepicker\";\r\n\r\nexport default function(extensionManager) {\r\n\r\n\tconst scheduler = { version: VERSION };\r\n\t\r\n\tscheduler.$stateProvider = stateProvider();\r\n\r\n\tscheduler.getState = scheduler.$stateProvider.getState;\r\n\tcommon_errors(scheduler);\r\n\tcommon(scheduler);\r\n\tschedulerCore(scheduler);\r\n\twai_aria(scheduler);\r\n\t//utils(scheduler);\r\n\r\n\tscheduler.utils = utils;\r\n\tscheduler.$domHelpers = dom_helpers;\r\n\tscheduler.utils.dom = dom_helpers;\r\n\tscheduler.uid = utils.uid;\r\n\tscheduler.mixin = utils.mixin;\r\n\tscheduler.defined = utils.defined;\r\n\tscheduler.assert = assert(scheduler);\r\n\tscheduler.copy = utils.copy;\r\n\r\n\tscheduler._createDatePicker = function(container, config){\r\n\t\treturn new DatePicker(scheduler, container, config);\r\n\t};\r\n\r\n\t//datepickerHeader(scheduler);\r\n\r\n\r\n\t//old api compatibility\r\n\tscheduler._getFocusableNodes = dom_helpers.getFocusableNodes;\r\n\tscheduler._getClassName = dom_helpers.getClassName;\r\n\tscheduler._locate_css = dom_helpers.locateCss;\r\n\r\n\tconst messageApi = message(scheduler);\r\n\tscheduler.utils.mixin(scheduler, messageApi);\r\n\r\n\tscheduler.env = scheduler.$env = env;\r\n\tscheduler.Promise = window.Promise;\r\n\tdestructor(scheduler);\r\n\tajax(scheduler);\r\n\tvoidFirst(scheduler);\r\n\tbase(scheduler);\r\n\tconfig(scheduler);\r\n\tevent(scheduler);\r\n\tevent_highlight(scheduler);\r\n\tload(scheduler);\r\n\tlightbox(scheduler);\r\n\ttouch(scheduler);\r\n\tdhtmlx_suite_hooks(scheduler);\r\n\tvoidSecond(scheduler);\r\n\tskins(scheduler);\r\n\tjquery(scheduler);\r\n\tdelay_render(scheduler);\r\n\tdataProcessorExtend(scheduler);\r\n\tvoidThird(scheduler);\r\n\tconnector(scheduler);\r\n\tconst i18n = i18nFactory();\r\n\tscheduler.i18n = {\r\n\t\taddLocale: i18n.addLocale,\r\n\t\tsetLocale: function(locale){\r\n\t\t\tif(typeof locale === \"string\"){\r\n\t\t\t\tvar localeObject = i18n.getLocale(locale);\r\n\t\t\t\tif(!localeObject){\r\n\t\t\t\t\tlocaleObject = i18n.getLocale(\"en\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler.locale = localeObject;\r\n\t\t\t}else if(locale){\r\n\t\t\t\tif(!scheduler.locale){\r\n\t\t\t\t\tscheduler.locale = locale;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfor(var i in locale){\r\n\t\t\t\t\t\tif(locale[i] && typeof locale[i] === \"object\"){\r\n\t\t\t\t\t\t\tif(!scheduler.locale[i]){\r\n\t\t\t\t\t\t\t\tscheduler.locale[i] = {};\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tscheduler.mixin(scheduler.locale[i], locale[i], true);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tscheduler.locale[i] = locale[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar labels = scheduler.locale.labels;\r\n\t\t\tlabels.dhx_save_btn \t= labels.icon_save;\r\n\t\t\tlabels.dhx_cancel_btn \t= labels.icon_cancel;\r\n\t\t\tlabels.dhx_delete_btn \t= labels.icon_delete;\r\n\r\n\t\t\tif(scheduler.$container){\r\n\t\t\t\tscheduler.get_elements();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t},\r\n\t\tgetLocale: i18n.getLocale\r\n\t};\r\n\tscheduler.i18n.setLocale(\"en\");\r\n\taddPlugins(scheduler);\r\n\tscheduler.ext = {};\r\n\r\n\tconst activePlugins = {};\r\n\tscheduler.plugins = function(config){\r\n\t\tconst extensionList = getExtensionList(config, {\r\n\t\t\t\ttreetimeline: [\"timeline\"],\r\n\t\t\t\tdaytimeline: [\"timeline\"],\r\n\t\t\t\touterdrag: [\"legacy\"]\r\n\t\t\t}, {\r\n\t\t\t\tlegacy: 1,\r\n\t\t\t\tlimit: 1,\r\n\t\t\t\ttimeline: 2,\r\n\t\t\t\tdaytimeline: 3,\r\n\t\t\t\ttreetimeline: 3,\r\n\t\t\t\touterdrag:6\r\n\t\t\t});\r\n\r\n\t\textensionList.forEach(function(name){\r\n\t\t\tif(!activePlugins[name]){\r\n\t\t\t\tconst plugin = extensionManager.getExtension(name);\r\n\t\t\t\tif(plugin){\r\n\t\t\t\t\tplugin(scheduler);\r\n\t\t\t\t\tactivePlugins[name] = true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthrow new Error(\"unknown plugin \" + name);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n\r\n\tfunction getExtensionList(config, dependencies, priorities){\r\n\t\tconst result = [];\r\n\r\n\t\tfor(const i in config){\r\n\t\t\tif(config[i]){\r\n\t\t\t\tconst extension = i.toLowerCase();\r\n\t\t\t\tif(dependencies[extension]){\r\n\t\t\t\t\tdependencies[extension].forEach(function(dep){\r\n\t\t\t\t\t\tconst dependencyName = dep.toLowerCase();\r\n\t\t\t\t\t\tif(!config[dependencyName]){\r\n\t\t\t\t\t\t\tresult.push(dependencyName);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\tresult.push(extension);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tresult.sort(function(a, b){\r\n\t\t\tconst orderA = priorities[a] || 0;\r\n\t\t\tconst orderB = priorities[b] || 0;\r\n\t\t\tif(orderA > orderB){\r\n\t\t\t\treturn 1;\r\n\t\t\t}else if(orderA < orderB){\r\n\t\t\t\treturn -1;\r\n\t\t\t}else{\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\treturn scheduler;\r\n\r\n}","export default class ExtensionsManager{\r\n\tconstructor(config){\r\n\t\tthis._extensions = {};\r\n\t\tfor(const i in config){\r\n\t\t\tthis._extensions[i] = config[i];\r\n\t\t}\r\n\t}\r\n\r\n\taddExtension(name, ext) {\r\n\t\tthis._extensions[name] = ext;\r\n\t}\r\n\r\n\tgetExtension(name) {\r\n\t\treturn this._extensions[name];\r\n\t}\r\n}","\r\n\r\nimport dhtmlxHook from \"./dhtmlx_hook\";\r\nimport \"./css/theme.less\";\r\ndhtmlxHook();\r\n\r\nimport global from \"./global\";\r\n\r\nimport factoryMethod from \"./scheduler_factory_method\";\r\nimport ExtensionsManager from \"./ext/extension_manager\";\r\n\r\nclass SchedulerFactory {\r\n\r\n\tconstructor (extensions) {\r\n\t\tthis._seed = 0;\r\n\t\tthis._schedulerPlugins = [];\r\n\t\tthis._bundledExtensions = extensions;\r\n\t\tthis._extensionsManager = new ExtensionsManager(extensions);\r\n\t}\r\n\r\n\tplugin(code) {\r\n\t\tthis._schedulerPlugins.push(code);\r\n\r\n\t\tif(global.scheduler){\r\n\t\t\tcode(global.scheduler);\r\n\t\t}\r\n\t}\r\n\t\r\n\tgetSchedulerInstance(initConfig) {\r\n\t\tvar scheduler = factoryMethod(this._extensionsManager);\r\n\r\n\t\tfor (var i = 0; i < this._schedulerPlugins.length; i++) {\r\n\t\t\tthis._schedulerPlugins[i](scheduler);\r\n\t\t}\r\n\t\tscheduler._internal_id = this._seed++;\r\n\t\r\n\t\tif (this.$syncFactory){\r\n\t\t\tthis.$syncFactory(scheduler);\r\n\t\t}\r\n\r\n\t\tif(initConfig){\r\n\t\t\tthis._initFromConfig(scheduler, initConfig);\r\n\t\t}\r\n\r\n\t\treturn scheduler;\r\n\t}\r\n\r\n\t_initFromConfig(scheduler, initConfig){\r\n\t\tif(initConfig.plugins){\r\n\t\t\tscheduler.plugins(initConfig.plugins);\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.config){\r\n\t\t\tscheduler.mixin(scheduler.config, initConfig.config, true);\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.templates){\r\n\t\t\tscheduler.attachEvent(\"onTemplatesReady\", function(){\r\n\t\t\t\tscheduler.mixin(scheduler.templates, initConfig.templates, true);\r\n\t\t\t}, {once: true});\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.events){\r\n\t\t\tfor(const event in initConfig.events){\r\n\t\t\t\tscheduler.attachEvent(event, initConfig.events[event]);\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.locale){\r\n\t\t\tscheduler.i18n.setLocale(initConfig.locale);\r\n\t\t}\r\n\t\r\n\t\tif(Array.isArray(initConfig.calendars)){\r\n\t\t\tinitConfig.calendars.forEach(function(calendar){\r\n\t\t\t\tscheduler.addCalendar(calendar);\r\n\t\t\t});\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.container){\r\n\t\t\tscheduler.init(initConfig.container);\r\n\t\t} else {\r\n\t\t\tscheduler.init();\r\n\t\t}\r\n\t\r\n\t\tif(initConfig.data){\r\n\t\t\tif(typeof initConfig.data === \"string\"){\r\n\t\t\t\tscheduler.load(initConfig.data);\r\n\t\t\t}else{\r\n\t\t\t\tscheduler.parse(initConfig.data);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\r\n}\r\n\r\nexport default SchedulerFactory;","export default function(scheduler){\r\n\r\nscheduler.config.active_link_view = \"day\";\r\nscheduler._active_link_click = function(e){\r\n\tvar start = e.target;\r\n\tvar to = start.getAttribute(\"data-link-date\");\r\n\tvar s_d = scheduler.date.str_to_date(scheduler.config.api_date, false, true);\r\n\tif (to) {\r\n\t\tscheduler.setCurrentView(s_d(to), scheduler.config.active_link_view);\r\n\t\tif (e && e.preventDefault)\r\n\t\t\te.preventDefault();\r\n\t\treturn false;\r\n\t}\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar do_wrapper = function(key, fullname){\r\n\t\tfullname = fullname || (key+\"_scale_date\");\r\n\r\n\t\tif(!scheduler.templates['_active_links_old_'+ fullname]){\r\n\t\t\tscheduler.templates['_active_links_old_'+ fullname] = scheduler.templates[fullname];\r\n\t\t}\r\n\t\tvar week_x = scheduler.templates['_active_links_old_'+ fullname];\r\n\t\tvar d_s = scheduler.date.date_to_str(scheduler.config.api_date);\r\n\t\tscheduler.templates[fullname] = function(date) {\r\n\t\t\treturn \"\" + week_x(date) + \"\";\r\n\t\t};\r\n\t};\r\n\r\n\tdo_wrapper(\"week\");\r\n\tdo_wrapper(\"\", \"month_day\");\r\n\tif (this.matrix){\r\n\t\tfor (var key in this.matrix)\r\n\t\t\tdo_wrapper(key);\r\n\t}\r\n\r\n\tthis._detachDomEvent(this._obj, \"click\", scheduler._active_link_click);\r\n\tscheduler.event(this._obj, \"click\", scheduler._active_link_click);\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.date.add_agenda_legacy = function(date){\r\n\treturn scheduler.date.add(date, 1, \"year\");\r\n};\r\n\r\nscheduler.templates.agenda_legacy_time = function(start,end,ev){\r\n\tif (ev._timed)\r\n\t\treturn this.day_date(ev.start_date, ev.end_date, ev)+\" \"+this.event_date(start);\r\n\telse\r\n\t\treturn scheduler.templates.day_date(start)+\" – \"+scheduler.templates.day_date(end);\r\n};\r\nscheduler.templates.agenda_legacy_text = function(start,end,event){\r\n\treturn event.text;\r\n};\r\nscheduler.templates.agenda_legacy_date = function(){ return \"\"; };\r\n\r\nscheduler.date.agenda_legacy_start=function(){ return scheduler.date.date_part(scheduler._currentDate()); };\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function() {\r\n\tvar old_dblclick_dhx_cal_data = scheduler.dblclick_dhx_cal_data;\r\n\tscheduler.dblclick_dhx_cal_data = function() {\r\n\t\tif (this._mode == \"agenda_legacy\") {\r\n\t\t\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\t\t\tthis.addEventNow();\r\n\t\t} else {\r\n\t\t\tif (old_dblclick_dhx_cal_data)\r\n\t\t\t\treturn old_dblclick_dhx_cal_data.apply(this, arguments);\r\n\t\t}\r\n\t};\r\n\r\n\r\n\tvar old = scheduler.render_data;\r\n\tscheduler.render_data=function(evs){\r\n\t\tif (this._mode == \"agenda_legacy\")\r\n\t\t\tfill_agenda_tab();\r\n\t\telse\r\n\t\t\treturn old.apply(this,arguments);\r\n\t};\r\n\r\n\tvar old_render_view_data = scheduler.render_view_data;\r\n\tscheduler.render_view_data = function(){\r\n\t\tif(this._mode == \"agenda_legacy\") {\r\n\t\t\tscheduler._agendaScrollTop = scheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop;\r\n\t\t\tscheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop = 0;\r\n\t\t}\r\n\t\treturn old_render_view_data.apply(this,arguments);\r\n\t};\r\n\r\n\r\n\r\n\tfunction set_full_view(mode){\r\n\t\tif (mode){\r\n\t\t\tvar l = scheduler.locale.labels;\r\n\r\n\t\t\tvar rowAttr = scheduler._waiAria.agendaHeadAttrString();\r\n\t\t\tvar dateHeader = scheduler._waiAria.agendaHeadDateString(l.date);\r\n\t\t\tvar descriptionHeader = scheduler._waiAria.agendaHeadDescriptionString(l.description);\r\n\r\n\t\t\tscheduler._els[\"dhx_cal_header\"][0].innerHTML=\"
\" +\r\n\t\t\t\t\"
\"+l.date+\"
\" +\r\n\t\t\t\t\"\"+l.description+\"\" +\r\n\t\t\t\t\"
\";\r\n\t\t\tscheduler._table_view=true;\r\n\t\t\tscheduler.set_sizes();\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fill_agenda_tab(){\r\n\t\t//select events for which data need to be printed\r\n\r\n\t\tvar events = scheduler.get_visible_events();\r\n\t\tevents.sort(function(a,b){ return a.start_date>b.start_date?1:-1;});\r\n\r\n\t\tvar tableAttr = scheduler._waiAria.agendaDataAttrString();\r\n\t\tvar agendaEventAttrString;\r\n\t\t//generate html for the view\r\n\t\tvar html=\"
\";\r\n\t\tfor (var i=0; i
\"+\r\n\t\t\t\t\t(scheduler.config.rtl ? scheduler.templates.agenda_time(ev.end_date,ev.start_date, ev):scheduler.templates.agenda_time(ev.start_date, ev.end_date,ev))+\r\n\t\t\t\t\t\"
\";\r\n\t\t\thtml+=`
\r\n\t\t\t\r\n\t\t\t
`;\r\n\t\t\thtml+=\"\"+scheduler.templates.agenda_text(ev.start_date, ev.end_date, ev)+\"
\";\r\n\t\t}\r\n\t\thtml+=\"
\";\r\n\r\n\t\t//render html\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].childNodes[0].scrollTop = scheduler._agendaScrollTop||0;\r\n\r\n\t\t// setting up dhx_v_border size\r\n\t\tvar agenda_area = scheduler._els[\"dhx_cal_data\"][0].childNodes[0];\r\n\t\tvar v_border = agenda_area.childNodes[agenda_area.childNodes.length-1];\r\n\t\tv_border.style.height = (agenda_area.offsetHeight < scheduler._els[\"dhx_cal_data\"][0].offsetHeight) ? \"100%\" : (agenda_area.offsetHeight+\"px\");\r\n\r\n\t\tvar t=scheduler._els[\"dhx_cal_data\"][0].firstChild.childNodes;\r\n\r\n\t\tvar dateElement = scheduler._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML=scheduler.templates.agenda_date(scheduler._min_date, scheduler._max_date, scheduler._mode);\r\n\t\t}\r\n\r\n\t\tscheduler._rendered=[];\r\n\t\tfor (var i=0; i < t.length-1; i++)\r\n\t\t\tscheduler._rendered[i]=t[i];\r\n\r\n\t}\r\n\r\n\tscheduler.agenda_legacy_view=function(mode){\r\n\t\tscheduler._min_date = scheduler.config.agenda_start||scheduler.date.agenda_legacy_start(scheduler._date);\r\n\t\tscheduler._max_date = scheduler.config.agenda_end||scheduler.date.add_agenda_legacy(scheduler._min_date, 1);\r\n\r\n\t\tset_full_view(mode);\r\n\t\tif (mode){\r\n\t\t\tscheduler._cols = null;\r\n\t\t\tscheduler._colsS = null;\r\n\t\t\tscheduler._table_view = true;\r\n\t\t\t//agenda tab activated\r\n\t\t\tfill_agenda_tab();\r\n\t\t} else {\r\n\t\t\tscheduler._table_view = false;\r\n\t\t\t//agenda tab de-activated\r\n\t\t}\r\n\t};\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.date.add_agenda = function(date, inc){\r\n\t\treturn scheduler.date.add(date, 1*inc, \"month\");\r\n\t};\r\n\t\r\n\tscheduler.templates.agenda_time = function(start,end,ev){\r\n\t\tif (ev._timed){\r\n\t\t\treturn `${this.event_date(start)} - ${this.event_date(end)}`;\r\n\t\t}else{\r\n\t\t\treturn scheduler.locale.labels.full_day;\r\n\t\t}\r\n\t};\r\n\tscheduler.templates.agenda_text = function(start,end,ev){\r\n\t\treturn ev.text;\r\n\t};\r\n\r\n\tconst dayDateToStr = scheduler.date.date_to_str(\"%F %j\");\r\n\tconst dayDowToStr = scheduler.date.date_to_str(\"%l\");\r\n\r\n\tscheduler.templates.agenda_day = function(date){ \r\n\t\treturn `
${dayDateToStr(date)}
\r\n\t\t
${dayDowToStr(date)}
`;\r\n\t};\r\n\tscheduler.templates.agenda_date = function(start, end){ \r\n\t\treturn scheduler.templates.month_date(scheduler.getState().date); \r\n\t};\r\n\t\r\n\tscheduler.date.agenda_start=function(date){\r\n\t\treturn scheduler.date.month_start(new Date(date));\r\n\t};\r\n\r\n\tlet scrollTop = 0;\r\n\t\r\n\tscheduler.attachEvent(\"onTemplatesReady\",function() {\r\n\t\tvar old_dblclick_dhx_cal_data = scheduler.dblclick_dhx_cal_data;\r\n\t\tscheduler.dblclick_dhx_cal_data = function() {\r\n\t\t\tif (this._mode == \"agenda\") {\r\n\t\t\t\tif (!this.config.readonly && this.config.dblclick_create)\r\n\t\t\t\t\tthis.addEventNow();\r\n\t\t\t} else {\r\n\t\t\t\tif (old_dblclick_dhx_cal_data)\r\n\t\t\t\t\treturn old_dblclick_dhx_cal_data.apply(this, arguments);\r\n\t\t\t}\r\n\t\t};\r\n\t\r\n\t\r\n\t\tvar old = scheduler.render_data;\r\n\t\tscheduler.render_data=function(evs){\r\n\t\t\tif (this._mode == \"agenda\")\r\n\t\t\t\tfill_agenda_tab();\r\n\t\t\telse\r\n\t\t\t\treturn old.apply(this,arguments);\r\n\t\t};\r\n\t\r\n\t\tvar old_render_view_data = scheduler.render_view_data;\r\n\t\tscheduler.render_view_data = function(){\r\n\t\t\tif(this._mode == \"agenda\") {\r\n\t\t\t\tscrollTop = scheduler._els[\"dhx_cal_data\"][0].scrollTop;\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = 0;\r\n\t\t\t}\r\n\t\t\treturn old_render_view_data.apply(this,arguments);\r\n\t\t};\r\n\r\n\t\tfunction fill_agenda_tab(){\r\n\t\t\tconst events = scheduler.get_visible_events();\r\n\t\t\tevents.sort(function(a,b){ return a.start_date>b.start_date?1:-1;});\r\n\r\n\t\t\tconst eventsInDays = {};\r\n\t\t\tlet currDate = scheduler.getState().min_date;\r\n\t\t\tconst maxDate = scheduler.getState().max_date;\r\n\t\t\twhile(currDate.valueOf() < maxDate.valueOf()){\r\n\t\t\t\teventsInDays[currDate.valueOf()] = [];\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\r\n\t\t\tlet anyEvents = false;\r\n\r\n\t\t\tevents.forEach((ev) => {\r\n\t\t\t\tlet eventStart = scheduler.date.day_start(new Date(ev.start_date)); \r\n\t\t\t\twhile (eventStart.valueOf() < ev.end_date.valueOf()) {\r\n\t\t\t\t\tif (eventsInDays[eventStart.valueOf()]) {\r\n\t\t\t\t\t\teventsInDays[eventStart.valueOf()].push(ev);\r\n\t\t\t\t\t\tanyEvents = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\teventStart = scheduler.date.day_start(scheduler.date.add(eventStart, 1, \"day\"));\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif(!anyEvents){\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = renderEmptyView();\r\n\t\t\t}else{\r\n\t\t\t\tlet html = \"\";\r\n\t\t\t\tfor(let day in eventsInDays){\r\n\t\t\t\t\tif(scheduler.ignore_agenda && scheduler.ignore_agenda(new Date(day*1))){\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\thtml += renderDay(new Date(day*1), eventsInDays[day]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = scrollTop;\r\n\t\t\t\r\n\t\t\tlet t = scheduler._els[\"dhx_cal_data\"][0].querySelectorAll(\".dhx_cal_agenda_event_line\");\r\n\t\t\tscheduler._rendered = [];\r\n\t\t\tfor (var i = 0; i < t.length - 1; i++) {\r\n\t\t\t\tscheduler._rendered[i] = t[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\r\n\r\n\t\tfunction renderEmptyView(){\r\n\t\t\treturn `
${scheduler.locale.labels.agenda_tab}
`;\r\n\t\t}\r\n\r\n\t\tfunction renderDay(day, events) {\r\n\t\t\tif(!events.length){\r\n\t\t\t\treturn \"\";\r\n\t\t\t}\r\n\t\t\tlet html = `\r\n
\r\n\t
${scheduler.templates.agenda_day(day)}
\r\n\t
\r\n`;\r\n\r\n\t\t\tevents.forEach((calendarEvent) => {\r\n\t\t\t\thtml += renderOneEvent(day, calendarEvent);\r\n\t\t\t});\r\n\r\n\t\t\thtml += `
`;\r\n\t\t\treturn html;\r\n\t\t}\r\n\r\n\t\tfunction renderOneEvent(day, calendarEvent){\r\n\t\t\tconst dates = scheduler.templates.agenda_time(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\t\t\tconst selectedId = scheduler.getState().select_id;\r\n\t\t\tconst cls = scheduler.templates.event_class(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\t\t\tconst description = scheduler.templates.agenda_text(calendarEvent.start_date, calendarEvent.end_date, calendarEvent);\r\n\r\n\t\t\tlet style = \"\";\r\n\t\t\tif(calendarEvent.color || calendarEvent.textColor){\r\n\t\t\t\tconst bg = (calendarEvent.color ? (\"--dhx-scheduler-event-background:\" + calendarEvent.color + \";\") : \"\");\r\n\t\t\t\tconst color = (calendarEvent.textColor ? (\"--dhx-scheduler-event-color:\" + calendarEvent.textColor + \";\") : \"\");\r\n\t\t\t\tstyle = ` style=\"${bg}${color}\" `;\r\n\t\t\t}\r\n\r\n\t\t\treturn `
\r\n\t
\r\n\t
${dates}
\r\n\t
${description}
\r\n
`;\r\n\t\t}\r\n\t\r\n\t\tscheduler.agenda_view=function(mode){\r\n\t\t\tif (mode){\r\n\t\t\t\tscheduler._min_date = scheduler.config.agenda_start || scheduler.date.agenda_start(scheduler._date);\r\n\t\t\t\tscheduler._max_date = scheduler.config.agenda_end || scheduler.date.add_agenda(scheduler._min_date, 1);\r\n\t\t\t\tscheduler._cols = null;\r\n\t\t\t\tscheduler._colsS = null;\r\n\t\t\t\tscheduler._table_view = true;\r\n\r\n\t\t\t\tconst dateHeader = scheduler._getNavDateElement();\r\n\t\t\t\tdateHeader.innerHTML = scheduler.templates.agenda_date(scheduler._date);\r\n\t\t\t\t//agenda tab activated\r\n\t\t\t\tfill_agenda_tab();\r\n\t\t\t} else {\r\n\t\t\t\tscheduler._table_view = false;\r\n\t\t\t\t//agenda tab de-activated\r\n\t\t\t}\r\n\t\t};\r\n\t});\r\n\r\n\t// scheduler.attachEvent(\"onEventSelected\", function(id){\r\n\t// \tconst oldSelected = scheduler.$container.querySelectorAll(\".dhx_cal_agenda_event_line_selected\");\r\n\t// \toldSelected.forEach((el) => {\r\n\t// \t\tel.classList.remove(\"dhx_cal_agenda_event_line_selected\");\r\n\t// \t});\r\n\r\n\t// \tconst selected = scheduler.$container.querySelector(`[${scheduler.config.event_attribute}=\"${id}\"]`);\r\n\t// \tif(selected){\r\n\t// \t\tselected.classList.add(\"dhx_cal_agenda_event_line_selected\");\r\n\t// \t}\r\n\t// });\r\n\t\r\n\t\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.config.all_timed = \"short\";\r\n\tscheduler.config.all_timed_month = false;\r\n\r\n\tvar is_event_short = function (ev) {\r\n\t\tif(!((ev.end_date - ev.start_date)/(1000*60*60) >= 24)){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t// short event shouldn't disappear to multiday area during dnd-resize\r\n\t\tif(scheduler._drag_mode == \"resize\" && scheduler._drag_id == ev.id){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn \tfalse;\r\n\t};\r\n\r\n\t// copy of usual events and recurring instances;\r\n\t// regular copy causes problems with recurrings which have series event as a prototype\r\n\tscheduler._safe_copy = function(event){\r\n\t\tvar proto = null,\r\n\t\t\tcopy = scheduler._copy_event(event);\r\n\t\tif(event.event_pid){\r\n\t\t\tproto = scheduler.getEvent(event.event_pid);\r\n\t\t}\r\n\r\n\t\tif (proto && proto.isPrototypeOf(event)) {\r\n\t\t\tdelete copy.event_length;\r\n\t\t\tdelete copy.event_pid;\r\n\t\t\tdelete copy.rec_pattern;\r\n\t\t\tdelete copy.rec_type;\r\n\t\t}\r\n\r\n\t\treturn copy;\r\n\t};\r\n\r\n\tvar old_prerender_events_line = scheduler._pre_render_events_line;\r\n\tvar old_prerender_events_table = scheduler._pre_render_events_table;\r\n\r\n\tvar prerender_events = function (evs, hold) {\r\n\t\tif (!this._table_view) {\r\n\t\t\treturn old_prerender_events_line.call(this, evs, hold);\r\n\t\t}\r\n\r\n\t\treturn old_prerender_events_table.call(this, evs, hold);\r\n\t};\r\n\r\n\tscheduler._pre_render_events_line = scheduler._pre_render_events_table = function(evs, hold){\r\n\t\tif (!this.config.all_timed ||\r\n\t\t\t(this._table_view && this._mode != \"month\") ||\r\n\t\t\t(this._mode == \"month\" && !this.config.all_timed_month))\r\n\t\t\treturn prerender_events.call(this, evs, hold);\r\n\r\n\t\tfor (var i=0; i < evs.length; i++) {\r\n\t\t\tvar ev=evs[i];\r\n\r\n\t\t\tif (ev._timed)\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tif (this.config.all_timed == \"short\") {\r\n\t\t\t\tif (!is_event_short(ev)) {\r\n\t\t\t\t\tif (this._mode != \"month\") {\r\n\t\t\t\t\t\tevs.splice(i--, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar ce = this._safe_copy(ev); // current event (event for one specific day) is copy of original with modified dates\r\n\t\t\tif(!ev._virtual){\r\n\t\t\t\tce._first_chunk = true;\r\n\t\t\t}else{\r\n\t\t\t\tce._first_chunk = false;\r\n\t\t\t}\r\n\t\t\tce._drag_resize = false;\r\n\t\t\tce._virtual = true;\r\n\t\t\tce.start_date = new Date(ce.start_date); // as lame copy doesn't copy date objects\r\n\r\n\t\t\tif (!isOvernightEvent(ev)) {\r\n\t\t\t\tce.end_date = new Date(ev.end_date);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tce.end_date = getNextDay(ce.start_date);\r\n\t\t\t\tif (this.config.last_hour != 24) { // if specific last_hour was set (e.g. 20)\r\n\t\t\t\t\tce.end_date = setDateTime(ce.start_date, this.config.last_hour);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar event_changed = false;\r\n\t\t\tif (ce.start_date < this._max_date && ce.end_date > this._min_date && ce.start_date < ce.end_date) {\r\n\t\t\t\tevs[i] = ce; // adding another event in collection\r\n\t\t\t\tevent_changed = true;\r\n\t\t\t}\r\n\t\t//\tif (ce.start_date > ce.end_date) {\r\n\t\t//\t\tevs.splice(i--,1);\r\n\t\t//\t}\r\n\r\n\t\t\tvar re = this._safe_copy(ev); // remaining event, copy of original with modified start_date (making range more narrow)\r\n\t\t\tre._virtual = true;\r\n\t\t\tre.end_date = new Date(re.end_date);\r\n\t\t\tif (re.start_date < this._min_date)\r\n\t\t\t\tre.start_date = setDateTime(this._min_date, this.config.first_hour);// as we are starting only with whole hours\r\n\t\t\telse\r\n\t\t\t\tre.start_date = setDateTime(getNextDay(ev.start_date), this.config.first_hour);\r\n\r\n\t\t\tif (re.start_date < this._max_date && re.start_date < re.end_date) {\r\n\t\t\t\tif (event_changed){\r\n\t\t\t\t\tevs.splice(i+1,0,re);//insert part\r\n\t\t\t\t}else {\r\n\t\t\t\t\tevs[i--] = re;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tre._last_chunk = false;\r\n\t\t\t}else{\r\n\t\t\t\tce._last_chunk = true;\r\n\t\t\t\tce._drag_resize = true;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// in case of all_timed pre_render is not applied to the original event\r\n\t\t// so we need to force redraw in case of dnd\r\n\t\tvar redraw = (this._drag_mode == 'move')?false:hold;\r\n\t\treturn prerender_events.call(this, evs, redraw);\r\n\r\n\r\n\t\tfunction isOvernightEvent(ev){\r\n\t\t\tvar next_day = getNextDay(ev.start_date);\r\n\t\t\treturn (+ev.end_date > +next_day);\r\n\t\t}\r\n\t\tfunction getNextDay(date){\r\n\t\t\tvar next_day = scheduler.date.add(date, 1, \"day\");\r\n\t\t\tnext_day = scheduler.date.date_part(next_day);\r\n\t\t\treturn next_day;\r\n\t\t}\r\n\t\tfunction setDateTime(date, hours){\r\n\t\t\tvar val = scheduler.date.date_part(new Date(date));\r\n\t\t\tval.setHours(hours);\r\n\t\t\treturn val;\r\n\t\t}\r\n\t};\r\n\tvar old_get_visible_events = scheduler.get_visible_events;\r\n\tscheduler.get_visible_events = function(only_timed){\r\n\t\tif (!(this.config.all_timed && this.config.multi_day))\r\n\t\t\treturn old_get_visible_events.call(this, only_timed);\r\n\t\treturn old_get_visible_events.call(this, false); // only timed = false\r\n\t};\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function (old_mode, old_date, mode, date) {\r\n\t\tscheduler._allow_dnd = (mode == \"day\" || mode == \"week\" || scheduler.getView(mode));\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler._is_main_area_event = function(ev){\r\n\t\treturn !!(ev._timed || this.config.all_timed === true || (this.config.all_timed == \"short\" && is_event_short(ev)) );\r\n\t};\r\n\r\n\tvar oldUpdate = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id){\r\n\t\t// full redraw(update_render=true) messes events order while dnd.\r\n\t\t// individual redraw(update_render=false) of multiday event, which happens on select/unselect, expands event to full width of the cell and can be fixes only with full redraw.\r\n\t\t// so for now full redraw is always enabled for not-dnd updates\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tvar fullRedrawNeeded;\r\n\t\tvar initial;\r\n\t\tif(ev) {\r\n\t\t\tfullRedrawNeeded = (scheduler.config.all_timed && !(scheduler.isOneDayEvent(scheduler._events[id]) || scheduler.getState().drag_id));\r\n\t\t\tif (fullRedrawNeeded) {\r\n\t\t\t\tinitial = scheduler.config.update_render;\r\n\t\t\t\tscheduler.config.update_render = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\toldUpdate.apply(scheduler, arguments);\r\n\r\n\t\tif(ev) {\r\n\t\t\tif (fullRedrawNeeded) {\r\n\t\t\t\tscheduler.config.update_render = initial;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\r\nvar temp_section;\r\nvar before;\r\n\r\nscheduler.config.collision_limit = 1;\r\n\r\nfunction _setTempSection(event_id) { // for custom views (matrix, timeline, units)\r\n\tvar checked_mode = scheduler._get_section_view();\r\n\tif(checked_mode && event_id){\r\n\t\ttemp_section = scheduler.getEvent(event_id)[scheduler._get_section_property()];\r\n\t}\r\n}\r\n\r\nscheduler.attachEvent(\"onBeforeDrag\",function(id){\r\n\t_setTempSection(id);\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onBeforeLightbox\",function(id){\r\n\tvar ev = scheduler.getEvent(id);\r\n\tbefore = [ev.start_date, ev.end_date];\r\n\t_setTempSection(id);\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventChanged\",function(id){\r\n\tif (!id || !scheduler.getEvent(id)) return true;\r\n\tvar ev = scheduler.getEvent(id);\r\n\tif (!scheduler.checkCollision(ev)){\r\n\t\tif (!before) return false;\r\n\t\tev.start_date = before[0];\r\n\t\tev.end_date = before[1];\r\n\t\tev._timed=this.isOneDayEvent(ev);\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onBeforeEventChanged\",function(ev,e,is_new){\r\n\treturn scheduler.checkCollision(ev);\r\n});\r\nscheduler.attachEvent(\"onEventAdded\",function(id,ev) {\r\n\tvar result = scheduler.checkCollision(ev);\r\n\tif (!result)\r\n\t\tscheduler.deleteEvent(id);\r\n});\r\nscheduler.attachEvent(\"onEventSave\",function(id, edited_ev, is_new){\r\n\tedited_ev = scheduler._lame_clone(edited_ev);\r\n\tedited_ev.id = id;\r\n\r\n\t//lightbox may not have 'time' section\r\n\tif(!(edited_ev.start_date && edited_ev.end_date)){\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tedited_ev.start_date = new Date(ev.start_date);\r\n\t\tedited_ev.end_date = new Date(ev.end_date);\r\n\t}\r\n\r\n\tif((edited_ev.rrule && !edited_ev.recurring_event_id) || edited_ev.rec_type){\r\n\t\tscheduler._roll_back_dates(edited_ev);\r\n\t}\r\n\treturn scheduler.checkCollision(edited_ev); // in case user creates event on one date but then edited it another\r\n});\r\n\r\nscheduler._check_sections_collision = function(first, second){\r\n\tvar map_to = scheduler._get_section_property();\r\n\tif (first[map_to] == second[map_to] && first.id != second.id)\r\n\t\treturn true;\r\n\treturn false;\r\n};\r\n\r\nscheduler.checkCollision = function(ev) {\r\n\tvar evs = [];\r\n\tvar collision_limit = scheduler.config.collision_limit;\r\n\r\n\tif (ev.rrule || ev.rec_type) {\r\n\t\tvar evs_dates = scheduler.getRecDates(ev);\r\n\t\tfor(var k=0; k= collision_limit) {\r\n\r\n\t\t\tsingle = false;\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tif ( evs.length >= collision_limit )\r\n\t\t\tsingle = false;\r\n\t}\r\n\tif (!single) {\r\n\t\tvar res = !scheduler.callEvent(\"onEventCollision\",[ev,evs]);\r\n\t\tif (!res) {\r\n\t\t\tev[map_to] = temp_section||ev[map_to]; // from _setTempSection for custom views\r\n\t\t}\r\n\t\treturn res;\r\n\t}\r\n\treturn single;\r\n\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\tscheduler.config.container_autoresize = true;\r\n\tscheduler.config.month_day_min_height = 90;\r\n\tscheduler.config.min_grid_size = 25;\r\n\tscheduler.config.min_map_size = 400;\r\n\r\n\tvar old_pre_render_event = scheduler._pre_render_events;\r\n\r\n\t//need for temporary disabling without modifying public config\r\n\tvar active = true;\r\n\tvar total_height = 0;\r\n\tvar multiday_height = 0;\r\n\r\n\tscheduler._pre_render_events = function(evs, hold) {\r\n\t\tif (!(scheduler.config.container_autoresize && active)) {\r\n\t\t\treturn old_pre_render_event.apply(this, arguments);\r\n\t\t}\r\n\r\n\t\tvar hb = this.xy.bar_height;\r\n\t\tvar h_old = this._colsS.heights;\r\n\t\tvar h = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0];\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tif (!this._table_view)\r\n\t\t\tevs = this._pre_render_events_line(evs, hold); //ignore long events for now\r\n\t\telse\r\n\t\t\tevs = this._pre_render_events_table(evs, hold);\r\n\r\n\t\tif (this._table_view) {\r\n\t\t\tif (hold){\r\n\t\t\t\tthis._colsS.heights = h_old;\r\n\t\t\t} else {\r\n\t\t\t\tvar evl = data.firstChild;\r\n\t\t\t\tconst rows = evl.querySelectorAll(\".dhx_cal_month_row\");\r\n\t\t\t\tif (rows && rows.length) {\r\n\t\t\t\t\tfor (var i = 0; i < rows.length; i++) {\r\n\t\t\t\t\t\th[i]++;\r\n\r\n\t\t\t\t\t\tif ((h[i]) * hb > this._colsS.height - this.xy.month_head_height) { // 22 - height of cell's header\r\n\t\t\t\t\t\t\t//we have overflow, update heights\r\n\t\t\t\t\t\t\tvar cells = rows[i].querySelectorAll(\".dhx_cal_month_cell\");\r\n\r\n\t\t\t\t\t\t\tvar cHeight = this._colsS.height - this.xy.month_head_height;\r\n\t\t\t\t\t\t\tif(this.config.max_month_events*1 !== this.config.max_month_events || h[i] <= this.config.max_month_events){\r\n\t\t\t\t\t\t\t\tcHeight = h[i] * hb;\r\n\t\t\t\t\t\t\t}else if( (this.config.max_month_events + 1) * hb > this._colsS.height - this.xy.month_head_height){\r\n\t\t\t\t\t\t\t\tcHeight = (this.config.max_month_events + 1) * hb;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\trows[i].style.height = (cHeight + this.xy.month_head_height) + \"px\";\r\n\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\tfor (var j = 0; j < cells.length; j++) {\r\n\t\t\t\t\t\t\t\tcells[j].childNodes[1].style.height = cHeight + \"px\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\th[i] = (h[i - 1] || 0) + cells[0].offsetHeight;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\th[i] = (h[i - 1] || 0) + rows[i].querySelectorAll(\".dhx_cal_month_cell\")[0].offsetHeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t\th.unshift(0);\r\n\t\t\t\t\tif (evl.parentNode.offsetHeight < evl.parentNode.scrollHeight && !evl._h_fix) {\r\n\t\t\t\t\t\t//we have v-scroll, decrease last day cell\r\n\r\n\t\t\t\t\t\t// NO CHECK SHOULD BE MADE ON VERTICAL SCROLL\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!evs.length && this._els[\"dhx_multi_day\"][0].style.visibility == \"visible\")\r\n\t\t\t\t\t\th[0] = -1;\r\n\t\t\t\t\tif (evs.length || h[0] == -1) {\r\n\t\t\t\t\t\t//shift days to have space for multiday events\r\n\t\t\t\t\t\t//var childs = evl.parentNode.childNodes;\r\n\t\t\t\t\t\tvar dh = ((h[0] + 1) * hb + 1); // +1 so multiday events would have 2px from top and 2px from bottom by default\r\n\t\t\t\t\t\tif(multiday_height != dh + 1) {\r\n\t\t\t\t\t\t\tthis._obj.style.height = (total_height - multiday_height + dh - 1) + \"px\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tdh += \"px\";\r\n\t\t\t\t\t\tconst navHeight = this._els[\"dhx_cal_navline\"][0].offsetHeight;\r\n\t\t\t\t\t\tconst headerHeight = this._els[\"dhx_cal_header\"][0].offsetHeight;\r\n\t\t\t\t\t\tdata.style.height = (this._obj.offsetHeight - navHeight - headerHeight - (this.xy.margin_top || 0)) + 'px';\r\n\t\t\t\t\t\tvar last = this._els[\"dhx_multi_day\"][0];\r\n\t\t\t\t\t\tlast.style.height = dh;\r\n\t\t\t\t\t\tlast.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\t\tlast.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\t\t\t\t\t\tlast = this._els[\"dhx_multi_day\"][1];\r\n\t\t\t\t\t\tlast.style.height = dh;\r\n\t\t\t\t\t\tlast.style.visibility = (h[0] == -1 ? \"hidden\" : \"visible\");\r\n\t\t\t\t\t\tlast.style.display = (h[0] == -1 ? \"none\" : \"\");\r\n\r\n\t\t\t\t\t\tlast.className = h[0] ? \"dhx_multi_day_icon\" : \"dhx_multi_day_icon_small\";\r\n\t\t\t\t\t\tthis._dy_shift = (h[0] + 1) * hb;\r\n\t\t\t\t\t\th[0] = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn evs;\r\n\t};\r\n\r\n\tvar checked_divs = [\"dhx_cal_navline\", \"dhx_cal_header\", \"dhx_multi_day\", \"dhx_cal_data\"];\r\n\tvar updateContainterHeight = function(is_repaint) {\r\n\t\ttotal_height = 0;\r\n\t\tfor (var i = 0; i < checked_divs.length; i++) {\r\n\r\n\t\t\tvar className = checked_divs[i];\r\n\t\t\tvar checked_div = (scheduler._els[className]) ? scheduler._els[className][0] : null;\r\n\t\t\tvar height = 0;\r\n\t\t\tswitch (className) {\r\n\t\t\t\tcase \"dhx_cal_navline\":\r\n\t\t\t\tcase \"dhx_cal_header\":\r\n\t\t\t\t\theight = checked_div.offsetHeight;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"dhx_multi_day\":\r\n\t\t\t\t\theight = (checked_div) ? checked_div.offsetHeight - 1 : 0;\r\n\t\t\t\t\tmultiday_height = height;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"dhx_cal_data\":\r\n\t\t\t\t\tvar mode = scheduler.getState().mode;\r\n\r\n\t\t\t\t\tif(checked_div.childNodes[1] && mode != \"month\") {\r\n\t\t\t\t\t\tlet maxHeight = 0;\r\n\t\t\t\t\t\tfor(let i = 0; i < checked_div.childNodes.length; i++){\r\n\t\t\t\t\t\t\tif(checked_div.childNodes[i].offsetHeight > maxHeight){\r\n\t\t\t\t\t\t\t\tmaxHeight = checked_div.childNodes[i].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\theight = maxHeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\theight = Math.max(checked_div.offsetHeight - 1, checked_div.scrollHeight);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (mode == \"month\") {\r\n\t\t\t\t\t\tif (scheduler.config.month_day_min_height && !is_repaint) {\r\n\t\t\t\t\t\t\tvar rows_length = checked_div.querySelectorAll(\".dhx_cal_month_row\").length;\r\n\t\t\t\t\t\t\theight = rows_length * scheduler.config.month_day_min_height;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (is_repaint) {\r\n\t\t\t\t\t\t\tchecked_div.style.height = height + \"px\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (mode == \"year\"){\r\n\t\t\t\t\t\theight = 190 * scheduler.config.year_y;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(mode == \"agenda\"){\r\n\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\tif(checked_div.childNodes && checked_div.childNodes.length){\r\n\t\t\t\t\t\t\tfor(var j = 0; j < checked_div.childNodes.length; j++){\r\n\t\t\t\t\t\t\t\theight += checked_div.childNodes[j].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(height + 2 < scheduler.config.min_grid_size){\r\n\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (mode == \"week_agenda\"){\r\n\t\t\t\t\t\tvar min_height = scheduler.xy.week_agenda_scale_height + scheduler.config.min_grid_size,\r\n\t\t\t\t\t\t\tcur_height;\r\n\r\n\t\t\t\t\t\tvar column;\r\n\t\t\t\t\t\tfor(var k = 0; k < checked_div.childNodes.length; k++){\r\n\t\t\t\t\t\t\tcolumn = checked_div.childNodes[k];\r\n\t\t\t\t\t\t\tfor(var j = 0; j < column.childNodes.length; j++) {\r\n\t\t\t\t\t\t\t\tvar innerHeight = 0,\r\n\t\t\t\t\t\t\t\t\teventsContainer = column.childNodes[j].childNodes[1];\r\n\r\n\t\t\t\t\t\t\t\tfor(var g =0; g < eventsContainer.childNodes.length; g++){\r\n\t\t\t\t\t\t\t\t\tinnerHeight += eventsContainer.childNodes[g].offsetHeight;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tcur_height = innerHeight + scheduler.xy.week_agenda_scale_height;\r\n\t\t\t\t\t\t\t\tcur_height = (k == 1 && (j == 2 || j == 3)) ? cur_height * 2 : cur_height; // for last two cells;\r\n\r\n\t\t\t\t\t\t\t\tif (cur_height > min_height) {\r\n\t\t\t\t\t\t\t\t\tmin_height = cur_height;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\theight = min_height * 3;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(mode == \"map\") {\r\n\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\tvar evs = checked_div.querySelectorAll(\".dhx_map_line\");\r\n\r\n\t\t\t\t\t\tfor (var j = 0; j < evs.length; j++) {\r\n\t\t\t\t\t\t\theight += evs[j].offsetHeight;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (height + 2 < scheduler.config.min_map_size) {\r\n\t\t\t\t\t\t\theight = scheduler.config.min_map_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(scheduler._gridView) {\r\n\t\t\t\t\t\theight = 0;\r\n\r\n\t\t\t\t\t\tif (checked_div.childNodes[1].childNodes[0].childNodes && checked_div.childNodes[1].childNodes[0].childNodes.length) {\r\n\t\t\t\t\t\t\tvar evs = checked_div.childNodes[1].childNodes[0].childNodes[0].childNodes;\r\n\r\n\t\t\t\t\t\t\tfor (var j = 0; j < evs.length; j++) {\r\n\t\t\t\t\t\t\t\theight += evs[j].offsetHeight;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\theight += 2;\r\n\r\n\t\t\t\t\t\t\tif(height < scheduler.config.min_grid_size){\r\n\t\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\theight = scheduler.config.min_grid_size;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (scheduler.matrix && scheduler.matrix[mode]) {\r\n\t\t\t\t\t\tif (is_repaint) {\r\n\t\t\t\t\t\t\theight += 0;\r\n\t\t\t\t\t\t\tchecked_div.style.height = height + \"px\";\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\theight = 0;\r\n\t\t\t\t\t\t\tvar cfg = scheduler.matrix[mode];\r\n\t\t\t\t\t\t\tvar rows = cfg.y_unit;\r\n\t\t\t\t\t\t\tfor(var r=0; r < rows.length; r++){\r\n\t\t\t\t\t\t\t\theight += cfg.getSectionHeight(rows[r].key);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// Check and add extra height to avoid events hiding by the horizontal scrollbar\r\n\t\t\t\t\t\t\tif(scheduler.$container.clientWidth != scheduler.$container.scrollWidth){\r\n\t\t\t\t\t\t\t\theight += getScrollSize();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\theight -= 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (mode == \"day\" || mode == \"week\" || (scheduler._props && scheduler._props[mode])) {\r\n\t\t\t\t\t\theight += 2;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\theight += 1;\r\n\t\t\ttotal_height += height;\r\n\t\t}\r\n\t\tscheduler._obj.style.height = (total_height) + \"px\";\r\n\r\n\t\tif (!is_repaint)\r\n\t\t\tscheduler.updateView();\r\n\t};\r\n\r\n\tfunction callUpdate(){\r\n\t\tactive = false;\r\n\t\tscheduler.callEvent(\"onAfterSchedulerResize\", []);\r\n\t\tactive = true;\r\n\t}\r\n\r\n\tvar conditionalUpdateContainerHeight = function() {\r\n\t\tif(!(scheduler.config.container_autoresize && active))\r\n\t\t\treturn true;\r\n\r\n\t\tvar mode = scheduler.getState().mode;\r\n\r\n\t\tif(!mode) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tvar asyncRepaint = window.requestAnimationFrame || window.setTimeout;\r\n\t\tvar scrollTop = document.documentElement.scrollTop;\r\n\r\n\t\tasyncRepaint(function() {\r\n\t\t\tif(scheduler.$destroyed || !scheduler.$initialized){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tupdateContainterHeight();\r\n\t\t});\r\n\r\n\t\tif ( (scheduler.matrix && scheduler.matrix[mode]) || mode == \"month\") {\r\n\t\t\tasyncRepaint(function() {\r\n\t\t\t\tif(scheduler.$destroyed || !scheduler.$initialized){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tupdateContainterHeight(true);\r\n\t\t\t\tdocument.documentElement.scrollTop = scrollTop;\r\n\t\t\t\tcallUpdate();\r\n\t\t\t}, 1);\r\n\t\t}else{\r\n\t\t\tcallUpdate();\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function(){\r\n\t\tvar autosizeEnabled = scheduler.config.container_autoresize;\r\n\t\tif(!scheduler.xy.$original_scroll_width){\r\n\t\t\tscheduler.xy.$original_scroll_width = scheduler.xy.scroll_width;\r\n\t\t}\r\n\r\n\t\tscheduler.xy.scroll_width = autosizeEnabled ? 0 : scheduler.xy.$original_scroll_width;\r\n\r\n\t\tif(scheduler.matrix){\r\n\t\t\tfor(var i in scheduler.matrix){\r\n\t\t\t\tvar timeline = scheduler.matrix[i];\r\n\t\t\t\tif(!timeline.$original_section_autoheight){\r\n\t\t\t\t\ttimeline.$original_section_autoheight = timeline.section_autoheight;\r\n\t\t\t\t}\r\n\t\t\t\tif(autosizeEnabled){\r\n\t\t\t\t\ttimeline.section_autoheight = false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\ttimeline.section_autoheight = timeline.$original_section_autoheight;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onXLE\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventChanged\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventCreated\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventAdded\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onEventDeleted\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onAfterSchedulerResize\", conditionalUpdateContainerHeight);\r\n\tscheduler.attachEvent(\"onClearAll\", conditionalUpdateContainerHeight);\r\n\r\n\t//disable container autoresize when expanded\r\n\tscheduler.attachEvent(\"onBeforeExpand\", function(){\r\n\t\tactive = false;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeCollapse\", function(){\r\n\t\tactive = true;\r\n\t\treturn true;\r\n\t});\r\n\t// helper function\r\n\tfunction getScrollSize() {\r\n\t\tvar div = document.createElement(\"div\");\r\n\t\tdiv.style.cssText = \"visibility:hidden;position:absolute;left:-1000px;width:100px;padding:0px;margin:0px;height:110px;min-height:100px;overflow-y:scroll;\";\r\n\r\n\t\tdocument.body.appendChild(div);\r\n\t\tvar size = div.offsetWidth - div.clientWidth;\r\n\t\tdocument.body.removeChild(div);\r\n\t\treturn size;\r\n\t}\r\n\r\n\r\n}","export default function(scheduler){\r\n\tfunction setCookie(name,cookie_param,value) {\r\n\t\tvar str = name + \"=\" + value + (cookie_param?(\"; \"+cookie_param):\"\");\r\n\t\tdocument.cookie = str;\r\n\t}\r\n\tfunction getCookie(name) {\r\n\t\tvar search = name + \"=\";\r\n\t\tif (document.cookie.length > 0) {\r\n\t\t\tvar offset = document.cookie.indexOf(search);\r\n\t\t\tif (offset != -1) {\r\n\t\t\t\toffset += search.length;\r\n\t\t\t\tvar end = document.cookie.indexOf(\";\", offset);\r\n\t\t\t\tif (end == -1)\r\n\t\t\t\t\tend = document.cookie.length;\r\n\t\t\t\treturn document.cookie.substring(offset, end);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}\r\n\r\n\tfunction getCookieName(scheduler) {\r\n\t\treturn (scheduler._obj.id || \"scheduler\") + \"_settings\";\r\n\t}\r\n\r\n\tvar first = true;\r\n\tscheduler.attachEvent(\"onBeforeViewChange\",function(oldMode,oldDate,mode,date){\r\n\t\t// if Url plugin is enabled - explicit url values should have more priority than cookies\r\n\t\tif (first && scheduler._get_url_nav){\r\n\t\t\tvar urlNavigationPlugin = scheduler._get_url_nav();\r\n\t\t\tif(urlNavigationPlugin.date || urlNavigationPlugin.mode || urlNavigationPlugin.event){\r\n\t\t\t\tfirst = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar cookie = getCookieName(scheduler);\r\n\r\n\t\tif (first){\r\n\t\t\tfirst = false;\r\n\t\t\tvar schedulerCookie = getCookie(cookie);\r\n\t\t\tif (schedulerCookie){\r\n\r\n\t\t\t\tif(!scheduler._min_date){\r\n\t\t\t\t\t//otherwise scheduler will have incorrect date until timeout\r\n\t\t\t\t\t//it can cause js error with 'onMouseMove' handler of key_nav.js\r\n\t\t\t\t\tscheduler._min_date = date;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tschedulerCookie = unescape(schedulerCookie).split(\"@\");\r\n\t\t\t\tschedulerCookie[0] = this._helpers.parseDate(schedulerCookie[0]);\r\n\t\t\t\tvar view = this.isViewExists(schedulerCookie[1]) ? schedulerCookie[1] : mode,\r\n\t\t\t\t\tdate = !isNaN(+schedulerCookie[0]) ? schedulerCookie[0] : date;\r\n\r\n\t\t\t\twindow.setTimeout(function(){\r\n\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tscheduler.setCurrentView(date,view);\r\n\t\t\t\t},1);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", function (newMode , newDate){\r\n\t\tvar cookie = getCookieName(scheduler);\r\n\t\tvar text = escape(this._helpers.formatDate(newDate)+\"@\"+(newMode));\r\n\t\tsetCookie(cookie,\"expires=Sun, 31 Jan 9999 22:00:00 GMT\",text);\r\n\t});\r\n\r\n\t// As we are blocking first render above there could be a problem in case of dynamic loading and rendering of visible data in general ('from'/'to' won't be defined)\r\n\tvar old_load = scheduler._load;\r\n\tscheduler._load = function() {\r\n\t\tvar args = arguments;\r\n\r\n\t\tif (!scheduler._date) {\r\n\t\t\tvar that = this;\r\n\t\t\twindow.setTimeout(function() {\r\n\t\t\t\told_load.apply(that, args);\r\n\t\t\t},1);\r\n\t\t} else {\r\n\t\t\told_load.apply(this, args);\r\n\t\t}\r\n\t};\r\n}","export default {\r\n\talert: (extension, assert) => {\r\n\t\tassert(false, `The ${extension} extension is not included in this version of dhtmlxScheduler.
\r\n\t\tYou may need a Professional version of the component.
\r\n\t\tContact us at https://dhtmlx.com/docs/contact.shtml if you have any questions.`);\r\n\t}\r\n};","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Day Timeline\", scheduler.assert);\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Drag Between\", scheduler.assert);\r\n}","export default function(scheduler){\r\n/* global dhtmlXCombo */\r\nscheduler.form_blocks['combo']={\r\n\trender:function(sns) {\r\n\t\tif (!sns.cached_options)\r\n\t\t\tsns.cached_options = {};\r\n\t\tvar res = '';\r\n\t\tres += \"
\";\r\n\t\treturn res;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\t(function(){\r\n\t\t\tresetCombo();\r\n\t\t\tvar id = scheduler.attachEvent(\"onAfterLightbox\",function(){\r\n\t\t\t\t// otherwise destructor will never be called after form reset(e.g. in readonly event mode)\r\n\t\t\t\tresetCombo();\r\n\t\t\t\tscheduler.detachEvent(id);\r\n\t\t\t});\r\n\t\t\tfunction resetCombo(){\r\n\t\t\t\tif(node._combo && node._combo.DOMParent) {\r\n\t\t\t\t\tvar combo = node._combo;\r\n\t\t\t\t\tif(combo.unload){\r\n\t\t\t\t\t\tcombo.unload();\r\n\t\t\t\t\t}else if(combo.destructor){\r\n\t\t\t\t\t\tcombo.destructor();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// dhtmlxCombo 4.1.0 bug\r\n\t\t\t\t\tcombo.DOMParent = combo.DOMelem = null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})();\r\n\t\twindow.dhx_globalImgPath = config.image_path||'/';\r\n\t\tnode._combo = new dhtmlXCombo(node, config.name, node.offsetWidth-8);\r\n\t\tif (config.onchange)\r\n\t\t\tnode._combo.attachEvent(\"onChange\", config.onchange);\r\n\r\n\t\tif (config.options_height)\r\n\t\t\tnode._combo.setOptionHeight(config.options_height);\r\n\t\tvar combo = node._combo;\r\n\t\tcombo.enableFilteringMode(config.filtering, config.script_path||null, !!config.cache);\r\n\r\n\t\tif (!config.script_path) { // script-side filtration is used\r\n\t\t\tvar all_options = [];\r\n\t\t\tfor (var i = 0; i < config.options.length; i++) {\r\n\t\t\t\tvar option = config.options[i];\r\n\t\t\t\tvar single_option = [\r\n\t\t\t\t\toption.key,\r\n\t\t\t\t\toption.label,\r\n\t\t\t\t\toption.css\r\n\t\t\t\t];\r\n\t\t\t\tall_options.push(single_option);\r\n\t\t\t}\r\n\t\t\tcombo.addOption(all_options);\r\n\t\t\tif (ev[config.map_to]) {\r\n\t\t\t\tvar index = combo.getIndexByValue(ev[config.map_to]);\r\n\t\t\t\tcombo.selectOption(index);\r\n\t\t\t}\r\n\t\t} else { // server-side filtration is used\r\n\t\t\tvar selected_id = ev[config.map_to];\r\n\t\t\tif (selected_id) {\r\n\t\t\t\tif (config.cached_options[selected_id]) {\r\n\t\t\t\t\tcombo.addOption(selected_id, config.cached_options[selected_id]);\r\n\t\t\t\t\tcombo.disable(1);\r\n\t\t\t\t\tcombo.selectOption(0);\r\n\t\t\t\t\tcombo.disable(0);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tscheduler.ajax.get(config.script_path+\"?id=\"+selected_id+\"&uid=\"+scheduler.uid(), function(result){\r\n\t\t\t\t\t\tvar responseText = result.xmlDoc.responseText;\r\n\t\t\t\t\t\tvar label;\r\n\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\tvar res = JSON.parse(responseText);\r\n\t\t\t\t\t\t\tlabel = res.options[0].text;\r\n\t\t\t\t\t\t}catch(e){\r\n\t\t\t\t\t\t\tvar option = scheduler.ajax.xpath(\"//option\", result.xmlDoc)[0];\r\n\t\t\t\t\t\t\tlabel = option.childNodes[0].nodeValue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tconfig.cached_options[selected_id] = label;\r\n\t\t\t\t\t\tcombo.addOption(selected_id, label);\r\n\t\t\t\t\t\tcombo.disable(1);\r\n\t\t\t\t\t\tcombo.selectOption(0);\r\n\t\t\t\t\t\tcombo.disable(0);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tcombo.setComboValue(\"\");\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config) {\r\n\t\tvar selected_id = node._combo.getSelectedValue(); // value = key\r\n\t\tif (config.script_path) {\r\n\t\t\tconfig.cached_options[selected_id] = node._combo.getSelectedText();\r\n\t\t}\r\n\t\treturn selected_id;\r\n\t},\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\nscheduler.form_blocks['radio']={\r\n\trender:function(sns) {\r\n\t\tvar res = '';\r\n\t\tres += `
`;\r\n\t\tfor (var i=0; i\"+\" \"+sns.options[i].label+\"\";\r\n\t\t}\r\n\t\tres += \"
\";\r\n\r\n\t\treturn res;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\tvar radiobuttons = node.getElementsByTagName('input');\r\n\t\tfor (var i = 0; i < radiobuttons.length; i++) {\r\n\t\t\tradiobuttons[i].checked = false;\r\n\t\t\tvar checked_value = ev[config.map_to]||value;\r\n\t\t\tif (radiobuttons[i].value == checked_value) {\r\n\t\t\t\tradiobuttons[i].checked = true;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tvar radiobuttons = node.getElementsByTagName('input');\r\n\t\tfor(var i=0; i
';\r\n\t\telse\r\n\t\t\treturn '';\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\t\tnode=scheduler._lightbox.querySelector(`#${config.id}`);\r\n\t\tvar id = scheduler.uid();\r\n\t\tvar isChecked = (typeof config.checked_value != \"undefined\") ? value == config.checked_value : !!value;\r\n\t\tnode.className += \" dhx_cal_checkbox\";\r\n\t\tvar check_html = \"\";\r\n\t\tvar label_html = \"\";\r\n\t\tif (scheduler.config.wide_form){\r\n\t\t\tnode.innerHTML = label_html;\r\n\t\t\tnode.nextSibling.innerHTML=check_html;\r\n\t\t} else\r\n\t\t\tnode.innerHTML=check_html+label_html;\r\n\r\n\t\tif (config.handler) {\r\n\t\t\tvar checkbox = node.getElementsByTagName('input')[0];\r\n\t\t\tif(checkbox.$_eventAttached){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tcheckbox.$_eventAttached = true;\r\n\t\t\tscheduler.event(checkbox, \"click\", config.handler);\r\n\t\t\t//checkbox.onclick = config.handler;\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tnode=scheduler._lightbox.querySelector(`#${config.id}`);\r\n\t\tvar checkbox = node.getElementsByTagName('input')[0]; // moved to the header\r\n\t\tif (!checkbox)\r\n\t\t\tcheckbox = node.nextSibling.getElementsByTagName('input')[0];\r\n\t\treturn (checkbox.checked)?(config.checked_value||true):(config.unchecked_value||false);\r\n\t},\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.ext.fullscreen = {\r\n\ttoggleIcon: null\r\n};\r\n\r\nscheduler.expand = function() {\r\n\tif(!scheduler.callEvent(\"onBeforeExpand\", []))\r\n\t\treturn;\r\n\tvar t = scheduler._obj;\r\n\tdo {\r\n\t\tt._position = t.style.position || \"\";\r\n\t\tt.style.position = \"static\";\r\n\t} while ((t = t.parentNode) && t.style);\r\n\tt = scheduler._obj;\r\n\tt.style.position = \"absolute\";\r\n\tt._width = t.style.width;\r\n\tt._height = t.style.height;\r\n\tt.style.width = t.style.height = \"100%\";\r\n\tt.style.top = t.style.left = \"0px\";\r\n\r\n\tvar top = document.body;\r\n\ttop.scrollTop = 0;\r\n\r\n\ttop = top.parentNode;\r\n\tif (top)\r\n\t\ttop.scrollTop = 0;\r\n\tdocument.body._overflow = document.body.style.overflow || \"\";\r\n\tdocument.body.style.overflow = \"hidden\";\r\n\tscheduler._maximize();\r\n\tscheduler.callEvent(\"onExpand\", []);\r\n};\r\nscheduler.collapse = function() {\r\n\tif(!scheduler.callEvent(\"onBeforeCollapse\", []))\r\n\t\treturn;\r\n\tvar t = scheduler._obj;\r\n\tdo {\r\n\t\tt.style.position = t._position;\r\n\t} while ((t = t.parentNode) && t.style);\r\n\tt = scheduler._obj;\r\n\tt.style.width = t._width;\r\n\tt.style.height = t._height;\r\n\tdocument.body.style.overflow = document.body._overflow;\r\n\tscheduler._maximize();\r\n\tscheduler.callEvent(\"onCollapse\", []);\r\n};\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar t = document.createElement(\"div\");\r\n\tt.className = \"dhx_expand_icon\";\r\n\tscheduler.ext.fullscreen.toggleIcon = t;\r\n\tt.innerHTML = `\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t`;\r\n\tscheduler._obj.appendChild(t);\r\n\tscheduler.event(t, \"click\", function() {\r\n\t\tif (!scheduler.expanded)\r\n\t\t\tscheduler.expand(); else\r\n\t\t\tscheduler.collapse();\r\n\t});\r\n});\r\nscheduler._maximize = function() {\r\n\tthis.expanded = !this.expanded;\r\n\tif(this.expanded){\r\n\t\tthis.ext.fullscreen.toggleIcon.classList.add(\"dhx_expand_icon--expanded\");\r\n\t\t\r\n\t}else{\r\n\t\tthis.ext.fullscreen.toggleIcon.classList.remove(\"dhx_expand_icon--expanded\");\r\n\t}\r\n\t\r\n\t//scheduler.ext.fullscreen.toggleIcon.style.backgroundPosition = \"0 \" + (this.expanded ? \"0\" : \"18\") + \"px\";\r\n\r\n\tvar directions = ['left', 'top'];\r\n\tfor (var i = 0; i < directions.length; i++) {\r\n\t\t//var margin = scheduler.xy['margin_' + directions[i]];\r\n\t\tvar prev_margin = scheduler['_prev_margin_' + directions[i]];\r\n\t\tif (scheduler.xy['margin_' + directions[i]]) {\r\n\t\t\tscheduler['_prev_margin_' + directions[i]] = scheduler.xy['margin_' + directions[i]];\r\n\t\t\tscheduler.xy['margin_' + directions[i]] = 0;\r\n\t\t} else {\r\n\t\t\tif (prev_margin) {\r\n\t\t\t\tscheduler.xy['margin_' + directions[i]] = scheduler['_prev_margin_' + directions[i]];\r\n\t\t\t\tdelete scheduler['_prev_margin_' + directions[i]];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.setCurrentView();\r\n};\r\n\r\n\r\n}\r\n","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Grid\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\tvar els = document.body.getElementsByTagName(\"DIV\");\r\n\tfor (var i=0; i < els.length; i++) {\r\n\t\tvar cs = els[i].className||\"\";\r\n\t\tcs = cs.split(\":\");\r\n\t\tif (cs.length == 2 && cs[0] == \"template\"){\r\n\t\t\tvar code = \"return \\\"\"+(els[i].innerHTML||\"\").replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g,\"\\\\\\\"\").replace(/[\\n\\r]+/g,\"\")+\"\\\";\";\r\n\t\t\tcode = unescape(code).replace(/\\{event\\.([a-z]+)\\}/g,function(all,mask){\r\n\t\t\t\treturn '\"+ev.'+mask+'+\"';\r\n\t\t\t});\r\n\t\t\tscheduler.templates[cs[1]]=Function(\"start\",\"end\",\"ev\",code);\r\n\t\t\tels[i].style.display='none';\r\n\t\t}\r\n\t}\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.shortcuts = {\r\n\tcreateCommand: function(){\r\n\t\treturn {\r\n\t\t\tmodifiers:{\r\n\t\t\t\t\"shift\": false,\r\n\t\t\t\t\"alt\": false,\r\n\t\t\t\t\"ctrl\": false,\r\n\t\t\t\t\"meta\": false\r\n\t\t\t},\r\n\t\t\tkeyCode: null\r\n\t\t};\r\n\t},\r\n\tparse: function(shortcut){\r\n\t\tvar commands = [];\r\n\r\n\t\tvar expr = this.getExpressions(this.trim(shortcut));\r\n\t\tfor(var i = 0; i < expr.length; i++){\r\n\t\t\tvar words = this.getWords(expr[i]);\r\n\r\n\t\t\tvar command = this.createCommand();\r\n\r\n\t\t\tfor(var j = 0; j < words.length; j++){\r\n\t\t\t\tif(this.commandKeys[words[j]]){\r\n\t\t\t\t\tcommand.modifiers[words[j]] = true;\r\n\t\t\t\t}else if(this.specialKeys[words[j]]){\r\n\t\t\t\t\tcommand.keyCode = this.specialKeys[words[j]];\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcommand.keyCode = words[j].charCodeAt(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tcommands.push(command);\r\n\t\t}\r\n\t\treturn commands;\r\n\t},\r\n\r\n\tgetCommandFromEvent: function(domEvent){\r\n\t\tvar command = this.createCommand();\r\n\t\tcommand.modifiers.shift = !!domEvent.shiftKey;\r\n\t\tcommand.modifiers.alt = !!domEvent.altKey;\r\n\t\tcommand.modifiers.ctrl = !!domEvent.ctrlKey;\r\n\t\tcommand.modifiers.meta = !!domEvent.metaKey;\r\n\t\tcommand.keyCode = domEvent.which || domEvent.keyCode;\r\n\r\n\t\tif(command.keyCode >= 96 && command.keyCode <= 105){\r\n\t\t\t// numpad keys 96-105 -> 48-57\r\n\t\t\tcommand.keyCode -= 48;//convert numpad number code to regular number code\r\n\t\t}\r\n\r\n\t\tvar printableKey = String.fromCharCode(command.keyCode );\r\n\t\tif(printableKey){\r\n\t\t\tcommand.keyCode = printableKey.toLowerCase().charCodeAt(0);\r\n\t\t}\r\n\t\treturn command;\r\n\t},\r\n\r\n\tgetHashFromEvent: function(domEvent){\r\n\t\treturn this.getHash(this.getCommandFromEvent(domEvent));\r\n\t},\r\n\r\n\tgetHash: function(command){\r\n\t\tvar parts = [];\r\n\t\tfor(var i in command.modifiers){\r\n\t\t\tif(command.modifiers[i]){\r\n\t\t\t\tparts.push(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tparts.push(command.keyCode);\r\n\r\n\t\treturn parts.join(this.junctionChar);\r\n\t},\r\n\r\n\tgetExpressions: function(shortcut){\r\n\t\treturn shortcut.split(this.junctionChar);\r\n\t},\r\n\tgetWords: function(term){\r\n\t\treturn term.split(this.combinationChar);\r\n\t},\r\n\ttrim: function(shortcut){\r\n\t\treturn shortcut.replace(/\\s/g, \"\");\r\n\t},\r\n\tjunctionChar:\",\",\r\n\tcombinationChar:\"+\",\r\n\tcommandKeys:{\r\n\t\t\"shift\": 16,\r\n\t\t\"alt\": 18,\r\n\t\t\"ctrl\": 17,\r\n\t\t\"meta\": true\r\n\t},\r\n\tspecialKeys:{\r\n\t\t\"backspace\": 8,\r\n\t\t\"tab\": 9,\r\n\t\t\"enter\": 13,\r\n\t\t\"esc\": 27,\r\n\t\t\"space\": 32,\r\n\t\t\"up\": 38,\r\n\t\t\"down\": 40,\r\n\t\t\"left\": 37,\r\n\t\t\"right\": 39,\r\n\t\t\"home\": 36,\r\n\t\t\"end\": 35,\r\n\t\t\"pageup\": 33,\r\n\t\t\"pagedown\": 34,\r\n\t\t\"delete\": 46,\r\n\t\t\"insert\": 45,\r\n\t\t\"plus\":107,\r\n\t\t\"f1\": 112,\r\n\t\t\"f2\": 113,\r\n\t\t\"f3\": 114,\r\n\t\t\"f4\": 115,\r\n\t\t\"f5\": 116,\r\n\t\t\"f6\": 117,\r\n\t\t\"f7\": 118,\r\n\t\t\"f8\": 119,\r\n\t\t\"f9\": 120,\r\n\t\t\"f10\": 121,\r\n\t\t\"f11\": 122,\r\n\t\t\"f12\": 123\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.EventHandler = {\r\n\t_handlers: null,\r\n\tfindHandler: function(command){\r\n\t\tif(!this._handlers) this._handlers = {};\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\t\tvar hash = shortcuts.getHash(command);\r\n\r\n\t\treturn this._handlers[hash];\r\n\t},\r\n\r\n\tdoAction: function(command, e){\r\n\t\tvar handler = this.findHandler(command);\r\n\t\tif(handler){\r\n\t\t\thandler.call(this, e);\r\n\r\n\t\t\tif (e.preventDefault) e.preventDefault();\r\n\t\t\telse e.returnValue = false;\r\n\r\n\t\t}\r\n\t},\r\n\tbind: function(shortcut, handler){\r\n\t\tif(!this._handlers) this._handlers = {};\r\n\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\r\n\t\tvar commands = shortcuts.parse(shortcut);\r\n\t\tfor(var i = 0; i < commands.length; i++){\r\n\t\t\tthis._handlers[shortcuts.getHash(commands[i])] = handler;\r\n\t\t}\r\n\t},\r\n\tunbind: function(shortcut){\r\n\t\tvar shortcuts = scheduler.$keyboardNavigation.shortcuts;\r\n\r\n\t\tvar commands = shortcuts.parse(shortcut);\r\n\t\tfor(var i = 0; i < commands.length; i++){\r\n\t\t\tif(this._handlers[shortcuts.getHash(commands[i])]){\r\n\t\t\t\tdelete this._handlers[shortcuts.getHash(commands[i])];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tbindAll: function(map){\r\n\t\tfor(var i in map){\r\n\t\t\tthis.bind(i, map[i]);\r\n\t\t}\r\n\t},\r\n\tinitKeys: function(){\r\n\t\tif(!this._handlers)\r\n\t\t\tthis._handlers = {};\r\n\t\tif(this.keys){\r\n\t\t\tthis.bindAll(this.keys);\r\n\t\t}\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n(function(){\r\n\tscheduler.$keyboardNavigation.getFocusableNodes = scheduler._getFocusableNodes;\r\n\r\n\tscheduler.$keyboardNavigation.trapFocus = function trapFocus(root, e){\r\n\t\tif(e.keyCode != 9) return false;\r\n\r\n\t\tvar focusable = scheduler.$keyboardNavigation.getFocusableNodes(root);\r\n\t\tvar currentFocus = document.activeElement;\r\n\t\tvar currentIndex = -1;\r\n\t\tfor(var i = 0; i < focusable.length; i++){\r\n\t\t\tif(focusable[i] == currentFocus){\r\n\t\t\t\tcurrentIndex = i;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar nextIndex, nextItem;\r\n\t\tif(e.shiftKey){\r\n\r\n\t\t\t// back tab\r\n\t\t\t// go to the last element if we focused on the first\r\n\t\t\tnextIndex = (currentIndex <= 0) ? (focusable.length - 1) : (currentIndex - 1);\r\n\r\n\t\t\tnextItem = focusable[nextIndex];\r\n\t\t\tif(nextItem){\r\n\t\t\t\tnextItem.focus();\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\t// forward tab\r\n\t\t\t// forward tab from last element should go back to the first element\r\n\t\t\tnextIndex = (currentIndex >= focusable.length - 1) ? 0 : (currentIndex + 1);\r\n\t\t\tnextItem = focusable[nextIndex];\r\n\t\t\tif(nextItem){\r\n\t\t\t\tnextItem.focus();\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t};\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.marker = {\r\n\tclear: function(){\r\n\t\tvar divs = scheduler.$container.querySelectorAll(\".dhx_focus_slot\");\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tdivs[i].parentNode.removeChild(divs[i]);\r\n\t\t}\r\n\t},\r\n\tcreateElement: function(){\r\n\t\tvar element = document.createElement(\"div\");\r\n\t\telement.setAttribute(\"tabindex\", -1);\r\n\t\telement.className = \"dhx_focus_slot\";\r\n\t\treturn element;\r\n\t},\r\n\r\n\trenderMultiple: function(start, end, method){\r\n\t\tvar divs = [];\r\n\t\tvar currentStart = new Date(start);\r\n\t\tvar currentEnd = new Date(Math.min(end.valueOf(), scheduler.date.add(scheduler.date.day_start(new Date(start)), 1, \"day\").valueOf()));\r\n\t\twhile(currentStart.valueOf() < end.valueOf()){\r\n\r\n\t\t\tdivs = divs.concat(method.call(this, currentStart, new Date(Math.min(currentEnd.valueOf(), end.valueOf()))));\r\n\t\t\tcurrentStart = scheduler.date.day_start(scheduler.date.add(currentStart, 1, \"day\"));\r\n\r\n\t\t\tcurrentEnd = scheduler.date.day_start(scheduler.date.add(currentStart, 1, \"day\"));\r\n\t\t\tcurrentEnd = new Date(Math.min(currentEnd.valueOf(), end.valueOf()));\r\n\t\t}\r\n\r\n\t\treturn divs;\r\n\t},\r\n\r\n\r\n\trender: function(start, end, section){\r\n\t\tthis.clear();\r\n\t\tvar divs = [];\r\n\r\n\t\tvar modes = scheduler.$keyboardNavigation.TimeSlot.prototype._modes;\r\n\t\tvar view = scheduler.$keyboardNavigation.TimeSlot.prototype._getMode();\r\n\t\tswitch (view){\r\n\t\t\tcase modes.units:\r\n\t\t\t\tdivs = this.renderVerticalMarker(start, end, section);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.timeline:\r\n\t\t\t\tdivs = this.renderTimelineMarker(start, end, section);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.year:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderYearMarker));\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.month:\r\n\t\t\t\tdivs = this.renderMonthMarker(start, end);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.weekAgenda:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderWeekAgendaMarker));\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.list:\r\n\t\t\t\tdivs = this.renderAgendaMarker(start, end);\r\n\t\t\t\tbreak;\r\n\t\t\tcase modes.dayColumns:\r\n\t\t\t\tdivs = divs.concat(this.renderMultiple(start, end, this.renderVerticalMarker));\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tthis.addWaiAriaLabel(divs, start, end, section);\r\n\t\tthis.addDataAttributes(divs, start, end, section);\r\n\r\n\t\tfor(var i = divs.length - 1; i >= 0; i--){\r\n\t\t\tif(divs[i].offsetWidth){\r\n\t\t\t\treturn divs[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t},\r\n\r\n\taddDataAttributes: function(divs, start, end, section){\r\n\t\tvar dateToStr = scheduler.date.date_to_str(scheduler.config.api_date);\r\n\r\n\t\tvar from = dateToStr(start),\r\n\t\t\tto = dateToStr(end);\r\n\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tdivs[i].setAttribute(\"data-start-date\", from);\r\n\t\t\tdivs[i].setAttribute(\"data-end-date\", to);\r\n\t\t\tif(section){\r\n\t\t\t\tdivs[i].setAttribute(\"data-section\", section);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\taddWaiAriaLabel: function(divs, start, end, section){\r\n\t\tvar label = \"\";\r\n\t\tvar state = scheduler.getState();\r\n\t\tvar mode = state.mode;\r\n\r\n\t\tvar dateTimeLabel = false;\r\n\r\n\t\tlabel += scheduler.templates.day_date(start);\r\n\r\n\t\tif((scheduler.date.day_start(new Date(start)).valueOf() != start.valueOf())){\r\n\t\t\tlabel += \" \" + scheduler.templates.hour_scale(start);\r\n\t\t\tdateTimeLabel = true;\r\n\t\t}\r\n\r\n\t\tif((scheduler.date.day_start(new Date(start)).valueOf() != scheduler.date.day_start(new Date(end)).valueOf())){\r\n\r\n\t\t\tlabel += \" - \" + scheduler.templates.day_date(end);\r\n\t\t\tif(dateTimeLabel || (scheduler.date.day_start(new Date(end)).valueOf() != end.valueOf())){\r\n\t\t\t\tlabel += \" \" + scheduler.templates.hour_scale(end);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(section){\r\n\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\t\t\t\tconst timeline = scheduler.matrix[mode];\r\n\t\t\t\tconst sectionObject = timeline.y_unit[timeline.order[section]];\r\n\t\t\t\tlabel += \", \" + scheduler.templates[mode + \"_scale_label\"](sectionObject.key, sectionObject.label, sectionObject);\r\n\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\tconst units = scheduler._props[mode];\r\n\t\t\t\tconst sectionObject = units.options[units.order[section]];\r\n\r\n\t\t\t\tlabel += \", \" + scheduler.templates[mode + \"_scale_text\"](sectionObject.key, sectionObject.label, sectionObject);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tscheduler._waiAria.setAttributes(divs[i], {\r\n\t\t\t\t\"aria-label\": label,\r\n\t\t\t\t\"aria-live\": \"polite\"\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\trenderWeekAgendaMarker: function(start_date, end_date){\r\n\t\tvar divs = scheduler.$container.querySelectorAll(\".dhx_wa_day_cont .dhx_wa_scale_bar\");\r\n\r\n\t\tvar currDate = scheduler.date.week_start(new Date(scheduler.getState().min_date));\r\n\r\n\t\tvar index = -1;\r\n\t\tvar markerDate = scheduler.date.day_start(new Date(start_date));\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tindex++;\r\n\t\t\tif(scheduler.date.day_start(new Date(currDate)).valueOf() == markerDate.valueOf()){\r\n\t\t\t\tbreak;\r\n\t\t\t}else{\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(index != -1) return this._wrapDiv(divs[index]);\r\n\t\treturn [];\r\n\t},\r\n\r\n\t_wrapDiv: function(cell){\r\n\t\tvar marker = this.createElement();\r\n\t\tmarker.style.top = cell.offsetTop + \"px\";\r\n\t\tmarker.style.left = cell.offsetLeft + \"px\";\r\n\t\tmarker.style.width = cell.offsetWidth + \"px\";\r\n\t\tmarker.style.height = cell.offsetHeight + \"px\";\r\n\t\tcell.appendChild(marker);\r\n\t\treturn [marker];\r\n\t},\r\n\trenderYearMarker: function(start_date, end_date){\r\n\t\tvar cell = scheduler._get_year_cell(start_date);\r\n\t\tcell.style.position = \"relative\";\r\n\t\tvar marker = this.createElement();\r\n\t\tmarker.style.top = \"0px\";\r\n\t\tmarker.style.left = \"0px\";\r\n\t\tmarker.style.width = \"100%\";\r\n\t\tmarker.style.height = \"100%\";\r\n\t\tcell.appendChild(marker);\r\n\t\treturn [marker];\r\n\t},\r\n\r\n\trenderAgendaMarker: function(start_date, end_date){\r\n\t\tvar block = this.createElement();\r\n\t\tblock.style.height = \"1px\";\r\n\t\tblock.style.width = \"100%\";\r\n\t\tblock.style.opacity = 1;\r\n\t\tblock.style.top = \"0px\";\r\n\t\tblock.style.left = \"0px\";\r\n\t\tscheduler.$container.querySelector(\".dhx_cal_data\").appendChild(block);\r\n\t\treturn [block];\r\n\t},\r\n\r\n\trenderTimelineMarker: function(start_date, end_date, section){\r\n\t\tvar view_opts = scheduler._lame_copy({}, scheduler.matrix[scheduler._mode]);\r\n\t\tvar areas = view_opts._scales;\r\n\t\t//timespans must always use actual position, not rounded\r\n\t\tview_opts.round_position = false;\r\n\t\tvar blocks = [];\r\n\r\n\t\tvar min_date = start_date ? new Date(start_date) : scheduler._min_date;\r\n\t\tvar max_date = end_date ? new Date(end_date) : scheduler._max_date;\r\n\r\n\t\tif(min_date.valueOf() < scheduler._min_date.valueOf())\r\n\t\t\tmin_date = new Date(scheduler._min_date);\r\n\t\tif(max_date.valueOf() > scheduler._max_date.valueOf())\r\n\t\t\tmax_date = new Date(scheduler._max_date);\r\n\r\n\t\tif(!view_opts._trace_x) return blocks;\r\n\r\n\t\tfor(var i = 0; i < view_opts._trace_x.length; i++){\r\n\t\t\tif(scheduler._is_column_visible(view_opts._trace_x[i]))\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\tif(i == view_opts._trace_x.length)\r\n\t\t\treturn blocks;\r\n\r\n\t\tvar area = areas[section];\r\n\r\n\t\tif (!(min_date < end_date && max_date > start_date))\r\n\t\t\treturn blocks;\r\n\r\n\t\tvar block = this.createElement();\r\n\r\n\t\tlet start_pos;\r\n\t\tlet end_pos;\r\n\r\n\t\tfunction set_date_part(source, target) {\r\n\t\t\t// reset to start of the month in order to prevent month change when target is on 31th day, and source month has only 30 days\r\n\t\t\ttarget.setDate(1);\r\n\r\n\t\t\ttarget.setFullYear(source.getFullYear());\r\n\t\t\ttarget.setMonth(source.getMonth());\r\n\t\t\ttarget.setDate(source.getDate());\r\n\t\t}\r\n\r\n\t\tif(!scheduler.getView().days){\r\n\t\t\tstart_pos = scheduler._timeline_getX({start_date: start_date}, false, view_opts);\r\n\t\t\tend_pos = scheduler._timeline_getX({start_date: end_date}, false, view_opts);\r\n\t\t}else{\r\n\t\t\t// daytimeline\r\n\t\t\tconst tempStart = new Date(start_date);\r\n\t\t\tset_date_part(scheduler._min_date, tempStart);\r\n\t\t\tconst tempEnd = new Date(end_date);\r\n\t\t\tset_date_part(scheduler._min_date, tempEnd);\r\n\t\t\tstart_pos = scheduler._timeline_getX({start_date: tempStart}, false, view_opts);\r\n\t\t\tend_pos = scheduler._timeline_getX({start_date: tempEnd}, false, view_opts);\r\n\t\t}\r\n\r\n\t\tvar height = ((view_opts._section_height[section]-1) || (view_opts.dy - 1));\r\n\r\n\t\tvar top = 0;\r\n\t\tif (scheduler._isRender('cell')){\r\n\t\t\ttop = area.offsetTop;\r\n\t\t\tstart_pos += view_opts.dx;\r\n\t\t\tend_pos += view_opts.dx;\r\n\t\t\tarea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t}else{\r\n\r\n\t\t}\r\n\t\tvar width = Math.max(1, end_pos - start_pos - 1);\r\n\t\tlet direction = \"left\";\r\n\t\tif(scheduler.config.rtl){\r\n\t\t\tdirection = \"right\";\r\n\t\t}\r\n\t\tblock.style.cssText = `height:${height}px; ${direction}:${start_pos}px; width:${width}px; top:${top}px;`;\r\n\r\n\t\tif(area){\r\n\t\t\tarea.appendChild(block);\r\n\t\t\tblocks.push(block);\r\n\t\t}\r\n\r\n\t\treturn blocks;\r\n\t},\r\n\r\n\trenderMonthCell: function(date){\r\n\t\tvar cells = scheduler.$container.querySelectorAll(\".dhx_month_head\");\r\n\r\n\t\tvar divs = [];\r\n\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\tdivs.push(cells[i].parentNode);\r\n\t\t}\r\n\r\n\t\tvar firstDate = scheduler.date.week_start(new Date(scheduler.getState().min_date));\r\n\r\n\t\tvar index = -1;\r\n\t\tvar weekNumber = 0;\r\n\t\tvar dayIndex = -1;\r\n\t\tvar currDate = firstDate;\r\n\t\tvar markerDate = scheduler.date.day_start(new Date(date));\r\n\t\tfor(var i = 0; i < divs.length; i++){\r\n\t\t\tindex++;\r\n\r\n\t\t\tif(dayIndex == 6){\r\n\t\t\t\tweekNumber++;\r\n\t\t\t\tdayIndex = 0;\r\n\t\t\t}else{\r\n\t\t\t\tdayIndex++;\r\n\t\t\t}\r\n\r\n\t\t\tif(scheduler.date.day_start(new Date(currDate)).valueOf() == markerDate.valueOf()){\r\n\t\t\t\tbreak;\r\n\t\t\t}else{\r\n\t\t\t\tcurrDate = scheduler.date.add(currDate, 1, \"day\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(index == -1){\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tvar left = scheduler._colsS[dayIndex];\r\n\t\tvar top = scheduler._colsS.heights[weekNumber];\r\n\r\n\t\tvar div = this.createElement();\r\n\t\tdiv.style.top = top + \"px\";\r\n\t\tdiv.style.left = left + \"px\";\r\n\t\tdiv.style.width = scheduler._cols[dayIndex] + \"px\";\r\n\t\tdiv.style.height = ((scheduler._colsS.heights[weekNumber + 1] - top) || scheduler._colsS.height) + \"px\" ;\r\n\r\n\r\n\t\tvar container = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\r\n\t\tvar datatable = container.querySelector(\".dhx_cal_month_table\");\r\n\t\tif(datatable.nextSibling){\r\n\t\t\tcontainer.insertBefore(div, datatable.nextSibling);\r\n\t\t}else{\r\n\t\t\tcontainer.appendChild(div);\r\n\t\t}\r\n\t\treturn div;\r\n\t},\r\n\trenderMonthMarker: function(start_date, end_date){\r\n\t\tvar res = [];\r\n\t\tvar currentDate = start_date;\r\n\t\twhile(currentDate.valueOf() < end_date.valueOf()){\r\n\t\t\tres.push(this.renderMonthCell(currentDate));\r\n\t\t\tcurrentDate = scheduler.date.add(currentDate, 1, \"day\");\r\n\t\t}\r\n\t\treturn res;\r\n\t},\r\n\r\n\trenderVerticalMarker: function(start_date, end_date, section){\r\n\t\tvar index = scheduler.locate_holder_day(start_date);\r\n\r\n\t\tvar divs = [];\r\n\t\tvar area = null;\r\n\r\n\t\tvar c = scheduler.config;\r\n\t\tif(scheduler._ignores[index]) return divs;\r\n\r\n\t\tif (scheduler._props && scheduler._props[scheduler._mode] && section) {\r\n\t\t\tvar view = scheduler._props[scheduler._mode];\r\n\t\t\tindex = view.order[section];\r\n\r\n\t\t\tvar inner_index = view.order[section];\r\n\t\t\tif(!(view.days > 1)){\r\n\t\t\t\tindex = inner_index;\r\n\t\t\t\tif (view.size && (index > view.position+view.size)) {\r\n\t\t\t\t\tindex = 0;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t//var units_l = view.size || view.options.length;\r\n\r\n\t\t\t\tindex = scheduler.locate_holder_day(start_date) + inner_index;\r\n\t\t\t\t//index = index*units_l + inner_index;\r\n\t\t\t}\r\n\t\t}\r\n\t\tarea = scheduler.locate_holder(index);\r\n\t\tif(!area || area.querySelector(\".dhx_scale_hour\")){\r\n\t\t\t// hour scale instead of date column\r\n\t\t\treturn document.createElement(\"div\");\r\n\t\t}\r\n\r\n\t\tvar start = Math.max((start_date.getHours()*60 + start_date.getMinutes()), c.first_hour*60);\r\n\r\n\r\n\t\tvar end = Math.min((end_date.getHours()*60 + end_date.getMinutes()), c.last_hour*60);\r\n\t\tif(!end && (scheduler.date.day_start(new Date(end_date)).valueOf() > scheduler.date.day_start(new Date(start_date)).valueOf())){\r\n\t\t\tend = c.last_hour*60;\r\n\t\t}\r\n\r\n\t\tif (end <= start) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tvar block = this.createElement();\r\n\r\n\t\t// +1 for working with section which really takes up whole height (as % would be == 0)\r\n\t\tvar all_hours_height = scheduler.config.hour_size_px*c.last_hour + 1;\r\n\t\tvar hour_ms = 60*60*1000;\r\n\t\tblock.style.top = (Math.round((start*60*1000-scheduler.config.first_hour*hour_ms)*scheduler.config.hour_size_px/hour_ms) % all_hours_height) + \"px\";\r\n\t\tblock.style.lineHeight = block.style.height = Math.max((Math.round(((end-start)*60*1000)*scheduler.config.hour_size_px/hour_ms)) % all_hours_height, 1)+\"px\";\r\n\t\tblock.style.width = \"100%\";\r\n\t\tarea.appendChild(block);\r\n\t\tdivs.push(block);\r\n\t\treturn divs[0];\r\n\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode = function(){};\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.EventHandler,\r\n\t{\r\n\t\tgetDefaultNode: function(){\r\n\t\t\tvar node = new scheduler.$keyboardNavigation.TimeSlot();\r\n\r\n\t\t\tif(!node.isValid()){\r\n\t\t\t\tnode = node.fallback();\r\n\t\t\t}\r\n\t\t\treturn node;\r\n\t\t},\r\n\r\n\t\t_modes:{\r\n\t\t\tmonth: \"month\",\r\n\t\t\tyear: \"year\",\r\n\t\t\tdayColumns: \"dayColumns\",\r\n\t\t\ttimeline:\"timeline\",\r\n\t\t\tunits:\"units\",\r\n\t\t\tweekAgenda: \"weekAgenda\",\r\n\t\t\tlist: \"list\"\r\n\t\t},\r\n\t\tgetMode: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tvar mode = state.mode;\r\n\t\t\tif((scheduler.matrix && scheduler.matrix[mode])){\r\n\t\t\t\treturn this._modes.timeline;\r\n\t\t\t} else if((scheduler._props && scheduler._props[mode])){\r\n\t\t\t\treturn this._modes.units;\r\n\t\t\t}else if(mode == \"month\"){\r\n\t\t\t\treturn this._modes.month;\r\n\t\t\t}else if(mode == \"year\"){\r\n\t\t\t\treturn this._modes.year;\r\n\t\t\t}else if(mode == \"week_agenda\"){\r\n\t\t\t\treturn this._modes.weekAgenda;\r\n\t\t\t}else if(mode == \"map\" || mode == \"agenda\" || (scheduler._grid && scheduler[\"grid_\" + mode])){\r\n\t\t\t\treturn this._modes.list;\r\n\t\t\t}else{\r\n\t\t\t\treturn this._modes.dayColumns;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.focus();\r\n\t\t},\r\n\r\n\t\tblur: function(){\r\n\r\n\t\t},\r\n\r\n\t\tdisable: function(){\r\n\t\t\tscheduler.$container.setAttribute(\"tabindex\", \"0\");\r\n\t\t},\r\n\t\tenable: function(){\r\n\t\t\tif(scheduler.$container)\r\n\t\t\t\tscheduler.$container.removeAttribute(\"tabindex\");\r\n\t\t},\r\n\t\tisEnabled: function(){\r\n\t\t\treturn scheduler.$container.hasAttribute(\"tabindex\");\r\n\t\t},\r\n\r\n\r\n\t\t_compareEvents: function(a, b){\r\n\t\t\tif (a.start_date.valueOf() == b.start_date.valueOf())\r\n\t\t\t\treturn a.id > b.id ? 1 : -1;\r\n\t\t\treturn a.start_date.valueOf() > b.start_date.valueOf() ? 1 : -1;\r\n\t\t},\r\n\r\n\t\t_pickEvent: function(from, to, startId, reverse){\r\n\t\t\tvar range = scheduler.getState();\r\n\t\t\tfrom = new Date(Math.max(range.min_date.valueOf(), from.valueOf()));\r\n\t\t\tto = new Date(Math.min(range.max_date.valueOf(), to.valueOf()));\r\n\r\n\t\t\tvar evs = scheduler.getEvents(from, to);\r\n\t\t\tevs.sort(this._compareEvents);\r\n\t\t\tif(reverse){\r\n\t\t\t\tevs = evs.reverse();\r\n\t\t\t}\r\n\r\n\t\t\tvar trim = !!startId;\r\n\t\t\tfor(var i =0; i < evs.length && trim; i++){\r\n\t\t\t\tif(evs[i].id == startId){\r\n\t\t\t\t\ttrim = false;\r\n\t\t\t\t}\r\n\t\t\t\tevs.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\r\n\t\t\tfor(var i = 0; i < evs.length; i++){\r\n\t\t\t\tvar eventElement = new scheduler.$keyboardNavigation.Event(evs[i].id);\r\n\t\t\t\tif(eventElement.getNode())\r\n\t\t\t\t\treturn evs[i];\r\n\t\t\t}\r\n\r\n\t\t\treturn null;\r\n\t\t},\r\n\r\n\t\tnextEventHandler: function(id){\r\n\t\t\tvar activeNode = scheduler.$keyboardNavigation.dispatcher.activeNode;\r\n\r\n\t\t\tvar startId = id || (activeNode && activeNode.eventId);\r\n\r\n\t\t\tvar nextEvent = null;\r\n\t\t\tif(startId && scheduler.getEvent(startId)){\r\n\t\t\t\tvar currEvent = scheduler.getEvent(startId);\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tcurrEvent.start_date,\r\n\t\t\t\t\tscheduler.date.add(currEvent.start_date, 1, \"year\"),\r\n\t\t\t\t\tcurrEvent.id,\r\n\t\t\t\t\tfalse\r\n\t\t\t\t);\r\n\r\n\t\t\t}\r\n\t\t\tif(!nextEvent && !id){\r\n\t\t\t\tvar visibleDates = scheduler.getState();\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tvisibleDates.min_date,\r\n\t\t\t\t\tscheduler.date.add(visibleDates.min_date, 1, \"year\"),\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\tfalse\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tif(nextEvent){\r\n\r\n\t\t\t\tvar nextEv = new scheduler.$keyboardNavigation.Event(nextEvent.id);\r\n\t\t\t\tif(!nextEv.isValid()){// not visible event\r\n\t\t\t\t\tthis.nextEventHandler(nextEvent.id);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(activeNode){activeNode.blur();}\r\n\t\t\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(nextEv);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tprevEventHandler: function(id){\r\n\t\t\tvar activeNode = scheduler.$keyboardNavigation.dispatcher.activeNode;\r\n\r\n\t\t\tvar startId = id || (activeNode && activeNode.eventId);\r\n\r\n\t\t\tvar nextEvent = null;\r\n\t\t\tif(startId && scheduler.getEvent(startId)){\r\n\t\t\t\tvar currEvent = scheduler.getEvent(startId);\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tscheduler.date.add(currEvent.end_date, -1, \"year\"),\r\n\t\t\t\t\tcurrEvent.end_date,\r\n\t\t\t\t\tcurrEvent.id,\r\n\t\t\t\t\ttrue\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\tif(!nextEvent && !id){\r\n\t\t\t\tvar visibleDates = scheduler.getState();\r\n\r\n\t\t\t\tnextEvent = scheduler.$keyboardNavigation.SchedulerNode.prototype._pickEvent(\r\n\t\t\t\t\tscheduler.date.add(visibleDates.max_date, -1, \"year\"),\r\n\t\t\t\t\tvisibleDates.max_date,\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\ttrue\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tif(nextEvent){\r\n\t\t\t\tvar nextEv = new scheduler.$keyboardNavigation.Event(nextEvent.id);\r\n\t\t\t\tif(!nextEv.isValid()){// not visible event\r\n\t\t\t\t\tthis.prevEventHandler(nextEvent.id);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(activeNode){activeNode.blur();}\r\n\t\t\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(nextEv);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\r\n\t\t\t\"alt+1, alt+2, alt+3, alt+4, alt+5, alt+6, alt+7, alt+8, alt+9\": function(e){\r\n\t\t\t\tvar tabs = scheduler.$keyboardNavigation.HeaderCell.prototype.getNodes(\".dhx_cal_navline .dhx_cal_tab\");\r\n\t\t\t\tvar key = e.key;\r\n\t\t\t\tif(key === undefined){\r\n\t\t\t\t\tkey = e.keyCode - 48;\r\n\t\t\t\t}\r\n\t\t\t\tif(tabs[key*1 - 1]){\r\n\t\t\t\t\ttabs[key*1 - 1].click();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+left,meta+left\": function(e){\r\n\t\t\t\tscheduler._click.dhx_cal_prev_button();\r\n\t\t\t},\r\n\t\t\t\"ctrl+right,meta+right\": function(e){\r\n\t\t\t\tscheduler._click.dhx_cal_next_button();\r\n\t\t\t},\r\n\t\t\t\"ctrl+up,meta+up\":function(e){\r\n\t\t\t\tvar dataArea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tdataArea.scrollTop -= 20;\r\n\t\t\t},\r\n\t\t\t\"ctrl+down,meta+down\": function(e){\r\n\t\t\t\tvar dataArea = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\tdataArea.scrollTop += 20;\r\n\t\t\t},\r\n\r\n\r\n\t\t\t\"e\": function(){\r\n\t\t\t\tthis.nextEventHandler();\r\n\t\t\t},\r\n\r\n\t\t\t\"home\": function(){\r\n\t\t\t\tscheduler.setCurrentView(new Date());\r\n\t\t\t},\r\n\r\n\t\t\t\"shift+e\": function(){\r\n\t\t\t\tthis.prevEventHandler();\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+enter,meta+enter\": function(){\r\n\t\t\t\tscheduler.addEventNow({start_date: new Date(scheduler.getState().date)});\r\n\t\t\t},\r\n\r\n\t\t\t\"ctrl+c,meta+c\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t},\r\n\t\t\t\"ctrl+v,meta+v\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t},\r\n\t\t\t\"ctrl+x,meta+x\": function(e){\r\n\t\t\t\tscheduler._key_nav_copy_paste(e);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.SchedulerNode.prototype.bindAll(scheduler.$keyboardNavigation.SchedulerNode.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.KeyNavNode = function(){};\r\n\r\nscheduler.$keyboardNavigation.KeyNavNode.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.EventHandler,\r\n\t{\r\n\t\tisValid: function(){\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\treturn null;\r\n\t\t},\r\n\r\n\t\tmoveTo: function (element) {\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.setActiveNode(element);\r\n\t\t},\r\n\r\n\t\tcompareTo: function(b){\r\n\t\t\t// good enough comparison of two random objects\r\n\t\t\tif(!b) return false;\r\n\t\t\tfor(var i in this){\r\n\t\t\t\tif(!!this[i] != !!b[i]) return false;\r\n\r\n\t\t\t\tvar canStringifyThis = !!(this[i] && this[i].toString);\r\n\t\t\t\tvar canStringifyThat = !!(b[i] && b[i].toString);\r\n\t\t\t\tif(canStringifyThat != canStringifyThis) return false;\r\n\t\t\t\tif(!(canStringifyThat && canStringifyThis)) {\r\n\t\t\t\t\tif(b[i] != this[i]) return false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(b[i].toString() != this[i].toString())\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\tgetNode: function(){},\r\n\t\tfocus: function(){\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif(node){\r\n\t\t\t\tnode.setAttribute(\"tabindex\", \"-1\");\r\n\t\t\t\t//node.className += \" scheduler_focused\";\r\n\t\t\t\tif(node.focus) node.focus();\r\n\t\t\t}\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif(node){\r\n\t\t\t\tnode.setAttribute(\"tabindex\", \"-1\");\r\n\t\t\t\t//node.className = (node.className || \"\").replace(/ ?scheduler_focused/g, \"\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.HeaderCell = function(index){\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.HeaderCell.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\tgetNode: function(index){\r\n\t\t\tindex = index || this.index || 0;\r\n\t\t\tvar nodes = this.getNodes();\r\n\t\t\tif(nodes[index]) return nodes[index];\r\n\t\t},\r\n\r\n\t\tgetNodes: function(selector){\r\n\t\t\tselector = selector || [\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_prev_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_next_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_today_button\",\r\n\t\t\t\t\t\".dhx_cal_navline .dhx_cal_tab\"\r\n\t\t\t\t].join(\", \");\r\n\r\n\t\t\tvar nodes = Array.prototype.slice.call(scheduler.$container.querySelectorAll(selector));\r\n\t\t\tnodes.sort(function(a, b){\r\n\t\t\t\treturn a.offsetLeft - b.offsetLeft;\r\n\t\t\t});\r\n\t\t\treturn nodes;\r\n\t\t},\r\n\r\n\t\t_handlers:null,\r\n\r\n\t\tisValid: function(){\r\n\t\t\treturn !!this.getNode(this.index);\r\n\t\t},\r\n\t\tfallback:function(){\r\n\t\t\tvar defaultCell = this.getNode(0);\r\n\t\t\tif(!defaultCell){\r\n\t\t\t\tdefaultCell = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}\r\n\t\t\treturn defaultCell;\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tvar newIndex = this.index - 1;\r\n\t\t\t\tif(newIndex < 0){\r\n\t\t\t\t\tnewIndex = this.getNodes().length - 1;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.HeaderCell(newIndex));\r\n\r\n\t\t\t},\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tvar newIndex = this.index + 1;\r\n\t\t\t\tif(newIndex >= this.getNodes().length){\r\n\t\t\t\t\tnewIndex = 0;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.HeaderCell(newIndex));\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t},\r\n\r\n\t\t\t\"enter\": function(){\r\n\t\t\t\tvar node = this.getNode();\r\n\t\t\t\tif(node){\r\n\t\t\t\t\tnode.click();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.HeaderCell.prototype.bindAll(scheduler.$keyboardNavigation.HeaderCell.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.Event = function(id){\r\n\tthis.eventId = null;\r\n\tif(scheduler.getEvent(id)){\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tthis.start = new Date(ev.start_date);\r\n\t\tthis.end = new Date(ev.end_date);\r\n\r\n\t\tthis.section = this._getSection(ev);\r\n\t\tthis.eventId = id;\r\n\t}\r\n};\r\n\r\nscheduler.$keyboardNavigation.Event.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\t_getNodes: function(){\r\n\t\t\treturn Array.prototype.slice.call(scheduler.$container.querySelectorAll(\"[\"+scheduler.config.event_attribute+\"]\"));\r\n\t\t},\r\n\r\n\t\t_modes: scheduler.$keyboardNavigation.SchedulerNode.prototype._modes,\r\n\r\n\t\tgetMode: scheduler.$keyboardNavigation.SchedulerNode.prototype.getMode,\r\n\r\n\t\t_handlers: null,\r\n\t\tisValid: function(){\r\n\t\t\treturn !!(scheduler.getEvent(this.eventId) && this.getNode());\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\tvar eventNode = this._getNodes()[0];\r\n\t\t\tvar defaultElement = null;\r\n\t\t\tif(!eventNode || !(scheduler._locate_event(eventNode))){\r\n\t\t\t\tdefaultElement = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}else{\r\n\t\t\t\tvar id = scheduler._locate_event(eventNode);\r\n\t\t\t\tdefaultElement = new scheduler.$keyboardNavigation.Event(id);\r\n\t\t\t}\r\n\r\n\t\t\treturn defaultElement;\r\n\t\t},\r\n\r\n\t\tisScrolledIntoView: function (el) {\r\n\t\t\tvar eventBox = el.getBoundingClientRect();\r\n\t\t\tvar viewPort = scheduler.$container.querySelector(\".dhx_cal_data\").getBoundingClientRect();\r\n\t\t\t\r\n\t\t\tif(eventBox.bottom < viewPort.top || eventBox.top > viewPort.bottom){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\tgetNode: function(){\r\n\r\n\t\t\tvar idSelector = \"[\"+scheduler.config.event_attribute+\"='\"+this.eventId+\"']\";\r\n\r\n\t\t\tvar inlineEditor = scheduler.$keyboardNavigation.dispatcher.getInlineEditor(this.eventId);\r\n\t\t\tif(inlineEditor){// is inline editor visible\r\n\t\t\t\treturn inlineEditor;\r\n\t\t\t}else{\r\n\t\t\t\tif(scheduler.isMultisectionEvent && scheduler.isMultisectionEvent(scheduler.getEvent(this.eventId))){\r\n\t\t\t\t\tvar nodes = scheduler.$container.querySelectorAll(idSelector);\r\n\t\t\t\t\tfor(var i = 0; i < nodes.length; i++){\r\n\t\t\t\t\t\tif(this.isScrolledIntoView(nodes[i])){\r\n\t\t\t\t\t\t\treturn nodes[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn nodes[0];\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn scheduler.$container.querySelector(idSelector);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tvar event = scheduler.getEvent(this.eventId);\r\n\r\n\t\t\tvar calendar = scheduler.getState();\r\n\t\t\tif(event.start_date.valueOf() > calendar.max_date.valueOf() || event.end_date.valueOf() <= calendar.min_date.valueOf()){\r\n\t\t\t\tscheduler.setCurrentView(event.start_date);\r\n\t\t\t}\r\n\r\n\t\t\tvar node = this.getNode();\r\n\t\t\tif (this.isScrolledIntoView(node)) {\r\n\t\t\t\tscheduler.$keyboardNavigation.dispatcher.keepScrollPosition((function(){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\t\t}).bind(this));\r\n\t\t\t} else {\r\n\t\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\t}\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\r\n\r\n\t\t_getSection: function(ev){\r\n\t\t\tvar section = null;\r\n\t\t\tvar mode = scheduler.getState().mode;\r\n\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\t\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\t\tsection = ev[timeline.y_property];\r\n\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\tvar unit = scheduler._props[mode];\r\n\t\t\t\tsection = ev[unit.map_to];\r\n\t\t\t}\r\n\t\t\treturn section;\r\n\t\t},\r\n\t\t_moveToSlot: function(dir){\r\n\t\t\tvar ev = scheduler.getEvent(this.eventId);\r\n\t\t\tif(ev){\r\n\t\t\t\tvar section =this._getSection(ev);\r\n\t\t\t\tvar slot = new scheduler.$keyboardNavigation.TimeSlot(ev.start_date, null, section);\r\n\t\t\t\tthis.moveTo(slot.nextSlot(slot, dir));\r\n\t\t\t}else{\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tthis._moveToSlot(\"left\");\r\n\t\t\t},\r\n\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tthis._moveToSlot(\"right\");\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\t\t\t\tif(this.getMode() == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis._moveToSlot(\"down\");\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"space\": function(){\r\n\t\t\t\tvar node = this.getNode();\r\n\t\t\t\tif(node && node.click){\r\n\t\t\t\t\tnode.click();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"up\": function () {\r\n\t\t\t\tif(this.getMode() == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis._moveToSlot(\"up\");\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t\"delete\": function(){\r\n\t\t\t\tif(scheduler.getEvent(this.eventId)) {\r\n\t\t\t\t\tscheduler._click.buttons[\"delete\"](this.eventId);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t// open lightbox\r\n\t\t\t\"enter\": function () {\r\n\t\t\t\tif(scheduler.getEvent(this.eventId)) {\r\n\t\t\t\t\tscheduler.showLightbox(this.eventId);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\nscheduler.$keyboardNavigation.Event.prototype.bindAll(scheduler.$keyboardNavigation.Event.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.TimeSlot = function(from, to, section, movingDate){\r\n\tvar state = scheduler.getState();\r\n\tvar timeline = scheduler.matrix && scheduler.matrix[state.mode];\r\n\r\n\tif(!from){\r\n\t\tfrom = this.getDefaultDate();\r\n\t}\r\n\r\n\tif(!to){\r\n\r\n\t\tif(timeline){\r\n\t\t\tto = scheduler.date.add(from, timeline.x_step, timeline.x_unit);\r\n\t\t}else{\r\n\t\t\tto = scheduler.date.add(from, scheduler.config.key_nav_step, \"minute\");\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tthis.section = section || this._getDefaultSection();\r\n\tthis.start_date = new Date(from);\r\n\tthis.end_date = new Date(to);\r\n\tthis.movingDate = movingDate || null;\r\n};\r\n\r\nscheduler.$keyboardNavigation.TimeSlot.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\t_handlers:null,\r\n\r\n\t\tgetDefaultDate: function(){\r\n\t\t\tvar from;\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar visibleTime = new Date(state.date);\r\n\t\t\tvisibleTime.setSeconds(0);\r\n\t\t\tvisibleTime.setMilliseconds(0);\r\n\r\n\t\t\tvar nowTime = new Date();\r\n\t\t\tnowTime.setSeconds(0);\r\n\t\t\tnowTime.setMilliseconds(0);\r\n\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[state.mode];\r\n\t\t\tvar showNowTime = false;\r\n\t\t\tif(visibleTime.valueOf() === nowTime.valueOf()){\r\n\t\t\t\tshowNowTime = true;\r\n\t\t\t}\r\n\r\n\t\t\tif(timeline){\r\n\t\t\t\tif(showNowTime){\r\n\t\t\t\t\tif(timeline.x_unit === \"day\"){\r\n\t\t\t\t\t\tnowTime.setHours(0);\r\n\t\t\t\t\t\tnowTime.setMinutes(0);\r\n\t\t\t\t\t}else if(timeline.x_unit === \"hour\"){\r\n\t\t\t\t\t\tnowTime.setMinutes(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfrom = nowTime;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfrom = scheduler.date[timeline.name + \"_start\"](new Date(state.date));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfrom = this.findVisibleColumn(from);\r\n\t\t\t}else{\r\n\t\t\t\tfrom = new Date(scheduler.getState().min_date);\r\n\t\t\t\tif(showNowTime){\r\n\t\t\t\t\tfrom = nowTime;\r\n\t\t\t\t}\r\n\t\t\t\tfrom = this.findVisibleColumn(from);\r\n\t\t\t\tif(!showNowTime){\r\n\t\t\t\t\tfrom.setHours(scheduler.config.first_hour);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(!scheduler._table_view){\r\n\t\t\t\t\tvar dataContainer = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t\t\t\tif(dataContainer.scrollTop){\r\n\t\t\t\t\t\tfrom.setHours(scheduler.config.first_hour + Math.ceil(dataContainer.scrollTop / scheduler.config.hour_size_px));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn from;\r\n\t\t},\r\n\r\n\t\tclone: function(timeslot){\r\n\t\t\treturn new scheduler.$keyboardNavigation.TimeSlot(timeslot.start_date, timeslot.end_date, timeslot.section, timeslot.movingDate);\r\n\t\t},\r\n\t\t_getMultisectionView: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view;\r\n\t\t\tif(scheduler._props && scheduler._props[state.mode]) {\r\n\t\t\t\tview = scheduler._props[state.mode];\r\n\t\t\t}else if(scheduler.matrix && scheduler.matrix[state.mode]){\r\n\t\t\t\tview = scheduler.matrix[state.mode];\r\n\t\t\t}\r\n\t\t\treturn view;\r\n\t\t},\r\n\r\n\t\t_getDefaultSection: function(){\r\n\t\t\tvar section = null;\r\n\t\t\tvar view = this._getMultisectionView();\r\n\t\t\tif(view && !section){\r\n\t\t\t\tsection = this._getNextSection();\r\n\t\t\t}\r\n\t\t\treturn section;\r\n\t\t},\r\n\r\n\t\t_getNextSection: function(sectionId, dir){\r\n\t\t\tvar view = this._getMultisectionView();\r\n\t\t\tvar currentIndex = view.order[sectionId];\r\n\t\t\tvar nextIndex = currentIndex;\r\n\t\t\tif(currentIndex !== undefined){\r\n\t\t\t\tnextIndex = currentIndex + dir;\r\n\t\t\t}else{\r\n\t\t\t\tnextIndex = (view.size && view.position) ? view.position : 0;\r\n\t\t\t}\r\n\r\n\t\t\tif(nextIndex < 0){\r\n\t\t\t\tnextIndex = 0;\r\n\t\t\t}\r\n\t\t\tvar options = view.options || view.y_unit;\r\n\r\n\t\t\tif(nextIndex >= options.length){\r\n\t\t\t\tnextIndex = options.length - 1;\r\n\t\t\t}\r\n\t\t\t//nextIndex = nextIndex < 0 ? nextIndex = (view.options || view.y_unit).length -1 : nextIndex;\r\n\r\n\t\t\tif(options[nextIndex]){\r\n\t\t\t\treturn options[nextIndex].key;\r\n\t\t\t}else{\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar isInRange = !(this.start_date.valueOf() < state.min_date.valueOf() || this.start_date.valueOf() >= state.max_date.valueOf());\r\n\r\n\t\t\tif(!isInRange) return false;\r\n\r\n\r\n\t\t\tif(!this.isVisible(this.start_date, this.end_date)) return false;\r\n\r\n\t\t\tvar view = this._getMultisectionView();\r\n\r\n\t\t\tif(view){\r\n\t\t\t\treturn (view.order[this.section] !== undefined);\r\n\t\t\t}else{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\tfallback:function(){\r\n\r\n\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(!defaultSlot.isValid()){\r\n\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t}else{\r\n\t\t\t\treturn defaultSlot;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tgetNodes: function(){\r\n\t\t\treturn Array.prototype.slice.call(scheduler.$container.querySelectorAll(\".dhx_focus_slot\"));\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\treturn this.getNodes()[0];\r\n\t\t},\r\n\r\n\t\tfocus: function(){\r\n\t\t\tif(this.section && scheduler.getView() && scheduler.getView().smart_rendering && scheduler.getView().scrollTo && !scheduler.$container.querySelector(`[data-section-id=\"${this.section}\"]`)){\r\n\t\t\t\tscheduler.getView().scrollTo({section: this.section});\r\n\t\t\t}\r\n\t\t\tscheduler.$keyboardNavigation.marker.render(this.start_date, this.end_date, this.section);\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t\tscheduler.$keyboardNavigation._pasteDate = this.start_date;\r\n\t\t\tscheduler.$keyboardNavigation._pasteSection = this.section;\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t\tscheduler.$keyboardNavigation.marker.clear();\r\n\t\t},\r\n\r\n\t\t_modes: scheduler.$keyboardNavigation.SchedulerNode.prototype._modes,\r\n\r\n\t\t_getMode: scheduler.$keyboardNavigation.SchedulerNode.prototype.getMode,\r\n\r\n\t\taddMonthDate: function(date, dir, extend){\r\n\t\t\tvar res;\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tres = scheduler.date.add(date, -1, \"week\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tres = scheduler.date.add(date, 1, \"week\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tres = scheduler.date.day_start(scheduler.date.add(date, -1, \"day\"));\r\n\t\t\t\t\tres = this.findVisibleColumn(res, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tres = scheduler.date.day_start(scheduler.date.add(date, 1, \"day\"));\r\n\t\t\t\t\tres = this.findVisibleColumn(res, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tres = scheduler.date.day_start(new Date(date));\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tif(date.valueOf() < state.min_date.valueOf() || (!extend && date.valueOf() >= state.max_date.valueOf())){\r\n\t\t\t\tres = new Date(state.min_date);\r\n\t\t\t}\r\n\r\n\t\t\treturn res;\r\n\t\t},\r\n\r\n\t\tnextMonthSlot: function(slot, dir, extend){\r\n\r\n\t\t\tvar start, end;\r\n\t\t\tstart = this.addMonthDate(slot.start_date, dir, extend);\r\n\r\n\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\tend = new Date(start);\r\n\t\t\tend.setHours(scheduler.config.last_hour);\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\r\n\t\t_alignTimeSlot: function(date, minDate, unit, step){\r\n\t\t\tvar currentDate = new Date(minDate);\r\n\t\t\twhile(currentDate.valueOf() < date.valueOf()){\r\n\t\t\t\tcurrentDate = scheduler.date.add(currentDate, step, unit);\r\n\t\t\t}\r\n\r\n\t\t\tif(currentDate.valueOf() > date.valueOf()){\r\n\t\t\t\tcurrentDate = scheduler.date.add(currentDate, -step, unit);\r\n\t\t\t}\r\n\r\n\t\t\treturn currentDate;\r\n\t\t},\r\n\r\n\t\tnextTimelineSlot: function(slot, dir, extend){\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view = scheduler.matrix[state.mode];\r\n\r\n\t\t\tvar startDate = this._alignTimeSlot(slot.start_date, scheduler.date[view.name + \"_start\"](new Date(slot.start_date)), view.x_unit, view.x_step);\r\n\t\t\tvar endDate = this._alignTimeSlot(slot.end_date, scheduler.date[view.name + \"_start\"](new Date(slot.end_date)), view.x_unit, view.x_step);\r\n\r\n\t\t\tif(endDate.valueOf() <= startDate.valueOf()){\r\n\t\t\t\tendDate = scheduler.date.add(startDate, view.x_step, view.x_unit);\r\n\t\t\t}\r\n\t\t\tvar newPos = this.clone(slot);\r\n\t\t\tnewPos.start_date = startDate;\r\n\t\t\tnewPos.end_date = endDate;\r\n\t\t\tnewPos.section = slot.section || this._getNextSection();\r\n\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tnewPos.section = this._getNextSection(slot.section, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tnewPos.section = this._getNextSection(slot.section, +1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tnewPos.start_date = this.findVisibleColumn(scheduler.date.add(newPos.start_date, -view.x_step, view.x_unit), -1);\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tnewPos.start_date = this.findVisibleColumn(scheduler.date.add(newPos.start_date, view.x_step, view.x_unit), 1);\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(newPos.start_date.valueOf() < state.min_date.valueOf() || newPos.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tif(extend && newPos.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\t\tnewPos.start_date = new Date(state.max_date);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tnewPos.start_date = scheduler.date[state.mode + \"_start\"](scheduler.date.add(state.date, dir == \"left\" ? -1 : 1, state.mode));\r\n\t\t\t\t\tnewPos.end_date = scheduler.date.add(newPos.start_date, view.x_step, view.x_unit);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn newPos;\r\n\t\t},\r\n\r\n\t\tnextUnitsSlot: function(slot, dir, extend){\r\n\t\t\tvar newPos = this.clone(slot);\r\n\t\t\tnewPos.section = slot.section || this._getNextSection();\r\n\r\n\t\t\tvar section = slot.section || this._getNextSection();\r\n\t\t\tvar state = scheduler.getState();\r\n\t\t\tvar view = scheduler._props[state.mode];\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tsection = this._getNextSection(slot.section, -1);\r\n\t\t\t\t\tvar optionsCount = view.size ? (view.size - 1) : view.options.length;\r\n\r\n\t\t\t\t\tif(view.days > 1 && (view.order[section] == optionsCount - 1)){\r\n\t\t\t\t\t\tif(scheduler.date.add(slot.start_date, -1, \"day\").valueOf() >= state.min_date.valueOf()){\r\n\t\t\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tsection = this._getNextSection(slot.section, 1);\r\n\t\t\t\t\tif(view.days > 1 && !view.order[section]){\r\n\t\t\t\t\t\tif(scheduler.date.add(slot.start_date, 1, \"day\").valueOf() < state.max_date.valueOf()){\r\n\t\t\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnewPos = this.nextDaySlot(slot, dir, extend);\r\n\t\t\t\t\tsection = slot.section;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tnewPos.section = section;\r\n\t\t\treturn newPos;\r\n\t\t},\r\n\r\n\t\t_moveDate: function(oldDate, dir){\r\n\t\t\tvar newDate = this.findVisibleColumn(scheduler.date.add(oldDate, dir, \"day\"), dir);\r\n\t\t\tnewDate.setHours(oldDate.getHours());\r\n\t\t\tnewDate.setMinutes(oldDate.getMinutes());\r\n\t\t\treturn newDate;\r\n\t\t},\r\n\r\n\t\tisBeforeLastHour: function(date, isStartDate){\r\n\t\t\tvar minutes = date.getMinutes(),\r\n\t\t\t\thours = date.getHours(),\r\n\t\t\t\tlast_hour = scheduler.config.last_hour;\r\n\t\t\treturn (hours < last_hour || (!isStartDate && ((last_hour == 24 || hours == last_hour) && !minutes)));\r\n\t\t},\r\n\t\tisAfterFirstHour: function(date, isStartDate){\r\n\t\t\tvar minutes = date.getMinutes(),\r\n\t\t\t\thours = date.getHours(),\r\n\t\t\t\tfirst_hour = scheduler.config.first_hour,\r\n\t\t\t\tlast_hour = scheduler.config.last_hour;\r\n\t\t\treturn (hours >= first_hour || (!isStartDate && (!minutes && ((!hours && last_hour == 24) || (hours == last_hour)))));\r\n\t\t},\r\n\t\tisInVisibleDayTime: function(date, isStartDate){\r\n\t\t\treturn (this.isBeforeLastHour(date, isStartDate) && this.isAfterFirstHour(date, isStartDate));\r\n\t\t},\r\n\r\n\t\tnextDaySlot: function(slot, dir, extend){\r\n\t\t\tvar start, end;\r\n\r\n\t\t\tvar key_nav_step = scheduler.config.key_nav_step;\r\n\r\n\t\t\tvar date = this._alignTimeSlot(slot.start_date, scheduler.date.day_start(new Date(slot.start_date)), \"minute\", key_nav_step);\r\n\r\n\r\n\t\t\tvar oldStart = slot.start_date;\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tstart = scheduler.date.add(date, -key_nav_step, \"minute\");\r\n\r\n\t\t\t\t\tif(!this.isInVisibleDayTime(start, true)){\r\n\t\t\t\t\t\tif (!extend || this.isInVisibleDayTime(oldStart, true)) {\r\n\r\n\t\t\t\t\t\t\tvar toNextDay = true;\r\n\t\t\t\t\t\t\tif(extend && scheduler.date.date_part(new Date(start)).valueOf() != scheduler.date.date_part(new Date(oldStart)).valueOf())\r\n\t\t\t\t\t\t\t\ttoNextDay = false;\r\n\t\t\t\t\t\t\tif(toNextDay)\r\n\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, -1, \"day\"), -1);\r\n\r\n\t\t\t\t\t\t\tstart.setHours(scheduler.config.last_hour);\r\n\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\tstart = scheduler.date.add(start, -key_nav_step, \"minute\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\t\tstart = scheduler.date.add(date, key_nav_step, \"minute\");\r\n\r\n\t\t\t\t\tvar testEnd = extend ? start : scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tif(!this.isInVisibleDayTime(testEnd, false)){\r\n\t\t\t\t\t\tif(!extend || this.isInVisibleDayTime(oldStart, false)) {\r\n\t\t\t\t\t\t\tif (!extend) {\r\n\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, 1, \"day\"), 1);\r\n\t\t\t\t\t\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tvar toNextDay = true;\r\n\t\t\t\t\t\t\t\tif (scheduler.date.date_part(new Date(oldStart)).valueOf() == oldStart.valueOf()) {\r\n\t\t\t\t\t\t\t\t\ttoNextDay = false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (toNextDay) {\r\n\t\t\t\t\t\t\t\t\tstart = this.findVisibleColumn(scheduler.date.add(slot.start_date, 1, \"day\"), 1);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tstart.setHours(scheduler.config.first_hour);\r\n\t\t\t\t\t\t\t\tstart.setMinutes(0);\r\n\t\t\t\t\t\t\t\tstart = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tstart = this._moveDate(slot.start_date, -1);\r\n\t\t\t\t\tend = this._moveDate(slot.end_date, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tstart = this._moveDate(slot.start_date, 1);\r\n\t\t\t\t\tend = this._moveDate(slot.end_date, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tstart = date;\r\n\t\t\t\t\tend = scheduler.date.add(start, key_nav_step, \"minute\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\t\tnextWeekAgendaSlot: function(slot, dir){\r\n\t\t\tvar start, end;\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tswitch (dir){\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tstart = scheduler.date.day_start(scheduler.date.add(slot.start_date, -1, \"day\"));\r\n\t\t\t\t\tstart = this.findVisibleColumn(start, -1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\tstart = scheduler.date.day_start(scheduler.date.add(slot.start_date, 1, \"day\"));\r\n\t\t\t\t\tstart = this.findVisibleColumn(start, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tstart = scheduler.date.day_start(slot.start_date);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif(slot.start_date.valueOf() < state.min_date.valueOf() || slot.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tstart = new Date(state.min_date);\r\n\r\n\t\t\t}\r\n\t\t\tend = new Date(start);\r\n\t\t\tend.setHours(scheduler.config.last_hour);\r\n\t\t\treturn {start_date: start, end_date: end};\r\n\t\t},\r\n\t\tnextAgendaSlot: function(slot, dir){\r\n\t\t\treturn {start_date: slot.start_date, end_date: slot.end_date};\r\n\t\t},\r\n\r\n\r\n\t\tisDateVisible: function(date){\r\n\t\t\tif(!scheduler._ignores_detected)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[scheduler.getState().mode];\r\n\r\n\t\t\tvar index;\r\n\t\t\tif(timeline){\r\n\t\t\t\tindex = scheduler._get_date_index(timeline, date);\r\n\t\t\t}else{\r\n\t\t\t\tindex = scheduler.locate_holder_day(date);\r\n\t\t\t}\r\n\r\n\t\t\treturn !scheduler._ignores[index];\r\n\t\t},\r\n\r\n\t\tfindVisibleColumn: function(start, dir){\r\n\t\t\tvar date = start;\r\n\t\t\tdir = dir || 1;\r\n\t\t\tvar range = scheduler.getState();\r\n\r\n\t\t\twhile(!this.isDateVisible(date) && ((dir > 0 && date.valueOf() <= range.max_date.valueOf()) || (dir < 0 && date.valueOf() >= range.min_date.valueOf()))){\r\n\t\t\t\tdate = this.nextDateColumn(date, dir);\r\n\t\t\t}\r\n\r\n\t\t\treturn date;\r\n\t\t},\r\n\r\n\t\tnextDateColumn: function(start, dir){\r\n\t\t\tdir = dir || 1;\r\n\t\t\tvar timeline = scheduler.matrix && scheduler.matrix[scheduler.getState().mode];\r\n\r\n\t\t\tvar date;\r\n\t\t\tif(timeline){\r\n\t\t\t\tdate = scheduler.date.add(start, dir * timeline.x_step, timeline.x_unit);\r\n\t\t\t}else{\r\n\t\t\t\tdate = scheduler.date.day_start(scheduler.date.add(start, dir, \"day\"));\r\n\t\t\t}\r\n\r\n\t\t\treturn date;\r\n\t\t},\r\n\r\n\t\tisVisible:function(from, to){\r\n\t\t\tif(!scheduler._ignores_detected)\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tvar current = new Date(from);\r\n\r\n\t\t\twhile(current.valueOf() < to.valueOf()){\r\n\t\t\t\tif(this.isDateVisible(current)) return true;\r\n\t\t\t\tcurrent = this.nextDateColumn(current);\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t},\r\n\r\n\t\tnextSlot: function(slot, dir, view, extend){\r\n\t\t\tvar next;\r\n\t\t\tview = view || this._getMode();\r\n\r\n\t\t\tvar tempSlot = scheduler.$keyboardNavigation.TimeSlot.prototype.clone(slot);\r\n\r\n\t\t\tswitch (view){\r\n\t\t\t\tcase this._modes.units:\r\n\t\t\t\t\tnext = this.nextUnitsSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.timeline:\r\n\t\t\t\t\tnext = this.nextTimelineSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.year:\r\n\t\t\t\t\tnext = this.nextMonthSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.month:\r\n\t\t\t\t\tnext = this.nextMonthSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.weekAgenda:\r\n\t\t\t\t\tnext = this.nextWeekAgendaSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.list:\r\n\t\t\t\t\tnext = this.nextAgendaSlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.dayColumns:\r\n\t\t\t\t\tnext = this.nextDaySlot(tempSlot, dir, extend);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif(next.start_date.valueOf() >= next.end_date.valueOf()){\r\n\t\t\t\tnext = this.nextSlot(next, dir, view);\r\n\t\t\t}\r\n\r\n\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(next);\r\n\r\n\t\t},\r\n\r\n\t\textendSlot: function(slot, dir){\r\n\t\t\tvar view = this._getMode();\r\n\t\t\tvar next;\r\n\t\t\tswitch (view){\r\n\t\t\t\tcase this._modes.units:\r\n\t\t\t\t\tif(dir == \"left\" || dir == \"right\"){\r\n\t\t\t\t\t\tnext = this.nextUnitsSlot(slot, dir);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnext = this.extendUnitsSlot(slot, dir);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.timeline:\r\n\t\t\t\t\tif(dir == \"down\" || dir == \"up\"){\r\n\t\t\t\t\t\tnext = this.nextTimelineSlot(slot, dir);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnext = this.extendTimelineSlot(slot, dir);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.year:\r\n\t\t\t\t\tnext = this.extendMonthSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.month:\r\n\t\t\t\t\tnext = this.extendMonthSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.dayColumns:\r\n\t\t\t\t\tnext = this.extendDaySlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase this._modes.weekAgenda:\r\n\t\t\t\t\tnext = this.extendWeekAgendaSlot(slot, dir);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnext = slot;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tvar range = scheduler.getState();\r\n\t\t\tif(next.start_date.valueOf() < range.min_date.valueOf()){\r\n\t\t\t\tnext.start_date = this.findVisibleColumn(range.min_date);\r\n\t\t\t\tnext.start_date.setHours(scheduler.config.first_hour);\r\n\t\t\t}\r\n\r\n\t\t\tif(next.end_date.valueOf() > range.max_date.valueOf()){\r\n\t\t\t//\tnext.end_date = new Date(slot.end_date);\r\n\t\t\t\tnext.end_date = this.findVisibleColumn(range.max_date, -1);\r\n\t\t\t}\r\n\r\n\r\n\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(next);\r\n\t\t},\r\n\r\n\t\textendTimelineSlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"timeline\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\textendWeekAgendaSlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"weekAgenda\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\textendGenericSlot: function(allowedDirections, slot, direction, type){\r\n\t\t\tvar next;\r\n\t\t\tvar moveDate = slot.movingDate;\r\n\r\n\t\t\tif(!moveDate){\r\n\t\t\t\tmoveDate = allowedDirections[direction];\r\n\t\t\t}\r\n\r\n\t\t\tif(!moveDate || !allowedDirections[direction]){\r\n\t\t\t\treturn slot;\r\n\t\t\t}\r\n\r\n\t\t\tif(direction){\r\n\t\t\t\tnext = this.nextSlot({start_date: slot[moveDate], section: slot.section}, direction, type, true);\r\n\r\n\t\t\t\tif(next.start_date.valueOf() == slot.start_date.valueOf()){\r\n\t\t\t\t\tnext = this.nextSlot({start_date: next.start_date, section:next.section}, direction, type, true);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tnext.movingDate = moveDate;\r\n\t\t\t}else{\r\n\t\t\t\treturn scheduler.$keyboardNavigation.TimeSlot.prototype.clone(slot);\r\n\t\t\t}\r\n\r\n\t\t\tvar newDates = this.extendSlotDates(slot, next, next.movingDate);\r\n\r\n\t\t\tif(newDates.end_date.valueOf() <= newDates.start_date.valueOf()){\r\n\t\t\t\tnext.movingDate = next.movingDate == \"end_date\" ? \"start_date\" : \"end_date\";\r\n\t\t\t}\r\n\t\t\tnewDates = this.extendSlotDates(slot, next, next.movingDate);\r\n\r\n\t\t\tnext.start_date = newDates.start_date;\r\n\t\t\tnext.end_date = newDates.end_date;\r\n\t\t\treturn next;\r\n\t\t},\r\n\r\n\t\textendSlotDates: function(oldSlot, newSlot, dateDirection){\r\n\t\t\tvar res = {start_date:null, end_date:null};\r\n\r\n\t\t\tif(dateDirection == \"start_date\"){\r\n\t\t\t\tres.start_date = newSlot.start_date;\r\n\t\t\t\tres.end_date = oldSlot.end_date;\r\n\t\t\t}else{\r\n\t\t\t\tres.start_date = oldSlot.start_date;\r\n\t\t\t\tres.end_date = newSlot.start_date;\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\r\n\t\t},\r\n\r\n\t\textendMonthSlot: function(slot, direction){\r\n\t\t\tvar slot = this.extendGenericSlot({\r\n\t\t\t\t\t\"up\":\"start_date\",\r\n\t\t\t\t\t\"down\":\"end_date\",\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"month\"\r\n\t\t\t);\r\n\r\n\t\t\tslot.start_date.setHours(scheduler.config.first_hour);\r\n\t\t\tslot.end_date = scheduler.date.add(slot.end_date, -1, \"day\");\r\n\t\t\tslot.end_date.setHours(scheduler.config.last_hour);\r\n\t\t\treturn slot;\r\n\t\t},\r\n\r\n\t\textendUnitsSlot: function(slot, direction){\r\n\t\t\tvar next;\r\n\r\n\t\t\tswitch (direction){\r\n\t\t\t\tcase \"down\":\r\n\t\t\t\tcase \"up\":\r\n\t\t\t\t\tnext = this.extendDaySlot(slot, direction);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tnext = slot;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tnext.section = slot.section;\r\n\t\t\treturn next;\r\n\t\t},\r\n\t\textendDaySlot: function(slot, direction){\r\n\t\t\treturn this.extendGenericSlot({\r\n\t\t\t\t\t\"up\":\"start_date\",\r\n\t\t\t\t\t\"down\":\"end_date\",\r\n\t\t\t\t\t\"left\":\"start_date\",\r\n\t\t\t\t\t\"right\":\"end_date\"\r\n\t\t\t\t},\r\n\t\t\t\tslot,\r\n\t\t\t\tdirection,\r\n\t\t\t\t\"dayColumns\"\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\tscrollSlot: function(dir){\r\n\t\t\tvar state = scheduler.getState();\r\n\r\n\t\t\tvar slot = this.nextSlot(this, dir);\r\n\t\t\tif(slot.start_date.valueOf() < state.min_date.valueOf() || slot.start_date.valueOf() >= state.max_date.valueOf()){\r\n\t\t\t\tscheduler.setCurrentView(new Date(slot.start_date));\r\n\t\t\t}\r\n\r\n\t\t\tthis.moveTo(slot);\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"left\": function(){\r\n\t\t\t\tthis.scrollSlot(\"left\");\r\n\t\t\t},\r\n\t\t\t\"right\": function () {\r\n\t\t\t\tthis.scrollSlot(\"right\");\r\n\t\t\t},\r\n\t\t\t\"down\": function () {\r\n\r\n\t\t\t\tvar mode = this._getMode();\r\n\t\t\t\tif(mode == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.nextEventHandler();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.scrollSlot(\"down\");\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"up\": function () {\r\n\t\t\t\tvar mode = this._getMode();\r\n\t\t\t\tif(mode == this._modes.list){\r\n\t\t\t\t\tscheduler.$keyboardNavigation.SchedulerNode.prototype.prevEventHandler();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.scrollSlot(\"up\");\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\t\"shift+down\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"down\"));\r\n\t\t\t},\r\n\t\t\t\"shift+up\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"up\"));\r\n\t\t\t},\r\n\t\t\t\"shift+right\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"right\"));\r\n\t\t\t},\r\n\t\t\t\"shift+left\":function(){\r\n\t\t\t\tthis.moveTo(this.extendSlot(this, \"left\"));\r\n\t\t\t},\r\n\r\n\r\n\t\t\t\"enter\": function(){\r\n\t\t\t\tvar obj = {start_date: new Date(this.start_date), end_date: new Date(this.end_date)};\r\n\r\n\t\t\t\tvar mode = scheduler.getState().mode;\r\n\t\t\t\tif(scheduler.matrix && scheduler.matrix[mode]){\r\n\r\n\t\t\t\t\tvar timeline = scheduler.matrix[scheduler.getState().mode];\r\n\t\t\t\t\tobj[timeline.y_property] = this.section;\r\n\t\t\t\t}else if(scheduler._props && scheduler._props[mode]){\r\n\t\t\t\t\tvar unit = scheduler._props[mode];\r\n\t\t\t\t\tobj[unit.map_to] = this.section;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscheduler.addEventNow(obj);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.TimeSlot.prototype.bindAll(scheduler.$keyboardNavigation.TimeSlot.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.MinicalButton = function(div, index){\r\n\tthis.container = div;\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.MinicalButton.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar container = this.container;\r\n\t\t\treturn !!container.offsetWidth;// valid if container is visible\r\n\t\t},\r\n\r\n\t\tfallback: function(){\r\n\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(defaultSlot.isValid()){\r\n\t\t\t\treturn defaultSlot;\r\n\t\t\t}else{\r\n\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t}\r\n\t\t},\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.globalNode.disable();\r\n\t\t\tthis.container.removeAttribute(\"tabindex\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tthis.container.setAttribute(\"tabindex\", \"0\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\tif(!this.index){\r\n\t\t\t\treturn this.container.querySelector(\".dhx_cal_prev_button\");\r\n\t\t\t}else{\r\n\t\t\t\treturn this.container.querySelector(\".dhx_cal_next_button\");\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"right\": function(e){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, this.index ? 0 : 1));\r\n\t\t\t},\r\n\t\t\t\"left\": function(e){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, this.index ? 0 : 1));\r\n\t\t\t},\r\n\t\t\t\"down\": function(){\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, 0, 0);\r\n\t\t\t\tif(next && !next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"enter\": function(e){\r\n\t\t\t\tthis.getNode().click();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.MinicalButton.prototype.bindAll(scheduler.$keyboardNavigation.MinicalButton.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.MinicalCell = function(div, row, col){\r\n\tthis.container = div;\r\n\tthis.row = row || 0;\r\n\tthis.col = col || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.MinicalCell.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\r\n\t\tisValid: function(){\r\n\t\t\tvar grid = this._getGrid();\r\n\t\t\treturn !!(grid[this.row] && grid[this.row][this.col]);\r\n\t\t},\r\n\t\tfallback: function(){\r\n\t\t\tvar row = this.row;\r\n\t\t\tvar col = this.col;\r\n\t\t\tvar grid = this._getGrid();\r\n\t\t\tif(!grid[row]){\r\n\t\t\t\trow = 0;\r\n\t\t\t}\r\n\t\t\tvar dir = true;\r\n\t\t\tif(row > grid.length / 2){\r\n\t\t\t\tdir = false;\r\n\t\t\t}\r\n\r\n\t\t\tif(!grid[row]){\r\n\t\t\t\tvar defaultSlot = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t\tif(defaultSlot.isValid()){\r\n\t\t\t\t\treturn defaultSlot;\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn new scheduler.$keyboardNavigation.DataArea();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(dir){\r\n\t\t\t\tfor(var c = col; grid[row] && c < grid[row].length; c++){\r\n\t\t\t\t\tif(!grid[row][c] && c == grid[row].length - 1){\r\n\t\t\t\t\t\trow++;\r\n\t\t\t\t\t\tcol = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(grid[row][c]){\r\n\t\t\t\t\t\treturn new scheduler.$keyboardNavigation.MinicalCell(this.container, row, c);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tfor(var c = col; grid[row] && c < grid[row].length; c--){\r\n\t\t\t\t\tif(!grid[row][c] && !c){\r\n\t\t\t\t\t\trow--;\r\n\t\t\t\t\t\tcol = grid[row].length - 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(grid[row][c]){\r\n\t\t\t\t\t\treturn new scheduler.$keyboardNavigation.MinicalCell(this.container, row, c);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn new scheduler.$keyboardNavigation.MinicalButton(this.container, 0);\r\n\t\t},\r\n\t\tfocus: function(){\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.globalNode.disable();\r\n\r\n\t\t\tthis.container.removeAttribute(\"tabindex\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this);\r\n\t\t},\r\n\t\tblur: function(){\r\n\t\t\tthis.container.setAttribute(\"tabindex\", \"0\");\r\n\t\t\tscheduler.$keyboardNavigation.KeyNavNode.prototype.blur.apply(this);\r\n\t\t},\r\n\t\t_getNode: function(row, col){\r\n\t\t\treturn this.container.querySelector(\".dhx_year_body tr:nth-child(\"+(row + 1) + \") td:nth-child(\"+(col + 1)+\")\");\r\n\t\t},\r\n\t\tgetNode: function(){\r\n\t\t\treturn this._getNode(this.row, this.col);\r\n\t\t},\r\n\r\n\t\t_getGrid: function(){\r\n\t\t\tvar rows = this.container.querySelectorAll(\".dhx_year_body tr\");\r\n\t\t\tvar grid = [];\r\n\t\t\tfor(var i = 0; i < rows.length; i++){\r\n\t\t\t\tgrid[i] = [];\r\n\t\t\t\tvar row = rows[i];\r\n\t\t\t\tvar cells = row.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var c = 0; c < cells.length; c++){\r\n\t\t\t\t\tvar cell = cells[c];\r\n\t\t\t\t\tvar enabled = true;\r\n\t\t\t\t\tvar css = scheduler._getClassName(cell);\r\n\t\t\t\t\tif(css.indexOf(\"dhx_after\") > -1 || css.indexOf(\"dhx_before\") > -1 || css.indexOf(\"dhx_scale_ignore\") > -1){\r\n\t\t\t\t\t\tenabled = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tgrid[i][c] = enabled;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn grid;\r\n\t\t},\r\n\r\n\r\n\t\tkeys: {\r\n\t\t\t\"right\": function(e){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row;\r\n\t\t\t\tvar newCol = this.col + 1;\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tif(grid[newRow + 1]){\r\n\t\t\t\t\t\tnewRow = newRow + 1;\r\n\t\t\t\t\t\tnewCol = 0;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnewCol = this.col;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"left\": function(e){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row;\r\n\t\t\t\tvar newCol = this.col - 1;\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tif(grid[newRow - 1]){\r\n\t\t\t\t\t\tnewRow = newRow - 1;\r\n\t\t\t\t\t\tnewCol = grid[newRow].length - 1;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tnewCol = this.col;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"down\": function(){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row + 1;\r\n\t\t\t\tvar newCol = this.col;\r\n\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tnewRow = this.row;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.moveTo(next);\r\n\t\t\t},\r\n\t\t\t\"up\": function(){\r\n\t\t\t\tvar grid = this._getGrid();\r\n\t\t\t\tvar newRow = this.row - 1;\r\n\t\t\t\tvar newCol = this.col;\r\n\r\n\t\t\t\tif(!grid[newRow] || !grid[newRow][newCol]){\r\n\t\t\t\t\tvar index = 0;\r\n\t\t\t\t\tif(this.col > grid[this.row].length / 2){\r\n\t\t\t\t\t\tindex = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.MinicalButton(this.container, index));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar next = new scheduler.$keyboardNavigation.MinicalCell(this.container, newRow, newCol);\r\n\t\t\t\t\tif(!next.isValid()){\r\n\t\t\t\t\t\tnext = next.fallback();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.moveTo(next);\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\t\t\t\"enter\": function(e){\r\n\t\t\t\tthis.getNode().querySelector(\".dhx_month_head\").click();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.MinicalCell.prototype.bindAll(scheduler.$keyboardNavigation.MinicalCell.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.DataArea = function(index){\r\n\tthis.index = index || 0;\r\n};\r\n\r\nscheduler.$keyboardNavigation.DataArea.prototype = scheduler._compose(\r\n\tscheduler.$keyboardNavigation.KeyNavNode,\r\n\t{\r\n\t\tgetNode: function(index){\r\n\t\t\treturn scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t},\r\n\r\n\t\t_handlers:null,\r\n\r\n\t\tisValid: function(){\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tfallback:function(){\r\n\t\t\treturn this;\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\t\"up,down,right,left\":function(){\r\n\t\t\t\tthis.moveTo(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n);\r\n\r\nscheduler.$keyboardNavigation.DataArea.prototype.bindAll(scheduler.$keyboardNavigation.DataArea.prototype.keys);\r\n\r\n}","export default function(scheduler){\r\n\r\n\r\n\r\n(function(){\r\n\tvar modalsStack = [];\r\n\r\n\tfunction isModal(){\r\n\t\treturn !!(modalsStack.length);\r\n\t}\r\n\r\n\tfunction isChildOf(child, parent){\r\n\t\twhile(child && child != parent){\r\n\t\t\tchild = child.parentNode;\r\n\t\t}\r\n\r\n\t\treturn !!(child == parent);\r\n\t}\r\n\r\n\tfunction afterPopup(box){\r\n\t\tsetTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif(!isModal() && !(isChildOf(document.activeElement, scheduler.$container))) {\r\n\t\t\t\tscheduler.focus();\r\n\t\t\t}\r\n\t\t}, 1);\r\n\t}\r\n\tfunction startModal(box){\r\n\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\tscheduler.event(box, \"keydown\", trapFocus);\r\n\t\tmodalsStack.push(box);\r\n\t\t//scheduler.$keyboardNavigation.dispatcher.disable();\r\n\t}\r\n\r\n\tfunction endModal(){\r\n\t\tvar box = modalsStack.pop();\r\n\t\tif(box) {\r\n\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t}\r\n\t\tafterPopup(box);\r\n\r\n\t}\r\n\r\n\tfunction isTopModal(box){\r\n\t//\tif(dhtmlx._modalsStack.length){\r\n\t//\t\treturn box == dhtmlx._modalsStack[dhtmlx._modalsStack.length - 1];\r\n\t//\t}else{\r\n\t\t\treturn box == modalsStack[modalsStack.length - 1];\r\n\t//\t}\r\n\r\n\t}\r\n\r\n\tfunction trapFocus(event){\r\n\t\tvar event = event || window.event;\r\n\t\tvar target = event.currentTarget;\r\n\t\tif(!isTopModal(target)) return;\r\n\r\n\t\tscheduler.$keyboardNavigation.trapFocus(target, event);\r\n\t}\r\n\r\n\tfunction traceLightbox(){\r\n\t\tstartModal(scheduler.getLightbox());\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onLightbox\", traceLightbox);\r\n\tscheduler.attachEvent(\"onAfterLightbox\", endModal);\r\n\r\n\tscheduler.attachEvent(\"onAfterQuickInfo\", function(){afterPopup();});\r\n\r\n\tif(!scheduler._keyNavMessagePopup) {\r\n\t\tscheduler._keyNavMessagePopup = true;\r\n\r\n\t\tvar focusElement = null;\r\n\t\tvar backupFocus = null;\r\n\t\tconst modalsStack = [];\r\n\t\tscheduler.attachEvent(\"onMessagePopup\", function(box){\r\n\t\t\tfocusElement = document.activeElement;\r\n\t\t\tbackupFocus = focusElement;\r\n\r\n\t\t\twhile(backupFocus && scheduler._getClassName(backupFocus).indexOf(\"dhx_cal_data\") < 0){\r\n\t\t\t\tbackupFocus = backupFocus.parentNode;\r\n\t\t\t}\r\n\t\t\tif(backupFocus){\r\n\t\t\t\tbackupFocus = backupFocus.parentNode;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t\tscheduler.event(box, \"keydown\", trapFocus);\r\n\t\t\tmodalsStack.push(box);\r\n\t\t});\r\n\r\n\r\n\t\tscheduler.attachEvent(\"onAfterMessagePopup\", function () {\r\n\t\t\tvar box = modalsStack.pop();\r\n\t\t\tif(box) {\r\n\t\t\t\tscheduler.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t\t}\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tvar currentTarget = document.activeElement;\r\n\t\t\t\twhile(currentTarget && scheduler._getClassName(currentTarget).indexOf(\"dhx_cal_light\") < 0){\r\n\t\t\t\t\tcurrentTarget = currentTarget.parentNode;\r\n\t\t\t\t}\r\n\t\t\t\tif(currentTarget)\r\n\t\t\t\t\treturn;\r\n\r\n\r\n\t\t\t\tif(focusElement && focusElement.parentNode){\r\n\t\t\t\t\tfocusElement.focus();\r\n\r\n\t\t\t\t}else if(backupFocus && backupFocus.parentNode){\r\n\t\t\t\t\tbackupFocus.focus();\r\n\t\t\t\t}\r\n\t\t\t\tfocusElement = null;\r\n\t\t\t\tbackupFocus = null;\r\n\r\n\t\t\t}, 1);\r\n\t\t});\r\n\t}\r\n\r\n\tscheduler.$keyboardNavigation.isModal = isModal;\r\n\r\n\r\n})();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.dispatcher = {\r\n\tisActive: false,\r\n\tactiveNode: null,\r\n\tglobalNode: new scheduler.$keyboardNavigation.SchedulerNode(),\r\n\r\n\tkeepScrollPosition: function (callback) {\r\n\t\tvar top, left;\r\n\r\n\t\tvar scrollable = scheduler.$container.querySelector(\".dhx_timeline_scrollable_data\");\r\n\t\tif(!scrollable){\r\n\t\t\tscrollable = scheduler.$container.querySelector(\".dhx_cal_data\");\r\n\t\t}\r\n\r\n\t\tif(scrollable){\r\n\t\t\ttop = scrollable.scrollTop;\r\n\t\t\tleft = scrollable.scrollLeft;\r\n\t\t}\r\n\r\n\t\tcallback();\r\n\r\n\t\tif(scrollable){\r\n\t\t\tscrollable.scrollTop = top;\r\n\t\t\tscrollable.scrollLeft = left;\r\n\t\t}\r\n\t},\r\n\tenable: function(){\r\n\t\tif(!scheduler.$container){\r\n\t\t\t// do nothing if not initialized\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.isActive = true;\r\n\t\tvar self = this;\r\n\t\tthis.keepScrollPosition(function () {\r\n\t\t\tself.globalNode.enable();\r\n\t\t\tself.setActiveNode(self.getActiveNode());\r\n\t\t});\r\n\t},\r\n\r\n\tdisable: function(){\r\n\t\tthis.isActive = false;\r\n\t\tthis.globalNode.disable();\r\n\t},\r\n\r\n\tisEnabled: function(){\r\n\t\treturn !!this.isActive;\r\n\t},\r\n\r\n\tgetDefaultNode: function(){\r\n\t\treturn this.globalNode.getDefaultNode();\r\n\t},\r\n\r\n\tsetDefaultNode: function() {\r\n\t\tthis.setActiveNode(this.getDefaultNode());\r\n\t},\r\n\r\n\tgetActiveNode: function(){\r\n\t\tvar node = this.activeNode;\r\n\t\tif(node && !node.isValid()){\r\n\t\t\tnode = node.fallback();\r\n\t\t}\r\n\t\treturn node;\r\n\t},\r\n\r\n\tfocusGlobalNode: function(){\r\n\t\tthis.blurNode(this.globalNode);\r\n\t\tthis.focusNode(this.globalNode);\r\n\t},\r\n\r\n\tsetActiveNode: function(el){\r\n\t\tif(!el || !el.isValid())\r\n\t\t\treturn;\r\n\r\n\t\tif(this.activeNode){\r\n\t\t\tif(this.activeNode.compareTo(el)){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(this.isEnabled()){\r\n\t\t\tthis.blurNode(this.activeNode);\r\n\t\t\tthis.activeNode = el;\r\n\t\t\tthis.focusNode(this.activeNode);\r\n\t\t}\r\n\t},\r\n\r\n\tfocusNode: function(el){\r\n\t\tif(el && el.focus){\r\n\t\t\tel.focus();\r\n\t\t\tif(el.getNode && document.activeElement != el.getNode()){\r\n\t\t\t\tthis.setActiveNode(new scheduler.$keyboardNavigation.DataArea());\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tblurNode: function(el){\r\n\t\tif(el && el.blur){\r\n\t\t\tel.blur();\r\n\t\t}\r\n\t},\r\n\r\n\tgetInlineEditor: function(id){\r\n\t\tvar editor = scheduler.$container.querySelector(\".dhx_cal_editor[\"+scheduler.config.event_attribute+\"='\"+id+\"'] textarea\");\r\n\t\tif(editor && editor.offsetWidth){\r\n\t\t\t// if exists and visible\r\n\t\t\treturn editor;\r\n\t\t}\r\n\t\treturn null;\r\n\t},\r\n\r\n\tkeyDownHandler: function (e) {\r\n\r\n\t\tif(e.defaultPrevented){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar activeElement = this.getActiveNode();\r\n\r\n\t\tif(scheduler.$keyboardNavigation.isModal() &&\r\n\t\t\t!(activeElement && activeElement.container && scheduler.utils.dom.locateCss({target:activeElement.container}, \"dhx_minical_popup\", false)))\r\n\t\t\treturn;\r\n\r\n\t\tif(scheduler.getState().editor_id && this.getInlineEditor(scheduler.getState().editor_id))\r\n\t\t\treturn;\r\n\r\n\t\tif (!this.isEnabled())\r\n\t\t\treturn;\r\n\r\n\t\te = e || window.event;\r\n\r\n\t\tvar schedulerNode = this.globalNode;\r\n\r\n\t\tvar command = scheduler.$keyboardNavigation.shortcuts.getCommandFromEvent(e);\r\n\r\n\t\tif(!activeElement){\r\n\t\t\tthis.setDefaultNode();\r\n\t\t}else if(activeElement.findHandler(command)){\r\n\t\t\tactiveElement.doAction(command, e);\r\n\t\t}else if(schedulerNode.findHandler(command)){\r\n\t\t\tschedulerNode.doAction(command, e);\r\n\t\t}\r\n\r\n\t},\r\n\r\n\t_timeout: null,\r\n\tdelay: function(callback, delay){\r\n\r\n\t\tclearTimeout(this._timeout);\r\n\t\tthis._timeout = setTimeout(callback, delay || 1);\r\n\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n//Initial idea and implementation by Steve MC\r\nscheduler._temp_key_scope = function (){\r\n\r\n\tscheduler.config.key_nav = true;\r\n\r\n\tscheduler.$keyboardNavigation._pasteDate = null; // used for copy and paste operations\r\n\tscheduler.$keyboardNavigation._pasteSection = null; // used for copy and paste operations\r\n\tvar isCopy = null;\r\n\r\n\tvar pos = {};\r\n\r\n\tif(!document.body){\r\n\t\tscheduler.event(window, \"load\", function(){\r\n\t\t\tscheduler.event(document.body, \"mousemove\", trackMousePosition);\r\n\t\t});\r\n\t}else{\r\n\t\tscheduler.event(document.body, \"mousemove\", trackMousePosition);\r\n\t}\r\n\r\n\tfunction trackMousePosition(event){\r\n\t\tevent = event || window.event;\r\n\t\tpos.x = event.clientX;\r\n\t\tpos.y = event.clientY;\r\n\t}\r\n\tfunction currentTarget(){\r\n\r\n\t\tvar mousePointer = false;\r\n\t\tvar keyNavPointer = false;\r\n\r\n\t\tvar target = document.elementFromPoint(pos.x, pos.y);\r\n\t\twhile(target && target != scheduler._obj){\r\n\t\t\ttarget = target.parentNode;\r\n\t\t}\r\n\t\tmousePointer = !!(target == scheduler._obj);\r\n\r\n\t\tkeyNavPointer = scheduler.$keyboardNavigation.dispatcher.isEnabled();\r\n\r\n\t\treturn mousePointer || keyNavPointer;\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onMouseMove\", function(id,e){\r\n\t\tvar state = scheduler.getState();\r\n\r\n\t\t// make sure scheduler is fully initialized before calling scheduler.getActionData\r\n\t\tif(!(state.mode && state.min_date)){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar position = scheduler.getActionData(e);\r\n\t\tscheduler.$keyboardNavigation._pasteDate = position.date;\r\n\t\tscheduler.$keyboardNavigation._pasteSection = position.section;\r\n\t});\r\n\r\n\tfunction clear_event_after(ev){\r\n\t\tdelete ev.rec_type; delete ev.rec_pattern;\r\n\t\tdelete ev.event_pid; delete ev.event_length;\r\n\t}\r\n\r\n\tfunction copyEvent(ev){\r\n\t\treturn scheduler._lame_copy({}, ev);\r\n\t}\r\n\r\n\tscheduler._make_pasted_event = function(ev){\r\n\t\tvar date = scheduler.$keyboardNavigation._pasteDate;\r\n\t\tvar section = scheduler.$keyboardNavigation._pasteSection;\r\n\r\n\t\tvar event_duration = ev.end_date-ev.start_date;\r\n\r\n\t\tvar copy = copyEvent(ev);\r\n\t\tclear_event_after(copy);\r\n\t\tcopy.start_date = new Date(date);\r\n\t\tcopy.end_date = new Date(copy.start_date.valueOf() + event_duration);\r\n\r\n\t\tif(section){\r\n\t\t\tvar property = scheduler._get_section_property();\r\n\t\t\t// GS-2527: if the event has multiple sections, it will be inserted into the initial sections.\r\n\t\t\tif(scheduler.config.multisection && ev[property] && scheduler.isMultisectionEvent && scheduler.isMultisectionEvent(ev)) \r\n\t\t\t\tcopy[property] = ev[property]; // save initial set of resources for multisection view\r\n\t\t\telse\r\n\t\t\t\tcopy[property] = section;\r\n\t\t}\r\n\t\treturn copy;\r\n\t};\r\n\tscheduler._do_paste = function(is_copy, modified_ev, original_ev){\r\n\t\tif(scheduler.callEvent(\"onBeforeEventPasted\", [is_copy, modified_ev, original_ev]) === false){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tscheduler.addEvent(modified_ev);\r\n\t\tscheduler.callEvent(\"onEventPasted\", [is_copy, modified_ev, original_ev]);\r\n\t};\r\n\r\n\tscheduler._is_key_nav_active = function(){\r\n\t\tif(this._is_initialized() && !this._is_lightbox_open() && this.config.key_nav){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\r\n\tfunction getSelectedEvent(){\r\n\t\tvar node = scheduler.$keyboardNavigation.dispatcher.getActiveNode();\r\n\t\tif(node && node.eventId) return node.eventId;\r\n\t\treturn scheduler._select_id;\r\n\t}\r\n\r\n\tscheduler.event(document, \"keydown\", function(e){\r\n\t\t// compatibility fix - scheduler focus on ctrl+v on mouse hover\r\n\t\tif(((e.ctrlKey || e.metaKey) && e.keyCode == 86) && scheduler._buffer_event && !scheduler.$keyboardNavigation.dispatcher.isEnabled()) {\r\n\t\t\tscheduler.$keyboardNavigation.dispatcher.isActive = currentTarget();\r\n\t\t}\r\n\t});\r\n\r\n\tscheduler._key_nav_copy_paste = function(e){\r\n\t\tif(!scheduler._is_key_nav_active()) return true;\r\n\r\n\t\tif (e.keyCode == 37 || e.keyCode == 39) { // Left, Right arrows\r\n\t\t\te.cancelBubble = true;\r\n\r\n\t\t\tvar next = scheduler.date.add(scheduler._date,(e.keyCode == 37 ? -1 : 1 ),scheduler._mode);\r\n\t\t\tscheduler.setCurrentView(next);\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tvar select_id = getSelectedEvent();\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 67) { // CTRL+C\r\n\t\t\tif (select_id) {\r\n\t\t\t\tscheduler._buffer_event = copyEvent(scheduler.getEvent(select_id));\r\n\t\t\t\tisCopy = true;\r\n\t\t\t\tscheduler.callEvent(\"onEventCopied\", [scheduler.getEvent(select_id)]);\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 88) { // CTRL+X\r\n\t\t\tif (select_id) {\r\n\t\t\t\tisCopy = false;\r\n\t\t\t\tvar ev = scheduler._buffer_event = copyEvent(scheduler.getEvent(select_id));\r\n\r\n\t\t\t\tscheduler.updateEvent(ev.id);\r\n\t\t\t\tscheduler.callEvent(\"onEventCut\", [ev]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ((e.ctrlKey || e.metaKey) && e.keyCode == 86 && currentTarget(e)) { // CTRL+V\r\n\t\t\tvar ev = scheduler._buffer_event ? scheduler.getEvent(scheduler._buffer_event.id) : scheduler._buffer_event;\r\n\t\t\tev = ev || scheduler._buffer_event;\r\n\r\n\t\t\tif (ev) {\r\n\t\t\t\tvar new_ev = scheduler._make_pasted_event(ev);\r\n\t\t\t\tif (isCopy) {\r\n\t\t\t\t\tnew_ev.id = scheduler.uid();\r\n\t\t\t\t\tscheduler._do_paste(isCopy, new_ev, ev);\r\n\t\t\t\t}\r\n\t\t\t\telse { // cut operation\r\n\t\t\t\t\tvar res = scheduler.callEvent(\"onBeforeEventChanged\",[new_ev, e, false, ev]);\r\n\t\t\t\t\tif (res) {\r\n\t\t\t\t\t\tscheduler._do_paste(isCopy, new_ev, ev);\r\n\t\t\t\t\t\tisCopy = true; // switch to copy after first paste operation\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t};\r\n};\r\nscheduler._temp_key_scope();\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation.attachSchedulerHandlers = function(){\r\n\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\tvar keyDownHandler = function(e){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\r\n\t\treturn dispatcher.keyDownHandler(e);\r\n\t};\r\n\r\n\tvar focusHandler = function () {\r\n\t\tdispatcher.keepScrollPosition(function () {\r\n\t\t\tdispatcher.focusGlobalNode();\r\n\t\t});\r\n\t};\r\n\r\n\tvar waitCall;\r\n\tscheduler.attachEvent(\"onDataRender\", function(){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\t\tif(!(dispatcher.isEnabled() && !scheduler.getState().editor_id)) return;\r\n\r\n\t\tclearTimeout(waitCall);\r\n\t\twaitCall = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif(!dispatcher.isEnabled())\r\n\t\t\t\tdispatcher.enable();\r\n\t\t\treFocusActiveNode();\r\n\t\t});\r\n\t});\r\n\r\n\tvar reFocusActiveNode = function(){\r\n\t\tif(!dispatcher.isEnabled())\r\n\t\t\treturn;\r\n\r\n\t\tvar activeNode = dispatcher.getActiveNode();\r\n\t\tif(!activeNode)\r\n\t\t\treturn;\r\n\r\n\t\tif(!activeNode.isValid()){\r\n\t\t\tactiveNode = activeNode.fallback();\r\n\t\t}\r\n\r\n\t\tif(!activeNode || activeNode instanceof scheduler.$keyboardNavigation.MinicalButton || activeNode instanceof scheduler.$keyboardNavigation.MinicalCell)\r\n\t\t\treturn;\r\n\r\n\t\tdispatcher.keepScrollPosition(function () {\r\n\t\t\tactiveNode.focus(true);\r\n\t\t});\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\tvar container = scheduler.$container;\r\n\t\tscheduler.eventRemove(document, \"keydown\", keyDownHandler);\r\n\t\tscheduler.eventRemove(container, \"mousedown\", mousedownHandler);\r\n\t\tscheduler.eventRemove(container, \"focus\", focusHandler);\r\n\r\n\r\n\t\tif(scheduler.config.key_nav){\r\n\r\n\t\t\tscheduler.event(document, \"keydown\", keyDownHandler);\r\n\t\t\tscheduler.event(container, \"mousedown\", mousedownHandler);\r\n\t\t\tscheduler.event(container, \"focus\", focusHandler);\r\n\r\n\t\t\tcontainer.setAttribute(\"tabindex\", \"0\");\r\n\r\n\t\t}else{\r\n\t\t\tcontainer.removeAttribute(\"tabindex\");\r\n\t\t}\r\n\t});\r\n\r\n\tfunction mousedownHandler(e){\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\r\n\t\tconst view = scheduler.getView();\r\n\t\tlet dataAreaClick = false;\r\n\t\tif (scheduler.getState().mode === \"month\") {\r\n\t\t\tdataAreaClick = scheduler.$keyboardNavigation.isChildOf(e.target || e.srcElement, scheduler.$container.querySelector(\".dhx_cal_month_table\"));\r\n\t\t} else if (view && view.layout === \"timeline\") {\r\n\t\t\tdataAreaClick = scheduler.$keyboardNavigation.isChildOf(e.target || e.srcElement, scheduler.$container.querySelector(\".dhx_timeline_data_col\"));\r\n\t\t} else {\r\n\t\t\tconst listOfScales = scheduler.$container.querySelectorAll(\".dhx_scale_holder\");\r\n\t\t\tconst arrOfScales = Array.from(listOfScales);\r\n\t\t\tdataAreaClick = arrOfScales.some(scale => scale === e.target.parentNode);\r\n\t\t}\r\n\r\n\t\tvar pos = scheduler.getActionData(e);\r\n\r\n\t\tvar focusNode;\r\n\t\tif(scheduler._locate_event(e.target || e.srcElement)){\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.Event(scheduler._locate_event(e.target || e.srcElement));\r\n\t\t}else if(dataAreaClick){\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\tif(pos.date && dataAreaClick){\r\n\t\t\t\tfocusNode = focusNode.nextSlot(new scheduler.$keyboardNavigation.TimeSlot(pos.date, null, pos.section));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(focusNode) {\r\n\t\t\tif (!dispatcher.isEnabled()) {\r\n\t\t\t\tdispatcher.activeNode = focusNode;\r\n\r\n\t\t\t} else {\r\n\t\t\t\tif (pos.date && dataAreaClick) {\r\n\t\t\t\t\tdispatcher.delay(function () {\r\n\t\t\t\t\t\tdispatcher.setActiveNode(focusNode);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction focusEvent(evNode){\r\n\t\tif(!scheduler.config.key_nav) return;\r\n\t\tif(!dispatcher.isEnabled()) return;\r\n\r\n\r\n\t\tvar prevState = evNode;\r\n\t\tvar focusNode = new scheduler.$keyboardNavigation.Event(prevState.eventId);\r\n\t\tif(!focusNode.isValid()){\r\n\t\t\tvar lastStart = focusNode.start || prevState.start;\r\n\t\t\tvar lastEnd = focusNode.end || prevState.end;\r\n\t\t\tvar lastSection = focusNode.section || prevState.section;\r\n\r\n\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot(lastStart, lastEnd, lastSection);\r\n\t\t\tif(!focusNode.isValid()){\r\n\t\t\t\tfocusNode = new scheduler.$keyboardNavigation.TimeSlot();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdispatcher.setActiveNode(focusNode);\r\n\t\tvar node = dispatcher.getActiveNode();\r\n\t\tif(node && node.getNode && document.activeElement != node.getNode()){\r\n\t\t\tdispatcher.focusNode(dispatcher.getActiveNode());\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tvar updateEvent = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id){\r\n\t\tvar res = updateEvent.apply(this, arguments);\r\n\t\tif(scheduler.config.key_nav && dispatcher.isEnabled()){\r\n\t\t\tif(scheduler.getState().select_id == id){\r\n\t\t\t\tvar element = new scheduler.$keyboardNavigation.Event(id);\r\n\r\n\t\t\t\tif(!scheduler.getState().lightbox_id){\r\n\t\t\t\t\tfocusEvent(element);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onEventDeleted\", function(id) {\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\t\tif(dispatcher.isEnabled()){\r\n\t\t\tvar activeNode = dispatcher.getActiveNode();\r\n\t\t\tif(activeNode.eventId == id){\r\n\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onClearAll\", function(){\r\n\t\tif(!scheduler.config.key_nav) return true;\r\n\t\tif(dispatcher.isEnabled()){\r\n\t\t\tif(dispatcher.getActiveNode() instanceof scheduler.$keyboardNavigation.Event){\r\n\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.TimeSlot());\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.$keyboardNavigation._minicalendars = [];\r\n\r\nscheduler.$keyboardNavigation.isMinical = function(node){\r\n\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\tif(this.isChildOf(node, minicalendars[i]))\r\n\t\t\treturn true;\r\n\t}\r\n\treturn false;\r\n};\r\n\r\nscheduler.$keyboardNavigation.isChildOf = function(child, parent){\r\n\twhile(child && child !== parent){\r\n\t\tchild = child.parentNode;\r\n\t}\r\n\r\n\treturn !!(child === parent);\r\n};\r\n\r\nscheduler.$keyboardNavigation.patchMinicalendar = function(){\r\n\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\tfunction focusMinical(e){\r\n\t\tvar target = e.target;\r\n\r\n\t\tdispatcher.enable();\r\n\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.MinicalButton(target, 0));\r\n\t}\r\n\r\n\tfunction minicalClick(e){\r\n\t\tvar target = e.target || e.srcElement;\r\n\r\n\t\tvar prev = scheduler.utils.dom.locateCss(e, \"dhx_cal_prev_button\", false);\r\n\t\tvar next = scheduler.utils.dom.locateCss(e, \"dhx_cal_next_button\", false);\r\n\t\tvar cell = scheduler.utils.dom.locateCss(e, \"dhx_year_body\", false);\r\n\r\n\t\tvar rowIndex = 0;\r\n\t\tvar cellIndex = 0;\r\n\t\tif(cell){\r\n\t\t\tvar tr;\r\n\t\t\tvar td;\r\n\t\t\tvar current = target;\r\n\t\t\twhile(current && current.tagName.toLowerCase() != \"td\"){\r\n\t\t\t\tcurrent = current.parentNode;\r\n\t\t\t}\r\n\t\t\tif(current){\r\n\t\t\t\ttd = current;\r\n\t\t\t\ttr = td.parentNode;\r\n\t\t\t}\r\n\r\n\t\t\tif(tr && td){\r\n\t\t\t\tvar rows = tr.parentNode.querySelectorAll(\"tr\");\r\n\t\t\t\tfor(var i = 0; i < rows.length; i++){\r\n\t\t\t\t\tif(rows[i] == tr){\r\n\t\t\t\t\t\trowIndex = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tvar cells = tr.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\t\t\tif(cells[i] == td){\r\n\t\t\t\t\t\tcellIndex = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar root = e.currentTarget;\r\n\t\tdispatcher.delay(function(){\r\n\t\t\tif(prev || next || cell){\r\n\r\n\t\t\t\tvar element;\r\n\t\t\t\tif(prev){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalButton(root, 0);\r\n\t\t\t\t\tdispatcher.setActiveNode(new scheduler.$keyboardNavigation.MinicalButton(root, 0));\r\n\t\t\t\t}else if(next){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalButton(root, 1);\r\n\t\t\t\t}else if(cell){\r\n\t\t\t\t\telement = new scheduler.$keyboardNavigation.MinicalCell(root, rowIndex, cellIndex);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(element){\r\n\r\n\t\t\t\t\tdispatcher.enable();\r\n\t\t\t\t\tif(element.isValid()){\r\n\t\t\t\t\t\tdispatcher.activeNode = null;\r\n\t\t\t\t\t\tdispatcher.setActiveNode(element);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t}\r\n\r\n\tif(scheduler.renderCalendar){\r\n\t\tvar renderMinical = scheduler.renderCalendar;\r\n\t\tscheduler.renderCalendar = function(){\r\n\t\t\tvar cal = renderMinical.apply(this, arguments);\r\n\t\t\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\r\n\t\t\tscheduler.eventRemove(cal, \"click\", minicalClick);\r\n\t\t\tscheduler.event(cal, \"click\", minicalClick);\r\n\r\n\t\t\tscheduler.eventRemove(cal, \"focus\", focusMinical);\r\n\t\t\tscheduler.event(cal, \"focus\", focusMinical);\r\n\r\n\t\t\tvar added = false;\r\n\t\t\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\t\t\tif(minicalendars[i] == cal){\r\n\t\t\t\t\tadded = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(!added)\r\n\t\t\t\tminicalendars.push(cal);\r\n\r\n\t\t\tif(dispatcher.isEnabled()){\r\n\t\t\t\tvar node = dispatcher.getActiveNode();\r\n\t\t\t\tif(node && node.container == cal){\r\n\t\t\t\t\tdispatcher.focusNode(node);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcal.setAttribute(\"tabindex\", \"0\");\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tcal.setAttribute(\"tabindex\", \"0\");\r\n\t\t\t}\r\n\t\t\treturn cal;\r\n\t\t};\r\n\t}\r\n\r\n\tif(scheduler.destroyCalendar){\r\n\t\tvar destroyMinical = scheduler.destroyCalendar;\r\n\t\tscheduler.destroyCalendar = function(cal, force){\r\n\t\t\tcal = cal || (scheduler._def_count ? scheduler._def_count.firstChild : null);\r\n\t\t\tvar res = destroyMinical.apply(this, arguments);\r\n\r\n\t\t\tif(!cal || !cal.parentNode){\r\n\t\t\t\tvar minicalendars = scheduler.$keyboardNavigation._minicalendars;\r\n\t\t\t\tfor(var i = 0; i < minicalendars.length; i++){\r\n\t\t\t\t\tif(minicalendars[i] == cal){\r\n\t\t\t\t\t\tscheduler.eventRemove(minicalendars[i], \"focus\", focusMinical);\r\n\t\t\t\t\t\tminicalendars.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn res;\r\n\t\t};\r\n\t}\r\n};\r\n\r\n}","import keyboard_shortcuts from \"./keyboard_navigation/common/keyboard_shortcuts\";\r\nimport eventhandler from \"./keyboard_navigation/common/eventhandler\";\r\nimport trap_modal_focus from \"./keyboard_navigation/common/trap_modal_focus\";\r\nimport marker from \"./keyboard_navigation/marker\";\r\nimport scheduler_node from \"./keyboard_navigation/elements/scheduler_node\";\r\nimport nav_node from \"./keyboard_navigation/elements/nav_node\";\r\nimport header_cell from \"./keyboard_navigation/elements/header_cell\";\r\nimport event from \"./keyboard_navigation/elements/event\";\r\nimport time_slot from \"./keyboard_navigation/elements/time_slot\";\r\nimport minical_button from \"./keyboard_navigation/elements/minical_button\";\r\nimport minical_cell from \"./keyboard_navigation/elements/minical_cell\";\r\nimport data_area from \"./keyboard_navigation/elements/data_area\";\r\nimport modals from \"./keyboard_navigation/modals\";\r\nimport core from \"./keyboard_navigation/core\";\r\nimport key_nav_legacy from \"./keyboard_navigation/key_nav_legacy\";\r\n\r\n\r\nimport scheduler_handlers from \"./keyboard_navigation/scheduler_handlers\";\r\nimport minical_handlers from \"./keyboard_navigation/minical_handlers\";\r\n\r\nexport default function(scheduler){\r\n\t\tscheduler.config.key_nav = true;\r\n\t\tscheduler.config.key_nav_step = 30;\r\n\t\tscheduler.addShortcut = function(shortcut, handler, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tscopeObject.prototype.bind(shortcut, handler);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.getShortcutHandler = function(shortcut, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tvar commands = scheduler.$keyboardNavigation.shortcuts.parse(shortcut);\r\n\t\t\t\tif(commands.length){\r\n\t\t\t\t\treturn scopeObject.prototype.findHandler(commands[0]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.removeShortcut = function(shortcut, scope){\r\n\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\tif(scopeObject){\r\n\t\t\t\tscopeObject.prototype.unbind(shortcut);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tscheduler.focus = function(){\r\n\t\t\tif(!scheduler.config.key_nav){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar disp = scheduler.$keyboardNavigation.dispatcher;\r\n\t\t\tdisp.enable();\r\n\t\t\tvar activeNode = disp.getActiveNode();\r\n\t\t\tif(!activeNode || activeNode instanceof scheduler.$keyboardNavigation.MinicalButton || activeNode instanceof scheduler.$keyboardNavigation.MinicalCell){\r\n\t\t\t\tdisp.setDefaultNode();\r\n\t\t\t}else{\r\n\t\t\t\tdisp.focusNode(disp.getActiveNode());\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfunction getScope(mode){\r\n\t\t\tvar scopes = {\r\n\t\t\t\t\"minicalButton\":scheduler.$keyboardNavigation.MinicalButton,\r\n\t\t\t\t\"minicalDate\":scheduler.$keyboardNavigation.MinicalCell,\r\n\t\t\t\t\"scheduler\":scheduler.$keyboardNavigation.SchedulerNode,\r\n\t\t\t\t\"dataArea\": scheduler.$keyboardNavigation.DataArea,\r\n\t\t\t\t\"timeSlot\": scheduler.$keyboardNavigation.TimeSlot,\r\n\t\t\t\t\"event\": scheduler.$keyboardNavigation.Event\r\n\t\t\t};\r\n\r\n\t\t\tvar searchMap = {};\r\n\t\t\tfor(var i in scopes)\r\n\t\t\t\tsearchMap[i.toLowerCase()] = scopes[i];\r\n\r\n\t\t\tmode = (mode + \"\").toLowerCase();\r\n\r\n\t\t\treturn searchMap[mode] || scopes.scheduler;\r\n\t\t}\r\n\r\n\t\tscheduler.$keyboardNavigation = {};\r\n\r\n\t\tscheduler._compose = function(){\r\n\t\t\tvar parts = Array.prototype.slice.call(arguments, 0);\r\n\t\t\tvar res = {};\r\n\t\t\tfor(var i = 0; i < parts.length; i++){\r\n\t\t\t\tvar obj = parts[i];\r\n\t\t\t\tif(typeof obj == \"function\"){\r\n\t\t\t\t\tobj = new obj();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor(var p in obj){\r\n\t\t\t\t\tres[p] = obj[p];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\t\t};\r\n\r\n\t\tkeyboard_shortcuts(scheduler);\r\n\t\teventhandler(scheduler);\r\n\t\ttrap_modal_focus(scheduler);\r\n\t\tmarker(scheduler);\r\n\t\tscheduler_node(scheduler);\r\n\t\tnav_node(scheduler);\r\n\t\theader_cell(scheduler);\r\n\t\tevent(scheduler);\r\n\t\ttime_slot(scheduler);\r\n\t\tminical_button(scheduler);\r\n\t\tminical_cell(scheduler);\r\n\t\tdata_area(scheduler);\r\n\t\tmodals(scheduler);\r\n\t\tcore(scheduler);\r\n\t\tkey_nav_legacy(scheduler);\r\n\r\n\t\t(function(){\r\n\t\t\tscheduler_handlers(scheduler);\r\n\t\t\tminical_handlers(scheduler);\r\n\r\n\t\t\tvar dispatcher = scheduler.$keyboardNavigation.dispatcher;\r\n\r\n\t\t\tscheduler.$keyboardNavigation.attachSchedulerHandlers();\r\n\r\n\t\t\tif(scheduler.renderCalendar){\r\n\t\t\t\t// if minical ext loaded before key nav ext - patch it now\r\n\t\t\t\tscheduler.$keyboardNavigation.patchMinicalendar();\r\n\t\t\t}else{\r\n\t\t\t\t// otherwise - wait until everything is loaded and try again\r\n\t\t\t\tvar attachOnce = scheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\t\t\t\t\tscheduler.detachEvent(attachOnce);\r\n\t\t\t\t\tscheduler.$keyboardNavigation.patchMinicalendar();\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\tfunction isSchedulerSelected(){\r\n\t\t\t\tif(!scheduler.config.key_nav) return;\r\n\r\n\t\t\t\tvar enable;\r\n\t\t\t\tvar focusElement = document.activeElement;\r\n\t\t\t\t// halt key nav when focus is outside scheduler or in quick info popup\r\n\t\t\t\tif(!focusElement || scheduler.utils.dom.locateCss(focusElement, \"dhx_cal_quick_info\", false)){\r\n\t\t\t\t\tenable = false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tenable = scheduler.$keyboardNavigation.isChildOf(focusElement, scheduler.$container) || scheduler.$keyboardNavigation.isMinical(focusElement);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn enable;\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\tfunction changeState(enable){\r\n\t\t\t\tif(enable && !dispatcher.isEnabled()){\r\n\t\t\t\t\tdispatcher.enable();\r\n\t\t\t\t}else if(!enable && dispatcher.isEnabled()){\r\n\t\t\t\t\tdispatcher.disable();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tconst intervalId = setInterval(function(){\r\n\t\t\t\tif(!scheduler.$container || !scheduler.$keyboardNavigation.isChildOf(scheduler.$container, document.body)){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar enable = isSchedulerSelected();\r\n\r\n\t\t\t\tif(enable){\r\n\t\t\t\t\tchangeState(enable);\r\n\t\t\t\t}else if(!enable && dispatcher.isEnabled()){\r\n\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// doublecheck in case checking is done in handler before focus element is repainted\r\n\t\t\t\t\t\tif(scheduler.config.key_nav){\r\n\t\t\t\t\t\t\tchangeState(isSchedulerSelected());\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tscheduler.$container.removeAttribute(\"tabindex\");\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}, 100);\r\n\t\t\t\t}\r\n\t\t\t}, 500);\r\n\t\t\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\t\t\tclearInterval(intervalId);\r\n\t\t\t});\r\n\t\t})();\r\n\t}\r\n\r\n\r\n","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\r\n\tthis.layers.sort(function(a, b){\r\n\t\treturn a.zIndex - b.zIndex;\r\n\t});\r\n\r\n\tscheduler._dp_init=function(dp){\r\n\t\tdp._methods=[\"_set_event_text_style\",\"\",\"changeEventId\",\"deleteEvent\"];\r\n\r\n\t\tthis.attachEvent(\"onEventAdded\",function(id){\r\n\t\t\tif (!this._loading && this.validId(id) && this.getEvent(id) && this.getEvent(id).layer == dp.layer)\r\n\t\t\t\tdp.setUpdated(id,true,\"inserted\");\r\n\t\t});\r\n\t\tthis.attachEvent(\"onBeforeEventDelete\",function(id){\r\n\t\t\tif(this.getEvent(id) && this.getEvent(id).layer == dp.layer) {\r\n\t\t\t\tif (!this.validId(id)) return;\r\n\t\t\t\tvar z=dp.getState(id);\r\n\r\n\t\t\t\tif (z==\"inserted\" || this._new_event) { dp.setUpdated(id,false);\t\treturn true; }\r\n\t\t\t\tif (z==\"deleted\") return false;\r\n\t\t\t\tif (z==\"true_deleted\") return true;\r\n\r\n\t\t\t\tdp.setUpdated(id,true,\"deleted\");\r\n\t\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\telse return true;\r\n\t\t});\r\n\t\tthis.attachEvent(\"onEventChanged\",function(id){\r\n\t\t\tif (!this._loading && this.validId(id) && this.getEvent(id) && this.getEvent(id).layer == dp.layer)\r\n\t\t\t\tdp.setUpdated(id,true,\"updated\");\r\n\t\t});\r\n\r\n\t\tdp._getRowData=function(id,pref){\r\n\t\t\tvar ev=this.obj.getEvent(id);\r\n\t\t\tvar data = {};\r\n\r\n\t\t\tfor (var a in ev){\r\n\t\t\t\tif (a.indexOf(\"_\")===0) continue;\r\n\t\t\t\tif (ev[a] && ev[a].getUTCFullYear) //not very good, but will work\r\n\t\t\t\t\tdata[a] = this.obj._helpers.formatDate(ev[a]);\r\n\t\t\t\telse\r\n\t\t\t\t\tdata[a] = ev[a];\r\n\t\t\t}\r\n\t\t\treturn data;\r\n\t\t};\r\n\t\tdp._clearUpdateFlag=function(){};\r\n\r\n\t\tdp.attachEvent(\"insertCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"updateCallback\", scheduler._update_callback);\r\n\t\tdp.attachEvent(\"deleteCallback\", function(upd, id) {\r\n\t\t\tthis.obj.setUserData(id, this.action_param, \"true_deleted\");\r\n\t\t\tthis.obj.deleteEvent(id);\r\n\t\t});\r\n\t};\r\n\r\n\t(function() {\r\n var _cloneObj = function(obj){\r\n if(obj === null || typeof(obj) != 'object')\r\n return obj;\r\n var temp = new obj.constructor();\r\n for(var key in obj)\r\n temp[key] = _cloneObj(obj[key]);\r\n return temp;\r\n };\r\n\r\n\t\tscheduler._dataprocessors = [];\r\n\t\tscheduler._layers_zindex = {};\r\n\t\tfor(var i=0; i= scheduler.config.collision_limit);\r\n\t});\r\n\r\n\tscheduler.addEvent=function(start_date,end_date,text,id,extra_data){\r\n\t\tvar ev=start_date;\r\n\t\tif (arguments.length!=1){\r\n\t\t\tev=extra_data||{};\r\n\t\t\tev.start_date=start_date;\r\n\t\t\tev.end_date=end_date;\r\n\t\t\tev.text=text;\r\n\t\t\tev.id=id;\r\n\t\t\tev.layer = this.defaultLayer;\r\n\t\t}\r\n\t\tev.id = ev.id||scheduler.uid();\r\n\t\tev.text = ev.text||\"\";\r\n\r\n\r\n\t\tif (typeof ev.start_date == \"string\") ev.start_date=this.templates.api_date(ev.start_date);\r\n\t\tif (typeof ev.end_date == \"string\") ev.end_date=this.templates.api_date(ev.end_date);\r\n\t\tev._timed=this.isOneDayEvent(ev);\r\n\r\n\t\tvar is_new=!this._events[ev.id];\r\n\t\tthis._events[ev.id]=ev;\r\n\t\tthis.event_updated(ev);\r\n\t\tif (!this._loading)\r\n\t\t\tthis.callEvent(is_new?\"onEventAdded\":\"onEventChanged\",[ev.id,ev]);\r\n\t};\r\n\r\n\tthis._evs_layer = {};\r\n\tfor (var i = 0; i < this.layers.length; i++) { // array in object for each layer\r\n\t\tthis._evs_layer[this.layers[i].name] = [];\r\n\t}\r\n\r\n\tscheduler.addEventNow=function(start,end,e){\r\n\t\tvar base = {};\r\n\t\tif (typeof start == \"object\"){\r\n\t\t\tbase = start;\r\n\t\t\tstart = null;\r\n\t\t}\r\n\r\n\t\tvar d = (this.config.event_duration||this.config.time_step)*60000;\r\n\t\tif (!start) start = Math.round((scheduler._currentDate()).valueOf()/d)*d;\r\n\t\tvar start_date = new Date(start);\r\n\t\tif (!end){\r\n\t\t\tvar start_hour = this.config.first_hour;\r\n\t\t\tif (start_hour > start_date.getHours()){\r\n\t\t\t\tstart_date.setHours(start_hour);\r\n\t\t\t\tstart = start_date.valueOf();\r\n\t\t\t}\r\n\t\t\tend = start+d;\r\n\t\t}\r\n\r\n\r\n\t\tbase.start_date = base.start_date||start_date;\r\n\t\tbase.end_date = base.end_date||new Date(end);\r\n\t\tbase.text = base.text||this.locale.labels.new_event;\r\n\t\tbase.id = this._drag_id = this.uid();\r\n\t\tbase.layer = this.defaultLayer;\r\n\t\tthis._drag_mode=\"new-size\";\r\n\r\n\t\tthis._loading=true;\r\n\t\tthis.addEvent(base);\r\n\t\tthis.callEvent(\"onEventCreated\",[this._drag_id,e]);\r\n\t\tthis._loading=false;\r\n\r\n\t\tthis._drag_event={}; //dummy , to trigger correct event updating logic\r\n\t\tthis._on_mouse_up(e);\r\n\t};\r\n\r\n\tscheduler._t_render_view_data = function(events) { // helper\r\n\t\tif (this.config.multi_day && !this._table_view) {\r\n\t\t\tvar tvs = [];\r\n\t\t\tvar tvd = [];\r\n\t\t\tfor (var k = 0; k < events.length; k++) {\r\n\t\t\t\tif (events[k]._timed)\r\n\t\t\t\t\ttvs.push(events[k]);\r\n\t\t\t\telse\r\n\t\t\t\t\ttvd.push(events[k]);\r\n\t\t\t}\r\n\t\t\tthis._table_view = true;\r\n\t\t\tthis.render_data(tvd);\r\n\t\t\tthis._table_view = false;\r\n\t\t\tthis.render_data(tvs);\r\n\t\t}\r\n\t\telse\r\n\t\t\tthis.render_data(events);\r\n\t};\r\n\r\n\tscheduler.render_view_data = function(){\r\n\t\tif (this._not_render) {\r\n\t\t\tthis._render_wait = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._render_wait = false;\r\n\r\n\t\tthis.clear_view();\r\n\r\n\t\tthis._evs_layer = {};\r\n\t\tfor (var i = 0; i < this.layers.length; i++) { // array in object for each layer\r\n\t\t\tthis._evs_layer[this.layers[i].name] = [];\r\n\t\t}\r\n\r\n\t\tvar evs = this.get_visible_events();\r\n\t\tfor (var i = 0; i < evs.length; i++) { // filling layer arrays with events\r\n\t\t\tif(this._evs_layer[evs[i].layer])\r\n\t\t\t\tthis._evs_layer[evs[i].layer].push(evs[i]);\r\n\t\t}\r\n\r\n\t\tif(this._mode == 'month') { // old logic is used\r\n\t\t\tvar tevs = [];\r\n\t\t\tfor (var i = 0; i < this.layers.length; i++) {\r\n\t\t\t\tif (this.layers[i].visible)\r\n\t\t\t\t\ttevs = tevs.concat(this._evs_layer[this.layers[i].name]);\r\n\t\t\t}\r\n\t\t\tthis._t_render_view_data(tevs);\r\n\t\t}\r\n\t\telse { // week, day; should use new logic\r\n\t\t\tfor (var i = 0; i < this.layers.length; i++) {\r\n\t\t\t\tif (this.layers[i].visible) {\r\n\t\t\t\t\tvar evs_layer = this._evs_layer[this.layers[i].name];\r\n\t\t\t\t\tthis._t_render_view_data(evs_layer);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._render_v_bar=function(ev,x,y,w,h,style,contentA,contentB,bottom){\r\n\t\tvar id = ev.id;\r\n\r\n\t\tif(contentA.indexOf('
';\r\n\t\thtml+='
 
';\r\n\t\thtml+='
'+contentA+'
';\r\n\t\thtml+='
'+contentB+'
';\r\n\t\thtml+='
';\r\n\r\n\t\td.innerHTML=html;\r\n\t\td.style.zIndex = 100;\r\n\t\treturn d.firstChild;\r\n\t};\r\n\r\n\tscheduler.render_event_bar=function(ev){\r\n\t\tvar parent=this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tvar x=this._colsS[ev._sday];\r\n\t\tvar x2=this._colsS[ev._eday];\r\n\t\tif (x2==x) x2=this._colsS[ev._eday+1];\r\n\t\tvar hb = this.xy.bar_height;\r\n\r\n\t\tvar y=this._colsS.heights[ev._sweek]+(this._colsS.height?(this.xy.month_scale_height+2):2)+ev._sorder*hb;\r\n\r\n\t\tvar d=document.createElement(\"div\");\r\n\t\tvar cs = ev._timed?\"dhx_cal_event_clear\":\"dhx_cal_event_line\";\r\n\t\tvar cse = (scheduler.templates['event_class_'+ev.layer])?scheduler.templates['event_class_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_class(ev.start_date,ev.end_date,ev);\r\n\t\tif (cse) cs=cs+\" \"+cse;\r\n\r\n\t\tvar html='
';\r\n\r\n\t\tif (ev._timed)\r\n\t\t\thtml+=(scheduler.templates['event_bar_date_'+ev.layer])?scheduler.templates['event_bar_date_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_bar_date(ev.start_date,ev.end_date,ev);\r\n\t\thtml+=( (scheduler.templates['event_bar_text_'+ev.layer])?scheduler.templates['event_bar_text_'+ev.layer](ev.start_date,ev.end_date,ev):scheduler.templates.event_bar_text(ev.start_date,ev.end_date,ev) + '
)');\r\n\t\thtml+='
';\r\n\r\n\t\td.innerHTML=html;\r\n\r\n\t\tthis._rendered.push(d.firstChild);\r\n\t\tparent.appendChild(d.firstChild);\r\n\t};\r\n\r\n\tscheduler.render_event=function(ev){\r\n\t\tvar menu = scheduler.xy.menu_width;\r\n\t\tif(scheduler.getLayer(ev.layer).noMenu)\r\n\t\t\tmenu = 0;\r\n\r\n\t\tif (ev._sday<0) return; //can occur in case of recurring event during time shift\r\n\t\tvar parent=scheduler.locate_holder(ev._sday);\r\n\t\tif (!parent) return; //attempt to render non-visible event\r\n\t\tvar sm = ev.start_date.getHours()*60+ev.start_date.getMinutes();\r\n\t\tvar em = (ev.end_date.getHours()*60+ev.end_date.getMinutes())||(scheduler.config.last_hour*60);\r\n\r\n\t\tvar top = (Math.round((sm*60*1000-this.config.first_hour*60*60*1000)*this.config.hour_size_px/(60*60*1000)))%(this.config.hour_size_px*24)+1; //42px/hour\r\n\t\tvar height = Math.max(scheduler.xy.min_event_height,(em-sm)*this.config.hour_size_px/60)+1; //42px/hour\r\n\t\t\r\n\t\tvar width=Math.floor((parent.clientWidth-menu)/ev._count);\r\n\t\tvar left=ev._sorder*width+1;\r\n\t\tif (!ev._inner) width=width*(ev._count-ev._sorder);\r\n\r\n\r\n\r\n\t\tvar d=this._render_v_bar(ev.id,menu+left,top,width,height,ev._text_style,scheduler.templates.event_header(ev.start_date,ev.end_date,ev),scheduler.templates.event_text(ev.start_date,ev.end_date,ev));\r\n\r\n\t\tthis._rendered.push(d);\r\n\t\tparent.appendChild(d);\r\n\r\n\t\tleft=left+parseInt(parent.style.left,10)+menu;\r\n\r\n\t\ttop+=this._dy_shift; //corrupt top, to include possible multi-day shift\r\n\t\td.style.zIndex = this._layers_zindex[ev.layer];\r\n\r\n\t\tif (this._edit_id==ev.id){\r\n\t\t\td.style.zIndex = parseInt(d.style.zIndex)+1; //fix overlapping issue\r\n\t\t\tvar new_zIndex = d.style.zIndex;\r\n\t\t\twidth=Math.max(width-4,scheduler.xy.editor_width);\r\n\t\t\tvar d=document.createElement(\"div\");\r\n\t\t\td.setAttribute(\"event_id\",ev.id); // for backward compatibility\r\n\t\t\td.setAttribute(this.config.event_attribute,ev.id);\r\n\t\t\tthis.set_xy(d,width,height-20,left,top+14);\r\n\t\t\td.className=\"dhx_cal_editor\";\r\n\t\t\td.style.zIndex = new_zIndex;\r\n\t\t\tvar d2=document.createElement(\"div\");\r\n\t\t\tthis.set_xy(d2,width-6,height-26);\r\n\t\t\td2.style.cssText+=\";margin:2px 2px 2px 2px;overflow:hidden;\";\r\n\r\n\r\n\t\t\td2.style.zIndex = new_zIndex;\r\n\t\t\td.appendChild(d2);\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].appendChild(d);\r\n\t\t\tthis._rendered.push(d);\r\n\r\n\t\t\td2.innerHTML=\"\";\r\n\r\n\t\t\tthis._editor=d2.firstChild;\r\n\t\t\tthis._editor.addEventListener(\"keypress\", function(e){\r\n\t\t\t\tif (e.shiftKey) return true;\r\n\t\t\t\tvar code= e.keyCode;\r\n\t\t\t\tif (code==scheduler.keys.edit_save) scheduler.editStop(true);\r\n\t\t\t\tif (code==scheduler.keys.edit_cancel) scheduler.editStop(false);\r\n\t\t\t});\r\n\t\t\tthis._editor.addEventListener(\"selectstart\", function(e){ e.cancelBubble=true; return true; });\r\n\t\t\td2.firstChild.focus();\r\n\t\t\t//IE and opera can add x-scroll during focusing\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].scrollLeft=0;\r\n\t\t\td2.firstChild.select();\r\n\t\t}\r\n\t\tif (this._select_id==ev.id){\r\n\t\t\td.style.zIndex = parseInt(d.style.zIndex)+1; //fix overlapping issue\r\n\t\t\tvar icons=this.config[\"icons_\"+((this._edit_id==ev.id)?\"edit\":\"select\")];\r\n\t\t\tvar icons_str=\"\";\r\n\t\t\tfor (var i=0; i
\";\r\n\t\t\tvar obj = this._render_v_bar(ev.id,left-menu+1,top,menu,icons.length*20+26,\"\",\"
\",icons_str,true);\r\n\t\t\tobj.style.left=left-menu+1;\r\n\t\t\tobj.style.zIndex = d.style.zIndex;\r\n\t\t\tthis._els[\"dhx_cal_data\"][0].appendChild(obj);\r\n\t\t\tthis._rendered.push(obj);\r\n\t\t}\r\n\r\n\t};\r\n\r\n scheduler.filter_agenda = function(id, event) {\r\n var layer = scheduler.getLayer(event.layer);\r\n return (layer && layer.visible);\r\n };\r\n});\r\n\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.limit_start = null;\r\nscheduler.config.limit_end = null;\r\nscheduler.config.limit_view = false;\r\nscheduler.config.check_limits = true;\r\n\r\nscheduler._temp_limit_scope = function(){\r\n\tvar before = null;\r\n\tvar dhx_time_block = \"dhx_time_block\";\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\",function(om,od,nm,nd){\r\n\r\n\t\tfunction isBlocked(date, mode){\r\n\t\t\tvar limit_start = scheduler.config.limit_start,\r\n\t\t\t\tlimit_end = scheduler.config.limit_end,\r\n\t\t\t\tdate_end = scheduler.date.add(date,1,mode);\r\n\r\n\t\t\treturn (date.valueOf() > limit_end.valueOf() || date_end <= limit_start.valueOf());\r\n\t\t}\r\n\r\n\t\tif (scheduler.config.limit_view){\r\n\t\t\tnd = nd||od; nm = nm||om;\r\n\t\t\tif (isBlocked(nd, nm) && !(od.valueOf() == nd.valueOf())){\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar resetDate = !isBlocked(od, nm) ? od : scheduler.config.limit_start;\r\n\r\n\t\t\t\t\tscheduler.setCurrentView(!isBlocked(resetDate, nm) ? resetDate : null, nm);\r\n\t\t\t\t},1);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onMouseDown\", function(classname) {\r\n\t\treturn !(classname == dhx_time_block);\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeDrag\",function(id){\r\n\t\tif (!id) return true;\r\n\t\treturn scheduler.checkLimitViolation(scheduler.getEvent(id));\r\n\t});\r\n\tscheduler.attachEvent(\"onClick\", function (event_id, native_event_object){\r\n\t\treturn scheduler.checkLimitViolation(scheduler.getEvent(event_id));\r\n });\r\n\tscheduler.attachEvent(\"onBeforeLightbox\",function(id){\r\n\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tbefore = [ev.start_date, ev.end_date];\r\n\t\treturn scheduler.checkLimitViolation(ev);\r\n\t});\r\n\tscheduler.attachEvent(\"onEventSave\", function(id, data, is_new_event) {\r\n\r\n\t\t//lightbox may not have 'time' section\r\n\t\tif(!(data.start_date && data.end_date)){\r\n\t\t\tvar ev = scheduler.getEvent(id);\r\n\t\t\tdata.start_date = new Date(ev.start_date);\r\n\t\t\tdata.end_date = new Date(ev.end_date);\r\n\t\t}\r\n\r\n\t\tif(data.rec_type){\r\n\t\t\t//_roll_back_dates modifies start_date of recurring event, need to check limits after modification\r\n\t\t\t// use a copy to keep original event unchanged\r\n\t\t\tvar data_copy = scheduler._lame_clone(data);\r\n\t\t\tscheduler._roll_back_dates(data_copy);\r\n\t\t\treturn scheduler.checkLimitViolation(data_copy);\r\n\t\t}\r\n\t\treturn scheduler.checkLimitViolation(data);\r\n\t});\r\n\tscheduler.attachEvent(\"onEventAdded\",function(id){\r\n\t\tif (!id) return true;\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif (!scheduler.checkLimitViolation(ev) && scheduler.config.limit_start && scheduler.config.limit_end) {\r\n\t\t\t//if newly created event is outside of limited time - crop it, leaving only allowed time\r\n\t\t\tif (ev.start_date < scheduler.config.limit_start) {\r\n\t\t\t\tev.start_date = new Date(scheduler.config.limit_start);\r\n\t\t\t}\r\n\t\t\tif (ev.start_date.valueOf() >= scheduler.config.limit_end.valueOf()) {\r\n\t\t\t\tev.start_date = this.date.add(scheduler.config.limit_end, -1, \"day\");\r\n\t\t\t}\r\n\t\t\tif (ev.end_date < scheduler.config.limit_start) {\r\n\t\t\t\tev.end_date = new Date(scheduler.config.limit_start);\r\n\t\t\t}\r\n\t\t\tif (ev.end_date.valueOf() >= scheduler.config.limit_end.valueOf()) {\r\n\t\t\t\tev.end_date = this.date.add(scheduler.config.limit_end, -1, \"day\");\r\n\t\t\t}\r\n\t\t\tif (ev.start_date.valueOf() >= ev.end_date.valueOf()) {\r\n\t\t\t\tev.end_date = this.date.add(ev.start_date, (this.config.event_duration||this.config.time_step), \"minute\");\r\n\t\t\t}\r\n\t\t\tev._timed=this.isOneDayEvent(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\",function(id){\r\n\t\tif (!id) return true;\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif (!scheduler.checkLimitViolation(ev)){\r\n\t\t\tif (!before) return false;\r\n\t\t\tev.start_date = before[0];\r\n\t\t\tev.end_date = before[1];\r\n\t\t\tev._timed=this.isOneDayEvent(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeEventChanged\",function(ev, native_object, is_new){\r\n\t\treturn scheduler.checkLimitViolation(ev);\r\n\t});\r\n\tscheduler.attachEvent(\"onBeforeEventCreated\", function(ev) { // native event\r\n\t\tvar start_date = scheduler.getActionData(ev).date;\r\n\t\tvar event = {\r\n\t\t\t_timed: true,\r\n\t\t\tstart_date: start_date,\r\n\t\t\tend_date: scheduler.date.add(start_date, scheduler.config.time_step, \"minute\")\r\n\t\t};\r\n\t\treturn scheduler.checkLimitViolation(event);\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", function(){\r\n\t\tscheduler._mark_now();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onAfterSchedulerResize\", function(){\r\n\t\twindow.setTimeout(function(){ \r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler._mark_now(); \r\n\t\t}, 1);\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\t\tscheduler._mark_now_timer = window.setInterval(function() {\r\n\t\t\tif(!scheduler._is_initialized())\r\n\t\t\t\treturn;\r\n\t\t\tscheduler._mark_now();\r\n\t\t}, 60000);\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tclearInterval(scheduler._mark_now_timer);\r\n\t});\r\n\r\n};\r\nscheduler._temp_limit_scope();\r\n\r\n\r\n}","import { IMapAdapter, ICalendarEvent, IMapSettings, IMapPosition} from \"./types\";\r\ndeclare let google: any;\r\n\r\nexport class GoogleMapAdapter implements IMapAdapter {\r\n\tprivate map: any;\r\n\tprivate scheduler: any;\r\n\tprivate settings: IMapSettings;\r\n\tprivate _markers: any[];\r\n\tprivate infoWindow: any;\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.map = null;\r\n\t\tthis._markers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t}\r\n\tonEventClick(event: ICalendarEvent): void {\r\n\t\tif (this._markers && this._markers.length > 0) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\t\tif (event.id == this._markers[i].event.id) {\r\n\t\t\t\t\tlet zoom = this.settings.zoom_after_resolve || this.settings.initial_zoom;\r\n\t\t\t\t\tif (event.lat && event.lng){\r\n\t\t\t\t\t\tthis.map.setCenter({\r\n\t\t\t\t\t\t\tlat: event.lat, \r\n\t\t\t\t\t\t\tlng: event.lng,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tthis.map.setZoom(zoom);\r\n\t\t\t\t\t} else {\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.map.setCenter({\r\n\t\t\t\t\t\t\tlat: this.settings.error_position.lat, \r\n\t\t\t\t\t\t\tlng: this.settings.error_position.lng,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tthis.map.setZoom(zoom);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tgoogle.maps.event.trigger(this._markers[i].marker, 'click');\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t} \r\n\t}\r\n\r\n\tinitialize(container: HTMLElement, options: IMapSettings): void {\r\n\t\tthis.settings = options;\r\n\t\tlet scheduler = this.scheduler;\r\n\t\tlet mapOptions = {\r\n\t\t\tcenter: { lat: options.initial_position.lat, lng: options.initial_position.lng },\r\n\t\t\tzoom: options.initial_zoom,\r\n\t\t\tmapId: container.id,\r\n\t\t\tscrollwheel: true,\r\n\t\t\tmapTypeId: options.type\r\n\t\t}\r\n\t\t// we need to reuse the google map to avoid leak memory\r\n\t\tif (this.map === null) {\r\n\t\t\tthis.map = new google.maps.Map(container, mapOptions);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tlet map = this.map;\r\n\t\t\tcontainer.appendChild(this.map.__gm.messageOverlay);\r\n\t\t\tcontainer.appendChild(this.map.__gm.outerContainer);\r\n\t\t\tsetTimeout(function() {\r\n\t\t\t\tmap.setOptions({container: container.id});\r\n\t\t\t}, 500);\r\n\t\t}\r\n\t\tgoogle.maps.event.addListener(this.map, \"dblclick\", function(event) {\r\n\t\t\tconst geocoder = new google.maps.Geocoder();\r\n\t\r\n\t\t\tif (!scheduler.config.readonly && scheduler.config.dblclick_create) {\r\n\t\t\t\tlet point = event.latLng;\r\n\t\t\t\tgeocoder.geocode(\r\n\t\t\t\t\t{ 'latLng': point },\r\n\t\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\t\tif (status == google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\t\tpoint = results[0].geometry.location;\r\n\t\t\t\t\t\t\tscheduler.addEventNow({\r\n\t\t\t\t\t\t\t\tlat: point.lat(),\r\n\t\t\t\t\t\t\t\tlng: point.lng(),\r\n\t\t\t\t\t\t\t\tevent_location: results[0].formatted_address,\r\n\t\t\t\t\t\t\t\tstart_date: scheduler.getState().date,\r\n\t\t\t\t\t\t\t\tend_date: scheduler.date.add(scheduler.getState().date, scheduler.config.time_step, \"minute\")\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tconsole.error('Geocode was not successful for the following reason: ' + status);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tdestroy(container: HTMLElement): void {\r\n\t\tgoogle.maps.event.clearInstanceListeners(window);\r\n\t\tgoogle.maps.event.clearInstanceListeners(document);\r\n\t\tgoogle.maps.event.clearInstanceListeners(container);\r\n\t\twhile (container.firstChild) {\r\n\t\t\tcontainer.firstChild.remove();\r\n\t\t}\r\n\t\tcontainer.innerHTML = \"\";\r\n\t}\r\n\r\n\tasync addEventMarker(event: ICalendarEvent): Promise {\r\n\t\tlet config = {\r\n\t\t\ttitle: event.text,\r\n\t\t\tposition: {},\r\n\t\t\tmap: {}\r\n\t\t}\r\n\t\t\r\n\t\tif (event.lat && event.lng) {\r\n\t\t\tconfig.position = { lat: event.lat, lng: event.lng };\r\n\t\t} else {\r\n\t\t\tconfig.position = { lat: this.settings.error_position.lat, lng: this.settings.error_position.lng }\r\n\t\t}\r\n\t\tconst { AdvancedMarkerElement } = await google.maps.importLibrary(\"marker\");\r\n\t\tlet marker;\r\n\t\tif (this.scheduler.ext.mapView.createMarker) {\r\n\t\t\tconfig.map = this.map;\r\n\t\t\tmarker = this.scheduler.ext.mapView.createMarker(config);\r\n\t\t} else {\r\n\t\t\tmarker = new AdvancedMarkerElement(config);\r\n\t\t\tmarker.map = this.map;\r\n\t\t}\r\n\t\tmarker.setMap(this.map);\r\n\t\t//case for markeks which were deleted with DataProcessor\r\n\t\tif (event[\"!nativeeditor_status\"] == \"true_deleted\"){\r\n\t\t\tmarker.setMap(null);\r\n\t\t}\r\n\t\tgoogle.maps.event.addListener(marker, \"click\", () => {\r\n\t\t\tif (this.infoWindow) {\r\n\t\t\t\tthis.infoWindow.close();\r\n\t\t\t}\r\n\t\t\tthis.infoWindow = new google.maps.InfoWindow({maxWidth: this.settings.info_window_max_width});\r\n\t\t\tthis.infoWindow.setContent(this.scheduler.templates.map_info_content(event));\r\n\t\t\tthis.infoWindow.open({\r\n\t\t\t\tanchor: marker,\r\n\t\t\t\tmap: this.map,\r\n\t\t\t});\r\n\t\t});\r\n\t\tlet markerInfo = {event, ...config, marker};\r\n\t\tthis._markers.push(markerInfo);\r\n\t}\r\n\r\n\tremoveEventMarker(eventId: string): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif (eventId == this._markers[i].event.id) {\r\n\t\t\t\tthis._markers[i].marker.setVisible(false);\r\n\t\t\t\tthis._markers[i].marker.setMap(null);\r\n\t\t\t\tthis._markers[i].marker.setPosition(null);\r\n\t\t\t\tthis._markers[i].marker = null;\r\n\t\t\t\tthis._markers.splice(i,1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tupdateEventMarker(event: ICalendarEvent): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif(this._markers[i].event.id == event.id) {\r\n\t\t\t\tthis._markers[i].event = event;\r\n\t\t\t\tthis._markers[i].position.lat = event.lat;\r\n\t\t\t\tthis._markers[i].position.lng = event.lng;\r\n\t\t\t\tthis._markers[i].text = event.text;\r\n\t\t\t\tlet latlng = new google.maps.LatLng(event.lat, event.lng);\r\n\t\t\t\tthis._markers[i].marker.setPosition(latlng);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tclearEventMarkers(): void {\r\n\t\tif (this._markers.length > 0) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\t\tthis._markers[i].marker.setMap(null);\r\n\t\t\t}\r\n\t\t\tthis._markers = [];\r\n\t\t}\r\n\t}\r\n\r\n\tsetView(latitude: number, longitude: number, zoom: number): void {\r\n\t\tthis.map.setCenter({\r\n\t\t\tlat: latitude, \r\n\t\t\tlng: longitude,\r\n\t\t});\r\n\t\tthis.map.setZoom(zoom);\r\n\t}\r\n\r\n\tasync resolveAddress(string: string): Promise {\r\n\t\tconst geocoder = new google.maps.Geocoder();\r\n\t\tlet position: any = await new Promise((resolve) => {\r\n\t\t\tgeocoder.geocode(\r\n\t\t\t\t{ 'address': string },\r\n\t\t\t\tfunction(results, status) {\r\n\t\t\t\t\tif (status == google.maps.GeocoderStatus.OK) {\r\n\t\t\t\t\t\tresolve({\r\n\t\t\t\t\t\t lat: results[0].geometry.location.lat(),\r\n\t\t\t\t\t\t lng: results[0].geometry.location.lng()\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tconsole.error('Geocode was not successful for the following reason: ' + status);\r\n\t\t\t\t\t\tresolve({});\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t});\r\n\t\treturn position;\r\n\t}\r\n\t\r\n}","import { IMapAdapter, ICalendarEvent, IMapSettings, IMapPosition} from \"./types\";\r\n\r\ndeclare let L: any\r\n\r\nexport class OpenStreetMapAdapter implements IMapAdapter {\r\n\tprivate map: any;\r\n\tprivate scheduler: any;\r\n\tprivate _markers: any[];\r\n\tprivate settings: IMapSettings;\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.map = null;\r\n\t\tthis._markers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t}\r\n\tonEventClick(event: ICalendarEvent): void {\r\n\t\tif (this._markers && this._markers.length > 0) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\t\tif (event.id == this._markers[i].event.id) {\r\n\t\t\t\t\tthis._markers[i].marker.openPopup();\r\n\t\t\t\t\tthis._markers[i].marker.closeTooltip();\r\n\t\t\t\t\tif (event.lat && event.lng) {\r\n\t\t\t\t\t\tthis.setView(event.lat, event.lng, this.settings.zoom_after_resolve || this.settings.initial_zoom);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.setView(this.settings.error_position.lat, this.settings.error_position.lng, this.settings.zoom_after_resolve || this.settings.initial_zoom);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t} \r\n\t}\r\n\r\n\tinitialize(container: HTMLElement, options: IMapSettings): void {\r\n\t\tlet scheduler = this.scheduler;\r\n\t\tlet mapWrapper = document.createElement('div');\r\n\t\tmapWrapper.className = 'mapWrapper';\r\n\t\tmapWrapper.id = 'mapWrapper';\r\n\t\tmapWrapper.style.width = container.style.width;\r\n\t\tmapWrapper.style.height = container.style.height;\r\n\t\tcontainer.appendChild(mapWrapper);\r\n\r\n\t\tlet map = L.map(mapWrapper, {\r\n\t\t\tcenter: L.latLng(options.initial_position.lat, options.initial_position.lng),\r\n\t\t\tzoom: options.initial_zoom,\r\n\t\t\tkeyboard: false // need to set false, due to bug with moving window\r\n\t\t});\r\n\t\tL.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(map);\r\n\t\tmap.on(\"dblclick\", async function(e){\r\n\t\t\tconst settings = {\r\n\t\t\t\t\"method\": \"GET\",\r\n\t\t\t\theaders: {\r\n\t\t\t\t\t\"Accept-Language\": \"en\",\r\n\t\t\t\t},\r\n\t\t\t};\r\n\t\t\tlet response = await fetch(`https://nominatim.openstreetmap.org/reverse?lat=${e.latlng.lat}&lon=${e.latlng.lng}&format=json`, settings).then(response => response.json());\r\n\t\t\tif (response.address) {\r\n\t\t\t\tlet address = response.address.country;\r\n\t\t\t\tscheduler.addEventNow({\r\n\t\t\t\t\tlat: e.latlng.lat,\r\n\t\t\t\t\tlng: e.latlng.lng,\r\n\t\t\t\t\tevent_location: address,\r\n\t\t\t\t\tstart_date: scheduler.getState().date,\r\n\t\t\t\t\tend_date: scheduler.date.add(scheduler.getState().date, scheduler.config.time_step, \"minute\")\r\n\t\t\t\t});\r\n\t\t\t} else {\r\n\t\t\t\tconsole.error(\"unable recieve a position of the event\", response.error);\r\n\t\t\t}\r\n\t\t});\r\n\t\tthis.map = map;\r\n\t\tthis.settings = options;\r\n\t}\r\n\r\n\tdestroy(container: HTMLElement): void {\r\n\t\tthis.map.remove();\r\n\t\twhile (container.firstChild) {\r\n\t\t\tcontainer.firstChild.remove();\r\n\t\t}\r\n\t\tcontainer.innerHTML = \"\";\r\n\t}\r\n\r\n\taddEventMarker(event: ICalendarEvent): void {\r\n\t\tconst myIcon = L.icon({\r\n\t\t\ticonUrl: 'https://unpkg.com/leaflet@1.0.3/dist/images/marker-icon.png',\r\n\t\t\ticonSize: [25, 41],\r\n\t\t\tshadowSize: [30, 65],\r\n\t\t\ticonAnchor: [12, 41],\r\n\t\t\tshadowAnchor: [7, 65]\r\n\t\t});\r\n\t\tlet popupConfig = {\r\n\t\t\tminWidth: 180,\r\n\t\t\tmaxWidth: this.settings.info_window_max_width,\r\n\t\t}\r\n\t\tconst markerPopup = L.popup(popupConfig).setContent(this.scheduler.templates.map_info_content(event));\r\n\t\tconst tooltip = L.tooltip().setContent(event.text);\r\n\r\n\t\tlet markerConfig = [\r\n\t\t\tevent.lat,\r\n\t\t\tevent.lng\r\n\t\t]\r\n\t\t\r\n\t\tif (!event.lat || !event.lng) {\r\n\t\t\tmarkerConfig = [this.settings.error_position.lat, this.settings.error_position.lng];\r\n\t\t}\r\n\t\tconst marker = L.marker(markerConfig, {\r\n\t\t\ticon: myIcon\r\n\t\t}).bindPopup(markerPopup).bindTooltip(tooltip).addTo(this.map);\r\n\t\tconst markerInfo = {event, marker};\r\n\t\tthis._markers.push(markerInfo);\t\t\r\n\t}\r\n\r\n\tremoveEventMarker(eventId: string): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif (eventId == this._markers[i].event.id) {\r\n\t\t\t\tthis.map.removeLayer(this._markers[i].marker);\r\n\t\t\t\tthis._markers.splice(i,1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tupdateEventMarker(event: ICalendarEvent): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif(this._markers[i].event.id == event.id) {\r\n\t\t\t\tthis._markers[i].event = event;\r\n\t\t\t\tif (!event.lat || !event.lng){\r\n\t\t\t\t\tthis._markers[i].marker.setLatLng([this.settings.error_position.lat, this.settings.error_position.lng]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis._markers[i].marker.setLatLng([event.lat, event.lng]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tclearEventMarkers(): void {\r\n\t\tif(this._markers) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\t\tthis.map.removeLayer(this._markers[i].marker); \r\n\t\t\t}\r\n\t\t\tthis._markers = [];\r\n\t\t}\r\n\t}\r\n\r\n\tsetView(latitude: number, longitude: number, zoom: number): void {\r\n\t\tthis.map.setView([latitude, longitude], zoom);\r\n\t}\r\n\r\n\tasync resolveAddress(string: string): Promise {\r\n\t\tconst settings = {\r\n\t\t\t\"method\": \"GET\",\r\n\t\t\theaders: {\r\n\t\t\t\t\"Accept-Language\": \"en\",\r\n\t\t\t},\r\n\t\t};\r\n\t\tlet position:any = {};\r\n\t\tlet response = await fetch(`https://nominatim.openstreetmap.org/search?q=${string}&format=json`, settings).then(response => response.json());\r\n\t\tif (response && response.length) {\r\n\t\t\tposition.lat = +response[0].lat;\r\n\t\t\tposition.lng = +response[0].lon;\r\n\t\t} else {\r\n\t\t\tconsole.error(`Unable recieve a position of the event's location: ${string}`);\r\n\t\t}\r\n\t\treturn position;\r\n\t}\r\n}","import { IMapAdapter, ICalendarEvent, IMapSettings, IMapPosition} from \"./types\";\r\n\r\ndeclare let mapboxgl: any;\r\ndeclare let MapboxGeocoder: any;\r\n\r\nexport class MapboxAdapter implements IMapAdapter {\r\n\tprivate map: any;\r\n\tprivate scheduler: any;\r\n\tprivate settings: IMapSettings;\r\n\tprivate _markers: any[];\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.map = null;\r\n\t\tthis._markers = [];\r\n\t\tthis.scheduler = scheduler;\r\n\t}\r\n\tonEventClick(event: ICalendarEvent): void {\r\n\t\tif (this._markers && this._markers.length > 0) {\r\n\t\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n const popup = this._markers[i].marker.getPopup();\r\n if (popup.isOpen()){\r\n popup.remove();\r\n }\r\n\t\t\t\tif (event.id == this._markers[i].event.id) {\r\n\t\t\t\t\tthis._markers[i].marker.togglePopup();\r\n\t\t\t\t\tif (event.lat && event.lng) {\r\n\t\t\t\t\t\tthis.setView(event.lat, event.lng, this.settings.zoom_after_resolve || this.settings.initial_zoom);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.setView(this.settings.error_position.lat, this.settings.error_position.lng, this.settings.zoom_after_resolve || this.settings.initial_zoom);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t} \r\n\t}\r\n\r\n\tinitialize(container: HTMLElement, options: IMapSettings): void {\r\n let scheduler = this.scheduler;\r\n\r\n\t\tmapboxgl.accessToken = options.accessToken;\r\n const map = new mapboxgl.Map({\r\n container: container, \r\n center: [options.initial_position.lng, options.initial_position.lat], \r\n zoom: options.initial_zoom + 1, // problems with coordinates if zoom = 1\r\n });\r\n map.on(\"dblclick\",async function(e){\r\n\t\t\tlet response = await fetch(`https://api.mapbox.com/geocoding/v5/mapbox.places/${e.lngLat.lng},${ e.lngLat.lat}.json?access_token=${options.accessToken}`).then(response => response.json());\r\n\t\t\tif (response.features){\r\n\t\t\t\tlet address = response.features[0].place_name;\r\n\t\t\t\tscheduler.addEventNow({\r\n\t\t\t\t\tlat: e.lngLat.lat,\r\n\t\t\t\t\tlng: e.lngLat.lng,\r\n\t\t\t\t\tevent_location: address,\r\n\t\t\t\t\tstart_date: scheduler.getState().date,\r\n\t\t\t\t\tend_date: scheduler.date.add(scheduler.getState().date, scheduler.config.time_step, \"minute\")\r\n\t\t\t\t});\r\n\t\t\t} else {\r\n\t\t\t\tconsole.error(\"unable recieve a position of the event\");\r\n\t\t\t}\r\n\t\t});\r\n this.map = map;\r\n this.settings = options;\r\n\t}\r\n\r\n\tdestroy(container: HTMLElement): void {\r\n\t\tthis.map.remove();\r\n while (container.firstChild) {\r\n\t\t\tcontainer.firstChild.remove();\r\n\t\t}\r\n container.innerHTML = \"\";\r\n\t}\r\n\r\n\taddEventMarker(event: ICalendarEvent): void {\r\n let config = [\r\n\t\t\tevent.lng,\r\n\t\t\tevent.lat\r\n\t\t]\r\n\t\t\r\n\t\tif (!event.lat || !event.lng) {\r\n\t\t\tconfig = [this.settings.error_position.lng, this.settings.error_position.lat];\r\n\t\t} \r\n\r\n\t\tconst popup = new mapboxgl.Popup({ offset: 25, focusAfterOpen: false})\r\n .setMaxWidth(`${this.settings.info_window_max_width}px`) \r\n .setHTML(this.scheduler.templates.map_info_content(event));\r\n const marker = new mapboxgl.Marker()\r\n .setLngLat(config)\r\n .setPopup(popup)\r\n .addTo(this.map);\r\n const markerInfo = {event, marker}; \r\n this._markers.push(markerInfo);\r\n\t}\r\n\r\n\tremoveEventMarker(eventId: string): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif (eventId == this._markers[i].event.id) {\r\n\t\t\t\tthis._markers[i].marker.remove();\r\n this._markers.splice(i,1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tupdateEventMarker(event: ICalendarEvent): void {\r\n\t\tfor (let i = 0; i < this._markers.length; i++) {\r\n\t\t\tif(this._markers[i].event.id == event.id) {\r\n\t\t\t\tthis._markers[i].event = event;\r\n\t\t\t\tif (!event.lat || !event.lng){\r\n\t\t\t\t\tthis._markers[i].marker.setLngLat([this.settings.error_position.lng, this.settings.error_position.lat]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis._markers[i].marker.setLngLat([event.lng, event.lat]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tclearEventMarkers(): void {\r\n\t\tfor (let i = 0; i {\r\n\t\tlet response = await fetch(`https://api.mapbox.com/geocoding/v5/mapbox.places/${string}.json?access_token=${this.settings.accessToken}`).then(response => response.json());\r\n\t\tlet position:any = {};\r\n\t\tif (response && response.features.length) {\r\n\t\t\tposition.lng = response.features[0].center[0];\r\n\t\t\tposition.lat = response.features[0].center[1];\r\n\t\t} else {\r\n\t\t\tconsole.error(`Unable recieve a position of the event's location: ${string}`);\r\n\t\t}\r\n\t\treturn position;\r\n\t}\r\n}","import { GoogleMapAdapter } from \"./gMapAdapter\";\r\nimport { OpenStreetMapAdapter } from \"./osmMapAdapter\";\r\nimport { MapboxAdapter } from \"./mapboxAdapter\";\r\nimport { IMapAdapter, ICalendarEvent, IMapSettings } from \"./types\";\r\n\r\ndeclare let google: any;\r\n\r\nexport default function(scheduler: any){\r\n\t\r\nlet mapAdapter: IMapAdapter | null = null;\r\nlet eventHandlerIds: number[] = [];\r\nconst adapters: { [name:string]: IMapAdapter } = {\r\n\tgoogleMap: new GoogleMapAdapter(scheduler),\r\n\topenStreetMaps: new OpenStreetMapAdapter(scheduler),\r\n\tmapbox: new MapboxAdapter(scheduler)\r\n}\r\n\r\nif(!scheduler.ext){\r\n\tscheduler.ext = {};\r\n}\r\nscheduler.ext.mapView = {\r\n\tcreateAdapter: function():IMapAdapter{\r\n\t\treturn adapters[scheduler.config.map_view_provider];\r\n\t},\r\n\tcreateMarker: function(config){\r\n\t\treturn new google.maps.Marker(config);\r\n\t},\r\n\tcurrentAdapter: null,\r\n\tadapters\r\n};\r\nscheduler._latLngUpdate = false; // flag for updating events which don't have event.lat and event.lng\r\nscheduler._eventLocationChanged = false; // flag for checking if the location of the event is changed\r\nscheduler.config.map_view_provider = \"googleMap\";\r\nscheduler.config.map_settings = {\r\n\tinitial_position: {\r\n\t lat: 48.724,\r\n\t lng: 8.215\r\n\t},\r\n\terror_position: {\r\n\t lat: 15,\r\n\t lng: 15\r\n\t},\r\n\tinitial_zoom: 1,\r\n\tzoom_after_resolve: 15,\r\n\tinfo_window_max_width: 300,\r\n\tresolve_user_location: true,\r\n\tresolve_event_location: true,\r\n\tview_provider: \"googleMap\"\r\n}\r\nif (scheduler.config.map_initial_position) {\r\n\tscheduler.config.map_settings.initial_position = {\r\n\t\tlat: scheduler.config.map_initial_position.lat(),\r\n\t\tlng: scheduler.config.map_initial_position.lng(), \r\n\t};\r\n}\r\n\r\nif (scheduler.config.map_error_position) {\r\n\tscheduler.config.map_settings.error_position = {\r\n\t\tlat: scheduler.config.map_error_position.lat(),\r\n\t\tlng: scheduler.config.map_error_position.lng(), \r\n\t};\r\n}\r\n\r\nscheduler.xy.map_date_width = 188; // date column width\r\nscheduler.xy.map_icon_width = 25; // event details icon width\r\nscheduler.xy.map_description_width = 400; // description column width\r\nscheduler.date.add_map = function(date, inc, mode) {\r\n\treturn (new Date(date.valueOf()));\r\n};\r\nscheduler.templates.map_date = function(dd, ed, mode) {\r\n\treturn '';\r\n};\r\nscheduler.templates.map_time = function(start, end, ev) {\r\n\tif (scheduler.config.rtl && !ev._timed) {\r\n\t\treturn scheduler.templates.day_date(end) + \" – \" + scheduler.templates.day_date(start);\r\n\t} else if (ev._timed) {\r\n\t\treturn this.day_date(ev.start_date, ev.end_date, ev) + \" \" + this.event_date(start);\r\n\t} else {\r\n\t\treturn scheduler.templates.day_date(start) + \" – \" + scheduler.templates.day_date(end);\r\n\t}\r\n};\r\nscheduler.templates.map_text = function(start, end, ev) {\r\n\treturn ev.text;\r\n};\r\nscheduler.templates.map_info_content = function(event){\r\n return `
Event's text: ${event.text}\r\n\t\t\t\t
Location: ${event.event_location}
\r\n\t\t\t\t
Starts: ${scheduler.templates.tooltip_date_format(event.start_date)}
\r\n\t\t\t\t
Ends: ${scheduler.templates.tooltip_date_format(event.end_date)}
\r\n\t\t\t
`;\r\n};\r\nscheduler.date.map_start = function(d) {\r\n\treturn d;\r\n};\r\n\r\nfunction setupMapView(scheduler) {\r\n\t// Initialization logic, possibly including creation of a new mapAdapter\r\n\tmapAdapter = scheduler.ext.mapView.createAdapter();\r\n\tattachSchedulerEvents();\r\n}\r\nasync function addEventWithLocation(event: ICalendarEvent, mapAdapter: IMapAdapter){\r\n\tlet coordinates = await mapAdapter.resolveAddress(event.event_location);\r\n\tevent.lat = coordinates.lat;\r\n\tevent.lng = coordinates.lng;\r\n\tmapAdapter.removeEventMarker(String(event.id));\r\n\tmapAdapter.addEventMarker(event);\r\n\treturn event;\r\n}\r\nfunction setUserLocation(options: IMapSettings, adapter: IMapAdapter): void{\r\n\tif (options.resolve_user_location) {\r\n\t\tif (navigator.geolocation) {\r\n\t\t\tnavigator.geolocation.getCurrentPosition(function(position) {\r\n\t\t\t\tadapter.setView(position.coords.latitude, position.coords.longitude, options.zoom_after_resolve || options.initial_zoom);\r\n\t\t\t});\r\n\t\t}\r\n\t} else {\r\n\t\tadapter.setView(options.initial_position.lat, options.initial_position.lng, options.initial_zoom);\r\n\t}\r\n}\r\nscheduler.dblclick_dhx_map_area = function(e) {\r\n\tlet eventNode = e.target.closest(`[${scheduler.config.event_attribute}]`);\r\n\tif (eventNode){\r\n\t\tlet eventId = eventNode.getAttribute(`${scheduler.config.event_attribute}`);\r\n\t\tscheduler.showLightbox(eventId);\r\n\t}\r\n\tif (!this.config.readonly && this.config.dblclick_create && !eventNode) {\r\n\t\tthis.addEventNow({\r\n\t\t\tstart_date: scheduler.config.map_start,\r\n\t\t\tend_date: scheduler.date.add( scheduler.config.map_start, scheduler.config.time_step, \"minute\"),\r\n\t\t});\r\n\t}\t\r\n};\r\n\r\nfunction attachSchedulerEvents() { \r\n eventHandlerIds.push(\r\n\tscheduler.attachEvent(\"onEventSave\",function(id,ev,is_new){\r\n\t\tlet unmodifiedEvent = scheduler.getEvent(id);\r\n\t\tif (unmodifiedEvent && unmodifiedEvent.event_location != ev.event_location) {\r\n\t\t\tscheduler._eventLocationChanged = true;\r\n\t\t}\r\n\t\treturn true;\r\n\t}),\r\n scheduler.attachEvent(\"onEventChanged\", (id, event) => {\r\n\t\tconst {start_date, end_date} = event;\r\n\t\tconst {min_date, max_date} = scheduler.getState();\r\n\t\tif(start_date.valueOf() < max_date.valueOf() && end_date.valueOf() > min_date.valueOf()){\r\n\t\t\tif (mapAdapter) {\r\n\t\t\t\tif (scheduler.config.map_settings.resolve_event_location && event.event_location && !scheduler._latLngUpdate ) {\r\n\t\t\t\t \taddEventWithLocation(event, mapAdapter);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmapAdapter.updateEventMarker(event);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._latLngUpdate = false;\r\n\t\treturn true;\r\n }),\r\n\tscheduler.attachEvent(\"onEventIdChange\", function(old_id,new_id){\r\n\t\tlet newIdEvent = scheduler.getEvent(new_id);\r\n\t\tmapAdapter?.removeEventMarker(old_id);\r\n\t\tmapAdapter?.addEventMarker(newIdEvent);\r\n\t}),\r\n scheduler.attachEvent(\"onEventAdded\", (id, event) => {\r\n\t\tconst {start_date, end_date} = event;\r\n\t\tconst {min_date, max_date} = scheduler.getState();\r\n\t\tif(start_date.valueOf() < max_date.valueOf() && end_date.valueOf() > min_date.valueOf()){\r\n \t\tif (mapAdapter) {\r\n\t\t\t\tif (scheduler.config.map_settings.resolve_event_location && event.event_location && scheduler._eventLocationChanged) {\r\n\t\t\t\t\taddEventWithLocation(event, mapAdapter);\r\n\t\t\t\t\tscheduler._eventLocationChanged = false;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmapAdapter.addEventMarker(event);\r\n\t\t\t\t\tmapAdapter.onEventClick(event);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n }),\r\n scheduler.attachEvent(\"onClick\", function (id, e){\r\n\t\tconst event = scheduler.getEvent(id);\r\n\t\tif (mapAdapter && event) mapAdapter.onEventClick(event);\r\n\t\treturn false;\r\n }),\r\n scheduler.attachEvent(\"onBeforeEventDelete\", (id, event) => {\r\n\t\tif (mapAdapter) {\r\n\t\t\tmapAdapter.removeEventMarker(id);\r\n\t\t}\r\n\t\treturn true;\r\n })\r\n );\r\n}\r\nfunction detachSchedulerEvents() {\r\n\teventHandlerIds.forEach(id => scheduler.detachEvent(id));\r\n\teventHandlerIds = [];\r\n}\r\n\r\nscheduler.attachEvent(\"onSchedulerReady\", function() {\r\n\r\n\tif(scheduler.config.map_initial_zoom !== undefined){\r\n\t\tscheduler.config.map_settings.initial_zoom = scheduler.config.map_initial_zoom;\r\n\t}\r\n\tif(scheduler.config.map_zoom_after_resolve !== undefined){\r\n\t\tscheduler.config.map_settings.zoom_after_resolve = scheduler.config.map_zoom_after_resolve;\r\n\t}\r\n\tif(scheduler.config.map_infowindow_max_width !== undefined){\r\n\t\tscheduler.config.map_settings.info_window_max_width = scheduler.config.map_infowindow_max_width;\r\n\t}\r\n\tif(scheduler.config.map_resolve_user_location !== undefined){\r\n\t\tscheduler.config.map_settings.resolve_user_location = scheduler.config.map_resolve_user_location;\r\n\t}\r\n\tif(scheduler.config.map_view_provider !== undefined){\r\n\t\tscheduler.config.map_settings.view_provider = scheduler.config.map_view_provider;\r\n\t}\r\n\tif(scheduler.config.map_type !== undefined){\r\n\t\tscheduler.config.map_settings.type = scheduler.config.map_type;\r\n\t}\r\n\tif(scheduler.config.map_resolve_event_location !== undefined){\r\n\t\tscheduler.config.map_settings.resolve_event_location = scheduler.config.map_resolve_event_location;\r\n\t}\r\n\tscheduler.ext.mapView.currentAdapter = scheduler.config.map_view_provider;\r\n\r\n\tlet map = document.createElement('div');\r\n\tmap.className = 'mapContainer';\r\n\tmap.id = 'mapContainer';\r\n\tmap.style.display = \"none\";\r\n\tmap.style.zIndex = \"1\";\r\n\tscheduler._obj.appendChild(map);\r\n\r\n\tconst old = scheduler.render_data;\r\n\tscheduler.render_data = function(evs, hold) {\r\n\t\tif (this._mode == \"map\") {\r\n\t\t\tfill_map_tab();\r\n\t\t\tlet events = scheduler.get_visible_events();\r\n\t\t\tif (mapAdapter) {\r\n\t\t\t\tmapAdapter.clearEventMarkers();\r\n\t\t\t\tevents.forEach((event) => mapAdapter?.addEventMarker(event));\r\n\t\t\t}\r\n\t\t} else\r\n\t\t\treturn old.apply(this, arguments);\r\n\t};\r\n\r\n\tscheduler.map_view = function(mode) {\r\n\t\tscheduler._els.dhx_cal_data[0].style.width = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\tscheduler._min_date = scheduler.config.map_start || (scheduler._currentDate());\r\n\t\tscheduler._max_date = scheduler.config.map_end || scheduler.date.add(scheduler._currentDate(), 1, \"year\");\r\n\t\tscheduler._table_view = true;\r\n\t\tset_full_view(mode);\r\n\t\tlet mapContainer = document.getElementById('mapContainer');\r\n\t\t_setMapSize('mapContainer');\r\n\r\n\t\t// creating the new logic\r\n\t\tif (mode && mapContainer) {\r\n\t\t\tmap.style.display = 'block';\r\n\t\t\tfill_map_tab();\r\n\t\t\t// case to display several maps and has the opportunity to switch between them\r\n\t\t\tif (scheduler.config.map_view_provider == scheduler.ext.mapView.currentAdapter) {\r\n\t\t\t\tmapAdapter?.destroy(mapContainer);\r\n\t\t\t\tsetupMapView(scheduler);\r\n\t\t\t\tmapAdapter?.initialize(mapContainer, scheduler.config.map_settings);\r\n\t\t\t} else {\r\n\t\t\t\tmapAdapter?.destroy(mapContainer);\r\n\t\t\t\tsetupMapView(scheduler);\r\n\t\t\t\tmapAdapter?.initialize(mapContainer, scheduler.config.map_settings);\r\n\t\t\t \tscheduler.ext.mapView.currentAdapter = scheduler.config.map_view_provider;\r\n\t\t\t}\r\n\t\t\tif(mapAdapter) {\r\n\t\t\t\tsetUserLocation(scheduler.config.map_settings, mapAdapter);\r\n\t\t\t}\t\r\n\t\t} else {\r\n\t\t\tmap.style.display = 'none';\r\n\t\t\tscheduler._els.dhx_cal_data[0].style.width = \"100%\";\r\n\t\t \tif (mapAdapter && mapContainer ) {\r\n\t\t\t\tmapAdapter.destroy(mapContainer);\r\n\t\t\t\tmapAdapter = null;\r\n\t\t\t\tscheduler.ext.mapView.currentAdapter = scheduler.config.map_view_provider;\r\n\t\t }\r\n\t\t \tdetachSchedulerEvents();\r\n\t\t}\r\n\t};\r\n\r\n\tfunction _setMapSize(elem_id) { //input - map's div id\r\n\t\tlet map = document.getElementById(elem_id);\r\n\t\tif (map) {\r\n\t\t\tconst nav_height = scheduler.$container.querySelector(\".dhx_cal_navline\").offsetHeight;\r\n\t\t\tlet height = scheduler.$container.querySelector(\".dhx_cal_data\").offsetHeight + scheduler.$container.querySelector(\".dhx_cal_header\").offsetHeight;\r\n\t\t\tif (height < 0)\r\n\t\t\t\theight = 0;\r\n\t\t\tlet width = scheduler._x - scheduler.xy.map_date_width - scheduler.xy.map_description_width - 1;\r\n\t\t\tif (width < 0)\r\n\t\t\t\twidth = 0;\r\n\t\t\tmap.style.height = height + 'px';\r\n\t\t\tmap.style.width = width + 'px';\r\n\t\t\tmap.style.position = \"absolute\";\r\n\t\t\tmap.style.top = nav_height + \"px\";\r\n\t\t\tif (scheduler.config.rtl) {\r\n\t\t\t\tmap.style.marginRight = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\t\t} else {\r\n\t\t\t\tmap.style.marginLeft = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\t\t\t}\r\n\t\t\tmap.style.marginTop = (scheduler.xy.nav_height + 2) + 'px';\r\n\t\t}\r\n\t}\t\r\n\tfunction fill_map_tab() {\r\n\t\t//select events for which data need to be printed\r\n\t\tlet events = scheduler.get_visible_events();\r\n\t\tevents.sort(function(a, b) {\r\n\t\t\tif(a.start_date.valueOf()==b.start_date.valueOf())\r\n\t\t\t\treturn a.id>b.id?1:-1;\r\n\t\t\treturn a.start_date>b.start_date?1:-1;\r\n\t\t});\r\n\r\n\t\t//generate html for the view\r\n\t\tlet ariaAttr = scheduler._waiAria.mapAttrString();\r\n\r\n\t\tlet html = \"
\";\r\n\t\tfor (let i = 0; i < events.length; i++) {\r\n\t\t\tlet ev = events[i];\r\n\t\t\tlet event_class = (ev.id == scheduler._selected_event_id) ? 'dhx_map_line highlight' : 'dhx_map_line';\r\n\t\t\tlet bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\t\t\tlet color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\t\t\tlet ariaAttr = scheduler._waiAria.mapRowAttrString(ev);\r\n\t\t\tlet ariaButtonAttr = scheduler._waiAria.mapDetailsBtnString();\r\n\r\n\t\t\thtml += \"
\" + scheduler.templates.map_time(ev.start_date, ev.end_date, ev) + \"
\";\r\n\t\t\thtml += `
\r\n\t\t\t\r\n\t\t\t
`;\r\n\t\t\thtml += \"
\" + scheduler.templates.map_text(ev.start_date, ev.end_date, ev) + \"
\"; // -25 = icon size 20 and padding 5\r\n\t\t}\r\n\t\thtml += \"
\";\r\n\r\n\t\t//render html\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].scrollTop = 0; //fix flickering in FF\r\n\t\tscheduler._els[\"dhx_cal_data\"][0].innerHTML = html;\r\n\t//\tscheduler._els[\"dhx_cal_data\"][0].style.width = (scheduler.xy.map_date_width + scheduler.xy.map_description_width + 1) + 'px';\r\n\r\n\t\tlet t = scheduler._els[\"dhx_cal_data\"][0].firstChild.childNodes;\r\n\r\n\t\tlet dateElement = scheduler._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML=scheduler.templates[scheduler._mode + \"_date\"](scheduler._min_date, scheduler._max_date, scheduler._mode);\r\n\t\t}\r\n\r\n\t\tscheduler._rendered = [];\r\n\t\tfor (let i = 0; i < t.length - 2; i++) {\r\n\t\t\tscheduler._rendered[i] = t[i];\r\n\t\t}\r\n\t}\r\n\tfunction set_full_view(mode) {\r\n\t\tif (mode) {\r\n\t\t\tconst l = scheduler.locale.labels;\r\n\t\t\tscheduler._els[\"dhx_cal_header\"][0].innerHTML = \"
\" + l.date + \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"
\" + l.description + \"
\";\r\n\t\t\tscheduler._table_view = true;\r\n\t\t\tscheduler.set_sizes();\r\n\t\t}\r\n\t}\r\n\t\r\n\tscheduler.attachEvent(\"onLocationError\", function (id){\r\n\t\talert(\"Location can't be found\");\r\n\t\treturn google.maps.LatLng(51.477840, -0.001492); \r\n\t\t//the coordinates of the Greenwich Royal Observatory\r\n\t})\r\n\tlet _updateEventLocation = async function(event) {\r\n\t\tif (mapAdapter){\r\n\t\t\tconst coordinates = await mapAdapter.resolveAddress(event.event_location);\r\n\t\t\tif (coordinates.lat && coordinates.lng) {\r\n\t\t\t\tevent.lat = +coordinates.lat;\r\n\t\t\t\tevent.lng = +coordinates.lng;\r\n\t\t\t} else {\r\n\t\t\t\tscheduler.callEvent(\"onLocationError\", [event.id]);\r\n\t\t\t\tevent.lng = scheduler.config.map_settings.error_position.lng;\r\n\t\t\t\tevent.lat = scheduler.config.map_settings.error_position.lat;\r\n\t\t\t}\r\n\t\t\tscheduler._latLngUpdate = true;\r\n\t\t\tscheduler.callEvent(\"onEventChanged\", [event.id, event]);\r\n\t\t}\r\n\t};\r\n\tlet _delay = function(method, object, params, delay) {\r\n\t\tsetTimeout(function() {\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tlet ret = method.apply(object, params);\r\n\t\t\tmethod = object = params = null;\r\n\t\t\treturn ret;\r\n\t\t}, delay || 1);\r\n\t};\r\n\tscheduler._event_resolve_delay = 1500;\r\n\tscheduler.attachEvent(\"onEventLoading\", function(event) {\r\n\t\tif (event.lat && event.lng) {\r\n\t\t\tevent.lat = +event.lat;\r\n\t\t\tevent.lng = +event.lng;\r\n\t\t}\r\n\t\tif (scheduler.config.map_settings.resolve_event_location && event.event_location && !event.lat && !event.lng) { // don't delete !event.lat && !event.lng as location could change\r\n\t\t\tscheduler._event_resolve_delay += 1500;\r\n\t\t\t_delay(_updateEventLocation, this, [event], scheduler._event_resolve_delay);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n})\r\n\r\n}","export default function(scheduler){\r\n\r\nconst minicalDomEvents = scheduler._createDomEventScope();\r\n\t\r\n\r\nscheduler.config.minicalendar = {\r\n\tmark_events: true\r\n};\r\nscheduler._synced_minicalendars = [];\r\nscheduler.renderCalendar = function(obj, _prev, is_refresh) {\r\n\tvar cal = null;\r\n\tvar date = obj.date || (scheduler._currentDate());\r\n\tif (typeof date == \"string\")\r\n\t\tdate = this.templates.api_date(date);\r\n\r\n\tif (!_prev) {\r\n\t\tvar cont = obj.container;\r\n\t\tvar pos = obj.position;\r\n\r\n\t\tif (typeof cont == \"string\")\r\n\t\t\tcont = document.getElementById(cont);\r\n\r\n\t\tif (typeof pos == \"string\")\r\n\t\t\tpos = document.getElementById(pos);\r\n\t\tif (pos && (typeof pos.left == \"undefined\" && typeof pos.right == \"undefined\")) {\r\n\t\t\tvar tpos = scheduler.$domHelpers.getOffset(pos);\r\n\t\t\tpos = {\r\n\t\t\t\ttop: tpos.top + pos.offsetHeight,\r\n\t\t\t\tleft: tpos.left\r\n\t\t\t};\r\n\t\t}\r\n\t\tif (!cont)\r\n\t\t\tcont = scheduler._get_def_cont(pos);\r\n\r\n\t\tcal = this._render_calendar(cont, date, obj);\r\n\t\r\n\t\tif (!cal.$_eventAttached) {\r\n\t\t\tcal.$_eventAttached = true;\r\n\t\t\tminicalDomEvents.attach(cal, \"click\", (function(e) {\r\n\t\t\t\tvar src = e.target || e.srcElement;\r\n\r\n\t\t\t\tvar $dom = scheduler.$domHelpers;\r\n\t\t\t\tif ($dom.closest(src, \".dhx_month_head\")) {\r\n\t\t\t\t\tif (!$dom.closest(src, \".dhx_after\") && !$dom.closest(src, \".dhx_before\")) {\r\n\r\n\t\t\t\t\t\tvar cellRoot = $dom.closest(src, \"[data-cell-date]\");\r\n\t\t\t\t\t\tvar dateAttribute = cellRoot.getAttribute(\"data-cell-date\");\r\n\t\t\t\t\t\tvar newDate = scheduler.templates.parse_date(dateAttribute);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tscheduler.unmarkCalendar(this);\r\n\t\t\t\t\t\tscheduler.markCalendar(this, newDate, \"dhx_calendar_click\");\r\n\t\t\t\t\t\tthis._last_date = newDate;\r\n\t\t\t\t\t\tif (this.conf.handler) this.conf.handler.call(scheduler, newDate, this);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}).bind(cal));\r\n\t\t}\r\n\t\r\n\t} else {\r\n\t\tcal = this._render_calendar(_prev.parentNode, date, obj, _prev);\r\n\t\tscheduler.unmarkCalendar(cal);\r\n\t}\r\n\r\n\tif (scheduler.config.minicalendar.mark_events) {\r\n\t\tvar start = scheduler.date.month_start(date);\r\n\t\tvar end = scheduler.date.add(start, 1, \"month\");\r\n\t\tvar evs = this.getEvents(start, end);\r\n\t\tvar filter = this[\"filter_\" + this._mode];\r\n\t\tvar markedDates = {};\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tif (filter && !filter(ev.id, ev))\r\n\t\t\t\tcontinue;\r\n\t\t\tvar d = ev.start_date;\r\n\t\t\tif (d.valueOf() < start.valueOf())\r\n\t\t\t\td = start;\r\n\t\t\td = scheduler.date.date_part(new Date(d.valueOf()));\r\n\t\t\twhile (d < ev.end_date) {\r\n\t\t\t\tif(!markedDates[+d]) {\r\n\t\t\t\t\tmarkedDates[+d] = true;\r\n\t\t\t\t\tthis.markCalendar(cal, d, \"dhx_year_event\");\r\n\t\t\t\t}\r\n\t\t\t\td = this.date.add(d, 1, \"day\");\r\n\t\t\t\tif (d.valueOf() >= end.valueOf())\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tthis._markCalendarCurrentDate(cal);\r\n\r\n\tcal.conf = obj;\r\n\tif (obj.sync && !is_refresh)\r\n\t\tthis._synced_minicalendars.push(cal);\r\n\r\n\tif(!cal.conf._on_xle_handler){\r\n\t\tcal.conf._on_xle_handler = scheduler.attachEvent(\"onXLE\", function refreshOnLoad(){\r\n\t\t\tscheduler.updateCalendar(cal, cal.conf.date);\r\n\t\t});\r\n\t}\r\n\r\n\tif(this.config.wai_aria_attributes && this.config.wai_aria_application_role){\r\n\t\tcal.setAttribute(\"role\", \"application\");\r\n\t}\r\n\r\n\treturn cal;\r\n};\r\nscheduler._get_def_cont = function(pos) {\r\n\tif (!this._def_count) {\r\n\t\tthis._def_count = document.createElement(\"div\");\r\n\t\tthis._def_count.className = \"dhx_minical_popup\";\r\n\t\tscheduler.event(this._def_count, \"click\", function(e) { e.cancelBubble = true; });\r\n\t\tdocument.body.appendChild(this._def_count);\r\n\t}\r\n\r\n\tif(pos.left){\r\n\t\tthis._def_count.style.left = pos.left + \"px\";\r\n\t}\r\n\tif(pos.right){\r\n\t\tthis._def_count.style.right = pos.right + \"px\";\r\n\t}\r\n\tif(pos.top){\r\n\t\tthis._def_count.style.top = pos.top + \"px\";\r\n\t}\r\n\tif(pos.bottom){\r\n\t\tthis._def_count.style.bottom = pos.bottom + \"px\";\r\n\t}\r\n\r\n\tthis._def_count._created = new Date();\r\n\r\n\treturn this._def_count;\r\n};\r\nscheduler._locateCalendar = function(cal, date) {\r\n\tif (typeof date == \"string\")\r\n\t\tdate = scheduler.templates.api_date(date);\r\n\r\n\tif(+date > +cal._max_date || +date < +cal._min_date)\r\n\t\treturn null;\r\n\r\n\tvar table = cal.querySelector(\".dhx_year_body\").childNodes[0];\r\n\r\n\tvar weekNum = 0;\r\n\tvar dat = new Date(cal._min_date);\r\n\twhile(+this.date.add(dat, 1, \"week\") <= +date){\r\n\t\tdat = this.date.add(dat, 1, \"week\");\r\n\t\tweekNum++;\r\n\t}\r\n\r\n\tvar sm = scheduler.config.start_on_monday;\r\n\tvar day = (date.getDay() || (sm ? 7 : 0)) - (sm ? 1 : 0);\r\n\r\n\tconst dayCell = table.querySelector(`.dhx_cal_month_row:nth-child(${weekNum + 1}) .dhx_cal_month_cell:nth-child(${day + 1})`);\r\n\tif(dayCell) {\r\n\t\treturn dayCell.firstChild;\r\n\t} else {\r\n\t\treturn null;\r\n\t}\r\n};\r\nscheduler.markCalendar = function(cal, date, css) {\r\n\tvar div = this._locateCalendar(cal, date);\r\n\tif(!div)\r\n\t\treturn;\r\n\r\n\tdiv.className += \" \" + css;\r\n};\r\nscheduler.unmarkCalendar = function(cal, date, css) {\r\n\tdate = date || cal._last_date;\r\n\tcss = css || \"dhx_calendar_click\";\r\n\tif (!date) return;\r\n\tvar el = this._locateCalendar(cal, date);\r\n\tif(!el)\r\n\t\treturn;\r\n\tel.className = (el.className || \"\").replace(RegExp(css, \"g\"));\r\n};\r\nscheduler._week_template = function(width) {\r\n\tvar summ = (width || 250);\r\n\tvar left = 0;\r\n\r\n\tvar week_template = document.createElement(\"div\");\r\n\tvar dummy_date = this.date.week_start(scheduler._currentDate());\r\n\tfor (var i = 0; i < 7; i++) {\r\n\t\tthis._cols[i] = Math.floor(summ / (7 - i));\r\n\t\tthis._render_x_header(i, left, dummy_date, week_template);\r\n\t\tdummy_date = this.date.add(dummy_date, 1, \"day\");\r\n\t\tsumm -= this._cols[i];\r\n\t\tleft += this._cols[i];\r\n\t}\r\n\tweek_template.lastChild.className += \" dhx_scale_bar_last\";\r\n\treturn week_template;\r\n};\r\nscheduler.updateCalendar = function(obj, sd) {\r\n\tobj.conf.date = sd;\r\n\tthis.renderCalendar(obj.conf, obj, true);\r\n};\r\nscheduler._mini_cal_arrows = [\" \", \" \"];\r\nscheduler._render_calendar = function(obj, sd, conf, previous) {\r\n\t/*store*/\r\n\tvar ts = scheduler.templates;\r\n\tvar temp = this._cols;\r\n\tthis._cols = [];\r\n\tvar temp2 = this._mode;\r\n\tthis._mode = \"calendar\";\r\n\tvar temp3 = this._colsS;\r\n\tthis._colsS = {height: 0};\r\n\tvar temp4 = new Date(this._min_date);\r\n\tvar temp5 = new Date(this._max_date);\r\n\tvar temp6 = new Date(scheduler._date);\r\n\tvar temp7 = ts.month_day;\r\n\tvar temp8 = this._ignores_detected; this._ignores_detected = 0;\r\n\tts.month_day = ts.calendar_date;\r\n\r\n\tsd = this.date.month_start(sd);\r\n\tvar week_template = this._week_template(obj.offsetWidth - 1 - this.config.minicalendar.padding );\r\n\r\n\tvar d;\r\n\tif (previous){\r\n\t\td = previous;\r\n\t} else {\r\n\t\td = document.createElement(\"div\");\r\n\t\td.className = \"dhx_cal_container dhx_mini_calendar\";\r\n\t}\r\n\td.setAttribute(\"date\", this._helpers.formatDate(sd));\r\n\td.innerHTML = \"
\" +\r\n\t\t\t\"
\" : \"'>\") +\r\n\t\t\t\"
\"+(week_template ? week_template.innerHTML : \"\")+\"
\" +\r\n\t\t\t\"
\" +\r\n\t\t\"
\";\r\n\tvar header = d.querySelector(\".dhx_year_month\");\r\n\tvar weekHeader = d.querySelector(\".dhx_year_week\");\r\n\tvar body = d.querySelector(\".dhx_year_body\");\r\n\r\n\theader.innerHTML = this.templates.calendar_month(sd);\r\n\tif (conf.navigation) {\r\n\t\tvar move_minicalendar_date = function(calendar, diff) {\r\n\t\t\tvar date = scheduler.date.add(calendar._date, diff, \"month\");\r\n\t\t\tscheduler.updateCalendar(calendar, date);\r\n\t\t\tif (scheduler._date.getMonth() == calendar._date.getMonth() && scheduler._date.getFullYear() == calendar._date.getFullYear()) {\r\n\t\t\t\tscheduler._markCalendarCurrentDate(calendar);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tvar css_classnames = [\"dhx_cal_prev_button\", \"dhx_cal_next_button\"];\r\n\t\tvar css_texts = [\"left:1px;top:4px;position:absolute;\", \"left:auto; right:1px;top:4px;position:absolute;\"];\r\n\t\tvar diffs = [-1, 1];\r\n\t\tvar handler = function(diff) {\r\n\t\t\treturn function() {\t\r\n\t\t\t\tif (conf.sync) {\r\n\t\t\t\t\tvar calendars = scheduler._synced_minicalendars;\r\n\t\t\t\t\tfor (var k = 0; k < calendars.length; k++) {\r\n\t\t\t\t\t\tmove_minicalendar_date(calendars[k], diff);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (scheduler.config.rtl) {\r\n\t\t\t\t\t\tdiff = -diff;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmove_minicalendar_date(d, diff);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t};\r\n\t\tvar labels = [scheduler.locale.labels.prev, scheduler.locale.labels.next];\r\n\t\tfor (var j = 0; j < 2; j++) {\r\n\t\t\tvar arrow = document.createElement(\"div\");\r\n\t\t\t//var diff = diffs[j];\r\n\t\t\tarrow.className = css_classnames[j];\r\n\r\n\t\t\tscheduler._waiAria.headerButtonsAttributes(arrow, labels[j]);\r\n\r\n\t\t\tarrow.style.cssText = css_texts[j];\r\n\t\t\tarrow.innerHTML = this._mini_cal_arrows[j];\r\n\t\t\theader.appendChild(arrow);\r\n\t\t\tminicalDomEvents.attach(arrow, \"click\", handler(diffs[j]));\r\n\t\t}\r\n\t}\r\n\td._date = new Date(sd);\r\n\r\n\td.week_start = (sd.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;\r\n\r\n\tvar dd = d._min_date = this.date.week_start(sd);\r\n\td._max_date = this.date.add(d._min_date, 6, \"week\");\r\n\r\n\tthis._reset_month_scale(body, sd, dd, 6);\r\n\r\n\tif (!previous)\r\n\t\tobj.appendChild(d);\r\n\r\n\tweekHeader.style.height = (weekHeader.childNodes[0].offsetHeight - 1) + \"px\"; // dhx_year_week should have height property so that day dates would get correct position. dhx_year_week height = height of it's child (with the day name)\r\n\r\n\tvar headerId = scheduler.uid();\r\n\tscheduler._waiAria.minicalHeader(header, headerId);\r\n\tscheduler._waiAria.minicalGrid(d.querySelector(\".dhx_year_grid\"), headerId);\r\n\tscheduler._waiAria.minicalRow(weekHeader);\r\n\r\n\tvar dayHeaders = weekHeader.querySelectorAll(\".dhx_scale_bar\");\r\n\tfor(var i = 0; i < dayHeaders.length; i++){\r\n\t\tscheduler._waiAria.minicalHeadCell(dayHeaders[i]);\r\n\t}\r\n\tvar dayCells = body.querySelectorAll(\".dhx_cal_month_cell\");\r\n\tvar firstDate = new Date(dd);\r\n\tfor(var i = 0; i < dayCells.length; i++){\r\n\r\n\t\tscheduler._waiAria.minicalDayCell(dayCells[i], new Date(firstDate));\r\n\t\tfirstDate = scheduler.date.add(firstDate, 1, \"day\");\r\n\t}\r\n\r\n\tscheduler._waiAria.minicalHeader(header, headerId);\r\n\r\n\t/*restore*/\r\n\tthis._cols = temp;\r\n\tthis._mode = temp2;\r\n\tthis._colsS = temp3;\r\n\tthis._min_date = temp4;\r\n\tthis._max_date = temp5;\r\n\tscheduler._date = temp6;\r\n\tts.month_day = temp7;\r\n\tthis._ignores_detected = temp8;\r\n\treturn d;\r\n};\r\nscheduler.destroyCalendar = function(cal, force) {\r\n\tif (!cal && this._def_count && this._def_count.firstChild) {\r\n\t\tif (force || (new Date()).valueOf() - this._def_count._created.valueOf() > 500)\r\n\t\t\tcal = this._def_count.firstChild;\r\n\t}\r\n\tif (!cal) return;\r\n\tminicalDomEvents.detachAll();\r\n\t//cal.onclick = null;\r\n\tcal.innerHTML = \"\";\r\n\tif (cal.parentNode)\r\n\t\tcal.parentNode.removeChild(cal);\r\n\tif (this._def_count)\r\n\t\tthis._def_count.style.top = \"-1000px\";\r\n\r\n\tif(cal.conf && cal.conf._on_xle_handler)\r\n\t\tscheduler.detachEvent(cal.conf._on_xle_handler);\r\n};\r\nscheduler.isCalendarVisible = function() {\r\n\tif (this._def_count && parseInt(this._def_count.style.top, 10) > 0)\r\n\t\treturn this._def_count;\r\n\treturn false;\r\n};\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tscheduler.event(document.body, \"click\", function() { scheduler.destroyCalendar(); });\r\n}, {once: true});\r\n\r\n\r\n\r\nscheduler.form_blocks.calendar_time = {\r\n\trender: function(sns) {\r\n\t\tvar html = \"\";\r\n\r\n\t\tvar cfg = scheduler.config;\r\n\t\tvar dt = this.date.date_part(scheduler._currentDate());\r\n\r\n\t\tvar last = 24 * 60, first = 0;\r\n\t\tif (cfg.limit_time_select) {\r\n\t\t\tfirst = 60 * cfg.first_hour;\r\n\t\t\tlast = 60 * cfg.last_hour + 1; // to include \"17:00\" option if time select is limited\r\n\t\t}\r\n\t\tdt.setHours(first / 60);\r\n\r\n\t\tsns._time_values = [];\r\n\t\thtml += \" \";\r\n\r\n\t\t//var full_day = scheduler.config.full_day;\r\n\r\n\t\treturn \"
\" + html + \"  –  \" + html + \"
\";\r\n\t},\r\n\tset_value: function(node, value, ev, config) {\r\n\r\n\t\tvar inputs = node.getElementsByTagName(\"input\");\r\n\t\tvar selects = node.getElementsByTagName(\"select\");\r\n\t\tvar start_date,\r\n\t\t\tend_date;\r\n\r\n\t\tvar _init_once = function(inp, date, number) {\r\n\t\t\tscheduler.event(inp, \"click\", function() {\r\n\t\t\t\tscheduler.destroyCalendar(null, true);\r\n\t\t\t\tscheduler.renderCalendar({\r\n\t\t\t\t\tposition: inp,\r\n\t\t\t\t\tdate: new Date(this._date),\r\n\t\t\t\t\tnavigation: true,\r\n\t\t\t\t\thandler: function(new_date) {\r\n\t\t\t\t\t\tinp.value = scheduler.templates.calendar_time(new_date);\r\n\t\t\t\t\t\tinp._date = new Date(new_date);\r\n\t\t\t\t\t\tscheduler.destroyCalendar();\r\n\t\t\t\t\t\tif (scheduler.config.event_duration && scheduler.config.auto_end_date && number === 0) { //first element = start date\r\n\t\t\t\t\t\t\t_update_minical_select();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t};\r\n\r\n\t\tif (scheduler.config.full_day) {\r\n\t\t\tif (!node._full_day) {\r\n\t\t\t\tvar html = \"\";\r\n\t\t\t\tif (!scheduler.config.wide_form)\r\n\t\t\t\t\thtml = node.previousSibling.innerHTML + html;\r\n\t\t\t\tnode.previousSibling.innerHTML = html;\r\n\t\t\t\tnode._full_day = true;\r\n\t\t\t}\r\n\t\t\tvar input = node.previousSibling.getElementsByTagName(\"input\")[0];\r\n\r\n\t\t\tvar isFulldayEvent = (scheduler.date.time_part(ev.start_date) === 0 && scheduler.date.time_part(ev.end_date) === 0);\r\n\t\t\tinput.checked = isFulldayEvent;\r\n\r\n\t\t\tselects[0].disabled = input.checked;\r\n\t\t\tselects[1].disabled = input.checked;\r\n\r\n\t\t\tif (!input.$_eventAttached) {\r\n\t\t\t\tinput.$_eventAttached = true;\r\n\t\t\t\tscheduler.event(input, \"click\", function() {\r\n\t\t\t\t\tif (input.checked === true) {\r\n\t\t\t\t\t\tvar obj = {};\r\n\t\t\t\t\t\tscheduler.form_blocks.calendar_time.get_value(node, obj);\r\n\r\n\t\t\t\t\t\tstart_date = scheduler.date.date_part(obj.start_date);\r\n\t\t\t\t\t\tend_date = scheduler.date.date_part(obj.end_date);\r\n\r\n\t\t\t\t\t\tif (+end_date == +start_date || (+end_date >= +start_date && (ev.end_date.getHours() !== 0 || ev.end_date.getMinutes() !== 0)))\r\n\t\t\t\t\t\t\tend_date = scheduler.date.add(end_date, 1, \"day\");\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tstart_date = null;\r\n\t\t\t\t\t\tend_date = null;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar start = start_date || ev.start_date;\r\n\t\t\t\t\tvar end = end_date || ev.end_date;\r\n\t\t\t\t\t_attach_action(inputs[0], start);\r\n\t\t\t\t\t_attach_action(inputs[1], end);\r\n\t\t\t\t\tselects[0].value = start.getHours() * 60 + start.getMinutes();\r\n\t\t\t\t\tselects[1].value = end.getHours() * 60 + end.getMinutes();\r\n\r\n\t\t\t\t\tselects[0].disabled = input.checked;\r\n\t\t\t\t\tselects[1].disabled = input.checked;\r\n\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (scheduler.config.event_duration && scheduler.config.auto_end_date) {\r\n\r\n\t\t\tvar _update_minical_select = function () {\r\n\t\t\t\tif (!(scheduler.config.auto_end_date && scheduler.config.event_duration)){\r\n\t\t\t\t\t// setting may be disabled after the handler is attached\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tstart_date = scheduler.date.add(inputs[0]._date, selects[0].value, \"minute\");\r\n\t\t\t\tend_date = new Date(start_date.getTime() + (scheduler.config.event_duration * 60 * 1000));\r\n\r\n\t\t\t\tinputs[1].value = scheduler.templates.calendar_time(end_date);\r\n\t\t\t\tinputs[1]._date = scheduler.date.date_part(new Date(end_date));\r\n\r\n\t\t\t\tselects[1].value = end_date.getHours() * 60 + end_date.getMinutes();\r\n\t\t\t};\r\n\r\n\t\t\tif(!selects[0].$_eventAttached){\r\n\t\t\t\tselects[0].addEventListener(\"change\", _update_minical_select); // only update on first select should trigger update so user could define other end date if he wishes too\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction _attach_action(inp, date, number) {\r\n\t\t\t_init_once(inp, date, number);\r\n\t\t\tinp.value = scheduler.templates.calendar_time(date);\r\n\t\t\tinp._date = scheduler.date.date_part(new Date(date));\r\n\t\t}\r\n\r\n\t\t_attach_action(inputs[0], ev.start_date, 0);\r\n\t\t_attach_action(inputs[1], ev.end_date, 1);\r\n\t\t_init_once = function() {};\r\n\r\n\t\tfunction _round_minutes(date) {\r\n\t\t\tvar time_values = config._time_values;\r\n\t\t\tvar direct_value = date.getHours() * 60 + date.getMinutes();\r\n\t\t\tvar fixed_value = direct_value;\r\n\t\t\tvar value_found = false;\r\n\r\n\t\t\tfor (var k = 0; k < time_values.length; k++) {\r\n\t\t\t\tvar t_v = time_values[k];\r\n\t\t\t\tif (t_v === direct_value) {\r\n\t\t\t\t\tvalue_found = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif (t_v < direct_value)\r\n\t\t\t\t\tfixed_value = t_v;\r\n\t\t\t}\r\n\r\n\t\t\tif(!(value_found || fixed_value))\r\n\t\t\t\treturn -1;\r\n\r\n\t\t\treturn (value_found) ? direct_value : fixed_value;\r\n\t\t}\r\n\r\n\t\tselects[0].value = _round_minutes(ev.start_date);\r\n\t\tselects[1].value = _round_minutes(ev.end_date);\r\n\r\n\t},\r\n\tget_value: function(node, ev) {\r\n\t\tvar inputs = node.getElementsByTagName(\"input\");\r\n\t\tvar selects = node.getElementsByTagName(\"select\");\r\n\r\n\t\tev.start_date = scheduler.date.add(inputs[0]._date, selects[0].value, \"minute\");\r\n\t\tev.end_date = scheduler.date.add(inputs[1]._date, selects[1].value, \"minute\");\r\n\r\n\t\tif (ev.end_date <= ev.start_date)\r\n\t\t\tev.end_date = scheduler.date.add(ev.start_date, scheduler.config.time_step, \"minute\");\r\n\t\treturn {\r\n\t\t\tstart_date: new Date(ev.start_date),\r\n\t\t\tend_date: new Date(ev.end_date)\r\n\t\t};\r\n\t},\r\n\tfocus: function(node) {\r\n\t}\r\n};\r\nscheduler.linkCalendar = function(calendar, datediff) {\r\n\tvar action = function() {\r\n\t\tvar date = scheduler._date;\r\n\t\tvar dateNew = new Date(date.valueOf());\r\n\t\tif (datediff) dateNew = datediff(dateNew);\r\n\t\tdateNew.setDate(1);\r\n\t\tscheduler.updateCalendar(calendar, dateNew);\r\n\t\treturn true;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onViewChange\", action);\r\n\tscheduler.attachEvent(\"onXLE\", action);\r\n\tscheduler.attachEvent(\"onEventAdded\", action);\r\n\tscheduler.attachEvent(\"onEventChanged\", action);\r\n\tscheduler.attachEvent(\"onEventDeleted\", action);\r\n\taction();\r\n};\r\n\r\nscheduler._markCalendarCurrentDate = function(calendar) {\r\n\tvar state = scheduler.getState();\r\n\tvar from = state.min_date;\r\n\tvar to = state.max_date;\r\n\tvar mode = state.mode;\r\n\r\n\tvar month_start = scheduler.date.month_start(new Date(calendar._date));\r\n\tvar month_end = scheduler.date.add(month_start, 1, \"month\");\r\n\r\n\tvar noHighlight = {\r\n\t\t\"month\":true,\r\n\t\t\"year\":true,\r\n\t\t\"agenda\":true,\r\n\t\t\"grid\":true\r\n\t};\r\n\t// no need to highlight current dates for a large range views - agenda, year, etc.\r\n\tif(noHighlight[mode] || (from.valueOf() <= month_start.valueOf() && to.valueOf() >= month_end.valueOf())){\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar current = from;\r\n\twhile(current.valueOf() < to.valueOf()){\r\n\t\tif (month_start.valueOf() <= current.valueOf() && month_end > current) {\r\n\t\t\tscheduler.markCalendar(calendar, current, \"dhx_calendar_click\");\r\n\t\t}\r\n\t\tcurrent = scheduler.date.add(current, 1, \"day\");\r\n\t}\r\n};\r\n\r\nscheduler.attachEvent(\"onEventCancel\", function(){\r\n\tscheduler.destroyCalendar(null, true);\r\n});\r\n\r\nscheduler.attachEvent(\"onDestroy\", function(){\r\n\tscheduler.destroyCalendar();\r\n});\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\",function(){\r\n\tscheduler.xy.scroll_width = 0;\r\n\r\n\tvar old = scheduler.render_view_data;\r\n\tscheduler.render_view_data=function(){\r\n\t\tvar data = this._els[\"dhx_cal_data\"][0];\r\n\t\tdata.firstChild._h_fix = true;\r\n\r\n\t\told.apply(scheduler,arguments);\r\n\r\n\r\n\r\n\t\tvar height = parseInt(data.style.height);\r\n\t\tdata.style.height=\"1px\";\r\n\t\tdata.style.height=data.scrollHeight+\"px\";\r\n\r\n\t\tthis._obj.style.height = this._obj.clientHeight + data.scrollHeight - height + \"px\";\r\n\t};\r\n\r\n\tvar old_s=scheduler._reset_month_scale;\r\n\tscheduler._reset_month_scale=function(a,b,c,d){\r\n\t\tvar dummy = {clientHeight:100};\r\n\t\told_s.apply(scheduler,[dummy,b,c,d]);\r\n\t\ta.innerHTML = dummy.innerHTML;\r\n\t};\r\n\r\n});\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Multisection\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\n\r\nfunction parseXMLOptions(loader, config){\r\n\tvar items = scheduler.ajax.xpath(\"//data/item\", loader.xmlDoc);\r\n\tvar ids = {};\r\n\tfor (var i = 0; i < items.length; i++) {\r\n\t\tids[items[i].getAttribute(config.map_to)] = true;\r\n\t}\r\n\treturn ids;\r\n}\r\n\r\nfunction parseJSONOptions(loader, config){\r\n\ttry{\r\n\t\tvar items = JSON.parse(loader.xmlDoc.responseText);\r\n\t\tvar ids = {};\r\n\t\tfor (var i = 0; i < items.length; i++) {\r\n\t\t\tvar option = items[i];\r\n\r\n\t\t\tids[option.value || option.key || option.id] = true;\r\n\t\t}\r\n\t\treturn ids;\r\n\t}catch(e){\r\n\t\treturn null;\r\n\t}\r\n}\r\n\r\nscheduler.form_blocks[\"multiselect\"]={\r\n\trender:function(sns) {\r\n\t\tvar css = \"dhx_multi_select_control dhx_multi_select_\"+sns.name;\r\n\t\tif(!!sns.vertical){\r\n\t\t\tcss += \" dhx_multi_select_control_vertical\";\r\n\t\t}\r\n\r\n\t\tvar _result = \"
\";\r\n\t\tfor (var i=0; i\"+sns.options[i].label+\"\";\r\n\t\t}\r\n\t\t_result += \"
\";\r\n\t\treturn _result;\r\n\t},\r\n\tset_value:function(node,value,ev,config){\r\n\r\n\t\tvar _children = node.getElementsByTagName('input');\r\n\t\tfor(var i=0;i<_children.length;i++) {\r\n\t\t\t_children[i].checked = false; //unchecking all inputs on the form\r\n\t\t}\r\n\r\n\t\tfunction _mark_inputs(ids) { // ids = [ 0: undefined, 1: undefined, 2: true, 'custom_name': false ... ]\r\n\t\t\tvar _children = node.getElementsByTagName('input');\r\n\t\t\tfor(var i=0;i<_children.length; i++) {\r\n\t\t\t\t_children[i].checked = !! ids[_children[i].value];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar _ids = {};\r\n\t\tif (ev[config.map_to]) {\r\n\t\t\tvar results = (ev[config.map_to] + \"\").split(config.delimiter || scheduler.config.section_delimiter || \",\");\r\n\t\t\tfor (var i = 0; i < results.length; i++) {\r\n\t\t\t\t_ids[results[i]] = true;\r\n\t\t\t}\r\n\t\t\t_mark_inputs(_ids);\r\n\t\t} else {\r\n\t\t\tif (scheduler._new_event || !config.script_url)\r\n\t\t\t\treturn;\r\n\t\t\tvar divLoading = document.createElement('div');\r\n\t\t\tdivLoading.className = 'dhx_loading';\r\n\t\t\tdivLoading.style.cssText = \"position: absolute; top: 40%; left: 40%;\";\r\n\t\t\tnode.appendChild(divLoading);\r\n\r\n\t\t\tvar url = [\r\n\t\t\t\tconfig.script_url,\r\n\t\t\t\t(config.script_url.indexOf(\"?\") == -1 ? \"?\" : \"&\"),\r\n\t\t\t\t'dhx_crosslink_' + config.map_to + '=' + ev.id + '&uid=' + scheduler.uid()\r\n\t\t\t].join(\"\");\r\n\r\n\t\t\tscheduler.ajax.get(url, function(loader) {\r\n\t\t\t\tvar options = parseJSONOptions(loader, config);\r\n\t\t\t\tif(!options){\r\n\t\t\t\t\toptions = parseXMLOptions(loader, config);\r\n\t\t\t\t}\r\n\t\t\t\t_mark_inputs(options);\r\n\t\t\t\tnode.removeChild(divLoading);\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\tget_value:function(node,ev,config){\r\n\t\tvar _result = [];\r\n\t\tvar _children = node.getElementsByTagName(\"input\");\r\n\t\tfor(var i=0;i<_children.length;i++) {\r\n\t\t\tif(_children[i].checked)\r\n\t\t\t\t_result.push(_children[i].value);\r\n\t\t}\r\n\t\treturn _result.join(config.delimiter || scheduler.config.section_delimiter || \",\");\r\n\t},\r\n\r\n\tfocus:function(node){\r\n\t}\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\r\n\tfunction backup(obj){\r\n\t\tvar t = function(){};\r\n\t\tt.prototype = obj;\r\n\t\treturn t;\r\n\t}\r\n\r\n\tvar old = scheduler._load;\r\n\tscheduler._load=function(url,from){\r\n\t\turl=url||this._load_url;\r\n\t\tif (typeof url == \"object\"){\r\n\t\t\tvar t = backup(this._loaded);\r\n\t\t\tfor (var i=0; i < url.length; i++) {\r\n\t\t\t\tthis._loaded=new t();\r\n\t\t\t\told.call(this,url[i],from);\r\n\t\t\t}\r\n\t\t} else\r\n\t\t\told.apply(this,arguments);\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\t/* global Backbone */\r\n\tvar cfg = {\r\n\t\tuse_id : false\r\n\t};\r\n\r\n\t//remove private properties\r\n\tfunction sanitize(ev){\r\n\t\tvar obj = {};\r\n\t\tfor (var key in ev)\r\n\t\t\tif (key.indexOf(\"_\") !== 0)\r\n\t\t\t\tobj[key] = ev[key];\r\n\r\n\t\tif (!cfg.use_id)\r\n\t\t\tdelete obj.id;\r\n\r\n\t\treturn obj;\r\n\t}\r\n\r\n\tvar update_timer;\r\n\tfunction update_view(){\r\n\t\tclearTimeout(update_timer);\r\n\t\tupdate_timer = setTimeout(function(){\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler.updateView();\r\n\t\t},1);\r\n\t}\r\n\r\n\tfunction _start_ext_load(cal){\r\n\t\tcal._loading = true;\r\n\t\tcal._not_render = true;\r\n\r\n\t\tcal.callEvent(\"onXLS\", []);\r\n\t}\r\n\tfunction _finish_ext_load(cal){\r\n\t\tcal._not_render = false;\r\n\t\tif (cal._render_wait)\r\n\t\t\tcal.render_view_data();\r\n\t\tcal._loading = false;\r\n\r\n\t\tcal.callEvent(\"onXLE\", []);\r\n\t}\r\n\r\n\r\n\tfunction _get_id(model){\r\n\t\treturn cfg.use_id ? model.id : model.cid;\r\n\t}\r\n\r\nscheduler.backbone = function(events, config){\r\n\tif (config) cfg = config;\r\n\r\n\tevents.bind(\"change\", function(model, info){\r\n\t\tvar cid = _get_id(model);\r\n\t\tvar ev = scheduler._events[cid] = model.toJSON();\r\n\t\tev.id = cid;\r\n\r\n\t\tscheduler._init_event(ev);\r\n\t\tupdate_view();\r\n\t});\r\n\tevents.bind(\"remove\", function(model, changes){\r\n\t\tvar cid = _get_id(model);\r\n\t\tif (scheduler._events[cid])\r\n\t\t\tscheduler.deleteEvent(cid);\r\n\t});\r\n\r\n\tvar queue = [];\r\n\tfunction add_from_queue(){\r\n\t\tif(scheduler.$destroyed){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (queue.length){\r\n\t\t\tscheduler.parse(queue, \"json\");\r\n\t\t\tqueue = [];\r\n\t\t}\r\n\t}\r\n\r\n\tevents.bind(\"add\", function(model, changes){\r\n\t\tvar cid = _get_id(model);\r\n\t\tif (!scheduler._events[cid]){\r\n\t\t\tvar ev = model.toJSON();\r\n\t\t\tev.id = cid;\r\n\t\t\tscheduler._init_event(ev);\r\n\r\n\t\t\tqueue.push(ev);\r\n\t\t\tif (queue.length == 1)\r\n\t\t\t\tsetTimeout(add_from_queue,1);\r\n\t\t}\r\n\t});\r\n\r\n\tevents.bind(\"request\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_start_ext_load(scheduler);\r\n\t});\r\n\tevents.bind(\"sync\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_finish_ext_load(scheduler);\r\n\t});\r\n\tevents.bind(\"error\", function(obj){\r\n\t\tif (obj instanceof Backbone.Collection)\r\n\t\t\t_finish_ext_load(scheduler);\r\n\t});\r\n\r\n\r\n\tscheduler.attachEvent(\"onEventCreated\", function(id){\r\n\t\tvar ev = new events.model(scheduler.getEvent(id));\r\n\t\tscheduler._events[id] = ev.toJSON();\r\n\t\tscheduler._events[id].id = id;\r\n\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventAdded\", function(id){\r\n\t\tif (!events.get(id)){\r\n\t\t\tvar data = sanitize(scheduler.getEvent(id));\r\n\t\t\tvar model = new events.model(data);\r\n\r\n\t\t\tvar cid = _get_id(model);\r\n\t\t\tif (cid != id)\r\n\t\t\t\tthis.changeEventId(id, cid);\r\n\t\t\tevents.add(model);\r\n\t\t\tevents.trigger(\"scheduler:add\", model);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\", function(id){\r\n\t\tvar ev = events.get(id);\r\n\t\tvar upd = sanitize(scheduler.getEvent(id));\r\n\r\n\t\tev.set(upd);\r\n\t\tevents.trigger(\"scheduler:change\", ev);\r\n\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function(id){\r\n\t\tvar model = events.get(id);\r\n\t\tif (model){\r\n\t\t\tevents.trigger(\"scheduler:remove\", model);\r\n\t\t\tevents.remove(id);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\t/* global dhtmlDragAndDropObject, dhtmlx */\r\n// lame old code doesn't provide raw event object\r\n\tscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\t\tvar dragger = (new dhtmlDragAndDropObject());\r\n\t\tvar old = dragger.stopDrag;\r\n\t\tvar last_event;\r\n\t\tdragger.stopDrag = function(e) {\r\n\t\t\tlast_event = e;\r\n\t\t\treturn old.apply(this, arguments);\r\n\t\t};\r\n\r\n\t\tfunction on_drop(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml) {\r\n\r\n\t\t\tif (scheduler.checkEvent(\"onBeforeExternalDragIn\") && !scheduler.callEvent(\"onBeforeExternalDragIn\", [sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml, last_event]))\r\n\t\t\t\treturn;\r\n\r\n\t\t\tvar temp = scheduler.attachEvent(\"onEventCreated\", function (id) {\r\n\t\t\t\tif (!scheduler.callEvent(\"onExternalDragIn\", [id, sourceHtmlObject, last_event])) {\r\n\t\t\t\t\tthis._drag_mode = this._drag_id = null;\r\n\t\t\t\t\tthis.deleteEvent(id);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tvar action_data = scheduler.getActionData(last_event);\r\n\t\t\tvar event_data = {\r\n\t\t\t\tstart_date: new Date(action_data.date)\r\n\t\t\t};\r\n\r\n\t\t\t// custom views, need to assign section id, fix dates\r\n\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\tvar view_options = scheduler.matrix[scheduler._mode];\r\n\t\t\t\tevent_data[view_options.y_property] = action_data.section;\r\n\r\n\t\t\t\tvar pos = scheduler._locate_cell_timeline(last_event);\r\n\t\t\t\tevent_data.start_date = view_options._trace_x[pos.x];\r\n\t\t\t\tevent_data.end_date = scheduler.date.add(event_data.start_date, view_options.x_step, view_options.x_unit);\r\n\t\t\t}\r\n\t\t\tif (scheduler._props && scheduler._props[scheduler._mode]) {\r\n\t\t\t\tevent_data[scheduler._props[scheduler._mode].map_to] = action_data.section;\r\n\t\t\t}\r\n\r\n\t\t\tscheduler.addEventNow(event_data);\r\n\r\n\t\t\tscheduler.detachEvent(temp);\r\n\t\t}\r\n\r\n\t\tdragger.addDragLanding(scheduler._els[\"dhx_cal_data\"][0], {\r\n\t\t\t_drag: function(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml) {\r\n\t\t\t\ton_drop(sourceHtmlObject, dhtmlObject, targetHtmlObject, targetHtml);\r\n\t\t\t},\r\n\t\t\t_dragIn: function(htmlObject, shtmlObject) {\r\n\t\t\t\treturn htmlObject;\r\n\t\t\t},\r\n\t\t\t_dragOut: function(htmlObject) {\r\n\t\t\t\treturn this;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(dhtmlx.DragControl) {\r\n\t\t\tdhtmlx.DragControl.addDrop(scheduler._els[\"dhx_cal_data\"][0], {\r\n\t\t\t\tonDrop: function (source, target, d, e) {\r\n\t\t\t\t\tvar sourceDhtmlx = dhtmlx.DragControl.getMaster(source);\r\n\t\t\t\t\tlast_event = e;\r\n\t\t\t\t\ton_drop(source, sourceDhtmlx, target, e.target || e.srcElement);\r\n\t\t\t\t},\r\n\r\n\t\t\t\tonDragIn: function (source, target, e) {\r\n\t\t\t\t\treturn target;\r\n\t\t\t\t}\r\n\t\t\t}, true);\r\n\t\t}\r\n\t});\r\n\r\n}","export default function(scheduler){\r\n\r\n\tvar dx, dy,\r\n\t\thtml_regexp = new RegExp(\"<[^>]*>\", \"g\"),\r\n\t\tnewline_regexp = new RegExp(\"]*>\", \"g\");\r\n\r\n\tfunction clean_html(val) {\r\n\t\treturn val.replace(newline_regexp, \"\\n\").replace(html_regexp, \"\");\r\n\t}\r\n\r\n\tfunction x_norm(x, offset) {\r\n\t\tx = parseFloat(x);\r\n\t\toffset = parseFloat(offset);\r\n\t\tif (!isNaN(offset)) x -= offset;\r\n\r\n\t\tvar w = colsWidth(x);\r\n\t\tx = x - w.width + w.cols*dx;\r\n\t\treturn isNaN(x)?\"auto\":(100*x/(dx));\r\n\t}\r\n\r\n\tfunction x_norm_event(x, offset, is_left) {\r\n\t\tx = parseFloat(x);\r\n\t\toffset = parseFloat(offset);\r\n\t\tif (!isNaN(offset) && is_left) x -= offset;\r\n\r\n\t\tvar w = colsWidth(x);\r\n\t\tx = x - w.width + w.cols*dx;\r\n\t\treturn isNaN(x)?\"auto\":(100*x/(dx-(!isNaN(offset)?offset:0)));\r\n\t}\r\n\tfunction colsWidth(width) {\r\n\t\tvar r = 0;\r\n\t\tvar header = scheduler._els.dhx_cal_header[0].childNodes;\r\n\t\tvar els = header[1] ? header[1].childNodes : header[0].childNodes;\r\n\t\tfor (var i = 0; i < els.length; i++) {\r\n\t\t\tvar el = els[i].style ? els[i] : els[i].parentNode;\r\n\t\t\tvar w = parseFloat(el.style.width);\r\n\t\t\tif (width > w){\r\n\t\t\t\twidth -= (w+1);\r\n\t\t\t\tr+=(w+1);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\treturn { width: r, cols: i };\r\n\t}\r\n\r\n\tfunction y_norm(y) {\r\n\t\ty = parseFloat(y);\r\n\t\tif (isNaN(y)) return \"auto\";\r\n\t\treturn 100 * y / dy;\r\n\t}\r\n\r\n\tfunction get_style(node, style){\r\n\t\treturn (window.getComputedStyle?(window.getComputedStyle(node, null)[style]):(node.currentStyle?node.currentStyle[style]:null))||\"\";\r\n\t}\r\n\r\n\tfunction de_day(node, n) {\r\n\t\tvar x = parseInt(node.style.left, 10);\r\n\r\n\t\tfor (var dx = 0; dx < scheduler._cols.length; dx++) {\r\n\t\t\tx -= scheduler._cols[dx];\r\n\t\t\tif (x < 0) return dx;\r\n\t\t}\r\n\t\treturn n;\r\n\t}\r\n\r\n\tfunction de_week(node, n) {\r\n\t\tvar y = parseInt(node.style.top, 10);\r\n\t\tfor (var dy = 0; dy < scheduler._colsS.heights.length; dy++)\r\n\t\t\tif (scheduler._colsS.heights[dy] > y) return dy;\r\n\t\treturn n;\r\n\t}\r\n\r\n\tfunction xml_start(tag) {\r\n\t\treturn tag ? \"<\"+tag+\">\" : \"\";\r\n\t}\r\n\tfunction xml_end(tag) {\r\n\t\treturn tag ? \"\" : \"\";\r\n\t}\r\n\r\n\tfunction xml_top(tag, profile, header, footer) {\r\n\t\tvar xml = \"<\"+tag+\" profile='\" + profile + \"'\";\r\n\t\tif (header)\r\n\t\t\txml += \" header='\" + header + \"'\";\r\n\t\tif (footer)\r\n\t\t\txml += \" footer='\" + footer + \"'\";\r\n\t\txml += \">\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_body_header() {\r\n\t\tvar xml = \"\";\r\n\t\t// detects if current mode is timeline\r\n\t\tvar mode = scheduler._mode;\r\n\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode])\r\n\t\t\tmode = (scheduler.matrix[scheduler._mode].render == \"cell\") ? \"matrix\" : \"timeline\";\r\n\t\txml += \"\";\r\n\r\n\t\tif (scheduler._mode == \"week_agenda\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_data[0].getElementsByTagName(\"DIV\");\r\n\t\t\tfor (var i = 0; i < xh.length; i++)\r\n\t\t\t\tif (xh[i].className == \"dhx_wa_scale_bar\")\r\n\t\t\t\t\txml += \"\" + clean_html(xh[i].innerHTML) + \"\";\r\n\t\t} else if (scheduler._mode == \"agenda\" || scheduler._mode == \"map\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_header[0].childNodes[0].childNodes;\r\n\r\n\t\t\txml += \"\" + clean_html(xh[0].innerHTML) + \"\" + clean_html(xh[1].innerHTML) + \"\";\r\n\t\t} else if (scheduler._mode == \"year\") {\r\n\t\t\tvar xh = scheduler._els.dhx_cal_data[0].childNodes;\r\n\t\t\tfor (var i = 0; i < xh.length; i++) {\r\n\t\t\t\txml += \"\";\r\n\t\t\t\txml += xml_month_scale(xh[i].querySelector(\".dhx_year_week\").childNodes);\r\n\t\t\t\txml += xml_month(xh[i].querySelector(\".dhx_year_body\"));\r\n\t\t\t\txml += \"\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\txml += \"\";\r\n\t\t\tvar xh = scheduler._els.dhx_cal_header[0].childNodes;\r\n\t\t\txml += xml_month_scale(xh);\r\n\t\t\txml += \"\";\r\n\r\n\t\t\tvar yh = scheduler._els.dhx_cal_data[0];\r\n\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tfor (var i = 0; i < yh.firstChild.rows.length; i++) {\r\n\t\t\t\t\tvar el = yh.firstChild.rows[i];\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t}\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tdy = yh.firstChild.rows[0].cells[0].offsetHeight;\r\n\t\t\t} else if (yh.firstChild.tagName == \"TABLE\") {\r\n\t\t\t\txml += xml_month(yh);\r\n\t\t\t} else {\r\n\t\t\t\tyh = yh.childNodes[yh.childNodes.length - 1];\r\n\t\t\t\twhile (yh.className.indexOf(\"dhx_scale_holder\") == -1)\r\n\t\t\t\t\tyh = yh.previousSibling;\r\n\t\t\t\tyh = yh.childNodes;\r\n\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tfor (var i = 0; i < yh.length; i++)\r\n\t\t\t\t\txml += \"\\n\";\r\n\t\t\t\txml += \"\";\r\n\t\t\t\tdy = yh[0].offsetHeight;\r\n\t\t\t}\r\n\t\t}\r\n\t\txml += \"\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_month(yh) {\r\n\t\tvar xml = \"\";\r\n\t\tvar r = yh.querySelectorAll(\"tr\");\r\n\t\tfor (var i = 0; i < r.length; i++) {\r\n\t\t\tvar days = [];\r\n\t\t\tvar cells = r[i].querySelectorAll(\"td\");\r\n\r\n\t\t\tfor (var j = 0; j < cells.length; j++)\r\n\t\t\t\tdays.push(cells[j].querySelector(\".dhx_month_head\").innerHTML);\r\n\r\n\t\t\txml += \"\\n\";\r\n\t\t\tdy = cells[0].offsetHeight;\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_month_scale(xh) {\r\n\t\tvar xhs,\r\n\t\t\txml = \"\";\r\n\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\tif (scheduler.matrix[scheduler._mode].second_scale)\r\n\t\t\t\txhs = xh[1].childNodes;\r\n\r\n\t\t\txh = xh[0].childNodes;\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < xh.length; i++)\r\n\t\t\txml += \"\\n\";\r\n\t\tdx = xh[0].offsetWidth;\r\n\r\n\t\tif (xhs) {\r\n\t\t\tvar width = 0;\r\n\t\t\tvar top_width = xh[0].offsetWidth;\r\n\t\t\tvar top_col = 1;\r\n\t\t\tfor (var i = 0; i < xhs.length; i++) {\r\n\t\t\t\txml += \"\\n\";\r\n\t\t\t\twidth += xhs[i].offsetWidth;\r\n\t\t\t\tif (width >= top_width) {\r\n\t\t\t\t\ttop_width += (xh[top_col] ? xh[top_col].offsetWidth : 0);\r\n\t\t\t\t\ttop_col++;\r\n\t\t\t\t}\r\n\t\t\t\tdx = xhs[0].offsetWidth;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction xml_body(colors) {\r\n\t\tvar xml = \"\";\r\n\t\tvar evs = scheduler._rendered;\r\n\t\tvar matrix = scheduler.matrix && scheduler.matrix[scheduler._mode];\r\n\r\n\t\tif (scheduler._mode == \"agenda\" || scheduler._mode == \"map\") {\r\n\r\n\t\t\tfor (var i = 0; i < evs.length; i++)\r\n xml += \"\";\r\n\r\n\t\t} else if (scheduler._mode == \"week_agenda\") {\r\n\r\n\t\t\tfor (var i = 0; i < evs.length; i++)\r\n\t\t\t\txml += \"\" + clean_html(evs[i].innerHTML) + \"\";\r\n\r\n\t\t} else if (scheduler._mode == \"year\") {\r\n\r\n\t\t\tvar evs = scheduler.get_visible_events();\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar d = evs[i].start_date;\r\n\t\t\t\tif (d.valueOf() < scheduler._min_date.valueOf())\r\n\t\t\t\t\td = scheduler._min_date;\r\n\r\n\t\t\t\twhile (d < evs[i].end_date) {\r\n\t\t\t\t\tvar m = d.getMonth() + 12 * (d.getFullYear() - scheduler._min_date.getFullYear()) - scheduler.week_starts._month;\r\n\t\t\t\t\tvar day = scheduler.week_starts[m] + d.getDate() - 1;\r\n\t\t\t\t\tvar text_color = colors ? get_style(scheduler._get_year_cell(d), \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(scheduler._get_year_cell(d), \"backgroundColor\") : \"\";\r\n\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t\td = scheduler.date.add(d, 1, \"day\");\r\n\t\t\t\t\tif (d.valueOf() >= scheduler._max_date.valueOf())\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (matrix && matrix.render == \"cell\") {\r\n\t\t\tvar evs = scheduler._els.dhx_cal_data[0].getElementsByTagName(\"TD\");\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar text_color = colors ? get_style(evs[i], \"color\") : \"\";\r\n\t\t\t\tvar bg_color = colors ? get_style(evs[i], \"backgroundColor\") : \"\";\r\n\t\t\t\txml += \"\\n\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar zx, zdx;\r\n\t\t\t\tif (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\t\t// logic for timeline view\r\n\t\t\t\t\tzx = x_norm(evs[i].style.left);\r\n\t\t\t\t\tzdx = x_norm(evs[i].offsetWidth)-1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// we should use specific logic for day/week/units view\r\n\t\t\t\t\tvar left_norm = scheduler.config.use_select_menu_space ? 0 : 26;\r\n\t\t\t\t\tzx = x_norm_event(evs[i].style.left, left_norm, true);\r\n\t\t\t\t\tzdx = x_norm_event(evs[i].style.width, left_norm)-1;\r\n\t\t\t\t}\r\n\t\t\t\tif (isNaN(zdx * 1)) continue;\r\n\t\t\t\tvar zy = y_norm(evs[i].style.top);\r\n\t\t\t\tvar zdy = y_norm(evs[i].style.height);\r\n\r\n\t\t\t\tvar e_type = evs[i].className.split(\" \")[0].replace(\"dhx_cal_\", \"\");\r\n\t\t\t\tif (e_type === 'dhx_tooltip_line') continue;\r\n\r\n\t\t\t\tvar dets = scheduler.getEvent(evs[i].getAttribute(scheduler.config.event_attribute));\r\n if (!dets) continue;\r\n\t\t\t\tvar day = dets._sday;\r\n\t\t\t\tvar week = dets._sweek;\r\n\t\t\t\tvar length = dets._length || 0;\r\n\r\n\t\t\t\tif (scheduler._mode == \"month\") {\r\n\t\t\t\t\tzdy = parseInt(evs[i].offsetHeight, 10);\r\n\t\t\t\t\tzy = parseInt(evs[i].style.top, 10) - scheduler.xy.month_head_height;\r\n\r\n\t\t\t\t\tday = de_day(evs[i], day);\r\n\t\t\t\t\tweek = de_week(evs[i], week);\r\n\t\t\t\t} else if (scheduler.matrix && scheduler.matrix[scheduler._mode]) {\r\n\t\t\t\t\tday = 0;\r\n\t\t\t\t\tvar el = evs[i].parentNode.parentNode.parentNode;\r\n\t\t\t\t\tweek = el.rowIndex;\r\n\t\t\t\t\tvar dy_copy = dy;\r\n\t\t\t\t\tdy = evs[i].parentNode.offsetHeight;\r\n\t\t\t\t\tzy = y_norm(evs[i].style.top);\r\n\t\t\t\t\tzy -= zy * 0.2;\r\n\t\t\t\t\tdy = dy_copy;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (evs[i].parentNode == scheduler._els.dhx_cal_data[0]) continue;\r\n\t\t\t\t\tvar parent = scheduler._els[\"dhx_cal_data\"][0].childNodes[0];\r\n\t\t\t\t\tvar offset = parseFloat(parent.className.indexOf(\"dhx_scale_holder\") != -1 ? parent.style.left : 0);\r\n\t\t\t\t\tzx += x_norm(evs[i].parentNode.style.left, offset);\r\n\t\t\t\t}\r\n\r\n\t\t\t\txml += \"\\n\";\r\n\r\n\t\t\t\tif (e_type == \"event\") {\r\n\t\t\t\t\txml += \"
\";\r\n\t\t\t\t\tvar text_color = colors ? get_style(evs[i].childNodes[2], \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(evs[i].childNodes[2], \"backgroundColor\") : \"\";\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar text_color = colors ? get_style(evs[i], \"color\") : \"\";\r\n\t\t\t\t\tvar bg_color = colors ? get_style(evs[i], \"backgroundColor\") : \"\";\r\n\t\t\t\t\txml += \"\";\r\n\t\t\t\t}\r\n\t\t\t\txml += \"
\";\r\n\t\t\t}\r\n\t\t\t}\r\n\r\n\t\treturn xml;\r\n\t}\r\n\r\n\tfunction toXML(start, end, view, mode, header, footer){\r\n\t\tvar colors = false;\r\n\t\tif (mode == \"fullcolor\") {\r\n\t\t\tcolors = true;\r\n\t\t\tmode = \"color\";\r\n\t\t}\r\n\r\n\t\tmode = mode || \"color\";\r\n\r\n\t\tvar xml = \"\";\r\n\t\tif (start) {\r\n\r\n\t\t\tvar original_date = scheduler._date;\r\n\t\t\tvar original_mode = scheduler._mode;\r\n\t\t\tend = scheduler.date[view+\"_start\"](end);\r\n\t\t\tend = scheduler.date[\"get_\"+view+\"_end\"] ? scheduler.date[\"get_\"+view+\"_end\"](end) : scheduler.date.add(end, 1, view);\r\n\r\n\t\t\txml = xml_top(\"pages\", mode, header, footer);\r\n\t\t\tfor (var temp_date = new Date(start); +temp_date < +end; temp_date = this.date.add(temp_date, 1, view)) {\r\n\t\t\t\tthis.setCurrentView(temp_date, view);\r\n\t\t\t\txml += xml_start(\"page\") + xml_body_header().replace(\"\\u2013\", \"-\") + xml_body(colors) + xml_end(\"page\");\r\n\t\t\t}\r\n\t\t\txml += xml_end(\"pages\");\r\n\r\n\t\t\tthis.setCurrentView(original_date, original_mode);\r\n\t\t} else {\r\n\t\t\txml = xml_top(\"data\", mode, header, footer) + xml_body_header().replace(\"\\u2013\", \"-\") + xml_body(colors) + xml_end(\"data\");\r\n\t\t}\r\n\t\treturn xml;\r\n\t}\r\n\tscheduler.getPDFData = toXML;\r\n\tfunction send_xml(xml, url){\r\n\t\tvar uid = scheduler.uid();\r\n\t\tvar d = document.createElement(\"div\");\r\n\t\td.style.display = \"none\";\r\n\t\tdocument.body.appendChild(d);\r\n\r\n\t\td.innerHTML = '
';\r\n\t\tdocument.getElementById(uid).firstChild.value = encodeURIComponent(xml);\r\n\t\tdocument.getElementById(uid).submit();\r\n\t\td.parentNode.removeChild(d);\r\n\t}\r\n\r\n\tfunction to_pdf(start, end, view, url, mode, header, footer) {\r\n\t\tvar xml = \"\";\r\n\t\tif(typeof mode == \"object\"){\r\n\t\t\txml = schedulersToPdf(mode);\r\n\t\t}else{\r\n\t\t\txml = toXML.apply(this, [start, end, view, mode, header, footer]);\r\n\t\t}\r\n\r\n\t\tsend_xml(xml, url);\r\n\t}\r\n\r\n\tfunction schedulersToPdf(objects){\r\n\t\tvar xml = \"\";\r\n\t\tfor(var i=0; i < objects.length; i++){\r\n\t\t\txml += objects[i].source.getPDFData(objects[i].start, objects[i].end, objects[i].view, objects[i].mode, objects[i].header, objects[i].footer);\r\n\t\t}\r\n\t\txml += \"\";\r\n\t\treturn xml;\r\n\t}\r\n\r\n\t/*\r\n\t * scheduler.toPDF(url, mode, header, footer) - for a single scheduler\r\n\t * scheduler.toPDF(url, [scheduler1, scheduler2,...]) - for multiple schedulers\r\n\t * example:\r\n\t * scheduler.toPDF(\"generate.ashx\", [\r\n\t * { source: scheduler1, mode: \"color\" },\r\n\t * { source: scheduler2, mode: \"gray\", view:\"week\", start:new Date(2013, 06, 1), end:new Date(2013, 06, 28) },\r\n\t * { source: scheduler3 }\r\n\t * ]);\r\n\t *\r\n\t */\r\n\tscheduler.toPDF = function(url, mode, header, footer) {\r\n\t\treturn to_pdf.apply(this, [null, null, null, url, mode, header, footer]);\r\n\t};\r\n\tscheduler.toPDFRange = function(start, end, view, url, mode, header, footer) {\r\n\t\tif (typeof start == \"string\") {\r\n\t\t\tstart = scheduler.templates.api_date(start);\r\n\t\t\tend = scheduler.templates.api_date(end);\r\n\t\t}\r\n\r\n\t\treturn to_pdf.apply(this, arguments);\r\n\t};\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.icons_select = [\"icon_form\", \"icon_delete\"];\r\nscheduler.config.details_on_create = true;\r\nscheduler.config.show_quick_info = true;\r\nscheduler.xy.menu_width = 0;\r\n\r\n\r\n\r\nlet clickedElementPosition = null;\r\nscheduler.attachEvent(\"onSchedulerReady\", function(){\r\n\tconst container = scheduler.$container;\r\n\tif(container._$quickInfoHandler){\r\n\t\treturn;\r\n\t}else{\r\n\t\tcontainer._$quickInfoHandler = true;\r\n\t\t// store coordinates of clicked segment of an event\r\n\t\t// in case multi section events or multi-line month events\r\n\t\tscheduler.event(container, \"mousedown\", function(e){\r\n\t\t\tconst eventElement = e.target.closest(`[${scheduler.config.event_attribute}]`);\r\n\t\t\tif (eventElement) {\r\n\t\t\t\tclickedElementPosition = {\r\n\t\t\t\t\tid: eventElement.getAttribute(scheduler.config.event_attribute),\r\n\t\t\t\t\tposition: getPositionInsideScheduler(eventElement)\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t});\r\n\t\tscheduler.attachEvent(\"onDestroy\", () => {\r\n\t\t\tdelete container._$quickInfoHandler;\r\n\t\t});\r\n\t}\r\n});\r\n\r\nscheduler.attachEvent(\"onClick\", function(id){\r\n\tif(!scheduler.config.show_quick_info){\r\n\t\treturn;\r\n\t}\r\n\tscheduler.showQuickInfo(id);\r\n\treturn true;\r\n});\r\n\r\n(function(){\r\n\t// pass `force` argument in order to hide quick info synchronously\r\n\t// so it won't affect showQuickInfo call that can follow\r\n\tvar events = [\"onEmptyClick\", \"onViewChange\", \"onLightbox\", \"onBeforeEventDelete\", \"onBeforeDrag\"];\r\n\tvar hiding_function = function(){\r\n\t\tscheduler.hideQuickInfo(true);\r\n\t\treturn true;\r\n\t};\r\n\tfor (var i=0; i window.innerWidth){\r\n\t\t\tleft = window.innerWidth - width;\r\n\t\t}\r\n\t\tleft = Math.max(0, left);\r\n\r\n\t\tqi.style.left = left + \"px\";\r\n\t\tqi.style.top = pos.top - (pos.dy?height:-pos.height) + \"px\";\r\n\t} else {\r\n\r\n\t\tconst dataPos = scheduler.$container.querySelector('.dhx_cal_data').offsetTop;\r\n\t\tqi.style.top = dataPos + 20 + \"px\";\r\n\t\tif (pos.dx == 1){\r\n\t\t\tqi.style.right = \"auto\";\r\n\t\t\tqi.style.left = -width + \"px\";\r\n\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tqi.style.left = \"-10px\";\r\n\t\t\t},1);\r\n\t\t} else {\r\n\t\t\tqi.style.left = \"auto\";\r\n\t\t\tqi.style.right = -width + \"px\";\r\n\r\n\t\t\tsetTimeout(function(){\r\n\t\t\t\tqi.style.right = \"-10px\";\r\n\t\t\t},1);\r\n\t\t}\r\n\t\tqi.className = qi.className.replace(\" dhx_qi_left\",\"\").replace(\" dhx_qi_right\",\"\")+\" dhx_qi_\"+(pos.dx==1?\"left\":\"right\");\r\n\t}\r\n\r\n\tqi.ontransitionend = () => {\r\n\t\tfitQIInsideWindow(qi);\r\n\t\tqi.ontransitionend = null;\r\n\t};\r\n\tsetTimeout(() => {\r\n\t\tfitQIInsideWindow(qi);\r\n\t}, 1);\r\n};\r\n\r\nfunction fitQIInsideWindow(quickInfoPopup){\r\n\tconst popupRect = quickInfoPopup.getBoundingClientRect();\r\n\tconst containerRect = scheduler.$container.getBoundingClientRect();\r\n\r\n\t// calculate the bottom offset of the Quick Info relative to the scheduler container\r\n\tconst offsetBottom = containerRect.bottom - popupRect.bottom;\r\n\r\n\t// If the popup extends outside the scheduler container, adjust its top position\r\n\tif (offsetBottom < 0) {\r\n\t\tquickInfoPopup.style.top = `${parseFloat(quickInfoPopup.style.top) + offsetBottom}px`;\r\n\t}\r\n}\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function(){\r\n\tscheduler.hideQuickInfo();\r\n\tif(this._quick_info_box){\r\n\t\tvar box = this._quick_info_box;\r\n\t\tif(box.parentNode){\r\n\t\t\tbox.parentNode.removeChild(box);\r\n\t\t}\r\n\t\tthis._quick_info_box = null;\r\n\t}\r\n});\r\nscheduler._quick_info_onscroll_handler = function(e){\r\n\tscheduler.hideQuickInfo();\r\n};\r\nscheduler._init_quick_info = function(){\r\n\tif (!this._quick_info_box){\r\n\r\n\r\n\t\tvar qi = this._quick_info_box = document.createElement(\"div\");\r\n\r\n\t\tthis._waiAria.quickInfoAttr(qi);\r\n\r\n\t\tqi.className = \"dhx_cal_quick_info\";\r\n\t\tif (scheduler.$testmode)\r\n\t\t\tqi.className += \" dhx_no_animate\";\r\n\t\tif (scheduler.config.rtl) qi.className += \" dhx_quick_info_rtl\";\r\n\t//title\r\n\t\tvar ariaAttr = this._waiAria.quickInfoHeaderAttrString();\r\n\t\tvar html = `\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t\t
\r\n\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t\t
`;\r\n\r\n\t//buttons\r\n\t\thtml += \"
\";\r\n\t\tvar buttons = scheduler.config.icons_select;\r\n\t\t\tfor (var i = 0; i < buttons.length; i++) {\r\n\t\t\t\tvar ariaAttr = this._waiAria.quickInfoButtonAttrString(this.locale.labels[buttons[i]]);\r\n\t\t\t\thtml += `
\r\n\t\t\t\t
${scheduler.locale.labels[buttons[i]]}
`;\r\n\t\t\t}\r\n\t\t// }\r\n\t\thtml += \"
\";\r\n\r\n\t\tqi.innerHTML = html;\r\n\t\tscheduler.event(qi, \"click\", function(ev){\r\n\t\t\tscheduler._qi_button_click(ev.target || ev.srcElement);\r\n\t\t});\r\n\t\tif (scheduler.config.quick_info_detached){\r\n\t\t\tscheduler._detachDomEvent(scheduler._els[\"dhx_cal_data\"][0], \"scroll\", scheduler._quick_info_onscroll_handler);\r\n\t\t\tscheduler.event(scheduler._els[\"dhx_cal_data\"][0], \"scroll\", scheduler._quick_info_onscroll_handler);\r\n\t\t}\r\n\t}\r\n\r\n\treturn this._quick_info_box;\r\n};\r\n\r\nscheduler._qi_button_click = function(node){\r\n\tvar box = scheduler._quick_info_box;\r\n\tif (!node || node == box) return;\r\n\r\n\tif(node.closest(\".dhx_cal_qi_close_btn\")){\r\n\t\tscheduler.hideQuickInfo();\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar mask = scheduler._getClassName(node);\r\n\tif (mask.indexOf(\"_icon\")!=-1){\r\n\t\tvar id = scheduler._quick_info_box_id;\r\n\t\tscheduler._click.buttons[mask.split(\" \")[1].replace(\"icon_\",\"\")](id);\r\n\t} else\r\n\t\tscheduler._qi_button_click(node.parentNode);\r\n};\r\n\r\nfunction getPositionInsideScheduler(element){\r\n\tlet left = 0;\r\n\tlet top = 0;\r\n\r\n\tlet node = element;\r\n\twhile (node && node != scheduler._obj){\r\n\t\tleft += node.offsetLeft;\r\n\t\ttop += node.offsetTop-node.scrollTop;\r\n\t\tnode = node.offsetParent;\r\n\t}\r\n\tif(node){\r\n\t\tlet dx = (left + element.offsetWidth/2) > (scheduler._x/2) ? 1 : 0;\r\n\t\tlet dy = (top + element.offsetHeight/2) > (scheduler._y/2) ? 1 : 0;\r\n\r\n\t\treturn { left:left, top:top, dx:dx, dy:dy,\r\n\t\t\twidth:element.offsetWidth, height:element.offsetHeight };\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\nscheduler._get_event_counter_part = function(id){\r\n\tvar domEv = scheduler.getRenderedEvent(id);\r\n\treturn getPositionInsideScheduler(domEv);\r\n};\r\n\r\nscheduler._fill_quick_data = function(id){\r\n\tvar ev = scheduler.getEvent(id);\r\n\tvar qi = scheduler._quick_info_box;\r\n\r\n\tscheduler._quick_info_box_id = id;\r\n\r\n//title content\r\n\r\n\tvar header = {\r\n\t\tcontent: scheduler.templates.quick_info_title(ev.start_date, ev.end_date, ev),\r\n\t\tdate: scheduler.templates.quick_info_date(ev.start_date, ev.end_date, ev)\r\n\t};\r\n\tvar titleContent = qi.querySelector(\".dhx_cal_qi_tcontent\");\r\n\ttitleContent.innerHTML = `${header.content}`;\r\n\tvar titleDate = qi.querySelector(\".dhx_cal_qi_tdate\");\r\n\ttitleDate.innerHTML = header.date;\r\n\r\n\tscheduler._waiAria.quickInfoHeader(qi, [header.content, header.date].join(\" \"));\r\n\r\n//main content\r\n\tvar main = qi.querySelector(\".dhx_cal_qi_content\");\r\n\tconst mainContent = scheduler.templates.quick_info_content(ev.start_date, ev.end_date, ev);\r\n\tif(mainContent){\r\n\t\tmain.classList.remove(\"dhx_hidden\");\r\n\t\tmain.innerHTML = mainContent;\r\n\t}else{\r\n\t\tmain.classList.add(\"dhx_hidden\");\r\n\t}\r\n};\r\n\r\n\r\n}","export default function(scheduler){\r\n\t\r\nscheduler.attachEvent(\"onTemplatesReady\", function() {\r\n\tvar originalRecurringSetValue;\r\n\tif (scheduler.form_blocks.recurring) {\r\n\t\toriginalRecurringSetValue = scheduler.form_blocks.recurring.set_value;\r\n\t}\r\n\tvar original_left_buttons = scheduler.config.buttons_left.slice();\r\n\tvar original_right_buttons = scheduler.config.buttons_right.slice();\r\n\r\n\tscheduler.attachEvent(\"onBeforeLightbox\", function(id) {\r\n\t\tif (this.config.readonly_form || this.getEvent(id).readonly) {\r\n\t\t\tthis.config.readonly_active = true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.config.readonly_active = false;\r\n\t\t\tscheduler.config.buttons_left = original_left_buttons.slice();\r\n\t\t\tscheduler.config.buttons_right = original_right_buttons.slice();\r\n\t\r\n\t\t\t// initial value\r\n\t\t\tif(scheduler.form_blocks.recurring) {\r\n\t\t\t\tscheduler.form_blocks.recurring.set_value = originalRecurringSetValue;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar sns = this.config.lightbox.sections;\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\tfor (var i = 0; i < sns.length; i++) {\r\n\t\t\t\tif (sns[i].type == 'recurring') {\r\n\t\t\t\t\tif (this.config.readonly_active && scheduler.form_blocks.recurring) {\r\n\t\t\t\t\t\tscheduler.form_blocks.recurring.set_value = function(node, value, ev) {\r\n\t\t\t\t\t\t\tvar wrapper = scheduler.$domHelpers.closest(node, \".dhx_wrap_section\");\r\n\t\t\t\t\t\t\tvar style = \"none\";\r\n\t\t\t\t\t\t\twrapper.querySelector('.dhx_cal_lsection').display = style;\r\n\t\t\t\t\t\t\twrapper.querySelector('.dhx_form_repeat').display = style;\r\n\t\t\t\t\t\t\twrapper.style.display = style;\r\n\r\n\t\t\t\t\t\t\tscheduler.setLightboxSize();\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar forbidden_buttons = [\"dhx_delete_btn\", \"dhx_save_btn\"];\r\n\t\t\tvar button_arrays = [scheduler.config.buttons_left, scheduler.config.buttons_right];\r\n\t\t\tfor (var i = 0; i < forbidden_buttons.length; i++) {\r\n\t\t\t\tvar forbidden_button = forbidden_buttons[i];\r\n\t\t\t\tfor (var k = 0; k < button_arrays.length; k++) {\r\n\t\t\t\t\tvar button_array = button_arrays[k];\r\n\t\t\t\t\tvar index = -1;\r\n\t\t\t\t\tfor (var p = 0; p < button_array.length; p++) {\r\n\t\t\t\t\t\tif (button_array[p] == forbidden_button) {\r\n\t\t\t\t\t\t\tindex = p;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (index != -1) {\r\n\t\t\t\t\t\tbutton_array.splice(index, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.resetLightbox();\r\n\r\n\t\treturn true;\r\n\t});\r\n\r\n\tfunction txt_replace(tag, d, n, text) {\r\n\t\tvar txts = d.getElementsByTagName(tag);\r\n\t\tvar txtt = n.getElementsByTagName(tag);\r\n\t\tfor (var i = txtt.length - 1; i >= 0; i--) {\r\n\t\t\tvar n = txtt[i];\r\n\t\t\tif (!text){\r\n\t\t\t\tn.disabled = true;\r\n\t\t\t\t//radio and checkboxes loses state after .cloneNode in IE\r\n\t\t\t\tif(d.checked)\r\n\t\t\t\t\tn.checked = true;\r\n\t\t\t}else {\r\n\t\t\t\tvar t = document.createElement(\"span\");\r\n\t\t\t\tt.className = \"dhx_text_disabled\";\r\n\t\t\t\tt.innerHTML = text(txts[i]);\r\n\t\t\t\tn.parentNode.insertBefore(t, n);\r\n\t\t\t\tn.parentNode.removeChild(n);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tvar old = scheduler._fill_lightbox;\r\n\tscheduler._fill_lightbox = function() {\r\n\r\n\t\tvar lb = this.getLightbox();\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\tlb.style.visibility = 'hidden';\r\n\t\t\t// lightbox should have actual sizes before rendering controls\r\n\t\t\t// currently only matters for dhtmlxCombo\r\n\t\t\tlb.style.display = 'block';\r\n\t\t}\r\n\t\tvar res = old.apply(this, arguments);\r\n\t\tif (this.config.readonly_active) {\r\n\t\t\t//reset visibility and display\r\n\t\t\tlb.style.visibility = '';\r\n\t\t\tlb.style.display = 'none';\r\n\t\t}\r\n\r\n\t\tif (this.config.readonly_active) {\r\n\r\n\t\t\tvar originalForm = this.getLightbox();\r\n\t\t\tvar readonlyForm = this._lightbox_r = originalForm.cloneNode(true);\r\n\t\t\treadonlyForm.id = scheduler.uid();\r\n\t\t\treadonlyForm.className += \" dhx_cal_light_readonly\";\r\n\t\t\ttxt_replace(\"textarea\", originalForm, readonlyForm, function(a) {\r\n\t\t\t\treturn a.value;\r\n\t\t\t});\r\n\t\t\ttxt_replace(\"input\", originalForm, readonlyForm, false);\r\n\t\t\ttxt_replace(\"select\", originalForm, readonlyForm, function(a) {\r\n\t\t\t\tif(!a.options.length) return \"\";\r\n\t\t\t\treturn a.options[Math.max((a.selectedIndex || 0), 0)].text;\r\n\t\t\t});\r\n\r\n\t\t\toriginalForm.parentNode.insertBefore(readonlyForm, originalForm);\r\n\r\n\t\t\tthis.showCover(readonlyForm);\r\n\t\t\tif (scheduler._lightbox)\r\n\t\t\t\tscheduler._lightbox.parentNode.removeChild(scheduler._lightbox);\r\n\t\t\tthis._lightbox = readonlyForm;\r\n\r\n\t\t\tif (scheduler.config.drag_lightbox)\r\n\t\t\t\tscheduler.event(readonlyForm.firstChild, \"mousedown\", scheduler._ready_to_dnd);\r\n\t\t\t\t\r\n\t\t\tscheduler._init_lightbox_events();\r\n\t\t\tthis.setLightboxSize();\r\n\t\t}\r\n\t\treturn res;\r\n\t};\r\n\r\n\tvar hold = scheduler.hide_lightbox;\r\n\tscheduler.hide_lightbox = function() {\r\n\t\tif (this._lightbox_r) {\r\n\t\t\tthis._lightbox_r.parentNode.removeChild(this._lightbox_r);\r\n\t\t\tthis._lightbox_r = this._lightbox = null;\r\n\t\t}\r\n\r\n\t\treturn hold.apply(this, arguments);\r\n\t};\r\n});\r\n\r\n\r\n}","// =============================================================================\n// Weekday\n// =============================================================================\nexport var ALL_WEEKDAYS = [\n 'MO',\n 'TU',\n 'WE',\n 'TH',\n 'FR',\n 'SA',\n 'SU',\n];\nvar Weekday = /** @class */ (function () {\n function Weekday(weekday, n) {\n if (n === 0)\n throw new Error(\"Can't create weekday with n == 0\");\n this.weekday = weekday;\n this.n = n;\n }\n Weekday.fromStr = function (str) {\n return new Weekday(ALL_WEEKDAYS.indexOf(str));\n };\n // __call__ - Cannot call the object directly, do it through\n // e.g. RRule.TH.nth(-1) instead,\n Weekday.prototype.nth = function (n) {\n return this.n === n ? this : new Weekday(this.weekday, n);\n };\n // __eq__\n Weekday.prototype.equals = function (other) {\n return this.weekday === other.weekday && this.n === other.n;\n };\n // __repr__\n Weekday.prototype.toString = function () {\n var s = ALL_WEEKDAYS[this.weekday];\n if (this.n)\n s = (this.n > 0 ? '+' : '') + String(this.n) + s;\n return s;\n };\n Weekday.prototype.getJsWeekday = function () {\n return this.weekday === 6 ? 0 : this.weekday + 1;\n };\n return Weekday;\n}());\nexport { Weekday };\n//# sourceMappingURL=weekday.js.map","// =============================================================================\n// Helper functions\n// =============================================================================\nimport { ALL_WEEKDAYS } from './weekday';\nexport var isPresent = function (value) {\n return value !== null && value !== undefined;\n};\nexport var isNumber = function (value) {\n return typeof value === 'number';\n};\nexport var isWeekdayStr = function (value) {\n return typeof value === 'string' && ALL_WEEKDAYS.includes(value);\n};\nexport var isArray = Array.isArray;\n/**\n * Simplified version of python's range()\n */\nexport var range = function (start, end) {\n if (end === void 0) { end = start; }\n if (arguments.length === 1) {\n end = start;\n start = 0;\n }\n var rang = [];\n for (var i = start; i < end; i++)\n rang.push(i);\n return rang;\n};\nexport var clone = function (array) {\n return [].concat(array);\n};\nexport var repeat = function (value, times) {\n var i = 0;\n var array = [];\n if (isArray(value)) {\n for (; i < times; i++)\n array[i] = [].concat(value);\n }\n else {\n for (; i < times; i++)\n array[i] = value;\n }\n return array;\n};\nexport var toArray = function (item) {\n if (isArray(item)) {\n return item;\n }\n return [item];\n};\nexport function padStart(item, targetLength, padString) {\n if (padString === void 0) { padString = ' '; }\n var str = String(item);\n targetLength = targetLength >> 0;\n if (str.length > targetLength) {\n return String(str);\n }\n targetLength = targetLength - str.length;\n if (targetLength > padString.length) {\n padString += repeat(padString, targetLength / padString.length);\n }\n return padString.slice(0, targetLength) + String(str);\n}\n/**\n * Python like split\n */\nexport var split = function (str, sep, num) {\n var splits = str.split(sep);\n return num\n ? splits.slice(0, num).concat([splits.slice(num).join(sep)])\n : splits;\n};\n/**\n * closure/goog/math/math.js:modulo\n * Copyright 2006 The Closure Library Authors.\n * The % operator in JavaScript returns the remainder of a / b, but differs from\n * some other languages in that the result will have the same sign as the\n * dividend. For example, -1 % 8 == -1, whereas in some other languages\n * (such as Python) the result would be 7. This function emulates the more\n * correct modulo behavior, which is useful for certain applications such as\n * calculating an offset index in a circular list.\n *\n * @param {number} a The dividend.\n * @param {number} b The divisor.\n * @return {number} a % b where the result is between 0 and b (either 0 <= x < b\n * or b < x <= 0, depending on the sign of b).\n */\nexport var pymod = function (a, b) {\n var r = a % b;\n // If r and b differ in sign, add b to wrap the result to the correct sign.\n return r * b < 0 ? r + b : r;\n};\n/**\n * @see: \n */\nexport var divmod = function (a, b) {\n return { div: Math.floor(a / b), mod: pymod(a, b) };\n};\nexport var empty = function (obj) {\n return !isPresent(obj) || obj.length === 0;\n};\n/**\n * Python-like boolean\n *\n * @return {Boolean} value of an object/primitive, taking into account\n * the fact that in Python an empty list's/tuple's\n * boolean value is False, whereas in JS it's true\n */\nexport var notEmpty = function (obj) {\n return !empty(obj);\n};\n/**\n * Return true if a value is in an array\n */\nexport var includes = function (arr, val) {\n return notEmpty(arr) && arr.indexOf(val) !== -1;\n};\n//# sourceMappingURL=helpers.js.map","import { padStart } from './helpers';\nexport var datetime = function (y, m, d, h, i, s) {\n if (h === void 0) { h = 0; }\n if (i === void 0) { i = 0; }\n if (s === void 0) { s = 0; }\n return new Date(Date.UTC(y, m - 1, d, h, i, s));\n};\n/**\n * General date-related utilities.\n * Also handles several incompatibilities between JavaScript and Python\n *\n */\nexport var MONTH_DAYS = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n/**\n * Number of milliseconds of one day\n */\nexport var ONE_DAY = 1000 * 60 * 60 * 24;\n/**\n * @see: \n */\nexport var MAXYEAR = 9999;\n/**\n * Python uses 1-Jan-1 as the base for calculating ordinals but we don't\n * want to confuse the JS engine with milliseconds > Number.MAX_NUMBER,\n * therefore we use 1-Jan-1970 instead\n */\nexport var ORDINAL_BASE = datetime(1970, 1, 1);\n/**\n * Python: MO-SU: 0 - 6\n * JS: SU-SAT 0 - 6\n */\nexport var PY_WEEKDAYS = [6, 0, 1, 2, 3, 4, 5];\n/**\n * py_date.timetuple()[7]\n */\nexport var getYearDay = function (date) {\n var dateNoTime = new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate());\n return (Math.ceil((dateNoTime.valueOf() - new Date(date.getUTCFullYear(), 0, 1).valueOf()) /\n ONE_DAY) + 1);\n};\nexport var isLeapYear = function (year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n};\nexport var isDate = function (value) {\n return value instanceof Date;\n};\nexport var isValidDate = function (value) {\n return isDate(value) && !isNaN(value.getTime());\n};\n/**\n * @return {Number} the date's timezone offset in ms\n */\nexport var tzOffset = function (date) {\n return date.getTimezoneOffset() * 60 * 1000;\n};\n/**\n * @see: \n */\nexport var daysBetween = function (date1, date2) {\n // The number of milliseconds in one day\n // Convert both dates to milliseconds\n var date1ms = date1.getTime();\n var date2ms = date2.getTime();\n // Calculate the difference in milliseconds\n var differencems = date1ms - date2ms;\n // Convert back to days and return\n return Math.round(differencems / ONE_DAY);\n};\n/**\n * @see: \n */\nexport var toOrdinal = function (date) {\n return daysBetween(date, ORDINAL_BASE);\n};\n/**\n * @see - \n */\nexport var fromOrdinal = function (ordinal) {\n return new Date(ORDINAL_BASE.getTime() + ordinal * ONE_DAY);\n};\nexport var getMonthDays = function (date) {\n var month = date.getUTCMonth();\n return month === 1 && isLeapYear(date.getUTCFullYear())\n ? 29\n : MONTH_DAYS[month];\n};\n/**\n * @return {Number} python-like weekday\n */\nexport var getWeekday = function (date) {\n return PY_WEEKDAYS[date.getUTCDay()];\n};\n/**\n * @see: \n */\nexport var monthRange = function (year, month) {\n var date = datetime(year, month + 1, 1);\n return [getWeekday(date), getMonthDays(date)];\n};\n/**\n * @see: \n */\nexport var combine = function (date, time) {\n time = time || date;\n return new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), time.getHours(), time.getMinutes(), time.getSeconds(), time.getMilliseconds()));\n};\nexport var clone = function (date) {\n var dolly = new Date(date.getTime());\n return dolly;\n};\nexport var cloneDates = function (dates) {\n var clones = [];\n for (var i = 0; i < dates.length; i++) {\n clones.push(clone(dates[i]));\n }\n return clones;\n};\n/**\n * Sorts an array of Date or Time objects\n */\nexport var sort = function (dates) {\n dates.sort(function (a, b) {\n return a.getTime() - b.getTime();\n });\n};\nexport var timeToUntilString = function (time, utc) {\n if (utc === void 0) { utc = true; }\n var date = new Date(time);\n return [\n padStart(date.getUTCFullYear().toString(), 4, '0'),\n padStart(date.getUTCMonth() + 1, 2, '0'),\n padStart(date.getUTCDate(), 2, '0'),\n 'T',\n padStart(date.getUTCHours(), 2, '0'),\n padStart(date.getUTCMinutes(), 2, '0'),\n padStart(date.getUTCSeconds(), 2, '0'),\n utc ? 'Z' : '',\n ].join('');\n};\nexport var untilStringToDate = function (until) {\n var re = /^(\\d{4})(\\d{2})(\\d{2})(T(\\d{2})(\\d{2})(\\d{2})Z?)?$/;\n var bits = re.exec(until);\n if (!bits)\n throw new Error(\"Invalid UNTIL value: \".concat(until));\n return new Date(Date.UTC(parseInt(bits[1], 10), parseInt(bits[2], 10) - 1, parseInt(bits[3], 10), parseInt(bits[5], 10) || 0, parseInt(bits[6], 10) || 0, parseInt(bits[7], 10) || 0));\n};\nvar dateTZtoISO8601 = function (date, timeZone) {\n // date format for sv-SE is almost ISO8601\n var dateStr = date.toLocaleString('sv-SE', { timeZone: timeZone });\n // '2023-02-07 10:41:36'\n return dateStr.replace(' ', 'T') + 'Z';\n};\nexport var dateInTimeZone = function (date, timeZone) {\n var localTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;\n // Date constructor can only reliably parse dates in ISO8601 format\n var dateInLocalTZ = new Date(dateTZtoISO8601(date, localTimeZone));\n var dateInTargetTZ = new Date(dateTZtoISO8601(date, timeZone !== null && timeZone !== void 0 ? timeZone : 'UTC'));\n var tzOffset = dateInTargetTZ.getTime() - dateInLocalTZ.getTime();\n return new Date(date.getTime() - tzOffset);\n};\n//# sourceMappingURL=dateutil.js.map","/**\n * This class helps us to emulate python's generators, sorta.\n */\nvar IterResult = /** @class */ (function () {\n function IterResult(method, args) {\n this.minDate = null;\n this.maxDate = null;\n this._result = [];\n this.total = 0;\n this.method = method;\n this.args = args;\n if (method === 'between') {\n this.maxDate = args.inc\n ? args.before\n : new Date(args.before.getTime() - 1);\n this.minDate = args.inc ? args.after : new Date(args.after.getTime() + 1);\n }\n else if (method === 'before') {\n this.maxDate = args.inc ? args.dt : new Date(args.dt.getTime() - 1);\n }\n else if (method === 'after') {\n this.minDate = args.inc ? args.dt : new Date(args.dt.getTime() + 1);\n }\n }\n /**\n * Possibly adds a date into the result.\n *\n * @param {Date} date - the date isn't necessarly added to the result\n * list (if it is too late/too early)\n * @return {Boolean} true if it makes sense to continue the iteration\n * false if we're done.\n */\n IterResult.prototype.accept = function (date) {\n ++this.total;\n var tooEarly = this.minDate && date < this.minDate;\n var tooLate = this.maxDate && date > this.maxDate;\n if (this.method === 'between') {\n if (tooEarly)\n return true;\n if (tooLate)\n return false;\n }\n else if (this.method === 'before') {\n if (tooLate)\n return false;\n }\n else if (this.method === 'after') {\n if (tooEarly)\n return true;\n this.add(date);\n return false;\n }\n return this.add(date);\n };\n /**\n *\n * @param {Date} date that is part of the result.\n * @return {Boolean} whether we are interested in more values.\n */\n IterResult.prototype.add = function (date) {\n this._result.push(date);\n return true;\n };\n /**\n * 'before' and 'after' return only one date, whereas 'all'\n * and 'between' an array.\n *\n * @return {Date,Array?}\n */\n IterResult.prototype.getValue = function () {\n var res = this._result;\n switch (this.method) {\n case 'all':\n case 'between':\n return res;\n case 'before':\n case 'after':\n default:\n return (res.length ? res[res.length - 1] : null);\n }\n };\n IterResult.prototype.clone = function () {\n return new IterResult(this.method, this.args);\n };\n return IterResult;\n}());\nexport default IterResult;\n//# sourceMappingURL=iterresult.js.map","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol */\n\nvar 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 (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(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\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n function next() {\n while (env.stack.length) {\n var rec = env.stack.pop();\n try {\n var result = rec.dispose && rec.dispose.call(rec.value);\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n catch (e) {\n fail(e);\n }\n }\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n};\n","import { __extends } from \"tslib\";\nimport IterResult from './iterresult';\n/**\n * IterResult subclass that calls a callback function on each add,\n * and stops iterating when the callback returns false.\n */\nvar CallbackIterResult = /** @class */ (function (_super) {\n __extends(CallbackIterResult, _super);\n function CallbackIterResult(method, args, iterator) {\n var _this = _super.call(this, method, args) || this;\n _this.iterator = iterator;\n return _this;\n }\n CallbackIterResult.prototype.add = function (date) {\n if (this.iterator(date, this._result.length)) {\n this._result.push(date);\n return true;\n }\n return false;\n };\n return CallbackIterResult;\n}(IterResult));\nexport default CallbackIterResult;\n//# sourceMappingURL=callbackiterresult.js.map","// =============================================================================\n// i18n\n// =============================================================================\nvar ENGLISH = {\n dayNames: [\n 'Sunday',\n 'Monday',\n 'Tuesday',\n 'Wednesday',\n 'Thursday',\n 'Friday',\n 'Saturday',\n ],\n monthNames: [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n ],\n tokens: {\n SKIP: /^[ \\r\\n\\t]+|^\\.$/,\n number: /^[1-9][0-9]*/,\n numberAsText: /^(one|two|three)/i,\n every: /^every/i,\n 'day(s)': /^days?/i,\n 'weekday(s)': /^weekdays?/i,\n 'week(s)': /^weeks?/i,\n 'hour(s)': /^hours?/i,\n 'minute(s)': /^minutes?/i,\n 'month(s)': /^months?/i,\n 'year(s)': /^years?/i,\n on: /^(on|in)/i,\n at: /^(at)/i,\n the: /^the/i,\n first: /^first/i,\n second: /^second/i,\n third: /^third/i,\n nth: /^([1-9][0-9]*)(\\.|th|nd|rd|st)/i,\n last: /^last/i,\n for: /^for/i,\n 'time(s)': /^times?/i,\n until: /^(un)?til/i,\n monday: /^mo(n(day)?)?/i,\n tuesday: /^tu(e(s(day)?)?)?/i,\n wednesday: /^we(d(n(esday)?)?)?/i,\n thursday: /^th(u(r(sday)?)?)?/i,\n friday: /^fr(i(day)?)?/i,\n saturday: /^sa(t(urday)?)?/i,\n sunday: /^su(n(day)?)?/i,\n january: /^jan(uary)?/i,\n february: /^feb(ruary)?/i,\n march: /^mar(ch)?/i,\n april: /^apr(il)?/i,\n may: /^may/i,\n june: /^june?/i,\n july: /^july?/i,\n august: /^aug(ust)?/i,\n september: /^sep(t(ember)?)?/i,\n october: /^oct(ober)?/i,\n november: /^nov(ember)?/i,\n december: /^dec(ember)?/i,\n comma: /^(,\\s*|(and|or)\\s*)+/i,\n },\n};\nexport default ENGLISH;\n//# sourceMappingURL=i18n.js.map","import ENGLISH from './i18n';\nimport { RRule } from '../rrule';\nimport { isArray, isNumber, isPresent } from '../helpers';\n// =============================================================================\n// Helper functions\n// =============================================================================\n/**\n * Return true if a value is in an array\n */\nvar contains = function (arr, val) {\n return arr.indexOf(val) !== -1;\n};\nvar defaultGetText = function (id) { return id.toString(); };\nvar defaultDateFormatter = function (year, month, day) { return \"\".concat(month, \" \").concat(day, \", \").concat(year); };\n/**\n *\n * @param {RRule} rrule\n * Optional:\n * @param {Function} gettext function\n * @param {Object} language definition\n * @constructor\n */\nvar ToText = /** @class */ (function () {\n function ToText(rrule, gettext, language, dateFormatter) {\n if (gettext === void 0) { gettext = defaultGetText; }\n if (language === void 0) { language = ENGLISH; }\n if (dateFormatter === void 0) { dateFormatter = defaultDateFormatter; }\n this.text = [];\n this.language = language || ENGLISH;\n this.gettext = gettext;\n this.dateFormatter = dateFormatter;\n this.rrule = rrule;\n this.options = rrule.options;\n this.origOptions = rrule.origOptions;\n if (this.origOptions.bymonthday) {\n var bymonthday = [].concat(this.options.bymonthday);\n var bynmonthday = [].concat(this.options.bynmonthday);\n bymonthday.sort(function (a, b) { return a - b; });\n bynmonthday.sort(function (a, b) { return b - a; });\n // 1, 2, 3, .., -5, -4, -3, ..\n this.bymonthday = bymonthday.concat(bynmonthday);\n if (!this.bymonthday.length)\n this.bymonthday = null;\n }\n if (isPresent(this.origOptions.byweekday)) {\n var byweekday = !isArray(this.origOptions.byweekday)\n ? [this.origOptions.byweekday]\n : this.origOptions.byweekday;\n var days = String(byweekday);\n this.byweekday = {\n allWeeks: byweekday.filter(function (weekday) {\n return !weekday.n;\n }),\n someWeeks: byweekday.filter(function (weekday) {\n return Boolean(weekday.n);\n }),\n isWeekdays: days.indexOf('MO') !== -1 &&\n days.indexOf('TU') !== -1 &&\n days.indexOf('WE') !== -1 &&\n days.indexOf('TH') !== -1 &&\n days.indexOf('FR') !== -1 &&\n days.indexOf('SA') === -1 &&\n days.indexOf('SU') === -1,\n isEveryDay: days.indexOf('MO') !== -1 &&\n days.indexOf('TU') !== -1 &&\n days.indexOf('WE') !== -1 &&\n days.indexOf('TH') !== -1 &&\n days.indexOf('FR') !== -1 &&\n days.indexOf('SA') !== -1 &&\n days.indexOf('SU') !== -1,\n };\n var sortWeekDays = function (a, b) {\n return a.weekday - b.weekday;\n };\n this.byweekday.allWeeks.sort(sortWeekDays);\n this.byweekday.someWeeks.sort(sortWeekDays);\n if (!this.byweekday.allWeeks.length)\n this.byweekday.allWeeks = null;\n if (!this.byweekday.someWeeks.length)\n this.byweekday.someWeeks = null;\n }\n else {\n this.byweekday = null;\n }\n }\n /**\n * Test whether the rrule can be fully converted to text.\n *\n * @param {RRule} rrule\n * @return {Boolean}\n */\n ToText.isFullyConvertible = function (rrule) {\n var canConvert = true;\n if (!(rrule.options.freq in ToText.IMPLEMENTED))\n return false;\n if (rrule.origOptions.until && rrule.origOptions.count)\n return false;\n for (var key in rrule.origOptions) {\n if (contains(['dtstart', 'tzid', 'wkst', 'freq'], key))\n return true;\n if (!contains(ToText.IMPLEMENTED[rrule.options.freq], key))\n return false;\n }\n return canConvert;\n };\n ToText.prototype.isFullyConvertible = function () {\n return ToText.isFullyConvertible(this.rrule);\n };\n /**\n * Perform the conversion. Only some of the frequencies are supported.\n * If some of the rrule's options aren't supported, they'll\n * be omitted from the output an \"(~ approximate)\" will be appended.\n *\n * @return {*}\n */\n ToText.prototype.toString = function () {\n var gettext = this.gettext;\n if (!(this.options.freq in ToText.IMPLEMENTED)) {\n return gettext('RRule error: Unable to fully convert this rrule to text');\n }\n this.text = [gettext('every')];\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this[RRule.FREQUENCIES[this.options.freq]]();\n if (this.options.until) {\n this.add(gettext('until'));\n var until = this.options.until;\n this.add(this.dateFormatter(until.getUTCFullYear(), this.language.monthNames[until.getUTCMonth()], until.getUTCDate()));\n }\n else if (this.options.count) {\n this.add(gettext('for'))\n .add(this.options.count.toString())\n .add(this.plural(this.options.count) ? gettext('times') : gettext('time'));\n }\n if (!this.isFullyConvertible())\n this.add(gettext('(~ approximate)'));\n return this.text.join('');\n };\n ToText.prototype.HOURLY = function () {\n var gettext = this.gettext;\n if (this.options.interval !== 1)\n this.add(this.options.interval.toString());\n this.add(this.plural(this.options.interval) ? gettext('hours') : gettext('hour'));\n };\n ToText.prototype.MINUTELY = function () {\n var gettext = this.gettext;\n if (this.options.interval !== 1)\n this.add(this.options.interval.toString());\n this.add(this.plural(this.options.interval)\n ? gettext('minutes')\n : gettext('minute'));\n };\n ToText.prototype.DAILY = function () {\n var gettext = this.gettext;\n if (this.options.interval !== 1)\n this.add(this.options.interval.toString());\n if (this.byweekday && this.byweekday.isWeekdays) {\n this.add(this.plural(this.options.interval)\n ? gettext('weekdays')\n : gettext('weekday'));\n }\n else {\n this.add(this.plural(this.options.interval) ? gettext('days') : gettext('day'));\n }\n if (this.origOptions.bymonth) {\n this.add(gettext('in'));\n this._bymonth();\n }\n if (this.bymonthday) {\n this._bymonthday();\n }\n else if (this.byweekday) {\n this._byweekday();\n }\n else if (this.origOptions.byhour) {\n this._byhour();\n }\n };\n ToText.prototype.WEEKLY = function () {\n var gettext = this.gettext;\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString()).add(this.plural(this.options.interval) ? gettext('weeks') : gettext('week'));\n }\n if (this.byweekday && this.byweekday.isWeekdays) {\n if (this.options.interval === 1) {\n this.add(this.plural(this.options.interval)\n ? gettext('weekdays')\n : gettext('weekday'));\n }\n else {\n this.add(gettext('on')).add(gettext('weekdays'));\n }\n }\n else if (this.byweekday && this.byweekday.isEveryDay) {\n this.add(this.plural(this.options.interval) ? gettext('days') : gettext('day'));\n }\n else {\n if (this.options.interval === 1)\n this.add(gettext('week'));\n if (this.origOptions.bymonth) {\n this.add(gettext('in'));\n this._bymonth();\n }\n if (this.bymonthday) {\n this._bymonthday();\n }\n else if (this.byweekday) {\n this._byweekday();\n }\n if (this.origOptions.byhour) {\n this._byhour();\n }\n }\n };\n ToText.prototype.MONTHLY = function () {\n var gettext = this.gettext;\n if (this.origOptions.bymonth) {\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString()).add(gettext('months'));\n if (this.plural(this.options.interval))\n this.add(gettext('in'));\n }\n else {\n // this.add(gettext('MONTH'))\n }\n this._bymonth();\n }\n else {\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString());\n }\n this.add(this.plural(this.options.interval)\n ? gettext('months')\n : gettext('month'));\n }\n if (this.bymonthday) {\n this._bymonthday();\n }\n else if (this.byweekday && this.byweekday.isWeekdays) {\n this.add(gettext('on')).add(gettext('weekdays'));\n }\n else if (this.byweekday) {\n this._byweekday();\n }\n };\n ToText.prototype.YEARLY = function () {\n var gettext = this.gettext;\n if (this.origOptions.bymonth) {\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString());\n this.add(gettext('years'));\n }\n else {\n // this.add(gettext('YEAR'))\n }\n this._bymonth();\n }\n else {\n if (this.options.interval !== 1) {\n this.add(this.options.interval.toString());\n }\n this.add(this.plural(this.options.interval) ? gettext('years') : gettext('year'));\n }\n if (this.bymonthday) {\n this._bymonthday();\n }\n else if (this.byweekday) {\n this._byweekday();\n }\n if (this.options.byyearday) {\n this.add(gettext('on the'))\n .add(this.list(this.options.byyearday, this.nth, gettext('and')))\n .add(gettext('day'));\n }\n if (this.options.byweekno) {\n this.add(gettext('in'))\n .add(this.plural(this.options.byweekno.length)\n ? gettext('weeks')\n : gettext('week'))\n .add(this.list(this.options.byweekno, undefined, gettext('and')));\n }\n };\n ToText.prototype._bymonthday = function () {\n var gettext = this.gettext;\n if (this.byweekday && this.byweekday.allWeeks) {\n this.add(gettext('on'))\n .add(this.list(this.byweekday.allWeeks, this.weekdaytext, gettext('or')))\n .add(gettext('the'))\n .add(this.list(this.bymonthday, this.nth, gettext('or')));\n }\n else {\n this.add(gettext('on the')).add(this.list(this.bymonthday, this.nth, gettext('and')));\n }\n // this.add(gettext('DAY'))\n };\n ToText.prototype._byweekday = function () {\n var gettext = this.gettext;\n if (this.byweekday.allWeeks && !this.byweekday.isWeekdays) {\n this.add(gettext('on')).add(this.list(this.byweekday.allWeeks, this.weekdaytext));\n }\n if (this.byweekday.someWeeks) {\n if (this.byweekday.allWeeks)\n this.add(gettext('and'));\n this.add(gettext('on the')).add(this.list(this.byweekday.someWeeks, this.weekdaytext, gettext('and')));\n }\n };\n ToText.prototype._byhour = function () {\n var gettext = this.gettext;\n this.add(gettext('at')).add(this.list(this.origOptions.byhour, undefined, gettext('and')));\n };\n ToText.prototype._bymonth = function () {\n this.add(this.list(this.options.bymonth, this.monthtext, this.gettext('and')));\n };\n ToText.prototype.nth = function (n) {\n n = parseInt(n.toString(), 10);\n var nth;\n var gettext = this.gettext;\n if (n === -1)\n return gettext('last');\n var npos = Math.abs(n);\n switch (npos) {\n case 1:\n case 21:\n case 31:\n nth = npos + gettext('st');\n break;\n case 2:\n case 22:\n nth = npos + gettext('nd');\n break;\n case 3:\n case 23:\n nth = npos + gettext('rd');\n break;\n default:\n nth = npos + gettext('th');\n }\n return n < 0 ? nth + ' ' + gettext('last') : nth;\n };\n ToText.prototype.monthtext = function (m) {\n return this.language.monthNames[m - 1];\n };\n ToText.prototype.weekdaytext = function (wday) {\n var weekday = isNumber(wday) ? (wday + 1) % 7 : wday.getJsWeekday();\n return ((wday.n ? this.nth(wday.n) + ' ' : '') +\n this.language.dayNames[weekday]);\n };\n ToText.prototype.plural = function (n) {\n return n % 100 !== 1;\n };\n ToText.prototype.add = function (s) {\n this.text.push(' ');\n this.text.push(s);\n return this;\n };\n ToText.prototype.list = function (arr, callback, finalDelim, delim) {\n var _this = this;\n if (delim === void 0) { delim = ','; }\n if (!isArray(arr)) {\n arr = [arr];\n }\n var delimJoin = function (array, delimiter, finalDelimiter) {\n var list = '';\n for (var i = 0; i < array.length; i++) {\n if (i !== 0) {\n if (i === array.length - 1) {\n list += ' ' + finalDelimiter + ' ';\n }\n else {\n list += delimiter + ' ';\n }\n }\n list += array[i];\n }\n return list;\n };\n callback =\n callback ||\n function (o) {\n return o.toString();\n };\n var realCallback = function (arg) {\n return callback && callback.call(_this, arg);\n };\n if (finalDelim) {\n return delimJoin(arr.map(realCallback), delim, finalDelim);\n }\n else {\n return arr.map(realCallback).join(delim + ' ');\n }\n };\n return ToText;\n}());\nexport default ToText;\n//# sourceMappingURL=totext.js.map","import ENGLISH from './i18n';\nimport { RRule } from '../rrule';\n// =============================================================================\n// Parser\n// =============================================================================\nvar Parser = /** @class */ (function () {\n function Parser(rules) {\n this.done = true;\n this.rules = rules;\n }\n Parser.prototype.start = function (text) {\n this.text = text;\n this.done = false;\n return this.nextSymbol();\n };\n Parser.prototype.isDone = function () {\n return this.done && this.symbol === null;\n };\n Parser.prototype.nextSymbol = function () {\n var best;\n var bestSymbol;\n this.symbol = null;\n this.value = null;\n do {\n if (this.done)\n return false;\n var rule = void 0;\n best = null;\n for (var name_1 in this.rules) {\n rule = this.rules[name_1];\n var match = rule.exec(this.text);\n if (match) {\n if (best === null || match[0].length > best[0].length) {\n best = match;\n bestSymbol = name_1;\n }\n }\n }\n if (best != null) {\n this.text = this.text.substr(best[0].length);\n if (this.text === '')\n this.done = true;\n }\n if (best == null) {\n this.done = true;\n this.symbol = null;\n this.value = null;\n return;\n }\n } while (bestSymbol === 'SKIP');\n this.symbol = bestSymbol;\n this.value = best;\n return true;\n };\n Parser.prototype.accept = function (name) {\n if (this.symbol === name) {\n if (this.value) {\n var v = this.value;\n this.nextSymbol();\n return v;\n }\n this.nextSymbol();\n return true;\n }\n return false;\n };\n Parser.prototype.acceptNumber = function () {\n return this.accept('number');\n };\n Parser.prototype.expect = function (name) {\n if (this.accept(name))\n return true;\n throw new Error('expected ' + name + ' but found ' + this.symbol);\n };\n return Parser;\n}());\nexport default function parseText(text, language) {\n if (language === void 0) { language = ENGLISH; }\n var options = {};\n var ttr = new Parser(language.tokens);\n if (!ttr.start(text))\n return null;\n S();\n return options;\n function S() {\n // every [n]\n ttr.expect('every');\n var n = ttr.acceptNumber();\n if (n)\n options.interval = parseInt(n[0], 10);\n if (ttr.isDone())\n throw new Error('Unexpected end');\n switch (ttr.symbol) {\n case 'day(s)':\n options.freq = RRule.DAILY;\n if (ttr.nextSymbol()) {\n AT();\n F();\n }\n break;\n // FIXME Note: every 2 weekdays != every two weeks on weekdays.\n // DAILY on weekdays is not a valid rule\n case 'weekday(s)':\n options.freq = RRule.WEEKLY;\n options.byweekday = [RRule.MO, RRule.TU, RRule.WE, RRule.TH, RRule.FR];\n ttr.nextSymbol();\n AT();\n F();\n break;\n case 'week(s)':\n options.freq = RRule.WEEKLY;\n if (ttr.nextSymbol()) {\n ON();\n AT();\n F();\n }\n break;\n case 'hour(s)':\n options.freq = RRule.HOURLY;\n if (ttr.nextSymbol()) {\n ON();\n F();\n }\n break;\n case 'minute(s)':\n options.freq = RRule.MINUTELY;\n if (ttr.nextSymbol()) {\n ON();\n F();\n }\n break;\n case 'month(s)':\n options.freq = RRule.MONTHLY;\n if (ttr.nextSymbol()) {\n ON();\n F();\n }\n break;\n case 'year(s)':\n options.freq = RRule.YEARLY;\n if (ttr.nextSymbol()) {\n ON();\n F();\n }\n break;\n case 'monday':\n case 'tuesday':\n case 'wednesday':\n case 'thursday':\n case 'friday':\n case 'saturday':\n case 'sunday':\n options.freq = RRule.WEEKLY;\n var key = ttr.symbol\n .substr(0, 2)\n .toUpperCase();\n options.byweekday = [RRule[key]];\n if (!ttr.nextSymbol())\n return;\n // TODO check for duplicates\n while (ttr.accept('comma')) {\n if (ttr.isDone())\n throw new Error('Unexpected end');\n var wkd = decodeWKD();\n if (!wkd) {\n throw new Error('Unexpected symbol ' + ttr.symbol + ', expected weekday');\n }\n options.byweekday.push(RRule[wkd]);\n ttr.nextSymbol();\n }\n AT();\n MDAYs();\n F();\n break;\n case 'january':\n case 'february':\n case 'march':\n case 'april':\n case 'may':\n case 'june':\n case 'july':\n case 'august':\n case 'september':\n case 'october':\n case 'november':\n case 'december':\n options.freq = RRule.YEARLY;\n options.bymonth = [decodeM()];\n if (!ttr.nextSymbol())\n return;\n // TODO check for duplicates\n while (ttr.accept('comma')) {\n if (ttr.isDone())\n throw new Error('Unexpected end');\n var m = decodeM();\n if (!m) {\n throw new Error('Unexpected symbol ' + ttr.symbol + ', expected month');\n }\n options.bymonth.push(m);\n ttr.nextSymbol();\n }\n ON();\n F();\n break;\n default:\n throw new Error('Unknown symbol');\n }\n }\n function ON() {\n var on = ttr.accept('on');\n var the = ttr.accept('the');\n if (!(on || the))\n return;\n do {\n var nth = decodeNTH();\n var wkd = decodeWKD();\n var m = decodeM();\n // nth | \n if (nth) {\n // ttr.nextSymbol()\n if (wkd) {\n ttr.nextSymbol();\n if (!options.byweekday)\n options.byweekday = [];\n options.byweekday.push(RRule[wkd].nth(nth));\n }\n else {\n if (!options.bymonthday)\n options.bymonthday = [];\n options.bymonthday.push(nth);\n ttr.accept('day(s)');\n }\n // \n }\n else if (wkd) {\n ttr.nextSymbol();\n if (!options.byweekday)\n options.byweekday = [];\n options.byweekday.push(RRule[wkd]);\n }\n else if (ttr.symbol === 'weekday(s)') {\n ttr.nextSymbol();\n if (!options.byweekday) {\n options.byweekday = [RRule.MO, RRule.TU, RRule.WE, RRule.TH, RRule.FR];\n }\n }\n else if (ttr.symbol === 'week(s)') {\n ttr.nextSymbol();\n var n = ttr.acceptNumber();\n if (!n) {\n throw new Error('Unexpected symbol ' + ttr.symbol + ', expected week number');\n }\n options.byweekno = [parseInt(n[0], 10)];\n while (ttr.accept('comma')) {\n n = ttr.acceptNumber();\n if (!n) {\n throw new Error('Unexpected symbol ' + ttr.symbol + '; expected monthday');\n }\n options.byweekno.push(parseInt(n[0], 10));\n }\n }\n else if (m) {\n ttr.nextSymbol();\n if (!options.bymonth)\n options.bymonth = [];\n options.bymonth.push(m);\n }\n else {\n return;\n }\n } while (ttr.accept('comma') || ttr.accept('the') || ttr.accept('on'));\n }\n function AT() {\n var at = ttr.accept('at');\n if (!at)\n return;\n do {\n var n = ttr.acceptNumber();\n if (!n) {\n throw new Error('Unexpected symbol ' + ttr.symbol + ', expected hour');\n }\n options.byhour = [parseInt(n[0], 10)];\n while (ttr.accept('comma')) {\n n = ttr.acceptNumber();\n if (!n) {\n throw new Error('Unexpected symbol ' + ttr.symbol + '; expected hour');\n }\n options.byhour.push(parseInt(n[0], 10));\n }\n } while (ttr.accept('comma') || ttr.accept('at'));\n }\n function decodeM() {\n switch (ttr.symbol) {\n case 'january':\n return 1;\n case 'february':\n return 2;\n case 'march':\n return 3;\n case 'april':\n return 4;\n case 'may':\n return 5;\n case 'june':\n return 6;\n case 'july':\n return 7;\n case 'august':\n return 8;\n case 'september':\n return 9;\n case 'october':\n return 10;\n case 'november':\n return 11;\n case 'december':\n return 12;\n default:\n return false;\n }\n }\n function decodeWKD() {\n switch (ttr.symbol) {\n case 'monday':\n case 'tuesday':\n case 'wednesday':\n case 'thursday':\n case 'friday':\n case 'saturday':\n case 'sunday':\n return ttr.symbol.substr(0, 2).toUpperCase();\n default:\n return false;\n }\n }\n function decodeNTH() {\n switch (ttr.symbol) {\n case 'last':\n ttr.nextSymbol();\n return -1;\n case 'first':\n ttr.nextSymbol();\n return 1;\n case 'second':\n ttr.nextSymbol();\n return ttr.accept('last') ? -2 : 2;\n case 'third':\n ttr.nextSymbol();\n return ttr.accept('last') ? -3 : 3;\n case 'nth':\n var v = parseInt(ttr.value[1], 10);\n if (v < -366 || v > 366)\n throw new Error('Nth out of range: ' + v);\n ttr.nextSymbol();\n return ttr.accept('last') ? -v : v;\n default:\n return false;\n }\n }\n function MDAYs() {\n ttr.accept('on');\n ttr.accept('the');\n var nth = decodeNTH();\n if (!nth)\n return;\n options.bymonthday = [nth];\n ttr.nextSymbol();\n while (ttr.accept('comma')) {\n nth = decodeNTH();\n if (!nth) {\n throw new Error('Unexpected symbol ' + ttr.symbol + '; expected monthday');\n }\n options.bymonthday.push(nth);\n ttr.nextSymbol();\n }\n }\n function F() {\n if (ttr.symbol === 'until') {\n var date = Date.parse(ttr.text);\n if (!date)\n throw new Error('Cannot parse until date:' + ttr.text);\n options.until = new Date(date);\n }\n else if (ttr.accept('for')) {\n options.count = parseInt(ttr.value[0], 10);\n ttr.expect('number');\n // ttr.expect('times')\n }\n }\n}\n//# sourceMappingURL=parsetext.js.map","export var Frequency;\n(function (Frequency) {\n Frequency[Frequency[\"YEARLY\"] = 0] = \"YEARLY\";\n Frequency[Frequency[\"MONTHLY\"] = 1] = \"MONTHLY\";\n Frequency[Frequency[\"WEEKLY\"] = 2] = \"WEEKLY\";\n Frequency[Frequency[\"DAILY\"] = 3] = \"DAILY\";\n Frequency[Frequency[\"HOURLY\"] = 4] = \"HOURLY\";\n Frequency[Frequency[\"MINUTELY\"] = 5] = \"MINUTELY\";\n Frequency[Frequency[\"SECONDLY\"] = 6] = \"SECONDLY\";\n})(Frequency || (Frequency = {}));\nexport function freqIsDailyOrGreater(freq) {\n return freq < Frequency.HOURLY;\n}\n//# sourceMappingURL=types.js.map","import ToText from './totext';\nimport parseText from './parsetext';\nimport { RRule } from '../rrule';\nimport { Frequency } from '../types';\nimport ENGLISH from './i18n';\n/* !\n * rrule.js - Library for working with recurrence rules for calendar dates.\n * https://github.com/jakubroztocil/rrule\n *\n * Copyright 2010, Jakub Roztocil and Lars Schoning\n * Licenced under the BSD licence.\n * https://github.com/jakubroztocil/rrule/blob/master/LICENCE\n *\n */\n/**\n *\n * Implementation of RRule.fromText() and RRule::toText().\n *\n *\n * On the client side, this file needs to be included\n * when those functions are used.\n *\n */\n// =============================================================================\n// fromText\n// =============================================================================\n/**\n * Will be able to convert some of the below described rules from\n * text format to a rule object.\n *\n *\n * RULES\n *\n * Every ([n])\n * day(s)\n * | [weekday], ..., (and) [weekday]\n * | weekday(s)\n * | week(s)\n * | month(s)\n * | [month], ..., (and) [month]\n * | year(s)\n *\n *\n * Plus 0, 1, or multiple of these:\n *\n * on [weekday], ..., (or) [weekday] the [monthday], [monthday], ... (or) [monthday]\n *\n * on [weekday], ..., (and) [weekday]\n *\n * on the [monthday], [monthday], ... (and) [monthday] (day of the month)\n *\n * on the [nth-weekday], ..., (and) [nth-weekday] (of the month/year)\n *\n *\n * Plus 0 or 1 of these:\n *\n * for [n] time(s)\n *\n * until [date]\n *\n * Plus (.)\n *\n *\n * Definitely no supported for parsing:\n *\n * (for year):\n * in week(s) [n], ..., (and) [n]\n *\n * on the [yearday], ..., (and) [n] day of the year\n * on day [yearday], ..., (and) [n]\n *\n *\n * NON-TERMINALS\n *\n * [n]: 1, 2 ..., one, two, three ..\n * [month]: January, February, March, April, May, ... December\n * [weekday]: Monday, ... Sunday\n * [nth-weekday]: first [weekday], 2nd [weekday], ... last [weekday], ...\n * [monthday]: first, 1., 2., 1st, 2nd, second, ... 31st, last day, 2nd last day, ..\n * [date]:\n * - [month] (0-31(,) ([year])),\n * - (the) 0-31.(1-12.([year])),\n * - (the) 0-31/(1-12/([year])),\n * - [weekday]\n *\n * [year]: 0000, 0001, ... 01, 02, ..\n *\n * Definitely not supported for parsing:\n *\n * [yearday]: first, 1., 2., 1st, 2nd, second, ... 366th, last day, 2nd last day, ..\n *\n * @param {String} text\n * @return {Object, Boolean} the rule, or null.\n */\nvar fromText = function (text, language) {\n if (language === void 0) { language = ENGLISH; }\n return new RRule(parseText(text, language) || undefined);\n};\nvar common = [\n 'count',\n 'until',\n 'interval',\n 'byweekday',\n 'bymonthday',\n 'bymonth',\n];\nToText.IMPLEMENTED = [];\nToText.IMPLEMENTED[Frequency.HOURLY] = common;\nToText.IMPLEMENTED[Frequency.MINUTELY] = common;\nToText.IMPLEMENTED[Frequency.DAILY] = ['byhour'].concat(common);\nToText.IMPLEMENTED[Frequency.WEEKLY] = common;\nToText.IMPLEMENTED[Frequency.MONTHLY] = common;\nToText.IMPLEMENTED[Frequency.YEARLY] = ['byweekno', 'byyearday'].concat(common);\n// =============================================================================\n// Export\n// =============================================================================\nvar toText = function (rrule, gettext, language, dateFormatter) {\n return new ToText(rrule, gettext, language, dateFormatter).toString();\n};\nvar isFullyConvertible = ToText.isFullyConvertible;\nexport { fromText, parseText, isFullyConvertible, toText };\n//# sourceMappingURL=index.js.map","import { __extends } from \"tslib\";\nimport { Frequency } from './types';\nimport { pymod, divmod, empty, includes } from './helpers';\nimport { getWeekday, MAXYEAR, monthRange } from './dateutil';\nvar Time = /** @class */ (function () {\n function Time(hour, minute, second, millisecond) {\n this.hour = hour;\n this.minute = minute;\n this.second = second;\n this.millisecond = millisecond || 0;\n }\n Time.prototype.getHours = function () {\n return this.hour;\n };\n Time.prototype.getMinutes = function () {\n return this.minute;\n };\n Time.prototype.getSeconds = function () {\n return this.second;\n };\n Time.prototype.getMilliseconds = function () {\n return this.millisecond;\n };\n Time.prototype.getTime = function () {\n return ((this.hour * 60 * 60 + this.minute * 60 + this.second) * 1000 +\n this.millisecond);\n };\n return Time;\n}());\nexport { Time };\nvar DateTime = /** @class */ (function (_super) {\n __extends(DateTime, _super);\n function DateTime(year, month, day, hour, minute, second, millisecond) {\n var _this = _super.call(this, hour, minute, second, millisecond) || this;\n _this.year = year;\n _this.month = month;\n _this.day = day;\n return _this;\n }\n DateTime.fromDate = function (date) {\n return new this(date.getUTCFullYear(), date.getUTCMonth() + 1, date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), date.valueOf() % 1000);\n };\n DateTime.prototype.getWeekday = function () {\n return getWeekday(new Date(this.getTime()));\n };\n DateTime.prototype.getTime = function () {\n return new Date(Date.UTC(this.year, this.month - 1, this.day, this.hour, this.minute, this.second, this.millisecond)).getTime();\n };\n DateTime.prototype.getDay = function () {\n return this.day;\n };\n DateTime.prototype.getMonth = function () {\n return this.month;\n };\n DateTime.prototype.getYear = function () {\n return this.year;\n };\n DateTime.prototype.addYears = function (years) {\n this.year += years;\n };\n DateTime.prototype.addMonths = function (months) {\n this.month += months;\n if (this.month > 12) {\n var yearDiv = Math.floor(this.month / 12);\n var monthMod = pymod(this.month, 12);\n this.month = monthMod;\n this.year += yearDiv;\n if (this.month === 0) {\n this.month = 12;\n --this.year;\n }\n }\n };\n DateTime.prototype.addWeekly = function (days, wkst) {\n if (wkst > this.getWeekday()) {\n this.day += -(this.getWeekday() + 1 + (6 - wkst)) + days * 7;\n }\n else {\n this.day += -(this.getWeekday() - wkst) + days * 7;\n }\n this.fixDay();\n };\n DateTime.prototype.addDaily = function (days) {\n this.day += days;\n this.fixDay();\n };\n DateTime.prototype.addHours = function (hours, filtered, byhour) {\n if (filtered) {\n // Jump to one iteration before next day\n this.hour += Math.floor((23 - this.hour) / hours) * hours;\n }\n for (;;) {\n this.hour += hours;\n var _a = divmod(this.hour, 24), dayDiv = _a.div, hourMod = _a.mod;\n if (dayDiv) {\n this.hour = hourMod;\n this.addDaily(dayDiv);\n }\n if (empty(byhour) || includes(byhour, this.hour))\n break;\n }\n };\n DateTime.prototype.addMinutes = function (minutes, filtered, byhour, byminute) {\n if (filtered) {\n // Jump to one iteration before next day\n this.minute +=\n Math.floor((1439 - (this.hour * 60 + this.minute)) / minutes) * minutes;\n }\n for (;;) {\n this.minute += minutes;\n var _a = divmod(this.minute, 60), hourDiv = _a.div, minuteMod = _a.mod;\n if (hourDiv) {\n this.minute = minuteMod;\n this.addHours(hourDiv, false, byhour);\n }\n if ((empty(byhour) || includes(byhour, this.hour)) &&\n (empty(byminute) || includes(byminute, this.minute))) {\n break;\n }\n }\n };\n DateTime.prototype.addSeconds = function (seconds, filtered, byhour, byminute, bysecond) {\n if (filtered) {\n // Jump to one iteration before next day\n this.second +=\n Math.floor((86399 - (this.hour * 3600 + this.minute * 60 + this.second)) /\n seconds) * seconds;\n }\n for (;;) {\n this.second += seconds;\n var _a = divmod(this.second, 60), minuteDiv = _a.div, secondMod = _a.mod;\n if (minuteDiv) {\n this.second = secondMod;\n this.addMinutes(minuteDiv, false, byhour, byminute);\n }\n if ((empty(byhour) || includes(byhour, this.hour)) &&\n (empty(byminute) || includes(byminute, this.minute)) &&\n (empty(bysecond) || includes(bysecond, this.second))) {\n break;\n }\n }\n };\n DateTime.prototype.fixDay = function () {\n if (this.day <= 28) {\n return;\n }\n var daysinmonth = monthRange(this.year, this.month - 1)[1];\n if (this.day <= daysinmonth) {\n return;\n }\n while (this.day > daysinmonth) {\n this.day -= daysinmonth;\n ++this.month;\n if (this.month === 13) {\n this.month = 1;\n ++this.year;\n if (this.year > MAXYEAR) {\n return;\n }\n }\n daysinmonth = monthRange(this.year, this.month - 1)[1];\n }\n };\n DateTime.prototype.add = function (options, filtered) {\n var freq = options.freq, interval = options.interval, wkst = options.wkst, byhour = options.byhour, byminute = options.byminute, bysecond = options.bysecond;\n switch (freq) {\n case Frequency.YEARLY:\n return this.addYears(interval);\n case Frequency.MONTHLY:\n return this.addMonths(interval);\n case Frequency.WEEKLY:\n return this.addWeekly(interval, wkst);\n case Frequency.DAILY:\n return this.addDaily(interval);\n case Frequency.HOURLY:\n return this.addHours(interval, filtered, byhour);\n case Frequency.MINUTELY:\n return this.addMinutes(interval, filtered, byhour, byminute);\n case Frequency.SECONDLY:\n return this.addSeconds(interval, filtered, byhour, byminute, bysecond);\n }\n };\n return DateTime;\n}(Time));\nexport { DateTime };\n//# sourceMappingURL=datetime.js.map","import { __assign } from \"tslib\";\nimport { freqIsDailyOrGreater } from './types';\nimport { includes, notEmpty, isPresent, isNumber, isArray, isWeekdayStr, } from './helpers';\nimport { RRule, defaultKeys, DEFAULT_OPTIONS } from './rrule';\nimport { getWeekday, isDate, isValidDate } from './dateutil';\nimport { Weekday } from './weekday';\nimport { Time } from './datetime';\nexport function initializeOptions(options) {\n var invalid = [];\n var keys = Object.keys(options);\n // Shallow copy for options and origOptions and check for invalid\n for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {\n var key = keys_1[_i];\n if (!includes(defaultKeys, key))\n invalid.push(key);\n if (isDate(options[key]) && !isValidDate(options[key])) {\n invalid.push(key);\n }\n }\n if (invalid.length) {\n throw new Error('Invalid options: ' + invalid.join(', '));\n }\n return __assign({}, options);\n}\nexport function parseOptions(options) {\n var opts = __assign(__assign({}, DEFAULT_OPTIONS), initializeOptions(options));\n if (isPresent(opts.byeaster))\n opts.freq = RRule.YEARLY;\n if (!(isPresent(opts.freq) && RRule.FREQUENCIES[opts.freq])) {\n throw new Error(\"Invalid frequency: \".concat(opts.freq, \" \").concat(options.freq));\n }\n if (!opts.dtstart)\n opts.dtstart = new Date(new Date().setMilliseconds(0));\n if (!isPresent(opts.wkst)) {\n opts.wkst = RRule.MO.weekday;\n }\n else if (isNumber(opts.wkst)) {\n // cool, just keep it like that\n }\n else {\n opts.wkst = opts.wkst.weekday;\n }\n if (isPresent(opts.bysetpos)) {\n if (isNumber(opts.bysetpos))\n opts.bysetpos = [opts.bysetpos];\n for (var i = 0; i < opts.bysetpos.length; i++) {\n var v = opts.bysetpos[i];\n if (v === 0 || !(v >= -366 && v <= 366)) {\n throw new Error('bysetpos must be between 1 and 366,' + ' or between -366 and -1');\n }\n }\n }\n if (!(Boolean(opts.byweekno) ||\n notEmpty(opts.byweekno) ||\n notEmpty(opts.byyearday) ||\n Boolean(opts.bymonthday) ||\n notEmpty(opts.bymonthday) ||\n isPresent(opts.byweekday) ||\n isPresent(opts.byeaster))) {\n switch (opts.freq) {\n case RRule.YEARLY:\n if (!opts.bymonth)\n opts.bymonth = opts.dtstart.getUTCMonth() + 1;\n opts.bymonthday = opts.dtstart.getUTCDate();\n break;\n case RRule.MONTHLY:\n opts.bymonthday = opts.dtstart.getUTCDate();\n break;\n case RRule.WEEKLY:\n opts.byweekday = [getWeekday(opts.dtstart)];\n break;\n }\n }\n // bymonth\n if (isPresent(opts.bymonth) && !isArray(opts.bymonth)) {\n opts.bymonth = [opts.bymonth];\n }\n // byyearday\n if (isPresent(opts.byyearday) &&\n !isArray(opts.byyearday) &&\n isNumber(opts.byyearday)) {\n opts.byyearday = [opts.byyearday];\n }\n // bymonthday\n if (!isPresent(opts.bymonthday)) {\n opts.bymonthday = [];\n opts.bynmonthday = [];\n }\n else if (isArray(opts.bymonthday)) {\n var bymonthday = [];\n var bynmonthday = [];\n for (var i = 0; i < opts.bymonthday.length; i++) {\n var v = opts.bymonthday[i];\n if (v > 0) {\n bymonthday.push(v);\n }\n else if (v < 0) {\n bynmonthday.push(v);\n }\n }\n opts.bymonthday = bymonthday;\n opts.bynmonthday = bynmonthday;\n }\n else if (opts.bymonthday < 0) {\n opts.bynmonthday = [opts.bymonthday];\n opts.bymonthday = [];\n }\n else {\n opts.bynmonthday = [];\n opts.bymonthday = [opts.bymonthday];\n }\n // byweekno\n if (isPresent(opts.byweekno) && !isArray(opts.byweekno)) {\n opts.byweekno = [opts.byweekno];\n }\n // byweekday / bynweekday\n if (!isPresent(opts.byweekday)) {\n opts.bynweekday = null;\n }\n else if (isNumber(opts.byweekday)) {\n opts.byweekday = [opts.byweekday];\n opts.bynweekday = null;\n }\n else if (isWeekdayStr(opts.byweekday)) {\n opts.byweekday = [Weekday.fromStr(opts.byweekday).weekday];\n opts.bynweekday = null;\n }\n else if (opts.byweekday instanceof Weekday) {\n if (!opts.byweekday.n || opts.freq > RRule.MONTHLY) {\n opts.byweekday = [opts.byweekday.weekday];\n opts.bynweekday = null;\n }\n else {\n opts.bynweekday = [[opts.byweekday.weekday, opts.byweekday.n]];\n opts.byweekday = null;\n }\n }\n else {\n var byweekday = [];\n var bynweekday = [];\n for (var i = 0; i < opts.byweekday.length; i++) {\n var wday = opts.byweekday[i];\n if (isNumber(wday)) {\n byweekday.push(wday);\n continue;\n }\n else if (isWeekdayStr(wday)) {\n byweekday.push(Weekday.fromStr(wday).weekday);\n continue;\n }\n if (!wday.n || opts.freq > RRule.MONTHLY) {\n byweekday.push(wday.weekday);\n }\n else {\n bynweekday.push([wday.weekday, wday.n]);\n }\n }\n opts.byweekday = notEmpty(byweekday) ? byweekday : null;\n opts.bynweekday = notEmpty(bynweekday) ? bynweekday : null;\n }\n // byhour\n if (!isPresent(opts.byhour)) {\n opts.byhour = opts.freq < RRule.HOURLY ? [opts.dtstart.getUTCHours()] : null;\n }\n else if (isNumber(opts.byhour)) {\n opts.byhour = [opts.byhour];\n }\n // byminute\n if (!isPresent(opts.byminute)) {\n opts.byminute =\n opts.freq < RRule.MINUTELY ? [opts.dtstart.getUTCMinutes()] : null;\n }\n else if (isNumber(opts.byminute)) {\n opts.byminute = [opts.byminute];\n }\n // bysecond\n if (!isPresent(opts.bysecond)) {\n opts.bysecond =\n opts.freq < RRule.SECONDLY ? [opts.dtstart.getUTCSeconds()] : null;\n }\n else if (isNumber(opts.bysecond)) {\n opts.bysecond = [opts.bysecond];\n }\n return { parsedOptions: opts };\n}\nexport function buildTimeset(opts) {\n var millisecondModulo = opts.dtstart.getTime() % 1000;\n if (!freqIsDailyOrGreater(opts.freq)) {\n return [];\n }\n var timeset = [];\n opts.byhour.forEach(function (hour) {\n opts.byminute.forEach(function (minute) {\n opts.bysecond.forEach(function (second) {\n timeset.push(new Time(hour, minute, second, millisecondModulo));\n });\n });\n });\n return timeset;\n}\n//# sourceMappingURL=parseoptions.js.map","import { __assign } from \"tslib\";\nimport { Frequency } from './types';\nimport { Weekday } from './weekday';\nimport { untilStringToDate } from './dateutil';\nimport { Days } from './rrule';\nexport function parseString(rfcString) {\n var options = rfcString\n .split('\\n')\n .map(parseLine)\n .filter(function (x) { return x !== null; });\n return __assign(__assign({}, options[0]), options[1]);\n}\nexport function parseDtstart(line) {\n var options = {};\n var dtstartWithZone = /DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\\s]+)/i.exec(line);\n if (!dtstartWithZone) {\n return options;\n }\n var tzid = dtstartWithZone[1], dtstart = dtstartWithZone[2];\n if (tzid) {\n options.tzid = tzid;\n }\n options.dtstart = untilStringToDate(dtstart);\n return options;\n}\nfunction parseLine(rfcString) {\n rfcString = rfcString.replace(/^\\s+|\\s+$/, '');\n if (!rfcString.length)\n return null;\n var header = /^([A-Z]+?)[:;]/.exec(rfcString.toUpperCase());\n if (!header) {\n return parseRrule(rfcString);\n }\n var key = header[1];\n switch (key.toUpperCase()) {\n case 'RRULE':\n case 'EXRULE':\n return parseRrule(rfcString);\n case 'DTSTART':\n return parseDtstart(rfcString);\n default:\n throw new Error(\"Unsupported RFC prop \".concat(key, \" in \").concat(rfcString));\n }\n}\nfunction parseRrule(line) {\n var strippedLine = line.replace(/^RRULE:/i, '');\n var options = parseDtstart(strippedLine);\n var attrs = line.replace(/^(?:RRULE|EXRULE):/i, '').split(';');\n attrs.forEach(function (attr) {\n var _a = attr.split('='), key = _a[0], value = _a[1];\n switch (key.toUpperCase()) {\n case 'FREQ':\n options.freq = Frequency[value.toUpperCase()];\n break;\n case 'WKST':\n options.wkst = Days[value.toUpperCase()];\n break;\n case 'COUNT':\n case 'INTERVAL':\n case 'BYSETPOS':\n case 'BYMONTH':\n case 'BYMONTHDAY':\n case 'BYYEARDAY':\n case 'BYWEEKNO':\n case 'BYHOUR':\n case 'BYMINUTE':\n case 'BYSECOND':\n var num = parseNumber(value);\n var optionKey = key.toLowerCase();\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n options[optionKey] = num;\n break;\n case 'BYWEEKDAY':\n case 'BYDAY':\n options.byweekday = parseWeekday(value);\n break;\n case 'DTSTART':\n case 'TZID':\n // for backwards compatibility\n var dtstart = parseDtstart(line);\n options.tzid = dtstart.tzid;\n options.dtstart = dtstart.dtstart;\n break;\n case 'UNTIL':\n options.until = untilStringToDate(value);\n break;\n case 'BYEASTER':\n options.byeaster = Number(value);\n break;\n default:\n throw new Error(\"Unknown RRULE property '\" + key + \"'\");\n }\n });\n return options;\n}\nfunction parseNumber(value) {\n if (value.indexOf(',') !== -1) {\n var values = value.split(',');\n return values.map(parseIndividualNumber);\n }\n return parseIndividualNumber(value);\n}\nfunction parseIndividualNumber(value) {\n if (/^[+-]?\\d+$/.test(value)) {\n return Number(value);\n }\n return value;\n}\nfunction parseWeekday(value) {\n var days = value.split(',');\n return days.map(function (day) {\n if (day.length === 2) {\n // MO, TU, ...\n return Days[day]; // wday instanceof Weekday\n }\n // -1MO, +3FR, 1SO, 13TU ...\n var parts = day.match(/^([+-]?\\d{1,2})([A-Z]{2})$/);\n if (!parts || parts.length < 3) {\n throw new SyntaxError(\"Invalid weekday string: \".concat(day));\n }\n var n = Number(parts[1]);\n var wdaypart = parts[2];\n var wday = Days[wdaypart].weekday;\n return new Weekday(wday, n);\n });\n}\n//# sourceMappingURL=parsestring.js.map","import { dateInTimeZone, timeToUntilString } from './dateutil';\nvar DateWithZone = /** @class */ (function () {\n function DateWithZone(date, tzid) {\n if (isNaN(date.getTime())) {\n throw new RangeError('Invalid date passed to DateWithZone');\n }\n this.date = date;\n this.tzid = tzid;\n }\n Object.defineProperty(DateWithZone.prototype, \"isUTC\", {\n get: function () {\n return !this.tzid || this.tzid.toUpperCase() === 'UTC';\n },\n enumerable: false,\n configurable: true\n });\n DateWithZone.prototype.toString = function () {\n var datestr = timeToUntilString(this.date.getTime(), this.isUTC);\n if (!this.isUTC) {\n return \";TZID=\".concat(this.tzid, \":\").concat(datestr);\n }\n return \":\".concat(datestr);\n };\n DateWithZone.prototype.getTime = function () {\n return this.date.getTime();\n };\n DateWithZone.prototype.rezonedDate = function () {\n if (this.isUTC) {\n return this.date;\n }\n return dateInTimeZone(this.date, this.tzid);\n };\n return DateWithZone;\n}());\nexport { DateWithZone };\n//# sourceMappingURL=datewithzone.js.map","import { RRule, DEFAULT_OPTIONS } from './rrule';\nimport { includes, isPresent, isArray, isNumber, toArray } from './helpers';\nimport { Weekday } from './weekday';\nimport { timeToUntilString } from './dateutil';\nimport { DateWithZone } from './datewithzone';\nexport function optionsToString(options) {\n var rrule = [];\n var dtstart = '';\n var keys = Object.keys(options);\n var defaultKeys = Object.keys(DEFAULT_OPTIONS);\n for (var i = 0; i < keys.length; i++) {\n if (keys[i] === 'tzid')\n continue;\n if (!includes(defaultKeys, keys[i]))\n continue;\n var key = keys[i].toUpperCase();\n var value = options[keys[i]];\n var outValue = '';\n if (!isPresent(value) || (isArray(value) && !value.length))\n continue;\n switch (key) {\n case 'FREQ':\n outValue = RRule.FREQUENCIES[options.freq];\n break;\n case 'WKST':\n if (isNumber(value)) {\n outValue = new Weekday(value).toString();\n }\n else {\n outValue = value.toString();\n }\n break;\n case 'BYWEEKDAY':\n /*\n NOTE: BYWEEKDAY is a special case.\n RRule() deconstructs the rule.options.byweekday array\n into an array of Weekday arguments.\n On the other hand, rule.origOptions is an array of Weekdays.\n We need to handle both cases here.\n It might be worth change RRule to keep the Weekdays.\n \n Also, BYWEEKDAY (used by RRule) vs. BYDAY (RFC)\n \n */\n key = 'BYDAY';\n outValue = toArray(value)\n .map(function (wday) {\n if (wday instanceof Weekday) {\n return wday;\n }\n if (isArray(wday)) {\n return new Weekday(wday[0], wday[1]);\n }\n return new Weekday(wday);\n })\n .toString();\n break;\n case 'DTSTART':\n dtstart = buildDtstart(value, options.tzid);\n break;\n case 'UNTIL':\n outValue = timeToUntilString(value, !options.tzid);\n break;\n default:\n if (isArray(value)) {\n var strValues = [];\n for (var j = 0; j < value.length; j++) {\n strValues[j] = String(value[j]);\n }\n outValue = strValues.toString();\n }\n else {\n outValue = String(value);\n }\n }\n if (outValue) {\n rrule.push([key, outValue]);\n }\n }\n var rules = rrule\n .map(function (_a) {\n var key = _a[0], value = _a[1];\n return \"\".concat(key, \"=\").concat(value.toString());\n })\n .join(';');\n var ruleString = '';\n if (rules !== '') {\n ruleString = \"RRULE:\".concat(rules);\n }\n return [dtstart, ruleString].filter(function (x) { return !!x; }).join('\\n');\n}\nfunction buildDtstart(dtstart, tzid) {\n if (!dtstart) {\n return '';\n }\n return 'DTSTART' + new DateWithZone(new Date(dtstart), tzid).toString();\n}\n//# sourceMappingURL=optionstostring.js.map","import IterResult from './iterresult';\nimport { clone, cloneDates } from './dateutil';\nimport { isArray } from './helpers';\nfunction argsMatch(left, right) {\n if (Array.isArray(left)) {\n if (!Array.isArray(right))\n return false;\n if (left.length !== right.length)\n return false;\n return left.every(function (date, i) { return date.getTime() === right[i].getTime(); });\n }\n if (left instanceof Date) {\n return right instanceof Date && left.getTime() === right.getTime();\n }\n return left === right;\n}\nvar Cache = /** @class */ (function () {\n function Cache() {\n this.all = false;\n this.before = [];\n this.after = [];\n this.between = [];\n }\n /**\n * @param {String} what - all/before/after/between\n * @param {Array,Date} value - an array of dates, one date, or null\n * @param {Object?} args - _iter arguments\n */\n Cache.prototype._cacheAdd = function (what, value, args) {\n if (value) {\n value = value instanceof Date ? clone(value) : cloneDates(value);\n }\n if (what === 'all') {\n this.all = value;\n }\n else {\n args._value = value;\n this[what].push(args);\n }\n };\n /**\n * @return false - not in the cache\n * @return null - cached, but zero occurrences (before/after)\n * @return Date - cached (before/after)\n * @return [] - cached, but zero occurrences (all/between)\n * @return [Date1, DateN] - cached (all/between)\n */\n Cache.prototype._cacheGet = function (what, args) {\n var cached = false;\n var argsKeys = args ? Object.keys(args) : [];\n var findCacheDiff = function (item) {\n for (var i = 0; i < argsKeys.length; i++) {\n var key = argsKeys[i];\n if (!argsMatch(args[key], item[key])) {\n return true;\n }\n }\n return false;\n };\n var cachedObject = this[what];\n if (what === 'all') {\n cached = this.all;\n }\n else if (isArray(cachedObject)) {\n // Let's see whether we've already called the\n // 'what' method with the same 'args'\n for (var i = 0; i < cachedObject.length; i++) {\n var item = cachedObject[i];\n if (argsKeys.length && findCacheDiff(item))\n continue;\n cached = item._value;\n break;\n }\n }\n if (!cached && this.all) {\n // Not in the cache, but we already know all the occurrences,\n // so we can find the correct dates from the cached ones.\n var iterResult = new IterResult(what, args);\n for (var i = 0; i < this.all.length; i++) {\n if (!iterResult.accept(this.all[i]))\n break;\n }\n cached = iterResult.getValue();\n this._cacheAdd(what, cached, args);\n }\n return isArray(cached)\n ? cloneDates(cached)\n : cached instanceof Date\n ? clone(cached)\n : cached;\n };\n return Cache;\n}());\nexport { Cache };\n//# sourceMappingURL=cache.js.map","import { __spreadArray } from \"tslib\";\nimport { range, repeat } from './helpers';\n// =============================================================================\n// Date masks\n// =============================================================================\n// Every mask is 7 days longer to handle cross-year weekly periods.\nvar M365MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], repeat(1, 31), true), repeat(2, 28), true), repeat(3, 31), true), repeat(4, 30), true), repeat(5, 31), true), repeat(6, 30), true), repeat(7, 31), true), repeat(8, 31), true), repeat(9, 30), true), repeat(10, 31), true), repeat(11, 30), true), repeat(12, 31), true), repeat(1, 7), true);\nvar M366MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], repeat(1, 31), true), repeat(2, 29), true), repeat(3, 31), true), repeat(4, 30), true), repeat(5, 31), true), repeat(6, 30), true), repeat(7, 31), true), repeat(8, 31), true), repeat(9, 30), true), repeat(10, 31), true), repeat(11, 30), true), repeat(12, 31), true), repeat(1, 7), true);\nvar M28 = range(1, 29);\nvar M29 = range(1, 30);\nvar M30 = range(1, 31);\nvar M31 = range(1, 32);\nvar MDAY366MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], M31, true), M29, true), M31, true), M30, true), M31, true), M30, true), M31, true), M31, true), M30, true), M31, true), M30, true), M31, true), M31.slice(0, 7), true);\nvar MDAY365MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], M31, true), M28, true), M31, true), M30, true), M31, true), M30, true), M31, true), M31, true), M30, true), M31, true), M30, true), M31, true), M31.slice(0, 7), true);\nvar NM28 = range(-28, 0);\nvar NM29 = range(-29, 0);\nvar NM30 = range(-30, 0);\nvar NM31 = range(-31, 0);\nvar NMDAY366MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], NM31, true), NM29, true), NM31, true), NM30, true), NM31, true), NM30, true), NM31, true), NM31, true), NM30, true), NM31, true), NM30, true), NM31, true), NM31.slice(0, 7), true);\nvar NMDAY365MASK = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], NM31, true), NM28, true), NM31, true), NM30, true), NM31, true), NM30, true), NM31, true), NM31, true), NM30, true), NM31, true), NM30, true), NM31, true), NM31.slice(0, 7), true);\nvar M366RANGE = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366];\nvar M365RANGE = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365];\nvar WDAYMASK = (function () {\n var wdaymask = [];\n for (var i = 0; i < 55; i++)\n wdaymask = wdaymask.concat(range(7));\n return wdaymask;\n})();\nexport { WDAYMASK, M365MASK, M365RANGE, M366MASK, M366RANGE, MDAY365MASK, MDAY366MASK, NMDAY365MASK, NMDAY366MASK, };\n//# sourceMappingURL=masks.js.map","import { __assign } from \"tslib\";\nimport { datetime, getWeekday, isLeapYear, toOrdinal } from '../dateutil';\nimport { empty, repeat, pymod, includes } from '../helpers';\nimport { M365MASK, MDAY365MASK, NMDAY365MASK, WDAYMASK, M365RANGE, M366MASK, MDAY366MASK, NMDAY366MASK, M366RANGE, } from '../masks';\nexport function rebuildYear(year, options) {\n var firstyday = datetime(year, 1, 1);\n var yearlen = isLeapYear(year) ? 366 : 365;\n var nextyearlen = isLeapYear(year + 1) ? 366 : 365;\n var yearordinal = toOrdinal(firstyday);\n var yearweekday = getWeekday(firstyday);\n var result = __assign(__assign({ yearlen: yearlen, nextyearlen: nextyearlen, yearordinal: yearordinal, yearweekday: yearweekday }, baseYearMasks(year)), { wnomask: null });\n if (empty(options.byweekno)) {\n return result;\n }\n result.wnomask = repeat(0, yearlen + 7);\n var firstwkst;\n var wyearlen;\n var no1wkst = (firstwkst = pymod(7 - yearweekday + options.wkst, 7));\n if (no1wkst >= 4) {\n no1wkst = 0;\n // Number of days in the year, plus the days we got\n // from last year.\n wyearlen = result.yearlen + pymod(yearweekday - options.wkst, 7);\n }\n else {\n // Number of days in the year, minus the days we\n // left in last year.\n wyearlen = yearlen - no1wkst;\n }\n var div = Math.floor(wyearlen / 7);\n var mod = pymod(wyearlen, 7);\n var numweeks = Math.floor(div + mod / 4);\n for (var j = 0; j < options.byweekno.length; j++) {\n var n = options.byweekno[j];\n if (n < 0) {\n n += numweeks + 1;\n }\n if (!(n > 0 && n <= numweeks)) {\n continue;\n }\n var i = void 0;\n if (n > 1) {\n i = no1wkst + (n - 1) * 7;\n if (no1wkst !== firstwkst) {\n i -= 7 - firstwkst;\n }\n }\n else {\n i = no1wkst;\n }\n for (var k = 0; k < 7; k++) {\n result.wnomask[i] = 1;\n i++;\n if (result.wdaymask[i] === options.wkst)\n break;\n }\n }\n if (includes(options.byweekno, 1)) {\n // Check week number 1 of next year as well\n // orig-TODO : Check -numweeks for next year.\n var i = no1wkst + numweeks * 7;\n if (no1wkst !== firstwkst)\n i -= 7 - firstwkst;\n if (i < yearlen) {\n // If week starts in next year, we\n // don't care about it.\n for (var j = 0; j < 7; j++) {\n result.wnomask[i] = 1;\n i += 1;\n if (result.wdaymask[i] === options.wkst)\n break;\n }\n }\n }\n if (no1wkst) {\n // Check last week number of last year as\n // well. If no1wkst is 0, either the year\n // started on week start, or week number 1\n // got days from last year, so there are no\n // days from last year's last week number in\n // this year.\n var lnumweeks = void 0;\n if (!includes(options.byweekno, -1)) {\n var lyearweekday = getWeekday(datetime(year - 1, 1, 1));\n var lno1wkst = pymod(7 - lyearweekday.valueOf() + options.wkst, 7);\n var lyearlen = isLeapYear(year - 1) ? 366 : 365;\n var weekst = void 0;\n if (lno1wkst >= 4) {\n lno1wkst = 0;\n weekst = lyearlen + pymod(lyearweekday - options.wkst, 7);\n }\n else {\n weekst = yearlen - no1wkst;\n }\n lnumweeks = Math.floor(52 + pymod(weekst, 7) / 4);\n }\n else {\n lnumweeks = -1;\n }\n if (includes(options.byweekno, lnumweeks)) {\n for (var i = 0; i < no1wkst; i++)\n result.wnomask[i] = 1;\n }\n }\n return result;\n}\nfunction baseYearMasks(year) {\n var yearlen = isLeapYear(year) ? 366 : 365;\n var firstyday = datetime(year, 1, 1);\n var wday = getWeekday(firstyday);\n if (yearlen === 365) {\n return {\n mmask: M365MASK,\n mdaymask: MDAY365MASK,\n nmdaymask: NMDAY365MASK,\n wdaymask: WDAYMASK.slice(wday),\n mrange: M365RANGE,\n };\n }\n return {\n mmask: M366MASK,\n mdaymask: MDAY366MASK,\n nmdaymask: NMDAY366MASK,\n wdaymask: WDAYMASK.slice(wday),\n mrange: M366RANGE,\n };\n}\n//# sourceMappingURL=yearinfo.js.map","import { RRule } from '../rrule';\nimport { empty, repeat, pymod } from '../helpers';\nexport function rebuildMonth(year, month, yearlen, mrange, wdaymask, options) {\n var result = {\n lastyear: year,\n lastmonth: month,\n nwdaymask: [],\n };\n var ranges = [];\n if (options.freq === RRule.YEARLY) {\n if (empty(options.bymonth)) {\n ranges = [[0, yearlen]];\n }\n else {\n for (var j = 0; j < options.bymonth.length; j++) {\n month = options.bymonth[j];\n ranges.push(mrange.slice(month - 1, month + 1));\n }\n }\n }\n else if (options.freq === RRule.MONTHLY) {\n ranges = [mrange.slice(month - 1, month + 1)];\n }\n if (empty(ranges)) {\n return result;\n }\n // Weekly frequency won't get here, so we may not\n // care about cross-year weekly periods.\n result.nwdaymask = repeat(0, yearlen);\n for (var j = 0; j < ranges.length; j++) {\n var rang = ranges[j];\n var first = rang[0];\n var last = rang[1] - 1;\n for (var k = 0; k < options.bynweekday.length; k++) {\n var i = void 0;\n var _a = options.bynweekday[k], wday = _a[0], n = _a[1];\n if (n < 0) {\n i = last + (n + 1) * 7;\n i -= pymod(wdaymask[i] - wday, 7);\n }\n else {\n i = first + (n - 1) * 7;\n i += pymod(7 - wdaymask[i] + wday, 7);\n }\n if (first <= i && i <= last)\n result.nwdaymask[i] = 1;\n }\n }\n return result;\n}\n//# sourceMappingURL=monthinfo.js.map","export function easter(y, offset) {\n if (offset === void 0) { offset = 0; }\n var a = y % 19;\n var b = Math.floor(y / 100);\n var c = y % 100;\n var d = Math.floor(b / 4);\n var e = b % 4;\n var f = Math.floor((b + 8) / 25);\n var g = Math.floor((b - f + 1) / 3);\n var h = Math.floor(19 * a + b - d - g + 15) % 30;\n var i = Math.floor(c / 4);\n var k = c % 4;\n var l = Math.floor(32 + 2 * e + 2 * i - h - k) % 7;\n var m = Math.floor((a + 11 * h + 22 * l) / 451);\n var month = Math.floor((h + l - 7 * m + 114) / 31);\n var day = ((h + l - 7 * m + 114) % 31) + 1;\n var date = Date.UTC(y, month - 1, day + offset);\n var yearStart = Date.UTC(y, 0, 1);\n return [Math.ceil((date - yearStart) / (1000 * 60 * 60 * 24))];\n}\n//# sourceMappingURL=easter.js.map","import { notEmpty, repeat, range, isPresent } from '../helpers';\nimport { Frequency } from '../types';\nimport { rebuildYear } from './yearinfo';\nimport { rebuildMonth } from './monthinfo';\nimport { easter } from './easter';\nimport { Time } from '../datetime';\nimport { datetime, sort, toOrdinal } from '../dateutil';\n// =============================================================================\n// Iterinfo\n// =============================================================================\nvar Iterinfo = /** @class */ (function () {\n // eslint-disable-next-line no-empty-function\n function Iterinfo(options) {\n this.options = options;\n }\n Iterinfo.prototype.rebuild = function (year, month) {\n var options = this.options;\n if (year !== this.lastyear) {\n this.yearinfo = rebuildYear(year, options);\n }\n if (notEmpty(options.bynweekday) &&\n (month !== this.lastmonth || year !== this.lastyear)) {\n var _a = this.yearinfo, yearlen = _a.yearlen, mrange = _a.mrange, wdaymask = _a.wdaymask;\n this.monthinfo = rebuildMonth(year, month, yearlen, mrange, wdaymask, options);\n }\n if (isPresent(options.byeaster)) {\n this.eastermask = easter(year, options.byeaster);\n }\n };\n Object.defineProperty(Iterinfo.prototype, \"lastyear\", {\n get: function () {\n return this.monthinfo ? this.monthinfo.lastyear : null;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"lastmonth\", {\n get: function () {\n return this.monthinfo ? this.monthinfo.lastmonth : null;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"yearlen\", {\n get: function () {\n return this.yearinfo.yearlen;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"yearordinal\", {\n get: function () {\n return this.yearinfo.yearordinal;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"mrange\", {\n get: function () {\n return this.yearinfo.mrange;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"wdaymask\", {\n get: function () {\n return this.yearinfo.wdaymask;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"mmask\", {\n get: function () {\n return this.yearinfo.mmask;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"wnomask\", {\n get: function () {\n return this.yearinfo.wnomask;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"nwdaymask\", {\n get: function () {\n return this.monthinfo ? this.monthinfo.nwdaymask : [];\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"nextyearlen\", {\n get: function () {\n return this.yearinfo.nextyearlen;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"mdaymask\", {\n get: function () {\n return this.yearinfo.mdaymask;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Iterinfo.prototype, \"nmdaymask\", {\n get: function () {\n return this.yearinfo.nmdaymask;\n },\n enumerable: false,\n configurable: true\n });\n Iterinfo.prototype.ydayset = function () {\n return [range(this.yearlen), 0, this.yearlen];\n };\n Iterinfo.prototype.mdayset = function (_, month) {\n var start = this.mrange[month - 1];\n var end = this.mrange[month];\n var set = repeat(null, this.yearlen);\n for (var i = start; i < end; i++)\n set[i] = i;\n return [set, start, end];\n };\n Iterinfo.prototype.wdayset = function (year, month, day) {\n // We need to handle cross-year weeks here.\n var set = repeat(null, this.yearlen + 7);\n var i = toOrdinal(datetime(year, month, day)) - this.yearordinal;\n var start = i;\n for (var j = 0; j < 7; j++) {\n set[i] = i;\n ++i;\n if (this.wdaymask[i] === this.options.wkst)\n break;\n }\n return [set, start, i];\n };\n Iterinfo.prototype.ddayset = function (year, month, day) {\n var set = repeat(null, this.yearlen);\n var i = toOrdinal(datetime(year, month, day)) - this.yearordinal;\n set[i] = i;\n return [set, i, i + 1];\n };\n Iterinfo.prototype.htimeset = function (hour, _, second, millisecond) {\n var _this = this;\n var set = [];\n this.options.byminute.forEach(function (minute) {\n set = set.concat(_this.mtimeset(hour, minute, second, millisecond));\n });\n sort(set);\n return set;\n };\n Iterinfo.prototype.mtimeset = function (hour, minute, _, millisecond) {\n var set = this.options.bysecond.map(function (second) { return new Time(hour, minute, second, millisecond); });\n sort(set);\n return set;\n };\n Iterinfo.prototype.stimeset = function (hour, minute, second, millisecond) {\n return [new Time(hour, minute, second, millisecond)];\n };\n Iterinfo.prototype.getdayset = function (freq) {\n switch (freq) {\n case Frequency.YEARLY:\n return this.ydayset.bind(this);\n case Frequency.MONTHLY:\n return this.mdayset.bind(this);\n case Frequency.WEEKLY:\n return this.wdayset.bind(this);\n case Frequency.DAILY:\n return this.ddayset.bind(this);\n default:\n return this.ddayset.bind(this);\n }\n };\n Iterinfo.prototype.gettimeset = function (freq) {\n switch (freq) {\n case Frequency.HOURLY:\n return this.htimeset.bind(this);\n case Frequency.MINUTELY:\n return this.mtimeset.bind(this);\n case Frequency.SECONDLY:\n return this.stimeset.bind(this);\n }\n };\n return Iterinfo;\n}());\nexport default Iterinfo;\n//# sourceMappingURL=index.js.map","import { combine, fromOrdinal, sort } from '../dateutil';\nimport { pymod, isPresent, includes } from '../helpers';\nexport function buildPoslist(bysetpos, timeset, start, end, ii, dayset) {\n var poslist = [];\n for (var j = 0; j < bysetpos.length; j++) {\n var daypos = void 0;\n var timepos = void 0;\n var pos = bysetpos[j];\n if (pos < 0) {\n daypos = Math.floor(pos / timeset.length);\n timepos = pymod(pos, timeset.length);\n }\n else {\n daypos = Math.floor((pos - 1) / timeset.length);\n timepos = pymod(pos - 1, timeset.length);\n }\n var tmp = [];\n for (var k = start; k < end; k++) {\n var val = dayset[k];\n if (!isPresent(val))\n continue;\n tmp.push(val);\n }\n var i = void 0;\n if (daypos < 0) {\n i = tmp.slice(daypos)[0];\n }\n else {\n i = tmp[daypos];\n }\n var time = timeset[timepos];\n var date = fromOrdinal(ii.yearordinal + i);\n var res = combine(date, time);\n // XXX: can this ever be in the array?\n // - compare the actual date instead?\n if (!includes(poslist, res))\n poslist.push(res);\n }\n sort(poslist);\n return poslist;\n}\n//# sourceMappingURL=poslist.js.map","import { freqIsDailyOrGreater } from '../types';\nimport { combine, fromOrdinal, MAXYEAR } from '../dateutil';\nimport Iterinfo from '../iterinfo/index';\nimport { RRule } from '../rrule';\nimport { buildTimeset } from '../parseoptions';\nimport { notEmpty, includes, isPresent } from '../helpers';\nimport { DateWithZone } from '../datewithzone';\nimport { buildPoslist } from './poslist';\nimport { DateTime } from '../datetime';\nexport function iter(iterResult, options) {\n var dtstart = options.dtstart, freq = options.freq, interval = options.interval, until = options.until, bysetpos = options.bysetpos;\n var count = options.count;\n if (count === 0 || interval === 0) {\n return emitResult(iterResult);\n }\n var counterDate = DateTime.fromDate(dtstart);\n var ii = new Iterinfo(options);\n ii.rebuild(counterDate.year, counterDate.month);\n var timeset = makeTimeset(ii, counterDate, options);\n for (;;) {\n var _a = ii.getdayset(freq)(counterDate.year, counterDate.month, counterDate.day), dayset = _a[0], start = _a[1], end = _a[2];\n var filtered = removeFilteredDays(dayset, start, end, ii, options);\n if (notEmpty(bysetpos)) {\n var poslist = buildPoslist(bysetpos, timeset, start, end, ii, dayset);\n for (var j = 0; j < poslist.length; j++) {\n var res = poslist[j];\n if (until && res > until) {\n return emitResult(iterResult);\n }\n if (res >= dtstart) {\n var rezonedDate = rezoneIfNeeded(res, options);\n if (!iterResult.accept(rezonedDate)) {\n return emitResult(iterResult);\n }\n if (count) {\n --count;\n if (!count) {\n return emitResult(iterResult);\n }\n }\n }\n }\n }\n else {\n for (var j = start; j < end; j++) {\n var currentDay = dayset[j];\n if (!isPresent(currentDay)) {\n continue;\n }\n var date = fromOrdinal(ii.yearordinal + currentDay);\n for (var k = 0; k < timeset.length; k++) {\n var time = timeset[k];\n var res = combine(date, time);\n if (until && res > until) {\n return emitResult(iterResult);\n }\n if (res >= dtstart) {\n var rezonedDate = rezoneIfNeeded(res, options);\n if (!iterResult.accept(rezonedDate)) {\n return emitResult(iterResult);\n }\n if (count) {\n --count;\n if (!count) {\n return emitResult(iterResult);\n }\n }\n }\n }\n }\n }\n if (options.interval === 0) {\n return emitResult(iterResult);\n }\n // Handle frequency and interval\n counterDate.add(options, filtered);\n if (counterDate.year > MAXYEAR) {\n return emitResult(iterResult);\n }\n if (!freqIsDailyOrGreater(freq)) {\n timeset = ii.gettimeset(freq)(counterDate.hour, counterDate.minute, counterDate.second, 0);\n }\n ii.rebuild(counterDate.year, counterDate.month);\n }\n}\nfunction isFiltered(ii, currentDay, options) {\n var bymonth = options.bymonth, byweekno = options.byweekno, byweekday = options.byweekday, byeaster = options.byeaster, bymonthday = options.bymonthday, bynmonthday = options.bynmonthday, byyearday = options.byyearday;\n return ((notEmpty(bymonth) && !includes(bymonth, ii.mmask[currentDay])) ||\n (notEmpty(byweekno) && !ii.wnomask[currentDay]) ||\n (notEmpty(byweekday) && !includes(byweekday, ii.wdaymask[currentDay])) ||\n (notEmpty(ii.nwdaymask) && !ii.nwdaymask[currentDay]) ||\n (byeaster !== null && !includes(ii.eastermask, currentDay)) ||\n ((notEmpty(bymonthday) || notEmpty(bynmonthday)) &&\n !includes(bymonthday, ii.mdaymask[currentDay]) &&\n !includes(bynmonthday, ii.nmdaymask[currentDay])) ||\n (notEmpty(byyearday) &&\n ((currentDay < ii.yearlen &&\n !includes(byyearday, currentDay + 1) &&\n !includes(byyearday, -ii.yearlen + currentDay)) ||\n (currentDay >= ii.yearlen &&\n !includes(byyearday, currentDay + 1 - ii.yearlen) &&\n !includes(byyearday, -ii.nextyearlen + currentDay - ii.yearlen)))));\n}\nfunction rezoneIfNeeded(date, options) {\n return new DateWithZone(date, options.tzid).rezonedDate();\n}\nfunction emitResult(iterResult) {\n return iterResult.getValue();\n}\nfunction removeFilteredDays(dayset, start, end, ii, options) {\n var filtered = false;\n for (var dayCounter = start; dayCounter < end; dayCounter++) {\n var currentDay = dayset[dayCounter];\n filtered = isFiltered(ii, currentDay, options);\n if (filtered)\n dayset[currentDay] = null;\n }\n return filtered;\n}\nfunction makeTimeset(ii, counterDate, options) {\n var freq = options.freq, byhour = options.byhour, byminute = options.byminute, bysecond = options.bysecond;\n if (freqIsDailyOrGreater(freq)) {\n return buildTimeset(options);\n }\n if ((freq >= RRule.HOURLY &&\n notEmpty(byhour) &&\n !includes(byhour, counterDate.hour)) ||\n (freq >= RRule.MINUTELY &&\n notEmpty(byminute) &&\n !includes(byminute, counterDate.minute)) ||\n (freq >= RRule.SECONDLY &&\n notEmpty(bysecond) &&\n !includes(bysecond, counterDate.second))) {\n return [];\n }\n return ii.gettimeset(freq)(counterDate.hour, counterDate.minute, counterDate.second, counterDate.millisecond);\n}\n//# sourceMappingURL=index.js.map","import { isValidDate } from './dateutil';\nimport IterResult from './iterresult';\nimport CallbackIterResult from './callbackiterresult';\nimport { fromText, parseText, toText, isFullyConvertible } from './nlp/index';\nimport { Frequency, } from './types';\nimport { parseOptions, initializeOptions } from './parseoptions';\nimport { parseString } from './parsestring';\nimport { optionsToString } from './optionstostring';\nimport { Cache } from './cache';\nimport { Weekday } from './weekday';\nimport { iter } from './iter/index';\n// =============================================================================\n// RRule\n// =============================================================================\nexport var Days = {\n MO: new Weekday(0),\n TU: new Weekday(1),\n WE: new Weekday(2),\n TH: new Weekday(3),\n FR: new Weekday(4),\n SA: new Weekday(5),\n SU: new Weekday(6),\n};\nexport var DEFAULT_OPTIONS = {\n freq: Frequency.YEARLY,\n dtstart: null,\n interval: 1,\n wkst: Days.MO,\n count: null,\n until: null,\n tzid: null,\n bysetpos: null,\n bymonth: null,\n bymonthday: null,\n bynmonthday: null,\n byyearday: null,\n byweekno: null,\n byweekday: null,\n bynweekday: null,\n byhour: null,\n byminute: null,\n bysecond: null,\n byeaster: null,\n};\nexport var defaultKeys = Object.keys(DEFAULT_OPTIONS);\n/**\n *\n * @param {Options?} options - see \n * - The only required option is `freq`, one of RRule.YEARLY, RRule.MONTHLY, ...\n * @constructor\n */\nvar RRule = /** @class */ (function () {\n function RRule(options, noCache) {\n if (options === void 0) { options = {}; }\n if (noCache === void 0) { noCache = false; }\n // RFC string\n this._cache = noCache ? null : new Cache();\n // used by toString()\n this.origOptions = initializeOptions(options);\n var parsedOptions = parseOptions(options).parsedOptions;\n this.options = parsedOptions;\n }\n RRule.parseText = function (text, language) {\n return parseText(text, language);\n };\n RRule.fromText = function (text, language) {\n return fromText(text, language);\n };\n RRule.fromString = function (str) {\n return new RRule(RRule.parseString(str) || undefined);\n };\n RRule.prototype._iter = function (iterResult) {\n return iter(iterResult, this.options);\n };\n RRule.prototype._cacheGet = function (what, args) {\n if (!this._cache)\n return false;\n return this._cache._cacheGet(what, args);\n };\n RRule.prototype._cacheAdd = function (what, value, args) {\n if (!this._cache)\n return;\n return this._cache._cacheAdd(what, value, args);\n };\n /**\n * @param {Function} iterator - optional function that will be called\n * on each date that is added. It can return false\n * to stop the iteration.\n * @return Array containing all recurrences.\n */\n RRule.prototype.all = function (iterator) {\n if (iterator) {\n return this._iter(new CallbackIterResult('all', {}, iterator));\n }\n var result = this._cacheGet('all');\n if (result === false) {\n result = this._iter(new IterResult('all', {}));\n this._cacheAdd('all', result);\n }\n return result;\n };\n /**\n * Returns all the occurrences of the rrule between after and before.\n * The inc keyword defines what happens if after and/or before are\n * themselves occurrences. With inc == True, they will be included in the\n * list, if they are found in the recurrence set.\n *\n * @return Array\n */\n RRule.prototype.between = function (after, before, inc, iterator) {\n if (inc === void 0) { inc = false; }\n if (!isValidDate(after) || !isValidDate(before)) {\n throw new Error('Invalid date passed in to RRule.between');\n }\n var args = {\n before: before,\n after: after,\n inc: inc,\n };\n if (iterator) {\n return this._iter(new CallbackIterResult('between', args, iterator));\n }\n var result = this._cacheGet('between', args);\n if (result === false) {\n result = this._iter(new IterResult('between', args));\n this._cacheAdd('between', result, args);\n }\n return result;\n };\n /**\n * Returns the last recurrence before the given datetime instance.\n * The inc keyword defines what happens if dt is an occurrence.\n * With inc == True, if dt itself is an occurrence, it will be returned.\n *\n * @return Date or null\n */\n RRule.prototype.before = function (dt, inc) {\n if (inc === void 0) { inc = false; }\n if (!isValidDate(dt)) {\n throw new Error('Invalid date passed in to RRule.before');\n }\n var args = { dt: dt, inc: inc };\n var result = this._cacheGet('before', args);\n if (result === false) {\n result = this._iter(new IterResult('before', args));\n this._cacheAdd('before', result, args);\n }\n return result;\n };\n /**\n * Returns the first recurrence after the given datetime instance.\n * The inc keyword defines what happens if dt is an occurrence.\n * With inc == True, if dt itself is an occurrence, it will be returned.\n *\n * @return Date or null\n */\n RRule.prototype.after = function (dt, inc) {\n if (inc === void 0) { inc = false; }\n if (!isValidDate(dt)) {\n throw new Error('Invalid date passed in to RRule.after');\n }\n var args = { dt: dt, inc: inc };\n var result = this._cacheGet('after', args);\n if (result === false) {\n result = this._iter(new IterResult('after', args));\n this._cacheAdd('after', result, args);\n }\n return result;\n };\n /**\n * Returns the number of recurrences in this set. It will have go trough\n * the whole recurrence, if this hasn't been done before.\n */\n RRule.prototype.count = function () {\n return this.all().length;\n };\n /**\n * Converts the rrule into its string representation\n *\n * @see \n * @return String\n */\n RRule.prototype.toString = function () {\n return optionsToString(this.origOptions);\n };\n /**\n * Will convert all rules described in nlp:ToText\n * to text.\n */\n RRule.prototype.toText = function (gettext, language, dateFormatter) {\n return toText(this, gettext, language, dateFormatter);\n };\n RRule.prototype.isFullyConvertibleToText = function () {\n return isFullyConvertible(this);\n };\n /**\n * @return a RRule instance with the same freq and options\n * as this one (cache is not cloned)\n */\n RRule.prototype.clone = function () {\n return new RRule(this.origOptions);\n };\n // RRule class 'constants'\n RRule.FREQUENCIES = [\n 'YEARLY',\n 'MONTHLY',\n 'WEEKLY',\n 'DAILY',\n 'HOURLY',\n 'MINUTELY',\n 'SECONDLY',\n ];\n RRule.YEARLY = Frequency.YEARLY;\n RRule.MONTHLY = Frequency.MONTHLY;\n RRule.WEEKLY = Frequency.WEEKLY;\n RRule.DAILY = Frequency.DAILY;\n RRule.HOURLY = Frequency.HOURLY;\n RRule.MINUTELY = Frequency.MINUTELY;\n RRule.SECONDLY = Frequency.SECONDLY;\n RRule.MO = Days.MO;\n RRule.TU = Days.TU;\n RRule.WE = Days.WE;\n RRule.TH = Days.TH;\n RRule.FR = Days.FR;\n RRule.SA = Days.SA;\n RRule.SU = Days.SU;\n RRule.parseString = parseString;\n RRule.optionsToString = optionsToString;\n return RRule;\n}());\nexport { RRule };\n//# sourceMappingURL=rrule.js.map","import { DateWithZone } from './datewithzone';\nimport { iter } from './iter';\nimport { sort } from './dateutil';\nexport function iterSet(iterResult, _rrule, _exrule, _rdate, _exdate, tzid) {\n var _exdateHash = {};\n var _accept = iterResult.accept;\n function evalExdate(after, before) {\n _exrule.forEach(function (rrule) {\n rrule.between(after, before, true).forEach(function (date) {\n _exdateHash[Number(date)] = true;\n });\n });\n }\n _exdate.forEach(function (date) {\n var zonedDate = new DateWithZone(date, tzid).rezonedDate();\n _exdateHash[Number(zonedDate)] = true;\n });\n iterResult.accept = function (date) {\n var dt = Number(date);\n if (isNaN(dt))\n return _accept.call(this, date);\n if (!_exdateHash[dt]) {\n evalExdate(new Date(dt - 1), new Date(dt + 1));\n if (!_exdateHash[dt]) {\n _exdateHash[dt] = true;\n return _accept.call(this, date);\n }\n }\n return true;\n };\n if (iterResult.method === 'between') {\n evalExdate(iterResult.args.after, iterResult.args.before);\n iterResult.accept = function (date) {\n var dt = Number(date);\n if (!_exdateHash[dt]) {\n _exdateHash[dt] = true;\n return _accept.call(this, date);\n }\n return true;\n };\n }\n for (var i = 0; i < _rdate.length; i++) {\n var zonedDate = new DateWithZone(_rdate[i], tzid).rezonedDate();\n if (!iterResult.accept(new Date(zonedDate.getTime())))\n break;\n }\n _rrule.forEach(function (rrule) {\n iter(iterResult, rrule.options);\n });\n var res = iterResult._result;\n sort(res);\n switch (iterResult.method) {\n case 'all':\n case 'between':\n return res;\n case 'before':\n return ((res.length && res[res.length - 1]) || null);\n case 'after':\n default:\n return ((res.length && res[0]) || null);\n }\n}\n//# sourceMappingURL=iterset.js.map","import { __assign } from \"tslib\";\nimport { RRule } from './rrule';\nimport { RRuleSet } from './rruleset';\nimport { untilStringToDate } from './dateutil';\nimport { includes, split } from './helpers';\nimport { parseString, parseDtstart } from './parsestring';\n/**\n * RRuleStr\n * To parse a set of rrule strings\n */\nvar DEFAULT_OPTIONS = {\n dtstart: null,\n cache: false,\n unfold: false,\n forceset: false,\n compatible: false,\n tzid: null,\n};\nexport function parseInput(s, options) {\n var rrulevals = [];\n var rdatevals = [];\n var exrulevals = [];\n var exdatevals = [];\n var parsedDtstart = parseDtstart(s);\n var dtstart = parsedDtstart.dtstart;\n var tzid = parsedDtstart.tzid;\n var lines = splitIntoLines(s, options.unfold);\n lines.forEach(function (line) {\n var _a;\n if (!line)\n return;\n var _b = breakDownLine(line), name = _b.name, parms = _b.parms, value = _b.value;\n switch (name.toUpperCase()) {\n case 'RRULE':\n if (parms.length) {\n throw new Error(\"unsupported RRULE parm: \".concat(parms.join(',')));\n }\n rrulevals.push(parseString(line));\n break;\n case 'RDATE':\n var _c = (_a = /RDATE(?:;TZID=([^:=]+))?/i.exec(line)) !== null && _a !== void 0 ? _a : [], rdateTzid = _c[1];\n if (rdateTzid && !tzid) {\n tzid = rdateTzid;\n }\n rdatevals = rdatevals.concat(parseRDate(value, parms));\n break;\n case 'EXRULE':\n if (parms.length) {\n throw new Error(\"unsupported EXRULE parm: \".concat(parms.join(',')));\n }\n exrulevals.push(parseString(value));\n break;\n case 'EXDATE':\n exdatevals = exdatevals.concat(parseRDate(value, parms));\n break;\n case 'DTSTART':\n break;\n default:\n throw new Error('unsupported property: ' + name);\n }\n });\n return {\n dtstart: dtstart,\n tzid: tzid,\n rrulevals: rrulevals,\n rdatevals: rdatevals,\n exrulevals: exrulevals,\n exdatevals: exdatevals,\n };\n}\nfunction buildRule(s, options) {\n var _a = parseInput(s, options), rrulevals = _a.rrulevals, rdatevals = _a.rdatevals, exrulevals = _a.exrulevals, exdatevals = _a.exdatevals, dtstart = _a.dtstart, tzid = _a.tzid;\n var noCache = options.cache === false;\n if (options.compatible) {\n options.forceset = true;\n options.unfold = true;\n }\n if (options.forceset ||\n rrulevals.length > 1 ||\n rdatevals.length ||\n exrulevals.length ||\n exdatevals.length) {\n var rset_1 = new RRuleSet(noCache);\n rset_1.dtstart(dtstart);\n rset_1.tzid(tzid || undefined);\n rrulevals.forEach(function (val) {\n rset_1.rrule(new RRule(groomRruleOptions(val, dtstart, tzid), noCache));\n });\n rdatevals.forEach(function (date) {\n rset_1.rdate(date);\n });\n exrulevals.forEach(function (val) {\n rset_1.exrule(new RRule(groomRruleOptions(val, dtstart, tzid), noCache));\n });\n exdatevals.forEach(function (date) {\n rset_1.exdate(date);\n });\n if (options.compatible && options.dtstart)\n rset_1.rdate(dtstart);\n return rset_1;\n }\n var val = rrulevals[0] || {};\n return new RRule(groomRruleOptions(val, val.dtstart || options.dtstart || dtstart, val.tzid || options.tzid || tzid), noCache);\n}\nexport function rrulestr(s, options) {\n if (options === void 0) { options = {}; }\n return buildRule(s, initializeOptions(options));\n}\nfunction groomRruleOptions(val, dtstart, tzid) {\n return __assign(__assign({}, val), { dtstart: dtstart, tzid: tzid });\n}\nfunction initializeOptions(options) {\n var invalid = [];\n var keys = Object.keys(options);\n var defaultKeys = Object.keys(DEFAULT_OPTIONS);\n keys.forEach(function (key) {\n if (!includes(defaultKeys, key))\n invalid.push(key);\n });\n if (invalid.length) {\n throw new Error('Invalid options: ' + invalid.join(', '));\n }\n return __assign(__assign({}, DEFAULT_OPTIONS), options);\n}\nfunction extractName(line) {\n if (line.indexOf(':') === -1) {\n return {\n name: 'RRULE',\n value: line,\n };\n }\n var _a = split(line, ':', 1), name = _a[0], value = _a[1];\n return {\n name: name,\n value: value,\n };\n}\nfunction breakDownLine(line) {\n var _a = extractName(line), name = _a.name, value = _a.value;\n var parms = name.split(';');\n if (!parms)\n throw new Error('empty property name');\n return {\n name: parms[0].toUpperCase(),\n parms: parms.slice(1),\n value: value,\n };\n}\nfunction splitIntoLines(s, unfold) {\n if (unfold === void 0) { unfold = false; }\n s = s && s.trim();\n if (!s)\n throw new Error('Invalid empty string');\n // More info about 'unfold' option\n // Go head to http://www.ietf.org/rfc/rfc2445.txt\n if (!unfold) {\n return s.split(/\\s/);\n }\n var lines = s.split('\\n');\n var i = 0;\n while (i < lines.length) {\n // TODO\n var line = (lines[i] = lines[i].replace(/\\s+$/g, ''));\n if (!line) {\n lines.splice(i, 1);\n }\n else if (i > 0 && line[0] === ' ') {\n lines[i - 1] += line.slice(1);\n lines.splice(i, 1);\n }\n else {\n i += 1;\n }\n }\n return lines;\n}\nfunction validateDateParm(parms) {\n parms.forEach(function (parm) {\n if (!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(parm)) {\n throw new Error('unsupported RDATE/EXDATE parm: ' + parm);\n }\n });\n}\nfunction parseRDate(rdateval, parms) {\n validateDateParm(parms);\n return rdateval.split(',').map(function (datestr) { return untilStringToDate(datestr); });\n}\n//# sourceMappingURL=rrulestr.js.map","import { __extends } from \"tslib\";\nimport { RRule } from './rrule';\nimport { sort, timeToUntilString } from './dateutil';\nimport { includes } from './helpers';\nimport { iterSet } from './iterset';\nimport { rrulestr } from './rrulestr';\nimport { optionsToString } from './optionstostring';\nfunction createGetterSetter(fieldName) {\n var _this = this;\n return function (field) {\n if (field !== undefined) {\n _this[\"_\".concat(fieldName)] = field;\n }\n if (_this[\"_\".concat(fieldName)] !== undefined) {\n return _this[\"_\".concat(fieldName)];\n }\n for (var i = 0; i < _this._rrule.length; i++) {\n var field_1 = _this._rrule[i].origOptions[fieldName];\n if (field_1) {\n return field_1;\n }\n }\n };\n}\nvar RRuleSet = /** @class */ (function (_super) {\n __extends(RRuleSet, _super);\n /**\n *\n * @param {Boolean?} noCache\n * The same stratagy as RRule on cache, default to false\n * @constructor\n */\n function RRuleSet(noCache) {\n if (noCache === void 0) { noCache = false; }\n var _this = _super.call(this, {}, noCache) || this;\n _this.dtstart = createGetterSetter.apply(_this, ['dtstart']);\n _this.tzid = createGetterSetter.apply(_this, ['tzid']);\n _this._rrule = [];\n _this._rdate = [];\n _this._exrule = [];\n _this._exdate = [];\n return _this;\n }\n RRuleSet.prototype._iter = function (iterResult) {\n return iterSet(iterResult, this._rrule, this._exrule, this._rdate, this._exdate, this.tzid());\n };\n /**\n * Adds an RRule to the set\n *\n * @param {RRule}\n */\n RRuleSet.prototype.rrule = function (rrule) {\n _addRule(rrule, this._rrule);\n };\n /**\n * Adds an EXRULE to the set\n *\n * @param {RRule}\n */\n RRuleSet.prototype.exrule = function (rrule) {\n _addRule(rrule, this._exrule);\n };\n /**\n * Adds an RDate to the set\n *\n * @param {Date}\n */\n RRuleSet.prototype.rdate = function (date) {\n _addDate(date, this._rdate);\n };\n /**\n * Adds an EXDATE to the set\n *\n * @param {Date}\n */\n RRuleSet.prototype.exdate = function (date) {\n _addDate(date, this._exdate);\n };\n /**\n * Get list of included rrules in this recurrence set.\n *\n * @return List of rrules\n */\n RRuleSet.prototype.rrules = function () {\n return this._rrule.map(function (e) { return rrulestr(e.toString()); });\n };\n /**\n * Get list of excluded rrules in this recurrence set.\n *\n * @return List of exrules\n */\n RRuleSet.prototype.exrules = function () {\n return this._exrule.map(function (e) { return rrulestr(e.toString()); });\n };\n /**\n * Get list of included datetimes in this recurrence set.\n *\n * @return List of rdates\n */\n RRuleSet.prototype.rdates = function () {\n return this._rdate.map(function (e) { return new Date(e.getTime()); });\n };\n /**\n * Get list of included datetimes in this recurrence set.\n *\n * @return List of exdates\n */\n RRuleSet.prototype.exdates = function () {\n return this._exdate.map(function (e) { return new Date(e.getTime()); });\n };\n RRuleSet.prototype.valueOf = function () {\n var result = [];\n if (!this._rrule.length && this._dtstart) {\n result = result.concat(optionsToString({ dtstart: this._dtstart }));\n }\n this._rrule.forEach(function (rrule) {\n result = result.concat(rrule.toString().split('\\n'));\n });\n this._exrule.forEach(function (exrule) {\n result = result.concat(exrule\n .toString()\n .split('\\n')\n .map(function (line) { return line.replace(/^RRULE:/, 'EXRULE:'); })\n .filter(function (line) { return !/^DTSTART/.test(line); }));\n });\n if (this._rdate.length) {\n result.push(rdatesToString('RDATE', this._rdate, this.tzid()));\n }\n if (this._exdate.length) {\n result.push(rdatesToString('EXDATE', this._exdate, this.tzid()));\n }\n return result;\n };\n /**\n * to generate recurrence field such as:\n * DTSTART:19970902T010000Z\n * RRULE:FREQ=YEARLY;COUNT=2;BYDAY=TU\n * RRULE:FREQ=YEARLY;COUNT=1;BYDAY=TH\n */\n RRuleSet.prototype.toString = function () {\n return this.valueOf().join('\\n');\n };\n /**\n * Create a new RRuleSet Object completely base on current instance\n */\n RRuleSet.prototype.clone = function () {\n var rrs = new RRuleSet(!!this._cache);\n this._rrule.forEach(function (rule) { return rrs.rrule(rule.clone()); });\n this._exrule.forEach(function (rule) { return rrs.exrule(rule.clone()); });\n this._rdate.forEach(function (date) { return rrs.rdate(new Date(date.getTime())); });\n this._exdate.forEach(function (date) { return rrs.exdate(new Date(date.getTime())); });\n return rrs;\n };\n return RRuleSet;\n}(RRule));\nexport { RRuleSet };\nfunction _addRule(rrule, collection) {\n if (!(rrule instanceof RRule)) {\n throw new TypeError(String(rrule) + ' is not RRule instance');\n }\n if (!includes(collection.map(String), String(rrule))) {\n collection.push(rrule);\n }\n}\nfunction _addDate(date, collection) {\n if (!(date instanceof Date)) {\n throw new TypeError(String(date) + ' is not Date instance');\n }\n if (!includes(collection.map(Number), Number(date))) {\n collection.push(date);\n sort(collection);\n }\n}\nfunction rdatesToString(param, rdates, tzid) {\n var isUTC = !tzid || tzid.toUpperCase() === 'UTC';\n var header = isUTC ? \"\".concat(param, \":\") : \"\".concat(param, \";TZID=\").concat(tzid, \":\");\n var dateString = rdates\n .map(function (rdate) { return timeToUntilString(rdate.valueOf(), isUTC); })\n .join(',');\n return \"\".concat(header).concat(dateString);\n}\n//# sourceMappingURL=rruleset.js.map","import { RRule, rrulestr } from 'rrule';\r\n\r\nexport default function (scheduler) {\r\n\r\n\tfunction clearMilliseconds(date) {\r\n\t\treturn new Date(\r\n\t\t\tdate.getFullYear(),\r\n\t\t\tdate.getMonth(),\r\n\t\t\tdate.getDate(),\r\n\t\t\tdate.getHours(),\r\n\t\t\tdate.getMinutes(),\r\n\t\t\tdate.getSeconds(),\r\n\t\t\t0\r\n\t\t);\r\n\t}\r\n\r\n\tfunction isDeletedOccurrence(event) {\r\n\t\treturn !!event.deleted;\r\n\t}\r\n\r\n\tfunction isSeries(event) {\r\n\t\treturn !!event.rrule && !event.recurring_event_id;\r\n\t}\r\n\r\n\tfunction clearRecurringProperties(event) {\r\n\t\tevent.rrule = \"\";\r\n\t\tevent.original_start = null;\r\n\t\tevent.recurring_event_id = null;\r\n\t\tevent.duration = null;\r\n\t\tevent.deleted = null;\r\n\t}\r\n\r\n\tfunction createException(ev) {\r\n\t\tlet id = ev.id.split(\"#\");\r\n\r\n\t\tlet nid = scheduler.uid();\r\n\t\tscheduler._not_render = true;\r\n\t\tlet nev = scheduler._copy_event(ev);\r\n\t\tnev.id = nid;\r\n\t\tnev.recurring_event_id = id[0];\r\n\r\n\t\tlet timestamp = id[1];\r\n\r\n\t\tnev.original_start = new Date(Number(timestamp));\r\n\r\n\t\tscheduler._add_rec_marker(nev, timestamp);\r\n\t\tscheduler.addEvent(nev);\r\n\t\tscheduler._not_render = false;\r\n\t}\r\n\r\n\tfunction toUTCDate(date){\r\n\t\treturn new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(),date.getSeconds()));\r\n\t}\r\n\r\n\tfunction setUTCPartsToDate(d) {\r\n\t\treturn new Date(\r\n\t\t\td.getUTCFullYear(),\r\n\t\t\td.getUTCMonth(),\r\n\t\t\td.getUTCDate(),\r\n\t\t\td.getUTCHours(),\r\n\t\t\td.getUTCMinutes(),\r\n\t\t\td.getUTCSeconds()\r\n\t\t);\r\n\t}\r\n\r\n\tscheduler._rec_temp = [];\r\n\tscheduler._rec_markers_pull = {};\r\n\tscheduler._rec_markers = {};\r\n\tscheduler._add_rec_marker = function (ev, time) {\r\n\t\tev._pid_time = time;\r\n\t\tthis._rec_markers[ev.id] = ev;\r\n\t\tif (!this._rec_markers_pull[ev.event_pid]) this._rec_markers_pull[ev.event_pid] = {};\r\n\t\tthis._rec_markers_pull[ev.event_pid][time] = ev;\r\n\t};\r\n\tscheduler._get_rec_marker = function (time, id) {\r\n\t\tlet ch = this._rec_markers_pull[id];\r\n\t\tif (ch) return ch[time];\r\n\t\treturn null;\r\n\t};\r\n\tscheduler._get_rec_markers = function (id) {\r\n\t\treturn (this._rec_markers_pull[id] || []);\r\n\t};\r\n\r\n\t(function () {\r\n\t\tvar old_add_event = scheduler.addEvent;\r\n\t\tscheduler.addEvent = function (start_date, end_date, text, id, extra_data) {\r\n\t\t\tvar ev_id = old_add_event.apply(this, arguments);\r\n\r\n\t\t\tif (ev_id && scheduler.getEvent(ev_id)) {\r\n\t\t\t\tvar ev = scheduler.getEvent(ev_id);\r\n\r\n\t\t\t\tif (ev.start_date) {\r\n\t\t\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t\t\t}\r\n\t\t\t\tif (ev.end_date) {\r\n\t\t\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn ev_id;\r\n\t\t};\r\n\t})();\r\n\r\n\tscheduler.attachEvent(\"onEventLoading\", function (event) {\r\n\r\n\t\tif (event.original_start) {\r\n\t\t\tevent.original_start = scheduler.templates.parse_date(event.original_start);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onEventIdChange\", function (id, new_id) {\r\n\t\tif (this._ignore_call) return;\r\n\t\tthis._ignore_call = true;\r\n\r\n\t\tif (scheduler._rec_markers[id]) {\r\n\t\t\t//important for for correct work of scheduler.getEvents(from, to) and collision detection\r\n\t\t\tscheduler._rec_markers[new_id] = scheduler._rec_markers[id];\r\n\t\t\tdelete scheduler._rec_markers[id];\r\n\t\t}\r\n\r\n\t\tif (scheduler._rec_markers_pull[id]) {\r\n\t\t\tscheduler._rec_markers_pull[new_id] = scheduler._rec_markers_pull[id];\r\n\t\t\tdelete scheduler._rec_markers_pull[id];\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < this._rec_temp.length; i++) {\r\n\t\t\tvar tev = this._rec_temp[i];\r\n\t\t\tif (tev.recurring_event_id == id) {\r\n\t\t\t\ttev.recurring_event_id = new_id;\r\n\t\t\t\tthis.changeEventId(tev.id, new_id + \"#\" + tev.id.split(\"#\")[1]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (var i in this._rec_markers) {\r\n\t\t\tvar tev = this._rec_markers[i];\r\n\t\t\tif (tev.recurring_event_id == id) {\r\n\t\t\t\ttev.recurring_event_id = new_id;\r\n\t\t\t\ttev._pid_changed = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar el = scheduler._rec_markers[new_id];\r\n\t\tif (el && el._pid_changed) {\r\n\t\t\tdelete el._pid_changed;\r\n\t\t\tsetTimeout(function () {\r\n\t\t\t\tif (scheduler.$destroyed) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tscheduler.callEvent(\"onEventChanged\", [new_id, scheduler.getEvent(new_id)]);\r\n\t\t\t}, 1);\r\n\t\t}\r\n\r\n\t\tdelete this._ignore_call;\r\n\t});\r\n\r\n\tfunction deleteEventFromSeries(idTimestamp, ev) {\r\n\t\tlet id = idTimestamp;\r\n\t\tidTimestamp = id.split(\"#\");\r\n\t\tlet nid = scheduler.uid();\r\n\t\tlet tid = (idTimestamp[1]) ? idTimestamp[1] : (ev._pid_time);\r\n\t\tlet nev = scheduler._copy_event(ev);\r\n\t\tnev.id = nid;\r\n\t\tnev.recurring_event_id = ev.recurring_event_id || idTimestamp[0];\r\n\t\tnev.original_start = new Date(Number(tid));\r\n\t\tnev.deleted = true;\r\n\t\tscheduler.addEvent(nev);\r\n\t}\r\n\r\n\tscheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function (id) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (this._is_virtual_event(id) || (this._is_modified_occurence(ev) && !isDeletedOccurrence(ev))) {\r\n\t\t\tdeleteEventFromSeries(id, ev);\r\n\t\t} else {\r\n\t\t\tif (isSeries(ev) && this._lightbox_id)\r\n\t\t\t\tthis._roll_back_dates(ev);\r\n\r\n\r\n\t\t\tvar sub = this._get_rec_markers(id);\r\n\t\t\tfor (var i in sub) {\r\n\t\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\t\tid = sub[i].id;\r\n\t\t\t\t\tif (this.getEvent(id))\r\n\t\t\t\t\t\tthis.deleteEvent(id, true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function (id, ev) {\r\n\t\tif (!this._is_virtual_event(id) && this._is_modified_occurence(ev)) {\r\n\t\t\tif (!scheduler._events[id]) {\r\n\t\t\t\tev.deleted = true;\r\n\t\t\t\tthis.setEvent(id, ev);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\tscheduler.attachEvent(\"onEventChanged\", function (id, event) {\r\n\t\tif (this._loading) return true;\r\n\r\n\t\tvar ev = this.getEvent(id);\r\n\r\n\t\tif (this._is_virtual_event(id)) {\r\n\t\t\tcreateException(ev);\r\n\r\n\t\t} else {\r\n\t\t\tif (ev.start_date) {\r\n\t\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t\t}\r\n\t\t\tif (ev.end_date) {\r\n\t\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t\t}\r\n\r\n\t\t\tif (isSeries(ev) && this._lightbox_id) {\r\n\t\t\t\tthis._roll_back_dates(ev);\r\n\t\t\t\t//scheduler.recurrings.rollbackDates(ev);\r\n\t\t\t}\r\n\r\n\t\t\tvar sub = this._get_rec_markers(id);\r\n\t\t\tfor (var i in sub) {\r\n\t\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\t\tdelete this._rec_markers[sub[i].id];\r\n\t\t\t\t\tthis.deleteEvent(sub[i].id, true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tdelete this._rec_markers_pull[id];\r\n\r\n\t\t\t// it's possible that after editing event is no longer exists, in such case we need to remove _select_id flag\r\n\t\t\tvar isEventFound = false;\r\n\t\t\tfor (var k = 0; k < this._rendered.length; k++) {\r\n\t\t\t\tif (this._rendered[k].getAttribute(this.config.event_attribute) == id)\r\n\t\t\t\t\tisEventFound = true;\r\n\t\t\t}\r\n\t\t\tif (!isEventFound)\r\n\t\t\t\tthis._select_id = null;\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventAdded\", function (id) {\r\n\t\tif (!this._loading) {\r\n\t\t\tvar ev = this.getEvent(id);\r\n\t\t\tif (isSeries(ev)) {\r\n\t\t\t\tthis._roll_back_dates(ev);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventSave\", function (id, data, is_new_event) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (isSeries(ev))\r\n\t\t\tthis._select_id = null;\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventCreated\", function (id) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (!isSeries(ev)) {\r\n\t\t\tclearRecurringProperties(ev);\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventCancel\", function (id) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (isSeries(ev)) {\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t\t// a bit expensive, but we need to be sure that event re-rendered, because view can be corrupted by resize , during edit process\r\n\t\t\tthis.render_view_data();\r\n\t\t}\r\n\t});\r\n\tscheduler._roll_back_dates = function (ev) {\r\n\t\t//// !!!!! calc temp properties\r\n\t\tif (ev.start_date) {\r\n\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t}\r\n\t\tif (ev.end_date) {\r\n\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t}\r\n\r\n\t\tev.duration = Math.round((ev.end_date.valueOf() - ev.start_date.valueOf()) / 1000);\r\n\t\tev.end_date = ev._end_date;\r\n\t\tif (ev._start_date) {\r\n\t\t\tev.start_date.setMonth(0);\r\n\t\t\tev.start_date.setDate(ev._start_date.getDate());\r\n\t\t\tev.start_date.setMonth(ev._start_date.getMonth());\r\n\t\t\tev.start_date.setFullYear(ev._start_date.getFullYear());\r\n\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._is_virtual_event = function (id) {\r\n\t\treturn id.toString().indexOf(\"#\") != -1;\r\n\t};\r\n\tscheduler._is_modified_occurence = function (ev) {\r\n\t\treturn (ev.recurring_event_id && ev.recurring_event_id != \"0\");\r\n\t};\r\n\r\n\tscheduler.showLightbox_rec = scheduler.showLightbox;\r\n\tscheduler.showLightbox = function (id) {\r\n\t\tvar locale = this.locale;\r\n\t\tvar c = scheduler.config.lightbox_recurring;\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tvar pid = ev.recurring_event_id;\r\n\t\tvar isVirtual = this._is_virtual_event(id);\r\n\t\tif (isVirtual)\r\n\t\t\tpid = id.split(\"#\")[0];\r\n\r\n\t\t// show series\r\n\t\tvar showSeries = function (id) {\r\n\t\t\tvar event = scheduler.getEvent(id);\r\n\t\t\tevent._end_date = event.end_date;\r\n\t\t\tevent.end_date = new Date(event.start_date.valueOf() + event.duration * 1000);\r\n\t\t\treturn scheduler.showLightbox_rec(id); // editing series\r\n\t\t};\r\n\r\n\t\tif ((pid || pid * 1 === 0) && isSeries(ev)) {\r\n\t\t\t// direct API call on series id\r\n\t\t\treturn showSeries(id);\r\n\t\t}\r\n\t\tif (!pid || pid === '0' || ((!locale.labels.confirm_recurring || c == 'instance') || (c == 'series' && !isVirtual))) {\r\n\t\t\t// editing instance or non recurring event\r\n\t\t\treturn this.showLightbox_rec(id);\r\n\t\t}\r\n\t\tif (c == 'ask') {\r\n\t\t\tvar that = this;\r\n\t\t\tscheduler.modalbox({\r\n\t\t\t\ttext: locale.labels.confirm_recurring,\r\n\t\t\t\ttitle: locale.labels.title_confirm_recurring,\r\n\t\t\t\twidth: \"500px\",\r\n\t\t\t\tposition: \"middle\",\r\n\t\t\t\tbuttons: [locale.labels.button_edit_series, locale.labels.button_edit_occurrence, locale.labels.icon_cancel],\r\n\t\t\t\tcallback: function (index) {\r\n\t\t\t\t\tswitch (+index) {\r\n\t\t\t\t\t\tcase 0:\r\n\t\t\t\t\t\t\treturn showSeries(pid);\r\n\t\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\t\treturn that.showLightbox_rec(id);\r\n\t\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tshowSeries(pid);\r\n\t\t}\r\n\t};\r\n\r\n\tfunction groupExceptions() {\r\n\t\tconst exceptions = {};\r\n\t\tfor (const i in scheduler._events) {\r\n\t\t\tconst ev = scheduler._events[i];\r\n\t\t\tif (ev.recurring_event_id) {\r\n\t\t\t\tif (!exceptions[ev.recurring_event_id]) {\r\n\t\t\t\t\texceptions[ev.recurring_event_id] = {};\r\n\t\t\t\t}\r\n\t\t\t\texceptions[ev.recurring_event_id][ev.original_start.valueOf()] = ev;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn exceptions;\r\n\t}\r\n\r\n\tscheduler.get_visible_events_rec = scheduler.get_visible_events;\r\n\tscheduler.get_visible_events = function (only_timed) {\r\n\t\tfor (var i = 0; i < this._rec_temp.length; i++)\r\n\t\t\tdelete this._events[this._rec_temp[i].id];\r\n\t\tthis._rec_temp = [];\r\n\r\n\t\tconst exceptions = groupExceptions();\r\n\t\tvar stack = this.get_visible_events_rec(only_timed);\r\n\t\tvar out = [];\r\n\t\tfor (var i = 0; i < stack.length; i++) {\r\n\t\t\tif (stack[i].deleted || stack[i].recurring_event_id) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif (isSeries(stack[i])) {\r\n\t\t\t\tthis.repeat_date(stack[i], out, undefined, undefined, undefined, undefined, exceptions);\r\n\t\t\t} else {\r\n\t\t\t\tout.push(stack[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn out;\r\n\t};\r\n\r\n\t(function () {\r\n\t\tvar old = scheduler.isOneDayEvent;\r\n\t\tscheduler.isOneDayEvent = function (ev) {\r\n\t\t\tif (isSeries(ev)) return true;\r\n\t\t\treturn old.call(this, ev);\r\n\t\t};\r\n\t\tvar old_update_event = scheduler.updateEvent;\r\n\t\tscheduler.updateEvent = function (id) {\r\n\t\t\tvar ev = scheduler.getEvent(id);\r\n\r\n\t\t\tif (ev && isSeries(ev) && !this._is_virtual_event(id)) {\r\n\t\t\t\tscheduler.update_view();\r\n\t\t\t} else {\r\n\t\t\t\told_update_event.call(this, id);\r\n\t\t\t}\r\n\t\t};\r\n\t})();\r\n\r\n\tconst toIcalString = scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\");\r\n\r\n\tscheduler.repeat_date = function (ev, stack, non_render, from, to, maxCount, exceptions) {\r\n\t\tif (!ev.rrule) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tlet seriesExceptions = exceptions ? exceptions[ev.id] : groupExceptions()[ev.id];\r\n\t\tif (!seriesExceptions) {\r\n\t\t\tseriesExceptions = {};\r\n\t\t}\r\n\r\n\t\t// GS-2596: from and to should be in UTC, \r\n\t\t// need to remove one sec to not be included in repeatedDates array\r\n\t\tfrom = toUTCDate(from || new Date(scheduler._min_date.valueOf() - 1000));\r\n\t\tto = toUTCDate(to || new Date(scheduler._max_date.valueOf() - 1000));\r\n\r\n\t\t\r\n\t\tconst utcStart = toUTCDate(ev.start_date);\r\n\t\tlet parsedRRule;\r\n\t\tif (maxCount){\r\n\t\t\t// for getRecDates() method\r\n\t\t\tparsedRRule = rrulestr(`RRULE:${ev.rrule};UNTIL=${toIcalString(ev.end_date)};COUNT=${maxCount}`, { dtstart: utcStart });\r\n\t\t} else {\r\n\t\t\tparsedRRule = rrulestr(`RRULE:${ev.rrule};UNTIL=${toIcalString(ev.end_date)}`, { dtstart: utcStart });\r\n\t\t}\r\n\t\t//GS-2596: third parameter, includes dates that match with arguments\r\n\t\tconst repeatedDates = parsedRRule.between(from, to, true).map(date => {\r\n\t\t\tconst adjustedDate = setUTCPartsToDate(date);\r\n\t\t\tadjustedDate.setHours(ev.start_date.getHours());\r\n\t\t\tadjustedDate.setMinutes(ev.start_date.getMinutes());\r\n\t\t\tadjustedDate.setSeconds(ev.start_date.getSeconds());\r\n\t\t\treturn adjustedDate;\r\n\t\t});\r\n\t\tlet visibleCount = 0;\r\n\r\n\t\tconst eventDuration = ev.duration;\r\n\r\n\t\tfor (let i = 0; i < repeatedDates.length; i++) {\r\n\t\t\tif (maxCount && visibleCount >= maxCount) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tconst date = repeatedDates[i];\r\n\r\n\t\t\tlet exception = seriesExceptions[date.valueOf()];\r\n\t\t\tif (exception) {\r\n\t\t\t\tif (exception.deleted) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvisibleCount++;\r\n\t\t\t\t\tstack.push(exception);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tconst copy = scheduler._copy_event(ev);\r\n\t\t\t\t//copy._timed = ev._timed;\r\n\t\t\t\tcopy.text = ev.text;\r\n\t\t\t\tcopy.start_date = date;\r\n\t\t\t\tcopy.id = ev.id + \"#\" + Math.ceil(date.valueOf());\r\n\t\t\t\tcopy.end_date = new Date(date.valueOf() + eventDuration * 1000);\r\n\t\t\t\tcopy.end_date = scheduler._fix_daylight_saving_date(copy.start_date, copy.end_date, ev, date, copy.end_date);\r\n\t\t\t\tcopy._timed = scheduler.isOneDayEvent(copy);\r\n\r\n\r\n\r\n\t\t\t\tif (!copy._timed && !scheduler._table_view && !scheduler.config.multi_day) continue;\r\n\t\t\t\tstack.push(copy);\r\n\r\n\t\t\t\tif (!non_render) {\r\n\t\t\t\t\tscheduler._events[copy.id] = copy;\r\n\t\t\t\t\tscheduler._rec_temp.push(copy);\r\n\t\t\t\t}\r\n\t\t\t\tvisibleCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//GS-2534: case when exceptions have different dates\r\n\t\tif (seriesExceptions && repeatedDates.length == 0 ){\r\n\t\t\tfor (let a in seriesExceptions){\r\n\t\t\t\tlet exception = seriesExceptions[a];\r\n\t\t\t\tif (exception) {\r\n\t\t\t\t\tif(exception.deleted){\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\telse if (from && to && exception.start_date < to && exception.end_date > from) {\r\n\t\t\t\t\t\tstack.push(exception);\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t} \r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._fix_daylight_saving_date = function (start_date, end_date, ev, counter, default_date) {\r\n\t\tvar shift = start_date.getTimezoneOffset() - end_date.getTimezoneOffset();\r\n\t\tif (shift) {\r\n\t\t\tif (shift > 0) {\r\n\t\t\t\t// e.g. 24h -> 23h\r\n\t\t\t\treturn new Date(counter.valueOf() + ev.duration * 1000 - shift * 60 * 1000);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t// e.g. 24h -> 25h\r\n\t\t\t\treturn new Date(end_date.valueOf() - shift * 60 * 1000);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new Date(default_date.valueOf());\r\n\t};\r\n\tscheduler.getRecDates = function (id, max) {\r\n\t\tvar ev = typeof id == \"object\" ? id : scheduler.getEvent(id);\r\n\t\tvar recurrings = [];\r\n\t\tmax = max || 100;\r\n\r\n\t\tif (!isSeries(ev)) {\r\n\t\t\treturn [\r\n\t\t\t\t{ start_date: ev.start_date, end_date: ev.end_date }\r\n\t\t\t];\r\n\t\t}\r\n\t\tif (ev.deleted) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\tscheduler.repeat_date(ev, recurrings, true, ev.start_date, ev.end_date, max);\r\n\r\n\t\tvar result = [];\r\n\t\tfor (var i = 0; i < recurrings.length; i++) {\r\n\t\t\tif (!recurrings[i].deleted) {\r\n\t\t\t\tresult.push({ start_date: recurrings[i].start_date, end_date: recurrings[i].end_date });\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t};\r\n\tscheduler.getEvents = function (from, to) {\r\n\t\tvar result = [];\r\n\t\tconst exceptions = groupExceptions();\r\n\t\tfor (var a in this._events) {\r\n\t\t\tvar ev = this._events[a];\r\n\t\t\tif (ev.recurring_event_id) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif (from && to && ev.start_date < to && ev.end_date > from) {\r\n\t\t\t\tif (isSeries(ev)) {\r\n\t\t\t\t\tvar sev = [];\r\n\t\t\t\t\tthis.repeat_date(ev, sev, true, from, to, undefined, exceptions);\r\n\t\t\t\t\tsev.forEach(function(occurence){\r\n\t\t\t\t\t\tif (occurence.start_date < to && occurence.end_date > from) {\r\n\t\t\t\t\t\t\tresult.push(occurence);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t// if it's virtual event we can skip it\r\n\t\t\t\t} else if (!this._is_virtual_event(ev.id)) {\r\n\t\t\t\t\tresult.push(ev);\r\n\t\t\t\t}\r\n\t\t\t} else if (!from && !to && !this._is_virtual_event(ev.id)) {\r\n\t\t\t\tresult.push(ev);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t};\r\n\r\n\t//drop secondary attributes\r\n\tscheduler._copy_dummy = function (ev) {\r\n\t\tvar start_date = new Date(this.start_date);\r\n\t\tvar end_date = new Date(this.end_date);\r\n\t\tthis.start_date = start_date;\r\n\t\tthis.end_date = end_date;\r\n\t\tthis.duration = this.rrule = null;\r\n\t};\r\n\r\n\tscheduler.config.include_end_by = false;\r\n\tscheduler.config.lightbox_recurring = 'ask'; // series, instance\r\n\tscheduler.config.recurring_workdays = [RRule.MO.weekday,RRule.TU.weekday,RRule.WE.weekday,RRule.TH.weekday,RRule.FR.weekday];\r\n\tscheduler.config.repeat_date = \"%m.%d.%Y\";\r\n\tscheduler.config.lightbox.sections = [\r\n\t\t{ name: \"description\", map_to: \"text\", type: \"textarea\", focus: true },\r\n\t\t{ name: \"recurring\", type: \"recurring\", map_to: \"rec_type\" },\r\n\t\t{ name: \"time\", height: 72, type: \"time\", map_to: \"auto\" }\r\n\t];\r\n\r\n\tscheduler.attachEvent(\"onClearAll\", function () {\r\n\t\tscheduler._rec_markers = {}; //clear recurring events data\r\n\t\tscheduler._rec_markers_pull = {};\r\n\t\tscheduler._rec_temp = [];\r\n\t});\r\n\r\n\r\n\tfunction getTopLevelOption(rruleObj, untilDate) {\r\n\t\tconst options = rruleObj.options;\r\n\t\tconst until = options.until || untilDate;\r\n\r\n\t\tconst hasEndCondition = options.count || (until && until.getFullYear() !== 9999);\r\n\r\n\t\tif (hasEndCondition) {\r\n\t\t\treturn 'CUSTOM';\r\n\t\t}\r\n\r\n\t\tif (options.freq === RRule.DAILY && options.interval === 1 && !options.byweekday) {\r\n\t\t\treturn 'DAILY';\r\n\t\t} else if (options.freq === RRule.WEEKLY && options.interval === 1 && !options.byweekday) {\r\n\t\t\treturn 'WEEKLY';\r\n\t\t} else if (options.freq === RRule.MONTHLY && options.interval === 1 && !options.bysetpos) {\r\n\t\t\treturn 'MONTHLY';\r\n\t\t} else if (options.freq === RRule.YEARLY && options.interval === 1 && !options.bysetpos) {\r\n\t\t\treturn 'YEARLY';\r\n\t\t} else if (options.freq === RRule.DAILY && options.byweekday && options.byweekday.length === scheduler.config.recurring_workdays.length &&\r\n\t\t\toptions.byweekday.includes(RRule.MO) &&\r\n\t\t\toptions.byweekday.includes(RRule.TU) &&\r\n\t\t\toptions.byweekday.includes(RRule.WE) &&\r\n\t\t\toptions.byweekday.includes(RRule.TH) &&\r\n\t\t\toptions.byweekday.includes(RRule.FR)) {\r\n\t\t\treturn 'WORKDAYS';\r\n\t\t} else {\r\n\t\t\treturn 'CUSTOM';\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction getWeekdayOfMonth(date) {\r\n\t\tconst dayOfWeek = date.getDay();\r\n\t\tconst dayOfMonth = date.getDate();\r\n\t\tconst dayNumber = Math.ceil(dayOfMonth / 7);\r\n\t\treturn { dayOfWeek, dayNumber };\r\n\t}\r\n\r\n\r\n\tconst jsDaysToRRULEDays = {\r\n\t\t0: \"SU\",\r\n\t\t1: \"MO\",\r\n\t\t2: \"TU\",\r\n\t\t3: \"WE\",\r\n\t\t4: \"TH\",\r\n\t\t5: \"FR\",\r\n\t\t6: \"SA\"\r\n\t};\r\n\tconst RruleDayNumsToJs = {\r\n\t\t0: 1,\r\n\t\t1: 2,\r\n\t\t2: 3,\r\n\t\t3: 4,\r\n\t\t4: 5,\r\n\t\t5: 6,\r\n\t\t6: 0\r\n\t};\r\n\r\n\tfunction fillCustomDaily(node, rule) {\r\n\t\tnode.querySelector(\"[name='repeat_interval_value']\").value = (rule ? rule.interval : 1) || 1;\r\n\t}\r\n\r\n\tfunction fillCustomWeekly(node, rule, event) {\r\n\t\tnode.querySelector(\"[name='repeat_interval_value']\").value = (rule ? rule.interval : 1) || 1;\r\n\r\n\t\tconst dayCheckboxes = node.querySelectorAll(`.dhx_form_repeat_custom_week input`);\r\n\t\tdayCheckboxes.forEach((ch) => ch.checked = false);\r\n\t\tif (rule && rule.byweekday) {\r\n\t\t\trule.byweekday.forEach((day) => {\r\n\t\t\t\tconst dayNum = RruleDayNumsToJs[day.weekday];\r\n\t\t\t\tconst dayLabel = jsDaysToRRULEDays[dayNum];\r\n\t\t\t\tnode.querySelector(`.dhx_form_repeat_custom_week input[value=\"${dayLabel}\"]`).checked = true;\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tconst dayLabel = jsDaysToRRULEDays[event.start_date.getDay()];\r\n\t\t\tnode.querySelector(`.dhx_form_repeat_custom_week input[value=\"${dayLabel}\"]`).checked = true;\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tfunction fillCustomMonthly(node, rule, event) {\r\n\t\tnode.querySelector(\"[name='repeat_interval_value']\").value = (rule ? rule.interval : 1) || 1;\r\n\r\n\t\tconst dateOfMonth = node.querySelector(`.dhx_form_repeat_custom_month [value=\"month_date\"]`);\r\n\t\tconst nthWeekDayOfMonth = node.querySelector(`.dhx_form_repeat_custom_month [value=\"month_nth_weekday\"]`);\r\n\t\tdateOfMonth.innerText = scheduler.templates.repeat_monthly_date(event.start_date, event);\r\n\t\tnthWeekDayOfMonth.innerText = scheduler.templates.repeat_monthly_weekday(event.start_date, event);\r\n\r\n\t\tif (!rule || (rule.bysetpos && !(rule.byweekday && rule.byweekday.length))) {\r\n\t\t\tnode.querySelector(`[name=\"dhx_custom_month_option\"]`).value = \"month_date\";\r\n\t\t} else {\r\n\t\t\tnode.querySelector(`[name=\"dhx_custom_month_option\"]`).value = \"month_nth_weekday\";\r\n\t\t}\r\n\t}\r\n\r\n\tfunction formatDayNumber(date){\r\n\t\tswitch (date) {\r\n\t\t\tcase 1:\r\n\t\t\tcase 31:\r\n\t\t\t\treturn `${date}st`;\r\n\t\t\tcase 2:\r\n\t\t\t\treturn `${date}nd`;\r\n\t\t\tcase 3:\r\n\t\t\t\treturn `${date}rd`;\r\n\t\t\tdefault:\r\n\t\t\t\treturn `${date}th`;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler.templates.repeat_monthly_date = function(startDate, event) {\r\n\t\tconst date = startDate.getDate();\r\n\t\treturn `Every ${formatDayNumber(date)}`;\r\n\t};\r\n\tscheduler.templates.repeat_monthly_weekday = function(startDate, event) {\r\n\t\tconst nthDayOfMonth = getWeekdayOfMonth(startDate);\r\n\t\treturn `Every ${formatDayNumber(nthDayOfMonth.dayNumber)} ${scheduler.locale.date.day_full[nthDayOfMonth.dayOfWeek]}`;\r\n\t};\r\n\t\r\n\tscheduler.templates.repeat_yearly_month_date = function(startDate, event) {\r\n\t\tconst date = startDate.getDate();\r\n\t\tconst monthLabel = scheduler.locale.date.month_full[startDate.getMonth()];\r\n\t\treturn `Every ${formatDayNumber(date)} day of ${monthLabel}`;\r\n\t};\r\n\tscheduler.templates.repeat_yearly_month_weekday = function(startDate, event) {\r\n\t\tconst nthDayOfMonth = getWeekdayOfMonth(startDate);\r\n\t\tconst monthLabel = scheduler.locale.date.month_full[startDate.getMonth()];\r\n\t\treturn `Every ${formatDayNumber(nthDayOfMonth.dayNumber)} ${scheduler.locale.date.day_full[nthDayOfMonth.dayOfWeek]} of ${monthLabel}`;\r\n\t};\r\n\r\n\tfunction fillCustomYearly(node, rule, event) {\r\n\t\tconst dateOfYear = node.querySelector(`.dhx_form_repeat_custom_year [value=\"month_date\"]`);\r\n\t\tconst nthWeekDayOfYear = node.querySelector(`.dhx_form_repeat_custom_year [value=\"month_nth_weekday\"]`);\r\n\t\tdateOfYear.innerText = scheduler.templates.repeat_yearly_month_date(event.start_date, event);\r\n\t\tnthWeekDayOfYear.innerText = scheduler.templates.repeat_yearly_month_weekday(event.start_date, event);\r\n\r\n\t\tif (!rule || (rule.bysetpos && !(rule.byweekday && rule.byweekday.length))) {\r\n\t\t\tnode.querySelector(`[name=\"dhx_custom_year_option\"]`).value = \"month_date\";\r\n\t\t} else {\r\n\t\t\tnode.querySelector(`[name=\"dhx_custom_year_option\"]`).value = \"month_nth_weekday\";\r\n\t\t}\r\n\t}\r\n\r\n\tfunction fillEndRule(node, rule, event) {\r\n\t\tconst countInput = node.querySelector(`.dhx_form_repeat_ends_extra [name=\"dhx_form_repeat_ends_after\"]`);\r\n\t\tconst ondateInput = node.querySelector(`.dhx_form_repeat_ends_extra [name=\"dhx_form_repeat_ends_ondate\"]`);\r\n\t\tconst endOptionSelect = node.querySelector(`[name='dhx_custom_repeat_ends']`);\r\n\t\tcountInput.value = 1;\r\n\r\n\t\tlet formatter = scheduler.date.date_to_str(\"%Y-%m-%d\");\r\n\t\tif (!scheduler.config.repeat_date_of_end) {\r\n\t\t\tscheduler.config.repeat_date_of_end = formatter(scheduler.date.add(scheduler._currentDate(), 30, \"day\"));\r\n\t\t}\r\n\t\tondateInput.value = scheduler.config.repeat_date_of_end;\r\n\r\n\t\tif (rule && rule.count) {\r\n\t\t\tendOptionSelect.value = \"AFTER\";\r\n\t\t\tcountInput.value = rule.count;\r\n\t\t} else if (event._end_date && event._end_date.getFullYear() !== 9999) {\r\n\t\t\tendOptionSelect.value = \"ON\";\r\n\t\t\tondateInput.value = formatter(event._end_date);\r\n\t\t} else {\r\n\t\t\tendOptionSelect.value = \"NEVER\";\r\n\t\t}\r\n\t\tendOptionSelect.dispatchEvent(new Event(\"change\"));\r\n\t}\r\n\r\n\tconst getRecValue = {\r\n\t\tMONTHLY: function (dates) {\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.MONTHLY,\r\n\t\t\t\tinterval: 1,\r\n\t\t\t\tbymonthday: dates.start.getDate()\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tWEEKLY: function (dates) {\r\n\t\t\tlet day = dates.start.getDay() - 1;\r\n\t\t\tif (day == -1) day = 6;\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.WEEKLY,\r\n\t\t\t\tinterval: 1,\r\n\t\t\t\tbyweekday: [day]\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tDAILY: function (dates) {\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.DAILY,\r\n\t\t\t\tinterval: 1\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tYEARLY: function (dates) {\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.YEARLY,\r\n\t\t\t\tbymonth: dates.start.getMonth() + 1,\r\n\t\t\t\tinterval: 1,\r\n\t\t\t\tbymonthday: dates.start.getDate()\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tWORKDAYS: function (dates) {\r\n\t\t\tconst rrule = {\r\n\t\t\t\tfreq: RRule.WEEKLY,\r\n\t\t\t\tinterval: 1,\r\n\t\t\t\tbyweekday: scheduler.config.recurring_workdays\r\n\t\t\t};\r\n\t\t\tconst until = new Date(9999, 1, 1);\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tCUSTOM: function (dates, node) {\r\n\t\t\tconst rrule = {};\r\n\t\t\tconst freq = node.querySelector(`[name=\"repeat_interval_unit\"]`).value;\r\n\t\t\tconst interval = Math.max(1, node.querySelector(`[name=\"repeat_interval_value\"]`).value);\r\n\t\t\tconst monthRepeat = node.querySelector(`[name=\"dhx_custom_month_option\"]`).value;\r\n\t\t\tconst yearRepeat = node.querySelector(`[name=\"dhx_custom_year_option\"]`).value;\r\n\r\n\t\t\trrule.interval = interval;\r\n\t\t\tlet days;\r\n\t\t\tlet day;\r\n\r\n\t\t\tswitch (freq) {\r\n\t\t\t\tcase \"DAILY\":\r\n\t\t\t\t\trrule.freq = RRule.DAILY;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"WEEKLY\": \r\n\t\t\t\t\trrule.freq = RRule.WEEKLY;\r\n\t\t\t\t\tdays = [];\r\n\t\t\t\t\tnode.querySelectorAll(`.dhx_form_repeat_custom_week [name=\"week_day\"]`).forEach((ch) => {\r\n\t\t\t\t\t\tif(ch.checked){\r\n\t\t\t\t\t\t\tdays.push(ch.value);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\trrule.byweekday = days.map((day) => {\r\n\t\t\t\t\t\tswitch (day) {\r\n\t\t\t\t\t\t\tcase \"MO\":\r\n\t\t\t\t\t\t\t\treturn RRule.MO.weekday;\r\n\t\t\t\t\t\t\tcase \"TU\":\r\n\t\t\t\t\t\t\t\treturn RRule.TU.weekday;\r\n\t\t\t\t\t\t\tcase \"WE\":\r\n\t\t\t\t\t\t\t\treturn RRule.WE.weekday;\r\n\t\t\t\t\t\t\tcase \"TH\":\r\n\t\t\t\t\t\t\t\treturn RRule.TH.weekday;\r\n\t\t\t\t\t\t\tcase \"FR\":\r\n\t\t\t\t\t\t\t\treturn RRule.FR.weekday;\r\n\t\t\t\t\t\t\tcase \"SA\":\r\n\t\t\t\t\t\t\t\treturn RRule.SA.weekday;\r\n\t\t\t\t\t\t\tcase \"SU\":\r\n\t\t\t\t\t\t\t\treturn RRule.SU.weekday;\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"MONTHLY\":\r\n\t\t\t\t\trrule.freq = RRule.MONTHLY;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (monthRepeat === \"month_date\") {\r\n\t\t\t\t\t\trrule.bymonthday = dates.start.getDate();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tday = dates.start.getDay() - 1;\r\n\t\t\t\t\t\tif (day == -1) day = 6;\r\n\t\t\t\t\t\trrule.byweekday = [day];\r\n\t\t\t\t\t\trrule.bysetpos = getWeekdayOfMonth(dates.start).dayNumber;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"YEARLY\":\r\n\t\t\t\t\trrule.freq = RRule.YEARLY;\r\n\t\t\t\t\trrule.bymonth = dates.start.getMonth() + 1;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (yearRepeat == \"month_date\") {\r\n\t\t\t\t\t\trrule.bymonthday = dates.start.getDate();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tday = dates.start.getDay() - 1;\r\n\t\t\t\t\t\tif (day == -1) day = 6;\r\n\t\t\t\t\t\trrule.byweekday = [day];\r\n\t\t\t\t\t\trrule.bysetpos = getWeekdayOfMonth(dates.start).dayNumber;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tconst formatFunc = scheduler.date.str_to_date(\"%Y-%m-%d\");\r\n\t\t\tlet until = new Date(9999, 1, 1);\r\n\t\t\tconst endRule = node.querySelector(`[name=\"dhx_custom_repeat_ends\"]`);\r\n\t\t\tif(endRule.value === \"ON\"){\r\n\t\t\t\tuntil = formatFunc(node.querySelector(`[name=\"dhx_form_repeat_ends_ondate\"]`).value);\r\n\t\t\t} else if(endRule.value === \"AFTER\") {\r\n\t\t\t\trrule.count = Math.max(1, node.querySelector(`[name=\"dhx_form_repeat_ends_after\"]`).value);\r\n\t\t\t}\r\n\r\n\t\t\treturn {rrule, until};\r\n\t\t},\r\n\t\tNEVER: function () {\r\n\t\t}\r\n\t};\r\n\r\n\tfunction fillInDefaults(node, rule, event) {\r\n\t\tfillCustomDaily(node, rule, event);\r\n\t\tfillCustomWeekly(node, rule, event);\r\n\t\tfillCustomMonthly(node, rule, event);\r\n\t\tfillCustomYearly(node, rule, event);\r\n\t\tfillEndRule(node, rule, event);\r\n\t}\r\n\tscheduler.form_blocks[\"recurring\"] = {\r\n\t\trender: function (sns) {\r\n\t\t\tif (sns.form) {\r\n\t\t\t\tlet rec = scheduler.form_blocks[\"recurring\"];\r\n\t\t\t\tlet form = rec._get_node(sns.form);\r\n\t\t\t\tlet html = rec._outer_html(form);\r\n\t\t\t\tform.style.display = 'none';\r\n\t\t\t\treturn html;\r\n\t\t\t}\r\n\t\t\tlet loc = scheduler.locale.labels;\r\n\r\n\t\t\treturn `
\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t
\r\n\r\n\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t
\r\n\r\n\t\t\t
\r\n\t\t\t\t
${loc.repeat_ends}
\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\r\n\t\t
\r\n\t
`;\r\n\t\t},\r\n\r\n\t\r\n\t\t_init_set_value: function (node, value, event) {\r\n\t\t\tscheduler.form_blocks[\"recurring\"]._ds = { start: event.start_date, end: event.end_date };\r\n\t\t\tfunction hide(node) {\r\n\t\t\t\tnode.classList.add(\"dhx_hidden\");\r\n\t\t\t}\r\n\t\t\tfunction show(node) {\r\n\t\t\t\tnode.classList.remove(\"dhx_hidden\");\r\n\t\t\t}\r\n\t\t\tfunction onRepeatOptionChange(value) {\r\n\t\t\t\tconst repeat = node.querySelector(\".dhx_form_repeat_custom\");\r\n\t\t\t\tif (value === \"CUSTOM\") {\r\n\t\t\t\t\tshow(repeat);\r\n\t\t\t\t} else {\r\n\t\t\t\t\thide(repeat);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction onCustomRepeatIntervalChange(value) {\r\n\t\t\t\tconst nodes = {\r\n\t\t\t\t\tweekly: node.querySelector(\".dhx_form_repeat_custom_week\"),\r\n\t\t\t\t\tmonthly: node.querySelector(\".dhx_form_repeat_custom_month\"),\r\n\t\t\t\t\tyearly: node.querySelector(\".dhx_form_repeat_custom_year\")\r\n\t\t\t\t};\r\n\t\t\t\tswitch (value) {\r\n\t\t\t\t\tcase \"DAILY\":\r\n\t\t\t\t\t\thide(nodes.weekly);\r\n\t\t\t\t\t\thide(nodes.monthly);\r\n\t\t\t\t\t\thide(nodes.yearly);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"WEEKLY\":\r\n\t\t\t\t\t\tshow(nodes.weekly);\r\n\t\t\t\t\t\thide(nodes.monthly);\r\n\t\t\t\t\t\thide(nodes.yearly);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"MONTHLY\":\r\n\t\t\t\t\t\thide(nodes.weekly);\r\n\t\t\t\t\t\tshow(nodes.monthly);\r\n\t\t\t\t\t\thide(nodes.yearly);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"YEARLY\":\r\n\t\t\t\t\t\thide(nodes.weekly);\r\n\t\t\t\t\t\thide(nodes.monthly);\r\n\t\t\t\t\t\tshow(nodes.yearly);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction onCustomRepeatEndRule(value) {\r\n\t\t\t\tconst nodes = {\r\n\t\t\t\t\tafter: node.querySelector(\".dhx_form_repeat_ends_extra .dhx_form_repeat_ends_after\"),\r\n\t\t\t\t\ton: node.querySelector(\".dhx_form_repeat_ends_extra .dhx_form_repeat_ends_on\")\r\n\t\t\t\t};\r\n\t\t\t\tswitch (value) {\r\n\t\t\t\t\tcase \"NEVER\":\r\n\t\t\t\t\t\thide(nodes.after);\r\n\t\t\t\t\t\thide(nodes.on);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"AFTER\":\r\n\t\t\t\t\t\tshow(nodes.after);\r\n\t\t\t\t\t\thide(nodes.on);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"ON\":\r\n\t\t\t\t\t\thide(nodes.after);\r\n\t\t\t\t\t\tshow(nodes.on);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// repeat section change\r\n\t\t\tnode.querySelector(\".dhx_form_repeat_pattern select\").addEventListener(\"change\", function () {\r\n\t\t\t\tonRepeatOptionChange(this.value);\r\n\t\t\t});\r\n\r\n\t\t\t// custom repeat interval change\r\n\t\t\tnode.querySelector(\".dhx_form_repeat_custom_interval [name='repeat_interval_unit']\").addEventListener(\"change\", function () {\r\n\t\t\t\tonCustomRepeatIntervalChange(this.value);\r\n\t\t\t});\r\n\r\n\t\t\t// custom repeat end rule\r\n\t\t\tnode.querySelector(\".dhx_form_repeat_ends [name='dhx_custom_repeat_ends']\").addEventListener(\"change\", function () {\r\n\t\t\t\tonCustomRepeatEndRule(this.value);\r\n\t\t\t});\r\n\r\n\t\t\tscheduler._lightbox._rec_init_done = true;\r\n\t\t},\r\n\t\tbutton_click: function(){},\r\n\t\tset_value: function (node, value, ev) {\r\n\t\t\tlet rf = scheduler.form_blocks[\"recurring\"];\r\n\t\t\tif (!scheduler._lightbox._rec_init_done)\r\n\t\t\t\trf._init_set_value(node, value, ev);\r\n\t\t\tnode.open = !ev.rrule;\r\n\r\n\t\t\tnode.blocked = this._is_modified_occurence(ev);\r\n\r\n\t\t\tlet ds = rf._ds;\r\n\t\t\tds.start = ev.start_date;\r\n\t\t\tds.end = ev._end_date;\r\n\r\n\t\t\tif (ev.rrule) {\r\n\t\t\t\tconst rruleset = rrulestr(ev.rrule);\r\n\t\t\t\tfillInDefaults(node, rruleset.origOptions, ev);\r\n\t\t\t\tconst topOption = getTopLevelOption(rruleset, ev._end_date);\r\n\t\t\t\tnode.querySelector(\".dhx_form_repeat_pattern select\").value = topOption;\r\n\t\t\t\tif(topOption === \"CUSTOM\"){\r\n\t\t\t\t\tlet customFreq;\r\n\t\t\t\t\tswitch (rruleset.origOptions.freq) {\r\n\t\t\t\t\t\tcase RRule.DAILY:\r\n\t\t\t\t\t\t\tcustomFreq = \"DAILY\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase RRule.WEEKLY:\r\n\t\t\t\t\t\t\tcustomFreq = \"WEEKLY\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase RRule.MONTHLY:\r\n\t\t\t\t\t\t\tcustomFreq = \"MONTHLY\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase RRule.YEARLY:\r\n\t\t\t\t\t\t\tcustomFreq = \"YEARLY\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(customFreq){\r\n\t\t\t\t\t\tnode.querySelector(`[name=\"repeat_interval_unit\"]`).value = customFreq;\r\n\t\t\t\t\t\tnode.querySelector(`[name=\"repeat_interval_unit\"]`).dispatchEvent(new Event(\"change\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t//\trepeat_interval_unit\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tfillInDefaults(node, null, ev);\r\n\t\t\t\tnode.querySelector(\".dhx_form_repeat_pattern select\").value = \"NEVER\";\r\n\t\t\t}\r\n\t\t\tnode.querySelector(\".dhx_form_repeat_pattern select\").dispatchEvent(new Event(\"change\"));\r\n\r\n\t\t},\r\n\t\tget_value: function (node, ev) {\r\n\t\t\t\r\n\t\t\tif(!node.blocked && node.querySelector(\".dhx_form_repeat_pattern select\").value !== \"NEVER\") {\r\n\t\t\t\tlet ds = scheduler.form_blocks[\"recurring\"]._ds;\r\n\t\t\t\tlet actual_dates = {};\r\n\r\n\t\t\t\tlet timeControl = getTimeSection();\r\n\r\n\t\t\t\ttimeControl.getValue(actual_dates);\r\n\t\t\t\tds.start = actual_dates.start_date;\r\n\t\t\t\tconst pattern = node.querySelector(\".dhx_form_repeat_pattern select\").value;\r\n\t\t\t\tconst recurrence = getRecValue[pattern](ds, node);\r\n\t\t\t\tev.rrule = new RRule(recurrence.rrule).toString().replace(\"RRULE:\", \"\");\r\n\t\t\t\tds.end = recurrence.until;\r\n\r\n\t\t\t\tev.duration = Math.floor((actual_dates.end_date - actual_dates.start_date) / 1000);\r\n\r\n\t\t\t\tif (ds._start) {\r\n\t\t\t\t\tev.start_date = new Date(ds.start);\r\n\t\t\t\t\tev._start_date = new Date(ds.start);\r\n\t\t\t\t\tds._start = false;\r\n\t\t\t\t} else\r\n\t\t\t\t\tev._start_date = null;\r\n\r\n\t\t\t\tev._end_date = ds.end;\r\n\t\t\t}else{\r\n\t\t\t\tev.rrule = ev.rrule = \"\";\r\n\t\t\t\tev._end_date = ev.end_date;\r\n\t\t\t}\r\n\r\n\t\t\treturn ev.rrule;\r\n\t\t},\r\n\r\n\t\tfocus: function (node) {\r\n\t\t}\r\n\t};\r\n\r\n\tfunction getTimeSection() {\r\n\t\tlet timeControl = scheduler.formSection('time');\r\n\t\tif (!timeControl) {\r\n\t\t\ttimeControl = getFirstSectionOfType('time');\r\n\t\t}\r\n\t\tif (!timeControl) {\r\n\t\t\ttimeControl = getFirstSectionOfType('calendar_time');\r\n\t\t}\r\n\r\n\r\n\t\tif (!timeControl) {\r\n\t\t\tthrow new Error([\"Can't calculate the recurring rule, the Recurring form block can't find the Time control. Make sure you have the time control in 'scheduler.config.lightbox.sections' config.\",\r\n\t\t\t\t\"You can use either the default time control https://docs.dhtmlx.com/scheduler/time.html, or the datepicker https://docs.dhtmlx.com/scheduler/minicalendar.html, or a custom control. \",\r\n\t\t\t\t\"In the latter case, make sure the control is named \\\"time\\\":\",\r\n\t\t\t\t\"\",\r\n\t\t\t\t\"scheduler.config.lightbox.sections = [\",\r\n\t\t\t\t\"{name:\\\"time\\\", height:72, type:\\\"YOU CONTROL\\\", map_to:\\\"auto\\\" }];\"]\r\n\t\t\t\t.join(\"\\n\"));\r\n\t\t}\r\n\r\n\t\treturn timeControl;\r\n\t}\r\n\r\n\tfunction getFirstSectionOfType(type) {\r\n\t\tfor (let i = 0; i < scheduler.config.lightbox.sections.length; i++) {\r\n\t\t\tlet section = scheduler.config.lightbox.sections[i];\r\n\t\t\tif (section.type === type) {\r\n\t\t\t\treturn scheduler.formSection(section.name);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\r\n}","export default function(scheduler){\r\n\r\nscheduler.config.occurrence_timestamp_in_utc = false;\r\nscheduler.config.recurring_workdays = [1,2,3,4,5];\r\nscheduler.form_blocks[\"recurring\"] = {\r\n\t_get_node : function(node){\r\n\t\tif (typeof node == \"string\"){\r\n\t\t\tlet element = scheduler._lightbox.querySelector(`#${node}`);\r\n\t\t\tif(!element){\r\n\t\t\t\t// form is detached from lightbox \r\n\t\t\t\t// search globally, won't work in LWC\r\n\t\t\t\telement = document.getElementById(node);\r\n\t\t\t}\r\n\t\t\tnode = element;\r\n\t\t}\r\n\t\tif (node.style.display == 'none')\r\n\t\t\tnode.style.display = \"\";\r\n\t\treturn node;\r\n\t},\r\n\t_outer_html: function(node){\r\n\t\treturn node.outerHTML || getOuterHTML(node);\r\n\r\n\t\t//probably not needed, FF v10- only\r\n\t\tfunction getOuterHTML(n){\r\n\t\t\tvar div = document.createElement('div'), h;\r\n\t\t\tdiv.appendChild( n.cloneNode(true) );\r\n\t\t\th = div.innerHTML;\r\n\t\t\tdiv = null;\r\n\t\t\treturn h;\r\n\t\t}\r\n\t},\r\n\trender:function(sns) {\r\n\t\tif(sns.form){\r\n\t\t\tvar rec = scheduler.form_blocks[\"recurring\"];\r\n\t\t\tvar form = rec._get_node(sns.form);\r\n\t\t\tvar html = rec._outer_html(form);\r\n\t\t\tform.style.display = 'none';\r\n\t\t\treturn html;\r\n\t\t}\r\n\t\tvar loc = scheduler.locale.labels;\r\n\t\treturn '
'+\r\n\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t''+loc.repeat_text_week_count+'
'+\r\n\t\t\t\t\t\t\t\t' '+\r\n\t\t\t\t\t\t\t\t\t' '+\r\n\t\t\t\t\t\t\t\t\t\t' '+\r\n\t\t\t\t\t\t\t\t\t\t' '+\r\n\t\t\t\t\t\t\t\t\t\t' '+\r\n\t\t\t\t\t\t\t\t\t\t' '+\r\n\t\t\t\t\t\t\t\t\t' '+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t\t''+\r\n\t\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t\t''+\r\n\t\t\t\t\t\t\t\t\t''+\r\n\t\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t''+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t\t''+\r\n\t\t\t\t\t\t\t\t''+\r\n\t\t\t\t\t\t\t\tloc.select_year_day2+\r\n\t\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t''+loc.repeat_text_occurences_count+'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t\t'
'+\r\n\t\t\t\t\t'
'+\r\n\t\t\t\t'
'+\r\n\t\t\t\t'
';\r\n\t},\r\n\t_ds: {},\r\n\t_get_form_node: function(els, name, value){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return null;\r\n\t\tif(col.nodeName) return col;\r\n\r\n\t\tif(col.length){\r\n\t\t\tfor(var i=0; i < col.length; i++){\r\n\t\t\t\tif(col[i].value == value)\r\n\t\t\t\t\treturn col[i];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\t_get_node_value: function(els, name, multiselect){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return \"\";\r\n\t\tif(col.length){\r\n\t\t\tif(multiselect){\r\n\t\t\t\tvar res = [];\r\n\t\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\t\tif (col[i].checked) res.push(col[i].value);\r\n\r\n\t\t\t\treturn res;\r\n\t\t\t}else{\r\n\t\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\t\tif (col[i].checked) return col[i].value;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(col.value)\r\n\t\t\treturn !multiselect ? col.value : [col.value];\r\n\t},\r\n\r\n\t_get_node_numeric_value: function(els, name){\r\n\t\tvar value = scheduler.form_blocks[\"recurring\"]._get_node_value(els, name);\r\n\t\treturn ((value * 1) || 0);\r\n\t},\r\n\r\n\t_set_node_value: function(els, name, value){\r\n\t\tvar col = els[name];\r\n\t\tif(!col) return;\r\n\r\n\t\tif(col.name == name){\r\n\t\t\tcol.value = value;\r\n\t\t}else if(col.length){\r\n\t\t\tvar hash_value = typeof value == \"object\";\r\n\t\t\tfor (var i = 0; i < col.length; i++)\r\n\t\t\t\tif (hash_value || col[i].value == value){\r\n\t\t\t\t\tcol[i].checked = hash_value ? !!value[col[i].value] : !!value;\r\n\t\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_init_set_value:function(node, value, ev) {\r\n\t\tvar block = scheduler.form_blocks[\"recurring\"];\r\n\t\tvar get_value = block._get_node_value;\r\n\t\tvar set_value = block._set_node_value;\r\n\t\tscheduler.form_blocks[\"recurring\"]._ds = {start:ev.start_date, end:ev._end_date};\r\n\r\n\t\tvar str_date_format = scheduler.date.str_to_date(scheduler.config.repeat_date, false, true);\r\n\t\tvar str_date = function(str_date) {\r\n\t\t\tvar date = str_date_format(str_date);\r\n\t\t\tif (scheduler.config.include_end_by)\r\n\t\t\t\tdate = scheduler.date.add(date, 1, 'day');\r\n\t\t\treturn date;\r\n\t\t};\r\n\r\n\t\tvar date_str = scheduler.date.date_to_str(scheduler.config.repeat_date);\r\n\r\n\t\tvar top = node.getElementsByTagName(\"FORM\")[0];\r\n\t\tvar els = {};\r\n\r\n\t\tfunction register_els(inps) {\r\n\t\t\tfor (var i = 0; i < inps.length; i++) {\r\n\t\t\t\tvar inp = inps[i];\r\n\r\n\t\t\t\tif(inp.name){\r\n\t\t\t\t\tif(!els[inp.name]){\r\n\t\t\t\t\t\tels[inp.name] = inp;\r\n\t\t\t\t\t}else if(els[inp.name].nodeType){\r\n\t\t\t\t\t\tvar node = els[inp.name];\r\n\t\t\t\t\t\tels[inp.name] = [node, inp];\r\n\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tels[inp.name].push(inp);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tregister_els(top.getElementsByTagName(\"INPUT\"));\r\n\t\tregister_els(top.getElementsByTagName(\"SELECT\"));\r\n\r\n\t\tif (!scheduler.config.repeat_date_of_end) {\r\n\t\t\tvar formatter = scheduler.date.date_to_str(scheduler.config.repeat_date);\r\n\t\t\tscheduler.config.repeat_date_of_end = formatter(scheduler.date.add(scheduler._currentDate(), 30, \"day\"));\r\n\t\t}\r\n\t\tset_value(els, \"date_of_end\", scheduler.config.repeat_date_of_end);\r\n\r\n\t\tvar $ = function(a) {\r\n\t\t\treturn scheduler._lightbox.querySelector(`#${a}`) || { style:{} };//return fake object if node not found\r\n\t\t};\r\n\r\n\t\tfunction change_current_view() {\r\n\t\t\t$(\"dhx_repeat_day\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_week\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_month\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_year\").style.display = \"none\";\r\n\t\t\t$(\"dhx_repeat_\" + this.value).style.display = \"\";\r\n\t\t\tscheduler.setLightboxSize();\r\n\t\t}\r\n\r\n\t\tfunction get_repeat_code(dates) {\r\n\t\t\tvar code = [get_value(els, \"repeat\")];\r\n\t\t\tget_rcode[code[0]](code, dates);\r\n\r\n\t\t\twhile (code.length < 5) code.push(\"\");\r\n\t\t\tvar repeat = \"\";\r\n\r\n\t\t\tvar end = get_end_rule(els);\r\n\r\n\t\t\tif (end == \"no\") {\r\n\t\t\t\tdates.end = new Date(9999, 1, 1);\r\n\t\t\t\trepeat = \"no\";\r\n\t\t\t}\r\n\t\t\telse if (end == \"date_of_end\") {\r\n\t\t\t\tdates.end = str_date(get_value(els, \"date_of_end\"));\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tscheduler.transpose_type(code.join(\"_\"));\r\n\t\t\t\trepeat = Math.max(1, get_value(els, \"occurences_count\"));\r\n\r\n\t\t\t\tvar transp = 0;\r\n\r\n\t\t\t\t//var transp = ((code[0] == \"week\" && code[4] && code[4].toString().indexOf(scheduler.config.start_on_monday ? 1 : 0) == -1) ? 1 : 0);\r\n\r\n\t\t\t\t// which is equal to following code, seems to produce extra instance, not clear why needed\r\n\r\n\t\t\t\t/*if(code[0] == \"week\"){\r\n\t\t\t\t\tvar days = code[4] || \"\";\r\n\t\t\t\t\tif(scheduler.config.start_on_monday){\r\n\t\t\t\t\t\tif(days.indexOf(1) == -1)\r\n\t\t\t\t\t\ttransp = 1;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(days.indexOf(0) == -1)\r\n\t\t\t\t\t\ttransp = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}*/\r\n\r\n\t\t\t//\tdates.end = scheduler.date.add(new Date(dates.start), repeat + transp, code.join(\"_\"));\r\n\r\n\t\t\t\tdates.end = scheduler.date[\"add_\" + code.join(\"_\")](new Date(dates.start), repeat + transp, {start_date: dates.start}) || dates.start;\r\n\t\t\t}\r\n\r\n\t\t\treturn code.join(\"_\") + \"#\" + repeat;\r\n\t\t}\r\n\t\tfunction get_end_rule(els){\r\n\t\t\tvar end = els[\"end\"];\r\n\t\t\tif(end.length){\r\n\t\t\t\tfor(var i =0; i < end.length; i++){\r\n\t\t\t\t\tif(end[i].checked){\r\n\t\t\t\t\t\tif(end[i].value && end[i].value != \"on\"){//seems to be default value:var input = document.createElement(\"input\"); input.type = \"radio\"; input.value\r\n\t\t\t\t\t\t\treturn end[i].value;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif(!i){\r\n\t\t\t\t\t\t\t\treturn \"no\";\r\n\t\t\t\t\t\t\t}else if(i == 2){\r\n\t\t\t\t\t\t\t\treturn \"date_of_end\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\treturn \"occurences_count\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(end.value)\r\n\t\t\t\t\treturn end.value;\r\n\t\t\t}\r\n\t\t\treturn \"no\";\r\n\t\t}\r\n\t\tfunction set_end_rule(els, value){\r\n\t\t\tvar end = els[\"end\"];\r\n\r\n\t\t\tif(end.length){\r\n\t\t\t\tvar has_values = !!end[0].value && end[0].value != \"on\";\r\n\t\t\t\tif(has_values){\r\n\t\t\t\t\tfor(var i =0; i < end.length; i++){\r\n\t\t\t\t\t\tif(end[i].value == value)\r\n\t\t\t\t\t\t\tend[i].checked = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar ind = 0;\r\n\t\t\t\t\tswitch(value){\r\n\t\t\t\t\t\tcase \"no\":\r\n\t\t\t\t\t\t\tind = 0;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"date_of_end\":\r\n\t\t\t\t\t\t\tind = 2;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tind = 1;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tend[ind].checked = true;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tend.value = value;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tscheduler.form_blocks[\"recurring\"]._get_repeat_code = get_repeat_code;\r\n\t\tvar get_rcode = {\r\n\t\t\tmonth:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tif (get_value(els, \"month_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_count\")));\r\n\t\t\t\t\tdates.start.setDate(get_value(els, \"month_day\"));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_count2\")));\r\n\t\t\t\t\tcode.push( get_value(els, \"month_day2\"));\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"month_week2\")));\r\n\t\t\t\t\tif (!scheduler.config.repeat_precise){\r\n\t\t\t\t\t\tdates.start.setDate(1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tdates._start = true;\r\n\t\t\t},\r\n\t\t\tweek:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"week_count\")));\r\n\t\t\t\tcode.push(\"\");\r\n\t\t\t\tcode.push(\"\");\r\n\t\t\t\tvar t = [];\r\n\r\n\t\t\t\tvar col = get_value(els, \"week_day\", true);\r\n\t\t\t\t//var col = els[\"week_day\"];\r\n\t\t\t\tvar day = dates.start.getDay();\r\n\t\t\t\tvar start_exists = false;\r\n\r\n\t\t\t\tfor (var i = 0; i < col.length; i++){\r\n\t\t\t\t\tt.push(col[i]);\r\n\t\t\t\t\tstart_exists = start_exists || col[i] == day;\r\n\t\t\t\t}\r\n\t\t\t\tif (!t.length){\r\n\t\t\t\t\tt.push(day);\r\n\t\t\t\t\tstart_exists = true;\r\n\t\t\t\t}\r\n\t\t\t\tt.sort();\r\n\r\n\r\n\t\t\t\tif (!scheduler.config.repeat_precise){\r\n\t\t\t\t\tdates.start = scheduler.date.week_start(dates.start);\r\n\t\t\t\t\tdates._start = true;\r\n\t\t\t\t} else if (!start_exists){\r\n\t\t\t\t\tscheduler.transpose_day_week(dates.start, t, 1, 7);\r\n\t\t\t\t\tdates._start = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcode.push(t.join(\",\"));\r\n\t\t\t},\r\n\t\t\tday:function(code) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\t\t\t\tvar get_numeric_value = scheduler.form_blocks[\"recurring\"]._get_node_numeric_value;\r\n\r\n\t\t\t\tif (get_value(els, \"day_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(Math.max(1, get_numeric_value(els, \"day_count\")));\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcode.push(\"week\");\r\n\t\t\t\t\tcode.push(1);\r\n\t\t\t\t\tcode.push(\"\");\r\n\t\t\t\t\tcode.push(\"\");\r\n\t\t\t\t\tcode.push(scheduler.config.recurring_workdays.join(\",\"));\r\n\t\t\t\t\tcode.splice(0, 1);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tyear:function(code, dates) {\r\n\t\t\t\tvar get_value = scheduler.form_blocks[\"recurring\"]._get_node_value;\r\n\r\n\t\t\t\tif (get_value(els, \"year_type\") == \"d\") {\r\n\t\t\t\t\tcode.push(\"1\");\r\n\t\t\t\t\tdates.start.setMonth(0);\r\n\t\t\t\t\tdates.start.setDate(get_value(els, \"year_day\"));\r\n\t\t\t\t\tdates.start.setMonth(get_value(els, \"year_month\"));\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcode.push(\"1\");\r\n\t\t\t\t\tcode.push(get_value(els, \"year_day2\"));\r\n\t\t\t\t\tcode.push(get_value(els, \"year_week2\"));\r\n\t\t\t\t\tdates.start.setDate(1);\r\n\t\t\t\t\tdates.start.setMonth(get_value(els, \"year_month2\"));\r\n\t\t\t\t}\r\n\t\t\t\tdates._start = true;\r\n\t\t\t}\r\n\t\t};\r\n\t\tvar set_rcode = {\r\n\t\t\tweek:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\t\tset_value(els, \"week_count\", code[1]);\r\n\r\n\t\t\t\tvar t = code[4].split(\",\");\r\n\t\t\t\tvar d = {};\r\n\t\t\t\tfor (var i = 0; i < t.length; i++) d[t[i]] = true;\r\n\r\n\t\t\t\tset_value(els, \"week_day\", d);\r\n\r\n\t\t\t\t//for (var i = 0; i < col.length; i++)\r\n\t\t\t\t//\tcol[i].checked = (!!d[col[i].value]);\r\n\t\t\t},\r\n\t\t\tmonth:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\r\n\t\t\t\tif (code[2] === \"\") {\r\n\t\t\t\t\tset_value(els, \"month_type\", \"d\");\r\n\t\t\t\t\tset_value(els, \"month_count\", code[1]);\r\n\t\t\t\t\tset_value(els, \"month_day\", dates.start.getDate());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tset_value(els, \"month_type\", \"w\");\r\n\t\t\t\t\tset_value(els, \"month_count2\", code[1]);\r\n\t\t\t\t\tset_value(els, \"month_week2\", code[3]);\r\n\t\t\t\t\tset_value(els, \"month_day2\", code[2]);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tday:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\t\tset_value(els, \"day_type\", \"d\");\r\n\t\t\t\tset_value(els, \"day_count\", code[1]);\r\n\t\t\t},\r\n\t\t\tyear:function(code, dates) {\r\n\t\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\r\n\t\t\t\tif (code[2] === \"\") {\r\n\t\t\t\t\tset_value(els, \"year_type\", \"d\");\r\n\t\t\t\t\tset_value(els, \"year_day\", dates.start.getDate());\r\n\t\t\t\t\tset_value(els, \"year_month\", dates.start.getMonth());\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tset_value(els, \"year_type\", \"w\");\r\n\t\t\t\t\tset_value(els, \"year_week2\", code[3]);\r\n\t\t\t\t\tset_value(els, \"year_day2\", code[2]);\r\n\t\t\t\t\tset_value(els, \"year_month2\", dates.start.getMonth());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfunction set_repeat_code(code, dates) {\r\n\t\t\tvar set_value = scheduler.form_blocks[\"recurring\"]._set_node_value;\r\n\t\t\tvar data = code.split(\"#\");\r\n\t\t\tcode = data[0].split(\"_\");\r\n\t\t\tset_rcode[code[0]](code, dates);\r\n\r\n\t\t\tswitch (data[1]) {\r\n\t\t\t\tcase \"no\":\r\n\t\t\t\t\tset_end_rule(els, \"no\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"\":\r\n\t\t\t\t\tset_end_rule(els, \"date_of_end\");\r\n\r\n\t\t\t\t\tvar end_date = dates.end;\r\n\t\t\t\t\tif (scheduler.config.include_end_by){\r\n\t\t\t\t\t\tend_date = scheduler.date.add(end_date, -1, 'day');\r\n\t\t\t\t\t}\r\n\t\t\t\t\tset_value(els, \"date_of_end\", date_str(end_date));\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tset_end_rule(els, \"occurences_count\");\r\n\t\t\t\t\tset_value(els, \"occurences_count\", data[1]);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tset_value(els, \"repeat\", code[0]);\r\n\t\t\t//e.checked = true;\r\n\r\n\t\t\tvar node = scheduler.form_blocks[\"recurring\"]._get_form_node(els, \"repeat\", code[0]);\r\n\t\t\tif(node.nodeName == \"SELECT\"/* && node.onchange*/){\r\n\t\t\t//\tnode.onchange();\r\n\t\t\t\tnode.dispatchEvent(new Event('change'));\r\n\t\t\t\tnode.dispatchEvent(new MouseEvent('click'));\r\n\t\t\t}else{\r\n\t\t\t\tnode.dispatchEvent(new MouseEvent('click'));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tscheduler.form_blocks[\"recurring\"]._set_repeat_code = set_repeat_code;\r\n\r\n\t\tfor (var i = 0; i < top.elements.length; i++) {\r\n\t\t\tvar el = top.elements[i];\r\n\t\t\tswitch (el.name) {\r\n\t\t\t\tcase \"repeat\":\r\n\t\t\t\t\tif (el.nodeName == \"SELECT\" && !el.$_eventAttached) {\r\n\t\t\t\t\t\tel.$_eventAttached = true;\r\n\t\t\t\t\t\tel.addEventListener(\"change\", change_current_view);\r\n\t\t\t\t\t} else if(!el.$_eventAttached){\r\n\t\t\t\t\t\tel.$_eventAttached = true;\r\n\t\t\t\t\t\tel.addEventListener(\"click\", change_current_view);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._lightbox._rec_init_done = true;\r\n\t},\r\n\tset_value:function(node, value, ev) {\r\n\t\tvar rf = scheduler.form_blocks[\"recurring\"];\r\n\t\tif (!scheduler._lightbox._rec_init_done)\r\n\t\t\trf._init_set_value(node, value, ev);\r\n\t\tnode.open = !ev.rec_type;\r\n\r\n\t\tnode.blocked = this._is_modified_occurence(ev);\r\n\r\n\t\tvar ds = rf._ds;\r\n\t\tds.start = ev.start_date;\r\n\t\tds.end = ev._end_date;\r\n\r\n\t\trf._toggle_block();\r\n\r\n\t\tif (value)\r\n\t\t\trf._set_repeat_code(value, ds);\r\n\t},\r\n\tget_value:function(node, ev) {\r\n\t\tif (node.open) {\r\n\t\t\tvar ds = scheduler.form_blocks[\"recurring\"]._ds;\r\n\t\t\tvar actual_dates = {};\r\n\r\n\t\t\tvar timeControl = getTimeSection();\r\n\r\n\t\t\ttimeControl.getValue(actual_dates);\r\n\t\t\tds.start = actual_dates.start_date;\r\n\t\t\tev.rec_type = scheduler.form_blocks[\"recurring\"]._get_repeat_code(ds);\r\n\t\t\tif (ds._start) {\r\n\t\t\t\tev.start_date = new Date(ds.start);\r\n\t\t\t\tev._start_date = new Date(ds.start);\r\n\t\t\t\tds._start = false;\r\n\t\t\t} else\r\n\t\t\t\tev._start_date = null;\r\n\r\n\t\t\tev._end_date = ds.end;\r\n\t\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\t\t} else {\r\n\t\t\tev.rec_type = ev.rec_pattern = \"\";\r\n\t\t\tev._end_date = ev.end_date;\r\n\t\t}\r\n\t\treturn ev.rec_type;\r\n\t},\r\n\t_get_button: function(){\r\n\t\tvar node = getRecurringSection().header;\r\n\t\treturn node.firstChild.firstChild;\r\n\t},\r\n\t_get_form: function(){\r\n\t\treturn getRecurringSection().node;\r\n\t},\r\n\topen:function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form();\r\n\t\tif(!cont.open)\r\n\t\t\tblock._toggle_block();\r\n\t},\r\n\tclose: function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form();\r\n\r\n\t\tif(cont.open)\r\n\t\t\tblock._toggle_block();\r\n\t},\r\n\t_toggle_block: function(){\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\r\n\t\tvar cont = block._get_form(),\r\n\t\t\tel = block._get_button();\r\n\t\tif (!cont.open && !cont.blocked) {\r\n\t\t\tcont.style.height = \"auto\";//reset to default value\r\n\t\t\tif(el){\r\n\t\t\t\tel.style.backgroundPosition = \"-5px 0px\";\r\n\t\t\t\tel.nextSibling.innerHTML = scheduler.locale.labels.button_recurring_open;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tcont.style.height = \"0px\";\r\n\t\t\tif(el){\r\n\t\t\t\tel.style.backgroundPosition = \"-5px 20px\";\r\n\t\t\t\tel.nextSibling.innerHTML = scheduler.locale.labels.button_recurring;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcont.open = !cont.open;\r\n\r\n\t\tscheduler.setLightboxSize();\r\n\t},\r\n\tfocus:function(node) {\r\n\t},\r\n\tbutton_click:function(node, button, event) {\r\n\t\tvar block = scheduler.form_blocks.recurring;\r\n\t\tvar cont = block._get_form();\r\n\t\tif (!cont.blocked)\r\n\t\t\tscheduler.form_blocks.recurring._toggle_block();\r\n\t}\r\n};\r\n\r\nfunction getTimeSection(){\r\n\tvar timeControl = scheduler.formSection('time');\r\n\tif(!timeControl){\r\n\t\ttimeControl = getFirstSectionOfType('time');\r\n\t}\r\n\tif(!timeControl){\r\n\t\ttimeControl = getFirstSectionOfType('calendar_time');\r\n\t}\r\n\r\n\t\r\n\tif (!timeControl) {\r\n\t\tthrow new Error([\"Can't calculate the recurring rule, the Recurring form block can't find the Time control. Make sure you have the time control in 'scheduler.config.lightbox.sections' config.\",\r\n\"You can use either the default time control https://docs.dhtmlx.com/scheduler/time.html, or the datepicker https://docs.dhtmlx.com/scheduler/minicalendar.html, or a custom control. \",\r\n\"In the latter case, make sure the control is named \\\"time\\\":\",\r\n\"\",\r\n\"scheduler.config.lightbox.sections = [\",\r\n\"{name:\\\"time\\\", height:72, type:\\\"YOU CONTROL\\\", map_to:\\\"auto\\\" }];\"]\r\n.join(\"\\n\"));\r\n\t}\r\n\r\n\treturn timeControl;\r\n}\r\n\r\nfunction getRecurringSection(){\r\n\tvar recurringSection = scheduler.formSection('recurring');\r\n\tif(!recurringSection){\r\n\t\trecurringSection = getFirstSectionOfType('recurring');\r\n\t}\r\n\r\n\tif (!recurringSection) {\r\n\t\tthrow new Error([\"Can't locate the Recurring form section.\",\r\n\t\t\"Make sure that you have the recurring control on the lightbox configuration https://docs.dhtmlx.com/scheduler/recurring_events.html#recurringlightbox \",\r\n\t\t\"and that the recurring control has name \\\"recurring\\\":\",\r\n\"\",\r\n\"scheduler.config.lightbox.sections = [\",\r\n\"\t{name:\\\"recurring\\\", ... }\",\r\n\"];\"].join(\"\\n\"));\r\n\r\n\t}\r\n\r\n\treturn recurringSection;\r\n}\r\n\r\nfunction getFirstSectionOfType(type){\r\n\tfor(var i = 0; i < scheduler.config.lightbox.sections.length; i++){\r\n\t\tvar section = scheduler.config.lightbox.sections[i];\r\n\t\tif(section.type === type){\r\n\t\t\treturn scheduler.formSection(section.name);\r\n\t\t}\r\n\t}\r\n\treturn null;\r\n}\r\n\r\n//problem may occur if we will have two repeating events in the same moment of time\r\nscheduler._rec_markers = {};\r\nscheduler._rec_markers_pull = {};\r\nscheduler._add_rec_marker = function(ev, time) {\r\n\tev._pid_time = time;\r\n\tthis._rec_markers[ev.id] = ev;\r\n\tif (!this._rec_markers_pull[ev.event_pid]) this._rec_markers_pull[ev.event_pid] = {};\r\n\tthis._rec_markers_pull[ev.event_pid][time] = ev;\r\n};\r\nscheduler._get_rec_marker = function(time, id) {\r\n\tvar ch = this._rec_markers_pull[id];\r\n\tif (ch) return ch[time];\r\n\treturn null;\r\n};\r\nscheduler._get_rec_markers = function(id) {\r\n\treturn (this._rec_markers_pull[id] || []);\r\n};\r\n\r\nfunction clearMilliseconds(date){\r\n//\treturn date;\r\n\treturn new Date(\r\n\t\tdate.getFullYear(), \r\n\t\tdate.getMonth(), \r\n\t\tdate.getDate(), \r\n\t\tdate.getHours(), \r\n\t\tdate.getMinutes(),\r\n\t\tdate.getSeconds(),\r\n\t\t0\r\n\t);\r\n}\r\n\r\nscheduler._rec_temp = [];\r\n(function() {\r\n\tvar old_add_event = scheduler.addEvent;\r\n\tscheduler.addEvent = function(start_date, end_date, text, id, extra_data) {\r\n\t\tvar ev_id = old_add_event.apply(this, arguments);\r\n\r\n\t\tif (ev_id && scheduler.getEvent(ev_id)) {\r\n\t\t\tvar ev = scheduler.getEvent(ev_id);\r\n\t\t\t\r\n\t\t\tif(ev.start_date){\r\n\t\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t\t}\r\n\t\t\tif(ev.end_date){\r\n\t\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t\t}\r\n\t\t\tif (this._is_modified_occurence(ev))\r\n\t\t\t\tscheduler._add_rec_marker(ev, ev.event_length * 1000);\r\n\t\t\tif (ev.rec_type)\r\n\t\t\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\t\t}\r\n\t\treturn ev_id;\r\n\t};\r\n})();\r\n\r\nscheduler.attachEvent(\"onEventIdChange\", function(id, new_id) {\r\n\tif (this._ignore_call) return;\r\n\tthis._ignore_call = true;\r\n\r\n\tif(scheduler._rec_markers[id]){\r\n\t\t//important for for correct work of scheduler.getEvents(from, to) and collision detection\r\n\t\tscheduler._rec_markers[new_id] = scheduler._rec_markers[id];\r\n\t\tdelete scheduler._rec_markers[id];\r\n\t}\r\n\r\n\tif(scheduler._rec_markers_pull[id]){\r\n\t\tscheduler._rec_markers_pull[new_id] = scheduler._rec_markers_pull[id];\r\n\t\tdelete scheduler._rec_markers_pull[id];\r\n\t}\r\n\r\n\tfor (var i = 0; i < this._rec_temp.length; i++) {\r\n\t\tvar tev = this._rec_temp[i];\r\n\t\tif (tev.event_pid == id) {\r\n\t\t\ttev.event_pid = new_id;\r\n\t\t\tthis.changeEventId(tev.id, new_id + \"#\" + tev.id.split(\"#\")[1]);\r\n\t\t}\r\n\t}\r\n\r\n\tfor(var i in this._rec_markers){\r\n\t\tvar tev = this._rec_markers[i];\r\n\t\tif(tev.event_pid == id){\r\n\t\t\ttev.event_pid = new_id;\r\n\t\t\ttev._pid_changed = true;\r\n\t\t}\r\n\t}\r\n\r\n\tvar el = scheduler._rec_markers[new_id];\r\n\tif(el && el._pid_changed) {\r\n\t\tdelete el._pid_changed;\r\n\t\tsetTimeout(function() {\r\n\t\t\tif(scheduler.$destroyed){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tscheduler.callEvent(\"onEventChanged\", [new_id, scheduler.getEvent(new_id)]);\r\n\t\t}, 1);\r\n\t}\r\n\r\n\tdelete this._ignore_call;\r\n});\r\nscheduler.attachEvent(\"onConfirmedBeforeEventDelete\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (this._is_virtual_event(id) || (this._is_modified_occurence(ev) && ev.rec_type && ev.rec_type != 'none')) {\r\n\t\tid = id.split(\"#\");\r\n\t\tvar nid = this.uid();\r\n\t\tvar tid = (id[1]) ? id[1] : Math.round(ev._pid_time / 1000);\r\n\r\n\t\tvar nev = this._copy_event(ev);\r\n\t\tnev.id = nid;\r\n\t\tnev.event_pid = ev.event_pid || id[0];\r\n\t\tvar timestamp = tid;\r\n\t\tnev.event_length = timestamp;\r\n\t\tnev.rec_type = nev.rec_pattern = \"none\";\r\n\t\tthis.addEvent(nev);\r\n\r\n\t\tthis._add_rec_marker(nev, timestamp * 1000);\r\n\t} else {\r\n\t\tif (ev.rec_type && this._lightbox_id)\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\tvar sub = this._get_rec_markers(id);\r\n\t\tfor (var i in sub) {\r\n\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\tid = sub[i].id;\r\n\t\t\t\tif (this.getEvent(id))\r\n\t\t\t\t\tthis.deleteEvent(id, true);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventDeleted\", function(id, ev){\r\n\tif(!this._is_virtual_event(id) && this._is_modified_occurence(ev)){\r\n\t\tif(!scheduler._events[id]){\r\n\t\t\tev.rec_type = ev.rec_pattern = \"none\";\r\n\t\t\tthis.setEvent(id, ev);\r\n\t\t}\r\n\t}\r\n});\r\nscheduler.attachEvent(\"onEventChanged\", function(id, event) {\r\n\tif (this._loading) return true;\r\n\r\n\tvar ev = this.getEvent(id);\r\n\r\n\tif (this._is_virtual_event(id)) {\r\n\t\tvar id = id.split(\"#\");\r\n\t\tvar nid = this.uid();\r\n\t\tthis._not_render = true;\r\n\r\n\t\tvar nev = this._copy_event(event);\r\n\t\tnev.id = nid;\r\n\t\tnev.event_pid = id[0];\r\n\t\tvar timestamp = id[1];\r\n\t\tnev.event_length = timestamp;\r\n\t\tnev.rec_type = nev.rec_pattern = \"\";\r\n\r\n\t\tthis._add_rec_marker(nev, timestamp * 1000);\r\n\t\tthis.addEvent(nev);\r\n\r\n\t\tthis._not_render = false;\r\n\r\n\t} else {\r\n\t\tif(ev.start_date){\r\n\t\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t\t}\r\n\t\tif(ev.end_date){\r\n\t\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t\t}\r\n\r\n\t\tif (ev.rec_type && this._lightbox_id){\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t}\r\n\t\tvar sub = this._get_rec_markers(id);\r\n\t\tfor (var i in sub) {\r\n\t\t\tif (sub.hasOwnProperty(i)) {\r\n\t\t\t\tdelete this._rec_markers[sub[i].id];\r\n\t\t\t\tthis.deleteEvent(sub[i].id, true);\r\n\t\t\t}\r\n\t\t}\r\n\t\tdelete this._rec_markers_pull[id];\r\n\r\n\t\t// it's possible that after editing event is no longer exists, in such case we need to remove _select_id flag\r\n\t\tvar isEventFound = false;\r\n\t\tfor (var k = 0; k < this._rendered.length; k++) {\r\n\t\t\tif (this._rendered[k].getAttribute(this.config.event_attribute) == id)\r\n\t\t\t\tisEventFound = true;\r\n\t\t}\r\n\t\tif (!isEventFound)\r\n\t\t\tthis._select_id = null;\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventAdded\", function(id) {\r\n\tif (!this._loading) {\r\n\t\tvar ev = this.getEvent(id);\r\n\t\tif (ev.rec_type && !ev.event_length){\r\n\t\t\tthis._roll_back_dates(ev);\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventSave\", function(id, data, is_new_event) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (!ev.rec_type && data.rec_type && !this._is_virtual_event(id))\r\n\t\tthis._select_id = null;\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventCreated\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (!ev.rec_type)\r\n\t\tev.rec_type = ev.rec_pattern = ev.event_length = ev.event_pid = \"\";\r\n\treturn true;\r\n});\r\nscheduler.attachEvent(\"onEventCancel\", function(id) {\r\n\tvar ev = this.getEvent(id);\r\n\tif (ev.rec_type) {\r\n\t\tthis._roll_back_dates(ev);\r\n\t\t// a bit expensive, but we need to be sure that event re-rendered, because view can be corrupted by resize , during edit process\r\n\t\tthis.render_view_data();\r\n\t}\r\n});\r\nscheduler._roll_back_dates = function(ev) {\r\n\tif(ev.start_date){\r\n\t\tev.start_date = clearMilliseconds(ev.start_date);\r\n\t}\r\n\tif(ev.end_date){\r\n\t\tev.end_date = clearMilliseconds(ev.end_date);\r\n\t}\r\n\tev.event_length = Math.round((ev.end_date.valueOf() - ev.start_date.valueOf()) / 1000);\r\n\tev.end_date = ev._end_date;\r\n\tif (ev._start_date) {\r\n\t\tev.start_date.setMonth(0);\r\n\t\tev.start_date.setDate(ev._start_date.getDate());\r\n\t\tev.start_date.setMonth(ev._start_date.getMonth());\r\n\t\tev.start_date.setFullYear(ev._start_date.getFullYear());\r\n\r\n\t}\r\n};\r\n\r\nscheduler._is_virtual_event = function(id){\r\n\treturn id.toString().indexOf(\"#\") != -1;\r\n};\r\nscheduler._is_modified_occurence = function(ev){\r\n\treturn (ev.event_pid && ev.event_pid != \"0\");\r\n};\r\n\r\nscheduler.showLightbox_rec = scheduler.showLightbox;\r\nscheduler.showLightbox = function(id) {\r\n\tvar locale = this.locale;\r\n\tvar c = scheduler.config.lightbox_recurring;\r\n\tvar ev = this.getEvent(id);\r\n\tvar pid = ev.event_pid;\r\n\tvar isVirtual = this._is_virtual_event(id);\r\n\tif (isVirtual)\r\n\t\tpid = id.split(\"#\")[0];\r\n\r\n\t// show series\r\n\tvar showSeries = function(id) {\r\n\t\tvar event = scheduler.getEvent(id);\r\n\t\tevent._end_date = event.end_date;\r\n\t\tevent.end_date = new Date(event.start_date.valueOf() + event.event_length * 1000);\r\n\t\treturn scheduler.showLightbox_rec(id); // editing series\r\n\t};\r\n\r\n\tif ( (pid || pid*1 === 0) && ev.rec_type) {\r\n\t\t// direct API call on series id\r\n\t\treturn showSeries(id);\r\n\t}\r\n\tif ( !pid || pid === '0' || ( (!locale.labels.confirm_recurring || c == 'instance') || (c == 'series' && !isVirtual)) ) {\r\n\t\t// editing instance or non recurring event\r\n\t\treturn this.showLightbox_rec(id);\r\n\t}\r\n\tif (c == 'ask') {\r\n\t\tvar that = this;\r\n\t\tscheduler.modalbox({\r\n\t\t\ttext: locale.labels.confirm_recurring,\r\n\t\t\ttitle: locale.labels.title_confirm_recurring,\r\n\t\t\twidth: \"500px\",\r\n\t\t\tposition: \"middle\",\r\n\t\t\tbuttons:[locale.labels.button_edit_series, locale.labels.button_edit_occurrence, locale.labels.icon_cancel],\r\n\t\t\tcallback: function(index) {\r\n\t\t\t\tswitch(+index) {\r\n\t\t\t\t\tcase 0:\r\n\t\t\t\t\t\treturn showSeries(pid);\r\n\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\treturn that.showLightbox_rec(id);\r\n\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\tshowSeries(pid);\r\n\t}\r\n};\r\n\r\n\r\nscheduler.get_visible_events_rec = scheduler.get_visible_events;\r\nscheduler.get_visible_events = function(only_timed) {\r\n\tfor (var i = 0; i < this._rec_temp.length; i++)\r\n\t\tdelete this._events[this._rec_temp[i].id];\r\n\tthis._rec_temp = [];\r\n\r\n\tvar stack = this.get_visible_events_rec(only_timed);\r\n\tvar out = [];\r\n\tfor (var i = 0; i < stack.length; i++) {\r\n\t\tif (stack[i].rec_type) {\r\n\t\t\t//deleted element of series\r\n\t\t\tif (stack[i].rec_pattern != \"none\")\r\n\t\t\t\tthis.repeat_date(stack[i], out);\r\n\t\t}\r\n\t\telse out.push(stack[i]);\r\n\t}\r\n\treturn out;\r\n};\r\n\r\n\r\n(function() {\r\n\tvar old = scheduler.isOneDayEvent;\r\n\tscheduler.isOneDayEvent = function(ev) {\r\n\t\tif (ev.rec_type) return true;\r\n\t\treturn old.call(this, ev);\r\n\t};\r\n\tvar old_update_event = scheduler.updateEvent;\r\n\tscheduler.updateEvent = function(id) {\r\n\t\tvar ev = scheduler.getEvent(id);\r\n\t\tif(ev && ev.rec_type){\r\n\t\t\t//rec_type can be changed without the lightbox,\r\n\t\t\t// make sure rec_pattern updated as well\r\n\t\t\tev.rec_pattern = (ev.rec_type || \"\").split(\"#\")[0];\r\n\t\t}\r\n\t\tif (ev && ev.rec_type && !this._is_virtual_event(id)) {\r\n\t\t\tscheduler.update_view();\r\n\t\t} else {\r\n\t\t\told_update_event.call(this, id);\r\n\t\t}\r\n\t};\r\n})();\r\n\r\nscheduler.transponse_size = {\r\n\tday:1, week:7, month:1, year:12\r\n};\r\nscheduler.date.day_week = function(sd, day, week) {\r\n\tsd.setDate(1);\r\n\tvar originalMonth = scheduler.date.month_start(new Date(sd));\r\n\tweek = (week - 1) * 7;\r\n\tvar cday = sd.getDay();\r\n\tvar nday = day * 1 + week - cday + 1;\r\n\tsd.setDate(nday <= week ? (nday + 7) : nday);\r\n\tvar newMonth = scheduler.date.month_start(new Date(sd));\r\n\tif(originalMonth.valueOf() !== newMonth.valueOf()){\r\n\t\treturn false;\r\n\t}\r\n\treturn true;\r\n};\r\nscheduler.transpose_day_week = function(sd, list, cor, size, cor2) {\r\n\tvar cday = (sd.getDay() || (scheduler.config.start_on_monday ? 7 : 0)) - cor;\r\n\tfor (var i = 0; i < list.length; i++) {\r\n\t\tif (list[i] > cday)\r\n\t\t\treturn sd.setDate(sd.getDate() + list[i] * 1 - cday - (size ? cor : cor2));\r\n\t}\r\n\tthis.transpose_day_week(sd, list, cor + size, null, cor);\r\n};\r\nscheduler.transpose_type = function(type) {\r\n\tvar transposeRecurring = \"transpose_\" + type;\r\n\tif (!this.date[transposeRecurring]) {\r\n\t\tvar recurringParts = type.split(\"_\");\r\n\t\tvar dayDurationMs = 60 * 60 * 24 * 1000;\r\n\t\tvar addRecurring = \"add_\" + type;\r\n\t\tvar recurringStepDays = this.transponse_size[recurringParts[0]] * recurringParts[1];\r\n\r\n\t\tif (recurringParts[0] == \"day\" || recurringParts[0] == \"week\") {\r\n\t\t\tvar weekDays = null;\r\n\t\t\tif (recurringParts[4]) {\r\n\t\t\t\tweekDays = recurringParts[4].split(\",\");\r\n\t\t\t\tif (scheduler.config.start_on_monday) {\r\n\t\t\t\t\tfor (var i = 0; i < weekDays.length; i++)\r\n\t\t\t\t\t\tweekDays[i] = (weekDays[i] * 1) || 7;\r\n\t\t\t\t\tweekDays.sort();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.date[transposeRecurring] = function(nd, td) {\r\n\t\t\t\tvar delta = Math.floor((td.valueOf() - nd.valueOf()) / (dayDurationMs * recurringStepDays));\r\n\t\t\t\tif (delta > 0)\r\n\t\t\t\t\tnd.setDate(nd.getDate() + delta * recurringStepDays);\r\n\t\t\t\tif (weekDays)\r\n\t\t\t\t\tscheduler.transpose_day_week(nd, weekDays, 1, recurringStepDays);\r\n\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t\tthis.date[addRecurring] = function(sd, inc) {\r\n\t\t\t\tvar nd = new Date(sd.valueOf());\r\n\t\t\t\tif (weekDays) {\r\n\t\t\t\t\tfor (var count = 0; count < inc; count++)\r\n\t\t\t\t\t\tscheduler.transpose_day_week(nd, weekDays, 0, recurringStepDays);\r\n\t\t\t\t} else\r\n\t\t\t\t\tnd.setDate(nd.getDate() + inc * recurringStepDays);\r\n\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t}\r\n\t\telse if (recurringParts[0] == \"month\" || recurringParts[0] == \"year\") {\r\n\t\t\tthis.date[transposeRecurring] = function(nd, td, seriesInstance) {\r\n\t\t\t\tvar delta = Math.ceil(((td.getFullYear() * 12 + td.getMonth() * 1 + 1) - (nd.getFullYear() * 12 + nd.getMonth() * 1 + 1)) / (recurringStepDays) - 1);\r\n\r\n\t\t\t\tif (delta >= 0){\r\n\t\t\t\t\tnd.setDate(1);\r\n\t\t\t\t\tnd.setMonth(nd.getMonth() + delta * recurringStepDays);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn scheduler.date[addRecurring](nd, 0, seriesInstance);\r\n\t\t\t\t//if (str[3]){\r\n\t\t\t\t//\tscheduler.date.day_week(nd, str[2], str[3]);\r\n\t\t\t\t//}\r\n\t\t\t};\r\n\t\t\tthis.date[addRecurring] = function(sd, inc, seriesInstance, currentCount) {\r\n\t\t\t\tif(!currentCount){\r\n\t\t\t\t\tcurrentCount = 1;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcurrentCount++;\r\n\t\t\t\t}\r\n\t\t\t\tvar maxCount = 12;\r\n\t\t\t\tif(currentCount > maxCount){\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar nd = new Date(sd.valueOf());\r\n\t\t\t\tnd.setDate(1);\r\n\r\n\r\n\t\t\t\tnd.setMonth(nd.getMonth() + inc * recurringStepDays);\r\n\t\t\t\tvar origMonth = nd.getMonth();\r\n\t\t\t\tvar origYear = nd.getFullYear();\r\n\t\t\t\tnd.setDate(seriesInstance.start_date.getDate());\r\n\t\t\t\tif (recurringParts[3]){\r\n\t\t\t\t\tscheduler.date.day_week(nd, recurringParts[2], recurringParts[3]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar correctOverflowInstances = scheduler.config.recurring_overflow_instances;\r\n\t\t\t\tif(nd.getMonth() != origMonth && correctOverflowInstances != \"none\"){\r\n\t\t\t\t\t// no such day in a month\r\n\t\t\t\t\tif(correctOverflowInstances === \"lastDay\"){\r\n\t\t\t\t\t\t// return either last day of the month\r\n\t\t\t\t\t\tnd = new Date(origYear, origMonth + 1, 0, nd.getHours(), nd.getMinutes(), nd.getSeconds(), nd.getMilliseconds());\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t// or go to the next instance\r\n\t\t\t\t\t\tnd = scheduler.date[addRecurring](new Date(origYear, origMonth + 1, 0), inc||1, seriesInstance, currentCount);\r\n\t\t\t\t\t\t// if next instance is not possible (e.g. 'repeat on 40th day of the month') null will be returned\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn nd;\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n};\r\nscheduler.repeat_date = function(ev, stack, non_render, from, to, maxCount) {\r\n\r\n\tfrom = from || this._min_date;\r\n\tto = to || this._max_date;\r\n\tvar max = maxCount || -1;\r\n\tvar td = new Date(ev.start_date.valueOf());\r\n\r\n\tvar startHour = td.getHours();\r\n\r\n\tvar visibleCount = 0;\r\n\r\n\tif (!ev.rec_pattern && ev.rec_type)\r\n\t\tev.rec_pattern = ev.rec_type.split(\"#\")[0];\r\n\r\n\tthis.transpose_type(ev.rec_pattern);\r\n\ttd = scheduler.date[\"transpose_\" + ev.rec_pattern](td, from, ev);\r\n\twhile ( td && (\r\n\t\ttd < ev.start_date ||\r\n\t\tscheduler._fix_daylight_saving_date(td,from,ev,td,new Date(td.valueOf() + ev.event_length * 1000)).valueOf() <= from.valueOf() ||\r\n\t\ttd.valueOf() + ev.event_length * 1000 <= from.valueOf())){\r\n\t\t\ttd = this.date[\"add_\" + ev.rec_pattern](td, 1, ev);\r\n\r\n\t}\r\n\twhile (td && (td < to && td < ev.end_date && (max < 0 || visibleCount < max))) {\r\n\t\ttd.setHours(startHour);\r\n\r\n\t\tvar timestamp = (scheduler.config.occurrence_timestamp_in_utc) ? Date.UTC(td.getFullYear(), td.getMonth(), td.getDate(), td.getHours(), td.getMinutes(), td.getSeconds()) : td.valueOf();\r\n\t\tvar ch = this._get_rec_marker(timestamp, ev.id);\r\n\t\tif (!ch) { // unmodified element of series\r\n\t\t\tvar ted = new Date(td.valueOf() + ev.event_length * 1000);\r\n\t\t\tvar copy = this._copy_event(ev);\r\n\t\t\t//copy._timed = ev._timed;\r\n\t\t\tcopy.text = ev.text;\r\n\t\t\tcopy.start_date = td;\r\n\t\t\tcopy.event_pid = ev.id;\r\n\t\t\tcopy.id = ev.id + \"#\" + Math.round(timestamp / 1000);\r\n\t\t\tcopy.end_date = ted;\r\n\r\n\t\t\tcopy.end_date = scheduler._fix_daylight_saving_date(copy.start_date, copy.end_date, ev, td, copy.end_date);\r\n\r\n\t\t\tcopy._timed = this.isOneDayEvent(copy);\r\n\r\n\t\t\tif (!copy._timed && !this._table_view && !this.config.multi_day) return;\r\n\t\t\tstack.push(copy);\r\n\r\n\t\t\tif (!non_render) {\r\n\t\t\t\tthis._events[copy.id] = copy;\r\n\t\t\t\tthis._rec_temp.push(copy);\r\n\t\t\t}\r\n\r\n\t\t\tvisibleCount++;\r\n\r\n\t\t} else\r\n\t\tif (non_render){\r\n\t\t\tif(ch.rec_type != \"none\"){\r\n\t\t\t\tvisibleCount++;\r\n\t\t\t}\r\n\t\t\tstack.push(ch);\r\n\t\t}\r\n\r\n\t\ttd = this.date[\"add_\" + ev.rec_pattern](td, 1, ev);\r\n\t//\tif(!scheduler.date[\"validate_add_\" + ev.rec_pattern](td, 1, ev.rec_pattern)){\r\n\t///\t\talert(\"detect add\")\r\n\t//\t}\r\n\t}\r\n};\r\nscheduler._fix_daylight_saving_date = function(start_date, end_date, ev, counter, default_date) {\r\n\tvar shift = start_date.getTimezoneOffset() - end_date.getTimezoneOffset();\r\n\tif (shift) {\r\n\t\tif (shift > 0) {\r\n\t\t\t// e.g. 24h -> 23h\r\n\t\t\treturn new Date(counter.valueOf() + ev.event_length * 1000 - shift * 60 * 1000);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// e.g. 24h -> 25h\r\n\t\t\treturn new Date(end_date.valueOf() - shift * 60 * 1000);\r\n\t\t}\r\n\t}\r\n\treturn new Date(default_date.valueOf());\r\n};\r\nscheduler.getRecDates = function(id, max) {\r\n\tvar ev = typeof id == \"object\" ? id : scheduler.getEvent(id);\r\n\tvar recurrings = [];\r\n\tmax = max || 100;\r\n\r\n\tif (!ev.rec_type) {\r\n\t\treturn [\r\n\t\t\t{ start_date: ev.start_date, end_date: ev.end_date }\r\n\t\t];\r\n\t}\r\n\tif (ev.rec_type == \"none\") {\r\n\t\treturn [];\r\n\t}\r\n\r\n\tscheduler.repeat_date(ev, recurrings, true, ev.start_date, ev.end_date, max);\r\n\r\n\tvar result = [];\r\n\tfor(var i = 0; i < recurrings.length; i++){\r\n\t\tif(recurrings[i].rec_type != \"none\"){\r\n\t\t\tresult.push({start_date: recurrings[i].start_date, end_date: recurrings[i].end_date});\r\n\t\t}\r\n\t}\r\n\r\n\treturn result;\r\n};\r\nscheduler.getEvents = function(from, to) {\r\n\tvar result = [];\r\n\tfor (var a in this._events) {\r\n\t\tvar ev = this._events[a];\r\n\t\tif (ev && ev.start_date < to && ev.end_date > from) {\r\n\t\t\tif (ev.rec_pattern) {\r\n\t\t\t\tif (ev.rec_pattern == \"none\") continue;\r\n\t\t\t\tvar sev = [];\r\n\t\t\t\tthis.repeat_date(ev, sev, true, from, to);\r\n\t\t\t\tfor (var i = 0; i < sev.length; i++) {\r\n\t\t\t\t\t// if event is in rec_markers then it will be checked by himself, here need to skip it\r\n\t\t\t\t\tif (!sev[i].rec_pattern && sev[i].start_date < to && sev[i].end_date > from && !this._rec_markers[sev[i].id]) {\r\n\t\t\t\t\t\tresult.push(sev[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if (!this._is_virtual_event(ev.id)) { // if it's virtual event we can skip it\r\n\t\t\t\tresult.push(ev);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n};\r\n\r\nscheduler.config.repeat_date = \"%m.%d.%Y\";\r\nscheduler.config.lightbox.sections = [\r\n\t{name:\"description\", map_to:\"text\", type:\"textarea\" , focus:true},\r\n\t{name:\"recurring\", type:\"recurring\", map_to:\"rec_type\", button:\"recurring\"},\r\n\t{name:\"time\", height:72, type:\"time\", map_to:\"auto\"}\r\n];\r\n\r\n\r\n//drop secondary attributes\r\nscheduler._copy_dummy = function(ev) {\r\n\tvar start_date = new Date(this.start_date);\r\n\tvar end_date = new Date(this.end_date);\r\n\tthis.start_date = start_date;\r\n\tthis.end_date = end_date;\r\n\tthis.event_length = this.event_pid = this.rec_pattern = this.rec_type = null;\r\n};\r\n\r\nscheduler.config.include_end_by = false;\r\nscheduler.config.lightbox_recurring = 'ask'; // series, instance\r\n\r\nscheduler.attachEvent(\"onClearAll\", function(){\r\n\tscheduler._rec_markers = {}; //clear recurring events data\r\n\tscheduler._rec_markers_pull = {};\r\n\tscheduler._rec_temp = [];\r\n});\r\n\r\n}","import getSerializator from '../core/common/get_serializable_events';\r\nexport default function(scheduler){\r\n\r\n\t\r\nconst getSerializableData = getSerializator(scheduler);\r\n\r\n//redefine this method, if you want to provide a custom set of attributes for serialization\r\nscheduler.data_attributes=function(){\r\n\tvar attrs = [];\r\n\tvar format = scheduler._helpers.formatDate;\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\t\tfor (var name in ev)\r\n\t\t\tif (name.substr(0,1) !=\"_\")\r\n\t\t\t\tattrs.push([name,((name == \"start_date\" || name == \"end_date\")?format:null)]);\r\n\t\tbreak;\r\n\t}\r\n\treturn attrs;\r\n};\r\n\r\nscheduler.toXML = function(header){\r\n\tvar xml = [];\r\n\tvar attrs = this.data_attributes();\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\r\n\t\txml.push(\"\");\r\n\t\tfor (var i=0; i < attrs.length; i++)\r\n\t\t\txml.push(\"<\"+attrs[i][0]+\">\");\r\n\r\n\t\txml.push(\"\");\r\n\t}\r\n\treturn (header||\"\")+\"\"+xml.join(\"\\n\")+\"\";\r\n};\r\n\r\nscheduler._serialize_json_value = function(value){\r\n\tif(value === null || typeof value === \"boolean\"){\r\n\t\tvalue = \"\" + value;\r\n\t}else{\r\n\t\tif(!value && value !== 0){\r\n\t\t\tvalue = \"\";\r\n\t\t}\r\n\t\tvalue = '\"' + value.toString().\r\n\t\t\treplace(/\\n/g,\"\").\r\n\t\t\treplace(/\\\\/g,\"\\\\\\\\\").\r\n\t\t\treplace(/\"/g, '\\\\\"') + '\"';\r\n\t}\r\n\treturn value;\r\n};\r\n\r\n\r\n\r\nscheduler.toJSON = function(){\r\n\treturn JSON.stringify(this.serialize());\r\n};\r\n\r\n\r\nscheduler.toICal = function(header){\r\n\tvar start = \"BEGIN:VCALENDAR\\nVERSION:2.0\\nPRODID:-//dhtmlXScheduler//NONSGML v2.2//EN\\nDESCRIPTION:\";\r\n\tvar end = \"END:VCALENDAR\";\r\n\tvar format = scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\");\r\n\tvar full_day_format = scheduler.date.date_to_str(\"%Y%m%d\");\r\n\r\n\tvar ical = [];\r\n\tvar all_events = getSerializableData();\r\n\tfor (var a in all_events){\r\n\t\tvar ev = all_events[a];\r\n\r\n\r\n\t\tical.push(\"BEGIN:VEVENT\");\r\n\t\tif (!ev._timed || (!ev.start_date.getHours() && !ev.start_date.getMinutes()))\r\n\t\t\tical.push(\"DTSTART:\"+full_day_format(ev.start_date));\r\n\t\telse\r\n\t\t\tical.push(\"DTSTART:\"+format(ev.start_date));\r\n\t\tif (!ev._timed || (!ev.end_date.getHours() && !ev.end_date.getMinutes()))\r\n\t\t\tical.push(\"DTEND:\"+full_day_format(ev.end_date));\r\n\t\telse\r\n\t\t\tical.push(\"DTEND:\"+format(ev.end_date));\r\n\t\tical.push(\"SUMMARY:\"+ev.text);\r\n\t\tical.push(\"END:VEVENT\");\r\n\t}\r\n\treturn start+(header||\"\")+\"\\n\"+ical.join(\"\\n\")+\"\\n\"+end;\r\n};\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Timeline\", scheduler.assert);\r\n}","interface IViewPosition{\r\n\ttop: number;\r\n\tleft: number;\r\n}\r\n\r\ninterface IViewBox extends IViewPosition{\r\n\twidth: number;\r\n\theight: number;\r\n\tbottom: number;\r\n\tright: number;\r\n}\r\n\r\nexport class Tooltip {\r\n\tprivate _root: HTMLElement;\r\n\tprivate _tooltipNode: HTMLElement | null;\r\n\tprivate _scheduler: any;\r\n\r\n\tconstructor(scheduler: any){\r\n\t\tthis._scheduler = scheduler;\r\n\t}\r\n\r\n\tgetNode() : HTMLElement {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tif (!this._tooltipNode){\r\n\t\t\tthis._tooltipNode = document.createElement(\"div\");\r\n\t\t\tthis._tooltipNode.className = \"dhtmlXTooltip scheduler_tooltip tooltip\";\r\n\r\n\t\t\tscheduler._waiAria.tooltipAttr(this._tooltipNode);\r\n\t\t}\r\n\t\tif(scheduler.config.rtl){\r\n\t\t\tthis._tooltipNode.classList.add(\"dhtmlXTooltip_rtl\");\r\n\t\t} else{\r\n\t\t\tthis._tooltipNode.classList.remove(\"dhtmlXTooltip_rtl\");\r\n\t\t}\r\n\t\treturn this._tooltipNode;\r\n\t}\r\n\r\n\tsetViewport(node: HTMLElement):Tooltip{\r\n\t\tthis._root = node;\r\n\t\treturn this;\r\n\t}\r\n\r\n\tshow(left: number, top: number): Tooltip;\r\n\tshow(event: MouseEvent): Tooltip;\r\n\tshow(left: number | MouseEvent, top?: number): Tooltip {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tconst container = document.body;\r\n\t\tconst node = this.getNode();\r\n\r\n\t\tif(!domHelpers.isChildOf(node, container)){\r\n\t\t\tthis.hide();\r\n\t\t\tcontainer.appendChild(node);\r\n\t\t}\r\n\r\n\t\tif (this._isLikeMouseEvent(left)) {\r\n\t\t\tconst position = this._calculateTooltipPosition(left as MouseEvent);\r\n\t\t\ttop = position.top;\r\n\t\t\tleft = position.left;\r\n\t\t}\r\n\r\n\t\tnode.style.top = top + \"px\";\r\n\t\tnode.style.left = left + \"px\";\r\n\r\n\t\tscheduler._waiAria.tooltipVisibleAttr(node);\r\n\t\treturn this;\r\n\t}\r\n\thide() : Tooltip{\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst node = this.getNode();\r\n\t\tif(node && node.parentNode){\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t}\r\n\t\tscheduler._waiAria.tooltipHiddenAttr(node);\r\n\t\treturn this;\r\n\t}\r\n\r\n\tsetContent(html: string) : Tooltip{\r\n\t\tconst node = this.getNode();\r\n\t\tnode.innerHTML = html;\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// it is for salesforce, because it proxies event to it own events\r\n\tprivate _isLikeMouseEvent(event: any): boolean {\r\n\t\tif (!event || typeof event !== \"object\") {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn \"clientX\" in event && \"clientY\" in event;\r\n\t}\r\n\r\n\tprivate _getViewPort() : HTMLElement {\r\n\t\treturn this._root || document.body;\r\n\t}\r\n\r\n\r\n\tprivate _calculateTooltipPosition(event: MouseEvent): IViewPosition{\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\t// top/left coordinates inside the viewport by mouse position\r\n\t\tconst viewport = this._getViewPortSize();\r\n\t\tconst tooltipNode = this.getNode();\r\n\t\tconst tooltip: IViewBox = {\r\n\t\t\ttop:0,\r\n\t\t\tleft: 0,\r\n\t\t\twidth: tooltipNode.offsetWidth,\r\n\t\t\theight: tooltipNode.offsetHeight,\r\n\t\t\tbottom: 0,\r\n\t\t\tright: 0\r\n\t\t};\r\n\r\n\t\tconst offsetX = scheduler.config.tooltip_offset_x;\r\n\t\tconst offsetY = scheduler.config.tooltip_offset_y;\r\n\r\n\t\tconst container = document.body;\r\n\t\tconst mouse = domHelpers.getRelativeEventPosition(event, container);\r\n\t\tconst containerPos = domHelpers.getNodePosition(container);\r\n\t\tmouse.y += containerPos.y; // to fix margin collapsing\r\n\r\n\t\ttooltip.top = mouse.y;\r\n\t\ttooltip.left = mouse.x;\r\n\t\ttooltip.top += offsetY;\r\n\t\ttooltip.left += offsetX;\r\n\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\ttooltip.right = tooltip.left + tooltip.width;\r\n\r\n\t\tconst scrollTop = window.scrollY + container.scrollTop; // to fix margin collapsing\r\n\t\t// edge cases when the tooltip element can be partially hidden by edges of the viewport\r\n\t\tif(tooltip.top < viewport.top - scrollTop){\r\n\t\t\ttooltip.top = viewport.top;\r\n\t\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\t}else if(tooltip.bottom > viewport.bottom){\r\n\t\t\ttooltip.bottom = viewport.bottom;\r\n\t\t\ttooltip.top = tooltip.bottom - tooltip.height;\r\n\t\t}\r\n\r\n\t\tif(tooltip.left < viewport.left){\r\n\t\t\ttooltip.left = viewport.left;\r\n\t\t\ttooltip.right = viewport.left + tooltip.width;\r\n\t\t}else if(tooltip.right > viewport.right){\r\n\t\t\ttooltip.right = viewport.right;\r\n\t\t\ttooltip.left = tooltip.right - tooltip.width;\r\n\t\t}\r\n\r\n\t\tif(mouse.x >= tooltip.left && mouse.x <= tooltip.right) {\r\n\t\t\ttooltip.left = mouse.x - tooltip.width - offsetX;\r\n\t\t\ttooltip.right = tooltip.left + tooltip.width;\r\n\t\t}\r\n\r\n\t\tif(mouse.y >= tooltip.top && mouse.y <= tooltip.bottom) {\r\n\t\t\ttooltip.top = mouse.y - tooltip.height - offsetY;\r\n\t\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\t}\r\n\r\n\t\treturn tooltip;\r\n\t}\r\n\r\n\tprivate _getViewPortSize() : IViewBox {\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tconst container = this._getViewPort();\r\n\t\tlet viewport = container;\r\n\t\tlet scrollTop = window.scrollY + document.body.scrollTop;\r\n\t\tlet scrollLeft = window.scrollX + document.body.scrollLeft;\r\n\t\tlet pos;\r\n\t\t// support for the initial tooltip mode where the tooltip element was attached to the data area of scheduler\r\n\t\tif(container === scheduler.$event_data){\r\n\t\t\tviewport = scheduler.$event;\r\n\t\t\tscrollTop = 0;\r\n\t\t\tscrollLeft = 0;\r\n\t\t\tpos = domHelpers.getNodePosition(scheduler.$event);\r\n\t\t}else{\r\n\t\t\tpos = domHelpers.getNodePosition(viewport);\r\n\t\t}\r\n\t\treturn {\r\n\t\t\tleft:pos.x + scrollLeft,\r\n\t\t\ttop: pos.y + scrollTop,\r\n\t\t\twidth: pos.width,\r\n\t\t\theight: pos.height,\r\n\t\t\tbottom: pos.y + pos.height + scrollTop,\r\n\t\t\tright: pos.x + pos.width + scrollLeft\r\n\t\t};\r\n\t}\r\n}\r\n","import * as utils from \"../../core/utils/utils\";\r\nimport { Tooltip } from \"./tooltip\";\r\n\r\ninterface ITrackerTarget {\r\n\tselector: string;\r\n\tonmouseenter: (event: MouseEvent, node: HTMLElement) => void;\r\n\tonmousemove: (event: MouseEvent, node: HTMLElement) => void;\r\n\tonmouseleave: (event: MouseEvent, node: HTMLElement) => void;\r\n\tglobal: boolean;\r\n}\r\n\r\ninterface ITooltipConfig {\r\n\tselector: string;\r\n\thtml: (event: MouseEvent, node: HTMLElement) => string;\r\n\tglobal: boolean;\r\n}\r\n\r\nexport class TooltipManager{\r\n\ttooltip: Tooltip;\r\n\tprotected _domEvents: any;\r\n\tprivate _listeners: object = {};\r\n\tprivate _scheduler: any;\r\n\tprivate delayShow: any;\r\n\tprivate delayHide: any;\r\n\r\n\tconstructor(scheduler: any) {\r\n\t\tthis.tooltip = new Tooltip(scheduler);\r\n\t\tthis._scheduler = scheduler;\r\n\t\tthis._domEvents = scheduler._createDomEventScope();\r\n\t\tthis._initDelayedFunctions();\r\n\t}\r\n\r\n\tdestructor(): void{\r\n\t\tthis.tooltip.hide();\r\n\t\tthis._domEvents.detachAll();\r\n\t}\r\n\thideTooltip(): void{\r\n\t\tthis.delayHide();\r\n\t}\r\n\tattach(config: ITrackerTarget): void {\r\n\t\tlet root = document.body;\r\n\t\tconst scheduler = this._scheduler;\r\n\t\tconst domHelpers = scheduler.$domHelpers;\r\n\t\tif(!config.global){\r\n\t\t\troot = scheduler.$root;\r\n\t\t}\r\n\r\n\t\tlet watchableTarget = null;\r\n\t\tconst handler = (event) => {\r\n\t\t\tconst eventTarget = domHelpers.getTargetNode(event);\r\n\t\t\tconst targetNode = domHelpers.closest(eventTarget, config.selector);\r\n\t\t\tif(domHelpers.isChildOf(eventTarget, this.tooltip.getNode())){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tconst doOnMouseEnter = () => {\r\n\t\t\t\twatchableTarget = targetNode;\r\n\t\t\t\tconfig.onmouseenter(event, targetNode);\r\n\t\t\t};\r\n\t\t\t// GS-2377: to show tooltip after touch and hide it when touch is outside the events\r\n\t\t\tif (scheduler._mobile && scheduler.config.touch_tooltip){\r\n\t\t\t\tif(targetNode){\r\n\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tconfig.onmouseleave(event, targetNode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(watchableTarget){\r\n\t\t\t\tif(targetNode && targetNode === watchableTarget){\r\n\t\t\t\t\tconfig.onmousemove(event, targetNode);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconfig.onmouseleave(event, watchableTarget);\r\n\t\t\t\t\twatchableTarget = null;\r\n\r\n\t\t\t\t\tif(targetNode && targetNode !== watchableTarget){\r\n\t\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(targetNode){\r\n\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.detach(config.selector);\r\n\t\tthis._domEvents.attach(root, \"mousemove\", handler);\r\n\t\tthis._listeners[config.selector] = {\r\n\t\t\tnode: root,\r\n\t\t\thandler\r\n\t\t};\r\n\t}\r\n\r\n\tdetach(selector: string): void {\r\n\t\tconst listener = this._listeners[selector];\r\n\t\tif(listener){\r\n\t\t\tthis._domEvents.detach(listener.node, \"mousemove\", listener.handler);\r\n\t\t}\r\n\t}\r\n\r\n\ttooltipFor(config: ITooltipConfig): void {\r\n\t\tconst cloneDomEvent = (event: MouseEvent) => {\r\n\t\t\tlet clone = event;\r\n\t\t\t// making events survive timeout in ie\r\n\t\t\t// tslint:disable-next-line no-string-literal\r\n\t\t\tif(document[\"createEventObject\"] && !document.createEvent){\r\n\t\t\t\t// tslint:disable-next-line no-string-literal\r\n\t\t\t\tclone = document[\"createEventObject\"](event);\r\n\t\t\t}\r\n\t\t\treturn clone;\r\n\t\t};\r\n\t\tthis._initDelayedFunctions();\r\n\t\tthis.attach({\r\n\t\t\tselector: config.selector,\r\n\t\t\tglobal: config.global,\r\n\t\t\tonmouseenter:(event: MouseEvent, node: HTMLElement) => {\r\n\t\t\t\tconst html = config.html(event, node);\r\n\t\t\t\tif(html){\r\n\t\t\t\t\tthis.delayShow(cloneDomEvent(event), html);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonmousemove:(event: MouseEvent, node: HTMLElement) => {\r\n\t\t\t\tconst html = config.html(event, node);\r\n\t\t\t\tif(html){\r\n\t\t\t\t\tthis.delayShow(cloneDomEvent(event), html);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\t\t\tthis.delayHide();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonmouseleave:() => {\r\n\t\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\t\tthis.delayHide();\r\n\t\t\t},\r\n\t\t});\r\n\t}\r\n\r\n\tprivate _initDelayedFunctions(){\r\n\t\tconst scheduler = this._scheduler;\r\n\t\t// reset delayed functions in order to apply current values of tooltip_timeout\r\n\t\tif(this.delayShow){\r\n\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t}\r\n\t\tif(this.delayHide){\r\n\t\t\tthis.delayHide.$cancelTimeout();\r\n\t\t}\r\n\t\tthis.tooltip.hide();\r\n\t\t\r\n\t\tthis.delayShow = (utils as any).default.delay((event: MouseEvent, html: string) => {\r\n\t\t\tif(scheduler.callEvent(\"onBeforeTooltip\", [event]) === false) {\r\n\t\t\t\tthis.tooltip.hide();\r\n\t\t\t} else {\r\n\t\t\t\tthis.tooltip.setContent(html);\r\n\t\t\t\tthis.tooltip.show(event);\r\n\t\t\t}\r\n\t\t}, scheduler.config.tooltip_timeout || 1);\r\n\r\n\t\tthis.delayHide = (utils as any).default.delay(() => {\r\n\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\tthis.tooltip.hide();\r\n\t\t}, scheduler.config.tooltip_hide_timeout || 1);\r\n\t}\r\n\r\n}","import { TooltipManager } from \"./tooltipManager\";\r\n\r\nexport default function (scheduler: any) {\r\n\r\n\tscheduler.config.tooltip_timeout = 30;\r\n\tscheduler.config.tooltip_offset_y = 20;\r\n\tscheduler.config.tooltip_offset_x = 10;\r\n\tscheduler.config.tooltip_hide_timeout = 30;\r\n\r\n\tconst tooltipManager = new TooltipManager(scheduler);\r\n\r\n\tscheduler.ext.tooltips = tooltipManager;\r\n\r\n\tscheduler.attachEvent(\"onSchedulerReady\", function () {\r\n\r\n\t\ttooltipManager.tooltipFor({\r\n\t\t\tselector: \"[\" + scheduler.config.event_attribute + \"]\",\r\n\t\t\thtml: (event: MouseEvent) => {\r\n\t\t\t\tif (scheduler._mobile && !scheduler.config.touch_tooltip) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst targetEventId = scheduler._locate_event(event.target);\r\n\t\t\t\tif (scheduler.getEvent(targetEventId)) {\r\n\t\t\t\t\tconst event = scheduler.getEvent(targetEventId);\r\n\t\t\t\t\treturn scheduler.templates.tooltip_text(event.start_date, event.end_date, event);\r\n\t\t\t\t}\r\n\t\t\t\treturn null;\r\n\t\t\t},\r\n\t\t\tglobal: false\r\n\t\t});\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function () {\r\n\t\ttooltipManager.destructor();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onLightbox\", function () {\r\n\t\ttooltipManager.hideTooltip();\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeDrag\", function() {\r\n\t\t// GS-2377: don't hide tooltip on mobile device when ontouchstart event occurs\r\n\t\tif (scheduler._mobile && scheduler.config.touch_tooltip) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\ttooltipManager.hideTooltip();\r\n\t\treturn true;\r\n\t});\r\n\tscheduler.attachEvent(\"onEventDeleted\", function() {\r\n\t\ttooltipManager.hideTooltip();\r\n\t\treturn true;\r\n\t});\r\n\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Tree Timeline\", scheduler.assert);\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Units\", scheduler.assert);\r\n}","export default function(scheduler){\r\n\r\nscheduler._get_url_nav = function(){\r\n\tvar p = {};\r\n\tvar data = (document.location.hash || \"\").replace(\"#\", \"\").split(\",\");\r\n\tfor (var i = 0; i < data.length; i++) {\r\n\t\tvar s = data[i].split(\"=\");\r\n\t\tif (s.length == 2)\r\n\t\t\tp[s[0]] = s[1];\r\n\t}\r\n\treturn p;\r\n};\r\n\r\nscheduler.attachEvent(\"onTemplatesReady\", function () {\r\n\tvar first = true;\r\n\tvar s2d = scheduler.date.str_to_date(\"%Y-%m-%d\");\r\n\tvar d2s = scheduler.date.date_to_str(\"%Y-%m-%d\");\r\n\tvar select_event = scheduler._get_url_nav().event || null;\r\n\r\n\tscheduler.attachEvent(\"onAfterEventDisplay\", function(ev){\r\n\t\tselect_event = null;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tscheduler.attachEvent(\"onBeforeViewChange\", function (om, od, m, d) {\r\n\t\tif (first) {\r\n\t\t\tfirst = false;\r\n\t\t\tvar p = scheduler._get_url_nav();\r\n\r\n\t\t\tif (p.event){\r\n\t\t\t\ttry{\r\n\t\t\t\t\tif(scheduler.getEvent(p.event)){\r\n\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\tshowEvent(p.event);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tvar handler = scheduler.attachEvent(\"onXLE\", function(){\r\n\t\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\t\tshowEvent(p.event);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\tscheduler.detachEvent(handler);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (e){}\r\n\t\t\t}\r\n\r\n\t\t\tif (p.date || p.mode) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthis.setCurrentView((p.date ? s2d(p.date) : null), (p.mode || null));\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\t//assuming that mode is not available anymore\r\n\t\t\t\t\tthis.setCurrentView((p.date ? s2d(p.date) : null), m);\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar values = [\r\n\t\t\t\"date=\" + d2s(d || od),\r\n\t\t\t\"mode=\" + (m || om)\r\n\t\t];\r\n\r\n\t\tif(select_event){\r\n\t\t\tvalues.push(\"event=\" + select_event);\r\n\t\t}\r\n\r\n\t\tvar text = \"#\" + values.join(\",\");\r\n\t\tdocument.location.hash = text;\r\n\t\treturn true;\r\n\t});\r\n\r\n\tfunction showEvent(e){\r\n\t\tif(scheduler.$destroyed){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tselect_event = e;\r\n\t\tif(scheduler.getEvent(e)){\r\n\t\t\tscheduler.showEvent(e);\r\n\t\t}\r\n\t}\r\n});\r\n}","import notImplemented from \"./not_implemented_extension\";\r\n\r\nexport default function(scheduler){\r\n\tnotImplemented.alert(\"Week Agenda\", scheduler.assert);\r\n}","export default function(scheduler){\r\nscheduler.attachEvent(\"onLightBox\",function(){\r\n\tif (this._cover){\r\n\t\ttry{\r\n\t\t\tthis._cover.style.height = this.expanded ? \"100%\" : ((document.body.parentNode||document.body).scrollHeight+\"px\");\r\n\t\t} catch(e) {\r\n\r\n\t\t}\r\n\t}\r\n});\r\n\r\nscheduler.form_blocks.select.set_value=function(node,value,ev){\r\n\tif (typeof value == \"undefined\" || value === \"\")\r\n\t\tvalue = (node.firstChild.options[0]||{}).value;\r\n\tnode.firstChild.value=value||\"\";\r\n};\r\n\r\n}","export default function(scheduler){\r\n\r\n\t// scheduler.config.year_x = 4;\r\n\t// scheduler.config.year_y = 3;\r\n\t// scheduler.xy.year_top = 0;\r\n\r\n\tscheduler.templates.year_date = function(date) {\r\n\t\treturn scheduler.date.date_to_str(scheduler.locale.labels.year_tab + \" %Y\")(date);\r\n\t};\r\n\tscheduler.templates.year_month = scheduler.date.date_to_str(\"%F\");\r\n\tscheduler.templates.year_scale_date = scheduler.date.date_to_str(\"%D\");\r\n\tscheduler.templates.year_tooltip = function(s, e, ev) {\r\n\t\treturn ev.text;\r\n\t};\r\n\r\n\tconst isYearMode = function() {\r\n\t\treturn scheduler._mode == \"year\";\r\n\t};\r\n\t\r\n\tconst getCellDate = function(node){\r\n\t\tvar day = scheduler.$domHelpers.closest(node, \"[data-cell-date]\");\r\n\t\tif(!day || !day.hasAttribute(\"data-cell-date\")) return null;\r\n\t\treturn scheduler.templates.parse_date(day.getAttribute(\"data-cell-date\"));\r\n\t};\r\n\r\n\t// dbl click hook for scheduler._on_dbl_click\r\n\tscheduler.dblclick_dhx_year_grid= function(e) {\r\n\t\tif (isYearMode()) {\r\n\t\t\tconst target = e.target;\r\n\t\t\tif(scheduler.$domHelpers.closest(target, \".dhx_before\") || scheduler.$domHelpers.closest(target, \".dhx_after\")){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tconst date = getCellDate(target);\r\n\t\t\t\r\n\t\t\tif(date){\r\n\t\t\t\tconst start = date;\r\n\t\t\t\tconst end = this.date.add(start, 1, \"day\");\r\n\t\t\t\tif (!this.config.readonly && this.config.dblclick_create){\r\n\t\t\t\t\tthis.addEventNow(start.valueOf(), end.valueOf(), e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\t\r\n\tscheduler.attachEvent(\"onEventIdChange\", function(){\r\n\t\tif (isYearMode())\r\n\t\t\tthis.year_view(true);\r\n\t});\r\n\r\n\r\n\tvar old = scheduler.render_data;\r\n\tscheduler.render_data = function(evs) {\r\n\t\tif (!isYearMode()) return old.apply(this, arguments);\r\n\t\tfor (var i = 0; i < evs.length; i++)\r\n\t\t\tthis._year_render_event(evs[i]);\r\n\t};\r\n\r\n\tvar clear = scheduler.clear_view;\r\n\tscheduler.clear_view = function() {\r\n\t\tif (!isYearMode()) return clear.apply(this, arguments);\r\n\t\tvar dates = scheduler._year_marked_cells,\r\n\t\t\tdiv = null;\r\n\t\tfor (var date in dates) {\r\n\t\t\tif (dates.hasOwnProperty(date)) {\r\n\t\t\t\tdiv = dates[date];\r\n\t\t\t\tdiv.classList.remove(\"dhx_year_event\", \"dhx_cal_datepicker_event\");\r\n\t\t\t\t// div.className = \"dhx_month_head\";\r\n\t\t\t\t// div.removeAttribute(\"date\");\r\n\t\t\t\t// div.removeAttribute(\"data-year-date\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tscheduler._year_marked_cells = {};\r\n\t};\r\n\r\n\tscheduler._hideToolTip = function() {\r\n\t\tif (this._tooltip) {\r\n\t\t\tthis._tooltip.style.display = \"none\";\r\n\t\t\tthis._tooltip.date = new Date(9999, 1, 1);\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler._showToolTip = function(date, pos, e, src) {\r\n\t\tif (this._tooltip) {\r\n\t\t\tif (this._tooltip.date.valueOf() == date.valueOf()) return;\r\n\t\t\tthis._tooltip.innerHTML = \"\";\r\n\t\t} else {\r\n\t\t\tvar t = this._tooltip = document.createElement(\"div\");\r\n\t\t\tt.className = \"dhx_year_tooltip\";\r\n\t\t\tif (this.config.rtl) t.className += \" dhx_tooltip_rtl\";\r\n\t\t\tdocument.body.appendChild(t);\r\n\t\t\tt.addEventListener(\"click\", scheduler._click.dhx_cal_data);\r\n\t\t\tt.addEventListener(\"click\", function(e){\r\n\t\t\t\tif(e.target.closest(`[${scheduler.config.event_attribute}]`)){\r\n\t\t\t\t\tconst id = e.target.closest(`[${scheduler.config.event_attribute}]`).getAttribute(scheduler.config.event_attribute);\r\n\t\t\t\t\tscheduler.showLightbox(id);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\tvar evs = this.getEvents(date, this.date.add(date, 1, \"day\"));\r\n\t\tvar html = \"\";\r\n\r\n\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\tvar ev = evs[i];\r\n\t\t\tif(!this.filter_event(ev.id, ev))\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tvar bg_color = (ev.color ? (\"--dhx-scheduler-event-background:\" + ev.color + \";\") : \"\");\r\n\t\t\tvar color = (ev.textColor ? (\"--dhx-scheduler-event-color:\" + ev.textColor + \";\") : \"\");\r\n\r\n\t\t\thtml += \"
\";\r\n\t\t\thtml += \"
\" + (evs[i]._timed ? this.templates.event_date(evs[i].start_date) : \"\") + \"
\";\r\n\t\t\thtml += \"
 
\";\r\n\t\t\thtml += this.templates.year_tooltip(evs[i].start_date, evs[i].end_date, evs[i]) + \"
\";\r\n\t\t}\r\n\r\n\t\tthis._tooltip.style.display = \"\";\r\n\t\tthis._tooltip.style.top = \"0px\";\r\n\r\n\r\n\t\tif (document.body.offsetWidth - pos.left - this._tooltip.offsetWidth < 0)\r\n\t\t\tthis._tooltip.style.left = pos.left - this._tooltip.offsetWidth + \"px\";\r\n\t\telse\r\n\t\t\tthis._tooltip.style.left = pos.left + src.offsetWidth + \"px\";\r\n\r\n\t\tthis._tooltip.date = date;\r\n\t\tthis._tooltip.innerHTML = html;\r\n\r\n\t\tif (document.body.offsetHeight - pos.top - this._tooltip.offsetHeight < 0)\r\n\t\t\tthis._tooltip.style.top = pos.top - this._tooltip.offsetHeight + src.offsetHeight + \"px\";\r\n\t\telse\r\n\t\t\tthis._tooltip.style.top = pos.top + \"px\";\r\n\t};\r\n\r\n\tscheduler._year_view_tooltip_handler = function(e){\r\n\t\tif (!isYearMode()) return;\r\n\r\n\t\tvar src = e.target || e.srcElement;\r\n\t\tif (src.tagName.toLowerCase() == 'a') // fix for active links extension (it adds links to the date in the cell)\r\n\t\t\tsrc = src.parentNode;\r\n\t\tif (scheduler._getClassName(src).indexOf(\"dhx_year_event\") != -1)\r\n\t\t\tscheduler._showToolTip(scheduler.templates.parse_date(src.getAttribute(\"data-year-date\")), scheduler.$domHelpers.getOffset(src), e, src);\r\n\t\telse\r\n\t\t\tscheduler._hideToolTip();\r\n\t};\r\n\tscheduler._init_year_tooltip = function() {\r\n\t\tscheduler._detachDomEvent(scheduler._els[\"dhx_cal_data\"][0], \"mouseover\", scheduler._year_view_tooltip_handler);\r\n\t\tscheduler.event(scheduler._els[\"dhx_cal_data\"][0], \"mouseover\", scheduler._year_view_tooltip_handler);\r\n\t};\r\n\r\n\tscheduler._get_year_cell = function(d) {\r\n\t\tvar dateString = scheduler.templates.format_date(d);\r\n\t\tvar cells = this.$root.querySelectorAll(`.dhx_cal_data .dhx_cal_datepicker_date[data-cell-date=\"${dateString}\"]`);\r\n\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\tif(!scheduler.$domHelpers.closest(cells[i], \".dhx_after, .dhx_before\")){\r\n\t\t\t\treturn cells[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t};\r\n\r\n\tscheduler._year_marked_cells = {};\r\n\tscheduler._mark_year_date = function(date, event) {\r\n\t\tvar dateString = scheduler.templates.format_date(date);\r\n\t\tvar cell = this._get_year_cell(date);\r\n\t\tif (!cell) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar ev_class = this.templates.event_class(event.start_date, event.end_date, event);\r\n\t\tif (!scheduler._year_marked_cells[dateString]) {\r\n\t\t\tcell.classList.add(\"dhx_year_event\", \"dhx_cal_datepicker_event\");// = \"dhx_month_head dhx_year_event\";\r\n\t\t\tcell.setAttribute(\"data-year-date\", dateString);\r\n\t\t\tcell.setAttribute(\"date\", dateString);\r\n\t\t\tscheduler._year_marked_cells[dateString] = cell;\r\n\t\t}\r\n\t\tif(ev_class){\r\n\t\t\tcell.classList.add(ev_class);\r\n\t\t}\r\n\t};\r\n\tscheduler._unmark_year_date = function(date) {\r\n\t\tvar cell = this._get_year_cell(date);\r\n\t\tif (!cell) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcell.classList.remove(\"dhx_year_event\", \"dhx_cal_datepicker_event\");\r\n//\t\tcell.className = \"dhx_month_head\";\r\n\t};\r\n\tscheduler._year_render_event = function(event) {\r\n\t\tvar date = event.start_date;\r\n\t\tif (date.valueOf() < this._min_date.valueOf()){\r\n\t\t\tdate = this._min_date;\r\n\t\t} else {\r\n\t\t\tdate = this.date.date_part(new Date(date));\r\n\t\t}\r\n\r\n\t\twhile (date < event.end_date) {\r\n\t\t\tthis._mark_year_date(date, event);\r\n\t\t\tdate = this.date.add(date, 1, \"day\");\r\n\t\t\tif (date.valueOf() >= this._max_date.valueOf())\r\n\t\t\t\treturn;\r\n\t\t}\r\n\t};\r\n\r\n\tscheduler.year_view = function(mode) {\r\n\r\n\t\tscheduler.set_sizes();\r\n\r\n\t\tscheduler._table_view = mode;\r\n\r\n\t\tif (this._load_mode && this._load()) return;\r\n\r\n\t\tif (mode) {\r\n\t\t\tscheduler._init_year_tooltip();\r\n\t\t\tscheduler._reset_year_scale();\r\n\t\t\tif (scheduler._load_mode && scheduler._load()){\r\n\t\t\t\tscheduler._render_wait = true;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tscheduler.render_view_data();\r\n\t\t} else {\r\n\t\t\tscheduler._hideToolTip();\r\n\t\t}\r\n\t};\r\n\tscheduler._reset_year_scale = function() {\r\n\t\tthis._cols = [];\r\n\t\tthis._colsS = {};\r\n\t\tvar week_starts = []; //start day of first week in each month\r\n\t\tvar dataArea = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tvar c = this.config;\r\n\t\tdataArea.scrollTop = 0; //fix flickering in FF\r\n\t\tdataArea.innerHTML = \"\";\r\n\r\n\t\tvar dy = Math.floor((parseInt(dataArea.style.height) - scheduler.xy.year_top) / c.year_y);\r\n\t\tif (dy < 190) {\r\n\t\t\tdy = 190;\r\n\t\t}\r\n\r\n\t\tvar week_template = document.createElement(\"div\");\r\n\t\tvar dummy_date = this.date.week_start(scheduler._currentDate());\r\n\r\n\t\tthis._process_ignores(dummy_date, 7, \"day\", 1);\r\n\r\n\t\tfor (var i = 0; i < 7; i++) {\r\n\t\t\tif(!(this._ignores && this._ignores[i])) {\r\n\t\t\t\tthis._cols[i] = 'var(--dhx-scheduler-datepicker-cell-size)';\r\n\t\t\t\tthis._render_x_header(i, 0, dummy_date, week_template);\r\n\r\n\t\t\t}\r\n\t\t\tdummy_date = this.date.add(dummy_date, 1, \"day\");\r\n\t\t}\r\n\t\tweek_template.lastChild.className += \" dhx_scale_bar_last\";\r\n\r\n\t\tfor(var i = 0; i < week_template.childNodes.length; i++){\r\n\t\t\tthis._waiAria.yearHeadCell(week_template.childNodes[i]);\r\n\t\t}\r\n\r\n\t\tvar sd = this.date[this._mode + \"_start\"](this.date.copy(this._date));\r\n\t\tvar ssd = sd;\r\n\t\tvar yearBox = null;\r\n\t\tconst wrapper = document.createElement(\"div\");\r\n\t\twrapper.classList.add(\"dhx_year_wrapper\");\r\n\t\tfor (var i = 0; i < c.year_y; i++){\r\n\t\t\tfor (var j = 0; j < c.year_x; j++) {\r\n\t\t\t\tyearBox = document.createElement(\"div\");\r\n\t\t\t\tyearBox.className = \"dhx_year_box\";\r\n\r\n\t\t\t\tyearBox.setAttribute(\"date\", this._helpers.formatDate(sd));\r\n\t\t\t\tyearBox.setAttribute(\"data-month-date\", this._helpers.formatDate(sd));\r\n\t\t\t\tyearBox.innerHTML = \"
\" + week_template.innerHTML + \"
\";\r\n\r\n\t\t\t\tvar header = yearBox.querySelector(\".dhx_year_month\");\r\n\t\t\t\tvar grid = yearBox.querySelector(\".dhx_year_grid\");\r\n\t\t\t\tvar body = yearBox.querySelector(\".dhx_year_body\");\r\n\r\n\t\t\t\tvar headerId = scheduler.uid();\r\n\t\t\t\tthis._waiAria.yearHeader(header, headerId);\r\n\t\t\t\tthis._waiAria.yearGrid(grid, headerId);\r\n\r\n\r\n\t\t\t\theader.innerHTML = this.templates.year_month(sd);\r\n\r\n\r\n\r\n\t\t\t\tvar dd = this.date.week_start(sd);\r\n\t\t\t\tthis._reset_month_scale(body, sd, dd, 6);\r\n\r\n\t\t\t\tvar days = body.querySelectorAll(\"td\");\r\n\t\t\t\tfor(var day = 0; day < days.length; day++){\r\n\t\t\t\t\tthis._waiAria.yearDayCell(days[day]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\twrapper.appendChild(yearBox);\r\n\r\n\t\t\t\tweek_starts[i * c.year_x + j] = (sd.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;\r\n\t\t\t\tsd = this.date.add(sd, 1, \"month\");\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdataArea.appendChild(wrapper);\r\n\r\n\t\tvar dateElement = this._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML = this.templates[this._mode + \"_date\"](ssd, sd, this._mode);\r\n\t\t}\r\n\r\n\t\tthis.week_starts = week_starts;\r\n\t\tweek_starts._month = ssd.getMonth();\r\n\t\tthis._min_date = ssd;\r\n\t\tthis._max_date = sd;\r\n\t};\r\n\r\n\tscheduler._reset_year_scale = function(){\r\n\r\n\t\tvar dataArea = this._els[\"dhx_cal_data\"][0];\r\n\r\n\t\tdataArea.scrollTop = 0; //fix flickering in FF\r\n\t\tdataArea.innerHTML = \"\";\r\n\r\n\t\tlet yearStart = this.date.year_start(new Date(this._date));\r\n\t\t\r\n\t\tthis._min_date = this.date.week_start(new Date(yearStart));\r\n\r\n\t\tconst wrapper = document.createElement(\"div\");\r\n\t\twrapper.classList.add(\"dhx_year_wrapper\");\r\n\r\n\t\tlet currentDate = yearStart;\r\n\t\tfor(let i = 0; i < 12; i++){\r\n\t\t\tlet yearBox = document.createElement(\"div\");\r\n\t\t\tyearBox.className = \"dhx_year_box\";\r\n\r\n\t\t\tyearBox.setAttribute(\"date\", this._helpers.formatDate(currentDate));\r\n\t\t\tyearBox.setAttribute(\"data-month-date\", this._helpers.formatDate(currentDate));\r\n\t\t\tyearBox.innerHTML = `
${this.templates.year_month(currentDate)}
\r\n\t\t\t
`;\r\n\r\n\t\t\tconst yearGrid = yearBox.querySelector(\".dhx_year_grid\");\r\n\t\t\tconst datepicker = scheduler._createDatePicker(null, {\r\n\t\t\t\tdate: currentDate,\r\n\t\t\t\tfilterDays: scheduler.ignore_year,\r\n\t\t\t\tminWeeks: 6\r\n\t\t\t});\r\n\t\t\tdatepicker._renderDayGrid(yearGrid);\r\n\t\t\tdatepicker.destructor();\r\n\r\n\t\t\twrapper.appendChild(yearBox);\r\n\r\n\t\t\tcurrentDate = this.date.add(currentDate, 1, \"month\");\r\n\r\n\t\t}\r\n\t\tdataArea.appendChild(wrapper);\r\n\r\n\t\tlet lastDate = this.date.add(yearStart, 1, \"year\");\r\n\t\tif(lastDate.valueOf() != this.date.week_start(new Date(lastDate)).valueOf()){\r\n\t\t\tlastDate = this.date.week_start(new Date(lastDate));\r\n\t\t\tlastDate = this.date.add(lastDate, 1, \"week\");\r\n\t\t}\r\n\t\tthis._max_date = lastDate;\r\n\t\tvar dateElement = this._getNavDateElement();\r\n\t\tif(dateElement){\r\n\t\t\tdateElement.innerHTML = this.templates[this._mode + \"_date\"](yearStart, lastDate, this._mode);\r\n\t\t}\r\n\t};\r\n\r\n\tvar getActionData = scheduler.getActionData;\r\n\tscheduler.getActionData = function(n_ev) {\r\n\t\tif(!isYearMode()){\r\n\t\t\treturn getActionData.apply(scheduler, arguments);\r\n\t\t}\r\n\t\t\r\n\t\tvar date = getCellDate(n_ev.target);\r\n\t\treturn {\r\n\t\t\tdate:date,\r\n\t\t\tsection:null\r\n\t\t};\r\n\t};\r\n\r\n\tvar locateEvent = scheduler._locate_event;\r\n\tscheduler._locate_event = function(node) {\r\n\t\tvar id = locateEvent.apply(scheduler, arguments);\r\n\t\tif(!id){\r\n\t\t\t\r\n\t\t\tvar date = getCellDate(node);\r\n\t\t\tif(!date) return null;\r\n\t\t\tvar evs = scheduler.getEvents(date, scheduler.date.add(date, 1, \"day\"));\r\n\t\t\tif(!evs.length) return null;\r\n\r\n\t\t\t//can be multiple events in the cell, return any single one\r\n\t\t\tid = evs[0].id;\r\n\t\t}\r\n\t\treturn id;\r\n\t};\r\n\r\n\tscheduler.attachEvent(\"onDestroy\", function(){\r\n\t\tscheduler._hideToolTip();\r\n\t});\r\n}","export default function(scheduler){\r\n\r\n\r\n(function(){\r\n\r\nfunction defaults(obj, std){\r\n\tfor (var key in std)\r\n\t\tif (!obj[key])\r\n\t\t\tobj[key] = std[key];\r\n\treturn obj;\r\n}\r\n\r\nfunction getElementSizes(element, scheduler) {\r\n\tvar sizes = {};\r\n\telement = scheduler._els[element];\r\n\tif (element && element[0]) {\r\n\t\tsizes.x = element[0].scrollWidth;\r\n\t\tsizes.y = element[0].scrollHeight;\r\n\t} else {\r\n\t\tsizes.x = 0;\r\n\t\tsizes.y = 0;\r\n\t}\r\n\treturn sizes;\r\n}\r\n\r\n//compatibility for new versions of scheduler\r\nif(!window.dhtmlxAjax){\r\n\twindow.dhtmlxAjax = {\r\n\t\tpost: function(url, data, callback){\r\n\t\t\treturn window.dhx4.ajax.post(url, data, callback);\r\n\t\t},\r\n\t\tget: function(url, callback){\r\n\t\t\treturn window.ajax.get(url, callback);\r\n\t\t}\r\n\t};\r\n}\r\n\r\nfunction add_export_methods(scheduler){\r\n\r\n\tscheduler.exportToPDF = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.pdf\",\r\n\t\t\tformat:\"A4\",\r\n\t\t\torientation:\"landscape\",\r\n\t\t\tdpi:96,\r\n\t\t\tzoom:1,\r\n\t\t\trtl: scheduler.config.rtl\r\n\t\t});\r\n\t\tconfig.html = this._export_html(config);\r\n\t\tconfig.mode = this.getState().mode;\r\n\t\tthis._send_to_export(config, \"pdf\");\r\n\t};\r\n\r\n\tscheduler.exportToPNG = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.png\",\r\n\t\t\tformat:\"A4\",\r\n\t\t\torientation:\"landscape\",\r\n\t\t\tdpi:96,\r\n\t\t\tzoom:1,\r\n\t\t\trtl: scheduler.config.rtl\r\n\t\t});\r\n\t\tconfig.html = this._export_html(config);\r\n\t\tconfig.mode = this.getState().mode;\r\n\t\tthis._send_to_export(config, \"png\");\r\n\t};\r\n\r\n\tscheduler.exportToICal = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.ical\",\r\n\t\t\tdata:this._serialize_plain(null, config)\r\n\t\t});\r\n\t\tthis._send_to_export(config, \"ical\");\r\n\t};\r\n\r\n\tscheduler.exportToExcel = function(config){\r\n\t\tconfig = defaults((config || {}), {\r\n\t\t\tname:\"calendar.xlsx\",\r\n\t\t\ttitle:\"Events\",\r\n\t\t\tdata:this._serialize_plain( this.templates.xml_format, config),\r\n\t\t\tcolumns:this._serialize_columns()\r\n\t\t});\r\n\t\tthis._send_to_export(config, \"excel\");\r\n\t};\r\n\r\n\tscheduler._ajax_to_export = function(data, type, callback){\r\n\t\tdelete data.callback;\r\n\t\tvar url = data.server || \"https://export.dhtmlx.com/scheduler\";\r\n\r\n\t\twindow.dhtmlxAjax.post(url,\r\n\t\t\t\"type=\"+type+\"&store=1&data=\"+encodeURIComponent(JSON.stringify(data)),\r\n\t\t\tfunction(loader){\r\n\t\t\t\tvar fail = loader.xmlDoc.status > 400;\r\n\t\t\t\tvar info = null;\r\n\r\n\t\t\t\tif (!fail){\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\tinfo = JSON.parse(loader.xmlDoc.responseText);\r\n\t\t\t\t\t}catch(e){}\r\n\t\t\t\t}\r\n\t\t\t\tcallback(info);\r\n\t\t\t}\r\n\t\t);\r\n\t};\r\n\r\n\tscheduler._plain_export_copy = function(source, format){\r\n\t\tvar target = {};\r\n\t\tfor (var key in source)\r\n\t\t\ttarget[key] = source[key];\r\n\r\n\t\ttarget.start_date = format(target.start_date);\r\n\t\ttarget.end_date = format(target.end_date);\r\n\t\ttarget.$text = this.templates.event_text(source.start_date, source.end_date, source);\r\n\r\n\t\treturn target;\r\n\t};\r\n\r\n\tscheduler._serialize_plain = function(format, config){\r\n\t\tformat = format || scheduler.date.date_to_str(\"%Y%m%dT%H%i%s\", true);\r\n\r\n\t\tvar events;\r\n\t\tif (config && config.start && config.end)\r\n\t\t\tevents = scheduler.getEvents(config.start, config.end);\r\n\t\telse\r\n\t\t\tevents = scheduler.getEvents();\r\n\r\n\t\tvar data = [];\r\n\t\tfor (var i = 0; i< events.length; i++)\r\n\t\t\tdata[i] = this._plain_export_copy(events[i], format);\r\n\r\n\t\treturn data;\r\n\t};\r\n\r\n\tscheduler._serialize_columns = function(){\r\n\t\treturn [\r\n\t\t\t{ id:\"start_date\", header:\"Start Date\", width:30 },\r\n\t\t\t{ id:\"end_date\", header:\"End Date\", width:30 },\r\n\t\t\t{ id:\"$text\", header:\"Text\", width:100 }\r\n\t\t];\r\n\t};\r\n\r\n\tscheduler._send_to_export = function(data, type){\r\n\t\tif(!data.version){\r\n\t\t\tdata.version = scheduler.version;\r\n\t\t}\r\n\r\n\t\tif(!data.skin){\r\n\t\t\tdata.skin = scheduler.skin;\r\n\t\t}\r\n\r\n\t\tif (data.callback)\r\n\t\t\t\treturn scheduler._ajax_to_export(data, type, data.callback);\r\n\r\n\t\tvar form = this._create_hidden_form();\r\n\r\n\t\tform.firstChild.action = data.server || \"https://export.dhtmlx.com/scheduler\";\r\n\t\tform.firstChild.childNodes[0].value = JSON.stringify(data);\r\n\t\tform.firstChild.childNodes[1].value = type;\r\n\t\tform.firstChild.submit();\r\n\t};\r\n\r\n\tscheduler._create_hidden_form = function(){\r\n\t\tif (!this._hidden_export_form){\r\n\t\t\tvar t = this._hidden_export_form = document.createElement(\"div\");\r\n\t\t\tt.style.display = \"none\";\r\n\t\t\tt.innerHTML = \"
\";\r\n\t\t\tdocument.body.appendChild(t);\r\n\t\t}\r\n\t\treturn this._hidden_export_form;\r\n\t};\r\n\r\n\tscheduler._get_export_size = function(format, orientation, zoom, dpi, header, footer, scales) {\r\n\r\n\t\tdpi = parseInt(dpi)/25.4 || 4;\r\n\r\n\t\tvar sizes = {\r\n\t\t\t\"A5\":{ x:148, y:210 },\r\n\t\t\t\"A4\":{ x:210, y:297 },\r\n\t\t\t\"A3\":{ x:297, y:420 },\r\n\t\t\t\"A2\":{ x:420, y:594 },\r\n\t\t\t\"A1\":{ x:594, y:841 },\r\n\t\t\t\"A0\":{ x:841, y:1189 }\r\n\t\t};\r\n\r\n\t\tvar dataX = getElementSizes(\"dhx_cal_data\", this).x;\r\n\t\tvar dataY = getElementSizes(\"dhx_cal_data\", this).y;\r\n\t\tvar headY = getElementSizes(\"dhx_cal_header\", this).y;\r\n\t\tvar multY = getElementSizes(\"dhx_multi_day\", this).y;\r\n\r\n\t\tvar cSize = {\r\n\t\t\ty: dataY + headY + multY\r\n\t\t};\r\n\r\n\t\tif (format === \"full\") {\r\n\t\t\tcSize.x = dataX;\r\n\t\t} else {\r\n\t\t\tcSize.x = Math.floor( (orientation === \"landscape\" ? sizes[format].y : sizes[format].x) * dpi );\r\n\t\t}\r\n\r\n\t\tif (scales) {\r\n\t\t\tcSize.x *= (parseFloat(scales.x) || 1);\r\n\t\t\tcSize.y *= (parseFloat(scales.y) || 1);\r\n\t\t}\r\n\r\n\t\treturn cSize;\r\n\t};\r\n\r\n\tfunction getTimeline() {\r\n\t\tvar mode = scheduler.getState().mode;\r\n\t\tif (scheduler.matrix && scheduler.matrix[mode]) {\r\n\t\t\treturn scheduler.matrix[mode];\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\r\n\tfunction getInitialSizes() {\r\n\t\tvar smartRendering = undefined,\r\n\t\t\tscrollable = undefined;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (timeline) {\r\n\t\t\tscrollable = timeline.scrollable;\r\n\t\t\tsmartRendering = timeline.smart_rendering;\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tnav_height: scheduler.xy.nav_height,\r\n\t\t\tscroll_width: scheduler.xy.scroll_width,\r\n\t\t\tstyle_width: scheduler._obj.style.width,\r\n\t\t\tstyle_height: scheduler._obj.style.height,\r\n\t\t\ttimeline_scrollable: scrollable,\r\n\t\t\ttimeline_smart_rendering: smartRendering\r\n\t\t};\r\n\t}\r\n\r\n\tfunction setExportSizes(size, initialSizes) {\r\n\t\tscheduler._obj.style.width = size.x + \"px\";\r\n\t\tscheduler._obj.style.height = size.y + \"px\";\r\n\r\n\t\tscheduler.xy.nav_height = 0;\r\n\t\tscheduler.xy.scroll_width = 0;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (initialSizes.timeline_scrollable || initialSizes.timeline_smart_rendering) {\r\n\r\n\t\t\ttimeline.scrollable = false;\r\n\t\t\ttimeline.smart_rendering = false;\r\n\t\t}\r\n\t}\r\n\r\n\tfunction setInitialSizes(initialSizes) {\r\n\t\tscheduler.xy.scroll_width = initialSizes.scroll_width;\r\n\t\tscheduler.xy.nav_height = initialSizes.nav_height;\r\n\t\tscheduler._obj.style.width = initialSizes.style_width;\r\n\t\tscheduler._obj.style.height = initialSizes.style_height;\r\n\r\n\t\tvar timeline = getTimeline();\r\n\t\tif (initialSizes.timeline_scrollable || initialSizes.timeline_smart_rendering) {\r\n\t\t\ttimeline.scrollable = initialSizes.timeline_scrollable;\r\n\t\t\ttimeline.smart_rendering = initialSizes.timeline_smart_rendering;\r\n\t\t}\r\n\t}\r\n\r\n\tscheduler._export_html = function (obj) {\r\n\t\tvar initialSizes = getInitialSizes();\r\n\t\tvar size = scheduler._get_export_size(obj.format, obj.orientation, obj.zoom, obj.dpi, obj.header, obj.footer, obj.scales);\r\n\r\n\t\tvar html = \"\";\r\n\t\ttry {\r\n\t\t\tsetExportSizes(size, initialSizes);\r\n\t\t\tscheduler.setCurrentView();\r\n\t\t\thtml = scheduler._obj.innerHTML;\r\n\t\t} catch (e) {\r\n\r\n\t\t\t// eslint-disable-next-line no-console\r\n\t\t\tconsole.error(e);\r\n\t\t} finally {\r\n\t\t\tsetInitialSizes(initialSizes);\r\n\t\t\tscheduler.setCurrentView();\r\n\t\t}\r\n\r\n\t\treturn html;\r\n\t};\r\n\r\n}\r\n\r\nadd_export_methods(scheduler);\r\n\r\n\r\n})();\r\n\r\n}","import active_links from \"./active_links\";\r\nimport agenda_legacy from \"./agenda_legacy_view\";\r\nimport agenda_view from \"./agenda\";\r\nimport all_timed from \"./all_timed\";\r\nimport collision from \"./collision\";\r\nimport container_autoresize from \"./container_autoresize\";\r\nimport cookie from \"./cookie\";\r\nimport daytimeline_restricted from \"./restricted_extensions/daytimeline\";\r\nimport drag_between_restricted from \"./restricted_extensions/drag_between\";\r\nimport editors from \"./editors\";\r\nimport expand from \"./expand\";\r\nimport grid_view from \"./restricted_extensions/grid_view\";\r\nimport html_templates from \"./html_templates\";\r\nimport key_nav from \"./key_nav\";\r\nimport layer from \"./layer\";\r\nimport limit from \"./limit\";\r\nimport map_view from \"./map_view\";\r\nimport minical from \"./minical\";\r\nimport monthheight from \"./monthheight\";\r\nimport multisection_restricted from \"./restricted_extensions/multisection\";\r\nimport multiselect from \"./multiselect\";\r\nimport multisource from \"./multisource\";\r\nimport mvc from \"./mvc\";\r\nimport outerdrag from \"./outerdrag\";\r\nimport pdf from \"./pdf\";\r\nimport quick_info from \"./quick_info\";\r\nimport readonly from \"./readonly\";\r\nimport recurring from \"./recurring\";\r\nimport recurring_legacy from \"./recurring_legacy\";\r\nimport serialize from \"./serialize\";\r\nimport timeline_restricted from \"./restricted_extensions/timeline\";\r\nimport tooltip from \"./tooltip\";\r\nimport treetimeline_restricted from \"./restricted_extensions/treetimeline\";\r\nimport units_restricted from \"./restricted_extensions/units\";\r\nimport url from \"./url\";\r\nimport week_agenda_restricted from \"./restricted_extensions/week_agenda\";\r\nimport wp from \"./wp\";\r\nimport year_view from \"./year_view\";\r\nimport export_api from \"./export_api\";\r\n\r\nexport default {\r\n\tactive_links,\r\n\tagenda_legacy,\r\n\tagenda_view,\r\n\tall_timed,\r\n\tcollision,\r\n\tcontainer_autoresize,\r\n\tcookie,\r\n\tdaytimeline: daytimeline_restricted,\r\n\tdrag_between: drag_between_restricted,\r\n\teditors,\r\n\texpand,\r\n\texport_api,\r\n\tgrid_view,\r\n\thtml_templates,\r\n\tkey_nav,\r\n\tlayer,\r\n\tlimit,\r\n\tmap_view,\r\n\tminical,\r\n\tmonthheight,\r\n\tmultisection: multisection_restricted,\r\n\tmultiselect,\r\n\tmultisource,\r\n\tmvc,\r\n\touterdrag,\r\n\tpdf,\r\n\tquick_info,\r\n\treadonly,\r\n\trecurring,\r\n\trecurring_legacy,\r\n\tserialize,\r\n\ttimeline: timeline_restricted,\r\n\ttooltip,\r\n\ttreetimeline: treetimeline_restricted,\r\n\tunits: units_restricted,\r\n\turl,\r\n\tweek_agenda: week_agenda_restricted,\r\n\twp,\r\n\tyear_view\r\n};","import SchedulerFactory from \"./scheduler_factory\";\r\nimport gplExtensions from \"./ext/extensions_gpl\";\r\n\r\nconst factory = new SchedulerFactory(gplExtensions);\r\n\r\nconst scheduler = factory.getSchedulerInstance();\r\nconst Scheduler = {\r\n\tplugin: scheduler.bind(factory.plugin, factory)\r\n};\r\n\r\nwindow.scheduler = scheduler;\r\nwindow.Scheduler = Scheduler;\r\n\r\nif(!window.$dhx) {\r\n\twindow.$dhx = {};\r\n}\r\n\r\nwindow.$dhx.scheduler = scheduler;\r\nwindow.$dhx.Scheduler = Scheduler;\r\n\r\nexport default scheduler;export { scheduler, Scheduler };"],"names":["dhtmlxHook","dhtmlx","attaches","attachScheduler","day","mode","tabs","scheduler","obj","document","createElement","id","this","_genStr","innerHTML","body","appendChild","firstChild","attachObject","vs","av","sched","schedId","setSizes","updateView","destructor","init","_viewRestore","globalScope","window","global","global$1","dragHighlightPos","dndMarkers","dragStarted","eventNode","event","isEnabled","config","drag_highlight","markTimespan","checkViewName","viewName","viewObj","getView","layout","checkSectionPropertyName","y_property","map_to","setRequiredStylesToMarker","style","top","left","marginLeft","createMarkerConfig","configSettings","sectionId","sections","markerObject","start_date","end_date","css","html","date","add","createViewMarker","settings","markerConfigs","getMonthViewMarkers","getTimelineAndUnitsViewMarkers","getColumnViewMarkers","forEach","cfg","push","columnViewMarkersArray","eventNodes","$container","querySelectorAll","event_attribute","i","length","eventNodeClone","cloneNode","startDate","Date","getAttribute","endDate","dates","monthViewMarkersArray","weekDates","currDate","valueOf","week_start","cells","unitMarkersArray","sectionPropertyName","String","split","section_delimiter","formatedSections","map","element","elems","attachEvent","e","getEvent","target","closest","getState","cascade_event_display","unselect","getActionData","section","unmarkTimespan","undoDelete","ev","deletedEvent","copy","undo_deleted","new_event","message","text","expire","type","callback","undoBtn","addEvent","render","limitPlugin","mark_now","display_marked_timespans","overwrite_marked_timespans","dhx_time_block","default_timespan_type","fix_options","options","days","zones","get_resulting_options","blockTime","addMarkedTimespan","unblockTime","deleteMarkedTimespan","checkInMarkedTimespan","timespan_type","on_overlap","res","temp_start_date","temp_end_date","timespans","_marked_timespans","date_part","day_value","day_index","getDay","getZones","eventStart","_get_zone_minutes","eventEnd","getDate","markerStart","markerEnd","checkLimitViolation","check_limits","s","c","evs","rec_type","_end_date","seriesEnd","limit_start","limit_end","recEventInLimits","complete_res","p","_timed","isOneDayEvent","allow","_drag_id","_drag_mode","setHours","setMinutes","checkEvent","callEvent","_get_blocked_zones","property","timeline_zones","blocked_timeline_zones","_get_relevant_blocked_zones","_add_timespan_zones","resultZones","concat","containers","_props","matrix","container","view","view_config","linker","_mark_now","hide","dhx_now_time","_els","now","_currentDate","_remove_mark_now","_max_date","_min_date","getHours","first_hour","last_hour","locate_holder_day","_append_mark_now","zone_start","_table_view","_mode","start_index","end_index","units_l","size","position","r_divs","t_day","t_div","_render_marked_timespan","els","div","parent","parentNode","removeChild","getMinutes","_prepare_timespan_options","r_configs","temp_configs","Array","t_days","slice","cloned_config","_lame_clone","apply","undefined","min","max","invert_zones","invertZones","uid","view_key","hasOwnProperty","ids","t_config","_lame_copy","k","c_config","t_sd","t_ed","zone_end","_get_dates_by_index","index","start","end","start_day","delta","t_date","_get_css_classes_by_config","css_classes","join","_get_block_by_config","block","area","blocks","min_date","max_date","date_to_display","min_day","areas","_scales","sday","_cols","_ignores","block_proto","className","height","width","order","inner_index","locate_holder","Math","all_hours_height","hour_size_px","hour_ms","round","_mark_timespans","data","divs","_on_scale_add_marker","len","childNodes","_getClassName","indexOf","configuration","Error","rebuild_els","get_elements","timespans_ids","_marked_timespans_ids","timespan_types","_marked_timespans_types","_addMarkerTimespanConfig","unit_id","timespans_view","day_configs","_array","configs","current_zones","resulting_zones","c_zone_start","c_zone_end","isLast","offset","splice","_subtract_timespan_zones","is_modified","_delete_marked_timespan_by_id","parent_array","_delete_marked_timespan_by_config","viewspans","_delete_marked_timespans_list","d","dayConfig","day_timespans","d_t","related_zones","arguments","types","t","typedConfig","_get_types_to_render","common","specific","types_to_render","_get_configs_to_render","units","_get_unit_index","unit","_date","dx","day_ind","unitsPerDay","floor","key","unit_zones","unit_types","global_data","day_types","dblclick_dhx_marked_timespan","src","dblclick_create","addEventNow","createMethod","methods","isActive","disableMethod","methodName","dummyMethod","restoreMethod","disableMethods","methodsHash","call","restoreMethods","batchUpdatePayload","console","error","$stateProvider","registerProvider","batch_update","batchUpdate","noRedraw","call_dp","_dp","updateMode","dp_mode","setUpdateMode","calls","setModeDate","needRender","needUpdateView","repaintEvents","rememberModeDate","setCurrentView","render_data","render_view_data","updateEvent","sendData","initPlugins","limit","uidSeed","isArray","pop","isStringObject","Function","prototype","toString","constructor","isNumberObject","isBooleanObject","isDate","getFullYear","getMonth","defined","delay","timeout","timer","result","$cancelTimeout","$pending","args","setTimeout","clearTimeout","$execute","utils","mixin","source","force","f","object","Number","Boolean","varType","Object","StateService","stateProviders","name","provider","method","internal","unregisterProvider","assert","check","show_errors","log","extend","commonViews","agenda","grid","timeline","week_agenda","year","anythingElse","requiredExtensions","_commonErrorMessages","unknownView","relatedDoc","relatedExtension","collapsedContainer","createTimelineView","createUnitsView","createGridView","renderCalendar","exportToPNG","exportToPDF","dhtmlxError","catchError","a","b","responseText","ajax_error","alert","classes","cssClass","classList","itemTypes","rows_container","row","setAttribute","fix_tab_position","$firstTab","$lastTab","$segmentedTab","button","builtInButton","spacer","minicalendarButton","minicalendarDiv","click","$_eventAttached","isCalendarVisible","destroyCalendar","navigation","handler","calendar","html_element","findRenderer","renderer","rows","cols","renderElement","value","align","justifyContent","prepareConfig","renderLayout","fragment","createDocumentFragment","items","next","_init_nav_bar","navBar","querySelector","_update_nav_bar","previousHeight","heightChanged","configChanged","newHeight","xy","nav_height","unset_actions","set_actions","display","isAttachedNode","root","getWindowSize","w","innerWidth","documentElement","clientWidth","h","innerHeight","clientHeight","equals","listenWindowResize","oldSize","resizeDelay","$destroyed","newSize","triggerSchedulerResize","$root","watchNodeResize","offsetHeight","previousWidth","offsetWidth","lowlevelResizeWatcher","addResizeListener","containerStyles","getComputedStyle","getPropertyValue","resizeWatcher","tabIndex","wai_aria_attributes","salesforce_environment","contentWindow","EventHost","_silent_mode","listeners","_silentEnd","createEventStorage","handlers","eventStorage","combinedResult","handlerResult","handlerId","once","originalHandler","removeEvent","clear","makeEventable","eventHost","eventName","toLowerCase","thisObject","bind","innerId","attachAll","eventArguments","handlerName","detachEvent","list","eventId","detachAllEvents","extend$l","_detachDomEvent","el","removeEventListener","_init_once","scheduler_resize_listener","navbar","header","dataArea","hasSchedulerMarkup","createDefaultHeader","views","nav","_grid","names","optionalViews","_obj","getElementById","wai_aria_application_role","JSON","stringify","rtl","_skin_init","_scroll","init_templates","_init_touch_events","set_sizes","$initialized","min_event_height","bar_height","scale_width","scroll_width","scale_height","month_scale_height","menu_width","margin_top","margin_left","editor_width","month_head_height","event_header_height","keys","edit_save","edit_cancel","functor","_x","scale_x","materialScalePlaceholder","_is_material_skin","insertBefore","set_xy","offsetTop","_lightbox","_setLbPosition","_data_width","right","node","x","y","prepareValue","val","prepared","isNaN","direction","getElementsByTagName","class_name","attr_value","label","locale","labels","_waiAria","labelAttr","domEventsScope","_createDomEventScope","detachAll","_click","attach","preventDefault","_temp_touch_block","_on_mouse_move","_ignore_next_click","_on_mouse_down","_on_mouse_up","_on_dbl_click","returnValue","_locate_event","select","_select_id","_close_not_saved","editStop","previousSelection","editor_id","_edit_id","lightbox_id","_lightbox_id","_new_event","select_id","expanded","drag_id","drag_mode","dhx_cal_data","cancelBubble","readonly","icon","mask","buttons","replace","dhx_cal_prev_button","dhx_cal_next_button","dummy","step","def_step","dhx_cal_today_button","dhx_cal_tab","deprecated_name","substring","search","delete","confirm_deleting","_dhtmlx_confirm","title","title_confirm_deleting","deleteEvent","ok","icon_delete","edit","save","details","showLightbox","form","cancel","opts","confirm","base","_isObject","_isDate","duration","event_duration","time_step","start_hour","setTime","_loading","_drag_event","details_on_dblclick","viewHandler","_get_column_index","x_pos","column","_week_indexes_from_pos","pos","ceil","_mouse_coords","$env","isIE","pageX","pageY","clientX","scrollLeft","clientLeft","clientY","scrollTop","clientTop","_colsS","$domHelpers","getAbsoluteLeft","getAbsoluteTop","dy","heights","_ignores_detected","preserve_length","_event_length","_get_real_event_length","x_step","x_unit","timestamp","confirmationText","confirm_closing","title_confirm_closing","positive_closing","_drag_pos","_correct_shift","back","getTimezoneOffset","_is_pos_changed","old_pos","new_pos","diff","old_val","new_val","acc","abs","d_pos","has_moved","_correct_drag_start_date","_start_correction","_end_correction","_get_fictional_event_length","_correct_drag_end_date","mousedownPos","_get_date_from_pos","_drag_start","fields","timeStep","custom","time_part","_dragEventBody","_move_event_shift","resize_date","_drag_from_start","resize_from_start","end_day_start","end_day_date","firstHour","lastHour","maxY","precisePos","minDate","maxDate","preciseDate","cursor","shift","new_end","new_start","limit_drag_out","all_timed","_get_section_view","_get_event_sday","_allow_dnd","update_render","sx","update_view","for_rendered","r","srcElement","classname","drag_event_body","fullClass","_get_private_properties","_clear_temporary_properties","clean","flagged_event","initial","current_state","_mobile","moved","_dhx_changed","is_new","edit_on_create","details_on_create","_trigger_dyn_loading","_load_mode","_load","_render_wait","_reset_ignores","_reset_scale","isViewExists","templates","_set_aria_buttons_attrs","buttonGroups","group","j","prev","headerButtonsAttributes","icon_form","icon_edit","oldClass","newClass","dhx_multi_day","prev_scroll","preserve_scroll","multidayScroll","_dy_shift","tab","headerToggleState","remove","_render_x_header","offset_top","head","left_border","columnHeaderText","dayHeaderAttr","_get_columns_num","from","to","count","count_n","_get_timeunit_start","_get_view_end","dd","ed","_calc_scale_sizes","summ","_process_ignores","realcount","_set_scale_col_size","_render_scales","data_area","sd","today","parseInt","scales","cls","firstHalf","slotDate","format_date","htmlContent","time_slot_text","time_slot_class","secondHalf","week_date_class","dayColumnAttr","day_start","_getNavDateElement","str","drag_resize","drag_move","navBarDateStr","scaleElement","navBarDateAttr","_reset_month_scale","_reset_hours_scale","multi_day","c1","visibility","totalWidth","col_length","hiddenWidth","c2","cc","content","hour_scale","hourScaleAttr","scroll_hour","now_date","n","preserve","ignore","ign_date","_render_month_scale","view_start","cd","tdwidths","cell_width","getCellHeight","cellheight","table","cell","month_date_class","body_class","head_class","monthCellAttr","cellHead","month_day","cellBody","bf1","parse_date","getLabel","lightbox","updateCollection","list_name","collection","serverList","resetLightbox","hideCover","cache","create","n_ev","_focus","focus","getDaysDifference","differenceInTime","getTime","differenceInDays","eventLength","startColumnIndex","endColumnIndex","_get_date_index","last_column","excludedDuration","intervalStart","intervalEnd","leftCellCutOffStart","leftCellCutOffEnd","rightCellCutOffStart","rightCellCutOffEnd","ev_length","dir","per_day","fd","start_slot","end_slot","_get_section_property","_is_initialized","state","_is_lightbox_open","defaultDomEvents","addEventListener","eventRemove","createEventScope","domEvents","eventScope","capture","detach","staticArray","_eventRemoveAll","_trim","func","trim","htmlTags","RegExp","extraSpaces","stripHTMLLite","htmlText","singleQuotes","escapeQuotes","getAttributeString","attr","attributes","setAttributes","values","day_date","role","getHeaderCellAttr","dateString","eventAttr","_eventCommonAttr","event_text","$dataprocessor_class","setEventBarAttr","_getAttributes","attributeSetter","arg","eventBarAttrString","agendaHeadAttrString","agendaHeadDateString","agendaHeadDescriptionString","agendaDataAttrString","agendaEventAttrString","attrs","agendaDetailsBtnString","icon_details","gridAttrString","gridRowAttrString","gridCellAttrString","mapAttrString","mapRowAttrString","mapDetailsBtnString","minicalHeader","headerId","minicalGrid","minicalRow","minicalDayCell","selected","minicalHeadCell","weekAgendaDayCell","weekAgendaEvent","lightboxHiddenAttr","lightboxVisibleAttr","lightboxSectionButtonAttrString","tabindex","yearHeader","yearGrid","yearHeadCell","yearRow","yearDayCell","lightboxAttr","lightboxButtonAttrString","buttonName","eventMenuAttrString","iconName","lightboxHeader","headerText","lightboxSelectAttrString","time_option","month","hour","minute","messageButtonAttrString","buttonLabel","messageInfoAttr","messageModalAttr","quickInfoAttr","quickInfoHeaderAttrString","quickInfoHeader","quickInfoButtonAttrString","tooltipAttr","tooltipVisibleAttr","tooltipHiddenAttr","isDisabled","payload","elementPosition","elem","bottom","getBoundingClientRect","box","docElem","pageYOffset","pageXOffset","offsetLeft","offsetParent","getRelativeEventPosition","getNodePosition","getClassName","baseVal","getTargetNode","trg","tagName","shadowRoot","composedPath","locateCss","strict","ind","charAt","isVisible","currentStyle","hiddenSection","recurringSection","hasNonNegativeTabIndex","hasHref","canHaveHref","nodeName","loLowerCase","canDisable","input","textarea","hasAttribute","getFocusableNodes","nodes","nodesArray","$position","sort","isValid","isShadowDomSupported","createShadowRoot","attachShadow","getActiveElement","activeElement","getSelection","focusNode","getRootNode","ShadowRoot","host","hasShadowParent","dom_helpers","htmlObject","getOffset","getOffsetSum","getOffsetRect","test","navigator","userAgent","dummyBox","selector","insertAfter","newNode","referenceNode","nextSibling","isChildOf","child","contains","Element","matches","msMatchesSelector","webkitMatchesSelector","parentElement","nodeType","isWindowAwailable","env","isOpera","isChrome","isKHTML","isFF","isIPad","isEdge","isNode","clearAll","serialize$1","serialized","encodeURIComponent","Promise","createConfig","url","async","headers","serialize","ajax","serializeRequestParams","parse","DOMParser","parseFromString","ActiveXObject","loadXML","xmltop","tagname","xhr","status","xml","responseXML","xpath","xpathExp","docObj","selectNodes","first","col","ownerDocument","evaluate","XPathResult","ANY_TYPE","iterateNext","query","_call","get","onLoad","getSync","put","postData","del","post","postSync","resolve","reject","XMLHttpRequest","isQt","match","readyState","xmlDoc","filePath","open","setRequestHeader","toUpperCase","send","urlSeparator","$ajax","generateStringToDate","format","utc","splt","code","csp_date_to_str","to_fixed","getUTCDate","getUTCMonth","getUTCFullYear","day_short","getUTCDay","day_full","month_short","month_full","getUTCHours","getUTCMinutes","getUTCSeconds","getSeconds","getUTCISOWeek","getISOWeek","csp_str_to_date","set","temp","month_short_hash","month_full_hash","UTC","cspEnabled","checkIfCSPEnabled","useCsp","csp","old","setSeconds","setMilliseconds","start_on_monday","month_start","setDate","year_start","setMonth","_add_days","inc","ndate","datesDiff","rest","hours","setYear","num","date_to_str","str_to_date","exactFormat","stringToDateMethod","parseExactFormat","yyyyMMddhhIIss","MMddyyyyhhIIss","ddMMyyyyhhIIss","ISO8601","isYMDDate","datestr","isMDYDate","isDMYDate","isISO8601","parseYMD","parseMDY","parseDMY","parse_exact_format","nday","first_thursday","year_number","ordinal_date","week_number","convert_to_utc","default_date","month_date","load_date","week_date","hour_date","date_format","api_date","displayed_event_color","displayed_event_text_color","wide_form","day_column_padding","use_select_menu_space","drag_create","resize_month_events","resize_month_timed","responsive_lightbox","separate_short_events","cascade_event_count","cascade_event_margin","multi_day_height_limit","drag_lightbox","server_utc","touch","touch_tip","touch_drag","touch_swipe_dates","quick_info_detached","icons_edit","icons_select","buttons_left","buttons_right","highlight_displayed_event","delay_render","timeline_swap_resize","$initial","_helpers","parseDate","xml_date","formatDate","xml_format","d1","d2","day_scale_date","month_scale_date","week_scale_date","time_picker","event_date","load_format","event_header","event_class","event_bar_date","event_bar_text","month_events_link","drag_marker_class","drag_marker_content","tooltip_date_format","tooltip_text","calendar_month","calendar_scale_date","calendar_date","calendar_time","_events","_loaded","clear_view","extra_data","event_updated","silent","setEvent","hash","_rendered","changeEventId","new_id","create_getter","create_setter","_changed","is_visible_events","clear_event","in_visible_range","evFirstHour","evLastHour","end_dates_visible","hidden_duration","checkEndDate","get_visible_events","only_timed","stack","filter_event","filter","_is_main_area_event","hold","full","_not_render","_recalculate_timed","tvs","tvd","_rendered_location","buffer","renderedLocation","_view_month_day","_render_month_link","toRender","_sday","_eday","curr","_sweek","getEvents","_get_event_bar_pos","widt","x2","_pre_render_events","render_event_bar","max_evs","max_month_events","_sorder","real","render_event","_get_first_visible_cell","hb","h_old","_pre_render_events_line","_pre_render_events_table","monthRows","cellHeight","cHeight","unshift","scrollHeight","scroll_fix","scale_settings","sum_width","row_heights","full_multi_day_height","used_multi_day_height","used_multi_day_height_css","multi_day_section","multi_day_icon","overflowY","datePart","_get_event_mapped_end_date","ev_duration","_min_mapped_duration","evs_originals","sh","eh","_inner","t_ev","t_end_date","slot_index","sorderSet","_is_sorder","_max_sorder","max_count","_count","_copy_event","_time_order","_is_any_multiday_cell_visible","isAnyCellVisible","checkDate","noCells","lastDayEnd","cellIndex","weekCellIndex","out","weeks","chunks_info","first_chunk","last_chunk","chunk_info","locate_s","locate_e","_length","stack_line","_first_chunk","_last_chunk","_copy_dummy","_y_from_date","sm","_calc_event_y","min_height","em","parentWidth","menu","menu_offset","pos_y","ev_count","ev_sorder","margin","_render_v_bar","_text_style","parentPosition","zIndex","color","setProperty","tplClass","cssText","_editor","shiftKey","keyCode","icons","icons_str","ariaAttr","currentIcon","textColor","highlightEventPosition","contentA","contentB","cs","cse","boxWidth","renderEvent","inner_html","footer_class","_drag_resize","past","_get_dnd_order","ev_height","max_height","_orig_sorder","evTop","columns","y_event_offset","resize_handle","resizable","left_chunk","right_chunk","resize_left","resize_right","timed","bg_color","style_text","_edit_stop_event","getRenderedEvent","rendered_events","rendered_event","showEvent","original_color","original_text_color","restoreOriginalColors","getSectionTop","posFromDate","_smartRenderingEnabled","scrollTo","_append_drag_marker","m","zone","scale","lastChild","previousSibling","_update_marker_position","_parsers","canParse","topElement","loader","csrfToken","security_key","arr","itms","itm","nodeValue","ud","udx","_xmlNodeToJSON","_userdata","_init_event","json","err","events","dhx_security","collections","collections_loaded","option","option_key","ical","c_start","c_end","incoming","event_r","e_start","e_end","exec","param","param_r","parse_param","substr","dh","dm","utcMark","dn","getSerializator","_load_url","prevent_cache","ajaxCallback","response","on_load","lf","cache_line","temp_to","extend$a","extend$9","extend$8","foundParser","parser","_process","_process_loading","_after_call","_tagvalue","_init_date","getSerializableData","createSerializator","dataset","allEvents","exportedEvent","exportValue","rawValue","load","setLoadMode","array","show_loading","_y","_lightbox_controls","formSection","getLightbox","getValue","form_blocks","get_value","setValue","set_value","get_template_control","control","get_select_control","get_textarea_control","get_time_control","defaults","template","time","sns","placeholder","_get_input","_dhx_onchange","onchange","time_format","_time_format_order","dt","last","limit_time_select","selectBoxClass","range","start_year","end_year","year_range","tdate","_time_values","ariaAttrs","full_day","_full_day","checked","disabled","_fill_lightbox_select","auto_end_date","_update_lightbox_select","time_values","direct_value","fixed_value","value_found","t_v","selectedIndex","original","getLightboxRoot","cspEnvironment","salesforceEnvironment","showCover","show_cover","_cover","_fill_lightbox","lightbox_header","headerContent","headerDate","headerTitle","current_sns","_get_lightbox_section_node","default_value","_lightbox_out","_empty_lightbox","hide_lightbox","endLightbox","hide_cover","_move_while_dnd","_finish_dnd","save_lightbox","startLightbox","_custom_lightbox","_temp_lightbox","cancel_lightbox","hideLightbox","_init_lightbox_events","buttonTarget","sectionButton","button_click","action","readonly_active","setLightboxSize","_init_dnd_events","_dnd_start_lb","dhx_unselectable","lb","_lb_start","_ready_to_dnd","recurring","_lightbox_template","label_name","ds","t_ds","_bindLightboxLabels","labelBlock","inputBlock","fallback","inputId","old_id","mobile","MSStream","platform","maxTouchPoints","touchEventsSupported","createEvent","_touch_events","touches","PointerEvent","pointerEnabled","pointerType","msPointerEnabled","MSPOINTER_TYPE_MOUSE","accessor","tracker","scroll_mode","action_mode","dblclicktime","attachTouchEvent","passive","check_direction_swipe","s_ev","e_ev","max_dy","scrollable","doMouseMove","dnd","original_render","_update_global_tip","drag_cancel","_pointerDragId","pointerId","fake_event","_block_next_stop","actTask","fakeTask","sourceTask","_show_global_tip","_hide_global_tip","toptip","_global_tip","drag_to_create","drag_to_move","getRootView","tag","hooks","didInsert","cmp","_addThemeClass","skin","_skin_settings","_skin_xy","lightbox_additional_height","checkIfMaterialSkin","themeNameFromFile","links","href","_build_skin_info","monitorThemeChange","styles","themeVar","isCssVarTheme","themeName","cssValues","oldMaterialTheme","_theme_info","theme","cssVarTheme","themeVariables","calculatedMaterial","probe","cachedBorderBoxValue","checkIfBorderBoxStyling","boxSizing","refreshAfterLoad","_border_box_events","oldStyling","newStyling","_configure","setSkin","flatSkinHourScale","monitorIntervalId","clearInterval","setInterval","csstheme","_old_month_day","old_month_day","reorderTabs","specialTabs","tabName","find","firstTab","reverse","jQuery","$","counter","fn","dhx_scheduler","each","Scheduler","getSchedulerInstance","comp","update_view_timer","curr_view_timer","lazy_setCurrentView","self","oldDate","oldMode","updateFlags","lazy_updateView","ars","DataProcessorEvents","dp","$scheduler","$dp","_dataProcessorHandlers","_validId","setUpdated","z","_in_progress","_invalid","updatedRows","_waitMode","_update_callback","upd","setUserData","action_param","_add_rec_marker","extendScheduler","_is_virtual_event","getUserData","_set_event_text_style","rec_pattern","_dp_change_event_id","_dp_hook_delete","setDp","DataProcessor","serverProcessorURL","serverProcessor","autoUpdate","_tMode","_headers","_payload","post_delim","messages","updated","inserted","deleted","invalid","invalid_cell","enableUTFencoding","eventable","setTransactionMode","total","_tSend","_endnm","_serializeAsJson","_router","router","escape","_utf","setDataColumns","_columns","getSyncState","enableDataNames","enablePartialDataSend","master","rowId","findRow","existing","set_invalid","is_invalid","markRow","_methods","getActionByState","checkBeforeUpdate","sendAllData","_beforeSendData","_getRowData","_sendData","_serializeAsJSON","serialize_one","pref","_applyPayload","dataToSend","_onResolvedCreateUpdate","resultState","sid","tid","afterUpdateCallback","routerMode","actionPromise","update","then","catch","queryParams","afterUpdate","urlParams","_user","_cleanupArgumentsBeforeSend","preprocessedData","_cleanupItemBeforeSend","valid","_forEachUpdatedRow","_getAllData","has_one","pattern","defineAction","_uActions","btag","marker","correct","originalSid","_errorResponse","cleanUpdate","_setDefaultTransactionMode","_serverProcessor","that","finalizeUpdate","atag","_initialized","_dp_init","dataProcessorEvents","_dataprocessor","setOnAfterUpdate","setOnBeforeUpdateHandler","setAutoUpdate","interval","user","_need_update","_update_busy","xml_node","afterAutoUpdate","fullSync","intervalId","loadUpdate","getUpdates","_getXmlNodeValue","version","vers","updates","processedData","updatedItem","output","item","processedItem","prop","_prepareItemForJson","_prepareItemForForm","_prepareDataItem","dataItem","createDataProcessor","tMode","boxAttribute","_dhx_msg_cfg","usercall","modalBox","modal_key","which","messageBox","keyboard","domHelpers","modality","cover","classValue","buttonAriaAttrs","buttonCss","info","timers","pull","getFirstDefined","_boxStructure","contentId","inner","message_ok","message_cancel","btn","_createBox","hidden","alertPopup","confirmPopup","boxPopup","box_params","params","alertBox","confirmBox","focusable","subtype","seed","hideAll","popups","modalbox","ar","day_tab","week_tab","month_tab","icon_save","icon_cancel","section_description","section_time","confirm_recurring","section_recurring","button_recurring","button_recurring_open","button_edit_series","button_edit_occurrence","grid_tab","repeat_radio_day","repeat_radio_week","repeat_radio_month","repeat_radio_year","repeat_radio_day_type","repeat_text_day_count","repeat_radio_day_type2","repeat_week","repeat_text_week_count","repeat_radio_month_type","repeat_radio_month_start","repeat_text_month_day","repeat_text_month_count","repeat_text_month_count2_before","repeat_text_month_count2_after","repeat_year_label","select_year_day2","repeat_text_year_day","select_year_month","repeat_radio_end","repeat_text_occurences_count","repeat_radio_end2","repeat_radio_end3","repeat_never","repeat_daily","repeat_workdays","repeat_weekly","repeat_monthly","repeat_yearly","repeat_custom","repeat_freq_day","repeat_freq_week","repeat_freq_month","repeat_freq_year","repeat_on_date","repeat_ends","month_for_recurring","day_for_recurring","be","agenda_tab","description","year_tab","week_agenda_tab","ca","cn","da","de","en","es","fi","fr","he","hu","it","jp","LocaleManager","_locales","nb","nl","no","pl","pt","ro","ru","si","sk","sv","tr","ua","i18nFactory","DatePicker","modes","currentRange","eventDates","filterDays","currentModeIndex","onStateChangeHandlers","_domEvents","onStateChange","oldState","newState","_notifyStateChange","newDate","setFullYear","setState","_toggleMode","newIndex","backwardArrow","monthLabel","innerText","toLocaleString","startYear","forwardArrow","_adjustDate","_renderCalendarHeader","dataContainer","_renderDayGrid","_renderMonthGrid","_renderYearGrid","daysOfWeekContainer","currentDate","labelFormat","dayElement","currWeek","minWeeks","minSchedulerDate","maxSchedulerDate","eventDaysTable","reduce","dayStart","_renderDayGridHeader","weekLength","children","firstDate","monthStart","monthEnd","lastDate","currentCalDate","_weeksBetween","dayGridContainer","dateCell","wrapper","months","formatLabel","monthElement","doneArea","doneBtn","yearElement","factoryMethod","extensionManager","stateProvider","common_errors","schedulerCore","wai_aria","dom","_createDatePicker","_getFocusableNodes","_locate_css","messageApi","event_highlight","dhtmlx_suite_hooks","skins","jquery","dataProcessorExtend","connector","i18n","addLocale","setLocale","localeObject","getLocale","dhx_save_btn","dhx_cancel_btn","dhx_delete_btn","addPlugins","ext","activePlugins","plugins","extensionList","getExtensionList","treetimeline","daytimeline","outerdrag","legacy","plugin","getExtension","dependencies","priorities","extension","dep","dependencyName","orderA","orderB","ExtensionsManager","_extensions","SchedulerFactory","extensions","_seed","_schedulerPlugins","_bundledExtensions","_extensionsManager","initConfig","_internal_id","$syncFactory","_initFromConfig","calendars","addCalendar","active_links","active_link_view","_active_link_click","s_d","do_wrapper","fullname","week_x","d_s","agenda_legacy","add_agenda_legacy","agenda_legacy_time","agenda_legacy_text","agenda_legacy_date","agenda_legacy_start","old_dblclick_dhx_cal_data","dblclick_dhx_cal_data","fill_agenda_tab","old_render_view_data","_agendaScrollTop","set_full_view","l","rowAttr","dateHeader","descriptionHeader","tableAttr","ev_class","agendaDetailsButtonAttr","agenda_time","agenda_text","agenda_area","v_border","dateElement","agenda_date","agenda_legacy_view","agenda_start","agenda_end","agenda_view","add_agenda","dayDateToStr","dayDowToStr","agenda_day","eventsInDays","anyEvents","renderEmptyView","ignore_agenda","renderDay","calendarEvent","renderOneEvent","selectedId","bg","all_timed_month","is_event_short","_safe_copy","proto","event_pid","isPrototypeOf","event_length","old_prerender_events_line","old_prerender_events_table","prerender_events","ce","_virtual","isOvernightEvent","getNextDay","setDateTime","event_changed","re","redraw","next_day","old_get_visible_events","old_mode","old_date","oldUpdate","fullRedrawNeeded","collision","temp_section","before","collision_limit","_setTempSection","event_id","checked_mode","checkCollision","edited_ev","rrule","recurring_event_id","_roll_back_dates","_check_sections_collision","second","evs_dates","getRecDates","tevs","concurrent","_pid_time","single","container_autoresize","month_day_min_height","min_grid_size","min_map_size","old_pre_render_event","active","total_height","multiday_height","evl","_h_fix","navHeight","headerHeight","checked_divs","updateContainterHeight","is_repaint","checked_div","maxHeight","rows_length","year_y","week_agenda_scale_height","cur_height","eventsContainer","g","_gridView","y_unit","getSectionHeight","scrollWidth","getScrollSize","callUpdate","conditionalUpdateContainerHeight","asyncRepaint","requestAnimationFrame","autosizeEnabled","$original_scroll_width","$original_section_autoheight","section_autoheight","cookie","setCookie","cookie_param","getCookie","getCookieName","_get_url_nav","urlNavigationPlugin","schedulerCookie","unescape","newMode","old_load","notImplemented","daytimeline_restricted","drag_between_restricted","editors","cached_options","resetCombo","_combo","DOMParent","combo","unload","DOMelem","dhx_globalImgPath","image_path","dhtmlXCombo","options_height","setOptionHeight","enableFilteringMode","filtering","script_path","all_options","single_option","addOption","getIndexByValue","selectOption","selected_id","disable","setComboValue","getSelectedValue","getSelectedText","vertical","radiobuttons","checked_value","isChecked","check_html","label_html","checkbox","unchecked_value","expand","fullscreen","toggleIcon","_position","_width","_height","_overflow","overflow","_maximize","collapse","directions","prev_margin","grid_view","html_templates","all","keyboard_shortcuts","$keyboardNavigation","shortcuts","createCommand","modifiers","alt","ctrl","meta","shortcut","commands","expr","getExpressions","words","getWords","command","commandKeys","specialKeys","charCodeAt","getCommandFromEvent","domEvent","altKey","ctrlKey","metaKey","printableKey","fromCharCode","getHashFromEvent","getHash","parts","junctionChar","term","combinationChar","backspace","enter","esc","space","up","down","home","pageup","pagedown","insert","plus","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10","f11","f12","eventhandler","EventHandler","_handlers","findHandler","doAction","unbind","bindAll","initKeys","trap_modal_focus","trapFocus","currentFocus","currentIndex","nextIndex","nextItem","renderMultiple","currentStart","currentEnd","TimeSlot","_modes","_getMode","renderVerticalMarker","renderTimelineMarker","renderYearMarker","renderMonthMarker","weekAgenda","renderWeekAgendaMarker","renderAgendaMarker","dayColumns","addWaiAriaLabel","addDataAttributes","dateToStr","dateTimeLabel","sectionObject","markerDate","_wrapDiv","_get_year_cell","opacity","view_opts","round_position","_trace_x","_is_column_visible","start_pos","end_pos","set_date_part","_timeline_getX","tempStart","tempEnd","_section_height","_isRender","renderMonthCell","weekNumber","dayIndex","datatable","lineHeight","scheduler_node","SchedulerNode","_compose","getDefaultNode","getMode","blur","enable","removeAttribute","_compareEvents","_pickEvent","startId","eventElement","Event","getNode","nextEventHandler","activeNode","dispatcher","nextEvent","currEvent","visibleDates","nextEv","setActiveNode","prevEventHandler","HeaderCell","getNodes","_key_nav_copy_paste","nav_node","KeyNavNode","moveTo","compareTo","canStringifyThis","canStringifyThat","header_cell","defaultCell","_getSection","_getNodes","defaultElement","isScrolledIntoView","eventBox","viewPort","idSelector","inlineEditor","getInlineEditor","isMultisectionEvent","keepScrollPosition","_moveToSlot","slot","nextSlot","time_slot","movingDate","getDefaultDate","key_nav_step","_getDefaultSection","visibleTime","nowTime","showNowTime","findVisibleColumn","clone","timeslot","_getMultisectionView","_getNextSection","isInRange","defaultSlot","DataArea","smart_rendering","_pasteDate","_pasteSection","addMonthDate","nextMonthSlot","_alignTimeSlot","nextTimelineSlot","newPos","nextUnitsSlot","optionsCount","nextDaySlot","_moveDate","isBeforeLastHour","isStartDate","minutes","isAfterFirstHour","isInVisibleDayTime","oldStart","toNextDay","testEnd","nextWeekAgendaSlot","nextAgendaSlot","isDateVisible","nextDateColumn","current","tempSlot","extendSlot","extendUnitsSlot","extendTimelineSlot","extendMonthSlot","extendDaySlot","extendWeekAgendaSlot","extendGenericSlot","allowedDirections","moveDate","newDates","extendSlotDates","oldSlot","newSlot","dateDirection","scrollSlot","minical_button","MinicalButton","globalNode","MinicalCell","minical_cell","_getGrid","_getNode","enabled","newRow","newCol","modals","modalsStack","isModal","afterPopup","startModal","endModal","isTopModal","currentTarget","traceLightbox","_keyNavMessagePopup","focusElement","backupFocus","core","getActiveNode","setDefaultNode","focusGlobalNode","blurNode","editor","keyDownHandler","defaultPrevented","schedulerNode","_timeout","key_nav_legacy","_temp_key_scope","key_nav","isCopy","trackMousePosition","mousePointer","keyNavPointer","elementFromPoint","clear_event_after","copyEvent","_make_pasted_event","multisection","_do_paste","is_copy","modified_ev","original_ev","_is_key_nav_active","getSelectedEvent","_buffer_event","new_ev","scheduler_handlers","attachSchedulerHandlers","focusHandler","waitCall","reFocusActiveNode","mousedownHandler","dataAreaClick","listOfScales","arrOfScales","some","focusEvent","evNode","prevState","lastStart","lastEnd","lastSection","minical_handlers","_minicalendars","isMinical","minicalendars","patchMinicalendar","focusMinical","minicalClick","rowIndex","td","renderMinical","cal","added","destroyMinical","_def_count","addShortcut","scope","scopeObject","getScope","getShortcutHandler","removeShortcut","disp","scopes","minicalButton","minicalDate","timeSlot","searchMap","attachOnce","isSchedulerSelected","changeState","layer","layers","validId","_clearUpdateFlag","_cloneObj","_dataprocessors","_layers_zindex","initial_layer_zindex","isDefault","defaultLayer","showLayer","tlayer","toggleLayer","hideLayer","visible","getLayer","layer_name","native_event_object","noMenu","_evs_layer","_t_render_view_data","evs_layer","borderBox","borderBoxWidth","headerWidth","bodyWidth","footerWidth","bodyHeight","new_zIndex","filter_agenda","limit_view","_temp_limit_scope","om","od","nm","nd","isBlocked","date_end","resetDate","is_new_event","data_copy","native_object","_mark_now_timer","GoogleMapAdapter","_markers","zoom","zoom_after_resolve","initial_zoom","lat","lng","setCenter","setZoom","error_position","google","maps","trigger","mapOptions","center","initial_position","mapId","scrollwheel","mapTypeId","Map","__gm","messageOverlay","outerContainer","setOptions","addListener","geocoder","Geocoder","point","latLng","geocode","results","GeocoderStatus","OK","geometry","location","event_location","formatted_address","clearInstanceListeners","AdvancedMarkerElement","importLibrary","mapView","createMarker","setMap","infoWindow","close","InfoWindow","maxWidth","info_window_max_width","setContent","map_info_content","anchor","markerInfo","setVisible","setPosition","latlng","LatLng","latitude","longitude","string","address","OpenStreetMapAdapter","openPopup","closeTooltip","setView","mapWrapper","L","tileLayer","addTo","on","fetch","country","myIcon","iconUrl","iconSize","shadowSize","iconAnchor","shadowAnchor","popupConfig","minWidth","markerPopup","popup","tooltip","markerConfig","bindPopup","bindTooltip","removeLayer","setLatLng","clearEventMarkers","lon","MapboxAdapter","getPopup","isOpen","togglePopup","mapboxgl","accessToken","lngLat","features","place_name","Popup","focusAfterOpen","setMaxWidth","setHTML","Marker","setLngLat","setPopup","map_view","mapAdapter","eventHandlerIds","adapters","googleMap","openStreetMaps","mapbox","createAdapter","map_view_provider","currentAdapter","_latLngUpdate","_eventLocationChanged","map_settings","resolve_user_location","resolve_event_location","view_provider","map_initial_position","map_error_position","map_date_width","map_icon_width","map_description_width","add_map","map_date","map_time","map_text","map_start","setupMapView","attachSchedulerEvents","addEventWithLocation","coordinates","resolveAddress","removeEventMarker","addEventMarker","setUserLocation","adapter","geolocation","getCurrentPosition","coords","dblclick_dhx_map_area","unmodifiedEvent","updateEventMarker","newIdEvent","onEventClick","detachSchedulerEvents","map_initial_zoom","map_zoom_after_resolve","map_infowindow_max_width","map_resolve_user_location","map_type","map_resolve_event_location","fill_map_tab","map_end","mapContainer","_setMapSize","destroy","initialize","elem_id","marginRight","marginTop","_selected_event_id","ariaButtonAttr","_updateEventLocation","_delay","ret","_event_resolve_delay","minical","minicalDomEvents","minicalendar","mark_events","_synced_minicalendars","_prev","is_refresh","cont","tpos","_get_def_cont","_render_calendar","$dom","cellRoot","dateAttribute","unmarkCalendar","markCalendar","_last_date","conf","markedDates","_markCalendarCurrentDate","sync","_on_xle_handler","refreshOnLoad","updateCalendar","_created","_locateCalendar","weekNum","dat","dayCell","_week_template","week_template","dummy_date","_mini_cal_arrows","previous","ts","temp2","temp3","temp4","temp5","temp6","temp7","temp8","padding","weekHeader","move_minicalendar_date","css_classnames","css_texts","diffs","arrow","dayHeaders","dayCells","inputs","selects","inp","number","new_date","_update_minical_select","isFulldayEvent","_attach_action","_round_minutes","linkCalendar","datediff","dateNew","month_end","noHighlight","monthheight","old_s","multisection_restricted","multiselect","parseXMLOptions","parseJSONOptions","_result","_children","_mark_inputs","_ids","delimiter","script_url","divLoading","multisource","backup","mvc","use_id","sanitize","update_timer","_start_ext_load","_finish_ext_load","_get_id","model","cid","backbone","toJSON","changes","queue","add_from_queue","Backbone","Collection","dragger","dhtmlDragAndDropObject","stopDrag","last_event","on_drop","sourceHtmlObject","dhtmlObject","targetHtmlObject","targetHtml","action_data","event_data","view_options","_locate_cell_timeline","addDragLanding","_drag","_dragIn","shtmlObject","_dragOut","DragControl","addDrop","onDrop","sourceDhtmlx","getMaster","onDragIn","pdf","html_regexp","newline_regexp","clean_html","x_norm","parseFloat","colsWidth","x_norm_event","is_left","dhx_cal_header","y_norm","get_style","de_day","de_week","xml_start","xml_end","xml_top","profile","footer","xml_body_header","dhx_cal_date","xh","xml_month_scale","xml_month","yh","xhs","second_scale","top_width","top_col","xml_body","colors","week_starts","_month","text_color","zx","zdx","left_norm","zy","zdy","e_type","dets","week","dy_copy","toXML","original_date","original_mode","temp_date","getPDFData","send_xml","submit","to_pdf","schedulersToPdf","objects","toPDF","toPDFRange","quick_info","show_quick_info","clickedElementPosition","_$quickInfoHandler","getPositionInsideScheduler","showQuickInfo","hiding_function","hideQuickInfo","quick_info_title","quick_info_content","quick_info_date","_quick_info_box_id","_get_event_counter_part","_quick_info_box","_init_quick_info","_fill_quick_data","_show_quick_info","cssTimeToMs","milliseconds","forced","qi","_x_scroll","dataPos","ontransitionend","fitQIInsideWindow","quickInfoPopup","popupRect","containerRect","offsetBottom","_quick_info_onscroll_handler","$testmode","_qi_button_click","domEv","titleContent","titleDate","main","mainContent","originalRecurringSetValue","original_left_buttons","original_right_buttons","readonly_form","forbidden_buttons","button_arrays","forbidden_button","button_array","txt_replace","txts","txtt","originalForm","readonlyForm","_lightbox_r","ALL_WEEKDAYS","Weekday","weekday","fromStr","nth","other","getJsWeekday","isPresent","isNumber","isWeekdayStr","includes","rang","repeat","times","toArray","padStart","targetLength","padString","sep","splits","pymod","divmod","mod","empty","notEmpty","datetime","MONTH_DAYS","ONE_DAY","MAXYEAR","ORDINAL_BASE","PY_WEEKDAYS","isLeapYear","isValidDate","daysBetween","date1","date2","date1ms","date2ms","differencems","toOrdinal","fromOrdinal","ordinal","getMonthDays","getWeekday","monthRange","combine","getMilliseconds","dolly","cloneDates","clones","timeToUntilString","untilStringToDate","until","bits","dateTZtoISO8601","timeZone","dateStr","dateInTimeZone","localTimeZone","Intl","DateTimeFormat","resolvedOptions","dateInLocalTZ","dateInTargetTZ","tzOffset","IterResult","after","accept","tooEarly","tooLate","extendStatics","setPrototypeOf","__proto__","__extends","TypeError","__","__assign","assign","__spreadArray","pack","SuppressedError","suppressed","CallbackIterResult","_super","iterator","_this","ENGLISH","dayNames","monthNames","tokens","SKIP","numberAsText","every","at","the","third","for","monday","tuesday","wednesday","thursday","friday","saturday","sunday","january","february","march","april","may","june","july","august","september","october","november","december","comma","defaultGetText","defaultDateFormatter","ToText","gettext","language","dateFormatter","origOptions","bymonthday","bynmonthday","byweekday","allWeeks","someWeeks","isWeekdays","isEveryDay","sortWeekDays","isFullyConvertible","canConvert","freq","IMPLEMENTED","RRule","FREQUENCIES","plural","HOURLY","MINUTELY","DAILY","bymonth","_bymonth","_bymonthday","_byweekday","byhour","_byhour","WEEKLY","MONTHLY","YEARLY","byyearday","byweekno","weekdaytext","monthtext","npos","wday","finalDelim","delim","delimJoin","finalDelimiter","o","realCallback","Parser","rules","done","nextSymbol","isDone","symbol","best","bestSymbol","rule","name_1","v","acceptNumber","expect","parseText","ttr","S","AT","F","MO","TU","WE","TH","FR","ON","wkd","decodeWKD","MDAYs","decodeM","decodeNTH","Frequency","freqIsDailyOrGreater","fromText","toText","Time","millisecond","DateTime","fromDate","getYear","addYears","years","addMonths","yearDiv","monthMod","addWeekly","wkst","fixDay","addDaily","addHours","filtered","_a","dayDiv","hourMod","addMinutes","byminute","hourDiv","minuteMod","addSeconds","seconds","bysecond","minuteDiv","secondMod","daysinmonth","SECONDLY","initializeOptions","_i","keys_1","defaultKeys","parseOptions","DEFAULT_OPTIONS","byeaster","dtstart","bysetpos","bynweekday","parsedOptions","buildTimeset","millisecondModulo","timeset","parseString","rfcString","parseLine","parseDtstart","line","dtstartWithZone","tzid","parseRrule","strippedLine","Days","parseNumber","optionKey","parseWeekday","parseIndividualNumber","SyntaxError","wdaypart","DateWithZone","RangeError","defineProperty","enumerable","configurable","isUTC","rezonedDate","optionsToString","outValue","buildDtstart","strValues","ruleString","argsMatch","Cache","between","_cacheAdd","what","_value","_cacheGet","cached","argsKeys","findCacheDiff","cachedObject","iterResult","M365MASK","M366MASK","M28","M29","M30","M31","MDAY366MASK","MDAY365MASK","NM28","NM29","NM30","NM31","NMDAY366MASK","NMDAY365MASK","M366RANGE","M365RANGE","WDAYMASK","wdaymask","rebuildYear","firstyday","yearlen","nextyearlen","yearordinal","yearweekday","baseYearMasks","wnomask","firstwkst","wyearlen","no1wkst","numweeks","lnumweeks","lyearweekday","lno1wkst","lyearlen","weekst","mmask","mdaymask","nmdaymask","mrange","rebuildMonth","lastyear","lastmonth","nwdaymask","ranges","easter","yearStart","Iterinfo","rebuild","yearinfo","monthinfo","eastermask","ydayset","mdayset","_","wdayset","ddayset","htimeset","mtimeset","stimeset","getdayset","gettimeset","buildPoslist","ii","dayset","poslist","daypos","timepos","tmp","iter","emitResult","counterDate","makeTimeset","removeFilteredDays","rezoneIfNeeded","currentDay","isFiltered","dayCounter","SA","SU","noCache","_cache","fromString","_iter","isFullyConvertibleToText","iterSet","_rrule","_exrule","_rdate","_exdate","_exdateHash","_accept","evalExdate","zonedDate","unfold","forceset","compatible","parseInput","rrulevals","rdatevals","exrulevals","exdatevals","parsedDtstart","lines","splitIntoLines","_b","breakDownLine","parms","_c","rdateTzid","parseRDate","buildRule","rset_1","RRuleSet","groomRruleOptions","rdate","exrule","exdate","rrulestr","extractName","validateDateParm","parm","rdateval","createGetterSetter","fieldName","field","field_1","_addRule","_addDate","rrules","exrules","rdates","exdates","_dtstart","rdatesToString","rrs","clearMilliseconds","isDeletedOccurrence","isSeries","clearRecurringProperties","original_start","createException","nid","nev","toUTCDate","setUTCPartsToDate","_rec_temp","_rec_markers_pull","_rec_markers","_get_rec_marker","ch","_get_rec_markers","old_add_event","ev_id","_ignore_call","tev","_pid_changed","deleteEventFromSeries","idTimestamp","_is_modified_occurence","sub","isEventFound","_start_date","showLightbox_rec","lightbox_recurring","pid","isVirtual","showSeries","title_confirm_recurring","groupExceptions","exceptions","get_visible_events_rec","repeat_date","old_update_event","toIcalString","non_render","maxCount","seriesExceptions","utcStart","parsedRRule","repeatedDates","adjustedDate","visibleCount","eventDuration","exception","_fix_daylight_saving_date","recurrings","sev","occurence","include_end_by","recurring_workdays","getTopLevelOption","rruleObj","untilDate","hasEndCondition","getWeekdayOfMonth","dayOfWeek","dayOfMonth","dayNumber","jsDaysToRRULEDays","RruleDayNumsToJs","fillCustomDaily","fillCustomWeekly","dayCheckboxes","dayNum","dayLabel","fillCustomMonthly","dateOfMonth","nthWeekDayOfMonth","repeat_monthly_date","repeat_monthly_weekday","formatDayNumber","nthDayOfMonth","repeat_yearly_month_date","repeat_yearly_month_weekday","fillCustomYearly","dateOfYear","nthWeekDayOfYear","fillEndRule","countInput","ondateInput","endOptionSelect","formatter","repeat_date_of_end","dispatchEvent","getRecValue","WORKDAYS","CUSTOM","monthRepeat","yearRepeat","formatFunc","endRule","NEVER","fillInDefaults","rec","_get_node","_outer_html","loc","_init_set_value","_ds","show","onRepeatOptionChange","onCustomRepeatIntervalChange","weekly","monthly","yearly","onCustomRepeatEndRule","_rec_init_done","rf","blocked","rruleset","topOption","customFreq","actual_dates","timeControl","getTimeSection","recurrence","_start","getFirstSectionOfType","recurring_legacy","occurrence_timestamp_in_utc","outerHTML","getOuterHTML","_get_form_node","_get_node_value","_get_node_numeric_value","_set_node_value","hash_value","str_date_format","str_date","date_str","register_els","inps","change_current_view","get_repeat_code","get_rcode","get_end_rule","transpose_type","transp","set_end_rule","has_values","_get_repeat_code","get_numeric_value","repeat_precise","start_exists","transpose_day_week","set_rcode","set_repeat_code","MouseEvent","_set_repeat_code","elements","_toggle_block","_get_button","getRecurringSection","_get_form","backgroundPosition","transponse_size","day_week","originalMonth","cday","newMonth","cor","cor2","transposeRecurring","recurringParts","dayDurationMs","addRecurring","recurringStepDays","weekDays","seriesInstance","currentCount","origMonth","origYear","correctOverflowInstances","recurring_overflow_instances","startHour","ted","data_attributes","all_events","_serialize_json_value","toICal","full_day_format","timeline_restricted","Tooltip","_scheduler","_tooltipNode","_root","_isLikeMouseEvent","_calculateTooltipPosition","_getViewPort","viewport","_getViewPortSize","tooltipNode","offsetX","tooltip_offset_x","offsetY","tooltip_offset_y","mouse","containerPos","scrollY","scrollX","$event_data","$event","TooltipManager","_listeners","_initDelayedFunctions","hideTooltip","delayHide","watchableTarget","eventTarget","targetNode","doOnMouseEnter","onmouseenter","touch_tooltip","onmouseleave","onmousemove","listener","cloneDomEvent","delayShow","utils.default","tooltip_timeout","tooltip_hide_timeout","tooltipManager","tooltips","tooltipFor","targetEventId","treetimeline_restricted","units_restricted","s2d","d2s","select_event","week_agenda_restricted","wp","year_view","year_date","year_month","year_scale_date","year_tooltip","isYearMode","getCellDate","dblclick_dhx_year_grid","_year_render_event","_year_marked_cells","_hideToolTip","_tooltip","_showToolTip","_year_view_tooltip_handler","_init_year_tooltip","_mark_year_date","_unmark_year_date","_reset_year_scale","year_top","ssd","yearBox","year_x","datepicker","ignore_year","locateEvent","export_api","std","getElementSizes","sizes","dhtmlxAjax","dhx4","add_export_methods","orientation","dpi","_export_html","_send_to_export","exportToICal","_serialize_plain","exportToExcel","_serialize_columns","_ajax_to_export","server","fail","_plain_export_copy","$text","_create_hidden_form","_hidden_export_form","_get_export_size","A5","A4","A3","A2","A1","A0","dataX","dataY","headY","multY","cSize","getTimeline","getInitialSizes","smartRendering","style_width","style_height","timeline_scrollable","timeline_smart_rendering","setExportSizes","initialSizes","setInitialSizes","gplExtensions","drag_between","factory","$dhx"],"mappings":";;;;;;;;;;;;;AACe,WAAAA,aAEf;AAAA,QAAA,OAAWC,UAAU,eAAeA,OAAOC,UAAU;AACpDD,aAAOC,SAASC,kBAAkB,SAAUC,KAAKC,MAAMC,MAAMC,YAC5D;AAAA,YAAID,OAAOA,QAAQ;AACnB,YAAIE,MAAMC,SAASC,cAAc,KAAA;AACjCF,YAAIG,KAAK,iBAAiBC,KAAKC,QAAQ,EAAA;AACvCL,YAAIM,YAAY,cAAcN,IAAIG,KAAK,qPAAqPL,OAAO;AACnSG,iBAASM,KAAKC,YAAYR,IAAIS,UAAAA;AAE9BL,aAAKM,aAAaV,IAAIG,IAAI,OAAO,IAAA;AAEjCC,aAAKO,GAAGP,KAAKQ,EAAIC,EAAAA,QAAQd;AACzBK,aAAKO,GAAGP,KAAKQ,EAAIE,EAAAA,UAAUd,IAAIG;AAC/BJ,QAAAA,WAAUgB,WAAWhB,WAAUiB;AAC/BjB,QAAAA,WAAUkB,aAAa;;AACvBlB,QAAAA,W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AQjkB,IAAI69F,QAAQ79F,IAAIq2B;AAElH,cAAI/yB,OAAO;AACX,cACC6sH;AAAAA,2BAAehjH,MAAMijH,YAAAA;AACrBrwH,YAAAA,WAAU6X,eACVtU;AAAAA,mBAAOvD,WAAU2kB,KAAKpkB;AAAAA,UACtB,SAAQ0F,GAAAA;AAGR0Q,oBAAQC,MAAM3Q;UACjB,UAAY;AACTqqH,4BAAgBD,YAChBrwH;AAAAA,YAAAA,WAAU6X;UACV;AAED,iBAAOtU;AAAAA,QACT;AAAA,MAEA;AAEA0qH,yBAAmBjuH,UAAAA;AAAAA,IAGlB,GAED;AAAA,EAAA;AC3Pe,QAAAuwH,gBAAA,EACd/nD,cACAQ,eACA4B,aACAl5C,WACAw7C,WACAoB,sBACAoC,QACA5J,aAAawK,wBACbk/C,cAAcj/C,yBACdC,SACAkC,QACAi6C,YACAr5C,WACAC,gBACAyP,SACA+D,OACA5vE,OACAg5E,UACAiE,SACAiE,aACA5U,cAAc8U,yBACdC,aACAU,aACAE,KACArzB,WACA61B,KACAuD,YACAn2E,UACAg/B,WACAg8D,kBACA98E,WACA7sB,UAAU0tG,qBACVp5B,SACA9oB,cAAc8kD,yBACd72G,OAAO82G,kBACP7jF,KACAzsB,aAAa0wG,wBACbC,IACAC,UAAAA;AC5ED,QAAMuE,UAAU,IAAI7oD,iBAAiB2oD,aAEhC;AAAA,QAACvwH,YAAYywH,QAAQ1gE,qBAAAA;AACrB,QAACD,cAAY,EACjBmX,QAAQjnE,UAAUkjB,KAAKutG,QAAQxpD,QAAQwpD;AAGxCnvH,SAAOtB,YAAYA;AACnBsB,SAAOwuD,YAAYA;AAEnB,MAAA,CAAIxuD,OAAOovH,MAAM;AAChBpvH,WAAOovH,OAAO;EACf;AAEApvH,SAAOovH,KAAK1wH,YAAYA;AACxBsB,SAAOovH,KAAK5gE,YAAYA;;;;;;","x_google_ignoreList":[126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153]} \ No newline at end of file diff --git a/codebase/sources/less/package.json b/codebase/sources/less/package.json index c39798d..d9ddf12 100644 --- a/codebase/sources/less/package.json +++ b/codebase/sources/less/package.json @@ -1,6 +1,6 @@ { "name": "dhtmlx-scheduler-skins", - "version": "7.1.2", + "version": "7.1.3", "description": "Less sources and a build tool for DHTMLXScheduler skins", "scripts": { "build": "node scripts.js --file=theme", diff --git a/codebase/sources/less/src/datepicker.less b/codebase/sources/less/src/datepicker.less index e4d39cc..87a5830 100644 --- a/codebase/sources/less/src/datepicker.less +++ b/codebase/sources/less/src/datepicker.less @@ -64,7 +64,7 @@ .dhx_cal_datepicker_days { display: grid; - grid-template-columns: repeat(7, 1fr); + grid-template-columns: repeat(var(--dhx-scheduler-week-length, 7), 1fr); gap: 4px; } diff --git a/package.json b/package.json index 9c9e622..4fd1240 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dhtmlx-scheduler", - "version": "7.1.2", + "version": "7.1.3", "description": "JavaScript event calendar. Allows to manage events and appointments in different views", "main": "codebase/dhtmlxscheduler.es.js", "types": "codebase/dhtmlxscheduler.es.d.ts", diff --git a/whatsnew.md b/whatsnew.md index cff2ef8..3af37b4 100644 --- a/whatsnew.md +++ b/whatsnew.md @@ -1,3 +1,11 @@ +### 7.1.3 + +Fix the issue where the initial position of events was not highlighted during drag and drop in the Timeline and Units views +Fix the issue where the last_hour setting caused incorrect behavior of drag and drop in the Timeline view +Prevent recurring occurrences from disappearing in certain time zones during DST transitions +Fix repeated end date increments when toggling Full day in the Mini Calendar control of the lightbox +Restore functionality of the ignore_year and ignore_agenda methods + ### 7.1.2 Fix the incorrect position of events pasted using Ctrl+C/Ctrl+V when the multisection extension is enabled