1"use strict";(self.webpackChunkmvv_energie=self.webpackChunkmvv_energie||[]).push([[5329],{3500(t,e,i){i.r(e),i.d(e,{default:()=>s});i(4423),i(7495),i(8781),i(1699),i(1761),i(8992),i(2577),i(3949);var a=i(4692),n=i.n(a),l=(i(3431),i(5546),i(411));let o=null;const s=new class{constructor(){if(o)return o;this.datepickerInput={},this.dateFormat="mm/dd/yy";let t="en";n()("body").hasClass("lang-0")&&(t="de",this.dateFormat="dd.mm.yy"),n().datepicker.setDefaults(n().datepicker.regional[t]),this._initializeItems(),n()("body").on("bb-form-items-changed",()=>{this._initializeItems()}),l.A.load(n()(".appointmentSlot").length,l.A.modules.selectComponent,t=>{this.selectComponent=t,t.selectInputs.forEach(t=>{n()(t.element).find("input").hasClass("appointmentSlot")&&(this.appointmentSlotSelect=t)})}),o=this}_initializeItems(){n()(".datepicker__holder input").each((t,e)=>{if(!n()(e).data("initialized")&&(n()(e).datepicker({dateFormat:this.dateFormat,changeMonth:!0,changeYear:!0,yearRange:"-100:+100",beforeShowDay:function(t){let i=!0,a=!1,l="",o=[],s=[];if(n()(e).data("appointmenttype")){l=n()(e).data("appointmenttype"),a=!0;let t=n()(e).data("appointmentdata");o=n()(e).data("holidays");for(let e=0;e<t.length;e++)s.push(t[e].date)}return a&&("globalAppointment"===l?(0!==t.getDay()&&6!==t.getDay()||(i=!1),n().inArray(t.getTime(),o)>-1&&(i=!1)):"eventAppointment"===l&&(i=!1,n().inArray(t.getTime(),s)>-1&&(i=!0))),[i]},beforeShow:(t,e)=>{this.datepickerInput[t.id]||(this.datepickerInput[t.id]={}),this.datepickerInput[t.id].empty=""===e.input.val(),this.datepickerInput[t.id].isOpen=!0;let i=e.input.closest("fieldset");i.find(".mdc-floating-label").length&&i.find(".mdc-floating-label").addClass("mdc-floating-label--float-above")},onSelect:(t,e)=>{let i,a=e.input.closest("fieldset");this.datepickerInput[e.input[0].id].empty=""===e.input.val();let l="",o=!1,s=[],d="",p=[],r=e.input.data("appointmenttype");if(a.find(".mdc-floating-label").length&&""!==t&&a.find(".mdc-floating-label").addClass("mdc-floating-label--float-above"),"globalAppointment"===r?(o=!0,l="isGlobalAppointment"):"eventAppointment"===r&&(o=!0,l="isEventAppointment"),o){const o=e.input.closest("form").find("."+l);if(this.selectComponent.selectInputs.forEach(t=>{n()(t.element).find("input").attr("id")===o.attr("id")&&n()(t.element).find("input").hasClass(l)&&(this.appointmentSlotSelect=t)}),"dd.mm.yy"===this.dateFormat){let e=t.match(/(\d+)/g);t=e[2]+"/"+e[1]+"/"+e[0]}i=a.closest(".datepicker").find(".appointmentDateUid"),s=e.input.data("appointmentdata"),this.selectedDate!==new Date(t).getTime()&&(this.appointmentSlotSelect.foundation_.adapter_.setSelectedIndex(-1),this.appointmentSlotSelect.foundation_.adapter_.floatLabel(!1),this.selectedDate=new Date(t).getTime(),"eventAppointment"===e.input.data("appointmenttype")?(p=s.find(t=>t.date===this.selectedDate),p.timeSlots.forEach(t=>{d+='<li class="mdc-list-item" data-value="'+t.slotUid+'">'+t.slot+"</li>"})):"globalAppointment"===e.input.data("appointmenttype")&&(p=s[0],this.selectedDate===p.dateToday?p.timeSlotsToday.forEach(t=>{d+='<li class="mdc-list-item" data-value="'+t.slotUid+'">'+t.slot+"</li>"}):Object.keys(p.timeSlotsForBookings).includes(this.selectedDate.toString())?Object.values(p.timeSlotsForBookings[this.selectedDate].timeSlots).forEach(t=>{d+='<li class="mdc-list-item" data-value="'+t.slotUid+'">'+t.slot+"</li>"}):p.timeSlots.forEach(t=>{d+='<li class="mdc-list-item" data-value="'+t.slotUid+'">'+t.slot+"</li>"})),n()(this.appointmentSlotSelect.menu_.list_.root_).find("li").remove(),n()(this.appointmentSlotSelect.menu_.list_.root_).append(d),this.appointmentSlotSelect.layout(),i.val(p.appointmentDateUid))}
1this._validate(e.input[0])},onClose:(t,e)=>{this.datepickerInput[e.input[0].id].empty=""===e.input.val(),this.datepickerInput[e.input[0].id].isOpen=!1}}),n()(e).data("appointmenttype")&&"globalAppointment"===n()(e).data("appointmenttype"))){let t=new Date;n()(e).datepicker("option","minDate",t)}n()(e).data("initialized",!0)})}_validate(t){if(!n()(t).prop("required")&&""===n()(t).val())return!0;let e;const i=n()(t).closest(".mdc-text-field").parent(),a=i.find(".bb-inputfield__error-text");try{e=(n()(t).hasClass("appointmentDate"),!!n().datepicker.parseDate(this.dateFormat,t.value))}catch(t){e=!1}return e?(i.addClass("valid").removeClass("error"),n()(t).removeAttr("aria-invalid"),a.text(""),i.find(".error-msg").slideUp()):(i.addClass("error").removeClass("valid"),n()(t).attr("aria-invalid",!0),a.text(a.data("errormsg")),i.find(".error-msg").slideDown()),e}validate(t){return this._validate(t)}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.