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.length; n++)t.call(o, e[n]) }; function n(e) { this.element = e } n.prototype = { add: function () { o(arguments, (function (t) { this.contains(t) || (this.element.className = e(this.element.className + " " + t)) }), this) }, remove: function () { o(arguments, (function (o) { this.element.className = e(this.element.className.replace(t(o), " ")) }), this) }, toggle: function (e) { return this.contains(e) ? (this.remove(e), !1) : (this.add(e), !0) }, contains: function (e) { return t(e).test(this.element.className) }, item: function (e) { return this.element.className.split(/\s+/)[e] || null }, replace: function (e, t) { this.remove(e), this.add(t) } }, "classList" in Element.prototype || Object.defineProperty(Element.prototype, "classList", { get: function () { return new n(this) } }), window.DOMTokenList && !DOMTokenList.prototype.replace && (DOMTokenList.prototype.replace = n.prototype.replace) }(); var bloghashGetIndex = function (e) { for (var t = 0; e = e.previousElementSibling;)t++; return t }, bloghashSlideUp = (e, t = 500) => { 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 = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}, s = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : {}; this.options = o(e, n), this.easeFunctions = o({ easeOutQuart: t }, s) } return s.prototype.registerTrigger = function (e, t) { var n = this; if (e) { var s = e.getAttribute("href") || e.getAttribute("data-target"), r = s && "#" !== s ? document.getElementById(s.substring(1)) : document.body, l = o(this.options, function (e, t) { var o = {}; return Object.keys(t).forEach((function (t) { var n = e.getAttribute("data-mt-".concat(t.replace(/([A-Z])/g, (function (e) { return "-" + e.toLowerCase() })))); n && (o[t] = isNaN(n) ? n : parseInt(n, 10)) })), o }(e, this.options)); "function" == typeof t && (l.callback = t); var i = function (e) { e.preventDefault(), n.move(r, l) }; return e.addEventListener("click", i, !1), function () { return e.removeEventListener("click", i, !1) } } }, s.prototype.move = function (e) { var t = this, s = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : {}; if (0 === e || e) { s = o(this.options, s); var r, l = "number" == typeof e ? e : e.getBoundingClientRect().top, i = n(s.container), a = null; l -= s.tolerance; window.requestAnimationFrame((function o(c) { var d = n(t.options.container); a || (a = c - 1); var h = c - a; if (r && (0 < l && r > d || 0 > l && r < d)) return s.callback(e); r = d; var u = t.easeFunctions[s.easing](h, i, l, s.duration); s.container.scroll(0, u), h < s.duration ? window.requestAnimationFrame(o) : (s.container.scroll(0, l + i), s.callback(e)) })) } }, s.prototype.addEaseFunction = function (e, t) { this.easeFunctions[e] = t }, s }(), bloghashGetParents = (e, t) => { 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 < o }); for (var o = []; e && e !== document; e = e.parentNode)t ? e.matches(t) && o.push(e) : o.push(e); return o }; !function () { if ("function" == typeof window.CustomEvent) return !1; function e(e, t) { t = t || { bubbles: !1, cancelable: !1, detail: void 0 }; var o = document.createEvent("CustomEvent"); return o.initCustomEvent(e, t.bubbles, t.cancelable, t.detail), o } e.prototype = window.Event.prototype, window.CustomEvent = e }(); var bloghashTriggerEvent = function (e, t) { var o = new CustomEvent(t, 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : {}); e.dispatchEvent(o) }; !function () { var e = document.querySelector("#bloghash-scroll-top"), t = document.getElementById("page"); var o = () => { 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 < window.pageYOffset || 450 < document.documentElement.scrollTop ? e.classList.add("bloghash-visible") : e.classList.remove("bloghash-visible")) }, r = () => { 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, i = 0 >= l - s; s = null === o || 600 >= window.outerWidth ? 0 : o.getBoundingClientRect().height; var a = function () { s = null === o || 600 >= window.outerWidth ? 0 : o.getBoundingClientRect().height, l = e.getBoundingClientRect().bottom, i = 0 >= l - s, c() }, c = function () { let o = bloghash_vars["sticky-header"].hide_on; o.includes("desktop") && 992 <= window.innerWidth && (i = !1), o.includes("tablet") && 481 <= window.innerWidth && 992 > window.innerWidth && (i = !1), o.includes("mobile") && 481 > window.innerWidth && (i = !1), i ? 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(a()) })), e.setAttribute("data-scroll-listener", "true")), "true" !== e.getAttribute("data-resize-listener") && (window.addEventListener("resize", (function () { n(a()) })), 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 i = () => { document.body.style.setProperty("--bloghash-screen-width", document.body.clientWidth + "px") }, a = (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 < e ? setTimeout((function () { t() }), e) : t(), !1 } }, c = () => { 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; a(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 < t.length; o++)e.registerTrigger(t[o]) })(), e = null, document.querySelectorAll(".bloghash-nav .menu-item-has-children").forEach((e => { 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, i; s = (n = e.querySelectorAll(".bloghash-nav a, .bloghash-nav button"))[n.length - 1], o = n[0], r = 9 === t.keyCode, l = t.shiftKey, i = document.querySelector(".bloghash-hamburger-bloghash-primary-nav"), !l && r && s === document.activeElement && (t.preventDefault(), i.focus()), l && r && o === document.activeElement && (t.preventDefault(), i.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", i) })), 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 => { a(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", i) })), 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() }, i = function (e) { e.target.parentElement.querySelectorAll(".sub-menu").length && (e.preventDefault(), "button" === e.target.type && a(e.target.parentElement)) }, a = 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(), i(), 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 () { a() })), window.addEventListener("scroll", (function () { n(s()) })), window.addEventListener("resize", (function () { n(o()), n(c()), n(i()) })), bloghashTriggerEvent(document.body, "bloghash-ready"), window.bloghash = window.bloghash || {}, window.bloghash.preloader = a, window.bloghash.stickyHeader = r, window.bloghashSliderInit = d, 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, i = -100, a = -100, c = !1; const d = () => { e.style.transform = `translate(${i - s}px, ${a - 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 }) => [i, a] = [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) })) } })) }();