"use strict";(self.webpackChunkporta_frontend_starter_kit=self.webpackChunkporta_frontend_starter_kit||[]).push([[385],{1226:function(e,t,o){const n="dropdown__menu--open",s="dropdown__trig--active",d="body--dropdown-open",r="body--menu-open",c="body--dropdown-switch",i=(e,t,o)=>{const s=e.getAttribute("data-dropdown"),d=document.querySelector("#"+s);if(!d)return;e.setAttribute("aria-expanded","false");const i=e.dataset.onHover,u=e.closest(".dropdown");i&&u&&(u.addEventListener("mouseover",(n=>{document.body.classList.contains(r)||(l(o,t),a(d,e))})),u.addEventListener("mouseleave",(e=>{document.body.classList.contains(r)||(document.body.classList.add(c),setTimeout((()=>document.body.classList.remove(c)),150),l(o,t))}))),e.addEventListener("click",(s=>{if(i&&window.innerWidth>768)return;const r=d.classList.contains(n);l(o,t),r||a(d,e)}))},l=(e,t)=>{if(document.body.classList.remove(d),document.body.classList.add(c),setTimeout((()=>document.body.classList.remove(c)),150),e&&t){for(const t of e)t.classList.remove(n);for(const e of t)e.classList.remove(s),e.setAttribute("aria-expanded","false")}},a=(e,t)=>{e.classList.add(n),t.classList.add(s),t.setAttribute("aria-expanded","true"),document.body.classList.add(d)};document.addEventListener("DOMContentLoaded",(function(){(()=>{const e=document.querySelectorAll(".menu-trigger");for(const t of e)t.addEventListener("click",(e=>{e.preventDefault(),document.body.classList.toggle(r),l(),document.body.classList.contains(r)?t.setAttribute("aria-expanded","true"):t.setAttribute("aria-expanded","false")}));const t=document.querySelectorAll(".dropdown__trig"),o=document.querySelectorAll(".dropdown__menu, .menu"),n=document.querySelectorAll(".subdropdown__trig"),s=document.querySelectorAll(".subdropdown__menu");for(const e of t)i(e,[...t,...n],[...o,...s]);for(const e of n)i(e,n,s);document.body.addEventListener("click",(e=>{e.target.closest(".main-nav, .secondary-nav, .menu, .x-layer")||l([...o,...s],[...t,...n])}))})(),((e,t)=>{const o=document.querySelectorAll(t);for(const e of o)e.addEventListener("click",(()=>{e.closest(".flash-message").classList.add("flash-message--hidden")}));const n=document.querySelectorAll(e);n.length&&setTimeout((()=>{for(const e of n)e.getAttribute("data-hide")&&e.classList.add("flash-message--hidden")}),5e3)})(".flash-message",".flash-message__close");document.querySelectorAll(".sh-trig, .show-more").length&&o.e(717).then(o.bind(o,717)).then((({initTogglers:e})=>{e()}));document.querySelectorAll(".equal-height").length&&o.e(222).then(o.bind(o,9222)).then((({initMatchHeight:e})=>{e()}));document.querySelectorAll(".slider").length&&Promise.all([o.e(756),o.e(502)]).then(o.bind(o,502)).then((({initSliders:e})=>{e()}));document.querySelectorAll(".modal-trigger, .glightbox").length&&Promise.all([o.e(128),o.e(260)]).then(o.bind(o,5260)).then((({initPopups:e})=>{e()}));document.querySelectorAll(".tabs").length&&o.e(318).then(o.bind(o,2318)).then((({initTabs:e})=>{e()}));document.querySelectorAll(".accordion").length&&o.e(466).then(o.bind(o,8466)).then((({initAccordions:e})=>{e()}));document.querySelectorAll(".tooltip").length&&o.e(863).then(o.bind(o,5863)).then((({initTooltips:e})=>{e()}))}))}},function(e){var t;t=1226,e(e.s=t)}]);