/*! * Mmenu Light * mmenujs.com/mmenu-light v3.0.4 * * Copyright (c) Fred Heusschen * www.frebsite.nl * * License: CC-BY-4.0 * http://creativecommons.org/licenses/by/4.0/ */ ! function (t) { var e = {}; function n(i) { if (e[i]) return e[i].exports; var s = e[i] = { i: i, l: !1, exports: {} }; return t[i].call(s.exports, s, s.exports, n), s.l = !0, s.exports } n.m = t, n.c = e, n.d = function (t, e, i) { n.o(t, e) || Object.defineProperty(t, e, { enumerable: !0, get: i }) }, n.r = function (t) { "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t, "__esModule", { value: !0 }) }, n.t = function (t, e) { if (1 & e && (t = n(t)), 8 & e) return t; if (4 & e && "object" == typeof t && t && t.__esModule) return t; var i = Object.create(null); if (n.r(i), Object.defineProperty(i, "default", { enumerable: !0, value: t }), 2 & e && "string" != typeof t) for (var s in t) n.d(i, s, function (e) { return t[e] }.bind(null, s)); return i }, n.n = function (t) { var e = t && t.__esModule ? function () { return t.default } : function () { return t }; return n.d(e, "a", e), e }, n.o = function (t, e) { return Object.prototype.hasOwnProperty.call(t, e) }, n.p = "", n(n.s = 0) }([function (t, e, n) { "use strict"; n.r(e); var i = function () { function t(t) { var e = this; this.listener = function (t) { (t.matches ? e.matchFns : e.unmatchFns).forEach((function (t) { t() })) }, this.toggler = window.matchMedia(t), this.toggler.addListener(this.listener), this.matchFns = [], this.unmatchFns = [] } return t.prototype.add = function (t, e) { this.matchFns.push(t), this.unmatchFns.push(e), (this.toggler.matches ? t : e)() }, t }(), s = function (t) { return Array.prototype.slice.call(t) }, o = function (t, e) { return s((e || document).querySelectorAll(t)) }, r = ("ontouchstart" in window || navigator.msMaxTouchPoints, navigator.userAgent.indexOf("MSIE") > -1 || navigator.appVersion.indexOf("Trident/") > -1), a = "mm-spn", c = function () { function t(t, e, n, i, s) { this.node = t, this.title = e, this.slidingSubmenus = i, this.selectedClass = n, this.node.classList.add(a), r && (this.slidingSubmenus = !1), this.node.classList.add(a + "--" + s), this.node.classList.add(a + "--" + (this.slidingSubmenus ? "navbar" : "vertical")), this._setSelectedl(), this._initAnchors() } return Object.defineProperty(t.prototype, "prefix", { get: function () { return a }, enumerable: !0, configurable: !0 }), t.prototype.openPanel = function (t) { var e = t.parentElement; if (this.slidingSubmenus) { var n = t.dataset.mmSpnTitle; e === this.node ? this.node.classList.add(a + "--main") : (this.node.classList.remove(a + "--main"), n || s(e.children).forEach((function (t) { t.matches("a, span") && (n = t.textContent) }))), n || (n = this.title), this.node.dataset.mmSpnTitle = n, o("." + a + "--open", this.node).forEach((function (t) { t.classList.remove(a + "--open"), t.classList.remove(a + "--parent") })), t.classList.add(a + "--open"), t.classList.remove(a + "--parent"); for (var i = t.parentElement.closest("ul"); i;) i.classList.add(a + "--open"), i.classList.add(a + "--parent"), i = i.parentElement.closest("ul") } else { var r = t.matches("." + a + "--open"); o("." + a + "--open", this.node).forEach((function (t) { t.classList.remove(a + "--open") })), t.classList[r ? "remove" : "add"](a + "--open"); for (var c = t.parentElement.closest("ul"); c;) c.classList.add(a + "--open"), c = c.parentElement.closest("ul") } }, t.prototype._setSelectedl = function () { var t = o("." + this.selectedClass, this.node), e = t[t.length - 1], n = null; e && (n = e.closest("ul")), n || (n = this.node.querySelector("ul")), this.openPanel(n) }, t.prototype._initAnchors = function () { var t = this; this.node.addEventListener("click", (function (e) { var n = e.target, i = !1; (i = (i = (i = i || function (t) { return !!t.matches("a") }(n)) || function (e) { var n; return !!(n = e.closest("span") ? e.parentElement : !!e.closest("li") && e) && (s(n.children).forEach((function (e) { e.matches("ul") && t.openPanel(e) })), !0) }(n)) || function (e) { var n = o("." + a + "--open", e), i = n[n.length - 1]; if (i) { var s = i.parentElement.closest("ul"); if (s) return t.openPanel(s), !0 } return !1 }(n)) && e.stopImmediatePropagation() })) }, t }(), u = "mm-ocd", d = function () { function t(t, e) { var n = this; // jadams, 2020-06-21: deactivate bubble up control by preventDefault // on so-called passive events to suppress error messages issues by // (Google) Chromium browsers. Google has changed the behavior of // passive event listeners only for window, document or body elements. // // See: https://developers.google.com/web/updates/2017/01/scrolling-intervention // var passiveSupported = false; void 0 === t && (t = null), this.wrapper = document.createElement("div"), this.wrapper.classList.add("" + u), this.wrapper.classList.add(u + "--" + e), this.content = document.createElement("div"), this.content.classList.add(u + "__content"), this.wrapper.append(this.content), this.backdrop = document.createElement("div"), this.backdrop.classList.add(u + "__backdrop"), this.wrapper.append(this.backdrop), document.body.append(this.wrapper), t && this.content.append(t); var i = function (t) { // jadams, 2020-06-21: deactivate close drawer on mouse click event // n.close(); if (passiveSupported) { t.preventDefault() } t.stopImmediatePropagation() }; this.backdrop.addEventListener("touchstart", i, { passive: !0 }), this.backdrop.addEventListener("mousedown", i, { passive: !0 }) } return Object.defineProperty(t.prototype, "prefix", { get: function () { return u }, enumerable: !0, configurable: !0 }), t.prototype.open = function () { this.wrapper.classList.add(u + "--open"), document.body.classList.add(u + "-opened") }, t.prototype.close = function () { this.wrapper.classList.remove(u + "--open"), document.body.classList.remove(u + "-opened") }, t }(), l = function () { function t(t, e) { void 0 === e && (e = "all"), this.menu = t, this.toggler = new i(e) } return t.prototype.navigation = function (t) { var e = this; if (!this.navigator) { var n = (t = t || {}).title, i = void 0 === n ? "Menu" : n, s = t.selectedClass, o = void 0 === s ? "Selected" : s, r = t.slidingSubmenus, a = void 0 === r || r, u = t.theme, d = void 0 === u ? "light" : u; this.navigator = new c(this.menu, i, o, a, d), this.toggler.add((function () { return e.menu.classList.add(e.navigator.prefix) }), (function () { return e.menu.classList.remove(e.navigator.prefix) })) } return this.navigator }, t.prototype.offcanvas = function (t) { var e = this; if (!this.drawer) { var n = (t = t || {}).position, i = void 0 === n ? "left" : n; this.drawer = new d(null, i); var s = document.createComment("original mmenu location"); this.menu.after(s), this.toggler.add((function () { e.drawer.content.append(e.menu) }), (function () { e.drawer.close(), s.after(e.menu) })) } return this.drawer }, t }(); e.default = l; window.MmenuLight = l }]);