diff --git a/src/main/webapp/WEB-INF/jsp/include/tail.jsp b/src/main/webapp/WEB-INF/jsp/include/tail.jsp index 0774c68d..337d07db 100644 --- a/src/main/webapp/WEB-INF/jsp/include/tail.jsp +++ b/src/main/webapp/WEB-INF/jsp/include/tail.jsp @@ -6,11 +6,6 @@ "> - - -<%-- "> --%> -<%--? Config: Mandatory theme config file contain global vars & default theme options, Set your preferred theme option in this file. --> - diff --git a/src/main/webapp/resources/3rd-party/sneat/js/dropdown-hover.js b/src/main/webapp/resources/3rd-party/sneat/js/dropdown-hover.js deleted file mode 100644 index 2a7435cc..00000000 --- a/src/main/webapp/resources/3rd-party/sneat/js/dropdown-hover.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * ATTENTION: An "eval-source-map" devtool has been used. - * This devtool is neither made for production nor for readable output files. - * It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools. - * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) - * or disable the default devtool with "devtool: false". - * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). - */ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define([], factory); - else { - var a = factory(); - for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i]; - } -})(self, function() { -return /******/ (function() { // webpackBootstrap -/******/ var __webpack_modules__ = ({ - -/***/ "./js/dropdown-hover.js": -/*!******************************!*\ - !*** ./js/dropdown-hover.js ***! - \******************************/ -/***/ (function() { - -eval("// Add onHover event for dropdowns\n\n;\n(function ($) {\n if (!$ || !$.fn) return;\n var SELECTOR = '[data-bs-toggle=dropdown][data-trigger=hover]';\n var TIMEOUT = 150;\n function openDropdown($i) {\n var t = $i.data('dd-timeout');\n if (t) {\n clearTimeout(t);\n t = null;\n $i.data('dd-timeout', t);\n }\n if ($i.attr('aria-expanded') !== 'true') $i.dropdown('toggle');\n }\n function closeDropdown($i) {\n var t = $i.data('dd-timeout');\n if (t) clearTimeout(t);\n t = setTimeout(function () {\n var t2 = $i.data('dd-timeout');\n if (t2) {\n clearTimeout(t2);\n t2 = null;\n $i.data('dd-timeout', t2);\n }\n if ($i.attr('aria-expanded') === 'true') $i.dropdown('toggle');\n }, TIMEOUT);\n $i.data('dd-timeout', t);\n }\n $(function () {\n $('body').on('mouseenter', \"\".concat(SELECTOR, \", \").concat(SELECTOR, \" ~ .dropdown-menu\"), function () {\n var $toggle = $(this).hasClass('dropdown-toggle') ? $(this) : $(this).prev('.dropdown-toggle');\n var $dropdown = $(this).hasClass('dropdown-menu') ? $(this) : $(this).next('.dropdown-menu');\n if (window.getComputedStyle($dropdown[0], null).getPropertyValue('position') === 'static') return;\n\n // Set hovered flag\n if ($(this).is(SELECTOR)) {\n $(this).data('hovered', true);\n }\n openDropdown($(this).hasClass('dropdown-toggle') ? $(this) : $(this).prev('.dropdown-toggle'));\n }).on('mouseleave', \"\".concat(SELECTOR, \", \").concat(SELECTOR, \" ~ .dropdown-menu\"), function () {\n var $toggle = $(this).hasClass('dropdown-toggle') ? $(this) : $(this).prev('.dropdown-toggle');\n var $dropdown = $(this).hasClass('dropdown-menu') ? $(this) : $(this).next('.dropdown-menu');\n if (window.getComputedStyle($dropdown[0], null).getPropertyValue('position') === 'static') return;\n\n // Remove hovered flag\n if ($(this).is(SELECTOR)) {\n $(this).data('hovered', false);\n }\n closeDropdown($(this).hasClass('dropdown-toggle') ? $(this) : $(this).prev('.dropdown-toggle'));\n }).on('hide.bs.dropdown', function (e) {\n if ($(this).find(SELECTOR).data('hovered')) e.preventDefault();\n });\n });\n})(window.jQuery);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9qcy9kcm9wZG93bi1ob3Zlci5qcy5qcyIsIm5hbWVzIjpbIiQiLCJmbiIsIlNFTEVDVE9SIiwiVElNRU9VVCIsIm9wZW5Ecm9wZG93biIsIiRpI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SxDQUFDLEdBQUdBLENBQUMsQ0FBQyxJQUFJLENBQUMsQ0FBQ21CLElBQUksQ0FBQyxnQkFBZ0IsQ0FBQztNQUU5RixJQUFJQyxNQUFNLENBQUNDLGdCQUFnQixDQUFDSCxTQUFTLENBQUMsQ0FBQyxDQUFDLEVBQUUsSUFBSSxDQUFDLENBQUNJLGdCQUFnQixDQUFDLFVBQVUsQ0FBQyxLQUFLLFFBQVEsRUFBRTs7TUFFM0Y7TUFDQSxJQUFJdEIsQ0FBQyxDQUFDLElBQUksQ0FBQyxDQUFDdUIsRUFBRSxDQUFDckIsUUFBUSxDQUFDLEVBQUU7UUFDeEJGLENBQUMsQ0FBQyxJQUFJLENBQUMsQ0FBQ08sSUFBSSxDQUFDLFNBQVMsRUFBRSxLQUFLLENBQUM7TUFDaEM7TUFFQUksYUFBYSxDQUFDWCxDQUFDLENBQUMsSUFBSSxDQUFDLENBQUNnQixRQUFRLENBQUMsaUJBQWlCLENBQUMsR0FBR2hCLENBQUMsQ0FBQyxJQUFJLENBQUMsR0FBR0EsQ0FBQyxDQUFDLElBQUksQ0FBQyxDQUFDaUIsSUFBSSxDQUFDLGtCQUFrQixDQUFDLENBQUM7SUFDakcsQ0FBQyxDQUFDLENBQ0RILEVBQUUsQ0FBQyxrQkFBa0IsRUFBRSxVQUFVVSxDQUFDLEVBQUU7TUFDbkMsSUFBSXhCLENBQUMsQ0FBQyxJQUFJLENBQUMsQ0FBQ3lCLElBQUksQ0FBQ3ZCLFFBQVEsQ0FBQyxDQUFDSyxJQUFJLENBQUMsU0FBUyxDQUFDLEVBQUVpQixDQUFDLENBQUNFLGNBQWMsRUFBRTtJQUNoRSxDQUFDLENBQUM7RUFDTixDQUFDLENBQUM7QUFDSixDQUFDLEVBQUVOLE1BQU0sQ0FBQ08sTUFBTSxDQUFDIn0=\n//# sourceURL=webpack-internal:///./js/dropdown-hover.js\n"); - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ -/******/ // startup -/******/ // Load entry module and return exports -/******/ // This entry module can't be inlined because the eval-source-map devtool is used. -/******/ var __webpack_exports__ = {}; -/******/ __webpack_modules__["./js/dropdown-hover.js"](); -/******/ -/******/ return __webpack_exports__; -/******/ })() -; -}); \ No newline at end of file diff --git a/src/main/webapp/resources/3rd-party/sneat/js/helpers.js b/src/main/webapp/resources/3rd-party/sneat/js/helpers.js index 61c45be4..a5a38878 100644 --- a/src/main/webapp/resources/3rd-party/sneat/js/helpers.js +++ b/src/main/webapp/resources/3rd-party/sneat/js/helpers.js @@ -1,78 +1,1048 @@ -/* - * ATTENTION: An "eval-source-map" devtool has been used. - * This devtool is neither made for production nor for readable output files. - * It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools. - * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) - * or disable the default devtool with "devtool: false". - * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). - */ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define([], factory); - else { - var a = factory(); - for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i]; - } -})(self, function() { -return /******/ (function() { // webpackBootstrap -/******/ "use strict"; -/******/ var __webpack_modules__ = ({ - -/***/ "./js/helpers.js": -/*!***********************!*\ - !*** ./js/helpers.js ***! - \***********************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Helpers\": function() { return /* binding */ Helpers; }\n/* harmony export */ });\nfunction _toArray(arr) { return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest(); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n// Constants\nvar TRANS_EVENTS = ['transitionend', 'webkitTransitionEnd', 'oTransitionEnd'];\nvar TRANS_PROPERTIES = ['transition', 'MozTransition', 'webkitTransition', 'WebkitTransition', 'OTransition'];\nvar INLINE_STYLES = \"\\n.layout-menu-fixed .layout-navbar-full .layout-menu,\\n.layout-menu-fixed-offcanvas .layout-navbar-full .layout-menu {\\n top: {navbarHeight}px !important;\\n}\\n.layout-page {\\n padding-top: {navbarHeight}px !important;\\n}\\n.content-wrapper {\\n padding-bottom: {footerHeight}px !important;\\n}\";\n\n// Guard\nfunction requiredParam(name) {\n throw new Error(\"Parameter required\".concat(name ? \": `\".concat(name, \"`\") : ''));\n}\nvar Helpers = {\n // Root Element\n ROOT_EL: typeof window !== 'undefined' ? document.documentElement : null,\n // Large screens breakpoint\n LAYOUT_BREAKPOINT: 1200,\n // Resize delay in milliseconds\n RESIZE_DELAY: 200,\n menuPsScroll: null,\n mainMenu: null,\n // Internal variables\n _curStyle: null,\n _styleEl: null,\n _resizeTimeout: null,\n _resizeCallback: null,\n _transitionCallback: null,\n _transitionCallbackTimeout: null,\n _listeners: [],\n _initialized: false,\n _autoUpdate: false,\n _lastWindowHeight: 0,\n // *******************************************************************************\n // * Utilities\n // ---\n // Scroll To Active Menu Item\n _scrollToActive: function _scrollToActive() {\n var animate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;\n var layoutMenu = this.getLayoutMenu();\n if (!layoutMenu) return;\n var activeEl = layoutMenu.querySelector('li.menu-item.active:not(.open)');\n if (activeEl) {\n // t = current time\n // b = start value\n // c = change in value\n // d = duration\n var easeInOutQuad = function easeInOutQuad(t, b, c, d) {\n t /= d / 2;\n if (t < 1) return c / 2 * t * t + b;\n t -= 1;\n return -c / 2 * (t * (t - 2) - 1) + b;\n };\n var element = this.getLayoutMenu().querySelector('.menu-inner');\n if (typeof activeEl === 'string') {\n activeEl = document.querySelector(activeEl);\n }\n if (typeof activeEl !== 'number') {\n activeEl = activeEl.getBoundingClientRect().top + element.scrollTop;\n }\n\n // If active element's top position is less than 2/3 (66%) of menu height than do not scroll\n if (activeEl < parseInt(element.clientHeight * 2 / 3, 10)) return;\n var start = element.scrollTop;\n var change = activeEl - start - parseInt(element.clientHeight / 2, 10);\n var startDate = +new Date();\n if (animate === true) {\n var animateScroll = function animateScroll() {\n var currentDate = +new Date();\n var currentTime = currentDate - startDate;\n var val = easeInOutQuad(currentTime, start, change, duration);\n element.scrollTop = val;\n if (currentTime < duration) {\n requestAnimationFrame(animateScroll);\n } else {\n element.scrollTop = change;\n }\n };\n animateScroll();\n } else {\n element.scrollTop = change;\n }\n }\n },\n // ---\n // Swipe In Gesture\n _swipeIn: function _swipeIn(targetEl, callback) {\n var _window = window,\n Hammer = _window.Hammer;\n if (typeof Hammer !== 'undefined' && typeof targetEl === 'string') {\n // Swipe menu gesture\n var swipeInElement = document.querySelector(targetEl);\n if (swipeInElement) {\n var hammerInstance = new Hammer(swipeInElement);\n hammerInstance.on('panright', callback);\n }\n }\n },\n // ---\n // Swipe Out Gesture\n _swipeOut: function _swipeOut(targetEl, callback) {\n var _window2 = window,\n Hammer = _window2.Hammer;\n if (typeof Hammer !== 'undefined' && typeof targetEl === 'string') {\n setTimeout(function () {\n // Swipe menu gesture\n var swipeOutElement = document.querySelector(targetEl);\n if (swipeOutElement) {\n var hammerInstance = new Hammer(swipeOutElement);\n hammerInstance.get('pan').set({\n direction: Hammer.DIRECTION_ALL,\n threshold: 250\n });\n hammerInstance.on('panleft', callback);\n }\n }, 500);\n }\n },\n // ---\n // Swipe Out On Overlay Tap\n _overlayTap: function _overlayTap(targetEl, callback) {\n var _window3 = window,\n Hammer = _window3.Hammer;\n if (typeof Hammer !== 'undefined' && typeof targetEl === 'string') {\n // Swipe out overlay element\n var swipeOutOverlayElement = document.querySelector(targetEl);\n if (swipeOutOverlayElement) {\n var hammerInstance = new Hammer(swipeOutOverlayElement);\n hammerInstance.on('tap', callback);\n }\n }\n },\n // ---\n // Add classes\n _addClass: function _addClass(cls) {\n var el = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.ROOT_EL;\n if (el.length !== undefined) {\n // Add classes to multiple elements\n el.forEach(function (e) {\n cls.split(' ').forEach(function (c) {\n return e.classList.add(c);\n });\n });\n } else {\n // Add classes to single element\n cls.split(' ').forEach(function (c) {\n return el.classList.add(c);\n });\n }\n },\n // ---\n // Remove classes\n _removeClass: function _removeClass(cls) {\n var el = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.ROOT_EL;\n if (el.length !== undefined) {\n // Remove classes to multiple elements\n el.forEach(function (e) {\n cls.split(' ').forEach(function (c) {\n return e.classList.remove(c);\n });\n });\n } else {\n // Remove classes to single element\n cls.split(' ').forEach(function (c) {\n return el.classList.remove(c);\n });\n }\n },\n // Toggle classes\n _toggleClass: function _toggleClass() {\n var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.ROOT_EL;\n var cls1 = arguments.length > 1 ? arguments[1] : undefined;\n var cls2 = arguments.length > 2 ? arguments[2] : undefined;\n if (el.classList.contains(cls1)) {\n el.classList.replace(cls1, cls2);\n } else {\n el.classList.replace(cls2, cls1);\n }\n },\n // ---\n // Has class\n _hasClass: function _hasClass(cls) {\n var el = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.ROOT_EL;\n var result = false;\n cls.split(' ').forEach(function (c) {\n if (el.classList.contains(c)) result = true;\n });\n return result;\n },\n _findParent: function _findParent(el, cls) {\n if (el && el.tagName.toUpperCase() === 'BODY' || el.tagName.toUpperCase() === 'HTML') return null;\n el = el.parentNode;\n while (el && el.tagName.toUpperCase() !== 'BODY' && !el.classList.contains(cls)) {\n el = el.parentNode;\n }\n el = el && el.tagName.toUpperCase() !== 'BODY' ? el : null;\n return el;\n },\n // ---\n // Trigger window event\n _triggerWindowEvent: function _triggerWindowEvent(name) {\n if (typeof window === 'undefined') return;\n if (document.createEvent) {\n var event;\n if (typeof Event === 'function') {\n event = new Event(name);\n } else {\n event = document.createEvent('Event');\n event.initEvent(name, false, true);\n }\n window.dispatchEvent(event);\n } else {\n window.fireEvent(\"on\".concat(name), document.createEventObject());\n }\n },\n // ---\n // Trigger event\n _triggerEvent: function _triggerEvent(name) {\n this._triggerWindowEvent(\"layout\".concat(name));\n this._listeners.filter(function (listener) {\n return listener.event === name;\n }).forEach(function (listener) {\n return listener.callback.call(null);\n });\n },\n // ---\n // Update style\n _updateInlineStyle: function _updateInlineStyle() {\n var navbarHeight = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var footerHeight = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n if (!this._styleEl) {\n this._styleEl = document.createElement('style');\n this._styleEl.type = 'text/css';\n document.head.appendChild(this._styleEl);\n }\n var newStyle = INLINE_STYLES.replace(/\\{navbarHeight\\}/gi, navbarHeight).replace(/\\{footerHeight\\}/gi, footerHeight);\n if (this._curStyle !== newStyle) {\n this._curStyle = newStyle;\n this._styleEl.textContent = newStyle;\n }\n },\n // ---\n // Remove style\n _removeInlineStyle: function _removeInlineStyle() {\n if (this._styleEl) document.head.removeChild(this._styleEl);\n this._styleEl = null;\n this._curStyle = null;\n },\n // ---\n // Redraw layout menu (Safari bugfix)\n _redrawLayoutMenu: function _redrawLayoutMenu() {\n var layoutMenu = this.getLayoutMenu();\n if (layoutMenu && layoutMenu.querySelector('.menu')) {\n var inner = layoutMenu.querySelector('.menu-inner');\n var scrollTop = inner.scrollTop;\n var pageScrollTop = document.documentElement.scrollTop;\n layoutMenu.style.display = 'none';\n // layoutMenu.offsetHeight\n layoutMenu.style.display = '';\n inner.scrollTop = scrollTop;\n document.documentElement.scrollTop = pageScrollTop;\n return true;\n }\n return false;\n },\n // ---\n // Check for transition support\n _supportsTransitionEnd: function _supportsTransitionEnd() {\n if (window.QUnit) return false;\n var el = document.body || document.documentElement;\n if (!el) return false;\n var result = false;\n TRANS_PROPERTIES.forEach(function (evnt) {\n if (typeof el.style[evnt] !== 'undefined') result = true;\n });\n return result;\n },\n // ---\n // Calculate current navbar height\n _getNavbarHeight: function _getNavbarHeight() {\n var _this2 = this;\n var layoutNavbar = this.getLayoutNavbar();\n if (!layoutNavbar) return 0;\n if (!this.isSmallScreen()) return layoutNavbar.getBoundingClientRect().height;\n\n // Needs some logic to get navbar height on small screens\n\n var clonedEl = layoutNavbar.cloneNode(true);\n clonedEl.id = null;\n clonedEl.style.visibility = 'hidden';\n clonedEl.style.position = 'absolute';\n Array.prototype.slice.call(clonedEl.querySelectorAll('.collapse.show')).forEach(function (el) {\n return _this2._removeClass('show', el);\n });\n layoutNavbar.parentNode.insertBefore(clonedEl, layoutNavbar);\n var navbarHeight = clonedEl.getBoundingClientRect().height;\n clonedEl.parentNode.removeChild(clonedEl);\n return navbarHeight;\n },\n // ---\n // Get current footer height\n _getFooterHeight: function _getFooterHeight() {\n var layoutFooter = this.getLayoutFooter();\n if (!layoutFooter) return 0;\n return layoutFooter.getBoundingClientRect().height;\n },\n // ---\n // Get animation duration of element\n _getAnimationDuration: function _getAnimationDuration(el) {\n var duration = window.getComputedStyle(el).transitionDuration;\n return parseFloat(duration) * (duration.indexOf('ms') !== -1 ? 1 : 1000);\n },\n // ---\n // Set menu hover state\n _setMenuHoverState: function _setMenuHoverState(hovered) {\n this[hovered ? '_addClass' : '_removeClass']('layout-menu-hover');\n },\n // ---\n // Toggle collapsed\n _setCollapsed: function _setCollapsed(collapsed) {\n var _this3 = this;\n if (this.isSmallScreen()) {\n if (collapsed) {\n this._removeClass('layout-menu-expanded');\n } else {\n setTimeout(function () {\n _this3._addClass('layout-menu-expanded');\n }, this._redrawLayoutMenu() ? 5 : 0);\n }\n } else {\n this[collapsed ? '_addClass' : '_removeClass']('layout-menu-collapsed');\n }\n },\n // ---\n // Add layout sivenav toggle animationEnd event\n _bindLayoutAnimationEndEvent: function _bindLayoutAnimationEndEvent(modifier, cb) {\n var _this4 = this;\n var menu = this.getMenu();\n var duration = menu ? this._getAnimationDuration(menu) + 50 : 0;\n if (!duration) {\n modifier.call(this);\n cb.call(this);\n return;\n }\n this._transitionCallback = function (e) {\n if (e.target !== menu) return;\n _this4._unbindLayoutAnimationEndEvent();\n cb.call(_this4);\n };\n TRANS_EVENTS.forEach(function (e) {\n menu.addEventListener(e, _this4._transitionCallback, false);\n });\n modifier.call(this);\n this._transitionCallbackTimeout = setTimeout(function () {\n _this4._transitionCallback.call(_this4, {\n target: menu\n });\n }, duration);\n },\n // ---\n // Remove layout sivenav toggle animationEnd event\n _unbindLayoutAnimationEndEvent: function _unbindLayoutAnimationEndEvent() {\n var _this5 = this;\n var menu = this.getMenu();\n if (this._transitionCallbackTimeout) {\n clearTimeout(this._transitionCallbackTimeout);\n this._transitionCallbackTimeout = null;\n }\n if (menu && this._transitionCallback) {\n TRANS_EVENTS.forEach(function (e) {\n menu.removeEventListener(e, _this5._transitionCallback, false);\n });\n }\n if (this._transitionCallback) {\n this._transitionCallback = null;\n }\n },\n // ---\n // Bind delayed window resize event\n _bindWindowResizeEvent: function _bindWindowResizeEvent() {\n var _this6 = this;\n this._unbindWindowResizeEvent();\n var cb = function cb() {\n if (_this6._resizeTimeout) {\n clearTimeout(_this6._resizeTimeout);\n _this6._resizeTimeout = null;\n }\n _this6._triggerEvent('resize');\n };\n this._resizeCallback = function () {\n if (_this6._resizeTimeout) clearTimeout(_this6._resizeTimeout);\n _this6._resizeTimeout = setTimeout(cb, _this6.RESIZE_DELAY);\n };\n window.addEventListener('resize', this._resizeCallback, false);\n },\n // ---\n // Unbind delayed window resize event\n _unbindWindowResizeEvent: function _unbindWindowResizeEvent() {\n if (this._resizeTimeout) {\n clearTimeout(this._resizeTimeout);\n this._resizeTimeout = null;\n }\n if (this._resizeCallback) {\n window.removeEventListener('resize', this._resizeCallback, false);\n this._resizeCallback = null;\n }\n },\n _bindMenuMouseEvents: function _bindMenuMouseEvents() {\n var _this7 = this;\n if (this._menuMouseEnter && this._menuMouseLeave && this._windowTouchStart) return;\n var layoutMenu = this.getLayoutMenu();\n if (!layoutMenu) return this._unbindMenuMouseEvents();\n if (!this._menuMouseEnter) {\n this._menuMouseEnter = function () {\n if (_this7.isSmallScreen() || !_this7._hasClass('layout-menu-collapsed') || _this7.isOffcanvas() || _this7._hasClass('layout-transitioning')) {\n return _this7._setMenuHoverState(false);\n }\n return _this7._setMenuHoverState(true);\n };\n layoutMenu.addEventListener('mouseenter', this._menuMouseEnter, false);\n layoutMenu.addEventListener('touchstart', this._menuMouseEnter, false);\n }\n if (!this._menuMouseLeave) {\n this._menuMouseLeave = function () {\n _this7._setMenuHoverState(false);\n };\n layoutMenu.addEventListener('mouseleave', this._menuMouseLeave, false);\n }\n if (!this._windowTouchStart) {\n this._windowTouchStart = function (e) {\n if (!e || !e.target || !_this7._findParent(e.target, '.layout-menu')) {\n _this7._setMenuHoverState(false);\n }\n };\n window.addEventListener('touchstart', this._windowTouchStart, true);\n }\n },\n _unbindMenuMouseEvents: function _unbindMenuMouseEvents() {\n if (!this._menuMouseEnter && !this._menuMouseLeave && !this._windowTouchStart) return;\n var layoutMenu = this.getLayoutMenu();\n if (this._menuMouseEnter) {\n if (layoutMenu) {\n layoutMenu.removeEventListener('mouseenter', this._menuMouseEnter, false);\n layoutMenu.removeEventListener('touchstart', this._menuMouseEnter, false);\n }\n this._menuMouseEnter = null;\n }\n if (this._menuMouseLeave) {\n if (layoutMenu) {\n layoutMenu.removeEventListener('mouseleave', this._menuMouseLeave, false);\n }\n this._menuMouseLeave = null;\n }\n if (this._windowTouchStart) {\n if (layoutMenu) {\n window.addEventListener('touchstart', this._windowTouchStart, true);\n }\n this._windowTouchStart = null;\n }\n this._setMenuHoverState(false);\n },\n // *******************************************************************************\n // * Methods\n scrollToActive: function scrollToActive() {\n var animate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n this._scrollToActive(animate);\n },\n swipeIn: function swipeIn(el, callback) {\n this._swipeIn(el, callback);\n },\n swipeOut: function swipeOut(el, callback) {\n this._swipeOut(el, callback);\n },\n overlayTap: function overlayTap(el, callback) {\n this._overlayTap(el, callback);\n },\n scrollPageTo: function scrollPageTo(to) {\n var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;\n // t = current time\n // b = start value\n // c = change in value\n // d = duration\n var easeInOutQuad = function easeInOutQuad(t, b, c, d) {\n t /= d / 2;\n if (t < 1) return c / 2 * t * t + b;\n t -= 1;\n return -c / 2 * (t * (t - 2) - 1) + b;\n };\n var element = document.scrollingElement;\n if (typeof to === 'string') {\n to = document.querySelector(to);\n }\n if (typeof to !== 'number') {\n to = to.getBoundingClientRect().top + element.scrollTop;\n }\n var start = element.scrollTop;\n var change = to - start;\n var startDate = +new Date();\n // const increment = 20\n\n var animateScroll = function animateScroll() {\n var currentDate = +new Date();\n var currentTime = currentDate - startDate;\n var val = easeInOutQuad(currentTime, start, change, duration);\n element.scrollTop = val;\n if (currentTime < duration) {\n requestAnimationFrame(animateScroll);\n } else {\n element.scrollTop = to;\n }\n };\n animateScroll();\n },\n // ---\n // Collapse / expand layout\n setCollapsed: function setCollapsed() {\n var _this8 = this;\n var collapsed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : requiredParam('collapsed');\n var animate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var layoutMenu = this.getLayoutMenu();\n if (!layoutMenu) return;\n this._unbindLayoutAnimationEndEvent();\n if (animate && this._supportsTransitionEnd()) {\n this._addClass('layout-transitioning');\n if (collapsed) this._setMenuHoverState(false);\n this._bindLayoutAnimationEndEvent(function () {\n // Collapse / Expand\n _this8._setCollapsed(collapsed);\n }, function () {\n _this8._removeClass('layout-transitioning');\n _this8._triggerWindowEvent('resize');\n _this8._triggerEvent('toggle');\n _this8._setMenuHoverState(false);\n });\n } else {\n this._addClass('layout-no-transition');\n if (collapsed) this._setMenuHoverState(false);\n\n // Collapse / Expand\n this._setCollapsed(collapsed);\n setTimeout(function () {\n _this8._removeClass('layout-no-transition');\n _this8._triggerWindowEvent('resize');\n _this8._triggerEvent('toggle');\n _this8._setMenuHoverState(false);\n }, 1);\n }\n },\n // ---\n // Toggle layout\n toggleCollapsed: function toggleCollapsed() {\n var animate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n this.setCollapsed(!this.isCollapsed(), animate);\n },\n // ---\n // Set layout positioning\n setPosition: function setPosition() {\n var fixed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : requiredParam('fixed');\n var offcanvas = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : requiredParam('offcanvas');\n this._removeClass('layout-menu-offcanvas layout-menu-fixed layout-menu-fixed-offcanvas');\n if (!fixed && offcanvas) {\n this._addClass('layout-menu-offcanvas');\n } else if (fixed && !offcanvas) {\n this._addClass('layout-menu-fixed');\n this._redrawLayoutMenu();\n } else if (fixed && offcanvas) {\n this._addClass('layout-menu-fixed-offcanvas');\n this._redrawLayoutMenu();\n }\n this.update();\n },\n // *******************************************************************************\n // * Getters\n getLayoutMenu: function getLayoutMenu() {\n return document.querySelector('.layout-menu');\n },\n getMenu: function getMenu() {\n var layoutMenu = this.getLayoutMenu();\n if (!layoutMenu) return null;\n return !this._hasClass('menu', layoutMenu) ? layoutMenu.querySelector('.menu') : layoutMenu;\n },\n getLayoutNavbar: function getLayoutNavbar() {\n return document.querySelector('.layout-navbar');\n },\n getLayoutFooter: function getLayoutFooter() {\n return document.querySelector('.content-footer');\n },\n getLayoutContainer: function getLayoutContainer() {\n return document.querySelector('.layout-page');\n },\n // *******************************************************************************\n // * Setters\n setNavbarFixed: function setNavbarFixed() {\n var fixed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : requiredParam('fixed');\n this[fixed ? '_addClass' : '_removeClass']('layout-navbar-fixed');\n this.update();\n },\n setFooterFixed: function setFooterFixed() {\n var fixed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : requiredParam('fixed');\n this[fixed ? '_addClass' : '_removeClass']('layout-footer-fixed');\n this.update();\n },\n setFlipped: function setFlipped() {\n var reversed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : requiredParam('reversed');\n this[reversed ? '_addClass' : '_removeClass']('layout-menu-flipped');\n },\n // *******************************************************************************\n // * Update\n update: function update() {\n if (this.getLayoutNavbar() && (!this.isSmallScreen() && this.isLayoutNavbarFull() && this.isFixed() || this.isNavbarFixed()) || this.getLayoutFooter() && this.isFooterFixed()) {\n this._updateInlineStyle(this._getNavbarHeight(), this._getFooterHeight());\n }\n this._bindMenuMouseEvents();\n },\n setAutoUpdate: function setAutoUpdate() {\n var _this9 = this;\n var enable = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : requiredParam('enable');\n if (enable && !this._autoUpdate) {\n this.on('resize.Helpers:autoUpdate', function () {\n return _this9.update();\n });\n this._autoUpdate = true;\n } else if (!enable && this._autoUpdate) {\n this.off('resize.Helpers:autoUpdate');\n this._autoUpdate = false;\n }\n },\n // Update custom option based on element\n updateCustomOptionCheck: function updateCustomOptionCheck(el) {\n if (el.checked) {\n // If custom option element is radio, remove checked from the siblings (closest `.row`)\n if (el.type === 'radio') {\n var customRadioOptionList = [].slice.call(el.closest('.row').querySelectorAll('.custom-option'));\n customRadioOptionList.map(function (customRadioOptionEL) {\n customRadioOptionEL.closest('.custom-option').classList.remove('checked');\n });\n }\n el.closest('.custom-option').classList.add('checked');\n } else {\n el.closest('.custom-option').classList.remove('checked');\n }\n },\n // *******************************************************************************\n // * Tests\n isRtl: function isRtl() {\n return document.querySelector('body').getAttribute('dir') === 'rtl' || document.querySelector('html').getAttribute('dir') === 'rtl';\n },\n isMobileDevice: function isMobileDevice() {\n return typeof window.orientation !== 'undefined' || navigator.userAgent.indexOf('IEMobile') !== -1;\n },\n isSmallScreen: function isSmallScreen() {\n return (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) < this.LAYOUT_BREAKPOINT;\n },\n isLayoutNavbarFull: function isLayoutNavbarFull() {\n return !!document.querySelector('.layout-wrapper.layout-navbar-full');\n },\n isCollapsed: function isCollapsed() {\n if (this.isSmallScreen()) {\n return !this._hasClass('layout-menu-expanded');\n }\n return this._hasClass('layout-menu-collapsed');\n },\n isFixed: function isFixed() {\n return this._hasClass('layout-menu-fixed layout-menu-fixed-offcanvas');\n },\n isOffcanvas: function isOffcanvas() {\n return this._hasClass('layout-menu-offcanvas layout-menu-fixed-offcanvas');\n },\n isNavbarFixed: function isNavbarFixed() {\n return this._hasClass('layout-navbar-fixed') || !this.isSmallScreen() && this.isFixed() && this.isLayoutNavbarFull();\n },\n isFooterFixed: function isFooterFixed() {\n return this._hasClass('layout-footer-fixed');\n },\n isFlipped: function isFlipped() {\n return this._hasClass('layout-menu-flipped');\n },\n isLightStyle: function isLightStyle() {\n return document.documentElement.classList.contains('light-style');\n },\n isDarkStyle: function isDarkStyle() {\n return document.documentElement.classList.contains('dark-style');\n },\n // *******************************************************************************\n // * Events\n on: function on() {\n var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : requiredParam('event');\n var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : requiredParam('callback');\n var _event$split = event.split('.'),\n _event$split2 = _slicedToArray(_event$split, 1),\n _event = _event$split2[0];\n var _event$split3 = event.split('.'),\n _event$split4 = _toArray(_event$split3),\n namespace = _event$split4.slice(1);\n // let [_event, ...namespace] = event.split('.')\n namespace = namespace.join('.') || null;\n this._listeners.push({\n event: _event,\n namespace: namespace,\n callback: callback\n });\n },\n off: function off() {\n var _this10 = this;\n var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : requiredParam('event');\n var _event$split5 = event.split('.'),\n _event$split6 = _slicedToArray(_event$split5, 1),\n _event = _event$split6[0];\n var _event$split7 = event.split('.'),\n _event$split8 = _toArray(_event$split7),\n namespace = _event$split8.slice(1);\n namespace = namespace.join('.') || null;\n this._listeners.filter(function (listener) {\n return listener.event === _event && listener.namespace === namespace;\n }).forEach(function (listener) {\n return _this10._listeners.splice(_this10._listeners.indexOf(listener), 1);\n });\n },\n // *******************************************************************************\n // * Life cycle\n init: function init() {\n var _this11 = this;\n if (this._initialized) return;\n this._initialized = true;\n\n // Initialize `style` element\n this._updateInlineStyle(0);\n\n // Bind window resize event\n this._bindWindowResizeEvent();\n\n // Bind init event\n this.off('init._Helpers');\n this.on('init._Helpers', function () {\n _this11.off('resize._Helpers:redrawMenu');\n _this11.on('resize._Helpers:redrawMenu', function () {\n // eslint-disable-next-line no-unused-expressions\n _this11.isSmallScreen() && !_this11.isCollapsed() && _this11._redrawLayoutMenu();\n });\n\n // Force repaint in IE 10\n if (typeof document.documentMode === 'number' && document.documentMode < 11) {\n _this11.off('resize._Helpers:ie10RepaintBody');\n _this11.on('resize._Helpers:ie10RepaintBody', function () {\n if (_this11.isFixed()) return;\n var scrollTop = document.documentElement.scrollTop;\n document.body.style.display = 'none';\n // document.body.offsetHeight\n document.body.style.display = 'block';\n document.documentElement.scrollTop = scrollTop;\n });\n }\n });\n this._triggerEvent('init');\n },\n destroy: function destroy() {\n var _this12 = this;\n if (!this._initialized) return;\n this._initialized = false;\n this._removeClass('layout-transitioning');\n this._removeInlineStyle();\n this._unbindLayoutAnimationEndEvent();\n this._unbindWindowResizeEvent();\n this._unbindMenuMouseEvents();\n this.setAutoUpdate(false);\n this.off('init._Helpers');\n\n // Remove all listeners except `init`\n this._listeners.filter(function (listener) {\n return listener.event !== 'init';\n }).forEach(function (listener) {\n return _this12._listeners.splice(_this12._listeners.indexOf(listener), 1);\n });\n },\n // ---\n // Init Password Toggle\n initPasswordToggle: function initPasswordToggle() {\n var toggler = document.querySelectorAll('.form-password-toggle i');\n if (typeof toggler !== 'undefined' && toggler !== null) {\n toggler.forEach(function (el) {\n el.addEventListener('click', function (e) {\n e.preventDefault();\n var formPasswordToggle = el.closest('.form-password-toggle');\n var formPasswordToggleIcon = formPasswordToggle.querySelector('i');\n var formPasswordToggleInput = formPasswordToggle.querySelector('input');\n if (formPasswordToggleInput.getAttribute('type') === 'text') {\n formPasswordToggleInput.setAttribute('type', 'password');\n formPasswordToggleIcon.classList.replace('bx-show', 'bx-hide');\n } else if (formPasswordToggleInput.getAttribute('type') === 'password') {\n formPasswordToggleInput.setAttribute('type', 'text');\n formPasswordToggleIcon.classList.replace('bx-hide', 'bx-show');\n }\n });\n });\n }\n },\n //--\n // Init custom option check\n initCustomOptionCheck: function initCustomOptionCheck() {\n var _this = this;\n var custopOptionList = [].slice.call(document.querySelectorAll('.custom-option .form-check-input'));\n custopOptionList.map(function (customOptionEL) {\n // Update custom options check on page load\n _this.updateCustomOptionCheck(customOptionEL);\n\n // Update custom options check on click\n customOptionEL.addEventListener('click', function (e) {\n _this.updateCustomOptionCheck(customOptionEL);\n });\n });\n },\n // ---\n // Init Speech To Text\n initSpeechToText: function initSpeechToText() {\n var SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition;\n var speechToText = document.querySelectorAll('.speech-to-text');\n if (SpeechRecognition !== undefined && SpeechRecognition !== null) {\n if (typeof speechToText !== 'undefined' && speechToText !== null) {\n var recognition = new SpeechRecognition();\n var toggler = document.querySelectorAll('.speech-to-text i');\n toggler.forEach(function (el) {\n var listening = false;\n el.addEventListener('click', function () {\n el.closest('.input-group').querySelector('.form-control').focus();\n recognition.onspeechstart = function () {\n listening = true;\n };\n if (listening === false) {\n recognition.start();\n }\n recognition.onerror = function () {\n listening = false;\n };\n recognition.onresult = function (event) {\n el.closest('.input-group').querySelector('.form-control').value = event.results[0][0].transcript;\n };\n recognition.onspeechend = function () {\n listening = false;\n recognition.stop();\n };\n });\n });\n }\n }\n },\n // ---\n // Init Navbar Dropdown (i.e notification) PerfectScrollbar\n initNavbarDropdownScrollbar: function initNavbarDropdownScrollbar() {\n var scrollbarContainer = document.querySelectorAll('.navbar-dropdown .scrollable-container');\n var _window4 = window,\n PerfectScrollbar = _window4.PerfectScrollbar;\n if (PerfectScrollbar !== undefined) {\n if (typeof scrollbarContainer !== 'undefined' && scrollbarContainer !== null) {\n scrollbarContainer.forEach(function (el) {\n // eslint-disable-next-line no-new\n new PerfectScrollbar(el, {\n wheelPropagation: false,\n suppressScrollX: true\n });\n });\n }\n }\n },\n // Ajax Call Promise\n ajaxCall: function ajaxCall(url) {\n return new Promise(function (resolve, reject) {\n var req = new XMLHttpRequest();\n req.open('GET', url);\n req.onload = function () {\n return req.status === 200 ? resolve(req.response) : reject(Error(req.statusText));\n };\n req.onerror = function (e) {\n return reject(Error(\"Network Error: \".concat(e)));\n };\n req.send();\n });\n },\n // ---\n // SidebarToggle (Used in Apps)\n initSidebarToggle: function initSidebarToggle() {\n var sidebarToggler = document.querySelectorAll('[data-bs-toggle=\"sidebar\"]');\n sidebarToggler.forEach(function (el) {\n el.addEventListener('click', function () {\n var target = el.getAttribute('data-target');\n var overlay = el.getAttribute('data-overlay');\n var appOverlay = document.querySelectorAll('.app-overlay');\n var targetEl = document.querySelectorAll(target);\n targetEl.forEach(function (tel) {\n tel.classList.toggle('show');\n if (typeof overlay !== 'undefined' && overlay !== null && overlay !== false && typeof appOverlay !== 'undefined') {\n if (tel.classList.contains('show')) {\n appOverlay[0].classList.add('show');\n } else {\n appOverlay[0].classList.remove('show');\n }\n appOverlay[0].addEventListener('click', function (e) {\n e.currentTarget.classList.remove('show');\n tel.classList.remove('show');\n });\n }\n });\n });\n });\n }\n};\n\n// *******************************************************************************\n// * Initialization\n\nif (typeof window !== 'undefined') {\n Helpers.init();\n if (Helpers.isMobileDevice() && window.chrome) {\n document.documentElement.classList.add('layout-menu-100vh');\n }\n\n // Update layout after page load\n if (document.readyState === 'complete') Helpers.update();else document.addEventListener('DOMContentLoaded', function onContentLoaded() {\n Helpers.update();\n document.removeEventListener('DOMContentLoaded', onContentLoaded);\n });\n}\n\n// ---\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9qcy9oZWxwZXJzLmpzLmpzIiwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7OztBQUFBO0FBQ0EsSUFBTUEsWUFBWSxHQUFHLENBQUMsZUFBZSxFQUFFLHFCQUFxQixFQUFFLGdCQUFnQixDQUFDO0FBQy9FLElBQU1DLGdCQUFnQixHQUFHLENBQUMsWUFBWSxFQUFFLGVBQWUsRUFBRSxrQkFBa0IsRUFBRSxrQkFBa0IsRUFBRSxhQUFhLENBQUM7QUFDL0csSUFBTUMsYUFBYSwyU0FVakI7O0FBRUY7QUFDQSxTQUFTQyxhQUFhLENBQUNDLElBQUksRUFBRTtFQUMzQixNQUFNLElBQUlDLEtBQUssNkJBQXNCRCxJ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XhlZCAmJiBvZmZjYW52YXMpIHtcclxuICAgICAgdGhpcy5fYWRkQ2xhc3MoJ2xheW91dC1tZW51LW9mZmNhbnZhcycpXHJcbiAgICB9IGVsc2UgaWYgKGZpeGVkICYmICFvZmZjYW52YXMpIHtcclxuICAgICAgdGhpcy5fYWRkQ2xhc3MoJ2xheW91dC1tZW51LWZpeGVkJylcclxuICAgICAgdGhpcy5fcmVkcmF3TGF5b3V0TWVudSgpXHJcbiAgICB9IGVsc2UgaWYgKGZpeGVkICYmIG9mZmNhbnZhcykge1xyXG4gICAgICB0aGlzLl9hZGRDbGFzcygnbGF5b3V0LW1lbnUtZml4ZWQtb2ZmY2FudmFzJylcclxuICAgICAgdGhpcy5fcmVkcmF3TGF5b3V0TWVudSgpXHJcbiAgICB9XHJcblxyXG4gICAgdGhpcy51cGRhdGUoKVxyXG4gIH0sXHJcblxyXG4gIC8vICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKipcclxuICAvLyAqIEdldHRlcnNcclxuXHJcbiAgZ2V0TGF5b3V0TWVudSgpIHtcclxuICAgIHJldHVybiBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcubGF5b3V0LW1lbnUnKVxyXG4gIH0sXHJcblxyXG4gIGdldE1lbnUoKSB7XHJcbiAgICBjb25zdCBsYXlvdXRNZW51ID0gdGhpcy5nZXRMYXlvdXRNZW51KClcclxuXHJcbiAgICBpZiAoIWxheW91dE1lbnUpIHJldHVybiBudWxsXHJcblxyXG4gICAgcmV0dXJuICF0aGlzLl9oYXNDbGFzcygnbWVudScsIGxheW91dE1lbnUpID8gbGF5b3V0TWVudS5xdWVyeVNlbGVjdG9yKCcubWVudScpIDogbGF5b3V0TWVudVxyXG4gIH0sXHJcblxyXG4gIGdldExheW91dE5hdmJhcigpIHtcclxuICAgIHJldHVybiBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcubGF5b3V0LW5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gICAgIGxldCBsaXN0ZW5pbmcgPSBmYWxzZVxyXG4gICAgICAgICAgZWwuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLCAoKSA9PiB7XHJcbiAgICAgICAgICAgIGVsLmNsb3Nlc3QoJy5pbnB1dC1ncm91cCcpLnF1ZXJ5U2VsZWN0b3IoJy5mb3JtLWNvbnRyb2wnKS5mb2N1cygpXHJcbiAgICAgICAgICAgIHJlY29nbml0aW9uLm9uc3BlZWNoc3RhcnQgPSAoKSA9PiB7XHJcbiAgICAgICAgICAgICAgbGlzdGVuaW5nID0gdHJ1ZVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmIChsaXN0ZW5pbmcgPT09IGZhbHNlKSB7XHJcbiAgICAgICAgICAgICAgcmVjb2duaXRpb24uc3RhcnQoKVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHJlY29nbml0aW9uLm9uZXJyb3IgPSAoKSA9PiB7XHJcbiAgICAgICAgICAgICAgbGlzdGVuaW5nID0gZmFsc2VcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICByZWNvZ25pdGlvbi5vbnJlc3VsdCA9IGV2ZW50ID0+IHtcclxuICAgICAgICAgICAgICBlbC5jbG9zZXN0KCcuaW5wdXQtZ3JvdXAnKS5xdWVyeVNlbGVjdG9yKCcuZm9ybS1jb250cm9sJykudmFsdWUgPSBldmVudC5yZXN1bHRzWzBdWzBdLnRyYW5zY3JpcHRcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICByZWNvZ25pdGlvbi5vbnNwZWVjaGVuZCA9ICgpID0+IHtcclxuICAgICAgICAgICAgICBsaXN0ZW5pbmcgPSBmYWxzZVxyXG4gICAgICAgICAgICAgIHJlY29nbml0aW9uLnN0b3AoKVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICB9KVxyXG4gICAgICAgIH0pXHJcbiAgICAgIH1cclxuICAgIH1cclxuICB9LFxyXG5cclxuICAvLyAtLS1cclx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lwZW9mIG92ZXJsYXkgIT09ICd1bmRlZmluZWQnICYmXHJcbiAgICAgICAgICAgIG92ZXJsYXkgIT09IG51bGwgJiZcclxuICAgICAgICAgICAgb3ZlcmxheSAhPT0gZmFsc2UgJiZcclxuICAgICAgICAgICAgdHlwZW9mIGFwcE92ZXJsYXkgIT09ICd1bmRlZmluZWQnXHJcbiAgICAgICAgICApIHtcclxuICAgICAgICAgICAgaWYgKHRlbC5jbGFzc0xpc3QuY29udGFpbnMoJ3Nob3cnKSkge1xyXG4gICAgICAgICAgICAgIGFwcE92ZXJsYXlbMF0uY2xhc3NMaXN0LmFkZCgnc2hvdycpXHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgYXBwT3ZlcmxheVswXS5jbGFzc0xpc3QucmVtb3ZlKCdzaG93JylcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBhcHBPdmVybGF5WzBdLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJywgZSA9PiB7XHJcbiAgICAgICAgICAgICAgZS5jdXJyZW50VGFyZ2V0LmNsYXNzTGlzdC5yZW1vdmUoJ3Nob3cnKVxyXG4gICAgICAgICAgICAgIHRlbC5jbGFzc0xpc3QucmVtb3ZlKCdzaG93JylcclxuICAgICAgICAgICAgfSlcclxuICAgICAgICAgIH1cclxuICAgICAgICB9KVxyXG4gICAgICB9KVxyXG4gICAgfSlcclxuICB9XHJcbn1cclxuXHJcbi8vICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKipcclxuLy8gKiBJbml0aWFsaXphdGlvblxyXG5cclxuaWYgKHR5cGVvZiB3aW5kb3cgIT09ICd1bmRlZmluZWQnKSB7XHJcbiAgSGVscGVycy5pbml0KClcclxuXHJcbiAgaWYgKEhlbHBlcnMuaXNNb2JpbGVEZXZpY2UoKSAmJiB3aW5kb3cuY2hyb21lKSB7XHJcbiAgICB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sImluaXRTaWRlYmFyVG9nZ2xlIiwic2lkZWJhclRvZ2dsZXIiLCJvdmVybGF5IiwiYXBwT3ZlcmxheSIsInRlbCIsInRvZ2dsZSIsImN1cnJlbnRUYXJnZXQiLCJjaHJvbWUiLCJyZWFkeVN0YXRlIiwib25Db250ZW50TG9hZGVkIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./js/helpers.js\n"); - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The require scope -/******/ var __webpack_require__ = {}; -/******/ -/************************************************************************/ -/******/ /* webpack/runtime/define property getters */ -/******/ !function() { -/******/ // define getter functions for harmony exports -/******/ __webpack_require__.d = function(exports, definition) { -/******/ for(var key in definition) { -/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); -/******/ } -/******/ } -/******/ }; -/******/ }(); -/******/ -/******/ /* webpack/runtime/hasOwnProperty shorthand */ -/******/ !function() { -/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } -/******/ }(); -/******/ -/******/ /* webpack/runtime/make namespace object */ -/******/ !function() { -/******/ // define __esModule on exports -/******/ __webpack_require__.r = function(exports) { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ }(); -/******/ -/************************************************************************/ -/******/ -/******/ // startup -/******/ // Load entry module and return exports -/******/ // This entry module can't be inlined because the eval-source-map devtool is used. -/******/ var __webpack_exports__ = {}; -/******/ __webpack_modules__["./js/helpers.js"](0, __webpack_exports__, __webpack_require__); -/******/ -/******/ return __webpack_exports__; -/******/ })() -; -}); \ No newline at end of file +// Constants +const TRANS_EVENTS = ['transitionend', 'webkitTransitionEnd', 'oTransitionEnd'] +const TRANS_PROPERTIES = ['transition', 'MozTransition', 'webkitTransition', 'WebkitTransition', 'OTransition'] +const INLINE_STYLES = ` +.layout-menu-fixed .layout-navbar-full .layout-menu, +.layout-menu-fixed-offcanvas .layout-navbar-full .layout-menu { + top: {navbarHeight}px !important; +} +.layout-page { + padding-top: {navbarHeight}px !important; +} +.content-wrapper { + padding-bottom: {footerHeight}px !important; +}` + +// Guard +function requiredParam(name) { + throw new Error(`Parameter required${name ? `: \`${name}\`` : ''}`) +} + +const Helpers = { + // Root Element + ROOT_EL: typeof window !== 'undefined' ? document.documentElement : null, + + // Large screens breakpoint + LAYOUT_BREAKPOINT: 1200, + + // Resize delay in milliseconds + RESIZE_DELAY: 200, + + menuPsScroll: null, + + mainMenu: null, + + // Internal variables + _curStyle: null, + _styleEl: null, + _resizeTimeout: null, + _resizeCallback: null, + _transitionCallback: null, + _transitionCallbackTimeout: null, + _listeners: [], + _initialized: false, + _autoUpdate: false, + _lastWindowHeight: 0, + + // ******************************************************************************* + // * Utilities + + // --- + // Scroll To Active Menu Item + _scrollToActive(animate = false, duration = 500) { + const layoutMenu = this.getLayoutMenu() + + if (!layoutMenu) return + + let activeEl = layoutMenu.querySelector('li.menu-item.active:not(.open)') + + if (activeEl) { + // t = current time + // b = start value + // c = change in value + // d = duration + const easeInOutQuad = (t, b, c, d) => { + t /= d / 2 + if (t < 1) return (c / 2) * t * t + b + t -= 1 + return (-c / 2) * (t * (t - 2) - 1) + b + } + + const element = this.getLayoutMenu().querySelector('.menu-inner') + + if (typeof activeEl === 'string') { + activeEl = document.querySelector(activeEl) + } + if (typeof activeEl !== 'number') { + activeEl = activeEl.getBoundingClientRect().top + element.scrollTop + } + + // If active element's top position is less than 2/3 (66%) of menu height than do not scroll + if (activeEl < parseInt((element.clientHeight * 2) / 3, 10)) return + + const start = element.scrollTop + const change = activeEl - start - parseInt(element.clientHeight / 2, 10) + const startDate = +new Date() + + if (animate === true) { + const animateScroll = () => { + const currentDate = +new Date() + const currentTime = currentDate - startDate + const val = easeInOutQuad(currentTime, start, change, duration) + element.scrollTop = val + if (currentTime < duration) { + requestAnimationFrame(animateScroll) + } else { + element.scrollTop = change + } + } + animateScroll() + } else { + element.scrollTop = change + } + } + }, + + // --- + // Swipe In Gesture + _swipeIn(targetEl, callback) { + const { Hammer } = window + if (typeof Hammer !== 'undefined' && typeof targetEl === 'string') { + // Swipe menu gesture + const swipeInElement = document.querySelector(targetEl) + + if (swipeInElement) { + const hammerInstance = new Hammer(swipeInElement) + + hammerInstance.on('panright', callback) + } + } + }, + + // --- + // Swipe Out Gesture + _swipeOut(targetEl, callback) { + const { Hammer } = window + if (typeof Hammer !== 'undefined' && typeof targetEl === 'string') { + setTimeout(() => { + // Swipe menu gesture + const swipeOutElement = document.querySelector(targetEl) + + if (swipeOutElement) { + const hammerInstance = new Hammer(swipeOutElement) + + hammerInstance.get('pan').set({ direction: Hammer.DIRECTION_ALL, threshold: 250 }) + hammerInstance.on('panleft', callback) + } + }, 500) + } + }, + + // --- + // Swipe Out On Overlay Tap + _overlayTap(targetEl, callback) { + const { Hammer } = window + + if (typeof Hammer !== 'undefined' && typeof targetEl === 'string') { + // Swipe out overlay element + const swipeOutOverlayElement = document.querySelector(targetEl) + + if (swipeOutOverlayElement) { + const hammerInstance = new Hammer(swipeOutOverlayElement) + + hammerInstance.on('tap', callback) + } + } + }, + + // --- + // Add classes + _addClass(cls, el = this.ROOT_EL) { + if (el.length !== undefined) { + // Add classes to multiple elements + el.forEach(e => { + cls.split(' ').forEach(c => e.classList.add(c)) + }) + } else { + // Add classes to single element + cls.split(' ').forEach(c => el.classList.add(c)) + } + }, + + // --- + // Remove classes + _removeClass(cls, el = this.ROOT_EL) { + if (el.length !== undefined) { + // Remove classes to multiple elements + el.forEach(e => { + cls.split(' ').forEach(c => e.classList.remove(c)) + }) + } else { + // Remove classes to single element + cls.split(' ').forEach(c => el.classList.remove(c)) + } + }, + + // Toggle classes + _toggleClass(el = this.ROOT_EL, cls1, cls2) { + if (el.classList.contains(cls1)) { + el.classList.replace(cls1, cls2) + } else { + el.classList.replace(cls2, cls1) + } + }, + + // --- + // Has class + _hasClass(cls, el = this.ROOT_EL) { + let result = false + + cls.split(' ').forEach(c => { + if (el.classList.contains(c)) result = true + }) + + return result + }, + + _findParent(el, cls) { + if ((el && el.tagName.toUpperCase() === 'BODY') || el.tagName.toUpperCase() === 'HTML') return null + el = el.parentNode + while (el && el.tagName.toUpperCase() !== 'BODY' && !el.classList.contains(cls)) { + el = el.parentNode + } + el = el && el.tagName.toUpperCase() !== 'BODY' ? el : null + return el + }, + + // --- + // Trigger window event + _triggerWindowEvent(name) { + if (typeof window === 'undefined') return + + if (document.createEvent) { + let event + + if (typeof Event === 'function') { + event = new Event(name) + } else { + event = document.createEvent('Event') + event.initEvent(name, false, true) + } + + window.dispatchEvent(event) + } else { + window.fireEvent(`on${name}`, document.createEventObject()) + } + }, + + // --- + // Trigger event + _triggerEvent(name) { + this._triggerWindowEvent(`layout${name}`) + + this._listeners.filter(listener => listener.event === name).forEach(listener => listener.callback.call(null)) + }, + + // --- + // Update style + _updateInlineStyle(navbarHeight = 0, footerHeight = 0) { + if (!this._styleEl) { + this._styleEl = document.createElement('style') + this._styleEl.type = 'text/css' + document.head.appendChild(this._styleEl) + } + + const newStyle = INLINE_STYLES.replace(/\{navbarHeight\}/gi, navbarHeight).replace( + /\{footerHeight\}/gi, + footerHeight + ) + + if (this._curStyle !== newStyle) { + this._curStyle = newStyle + this._styleEl.textContent = newStyle + } + }, + + // --- + // Remove style + _removeInlineStyle() { + if (this._styleEl) document.head.removeChild(this._styleEl) + this._styleEl = null + this._curStyle = null + }, + + // --- + // Redraw layout menu (Safari bugfix) + _redrawLayoutMenu() { + const layoutMenu = this.getLayoutMenu() + + if (layoutMenu && layoutMenu.querySelector('.menu')) { + const inner = layoutMenu.querySelector('.menu-inner') + const { scrollTop } = inner + const pageScrollTop = document.documentElement.scrollTop + + layoutMenu.style.display = 'none' + // layoutMenu.offsetHeight + layoutMenu.style.display = '' + inner.scrollTop = scrollTop + document.documentElement.scrollTop = pageScrollTop + + return true + } + + return false + }, + + // --- + // Check for transition support + _supportsTransitionEnd() { + if (window.QUnit) return false + + const el = document.body || document.documentElement + + if (!el) return false + + let result = false + TRANS_PROPERTIES.forEach(evnt => { + if (typeof el.style[evnt] !== 'undefined') result = true + }) + + return result + }, + + // --- + // Calculate current navbar height + _getNavbarHeight() { + const layoutNavbar = this.getLayoutNavbar() + + if (!layoutNavbar) return 0 + if (!this.isSmallScreen()) return layoutNavbar.getBoundingClientRect().height + + // Needs some logic to get navbar height on small screens + + const clonedEl = layoutNavbar.cloneNode(true) + clonedEl.id = null + clonedEl.style.visibility = 'hidden' + clonedEl.style.position = 'absolute' + + Array.prototype.slice.call(clonedEl.querySelectorAll('.collapse.show')).forEach(el => this._removeClass('show', el)) + + layoutNavbar.parentNode.insertBefore(clonedEl, layoutNavbar) + + const navbarHeight = clonedEl.getBoundingClientRect().height + + clonedEl.parentNode.removeChild(clonedEl) + + return navbarHeight + }, + + // --- + // Get current footer height + _getFooterHeight() { + const layoutFooter = this.getLayoutFooter() + + if (!layoutFooter) return 0 + + return layoutFooter.getBoundingClientRect().height + }, + + // --- + // Get animation duration of element + _getAnimationDuration(el) { + const duration = window.getComputedStyle(el).transitionDuration + + return parseFloat(duration) * (duration.indexOf('ms') !== -1 ? 1 : 1000) + }, + + // --- + // Set menu hover state + _setMenuHoverState(hovered) { + this[hovered ? '_addClass' : '_removeClass']('layout-menu-hover') + }, + + // --- + // Toggle collapsed + _setCollapsed(collapsed) { + if (this.isSmallScreen()) { + if (collapsed) { + this._removeClass('layout-menu-expanded') + } else { + setTimeout( + () => { + this._addClass('layout-menu-expanded') + }, + this._redrawLayoutMenu() ? 5 : 0 + ) + } + } else { + this[collapsed ? '_addClass' : '_removeClass']('layout-menu-collapsed') + } + }, + + // --- + // Add layout sivenav toggle animationEnd event + _bindLayoutAnimationEndEvent(modifier, cb) { + const menu = this.getMenu() + const duration = menu ? this._getAnimationDuration(menu) + 50 : 0 + + if (!duration) { + modifier.call(this) + cb.call(this) + return + } + + this._transitionCallback = e => { + if (e.target !== menu) return + this._unbindLayoutAnimationEndEvent() + cb.call(this) + } + + TRANS_EVENTS.forEach(e => { + menu.addEventListener(e, this._transitionCallback, false) + }) + + modifier.call(this) + + this._transitionCallbackTimeout = setTimeout(() => { + this._transitionCallback.call(this, { target: menu }) + }, duration) + }, + + // --- + // Remove layout sivenav toggle animationEnd event + _unbindLayoutAnimationEndEvent() { + const menu = this.getMenu() + + if (this._transitionCallbackTimeout) { + clearTimeout(this._transitionCallbackTimeout) + this._transitionCallbackTimeout = null + } + + if (menu && this._transitionCallback) { + TRANS_EVENTS.forEach(e => { + menu.removeEventListener(e, this._transitionCallback, false) + }) + } + + if (this._transitionCallback) { + this._transitionCallback = null + } + }, + + // --- + // Bind delayed window resize event + _bindWindowResizeEvent() { + this._unbindWindowResizeEvent() + + const cb = () => { + if (this._resizeTimeout) { + clearTimeout(this._resizeTimeout) + this._resizeTimeout = null + } + this._triggerEvent('resize') + } + + this._resizeCallback = () => { + if (this._resizeTimeout) clearTimeout(this._resizeTimeout) + this._resizeTimeout = setTimeout(cb, this.RESIZE_DELAY) + } + + window.addEventListener('resize', this._resizeCallback, false) + }, + + // --- + // Unbind delayed window resize event + _unbindWindowResizeEvent() { + if (this._resizeTimeout) { + clearTimeout(this._resizeTimeout) + this._resizeTimeout = null + } + + if (this._resizeCallback) { + window.removeEventListener('resize', this._resizeCallback, false) + this._resizeCallback = null + } + }, + + _bindMenuMouseEvents() { + if (this._menuMouseEnter && this._menuMouseLeave && this._windowTouchStart) return + + const layoutMenu = this.getLayoutMenu() + if (!layoutMenu) return this._unbindMenuMouseEvents() + + if (!this._menuMouseEnter) { + this._menuMouseEnter = () => { + if ( + this.isSmallScreen() || + !this._hasClass('layout-menu-collapsed') || + this.isOffcanvas() || + this._hasClass('layout-transitioning') + ) { + return this._setMenuHoverState(false) + } + + return this._setMenuHoverState(true) + } + layoutMenu.addEventListener('mouseenter', this._menuMouseEnter, false) + layoutMenu.addEventListener('touchstart', this._menuMouseEnter, false) + } + + if (!this._menuMouseLeave) { + this._menuMouseLeave = () => { + this._setMenuHoverState(false) + } + layoutMenu.addEventListener('mouseleave', this._menuMouseLeave, false) + } + + if (!this._windowTouchStart) { + this._windowTouchStart = e => { + if (!e || !e.target || !this._findParent(e.target, '.layout-menu')) { + this._setMenuHoverState(false) + } + } + window.addEventListener('touchstart', this._windowTouchStart, true) + } + }, + + _unbindMenuMouseEvents() { + if (!this._menuMouseEnter && !this._menuMouseLeave && !this._windowTouchStart) return + + const layoutMenu = this.getLayoutMenu() + + if (this._menuMouseEnter) { + if (layoutMenu) { + layoutMenu.removeEventListener('mouseenter', this._menuMouseEnter, false) + layoutMenu.removeEventListener('touchstart', this._menuMouseEnter, false) + } + this._menuMouseEnter = null + } + + if (this._menuMouseLeave) { + if (layoutMenu) { + layoutMenu.removeEventListener('mouseleave', this._menuMouseLeave, false) + } + this._menuMouseLeave = null + } + + if (this._windowTouchStart) { + if (layoutMenu) { + window.addEventListener('touchstart', this._windowTouchStart, true) + } + this._windowTouchStart = null + } + + this._setMenuHoverState(false) + }, + + // ******************************************************************************* + // * Methods + + scrollToActive(animate = false) { + this._scrollToActive(animate) + }, + + swipeIn(el, callback) { + this._swipeIn(el, callback) + }, + + swipeOut(el, callback) { + this._swipeOut(el, callback) + }, + + overlayTap(el, callback) { + this._overlayTap(el, callback) + }, + + scrollPageTo(to, duration = 500) { + // t = current time + // b = start value + // c = change in value + // d = duration + const easeInOutQuad = (t, b, c, d) => { + t /= d / 2 + if (t < 1) return (c / 2) * t * t + b + t -= 1 + return (-c / 2) * (t * (t - 2) - 1) + b + } + + const element = document.scrollingElement + + if (typeof to === 'string') { + to = document.querySelector(to) + } + if (typeof to !== 'number') { + to = to.getBoundingClientRect().top + element.scrollTop + } + + const start = element.scrollTop + const change = to - start + const startDate = +new Date() + // const increment = 20 + + const animateScroll = () => { + const currentDate = +new Date() + const currentTime = currentDate - startDate + const val = easeInOutQuad(currentTime, start, change, duration) + element.scrollTop = val + if (currentTime < duration) { + requestAnimationFrame(animateScroll) + } else { + element.scrollTop = to + } + } + animateScroll() + }, + + // --- + // Collapse / expand layout + setCollapsed(collapsed = requiredParam('collapsed'), animate = true) { + const layoutMenu = this.getLayoutMenu() + + if (!layoutMenu) return + + this._unbindLayoutAnimationEndEvent() + + if (animate && this._supportsTransitionEnd()) { + this._addClass('layout-transitioning') + if (collapsed) this._setMenuHoverState(false) + + this._bindLayoutAnimationEndEvent( + () => { + // Collapse / Expand + this._setCollapsed(collapsed) + }, + () => { + this._removeClass('layout-transitioning') + this._triggerWindowEvent('resize') + this._triggerEvent('toggle') + this._setMenuHoverState(false) + } + ) + } else { + this._addClass('layout-no-transition') + if (collapsed) this._setMenuHoverState(false) + + // Collapse / Expand + this._setCollapsed(collapsed) + + setTimeout(() => { + this._removeClass('layout-no-transition') + this._triggerWindowEvent('resize') + this._triggerEvent('toggle') + this._setMenuHoverState(false) + }, 1) + } + }, + + // --- + // Toggle layout + toggleCollapsed(animate = true) { + this.setCollapsed(!this.isCollapsed(), animate) + }, + + // --- + // Set layout positioning + setPosition(fixed = requiredParam('fixed'), offcanvas = requiredParam('offcanvas')) { + this._removeClass('layout-menu-offcanvas layout-menu-fixed layout-menu-fixed-offcanvas') + + if (!fixed && offcanvas) { + this._addClass('layout-menu-offcanvas') + } else if (fixed && !offcanvas) { + this._addClass('layout-menu-fixed') + this._redrawLayoutMenu() + } else if (fixed && offcanvas) { + this._addClass('layout-menu-fixed-offcanvas') + this._redrawLayoutMenu() + } + + this.update() + }, + + // ******************************************************************************* + // * Getters + + getLayoutMenu() { + return document.querySelector('.layout-menu') + }, + + getMenu() { + const layoutMenu = this.getLayoutMenu() + + if (!layoutMenu) return null + + return !this._hasClass('menu', layoutMenu) ? layoutMenu.querySelector('.menu') : layoutMenu + }, + + getLayoutNavbar() { + return document.querySelector('.layout-navbar') + }, + + getLayoutFooter() { + return document.querySelector('.content-footer') + }, + + getLayoutContainer() { + return document.querySelector('.layout-page') + }, + + // ******************************************************************************* + // * Setters + + setNavbarFixed(fixed = requiredParam('fixed')) { + this[fixed ? '_addClass' : '_removeClass']('layout-navbar-fixed') + this.update() + }, + + setFooterFixed(fixed = requiredParam('fixed')) { + this[fixed ? '_addClass' : '_removeClass']('layout-footer-fixed') + this.update() + }, + + setFlipped(reversed = requiredParam('reversed')) { + this[reversed ? '_addClass' : '_removeClass']('layout-menu-flipped') + }, + + // ******************************************************************************* + // * Update + + update() { + if ( + (this.getLayoutNavbar() && + ((!this.isSmallScreen() && this.isLayoutNavbarFull() && this.isFixed()) || this.isNavbarFixed())) || + (this.getLayoutFooter() && this.isFooterFixed()) + ) { + this._updateInlineStyle(this._getNavbarHeight(), this._getFooterHeight()) + } + + this._bindMenuMouseEvents() + }, + + setAutoUpdate(enable = requiredParam('enable')) { + if (enable && !this._autoUpdate) { + this.on('resize.Helpers:autoUpdate', () => this.update()) + this._autoUpdate = true + } else if (!enable && this._autoUpdate) { + this.off('resize.Helpers:autoUpdate') + this._autoUpdate = false + } + }, + + // Update custom option based on element + updateCustomOptionCheck(el) { + if (el.checked) { + // If custom option element is radio, remove checked from the siblings (closest `.row`) + if (el.type === 'radio') { + const customRadioOptionList = [].slice.call(el.closest('.row').querySelectorAll('.custom-option')) + customRadioOptionList.map(function (customRadioOptionEL) { + customRadioOptionEL.closest('.custom-option').classList.remove('checked') + }) + } + el.closest('.custom-option').classList.add('checked') + } else { + el.closest('.custom-option').classList.remove('checked') + } + }, + + // ******************************************************************************* + // * Tests + + isRtl() { + return ( + document.querySelector('body').getAttribute('dir') === 'rtl' || + document.querySelector('html').getAttribute('dir') === 'rtl' + ) + }, + + isMobileDevice() { + return typeof window.orientation !== 'undefined' || navigator.userAgent.indexOf('IEMobile') !== -1 + }, + + isSmallScreen() { + return ( + (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) < this.LAYOUT_BREAKPOINT + ) + }, + + isLayoutNavbarFull() { + return !!document.querySelector('.layout-wrapper.layout-navbar-full') + }, + + isCollapsed() { + if (this.isSmallScreen()) { + return !this._hasClass('layout-menu-expanded') + } + return this._hasClass('layout-menu-collapsed') + }, + + isFixed() { + return this._hasClass('layout-menu-fixed layout-menu-fixed-offcanvas') + }, + + isOffcanvas() { + return this._hasClass('layout-menu-offcanvas layout-menu-fixed-offcanvas') + }, + + isNavbarFixed() { + return ( + this._hasClass('layout-navbar-fixed') || (!this.isSmallScreen() && this.isFixed() && this.isLayoutNavbarFull()) + ) + }, + + isFooterFixed() { + return this._hasClass('layout-footer-fixed') + }, + + isFlipped() { + return this._hasClass('layout-menu-flipped') + }, + + isLightStyle() { + return document.documentElement.classList.contains('light-style') + }, + + isDarkStyle() { + return document.documentElement.classList.contains('dark-style') + }, + + // ******************************************************************************* + // * Events + + on(event = requiredParam('event'), callback = requiredParam('callback')) { + const [_event] = event.split('.') + let [, ...namespace] = event.split('.') + // let [_event, ...namespace] = event.split('.') + namespace = namespace.join('.') || null + + this._listeners.push({ event: _event, namespace, callback }) + }, + + off(event = requiredParam('event')) { + const [_event] = event.split('.') + let [, ...namespace] = event.split('.') + namespace = namespace.join('.') || null + + this._listeners + .filter(listener => listener.event === _event && listener.namespace === namespace) + .forEach(listener => this._listeners.splice(this._listeners.indexOf(listener), 1)) + }, + + // ******************************************************************************* + // * Life cycle + + init() { + if (this._initialized) return + this._initialized = true + + // Initialize `style` element + this._updateInlineStyle(0) + + // Bind window resize event + this._bindWindowResizeEvent() + + // Bind init event + this.off('init._Helpers') + this.on('init._Helpers', () => { + this.off('resize._Helpers:redrawMenu') + this.on('resize._Helpers:redrawMenu', () => { + // eslint-disable-next-line no-unused-expressions + this.isSmallScreen() && !this.isCollapsed() && this._redrawLayoutMenu() + }) + + // Force repaint in IE 10 + if (typeof document.documentMode === 'number' && document.documentMode < 11) { + this.off('resize._Helpers:ie10RepaintBody') + this.on('resize._Helpers:ie10RepaintBody', () => { + if (this.isFixed()) return + const { scrollTop } = document.documentElement + document.body.style.display = 'none' + // document.body.offsetHeight + document.body.style.display = 'block' + document.documentElement.scrollTop = scrollTop + }) + } + }) + + this._triggerEvent('init') + }, + + destroy() { + if (!this._initialized) return + this._initialized = false + + this._removeClass('layout-transitioning') + this._removeInlineStyle() + this._unbindLayoutAnimationEndEvent() + this._unbindWindowResizeEvent() + this._unbindMenuMouseEvents() + this.setAutoUpdate(false) + + this.off('init._Helpers') + + // Remove all listeners except `init` + this._listeners + .filter(listener => listener.event !== 'init') + .forEach(listener => this._listeners.splice(this._listeners.indexOf(listener), 1)) + }, + + // --- + // Init Password Toggle + initPasswordToggle() { + const toggler = document.querySelectorAll('.form-password-toggle i') + if (typeof toggler !== 'undefined' && toggler !== null) { + toggler.forEach(el => { + el.addEventListener('click', e => { + e.preventDefault() + const formPasswordToggle = el.closest('.form-password-toggle') + const formPasswordToggleIcon = formPasswordToggle.querySelector('i') + const formPasswordToggleInput = formPasswordToggle.querySelector('input') + + if (formPasswordToggleInput.getAttribute('type') === 'text') { + formPasswordToggleInput.setAttribute('type', 'password') + formPasswordToggleIcon.classList.replace('bx-show', 'bx-hide') + } else if (formPasswordToggleInput.getAttribute('type') === 'password') { + formPasswordToggleInput.setAttribute('type', 'text') + formPasswordToggleIcon.classList.replace('bx-hide', 'bx-show') + } + }) + }) + } + }, + + //-- + // Init custom option check + initCustomOptionCheck() { + const _this = this + + const custopOptionList = [].slice.call(document.querySelectorAll('.custom-option .form-check-input')) + custopOptionList.map(function (customOptionEL) { + // Update custom options check on page load + _this.updateCustomOptionCheck(customOptionEL) + + // Update custom options check on click + customOptionEL.addEventListener('click', e => { + _this.updateCustomOptionCheck(customOptionEL) + }) + }) + }, + + // --- + // Init Speech To Text + initSpeechToText() { + const SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition + const speechToText = document.querySelectorAll('.speech-to-text') + if (SpeechRecognition !== undefined && SpeechRecognition !== null) { + if (typeof speechToText !== 'undefined' && speechToText !== null) { + const recognition = new SpeechRecognition() + const toggler = document.querySelectorAll('.speech-to-text i') + toggler.forEach(el => { + let listening = false + el.addEventListener('click', () => { + el.closest('.input-group').querySelector('.form-control').focus() + recognition.onspeechstart = () => { + listening = true + } + if (listening === false) { + recognition.start() + } + recognition.onerror = () => { + listening = false + } + recognition.onresult = event => { + el.closest('.input-group').querySelector('.form-control').value = event.results[0][0].transcript + } + recognition.onspeechend = () => { + listening = false + recognition.stop() + } + }) + }) + } + } + }, + + // --- + // Init Navbar Dropdown (i.e notification) PerfectScrollbar + initNavbarDropdownScrollbar() { + const scrollbarContainer = document.querySelectorAll('.navbar-dropdown .scrollable-container') + const { PerfectScrollbar } = window + + if (PerfectScrollbar !== undefined) { + if (typeof scrollbarContainer !== 'undefined' && scrollbarContainer !== null) { + scrollbarContainer.forEach(el => { + // eslint-disable-next-line no-new + new PerfectScrollbar(el, { + wheelPropagation: false, + suppressScrollX: true + }) + }) + } + } + }, + + // Ajax Call Promise + ajaxCall(url) { + return new Promise((resolve, reject) => { + const req = new XMLHttpRequest() + req.open('GET', url) + req.onload = () => (req.status === 200 ? resolve(req.response) : reject(Error(req.statusText))) + req.onerror = e => reject(Error(`Network Error: ${e}`)) + req.send() + }) + }, + + // --- + // SidebarToggle (Used in Apps) + initSidebarToggle() { + const sidebarToggler = document.querySelectorAll('[data-bs-toggle="sidebar"]') + + sidebarToggler.forEach(el => { + el.addEventListener('click', () => { + const target = el.getAttribute('data-target') + const overlay = el.getAttribute('data-overlay') + const appOverlay = document.querySelectorAll('.app-overlay') + const targetEl = document.querySelectorAll(target) + + targetEl.forEach(tel => { + tel.classList.toggle('show') + if ( + typeof overlay !== 'undefined' && + overlay !== null && + overlay !== false && + typeof appOverlay !== 'undefined' + ) { + if (tel.classList.contains('show')) { + appOverlay[0].classList.add('show') + } else { + appOverlay[0].classList.remove('show') + } + appOverlay[0].addEventListener('click', e => { + e.currentTarget.classList.remove('show') + tel.classList.remove('show') + }) + } + }) + }) + }) + } +} + +// ******************************************************************************* +// * Initialization + +if (typeof window !== 'undefined') { + Helpers.init() + + if (Helpers.isMobileDevice() && window.chrome) { + document.documentElement.classList.add('layout-menu-100vh') + } + + // Update layout after page load + if (document.readyState === 'complete') Helpers.update() + else + document.addEventListener('DOMContentLoaded', function onContentLoaded() { + Helpers.update() + document.removeEventListener('DOMContentLoaded', onContentLoaded) + }) +} + +window.Helpers = Helpers; diff --git a/src/main/webapp/resources/3rd-party/sneat/js/mega-dropdown.js b/src/main/webapp/resources/3rd-party/sneat/js/mega-dropdown.js deleted file mode 100644 index 5fc981ed..00000000 --- a/src/main/webapp/resources/3rd-party/sneat/js/mega-dropdown.js +++ /dev/null @@ -1,78 +0,0 @@ -/* - * ATTENTION: An "eval-source-map" devtool has been used. - * This devtool is neither made for production nor for readable output files. - * It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools. - * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) - * or disable the default devtool with "devtool: false". - * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). - */ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define([], factory); - else { - var a = factory(); - for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i]; - } -})(self, function() { -return /******/ (function() { // webpackBootstrap -/******/ "use strict"; -/******/ var __webpack_modules__ = ({ - -/***/ "./js/mega-dropdown.js": -/*!*****************************!*\ - !*** ./js/mega-dropdown.js ***! - \*****************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"MegaDropdown\": function() { return /* binding */ MegaDropdown; }\n/* harmony export */ });\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar TIMEOUT = 150;\nvar MegaDropdown = /*#__PURE__*/function () {\n function MegaDropdown(element) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n _classCallCheck(this, MegaDropdown);\n this._onHover = options.trigger === 'hover' || element.getAttribute('data-trigger') === 'hover';\n this._container = MegaDropdown._findParent(element, 'mega-dropdown');\n if (!this._container) return;\n this._menu = this._container.querySelector('.dropdown-toggle ~ .dropdown-menu');\n if (!this._menu) return;\n element.setAttribute('aria-expanded', 'false');\n this._el = element;\n this._bindEvents();\n }\n _createClass(MegaDropdown, [{\n key: \"open\",\n value: function open() {\n if (this._timeout) {\n clearTimeout(this._timeout);\n this._timeout = null;\n }\n if (this._focusTimeout) {\n clearTimeout(this._focusTimeout);\n this._focusTimeout = null;\n }\n if (this._el.getAttribute('aria-expanded') !== 'true') {\n this._triggerEvent('show');\n this._container.classList.add('show');\n this._menu.classList.add('show');\n this._el.setAttribute('aria-expanded', 'true');\n this._el.focus();\n this._triggerEvent('shown');\n }\n }\n }, {\n key: \"close\",\n value: function close(force) {\n var _this = this;\n if (this._timeout) {\n clearTimeout(this._timeout);\n this._timeout = null;\n }\n if (this._focusTimeout) {\n clearTimeout(this._focusTimeout);\n this._focusTimeout = null;\n }\n if (this._onHover && !force) {\n this._timeout = setTimeout(function () {\n if (_this._timeout) {\n clearTimeout(_this._timeout);\n _this._timeout = null;\n }\n _this._close();\n }, TIMEOUT);\n } else {\n this._close();\n }\n }\n }, {\n key: \"toggle\",\n value: function toggle() {\n // eslint-disable-next-line no-unused-expressions\n this._el.getAttribute('aria-expanded') === 'true' ? this.close(true) : this.open();\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n this._unbindEvents();\n this._el = null;\n if (this._timeout) {\n clearTimeout(this._timeout);\n this._timeout = null;\n }\n if (this._focusTimeout) {\n clearTimeout(this._focusTimeout);\n this._focusTimeout = null;\n }\n }\n }, {\n key: \"_close\",\n value: function _close() {\n if (this._el.getAttribute('aria-expanded') === 'true') {\n this._triggerEvent('hide');\n this._container.classList.remove('show');\n this._menu.classList.remove('show');\n this._el.setAttribute('aria-expanded', 'false');\n this._triggerEvent('hidden');\n }\n }\n }, {\n key: \"_bindEvents\",\n value: function _bindEvents() {\n var _this2 = this;\n this._elClickEvnt = function (e) {\n e.preventDefault();\n _this2.toggle();\n };\n this._el.addEventListener('click', this._elClickEvnt);\n this._bodyClickEvnt = function (e) {\n if (!_this2._container.contains(e.target) && _this2._container.classList.contains('show')) {\n _this2.close(true);\n }\n };\n document.body.addEventListener('click', this._bodyClickEvnt, true);\n this._menuClickEvnt = function (e) {\n if (e.target.classList.contains('mega-dropdown-link')) {\n _this2.close(true);\n }\n };\n this._menu.addEventListener('click', this._menuClickEvnt, true);\n this._focusoutEvnt = function () {\n if (_this2._focusTimeout) {\n clearTimeout(_this2._focusTimeout);\n _this2._focusTimeout = null;\n }\n if (_this2._el.getAttribute('aria-expanded') !== 'true') return;\n _this2._focusTimeout = setTimeout(function () {\n if (document.activeElement.tagName.toUpperCase() !== 'BODY' && MegaDropdown._findParent(document.activeElement, 'mega-dropdown') !== _this2._container) {\n _this2.close(true);\n }\n }, 100);\n };\n this._container.addEventListener('focusout', this._focusoutEvnt, true);\n if (this._onHover) {\n this._enterEvnt = function () {\n if (window.getComputedStyle(_this2._menu, null).getPropertyValue('position') === 'static') return;\n _this2.open();\n };\n this._leaveEvnt = function () {\n if (window.getComputedStyle(_this2._menu, null).getPropertyValue('position') === 'static') return;\n _this2.close();\n };\n this._el.addEventListener('mouseenter', this._enterEvnt);\n this._menu.addEventListener('mouseenter', this._enterEvnt);\n this._el.addEventListener('mouseleave', this._leaveEvnt);\n this._menu.addEventListener('mouseleave', this._leaveEvnt);\n }\n }\n }, {\n key: \"_unbindEvents\",\n value: function _unbindEvents() {\n if (this._elClickEvnt) {\n this._el.removeEventListener('click', this._elClickEvnt);\n this._elClickEvnt = null;\n }\n if (this._bodyClickEvnt) {\n document.body.removeEventListener('click', this._bodyClickEvnt, true);\n this._bodyClickEvnt = null;\n }\n if (this._menuClickEvnt) {\n this._menu.removeEventListener('click', this._menuClickEvnt, true);\n this._menuClickEvnt = null;\n }\n if (this._focusoutEvnt) {\n this._container.removeEventListener('focusout', this._focusoutEvnt, true);\n this._focusoutEvnt = null;\n }\n if (this._enterEvnt) {\n this._el.removeEventListener('mouseenter', this._enterEvnt);\n this._menu.removeEventListener('mouseenter', this._enterEvnt);\n this._enterEvnt = null;\n }\n if (this._leaveEvnt) {\n this._el.removeEventListener('mouseleave', this._leaveEvnt);\n this._menu.removeEventListener('mouseleave', this._leaveEvnt);\n this._leaveEvnt = null;\n }\n }\n }, {\n key: \"_triggerEvent\",\n value: function _triggerEvent(event) {\n if (document.createEvent) {\n var customEvent;\n if (typeof Event === 'function') {\n customEvent = new Event(event);\n } else {\n customEvent = document.createEvent('Event');\n customEvent.initEvent(event, false, true);\n }\n this._container.dispatchEvent(customEvent);\n } else {\n this._container.fireEvent(\"on\".concat(event), document.createEventObject());\n }\n }\n }], [{\n key: \"_findParent\",\n value: function _findParent(el, cls) {\n if (el.tagName.toUpperCase() === 'BODY') return null;\n el = el.parentNode;\n while (el.tagName.toUpperCase() !== 'BODY' && !el.classList.contains(cls)) {\n el = el.parentNode;\n }\n return el.tagName.toUpperCase() !== 'BODY' ? el : null;\n }\n }]);\n return MegaDropdown;\n}();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9qcy9tZWdhLWRyb3Bkb3duLmpzLmpzIiwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFBQSxJQUFNQSxPQUFPLEdBQUcsR0FBRztBQUFBLElBRWJDLFlBQVk7RUFDaEIsc0JBQVlDLE9BQU8sRUFBZ0I7SUFBQSxJQUFkQyxPQUFPLHVFQUFHLENBQUMsQ0FBQztJQUFBO0lBQy9CLElBQUksQ0FBQ0MsUUFBUSxHQUFHRCxPQUFPLENBQUNFLE9BQU8sS0FBSyxPQUFPLElBQUlILE9BQU8sQ0FBQ0ksWUFBWSxDQUFDLGNBQWMsQ0FBQyxLQUFLLE9BQU87SUFFL0YsSUFBSSxDQUFDQyxVQUFVLEdBQUdOLFlBQVksQ0FBQ08sV0FBVyxDQUFDTixPQUFPLEVBQUUsZUFBZSxDQUFDO0lBQ3BFLElBQUksQ0FBQyxJQUFJLENBQUNLLFVBQVUsRUFBRTtJQUV0QixJQUFJLENBQUNFLEtBQUssR0FBRyxJQUFJLENBQUNGLFVBQVUsQ0FBQ0csYUFBYSxDQUFDLG1DQUFtQyxDQUFDO0lBQy9FLElBQUksQ0FBQyxJQUFJLENBQUNELEtBQUssRUFBRTtJQUVqQlAsT0FBTyxDQUFDUyxZQUFZLENBQUMsZUFBZSxFQUFFLE9BQU8sQ0FBQztJQUU5QyxJQUFJLENBQUNDLEdBQUcs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GFpbnMiLCJ0YXJnZXQiLCJkb2N1bWVudCIsImJvZHkiLCJfbWVudUNsaWNrRXZudCIsIl9mb2N1c291dEV2bnQiLCJhY3RpdmVFbGVtZW50IiwidGFnTmFtZSIsInRvVXBwZXJDYXNlIiwiX2VudGVyRXZudCIsIndpbmRvdyIsImdldENvbXB1dGVkU3R5bGUiLCJnZXRQcm9wZXJ0eVZhbHVlIiwiX2xlYXZlRXZudCIsInJlbW92ZUV2ZW50TGlzdGVuZXIiLCJldmVudCIsImNyZWF0ZUV2ZW50IiwiY3VzdG9tRXZlbnQiLCJFdmVudCIsImluaXRFdmVudCIsImRpc3BhdGNoRXZlbnQiLCJmaXJlRXZlbnQiLCJjcmVhdGVFdmVudE9iamVjdCIsImVsIiwiY2xzIiwicGFyZW50Tm9kZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./js/mega-dropdown.js\n"); - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The require scope -/******/ var __webpack_require__ = {}; -/******/ -/************************************************************************/ -/******/ /* webpack/runtime/define property getters */ -/******/ !function() { -/******/ // define getter functions for harmony exports -/******/ __webpack_require__.d = function(exports, definition) { -/******/ for(var key in definition) { -/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); -/******/ } -/******/ } -/******/ }; -/******/ }(); -/******/ -/******/ /* webpack/runtime/hasOwnProperty shorthand */ -/******/ !function() { -/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } -/******/ }(); -/******/ -/******/ /* webpack/runtime/make namespace object */ -/******/ !function() { -/******/ // define __esModule on exports -/******/ __webpack_require__.r = function(exports) { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ }(); -/******/ -/************************************************************************/ -/******/ -/******/ // startup -/******/ // Load entry module and return exports -/******/ // This entry module can't be inlined because the eval-source-map devtool is used. -/******/ var __webpack_exports__ = {}; -/******/ __webpack_modules__["./js/mega-dropdown.js"](0, __webpack_exports__, __webpack_require__); -/******/ -/******/ return __webpack_exports__; -/******/ })() -; -}); \ No newline at end of file diff --git a/src/main/webapp/resources/3rd-party/sneat/js/menu.js b/src/main/webapp/resources/3rd-party/sneat/js/menu.js index 6bf28cba..ee039a80 100644 --- a/src/main/webapp/resources/3rd-party/sneat/js/menu.js +++ b/src/main/webapp/resources/3rd-party/sneat/js/menu.js @@ -1,78 +1,986 @@ -/* - * ATTENTION: An "eval-source-map" devtool has been used. - * This devtool is neither made for production nor for readable output files. - * It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools. - * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) - * or disable the default devtool with "devtool: false". - * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). - */ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define([], factory); - else { - var a = factory(); - for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i]; - } -})(self, function() { -return /******/ (function() { // webpackBootstrap -/******/ "use strict"; -/******/ var __webpack_modules__ = ({ - -/***/ "./js/menu.js": -/*!********************!*\ - !*** ./js/menu.js ***! - \********************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Menu\": function() { return /* binding */ Menu; }\n/* harmony export */ });\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar TRANSITION_EVENTS = ['transitionend', 'webkitTransitionEnd', 'oTransitionEnd'];\n// const TRANSITION_PROPERTIES = ['transition', 'MozTransition', 'webkitTransition', 'WebkitTransition', 'OTransition']\nvar DELTA = 5;\nvar Menu = /*#__PURE__*/function () {\n function Menu(el) {\n var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _PS = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n _classCallCheck(this, Menu);\n this._el = el;\n this._horizontal = config.orientation === 'horizontal';\n this._animate = config.animate !== false;\n this._accordion = config.accordion !== false;\n this._showDropdownOnHover = Boolean(config.showDropdownOnHover);\n this._closeChildren = Boolean(config.closeChildren);\n this._rtl = document.documentElement.getAttribute('dir') === 'rtl' || document.body.getAttribute('dir') === 'rtl';\n this._onOpen = config.onOpen || function () {};\n this._onOpened = config.onOpened || function () {};\n this._onClose = config.onClose || function () {};\n this._onClosed = config.onClosed || function () {};\n this._psScroll = null;\n this._topParent = null;\n this._menuBgClass = null;\n el.classList.add('menu');\n el.classList[this._animate ? 'remove' : 'add']('menu-no-animation');\n if (!this._horizontal) {\n el.classList.add('menu-vertical');\n el.classList.remove('menu-horizontal');\n var PerfectScrollbarLib = _PS || window.PerfectScrollbar;\n if (PerfectScrollbarLib) {\n this._scrollbar = new PerfectScrollbarLib(el.querySelector('.menu-inner'), {\n suppressScrollX: true,\n wheelPropagation: !Menu._hasClass('layout-menu-fixed layout-menu-fixed-offcanvas')\n });\n window.Helpers.menuPsScroll = this._scrollbar;\n } else {\n el.querySelector('.menu-inner').classList.add('overflow-auto');\n }\n } else {\n el.classList.add('menu-horizontal');\n el.classList.remove('menu-vertical');\n this._inner = el.querySelector('.menu-inner');\n var container = this._inner.parentNode;\n this._prevBtn = el.querySelector('.menu-horizontal-prev');\n if (!this._prevBtn) {\n this._prevBtn = document.createElement('a');\n this._prevBtn.href = '#';\n this._prevBtn.className = 'menu-horizontal-prev';\n container.appendChild(this._prevBtn);\n }\n this._wrapper = el.querySelector('.menu-horizontal-wrapper');\n if (!this._wrapper) {\n this._wrapper = document.createElement('div');\n this._wrapper.className = 'menu-horizontal-wrapper';\n this._wrapper.appendChild(this._inner);\n container.appendChild(this._wrapper);\n }\n this._nextBtn = el.querySelector('.menu-horizontal-next');\n if (!this._nextBtn) {\n this._nextBtn = document.createElement('a');\n this._nextBtn.href = '#';\n this._nextBtn.className = 'menu-horizontal-next';\n container.appendChild(this._nextBtn);\n }\n this._innerPosition = 0;\n this.update();\n }\n\n // Add data attribute for bg color class of menu\n var menuClassList = el.classList;\n for (var i = 0; i < menuClassList.length; i++) {\n if (menuClassList[i].startsWith('bg-')) {\n this._menuBgClass = menuClassList[i];\n }\n }\n el.setAttribute('data-bg-class', this._menuBgClass);\n\n // Switch to vertical menu on small screen for horizontal menu layout on page load\n if (this._horizontal && window.innerWidth < window.Helpers.LAYOUT_BREAKPOINT) this.switchMenu('vertical');\n this._bindEvents();\n\n // Link menu instance to element\n el.menuInstance = this;\n }\n _createClass(Menu, [{\n key: \"_bindEvents\",\n value: function _bindEvents() {\n var _this = this;\n // Click Event\n this._evntElClick = function (e) {\n // Find top parent element\n if (e.target.closest('ul') && e.target.closest('ul').classList.contains('menu-inner')) {\n var menuItem = Menu._findParent(e.target, 'menu-item', false);\n\n // eslint-disable-next-line prefer-destructuring\n if (menuItem) _this._topParent = menuItem.childNodes[0];\n }\n var toggleLink = e.target.classList.contains('menu-toggle') ? e.target : Menu._findParent(e.target, 'menu-toggle', false);\n if (toggleLink) {\n e.preventDefault();\n if (toggleLink.getAttribute('data-hover') !== 'true') {\n _this.toggle(toggleLink);\n }\n }\n };\n if (!this._showDropdownOnHover && this._horizontal || !this._horizontal || window.Helpers.isMobileDevice) this._el.addEventListener('click', this._evntElClick);\n this._evntWindowResize = function () {\n _this.update();\n if (_this._lastWidth !== window.innerWidth) {\n _this._lastWidth = window.innerWidth;\n _this.update();\n }\n var horizontalMenuTemplate = document.querySelector(\"[data-template^='horizontal-menu']\");\n if (!_this._horizontal && !horizontalMenuTemplate) _this.manageScroll();\n };\n window.addEventListener('resize', this._evntWindowResize);\n if (this._horizontal) {\n this._evntPrevBtnClick = function (e) {\n e.preventDefault();\n if (_this._prevBtn.classList.contains('disabled')) return;\n _this._slide('prev');\n };\n this._prevBtn.addEventListener('click', this._evntPrevBtnClick);\n this._evntNextBtnClick = function (e) {\n e.preventDefault();\n if (_this._nextBtn.classList.contains('disabled')) return;\n _this._slide('next');\n };\n this._nextBtn.addEventListener('click', this._evntNextBtnClick);\n this._evntBodyClick = function (e) {\n if (!_this._inner.contains(e.target) && _this._el.querySelectorAll('.menu-inner > .menu-item.open').length) _this.closeAll();\n };\n document.body.addEventListener('click', this._evntBodyClick);\n if (this._showDropdownOnHover) {\n /** ***********************************************\r\n * Horizontal Menu Mouse Over Event\r\n * ? e.target !== e.currentTarget condition to disable mouseover event on whole menu navbar\r\n * ? !e.target.parentNode.classList.contains('open') to disable mouseover events on icon, text and dropdown arrow\r\n */\n this._evntElMouseOver = function (e) {\n if (e.target !== e.currentTarget && !e.target.parentNode.classList.contains('open')) {\n var toggleLink = e.target.classList.contains('menu-toggle') ? e.target : null;\n if (toggleLink) {\n e.preventDefault();\n if (toggleLink.getAttribute('data-hover') !== 'true') {\n _this.toggle(toggleLink);\n }\n }\n }\n e.stopPropagation();\n };\n if (this._horizontal && window.screen.width > window.Helpers.LAYOUT_BREAKPOINT) {\n this._el.addEventListener('mouseover', this._evntElMouseOver);\n }\n\n /** ***********************************************\r\n * Horizontal Menu Mouse Out Event\r\n * ? e.target !== e.currentTarget condition to disable mouseout event on whole menu navbar\r\n * ? mouseOutEl.parentNode.classList.contains('open') to check if the mouseout element has open class or not\r\n * ? !mouseOutEl.classList.contains('menu-toggle') to check if mouseout was from single menu item and not from the one which has submenu\r\n * ? !mouseOverEl.parentNode.classList.contains('menu-link') to disable mouseout event for icon, text and dropdown arrow\r\n */\n this._evntElMouseOut = function (e) {\n var mainEl = e.currentTarget;\n var mouseOutEl = e.target;\n var mouseOverEl = e.toElement || e.relatedTarget;\n\n // Find absolute parent of any menu item from which mouseout event triggered\n if (mouseOutEl.closest('ul') && mouseOutEl.closest('ul').classList.contains('menu-inner')) {\n _this._topParent = mouseOutEl;\n }\n if (mouseOutEl !== mainEl && (mouseOutEl.parentNode.classList.contains('open') || !mouseOutEl.classList.contains('menu-toggle')) && mouseOverEl && mouseOverEl.parentNode && !mouseOverEl.parentNode.classList.contains('menu-link')) {\n // When mouse goes totally out of menu items, check mouse over element to confirm it's not the child of menu, once confirmed close the menu\n if (_this._topParent && !Menu.childOf(mouseOverEl, _this._topParent.parentNode)) {\n var _toggleLink = _this._topParent.classList.contains('menu-toggle') ? _this._topParent : null;\n if (_toggleLink) {\n e.preventDefault();\n if (_toggleLink.getAttribute('data-hover') !== 'true') {\n _this.toggle(_toggleLink);\n _this._topParent = null;\n }\n }\n }\n\n // When mouse enter the sub menu, check if it's child of the initially mouse overed menu item(Actual Parent),\n // if it's the parent do not close the sub menu else close the sub menu\n if (Menu.childOf(mouseOverEl, mouseOutEl.parentNode)) {\n return;\n }\n var toggleLink = mouseOutEl.classList.contains('menu-toggle') ? mouseOutEl : null;\n if (toggleLink) {\n e.preventDefault();\n if (toggleLink.getAttribute('data-hover') !== 'true') {\n _this.toggle(toggleLink);\n }\n }\n }\n e.stopPropagation();\n };\n if (this._horizontal && window.screen.width > window.Helpers.LAYOUT_BREAKPOINT) {\n this._el.addEventListener('mouseout', this._evntElMouseOut);\n }\n }\n }\n }\n }, {\n key: \"_unbindEvents\",\n value: function _unbindEvents() {\n if (this._evntElClick) {\n this._el.removeEventListener('click', this._evntElClick);\n this._evntElClick = null;\n }\n if (this._evntElMouseOver) {\n this._el.removeEventListener('mouseover', this._evntElMouseOver);\n this._evntElMouseOver = null;\n }\n if (this._evntElMouseOut) {\n this._el.removeEventListener('mouseout', this._evntElMouseOut);\n this._evntElMouseOut = null;\n }\n if (this._evntWindowResize) {\n window.removeEventListener('resize', this._evntWindowResize);\n this._evntWindowResize = null;\n }\n if (this._evntBodyClick) {\n document.body.removeEventListener('click', this._evntBodyClick);\n this._evntBodyClick = null;\n }\n if (this._evntInnerMousemove) {\n this._inner.removeEventListener('mousemove', this._evntInnerMousemove);\n this._evntInnerMousemove = null;\n }\n if (this._evntInnerMouseleave) {\n this._inner.removeEventListener('mouseleave', this._evntInnerMouseleave);\n this._evntInnerMouseleave = null;\n }\n }\n }, {\n key: \"open\",\n value: function open(el) {\n var _this2 = this;\n var closeChildren = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this._closeChildren;\n var item = this._findUnopenedParent(Menu._getItem(el, true), closeChildren);\n if (!item) return;\n var toggleLink = Menu._getLink(item, true);\n Menu._promisify(this._onOpen, this, item, toggleLink, Menu._findMenu(item)).then(function () {\n if (!_this2._horizontal || !Menu._isRoot(item)) {\n if (_this2._animate && !_this2._horizontal) {\n window.requestAnimationFrame(function () {\n return _this2._toggleAnimation(true, item, false);\n });\n if (_this2._accordion) _this2._closeOther(item, closeChildren);\n } else if (_this2._animate) {\n _this2._toggleDropdown(true, item, closeChildren);\n // eslint-disable-next-line no-unused-expressions\n _this2._onOpened && _this2._onOpened(_this2, item, toggleLink, Menu._findMenu(item));\n } else {\n item.classList.add('open');\n // eslint-disable-next-line no-unused-expressions\n _this2._onOpened && _this2._onOpened(_this2, item, toggleLink, Menu._findMenu(item));\n if (_this2._accordion) _this2._closeOther(item, closeChildren);\n }\n } else {\n _this2._toggleDropdown(true, item, closeChildren);\n // eslint-disable-next-line no-unused-expressions\n _this2._onOpened && _this2._onOpened(_this2, item, toggleLink, Menu._findMenu(item));\n }\n }).catch(function () {});\n }\n }, {\n key: \"close\",\n value: function close(el) {\n var _this3 = this;\n var closeChildren = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this._closeChildren;\n var _autoClose = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var item = Menu._getItem(el, true);\n var toggleLink = Menu._getLink(el, true);\n if (!item.classList.contains('open') || item.classList.contains('disabled')) return;\n Menu._promisify(this._onClose, this, item, toggleLink, Menu._findMenu(item), _autoClose).then(function () {\n if (!_this3._horizontal || !Menu._isRoot(item)) {\n if (_this3._animate && !_this3._horizontal) {\n window.requestAnimationFrame(function () {\n return _this3._toggleAnimation(false, item, closeChildren);\n });\n } else {\n item.classList.remove('open');\n if (closeChildren) {\n var opened = item.querySelectorAll('.menu-item.open');\n for (var i = 0, l = opened.length; i < l; i++) opened[i].classList.remove('open');\n }\n\n // eslint-disable-next-line no-unused-expressions\n _this3._onClosed && _this3._onClosed(_this3, item, toggleLink, Menu._findMenu(item));\n }\n } else {\n _this3._toggleDropdown(false, item, closeChildren);\n // eslint-disable-next-line no-unused-expressions\n _this3._onClosed && _this3._onClosed(_this3, item, toggleLink, Menu._findMenu(item));\n }\n }).catch(function () {});\n }\n }, {\n key: \"_closeOther\",\n value: function _closeOther(item, closeChildren) {\n var opened = Menu._findChild(item.parentNode, ['menu-item', 'open']);\n for (var i = 0, l = opened.length; i < l; i++) {\n if (opened[i] !== item) this.close(opened[i], closeChildren);\n }\n }\n }, {\n key: \"toggle\",\n value: function toggle(el) {\n var closeChildren = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this._closeChildren;\n var item = Menu._getItem(el, true);\n // const toggleLink = Menu._getLink(el, true)\n\n if (item.classList.contains('open')) this.close(item, closeChildren);else this.open(item, closeChildren);\n }\n }, {\n key: \"_toggleDropdown\",\n value: function _toggleDropdown(show, item, closeChildren) {\n var menu = Menu._findMenu(item);\n var actualItem = item;\n var subMenuItem = false;\n if (show) {\n if (Menu._findParent(item, 'menu-sub', false)) {\n subMenuItem = true;\n item = this._topParent ? this._topParent.parentNode : item;\n }\n var wrapperWidth = Math.round(this._wrapper.getBoundingClientRect().width);\n var position = this._innerPosition;\n var itemOffset = this._getItemOffset(item);\n var itemWidth = Math.round(item.getBoundingClientRect().width);\n if (itemOffset - DELTA <= -1 * position) {\n this._innerPosition = -1 * itemOffset;\n } else if (itemOffset + position + itemWidth + DELTA >= wrapperWidth) {\n if (itemWidth > wrapperWidth) {\n this._innerPosition = -1 * itemOffset;\n } else {\n this._innerPosition = -1 * (itemOffset + itemWidth - wrapperWidth);\n }\n }\n actualItem.classList.add('open');\n var menuWidth = Math.round(menu.getBoundingClientRect().width);\n if (subMenuItem) {\n if (itemOffset + this._innerPosition + menuWidth * 2 > wrapperWidth && menuWidth < wrapperWidth && menuWidth >= itemWidth) {\n menu.style.left = [this._rtl ? '100%' : '-100%'];\n }\n } else if (itemOffset + this._innerPosition + menuWidth > wrapperWidth && menuWidth < wrapperWidth && menuWidth > itemWidth) {\n menu.style[this._rtl ? 'marginRight' : 'marginLeft'] = \"-\".concat(menuWidth - itemWidth, \"px\");\n }\n this._closeOther(actualItem, closeChildren);\n this._updateSlider();\n } else {\n var toggle = Menu._findChild(item, ['menu-toggle']);\n\n // eslint-disable-next-line no-unused-expressions\n toggle.length && toggle[0].removeAttribute('data-hover', 'true');\n item.classList.remove('open');\n menu.style[this._rtl ? 'marginRight' : 'marginLeft'] = null;\n if (closeChildren) {\n var opened = menu.querySelectorAll('.menu-item.open');\n for (var i = 0, l = opened.length; i < l; i++) opened[i].classList.remove('open');\n }\n }\n }\n }, {\n key: \"_slide\",\n value: function _slide(direction) {\n var wrapperWidth = Math.round(this._wrapper.getBoundingClientRect().width);\n var innerWidth = this._innerWidth;\n var newPosition;\n if (direction === 'next') {\n newPosition = this._getSlideNextPos();\n if (innerWidth + newPosition < wrapperWidth) {\n newPosition = wrapperWidth - innerWidth;\n }\n } else {\n newPosition = this._getSlidePrevPos();\n if (newPosition > 0) newPosition = 0;\n }\n this._innerPosition = newPosition;\n this.update();\n }\n }, {\n key: \"_getSlideNextPos\",\n value: function _getSlideNextPos() {\n var wrapperWidth = Math.round(this._wrapper.getBoundingClientRect().width);\n var position = this._innerPosition;\n var curItem = this._inner.childNodes[0];\n var left = 0;\n while (curItem) {\n if (curItem.tagName) {\n var curItemWidth = Math.round(curItem.getBoundingClientRect().width);\n if (left + position - DELTA <= wrapperWidth && left + position + curItemWidth + DELTA >= wrapperWidth) {\n if (curItemWidth > wrapperWidth && left === -1 * position) left += curItemWidth;\n break;\n }\n left += curItemWidth;\n }\n curItem = curItem.nextSibling;\n }\n return -1 * left;\n }\n }, {\n key: \"_getSlidePrevPos\",\n value: function _getSlidePrevPos() {\n var wrapperWidth = Math.round(this._wrapper.getBoundingClientRect().width);\n var position = this._innerPosition;\n var curItem = this._inner.childNodes[0];\n var left = 0;\n while (curItem) {\n if (curItem.tagName) {\n var curItemWidth = Math.round(curItem.getBoundingClientRect().width);\n if (left - DELTA <= -1 * position && left + curItemWidth + DELTA >= -1 * position) {\n if (curItemWidth <= wrapperWidth) left = left + curItemWidth - wrapperWidth;\n break;\n }\n left += curItemWidth;\n }\n curItem = curItem.nextSibling;\n }\n return -1 * left;\n }\n }, {\n key: \"_findUnopenedParent\",\n value: function _findUnopenedParent(item, closeChildren) {\n var tree = [];\n var parentItem = null;\n while (item) {\n if (item.classList.contains('disabled')) {\n parentItem = null;\n tree = [];\n } else {\n if (!item.classList.contains('open')) parentItem = item;\n tree.push(item);\n }\n item = Menu._findParent(item, 'menu-item', false);\n }\n if (!parentItem) return null;\n if (tree.length === 1) return parentItem;\n tree = tree.slice(0, tree.indexOf(parentItem));\n for (var i = 0, l = tree.length; i < l; i++) {\n tree[i].classList.add('open');\n if (this._accordion) {\n var openedItems = Menu._findChild(tree[i].parentNode, ['menu-item', 'open']);\n for (var j = 0, k = openedItems.length; j < k; j++) {\n if (openedItems[j] !== tree[i]) {\n openedItems[j].classList.remove('open');\n if (closeChildren) {\n var openedChildren = openedItems[j].querySelectorAll('.menu-item.open');\n for (var x = 0, z = openedChildren.length; x < z; x++) {\n openedChildren[x].classList.remove('open');\n }\n }\n }\n }\n }\n }\n return parentItem;\n }\n }, {\n key: \"_toggleAnimation\",\n value: function _toggleAnimation(open, item, closeChildren) {\n var _this4 = this;\n var toggleLink = Menu._getLink(item, true);\n var menu = Menu._findMenu(item);\n Menu._unbindAnimationEndEvent(item);\n var linkHeight = Math.round(toggleLink.getBoundingClientRect().height);\n item.style.overflow = 'hidden';\n var clearItemStyle = function clearItemStyle() {\n item.classList.remove('menu-item-animating');\n item.classList.remove('menu-item-closing');\n item.style.overflow = null;\n item.style.height = null;\n if (!_this4._horizontal) _this4.update();\n };\n if (open) {\n item.style.height = \"\".concat(linkHeight, \"px\");\n item.classList.add('menu-item-animating');\n item.classList.add('open');\n Menu._bindAnimationEndEvent(item, function () {\n clearItemStyle();\n _this4._onOpened(_this4, item, toggleLink, menu);\n });\n setTimeout(function () {\n item.style.height = \"\".concat(linkHeight + Math.round(menu.getBoundingClientRect().height), \"px\");\n }, 50);\n } else {\n item.style.height = \"\".concat(linkHeight + Math.round(menu.getBoundingClientRect().height), \"px\");\n item.classList.add('menu-item-animating');\n item.classList.add('menu-item-closing');\n Menu._bindAnimationEndEvent(item, function () {\n item.classList.remove('open');\n clearItemStyle();\n if (closeChildren) {\n var opened = item.querySelectorAll('.menu-item.open');\n for (var i = 0, l = opened.length; i < l; i++) opened[i].classList.remove('open');\n }\n _this4._onClosed(_this4, item, toggleLink, menu);\n });\n setTimeout(function () {\n item.style.height = \"\".concat(linkHeight, \"px\");\n }, 50);\n }\n }\n }, {\n key: \"_getItemOffset\",\n value: function _getItemOffset(item) {\n var curItem = this._inner.childNodes[0];\n var left = 0;\n while (curItem !== item) {\n if (curItem.tagName) {\n left += Math.round(curItem.getBoundingClientRect().width);\n }\n curItem = curItem.nextSibling;\n }\n return left;\n }\n }, {\n key: \"_updateSlider\",\n value: function _updateSlider() {\n var wrapperWidth = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n var innerWidth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var position = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n var _wrapperWidth = wrapperWidth !== null ? wrapperWidth : Math.round(this._wrapper.getBoundingClientRect().width);\n var _innerWidth = innerWidth !== null ? innerWidth : this._innerWidth;\n var _position = position !== null ? position : this._innerPosition;\n if (_innerWidth < _wrapperWidth || window.innerWidth < window.Helpers.LAYOUT_BREAKPOINT) {\n this._prevBtn.classList.add('d-none');\n this._nextBtn.classList.add('d-none');\n } else {\n this._prevBtn.classList.remove('d-none');\n this._nextBtn.classList.remove('d-none');\n }\n if (_innerWidth > _wrapperWidth && window.innerWidth > window.Helpers.LAYOUT_BREAKPOINT) {\n if (_position === 0) this._prevBtn.classList.add('disabled');else this._prevBtn.classList.remove('disabled');\n if (_innerWidth + _position <= _wrapperWidth) this._nextBtn.classList.add('disabled');else this._nextBtn.classList.remove('disabled');\n }\n }\n }, {\n key: \"_innerWidth\",\n get: function get() {\n var items = this._inner.childNodes;\n var width = 0;\n for (var i = 0, l = items.length; i < l; i++) {\n if (items[i].tagName) {\n width += Math.round(items[i].getBoundingClientRect().width);\n }\n }\n return width;\n }\n }, {\n key: \"_innerPosition\",\n get: function get() {\n return parseInt(this._inner.style[this._rtl ? 'marginRight' : 'marginLeft'] || '0px', 10);\n },\n set: function set(value) {\n this._inner.style[this._rtl ? 'marginRight' : 'marginLeft'] = \"\".concat(value, \"px\");\n return value;\n }\n }, {\n key: \"closeAll\",\n value: function closeAll() {\n var closeChildren = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this._closeChildren;\n var opened = this._el.querySelectorAll('.menu-inner > .menu-item.open');\n for (var i = 0, l = opened.length; i < l; i++) this.close(opened[i], closeChildren);\n }\n }, {\n key: \"update\",\n value: function update() {\n if (!this._horizontal) {\n if (this._scrollbar) {\n this._scrollbar.update();\n }\n } else {\n this.closeAll();\n var wrapperWidth = Math.round(this._wrapper.getBoundingClientRect().width);\n var innerWidth = this._innerWidth;\n var position = this._innerPosition;\n if (wrapperWidth - position > innerWidth) {\n position = wrapperWidth - innerWidth;\n if (position > 0) position = 0;\n this._innerPosition = position;\n }\n this._updateSlider(wrapperWidth, innerWidth, position);\n }\n }\n }, {\n key: \"manageScroll\",\n value: function manageScroll() {\n var _window = window,\n PerfectScrollbar = _window.PerfectScrollbar;\n var menuInner = document.querySelector('.menu-inner');\n if (window.innerWidth < window.Helpers.LAYOUT_BREAKPOINT) {\n if (this._scrollbar !== null) {\n // window.Helpers.menuPsScroll.destroy()\n this._scrollbar.destroy();\n this._scrollbar = null;\n }\n menuInner.classList.add('overflow-auto');\n } else {\n if (this._scrollbar === null) {\n var menuScroll = new PerfectScrollbar(document.querySelector('.menu-inner'), {\n suppressScrollX: true,\n wheelPropagation: false\n });\n // window.Helpers.menuPsScroll = menuScroll\n this._scrollbar = menuScroll;\n }\n menuInner.classList.remove('overflow-auto');\n }\n }\n }, {\n key: \"switchMenu\",\n value: function switchMenu(menu) {\n // Unbind Events\n this._unbindEvents();\n\n // const html = document.documentElement\n var navbar = document.querySelector('nav.layout-navbar');\n var navbarCollapse = document.querySelector('#navbar-collapse');\n /* const fullNavbar = document.querySelector('.layout-navbar-full')\r\n const contentNavbar = document.querySelector('.layout-content-navbar')\r\n const contentWrapper = document.querySelector('.content-wrapper') */\n var asideMenuWrapper = document.querySelector('#layout-menu div');\n var asideMenu = document.querySelector('#layout-menu');\n var horzMenuClasses = ['layout-menu-horizontal', 'menu', 'menu-horizontal', 'container-fluid', 'flex-grow-0'];\n var vertMenuClasses = ['layout-menu', 'menu', 'menu-vertical'];\n var horzMenuWrapper = document.querySelector('.menu-horizontal-wrapper');\n var menuInner = document.querySelector('.menu-inner');\n var brand = document.querySelector('.app-brand');\n var menuToggler = document.querySelector('.layout-menu-toggle');\n var activeMenuItems = document.querySelectorAll('.menu-inner .active');\n /* const layoutPage = document.querySelector('.layout-page')\r\n const layoutContainer = document.querySelector('.layout-container')\r\n const content = document.querySelector('.container-fluid') */\n\n // const { PerfectScrollbar } = window\n\n if (menu === 'vertical') {\n var _asideMenu$classList, _asideMenu$classList2;\n this._horizontal = false;\n asideMenuWrapper.insertBefore(brand, horzMenuWrapper);\n asideMenuWrapper.insertBefore(menuInner, horzMenuWrapper);\n asideMenuWrapper.classList.add('flex-column', 'p-0');\n (_asideMenu$classList = asideMenu.classList).remove.apply(_asideMenu$classList, _toConsumableArray(asideMenu.classList));\n (_asideMenu$classList2 = asideMenu.classList).add.apply(_asideMenu$classList2, vertMenuClasses.concat([this._menuBgClass]));\n brand.classList.remove('d-none', 'd-lg-flex');\n menuToggler.classList.remove('d-none');\n // if (PerfectScrollbar !== undefined) {\n // this._psScroll = new PerfectScrollbar(document.querySelector('.menu-inner'), {\n // suppressScrollX: true,\n // wheelPropagation: !Menu._hasClass('layout-menu-fixed layout-menu-fixed-offcanvas')\n // })\n // }\n\n menuInner.classList.add('overflow-auto');\n\n // Add open class to active items\n for (var i = 0; i < activeMenuItems.length - 1; ++i) {\n activeMenuItems[i].classList.add('open');\n }\n } else {\n var _asideMenu$classList3, _asideMenu$classList4;\n this._horizontal = true;\n navbar.children[0].insertBefore(brand, navbarCollapse);\n brand.classList.add('d-none', 'd-lg-flex');\n horzMenuWrapper.appendChild(menuInner);\n asideMenuWrapper.classList.remove('flex-column', 'p-0');\n (_asideMenu$classList3 = asideMenu.classList).remove.apply(_asideMenu$classList3, _toConsumableArray(asideMenu.classList));\n (_asideMenu$classList4 = asideMenu.classList).add.apply(_asideMenu$classList4, horzMenuClasses.concat([this._menuBgClass]));\n menuToggler.classList.add('d-none');\n menuInner.classList.remove('overflow-auto');\n\n // if (PerfectScrollbar !== undefined && this._psScroll !== null) {\n // this._psScroll.destroy()\n // this._psScroll = null\n // }\n\n // Remove open class from active items\n for (var _i = 0; _i < activeMenuItems.length; ++_i) {\n activeMenuItems[_i].classList.remove('open');\n }\n }\n this._bindEvents();\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n if (!this._el) return;\n this._unbindEvents();\n var items = this._el.querySelectorAll('.menu-item');\n for (var i = 0, l = items.length; i < l; i++) {\n Menu._unbindAnimationEndEvent(items[i]);\n items[i].classList.remove('menu-item-animating');\n items[i].classList.remove('open');\n items[i].style.overflow = null;\n items[i].style.height = null;\n }\n var menus = this._el.querySelectorAll('.menu-menu');\n for (var i2 = 0, l2 = menus.length; i2 < l2; i2++) {\n menus[i2].style.marginRight = null;\n menus[i2].style.marginLeft = null;\n }\n this._el.classList.remove('menu-no-animation');\n if (this._wrapper) {\n this._prevBtn.parentNode.removeChild(this._prevBtn);\n this._nextBtn.parentNode.removeChild(this._nextBtn);\n this._wrapper.parentNode.insertBefore(this._inner, this._wrapper);\n this._wrapper.parentNode.removeChild(this._wrapper);\n this._inner.style.marginLeft = null;\n this._inner.style.marginRight = null;\n }\n this._el.menuInstance = null;\n delete this._el.menuInstance;\n this._el = null;\n this._horizontal = null;\n this._animate = null;\n this._accordion = null;\n this._showDropdownOnHover = null;\n this._closeChildren = null;\n this._rtl = null;\n this._onOpen = null;\n this._onOpened = null;\n this._onClose = null;\n this._onClosed = null;\n if (this._scrollbar) {\n this._scrollbar.destroy();\n this._scrollbar = null;\n }\n this._inner = null;\n this._prevBtn = null;\n this._wrapper = null;\n this._nextBtn = null;\n }\n }], [{\n key: \"childOf\",\n value: function childOf( /* child node */c, /* parent node */p) {\n // returns boolean\n if (c.parentNode) {\n while ((c = c.parentNode) && c !== p);\n return !!c;\n }\n return false;\n }\n }, {\n key: \"_isRoot\",\n value: function _isRoot(item) {\n return !Menu._findParent(item, 'menu-item', false);\n }\n }, {\n key: \"_findParent\",\n value: function _findParent(el, cls) {\n var throwError = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n if (el.tagName.toUpperCase() === 'BODY') return null;\n el = el.parentNode;\n while (el.tagName.toUpperCase() !== 'BODY' && !el.classList.contains(cls)) {\n el = el.parentNode;\n }\n el = el.tagName.toUpperCase() !== 'BODY' ? el : null;\n if (!el && throwError) throw new Error(\"Cannot find `.\".concat(cls, \"` parent element\"));\n return el;\n }\n }, {\n key: \"_findChild\",\n value: function _findChild(el, cls) {\n var items = el.childNodes;\n var found = [];\n for (var i = 0, l = items.length; i < l; i++) {\n if (items[i].classList) {\n var passed = 0;\n for (var j = 0; j < cls.length; j++) {\n if (items[i].classList.contains(cls[j])) passed += 1;\n }\n if (cls.length === passed) found.push(items[i]);\n }\n }\n return found;\n }\n }, {\n key: \"_findMenu\",\n value: function _findMenu(item) {\n var curEl = item.childNodes[0];\n var menu = null;\n while (curEl && !menu) {\n if (curEl.classList && curEl.classList.contains('menu-sub')) menu = curEl;\n curEl = curEl.nextSibling;\n }\n if (!menu) throw new Error('Cannot find `.menu-sub` element for the current `.menu-toggle`');\n return menu;\n }\n\n // Has class\n }, {\n key: \"_hasClass\",\n value: function _hasClass(cls) {\n var el = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window.Helpers.ROOT_EL;\n var result = false;\n cls.split(' ').forEach(function (c) {\n if (el.classList.contains(c)) result = true;\n });\n return result;\n }\n }, {\n key: \"_getItem\",\n value: function _getItem(el, toggle) {\n var item = null;\n var selector = toggle ? 'menu-toggle' : 'menu-link';\n if (el.classList.contains('menu-item')) {\n if (Menu._findChild(el, [selector]).length) item = el;\n } else if (el.classList.contains(selector)) {\n item = el.parentNode.classList.contains('menu-item') ? el.parentNode : null;\n }\n if (!item) {\n throw new Error(\"\".concat(toggle ? 'Toggable ' : '', \"`.menu-item` element not found.\"));\n }\n return item;\n }\n }, {\n key: \"_getLink\",\n value: function _getLink(el, toggle) {\n var found = [];\n var selector = toggle ? 'menu-toggle' : 'menu-link';\n if (el.classList.contains(selector)) found = [el];else if (el.classList.contains('menu-item')) found = Menu._findChild(el, [selector]);\n if (!found.length) throw new Error(\"`\".concat(selector, \"` element not found.\"));\n return found[0];\n }\n }, {\n key: \"_bindAnimationEndEvent\",\n value: function _bindAnimationEndEvent(el, handler) {\n var cb = function cb(e) {\n if (e.target !== el) return;\n Menu._unbindAnimationEndEvent(el);\n handler(e);\n };\n var duration = window.getComputedStyle(el).transitionDuration;\n duration = parseFloat(duration) * (duration.indexOf('ms') !== -1 ? 1 : 1000);\n el._menuAnimationEndEventCb = cb;\n TRANSITION_EVENTS.forEach(function (ev) {\n return el.addEventListener(ev, el._menuAnimationEndEventCb, false);\n });\n el._menuAnimationEndEventTimeout = setTimeout(function () {\n cb({\n target: el\n });\n }, duration + 50);\n }\n }, {\n key: \"_promisify\",\n value: function _promisify(fn) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n var result = fn.apply(void 0, args);\n if (result instanceof Promise) {\n return result;\n }\n if (result === false) {\n return Promise.reject();\n }\n return Promise.resolve();\n }\n }, {\n key: \"_unbindAnimationEndEvent\",\n value: function _unbindAnimationEndEvent(el) {\n var cb = el._menuAnimationEndEventCb;\n if (el._menuAnimationEndEventTimeout) {\n clearTimeout(el._menuAnimationEndEventTimeout);\n el._menuAnimationEndEventTimeout = null;\n }\n if (!cb) return;\n TRANSITION_EVENTS.forEach(function (ev) {\n return el.removeEventListener(ev, cb, false);\n });\n el._menuAnimationEndEventCb = null;\n }\n }, {\n key: \"setDisabled\",\n value: function setDisabled(el, disabled) {\n Menu._getItem(el, false).classList[disabled ? 'add' : 'remove']('disabled');\n }\n }, {\n key: \"isActive\",\n value: function isActive(el) {\n return Menu._getItem(el, false).classList.contains('active');\n }\n }, {\n key: \"isOpened\",\n value: function isOpened(el) {\n return Menu._getItem(el, false).classList.contains('open');\n }\n }, {\n key: \"isDisabled\",\n value: function isDisabled(el) {\n return Menu._getItem(el, false).classList.contains('disabled');\n }\n }]);\n return Menu;\n}();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9qcy9tZW51LmpzLmpzIiwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSxJQUFNQSxpQkFBaUIsR0FBR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Qm9keUNsaWNrKVxyXG5cclxuICAgICAgaWYgKHRoaXMuX3Nob3dEcm9wZG93bk9uSG92ZXIpIHtcclxuICAgICAgICAvKiogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKipcclxuICAgICAgICAgKiBIb3Jpem9udGFsIE1lbnUgTW91c2UgT3ZlciBFdmVudFxyXG4gICAgICAgICAqID8gZS50YXJnZXQgIT09IGUuY3VycmVudFRhcmdldCBjb25kaXRpb24gdG8gZGlzYWJsZSBtb3VzZW92ZXIgZXZlbnQgb24gd2hvbGUgbWVudSBuYXZiYXJcclxuICAgICAgICAgKiA/ICFlLnRhcmdldC5wYXJlbnROb2RlLmNsYXNzTGlzdC5jb250YWlucygnb3BlbicpIHRvIGRpc2FibGUgbW91c2VvdmVyIGV2ZW50cyBvbiBpY29uLCB0ZXh0IGFuZCBkcm9wZG93biBhcnJvd1xyXG4gICAgICAgICAqL1xyXG4gICAgICAgIHRoaXMuX2V2bnRFbE1vdXNlT3ZlciA9IGUgPT4ge1xyXG4gICAgICAgICAgaWYgKGUudGFyZ2V0ICE9PSBlLmN1cnJlbnRUYXJnZXQgJiYgIWUudGFyZ2V0LnBhcmVudE5vZGUuY2xhc3NMaXN0LmNvbnRhaW5zKCdvcGVuJykpIHtcclxuICAgICAgICAgICAgY29uc3QgdG9nZ2xlTGluayA9IGUudGFyZ2V0LmNsYXNzTGlzdC5jb250YWlucygnbWVudS10b2dnbGUnKSA/IGUudGFyZ2V0IDogbnVsbFxyXG5cclxuICAgICAgICAgICAgaWYgKHRvZ2dsZUxpbmspIHtcclxuICAgICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KClcclxuXHJcbiAgICAgICAgICAgICAgaWYgKHRvZ2dsZUxpbmsuZ2V0QXR0cmlidXRlKCdkYXRhLWhvdmVyJykgIT09ICd0cnVlJykge1xyXG4gICAgICAgICAgICAgICAgdGhpcy50b2dnbGUodG9nZ2xlTGluaylcclxuICAgICAgICAgICAgICB9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XHJcbiAgICAgICAgICAgIC8vIFdoZW4gbW91c2UgZ29lcyB0b3RhbGx5IG91dCBvZiBtZW51IGl0ZW1zLCBjaGVjayBtb3VzZSBvdmVyIGVsZW1lbnQgdG8gY29uZmlybSBpdCdzIG5vdCB0aGUgY2hpbGQgb2YgbWVudSwgb25jZSBjb25maXJtZWQgY2xvc2UgdGhlIG1lbnVcclxuICAgICAgICAgICAgaWYgKHRoaXMuX3RvcFBhcmVudCAmJiAhTWVudS5jaGlsZE9mKG1vdXNlT3ZlckVsLCB0aGlzLl90b3BQYXJlbnQucGFyZW50Tm9kZSkpIHtcclxuICAgICAgICAgICAgICBjb25zdCB0b2dnbGVMaW5rID0gdGhpcy5fdG9wUGFyZW50LmNsYXNzTGlzdC5jb250YWlucygnbWVudS10b2dnbGUnKSA/IHRoaXMuX3RvcFBhcmVudCA6IG51bGxcclxuXHJcbiAgICAgICAgICAgICAgaWYgKHRvZ2dsZUxpbmspIHtcclxuICAgICAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKVxyXG5cclxuICAgICAgICAgICAgICAgIGlmICh0b2dnbGVMaW5rLmdldEF0dHJpYnV0ZSgnZGF0YS1ob3ZlcicpICE9PSAndHJ1ZScpIHtcclxuICAgICAgICAgICAgICAgICAgdGhpcy50b2dnbGUodG9nZ2xlTGluaylcclxuICAgICAgICAgICAgICAgICAgdGhpcy5fdG9wUGFyZW50ID0gbnVsbFxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgLy8gV2hlbiBtb3VzZSBlbnRlciB0aGUgc3ViIG1lbnUsIGNoZWNrIGlmIGl0J3MgY2hpbGQgb2YgdGhlIGluaXRpYWxseSBtb3VzZSBvdmVyZWQgbWVudSBpdGVtKEFjdHVhbCBQYXJlbnQpLFxyXG4gICAgICAgICAgICAvLyBpZiBpdCdzIHRoZSBwYXJlbnQgZG8gbm90IGNsb3NlIHRoZSB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iLCJpMiIsImwyIiwibWFyZ2luUmlnaHQiLCJtYXJnaW5MZWZ0IiwicmVtb3ZlQ2hpbGQiLCJjIiwicCIsImNscyIsInRocm93RXJyb3IiLCJ0b1VwcGVyQ2FzZSIsIkVycm9yIiwiZm91bmQiLCJwYXNzZWQiLCJjdXJFbCIsIlJPT1RfRUwiLCJyZXN1bHQiLCJzcGxpdCIsImZvckVhY2giLCJzZWxlY3RvciIsImhhbmRsZXIiLCJjYiIsImR1cmF0aW9uIiwiZ2V0Q29tcHV0ZWRTdHlsZSIsInRyYW5zaXRpb25EdXJhdGlvbiIsInBhcnNlRmxvYXQiLCJfbWVudUFuaW1hdGlvbkVuZEV2ZW50Q2IiLCJldiIsIl9tZW51QW5pbWF0aW9uRW5kRXZlbnRUaW1lb3V0IiwiZm4iLCJhcmdzIiwiUHJvbWlzZSIsInJlamVjdCIsInJlc29sdmUiLCJjbGVhclRpbWVvdXQiLCJkaXNhYmxlZCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./js/menu.js\n"); - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The require scope -/******/ var __webpack_require__ = {}; -/******/ -/************************************************************************/ -/******/ /* webpack/runtime/define property getters */ -/******/ !function() { -/******/ // define getter functions for harmony exports -/******/ __webpack_require__.d = function(exports, definition) { -/******/ for(var key in definition) { -/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); -/******/ } -/******/ } -/******/ }; -/******/ }(); -/******/ -/******/ /* webpack/runtime/hasOwnProperty shorthand */ -/******/ !function() { -/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } -/******/ }(); -/******/ -/******/ /* webpack/runtime/make namespace object */ -/******/ !function() { -/******/ // define __esModule on exports -/******/ __webpack_require__.r = function(exports) { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ }(); -/******/ -/************************************************************************/ -/******/ -/******/ // startup -/******/ // Load entry module and return exports -/******/ // This entry module can't be inlined because the eval-source-map devtool is used. -/******/ var __webpack_exports__ = {}; -/******/ __webpack_modules__["./js/menu.js"](0, __webpack_exports__, __webpack_require__); -/******/ -/******/ return __webpack_exports__; -/******/ })() -; -}); \ No newline at end of file +const TRANSITION_EVENTS = ['transitionend', 'webkitTransitionEnd', 'oTransitionEnd'] +// const TRANSITION_PROPERTIES = ['transition', 'MozTransition', 'webkitTransition', 'WebkitTransition', 'OTransition'] +const DELTA = 5 + +class Menu { + constructor(el, config = {}, _PS = null) { + this._el = el + this._horizontal = config.orientation === 'horizontal' + this._animate = config.animate !== false + this._accordion = config.accordion !== false + this._showDropdownOnHover = Boolean(config.showDropdownOnHover) + this._closeChildren = Boolean(config.closeChildren) + this._rtl = document.documentElement.getAttribute('dir') === 'rtl' || document.body.getAttribute('dir') === 'rtl' + + this._onOpen = config.onOpen || (() => {}) + this._onOpened = config.onOpened || (() => {}) + this._onClose = config.onClose || (() => {}) + this._onClosed = config.onClosed || (() => {}) + + this._psScroll = null + this._topParent = null + this._menuBgClass = null + + el.classList.add('menu') + el.classList[this._animate ? 'remove' : 'add']('menu-no-animation') + + if (!this._horizontal) { + el.classList.add('menu-vertical') + el.classList.remove('menu-horizontal') + + const PerfectScrollbarLib = _PS || window.PerfectScrollbar + + if (PerfectScrollbarLib) { + this._scrollbar = new PerfectScrollbarLib(el.querySelector('.menu-inner'), { + suppressScrollX: true, + wheelPropagation: !Menu._hasClass('layout-menu-fixed layout-menu-fixed-offcanvas') + }) + + window.Helpers.menuPsScroll = this._scrollbar + } else { + el.querySelector('.menu-inner').classList.add('overflow-auto') + } + } else { + el.classList.add('menu-horizontal') + el.classList.remove('menu-vertical') + + this._inner = el.querySelector('.menu-inner') + const container = this._inner.parentNode + + this._prevBtn = el.querySelector('.menu-horizontal-prev') + if (!this._prevBtn) { + this._prevBtn = document.createElement('a') + this._prevBtn.href = '#' + this._prevBtn.className = 'menu-horizontal-prev' + container.appendChild(this._prevBtn) + } + + this._wrapper = el.querySelector('.menu-horizontal-wrapper') + if (!this._wrapper) { + this._wrapper = document.createElement('div') + this._wrapper.className = 'menu-horizontal-wrapper' + this._wrapper.appendChild(this._inner) + container.appendChild(this._wrapper) + } + + this._nextBtn = el.querySelector('.menu-horizontal-next') + if (!this._nextBtn) { + this._nextBtn = document.createElement('a') + this._nextBtn.href = '#' + this._nextBtn.className = 'menu-horizontal-next' + container.appendChild(this._nextBtn) + } + + this._innerPosition = 0 + this.update() + } + + // Add data attribute for bg color class of menu + const menuClassList = el.classList + + for (let i = 0; i < menuClassList.length; i++) { + if (menuClassList[i].startsWith('bg-')) { + this._menuBgClass = menuClassList[i] + } + } + el.setAttribute('data-bg-class', this._menuBgClass) + + // Switch to vertical menu on small screen for horizontal menu layout on page load + if (this._horizontal && window.innerWidth < window.Helpers.LAYOUT_BREAKPOINT) this.switchMenu('vertical') + + this._bindEvents() + + // Link menu instance to element + el.menuInstance = this + } + + _bindEvents() { + // Click Event + this._evntElClick = e => { + // Find top parent element + if (e.target.closest('ul') && e.target.closest('ul').classList.contains('menu-inner')) { + const menuItem = Menu._findParent(e.target, 'menu-item', false) + + // eslint-disable-next-line prefer-destructuring + if (menuItem) this._topParent = menuItem.childNodes[0] + } + + const toggleLink = e.target.classList.contains('menu-toggle') + ? e.target + : Menu._findParent(e.target, 'menu-toggle', false) + + if (toggleLink) { + e.preventDefault() + + if (toggleLink.getAttribute('data-hover') !== 'true') { + this.toggle(toggleLink) + } + } + } + if ((!this._showDropdownOnHover && this._horizontal) || !this._horizontal || window.Helpers.isMobileDevice) + this._el.addEventListener('click', this._evntElClick) + + this._evntWindowResize = () => { + this.update() + if (this._lastWidth !== window.innerWidth) { + this._lastWidth = window.innerWidth + this.update() + } + + const horizontalMenuTemplate = document.querySelector("[data-template^='horizontal-menu']") + if (!this._horizontal && !horizontalMenuTemplate) this.manageScroll() + } + window.addEventListener('resize', this._evntWindowResize) + + if (this._horizontal) { + this._evntPrevBtnClick = e => { + e.preventDefault() + if (this._prevBtn.classList.contains('disabled')) return + this._slide('prev') + } + this._prevBtn.addEventListener('click', this._evntPrevBtnClick) + + this._evntNextBtnClick = e => { + e.preventDefault() + if (this._nextBtn.classList.contains('disabled')) return + this._slide('next') + } + this._nextBtn.addEventListener('click', this._evntNextBtnClick) + + this._evntBodyClick = e => { + if (!this._inner.contains(e.target) && this._el.querySelectorAll('.menu-inner > .menu-item.open').length) + this.closeAll() + } + document.body.addEventListener('click', this._evntBodyClick) + + if (this._showDropdownOnHover) { + /** *********************************************** + * Horizontal Menu Mouse Over Event + * ? e.target !== e.currentTarget condition to disable mouseover event on whole menu navbar + * ? !e.target.parentNode.classList.contains('open') to disable mouseover events on icon, text and dropdown arrow + */ + this._evntElMouseOver = e => { + if (e.target !== e.currentTarget && !e.target.parentNode.classList.contains('open')) { + const toggleLink = e.target.classList.contains('menu-toggle') ? e.target : null + + if (toggleLink) { + e.preventDefault() + + if (toggleLink.getAttribute('data-hover') !== 'true') { + this.toggle(toggleLink) + } + } + } + e.stopPropagation() + } + if (this._horizontal && window.screen.width > window.Helpers.LAYOUT_BREAKPOINT) { + this._el.addEventListener('mouseover', this._evntElMouseOver) + } + + /** *********************************************** + * Horizontal Menu Mouse Out Event + * ? e.target !== e.currentTarget condition to disable mouseout event on whole menu navbar + * ? mouseOutEl.parentNode.classList.contains('open') to check if the mouseout element has open class or not + * ? !mouseOutEl.classList.contains('menu-toggle') to check if mouseout was from single menu item and not from the one which has submenu + * ? !mouseOverEl.parentNode.classList.contains('menu-link') to disable mouseout event for icon, text and dropdown arrow + */ + this._evntElMouseOut = e => { + const mainEl = e.currentTarget + const mouseOutEl = e.target + const mouseOverEl = e.toElement || e.relatedTarget + + // Find absolute parent of any menu item from which mouseout event triggered + if (mouseOutEl.closest('ul') && mouseOutEl.closest('ul').classList.contains('menu-inner')) { + this._topParent = mouseOutEl + } + + if ( + mouseOutEl !== mainEl && + (mouseOutEl.parentNode.classList.contains('open') || !mouseOutEl.classList.contains('menu-toggle')) && + mouseOverEl && + mouseOverEl.parentNode && + !mouseOverEl.parentNode.classList.contains('menu-link') + ) { + // When mouse goes totally out of menu items, check mouse over element to confirm it's not the child of menu, once confirmed close the menu + if (this._topParent && !Menu.childOf(mouseOverEl, this._topParent.parentNode)) { + const toggleLink = this._topParent.classList.contains('menu-toggle') ? this._topParent : null + + if (toggleLink) { + e.preventDefault() + + if (toggleLink.getAttribute('data-hover') !== 'true') { + this.toggle(toggleLink) + this._topParent = null + } + } + } + + // When mouse enter the sub menu, check if it's child of the initially mouse overed menu item(Actual Parent), + // if it's the parent do not close the sub menu else close the sub menu + if (Menu.childOf(mouseOverEl, mouseOutEl.parentNode)) { + return + } + const toggleLink = mouseOutEl.classList.contains('menu-toggle') ? mouseOutEl : null + + if (toggleLink) { + e.preventDefault() + + if (toggleLink.getAttribute('data-hover') !== 'true') { + this.toggle(toggleLink) + } + } + } + e.stopPropagation() + } + if (this._horizontal && window.screen.width > window.Helpers.LAYOUT_BREAKPOINT) { + this._el.addEventListener('mouseout', this._evntElMouseOut) + } + } + } + } + + static childOf(/* child node */ c, /* parent node */ p) { + // returns boolean + if (c.parentNode) { + while ((c = c.parentNode) && c !== p); + return !!c + } + return false + } + + _unbindEvents() { + if (this._evntElClick) { + this._el.removeEventListener('click', this._evntElClick) + this._evntElClick = null + } + + if (this._evntElMouseOver) { + this._el.removeEventListener('mouseover', this._evntElMouseOver) + this._evntElMouseOver = null + } + + if (this._evntElMouseOut) { + this._el.removeEventListener('mouseout', this._evntElMouseOut) + this._evntElMouseOut = null + } + + if (this._evntWindowResize) { + window.removeEventListener('resize', this._evntWindowResize) + this._evntWindowResize = null + } + + if (this._evntBodyClick) { + document.body.removeEventListener('click', this._evntBodyClick) + this._evntBodyClick = null + } + + if (this._evntInnerMousemove) { + this._inner.removeEventListener('mousemove', this._evntInnerMousemove) + this._evntInnerMousemove = null + } + + if (this._evntInnerMouseleave) { + this._inner.removeEventListener('mouseleave', this._evntInnerMouseleave) + this._evntInnerMouseleave = null + } + } + + static _isRoot(item) { + return !Menu._findParent(item, 'menu-item', false) + } + + static _findParent(el, cls, throwError = true) { + if (el.tagName.toUpperCase() === 'BODY') return null + el = el.parentNode + while (el.tagName.toUpperCase() !== 'BODY' && !el.classList.contains(cls)) { + el = el.parentNode + } + + el = el.tagName.toUpperCase() !== 'BODY' ? el : null + + if (!el && throwError) throw new Error(`Cannot find \`.${cls}\` parent element`) + + return el + } + + static _findChild(el, cls) { + const items = el.childNodes + const found = [] + + for (let i = 0, l = items.length; i < l; i++) { + if (items[i].classList) { + let passed = 0 + + for (let j = 0; j < cls.length; j++) { + if (items[i].classList.contains(cls[j])) passed += 1 + } + + if (cls.length === passed) found.push(items[i]) + } + } + + return found + } + + static _findMenu(item) { + let curEl = item.childNodes[0] + let menu = null + + while (curEl && !menu) { + if (curEl.classList && curEl.classList.contains('menu-sub')) menu = curEl + curEl = curEl.nextSibling + } + + if (!menu) throw new Error('Cannot find `.menu-sub` element for the current `.menu-toggle`') + + return menu + } + + // Has class + static _hasClass(cls, el = window.Helpers.ROOT_EL) { + let result = false + + cls.split(' ').forEach(c => { + if (el.classList.contains(c)) result = true + }) + + return result + } + + open(el, closeChildren = this._closeChildren) { + const item = this._findUnopenedParent(Menu._getItem(el, true), closeChildren) + + if (!item) return + + const toggleLink = Menu._getLink(item, true) + + Menu._promisify(this._onOpen, this, item, toggleLink, Menu._findMenu(item)) + .then(() => { + if (!this._horizontal || !Menu._isRoot(item)) { + if (this._animate && !this._horizontal) { + window.requestAnimationFrame(() => this._toggleAnimation(true, item, false)) + if (this._accordion) this._closeOther(item, closeChildren) + } else if (this._animate) { + this._toggleDropdown(true, item, closeChildren) + // eslint-disable-next-line no-unused-expressions + this._onOpened && this._onOpened(this, item, toggleLink, Menu._findMenu(item)) + } else { + item.classList.add('open') + // eslint-disable-next-line no-unused-expressions + this._onOpened && this._onOpened(this, item, toggleLink, Menu._findMenu(item)) + if (this._accordion) this._closeOther(item, closeChildren) + } + } else { + this._toggleDropdown(true, item, closeChildren) + // eslint-disable-next-line no-unused-expressions + this._onOpened && this._onOpened(this, item, toggleLink, Menu._findMenu(item)) + } + }) + .catch(() => {}) + } + + close(el, closeChildren = this._closeChildren, _autoClose = false) { + const item = Menu._getItem(el, true) + const toggleLink = Menu._getLink(el, true) + + if (!item.classList.contains('open') || item.classList.contains('disabled')) return + + Menu._promisify(this._onClose, this, item, toggleLink, Menu._findMenu(item), _autoClose) + .then(() => { + if (!this._horizontal || !Menu._isRoot(item)) { + if (this._animate && !this._horizontal) { + window.requestAnimationFrame(() => this._toggleAnimation(false, item, closeChildren)) + } else { + item.classList.remove('open') + + if (closeChildren) { + const opened = item.querySelectorAll('.menu-item.open') + for (let i = 0, l = opened.length; i < l; i++) opened[i].classList.remove('open') + } + + // eslint-disable-next-line no-unused-expressions + this._onClosed && this._onClosed(this, item, toggleLink, Menu._findMenu(item)) + } + } else { + this._toggleDropdown(false, item, closeChildren) + // eslint-disable-next-line no-unused-expressions + this._onClosed && this._onClosed(this, item, toggleLink, Menu._findMenu(item)) + } + }) + .catch(() => {}) + } + + _closeOther(item, closeChildren) { + const opened = Menu._findChild(item.parentNode, ['menu-item', 'open']) + + for (let i = 0, l = opened.length; i < l; i++) { + if (opened[i] !== item) this.close(opened[i], closeChildren) + } + } + + toggle(el, closeChildren = this._closeChildren) { + const item = Menu._getItem(el, true) + // const toggleLink = Menu._getLink(el, true) + + if (item.classList.contains('open')) this.close(item, closeChildren) + else this.open(item, closeChildren) + } + + _toggleDropdown(show, item, closeChildren) { + const menu = Menu._findMenu(item) + const actualItem = item + let subMenuItem = false + + if (show) { + if (Menu._findParent(item, 'menu-sub', false)) { + subMenuItem = true + item = this._topParent ? this._topParent.parentNode : item + } + + const wrapperWidth = Math.round(this._wrapper.getBoundingClientRect().width) + const position = this._innerPosition + const itemOffset = this._getItemOffset(item) + const itemWidth = Math.round(item.getBoundingClientRect().width) + + if (itemOffset - DELTA <= -1 * position) { + this._innerPosition = -1 * itemOffset + } else if (itemOffset + position + itemWidth + DELTA >= wrapperWidth) { + if (itemWidth > wrapperWidth) { + this._innerPosition = -1 * itemOffset + } else { + this._innerPosition = -1 * (itemOffset + itemWidth - wrapperWidth) + } + } + + actualItem.classList.add('open') + + const menuWidth = Math.round(menu.getBoundingClientRect().width) + + if (subMenuItem) { + if ( + itemOffset + this._innerPosition + menuWidth * 2 > wrapperWidth && + menuWidth < wrapperWidth && + menuWidth >= itemWidth + ) { + menu.style.left = [this._rtl ? '100%' : '-100%'] + } + } else if ( + itemOffset + this._innerPosition + menuWidth > wrapperWidth && + menuWidth < wrapperWidth && + menuWidth > itemWidth + ) { + menu.style[this._rtl ? 'marginRight' : 'marginLeft'] = `-${menuWidth - itemWidth}px` + } + + this._closeOther(actualItem, closeChildren) + this._updateSlider() + } else { + const toggle = Menu._findChild(item, ['menu-toggle']) + + // eslint-disable-next-line no-unused-expressions + toggle.length && toggle[0].removeAttribute('data-hover', 'true') + item.classList.remove('open') + menu.style[this._rtl ? 'marginRight' : 'marginLeft'] = null + + if (closeChildren) { + const opened = menu.querySelectorAll('.menu-item.open') + + for (let i = 0, l = opened.length; i < l; i++) opened[i].classList.remove('open') + } + } + } + + _slide(direction) { + const wrapperWidth = Math.round(this._wrapper.getBoundingClientRect().width) + const innerWidth = this._innerWidth + let newPosition + + if (direction === 'next') { + newPosition = this._getSlideNextPos() + + if (innerWidth + newPosition < wrapperWidth) { + newPosition = wrapperWidth - innerWidth + } + } else { + newPosition = this._getSlidePrevPos() + + if (newPosition > 0) newPosition = 0 + } + + this._innerPosition = newPosition + this.update() + } + + _getSlideNextPos() { + const wrapperWidth = Math.round(this._wrapper.getBoundingClientRect().width) + const position = this._innerPosition + let curItem = this._inner.childNodes[0] + let left = 0 + + while (curItem) { + if (curItem.tagName) { + const curItemWidth = Math.round(curItem.getBoundingClientRect().width) + + if (left + position - DELTA <= wrapperWidth && left + position + curItemWidth + DELTA >= wrapperWidth) { + if (curItemWidth > wrapperWidth && left === -1 * position) left += curItemWidth + break + } + + left += curItemWidth + } + + curItem = curItem.nextSibling + } + + return -1 * left + } + + _getSlidePrevPos() { + const wrapperWidth = Math.round(this._wrapper.getBoundingClientRect().width) + const position = this._innerPosition + let curItem = this._inner.childNodes[0] + let left = 0 + + while (curItem) { + if (curItem.tagName) { + const curItemWidth = Math.round(curItem.getBoundingClientRect().width) + + if (left - DELTA <= -1 * position && left + curItemWidth + DELTA >= -1 * position) { + if (curItemWidth <= wrapperWidth) left = left + curItemWidth - wrapperWidth + break + } + + left += curItemWidth + } + + curItem = curItem.nextSibling + } + + return -1 * left + } + + static _getItem(el, toggle) { + let item = null + const selector = toggle ? 'menu-toggle' : 'menu-link' + + if (el.classList.contains('menu-item')) { + if (Menu._findChild(el, [selector]).length) item = el + } else if (el.classList.contains(selector)) { + item = el.parentNode.classList.contains('menu-item') ? el.parentNode : null + } + + if (!item) { + throw new Error(`${toggle ? 'Toggable ' : ''}\`.menu-item\` element not found.`) + } + + return item + } + + static _getLink(el, toggle) { + let found = [] + const selector = toggle ? 'menu-toggle' : 'menu-link' + + if (el.classList.contains(selector)) found = [el] + else if (el.classList.contains('menu-item')) found = Menu._findChild(el, [selector]) + + if (!found.length) throw new Error(`\`${selector}\` element not found.`) + + return found[0] + } + + _findUnopenedParent(item, closeChildren) { + let tree = [] + let parentItem = null + + while (item) { + if (item.classList.contains('disabled')) { + parentItem = null + tree = [] + } else { + if (!item.classList.contains('open')) parentItem = item + tree.push(item) + } + + item = Menu._findParent(item, 'menu-item', false) + } + + if (!parentItem) return null + if (tree.length === 1) return parentItem + + tree = tree.slice(0, tree.indexOf(parentItem)) + + for (let i = 0, l = tree.length; i < l; i++) { + tree[i].classList.add('open') + + if (this._accordion) { + const openedItems = Menu._findChild(tree[i].parentNode, ['menu-item', 'open']) + + for (let j = 0, k = openedItems.length; j < k; j++) { + if (openedItems[j] !== tree[i]) { + openedItems[j].classList.remove('open') + + if (closeChildren) { + const openedChildren = openedItems[j].querySelectorAll('.menu-item.open') + for (let x = 0, z = openedChildren.length; x < z; x++) { + openedChildren[x].classList.remove('open') + } + } + } + } + } + } + + return parentItem + } + + _toggleAnimation(open, item, closeChildren) { + const toggleLink = Menu._getLink(item, true) + const menu = Menu._findMenu(item) + + Menu._unbindAnimationEndEvent(item) + + const linkHeight = Math.round(toggleLink.getBoundingClientRect().height) + + item.style.overflow = 'hidden' + + const clearItemStyle = () => { + item.classList.remove('menu-item-animating') + item.classList.remove('menu-item-closing') + item.style.overflow = null + item.style.height = null + + if (!this._horizontal) this.update() + } + + if (open) { + item.style.height = `${linkHeight}px` + item.classList.add('menu-item-animating') + item.classList.add('open') + + Menu._bindAnimationEndEvent(item, () => { + clearItemStyle() + this._onOpened(this, item, toggleLink, menu) + }) + + setTimeout(() => { + item.style.height = `${linkHeight + Math.round(menu.getBoundingClientRect().height)}px` + }, 50) + } else { + item.style.height = `${linkHeight + Math.round(menu.getBoundingClientRect().height)}px` + item.classList.add('menu-item-animating') + item.classList.add('menu-item-closing') + + Menu._bindAnimationEndEvent(item, () => { + item.classList.remove('open') + clearItemStyle() + + if (closeChildren) { + const opened = item.querySelectorAll('.menu-item.open') + for (let i = 0, l = opened.length; i < l; i++) opened[i].classList.remove('open') + } + + this._onClosed(this, item, toggleLink, menu) + }) + + setTimeout(() => { + item.style.height = `${linkHeight}px` + }, 50) + } + } + + static _bindAnimationEndEvent(el, handler) { + const cb = e => { + if (e.target !== el) return + Menu._unbindAnimationEndEvent(el) + handler(e) + } + + let duration = window.getComputedStyle(el).transitionDuration + duration = parseFloat(duration) * (duration.indexOf('ms') !== -1 ? 1 : 1000) + + el._menuAnimationEndEventCb = cb + TRANSITION_EVENTS.forEach(ev => el.addEventListener(ev, el._menuAnimationEndEventCb, false)) + + el._menuAnimationEndEventTimeout = setTimeout(() => { + cb({ target: el }) + }, duration + 50) + } + + _getItemOffset(item) { + let curItem = this._inner.childNodes[0] + let left = 0 + + while (curItem !== item) { + if (curItem.tagName) { + left += Math.round(curItem.getBoundingClientRect().width) + } + + curItem = curItem.nextSibling + } + + return left + } + + _updateSlider(wrapperWidth = null, innerWidth = null, position = null) { + const _wrapperWidth = wrapperWidth !== null ? wrapperWidth : Math.round(this._wrapper.getBoundingClientRect().width) + const _innerWidth = innerWidth !== null ? innerWidth : this._innerWidth + const _position = position !== null ? position : this._innerPosition + + if (_innerWidth < _wrapperWidth || window.innerWidth < window.Helpers.LAYOUT_BREAKPOINT) { + this._prevBtn.classList.add('d-none') + this._nextBtn.classList.add('d-none') + } else { + this._prevBtn.classList.remove('d-none') + this._nextBtn.classList.remove('d-none') + } + if (_innerWidth > _wrapperWidth && window.innerWidth > window.Helpers.LAYOUT_BREAKPOINT) { + if (_position === 0) this._prevBtn.classList.add('disabled') + else this._prevBtn.classList.remove('disabled') + + if (_innerWidth + _position <= _wrapperWidth) this._nextBtn.classList.add('disabled') + else this._nextBtn.classList.remove('disabled') + } + } + + static _promisify(fn, ...args) { + const result = fn(...args) + if (result instanceof Promise) { + return result + } + if (result === false) { + return Promise.reject() + } + return Promise.resolve() + } + + get _innerWidth() { + const items = this._inner.childNodes + let width = 0 + + for (let i = 0, l = items.length; i < l; i++) { + if (items[i].tagName) { + width += Math.round(items[i].getBoundingClientRect().width) + } + } + + return width + } + + get _innerPosition() { + return parseInt(this._inner.style[this._rtl ? 'marginRight' : 'marginLeft'] || '0px', 10) + } + + set _innerPosition(value) { + this._inner.style[this._rtl ? 'marginRight' : 'marginLeft'] = `${value}px` + return value + } + + static _unbindAnimationEndEvent(el) { + const cb = el._menuAnimationEndEventCb + + if (el._menuAnimationEndEventTimeout) { + clearTimeout(el._menuAnimationEndEventTimeout) + el._menuAnimationEndEventTimeout = null + } + + if (!cb) return + + TRANSITION_EVENTS.forEach(ev => el.removeEventListener(ev, cb, false)) + el._menuAnimationEndEventCb = null + } + + closeAll(closeChildren = this._closeChildren) { + const opened = this._el.querySelectorAll('.menu-inner > .menu-item.open') + + for (let i = 0, l = opened.length; i < l; i++) this.close(opened[i], closeChildren) + } + + static setDisabled(el, disabled) { + Menu._getItem(el, false).classList[disabled ? 'add' : 'remove']('disabled') + } + + static isActive(el) { + return Menu._getItem(el, false).classList.contains('active') + } + + static isOpened(el) { + return Menu._getItem(el, false).classList.contains('open') + } + + static isDisabled(el) { + return Menu._getItem(el, false).classList.contains('disabled') + } + + update() { + if (!this._horizontal) { + if (this._scrollbar) { + this._scrollbar.update() + } + } else { + this.closeAll() + + const wrapperWidth = Math.round(this._wrapper.getBoundingClientRect().width) + const innerWidth = this._innerWidth + let position = this._innerPosition + + if (wrapperWidth - position > innerWidth) { + position = wrapperWidth - innerWidth + if (position > 0) position = 0 + this._innerPosition = position + } + + this._updateSlider(wrapperWidth, innerWidth, position) + } + } + + manageScroll() { + const { PerfectScrollbar } = window + const menuInner = document.querySelector('.menu-inner') + + if (window.innerWidth < window.Helpers.LAYOUT_BREAKPOINT) { + if (this._scrollbar !== null) { + // window.Helpers.menuPsScroll.destroy() + this._scrollbar.destroy() + this._scrollbar = null + } + menuInner.classList.add('overflow-auto') + } else { + if (this._scrollbar === null) { + const menuScroll = new PerfectScrollbar(document.querySelector('.menu-inner'), { + suppressScrollX: true, + wheelPropagation: false + }) + // window.Helpers.menuPsScroll = menuScroll + this._scrollbar = menuScroll + } + menuInner.classList.remove('overflow-auto') + } + } + + switchMenu(menu) { + // Unbind Events + this._unbindEvents() + + // const html = document.documentElement + const navbar = document.querySelector('nav.layout-navbar') + const navbarCollapse = document.querySelector('#navbar-collapse') + /* const fullNavbar = document.querySelector('.layout-navbar-full') + const contentNavbar = document.querySelector('.layout-content-navbar') + const contentWrapper = document.querySelector('.content-wrapper') */ + const asideMenuWrapper = document.querySelector('#layout-menu div') + const asideMenu = document.querySelector('#layout-menu') + const horzMenuClasses = ['layout-menu-horizontal', 'menu', 'menu-horizontal', 'container-fluid', 'flex-grow-0'] + const vertMenuClasses = ['layout-menu', 'menu', 'menu-vertical'] + const horzMenuWrapper = document.querySelector('.menu-horizontal-wrapper') + const menuInner = document.querySelector('.menu-inner') + const brand = document.querySelector('.app-brand') + const menuToggler = document.querySelector('.layout-menu-toggle') + const activeMenuItems = document.querySelectorAll('.menu-inner .active') + /* const layoutPage = document.querySelector('.layout-page') + const layoutContainer = document.querySelector('.layout-container') + const content = document.querySelector('.container-fluid') */ + + // const { PerfectScrollbar } = window + + if (menu === 'vertical') { + this._horizontal = false + asideMenuWrapper.insertBefore(brand, horzMenuWrapper) + asideMenuWrapper.insertBefore(menuInner, horzMenuWrapper) + asideMenuWrapper.classList.add('flex-column', 'p-0') + asideMenu.classList.remove(...asideMenu.classList) + asideMenu.classList.add(...vertMenuClasses, this._menuBgClass) + brand.classList.remove('d-none', 'd-lg-flex') + menuToggler.classList.remove('d-none') + // if (PerfectScrollbar !== undefined) { + // this._psScroll = new PerfectScrollbar(document.querySelector('.menu-inner'), { + // suppressScrollX: true, + // wheelPropagation: !Menu._hasClass('layout-menu-fixed layout-menu-fixed-offcanvas') + // }) + // } + + menuInner.classList.add('overflow-auto') + + // Add open class to active items + for (let i = 0; i < activeMenuItems.length - 1; ++i) { + activeMenuItems[i].classList.add('open') + } + } else { + this._horizontal = true + navbar.children[0].insertBefore(brand, navbarCollapse) + brand.classList.add('d-none', 'd-lg-flex') + horzMenuWrapper.appendChild(menuInner) + asideMenuWrapper.classList.remove('flex-column', 'p-0') + asideMenu.classList.remove(...asideMenu.classList) + asideMenu.classList.add(...horzMenuClasses, this._menuBgClass) + menuToggler.classList.add('d-none') + menuInner.classList.remove('overflow-auto') + + // if (PerfectScrollbar !== undefined && this._psScroll !== null) { + // this._psScroll.destroy() + // this._psScroll = null + // } + + // Remove open class from active items + for (let i = 0; i < activeMenuItems.length; ++i) { + activeMenuItems[i].classList.remove('open') + } + } + + this._bindEvents() + } + + destroy() { + if (!this._el) return + + this._unbindEvents() + + const items = this._el.querySelectorAll('.menu-item') + for (let i = 0, l = items.length; i < l; i++) { + Menu._unbindAnimationEndEvent(items[i]) + items[i].classList.remove('menu-item-animating') + items[i].classList.remove('open') + items[i].style.overflow = null + items[i].style.height = null + } + + const menus = this._el.querySelectorAll('.menu-menu') + for (let i2 = 0, l2 = menus.length; i2 < l2; i2++) { + menus[i2].style.marginRight = null + menus[i2].style.marginLeft = null + } + + this._el.classList.remove('menu-no-animation') + + if (this._wrapper) { + this._prevBtn.parentNode.removeChild(this._prevBtn) + this._nextBtn.parentNode.removeChild(this._nextBtn) + this._wrapper.parentNode.insertBefore(this._inner, this._wrapper) + this._wrapper.parentNode.removeChild(this._wrapper) + this._inner.style.marginLeft = null + this._inner.style.marginRight = null + } + + this._el.menuInstance = null + delete this._el.menuInstance + + this._el = null + this._horizontal = null + this._animate = null + this._accordion = null + this._showDropdownOnHover = null + this._closeChildren = null + this._rtl = null + this._onOpen = null + this._onOpened = null + this._onClose = null + this._onClosed = null + if (this._scrollbar) { + this._scrollbar.destroy() + this._scrollbar = null + } + this._inner = null + this._prevBtn = null + this._wrapper = null + this._nextBtn = null + } +} diff --git a/src/main/webapp/resources/3rd-party/sneat/js/template-customizer.js b/src/main/webapp/resources/3rd-party/sneat/js/template-customizer.js deleted file mode 100644 index 7b1f6a1c..00000000 --- a/src/main/webapp/resources/3rd-party/sneat/js/template-customizer.js +++ /dev/null @@ -1,274 +0,0 @@ -/* - * ATTENTION: An "eval-source-map" devtool has been used. - * This devtool is neither made for production nor for readable output files. - * It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools. - * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) - * or disable the default devtool with "devtool: false". - * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). - */ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define([], factory); - else { - var a = factory(); - for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i]; - } -})(self, function() { -return /******/ (function() { // webpackBootstrap -/******/ "use strict"; -/******/ var __webpack_modules__ = ({ - -/***/ "./js/template-customizer.js": -/*!***********************************!*\ - !*** ./js/template-customizer.js ***! - \***********************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"TemplateCustomizer\": function() { return /* binding */ TemplateCustomizer; }\n/* harmony export */ });\n/* harmony import */ var _template_customizer_template_customizer_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_template-customizer/_template-customizer.scss */ \"./js/_template-customizer/_template-customizer.scss\");\n/* harmony import */ var _template_customizer_template_customizer_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_template-customizer/_template-customizer.html */ \"./js/_template-customizer/_template-customizer.html\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\n\n\nvar CSS_FILENAME_PATTERN = '%name%.css';\nvar CONTROLS = ['rtl', 'style', 'layoutType', 'layoutMenuFlipped', 'showDropdownOnHover', 'layoutNavbarFixed', 'layoutFooterFixed', 'themes'];\nvar STYLES = ['light', 'dark'];\nvar cl = document.documentElement.classList;\nvar DISPLAY_CUSTOMIZER = true;\nvar DEFAULT_THEME = document.getElementsByTagName('HTML')[0].getAttribute('data-theme') || 0;\nvar DEFAULT_STYLE = cl.contains('dark-style') ? 'dark' : 'light';\nvar DEFAULT_TEXT_DIR = document.documentElement.getAttribute('dir') === 'rtl';\nvar DEFAULT_MENU_COLLAPSED = !!cl.contains('layout-menu-collapsed');\nvar DEFAULT_MENU_FLIPPED = !!cl.contains('layout-menu-flipped');\nvar DEFAULT_SHOW_DROPDOWN_ON_HOVER = undefined;\nvar DEFAULT_NAVBAR_FIXED = !!cl.contains('layout-navbar-fixed');\nvar DEFAULT_FOOTER_FIXED = !!cl.contains('layout-footer-fixed');\nvar layoutType;\nif (cl.contains('layout-menu-offcanvas')) {\n layoutType = 'static-offcanvas';\n} else if (cl.contains('layout-menu-fixed')) {\n layoutType = 'fixed';\n} else if (cl.contains('layout-menu-fixed-offcanvas')) {\n layoutType = 'fixed-offcanvas';\n} else {\n layoutType = 'static';\n}\nvar DEFAULT_LAYOUT_TYPE = layoutType;\nvar TemplateCustomizer = /*#__PURE__*/function () {\n function TemplateCustomizer(_ref) {\n var cssPath = _ref.cssPath,\n themesPath = _ref.themesPath,\n cssFilenamePattern = _ref.cssFilenamePattern,\n displayCustomizer = _ref.displayCustomizer,\n controls = _ref.controls,\n defaultTextDir = _ref.defaultTextDir,\n defaultLayoutType = _ref.defaultLayoutType,\n defaultMenuCollapsed = _ref.defaultMenuCollapsed,\n defaultMenuFlipped = _ref.defaultMenuFlipped,\n defaultShowDropdownOnHover = _ref.defaultShowDropdownOnHover,\n defaultNavbarFixed = _ref.defaultNavbarFixed,\n defaultFooterFixed = _ref.defaultFooterFixed,\n styles = _ref.styles,\n defaultStyle = _ref.defaultStyle,\n availableThemes = _ref.availableThemes,\n defaultTheme = _ref.defaultTheme,\n pathResolver = _ref.pathResolver,\n onSettingsChange = _ref.onSettingsChange,\n lang = _ref.lang;\n _classCallCheck(this, TemplateCustomizer);\n if (this._ssr) return;\n if (!window.Helpers) throw new Error('window.Helpers required.');\n this.settings = {};\n this.settings.cssPath = cssPath;\n this.settings.themesPath = themesPath;\n this.settings.cssFilenamePattern = cssFilenamePattern || CSS_FILENAME_PATTERN;\n this.settings.displayCustomizer = typeof displayCustomizer !== 'undefined' ? displayCustomizer : DISPLAY_CUSTOMIZER;\n this.settings.controls = controls || CONTROLS;\n this.settings.defaultTextDir = defaultTextDir === 'rtl' ? true : false || DEFAULT_TEXT_DIR;\n this.settings.defaultLayoutType = defaultLayoutType || DEFAULT_LAYOUT_TYPE;\n this.settings.defaultMenuCollapsed = typeof defaultMenuCollapsed !== 'undefined' ? defaultMenuCollapsed : DEFAULT_MENU_COLLAPSED;\n this.settings.defaultMenuFlipped = typeof defaultMenuFlipped !== 'undefined' ? defaultMenuFlipped : DEFAULT_MENU_FLIPPED;\n this.settings.defaultShowDropdownOnHover = typeof defaultShowDropdownOnHover !== 'undefined' ? defaultShowDropdownOnHover : DEFAULT_SHOW_DROPDOWN_ON_HOVER;\n this.settings.defaultNavbarFixed = typeof defaultNavbarFixed !== 'undefined' ? defaultNavbarFixed : DEFAULT_NAVBAR_FIXED;\n this.settings.defaultFooterFixed = typeof defaultFooterFixed !== 'undefined' ? defaultFooterFixed : DEFAULT_FOOTER_FIXED;\n this.settings.availableThemes = availableThemes || TemplateCustomizer.THEMES;\n this.settings.defaultTheme = this._getDefaultTheme(typeof defaultTheme !== 'undefined' ? defaultTheme : DEFAULT_THEME);\n this.settings.styles = styles || STYLES;\n this.settings.defaultStyle = defaultStyle || DEFAULT_STYLE;\n this.settings.lang = lang || 'en';\n this.pathResolver = pathResolver || function (p) {\n return p;\n };\n if (this.settings.styles.length < 2) {\n var i = this.settings.controls.indexOf('style');\n if (i !== -1) {\n this.settings.controls = this.settings.controls.slice(0, i).concat(this.settings.controls.slice(i + 1));\n }\n }\n this.settings.onSettingsChange = typeof onSettingsChange === 'function' ? onSettingsChange : function () {};\n this._loadSettings();\n this._listeners = [];\n this._controls = {};\n this._initDirection();\n this._initStyle();\n this._initTheme();\n this.setLayoutType(this.settings.layoutType, false);\n this.setLayoutMenuFlipped(this.settings.layoutMenuFlipped, false);\n this.setDropdownOnHover(this.settings.showDropdownOnHover, false);\n this.setLayoutNavbarFixed(this.settings.layoutNavbarFixed, false);\n this.setLayoutFooterFixed(this.settings.layoutFooterFixed, false);\n this._setup();\n }\n _createClass(TemplateCustomizer, [{\n key: \"setRtl\",\n value: function setRtl(rtl) {\n if (!this._hasControls('rtl')) return;\n this._setSetting('Rtl', String(rtl));\n window.location.reload();\n }\n }, {\n key: \"setStyle\",\n value: function setStyle(style) {\n if (!this._hasControls('style')) return;\n this._setSetting('Style', ['dark'].indexOf(style) === -1 ? 'light' : style);\n window.location.reload();\n }\n }, {\n key: \"setTheme\",\n value: function setTheme(themeName) {\n var updateStorage = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var cb = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n if (!this._hasControls('themes')) return;\n var theme = this._getThemeByName(themeName);\n if (!theme) return;\n this.settings.theme = theme;\n if (updateStorage) this._setSetting('Theme', themeName);\n var themeUrl = this.pathResolver(this.settings.themesPath + this.settings.cssFilenamePattern.replace('%name%', themeName + (this.settings.style !== 'light' ? \"-\".concat(this.settings.style) : '')));\n this._loadStylesheets(_defineProperty({}, themeUrl, document.querySelector('.template-customizer-theme-css')), cb || function () {});\n if (updateStorage) this.settings.onSettingsChange.call(this, this.settings);\n }\n }, {\n key: \"setLayoutType\",\n value: function setLayoutType(pos) {\n var updateStorage = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (!this._hasControls('layoutType')) return;\n if (pos !== 'static' && pos !== 'static-offcanvas' && pos !== 'fixed' && pos !== 'fixed-offcanvas') return;\n this.settings.layoutType = pos;\n if (updateStorage) this._setSetting('LayoutType', pos);\n window.Helpers.setPosition(pos === 'fixed' || pos === 'fixed-offcanvas', pos === 'static-offcanvas' || pos === 'fixed-offcanvas');\n if (updateStorage) this.settings.onSettingsChange.call(this, this.settings);\n\n // Perfectscrollbar change on Layout change\n var menuScroll = window.Helpers.menuPsScroll;\n var PerfectScrollbarLib = window.PerfectScrollbar;\n if (this.settings.layoutType === 'fixed' || this.settings.layoutType === 'fixed-offcanvas') {\n // Set perfectscrollbar wheelPropagation false for fixed layout\n if (PerfectScrollbarLib && menuScroll) {\n window.Helpers.menuPsScroll.destroy();\n menuScroll = new PerfectScrollbarLib(document.querySelector('.menu-inner'), {\n suppressScrollX: true,\n wheelPropagation: false\n });\n window.Helpers.menuPsScroll = menuScroll;\n }\n } else if (menuScroll) {\n // Destroy perfectscrollbar for static layout\n window.Helpers.menuPsScroll.destroy();\n }\n }\n }, {\n key: \"setLayoutMenuFlipped\",\n value: function setLayoutMenuFlipped(flipped) {\n var updateStorage = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (!this._hasControls('layoutMenuFlipped')) return;\n this.settings.layoutMenuFlipped = flipped;\n if (updateStorage) this._setSetting('MenuFlipped', flipped);\n window.Helpers.setFlipped(flipped);\n if (updateStorage) this.settings.onSettingsChange.call(this, this.settings);\n }\n }, {\n key: \"setDropdownOnHover\",\n value: function setDropdownOnHover(open) {\n var updateStorage = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (!this._hasControls('showDropdownOnHover')) return;\n this.settings.showDropdownOnHover = open;\n if (updateStorage) this._setSetting('ShowDropdownOnHover', open);\n if (window.Helpers.mainMenu) {\n window.Helpers.mainMenu.destroy();\n config.showDropdownOnHover = open;\n var _window = window,\n Menu = _window.Menu;\n window.Helpers.mainMenu = new Menu(document.getElementById('layout-menu'), {\n orientation: 'horizontal',\n closeChildren: true,\n showDropdownOnHover: config.showDropdownOnHover\n });\n }\n if (updateStorage) this.settings.onSettingsChange.call(this, this.settings);\n }\n }, {\n key: \"setLayoutNavbarFixed\",\n value: function setLayoutNavbarFixed(fixed) {\n var updateStorage = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (!this._hasControls('layoutNavbarFixed')) return;\n this.settings.layoutNavbarFixed = fixed;\n if (updateStorage) this._setSetting('FixedNavbar', fixed);\n window.Helpers.setNavbarFixed(fixed);\n if (updateStorage) this.settings.onSettingsChange.call(this, this.settings);\n }\n }, {\n key: \"setLayoutFooterFixed\",\n value: function setLayoutFooterFixed(fixed) {\n var updateStorage = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (!this._hasControls('layoutFooterFixed')) return;\n this.settings.layoutFooterFixed = fixed;\n if (updateStorage) this._setSetting('FixedFooter', fixed);\n window.Helpers.setFooterFixed(fixed);\n if (updateStorage) this.settings.onSettingsChange.call(this, this.settings);\n }\n }, {\n key: \"setLang\",\n value: function setLang(lang) {\n var _this = this;\n var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n if (lang === this.settings.lang && !force) return;\n if (!TemplateCustomizer.LANGUAGES[lang]) throw new Error(\"Language \\\"\".concat(lang, \"\\\" not found!\"));\n var t = TemplateCustomizer.LANGUAGES[lang];\n ['panel_header', 'panel_sub_header', 'theming_header', 'theme_header', 'style_label', 'style_switch_light', 'style_switch_dark', 'layout_header', 'layout_label', 'layout_static', 'layout_offcanvas', 'layout_fixed', 'layout_fixed_offcanvas', 'layout_flipped_label', 'layout_dd_open_label', 'layout_navbar_label', 'layout_footer_label', 'misc_header', 'theme_label', 'rtl_label'].forEach(function (key) {\n var el = _this.container.querySelector(\".template-customizer-t-\".concat(key));\n // eslint-disable-next-line no-unused-expressions\n el && (el.textContent = t[key]);\n });\n var tt = t.themes || {};\n var themes = this.container.querySelectorAll('.template-customizer-theme-item') || [];\n for (var i = 0, l = themes.length; i < l; i++) {\n var themeName = themes[i].querySelector('input[type=\"radio\"]').value;\n themes[i].querySelector('.template-customizer-theme-name').textContent = tt[themeName] || this._getThemeByName(themeName).title;\n }\n this.settings.lang = lang;\n }\n\n // Update theme settings control\n }, {\n key: \"update\",\n value: function update() {\n if (this._ssr) return;\n var hasNavbar = !!document.querySelector('.layout-navbar');\n var hasMenu = !!document.querySelector('.layout-menu');\n var hasHorizontalMenu = !!document.querySelector('.layout-menu-horizontal.menu, .layout-menu-horizontal .menu');\n var isLayout1 = !!document.querySelector('.layout-wrapper.layout-navbar-full');\n var hasFooter = !!document.querySelector('.content-footer');\n if (this._controls.layoutMenuFlipped) {\n if (!hasMenu) {\n this._controls.layoutMenuFlipped.setAttribute('disabled', 'disabled');\n this._controls.layoutMenuFlipped.classList.add('disabled');\n } else {\n this._controls.layoutMenuFlipped.removeAttribute('disabled');\n this._controls.layoutMenuFlipped.classList.remove('disabled');\n }\n }\n if (this._controls.showDropdownOnHover) {\n if (hasMenu) {\n this._controls.showDropdownOnHover.setAttribute('disabled', 'disabled');\n this._controls.showDropdownOnHover.classList.add('disabled');\n } else {\n this._controls.showDropdownOnHover.removeAttribute('disabled');\n this._controls.showDropdownOnHover.classList.remove('disabled');\n }\n }\n if (this._controls.layoutNavbarFixed) {\n if (!hasNavbar) {\n this._controls.layoutNavbarFixed.setAttribute('disabled', 'disabled');\n this._controls.layoutNavbarFixedW.classList.add('disabled');\n } else {\n this._controls.layoutNavbarFixed.removeAttribute('disabled');\n this._controls.layoutNavbarFixedW.classList.remove('disabled');\n }\n\n // Horizontal menu fixed layout - disabled fixed navbar switch\n if (hasHorizontalMenu && hasNavbar && this.settings.layoutType == 'fixed') {\n this._controls.layoutNavbarFixed.setAttribute('disabled', 'disabled');\n this._controls.layoutNavbarFixedW.classList.add('disabled');\n }\n }\n if (this._controls.layoutFooterFixed) {\n if (!hasFooter) {\n this._controls.layoutFooterFixed.setAttribute('disabled', 'disabled');\n this._controls.layoutFooterFixedW.classList.add('disabled');\n } else {\n this._controls.layoutFooterFixed.removeAttribute('disabled');\n this._controls.layoutFooterFixedW.classList.remove('disabled');\n }\n }\n if (this._controls.layoutType) {\n // ? Uncomment If using offcanvas layout\n /*\r\n if (!hasMenu) {\r\n this._controls.layoutType.querySelector('[value=\"static-offcanvas\"]').setAttribute('disabled', 'disabled')\r\n this._controls.layoutType.querySelector('[value=\"fixed-offcanvas\"]').setAttribute('disabled', 'disabled')\r\n } else {\r\n this._controls.layoutType.querySelector('[value=\"static-offcanvas\"]').removeAttribute('disabled')\r\n this._controls.layoutType.querySelector('[value=\"fixed-offcanvas\"]').removeAttribute('disabled')\r\n }\r\n */\n\n // Disable menu layouts options if menu (vertical or horizontal) is not there\n // if ((!hasNavbar && !hasMenu) || (!hasMenu && !isLayout1)) {\n if (hasMenu || hasHorizontalMenu) {\n // (Updated condition)\n this._controls.layoutType.removeAttribute('disabled');\n } else {\n this._controls.layoutType.setAttribute('disabled', 'disabled');\n }\n }\n }\n\n // Clear local storage\n }, {\n key: \"clearLocalStorage\",\n value: function clearLocalStorage() {\n if (this._ssr) return;\n this._setSetting('Theme', '');\n this._setSetting('Rtl', '');\n this._setSetting('Style', '');\n this._setSetting('MenuFlipped', '');\n this._setSetting('FixedNavbar', '');\n this._setSetting('FixedFooter', '');\n this._setSetting('LayoutType', '');\n }\n\n // Clear local storage\n }, {\n key: \"destroy\",\n value: function destroy() {\n if (this._ssr) return;\n this._cleanup();\n this.settings = null;\n this.container.parentNode.removeChild(this.container);\n this.container = null;\n }\n }, {\n key: \"_loadSettings\",\n value: function _loadSettings() {\n // Get settings\n\n // const cl = document.documentElement.classList;\n var rtl = this._getSetting('Rtl');\n var style = this._getSetting('Style');\n var collapsedMenu = this._getSetting('LayoutCollapsed'); // Value will be set from main.js\n var flippedMenu = this._getSetting('LayoutMenuFlipped');\n var dropdownOnHover = this._getSetting('ShowDropdownOnHover'); // Value will be set from main.js\n var fixedNavbar = this._getSetting('FixedNavbar');\n var fixedFooter = this._getSetting('FixedFooter');\n var lType = this._getSetting('LayoutType');\n var type;\n if (lType !== '' && ['static', 'static-offcanvas', 'fixed', 'fixed-offcanvas'].indexOf(lType) !== -1) {\n type = lType;\n } else {\n type = this.settings.defaultLayoutType;\n }\n this.settings.layoutType = type;\n\n // ! Set settings by following priority: Local Storage, Theme Config, HTML Classes\n this.settings.rtl = rtl !== '' ? rtl === 'true' : this.settings.defaultTextDir;\n this.settings.style = this.settings.styles.indexOf(style) !== -1 ? style : this.settings.defaultStyle;\n if (this.settings.styles.indexOf(this.settings.style) === -1) {\n // eslint-disable-next-line prefer-destructuring\n this.settings.style = this.settings.styles[0];\n }\n this.settings.layoutMenu = collapsedMenu !== '' ? collapsedMenu === 'true' : this.settings.defaultMenuCollapsed;\n this.settings.layoutMenuFlipped = flippedMenu !== '' ? flippedMenu === 'true' : this.settings.defaultMenuFlipped;\n this.settings.showDropdownOnHover = dropdownOnHover !== '' ? dropdownOnHover === 'true' : this.settings.defaultShowDropdownOnHover;\n this.settings.layoutNavbarFixed = fixedNavbar !== '' ? fixedNavbar === 'true' : this.settings.defaultNavbarFixed;\n this.settings.layoutFooterFixed = fixedFooter !== '' ? fixedFooter === 'true' : this.settings.defaultFooterFixed;\n this.settings.theme = this._getThemeByName(this._getSetting('Theme'), true);\n\n // Filter options depending on available controls\n if (!this._hasControls('rtl')) this.settings.rtl = document.documentElement.getAttribute('dir') === 'rtl';\n if (!this._hasControls('style')) this.settings.style = cl.contains('dark-style') ? 'dark' : 'light';\n if (!this._hasControls('layoutType')) this.settings.layoutType = null;\n if (!this._hasControls('layoutMenuFlipped')) this.settings.layoutMenuFlipped = null;\n if (!this._hasControls('showDropdownOnHover')) this.settings.showDropdownOnHover = null;\n if (!this._hasControls('layoutNavbarFixed')) this.settings.layoutNavbarFixed = null;\n if (!this._hasControls('layoutFooterFixed')) this.settings.layoutFooterFixed = null;\n if (!this._hasControls('themes')) this.settings.theme = null;\n }\n\n // Setup theme settings controls and events\n }, {\n key: \"_setup\",\n value: function _setup() {\n var _this2 = this;\n var _container = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;\n this._cleanup();\n this.container = this._getElementFromString(_template_customizer_template_customizer_html__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n\n // Customizer visibility condition\n //\n var customizerW = this.container;\n if (this.settings.displayCustomizer) customizerW.setAttribute('style', 'visibility: visible');else customizerW.setAttribute('style', 'visibility: hidden');\n\n // Open btn\n //\n var openBtn = this.container.querySelector('.template-customizer-open-btn');\n var openBtnCb = function openBtnCb() {\n _this2.container.classList.add('template-customizer-open');\n _this2.update();\n if (_this2._updateInterval) clearInterval(_this2._updateInterval);\n _this2._updateInterval = setInterval(function () {\n _this2.update();\n }, 500);\n };\n openBtn.addEventListener('click', openBtnCb);\n this._listeners.push([openBtn, 'click', openBtnCb]);\n\n // Close btn\n //\n\n var closeBtn = this.container.querySelector('.template-customizer-close-btn');\n var closeBtnCb = function closeBtnCb() {\n _this2.container.classList.remove('template-customizer-open');\n if (_this2._updateInterval) {\n clearInterval(_this2._updateInterval);\n _this2._updateInterval = null;\n }\n };\n closeBtn.addEventListener('click', closeBtnCb);\n this._listeners.push([closeBtn, 'click', closeBtnCb]);\n\n // RTL\n //\n\n var rtlW = this.container.querySelector('.template-customizer-misc');\n // ? Hide RTL control in following 2 case\n if (!this._hasControls('rtl') || !rtlSupport) {\n rtlW.parentNode.removeChild(rtlW);\n } else {\n var rtl = rtlW.querySelector('input');\n if (this.settings.rtl) rtl.setAttribute('checked', 'checked');\n var rtlCb = function rtlCb(e) {\n _this2._loadingState(true);\n _this2.setRtl(e.target.checked);\n };\n rtl.addEventListener('change', rtlCb);\n this._listeners.push([rtl, 'change', rtlCb]);\n }\n\n // Style\n\n //\n\n var styleW = this.container.querySelector('.template-customizer-style');\n if (!this._hasControls('style')) {\n styleW.parentNode.removeChild(styleW);\n } else {\n var style = styleW.querySelector('input');\n if (this.settings.style === 'dark') style.setAttribute('checked', 'checked');\n var styleCb = function styleCb(e) {\n _this2._loadingState(true);\n if (e.target.checked) {\n _this2.setStyle('dark');\n } else {\n _this2.setStyle('light');\n }\n };\n style.addEventListener('change', styleCb);\n this._listeners.push([style, 'change', styleCb]);\n }\n\n // Theme\n\n var themesW = this.container.querySelector('.template-customizer-themes');\n if (!this._hasControls('themes')) {\n themesW.parentNode.removeChild(themesW);\n } else {\n var themesWInner = themesW.querySelector('.template-customizer-themes-options');\n this.settings.availableThemes.forEach(function (theme) {\n var themeEl = _this2._getElementFromString(\"