// source --> https://gmetaldesign.fr/wp-content/plugins/woocommerce-photo-reviews/js/shortcode-script.min.js?ver=1.3.2 
let slides,current_shortcode_id;function shortcode_wcpr_resize_masonry_items(){let e=jQuery(".woocommerce-photo-reviews-shortcode").data("reviews_shortcode"),o=e?parseInt(e.cols_gap||0):0;o||(o=20),jQuery(".wcpr-grid-loadmore .shortcode-wcpr-grid-item:not(.wcpr-grid-item-init)").each((function(){shortcode_wcpr_resize_masonry_item(jQuery(this),1,o)}))}function shortcode_wcpr_resize_masonry_item(e,o,r){let t,i=0;if((e=jQuery(e)).find(".shortcode-reviews-images-wrap-right .shortcode-reviews-images").length&&(t=e.find(".shortcode-reviews-images-wrap-right .shortcode-reviews-images"),i=t.outerHeight(),0===i)){let o=e.find(".shortcode-wcpr-content").outerWidth(),r=t.attr("width")||0,s=t.attr("height")||0;i=0!==s?Math.round(o/r*s):o}let s=e.find(".shortcode-wcpr-content").outerHeight(),a=e.find(".shortcode-review-content-container").outerHeight();s<a+i&&(s=a+i);let c=Math.ceil((s+r)/(o+r));e.addClass("wcpr-grid-item-init").css("grid-row-end","span "+c)}function wcpr_enable_scroll(){"use strict";let e=parseInt(jQuery("html").css("top"));jQuery("html").removeClass("shortcode-wcpr-noscroll"),jQuery("html,body").scrollTop(-e)}function wcpr_disable_scroll(){"use strict";if(jQuery(document).height()>jQuery(window).height()){let e=jQuery("html").scrollTop()?jQuery("html").scrollTop():jQuery("body").scrollTop();jQuery("html").addClass("shortcode-wcpr-noscroll").css("top",-e)}}jQuery(window).on("elementor/frontend/init",(()=>{"use strict";elementorFrontend.hooks.addAction("frontend/element_ready/woocommerce-photo-reviews.default",(function(e){if(!window.elementor)return;let o=e.find(".woocommerce-photo-reviews-shortcode"),r=-1,t=0,i=!1;function s(e){t=0,r=e,e>=slides.length&&(r=0),e<0&&(r=slides.length-1),jQuery("#shortcode-reviews-content-left-modal").html(""),jQuery("#shortcode-reviews-content-left-main").html("");let o=jQuery(slides[r]);if(0==o.find(".shortcode-reviews-images-container").length)jQuery(".shortcode-wcpr-modal-light-box").addClass("shortcode-wcpr-no-images");else{jQuery("#shortcode-reviews-content-left-modal").html(o.find(".shortcode-reviews-images-wrap-left").html());let e=o.find(".shortcode-reviews-images-wr-right").html();e&&(jQuery(".shortcode-wcpr-modal-light-box").removeClass("shortcode-wcpr-no-images"),jQuery("#shortcode-reviews-content-left-main").html(e)),jQuery("#shortcode-reviews-content-left-modal").find(".shortcode-reviews-images").parent().on("click",(function(){t=jQuery(this).data("image_index");let e="",o=jQuery(this).attr("href"),r=jQuery("#shortcode-reviews-content-left-main").find(".shortcode-reviews-images");return jQuery(this).hasClass("reviews-iframe")||jQuery(this).find(".reviews-iframe").length?e=jQuery(`<iframe class="shortcode-reviews-images reviews-iframe" data-original_src="${o}" src="${o}" frameborder="0" allowfullscreen></iframe>`):jQuery(this).hasClass("reviews-videos")||jQuery(this).find(".reviews-videos").length?e=jQuery(`<video class="shortcode-reviews-images reviews-videos" data-original_src="${o}" src="${o}" controls></video>`):(e=jQuery(`<img class="shortcode-reviews-images" data-original_src="${o}" src="${o}">`),e.attr("title",r.attr("title"))),e.attr({width:r.attr("width"),height:r.attr("width")}),r.replaceWith(e),jQuery("#shortcode-reviews-content-left-main").find(".shortcode-wcpr-review-image-caption").html(jQuery(this).data("image_caption")),!1}))}jQuery("#shortcode-reviews-content-right .shortcode-reviews-content-right-meta").html(o.find(".shortcode-review-content-container").html()),jQuery("#shortcode-reviews-content-right .shortcode-wcpr-single-product-summary").html(o.find(".shortcode-wcpr-single-product-summary-content-wrapper").html()),jQuery(".shortcode-wcpr-modal-light-box").fadeIn(200)}(/iPad/i.test(navigator.userAgent)||/Safari/i.test(navigator.userAgent)&&/Apple Computer/.test(navigator.vendor)&&!/Mobi|Android/i.test(navigator.userAgent))&&(i=!0),o.find(".shortcode-wcpr-grid-item .shortcode-reviews-images").unbind().on("click",(function(e){let r=jQuery(this),t=o.data("reviews_shortcode");if(t.hasOwnProperty("masonry_popup")&&"image"===t.masonry_popup){e.stopPropagation();let o=r.closest(".shortcode-reviews-images-container"),t=[];o.find(".shortcode-reviews-images-wrap-left").find("a").map((function(){let e=jQuery(this).find(".shortcode-reviews-images"),r=jQuery(this).data("image_src")?jQuery(this).data("image_src"):e.attr("src"),i=jQuery(this).data("image_caption")?jQuery(this).data("image_caption"):parseInt(jQuery(this).data("image_index"))+1+"/"+o.find(".shortcode-reviews-images-wrap-left").find("a").length;t.push({href:r,title:i})})),0===t.length&&t.push({href:r.data("original_src")?r.data("original_src"):r.attr("src"),title:r.parent().find(".shortcode-wcpr-review-image-caption").html()}),jQuery.swipebox(t,{hideBarsDelay:1e5,initialIndexOnArray:0})}})),i||o.find(".shortcode-wcpr-enable-box-shadow").addClass("shortcode-wcpr-fix-box-shadow"),jQuery(".shortcode-wcpr-modal-light-box").keydown((function(e){jQuery.swipebox.isOpen||"none"!=jQuery(".shortcode-wcpr-modal-light-box").css("display")&&(27==e.keyCode&&(jQuery(".shortcode-wcpr-modal-light-box").fadeOut(200),jQuery(".shortcode-wcpr-modal-light-box").removeClass(current_shortcode_id+"-modal"),r=-1),-1!=r&&(37==e.keyCode&&s(r-=1),39==e.keyCode&&s(r+=1)))})),o.find(".shortcode-wcpr-grid-item").unbind().on("click",(function(){let e=o.data("reviews_shortcode");if(e.hasOwnProperty("masonry_popup")&&"review"===e.masonry_popup){e.hasOwnProperty("full_screen_mobile")&&"on"===e.full_screen_mobile?jQuery(".shortcode-wcpr-modal-light-box").addClass("shortcode-wcpr-full-screen-mobile"):jQuery(".shortcode-wcpr-modal-light-box").removeClass("shortcode-wcpr-full-screen-mobile"),slides=o.find(".shortcode-wcpr-grid-item");let r=slides.index(jQuery(this));r>=0&&(jQuery(".shortcode-wcpr-modal-light-box").removeClass(current_shortcode_id+"-modal"),current_shortcode_id=o.attr("id"),jQuery(".shortcode-wcpr-modal-light-box").addClass(current_shortcode_id+"-modal"),s(r),wcpr_disable_scroll())}})),o.find(".shortcode-wcpr-read-more").unbind().on("click",(function(e){e.stopPropagation();let o=jQuery(this).closest(".shortcode-wcpr-review-content"),r=o.find(".shortcode-wcpr-review-content-full").html();r&&o.html(r),o.closest(".shortcode-wcpr-grid-item").removeClass("wcpr-grid-item-init"),shortcode_wcpr_resize_masonry_items()})),shortcode_wcpr_resize_masonry_items()}))})),jQuery(document).ready((function(e){"use strict";let o=!1;function r(){o||e(".shortcode-wcpr-enable-box-shadow").addClass("shortcode-wcpr-fix-box-shadow")}(/iPad/i.test(navigator.userAgent)||/Safari/i.test(navigator.userAgent)&&/Apple Computer/.test(navigator.vendor)&&!/Mobi|Android/i.test(navigator.userAgent))&&(o=!0),r();let t=-1,i=0;function s(){wcpr_enable_scroll(),e(".shortcode-wcpr-modal-light-box").fadeOut(200),t=-1}function a(o){i=0,t=o,o>=slides.length&&(t=0),o<0&&(t=slides.length-1);let r=e("#shortcode-reviews-content-left-modal"),s=e("#shortcode-reviews-content-left-main");r.html(""),s.html("");let a=e(slides[t]);if(0===a.find(".shortcode-reviews-images-container").length)e(".shortcode-wcpr-modal-light-box").addClass("shortcode-wcpr-no-images");else{r.html(a.find(".shortcode-reviews-images-wrap-left").html());let o=a.find(".shortcode-reviews-images-wrap-right").html();o&&(e(".shortcode-wcpr-modal-light-box").removeClass("shortcode-wcpr-no-images"),s.html(o)),r.find(".shortcode-reviews-images").map((function(){let o=e(this).data("src");o&&e(this).attr("src",o)})),r.find(".shortcode-reviews-images").parent().on("click",(function(){i=e(this).data("image_index");let o="",r=jQuery(this).attr("href");return jQuery(this).hasClass("reviews-iframe")||jQuery(this).find(".reviews-iframe").length?o=jQuery(`<iframe class="shortcode-reviews-images reviews-iframe" data-original_src="${r}" src="${r}" frameborder="0" allowfullscreen></iframe>`):jQuery(this).hasClass("reviews-videos")||jQuery(this).find(".reviews-videos").length?o=jQuery(`<video class="shortcode-reviews-images reviews-videos" data-original_src="${r}" src="${r}" controls></video>`):(o=jQuery(`<img class="shortcode-reviews-images" data-original_src="${r}" src="${r}">`),o.attr("title",s.find(".shortcode-reviews-images").attr("title"))),o.attr({width:s.find(".shortcode-reviews-images").attr("width"),height:s.find(".shortcode-reviews-images").attr("width")}),s.find(".shortcode-reviews-images").replaceWith(o),s.find(".shortcode-wcpr-review-image-caption").html(e(this).data("image_caption")),!1}))}e("#shortcode-reviews-content-right .shortcode-reviews-content-right-meta").html(a.find(".shortcode-review-content-container").html()),e("#shortcode-reviews-content-right .shortcode-wcpr-single-product-summary").html(a.find(".shortcode-wcpr-single-product-summary-content-wrapper").html()),e(".shortcode-wcpr-modal-light-box").fadeIn(200),function(o){e(".shortcode-wcpr-single-product-summary").find(".shortcode-wcpr-variations_form").each((function(){e(this).addClass("variations_form vi_wpvs_variation_form"),e(this).find("select").each((function(r,t){e(this).val(jQuery(o).find("select").eq(r).val()).trigger("change")})),e(this).wc_variation_form(),e(document.body).trigger("vi_wpvs_variation_form"),e(document.body).trigger("wc_price_based_country_ajax_geolocation")}))}(a),jQuery("img.jetpack-lazy-image:not(.jetpack-lazy-image--handled)").length&&document.querySelector("body").dispatchEvent(new Event("jetpack-lazy-images-load"))}e(".shortcode-wcpr-close").on("click",(function(){s()})),e(".shortcode-wcpr-single-product-summary-meta-shop .variations_form").each((function(){e(this).addClass("shortcode-wcpr-variations_form").removeClass("variations_form")})),e(".shortcode-wcpr-modal-light-box .shortcode-wcpr-overlay").on("click",(function(){s()})),e("#shortcode-reviews-content-left-main").on("click",".shortcode-reviews-images",(function(){let o=e(this),r=[];e("#shortcode-reviews-content-left-modal").find("a").map((function(){let o=e(this).find(".shortcode-reviews-images"),t=e(this).data("image_src")?e(this).data("image_src"):o.attr("src"),i=e(this).data("image_caption")?e(this).data("image_caption"):parseInt(e(this).data("image_index"))+1+"/"+e("#shortcode-reviews-content-left-modal").find("a").length;r.push({href:t,title:i})})),0===r.length&&r.push({href:o.data("original_src")?o.data("original_src"):o.attr("src"),title:o.parent().find(".shortcode-wcpr-review-image-caption").html()}),e.swipebox(r,{hideBarsDelay:1e5,initialIndexOnArray:i})})),e(document).on("keydown",(function(o){let r=e(".shortcode-wcpr-modal-light-box");0!==e(".woocommerce-photo-reviews-shortcode").length&&(e.swipebox.isOpen||"none"!==r.css("display")&&(27===o.keyCode&&s(),-1!==t&&(37===o.keyCode&&a(t-=1),39===o.keyCode&&a(t+=1))))})),e(document).on("click",".shortcode-wcpr-grid-item",(function(){let o=e(this).closest(".woocommerce-photo-reviews-shortcode"),r=o.data("reviews_shortcode");if(r.hasOwnProperty("masonry_popup")&&"review"===r.masonry_popup){r.hasOwnProperty("full_screen_mobile")&&"on"===r.full_screen_mobile?e(".shortcode-wcpr-modal-light-box").addClass("shortcode-wcpr-full-screen-mobile"):e(".shortcode-wcpr-modal-light-box").removeClass("shortcode-wcpr-full-screen-mobile"),slides=o.find(".shortcode-wcpr-grid-item");let t=slides.index(e(this));t>=0&&(e(".shortcode-wcpr-modal-light-box").removeClass(current_shortcode_id+"-modal"),current_shortcode_id=o.attr("id"),e(".shortcode-wcpr-modal-light-box").addClass(current_shortcode_id+"-modal"),a(t),wcpr_disable_scroll())}})),e(document).on("click",".shortcode-wcpr-read-more",(function(o){o.stopPropagation();let r=e(this).closest(".shortcode-wcpr-review-content"),t=r.find(".shortcode-wcpr-review-content-full").html();t&&r.html(t),r.closest(".shortcode-wcpr-grid-item").removeClass("wcpr-grid-item-init"),shortcode_wcpr_resize_masonry_items()})),e(document).on("click",".shortcode-wcpr-grid-item .shortcode-reviews-images",(function(o){let r=e(this),t=r.closest(".woocommerce-photo-reviews-shortcode").data("reviews_shortcode");if(t.hasOwnProperty("masonry_popup")&&"image"===t.masonry_popup){o.stopPropagation();let t=r.closest(".shortcode-reviews-images-container"),i=[];t.find(".shortcode-reviews-images-wrap-left").find("a").map((function(){let o=e(this).find(".shortcode-reviews-images"),r=e(this).data("image_src")?e(this).data("image_src"):o.attr("src"),s=e(this).data("image_caption")?e(this).data("image_caption"):parseInt(e(this).data("image_index"))+1+"/"+t.find(".shortcode-reviews-images-wrap-left").find("a").length;i.push({href:r,title:s})})),0===i.length&&i.push({href:r.data("original_src")?r.data("original_src"):r.attr("src"),title:r.parent().find(".shortcode-wcpr-review-image-caption").html()}),e.swipebox(i,{hideBarsDelay:1e5,initialIndexOnArray:0})}})),e("body").on("click",".shortcode-wcpr-next",(function(){a(t+=1)})),e("body").on("click",".shortcode-wcpr-prev",(function(){a(t-=1)})),jQuery(document.body).on("woocommerce_photo_reviews_shortcode_ajax_get_reviews",(function(){setTimeout((function(){shortcode_wcpr_resize_masonry_items()}),100)}));let c=!1,n="",d="",h="";e(document).on("click",".shortcode-wcpr-load-more-reviews-button:not(.wcpr-loading)",(function(o){let t=e(this),i=t.closest(".woocommerce-photo-reviews-shortcode");n=i.data("wcpr_image"),d=i.data("wcpr_verified"),h=i.data("wcpr_rating");let s=i.data("reviews_shortcode");if(c)return!1;c=!0,o.preventDefault(),i.addClass("woocommerce-photo-reviews-shortcode-loading"),t.addClass("wcpr-loading"),e.ajax({url:woocommerce_photo_reviews_shortcode_params.ajaxurl,type:"get",data:{action:"woocommerce_photo_reviews_shortcode_ajax_get_reviews",reviews_shortcode:JSON.stringify(s),wcpr_page:t.data("cpage"),wcpr_image:n,wcpr_verified:d,wcpr_rating:h},success:function(e){let o=jQuery('<div class="woocommerce_photo_reviews_shortcode_ajax_get_reviews"></div>');o.css("display","none").html(e.html),s.hasOwnProperty("style")&&"masonry"===s.style?i.find(".shortcode-wcpr-grid").append(o.find(".shortcode-wcpr-grid").html()):i.find(".commentlist").append(o.find(".commentlist").html()),i.find(".wcpr-load-more-reviews-button-container").replaceWith(o.find(".wcpr-load-more-reviews-button-container")),i.data("wcpr_image",n),i.data("wcpr_verified",d),i.data("wcpr_rating",h)},complete:function(){s.hasOwnProperty("style")&&"masonry"===s.style&&s.hasOwnProperty("masonry_popup")&&s.masonry_popup,r(),jQuery(document.body).trigger("woocommerce_photo_reviews_shortcode_ajax_get_reviews"),c=!1,t.removeClass("wcpr-loading"),i.removeClass("woocommerce-photo-reviews-shortcode-loading")}})})),e(document).on("click","a.wcpr-page-numbers.wcpr-page-numbers-nav",(function(e){let o=jQuery(this).closest(".woocommerce-photo-reviews-shortcode").data("reviews_shortcode");if(!o.hasOwnProperty("pagination_ajax")||"on"!==o.pagination_ajax)return!0;e.preventDefault(),e.stopPropagation();let r=jQuery(this).closest(".shortcode-wcpr-pagination"),t=r.find(".wcpr-page-numbers").index(r.find(".wcpr-page-numbers.wcpr-current"));if(jQuery(this).hasClass("wcpr-page-numbers-next")?t++:t--,0===t||t===r.find(".wcpr-page-numbers:not(.wcpr-page-numbers-nav)").length)return!1;r.find(".wcpr-page-numbers").eq(t).trigger("click")})),e(document).on("click","a.wcpr-page-numbers:not(.wcpr-page-numbers-nav)",(function(o){let t=e(this),i=t.closest(".woocommerce-photo-reviews-shortcode");n=i.data("wcpr_image"),d=i.data("wcpr_verified"),h=i.data("wcpr_rating");let s=i.data("reviews_shortcode");if(!s.hasOwnProperty("pagination_ajax")||"on"!==s.pagination_ajax)return!0;if(c)return!1;let a=parseInt(i.offset().top);window.scrollTo({top:a,behavior:"smooth"}),c=!0,o.preventDefault(),i.addClass("woocommerce-photo-reviews-shortcode-loading"),e.ajax({url:woocommerce_photo_reviews_shortcode_params.ajaxurl,type:"get",data:{action:"woocommerce_photo_reviews_shortcode_ajax_get_reviews",reviews_shortcode:JSON.stringify(s),wcpr_page:parseInt(t.html()),wcpr_image:n,wcpr_verified:d,wcpr_rating:h},success:function(e){i.html(e.html),i.data("wcpr_image",n),i.data("wcpr_verified",d),i.data("wcpr_rating",h)},error:function(e){},complete:function(){s.hasOwnProperty("style")&&"masonry"===s.style&&s.hasOwnProperty("masonry_popup")&&s.masonry_popup,r(),jQuery(document.body).trigger("woocommerce_photo_reviews_shortcode_ajax_get_reviews"),c=!1,i.removeClass("woocommerce-photo-reviews-shortcode-loading")}})})),e(document).on("click","a.shortcode-wcpr-filter-button",(function(o){let t=e(this),i=t.closest(".woocommerce-photo-reviews-shortcode"),s=i.data("reviews_shortcode");if(!s.hasOwnProperty("pagination_ajax")||"on"!==s.pagination_ajax)return;if(c||0===parseInt(t.find(".shortcode-wcpr-filter-button-count").html())&&!t.hasClass("shortcode-wcpr-active"))return!1;n=i.data("wcpr_image"),d=i.data("wcpr_verified"),h=i.data("wcpr_rating");let a=t.data("filter_type");switch(a){case"all":if(t.hasClass("shortcode-wcpr-active"))return!1;h="";break;case"image":n=t.hasClass("shortcode-wcpr-active")?"":1;break;case"verified":d=t.hasClass("shortcode-wcpr-active")?"":1;break;default:if(t.hasClass("shortcode-wcpr-active"))return!1;h=a}let l=parseInt(i.offset().top);window.scrollTo({top:l,behavior:"smooth"}),c=!0,o.preventDefault(),i.addClass("woocommerce-photo-reviews-shortcode-loading"),e.ajax({url:woocommerce_photo_reviews_shortcode_params.ajaxurl,type:"get",data:{action:"woocommerce_photo_reviews_shortcode_ajax_get_reviews",reviews_shortcode:JSON.stringify(s),wcpr_image:n,wcpr_verified:d,wcpr_rating:h},success:function(e){i.html(e.html),i.data("wcpr_image",n),i.data("wcpr_verified",d),i.data("wcpr_rating",h)},error:function(e){},complete:function(){s.hasOwnProperty("style")&&"masonry"===s.style&&s.hasOwnProperty("masonry_popup")&&s.masonry_popup,r(),i.hasClass("woocommerce-photo-reviews-slide-init")&&(i.removeClass("woocommerce-photo-reviews-slide woocommerce-photo-reviews-slide-init woocommerce-photo-reviews-slide-none"),viwcpr_flexslider()),jQuery(document.body).trigger("woocommerce_photo_reviews_shortcode_ajax_get_reviews"),c=!1,i.removeClass("woocommerce-photo-reviews-shortcode-loading")}})}))})),jQuery(window).on("load",(function(){"use strict";shortcode_wcpr_resize_masonry_items()})).on("resize",(function(){"use strict";jQuery(".shortcode-wcpr-grid-item.wcpr-grid-item-init").removeClass("wcpr-grid-item-init"),shortcode_wcpr_resize_masonry_items()}));