(function(I){const w=(t,r)=>{var e=new MutationObserver(function(h,f){r.isotope("layout"),f.disconnect()}),p={attributes:!0,attributeFilter:["class"]};t.hasClass("e-active")||e.observe(t[0],p)},S=(t,r)=>{var e=new MutationObserver(function(f,g){r.isotope("layout"),g.disconnect()}),p={attributes:!0,attributeFilter:["class"]};let h=t.children().has(r);h.hasClass("e-active")||e.observe(h[0],p)};window.dceDynamicPostsGrid=function(t,r){var e=dceGetElementSettings(t),p=t.attr("data-id"),h=t.find(".dce-posts-container.dce-skin-grid .dce-posts-wrapper"),f=null,g=!1;let k=e.grid_match_height_by_row||e.grid_filters_match_height_by_row;const j=()=>{let i=t.find(".e-con .e-con"),o=t.find(".dce-post-block"),n=[];return o.first().find(".e-con").not(i).each(s=>{let a=o.map((u,d)=>jQuery(d).find(".e-con").not(i)[s]);n.push(a)}),n},M=()=>{let i;return e.style_items==="template"?t.find(".dce-post-block .elementor-inner-section").length?(i=[],t.find(".dce-post-block").first().find(".elementor-inner-section").each(o=>{let n=t.find(".dce-post-block").map((s,a)=>jQuery(a).find(".elementor-inner-section")[o]);i.push(n)})):t.find(".dce-post-block .elementor-top-section").length?i=[t.find(".dce-post-block .elementor-top-section")]:i=j():i=[t.find(".dce-post-block")],i},y=()=>{slices=M();for(const i of slices)i.matchHeight({byRow:k})};function x(){f=h.masonry({itemSelector:".dce-post-item",masonry:{horizontalOrder:!0}}),g=!0}function v(){e[dceDynamicPostsSkinPrefix+"grid_type"]!="masonry"?(f.masonry("destroy"),g=!1):f.masonry()}if((e.grid_match_height||e.grid_filters_match_height)&&y(),dceDynamicPostsSkin!=="grid_filters"&&e[dceDynamicPostsSkinPrefix+"grid_type"]=="masonry"&&(x(),f.imagesLoaded().progress(function(){v()})),r(document).on("sf:ajaxfinish",".searchandfilter",function(i,o){var n=document.querySelectorAll(".dce-dynamic-posts-collection .elementor-section, .dce-dynamic-posts-collection .elementor-column, .dce-dynamic-posts-collection .elementor-widget, .dce-dynamic-posts-collection .e-container, .dce-dynamic-posts-collection .e-con");n.forEach(function(s){dce.applyDynamicStyles(s)})}),!elementorFrontend.isEditMode()&&e.infiniteScroll_enable){var c=".elementor-element-"+p,P=e.infiniteScroll_enable_history?"replace":!1,l=t.find(".dce-posts-container.dce-skin-grid .dce-posts-wrapper.dce-wrapper-grid"),F=e[dceDynamicPostsSkinPrefix+"grid_type"],m=l.isotope({itemSelector:".dce-post-item",layoutMode:F==="masonry"?"masonry":"fitRows",sortBy:"original-order",percentPosition:!0,masonry:{columnWidth:".dce-post-item"}});m.imagesLoaded().progress(function(){m.isotope("layout")});let i=m.closest('[role="tabpanel"]');if(i.length)w(i,m);else{let o=m.closest('[role="tablist"]');o.length&&S(o,m)}elementorFrontend.isEditMode()===!1&&e.templatemode_linkable==="yes"&&l.on("append.infiniteScroll",function(o,n,s){t.find(".dce-post.dce-post-item[data-post-link]").click(function(){return window.location.assign(r(this).attr("data-post-link")),!1})}),(e.grid_match_height||e.grid_filters_match_height)&&l.on("append.infiniteScroll",function(o,n,s){y(),l.isotope("layout")}),e.style_items==="template"&&(l.on("append.infiniteScroll",function(o,n,s){if(elementorFrontend&&elementorFrontend.elementsHandler.runReadyTrigger){var a=r(".dce-dynamic-posts-collection").find(".elementor-widget");a.each(function(d){elementorFrontend.elementsHandler.runReadyTrigger(jQuery(this)),elementorFrontend.hooks.doAction("frontend/element_ready/global",jQuery(this),jQuery)})}var u=document.querySelectorAll(".dce-dynamic-posts-collection .elementor-section, .dce-dynamic-posts-collection .elementor-column, .dce-dynamic-posts-collection .elementor-widget, .dce-dynamic-posts-collection .e-container, .dce-dynamic-posts-collection .e-con");u.forEach(function(d){dce.applyDynamicStyles(d)})}),r(document).on("sf:ajaxfinish",".searchandfilter",function(o,n){elementorFrontend&&((e.grid_match_height||e.grid_filters_match_height)&&y(),t.find(".dce-post.dce-post-item[data-post-link]").click(function(){return window.location.assign(r(this).attr("data-post-link")),!1}))}));var Q=m.data("isotope");if(jQuery(c+" .pagination__next").length){var b={path:c+" .pagination__next",history:P,append:c+" .dce-post.dce-post-item",outlayer:Q,status:c+" .page-load-status",hideNav:c+".pagination",scrollThreshold:e.infiniteScroll_trigger==="scroll",loadOnScroll:e.infiniteScroll_trigger==="scroll",onInit:function(){this.on("load",function(){})}};e.infiniteScroll_trigger=="button"&&(b.button=c+" .view-more-button"),infScroll=l.infiniteScroll(b);var A=jQuery(c+" .dce-post-item:visible").length;l.on("append.infiniteScroll",function(o,n,s,a){setTimeout(function(){var u=jQuery(c+" .dce-post-item:visible").length;u<=A&&l.infiniteScroll("loadNextPage")},1e3)})}}var D=function(){var i=function(a,u){a.forEach(function(d){var _=r(d.target);d.isIntersecting?(_.addClass("animate"),u.unobserve(d.target)):_.removeClass("animate")})},o={root:null,rootMargin:"0px",threshold:.1},n=new IntersectionObserver(i,o),s=t.find(".dce-post-item");s.each(function(){n.observe(this)})};D();var H=function(i,o){for(var n of i)n.type==="attributes"&&n.attributeName==="class"&&g&&v()};dceObserveElement(t[0],H)},jQuery(window).on("elementor/frontend/init",function(){["dce-dynamicposts-v2.grid","dce-dynamicposts-v2.grid-filters","dce-woo-products-cart.grid","dce-woo-products-cart.grid-filters","dce-woo-products-cart-on-sale.grid","dce-woo-products-cart-on-sale.grid-filters","dce-woo-product-upsells.grid","dce-woo-product-upsells.grid-filters","dce-woo-product-crosssells.grid","dce-woo-product-crosssells.grid-filters","dce-dynamic-woo-products.grid","dce-dynamic-woo-products.grid-filters","dce-dynamic-show-favorites.grid","dce-dynamic-show-favorites.grid-filters","dce-dynamic-archives.grid","dce-my-posts.grid","dce-my-posts.grid-filters","dce-sticky-posts.grid","dce-sticky-posts.grid-filters","dce-search-results.grid","dce-search-results.grid-filters","dce-metabox-relationship.grid","dce-metabox-relationship.grid-filters","dce-acf-relationship.grid","dce-acf-relationship.grid-filters"].forEach(function(r){elementorFrontend.hooks.addAction("frontend/element_ready/"+r,dceDynamicPostsGrid)})})})(jQuery);