PageSourceSearch

https://baronfig.com/cdn/shop/t/346/assets/zoom.js?v=155372496847603572841776808672

js baronfig.com collected 2026-10-02 04:12:35 UTC 3,032 bytes, 1 lines download raw bytes

1!function(){"use strict";class t extends HTMLElement{constructor(){super(),this.container=this.closest("[data-section-id]"),this.images=this.querySelectorAll("[data-zoom-image]"),this.zoomCaptions=this.container.querySelector("[data-zoom-caption]"),this.thumbsContainer=document.querySelector(".pswp__thumbs")}getVisibleImages(){return Array.from(this.querySelectorAll("[data-zoom-image]")).filter((t=>{const e=t.closest("[data-image-id]");return!e||!e.classList.contains("hide-unselected-variant")}))}getSelectedMediaGroup(){return this.container.querySelector("[data-image-id][data-media-group]:not(.hide-unselected-variant)")?.dataset.mediaGroup||""}filterPopupThumbs(){if(!this.thumbsContainer)return;const t=this.getSelectedMediaGroup();if(!t)return;this.thumbsContainer.querySelectorAll("[data-media-group]").forEach((e=>{const o=e.dataset.mediaGroup;o&&o!==t&&e.remove()}))}connectedCallback(){this.images.forEach(((t,e)=>{t.addEventListener("click",(e=>{if(e.preventDefault(),t.closest("product-images").classList.contains("is-dragging"))return;const o=this.getVisibleImages(),s=o.indexOf(t);-1!==s&&(this.createZoom(s,o),window.a11y.lastElement=t)})),t.addEventListener("keyup",(e=>{if("Enter"!==e.code)return;e.preventDefault();const o=this.getVisibleImages(),s=o.indexOf(t);-1!==s&&(this.createZoom(s,o),window.a11y.lastElement=t)}))}))}createZoom(t,e){e=e||this.getVisibleImages();const o=this.container.querySelector("[data-pswp-thumbs-template]")?.innerHTML;let s=[],i=0;e.forEach((a=>{const n=a.getAttribute("data-image-src");if(i+=1,s.push({src:n,w:parseInt(a.getAttribute("data-image-width")),h:parseInt(a.getAttribute("data-image-height")),msrc:n}),e.length===i){const a=this.getColorScheme(),n={history:!1,focus:!1,index:t,mainClass:`pswp-zoom-gallery${1===i?" pswp-zoom-gallery--single":""}${a?` ${a}`:""}`,showHideOpacity:!0,howAnimationDuration:150,hideAnimationDuration:250,closeOnScroll:!1,closeOnVerticalDrag:!1,captionEl:!0,closeEl:!0,closeElClasses:["caption-close","title"],tapToClose:!1,clickToCloseNonZoomable:!1,maxSpreadZoom:2,loop:!0,spacing:0,allowPanToNext:!0,pinchToClose:!1,addCaptionHTMLFn:(t,e,o)=>{this.zoomCaption(t,e,o)},getThumbBoundsFn:()=>{const o=e[t],s=window.scrollY||document.documentElement.scrollTop,i=o.getBoundingClientRect();return{x:i.left,y:i.top+s,w:i.width}}};new window.theme.LoadPhotoswipe(s,n),this.thumbsContainer&&""!==o&&(this.thumbsContainer.innerHTML=o,this.filterPopupThumbs())}}))}zoomCaption(t,e){let o="";const s=e.children[0];return this.zoomCaptions&&(o=this.zoomCaptions.innerHTML,this.zoomCaptions.closest(".variant--soldout")?s.classList.add("variant--soldout"):s.classList.remove("variant--soldout"),this.zoomCaptions.closest(".variant--unavailable")?s.classList.add("variant--unavailable"):s.classList.remove("variant--unavailable")),s.innerHTML=o,!1}getColorScheme(){const t=this.closest("product-info");return Array.from(t.classList).find((t=>t.startsWith("color-scheme")))}}customElements.get("zoom-images")||customElements.define("zoom-images",t)}();

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.