PageSourceSearch

https://www.pkoleasing.pl/_next/static/chunks/674.cad9c17cc43fab2c.js

js pkoleasing.pl collected 2026-10-02 06:03:04 UTC 41,845 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[674],{10674:(e,l,a)=>{a.r(l),a.d(l,{default:()=>eG});var t=a(26514),i=a(77694),o=a(69001),n=a.n(o),r=a(11923),s=a(99257),d=a(23469),p=a.n(d),u=a(46225),m=a(75834),c=a(60851),b=a(93794),g=a(93069),x=a(98938),h=a(54004),f=a(2141);let v=(e,l)=>{var a,t,i;let o={event:l,idGTM:e};return window&&(null==(a=window)?void 0:a.dataLayer)&&(null==(i=window)||null==(t=i.dataLayer)||t.push(o)),o};var y=a(56774),k=a(27133),w=a(13436),N=a(42920),_=a(17443),A=a(54907),C=a(18662),j=a(89342),F=a(6234);let S=(e,l)=>{var a,t,i;let o=(null==e?void 0:e.configuration_id)?null==e||null==(a=e.configuration_id)?void 0:a.substr(0,e.configuration_id.indexOf("-")):"bws-form";return"field-".concat(o,"-").concat(null==l||null==(i=l.Name)||null==(t=i.toLowerCase())?void 0:t.replace(" ","-"))},B=b.Df.withName("PKOBPCheckboxField").create(()=>({checkboxWrapper:{marginBottom:"23px",[h.Ay.breakpoints.down("sm")]:{marginBottom:"21px"}},checkboxWrapper__isBoldLabel:{marginBottom:"15px"},checkbox:{width:"100%",alignItems:"start",margin:0,"& .MuiFormControlLabel-label":{fontSize:"14px",marginTop:"3px",fontFamily:h.Ay.typography.fontFamily,[h.Ay.breakpoints.down("sm")]:{marginTop:"6px",lineHeight:"20px"}}},checkbox__isBoldLabel:{"& .MuiFormControlLabel-label":{fontWeight:600,fontSize:"16px"}},checkboxInput:{padding:"0 13px 0 0",[h.Ay.breakpoints.down("sm")]:{padding:"0 14px 0 0"},"& input:focus + span":{border:"solid 1px",borderColor:h.Ay.palette.primary.hover},"& input:focus + svg":{fill:h.Ay.palette.primary.hover},"& input:focus-visible + svg":{outline:"1px solid black",borderRadius:"4px"},"& .MuiSvgIcon-root":{marginLeft:"-3px"}},checkboxIcon:{display:"inline-block",width:"20px",height:"20px",border:"solid 1px ".concat(h.Ay.palette.secondary.bordersDark),borderRadius:"2px",margin:"3px 3px 3px 0"}})),T=e=>{let{label:l,fieldName:a,isChecked:i,onChange:o,isBoldLabel:r,children:s,ariaDescribedby:d="",ariaInvalid:p=!1}=e,{classes:u,cx:m}=B(),{currentBws:c}=(0,_.Rc)(),b=S(c,{Name:a});return(0,t.jsxs)(C.A,{className:m(u.checkboxWrapper,{[u.checkboxWrapper__isBoldLabel]:r}),children:[(0,t.jsx)(j.A,{className:n()(u.checkbox,{[u.checkbox__isBoldLabel]:r}),control:(0,t.jsx)(F.A,{disableRipple:!0,id:b,name:a,className:n()(u.checkboxInput,"CheckboxField__input"),checked:i,onChange:o,sx:{"& .MuiSvgIcon-root":{fontSize:26}},icon:(0,t.jsx)("span",{className:u.checkboxIcon}),inputProps:{tabIndex:0,"aria-invalid":p,"aria-describedby":d}}),label:(0,t.jsx)("label",{dangerouslySetInnerHTML:{__html:l},htmlFor:b})}),s]},a)};var L=a(43371),z=function(e){return e[e.Text=0]="Text",e[e.Consent=1]="Consent",e[e.Radio=2]="Radio",e[e.Select=3]="Select",e[e.PoiButton=4]="PoiButton",e[e.Boolean=5]="Boolean",e[e.CustomSelect=6]="CustomSelect",e[e.RegionSelect=7]="RegionSelect",e[e.VoivodeshipSelect=8]="VoivodeshipSelect",e[e.Nip=9]="Nip",e[e.PhoneWithCode=10]="PhoneWithCode",e}({}),M=function(e){return e.Date="Date",e.DateTime="Datetime",e.Phone="Phone",e.Mobilephone="Mobilephone",e.Currency="Currency",e.Regon="REGON",e.Pesel="PESEL",e.String="String",e.Decimal="Decimal",e.Integer="Integer",e.Email="Email",e.Component="Component",e.Dictionary="Dictionary",e.Boolean="Boolean",e}({});let P=b.Df.withName("PKOBPBwsForm").create(()=>({submit:{display:"none"},form:{margin:"0 auto",maxWidth:"600px",[h.Ay.breakpoints.down("md")]:{width:"auto",marginTop:"3px"},"& p.Mui-error":{marginLeft:0,fontSize:"13px",marginBottom:"-13px",fontFamily:h.Ay.typography.fontFamily},"& .MuiTypography-root":{fontFamily:h.Ay.typography.fontFamily},"&>fieldset":{margin:0,padding:0,border:"none","&>legend":L.$}},consentsWrapper:{margin:0,marginTop:"29px",padding:0,border:"none"},consentsWrapper__isCallmeForm:{marginTop:"-10px","& .CheckboxField__input":{padding:"0 6px 0 0"},"& .MuiFormControlLabel-label":{lineHeight:"18px !important"},"&& p.Mui-error":{marginLeft:"31px",marginTop:"3px"}}})),I=e=>{let{formik:l,formikFields:a,idGTM:i,isCallmeForm:o,acceptLabel:r}=e,{classes:s}=P(),{setRefSubmit:d,checkAllConsents:p,setCheckAllConsents:u,currentStage:c,modalTitle:b}=(0,_.Rc)(),g=(0,m.useRef)();(0,m.useEffect)(()=>{d(g)},[c]);let x=(e,i)=>a.filter(l=>"includeOnly"===e?l.fieldType===i:l.fieldType!==i).map(e=>(0,t.jsx)(A.A,{children:m.createElement(e.Component,l)},e.fieldData.Name));return(0,t.jsx)("form",{onSubmit:e=>
1{e.preventDefault(),l&&l.submitForm()},className:s.form,id:i,children:(0,t.jsxs)(A.A,{component:"fieldset",children:[l.submitCount>0&&!l.isValid?(0,t.jsx)("legend",{children:"Nie wszystkie pola formularza są poprawnie uzupełnione"},i+"_invalid-bws"):(0,t.jsx)("legend",{children:b?"Formularz kontaktowy - ".concat(b):"Formularz kontaktowy"},i+"_valid-bws"),x("exclude",z.Consent),(0,t.jsxs)(A.A,{className:n()(s.consentsWrapper,{[s.consentsWrapper__isCallmeForm]:o}),children:[(()=>{var e;return null==(e=a.filter(e=>e.fieldType===z.Consent))?void 0:e.length})()>1&&(0,t.jsx)(T,{fieldName:"checkAllConsents",isChecked:p,label:r,onChange:()=>(e=>{u(e),setTimeout(()=>{a.filter(e=>e.fieldType===z.Consent).forEach(a=>l.setFieldValue(a.fieldData.Name,e))},10)})(!p),isBoldLabel:!0}),x("includeOnly",z.Consent)]}),(0,t.jsx)("button",{type:"submit",className:s.submit,ref:g,children:"submit"})]})})};var R=a(74608);let E=["custom_additional_agreement_1","custom_additional_agreement_2","custom_additional_agreement_3"],W=b.Df.withName("PKOBPBwsCustomAdditionalAgreements").create(()=>({showDescription:{margin:"-2px auto 20px auto",lineHeight:"20px",maxWidth:"600px",[h.Ay.breakpoints.down("sm")]:{marginTop:"-1px"}},showDescription__isLast:{marginBottom:"26px"},displayName:{marginBottom:"0px",fontSize:"14px"}})),D=e=>{var l;let{bws:a}=e,{classes:i}=W(),o=(0,f.A)(),[r,s]=(0,m.useState)([]),d=E.filter(e=>null==a?void 0:a[e]).map(e=>Number(null==a?void 0:a[e]));return(0,m.useEffect)(()=>{let e=async()=>{try{let e=await o.apiModulesAgreementListList({agreements:d.toString()});if(e.ok)return s(e.data)}catch(e){console.error(e,"err")}};return(null==d?void 0:d.length)&&e(),()=>{s([])}},[]),null==(l=((e,l)=>null==e?void 0:e.sort((e,a)=>l.indexOf(e.id)-l.indexOf(a.id)))(r,d))?void 0:l.map((e,l)=>e?(0,t.jsxs)(x.A,{className:n()("customAgreement",i.showDescription,{[i.showDescription__isLast]:l+1===(null==r?void 0:r.length)}),children:[(0,t.jsx)("div",{className:n()(i.displayName,"BwsCustomAdditionalAgreements__displayName"),dangerouslySetInnerHTML:{__html:null==e?void 0:e.display_name}}),(0,t.jsx)(R.A,{expandLabel:(null==e?void 0:e.link_label)||"Rozwiń pełną treść",collapseLabel:(null==e?void 0:e.link_label_expanded)||"Zwiń pełną treść",text:null==e?void 0:e.content})]},"custom_agreement_".concat(l)):null)};var O=a(56264);let V=e=>{var l,a;let{field:i,formik:o}=e,n=eE(i,o),r=(0,m.useContext)(w.G)+"-bool-"+i.Name;return(0,t.jsx)(T,{fieldName:i.Name,isChecked:!!o.values[n],label:i.Label,onChange:o.handleChange,ariaDescribedby:r,children:(null==(l=o.touched)?void 0:l[n])&&(null==(a=o.errors)?void 0:a[n])&&(0,t.jsx)(O.A,{error:!0,id:r,children:o.errors[n]})})},$=b.Df.withName("PKOBPBwsConsentField").create(()=>({msg:{"&&.Mui-error":{marginLeft:"38px",marginBottom:"5px",marginTop:0,lineHeight:1,fontSize:"14px",[h.Ay.breakpoints.down("sm")]:{marginLeft:"36px"}}},showDescription:{marginLeft:"37px",lineHeight:1,"& > button":{lineHeight:1,position:"relative","& *":{lineHeight:1}},[h.Ay.breakpoints.down("sm")]:{marginLeft:"36px"}}})),H=e=>{var l,a,i;let{field:o,formik:r}=e,{classes:s}=$(),{checkAllConsents:d,setCheckAllConsents:p}=(0,_.Rc)(),u=eE(o,r),{display_name:c,content:b,link_label:g="",link_label_expanded:x="",error_message:h=""}=o,f=(0,m.useContext)(w.G)+"-appr-"+o.Name;return(0,t.jsxs)(T,{fieldName:o.Name,isChecked:!!r.values[u],label:c,onChange:e=>(e=>{var l;return!d||(null==e||null==(l=e.target)?void 0:l.checked)||p(!1),r.handleChange(e)})(e),ariaDescribedby:"".concat(f,"_error"),ariaInvalid:!!(null==(l=r.errors)?void 0:l[u]),children:[(null==(a=r.touched)?void 0:a[u])&&(null==(i=r.errors)?void 0:i[u])&&(0,t.jsx)(O.A,{className:s.msg,error:!0,id:"".concat(f,"_error"),children:h||r.errors[u]}),b&&(0,t.jsx)(A.A,{className:n()(s.showDescription,"agreement-description"),children:(0,t.jsx)(R.A,{expandLabel:g?(0,t.jsx)("span",{dangerouslySetInnerHTML:{__html:g}}):"Rozwiń pełną treść",collapseLabel:x?(0,t.jsx)("span",{dangerouslySetInnerHTML:{__html:x}}):"Zwiń pełną treść",text:b,cy:"BwsConsentField"})})]})};var q=a(62176),Y=a(60719),G=a(29009),U=a(82056);let K=(0,a(94916).X1)(e=>{let{inputRef:l,children:a,...t}=e,{inputProps:i}=t;return m.cloneElement(a,{InputProps:{...i,inputRef:l}})}),Z=(0,m.memo)(e=>{let{fieldName:l,setFormikFieldValue:a,children:i,inputProps:o,shouldUpdateMask:n,onMaskUpdate:r,...s}=e,d=(0,m.useRef)(null);return(0,m.useEffect)(()=>{var e;
1if(n&&(null==(e=d.current)?void 0:e.maskRef)){let e=d.current.maskRef;e.updateValue(),e.updateControl();let l=e.el;l&&"value"in l&&(l.value="",e.updateValue()),null==r||r()}},[n,r]),(0,t.jsx)(K,{...s,ref:d,inputProps:o,onAccept:e=>a(l,e),children:i})}),J=[{value:"Styczeń",label:"Styczeń"},{value:"Luty",label:"Luty"},{value:"Marzec",label:"Marzec"},{value:"Kwiecień",label:"Kwiecień"},{value:"Maj",label:"Maj"},{value:"Czerwiec",label:"Czerwiec"},{value:"Lipiec",label:"Lipiec"},{value:"Sierpień",label:"Sierpień"},{value:"Wrzesień",label:"Wrzesień"},{value:"Październik",label:"Październik"},{value:"Listopad",label:"Listopad"},{value:"Grudzień",label:"Grudzień"}],X=[{value:"+1",label:"+1",mask:{mask:"000 000 0000"},regex:/^\+1\d{10}$/},{value:"+30",label:"+30",mask:{mask:"000 000 0000"},regex:/^\+30\d{10}$/},{value:"+31",label:"+31",mask:{mask:"000 000 0000"},regex:/^\+31\d{9}$/},{value:"+32",label:"+32",mask:{mask:"000 00 00 00"},regex:/^\+32\d{8,9}$/},{value:"+33",label:"+33",mask:{mask:"0 00 00 00 00"},regex:/^\+33\d{9}$/},{value:"+34",label:"+34",mask:{mask:"000 000 000"},regex:/^\+34\d{9}$/},{value:"+36",label:"+36",mask:{mask:"00 000 0000"},regex:/^\+36\d{9}$/},{value:"+39",label:"+39",mask:{mask:"000 000 0000"},regex:/^\+39\d{9,10}$/},{value:"+40",label:"+40",mask:{mask:"000 000 000"},regex:/^\+40\d{9}$/},{value:"+43",label:"+43",mask:{mask:"0000 000000"},regex:/^\+43\d{10}$/},{value:"+44",label:"+44",mask:{mask:"0000 000 000"},regex:/^\+44\d{10}$/},{value:"+45",label:"+45",mask:{mask:"00 00 00 00"},regex:/^\+45\d{8}$/},{value:"+46",label:"+46",mask:{mask:"00 000 0000"},regex:/^\+46\d{9}$/},{value:"+47",label:"+47",mask:{mask:"000 00 000"},regex:/^\+47\d{8}$/},{value:"+48",label:"+48",mask:{mask:"000 000 000"},regex:/^\+48\d{9}$/},{value:"+49",label:"+49",mask:{mask:"000 00000000"},regex:/^\+49\d{10,11}$/},{value:"+81",label:"+81",mask:{mask:"00 0000 0000"},regex:/^\+81\d{10}$/},{value:"+82",label:"+82",mask:{mask:"000 0000 0000"},regex:/^\+82\d{9,10}$/},{value:"+86",label:"+86",mask:{mask:"000 0000 0000"},regex:/^\+86\d{11}$/},{value:"+351",label:"+351",mask:{mask:"000 000 000"},regex:/^\+351\d{9}$/},{value:"+352",label:"+352",mask:{mask:"000 000 0000"},regex:/^\+352\d{8,11}$/},{value:"+353",label:"+353",mask:{mask:"000 000 0000"},regex:/^\+353\d{9}$/},{value:"+354",label:"+354",mask:{mask:"000 0000"},regex:/^\+354\d{7}$/},{value:"+356",label:"+356",mask:{mask:"0000 0000"},regex:/^\+356\d{8}$/},{value:"+357",label:"+357",mask:{mask:"00 000000"},regex:/^\+357\d{8}$/},{value:"+358",label:"+358",mask:{mask:"000 0000000"},regex:/^\+358\d{9,10}$/},{value:"+359",label:"+359",mask:{mask:"000 000 000"},regex:/^\+359\d{9}$/},{value:"+370",label:"+370",mask:{mask:"000 00000"},regex:/^\+370\d{8}$/},{value:"+371",label:"+371",mask:{mask:"0000 0000"},regex:/^\+371\d{8}$/},{value:"+372",label:"+372",mask:{mask:"000 0000"},regex:/^\+372\d{7}$/},{value:"+380",label:"+380",mask:{mask:"00 000 0000"},regex:/^\+380\d{9}$/},{value:"+385",label:"+385",mask:{mask:"000 000 000"},regex:/^\+385\d{9}$/},{value:"+386",label:"+386",mask:{mask:"000 000 000"},regex:/^\+386\d{8}$/},{value:"+420",label:"+420",mask:{mask:"000 000 000"},regex:/^\+420\d{9}$/},{value:"+421",label:"+421",mask:{mask:"000 000 000"},regex:/^\+421\d{9}$/}],Q=b.Df.withName("PKOBPBwsPhoneWithCodeField").withNestedSelectors().create(e=>{let{classes:l}=e;return{phoneContainer:{display:"flex",alignItems:"center",width:"100%",gap:"8px"},select:{position:"relative",width:"100px","& .MuiInputBase-input":{zIndex:1},["& .".concat(l.textField," svg")]:{cursor:"pointer",position:"absolute",right:"8px",pointerEvents:"none",[h.Ay.breakpoints.down("sm")]:{right:"3px"}},["& .".concat(l.textField,".Mui-focused svg")]:{right:"6px",[h.Ay.breakpoints.down("sm")]:{right:"1px"}}},phoneFieldWrapper:{flex:1},labelWrapper:{display:"flex",alignItems:"center",marginBottom:"2px","& label":{color:h.Ay.palette.text.primary,display:"inline-block",fontSize:"14px",lineHeight:"24px"},"& .pkobp-tooltip":{display:"inline-block",height:"24px",marginLeft:"4px",marginTop:"-2px"}},textField:{width:"100%","& .MuiInputBase-root, &.MuiInputBase-root":{height:"48px",borderRadius:"8px",borderColor:h.Ay.palette.secondary.bordersDark,fontFamily:h.Ay.typography.fontFamily,borderWidth:"1px",borderStyle:"solid","&.Mu
1i-focused":{borderColor:h.Ay.palette.primary.main,borderWidth:"2px",marginRight:"-1px",marginLeft:"-1px"},"&.Mui-error":{borderColor:h.Ay.palette.error.main},"& input:-webkit-autofill":{"-webkit-background-clip":"text"},"& input:-webkit-autofill:hover, & input:-webkit-autofill:focus":{"-webkit-background-clip":"text"}},"& .MuiInputAdornment-root":{marginLeft:"-2px",marginTop:"0",letterSpacing:"-1px",[h.Ay.breakpoints.down("md")]:{marginTop:"1px"}},"& .MuiInputBase-input":{paddingBottom:"15px",paddingTop:"15px"},"& .MuiOutlinedInput-notchedOutline":{border:"none",top:0,"& > *":{lineHeight:"0"}}},phoneError:{"&.MuiFormHelperText-root.Mui-error":{marginLeft:"108px"}}}}),ee=e=>{var l,a;let{field:i,formik:o}=e,{classes:r}=Q(),{currentBws:s,updateMaskAfterFormReset:d,setUpdateMaskAfterFormReset:p}=(0,_.Rc)(),u=S(s,i),c=eE(i,o),{countryCode:b,phoneNumber:g}=(e=>{if(!e)return{countryCode:"+48",phoneNumber:""};for(let l of X)if(e.startsWith(l.value))return{countryCode:l.value,phoneNumber:e.substring(l.value.length).trim()};return{countryCode:"+48",phoneNumber:e}})(o.values[c]||""),[h,f]=(0,m.useState)(b),[v,y]=(0,m.useState)(X.find(e=>e.value===b)),k=(0,m.useRef)(null),w=e=>{let l=e.target.value;o.setFieldValue(c,"".concat(h).concat(l))},N={anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},PaperProps:{style:{maxHeight:300}},TransitionProps:{onEntering:()=>{if(k.current){let e=k.current.getBoundingClientRect(),l=window.innerHeight-e.bottom;l<300&&e.top>300?(N.anchorOrigin.vertical="top",N.transformOrigin.vertical="bottom"):(N.anchorOrigin.vertical="bottom",N.transformOrigin.vertical="top",l<300&&e.top<300&&window.scrollBy({top:300-l,behavior:"smooth"}))}}}},A=()=>(0,t.jsx)(U.A,{className:r.textField,value:g,onChange:(null==v?void 0:v.mask)?null:w,id:"".concat(u,"-phone"),name:"".concat(i.Name,"-phone"),error:o.touched[c]&&!!o.errors[c]||!1,InputProps:{className:r.input,"aria-label":"Wpisz numer telefonu",notched:!1}});return(0,t.jsxs)(x.A,{className:r.inputWrapper,children:[(0,t.jsx)(x.A,{className:r.labelWrapper,children:(0,t.jsx)("label",{htmlFor:u,children:i.custom_label||i.Label})}),(0,t.jsxs)(x.A,{className:r.phoneContainer,children:[(0,t.jsx)(x.A,{className:n()(r.select),children:(0,t.jsx)(Y.A,{className:r.textField,name:"".concat(i.Name,"-code"),value:h,onChange:e=>{let l=e.target.value;f(l),y(X.find(e=>e.value===l)),o.setFieldValue(c,"".concat(l).concat(g))},displayEmpty:!0,IconComponent:()=>(0,t.jsx)(q.A,{width:"27px",height:"27px"}),inputProps:{"aria-label":"Wybierz kod kraju",id:"".concat(u,"-code")},ref:k,MenuProps:N,children:X.map(e=>(0,t.jsx)(G.A,{value:e.value,className:r.option,children:e.label},e.value))})}),(0,t.jsx)(x.A,{className:r.phoneFieldWrapper,children:(null==v?void 0:v.mask)?(0,t.jsx)(Z,{...v.mask,inputProps:{className:r.input,"aria-label":"Wpisz numer telefonu"},setFormikFieldValue:(e,l)=>{o.setFieldValue(c,"".concat(h).concat(l))},fieldName:"".concat(i.Name,"-phone"),shouldUpdateMask:d,onMaskUpdate:()=>{p(!1)},children:A()}):A()})]}),(null==(l=o.touched)?void 0:l[c])&&(null==(a=o.errors)?void 0:a[c])&&(0,t.jsx)(O.A,{error:!0,className:r.phoneError,children:i.validation_message||o.errors[c]})]})};var el=a(38264),ea=a(53303);let et=p()(()=>a.e(5983).then(a.bind(a,98364)),{loadableGenerated:{webpack:()=>[98364]}}),ei=b.Df.withName("PKOBPBwsPoiField").create(()=>({poiButton:{"&&":{marginTop:"5px",marginBottom:"0",padding:"7px 23px 7px 16px",minWidth:"unset",[h.Ay.breakpoints.down("sm")]:{width:"100%",padding:"7px 16px"}},"& svg":{fill:h.Ay.palette.primary.main,width:"32px",height:"32px",marginRight:"4px"}},poiBox:{marginBottom:"22px"},poiItemBox:{marginBottom:"16px","& div":{padding:"0px"},"& svg":{width:"32px",height:"32px"}}})),eo=e=>{var l,a;let{formik:i,field:o}=e,n=(0,f.A)(),{classes:r}=ei(),{setModalTitle:s,setCurrentStage:d,poi:p,setPoi:u,currentStage:c,setPoiDictionaryName:b}=(0,_.Rc)(),g=(0,m.useRef)(null),x=eE(o,i),h=(0,m.useContext)(w.G)+"-poi-choose",v=async e=>{try{var l;let a=await n.apiModulesBwsPoiMapDetailsList({"canonical-value":e}),t=null==a||null==(l=a.data)?void 0:l[0];t&&u(t)}catch(e){console.error(e)}};return(0,m.useEffect)(()=>
1{if(p&&i.setFieldValue(o.Name,p.canonical_value),c===y.p.FORM&&p){var e,l;setTimeout(()=>{var e;null==(e=g.current)||e.scrollIntoView({block:"center",behavior:"smooth"})},100);let a=null==(e=g.current)?void 0:e.querySelectorAll("button");null==a||null==(l=a[a.length-1])||l.focus()}b(o.DictionaryName)},[p,o.DictionaryName]),(0,m.useEffect)(()=>{var e,l,a;(null==i||null==(e=i.initialValues)?void 0:e[null!=(l=null==o?void 0:o.Name)?l:""])&&v(null==i||null==(a=i.initialValues)?void 0:a[null==o?void 0:o.Name])},[JSON.stringify(null==i?void 0:i.initialValues)]),(0,m.useEffect)(()=>{u(null)},[]),(0,t.jsxs)(A.A,{className:r.poiBox,ref:g,children:[p&&(0,t.jsx)(A.A,{className:r.poiItemBox,children:(0,t.jsx)(et,{poi:p,isReadonly:!0})}),(0,t.jsx)(ea.default,{className:r.poiButton,variant:"secondary",onClickCallback:()=>{s("Wybierz oddział, w kt\xf3rym podpiszesz wniosek"),d(y.p.POI)},ariaLabel:(()=>{if(p){let e=(null==o?void 0:o.custom_label)||"Zmień oddział";return"Wybrany oddział - ".concat(null==p?void 0:p.department,". ").concat(e)}return(null==o?void 0:o.custom_label)||"Wybierz oddział"})(),ariaDescribedby:h,children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(el.A,{}),p?(null==o?void 0:o.custom_label)||"Zmień oddział":(null==o?void 0:o.custom_label)||"Wybierz oddział"]})}),(null==(l=i.touched)?void 0:l[x])&&(null==(a=i.errors)?void 0:a[x])&&(0,t.jsx)(O.A,{error:!0,id:h,children:i.errors[x]})]})};var en=a(99223),er=a(21123);let es=p()(()=>a.e(1265).then(a.bind(a,61265)),{loadableGenerated:{webpack:()=>[61265]}}),ed=b.Df.withName("PKOBPBwsRadioField").create(()=>({labelWrapper:{display:"flex",alignItems:"center",marginBottom:"2px","& label":{color:h.Ay.palette.text.primary,display:"inline-block",fontSize:"14px",lineHeight:"24px"},"& .pkobp-tooltip":{display:"inline-block",height:"24px",marginLeft:"4px",marginTop:"-2px"}},label:{fontSize:"14px !important",color:h.Ay.palette.text.primary,fontFamily:h.Ay.typography.fontFamily},radioContainer:{display:"flex",alignItems:"center",justifyContent:"start",flexDirection:"row"}})),ep=e=>{var l,a,i,o,n,r;let{field:s,formik:d}=e,{classes:p}=ed(),u=eE(s,d),c=(0,m.useContext)(w.G)+"-radio-"+s.Name,{currentBws:b}=(0,_.Rc)(),g=S(b,s),h=(null==s?void 0:s.FieldFormatType)==="Component"&&(null==s||null==(a=s.FieldComponentList)||null==(l=a.FieldComponentValue)?void 0:l.length)>0?null==s||null==(o=s.FieldComponentList)||null==(i=o.FieldComponentValue)?void 0:i.map((e,l)=>({label:e,id:l.toString()})):[{label:"Tak",id:"1"},{label:"Nie",id:"0"}];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(x.A,{className:p.labelWrapper,children:[(0,t.jsx)(en.A,{component:"legend",className:p.label,htmlFor:g,children:(null==s?void 0:s.custom_label)||s.Label}),s.custom_tooltip&&(0,t.jsx)(es,{...{name:"Tooltip for ".concat(s.custom_label||s.Label),symbol:"?",text:s.custom_tooltip},$_ID:g})]}),(0,t.jsx)(er.A,{radioOptions:h,value:d.values[u],handleChange:d.handleChange,wcagPrefix:u,name:u,isHorizontal:!0}),(null==(n=d.touched)?void 0:n[u])&&(null==(r=d.errors)?void 0:r[u])&&(0,t.jsx)(O.A,{error:!0,id:c,children:(null==s?void 0:s.validation_message)||d.errors[u]})]})},eu=p()(()=>a.e(1265).then(a.bind(a,61265)),{loadableGenerated:{webpack:()=>[61265]}}),em=b.Df.withName("PKOBPBwsSelectField").create(()=>({inputWrapper:{marginBottom:"22px"},labelWrapper:{display:"flex",alignItems:"center",marginBottom:"2px","& label":{color:h.Ay.palette.text.primary,display:"inline-block",fontSize:"14px",lineHeight:"24px"},"& .pkobp-tooltip":{display:"inline-block",height:"24px",marginLeft:"4px",marginTop:"-2px"}},textField:{width:"100%","& .MuiInputBase-root, &.MuiInputBase-root":{height:"48px",borderRadius:"8px",borderColor:h.Ay.palette.text.primary,fontFamily:h.Ay.typography.fontFamily},"& svg":{cursor:"pointer",position:"absolute",right:"8px",[h.Ay.breakpoints.down("sm")]:{right:"3px"}}},select:{position:"relative","& .MuiInputBase-input":{zIndex:1}},option:{fontFamily:h.Ay.typography.fontFamily}})),ec=e=>{var l,a,i;let{field:o,formik:r}=e,{classes:s}=em(),d=eE(o,r),{currentBws:p}=(0,_.Rc)(),u=S(p,o);return(0,t.jsxs)(x.A,{className:n()([s.inputWrapper,s.select]),children:[(0,t.jsxs)(x.A,{className:s.labelWrapper,children:[(0,t.jsx)("label",{className:s.label,htmlFor:u,children:o.custom_label||o.Label}),o.custom_tooltip&&(0,t.jsx)(eu,{...{name:"Tooltip for ".concat(o.custom_label||o.Label),symbol:"?",text:o.custom_tooltip},$_ID:u})]}),(0,t.jsxs)(Y.A,{className:s.textField,name:o.Name,value:(()=>{var e,l,a;let t=r.values[d];return(null==o||null==(a=o.FieldComponentList)||null==(l=a.FieldComponentValue)||null==(e=l.find(e=>e.value===t))?void 0:e.label)||t})(),onChange:r.handleChange,displayEmpty:!0,IconComponent:()=>(0,t.jsx)(q.A,{width:"27px",height:"27px"}),renderValue:e=>e||(0,t.jsx)(N.A,{color:h.Ay.palette.grey[700],children:"Wybierz"}),inputProps:{"aria-label":"Wybierz z listy: ".concat(o.custom_label||o.Label),id:u,"aria-invalid":!!(null==(l=r.errors)?void 0:l[d]),"aria-describedby":"".concat(o.Name,"_error")},children:[(0,t.jsx)(G.A,{value:"",children:(0,t.jsx)(N.A,{color:h.Ay.palette.grey[500],children:"Wyczyść wyb\xf3r"})}),o.FieldComponentList.FieldComponentValue.map(e=>{let{value:l,label:a}=e;return(0,t.jsx)(G.A,{value:l,className:s.option,children:a},l)})]}),(null==(a=r.touched)?void 0:a[d])&&(null==(i=r.errors)?void 0:i[d])&&(0,t.jsx)(O.A,{id:"".concat(o.Name,"_error"),error:!0,children:(null==o?void 0:o.validation_message)||r.errors[d]})]})},eb=e=>{let{field:l,formik:a}=e,[i,o]=(0,m.useState)([]),n=(0,f.A)(),{currentBws:r}=(0,_.Rc)();return(0,m.useEffect)(()=>{(null==r?void 0:r.dedicated_ps_number)&&a.setFieldValue(l.Name,null==r?void 0:r.dedicated_ps_number)},[null==r?void 0:r.dedicated_ps_number]),(0,m.useEffect)(()=>{(async()=>{try{let l=await n.apiModulesBwsRegionList();if(null==l?void 0:l.data){var e;o((null==(e=l.data)?void 0:e.map(e=>({value:e.code,label:e.department})))||[])}else o([])}catch(e){console.log("error",e),o([])}})()},[]),!(null==r?void 0:r.dedicated_ps_number)&&(0,t.jsx)(ec,{field:{...l,FieldComponentList:{FieldComponentValue:i}},formik:a})};var eg=a(57051),ex=a(19828);let eh={mask:"num",lazy:!1,blocks:{num:{mask:Number,scale:2,signed:!1,thousandsSeparator:" ",radix:",",padFractionalZeros:!0}}},ef={mask:"Y-m-d",lazy:!0,overwrite:!0,autofix:!0,blocks:{Y:{mask:ex.Ay.MaskedRange,placeholderChar:"Y",from:1900,to:2999,maxLength:4},m:{mask:ex.Ay.MaskedRange,placeholderChar:"m",from:1,to:12,maxLength:2},d:{mask:ex.Ay.MaskedRange,placeholderChar:"d",from:1,to:31,maxLength:2}},placeholder:"np. 2023-25-01"},ev={mask:"000 000 000",inputAdornment:"+48"},ey={mask:"00 000-00-00",placeholder:"np. 33 861-03-49"},ek={mask:[{mask:""},{...eh,mask:"num PLN"}]},ew={mask:"num",blocks:{num:{mask:Number,scale:0}}},eN={mask:/^[0-9]*$/,placeholder:"np. 1234563218"},e_={mask:/^[0-9]*$/},eA={mask:/^[^0-9]*$/},eC=p()(()=>a.e(1265).then(a.bind(a,61265)),{loadableGenerated:{webpack:()=>[61265]}}),ej=b.Df.withName("PKOBPBwsTextField").create(()=>({inputWrapper:{marginBottom:"22px"},labelWrapper:{display:"flex",alignItems:"center",marginBottom:"2px","& label":{color:h.Ay.palette.text.primary,display:"inline-block",fontSize:"14px",lineHeight:"24px"},"& .pkobp-tooltip":{display:"inline-block",height:"24px",marginLeft:"4px",marginTop:"-2px"}},textField:{width:"100%","& .MuiInputBase-root, &.MuiInputBase-root":{height:"48px",borderRadius:"8px",borderColor:h.Ay.palette.secondary.bordersDark,fontFamily:h.Ay.typography.fontFamily,borderWidth:"1px",borderStyle:"solid","&.Mu
1i-focused":{borderColor:h.Ay.palette.primary.main,borderWidth:"2px",marginRight:"-1px",marginLeft:"-1px"},"&.Mui-error":{borderColor:h.Ay.palette.error.main},"& input:-webkit-autofill":{"-webkit-background-clip":"text"},"& input:-webkit-autofill:hover, & input:-webkit-autofill:focus":{"-webkit-background-clip":"text"}},"& .MuiInputAdornment-root":{marginLeft:"-2px",marginTop:"0",letterSpacing:"-1px",[h.Ay.breakpoints.down("md")]:{marginTop:"1px"}},"& .MuiInputBase-input":{paddingBottom:"15px",paddingTop:"15px"},"& .MuiOutlinedInput-notchedOutline":{border:"none",top:0,"& > *":{lineHeight:"0"}}}})),eF=e=>{let{field:l,formik:a}=e,{classes:i}=ej(),{currentBws:o,updateMaskAfterFormReset:n,setUpdateMaskAfterFormReset:r}=(0,_.Rc)(),s=S(o,l),d=eE(l,a),p=(e=>{var l;return ez(e.Name)?eN:eM(e.Name)?eA:(l=e.FieldFormatType,({[M.Date]:ef,[M.DateTime]:ef,[M.Mobilephone]:ev,[M.Phone]:ey,[M.Currency]:ek,[M.Pesel]:e_,[M.Regon]:e_,[M.Integer]:ew,[M.Decimal]:eh})[l])})(l),u={className:i.input,"aria-label":"Wpisz ".concat(l.custom_label||l.Label),startAdornment:(null==p?void 0:p.inputAdornment)?(0,t.jsx)(eg.A,{position:"start",children:p.inputAdornment}):null};(0,m.useEffect)(()=>{try{let e=document.getElementById(s),l=e.nextSibling.outerHTML.replaceAll("fieldset","div").replaceAll("legend","div");e.nextSibling.outerHTML=l}catch(e){return}},[]);let c=()=>(0,t.jsx)(U.A,{className:i.textField,classes:{root:i.inputRoot},value:a.values[d],onChange:p?null:a.handleChange,id:s,name:l.Name,error:a.touched[d]&&!!a.errors[d]||!1,helperText:a.touched[d]&&a.errors[d]?l.validation_message||a.errors[d]:"",InputProps:{...u,notched:!1}},l.Name),b=(0,m.useCallback)(()=>{r(!1)},[]);return(0,t.jsxs)(x.A,{className:i.inputWrapper,children:[(0,t.jsxs)(x.A,{className:i.labelWrapper,children:[(0,t.jsx)("label",{htmlFor:s,children:l.custom_label||l.Label}),l.custom_tooltip&&(0,t.jsx)(eC,{...{name:"Tooltip for ".concat(l.custom_label||l.Label),symbol:"?",text:l.custom_tooltip},$_ID:s})]}),p?(0,t.jsx)(Z,{...p,inputProps:u,setFormikFieldValue:a.setFieldValue,fieldName:l.Name,shouldUpdateMask:n,onMaskUpdate:b,children:c()}):c()]},l.Name)},eS=e=>{let{field:l,formik:a}=e,[i,o]=(0,m.useState)([]),n=(0,f.A)();return(0,m.useEffect)(()=>{(async()=>{try{let l=await n.apiModulesBwsVoivodeshipList();if(null==l?void 0:l.data){var e;o((null==(e=l.data)?void 0:e.map(e=>({value:e.name,label:e.name})))||[])}else o([])}catch(e){console.log("error",e),o([])}})()},[]),(0,t.jsx)(ec,{field:{...l,FieldComponentList:{FieldComponentValue:i}},formik:a})},eB=(e,l)=>{let a=e.length-1,t=0;for(let i=0;i<a;++i)t+=parseInt(e.charAt(i),10)*l[i];let i=t%11;return(10===i?0:i)===parseInt(e.slice(-1),10)},eT=(e,l)=>e.toString().length===(null==l?void 0:l.length),eL=e=>e.includes("_APR")||e.includes("_APP"),ez=e=>"NIP"===e,eM=e=>"NAME"===e||"SURNAME"===e,eP=e=>{switch(!0){case eL(e.Name)&&e.FieldFormatType!==M.Component&&e.FieldFormatType!==M.Dictionary:return z.Consent;case e.Name.includes("COMPANY-OPERATIONS"):return z.Radio;case e.FieldFormatType===M.Boolean:return z.Boolean;case e.FieldFormatType===M.Component:return z.Select;case e.FieldFormatType===M.Dictionary:return z.PoiButton;case"SURVEY_DATA"===e.Name:return z.CustomSelect;case"PS-ID"===e.Name:return z.RegionSelect;case"SELECT-YOUR-VOIVODSHIP"===e.Name:return z.VoivodeshipSelect;case ez(e.Name):return z.Nip;case"MOBILE-PHONE3"===e.Name:return z.PhoneWithCode;default:return z.Text}},eI=e=>({fieldData:e,fieldType:z.Select,Component:l=>l&&(0,t.jsx)(ec,{field:e,formik:l})}),eR=e=>{let l={},a={};return null==e||e.forEach(e=>{({[z.Consent]:()=>{if(e.custom_agreement){let t=(null==e?void 0:e.error_message)||"Zaakceptowanie zgody jest wymagane.";l[e.Name]=!1,a[e.Name]="true"===e.Required||(null==e?void 0:e.is_required)?g.lc().oneOf([!0],t):g.lc()}},[z.Radio]:()=>{l[e.Name]=null,a[e.Name]="true"===e.Required?g.Yj().nullable().required("Zaznaczenie pola jest wymagane"):g.Yj().nullable()},[z.Boolean]:()=>{l[e.Name]=!1,a[e.Name]="true"===e.Required?g.lc().oneOf([!0],"Zaznaczenie pola jest wymagane"):g.lc()},[z.Select]:()=>{l[e.Name]="",a[e.Name]="true"===e.Required?g.Yj().required("Wybierz wartość dla tego pola"):g.Yj()},[z.CustomSelect]:()=>{l[e.Name]="",a[e.Name]="true"===e.Required?g.Yj().required("Wybierz wartość dla tego pola"):g.Yj()},[z.RegionSelect]:()=>{l[e.Name]="",a[e.Name]="true"===e.Required?g.Yj().required("Wybierz wartość dla tego pola"):g.Yj()},[z.VoivodeshipSelect]:()=>{l[e.Name]="",a[e.Name]="true"===e.Required?g.Yj().required("Wybierz wartość dla tego pola"):g.Yj()},[z.PoiButton]:()=>{l[e.Name]="",a[e.Name]="true"===e.Required?g.Yj().required("Wybierz oddział"):g.Yj()},[z.Nip]:()=>{l[e.Name]="",a[e.Name]=(e=>{let l="true"===e.Required?g.Yj().required("Uzupełnij pole"):g.Yj();return l.test("nipValidator","Niepoprawny numer NIP",e=>!e||(e=>{if("string"!=typeof e||10!==e.length)return!1;e=e.replace(/[\\-]/gi,"");let l=[6,5,7,2,3,4,5,6,7],a=0,t=parseInt(e.substring(9,10)),i=l.length;for(let t=0;t<i;t++)a+=parseInt(e.substr(t,1))*l[t];return a%11===t})(e))||l})(e)},[z.Text]:()=>{l[e.Name]="",a[e.Name]=(e=>{let l="true"===e.Required?g.Yj().required("Uzupełnij pole"):g.Yj();return({[M.Regon]:l.test("regonValidator","Niepoprawny numer REGON",e=>!e||(e=>{if(9!==e.length&&14!==e.length||!/^[0-9]{9,14}$/u.test(e))return!1;let l=[8,9,2,3,4,5,6,7];return 9===e.length?eB(e,l):eB(e.slice(0,9),l)&&eB(e,[2,4,8,5,0,9,7,3,6,1,2,4,8])}
1)(e)),[M.String]:l.matches(/^[a-zA-ZęóąśłżźćńĘÓĄŚŁŻŹĆŃ0-9 '’,.-]*$/,"To pole nie może posiadać specjalnych znak\xf3w"),[M.Pesel]:l.test("peselValidator","Niepoprawny numer PESEL",e=>!e||(e=>{if(!e||e.length<5)return!1;let l=Number(e.substring(2,4));if(!l||l%20>12)return!1;let a=Number(e.substring(4,6));if(!a||a<1||a>31||!/^[0-9]{11}$/u.test(e))return!1;let t=[1,3,7,9],i="".concat(e).split("").map(e=>parseInt(e,10)),[o]=i.splice(-1),n=i.reduce((e,l,a)=>e+l*t[a%4])%10;return 10-(0===n?10:n)===o})(e)),[M.Email]:l.email("Niepoprawny adres email"),[M.Phone]:l.test("phoneMaskValidator","Wprowadź poprawny numer telefonu",e=>!e||eT(ey.mask,e)),[M.Mobilephone]:l.test("mobilePhoneMaskValidator","Wprowadź poprawny numer telefonu",e=>!e||eT(ev.mask,e)),[M.Date]:l.test("dateMaskValidator","Wprowadź poprawną datę",e=>eT(ef.mask,e)),[M.DateTime]:l.test("dateMaskValidator","Wprowadź poprawną datę",e=>!e||eT(ef.mask,e))})[e.FieldFormatType]||l})(e)},[z.PhoneWithCode]:()=>{l[e.Name]="+48",a[e.Name]=(e=>("true"===e.Required?g.Yj().required("Uzupełnij pole"):g.Yj()).test("phone-validation","Wprowadź poprawny numer telefonu",l=>{if(!l)return!e.Required;let a=X.find(e=>l.startsWith(e.value));if(!a)return!1;let t=l.replace(/\s+/g,"");return a.regex.test(t)}))(e)}})[eP(e)]()}),{initialValues:l,validationSchema:a}},eE=(e,l)=>e.Name,eW=(e,l,a)=>{let t=[];return l.forEach(l=>{let i=l.Name,o=e[l.Name],n=("smtp"===a||"bws_smtp"===a)&&l.custom_label||l.Label;if(eL(i))t.push({name:i,value:o?"1":"0",label:n});else if(!l.custom_is_hidden){let e=String(o);if(e="MOBILE-PHONE"===i?e.replaceAll(" ","-"):e,"MOBILE-PHONE3"===i){for(let l of X)if(e.startsWith(l.value)){let a=l.value,t=e.substring(a.length).trim().replaceAll(" ","-");e="".concat(a," ").concat(t);break}}t.push({name:i,value:e,label:n})}}),t};var eD=a(52278),eO=a(68175),eV=a(62088);let e$=["http://www.pkobp.pl.infosite-redesign.local.gke.pkobp.pl/mw/test-formularz-w-body-strony","https://www.pkobp.pl.infosite-redesign.tst.gke.pkobp.pl/testowa-galaz-dev/mateuszw/test-lead-in-hero","https://www.pkobp.pl.infosite-redesign.tst.gke.pkobp.pl/testowa-galaz-dev/mateuszw/test-lead-in-body"],eH=p()(()=>a.e(6219).then(a.bind(a,36219)),{loadableGenerated:{webpack:()=>[36219]}}),eq=p()(()=>a.e(707).then(a.bind(a,73088)),{loadableGenerated:{webpack:()=>[73088]}}),eY=b.Df.withName("PKOBPLeadForm").withNestedSelectors().create(e=>{let{classes:l}=e;return{box:{position:"relative"},box__as_form:{paddingBottom:"32px"},box__as_callme:{"& .customAgreement":{marginTop:"-10px",[h.Ay.breakpoints.down("sm")]:{marginTop:"-6px"},"& .BwsCustomAdditionalAgreements__displayName":{fontSize:"12px",lineHeight:"16px"},"& > button":{display:"block",marginTop:"-5px !important"}},"& .MuiTextField-root p.Mui-error":{marginBottom:"-2px",fontSize:"14px"}},typography:{marginBottom:"16px",[h.Ay.breakpoints.up("sm")]:{marginBottom:"24px"}},typography__isDisplayedAsForm:{[h.Ay.breakpoints.up("sm")]:{marginBottom:"19px"}},typography__isCalendarFormModal:{marginTop:"32px",marginBottom:"26px","& > *":{textAlign:"left !important"},["& .".concat(l.title)]:{fontSize:"20px",lineHeight:"24px",fontWeight:600,marginBottom:"16px !important"}},sendButtonWrapper:{borderTop:"1px solid ".concat(h.Ay.palette.secondary.borders),padding:"16px",[h.Ay.breakpoints.up("sm")]:{padding:"24px 0"}},title:{...h.Ay.typography.h6}}}),eG=e=>{let{bws:l,displayAsForm:a,formTitle:o,formSubtitle:d,formDescription:p,formThankYouMessage:b,formFailureMessage:h,acceptLabel:A,hideSubmitButton:C=!1,isCallmeForm:j=!1,button:F,disableButtonPortal:S,isCalendarFormModal:B,leadInBodyPage:T=!1}=e,{classes:L}=eY(),M=(0,f.A)(),P=(0,u.useRouter)(),R="".concat((0,m.useContext)(w.G),"-").concat(null==l?void 0:l.product_id),{setModalTitle:E,setCurrentResponse:W,setCurrentStage:O,setIsFormSubmitting:$,setCheckAllConsents:q,sendButtonWrapperRef:Y,setUpdateMaskAfterFormReset:G,setPoi:U,onLeadSuccess:K,dictationParticipantId:Z}=(0,_.Rc)(),[X,Q]=(0,m.useState)([]),[el,ea]=(0,m.useState)(!1),[et,ei]=(0,m.useState)(null),[en,er]=(0,m.useState)(null);(0,m.useEffect)(()=>{var e;return(null==l||null==(e=l.field_list)?void 0:e.length)?(T&&E(o),(()=>{let e=(null==l?void 0:l.field_list).reduce((e,l)=>{let a=({[z.Consent]:()=>(e=>{let l=null==e?void 0:e.id;return{fieldData:e,fieldType:z.Consent,error:!l&&"true"===e.Required,Component:l?l=>l&&(0,t.jsx)(H,{field:e,formik:l}):null}})(l),[z.Radio]:()=>(e=>({fieldData:e,fieldType:z.Radio,Component:l=>l&&(0,t.jsx)(ep,{field:e,formik:l})}))(l),[z.Boolean]:()=>(e=>({fieldData:e,fieldType:z.Boolean,Component:l=>l&&(0,t.jsx)(V,{field:e,formik:l})}))(l),[z.Select]:()=>eI(l),[z.PoiButton]:()=>(e=>({fieldData:e,fieldType:z.PoiButton,Component:l=>l&&(0,t.jsx)(eo,{field:e,formik:l})}))(l),[z.CustomSelect]:()=>(e=>{let l=[];return"SURVEY_DATA"===e.Name&&(l=J),{...eI({...e,FieldComponentList:{FieldComponentValue:l}}),fieldType:z.CustomSelect}})(l),[z.RegionSelect]:()=>(e=>({fieldData:e,fieldType:z.RegionSelect,Component:l=>l&&(0,t.jsx)(eb,{field:e,formik:l})}))(l),[z.VoivodeshipSelect]:()=>(e=>({fieldData:e,fieldType:z.VoivodeshipSelect,Component:l=>l&&(0,t.jsx)(eS,{field:e,formik:l})}))(l),[z.Nip]:()=>(e=>({fieldData:e,fieldType:z.Nip,Component:l=>l&&(0,t.jsx)(eF,{field:e,formik:l})}))(l),[z.Text]:()=>(e=>({fieldData:e,fieldType:z.Text,Component:l=>l&&(0,t.jsx)(eF,{field:e,formik:l})}))(l),[z.PhoneWithCode]:()=>(e=>({fieldData:e,fieldType:z.PhoneWithCode,Component:l=>l&&(0,t.jsx)(ee,{field:e,formik:l})}))(l)})[eP(l)]();return e.push(a),e.filter(e=>void 0!==e)},[]).sort((e,l)=>{var a,t;return(null==e||null==(a=e.fieldData)?void 0:a.custom_order)-(null==l||null==(t=l.fieldData)?void 0:t.custom_order)}).filter(e=>{var l;return(null==e||null==(l=e.fieldData)?void 0:l.custom_is_hidden)!==!0&&(null!==e.Component||e.error)});e.find(e=>e.error)?eu("cannot_view_form","Nie udało się wyświetlić formularza."):Q(e)})(),()=>{Q([]),q(!1)}):void 0},[]),(0,m.useEffect)(()=>{var e,a,t;let i=null==(a=window)||null==(e=a.location)?void 0:e.href,o=e$.some(e=>null==i?void 0:i.startsWith(e));if(!(null==l||null==(t=l.field_list)?void 0:t.length)||!T||!o)return;let n=Object.entries(null==P?void 0:P.query).filter(e=>{let[l]=e;return"*"!==l}),r=eR(null==l?void 0:l.field_list).initialValues;
1n.forEach(e=>{let[l,a]=e;if(Object.prototype.hasOwnProperty.call(r,l)){let e=a;l.includes("COMPANY-OPERATIONS")||"1"!==a||(e=!0),l.includes("COMPANY-OPERATIONS")||"0"!==a||(e=!1),r[l]=e}}),er(r)},[P]),(0,m.useEffect)(()=>{$(el)},[el]);let es=(0,s.Wx)({initialValues:en||eR(null==l?void 0:l.field_list).initialValues,validationSchema:g.Ik(eR(null==l?void 0:l.field_list).validationSchema),enableReinitialize:!0,onSubmit:async(e,a)=>{let{resetForm:t}=a,o=null==X?void 0:X.map(e=>e.fieldData),n=eW(e,o,null==l?void 0:l.leadSendType);ea(!0);try{let a={configuration_id:null==l?void 0:l.configuration_id,configuration_version:null==l?void 0:l.configuration_version,fields:n,lead_section_variant_id:null==l?void 0:l.leadSectionVariantId,send_type:(null==l?void 0:l.leadSendType)||null},p=n.find(e=>"MOBILE-PHONE3"===e.name),u=null==p?void 0:p.value;if(null==l?void 0:l.passWids){let e=(e=>{let l=[...eV.N6,eO.lo],a={};return l.forEach(l=>{if((0,eD.hasCookie)(l,eO.U7)){let t=(0,eD.getCookie)(l,eO.U7);"wid"===l&&(t+="|".concat(e)),Object.assign(a,{[l]:t})}}),(0,eD.hasCookie)("wid",eO.U7)||Object.assign(a,{wid:e}),a})(R);u&&(e.wid04=u),Object.assign(a,{wids:e})}else u&&Object.assign(a,{wids:{wid04:u}});(null==l?void 0:l.callMeId)&&Object.assign(a,{callme_id:null==l?void 0:l.callMeId}),((null==l?void 0:l.leadSendType)==="smtp"||(null==l?void 0:l.leadSendType)==="bws_smtp")&&Object.assign(a,{referer:(0,r.A)()?window.location.origin+""+window.location.pathname:""});let m={};if((null==l?void 0:l.leadSendType)==="bws_dictation"){let e={};Z&&(e["x-user-uuid"]=Z),m={headers:e}}let c=await M.apiModulesBwsCreate(a,m),g=null==c?void 0:c.data;if(ea(!1),q(!1),c.ok&&(null==g?void 0:g.ErrorCode)==="0"&&(null==g?void 0:g.ErrorItemList)===null){var s,d;if(eu("success",(null==b?void 0:b.message)||"Wkr\xf3tce zadzwonimy do Ciebie"),v(R,"form-send-success"),((e,l)=>{let a=null==e?void 0:e.reduce((e,l)=>l.value?Object.assign(e,{[l.name]:l.value}):e,{});i.A.get("/media_files/b53a15cc-5c0d-4dc2-a56f-0e929b5e2d2e.jpg",{params:{event:"bws_lead",configuration_id:l,...a}})})(eW(e,o,null==l?void 0:l.leadSendType),null==l?void 0:l.configuration_id),s=null==g?void 0:g.backend_id,d=null==g?void 0:g.ErrorCode,i.A.get("/media_files/b53a15cc-5c0d-4dc2-a56f-0e929b5e2d2e.jpg",{params:{event:"bws_lead_id",id:s,errorcode:d}}),t(),U(null),T&&Object.keys(P.query).some(e=>"*"!==e)){let e=Object.fromEntries(Object.entries(P.query).filter(e=>{let[l]=e;return l.includes("*")}));P.replace({pathname:P.pathname,query:e},void 0,{shallow:!0})}}else c.ok&&(null==g?void 0:g.ErrorCode)!=="0"&&(null==g?void 0:g.ErrorItemList)===null?(eu("error","".concat(null==g?void 0:g.ErrorDescr,". ").concat((null==h?void 0:h.message)||"Nie udało się wysłać formularza, spr\xf3buj ponownie p\xf3źniej",".")),v(R,"form-send-fail")):c.ok&&(null==g?void 0:g.ErrorCode)!=="0"&&(null==g?void 0:g.ErrorItemList)?((e,l,a)=>{let t=[];l.filter(e=>e.fieldType===z.Text).forEach(l=>{var a,i;(null==e||null==(i=e.ErrorItemList)||null==(a=i.ErrorItem)?void 0:a.find(e=>e.Description.includes(l.fieldData.Name)))&&t.push(l.fieldData.Name)}),t.forEach(e=>{a.setFieldError(e,"Niepoprawna wartość pola")})})(g,X,es):(eu("error",(null==h?void 0:h.message)||"Nie udało się wysłać formularza, spr\xf3buj ponownie p\xf3źniej."),v(R,"form-send-fail"))}catch(e){eu("error",(null==h?void 0:h.message)||"Nie udało się wysłać formularza, spr\xf3buj ponownie p\xf3źniej."),v(R,"form-send-fail"),ea(!1),q(!1)}},onReset:()=>{G(!0)}}),ed=()=>{es.submitForm()},eu=(e,l)=>{if("success"===e&&K)return void K();a&&j?W({type:e,message:l}):a?ei({type:e,message:l}):(W({type:e,message:l}),E(""),O(y.p.RESPONSE))};return(0,m.useEffect)(()=>{if((null==es?void 0:es.submitCount)>0&&!(null==es?void 0:es.isValid)&&(null==es?void 0:es.errors)){var e,l;let a=Object.keys(null!=(e=null==es?void 0:es.values)?e:{}).find(e=>e in es.errors);if(a){let e=document.querySelector('[name="'.concat(a,'"]'));null==e||null==(l=e.focus)||l.call(e)}}},[null==es?void 0:es.submitCount,null==es?void 0:es.isValid]),(0,t.jsxs)(x.A,{className:n()(L.box,{[L.box__as_form]:a,[L.box__as_callme]:j}),children:[el&&(0,t.jsx)(k.Ay,{isLoading:el,text:"Trwa przetwarzanie",withOverlay:!0,size:k.iW.LG}),et&&(0,t.jsx)(eq,{...et,onClickCallback:()=>{a&&ei(null)},displayAsForm:a,displayInModal:T,ctaLabel:{success:null==b?void 0:b.ctaLabel,error:null==h?void 0:h.ctaLabel}}),(!et||T)&&(0,t.jsxs)(t.Fragment,{children:[a&&o&&!T&&(0,t.jsxs)(x.A,{className:n()(L.typography,{[L.typography__isDisplayedAsForm]:a,[L.typography__isCalendarFormModal]:B}),children:[(0,t.jsx)(N.A,{variant:"body1",align:"center",marginTop:0,marginBottom:6,cy:"title",className:L.title,children:(0,t.jsx)("span",{dangerouslySetInnerHTML:{__html:o}})}),d&&(0,t.jsx)(N.A,{variant:"body2",align:"center",marginTop:0,marginBottom:5,weight:300,cy:"text",children:(0,t.jsx)("span",{dangerouslySetInnerHTML:{__html:d}})}),p&&(0,t.jsx)(N.A,{variant:"body2",align:"center",marginTop:0,marginBottom:5,weight:300,cy:"text",children:(0,t.jsx)("span",{dangerouslySetInnerHTML:{__html:p}})})]}),(0,t.jsx)(I,{formik:es,formikFields:X,idGTM:R,isCallmeForm:j,acceptLabel:A}),(0,t.jsx)(D,{bws:l,isCallmeForm:j}),a&&!C&&(Y.current&&!S?(0,c.createPortal)((0,t.jsx)(x.A,{className:L.sendButtonWrapper,children:(0,t.jsx)(eH,{onClick:ed,btnSettings:F})}),Y.current):(0,t.jsx)(eH,{onClick:ed,btnSettings:F}))]})]})}}}]);

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.