1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5749],{25749:(e,a,t)=>{t.r(a),t.d(a,{default:()=>c});var r=t(95155),l=t(59871),s=t(12115),n=t(76728),o=t(76071);let i=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,c=(0,s.memo)(()=>{let[e,a]=(0,s.useState)({name:{value:"",error:""},email:{value:"",error:""},message:{value:"",error:""}}),[t,c]=(0,s.useState)(!1),[d,u]=(0,s.useState)(!1),{name:m,email:p,message:h}=e,x=(0,s.useCallback)(e=>{let{name:t,value:r}=e.target;a(e=>({...e,[t]:{value:r,error:""}}))},[]),f=m.value.length>2&&h.value.length>3&&i.test(p.value),{submitForm:v}={submitForm:async e=>(await (0,l.A)({endpoint:"/forms/contact-us/who_reads_us/",method:"POST",body:e})).data},b=(0,s.useCallback)(()=>p.value?!p.value||!!i.test(p.value)||(a(e=>({...e,email:{value:p.value,error:"Invalid email"}})),!1):(a(e=>({...e,email:{value:p.value,error:"Email is required"}})),!1),[m.value,p.value,h.value]),g=(0,s.useCallback)(async()=>{if(b()&&f){u(!0);try{let e={name:m.value,email:p.value,requirements:h.value,job_title:"dummy",company:"dummy",phone:"+919876543210",position:"dummy",university:"dummy"},a=await v(e);"success"===a.status&&c(!0)}catch(e){console.error(e)}finally{u(!1)}}},[m.value,p.value,h.value,f,v]),y=(0,s.useCallback)(()=>{c(!1),a({name:{value:"",error:""},email:{value:"",error:""},message:{value:"",error:""}})},[]);return(0,r.jsx)("section",{className:"bg-yellow50 py-10 md:py-14",children:(0,r.jsxs)("div",{className:"max-w-[1280px] mx-auto flex lg:flex-row flex-col gap-10 md:gap-5 md:justify-between px-5",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"text-lightBlack font-playfair font-bold text-[34px] leading-[51px]",children:"Get in touch"}),(0,r.jsx)("p",{className:"font-haasGrotesk font-bold text-[19px] text-lightBlack leading-7 letter-spacing word-spacing my-4",children:"Can't find what you need or want to speak to a sales representative?"})]}),(0,r.jsx)("div",{className:"bg-white p-8",children:t?(0,r.jsxs)("div",{className:"relative",role:"status","aria-live":"polite",children:[(0,r.jsx)("button",{className:"absolute -top-[30px] -right-[25px] w-5 h-5 cursor-pointer",onClick:y,"aria-label":"Close success message",children:(0,r.jsx)(n.A,{})}),(0,r.jsxs)("div",{className:"flex flex-col justify-center w-full items-center",children:[(0,r.jsx)(o.A,{className:"mb-4","aria-hidden":"true"}),(0,r.jsx)("p",{className:"font-haasGrotesk font-medium md:text-2xl text-base text-center uppercase text-lightBlack tracking-1",children:"Thank You"}),(0,r.jsx)("p",{className:"text-lightBlack font-haasGrotesk font-bold md:text-xl text-sm word-spacing letter-spacing text-center mt-2",children:"You will be hearing from us shortly"})]})]}):(0,r.jsxs)("form",{onSubmit:e=>{e.preventDefault(),g()},"aria-label":"Contact form",children:[(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsx)("label",{htmlFor:"name",className:"sr-only",children:"Name"}),(0,r.jsx)("input",{id:"name",type:"text",className:"border-b border-[#BBB] lg:min-w-[500px] w-full font-haasGrotesk font-bold text-base leading-6 placeholder:text-[#757575] focus:outline-none pb-1",placeholder:"Name",value:m.value,name:"name",onChange:x,"aria-invalid":!!m.error,"aria-describedby":m.error?"name-error":void 0}),m.error&&(0,r.jsx)("div",{id:"name-error",className:"mt-1 text-sm font-haasGrotesk font-bold text-red-500",role:"alert",children:m.error})]}),(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsx)("label",{htmlFor:"email",className:"sr-only",children:"Email"}),(0,r.jsx)("input",{id:"email",type:"email",className:"border-b border-[#BBB] lg:min-w-[500px] w-full font-haasGrotesk font-bold text-base leading-6 placeholder:text-[#757575] focus:outline-none pb-1",placeholder:"Email",value:p.value,name:"email",onChange:x,"aria-invalid":!!p.error,"aria-describedby":p.error?"email-error":void 0,suppressHydrationWarning:!0}),p.error&&(0,r.jsx)("div",{id:"email-error",className:"mt-1 text-sm font-haasGrotesk font-bold text-red-500",role:"alert",children:p.error})]}),(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsx)("label",{htmlFor:"message",className:"sr-only",children:"Your Message"}),(0,r.jsx)("input",{id:"message",type:"text",className:"border-b border-[#BBB] lg:min-w-[500px] w-full font-haasGrotesk font-bold text-base leading-6 placeholder:text-[#757575] focus:outline-none pb-1",placeholder:"Your Message",value:h.value,name:"message",onCh
1ange:x,"aria-invalid":!!h.error,"aria-describedby":h.error?"message-error":void 0}),h.error&&(0,r.jsx)("div",{id:"message-error",className:"mt-1 text-sm font-haasGrotesk font-bold text-red-500",role:"alert",children:h.error})]}),(0,r.jsx)("div",{className:"my-4",children:(0,r.jsx)("button",{type:"submit",className:"bg-indigo text-white pointer-events-auto w-full text-center py-2.5 font-haasGrotesk text-[17px] font-medium uppercase pb-1 hover:opacity-90 transition-opacity disabled:opacity-50",disabled:!f,"aria-label":"Submit contact form",children:d?"Submitting...":"Submit"})})]})})]})})})},59871:(e,a,t)=>{t.d(a,{A:()=>l});var r=t(90051);async function l(e){let{endpoint:a,method:t,headers:l,body:s,queryParams:n,token:o,clientIp:i,cache:c}=e,d=n?"?".concat(new URLSearchParams(n).toString()):"";try{let e=await fetch("https://api.themorningcontext.com/api/v1"+a+d,{method:t,headers:{"Content-Type":"application/json","api-auth-version":"2.0",Accept:"application/json",...o&&{Authorization:"Bearer ".concat(o)},...i&&{"x-client-real-ip":i},...l},body:s?JSON.stringify(s):void 0}),r=e.headers.get("Content-Type");return{data:(null==r?void 0:r.includes("application/json"))?await e.json():null,status:e.status,error:""}}catch(e){return{data:null,status:500,error:(0,r.J)(e,"message","")||"Unknown error occurred"}}}},76071:(e,a,t)=>{t.d(a,{A:()=>o});var r,l,s=t(12115);function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let o=function(e){return s.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",width:70,height:70,viewBox:"0 0 48 48"},e),r||(r=s.createElement("path",{fill:"#b25dee",d:"M44 24c0 11.045-8.955 20-20 20S4 35.045 4 24 12.955 4 24 4s20 8.955 20 20"})),l||(l=s.createElement("path",{fill:"#fff",d:"m34.586 14.586-13.57 13.586-5.602-5.586-2.828 2.828 8.434 8.414 16.395-16.414z"})))}},76728:(e,a,t)=>{t.d(a,{A:()=>n});var r,l=t(12115);function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(null,arguments)}let n=function(e){return l.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},e),r||(r=l.createElement("path",{fill:"#000",fillRule:"evenodd",d:"M19.796 5.188a.696.696 0 1 0-.984-.984L12 11.016 5.188 4.204a.696.696 0 1 0-.984.984L11.016 12l-6.812 6.812a.696.696 0 1 0 .984.984L12 12.984l6.812 6.812a.696.696 0 0 0 .984-.984L12.984 12z",clipRule:"evenodd"})))}},90051:(e,a,t)=>{t.d(a,{J:()=>r});function r(e,a,t){if(null==e)return t;let r=Array.isArray(a)?a:a.replace(/\[(\d+)\]/g,".$1").split(".").filter(Boolean),l=e;for(let e of r){if(null==l||"object"!=typeof l&&"function"!=typeof l||!(e in l))return t;l=l[e]}return void 0===l?t:l}}}]);
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.