1var d=Object.defineProperty;var c=(r,i,e)=>i in r?d(r,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[i]=e;var n=(r,i,e)=>(c(r,typeof i!="symbol"?i+"":i,e),e);import{A as h}from"./articleListingBase-1b9e1a14.js";import{S as m}from"./swiper-core-6e5642fd.js";import{N as p}from"./navigation-363660da.js";import{P as g}from"./pagination-6f2e9544.js";/* empty css *//* empty css */import"./vendor-58675f0b.js";import"./modal-b8e35895.js";import"./main.bundle.js";import"./v4-4a60fe23.js";class A extends h{constructor(e){super(e);n(this,"swiper",null);n(this,"rowsPerPage");this.rowsPerPage=Number(this.el.dataset.rowsPerPage)||0,this.getArticles()}setupDefaults(){this.dom={resultsContainer:this.el.querySelector(".article-listing__results"),slider:this.el.querySelector(".swiper"),nextButton:this.el.querySelector(".article-listing-slider__next"),prevButton:this.el.querySelector(".article-listing-slider__prev"),selectionContainer:this.el.querySelector(".articles-listing__selection-container"),selectionButton:this.el.querySelector(".article-listing__selection-list-button")}}addListeners(){this.dom.selectionButton.addEventListener("click",this.handleSelectionDelete.bind(this)),this.setupModalDelegation()}handleSelectionDelete(){this.dom.selectionContainer.style.display="none",this.subcategory="all",this.getArticles()}generateSlides(e,s,l){const o=[];for(let t=0;t<e.length;t+=6)o.push(e.slice(t,t+6));this.dom.resultsContainer.innerHTML=o.map(t=>` 2 <div class="swiper-slide"> 3 ${t.map(a=>this.generateArticleCard(a,s,l)).join("")} 4 </div> 5 `).join(""),o.length>1?this.initSlider():(this.dom.nextButton.style.display="none",this.dom.prevButton.style.display="none"),this.dom.recommendedButtons=this.el.querySelectorAll(".article-card__button"),this.dom.tags=this.el.querySelectorAll(".article-card__tag"),this.dom.tags.forEach(t=>{t.addEventListener("click",this.handleTag.bind(this))}),this.dom.recommendedButtons.forEach(t=>{t.addEventListener("click",this.handleRecommend.bind(this))}),this.checkUrlHash()}handleTag(e){e.preventDefault(),e.stopPropagation();const s=e.currentTarget;this.dom.selectionContainer.style.display="flex",this.dom.selectionButton.innerText=s.innerText,this.subcategory=s.innerText,this.getArticles()}getArticles(){this.endpoint&&fetch(this.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({carecategory:this.careCategory,category:this.category,subcategory:this.subcategory,ostomytype:this.ostomyType,sortorder:this.sortBy,page:this.page,media:this.showMedia,maxresults:this.maxResults,titleLimit:this.titleLimit,rowsperpage:this.rowsPerPage,preload:this.preload,filterByChildren:!0,currentPageId:this.currentPageId})}).then(e=>e.json()).then(e=>{const s=e.d;this.dom.resultsContainer.innerHTML="",this.generateSlides(s.Articles,s.ShowMedia,s.HideRecommending)})}initSlider(){new m(this.dom.slider,{modules:[p,g],slidesPerView:1,spaceBetween:80,loop:!1,pagination:{el:".article-listing-slider__pagination",clickable:!0},navigation:{nextEl:this.dom.nextButton,prevEl:this.dom.prevButton}})}}export{A as default}; 6//# sourceMappingURL=articleListingSlider-4b12d233.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.