1"use strict";(self.webpackChunkevo=self.webpackChunkevo||[]).push([[325],{7676(e,t,r){r.r(t),r.d(t,{default:()=>a});var o=r(4692),i=r.n(o),s=r(411),l=r(4346);const a=class{constructor(){this._initializeFormItems(),i()("body").on("bb-form-items-changed",()=>{this._initializeFormItems()}).on("submit","form",e=>{const t=i()(e.target).closest("form")[0];t.classList.contains("js-submit")&&e.preventDefault();const r=this._validate(t,e),o=document.querySelector(`.form__error-overview[data-formid=${t.id||void 0}]`);let s=i().Event("onFormSubmit",{isValid:0===r});i()(t).trigger(s),r>0?(e.preventDefault(),t.classList.add("has-error"),o&&(o.innerText=r>1?o.dataset.plmsg.replace("BB_COUNT",r.toString()):o.dataset.sglmsg,this._scrollToError(o),o.focus())):(t.classList.remove("has-error"),this._changeFileToText(t),i()(t).data("ajaxuri")&&(e.preventDefault(),this._sendAjaxForm(t,e)))})}_initializeFormItems(){s.A.load(i()(".bb-multiselect").length,s.A.modules.multiselectComponent,e=>{this.multiselect=e}),s.A.load(i()(".mdc-select").length,s.A.modules.selectComponent,e=>{this.select=e}),s.A.load(i()(".mdc-text-field").length,s.A.modules.inputFieldComponent,e=>{this.input=e}),s.A.load(i()(".mdc-checkbox").length,s.A.modules.checkboxComponent,e=>{this.checkbox=e}),s.A.load(i()(".mdc-radio").length,s.A.modules.radiofieldComponent,e=>{this.radio=e}),s.A.load(i()(".button-select-file").length,s.A.modules.fileUploadComponent,e=>{this.fileUpload=e}),s.A.load(i()(".bb-datepicker").length,s.A.modules.datepickerComponent,e=>{this.datepicker=e})}_validate(e,t){let r=0,o=!1;if(!0===this._getFormSubmitter(t)?.formNoValidate)return r;const s=(e,t)=>{let r=e.querySelector("input")||e.querySelector("textarea");if(!i()(r).is(":visible"))return!0;if(i()(t).parent().hasClass("bb-datepicker")&&!r.pattern)return this.datepicker.validate(r);let o=this.input.validate(r);return"password"===r.getAttribute("type")&&r.getAttribute("data-confirm")&&(o=this.input.validatePasswordConfirm(r)),o};return e.querySelectorAll(".form-element-wrapper").forEach(t=>{t.querySelectorAll(".mdc-text-field").forEach(e=>{s(e,t)||r++});[{selector:".mdc-select",validator:this.select,inputSelector:"input"},{selector:".radio-holder",validator:this.radio},{selector:".checkbox-holder",validator:this.checkbox},{selector:".button-select-file",validator:this.fileUpload},{selector:".multiselect--holder",validator:this.multiselect}].forEach(({selector:e,validator:o,inputSelector:i})=>{const s=t.querySelector(e);if(s){const e=i?s.querySelector(i):t;o.validate(e)||r++}}),t.classList.contains("error")&&!o&&i()(t).closest(".bb-tarifrechner-sticky, .bb-tarifrechner-head, .bb-tarifrechner-start").length<1&&(o=!0,e.querySelector(".form__error-overview")||this._scrollToError(t))}),r}_scrollToError(e){if(i()(e).parents(".bb-overlay").length)return;let t=i()(e).offset().top-(i()("#bb-header").length?i()("#bb-header")[0].offsetHeight:0)-10;i()("html, body").animate({scrollTop:t+"px"},700),e.focus()}_getFormSubmitter(e){return e.originalEvent?.submitter??e.submitter??null}_sendAjaxForm(e,t){i()(e).find(".form__submit").css("pointer-events","none"),i()(e).find('button[type="submit"]').css("pointer-events","none");const r=this._getFormSubmitter(t);let o=i()(e).serialize();if(r&&r.form===e&&!r.disabled&&"string"==typeof r.name&&r.name.length>0){o+=`${o?"&":""}${encodeURIComponent(r.name)}=${encodeURIComponent(String(r.value??""))}`}i().ajax({type:"POST",url:i()(e).data("ajaxuri"),data:o,success:t=>{const r=i()(e).closest(".frame-type-form_formframework"),o=i()(e).attr("id")||"Formular ID nicht definiert";if((0,l.sx)("Formular","Abgesendet",o),(0,l.mO)("submit_form","id",o),"redirect"===(t=t.replace(/(\r\n|\n|\r|\t)/g,""))&&i()(e).data("redirecturl")&&""!==i()(e).data("redirecturl"))location.href=i()(e).data("redirecturl");else if(i()(t).find(".bb-form-message--success").length>0)r.animate({opacity:0}
1,250,()=>{const e=r.height();r.html(t);const o=r.height();r.css("height",e+"px"),r.animate({opacity:1,height:o+"px"},350,()=>{r.removeAttr("style")})});else{const o=i()(e).data("redirecturl");r.html(t),o&&""!==o&&r.find("form").attr("data-redirecturl",o),i()("body").trigger("bb-form-items-changed"),window.document.dispatchEvent(new Event("DOMContentLoaded",{bubbles:!0,cancelable:!0}))}const s=r?.length?r:i()(".frame-type-form_formframework:visible"),a=i()("#bb-header"),n=a.length?a[0].offsetHeight:0,c=s.offset().top-20-n;i()("html, body").stop().animate({scrollTop:c+"px"},700)},error:(t,r)=>{i()(e).find(".form__submit").removeAttr("style"),i()(e).find('button[type="submit"]').css("style")}})}_changeFileToText(e){const t=e.getElementsByClassName("base64-element");t&&[...t].forEach(e=>{e.type="text"})}}}}]);
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.