!function(){"use strict";window.kadence={initOutlineToggle:function(){document.body.addEventListener("keydown",(function(){document.body.classList.remove("hide-focus-outline")})),document.body.addEventListener("mousedown",(function(){document.body.classList.add("hide-focus-outline")}))},getOffset:function(e){if(e instanceof HTMLElement){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}}return{top:null,left:null}},findParents:function(e,t){var n=[];return function e(o){var a=o.parentNode;a instanceof HTMLElement&&(a.matches(t)&&n.push(a),e(a))}(e),n},toggleAttribute:function(e,t,n,o){void 0===n&&(n=!0),void 0===o&&(o=!1),e.getAttribute(t)!==n?e.setAttribute(t,n):e.setAttribute(t,o)},initNavToggleSubmenus:function(){var e=document.querySelectorAll(".nav--toggle-sub");if(e.length)for(let t=0;t<e.length;t++)window.kadence.initEachNavToggleSubmenu(e[t])},initEachNavToggleSubmenu:function(e){var t=e.querySelectorAll(".menu ul");if(t.length)for(let d=0;d<t.length;d++){var n=t[d].parentNode;if(n.querySelector(".dropdown-nav-toggle")){var o=n.querySelector(".nav-drop-title-wrap").firstChild.textContent.trim(),a=document.createElement("BUTTON");a.setAttribute("aria-label",o?kadenceConfig.screenReader.expandOf+" "+o:kadenceConfig.screenReader.expand),a.classList.add("dropdown-nav-special-toggle"),n.insertBefore(a,n.childNodes[1]),a.addEventListener("click",(function(e){e.preventDefault(),window.kadence.toggleSubMenu(e.target.parentNode)})),n.addEventListener("mouseleave",(function(e){window.kadence.toggleSubMenu(e.target,!1)})),n.querySelector("a").addEventListener("focus",(function(e){var t=e.target.parentNode.parentNode.querySelectorAll("li.menu-item--toggled-on");for(let o=0;o<t.length;o++)n!==t[o]&&window.kadence.toggleSubMenu(t[o],!1)})),t[d].addEventListener("keydown",(function(e){if(9===e.keyCode){var n="ul.toggle-show > li > a, ul.toggle-show > li > .dropdown-nav-special-toggle";t[d].parentNode.classList.contains("kadence-menu-mega-enabled")&&(n='a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex="0"], [contenteditable]'),e.shiftKey?window.kadence.isfirstFocusableElement(t[d],document.activeElement,n)&&window.kadence.toggleSubMenu(t[d].parentNode,!1):window.kadence.islastFocusableElement(t[d],document.activeElement,n)&&window.kadence.toggleSubMenu(t[d].parentNode,!1)}27===e.keyCode&&(window.kadence.toggleSubMenu(t[d].parentNode,!1),t[d].parentNode.querySelector(".dropdown-nav-special-toggle").focus())})),t[d].parentNode.classList.add("menu-item--has-toggle")}}},toggleSubMenu:function(e,t){var n=e.querySelector(".dropdown-nav-special-toggle"),o=e.querySelector("ul");let a=e.classList.contains("menu-item--toggled-on");var d=e.querySelector(".nav-drop-title-wrap").firstChild.textContent.trim();if(void 0!==t&&"boolean"==typeof t&&(a=!t),n.setAttribute("aria-expanded",(!a).toString()),a){setTimeout((function(){e.classList.remove("menu-item--toggled-on"),o.classList.remove("toggle-show"),n.setAttribute("aria-label",d?kadenceConfig.screenReader.expandOf+" "+d:kadenceConfig.screenReader.expand)}),5);var i=e.querySelectorAll(".menu-item--toggled-on");for(let e=0;e<i.length;e++)window.kadence.toggleSubMenu(i[e],!1)}else{var r=e.parentNode.querySelectorAll("li.menu-item--toggled-on");for(let e=0;e<r.length;e++)window.kadence.toggleSubMenu(r[e],!1);e.classList.add("menu-item--toggled-on"),o.classList.add("toggle-show"),n.setAttribute("aria-label",d?kadenceConfig.screenReader.collapseOf+" "+d:kadenceConfig.screenReader.collapse)}},isfirstFocusableElement:function(e,t,n){var o=e.querySelectorAll(n);return 0<o.length&&t===o[0]},islastFocusableElement:function(e,t,n){var o=e.querySelectorAll(n);return 0<o.length&&t===o[o.length-1]},toggleDrawer:function(e,t){t=void 0===t||t;var n=e,o=document.querySelector(n.dataset.toggleTarget),a=document,d=window.innerWidth-document.documentElement.clientWidth,i=n.dataset.toggleDuration?n.dataset.toggleDuration:250;if(window.kadence.toggleAttribute(n,"aria-expanded","true","false"),o.classList.contains("show-drawer"))n.dataset.toggleBodyClass&&a.body.classList.remove(n.dataset.toggleBodyClass),o.classList.remove("active"),o.classList.remove("pop-animated"),a.body.classList.remove("kadence-scrollbar-fixer"),setTimeout((function(){if(o.classList.remove("show-drawer"),n.dataset.setFocus&&t){var e=document.querySelector(n.dataset.setFocus);e&&(e.focus(),e.hasAttribute("aria-expanded")&&window.kadence.toggleAttribute(e,"aria-expanded","true","false"))}}),i);else if(o.classList.add("show-drawer"),n.dataset.toggleBodyClass&&(a.body.classList.toggle(n.dataset.toggleBodyClass),n.dataset.toggleBodyClass.includes("showing-popup-drawer-")&&(a.body.style.setProperty("--scrollbar-offset",d+"px"),a.body.classList.add("kadence-scrollbar-fixer"))),setTimeout((function(){if(o.classList.add("active"),n.dataset.setFocus,t){var e=document.querySelector(n.dataset.setFocus);if(e){e.hasAttribute("aria-expanded")&&window.kadence.toggleAttribute(e,"aria-expanded","true","false");var a=e.value;e.value="",e.focus(),e.value=a}}}),10),setTimeout((function(){o.classList.add("pop-animated")}),i),o.classList.contains("popup-drawer")){var r=o.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),l=r[0],c=r[r.length-1];document.addEventListener("keydown",(function(e){("Tab"===e.key||9===e.keyCode)&&(e.shiftKey?document.activeElement===l&&(c.focus(),e.preventDefault()):document.activeElement===c&&(l.focus(),e.preventDefault()))}))}},initToggleDrawer:function(){var e=document.querySelectorAll(".drawer-toggle");if(e.length){for(let t=0;t<e.length;t++)e[t].addEventListener("click",(function(n){n.preventDefault(),window.kadence.toggleDrawer(e[t])}));document.addEventListener("keyup",(function(e){27===e.keyCode&&document.querySelectorAll(".popup-drawer.show-drawer.active")&&(e.preventDefault(),document.querySelectorAll(".popup-drawer.show-drawer.active").forEach((function(e){window.kadence.toggleDrawer(document.querySelector('*[data-toggle-target="'+e.dataset.drawerTargetString+'"]'))})))})),document.addEventListener("click",(function(e){var t=e.target,n=document.querySelector(".show-drawer.active .drawer-overlay");t===n&&window.kadence.toggleDrawer(document.querySelector('*[data-toggle-target="'+n.dataset.drawerTargetString+'"]'))}))}},initMobileToggleSub:function(){document.querySelectorAll(".has-collapse-sub-nav").forEach((function(e){var t=e.querySelector(".current-menu-item");t&&window.kadence.findParents(t,"li").forEach((function(e){var t=e.querySelector(".drawer-sub-toggle");t&&window.kadence.toggleDrawer(t,!0)}))}));var e=document.querySelectorAll(".drawer-sub-toggle");if(e.length)for(let t=0;t<e.length;t++)e[t].addEventListener("click",(function(n){n.preventDefault(),window.kadence.toggleDrawer(e[t])}))},initMobileToggleAnchor:function(){var e=document.getElementById("mobile-drawer");if(e){var t=e.querySelectorAll("a:not(.kt-tab-title)");if(t.length)for(let n=0;n<t.length;n++)t[n].addEventListener("click",(function(t){window.kadence.toggleDrawer(e.querySelector(".menu-toggle-close"),!1)}))}},initTransHeaderPadding:function(){if(!document.body.classList.contains("no-header")&&document.body.classList.contains("transparent-header")&&document.body.classList.contains("mobile-transparent-header")){var e=document.querySelector(".entry-hero-container-inner"),t=document.querySelector("#masthead"),n=function(n){kadenceConfig.breakPoints.desktop<=window.innerWidth?document.body.classList.contains("transparent-header")?e.style.paddingTop=t.offsetHeight+"px":e.style.paddingTop=0:document.body.classList.contains("mobile-transparent-header")?e.style.paddingTop=t.offsetHeight+"px":e.style.paddingTop=0};e&&(window.addEventListener("resize",n,!1),window.addEventListener("scroll",n,!1),window.addEventListener("load",n,!1),n())}},getTopOffset:function(){var e=0;return kadenceConfig.breakPoints.desktop<=window.innerWidth?document.body.classList.contains("admin-bar")&&(e=32):e=0,Math.floor(0+e)},initStickySidebar:function(){if(document.body.classList.contains("has-sticky-sidebar")){var e=window.kadence.getTopOffset(),t=document.querySelector("#secondary .sidebar-inner-wrap");t.style.top=Math.floor(e+20)+"px",t.style.maxHeight="calc( 100vh - "+Math.floor(e+20)+"px )"}},init:function(){window.kadence.initNavToggleSubmenus(),window.kadence.initToggleDrawer(),window.kadence.initMobileToggleAnchor(),window.kadence.initMobileToggleSub(),window.kadence.initOutlineToggle(),window.kadence.initStickySidebar(),window.kadence.initTransHeaderPadding()}},"loading"===document.readyState?document.addEventListener("DOMContentLoaded",window.kadence.init):window.kadence.init()}();