HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/Velosophe/dev.abloc.cc/wwwroot/app/themes/abloc/js/nm-shop-single-product.min.js
/* NM: Single product script */
(function(b){b.extend(b.nmTheme,{singleProduct_init:function(){var a=this;a.$galleryContainer=b(".woocommerce-product-gallery");a.$galleryWrap=a.$galleryContainer.find(".woocommerce-product-gallery__wrapper");a.galleryThumbnailsSlider="0"!=nm_wp_vars.galleryThumbnailsSlider&&b(".nm-single-product").hasClass("thumbnails-vertical")?!0:!1;a.galleryData=a.$galleryContainer.data("flexslider");a.zoomEnabled=!a.isTouch&&b(".woocommerce-product-gallery").hasClass("zoom-enabled");a.singleProductVariationsInit();
a.quantityInputsBindButtons(b(".summary"));a.singleProductGalleryInit();a.singleProductGalleryZoomInit();a.singleProductFeaturedVideoInit();var c=b("#nm-comment-form-rating");c.on("click.nmAddParentClass",".stars a",function(){c.children(".stars").addClass("has-active")});var d=b("#nm-upsells").find(".nm-shop-loop-thumbnail .unveil-image"),e=b("#nm-related").find(".nm-shop-loop-thumbnail .unveil-image"),f=b.merge(d,e);a.$window.load(function(){f.length&&f.unveil(1,function(){b(this).parents("li").first().addClass("image-loaded")})});
"0"!=nm_wp_vars.shopRedirectScroll&&(b("#nm-breadcrumb").find("a").bind("click.nmShopRedirect",function(b){b.preventDefault();a.singleProductRedirectWithHash(this)}),b("#nm-product-meta").find("a").bind("click.nmShopRedirect",function(b){b.preventDefault();a.singleProductRedirectWithHash(this)}))},singleProductGalleryInit:function(){"0"!=nm_wp_vars.galleryZoom&&b(".woocommerce-product-gallery").prepend('<a href="#" class="woocommerce-product-gallery__trigger">\ud83d\udd0d</a>');var a=this;if(1<a.$galleryWrap.children(".woocommerce-product-gallery__image").length){a.galleryThumbnailsSlider&&
(a.$galleryThumbsContainer=a.$galleryContainer.find(".flex-control-thumbs"),a.$galleryThumbsContainer.wrapInner('<ol id="nm-product-gallery-thumbs-inner"></ol>'),a.$galleryThumbsWrap=b("#nm-product-gallery-thumbs-inner"));a.$window.load(function(){a.singleProductGallerySetHeight()});a.galleryData.vars.before=function(b){a.singleProductGallerySetHeight()};a.singleProductGalleryArrowsOffset();b(".flex-direction-nav").addClass("show");var c=null;a.$window.resize(function(){c&&clearTimeout(c);c=setTimeout(function(){a.singleProductGallerySetHeight();
a.singleProductGalleryArrowsOffset()},250)})}},singleProductGallerySetHeight:function(){var a=this.galleryData.slides.eq(this.galleryData.animatingTo).height();this.$galleryWrap.css("height",a+"px");this.galleryThumbnailsSlider&&this.singleProductGalleryPositionThumbnail(a)},singleProductGalleryPositionThumbnail:function(a){this.$galleryThumbsContainer.css("height",a+"px");var b=this.$galleryThumbsWrap.children().eq(this.galleryData.animatingTo),d=Math.round(b.position().top),e=Math.round(d+b.height()),
f=Math.abs(parseInt(this.$galleryThumbsWrap.css("top"))),g=null;50>=d-f?(a=b.prev(),a.length&&(d=Math.round(a.position().top)),g=d):e-f>=a-50&&(d=b.next(),d.length&&(e=Math.round(d.position().top+d.height())),g=e-a);null!==g&&this.$galleryThumbsWrap.css("top","-"+g+"px")},singleProductRedirectWithHash:function(a){a=b(a).attr("href");window.location.href=a+"#shop"},singleProductVariationsInit:function(){var a=this;a.$variationsForm=b("#nm-variations-form");a.$variationsWrap=a.$variationsForm.children(".variations");
a.$variationDetailsWrap=a.$variationsForm.children(".single_variation_wrap").children(".single_variation");a.shopCustomSelect&&a.$variationsWrap.find("select").selectOrDie(a.shopSelectConfig);a.shopCheckVariationDetails(a.$variationDetailsWrap);a.$variationDetailsWrap.on("show_variation",function(){a.shopCheckVariationDetails(a.$variationDetailsWrap)});a.$variationDetailsWrap.on("hide_variation",function(){a.$variationDetailsWrap.css("display","none")});a.$variationsForm.on("woocommerce_variation_select_change",
function(){a.zoomEnabled&&a.singleProductZoomUpdateImage()})},singleProductGalleryArrowsOffset:function(){var a=b(".woocommerce-product-gallery"),c=a.children(".flex-direction-nav").find("a"),d=Math.ceil(a.outerHeight());a=Math.ceil(a.children(".woocommerce-product-gallery__wrapper").height());var e=c.first().outerHeight()/2;c.css("marginTop","-"+(e+(d>a?(d-a)/2:0))+"px")},singleProductGalleryZoomInit:function(){this.zoomEnabled&&this.$window.load(function(){b(".woocommerce-product-gallery__wrapper").children(".woocommerce-product-gallery__image").easyZoom()})},
singleProductZoomUpdateImage:function(){var a=b(".woocommerce-product-gallery__wrapper").children(".woocommerce-product-gallery__image").first(),c=a.children("a").attr("href");c&&0<c.length&&a.data("easyZoom").swap(c)},singleProductFeaturedVideoInit:function(){var a=this;a.hasFeaturedVideo=!1;a.$featuredVideoBtn=b("#nm-featured-video-link");a.$featuredVideoBtn.length&&(a.hasFeaturedVideo=!0,a.$featuredVideoBtn.bind("click",function(b){b.preventDefault();b={mainClass:"nm-featured-video-popup nm-mfp-fade-in",
closeMarkup:'<a class="mfp-close nm-font nm-font-close2"></a>',removalDelay:180,type:"iframe",closeOnContentClick:!0,closeBtnInside:!1};"0"==nm_wp_vars.shopYouTubeRelated&&(b.iframe={patterns:{youtube:{src:"//www.youtube.com/embed/%id%?rel=0&autoplay=1"}}});a.$featuredVideoBtn.magnificPopup(b).magnificPopup("open")}))}});b.nmThemeExtensions.singleProduct=b.nmTheme.singleProduct_init})(jQuery);