"use strict";(self.webpackChunkkcc_gem_theme=self.webpackChunkkcc_gem_theme||[]).push([[892],{892:function(e,t,n){function o(e,t){let n=e.querySelector("a");e.classList.add("active"),n.insertAdjacentHTML("beforeend",' (current)')}n.r(t),n.d(t,{default:function(){return f}});var s=function(){const e=window.location.pathname,t="#contact"===window.location.hash,n="/"===window.location.pathname;document.getElementById("subNavNav")&&function(e){const t=document.querySelectorAll(".js-sub-nav-item");for(let n of t){const t=n.querySelector("a"),s=t.getAttribute("href").replace(/\.\.\//g,"");t.textContent,-1!==e.indexOf(s)&&o(n)}}(e);const s=document.querySelectorAll(".js-nav-item");for(let c of s){const s=c.querySelector("a"),a=s.getAttribute("href").replace(/\.\.\//g,""),r="home"===s.textContent.toLowerCase(),l=-1!==e.indexOf(a);n||t?r&&o(c):l&&!r&&o(c)}};const c=$("#mainNavContent"),a="hide";function r(e){e.target.matches(".nav-link:not(.dropdown-toggle)")&&(e.target.classList.contains("dropdown-toggle")||!!document.getElementById("mainNavContent").classList.contains("show")&&c.collapse(a))}var l=function(){document.addEventListener("click",r,!1)};function i(){document.querySelector("button.gsc-search-button-v2").classList.add("gsc-overrides__clear-x")}function u(){document.querySelector("button.gsc-search-button-v2").classList.remove("gsc-overrides__clear-x")}var d=function(){document.getElementById("searchCollapse")&&new Promise(((e,t)=>{!function(){var e=document.createElement("script");e.type="text/javascript",e.async=!0,e.src="https://cse.google.com/cse.js?cx=006320264078644364913:sy48bet-lr8";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}(),e()})).then((()=>{new Promise(((e,t)=>{const n=document.getElementById("searchCollapse");new MutationObserver((function(t,n){for(const n of t)"childList"==n.type&&(document.querySelector(".gsst_a").setAttribute("id","xIcon"),e())})).observe(n,{attributes:!0,childList:!0,subtree:!0})})).then((()=>{!function(){let e=!1;return function(){e||(e=!0,"display: none;"===document.getElementById("xIcon").getAttribute("style")?u():i())}}()();const e=document.getElementById("xIcon");new MutationObserver((function(t,n){for(const n of t)"attributes"==n.type&&("display: none;"===e.getAttribute("style")?u():i())})).observe(e,{attributes:!0,childList:!0,subtree:!0})}))}))},g=function(){const e=document.getElementById("searchIcon");e&&document.addEventListener("click",(function(t){const n=document.getElementById("searchImg"),o=document.getElementById("searchCollapse"),s=document.getElementById("mainNav"),c=document.getElementById("globalNav"),a=-1!=n.style.backgroundImage.indexOf("assets/img/search.svg"),r=o.getAttribute("aria-hidden"),l=document.getElementById("gsc-i-id1");t.target.closest("#searchIcon")&&(t.preventDefault(),a?(n.style.backgroundImage='url("/assets/img/x.svg")',n.setAttribute("alt","Close icon"),e.setAttribute("aria-label","Toggle Close")):(n.style.backgroundImage='url("/assets/img/search.svg")',n.setAttribute("alt","Search icon"),e.setAttribute("aria-label","Toggle Search"),l.focus()),o.classList.toggle("nav-global__search-collapse--visible"),"true"===r?o.setAttribute("aria-hidden","false"):o.setAttribute("aria-hidden","true"),s.classList.toggle("nav-local__search-toggle"),c.classList.toggle("nav-global__search-toggle"))}),!1)};const m="#searchImg";function b(e,t){e.classList.contains(t)&&function(e,t){e.classList.remove(t)}(e,t)}function h(){if(window.innerWidth>=992){const t=document.getElementById("searchCollapse"),n=document.getElementById("globalNav"),o=document.getElementById("mainNav"),s=document.getElementById("searchIcon");b(t,"nav-global__search-collapse--visible"),b(n,"nav-global__search-toggle"),b(o,"nav-local__search-toggle"),"Toggle Close"!==!(e=s).getAttribute("aria-label")&&function(e){const t=e.querySelector(m);e.setAttribute("aria-label","Toggle Search"),t.setAttribute("alt","Open icon"),t.setAttribute("style",'background-image: url("/assets/img/search.svg")')}(e)}var e}var v=function(){window.addEventListener("resize",h)};function f(){s(),g(),d(),l(),v()}}}]);