window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=function(e,t){var o,n=this.length;for(t=t||window,o=0;o1?1:s,o=.5*(1-Math.cos(Math.PI*l)),n=t.startX+(t.x-t.startX)*o,a=t.startY+(t.y-t.startY)*o,t.method.call(t.scrollable,n,a),n===t.x&&a===t.y||e.requestAnimationFrame(f.bind(e,t))}function g(o,n,i){var l,d,c,u,g=r();o===t.body?(l=e,d=e.scrollX||e.pageXOffset,c=e.scrollY||e.pageYOffset,u=a.scroll):(l=o,d=o.scrollLeft,c=o.scrollTop,u=s),f({scrollable:l,method:u,startTime:g,startX:d,startY:c,x:n,y:i})}}"object"==typeof exports&&"undefined"!=typeof module?module.exports={polyfill:e}:e()}(),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 o=[];return function e(n){var i=n.parentNode;i instanceof HTMLElement&&(i.matches(t)&&o.push(i),e(i))}(e),o},toggleAttribute:function(e,t,o,n){void 0===o&&(o=!0),void 0===n&&(n=!1),e.getAttribute(t)!==o?e.setAttribute(t,o):e.setAttribute(t,n)},initNavToggleSubmenus:function(){var e=document.querySelectorAll(".nav--toggle-sub");if(e.length)for(let t=0;tr)var y=Math.floor(Math.floor(l)-Math.floor(c)+Math.floor(m));else y=Math.floor(l-c);else y=Math.floor(l-c);var b=d.querySelector(".custom-logo"),k=d.querySelector(".kadence-sticky-logo"),L=d.querySelector(".site-main-header-inner-wrap"),S=parseInt(L.getAttribute("data-start-height"));if(S||(L.setAttribute("data-start-height",L.offsetHeight),S=L.offsetHeight),window.scrollY<=y)L.style.height=S+"px",L.style.minHeight=S+"px",L.style.maxHeight=S+"px",b&&(b.style.maxHeight="100%"),k&&(k.style.maxHeight="100%");else if(window.scrollY>y){var x=Math.max(v,S-(window.scrollY-(l-c)));L.style.height=x+"px",L.style.minHeight=x+"px",L.style.maxHeight=x+"px",b&&(b.style.maxHeight=x+"px"),k&&(k.style.maxHeight=x+"px")}}}if("true"===w){var E=Math.floor(l-c),T=window.scrollY,A=d.offsetHeight,q=r-T,M=window.getComputedStyle(d).getPropertyValue("transform").match(/(-?[0-9\.]+)/g);if(M&&void 0!==M[5]&&M[5])var H=parseInt(M[5])+q;else H=0;var N=T>r;if(T<=E)d.style.transform="translateY(0px)";else if(N)d.classList.add("item-hidden-above"),d.style.transform="translateY("+(Math.abs(H)>A?-A:H)+"px)";else{E=Math.floor(l-c);d.style.transform="translateY("+(H>0?0:H)+"px)",d.classList.remove("item-hidden-above")}r=T}else E=Math.floor(l-c);window.scrollY==E?(d.style.top=c+"px",d.classList.add("item-is-fixed"),d.classList.add("item-at-start"),d.classList.remove("item-is-stuck"),h.classList.add("child-is-fixed"),document.body.classList.add("header-is-fixed")):window.scrollY>E?(d.style.top=c+"px",d.classList.add("item-is-fixed"),d.classList.add("item-is-stuck"),d.classList.remove("item-at-start"),h.classList.add("child-is-fixed"),document.body.classList.add("header-is-fixed")):d.classList.contains("item-is-fixed")&&(d.classList.remove("item-is-fixed"),d.classList.remove("item-at-start"),d.classList.remove("item-is-stuck"),d.style.height=null,d.style.top=null,h.classList.remove("child-is-fixed"),document.body.classList.remove("header-is-fixed"))}};if((e||t)&&(window.addEventListener("resize",u,!1),window.addEventListener("scroll",u,!1),window.addEventListener("load",u,!1),window.addEventListener("orientationchange",u),"complete"===document.readyState&&u("updateActive"),document.body.classList.contains("woocommerce-demo-store")&&document.body.classList.contains("kadence-store-notice-placement-above"))){s=document.querySelector(".woocommerce-store-notice"),d=e=>{u("updateActive")},c={root:document.documentElement},new IntersectionObserver(((e,t)=>{e.forEach((e=>{d(e.intersectionRatio>0)}))}),c).observe(s)}},getTopOffset:function(){var e=document.querySelector('#main-header .kadence-sticky-header:not([data-reveal-scroll-up="true"])'),t=document.querySelector('#mobile-header .kadence-sticky-header:not([data-reveal-scroll-up="true"])'),o=0,n=0;if(kadenceConfig.breakPoints.desktop<=window.innerWidth){if(e)o="true"!==e.getAttribute("data-shrink")||e.classList.contains("site-header-inner-wrap")?Math.floor(e.offsetHeight):Math.floor(e.getAttribute("data-shrink-height"));else o=0;document.body.classList.contains("admin-bar")&&(n=32)}else{if(t)o="true"===t.getAttribute("data-shrink")?Math.floor(t.getAttribute("data-shrink-height")):Math.floor(t.offsetHeight);else o=0;document.body.classList.contains("admin-bar")&&(n=46)}return Math.floor(o+n)},scrollToElement:function(e,t){t=void 0===t||t;var o=window.kadence.getTopOffset(),n=Math.floor(e.getBoundingClientRect().top)-o;window.scrollBy({top:n,left:0,behavior:"smooth"});var i=setInterval((function(){var n=window.innerHeight+window.pageYOffset>=document.body.offsetHeight-2;(Math.floor(e.getBoundingClientRect().top)-o==0||n)&&(e.focus(),e.classList.contains("kt-title-item")&&e.firstElementChild.click(),t&&window.history.pushState("","","#"+e.id),clearInterval(i))}),100)},anchorScrollToCheck:function(e,t){if(t=void 0!==t?t:null,e.target.getAttribute("href"))var o=e.target;else{if(!(o=e.target.closest("a")))return;if(!o.getAttribute("href"))return}if(!o.parentNode||!o.parentNode.hasAttribute("role")||"tab"!==o.parentNode.getAttribute("role")){var n;n=t?t.getAttribute("href").substring(t.getAttribute("href").indexOf("#")):o.getAttribute("href").substring(o.getAttribute("href").indexOf("#"));var i=document.getElementById(n.replace("#",""));i&&(e.preventDefault(),window.kadence.scrollToElement(i))}},initStickySidebarWidget:function(){if(document.body.classList.contains("has-sticky-sidebar-widget")){var e=window.kadence.getTopOffset(),t=document.querySelector("#secondary .sidebar-inner-wrap .widget:last-child");t&&(t.style.top=Math.floor(e+20)+"px",t.style.maxHeight="calc( 100vh - "+Math.floor(e+20)+"px )")}},initStickySidebar:function(){if(document.body.classList.contains("has-sticky-sidebar")){var e=window.kadence.getTopOffset(),t=document.querySelector("#secondary .sidebar-inner-wrap");t&&(t.style.top=Math.floor(e+20)+"px",t.style.maxHeight="calc( 100vh - "+Math.floor(e+20)+"px )")}},initAnchorScrollTo:function(){if(!document.body.classList.contains("no-anchor-scroll")){if(""!=window.location.hash){var e,t=location.hash.substring(1);if(!/^[A-z0-9_-]+$/.test(t))return;(e=document.getElementById(t))&&window.setTimeout((function(){window.kadence.scrollToElement(e,!1)}),100)}var o=document.querySelectorAll("a[href*=\\#]:not([href=\\#]):not(.scroll-ignore):not([data-tab]):not([data-toggle])");o.length&&o.forEach((function(e){new URL(e.href).pathname===window.location.pathname&&e.addEventListener("click",(function(e){window.kadence.anchorScrollToCheck(e)}))}))}},initScrollToTop:function(){var e=document.getElementById("kt-scroll-up");if(e){var t=function(){window.scrollY>100?e.classList.add("scroll-visible"):e.classList.remove("scroll-visible")};window.addEventListener("scroll",t),t(),e.addEventListener("click",(function(e){e.preventDefault(),window.scrollTo({top:0,behavior:"smooth"}),document.body.tabIndex=1,document.body.focus()}))}},init:function(){window.kadence.initNavToggleSubmenus(),window.kadence.initToggleDrawer(),window.kadence.initMobileToggleAnchor(),window.kadence.initMobileToggleSub(),window.kadence.initOutlineToggle(),window.kadence.initStickyHeader(),window.kadence.initStickySidebar(),window.kadence.initStickySidebarWidget(),window.kadence.initTransHeaderPadding(),window.kadence.initAnchorScrollTo(),window.kadence.initScrollToTop()}},"loading"===document.readyState?document.addEventListener("DOMContentLoaded",window.kadence.init):window.kadence.init()}();