(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[34253],{95707:function(e,a,n){Promise.resolve().then(n.bind(n,14908))},96622:function(e,a,n){"use strict";n.d(a,{Z:function(){return r}});var t=n(57437),l=n(2265),i=n(44811),s=n(44800),o=n(18856);function r(e){var a;let{handleSubmit:n,recaptchaAction:r,children:d,errorMessage:c,...u}=e,[m,p]=(0,l.useState)(!1),{setToast:v}=(0,o.h)(),b=()=>v(void 0),[f,y]=(0,l.useState)(),[g,h]=(0,l.useState)(!1),x=(0,l.useCallback)(e=>{y(e)},[]);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.mP,{action:r,onVerify:x,refreshReCaptcha:g}),(0,t.jsx)(i.Z,{...u,onClick:()=>{f?n():(v({open:!0,onClose:b,toast:c,alertSeverity:"error"}),p(!0)),h(e=>!e)},disabled:null!==(a=u.disabled)&&void 0!==a?a:m,children:d})]})}},78349:function(e,a,n){"use strict";n.d(a,{Z:function(){return y}});var t=n(57437),l=n(49371),i=n(53984),s=n(12345),o=n(27815),r=n(63832),d=n(11953),c=n(89902),u=n(41327),m=n(12713),p=n(46387),v=n(29501);let b=(0,t.jsx)(s.Z,{fontSize:"small"}),f=(0,t.jsx)(i.Z,{fontSize:"small"});function y(e){let{label:a,name:n="autocomplete",options:i=[],renderOptionWithCheckbox:s,required:y=!1,disabled:g=!1,rules:h,defaultValue:x,multiple:_=!0,disableCloseOnSelect:Z=!1,limitTags:j,filledVariant:P}=e,{control:C}=(0,v.Gc)();return(0,t.jsx)(u.Z,{fullWidth:!0,children:(0,t.jsx)(v.Qr,{name:n,control:C,rules:h,render:e=>{let{field:{onChange:u,value:v},fieldState:{error:h}}=e;return(0,t.jsx)(o.Z,{disableCloseOnSelect:Z,multiple:_,disabled:g,id:"autocomplete-".concat(n),"data-testid":"FormAutocomplete-".concat(n),options:null!=i?i:[],getOptionLabel:e=>(null==e?void 0:e.label)?null==e?void 0:e.label:(null==e?void 0:e.name)?null==e?void 0:e.name:"",isOptionEqualToValue:(e,a)=>(null==e?void 0:e.value)===(null==a?void 0:a.value),value:v||null,limitTags:j,defaultValue:x,onChange:(e,a)=>{u(a)},renderInput:e=>(0,t.jsx)(m.Z,{...e,variant:P?"filled":"outlined",error:!!h,label:a,className:P?"":"inputAutoCompleteStyle",required:y,helperText:(null==h?void 0:h.message)?"Please select a ".concat(a):"",name:n}),renderOption:s?(e,a)=>{var n,l;return(0,t.jsxs)(r.Z,{component:"li","data-testid":null!==(n=null==a?void 0:a.label)&&void 0!==n?n:null==a?void 0:a.name,...e,children:[(0,t.jsx)(d.Z,{icon:b,checkedIcon:f,checked:!!e["aria-selected"]}),(0,t.jsx)(p.Z,{className:"ml-2",children:null!==(l=null==a?void 0:a.label)&&void 0!==l?l:null==a?void 0:a.name})]})}:void 0,renderTags:(e,a)=>e.map((e,n)=>{var i;let{key:s,className:o,...r}=a({index:n});return(0,t.jsx)(c.Z,{label:null!==(i=null==e?void 0:e.label)&&void 0!==i?i:null==e?void 0:e.name,variant:"filled",color:"success",deleteIcon:(0,t.jsx)(l.Z,{}),className:"".concat(o," ").concat(P?"mt-2":""),...r},s)}),className:P?"":"mb-0 mt-0 bg-portalWhite customInputLabelRoot customFilledInput"})}})})}},96658:function(e,a,n){"use strict";n.d(a,{p:function(){return o}});var t=n(57437),l=n(41327),i=n(63582),s=n(34045);let o=e=>{let{groupMargin:a="md",fieldGap:n=4,children:o}=e;return(0,t.jsx)(l.Z,{component:"fieldset",sx:{...s.C.mb[a],...s.C.wFull},children:(0,t.jsx)(i.Z,{gap:n,children:o})})}},16670:function(e,a,n){"use strict";n.d(a,{w:function(){return f}});var t=n(57437),l=n(64393),i=n(63832),s=n(69459),o=n(41327),r=n(85860),d=n(62069),c=n(13936),u=n(26225),m=n(29501),p=n(88550),v=n(34045),b=e=>({fontWeight:e?700:400,...v.C.mb.xs,fontSize:e?16:14});let f=e=>{let{name:a,label:n,options:v,required:f=!1,mainQuestion:y=!1,dataTestId:g,...h}=e,{control:x,getValues:_}=(0,m.Gc)(),Z=()=>v.map(e=>(0,t.jsx)(d.ZP,{item:!0,xs:12,md:(null==v?void 0:v.length)===2?4.5:2.7,children:(0,t.jsx)(r.Z,{value:e.value,label:e.label,control:(0,t.jsx)(c.Z,{inputProps:{"aria-label":"".concat(a,"-").concat(e.value)}}),"data-testid":"FormRadioInput-Label-".concat(e.name),sx:p.p.radioLabel})},e.name));return(0,t.jsx)(m.Qr,{name:a,control:x,render:e=>{var r;let{field:c,fieldState:{error:m}}=e;return(0,t.jsxs)(o.Z,{required:f,fullWidth:!0,children:[(0,t.jsx)(l.Z,{id:"".concat(a),sx:b(y),"data-testid":"".concat(g,"-label"),children:n}),(0,t.jsx)(u.Z,{...c,...h,value:null!==(r=_(a))&&void 0!==r?r:"",children:(0,t.jsx)(d.ZP,{container:!0,gap:4,children:Z()})}),(null==m?void 0:m.message)&&(0,t.jsx)(i.Z,{sx:p.p.helperStyles,children:(0,t.jsx)(s.Z,{error:!0,filled:!0,children:"Please select a ".concat(a)})})]})}})}},14908:function(e,a,n){"use strict";n.d(a,{default:function(){return E}});var t=n(57437),l=n(2265),i=n(63832),s=n(44811),o=n(46387),r=n(63582),d=n(62069),c=n(99376),u=n(29501),m=n(36696),p=n.n(m),v=n(96622),b=n(78349),f=n(96658),y=n(16670),g=n(63537),h=n(62762),x=n(49765),_=n(36233),Z=n(72352),j=n(35611);let P="sales_contact_topics_demo",C="sales_contact_topics_trial",S=()=>[{name:"demo",label:"Demo",value:P},{name:"callBack",label:"Call Back",value:"sales_contact_topics_call_back"},{name:"trial",label:"Trial",value:C},{name:"moreInfo",label:"More Info",value:"sales_contact_topics_more_info"},{name:"other",label:"Other",value:"sales_contact_topics_other"}];var w=n(15731),q=n(18856),N=n(73842),k=n(34422),I=n(7182);let M={firstName:(0,k.Z_)().required("First Name is required"),lastName:(0,k.Z_)().required("Last Name is required"),companyName:(0,k.Z_)().required("Please enter a company name"),emailAddress:(0,k.Z_)().email("Please enter a valid email address").required("An email address is required"),phoneNumber:(0,k.Z_)().required("Phone Number is required").test("No Polish Chars","Number format is wrong",e=>(0,I.H)(e)),country:(0,k.Z_)().required("Please select a valid country"),addressLine1:(0,k.Z_)(),addressLine2:(0,k.Z_)(),city:(0,k.Z_)(),postCode:(0,k.Z_)(),topic:(0,k.Z_)().required("Please select a topic"),productIds:(0,k.IX)().of((0,k.Ry)({label:(0,k.Z_)(),name:(0,k.Z_)(),value:(0,k.Z_)()})).when("topic",{is:e=>[P,C].includes(e),then:e=>e.min(1,"Please select at least one product")}),message:(0,k.Z_)().required("Please enter a message").test("not-only-spaces","This field cannot be left blank or filled with only spaces. Please review and enter a valid content.",e=>!e||""!==e.trim()),marketingConsentCheckboxLabel:(0,k.O7)(),state:(0,k.Z_)().when("country",{is:e=>j.uz.includes(e),then:e=>e.required("Please select a valid state")}),industry:(0,k.Z_)().required("Please select an industry")},L=(0,k.Ry)(M),O=(0,N.X)(L);var A=n(98443);function E(e){var a,n,m,N,k,I,M,L,E;let{productSlug:z,productOptions:G=[],user:T}=e,D=(0,c.useRouter)(),{setToast:F,clearToast:R}=(0,q.h)(),V=(0,u.cI)({resolver:O,mode:"onChange",reValidateMode:"onChange",defaultValues:{productIds:G.filter(e=>z===e.value),firstName:null==T?void 0:T.first_name,lastName:null==T?void 0:T.last_name,companyName:null==T?void 0:null===(n=T.misc)||void 0===n?void 0:null===(a=n.onboarding_data)||void 0===a?void 0:a.company_name,emailAddress:null==T?void 0:T.email,phoneNumber:null==T?void 0:T.phone_number,country:null==T?void 0:T.country,industry:null==T?void 0:null===(N=T.misc)||void 0===N?void 0:null===(m=N.onboarding_data)||void 0===m?void 0:m.industry,state:null==T?void 0:null===(I=T.misc)||void 0===I?void 0:null===(k=I.onboarding_data)||void 0===k?void 0:k.state}}),{watch:Q,formState:{errors:W,isValid:U,isLoading:B},setValue:Y}=V,H=Q("country");async function X(){F({open:!0,toast:"Sorry. Something went wrong when submitting the form. Please try again.",alertSeverity:"error",onClose:R})}async function $(e){try{var a;j.uz.includes(e.country)||delete e.state,e.state&&(e.state=p().normalize(e.state)),e.marketingConsentCheckboxLabel=!!e.marketingConsentCheckboxLabel,e.topic=(null===(a=S().find(a=>{let{value:n}=a;return n===e.topic}))||void 0===a?void 0:a.label)||"-",await fetch(w.Z.appendBasePortalPath("/api/forms/sales"),{method:"POST",body:JSON.stringify(e)}),(0,A.L)("Sales Contact request:",{category:e.topic,products:e.productIds}),F({open:!0,toast:"Your message was successfully sent",alertSeverity:"success",onClose:R}),D.push("/")}catch(e){F({open:!0,toast:"Sorry. Something went wrong when submitting the form. Please try again.",alertSeverity:"error",onClose:R})}}return(0,l.useEffect)(()=>{H!==(null==T?void 0:T.country)&&Y("state","")},[H]),(0,t.jsxs)(i.Z,{className:"relative w-full px-10 py-10",children:[(0,t.jsx)(s.Z,{variant:"text",color:"primary",onClick:()=>D.back(),"data-testid":"contactsalesform-cta-back",children:"Back"}),(0,t.jsxs)(i.Z,{className:"my-0 mx-auto mb-10 max-w-[550px]",children:[(0,t.jsx)(o.Z,{variant:"h3",className:"mb-16","data-testid":"contactsalesform-title",children:"Contact the sales team"}),(0,t.jsxs)(u.RV,{...V,children:[(0,t.jsx)(o.Z,{"data-testid":"contactsalesform-about-heading",variant:"bodyS",className:"mb-6 font-normal",children:"About you"}),(0,t.jsxs)(f.p,{fieldGap:4,groupMargin:"lg",children:[(0,t.jsxs)(r.Z,{direction:"row",gap:5,children:[(0,t.jsx)(h.Z,{name:"firstName",label:"First name",inputProps:{"data-testid":"contactsalesform-first-name"},required:!0}),(0,t.jsx)(h.Z,{name:"lastName",label:"Last name",inputProps:{"data-testid":"contactsalesform-last-name"},required:!0})]}),(0,t.jsx)(h.Z,{name:"companyName",label:"Company name",inputProps:{"data-testid":"contactsalesform-company-name"},required:!0}),(0,t.jsx)(h.Z,{name:"emailAddress",inputMode:"email",label:"Email address",inputProps:{"data-testid":"contactsalesform-email"},required:!0}),(0,t.jsx)(h.Z,{name:"phoneNumber",inputMode:"tel",label:"Phone number",inputProps:{"data-testid":"contactsalesform-phone-number"},required:!0}),(0,t.jsx)(g.i,{label:"Industry","data-testid":"contactsalesform-industry",name:"industry",options:(0,Z.mN)(),required:!0})]}),(0,t.jsxs)(f.p,{fieldGap:4,groupMargin:"lg",children:[(0,t.jsx)(o.Z,{"data-testid":"contactsalesform-address-heading",variant:"bodyS",className:"mb-2 font-normal",children:"Your address"}),(0,t.jsx)(_.M,{name:"country",label:"Country","data-testid":"contactsalesform-country",required:!0}),j.uz.includes(H)&&(0,t.jsx)(g.i,{name:"state",label:"United States"===H?"State":"Province","data-testid":"contactsalesform-state",required:!0,options:"United States"===H?j.Qs:j.z$}),(0,t.jsx)(h.Z,{name:"addressLine1",label:"Address line 1",inputProps:{"data-testid":"contactsalesform-address-line-one"}}),(0,t.jsx)(h.Z,{name:"addressLine2",label:"Address line 2",inputProps:{"data-testid":"contactsalesform-address-line-two"}}),(0,t.jsxs)(r.Z,{direction:"row",gap:5,children:[(0,t.jsx)(h.Z,{name:"city",label:"City",inputProps:{"data-testid":"contactsalesform-city"}}),(0,t.jsx)(h.Z,{name:"postCode",label:"United States"===H?"Zip Code":"Postcode",inputProps:{"data-testid":"contactsalesform-post-code"},error:!!W.postCode,helperText:null!==(E=null===(L=W.postCode)||void 0===L?void 0:null===(M=L.message)||void 0===M?void 0:M.toString())&&void 0!==E?E:""})]})]}),(0,t.jsx)(f.p,{fieldGap:4,groupMargin:"lg",children:(0,t.jsx)(d.ZP,{container:!0,children:(0,t.jsx)(d.ZP,{item:!0,xs:12,className:"mb-0",children:(0,t.jsx)(y.w,{name:"topic",options:S(),label:"Please select a topic ","data-testid":"contactsalesform-topics-heading",required:!0})})})}),(0,t.jsx)(f.p,{fieldGap:4,groupMargin:"md",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Z,{"data-testid":"contactsalesform-products-heading",variant:"bodyS",className:"font-normal mb-2",children:"Which products are you interested in?"}),(0,t.jsx)(b.Z,{label:"Product(s)",options:G,name:"productIds",required:[P,C].includes(Q("topic")),filledVariant:!0,renderOptionWithCheckbox:!0,disableCloseOnSelect:!0,limitTags:2})]})}),(0,t.jsx)(f.p,{groupMargin:"sm",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Z,{"data-testid":"contactsalesform-message-heading",variant:"bodyS",className:"font-normal mb-2",children:"Nature of request"}),(0,t.jsx)(h.Z,{name:"message",label:(0,t.jsx)(o.Z,{variant:"bodyS",component:"span",children:"Your message..."}),inputProps:{"data-testid":"contactsalesform-message"},multiline:!0,required:!0})]})}),(0,t.jsx)(i.Z,{className:"mb-6",children:(0,t.jsx)(x.Z,{name:"marketingConsentCheckboxLabel",label:"I consent to receive electronic marketing communications on products, services, publications and events",datatestid:"contactsalesform-marketing-consent-checkbox",required:!1})}),(0,t.jsx)(r.Z,{direction:"row",justifyContent:"flex-end",children:(0,t.jsx)(v.Z,{recaptchaAction:"productSales",handleSubmit:V.handleSubmit($,X),id:"submit-btn",variant:"contained",disabled:!U||B,color:"secondary",size:"large","data-testid":"contactsalesform-cta-submit",children:"Submit"})})]})]})]})}},72352:function(e,a,n){"use strict";n.d(a,{$F:function(){return l},dy:function(){return i},mN:function(){return t},nj:function(){return s}});let t=()=>[{_id:"aerospace",name:"aerospace",label:"Aerospace",value:"aerospace"},{_id:"automotive",name:"automotive",label:"Automotive",value:"automotive"},{_id:"consumer-products",name:"consumer-products",label:"Consumer Products",value:"consumer-products"},{_id:"defence",name:"defence",label:"Defence",value:"defence"},{_id:"education",name:"education",label:"Education",value:"education"},{_id:"electronics",name:"electronics",label:"Electronics",value:"electronics"},{_id:"energy-and-power-generation",name:"energy-and-power-generation",label:"Energy and Power Generation",value:"energy-and-power-generation"},{_id:"general-manufacturing",name:"general-manufacturing",label:"General Manufacturing",value:"general-manufacturing"},{_id:"government",name:"government",label:"Government",value:"government"},{_id:"industrial-equipment",name:"industrial-equipment",label:"Industrial Equipment",value:"industrial-equipment"},{_id:"intermediaries",label:"Intermediaries",name:"intermediaries",value:"intermediaries"},{_id:"marine",name:"marine",label:"Marine",value:"marine"},{_id:"medical",name:"medical",label:"Medical",value:"medical"},{_id:"non-manufacturing",name:"non-manufacturing",label:"Non-Manufacturing",value:"non-manufacturing"},{_id:"railways",name:"railways",label:"Railways",value:"railways"}],l=()=>[{_id:"executive-director",name:"executive-director",label:"Executive/Director",value:"Executive/Director"},{_id:"manager",name:"manager",label:"Manager",value:"Manager"},{_id:"engineer",name:"engineer",label:"Engineer",value:"Engineer"},{_id:"designer",name:"designer",label:"Designer",value:"Designer"},{_id:"quality-analyst",name:"quality-analyst",label:"Quality Analyst",value:"Quality Analyst"}],i=()=>[{_id:"unknown",name:"unknown",label:"Unknown",value:"Unknown"},{_id:"self-employed",name:"self-employed",label:"Self-employed",value:"Self-employed"},{_id:"1-10-employees",name:"1-10-employees",label:"1-10 employees",value:"1-10-employees"},{_id:"11-50-employees",name:"11-50-employees",label:"11 - 50 employees",value:"11-50-employees"},{_id:"51-200-employees",name:"51-200-employees",label:"51 - 200 employees",value:"51-200-employees"},{_id:"201-500-employees",name:"201-500-employees",label:"201 - 500 employees",value:"201-500-employees"},{_id:"501-1000-employees",name:"501-1000-employees",label:"501 - 1000 employees",value:"501-1000-employees"},{_id:"1001-5000-employees",name:"1001-5000-employees",label:"1001 - 5000 employees",value:"1001-5000-employees"},{_id:"5001-10,000-employees",name:"5001-10,000-employees",label:"5001 - 10,000 employees",value:"5001-10,000-employees"},{_id:"10,001+-employees",name:"10,001+-employees",label:"10,001+ employees",value:"10,001+-employees"}],s=()=>[{value:"design",label:"Design",name:"Design"},{value:"manufacturing",label:"Manufacturing",name:"Manufacturing"},{value:"operations",label:"Operations",name:"Operations"},{value:"platform",label:"Platform",name:"Platform"},{value:"quality",label:"Quality",name:"quality"},{value:"simulation",label:"Simulation",name:"Simulation"}]},7182:function(e,a,n){"use strict";n.d(a,{H:function(){return l},u:function(){return t}});let t={message:"ecom.address.validation.phoneOnly"},l=e=>/^\+?\d{1,4}?[-.\s]?\(?\d{1,3}?\)?[-.\s]?\d{1,4}[-.\s]?\d{1,4}[-.\s]?\d{1,9}/g.test(e)},98443:function(e,a,n){"use strict";n.d(a,{L:function(){return t}});let t=(e,a)=>{window.gtag&&window.gtag("event",e,a)}}},function(e){e.O(0,[16344,13760,24130,33976,62069,41836,89902,34156,10337,91291,57145,29501,98534,68218,33833,54719,24715,14025,27815,23758,40084,33269,92971,52117,1744],function(){return e(e.s=95707)}),_N_E=e.O()}]);