1var t={d:(e,i)=>{for(var s in i)t.o(i,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:i[s]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};t.d(e,{A:()=>s});class i{static ANIMATION={EXIT_STAGGER:150,ENTER_STAGGER:100,SLIDE_ENTER_STAGGER:100,TRANSITION:400,NUMBER_DELAY:300,BASE_SLIDE_DELAY:1500,COMPLETE_ANIMATION:2800};static LAYOUT={ITEM_GAP:75,MOBILE_BREAKPOINT:768,SWIPE_TOLERANCE:50};constructor(t){this.root=t,this.slidesContainer=t.querySelector(".slider-selection-slides"),this.stage=t.querySelector(".slider-selection-stage"),this.navSidebar=t.querySelector(".slider-nav-sidebar"),this.prevButton=t.querySelector(".slider-nav-item-prev"),this.nextButton=t.querySelector(".slider-nav-item-next"),this.pageElement=t.querySelector(".slider-nav-page"),this.totalElement=t.querySelector(".slider-nav-total"),this.progressBar=t.querySelector(".slider-progress-inner"),this.swipeIndicator=t.querySelector(".swipe-indicator-container"),this.slidesContainer&&(this.slides=Array.from(this.slidesContainer.querySelectorAll(".slider-selection-item")),this.currentIndex=0,this.currentPage=1,this.totalPages=1,this.totalSlides=this.slides.length,this.itemWidth=null,this.direction="next",this.handleResize=this.handleResize.bind(this),this.isInitialLoad=!0,this.hasInteracted=!1,this.init())}init(){0!==this.totalSlides&&(this.registerEvents(),this.handleResize(),requestAnimationFrame((()=>{this.animateSlidesIn()})),this.observeTabChanges())}registerEvents(){this.prevButton&&this.prevButton.addEventListener("click",(()=>{this.hideSwipeIndicator(),this.prev()})),this.nextButton&&this.nextButton.addEventListener("click",(()=>{this.hideSwipeIndicator(),this.next()})),this.addSwipeSupport(),window.addEventListener("resize",this.handleResize)}hideSwipeIndicator(){!this.hasInteracted&&this.swipeIndicator&&(this.hasInteracted=!0,this.swipeIndicator.classList.add("hide"))}addSwipeSupport(){let t,e;const s=i=>{this.hideSwipeIndicator();const s=i.touches?i.touches[0]:i;t=s.pageX,e=s.pageY,this.root.style.userSelect="none"},n=s=>{const n=s.changedTouches?s.changedTouches[0]:s,a=n.pageX-t,r=n.pageY-e;this.root.style.userSelect="",Math.abs(a)>Math.abs(r)&&Math.abs(a)>i.LAYOUT.SWIPE_TOLERANCE&&(a<0?this.nextButton?.classList.contains("disabled")||this.next():this.prevButton?.classList.contains("disabled")||this.prev())};this.root.addEventListener("touchstart",s),this.root.addEventListener("touchend",n),this.root.addEventListener("mousedown",s),this.root.addEventListener("mouseup",n)}calculateVisibleSlides(){if(!this.slidesContainer)return 1;const t=this.slidesContainer.clientWidth,e=this.getStride();return Math.max(1,Math.floor(t/e))}getStride(){return this.getItemWidth()}getItemWidth(){return this.slides[0]&&(this.itemWidth=this.slides[0].getBoundingClientRect().width),this.itemWidth}getStagePaddingLeft(){if(!this.stage)return 0;const t=getComputedStyle(this.stage);return parseFloat(t.paddingLeft)||0}getNavWidth(){return this.navSidebar?this.navSidebar.getBoundingClientRect().width:0}prev(){if(this.currentIndex>0){this.direction="prev";const t=this.calculateVisibleSlides();this.goToSlide(this.currentIndex-t)}}next(){if(this.currentIndex<this.totalSlides-1){this.direction="next";const t=this.calculateVisibleSlides();this.goToSlide(this.currentIndex+t)}}goToSlide(t){t<0&&(t=0),t>=this.totalSlides&&(t=this.totalSlides-1),this.currentIndex=t,this.updatePagination(),this.updatePositions()}updatePagination(){const t=this.calculateVisibleSlides();this.totalPages=Math.ceil(this.totalSlides/t),this.currentPage=Math.ceil((this.currentIndex+1)/t),this.totalElement&&(this.totalElement.textContent=String(this.totalPages).padStart(2,"0")),this.pageElement&&(this.pageElement.textContent=String(this.currentPage).padStart(2,"0")),this.updateProgress(),this.updateButtonStates()}updateProgress(){if(!this.progressBar)return;const t=this.totalPages>1?this.currentPage/this.totalPages*100:100;this.progressBar.style.width=`${t}%`}updateButtonStates(){const t=0===this.currentIndex,e=this.currentPage===this.totalPages;this.prevButton&&this.prevButton.classList.toggle("disabled",t),this.nextButton&&this.nextButton.classList.toggle("disabled",e)}isMobile(){return window.innerWidth<=i.LAYOUT.MOBILE_BREAKPOINT}calculateOffsets(t){const e=this.getStagePaddingLeft(),i=this.slides[this.currentIndex],s=i?i.getBoundingClientRect().width:this.getItemWidth();return{stageOffset:(this.isMobile()?(t-s)/2:e)-(i?i.offsetLeft:0)}}isSlideVisible(t,e,i){return t+(i??this.getItemWidth())>0&&t<e}getVisibleSlideChanges(t,e){const i=this.lastVisibleSlides||[],s=e.filter((({x:e})=>this.isSlideVisible(e,t))).map((({slide:t})=>t));return{exiting:i.filter((t=>!s.includes(t))),entering:s.filter((t=>!i.includes(t))),staying:s.filter((t=>i.includes(t))),nextVisible:s}}orderSlidesByDirection(t){return"next"===this.direction?t:[...t].reverse()}applyExitAnimations(t){t.forEach(((t,e)=>{const s=e*i.ANIMATION.EXIT_STAGGER;t.style.transitionDelay=`${s}ms`}))}applyEnterAnimations(t,e){const s=e.length>0?(e.length-1)*i.ANIMATION.EXIT_STAGGER+i.ANIMATION.TRANSITION:0;t.forEach(((t,e)=>{const n=s+e*i.ANIMATION.ENTER_STAGGER;t.style.transitionDelay=`${n}ms`}))}
1applySlidePosition(t,e,i,s,n){this.isInitialLoad&&(t.style.transition="none"),t.style.setProperty("--stage-x",`${s}px`);const a=t.getBoundingClientRect().width||this.getItemWidth(),r=this.isSlideVisible(e,i,a);t.classList.toggle("is-visible",r);const o=this.getNavWidth(),l=o>0&&e+a>-o&&e<0;t.style.pointerEvents=l?"none":"auto",r||n||(t.style.transitionDelay="0ms"),this.isInitialLoad&&(t.offsetWidth,t.style.transition="")}updatePositions(){if(!this.slidesContainer)return;const t=this.slidesContainer.clientWidth,{stageOffset:e}=this.calculateOffsets(t),i=this.slides.map((t=>({slide:t,x:t.offsetLeft+e}))),{exiting:s,entering:n,staying:a,nextVisible:r}=this.getVisibleSlideChanges(t,i),o=this.orderSlidesByDirection(s),l=this.orderSlidesByDirection(n),h=this.orderSlidesByDirection(a);this.applyExitAnimations(o),this.applyEnterAnimations([...h,...l],o);const d=new Set([...s,...n,...a]);i.forEach((({slide:i,x:s})=>{this.applySlidePosition(i,s,t,e,d.has(i))})),this.isInitialLoad&&(this.isInitialLoad=!1),this.lastVisibleSlides=r}handleResize(){this.itemWidth=null,this.updatePagination(),this.updatePositions()}animatePaginationNumbers(){(this.pageElement||this.totalElement)&&(this.pageElement&&this.pageElement.classList.add("animatePaginationNumber"),this.totalElement&&this.totalElement.classList.add("animatePaginationNumber"),requestAnimationFrame((()=>{this.handleResize(),this.animateSlidesIn()})),setTimeout((()=>{this.pageElement.classList.remove("animatePaginationNumber"),this.totalElement.classList.remove("animatePaginationNumber")}),i.ANIMATION.COMPLETE_ANIMATION))}animateSlidesIn(){const t=this.slides.filter((t=>t.classList.contains("is-visible")));this.prevButton&&this.prevButton.classList.add("disabled"),this.nextButton&&this.nextButton.classList.add("disabled"),t.forEach(((t,e)=>{t.classList.add("slide-enter-animation"),t.style.animationDelay=e*i.ANIMATION.SLIDE_ENTER_STAGGER+"ms"}));const e=i.ANIMATION.BASE_SLIDE_DELAY+t.length*i.ANIMATION.SLIDE_ENTER_STAGGER;setTimeout((()=>{t.forEach((t=>{t.classList.remove("slide-enter-animation"),t.style.animationDelay=""})),this.updateButtonStates()}),e)}observeTabChanges(){const t=this.root.closest('[role="tabpanel"]');if(!t)return;new MutationObserver((()=>{"true"===t.getAttribute("aria-expanded")&&this.animatePaginationNumbers()})).observe(t,{attributes:!0,attributeFilter:["aria-expanded"]})}}function s(t){return new i(t)}var n=e.A;export{n as default}; 2//# sourceMappingURL=custom-scroll-container.mjs.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.