PageSourceSearch

https://oxfordexchange.com/cdn/shop/t/227/assets/card-product-slider.js?v=128945714805825961621743440769

js oxfordexchange.com collected 2026-10-02 03:34:09 UTC 2,950 bytes, 2 lines download raw bytes

1if(!customElements.get("card-product-slider")){class CardProductSlider extends HTMLElement{constructor(){super();const swiperOptions=JSON.parse(this.getAttribute("data-swiper-options"))||{};this.sliderWrapper=this.querySelector(".swiper-wrapper"),this.requiresFetch=this.hasAttribute("data-url"),this.parent=this.closest("[data-section-id]"),this.sliderOptions={a11y:!1,threshold:3,spaceBetween:swiperOptions.spaceBetweenMobile||2,slidesPerView:"auto",resistanceRatio:.72,navigation:{nextEl:".swiper-button--next",prevEl:".swiper-button--prev"},breakpoints:{750:{slidesPerView:3,spaceBetween:swiperOptions.spaceBetweenDesktop||2},1100:{slidesPerView:4,spaceBetween:swiperOptions.spaceBetweenDesktop||2}}}}connectedCallback(){if(this.requiresFetch){this.fetchItems();return}this.initSlider()}fetchItems(){if(!this.parent)throw new Error("Parent is missing");fetch(this.getAttribute("data-url")).then(response=>response.text()).then(text=>{const wrapper=new DOMParser().parseFromString(text,"text/html").querySelector(".swiper-wrapper");wrapper&&wrapper.innerHTML.trim().length&&(this.querySelector(".swiper-wrapper").innerHTML=wrapper.innerHTML,this.parent.classList.remove("hidden"),this.initSlider())}).catch(e=>{console.error(e)})}initSlider(slider=this){if(this.slider||(this.slider=new Swiper(slider,this.sliderOptions),this.classList.contains("shop-the-look__inner")))return;this.slider.wrapperEl.setAttribute("aria-live","polite"),this.slider.wrapperEl.id=`swiper-wrapper-${this.dataset.sectionId}`,this.slider.slides.forEach((slide,i)=>{slide.setAttribute("role","group"),slide.setAttribute("aria-label",`${i+1} / ${this.slider.slides.length}`),slide.dataset.index=i}),[this.slider.navigation.prevEl,this.slider.navigation.nextEl].forEach((button,i)=>{let type="Previous";i===1&&(type="Next"),button.setAttribute("aria-label",`${type} slide`),button.setAttribute("aria-controls",this.slider.wrapperEl.id)}),this.slider.wrapperEl.addEventListener("focusin",e=>{if(e.target.closest("button, a, input, textarea, select"))return;this.slider.el.scrollLeft=0;const slide=e.target.closest(".swiper-slide");if(!slide)return;const slideIndex=+slide.dataset.index,isFirstSlide=slideIndex===0,isLastSlide=slideIndex===this.slider.slides.length-1;if(isFirstSlide||isLastSlide){this.slider.slideTo(slideIndex,0);return}const slideRect=slide.getBoundingClientRect(),wrapperWidth=this.slider.wrapperEl.clientWidth,slideLeft=slideRect.x+slideRect.width-(document.body.clientWidth-wrapperWidth)/2;slideLeft<=wrapperWidth&&slideLeft>=slideRect.width||(slideLeft>=slideRect.width?this.slider.slideNext(0):this.slider.slidePrev(0))})}}customElements.define("card-product-slider",CardProductSlider)}document.addEventListener("shopify:section:load",event=>{const section=event.target.querySelector("card-product-slider");section&&section.connectedCallback()});
2//# sourceMappingURL=/cdn/shop/t/227/assets/card-product-slider.js.map?v=128945714805825961621743440769

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.