"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2935],{56450:function(e,n,t){var r=t(5152),i=t.n(r),o=i()(function(){return t.e(7444).then(t.bind(t,97444))},{ssr:!1,loadableGenerated:{webpack:function(){return[97444]}}}),a=i()(function(){return t.e(4926).then(t.bind(t,4926))},{ssr:!1,loadableGenerated:{webpack:function(){return[4926]}}}),s=i()(function(){return t.e(1300).then(t.bind(t,21300))},{ssr:!1,loadableGenerated:{webpack:function(){return[21300]}}}),c=i()(function(){return t.e(3758).then(t.bind(t,63758))},{ssr:!1,loadableGenerated:{webpack:function(){return[63758]}}}),l=i()(function(){return t.e(74).then(t.bind(t,10074))},{ssr:!1,loadableGenerated:{webpack:function(){return[10074]}}}),u=i()(function(){return t.e(4707).then(t.bind(t,44707))},{ssr:!1,loadableGenerated:{webpack:function(){return[44707]}}}),d=i()(function(){return t.e(1343).then(t.bind(t,31343))},{ssr:!1,loadableGenerated:{webpack:function(){return[31343]}}}),f=i()(function(){return t.e(1888).then(t.bind(t,22621))},{ssr:!1,loadableGenerated:{webpack:function(){return[22621]}}}),p=i()(function(){return t.e(5493).then(t.bind(t,5493))},{ssr:!1,loadableGenerated:{webpack:function(){return[5493]}}}),h=i()(function(){return t.e(9547).then(t.bind(t,69547))},{ssr:!1,loadableGenerated:{webpack:function(){return[69547]}}}),g=i()(function(){return t.e(4436).then(t.bind(t,4436))},{ssr:!1,loadableGenerated:{webpack:function(){return[4436]}}}),b=i()(function(){return t.e(8199).then(t.bind(t,8199))},{ssr:!1,loadableGenerated:{webpack:function(){return[8199]}}});n.Z={Chat:o,Phone:a,Salesforce:s,Check:l,Verizon:c,Facebook:u,Google:d,Amazon:f,ShoppingCart:p,PracticeExams:h,VirtualLabs:g,Filter:b}},82935:function(e,n,t){t.d(n,{o:function(){return D}});var r=t(67294),i=t(87379),o=i.ZP.div.withConfig({displayName:"NavBarSearchContainer",componentId:"sc-1uqhq63-0"})(["flex-grow:1;display:flex;align-items:center;justify-content:flex-end;"]),a=i.ZP.div.withConfig({displayName:"LoggedOutSearchContainer",componentId:"sc-1uqhq63-1"})(["background-color:white;border-bottom:1px solid #dce2ed;border-top:1px solid #dce2ed;box-shadow:0px 12px 15px -15px #dce2ed;display:",";justify-content:center;position:fixed;top:64px;width:100%;left:0;@media (max-width:960px){position:absolute;top:0;background:transparent;border:none;box-shadow:none;display:flex;transition:all 0.4s ease-in-out;width:100%;opacity:",";}"],function(e){return e.$isSearchActive?"flex":"none"},function(e){return e.$isSearchActive?1:0}),s=i.ZP.div.withConfig({displayName:"NavBarSearchInputContainer",componentId:"sc-1uqhq63-2"})(["display:flex;align-items:center;height:70px;position:relative;flex-grow:1;justify-content:center;gap:1rem;max-width:",";margin-right:",";@media (max-width:960px){width:100%;height:65px;right:0;}"],function(e){return e.$isStaticSearch?"unset":"650px"},function(e){return e.$isStaticSearch?"2rem":"0"}),c=(0,i.iv)(["background:transparent;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;&&&{padding:0px;}"]),l=i.ZP.button.withConfig({displayName:"StyledIconContainer",componentId:"sc-1uqhq63-3"})(["",";svg{display:",";}@media screen and (max-width:960px){display:",";align-items:center;width:25px;z-index:10;margin-right:1rem;height:fit-content;background:white;&&&{margin-left:0;}}"],c,function(e){return e.searchActive?"none":"initial"},function(e){return e.searchActive?"none":"flex"}),u=i.ZP.button.withConfig({displayName:"CloseIconContainer",componentId:"sc-1uqhq63-4"})(["",";position:absolute;right:15px;"],c),d=i.ZP.form.withConfig({displayName:"StyledSearchForm",componentId:"sc-1uqhq63-5"})(["width:100%;position:relative;"]),f=i.ZP.input.withConfig({displayName:"StyledSearchInput",componentId:"sc-1uqhq63-6"})(["caret-color:#1c91c0;color:#333;font-size:16px;width:100%;box-sizing:border-box;-webkit-appearance:textfield;padding:10px 32px 10px 15px;width:100%;border:1px solid #ccc;border-radius:50px;&::-webkit-input-placeholder{color:#555;text-shadow:none;line-height:20px;-webkit-text-fill-color:initial;}&:focus{box-shadow:none;outline:none;}@media screen and (max-width:960px){padding:1.2rem 1.5rem;height:auto;border:1px solid #ccc;border-radius:50px;background:transparent;display:",";}"],function(e){return e.$isSearchActive?"flex":"none"}),p=t(59499),h=t(4730),g=t(85893),b=["color","width","height","alt"],x=["color","width","height","alt"];function m(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 w(e){for(var n=1;n0?s.length+1:0;if(0!==r)switch(e.key){case"ArrowDown":e.preventDefault(),h(function(e){return e0?e-1:-1});break;case"Enter":0===p&&(e.preventDefault(),null==i||i(n));break;case"Escape":o()}}};return t&&window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}},[t,s,p,i,o,n]),(0,r.useEffect)(function(){var e=function(e){if(t&&b.current){var n=document.getElementById("input-search"),r=document.getElementById("logged-out-search-bar"),i=e.target;!b.current.contains(i)&&(null!=n&&n.contains(i)||null!=r&&r.contains(i)||o())}};if(t){var n=setTimeout(function(){document.addEventListener("mousedown",e)},100);return function(){clearTimeout(n),document.removeEventListener("mousedown",e)}}return function(){document.removeEventListener("mousedown",e)}},[t,o]);var x=function(e){var n=e.pathTags||[],t=n.length>0?n[0].toLocaleLowerCase().split(" ").join("_"):"other",r={networking:"network-admin-network-engineer.svg",devops:"devops-cloud-technologies.svg",cybersecurity:"systems-admin-systems-engineer.svg",intro_to_it:"new-to-it.svg",programming_and_development:"programming-software-development.svg",project_management:"project-management.svg"};if("page"===e.resultType){var i="Virtual Labs"===e.name?q.Z.VirtualLabs:q.Z.PracticeExams;return(0,g.jsx)(Z,{children:(0,g.jsx)(i,{})})}return(0,g.jsx)(N,{src:null!=e&&e.ogImage?"https://".concat(null==e?void 0:e.ogImage):"/assetshttps://www.cbtnuggets.com/images/og/courses/".concat(e.slug,".png"),alt:e.name,onError:function(e){var n=e.target,i=r[t]?"/assetshttps://www.cbtnuggets.com/images/courses/".concat(r[t]):"/assetshttps://www.cbtnuggets.com/images/courses/systems-admin-systems-engineer.svg";n.src=i}})},m=function(e){var n,t,r,i;return(0,g.jsxs)(g.Fragment,{children:[x(e),(0,g.jsx)(T,{children:(0,g.jsxs)(O,{children:[(0,g.jsx)("strong",{dangerouslySetInnerHTML:{__html:(null===(n=e._highlightResult)||void 0===n||null===(n=n.name)||void 0===n?void 0:n.value)||e.name||""}}),e.description&&(0,g.jsx)("span",{dangerouslySetInnerHTML:{__html:null!==(t=null!==(r=null===(i=e._highlightResult)||void 0===i||null===(i=i.description)||void 0===i?void 0:i.value)&&void 0!==r?r:e.description)&&void 0!==t?t:""}})]})})]})};return t?0===s.length&&!u&&n.length>=3?(0,g.jsx)(A,{ref:b,children:(0,g.jsx)(E,{$isNoResults:!0,children:(0,g.jsx)(T,{children:(0,g.jsxs)("strong",{children:["No results found for “",n,"”"]})})})}):(0,g.jsx)(A,{ref:b,children:u?(0,g.jsxs)(E,{children:[(0,g.jsx)(L,{}),(0,g.jsx)(T,{children:"Searching..."})]}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(P(),{href:"/search?q=".concat(encodeURIComponent(n)),children:(0,g.jsxs)(E,{isSelected:0===p,isViewAllItem:!0,onMouseEnter:function(){return h(0)},onMouseLeave:function(){return h(-1)},onClick:function(){null==i||i(n),o()},children:[(0,g.jsx)(R,{children:"→"}),(0,g.jsx)(T,{children:(0,g.jsxs)("strong",{children:["See all results for “",n,"”"]})})]})}),s.map(function(e,n){var t=n+1;return e.finalSlug?(0,g.jsx)("a",{href:"/it-training".concat(e.finalSlug),children:(0,g.jsx)(E,{isSelected:t===p,onMouseEnter:function(){return h(t)},onMouseLeave:function(){return h(-1)},children:m(e)})},e.objectID):"page"===e.resultType?(0,g.jsx)(P(),{href:"/".concat(e.slug),children:(0,g.jsx)(E,{isSelected:t===p,onMouseEnter:function(){return h(t)},onMouseLeave:function(){return h(-1)},children:m(e)})},e.objectID):(0,g.jsx)(E,{isSelected:t===p,onMouseEnter:function(){return h(t)},onMouseLeave:function(){return h(-1)},children:m(e)},e.objectID)})]})}):null},V=t(11163),D=function(e){var n=e.searchActive,t=e.staticSearch,i=void 0!==t&&t,c=e.setSearchActive,l=e.onViewAllResults,p=(0,V.useRouter)(),h=(0,r.useState)(""),b=h[0],x=h[1],m=(0,r.useState)(!1),w=m[0],v=m[1],j=(0,r.useRef)(null),k=(0,r.useRef)(),S=function(e){var n=encodeURIComponent(e.trim().substring(0,49)),t="/search?q=".concat(n);"/search"===p.pathname?p.push(t,void 0,{shallow:!0}):window.location.href=t},I=function(e){e.preventDefault();var n=b.trim();n&&n.length>=1&&(v(!1),S(n),i||(c(!1),x("")))},P=function(e){var n=e.target.value;x(n),v(n.length>=2)},C=function(){return n?(0,g.jsx)(u,{onClick:function(){null!=b&&b.length?(x(""),v(!1)):i||c(!1)},children:(0,g.jsx)(y,{height:"20px",width:"20px"})}):null},A=(0,r.useCallback)(function(e){var t=document.getElementById("logged-out-search-bar"),r=document.getElementById("nav-items-container");t&&r&&!(e.composedPath().includes(t)||e.composedPath().includes(r))&&n&&c(!1)},[n,c]),E=(0,r.useCallback)(function(e){"Escape"===e.key&&n&&c(!1)},[n,c]);return((0,r.useEffect)(function(){if(n){var e;null==j||null===(e=j.current)||void 0===e||e.focus()}return window.addEventListener("click",A),window.addEventListener("keydown",E),function(){window.removeEventListener("click",A),window.removeEventListener("keydown",E)}},[n,c,E,A]),(0,r.useEffect)(function(){var e=new URLSearchParams(window.location.search).get("q");e&&n&&!k.current&&(k.current=e,x(e),v(!i)),!n&&k.current&&(x(""),v(!1))},[n,i]),i)?(0,g.jsxs)(s,{$isStaticSearch:!0,children:[(0,g.jsx)(d,{onSubmit:I,children:(0,g.jsx)(f,{id:"input-search",ref:j,$isSearchActive:n,value:b,autoComplete:"off",placeholder:"What do you want to learn?","aria-label":"Enter keywords to search for courses",onChange:P})}),C(),(0,g.jsx)(z,{query:b,isVisible:w,onViewAllResults:l,onClose:function(){v(!1),i||c(!1)}})]}):(0,g.jsxs)(o,{children:[(0,g.jsx)(F,{searchActive:n,onClick:function(){return c(!n)}}),(0,g.jsx)(a,{id:"logged-out-search-bar",$isSearchActive:n,children:(0,g.jsxs)(s,{children:[(0,g.jsx)(d,{onSubmit:I,children:(0,g.jsx)(f,{id:"input-search",ref:j,$isSearchActive:n,value:b,autoComplete:"off",placeholder:"What do you want to learn?","aria-label":"Enter keywords to search for courses",onChange:P})}),C(),(0,g.jsx)(z,{query:b,isVisible:w,onViewAllResults:l,onClose:function(){v(!1),c(!1)}})]})})]})},F=function(e){var n=e.searchIconRef,t=e.searchActive,r=e.onClick;return(0,g.jsx)(l,{"aria-label":"search for content",ref:n,onClick:r,children:!t&&(0,g.jsx)(v,{color:"#687588",height:"25px",width:"25px"})})}},6693:function(e,n,t){t.d(n,{hv:function(){return o},ij:function(){return i},y$:function(){return a}}),t(83454).env.REVALIDATION_IN_SECONDS;var r,i=27,o=["SnwkFL","Sec5NV"],a=((r={}).UTM_FIRST="utm_first",r.UTM_LAST="utm_last",r.FIRST_PAGE_VIEW="first_page",r.REFERRER_FIRST="referrer",r)},35882:function(e,n,t){t.d(n,{$S:function(){return j},Dj:function(){return w},Ks:function(){return y},sn:function(){return v}});var r,i,o,a=t(90116),s=t(59499),c=t(50029),l=t(64687),u=t.n(l),d=t(6693);function f(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 p(e){for(var n=1;n',highlightPostTag:"",typoTolerance:!0,clickAnalytics:!0,analyticsTags:["version:3.0.3","loggedout","website"]},m=(r=(0,c.Z)(u().mark(function e(n){var t,r,i;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=p(p(p({},x),n),{},{analyticsTags:[].concat((0,a.Z)(x.analyticsTags||[]),(0,a.Z)(n.analyticsTags||[]))}),e.prev=1,e.next=4,fetch("https://z48t1gspnh-dsn.algolia.net/1/indexes/".concat(b,"/query?x-algolia-agent=Algolia%20for%20JavaScript%20(4.19.1)%3B%20Browser"),{method:"POST",headers:{"X-Algolia-Application-Id":h,"X-Algolia-API-Key":g,"Content-Type":"applicationhttps://www.cbtnuggets.com/json"},body:JSON.stringify(t)});case 4:if(!(r=e.sent).ok){e.next=12;break}return e.next=8,r.json();case 8:return i=e.sent,e.abrupt("return",i.hits||[]);case 12:return console.error("Algolia search failed:",r.status,r.statusText),e.abrupt("return",[]);case 14:e.next=20;break;case 16:return e.prev=16,e.t0=e.catch(1),console.error("Error performing Algolia search:",e.t0),e.abrupt("return",[]);case 20:case"end":return e.stop()}},e,null,[[1,16]])})),function(e){return r.apply(this,arguments)}),w=(i=(0,c.Z)(u().mark(function e(n){var t;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,m({query:n,hitsPerPage:16,attributesToRetrieve:["objectID","id","adeptSlug","name","slug","ogImage","description","authorFullNames","difficulty","workflow","visible","finalSlug","videoCount","skillCount","pathTags","resultType"],analyticsTags:["suggestions-dropdown"]});case 2:return t=e.sent,e.abrupt("return",t.slice(0,8));case 4:case"end":return e.stop()}},e)})),function(e){return i.apply(this,arguments)}),v=function(e){return"resultType"in e&&"category"===e.resultType},y=function(e){return"resultType"in e&&"page"===e.resultType},j=(o=(0,c.Z)(u().mark(function e(n){var t,r,i,o,a,s,c,l,f,m,w=arguments;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=void 0===(r=(t=w.length>1&&void 0!==w[1]?w[1]:{}).hitsPerPage)?d.ij:r,a=void 0===(o=t.page)?0:o,c=(void 0===(s=t.filters)?"":s)||"",l=p(p({},x),{},{query:n,hitsPerPage:i,page:a,filters:c,analyticsTags:["search-page-with-facets"]}),e.prev=5,e.next=8,fetch("https://z48t1gspnh-dsn.algolia.net/1/indexes/".concat(b,"/query?x-algolia-agent=Algolia%20for%20JavaScript%20(4.19.1)%3B%20Browser"),{method:"POST",headers:{"X-Algolia-Application-Id":h,"X-Algolia-API-Key":g,"Content-Type":"applicationhttps://www.cbtnuggets.com/json"},body:JSON.stringify(l)});case 8:if(!(f=e.sent).ok){e.next=16;break}return e.next=12,f.json();case 12:return m=e.sent,e.abrupt("return",{hits:m.hits||[],facets:m.facets||{},nbHits:m.nbHits||0,nbPages:m.nbPages||0,page:m.page||0});case 16:return console.error("Algolia search failed:",f.status,f.statusText),e.abrupt("return",{hits:[],facets:{},nbHits:0,nbPages:0,page:0});case 18:e.next=24;break;case 20:return e.prev=20,e.t0=e.catch(5),console.error("Error performing Algolia search:",e.t0),e.abrupt("return",{hits:[],facets:{},nbHits:0,nbPages:0,page:0});case 24:case"end":return e.stop()}},e,null,[[5,20]])})),function(e){return o.apply(this,arguments)})},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)}},90116:function(e,n,t){t.d(n,{Z:function(){return a}});var r=t(52587),i=t(28811),o=t(2937);function a(e){return function(e){if(Array.isArray(e))return(0,r.Z)(e)}(e)||(0,i.Z)(e)||(0,o.Z)(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}}}]);