Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(e){var t=this;do{if(t.matches(e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null}),window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),function(){var e=function(e){return e.replace(/^\s+|\s+$/g,"")},t=function(e){return new RegExp("(^|\\s+)"+e+"(\\s+|$)")},o=function(e,t,o){for(var n=0;n{e.style.transitionProperty="height, margin, padding",e.style.transitionDuration=t+"ms",e.style.boxSizing="border-box",e.style.height=e.offsetHeight+"px",e.offsetHeight,e.style.overflow="hidden",e.style.height=0,e.style.paddingTop=0,e.style.paddingBottom=0,e.style.marginTop=0,e.style.marginBottom=0,window.setTimeout((()=>{e.style.display=null,e.style.removeProperty("height"),e.style.removeProperty("padding-top"),e.style.removeProperty("padding-bottom"),e.style.removeProperty("margin-top"),e.style.removeProperty("margin-bottom"),e.style.removeProperty("overflow"),e.style.removeProperty("transition-duration"),e.style.removeProperty("transition-property")}),t)},bloghashSlideDown=(e,t=500)=>{e.style.removeProperty("display");let o=window.getComputedStyle(e).display;"none"===o&&(o="block"),e.style.display=o;let n=e.offsetHeight;e.style.overflow="hidden",e.style.height=0,e.style.paddingTop=0,e.style.paddingBottom=0,e.style.marginTop=0,e.style.marginBottom=0,e.offsetHeight,e.style.boxSizing="border-box",e.style.transitionProperty="height, margin, padding",e.style.transitionDuration=t+"ms",e.style.height=n+"px",e.style.removeProperty("padding-top"),e.style.removeProperty("padding-bottom"),e.style.removeProperty("margin-top"),e.style.removeProperty("margin-bottom"),window.setTimeout((()=>{e.style.removeProperty("height"),e.style.removeProperty("overflow"),e.style.removeProperty("transition-duration"),e.style.removeProperty("transition-property")}),t)},bloghashScrollTo=function(){var e={tolerance:0,duration:800,easing:"easeOutQuart",container:window,callback:function(){}};function t(e,t,o,n){return e/=n,-o*(--e*e*e*e-1)+t}function o(e,t){var o={};return Object.keys(e).forEach((function(t){o[t]=e[t]})),Object.keys(t).forEach((function(e){o[e]=t[e]})),o}function n(e){return e instanceof HTMLElement?e.scrollTop:e.pageYOffset}function s(){var n=0d||0>l&&r{Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),o=t.length;0<=--o&&t.item(o)!==this;);return-1{var e,t,o;document.body.classList.contains("bloghash-is-mobile")||(o=window.innerWidth,document.querySelectorAll(".sub-menu").forEach((n=>{n.style.visibility="visible";const s=n.getBoundingClientRect();t=s.left+window.pageXOffset,e=t+s.width,n.removeAttribute("style"),e>o?n.closest("li").classList.add("opens-left"):0>t&&n.closest("li").classList.add("opens-right")})))},n=e=>{var t;return function(){var o=arguments;t&&window.cancelAnimationFrame(t),t=window.requestAnimationFrame((function(){e.apply(this,o)}))}},s=()=>{null!==e&&(450{if(bloghash_vars["sticky-header"].enabled){var e=document.getElementById("bloghash-header"),t=document.getElementById("bloghash-header-inner"),o=document.getElementById("wpadminbar");if((document.body.classList.contains("bloghash-header-layout-3")||document.body.classList.contains("bloghash-header-layout-4")||document.body.classList.contains("bloghash-header-layout-6"))&&(e=document.querySelector("#bloghash-header .bloghash-nav-container"),t=document.querySelector("#bloghash-header .bloghash-nav-container .bloghash-container")),window.outerWidth<=bloghash_vars["responsive-breakpoint"])e=document.getElementById("bloghash-header"),t=document.getElementById("bloghash-header-inner");if(null!==e&&null!==t){var s,r,l=e.getBoundingClientRect().bottom,a=0>=l-s;s=null===o||600>=window.outerWidth?0:o.getBoundingClientRect().height;var i=function(){s=null===o||600>=window.outerWidth?0:o.getBoundingClientRect().height,l=e.getBoundingClientRect().bottom,a=0>=l-s,c()},c=function(){let o=bloghash_vars["sticky-header"].hide_on;o.includes("desktop")&&992<=window.innerWidth&&(a=!1),o.includes("tablet")&&481<=window.innerWidth&&992>window.innerWidth&&(a=!1),o.includes("mobile")&&481>window.innerWidth&&(a=!1),a?document.body.classList.contains("bloghash-sticky-header")||((r=document.createElement("div")).setAttribute("id","bloghash-sticky-placeholder"),r.style.height=t.getBoundingClientRect().height+"px",e.appendChild(r),document.body.classList.add("bloghash-sticky-header"),document.body.style.setProperty("--bloghash-sticky-h-offset",e.offsetHeight+20+"px")):(document.body.classList.contains("bloghash-sticky-header")&&(document.body.classList.remove("bloghash-sticky-header"),document.getElementById("bloghash-sticky-placeholder").remove()),document.body.style.removeProperty("--bloghash-sticky-h-offset"))};"true"!==e.getAttribute("data-scroll-listener")&&(window.addEventListener("scroll",(function(){n(i())})),e.setAttribute("data-scroll-listener","true")),"true"!==e.getAttribute("data-resize-listener")&&(window.addEventListener("resize",(function(){n(i())})),e.setAttribute("data-resize-listener","true")),bloghashTriggerEvent(window,"scroll")}}};function l(){for(var e=this;!e.classList.contains("bloghash-nav");)"li"===e.tagName.toLowerCase()&&(e.classList.contains("hovered")?e.classList.remove("hovered"):e.classList.add("hovered")),e=e.parentElement}var a=()=>{document.body.style.setProperty("--bloghash-screen-width",document.body.clientWidth+"px")},i=(e=0)=>{if(null!==document.getElementById("bloghash-preloader")){var t=()=>{document.body.classList.contains("bloghash-loaded")||(document.body.classList.add("bloghash-loading"),setTimeout((function(){document.body.classList.replace("bloghash-loading","bloghash-loaded"),bloghashTriggerEvent(document.body,"bloghash-preloader-done")}),250))};return 0{window.innerWidth<=bloghash_vars["responsive-breakpoint"]?document.body.classList.add("bloghash-is-mobile"):document.body.classList.contains("bloghash-is-mobile")&&(document.body.classList.remove("bloghash-is-mobile"),bloghashTriggerEvent(document,"bloghash-close-mobile-menu"))},d=e=>{if(!e)return;let t=JSON.parse(e.dataset.swiperOptions);if(e.classList.contains("swiper-top")){const e=document.querySelector(".swiper-bottom");if(e){const o=JSON.parse(e.dataset.swiperOptions),n=new Swiper(e,o);t.thumbs={swiper:n}}}new Swiper(e,t)},h=()=>{if(document.getElementById("bloghash-time")&&(document.getElementById("bloghash-time").textContent=(new Date).toLocaleTimeString()),document.getElementById("bloghash-date")){const e={weekday:"short",month:"short",day:"numeric",year:"numeric"};document.getElementById("bloghash-date").textContent=(new Date).toLocaleString(document.documentElement.lang,e)}};document.addEventListener("DOMContentLoaded",(function(){var e,n;i(5e3),document.body.classList.contains("bloghash-menu-accessibility")&&document.querySelectorAll(".bloghash-nav").forEach((e=>{e.querySelectorAll("ul").forEach((e=>{e.parentNode.setAttribute("aria-haspopup","true")})),e.querySelectorAll("a").forEach((e=>{e.addEventListener("focus",l,!0),e.addEventListener("blur",l,!0)}))})),document.body.addEventListener("keydown",(function(e){document.body.classList.add("using-keyboard")})),document.body.addEventListener("mousedown",(function(e){document.body.classList.remove("using-keyboard")})),s(),(()=>{const e=new bloghashScrollTo({tolerance:null===document.getElementById("wpadminbar")?0:document.getElementById("wpadminbar").getBoundingClientRect().height}),t=document.getElementsByClassName("bloghash-smooth-scroll");for(var o=0;o{e.addEventListener("mouseenter",(function(){document.querySelectorAll(".menu-item-has-children").forEach((e=>{e.classList.remove("hovered")}))}))})),document.querySelectorAll(".bloghash-nav .menu-item-has-children").forEach((t=>{t.addEventListener("mouseleave",(function(){t.classList.add("hovered"),null!==e&&(clearTimeout(e),e=null),e=setTimeout((()=>{t.classList.remove("hovered"),t.querySelectorAll(".menu-item-has-children").forEach((e=>{e.classList.remove("hovered")}))}),700)}))})),(()=>{if(document.body.classList.contains("bloghash-has-comments-toggle")&&null!=document.getElementById("bloghash-comments-toggle")){var e=e=>{void 0!==e&&e.preventDefault(),document.body.classList.contains("comments-visible")?(document.body.classList.remove("comments-visible"),document.getElementById("bloghash-comments-toggle").querySelector("span").innerHTML=bloghash_vars.strings.comments_toggle_show):(document.body.classList.add("comments-visible"),document.getElementById("bloghash-comments-toggle").querySelector("span").innerHTML=bloghash_vars.strings.comments_toggle_hide)};null===document.getElementById("bloghash-comments-toggle")||-1===location.href.indexOf("#comment")&&-1===location.href.indexOf("respond")||e(),document.getElementById("bloghash-comments-toggle").addEventListener("click",e)}})(),(()=>{var e=document.querySelectorAll(".bloghash-search");if(0!==e.length){e.forEach((e=>{e.addEventListener("click",(t=>{t.preventDefault(),e.classList.contains("bloghash-active")?n(e):o(e)}))})),document.querySelectorAll(".bloghash-search-close").forEach((e=>e.addEventListener("click",(function(t){t.preventDefault(),e.classList.contains("bloghash-active")||(n(document.querySelector(".bloghash-search")),document.querySelector(".bloghash-search").focus())}))));var o=function(e){document.querySelectorAll(".bloghash-search-form").forEach((function(e){if(!e)return!1;document.addEventListener("keydown",(function(t){var o,n,s,r,l;s=(n=e.querySelectorAll("input, a, button"))[n.length-1],o=n[0],r=9===t.keyCode,!(l=t.shiftKey)&&r&&s===document.activeElement&&(t.preventDefault(),o.focus()),l&&r&&o===document.activeElement&&(t.preventDefault(),s.focus())}))})),document.body.classList.add("bloghash-search-visible"),setTimeout((function(){e.classList.add("bloghash-active"),null!==e.nextElementSibling&&null!==e.nextElementSibling.querySelector("input")&&(e.nextElementSibling.querySelector("input").focus(),e.nextElementSibling.querySelector("input").select())}),100),document.addEventListener("keydown",s),t.addEventListener("click",r)},n=function(e){document.body.classList.remove("bloghash-search-visible"),e.classList.remove("bloghash-active"),document.removeEventListener("keydown",s),t.removeEventListener("click",r)},s=function(e){27==e.keyCode&&document.querySelectorAll(".bloghash-search").forEach((e=>{n(e)}))},r=function(e){null===e.target.closest(".bloghash-search-container")&&null===e.target.closest(".bloghash-search")&&document.querySelectorAll(".bloghash-search").forEach((e=>{n(e)}))}}})(),(()=>{var e=t,o=document.querySelector("#bloghash-header-inner .bloghash-nav");document.querySelectorAll(".bloghash-mobile-nav > button").forEach((e=>{e.addEventListener("click",(function(e){e.preventDefault(),document.body.parentNode.classList.contains("is-mobile-menu-active")?s():n()}),!1)}));var n=function(t){var n=document.querySelectorAll(".site-header");document.body.classList.contains("bloghash-is-mobile")&&n.forEach((function(e){if(!e)return!1;document.addEventListener("keydown",(function(t){var o,n,s,r,l,a;s=(n=e.querySelectorAll(".bloghash-nav a, .bloghash-nav button"))[n.length-1],o=n[0],r=9===t.keyCode,l=t.shiftKey,a=document.querySelector(".bloghash-hamburger-bloghash-primary-nav"),!l&&r&&s===document.activeElement&&(t.preventDefault(),a.focus()),l&&r&&o===document.activeElement&&(t.preventDefault(),a.focus()),r&&o===s&&t.preventDefault()}))})),document.body.parentNode.classList.add("is-mobile-menu-active"),document.addEventListener("keyup",l),null!==e&&e.addEventListener("click",r),document.querySelectorAll("#bloghash-header .bloghash-nav").forEach((e=>{e.addEventListener("click",a)})),bloghashSlideDown(o,350)},s=function(t){document.body.parentNode.classList.remove("is-mobile-menu-active"),document.removeEventListener("keyup",l),null!==e&&e.removeEventListener("click",r),document.querySelectorAll("#bloghash-header .bloghash-nav > ul > .bloghash-open").forEach((e=>{i(e)})),o.querySelectorAll(".hovered").forEach((e=>{e.classList.remove("hovered")})),document.body.classList.contains("bloghash-is-mobile")?(document.querySelectorAll("#bloghash-header .bloghash-nav").forEach((e=>{e.removeEventListener("click",a)})),bloghashSlideUp(o,250)):o.style.display=null},r=function(e){null===e.target.closest(".bloghash-hamburger")&&null===e.target.closest(".site-navigation")&&s()},l=function(e){27==e.keyCode&&s()},a=function(e){e.target.parentElement.querySelectorAll(".sub-menu").length&&(e.preventDefault(),"button"===e.target.type&&i(e.target.parentElement))},i=e=>{e.classList.contains("bloghash-open")?(e.classList.remove("bloghash-open"),e.querySelectorAll(".sub-menu").forEach((e=>{bloghashSlideUp(e,350)})),e.querySelectorAll("li").forEach((e=>{e.classList.remove("bloghash-open"),e.querySelectorAll(".sub-menu").forEach((e=>{bloghashSlideUp(e,350)}))}))):(e.querySelectorAll(".sub-menu").forEach((t=>{e===t.parentElement&&bloghashSlideDown(t,350)})),e.classList.add("bloghash-open"))};document.addEventListener("bloghash-close-mobile-menu",s)})(),c(),o(),null!==(n=document.querySelector(".single .comments-link"))&&n.addEventListener("click",(function(e){document.body.classList.contains("bloghash-has-comments-toggle")&&!document.body.classList.contains("comments-visible")&&document.getElementById("bloghash-comments-toggle").click()})),(()=>{var e=null;document.querySelectorAll(".bloghash-header-widget__cart .bloghash-widget-wrapper").forEach((e=>{e.addEventListener("mouseenter",(function(){e.classList.remove("dropdown-visible")}))})),document.querySelectorAll(".bloghash-header-widget__cart .bloghash-widget-wrapper").forEach((t=>{t.addEventListener("mouseleave",(function(){t.classList.add("dropdown-visible"),null!==e&&(clearTimeout(e),e=null),e=setTimeout((()=>{t.classList.remove("dropdown-visible")}),700)}))}))})(),r(),a(),document.querySelectorAll(".bloghash-swiper:not(.swiper-bottom)").forEach(d),document.querySelectorAll(".bloghash-swiper.swiper-bottom").forEach(d),setInterval(h,1e3),h(),(()=>{const e=document.body.classList.contains("rtl")?"right":"left",t=document.querySelector(".bloghash-ticker.one-ticker");if(t){const o=new Marquee(t.querySelector(".ticker-slider-wrap"),{speed:50,duration:14e3,gap:0,delayBeforeStart:0,direction:e,duplicated:!0,startVisible:!0,pauseOnHover:!0});t.addEventListener("click",(e=>{const t=e.target.closest(".ticker-slider-pause")?.querySelector("i");t&&(t.classList.toggle("fa-pause"),t.classList.toggle("fa-play"),o.toggle())}))}})()})),window.addEventListener("load",(function(){i()})),window.addEventListener("scroll",(function(){n(s())})),window.addEventListener("resize",(function(){n(o()),n(c()),n(a())})),bloghashTriggerEvent(document.body,"bloghash-ready"),window.bloghash=window.bloghash||{},window.bloghash.preloader=i,window.bloghash.stickyHeader=r,window.App={},App.config={headroom:{enabled:!0,options:{classes:{initial:"headroom",pinned:"is-pinned",unpinned:"is-unpinned",top:"is-top",notTop:"is-not-top",bottom:"is-bottom",notBottom:"is-not-bottom",frozen:"is-frozen"}}},ajax:{enabled:!0},cursorFollower:{enabled:!0,disableBreakpoint:"992"}},App.html=document.querySelector("html"),App.body=document.querySelector("body"),window.onload=()=>{App.config.cursorFollower?.enabled&&u.init()};const u=(()=>{const e=document.querySelector(".bloghash-js-cursor");let t,o,n,s,r,l,a=-100,i=-100,c=!1;const d=()=>{e.style.transform=`translate(${a-s}px, ${i-r}px)`,requestAnimationFrame(d)},h=({target:t})=>{const s=(o,n,s)=>{if(t.getAttribute(s))return App.body.classList.add(o),e.classList.add(n),t.getAttribute(s)};e.classList.add("is-active"),o.innerHTML=s("is-cursor-active","has-label","data-cursor-label")||"",n.innerHTML=s("is-cursor-active","has-icon","data-cursor-icon")||""},u=()=>{["is-cursor-active","is-active","has-label","has-icon"].forEach((t=>e.classList.remove(t))),[o.innerHTML,n.innerHTML]=["",""]},m=()=>{l?.forEach((e=>e.removeEventListener("mouseenter",h))),l=document.querySelectorAll("button, a, input, [data-cursor], [data-cursor-label], [data-cursor-icon], textarea"),l.forEach((e=>{e.addEventListener("mouseenter",h),e.addEventListener("mouseleave",u)}))};return{init:()=>{e&&(e&&([t,o,n]=[".bloghash-js-follower",".bloghash-js-label",".bloghash-js-icon"].map((t=>e.querySelector(t))),[s,r]=[e.offsetWidth/2,e.offsetHeight/2]),c=!0,e.classList.add("is-enabled"),document.addEventListener("mousedown",(()=>e.classList.add("is-mouse-down"))),document.addEventListener("mouseup",(()=>e.classList.remove("is-mouse-down"))),document.addEventListener("mousemove",(({clientX:e,clientY:t})=>[a,i]=[e,t])),requestAnimationFrame(d),m(),(()=>{const t=()=>{let t=window.innerWidth||screen.width;c=t>=App.config.cursorFollower?.disableBreakpoint,e.classList.toggle("is-enabled",c),c?m():l.forEach((e=>e.removeEventListener("mouseenter",h)))};t(),window.addEventListener("resize",t)})())},update:m,clear:()=>l?.forEach((e=>e.removeEventListener("mouseenter",h))),hide:()=>e?.classList.add("is-hidden"),show:()=>e?.classList.remove("is-hidden")}})();document.addEventListener("DOMContentLoaded",(function(){const e=document.querySelector(".bloghash-darkmode");if(e){let o=bloghash_vars.dark_mode||"dark"===localStorage.getItem("darkmode");function t(t){t?(document.documentElement.setAttribute("data-darkmode","dark"),localStorage.setItem("darkmode","dark"),e.classList.add("active")):(document.documentElement.setAttribute("data-darkmode","light"),localStorage.setItem("darkmode","light"),e.classList.remove("active"))}t(o),e.addEventListener("click",(function(){o=!o,t(o)}))}}))}();