From 5abd684b0bf8390be6f30d8c229d3fd937f6a5f6 Mon Sep 17 00:00:00 2001 From: Lyndon Jetten Date: Wed, 25 Oct 2023 21:52:23 +0200 Subject: [PATCH] =?UTF-8?q?Unterschriftenstatus=20zur=20ServiceRecordHisto?= =?UTF-8?q?ry=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Frommen: Quittierungsbeleg angepasst; die Unterschriftengrafiken sind jetzt größer Fehler von Tempusdominus bei den Zeitfeldern des MoKs behoben. Quittierungsbelegmodul im MoK: Legende der Symbole hinzugefügt Validierung von Gruppenbuchungen im MoK verbessert. --- BeWo/BeWo.csproj | 156 +- .../Converter/ToolTipTimeConverter.cs | 1 + BeWo/Scheduler/View/NewSchedulerView.xaml | 28 +- BeWo/Scheduler/View/NewSchedulerView.xaml.cs | 4 +- .../View/SchedulerAppointmentEditForm.xaml.cs | 4 +- .../Scheduler/ViewModel/CustomFieldStorage.cs | 20 +- .../ServiceRecordHistoryView.xaml | 40 +- .../ServiceRecordHistoryView.xaml.cs | 20 +- .../Zeiterfassung/ServiceRecordView2.xaml.cs | 14 +- .../KilometerauslastungsView.xaml.cs | 55 +- BeWoPlanerMobil/Controllers/MainController.cs | 46 +- .../Controllers/SchedulerController.cs | 4 +- .../utils/password-security.js | 176 +- .../utils/service-record-time-calc.js | 6 - .../Scripts/tempusdominus-boostrap-4.min.js | 1485 ++++++++++++++++- BeWoPlanerMobil/Views/Main/Main.cshtml | 2 +- BeWoPlanerMobil/Views/Report/Report.cshtml | 9 +- BeWoPlanerMobil/Views/Shared/_Layout.cshtml | 5 +- Data/Access/SearchDAO.cs | 63 +- Data/Entities/ServiceRecordHistory.cs | 42 + Data/Mappings/ServiceRecordHistory.hbm.xml | 10 +- Host/Host.csproj.user | 2 +- ...5_ServiceRecordHistory SignatureStates.txt | 3 + .../Quittierungsbeleg.Designer.cs | 28 +- ...iceRecordHistoryDC_ServiceRecordHistory.cs | 10 +- Service/Plugins/PluginLoader.cs | 4 +- Service/Plugins/ServiceRecordValidator.cs | 4 +- Service/Plugins/TranslationDictionary.cs | 4 + .../OperationsServiceImp.cs | 723 ++++++-- Shared/BeWoEntityEnums.cs | 15 +- Shared/Core/Utils.cs | 2 +- .../ClientPartials/ServiceRecordHistoryDC.cs | 29 +- .../DataContracts/ServiceRecordHistoryDC.cs | 9 + 33 files changed, 2559 insertions(+), 464 deletions(-) create mode 100644 Model/Changes_2023_10_25_ServiceRecordHistory SignatureStates.txt diff --git a/BeWo/BeWo.csproj b/BeWo/BeWo.csproj index 467b2c135..558131d38 100644 --- a/BeWo/BeWo.csproj +++ b/BeWo/BeWo.csproj @@ -2548,392 +2548,392 @@ False + Include + True - Include - True Assembly False + Include + True - Include - True Assembly False + Include + True - Include - True Assembly False + Include + True - Include - True Assembly False + Include + True - Include - True Assembly False + Include + True - Include - True Assembly False + Include + True - Include - True Assembly False + Include + True - Include - True Assembly False + Include + True - Include - True Assembly False + Include + True - Include - True Assembly False + Include + True - Include - True Assembly False + Include + True - Include - True Assembly False + Include + True - Include - True Assembly False + Include + True - Include - True Assembly False + Include + True - Include - True Assembly False + Include + True - Include - True Assembly False + Include + True - Include - True Assembly False + Include + True - Include - True Assembly False + Include + True - Include - True Assembly False + Include + True - Include - True Assembly False + Include + True - Include - True Assembly False + Include + True - Include - True Assembly False + Include + True - Include - True Assembly False + Include + True - Include - True Assembly False + Include + True - Include - True Assembly False + Include + True - Include - True Assembly False + Include + True - Include - True Assembly False + Include + True - Include - True Assembly False + Include + True - Include - True Assembly False + Include + True - Include - True Assembly False + Include + True - Include - True Assembly False + Include + True - Include - True Assembly False + Include + True - Include - True Assembly False + Include + True - Include - True Assembly False + Include + True - Include - True Assembly False + Include + True - Include - True Assembly False + Include + True - Include - True Assembly False + Include + True - Include - True Assembly False + Include + True - Include - True Assembly diff --git a/BeWo/Scheduler/Converter/ToolTipTimeConverter.cs b/BeWo/Scheduler/Converter/ToolTipTimeConverter.cs index a154fcae6..160d184cf 100644 --- a/BeWo/Scheduler/Converter/ToolTipTimeConverter.cs +++ b/BeWo/Scheduler/Converter/ToolTipTimeConverter.cs @@ -21,6 +21,7 @@ namespace BeWo.Scheduler.Converter { if(visualAppointmentViewInfo.CustomViewInfo is CustomFieldCollection customFieldCollection && customFieldCollection[nameof(CustomFieldStorage)] is CustomFieldStorage customFieldStorage) { + // ToDo: Bei Terminen einer Serie stimmen die Angaben nicht immer! Ist erst in DevExpress-Version 19.2.6 gefixt! var isAbsenceTime = customFieldStorage.IsAbsenceTime; var isTask = customFieldStorage.IsTask; diff --git a/BeWo/Scheduler/View/NewSchedulerView.xaml b/BeWo/Scheduler/View/NewSchedulerView.xaml index 5e54384d9..83bfece8c 100644 --- a/BeWo/Scheduler/View/NewSchedulerView.xaml +++ b/BeWo/Scheduler/View/NewSchedulerView.xaml @@ -32,6 +32,7 @@ + @@ -323,6 +324,7 @@ + @@ -330,8 +332,7 @@ - - + @@ -352,15 +353,15 @@ TextWrapping="Wrap" MaxWidth="{Binding Path=ActualWidth, Source={x:Reference Scheduler}}" /> - + - - + - + - + - - + - - - + + + @@ -971,8 +972,7 @@ AllowAppointmentCreate="AllowAppointmentCreateEvent" AllowAppointmentDragBetweenResources="AllowAppointmentAenderung" AllowAppointmentDelete="AllowAppointmentAenderung" - ActiveViewType="WorkWeek" - > + ActiveViewType="WorkWeek"> diff --git a/BeWo/Scheduler/View/NewSchedulerView.xaml.cs b/BeWo/Scheduler/View/NewSchedulerView.xaml.cs index e1f670e14..0116fe234 100644 --- a/BeWo/Scheduler/View/NewSchedulerView.xaml.cs +++ b/BeWo/Scheduler/View/NewSchedulerView.xaml.cs @@ -1488,9 +1488,11 @@ namespace BeWo.Scheduler.View private void Scheduler_AppointmentViewInfoCustomizing(object sender, AppointmentViewInfoCustomizingEventArgs e) { + var appointment = e.ViewInfo.Appointment; + var customFields = e.ViewInfo.Appointment.CustomFields; - if(customFields[nameof(CustomFieldStorage)] == null) + if(customFields[nameof(CustomFieldStorage)] is null) { return; } diff --git a/BeWo/Scheduler/View/SchedulerAppointmentEditForm.xaml.cs b/BeWo/Scheduler/View/SchedulerAppointmentEditForm.xaml.cs index b44b5eed3..a0bad4410 100644 --- a/BeWo/Scheduler/View/SchedulerAppointmentEditForm.xaml.cs +++ b/BeWo/Scheduler/View/SchedulerAppointmentEditForm.xaml.cs @@ -499,11 +499,11 @@ namespace BeWo.Scheduler.View var customFieldStorage = Appointment.GetCustomFieldStorage(); var serviceRecords = customFieldStorage?.ServiceRecordList ?? new List(); - ViewModel.ApplyChangesToChangedOccurencyCustomFields(employees, customers, resources, originator, isPrivate, Appointment.RecurrenceIndex.ToString(), new Guid(Appointment.RecurrenceInfo.Id.ToString()), isTask, taskDescription, completedDate, dueDate, completedNotice, supportConceptList, Appointment.Subject, Appointment.AllDay, serviceRecords, start, end); - var oldRecurrenceInfo = Appointment.RecurrenceInfo.ToXml(); var newRecurrenceInfo = ViewModel.NewVM.RecurrenceInfo; + ViewModel.ApplyChangesToChangedOccurencyCustomFields(employees, customers, resources, originator, isPrivate, Appointment.RecurrenceIndex.ToString(), new Guid(Appointment.RecurrenceInfo.Id.ToString()), isTask, taskDescription, completedDate, dueDate, completedNotice, supportConceptList, Appointment.Subject, Appointment.AllDay, serviceRecords, start, end); + if(!Equals(oldRecurrenceInfo, newRecurrenceInfo)) { // Damit wird verhindert, dass beim Ändern von Zeitangaben bei Serienterminen die Ausnahmen gelöscht werden. diff --git a/BeWo/Scheduler/ViewModel/CustomFieldStorage.cs b/BeWo/Scheduler/ViewModel/CustomFieldStorage.cs index f11bd017c..97d147479 100644 --- a/BeWo/Scheduler/ViewModel/CustomFieldStorage.cs +++ b/BeWo/Scheduler/ViewModel/CustomFieldStorage.cs @@ -1,10 +1,8 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Diagnostics; using System.Windows; using System.Windows.Media; - using BS.Shared.DataContracts; using BS.Shared.DataContracts.Compact; using BS.Shared.Extensions; @@ -42,7 +40,7 @@ namespace BeWo.Scheduler.ViewModel if(!absenceTimeEnd.HasValue) { - return result += _AbsenceTimeStart.Value.GetIntervalDescription(absenceTimeEnd); + return $"{result}{_AbsenceTimeStart.Value.GetIntervalDescription(absenceTimeEnd)}"; } var absenceTimeStart = _AbsenceTimeStart.Value; @@ -52,7 +50,7 @@ namespace BeWo.Scheduler.ViewModel absenceTimeEnd = absenceTimeEnd.Value.AddDays(-1); } - return result += _AbsenceTimeStart.Value.GetIntervalDescription(absenceTimeEnd); + return $"{result}{_AbsenceTimeStart.Value.GetIntervalDescription(absenceTimeEnd)}"; } } @@ -81,7 +79,7 @@ namespace BeWo.Scheduler.ViewModel public string RecurrenceId { get; set; } public int RecurrenceIndex { get; set; } - + public CompactEmployeeDC Originator { get; set; } private DateTime? _AbsenceTimeStart; @@ -123,8 +121,8 @@ namespace BeWo.Scheduler.ViewModel SchedulerAppointmentOid = pAppointment.DataContract?.SchedulerAppointmentOid; - RecurrenceId = pAppointment.DataContract?.RecurrenceId; - RecurrenceIndex = pAppointment.DataContract?.RecurrenceIndex ?? 0; + RecurrenceId = pAppointment.DataContract?.RecurrenceIdReference; + RecurrenceIndex = pAppointment.DataContract?.RecurrenceIndexReference ?? 0; _AbsenceTimeStart = pAppointment.AbsenceTimeStart; _AbsenceTimeEnd = pAppointment.AbsenceTimeEnd; @@ -137,6 +135,10 @@ namespace BeWo.Scheduler.ViewModel ServiceRecordList = pAppointment.ServiceRecordList; } + /// + /// Erzeugt ein CustomFieldStorage-Objekt aus einem SchedulerAppointmentDC. Wird nur für veränderte Serientermine benutzt. + /// + /// Der veränderte Serientermin als SchedulerAppointmentDC public CustomFieldStorage(SchedulerAppointmentDC pAppointment) { IsTask = pAppointment.IsTask; @@ -160,8 +162,8 @@ namespace BeWo.Scheduler.ViewModel SchedulerAppointmentOid = pAppointment.SchedulerAppointmentOid; - RecurrenceId = pAppointment.RecurrenceId; - RecurrenceIndex = pAppointment.RecurrenceIndex; + RecurrenceId = pAppointment.RecurrenceIdReference; + RecurrenceIndex = pAppointment.RecurrenceIndexReference ?? 0; HasServiceRecordEntry = pAppointment.HasServiceRecordEntry; diff --git a/BeWo/View/Detail/Zeiterfassung/ServiceRecordHistoryView.xaml b/BeWo/View/Detail/Zeiterfassung/ServiceRecordHistoryView.xaml index 7c39c2d62..306726132 100644 --- a/BeWo/View/Detail/Zeiterfassung/ServiceRecordHistoryView.xaml +++ b/BeWo/View/Detail/Zeiterfassung/ServiceRecordHistoryView.xaml @@ -2,12 +2,12 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:localView="clr-namespace:BeWo.View" - xmlns:detail="clr-namespace:BeWo.View.Detail" xmlns:zeit="clr-namespace:BeWo.View.Detail.Zeiterfassung" xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid" xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" xmlns:t="clr-namespace:BeWo.MultiLanguage.Markup" - Height="Auto" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Focusable="True" + Height="Auto" Width="Auto" + HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Focusable="True" xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"> @@ -92,7 +92,7 @@ - + @@ -127,25 +127,27 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + AllowPerPixelScrolling="True" UseLightweightTemplates="None" DataRowTemplate="{DynamicResource RowDetailTemplate}"/> diff --git a/BeWo/View/Detail/Zeiterfassung/ServiceRecordHistoryView.xaml.cs b/BeWo/View/Detail/Zeiterfassung/ServiceRecordHistoryView.xaml.cs index 69a96b9ea..ed90d9485 100644 --- a/BeWo/View/Detail/Zeiterfassung/ServiceRecordHistoryView.xaml.cs +++ b/BeWo/View/Detail/Zeiterfassung/ServiceRecordHistoryView.xaml.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using System.Windows; using System.Windows.Controls; using BS.Shared.DataContracts; @@ -21,16 +20,25 @@ namespace BeWo.View.Detail.Zeiterfassung InitializeComponent(); datagrid_ServiceRecordHistory.ItemsSource = historyList; - GridView.BestFitColumns(); + Focus(); - - if (!BeWoApp.AppSettings.IsEndDateVisible && !BeWoApp.AppSettings.IsOnlyYearMonthVisible) + if(BeWoApp.AppSettings.IsEndDateVisible || BeWoApp.AppSettings.IsOnlyYearMonthVisible) { - RoundedDHeader.Header = "Minuten"; - DurationInSTDHeader.Visible = false; + return; } + RoundedDHeader.Header = "Minuten"; + DurationInSTDHeader.Visible = false; + +#if DEBUG + DurationInSTDHeader.Visible = true; +#endif + } + + public void OptimizeDataGridColumns() + { + GridView.BestFitColumns(); } } public class RowDetailContainerControl : ContentControl diff --git a/BeWo/View/Detail/Zeiterfassung/ServiceRecordView2.xaml.cs b/BeWo/View/Detail/Zeiterfassung/ServiceRecordView2.xaml.cs index 9903b01f6..08fc294e2 100644 --- a/BeWo/View/Detail/Zeiterfassung/ServiceRecordView2.xaml.cs +++ b/BeWo/View/Detail/Zeiterfassung/ServiceRecordView2.xaml.cs @@ -1308,24 +1308,24 @@ namespace BeWo.View.Detail.Zeiterfassung private void ShowHistory(ServiceRecordVM vm) { - if (vm == null) + if (vm is null) { return; } - double height = 600; - double width = 1200; + var height = rootGrid.ActualHeight * .8;//600d; + var width = rootGrid.ActualWidth * .8;//1200; var serviceRecordHistoryView = new ServiceRecordHistoryView(); popup_content.Child = serviceRecordHistoryView; - - if (rootGrid.ActualHeight < height) + if(rootGrid.ActualHeight < height) { height = rootGrid.ActualHeight; } - if (rootGrid.ActualWidth < width) + + if(rootGrid.ActualWidth < width) { width = rootGrid.ActualWidth; } @@ -1351,6 +1351,8 @@ namespace BeWo.View.Detail.Zeiterfassung serviceRecordHistoryView.ParentView = this; SetPopupViewVisible(true); + + serviceRecordHistoryView.OptimizeDataGridColumns(); })); } diff --git a/BeWo/View/Report/Kilometerauswertung/KilometerauslastungsView.xaml.cs b/BeWo/View/Report/Kilometerauswertung/KilometerauslastungsView.xaml.cs index 5b56cdbdf..72c676eac 100644 --- a/BeWo/View/Report/Kilometerauswertung/KilometerauslastungsView.xaml.cs +++ b/BeWo/View/Report/Kilometerauswertung/KilometerauslastungsView.xaml.cs @@ -100,12 +100,14 @@ namespace BeWo.View.Report.Kilometerauswertung set { - if(_Years != value) + if(_Years == value) { - _Years = value; - - OnPropertyChanged(nameof(Years)); + return; } + + _Years = value; + + OnPropertyChanged(nameof(Years)); } } @@ -115,12 +117,14 @@ namespace BeWo.View.Report.Kilometerauswertung set { - if(_SelectedMonthIndex != value) + if(_SelectedMonthIndex == value) { - _SelectedMonthIndex = value; - - OnPropertyChanged(nameof(SelectedMonthIndex)); + return; } + + _SelectedMonthIndex = value; + + OnPropertyChanged(nameof(SelectedMonthIndex)); } } @@ -132,12 +136,14 @@ namespace BeWo.View.Report.Kilometerauswertung set { - if(_SelectedYearIndex != value) + if(_SelectedYearIndex == value) { - _SelectedYearIndex = value; - - OnPropertyChanged(nameof(SelectedYearIndex)); + return; } + + _SelectedYearIndex = value; + + OnPropertyChanged(nameof(SelectedYearIndex)); } } @@ -147,12 +153,14 @@ namespace BeWo.View.Report.Kilometerauswertung set { - if (_StartDate != value) + if(_StartDate == value) { - _StartDate = value; - - OnPropertyChanged(nameof(StartDate)); + return; } + + _StartDate = value; + + OnPropertyChanged(nameof(StartDate)); } } @@ -162,18 +170,19 @@ namespace BeWo.View.Report.Kilometerauswertung set { - if (_EndDate != value) + if(_EndDate == value) { - _EndDate = value; - - OnPropertyChanged(nameof(EndDate)); + return; } + + _EndDate = value; + + OnPropertyChanged(nameof(EndDate)); } } private KilometerauslastungsType _ReportType = KilometerauslastungsType.Customer; - public KilometerauslastungsView() { InitializeComponent(); @@ -223,7 +232,6 @@ namespace BeWo.View.Report.Kilometerauswertung EmployeePopUpEdit.IsEnabled = false; } - Unloaded += delegate { @@ -306,7 +314,7 @@ namespace BeWo.View.Report.Kilometerauswertung //var selectedYear = Years[SelectedYearIndex]; //var rangeDate = new DateTime(selectedYear, SelectedMonthIndex + 1, 1); - var url = string.Format("{0}/ReportView.aspx?type={1}&start={2:ddMMyyyy}&end={3:ddMMyyyy}", BeWoApp.SiteOfOrigin, ReportTypes.KilometerAuswertung, StartDate, EndDate); + var url = $"{BeWoApp.SiteOfOrigin}/ReportView.aspx?type={ReportTypes.KilometerAuswertung}&start={StartDate:ddMMyyyy}&end={EndDate:ddMMyyyy}"; var oidList = new List(); @@ -458,6 +466,7 @@ namespace BeWo.View.Report.Kilometerauswertung _ReportType = KilometerauslastungsType.Employee; break; } + OnPropertyChanged(nameof(IsCreateButtonEnabled)); SetVisibilityValues(); } diff --git a/BeWoPlanerMobil/Controllers/MainController.cs b/BeWoPlanerMobil/Controllers/MainController.cs index 2c8279fe9..d58947611 100644 --- a/BeWoPlanerMobil/Controllers/MainController.cs +++ b/BeWoPlanerMobil/Controllers/MainController.cs @@ -2240,9 +2240,11 @@ namespace BeWoPlanerMobil.Controllers if(Model.IsInGroupBookingMode) { + ServiceRecordGroupDC serviceRecordGroup = null; + if (checkServiceRecord.GroupOid.HasValue) { - var serviceRecordGroup = OperationsService.GetServiceRecordGroup(checkServiceRecord.GroupOid.Value); + serviceRecordGroup = OperationsService.GetServiceRecordGroup(checkServiceRecord.GroupOid.Value); serviceRecordGroup.ServiceRecordList.DoForEach(sr => employeeOids.AddIfNotIn(sr.Employee.EmployeeOid)); } @@ -2251,22 +2253,44 @@ namespace BeWoPlanerMobil.Controllers Model.GroupBookingSelectedEmployees.DoForEach(e => employeeOids.AddIfNotIn(e.EmployeeOid)); } - var cb2ScOids = Model.SelectedConceptCostBearerRelations.Where(w => w.CostBearer2SupportConceptOid.HasValue).Select(s => s.CostBearer2SupportConceptOid.Value).ToList(); + var costBearer2SupportConceptOids = Model.SelectedConceptCostBearerRelations.Where(w => w.CostBearer2SupportConceptOid.HasValue).Select(s => s.CostBearer2SupportConceptOid.Value).ToList(); - var relations = CustomerService.GetSupportConceptCostBearerRelationsById(cb2ScOids); + var relations = CustomerService.GetSupportConceptCostBearerRelationsById(costBearer2SupportConceptOids); - foreach (var rel in relations) + var isNew = checkServiceRecord.ServiceRecordOid is null; + + if(isNew) { - var sr = CloneServiceRecord(checkServiceRecord); + foreach (var rel in relations) + { + var sr = CloneServiceRecord(checkServiceRecord); - sr.SupportConcept = rel.SupportConcept; - sr.CostBearer = rel.CostBearer; - sr.CostBearer2SupportConceptOid = rel.CostBearer2SupportConceptOid; + sr.SupportConcept = rel.SupportConcept; + sr.CostBearer = rel.CostBearer; + sr.CostBearer2SupportConceptOid = rel.CostBearer2SupportConceptOid; - var result = OperationsService.ValidateServiceRecord(sr, null, maxDaysEditSRsAllowed, employeeOids, cb2ScOids); - dateRangeString = rel.DateRangeString; + var result = OperationsService.ValidateServiceRecord(sr, null, maxDaysEditSRsAllowed, employeeOids, costBearer2SupportConceptOids); + dateRangeString = rel.DateRangeString; - validationResults.Add(new ServiceRecord2Validation(sr, result, dateRangeString)); + validationResults.Add(new ServiceRecord2Validation(sr, result, dateRangeString)); + } + } + else if(serviceRecordGroup != null) + { + foreach(var serviceRecord in serviceRecordGroup.ServiceRecordList) + { + var sr = CloneServiceRecord(checkServiceRecord); + sr.ServiceRecordOid = serviceRecord.ServiceRecordOid; + sr.SupportConcept = serviceRecord.SupportConcept; + sr.CostBearer = serviceRecord.CostBearer; + sr.CostBearer2SupportConceptOid = serviceRecord.CostBearer2SupportConceptOid; + + var result = OperationsService.ValidateServiceRecord(sr, null, maxDaysEditSRsAllowed, employeeOids, costBearer2SupportConceptOids); + var node = CreateFlatSupportConceptItem(CustomerService.LoadCompactSupportConceptDC(sr.SupportConcept.SupportConceptOid, Model.SelectedEmployee.EmployeeOid), null); + dateRangeString = node?.SupportConceptTreeNodeDC != null ? node.SupportConceptTreeNodeDC.SupportConceptCostBearerRelDC.DateRangeString : string.Empty; + + validationResults.Add(new ServiceRecord2Validation(sr, result, dateRangeString)); + } } } else if(!Model.IsInMultiBookingMode) diff --git a/BeWoPlanerMobil/Controllers/SchedulerController.cs b/BeWoPlanerMobil/Controllers/SchedulerController.cs index d4dcf3b1d..db8e29044 100644 --- a/BeWoPlanerMobil/Controllers/SchedulerController.cs +++ b/BeWoPlanerMobil/Controllers/SchedulerController.cs @@ -607,7 +607,7 @@ namespace BeWoPlanerMobil.Controllers if(!AbstractModel.HasRightToInsertRessourceAppointments) { - return "Fehler!Sie haben nicht das Recht, Termine mit Ressourcen anzulegen!"; + return "Fehler! Sie haben nicht das Recht, Termine mit Ressourcen anzulegen!"; } var oidList = ConvertOidStringToList(resourceOids); @@ -627,8 +627,6 @@ namespace BeWoPlanerMobil.Controllers dateTimes.EndDate = dateTimes.EndDate.AddDays(1); } - var recurrenceId = Model.SelectedAppointment.RecurrenceId; - var recurrenceIndex = Model.SelectedAppointment.RecurrenceIndex; var info = KalenderService.CheckResourceAvailabilityWithEmployeeInformation(dateTimes.StartDate, dateTimes.EndDate, oidList, Model.SelectedAppointment?.SchedulerAppointmentOid, null); var result = string.Empty; diff --git a/BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/password-security.js b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/password-security.js index afbb9e13c..1a92ae126 100644 --- a/BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/password-security.js +++ b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/password-security.js @@ -1,27 +1,27 @@ class PasswordSecurity { - #numbers = "0123456789"; - #lowercaseLetters = "abcdefghijklmnopqrstuvwxyz"; - #uppercaseLetters = "ABDEFGHIJKLMNOPQRSTUVWXYZ"; - #lowercaseUmlauts = "äöüß"; - #uppercaseUmlauts = "ÄÖÜ"; - #specialChars1 = "\\\"\'µ@€!"; - #specialChars2 = "&/()=?+#*"; - #specialChars3 = ",.-;:_><|"; - #specialChars4 = "§$%'{[]}´"; - #specialChars5 = "`^°~²³"; + numbers = "0123456789"; + lowercaseLetters = "abcdefghijklmnopqrstuvwxyz"; + uppercaseLetters = "ABDEFGHIJKLMNOPQRSTUVWXYZ"; + lowercaseUmlauts = "äöüß"; + uppercaseUmlauts = "ÄÖÜ"; + specialChars1 = "\\\"\'µ@€!"; + specialChars2 = "&/()=?+*"; + specialChars3 = ",.-;:_><|"; + specialChars4 = "§$%'{[]}´"; + specialChars5 = "`^°~²³"; - #isPartial = false; - #partialPassword = ""; - #passwordLengthDifference = 0; - #score = 0; - #previousValue = 0; - #schalter = false; - #previousValues = []; + isPartial = false; + partialPassword = ""; + passwordLengthDifference = 0; + score = 0; + previousValue = 0; + schalter = false; + previousValues = []; - #passwordLabelId = ""; + passwordLabelId = ""; constructor(pwLabelId) { - this.#passwordLabelId = pwLabelId; + this.passwordLabelId = pwLabelId; } validatePassword(password) { @@ -32,29 +32,29 @@ for (var i = 0; i < password.length; i++) { sx += password[i]; - if (sx.length < this.#partialPassword.length) { - this.#isPartial = true; - this.#passwordLengthDifference = this.#partialPassword.length - sx.length; + if (sx.length < this.partialPassword.length) { + this.isPartial = true; + this.passwordLengthDifference = this.partialPassword.length - sx.length; } - if (this.#partialPassword !== sx) { - this.#partialPassword = sx; + if (this.partialPassword !== sx) { + this.partialPassword = sx; } - passwordStrength = this.#calculatePasswordStrength(sx); + passwordStrength = this.calculatePasswordStrength(sx); } - this.#displayPasswordStrength(passwordStrength); + this.displayPasswordStrength(passwordStrength); return; } - this.#score = 0; - this.#previousValue = 0; + this.score = 0; + this.previousValue = 0; - this.#displayPasswordStrength(-1); + this.displayPasswordStrength(-1); } - #getIntegerFromArray(arr, index) { + getIntegerFromArray(arr, index) { if (arr === undefined || arr === null || arr.length < index) { return 0; } @@ -64,55 +64,55 @@ return $.isNumeric(intValue) ? intValue : 0; } - #getLastValue() { - if (this.#previousValues === undefined || this.#previousValues === null || this.#previousValues.length === 0) { + getLastValue() { + if (this.previousValues === undefined || this.previousValues === null || this.previousValues.length === 0) { return 0; } - return this.#previousValues[this.#previousValues.length - 1]; + return this.previousValues[this.previousValues.length - 1]; } - #calculatePasswordStrength(passwordToValidate) { + calculatePasswordStrength(passwordToValidate) { var passwordStrength = 0; - this.#previousValue = 0; + this.previousValue = 0; - if (this.#isPartial === true) { - if (this.#passwordLengthDifference === 1) { - this.#score -= this.#getLastValue(); - this.#previousValues.pop(); + if (this.isPartial === true) { + if (this.passwordLengthDifference === 1) { + this.score -= this.getLastValue(); + this.previousValues.pop(); } else { - for (var i = 0; i < this.#passwordLengthDifference; i++) { - this.#score -= this.#getLastValue(); - this.#previousValues.pop(); + for (var i = 0; i < this.passwordLengthDifference; i++) { + this.score -= this.getLastValue(); + this.previousValues.pop(); } } - this.#isPartial = false; + this.isPartial = false; } else { var passwordLength = passwordToValidate.length; if (passwordLength >= 6 && passwordLength < 9) { - this.#score += 1; - this.#previousValue = 1; - this.#schalter = true; + this.score += 1; + this.previousValue = 1; + this.schalter = true; } if (passwordLength >= 9 && passwordLength < 12) { - this.#score += 2; - this.#previousValue = 2; - this.#schalter = true; + this.score += 2; + this.previousValue = 2; + this.schalter = true; } if (passwordLength >= 12 && passwordLength < 18) { - this.#score += 3; - this.#previousValue = 3; - this.#schalter = true; + this.score += 3; + this.previousValue = 3; + this.schalter = true; } if (passwordLength >= 18) { - this.#score += 4; - this.#previousValue = 4; - this.#schalter = true; + this.score += 4; + this.previousValue = 4; + this.schalter = true; } var passwordAsArray = Array.from(passwordToValidate); @@ -120,7 +120,7 @@ // Zahlen var containsNumbers = false; for (var i = 0; i < passwordAsArray.length; i++) { - if (this.#numbers.includes(passwordAsArray[i])) { + if (this.numbers.includes(passwordAsArray[i])) { containsNumbers = true; break; } @@ -129,7 +129,7 @@ // Kleinbuchstaben var containsLowercaseLetters = false; for (var i = 0; i < passwordAsArray.length; i++) { - if (this.#lowercaseLetters.includes(passwordAsArray[i])) { + if (this.lowercaseLetters.includes(passwordAsArray[i])) { containsLowercaseLetters = true; break; } @@ -138,7 +138,7 @@ // Großbuchstaben var containsUppercaseLetters = false; for (var i = 0; i < passwordAsArray.length; i++) { - if (this.#uppercaseLetters.includes(passwordAsArray[i])) { + if (this.uppercaseLetters.includes(passwordAsArray[i])) { containsUppercaseLetters = true; break; } @@ -147,7 +147,7 @@ // Kleinumlaute var containsLowercaseUmlauts = false; for (var i = 0; i < passwordAsArray.length; i++) { - if (this.#lowercaseUmlauts.includes(passwordAsArray[i])) { + if (this.lowercaseUmlauts.includes(passwordAsArray[i])) { containsLowercaseUmlauts = true; break; } @@ -156,7 +156,7 @@ // Großumlaute var containsUppercaseUmlauts = false; for (var i = 0; i < passwordAsArray.length; i++) { - if (this.#uppercaseUmlauts.includes(passwordAsArray[i])) { + if (this.uppercaseUmlauts.includes(passwordAsArray[i])) { containsUppercaseUmlauts = true; break; } @@ -165,7 +165,7 @@ // Sonderzeichen 1 var containsSpecialCharacters1 = false; for (var i = 0; i < passwordAsArray.length; i++) { - if (this.#specialChars1.includes(passwordAsArray[i])) { + if (this.specialChars1.includes(passwordAsArray[i])) { containsSpecialCharacters1 = true; break; } @@ -173,7 +173,7 @@ var containsSpecialCharacters2 = false; for (var i = 0; i < passwordAsArray.length; i++) { - if (this.#specialChars2.includes(passwordAsArray[i])) { + if (this.specialChars2.includes(passwordAsArray[i])) { containsSpecialCharacters2 = true; break; } @@ -181,7 +181,7 @@ var containsSpecialCharacters3 = false; for (var i = 0; i < passwordAsArray.length; i++) { - if (this.#specialChars3.includes(passwordAsArray[i])) { + if (this.specialChars3.includes(passwordAsArray[i])) { containsSpecialCharacters3 = true; break; } @@ -189,7 +189,7 @@ var containsSpecialCharacters4 = false; for (var i = 0; i < passwordAsArray.length; i++) { - if (this.#specialChars4.includes(passwordAsArray[i])) { + if (this.specialChars4.includes(passwordAsArray[i])) { containsSpecialCharacters4 = true; break; } @@ -197,94 +197,94 @@ var containsSpecialCharacters5 = false; for (var i = 0; i < passwordAsArray.length; i++) { - if (this.#specialChars5.includes(passwordAsArray[i])) { + if (this.specialChars5.includes(passwordAsArray[i])) { containsSpecialCharacters5 = true; break; } } if (containsNumbers === true) { - this.#addScoreValue(3); + this.addScoreValue(3); } if (containsLowercaseLetters === true) { - this.#addScoreValue(2); + this.addScoreValue(2); } if (containsUppercaseLetters === true) { - this.#addScoreValue(3); + this.addScoreValue(3); } if (containsLowercaseUmlauts === true) { - this.#addScoreValue(2); + this.addScoreValue(2); } if (containsUppercaseUmlauts === true) { - this.#addScoreValue(2); + this.addScoreValue(2); } if (containsSpecialCharacters1 === true) { - this.#addScoreValue(4); + this.addScoreValue(4); } if (containsSpecialCharacters2 === true) { - this.#addScoreValue(4); + this.addScoreValue(4); } if (containsSpecialCharacters3 === true) { - this.#addScoreValue(4); + this.addScoreValue(4); } if (containsSpecialCharacters4 === true) { - this.#addScoreValue(4); + this.addScoreValue(4); } if (containsSpecialCharacters5 === true) { - this.#addScoreValue(4); + this.addScoreValue(4); } - this.#previousValues.push(this.#previousValue); + this.previousValues.push(this.previousValue); } - if (this.#score <= 15) { + if (this.score <= 15) { passwordStrength = 0; } - if (this.#score > 15 && this.#score <= 55) { + if (this.score > 15 && this.score <= 55) { passwordStrength = 1; } - if (this.#score > 55 && this.#score <= 115) { + if (this.score > 55 && this.score <= 115) { passwordStrength = 2; } - if (this.#score > 115 && this.#score <= 155) { + if (this.score > 115 && this.score <= 155) { passwordStrength = 3; } - if (this.#score > 155) { + if (this.score > 155) { passwordStrength = 4; } return passwordStrength; } - #addScoreValue(defaultValue) { + addScoreValue(defaultValue) { if (defaultValue === undefined || defaultValue === null || false === $.isNumeric(defaultValue)) { return; } - this.#score += defaultValue; + this.score += defaultValue; - if (this.#schalter === true) { - this.#previousValue += defaultValue; + if (this.schalter === true) { + this.previousValue += defaultValue; } else { - this.#previousValue = defaultValue; + this.previousValue = defaultValue; } } - #displayPasswordStrength(passwordStrength) { - var passwordLabel = $("#" + this.#passwordLabelId); + displayPasswordStrength(passwordStrength) { + var passwordLabel = $("#" + this.passwordLabelId); if (passwordStrength === undefined || !$.isNumeric(passwordStrength) || !passwordLabel.length) { return; diff --git a/BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/service-record-time-calc.js b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/service-record-time-calc.js index 990d222b8..e8b37850e 100644 --- a/BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/service-record-time-calc.js +++ b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/service-record-time-calc.js @@ -98,12 +98,6 @@ function calculateDuration(isInvocatedByHoursMinutesButton, startTimeId, endTime isInMin = hoursMinutesDropdownButton.text().replaceAll(/\s/g, "") === "Minuten"; } - logInfo2("calculateDuration aufgerufen:\r\n" + - "isInvocatedByHoursMinutesButton: " + isInvocatedByHoursMinutesButton + "\r\n" + - "isInvokedByStartElement: " + isInvokedByStartElement + "\r\n" + - "isInvokedByEndElement: " + isInvokedByEndElement + "\r\n" + - "Format der Dauer: " + (isInMin ? "Minuten" : "Stunden")); - var durationFormat = isInMin ? "m" : "h"; if((startTime.length > 0 && startTime.length < 5) || (endTime.length > 0 && endTime.length < 5)) { diff --git a/BeWoPlanerMobil/Scripts/tempusdominus-boostrap-4.min.js b/BeWoPlanerMobil/Scripts/tempusdominus-boostrap-4.min.js index ff5d184cb..fdeb967e0 100644 --- a/BeWoPlanerMobil/Scripts/tempusdominus-boostrap-4.min.js +++ b/BeWoPlanerMobil/Scripts/tempusdominus-boostrap-4.min.js @@ -3,13 +3,1478 @@ * Copyright 2016-2017 Jonathan Peterson * Licensed under MIT (https://github.com/tempusdominus/bootstrap-3/blob/master/LICENSE) */ -if ("undefined" == typeof jQuery) throw new Error("Tempus Dominus Bootstrap4's requires jQuery. jQuery must be included before Tempus Dominus Bootstrap4's JavaScript."); if (+function (a) { var b = a.fn.jquery.split(" ")[0].split("."); if (b[0] < 2 && b[1] < 9 || 1 === b[0] && 9 === b[1] && b[2] < 1 || b[0] >= 4) throw new Error("Tempus Dominus Bootstrap4's requires at least jQuery v1.9.1 but less than v4.0.0") }(jQuery), "undefined" == typeof moment) throw new Error("Tempus Dominus Bootstrap4's requires moment.js. Moment.js must be included before Tempus Dominus Bootstrap4's JavaScript."); var version = moment.version.split("."); if (version[0] <= 2 && version[1] < 17 || version[0] >= 3) throw new Error("Tempus Dominus Bootstrap4's requires at least moment.js v2.17.0 but less than v3.0.0"); +function () { - function a(a, b) { if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !b || "object" != typeof b && "function" != typeof b ? a : b } function b(a, b) { if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); a.prototype = Object.create(b && b.prototype, { constructor: { value: a, enumerable: !1, writable: !0, configurable: !0 } }), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b) } function c(a, b) { if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") } var d = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (a) { return typeof a } : function (a) { return a && "function" == typeof Symbol && a.constructor === Symbol && a !== Symbol.prototype ? "symbol" : typeof a }, e = function () { function a(a, b) { for (var c = 0; c < b.length; c++) { var d = b[c]; d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(a, d.key, d) } } return function (b, c, d) { return c && a(b.prototype, c), d && a(b, d), b } }(), f = function (a, b) { var d = "datetimepicker", f = "5.0.0-alpha12", g = "" + d, h = "." + g, i = g + ".", j = ".data-api", k = { DATA_TOGGLE: '[data-toggle="' + g + '"]' }, l = { INPUT: d + "-input" }, m = { CHANGE: "change" + h, BLUR: "blur" + h, KEYUP: "keyup" + h, KEYDOWN: "keydown" + h, FOCUS: "focus" + h, CLICK_DATA_API: "click" + h + j, UPDATE: i + "update", ERROR: i + "error", HIDE: i + "hide", SHOW: i + "show" }, n = [{ CLASS_NAME: "days", NAV_FUNCTION: "M", NAV_STEP: 1 }, { CLASS_NAME: "months", NAV_FUNCTION: "y", NAV_STEP: 1 }, { CLASS_NAME: "years", NAV_FUNCTION: "y", NAV_STEP: 10 }, { CLASS_NAME: "decades", NAV_FUNCTION: "y", NAV_STEP: 100 }], o = { up: 38, 38: "up", down: 40, 40: "down", left: 37, 37: "left", right: 39, 39: "right", tab: 9, 9: "tab", escape: 27, 27: "escape", enter: 13, 13: "enter", pageUp: 33, 33: "pageUp", pageDown: 34, 34: "pageDown", shift: 16, 16: "shift", control: 17, 17: "control", space: 32, 32: "space", t: 84, 84: "t", delete: 46, 46: "delete" }, p = ["times", "days", "months", "years", "decades"], q = {}, r = {}, s = 0, t = { timeZone: "", format: !1, dayViewHeaderFormat: "MMMM YYYY", extraFormats: !1, stepping: 1, minDate: !1, maxDate: !1, useCurrent: !0, collapse: !0, locale: b.locale(), defaultDate: !1, disabledDates: !1, enabledDates: !1, icons: { time: "fa fa-clock-o", date: "fa fa-calendar", up: "fa fa-arrow-up", down: "fa fa-arrow-down", previous: "fa fa-chevron-left", next: "fa fa-chevron-right", today: "fa fa-calendar-check-o", clear: "fa fa-delete", close: "fa fa-times" }, tooltips: { today: "Go to today", clear: "Clear selection", close: "Close the picker", selectMonth: "Select Month", prevMonth: "Previous Month", nextMonth: "Next Month", selectYear: "Select Year", prevYear: "Previous Year", nextYear: "Next Year", selectDecade: "Select Decade", prevDecade: "Previous Decade", nextDecade: "Next Decade", prevCentury: "Previous Century", nextCentury: "Next Century", pickHour: "Pick Hour", incrementHour: "Increment Hour", decrementHour: "Decrement Hour", pickMinute: "Pick Minute", incrementMinute: "Increment Minute", decrementMinute: "Decrement Minute", pickSecond: "Pick Second", incrementSecond: "Increment Second", decrementSecond: "Decrement Second", togglePeriod: "Toggle Period", selectTime: "Select Time", selectDate: "Select Date" }, useStrict: !1, sideBySide: !1, daysOfWeekDisabled: !1, calendarWeeks: !1, viewMode: "days", toolbarPlacement: "default", buttons: { showToday: !1, showClear: !1, showClose: !1 }, widgetPositioning: { horizontal: "auto", vertical: "auto" }, widgetParent: null, ignoreReadonly: !1, keepOpen: !1, focusOnShow: !0, inline: !1, keepInvalid: !1, keyBinds: { up: function () { if (!this.widget) return !1; var a = this._dates[0] || this.getMoment(); return this.widget.find(".datepicker").is(":visible") ? this.date(a.clone().subtract(7, "d")) : this.date(a.clone().add(this.stepping(), "m")), !0 }, down: function () { if (!this.widget) return this.show(), !1; var a = this._dates[0] || this.getMoment(); return this.widget.find(".datepicker").is(":visible") ? this.date(a.clone().add(7, "d")) : this.date(a.clone().subtract(this.stepping(), "m")), !0 }, "control up": function () { if (!this.widget) return !1; var a = this._dates[0] || this.getMoment(); return this.widget.find(".datepicker").is(":visible") ? this.date(a.clone().subtract(1, "y")) : this.date(a.clone().add(1, "h")), !0 }, "control down": function () { if (!this.widget) return !1; var a = this._dates[0] || this.getMoment(); return this.widget.find(".datepicker").is(":visible") ? this.date(a.clone().add(1, "y")) : this.date(a.clone().subtract(1, "h")), !0 }, left: function () { if (!this.widget) return !1; var a = this._dates[0] || this.getMoment(); return this.widget.find(".datepicker").is(":visible") && this.date(a.clone().subtract(1, "d")), !0 }, right: function () { if (!this.widget) return !1; var a = this._dates[0] || this.getMoment(); return this.widget.find(".datepicker").is(":visible") && this.date(a.clone().add(1, "d")), !0 }, pageUp: function () { if (!this.widget) return !1; var a = this._dates[0] || this.getMoment(); return this.widget.find(".datepicker").is(":visible") && this.date(a.clone().subtract(1, "M")), !0 }, pageDown: function () { if (!this.widget) return !1; var a = this._dates[0] || this.getMoment(); return this.widget.find(".datepicker").is(":visible") && this.date(a.clone().add(1, "M")), !0 }, enter: function () { return this.hide(), !0 }, escape: function () { return !!this.widget && (this.hide(), !0) }, "control space": function () { return !!this.widget && (this.widget.find(".timepicker").is(":visible") && this.widget.find('.btn[data-action="togglePeriod"]').click(), !0) }, t: function () { return this.date(this.getMoment()), !0 }, delete: function () { return !!this.widget && (this.clear(), !0) } }, debug: !1, allowInputToggle: !1, disabledTimeIntervals: !1, disabledHours: !1, enabledHours: !1, viewDate: !1, allowMultidate: !1, multidateSeparator: "," }, u = function () { function i(a, b) { c(this, i), this._options = this._getOptions(b), this._element = a, this._dates = [], this._datesFormatted = [], this._viewDate = null, this.unset = !0, this.component = !1, this.widget = !1, this.use24Hours = null, this.actualFormat = null, this.parseFormats = null, this.currentViewMode = null, this._int() } return i.prototype._int = function () { var b = this._element.data("target-input"); this._element.is("input") ? this.input = this._element : void 0 !== b && ("nearest" === b ? this.input = this._element.find("input") : this.input = a(b)), this._dates = [], this._dates[0] = this.getMoment(), this._viewDate = this.getMoment().clone(), a.extend(!0, this._options, this._dataToOptions()), this.options(this._options), this._initFormatting(), void 0 !== this.input && this.input.is("input") && 0 !== this.input.val().trim().length ? this._setValue(this._parseInputDate(this.input.val().trim()), 0) : this._options.defaultDate && void 0 !== this.input && void 0 === this.input.attr("placeholder") && this._setValue(this._options.defaultDate, 0), this._options.inline && this.show() }, i.prototype._update = function () { this.widget && (this._fillDate(), this._fillTime()) }, i.prototype._setValue = function (a, b) { var c = this.unset ? null : this._dates[b], d = ""; if (!a) return this._options.allowMultidate && 1 !== this._dates.length ? (d = this._element.data("date") + ",", d = d.replace(c.format(this.actualFormat) + ",", "").replace(",,", "").replace(/,\s*$/, ""), this._dates.splice(b, 1), this._datesFormatted.splice(b, 1)) : (this.unset = !0, this._dates = [], this._datesFormatted = []), void 0 !== this.input && (this.input.val(d), this.input.trigger("input")), this._element.data("date", d), this._notifyEvent({ type: i.Event.CHANGE, date: !1, oldDate: c }), void this._update(); if (a = a.clone().locale(this._options.locale), this._hasTimeZone() && a.tz(this._options.timeZone), 1 !== this._options.stepping && a.minutes(Math.round(a.minutes() / this._options.stepping) * this._options.stepping).seconds(0), this._isValid(a)) { if (this._dates[b] = a, this._datesFormatted[b] = a.format("YYYY-MM-DD"), this._viewDate = a.clone(), this._options.allowMultidate && this._dates.length > 1) { for (var e = 0; e < this._dates.length; e++)d += "" + this._dates[e].format(this.actualFormat) + this._options.multidateSeparator; d = d.replace(/,\s*$/, "") } else d = this._dates[b].format(this.actualFormat); void 0 !== this.input && (this.input.val(d), this.input.trigger("input")), this._element.data("date", d), this.unset = !1, this._update(), this._notifyEvent({ type: i.Event.CHANGE, date: this._dates[b].clone(), oldDate: c }) } else this._options.keepInvalid ? this._notifyEvent({ type: i.Event.CHANGE, date: a, oldDate: c }) : void 0 !== this.input && (this.input.val("" + (this.unset ? "" : this._dates[b].format(this.actualFormat))), this.input.trigger("input")), this._notifyEvent({ type: i.Event.ERROR, date: a, oldDate: c }) }, i.prototype._change = function (b) { var c = a(b.target).val().trim(), d = c ? this._parseInputDate(c) : null; return this._setValue(d), b.stopImmediatePropagation(), !1 }, i.prototype._getOptions = function (b) { return b = a.extend(!0, {}, t, b) }, i.prototype._hasTimeZone = function () { return void 0 !== b.tz && void 0 !== this._options.timeZone && null !== this._options.timeZone && "" !== this._options.timeZone }, i.prototype._isEnabled = function (a) { if ("string" != typeof a || a.length > 1) throw new TypeError("isEnabled expects a single character string parameter"); switch (a) { case "y": return this.actualFormat.indexOf("Y") !== -1; case "M": return this.actualFormat.indexOf("M") !== -1; case "d": return this.actualFormat.toLowerCase().indexOf("d") !== -1; case "h": case "H": return this.actualFormat.toLowerCase().indexOf("h") !== -1; case "m": return this.actualFormat.indexOf("m") !== -1; case "s": return this.actualFormat.indexOf("s") !== -1; default: return !1 } }, i.prototype._hasTime = function () { return this._isEnabled("h") || this._isEnabled("m") || this._isEnabled("s") }, i.prototype._hasDate = function () { return this._isEnabled("y") || this._isEnabled("M") || this._isEnabled("d") }, i.prototype._dataToOptions = function () { var b = this._element.data(), c = {}; return b.dateOptions && b.dateOptions instanceof Object && (c = a.extend(!0, c, b.dateOptions)), a.each(this._options, function (a) { var d = "date" + a.charAt(0).toUpperCase() + a.slice(1); void 0 !== b[d] ? c[a] = b[d] : delete c[a] }), c }, i.prototype._notifyEvent = function (a) { a.type === i.Event.CHANGE && a.date && a.date.isSame(a.oldDate) || !a.date && !a.oldDate || this._element.trigger(a) }, i.prototype._viewUpdate = function (a) { "y" === a && (a = "YYYY"), this._notifyEvent({ type: i.Event.UPDATE, change: a, viewDate: this._viewDate.clone() }) }, i.prototype._showMode = function (a) { this.widget && (a && (this.currentViewMode = Math.max(s, Math.min(3, this.currentViewMode + a))), this.widget.find(".datepicker > div").hide().filter(".datepicker-" + n[this.currentViewMode].CLASS_NAME).show()) }, i.prototype._isInDisabledDates = function (a) { return this._options.disabledDates[a.format("YYYY-MM-DD")] === !0 }, i.prototype._isInEnabledDates = function (a) { return this._options.enabledDates[a.format("YYYY-MM-DD")] === !0 }, i.prototype._isInDisabledHours = function (a) { return this._options.disabledHours[a.format("H")] === !0 }, i.prototype._isInEnabledHours = function (a) { return this._options.enabledHours[a.format("H")] === !0 }, i.prototype._isValid = function (b, c) { if (!b.isValid()) return !1; if (this._options.disabledDates && "d" === c && this._isInDisabledDates(b)) return !1; if (this._options.enabledDates && "d" === c && !this._isInEnabledDates(b)) return !1; if (this._options.minDate && b.isBefore(this._options.minDate, c)) return !1; if (this._options.maxDate && b.isAfter(this._options.maxDate, c)) return !1; if (this._options.daysOfWeekDisabled && "d" === c && this._options.daysOfWeekDisabled.indexOf(b.day()) !== -1) return !1; if (this._options.disabledHours && ("h" === c || "m" === c || "s" === c) && this._isInDisabledHours(b)) return !1; if (this._options.enabledHours && ("h" === c || "m" === c || "s" === c) && !this._isInEnabledHours(b)) return !1; if (this._options.disabledTimeIntervals && ("h" === c || "m" === c || "s" === c)) { var d = !1; if (a.each(this._options.disabledTimeIntervals, function () { if (b.isBetween(this[0], this[1])) return d = !0, !1 }), d) return !1 } return !0 }, i.prototype._parseInputDate = function (a) { return void 0 === this._options.parseInputDate ? b.isMoment(a) || (a = this.getMoment(a)) : a = this._options.parseInputDate(a), a }, i.prototype._keydown = function (a) { var b = null, c = void 0, d = void 0, e = void 0, f = void 0, g = [], h = {}, i = a.which, j = "p"; q[i] = j; for (c in q) q.hasOwnProperty(c) && q[c] === j && (g.push(c), parseInt(c, 10) !== i && (h[c] = !0)); for (c in this._options.keyBinds) if (this._options.keyBinds.hasOwnProperty(c) && "function" == typeof this._options.keyBinds[c] && (e = c.split(" "), e.length === g.length && o[i] === e[e.length - 1])) { for (f = !0, d = e.length - 2; d >= 0; d--)if (!(o[e[d]] in h)) { f = !1; break } if (f) { b = this._options.keyBinds[c]; break } } b && b.call(this.widget) && (a.stopPropagation(), a.preventDefault()) }, i.prototype._keyup = function (a) { q[a.which] = "r", r[a.which] && (r[a.which] = !1, a.stopPropagation(), a.preventDefault()) }, i.prototype._indexGivenDates = function (b) { var c = {}, d = this; return a.each(b, function () { var a = d._parseInputDate(this); a.isValid() && (c[a.format("YYYY-MM-DD")] = !0) }), !!Object.keys(c).length && c }, i.prototype._indexGivenHours = function (b) { var c = {}; return a.each(b, function () { c[this] = !0 }), !!Object.keys(c).length && c }, i.prototype._initFormatting = function () { var a = this._options.format || "L LT", b = this; this.actualFormat = a.replace(/(\[[^\[]*])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, function (a) { return b._dates[0].localeData().longDateFormat(a) || a }), this.parseFormats = this._options.extraFormats ? this._options.extraFormats.slice() : [], this.parseFormats.indexOf(a) < 0 && this.parseFormats.indexOf(this.actualFormat) < 0 && this.parseFormats.push(this.actualFormat), this.use24Hours = this.actualFormat.toLowerCase().indexOf("a") < 1 && this.actualFormat.replace(/\[.*?]/g, "").indexOf("h") < 1, this._isEnabled("y") && (s = 2), this._isEnabled("M") && (s = 1), this._isEnabled("d") && (s = 0), this.currentViewMode = Math.max(s, this.currentViewMode), this.unset || this._setValue(this._dates[0], 0) }, i.prototype._getLastPickedDate = function () { return this._dates[this._getLastPickedDateIndex()] }, i.prototype._getLastPickedDateIndex = function () { return this._dates.length - 1 }, i.prototype.getMoment = function (a) { var c = void 0; return c = void 0 === a || null === a ? b() : this._hasTimeZone() ? b.tz(a, this.parseFormats, this._options.useStrict, this._options.timeZone) : b(a, this.parseFormats, this._options.useStrict), this._hasTimeZone() && c.tz(this._options.timeZone), c }, i.prototype.toggle = function () { return this.widget ? this.hide() : this.show() }, i.prototype.ignoreReadonly = function (a) { if (0 === arguments.length) return this._options.ignoreReadonly; if ("boolean" != typeof a) throw new TypeError("ignoreReadonly () expects a boolean parameter"); this._options.ignoreReadonly = a }, i.prototype.options = function (b) { if (0 === arguments.length) return a.extend(!0, {}, this._options); if (!(b instanceof Object)) throw new TypeError("options() this.options parameter should be an object"); a.extend(!0, this._options, b); var c = this; a.each(this._options, function (a, b) { void 0 !== c[a] && c[a](b) }) }, i.prototype.date = function (a, c) { if (c = c || 0, 0 === arguments.length) return this.unset ? null : this._options.allowMultidate ? this._dates.join(this._options.multidateSeparator) : this._dates[c].clone(); if (!(null === a || "string" == typeof a || b.isMoment(a) || a instanceof Date)) throw new TypeError("date() parameter must be one of [null, string, moment or Date]"); this._setValue(null === a ? null : this._parseInputDate(a), c) }, i.prototype.format = function (a) { if (0 === arguments.length) return this._options.format; if ("string" != typeof a && ("boolean" != typeof a || a !== !1)) throw new TypeError("format() expects a string or boolean:false parameter " + a); this._options.format = a, this.actualFormat && this._initFormatting() }, i.prototype.timeZone = function (a) { if (0 === arguments.length) return this._options.timeZone; if ("string" != typeof a) throw new TypeError("newZone() expects a string parameter"); this._options.timeZone = a }, i.prototype.dayViewHeaderFormat = function (a) { if (0 === arguments.length) return this._options.dayViewHeaderFormat; if ("string" != typeof a) throw new TypeError("dayViewHeaderFormat() expects a string parameter"); this._options.dayViewHeaderFormat = a }, i.prototype.extraFormats = function (a) { if (0 === arguments.length) return this._options.extraFormats; if (a !== !1 && !(a instanceof Array)) throw new TypeError("extraFormats() expects an array or false parameter"); this._options.extraFormats = a, this.parseFormats && this._initFormatting() }, i.prototype.disabledDates = function (b) { if (0 === arguments.length) return this._options.disabledDates ? a.extend({}, this._options.disabledDates) : this._options.disabledDates; if (!b) return this._options.disabledDates = !1, this._update(), !0; if (!(b instanceof Array)) throw new TypeError("disabledDates() expects an array parameter"); this._options.disabledDates = this._indexGivenDates(b), this._options.enabledDates = !1, this._update() }, i.prototype.enabledDates = function (b) { if (0 === arguments.length) return this._options.enabledDates ? a.extend({}, this._options.enabledDates) : this._options.enabledDates; if (!b) return this._options.enabledDates = !1, this._update(), !0; if (!(b instanceof Array)) throw new TypeError("enabledDates() expects an array parameter"); this._options.enabledDates = this._indexGivenDates(b), this._options.disabledDates = !1, this._update() }, i.prototype.daysOfWeekDisabled = function (a) { if (0 === arguments.length) return this._options.daysOfWeekDisabled.splice(0); if ("boolean" == typeof a && !a) return this._options.daysOfWeekDisabled = !1, this._update(), !0; if (!(a instanceof Array)) throw new TypeError("daysOfWeekDisabled() expects an array parameter"); if (this._options.daysOfWeekDisabled = a.reduce(function (a, b) { return b = parseInt(b, 10), b > 6 || b < 0 || isNaN(b) ? a : (a.indexOf(b) === -1 && a.push(b), a) }, []).sort(), this._options.useCurrent && !this._options.keepInvalid) for (var b = 0; b < this._dates.length; b++) { for (var c = 0; !this._isValid(this._dates[b], "d");) { if (this._dates[b].add(1, "d"), 31 === c) throw "Tried 31 times to find a valid date"; c++ } this._setValue(this._dates[b], b) } this._update() }, i.prototype.maxDate = function (a) { if (0 === arguments.length) return this._options.maxDate ? this._options.maxDate.clone() : this._options.maxDate; if ("boolean" == typeof a && a === !1) return this._options.maxDate = !1, this._update(), !0; "string" == typeof a && ("now" !== a && "moment" !== a || (a = this.getMoment())); var b = this._parseInputDate(a); if (!b.isValid()) throw new TypeError("maxDate() Could not parse date parameter: " + a); if (this._options.minDate && b.isBefore(this._options.minDate)) throw new TypeError("maxDate() date parameter is before this.options.minDate: " + b.format(this.actualFormat)); this._options.maxDate = b; for (var c = 0; c < this._dates.length; c++)this._options.useCurrent && !this._options.keepInvalid && this._dates[c].isAfter(a) && this._setValue(this._options.maxDate, c); this._viewDate.isAfter(b) && (this._viewDate = b.clone().subtract(this._options.stepping, "m")), this._update() }, i.prototype.minDate = function (a) { if (0 === arguments.length) return this._options.minDate ? this._options.minDate.clone() : this._options.minDate; if ("boolean" == typeof a && a === !1) return this._options.minDate = !1, this._update(), !0; "string" == typeof a && ("now" !== a && "moment" !== a || (a = this.getMoment())); var b = this._parseInputDate(a); if (!b.isValid()) throw new TypeError("minDate() Could not parse date parameter: " + a); if (this._options.maxDate && b.isAfter(this._options.maxDate)) throw new TypeError("minDate() date parameter is after this.options.maxDate: " + b.format(this.actualFormat)); this._options.minDate = b; for (var c = 0; c < this._dates.length; c++)this._options.useCurrent && !this._options.keepInvalid && this._dates[c].isBefore(a) && this._setValue(this._options.minDate, c); this._viewDate.isBefore(b) && (this._viewDate = b.clone().add(this._options.stepping, "m")), this._update() }, i.prototype.defaultDate = function (a) { if (0 === arguments.length) return this._options.defaultDate ? this._options.defaultDate.clone() : this._options.defaultDate; if (!a) return this._options.defaultDate = !1, !0; "string" == typeof a && (a = "now" === a || "moment" === a ? this.getMoment() : this.getMoment(a)); var b = this._parseInputDate(a); if (!b.isValid()) throw new TypeError("defaultDate() Could not parse date parameter: " + a); if (!this._isValid(b)) throw new TypeError("defaultDate() date passed is invalid according to component setup validations"); this._options.defaultDate = b, (this._options.defaultDate && this._options.inline || void 0 !== this.input && "" === this.input.val().trim()) && this._setValue(this._options.defaultDate, 0) }, i.prototype.locale = function (a) { if (0 === arguments.length) return this._options.locale; if (!b.localeData(a)) throw new TypeError("locale() locale " + a + " is not loaded from moment locales!"); for (var c = 0; c < this._dates.length; c++)this._dates[c].locale(this._options.locale); this._viewDate.locale(this._options.locale), this.actualFormat && this._initFormatting(), this.widget && (this.hide(), this.show()) }, i.prototype.stepping = function (a) { return 0 === arguments.length ? this._options.stepping : (a = parseInt(a, 10), (isNaN(a) || a < 1) && (a = 1), void (this._options.stepping = a)) }, i.prototype.useCurrent = function (a) { var b = ["year", "month", "day", "hour", "minute"]; if (0 === arguments.length) return this._options.useCurrent; if ("boolean" != typeof a && "string" != typeof a) throw new TypeError("useCurrent() expects a boolean or string parameter"); if ("string" == typeof a && b.indexOf(a.toLowerCase()) === -1) throw new TypeError("useCurrent() expects a string parameter of " + b.join(", ")); this._options.useCurrent = a }, i.prototype.collapse = function (a) { if (0 === arguments.length) return this._options.collapse; if ("boolean" != typeof a) throw new TypeError("collapse() expects a boolean parameter"); return this._options.collapse === a || (this._options.collapse = a, void (this.widget && (this.hide(), this.show()))) }, i.prototype.icons = function (b) { if (0 === arguments.length) return a.extend({}, this._options.icons); if (!(b instanceof Object)) throw new TypeError("icons() expects parameter to be an Object"); a.extend(this._options.icons, b), this.widget && (this.hide(), this.show()) }, i.prototype.tooltips = function (b) { if (0 === arguments.length) return a.extend({}, this._options.tooltips); if (!(b instanceof Object)) throw new TypeError("tooltips() expects parameter to be an Object"); a.extend(this._options.tooltips, b), this.widget && (this.hide(), this.show()) }, i.prototype.useStrict = function (a) { if (0 === arguments.length) return this._options.useStrict; if ("boolean" != typeof a) throw new TypeError("useStrict() expects a boolean parameter"); this._options.useStrict = a }, i.prototype.sideBySide = function (a) { if (0 === arguments.length) return this._options.sideBySide; if ("boolean" != typeof a) throw new TypeError("sideBySide() expects a boolean parameter"); this._options.sideBySide = a, this.widget && (this.hide(), this.show()) }, i.prototype.viewMode = function (a) { if (0 === arguments.length) return this._options.viewMode; if ("string" != typeof a) throw new TypeError("viewMode() expects a string parameter"); if (i.ViewModes.indexOf(a) === -1) throw new TypeError("viewMode() parameter must be one of (" + i.ViewModes.join(", ") + ") value"); this._options.viewMode = a, this.currentViewMode = Math.max(i.ViewModes.indexOf(a) - 1, i.MinViewModeNumber), this._showMode() }, i.prototype.calendarWeeks = function (a) { if (0 === arguments.length) return this._options.calendarWeeks; if ("boolean" != typeof a) throw new TypeError("calendarWeeks() expects parameter to be a boolean value"); this._options.calendarWeeks = a, this._update() }, i.prototype.buttons = function (b) { if (0 === arguments.length) return a.extend({}, this._options.buttons); if (!(b instanceof Object)) throw new TypeError("buttons() expects parameter to be an Object"); if (a.extend(this._options.buttons, b), "boolean" != typeof this._options.buttons.showToday) throw new TypeError("buttons.showToday expects a boolean parameter"); if ("boolean" != typeof this._options.buttons.showClear) throw new TypeError("buttons.showClear expects a boolean parameter"); if ("boolean" != typeof this._options.buttons.showClose) throw new TypeError("buttons.showClose expects a boolean parameter"); this.widget && (this.hide(), this.show()) }, i.prototype.keepOpen = function (a) { if (0 === arguments.length) return this._options.keepOpen; if ("boolean" != typeof a) throw new TypeError("keepOpen() expects a boolean parameter"); this._options.keepOpen = a }, i.prototype.focusOnShow = function (a) { if (0 === arguments.length) return this._options.focusOnShow; if ("boolean" != typeof a) throw new TypeError("focusOnShow() expects a boolean parameter"); this._options.focusOnShow = a }, i.prototype.inline = function (a) { if (0 === arguments.length) return this._options.inline; if ("boolean" != typeof a) throw new TypeError("inline() expects a boolean parameter"); this._options.inline = a }, i.prototype.clear = function () { this._setValue(null) }, i.prototype.keyBinds = function (a) { return 0 === arguments.length ? this._options.keyBinds : void (this._options.keyBinds = a) }, i.prototype.debug = function (a) { if ("boolean" != typeof a) throw new TypeError("debug() expects a boolean parameter"); this._options.debug = a }, i.prototype.allowInputToggle = function (a) { if (0 === arguments.length) return this._options.allowInputToggle; if ("boolean" != typeof a) throw new TypeError("allowInputToggle() expects a boolean parameter"); this._options.allowInputToggle = a }, i.prototype.keepInvalid = function (a) { if (0 === arguments.length) return this._options.keepInvalid; if ("boolean" != typeof a) throw new TypeError("keepInvalid() expects a boolean parameter"); this._options.keepInvalid = a }, i.prototype.datepickerInput = function (a) { if (0 === arguments.length) return this._options.datepickerInput; if ("string" != typeof a) throw new TypeError("datepickerInput() expects a string parameter"); this._options.datepickerInput = a }, i.prototype.parseInputDate = function (a) { if (0 === arguments.length) return this._options.parseInputDate; if ("function" != typeof a) throw new TypeError("parseInputDate() should be as function"); this._options.parseInputDate = a }, i.prototype.disabledTimeIntervals = function (b) { if (0 === arguments.length) return this._options.disabledTimeIntervals ? a.extend({}, this._options.disabledTimeIntervals) : this._options.disabledTimeIntervals; if (!b) return this._options.disabledTimeIntervals = !1, this._update(), !0; if (!(b instanceof Array)) throw new TypeError("disabledTimeIntervals() expects an array parameter"); this._options.disabledTimeIntervals = b, this._update() }, i.prototype.disabledHours = function (b) { if (0 === arguments.length) return this._options.disabledHours ? a.extend({}, this._options.disabledHours) : this._options.disabledHours; if (!b) return this._options.disabledHours = !1, this._update(), !0; if (!(b instanceof Array)) throw new TypeError("disabledHours() expects an array parameter"); if (this._options.disabledHours = this._indexGivenHours(b), this._options.enabledHours = !1, this._options.useCurrent && !this._options.keepInvalid) for (var c = 0; c < this._dates.length; c++) { for (var d = 0; !this._isValid(this._dates[c], "h");) { if (this._dates[c].add(1, "h"), 24 === d) throw "Tried 24 times to find a valid date"; d++ } this._setValue(this._dates[c], c) } this._update() }, i.prototype.enabledHours = function (b) { if (0 === arguments.length) return this._options.enabledHours ? a.extend({}, this._options.enabledHours) : this._options.enabledHours; if (!b) return this._options.enabledHours = !1, this._update(), !0; if (!(b instanceof Array)) throw new TypeError("enabledHours() expects an array parameter"); if (this._options.enabledHours = this._indexGivenHours(b), this._options.disabledHours = !1, this._options.useCurrent && !this._options.keepInvalid) for (var c = 0; c < this._dates.length; c++) { for (var d = 0; !this._isValid(this._dates[c], "h");) { if (this._dates[c].add(1, "h"), 24 === d) throw "Tried 24 times to find a valid date"; d++ } this._setValue(this._dates[c], c) } this._update() }, i.prototype.viewDate = function (a) { if (0 === arguments.length) return this._viewDate.clone(); if (!a) return this._viewDate = (this._dates[0] || this.getMoment()).clone(), !0; if (!("string" == typeof a || b.isMoment(a) || a instanceof Date)) throw new TypeError("viewDate() parameter must be one of [string, moment or Date]"); this._viewDate = this._parseInputDate(a), this._viewUpdate() }, i.prototype.allowMultidate = function (a) { if ("boolean" != typeof a) throw new TypeError("allowMultidate() expects a boolean parameter"); this._options.allowMultidate = a }, i.prototype.multidateSeparator = function (a) { if (0 === arguments.length) return this._options.multidateSeparator; if ("string" != typeof a || a.length > 1) throw new TypeError("multidateSeparator expects a single character string parameter"); this._options.multidateSeparator = a }, e(i, null, [{ key: "NAME", get: function () { return d } }, { key: "VERSION", get: function () { return f } }, { key: "DATA_KEY", get: function () { return g } }, { key: "EVENT_KEY", get: function () { return h } }, { key: "DATA_API_KEY", get: function () { return j } }, { key: "DatePickerModes", get: function () { return n } }, { key: "ViewModes", get: function () { return p } }, { key: "MinViewModeNumber", get: function () { return s } }, { key: "Event", get: function () { return m } }, { key: "Selector", get: function () { return k } }, { key: "Default", get: function () { return t }, set: function (a) { t = a } }, { key: "ClassName", get: function () { return l } }]), i }(); return u }(jQuery, moment); (function (e) { - var g = e.fn[f.NAME], h = ["top", "bottom", "auto"], i = ["left", "right", "auto"], j = ["default", "top", "bottom"], k = function (a) { var b = a.data("target"), c = void 0; return b || (b = a.attr("href") || "", b = /^#[a-z]/i.test(b) ? b : null), c = e(b), 0 === c.length ? c : (c.data(f.DATA_KEY) || e.extend({}, c.data(), e(this).data()), c) }, l = function (g) { - function k(b, d) { c(this, k); var e = a(this, g.call(this, b, d)); return e._init(), e } return b(k, g), k.prototype._init = function () { if (this._element.hasClass("input-group")) { var a = this._element.find(".datepickerbutton"); 0 === a.length ? this.component = this._element.find(".input-group-append") : this.component = a } }, k.prototype._getDatePickerTemplate = function () { var a = e("").append(e("").append(e("").addClass("prev").attr("data-action", "previous").append(e("").addClass(this._options.icons.previous))).append(e("").addClass("picker-switch").attr("data-action", "pickerSwitch").attr("colspan", "" + (this._options.calendarWeeks ? "6" : "5"))).append(e("").addClass("next").attr("data-action", "next").append(e("").addClass(this._options.icons.next)))), b = e("").append(e("").append(e("").attr("colspan", "" + (this._options.calendarWeeks ? "8" : "7")))); return [e("
").addClass("datepicker-days").append(e("").addClass("table table-sm").append(a).append(e(""))), e("
").addClass("datepicker-months").append(e("
").addClass("table-condensed").append(a.clone()).append(b.clone())), e("
").addClass("datepicker-years").append(e("
").addClass("table-condensed").append(a.clone()).append(b.clone())), e("
").addClass("datepicker-decades").append(e("
").addClass("table-condensed").append(a.clone()).append(b.clone()))] }, k.prototype._getTimePickerMainTemplate = function () { - var a = e(""), b = e(""), c = e(""); return this._isEnabled("h") && (a.append(e("
").append(e("").attr({ href: "#", tabindex: "-1", title: this._options.tooltips.incrementHour }).addClass("btn").attr("data-action", "incrementHours").append(e("").addClass(this._options.icons.up)))), b.append(e("").append(e("").addClass("timepicker-hour").attr({ "data-time-component": "hours", title: this._options.tooltips.pickHour }).attr("data-action", "showHours"))), c.append(e("").append(e("").attr({ href: "#", tabindex: "-1", title: this._options.tooltips.decrementHour }).addClass("btn").attr("data-action", "decrementHours").append(e("").addClass(this._options.icons.down))))), this._isEnabled("m") && (this._isEnabled("h") && (a.append(e("").addClass("separator")), b.append(e("").addClass("separator").html(":")), c.append(e("").addClass("separator"))), a.append(e("").append(e("").attr({ href: "#", tabindex: "-1", title: this._options.tooltips.incrementMinute }).addClass("btn").attr("data-action", "incrementMinutes").append(e("").addClass(this._options.icons.up)))), b.append(e("").append(e("").addClass("timepicker-minute").attr({ "data-time-component": "minutes", title: this._options.tooltips.pickMinute }).attr("data-action", "showMinutes"))), c.append(e("").append(e("").attr({ href: "#", tabindex: "-1", title: this._options.tooltips.decrementMinute }).addClass("btn").attr("data-action", "decrementMinutes").append(e("").addClass(this._options.icons.down))))), this._isEnabled("s") && (this._isEnabled("m") && (a.append(e("").addClass("separator")), - b.append(e("").addClass("separator").html(":")), c.append(e("").addClass("separator"))), a.append(e("").append(e("").attr({ href: "#", tabindex: "-1", title: this._options.tooltips.incrementSecond }).addClass("btn").attr("data-action", "incrementSeconds").append(e("").addClass(this._options.icons.up)))), b.append(e("").append(e("").addClass("timepicker-second").attr({ "data-time-component": "seconds", title: this._options.tooltips.pickSecond }).attr("data-action", "showSeconds"))), c.append(e("").append(e("").attr({ href: "#", tabindex: "-1", title: this._options.tooltips.decrementSecond }).addClass("btn").attr("data-action", "decrementSeconds").append(e("").addClass(this._options.icons.down))))), this.use24Hours || (a.append(e("").addClass("separator")), b.append(e("").append(e("").addClass("separator"))), e("
").addClass("timepicker-picker").append(e("").addClass("table-condensed").append([a, b, c])) - }, k.prototype._getTimePickerTemplate = function () { var a = e("
").addClass("timepicker-hours").append(e("
").addClass("table-condensed")), b = e("
").addClass("timepicker-minutes").append(e("
").addClass("table-condensed")), c = e("
").addClass("timepicker-seconds").append(e("
").addClass("table-condensed")), d = [this._getTimePickerMainTemplate()]; return this._isEnabled("h") && d.push(a), this._isEnabled("m") && d.push(b), this._isEnabled("s") && d.push(c), d }, k.prototype._getToolbar = function () { var a = []; return this._options.buttons.showToday && a.push(e("
").append(e("").attr({ "data-action": "today", title: this._options.tooltips.today }).append(e("").addClass(this._options.icons.today)))), !this._options.sideBySide && this._hasDate() && this._hasTime() && a.push(e("").append(e("").attr({ "data-action": "togglePicker", title: this._options.tooltips.selectTime }).append(e("").addClass(this._options.icons.time)))), this._options.buttons.showClear && a.push(e("").append(e("").attr({ "data-action": "clear", title: this._options.tooltips.clear }).append(e("").addClass(this._options.icons.clear)))), this._options.buttons.showClose && a.push(e("").append(e("").attr({ "data-action": "close", title: this._options.tooltips.close }).append(e("").addClass(this._options.icons.close)))), 0 === a.length ? "" : e("").addClass("table-condensed").append(e("").append(e("").append(a))) }, k.prototype._getTemplate = function () { var a = e("
").addClass("bootstrap-datetimepicker-widget dropdown-menu"), b = e("
").addClass("datepicker").append(this._getDatePickerTemplate()), c = e("
").addClass("timepicker").append(this._getTimePickerTemplate()), d = e("
    ").addClass("list-unstyled"), f = e("
  • ").addClass("picker-switch" + (this._options.collapse ? " accordion-toggle" : "")).append(this._getToolbar()); return this._options.inline && a.removeClass("dropdown-menu"), this.use24Hours && a.addClass("usetwentyfour"), this._isEnabled("s") && !this.use24Hours && a.addClass("wider"), this._options.sideBySide && this._hasDate() && this._hasTime() ? (a.addClass("timepicker-sbs"), "top" === this._options.toolbarPlacement && a.append(f), a.append(e("
    ").addClass("row").append(b.addClass("col-md-6")).append(c.addClass("col-md-6"))), "bottom" !== this._options.toolbarPlacement && "default" !== this._options.toolbarPlacement || a.append(f), a) : ("top" === this._options.toolbarPlacement && d.append(f), this._hasDate() && d.append(e("
  • ").addClass(this._options.collapse && this._hasTime() ? "collapse" : "").addClass(this._options.collapse && this._hasTime() && "time" === this._options.viewMode ? "" : "show").append(b)), "default" === this._options.toolbarPlacement && d.append(f), this._hasTime() && d.append(e("
  • ").addClass(this._options.collapse && this._hasDate() ? "collapse" : "").addClass(this._options.collapse && this._hasDate() && "time" === this._options.viewMode ? "show" : "").append(c)), "bottom" === this._options.toolbarPlacement && d.append(f), a.append(d)) }, k.prototype._place = function (a) { var b = a && a.data && a.data.picker || this, c = b._options.widgetPositioning.vertical, d = b._options.widgetPositioning.horizontal, f = void 0, g = (b.component || b._element).position(), h = (b.component || b._element).offset(); if (b._options.widgetParent) f = b._options.widgetParent.append(b.widget); else if (b._element.is("input")) f = b._element.after(b.widget).parent(); else { if (b._options.inline) return void (f = b._element.append(b.widget)); f = b._element, b._element.children().first().after(b.widget) } if ("auto" === c && (c = h.top + 1.5 * b.widget.height() >= e(window).height() + e(window).scrollTop() && b.widget.height() + b._element.outerHeight() < h.top ? "top" : "bottom"), "auto" === d && (d = f.width() < h.left + b.widget.outerWidth() / 2 && h.left + b.widget.outerWidth() > e(window).width() ? "right" : "left"), "top" === c ? b.widget.addClass("top").removeClass("bottom") : b.widget.addClass("bottom").removeClass("top"), "right" === d ? b.widget.addClass("float-right") : b.widget.removeClass("float-right"), "relative" !== f.css("position") && (f = f.parents().filter(function () { return "relative" === e(this).css("position") }).first()), 0 === f.length) throw new Error("datetimepicker component should be placed within a relative positioned container"); b.widget.css({ top: "top" === c ? "auto" : g.top + b._element.outerHeight() + "px", bottom: "top" === c ? f.outerHeight() - (f === b._element ? 0 : g.top) + "px" : "auto", left: "left" === d ? (f === b._element ? 0 : g.left) + "px" : "auto", right: "left" === d ? "auto" : f.outerWidth() - b._element.outerWidth() - (f === b._element ? 0 : g.left) + "px" }) }, k.prototype._fillDow = function () { var a = e("
"), b = this._viewDate.clone().startOf("w").startOf("d"); for (this._options.calendarWeeks === !0 && a.append(e(""), this._options.calendarWeeks && f.append('"), c.push(f)), g = "", d.isBefore(this._viewDate, "M") && (g += " old"), d.isAfter(this._viewDate, "M") && (g += " new"), this._options.allowMultidate) { var i = this._datesFormatted.indexOf(d.format("YYYY-MM-DD")); i !== -1 && d.isSame(this._datesFormatted[i], "d") && !this.unset && (g += " active") } else d.isSame(this._getLastPickedDate(), "d") && !this.unset && (g += " active"); this._isValid(d, "d") || (g += " disabled"), d.isSame(this.getMoment(), "d") && (g += " today"), 0 !== d.day() && 6 !== d.day() || (g += " weekend"), f.append('"), d.add(1, "d") } a.find("tbody").empty().append(c), this._updateMonths(), this._updateYears(), this._updateDecades() } }, k.prototype._fillHours = function () { var a = this.widget.find(".timepicker-hours table"), b = this._viewDate.clone().startOf("d"), c = [], d = e(""); for (this._viewDate.hour() > 11 && !this.use24Hours && b.hour(12); b.isSame(this._viewDate, "d") && (this.use24Hours || this._viewDate.hour() < 12 && b.hour() < 12 || this._viewDate.hour() > 11);)b.hour() % 4 === 0 && (d = e(""), c.push(d)), d.append('"), b.add(1, "h"); a.empty().append(c) }, k.prototype._fillMinutes = function () { for (var a = this.widget.find(".timepicker-minutes table"), b = this._viewDate.clone().startOf("h"), c = [], d = 1 === this._options.stepping ? 5 : this._options.stepping, f = e(""); this._viewDate.isSame(b, "h");)b.minute() % (4 * d) === 0 && (f = e(""), c.push(f)), f.append('"), b.add(d, "m"); a.empty().append(c) }, k.prototype._fillSeconds = function () { for (var a = this.widget.find(".timepicker-seconds table"), b = this._viewDate.clone().startOf("m"), c = [], d = e(""); this._viewDate.isSame(b, "m");)b.second() % 20 === 0 && (d = e(""), c.push(d)), d.append('"), b.add(5, "s"); a.empty().append(c) }, k.prototype._fillTime = function () { var a = void 0, b = void 0, c = this.widget.find(".timepicker span[data-time-component]"); this.use24Hours || (a = this.widget.find(".timepicker [data-action=togglePeriod]"), b = this._getLastPickedDate().clone().add(this._getLastPickedDate().hours() >= 12 ? -12 : 12, "h"), a.text(this._getLastPickedDate().format("A")), this._isValid(b, "h") ? a.removeClass("disabled") : a.addClass("disabled")), c.filter("[data-time-component=hours]").text(this._getLastPickedDate().format("" + (this.use24Hours ? "HH" : "hh"))), c.filter("[data-time-component=minutes]").text(this._getLastPickedDate().format("mm")), c.filter("[data-time-component=seconds]").text(this._getLastPickedDate().format("ss")), this._fillHours(), this._fillMinutes(), this._fillSeconds() }, k.prototype._doAction = function (a, b) { var c = this._getLastPickedDate(); if (e(a.currentTarget).is(".disabled")) return !1; switch (b = b || e(a.currentTarget).data("action")) { case "next": var d = f.DatePickerModes[this.currentViewMode].NAV_FUNCTION; this._viewDate.add(f.DatePickerModes[this.currentViewMode].NAV_STEP, d), this._fillDate(), this._viewUpdate(d); break; case "previous": var g = f.DatePickerModes[this.currentViewMode].NAV_FUNCTION; this._viewDate.subtract(f.DatePickerModes[this.currentViewMode].NAV_STEP, g), this._fillDate(), this._viewUpdate(g); break; case "pickerSwitch": this._showMode(1); break; case "selectMonth": var h = e(a.target).closest("tbody").find("span").index(e(a.target)); this._viewDate.month(h), this.currentViewMode === f.MinViewModeNumber ? (this._setValue(c.clone().year(this._viewDate.year()).month(this._viewDate.month()), this._getLastPickedDateIndex()), this._options.inline || this.hide()) : (this._showMode(-1), this._fillDate()), this._viewUpdate("M"); break; case "selectYear": var i = parseInt(e(a.target).text(), 10) || 0; this._viewDate.year(i), this.currentViewMode === f.MinViewModeNumber ? (this._setValue(c.clone().year(this._viewDate.year()), this._getLastPickedDateIndex()), this._options.inline || this.hide()) : (this._showMode(-1), this._fillDate()), this._viewUpdate("YYYY"); break; case "selectDecade": var j = parseInt(e(a.target).data("selection"), 10) || 0; this._viewDate.year(j), this.currentViewMode === f.MinViewModeNumber ? (this._setValue(c.clone().year(this._viewDate.year()), this._getLastPickedDateIndex()), this._options.inline || this.hide()) : (this._showMode(-1), this._fillDate()), this._viewUpdate("YYYY"); break; case "selectDay": var k = this._viewDate.clone(); e(a.target).is(".old") && k.subtract(1, "M"), e(a.target).is(".new") && k.add(1, "M"), this._setValue(k.date(parseInt(e(a.target).text(), 10)), this._getLastPickedDateIndex()), this._hasTime() || this._options.keepOpen || this._options.inline || this.hide(); break; case "incrementHours": var l = c.clone().add(1, "h"); this._isValid(l, "h") && this._setValue(l, this._getLastPickedDateIndex()); break; case "incrementMinutes": var m = c.clone().add(this._options.stepping, "m"); this._isValid(m, "m") && this._setValue(m, this._getLastPickedDateIndex()); break; case "incrementSeconds": var n = c.clone().add(1, "s"); this._isValid(n, "s") && this._setValue(n, this._getLastPickedDateIndex()); break; case "decrementHours": var o = c.clone().subtract(1, "h"); this._isValid(o, "h") && this._setValue(o, this._getLastPickedDateIndex()); break; case "decrementMinutes": var p = c.clone().subtract(this._options.stepping, "m"); this._isValid(p, "m") && this._setValue(p, this._getLastPickedDateIndex()); break; case "decrementSeconds": var q = c.clone().subtract(1, "s"); this._isValid(q, "s") && this._setValue(q, this._getLastPickedDateIndex()); break; case "togglePeriod": this._setValue(c.clone().add(c.hours() >= 12 ? -12 : 12, "h"), this._getLastPickedDateIndex()); break; case "togglePicker": var r = e(a.target), s = r.closest("a"), t = r.closest("ul"), u = t.find(".show"), v = t.find(".collapse:not(.show)"), w = r.is("span") ? r : r.find("span"), x = void 0; if (u && u.length) { if (x = u.data("collapse"), x && x.transitioning) return !0; u.collapse ? (u.collapse("hide"), v.collapse("show")) : (u.removeClass("show"), v.addClass("show")), w.toggleClass(this._options.icons.time + " " + this._options.icons.date), w.hasClass(this._options.icons.date) ? s.attr("title", this._options.tooltips.selectDate) : s.attr("title", this._options.tooltips.selectTime) } break; case "showPicker": this.widget.find(".timepicker > div:not(.timepicker-picker)").hide(), this.widget.find(".timepicker .timepicker-picker").show(); break; case "showHours": this.widget.find(".timepicker .timepicker-picker").hide(), this.widget.find(".timepicker .timepicker-hours").show(); break; case "showMinutes": this.widget.find(".timepicker .timepicker-picker").hide(), this.widget.find(".timepicker .timepicker-minutes").show(); break; case "showSeconds": this.widget.find(".timepicker .timepicker-picker").hide(), this.widget.find(".timepicker .timepicker-seconds").show(); break; case "selectHour": var y = parseInt(e(a.target).text(), 10); this.use24Hours || (c.hours() >= 12 ? 12 !== y && (y += 12) : 12 === y && (y = 0)), this._setValue(c.clone().hours(y), this._getLastPickedDateIndex()), this._doAction(a, "showPicker"); break; case "selectMinute": this._setValue(c.clone().minutes(parseInt(e(a.target).text(), 10)), this._getLastPickedDateIndex()), this._doAction(a, "showPicker"); break; case "selectSecond": this._setValue(c.clone().seconds(parseInt(e(a.target).text(), 10)), this._getLastPickedDateIndex()), this._doAction(a, "showPicker"); break; case "clear": this.clear(); break; case "today": var z = this.getMoment(); this._isValid(z, "d") && this._setValue(z, this._getLastPickedDateIndex()) }return !1 }, k.prototype.hide = function () { var a = !1; this.widget && (this.widget.find(".collapse").each(function () { var b = e(this).data("collapse"); return !b || !b.transitioning || (a = !0, !1) }), a || (this.component && this.component.hasClass("btn") && this.component.toggleClass("active"), this.widget.hide(), e(window).off("resize", this._place()), this.widget.off("click", "[data-action]"), this.widget.off("mousedown", !1), this.widget.remove(), this.widget = !1, this._notifyEvent({ type: f.Event.HIDE, date: this._getLastPickedDate().clone() }), void 0 !== this.input && this.input.blur(), this._viewDate = this._getLastPickedDate().clone())) }, k.prototype.show = function () { var a = void 0, b = { year: function (a) { return a.month(0).date(1).hours(0).seconds(0).minutes(0) }, month: function (a) { return a.date(1).hours(0).seconds(0).minutes(0) }, day: function (a) { return a.hours(0).seconds(0).minutes(0) }, hour: function (a) { return a.seconds(0).minutes(0) }, minute: function (a) { return a.seconds(0) } }; if (void 0 !== this.input) { if (this.input.prop("disabled") || !this._options.ignoreReadonly && this.input.prop("readonly") || this.widget) return; void 0 !== this.input.val() && 0 !== this.input.val().trim().length ? this._setValue(this._parseInputDate(this.input.val().trim()), 0) : this.unset && this._options.useCurrent && (a = this.getMoment(), "string" == typeof this._options.useCurrent && (a = b[this._options.useCurrent](a)), this._setValue(a, 0)) } else this.unset && this._options.useCurrent && (a = this.getMoment(), "string" == typeof this._options.useCurrent && (a = b[this._options.useCurrent](a)), this._setValue(a, 0)); this.widget = this._getTemplate(), this._fillDow(), this._fillMonths(), this.widget.find(".timepicker-hours").hide(), this.widget.find(".timepicker-minutes").hide(), this.widget.find(".timepicker-seconds").hide(), this._update(), this._showMode(), e(window).on("resize", { picker: this }, this._place), this.widget.on("click", "[data-action]", e.proxy(this._doAction, this)), this.widget.on("mousedown", !1), this.component && this.component.hasClass("btn") && this.component.toggleClass("active"), this._place(), this.widget.show(), void 0 !== this.input && this._options.focusOnShow && !this.input.is(":focus") && this.input.focus(), this._notifyEvent({ type: f.Event.SHOW }) }, k.prototype.destroy = function () { this.hide(), this._element.removeData(f.DATA_KEY), this._element.removeData("date") }, k.prototype.disable = function () { this.hide(), this.component && this.component.hasClass("btn") && this.component.addClass("disabled"), void 0 !== this.input && this.input.prop("disabled", !0) }, k.prototype.enable = function () { this.component && this.component.hasClass("btn") && this.component.removeClass("disabled"), void 0 !== this.input && this.input.prop("disabled", !1) }, k.prototype.toolbarPlacement = function (a) { if (0 === arguments.length) return this._options.toolbarPlacement; if ("string" != typeof a) throw new TypeError("toolbarPlacement() expects a string parameter"); if (j.indexOf(a) === -1) throw new TypeError("toolbarPlacement() parameter must be one of (" + j.join(", ") + ") value"); this._options.toolbarPlacement = a, this.widget && (this.hide(), this.show()) }, k.prototype.widgetPositioning = function (a) { if (0 === arguments.length) return e.extend({}, this._options.widgetPositioning); if ("[object Object]" !== {}.toString.call(a)) throw new TypeError("widgetPositioning() expects an object variable"); if (a.horizontal) { if ("string" != typeof a.horizontal) throw new TypeError("widgetPositioning() horizontal variable must be a string"); if (a.horizontal = a.horizontal.toLowerCase(), i.indexOf(a.horizontal) === -1) throw new TypeError("widgetPositioning() expects horizontal parameter to be one of (" + i.join(", ") + ")"); this._options.widgetPositioning.horizontal = a.horizontal } if (a.vertical) { if ("string" != typeof a.vertical) throw new TypeError("widgetPositioning() vertical variable must be a string"); if (a.vertical = a.vertical.toLowerCase(), h.indexOf(a.vertical) === -1) throw new TypeError("widgetPositioning() expects vertical parameter to be one of (" + h.join(", ") + ")"); this._options.widgetPositioning.vertical = a.vertical } this._update() }, k.prototype.widgetParent = function (a) { if (0 === arguments.length) return this._options.widgetParent; if ("string" == typeof a && (a = e(a)), null !== a && "string" != typeof a && !(a instanceof e)) throw new TypeError("widgetParent() expects a string or a jQuery object parameter"); this._options.widgetParent = a, this.widget && (this.hide(), this.show()) }, k._jQueryHandleThis = function (a, b, c) { var g = e(a).data(f.DATA_KEY); if ("object" === ("undefined" == typeof b ? "undefined" : d(b)) && e.extend({}, f.Default, b), g || (g = new k(e(a), b), e(a).data(f.DATA_KEY, g)), "string" == typeof b) { if (void 0 === g[b]) throw new Error('No method named "' + b + '"'); return void 0 === c ? g[b]() : g[b](c) } }, k._jQueryInterface = function (a, b) { return 1 === this.length ? k._jQueryHandleThis(this[0], a, b) : this.each(function () { k._jQueryHandleThis(this, a, b) }) }, k - }(f); return e(document).on(f.Event.CLICK_DATA_API, f.Selector.DATA_TOGGLE, function () { var a = k(e(this)); 0 !== a.length && l._jQueryInterface.call(a, "toggle") }).on(f.Event.CHANGE, "." + f.ClassName.INPUT, function (a) { var b = k(e(this)); 0 !== b.length && l._jQueryInterface.call(b, "_change", a) }).on(f.Event.BLUR, "." + f.ClassName.INPUT, function (a) { var b = k(e(this)), c = b.data(f.DATA_KEY); 0 !== b.length && (c._options.debug || window.debug || l._jQueryInterface.call(b, "hide", a)) }).on(f.Event.KEYDOWN, "." + f.ClassName.INPUT, function (a) { var b = k(e(this)); 0 !== b.length && l._jQueryInterface.call(b, "_keydown", a) }).on(f.Event.KEYUP, "." + f.ClassName.INPUT, function (a) { var b = k(e(this)); 0 !== b.length && l._jQueryInterface.call(b, "_keyup", a) }).on(f.Event.FOCUS, "." + f.ClassName.INPUT, function (a) { var b = k(e(this)), c = b.data(f.DATA_KEY); 0 !== b.length && c._options.allowInputToggle && l._jQueryInterface.call(b, c, a) }), e.fn[f.NAME] = l._jQueryInterface, e.fn[f.NAME].Constructor = l, e.fn[f.NAME].noConflict = function () { return e.fn[f.NAME] = g, l._jQueryInterface }, l - })(jQuery) -}(); \ No newline at end of file +if ("undefined" == typeof jQuery) throw new Error("Tempus Dominus Bootstrap4's requires jQuery. jQuery must be included before Tempus Dominus Bootstrap4's JavaScript."); +if ( + (+(function (a) { + var b = a.fn.jquery.split(" ")[0].split("."); + if ((b[0] < 2 && b[1] < 9) || (1 === b[0] && 9 === b[1] && b[2] < 1) || b[0] >= 4) throw new Error("Tempus Dominus Bootstrap4's requires at least jQuery v1.9.1 but less than v4.0.0"); + })(jQuery), + "undefined" == typeof moment) +) + throw new Error("Tempus Dominus Bootstrap4's requires moment.js. Moment.js must be included before Tempus Dominus Bootstrap4's JavaScript."); +var version = moment.version.split("."); +if ((version[0] <= 2 && version[1] < 17) || version[0] >= 3) throw new Error("Tempus Dominus Bootstrap4's requires at least moment.js v2.17.0 but less than v3.0.0"); ++(function () { + function a(a, b) { + if (!a) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !b || ("object" != typeof b && "function" != typeof b) ? a : b; + } + function b(a, b) { + if ("function" != typeof b && null !== b) throw new TypeError("Super expression must either be null or a function, not " + typeof b); + (a.prototype = Object.create(b && b.prototype, { constructor: { value: a, enumerable: !1, writable: !0, configurable: !0 } })), b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : (a.__proto__ = b)); + } + function c(a, b) { + if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function"); + } + var d = + "function" == typeof Symbol && "symbol" == typeof Symbol.iterator + ? function (a) { + return typeof a; + } + : function (a) { + return a && "function" == typeof Symbol && a.constructor === Symbol && a !== Symbol.prototype ? "symbol" : typeof a; + }, + e = (function () { + function a(a, b) { + for (var c = 0; c < b.length; c++) { + var d = b[c]; + (d.enumerable = d.enumerable || !1), (d.configurable = !0), "value" in d && (d.writable = !0), Object.defineProperty(a, d.key, d); + } + } + return function (b, c, d) { + return c && a(b.prototype, c), d && a(b, d), b; + }; + })(), + f = (function (a, b) { + var d = "datetimepicker", + f = "5.0.0-alpha12", + g = "" + d, + h = "." + g, + i = g + ".", + j = ".data-api", + k = { DATA_TOGGLE: '[data-toggle="' + g + '"]' }, + l = { INPUT: d + "-input" }, + m = { CHANGE: "change" + h, BLUR: "blur" + h, KEYUP: "keyup" + h, KEYDOWN: "keydown" + h, FOCUS: "focus" + h, CLICK_DATA_API: "click" + h + j, UPDATE: i + "update", ERROR: i + "error", HIDE: i + "hide", SHOW: i + "show" }, + n = [ + { CLASS_NAME: "days", NAV_FUNCTION: "M", NAV_STEP: 1 }, + { CLASS_NAME: "months", NAV_FUNCTION: "y", NAV_STEP: 1 }, + { CLASS_NAME: "years", NAV_FUNCTION: "y", NAV_STEP: 10 }, + { CLASS_NAME: "decades", NAV_FUNCTION: "y", NAV_STEP: 100 }, + ], + o = { + up: 38, + 38: "up", + down: 40, + 40: "down", + left: 37, + 37: "left", + right: 39, + 39: "right", + tab: 9, + 9: "tab", + escape: 27, + 27: "escape", + enter: 13, + 13: "enter", + pageUp: 33, + 33: "pageUp", + pageDown: 34, + 34: "pageDown", + shift: 16, + 16: "shift", + control: 17, + 17: "control", + space: 32, + 32: "space", + t: 84, + 84: "t", + delete: 46, + 46: "delete", + }, + p = ["times", "days", "months", "years", "decades"], + q = {}, + r = {}, + s = 0, + t = { + timeZone: "", + format: !1, + dayViewHeaderFormat: "MMMM YYYY", + extraFormats: !1, + stepping: 1, + minDate: !1, + maxDate: !1, + useCurrent: !0, + collapse: !0, + locale: b.locale(), + defaultDate: !1, + disabledDates: !1, + enabledDates: !1, + icons: { + time: "fa fa-clock-o", + date: "fa fa-calendar", + up: "fa fa-arrow-up", + down: "fa fa-arrow-down", + previous: "fa fa-chevron-left", + next: "fa fa-chevron-right", + today: "fa fa-calendar-check-o", + clear: "fa fa-delete", + close: "fa fa-times", + }, + tooltips: { + today: "Go to today", + clear: "Clear selection", + close: "Close the picker", + selectMonth: "Select Month", + prevMonth: "Previous Month", + nextMonth: "Next Month", + selectYear: "Select Year", + prevYear: "Previous Year", + nextYear: "Next Year", + selectDecade: "Select Decade", + prevDecade: "Previous Decade", + nextDecade: "Next Decade", + prevCentury: "Previous Century", + nextCentury: "Next Century", + pickHour: "Pick Hour", + incrementHour: "Increment Hour", + decrementHour: "Decrement Hour", + pickMinute: "Pick Minute", + incrementMinute: "Increment Minute", + decrementMinute: "Decrement Minute", + pickSecond: "Pick Second", + incrementSecond: "Increment Second", + decrementSecond: "Decrement Second", + togglePeriod: "Toggle Period", + selectTime: "Select Time", + selectDate: "Select Date", + }, + useStrict: !1, + sideBySide: !1, + daysOfWeekDisabled: !1, + calendarWeeks: !1, + viewMode: "days", + toolbarPlacement: "default", + buttons: { showToday: !1, showClear: !1, showClose: !1 }, + widgetPositioning: { horizontal: "auto", vertical: "auto" }, + widgetParent: null, + ignoreReadonly: !1, + keepOpen: !1, + focusOnShow: !0, + inline: !1, + keepInvalid: !1, + keyBinds: { + up: function () { + if (!this.widget) return !1; + var a = this._dates[0] || this.getMoment(); + return this.widget.find(".datepicker").is(":visible") ? this.date(a.clone().subtract(7, "d")) : this.date(a.clone().add(this.stepping(), "m")), !0; + }, + down: function () { + if (!this.widget) return this.show(), !1; + var a = this._dates[0] || this.getMoment(); + return this.widget.find(".datepicker").is(":visible") ? this.date(a.clone().add(7, "d")) : this.date(a.clone().subtract(this.stepping(), "m")), !0; + }, + "control up": function () { + if (!this.widget) return !1; + var a = this._dates[0] || this.getMoment(); + return this.widget.find(".datepicker").is(":visible") ? this.date(a.clone().subtract(1, "y")) : this.date(a.clone().add(1, "h")), !0; + }, + "control down": function () { + if (!this.widget) return !1; + var a = this._dates[0] || this.getMoment(); + return this.widget.find(".datepicker").is(":visible") ? this.date(a.clone().add(1, "y")) : this.date(a.clone().subtract(1, "h")), !0; + }, + left: function () { + if (!this.widget) return !1; + var a = this._dates[0] || this.getMoment(); + return this.widget.find(".datepicker").is(":visible") && this.date(a.clone().subtract(1, "d")), !0; + }, + right: function () { + if (!this.widget) return !1; + var a = this._dates[0] || this.getMoment(); + return this.widget.find(".datepicker").is(":visible") && this.date(a.clone().add(1, "d")), !0; + }, + pageUp: function () { + if (!this.widget) return !1; + var a = this._dates[0] || this.getMoment(); + return this.widget.find(".datepicker").is(":visible") && this.date(a.clone().subtract(1, "M")), !0; + }, + pageDown: function () { + if (!this.widget) return !1; + var a = this._dates[0] || this.getMoment(); + return this.widget.find(".datepicker").is(":visible") && this.date(a.clone().add(1, "M")), !0; + }, + enter: function () { + return this.hide(), !0; + }, + escape: function () { + return !!this.widget && (this.hide(), !0); + }, + "control space": function () { + return !!this.widget && (this.widget.find(".timepicker").is(":visible") && this.widget.find('.btn[data-action="togglePeriod"]').click(), !0); + }, + t: function () { + return this.date(this.getMoment()), !0; + }, + delete: function () { + return !!this.widget && (this.clear(), !0); + }, + }, + debug: !1, + allowInputToggle: !1, + disabledTimeIntervals: !1, + disabledHours: !1, + enabledHours: !1, + viewDate: !1, + allowMultidate: !1, + multidateSeparator: ",", + }, + u = (function () { + function i(a, b) { + c(this, i), + (this._options = this._getOptions(b)), + (this._element = a), + (this._dates = []), + (this._datesFormatted = []), + (this._viewDate = null), + (this.unset = !0), + (this.component = !1), + (this.widget = !1), + (this.use24Hours = null), + (this.actualFormat = null), + (this.parseFormats = null), + (this.currentViewMode = null), + this._int(); + } + return ( + (i.prototype._int = function () { + var b = this._element.data("target-input"); + this._element.is("input") ? (this.input = this._element) : void 0 !== b && ("nearest" === b ? (this.input = this._element.find("input")) : (this.input = a(b))), + (this._dates = []), + (this._dates[0] = this.getMoment()), + (this._viewDate = this.getMoment().clone()), + a.extend(!0, this._options, this._dataToOptions()), + this.options(this._options), + this._initFormatting(), + void 0 !== this.input && this.input.is("input") && 0 !== this.input.val().trim().length + ? this._setValue(this._parseInputDate(this.input.val().trim()), 0) + : this._options.defaultDate && void 0 !== this.input && void 0 === this.input.attr("placeholder") && this._setValue(this._options.defaultDate, 0), + this._options.inline && this.show(); + }), + (i.prototype._update = function () { + this.widget && (this._fillDate(), this._fillTime()); + }), + (i.prototype._setValue = function (a, b) { + var c = this.unset ? null : this._dates[b], + d = ""; + if (!a) + return ( + this._options.allowMultidate && 1 !== this._dates.length + ? ((d = this._element.data("date") + ","), + (d = d + .replace(c.format(this.actualFormat) + ",", "") + .replace(",,", "") + .replace(/,\s*$/, "")), + this._dates.splice(b, 1), + this._datesFormatted.splice(b, 1)) + : ((this.unset = !0), (this._dates = []), (this._datesFormatted = [])), + void 0 !== this.input && (this.input.val(d), this.input.trigger("input")), + this._element.data("date", d), + this._notifyEvent({ type: i.Event.CHANGE, date: !1, oldDate: c }), + void this._update() + ); + if ( + ((a = a.clone().locale(this._options.locale)), + this._hasTimeZone() && a.tz(this._options.timeZone), + 1 !== this._options.stepping && a.minutes(Math.round(a.minutes() / this._options.stepping) * this._options.stepping).seconds(0), + this._isValid(a)) + ) { + if (((this._dates[b] = a), (this._datesFormatted[b] = a.format("YYYY-MM-DD")), (this._viewDate = a.clone()), this._options.allowMultidate && this._dates.length > 1)) { + for (var e = 0; e < this._dates.length; e++) d += "" + this._dates[e].format(this.actualFormat) + this._options.multidateSeparator; + d = d.replace(/,\s*$/, ""); + } else d = this._dates[b].format(this.actualFormat); + void 0 !== this.input && (this.input.val(d), this.input.trigger("input")), + this._element.data("date", d), + (this.unset = !1), + this._update(), + this._notifyEvent({ type: i.Event.CHANGE, date: this._dates[b].clone(), oldDate: c }); + } else + this._options.keepInvalid + ? this._notifyEvent({ type: i.Event.CHANGE, date: a, oldDate: c }) + : void 0 !== this.input && (this.input.val("" + (this.unset ? "" : this._dates[b].format(this.actualFormat))), this.input.trigger("input")), + this._notifyEvent({ type: i.Event.ERROR, date: a, oldDate: c }); + }), + (i.prototype._change = function (b) { + var c = a(b.target).val().trim(), + d = c ? this._parseInputDate(c) : null; + return this._setValue(d), b.stopImmediatePropagation(), !1; + }), + (i.prototype._getOptions = function (b) { + return (b = a.extend(!0, {}, t, b)); + }), + (i.prototype._hasTimeZone = function () { + return void 0 !== b.tz && void 0 !== this._options.timeZone && null !== this._options.timeZone && "" !== this._options.timeZone; + }), + (i.prototype._isEnabled = function (a) { + if ("string" != typeof a || a.length > 1) throw new TypeError("isEnabled expects a single character string parameter"); + switch (a) { + case "y": + return this.actualFormat.indexOf("Y") !== -1; + case "M": + return this.actualFormat.indexOf("M") !== -1; + case "d": + return this.actualFormat.toLowerCase().indexOf("d") !== -1; + case "h": + case "H": + return this.actualFormat.toLowerCase().indexOf("h") !== -1; + case "m": + return this.actualFormat.indexOf("m") !== -1; + case "s": + return this.actualFormat.indexOf("s") !== -1; + default: + return !1; + } + }), + (i.prototype._hasTime = function () { + return this._isEnabled("h") || this._isEnabled("m") || this._isEnabled("s"); + }), + (i.prototype._hasDate = function () { + return this._isEnabled("y") || this._isEnabled("M") || this._isEnabled("d"); + }), + (i.prototype._dataToOptions = function () { + var b = this._element.data(), + c = {}; + return ( + b.dateOptions && b.dateOptions instanceof Object && (c = a.extend(!0, c, b.dateOptions)), + a.each(this._options, function (a) { + var d = "date" + a.charAt(0).toUpperCase() + a.slice(1); + void 0 !== b[d] ? (c[a] = b[d]) : delete c[a]; + }), + c + ); + }), + (i.prototype._notifyEvent = function (a) { + (a.type === i.Event.CHANGE && a.date && a.date.isSame(a.oldDate)) || (!a.date && !a.oldDate) || this._element.trigger(a); + }), + (i.prototype._viewUpdate = function (a) { + "y" === a && (a = "YYYY"), this._notifyEvent({ type: i.Event.UPDATE, change: a, viewDate: this._viewDate.clone() }); + }), + (i.prototype._showMode = function (a) { + this.widget && + (a && (this.currentViewMode = Math.max(s, Math.min(3, this.currentViewMode + a))), + this.widget + .find(".datepicker > div") + .hide() + .filter(".datepicker-" + n[this.currentViewMode].CLASS_NAME) + .show()); + }), + (i.prototype._isInDisabledDates = function (a) { + return this._options.disabledDates[a.format("YYYY-MM-DD")] === !0; + }), + (i.prototype._isInEnabledDates = function (a) { + return this._options.enabledDates[a.format("YYYY-MM-DD")] === !0; + }), + (i.prototype._isInDisabledHours = function (a) { + return this._options.disabledHours[a.format("H")] === !0; + }), + (i.prototype._isInEnabledHours = function (a) { + return this._options.enabledHours[a.format("H")] === !0; + }), + (i.prototype._isValid = function (b, c) { + if (!b.isValid()) return !1; + if (this._options.disabledDates && "d" === c && this._isInDisabledDates(b)) return !1; + if (this._options.enabledDates && "d" === c && !this._isInEnabledDates(b)) return !1; + if (this._options.minDate && b.isBefore(this._options.minDate, c)) return !1; + if (this._options.maxDate && b.isAfter(this._options.maxDate, c)) return !1; + if (this._options.daysOfWeekDisabled && "d" === c && this._options.daysOfWeekDisabled.indexOf(b.day()) !== -1) return !1; + if (this._options.disabledHours && ("h" === c || "m" === c || "s" === c) && this._isInDisabledHours(b)) return !1; + if (this._options.enabledHours && ("h" === c || "m" === c || "s" === c) && !this._isInEnabledHours(b)) return !1; + if (this._options.disabledTimeIntervals && ("h" === c || "m" === c || "s" === c)) { + var d = !1; + if ( + (a.each(this._options.disabledTimeIntervals, function () { + if (b.isBetween(this[0], this[1])) return (d = !0), !1; + }), + d) + ) + return !1; + } + return !0; + }), + (i.prototype._parseInputDate = function (a) { + return void 0 === this._options.parseInputDate ? b.isMoment(a) || (a = this.getMoment(a)) : (a = this._options.parseInputDate(a)), a; + }), + (i.prototype._keydown = function (a) { + var b = null, + c = void 0, + d = void 0, + e = void 0, + f = void 0, + g = [], + h = {}, + i = a.which, + j = "p"; + q[i] = j; + for (c in q) q.hasOwnProperty(c) && q[c] === j && (g.push(c), parseInt(c, 10) !== i && (h[c] = !0)); + for (c in this._options.keyBinds) + if (this._options.keyBinds.hasOwnProperty(c) && "function" == typeof this._options.keyBinds[c] && ((e = c.split(" ")), e.length === g.length && o[i] === e[e.length - 1])) { + for (f = !0, d = e.length - 2; d >= 0; d--) + if (!(o[e[d]] in h)) { + f = !1; + break; + } + if (f) { + b = this._options.keyBinds[c]; + break; + } + } + b && b.call(this.widget) && (a.stopPropagation(), a.preventDefault()); + }), + (i.prototype._keyup = function (a) { + (q[a.which] = "r"), r[a.which] && ((r[a.which] = !1), a.stopPropagation(), a.preventDefault()); + }), + (i.prototype._indexGivenDates = function (b) { + var c = {}, + d = this; + return ( + a.each(b, function () { + var a = d._parseInputDate(this); + a.isValid() && (c[a.format("YYYY-MM-DD")] = !0); + }), + !!Object.keys(c).length && c + ); + }), + (i.prototype._indexGivenHours = function (b) { + var c = {}; + return ( + a.each(b, function () { + c[this] = !0; + }), + !!Object.keys(c).length && c + ); + }), + (i.prototype._initFormatting = function () { + var a = this._options.format || "L LT", + b = this; + (this.actualFormat = a.replace(/(\[[^\[]*])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, function (a) { + return b._dates[0].localeData().longDateFormat(a) || a; + })), + (this.parseFormats = this._options.extraFormats ? this._options.extraFormats.slice() : []), + this.parseFormats.indexOf(a) < 0 && this.parseFormats.indexOf(this.actualFormat) < 0 && this.parseFormats.push(this.actualFormat), + (this.use24Hours = this.actualFormat.toLowerCase().indexOf("a") < 1 && this.actualFormat.replace(/\[.*?]/g, "").indexOf("h") < 1), + this._isEnabled("y") && (s = 2), + this._isEnabled("M") && (s = 1), + this._isEnabled("d") && (s = 0), + (this.currentViewMode = Math.max(s, this.currentViewMode)), + this.unset || this._setValue(this._dates[0], 0); + }), + (i.prototype._getLastPickedDate = function () { + // ToDo: workaround, damit nicht undefined zurückkommt! + var ownSoft_Date = this._dates[this._getLastPickedDateIndex()]; + + return ownSoft_Date === undefined ? this.getMoment() : this._dates[this._getLastPickedDateIndex()]; + + //return this._dates[this._getLastPickedDateIndex()]; + }), + (i.prototype._getLastPickedDateIndex = function () { + return this._dates.length - 1; + }), + (i.prototype.getMoment = function (a) { + var c = void 0; + return ( + (c = void 0 === a || null === a ? b() : this._hasTimeZone() ? b.tz(a, this.parseFormats, this._options.useStrict, this._options.timeZone) : b(a, this.parseFormats, this._options.useStrict)), + this._hasTimeZone() && c.tz(this._options.timeZone), + c + ); + }), + (i.prototype.toggle = function () { + return this.widget ? this.hide() : this.show(); + }), + (i.prototype.ignoreReadonly = function (a) { + if (0 === arguments.length) return this._options.ignoreReadonly; + if ("boolean" != typeof a) throw new TypeError("ignoreReadonly () expects a boolean parameter"); + this._options.ignoreReadonly = a; + }), + (i.prototype.options = function (b) { + if (0 === arguments.length) return a.extend(!0, {}, this._options); + if (!(b instanceof Object)) throw new TypeError("options() this.options parameter should be an object"); + a.extend(!0, this._options, b); + var c = this; + a.each(this._options, function (a, b) { + void 0 !== c[a] && c[a](b); + }); + }), + (i.prototype.date = function (a, c) { + if (((c = c || 0), 0 === arguments.length)) return this.unset ? null : this._options.allowMultidate ? this._dates.join(this._options.multidateSeparator) : this._dates[c].clone(); + if (!(null === a || "string" == typeof a || b.isMoment(a) || a instanceof Date)) throw new TypeError("date() parameter must be one of [null, string, moment or Date]"); + this._setValue(null === a ? null : this._parseInputDate(a), c); + }), + (i.prototype.format = function (a) { + if (0 === arguments.length) return this._options.format; + if ("string" != typeof a && ("boolean" != typeof a || a !== !1)) throw new TypeError("format() expects a string or boolean:false parameter " + a); + (this._options.format = a), this.actualFormat && this._initFormatting(); + }), + (i.prototype.timeZone = function (a) { + if (0 === arguments.length) return this._options.timeZone; + if ("string" != typeof a) throw new TypeError("newZone() expects a string parameter"); + this._options.timeZone = a; + }), + (i.prototype.dayViewHeaderFormat = function (a) { + if (0 === arguments.length) return this._options.dayViewHeaderFormat; + if ("string" != typeof a) throw new TypeError("dayViewHeaderFormat() expects a string parameter"); + this._options.dayViewHeaderFormat = a; + }), + (i.prototype.extraFormats = function (a) { + if (0 === arguments.length) return this._options.extraFormats; + if (a !== !1 && !(a instanceof Array)) throw new TypeError("extraFormats() expects an array or false parameter"); + (this._options.extraFormats = a), this.parseFormats && this._initFormatting(); + }), + (i.prototype.disabledDates = function (b) { + if (0 === arguments.length) return this._options.disabledDates ? a.extend({}, this._options.disabledDates) : this._options.disabledDates; + if (!b) return (this._options.disabledDates = !1), this._update(), !0; + if (!(b instanceof Array)) throw new TypeError("disabledDates() expects an array parameter"); + (this._options.disabledDates = this._indexGivenDates(b)), (this._options.enabledDates = !1), this._update(); + }), + (i.prototype.enabledDates = function (b) { + if (0 === arguments.length) return this._options.enabledDates ? a.extend({}, this._options.enabledDates) : this._options.enabledDates; + if (!b) return (this._options.enabledDates = !1), this._update(), !0; + if (!(b instanceof Array)) throw new TypeError("enabledDates() expects an array parameter"); + (this._options.enabledDates = this._indexGivenDates(b)), (this._options.disabledDates = !1), this._update(); + }), + (i.prototype.daysOfWeekDisabled = function (a) { + if (0 === arguments.length) return this._options.daysOfWeekDisabled.splice(0); + if ("boolean" == typeof a && !a) return (this._options.daysOfWeekDisabled = !1), this._update(), !0; + if (!(a instanceof Array)) throw new TypeError("daysOfWeekDisabled() expects an array parameter"); + if ( + ((this._options.daysOfWeekDisabled = a + .reduce(function (a, b) { + return (b = parseInt(b, 10)), b > 6 || b < 0 || isNaN(b) ? a : (a.indexOf(b) === -1 && a.push(b), a); + }, []) + .sort()), + this._options.useCurrent && !this._options.keepInvalid) + ) + for (var b = 0; b < this._dates.length; b++) { + for (var c = 0; !this._isValid(this._dates[b], "d");) { + if ((this._dates[b].add(1, "d"), 31 === c)) throw "Tried 31 times to find a valid date"; + c++; + } + this._setValue(this._dates[b], b); + } + this._update(); + }), + (i.prototype.maxDate = function (a) { + if (0 === arguments.length) return this._options.maxDate ? this._options.maxDate.clone() : this._options.maxDate; + if ("boolean" == typeof a && a === !1) return (this._options.maxDate = !1), this._update(), !0; + "string" == typeof a && (("now" !== a && "moment" !== a) || (a = this.getMoment())); + var b = this._parseInputDate(a); + if (!b.isValid()) throw new TypeError("maxDate() Could not parse date parameter: " + a); + if (this._options.minDate && b.isBefore(this._options.minDate)) throw new TypeError("maxDate() date parameter is before this.options.minDate: " + b.format(this.actualFormat)); + this._options.maxDate = b; + for (var c = 0; c < this._dates.length; c++) this._options.useCurrent && !this._options.keepInvalid && this._dates[c].isAfter(a) && this._setValue(this._options.maxDate, c); + this._viewDate.isAfter(b) && (this._viewDate = b.clone().subtract(this._options.stepping, "m")), this._update(); + }), + (i.prototype.minDate = function (a) { + if (0 === arguments.length) return this._options.minDate ? this._options.minDate.clone() : this._options.minDate; + if ("boolean" == typeof a && a === !1) return (this._options.minDate = !1), this._update(), !0; + "string" == typeof a && (("now" !== a && "moment" !== a) || (a = this.getMoment())); + var b = this._parseInputDate(a); + if (!b.isValid()) throw new TypeError("minDate() Could not parse date parameter: " + a); + if (this._options.maxDate && b.isAfter(this._options.maxDate)) throw new TypeError("minDate() date parameter is after this.options.maxDate: " + b.format(this.actualFormat)); + this._options.minDate = b; + for (var c = 0; c < this._dates.length; c++) this._options.useCurrent && !this._options.keepInvalid && this._dates[c].isBefore(a) && this._setValue(this._options.minDate, c); + this._viewDate.isBefore(b) && (this._viewDate = b.clone().add(this._options.stepping, "m")), this._update(); + }), + (i.prototype.defaultDate = function (a) { + if (0 === arguments.length) return this._options.defaultDate ? this._options.defaultDate.clone() : this._options.defaultDate; + if (!a) return (this._options.defaultDate = !1), !0; + "string" == typeof a && (a = "now" === a || "moment" === a ? this.getMoment() : this.getMoment(a)); + var b = this._parseInputDate(a); + if (!b.isValid()) throw new TypeError("defaultDate() Could not parse date parameter: " + a); + if (!this._isValid(b)) throw new TypeError("defaultDate() date passed is invalid according to component setup validations"); + (this._options.defaultDate = b), ((this._options.defaultDate && this._options.inline) || (void 0 !== this.input && "" === this.input.val().trim())) && this._setValue(this._options.defaultDate, 0); + }), + (i.prototype.locale = function (a) { + if (0 === arguments.length) return this._options.locale; + if (!b.localeData(a)) throw new TypeError("locale() locale " + a + " is not loaded from moment locales!"); + for (var c = 0; c < this._dates.length; c++) this._dates[c].locale(this._options.locale); + this._viewDate.locale(this._options.locale), this.actualFormat && this._initFormatting(), this.widget && (this.hide(), this.show()); + }), + (i.prototype.stepping = function (a) { + return 0 === arguments.length ? this._options.stepping : ((a = parseInt(a, 10)), (isNaN(a) || a < 1) && (a = 1), void (this._options.stepping = a)); + }), + (i.prototype.useCurrent = function (a) { + var b = ["year", "month", "day", "hour", "minute"]; + if (0 === arguments.length) return this._options.useCurrent; + if ("boolean" != typeof a && "string" != typeof a) throw new TypeError("useCurrent() expects a boolean or string parameter"); + if ("string" == typeof a && b.indexOf(a.toLowerCase()) === -1) throw new TypeError("useCurrent() expects a string parameter of " + b.join(", ")); + this._options.useCurrent = a; + }), + (i.prototype.collapse = function (a) { + if (0 === arguments.length) return this._options.collapse; + if ("boolean" != typeof a) throw new TypeError("collapse() expects a boolean parameter"); + return this._options.collapse === a || ((this._options.collapse = a), void (this.widget && (this.hide(), this.show()))); + }), + (i.prototype.icons = function (b) { + if (0 === arguments.length) return a.extend({}, this._options.icons); + if (!(b instanceof Object)) throw new TypeError("icons() expects parameter to be an Object"); + a.extend(this._options.icons, b), this.widget && (this.hide(), this.show()); + }), + (i.prototype.tooltips = function (b) { + if (0 === arguments.length) return a.extend({}, this._options.tooltips); + if (!(b instanceof Object)) throw new TypeError("tooltips() expects parameter to be an Object"); + a.extend(this._options.tooltips, b), this.widget && (this.hide(), this.show()); + }), + (i.prototype.useStrict = function (a) { + if (0 === arguments.length) return this._options.useStrict; + if ("boolean" != typeof a) throw new TypeError("useStrict() expects a boolean parameter"); + this._options.useStrict = a; + }), + (i.prototype.sideBySide = function (a) { + if (0 === arguments.length) return this._options.sideBySide; + if ("boolean" != typeof a) throw new TypeError("sideBySide() expects a boolean parameter"); + (this._options.sideBySide = a), this.widget && (this.hide(), this.show()); + }), + (i.prototype.viewMode = function (a) { + if (0 === arguments.length) return this._options.viewMode; + if ("string" != typeof a) throw new TypeError("viewMode() expects a string parameter"); + if (i.ViewModes.indexOf(a) === -1) throw new TypeError("viewMode() parameter must be one of (" + i.ViewModes.join(", ") + ") value"); + (this._options.viewMode = a), (this.currentViewMode = Math.max(i.ViewModes.indexOf(a) - 1, i.MinViewModeNumber)), this._showMode(); + }), + (i.prototype.calendarWeeks = function (a) { + if (0 === arguments.length) return this._options.calendarWeeks; + if ("boolean" != typeof a) throw new TypeError("calendarWeeks() expects parameter to be a boolean value"); + (this._options.calendarWeeks = a), this._update(); + }), + (i.prototype.buttons = function (b) { + if (0 === arguments.length) return a.extend({}, this._options.buttons); + if (!(b instanceof Object)) throw new TypeError("buttons() expects parameter to be an Object"); + if ((a.extend(this._options.buttons, b), "boolean" != typeof this._options.buttons.showToday)) throw new TypeError("buttons.showToday expects a boolean parameter"); + if ("boolean" != typeof this._options.buttons.showClear) throw new TypeError("buttons.showClear expects a boolean parameter"); + if ("boolean" != typeof this._options.buttons.showClose) throw new TypeError("buttons.showClose expects a boolean parameter"); + this.widget && (this.hide(), this.show()); + }), + (i.prototype.keepOpen = function (a) { + if (0 === arguments.length) return this._options.keepOpen; + if ("boolean" != typeof a) throw new TypeError("keepOpen() expects a boolean parameter"); + this._options.keepOpen = a; + }), + (i.prototype.focusOnShow = function (a) { + if (0 === arguments.length) return this._options.focusOnShow; + if ("boolean" != typeof a) throw new TypeError("focusOnShow() expects a boolean parameter"); + this._options.focusOnShow = a; + }), + (i.prototype.inline = function (a) { + if (0 === arguments.length) return this._options.inline; + if ("boolean" != typeof a) throw new TypeError("inline() expects a boolean parameter"); + this._options.inline = a; + }), + (i.prototype.clear = function () { + this._setValue(null); + }), + (i.prototype.keyBinds = function (a) { + return 0 === arguments.length ? this._options.keyBinds : void (this._options.keyBinds = a); + }), + (i.prototype.debug = function (a) { + if ("boolean" != typeof a) throw new TypeError("debug() expects a boolean parameter"); + this._options.debug = a; + }), + (i.prototype.allowInputToggle = function (a) { + if (0 === arguments.length) return this._options.allowInputToggle; + if ("boolean" != typeof a) throw new TypeError("allowInputToggle() expects a boolean parameter"); + this._options.allowInputToggle = a; + }), + (i.prototype.keepInvalid = function (a) { + if (0 === arguments.length) return this._options.keepInvalid; + if ("boolean" != typeof a) throw new TypeError("keepInvalid() expects a boolean parameter"); + this._options.keepInvalid = a; + }), + (i.prototype.datepickerInput = function (a) { + if (0 === arguments.length) return this._options.datepickerInput; + if ("string" != typeof a) throw new TypeError("datepickerInput() expects a string parameter"); + this._options.datepickerInput = a; + }), + (i.prototype.parseInputDate = function (a) { + if (0 === arguments.length) return this._options.parseInputDate; + if ("function" != typeof a) throw new TypeError("parseInputDate() should be as function"); + this._options.parseInputDate = a; + }), + (i.prototype.disabledTimeIntervals = function (b) { + if (0 === arguments.length) return this._options.disabledTimeIntervals ? a.extend({}, this._options.disabledTimeIntervals) : this._options.disabledTimeIntervals; + if (!b) return (this._options.disabledTimeIntervals = !1), this._update(), !0; + if (!(b instanceof Array)) throw new TypeError("disabledTimeIntervals() expects an array parameter"); + (this._options.disabledTimeIntervals = b), this._update(); + }), + (i.prototype.disabledHours = function (b) { + if (0 === arguments.length) return this._options.disabledHours ? a.extend({}, this._options.disabledHours) : this._options.disabledHours; + if (!b) return (this._options.disabledHours = !1), this._update(), !0; + if (!(b instanceof Array)) throw new TypeError("disabledHours() expects an array parameter"); + if (((this._options.disabledHours = this._indexGivenHours(b)), (this._options.enabledHours = !1), this._options.useCurrent && !this._options.keepInvalid)) + for (var c = 0; c < this._dates.length; c++) { + for (var d = 0; !this._isValid(this._dates[c], "h");) { + if ((this._dates[c].add(1, "h"), 24 === d)) throw "Tried 24 times to find a valid date"; + d++; + } + this._setValue(this._dates[c], c); + } + this._update(); + }), + (i.prototype.enabledHours = function (b) { + if (0 === arguments.length) return this._options.enabledHours ? a.extend({}, this._options.enabledHours) : this._options.enabledHours; + if (!b) return (this._options.enabledHours = !1), this._update(), !0; + if (!(b instanceof Array)) throw new TypeError("enabledHours() expects an array parameter"); + if (((this._options.enabledHours = this._indexGivenHours(b)), (this._options.disabledHours = !1), this._options.useCurrent && !this._options.keepInvalid)) + for (var c = 0; c < this._dates.length; c++) { + for (var d = 0; !this._isValid(this._dates[c], "h");) { + if ((this._dates[c].add(1, "h"), 24 === d)) throw "Tried 24 times to find a valid date"; + d++; + } + this._setValue(this._dates[c], c); + } + this._update(); + }), + (i.prototype.viewDate = function (a) { + if (0 === arguments.length) return this._viewDate.clone(); + if (!a) return (this._viewDate = (this._dates[0] || this.getMoment()).clone()), !0; + if (!("string" == typeof a || b.isMoment(a) || a instanceof Date)) throw new TypeError("viewDate() parameter must be one of [string, moment or Date]"); + (this._viewDate = this._parseInputDate(a)), this._viewUpdate(); + }), + (i.prototype.allowMultidate = function (a) { + if ("boolean" != typeof a) throw new TypeError("allowMultidate() expects a boolean parameter"); + this._options.allowMultidate = a; + }), + (i.prototype.multidateSeparator = function (a) { + if (0 === arguments.length) return this._options.multidateSeparator; + if ("string" != typeof a || a.length > 1) throw new TypeError("multidateSeparator expects a single character string parameter"); + this._options.multidateSeparator = a; + }), + e(i, null, [ + { + key: "NAME", + get: function () { + return d; + }, + }, + { + key: "VERSION", + get: function () { + return f; + }, + }, + { + key: "DATA_KEY", + get: function () { + return g; + }, + }, + { + key: "EVENT_KEY", + get: function () { + return h; + }, + }, + { + key: "DATA_API_KEY", + get: function () { + return j; + }, + }, + { + key: "DatePickerModes", + get: function () { + return n; + }, + }, + { + key: "ViewModes", + get: function () { + return p; + }, + }, + { + key: "MinViewModeNumber", + get: function () { + return s; + }, + }, + { + key: "Event", + get: function () { + return m; + }, + }, + { + key: "Selector", + get: function () { + return k; + }, + }, + { + key: "Default", + get: function () { + return t; + }, + set: function (a) { + t = a; + }, + }, + { + key: "ClassName", + get: function () { + return l; + }, + }, + ]), + i + ); + })(); + return u; + })(jQuery, moment); + (function (e) { + var g = e.fn[f.NAME], + h = ["top", "bottom", "auto"], + i = ["left", "right", "auto"], + j = ["default", "top", "bottom"], + k = function (a) { + var b = a.data("target"), + c = void 0; + return b || ((b = a.attr("href") || ""), (b = /^#[a-z]/i.test(b) ? b : null)), (c = e(b)), 0 === c.length ? c : (c.data(f.DATA_KEY) || e.extend({}, c.data(), e(this).data()), c); + }, + l = (function (g) { + function k(b, d) { + c(this, k); + var e = a(this, g.call(this, b, d)); + return e._init(), e; + } + return ( + b(k, g), + (k.prototype._init = function () { + if (this._element.hasClass("input-group")) { + var a = this._element.find(".datepickerbutton"); + 0 === a.length ? (this.component = this._element.find(".input-group-append")) : (this.component = a); + } + }), + (k.prototype._getDatePickerTemplate = function () { + var a = e("").append( + e("") + .append(e("").append(e("").append(e("
").addClass("cw").text("#")); b.isBefore(this._viewDate.clone().endOf("w"));)a.append(e("").addClass("dow").text(b.format("dd"))), b.add(1, "d"); this.widget.find(".datepicker-days thead").append(a) }, k.prototype._fillMonths = function () { for (var a = [], b = this._viewDate.clone().startOf("y").startOf("d"); b.isSame(this._viewDate, "y");)a.push(e("").attr("data-action", "selectMonth").addClass("month").text(b.format("MMM"))), b.add(1, "M"); this.widget.find(".datepicker-months td").empty().append(a) }, k.prototype._updateMonths = function () { var a = this.widget.find(".datepicker-months"), b = a.find("th"), c = a.find("tbody").find("span"), d = this; b.eq(0).find("span").attr("title", this._options.tooltips.prevYear), b.eq(1).attr("title", this._options.tooltips.selectYear), b.eq(2).find("span").attr("title", this._options.tooltips.nextYear), a.find(".disabled").removeClass("disabled"), this._isValid(this._viewDate.clone().subtract(1, "y"), "y") || b.eq(0).addClass("disabled"), b.eq(1).text(this._viewDate.year()), this._isValid(this._viewDate.clone().add(1, "y"), "y") || b.eq(2).addClass("disabled"), c.removeClass("active"), this._getLastPickedDate().isSame(this._viewDate, "y") && !this.unset && c.eq(this._getLastPickedDate().month()).addClass("active"), c.each(function (a) { d._isValid(d._viewDate.clone().month(a), "M") || e(this).addClass("disabled") }) }, k.prototype._getStartEndYear = function (a, b) { var c = a / 10, d = Math.floor(b / a) * a, e = d + 9 * c, f = Math.floor(b / c) * c; return [d, e, f] }, k.prototype._updateYears = function () { var a = this.widget.find(".datepicker-years"), b = a.find("th"), c = this._getStartEndYear(10, this._viewDate.year()), d = this._viewDate.clone().year(c[0]), e = this._viewDate.clone().year(c[1]), f = ""; for (b.eq(0).find("span").attr("title", this._options.tooltips.prevDecade), b.eq(1).attr("title", this._options.tooltips.selectDecade), b.eq(2).find("span").attr("title", this._options.tooltips.nextDecade), a.find(".disabled").removeClass("disabled"), this._options.minDate && this._options.minDate.isAfter(d, "y") && b.eq(0).addClass("disabled"), b.eq(1).text(d.year() + "-" + e.year()), this._options.maxDate && this._options.maxDate.isBefore(e, "y") && b.eq(2).addClass("disabled"), f += '' + (d.year() - 1) + ""; !d.isAfter(e, "y");)f += '' + d.year() + "", d.add(1, "y"); f += '' + d.year() + "", a.find("td").html(f) }, k.prototype._updateDecades = function () { var a = this.widget.find(".datepicker-decades"), b = a.find("th"), c = this._getStartEndYear(100, this._viewDate.year()), d = this._viewDate.clone().year(c[0]), e = this._viewDate.clone().year(c[1]), f = !1, g = !1, h = void 0, i = ""; for (b.eq(0).find("span").attr("title", this._options.tooltips.prevCentury), b.eq(2).find("span").attr("title", this._options.tooltips.nextCentury), a.find(".disabled").removeClass("disabled"), (0 === d.year() || this._options.minDate && this._options.minDate.isAfter(d, "y")) && b.eq(0).addClass("disabled"), b.eq(1).text(d.year() + "-" + e.year()), this._options.maxDate && this._options.maxDate.isBefore(e, "y") && b.eq(2).addClass("disabled"), i += d.year() - 10 < 0 ? " " : '' + (d.year() - 10) + ""; !d.isAfter(e, "y");)h = d.year() + 11, f = this._options.minDate && this._options.minDate.isAfter(d, "y") && this._options.minDate.year() <= h, g = this._options.maxDate && this._options.maxDate.isAfter(d, "y") && this._options.maxDate.year() <= h, i += '' + d.year() + "", d.add(10, "y"); i += '' + d.year() + "", a.find("td").html(i) }, k.prototype._fillDate = function () { var a = this.widget.find(".datepicker-days"), b = a.find("th"), c = [], d = void 0, f = void 0, g = void 0, h = void 0; if (this._hasDate()) { for (b.eq(0).find("span").attr("title", this._options.tooltips.prevMonth), b.eq(1).attr("title", this._options.tooltips.selectMonth), b.eq(2).find("span").attr("title", this._options.tooltips.nextMonth), a.find(".disabled").removeClass("disabled"), b.eq(1).text(this._viewDate.format(this._options.dayViewHeaderFormat)), this._isValid(this._viewDate.clone().subtract(1, "M"), "M") || b.eq(0).addClass("disabled"), this._isValid(this._viewDate.clone().add(1, "M"), "M") || b.eq(2).addClass("disabled"), d = this._viewDate.clone().startOf("M").startOf("w").startOf("d"), h = 0; h < 42; h++) { if (0 === d.weekday() && (f = e("
' + d.week() + "' + d.date() + "
' + b.format(this.use24Hours ? "HH" : "hh") + "
' + b.format("mm") + "
' + b.format("ss") + "
").addClass("prev").attr("data-action", "previous").append(e("").addClass(this._options.icons.previous))) + .append( + e("") + .addClass("picker-switch") + .attr("data-action", "pickerSwitch") + .attr("colspan", "" + (this._options.calendarWeeks ? "6" : "5")) + ) + .append(e("").addClass("next").attr("data-action", "next").append(e("").addClass(this._options.icons.next))) + ), + b = e("
").attr("colspan", "" + (this._options.calendarWeeks ? "8" : "7")))); + return [ + e("
") + .addClass("datepicker-days") + .append(e("").addClass("table table-sm").append(a).append(e(""))), + e("
").addClass("datepicker-months").append(e("
").addClass("table-condensed").append(a.clone()).append(b.clone())), + e("
").addClass("datepicker-years").append(e("
").addClass("table-condensed").append(a.clone()).append(b.clone())), + e("
").addClass("datepicker-decades").append(e("
").addClass("table-condensed").append(a.clone()).append(b.clone())), + ]; + }), + (k.prototype._getTimePickerMainTemplate = function () { + var a = e(""), + b = e(""), + c = e(""); + return ( + this._isEnabled("h") && + (a.append( + e("
").append( + e("").attr({ href: "#", tabindex: "-1", title: this._options.tooltips.incrementHour }).addClass("btn").attr("data-action", "incrementHours").append(e("").addClass(this._options.icons.up)) + ) + ), + b.append(e("").append(e("").addClass("timepicker-hour").attr({ "data-time-component": "hours", title: this._options.tooltips.pickHour }).attr("data-action", "showHours"))), + c.append( + e("").append( + e("").attr({ href: "#", tabindex: "-1", title: this._options.tooltips.decrementHour }).addClass("btn").attr("data-action", "decrementHours").append(e("").addClass(this._options.icons.down)) + ) + )), + this._isEnabled("m") && + (this._isEnabled("h") && (a.append(e("").addClass("separator")), b.append(e("").addClass("separator").html(":")), c.append(e("").addClass("separator"))), + a.append( + e("").append( + e("").attr({ href: "#", tabindex: "-1", title: this._options.tooltips.incrementMinute }).addClass("btn").attr("data-action", "incrementMinutes").append(e("").addClass(this._options.icons.up)) + ) + ), + b.append(e("").append(e("").addClass("timepicker-minute").attr({ "data-time-component": "minutes", title: this._options.tooltips.pickMinute }).attr("data-action", "showMinutes"))), + c.append( + e("").append( + e("") + .attr({ href: "#", tabindex: "-1", title: this._options.tooltips.decrementMinute }) + .addClass("btn") + .attr("data-action", "decrementMinutes") + .append(e("").addClass(this._options.icons.down)) + ) + )), + this._isEnabled("s") && + (this._isEnabled("m") && (a.append(e("").addClass("separator")), b.append(e("").addClass("separator").html(":")), c.append(e("").addClass("separator"))), + a.append( + e("").append( + e("").attr({ href: "#", tabindex: "-1", title: this._options.tooltips.incrementSecond }).addClass("btn").attr("data-action", "incrementSeconds").append(e("").addClass(this._options.icons.up)) + ) + ), + b.append(e("").append(e("").addClass("timepicker-second").attr({ "data-time-component": "seconds", title: this._options.tooltips.pickSecond }).attr("data-action", "showSeconds"))), + c.append( + e("").append( + e("") + .attr({ href: "#", tabindex: "-1", title: this._options.tooltips.decrementSecond }) + .addClass("btn") + .attr("data-action", "decrementSeconds") + .append(e("").addClass(this._options.icons.down)) + ) + )), + this.use24Hours || + (a.append(e("").addClass("separator")), + b.append(e("").append(e("").addClass("separator"))), + e("
") + .addClass("timepicker-picker") + .append(e("").addClass("table-condensed").append([a, b, c])) + ); + }), + (k.prototype._getTimePickerTemplate = function () { + var a = e("
").addClass("timepicker-hours").append(e("
").addClass("table-condensed")), + b = e("
").addClass("timepicker-minutes").append(e("
").addClass("table-condensed")), + c = e("
").addClass("timepicker-seconds").append(e("
").addClass("table-condensed")), + d = [this._getTimePickerMainTemplate()]; + return this._isEnabled("h") && d.push(a), this._isEnabled("m") && d.push(b), this._isEnabled("s") && d.push(c), d; + }), + (k.prototype._getToolbar = function () { + var a = []; + return ( + this._options.buttons.showToday && a.push(e("
").append(e("").attr({ "data-action": "today", title: this._options.tooltips.today }).append(e("").addClass(this._options.icons.today)))), + !this._options.sideBySide && + this._hasDate() && + this._hasTime() && + a.push(e("").append(e("").attr({ "data-action": "togglePicker", title: this._options.tooltips.selectTime }).append(e("").addClass(this._options.icons.time)))), + this._options.buttons.showClear && a.push(e("").append(e("").attr({ "data-action": "clear", title: this._options.tooltips.clear }).append(e("").addClass(this._options.icons.clear)))), + this._options.buttons.showClose && a.push(e("").append(e("").attr({ "data-action": "close", title: this._options.tooltips.close }).append(e("").addClass(this._options.icons.close)))), + 0 === a.length + ? "" + : e("") + .addClass("table-condensed") + .append(e("").append(e("").append(a))) + ); + }), + (k.prototype._getTemplate = function () { + var a = e("
").addClass("bootstrap-datetimepicker-widget dropdown-menu"), + b = e("
").addClass("datepicker").append(this._getDatePickerTemplate()), + c = e("
").addClass("timepicker").append(this._getTimePickerTemplate()), + d = e("
    ").addClass("list-unstyled"), + f = e("
  • ") + .addClass("picker-switch" + (this._options.collapse ? " accordion-toggle" : "")) + .append(this._getToolbar()); + return ( + this._options.inline && a.removeClass("dropdown-menu"), + this.use24Hours && a.addClass("usetwentyfour"), + this._isEnabled("s") && !this.use24Hours && a.addClass("wider"), + this._options.sideBySide && this._hasDate() && this._hasTime() + ? (a.addClass("timepicker-sbs"), + "top" === this._options.toolbarPlacement && a.append(f), + a.append(e("
    ").addClass("row").append(b.addClass("col-md-6")).append(c.addClass("col-md-6"))), + ("bottom" !== this._options.toolbarPlacement && "default" !== this._options.toolbarPlacement) || a.append(f), + a) + : ("top" === this._options.toolbarPlacement && d.append(f), + this._hasDate() && + d.append( + e("
  • ") + .addClass(this._options.collapse && this._hasTime() ? "collapse" : "") + .addClass(this._options.collapse && this._hasTime() && "time" === this._options.viewMode ? "" : "show") + .append(b) + ), + "default" === this._options.toolbarPlacement && d.append(f), + this._hasTime() && + d.append( + e("
  • ") + .addClass(this._options.collapse && this._hasDate() ? "collapse" : "") + .addClass(this._options.collapse && this._hasDate() && "time" === this._options.viewMode ? "show" : "") + .append(c) + ), + "bottom" === this._options.toolbarPlacement && d.append(f), + a.append(d)) + ); + }), + (k.prototype._place = function (a) { + var b = (a && a.data && a.data.picker) || this, + c = b._options.widgetPositioning.vertical, + d = b._options.widgetPositioning.horizontal, + f = void 0, + g = (b.component || b._element).position(), + h = (b.component || b._element).offset(); + if (b._options.widgetParent) f = b._options.widgetParent.append(b.widget); + else if (b._element.is("input")) f = b._element.after(b.widget).parent(); + else { + if (b._options.inline) return void (f = b._element.append(b.widget)); + (f = b._element), b._element.children().first().after(b.widget); + } + if ( + ("auto" === c && (c = h.top + 1.5 * b.widget.height() >= e(window).height() + e(window).scrollTop() && b.widget.height() + b._element.outerHeight() < h.top ? "top" : "bottom"), + "auto" === d && (d = f.width() < h.left + b.widget.outerWidth() / 2 && h.left + b.widget.outerWidth() > e(window).width() ? "right" : "left"), + "top" === c ? b.widget.addClass("top").removeClass("bottom") : b.widget.addClass("bottom").removeClass("top"), + "right" === d ? b.widget.addClass("float-right") : b.widget.removeClass("float-right"), + "relative" !== f.css("position") && + (f = f + .parents() + .filter(function () { + return "relative" === e(this).css("position"); + }) + .first()), + 0 === f.length) + ) + throw new Error("datetimepicker component should be placed within a relative positioned container"); + b.widget.css({ + top: "top" === c ? "auto" : g.top + b._element.outerHeight() + "px", + bottom: "top" === c ? f.outerHeight() - (f === b._element ? 0 : g.top) + "px" : "auto", + left: "left" === d ? (f === b._element ? 0 : g.left) + "px" : "auto", + right: "left" === d ? "auto" : f.outerWidth() - b._element.outerWidth() - (f === b._element ? 0 : g.left) + "px", + }); + }), + (k.prototype._fillDow = function () { + var a = e("
"), + b = this._viewDate.clone().startOf("w").startOf("d"); + for (this._options.calendarWeeks === !0 && a.append(e("")), this._options.calendarWeeks && f.append('"), c.push(f)), + (g = ""), + d.isBefore(this._viewDate, "M") && (g += " old"), + d.isAfter(this._viewDate, "M") && (g += " new"), + this._options.allowMultidate) + ) { + var i = this._datesFormatted.indexOf(d.format("YYYY-MM-DD")); + i !== -1 && d.isSame(this._datesFormatted[i], "d") && !this.unset && (g += " active"); + } else d.isSame(this._getLastPickedDate(), "d") && !this.unset && (g += " active"); + this._isValid(d, "d") || (g += " disabled"), + d.isSame(this.getMoment(), "d") && (g += " today"), + (0 !== d.day() && 6 !== d.day()) || (g += " weekend"), + f.append('"), + d.add(1, "d"); + } + a.find("tbody").empty().append(c), this._updateMonths(), this._updateYears(), this._updateDecades(); + } + }), + (k.prototype._fillHours = function () { + var a = this.widget.find(".timepicker-hours table"), + b = this._viewDate.clone().startOf("d"), + c = [], + d = e(""); + for (this._viewDate.hour() > 11 && !this.use24Hours && b.hour(12); b.isSame(this._viewDate, "d") && (this.use24Hours || (this._viewDate.hour() < 12 && b.hour() < 12) || this._viewDate.hour() > 11);) + b.hour() % 4 === 0 && ((d = e("")), c.push(d)), + d.append('"), + b.add(1, "h"); + a.empty().append(c); + }), + (k.prototype._fillMinutes = function () { + for ( + var a = this.widget.find(".timepicker-minutes table"), b = this._viewDate.clone().startOf("h"), c = [], d = 1 === this._options.stepping ? 5 : this._options.stepping, f = e(""); + this._viewDate.isSame(b, "h"); + + ) + b.minute() % (4 * d) === 0 && ((f = e("")), c.push(f)), f.append('"), b.add(d, "m"); + a.empty().append(c); + }), + (k.prototype._fillSeconds = function () { + for (var a = this.widget.find(".timepicker-seconds table"), b = this._viewDate.clone().startOf("m"), c = [], d = e(""); this._viewDate.isSame(b, "m");) + b.second() % 20 === 0 && ((d = e("")), c.push(d)), d.append('"), b.add(5, "s"); + a.empty().append(c); + }), + (k.prototype._fillTime = function () { + var a = void 0, + b = void 0, + c = this.widget.find(".timepicker span[data-time-component]"); + this.use24Hours || + ((a = this.widget.find(".timepicker [data-action=togglePeriod]")), + (b = this._getLastPickedDate() + .clone() + .add(this._getLastPickedDate().hours() >= 12 ? -12 : 12, "h")), + a.text(this._getLastPickedDate().format("A")), + this._isValid(b, "h") ? a.removeClass("disabled") : a.addClass("disabled")), + c.filter("[data-time-component=hours]").text(this._getLastPickedDate().format("" + (this.use24Hours ? "HH" : "hh"))), + c.filter("[data-time-component=minutes]").text(this._getLastPickedDate().format("mm")), + c.filter("[data-time-component=seconds]").text(this._getLastPickedDate().format("ss")), + this._fillHours(), + this._fillMinutes(), + this._fillSeconds(); + }), + (k.prototype._doAction = function (a, b) { + var c = this._getLastPickedDate(); + if (e(a.currentTarget).is(".disabled")) return !1; + switch ((b = b || e(a.currentTarget).data("action"))) { + case "next": + var d = f.DatePickerModes[this.currentViewMode].NAV_FUNCTION; + this._viewDate.add(f.DatePickerModes[this.currentViewMode].NAV_STEP, d), this._fillDate(), this._viewUpdate(d); + break; + case "previous": + var g = f.DatePickerModes[this.currentViewMode].NAV_FUNCTION; + this._viewDate.subtract(f.DatePickerModes[this.currentViewMode].NAV_STEP, g), this._fillDate(), this._viewUpdate(g); + break; + case "pickerSwitch": + this._showMode(1); + break; + case "selectMonth": + var h = e(a.target).closest("tbody").find("span").index(e(a.target)); + this._viewDate.month(h), + this.currentViewMode === f.MinViewModeNumber + ? (this._setValue(c.clone().year(this._viewDate.year()).month(this._viewDate.month()), this._getLastPickedDateIndex()), this._options.inline || this.hide()) + : (this._showMode(-1), this._fillDate()), + this._viewUpdate("M"); + break; + case "selectYear": + var i = parseInt(e(a.target).text(), 10) || 0; + this._viewDate.year(i), + this.currentViewMode === f.MinViewModeNumber + ? (this._setValue(c.clone().year(this._viewDate.year()), this._getLastPickedDateIndex()), this._options.inline || this.hide()) + : (this._showMode(-1), this._fillDate()), + this._viewUpdate("YYYY"); + break; + case "selectDecade": + var j = parseInt(e(a.target).data("selection"), 10) || 0; + this._viewDate.year(j), + this.currentViewMode === f.MinViewModeNumber + ? (this._setValue(c.clone().year(this._viewDate.year()), this._getLastPickedDateIndex()), this._options.inline || this.hide()) + : (this._showMode(-1), this._fillDate()), + this._viewUpdate("YYYY"); + break; + case "selectDay": + var k = this._viewDate.clone(); + e(a.target).is(".old") && k.subtract(1, "M"), + e(a.target).is(".new") && k.add(1, "M"), + this._setValue(k.date(parseInt(e(a.target).text(), 10)), this._getLastPickedDateIndex()), + this._hasTime() || this._options.keepOpen || this._options.inline || this.hide(); + break; + case "incrementHours": + var l = c.clone().add(1, "h"); + this._isValid(l, "h") && this._setValue(l, this._getLastPickedDateIndex()); + break; + case "incrementMinutes": + var m = c.clone().add(this._options.stepping, "m"); + this._isValid(m, "m") && this._setValue(m, this._getLastPickedDateIndex()); + break; + case "incrementSeconds": + var n = c.clone().add(1, "s"); + this._isValid(n, "s") && this._setValue(n, this._getLastPickedDateIndex()); + break; + case "decrementHours": + var o = c.clone().subtract(1, "h"); + this._isValid(o, "h") && this._setValue(o, this._getLastPickedDateIndex()); + break; + case "decrementMinutes": + var p = c.clone().subtract(this._options.stepping, "m"); + this._isValid(p, "m") && this._setValue(p, this._getLastPickedDateIndex()); + break; + case "decrementSeconds": + var q = c.clone().subtract(1, "s"); + this._isValid(q, "s") && this._setValue(q, this._getLastPickedDateIndex()); + break; + case "togglePeriod": + this._setValue(c.clone().add(c.hours() >= 12 ? -12 : 12, "h"), this._getLastPickedDateIndex()); + break; + case "togglePicker": + var r = e(a.target), + s = r.closest("a"), + t = r.closest("ul"), + u = t.find(".show"), + v = t.find(".collapse:not(.show)"), + w = r.is("span") ? r : r.find("span"), + x = void 0; + if (u && u.length) { + if (((x = u.data("collapse")), x && x.transitioning)) return !0; + u.collapse ? (u.collapse("hide"), v.collapse("show")) : (u.removeClass("show"), v.addClass("show")), + w.toggleClass(this._options.icons.time + " " + this._options.icons.date), + w.hasClass(this._options.icons.date) ? s.attr("title", this._options.tooltips.selectDate) : s.attr("title", this._options.tooltips.selectTime); + } + break; + case "showPicker": + this.widget.find(".timepicker > div:not(.timepicker-picker)").hide(), this.widget.find(".timepicker .timepicker-picker").show(); + break; + case "showHours": + this.widget.find(".timepicker .timepicker-picker").hide(), this.widget.find(".timepicker .timepicker-hours").show(); + break; + case "showMinutes": + this.widget.find(".timepicker .timepicker-picker").hide(), this.widget.find(".timepicker .timepicker-minutes").show(); + break; + case "showSeconds": + this.widget.find(".timepicker .timepicker-picker").hide(), this.widget.find(".timepicker .timepicker-seconds").show(); + break; + case "selectHour": + var y = parseInt(e(a.target).text(), 10); + this.use24Hours || (c.hours() >= 12 ? 12 !== y && (y += 12) : 12 === y && (y = 0)), this._setValue(c.clone().hours(y), this._getLastPickedDateIndex()), this._doAction(a, "showPicker"); + break; + case "selectMinute": + this._setValue(c.clone().minutes(parseInt(e(a.target).text(), 10)), this._getLastPickedDateIndex()), this._doAction(a, "showPicker"); + break; + case "selectSecond": + this._setValue(c.clone().seconds(parseInt(e(a.target).text(), 10)), this._getLastPickedDateIndex()), this._doAction(a, "showPicker"); + break; + case "clear": + this.clear(); + break; + case "today": + var z = this.getMoment(); + this._isValid(z, "d") && this._setValue(z, this._getLastPickedDateIndex()); + } + return !1; + }), + (k.prototype.hide = function () { + var a = !1; + this.widget && + (this.widget.find(".collapse").each(function () { + var b = e(this).data("collapse"); + return !b || !b.transitioning || ((a = !0), !1); + }), + a || + (this.component && this.component.hasClass("btn") && this.component.toggleClass("active"), + this.widget.hide(), + e(window).off("resize", this._place()), + this.widget.off("click", "[data-action]"), + this.widget.off("mousedown", !1), + this.widget.remove(), + (this.widget = !1), + this._notifyEvent({ type: f.Event.HIDE, date: this._getLastPickedDate().clone() }), + void 0 !== this.input && this.input.blur(), + (this._viewDate = this._getLastPickedDate().clone()))); + }), + (k.prototype.show = function () { + var a = void 0, + b = { + year: function (a) { + return a.month(0).date(1).hours(0).seconds(0).minutes(0); + }, + month: function (a) { + return a.date(1).hours(0).seconds(0).minutes(0); + }, + day: function (a) { + return a.hours(0).seconds(0).minutes(0); + }, + hour: function (a) { + return a.seconds(0).minutes(0); + }, + minute: function (a) { + return a.seconds(0); + }, + }; + if (void 0 !== this.input) { + if (this.input.prop("disabled") || (!this._options.ignoreReadonly && this.input.prop("readonly")) || this.widget) return; + void 0 !== this.input.val() && 0 !== this.input.val().trim().length + ? this._setValue(this._parseInputDate(this.input.val().trim()), 0) + : this.unset && this._options.useCurrent && ((a = this.getMoment()), "string" == typeof this._options.useCurrent && (a = b[this._options.useCurrent](a)), this._setValue(a, 0)); + } else this.unset && this._options.useCurrent && ((a = this.getMoment()), "string" == typeof this._options.useCurrent && (a = b[this._options.useCurrent](a)), this._setValue(a, 0)); + (this.widget = this._getTemplate()), + this._fillDow(), + this._fillMonths(), + this.widget.find(".timepicker-hours").hide(), + this.widget.find(".timepicker-minutes").hide(), + this.widget.find(".timepicker-seconds").hide(), + this._update(), + this._showMode(), + e(window).on("resize", { picker: this }, this._place), + this.widget.on("click", "[data-action]", e.proxy(this._doAction, this)), + this.widget.on("mousedown", !1), + this.component && this.component.hasClass("btn") && this.component.toggleClass("active"), + this._place(), + this.widget.show(), + void 0 !== this.input && this._options.focusOnShow && !this.input.is(":focus") && this.input.focus(), + this._notifyEvent({ type: f.Event.SHOW }); + }), + (k.prototype.destroy = function () { + this.hide(), this._element.removeData(f.DATA_KEY), this._element.removeData("date"); + }), + (k.prototype.disable = function () { + this.hide(), this.component && this.component.hasClass("btn") && this.component.addClass("disabled"), void 0 !== this.input && this.input.prop("disabled", !0); + }), + (k.prototype.enable = function () { + this.component && this.component.hasClass("btn") && this.component.removeClass("disabled"), void 0 !== this.input && this.input.prop("disabled", !1); + }), + (k.prototype.toolbarPlacement = function (a) { + if (0 === arguments.length) return this._options.toolbarPlacement; + if ("string" != typeof a) throw new TypeError("toolbarPlacement() expects a string parameter"); + if (j.indexOf(a) === -1) throw new TypeError("toolbarPlacement() parameter must be one of (" + j.join(", ") + ") value"); + (this._options.toolbarPlacement = a), this.widget && (this.hide(), this.show()); + }), + (k.prototype.widgetPositioning = function (a) { + if (0 === arguments.length) return e.extend({}, this._options.widgetPositioning); + if ("[object Object]" !== {}.toString.call(a)) throw new TypeError("widgetPositioning() expects an object variable"); + if (a.horizontal) { + if ("string" != typeof a.horizontal) throw new TypeError("widgetPositioning() horizontal variable must be a string"); + if (((a.horizontal = a.horizontal.toLowerCase()), i.indexOf(a.horizontal) === -1)) throw new TypeError("widgetPositioning() expects horizontal parameter to be one of (" + i.join(", ") + ")"); + this._options.widgetPositioning.horizontal = a.horizontal; + } + if (a.vertical) { + if ("string" != typeof a.vertical) throw new TypeError("widgetPositioning() vertical variable must be a string"); + if (((a.vertical = a.vertical.toLowerCase()), h.indexOf(a.vertical) === -1)) throw new TypeError("widgetPositioning() expects vertical parameter to be one of (" + h.join(", ") + ")"); + this._options.widgetPositioning.vertical = a.vertical; + } + this._update(); + }), + (k.prototype.widgetParent = function (a) { + if (0 === arguments.length) return this._options.widgetParent; + if (("string" == typeof a && (a = e(a)), null !== a && "string" != typeof a && !(a instanceof e))) throw new TypeError("widgetParent() expects a string or a jQuery object parameter"); + (this._options.widgetParent = a), this.widget && (this.hide(), this.show()); + }), + (k._jQueryHandleThis = function (a, b, c) { + var g = e(a).data(f.DATA_KEY); + if (("object" === ("undefined" == typeof b ? "undefined" : d(b)) && e.extend({}, f.Default, b), g || ((g = new k(e(a), b)), e(a).data(f.DATA_KEY, g)), "string" == typeof b)) { + if (void 0 === g[b]) throw new Error('No method named "' + b + '"'); + return void 0 === c ? g[b]() : g[b](c); + } + }), + (k._jQueryInterface = function (a, b) { + return 1 === this.length + ? k._jQueryHandleThis(this[0], a, b) + : this.each(function () { + k._jQueryHandleThis(this, a, b); + }); + }), + k + ); + })(f); + return ( + e(document) + .on(f.Event.CLICK_DATA_API, f.Selector.DATA_TOGGLE, function () { + var a = k(e(this)); + 0 !== a.length && l._jQueryInterface.call(a, "toggle"); + }) + .on(f.Event.CHANGE, "." + f.ClassName.INPUT, function (a) { + var b = k(e(this)); + 0 !== b.length && l._jQueryInterface.call(b, "_change", a); + }) + .on(f.Event.BLUR, "." + f.ClassName.INPUT, function (a) { + var b = k(e(this)), + c = b.data(f.DATA_KEY); + 0 !== b.length && (c._options.debug || window.debug || l._jQueryInterface.call(b, "hide", a)); + }) + .on(f.Event.KEYDOWN, "." + f.ClassName.INPUT, function (a) { + var b = k(e(this)); + 0 !== b.length && l._jQueryInterface.call(b, "_keydown", a); + }) + .on(f.Event.KEYUP, "." + f.ClassName.INPUT, function (a) { + var b = k(e(this)); + 0 !== b.length && l._jQueryInterface.call(b, "_keyup", a); + }) + .on(f.Event.FOCUS, "." + f.ClassName.INPUT, function (a) { + var b = k(e(this)), + c = b.data(f.DATA_KEY); + 0 !== b.length && c._options.allowInputToggle && l._jQueryInterface.call(b, c, a); + }), + (e.fn[f.NAME] = l._jQueryInterface), + (e.fn[f.NAME].Constructor = l), + (e.fn[f.NAME].noConflict = function () { + return (e.fn[f.NAME] = g), l._jQueryInterface; + }), + l + ); + })(jQuery); +})(); diff --git a/BeWoPlanerMobil/Views/Main/Main.cshtml b/BeWoPlanerMobil/Views/Main/Main.cshtml index 3494dfe72..c21afd3b2 100644 --- a/BeWoPlanerMobil/Views/Main/Main.cshtml +++ b/BeWoPlanerMobil/Views/Main/Main.cshtml @@ -129,7 +129,7 @@ var selectedOid = 0; if (serviceDescriptionToEdit > 0) { - $("#" + leistungSelectId+" > option").each(function() { + $("#" + leistungSelectId + " > option").each(function() { var val = $(this).val(); if (serviceDescriptionToEdit == val) { diff --git a/BeWoPlanerMobil/Views/Report/Report.cshtml b/BeWoPlanerMobil/Views/Report/Report.cshtml index 2311fcd2d..f47c9a275 100644 --- a/BeWoPlanerMobil/Views/Report/Report.cshtml +++ b/BeWoPlanerMobil/Views/Report/Report.cshtml @@ -315,12 +315,9 @@
- @if(Html.IsInDebugMode()) - { - - } +
diff --git a/BeWoPlanerMobil/Views/Shared/_Layout.cshtml b/BeWoPlanerMobil/Views/Shared/_Layout.cshtml index db3ef2887..44f49e0b9 100644 --- a/BeWoPlanerMobil/Views/Shared/_Layout.cshtml +++ b/BeWoPlanerMobil/Views/Shared/_Layout.cshtml @@ -41,7 +41,8 @@ - + @**@ + @@ -71,7 +72,7 @@ - +
").addClass("cw").text("#")); b.isBefore(this._viewDate.clone().endOf("w"));) a.append(e("").addClass("dow").text(b.format("dd"))), b.add(1, "d"); + this.widget.find(".datepicker-days thead").append(a); + }), + (k.prototype._fillMonths = function () { + for (var a = [], b = this._viewDate.clone().startOf("y").startOf("d"); b.isSame(this._viewDate, "y");) a.push(e("").attr("data-action", "selectMonth").addClass("month").text(b.format("MMM"))), b.add(1, "M"); + this.widget.find(".datepicker-months td").empty().append(a); + }), + (k.prototype._updateMonths = function () { + var a = this.widget.find(".datepicker-months"), + b = a.find("th"), + c = a.find("tbody").find("span"), + d = this; + b.eq(0).find("span").attr("title", this._options.tooltips.prevYear), + b.eq(1).attr("title", this._options.tooltips.selectYear), + b.eq(2).find("span").attr("title", this._options.tooltips.nextYear), + a.find(".disabled").removeClass("disabled"), + this._isValid(this._viewDate.clone().subtract(1, "y"), "y") || b.eq(0).addClass("disabled"), + b.eq(1).text(this._viewDate.year()), + this._isValid(this._viewDate.clone().add(1, "y"), "y") || b.eq(2).addClass("disabled"), + c.removeClass("active"), + this._getLastPickedDate().isSame(this._viewDate, "y") && !this.unset && c.eq(this._getLastPickedDate().month()).addClass("active"), + c.each(function (a) { + d._isValid(d._viewDate.clone().month(a), "M") || e(this).addClass("disabled"); + }); + }), + (k.prototype._getStartEndYear = function (a, b) { + var c = a / 10, + d = Math.floor(b / a) * a, + e = d + 9 * c, + f = Math.floor(b / c) * c; + return [d, e, f]; + }), + (k.prototype._updateYears = function () { + var a = this.widget.find(".datepicker-years"), + b = a.find("th"), + c = this._getStartEndYear(10, this._viewDate.year()), + d = this._viewDate.clone().year(c[0]), + e = this._viewDate.clone().year(c[1]), + f = ""; + for ( + b.eq(0).find("span").attr("title", this._options.tooltips.prevDecade), + b.eq(1).attr("title", this._options.tooltips.selectDecade), + b.eq(2).find("span").attr("title", this._options.tooltips.nextDecade), + a.find(".disabled").removeClass("disabled"), + this._options.minDate && this._options.minDate.isAfter(d, "y") && b.eq(0).addClass("disabled"), + b.eq(1).text(d.year() + "-" + e.year()), + this._options.maxDate && this._options.maxDate.isBefore(e, "y") && b.eq(2).addClass("disabled"), + f += '' + (d.year() - 1) + ""; + !d.isAfter(e, "y"); + + ) + (f += '' + d.year() + ""), + d.add(1, "y"); + (f += '' + d.year() + ""), a.find("td").html(f); + }), + (k.prototype._updateDecades = function () { + var a = this.widget.find(".datepicker-decades"), + b = a.find("th"), + c = this._getStartEndYear(100, this._viewDate.year()), + d = this._viewDate.clone().year(c[0]), + e = this._viewDate.clone().year(c[1]), + f = !1, + g = !1, + h = void 0, + i = ""; + for ( + b.eq(0).find("span").attr("title", this._options.tooltips.prevCentury), + b.eq(2).find("span").attr("title", this._options.tooltips.nextCentury), + a.find(".disabled").removeClass("disabled"), + (0 === d.year() || (this._options.minDate && this._options.minDate.isAfter(d, "y"))) && b.eq(0).addClass("disabled"), + b.eq(1).text(d.year() + "-" + e.year()), + this._options.maxDate && this._options.maxDate.isBefore(e, "y") && b.eq(2).addClass("disabled"), + i += d.year() - 10 < 0 ? " " : '' + (d.year() - 10) + ""; + !d.isAfter(e, "y"); + + ) + (h = d.year() + 11), + (f = this._options.minDate && this._options.minDate.isAfter(d, "y") && this._options.minDate.year() <= h), + (g = this._options.maxDate && this._options.maxDate.isAfter(d, "y") && this._options.maxDate.year() <= h), + (i += + '' + + d.year() + + ""), + d.add(10, "y"); + (i += '' + d.year() + ""), a.find("td").html(i); + }), + (k.prototype._fillDate = function () { + var a = this.widget.find(".datepicker-days"), + b = a.find("th"), + c = [], + d = void 0, + f = void 0, + g = void 0, + h = void 0; + if (this._hasDate()) { + for ( + b.eq(0).find("span").attr("title", this._options.tooltips.prevMonth), + b.eq(1).attr("title", this._options.tooltips.selectMonth), + b.eq(2).find("span").attr("title", this._options.tooltips.nextMonth), + a.find(".disabled").removeClass("disabled"), + b.eq(1).text(this._viewDate.format(this._options.dayViewHeaderFormat)), + this._isValid(this._viewDate.clone().subtract(1, "M"), "M") || b.eq(0).addClass("disabled"), + this._isValid(this._viewDate.clone().add(1, "M"), "M") || b.eq(2).addClass("disabled"), + d = this._viewDate.clone().startOf("M").startOf("w").startOf("d"), + h = 0; + h < 42; + h++ + ) { + if ( + (0 === d.weekday() && ((f = e("
' + d.week() + "' + d.date() + "
' + b.format(this.use24Hours ? "HH" : "hh") + "
' + b.format("mm") + "
' + b.format("ss") + "