(()=>{"use strict";var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.jQuery;var n=e.n(t);const o=window.lodash;var i=n()(document);i.on("click",".vp-block-pagination-previous, .vp-block-pagination-next, .vp-block-pagination-numbers a, .vp-block-pagination-load-more, .vp-block-pagination-infinite",function(e){var t,o=n()(e.currentTarget),i=o.closest(".vp-block-loop").find(".vp-portfolio"),a=null==i||null===(t=i[0])||void 0===t?void 0:t.vpf;if(a){e.preventDefault();var r=o.hasClass("vp-block-pagination-previous")||o.hasClass("vp-block-pagination-next")||!!o.parent(".vp-block-pagination-numbers").length;a.loadNewItems(o.attr("href"),r)}}),i.on("loadedNewItems.vpf",function(e,t){"vpf"===e.namespace&&t.$item.find("vp-block-pagination-infinite").length&&setTimeout(function(){var e=t.$item.find(".vp-block-pagination-infinite.is-intersecting:first");e.length&&e.attr("href")&&t.loadNewItems(e.attr("href"),!1)},100)});var a=new window.IntersectionObserver(function(e,t){try{e.forEach(function(e){if(e.target){var n=e.target.getAttribute("href");if(n)if(e.isIntersecting){e.target.classList.add("is-intersecting");var o=e.target.closest(".vp-block-loop"),i=null==o?void 0:o.querySelector(".vp-portfolio"),a=null==i?void 0:i.vpf;a&&a.loadNewItems(n,!1)}else e.target.classList.remove("is-intersecting");else t.disconnect()}})}catch(e){console.log(e)}},{rootMargin:"300px 0px"}),r=(0,o.throttle)(function(){document.querySelectorAll(".vp-block-pagination-infinite[href]:not(.is-handled)").forEach(function(e){e.classList.add("is-handled"),a.observe(e)})},200);i.on("ready",function(){new window.MutationObserver(r).observe(document.documentElement,{childList:!0,subtree:!0})})})();