1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2098,7515],{17515:(e,a,s)=>{"use strict";s.r(a),s.d(a,{default:()=>d});var t=s(37876),r=s(14232),l=s(5068),n=s(88992),c=s(89099),i=s(78229),o=s(28322);function d({contact:e}){let[a,s]=(0,r.useState)(),[m,u]=(0,r.useState)(),[h,p]=(0,r.useState)(!1),[g,x]=(0,r.useState)(!1),[f,y]=(0,r.useState)(""),[j,v]=(0,r.useState)(!0),N=(0,c.useRouter)(),b=(0,r.useRef)(null),{reset:_,register:E,handleSubmit:k,formState:{errors:w}}=(0,n.mN)();return(0,r.useEffect)(()=>{(0,l.A)({url:"https://cms.eichertrucksandbuses.com/webapi/common",method:"GET",headers:{api_key_etbkey201:"api_hdy73_ssDtokan5590333344agjd625983762jh"}}).then(e=>{s(e.data.common_settings.states),u(e.data.common_settings.contact_subjects)}).catch(e=>console.log(e))},[]),(0,r.useEffect)(()=>{let e=document.querySelector(".onlyemail"),a=document.getElementById("phone_num"),s=document.querySelectorAll("input, textarea"),t=document.getElementById("message_val");document.querySelectorAll("select").forEach(function(e){e.addEventListener("change",o.L4)});let r=e=>{(0,o.Vk)(e,a)};return e&&e.addEventListener("keyup",o.zQ),a&&a.addEventListener("keypress",r),t&&t.addEventListener("keypress",o.Xr),s.forEach(e=>{e.addEventListener("cut",o.Zb),e.addEventListener("copy",o.Zb),e.addEventListener("paste",o.Zb)}),document.querySelectorAll("#first_name, #city_alpha").forEach(function(e){e.addEventListener("keypress",o.Mo)}),()=>{e&&e.removeEventListener("keyup",o.zQ),a&&a.removeEventListener("keypress",r),t&&t.removeEventListener("keypress",o.Xr),s.forEach(e=>{e.removeEventListener("cut",o.Zb),e.removeEventListener("copy",o.Zb),e.removeEventListener("paste",o.Zb)})}},[]),(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("section",{className:"contact-section com-pad",children:[(0,t.jsx)("div",{className:"wrapper",children:(0,t.jsx)("div",{className:"section-title text-center",children:(0,t.jsx)("h1",{className:"heading-red font-normal",dangerouslySetInnerHTML:{__html:e?.page_data?.page_content}})})}),(0,t.jsx)("div",{className:"bg-grey contact-form com-pad borderbtform",children:(0,t.jsx)("div",{className:"wrapper",children:(0,t.jsx)("form",{onSubmit:k(e=>{let a=b.current.getValue();b.current.reset();var s=new FormData;"Product & Price Enquiry"==e.subject?s.append("category",e.category):s.append("category",""),s.append("name",e.name),s.append("contact_number",e.contact_number),s.append("email",e.email),s.append("state",e.state),s.append("city",e.city),s.append("you_want_to_contact_us_for",e.subject),s.append("message",e.message),s.append("g-recaptcha-response",a),s.append("source","Email"),(0,l.A)({url:"https://cms.eichertrucksandbuses.com/webapi/contact_us",method:"POST",headers:{api_key_etbkey201:"api_hdy73_ssDtokan5590333344agjd625983762jh"},data:s}).then(e=>{""===f?(v(!1),p(!1)):(_(),N.push("/thank-you"),p(!1),v(!0)),p(!1)}).catch(e=>{console.log(e)})}),autoComplete:"off",children:(0,t.jsxs)("div",{className:"row",children:[(0,t.jsx)("div",{className:"col-lg-4 col-md-6",children:(0,t.jsxs)("div",{className:"form-group",children:[(0,t.jsx)("label",{className:"input_label",children:"Name*"}),(0,t.jsx)("input",{className:"input-field",type:"text",placeholder:"Enter Your Name",name:"name",id:"first_name",maxLength:30,...E("name",{required:"Please Enter Your Name"})}),(0,t.jsx)("span",{className:"error",children:w.name?.message})]})}),(0,t.jsx)("div",{className:"col-lg-4 col-md-6",children:(0,t.jsxs)("div",{className:"form-group",children:[(0,t.jsx)("label",{className:"input_label",children:"Contact Number*"}),(0,t.jsx)("input",{className:"input-field",type:"text",placeholder:"Enter Your Contact Number",name:"contact_number",maxLength:10,id:"phone_num",...E("contact_number",{required:"Please Enter Contact Number",pattern:{value:/^[6-9]\d{9}$/,message:"Not A Valid Number"}})}),(0,t.jsx)("span",{className:"error",children:w.contact_number?.message})]})}),(0,t.jsx)("div",{className:"col-lg-4 col-md-6",children:(0,t.jsxs)("div",{className:"form-group",children:[(0,t.jsx)("label",{className:"input_label",children:"Email*"}),(0,t.jsx)("input",{className:"input-field onlyemail",type:"text",placeholder:"Enter Your Email Id",name:"email",maxLength:50,...E("email",{required:"Please Enter Your Email Id",pattern:{value:/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,message:"Please Enter Valid Email Address."}})}),(0,t.jsx)("span",{className:"error",children:w.email?.message})]})}),(0,t.jsx)("div",{className:"col-lg-4 col-md-6",children:(0,t.jsxs)("div",{className:"form-group",children:[(0,t.jsx)("label",{className:"input_label",children:"State*"}),(0,t.jsxs)("select",{name:"state",className:"input-field",...E("state",{required:"Please Select State"}),children:[(0,t.jsx)("option",{value:"",children:"Select Your State"}),a?.map((e,a)=>(0,t.jsx)("option",{value:e,children:e},a))]}),(0,t.jsx)("span",{className:"error",children:w.state?.message})]})}),(0,t.jsx)("div",{className:"col-lg-4 col-md-6",children:(0,t.jsxs)("div",{className:"form-group",children:[(0,t.jsx)("label",{className:"input_label",children:"City*"}),(0,t.jsx)("input",{className:"input-field",type:"text",placeholder:"Enter Your City",name:"city",id:"city_alpha",maxLength:25,...E("city",{required:"Please Enter City Name"})}
1),(0,t.jsx)("span",{className:"error",children:w.city?.message})]})}),(0,t.jsx)("div",{className:"col-lg-4 col-md-6",children:(0,t.jsxs)("div",{className:"form-group",children:[(0,t.jsx)("label",{className:"input_label",children:"Subject*"}),(0,t.jsxs)("select",{name:"subject",className:"input-field",...E("subject",{required:"Please Select Subject",onChange:e=>{"Product & Price Enquiry"==e.target.value?x(!0):x(!1)}}),children:[(0,t.jsx)("option",{value:"",children:"Select Subject*"}),m?.map((e,a)=>(0,t.jsx)("option",{value:e,children:e},a))]}),(0,t.jsx)("span",{className:"error",children:w.subject?.message})]})}),(0,t.jsx)("div",{className:`col-lg-4 col-md-6 ${g?"":"hideCatData"}`,children:(0,t.jsxs)("div",{className:"form-group",children:[(0,t.jsx)("label",{className:"input_label",children:"Category"}),(0,t.jsxs)("select",{name:"category",className:"input-field",...E("category"),children:[(0,t.jsx)("option",{value:"",children:"Select Category"}),(0,t.jsx)("option",{value:"Heavy Duty",children:"Heavy Duty"}),(0,t.jsx)("option",{value:"Light & medium Duty",children:"Light & medium Duty"}),(0,t.jsx)("option",{value:"Buses",children:"Buses"})]})]})}),(0,t.jsx)("div",{className:"col-lg-12 col-md-12",children:(0,t.jsxs)("div",{className:"form-group text-area",children:[(0,t.jsx)("label",{className:"input_label",children:"Message*"}),(0,t.jsx)("textarea",{className:"input-field",placeholder:"Enter Message",name:"message",id:"message_val",...E("message",{required:"Please Enter Message"})}),(0,t.jsx)("span",{className:"error",children:w.message?.message})]})}),(0,t.jsx)("div",{className:"col-lg-12 col-md-12",children:(0,t.jsxs)("div",{className:"disclaimer-area form-group text-area",children:[(0,t.jsx)("p",{className:"disclaimer-text",children:"Disclaimer: By signing this form/checking this box, you acknowledge and agree that we may use the information you share with us, to communicate with you through e-mails, text messages, WhatsApp and calls, in order to provide our product or service-related information and/or for promotional and marketing purposes. All information provided will be secured and processed as per our privacy policy."}),(0,t.jsxs)("label",{children:[(0,t.jsx)("input",{type:"checkbox",name:"terms",...E("terms",{required:"Please accept the T&C and Privacy Policy"})}),(0,t.jsxs)("span",{children:["By submitting, I accept the ",(0,t.jsx)("a",{title:"Terms and Conditions",target:"_blank",href:"/legal-disclaimer",children:"T&C"})," and ",(0,t.jsx)("a",{title:"Privacy Policy",target:"_blank",href:"/privacy-policy",children:"Privacy Policy"})]})]}),(0,t.jsx)("span",{className:"error",children:w.terms?.message})]})}),(0,t.jsx)("div",{className:"col-lg-12 col-md-12",children:(0,t.jsxs)("div",{className:"form-group text-area",children:[(0,t.jsx)("div",{className:"captcha",children:(0,t.jsx)(i.A,{sitekey:"6LeF00shAAAAAP82rfORQruMTTsE2MNW0vnwbhmv",onChange:e=>{y(e),v(!0)},ref:b})}),j?"":(0,t.jsx)("span",{className:"error",children:"Please validate the captcha field before submitting your request"})]})}),(0,t.jsx)("div",{className:"col-lg-12 col-md-12",children:(0,t.jsx)("div",{className:"form-group",children:(0,t.jsxs)("button",{onClick:()=>{""==f&&v(!1)},className:"default-btn mainColorBtn",type:"submit",children:["Submit",(0,t.jsx)("span",{children:(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20.243",height:"13.501",viewBox:"0 0 20.243 13.501",children:(0,t.jsx)("path",{id:"Icon_ionic-ios-arrow-round-forward","data-name":"Icon ionic-ios-arrow-round-forward",d:"M20.784,11.51a.919.919,0,0,0-.007,1.294l4.275,4.282H8.782a.914.914,0,0,0,0,1.828H25.045L20.77,23.2a.925.925,0,0,0,.007,1.294.91.91,0,0,0,1.287-.007l5.794-5.836h0a1.026,1.026,0,0,0,.19-.288.872.872,0,0,0,.07-.352.916.916,0,0,0-.26-.64l-5.794-5.836A.9.9,0,0,0,20.784,11.51Z",transform:"translate(-7.875 -11.252)"})})})]})})})]})})})})]})})}},28322:(e,a,s)=>{"use strict";function t(e){let a=String.fromCharCode(e.which||e.keyCode);return!!/^[a-zA-Z0-9\s]+$/.test(a)||(e.preventDefault(),!1)}function r(){let e=document.querySelector(".ul-specs-filter .swiper-slide:nth-child(1)");e&&(e.style.background="#000",e.style.color="#fff")}function l(e){document.querySelectorAll(".ul-specs-filter .swiper-slide").forEach(a=>{a===e.currentTarget?(a.style.background="#000",a.style.color="#fff"):(a.style.background="#fff",a.style.color="#000")})}function n(e){var a=e.which||e.keyCode;return 32===a||a>=65&&a<=90||a>=97&&a<=122||(e.preventDefault(),!1)}function c(e){e.target.value=e.target.value.replace(/[^0-9A-Za-z@.]/g,"")}function i(e,a){let s=e.which||e.keyCode;8!==s&&0!==s&&(s<48||s>57)&&e.preventDefault(),a.value.length>=10&&e.preventDefault()}function o(e){e.preventDefault()}function d(e){String.fromCharCode(e.which?e.which:e.keyCode).match(/[^0-9]/g)&&e.preventDefault()}function m(e){e.target.style.color="#000",e.target.style.fontWeight="normal",e.target.style.fontStyle="normal"}s.d(a,{L4:()=>m,Mo:()=>n,Rf:()=>r,Vk:()=>i,Xr:()=>t,Zb:()=>
1o,cJ:()=>l,si:()=>d,zQ:()=>c})},78920:(e,a,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/contact/component/ContactFormMail",function(){return s(17515)}])}},e=>{e.O(0,[8220,5068,8992,8229,636,6593,8792],()=>e(e.s=78920)),_N_E=e.O()}]);
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.