1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4792],{54792:(o,e,r)=>{r.d(e,{submitMarketoFormForSignup:()=>E});var t=r(38248),n=r(55793),a=r(43359),i=r(8162),l=r(53858),m=r(96906),u=r(86772),s=r(27238),c=r(11491),_=r(24e3),d=r(1354),g=r(69036),p=r(91228),y=r(12442),f=r(25220),b=r(46077),v=r(47717),C=r(52116),N=r(19564),S=r(7110),h=r(39147),w=r(71461),k=r(75811),I=r(2659);let E=async o=>{let{id:e,hubspotFormId:r,data:E,staticHiddenFields:F,locale:D,dataLayerEvent:M=null,formInitiator:O=null}=o;try{var A,R,P;let o,U,L=null==E?void 0:E.attribution,T=null==E?void 0:E["attribution-category"];if(L&&!T){let o=await (0,_.W)(L);E["attribution-category"]=o}let Z=F.reduce((o,e)=>(o[e.name]=e.value,o),{}),G=(0,w.Oe)(E),H=await (0,N.N)(G),z=await (0,h.h)(),q=await (0,f.fS)(),J=(null==q||null==(A=q.currency)?void 0:A.code)||"USD",j=null==q?void 0:q.ip,x={firstName:(0,v.rh)((0,w.O4)(E)),lastName:(0,v.rh)((0,w.w5)(E)),email:(0,w.getEmail)(E),phoneNumber:G,country:null==H?void 0:H.regionName,companyName:(0,v.rh)((0,w.Zg)(E)),nbUsers:(0,w.lo)(E),companyCrm:(0,w.kK)(E),language:D,recaptchaToken:z,currency:J},Q={FirstName:x.firstName,LastName:x.lastName,Email:x.email,Phone:x.phoneNumber,Country:x.country,Company_CRM__c:x.companyCrm,Company:x.companyName,CompanySize__c:x.nbUsers,SeatsSegmentation__c:null==E?void 0:E["number-of-licenses"]};window.localStorage.setItem("signup-form-user-data",JSON.stringify(Q));let V=await (0,S.R)(x.nbUsers,"trial",100),Y=await (0,d.Jl)({email:x.email,country:x.country,lastname:x.lastName,firstname:x.firstName,phone:x.phoneNumber},j);window.localStorage.setItem("signup-form-ehawk-score",null==Y?void 0:Y.score);let $=null;if((0,d.n$)(null==Y?void 0:Y.score))(0,g.l1)();else try{$=await (0,k.E)({...x,country:null==H?void 0:H.regionCode},D)}catch(o){throw b.A.logError("Error creating user",o,"submitMarketoFormForSignup",{formData:x,country:null==H?void 0:H.regionCode}),{code:"generic",message:null==o?void 0:o.message}}let K=(null==$?void 0:$.id)||null,W=(null==$?void 0:$.company_id)||null;try{o=await (0,u.rj)(),b.A.logInfo("Getting GA User ID","submitMarketoFormForSignup",{gaUserId:o})}catch(o){b.A.logError("Error getting GA User ID",o,"submitMarketoFormForSignup")}let B=await (0,C.V)(E,D),X=(0,p.Z)(),oo={...Z,DOZISF__ZoomInfo_Company_ID__c:null==E?void 0:E["zoominfo-company-id"],DOZISF__ZoomInfo_Id__c:null==E?void 0:E["zoominfo-contact-id"],Email:x.email,FirstName:x.firstName,LastName:x.lastName,Company:x.companyName,Country:x.country,Phone:x.phoneNumber,GA_User_ID__c:o,Contact_Company_ID__c:W,ID__c:K,CompanySize__c:x.nbUsers,SeatsSegmentation__c:null==E?void 0:E["number-of-licenses"],Company_CRM__c:x.companyCrm,Integrations__c_contact:x.companyCrm,inferredLanguage:D,VettingLeadScore__c:null!=(P=null==Y?void 0:Y.score)?P:null,gDPRNoOptInRequired:!B,GDPROptIn__c:!!E.marketing,gDPRDoubleOptInRequested:B,gclid:(0,l.A)(),...await (0,m.lQ)(x.email),Cookie_Consent__c:(0,s.Jb)().join(","),HowDidYouHearAboutUs__c:null==E?void 0:E.attribution,HowDidYouHearAboutUsCategory__c:null==E?void 0:E["attribution-category"],hubspotutk:(0,t.getCookie)("hubspotutk"),pageName:null==(R=document)?void 0:R.title,...X};try{U=await (0,I.submitForm)(e,r,oo,{formInitiator:O}),b.A.logInfo("Signup form successfully sent Marketo form","submitMarketoFormForSignup",{formId:e,hubspotFormId:r,formData:oo,locale:D})}catch(o){b.A.logError("Error submitting Marketo form",o,"submitMarketoFormForSignup",{formId:e,hubspotFormId:r,formData:oo,locale:D})}if((0,u.QO)({dimension1:K}),M&&((0,i.Sd)({...M,value:V}),M.event===i.qM.FORMS_INTERACTIONS&&n.A.trackEvent(a.u.FORM_STEP_COMPLETED.name,a.u.FORM_STEP_COMPLETED.mapProperties({form_name:null==M?void 0:M.form_name,step_name:null==M?void 0:M.step_name,step_index:null==M?void 0:M.step_index,interaction_type:null==M?void 0:M.interaction_type,form_initiator:null==M?void 0:M.form_initiator,email:null==x?void 0:x.email}))),(0,y.m)(),(0,c.h)(),(0,d.n$)(null==Y?void 0:Y.score))return"eHawk fraud detected";return U}catch(o){throw b.A.logError("Error submitting Marketo form",o,"submitMarketoFormForSignup"),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.