text: 
  /* Smart HTML Elements v7.4.0 (2020-Apr) 
  Copyright (c) 2011-2020 jQWidgets. 
  License: https://htmlelements.com/license/ */ //
  
  !function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=66)}({66:function(e,t){Smart("smart-list-menu",class extends Smart.Menu{static get properties(){return{displayLoadingIndicator:{value:!1,type:"boolean"},dropDownPosition:{value:"auto",allowedValues:["top-left","top-right","bottom-left","bottom-right","auto"],type:"string"},filterable:{value:!1,type:"boolean"},filterInputPlaceholder:{value:"",type:"string"},filterMode:{value:"containsIgnoreCase",allowedValues:["contains","containsIgnoreCase","doesNotContain","doesNotContainIgnoreCase","equals","equalsIgnoreCase","startsWith","startsWithIgnoreCase","endsWith","endsWithIgnoreCase"],type:"string"},grouped:{value:!1,type:"boolean"},loadingIndicatorPlaceholder:{value:"Loading...",type:"string"},loadingIndicatorPosition:{value:"center",allowedValues:["bottom","center","top"],type:"string"}}}static get listeners(){return{resize:"_resizeHandler","backButton.click":"_backButtonClickHandler","filterInput.keyup":"_filterInputKeyupHandler","mainContainer.down":"_mainContainerDownHandler","mainContainer.move":"_mainContainerMoveHandler","mainContainer.swipeleft":"_mainContainerSwipeHandler","mainContainer.swiperight":"_mainContainerSwipeHandler","mainContainer.touchmove":"_mainContainerTouchmoveHandler","mainContainer.touchstart":"_mainContainerTouchstartHandler","view.click":"_viewHandler","view.mouseout":"_viewHandler","view.mouseover":"_viewHandler","view.transitionend":"_viewHandler","view.wheel":"_wheelHandler"}}static get styleUrls(){return["smart.listmenu.css"]}template(){return`<div id="container" role="presentation">\n                    <div id="hamburgerIcon" class="smart-hamburger-icon smart-hidden" role="button" aria-label="Toggle minimized menu" aria-haspopup="true">\n                        <div id="hamburgerIconLineTop" class="smart-hamburger-icon-line smart-hamburger-icon-line-top" role="presentation"></div>\n                        <div id="hamburgerIconLineCenter" class="smart-hamburger-icon-line smart-hamburger-icon-line-center" role="presentation"></div>\n                        <div id="hamburgerIconLineBottom" class="smart-hamburger-icon-line smart-hamburger-icon-line-bottom" role="presentation"></div>\n                        <div id="customIconContainer" class="smart-hamburger-icon-custom-container smart-hidden" role="presentation"></div>\n                    </div>\n                    <div id="view" class="smart-list-menu-view" role="presentation">\n                        <div id="header" class="smart-header smart-hidden" role="heading" aria-level="1">\n                            <smart-button id="backButton" animation="[[animation]]" disabled="[[disabled]]" unfocusable right-to-left="[[rightToLeft]]" aria-label="Back">\n                                <div id="backButtonArrow" class="smart-arrow ${this.rightToLeft?"smart-arrow-right":"smart-arrow-left"}" aria-hidden="true"></div>\n                            </smart-button>\n                            <div id="title" class="smart-title"></div>\n                        </div>\n                        <div class="smart-list-menu-filter-input-container smart-hidden" id="filterInputContainer" role="presentation"><input id="filterInput" class="smart-filter-input" disabled="[[disabled]]" placeholder="[[filterInputPlaceholder]]" type="text" role="searchbox" aria-label="[[filterInputPlaceholder]]" /></div>\n                        <smart-repeat-button id="scrollButtonNear" class="smart-menu-scroll-button smart-spin-button smart-scroll-button-near smart-hidden" animation="[[animation]]" unfocusable aria-label="Scroll up">\n                            <div id="arrowNear" class="smart-arrow smart-arrow-up" right-to-left="[[rightToLeft]]"></div>\n                        </smart-repeat-button>\n                        <div id="mainContainer" class="smart-menu-main-container" role="presentation">\n                            <content></content>\n                        </div>\n                        <smart-repeat-button id="scrollButtonFar" class="smart-menu-scroll-button smart-spin-button smart-scroll-button-far smart-hidden" animation="[[animation]]" unfocusable right-to-left="[[rightToLeft]]" aria-label="Scroll down">\n                            <div id="arrowFar" class="smart-arrow smart-arrow-down"></div>\n                        </smart-repeat-button>\n                        <div id="loadingIndicatorContainer" class="smart-loader-container smart-hidden" role="presentation">\n                            <span id="loadingIndicator" class="smart-loader" role="img" aria-label="[[loadingIndicatorPlaceholder]]"></span>\n                            <span id="loadingIndicatorPlaceHolder" class="smart-loader-label smart-hidden">[[loadingIndicatorPlaceholder]]</span>\n                        </div>\n                    </div>\n                </div>`}attached(){const e=this;super.attached(),e.isCompleted&&null!==e.dropDownAppendTo&&e._minimized&&e._dropDownParent.appendChild(e.$.view)}detached(){const e=this;super.detached(),e._close(),null!==e.dropDownAppendTo&&e._minimized&&e._dropDownParent.removeChild(e.$.view)}addItem(e,t){const i=this;if(!(e instanceof Smart.MenuItem||e instanceof Smart.MenuItemsGroup))return;let n,r,o,a;if(void 0===t)n=void 0,r=1,o=t=i.$.mainContainer,a=i._topLevelFilter;else{if("string"==typeof t&&(t=i.getItem(t)),void 0===t||!(t instanceof Smart.MenuItemsGroup)||!i.contains(t)&&t.closest(".smart-list-menu-view")!==i.$.view)return;n=t,r=t.level+1,o=t.itemContainer,a=t.filter}if(i._createItemHTMLStructure(e,r,t,i._getCurrentViewItems(n).length,0),e instanceof Smart.MenuItemsGroup&&i._processHTML(e,r+1),i._view!==t&&!t.$.hasClass("smart-hidden")&&t.offsetHeight>0&&t.offsetWidth>0&&(!i._view&&!i.$.mainContainer.contains(t)||i._view&&!i._view.contains(t))&&e.$.addClass("smart-hidden"),i.grouped){const e=Array.from(o.children);for(let t=e.length-1;t>=0;t--)e[t].$.hasClass("smart-list-menu-group-label")&&o.removeChild(e[t]);i._unsortItems(t,!0)}if(o.appendChild(e),i.grouped){const e=i._view;i._applyGrouping(t,!0),i._home(),e&&i.changePage(e.path)}i.filterable&&void 0!==a&&""!==a&&null===i._findItem(e,a)&&(e.$.addClass("smart-hidden"),e.hidden=!0),i._toggleFilterInputGroupLabelVisibility(),i._checkOverflow()}back(e){const t=this,i=t.animation,n=!1===e&&"none"!==i;n&&(t.animation="none"),t._backButtonClickHandler(),n&&(t.animation=i)}changePage(e){const t=this,i=t.getItem(e);if(void 0===i||i instanceof Smart.MenuItem||i.hidden)return;const n=[i];let r=i.parentItem,o=0;for(t._discardKeyboardHover();r;)n.unshift(r),r=r.parentItem;if(t._view){const e=n.indexOf(t._view);-1===e?t._home():o=e+1}for(let e=o;e<n.length&&(!n[e].disabled&&!n[e].hidden);e++)t._menuItemsGroupSelectionHandler(n[e],{type:"expand"},!0)}maximize(){const e=this;if(e._minimized){if(e._positionDetection.removeOverlay(),e._minimized=!1,e._minimizedDropDownOpened&&(e.$hamburgerIcon.removeClass("smart-close-button"),e._minimizedDropDownOpened=!1),null!==e.dropDownAppendTo&&e._appendMinimizedContainerToMenu(e.$.view,null),e.$view.removeClass("smart-visibility-hidden"),e.$view.removeClass("smart-list-menu-view-minimized"),e.$hamburgerIcon.addClass("smart-hidden"),e.removeAttribute("minimized"),e.enableShadowDOM){e.$.view.id=e.$.view.getAttribute("smart-id");const t=e.$.view.querySelectorAll("[smart-id]");for(let e=0;e<t.length;e++)t[e].id=t[e].getAttribute("smart-id")}e.$.mainContainer.scrollTop=0,e._checkOverflow(),e.$.hamburgerIcon.removeAttribute("aria-expanded"),e.$.hamburgerIcon.removeAttribute("aria-owns"),e.$.view.setAttribute("role","presentation"),e.$.view.removeAttribute("aria-orientation"),e.setAttribute("role","menu")}}minimize(){const e=this;if(!e._minimized){if(e.$view.addClass("smart-visibility-hidden"),e.enableShadowDOM){e.$.view.removeAttribute("id");const t=e.$.view.querySelectorAll("[smart-id]");for(let e=0;e<t.length;e++)t[e].removeAttribute("id")}e._edgeMacFF&&e.$view.addClass("not-in-view"),e.$hamburgerIcon.removeClass("smart-hidden"),setTimeout((function(){null!==e.dropDownAppendTo&&e._appendMinimizedContainerToExternalElement(e.$.view),e.$view.addClass("smart-list-menu-view-minimized"),e.$.mainContainer.scrollTop=0,e._checkOverflow()}),0),e._minimized=!0,e.setAttribute("minimized",""),e.setAttribute("role","presentation"),e.removeAttribute("aria-orientation"),e.$.hamburgerIcon.setAttribute("aria-expanded",!1),e.$.hamburgerIcon.setAttribute("aria-owns",e.$.view.id),e.$.view.setAttribute("role","menu"),e.$.view.setAttribute("aria-orientation","vertical")}}removeItem(e){const t=this;if("string"==typeof e&&(e=t.getItem(e)),void 0===e||!(e instanceof Smart.MenuItem||e instanceof Smart.MenuItemsGroup)||!t.contains(e)&&e.closest(".smart-list-menu-view")!==t.$.view)return;const i=e.parentElement;for(;e.contains(t._view);)t._backButtonClickHandler(void 0,!0);const n=t._view;t.grouped&&(t._home(),t._discardGrouping()),i.removeChild(e),t._menuItems={},t._refreshItemPaths(t.$.mainContainer,!0,(function(e){return t._getCurrentViewItems(e===t.$.mainContainer?void 0:e)})),t.grouped&&(t._applyGrouping(t.$.mainContainer),n&&t.changePage(n.path)),t._toggleFilterInputGroupLabelVisibility(),t._checkOverflow()}propertyChangedHandler(e,t,i){if("disabled"===e||"dropDownOverlay"===e||"minimizeIconTemplate"===e||"minimizeWidth"===e||"overflow"===e||"unfocusable"===e)return void super.propertyChangedHandler(e,t,i);const n=this;switch(e){case"animation":n.$.view.setAttribute("animation",i);break;case"checkable":case"checkboxes":n._minimized&&null!==n.dropDownAppendTo&&(i?n.$.view.setAttribute(e,""):n.$.view.removeAttribute(e));break;case"checkMode":n._changeToRadioButtonMode(i,n.$.mainContainer),n._minimized&&null!==n.dropDownAppendTo&&n.$.view.setAttribute("check-mode",i);break;case"dataSource":n.$header.addClass("smart-hidden"),n.$mainContainer.removeClass("header-shown"),n._view=void 0,n._menuItems={},n._topLevelFilter="",n._processDataSource(),n._toggleFilterInputGroupLabelVisibility(),n._checkOverflow();break;case"displayLoadingIndicator":if(i){const e=n.$.mainContainer.querySelector("[hover]");e&&e.removeAttribute("hover"),n._discardKeyboardHover(),n.$loadingIndicatorContainer.removeClass("smart-hidden")}else n.$loadingIndicatorContainer.addClass("smart-hidden");break;case"dropDownAppendTo":{const e=n._dropDownParent;if(n._positionDetection.getDropDownParent(),n._dropDownParent===e||!n._minimized)return;n._close(),null===i?n._appendMinimizedContainerToMenu(n.$.view,null):n._appendMinimizedContainerToExternalElement(n.$.view),n.$.mainContainer.scrollTop=0,n._checkOverflow();break}case"dropDownPosition":n._close(),n._minimized&&null!==n.dropDownAppendTo&&n.$.view.setAttribute("drop-down-position",i);break;case"filterable":if(n._toggleFilterInputGroupLabelVisibility(!0),!1===i){""!==n._topLevelFilter&&n._applyFilter("");for(let e=n._filteredLowerLevelGroups.length-1;e>=0;e--)n._applyFilter("",n._filteredLowerLevelGroups[e])}n._checkOverflow();break;case"filterMode":if(!n.filterable)return;""!==n._topLevelFilter&&n._applyFilter(n._topLevelFilter);for(let e=n._filteredLowerLevelGroups.length-1;e>=0;e--)n._applyFilter(n._filteredLowerLevelGroups[e].filter,n._filteredLowerLevelGroups[e]);break;case"grouped":n._home(),i?n._applyGrouping(n.$.mainContainer):n._discardGrouping(),n._toggleFilterInputGroupLabelVisibility(!1,!0),n._checkOverflow();break;case"loadingIndicatorPosition":null!==n.dropDownAppendTo&&n._minimized&&n.$.view.setAttribute("loading-indicator-position",i),"center"===i?n.$loadingIndicatorPlaceHolder.addClass("smart-hidden"):n.$loadingIndicatorPlaceHolder.removeClass("smart-hidden");break;case"rightToLeft":i?(n.$backButtonArrow.removeClass("smart-arrow-left"),n.$backButtonArrow.addClass("smart-arrow-right")):(n.$backButtonArrow.removeClass("smart-arrow-right"),n.$backButtonArrow.addClass("smart-arrow-left")),i?n.$.view.setAttribute("right-to-left",""):n.$.view.removeAttribute("right-to-left"),Array.prototype.forEach.call(n.$.mainContainer.querySelectorAll(".smart-menu-items-group-arrow"),e=>e.className="smart-menu-items-group-arrow "+(n.rightToLeft?"smart-arrow-left left":"smart-arrow-right right"));break;case"theme":super.propertyChangedHandler(e,t,i),null!==n.dropDownAppendTo&&n._minimized&&(""!==t&&n.$view.removeClass(t),i&&n.$view.addClass(i))}}_appendGroupLabels(e,t){for(let i=0;i<e.length;i++){const n=document.createElement("div");n.$=Smart.Utilities.Extend(n),n.className="smart-list-menu-group-label",n.setAttribute("role","heading"),n.setAttribute("aria-level",1),n.innerHTML=e[i],n.groupChildren=t[i],t[i][0].parentElement.insertBefore(n,t[i][0]);for(let e=0;e<t[i].length;e++)t[i][e].groupLabel=n}}_applyFilter(e,t){const i=this,n=i._getCurrentViewItems(t);for(let r=0;r<n.length;r++){const o=i._findItem(n[r],e);o&&o.hidden?(o.hidden=!1,(t===i._view||void 0!==i._view&&void 0!==t&&!t.contains(i._view)||void 0===i._view)&&o.$.removeClass("smart-hidden")):o||(n[r].hidden=!0,n[r].$.addClass("smart-hidden"))}if(t){t.filter=e;const n=i._filteredLowerLevelGroups.indexOf(t);""===e?-1!==n&&i._filteredLowerLevelGroups.splice(n,1):-1===n&&i._filteredLowerLevelGroups.push(t)}else i._topLevelFilter=e}_backButtonClickHandler(e,t){const i=this,n=i._view;if(e&&e.stopPropagation(),!n||i.disabled&&e||i.displayLoadingIndicator||i._inTransition)return;let r=i.hasAnimation,o=i.animation,a=!1;r&&t&&(r=!1,a=!0,i.animation="none"),i._discardKeyboardHover(),i.$scrollButtonNear.addClass("smart-hidden"),i.$scrollButtonFar.addClass("smart-hidden"),i.$mainContainer.removeClass("scroll-buttons-shown"),n.firstElementChild.classList.remove("smart-hidden"),r?(i._inTransition=!0,n.container.$.addClass("no-transition"),n.container.$.addClass("smart-hidden"),n.$.addClass("right"),n.$.removeClass("right"),n.container.$.removeClass("no-transition")):(n.$.removeClass("smart-menu-items-group-opened"),n.container.$.addClass("smart-hidden")),i._showHideMenuItemsGroupSiblings(n,"removeClass",r),r?setTimeout((function(){n.container.style.top=n.parentElement.getBoundingClientRect().top-n.getBoundingClientRect().top+"px"}),0):a&&(i.animation=o),1===n.level?(i.$header.addClass("smart-hidden"),i.$mainContainer.removeClass("header-shown"),i._view=void 0):(i.$.title.innerHTML=n.parentItem.titleLabel,i._view=n.parentItem),i._toggleFilterInputGroupLabelVisibility(),i.$.mainContainer.scrollTop=0,r||i._checkOverflow(),e&&i.focus()}_bounceBottom(e){const t=this,i=t.$.mainContainer;function n(){i.scrollTop-=5,i.scrollTop>e?window.requestAnimationFrame(n):t.$mainContainer.removeClass("bounce-bottom")}t.$mainContainer.addClass("bounce-bottom"),window.requestAnimationFrame((function e(){i.scrollTop+=5,i.scrollTop!==i.scrollHeight-i.offsetHeight?window.requestAnimationFrame(e):window.requestAnimationFrame(n)}))}_bounceTop(){const e=this,t=e.$.mainContainer;function i(){t.scrollTop+=5,50!==t.scrollTop?window.requestAnimationFrame(i):(t.scrollTop=0,e.$mainContainer.removeClass("bounce-top"))}e.$mainContainer.addClass("bounce-top"),window.requestAnimationFrame((function e(){t.scrollTop-=5,t.scrollTop>0?window.requestAnimationFrame(e):window.requestAnimationFrame(i)}))}_checkOverflow(){const e=this,t=e.overflow;if("hidden"===t)return;const i=Math.round(e.$.mainContainer.scrollHeight)>Math.round(e.$.mainContainer.offsetHeight),n=Math.round(e.$.mainContainer.scrollTop)>0,r=Math.round(e.$.mainContainer.offsetHeight+e.$.mainContainer.scrollTop)<Math.round(e.$.mainContainer.scrollHeight);i?"auto"===t?(e.$mainContainer.hasClass("scroll-buttons-shown")||e.$mainContainer.addClass("scroll-buttons-shown"),n?e.$scrollButtonNear.removeClass("smart-hidden"):e.$scrollButtonNear.addClass("smart-hidden"),r?e.$scrollButtonFar.removeClass("smart-hidden"):e.$scrollButtonFar.addClass("smart-hidden"),!1===(n&&r)?e.$mainContainer.addClass("one-button-shown"):e.$mainContainer.removeClass("one-button-shown"),e.disabled||(e.$.scrollButtonNear.disabled=!1,e.$.scrollButtonFar.disabled=!1)):(e.$scrollButtonNear.removeClass("smart-hidden"),e.$scrollButtonFar.removeClass("smart-hidden"),e.disabled?(e.$.scrollButtonNear.disabled=!0,e.$.scrollButtonFar.disabled=!0):(e.$.scrollButtonNear.disabled=!n,e.$.scrollButtonFar.disabled=!r)):!i&&"auto"===t&&e.$mainContainer.hasClass("scroll-buttons-shown")?(e.$mainContainer.removeClass("scroll-buttons-shown"),e.$mainContainer.removeClass("one-button-shown"),e.$scrollButtonNear.addClass("smart-hidden"),e.$scrollButtonFar.addClass("smart-hidden")):i||"scroll"!==t||(e.$.scrollButtonNear.disabled=!0,e.$.scrollButtonFar.disabled=!0)}_close(){const e=this;e._discardKeyboardHover(!0),e._minimized&&e._minimizedDropDownOpened&&(e._positionDetection.removeOverlay(),e.$view.addClass("smart-visibility-hidden"),e._edgeMacFF&&(e.$.view.style.left="",e.$.view.style.top="",e.$view.addClass("not-in-view")),e.$hamburgerIcon.removeClass("smart-close-button"),e._minimizedDropDownOpened=!1,e.$.hamburgerIcon.setAttribute("aria-expanded",!1))}_createElement(){const e=this;e.$.title.id||(e.$.title.id=e.id+"Title"),e.$.view.id||(e.$.view.id=e.id+"View"),e.setAttribute("role","menu"),e.setAttribute("aria-labelledby",e.$.title.id),e.setAttribute("aria-orientation","vertical"),e.$.header.setAttribute("aria-labelledby",e.$.title.id),e.mode="vertical",e._positionDetection=new Smart.Utilities.PositionDetection(e),e._positionDetection.getDropDownParent(),null===e.dataSource&&e.$.mainContainer.firstElementChild instanceof HTMLUListElement&&e._processUList();const t=e.getElementsByTagName("smart-menu-item"),i=function(){e._setFocusable(),e._menuItems={},e._topLevelFilter="",e._filteredLowerLevelGroups=[],e.$.view.setAttribute("animation",e.animation),null===e.dataSource?e._processHTML(void 0,1):e._processDataSource(),e._toggleFilterInputGroupLabelVisibility(),"scroll"===e.overflow&&(e.$mainContainer.addClass("scroll-buttons-shown"),e.$scrollButtonNear.removeClass("smart-hidden"),e.$scrollButtonFar.removeClass("smart-hidden"),e._updateScrollButtonVisibility(e.$.mainContainer,!1,[e.$.scrollButtonNear,e.$.scrollButtonFar])),e._applyMinimizeIconTemplate(e.minimizeIconTemplate,null),null!==e.minimizeWidth&&e.offsetWidth<=e.minimizeWidth?e.minimize():e._checkOverflow(),e.displayLoadingIndicator&&e.$loadingIndicatorContainer.removeClass("smart-hidden"),"center"!==e.loadingIndicatorPosition&&e.$loadingIndicatorPlaceHolder.removeClass("smart-hidden"),e.__onCompleted&&(e._onCompleted=e.__onCompleted,e.__onCompleted=null,e._onCompleted())};0===t.length?i():(e._onCompleted&&(e.__onCompleted=e._onCompleted,e._onCompleted=null),e._ensureItemsReady(t,i))}_createMenuItemsGroupContainer(e,t){const i=document.createElement("div"),n=document.createElement("div");return i.className="smart-menu-drop-down smart-hidden",i.$=Smart.Utilities.Extend(i),i.level=t,i.setAttribute("level",t),i.setAttribute("role","menu"),i.menuItemsGroup=e,n.className="smart-menu-item-container",n.$=Smart.Utilities.Extend(n),n.container=i,n.menuItemsGroup=e,e.checkable&&n.setAttribute("checkable",""),n.setAttribute("check-mode",e.checkMode),i.itemContainer=n,i.appendChild(n),i}_discardGrouping(){const e=Array.from(this.$.view.getElementsByClassName("smart-list-menu-group-label"));for(let t=0;t<e.length;t++){let i=e[t];i.parentElement.removeChild(i)}this._unsortItems(this.$.mainContainer)}_discardKeyboardHover(){const e=this;e._focusedViaKeyboard&&(e._focusedViaKeyboard===e.$.backButton?(e.$.backButton.removeAttribute("hover"),e.$.backButton.$.button.removeAttribute("hover")):(e._focusedViaKeyboard.removeAttribute("focus"),e._focusedViaKeyboard.removeAttribute("hover")),e._focusedViaKeyboard=void 0)}_documentUpHandler(e){const t=this,i=e.originalEvent.target,n=e=>{"right"===e&&!t.rightToLeft||"left"===e&&t.rightToLeft?t._backButtonClickHandler():t._swipeDetails.target&&t._selectionHandler({target:t._swipeDetails.target},t._swipeDetails.target,!0)};if(t._touchmoveInside?t._endSwiping(e,Date.now()):delete t._dragStartDetails,delete t._touchCoords,delete t._touchmoveInside,t._swipeDetails){const i="pointercancel"===e.originalEvent.type;return"left"===t._swipeDetails.direction?(i||t._swipeDetails.start>e.pageX&&t._swipeDetails.start-e.pageX>t.offsetWidth/4)&&n(t._swipeDetails.direction):(i||t._swipeDetails.start<e.pageX&&e.pageX-t._swipeDetails.start>t.offsetWidth/4)&&n(t._swipeDetails.direction),void delete t._swipeDetails}i===t.$.filterInput||t.disabled||t.displayLoadingIndicator||!i.closest||(t.contains(i)||i.closest(".smart-list-menu-view")===t.$.view?!t.contains(i)&&i.closest(".smart-list-menu-view")!==t.$.view||t===document.activeElement||t.focus():(t._close(),t._scrolling&&delete t._scrolling))}_ensureVisible(e){const t=this,i=t.$.mainContainer;if(!i.$.hasClass("scroll-buttons-shown")&&"hidden"!==t.overflow)return;const n=i.getBoundingClientRect(),r=e.getBoundingClientRect(),o=[t.$.scrollButtonNear,t.$.scrollButtonFar],a=i.scrollTop;(n.top>r.top||n.bottom<r.bottom)&&(i.scrollTop=e.offsetTop,t._updateScrollButtonVisibility(i,!1,o)),t._fireScrollBottomReachedEvent(a)}_fireScrollBottomReachedEvent(e){const t=this.$.mainContainer,i=t.scrollTop;e!==i&&i===t.scrollHeight-t.offsetHeight&&this.$.fireEvent("scrollBottomReached")}_getCurrentViewItems(e){const t=this;if(t.grouped){if(void 0===e)return t.$.view.querySelectorAll(".smart-menu-main-container > smart-menu-item, .smart-menu-main-container > smart-menu-items-group");{const t=e.container.firstElementChild.children,i=[];for(let e=0;e<t.length;e++){let n=t[e];(n instanceof Smart.MenuItem||n instanceof Smart.MenuItemsGroup)&&i.push(n)}return i}}return void 0===e?t.$.mainContainer.children:e.container.firstElementChild.children}_sortItems(e){if(!this.grouped)return;const t=[],i=[];let n;e instanceof Smart.MenuItemsGroup?n=e.container.firstElementChild:e===this.$.mainContainer&&(n=e);const r=Array.from(n.children);r.sort((function(e,t){return e.label.localeCompare(t.label)}));for(let e=r.length-1;e>=0;e--)n.insertBefore(r[e],n.firstElementChild);for(let e=0;e<r.length;e++){const n=r[e],o=n.label.charAt(0),a=t.indexOf(o.toUpperCase());-1===a?(t.push(o.toUpperCase()),i.push([n])):i[a].push(n)}this._appendGroupLabels(t,i)}_home(){const e=this;for(;e._view;)e._backButtonClickHandler(void 0,!0)}_keydownHandler(e){const t=this,i=e.key;if(((t.shadowRoot||t.getRootNode()).activeElement||document.activeElement)!==t||-1===["ArrowDown","ArrowLeft","ArrowRight","ArrowUp","End","Enter","Escape","Home"," "].indexOf(i)||t.disabled||t.displayLoadingIndicator)return;e.preventDefault();const n=t._view,r=n?n.itemContainer:t.$.mainContainer,o=t.$.backButton.hasAttribute("hover")?t.$.backButton:r.querySelector("[focus]");switch(i){case"ArrowDown":t._navigate("_getNextEnabledChild",o,r);break;case"ArrowLeft":case"ArrowRight":if("ArrowLeft"===i&&!t.rightToLeft||"ArrowRight"===i&&t.rightToLeft){t._backButtonClickHandler();break}("ArrowRight"===i&&!t.rightToLeft||"ArrowLeft"===i&&t.rightToLeft)&&o&&o instanceof Smart.MenuItemsGroup&&t._menuItemsGroupSelectionHandler(o,{type:"keydown"});break;case"ArrowUp":t._navigate("_getPreviousEnabledChild",o,r);break;case"End":case"Home":{if(n&&"Home"===i)return t.$.mainContainer.scrollTop=0,t._checkOverflow(),t.$.backButton.setAttribute("hover",""),t.$.backButton.$.button.setAttribute("hover",""),t._focusedViaKeyboard=t.$.backButton,void(o&&o.removeAttribute("focus"));const e="End"===i?t._getLastEnabledChild(r):t._getFirstEnabledChild(r);if(!e||o===e)return;o&&(o===t.$.backButton?(t.$.backButton.removeAttribute("hover"),t.$.backButton.$.button.removeAttribute("hover")):o.removeAttribute("focus")),t._hoverViaKeyboard(e);break}case"Enter":t._minimized&&!t._minimizedDropDownOpened?t._hamburgerIconClickHandler(void 0,t.$.view):o&&(o===t.$.backButton?t._backButtonClickHandler():t._selectionHandler({target:o}));break;case"Escape":t._minimized&&t._minimizedDropDownOpened&&!t._view?t._close():t._backButtonClickHandler();break;case" ":o&&(o===t.$.backButton?t._backButtonClickHandler():t._toggleItem(o))}}_mainContainerDownHandler(e){!Smart.Utilities.Core.isMobile||this.disabled||this.displayLoadingIndicator||(this._dragStartDetails={startY:e.pageY,x:e.pageX,y:e.pageY,startTime:Date.now(),target:e.originalEvent.target})}_mainContainerHandler(){}_mainContainerMoveHandler(e){const t=this;if(!t._dragStartDetails)return;const i=e.pageY,n=t._dragStartDetails.y-i,r=t.$.mainContainer.scrollTop;t.$.mainContainer.scrollTop+=n,r!==t.$.mainContainer.scrollTop&&(t._checkOverflow(),t._fireScrollBottomReachedEvent(r)),t._dragStartDetails={startY:t._dragStartDetails.startY,x:e.pageX,y:i,startTime:t._dragStartDetails.startTime,target:e.originalEvent.target},t._scrolling=!0}_mainContainerSwipeHandler(e){const t=this;if(!Smart.Utilities.Core.isMobile||t.disabled||t.displayLoadingIndicator||Math.abs(t._dragStartDetails.startY-e.pageY)>2)return;const i=e.originalEvent.target,n=i.closest("smart-menu-item"),r=i.closest("smart-menu-items-group");if("swiperight"===e.type&&!t.rightToLeft||"swipeleft"===e.type&&t.rightToLeft){const i=n||r;i&&(delete t._dragStartDetails,delete t._scrolling,t._swipeDetails={direction:e.type.replace("swipe",""),start:e.pageX,target:i})}else("swipeleft"===e.type&&!t.rightToLeft||"swiperight"===e.type&&t.rightToLeft&&r&&null===n)&&(delete t._dragStartDetails,delete t._scrolling,t._swipeDetails={direction:e.type.replace("swipe",""),start:e.pageX,target:r})}_mainContainerTouchmoveHandler(e){const t=this;if(t._touchmoveInside&&e.cancelable)return e.preventDefault(),void e.stopPropagation();const i=t.$.mainContainer,n=i.offsetHeight,r=i.scrollHeight,o=t._touchCoords;if(n===r||!o)return;const a=e.touches[0],s=i.scrollTop,l=a.pageY,d=o[1],m=parseFloat(l.toFixed(5)),c=parseFloat(d.toFixed(5));t._touchCoords=[a.pageX,a.pageY],0===s&&m>=c||s+n>=r&&m<=c||(l!==d&&(t._touchmoveInside=!0),e.cancelable&&(e.preventDefault(),e.stopPropagation()))}_mainContainerTouchstartHandler(e){const t=e.touches[0];this._touchCoords=[t.pageX,t.pageY]}_getRootDetails(e,t){const i=this;if(!e)return;if(!i.enableShadowDOM)return{activeElement:e.activeElement,isInsideElement:i.contains(t.target)};let n,r;for(;e&&(!n&&e.activeElement&&(n=e.activeElement),e.host===i&&(r=!0),e!==document);)e=e.host?e.host.getRootNode():e.getRootNode();return{activeElement:n,isInsideElement:r}}_menuItemsGroupSelectionHandler(e,t,i){const n=this,r=e.container,o=r.level,a=n._getRootDetails(t.target?t.target.getRootNode():null,t);if(n._view===e)return;if(n._discardKeyboardHover(),a&&a.activeElement!==n&&null!==n.dropDownAppendTo&&"click"===t.type&&!a.isInsideElement&&n.focus(),n._inTransition)return;if("click"===t.type&&!t.target.classList.contains("smart-menu-items-group-arrow")&&n._toggleItem(e))return void n._ripple(e,t);let s=n.hasAnimation,l=n.animation,d=!1;s&&i&&(s=!1,d=!0,n.animation="none"),2===o&&(n.$header.removeClass("smart-hidden"),n.$mainContainer.addClass("header-shown")),n.$.title.innerHTML=e.titleLabel,n._view=e,n._toggleFilterInputGroupLabelVisibility(),e.removeAttribute("hover"),e.removeAttribute("focus"),e.$.addClass("smart-menu-items-group-opened"),n._showHideMenuItemsGroupSiblings(e,"addClass",s),s?(n._inTransition=!0,e.firstElementChild.classList.add("animate"),setTimeout((function(){r.style.top=e.parentElement.getBoundingClientRect().top-e.getBoundingClientRect().top+"px"}),0)):e.firstElementChild.classList.add("smart-hidden"),r.$.removeClass("smart-hidden"),d&&(n.animation=l),n.$.mainContainer.scrollTop=0,s||n._checkOverflow(),n.$.fireEvent("expand",{item:e,label:e.label,path:e.path,value:e.value})}_mouseoutMouseoverHandler(e){const t=this;if(t.disabled||t.displayLoadingIndicator)return;const i=e.target.closest("smart-menu-item")||e.target.closest("smart-menu-items-group");null===i||t._view&&i.level<=t._view.level||i.disabled||i.templateApplied||(t._discardKeyboardHover(),"mouseover"===e.type?(i.setAttribute("hover",""),t._discardKeyboardHover(!0)):i.removeAttribute("hover"))}_navigate(e,t,i){const n=this;if(!t)return void("_getNextEnabledChild"===e?n._view?(n.$.backButton.setAttribute("hover",""),n.$.backButton.$.button.setAttribute("hover",""),n._focusedViaKeyboard=n.$.backButton):n._hoverViaKeyboard(n._getFirstEnabledChild(i)):n._hoverViaKeyboard(n._getLastEnabledChild(i)));let r;if("_getNextEnabledChild"===e&&t===n.$.backButton){if(r=n._getFirstEnabledChild(i),!r)return;n.$.backButton.removeAttribute("hover"),n.$.backButton.$.button.removeAttribute("hover")}else{if("_getPreviousEnabledChild"===e&&n._view&&t===n._getFirstEnabledChild(i))return n.$.backButton.setAttribute("hover",""),n.$.backButton.$.button.setAttribute("hover",""),n._focusedViaKeyboard=n.$.backButton,void t.removeAttribute("focus");r=n[e](t)}r&&(t.removeAttribute("focus"),n._hoverViaKeyboard(r))}_processHTML(e,t){const i=this;let n,r;void 0===e&&(e=i.$.mainContainer),t>1&&(n=i._createMenuItemsGroupContainer(e,t),r=n.itemContainer);const o=Array.from(e.children),a=[];let s=0;for(let n=0;n<o.length;n++){if(t>1&&0===n){s++;continue}const l=o[n];l instanceof Smart.MenuItem||l instanceof Smart.MenuItemsGroup?(i._createItemHTMLStructure(l,t,e,n-s),l.checked&&(l.disabled||l.templateApplied?l.checked=!1:a.push(l)),t>1&&r.appendChild(l),l instanceof Smart.MenuItemsGroup&&i._processHTML(l,t+1)):(l.parentElement.removeChild(l),s++)}if(t>1){if(e.container=n,e.itemContainer=r,e instanceof Smart.MenuItemsGroup){const t=document.createElement("div");t.className="smart-menu-items-group-arrow "+(i.rightToLeft?"smart-arrow-left left":"smart-arrow-right right"),e.children[0].appendChild(t)}e.appendChild(n)}i._validateRadioButtonSelection(e,t,a),i._sortItems(e)}_resizeHandler(){const e=this,t=e.minimizeWidth;if(null!==t){if(!e._minimized&&e.offsetWidth<=t)return void e.minimize();if(e._minimized&&e.offsetWidth>t)return void e.maximize()}e._checkOverflow()}_scroll(e){const t=this,i=t.$.mainContainer,n=e.classList.contains("smart-scroll-button-near")?-1:1,r=i.scrollTop;i.scrollTop=i.scrollTop+10*n,r!==i.scrollTop&&(t._updateScrollButtonVisibility(i,!1,[t.$.scrollButtonNear,t.$.scrollButtonFar]),t._fireScrollBottomReachedEvent(r))}_selectionHandler(e,t,i){const n=this,r=e.target;if(!n.disabled&&!n.displayLoadingIndicator){if(n._scrolling||n._swipeDetails&&!i)return delete n._dragStartDetails,delete n._scrolling,void delete n._swipeDetails;if(void 0===t){if("click"===e.type){const t=r.closest("smart-repeat-button");if(t)return void n._scroll(t,e)}const i=r.closest("smart-menu-item");if(i)return i.disabled||i.templateApplied||(n._toggleItem(i)||n.$.fireEvent("itemClick",{item:i,label:i.label,value:i.value}),n._ensureVisible(i),n._ripple(i,e)),void o();if((t=r.closest("smart-menu-items-group"))&&(r===t.container||r===t.container.firstElementChild))return}t&&!t.disabled&&n._menuItemsGroupSelectionHandler(t,e)}function o(){const t=n._getRootDetails(r.getRootNode(),e);t&&t.activeElement!==n&&null!==n.dropDownAppendTo&&"click"===e.type&&!t.isInsideElement&&n.focus()}}_showHideMenuItemsGroupSiblings(e,t,i){const n=e.parentElement.children;for(let r=0;r<n.length;r++){const o=n[r];o!==e&&(o.hidden||(i?"addClass"===t?o.$.addClass("animate"):(o.$.removeClass("smart-hidden"),o.$.addClass("right"),setTimeout((function(){o.$.removeClass("right")}),0)):o.$[t]("smart-hidden")))}}_toggleFilterInputGroupLabelVisibility(e,t){const i=this,n=i._getCurrentViewItems(i._view).length;if(!0!==t){const e=!i.$filterInputContainer.hasClass("smart-hidden");i.filterable&&n>1?(e||(i.$mainContainer.addClass("filter-input-shown"),i.$filterInputContainer.removeClass("smart-hidden")),i._view?i.$.filterInput.value=i._view.filter||"":i.$.filterInput.value=i._topLevelFilter):e&&(i.$mainContainer.removeClass("filter-input-shown"),i.$filterInputContainer.addClass("smart-hidden"))}if(!e&&i.grouped&&n>0){const e=i._view?i._view.container.firstElementChild.firstElementChild.$:i.$.mainContainer.firstElementChild.$;1===n?e.addClass("smart-hidden"):e.removeClass("smart-hidden")}}_viewHandler(e){const t=this;if("transitionend"===e.type){const i=e.target;if(i===t.$.view||t.$.backButton.contains(i))return;return i.classList.contains("animate")&&(i.classList.remove("animate"),i.classList.add("smart-hidden")),i.classList.contains("smart-menu-drop-down")&&(i.style.top=""),i.classList.contains("smart-menu-items-group-opened")&&i.classList.remove("smart-menu-items-group-opened"),t._checkOverflow(),void(t._inTransition=!1)}if(t._minimized&&null!==t.dropDownAppendTo)switch(e.type){case"click":t._selectionHandler(e);break;case"mouseout":case"mouseover":t._mouseoutMouseoverHandler(e)}}})}});