PageSourceSearch

https://www.montreuxjazzfestival.com/wp-content/themes/mjf/static/c-cards-shop-list.cab950d3.js

js montreuxjazzfestival.com collected 2026-09-24 17:09:35 UTC 1,958 bytes, 2 lines download raw bytes

1"use strict";(globalThis.webpackChunkmjf_website=globalThis.webpackChunkmjf_website||[]).push([[918],{2060(t,e,s){s.r(e),s.d(e,{default:()=>a});var i=s(50403);const n=".section-card__nav-button",r="is-disabled";class a extends i.A{init(){return this.refs={inner:this.el.querySelector(".section-card__inner"),cards:Array.from(this.el.querySelectorAll(".card-shop")),navButtonPrev:this.el.querySelector(".section-card__nav-button--prev"),navButtonNext:this.el.querySelector(".section-card__nav-button--next")},this.refs.inner&&this.refs.navButtonPrev&&this.refs.navButtonNext&&this.initNavigation(),this}initNavigation(){this.on("click",n,this.handleNavButtonClick.bind(this)),this.refs.inner.addEventListener("scroll",this.updateNavButtonsState.bind(this)),this.on("resize",this.updateNavButtonsState.bind(this)),this.updateNavButtonsState()}handleNavButtonClick(t){t.preventDefault(),t.stopPropagation();const e=t.target.closest(n),s=null==e?void 0:e.getAttribute("data-direction");if(!s||!this.refs.inner)return;const i=this.refs.inner,r=this.getCardWidth()+this.getGap();let a=i.scrollLeft;a="previous"===s?Math.max(0,a-r):Math.min(i.scrollWidth-i.clientWidth,a+r),i.scrollTo({left:a,behavior:"smooth"})}getCardWidth(){if(!this.refs.cards.length)return 0;return this.refs.cards[0].getBoundingClientRect().width}getGap(){if(!this.refs.inner)return 0;const t=window.getComputedStyle(this.refs.inner);return parseFloat(t.gap)||parseFloat(t.columnGap)||0}updateNavButtonsState(){if(!this.refs.inner||!this.refs.navButtonPrev||!this.refs.navButtonNext)return;const t=this.refs.inner,e=t.scrollLeft,s=e<=1,i=e>=t.scrollWidth-t.clientWidth-1;this.refs.navButtonPrev.classList[s?"add":"remove"](r),this.refs.navButtonPrev.disabled=s,this.refs.navButtonPrev.tabIndex=s?-1:0,this.refs.navButtonNext.classList[i?"add":"remove"](r),this.refs.navButtonNext.disabled=i,this.refs.navButtonNext.tabIndex=i?-1:0}}}}]);
2//# sourceMappingURL=c-cards-shop-list.cab950d3.js.map

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.