"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1642],{39412:function(e,n,t){t.r(n),t.d(n,{default:function(){return H}});var r=t(59499),i=t(50029),a=t(64687),o=t.n(a),l=t(67294),s=t(87066),c=t(87103),u=t(12093),d=t(53964),m=t(53418),p=t(67686),h=t(87379),g=(0,h.iv)(["&:after{content:'*';vertical-align:middle;margin-left:0.3rem;color:",";}"],function(e){return e.theme.colors.blue}),f=(0,h.ZP)(c.l0).withConfig({displayName:"FormLayout",componentId:"sc-kzoyx-0"})(["display:grid;grid-gap:2rem 2rem;text-align:left;grid-template-columns:1fr;width:100%;margin:2rem auto;@media only screen and (max-width:","){padding:0 2rem;}@media only screen and (max-width:","){padding:0 0;}"],function(e){return e.theme.breakpoints.desktop960},function(e){return e.theme.breakpoints.smtablet}),y=h.ZP.div.withConfig({displayName:"NotificationBox",componentId:"sc-kzoyx-1"})(["margin-top:3rem;text-align:left;"]),x=h.ZP.div.withConfig({displayName:"InputContainer",componentId:"sc-kzoyx-2"})(["label{text-align:left;font-size:",";",";}input,select{width:100%;padding-bottom:1rem;&:focus{border:1px solid #0f62fa;}}input[type='checkbox'],input[type='radio']{margin-right:1.5rem;width:auto;}"],function(e){return e.theme.fonts.textSmall},function(e){return e.required&&g}),j=h.ZP.label.withConfig({displayName:"OptInContainer",componentId:"sc-kzoyx-3"})(["display:flex;align-items:center;font-size:",";input[type='checkbox']{margin-right:1rem;min-width:3rem;}"],function(e){return e.theme.fonts.textSmall}),v=h.ZP.div.withConfig({displayName:"EmployeeCountContainer",componentId:"sc-kzoyx-4"})(["display:flex;flex-direction:column;justify-content:center;align-items:center;gap:1rem;",";"],function(e){return e.required&&"\n p {\n ".concat(g,";\n } \n ")}),b=h.ZP.div.withConfig({displayName:"EmployeeCountOptions",componentId:"sc-kzoyx-5"})(["display:grid;grid-template-columns:repeat(2,1fr);gap:1.5rem 2rem;margin:0 auto;@media only screen and (max-width:","){max-width:100%;}@media only screen and (max-width:","){width:100%;grid-template-columns:1fr;gap:1rem;}"],function(e){return e.theme.breakpoints.desktop960},function(e){return e.theme.breakpoints.smphone}),C=h.ZP.div.withConfig({displayName:"EmployeeCountOption",componentId:"sc-kzoyx-6"})(["display:flex;align-items:center;min-width:10rem;input[type='radio']{margin-right:1rem;}label{white-space:nowrap;}"]),Z=h.ZP.div.withConfig({displayName:"SubmitContainer",componentId:"sc-kzoyx-7"})(["display:flex;flex-direction:column;justify-content:center;align-items:center;margin:0 auto 0 auto;max-width:36rem;p{font-size:",";text-align:center;margin:0 auto 2rem auto;}"],function(e){return e.theme.fonts.textSmall}),k=h.ZP.span.withConfig({displayName:"ErrorMessage",componentId:"sc-kzoyx-8"})(["display:inline-block;color:",";font-size:",";padding-top:1rem;"],function(e){return e.theme.colors.red},function(e){return e.theme.fonts.textSmall}),w=h.ZP.div.withConfig({displayName:"PhoneExtensionContainer",componentId:"sc-kzoyx-9"})(["display:flex;.mod-phone{flex:6.3;}.mod-extension{padding-left:1.2rem;flex:4;}"]),N=t(66981),_=t(21977),q=t(93706),O=t(7348),P=t(96018),I=t(7013),S=t(63570),B=t(67619),R=t(41011),E=t(96469),z=t(11752),T=t.n(z),L=t(6693),A=t(85893);function D(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function F(e){for(var n=1;n;:[\]]{1,50}$/.test(e)}).required("Please enter your first name."),lastName:u.Z_().test("is-special-character","Please enter a valid name",function(e){return/^[\w'\-,.][^0-9_!¡?÷?¿/\\+=@#$%ˆ&*(){}|~<>;:[\]]{1,50}$/.test(e)}).required("Please enter your last name."),title:u.Z_().required("Please select a title."),email:u.Z_().email("Please enter a valid email address.").required("Please enter your email address."),phone:u.Z_().test("is-number-phone","The phone number is not valid. +1 (123)456-7890",function(e){return/^[-+() 0-9]+$/.test(e)}).required("Please enter your phone number."),company:u.Z_().required("Please enter your company name."),country:u.Z_().required("Please select your country."),quantity:u.Z_().required("Please select an option.")}),H=function(e){var n,t=e.formTitle,a=e.pageLocation,u=e.formName,h=e.submitButtonLarge,g=e.dataAt,z=(0,l.useState)("inital"),D=z[0],H=z[1],J=(0,l.useRef)(null),K=(0,l.useRef)(null),U=(0,l.useRef)(null),W=(0,l.useRef)(null),X=(0,l.useRef)(null),G=(0,l.useRef)(null),Q=(0,l.useRef)(null),Y=(0,l.useRef)(null),ee=(0,l.useState)(),en=ee[0],et=ee[1];return"complete"===D?null:"pending"===D?(0,A.jsx)(y,{children:(0,A.jsx)(N.Z,{})}):"success"===D?(0,A.jsx)(y,{children:(0,A.jsxs)(_.Z.Success,{visible:!0,onClose:function(){return H("inital")},children:[(0,A.jsxs)(_.Z.Body,{children:[(0,A.jsx)("p",{children:(0,A.jsx)("strong",{children:"Thank you for contacting us."})}),(0,A.jsx)("p",{children:"A member of our team will get back to you as soon as possible."})]}),(0,A.jsx)(_.Z.CloseButton,{onClick:function(){return H("complete")}})]})}):"error"===D?(0,A.jsx)(y,{children:(0,A.jsxs)(_.Z.Error,{visible:!0,onClose:function(){return H("inital")},children:[(0,A.jsx)(_.Z.Body,{children:(0,A.jsxs)("p",{children:[(0,A.jsx)("strong",{children:"There was an error submitting the form"}),", please refresh the page to try again."]})}),(0,A.jsx)(_.Z.CloseButton,{onClick:function(){return H("initial")}})]})}):(0,A.jsx)(c.J9,{initialValues:{firstName:"",lastName:"",email:"",title:"",company:"",country:"United States",phone:"",quantity:"",department:"sales",gatrackid:"",gaclientid:"",gacampaign:"",gamedium:"",gasource:"",gauserid:"",optin:!1,formName:"",ext:""},validationSchema:$,onSubmit:(n=(0,i.Z)(o().mark(function e(n){var i,l,c,d,m,h,g,f,y,x,j,v,b,C,Z,k,w,N,_,q,O,P,S,z,A,D,M;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(l=n.company,c=n.email,d=n.firstName,m=n.lastName,h=n.phone,g=n.country,f=n.quantity,y=n.title,x=n.department,j=n.gatrackid,v=n.gaclientid,b=n.gacampaign,C=n.gamedium,Z=n.gasource,k=n.gauserid,w=n.optin,N=n.ext,H("pending"),!(en||(null==N?void 0:N.length)>20)){e.next=4;break}return e.abrupt("return",H("success"));case 4:return e.next=6,(0,E.W)();case 6:if(_=e.sent,T()().publicRuntimeConfig.accountAlias!==p.N.LX_PROD){e.next=19;break}return e.prev=10,e.next=13,(0,s.Z)({method:"POST",url:"".concat(p.yh,"/contact_us"),headers:{"Content-Type":"applicationhttps://www.cbtnuggets.com/json"},data:F({title:y,company:"".concat(null==l?void 0:l.trim()),country:"".concat(null==g?void 0:g.trim()),email:"".concat(null==c?void 0:c.trim()),phone:"".concat(null==h?void 0:h.trim()),quantity:f,first_name:"".concat(null==d?void 0:d.trim()),last_name:"".concat(null==m?void 0:m.trim()),form_name:null!=u?u:"contact_sales",location:"features-lander",department:x,gatrackid:j,gaclientid:v,gacampaign:b,gamedium:C,gasource:Z,gauserid:k,optin:"".concat(w),subject:"Talk to Sales",referrer:document.referrer,formName:"Contact Sales",campaignIds:b,page_url:window.location.href},_)});case 13:e.next=19;break;case 15:return e.prev=15,e.t0=e.catch(10),console.error("Error submitting contact us form",e.t0),e.abrupt("return",H("error"));case 19:return H("success"),e.prev=20,e.next=23,s.Z.post("/api/crm/inbound-lead",{email:c,firstName:d,lastName:m,phone:h,country:g,jobTitle:y,companyName:l,source:null!==(q=null!==(O=null==_?void 0:_.gasource)&&void 0!==O?O:u)&&void 0!==q?q:"contact_sales_form",firstMedium:(null==_?void 0:_.gamedium)||"",firstCampaign:(null==_?void 0:_.gacampaign)||"",firstAdClickId:(null==_?void 0:_.gclid)||"",context:{type:L.KP.LEAD,eventTitle:null!=u?u:"contact_sales_form",details:"Number of Employees: ".concat(f),referrer:(null==_?void 0:_.referrer)||document.referrer}});case 23:e.next=28;break;case 25:e.prev=25,e.t1=e.catch(20),console.error("Error creating inbound lead",e.t1);case 28:if(window.dataLayer.push({event:"formSubmission",enhanced_conversion_data:{email:"".concat(c.trim())}}),P="contact_sales_form","enterprise-lander"===a&&(P="enterprise_contact_form"),"government-lander"===a&&(P="government_contact_form"),i={},(0,r.Z)(i,P,{}),(0,r.Z)(i,"membership",{}),S=i,("enterprise-lander"===a||"government-lander"===a)&&(S[P].call_to_action=t),"contact_sales_form"!==P){e.next=50;break}return z=(0,R.i)(),e.next=38,s.Z.post("/api/request-ip");case 38:return A=e.sent.data,e.next=42,(0,B.U)({email:c});case 42:D=e.sent.hashedEmail,S.membership=F(F({},z),{},{email:D,ipaddress:A}),S[P].phone=h,S[P].email=D,S[P].first_name=d,S[P].last_name=m,S[P].country=g;case 50:if(S[P].job_title=y,S[P].company=l,S[P].number_of_employees=f,(0,I.w)(P,S),w){e.next=56;break}return e.abrupt("return");case 56:return e.prev=56,e.next=59,s.Z.post("/api/klaviyo/create-profile",{email:c,firstName:d,lastName:m,hasAgreedToNewsOptIn:!0,metadata:F(F(F(F(F({source:"contact_sales_form",referrer:null!==(M=null==_?void 0:_.referrer)&&void 0!==M?M:document.referrer},_.gacampaign&&{campaignIds:_.gacampaign}),v&&{clientId:v}),_.gamedium&&{medium:_.gamedium}),k&&{userId:k}),_.gclid&&{trackId:_.gclid})},{headers:{"Content-Type":"applicationhttps://www.cbtnuggets.com/json","klaviyo-profile-key":"c2985f7b-09db-4d47-8e05-70e23e32d662"}});case 59:e.next=64;break;case 61:e.prev=61,e.t2=e.catch(56),console.error("Error creating Klaviyo profile:",e.t2);case 64:case"end":return e.stop()}},e,null,[[10,15],[20,25],[56,61]])})),function(e){return n.apply(this,arguments)}),children:function(e){var n=e.errors,t=e.touched,r=e.handleBlur,i=e.values,a=e.handleChange,o=e.setFieldValue,l=e.isSubmitting,s=function(){if(null!==U.current&&null!==W.current&&null!==X.current&&null!==G.current&&null!==Y.current&&null!==Q.current){var e="undefined"!==U.current.value?U.current.value:null,n="undefined"!==W.current.value?W.current.value:null,t="undefined"!==X.current.value?X.current.value:null,r="undefined"!==G.current.value?G.current.value:null,i="undefined"!==Y.current.value?Y.current.value:null,a="undefined"!==Q.current.value?Q.current.value:null;o("gaclientid",e),o("gacampaign",n),o("gamedium",t),o("gasource",r),o("gauserid",i),o("gatrackid",a)}},c=function(e,n){o(e,n.target.checked),s()};return(0,A.jsxs)(f,{children:[(0,A.jsx)("input",{type:"hidden",name:"gaCid",id:"gaCid",ref:J}),(0,A.jsx)("input",{type:"hidden",name:"gaHid",id:"gaHid",ref:K}),(0,A.jsx)("input",{type:"hidden",name:"gaclientid",id:"gaclientid",ref:U}),(0,A.jsx)("input",{type:"hidden",name:"gacampaign",id:"gacampaign",ref:W}),(0,A.jsx)("input",{type:"hidden",name:"gamedium",id:"gamedium",ref:X}),(0,A.jsx)("input",{type:"hidden",name:"gasource",id:"gasource",ref:G}),(0,A.jsx)("input",{type:"hidden",name:"gatrackid",id:"gatrackid",ref:Q}),(0,A.jsx)("input",{type:"hidden",name:"gauserid",id:"gauserid",ref:Y}),(0,A.jsxs)(x,{required:!0,children:[(0,A.jsx)(q.Z.Input,{label:"First name",id:"firstName",name:"firstName",type:"text",maxLength:50,onBlur:r,value:i.firstName,onChange:a,crossOrigin:""}),t.firstName&&n.firstName&&(0,A.jsxs)(k,{children:[" ",n.firstName," "]})]}),(0,A.jsxs)(x,{required:!0,children:[(0,A.jsx)(q.Z.Input,{label:"Last name",id:"lastName",name:"lastName",type:"text",maxLength:50,onBlur:r,value:i.lastName,onChange:a,crossOrigin:""}),t.lastName&&n.lastName&&(0,A.jsxs)(k,{children:[" ",n.lastName," "]})]}),(0,A.jsxs)(x,{required:!0,children:[(0,A.jsxs)(q.Z.Select.Basic,{"aria-label":"Select Title",id:"title",name:"title",label:"Title",defaultValue:i.title,onChange:a,onBlur:r,children:[(0,A.jsx)("option",{value:"",children:"Choose..."}),(0,A.jsx)("option",{value:"administrator",children:"Administrator"}),(0,A.jsx)("option",{value:"analyst",children:"Analyst"}),(0,A.jsx)("option",{value:"architect",children:"Architect"}),(0,A.jsx)("option",{value:"assistantDirector",children:"Assistant Director"}),(0,A.jsx)("option",{value:"assistantManager",children:"Assistant Manager"}),(0,A.jsx)("option",{value:"assistantVP",children:"Assistant VP"}),(0,A.jsx)("option",{value:"cio",children:"CIO (or other C-level)"}),(0,A.jsx)("option",{value:"coordinator",children:"Coordinator"}),(0,A.jsx)("option",{value:"director",children:"Director"}),(0,A.jsx)("option",{value:"engineer",children:"Engineer"}),(0,A.jsx)("option",{value:"manager",children:"Manager"}),(0,A.jsx)("option",{value:"projectManager",children:"Project Manager"}),(0,A.jsx)("option",{value:"specialist",children:"Specialist"}),(0,A.jsx)("option",{value:"technician",children:"Tech/Technician"}),(0,A.jsx)("option",{value:"vp",children:"VP"})]}),t.title&&n.title&&(0,A.jsxs)(k,{children:[" ",n.title," "]})]}),(0,A.jsxs)(x,{required:!0,children:[(0,A.jsx)(q.Z.Input,{label:"Work Email",name:"email",type:"email",maxLength:50,onChange:a,onBlur:r,value:i.email,crossOrigin:""}),t.email&&n.email&&(0,A.jsxs)(k,{children:[" ",n.email," "]})]}),(0,A.jsxs)(x,{required:!0,children:[(0,A.jsx)(q.Z.Input,{label:"Company",name:"company",type:"text",maxLength:50,onChange:a,onBlur:r,value:i.company,crossOrigin:""}),t.company&&n.company&&(0,A.jsxs)(k,{children:[" ",n.company," "]})]}),(0,A.jsxs)(w,{children:[(0,A.jsxs)(x,{required:!0,className:"mod-phone",children:[(0,A.jsx)(q.Z.Input,{label:"Phone",name:"phone",type:"phone",maxLength:70,onChange:a,onBlur:r,value:i.phone,crossOrigin:""}),t.phone&&n.phone&&(0,A.jsxs)(k,{children:[" ",n.phone," "]})]}),(0,A.jsx)(x,{className:"mod-extension",children:(0,A.jsx)(q.Z.Input,{label:"Ext. (opt)",name:"ext",type:"text",maxLength:30,onChange:a,onBlur:r,value:i.ext,crossOrigin:""})})]}),(0,A.jsxs)(x,{required:!0,children:[(0,A.jsx)(q.Z.Select.Basic,{label:"Country",name:"country",onChange:a,onBlur:r,value:i.country,children:d.J.map(function(e){return(0,A.jsx)("option",{value:e,children:e},e)})}),t.country&&n.country&&(0,A.jsxs)(k,{children:[" ",n.country," "]})]}),(0,A.jsxs)(j,{children:[(0,A.jsx)(q.Z.Checkbox,{name:"optIn",id:"optIn",onChange:function(e){return c("optin",e)},"aria-label":"Opt into CBT Nuggets news and resources emailer.",crossOrigin:""}),"Send me CBT Nuggets IT training news and resources. (optional)"]}),(0,A.jsxs)(v,{required:!0,children:[(0,A.jsx)("p",{className:"employee-count",children:"How many employees would you like to train?"}),(0,A.jsxs)(b,{children:[(0,A.jsxs)(C,{children:[(0,A.jsx)(q.Z.Radio,{"aria-label":"Company size is between 2-4",name:"quantity",id:"quantity",value:"2-4",checked:"2-4"===i.quantity,onChange:a,onBlur:r,crossOrigin:""}),(0,A.jsx)(O.Z.Right,{htmlFor:"quantity",changeCursorOnDisabled:!0,children:"2-4"})]}),(0,A.jsxs)(C,{children:[(0,A.jsx)(q.Z.Radio,{"aria-label":"Company size is between 5-20",name:"quantity",id:"quantity",value:M,checked:M===i.quantity,onChange:a,onBlur:r,crossOrigin:""}),(0,A.jsx)(O.Z.Right,{htmlFor:"quantity",changeCursorOnDisabled:!0,children:M})]}),(0,A.jsxs)(C,{children:[(0,A.jsx)(q.Z.Radio,{"aria-label":"Company size is 20+",name:"quantity",id:"quantity",value:"20+",checked:"20+"===i.quantity,onChange:a,onBlur:r,crossOrigin:""}),(0,A.jsx)(O.Z.Right,{htmlFor:"quantity",changeCursorOnDisabled:!0,children:"20+"})]}),(0,A.jsxs)(C,{children:[(0,A.jsx)(q.Z.Radio,{"aria-label":"Company size is 100+",name:"quantity",id:"quantity",value:V,checked:V===i.quantity,onChange:a,onBlur:r,crossOrigin:""}),(0,A.jsx)(O.Z.Right,{htmlFor:"quantity",changeCursorOnDisabled:!0,children:V})]})]}),t.quantity&&n.quantity&&(0,A.jsxs)(k,{children:[" ",n.quantity," "]})]}),(0,A.jsx)(S.R5,{tabIndex:-1,onChange:function(e){return et(e.target.value)}}),(0,A.jsxs)(Z,{children:[(0,A.jsxs)("p",{children:["By submitting this form you agree that you have read, understood, and are able to consent to our"," ",(0,A.jsx)(m.l7,{href:"/privacy",children:"privacy policy"}),"."]}),h?(0,A.jsx)(P.Z.PrimaryLarge,{"aria-label":"Submit form",type:"submit","data-at":null!=g?g:"signup-form-submit",disabled:l,children:"Submit"}):(0,A.jsx)(P.Z.Primary,{"aria-label":"Submit form",type:"submit","data-at":null!=g?g:"signup-form-submit",disabled:l,children:"Submit"})]})]})}})}},28811:function(e,n,t){t.d(n,{Z:function(){return r}});function r(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}},83618:function(e,n,t){t.d(n,{Z:function(){return l}});var r=t(14666),i=t(28811),a=t(2937),o=t(14882);function l(e){return(0,r.Z)(e)||(0,i.Z)(e)||(0,a.Z)(e)||(0,o.Z)()}}}]);