woodmartThemeModule.wdElementorAddAction("frontend/element_ready/container",function(){woodmartThemeModule.stickyContainer()});let windowWidth=woodmartThemeModule.windowWidth;woodmartThemeModule.stickyContainer=function(){function o(){return document.querySelector("html").hasAttributes("dir")&&"rtl"===document.querySelector("html").getAttribute("dir")}function l(t,n){var e=Object.keys(n);0!==e.length&&e.forEach(function(e){t.style[e]=n[e]})}function c(e,t){var n=window.getComputedStyle(e),n={position:"fixed",width:n.width,marginTop:n.marginTop,marginBottom:n.marginBottom,top:t+"px",bottom:"",zIndex:99};return o()?n.insetInlineEnd=e.getBoundingClientRect().left+"px":n.insetInlineStart=e.getBoundingClientRect().left+"px",n}function a(e){var t={position:"absolute",top:"",bottom:"0px"};return o()?t.insetInlineEnd=e.offsetLeft+"px":t.insetInlineStart=e.offsetLeft+"px",t}function u(e,t){e.parentNode.removeChild(t),e.style=""}function n(n,o){var i=n.dataset.id;if(void 0!==i){let t=document.querySelector(`.elementor-element-${i}.wd-sticky-spacer`);if(o.is_mobile&&!n.classList.contains("wd-sticky-container-mobile-yes")||o.is_tablet&&!n.classList.contains("wd-sticky-container-tablet-yes")||o.is_desktop&&!n.classList.contains("wd-sticky-container-yes"))null!==t&&u(n,t);else{var i=Array.from(n.classList).find(function(e){return-1!==e.indexOf("wd-sticky-offset")}),o=void 0!==i?parseInt(i.substring(i.lastIndexOf("-")+1)):150,i=woodmartThemeModule.$window.scrollTop(),e=n.offsetHeight,d=n.getBoundingClientRect().top+window.scrollY-o,r=n.parentNode.parentNode.classList.contains("entry-content"),s=n.parentNode.getBoundingClientRect().top+window.scrollY-o+n.parentNode.offsetHeight;if(!r&&null===t&&d<i){let e=s<i?"absolute":"fixed";t=function(e,t,n="fixed"){let o=c(e,t);return"absolute"===n&&(o=a(e)),(t=e.cloneNode(!0)).classList.add("wd-sticky-spacer"),l(t,{visibility:"hidden"}),e.parentNode.insertBefore(t,e),l(e,o),t}(n,o,e)}null!==t&&(r=t.parentNode.getBoundingClientRect().top+window.scrollY-o+t.parentNode.offsetHeight,i<t.getBoundingClientRect().top+window.scrollY-o?u(n,t):"fixed"!==n.style.position&&i<r-e?(void 0===function(t){var n=[];if(t.parentNode){let e=t.parentNode.firstChild;for(;e;)1===e.nodeType&&e!==t&&n.push(e),e=e.nextSibling}return n}(n).find(function(e){return"absolute"===e.style.position})&&l(n.parentNode,{position:""}),l(n,c(t,o))):"absolute"!==n.style.position&&r<d+e&&(l(n.parentNode,{position:"relative"}),l(n,a(t))))}}}document.querySelectorAll(".wd-sticky-container-yes, .wd-sticky-container-tablet-yes, .wd-sticky-container-mobile-yes").forEach(function(e){var e=e.dataset.id,t=document.querySelector(`.elementor-element-${e}.wd-sticky-spacer`);t&&t.remove(),document.querySelector(".elementor-element-"+e).style=""}),window.addEventListener("scroll",function(){var e=document.querySelectorAll(".wd-sticky-container-yes:not(.wd-sticky-spacer), .wd-sticky-container-tablet-yes:not(.wd-sticky-spacer), .wd-sticky-container-mobile-yes:not(.wd-sticky-spacer)");let t={is_desktop:1024<windowWidth,is_tablet:768<windowWidth&&windowWidth<1024,is_mobile:windowWidth<=768};e.forEach(function(e){n(e,t)})})},window.addEventListener("resize",function(){"undefined"!=typeof elementor&&(windowWidth=isNaN(parseInt(elementor.$preview.css("--e-editor-preview-width")))?1025:parseInt(elementor.$preview.css("--e-editor-preview-width")))}),window.addEventListener("load",function(){woodmartThemeModule.stickyContainer()});