1if(!customElements.get("header-section")){class a extends HTMLElement{constructor(){if(super(),!window.headerBind){if(this.page=document.querySelector("main"),this.isTrasparent=!!this.classList.contains("header--transparent"),this.isSticky=!1,this.main=this.querySelector(".header__main"),this.megamenu=document.querySelector(".megamenu"),this.message=this.querySelector(".header__announcement"),this.dropdown=this.querySelectorAll(".header__dropdown"),this.media=window.matchMedia("(min-width: 1200px)"),this.mediaMobileUp=window.matchMedia("(min-width: 768px)"),this.styleDump=void 0,this.bar=document.querySelector(".header__bar"),this.clearSearch=this.querySelector(".header__search-clear"),this.onScroll=this.onScroll.bind(this),this.mediaMobileUp.matches&&window.addEventListener("scroll",this.onScroll),this.clearSearch){const t=this.querySelector('input[type="search"]');this.clearSearch.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),t.value="",t.focus(),t.classList.remove("filled")})}window.addEventListener("nostoAutocompleteOpened",()=>{this.classList.add("header--force-lighter"),this.classList.add("header--search-opened"),this.mediaMobileUp.matches||(this.page.style.position="fixed",this.page.style.top=this.offsetHeight+"px")}),window.addEventListener("nostoAutocompleteClosed",()=>{this.classList.remove("header--force-lighter"),this.classList.remove("header--search-opened"),this.classList.remove("header--sticky"),this.page.style.position="relative",this.page.style.top="0px"}),window.addEventListener("resize",this.resizeHandler=()=>{window.headerHeight=this.offsetHeight,window.messageHeight=this.message?this.message.offsetHeight:0,document.documentElement.style.setProperty("--header-height",this.offsetHeight+"px")}),this.addEventListener("stick",e=>{e.detail.enabled?this.stick():this.unStick()}),this.addEventListener("hold",e=>{e.detail.enabled?this.hold():this.unHold()}),this.media.addEventListener("change",this.mediaChangeHandler=()=>this.onResize()),this.bindDropdown(),this.carousel(),this.onResize(),window.headerBind=!0,this._bound=!0}}disconnectedCallback(){this.bar&&this.barMouseenterHandler&&this.bar.removeEventListener("mouseenter",this.barMouseenterHandler),this.onScroll&&window.removeEventListener("scroll",this.onScroll),this.resizeHandler&&window.removeEventListener("resize",this.resizeHandler),this.media&&this.mediaChangeHandler&&this.media.removeEventListener("change",this.mediaChangeHandler),this.bodyClickHandler&&document.body.removeEventListener("click",this.bodyClickHandler),this.swiper&&(this.swiper.destroy(!0,!0),this.swiper=null),this._bound&&(window.headerBind=!1)}onScroll(){window.lockScroll||(window.lastScroll<=window.messageHeight?document.documentElement.style.setProperty("--scroll",window.lastScroll+"px"):document.documentElement.style.setProperty("--scroll",window.messageHeight+"px"),window.lastScroll>this.offsetHeight&&this.dispatchEvent(new CustomEvent("stick",{detail:{enabled:!0}})),window.lastScroll<=this.offsetHeight&&window.disableStickyHeader&&this.dispatchEvent(new CustomEvent("stick",{detail:{enabled:!1}})),window.lastScroll<=window.messageHeight&&this.dispatchEvent(new CustomEvent("stick",{detail:{enabled:!1}})),"up"==window.scrollDirection&&this.isSticky&&!window.disableStickyHeader?(this.style.transform=`translate(0, ${this.offsetHeight}px)`,window.innerWidth<789?this.megamenu.style.top="10px":this.megamenu.style.top="20px"):(this.style.transform="translate(0, 0)",this.megamenu.style.top="0px"))}onResize(){this.mediaMobileUp.matches?window.addEventListener("scroll",this.onScroll):(window.removeEventListener("scroll",this.onScroll),this.unStick(),this.style.transform="translate(0,0)",this.page.style.paddingTop="0px"),this.unHold()}stick(){this.isSticky=!0,this.classList.add("header--sticky"),this.style.top=`-${this.offsetHeight}px`,this.classList.add("header--transition"),this.isTrasparent&&this.media.matches||(this.page.style.paddingTop=this.offsetHeight+"px")}unStick(){this.isSticky=!1,this.classList.remove("header--sticky"),this.classList.remove("header--transition"),this.style.top="0px",this.style.transform="translate(0, 0)",this.isTrasparent&&this.media.matches||(this.page.style.paddingTop="0px")}hold(){window.lockScroll=!0,this.styleDump=this.copyStyles(this.style),this.classList.remove("header--transition"),this.page.style.position="fixed",this.isSticky?this.page.style.top=`-${window.lastScroll}px`:this.media.matches&&this.isTrasparent?this.page.style.top="0px":this.page.style.top=this.offsetHeight+"px",this.megamenu.style.position="relative",this.style.position="relative",this.style.transform="translate(0,0)",this.style.top="0px",window.scrollTo({top:0,behavior:"instant"})}unHold(){this.removeAttribute("style"),this.styleDump&&(this.style.position=this.styleDump.position,this.style.top=this.styleDump.top,this.style.transform=this.styleDump.transform),this.megamenu.style.position="absolute",this.page.style.position="relative",this.page.style.top="0px",window.scrollTo({top:window.lastScroll,behavior:"instant"}),setTimeout(()=>{this.classList.add("header--transition"),this.lastScroll++,window.lockScroll=!1},300)}
1bindDropdown(){this.dropdown.forEach(e=>{const t=e.querySelector('button[aria-controls*="dropdown-"]');var s=e.querySelector(".header__dropdown-content");t&&(t.addEventListener("mouseenter",e=>{e.stopPropagation(),this.classList.add("header--force-light"),t.setAttribute("aria-expanded","true")}),t.addEventListener("click",e=>{e.stopPropagation(),this.classList.add("header--force-light"),t.setAttribute("aria-expanded","true")})),e.addEventListener("mouseleave",e=>{this.closeDropdown()}),s&&s.addEventListener("click",e=>e.stopPropagation())}),document.body.addEventListener("click",this.bodyClickHandler=()=>{this.closeDropdown()})}closeDropdown(){this.dropdown.forEach(e=>{e=e.querySelector('button[aria-controls*="dropdown-"]');e&&e.setAttribute("aria-expanded","false"),this.classList.remove("header--force-light")})}copyStyles(e){var t={};let s;for(s in e)t[s]=e[s];return t}carousel(){var e;!this.message||this.message.querySelectorAll(".swiper-slide").length<2||(e=parseInt(this.message.getAttribute("data-delay")),new Swiper(this.querySelector(".swiper-container"),{loop:!0,grabCursor:!1,speed:400,effect:"fade",fadeEffect:{crossFade:!0},autoplay:{delay:e}}))}}customElements.define("header-section",a)}
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.