1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[656],{656:function(e,t,l){l.r(t),l.d(t,{Form:function(){return Form}});var s=l(5893),a=l(7294),n=l(5675),r=l.n(n),i=l(7536),d=l(4360),o=l(9669),m=l.n(o),x=l(1163),c=l(306),u=l(2532);function Form(e){var t,l,n,o,p,h,f,b,v,j,N,w,g,y,k;let{fixedProduct:q}=e,S=(0,x.useRouter)(),[P,C]=(0,a.useState)(""),[F,L]=(0,a.useState)(!0),[_,E]=(0,a.useState)(!1),[T,O]=(0,a.useState)(""),[Z,A]=(0,a.useState)(""),[I,z]=(0,a.useState)(!1),M=(0,a.useRef)(null),{handleSubmit:R,register:V,setValue:$,watch:U,formState:W,formState:{errors:B}}=(0,i.cI)({mode:"onChange"});(0,a.useEffect)(()=>{V("b6",{required:!0})},[V]),(0,a.useEffect)(()=>{function handleClickOutside(e){M.current&&!M.current.contains(e.target)&&z(!1)}return document.addEventListener("mousedown",handleClickOutside),()=>{document.removeEventListener("mousedown",handleClickOutside)}},[]),(0,a.useEffect)(()=>{q?$("b6",[q],{shouldValidate:!0}):$("b6",[])},[q,$]);let onSubmitFn=async e=>{L(!0),E(!0);let t=e.b4.trim(),l=await fetch("".concat(d.Uj,"/api/translate"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:t})}),s=await l.json(),a="";a=l.ok?s.translatedText:t;let n={b1:e.b1.trim(),b2:e.b2,b3:e.b3,b4:a,b6:e.b6||[],b5:e.b5};
1m().post("".concat(d.fw,"/opsauth/addContacts"),n).then(e=>{E(!1),"SUC4001"==e.data.status?(L(!1),(0,c.L)("contact_form_submit")):(C(e.data.message),L(!0))})};return F?(0,s.jsx)("div",{children:(0,s.jsx)("div",{children:(0,s.jsxs)("form",{onSubmit:R(onSubmitFn),children:[(0,s.jsxs)("div",{className:"flex flex-col mb-2 md:mb-4",children:[(0,s.jsxs)("label",{htmlFor:"fullName",className:"mb-2 text-sm md:text-[16px] font-normal text-white",children:[" Full Name ",(0,s.jsx)("span",{className:"text-[#ff0000]",children:"*"})," "]}),(0,s.jsx)("input",{...V("b1",{required:!0,minLength:2,maxLength:50,pattern:/^[A-Za-z ]+$/i}),className:"px-4 py-[0.7em] text-sm font-normal border border-[#626262] bg-transparent rounded-full focus:outline-none text-white",id:"fullName",type:"text",placeholder:"",name:"b1"}),(null==B?void 0:null===(t=B.b1)||void 0===t?void 0:t.type)==="required"&&(0,s.jsx)("p",{className:"text-[#ff0000] text-xs p-1",children:"This field is required"}),(null==B?void 0:null===(l=B.b1)||void 0===l?void 0:l.type)==="pattern"&&(0,s.jsx)("p",{className:"text-[#ff0000] text-xs p-1",children:"Please enter only characters"}),(null==B?void 0:null===(n=B.b1)||void 0===n?void 0:n.type)==="minLength"&&(0,s.jsx)("p",{className:"text-[#ff0000] text-xs p-1",children:"Name length is too short"}),(null==B?void 0:null===(o=B.b1)||void 0===o?void 0:o.type)==="maxLength"&&(0,s.jsx)("p",{className:"text-[#ff0000] text-xs p-1",children:"Character limit exceeded, max 50 characters allowed"})]}),(0,s.jsxs)("div",{className:"flex flex-col mb-2 md:mb-4",children:[(0,s.jsxs)("label",{htmlFor:"phone",className:"mb-2 text-sm md:text-[16px] font-normal text-white",children:[" Phone Number ",(0,s.jsx)("span",{className:"text-[#ff0000]",children:"*"})]}),(0,s.jsx)("input",{...V("b2",{required:!0,minLength:10,maxLength:10,pattern:/^[6-9]\d{9}$/i}),className:"px-4 py-[0.7em] text-sm font-normal border border-[#626262] bg-transparent rounded-full focus:outline-none text-white",id:"phone",type:"tel",placeholder:"",name:"b2"}),(null==B?void 0:null===(p=B.b2)||void 0===p?void 0:p.type)==="required"&&(0,s.jsx)("p",{className:"text-[#ff0000] text-xs p-1",children:"This field is required"}),(null==B?void 0:null===(h=B.b2)||void 0===h?void 0:h.type)==="pattern"&&(0,s.jsx)("p",{className:"text-[#ff0000] text-xs p-1",children:"Please enter a valid Phone number"}),(null==B?void 0:null===(f=B.b2)||void 0===f?void 0:f.type)==="minLength"&&(0,s.jsx)("p",{className:"text-[#ff0000] text-xs p-1",children:"Please enter a valid Phone number"}),(null==B?void 0:null===(b=B.b2)||void 0===b?void 0:b.type)==="maxLength"&&(0,s.jsx)("p",{className:"text-[#ff0000] text-xs p-1",children:"Please enter a valid Phone number"})]}),(0,s.jsxs)("div",{className:"flex flex-col mb-2 md:mb-4",children:[(0,s.jsxs)("label",{htmlFor:"email",className:"mb-2 text-sm md:text-[16px] font-normal text-white",children:["Work Email ",(0,s.jsx)("span",{className:"text-[#ff0000]",children:"*"})]}),(0,s.jsx)("input",{...V("b3",{required:!0,pattern:/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i}),className:"px-4 py-[0.7em] text-sm font-normal border border-[#626262] bg-transparent rounded-full focus:outline-none text-white",id:"email",type:"email",placeholder:"",name:"b3"}),(null==B?void 0:null===(v=B.b3)||void 0===v?void 0:v.type)==="required"&&(0,s.jsx)("p",{className:"text-[#ff0000] text-xs p-1",children:"This field is required"}),(null==B?void 0:null===(j=B.b3)||void 0===j?void 0:j.type)==="pattern"&&(0,s.jsx)("p",{className:"text-[#ff0000] text-xs p-1",children:"Please enter a valid Email address"})]}),(0,s.jsxs)("div",{className:"flex flex-col mb-2 md:mb-4",children:[(0,s.jsxs)("label",{htmlFor:"company_name",className:"mb-2 text-sm md:text-[16px] font-normal text-white",children:["Company Name ",(0,s.jsx)("span",{className:"text-[#ff0000]",children:"*"})]}),(0,s.jsx)("input",{...V("b5",{required:!0}),className:"px-4 py-[0.7em] text-sm font-normal border border-[#626262] bg-transparent rounded-full focus:outline-none text-white",id:"b5",type:"text",placeholder:"",name:"b5"}),(null==B?void 0:null===(N=B.b5)||void 0===N?void 0:N.type)==="required"&&(0,s.jsx)("p",{className:"text-[#ff0000] text-xs p-1",children:"This field is required"})]}),q?(0,s.jsxs)("div",{className:"mb-4 relative",ref:M,children:[(0,s.jsxs)("label",{className:"block mb-2 text-sm md:text-[16
1px] font-normal text-white",children:["Product Interested In ",(0,s.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,s.jsx)("input",{value:q,readOnly:!0,className:"w-full px-4 py-[0.7em] border border-[#626262] bg-white/5 rounded-full text-white focus:outline-none focus:ring-0 cursor-not-allowed"})]}):(0,s.jsxs)("div",{className:"mb-4 relative",ref:M,children:[(0,s.jsxs)("label",{className:"block mb-2 text-sm md:text-[16px] font-normal text-white",children:["Product Interested In ",(0,s.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,s.jsxs)("div",{onClick:()=>z(!I),className:"w-full rounded-full border border-[#626262] bg-white/5 text-white text-sm md:text-[14px] px-4 py-[0.7em] flex justify-between items-center cursor-pointer",children:[(0,s.jsx)("span",{children:(null===(w=U("b6"))||void 0===w?void 0:w.length)?U("b6").join(", "):"Select Products"}),(0,s.jsx)("span",{className:"text-white text-[20px]",children:"â¾"})]}),I&&(0,s.jsx)("div",{className:"absolute mt-1 w-full z-50 max-h-48 overflow-y-auto rounded-xl border border-[#626262] bg-black/90 p-3 space-y-2",children:["Expense Management","Motion","iFleet Pay","Reimburse360","FASTag","Other"].map((e,t)=>{var l;return(0,s.jsxs)("label",{className:"flex items-center gap-2 text-white text-sm md:text-[14px] cursor-pointer",children:[(0,s.jsx)("input",{type:"checkbox",value:e,checked:null===(l=U("b6"))||void 0===l?void 0:l.includes(e),onChange:t=>{let l=U("b6")||[];t.target.checked?$("b6",[...l,e],{shouldValidate:!0}):$("b6",l.filter(t=>t!==e),{shouldValidate:!0})},className:"accent-red-500"}),e]},t)})}),(null==B?void 0:null===(g=B.b6)||void 0===g?void 0:g.type)==="required"&&(0,s.jsx)("p",{className:"text-[#e53c32] text-[11px] mt-1",children:"Please select at least one product"})]}),(0,s.jsxs)("div",{className:"flex flex-col mb-2 md:mb-4",children:[(0,s.jsxs)("label",{htmlFor:"message",className:"mb-2 text-sm md:text-[16px] font-normal text-white",children:["Message ",(0,s.jsx)("span",{className:"text-[#ff0000]",children:"*"})]}),(0,s.jsx)("textarea",{rows:1,...V("b4",{required:!0,maxLength:250}),className:"px-4 py-[0.7em] text-sm font-normal border border-[#626262] bg-transparent rounded-full focus:outline-none text-white",id:"message",placeholder:"",name:"b4"}),(null==B?void 0:null===(y=B.b4)||void 0===y?void 0:y.type)==="required"&&(0,s.jsx)("p",{className:"text-[#ff0000] text-xs p-1",children:"This field is required"}),(null==B?void 0:null===(k=B.b4)||void 0===k?void 0:k.type)==="maxLength"&&(0,s.jsx)("p",{className:"text-[#ff0000] text-xs p-1",children:"Character limit exceeded, max 250 characters allowed"})]}),(0,s.jsxs)("p",{className:"text-[#ff0000] text-xs",children:[" ",P," "]}),"/ondc"!=S.pathname&&(0,s.jsx)("div",{className:"mt-4 mb-4 md:mb-0 md:mt-5 "+"".concat(("/corporate-cards"==S.pathname||"/petty-cash-management"==S.pathname||"/giftcard"==S.pathname||"/spend-management"==S.pathname||"/incentive-management"==S.pathname)&&"flex justify-center"),children:_?(0,s.jsx)("div",{className:"w-full md:w-[100%] h-[45px] md:h-[50px] omni-button flex items-center justify-center cursor-not-allowed",children:(0,s.jsx)("div",{className:"border-2 border-white rounded-full w-5 h-5 animate-spin "})}):(0,s.jsx)(u.Z,{label:"Submit",className:"relative overflow-hidden uppercase rounded-[20px] leading-tight text-[15px] md:text-[18px] lg:text-[24px] xl:text-[24px] 2xl:text-[28px] font-normal md:font-[700] uppercase p-[0.5em_2em] text-primary-omni transition-colors duration-300 w-full md:w-[100%] h-[45px] md:h-[50px] flex items-center justify-center omni-button"})}),"/ondc"==S.pathname&&(0,s.jsx)("div",{className:"w-full",children:_?(0,s.jsx)("div",{className:"w-full md:w-[250px] h-[30px] md:h-[44px] p-[0.5em_2em] omni-button flex items-center justify-center cursor-not-allowed",children:(0,s.jsx)("div",{className:"border-2 border-white rounded-full w-5 h-5 animate-spin "})}):(0,s.jsx)(u.Z,{label:"Book a Demo",type:"submit",disabled:_,className:"relative overflow-hidden uppercase rounded-[20px] leading-tight text-[15px] md:text-[18px] lg:text-[24px] xl:text-[24px] 2xl:text-[20px] font-normal uppercase text-primary-omni transition-colors duration-300 w-full md:w-[250px] h-[30px] md:h-[44px] flex items-center justify-center omni-button p-[0.5em_2em]"})})]})})}):(0,s.jsxs)("div",{className:"text-center ",children:[(0,s.jsx)("div",{className:"p-0",children:(0,s.jsx)(r(),{loading:"lazy",className:"w-[150px] h-[150px] md:h-[150px] object-contain mx-auto",width:0,height:0,src:"/assets/image/success_icon.svg",alt:"img",sizes:"100vw"})}
1),(0,s.jsx)("p",{className:"text-[14px] md:text-[16px] text-white",children:"Weâve got your message! Our team will contact you soon."})]})}}}]);
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.