"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 $}});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}),b=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 ")}),v=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),q=t(21977),_=t(93706),O=t(7348),P=t(96018),I=t(7013),S=t(63570),B=t(67619),R=t(41011),z=t(96469),E=t(11752),T=t.n(E),L=t(85893);function A(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 D(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.")}),$=function(e){var n,t=e.formTitle,a=e.pageLocation,u=e.formName,h=e.submitButtonLarge,g=e.dataAt,E=(0,l.useState)("inital"),A=E[0],$=E[1],H=(0,l.useRef)(null),J=(0,l.useRef)(null),U=(0,l.useRef)(null),W=(0,l.useRef)(null),X=(0,l.useRef)(null),G=(0,l.useRef)(null),K=(0,l.useRef)(null),Q=(0,l.useRef)(null),Y=(0,l.useState)(),ee=Y[0],en=Y[1];return"complete"===A?null:"pending"===A?(0,L.jsx)(y,{children:(0,L.jsx)(N.Z,{})}):"success"===A?(0,L.jsx)(y,{children:(0,L.jsxs)(q.Z.Success,{visible:!0,onClose:function(){return $("inital")},children:[(0,L.jsxs)(q.Z.Body,{children:[(0,L.jsx)("p",{children:(0,L.jsx)("strong",{children:"Thank you for contacting us."})}),(0,L.jsx)("p",{children:"A member of our team will get back to you as soon as possible."})]}),(0,L.jsx)(q.Z.CloseButton,{onClick:function(){return $("complete")}})]})}):"error"===A?(0,L.jsx)(y,{children:(0,L.jsxs)(q.Z.Error,{visible:!0,onClose:function(){return $("inital")},children:[(0,L.jsx)(q.Z.Body,{children:(0,L.jsxs)("p",{children:[(0,L.jsx)("strong",{children:"There was an error submitting the form"}),", please refresh the page to try again."]})}),(0,L.jsx)(q.Z.CloseButton,{onClick:function(){return $("initial")}})]})}):(0,L.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:V,onSubmit:(n=(0,i.Z)(o().mark(function e(n){var i,l,c,d,m,h,g,f,y,x,j,b,v,C,Z,k,w,N,q,_,O,P,S,E,L,A,F;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,b=n.gaclientid,v=n.gacampaign,C=n.gamedium,Z=n.gasource,k=n.gauserid,w=n.optin,N=n.ext,$("pending"),!(ee||(null==N?void 0:N.length)>20)){e.next=4;break}return e.abrupt("return",$("success"));case 4:return e.next=6,(0,z.W)();case 6:if(q=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:D({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:b,gacampaign:v,gamedium:C,gasource:Z,gauserid:k,optin:"".concat(w),subject:"Talk to Sales",referrer:document.referrer,formName:"Contact Sales",campaignIds:v,page_url:window.location.href},q)});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",$("error"));case 19:if($("success"),window.dataLayer.push({event:"formSubmission",enhanced_conversion_data:{email:"".concat(c.trim())}}),_="contact_sales_form","enterprise-lander"===a&&(_="enterprise_contact_form"),"government-lander"===a&&(_="government_contact_form"),i={},(0,r.Z)(i,_,{}),(0,r.Z)(i,"membership",{}),O=i,("enterprise-lander"===a||"government-lander"===a)&&(O[_].call_to_action=t),"contact_sales_form"!==_){e.next=50;break}return P=(0,R.i)(),e.next=30,s.Z.post("/api/request-ip");case 30:return S=e.sent.data,e.next=34,(0,B.U)({email:c});case 34:return E=e.sent.hashedEmail,O.membership=D(D({},P),{},{email:E,ipaddress:S}),O[_].phone=h,O[_].email=E,O[_].first_name=d,O[_].last_name=m,O[_].country=g,e.prev=42,e.next=45,s.Z.post("/api/crm/inbound-lead",{email:c,firstName:d,lastName:m,phone:h,country:g,jobTitle:y,companyName:l,numberOfEmployees:f,source:null!==(L=null!==(A=null==q?void 0:q.gasource)&&void 0!==A?A:u)&&void 0!==L?L:"contact_sales_form",firstMedium:(null==q?void 0:q.gamedium)||"",firstCampaign:(null==q?void 0:q.gacampaign)||"",firstAdClickId:(null==q?void 0:q.gclid)||"",context:{type:"lead",referrer:(null==q?void 0:q.referrer)||document.referrer}});case 45:e.next=50;break;case 47:e.prev=47,e.t1=e.catch(42),console.error("Error creating inbound lead",e.t1);case 50:if(O[_].job_title=y,O[_].company=l,O[_].number_of_employees=f,(0,I.w)(_,O),w){e.next=56;break}return e.abrupt("return");case 56:return e.prev=56,e.next=59,s.Z.post("".concat(p.yh,"/create-klaviyo-profile"),{email:c,firstName:d,lastName:m,hasAgreedToNewsOptIn:!0,metadata:D(D(D(D(D({source:"contact_sales_form",referrer:null!==(F=null==q?void 0:q.referrer)&&void 0!==F?F:document.referrer},q.gacampaign&&{campaignIds:q.gacampaign}),b&&{clientId:b}),q.gamedium&&{medium:q.gamedium}),k&&{userId:k}),q.gclid&&{trackId:q.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],[42,47],[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!==Q.current&&null!==K.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"!==Q.current.value?Q.current.value:null,a="undefined"!==K.current.value?K.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,L.jsxs)(f,{children:[(0,L.jsx)("input",{type:"hidden",name:"gaCid",id:"gaCid",ref:H}),(0,L.jsx)("input",{type:"hidden",name:"gaHid",id:"gaHid",ref:J}),(0,L.jsx)("input",{type:"hidden",name:"gaclientid",id:"gaclientid",ref:U}),(0,L.jsx)("input",{type:"hidden",name:"gacampaign",id:"gacampaign",ref:W}),(0,L.jsx)("input",{type:"hidden",name:"gamedium",id:"gamedium",ref:X}),(0,L.jsx)("input",{type:"hidden",name:"gasource",id:"gasource",ref:G}),(0,L.jsx)("input",{type:"hidden",name:"gatrackid",id:"gatrackid",ref:K}),(0,L.jsx)("input",{type:"hidden",name:"gauserid",id:"gauserid",ref:Q}),(0,L.jsxs)(x,{required:!0,children:[(0,L.jsx)(_.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,L.jsxs)(k,{children:[" ",n.firstName," "]})]}),(0,L.jsxs)(x,{required:!0,children:[(0,L.jsx)(_.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,L.jsxs)(k,{children:[" ",n.lastName," "]})]}),(0,L.jsxs)(x,{required:!0,children:[(0,L.jsxs)(_.Z.Select.Basic,{"aria-label":"Select Title",id:"title",name:"title",label:"Title",defaultValue:i.title,onChange:a,onBlur:r,children:[(0,L.jsx)("option",{value:"",children:"Choose..."}),(0,L.jsx)("option",{value:"administrator",children:"Administrator"}),(0,L.jsx)("option",{value:"analyst",children:"Analyst"}),(0,L.jsx)("option",{value:"architect",children:"Architect"}),(0,L.jsx)("option",{value:"assistantDirector",children:"Assistant Director"}),(0,L.jsx)("option",{value:"assistantManager",children:"Assistant Manager"}),(0,L.jsx)("option",{value:"assistantVP",children:"Assistant VP"}),(0,L.jsx)("option",{value:"cio",children:"CIO (or other C-level)"}),(0,L.jsx)("option",{value:"coordinator",children:"Coordinator"}),(0,L.jsx)("option",{value:"director",children:"Director"}),(0,L.jsx)("option",{value:"engineer",children:"Engineer"}),(0,L.jsx)("option",{value:"manager",children:"Manager"}),(0,L.jsx)("option",{value:"projectManager",children:"Project Manager"}),(0,L.jsx)("option",{value:"specialist",children:"Specialist"}),(0,L.jsx)("option",{value:"technician",children:"Tech/Technician"}),(0,L.jsx)("option",{value:"vp",children:"VP"})]}),t.title&&n.title&&(0,L.jsxs)(k,{children:[" ",n.title," "]})]}),(0,L.jsxs)(x,{required:!0,children:[(0,L.jsx)(_.Z.Input,{label:"Work Email",name:"email",type:"email",maxLength:50,onChange:a,onBlur:r,value:i.email,crossOrigin:""}),t.email&&n.email&&(0,L.jsxs)(k,{children:[" ",n.email," "]})]}),(0,L.jsxs)(x,{required:!0,children:[(0,L.jsx)(_.Z.Input,{label:"Company",name:"company",type:"text",maxLength:50,onChange:a,onBlur:r,value:i.company,crossOrigin:""}),t.company&&n.company&&(0,L.jsxs)(k,{children:[" ",n.company," "]})]}),(0,L.jsxs)(w,{children:[(0,L.jsxs)(x,{required:!0,className:"mod-phone",children:[(0,L.jsx)(_.Z.Input,{label:"Phone",name:"phone",type:"phone",maxLength:70,onChange:a,onBlur:r,value:i.phone,crossOrigin:""}),t.phone&&n.phone&&(0,L.jsxs)(k,{children:[" ",n.phone," "]})]}),(0,L.jsx)(x,{className:"mod-extension",children:(0,L.jsx)(_.Z.Input,{label:"Ext. (opt)",name:"ext",type:"text",maxLength:30,onChange:a,onBlur:r,value:i.ext,crossOrigin:""})})]}),(0,L.jsxs)(x,{required:!0,children:[(0,L.jsx)(_.Z.Select.Basic,{label:"Country",name:"country",onChange:a,onBlur:r,value:i.country,children:d.J.map(function(e){return(0,L.jsx)("option",{value:e,children:e},e)})}),t.country&&n.country&&(0,L.jsxs)(k,{children:[" ",n.country," "]})]}),(0,L.jsxs)(j,{children:[(0,L.jsx)(_.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,L.jsxs)(b,{required:!0,children:[(0,L.jsx)("p",{className:"employee-count",children:"How many employees would you like to train?"}),(0,L.jsxs)(v,{children:[(0,L.jsxs)(C,{children:[(0,L.jsx)(_.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,L.jsx)(O.Z.Right,{htmlFor:"quantity",changeCursorOnDisabled:!0,children:"2-4"})]}),(0,L.jsxs)(C,{children:[(0,L.jsx)(_.Z.Radio,{"aria-label":"Company size is between 5-20",name:"quantity",id:"quantity",value:F,checked:F===i.quantity,onChange:a,onBlur:r,crossOrigin:""}),(0,L.jsx)(O.Z.Right,{htmlFor:"quantity",changeCursorOnDisabled:!0,children:F})]}),(0,L.jsxs)(C,{children:[(0,L.jsx)(_.Z.Radio,{"aria-label":"Company size is 20+",name:"quantity",id:"quantity",value:"20+",checked:"20+"===i.quantity,onChange:a,onBlur:r,crossOrigin:""}),(0,L.jsx)(O.Z.Right,{htmlFor:"quantity",changeCursorOnDisabled:!0,children:"20+"})]}),(0,L.jsxs)(C,{children:[(0,L.jsx)(_.Z.Radio,{"aria-label":"Company size is 100+",name:"quantity",id:"quantity",value:M,checked:M===i.quantity,onChange:a,onBlur:r,crossOrigin:""}),(0,L.jsx)(O.Z.Right,{htmlFor:"quantity",changeCursorOnDisabled:!0,children:M})]})]}),t.quantity&&n.quantity&&(0,L.jsxs)(k,{children:[" ",n.quantity," "]})]}),(0,L.jsx)(S.R5,{tabIndex:-1,onChange:function(e){return en(e.target.value)}}),(0,L.jsxs)(Z,{children:[(0,L.jsxs)("p",{children:["By submitting this form you agree that you have read, understood, and are able to consent to our"," ",(0,L.jsx)(m.l7,{href:"/privacy",children:"privacy policy"}),"."]}),h?(0,L.jsx)(P.Z.PrimaryLarge,{"aria-label":"Submit form",type:"submit","data-at":null!=g?g:"signup-form-submit",disabled:l,children:"Submit"}):(0,L.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)()}}}]);