PageSourceSearch

https://kimb.com.my/wp-content/themes/woostify/assets/js/photoswipe-init.min.js?ver=2.6.0

js kimb.com.my collected 2026-09-25 02:25:58 UTC 5,298 bytes, 1 lines download raw bytes

1"use strict";function initPhotoSwipe(e){var t=!1,i=function e(t,i){return t&&(i(t)?t:e(t.parentNode,i))},r=function(e){(e=e||window.event).preventDefault?e.preventDefault():e.returnValue=!1;var t=(e.target||e.srcElement).closest(".product-images"),i=t.querySelectorAll(".image-item")[0];if(t.querySelector(".flickity-slider")&&(i=t.querySelector(".image-item.is-selected")),i){for(var r,n=i.parentNode,a=i.parentNode.childNodes,l=a.length,s=0,c=0;c<l;c++)if(1===a[c].nodeType){if(a[c]===i){r=s;break}s++}return r>=0&&o(r,n),!1}},n=function(e){(e=e||window.event).preventDefault?e.preventDefault():e.returnValue=!1;var t=e.target||e.srcElement;if("A"!==t.tagName.toUpperCase()){var r=i(t,(function(e){return e.tagName&&"FIGURE"===e.tagName.toUpperCase()}));if(r){for(var n,a=r.parentNode,l=r.parentNode.childNodes,s=l.length,c=0,u=0;u<s;u++)if(1===l[u].nodeType){if(l[u]===r){n=c;break}c++}return n>=0&&o(n,a),!1}}},o=function(e,i,r,n){var o,a,l,s,c=i.closest(".product-gallery");if(o=c.querySelector(".pswp")?c.querySelector(".pswp"):c.nextElementSibling,s=function(e){for(var t,i,r,n,o=e.childNodes,a=o.length,l=[],s=0;s<a;s++)if(1===(t=o[s]).nodeType){var c=t.classList.contains("has-video"),u=t.getAttribute("data-video-source"),d=t.getAttribute("data-video-url"),p=t.getAttribute("data-video-autoplay"),v=t.getAttribute("data-video-mute");((i=t.children[0]).getAttribute("href")||c)&&(c&&d?(n={html:"",w:1280,h:720,isVideo:!0,videoSource:u||"youtube",videoUrl:d,videoAutoplay:p,videoMute:v},i.children.length>0&&(n.msrc=i.children[0].getAttribute("src"))):(r=i.getAttribute("data-size").split("x"),n={src:i.getAttribute("href"),w:parseInt(r[0],10),h:parseInt(r[1],10)},i.children.length>0&&(n.msrc=i.children[0].getAttribute("src"))),n.el=t,l.push(n))}return l}(i),l={galleryUID:i.getAttribute("data-pswp-uid"),getThumbBoundsFn:function(e){var t=s[e].el.getElementsByTagName("img")[0],i=window.pageYOffset||document.documentElement.scrollTop,r=t.getBoundingClientRect();return{x:r.left,y:r.top+i,w:r.width}}},n)if(l.galleryPIDs){for(var u=0,d=s.length;u<d;u++)if(s[u].pid==e){l.index=u;break}}else l.index=parseInt(e,10)-1;else l.index=parseInt(e,10);if(!isNaN(l.index)){r&&(l.showAnimationDuration=0),(a=new PhotoSwipe(o,PhotoSwipeUI_Default,s,l)).init(),a.listen("gettingData",(function(e,t){if(t.isVideo&&!t.html){var i="";if("mp4"===t.videoSource)i='<div class="pswp__video-container">',i+="<video controls autoplay",1!=t.videoMute&&1!=t.videoAutoplay||(i+=" muted"),i+=' playsinline style="width:100%;height:100%;object-fit:contain;">',i+='<source src="'+t.videoUrl+'" type="video/mp4">',i+="Your browser does not support the video tag.",i+="</video>",i+="</div>";else{var r=(o=t.videoUrl,(a=o.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=|shorts\/)([^#\&\?]*).*/))&&11==a[2].length?a[2]:null);if(r){var n="https://www.youtube.com/embed/"+r+"?autoplay=1&rel=0&enablejsapi=1";1!=t.videoMute&&1!=t.videoAutoplay||(n+="&mute=1"),i='<div class="pswp__video-container">',i+='<iframe src="'+n+'" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen style="width:100%;height:100%;"></iframe>',i+="</div>"}}t.html=i}var o,a}));a.listen("gettingData",(function(){if(!t){t=!0;var e=document.querySelectorAll(".pswp__thumbnails");e.length&&e.forEach((function(e){e.remove()})),setTimeout((function(){!function(e){var t=e.scrollWrap,i=document.querySelector(".product-gallery"),r=document.createElement("div");if(r.classList.add("pswp__thumbnails"),!i)return;var n=i.querySelector(".product-thumbnail-images-container");if(n){var o=n.querySelector(".flickity-slider");r.innerHTML=o?o.innerHTML:n.innerHTML}else Object.keys(e.items).forEach((function(t){var i=e.items[t],n=document.createElement("div"),o=document.createElement("img");o.setAttribute("src",i.msrc),n.classList.add("thumbnail-item"),n.appendChild(o),r.appendChild(n)}));Object.keys(e.items).forEach((function(t){var i=r.children[t];if(i.removeAttribute("style"),i.classList.remove("is-selected","is-nav-selected"),e.getCurrentIndex()==t&&i.classList.add("active"),e.items[t].isVideo){i.classList.add("has-video-thumb");var n=document.createElement("div");n.className="pswp__thumb-play-icon",n.innerHTML='<svg width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M8 5v14l11-7z" fill="currentColor"/></svg>',i.appendChild(n)}i.addEventListener("click",(function(){e.goTo(e.items.indexOf(e.items[t]))}))})),t.parentNode.insertBefore(r,t.nextSibling)}(a)}),200)}})),a.listen("close",(function(){for(var e=a.scrollWrap,i=e.closest(".pswp").querySelector(".pswp__thumbnails"),r=e.querySelectorAll("video"),n=0;n<r.length;n++)r[n].pause();for(var o=e.querySelectorAll("iframe"),l=0;l<o.length;l++)o[l].src="";i&&(i.remove(),t=!1)})),a.listen("afterChange",(function(){var e=a.scrollWrap.closest(".pswp").querySelector(".pswp__thumbnails");
1e&&Object.keys(a.items).forEach((function(t){var i=e.children[t];i.classList.remove("active"),a.getCurrentIndex()==t&&i.classList.add("active")}))}))}};for(var a=document.querySelectorAll(e),l=0,s=a.length;l<s;l++){var c=a[l].closest(".product-images").querySelector(".photoswipe-toggle-button");a[l].setAttribute("data-pswp-uid",l+1),c.onclick=r,a[l].onclick=n}}initPhotoSwipe(".product-images-container");

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.