1"use strict";(globalThis.webpackChunkadmorris_jtl_template=globalThis.webpackChunkadmorris_jtl_template||[]).push([[108],{59:(t,e,i)=>{i.d(e,{searchDropdown:()=>n});var s=i(932);!function(t="animation"){var e,i=document.createElement("fakeelement"),s="animation"===t?{animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"}:{transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in s)if(void 0!==i.style[e])return s[e]}("transition");let n={init(t,e,i=!1){if(this.search=$(t),this.searchToggle=$(t+" .js-toggle-search"),this.dropdown=$(t+".header-search--dropdown .js-search-form"),this.open=!1,this.alignment="right",this.mobile=i,this.inputId=$(e),this.searchToggle.length>0){let t=this.search.parents(".header-row__col")[0];if(this.column=$(t).data("column"),this.row=$(t).data("row"),this.currentRow=this.search.parents(".header-row")[0],this.wrapper=this.search.find(".search__wrapper"),this.row<3){let t=this.search.parents(".header__desktop-nav, .header__mobile-nav")[0];this.columnBelow=$(t).find(`.row-${this.row+1} .header-row__col--${this.column}`)[0]}const e=$(".header-wrapper").hasClass("header-wrapper--overlay"),i=$("#evo-main-nav-wrapper").next(".sale-countdown");e&&i.length>0&&(this.overlayModeWithCountdown=!0,this.saleCountdown=i),this.setDropdownWidth(),this.addBackgroundElement(),this.bindUIActions(),this.checkAlignment(),this.setMobileDropdownWidth()}$(window).on("admo-sticky-nav",(()=>this.hideSearch(!1)))},bindUIActions(){this.searchToggle.on("click",function(t){t.preventDefault(),this.open?this.hideSearch():this.showSearch()}.bind(this)),$(document).keyup(function(t){this.open&&"Escape"===t.key&&this.hideSearch()}.bind(this)),this.inputId.on("focus",function(){this.open||this.showSearch(!1)}.bind(this))},showSearch(t=!0){this.open=!0,this.setMobileDropdownWidth(),this.dropdown.css("display","block").outerWidth(),this.dropdown.css({transform:`translateY(${this.calcDropdownOffset()}px)`}),this.search.addClass("is-open"),this.searchToggle.attr("aria-expanded","true"),this.backgroundElement||this.addBackgroundElement(),this.backgroundElement.addClass("is-open"),this.rowBelow=this.getNextVisibleRow(),this.toggleButtonIcon("open"),this.dropdown.removeAttr("inert"),$("#search"),$("#mobile-search"),setTimeout((()=>{t&&this.dropdown.find(".search__input").focus()}),450),document.addEventListener("click",this.outsideClickListener.bind(this))},hideSearch(t=!0){this.open=!1,this.search.removeClass("is-open"),this.dropdown.css({transform:""}),this.backgroundElement?.removeClass("is-open"),this.searchToggle.attr("aria-expanded","false"),this.rowBelow=this.getNextVisibleRow(),this.toggleButtonIcon(),document.removeEventListener("click",this.outsideClickListener.bind(this)),this.dropdown.attr("inert",""),t&&this.searchToggle.focus()},toggleButtonIcon(t){"open"===t?(this.searchToggle.css("width",this.searchToggle.outerWidth()),this.searchToggle.find("svg").replaceWith((0,s.O)("cross"))):this.searchToggle.find("svg").replaceWith((0,s.O)("search"))},outsideClickListener(t){this.search.is(":visible")&&($(t.target).closest(this.search).length||this.open&&(t.preventDefault(),this.hideSearch(!1)))},setDropdownWidth(){let t=this.search.prev(".megamenu");if(t){const e=parseInt(t.find("a:first").css("padding-left")),i=t.outerWidth()-e+this.searchToggle.outerWidth();requestAnimationFrame((()=>this.dropdown.css("width",i)))}},addBackgroundElement(){if(this.search.is(":visible")){let t=this.search.parents(".header-row > .header__container");this.backgroundElement=$('<div class="search__dropdown-background"></div>'),t.length>0&&requestAnimationFrame((()=>{t.append(this.backgroundElement),this.backgroundElement.css({"min-height":this.dropdown.outerHeight()+10,position:"absolute"})}))}},nextRowsColumnVisibility(t=!1){this.columnBelow&&(t?$(this.columnBelow).css({opacity:1,"transition-delay":".5s","transition-duration":".3s"}):$(this.columnBelow).css({opacity:0,transition:"opacity .1s"}))},calcDropdownOffset(){let t=this.dropdown.get(0).getBoundingClientRect(),e=this.currentRow.getBoundingClientRect(),i=0;return this.overlayModeWithCountdown&&(i=this.saleCountdown.outerHeight()+10),e.bottom+5-t.top+i-1},checkAlignment(){1===this.column&&(this.alignment="left",this.dropdown.addClass("header-search--dropdown-left"))},setMobileDropdownWidth(){if(this.mobile){const t=$(window).width();if(t<=660){let e;e=this.dropdown.hasClass("header-search--dropdown-left")?this.searchToggle.get(0).getBoundingClientRect().left:t-this.searchToggle.get(0).getBoundingClientRect().right;const i=this.search.parents(".header__container")[0];if(i.closest(".boxed-header")){const t=getComputedStyle(i);e+=parseInt(t.paddingLeft)+parseInt(t.paddingRight)}this.dropdown.css({"max-width":t-20-e,"min-width":"auto"})}}},getNextVisibleRow(){if(this.row<3){let t=this.search.parents(".header__desktop-nav, .header__mobile-nav")[0];for(let e=this.row+1;e<=3;++e){let i=$(t).find(`.row-${e}`)[0];if(i&&"none"!==window.getComputedStyle(i,null).display)return i}}}}}}]);
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.