!function(e){"use strict";var r=function(){if(!e.isEmptyObject(reyParams.fixed_summary)&&reyParams.fixed_summary.enabled&&rey.vars.is_desktop&&!(CSS&&CSS.supports&&CSS.supports("position","sticky")&&reyParams.fixed_summary.css_first)&&void 0!==e.reySticky){var r=e("body.single-product.--fixed-summary");if(r.length){var t=".summary.entry-summary",o=".woocommerce-product-gallery",a=e(".rey-siteHeader.header-pos--fixed:not(.--hfx-spacer)");reyParams.fixed_summary.gallery&&(t=".woocommerce-product-gallery__wrapper",o=".summary.entry-summary");e(t);var i=0;rey.util.imagesLoaded(o,(function(){!function(){i=e(o).height();var s={element:t,marginTop:parseInt(reyParams.fixed_summary.offset)||10,marginBottom:parseInt(reyParams.fixed_summary.offset_bottom),stickyContainer:".rey-productSummary",fixedHeaderAware:!0,stickyClass:"--is-sticked",useContainerHeight:reyParams.fixed_summary.use_container_height,wrap:e(t).closest("div.product.--reversed").length},m=e.reySticky(s),c=!1;e(document).on("reycore/woocommerce/product_gallery/reset_gallery reycore/woocommerce/gallery_loaded reycore/woocommerce/summary_accitem reycore/woocommerce/summary_accitem/close reycore/woocommerce/reviews/loaded",(function(){if(i<e(t).outerHeight())c||(m.sticky.destroy(),c=!0);else{if(c)return m=e.reySticky(s),void(c=!1);m.sticky.update()}})),rey.hooks.addAction("header/fixed/scroll",(e=>{a.length&&reyParams.fixed_summary.refresh_fixed_header&&setTimeout((function(){var r=0;r=e.isScrolled?a.height()+s.marginTop+rey.vars.adminBar+20:s.marginTop,m.sticky.update(r)}),50)})),e("form.variations_form",r).on("found_variation",(function(){m.sticky.update()})),e(".u-toggle-text .u-toggle-btn, .u-toggle-text-next-btn + .btn",r).on("click",(function(){m.sticky.update()})),e(window).on("LazyLoad::Initialized",(function(e){m.sticky.update()})),e(".wp-post-image",e(t)).on("lazyloaded lazyload",(function(){m.sticky.update()}))}()}))}}};document.addEventListener("rey-DOMContentLoaded",(function(e){r()}))}(jQuery);