1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9698],{4307:function(e,t,n){n.d(t,{Z:function(){return g}});var o=n(85893),a=n(67294),r=n(25675),l=n.n(r),i=n(73935),s=n(19144),c=n(47160),d=n(86120),u=n(39033),m=n(41664),h=n.n(m),f=n(75419);let x={name:"",phone:"",email:"",zip_code:"",source:"website",medium:"website",campaign:"website",form_id:"2625",country:"US",state:"utah",country_code:"1",highest_qualification:"",message:"",opt_in:!0,opt_in_comm:!0};var p=a.memo(e=>{let{onSuccess:t,onClose:n,source:r="Powers-Of-AI",title:l="Have A Question?"}=e,[i,m]=(0,a.useState)(x),[p,g]=(0,a.useState)(!1),[v,w]=(0,a.useState)(!1),{state:b,showToast:j}=(0,s.F1)(),y=(0,a.useMemo)(()=>{var e,t;let n=null===(e=(0,d.a)(null==b?void 0:b.country))||void 0===e?void 0:e.name;return(null===(t=Object.keys(d.hW).find(e=>d.hW[e].name===n))||void 0===t?void 0:t.toLowerCase())||"us"},[null==b?void 0:b.country]);(0,a.useEffect)(()=>{m(e=>({...e,country:(null==b?void 0:b.country)||"US"}))},[null==b?void 0:b.country]);let C=(0,a.useCallback)(e=>{let{name:t,value:n}=e.target;m(e=>({...e,[t]:n}))},[]),k=(0,a.useCallback)((e,t)=>{m(n=>({...n,phone:e,country_code:(null==t?void 0:t.dialCode)||n.country_code||"1"}))},[]),F=(0,a.useCallback)(()=>{let e=[];return["name","phone","email","message"].forEach(t=>{var n,o;(null===(o=i[t])||void 0===o?void 0:null===(n=o.toString())||void 0===n?void 0:n.trim())||e.push("".concat(t.charAt(0).toUpperCase()+t.slice(1)," is required"))}),i.email&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(i.email)&&e.push("Please enter a valid email address"),i.opt_in||e.push("Please accept the terms and conditions"),e},[i]),N=(0,a.useMemo)(()=>{var e,t,n,o,a;let r=!!(null===(e=i.name)||void 0===e?void 0:e.trim()),l=!!(null===(n=i.phone)||void 0===n?void 0:null===(t=n.toString())||void 0===t?void 0:t.trim()),s=!!((null===(o=i.email)||void 0===o?void 0:o.trim())&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(i.email.trim())),c=!!(null===(a=i.message)||void 0===a?void 0:a.trim()),d=!!i.opt_in;return r&&l&&s&&c&&d},[i]),D=(0,a.useCallback)(async()=>{let e=F();if(e.length>0){j("error",e[0]);return}g(!0);let t=new URLSearchParams(window.location.search),{opt_in_comm:n,...o}=i,a={...o,form_source:r,source:(null==t?void 0:t.get("utm_source"))||"website",medium:(null==t?void 0:t.get("utm_medium"))||"website",campaign:(null==t?void 0:t.get("utm_campaign"))||"website",country:(null==b?void 0:b.country)||"US",opt_in:i.opt_in,...(0,f.Tg)((null==b?void 0:b.country)==="IN",n)},l=await (0,u.C)();a.ip_info=l;try{let e=await fetch("".concat("https://www.sarasai.org/api/","lead-message"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!e.ok){let t=await e.json();throw Error(t.message||"Something went wrong. Please try again.")}m(x),w(!0)}catch(e){j("error",e.message||"Something went wrong. Please try again.")}finally{g(!1)}},[i,F,r,null==b?void 0:b.country,j]),_=()=>{w(!1),t?t():n&&n()};return(0,o.jsxs)("div",{className:"w-full h-full flex flex-col gap-[3.125rem] md:flex-row items-stretch justify-between bg-[#F6F6F6] overflow-hidden",children:[(0,o.jsx)("div",{className:"hidden md:flex w-full lg:w-[17.5rem] shrink-0 bg-[#F6F6F6] bg-[url('/assets/images/patternadvisor.svg')] bg-contain bg-left-top relative rounded-l-3xl items-center justify-center"}),(0,o.jsx)("div",{id:"questionForm",className:"flex-1 bg-white border-[#0000001A] rounded-2xl p-4 sm:p-6 flex flex-col justify-between shadow-sm overflow-y-auto min-h-0",children:v?(0,o.jsxs)("div",{className:"self-stretch flex flex-col justify-center items-center gap-6 py-16 my-auto",children:[(0,o.jsxs)("div",{className:"flex flex-col items-center gap-4 text-center",children:[(0,o.jsx)("div",{className:"text-green-600 text-5xl mb-2",children:"\uD83D\uDCE9"}),(0,o.jsx)("div",{className:"text-neutral-950 text-2xl font-bold font-jakarta",children:"Thanks for reaching out."}),(0,o.jsx)("div",{className:"text-neutral-600 text-base font-jakarta",children:"We'll get back to you shortly."})]}),(0,o.jsx)("button",{type:"button",onClick:_,className:"px-8 py-3 bg-[#F56D3B] hover:bg-[#e05d2b] rounded-full text-white text-sm font-semibold font-jakarta transition-colors cursor-pointer",children:"Close"})]}):(0,o.jsxs)("div",{className:"flex flex-col h-full gap-6",children:[(0,o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,o.jsx)("h2",{className:"text-[#111827] text-[0.875rem] sm:text-[1rem] font-bold font-jakarta tracking-tight",children:l}),n&&(0,o.jsx)("button",{type:"button",onClick:n,"aria-label":"Close modal",className:"w-3 h-3 flex items-center justify-center rounded-full text-[#F56D3B] hover:bg-orange-50 transition-colors cursor-pointer",children:(0,o.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)("path",{d:"M13.5 4.5L4.5 13.5M4.5 4.5L13.5 13.5",stroke:"#F56D3B",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),(0,o.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,o.jsx)("div",{className:"flex flex-col",children:(0,o.jsx)("input",{type:"text",name:"name",value:i.name,onChange:C,placeholder:"Full Name",className:"w-full h-[36px] px-3.5 rounded-lg border border-[#
1E5E7EB] bg-white text-sm font-jakarta text-[#111827] placeholder:text-[#9CA3AF] focus:outline-none focus:border-[#F56D3B] transition-colors"})}),(0,o.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,o.jsx)("label",{className:"text-sm font-semibold text-[#111827] font-jakarta",children:"Email"}),(0,o.jsx)("input",{type:"email",name:"email",value:i.email,onChange:C,placeholder:"Email Address",className:"w-full h-[36px] px-3.5 rounded-lg border border-[#E5E7EB] bg-white text-sm font-jakarta text-[#111827] placeholder:text-[#9CA3AF] focus:outline-none focus:border-[#F56D3B] transition-colors"})]}),(0,o.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,o.jsx)("label",{className:"text-sm font-semibold text-[#111827] font-jakarta",children:"Phone number"}),(0,o.jsx)(c.Z,{countryCode:y,phone:i.phone,dialCode:i.country_code,countryDialCode:i.country_code,onPhoneChange:k,placeholder:"Phone Number",containerClassName:"h-[36px] border border-[#E5E7EB] rounded-lg bg-white flex flex-row items-center w-full focus-within:border-[#F56D3B] transition-colors",inputClassName:"focus:outline-none focus:ring-0 border-none h-full px-3 w-full min-w-0 flex-1 font-jakarta text-sm text-[#111827] placeholder:text-[#9CA3AF] placeholder:text-sm placeholder:font-jakarta bg-transparent",dialCodeClassName:"font-jakarta text-sm text-[#111827] whitespace-nowrap"})]}),(0,o.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,o.jsx)("label",{className:"text-sm font-semibold text-[#111827] font-jakarta",children:"Message"}),(0,o.jsx)("textarea",{name:"message",value:i.message,onChange:C,placeholder:"A sentence is plenty. Be specific.",rows:4,className:"w-full min-h-[120px] p-3.5 rounded-lg border border-[#E5E7EB] bg-white text-sm font-jakarta text-[#111827] placeholder:text-[#9CA3AF] focus:outline-none focus:border-[#F56D3B] transition-colors resize-none"})]}),(0,o.jsxs)("label",{htmlFor:"opt_in",className:"flex items-start gap-2.5 cursor-pointer mt-1",children:[(0,o.jsx)("input",{id:"opt_in",name:"opt_in",type:"checkbox",checked:i.opt_in,onChange:e=>m(t=>({...t,opt_in:e.target.checked,opt_in_comm:e.target.checked})),className:"mt-0.5 h-4 w-4 shrink-0 rounded border-[#D1D5DB] text-[#F56D3B] accent-[#F56D3B] cursor-pointer"}),(0,o.jsxs)("span",{className:"font-jakarta text-[12px] text-[#6B7280] leading-[1.5] cursor-pointer",children:["I agree to receive SMS, Email, Calls & WhatsApp for communication and accept the"," ",(0,o.jsx)(h(),{href:"/terms",target:"_blank",className:"text-[#F56D3B] underline underline-offset-2 hover:opacity-80 transition-opacity",children:"Terms of Service"})," ","and"," ",(0,o.jsx)(h(),{href:"/privacy",target:"_blank",className:"text-[#F56D3B] underline underline-offset-2 hover:opacity-80 transition-opacity",children:"Privacy Policy."})]})]})]}),(0,o.jsxs)("div",{className:"flex items-center justify-between pt-3 mt-auto",children:[(0,o.jsxs)("button",{type:"button",onClick:n||_,className:"flex items-center gap-1.5 text-[#F56D3B] hover:text-[#e05d2b] font-jakarta font-semibold text-sm transition-colors cursor-pointer",children:[(0,o.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:(0,o.jsx)("path",{d:"M0.0168514 0.0158781L0.693822 0L8.8731 9.59332e-07V1.38579L2.34654 1.38338L12 11.0377L11.0377 12L1.38471 2.34621L1.38566 8.8719H0V0.691933L0.0168514 0.0158781Z",fill:"#FF4A07"})}),(0,o.jsx)("span",{children:"Close"})]}),(0,o.jsxs)("button",{type:"button",onClick:D,disabled:p||!N,className:"px-[1.25rem] py-[1rem] h-[2.25rem] rounded-full border border-[#F56D3B] text-[#F56D3B] hover:bg-[#F56D3B] hover:text-white transition-all font-jakarta font-semibold text-sm flex items-center gap-2 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-transparent disabled:hover:text-[#F56D3B]",children:[(0,o.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:[(0,o.jsx)("g",{"clip-path":"url(#clip0_1258_3569)",children:(0,o.jsx)("path",{d:"M13.5736 0.958177L12.8585 0.941406L4.21854 0.941407V2.40512L11.1127 2.40258L0.915527 12.5998L1.932 13.6162L12.1287 3.41955L12.1277 10.3122H13.5914V1.67225L13.5736 0.958177Z",fill:"currentColor"})}),(0,o.jsx)("defs",{children:(0,o.jsx)("clipPath",{id:"clip0_1258_3569",children:(0,o.jsx)("rect",{width:"14",height:"14",fill:"white"})})})]}),(0,o.jsx)("span",{children:p?"Submitting...":"Next"})]})]})]})})]})}),g=e=>
1{let{source:t="Powers-Of-AI",buttonText:n="Have a Question?",buttonClassName:r="",isOpen:s,onOpen:c,onClose:d,showButton:u=!0,formTitle:m}=e,[h,f]=(0,a.useState)(!1),x=void 0!==s,g=x?s:h,[v,w]=(0,a.useState)(!1),[b,j]=(0,a.useState)(!1),[y,C]=(0,a.useState)(!1),k=(0,a.useRef)(null);(0,a.useEffect)(()=>{C(!0)},[]),(0,a.useEffect)(()=>{if(g){w(!0);return}j(!1);let e=setTimeout(()=>{w(!1)},300);return()=>clearTimeout(e)},[g]),(0,a.useEffect)(()=>{var e;g&&v&&(null===(e=k.current)||void 0===e||e.offsetWidth,j(!0))},[g,v]);let F=()=>{x?null==d||d():f(!1)};return(0,a.useEffect)(()=>{if(!g)return;let e=document.body.style.overflow;document.body.style.overflow="hidden";let t=e=>{"Escape"===e.key&&F()};return window.addEventListener("keydown",t),()=>{document.body.style.overflow=e,window.removeEventListener("keydown",t)}},[g,x,d]),(0,o.jsxs)("div",{children:[u&&(0,o.jsxs)("button",{type:"button",onClick:()=>{x?null==c||c():f(!0)},className:r||"px-8 py-4 bg-[#F56D3B] rounded-full flex justify-start items-center gap-3 overflow-hidden hover:bg-orange-500 transition-colors cursor-pointer","aria-label":"Open question form",children:[(0,o.jsx)(l(),{src:"/assets/images/up-right-arrow-white.svg",width:14,height:14,alt:"","aria-hidden":"true"}),(0,o.jsx)("span",{className:"justify-center text-white text-sm sm-max:text-[12px] font-semibold font-['Sora'] leading-tight cursor-pointer",children:n})]}),y&&v&&(0,i.createPortal)((0,o.jsxs)("div",{className:"fixed inset-0 z-[100] flex justify-end",children:[(0,o.jsx)("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm transition-opacity duration-300 ease-out ".concat(b?"opacity-100":"opacity-0"),onClick:F,"aria-hidden":"true"}),(0,o.jsx)("div",{ref:k,role:"dialog","aria-modal":"true","aria-label":"Have a question drawer",className:"relative z-[101] h-full w-full max-w-[865px] flex items-center justify-end bg-[#F6F6F6] transform transition-transform duration-300 ease-out ".concat(b?"translate-x-0":"translate-x-full"),children:(0,o.jsx)("div",{className:"w-full h-full max-h-[100vh] p-[30px] flex shadow-2xl overflow-hidden bg-[#F6F6F6]",children:(0,o.jsx)(p,{onClose:F,onSuccess:F,source:t,title:m})})})]}),document.body)]})}},5347:function(e,t,n){n.d(t,{B9:function(){return i},Pn:function(){return r},ZE:function(){return s},cq:function(){return d},h1:function(){return l},nZ:function(){return u},v1:function(){return c}});let o=e=>new Intl.DateTimeFormat("en-US",{month:"long",timeZone:"UTC"}).format(e),a=e=>new Intl.DateTimeFormat("en-US",{month:"short",timeZone:"UTC"}).format(e);function r(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,{year:t,month:n,day:o}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,t=new Intl.DateTimeFormat("en-US",{timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1}).formatToParts(e),n=e=>{var n;return null===(n=t.find(t=>t.type===e))||void 0===n?void 0:n.value},o=parseInt(n("hour"),10);return 24===o&&(o=0),{year:parseInt(n("year"),10),month:parseInt(n("month"),10),day:parseInt(n("day"),10),hour:o,minute:parseInt(n("minute"),10)}}(e),a=n+(o>15?2:1),r=t;for(;a>12;)a-=12,r+=1;return new Date(Date.UTC(r,a-1,1))}function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,t=r(e),n=t.getUTCMonth(),o=t.getUTCFullYear();return(n-=1)<0&&(n=11,o-=1),new Date(Date.UTC(o,n,15))}function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,t=r(e);return"".concat(a(t)," ").concat(t.getUTCDate(),", ").concat(t.getUTCFullYear())}function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,t=r(e);return"".concat(o(t)," ").concat(t.getUTCFullYear())}function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,t=r(e);return"".concat(function(e){let t=["th","st","nd","rd"],n=e%100;return e+(t[(n-20)%10]||t[n]||"th")}(t.getUTCDate())," ").concat(o(t)," ").concat(t.getUTCFullYear())}function d(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,t=l(e);return"".concat(a(t)," ").concat(t.getUTCDate(),", ").concat(t.getUTCFullYear())}function u(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,t=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,t=r(e),n=t.getUTCMonth();return new Date(Date.UTC(t.getUTCFullYear(),n,14))}(e);return"".concat(a(t)," ").concat(t.getUTCDate(),", ").concat(t.getUTCFullYear())}}}]);
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.