"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[34827],{1021:function(e,t,a){var s=a(68472),r=a.n(s),n=a(67294),o=a(30653),l=a(63144),i=a.n(l),m=a(27361),c=a.n(m),p=a(45697),d=a.n(p),u=a(93926),h=a(70044);const{generateKey:f}=u,g=e=>{let t;t="string"===typeof e.fields?e.fields.replace(/ /g,"").split(","):e.fields||[];const a=t,[s,l]=(0,n.useState)({firstName:"",lastName:"",organization:"",email:"",message:"",ipAddress:"",phoneNumber:""}),[m,p]=(0,n.useState)("");(0,n.useEffect)((()=>{let e=!0;return h.Z.check().then((t=>{t&&e&&(p(t.in_eu),l({...s,ipAddress:t.ip}))})),()=>{e=!1}}),[]);const d={en:{first:"First name",last:"Last name",org:"Organization",email:"Business email address",message:"Message",phoneNumber:"Phone number",reason:"Reason"},de:{first:"Vorname",last:"Nachname",org:"Firmenname",email:"Email adresse",message:"Nachricht",phoneNumber:"Telefonnummer",reason:"Reason"},es:{first:"Nombre",last:"Apellidos",org:"Empresa",email:"E-mail",message:"Mensaje",phoneNumber:"N\xfamero de tel\xe9fono",reason:"Reason"},fr:{first:"Nom",last:"Pr\xe9nom",org:"Entreprise/Soci\xe9t\xe9",email:"Email",message:"Message",phoneNumber:"Num\xe9ro de t\xe9l\xe9phone",reason:"Reason"},pt:{first:"Nome",last:"Sobrenome",org:"Empresa",email:"Email profissional ",message:"Mensagem",phoneNumber:"N\xfamero de telefone",reason:"Reason"},cn:{first:"\u540d\u5b57",last:"\u59d3\u6c0f",org:"\u516c\u53f8\u540d\u79f0",email:"\u5546\u4e1a\u7535\u5b50\u90ae\u4ef6",message:"\u4fe1\u606f",phoneNumber:"\u7535\u8bdd\u53f7\u7801",reason:"Reason"},jp:{first:"\u540d\uff08\u30ed\u30fc\u30de\u5b57\uff09",last:"\u59d3\uff08\u30ed\u30fc\u30de\u5b57\uff09",org:"\u4f1a\u793e\u540d",email:"\u304a\u4ed5\u4e8b\u3067\u4f7f\u7528\u3059\u308b\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9",message:"\u304a\u554f\u3044\u5408\u308f\u305b\u5185\u5bb9",phoneNumber:"\u96fb\u8a71\u756a\u53f7",reason:"Reason"},kr:{first:"\uc774\ub984",last:"\uc131",org:"\ud68c\uc0ac \uc774\ub984",email:"\ube44\uc988\ub2c8\uc2a4 \uc774\uba54\uc77c",message:"\ubb38\uc758\uc0ac\ud56d",phoneNumber:"\uc804\ud654 \ubc88\ud638",reason:"Reason"},tw:{first:"\u540d\u5b57",last:"\u59d3\u6c0f",org:"\u516c\u53f8\uff0f\u55ae\u4f4d\u540d\u5b57\uff08\u82f1\u6587\uff09",email:"\u696d\u52d9\u7528\u96fb\u90f5",message:"\u4fe1\u606f",phoneNumber:"Phone number",reason:"Reason"}}[e.locale||"en"];let{formId:u}=e;"undefined"===typeof u&&(u=c()(e,"marketo.marketo_load_id"));let{gdprText:g}=e;"undefined"===typeof g&&(g=c()(e,"marketo.gdpr_text[0].paragraph_l10n","")),""===g&&(g=c()(e,"marketo.gdpr_text[0].paragraph_l10n",""));const E=a.filter((e=>"select"===e.type));let N;return E.length&&(N=E[0]),n.createElement("div",{id:"fallback-form",className:"jsx-3031658425"},n.createElement(n.Fragment,null,n.createElement("form",{onSubmit:t=>{t.preventDefault();let{fallbackEndpoint:r}=e;"undefined"===typeof r&&(r=c()(e,"marketo.fallback"));let{formId:n}=e;"undefined"===typeof n&&(n=c()(e,"marketo.marketo_load_id"));const o={firstName:s.firstName,lastName:s.lastName,organization:s.organization,email:s.email,message:s.message,formId:n,formUrl:location.href,dateTime:(new Date).toISOString(),ipAddress:s.ipAddress,phoneNumber:s.phoneNumber};var l;return(t=>{for(let a=0;a{const a=t.replace(/\D/g,""),s="cn"===e.locale,r="undefined"===typeof t||"undefined"!==typeof t&&0===t.length,n="undefined"!==typeof t&&t.length>0,o=a.length<5||a.length>15;return!(!r||!s)||!!n&&o})(s.phoneNumber)?"undefined"!==typeof e.onValidationError&&e.onValidationError("Please enter correct phone number."):i()(`/fallback/${r}`,{method:"POST",headers:new Headers({"Content-Type":"application/json",Accept:"application/json"}),body:JSON.stringify(o)}).then((t=>{"undefined"!==typeof e.onSuccess&&e.onSuccess(t)})).catch((e=>{console.error("ERROR: ",e)})):"undefined"!==typeof e.onValidationError&&e.onValidationError("Please enter correct email id."),!1},className:"jsx-3031658425 fallback"},a.includes("firstName")&&n.createElement("div",{className:"jsx-3031658425 input-wrapper"},n.createElement("label",{htmlFor:"First name",className:"jsx-3031658425"},n.createElement("span",{className:"jsx-3031658425 asterix"},"*"),d&&d.first?d.first:"First name",":"),n.createElement("input",{type:"text",name:"First name",placeholder:d&&d.first,value:s.firstName,onChange:e=>{l({...s,firstName:e.target.value})},className:"jsx-3031658425"})),a.includes("lastName")&&n.createElement("div",{className:"jsx-3031658425 input-wrapper"},n.createElement("label",{htmlFor:"Last name",className:"jsx-3031658425"},n.createElement("span",{className:"jsx-3031658425 asterix"},"*"),d&&d.last?d.last:"Last name",":"),n.createElement("input",{type:"text",name:"Last name",placeholder:d&&d.last,value:s.lastName,onChange:e=>{l({...s,lastName:e.target.value})},className:"jsx-3031658425"})),a.includes("organization")&&n.createElement("div",{className:"jsx-3031658425 input-wrapper"},n.createElement("label",{htmlFor:"Organization",className:"jsx-3031658425"},n.createElement("span",{className:"jsx-3031658425 asterix"},"*"),d&&d.org?d.org:"Organization",":"),n.createElement("input",{type:"text",name:"organization",placeholder:d&&d.org,value:s.organization,onChange:e=>{l({...s,organization:e.target.value})},className:"jsx-3031658425"})),a.includes("email")&&n.createElement("div",{className:"jsx-3031658425 input-wrapper"},a.length>1&&n.createElement("label",{htmlFor:"Email",className:"jsx-3031658425"},n.createElement("span",{className:"jsx-3031658425 asterix"},"*"),d&&d.email?d.email:"Business email address",":"),n.createElement("input",{type:"email",name:"email",placeholder:d&&d.email,value:s.email,onChange:e=>{l({...s,email:e.target.value})},className:"jsx-3031658425 input-field"})),a.includes("phoneNumber")&&n.createElement("div",{className:"jsx-3031658425 input-wrapper"},a.length>1&&n.createElement("label",{htmlFor:"Phone number",className:"jsx-3031658425"},"cn"===e.locale?n.createElement("span",{className:"jsx-3031658425 asterix"},"*"):"",d&&d.phoneNumber?d.phoneNumber:"Phone number",":"),n.createElement("input",{type:"text",name:"phoneNumber",placeholder:d&&d.phoneNumber,value:s.phoneNumber,onChange:e=>{l({...s,phoneNumber:e.target.value})},className:"jsx-3031658425"})),N&&n.createElement("div",{className:"jsx-3031658425 input-wrapper"},n.createElement("label",{htmlFor:"reason",className:"jsx-3031658425"},d&&d[N.title]?d[N.title]:"Reason",":"),n.createElement("select",{name:"reason",className:"jsx-3031658425"},n.createElement("option",{value:"",disabled:!0,selected:!0,hidden:!0,className:"jsx-3031658425"},"Choose"),Object.keys(N.options).map(((e,t)=>n.createElement("option",{key:f("reason",t),value:e,className:"jsx-3031658425"},N.options[e]))))),!e.isWebinar&&a.includes("message")&&n.createElement("div",{className:"jsx-3031658425 input-wrapper"},n.createElement("label",{htmlFor:"Message",className:"jsx-3031658425"},d&&d.message?d.message:"Message",":"),n.createElement("textarea",{name:"message",placeholder:"Message",cols:"40",rows:"4",onChange:e=>{l({...s,message:e.target.value})},className:"jsx-3031658425"}," ")),n.createElement("div",{className:"jsx-3031658425 button-wrapper mt-4"},n.createElement("input",{type:"hidden",name:"form_id",value:u,className:"jsx-3031658425"}),n.createElement("input",{type:"hidden",name:"form_url",value:"",className:"jsx-3031658425"}),n.createElement("input",{type:"hidden",name:"date_time",value:"",className:"jsx-3031658425"}),n.createElement("input",{type:"hidden",name:"ip_address",value:s.ipAddress,className:"jsx-3031658425"}),n.createElement("input",{type:"submit",value:"Submit",className:"jsx-3031658425 submit-form btn-primary"+(1===a.length?" single-field":"")}))),g&&n.createElement("div",{className:"jsx-3031658425 input-wrapper gdpr-text mt-6"},(0,o.ZP)(g))),n.createElement(r(),{id:"3031658425"},[".input-field{height:50px;padding:15px;}"]))};g.propTypes={fields:d().any,fallbackEndpoint:d().string,formId:d().string,locale:d().string,gdprText:d().string,isWebinar:d().any,onValidationError:d().func,onSuccess:d().func},t.Z=g},64135:function(e,t,a){a.d(t,{Z:function(){return h}});var s=a(68472),r=a.n(s),n=a(67294),o=a(30653),l=a(27361),i=a.n(l),m=a(70044),c=a(63144),p=a.n(c);var d=a(24918),u=a(2449);class h extends n.Component{constructor(e){super(e);const t="undefined"===typeof e.showForm||e.showForm;this.locale=e?.locale||"",this.state={showForm:t,defaultGDPRText:""},this.marketoSuccess=this.marketoSuccess.bind(this),this.callSuccess=this.callSuccess.bind(this)}componentDidMount(){const e=this,t={fr:"fr-fr",de:"de-de",jp:"ja-jp",kr:"ko-kr",cn:"zh-cn",es:"es-mx",pt:"pt-br"};let a=this.locale.includes("-")?this.locale:"";Object.keys(t).forEach((e=>{this.locale?.replace("/","")===e&&(a=t[e])})),u.Z.getData("/translate_content_redesign",{query:{locale:a,entryUid:"blt7a2ecc87e95e0fed",callee:"getContentByUID"}}).then((e=>{this.setState({defaultGDPRText:e?.translate_content_l10n})})).catch((e=>console.log("err",e))),m.Z.check().then((e=>{e&&this.setState({showGdprMessage:e.in_eu}),this.props.callCloudAPI||this.setState({showGdprMessage:!0})}));let{formId:s}=this.props;"undefined"===typeof s&&(s=i()(this.props,"marketo.marketo_load_id"));const r=document.createElement("script");r.type="text/javascript",r.async=!0,r.src="https://info.elastic.co/js/forms2/js/forms2.min.js",document.body.appendChild(r),r.onload=()=>{if("undefined"!==typeof window.MktoForms2&&window.MktoForms2.loadForm){const t="https://info.elastic.co";MktoForms2.loadForm(t,"813-MAM-392",s,(e=>{if(!e)return;document.querySelectorAll(".mktoFormRow input[name=Form_Fill_Referrer__c]").forEach((e=>{e.setAttribute("value",window.location.href)}));const{fieldValues:t}=this.props;t&&Object.keys(t).forEach((e=>{this.setHiddenField(e,t[e])})),e.onSuccess(this.marketoSuccess),e.onSubmit((()=>{d.Z.formSubmission(),e.vals()&&e.vals().Email&&d.Z.hashValue(e.vals().Email).then((e=>{d.Z.SetCookie({name:"userId",value:e,domain:".elastic.co"})})),this.marketoSubmit&&this.marketoSubmit(e.vals())}))}));const a=e.props.ctaTitle?e.props.ctaTitle:i()(e,"props.marketo.cta_title_l10n");a&&MktoForms2.whenRendered((t=>{const s=document.getElementById(`mktoForm_${e.props.formId}`).getElementsByClassName("mktoButton")[0];"undefined"!==typeof a&&a.length>0&&s&&(s.innerHTML=a)}))}},r.onerror=()=>{"undefined"!==typeof e.props.onFormDidNotLoad&&(e.props.onFormDidNotLoad(),e.setState({showForm:!1}))}}marketoSuccess(e){return this.props.callCloudAPI?this.callCloud(e):this.callSuccess(e),this.setState({showForm:!1}),!1}callSuccess(e){if(this.props.onSuccess){const t={...e,successUrl:this.props.successUrl};this.props.onSuccess(t)}}callCloud(e){const t=this;(class{static addUser(e,t,a){const s=JSON.stringify({email:e,has_accepted_terms_and_policies:!0,data:{signup:{page:window.location.href}}});let r,n=this;return p()("https://cloud-api.elastic.co/api/v0/users",{method:"POST",headers:new Headers({"Content-Type":"application/json",Accept:"application/json"}),body:s}).then((e=>(r=e.clone(),e.json()))).then((e=>{let s=Object.assign(e,{status:r.status,statusText:r.statusText,ok:r.ok,headers:r.Headers});s.ok?t(s):n.handleError(a,s)})).catch((e=>{n.handleError(a,e)}))}static handleError(e,t){let a={msg:"",emailInvalid:!1};401===t.status||400===t.status&&"email exists"===t.msg?(a.msg='Looks like you already have an account. Sign in or reset your password to continue. If you have any questions or issues, please contact us.',a.emailInvalid=!0):t.status>=400&&(a.msg='Looks like you already have an account. Sign in or reset your password to continue. If you have any questions or issues, please contact us.'),e(a)}}).addUser(e.Email,(()=>{this.callSuccess(e)}),(e=>{t.setState({formErrorMessage:e.msg})}))}handleScriptCreate(){}handleScriptError(){}handleScriptLoad(){}setHiddenField(e,t){const a=document.getElementsByName(e);a&&a[0]&&(a[0].value=t)}render(){let{formId:e}=this.props,{gdprText:t}=this.props;return"undefined"===typeof e&&(e=i()(this.props,"marketo.marketo_load_id")),"undefined"===typeof t&&(t=i()(this.props,"marketo.gdpr_text[0].paragraph_l10n","")),""===t&&(t=this.state.defaultGDPRText),n.createElement("div",{id:"marketo-fe-form",className:"jsx-3812957129 mt-6 marketoFEForm"},this.state.showForm&&n.createElement("div",{className:"jsx-3812957129"},n.createElement("p",{className:"jsx-3812957129 debug"},"MarketoFEForm"),n.createElement("form",{id:`mktoForm_${e}`,className:"jsx-3812957129"}),this.state.showGdprMessage&&t?.length&&n.createElement("div",{className:"jsx-3812957129 gdpr-text"},(0,o.ZP)(t))),this.state.formErrorMessage?n.createElement("div",{className:"jsx-3812957129 error-message"},(0,o.ZP)(this.state.formErrorMessage)):"",n.createElement(r(),{id:"3812957129"},[".debug.jsx-3812957129{border:1px solid red;color:red;position:absolute;display:none;top:-20px;}"]))}}}}]);