{"version":3,"names":["NAVIGATION_STICKYSLEVEL_MAIN","NAVIGATION_STICKYSLEVEL_TOOLBAR","NAVIGATION_STICKYSLEVEL_META","navigationCss","EonUiNavigationStyle0","Navigation","this","metaHeight","toolbarHeight","mainHeight","lastScrollTop","burgerPosition","NAVIGATION_MAIN_BURGERPOSITION_LEFT","mobileNavigationPadding","mobileNavigationPaddingSticky","updateNavigationHeight","navigationWrapper","getBoundingClientRect","height","openToolbarSub","rel","keyboard","clearTimeout","toolbarWrapperTimeout","deactivateToolbarLinks","closeMainSub","isMobileNavOpen","closeMobileNav","isMainSubOpen","activeToolbarSubContainer","hostElement","querySelector","isToolbarSubOpen","showToolbarSub","initSubKeyboardNav","closeToolbarSub","setTimeout","style","display","openMainSub","mainWrapperTimeout","deactivateMainLinks","deactivateMainIconLinks","activeMainSubContainer","isMainSubWrapperOpen","showMainSub","openMobileNav","closeMobileSub","mobileWrapper","classList","add","mainNavigation","burgerActive","remove","openMobileSub","activeMobileSubContainer","showMobileSub","openMobileSubImmediately","showMobileSubImmediately","mobileSubChilds","forEach","element","scrollTop","mobileMainNavigation","detectScrollDirection","sticky","scrollTimeout","isTouchDevice","st","window","pageYOffset","document","documentElement","currentScrollDirection","closeNavigationsOnResize","resizeTimeout","componentWillLoad","getNavigationStructure","calcMobileNavigationPadding","toolbarNavigation","toolbarChilds","querySelectorAll","toolbarLinks","mainChilds","mainStandardChilds","mainIconChilds","mainLinks","mainIconLinks","setParentNavTypeDataAttributeToFlyoutLink","setInnerBackgroundToSubs","componentDidLoad","mainSubWrapper","initMainSubFunctionality","createMainMobileNavigation","_a","setCssVariables","toolbarChild","link","dataset","parentNavigationType","mainChild","child","setAttribute","NAVIGATION_TOOLBAR_FLYOUT_INNER_BACKGROUND","NAVIGATION_MAIN_FLYOUT_INNER_BACKGROUND","setToolbarSubHeight","setMainSubHeight","activeSubContainer","subItems","Array","prototype","slice","call","firstFocusableItem","lastFocusableItem","hasAttribute","shadowRoot","focusableElement","focus","exitSecondaryNavViaKey","firstChild","lastChild","contains","addEventListener","e","key","KeyIds","TAB","shiftKey","preventDefault","relatedLink","getAttribute","hasMetaNavigation","hasToolbarNavigation","hasMainNavigation","hasExtension","stickyLevel","setCssVariable","toolbarSubHeight","mainSubHeight","item","removeActiveState","mouse","closestEdge","mouseLeaveTimeout","createMobileMain","mainNavigationChilds","toolbarNavigationChilds","_b","cloneNode","push","_d","_c","h","class","ref","el","innerHTML","map","outerHTML","join","createMobileSub","subNavi","relatedNavigation","subNavigationChilds","backLinkText","id","column","from","children","columnItem","onClick","name","createMobileSubWithGrid","subNaviClone","importNode","removeAttribute","spacing","elem","elemBounding","elementLeftEdge","left","elementTopEdge","top","elementRightEdge","right","elementBottomEdge","bottom","mouseX","pageX","mouseY","pageY","topEdgeDist","Math","abs","bottomEdgeDist","leftEdgeDist","rightEdgeDist","min","render","Host","pfx","overlay","act","onTouchEnd","Fragment","active","NAVIGATION_MOBILE_FLYOUT_INNER_BACKGROUND"],"sources":["src/components/navigation/constants/navigation-constants.ts","src/components/navigation/navigation.scss?tag=eon-ui-navigation&encapsulation=shadow","src/components/navigation/navigation.tsx"],"sourcesContent":["export const NAVIGATION_STICKYSLEVEL_MAIN = \"main\";\nexport const NAVIGATION_STICKYSLEVEL_TOOLBAR = \"toolbar\";\nexport const NAVIGATION_STICKYSLEVEL_META = \"meta\";\n\nexport const NAVIGATION_STICKYLEVELS = [\n NAVIGATION_STICKYSLEVEL_MAIN,\n NAVIGATION_STICKYSLEVEL_TOOLBAR,\n NAVIGATION_STICKYSLEVEL_META\n] as const;\n","$metaHeight: 48px;\n$toolbarHeight: 72px;\n$mainHeight: 68px;\n\n$mobile-nav-width: 305px;\n$mobile-nav-width-phone: 296px;\n\n:host {\n display: block;\n\n *,\n :after,\n :before {\n box-sizing: border-box;\n outline: 0 none;\n text-rendering: optimizelegibility;\n }\n}\n\n@mixin animation {\n transition-property: all;\n transition-duration: 400ms;\n transition-timing-function: ease;\n transition-delay: 0s;\n}\n\n.#{$prefix}navigation-wrapper {\n position: relative;\n width: 100%;\n box-sizing: border-box;\n outline: 0 none;\n text-rendering: optimizelegibility;\n margin: 0;\n padding: 0;\n font-family: $font-family-base;\n z-index: 99;\n box-shadow: $navigation-box-shadow;\n @include animation;\n\n &.#{$prefix}sticky {\n position: fixed;\n left: 0;\n top: 0;\n }\n\n &.#{$prefix}collapsed {\n top: ($metaHeight + $toolbarHeight + $mainHeight) * -1;\n\n // act as if no toolbar navigation (toolbar hidden on mobile)\n @include for-size(tablet-or-smaller) {\n top: ($metaHeight + $mainHeight) * -1;\n }\n\n // if no toolbar navigation\n &.#{$prefix}nav-meta-main {\n top: ($metaHeight + $mainHeight) * -1;\n }\n\n // if no meta navigation\n &.#{$prefix}nav-toolbar-main {\n top: ($toolbarHeight + $mainHeight) * -1;\n\n // act as if no toolbar navigation (toolbar hidden on mobile)\n @include for-size(tablet-or-smaller) {\n top: ($mainHeight) * -1;\n }\n }\n\n // if no meta and no toolbar navigation\n &.#{$prefix}nav-main {\n top: ($mainHeight) * -1;\n }\n\n .#{$prefix}mobile-wrapper {\n height: calc(100vh - var(--mobileNavigationPaddingSticky));\n }\n }\n\n &.#{$prefix}sticky-level-main {\n &.#{$prefix}collapsed {\n top: ($metaHeight + $toolbarHeight) * -1;\n\n // act as if no toolbar navigation (toolbar hidden on mobile)\n @include for-size(tablet-or-smaller) {\n top: ($metaHeight) * -1;\n }\n\n // if no toolbar navigation\n &.#{$prefix}nav-meta-main {\n top: ($metaHeight) * -1;\n }\n\n // if no meta navigation\n &.#{$prefix}nav-toolbar-main {\n top: ($toolbarHeight) * -1;\n\n // act as if no toolbar navigation (toolbar hidden on mobile)\n @include for-size(tablet-or-smaller) {\n top: 0;\n }\n }\n\n // if no meta and no toolbar navigation\n &.#{$prefix}nav-main {\n top: 0;\n }\n }\n }\n\n &.#{$prefix}sticky-level-toolbar {\n &.#{$prefix}collapsed {\n top: ($metaHeight) * -1;\n\n // if no meta navigation\n &.#{$prefix}nav-toolbar-main {\n top: 0;\n\n // act as if no toolbar navigation (toolbar hidden on mobile)\n @include for-size(tablet-or-smaller) {\n top: 0;\n }\n }\n\n // if no meta and no toolbar navigation\n &.#{$prefix}nav-main {\n top: 0;\n }\n }\n }\n\n &.#{$prefix}sticky-level-meta {\n &.#{$prefix}collapsed {\n top: 0;\n }\n }\n\n .#{$prefix}toolbar-sub {\n position: relative;\n width: 100%;\n height: 0px;\n max-height: 70vh;\n background-color: $navigation-toolbar-sub-bg-color;\n overflow: auto;\n transition-property: height;\n transition-duration: 400ms;\n transition-timing-function: ease;\n transition-delay: 0s;\n\n .#{$prefix}toolbar-sub-inner {\n position: relative;\n width: 100%;\n max-width: calc($content-max-width-desktop-l + 16px);\n margin: 0px auto 0px auto;\n padding-top: 32px;\n padding-right: 24px;\n padding-bottom: 32px;\n padding-left: 24px;\n\n @include for-size(desktop-or-smaller) {\n max-width: $content-max-width-desktop;\n }\n\n @include for-size(desktop) {\n padding-right: 16px;\n padding-left: 16px;\n }\n\n @include for-size(tablet) {\n padding-left: 4px;\n padding-right: 4px;\n }\n\n @include for-size(phone) {\n padding-left: 8px;\n padding-right: 8px;\n }\n }\n }\n\n .#{$prefix}main-sub-wrapper {\n position: absolute;\n left: 0;\n width: 100%;\n height: 0;\n overflow: hidden;\n z-index: 89;\n\n .#{$prefix}main-sub {\n position: absolute;\n left: 0;\n top: 0;\n transform: translateY(-110%);\n transform-origin: top;\n width: 100%;\n height: auto;\n max-height: 70vh;\n background-color: $navigation-main-sub-bg-color;\n overflow: auto;\n box-shadow: $navigation-main-sub-box-shadow;\n transition-property: all;\n transition-duration: 400ms;\n transition-timing-function: cubic-bezier(0.47, 0, 0.745, 0.715);\n transition-delay: 0s;\n border-bottom: $navigation-main-sub-border-width $navigation-main-sub-border-style\n $navigation-main-sub-border-color;\n\n &.#{$prefix}active {\n transform: translateY(0px);\n transition-duration: 800ms;\n transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1);\n }\n\n .#{$prefix}main-sub-inner {\n position: relative;\n width: 100%;\n max-width: calc($content-max-width-desktop-l + 16px);\n margin: 0px auto 0px auto;\n padding-top: 32px;\n padding-right: 24px;\n padding-bottom: 32px;\n padding-left: 24px;\n\n @include for-size(desktop-or-smaller) {\n max-width: $content-max-width-desktop;\n }\n\n @include for-size(desktop) {\n padding-right: 16px;\n padding-left: 16px;\n }\n\n @include for-size(tablet) {\n padding-right: 4px;\n padding-left: 4px;\n }\n\n @include for-size(phone) {\n padding-right: 8px;\n padding-left: 8px;\n }\n }\n }\n }\n\n .#{$prefix}overlay {\n position: fixed;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n z-index: 20;\n background-color: rgba(57, 57, 58, 0.4);\n visibility: hidden;\n opacity: 0;\n transition-property: all;\n transition-duration: 400ms;\n transition-timing-function: ease;\n transition-delay: 0s;\n\n &.#{$prefix}act {\n visibility: visible;\n opacity: 1;\n }\n }\n}\n\n.#{$prefix}mobile-wrapper {\n position: absolute;\n left: -400px;\n width: $mobile-nav-width;\n height: calc(100vh - var(--mobileNavigationPadding));\n background-color: $navigation-mobile-bg-color;\n z-index: 30;\n overflow: hidden;\n font-family: $font-family-base;\n display: none;\n box-sizing: border-box;\n\n &.from-left {\n left: -400px;\n right: unset;\n }\n\n &.from-right {\n right: -400px;\n left: unset;\n }\n\n transition-property: left, right;\n transition-duration: 400ms;\n transition-timing-function: cubic-bezier(0.47, 0, 0.745, 0.715);\n transition-delay: 0s;\n\n &.act {\n transition-duration: 800ms;\n transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1);\n\n &.from-left {\n left: 0;\n }\n\n &.from-right {\n right: 0;\n }\n }\n\n @include for-size(phone) {\n display: block;\n width: $mobile-nav-width-phone;\n }\n\n @include for-size(tablet) {\n display: block;\n }\n}\n\n.mobile-main-nav {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n overflow-x: hidden;\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n background-color: $navigation-mobile-bg-color;\n\n transition-property: filter;\n transition-duration: 500ms;\n transition-timing-function: ease;\n transition-delay: 0s;\n\n .mobile-main-nav-inner {\n position: relative;\n padding: 24px 0px 140px 0px;\n transition-property: transform;\n transition-duration: 500ms;\n transition-timing-function: ease;\n transition-delay: 0s;\n\n .main-navigation-links {\n position: relative;\n margin-bottom: 46px;\n }\n\n .toolbar-navigation-links {\n position: relative;\n }\n }\n\n &.scale {\n filter: brightness(80%);\n\n .mobile-main-nav-inner {\n transform: scale(0.93);\n }\n }\n}\n\n.mobile-secondary-nav {\n position: absolute;\n right: -305px;\n top: 0;\n width: 100%;\n height: 100%;\n box-shadow: -1px 0px 0px 0px #{$navigation-mobile-bg-color};\n overflow: hidden;\n overflow-y: auto;\n background-color: $navigation-mobile-bg-color;\n display: flex;\n flex-direction: column;\n\n transition-property: right;\n transition-duration: 500ms;\n transition-timing-function: ease;\n transition-delay: 0s;\n\n &.no-animation {\n transition: unset;\n }\n\n &.act {\n right: 0;\n }\n\n .mobile-secondary-nav-backlink {\n position: relative;\n cursor: pointer;\n font-size: 24px;\n padding: 12px 24px 12px 64px;\n margin: 8px 0px 8px 0px;\n line-height: 24px;\n font-weight: 700;\n color: #{$navigation-mobile-link-font-color};\n\n @include for-size(phone) {\n font-size: 22px;\n line-height: 22px;\n padding-left: 56px;\n }\n\n eon-ui-icon {\n position: absolute;\n left: 34px;\n top: 50%;\n transform: translateY(-50%);\n color: #{$navigation-mobile-link-font-color};\n\n @include for-size(phone) {\n left: 26px;\n }\n }\n }\n\n .mobile-secondary-nav-inner {\n position: relative;\n width: 100%;\n height: 100%;\n overflow-x: hidden;\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n padding-bottom: 140px;\n\n &.spacing {\n padding-left: 8px;\n padding-right: 8px;\n }\n\n &.spacing-top {\n padding-top: 24px;\n }\n }\n\n eon-ui-navigation-flyout-divider {\n display: none;\n }\n}\n\n::slotted(eon-ui-navigation-toolbar) {\n @include for-size(tablet-or-smaller) {\n display: none;\n }\n}\n","import { h, Component, Host, State, Element, Prop, Listen, Fragment, Method, Watch } from \"@stencil/core\";\nimport { StickyLevel } from \"./constants/navigation-types\";\nimport pfx from \"../../utils/style-class-prefix-helper\";\nimport { KeyIds } from \"../../constants/keys\";\nimport { BurgerPosition } from \"./navigation-components/navigation-main/constants/navigation-main-types\";\nimport { NAVIGATION_MAIN_BURGERPOSITION_LEFT } from \"./navigation-components/navigation-main/constants/navigation-main-constants\";\nimport { setCssVariable } from \"../../utils/css-variables\";\nimport { isTouchDevice } from \"../../utils/touch-helper\";\nimport {\n NAVIGATION_STICKYSLEVEL_MAIN,\n NAVIGATION_STICKYSLEVEL_META,\n NAVIGATION_STICKYSLEVEL_TOOLBAR\n} from \"./constants/navigation-constants\";\nimport {\n NAVIGATION_TOOLBAR_FLYOUT_INNER_BACKGROUND,\n NAVIGATION_MAIN_FLYOUT_INNER_BACKGROUND,\n NAVIGATION_MOBILE_FLYOUT_INNER_BACKGROUND\n} from \"../../constants/global-constants\";\n// import { InitLogging } from \"../../decorators/init-logging\";\n\n/**\n * @slot [meta] - holds eon-ui-meta-navigation.\n * @slot [toolbar] - holds eon-ui-toolbar-navigation.\n * @slot [main] - holds eon-ui-meta-navigation.\n * @slot [extension] - holds any further navigation and puts it to the bottom of the container.\n */\n@Component({\n tag: \"eon-ui-navigation\",\n styleUrl: \"navigation.scss\",\n shadow: true\n})\nexport class Navigation {\n // @InitLogging() sentryTransaction;\n metaHeight = 46;\n toolbarHeight = 72;\n mainHeight = 64;\n\n scrollTimeout;\n resizeTimeout;\n mainWrapperTimeout;\n toolbarWrapperTimeout;\n mouseLeaveTimeout;\n\n lastScrollTop = 0;\n\n hasMetaNavigation: boolean;\n hasToolbarNavigation: boolean;\n hasMainNavigation: boolean;\n hasExtension: boolean;\n\n toolbarNavigation;\n toolbarChilds;\n activeToolbarSubContainer;\n toolbarLinks;\n\n mainNavigation;\n mainChilds;\n mainStandardChilds;\n mainIconChilds;\n mainLinks;\n mainIconLinks;\n mainSubWrapper;\n activeMainSubContainer;\n\n burgerPosition: BurgerPosition = NAVIGATION_MAIN_BURGERPOSITION_LEFT;\n mobileSubChilds;\n activeMobileSubContainer;\n\n mobileNavigationPadding = 0;\n mobileNavigationPaddingSticky = 0;\n\n @State() currentScrollDirection: string = \"up\";\n @State() isToolbarSubOpen: boolean = false;\n @State() toolbarSubHeight: number;\n @State() isMainSubWrapperOpen: boolean = false;\n @State() isMainSubOpen: boolean = false;\n @State() mainSubHeight: number;\n @State() navigationWrapper: HTMLElement;\n @State() mobileNavigation: HTMLElement;\n @State() mobileSubNavigation: HTMLElement;\n @State() mobileWrapper: HTMLElement;\n @State() mobileMainNavigation: HTMLElement;\n @State() isMobileNavOpen: boolean = false;\n\n @Element() hostElement: HTMLEonUiNavigationElement;\n\n /**\n * Activate fixed positioning and sticky behaviour.\n */\n @Prop() sticky: boolean = true;\n\n /**\n * Defines which navigation sections should stay visible when scrolling down.\n */\n @Prop() stickyLevel: StickyLevel;\n\n /**\n * Method to evaluate the component height\n */\n @Method()\n async updateNavigationHeight() {\n // We could not use this.hostElement because if sticky-true, the height is 0\n // navigationWrapper delivers always the height, independent of sticky\n return await this.navigationWrapper.getBoundingClientRect().height;\n }\n\n /**\n * Open toolbar sub navigation wrapper and show related part\n */\n @Method()\n async openToolbarSub(rel: string, keyboard: boolean = false) {\n clearTimeout(this.toolbarWrapperTimeout);\n this.deactivateToolbarLinks();\n this.closeMainSub();\n this.isMobileNavOpen && this.closeMobileNav();\n this.isMainSubOpen && this.closeMainSub();\n this.activeToolbarSubContainer = this.hostElement.querySelector(`#${rel}`) as HTMLElement;\n\n if (this.activeToolbarSubContainer) {\n this.isToolbarSubOpen = true;\n this.showToolbarSub();\n if (!!keyboard) this.initSubKeyboardNav(this.activeToolbarSubContainer);\n }\n }\n\n /**\n * Close toolbar sub navigation wrapper\n */\n @Method()\n async closeToolbarSub() {\n clearTimeout(this.toolbarWrapperTimeout);\n this.deactivateToolbarLinks();\n this.isToolbarSubOpen = false;\n this.toolbarWrapperTimeout = setTimeout(() => {\n if (this.activeToolbarSubContainer) this.activeToolbarSubContainer.style.display = \"none\";\n }, 800);\n }\n\n /**\n * Open main sub navigation wrapper and show related part\n */\n @Method()\n async openMainSub(rel: string, keyboard: boolean = false) {\n clearTimeout(this.mainWrapperTimeout);\n this.deactivateMainLinks();\n this.deactivateMainIconLinks();\n this.isMobileNavOpen && this.closeMobileNav();\n this.isToolbarSubOpen && this.closeToolbarSub();\n this.activeMainSubContainer = this.hostElement.querySelector(`#${rel}`) as HTMLElement;\n\n if (this.activeMainSubContainer) {\n this.isMainSubOpen = true;\n this.isMainSubWrapperOpen = true;\n this.showMainSub();\n if (!!keyboard) this.initSubKeyboardNav(this.activeMainSubContainer);\n }\n }\n\n /**\n * Close main sub navigation wrapper\n */\n @Method()\n async closeMainSub() {\n clearTimeout(this.mainWrapperTimeout);\n this.deactivateMainLinks();\n this.deactivateMainIconLinks();\n this.isMainSubOpen = false;\n this.mainWrapperTimeout = setTimeout(() => {\n this.isMainSubWrapperOpen = false;\n if (this.activeMainSubContainer) this.activeMainSubContainer.style.display = \"none\";\n }, 400);\n }\n\n /**\n * Open mobile nav\n */\n @Method()\n async openMobileNav() {\n this.closeMobileSub();\n this.isMainSubOpen && this.closeMainSub();\n this.isToolbarSubOpen && this.closeToolbarSub();\n this.mobileWrapper.classList.add(\"act\");\n this.isMobileNavOpen = true;\n this.mainNavigation.burgerActive = true;\n }\n\n /**\n * Close mobile nav\n */\n @Method()\n async closeMobileNav() {\n this.deactivateMainIconLinks();\n this.mobileWrapper.classList.remove(\"act\");\n this.isMobileNavOpen = false;\n this.mainNavigation.burgerActive = false;\n setTimeout(() => {\n this.closeMobileSub();\n }, 400);\n }\n\n /**\n * Open mobile sub navigation wrapper and show related part\n */\n @Method()\n async openMobileSub(rel: string) {\n this.activeMobileSubContainer = this.mobileWrapper.querySelector(`#mobile-${rel}`) as HTMLElement;\n this.showMobileSub();\n }\n\n /**\n * Open mobile sub navigation wrapper and show related part\n */\n @Method()\n async openMobileSubImmediately(rel: string) {\n this.mainNavigation.burgerActive = false;\n this.closeMobileSub();\n this.activeMobileSubContainer = this.mobileWrapper.querySelector(`#mobile-${rel}`) as HTMLElement;\n this.isMainSubOpen && this.closeMainSub();\n this.isToolbarSubOpen && this.closeToolbarSub();\n this.mobileWrapper.classList.add(\"act\");\n this.isMobileNavOpen = true;\n this.showMobileSubImmediately();\n }\n\n /**\n * Close mobile sub navigation wrapper\n */\n @Method()\n async closeMobileSub() {\n this.deactivateMainIconLinks();\n this.mobileSubChilds.forEach((element: HTMLElement) => {\n element.classList.remove(\"act\");\n element.querySelector(\".mobile-secondary-nav-inner\").scrollTop = 0;\n });\n this.mobileMainNavigation.scrollTop = 0;\n this.mobileMainNavigation.classList.remove(\"scale\"); //why does this even work?\n }\n\n @Listen(\"scroll\", { target: \"window\" })\n detectScrollDirection() {\n if (this.sticky) {\n clearTimeout(this.scrollTimeout);\n this.scrollTimeout = setTimeout(() => {\n if (!isTouchDevice()) {\n let st = window.pageYOffset || document.documentElement.scrollTop;\n if (st > 128 && st > this.lastScrollTop) {\n this.currentScrollDirection = \"down\";\n } else {\n this.currentScrollDirection = \"up\";\n }\n\n this.lastScrollTop = st <= 0 ? 0 : st; // For Mobile or negative scrolling\n } else {\n if (document.documentElement.scrollTop > 128) {\n this.currentScrollDirection = \"down\";\n } else {\n setTimeout(() => {\n this.currentScrollDirection = \"up\";\n }, 500);\n }\n }\n }, 50);\n }\n }\n\n @Listen(\"resize\", { target: \"window\" })\n closeNavigationsOnResize() {\n if (this.isToolbarSubOpen || this.isMainSubOpen) {\n clearTimeout(this.resizeTimeout);\n this.resizeTimeout = setTimeout(() => {\n this.closeToolbarSub();\n this.closeMainSub();\n }, 100);\n }\n }\n\n componentWillLoad() {\n this.getNavigationStructure();\n this.calcMobileNavigationPadding();\n this.toolbarNavigation = this.hostElement.querySelector('[slot=\"toolbar\"]');\n this.toolbarChilds = this.hostElement.querySelectorAll('[slot=\"toolbar-sub\"]');\n this.toolbarLinks = this.hostElement.querySelectorAll(\"eon-ui-navigation-toolbar-icon-link\");\n this.mainNavigation = this.hostElement.querySelector('[slot=\"main\"]');\n this.mainChilds = this.hostElement.querySelectorAll('[slot=\"main-sub\"], [slot=\"main-icon-sub\"]');\n this.mainStandardChilds = this.hostElement.querySelectorAll('[slot=\"main-sub\"]');\n this.mainIconChilds = this.hostElement.querySelectorAll('[slot=\"main-icon-sub\"]');\n this.mainLinks = this.hostElement.querySelectorAll(\"eon-ui-navigation-main-link\");\n this.mainIconLinks = this.hostElement.querySelectorAll(\"eon-ui-navigation-main-icon-link\");\n this.setParentNavTypeDataAttributeToFlyoutLink();\n this.setInnerBackgroundToSubs();\n }\n\n componentDidLoad() {\n this.mainSubWrapper && this.initMainSubFunctionality();\n this.createMainMobileNavigation();\n this.mobileSubChilds = this.mobileWrapper?.querySelectorAll(\".mobile-secondary-nav\");\n this.setCssVariables();\n }\n\n /**\n * Adds type of parent navigation to flyout link. This is needed for tracking.\n */\n setParentNavTypeDataAttributeToFlyoutLink() {\n // set parent navigation type for toolbar flyout links\n this.toolbarChilds.forEach((toolbarChild) => {\n toolbarChild.querySelectorAll(\"eon-ui-navigation-flyout-link\").forEach((link) => {\n link.dataset.parentNavigationType = \"toolbar\";\n });\n });\n\n // set parent navigation type for main flyout links\n this.mainChilds.forEach((mainChild) => {\n mainChild.querySelectorAll(\"eon-ui-navigation-flyout-link\").forEach((link) => {\n link.dataset.parentNavigationType = \"main\";\n });\n });\n }\n\n setInnerBackgroundToSubs() {\n this.toolbarChilds.forEach((child: HTMLElement) => {\n child.setAttribute(\"inner-background\", NAVIGATION_TOOLBAR_FLYOUT_INNER_BACKGROUND);\n });\n\n this.mainChilds.forEach((child: HTMLElement) => {\n child.setAttribute(\"inner-background\", NAVIGATION_MAIN_FLYOUT_INNER_BACKGROUND);\n });\n }\n\n showToolbarSub() {\n this.toolbarChilds.forEach((element: HTMLElement) => {\n element.style.display = \"none\";\n });\n\n this.activeToolbarSubContainer.style.display = \"block\";\n this.setToolbarSubHeight();\n }\n\n showMainSub() {\n this.mainChilds.forEach((element: HTMLElement) => {\n element.style.display = \"none\";\n });\n\n this.activeMainSubContainer.style.display = \"block\";\n\n this.setMainSubHeight();\n }\n\n showMobileSub() {\n this.activeMobileSubContainer.classList.add(\"act\");\n this.mobileMainNavigation.classList.add(\"scale\");\n }\n\n showMobileSubImmediately() {\n this.activeMobileSubContainer.classList.add(\"no-animation\");\n this.activeMobileSubContainer.classList.add(\"act\");\n this.mobileMainNavigation.classList.add(\"scale\");\n }\n\n initSubKeyboardNav(activeSubContainer: HTMLElement) {\n let subItems = Array.prototype.slice.call(activeSubContainer.querySelectorAll(\"*\"));\n let firstFocusableItem: HTMLElement;\n let lastFocusableItem: HTMLElement;\n\n subItems.forEach((element) => {\n if (element.hasAttribute(\"tabindex\")) {\n if (!firstFocusableItem) firstFocusableItem = element;\n lastFocusableItem = element;\n } else {\n if (element.shadowRoot) {\n let focusableElement = element.shadowRoot.querySelector(\"[tabindex]\");\n if (!!focusableElement) {\n if (!firstFocusableItem) firstFocusableItem = focusableElement;\n lastFocusableItem = focusableElement;\n }\n }\n }\n });\n\n if (!!firstFocusableItem) firstFocusableItem.focus();\n if (!!firstFocusableItem && !!lastFocusableItem)\n this.exitSecondaryNavViaKey(firstFocusableItem, lastFocusableItem, activeSubContainer);\n }\n\n exitSecondaryNavViaKey(firstChild: HTMLElement, lastChild: HTMLElement, activeSubContainer: HTMLElement) {\n if (!firstChild.classList.contains(\"event-listener\")) {\n firstChild.classList.add(\"event-listener\");\n firstChild.addEventListener(\"keydown\", (e) => {\n switch (e.key) {\n case KeyIds.TAB:\n if (e.shiftKey) {\n e.preventDefault();\n this.closeMainSub();\n let relatedLink = document.querySelector(\n `[sub-nav-rel=\"${activeSubContainer.getAttribute(\"id\")}\"]`\n ) as HTMLElement;\n (relatedLink.shadowRoot.querySelector(\"[tabindex]\") as HTMLElement)?.focus();\n }\n break;\n default:\n break;\n }\n });\n }\n\n if (!lastChild.classList.contains(\"event-listener\")) {\n lastChild.classList.add(\"event-listener\");\n lastChild.addEventListener(\"keydown\", (e) => {\n switch (e.key) {\n case KeyIds.TAB:\n if (!e.shiftKey) {\n e.preventDefault();\n this.closeMainSub();\n let relatedLink = document.querySelector(\n `[sub-nav-rel=\"${this.activeMainSubContainer.getAttribute(\"id\")}\"]`\n ) as HTMLElement;\n (relatedLink.shadowRoot.querySelector(\"[tabindex]\") as HTMLElement)?.focus();\n }\n break;\n default:\n break;\n }\n });\n }\n }\n\n getNavigationStructure() {\n this.hasMetaNavigation = !!this.hostElement.querySelector('[slot=\"meta\"]');\n this.hasToolbarNavigation = !!this.hostElement.querySelector('[slot=\"toolbar\"]');\n this.hasMainNavigation = !!this.hostElement.querySelector('[slot=\"main\"]');\n this.hasExtension = !!this.hostElement.querySelector('[slot=\"extension\"]');\n }\n\n @Watch(\"sticky\")\n @Watch(\"stickyLevel\")\n calcMobileNavigationPadding() {\n this.hasMetaNavigation && (this.mobileNavigationPadding += this.metaHeight);\n // this.hasToolbarNavigation && (mobileNavigationPadding += this.toolbarHeight);\n this.hasMainNavigation && (this.mobileNavigationPadding += this.mainHeight);\n\n switch (this.stickyLevel) {\n case NAVIGATION_STICKYSLEVEL_META:\n this.mobileNavigationPaddingSticky = this.mobileNavigationPadding;\n break;\n case NAVIGATION_STICKYSLEVEL_TOOLBAR:\n this.mobileNavigationPaddingSticky =\n this.mobileNavigationPadding - (this.hasMetaNavigation ? this.metaHeight : 0);\n break;\n case NAVIGATION_STICKYSLEVEL_MAIN:\n this.mobileNavigationPaddingSticky =\n /* mobileNavigationPadding -\n (this.hasMetaNavigation ? this.metaHeight : 0) -\n (this.hasToolbarNavigation ? this.toolbarHeight : 0); */\n this.mobileNavigationPadding - (this.hasMetaNavigation ? this.metaHeight : 0);\n break;\n }\n }\n\n setCssVariables(): void {\n setCssVariable(this.hostElement, \"--mobileNavigationPadding\", `${this.mobileNavigationPadding}px`);\n setCssVariable(this.hostElement, \"--mobileNavigationPaddingSticky\", `${this.mobileNavigationPaddingSticky}px`);\n }\n\n setToolbarSubHeight() {\n this.toolbarSubHeight = this.activeToolbarSubContainer.getBoundingClientRect().height + 64; // 64: padding-top and -bottom of parent container + space\n }\n\n setMainSubHeight() {\n this.mainSubHeight = this.activeMainSubContainer.getBoundingClientRect().height + 64 + 10; // 64: padding-top and -bottom of parent container + space\n }\n\n deactivateMainLinks() {\n this.mainLinks.forEach((item: HTMLEonUiNavigationMainLinkElement) => {\n item.removeActiveState();\n });\n }\n\n deactivateMainIconLinks() {\n this.mainIconLinks.forEach((item: HTMLEonUiNavigationMainIconLinkElement) => {\n item.removeActiveState();\n });\n }\n\n deactivateToolbarLinks() {\n this.toolbarLinks.forEach((item: HTMLEonUiNavigationToolbarIconLinkElement) => {\n item.removeActiveState();\n });\n }\n\n initMainSubFunctionality() {\n /*\n * Init secondary navigation mouse leave function\n * Closes secondary navigation after mouse leave at the bottom (400ms)\n */\n this.mainSubWrapper.addEventListener(\"mouseleave\", (mouse) => {\n if (this.closestEdge(mouse, this.mainSubWrapper) !== \"top\") {\n this.mouseLeaveTimeout = setTimeout(() => {\n this.closeMainSub();\n }, 400);\n }\n });\n\n /*\n * Init secondary navigation mouse enter function\n * Interrupts mouse leave function if reentering navigation (400ms)\n */\n this.mainSubWrapper.addEventListener(\"mouseenter\", () => {\n if (this.mouseLeaveTimeout) {\n clearTimeout(this.mouseLeaveTimeout);\n }\n });\n }\n\n /**\n * Loop through the columns which should be available for mobile navigation\n * and append them to the mobile navigation div\n */\n private createMainMobileNavigation() {\n if (this.hasMainNavigation) {\n // this.mainNavigation = this.hostElement.querySelector('[slot=\"main\"]');\n\n if (this.mainNavigation.hasAttribute(\"burger-position\")) {\n this.burgerPosition = this.mainNavigation.getAttribute(\"burger-position\") as BurgerPosition;\n }\n\n this.mobileWrapper.classList.add(`from-${this.burgerPosition}`);\n }\n }\n\n private createMobileMain() {\n const mainNavigationChilds: HTMLElement[] = [];\n const toolbarNavigationChilds: HTMLElement[] = [];\n\n this.mainNavigation?.querySelectorAll(\"eon-ui-navigation-main-link\")?.forEach((element) => {\n const item = element.cloneNode(true) as HTMLElement;\n item.setAttribute(\"mobile\", \"true\");\n mainNavigationChilds.push(item);\n });\n\n this.toolbarNavigation?.querySelectorAll(\"eon-ui-navigation-toolbar-icon-link\")?.forEach((element) => {\n const item = element.cloneNode(true) as HTMLElement;\n item.setAttribute(\"mobile\", \"true\");\n toolbarNavigationChilds.push(item);\n });\n\n return (\n
(this.mobileMainNavigation = el as HTMLElement)}>\n
\n element.outerHTML).join(\"\")}\n >
\n element.outerHTML).join(\"\")}\n >
\n \n \n );\n }\n\n /**\n * Creates the submenu for the navigation\n */\n private createMobileSub(subNavi, relatedNavigation) {\n let subNavigationChilds: HTMLElement[] = [];\n const backLinkText = relatedNavigation.querySelector(`[sub-nav-rel='${subNavi.id}']`)?.getAttribute(\"text\");\n\n subNavi.querySelectorAll(\"eon-ui-grid-control-column\").forEach((column) => {\n Array.from(column.children).forEach((columnItem: HTMLElement) => {\n const item = columnItem.cloneNode(true) as HTMLElement;\n item.setAttribute(\"mobile\", \"true\");\n subNavigationChilds.push(item);\n });\n });\n\n return (\n
\n {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */}\n
this.closeMobileSub()}>\n {backLinkText}\n \n
\n element.outerHTML).join(\"\")}\n >
\n \n );\n }\n\n /**\n * Creates the submenu for the navigation\n */\n private createMobileSubWithGrid(subNavi: HTMLElement, relatedNavigation) {\n const backLinkText = relatedNavigation.querySelector(`[sub-nav-rel='${subNavi.id}']`)?.getAttribute(\"text\");\n\n const subNaviClone = document.importNode(subNavi, true);\n subNaviClone.removeAttribute(\"sub-nav-rel\");\n subNaviClone.setAttribute(\"force-mobile-layout\", \"true\");\n subNaviClone.style.display = \"block\";\n\n return (\n
\n {!!backLinkText && (\n /* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */\n
this.closeMobileSub()}>\n {backLinkText}\n \n
\n )}\n
\n \n );\n }\n\n closestEdge(mouse, elem) {\n var elemBounding = elem.getBoundingClientRect();\n\n var elementLeftEdge = elemBounding.left;\n var elementTopEdge = elemBounding.top;\n var elementRightEdge = elemBounding.right;\n var elementBottomEdge = elemBounding.bottom;\n\n var mouseX = mouse.pageX;\n var mouseY = mouse.pageY;\n\n var topEdgeDist = Math.abs(elementTopEdge - mouseY);\n var bottomEdgeDist = Math.abs(elementBottomEdge - mouseY);\n var leftEdgeDist = Math.abs(elementLeftEdge - mouseX);\n var rightEdgeDist = Math.abs(elementRightEdge - mouseX);\n\n var min = Math.min(topEdgeDist, bottomEdgeDist, leftEdgeDist, rightEdgeDist);\n\n switch (min) {\n case leftEdgeDist:\n return \"left\";\n case rightEdgeDist:\n return \"right\";\n case topEdgeDist:\n return \"top\";\n case bottomEdgeDist:\n return \"bottom\";\n }\n }\n\n render() {\n return (\n \n (this.navigationWrapper = el as HTMLElement)}\n >\n {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */}\n this.closeMobileNav()}\n onTouchEnd={() => this.closeMobileNav()}\n >\n {this.hasMetaNavigation && (\n
\n \n
\n )}\n {this.hasToolbarNavigation && (\n \n
\n \n
\n \n
\n \n
\n \n
\n )}\n {this.hasMainNavigation && (\n \n
\n \n
\n (this.mainSubWrapper = el as HTMLElement)}\n class={pfx(\"main-sub-wrapper\")}\n style={{\n height: `${this.isMainSubWrapperOpen && this.mainSubHeight ? this.mainSubHeight : 0}px`\n }}\n >\n \n
\n \n \n
\n \n \n\n (this.mobileWrapper = el as HTMLElement)}\n inner-background={NAVIGATION_MOBILE_FLYOUT_INNER_BACKGROUND}\n >\n {this.createMobileMain()}\n {Array.from(this.mainStandardChilds).map((child: HTMLElement) =>\n this.createMobileSub(child, this.mainNavigation)\n )}\n {Array.from(this.mainIconChilds).map((child: HTMLElement) =>\n this.createMobileSubWithGrid(child, this.mainNavigation)\n )}\n {Array.from(this.toolbarChilds).map((child: HTMLElement) =>\n this.createMobileSubWithGrid(child, this.toolbarNavigation)\n )}\n \n
\n )}\n {this.hasExtension && (\n
\n \n
\n )}\n \n
\n );\n }\n}\n"],"mappings":"sSAAO,MAAMA,EAA+B,OACrC,MAAMC,EAAkC,UACxC,MAAMC,EAA+B,OCF5C,MAAMC,EAAgB,o1mDACtB,MAAAC,EAAeD,E,MC8BFE,EAAU,M,yBAErBC,KAAAC,WAAa,GACbD,KAAAE,cAAgB,GAChBF,KAAAG,WAAa,GAQbH,KAAAI,cAAgB,EAqBhBJ,KAAAK,eAAiCC,EAIjCN,KAAAO,wBAA0B,EAC1BP,KAAAQ,8BAAgC,E,4BAEU,K,sBACL,M,0DAEI,M,mBACP,M,uNAOE,M,YAOV,K,2BAW1B,4BAAMC,GAGJ,aAAaT,KAAKU,kBAAkBC,wBAAwBC,M,CAO9D,oBAAMC,CAAeC,EAAaC,EAAoB,OACpDC,aAAahB,KAAKiB,uBAClBjB,KAAKkB,yBACLlB,KAAKmB,eACLnB,KAAKoB,iBAAmBpB,KAAKqB,iBAC7BrB,KAAKsB,eAAiBtB,KAAKmB,eAC3BnB,KAAKuB,0BAA4BvB,KAAKwB,YAAYC,cAAc,IAAIX,KAEpE,GAAId,KAAKuB,0BAA2B,CAClCvB,KAAK0B,iBAAmB,KACxB1B,KAAK2B,iBACL,KAAMZ,EAAUf,KAAK4B,mBAAmB5B,KAAKuB,0B,EAQjD,qBAAMM,GACJb,aAAahB,KAAKiB,uBAClBjB,KAAKkB,yBACLlB,KAAK0B,iBAAmB,MACxB1B,KAAKiB,sBAAwBa,YAAW,KACtC,GAAI9B,KAAKuB,0BAA2BvB,KAAKuB,0BAA0BQ,MAAMC,QAAU,MAAM,GACxF,I,CAOL,iBAAMC,CAAYnB,EAAaC,EAAoB,OACjDC,aAAahB,KAAKkC,oBAClBlC,KAAKmC,sBACLnC,KAAKoC,0BACLpC,KAAKoB,iBAAmBpB,KAAKqB,iBAC7BrB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