1import{f as k}from"./filter-CpJdSvza.js";import{i as y}from"./isNil-gbq21CaE.js";import{u as U}from"./uniq-CUWmeAD_.js";import{t as $,V as L,S as B,W as w,P as n,M as F,Q as N,C,_ as P,n as g,p as b,z as s,y as p,ag as v,B as m,ah as A,X as M,$ as R,I as E,aa as j,x as G,F as q,q as z}from"./main-jB1Kct5u.js";import{B as _}from"./BaseComponent.vue_vue_type_script_lang-DrDjpCzM.js";import{h as Z}from"./handleFormEvents-CmrYhJU0.js";import{v as h}from"./index-ivAdeqHu.js";import{F as K}from"./Frontend-pEgPMGz9.js";var Q=Object.defineProperty,W=Object.getOwnPropertyDescriptor,f=(e,t,a,l)=>{for(var r=l>1?void 0:l?W(t,a):t,o=e.length-1,i;o>=0;o--)(i=e[o])&&(r=(l?i(t,a,r):i(r))||r);return l&&r&&Q(t,a,r),r};let d=class extends L{constructor(){super(...arguments),this.Step=S,this.firstnameVal="",this.lastnameVal="",this.phoneVal="",this.mailVal="",this.streetVal="",this.streetnumberVal="",this.postalcodeVal="",this.cityVal="",this.consent01=!1,this.attemptSubmit=!1,this.submitSuccessfull=!1,this.sendingRequest=!1}mounted(){this.$nextTick(()=>Z(this.$eventManager,this.$refs.form,"Order List Form"))}get validatefirstname(){return!h.isEmpty(this.firstnameVal)}get validatelastname(){return!h.isEmpty(this.lastnameVal)}get validatephone(){return!0}get validatemail(){return!h.isEmpty(this.mailVal)&&h.isEmail(this.mailVal)}get validatestreet(){return!h.isEmpty(this.streetVal)}get validatestreetnumber(){return!h.isEmpty(this.streetnumberVal)}get validatepostalcode(){return!h.isEmpty(this.postalcodeVal)&&h.isPostalCode(this.postalcodeVal,"DE")}get validatecity(){return!h.isEmpty(this.cityVal)}reset(){this.step===S.ORDER&&(this.firstnameVal="",this.lastnameVal="",this.phoneVal="",this.mailVal="",this.streetVal="",this.streetnumberVal="",this.postalcodeVal="",this.cityVal="",this.consent01=!1,this.attemptSubmit=!1,this.submitSuccessfull=!1,this.sendingRequest=!1)}getData(){return{details:{firstname:this.firstnameVal,lastname:this.lastnameVal,phone:this.phoneVal,mail:this.mailVal,street:this.streetVal,streetnumber:this.streetnumberVal,postalcode:this.postalcodeVal,city:this.cityVal,consent:this.consent01,ordered:this.cleanOrder,product:this.product}}}getRequestHeaders(){return this.$store.isFrontend(K.LUNGENKREBS)?[{"Order-Token":this.$constants.orderListToken}]:null}get repository(){return this.$locator.get(B.Repositories.Repository)}goToStep(t){return{step:t}}async validate(){if(this.attemptSubmit=!0,this.validatefirstname&&this.validatelastname&&this.validatephone&&this.validatemail&&this.validatestreet&&this.validatestreetnumber&&this.validatepostalcode&&this.validatecity){this.sendingRequest=!0;let t=this.getData();(await this.repository.placeOrder(t,this.getRequestHeaders())).type===w.SUCCESS&&(this.$eventManager.triggerFormCompleteEvent({survey_event:"complete",form_name:"Order List Form",link_text:"Form Complete | Order List Form"}),this.goToStep(S.SUCCESS)),this.sendingRequest=!1}}};f([n()],d.prototype,"stepsLayout",2);f([n()],d.prototype,"step",2);f([n()],d.prototype,"product",2);f([n()],d.prototype,"checkboxText",2);f([n()],d.prototype,"cleanOrder",2);f([n()],d.prototype,"ordered",2);f([F("step")],d.prototype,"reset",1);f([N],d.prototype,"goToStep",1);d=f([C],d);const X=$(d),J={class:"row"},Y={class:"col-12 col-md-6"},x={class:"form-group"},ee={class:"col-12 col-md-6"},te={class:"form-group"},se={class:"col-12 col-md-6"},ie={class:"form-group"},re={class:"col-12 col-md-6"},ae={class:"form-group"},le={class:"col-12 col-md-9"},oe={class:"form-group"},ne={class:"col-12 col-md-3"},de={class:"form-group"},pe={class:"col-12 col-md-3"},me={class:"form-group"},ue={class:"col-12 col-md-9"},he={class:"form-group"},fe={class:"row"},ve={class:"col-12"},ce={class:"form-group"},ge={key:0,class:"row"},be={class:"col-12 text-end mt-5 order-button"},Se=["disabled"];function ye(e,t,a,l,r,o){return g(),b("form",{ref:"form",onSubmit:t[9]||(t[9]=j((...i)=>e.validate&&e.validate(...i),["stop","prevent"]))},[s("div",J,[s("div",Y,[s("div",x,[t[10]||(t[10]=s("label",{class:"form-label",for:"step-2-firstname"},"Vorname",-1)),p(s("input",{id:"step-2-firstname","onUpdate:modelValue":t[0]||(t[0]=i=>e.firstnameVal=i),type:"text",placeholder:"Pflichtfeld",class:m(["form-control",{"is-valid":e.attemptSubmit&&e.validatefirstname,"is-invalid":e.attemptSubmit&&!e.validatefirstname}])},null,2),[[v,e.firstnameVal]]),t[11]||(t[11]=s("div",{class:"invalid-feedback"},"Bitte geben Sie Ihren Vornamen an",-1))])]),s("div",ee,[s("div",te,[t[12]||(t[12]=s("label",{class:"form-label",for:"step-2-lastname"},"Name",-1)),p(s("input",{id:"step-2-lastname","onUpdate:modelValue":t[1]||(t[1]=i=>e.lastnameVal=i),type:"text",placeholder:"Pflichtfeld",class:m(["form-control",{"is-valid":e.attemptSubmit&&e.validatelastname,"is-invalid":e.attemptSubmit&&!e.validatelastname}])},null,2),[[v,e.lastnameVal]]),t[13]||(t[13]=s("div",{class:"invalid-feedback"},"Bitte geben Sie Ihren Nachnamen an",-1))])]),s("div",se,[s("div",ie,[t[14]||(t[14]=s("label",{class:"form-label",for:"step-2-phone"},"Telefon",-1)),p(s("input",{id:"step-2-phone","onUpdate:modelValue":t[2]||(t[2]=i=>e.phoneVal=i),type:"tel",placeholder:"Optional",class:m(["form-control",{"is-valid":e.attemptSubmit&&e.validatephone,"is-invalid":e.attemptSubmit&&!e.validatephone}])},null,2),[[v,e.phoneVal]]),t[15]||(t[15]=s("div",{class:"invalid-feedback"}," Bitte geben Sie eine gültige Telefonnummer an ",-1))])]),s("div",re,[s("div",ae,[t[16]||(t[16]=s("label",{class:"form-label",for:"step-2-mail"},"E-Mail",-1)),p(s("input",{id:"step-2-mail","onUpdate:modelValue":t[3]||(t[3]=i=>e.mailVal=i),type:"text",placeholder:"Pflichtfeld",class:m(["form-control",{"is-valid":e.attemptSubmit&&e.validatemail,"is-invalid":e.attemptSubmit&&!e.validatemail}])},null,2),[[v,e.mailVal]]),t[17]||(t[17]=s("div",{class:"invalid-feedback"}," Bitte geben Sie eine gültige E-Mail Adresse an ",-1))])]),s("div",le,[s("div",oe,[t[18]||(t[18]=s("label",{class:"form-label",for:"step-2-street"},"StraÃe",-1)),p(s("input",{id:"step-2-street","onUpdate:modelValue":t[4]||(t[4]=i=>e.streetVal=i),type:"text",placeholder:"Pflichtfeld",class:m(["form-control",{"is-valid":e.attemptSubmit&&e.validatestreet,"is-invalid":e.attemptSubmit&&!e.validatestreet}])},null,2),[[v,e.streetVal]]),t[19]||(t[19]=s("div",{class:"invalid-feedback"},"Bitte geben Sie Ihre StraÃe an",-1))])]),s("div",ne,[s("div",de,[t[20]||(t[20]=s("label",{class:"form-label",for:"step-2-streetnumber"},"Haus Nr.",-1)),p(s("input",{id:"step-2-streetnumber","onUpdate:modelValue":t[5]||(t[5]=i=>e.streetnumberVal=i),type:"text",placeholder:"Pflichtfeld",class:m(["form-control",{"is-valid":e.attemptSubmit&&e.validatestreetnumber,"is-invalid":e.attemptSubmit&&!e.validatestreetnumber}])},null,2),[[v,e.streetnumberVal]]),t[21]||(t[21]=s("div",{class:"invalid-feedback"}
1,"Bitte geben Sie Ihre HNr. an",-1))])]),s("div",pe,[s("div",me,[t[22]||(t[22]=s("label",{class:"form-label",for:"step-2-postalcode"},"PLZ",-1)),p(s("input",{id:"step-2-postalcode","onUpdate:modelValue":t[6]||(t[6]=i=>e.postalcodeVal=i),type:"text",placeholder:"Pflichtfeld",class:m(["form-control",{"is-valid":e.attemptSubmit&&e.validatepostalcode,"is-invalid":e.attemptSubmit&&!e.validatepostalcode}])},null,2),[[v,e.postalcodeVal]]),t[23]||(t[23]=s("div",{class:"invalid-feedback"}," Bitte geben Sie eine gültige PLZ an ",-1))])]),s("div",ue,[s("div",he,[t[24]||(t[24]=s("label",{class:"form-label",for:"step-2-city"},"Ort",-1)),p(s("input",{id:"step-2-city","onUpdate:modelValue":t[7]||(t[7]=i=>e.cityVal=i),type:"text",placeholder:"Pflichtfeld",class:m(["form-control",{"is-valid":e.attemptSubmit&&e.validatecity,"is-invalid":e.attemptSubmit&&!e.validatecity}])},null,2),[[v,e.cityVal]]),t[25]||(t[25]=s("div",{class:"invalid-feedback"},"Bitte geben Sie Ihre Stadt an",-1))])])]),s("div",fe,[s("div",ve,[s("div",ce,[p(s("input",{id:"step2-check01","onUpdate:modelValue":t[8]||(t[8]=i=>e.consent01=i),type:"checkbox"},null,512),[[A,e.consent01]]),M(" "+R(e.checkboxText),1)])])]),e.stepsLayout||e.step!==e.Step.SUCCESS?(g(),b("div",ge,[s("div",be,[s("button",{disabled:!e.cleanOrder.length,type:"submit",class:"btn btn-outline"}," Bestellen ",8,Se)])])):E("",!0)],544)}const T=P(X,[["render",ye]]),je=Object.freeze(Object.defineProperty({__proto__:null,get OrderListForm(){return d},default:T},Symbol.toStringTag,{value:"Module"}));var Ve=Object.defineProperty,Oe=Object.getOwnPropertyDescriptor,c=(e,t,a,l)=>{for(var r=l>1?void 0:l?Oe(t,a):t,o=e.length-1,i;o>=0;o--)(i=e[o])&&(r=(l?i(t,a,r):i(r))||r);return l&&r&&Ve(t,a,r),r};let u=class extends L{constructor(){super(...arguments),this.Step=S}};c([n()],u.prototype,"stepsLayout",2);c([n()],u.prototype,"firstStepHeadline",2);c([n()],u.prototype,"secondStepHeadline",2);c([n()],u.prototype,"step",2);c([n()],u.prototype,"groups",2);c([n()],u.prototype,"selectedGroupIdx",2);c([n()],u.prototype,"changeGroup",2);u=c([C],u);const Ee=$(u),$e={class:"order-list-steps mb-6"},Ce={key:0},Le={key:1,class:"order-list-groups"},Fe=["onClick"];function Pe(e,t,a,l,r,o){const i=G("html-fragment");return g(),b("div",$e,[e.stepsLayout?(g(),b("ul",Ce,[p(s("li",{class:m({active:e.step===e.Step.ORDER})},null,2),[[i,e.firstStepHeadline]]),p(s("li",{class:m({active:e.step!==e.Step.ORDER})},null,2),[[i,e.secondStepHeadline]])])):E("",!0),e.groups.length>0&&e.step===e.Step.ORDER?(g(),b("ul",Le,[(g(!0),b(q,null,z(e.groups,(D,O)=>(g(),b("li",{key:O,class:m({active:e.selectedGroupIdx===O}),onClick:He=>e.changeGroup(O)},R(D),11,Fe))),128))])):E("",!0)])}const H=P(Ee,[["render",Pe],["__scopeId","data-v-c9eb4e47"]]),qe=Object.freeze(Object.defineProperty({__proto__:null,get OrderListHeader(){return u},default:H},Symbol.toStringTag,{value:"Module"}));var Re=Object.defineProperty,Te=Object.getOwnPropertyDescriptor,I=(e,t,a,l)=>{for(var r=l>1?void 0:l?Te(t,a):t,o=e.length-1,i;o>=0;o--)(i=e[o])&&(r=(l?i(t,a,r):i(r))||r);return l&&r&&Re(t,a,r),r},S=(e=>(e[e.ORDER=1]="ORDER",e[e.CONTACT=2]="CONTACT",e[e.SUCCESS=3]="SUCCESS",e))(S||{});let V=class extends _{constructor(){super(...arguments),this.Step=S,this.stepsLayout=!0,this.firstStepHeadline="1. Auswahl",this.secondStepHeadline="2. Adresseingabe + bestellen",this.step=1,this.possibleOrders=[],this.ordered=[],this.groups=[],this.selectedGroupIdx=0,this.product="n/a",this.checkboxText="Ich möchte von einem/einer AuÃendienstmitarbeiter:in besucht werden.",this.stepOrderStartEventEmmited=!1}getComponentType(){return"order_lists"}contentDidLoad(){super.contentDidLoad(),this.$nextTick(()=>{const e=this.getContentAttribute("custom_checkbox");!y(e)&&e.trim().length>0&&(this.checkboxText=e);const t=this.getContentAttribute("first_step_headline");!y(t)&&t.trim().length>0&&(this.firstStepHeadline=t);const a=this.getContentAttribute("second_step_headline");!y(a)&&a.trim().length>0&&(this.secondStepHeadline=a),this.stepsLayout=y(this.layoutComponent.settings.steps_layout)?!0:this.layoutComponent.settings.steps_layout,this.product=this.getContentAttribute("product");const l=this.getContentAttribute("content");l&&l.length>0&&this.groups.push(...U(k(l.map(r=>r.settings.group&&r.settings.group.trim()),r=>r&&r.length>0)))})}changeGroup(e){this.selectedGroupIdx=this.selectedGroupIdx===e?-1:e}get orderListItems(){return this.getContentAttribute("content")}resetItems(){this.step===1&&(this.possibleOrders=[],this.ordered=[],this.selectedGroupIdx=0)}saveValue(e,t){if(this.possibleOrders[e]=Object.assign({},this.possibleOrders[e],t),this.ordered[e]&&this.ordered[e]?.amount!=t.amount&&"amount"in t||!this.ordered[e]&&t.amount!=null){const a=this.possibleOrders[e]?.text||"",l=t.amount||0;this.triggerFormUpdateEvent(a,l)}this.createCompleteOrder()}createCompleteOrder(){let e=this;
1this.ordered=[],this.possibleOrders.forEach((t,a)=>{(t.language&&t.amount||!t.language&&!t.needed.includes("language")&&t.amount||!t.amount&&!t.needed.includes("amount")&&t.language)&&(e.ordered[a]=t)})}triggerFormUpdateEvent(e,t){this.$eventManager.triggerFormFieldEvent({...this.stepOrderStartEventEmmited===!1?{survey_event:"start"}:{},event_name:"form_field_entry",form_name:this.firstStepHeadline,form_field_name:`Change | ${this.firstStepHeadline} | ${e}`,link_text:`${this.firstStepHeadline} | Form Interaction | ${e} | ${t}`}),this.stepOrderStartEventEmmited==!1&&(this.stepOrderStartEventEmmited=!0)}triggerFormCompleteEvent(){this.$eventManager.triggerFormCompleteEvent({survey_event:"complete",form_name:this.firstStepHeadline,link_text:`Form Complete | ${this.firstStepHeadline}`})}get cleanOrder(){return this.ordered.filter(()=>!0)}get formRef(){return this.$refs.form}gotoStep(e){e===2?(this.cleanOrder.length>0&&(this.step=e),this.stepOrderStartEventEmmited=!1,this.triggerFormCompleteEvent()):this.step=e}};I([F("step")],V.prototype,"resetItems",1);V=I([C({components:{OrderListForm:T,OrderListHeader:H}})],V);const ze=$(V);export{V as O,S,ze as _,je as a,qe as b};
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.