"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4445],{94445:function(e,a,n){n.r(a),n.d(a,{default:function(){return F}});var i=n(59499),r=n(50029),t=n(64687),o=n.n(t),l=n(67294),s=n(87066),u=n(87103),c=n(96827),d=["United States","Afghanistan","Albania","Algeria","American Samoa","Andorra Principality of","Angola","Anguilla","Antarctica","Antigua and Barbuda","Argentina","Armenia","Aruba","Australia","Austria","Azerbaidjan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bermuda","Bhutan","Bolivia","Bosnia-Herzegovina","Botswana","Bouvet Island","Brazil","British Indian Ocean Territory","Brunei Darussalam","Bulgaria","Burkina Faso","Burundi","Cambodia Kingdom of","Cameroon","Canada","Cape Verde","Cayman Islands","Central African Republic","Chad","Chile","China","Christmas Island","Cocos (Keeling) Islands","Colombia","Comoros","Congo The Democratic Republic of the","Congo","Cook Islands","Costa Rica","Croatia","Cuba","Cyprus","Czech Republic","Denmark","Djibouti","Dominica","Dominican Republic","Timor-Leste","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Ethiopia","Falkland Islands","Faroe Islands","Fiji","Finland","Former Czechoslovakia","Former USSR","France (European Territory)","France","French Guyana","French Southern Territories","Gabon","Gambia","Georgia","Germany","Ghana","Gibraltar","Great Britain","Greece","Greenland","Grenada","Guadeloupe (French)","Guam (USA)","Guatemala","Guinea Bissau","Guinea","Guyana","Haiti","Heard and McDonald Islands","Holy See (Vatican City State)","Honduras","Hong Kong","Hungary","Iceland","India","Indonesia","Iran","Iraq","Ireland","Israel","Italy","Ivory Coast (Cote DIvoire)","Jamaica","Japan","Jordan","Kazakhstan","Kenya","Kiribati","Kuwait","Kyrgyz Republic (Kyrgyzstan)","Laos","Latvia","Lebanon","Lesotho","Liberia","Libya","Liechtenstein","Lithuania","Luxembourg","Macau","Macedonia","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Marshall Islands","Martinique (French)","Mauritania","Mauritius","Mayotte","Mexico","Micronesia","Moldavia","Monaco","Mongolia","Montserrat","Morocco","Mozambique","Myanmar","Namibia","Nauru","Nepal","Netherlands Antilles","Netherlands","Neutral Zone","New Caledonia (French)","New Zealand","Nicaragua","Nigeria","Niger","Niue","Norfolk Island","North Korea","Northern Mariana Islands","Norway","Oman","Pakistan","Palau","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Pitcairn Island","Poland","Polynesia (French)","Portugal","Puerto Rico","Qatar","Reunion (French)","Romania","Russian Federation","Rwanda","S. Georgia & S. Sandwich Isls.","Saint Helena","Saint Kitts & Nevis Anguilla","Saint Lucia","Saint Pierre and Miquelon","Saint Tome (Sao Tome) and Principe","Saint Vincent & Grenadines","Samoa","San Marino","Saudi Arabia","Senegal","Serbia","Seychelles","Sierra Leone","Singapore","Slovak Republic","Slovenia","Solomon Islands","Somalia","South Africa","South Korea","Spain","Sri Lanka","Sudan","Suriname","Svalbard and Jan Mayen Islands","Swaziland","Sweden","Switzerland","Syria","Tadjikistan","Taiwan","Tanzania","Thailand","Togo","Tokelau","Tonga","Trinidad and Tobago","Tunisia","Turkey","Turkmenistan","Turks and Caicos Islands","Tuvalu","USA Minor Outlying Islands","Uganda","Ukraine","United Arab Emirates","United Kingdom","Uruguay","Uzbekistan","Vanuatu","Venezuela","Vietnam","Virgin Islands (British)","Virgin Islands (USA)","Wallis and Futuna Islands","Western Sahara","Yemen","Yugoslavia","Zaire","Zambia","Zimbabwe"],m=n(53418),p=n(19521),h=(0,p.iv)(["&:after{content:'*';vertical-align:middle;margin-left:0.3rem;color:",";}"],function(e){return e.theme.colors.blue}),g=(0,p.ZP)(u.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}),f=p.ZP.div.withConfig({displayName:"NotificationBox",componentId:"sc-kzoyx-1"})(["margin-top:3rem;text-align:left;"]),y=p.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&&h}),x=p.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=p.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(h,";\n } \n ")}),v=p.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}),j=p.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;}"]),C=p.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}),S=p.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}),N=p.ZP.div.withConfig({displayName:"PhoneExtensionContainer",componentId:"sc-kzoyx-9"})(["display:flex;.mod-phone{flex:6.3;}.mod-extension{padding-left:1.2rem;flex:4;}"]),k=n(70440),w=n(7013),I=n(63570),P=n(67619),B=n(41011),_=n(96469),T=n(6693),A=n(85893);function M(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);a&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function O(e){for(var a=1;a;:[\]]{1,50}$/.test(e)}).required("Please enter your first name."),lastName:c.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:c.Z_().required("Please select a title."),email:c.Z_().email("Please enter a valid email address.").required("Please enter your email address."),phone:c.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:c.Z_().required("Please enter your company name."),country:c.Z_().required("Please select your country."),quantity:c.Z_().required("Please select an option.")}),F=function(e){var a,n=e.formTitle,t=e.pageLocation,c=e.formName,p=e.submitButtonLarge,h=e.dataAt,M=(0,l.useState)("inital"),F=M[0],z=M[1],Z=(0,l.useRef)(null),E=(0,l.useRef)(null),L=(0,l.useRef)(null),R=(0,l.useRef)(null),G=(0,l.useRef)(null),D=(0,l.useRef)(null),K=(0,l.useRef)(null),U=(0,l.useRef)(null),V=(0,l.useState)(),H=V[0],J=V[1];return"complete"===F?null:"pending"===F?(0,A.jsx)(f,{children:(0,A.jsx)(k.LoadingBubbles,{})}):"success"===F?(0,A.jsx)(f,{children:(0,A.jsxs)(k.Notice.Success,{visible:!0,onClose:function(){return z("inital")},children:[(0,A.jsxs)(k.Notice.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)(k.Notice.CloseButton,{onClick:function(){return z("complete")}})]})}):"error"===F?(0,A.jsx)(f,{children:(0,A.jsxs)(k.Notice.Error,{visible:!0,onClose:function(){return z("inital")},children:[(0,A.jsx)(k.Notice.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)(k.Notice.CloseButton,{onClick:function(){return z("initial")}})]})}):(0,A.jsx)(u.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:q,onSubmit:(a=(0,r.Z)(o().mark(function e(a){var r,l,u,d,m,p,h,g,f,y,x,b,v,j,C,S,N,k,I,A;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(l=a.company,u=a.email,d=a.firstName,m=a.lastName,p=a.phone,h=a.country,g=a.quantity,f=a.title,y=a.gaclientid,x=a.gauserid,b=a.optin,v=a.ext,z("pending"),!(H||(null==v?void 0:v.length)>20)){e.next=4;break}return e.abrupt("return",z("success"));case 4:return e.next=6,(0,_.W)();case 6:return j=e.sent,e.prev=7,e.next=10,s.Z.post("/api/crm/inbound-lead",{email:u,firstName:d,lastName:m,phone:p,country:h,jobTitle:f,companyName:l,source:c||"contact_sales_form",utmSource:(null==j?void 0:j.gasource)||"",firstMedium:(null==j?void 0:j.gamedium)||"",firstCampaign:(null==j?void 0:j.gacampaign)||"",firstAdClickId:(null==j?void 0:j.gclid)||"",portal:c||"contact_sales_form",portalDetail:"Number of Employees: ".concat(g),portalUrl:window.location.href,landing_page:(null==j?void 0:j.landing_page)||void 0,referrer:(null==j?void 0:j.referrer)||document.referrer||void 0,fbclid:(null==j?void 0:j.fbclid)||void 0,msclkid:(null==j?void 0:j.msclkid)||void 0,utm_term:(null==j?void 0:j.gaterm)||void 0,utm_content:(null==j?void 0:j.gacontent)||void 0,utm_id:(null==j?void 0:j.utm_id)||void 0,utm_adgroup:(null==j?void 0:j.utm_adgroup)||void 0,gad_campaignid:(null==j?void 0:j.gad_campaignid)||void 0,context:{type:T.KP.LEAD,eventTitle:null!=c?c:"contact_sales_form",details:"Number of Employees: ".concat(g),referrer:(null==j?void 0:j.referrer)||document.referrer}});case 10:z("success"),e.next=18;break;case 13:return e.prev=13,e.t0=e.catch(7),console.error("Error creating inbound lead",e.t0),z("error"),e.abrupt("return");case 18:if(window.dataLayer.push({event:"formSubmission",enhanced_conversion_data:{email:"".concat(u.trim())}}),C="contact_sales_form","enterprise-lander"===t&&(C="enterprise_contact_form"),"government-lander"===t&&(C="government_contact_form"),r={},(0,i.Z)(r,C,{}),(0,i.Z)(r,"membership",{}),S=r,("enterprise-lander"===t||"government-lander"===t)&&(S[C].call_to_action=n),"contact_sales_form"!==C){e.next=40;break}return N=(0,B.i)(),e.next=28,s.Z.post("/api/request-ip");case 28:return k=e.sent.data,e.next=32,(0,P.U)({email:u});case 32:I=e.sent.hashedEmail,S.membership=O(O({},N),{},{email:I,ipaddress:k}),S[C].phone=p,S[C].email=I,S[C].first_name=d,S[C].last_name=m,S[C].country=h;case 40:if(S[C].job_title=f,S[C].company=l,S[C].number_of_employees=g,(0,w.w)(C,S),b){e.next=46;break}return e.abrupt("return");case 46:return e.prev=46,e.next=49,s.Z.post("/api/klaviyo/create-profile",{email:u,firstName:d,lastName:m,hasAgreedToNewsOptIn:!0,metadata:O(O(O(O(O({source:"contact_sales_form",referrer:null!==(A=null==j?void 0:j.referrer)&&void 0!==A?A:document.referrer},j.gacampaign&&{campaignIds:j.gacampaign}),y&&{clientId:y}),j.gamedium&&{medium:j.gamedium}),x&&{userId:x}),j.gclid&&{trackId:j.gclid})},{headers:{"Content-Type":"applicationhttps://www.cbtnuggets.com/json","klaviyo-profile-key":"c2985f7b-09db-4d47-8e05-70e23e32d662"}});case 49:e.next=54;break;case 51:e.prev=51,e.t1=e.catch(46),console.error("Error creating Klaviyo profile:",e.t1);case 54:case"end":return e.stop()}},e,null,[[7,13],[46,51]])})),function(e){return a.apply(this,arguments)}),children:function(e){var a=e.errors,n=e.touched,i=e.handleBlur,r=e.values,t=e.handleChange,o=e.setFieldValue,l=e.isSubmitting,s=function(){if(null!==L.current&&null!==R.current&&null!==G.current&&null!==D.current&&null!==U.current&&null!==K.current){var e="undefined"!==L.current.value?L.current.value:null,a="undefined"!==R.current.value?R.current.value:null,n="undefined"!==G.current.value?G.current.value:null,i="undefined"!==D.current.value?D.current.value:null,r="undefined"!==U.current.value?U.current.value:null,t="undefined"!==K.current.value?K.current.value:null;o("gaclientid",e),o("gacampaign",a),o("gamedium",n),o("gasource",i),o("gauserid",r),o("gatrackid",t)}},u=function(e,a){o(e,a.target.checked),s()};return(0,A.jsxs)(g,{children:[(0,A.jsx)("input",{type:"hidden",name:"gaCid",id:"gaCid",ref:Z}),(0,A.jsx)("input",{type:"hidden",name:"gaHid",id:"gaHid",ref:E}),(0,A.jsx)("input",{type:"hidden",name:"gaclientid",id:"gaclientid",ref:L}),(0,A.jsx)("input",{type:"hidden",name:"gacampaign",id:"gacampaign",ref:R}),(0,A.jsx)("input",{type:"hidden",name:"gamedium",id:"gamedium",ref:G}),(0,A.jsx)("input",{type:"hidden",name:"gasource",id:"gasource",ref:D}),(0,A.jsx)("input",{type:"hidden",name:"gatrackid",id:"gatrackid",ref:K}),(0,A.jsx)("input",{type:"hidden",name:"gauserid",id:"gauserid",ref:U}),(0,A.jsxs)(y,{required:!0,children:[(0,A.jsx)(k.Form.Input,{label:"First name",id:"firstName",name:"firstName",type:"text",maxLength:50,onBlur:i,value:r.firstName,onChange:t,crossOrigin:""}),n.firstName&&a.firstName&&(0,A.jsxs)(S,{children:[" ",a.firstName," "]})]}),(0,A.jsxs)(y,{required:!0,children:[(0,A.jsx)(k.Form.Input,{label:"Last name",id:"lastName",name:"lastName",type:"text",maxLength:50,onBlur:i,value:r.lastName,onChange:t,crossOrigin:""}),n.lastName&&a.lastName&&(0,A.jsxs)(S,{children:[" ",a.lastName," "]})]}),(0,A.jsxs)(y,{required:!0,children:[(0,A.jsxs)(k.Form.Select.Basic,{"aria-label":"Select Title",id:"title",name:"title",label:"Title",defaultValue:r.title,onChange:t,onBlur:i,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"})]}),n.title&&a.title&&(0,A.jsxs)(S,{children:[" ",a.title," "]})]}),(0,A.jsxs)(y,{required:!0,children:[(0,A.jsx)(k.Form.Input,{label:"Work Email",name:"email",type:"email",maxLength:50,onChange:t,onBlur:i,value:r.email,crossOrigin:""}),n.email&&a.email&&(0,A.jsxs)(S,{children:[" ",a.email," "]})]}),(0,A.jsxs)(y,{required:!0,children:[(0,A.jsx)(k.Form.Input,{label:"Company",name:"company",type:"text",maxLength:50,onChange:t,onBlur:i,value:r.company,crossOrigin:""}),n.company&&a.company&&(0,A.jsxs)(S,{children:[" ",a.company," "]})]}),(0,A.jsxs)(N,{children:[(0,A.jsxs)(y,{required:!0,className:"mod-phone",children:[(0,A.jsx)(k.Form.Input,{label:"Phone",name:"phone",type:"phone",maxLength:70,onChange:t,onBlur:i,value:r.phone,crossOrigin:""}),n.phone&&a.phone&&(0,A.jsxs)(S,{children:[" ",a.phone," "]})]}),(0,A.jsx)(y,{className:"mod-extension",children:(0,A.jsx)(k.Form.Input,{label:"Ext. (opt)",name:"ext",type:"text",maxLength:30,onChange:t,onBlur:i,value:r.ext,crossOrigin:""})})]}),(0,A.jsxs)(y,{required:!0,children:[(0,A.jsx)(k.Form.Select.Basic,{label:"Country",name:"country",onChange:t,onBlur:i,value:r.country,children:d.map(function(e){return(0,A.jsx)("option",{value:e,children:e},e)})}),n.country&&a.country&&(0,A.jsxs)(S,{children:[" ",a.country," "]})]}),(0,A.jsxs)(x,{children:[(0,A.jsx)(k.Form.Checkbox,{name:"optIn",id:"optIn",onChange:function(e){return u("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)(b,{required:!0,children:[(0,A.jsx)("p",{className:"employee-count",children:"How many employees would you like to train?"}),(0,A.jsx)(v,{children:T.f6.map(function(e){return(0,A.jsxs)(j,{children:[(0,A.jsx)(k.Form.Radio,{"aria-label":"Company size is ".concat(e.value),name:"quantity",id:"quantity",value:e.value,checked:e.value===r.quantity,onChange:t,onBlur:i,crossOrigin:""}),(0,A.jsx)(k.StyledLabel.Right,{htmlFor:"quantity",changeCursorOnDisabled:!0,children:e.text})]},e.value)})}),n.quantity&&a.quantity&&(0,A.jsxs)(S,{children:[" ",a.quantity," "]})]}),(0,A.jsx)(I.R5,{tabIndex:-1,onChange:function(e){return J(e.target.value)}}),(0,A.jsxs)(C,{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"}),"."]}),p?(0,A.jsx)(k.ButtonBrand.PrimaryLarge,{"aria-label":"Submit form",type:"submit","data-at":null!=h?h:"signup-form-submit",disabled:l,children:"Submit"}):(0,A.jsx)(k.ButtonBrand.Primary,{"aria-label":"Submit form",type:"submit","data-at":null!=h?h:"signup-form-submit",disabled:l,children:"Submit"})]})]})}})}}}]);