/*! blossom-spa 1.2.4 2021-07-21 2:07:27 PM */ var blossomspa=blossomspa||{};function blossomspaDomReady(e){if("function"==typeof e)return"interactive"===document.readyState||"complete"===document.readyState?e():void document.addEventListener("DOMContentLoaded",e,!1)}function blossomspaToggleAttribute(e,t,o,s){void 0===o&&(o=!0),void 0===s&&(s=!1),e.getAttribute(t)!==o?e.setAttribute(t,o):e.setAttribute(t,s)}function blossomspaFindParents(e,o){var s=[];return function e(t){t=t.parentNode;t instanceof HTMLElement&&(t.matches(o)&&s.push(t),e(t))}(e),s}blossomspa.createEvent=function(e){var t;return"function"==typeof window.Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!1),t},blossomspa.coverModals={init:function(){document.querySelector(".cover-modal")&&(this.onToggle(),this.closeOnEscape(),this.hideAndShowModals(),this.keepFocusInModal())},onToggle:function(){document.querySelectorAll(".cover-modal").forEach(function(e){e.addEventListener("toggled",function(e){var e=e.target,t=document.body;e.classList.contains("active")?t.classList.add("showing-modal"):(t.classList.remove("showing-modal"),t.classList.add("hiding-modal"),setTimeout(function(){t.classList.remove("hiding-modal")},500))})})},closeOnEscape:function(){document.addEventListener("keydown",function(e){27===e.keyCode&&(e.preventDefault(),document.querySelectorAll(".cover-modal.active").forEach(function(e){this.untoggleModal(e)}.bind(this)))}.bind(this))},hideAndShowModals:function(){var l=document,i=window,e=l.querySelectorAll(".cover-modal"),c=l.documentElement.style,r=l.querySelector("#wpadminbar");function d(e){var t,o=i.pageYOffset;return r?(t=o+r.getBoundingClientRect().height,e?-t:t):0===o?0:-o}function u(){return{"overflow-y":i.innerHeight>l.documentElement.getBoundingClientRect().height?"hidden":"scroll",position:"fixed",width:"100%",top:d(!0)+"px",left:0}}e.forEach(function(a){a.addEventListener("toggle-target-before-inactive",function(e){var t=u(),o=i.pageYOffset,s=Math.abs(d())-o+"px",n=i.matchMedia("(max-width: 600px)");e.target===a&&(Object.keys(t).forEach(function(e){c.setProperty(e,t[e])}),i.blossomspa.scrolled=parseInt(t.top,10),r&&(l.body.style.setProperty("padding-top",s),n.matches&&(o>=d()?a.style.setProperty("top",0):a.style.setProperty("top",d()-o+"px"))),a.classList.add("show-modal"))}),a.addEventListener("toggle-target-after-inactive",function(e){e.target===a&&setTimeout(function(){var e=blossomspa.toggles.clickedEl;a.classList.remove("show-modal"),Object.keys(u()).forEach(function(e){c.removeProperty(e)}),r&&(l.body.style.removeProperty("padding-top"),a.style.removeProperty("top")),!1!==e&&(e.focus(),e=!1),i.scrollTo(0,Math.abs(i.blossomspa.scrolled+d())),i.blossomspa.scrolled=0},500)})})},untoggleModal:function(e){var t,o=!1;e.dataset.modalTargetString&&(t=e.dataset.modalTargetString,o=document.querySelector('*[data-toggle-target="'+t+'"]')),o?o.click():e.classList.remove("active")},keepFocusInModal:function(){var c=document;c.addEventListener("keydown",function(e){var t,o,s,n,a,l,i=blossomspa.toggles.clickedEl;i&&c.body.classList.contains("showing-modal")&&(s=i.dataset.toggleTarget,l="input, a, button",n=c.querySelector(s),t=n.querySelectorAll(l),t=Array.prototype.slice.call(t),".menu-modal"===s&&(o=(o=window.matchMedia("(min-width: 768px)").matches)?".expanded-menu":".mobile-menu",(t=t.filter(function(e){return null!==e.closest(o)&&null!==e.offsetParent})).unshift(c.querySelector(".close-nav-toggle")),(a=c.querySelector(".menu-bottom > nav"))&&a.querySelectorAll(l).forEach(function(e){t.push(e)})),".main-menu-modal"===s&&(o=(o=window.matchMedia("(min-width: 1025px)").matches)?".expanded-menu":".mobile-menu",(t=t.filter(function(e){return null!==e.closest(o)&&null!==e.offsetParent})).unshift(c.querySelector(".close-main-nav-toggle")),(a=c.querySelector(".menu-bottom > nav"))&&a.querySelectorAll(l).forEach(function(e){t.push(e)})),i=t[t.length-1],n=t[0],s=c.activeElement,a=9===e.keyCode,!(l=e.shiftKey)&&a&&i===s&&(e.preventDefault(),n.focus()),l&&a&&n===s&&(e.preventDefault(),i.focus()))})}},blossomspa.modalMenu={init:function(){this.expandLevel()},expandLevel:function(){document.querySelectorAll(".modal-menu").forEach(function(e){e=e.querySelector(".current-menu-item");e&&blossomspaFindParents(e,"li").forEach(function(e){e=e.querySelector(".submenu-toggle");e&&blossomspa.toggles.performToggle(e,!0)})})}},blossomspa.toggles={clickedEl:!1,init:function(){this.toggle()},performToggle:function(e,s){var n,a,l=this,i=document,c=e,r=c.dataset.toggleTarget,d="active";i.querySelectorAll(".show-modal").length||(l.clickedEl=i.activeElement),(n="next"===r?c.nextSibling:i.querySelector(r)).classList.contains(d)?n.dispatchEvent(blossomspa.createEvent("toggle-target-before-active")):n.dispatchEvent(blossomspa.createEvent("toggle-target-before-inactive")),a=c.dataset.classToToggle||d,e=0,n.classList.contains("cover-modal")&&(e=10),setTimeout(function(){var e,t=n.classList.contains("sub-menu")?c.closest(".menu-item").querySelector(".sub-menu"):n,o=c.dataset.toggleDuration;"slidetoggle"!==c.dataset.toggleType||s||"0"===o?t.classList.toggle(a):blossomspaMenuToggle(t,o),("next"===r||n.classList.contains("sub-menu")?c:i.querySelector('*[data-toggle-target="'+r+'"]')).classList.toggle(d),blossomspaToggleAttribute(c,"aria-expanded","true","false"),l.clickedEl&&-1!==c.getAttribute("class").indexOf("close-")&&blossomspaToggleAttribute(l.clickedEl,"aria-expanded","true","false"),c.dataset.toggleBodyClass&&i.body.classList.toggle(c.dataset.toggleBodyClass),c.dataset.setFocus&&(e=i.querySelector(c.dataset.setFocus))&&(n.classList.contains(d)?e.focus():e.blur()),n.dispatchEvent(blossomspa.createEvent("toggled")),n.classList.contains(d)?n.dispatchEvent(blossomspa.createEvent("toggle-target-after-active")):n.dispatchEvent(blossomspa.createEvent("toggle-target-after-inactive"))},e)},toggle:function(){var o=this;document.querySelectorAll("*[data-toggle-target]").forEach(function(t){t.addEventListener("click",function(e){e.preventDefault(),o.performToggle(t)})})}},blossomspaDomReady(function(){blossomspa.toggles.init(),blossomspa.coverModals.init()});