function t_menusub_init(recid){var rec=document.getElementById("rec"+recid);if(rec&&t_menusub__isBlockVisible(rec)){var submenuWrapperList=rec.querySelectorAll(".t-menusub"),submenuHooks=rec.querySelectorAll("a.t-menu__link-item"),isNewVersion=Array.prototype.some.call(submenuHooks,(function(link){return link.getAttribute("data-menu-submenu-hook")})),closeEvent=window.t_menusub__isMobile?"orientationchange":"resize";Array.prototype.forEach.call(submenuWrapperList,(function(submenuWrapper){var hook=submenuWrapper.getAttribute("data-submenu-hook");if(hook){var hookLinksSelector=isNewVersion?'a[data-menu-submenu-hook="'+hook+'"]':'a[href="'+hook+'"]',hookLinks=document.querySelectorAll(hookLinksSelector);Array.prototype.forEach.call(hookLinks,(function(hookLink){hookLink.classList.add("t-menusub__target-link"),hookLink.setAttribute("data-tooltip-menu-id",recid)}));var submenu=submenuWrapper.querySelector(".t-menusub__menu");t_menusub__appendArrow(submenuWrapper,hookLinks),window.t_menusub__isMobile||"ontouchend"in document?(t_menusub__setUpMenuMobile(submenuWrapper,submenu,hookLinks,recid),document.removeEventListener("click",t_menusub__closeFullscreenSubmenu),document.addEventListener("click",t_menusub__closeFullscreenSubmenu)):t_menusub__setUpMenuDesktop(submenuWrapper,submenu,hookLinks),t_menusub__hightlight(),t_menusub__checkAnchorLinks(recid),window.addEventListener(closeEvent,(function(){submenu&&t_menusub__hideSubmenu(submenu)}))}}));var menu=rec.querySelector(".t450, .t451");menu||(menu=rec.querySelector("[data-menu]")),menu&&menu.hasAttribute("data-full-submenu-mob")&&(window.t_menusub__isMobile||"ontouchend"in document)&&t_menusub__createFullscreenSubmenu(rec,submenuWrapperList)}}function t_menusub__closeFullscreenSubmenu(e){var submenu=e.target.closest(".t-menusub__menu--fullscreen");if(submenu){var navArrow=e.target.closest(".t-menusub__menu--fullscreen__nav-arrow"),navLink=e.target.closest(".t-menusub__link-item:not(.t794__tm-link):not(.t978__tm-link):not(.t966__tm-link)");if(navArrow||navLink){if(submenu.style.transform="",document.body.classList.remove("t-body_scroll-locked"),document.documentElement.classList.remove("t-body_scroll-locked"),navArrow){var submenuPos=submenu.getAttribute("data-cachedPos");submenuPos&&window.scrollTo(0,parseInt(submenuPos,10))}setTimeout((function(){t_menusub__hideSubmenu(submenu)}),300)}}}function t_menusub__setUpMenuDesktop(submenuWrapper,submenu,hookLinks){var marginValue=submenuWrapper.getAttribute("data-submenu-margin"),timer;Array.prototype.forEach.call(hookLinks,(function(hookLink){var clickEvents;hookLink.addEventListener("mouseenter",(function(){t_menusub__showSubmenuOnHover(hookLink,timer,submenu,marginValue)})),hookLink.addEventListener("mouseleave",(function(){timer=setTimeout((function(){t_menusub__hideSubmenu(submenu)}),300)})),["click","auxclick"].forEach((function(event){hookLink.addEventListener(event,(function(e){e.preventDefault()}))}))})),submenu.addEventListener("mouseenter",(function(){t_menusub__showSubmenuOnHover(submenu,timer,submenu,marginValue)})),submenu.addEventListener("mouseleave",(function(){timer=setTimeout((function(){t_menusub__hideSubmenu(submenu)}),300)})),submenu.addEventListener("submenu:mouseenter",(function(){window.clearTimeout(timer)})),submenu.addEventListener("submenu:mouseleave",(function(){timer=setTimeout((function(){t_menusub__hideSubmenu(submenu)}),300)}))}function t_menusub__setUpMenuMobile(submenuWrapper,submenu,hookLinks,recid){Array.prototype.forEach.call(hookLinks,(function(hookLink){hookLink.addEventListener("click",(function(e){if(e.preventDefault(),window.innerWidth>980&&submenu&&t_menusub__hideSubmenu(submenu),submenu.classList.contains("t-menusub__menu_show"))t_menusub__hideSubmenu(submenu);else{var marginValue=submenuWrapper.getAttribute("data-submenu-margin");t_menusub__showSubmenu(hookLink,submenu,marginValue),t_menusub__showME401Submenu(hookLink)}}))})),document.addEventListener("click",(function(e){if(e.isTrusted){var isInsideSubmenu=e.target.closest(".t-menusub__menu"),isAnchor=e.target.closest(".t-menusub__target-link"),isME601;e.target.closest(".t794__tm-link, .t966__tm-link")||(isAnchor&&isAnchor.getAttribute("data-tooltip-menu-id")!==recid&&submenu.classList.contains("t-menusub__menu_show")&&t_menusub__hideSubmenu(submenu),isInsideSubmenu||isAnchor||!submenu.classList.contains("t-menusub__menu_show")||t_menusub__hideSubmenu(submenu))}}))}function t_menusub__showSubmenuOnHover(el,timer,submenu,vIndent){el.classList.contains("t-menusub__menu")&&!el.classList.contains("t-menusub__menu_show")||(clearTimeout(timer),el.classList.contains("t-menusub__menu")&&el.classList.contains("t-menusub__menu_show")||t_menusub__showSubmenu(el,submenu,vIndent))}function t_menusub__showSubmenu(curAnchor,submenu,vIndent){var anchorHeight=curAnchor.offsetHeight,anchorWidth=curAnchor.offsetWidth,anchorMarginLeft=curAnchor&&parseInt(curAnchor.style.marginLeft)||0,curAnchorMarginTop=curAnchor?window.getComputedStyle(curAnchor).getPropertyValue("margin-top"):"0",winHeight=window.t_menusub__isMobile?document.documentElement.clientHeight:window.innerHeight,winWidth=window.t_menusub__isMobile?document.documentElement.clientWidth:window.innerWidth,scrollTop=window.pageYOffset,indentTop=vIndent?parseInt(vIndent,10)+10:0,positionY=curAnchor.offsetTop-parseInt(curAnchorMarginTop,10)+anchorHeight+indentTop,positionX=t_menusub__getLeftRelativePos(curAnchor),rec=curAnchor.closest(".r"),recID=rec?rec.id.replace("rec",""):"",menu=document.getElementById("nav"+recID),isFixedMenu=menu&&"fixed"===getComputedStyle(menu).position;submenu.style.display="block";var submenuHeight=submenu.offsetHeight,submenuWidth=submenu.offsetWidth;if(!isFixedMenu&&positionY+submenuHeight>scrollTop+winHeight){var correctedPositionY=positionY-submenuHeight-anchorHeight-2*indentTop;positionY=Math.max(correctedPositionY,scrollTop),submenu.classList.remove("t-menusub__menu_bottom"),submenu.classList.add("t-menusub__menu_top")}else submenu.classList.remove("t-menusub__menu_top"),submenu.classList.add("t-menusub__menu_bottom");winWidth<=980&&(positionY=0);var absoluteHookPos=curAnchor.getBoundingClientRect().left,absoluteSubmenuPos=0,customArrowPosLeft=0,paddingAxisX=10,halfArrowWidth=10,halfAnchorWidth=anchorWidth/2,menuAbsoluteLeftPos=menu?menu.getBoundingClientRect().left:0;if(positionX+submenuWidth/2winWidth&&(submenu.style.left="",submenu.style.right="0",absoluteSubmenuPos=menu.classList.contains("t450")?0:submenu.getBoundingClientRect().left,t_menusub__createArrowCustomPos(submenu,customArrowPosLeft=absoluteHookPos+halfAnchorWidth-10-absoluteSubmenuPos));if(isFixedMenu&&submenuContent&&submenuRect.bottom>winHeight&&winWidth>980){var bottomPadding=40,submenuUpdatedHeight=winHeight-submenuRect.top-40;submenuContent.style.height=submenuUpdatedHeight+"px",submenuContent.style.overflow="scroll"}var currentMenu=rec.querySelector(".t450, .t451");if(currentMenu||(currentMenu=rec.querySelector("[data-menu]")),currentMenu&¤tMenu.hasAttribute("data-full-submenu-mob")&&(window.t_menusub__isMobile||"ontouchend"in document)){var title=submenu.querySelector(".t-menusub__menu--fullscreen__nav-title");title&&(title.style.fontFamily=window.getComputedStyle(curAnchor).fontFamily),submenu.style.transform="translateX(0)",submenu.setAttribute("data-cachedPos",window.pageYOffset.toString()),document.body.classList.contains("t-body_scroll-locked")||setTimeout((function(){document.body.classList.add("t-body_scroll-locked"),document.documentElement.classList.add("t-body_scroll-locked")}),300)}}function t_menusub__createFullscreenSubmenu(rec,submenuWrapperList){Array.prototype.forEach.call(submenuWrapperList,(function(submenuWrap){var submenu=submenuWrap.querySelector(".t-menusub__menu");if(submenu&&!submenu.querySelector(".t-menusub__menu--fullscreen__nav")){var hookLink=submenuWrap.previousElementSibling,hookLinkStyle=getComputedStyle(hookLink),menu=submenu.closest("[data-menu], .t450, .t451, .t199__mmenu"),mainColor=hookLinkStyle.color,borderColor=mainColor;0===mainColor.indexOf("rgb")&&(borderColor=mainColor.replace("rgb(","").replace(")",""),borderColor="rgba("+(borderColor+=", 0.25")+")");var bgWrapper=menu?menu.querySelector(".t280__menu__bg, .t282__menu__wrapper"):null,bgColor="#000000";bgWrapper?bgColor=getComputedStyle(bgWrapper).backgroundColor:menu&&(bgColor=getComputedStyle(menu).backgroundColor),submenu.style.backgroundColor=bgColor,submenu.classList.add("t-menusub__menu--fullscreen"),submenu.style.height=document.documentElement.clientHeight+"px";var submenuNav=document.createElement("div");submenuNav.classList.add("t-menusub__menu--fullscreen__nav"),0===mainColor.indexOf("rgb")&&(borderColor=mainColor.replace("rgb(","").replace(")",""),borderColor="rgba("+(borderColor+=", 0.6")+")"),(menu.classList.contains("t450__left")||menu.classList.contains("t451m__left"))&&submenu.classList.add("t-menusub__menu--fullscreen-left"),submenuNav.style.borderBottom="2px solid "+borderColor;var title=document.createElement("p");title.classList.add("t-menusub__menu--fullscreen__nav-title"),title.textContent=hookLink.textContent,title.style.color=mainColor,title.style.fontWeight=hookLinkStyle.fontWeight,title.style.fontSize=hookLinkStyle.fontSize,title.style.textTransform=hookLinkStyle.textTransform;var backArrow=document.createElement("div");backArrow.classList.add("t-menusub__menu--fullscreen__nav-arrow"),backArrow.innerHTML='\n \n ',submenuNav.appendChild(backArrow),submenuNav.appendChild(title),submenu.insertAdjacentElement("afterbegin",submenuNav),rec&&rec.insertAdjacentElement("beforeend",submenu)}})),window.addEventListener("orientationchange",(function(){setTimeout((function(){Array.prototype.forEach.call(document.querySelectorAll(".t-menusub__menu--fullscreen"),(function(submenu){submenu.style.height=document.documentElement.clientHeight+"px"}))}),300)}))}function t_menusub__createArrowCustomPos(submenu,position){submenu.classList.add("t-menusub__menu-custompos"),submenu.style.setProperty("--custom-pos",position+"px")}function t_menusub__getLeftRelativePos(el){var offsetLeft,parentOffsetLeft=0;if("fixed"===window.getComputedStyle(el).getPropertyValue("position"))offsetLeft=el.getBoundingClientRect().left;else{offsetLeft=el.getClientRects().length?el.getBoundingClientRect().left:0;for(var offsetParent=el.offsetParent;offsetParent&&1===offsetParent.nodeType&&"static"===window.getComputedStyle(offsetParent).getPropertyValue("position");)offsetParent=offsetParent.offsetParent;offsetParent&&offsetParent!==el&&1===offsetParent.nodeType&&(parentOffsetLeft=offsetParent.getClientRects().length?offsetParent.getBoundingClientRect().left:0)}return offsetLeft-parentOffsetLeft}function t_menusub__hideSubmenu(submenu){var activeLink=document.querySelector(".t-menusub__target-link_active");activeLink&&(activeLink.classList.remove("t-menusub__target-link_active"),activeLink.setAttribute("aria-expanded","false")),submenu.style.display="",submenu.style.left="",submenu.style.top="",submenu.classList.remove("t-menusub__menu_show"),t_menusub__hideME401Submenu(submenu)}function t_menusub__appendArrow(submenu,hookLinks){var isHasArrow;if(submenu.getAttribute("data-add-submenu-arrow")){var arrow=document.createElement("div");arrow.classList.add("t-menusub__arrow"),Array.prototype.forEach.call(hookLinks,(function(hookLink){hookLink.insertAdjacentElement("beforeend",arrow)}))}}function t_menusub__hightlight(){var url=window.location.href,pathname=window.location.pathname;"/"===pathname.charAt(0)&&(pathname=pathname.slice(1)),""===pathname&&(pathname="/");var shouldBeActiveElements=document.querySelectorAll('.t-menusub__list-item a[href="'+url+'"], .t-menusub__list-item a[href="'+url+'/"], .t-menusub__list-item a[href="'+pathname+'"], .t-menusub__list-item a[href="/'+pathname+'"], .t-menusub__list-item a[href="'+pathname+'/"], .t-menusub__list-item a[href="/'+pathname+'/"]');Array.prototype.forEach.call(shouldBeActiveElements,(function(element){element.classList.add("t-active")}))}function t_menusub__showME401Submenu(hookLink){var wrapME401=hookLink.closest(".t280"),wrapME401Wrapper=wrapME401?wrapME401.querySelector(".t280__menu__wrapper"):null;if(wrapME401Wrapper){var isMobileHeight=t_menusub__isMobileME401(wrapME401),isStaticME401=wrapME401Wrapper.getAttribute("data-submenu-static");if(wrapME401Wrapper.classList.contains("t280__menu_static")&&wrapME401Wrapper.setAttribute("data-submenu-static","n"),"n"===isStaticME401&&isMobileHeight&&!wrapME401Wrapper.classList.contains("t280__menu_static")){var wrapME401Menu=wrapME401.querySelector(".t280__menu"),wrapME401Bottom=wrapME401.querySelector(".t280__bottom");wrapME401Menu&&(wrapME401Menu.style.transition="none"),wrapME401Bottom&&(wrapME401Bottom.style.transition="none"),wrapME401Wrapper&&wrapME401Wrapper.classList.add("t280__menu_static")}}}function t_menusub__hideME401Submenu(submenu){var wrapME401=submenu.closest(".t280");if(wrapME401){var isMobileHeight=t_menusub__isMobileME401(wrapME401),wrapME401Wrapper=wrapME401.querySelector(".t280__menu__wrapper"),isStaticME401=wrapME401Wrapper?wrapME401Wrapper.getAttribute("data-submenu-static"):"",wrapME401ShowMenus=wrapME401.querySelectorAll(".t280__menu .t-menusub__menu_show");"n"===isStaticME401&&window.t_menusub__isMobile&&isMobileHeight&&!wrapME401ShowMenus.length&&wrapME401Wrapper.classList.contains("t280__menu_static")&&wrapME401Wrapper.classList.remove("t280__menu_static")}}function t_menusub__isMobileME401(wrapME401){var wrapME401Menu=wrapME401.querySelector(".t280__menu"),wrapME401Bottom=wrapME401.querySelector(".t280__bottom"),wrapME401Container=wrapME401.querySelector(".t280__container"),menuHeight=wrapME401Menu?wrapME401Menu.offsetHeight:0,menuBottomHeight=wrapME401Bottom?wrapME401Bottom.offsetHeight:0,menuHeaderHeight=wrapME401Container?wrapME401Container.offsetHeight:0,wrapperHeight;return menuHeight>window.innerHeight-menuBottomHeight-menuHeaderHeight-40}function t_menusub__checkAnchorLinks(recid){var rec=document.getElementById("rec"+recid);if(rec&&!(window.innerWidth<980)){var navLinks=rec.querySelectorAll('a[href*="#"].t-menusub__link-item');(navLinks=Array.prototype.filter.call(navLinks,(function(navLink){return!navLink.classList.contains("tooltipstered")}))).length&&t_menusub__catchScroll(navLinks)}}function t_menusub__catchScroll(navLinks){navLinks=Array.prototype.slice.call(navLinks);var clickedSectionID=null,sections=[],sectionToNavigationLinkID={};(navLinks=navLinks.reverse()).forEach((function(link){var currentSection=t_menusub__getSectionByHref(link);currentSection&¤tSection.id&&(sections.push(currentSection),sectionToNavigationLinkID[currentSection.id]=link)})),t_menusub__updateSectionsOffsets(sections),sections.sort((function(a,b){var firstTopOffset=parseInt(a.getAttribute("data-offset-top"),10)||0,secondTopOffset;return(parseInt(b.getAttribute("data-offset-top"),10)||0)-firstTopOffset})),window.addEventListener("resize",t_throttle((function(){t_menusub__updateSectionsOffsets(sections)}),200)),t_menusub__highlightNavLinks(navLinks,sections,sectionToNavigationLinkID,clickedSectionID),setTimeout((function(){t_menusub__updateSectionsOffsets(sections),t_menusub__highlightNavLinks(navLinks,sections,sectionToNavigationLinkID,clickedSectionID)}),1e3),navLinks.forEach((function(navLink,i){navLink.addEventListener("click",(function(){var clickedSection=t_menusub__getSectionByHref(navLink);!navLink.classList.contains("tooltipstered")&&clickedSection&&clickedSection.id&&(navLinks.forEach((function(link,index){index===i?link.classList.add("t-active"):link.classList.remove("t-active")})),clickedSectionID=clickedSection.id)}))})),window.addEventListener("scroll",t_throttle((function(){clickedSectionID=t_menusub__highlightNavLinks(navLinks,sections,sectionToNavigationLinkID,clickedSectionID)}),100))}function t_menusub__getSectionByHref(curlink){if(curlink){var href=curlink.getAttribute("href"),curLinkValue=href?href.replace(/\s+/g,""):"";if(0===curLinkValue.indexOf("/")&&(curLinkValue=curLinkValue.slice(1)),href&&curlink.matches('[href*="#rec"]'))return curLinkValue=curLinkValue.replace(/.*#/,""),document.getElementById(curLinkValue);var selector=href?href.trim():"",slashIndex=-1!==selector.indexOf("#")&&selector.indexOf("#");"number"==typeof slashIndex?selector=selector.slice(slashIndex+1):"number"==typeof(slashIndex=-1!==selector.indexOf("/")&&selector.indexOf("/"))&&(selector=selector.slice(slashIndex+1));var fullSelector='.r[data-record-type="215"] a[name="'+selector+'"]';return document.querySelector(fullSelector)?document.querySelector(fullSelector).closest(".r"):null}}function t_menusub__highlightNavLinks(navLinks,sections,sectionToNavigationLinkID,clickedSectionID){var scrollPosition=window.pageYOffset,scrollHeight=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight),returnValue=clickedSectionID,lastSection=sections.length?sections[sections.length-1]:null,lastSectionTopPos=lastSection?lastSection.getAttribute("data-offset-top"):"0";if(lastSectionTopPos=parseInt(lastSectionTopPos,10)||0,sections.length&&null===clickedSectionID&&lastSectionTopPos>scrollPosition+300)return navLinks.forEach((function(link){link.classList.remove("t-active")})),null;for(var i=0;i=sectionTopPos||0===i&&scrollPosition>=scrollHeight-window.innerHeight){null===clickedSectionID&&navLink&&!navLink.classList.contains("t-active")?(navLinks.forEach((function(link){link.classList.remove("t-active")})),navLink&&navLink.classList.add("t-active"),returnValue=null):null!==clickedSectionID&§ions[i].id&&clickedSectionID===sections[i].id&&(returnValue=null);break}}return returnValue}function t_menusub__updateSectionsOffsets(sections){sections.forEach((function(section){var sectionTopPos=section.getBoundingClientRect().top+window.pageYOffset;section.getAttribute("data-offset-top")!==sectionTopPos.toString()&§ion.setAttribute("data-offset-top",sectionTopPos)}))}function t_menusub__isBlockVisible(rec){var windowWidth=window.innerWidth,screenMin=rec.getAttribute("data-screen-min"),screenMax=rec.getAttribute("data-screen-max");return!(screenMin&&windowWidthparseInt(screenMax,10))}window.t_menusub__isMobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.msMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.webkitMatchesSelector||Element.prototype.oMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(s){for(var el=this;el&&1===el.nodeType;){if(Element.prototype.matches.call(el,s))return el;el=el.parentElement||el.parentNode}return null});