PageSourceSearch

https://jariabek.com/js/main.min.e2d3c0df2dddf52339a359840209d8c268ecd3f70726d6ed423247e088057fe1.js

js jariabek.com collected 2026-10-04 09:04:35 UTC 5,899 bytes, 1 lines download raw bytes

1function initMobileMenu(){const e=document.getElementById("hamburgerBtn"),t=document.getElementById("mobileMenu"),n=document.getElementById("menuOverlay");if(!e||!t||!n){console.warn("Mobile menu elements not found");return}function s(){e.setAttribute("aria-expanded","false"),t.classList.remove("open"),n.style.display="none",document.body.classList.remove("no-scroll")}function o(){e.setAttribute("aria-expanded","true"),t.classList.add("open"),n.style.display="block",document.body.classList.add("no-scroll")}e.addEventListener("click",function(t){t.preventDefault(),t.stopPropagation();const n=e.getAttribute("aria-expanded")==="true";n?s():o()}),n.addEventListener("click",s),document.querySelectorAll(".mobile-submenu-btn").forEach(function(e){e.addEventListener("click",function(t){t.preventDefault(),t.stopPropagation();const n=e.parentElement,s=e.getAttribute("aria-expanded")==="true";document.querySelectorAll(".mobile-has-submenu").forEach(function(e){if(e!==n){e.classList.remove("open");const t=e.querySelector(".mobile-submenu-btn");t&&t.setAttribute("aria-expanded","false")}}),e.setAttribute("aria-expanded",String(!s)),n.classList.toggle("open",!s)})}),document.querySelectorAll(".mobile-nav-menu a").forEach(function(e){e.addEventListener("click",function(){s()})}),document.addEventListener("keydown",function(e){e.key==="Escape"&&t.classList.contains("open")&&s()})}function initCarousel(e){const r=e.querySelector("[data-carousel-viewport]"),n=Array.from(e.querySelectorAll("[data-carousel-slide]")),u=e.querySelector("[data-carousel-prev]"),f=e.querySelector("[data-carousel-next]"),x=e.querySelector("[data-carousel-current]"),E=e.querySelector("[data-carousel-progress-bar]"),S=Array.from(e.querySelectorAll("[data-carousel-open]")),t=e.querySelector("[data-carousel-lightbox]"),C=e.querySelector(".carousel__heading"),c=e.querySelector("[data-carousel-lightbox-image]"),j=e.querySelector('[id$="-lightbox-title"]'),h=e.querySelector("[data-carousel-lightbox-caption]"),m=e.querySelector("[data-carousel-lightbox-body]"),w=e.querySelector("[data-carousel-lightbox-cta]"),o=e.querySelector("[data-carousel-lightbox-link]"),a=e.querySelector("[data-carousel-lightbox-prev]"),i=e.querySelector("[data-carousel-lightbox-next]"),A=Array.from(e.querySelectorAll("[data-carousel-close]")),k=window.matchMedia("(prefers-reduced-motion: reduce)").matches,s={currentIndex:0,lightboxIndex:null,lastFocusedElement:null};if(!r||n.length===0)return;e.classList.add("is-enhanced");function p(e){return e<0?0:e>n.length-1?n.length-1:e}function y(e){return n[p(e)]}function _(e){const t=r.getBoundingClientRect(),n=e.getBoundingClientRect();return r.scrollLeft+(n.left-t.left)}function g(t){const o=p(t);
1s.currentIndex=o,n.forEach(function(e,t){const n=t===o;e.classList.toggle("is-active",n),e.setAttribute("aria-current",n?"true":"false")}),x&&(x.textContent=String(o+1)),u&&(u.disabled=o===0),f&&(f.disabled=o===n.length-1),E&&(E.style.width=`${(o+1)/n.length*100}%`),e.dispatchEvent(new CustomEvent("carousel:change",{detail:{index:o,slide:n[o]}}))}function O(e){const t=p(e),n=y(t),s=_(n);g(t),r.scrollTo({left:s,behavior:k?"auto":"smooth"})}function d(){const s=r.scrollLeft;let e=0,t=1/0;return n.forEach(function(n,o){const i=Math.abs(_(n)-s);i<t&&(t=i,e=o)}),e}let v=null;r.addEventListener("scroll",function(){if(v!==null)return;v=window.requestAnimationFrame(function(){v=null,g(d())})}),u&&u.addEventListener("click",function(){O(d()-1)}),f&&f.addEventListener("click",function(){O(d()+1)});function l(e){const r=p(e),t=y(r),l=t.querySelector(".carousel__image"),d=t.querySelector(".carousel__caption"),u=t.querySelector(".carousel__body"),f=t.getAttribute("data-cta-slide")==="true";if(s.lightboxIndex=r,c.src=l.getAttribute("src"),c.alt=l.getAttribute("alt"),c.width=l.getAttribute("width"),c.height=l.getAttribute("height"),j){const e=d&&d.textContent.trim()?d.textContent.trim():l.getAttribute("alt")||`Slide ${r+1} of ${n.length}`;j.textContent=C?`${C.textContent.trim()}: ${e}`:e}d?(h.textContent=d.textContent,h.hidden=!1):(h.textContent="",h.hidden=!0),u?(m.innerHTML=u.innerHTML,m.hidden=!1):(m.innerHTML="",m.hidden=!0),f&&o?(o.href=t.getAttribute("data-cta-url")||"",o.textContent=t.getAttribute("data-cta-text")||"",w.hidden=!1):o&&(o.href="",o.textContent="",w.hidden=!0),a&&(a.disabled=r===0),i&&(i.disabled=r===n.length-1)}function b(){if(!t||!t.open)return;t.close()}function M(n,o){if(!t||!c)return;s.lastFocusedElement=o||document.activeElement,l(n),document.body.classList.add("carousel-lightbox-open"),t.open||(typeof t.showModal=="function"?t.showModal():t.setAttribute("open","open"));const i=e.querySelector(".carousel__lightbox-close");i&&i.focus()}function F(){document.body.classList.remove("carousel-lightbox-open"),s.lastFocusedElement&&typeof s.lastFocusedElement.focus=="function"&&s.lastFocusedElement.focus()}S.forEach(function(e){e.addEventListener("click",function(t){t.preventDefault();const n=e.closest("[data-carousel-slide]"),s=Number(n.getAttribute("data-slide-index"));M(s,e)})}),A.forEach(function(e){e.addEventListener("click",function(){b()})}),a&&a.addEventListener("click",function(){l(s.lightboxIndex-1)}),i&&i.addEventListener("click",function(){l(s.lightboxIndex+1)}),t&&(t.addEventListener("close",F),t.addEventListener("cancel",function(e){e.preventDefault(),b()}),t.addEventListener("click",function(e){e.target===t&&b()})),document.addEventListener("keydown",function(e){if(!t||!t.open)return;if(e.key==="ArrowLeft"&&a&&!a.disabled){e.preventDefault(),l(s.lightboxIndex-1);return}e.key==="ArrowRight"&&i&&!i.disabled&&(e.preventDefault(),l(s.lightboxIndex+1))}),g(d())}function initCarousels(){document.querySelectorAll("[data-carousel]").forEach(function(e){initCarousel(e)})}function initSite(){initMobileMenu(),initCarousels()}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",initSite):initSite()

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.