PageSourceSearch

https://www.lyfgeniahcp.com/hubfs/hub_generated/template_assets/1/…/1789504228223/template_navigation.min.js

js lyfgeniahcp.com collected 2026-10-04 13:23:57 UTC 6,483 bytes, 2 lines download raw bytes

1!function(){"use strict";let lastScrollY=0,ticking=!1,header=null,toggleBtn=null,navCollapse=null;function onScroll(){ticking||(window.requestAnimationFrame(function(){!function(){const currentScrollY=window.pageYOffset||document.documentElement.scrollTop,bodyHeight=document.body.scrollHeight,windowHeight=window.innerHeight;header&&(currentScrollY<lastScrollY?currentScrollY+windowHeight+300<bodyHeight&&(header.style.position="sticky"):currentScrollY>lastScrollY&&currentScrollY>0&&(header.style.position="initial"),lastScrollY=currentScrollY)}(),ticking=!1}),ticking=!0)}function toggleMobileMenu(event){if(event&&event.preventDefault(),!navCollapse||!toggleBtn)return;navCollapse.classList.contains("show")?closeMobileMenu():function(){if(!navCollapse||!toggleBtn)return;navCollapse.classList.add("show"),toggleBtn.classList.remove("collapsed"),toggleBtn.setAttribute("aria-expanded","true"),document.body.style.overflow="hidden",offsetMenuBelowDisclaimer()}()}function closeMobileMenu(){navCollapse&&toggleBtn&&(navCollapse.classList.remove("show"),toggleBtn.classList.add("collapsed"),toggleBtn.setAttribute("aria-expanded","false"),document.body.style.overflow="",navCollapse.style.top="",navCollapse.style.height="",closeAllMobileSubMenus())}function offsetMenuBelowDisclaimer(){if(navCollapse){var disclaimer=document.getElementById("hs_cos_wrapper_disclaimer_bar");
1if(disclaimer){var offset=Math.max(0,Math.round(disclaimer.getBoundingClientRect().bottom));navCollapse.style.top=offset+"px",navCollapse.style.height="calc(100% - "+offset+"px)"}}}function onDocumentClick(event){if(!navCollapse||!navCollapse.classList.contains("show"))return;const clickedInsideNav=navCollapse.contains(event.target),clickedToggle=toggleBtn&&toggleBtn.contains(event.target);clickedInsideNav||clickedToggle||closeMobileMenu()}function isMobile(){return window.innerWidth<992}function hideSubMenu(navItem,subMenu){navItem.classList.remove("open"),subMenu.classList.remove("show");const toggle=navItem.querySelector("a");toggle&&toggle.setAttribute("aria-expanded","false")}function closeAllMobileSubMenus(){document.querySelectorAll(".nav-item .sub-menu.sub-menu-open").forEach(function(menu){menu.classList.remove("sub-menu-open");const parent=menu.closest(".nav-item");if(parent){parent.classList.remove("open");const link=parent.querySelector("a");link&&link.setAttribute("aria-expanded","false")}})}function enableHorizontalScroll(){if(!navCollapse)return;const navList=navCollapse.querySelector("ul, .navbar-nav");navList&&(navList.scrollWidth>navList.clientWidth?(navList.classList.add("nav-scroll"),navList.style.overflowX="auto",navList.style.webkitOverflowScrolling="touch"):(navList.classList.remove("nav-scroll"),navList.style.overflowX=""))}function init(){var currentPath,links,bestMatch,bestLength;header=document.getElementById("site-header"),toggleBtn=document.getElementById("toggle-menu"),navCollapse=document.getElementById("navbarSupportedContent"),header&&(lastScrollY=window.pageYOffset||document.documentElement.scrollTop,window.addEventListener("scroll",onScroll,{passive:!0})),toggleBtn&&toggleBtn.addEventListener("click",toggleMobileMenu),document.querySelectorAll(".nav-item").forEach(function(item){const subMenu=item.querySelector(".sub-menu");if(!subMenu)return;const link=item.querySelector("a");item.addEventListener("mouseenter",function(){isMobile()||function(navItem,subMenu){navItem.classList.add("open"),subMenu.classList.add("show");const toggle=navItem.querySelector("a");toggle&&toggle.setAttribute("aria-expanded","true")}(item,subMenu)}),item.addEventListener("mouseleave",function(){isMobile()||hideSubMenu(item,subMenu)}),link&&link.addEventListener("click",function(event){if(isMobile()){event.preventDefault();var isOpen=subMenu.classList.contains("sub-menu-open");closeAllMobileSubMenus(),isOpen||function(navItem,subMenu){subMenu.classList.add("sub-menu-open"),navItem.classList.add("open");const link=navItem.querySelector("a");link&&link.setAttribute("aria-expanded","true")}(item,subMenu)}}),item.addEventListener("keydown",function(event){"Escape"===event.key&&(hideSubMenu(item,subMenu),link&&link.focus())})}),enableHorizontalScroll(),window.addEventListener("resize",enableHorizontalScroll),window.addEventListener("resize",function(){navCollapse&&navCollapse.classList.contains("show")&&offsetMenuBelowDisclaimer()}),function(){var primaryMenu=document.querySelector(".primary-menu"),leftArrow=document.querySelector(".primary-menu-left"),rightArrow=document.querySelector(".primary-menu-right");if(primaryMenu&&leftArrow&&rightArrow){var activeLink=primaryMenu.querySelector(".level-1-link.active");activeLink&&activeLink.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"}),rightArrow.classList.add("show"),primaryMenu.addEventListener("scroll",updateArrows,{passive:!0}),leftArrow.addEventListener("click",function(){primaryMenu.scrollBy({left:-150,behavior:"smooth"})}),rightArrow.addEventListener("click",function(){primaryMenu.scrollBy({left:150,behavior:"smooth"})}),updateArrows()}function updateArrows(){var scrollLeft=primaryMenu.scrollLeft,maxScroll=primaryMenu.scrollWidth-primaryMenu.clientWidth-1;scrollLeft<=5?(leftArrow.classList.remove("show"),rightArrow.classList.add("show")):scrollLeft>=maxScroll?(leftArrow.classList.add("show"),rightArrow.classList.remove("show")):(leftArrow.classList.add("show"),rightArrow.classList.add("show"))}}(),currentPath=window.location.pathname.replace(/\/$/,"")||"/",links=document.querySelectorAll(".level-1-link"),bestMatch=null,bestLength=0,links.forEach(function(link){var linkPath=(link.getAttribute("href")||"").replace(/^https?:\/\/[^\/]+/,"").split("?")[0].split("#")[0].replace(/\/$/,"")||"/";
1"/"!==linkPath&&""!==linkPath&&(currentPath===linkPath||0===currentPath.indexOf(linkPath+"/"))&&linkPath.length>bestLength&&(bestMatch=link,bestLength=linkPath.length)}),bestMatch&&bestMatch.classList.add("active"),document.addEventListener("click",onDocumentClick),document.addEventListener("keydown",function(event){"Escape"===event.key&&(closeMobileMenu(),document.querySelectorAll(".nav-item .sub-menu.show").forEach(function(menu){const parent=menu.closest(".nav-item");parent&&hideSubMenu(parent,menu)}))})}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",init):init()}();
2//# sourceURL=https://50895703.fs1.hubspotusercontent-na1.net/hubfs/50895703/hub_generated/template_assets/1/213194501277/1789504228223/template_navigation.js

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.